nerdtree

Nerd tree: enter does not open sub dirs

99封情书 提交于 2019-11-29 21:28:42
I installed NERDTree via Pathogen on Mac OSX 10.6.8. When I vim a dir, I cannot enter into sub dirs with enter key. Furthermore, the dirs look like this: ?~V? doc/ What's going on? Putting this in my .vimrc solved the problem: let g:NERDTreeDirArrows=0 The creator gave me the fix: https://github.com/scrooloose/nerdtree/issues/108 On Mountain Lion 10.8.2 This worked for me export LC_CTYPE=en_US.UTF-8 export LC_ALL=en_US.UTF-8 Pranay Aryal I followed jernkuan's answer but didn't work. What worked for me was typing :set encoding=utf-8 inside vim But I lose this when I exit out of vim. I have to

Switching between tabs in NERDTree

倖福魔咒の 提交于 2019-11-29 18:42:52
I've just started using the NERDTree vim plugin for my project. I can't find the documentation for switching between opened tabs. Can anyone tell me the shortcut key[s] ? Thanks... An additional option (and my personal choice)beyond the ones listed by Michael Madsen: gt = next tab gT = previous tab I like to bind my vim navigation keys to switching between tabs. Here are the lines from my .vimrc file: map <C-l> :tabn<CR> map <C-h> :tabp<CR> map <C-n> :tabnew<CR> That way, I can switch between tabs using the left and right buttons just like I normally would move the cursor, except I just hold

changing root in NERDTree

与世无争的帅哥 提交于 2019-11-29 02:59:58
I tried to change the NERDTree root with :BookmarkToRoot <bookmark> command and with C letter but when I close vim and open vim the root is not changed. Do you know how to change the root forever? You could try something like: nnoremap <leader>n :NERDTree /path/to/folder<CR> I have this in my .vimrc: set autochdir let NERDTreeChDirMode=2 nnoremap <leader>n :NERDTree .<CR> so that NERDTree always opens in the current folder. With the 1st line, the working directory is always the one where the active buffer is located. With the 2nd line, I make sure the working directory is set correctly. With

Nerd tree: enter does not open sub dirs

倾然丶 夕夏残阳落幕 提交于 2019-11-28 19:02:30
问题 I installed NERDTree via Pathogen on Mac OSX 10.6.8. When I vim a dir, I cannot enter into sub dirs with enter key. Furthermore, the dirs look like this: ?~V? doc/ What's going on? 回答1: Putting this in my .vimrc solved the problem: let g:NERDTreeDirArrows=0 The creator gave me the fix: https://github.com/scrooloose/nerdtree/issues/108 回答2: On Mountain Lion 10.8.2 This worked for me export LC_CTYPE=en_US.UTF-8 export LC_ALL=en_US.UTF-8 回答3: I followed jernkuan's answer but didn't work. What

vim and NERD Tree extension - adding a file

梦想与她 提交于 2019-11-28 14:54:57
When using the vim editor with the NERDTree plugin to navigate through the tree of your project, is there an easy way to create a new source code file under the currently highlighted directory? Currently I go into my shell, add the file and then refresh the tree. There must be a better way. innaM Activate the NERDTree and navigate to the directory in which the new file should live. Then press m to bring up the NERDTree Filesystem Menu and choose a for "add child node". Then simply enter the file's (or directory's name) and you're done. Rick From vim you can run shell commands. So in this case

How do you add NERDTree to your vimrc?

假如想象 提交于 2019-11-28 14:45:03
问题 How do you do it? 回答1: Okay, the previous version was a bit terse, but the answer you're looking for is to add the line below into your ~/.vimrc file. It tells vim that you want to setup a command to run when vim starts, but since it depends on various plugins to be loaded, you don't want to run it until all initialization is finished. The line below does this. autocmd VimEnter * NERDTree If, however, you're annoyed by the fact that the cursor always starts in the NERDTree window, you can add

Switching between tabs in NERDTree

∥☆過路亽.° 提交于 2019-11-28 13:27:12
问题 I've just started using the NERDTree vim plugin for my project. I can't find the documentation for switching between opened tabs. Can anyone tell me the shortcut key[s] ? Thanks... 回答1: An additional option (and my personal choice)beyond the ones listed by Michael Madsen: gt = next tab gT = previous tab 回答2: I like to bind my vim navigation keys to switching between tabs. Here are the lines from my .vimrc file: map <C-l> :tabn<CR> map <C-h> :tabp<CR> map <C-n> :tabnew<CR> That way, I can

Automatically quit vim if NERDTree is last and only buffer

China☆狼群 提交于 2019-11-28 04:28:32
I have the following in my .vimrc: """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Open NERDTree by default """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" autocmd VimEnter * NERDTree autocmd VimEnter * wincmd p So, % vim file.txt opens NERDTree and focuses the cursor in the file.txt buffer. I make my edits, and hit :q on the buffer, and I'm left with . . . NERDTree. This is annoying. I could use :qa to close all buffers, and exit vim, but I'm used to the :q trope. So I'm wondering if there's a way to detect that the only remaining buffer is NERDTree, and

changing root in NERDTree

我只是一个虾纸丫 提交于 2019-11-27 17:16:38
问题 I tried to change the NERDTree root with :BookmarkToRoot <bookmark> command and with C letter but when I close vim and open vim the root is not changed. Do you know how to change the root forever? 回答1: You could try something like: nnoremap <leader>n :NERDTree /path/to/folder<CR> I have this in my .vimrc: set autochdir let NERDTreeChDirMode=2 nnoremap <leader>n :NERDTree .<CR> so that NERDTree always opens in the current folder. With the 1st line, the working directory is always the one where

vim and NERD Tree extension - adding a file

∥☆過路亽.° 提交于 2019-11-27 08:54:50
问题 When using the vim editor with the NERDTree plugin to navigate through the tree of your project, is there an easy way to create a new source code file under the currently highlighted directory? Currently I go into my shell, add the file and then refresh the tree. There must be a better way. 回答1: Activate the NERDTree and navigate to the directory in which the new file should live. Then press m to bring up the NERDTree Filesystem Menu and choose a for "add child node". Then simply enter the