Skip to content

Commit 7be171a

Browse files
author
aufgang001
committed
overwork plugin
1 parent 6d8cb33 commit 7be171a

File tree

2 files changed

+25
-87
lines changed

2 files changed

+25
-87
lines changed

README.md

Lines changed: 11 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,18 @@
1-
NERDtree plugin collections I use
2-
==================================
3-
## local_mapping.vim
4-
help to define custom keymap in nerdtree buffer
1+
This Repro was a fork from [https://github.com/t9md/vim-nerdtree_plugin_collections](vim-nerdtree plugin collections)
52

6-
to disable:
3+
## NerdtreePluginOpen
4+
NerdtreePluginOpen extends [https://github.com/scrooloose/nerdtree](nerdtree) with the ability to open non text files with an appropriate application independent from vim.
75

8-
let g:loaded_nerdtree_plugin_local_mapping = 1
6+
## Install
7+
Install this plugin with your favorite plugin-manager or do in manual with:
8+
9+
git clone https://github.com/aufgang001/vim-nerdtree_plugin_open.git ~/.vim/vim-nerdtree_plugin_open.git
910

10-
## nerdtree_ctags.vim
11-
generate tags for specified directory
11+
Extend your .vimrc file with the following command:
1212

13-
to disable:
13+
let g:nerdtree_plugin_open_cmd = "gnome-open" or "xdg-open", "open" (for MacOs)
1414

15-
let g:loaded_nerdtree_plugin_ctags = 1
15+
## Usage
16+
Select an arbitrary file and press the button **E**
1617

17-
## nerdtree_localrc.vim
18-
thinca's localrc helper
1918

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: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,26 @@
1-
if exists("g:loaded_nerdtree_plugin_open")
2-
finish
3-
endif
4-
let g:loaded_nerdtree_plugin_open = 1
5-
6-
71
function! s:callback_name()
82
return matchstr(expand('<sfile>'), '<SNR>\d\+_') . 'callback'
93
endfunction
104

115
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})
6+
let path = g:NERDTreeFileNode.GetSelected().path.str({'escape': 1})
167

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)
8+
if !exists("g:nerdtree_plugin_open_cmd")
9+
echoerr "please set 'g:nerdtree_open_cmd' to 'open','gnome-open' or 'xdg-open'"
10+
echoerr "or install vimproc from 'https://github.com/Shougo/vimproc'"
11+
return
2412
endif
13+
let cmd = g:nerdtree_plugin_open_cmd . " " . path
14+
call system(cmd)
2515
endfunction
2616

2717
call NERDTreeAddKeyMap({
28-
\ 'callback': s:callback_name(),
29-
\ 'quickhelpText': 'close nerd tree if open',
30-
\ 'key': 'E',
31-
\ })
18+
\ 'callback': s:callback_name(),
19+
\ 'quickhelpText': 'close nerd tree if open',
20+
\ 'key': 'E',
21+
\ })
3222

3323
call NERDTreeAddMenuItem({
34-
\ 'text': '(o)open with system command',
35-
\ 'shortcut': 'o',
36-
\ 'callback': s:callback_name()})
24+
\ 'text': '(o)open with system command',
25+
\ 'shortcut': 'o',
26+
\ 'callback': s:callback_name()})

0 commit comments

Comments
 (0)