nerdtree

Vim, NERDtree not recovered in session restore

和自甴很熟 提交于 2019-12-03 03:42:03
问题 When I have a NERDtree panel and I save a Vim session (mksession [filename]), then open the session (vim -S filename), the panel is opened and tagged "NERDtree" but is not populated. If I try ":NERDtree" from the commandline, the window does get populated, but another panel now opens. Any ideas wrt this weird behaviour? 回答1: Just decided to deal with this very issue myself. In my case, the session is created when I quit Vim with the following in my vimrc: autocmd VimLeave * mksession!

remap NERDTree Double Click to 'T'

此生再无相见时 提交于 2019-12-03 02:42:25
Using VIM NERDTree Plugin. Is there any way to remap the Double Click on a File action to open the file silently in a new tab ( T )? 1 Introduction This works for NERD tree version 4.2.0 . 2 Open directories and files in a new tab If you would like to open directories and files in a new tab you can simply add the following line to your ~/.vimrc . let g:NERDTreeMapOpenInTabSilent = '<2-LeftMouse>' 3 Only open files in a new tab If you only want to open files in a new tab you have to do something more sophisticated. Add this function somewhere in NERD_tree.vim : " opens a file in a new tab "

How to filter out files by extension in NERDTree?

丶灬走出姿态 提交于 2019-12-03 00:09:01
问题 I would like to *.pyc files not to be shown in NERDTree vim plugin. How to achieve that? 回答1: You want the NERDTreeIgnore option. For example, in your .vimrc : let NERDTreeIgnore = ['\.pyc$'] Where NERDTreeIgnore is an array of regular expressions that match the files you want to exclude. 回答2: Just ran into the problem: What about hiding binary files that do not have an extension? Can't hide them, but can sort files to eliminate some cheesy clutter. Problem looks like: file1* file1.c file2*

NERDTree - how to delete file

ⅰ亾dé卋堺 提交于 2019-12-02 23:20:38
How do you delete a file using NERDTree: vim plugin page ? I have put this into my .vimrc file: set modifiable but I don't know the command to delete! Many thanks :). epsilonhalbe This How to create folders in Vim (by preference using NERDTree)? should give an answer. Just type m in NERDTree window and a dialogue appears in a QuickFix window In addition there has been made a plugin on top of nerdtree https://github.com/ivalkeen/nerdtree-execute which allows to execute files with m + x -> I use it to open pdfs I get from compiling LaTeX 来源: https://stackoverflow.com/questions/10615294/nerdtree

Changing drive letter in NERDtree

 ̄綄美尐妖づ 提交于 2019-12-02 20:17:47
I started using NERDtree plugin on a a windows platform. I can't seem to find a way to change the drive letter. Going up all the way on the directory tree doesn't lead to the drive letter. Any ideas? (Yes, I know, it's going to be a simple answer) Mark If you want to go to your Z drive, for example, start it as: :NERDTree Z:\ If you use: :NERDTree d:\ in the NERDTree window you will see it works. But now if you open(and edit) a file with NERDTree you will find it can not be saved, because the current working directory has not changed'; it is still in the old directory! So if you want change

How to open a file in new tab by default in NERDTree?

风流意气都作罢 提交于 2019-12-02 20:03:20
I want a file to be opened in a new tab when I enter or double click it. I know there is t shortcut but I always open a file in a new tab and enter is more confortable for me. Try adding let NERDTreeMapOpenInTab='\r' or let NERDTreeMapOpenInTab='<ENTER>' to your .vimrc . HTH s will open the file currently under the cursor in a new vertically split window. Use t to open in a new tab. You may want to add https://github.com/Nopik/vim-nerdtree-direnter plugin as well - it fixes the directory opening problem, so enter on directory node will just expand/collapse, not open new tab. user3462225 I use

NERDTree reload new files

懵懂的女人 提交于 2019-12-02 13:55:27
If I add a file to the same directory opened in NERDTree , the only way I can see the file added is if I quit vim and start it again . Is there a way I can reload the files in NERDTree ? romainl You could close and reopen NERDTree or simply hit r to refresh the current directory's listing or R to refresh the root directory's listing . Do you see "Press ? for help" at the top of the NERDTree window? It means that you can press ? for help. If you do, you will see an exhaustive listing of NERDTree shortcuts. That's neat. More generally, many plugins have a thorough documentation that you can

How to filter out files by extension in NERDTree?

╄→гoц情女王★ 提交于 2019-12-02 13:53:59
I would like to *.pyc files not to be shown in NERDTree vim plugin. How to achieve that? You want the NERDTreeIgnore option. For example, in your .vimrc : let NERDTreeIgnore = ['\.pyc$'] Where NERDTreeIgnore is an array of regular expressions that match the files you want to exclude. Just ran into the problem: What about hiding binary files that do not have an extension? Can't hide them, but can sort files to eliminate some cheesy clutter. Problem looks like: file1* file1.c file2* file2.c Solution: let NERDTreeSortOrder=['\.c$'] Result: file1.c file2.c file1* file2* which will sort first the

Vim NerdTree corrupts when using Tmux

泪湿孤枕 提交于 2019-12-01 17:29:35
问题 As described in the title, the nerdtree just corrupts when I'm scrolling down the screen in vim by "control + f". As shown in , most of the folder information, supposed to appear in the left bar, is tangled and covered by the file content. I did find similar issues posted in stackoverflow, but none of those got a good solution yet. Thanks 回答1: Put this into your ~/.bashrc : export TERM=screen-256color As you've found out from the tmux FAQ, "most display problems are due to incorrect TERM

vim插件:显示树形目录插件NERDTree安装 和 使用

独自空忆成欢 提交于 2019-12-01 10:18:06
#下载和配置 NERDTree插件的官方地址如下,可以从这里获取最新的版本 https://github.com/scrooloose/nerdtree 下载zip安装包 或者使用下面官网源文件安装方法 我的实验环境是centos6.6,其他版本可能有些不同。 安装方法很简单,先把压缩文件下载下来,解压后将plugin目录下的NERD_tree.vim拷贝~/.vim/plugin以及doc目录下的NERD_tree.txt拷贝到~/.vim/doc. ~表示当前用户的目录,我的环境中没有~/.vim ~/.vim/plugin ~/.vim/doc ,待会会创建,如果你的版本有,那就更好了。 wget http://www.vim.org/scripts/download_script.php?src_id=17123 -O nerdtree.zip unzip nerdtree.zip mkdir -p ~/.vim/{plugin,doc} cp plugin/NERD_tree.vim ~/.vim/plugin/ cp doc/NERD_tree.txt ~/.vim/doc/ 安装好后,命令行中输入vim,打开vim后,在vim中输入:NERDTree,你就可以看到NERDTree的效果了。 为了方便起见,我们设置一下快捷键,在~/.vimrc 文件中添加下面内容,