From b728e3eb1e5be9fa50c6e3a5c480ef0b0bafe26d Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Sat, 12 Aug 2023 16:26:37 +0800 Subject: Update --- Makefile | 4 ++-- X11/openbox/rc.xml | 6 +++--- init.vim | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ vimrc | 43 ------------------------------------------- 4 files changed, 54 insertions(+), 48 deletions(-) create mode 100644 init.vim delete mode 100644 vimrc diff --git a/Makefile b/Makefile index 4e435fb..e7e446b 100644 --- a/Makefile +++ b/Makefile @@ -15,9 +15,9 @@ tig: ln -sf `pwd`/tigrc ~/.tigrc vim: - ln -sf `pwd`/vimrc ~/.vimrc + ln -sf `pwd`/init.vim ~/.vimrc # vim-plug - curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + # curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim gpg: ln -sf `pwd`/misc/gpg-agent ~/.gnupg/gpg-agent.conf diff --git a/X11/openbox/rc.xml b/X11/openbox/rc.xml index 65ffdf2..aa0ff0d 100644 --- a/X11/openbox/rc.xml +++ b/X11/openbox/rc.xml @@ -471,17 +471,17 @@ - brightness --inc + ob-brightness --inc - brightness --inc 1 + ob-brightness --inc 1 - brightness --dec + ob-brightness --dec diff --git a/init.vim b/init.vim new file mode 100644 index 0000000..6b31c8e --- /dev/null +++ b/init.vim @@ -0,0 +1,49 @@ +" 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 = '~/.vim/vim-init' + +" Load script in current dir +" command! -nargs=1 LoadScript exec 'so '.s:home.'/'.'' + +" Add current dir into runtimepath +execute 'set runtimepath+='.s:home + + +"---------------------------------------------------------------------- +" Locad Modules +"---------------------------------------------------------------------- + +" Basic configuration +source ~/.vim/vim-init/init/init-basic.vim + +" Key mappings +source ~/.vim/vim-init/init/init-keymaps.vim + +" UI +" source ~/.vim/vim-init/init/init-style.vim + +" Extra config for different contexts +" source ~/.vim/vim-init/init/init-config.vim + +" 设定 tabsize +" source ~/.vim/vim-init/init/init-tabsize.vim + +" Plugins + +" Neovim +if has('nvim') + source ~/.config/nvim/nvim.lua +else + source ~/.vim/vim-init/init/init-plugins.vim +endif + +" Set UI theme +colorscheme desert +highlight MatchParen cterm=bold ctermbg=none ctermfg=magenta diff --git a/vimrc b/vimrc deleted file mode 100644 index bfdd212..0000000 --- a/vimrc +++ /dev/null @@ -1,43 +0,0 @@ -" 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 = '~/.vim/vim-init' - -" Load script in current dir -" command! -nargs=1 LoadScript exec 'so '.s:home.'/'.'' - -" Add current dir into runtimepath -execute 'set runtimepath+='.s:home - - -"---------------------------------------------------------------------- -" Locad Modules -"---------------------------------------------------------------------- - -" Basic configuration -source ~/.vim/vim-init/init/init-basic.vim - -" Key mappings -source ~/.vim/vim-init/init/init-keymaps.vim - -" UI -" source ~/.vim/vim-init/init/init-style.vim - -" Extra config for different contexts -source ~/.vim/vim-init/init/init-config.vim - -" 设定 tabsize -source ~/.vim/vim-init/init/init-tabsize.vim - -" Plugins -source ~/.vim/vim-init/init/init-plugins.vim - -" Set UI theme -colorscheme desert -highlight MatchParen cterm=bold ctermbg=none ctermfg=magenta -- cgit v1.2.3-70-g09d2