summaryrefslogtreecommitdiffstats
path: root/doc/coding/coding-style
diff options
context:
space:
mode:
authorSimon Rettberg2013-12-16 20:26:12 +0100
committerSimon Rettberg2013-12-16 20:26:12 +0100
commit498b199fa5240c8aa27a2704708d1eb098bf3105 (patch)
tree5c4489b6a8294c2f8abb18e4a0723d787969503e /doc/coding/coding-style
parent[pam-offenburg] Adapt to new pam_script_* format (diff)
downloadtm-scripts-498b199fa5240c8aa27a2704708d1eb098bf3105.tar.gz
tm-scripts-498b199fa5240c8aa27a2704708d1eb098bf3105.tar.xz
tm-scripts-498b199fa5240c8aa27a2704708d1eb098bf3105.zip
Some docs about coding
Diffstat (limited to 'doc/coding/coding-style')
-rw-r--r--doc/coding/coding-style27
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/coding/coding-style b/doc/coding/coding-style
new file mode 100644
index 00000000..b3658ef8
--- /dev/null
+++ b/doc/coding/coding-style
@@ -0,0 +1,27 @@
+Some guidelines
+
+-- 1. Leading Tabs, no spaces.
+.vimrc:
+set noexpandtab
+set tabstop=<spaces to display per tab>
+set autoindent
+
+If you want to see leading/trailing spaces:
+highlight ExtraWhitespace ctermbg=red guibg=red
+match ExtraWhitespace /^\t*\zs \+\|\s\+\%#\@<!$/
+
+
+-- 2. ALL_CAPS_VARIABLE_NAMES
+Variable names should be in caps. You can use lowercase
+in for statements, like "for i in $SOME_STUFF; do"
+Some old scripts haven't been updated yet....
+
+
+-- 3. "do", "then" ... on the same line
+for i in x; do
+if [ xyz ]; then
+
+
+-- 4.
+
+