diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-10-11 08:57:33 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-10-11 08:57:33 +0200 |
commit | dc08328821a2c11e33dfb1980332e4923ec64fca (patch) | |
tree | 237125b7b303f9fdae53f8dfefe26d9ee99a8285 /runtime/ftplugin | |
parent | dc0ccaee68ca24d10050117fbec757ad33590a17 (diff) | |
download | vim-git-dc08328821a2c11e33dfb1980332e4923ec64fca.tar.gz |
Updated runtime files.
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r-- | runtime/ftplugin/mf.vim | 11 | ||||
-rw-r--r-- | runtime/ftplugin/mp.vim | 13 | ||||
-rw-r--r-- | runtime/ftplugin/python.vim | 10 |
3 files changed, 14 insertions, 20 deletions
diff --git a/runtime/ftplugin/mf.vim b/runtime/ftplugin/mf.vim index fa567368e..7c9a8a128 100644 --- a/runtime/ftplugin/mf.vim +++ b/runtime/ftplugin/mf.vim @@ -2,7 +2,7 @@ " Language: METAFONT " Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com> " Former Maintainers: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2016 Oct 1 +" Latest Revision: 2016 Oct 2 if exists("b:did_ftplugin") finish @@ -25,7 +25,7 @@ let g:omni_syntax_group_exclude_mf = 'mfTodoComment' let s:mp_regex = { \ 'beginsection' : '^\s*\%(\%(\|var\|primary\|secondary\|tertiary\)def\|beginchar\|beginlogochar\)\>', - \ 'endsection' : '^\s*\%(enddef\|endchar\|endlogochar\)\>', + \ 'endsection' : '^\s*\%(enddef\|endchar\)\>', \ 'beginblock' : '^\s*\%(begingroup\|if\|for\%(\|suffixes\|ever\)\)\>', \ 'endblock' : '^\s*\%(endgroup\|fi\|endfor\)\>' \ } @@ -35,9 +35,7 @@ function! s:move_around(count, what, flags, visual) exe "normal! gv" endif call search(s:mp_regex[a:what], a:flags.'s') " 's' sets previous context mark - for i in range(2, a:count) - call search(s:mp_regex[a:what], a:flags) - endfor + call map(range(2, a:count), 'search(s:mp_regex[a:what], a:flags)') endfunction @@ -62,8 +60,7 @@ if exists("loaded_matchit") \ '\<for\%(\|suffixes\|ever\)\>:\<exit\%(if\|unless\)\>:\<endfor\>,' . \ '\<\%(\|var\|primary\|secondary\|tertiary\)def\>:\<enddef\>,' . \ '\<begingroup\>:\<endgroup\>,' . - \ '\<beginchar\>:\<endchar\>' . - \ '\<beginlogochar\>:\<endlogochar\>' + \ '\<begin\%(logo\)\?char\>:\<endchar\>' " Ignore comments and strings let b:match_skip = 'synIDattr(synID(line("."), col("."), 1), "name") \ =~# "mf\\(Comment\\|String\\)$"' diff --git a/runtime/ftplugin/mp.vim b/runtime/ftplugin/mp.vim index a3c9af342..3a0a3d029 100644 --- a/runtime/ftplugin/mp.vim +++ b/runtime/ftplugin/mp.vim @@ -2,7 +2,7 @@ " Language: MetaPost " Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com> " Former Maintainers: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2016 Oct 1 +" Latest Revision: 2016 Oct 2 if exists("b:did_ftplugin") finish @@ -34,7 +34,7 @@ endif let s:mp_regex = { \ 'beginsection' : '^\s*\%(\%(\|var\|primary\|secondary\|tertiary\)def\|begin\%(fig\|char\|logochar\|glyph\|graph\)\)\>', - \ 'endsection' : '^\s*\%(enddef\|end\%(fig\|char\|logochar\|glyph\|graph\)\)\>', + \ 'endsection' : '^\s*\%(enddef\|end\%(fig\|char\|glyph\|graph\)\)\>', \ 'beginblock' : '^\s*\%(begingroup\|if\|for\%(\|suffixes\|ever\)\)\>', \ 'endblock' : '^\s*\%(endgroup\|fi\|endfor\)\>' \ } @@ -44,9 +44,7 @@ function! s:move_around(count, what, flags, visual) exe "normal! gv" endif call search(s:mp_regex[a:what], a:flags.'s') " 's' sets previous context mark - for i in range(2, a:count) - call search(s:mp_regex[a:what], a:flags) - endfor + call map(range(2, a:count), 'search(s:mp_regex[a:what], a:flags)') endfunction @@ -72,9 +70,8 @@ if exists("loaded_matchit") \ '\<\%(\|var\|primary\|secondary\|tertiary\)def\>:\<enddef\>,' . \ '\<beginfig\>:\<endfig\>,' . \ '\<begingroup\>:\<endgroup\>,' . - \ '\<beginchar\>:\<endchar\>' . - \ '\<beginlogochar\>:\<endlogochar\>' . - \ '\<beginglyph\>:\<endglyph\>' . + \ '\<begin\%(logo\)\?char\>:\<endchar\>,' . + \ '\<beginglyph\>:\<endglyph\>,' . \ '\<begingraph\>:\<endgraph\>' " Ignore comments and strings let b:match_skip = 'synIDattr(synID(line("."), col("."), 1), "name") diff --git a/runtime/ftplugin/python.vim b/runtime/ftplugin/python.vim index d5f70b6ab..546e3bd56 100644 --- a/runtime/ftplugin/python.vim +++ b/runtime/ftplugin/python.vim @@ -2,7 +2,7 @@ " Language: python " Maintainer: James Sully <sullyj3@gmail.com> " Previous Maintainer: Johannes Zellner <johannes@zellner.org> -" Last Change: Tue, 06 September 2016 +" Last Change: Tue, 09 October 2016 " https://github.com/sullyj3/vim-ftplugin-python if exists("b:did_ftplugin") | finish | endif @@ -22,10 +22,10 @@ setlocal omnifunc=pythoncomplete#Complete set wildignore+=*.pyc -let b:next_toplevel='\v%$\|^(class\|def)>' -let b:prev_toplevel='\v^(class\|def)>' -let b:next='\v%$\|^\s*(class\|def)>' -let b:prev='\v^\s*(class\|def)>' +let b:next_toplevel='\v%$\|^(class\|def\|async def)>' +let b:prev_toplevel='\v^(class\|def\|async def)>' +let b:next='\v%$\|^\s*(class\|def\|async def)>' +let b:prev='\v^\s*(class\|def\|async def)>' execute "nnoremap <silent> <buffer> ]] :call <SID>Python_jump('n', '". b:next_toplevel."', 'W')<cr>" execute "nnoremap <silent> <buffer> [[ :call <SID>Python_jump('n', '". b:prev_toplevel."', 'Wb')<cr>" |