aboutsummaryrefslogtreecommitdiff
path: root/vimrc-full
diff options
context:
space:
mode:
authorMax Christian Pohle2018-04-05 20:48:02 +0200
committerMax Christian Pohle2018-04-05 20:48:02 +0200
commit6b208622d4567b688f4051ee6c2c3b1077828886 (patch)
tree06e7753670830ee4acb058953fb97cb4c502689a /vimrc-full
parent11503dfcc23e5055d095463be1b35910ae932acf (diff)
downloadvim-karlmarks-6b208622d4567b688f4051ee6c2c3b1077828886.tar.bz2
vim-karlmarks-6b208622d4567b688f4051ee6c2c3b1077828886.zip
Added recent file list when opening empty vim
Diffstat (limited to 'vimrc-full')
-rw-r--r--vimrc-full41
1 files changed, 32 insertions, 9 deletions
diff --git a/vimrc-full b/vimrc-full
index 819222f..cc4114c 100644
--- a/vimrc-full
+++ b/vimrc-full
@@ -10,6 +10,10 @@ set virtualedit=all | " virtual edit should be default behaviour,
10set nonumber norelativenumber | " do not show numbers by default, because that causes a performance loss, instead activate them on a file type basis 10set nonumber norelativenumber | " do not show numbers by default, because that causes a performance loss, instead activate them on a file type basis
11set ignorecase smartcase hlsearch | " search with ignore case by default, but use case sensitive search when one capital char is contained and highlight while typing (even though its slower) 11set ignorecase smartcase hlsearch | " search with ignore case by default, but use case sensitive search when one capital char is contained and highlight while typing (even though its slower)
12 12
13
14set path+=** | " allow recursive searches for files
15let &path = &path.",/usr/lib/modules/".substitute(system('uname -r'), "\n", "", "")."/build/include"
16
13"======================================================================================================================= 17"=======================================================================================================================
14" SHELL 18" SHELL
15"======================================================================================================================= 19"=======================================================================================================================
@@ -187,7 +191,6 @@ set noautochdir | " When on, Vim will change the current working d
187set nostartofline | " when scrolling: do not move the cursor to column 1 191set nostartofline | " when scrolling: do not move the cursor to column 1
188set nowrap | " but do not (by default) wrap long lines around 192set nowrap | " but do not (by default) wrap long lines around
189set nrformats+=alpha | " allows CTRL-A & CTRL-X to increment and decrement letters, not just numbers 193set nrformats+=alpha | " allows CTRL-A & CTRL-X to increment and decrement letters, not just numbers
190set path+=** | " allow recursive searches for files
191set incsearch | " highlight pattern while entering it (performance wise this isn't that good) 194set incsearch | " highlight pattern while entering it (performance wise this isn't that good)
192set pumheight=8 | " Determines the maximum number of items to show in the pop-up menu for 195set pumheight=8 | " Determines the maximum number of items to show in the pop-up menu for
193set scrolljump=5 | " how many lines get scrolled into view when cursor reaches the screens edge 196set scrolljump=5 | " how many lines get scrolled into view when cursor reaches the screens edge
@@ -198,7 +201,7 @@ set writedelay=0
198" display and performance 201" display and performance
199set lazyredraw | " disables redraw during macro execution (improves performance) 202set lazyredraw | " disables redraw during macro execution (improves performance)
200set cmdheight=2 | " sets the command line's height 203set cmdheight=2 | " sets the command line's height
201set signcolumn=yes | " auto=auto hide, yes=always, no=never show the column with error indicators 204set signcolumn=auto | " auto=auto hide, yes=always, no=never show the column with error indicators
202set nocursorcolumn | " turn visual cursor column off (improves performance) 205set nocursorcolumn | " turn visual cursor column off (improves performance)
203set updatetime=80 | " updates the screen more often 206set updatetime=80 | " updates the screen more often
204set redrawtime=1500 | " Timeout in milliseconds for redrawing the screen (switches syntax off when ssh too slow) / CTRL+L to retry 207set redrawtime=1500 | " Timeout in milliseconds for redrawing the screen (switches syntax off when ssh too slow) / CTRL+L to retry
@@ -253,7 +256,7 @@ set nosmartindent
253set cindent cinoptions+=(0 | " indent at parentheses 256set cindent cinoptions+=(0 | " indent at parentheses
254 257
255set noshiftround | " indent/un-indent sna=ps to multiple of shiftwidths 258set noshiftround | " indent/un-indent sna=ps to multiple of shiftwidths
256set 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
257set nocursorline | " turn visual cursor line off (improves performance) 260set nocursorline | " turn visual cursor line off (improves performance)
258"======================================================================================================================= 261"=======================================================================================================================
259 262
@@ -1043,26 +1046,35 @@ function! ExtendColorTheme()
1043 " highlight! link LightlineLeft_tabline_1 ColorColumn 1046 " highlight! link LightlineLeft_tabline_1 ColorColumn
1044 " highlight! link LightlineLeft_tabline_0_1 ColorColumn 1047 " highlight! link LightlineLeft_tabline_0_1 ColorColumn
1045 1048
1046
1047 highlight! Todo guibg=#ffffaa guifg=#000000 gui=bold term=bold 1049 highlight! Todo guibg=#ffffaa guifg=#000000 gui=bold term=bold
1048 highlight! cStatement guifg=red gui=bold term=bold 1050 highlight! cStatement guifg=red gui=bold term=bold
1049 1051
1052 highlight! link Convention Error
1053
1050 " 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)
1051 autocmd InsertEnter * set list 1055 autocmd InsertEnter * set list
1052 autocmd InsertLeave * set nolist 1056 autocmd InsertLeave * set nolist
1053 1057
1054 " highlight double words (its unlikely they are right) 1058 " autocmd InsertLeave * call matchadd('Conceal', ' \+$', -1, 101, { 'conceal': '⟶' })
1055 autocmd InsertLeave * syntax match Convention /\v<(\w+)\_s+\1>/ containedin=ALL 1059 autocmd InsertEnter * call matchdelete(101)
1060 autocmd InsertLeave * call matchadd('Convention', ' \+$', -1, 101, { 'conceal': '⟶' })
1056 1061
1057 " 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
1058 highlight! link Convention Error 1063 " autocmd BufEnter,InsertLeave * syntax match Convention /\s\+$\| \+\ze\t/ containedin=ALL
1059 autocmd BufEnter,InsertLeave * syntax match Convention /\s\+$\| \+\ze\t/ containedin=ALL 1064 " autocmd Syntax * syntax match Convention /\s\+$\| \+\ze\t/ containedin=ALL
1060 autocmd InsertEnter * syntax clear Convention 1065 " autocmd BufEnter,BufWritePost * syntax match Convention /\s\+$\| \+\ze\t/ containedin=ALL
1066 " autocmd InsertEnter * syntax clear Convention
1061 " autocmd BufEnter,InsertLeave * execute ':syntax match Convention /\%>'.&textwidth.'v./ containedin=ALL' 1067 " autocmd BufEnter,InsertLeave * execute ':syntax match Convention /\%>'.&textwidth.'v./ containedin=ALL'
1062 1068
1063 autocmd InsertEnter * set colorcolumn=80,120 1069 autocmd InsertEnter * set colorcolumn=80,120
1064 autocmd InsertLeave * set colorcolumn& 1070 autocmd InsertLeave * set colorcolumn&
1065 " 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"
1066 1078
1067endfunction 1079endfunction
1068autocmd! ColorScheme * call ExtendColorTheme() 1080autocmd! ColorScheme * call ExtendColorTheme()
@@ -1074,6 +1086,7 @@ set termguicolors | " When on, uses highlight-guifg and highlight-guibg attribut
1074if filereadable(expand("~/.vimrc_background")) && filereadable(expand("~/.config/base16-shell/colortest")) 1086if filereadable(expand("~/.vimrc_background")) && filereadable(expand("~/.config/base16-shell/colortest"))
1075 let g:base16_shell_path="~/.config/base16-shell/scripts" 1087 let g:base16_shell_path="~/.config/base16-shell/scripts"
1076 let base16colorspace=256 1088 let base16colorspace=256
1089 let syntax_cmd="skip" " vim internal, use base16 and no default colors
1077 set background=dark 1090 set background=dark
1078 source ~/.vimrc_background 1091 source ~/.vimrc_background
1079else 1092else
@@ -1101,3 +1114,13 @@ autocmd VimEnter,WinEnter * exec ':set scrolljump='.winheight(0)/2
1101 1114
1102" display highlight group under the cursor 1115" display highlight group under the cursor
1103map <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
..