From 6a470906054ce944e8309c6a7964ed6b4242905d Mon Sep 17 00:00:00 2001 From: Robert Kmiec Date: Thu, 16 May 2019 15:11:01 +0200 Subject: [PATCH] vim: tweaks to disable as much plugins as possible --- .vimrc | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/.vimrc b/.vimrc index f2b2af7..449e314 100644 --- a/.vimrc +++ b/.vimrc @@ -32,7 +32,7 @@ Plugin 'Valloric/YouCompleteMe' "Plugin 'gabrielelana/vim-markdown' "Plugin 'idanarye/vim-vebugger' :Termdebug "Plugin 'jeaye/color_coded' -"Plugin 'jez/vim-superman' "vman application +Plugin 'jez/vim-superman' "vman application "Plugin 'metakirby5/codi.vim' "Plugin 'milkypostman/vim-togglelist' " Map of quickfix toggles "Plugin 'mnpk/vim-jira-complete' @@ -49,7 +49,7 @@ Plugin 'Valloric/YouCompleteMe' "Plugin 'vim-scripts/taglist.vim' Plugin 'airblade/vim-gitgutter' " Mark edited lines Plugin 'ctrlpvim/ctrlp.vim' -Plugin 'ericcurtin/CurtineIncSw.vim' "Toggle .c .h files +"Plugin 'ericcurtin/CurtineIncSw.vim' "Toggle .c .h files Plugin 'flazz/vim-colorschemes' " lots of colorschemes Plugin 'justinmk/vim-sneak' Plugin 'kergoth/vim-bitbake' " Bitbake templates and syntax @@ -112,15 +112,13 @@ if isdirectory($HOME . '/.vim/tags') == 0 :silent !mkdir -p ~/.vim/tags > /dev/null 2>&1 endif let g:gutentags_cache_dir='~/.vim/tags' -let g:gutentags_ctags_extra_args=['--fields=+l'] +"let g:gutentags_ctags_extra_args=['--fields=+l'] "Changing Leader Key let mapleader = "\\" " Set title to window set title -" Dictionary path, from which the words are being looked up. -"set dictionary=/usr/share/dict/words " Make pasting done without any indentation break set pastetoggle= @@ -505,7 +503,10 @@ set nowrapscan tnoremap N "set notimeout ttimeout timeoutlen=100 +set spell set spelllang=en,pl +" Dictionary path, from which the words are being looked up. +set dictionary=/usr/share/dict/words " from vimconfig.com "set showbreak=++ @@ -537,6 +538,26 @@ function! HLNext(blinktime) endfor endfunction -nmap S [Shortcut for :s///g] :%s//g -xmap S :s//g +nnoremap S :%s//g +xnoremap S :s//g xmap x + +set path+=** + +function! FindAlternate() + let l:ext = 'h' + let l:curr_ext = expand('%:e') + if (l:curr_ext == 'c') + let l:ext = 'h' + elseif (l:curr_ext == 'cpp') + let l:ext = 'hpp' + elseif (l:curr_ext == 'h') + let l:ext = 'c' + elseif (l:curr_ext == 'hpp') + let l:ext = 'cpp' + endif + let l:file = expand('%:t:r') . '.' . l:ext + :exec 'find ' . l:file +endfunction + +nnoremap :call FindAlternate()