some more .vimrc stuff
This commit is contained in:
parent
37a17c13ec
commit
eaae25ae8d
1 changed files with 6 additions and 0 deletions
6
.vimrc
6
.vimrc
|
|
@ -6,6 +6,12 @@ execute pathogen#infect()
|
||||||
autocmd StdinReadPre * let s:std_in=1
|
autocmd StdinReadPre * let s:std_in=1
|
||||||
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
|
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
|
||||||
|
|
||||||
|
" Open NERDTree with Ctrl+n / Toggle
|
||||||
|
map <C-n> :NERDTreeToggle<CR>
|
||||||
|
|
||||||
|
" close vim if the only window left open is a NERDTree
|
||||||
|
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
|
||||||
|
|
||||||
" Remember position in file
|
" Remember position in file
|
||||||
if has("autocmd")
|
if has("autocmd")
|
||||||
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue