]> gitweb.factorcode.org Git - factor.git/blobdiff - misc/vim/ftplugin/factor.vim
misc/vim: some minor fixes.
[factor.git] / misc / vim / ftplugin / factor.vim
index bb34b3a60d769014094c75d34690e682b6fb686d..ca8df689c53ab2fd1fc5e39b6005b1531417504e 100644 (file)
@@ -15,14 +15,17 @@ let b:did_ftplugin = 1
 " 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
+" Try to limit lines to 64 characters.
+setlocal textwidth=64
+augroup factorTextWidth
+    au!
+    au BufEnter <buffer> 2match Error /\%>64v.\+/
+    au BufLeave <buffer> 2match none
+augroup END
 
 " Teach Vim what comments look like.
 setlocal comments+=b:!,b:#!
+
+" Make all of these characters part of a word (useful for skipping
+" over words with w, e, and b)
+setlocal iskeyword=33-126,128-255