From effe141a61e1b48adf0b4472a58f716f97a32b7b Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Thu, 14 Nov 2024 15:40:53 +0800 Subject: Update --- vim/vimrc | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 vim/vimrc (limited to 'vim/vimrc') diff --git a/vim/vimrc b/vim/vimrc new file mode 100644 index 0000000..7a76ec6 --- /dev/null +++ b/vim/vimrc @@ -0,0 +1,37 @@ +" Avoid load this script twice +if get(s:, 'loaded', 0) != 0 + finish +else + let s:loaded = 1 +endif + +" Get current dir +" let s:home = fnamemodify(resolve(expand(':p')), ':h') +let s:home = '~/helper/vim' + +" Add current dir into runtimepath +execute 'set runtimepath+='.s:home + +" Load scripts in home +command! -nargs=1 LoadScript exec 'source '.s:home.'/'.'' + +" Gerneral scripts +LoadScript init/basic.vim " Basic configuration +LoadScript init/keymaps.vim " Key mappings +LoadScript init/config.vim " Extra config for different contexts + +if $fullrc == 'false' + finish +endif + +" Different scripts for nvim and vim +if has('nvim') + LoadScript mini.lua +else + LoadScript init/plugins.vim + LoadScript init/style.vim +endif + +LoadScript init/highlight.vim + +silent! source ~/.projects.vim -- cgit v1.2.3-70-g09d2