summaryrefslogtreecommitdiffstats
path: root/runtime/ftplugin
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-01-28 22:47:25 +0100
committerBram Moolenaar <Bram@vim.org>2018-01-28 22:47:25 +0100
commit40962ec9c0e7b8699e101182b06ddd39dc0e1212 (patch)
tree8949df2955a3d9cc6c0e4a6e89aa123a31c0abbd /runtime/ftplugin
parent84b242c369a22b581c43de9de0152f0baedd71ab (diff)
Update runtime files.
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r--runtime/ftplugin/man.vim14
-rw-r--r--runtime/ftplugin/nsis.vim33
-rw-r--r--runtime/ftplugin/python.vim5
3 files changed, 42 insertions, 10 deletions
diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim
index cfcabc3fb9..9e97156934 100644
--- a/runtime/ftplugin/man.vim
+++ b/runtime/ftplugin/man.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: man
" Maintainer: SungHyun Nam <goweol@gmail.com>
-" Last Change: 2017 Nov 11
+" Last Change: 2018 Jan 15
" To make the ":Man" command available before editing a manual page, source
" this script from your startup vimrc file.
@@ -39,7 +39,7 @@ if &filetype == "man"
endif
if exists(":Man") != 2
- com -nargs=+ Man call s:GetPage(<f-args>)
+ com -nargs=+ -complete=shellcmd Man call s:GetPage(<f-args>)
nmap <Leader>K :call <SID>PreGetPage(0)<CR>
nmap <Plug>ManPreGetPage :call <SID>PreGetPage(0)<CR>
endif
@@ -173,7 +173,15 @@ func <SID>GetPage(...)
" Ensure Vim is not recursively invoked (man-db does this) when doing ctrl-[
" on a man page reference by unsetting MANPAGER.
- silent exec "r !env -u MANPAGER man ".s:GetCmdArg(sect, page)." | col -b"
+ " Some versions of env(1) do not support the '-u' option, and in such case
+ " we set MANPAGER=cat.
+ if !exists('s:env_has_u')
+ call system('env -u x true')
+ let s:env_has_u = (v:shell_error == 0)
+ endif
+ let env_cmd = s:env_has_u ? 'env -u MANPAGER' : 'env MANPAGER=cat'
+ let man_cmd = env_cmd . ' man ' . s:GetCmdArg(sect, page) . ' | col -b'
+ silent exec "r !" . man_cmd
if unsetwidth
let $MANWIDTH = ''
diff --git a/runtime/ftplugin/nsis.vim b/runtime/ftplugin/nsis.vim
index 949691bf6e..1a35127c86 100644
--- a/runtime/ftplugin/nsis.vim
+++ b/runtime/ftplugin/nsis.vim
@@ -1,22 +1,43 @@
" Vim ftplugin file
-" Language: NSIS script
-" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2008-07-09
-
-let s:cpo_save = &cpo
-set cpo&vim
+" Language: NSIS script
+" Maintainer: Ken Takata
+" URL: https://github.com/k-takata/vim-nsis
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Last Change: 2018-01-26
if exists("b:did_ftplugin")
finish
endif
+
+let s:cpo_save = &cpo
+set cpo&vim
+
let b:did_ftplugin = 1
let b:undo_ftplugin = "setl com< cms< fo< def< inc<"
+ \ " | unlet! b:match_ignorecase b:match_words"
setlocal comments=s1:/*,mb:*,ex:*/,b:#,:; commentstring=;\ %s
setlocal formatoptions-=t formatoptions+=croql
setlocal define=^\\s*!define\\%(\\%(utc\\)\\=date\\|math\\)\\=
setlocal include=^\\s*!include\\%(/NONFATAL\\)\\=
+if exists("loaded_matchit")
+ let b:match_ignorecase = 1
+ let b:match_words =
+ \ '\${\%(If\|IfNot\|Unless\)}:\${\%(Else\|ElseIf\|ElseIfNot\|ElseUnless\)}:\${\%(EndIf\|EndUnless\)},' .
+ \ '\${Select}:\${EndSelect},' .
+ \ '\${Switch}:\${EndSwitch},' .
+ \ '\${\%(Do\|DoWhile\|DoUntil\)}:\${\%(Loop\|LoopWhile\|LoopUntil\)},' .
+ \ '\${\%(For\|ForEach\)}:\${Next},' .
+ \ '\<Function\>:\<FunctionEnd\>,' .
+ \ '\<Section\>:\<SectionEnd\>,' .
+ \ '\<SectionGroup\>:\<SectionGroupEnd\>,' .
+ \ '\<PageEx\>:\<PageExEnd\>,' .
+ \ '\${MementoSection}:\${MementoSectionEnd},' .
+ \ '!if\%(\%(macro\)\?n\?def\)\?\>:!else\>:!endif\>,' .
+ \ '!macro\>:!macroend\>'
+endif
+
let &cpo = s:cpo_save
unlet s:cpo_save
diff --git a/runtime/ftplugin/python.vim b/runtime/ftplugin/python.vim
index 54926418de..56f19cb323 100644
--- a/runtime/ftplugin/python.vim
+++ b/runtime/ftplugin/python.vim
@@ -3,7 +3,7 @@
" Maintainer: Tom Picton <tom@tompicton.co.uk>
" Previous Maintainer: James Sully <sullyj3@gmail.com>
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
-" Last Change: Thur, 09 November 2017
+" Last Change: Wed, 20 December 2017
" https://github.com/tpict/vim-ftplugin-python
if exists("b:did_ftplugin") | finish | endif
@@ -20,6 +20,9 @@ setlocal comments=b:#,fb:-
setlocal commentstring=#\ %s
setlocal omnifunc=pythoncomplete#Complete
+if has('python3')
+ setlocal omnifunc=python3complete#Complete
+endif
set wildignore+=*.pyc