Compare commits

..

9 Commits
2.7.0 ... 2.8.0

Author SHA1 Message Date
Martin Grenfell
c008fb3983 changed the version to 2.8.0 for the next release 2008-03-31 18:22:29 +13:00
Martin Grenfell
8654b98b09 gitignored some stuff 2008-03-10 21:26:51 +13:00
Martin Grenfell
5e3e95d168 added a credit and an entry in the changelog 2008-03-10 20:46:56 +13:00
Martin Grenfell
faabc8c47d documented the NERDTreeShowLineNumbers option 2008-03-10 20:44:16 +13:00
Martin Grenfell
91d5a52c39 added the NERDTreeShowLineNumbers option into the script 2008-03-10 20:39:30 +13:00
marty
a5bc034851 updated the changelog 2008-01-18 22:39:25 +13:00
marty
1383e3fea7 bumped the version to 2.7.1 2008-01-18 22:29:34 +13:00
marty
47adbe9942 updated the changelog and filesystem menu doc 2008-01-18 22:29:16 +13:00
marty
020c635cca changed the key for the filesystem menu to be mnemonic 2008-01-18 21:47:21 +13:00
3 changed files with 62 additions and 20 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
*~
*.swp

View File

@@ -403,11 +403,12 @@ Toggles whether the quickhelp is displayed.
The purpose of the filesystem menu is to allow you to perform basic filesystem The purpose of the filesystem menu is to allow you to perform basic filesystem
operations quickly from the NERD tree rather than the console. operations quickly from the NERD tree rather than the console.
The filesystem menu can be accessed with 'm' mapping and has three supported The filesystem menu can be accessed with 'm' mapping and has four supported
operations: > operations: >
1. Adding nodes. 1. Adding nodes.
2. Renaming nodes. 2. Move nodes.
3. Deleting nodes. 3. Deleting nodes.
3. Copying nodes.
< <
1. Adding nodes: 1. Adding nodes:
To add a node move the cursor onto (or anywhere inside) the directory you wish To add a node move the cursor onto (or anywhere inside) the directory you wish
@@ -416,12 +417,12 @@ filesystem menu and type a filename. If the filename you type ends with a '/'
character then a directory will be created. Once the operation is completed, character then a directory will be created. Once the operation is completed,
the cursor is placed on the new node. the cursor is placed on the new node.
2. Renaming nodes: 2. Move nodes:
To rename a node, put the cursor on it and select the 'rename' option from the To move/rename a node, put the cursor on it and select the 'move' option from
filesystem menu. Enter the new name for the node and it will be renamed. If the filesystem menu. Enter the new location for the node and it will be
the old file is open in a buffer, you will be asked if you wish to delete that moved. If the old file is open in a buffer, you will be asked if you wish to
buffer. Once the operation is complete the cursor will be placed on the delete that buffer. Once the operation is complete the cursor will be placed
renamed node. on the renamed node.
3. Deleting nodes: 3. Deleting nodes:
To delete a node put the cursor on it and select the 'delete' option from the To delete a node put the cursor on it and select the 'delete' option from the
@@ -429,6 +430,13 @@ filesystem menu. After confirmation the node will be deleted. If a file is
deleted but still exists as a buffer you will be given the option to delete deleted but still exists as a buffer you will be given the option to delete
that buffer. that buffer.
4. Copying nodes:
To copy a node put the cursor on it and select the 'copy' option from the
filesystem menu. Enter the new location and you're done. Note: copying is
currently only supported for *nix operating systems. If someone knows a
one line copying command for windows that doesnt require user confirmation
then id be grateful if you'd email me.
============================================================================== ==============================================================================
3. Customisation *NERDTreeOptions* 3. Customisation *NERDTreeOptions*
@@ -469,6 +477,9 @@ NERD tree. These options should be set in your vimrc.
|NERDTreeShowHidden| Tells the NERD tree whether to display hidden |NERDTreeShowHidden| Tells the NERD tree whether to display hidden
files on startup. files on startup.
|NERDTreeShowLineNumbers| Tells the NERD tree whether to display line
numbers in the tree window.
|NERDTreeSortOrder| Tell the NERD tree how to sort the nodes in |NERDTreeSortOrder| Tell the NERD tree how to sort the nodes in
the tree. the tree.
@@ -650,6 +661,17 @@ Use one of the follow lines to set this option: >
let NERDTreeShowHidden=0 let NERDTreeShowHidden=0
let NERDTreeShowHidden=1 let NERDTreeShowHidden=1
< <
------------------------------------------------------------------------------
*NERDTreeShowLineNumbers*
Values: 0 or 1.
Default: 0.
This option tells vim whether to display line numbers for the NERD tree
window. Use one of the follow lines to set this option: >
let NERDTreeShowLineNumbers=0
let NERDTreeShowLineNumbers=1
<
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTreeSortOrder* *NERDTreeSortOrder*
@@ -762,6 +784,15 @@ fridge for later ;)
============================================================================== ==============================================================================
7. Changelog *NERDTreeChangelog* 7. Changelog *NERDTreeChangelog*
2.8.0
- added an option to enable/disable line numbers in the NERD tree window,
thanks to Olivier Yiptong for the email.
2.7.1
- Changed the keys for the filesystem menu to be mnemonic rather than
arbitrary integers
- Documented the copying functionality in the filesystem menu
2.7.0 2.7.0
- Bug fix: Now when you have the tree on the right and you open it with - Bug fix: Now when you have the tree on the right and you open it with
multiple windows stacked, it will take up the full height of the vim multiple windows stacked, it will take up the full height of the vim
@@ -965,3 +996,6 @@ in 2.6.0
Thanks to Niels Aan de Brugh for the suggestion that the script now split the Thanks to Niels Aan de Brugh for the suggestion that the script now split the
window if you try to open a file in a window containing a modified buffer when window if you try to open a file in a window containing a modified buffer when
the &hidden option is set. the &hidden option is set.
Thanks to Olivier Yiptong for prompting me to make line numbers in the
NERD tree window optional.

View File

@@ -1,7 +1,7 @@
" vim global plugin that provides a nice tree explorer " vim global plugin that provides a nice tree explorer
" Last Change: 3 nov 2007 " Last Change: 31 March 2008
" Maintainer: Martin Grenfell <martin_grenfell at msn dot com> " Maintainer: Martin Grenfell <martin_grenfell at msn dot com>
let s:NERD_tree_version = '2.7.0' let s:NERD_tree_version = '2.8.0'
" SECTION: Script init stuff {{{1 " SECTION: Script init stuff {{{1
"============================================================ "============================================================
@@ -43,8 +43,9 @@ endif
call s:InitVariable("g:NERDTreeHighlightCursorline", 1) call s:InitVariable("g:NERDTreeHighlightCursorline", 1)
call s:InitVariable("g:NERDTreeMouseMode", 1) call s:InitVariable("g:NERDTreeMouseMode", 1)
call s:InitVariable("g:NERDTreeNotificationThreshold", 100) call s:InitVariable("g:NERDTreeNotificationThreshold", 100)
call s:InitVariable("g:NERDTreeShowHidden", 0)
call s:InitVariable("g:NERDTreeShowFiles", 1) call s:InitVariable("g:NERDTreeShowFiles", 1)
call s:InitVariable("g:NERDTreeShowHidden", 0)
call s:InitVariable("g:NERDTreeShowLineNumbers", 0)
call s:InitVariable("g:NERDTreeSortDirs", 1) call s:InitVariable("g:NERDTreeSortDirs", 1)
if !exists("g:NERDTreeSortOrder") if !exists("g:NERDTreeSortOrder")
@@ -1442,7 +1443,12 @@ function! s:CreateTreeWin()
setlocal foldcolumn=0 setlocal foldcolumn=0
setlocal nobuflisted setlocal nobuflisted
setlocal nospell setlocal nospell
setlocal nonu if g:NERDTreeShowLineNumbers
setlocal nu
else
setlocal nonu
endif
iabc <buffer> iabc <buffer>
if g:NERDTreeHighlightCursorline if g:NERDTreeHighlightCursorline
@@ -2829,11 +2835,11 @@ function! s:ShowFileSystemMenu()
let prompt = "NERDTree Filesystem Menu\n" . let prompt = "NERDTree Filesystem Menu\n" .
\ "==========================================================\n". \ "==========================================================\n".
\ "Select the desired operation: \n" . \ "Select the desired operation: \n" .
\ " (1) - Add a childnode\n". \ " (a)dd a childnode\n".
\ " (2) - Rename the current node\n". \ " (m)ove the current node\n".
\ " (3) - Delete the current node\n" \ " (d)elete the current node\n"
if s:oPath.CopyingSupported() if s:oPath.CopyingSupported()
let prompt = prompt . " (4) - Copy the current node\n\n" let prompt = prompt . " (c)opy the current node\n\n"
else else
let prompt = prompt . " \n" let prompt = prompt . " \n"
endif endif
@@ -2842,13 +2848,13 @@ function! s:ShowFileSystemMenu()
let choice = nr2char(getchar()) let choice = nr2char(getchar())
if choice == 1 if choice ==? "a"
call s:InsertNewNode() call s:InsertNewNode()
elseif choice == 2 elseif choice ==? "m"
call s:RenameCurrent() call s:RenameCurrent()
elseif choice == 3 elseif choice ==? "d"
call s:DeleteNode() call s:DeleteNode()
elseif choice == 4 && s:oPath.CopyingSupported() elseif choice ==? "c" && s:oPath.CopyingSupported()
call s:CopyNode() call s:CopyNode()
endif endif
endfunction endfunction