nerdtree

Nerdtree - save state of opened directories

时间秒杀一切 提交于 2019-12-04 10:09:08
问题 A typical workflow for me is opening Vim (MacVim to be precise), doing: :NERDTree <bookmark> then manually opening various subdirectories I want to use. Often it's the same set of directories I had open when I was last working on the project. I'm aware of the O recursive-open command but if it's a large tree I then have to go and close a load of them to clear the screen up. Is there any way of saving the ones that are open / the general 'state'? 回答1: Unfortunately, there is no way to do this

Vim and Tmux rendering error

只谈情不闲聊 提交于 2019-12-04 09:04:04
I have a problem when using Tmux and Vim. As you can see on the picture when I use nerdtree (or irssi, actually any terminal app), I have these kind of rendering problems. Every key I type modify the entire terminal rendering. It's only a graphical bug, but it prevents me from working properly. For example, on the screenshot I submitted, nerdtree is opened. The rendering issue comes mostly when the lines are too long (wrapping) or when I have to scroll (down or up). I haven't found a way to solve it. Does anybody has this problem too? I really don't know how to solve this. Many thanks!

Changing drive letter in NERDtree

强颜欢笑 提交于 2019-12-04 08:10:43
问题 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) 回答1: If you want to go to your Z drive, for example, start it as: :NERDTree Z:\ 回答2: 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,

NERDTree reload new files

吃可爱长大的小学妹 提交于 2019-12-04 07:23:28
问题 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 ? 回答1: 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

Vim NERDTree: show only .txt files?

元气小坏坏 提交于 2019-12-04 04:29:44
Using NERDTree plugin , I want to view only *.txt files. There is a NERDTreeIgnore variable, but I want something like NERDTreeWhitelistFilter . Is there a way to whitelist what I see? This is what you want: :let NERDTreeIgnore += ['\(\.txt\)\@<!$[[file]]'] I've been playing around with this — it's an interesting problem. Maybe you could try out this regular expression for ignoring files? Edit: talked with my co-worker. Here's the correct regular expression (my original one matched "txt" at the beginning of a file name, too). ^(?!.*\.txt$).* 来源: https://stackoverflow.com/questions/6492587/vim

Vim - helptags not working for NERDtree

佐手、 提交于 2019-12-03 23:57:30
I downloaded and manually installed NERDTree from http://www.vim.org/scripts/script.php?script_id=1658 @hits ➜ .vim rvm:(-ruby-1.9.2) ls -laR .: total 28 drwxr-xr-x 6 hitsu hitsu 4096 2012-02-16 15:21 . drwxr-xr-x 49 hitsu hitsu 4096 2012-02-27 17:43 .. drwxrwxr-x 2 hitsu hitsu 4096 2011-12-28 14:18 doc drwxrwxr-x 2 hitsu hitsu 4096 2011-12-28 14:17 nerdtree_plugin -rw-rw-r-- 1 hitsu hitsu 283 2012-02-07 11:05 .netrwhist drwxrwxr-x 2 hitsu hitsu 4096 2011-12-28 14:17 plugin drwxrwxr-x 2 hitsu hitsu 4096 2011-12-28 14:17 syntax ./doc: total 60 drwxrwxr-x 2 hitsu hitsu 4096 2011-12-28 14:18 .

remap NERDTree Double Click to 'T'

蓝咒 提交于 2019-12-03 12:10: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: 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

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

老子叫甜甜 提交于 2019-12-03 08:08:27
问题 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. 回答1: Try adding let NERDTreeMapOpenInTab='\r' or let NERDTreeMapOpenInTab='<ENTER>' to your .vimrc . HTH 回答2: s will open the file currently under the cursor in a new vertically split window. Use t to open in a new tab. 回答3: You may want to add https://github.com/Nopik/vim-nerdtree-direnter plugin as well - it fixes the

Open file from NERDtree in specific window (or last active)

偶尔善良 提交于 2019-12-03 06:29:06
In VIM I've got 4 windows opened and a NERD tree like this: So, whenever I try to open the file from NERD, it's opened in first buffer (topleft pos). Sometimes in other buffers. Is there a way to open a file in bottom right position ? Mb there are workarounds ? Maybe I can force NERDtree to open file in last active window ? At the moment, it doesn't work this way :( UPD: It looks like the problem is in hidden buffers. When the buffer was opened in one window, and then replaced by another - if you try to open the very first in another window, you'll get it opened in the window it was opened in

NERDTree - how to delete file

我的未来我决定 提交于 2019-12-03 06:28:58
问题 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 :). 回答1: 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