-
Notifications
You must be signed in to change notification settings - Fork 22
/
HACKING
31 lines (24 loc) · 1.06 KB
/
HACKING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
* Some notes if you want to hack on this and submit pull requests:
If you use Emacs, please set indent-tab-modes to nil and run M-x
whitespace-cleanup on files before submitting pull requests. (If you
want to be hardcore, add whitespace-cleanup to before-save-hook to do
it all the time.) If you don't use Emacs, please do your best to
remove trailing spaces from lines. This reduces the number of lines of
diff output we need to look at be removing all changes due to
unimportant (and invisible) changes in spacing.
* If you use VIM:
Add the following to your ~/.vimrc file, as you like, removing the
lines that start with the `-` character.
- 4 space tabs
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
- Remove trailing whitespaces on save (:w)
autocmd BufWritePre * :%s/\s\+$//e
- Highlight trailing whitespace
highlight ExtraWhitespace ctermbg=red guibg=red
au ColorScheme * highlight ExtraWhitespace guibg=red
au BufEnter * match ExtraWhitespace /\s\+$/
au InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
au InsertLeave * match ExtraWhiteSpace /\s\+$/