From 7fde14c51bba482b08cb9f24c300d0cf49a10e5f Mon Sep 17 00:00:00 2001 From: yan Date: Fri, 18 Nov 2011 15:27:42 -0600 Subject: [PATCH] Fix issue causing file not found, affecting gf (go to file) for rails --- vimrc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/vimrc b/vimrc index a586cbe8..5d8ca6c9 100644 --- a/vimrc +++ b/vimrc @@ -145,6 +145,7 @@ if has("gui_running") endif if has("gui_mac") || has("gui_macvim") set guifont=Monaco:h17 + set guifont=Inconsolata:h20 " if available, this one is nicer endif if has("gui_win32") || has("gui_win32s") set guifont=Consolas:h12 @@ -330,8 +331,17 @@ nnoremap P :GitGrepCurrentPartial " Remember cursor position and etc when you leave windows -au BufWinLeave * silent! mkview "make vim save view (state) (folds, cursor, etc) -au BufWinEnter * silent! loadview "make vim load view (state) (folds, cursorrsor, etc) +" au BufWinLeave * silent! mkview "make vim save view (state) (folds, cursor, etc) +" au BufWinEnter * silent! loadview "make vim load view (state) (folds, cursorrsor, etc) + +" When editing a file, always jump to the last known cursor position. +" Don't do it when the position is invalid or when inside an event handler +" (happens when dropping a file on gvim). +autocmd BufReadPost * + \ if line("'\"") > 0 && line("'\"") <= line("$") | + \ exe "normal g`\"" | + \ endif + " Make nerdtree look nice let NERDTreeMinimalUI = 1