summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-03-22 14:05:35 +0100
committerBram Moolenaar <Bram@vim.org>2011-03-22 14:05:35 +0100
commit662db673f9fca628d8e1a7ac4fae3be41dee5d1c (patch)
treeb8224db3a196a36c87f40e55cfab5de5c936bee5
parente9d4b58dda5ce38389617079722cf9bfcd966599 (diff)
Updated runtime files.
-rw-r--r--runtime/doc/change.txt5
-rw-r--r--runtime/doc/editing.txt13
-rw-r--r--runtime/doc/eval.txt6
-rw-r--r--runtime/doc/indent.txt10
-rw-r--r--runtime/doc/pattern.txt5
-rw-r--r--runtime/doc/tags1
-rw-r--r--runtime/doc/todo.txt86
-rw-r--r--runtime/doc/usr_41.txt7
-rw-r--r--runtime/doc/various.txt8
-rw-r--r--runtime/filetype.vim27
-rw-r--r--runtime/ftplugin/treetop.vim19
-rw-r--r--runtime/indent/treetop.vim38
-rw-r--r--runtime/lang/menu_ko_kr.euckr.vim22
-rw-r--r--runtime/lang/menu_ko_kr.utf-8.vim22
-rw-r--r--runtime/syntax/r.vim111
-rw-r--r--runtime/syntax/rhelp.vim58
-rw-r--r--runtime/syntax/treetop.vim110
-rw-r--r--runtime/syntax/upstart.vim112
-rw-r--r--src/po/it.po92
19 files changed, 604 insertions, 148 deletions
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index 19528edc19..fe518d1502 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -1,4 +1,4 @@
-*change.txt* For Vim version 7.3. Last change: 2010 Jul 29
+*change.txt* For Vim version 7.3. Last change: 2011 Feb 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -690,7 +690,8 @@ reason is that the flags can only be found by skipping the pattern, and in
order to skip the pattern the "magicness" must be known. Catch 22!
If the {pattern} for the substitute command is empty, the command uses the
-pattern from the last substitute or ":global" command. With the [r] flag, the
+pattern from the last substitute or ":global" command. If there is none, but
+there is a previous search pattern, that one is used. With the [r] flag, the
command uses the pattern from the last substitute, ":global", or search
command.
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt
index 26f712f180..17a8ca3839 100644
--- a/runtime/doc/editing.txt
+++ b/runtime/doc/editing.txt
@@ -1,4 +1,4 @@
-*editing.txt* For Vim version 7.3. Last change: 2011 Jan 27
+*editing.txt* For Vim version 7.3. Last change: 2011 Feb 26
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -276,10 +276,11 @@ If you want to keep the changed buffer without saving it, switch on the
'readonly' option for this buffer. {not in Vi}
*CTRL-^* *CTRL-6*
-CTRL-^ Edit the alternate file (equivalent to ":e #").
- Mostly the alternate file is the previously edited
- file. This is a quick way to toggle between two
- files.
+CTRL-^ Edit the alternate file. Mostly the alternate file is
+ the previously edited file. This is a quick way to
+ toggle between two files. It is equivalent to ":e #",
+ except that it also works when there is no file name.
+
If the 'autowrite' or 'autowriteall' option is on and
the buffer was changed, write it.
Mostly the ^ character is positioned on the 6 key,
@@ -1387,6 +1388,8 @@ To set the default method, used for new files, use one of these in your
|vimrc| file: >
set cm=zip
set cm=blowfish
+The message given for reading and writing a file will show "[crypted]" when
+using zip, "[blowfish]" when using blowfish.
When writing an undo file, the same key and method will be used for the text
in the undo file. |persistent-undo|.
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index c599e8a932..8c464a85cb 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.3. Last change: 2011 Feb 11
+*eval.txt* For Vim version 7.3. Last change: 2011 Mar 18
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -7072,7 +7072,9 @@ This would call the function "my_func_whizz(parameter)".
is terminated.
Example: >
:try | throw "oops" | catch /^oo/ | echo "caught" | endtry
-<
+< Note that "catch" may need to be on a separate line
+ for when an error causes the parsing to skip the whole
+ line and not see the "|" that separates the commands.
*:ec* *:echo*
:ec[ho] {expr1} .. Echoes each {expr1}, with a space in between. The
diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt
index 617b776ccc..3e06aaacf6 100644
--- a/runtime/doc/indent.txt
+++ b/runtime/doc/indent.txt
@@ -1,4 +1,4 @@
-*indent.txt* For Vim version 7.3. Last change: 2011 Jan 09
+*indent.txt* For Vim version 7.3. Last change: 2011 Mar 18
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -320,9 +320,11 @@ assume a 'shiftwidth' of 4.
BaseClass(3) BaseClass(3)
{} {}
<
- +N Indent a continuation line (a line that spills onto the next) N
- additional characters. (default 'shiftwidth').
- When the previous line ended in a backslash it's doubled.
+ +N Indent a continuation line (a line that spills onto the next)
+ inside a function N additional characters. (default
+ 'shiftwidth').
+ Outside of a function, when the previous line ended in a
+ backslash, the 2 * N is used.
cino= cino=+10 >
a = b + 9 * a = b + 9 *
diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt
index 12a9d6dde8..0fd31d658f 100644
--- a/runtime/doc/pattern.txt
+++ b/runtime/doc/pattern.txt
@@ -1,4 +1,4 @@
-*pattern.txt* For Vim version 7.3. Last change: 2010 Jul 20
+*pattern.txt* For Vim version 7.3. Last change: 2011 Feb 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -214,7 +214,8 @@ The last used pattern and offset are remembered. They can be used to repeat
the search, possibly in another direction or with another count. Note that
two patterns are remembered: One for 'normal' search commands and one for the
substitute command ":s". Each time an empty pattern is given, the previously
-used pattern is used.
+used pattern is used. However, if there is no previous search command, a
+previous substitute pattern is used, if possible.
The 'magic' option sticks with the last used pattern. If you change 'magic',
this will not change how the last used pattern will be interpreted.
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 836baad99f..dcc11c8a94 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -3206,6 +3206,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
<reg> map.txt /*<reg>*
<register> map.txt /*<register>*
<sfile> cmdline.txt /*<sfile>*
+<slnum> cmdline.txt /*<slnum>*
<xCSI> intro.txt /*<xCSI>*
<xDown> term.txt /*<xDown>*
<xEnd> term.txt /*<xEnd>*
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index df2176debe..ec951836d7 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.3. Last change: 2011 Feb 25
+*todo.txt* For Vim version 7.3. Last change: 2011 Mar 22
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,11 +30,43 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
-New r and rhelp syntax files. (Jakson Alves de Aquino, 2011 Feb 20)
+The :z command doesn't work exactly as it should. (ChangZhuo Chen, 2011 Mar 2)
-In file message show "blowfish" instead of "crypted" when using blowfish.
+Crash with ":python help(dir)". (Kearn Holliday, 2011 Mar 19)
+I can reproduce it. Don't know why it happens.
-Patch to fix drag-n-drop in KDE. (Florian Degner, 2011 Feb 23)
+Compare with how old Vi works and with posix spec. terminal is 80 x 24,
+'scroll' option set to 11.
+
+Update Bavarian tutor. (Sepp Hell, 2011 Mar 10)
+
+After ":set t_kb=" ":set t_kb" gives an error, should report an empty string.
+Can do ":set t_xy=foo", need to check for valid name.
+
+Menu File/Close should close a tab if it's not the last one and it
+contains only one window (Jean Johner)
+Patch by Ben Schmidt (7 maart)
+
+Patch to update .hgtags (Ben Haskell, 2011 Mar 8)
+Also hints how to add a tag after committing a patch.
+
+Patch for slow write: undefined symbols with FEAT_CLIENTSERVER.
+Alternative tests. (Krasilnikov)
+
+When opening file from windows explorer, characters inside [] cause
+problems, even though double quotes are used. (Manuel Stol, 2011 Mar 9)
+
+Patch for Vim indent file. (Cocular, 2011 Mar)
+
+:help c_Esc should work, but only :help c_<Esc> does.
+
+Patch to change the meaning of \n in substitute(). (motoya kurotsu, 2011 Mar 8)
+
+New version of Pascal indent file. (Neil Carter, 2011 Mar 9)
+
+Help file foldexpr (ZyX)
+
+upstart syntax file (James Hunt, Mar 11 2011)
Syntax region with 'concealends' and a 'cchar' value, 'conceallevel' set to 2,
only one of the two ends gets the cchar displayed. (Brett Stahlman, 2010 Aug
@@ -43,15 +75,24 @@ only one of the two ends gets the cchar displayed. (Brett Stahlman, 2010 Aug
Bug in repeating Visual "u". (Lawrence Kesteloot, 2010 Dec 20)
Crash with big .xpm file. (Yukihiro Nakadaira, 2011 Feb 18)
+Patch from Ben Schmidt (2011 Mar 3). Needs some more work.
+
+Patch for disappearing cursor after netbeans command. (Xavier de Gaye, 2011
+Mar 4)
Windows keys not set properly on Windows 7? (cncyber, 2010 Aug 26)
+Compiler scripts for fortran (Hong Xu, 2011 March 19)
+
This line hangs Vim, because of syntax HL:
call append(line, "INFO ....12....18....24....30....36....42....48....54....60....66....72....78%$")
Building the MingW version without clipboard but with multi-byte doesn't
work. (Bill Lam, 2010 Sep 18)
+Patch for handling of NL in substitute() with \= expression. (Motoya Kurotsu,
+2011 Mar 16)
+
When using a Vim server, a # in the path causes an error message.
(Jeff Lanzarotta, 2011 Feb 17)
@@ -68,7 +109,7 @@ On 64 bit MS-Windows "long" is only 32 bits, but we sometimes need to store a
right type.
Patch to improve mf_hash, dynamic sizing. (Ivan Krasilnikov, 2010 Dec 17)
-Needs tests.
+Update with tests: 2011 Feb 28.
string() can't parse back "inf" and "nan". Fix documentation or fix code?
(ZyX, 2010 Aug 23)
@@ -82,12 +123,14 @@ Update Nov 19. James Vega: still not right. Christian: it's difficult.
Patch to add up to 99 match groups. (Christian Brabandt, 2010 Dec 22)
Also add named groups: \%{name}(re) and \%{name}g
-Patch to use pattern from last :s when there is no last search pattern.
-(Christian Brabandt, 2011 Jan 24) Would this break anything?
-
Bug in try/catch: return with invalid compare throws error that isn't caught.
(ZyX, 2011 Jan 26)
+Improvement patch for filetype.vim. (Thilo Six, 2011 Mar 19)
+
+Patch for "+ and "* getting same selection when "a" is not in 'guioptions'.
+(James Vega, 2011 Mar 17)
+
Highlighting stops working after changing it many times. Script to reproduce
it: Pablo Contreras, 2010 Oct 12 Windows XP and 7. Font is never freed?
@@ -98,6 +141,10 @@ Build problem with small features on Mac OS X 10.6. (Rainer, 2011 Jan 24)
"0g@$" puts '] on last byte of multi-byte. (ZyX, 2011 Jan 22)
+Deleting a linewise selection that includes the last line of the file leaves
+an empty line. (Ben Schmidt, 2011 Mar 17)
+Patch by Christian Brabandt, 2011 Mar 19.
+
Two patches for xxd. (Florian Zumbiehl, 2011 Jan 11)
Two updates for second one Jan 12.
@@ -140,6 +187,9 @@ doesn't look right. (Dominique Pelle, 2010 Aug 8)
GTK: tear-off menu does not work. (Kurt Sonnenmoser, 2010 Oct 25)
+Win32: tear-off menu does not work when menu language is German. (Markus
+Bossler, 2011 Mar 2) Fixed by 7.3.095?
+
Patch for adding 's' option to 'cino', C++ namespace indenting. (Konstantin
Lepa, 2011 Jan 18)
@@ -174,6 +224,9 @@ New esperanto spell file can't be processed. (Dominique Pelle, 2011 Jan 30)
- instead of a regexp use a hashtable. Expand '?', '*", '+'. What would be
the maximum repeat for * and +?
+"L'Italie" noted as a spell error at start of the sentence. (Dominique Pelle,
+2011 Feb 27)
+
Copy/paste between Vim and Google chrome doesn't work well for multi-byte
characters. (Ben Haskell, 2010 Sep 17)
When putting text in the cut buffer (when exiting) and conversion doesn't work
@@ -200,6 +253,9 @@ Nov 25)
GTK: Patch to fix menu popping down. (Hong Xu, 2010 Dec 4, Dec 5)
Update 2011 Feb 3.
+Patch to use pipes on Win32. (Vincent Berthoux, 2011 Feb 28)
+Update Mar 1 using 'shelltemp'.
+
Python: Adding line to buffer other than the current one doesn't work
correctly. (Rozbujnik, 2010 Dec 19)
@@ -279,8 +335,6 @@ Patch to make more characters work in dialogs. (Yankwei Jia, 2010 Aug 4)
Patch for VisVim, pass file name to VimOpenFile. (Jiri Sedlak, 2010 Nov 12)
-":com" changes the multi-byte text of :echo. (Dimitar Dimitrov, 2011 Feb 11)
-
When 'lines' is 25 and 'scrolloff' is 12, "j" scrolls zero or two lines
instead of one. (Constantin Pan, 2010 Sep 10)
@@ -397,6 +451,9 @@ find out why.
When completion inserts the first match, it may trigger the line to be folded.
Disable updating folds while completion is active? (Peter Odding, 2010 Jun 9)
+Using ":call foo#d.f()" doesn't autoload the "foo.vim" file. Works OK for
+echo, just not for ":call" and ":call call()". (Ted, 2011 Mar 17)
+
In command line window ":close" doesn't work properly. (Tony Mechelynck, 2009
Jun 1)
@@ -2334,6 +2391,9 @@ Problems that will (probably) not be solved:
- Win32, MS-Windows XP: $HOME uses the wrong drive when the user profiles
are not on the boot disk. This is caused by a wrong value of $HOMEDRIVE.
This is a bug in XP, see MSKB article 818134.
+- Win32, MS-Windows: expanding plugin/**/*.vim also picks up
+ dir/ctags.vim,v. This is because the short file name is something like
+ "ctags~1.vim" and that matches the pattern.
- SunOS 5.5.1 with Motif: The file open dialog does not have a horizontal
scroll bar for the "files" selection. This is a problem in the Motif
libraries, get a patch from Sun.
@@ -3752,6 +3812,10 @@ Insert mode:
<< "y";
9 "} else" causes following lines to be indented too much. (Rouben
Rostamian, 2008 Aug 30)
+9 Wrapping a variable initialization should have extra indent:
+ char * veryLongName =
+ "very long string"
+ Also check if "cino=+10" is used correctly.
8 Lisp indenting: "\\" confuses the indenter. (Dorai Sitaram, 2006 May 17)
8 Why are continuation lines outside of a {} block not indented? E.g.:
long_type foo =
@@ -4057,6 +4121,8 @@ Searching:
Use "&/" for searching the text in the Visual area?
9 Add "v" offset: "/pat/v": search for pattern and start Visual mode on the
matching text.
+8 Add a modifier to interpret a space like "\_s\+" to make it much easier to
+ search for a phrase.
8 Add a mechanism for recursiveness: "\@(([^()]*\@g[^()]*)\)". \@g stands
for "go recursive here" and \@( \) marks the recursive part.
Perl does it this way:
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 8342f76a2f..d319a08368 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -661,7 +661,14 @@ Floating point computation: *float-functions*
sqrt() square root
sin() sine
cos() cosine
+ tan() tangent
+ asin() arc sine
+ acos() arc cosine
atan() arc tangent
+ atan2() arc tangent
+ sinh() hyperbolic sine
+ cosh() hyperbolic cosine
+ tanh() hyperbolic tangent
Variables: *var-functions*
type() type of a variable
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index 3b3aa14142..2fd3c2094f 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -1,4 +1,4 @@
-*various.txt* For Vim version 7.3. Last change: 2011 Feb 01
+*various.txt* For Vim version 7.3. Last change: 2011 Mar 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -133,14 +133,14 @@ g8 Print the hex values of the bytes used in the
specified with {range}, or around the current line
if there is no {range}. If there is a {count}, that's
how many lines you'll see; if there is only one window
- then the 'window' option is used, otherwise the
- current window size is used.
+ then twice the value of the 'scroll' option is used,
+ otherwise the current window height minus 3 is used.
:z can be used either alone or followed by any of
several punctuation marks. These have the following
effect:
- mark first line last line new location ~
+ mark first line last line new cursor line ~
---- ---------- --------- ------------
+ current line 1 scr forward 1 scr forward
- 1 scr back current line current line
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 3b01aaf42b..509092547a 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2011 Feb 23
+" Last Change: 2011 Mar 22
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -325,7 +325,7 @@ au BufNewFile,BufRead */.calendar/*,
au BufNewFile,BufRead *.cs setf cs
" Cabal
-au BufNewFile,BufRead *.cabal setf cabal
+au BufNewFile,BufRead *.cabal setf cabal
" Cdrdao TOC
au BufNewFile,BufRead *.toc setf cdrtoc
@@ -536,7 +536,7 @@ au BufNewFile,BufRead *.qc setf c
au BufNewFile,BufRead *.cfg setf cfg
" Cucumber
-au BufNewFile,BufRead *.feature setf cucumber
+au BufNewFile,BufRead *.feature setf cucumber
" Communicating Sequential Processes
au BufNewFile,BufRead *.csp,*.fdr setf csp
@@ -678,7 +678,7 @@ au BufNewFile,BufRead *.exp setf expect
au BufNewFile,BufRead exports setf exports
" Falcon
-au BufNewFile,BufRead *.fal setf falcon
+au BufNewFile,BufRead *.fal setf falcon
" Fantom
au BufNewFile,BufRead *.fan,*.fwt setf fan
@@ -779,7 +779,7 @@ au BufNewFile,BufRead *.haml setf haml
au BufNewFile,BufRead *.hsc,*.hsm setf hamster
" Haskell
-au BufNewFile,BufRead *.hs,*.hs-boot setf haskell
+au BufNewFile,BufRead *.hs,*.hs-boot setf haskell
au BufNewFile,BufRead *.lhs setf lhaskell
au BufNewFile,BufRead *.chs setf chaskell
@@ -872,7 +872,9 @@ func! s:ProtoCheck(default)
" Cproto files have a comment in the first line and a function prototype in
" the second line, it always ends in ";". Indent files may also have
" comments, thus we can't match comments to see the difference.
- if getline(2) =~ ';$'
+ " IDL files can have a single ';' in the second line, require at least one
+ " chacter before the ';'.
+ if getline(2) =~ '.;$'
setf cpp
else
exe 'setf ' . a:default
@@ -1405,7 +1407,7 @@ au BufNewFile,BufRead *.it,*.ih setf ppwiz
" Obj 3D file format
" TODO: is there a way to avoid MS-Windows Object files?
-au BufNewFile,BufRead *.obj setf obj
+au BufNewFile,BufRead *.obj setf obj
" Oracle Pro*C/C++
au BufNewFile,BufRead *.pc setf proc
@@ -1650,7 +1652,7 @@ au BufNewFile,BufRead *.sa setf sather
au BufNewFile,BufRead *.sci,*.sce setf scilab
" SCSS
-au BufNewFile,BufRead *.scss setf scss
+au BufNewFile,BufRead *.scss setf scss
" SD: Streaming Descriptors
au BufNewFile,BufRead *.sd setf sd
@@ -1811,7 +1813,7 @@ endfunc
" Z-Shell script
au BufNewFile,BufRead .zprofile,/etc/zprofile,.zfbfmarks setf zsh
au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh')
-au BufNewFile,BufRead *.zsh setf zsh
+au BufNewFile,BufRead *.zsh setf zsh
" Scheme
au BufNewFile,BufRead *.scm,*.ss setf scheme
@@ -2101,6 +2103,9 @@ au BufNewFile,BufRead *.tf,.tfrc,tfrc setf tf
" TPP - Text Presentation Program
au BufNewFile,BufReadPost *.tpp setf tpp
+" Treetop
+au BufRead,BufNewFile *.treetop setf treetop
+
" Trustees
au BufNewFile,BufRead trustees.conf setf trustees
@@ -2131,6 +2136,10 @@ au BufNewFile,BufRead *.uc setf uc
" Updatedb
au BufNewFile,BufRead /etc/updatedb.conf setf updatedb
+" Upstart (init(8)) config files
+au BufNewFile,BufRead */etc/init/*.conf,~/.init/*.conf setf upstart
+au BufNewFile,BufRead */etc/init/*.override,~/.init/*.override setf upstart
+
" Vera
au BufNewFile,BufRead *.vr,*.vri,*.vrh setf vera
diff --git a/runtime/ftplugin/treetop.vim b/runtime/ftplugin/treetop.vim
new file mode 100644
index 0000000000..2da3c405f5
--- /dev/null
+++ b/runtime/ftplugin/treetop.vim
@@ -0,0 +1,19 @@
+" Vim filetype plugin file
+" Language: Treetop
+" Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2011-03-14
+
+if exists("b:did_ftplugin")
+ finish
+endif
+let b:did_ftplugin = 1
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+setlocal comments=b:# commentstring=#\ %s formatoptions-=tcroq formatoptions+=l
+
+let b:undo_ftplugin = "setl com< cms< fo<"
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/indent/treetop.vim b/runtime/indent/treetop.vim
new file mode 100644
index 0000000000..a2af78b8c2
--- /dev/null
+++ b/runtime/indent/treetop.vim
@@ -0,0 +1,38 @@
+" Vim indent file
+" Language: Treetop
+" Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2011-03-14
+
+if exists("b:did_indent")
+ finish
+endif
+let b:did_indent = 1
+
+setlocal indentexpr=GetTreetopIndent()
+setlocal indentkeys=0{,0},!^F,o,O,=end
+setlocal nosmartindent
+
+if exists("*GetTreetopIndent")
+ finish
+endif
+
+function GetTreetopIndent()
+ let pnum = prevnonblank(v:lnum - 1)
+ if pnum == 0
+ return 0
+ endif
+
+ let ind = indent(pnum)
+ let line = getline(pnum)
+
+ if line =~ '^\s*\%(grammar\|module\|rule\)\>'
+ let ind += &sw
+ endif
+
+ let line = getline(v:lnum)
+ if line =~ '^\s*end\>'
+ let ind -= &sw
+ end
+
+ retur ind
+endfunction
diff --git a/runtime/lang/menu_ko_kr.euckr.vim b/runtime/lang/menu_ko_kr.euckr.vim
index 11809cf9c5..84be04dd06 100644
--- a/runtime/lang/menu_ko_kr.euckr.vim
+++ b/runtime/lang/menu_ko_kr.euckr.vim
@@ -1,6 +1,6 @@
" Menu Translations: Korean
" Maintainer: SungHyun Nam <goweol@gmail.com>
-" Last Change: 2010 Feb 18
+" Last Change: 2011 Mar 22
" Quit when menu translations have already been done.
if exists("did_menu_trans")
@@ -42,7 +42,7 @@ menutrans E&xit<Tab>:qa (&x)<Tab>:qa
" Edit menu
menutrans &Edit (&E)
menutrans &Undo<Tab>u (&U)<Tab>u
-menutrans &Redo<Tab>^R ٽ (&R)<Tab>^R
+menutrans &Redo<Tab>^R ٽ\ (&R)<Tab>^R
menutrans Rep&eat<Tab>\. Ǯ(&e)<Tab>\.
menutrans Cu&t<Tab>"+x ڸ(&t)<Tab>"+x
menutrans &Copy<Tab>"+y (&C)<Tab>"+y
@@ -63,7 +63,7 @@ menutrans Toggle\ &Ignore-case<Tab>:set\ ic! ҹ\ \ (&I)<Tab>:set\
menutrans Toggle\ &Showmatch<Tab>:set\ sm! Showmatch\ (&S)<Tab>:set\ sm!
menutrans &Context\ lines ؽƮ\ (&C)
menutrans &Virtual\ Edit \ (&V)
-menutrans Never
+menutrans Never \ \
menutrans Block\ Selection \
menutrans Insert\ mode \
menutrans Block\ and\ Insert \
@@ -92,7 +92,7 @@ menutrans Toggle\ &auto-indent<Tab>:set\ ai! ڵεƮ\ (&a)<Tab>:set\ ai!
menutrans Toggle\ &C-indenting<Tab>:set\ cin! C-ε\ (&C)<Tab>:set\ cin!
" other options
-menutrans &Shiftwidth Ʈ ʺ(&S)
+menutrans &Shiftwidth Ʈ\ ʺ(&S)
menutrans Soft\ &Tabstop Ʈ\ ǽ(&T)
menutrans Te&xt\ Width\.\.\. ؽƮ\ ʺ(&x)\.\.\.
menutrans &File\ Format\.\.\. \ (&F)\.\.\.
@@ -125,12 +125,12 @@ menutrans &Find\ More\ Languages ٸ\ \ ã(&F)
" Tools.Fold Menu
menutrans &Folding (&F)
" open close folds
-menutrans &Enable/Disable\ folds<Tab>zi \ \ \ (&E)<Tab>zi
+menutrans &Enable/Disable\ folds<Tab>zi \ \ (&E)<Tab>zi
menutrans &View\ Cursor\ Line<Tab>zv Ŀ\ \ (&V)<Tab>zv
menutrans Vie&w\ Cursor\ Line\ only<Tab>zMzx Ŀ\ ٸ\ (&w)<Tab>zMzx
menutrans C&lose\ more\ folds<Tab>zm \ \ \ ݱ(&l)<Tab>zm
-menutrans &Close\ all\ folds<Tab>zM \ κ\ \ (&C)<Tab>zM
-menutrans O&pen\ more\ folds<Tab>zr \ \ (&p)<Tab>zr
+menutrans &Close\ all\ folds<Tab>zM \ \ ݱ(&C)<Tab>zM
+menutrans O&pen\ more\ folds<Tab>zr \ \ \ (&p)<Tab>zr
menutrans &Open\ all\ folds<Tab>zR \ κ\ \ (&O)<Tab>zR
" fold method
menutrans Fold\ Met&hod \ (&h)
@@ -141,11 +141,11 @@ menutrans S&yntax ý(&y)
"menutrans &Diff &Diff
menutrans Ma&rker ǥ(&r)
" create and delete folds
-menutrans Create\ &Fold<Tab>zf (&F)<Tab>zf
-menutrans &Delete\ Fold<Tab>zd (&D)<Tab>zd
-menutrans Delete\ &All\ Folds<Tab>zD \ (&A)<Tab>zD
+menutrans Create\ &Fold<Tab>zf \ (&F)<Tab>zf
+menutrans &Delete\ Fold<Tab>zd \ (&D)<Tab>zd
+menutrans Delete\ &All\ Folds<Tab>zD \ \ (&A)<Tab>zD
" moving around in folds
-menutrans Fold\ column\ &width \ ĭ\ ʺ(&w)
+menutrans Fold\ column\ &width \ ÷\ ʺ(&w)
"menutrans &Diff &Diff
menutrans &Update (&U)
diff --git a/runtime/lang/menu_ko_kr.utf-8.vim b/runtime/lang/menu_ko_kr.utf-8.vim
index ef461737c0..93f85511f9 100644
--- a/runtime/lang/menu_ko_kr.utf-8.vim
+++ b/runtime/lang/menu_ko_kr.utf-8.vim
@@ -1,6 +1,6 @@
" Menu Translations: Korean
" Maintainer: SungHyun Nam <goweol@gmail.com>
-" Last Change: 2010 Feb 18
+" Last Change: 2011 Mar 22
" Quit when menu translations have already been done.
if exists("did_menu_trans")
@@ -42,7 +42,7 @@ menutrans E&xit<Tab>:qa 끝내기(&x)<Tab>:qa
" Edit menu
menutrans &Edit 편집(&E)
menutrans &Undo<Tab>u 취소(&U)<Tab>u
-menutrans &Redo<Tab>^R 다시 실행(&R)<Tab>^R
+menutrans &Redo<Tab>^R 다시\ 실행(&R)<Tab>^R
menutrans Rep&eat<Tab>\. 되풀이(&e)<Tab>\.
menutrans Cu&t<Tab>"+x 자르기(&t)<Tab>"+x
menutrans &Copy<Tab>"+y 복사(&C)<Tab>"+y
@@ -63,7 +63,7 @@ menutrans Toggle\ &Ignore-case<Tab>:set\ ic! 대소문자\ 구분\ 토글(&I)<Ta
menutrans Toggle\ &Showmatch<Tab>:set\ sm! Showmatch\ 토글(&S)<Tab>:set\ sm!
menutrans &Context\ lines 콘텍스트\ 줄(&C)
menutrans &Virtual\ Edit 가상\ 편집(&V)
-menutrans Never 사용 안 함
+menutrans Never 사용\ 안\ 함
menutrans Block\ Selection 블럭\ 고르기
menutrans Insert\ mode 삽입\ 모드
menutrans Block\ and\ Insert 블럭과\ 삽입
@@ -92,7 +92,7 @@ menutrans Toggle\ &auto-indent<Tab>:set\ ai! 자동인덴트\ 토글(&a)<Tab>:se
menutrans Toggle\ &C-indenting<Tab>:set\ cin! C-인덴팅\ 토글(&C)<Tab>:set\ cin!
" other options
-menutrans &Shiftwidth 쉬프트 너비(&S)
+menutrans &Shiftwidth 쉬프트\ 너비(&S)
menutrans Soft\ &Tabstop 소프트\ 탭스톱(&T)
menutrans Te&xt\ Width\.\.\. 텍스트\ 너비(&x)\.\.\.
menutrans &File\ Format\.\.\. 파일\ 형식(&F)\.\.\.
@@ -125,12 +125,12 @@ menutrans &Find\ More\ Languages 다른\ 언어\ 찾기(&F)
" Tools.Fold Menu
menutrans &Folding 접기(&F)
" open close folds
-menutrans &Enable/Disable\ folds<Tab>zi 접는\ 기능\ 사용\ 토글(&E)<Tab>zi
+menutrans &Enable/Disable\ folds<Tab>zi 접기\ 사용\ 토글(&E)<Tab>zi
menutrans &View\ Cursor\ Line<Tab>zv 커서\ 줄\ 보기(&V)<Tab>zv
menutrans Vie&w\ Cursor\ Line\ only<Tab>zMzx 커서\ 줄만\ 보기(&w)<Tab>zMzx
menutrans C&lose\ more\ folds<Tab>zm 더\ 많은\ 접기\ 닫기(&l)<Tab>zm
-menutrans &Close\ all\ folds<Tab>zM 접힌\ 부분\ 모두\ 접기(&C)<Tab>zM
-menutrans O&pen\ more\ folds<Tab>zr 더 많은\ 접기\ 열기(&p)<Tab>zr
+menutrans &Close\ all\ folds<Tab>zM 모든\ 접기\ 닫기(&C)<Tab>zM
+menutrans O&pen\ more\ folds<Tab>zr 더\ 많은\ 접기\ 열기(&p)<Tab>zr
menutrans &Open\ all\ folds<Tab>zR 접힌\ 부분\ 모두\ 펴기(&O)<Tab>zR
" fold method
menutrans Fold\ Met&hod 접는\ 방법(&h)
@@ -141,11 +141,11 @@ menutrans S&yntax 신택스(&y)
"menutrans &Diff &Diff
menutrans Ma&rker 꼬리표(&r)
" create and delete folds
-menutrans Create\ &Fold<Tab>zf 새로 접기(&F)<Tab>zf
-menutrans &Delete\ Fold<Tab>zd 완전히 펴기(&D)<Tab>zd
-menutrans Delete\ &All\ Folds<Tab>zD 모두\ 펴기(&A)<Tab>zD
+menutrans Create\ &Fold<Tab>zf 접기\ 생성(&F)<Tab>zf
+menutrans &Delete\ Fold<Tab>zd 접기\ 삭제(&D)<Tab>zd
+menutrans Delete\ &All\ Folds<Tab>zD 모든\ 접기\ 삭제(&A)<Tab>zD
" moving around in folds
-menutrans Fold\ column\ &width 접을\ 칸\ 너비(&w)
+menutrans Fold\ column\ &width 접기\ 컬럼\ 너비(&w)
"menutrans &Diff &Diff
menutrans &Update 갱신(&U)
diff --git a/runtime/syntax/r.vim b/runtime/syntax/r.vim
index 7d98e92b74..8912ba191e 100644
--- a/runtime/syntax/r.vim
+++ b/runtime/syntax/r.vim
@@ -3,13 +3,18 @@
" Maintainer: Jakson Aquino <jalvesaq@gmail.com>
" Former Maintainers: Vaidotas Zemlys <zemlys@gmail.com>
" Tom Payne <tom@tompayne.org>
-" Last Change: Wed Sep 29, 2010 09:31AM
+" Last Change: Sun Feb 20, 2011 12:06PM
" Filenames: *.R *.r *.Rhistory *.Rt
"
" NOTE: The highlighting of R functions is defined in the
" r-plugin/functions.vim, which is part of vim-r-plugin2:
" http://www.vim.org/scripts/script.php?script_id=2628
"
+" CONFIGURATION:
+" syntax folding can be turned on by
+"
+" let r_syntax_folding = 1
+"
" Some lines of code were borrowed from Zhuojun Chen.
if exists("b:current_syntax")
@@ -18,18 +23,30 @@ endif
setlocal iskeyword=@,48-57,_,.
+if exists("g:r_syntax_folding")
+ setlocal foldmethod=syntax
+endif
+
syn case match
" Comment
syn match rComment contains=@Spell "\#.*"
-" string enclosed in double quotes
-syn region rString contains=rSpecial,rStrError,@Spell start=/"/ skip=/\\\\\|\\"/ end=/"/
-" string enclosed in single quotes
-syn region rString contains=rSpecial,rStrError,@Spell start=/'/ skip=/\\\\\|\\'/ end=/'/
+if &filetype == "rhelp"
+ " string enclosed in double quotes
+ syn region rString contains=rSpecial,@Spell start=/"/ skip=/\\\\\|\\"/ end=/"/
+ " string enclosed in single quotes
+ syn region rString contains=rSpecial,@Spell start=/'/ skip=/\\\\\|\\'/ end=/'/
+else
+ " string enclosed in double quotes
+ syn region rString contains=rSpecial,rStrError,@Spell start=/"/ skip=/\\\\\|\\"/ end=/"/
+ " string enclosed in single quotes
+ syn region rString contains=rSpecial,rStrError,@Spell start=/'/ skip=/\\\\\|\\'/ end=/'/
+endif
syn match rStrError display contained "\\."
+
" New line, carriage return, tab, backspace, bell, feed, vertical tab, backslash
syn match rSpecial display contained "\\\(n\|r\|t\|b\|a\|f\|v\|'\|\"\)\|\\\\"
@@ -42,9 +59,6 @@ syn match rSpecial display contained "\\U\x\{1,8}"
syn match rSpecial display contained "\\u{\x\{1,4}}"
syn match rSpecial display contained "\\U{\x\{1,8}}"
-
-syn match rDollar "\$"
-
" Statement
syn keyword rStatement break next return
syn keyword rConditional if else
@@ -54,26 +68,18 @@ syn keyword rRepeat for in repeat while
syn keyword rConstant T F LETTERS letters month.ab month.name pi
syn keyword rConstant R.version.string
-" Constant
+syn keyword rNumber NA_integer_ NA_real_ NA_complex_ NA_character_
+
+" Constants
syn keyword rConstant NULL
syn keyword rBoolean FALSE TRUE
-syn keyword rNumber NA NA_integer_ NA_real_ NA_complex_ NA_character_
-syn keyword rNumber Inf NaN
+syn keyword rNumber NA Inf NaN
" integer
syn match rInteger "\<\d\+L"
syn match rInteger "\<0x\([0-9]\|[a-f]\|[A-F]\)\+L"
syn match rInteger "\<\d\+[Ee]+\=\d\+L"
-syn match rOperator "[\*\!\&\+\-\<\>\=\^\|\~\`/:@]"
-syn match rOperator "%\{2}\|%\*%\|%\/%\|%in%\|%o%\|%x%"
-
-syn match rComplex "\<\d\+i"
-syn match rComplex "\<0x\([0-9]\|[a-f]\|[A-F]\)\+i"
-syn match rComplex "\<\d\+\.\d*\([Ee][-+]\=\d\+\)\=i"
-syn match rComplex "\<\.\d\+\([Ee][-+]\=\d\+\)\=i"
-syn match rComplex "\<\d\+[Ee][-+]\=\d\+i"
-
" number with no fractional part or exponent</