Use alternative way to implement autochdir.

By http://vim.wikia.com/wiki/Set_working_directory_to_the_current_file
this document.
This commit is contained in:
Gea-Suan Lin
2016-03-27 10:08:46 +08:00
parent 4dc1ed9bee
commit fb4f1c1883

View File

@@ -1,5 +1,4 @@
" "
set autochdir
set autoindent set autoindent
set backspace=indent,eol,start set backspace=indent,eol,start
set cursorline set cursorline
@@ -95,3 +94,4 @@ au BufNewFile,BufRead *.mk set noexpandtab
au BufNewFile,BufRead *.psgi setf perl au BufNewFile,BufRead *.psgi setf perl
au BufNewFile,BufRead Makefile set noexpandtab au BufNewFile,BufRead Makefile set noexpandtab
au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif
autocmd BufEnter * silent! lcd %:p:h