From fb4f1c1883cfae0f69278c10f2ff8a8dab3ee0a9 Mon Sep 17 00:00:00 2001 From: Gea-Suan Lin Date: Sun, 27 Mar 2016 10:08:46 +0800 Subject: [PATCH] Use alternative way to implement autochdir. By http://vim.wikia.com/wiki/Set_working_directory_to_the_current_file this document. --- .vim/vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vim/vimrc b/.vim/vimrc index 24f8062..8b16910 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -1,5 +1,4 @@ " -set autochdir set autoindent set backspace=indent,eol,start set cursorline @@ -95,3 +94,4 @@ au BufNewFile,BufRead *.mk set noexpandtab au BufNewFile,BufRead *.psgi setf perl au BufNewFile,BufRead Makefile set noexpandtab au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif +autocmd BufEnter * silent! lcd %:p:h