diff options
author | Bram Moolenaar <Bram@vim.org> | 2011-12-14 21:17:39 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2011-12-14 21:17:39 +0100 |
commit | f1568eca24d30d4f308e987657c53cd48d97d8fa (patch) | |
tree | 900c802d8096eca43c957c0b3c16cc36cec32e7b /runtime/ftplugin | |
parent | f788a0610309ed9787b4e48216c7d7d4446744c5 (diff) | |
download | vim-git-f1568eca24d30d4f308e987657c53cd48d97d8fa.tar.gz |
Update runtime files.
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r-- | runtime/ftplugin/falcon.vim | 9 | ||||
-rw-r--r-- | runtime/ftplugin/lua.vim | 10 | ||||
-rw-r--r-- | runtime/ftplugin/markdown.vim | 8 | ||||
-rw-r--r-- | runtime/ftplugin/ocaml.vim | 34 | ||||
-rw-r--r-- | runtime/ftplugin/vhdl.vim | 12 |
5 files changed, 44 insertions, 29 deletions
diff --git a/runtime/ftplugin/falcon.vim b/runtime/ftplugin/falcon.vim index 45fd0a458..776db8013 100644 --- a/runtime/ftplugin/falcon.vim +++ b/runtime/ftplugin/falcon.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Falcon " Author: Steven Oliver <oliver.steven@gmail.com> -" Copyright: Copyright (c) 2009, 2010 Steven Oliver +" Copyright: Copyright (c) 2009, 2010, 2011 Steven Oliver " License: You may redistribute this under the same terms as Vim itself " -------------------------------------------------------------------------- " GetLatestVimScripts: 2762 1 :AutoInstall: falcon.vim @@ -16,7 +16,7 @@ let s:cpo_save = &cpo set cpo&vim setlocal tabstop=4 shiftwidth=4 expandtab fileencoding=utf-8 -setlocal suffixesadd=.fal +setlocal suffixesadd=.fal,.ftd " Matchit support if exists("loaded_matchit") && !exists("b:match_words") @@ -36,8 +36,11 @@ setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// " Windows allows you to filter the open file dialog if has("gui_win32") && !exists("b:browsefilter") - let b:browsefilter = "Falcon Source Files (*.fal)\t*.fal\n" . + let b:browsefilter = "Falcon Source Files (*.fal *.ftd)\t*.fal;*.ftd\n" . \ "All Files (*.*)\t*.*\n" endif +let &cpo = s:cpo_save +unlet s:cpo_save + " vim: set sw=4 sts=4 et tw=80 : diff --git a/runtime/ftplugin/lua.vim b/runtime/ftplugin/lua.vim index 297833f4f..fc581db7c 100644 --- a/runtime/ftplugin/lua.vim +++ b/runtime/ftplugin/lua.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file. " Language: Lua 4.0+ " Maintainer: Max Ischenko <mfi@ukr.net> -" Last Change: 2008 Mar 25 +" Last Change: 2011 Dec 10 by Thilo Six " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -11,6 +11,9 @@ endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + " Set 'formatoptions' to break comment lines but not other lines, and insert " the comment leader when hitting <CR> or using "o". setlocal fo-=t fo+=croql @@ -22,8 +25,6 @@ setlocal suffixesadd=.lua " The following lines enable the macros/matchit.vim plugin for " extended matching with the % key. - -set cpo-=C if exists("loaded_matchit") let b:match_ignorecase = 0 @@ -34,3 +35,6 @@ if exists("loaded_matchit") \ '\<repeat\>:\<until\>' endif " exists("loaded_matchit") + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/markdown.vim b/runtime/ftplugin/markdown.vim index 946208203..53430d316 100644 --- a/runtime/ftplugin/markdown.vim +++ b/runtime/ftplugin/markdown.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Markdown " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2010 May 21 +" Last Change: 2011 Dec 14 if exists("b:did_ftplugin") finish @@ -14,6 +14,10 @@ setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s setlocal formatoptions+=tcqln setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^[-*+]\\s\\+ -let b:undo_ftplugin .= "|setl cms< com< fo<" +if exists('b:undo_ftplugin') + let b:undo_ftplugin .= "|setl cms< com< fo< flp<" +else + let b:undo_ftplugin = "setl cms< com< fo< flp<" +endif " vim:set sw=2: diff --git a/runtime/ftplugin/ocaml.vim b/runtime/ftplugin/ocaml.vim index a59141182..de3e41bcd 100644 --- a/runtime/ftplugin/ocaml.vim +++ b/runtime/ftplugin/ocaml.vim @@ -7,7 +7,7 @@ " URL: http://www.ocaml.info/vim/ftplugin/ocaml.vim " Last Change: 2010 Jul 10 - Bugfix, thanks to Pat Rondon " 2008 Jul 17 - Bugfix related to fnameescape (VA) -" 2007 Sep 09 - Added .annot support for ocamlbuild, python not +" 2007 Sep 09 - Added .annot support for ocamlbuild, python not " needed anymore (VA) " 2006 May 01 - Added .annot support for file.whateverext (SZ) " 2006 Apr 11 - Fixed an initialization bug; fixed ASS abbrev (MM) @@ -31,7 +31,7 @@ endif " Error handling -- helps moving where the compiler wants you to go let s:cposet=&cpoptions -set cpo-=C +set cpo&vim setlocal efm= \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:, \%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m, @@ -211,7 +211,7 @@ endfunction " cursor position. " " Typing '<LocalLeader>t' (LocalLeader defaults to '\', see :h LocalLeader) -" will cause " Ocaml_print_type function to be invoked with the right +" will cause " Ocaml_print_type function to be invoked with the right " argument depending on the current mode (visual or not). " >> " @@ -221,9 +221,9 @@ endfunction " - no need for python support " + plus : more portable " + minus: no more lazy parsing, it looks very fast however -" +" " - ocamlbuild support, ie. -" + the plugin finds the _build directory and looks for the +" + the plugin finds the _build directory and looks for the " corresponding file inside; " + if the user decides to change the name of the _build directory thanks " to the '-build-dir' option of ocamlbuild, the plugin will manage in @@ -232,7 +232,7 @@ endfunction " + if ocamlbuild is not used, the usual behaviour holds; ie. the .annot " file should be in the same directory as the source file; " + for vim plugin programmers: -" the variable 'b:_build_dir' contains the inferred path to the build +" the variable 'b:_build_dir' contains the inferred path to the build " directory, even if this one is not named '_build'. " " Bonus : @@ -287,10 +287,10 @@ endfunction endfun " After call: - " - b:annot_file_path : + " - b:annot_file_path : " path to the .annot file corresponding to the " source file (dealing with ocamlbuild stuff) - " - b:_build_path: + " - b:_build_path: " path to the build directory even if this one is " not named '_build' function! s:Locate_annotation() @@ -320,7 +320,7 @@ endfunction let b:annot_file_path = getcwd().'/'.b:annot_file_path endif else - " 3rd case : the _build directory is in a directory higher in the file hierarchy + " 3rd case : the _build directory is in a directory higher in the file hierarchy " (it can't be deeper by ocamlbuild requirements) " .. " / \ @@ -372,7 +372,7 @@ endfunction let b:annotation_file_located = 0 " 2. Finding the type information in the annotation file - + " a. The annotation file is opened in vim as a buffer that " should be (almost) invisible to the user. @@ -401,7 +401,7 @@ endfunction " After call: " The annot file is loaded and assigned to a buffer. - " This also handles the modification date of the .annot file, eg. after a + " This also handles the modification date of the .annot file, eg. after a " compilation. function! s:Load_annotation() if bufloaded(b:annot_file_path) && b:annot_file_last_mod < getftime(b:annot_file_path) @@ -419,9 +419,9 @@ endfunction let b:annot_file_last_mod = getftime(b:annot_file_path) endif endfun - + "b. 'search' and 'match' work to find the type information - + "In: - lin1,col1: postion of expression first char " - lin2,col2: postion of expression last char "Out: - the pattern to be looked for to find the block @@ -462,7 +462,7 @@ endfunction let end = line(".") - 1 return join(getline(begin,end),"\n") endfun - + "In: the pattern to look for in order to match the block "Out: the type information (calls s:Match_data) " Should be called in the annotation buffer @@ -479,10 +479,10 @@ endfunction endtry return annotation endfun - + "c. link this stuff with what the user wants " ie. get the expression selected/under the cursor - + let s:ocaml_word_char = '\w|[À-ÿ]|''' "In: the current mode (eg. "visual", "normal", etc.) @@ -531,7 +531,7 @@ endfunction let [lin1,lin2,col1,col2] = s:Match_borders(a:mode) return s:Extract_type_data(s:Block_pattern(lin1,lin2,col1,col2)) endfun - + "d. main "In: the current mode (eg. "visual", "normal", etc.) "After call: the type information is displayed diff --git a/runtime/ftplugin/vhdl.vim b/runtime/ftplugin/vhdl.vim index 08a2de339..0249b542b 100644 --- a/runtime/ftplugin/vhdl.vim +++ b/runtime/ftplugin/vhdl.vim @@ -1,8 +1,8 @@ " VHDL filetype plugin " Language: VHDL -" Maintainer: R.Shankar <shankar.r?freescale.com> +" Maintainer: R.Shankar <shankar.pec?gmail.com> " Modified By: Gerald Lai <laigera+vim?gmail.com> -" Last Change: 2006 Feb 16 +" Last Change: 2011 Dec 11 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -12,6 +12,9 @@ endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting <CR> or using "o". "setlocal fo-=t fo+=croqlm1 @@ -22,8 +25,6 @@ let b:did_ftplugin = 1 " Format comments to be up to 78 characters long "setlocal tw=75 -set cpo-=C - " Win32 can filter files in the browse dialog "if has("gui_win32") && !exists("b:browsefilter") " let b:browsefilter = "Verilog Source Files (*.v)\t*.v\n" . @@ -82,3 +83,6 @@ vnoremap <buffer><silent>[[ :<C-u>cal <SID>CountWrapper('[[')<CR> vnoremap <buffer><silent>]] :<C-u>cal <SID>CountWrapper(']]')<CR> vnoremap <buffer><silent>[] :<C-u>cal <SID>CountWrapper('[]')<CR> vnoremap <buffer><silent>][ :<C-u>cal <SID>CountWrapper('][')<CR> + +let &cpo = s:cpo_save +unlet s:cpo_save |