]> gitweb.factorcode.org Git - factor.git/blob - misc/vim/ftplugin/factor.vim
misc/vim: some minor fixes.
[factor.git] / misc / vim / ftplugin / factor.vim
1 " Vim filetype plugin file
2 " Language: Factor
3 " Maintainer: Tim Allen <screwtape@froup.com>
4 " Last Change: 2011 Apr 05
5
6 " Only do this when not done yet for this buffer
7 if exists("b:did_ftplugin")
8     finish
9 endif
10 let b:did_ftplugin = 1
11
12 " Code formatting settings loosely adapted from:
13 " http://concatenative.org/wiki/view/Factor/Coding%20Style
14
15 " Tabs are not allowed in Factor source files; use four spaces instead.
16 setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4
17
18 " Try to limit lines to 64 characters.
19 setlocal textwidth=64
20 augroup factorTextWidth
21     au!
22     au BufEnter <buffer> 2match Error /\%>64v.\+/
23     au BufLeave <buffer> 2match none
24 augroup END
25
26 " Teach Vim what comments look like.
27 setlocal comments+=b:!,b:#!
28
29 " Make all of these characters part of a word (useful for skipping
30 " over words with w, e, and b)
31 setlocal iskeyword=33-126,128-255