From cf89420425e9c947db99827cd217e24fd3b95f98 Mon Sep 17 00:00:00 2001 From: johannst Date: Thu, 22 Nov 2018 23:19:09 +0100 Subject: Added vim-over & added generation of base16 colorschme to .vimrc --- install | 4 ++++ vimrc | 19 +++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/install b/install index 2c32e65..89c75a4 100755 --- a/install +++ b/install @@ -120,6 +120,10 @@ function vimConfigInstaller() { # link ctags type ctags >/dev/null 2>&1 && { echo -e "let \$MYCTAGS='$(which ctags)'" >> $vimrc; } echo -e "source $ABS_BASE_DIR/vimrc" >> $vimrc + echo -e 'if filereadable(expand("~/.vimrc_background")) && g:gBase16ColorEnabled == 1' >> $vimrc + echo -e '\tlet base16colorspace=256' >> $vimrc + echo -e '\tsource ~/.vimrc_background' >> $vimrc + echo -e 'endif' >> $vimrc git clone https://github.com/VundleVim/Vundle.vim.git $vim_home/bundle/Vundle.vim || { echo "Vundle not cloned, using existing!"; } vim +PluginInstall +qall return 0 diff --git a/vimrc b/vimrc index 43dd706..41776c4 100644 --- a/vimrc +++ b/vimrc @@ -40,6 +40,7 @@ Plugin 'w0rp/ale' Plugin 'junegunn/fzf.vim' Plugin 'maralla/completor.vim' Plugin 'chriskempson/base16-vim' +Plugin 'osyo-manga/vim-over' call vundle#end() @@ -181,7 +182,13 @@ endif "}}} "{{{ Vim Basic -colorscheme johannst +if s:IsPluginEnabled('chriskempson/base16-vim') + let g:gBase16ColorEnabled = 1 + syntax on +else + let g:gBase16ColorEnabled = 0 + colorscheme johannst +endif filetype plugin indent on " enable loading indent file for filetype set fileformats=unix,dos,mac " try recognizing dos, unix, and mac line endings. @@ -296,9 +303,13 @@ set matchtime=5 " how many tenths of a second to blink when matchi set matchpairs+=<:> " show matching <> as well nnoremap n :noh -execute "vnoremap / \"ry/r" -execute "vnoremap r \"ry:%s/r/r/gc"repeat('', 4) -execute "vnoremap br \"ry:bufdo%s/r/r/gc"repeat('', 4) +execute "vnoremap r \"ry:%s/r/r/gc" . repeat('', 3) +execute "vnoremap rb \"ry:bufdo%s/r/r/gc" . repeat('', 3) + +if s:IsPluginEnabled('osyo-manga/vim-over') + execute "vnoremap r \"ry:OverCommandLine %s/r/r/gc" . repeat('', 3) + "execute "vnoremap rb \"ry:OverCommandLine bufdo%s/r/r/gc" . repeat('', 3) +endif "}}} "{{{ Buffer & Splits -- cgit v1.2.3