mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Add some notes about vim settings for our style
Basic vim settings to mostly follow our coding style. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a6024f50d8
commit
5bbe931b6c
1 changed files with 29 additions and 0 deletions
29
CodingStyle
29
CodingStyle
|
@ -197,3 +197,32 @@ instead of ctrl on your Mac)
|
||||||
<value type="QString">Subsurface</value>
|
<value type="QString">Subsurface</value>
|
||||||
</data>
|
</data>
|
||||||
</qtcreator>
|
</qtcreator>
|
||||||
|
|
||||||
|
|
||||||
|
Vim
|
||||||
|
---------
|
||||||
|
|
||||||
|
As everybody knows vim is a way better editor than emacs and tus needs to be
|
||||||
|
in this file to. Put this into your .vimrc and this should produce something
|
||||||
|
close to our coding standards.
|
||||||
|
|
||||||
|
" Subsurface coding style
|
||||||
|
filetype plugin indent on
|
||||||
|
filetype detect
|
||||||
|
set cindent tabstop=8 shiftwidth=8 cinoptions=l1,:0
|
||||||
|
" TODO: extern "C" gets indented
|
||||||
|
" TODO: content of class blocks gets indented
|
||||||
|
|
||||||
|
" And some sane defaults, optional, but quite nice
|
||||||
|
set nocompatible
|
||||||
|
syntax on
|
||||||
|
colorscheme default
|
||||||
|
|
||||||
|
" The default blue is just impossible to see on a black terminal
|
||||||
|
highlight Comment ctermfg=Brown
|
||||||
|
|
||||||
|
" clearly point out when someone have trailing spaces
|
||||||
|
highlight ExtraWhitespace ctermbg=red guibg=red
|
||||||
|
|
||||||
|
" Show trailing whitespace and spaces before a tab:
|
||||||
|
match ExtraWhitespace /\s\+$\| \+\ze\t/
|
||||||
|
|
Loading…
Reference in a new issue