Skip to content
Snippets Groups Projects
Commit baca7f70 authored by Bram Moolenaar's avatar Bram Moolenaar
Browse files

Update runtime files. Add support for J.

parent 595cad2e
No related branches found
No related tags found
No related merge requests found
Showing
with 1159 additions and 1375 deletions
" Vim completion script
" Language: Clojure
" Maintainer: Sung Pae <self@sungpae.com>
" URL: https://github.com/guns/vim-clojure-static
" License: Same as Vim
" Last Change: 05 February 2013
" Language: Clojure
" Maintainer: Sung Pae <self@sungpae.com>
" URL: https://github.com/guns/vim-clojure-static
" License: Same as Vim
" Last Change: 08 September 2013
" Special forms and public vars in clojure.core
" Generated from https://github.com/guns/vim-clojure-static/blob/vim-release-002/vim_clojure_static.clj
" Clojure 1.5.0-RC6
let s:words = ["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-readably*","*read-eval*","*read-whitelist*","*source-path*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods",".","..","/","<","<=","=","==",">",">=","EMPTY-NODE","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc!","assoc","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","booleans","bound-fn","bound-fn*","bound?","butlast","byte","byte-array","bytes","case","cast","catch","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","concat","cond","cond->","cond->>","condp","conj!","conj","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","def","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj!","disj","dissoc!","dissoc","distinct","distinct?","do","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","doubles","drop","drop-last","drop-while","empty","empty?","ensure","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","finally","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","hash","hash-combine","hash-map","hash-set","identical?","identity","if","if-let","if-not","ifn?","import","in-ns","inc","inc'","init-proxy","instance?","int","int-array","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mod","monitor-enter","monitor-exit","munge","name","namespace","namespace-munge","neg?","new","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop!","pop","pop-thread-bindings","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","quot","quote","rand","rand-int","rand-nth","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","realized?","recur","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seque","sequence","sequential?","set!","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","slurp","some","some->","some->>","some-fn","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","symbol","symbol?","sync","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","throw","time","to-array","to-array-2d","trampoline","transient","tree-seq","true?","try","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","update-in","update-proxy","use","val","vals","var","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","when","when-first","when-let","when-not","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"]
" Generated from https://github.com/guns/vim-clojure-static/blob/vim-release-005/clj/src/vim_clojure_static/generate.clj
" Clojure version 1.5.1
let s:words = ["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-readably*","*read-eval*","*source-path*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods",".","..","/","<","<=","=","==",">",">=","EMPTY-NODE","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc!","assoc","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","booleans","bound-fn","bound-fn*","bound?","butlast","byte","byte-array","bytes","case","cast","catch","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","concat","cond","cond->","cond->>","condp","conj!","conj","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","def","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj!","disj","dissoc!","dissoc","distinct","distinct?","do","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","doubles","drop","drop-last","drop-while","empty","empty?","ensure","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","finally","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","hash","hash-combine","hash-map","hash-set","identical?","identity","if","if-let","if-not","ifn?","import","in-ns","inc","inc'","init-proxy","instance?","int","int-array","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mod","monitor-enter","monitor-exit","munge","name","namespace","namespace-munge","neg?","new","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop!","pop","pop-thread-bindings","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","quot","quote","rand","rand-int","rand-nth","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","realized?","recur","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seque","sequence","sequential?","set!","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","slurp","some","some->","some->>","some-fn","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","symbol","symbol?","sync","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","throw","time","to-array","to-array-2d","trampoline","transient","tree-seq","true?","try","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","update-in","update-proxy","use","val","vals","var","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","when","when-first","when-let","when-not","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"]
" Simple word completion omnifunc
function! clojurecomplete#Complete(findstart, base)
if a:findstart
return searchpos('\<', 'bnW', line('.'))[1] - 1
else
return { 'words': filter(copy(s:words), 'v:val =~ "\\V\\^' . a:base . '"') }
endif
if a:findstart
return searchpos('\<', 'bnW', line('.'))[1] - 1
else
return { 'words': filter(copy(s:words), 'v:val =~ "\\V\\^' . a:base . '"') }
endif
endfunction
" vim:sts=8:sw=8:ts=8:noet
......@@ -1126,7 +1126,7 @@ less than one line (the small delete register is used then). An exception is
made for the delete operator with these movement commands: |%|, |(|, |)|, |`|,
|/|, |?|, |n|, |N|, |{| and |}|. Register "1 is always used then (this is Vi
compatible). The "- register is used as well if the delete is within a line.
Note that these character may be mapped. E.g. |%| is mapped by the matchit
Note that these characters may be mapped. E.g. |%| is mapped by the matchit
plugin.
With each successive deletion or change, Vim shifts the previous contents
of register 1 into register 2, 2 into 3, and so forth, losing the previous
......
*diff.txt* For Vim version 7.4. Last change: 2013 Jul 07
*diff.txt* For Vim version 7.4. Last change: 2013 Sep 20
VIM REFERENCE MANUAL by Bram Moolenaar
......@@ -123,10 +123,14 @@ Since the option values are remembered with the buffer, you can edit another
file for a moment and come back to the same file and be in diff mode again.
*:diffo* *:diffoff*
:diffo[ff] Switch off diff mode for the current window.
:diffo[ff] Switch off diff mode for the current window. Resets related
options also when 'diff' was not set.
:diffo[ff]! Switch off diff mode for the current window and in all windows
in the current tab page where 'diff' is set.
in the current tab page where 'diff' is set. Resetting
related options only happens in a window that has 'diff' set,
if the current window does not have 'diff' set then no options
in it are changed.
The ":diffoff" command resets the relevant options to the values they had when
using |:diffsplit|, |:diffpatch| , |:diffthis|. or starting Vim in diff mode.
......
......@@ -581,8 +581,8 @@ CLOJURE *ft-clojure-indent* *clojure-indent*
Clojure indentation differs somewhat from traditional Lisps, due in part to
the use of square and curly brackets, and otherwise by community convention.
These conventions are not always universally followed, so the Clojure indent
script offers a few configurable options, listed below.
These conventions are not universally followed, so the Clojure indent script
offers a few configurable options, listed below.
If the current vim does not include searchpairpos(), the indent script falls
back to normal 'lisp' indenting, and the following options are ignored.
......
......@@ -188,7 +188,7 @@ WINDOWS *vimball-windows*
* Changed silent! to sil! (shorter)
* Safed |'swf'| setting (during vimball extraction,
its now turned off)
32 : May 19, 2010 * (Christian Brabrandt) :so someplugin.vba and
32 : May 19, 2010 * (Christian Brabandt) :so someplugin.vba and
:so someplugin.vba.gz (and the other supported
compression types) now works
* (Jan Steffens) added support for xz compression
......
*todo.txt* For Vim version 7.4. Last change: 2013 Sep 05
*todo.txt* For Vim version 7.4. Last change: 2013 Sep 22
VIM REFERENCE MANUAL by Bram Moolenaar
......@@ -36,23 +36,47 @@ not be repeated below, unless there is extra information.
NFA engine mismatch, with example. (ZyX, 2013 Aug 29)
php syntax file update. (Jason Woofenden, Aug 30)
NFA engine difference, with test case. (Axel Bender, 2013 Sep 17)
Comments from Vlad Irnov Sep 18.
Problem positioning the cursor after auto-formatting without a comment. (Tor
Perkins, 2013 Sep 1)
Patch to fix test 92 and 93 failing in a bad way. (Hirohito Higashi, 2013 Sep
11)
Patch to fix using "p" in Visual block mode. (Christian Brabandt, 2013 Sep 19)
Using \1 in pattern goes one line too far. (Bohr Shaw, 2013 Sep 5)
Column is OK. "/\v(^.+\n)\1/e" (John Little, Sep 5)
Also, matches start of 2nd line, not the whole line.
Error for incomplete help argument. (John Beckett, 2013 Sep 12)
Popup menu: first item is not selected when typing more than one character?
Patch to add async functionality. (Geoff Greer, 2013 Sep 1)
Patch to avoid mouse cursor flickering. (Ken Takata,, 2013 Sep 2)
Patch to make zg and zb work better. (Christian Brabandt, 2013 Sep 8)
Patch to fix that VC10 does not stat() a symlink to a directory.
(Ken Takata,, 2013 Sep 20) Update Sep 21
Should win_redr_custom() not be allowed to use recursively?
(Yasuhiro Matsumoto, 2013 Aug 15)
NFA engine combining character mismatch. (glts, 2013 Aug 27)
Remark Dominique, Aug 27
Patch to make Tcl 8.6 work. (Issue 167)
Patch to make input() work while inside :normal. (Yasuhiro Matsumoto, 2013 Sep
19)
Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15)
Issue 164: freeze on regexp search.
Python: ":py raw_input('prompt')" doesn't work. (Manu Hack)
......@@ -61,7 +85,7 @@ Patch to fix substitute prompt with line number. (Benoit Pierre, 2013 Aug 27,
third message)
Patch to avoid problem with colon in file name. (Yasuhiro Matsumoto, 2013 Sep
5) Only copy file name when needed.
5) Only copy file name when needed: Sep 9.
Include systemverilog file? Two votes yes.
......@@ -69,6 +93,10 @@ Wrapping around end of file does not work for "." after "cgn". (Dimitar
Dimitrov)
Patch by Christian Brabandt, 2013 Aug 22
Clang error for integer overflow. (Dominique Pelle, 2013 Sep 21)
Patch to add v:hlsearch. (ZyX, 2013 Sep 22)
Problem with 'spellsuggest' file, only works for some words.
(Cesar Romani, 2013 Aug 20) Depends on file name? (Aug 24)
Additional remark by glts: the suggested words are marked bad?
......@@ -83,6 +111,11 @@ Patch to make has() check for Vim version and patch at the same time.
Several syntax file match "^\s*" which may get underlined if that's in the
highlight group. Add a "\zs" after it?
Win32: When a directory name contains an exclamation mark, completion doesn't
complete the contents of the directory. No escaping for the "!"? (Jan
Stocker, 2012 Jan 5; 2013 Aug 20)
Patch 2013 Sept 10, test: Sept 11.
Go through more coverity reports.
With "$" in 'cpoptions' the popup menu isn't fully drawn. (Matti Niemenmaa,
......@@ -99,7 +132,7 @@ Patches to fix this. (Ken Takata, 2013 Aug 9)
:help gives example for z?, but it does not work. m? and t? do work.
Patch to add funcref to Lua. (Luis Carvalho, 2013 Sep 4)
Missing tests.
With tests: Sep 5.
Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10)
......@@ -131,10 +164,6 @@ Works OK for echo, just not for ":call" and ":call call()". (Ted, 2011 Mar
Patch by Christian Brabandt, 2013 Mar 23.
Not 100% sure this is the right solution.
Win32: When a directory name contains an exclamation mark, completion doesn't
complete the contents of the directory. No escaping for the "!"? (Jan
Stocker, 2012 Jan 5; 2013 Aug 20)
Patch to support expression argument to sort() instead of a function name.
Yasuhiro Matsumoto, 2013 May 31.
Or should we add a more general mechanism, like lambda functions?
......@@ -184,6 +213,7 @@ Patch to make fold updates much faster. (Christian Brabandt, 2012 Dec)
TCL: With MSVC 2010 doesn't find Tcl_FindExecutable. (tux)
Patch to define it. (Ken Takata, 2013 Aug 12) Is this right?
Probably not: http://code.google.com/p/vim/issues/detail?id=167
MS-Windows: Patch to make tests copy files to avoid changing the fileformat of
the files under version control. (Taro Muraoka, 2013 Jul 5)
......@@ -992,8 +1022,6 @@ Also: swap files are in ~/tmp/ One has relative file name ".mozilla/...".
Add v:motion_force. (Kana Natsuno, 2008 Dec 6)
Maybe call it v:motiontype.
Runtime files for Clojure. (Toralf Wittner, 2008 Jun 25)
MS-Windows: editing the first, empty buffer, 'ffs' set to "unix,dos", ":enew"
doesn't set 'ff' to "unix". (Ben Fritz, 2008 Dec 5) Reusing the old buffer
probably causes this.
......
*undo.txt* For Vim version 7.4. Last change: 2013 Aug 22
*undo.txt* For Vim version 7.4. Last change: 2013 Sep 08
VIM REFERENCE MANUAL by Bram Moolenaar
......@@ -249,8 +249,9 @@ a simple scheme that maps filesystem paths directly to undo files. Vim will
detect if an undo file is no longer synchronized with the file it was written
for (with a hash of the file contents) and ignore it when the file was changed
after the undo file was written, to prevent corruption. An undo file is also
ignored if its owner differs from the owner of the edited file. Set 'verbose'
to get a message about that when opening a file.
ignored if its owner differs from the owner of the edited file, except when
the owner of the undo file is the current user. Set 'verbose' to get a
message about that when opening a file.
Undo files are normally saved in the same directory as the file. This can be
changed with the 'undodir' option.
......
......@@ -328,8 +328,8 @@ actually use Vim to convert a file. Example: >
*45.5* Entering language text
Computer keyboards don't have much more than a hundred keys. Some languages
have thousands of characters, Unicode has ten thousands. So how do you type
these characters?
have thousands of characters, Unicode has over hundred thousand. So how do
you type these characters?
First of all, when you don't use too many of the special characters, you
can use digraphs. This was already explained in |24.9|.
When you use a language that uses many more characters than keys on your
......
......@@ -2020,7 +2020,7 @@ File browser added *file-browser-5.2*
The Win32, Athena and Motif GUI bring up a file requester if the user asks to
":browse" for the ":e", ":w", ":r", ":so", ":redirect" and
":mkexrc/vimrc/vsess" commands. ::browse e /foo/bar" opens the requester in
":mkexrc/vimrc/vsess" commands. ":browse e /foo/bar" opens the requester in
the /foo/bar directory, so you can have nice mapping rhs's like ":browse so
$vim/macros". If no initial dir specified for ":browse e", can be compiled to
either begin in the current directory, or that of the current buffer. (Negri
......
......@@ -2395,7 +2395,7 @@ with special attributes were redrawn. Now only do this for characters that
actually are bold. Speeds up displaying considerably.
 
When only highlighting changes and the text is scrolled at the same time
everything is redraw instead of using a scroll and updating the changed text.
everything is redrawn instead of using a scroll and updating the changed text.
E.g., when using ":match" to highlight a paren that the cursor landed on.
Added SOME_VALID: Redraw the whole window but also try to scroll to minimize
redrawing.
......
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2013 Aug 03
" Last Change: 2013 Sep 22
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
......@@ -129,7 +129,7 @@ au BufNewFile,BufRead .asoundrc,*/usr/share/alsa/alsa.conf,*/etc/asound.conf set
au BufNewFile,BufRead *.aml setf aml
" APT config file
au BufNewFile,BufRead apt.conf setf aptconf
au BufNewFile,BufRead apt.conf setf aptconf
au BufNewFile,BufRead */.aptitude/config setf aptconf
au BufNewFile,BufRead */etc/apt/apt.conf.d/{[-_[:alnum:]]\+,[-_.[:alnum:]]\+.conf} setf aptconf
......@@ -952,6 +952,9 @@ au BufNewFile,BufRead inittab setf inittab
" Inno Setup
au BufNewFile,BufRead *.iss setf iss
" J
au BufNewFile,BufRead *.ijs setf j
" JAL
au BufNewFile,BufRead *.jal,*.JAL setf jal
......@@ -2092,7 +2095,7 @@ au BufNewFile,BufRead *.tak setf tak
" Task
au BufRead,BufNewFile {pending,completed,undo}.data setf taskdata
au BufRead,BufNewFile *.task setf taskedit
au BufRead,BufNewFile *.task setf taskedit
" Tcl (JACL too)
au BufNewFile,BufRead *.tcl,*.tk,*.itcl,*.itk,*.jacl setf tcl
......@@ -2217,12 +2220,12 @@ au BufNewFile,BufRead *.uc setf uc
au BufNewFile,BufRead */etc/updatedb.conf setf updatedb
" Upstart (init(8)) config files
au BufNewFile,BufRead */usr/share/upstart/*.conf setf upstart
au BufNewFile,BufRead */usr/share/upstart/*.override setf upstart
au BufNewFile,BufRead */usr/share/upstart/*.conf setf upstart
au BufNewFile,BufRead */usr/share/upstart/*.override setf upstart
au BufNewFile,BufRead */etc/init/*.conf,*/etc/init/*.override setf upstart
au BufNewFile,BufRead */.init/*.conf,*/.init/*.override setf upstart
au BufNewFile,BufRead */.config/upstart/*.conf setf upstart
au BufNewFile,BufRead */.config/upstart/*.override setf upstart
au BufNewFile,BufRead */.config/upstart/*.conf setf upstart
au BufNewFile,BufRead */.config/upstart/*.override setf upstart
" Vera
au BufNewFile,BufRead *.vr,*.vri,*.vrh setf vera
......
" 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
" 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<"
" Vim indent file
" Language: Clojure
" Author: Meikel Brandmeyer <mb@kotka.de>
" URL: http://kotka.de/projects/clojure/vimclojure.html
" Language: Clojure
" Author: Meikel Brandmeyer <mb@kotka.de>
" URL: http://kotka.de/projects/clojure/vimclojure.html
"
" 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
" TODO: Indenting after multibyte characters is broken:
" (let [Δ (if foo
" bar ; Indent error
" baz)])
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
finish
endif
let b:did_indent = 1
......@@ -25,290 +29,277 @@ setlocal indentkeys=!,o,O
if exists("*searchpairpos")
if !exists('g:clojure_maxlines')
let g:clojure_maxlines = 100
endif
if !exists('g:clojure_fuzzy_indent')
let g:clojure_fuzzy_indent = 1
endif
if !exists('g:clojure_fuzzy_indent_patterns')
let g:clojure_fuzzy_indent_patterns = ['^with', '^def', '^let']
endif
if !exists('g:clojure_fuzzy_indent_blacklist')
let g:clojure_fuzzy_indent_blacklist = ['-fn$', '\v^with-%(meta|out-str|loading-context)$']
endif
if !exists('g:clojure_special_indent_words')
let g:clojure_special_indent_words = 'deftype,defrecord,reify,proxy,extend-type,extend-protocol,letfn'
endif
if !exists('g:clojure_align_multiline_strings')
let g:clojure_align_multiline_strings = 0
endif
function! s:SynIdName()
return synIDattr(synID(line("."), col("."), 0), "name")
endfunction
function! s:CurrentChar()
return getline('.')[col('.')-1]
endfunction
function! s:CurrentWord()
return getline('.')[col('.')-1 : searchpos('\v>', 'n', line('.'))[1]-2]
endfunction
function! s:IsParen()
return s:CurrentChar() =~ '\v[\(\)\[\]\{\}]' &&
\ s:SynIdName() !~? '\vstring|comment'
endfunction
" Returns 1 if string matches a pattern in 'patterns', which may be a
" list of patterns, or a comma-delimited string of implicitly anchored
" patterns.
function! s:MatchesOne(patterns, string)
let list = type(a:patterns) == type([])
\ ? a:patterns
\ : map(split(a:patterns, ','), '"^" . v:val . "$"')
for pat in list
if a:string =~ pat | return 1 | endif
endfor
endfunction
function! s:SavePosition()
let [ _b, l, c, _o ] = getpos(".")
let b = bufnr("%")
return [b, l, c]
endfunction
function! s:RestorePosition(value)
let [b, l, c] = a:value
if bufnr("%") != b
execute b "buffer!"
endif
call setpos(".", [0, l, c, 0])
endfunction
function! s:MatchPairs(open, close, stopat)
" Stop only on vector and map [ resp. {. Ignore the ones in strings and
" comments.
if a:stopat == 0
let stopat = max([line(".") - g:clojure_maxlines, 0])
else
let stopat = a:stopat
endif
let pos = searchpairpos(a:open, '', a:close, 'bWn', "!s:IsParen()", stopat)
return [pos[0], virtcol(pos)]
endfunction
function! s:ClojureCheckForStringWorker()
" Check whether there is the last character of the previous line is
" highlighted as a string. If so, we check whether it's a ". In this
" case we have to check also the previous character. The " might be the
" closing one. In case the we are still in the string, we search for the
" opening ". If this is not found we take the indent of the line.
let nb = prevnonblank(v:lnum - 1)
if nb == 0
return -1
endif
call cursor(nb, 0)
call cursor(0, col("$") - 1)
if s:SynIdName() !~? "string"
return -1
endif
" This will not work for a " in the first column...
if s:CurrentChar() == '"'
call cursor(0, col("$") - 2)
if s:SynIdName() !~? "string"
return -1
endif
if s:CurrentChar() != '\\'
return -1
endif
call cursor(0, col("$") - 1)
endif
let p = searchpos('\(^\|[^\\]\)\zs"', 'bW')
if p != [0, 0]
return p[1] - 1
endif
return indent(".")
endfunction
function! s:CheckForString()
let pos = s:SavePosition()
try
let val = s:ClojureCheckForStringWorker()
finally
call s:RestorePosition(pos)
endtry
return val
endfunction
function! s:ClojureIsMethodSpecialCaseWorker(position)
" Find the next enclosing form.
call search('\S', 'Wb')
" Special case: we are at a '(('.
if s:CurrentChar() == '('
return 0
endif
call cursor(a:position)
let nextParen = s:MatchPairs('(', ')', 0)
" Special case: we are now at toplevel.
if nextParen == [0, 0]
return 0
endif
call cursor(nextParen)
call search('\S', 'W')
if g:clojure_special_indent_words =~ '\<' . s:CurrentWord() . '\>'
return 1
endif
return 0
endfunction
function! s:IsMethodSpecialCase(position)
let pos = s:SavePosition()
try
let val = s:ClojureIsMethodSpecialCaseWorker(a:position)
finally
call s:RestorePosition(pos)
endtry
return val
endfunction
function! GetClojureIndent()
" Get rid of special case.
if line(".") == 1
return 0
endif
" We have to apply some heuristics here to figure out, whether to use
" normal lisp indenting or not.
let i = s:CheckForString()
if i > -1
return i + !!g:clojure_align_multiline_strings
endif
call cursor(0, 1)
" Find the next enclosing [ or {. We can limit the second search
" to the line, where the [ was found. If no [ was there this is
" zero and we search for an enclosing {.
let paren = s:MatchPairs('(', ')', 0)
let bracket = s:MatchPairs('\[', '\]', paren[0])
let curly = s:MatchPairs('{', '}', bracket[0])
" In case the curly brace is on a line later then the [ or - in
" case they are on the same line - in a higher column, we take the
" curly indent.
if curly[0] > bracket[0] || curly[1] > bracket[1]
if curly[0] > paren[0] || curly[1] > paren[1]
return curly[1]
endif
endif
" If the curly was not chosen, we take the bracket indent - if
" there was one.
if bracket[0] > paren[0] || bracket[1] > paren[1]
return bracket[1]
endif
" There are neither { nor [ nor (, ie. we are at the toplevel.
if paren == [0, 0]
return 0
endif
" Now we have to reimplement lispindent. This is surprisingly easy, as
" soon as one has access to syntax items.
"
" - Check whether we are in a special position after a word in
" g:clojure_special_indent_words. These are special cases.
" - Get the next keyword after the (.
" - If its first character is also a (, we have another sexp and align
" one column to the right of the unmatched (.
" - In case it is in lispwords, we indent the next line to the column of
" the ( + sw.
" - If not, we check whether it is last word in the line. In that case
" we again use ( + sw for indent.
" - In any other case we use the column of the end of the word + 2.
call cursor(paren)
if s:IsMethodSpecialCase(paren)
return paren[1] + &shiftwidth - 1
endif
" In case we are at the last character, we use the paren position.
if col("$") - 1 == paren[1]
return paren[1]
endif
" In case after the paren is a whitespace, we search for the next word.
normal! l
if s:CurrentChar() == ' '
normal! w
endif
" If we moved to another line, there is no word after the (. We
" use the ( position for indent.
if line(".") > paren[0]
return paren[1]
endif
" We still have to check, whether the keyword starts with a (, [ or {.
" In that case we use the ( position for indent.
let w = s:CurrentWord()
if stridx('([{', w[0]) > -1
return paren[1]
endif
" Test words without namespace qualifiers and leading reader macro
" metacharacters.
"
" e.g. clojure.core/defn and #'defn should both indent like defn.
let ww = substitute(w, "\\v%(.*/|[#'`~@^,]*)(.*)", '\1', '')
if &lispwords =~ '\V\<' . ww . '\>'
return paren[1] + &shiftwidth - 1
endif
if g:clojure_fuzzy_indent
\ && !s:MatchesOne(g:clojure_fuzzy_indent_blacklist, ww)
\ && s:MatchesOne(g:clojure_fuzzy_indent_patterns, ww)
return paren[1] + &shiftwidth - 1
endif
normal! W
if paren[0] < line(".")
return paren[1] + &shiftwidth - 1
endif
normal! ge
return virtcol(".") + 1
endfunction
setlocal indentexpr=GetClojureIndent()
if !exists('g:clojure_maxlines')
let g:clojure_maxlines = 100
endif
if !exists('g:clojure_fuzzy_indent')
let g:clojure_fuzzy_indent = 1
endif
if !exists('g:clojure_fuzzy_indent_patterns')
let g:clojure_fuzzy_indent_patterns = ['^with', '^def', '^let']
endif
if !exists('g:clojure_fuzzy_indent_blacklist')
let g:clojure_fuzzy_indent_blacklist = ['-fn$', '\v^with-%(meta|out-str|loading-context)$']
endif
if !exists('g:clojure_special_indent_words')
let g:clojure_special_indent_words = 'deftype,defrecord,reify,proxy,extend-type,extend-protocol,letfn'
endif
if !exists('g:clojure_align_multiline_strings')
let g:clojure_align_multiline_strings = 0
endif
function! s:SynIdName()
return synIDattr(synID(line("."), col("."), 0), "name")
endfunction
function! s:CurrentChar()
return getline('.')[col('.')-1]
endfunction
function! s:CurrentWord()
return getline('.')[col('.')-1 : searchpos('\v>', 'n', line('.'))[1]-2]
endfunction
function! s:IsParen()
return s:CurrentChar() =~ '\v[\(\)\[\]\{\}]' &&
\ s:SynIdName() !~? '\vstring|regex|comment|character'
endfunction
" Returns 1 if string matches a pattern in 'patterns', which may be a
" list of patterns, or a comma-delimited string of implicitly anchored
" patterns.
function! s:MatchesOne(patterns, string)
let list = type(a:patterns) == type([])
\ ? a:patterns
\ : map(split(a:patterns, ','), '"^" . v:val . "$"')
for pat in list
if a:string =~ pat | return 1 | endif
endfor
endfunction
function! s:MatchPairs(open, close, stopat)
" Stop only on vector and map [ resp. {. Ignore the ones in strings and
" comments.
if a:stopat == 0
let stopat = max([line(".") - g:clojure_maxlines, 0])
else
let stopat = a:stopat
endif
let pos = searchpairpos(a:open, '', a:close, 'bWn', "!s:IsParen()", stopat)
return [pos[0], virtcol(pos)]
endfunction
function! s:ClojureCheckForStringWorker()
" Check whether there is the last character of the previous line is
" highlighted as a string. If so, we check whether it's a ". In this
" case we have to check also the previous character. The " might be the
" closing one. In case the we are still in the string, we search for the
" opening ". If this is not found we take the indent of the line.
let nb = prevnonblank(v:lnum - 1)
if nb == 0
return -1
endif
call cursor(nb, 0)
call cursor(0, col("$") - 1)
if s:SynIdName() !~? "string"
return -1
endif
" This will not work for a " in the first column...
if s:CurrentChar() == '"'
call cursor(0, col("$") - 2)
if s:SynIdName() !~? "string"
return -1
endif
if s:CurrentChar() != '\\'
return -1
endif
call cursor(0, col("$") - 1)
endif
let p = searchpos('\(^\|[^\\]\)\zs"', 'bW')
if p != [0, 0]
return p[1] - 1
endif
return indent(".")
endfunction
function! s:CheckForString()
let pos = getpos('.')
try
let val = s:ClojureCheckForStringWorker()
finally
call setpos('.', pos)
endtry
return val
endfunction
function! s:ClojureIsMethodSpecialCaseWorker(position)
" Find the next enclosing form.
call search('\S', 'Wb')
" Special case: we are at a '(('.
if s:CurrentChar() == '('
return 0
endif
call cursor(a:position)
let nextParen = s:MatchPairs('(', ')', 0)
" Special case: we are now at toplevel.
if nextParen == [0, 0]
return 0
endif
call cursor(nextParen)
call search('\S', 'W')
if g:clojure_special_indent_words =~ '\<' . s:CurrentWord() . '\>'
return 1
endif
return 0
endfunction
function! s:IsMethodSpecialCase(position)
let pos = getpos('.')
try
let val = s:ClojureIsMethodSpecialCaseWorker(a:position)
finally
call setpos('.', pos)
endtry
return val
endfunction
function! GetClojureIndent()
" Get rid of special case.
if line(".") == 1
return 0
endif
" We have to apply some heuristics here to figure out, whether to use
" normal lisp indenting or not.
let i = s:CheckForString()
if i > -1
return i + !!g:clojure_align_multiline_strings
endif
call cursor(0, 1)
" Find the next enclosing [ or {. We can limit the second search
" to the line, where the [ was found. If no [ was there this is
" zero and we search for an enclosing {.
let paren = s:MatchPairs('(', ')', 0)
let bracket = s:MatchPairs('\[', '\]', paren[0])
let curly = s:MatchPairs('{', '}', bracket[0])
" In case the curly brace is on a line later then the [ or - in
" case they are on the same line - in a higher column, we take the
" curly indent.
if curly[0] > bracket[0] || curly[1] > bracket[1]
if curly[0] > paren[0] || curly[1] > paren[1]
return curly[1]
endif
endif
" If the curly was not chosen, we take the bracket indent - if
" there was one.
if bracket[0] > paren[0] || bracket[1] > paren[1]
return bracket[1]
endif
" There are neither { nor [ nor (, ie. we are at the toplevel.
if paren == [0, 0]
return 0
endif
" Now we have to reimplement lispindent. This is surprisingly easy, as
" soon as one has access to syntax items.
"
" - Check whether we are in a special position after a word in
" g:clojure_special_indent_words. These are special cases.
" - Get the next keyword after the (.
" - If its first character is also a (, we have another sexp and align
" one column to the right of the unmatched (.
" - In case it is in lispwords, we indent the next line to the column of
" the ( + sw.
" - If not, we check whether it is last word in the line. In that case
" we again use ( + sw for indent.
" - In any other case we use the column of the end of the word + 2.
call cursor(paren)
if s:IsMethodSpecialCase(paren)
return paren[1] + &shiftwidth - 1
endif
" In case we are at the last character, we use the paren position.
if col("$") - 1 == paren[1]
return paren[1]
endif
" In case after the paren is a whitespace, we search for the next word.
call cursor(0, col('.') + 1)
if s:CurrentChar() == ' '
call search('\v\S', 'W')
endif
" If we moved to another line, there is no word after the (. We
" use the ( position for indent.
if line(".") > paren[0]
return paren[1]
endif
" We still have to check, whether the keyword starts with a (, [ or {.
" In that case we use the ( position for indent.
let w = s:CurrentWord()
if stridx('([{', w[0]) > -1
return paren[1]
endif
" Test words without namespace qualifiers and leading reader macro
" metacharacters.
"
" e.g. clojure.core/defn and #'defn should both indent like defn.
let ww = substitute(w, "\\v%(.*/|[#'`~@^,]*)(.*)", '\1', '')
if &lispwords =~ '\V\<' . ww . '\>'
return paren[1] + &shiftwidth - 1
endif
if g:clojure_fuzzy_indent
\ && !s:MatchesOne(g:clojure_fuzzy_indent_blacklist, ww)
\ && s:MatchesOne(g:clojure_fuzzy_indent_patterns, ww)
return paren[1] + &shiftwidth - 1
endif
call search('\v\_s', 'cW')
call search('\v\S', 'W')
if paren[0] < line(".")
return paren[1] + &shiftwidth - 1
endif
call search('\v\S', 'bW')
return virtcol(".") + 1
endfunction
setlocal indentexpr=GetClojureIndent()
else
" In case we have searchpairpos not available we fall back to
" normal lisp indenting.
setlocal indentexpr=
setlocal lisp
let b:undo_indent .= '| setlocal lisp<'
" In case we have searchpairpos not available we fall back to
" normal lisp indenting.
setlocal indentexpr=
setlocal lisp
let b:undo_indent .= '| setlocal lisp<'
endif
......@@ -390,9 +381,8 @@ setlocal lispwords+=while
" Exception handling
setlocal lispwords+=catch
setlocal lispwords+=try " For aesthetics when enclosing single line
let &cpo = s:save_cpo
unlet! s:save_cpo
" vim:sts=4 sw=4 et:
" vim:sts=8:sw=8:ts=8:noet
" Vim indent file
" Language: J
" Maintainer: David Bürgin <676c7473@gmail.com>
" Last Change: 2013-09-21
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal indentexpr=GetJIndent()
setlocal indentkeys-=0{,0},\:,0#
setlocal indentkeys+=0),=case.,=catch.,=catchd.,=catcht.,=do.,=else.,=elseif.,=end.,=fcase.
let b:undo_indent = "setl indk< inde<"
if exists("*GetJIndent")
finish
endif
function GetJIndent()
let prevlnum = prevnonblank(v:lnum-1)
if prevlnum == 0
return 0
endif
let indent = indent(prevlnum)
if getline(prevlnum) =~# '^\s*\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|fcase\|for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.'
if getline(prevlnum) !~# '\<end\.'
let indent += &shiftwidth
endif
endif
if getline(v:lnum) =~# '^\s*\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|end\|fcase\)\.'
let indent -= &shiftwidth
endif
return indent
endfunction
" Vim syntax file
" This is a GENERATED FILE. Please always refer to source file at the URI below.
" Language: Apache configuration (httpd.conf, srm.conf, access.conf, .htaccess)
" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
" Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
" License: This file can be redistribued and/or modified under the same terms
" as Vim itself.
" Last Change: 2006-12-13
" URL: http://trific.ath.cx/Ftp/vim/syntax/apache.vim
" Last Change: 2013-09-16
" Notes: Last synced with apache-2.2.3, version 1.x is no longer supported
" TODO: see particular FIXME's scattered through the file
" make it really linewise?
......@@ -30,7 +28,10 @@ syn keyword apacheFixme FIXME TODO XXX NOT
syn case ignore
syn match apacheAnything "\s[^>]*" contained
syn match apacheError "\w\+" contained
syn region apacheString start=+"+ end=+"+ skip=+\\\\\|\\\"+
syn region apacheString start=+"+ end=+"+ skip=+\\\\\|\\\"+ oneline
" Following is to prevent escaped quotes from being parsed as strings.
syn match apacheSkipQuote +\\"+
" Core and mpm
syn keyword apacheDeclaration AccessFileName AddDefaultCharset AllowOverride AuthName AuthType ContentDigest DefaultType DocumentRoot ErrorDocument ErrorLog HostNameLookups IdentityCheck Include KeepAlive KeepAliveTimeout LimitRequestBody LimitRequestFields LimitRequestFieldsize LimitRequestLine LogLevel MaxKeepAliveRequests NameVirtualHost Options Require RLimitCPU RLimitMEM RLimitNPROC Satisfy ScriptInterpreterSource ServerAdmin ServerAlias ServerName ServerPath ServerRoot ServerSignature ServerTokens TimeOut UseCanonicalName
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
" Vim syntax file
" Language: J
" Maintainer: David Bürgin <676c7473@gmail.com>
" Last Change: 2013-09-21
if exists("b:current_syntax")
finish
endif
syntax case match
syntax sync minlines=50
syn match jControl /\<\%(assert\|break\|case\|catch[dt]\=\|continue\|do\|else\%(if\)\=\|end\|fcase\|for\|if\|return\|select\|throw\|try\|whil\%(e\|st\)\)\./
syn match jControl /\<\%(for\|goto\|label\)_\a\k*\./
syn region jString oneline start=/'/ skip=/''/ end=/'/
" Patterns for numbers in general, rational numbers, numbers with explicit
" base, infinities, and numbers with extended precision.
"
" Matching J numbers is difficult. The regular expression used for the general
" case roughly embodies this grammar sketch:
"
" EXP := /_?\d+(\.\d*)?([eE]_?\d+)?/
" COMP := EXP | EXP (j|a[dr]) EXP
" PIEU := COMP | COMP [px] COMP
"
" For the rest, a compromise between correctness and practicality was made.
" See http://www.jsoftware.com/help/dictionary/dcons.htm for reference.
syn match jNumber /\<_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(\%(j\|a[dr]\)_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\)\=\%([px]_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(\%(j\|a[dr]\)_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\)\=\)\=/
syn match jNumber /\<_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=r_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=/
syn match jNumber /\<_\=\d\+\%([eE]\d\+\)\=b_\=[0-9a-z]\+/
syn match jNumber /\<__\=\>/
syn match jNumber /\<_\=\d\+x\>/
syn match jComment /NB\..*$/
hi def link jControl Statement
hi def link jString String
hi def link jNumber Number
hi def link jComment Comment
let b:current_syntax = "j"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment