From 0166286ec9ab679769c86fad7a7ba25d690b1547 Mon Sep 17 00:00:00 2001 From: Mitsuo Tokumori Date: Fri, 21 Jan 2022 11:15:49 -0500 Subject: Change "~/.vim/" to use $VIMRUNTIMEPATH. Also remove dependency of vim-indexed-search plugin --- vim/vimrc | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'vim') diff --git a/vim/vimrc b/vim/vimrc index 2e04dcc..ccbfd0d 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -16,9 +16,11 @@ " Variables " ---------------------------------------------------------------------- -set undodir=~/.vim/undo -set viminfofile=~/.vim/viminfo -set viewdir=~/.vim/view +" Get the first directory from the list in $VIMRUNTIMEPATH +let $VIMFILES=split(&rtp,",")[0] +set undodir=$VIMFILES/undo +set viminfofile=$VIMFILES/viminfo +set viewdir=$VIMFILES/view " Useful @@ -141,8 +143,8 @@ set more " Enable more-prompt for listings that don't fit in " Mappings " ---------------------------------------------------------------------- " F1 is help, F11 is full screen (terminal emulator) -map :source ~/.vim/vimrc -map :e ~/.vim/vimrc +map :source $VIMFILES/vimrc +map :e $VIMFILES/vimrc map :tabp map :tabn map :w:make @@ -213,7 +215,7 @@ set fileencoding=utf-8 " Functions " ---------------------------------------------------------------------- " TODO: maybe replace with $runtimepath -source ~/.vim/fun.vim +source $VIMFILES/fun.vim " Views and Sessions (Window layout and Line folding) @@ -235,7 +237,7 @@ au BufWinEnter *.cpp silent loadview " Snippets " ---------------------------------------------------------------------- " I deleted the file accidently -"nnoremap ,ch :-1r ~/.vim/snippets/cheader.c +"nnoremap ,ch :-1r $VIMFILES/snippets/cheader.c " File Browsing @@ -277,7 +279,9 @@ inoremap diWi=" "call plug#end() " Other plugins -source ~/.vim/plugins/IndexedSearch.vim +" I used to use IndexedSearch plugin. Functionality was incorporated into Vim +" since Vim 8.1.1270. +set shortmess-=S " Colors -- cgit v1.2.3