ref: da60fc0b0a52e7d9b3aa16e37d81634860d441cf
parent: 493194672320732fd03e28f489672d76f4a9d58d
author: Simon Howard <fraggle@soulsphere.org>
date: Sat Feb 16 15:32:19 EST 2019
HACKING: Add section with config for Vim, Emacs. It makes sense to have some instructions for these editors since they are popular.
--- a/HACKING.md
+++ b/HACKING.md
@@ -125,6 +125,27 @@
}
```
+## Editor-specific default settings
+
+If you use vim, you can put this into your `.vimrc` (or install the
+`localvimrc` script):
+```
+set expandtab
+set tabstop=8
+set softtabstop=4
+set shiftwidth=4
+```
+Or, if you use Emacs, put this in your `.emacs`:
+``lisp
+(add-hook 'c-mode-hook (lambda ()
+ (when (and buffer-file-name
+ (string-match "chocolate-doom" buffer-file-name))
+ (c-set-style "bsd")
+ (setq indent-tabs-mode nil)
+ (setq tab-width 8)
+ (setq c-basic-offset 4))))
+```
+
## Security
The C standard library has a number of unsafe functions that should be