diff options
author | Max Christian Pohle | 2022-12-23 11:38:26 +0100 |
---|---|---|
committer | Max Christian Pohle | 2022-12-23 11:38:26 +0100 |
commit | 0904591145327fa2c6ca4d9bbe2b50ca6b60085a (patch) | |
tree | 2b9272dd5426ff8856b085436b8a88138ce23bd2 /vimrc-common | |
parent | 07797b39851da045aa1bfd0289de0858a1377c48 (diff) | |
download | vim-0904591145327fa2c6ca4d9bbe2b50ca6b60085a.tar.bz2 vim-0904591145327fa2c6ca4d9bbe2b50ca6b60085a.zip |
Refactored a tiny bit and added editorconfig
Diffstat (limited to 'vimrc-common')
-rw-r--r-- | vimrc-common | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/vimrc-common b/vimrc-common index 6f0d7af..6201d4b 100644 --- a/vimrc-common +++ b/vimrc-common | |||
@@ -4,25 +4,30 @@ | |||
4 | " project-local .vimrc file (activated with exrc setting) | 4 | " project-local .vimrc file (activated with exrc setting) |
5 | "======================================================================================================================= | 5 | "======================================================================================================================= |
6 | 6 | ||
7 | set exrc | " enable exrc, a specific .exrc per project, which can contain usual .vimrc commands | ||
8 | set modeline | " set variables specific to a file, like indentation by adding a comment | ||
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 | ||
11 | set virtualedit=all | " virtual edit should be default behaviour, because I don't see any reason against | ||
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) | ||
14 | set hlsearch incsearch | " highlight pattern while entering it (performance wise this isn't that good) | ||
15 | " set cindent cinoptions+=(0 | " indent at parentheses | ||
16 | |||
17 | set path+=** | " allow recursive searches for files | ||
18 | let &path = &path.",/usr/lib/modules/".substitute(system('uname -r'), "\n", "", "")."/build/include" | ||
19 | |||
20 | filetype on | 7 | filetype on |
21 | filetype plugin on | 8 | filetype plugin on |
22 | filetype indent on | 9 | filetype indent on |
23 | 10 | ||
24 | syntax on | " enable syntax highlighting | 11 | syntax on | " enable syntax highlighting |
25 | syntax sync minlines=60 | " how many preceding lines will be parsed? (has performance impact) | 12 | syntax sync minlines=60 | " how many preceding lines will be parsed? (has performance impact) |
13 | |||
14 | set secure | " to ensure, that modelines do not contain executable code | ||
15 | set noexrc | " exrc was nice, but has too many security problems. Now using editorconfig instead (see plugins) | ||
16 | set modeline | " set variables specific to a file, like indentation by adding a comment (TODO: should probably be replaced by editorconfig) | ||
17 | set ts=4 sts=4 sw=4 expandtab textwidth=0 | " better done with a modeline or local exrc | ||
18 | set virtualedit=all | " virtual edit should be default behaviour, because I don't see any reason against | ||
19 | set number norelativenumber | " do not show numbers by default, because that causes a performance loss, instead activate them on a file type basis | ||
20 | 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) | ||
21 | set hlsearch incsearch | " highlight pattern while entering it (performance wise this isn't that good) | ||
22 | " set cindent cinoptions+=(0 | " indent at parentheses | ||
23 | |||
24 | |||
25 | "======================================================================================================================= | ||
26 | " PATH -- where to search for includes (e.g. `gf` or `:find`) | ||
27 | "======================================================================================================================= | ||
28 | set path+=** | " allow recursive searches for files | ||
29 | let &path = &path.",/usr/lib/modules/".substitute(system('uname -r'), "\n", "", "")."/build/include" | " TODO: could fail under windows (no uname) | ||
30 | |||
26 | 31 | ||
27 | "======================================================================================================================= | 32 | "======================================================================================================================= |
28 | " SPELL_CHECKING: | 33 | " SPELL_CHECKING: |