Add more Vim support files.

db4
Tim Allen 2009-01-14 00:39:35 +11:00 committed by Slava Pestov
parent 2e731c63f2
commit 8998f21aa6
3 changed files with 22 additions and 0 deletions

View File

@ -9,6 +9,10 @@ into ~/.vim/ or the equivalent path on other platforms (Open Vim and type
The current set of files is as follows:
ftdetect/factor.vim
Teach Vim when to load Factor support files.
ftplugin/factor_settings.vim
Teach Vim to follow the Factor Coding Style guidelines.
syntax/factor.vim
Syntax highlighting for Factor code.

View File

@ -0,0 +1 @@
autocmd BufRead,BufNewFile *.factor,{,.}factor*-rc set filetype=factor

View File

@ -0,0 +1,17 @@
" Code formatting settings loosely adapted from:
" http://concatenative.org/wiki/view/Factor/Coding%20Style
" Tabs are not allowed in Factor source files; use four spaces instead.
setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4
" Try to limit lines to 64 characters, except for documentation, which can be
" any length.
if expand("%:t") !~ "-docs\.factor$"
setlocal textwidth=64
" Mark anything in column 64 or beyond as a syntax error.
match Error /\%>63v.\+/
endif
" Teach Vim what comments look like.
setlocal comments+=b:!,b:#!