aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vimrc-full29
1 files changed, 25 insertions, 4 deletions
diff --git a/vimrc-full b/vimrc-full
index 6ffd5e0..cc4114c 100644
--- a/vimrc-full
+++ b/vimrc-full
@@ -256,7 +256,7 @@ set nosmartindent
256set cindent cinoptions+=(0 | " indent at parentheses 256set cindent cinoptions+=(0 | " indent at parentheses
257 257
258set noshiftround | " indent/un-indent sna=ps to multiple of shiftwidths 258set noshiftround | " indent/un-indent sna=ps to multiple of shiftwidths
259set equalalways | " do not evenly size windows when opening new or closing old 259set noequalalways | " do not evenly size windows when opening new or closing old
260set nocursorline | " turn visual cursor line off (improves performance) 260set nocursorline | " turn visual cursor line off (improves performance)
261"======================================================================================================================= 261"=======================================================================================================================
262 262
@@ -318,7 +318,7 @@ if has("autocmd")
318 augroup set_window_title " { 318 augroup set_window_title " {
319 " autocmd BufWinEnter quickfix setl statusline=%t 319 " autocmd BufWinEnter quickfix setl statusline=%t
320 " autocmd BufEnter * let &titlestring = hostname() . "[vim(" . expand("%:t") . ")]" 320 " autocmd BufEnter * let &titlestring = hostname() . "[vim(" . expand("%:t") . ")]"
321 autocmd cursorhold * let &titlestring = "%t %y ".$user."@".hostname().":%{expand(\"%:~:.:h\")}" 321 autocmd CursorHold * let &titlestring = "%t %y ".$USER."@".hostname().":%{expand(\"%:~:.:h\")}"
322 set title 322 set title
323 " autocmd CursorHold * let &titlestring = "Vim (".airline#extensions#tagbar#currenttag().")" 323 " autocmd CursorHold * let &titlestring = "Vim (".airline#extensions#tagbar#currenttag().")"
324 324
@@ -1049,14 +1049,19 @@ function! ExtendColorTheme()
1049 highlight! Todo guibg=#ffffaa guifg=#000000 gui=bold term=bold 1049 highlight! Todo guibg=#ffffaa guifg=#000000 gui=bold term=bold
1050 highlight! cStatement guifg=red gui=bold term=bold 1050 highlight! cStatement guifg=red gui=bold term=bold
1051 1051
1052 highlight! link Convention Error
1053
1052 " automatically enter list mode when going in insert mode (makes above syntax command temporarily ineffective) 1054 " automatically enter list mode when going in insert mode (makes above syntax command temporarily ineffective)
1053 autocmd InsertEnter * set list 1055 autocmd InsertEnter * set list
1054 autocmd InsertLeave * set nolist 1056 autocmd InsertLeave * set nolist
1055 1057
1058 " autocmd InsertLeave * call matchadd('Conceal', ' \+$', -1, 101, { 'conceal': '⟶' })
1059 autocmd InsertEnter * call matchdelete(101)
1060 autocmd InsertLeave * call matchadd('Convention', ' \+$', -1, 101, { 'conceal': '⟶' })
1061
1056 " Show trailing whitepace and spaces before a tab as part of the syntax highlighting 1062 " Show trailing whitepace and spaces before a tab as part of the syntax highlighting
1057 highlight! link Convention Error
1058 " autocmd BufEnter,InsertLeave * syntax match Convention /\s\+$\| \+\ze\t/ containedin=ALL 1063 " autocmd BufEnter,InsertLeave * syntax match Convention /\s\+$\| \+\ze\t/ containedin=ALL
1059 autocmd Syntax * syntax match Convention /\s\+$\| \+\ze\t/ containedin=ALL 1064 " autocmd Syntax * syntax match Convention /\s\+$\| \+\ze\t/ containedin=ALL
1060 " autocmd BufEnter,BufWritePost * syntax match Convention /\s\+$\| \+\ze\t/ containedin=ALL 1065 " autocmd BufEnter,BufWritePost * syntax match Convention /\s\+$\| \+\ze\t/ containedin=ALL
1061 " autocmd InsertEnter * syntax clear Convention 1066 " autocmd InsertEnter * syntax clear Convention
1062 " autocmd BufEnter,InsertLeave * execute ':syntax match Convention /\%>'.&textwidth.'v./ containedin=ALL' 1067 " autocmd BufEnter,InsertLeave * execute ':syntax match Convention /\%>'.&textwidth.'v./ containedin=ALL'
@@ -1064,6 +1069,12 @@ function! ExtendColorTheme()
1064 autocmd InsertEnter * set colorcolumn=80,120 1069 autocmd InsertEnter * set colorcolumn=80,120
1065 autocmd InsertLeave * set colorcolumn& 1070 autocmd InsertLeave * set colorcolumn&
1066 " set colorcolumn= | " not used, because we have a :match directive for textwidth 1071 " set colorcolumn= | " not used, because we have a :match directive for textwidth
1072 "
1073" if argc() == 0
1074 " rv
1075 " autocmd VimEnter * split +bro\ ol
1076" endif
1077"
1067 1078
1068endfunction 1079endfunction
1069autocmd! ColorScheme * call ExtendColorTheme() 1080autocmd! ColorScheme * call ExtendColorTheme()
@@ -1103,3 +1114,13 @@ autocmd VimEnter,WinEnter * exec ':set scrolljump='.winheight(0)/2
1103 1114
1104" display highlight group under the cursor 1115" display highlight group under the cursor
1105map <leader>h :echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')<CR> 1116map <leader>h :echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')<CR>
1117
1118if argc() == 0
1119 " autocmd VimEnter * call setloclist(0, filter(map(copy(v:oldfiles), {_, p->{'filename': expand(get(split(p, "'"), 0))}}), { val -> echo val}))
1120
1121 " from the list of recent files: make absolute paths, filter out files not
1122 " contained in cwd and finally filter out directories and non-files...
1123 autocmd VimEnter * call setqflist(map(filter(filter(
1124 \ map(copy(v:oldfiles), {_, p->expand(p)}), 'v:val =~ "'.getcwd().'"'),
1125 \ 'filereadable(v:val)'), {_, p->{'filename': fnamemodify(p, ':.')}})) | copen | only
1126endif
..