Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
configuration
vim
Commits
0147d907
Commit
0147d907
authored
Nov 23, 2016
by
Adrien Oliva
Browse files
Start configuration for NERDTree plugin
parent
80e4cebf
Changes
1
Hide whitespace changes
Inline
Side-by-side
config/92-nerdtree.vim
0 → 100644
View file @
0147d907
" Open NERDTree automatically when vim starts up if no file specified
autocmd
StdinReadPre
*
let
s:std_in
=
1
autocmd
VimEnter
*
if
argc
()
==
0
&&
!
exists
(
"s:std_in"
)
|
NERDTree
|
endif
autocmd
VimEnter
*
if
argc
()
==
1
&&
isdirectory
(
argv
()[
0
])
&&
!
exists
(
"s:std_in"
)
|
exe
'NERDTree'
argv
()[
0
]
|
wincmd
p
|
ene
|
endif
" Map NERDTree to F2 key
map
<
F2
>
:
NERDTreeToggle
<
CR
>
" Close vim if NERDTree is the last open buffer
autocmd bufenter *
if
(
winnr
(
"$"
)
==
1
&&
exists
(
"b:NERDTree"
)
&&
b:NERDTree
.
isTabTree
())
|
q
|
endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment