summaryrefslogtreecommitdiffstats
path: root/CodingStyle
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-02-27 22:42:10 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-27 18:55:17 -0800
commit5bbe931b6cc5a98b1d3e78aa5473a918fb60c7ec (patch)
tree23394f23b17f73752afd6ebfc84d71e56c283a7f /CodingStyle
parenta6024f50d84dd411ce408e0f8ebfa34c5b30064f (diff)
downloadsubsurface-5bbe931b6cc5a98b1d3e78aa5473a918fb60c7ec.tar.gz
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>
Diffstat (limited to 'CodingStyle')
-rw-r--r--CodingStyle29
1 files changed, 29 insertions, 0 deletions
diff --git a/CodingStyle b/CodingStyle
index a3e4fd17e..04fe7f563 100644
--- a/CodingStyle
+++ b/CodingStyle
@@ -197,3 +197,32 @@ instead of ctrl on your Mac)
<value type="QString">Subsurface</value>
</data>
</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/