diff options
Diffstat (limited to 'vimrc-common')
-rw-r--r-- | vimrc-common | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/vimrc-common b/vimrc-common index 239cc91..6f0d7af 100644 --- a/vimrc-common +++ b/vimrc-common | |||
@@ -9,7 +9,7 @@ set modeline | " set variables specific to a file, like ind | |||
9 | set textwidth=0 | " better done with modeline or local exrc and not here | 9 | set textwidth=0 | " better done with modeline or local exrc and not here |
10 | set ts=4 sts=4 sw=4 expandtab | " better done with a modeline or local exrc | 10 | set ts=4 sts=4 sw=4 expandtab | " better done with a modeline or local exrc |
11 | set virtualedit=all | " virtual edit should be default behaviour, because I don't see any reason against | 11 | set virtualedit=all | " virtual edit should be default behaviour, because I don't see any reason against |
12 | set nonumber norelativenumber | " do not show numbers by default, because that causes a performance loss, instead activate them on a file type basis | 12 | set number norelativenumber | " do not show numbers by default, because that causes a performance loss, instead activate them on a file type basis |
13 | set ignorecase smartcase | " 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) | 13 | set ignorecase smartcase | " 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) |
14 | set hlsearch incsearch | " highlight pattern while entering it (performance wise this isn't that good) | 14 | set hlsearch incsearch | " highlight pattern while entering it (performance wise this isn't that good) |
15 | " set cindent cinoptions+=(0 | " indent at parentheses | 15 | " set cindent cinoptions+=(0 | " indent at parentheses |
@@ -78,9 +78,9 @@ if has("multi_byte") | |||
78 | 78 | ||
79 | set listchars+=tab:▏\ | " | 79 | set listchars+=tab:▏\ | " |
80 | set listchars+=trail:· | " symbols used when using :set list (which displays non-printable chars) | 80 | set listchars+=trail:· | " symbols used when using :set list (which displays non-printable chars) |
81 | " set listchars+=eol:↲ | " symbols used when using :set list (which displays non-printable chars) | 81 | " set listchars+=eol:↲ | " symbols used when using :set list (which displays non-printable chars) |
82 | " set listchars+=space:· | " symbols used when using :set list (which displays non-printable chars) | 82 | " set listchars+=space:⸳ | " · | " symbols used when using :set list (which displays non-printable chars) |
83 | "set showbreak+=› | " symbol used in the beginning of a wrapped line | 83 | set showbreak+=› | " symbol used in the beginning of a wrapped line |
84 | 84 | ||
85 | " automatically enter list mode when going in insert mode (makes above syntax command temporarily ineffective) | 85 | " automatically enter list mode when going in insert mode (makes above syntax command temporarily ineffective) |
86 | set nolist | 86 | set nolist |
@@ -100,7 +100,7 @@ end | |||
100 | " SETTINGS: | 100 | " SETTINGS: |
101 | " ====================================================================================================================== | 101 | " ====================================================================================================================== |
102 | set breakindent | " Every wrapped line will continue visually indented | 102 | set breakindent | " Every wrapped line will continue visually indented |
103 | set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well) | 103 | " set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well) |
104 | set concealcursor=nc | " limits the display of concealed text to normal and command mode | 104 | set concealcursor=nc | " limits the display of concealed text to normal and command mode |
105 | set conceallevel=2 | " replace escaped chars by their UTF-8 representation (useful for LaTeX) | 105 | set conceallevel=2 | " replace escaped chars by their UTF-8 representation (useful for LaTeX) |
106 | set confirm | " asks 'do you want to save?' | 106 | set confirm | " asks 'do you want to save?' |
@@ -125,7 +125,7 @@ set shiftround | " indent/un-indent snaps to multiple of shiftwid | |||
125 | set writedelay=0 | 125 | set writedelay=0 |
126 | 126 | ||
127 | " display and performance | 127 | " display and performance |
128 | set lazyredraw | " disables redraw during macro execution (improves performance) | 128 | set lazyredraw | " disables redraw during macro execution (improves performance, but causes problems with solid backgrounds) |
129 | set cmdheight=2 | " sets the command line's height | 129 | set cmdheight=2 | " sets the command line's height |
130 | set signcolumn=auto | " auto=auto hide, yes=always, no=never show the column with error indicators | 130 | set signcolumn=auto | " auto=auto hide, yes=always, no=never show the column with error indicators |
131 | set nocursorcolumn | " turn visual cursor column off (improves performance) | 131 | set nocursorcolumn | " turn visual cursor column off (improves performance) |
@@ -156,7 +156,7 @@ set tags+=../tags | |||
156 | " code folding... | 156 | " code folding... |
157 | set nofoldenable | " disable folding, because we have zi to toggle foldenable :) | 157 | set nofoldenable | " disable folding, because we have zi to toggle foldenable :) |
158 | set foldclose=all | " automatically fold, when the cursor leaves the folded area | 158 | set foldclose=all | " automatically fold, when the cursor leaves the folded area |
159 | set foldcolumn=2 | " I think I don't need this second indicator | 159 | set foldcolumn=0 | " I think I don't need this second indicator |
160 | " set numberwidth=5 | 160 | " set numberwidth=5 |
161 | " set foldmethod=syntax | " foldlevel: syntax, indent, manual / foldmethod=syntax makes Vim incredible slow | 161 | " set foldmethod=syntax | " foldlevel: syntax, indent, manual / foldmethod=syntax makes Vim incredible slow |
162 | set foldnestmax=1 | " top level folding only | 162 | set foldnestmax=1 | " top level folding only |
@@ -199,7 +199,6 @@ set nocursorline | " turn visual cursor line off (improves performa | |||
199 | "======================================================================================================================= | 199 | "======================================================================================================================= |
200 | if has("autocmd") | 200 | if has("autocmd") |
201 | " use the shada/viminfo file to return the cursor to where it was... | 201 | " use the shada/viminfo file to return the cursor to where it was... |
202 | autocmd BufReadPost * call setpos(".", getpos("'\"")) | ||
203 | autocmd BufWinEnter * if &previewwindow | setlocal nonumber nolist signcolumn=no filetype=c nobuflisted | endif | 202 | autocmd BufWinEnter * if &previewwindow | setlocal nonumber nolist signcolumn=no filetype=c nobuflisted | endif |
204 | 203 | ||
205 | " Workaround: Allows Vim to yank text within wayland | 204 | " Workaround: Allows Vim to yank text within wayland |
@@ -343,10 +342,10 @@ augroup KEYBOARD_MAPPING | |||
343 | 342 | ||
344 | " if the wildmenu is configured to to display suggestions vertically, then | 343 | " if the wildmenu is configured to to display suggestions vertically, then |
345 | " reconfigure the cursor keys to work in that direction | 344 | " reconfigure the cursor keys to work in that direction |
346 | if &wildoptions =~# 'pum' | 345 | " if &wildoptions =~# 'pum' |
347 | cnoremap <expr> <up> pumvisible() ? "<C-p>" : "\<up>" | 346 | " cnoremap <expr> <up> pumvisible() ? "<C-p>" : "\<up>" |
348 | cnoremap <expr> <down> pumvisible() ? "<C-n>" : "\<down>" | 347 | " cnoremap <expr> <down> pumvisible() ? "<C-n>" : "\<down>" |
349 | endif | 348 | " endif |
350 | 349 | ||
351 | 350 | ||
352 | " INSERT_MODE_MAPPINGS: | 351 | " INSERT_MODE_MAPPINGS: |