Skip to content

Commit 6d8cb33

Browse files
committed
first commit
0 parents  commit 6d8cb33

File tree

2 files changed

+106
-0
lines changed

2 files changed

+106
-0
lines changed

README.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
NERDtree plugin collections I use
2+
==================================
3+
## local_mapping.vim
4+
help to define custom keymap in nerdtree buffer
5+
6+
to disable:
7+
8+
let g:loaded_nerdtree_plugin_local_mapping = 1
9+
10+
## nerdtree_ctags.vim
11+
generate tags for specified directory
12+
13+
to disable:
14+
15+
let g:loaded_nerdtree_plugin_ctags = 1
16+
17+
## nerdtree_localrc.vim
18+
thinca's localrc helper
19+
20+
* [thinca/vim-localrc](https://github.com/thinca/vim-localrc)
21+
this plugin write .local.vimrc for specified directory
22+
23+
to disable:
24+
25+
let g:loaded_nerdtree_plugin_localrc = 1
26+
27+
## nerdtree_open.vim
28+
open target node with appropriate application command such as 'xdg-open' , 'gnome-open' , 'open'(for MacOS)
29+
This plugin use Shougo's vimproc if instaled.
30+
31+
* [Shougo/vimproc](https://github.com/Shougo/vimproc)
32+
33+
to disable:
34+
35+
let g:loaded_nerdtree_plugin_open = 1
36+
37+
## nerdtree_unite.vim
38+
miscellaneous helper for Shougo's unite.vim
39+
40+
* [Shougo/unite.vim](https://github.com/Shougo/unite.vim)
41+
42+
to disable:
43+
44+
let g:loaded_nerdtree_plugin_unite = 1
45+
46+
## nerdtree_vimfiler.vim
47+
open NerdTreeNode in Shougo's vimfiler
48+
49+
* [Shougo/vimfiler](https://github.com/Shougo/vimfiler)
50+
51+
to disable:
52+
53+
let g:loaded_nerdtree_plugin_unite = 1
54+
55+
## nerdtree_easymove.vim
56+
57+
C: change tree root to the selected dir with `l`
58+
u: move tree root up a dir with `h`
59+
60+
This is very very experimental and dirty hack.
61+
This plugin is disabled by default.
62+
So to enable this plugin
63+
64+
first. install
65+
66+
* [t9md/vim-misc-experiment](https://github.com/t9md/vim-misc-experiment)
67+
68+
then set:
69+
70+
let g:loaded_nerdtree_plugin_unite = 0

nerdtree_plugin_open.vim

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
if exists("g:loaded_nerdtree_plugin_open")
2+
finish
3+
endif
4+
let g:loaded_nerdtree_plugin_open = 1
5+
6+
7+
function! s:callback_name()
8+
return matchstr(expand('<sfile>'), '<SNR>\d\+_') . 'callback'
9+
endfunction
10+
11+
function! s:callback()
12+
if exists('*vimproc#open')
13+
call vimproc#open(g:NERDTreeFileNode.GetSelected().path.str())
14+
else
15+
let path = g:NERDTreeFileNode.GetSelected().path.str({'escape': 1})
16+
17+
if !exists("g:nerdtree_plugin_open_cmd")
18+
echoerr "please set 'g:nerdtree_open_cmd' to 'open','gnome-open' or 'xdg-open'"
19+
echoerr "or install vimproc from 'https://github.com/Shougo/vimproc'"
20+
return
21+
endif
22+
let cmd = g:nerdtree_open_cmd . " " . path
23+
call system(cmd)
24+
endif
25+
endfunction
26+
27+
call NERDTreeAddKeyMap({
28+
\ 'callback': s:callback_name(),
29+
\ 'quickhelpText': 'close nerd tree if open',
30+
\ 'key': 'E',
31+
\ })
32+
33+
call NERDTreeAddMenuItem({
34+
\ 'text': '(o)open with system command',
35+
\ 'shortcut': 'o',
36+
\ 'callback': s:callback_name()})

0 commit comments

Comments
 (0)