summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjohannst <stoelp@eit.uni-kl.de>2018-11-22 23:19:09 +0100
committerjohannst <stoelp@eit.uni-kl.de>2018-11-22 23:19:09 +0100
commitcf89420425e9c947db99827cd217e24fd3b95f98 (patch)
treed098135758f0024a96e32a2fc3a5e60dcc82c789
parent24b7732a1764efa23f60c0e2e9b4b5d33444d3b8 (diff)
downloaddotfiles-cf89420425e9c947db99827cd217e24fd3b95f98.tar.gz
dotfiles-cf89420425e9c947db99827cd217e24fd3b95f98.zip
Added vim-over & added generation of base16 colorschme to .vimrc
-rwxr-xr-xinstall4
-rw-r--r--vimrc19
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 <leader>n :noh<CR>
-execute "vnoremap <leader>/ \"ry/<C-r>r"
-execute "vnoremap <leader>r \"ry:%s/<C-r>r/<C-r>r/gc"repeat('<Left>', 4)
-execute "vnoremap <leader>br \"ry:bufdo%s/<C-r>r/<C-r>r/gc"repeat('<Left>', 4)
+execute "vnoremap <leader>r \"ry:%s/<C-r>r/<C-r>r/gc" . repeat('<Left>', 3)
+execute "vnoremap <leader>rb \"ry:bufdo%s/<C-r>r/<C-r>r/gc" . repeat('<Left>', 3)
+
+if s:IsPluginEnabled('osyo-manga/vim-over')
+ execute "vnoremap <leader>r \"ry:OverCommandLine %s/<C-r>r/<C-r>r/gc<CR>" . repeat('<Left>', 3)
+ "execute "vnoremap <leader>rb \"ry:OverCommandLine bufdo%s/<C-r>r/<C-r>r/gc<CR>" . repeat('<Left>', 3)
+endif
"}}}
"{{{ Buffer & Splits