aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2019-09-25 01:51:47 +0200
committerInigoGutierrez <inigogf.95@gmail.com>2019-09-25 01:51:47 +0200
commit585f69c4db4c2072495093d0f2a1eeede4487106 (patch)
tree67e46ec76cf8b43cc20da8a7bea5fa37048ca233
parente07d37fe60c542f7c9700e9d2b2e97bf7dca28f7 (diff)
downloadconfigs-585f69c4db4c2072495093d0f2a1eeede4487106.tar.gz
configs-585f69c4db4c2072495093d0f2a1eeede4487106.zip
C++ macros and Damian Conway conference watched.
-rw-r--r--files/rcs/.vimrc44
1 files changed, 40 insertions, 4 deletions
diff --git a/files/rcs/.vimrc b/files/rcs/.vimrc
index 8d1b615..38f3df8 100644
--- a/files/rcs/.vimrc
+++ b/files/rcs/.vimrc
@@ -37,8 +37,35 @@ set vb " No bell
set ignorecase
set wrapscan
set incsearch
-set colorcolumn=110
-highlight ColorColumn ctermbg=darkgray
+
+" Line size marking
+highlight ColorColumn ctermbg=darkblue ctermfg=black
+call matchadd('ColorColumn', '\%81v', 100)
+"Redjail Bomb (thx Damian Conway!)
+"highlight ColorColumn ctermbg=red ctermfg=blue
+"exec 'set colorcolumn='.join(range(2,80,3), ',')
+
+" hlnext: Highlighting searches
+nnoremap <silent> n n:call HLNext(0.1)<CR>
+nnoremap <silent> N N:call HLNext(0.1)<CR>
+function! HLNext(blinktime)
+ set invcursorline
+ redraw
+ exec 'sleep'.float2nr(a:blinktime*1000).'m'
+ set invcursorline
+ redraw
+endfunction
+
+" dragvisuals: dragging visual blocks
+vmap <expr> <LEFT> DVB_Drag('left')
+vmap <expr> <RIGHT> DVB_Drag('right')
+vmap <expr> <DOWN> DVB_Drag('down')
+vmap <expr> <UP> DVB_Drag('up')
+vmap <expr> D DVB_Duplicate()
+
+" Show tabs
+exec "set listchars=tab:\uBB\uBB,trail:\uB7,nbsp:~"
+set list
" For syntastic
set statusline+=%#warningmsg#
@@ -146,8 +173,17 @@ nnoremap <leader>gp :!git push<CR>
nnoremap <leader>gc :!git commit -m "
"" c++
-inoremap <leader>cf for (x; <++>; <++>) {<CR><++><CR>}<Esc>?x<CR>s
-
+nnoremap <leader>ct <Esc>:r ~/.config/custom/vim/c/template.txt<CR>/<+++><CR>cf>
+nnoremap <leader>ce <Esc>:r ~/.config/custom/vim/c/enum.txt<CR>/<+++><CR>cf>
+nnoremap <leader>cf <Esc>:r ~/.config/custom/vim/c/for.txt<CR>/<+++><CR>cf>
+nnoremap <leader>cif <Esc>:r ~/.config/custom/vim/c/if.txt<CR>/<+++><CR>cf>
+nnoremap <leader>celse <Esc>:r ~/.config/custom/vim/c/else.txt<CR>/<+++><CR>cf>
+nnoremap <leader>celif <Esc>:r ~/.config/custom/vim/c/elif.txt<CR>/<+++><CR>cf>
+nnoremap <leader>cs <Esc>:r ~/.config/custom/vim/c/switch.txt<CR>/<+++><CR>cf>
+nnoremap <leader>cw <Esc>:r ~/.config/custom/vim/c/while.txt<CR>/<+++><CR>cf>
+nnoremap <leader>cd <Esc>:r ~/.config/custom/vim/c/do.txt<CR>/<+++><CR>cf>
+
+nnoremap <leader>fixit :YcmCompleter FixIt<CR>
"" html