nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit dea37444bcff30ac9e85bbcc0430efcf10a6ed11
parent f5a20e537935743416374e303b0165b99bcb8ac7
Author: Martin Grenfell <martin_grenfell@msn.com>
Date:   Wed,  2 Jul 2008 21:22:26 +1200

loosen bookmark name restrictions

now the only rule is that they cant contain spaces

Diffstat:
Mplugin/NERD_tree.vim | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -206,8 +206,8 @@ function! s:oBookmark.CacheBookmarks() dict
         let bookmarkStrings = readfile(g:NERDTreeBookmarksFile)
         let invalidBookmarksFound = 0
         for i in bookmarkStrings
-            let name = substitute(i, '^\(\w\{-}\) .*$', '\1', '')
-            let path = substitute(i, '^\w\{-} \(.*\)$', '\1', '')
+            let name = substitute(i, '^\(.\{-}\) .*$', '\1', '')
+            let path = substitute(i, '^.\{-} \(.*\)$', '\1', '')
 
             try
                 let bookmark = s:oBookmark.New(name, s:oPath.New(path))
@@ -277,7 +277,7 @@ endfunction
 " FUNCTION: oBookmark.New(name, path) {{{3
 " Create a new bookmark object with the given name and path object
 function! s:oBookmark.New(name, path) dict
-    if a:name !~ '^[0-9a-zA-Z_]*$'
+    if a:name =~ ' '
         throw "NERDTree.IllegalBookmarkName illegal name:" . a:name
     endif
 
@@ -2801,7 +2801,7 @@ function! s:BookmarkNode(name)
             call currentNode.Bookmark(a:name)
             call s:RenderView()
         catch /NERDTree.IllegalBookmarkName/
-            call s:Echo("bookmark names must be made up of alpha numeric characters and underscores")
+            call s:Echo("bookmark names must not contain spaces")
         endtry
     else
         call s:Echo("select a node first")