From 76922c395db1d9745e2a47f8c0584545958a3fee Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Wed, 22 May 2024 13:57:46 +0800 Subject: Update --- vim/vimrc | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 vim/vimrc (limited to 'vim/vimrc') diff --git a/vim/vimrc b/vim/vimrc new file mode 100644 index 0000000..78a96b1 --- /dev/null +++ b/vim/vimrc @@ -0,0 +1,44 @@ +" 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' + +" Load script in current dir +" command! -nargs=1 LoadScript exec 'source '.s:home.'/'.'' + +" Add current dir into runtimepath +execute 'set runtimepath+='.s:home + + +"---------------------------------------------------------------------- +" Locad Modules +"---------------------------------------------------------------------- + +" Basic configuration +source ~/helper/vim/init/basic.vim + +" Key mappings +source ~/helper/vim/init/keymaps.vim + +" UI +source ~/helper/vim/init/style.vim + +" Extra config for different contexts +source ~/helper/vim/init/config.vim + +" Set tabsize +source ~/helper/vim/init/tabsize.vim + +if has('nvim') + " For nvim + source ~/.config/nvim/lazy.lua +else + " Plugin + source ~/helper/vim/init/plugins.vim +endif -- cgit v1.2.3-70-g09d2