aboutsummaryrefslogtreecommitdiff
path: root/vimrc-full
diff options
context:
space:
mode:
authorMax Christian Pohle2017-05-13 15:08:45 +0200
committerMax Christian Pohle2017-05-13 15:08:45 +0200
commitf06d6454cae2b379b6938eba671273a201c1f0e2 (patch)
treef3d12ebcaeb1242ae881186294b95cfc9689e958 /vimrc-full
parente710a628e1537c621884b861a53533bc841e368d (diff)
downloadvim-karlmarks-f06d6454cae2b379b6938eba671273a201c1f0e2.tar.bz2
vim-karlmarks-f06d6454cae2b379b6938eba671273a201c1f0e2.zip
Restructured and improved register macros
Diffstat (limited to 'vimrc-full')
-rw-r--r--vimrc-full158
1 files changed, 82 insertions, 76 deletions
diff --git a/vimrc-full b/vimrc-full
index ce8b007..47bcc5e 100644
--- a/vimrc-full
+++ b/vimrc-full
@@ -2,11 +2,76 @@
2 2
3set encoding=utf-8 | " set up vim's cosole encoding (not file encoding, for which there is fileencoding=) 3set encoding=utf-8 | " set up vim's cosole encoding (not file encoding, for which there is fileencoding=)
4set t_Co=256 | " required on some ssh sessions 4set t_Co=256 | " required on some ssh sessions
5" set background=light | " 5" set background=light | "
6" set term=xtermc | " may be required on solaris 6" set term=xtermc | " may be required on solaris
7" set term=xterm-256color 7" set term=xterm-256color
8" set termguicolors 8" set termguicolors
9 9
10"=======================================================================================================================
11" MATTER_OF_TASTE:
12"=======================================================================================================================
13set textwidth=120 | " better done with modeline
14set ts=4 sts=4 sw=4 expandtab | " better done with a modeline
15
16"=======================================================================================================================
17" SETTINGS:
18"=======================================================================================================================
19set noautochdir | " When on, Vim will change the current working directory
20set breakindent | " Every wrapped line will continue visually indented
21set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well)
22set cmdheight=2 | " sets the command line's height
23set complete+=d | " scan current and included files for defined name or macro
24set complete+=i | " scan current and included files for completions
25set concealcursor=nc | " limits the display of concealed text to normal and command mode
26set conceallevel=2 | " replace escaped chars by their utf-8 representation (useful for LaTeX)
27set confirm | " asks 'do you want to save?'
28set cpoptions+=P | " makes :w filename set the current buffer to filename
29set hidden | " allows switiching buffers even if the current buffer contains changes (displays +)
30set hlsearch | " highlights all search matches (not as performant!)
31set ignorecase smartcase | " search with ignorecase by default, but use case sensitive search when one captical char is contained
32set lazyredraw | " disables redraw during macro exectution (improves performance)
33set linebreak | " wrap long lines at char 'breakat', not inside words
34set mouse=n | " allow mouse in normal mode only, so one can use the terminals c&p feature in insert mode
35set mousemodel=popup | " only in gvim: right click opens a popup-menu
36set nocursorcolumn | " turn visual cursor column off (improves performance)
37set nocursorline | " turn visual cursor line off (improves performance)
38set nrformats+=alpha | " allows CTRL-A & CTRL-X to increment and decrement letters, not just numbers
39set nofoldenable | " disable code folding. I hate code folding
40set foldmethod=syntax | " foldlevel: syntax, indent, manual
41set foldcolumn=1 | " if code folding gets used display it in the clutter bar, where line numbers live
42set foldclose=all | " automatically fold, when the cursor leaves the folded area
43set foldopen=all | " unfold when cursor moves into the closed fold
44set foldtext=Foldtext() | "
45set foldnestmax=1 | " top level folding only
46set relativenumber | " relative line numbers can speed up navigation
47set noshowmode | " because we are using some powerline derivat
48set nostartofline | " when scrolling: do not move the cursor to column 1
49set notimeout ttimeout | " improves performance but is known to cause problems on slow terminals
50set ttimeoutlen=50 | " set esc key timeout in ms-
51set nowrap | " but do not (by default) wrap long lines around
52set number | " turn line numbers on/off (performance decreases when they are shown)
53set pumheight=8 | " Determines the maximum number of items to show in the popup menu for
54set path+=** | " allow recursive searches for files
55set redrawtime=400 | " The time in milliseconds for redrawing the display.
56" set restorescreen | " restores the console after exiting vim
57" set shada+=n~/.vim/shada | " shada file to use
58set scrolljump=5 | " how many lines get scrolled into view when cursor reaches the screens edge
59set splitbelow | " open new windows below the current one (i find that more intuitive)
60set shiftround | " indent/unindent snaps to multiple of shiftwidth
61set showcmd | " essential: show keys of combined commands in the lower right corner (BUT SLOW, makes cursor flickering)
62set showtabline=2 | " 0: never, 1: only if there are at least two tabs, 2:always
63set winwidth=30 | " keep NERDTreeWindow at least this size
64set winminwidth=30 | " (and all other windows, so TODO: watch out)
65set tags+=../tags
66" set textwidth=100 | " line length (80 used to be default, but...)
67" set colorcolumn= | " not used, because we have a :match directive for textwidth
68set updatetime=1000 | " updates the screen more often
69set writedelay=0
70set wildmenu | " use a menu in the command line
71set wildmode=longest:full | " do not preselect any entry and show all possible
72"=======================================================================================================================
73
74
10" START: LOADING PLUGINS 75" START: LOADING PLUGINS
11" ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ 76" ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
12call plug#begin() 77call plug#begin()
@@ -18,7 +83,6 @@ Plug 'godlygeek/tabular' | " align code on a sign, like :Tab/=
18 83
19" TESTING: | " plugins which I am currently trying... 84" TESTING: | " plugins which I am currently trying...
20" Plug 'rkitover/vimpager' 85" Plug 'rkitover/vimpager'
21" Plug 'wting/gitsessions.vim' | " worth a try: restore sessions based on the git repo you are working in
22" Plug 'Shougo/neocomplete.vim' | " alternative to YouCompleteMe in some cases 86" Plug 'Shougo/neocomplete.vim' | " alternative to YouCompleteMe in some cases
23" Plug 'tpope/vim-characterize' | " normal mode: make ga show character names of Unicode chars (ga shows hex and dec values) 87" Plug 'tpope/vim-characterize' | " normal mode: make ga show character names of Unicode chars (ga shows hex and dec values)
24 88
@@ -89,9 +153,10 @@ nnoremap <F9> :TagbarToggle<CR>| " bind TagBar to Hotkey Ct
89 153
90 154
91" AIRLINE: a fancy status line ========================================================================================= 155" AIRLINE: a fancy status line =========================================================================================
92Plug 'vim-airline/vim-airline' | " beautification of the mode line
93set laststatus=2 | " required by AirLine, without status line does not appear until a window split 156set laststatus=2 | " required by AirLine, without status line does not appear until a window split
94set background=light 157set background=light
158
159Plug 'vim-airline/vim-airline' | " beautification of the mode line
95let g:airline_extensions = ['tabline', 'branch', 'syntastic', 'whitespace', 'ycm'] 160let g:airline_extensions = ['tabline', 'branch', 'syntastic', 'whitespace', 'ycm']
96let b:airline_whitespace_checks = ['indent', 'trailing', 'long', 'mixed-indent-file'] 161let b:airline_whitespace_checks = ['indent', 'trailing', 'long', 'mixed-indent-file']
97let g:airline_section_c = "" | " was: %F 162let g:airline_section_c = "" | " was: %F
@@ -128,10 +193,7 @@ let g:airline#themes#base16#constant = 0
128" let g:airline_theme='badcat' | " specifies which colorscheme should airline uses 193" let g:airline_theme='badcat' | " specifies which colorscheme should airline uses
129" let g:airline_theme='papercolor' | " specifies which colorscheme should ionirline uses 194" let g:airline_theme='papercolor' | " specifies which colorscheme should ionirline uses
130 195
131" Autocompleter: =====================================. 196" Autocompleter: =====================================
132"
133"
134
135if has("python") 197if has("python")
136 " YouCompleteMe: ===================================================================================================== 198 " YouCompleteMe: =====================================================================================================
137 " Plug 'Valloric/MatchTagAlways' " highlights the closing tag/brace/... 199 " Plug 'Valloric/MatchTagAlways' " highlights the closing tag/brace/...
@@ -154,11 +216,8 @@ if has("python")
154 let g:ycm_python_binary_path = 'python' " the python interpreter of choice (for code checking) 216 let g:ycm_python_binary_path = 'python' " the python interpreter of choice (for code checking)
155 217
156 " disable <tab>-key for YCM so that it can be used with ultisnips 218 " disable <tab>-key for YCM so that it can be used with ultisnips
157 " let g:ycm_key_list_select_completion=[] 219 let g:ycm_key_list_select_completion=[]
158 " let g:ycm_key_list_previous_completion=[] 220 let g:ycm_key_list_previous_completion=[]
159 "
160 " Plug 'rdnetto/YCM-Generator' " you better use cmake to generate json build commands, like:
161 " 'cmake -D CMAKE_EXPORT_COMPILE_COMMANDS=1 ..' can be used to generate a .ycm-extra.conf compatible json file
162 221
163 222
164 " SYNTASTIC: ========================================================================================================= 223 " SYNTASTIC: =========================================================================================================
@@ -222,8 +281,9 @@ function! ExtendColorTheme()
222 " highlight Normal ctermbg=NONE ctermfg=black 281 " highlight Normal ctermbg=NONE ctermfg=black
223 282
224 highlight! CursorLineNr cterm=inverse | " ctermbg=black ctermfg=NONE 283 highlight! CursorLineNr cterm=inverse | " ctermbg=black ctermfg=NONE
225 highlight! Pmenu ctermbg=LightYellow ctermfg=blue guibg=blue guifg=LightYellow 284 highlight! Pmenu ctermbg=LightYellow ctermfg=blue
226 highlight! PmenuSel ctermbg=LightYellow ctermfg=blue guibg=LightYellow guifg=blue cterm=italic 285 highlight! PmenuSel ctermbg=blue ctermfg=LightYellow cterm=bold
286
227 highlight! link PmenuSbar Pmenu 287 highlight! link PmenuSbar Pmenu
228 highlight! PmenuThumb cterm=inverse 288 highlight! PmenuThumb cterm=inverse
229 highlight! MoreMsg cterm=inverse 289 highlight! MoreMsg cterm=inverse
@@ -233,6 +293,10 @@ function! ExtendColorTheme()
233 highlight! SpellBad ctermbg=none 293 highlight! SpellBad ctermbg=none
234 highlight! SpecialKey ctermfg=19 294 highlight! SpecialKey ctermfg=19
235 highlight! WhiteSpace ctermfg=19 295 highlight! WhiteSpace ctermfg=19
296
297 highlight! link TabLine LineNr
298 highlight! TabLineSel ctermbg=blue ctermfg=black
299 highlight! link TabLineFill LineNr
236endfunction 300endfunction
237autocmd ColorScheme * call ExtendColorTheme() 301autocmd ColorScheme * call ExtendColorTheme()
238 302
@@ -272,66 +336,6 @@ set thesaurus+=/home/max/.vim/thesaurus/php.txt
272set dictionary=/usr/share/dict/cracklib-small 336set dictionary=/usr/share/dict/cracklib-small
273set complete+=k " make default completer <C-N> respect the dictionary 337set complete+=k " make default completer <C-N> respect the dictionary
274 338
275"=======================================================================================================================
276" SETTINGS:
277"=======================================================================================================================
278set noautochdir | " When on, Vim will change the current working directory
279set breakindent | " Every wrapped line will continue visually indented
280set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well)
281set cmdheight=2 | " sets the command line's height
282set complete+=d | " scan current and included files for defined name or macro
283set complete+=i | " scan current and included files for completions
284set concealcursor=nc | " limits the display of concealed text to normal and command mode
285set conceallevel=2 | " replace escaped chars by their utf-8 representation (useful for LaTeX)
286set confirm | " asks 'do you want to save?'
287set cpoptions+=P | " makes :w filename set the current buffer to filename
288set hidden | " allows switiching buffers even if the current buffer contains changes (displays +)
289set hlsearch | " highlights all search matches (not as performant!)
290set ignorecase smartcase | " search with ignorecase by default, but use case sensitive search when one captical char is contained
291set lazyredraw | " disables redraw during macro exectution (improves performance)
292set linebreak | " wrap long lines at char 'breakat', not inside words
293set mouse=n | " allow mouse in normal mode only, so one can use the terminals c&p feature in insert mode
294set mousemodel=popup | " only in gvim: right click opens a popup-menu
295set nocursorcolumn | " turn visual cursor column off (improves performance)
296set nocursorline | " turn visual cursor line off (improves performance)
297set nrformats+=alpha | " allows CTRL-A & CTRL-X to increment and decrement letters, not just numbers
298set nofoldenable | " disable code folding. I hate code folding
299set foldmethod=syntax | " foldlevel: syntax, indent, manual
300set foldcolumn=1 | " if code folding gets used display it in the clutter bar, where line numbers live
301set foldclose=all | " automatically fold, when the cursor leaves the folded area
302set foldopen=all | " unfold when cursor moves into the closed fold
303set foldtext=Foldtext() | "
304set foldnestmax=1 | " top level folding only
305set relativenumber | " relative line numbers can speed up navigation
306set noshowmode | " because we are using some powerline derivat
307set nostartofline | " when scrolling: do not move the cursor to column 1
308set notimeout ttimeout | " improves performance but is known to cause problems on slow terminals
309set ttimeoutlen=50 | " set esc key timeout in ms-
310set nowrap | " but do not (by default) wrap long lines around
311set number | " turn line numbers on/off (performance decreases when they are shown)
312set pumheight=8 | " Determines the maximum number of items to show in the popup menu for
313set path+=** | " allow recursive searches for files
314set redrawtime=400 | " The time in milliseconds for redrawing the display.
315" set restorescreen | " restores the console after exiting vim
316" set shada+=n~/.vim/shada | " shada file to use
317set scrolljump=5 | " how many lines get scrolled into view when cursor reaches the screens edge
318set splitbelow | " open new windows below the current one (i find that more intuitive)
319set shiftround | " indent/unindent snaps to multiple of shiftwidth
320set showcmd | " essential: show keys of combined commands in the lower right corner (BUT SLOW, makes cursor flickering)
321" ret noshowcmd | " essential: show keys of combined commands in the lower right corner (BUT SLOW, makes cursor flickering)
322set winwidth=30 | " keep NERDTreeWindow at least this size
323set winminwidth=30 | " (and all other windows, so TODO: watch out)
324set tags+=../tags
325" set textwidth=100 | " line length (80 used to be default, but...)
326set textwidth=120 | " better done with modeline
327" set colorcolumn= | " not used, because we have a :match directive for textwidth
328set ts=4 sts=4 sw=4 expandtab | " better done with a modeline
329set updatetime=1000 | " updates the screen more often
330set writedelay=0
331set wildmenu | " use a menu in the command line
332set wildmode=longest:full | " do not preselect any entry and show all possible
333"=======================================================================================================================
334
335" set fillchars+=stlnc:\― | " 339" set fillchars+=stlnc:\― | "
336 340
337 341
@@ -531,7 +535,9 @@ if has("autocmd")
531 augroup CurrentFileName 535 augroup CurrentFileName
532 highlight CurrentFileName ctermbg=yellow guibg=yellow 536 highlight CurrentFileName ctermbg=yellow guibg=yellow
533 537
534 let @w = ":execute ':match ColorColumn /\\%>'.&textwidth.'v./'" 538
539 let @w = ":execute ':match ColorColumn /\\%>'.&textwidth.'v./' | :2match ExtraWhitespace /\\s\\+$/"
540 " let @w = ":execute ':match ColorColumn /\\%>'.&textwidth.'v./'"
535 " highlight the current files name inside the document... 541 " highlight the current files name inside the document...
536 let @g = ":exe ':match CurrentFileName /'.escape(expand('%:t'), '.').'/'" 542 let @g = ":exe ':match CurrentFileName /'.escape(expand('%:t'), '.').'/'"
537 " put the current files name after the cursor... 543 " put the current files name after the cursor...
@@ -576,7 +582,7 @@ vnoremap <s-up> k
576nnoremap <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>. 582nnoremap <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>.
577 583
578nnoremap <silent> <F5> :make<CR> 584nnoremap <silent> <F5> :make<CR>
579nnoremap <silent> <F6> :silent syntax sync fromstart<CR>:nohlsearch<CR>:silent match<CR> 585nnoremap <silent> <F6> :silent syntax sync fromstart<CR>:nohlsearch<CR>:silent match<CR>:silent 2match<CR>:silent 3match<CR>
580nnoremap <leader>r :syntax sync fromstart 586nnoremap <leader>r :syntax sync fromstart
581 587
582 588
..