Browse files

Merge pull request #59 from originell/patch-1

Replace vim's auto-linebreak with highlighting of the 80th column.
  • Loading branch information...
2 parents e61e9d4 + 68428b4 commit 0e5e574787b32864c1ce4c345927426360108c7e @bbatsov bbatsov committed Oct 9, 2011
Showing with 12 additions and 6 deletions.
  1. +12 −6 README.md
View
18 README.md
@@ -183,16 +183,22 @@ wkhtmltopdf can be installed in one of two methods
* Emacs users might want to put this in their config
(e.g. `~/.emacs.d/init.el`):
- ```
+ ```el
(setq whitespace-line-count 80
whitespace-style '(lines))
```
* Vim users might want to put this in their config
(e.g. `~/.vimrc`):
- ```
- set textwidth=80
+ ```vim
+ " VIM 7.3+ has support for highlighting a specified column.
+ if exists('+colorcolumn')
+ set colorcolumn=80
+ else
+ " Emulate
+ au BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%80v.\+', -1)
+ endif
```
* Textmate
@@ -201,20 +207,20 @@ wkhtmltopdf can be installed in one of two methods
* Emacs users might want to put this in their config (ideally
combine this with the previous example):
- ```
+ ```el
(setq whitespace-style '(trailing space-before-tab
indentation space-after-tab))
```
* Vim users might want to put this in their `~/.vimrc`:
- ```
+ ```vim
autocmd BufWritePre * :%s/\s\+$//e
```
Or if you don't want vim to touch possibly vital space based files, use:
- ```
+ ```vim
set listchars+=trail:░
```

0 comments on commit 0e5e574

Please sign in to comment.