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