Skip to content
Snippets Groups Projects
Commit 6be7f873 authored by Bram Moolenaar's avatar Bram Moolenaar
Browse files

Update runtime files.

parent 90b28005
No related merge requests found
Showing
with 375 additions and 134 deletions
" --------------------------------------------------------------------- " ---------------------------------------------------------------------
" getscript.vim " getscript.vim
" Author: Charles E. Campbell, Jr. " Author: Charles E. Campbell, Jr.
" Date: May 31, 2011 " Date: Jan 17, 2012
" Version: 33 " Version: 34
" Installing: :help glvs-install " Installing: :help glvs-install
" Usage: :help glvs " Usage: :help glvs
" "
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
if exists("g:loaded_getscript") if exists("g:loaded_getscript")
finish finish
endif endif
let g:loaded_getscript= "v33" let g:loaded_getscript= "v34"
if &cp if &cp
echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)" echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
finish finish
...@@ -550,30 +550,42 @@ fun! s:GetOneScript(...) ...@@ -550,30 +550,42 @@ fun! s:GetOneScript(...)
" decompress " decompress
if sname =~ '\.bz2$' if sname =~ '\.bz2$'
" call Decho("decompress: attempt to bunzip2 ".sname) " call Decho("decompress: attempt to bunzip2 ".sname)
exe "silent !bunzip2 ".shellescape(sname) exe "sil !bunzip2 ".shellescape(sname)
let sname= substitute(sname,'\.bz2$','','') let sname= substitute(sname,'\.bz2$','','')
" call Decho("decompress: new sname<".sname."> after bunzip2") " call Decho("decompress: new sname<".sname."> after bunzip2")
elseif sname =~ '\.gz$' elseif sname =~ '\.gz$'
" call Decho("decompress: attempt to gunzip ".sname) " call Decho("decompress: attempt to gunzip ".sname)
exe "silent !gunzip ".shellescape(sname) exe "sil !gunzip ".shellescape(sname)
let sname= substitute(sname,'\.gz$','','') let sname= substitute(sname,'\.gz$','','')
" call Decho("decompress: new sname<".sname."> after gunzip") " call Decho("decompress: new sname<".sname."> after gunzip")
elseif sname =~ '\.xz$' elseif sname =~ '\.xz$'
" call Decho("decompress: attempt to unxz ".sname) " call Decho("decompress: attempt to unxz ".sname)
exe "silent !unxz ".shellescape(sname) exe "sil !unxz ".shellescape(sname)
let sname= substitute(sname,'\.xz$','','') let sname= substitute(sname,'\.xz$','','')
" call Decho("decompress: new sname<".sname."> after unxz") " call Decho("decompress: new sname<".sname."> after unxz")
else else
" call Decho("no decompression needed") " call Decho("no decompression needed")
endif endif
" distribute archive(.zip, .tar, .vba) contents " distribute archive(.zip, .tar, .vba, ...) contents
if sname =~ '\.zip$' if sname =~ '\.zip$'
" call Decho("dearchive: attempt to unzip ".sname) " call Decho("dearchive: attempt to unzip ".sname)
exe "silent !unzip -o ".shellescape(sname) exe "silent !unzip -o ".shellescape(sname)
elseif sname =~ '\.tar$' elseif sname =~ '\.tar$'
" call Decho("dearchive: attempt to untar ".sname) " call Decho("dearchive: attempt to untar ".sname)
exe "silent !tar -xvf ".shellescape(sname) exe "silent !tar -xvf ".shellescape(sname)
elseif sname =~ '\.tgz$'
" call Decho("dearchive: attempt to untar+gunzip ".sname)
exe "silent !tar -zxvf ".shellescape(sname)
elseif sname =~ '\.taz$'
" call Decho("dearchive: attempt to untar+uncompress ".sname)
exe "silent !tar -Zxvf ".shellescape(sname)
elseif sname =~ '\.tbz$'
" call Decho("dearchive: attempt to untar+bunzip2 ".sname)
exe "silent !tar -jxvf ".shellescape(sname)
elseif sname =~ '\.txz$'
" call Decho("dearchive: attempt to untar+xz ".sname)
exe "silent !tar -Jxvf ".shellescape(sname)
elseif sname =~ '\.vba$' elseif sname =~ '\.vba$'
" call Decho("dearchive: attempt to handle a vimball: ".sname) " call Decho("dearchive: attempt to handle a vimball: ".sname)
silent 1split silent 1split
......
" tar.vim: Handles browsing tarfiles " tar.vim: Handles browsing tarfiles
" AUTOLOAD PORTION " AUTOLOAD PORTION
" Date: May 31, 2011 " Date: Jan 17, 2012
" Version: 27 " Version: 28
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM> " Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" License: Vim License (see vim's :help license) " License: Vim License (see vim's :help license)
" "
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
if &cp || exists("g:loaded_tar") if &cp || exists("g:loaded_tar")
finish finish
endif endif
let g:loaded_tar= "v27" let g:loaded_tar= "v28"
if v:version < 702 if v:version < 702
echohl WarningMsg echohl WarningMsg
echo "***warning*** this version of tar needs vim 7.2" echo "***warning*** this version of tar needs vim 7.2"
...@@ -143,7 +143,7 @@ fun! tar#Browse(tarfile) ...@@ -143,7 +143,7 @@ fun! tar#Browse(tarfile)
call setline(lastline+2,'" Browsing tarfile '.a:tarfile) call setline(lastline+2,'" Browsing tarfile '.a:tarfile)
call setline(lastline+3,'" Select a file with cursor and press ENTER') call setline(lastline+3,'" Select a file with cursor and press ENTER')
keepj $put ='' keepj $put =''
keepj 0d keepj sil! 0d
keepj $ keepj $
let tarfile= a:tarfile let tarfile= a:tarfile
...@@ -158,10 +158,10 @@ fun! tar#Browse(tarfile) ...@@ -158,10 +158,10 @@ fun! tar#Browse(tarfile)
elseif tarfile =~# '\.lrp' elseif tarfile =~# '\.lrp'
" call Decho("2: exe silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ") " call Decho("2: exe silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - " exe "sil! r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.bz2$' elseif tarfile =~# '\.\(bz2\|tbz\|tb2\)$'
" call Decho("3: exe silent r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ") " call Decho("3: exe silent r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - " exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.lzma$' elseif tarfile =~# '\.\(lzma\|tlz\)$'
" call Decho("3: exe silent r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ") " call Decho("3: exe silent r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - " exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.\(xz\|txz\)$' elseif tarfile =~# '\.\(xz\|txz\)$'
......
" vimball.vim : construct a file containing both paths and files " vimball.vim : construct a file containing both paths and files
" Author: Charles E. Campbell, Jr. " Author: Charles E. Campbell, Jr.
" Date: Sep 26, 2011 " Date: Jan 17, 2012
" Version: 34 " Version: 35
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim " GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
" Copyright: (c) 2004-2011 by Charles E. Campbell, Jr. " Copyright: (c) 2004-2011 by Charles E. Campbell, Jr.
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt " The VIM LICENSE applies to Vimball.vim, and Vimball.txt
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
if &cp || exists("g:loaded_vimball") if &cp || exists("g:loaded_vimball")
finish finish
endif endif
let g:loaded_vimball = "v34" let g:loaded_vimball = "v35"
if v:version < 702 if v:version < 702
echohl WarningMsg echohl WarningMsg
echo "***warning*** this version of vimball needs vim 7.2" echo "***warning*** this version of vimball needs vim 7.2"
...@@ -767,6 +767,9 @@ fun! vimball#RestoreSettings() ...@@ -767,6 +767,9 @@ fun! vimball#RestoreSettings()
" call Dret("RestoreSettings") " call Dret("RestoreSettings")
endfun endfun
let &cpo = s:keepcpo
unlet s:keepcpo
" --------------------------------------------------------------------- " ---------------------------------------------------------------------
" Modelines: {{{1 " Modelines: {{{1
" vim: fdm=marker " vim: fdm=marker
" zip.vim: Handles browsing zipfiles " zip.vim: Handles browsing zipfiles
" AUTOLOAD PORTION " AUTOLOAD PORTION
" Date: May 24, 2011 " Date: Jan 17, 2012
" Version: 24 " Version: 25
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM> " Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" License: Vim License (see vim's :help license) " License: Vim License (see vim's :help license)
" Copyright: Copyright (C) 2005-2011 Charles E. Campbell, Jr. {{{1 " Copyright: Copyright (C) 2005-2012 Charles E. Campbell, Jr. {{{1
" Permission is hereby granted to use and distribute this code, " Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright " with or without modifications, provided that this copyright
" notice is copied with it. Like anything else that's free, " notice is copied with it. Like anything else that's free,
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
if &cp || exists("g:loaded_zip") if &cp || exists("g:loaded_zip")
finish finish
endif endif
let g:loaded_zip= "v24" let g:loaded_zip= "v25"
if v:version < 702 if v:version < 702
echohl WarningMsg echohl WarningMsg
echo "***warning*** this version of zip needs vim 7.2" echo "***warning*** this version of zip needs vim 7.2"
...@@ -104,12 +104,12 @@ fun! zip#Browse(zipfile) ...@@ -104,12 +104,12 @@ fun! zip#Browse(zipfile)
" give header " give header
call append(0, ['" zip.vim version '.g:loaded_zip, call append(0, ['" zip.vim version '.g:loaded_zip,
\ '" Browsing zipfile '.a:zipfile, \ '" Browsing zipfile '.a:zipfile,
\ '" Select a file with cursor and press ENTER']) \ '" Select a file with cursor and press ENTER'])
keepj $ keepj $
" call Decho("exe silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1)) " call Decho("exe silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1))
exe "silent r! ".g:zip_unzipcmd." -Z -1 -- ".s:Escape(a:zipfile,1) exe "keepj sil! r! ".g:zip_unzipcmd." -Z -1 -- ".s:Escape(a:zipfile,1)
if v:shell_error != 0 if v:shell_error != 0
redraw! redraw!
echohl WarningMsg | echo "***warning*** (zip#Browse) ".fnameescape(a:zipfile)." is not a zip file" | echohl None echohl WarningMsg | echo "***warning*** (zip#Browse) ".fnameescape(a:zipfile)." is not a zip file" | echohl None
......
" Vim compiler file
" Compiler: Erlang
" Maintainer: none, please volunteer!
" Last Change: 2012 Jan 20
if exists("current_compiler")
finish
endif
let current_compiler = "erlang"
" TODO
*autocmd.txt* For Vim version 7.3. Last change: 2011 Oct 26 *autocmd.txt* For Vim version 7.3. Last change: 2012 Jan 20
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -699,7 +699,8 @@ MenuPopup Just before showing the popup menu (under the ...@@ -699,7 +699,8 @@ MenuPopup Just before showing the popup menu (under the
QuickFixCmdPre Before a quickfix command is run (|:make|, QuickFixCmdPre Before a quickfix command is run (|:make|,
|:lmake|, |:grep|, |:lgrep|, |:grepadd|, |:lmake|, |:grep|, |:lgrep|, |:grepadd|,
|:lgrepadd|, |:vimgrep|, |:lvimgrep|, |:lgrepadd|, |:vimgrep|, |:lvimgrep|,
|:vimgrepadd|, |:lvimgrepadd|, |:cscope|). |:vimgrepadd|, |:lvimgrepadd|, |:cscope|,
|:helpgrep|, |:lhelpgrep|).
The pattern is matched against the command The pattern is matched against the command
being run. When |:grep| is used but 'grepprg' being run. When |:grep| is used but 'grepprg'
is set to "internal" it still matches "grep". is set to "internal" it still matches "grep".
......
*develop.txt* For Vim version 7.3. Last change: 2008 Dec 17 *develop.txt* For Vim version 7.3. Last change: 2012 Jan 10
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -232,6 +232,17 @@ time shadows global declaration ...@@ -232,6 +232,17 @@ time shadows global declaration
new C++ reserved keyword new C++ reserved keyword
try Borland C++ doesn't like it to be used as a variable. try Borland C++ doesn't like it to be used as a variable.
clear Mac curses.h
echo Mac curses.h
instr Mac curses.h
meta Mac curses.h
newwin Mac curses.h
nl Mac curses.h
overwrite Mac curses.h
refresh Mac curses.h
scroll Mac curses.h
typeahead Mac curses.h
basename() GNU string function basename() GNU string function
dirname() GNU string function dirname() GNU string function
get_env_value() Linux system function get_env_value() Linux system function
......
*mlang.txt* For Vim version 7.3. Last change: 2010 Dec 11 *mlang.txt* For Vim version 7.3. Last change: 2012 Jan 15
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -59,7 +59,7 @@ use of "-" and "_". ...@@ -59,7 +59,7 @@ use of "-" and "_".
system. Some systems accept aliases like "en" or system. Some systems accept aliases like "en" or
"en_US", but some only accept the full specification "en_US", but some only accept the full specification
like "en_US.ISO_8859-1". On Unix systems you can use like "en_US.ISO_8859-1". On Unix systems you can use
the this command to see what locales are supported: > this command to see what locales are supported: >
:!locale -a :!locale -a
< With the "messages" argument the language used for < With the "messages" argument the language used for
messages is set. This can be different when you want, messages is set. This can be different when you want,
......
*options.txt* For Vim version 7.3. Last change: 2011 Dec 15 *options.txt* For Vim version 7.3. Last change: 2012 Jan 13
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -301,9 +301,8 @@ You will not get back the 'list' value as it was the last time you edited ...@@ -301,9 +301,8 @@ You will not get back the 'list' value as it was the last time you edited
copying the value. copying the value.
{not in Vi} {not in Vi}
:se[t] {option}< Set the local value of {option} to its global value by :se[t] {option}< For |global-local| options: Remove the local value of
making it empty. Only makes sense for |global-local| {option}, so that the global value will be used.
options.
{not in Vi} {not in Vi}
*:setg* *:setglobal* *:setg* *:setglobal*
......
*pi_getscript.txt* For Vim version 7.0. Last change: 2011 May 31 *pi_getscript.txt* For Vim version 7.0. Last change: 2011 Jun 23
> >
GETSCRIPT REFERENCE MANUAL by Charles E. Campbell, Jr. GETSCRIPT REFERENCE MANUAL by Charles E. Campbell, Jr.
< <
Authors: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamilyA.Mbiz> Authors: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamilyA.Mbiz>
(remove NOSPAM from the email address) (remove NOSPAM from the email address)
*GetLatestVimScripts-copyright* *GetLatestVimScripts-copyright*
Copyright: (c) 2004-2010 by Charles E. Campbell, Jr. *glvs-copyright* Copyright: (c) 2004-2012 by Charles E. Campbell, Jr. *glvs-copyright*
The VIM LICENSE applies to getscript.vim and The VIM LICENSE (see |copyright|) applies to the files in this
pi_getscript.txt (see |copyright|) except use package, including getscriptPlugin.vim, getscript.vim,
"getscript" instead of "Vim". No warranty, express or implied. GetLatestVimScripts.dist, and pi_getscript.txt, except use "getscript"
Use At-Your-Own-Risk. instead of "VIM". Like anything else that's free, getscript and its
associated files are provided *as is* and comes with no warranty of
any kind, either expressed or implied. No guarantees of
merchantability. No guarantees of suitability for any purpose. By
using this plugin, you agree that in no event will the copyright
holder be liable for any damages resulting from the use of this
software. Use at your own risk!
Getscript is a plugin that simplifies retrieval of the latest versions of the Getscript is a plugin that simplifies retrieval of the latest versions of the
scripts that you yourself use! Typing |:GLVS| will invoke getscript; it will scripts that you yourself use! Typing |:GLVS| will invoke getscript; it will
...@@ -374,6 +380,8 @@ The AutoInstall process will: ...@@ -374,6 +380,8 @@ The AutoInstall process will:
============================================================================== ==============================================================================
9. GetLatestVimScripts History *getscript-history* *glvs-hist* {{{1 9. GetLatestVimScripts History *getscript-history* *glvs-hist* {{{1
v44 Jun 23, 2011 : * handles additional decompression options for tarballs
(tgz taz tbz txz)
v33 May 31, 2011 : * using fnameescape() instead of escape() v33 May 31, 2011 : * using fnameescape() instead of escape()
* *.xz support * *.xz support
v32 Jun 19, 2010 : * (Jan Steffens) added support for xz compression v32 Jun 19, 2010 : * (Jan Steffens) added support for xz compression
......
*pi_tar.txt* For Vim version 7.3. Last change: 2011 May 31 *pi_tar.txt* For Vim version 7.3. Last change: 2012 Jan 17
+====================+ +====================+
| Tar File Interface | | Tar File Interface |
...@@ -6,9 +6,16 @@ ...@@ -6,9 +6,16 @@
Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM> Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
(remove NOSPAM from Campbell's email first) (remove NOSPAM from Campbell's email first)
Copyright 2005-2010: The GPL (gnu public license) applies to *tar-copyright* Copyright 2005-2012: *tar-copyright*
tar.vim, tarPlugin.vim, and pi_tar.txt. The VIM LICENSE (see |copyright|) applies to the files in this
No warranty, express or implied. Use At-Your-Own-Risk. package, including tarPlugin.vim, tar.vim, and pi_tar.txt. Like
anything else that's except use "tar.vim" instead of "VIM". Like
anything else that's free, tar.vim and its associated files are
provided *as is* and comes with no warranty of any kind, either
expressed or implied. No guarantees of merchantability. No
guarantees of suitability for any purpose. By using this plugin, you
agree that in no event will the copyright holder be liable for any
damages resulting from the use of this software. Use at your own risk!
============================================================================== ==============================================================================
1. Contents *tar* *tar-contents* 1. Contents *tar* *tar-contents*
...@@ -83,6 +90,7 @@ Copyright 2005-2010: The GPL (gnu public license) applies to *tar-copyright* ...@@ -83,6 +90,7 @@ Copyright 2005-2010: The GPL (gnu public license) applies to *tar-copyright*
4. History *tar-history* 4. History *tar-history*
v28 Jun 23, 2011 * a few more decompression options (tbz tb2 txz)
v27 May 31, 2011 * moved cygwin detection before g:tar_copycmd handling v27 May 31, 2011 * moved cygwin detection before g:tar_copycmd handling
* inserted additional |:keepj| modifiers * inserted additional |:keepj| modifiers
* changed silent to sil! (|:silent|) * changed silent to sil! (|:silent|)
......
*pi_vimball.txt* For Vim version 7.3. Last change: 2011 Sep 26 *pi_vimball.txt* For Vim version 7.3. Last change: 2012 Jan 17
---------------- ----------------
Vimball Archiver Vimball Archiver
...@@ -6,11 +6,16 @@ ...@@ -6,11 +6,16 @@
Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM> Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
(remove NOSPAM from Campbell's email first) (remove NOSPAM from Campbell's email first)
Copyright: (c) 2004-2011 by Charles E. Campbell, Jr. *Vimball-copyright* Copyright: (c) 2004-2012 by Charles E. Campbell, Jr. *Vimball-copyright*
The VIM LICENSE applies to Vimball.vim, and Vimball.txt The VIM LICENSE (see |copyright|) applies to the files in this
(see |copyright|) except use "Vimball" instead of "Vim". package, including vimballPlugin.vim, vimball.vim, and pi_vimball.txt.
No warranty, express or implied. except use "vimball" instead of "VIM". Like anything else that's free,
Use At-Your-Own-Risk! vimball.vim and its associated files are provided *as is* and comes with
no warranty of any kind, either expressed or implied. No guarantees
of merchantability. No guarantees of suitability for any purpose. By
using this plugin, you agree that in no event will the copyright
holder be liable for any damages resulting from the use of this
software. Use at your own risk!
============================================================================== ==============================================================================
1. Contents *vba* *vimball* *vimball-contents* 1. Contents *vba* *vimball* *vimball-contents*
......
*pi_zip.txt* For Vim version 7.3. Last change: 2011 Aug 14 *pi_zip.txt* For Vim version 7.3. Last change: 2012 Jan 17
+====================+ +====================+
| Zip File Interface | | Zip File Interface |
...@@ -7,14 +7,15 @@ ...@@ -7,14 +7,15 @@
Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM> Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
(remove NOSPAM from Campbell's email first) (remove NOSPAM from Campbell's email first)
Copyright: Copyright (C) 2005-2011 Charles E Campbell, Jr *zip-copyright* Copyright: Copyright (C) 2005-2011 Charles E Campbell, Jr *zip-copyright*
Permission is hereby granted to use and distribute this code, The VIM LICENSE (see |copyright|) applies to the files in this
with or without modifications, provided that this copyright package, including zipPlugin.vim, zip.vim, and pi_zip.vim. except use
notice is copied with it. Like anything else that's free, "zip.vim" instead of "VIM". Like anything else that's free, zip.vim
zip.vim, zipPlugin.vim, and pi_zip.txt are provided *as is* and its associated files are provided *as is* and comes with no
and it comes with no warranty of any kind, either expressed or warranty of any kind, either expressed or implied. No guarantees of
implied. By using this plugin, you agree that in no event will merchantability. No guarantees of suitability for any purpose. By
the copyright holder be liable for any damages resulting from using this plugin, you agree that in no event will the copyright
the use of this software. holder be liable for any damages resulting from the use of this
software. Use at your own risk!
============================================================================== ==============================================================================
1. Contents *zip* *zip-contents* 1. Contents *zip* *zip-contents*
...@@ -73,7 +74,7 @@ Copyright: Copyright (C) 2005-2011 Charles E Campbell, Jr *zip-copyright* ...@@ -73,7 +74,7 @@ Copyright: Copyright (C) 2005-2011 Charles E Campbell, Jr *zip-copyright*
============================================================================== ==============================================================================
3. Additional Extensions *zip-extension* 3. Additional Extensions *zip-extension*
Apparently there are a number of archivers who generate zip files that Apparently there are a number of archivers which generate zip files that
don't use the .zip extension (.jar, .xpi, etc). To handle such files, don't use the .zip extension (.jar, .xpi, etc). To handle such files,
place a line in your <.vimrc> file: > place a line in your <.vimrc> file: >
...@@ -84,6 +85,8 @@ Copyright: Copyright (C) 2005-2011 Charles E Campbell, Jr *zip-copyright* ...@@ -84,6 +85,8 @@ Copyright: Copyright (C) 2005-2011 Charles E Campbell, Jr *zip-copyright*
============================================================================== ==============================================================================
4. History *zip-history* {{{1 4. History *zip-history* {{{1
v25 Jun 27, 2011 * using keepj with unzip -Z
(consistent with the -p variant)
v24 Jun 21, 2010 * (Cédric Bosdonnat) unzip seems to need its filenames v24 Jun 21, 2010 * (Cédric Bosdonnat) unzip seems to need its filenames
fnameescape'd as well as shellquote'd fnameescape'd as well as shellquote'd
* (Motoya Kurotsu) inserted keepj before 0d to protect * (Motoya Kurotsu) inserted keepj before 0d to protect
......
*syntax.txt* For Vim version 7.3. Last change: 2012 Jan 04 *syntax.txt* For Vim version 7.3. Last change: 2012 Jan 20
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -1161,7 +1161,7 @@ should be appropriate for most users most of the time because Fortran 2008 is ...@@ -1161,7 +1161,7 @@ should be appropriate for most users most of the time because Fortran 2008 is
almost a superset of previous versions (Fortran 2003, 95, 90, and 77). almost a superset of previous versions (Fortran 2003, 95, 90, and 77).
Fortran source code form ~ Fortran source code form ~
Fortran 9x code can be in either fixed or free source form. Note that the Fortran code can be in either fixed or free source form. Note that the
syntax highlighting will not be correct if the form is incorrectly set. syntax highlighting will not be correct if the form is incorrectly set.
When you create a new fortran file, the syntax script assumes fixed source When you create a new fortran file, the syntax script assumes fixed source
...@@ -1242,54 +1242,54 @@ recognized, as will construct names at the end of a do, if, select or forall ...@@ -1242,54 +1242,54 @@ recognized, as will construct names at the end of a do, if, select or forall
construct. construct.
Non-default fortran dialects ~ Non-default fortran dialects ~
The syntax script supports five Fortran dialects: f95, f90, f77, the Lahey The syntax script supports two Fortran dialects: f08 and F. You will probably
subset elf90, and the Imagine1 subset F. However, these dialects are outdated; find the default highlighting (f08) satisfactory. A few legacy constructs
the next version of the syntax script will support only two variants: modern deleted or declared obsolescent in the 2008 standard are highlighted as todo
Fortran and legacy Fortran. items.
If you use f77 with extensions, even common ones like do/enddo loops, do/while If you use F, the advantage of setting the dialect appropriately is that
loops and free source form that are supported by most f77 compilers including other legacy features excluded from F will be highlighted as todo items and
g77 (GNU Fortran), then you will probably find the default highlighting that free source form will be assumed.
satisfactory. However, if you use strict f77 with no extensions, not even free
source form or the MIL STD 1753 extensions, then the advantages of setting the The dialect can be selected in various ways. If all your fortran files use
dialect to f77 are that names such as SUM are recognized as user variable the same dialect, set the global variable fortran_dialect in your .vimrc prior
names and not highlighted as f9x intrinsic functions, that obsolete constructs to your syntax on statement. The case-sensitive, permissible values of
such as ASSIGN statements are not highlighted as todo items, and that fixed fortran_dialect are "f08" or "F". Invalid values of fortran_dialect are
source form will be assumed. ignored.
If you use elf90 or F, the advantage of setting the dialect appropriately is If the dialect depends upon the file extension, then it is most convenient to
that f90 features excluded from these dialects will be highlighted as todo set a buffer-local variable in a ftplugin file. For more information on
items and that free source form will be assumed as required for these ftplugin files, see |ftplugin|. For example, if all your fortran files with
dialects. an .f90 extension are written in the F subset, your ftplugin file should
contain the code >
The dialect can be selected by setting the variable fortran_dialect. The
permissible values of fortran_dialect are case-sensitive and must be "f95",
"f90", "f77", "elf" or "F". Invalid values of fortran_dialect are ignored.
If all your fortran files use the same dialect, set fortran_dialect in your
.vimrc prior to your syntax on statement. If the dialect depends upon the file
extension, then it is most convenient to set it in a ftplugin file. For more
information on ftplugin files, see |ftplugin|. For example, if all your
fortran files with an .f90 extension are written in the elf subset, your
ftplugin file should contain the code >
let s:extfname = expand("%:e") let s:extfname = expand("%:e")
if s:extfname ==? "f90" if s:extfname ==? "f90"
let fortran_dialect="elf" let b:fortran_dialect="F"
else else
unlet! fortran_dialect unlet! b:fortran_dialect
endif endif
Note that this will work only if the "filetype plugin indent on" command Note that this will work only if the "filetype plugin indent on" command
precedes the "syntax on" command in your .vimrc file. precedes the "syntax on" command in your .vimrc file.
Finer control is necessary if the file extension does not uniquely identify Finer control is necessary if the file extension does not uniquely identify
the dialect. You can override the default dialect, on a file-by-file basis, by the dialect. You can override the default dialect, on a file-by-file basis,
including a comment with the directive "fortran_dialect=xx" (where xx=f77 or by including a comment with the directive "fortran_dialect=xx" (where xx=F or
elf or F or f90 or f95) in one of the first three lines in your file. For f08) in one of the first three lines in your file. For example, your older .f
example, your older .f files may be written in extended f77 but your newer files may be legacy code but your newer ones may be F codes, and you would
ones may be F codes, and you would identify the latter by including in the identify the latter by including in the first three lines of those files a
first three lines of those files a Fortran comment of the form > Fortran comment of the form >
! fortran_dialect=F ! fortran_dialect=F
F overrides elf if both directives are present.
For previous versions of the syntax, you may have set fortran_dialect to the
now-obsolete values "f77", "f90", "f95", or "elf". Such settings will be
silently handled as "f08". Users of "elf" may wish to experiment with "F"
instead.
The syntax/fortran.vim script contains embedded comments that tell you how to
comment and/or uncomment some lines to (a) activate recognition of some
non-standard, vendor-supplied intrinsics and (b) to prevent features deleted
or declared obsolescent in the 2008 standard from being highlighted as todo
items.
Limitations ~ Limitations ~
Parenthesis checking does not catch too few closing parentheses. Hollerith Parenthesis checking does not catch too few closing parentheses. Hollerith
......
...@@ -1243,6 +1243,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* ...@@ -1243,6 +1243,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
+writebackup various.txt /*+writebackup* +writebackup various.txt /*+writebackup*
+xfontset various.txt /*+xfontset* +xfontset various.txt /*+xfontset*
+xim various.txt /*+xim* +xim various.txt /*+xim*
+xpm_w32 various.txt /*+xpm_w32*
+xsmp various.txt /*+xsmp* +xsmp various.txt /*+xsmp*
+xsmp_interact various.txt /*+xsmp_interact* +xsmp_interact various.txt /*+xsmp_interact*
+xterm_clipboard various.txt /*+xterm_clipboard* +xterm_clipboard various.txt /*+xterm_clipboard*
...@@ -4791,6 +4792,7 @@ beval_col-variable eval.txt /*beval_col-variable* ...@@ -4791,6 +4792,7 @@ beval_col-variable eval.txt /*beval_col-variable*
beval_lnum-variable eval.txt /*beval_lnum-variable* beval_lnum-variable eval.txt /*beval_lnum-variable*
beval_text-variable eval.txt /*beval_text-variable* beval_text-variable eval.txt /*beval_text-variable*
beval_winnr-variable eval.txt /*beval_winnr-variable* beval_winnr-variable eval.txt /*beval_winnr-variable*
bitwise-function usr_41.txt /*bitwise-function*
blockwise-examples visual.txt /*blockwise-examples* blockwise-examples visual.txt /*blockwise-examples*
blockwise-operators visual.txt /*blockwise-operators* blockwise-operators visual.txt /*blockwise-operators*
blockwise-register change.txt /*blockwise-register* blockwise-register change.txt /*blockwise-register*
...@@ -7041,8 +7043,8 @@ objects index.txt /*objects* ...@@ -7041,8 +7043,8 @@ objects index.txt /*objects*
obtaining-exted netbeans.txt /*obtaining-exted* obtaining-exted netbeans.txt /*obtaining-exted*
ocaml.vim syntax.txt /*ocaml.vim* ocaml.vim syntax.txt /*ocaml.vim*
octal eval.txt /*octal* octal eval.txt /*octal*
octal-nrformats options.txt /*octal-nrformats*
octal-number eval.txt /*octal-number* octal-number eval.txt /*octal-number*
octal-number options.txt /*octal-number*
oldfiles-variable eval.txt /*oldfiles-variable* oldfiles-variable eval.txt /*oldfiles-variable*
ole-activation if_ole.txt /*ole-activation* ole-activation if_ole.txt /*ole-activation*
ole-eval if_ole.txt /*ole-eval* ole-eval if_ole.txt /*ole-eval*
...@@ -8357,13 +8359,27 @@ vimdev intro.txt /*vimdev* ...@@ -8357,13 +8359,27 @@ vimdev intro.txt /*vimdev*
vimdiff diff.txt /*vimdiff* vimdiff diff.txt /*vimdiff*
vimfiles options.txt /*vimfiles* vimfiles options.txt /*vimfiles*
viminfo starting.txt /*viminfo* viminfo starting.txt /*viminfo*
viminfo-! options.txt /*viminfo-!*
viminfo-% options.txt /*viminfo-%*
viminfo-' options.txt /*viminfo-'*
viminfo-/ options.txt /*viminfo-\/*
viminfo-: options.txt /*viminfo-:*
viminfo-< options.txt /*viminfo-<*
viminfo-@ options.txt /*viminfo-@*
viminfo-c options.txt /*viminfo-c*
viminfo-encoding starting.txt /*viminfo-encoding* viminfo-encoding starting.txt /*viminfo-encoding*
viminfo-errors starting.txt /*viminfo-errors* viminfo-errors starting.txt /*viminfo-errors*
viminfo-f options.txt /*viminfo-f*
viminfo-file starting.txt /*viminfo-file* viminfo-file starting.txt /*viminfo-file*
viminfo-file-marks starting.txt /*viminfo-file-marks* viminfo-file-marks starting.txt /*viminfo-file-marks*
viminfo-file-name starting.txt /*viminfo-file-name* viminfo-file-name starting.txt /*viminfo-file-name*
viminfo-h options.txt /*viminfo-h*
viminfo-n options.txt /*viminfo-n*
viminfo-quote options.txt /*viminfo-quote*
viminfo-r options.txt /*viminfo-r*
viminfo-read starting.txt /*viminfo-read* viminfo-read starting.txt /*viminfo-read*
viminfo-read-write starting.txt /*viminfo-read-write* viminfo-read-write starting.txt /*viminfo-read-write*
viminfo-s options.txt /*viminfo-s*
viminfo-write starting.txt /*viminfo-write* viminfo-write starting.txt /*viminfo-write*
vimrc starting.txt /*vimrc* vimrc starting.txt /*vimrc*
vimrc-filetype usr_05.txt /*vimrc-filetype* vimrc-filetype usr_05.txt /*vimrc-filetype*
......
*todo.txt* For Vim version 7.3. Last change: 2012 Jan 10 *todo.txt* For Vim version 7.3. Last change: 2012 Jan 20
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -38,32 +38,35 @@ Go through more coverity reports. ...@@ -38,32 +38,35 @@ Go through more coverity reports.
Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10) Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10)
Compilation problem on z/OS, POUND is equal to '#', duplicate case.
(Stephen Bovy, 2011 Dec 16)
Once syntax and other runtime files have been fixed: add "set cp" to Once syntax and other runtime files have been fixed: add "set cp" to
check.vim. Use a function to run both with 'cp' and 'nocp'. check.vim. Use a function to run both with 'cp' and 'nocp'.
Patch to fix regression caused by 7.3.251. (Christian Brabandt, 2012 Jan 5) Win32: When the taskbar is at the top of the screen creating the tabbar causes
the window to move unnecessarily. (William E. Skeith III, 2012 Jan 12)
Patch to make ":helpgrep" work with non-UTF-8 encoding. (Yasuhiro Matsumoto, Patch: 2012 Jan 13
2011 Nov 28, update later that day)
Patch to fix messing up terminal when redrawing too early. (Christian Patch for using DBCS encoding in user command. (Yasuhiro Matsumoto, 2012 Jan
Brabandt, 2012 Jan 5) 15) Update Jan 17.
Patch to fix member confusion in Lua interface. (Taro Muraoka, 2012 Jan 8) Repeating search history entries. (Edwin Steiner, 2012 Jan 17)
Update Jan 9. Jan 18: Caused by patch 7.3.265?
Carvalho will merge the patch.
Possible quickfix bug: Audrius Kažukauskas, 2012 Jan 6 Hang in using VimEnter. (Alex Efros, 2012 Jan 14)
Problem reading german spell file? (Jan Stocker, 2012 Jan 5) ":cd" doesn't work when current directory path contains wildcards.
finddir() has the same problem. (Yukihiro Nakadaira, 2012 Jan 10)
Win32: When a directory name contains an exclamation mark, completion doesn't Win32: When a directory name contains an exclamation mark, completion doesn't
complete the contents of the directory. No escaping for the "!"? (Jan complete the contents of the directory. No escaping for the "!"? (Jan
Stocker, 2012 Jan 5) Stocker, 2012 Jan 5)
Patch to add support for Solaris ZFS ACLs. (Danek Duvall, 2012 Jan 13)
Patch to make continued lines work faster. (Yasuhiro Matsumoto, 2012 Jan 11)
Also an idea to make join() faster. (Yasuhiro Matsumoto, 2012 Jan 11)
Another one from Taro Muraoka, 2012 Jan 12.
":doau" says it triggers modeline. Should this only happen for events used ":doau" says it triggers modeline. Should this only happen for events used
when loading a buffer? (Kana Natsuno, 2011 Nov 7) when loading a buffer? (Kana Natsuno, 2011 Nov 7)
...@@ -103,6 +106,10 @@ overwritten. (Felipe G. Nievinski, 2011 Dec 22) ...@@ -103,6 +106,10 @@ overwritten. (Felipe G. Nievinski, 2011 Dec 22)
side effect. side effect.
Patch by Kana Natsuno, 2011 Nov 12. Patch by Kana Natsuno, 2011 Nov 12.
Patch to fix member confusion in Lua interface. (Taro Muraoka, 2012 Jan 8)
Update Jan 9.
Carvalho merged the patch: New version 2012 Jan 19.
Patch for option in 'cino' to specify more indent for continued conditions. Patch for option in 'cino' to specify more indent for continued conditions.
(Lech Lorens, 2011 Nov 27) (Lech Lorens, 2011 Nov 27)
Isn't this already possible? Isn't this already possible?
...@@ -136,6 +143,8 @@ And one for gui_x11.txt. ...@@ -136,6 +143,8 @@ And one for gui_x11.txt.
Problem with l: dictionary being locked in a function. (ZyX, 2011 Jul 21) Problem with l: dictionary being locked in a function. (ZyX, 2011 Jul 21)
Issue 48: foldopen error can't be caught by try/catch
Patch to sort functions starting with '<' after others. Omit dict functions, Patch to sort functions starting with '<' after others. Omit dict functions,
they can't be called. (Yasuhiro Matsumoto, 2011 Oct 11) they can't be called. (Yasuhiro Matsumoto, 2011 Oct 11)
...@@ -180,6 +189,9 @@ New feature, requires testing. Made some remarks. ...@@ -180,6 +189,9 @@ New feature, requires testing. Made some remarks.
Win32: Patch for alpha-blended icons and toolbar height. (Sergiu Dotenco, 2011 Win32: Patch for alpha-blended icons and toolbar height. (Sergiu Dotenco, 2011
Sep 17) Asked for feedback from others. Sep 17) Asked for feedback from others.
Win32: Cannot cd into a directory that starts with a space. (Andy Wokula, 2012
Jan 19)
Need to escape $HOME on Windows? (ZyX, 2011 Jul 21) Need to escape $HOME on Windows? (ZyX, 2011 Jul 21)
"2" in 'formatopions' not working in comments. (Christian Corneliussen, 2011 "2" in 'formatopions' not working in comments. (Christian Corneliussen, 2011
...@@ -803,8 +815,6 @@ the buffer to be unmodified. ...@@ -803,8 +815,6 @@ the buffer to be unmodified.
Unfinished patch by Ian Kelling, 2008 Jul 11. Followup Jul 14, need to have Unfinished patch by Ian Kelling, 2008 Jul 11. Followup Jul 14, need to have
another look at it. another look at it.
Patch for c.vim and cpp.vim syntax files. (Chung-chieh Shan, 2008 Nov 26)
c.vim: XXX in a comment is colored yellow, but not when it's after "#if 0". c.vim: XXX in a comment is colored yellow, but not when it's after "#if 0".
(Ilya Dogolazky, 2009 Aug 7) (Ilya Dogolazky, 2009 Aug 7)
......
*various.txt* For Vim version 7.3. Last change: 2012 Jan 04 *various.txt* For Vim version 7.3. Last change: 2012 Jan 15
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -363,30 +363,30 @@ N *+multi_lang* non-English language support |multi-lang| ...@@ -363,30 +363,30 @@ N *+multi_lang* non-English language support |multi-lang|
m *+mzscheme* Mzscheme interface |mzscheme| m *+mzscheme* Mzscheme interface |mzscheme|
m *+mzscheme/dyn* Mzscheme interface |mzscheme-dynamic| |/dyn| m *+mzscheme/dyn* Mzscheme interface |mzscheme-dynamic| |/dyn|
m *+netbeans_intg* |netbeans| m *+netbeans_intg* |netbeans|
m *+ole* Win32 GUI only: |ole-interface| m *+ole* Win32 GUI only: |ole-interface|
N *+path_extra* Up/downwards search in 'path' and 'tags' N *+path_extra* Up/downwards search in 'path' and 'tags'
m *+perl* Perl interface |perl| m *+perl* Perl interface |perl|
m *+perl/dyn* Perl interface |perl-dynamic| |/dyn| m *+perl/dyn* Perl interface |perl-dynamic| |/dyn|
N *+persistent_undo* Persistent undo |undo-persistence| N *+persistent_undo* Persistent undo |undo-persistence|
*+postscript* |:hardcopy| writes a PostScript file *+postscript* |:hardcopy| writes a PostScript file
N *+printer* |:hardcopy| command N *+printer* |:hardcopy| command
H *+profile* |:profile| command H *+profile* |:profile| command
m *+python* Python 2 interface |python| m *+python* Python 2 interface |python|
m *+python/dyn* Python 2 interface |python-dynamic| |/dyn| m *+python/dyn* Python 2 interface |python-dynamic| |/dyn|
m *+python3* Python 3 interface |python| m *+python3* Python 3 interface |python|
m *+python3/dyn* Python 3 interface |python-dynamic| |/dyn| m *+python3/dyn* Python 3 interface |python-dynamic| |/dyn|
N *+quickfix* |:make| and |quickfix| commands N *+quickfix* |:make| and |quickfix| commands
N *+reltime* |reltime()| function, 'hlsearch'/'incsearch' timeout, N *+reltime* |reltime()| function, 'hlsearch'/'incsearch' timeout,
'redrawtime' option 'redrawtime' option
B *+rightleft* Right to left typing |'rightleft'| B *+rightleft* Right to left typing |'rightleft'|
m *+ruby* Ruby interface |ruby| m *+ruby* Ruby interface |ruby|
m *+ruby/dyn* Ruby interface |ruby-dynamic| |/dyn| m *+ruby/dyn* Ruby interface |ruby-dynamic| |/dyn|
N *+scrollbind* |'scrollbind'| N *+scrollbind* |'scrollbind'|
B *+signs* |:sign| B *+signs* |:sign|
N *+smartindent* |'smartindent'| N *+smartindent* |'smartindent'|
m *+sniff* SniFF interface |sniff| m *+sniff* SniFF interface |sniff|
N *+startuptime* |--startuptime| argument N *+startuptime* |--startuptime| argument
N *+statusline* Options 'statusline', 'rulerformat' and special N *+statusline* Options 'statusline', 'rulerformat' and special
formats of 'titlestring' and 'iconstring' formats of 'titlestring' and 'iconstring'
m *+sun_workshop* |workshop| m *+sun_workshop* |workshop|
N *+syntax* Syntax highlighting |syntax| N *+syntax* Syntax highlighting |syntax|
......
" Vim ftplugin file
" Language: Erlang
" Author: Oscar Hellström <oscar@oscarh.net>
" Contributors: Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
" Eduardo Lopez (http://github.com/tapichu)
" License: Vim license
" Version: 2011/11/21
if exists('b:did_ftplugin')
finish
else
let b:did_ftplugin = 1
endif
if exists('s:did_function_definitions')
call s:SetErlangOptions()
finish
else
let s:did_function_definitions = 1
endif
if !exists('g:erlang_keywordprg')
let g:erlang_keywordprg = 'erl -man'
endif
if !exists('g:erlang_folding')
let g:erlang_folding = 0
endif
" Local settings
function s:SetErlangOptions()
compiler erlang
if version >= 700
setlocal omnifunc=erlang_complete#Complete
endif
if g:erlang_folding
setlocal foldmethod=expr
setlocal foldexpr=GetErlangFold(v:lnum)
setlocal foldtext=ErlangFoldText()
endif
setlocal comments=:%%%,:%%,:%
setlocal commentstring=%%s
setlocal formatoptions+=ro
let &l:keywordprg = g:erlang_keywordprg
endfunction
" Define folding functions
if !exists('*GetErlangFold')
" Folding params
let s:erlang_fun_begin = '^\a\w*(.*$'
let s:erlang_fun_end = '^[^%]*\.\s*\(%.*\)\?$'
let s:erlang_blank_line = '^\s*\(%.*\)\?$'
" Auxiliary fold functions
function s:GetNextNonBlank(lnum)
let lnum = nextnonblank(a:lnum + 1)
let line = getline(lnum)
while line =~ s:erlang_blank_line && 0 != lnum
let lnum = nextnonblank(lnum + 1)
let line = getline(lnum)
endwhile
return lnum
endfunction
function s:GetFunName(str)
return matchstr(a:str, '^\a\w*(\@=')
endfunction
function s:GetFunArgs(str, lnum)
let str = a:str
let lnum = a:lnum
while str !~ '->\s*\(%.*\)\?$'
let lnum = s:GetNextNonBlank(lnum)
if 0 == lnum " EOF
return ''
endif
let str .= getline(lnum)
endwhile
return matchstr(str,
\ '\(^(\s*\)\@<=.*\(\s*)\(\s\+when\s\+.*\)\?\s\+->\s*\(%.*\)\?$\)\@=')
endfunction
function s:CountFunArgs(arguments)
let pos = 0
let ac = 0 " arg count
let arguments = a:arguments
" Change list / tuples into just one A(rgument)
let erlang_tuple = '{\([A-Za-z_,|=\-\[\]]\|\s\)*}'
let erlang_list = '\[\([A-Za-z_,|=\-{}]\|\s\)*\]'
" FIXME: Use searchpair?
while arguments =~ erlang_tuple
let arguments = substitute(arguments, erlang_tuple, 'A', 'g')
endwhile
" FIXME: Use searchpair?
while arguments =~ erlang_list
let arguments = substitute(arguments, erlang_list, 'A', 'g')
endwhile
let len = strlen(arguments)
while pos < len && pos > -1
let ac += 1
let pos = matchend(arguments, ',\s*', pos)
endwhile
return ac
endfunction
" Main fold function
function GetErlangFold(lnum)
let lnum = a:lnum
let line = getline(lnum)
if line =~ s:erlang_fun_end
return '<1'
endif
if line =~ s:erlang_fun_begin && foldlevel(lnum - 1) == 1
return '1'
endif
if line =~ s:erlang_fun_begin
return '>1'
endif
return '='
endfunction
" Erlang fold description (foldtext function)
function ErlangFoldText()
let foldlen = v:foldend - v:foldstart
if 1 < foldlen
let lines = 'lines'
else
let lines = 'line'
endif
let line = getline(v:foldstart)
let name = s:GetFunName(line)
let arguments = s:GetFunArgs(strpart(line, strlen(name)), v:foldstart)
let argcount = s:CountFunArgs(arguments)
let retval = '+' . v:folddashes . ' ' . name . '/' . argcount
let retval .= ' (' . foldlen . ' ' . lines . ')'
return retval
endfunction
endif
call s:SetErlangOptions()
" Vim filetype plugin file " Vim filetype plugin file
" Language: Logcheck " Language: Logcheck
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
" Last Change: 2010 Jul 29 " Last Change: 2012 Jan 15
" License: GNU GPL, version 2.0 " License: Vim License
" URL: http://hg.debian.org/hg/pkg-vim/vim/file/unstable/runtime/ftplugin/logcheck.vim " URL: http://hg.debian.org/hg/pkg-vim/vim/file/unstable/runtime/ftplugin/logcheck.vim
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
......
" Vim filetype plugin file " Vim filetype plugin file
" Language: PostScript " Language: PostScript
" Maintainer: Mike Williams <mrw@eandem.co.uk> " Maintainer: Mike Williams <mrw@eandem.co.uk>
" Last Change: 27th June 2002 " Last Change: 16th January 2012
" Only do this when not done yet for this buffer " Only do this when not done yet for this buffer
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
...@@ -11,6 +11,9 @@ endif ...@@ -11,6 +11,9 @@ endif
" Don't load another plugin for this buffer " Don't load another plugin for this buffer
let b:did_ftplugin = 1 let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
" PS comment formatting " PS comment formatting
setlocal comments=b:% setlocal comments=b:%
setlocal formatoptions-=t formatoptions+=rol setlocal formatoptions-=t formatoptions+=rol
...@@ -21,11 +24,12 @@ if !exists("b:match_words") ...@@ -21,11 +24,12 @@ if !exists("b:match_words")
let b:match_words = '<<:>>,\<begin\>:\<end\>,\<save\>:\<restore\>,\<gsave\>:\<grestore\>' let b:match_words = '<<:>>,\<begin\>:\<end\>,\<save\>:\<restore\>,\<gsave\>:\<grestore\>'
endif endif
set cpo-=C
" Define patterns for the browse file filter " Define patterns for the browse file filter
if has("gui_win32") && !exists("b:browsefilter") if has("gui_win32") && !exists("b:browsefilter")
let b:browsefilter = "PostScript Files (*.ps)\t*.ps\n" . let b:browsefilter = "PostScript Files (*.ps)\t*.ps\n" .
\ "EPS Files (*.eps)\t*.eps\n" . \ "EPS Files (*.eps)\t*.eps\n" .
\ "All Files (*.*)\t*.*\n" \ "All Files (*.*)\t*.*\n"
endif endif
let &cpo = s:cpo_save
unlet s:cpo_save
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment