preservim / nerdtree Goto Github PK
View Code? Open in Web Editor NEWA tree explorer plugin for vim.
License: Do What The F*ck You Want To Public License
A tree explorer plugin for vim.
License: Do What The F*ck You Want To Public License
When the ".. (up a dir)" selection is made on a Windows installation, it causes an InvalidArgument exception.
The exact error message is of the form:
Error detected while processing function 14_activateNode..14_upDir..114..120..122:
E605: Exception not caught: NERDTree.InvalidArgumentsError: Invalid path = [PATH OMITTED]
For some reason when I open a file from NERD-tree, the WinEnter autocommands are not triggered. This can be checked with
au WinEnter * echo "entering"
and then opening a file from NERD-tree.
I think this is a bug, I know it breaks some of my stuff.
Hi!, this isn't a true issue but a request for a feature, I think it'd be nice if nerdtree could have an option to control whether the cursor is moved to the nerdtree or remains in the "main" window from where it was called. Something like the taglist option Tlist_GainFocus_On_ToggleOpen.
Currenty one can not do something like:
When I navigate to a file within NERDtree that has a space in the name and then hit "enter" to open it, I get this error message:
Vim(edit):E172: Only one file name allowed: edit /Users/tpavlic/Documents/My Documents/@Research/cooperative_task_processing_TAC/cooperative_task_processing.tex
Because there is a space in "My Documents", NERDtree thinks the file is two files.
With the latest code from git master I'm not able to change the current working directory (key mapping: NERDTree-cd) on Windows Vista. It get the error messag "could not change cwd". Option NERDTreeChDirMode set to a value other than 0 in my vimrc file isn't working too, which is probably related to the problem above.
If I change the line let dir = self.str({'format': 'Cd'})
on line 1805 inside function s:Path.changeToDir() to let dir = self.str()
cd works again, so I think it has something to to with wrong escaping.
When navigating the FS with NERDTree, if I hit m on any type of item (file, dir), I get the following errors:
Error detected while processing function 14_showMenu..30..31:
line 4:
E716: Key not present in Dictionary: menuItems)-1)
E116: Invalid arguments for function len(self.menuItems)-1)
E116: Invalid arguments for function range(0, len(self.menuItems)-1)
E15: Invalid expression: range(0, len(self.menuItems)-1)
Press ENTER or type command to continue
This happens both in Macvim and console vim on my mac. I'm using the latest version of NERDTree, checked out yesterday.
Hi,
In vim I always have many different trees and when I open another file from a the tree I always have to choose which tree to mirror, but all I really need is to mirror the tree that I am opening the file from.
Is there a way of doing this?
If someone could guide me in the right direction I might take a stab at implementing it.
Thanks
I'd love to being able to open multiple files at once. This would work like this:
Use Visual Line Mode (Shift+V) to select the files you want to open
Press a key combination
All files selected are opened in background buffers
Hey NERDTree huggers,
Great plugin! Love what you've done! There's one feature I'm really missing from netrw that I think would be a great addition to your plugin: the ability to mark multiple files and execute a command on them at once. In netrw this is done by the mf and mx commands, by the functions NetrwMarkFile(islocal, fname) and NetrwMarkFileExe(islocal). From taking a brief peek at the code this should be extremely do-able in NERDTree, and would be extremely useful. For example, say I'm working on NERDTree in my git repository and I want to add certain files. I could mark those files using a command (in different directories in my tree branch even) then use one command to add them all to git! A myriad of other possibilities awaits.
Hi. If I don't set
let NERDTreeBookmarksFile=
I can create bookmarks. But if I
let NERDTreeBookmarksFile='~/.vim/sessions/NERDTreeBookmarks'
I get an error when creating bookmarks:
Error detected while processing function 19_bookmarkNode..66..39:
line 12:
E482: Can't create file ~/.vim/NERDTreeBookmarks
I'm using the following in my .vimrc file:
autocmd VimEnter * NERDTree ~/Projects/
autocmd TabEnter * NERDTreeMirror
Unfortunately when a tab is created the NERDTree split is on the right side and large and the file is on the left side and is very slim, presumably their positions have been reversed. Is there any solution for this?
NERDtree will act as a really good project manager if we could keep some more info of a bookmark, like the file filters (NERDtreeIgnore) for ignoring .pycs etc of a project.
It would be great if there is no need to quit the NERD_tree* buffers to quit Vim.
Maybe this can be put into the NERDTree as an option?
I have created a small function to get this feature. Just put this code into your .vimrc
:
function! NERDTreeQuit()
redir => buffersoutput
silent buffers
redir END
" 1BufNo 2Mods. 3File 4LineNo
let pattern = '^\s*\(\d\+\)\(.....\) "\(.*\)"\s\+line \(\d\+\)$'
let windowfound = 0
for bline in split(buffersoutput, "\n")
let m = matchlist(bline, pattern)
if (len(m) > 0)
if (m[2] =~ '..a..')
let windowfound = 1
endif
endif
endfor
if (!windowfound)
quitall
endif
endfunction
autocmd WinEnter * call NERDTreeQuit()
Greetings
Michael
I would NerdTree to be re-opened when we open a file in a new tab.
I'm using a little hack found here : http://stackoverflow.com/questions/1979520/auto-open-nerdtree-in-every-tab but I think it's a feature which a lot of people want so why don't make it possible enabling an option ?
P.S. : Sorry for my English but i'm French…
nerd tree changes statusline from the one that is set in .vimrc to some other setting (looks like default statusline in vim).
in my vimrc file i added "let g:NERDTreeStatusline = -1" but the problem persists.
Using version 4.1.0 of NERDTree, if I have a directory with a single '[' or ']' in then I can see the contents of the directory in NERDTree but Vim shows 'Illegal file name' at the bottom of the screen (I forget what this bit is called, status bar?).
If I have a drectory with '[' and ']' in, say for instance "[1234]MyProject", NERDTree refuses to show any files or subdirectories for that directory.
This is NERDTree 4.1.0 and VIM - Vi IMproved 7.0
Thanks!
Matthew
GVIM cannot open a bookmark in a new tab or a splitted windows. I have an error (translated from french)
Error detected while scanning function 21_openInNewTab..17 :
E121: Undefined variable : bookmark
E15: Invalid expression : "tabedit " . bookmark.path.str({'format': 'Edit'})
E.g.
|-chap0.xml
|-chap1.xml
|-chap10.xml
|-chap2.xml
chap10.xml should be after chap2.xml
This should at least be an option.
Hi,
I'm trying to use NERDTree under a cygwin version of vim. It's working well except for the "up one dir" operation (U or u key mappings). It takes a lot to complete this operation, about 30 seconds or even more. Any ideas why?
VIM Environment:
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Sep 13 2010 16:16:21)
Compiled by alec@tia
Huge version without GUI. Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent -clientserver -clipboard
+cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv +cscope +cursorbind +cursorshape
+dialog_con +diff +digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path
+find_in_path +float +folding -footer +fork() -gettext -hangul_input -iconv +insert_expand +jumplist
+keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname
+mouse -mouseshape +mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm
+multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype +path_extra -perl +persistent_undo
+postscript +printer +profile -python -python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs
+smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static
-tag_any_white -tcl +terminfo +termresponse +textobjects +title -toolbar +user_commands +vertsplit
+virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -X11
-xfontset -xim -xsmp -xterm_clipboard -xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/local/share/vim"
Compilation:
gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -I/usr/lib/ruby/1.8/i386-cygwin -DRUBY_VERSION=18
Linking: gcc -L. -L/usr/local/lib -o vim.exe -lm -lncurses -lruby
Cygwin envrionment:
$ uname -a
CYGWIN_NT-5.1 tia 1.7.7(0.230/5/3) 2010-08-31 09:58 i686 Cygwin
NERDTree version:
4.1.0
Thanks!
When changing into a project directory with + c, could NERDTree also tell VIM to change to that same directory? That would be extremely useful. Thanks for the consideration.
For easier management with Vim windows:)
Hi!
I've stumbled upon this weird problem: NerdTree losses all coloring when opening any fortran file (be it F77, F90, F95, fixed form, free form). Syntax highlighting is ok in the buffer of the file proper, though. It does not happen with c, c++, python, perl, shell, tex or any other type of file that I have tested.
Hello,
In vtreeexplorer exist one option "S" that's StartShell, is possible join into terminal and exit back to vtreeexplorer (workspace).
It's possible implement this function in NerdTree?
Thanks.
use "mount -t cifs //X.X.X.X/test ~/project/test -o uid=1000,gid=1000,username=guest" on Ubuntu.
Mount success and it works fine under shell using ls or edit any file in this directory, but under vim, the direcotry "test" is missing. The Ubuntu is installed as a virtual machine.
Hi,
I use NERDTree as my project files explorer and during the day open and close lots of source code files (in tabs).
By default when I close tab Vim leaves that file as a buffer. e.g. you can see it in buffers menu
As I am working with lots of files list of buffers grows very quick and becomes unmanageable.
So I use following line in my .vimrc to make sure that closed tabs do not leave buffers behind
autocmd BufEnter * setlocal bufhidden=delete
Unfortunately with this line NERDTreeToggle can be used to open NerdTree only once per session.
Once NERDTree is closed (with NERDTreeToggle or NERDTreeClose) further attempts to run NERDTreeToggle cause following error
======== error start ========
Error detected while processing function 18_toggle..18_renderView..18_dumpHelp:
line 2:
E121: Undefined variable: b:treeShowHelp
E15: Invalid expression: b:treeShowHelp ==# 1
Error detected while processing function 18_toggle..18_renderView:
line 18:
E121: Undefined variable: b:NERDTreeShowBookmarks
E15: Invalid expression: b:NERDTreeShowBookmarks
line 27:
E121: Undefined variable: b:NERDTreeRoot
E15: Invalid expression: b:NERDTreeRoot.path.str({'format': 'UI', 'truncateTo': winwidth(0)})
line 28:
E121: Undefined variable: header
E116: Invalid arguments for function setline
line 33:
E121: Undefined variable: b:NERDTreeRoot
E15: Invalid expression: b:NERDTreeRoot.renderToString()
======== error end ==========
To reproduce the problem
:NERDTreeToggle
:NERDTreeToggle
:NERDTreeToggle
firs two calls (1st-open, 2nd-close) will succeed, but 3rd call will fail with the above error message
Environment:
Ubuntu 10.10 32bit
(G)Vim 7.2.330
NERD_tree_version = '4.1.0'
Hi, if I set NERDTree to open bookmarks automatically and then also set NERDTree to start automatically (with the line "autocmd VimEnter * NERDTree" in my .vimrc) then the bookmarks do not open automatically. I have to hit Shift-B or manipulate the tree in some way to force a re-rendering, which then pops up the bookmarks. -A
I have searched the docu and googled a bit, but i couldn't find a way that reloads the nerd tree every time I use :cd and switch a directory. The NERDTree dir should reload after I changed the directory for vim. Is this possible somehow?
The NERD_tree.vim file says the last change date was 1 December 2009. It took me a while to see that there has actually been a lot of development since then.
Hey,
I've been using nerdtree from master branch for few days and I've noticed that when you copy a file from one directory to another then NERDTree shows an error message after the operation.
Is it possible to save the nerdtree state in the session file in order to be able to recover it on :source ?
(m)ove the curent node
(d)elete the curent node
should be "current"
if you are in directory /home/me and use NERDTree on a directory with spaces "/tmp/a directory with spaces/" then when pressing enter on a file in that directory, you cannot edit the file. If you are already in the directory with spaces then it works fine.
I updated NerdTree and Neocomplcache to latest version,
If use them at the same time, the neocomplcache can't pop up completion menu, but if I delete plugin/Nerd_Tree.vim, neocomplcache works well.
Could you please fix it?
Thanks
let NERDTreeIgnore=['CVS'] is removing both 'CVS' and 'cvs' (lowercase) directories. Is this correct? Am I missing something about vim's regular expression in this case?
nerdtree's Rake install task needs git installed to do git ls-files. This is annoying on systems that don't have git installed (antd that we download nerdtree via the download button on github)
Nerdtree now throws this error:
Error detected while processing function <SNR>34_toggle..<SNR>34_initNerdTree..<SNR>34_createTreeWin:
line 27:
E518: Unknown option: nornu
I'm using Vim 7.2.330
I expect it's due to this commit two days ago: e697444
I hit an issue with setup of version 4.1.0 with Vim 7.2 on a Windows XP machine.
I have an Irish surname, O'Connor, and that noxious apostrophe had crept in during the account setup on a new PC. The result is in Vim my $HOME variable has an apostrophe in it.
(Weirdly I had never done this before in years of previous PC setups.)
The following NERDTree line fails in this situation:
call s:initVariable("g:NERDTreeBookmarksFile", expand('$HOME') . '/.NERDTreeBookmarks')
I verified this was the case by logging into a different user account - works fine.
I hacked around this locally by pointing to $VIMRUNTIME rather than $HOME in the line above.
Not an issue - more of a feature request.
Is it possible to have a command that highlights the currently open file in NERDTree?
A bit like the 'RevealBookmark' command, but it just uses the active buffer instead of a bookmark.
just cd to a directory name that has spaces in and try to use the menu to (a)dd a childnode.
will result in:
call s:echoWarning("Node Not Created.")
seems like a simple fix. any chance for this soon?
Hi! I know that maybe this isn't an issue. But I've been looking for support and some refference besides the docs.
Is there any way I can navigate between the opened files of NERDTree? Like Ctrl-Alt-PageUp and Ctrl-Alt-PageDown in gedit?
Thanks!
NERDTree version 4.1.0 loses the syntax colour for the line displaying the tree root directory if it is truncated, because the first character on the line becomes < rather than /. The following simple patch solves the problem:
3391a3392
> syn match treeCWD #^<.*$# " Match CWD line even when truncated
With the latest 4.0 release of Nerd Tree with Vim 7.2.245 I keep getting the error:
Error detected while processing function NERDTreeAddMenuItem..41:
line 18:
E121: Undefined variable: children
I used netrw to access remote directory and hijacked netrw by NERDTree. I want to nagivate same as NERDTree.
Can NERDTree window be minimized automatically when opening a file node (o, go, i, gi, s, gs)?
When I open NERDTree and press "ma" to add a child node, I get the following error message when I try to create multiple non existing nodes at once, e.g /home/joe exists, my input is /home/joe/test/dir/ect/ory/:
Error detected while processing function 58_showMenu..99..116..NERDTreeAddNo
de:
line 18:
E716: Key not present in Dictionary: isOpen || !empty(parentNode.children)
E15: Invalid expression: parentNode.isOpen || !empty(parentNode.children)
Error detected while processing function 58_showMenu..99..116:
line 6:
E171: Missing :endif
Error detected while processing function 58_showMenu..99:
line 19:
E171: Missing :endif
Besides the error message it works fine for directories but file node can not be created. The message is: NERDTree: Node Not Created.
I have a directory with name "+package+", when I press ENTER in the tree it doesn't open.
Trying to specify a custom location for the NERDTreeBookmarks file by placing this in the .vimrc file:
let NERDTreeBookmarksFile="~/.vim/NERDTreeBookmarks"
and creating a bookmark ":Bookmark docrails" returns an error:
Error detected while processing function 18_bookmarkNode..51..24:
line 12:
E482: Can't create file ~/.vim/NERDTreeBookmarks
But I don't get an error if I remove the line and use the default location of $HOME./NERDTreeBookmarks
I've tested on Ubuntu 10.04, Vim 7.2 Included Patches 1-330, Nerdtree 4.1.0 stable and dev (as of issue creation date/time).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.