diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-11-07 20:27:04 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-11-07 20:27:04 +0000 |
commit | 113cb513f76d8866cbb6dc85fa18aded753e01da (patch) | |
tree | 991e2a39e12fe20709be583772ec8038ff3134e5 /runtime/ftplugin | |
parent | 15d9890eee53afc61eb0a03b878a19cb5672f732 (diff) |
Update runtime files
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r-- | runtime/ftplugin/clojure.vim | 12 | ||||
-rw-r--r-- | runtime/ftplugin/mail.vim | 10 | ||||
-rw-r--r-- | runtime/ftplugin/meson.vim | 23 | ||||
-rw-r--r-- | runtime/ftplugin/spec.vim | 4 |
4 files changed, 38 insertions, 11 deletions
diff --git a/runtime/ftplugin/clojure.vim b/runtime/ftplugin/clojure.vim index cb75506dbb..81d53b1227 100644 --- a/runtime/ftplugin/clojure.vim +++ b/runtime/ftplugin/clojure.vim @@ -1,11 +1,11 @@ " Vim filetype plugin file " Language: Clojure -" Maintainer: Alex Vear <av@axvr.io> +" Maintainer: Alex Vear <alex@vear.uk> " Former Maintainers: Sung Pae <self@sungpae.com> " Meikel Brandmeyer <mb@kotka.de> " URL: https://github.com/clojure-vim/clojure.vim " License: Vim (see :h license) -" Last Change: 2021-02-13 +" Last Change: 2021-10-26 if exists("b:did_ftplugin") finish @@ -17,7 +17,7 @@ set cpo&vim let b:undo_ftplugin = 'setlocal iskeyword< define< formatoptions< comments< commentstring< lispwords<' -setlocal iskeyword+=?,-,*,!,+,/,=,<,>,.,:,$ +setlocal iskeyword+=?,-,*,!,+,/,=,<,>,.,:,$,%,&,\| " There will be false positives, but this is better than missing the whole set " of user-defined def* definitions. @@ -43,7 +43,7 @@ setlocal commentstring=;\ %s " specially and hence are not indented specially. " " -*- LISPWORDS -*- -" Generated from https://github.com/clojure-vim/clojure.vim/blob/f8594e7030cdfb0b7990ac92953c77a08a7220f0/clj/src/vim_clojure_static/generate.clj +" Generated from https://github.com/clojure-vim/clojure.vim/blob/62b215f079ce0f3834fd295c7a7f6bd8cc54bcc3/clj/src/vim_clojure_static/generate.clj setlocal lispwords=as->,binding,bound-fn,case,catch,cond->,cond->>,condp,def,definline,definterface,defmacro,defmethod,defmulti,defn,defn-,defonce,defprotocol,defrecord,defstruct,deftest,deftest-,deftype,doseq,dotimes,doto,extend,extend-protocol,extend-type,fn,for,if,if-let,if-not,if-some,let,letfn,locking,loop,ns,proxy,reify,set-test,testing,when,when-first,when-let,when-not,when-some,while,with-bindings,with-in-str,with-local-vars,with-open,with-precision,with-redefs,with-redefs-fn,with-test " Provide insert mode completions for special forms and clojure.core. As @@ -64,8 +64,8 @@ if exists('loaded_matchit') 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") +" Filter files in the browse dialog +if (has("gui_win32") || has("gui_gtk")) && !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" . diff --git a/runtime/ftplugin/mail.vim b/runtime/ftplugin/mail.vim index 2a6bf4c046..f12022305f 100644 --- a/runtime/ftplugin/mail.vim +++ b/runtime/ftplugin/mail.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Mail " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2012 Nov 20 +" Last Change: 2021 Oct 23 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -26,6 +26,14 @@ setlocal fo+=tcql " Add n:> to 'comments, in case it was removed elsewhere setlocal comments+=n:> +" .eml files are universally formatted with DOS line-endings, per RFC5322. +" If the file was not DOS the it will be marked as changed, which is probably +" a good thing. +if expand('%:e') ==? 'eml' + let b:undo_ftplugin ..= " fileformat=" .. &fileformat + setlocal fileformat=dos +endif + " Add mappings, unless the user doesn't want this. if !exists("no_plugin_maps") && !exists("no_mail_maps") " Quote text by inserting "> " diff --git a/runtime/ftplugin/meson.vim b/runtime/ftplugin/meson.vim index d48fa1dfd1..1ce9a03037 100644 --- a/runtime/ftplugin/meson.vim +++ b/runtime/ftplugin/meson.vim @@ -12,9 +12,28 @@ set cpo&vim setlocal commentstring=#\ %s setlocal comments=:# +setlocal formatoptions+=croql formatoptions-=t -setlocal shiftwidth=2 -setlocal softtabstop=2 +let b:undo_ftplugin = "setl com< cms< fo<" + +if get(g:, "meson_recommended_style", 1) + setlocal expandtab + setlocal shiftwidth=2 + setlocal softtabstop=2 + let b:undo_ftplugin .= " | setl et< sts< sw<" +endif + +if exists("loaded_matchit") && !exists("b:match_words") + let b:match_words = '\<if\>:\<elif\>:\<else\>:\<endif\>,' . + \ '\<foreach\>:\<break\>:\<continue\>:\<endforeach\>' + let b:undo_ftplugin .= " | unlet! b:match_words" +endif + +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "Meson Build Files (meson.build)\tmeson.build\n" . + \ "All Files (*.*)\t*.*\n" + let b:undo_ftplugin .= " | unlet! b:browsefilter" +endif let &cpo = s:keepcpo unlet s:keepcpo diff --git a/runtime/ftplugin/spec.vim b/runtime/ftplugin/spec.vim index 75eebec56a..ce00021a69 100644 --- a/runtime/ftplugin/spec.vim +++ b/runtime/ftplugin/spec.vim @@ -18,8 +18,8 @@ if !exists("no_plugin_maps") && !exists("no_spec_maps") endif endif -if !hasmapto("call SpecChangelog(\"\")<CR>") - noremap <buffer> <unique> <script> <Plug>SpecChangelog :call SpecChangelog("")<CR> +if !hasmapto("call <SID>SpecChangelog(\"\")<CR>") + noremap <buffer> <unique> <script> <Plug>SpecChangelog :call <SID>SpecChangelog("")<CR> endif if !exists("*s:GetRelVer") |