mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5bc034851 | ||
|
|
1383e3fea7 | ||
|
|
47adbe9942 | ||
|
|
020c635cca |
@@ -403,11 +403,12 @@ Toggles whether the quickhelp is displayed.
|
||||
The purpose of the filesystem menu is to allow you to perform basic filesystem
|
||||
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: >
|
||||
1. Adding nodes.
|
||||
2. Renaming nodes.
|
||||
2. Move nodes.
|
||||
3. Deleting nodes.
|
||||
3. Copying nodes.
|
||||
<
|
||||
1. Adding nodes:
|
||||
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,
|
||||
the cursor is placed on the new node.
|
||||
|
||||
2. Renaming nodes:
|
||||
To rename a node, put the cursor on it and select the 'rename' option from the
|
||||
filesystem menu. Enter the new name for the node and it will be renamed. If
|
||||
the old file is open in a buffer, you will be asked if you wish to delete that
|
||||
buffer. Once the operation is complete the cursor will be placed on the
|
||||
renamed node.
|
||||
2. Move nodes:
|
||||
To move/rename a node, put the cursor on it and select the 'move' option from
|
||||
the filesystem menu. Enter the new location for the node and it will be
|
||||
moved. If the old file is open in a buffer, you will be asked if you wish to
|
||||
delete that buffer. Once the operation is complete the cursor will be placed
|
||||
on the renamed node.
|
||||
|
||||
3. Deleting nodes:
|
||||
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
|
||||
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*
|
||||
|
||||
@@ -762,6 +770,11 @@ fridge for later ;)
|
||||
==============================================================================
|
||||
7. Changelog *NERDTreeChangelog*
|
||||
|
||||
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
|
||||
- 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" vim global plugin that provides a nice tree explorer
|
||||
" Last Change: 3 nov 2007
|
||||
" Last Change: 18 jan 2008
|
||||
" Maintainer: Martin Grenfell <martin_grenfell at msn dot com>
|
||||
let s:NERD_tree_version = '2.7.0'
|
||||
let s:NERD_tree_version = '2.7.1'
|
||||
|
||||
" SECTION: Script init stuff {{{1
|
||||
"============================================================
|
||||
@@ -2829,11 +2829,11 @@ function! s:ShowFileSystemMenu()
|
||||
let prompt = "NERDTree Filesystem Menu\n" .
|
||||
\ "==========================================================\n".
|
||||
\ "Select the desired operation: \n" .
|
||||
\ " (1) - Add a childnode\n".
|
||||
\ " (2) - Rename the current node\n".
|
||||
\ " (3) - Delete the current node\n"
|
||||
\ " (a)dd a childnode\n".
|
||||
\ " (m)ove the current node\n".
|
||||
\ " (d)elete the current node\n"
|
||||
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
|
||||
let prompt = prompt . " \n"
|
||||
endif
|
||||
@@ -2842,13 +2842,13 @@ function! s:ShowFileSystemMenu()
|
||||
|
||||
let choice = nr2char(getchar())
|
||||
|
||||
if choice == 1
|
||||
if choice ==? "a"
|
||||
call s:InsertNewNode()
|
||||
elseif choice == 2
|
||||
elseif choice ==? "m"
|
||||
call s:RenameCurrent()
|
||||
elseif choice == 3
|
||||
elseif choice ==? "d"
|
||||
call s:DeleteNode()
|
||||
elseif choice == 4 && s:oPath.CopyingSupported()
|
||||
elseif choice ==? "c" && s:oPath.CopyingSupported()
|
||||
call s:CopyNode()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user