summaryrefslogtreecommitdiffstats
path: root/runtime/ftplugin
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-09-22 14:42:24 +0200
committerBram Moolenaar <Bram@vim.org>2013-09-22 14:42:24 +0200
commitbaca7f705babaa1caeb0bce7f63f6275feca6641 (patch)
treeab045d9c9d5f5d0287b2b002337f2a41291cd629 /runtime/ftplugin
parent595cad2ea1c77c40a34a240c71290fdef6aabd3b (diff)
Update runtime files. Add support for J.
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r--runtime/ftplugin/clojure.vim61
-rw-r--r--runtime/ftplugin/j.vim17
2 files changed, 48 insertions, 30 deletions
diff --git a/runtime/ftplugin/clojure.vim b/runtime/ftplugin/clojure.vim
index 91aba80f10..2b935a577e 100644
--- a/runtime/ftplugin/clojure.vim
+++ b/runtime/ftplugin/clojure.vim
@@ -1,22 +1,23 @@
" Vim filetype plugin file
-" Language: Clojure
-" Author: Meikel Brandmeyer <mb@kotka.de>
+" Language: Clojure
+" Author: Meikel Brandmeyer <mb@kotka.de>
"
-" Maintainer: Sung Pae <self@sungpae.com>
-" URL: https://github.com/guns/vim-clojure-static
-" License: Same as Vim
-" Last Change: 30 January 2013
+" Maintainer: Sung Pae <self@sungpae.com>
+" URL: https://github.com/guns/vim-clojure-static
+" License: Same as Vim
+" Last Change: 08 September 2013
-" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
- finish
+ finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
-let b:undo_ftplugin = 'setlocal define< formatoptions< comments< commentstring<'
+let b:undo_ftplugin = 'setlocal iskeyword< define< formatoptions< comments< commentstring<'
+
+setlocal iskeyword+=?,-,*,!,+,/,=,<,>,.,:,$
" There will be false positives, but this is better than missing the whole set
" of user-defined def* definitions.
@@ -35,10 +36,10 @@ setlocal commentstring=;\ %s
" 'completefunc' so that the user has some form of completion available when
" 'omnifunc' is set and no REPL connection exists.
for s:setting in ['omnifunc', 'completefunc']
- if exists('&' . s:setting) && empty(eval('&' . s:setting))
- execute 'setlocal ' . s:setting . '=clojurecomplete#Complete'
- let b:undo_ftplugin .= ' | setlocal ' . s:setting . '<'
- endif
+ if exists('&' . s:setting) && empty(eval('&' . s:setting))
+ execute 'setlocal ' . s:setting . '=clojurecomplete#Complete'
+ let b:undo_ftplugin .= ' | setlocal ' . s:setting . '<'
+ endif
endfor
" Take all directories of the CLOJURE_SOURCE_DIRS environment variable
@@ -46,34 +47,34 @@ endfor
"
" This is a legacy option for VimClojure users.
if exists('$CLOJURE_SOURCE_DIRS')
- for s:dir in split($CLOJURE_SOURCE_DIRS, (has("win32") || has("win64")) ? ';' : ':')
- let s:dir = fnameescape(s:dir)
- " Whitespace escaping for Windows
- let s:dir = substitute(s:dir, '\', '\\\\', 'g')
- let s:dir = substitute(s:dir, '\ ', '\\ ', 'g')
- execute "setlocal path+=" . s:dir . "/**"
- endfor
- let b:undo_ftplugin .= ' | setlocal path<'
+ for s:dir in split($CLOJURE_SOURCE_DIRS, (has("win32") || has("win64")) ? ';' : ':')
+ let s:dir = fnameescape(s:dir)
+ " Whitespace escaping for Windows
+ let s:dir = substitute(s:dir, '\', '\\\\', 'g')
+ let s:dir = substitute(s:dir, '\ ', '\\ ', 'g')
+ execute "setlocal path+=" . s:dir . "/**"
+ endfor
+ let b:undo_ftplugin .= ' | setlocal path<'
endif
" Skip brackets in ignored syntax regions when using the % command
if exists('loaded_matchit')
- let b:match_words = &matchpairs
- let b:match_skip = 's:comment\|string\|regex\|character'
- let b:undo_ftplugin .= ' | unlet! b:match_words b:match_skip'
+ let b:match_words = &matchpairs
+ let b:match_skip = 's:comment\|string\|regex\|character'
+ let b:undo_ftplugin .= ' | unlet! b:match_words b:match_skip'
endif
" Win32 can filter files in the browse dialog
if has("gui_win32") && !exists("b:browsefilter")
- let b:browsefilter = "Clojure Source Files (*.clj)\t*.clj\n" .
- \ "ClojureScript Source Files (*.cljs)\t*.cljs\n" .
- \ "Java Source Files (*.java)\t*.java\n" .
- \ "All Files (*.*)\t*.*\n"
- let b:undo_ftplugin .= ' | unlet! b:browsefilter'
+ let b:browsefilter = "Clojure Source Files (*.clj)\t*.clj\n" .
+ \ "ClojureScript Source Files (*.cljs)\t*.cljs\n" .
+ \ "Java Source Files (*.java)\t*.java\n" .
+ \ "All Files (*.*)\t*.*\n"
+ let b:undo_ftplugin .= ' | unlet! b:browsefilter'
endif
let &cpo = s:cpo_save
unlet! s:cpo_save s:setting s:dir
-" vim:sts=4 sw=4 et:
+" vim:sts=8:sw=8:ts=8:noet
diff --git a/runtime/ftplugin/j.vim b/runtime/ftplugin/j.vim
new file mode 100644
index 0000000000..8e3bc67edc
--- /dev/null
+++ b/runtime/ftplugin/j.vim
@@ -0,0 +1,17 @@
+" Vim filetype plugin
+" Language: J
+" Maintainer: David Bürgin <676c7473@gmail.com>
+" Last Change: 2013-09-21
+
+if exists("b:did_ftplugin")
+ finish
+endif
+let b:did_ftplugin = 1
+
+setlocal iskeyword=48-57,65-90,_,97-122
+setlocal comments=:NB.
+setlocal commentstring=NB.\ %s
+setlocal formatoptions-=t formatoptions+=croql
+setlocal shiftwidth=2 softtabstop=2 expandtab
+
+let b:undo_ftplugin = "setl et< sts< sw< fo< cms< com< isk<"