From c1a11ed54c7974b74be38f2aef6a200d7cfc878e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 24 Jun 2008 22:09:24 +0000 Subject: updated for version 7.2a --- runtime/ftplugin/denyhosts.vim | 18 ++++++++++++++++++ runtime/ftplugin/php.vim | 21 ++++++++++++++++----- runtime/ftplugin/vim.vim | 20 +++++++++++++------- 3 files changed, 47 insertions(+), 12 deletions(-) create mode 100644 runtime/ftplugin/denyhosts.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/denyhosts.vim b/runtime/ftplugin/denyhosts.vim new file mode 100644 index 000000000..86796eb8e --- /dev/null +++ b/runtime/ftplugin/denyhosts.vim @@ -0,0 +1,18 @@ +" Vim filetype plugin file +" Maintainer: Nikolai Weibull +" Latest Revision: 2007-09-18 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let s:cpo_save = &cpo +set cpo&vim diff --git a/runtime/ftplugin/php.vim b/runtime/ftplugin/php.vim index 86cf89c08..c9a0bc72f 100644 --- a/runtime/ftplugin/php.vim +++ b/runtime/ftplugin/php.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: php " Maintainer: Dan Sharp -" Last Changed: 2006 Jul 15 +" Last Changed: 2007 Nov 10 " URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin if exists("b:did_ftplugin") | finish | endif @@ -42,7 +42,9 @@ endif " ### " Provided by Mikolaj Machowski setlocal include=\\\(require\\\|include\\\)\\\(_once\\\)\\\? -setlocal iskeyword+=$ +" Disabled changing 'iskeyword', it breaks a command such as "*" +" setlocal iskeyword+=$ + if exists("loaded_matchit") let b:match_words = ',\:\,' . \ '\:\:\:\,' . @@ -55,15 +57,24 @@ if exists("loaded_matchit") endif " ### -if exists('&ofu') - setlocal ofu=phpcomplete#CompletePHP +if exists('&omnifunc') + setlocal omnifunc=phpcomplete#CompletePHP endif +" Section jumping: [[ and ]] provided by Antony Scriven +let s:function = '\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function' +let s:class = '\(abstract\s\+\|final\s\+\)*class' +let s:interface = 'interface' +let s:section = '\(.*\%#\)\@!\_^\s*\zs\('.s:function.'\|'.s:class.'\|'.s:interface.'\)' +exe 'nno [[ ?' . escape(s:section, '|') . '?:nohls' +exe 'nno ]] /' . escape(s:section, '|') . '/:nohls' +exe 'ono [[ ?' . escape(s:section, '|') . '?:nohls' +exe 'ono ]] /' . escape(s:section, '|') . '/:nohls' setlocal commentstring=/*%s*/ " Undo the stuff we changed. -let b:undo_ftplugin = "setlocal cms< inc< isk<" . +let b:undo_ftplugin = "setlocal commentstring< include< omnifunc<" . \ " | unlet! b:browsefilter b:match_words | " . \ s:undo_ftplugin diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index 78fb6ec3a..ca66597d8 100644 --- a/runtime/ftplugin/vim.vim +++ b/runtime/ftplugin/vim.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Vim " Maintainer: Bram Moolenaar -" Last Change: 2006 Sep 26 +" Last Change: 2008 Feb 27 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -33,14 +33,20 @@ endif setlocal commentstring=\"%s " Move around functions. -noremap [[ m':call search('^\s*fu\%[nction]\>', "bW") -noremap ]] m':call search('^\s*fu\%[nction]\>', "W") -noremap [] m':call search('^\s*endf*\%[unction]\>', "bW") -noremap ][ m':call search('^\s*endf*\%[unction]\>', "W") +nnoremap [[ m':call search('^\s*fu\%[nction]\>', "bW") +vnoremap [[ m':exe "normal! gv"call search('^\s*fu\%[nction]\>', "bW") +nnoremap ]] m':call search('^\s*fu\%[nction]\>', "W") +vnoremap ]] m':exe "normal! gv"call search('^\s*fu\%[nction]\>', "W") +nnoremap [] m':call search('^\s*endf*\%[unction]\>', "bW") +vnoremap [] m':exe "normal! gv"call search('^\s*endf*\%[unction]\>', "bW") +nnoremap ][ m':call search('^\s*endf*\%[unction]\>', "W") +vnoremap ][ m':exe "normal! gv"call search('^\s*endf*\%[unction]\>', "W") " Move around comments -noremap ]" :call search('^\(\s*".*\n\)\@ -noremap [" :call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW") +nnoremap ]" :call search('^\(\s*".*\n\)\@ +vnoremap ]" :exe "normal! gv"call search('^\(\s*".*\n\)\@ +nnoremap [" :call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW") +vnoremap [" :exe "normal! gv"call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW") " Let the matchit plugin know what items can be matched. if exists("loaded_matchit") -- cgit v1.2.1