diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-04-18 21:55:01 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-04-18 21:55:01 +0000 |
commit | c1e37901fc8486c9960d7290e521ba51e292e94b (patch) | |
tree | 5367e8f83d9d313dd73c0499fd310f57df5e605f | |
parent | a93fa7ee7856b54d3778e613c7b7e4b76aaeb2af (diff) |
updated for version 7.0e02v7.0e02
46 files changed, 10896 insertions, 4853 deletions
diff --git a/runtime/autoload/htmlcomplete.vim b/runtime/autoload/htmlcomplete.vim index 61d2a09d9b..c663e3c6b0 100644 --- a/runtime/autoload/htmlcomplete.vim +++ b/runtime/autoload/htmlcomplete.vim @@ -1,7 +1,7 @@ " Vim completion script -" Language: XHTML 1.0 Strict +" Language: HTML (XHTML 1.0 Strict by default) " Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) -" Last Change: 2006 Mar 25 +" Last Change: 2006 Apr 17 function! htmlcomplete#CompleteTags(findstart, base) if a:findstart @@ -159,12 +159,12 @@ function! htmlcomplete#CompleteTags(findstart, base) if exists("b:entitiescompl") unlet! b:entitiescompl - if !exists("g:xmldata_xhtml10s") - runtime! autoload/xml/xhtml10s.vim - "call htmlcomplete#LoadData() + if !exists("g:html_omni") + "runtime! autoload/xml/xhtml10s.vim + call htmlcomplete#LoadData() endif - let entities = g:xmldata_xhtml10s['vimxmlentities'] + let entities = g:html_omni['vimxmlentities'] if len(a:base) == 1 for m in entities @@ -443,29 +443,7 @@ function! htmlcomplete#CompleteTags(findstart, base) let attrname = matchstr(attr, '.*\ze\s*=') let entered_value = matchstr(attr, ".*=\\s*[\"']\\zs.*") let values = [] - if attrname == 'media' - let values = ["screen", "tty", "tv", "projection", "handheld", "print", "braille", "aural", "all"] - elseif attrname == 'xml:space' - let values = ["preserve"] - elseif attrname == 'shape' - let values = ["rect", "circle", "poly", "default"] - elseif attrname == 'valuetype' - let values = ["data", "ref", "object"] - elseif attrname == 'method' - let values = ["get", "post"] - elseif attrname == 'dir' - let values = ["ltr", "rtl"] - elseif attrname == 'frame' - let values = ["void", "above", "below", "hsides", "lhs", "rhs", "vsides", "box", "border"] - elseif attrname == 'rules' - let values = ["none", "groups", "rows", "all"] - elseif attrname == 'align' - let values = ["left", "center", "right", "justify", "char"] - elseif attrname == 'valign' - let values = ["top", "middle", "bottom", "baseline"] - elseif attrname == 'scope' - let values = ["row", "col", "rowgroup", "colgroup"] - elseif attrname == 'href' + if attrname == 'href' " Now we are looking for local anchors defined by name or id if entered_value =~ '^#' let file = join(getline(1, line('$')), ' ') @@ -476,18 +454,12 @@ function! htmlcomplete#CompleteTags(findstart, base) let values += ['#'.matchstr(i, "^[a-zA-Z][a-zA-Z0-9%_-]*")] endfor endif - elseif attrname == 'type' - if context =~ '^input' - let values = ["text", "password", "checkbox", "radio", "submit", "reset", "file", "hidden", "image", "button"] - elseif context =~ '^button' - let values = ["button", "submit", "reset"] - elseif context =~ '^style' - let values = ["text/css"] - elseif context =~ '^script' - let values = ["text/javascript"] - endif else - return [] + if has_key(g:html_omni, tag) && has_key(g:html_omni[tag][1], attrname) + let values = g:html_omni[tag][1][attrname] + else + return [] + endif endif if len(values) == 0 @@ -518,13 +490,12 @@ function! htmlcomplete#CompleteTags(findstart, base) let sbase = matchstr(context, '.*\ze\s.*') " Load data {{{ - if !exists("g:xmldata_xhtml10s") - runtime! autoload/xml/xhtml10s.vim - "call htmlcomplete#LoadData() + if !exists("g:html_omni_gen") + call htmlcomplete#LoadData() endif " }}} " - let attrs = keys(g:xmldata_xhtml10s[tag][1]) + let attrs = keys(g:html_omni[tag][1]) for m in sort(attrs) if m =~ '^'.attr @@ -534,13 +505,13 @@ function! htmlcomplete#CompleteTags(findstart, base) endif endfor let menu = res + res2 - if has_key(g:xmldata_xhtml10s, 'vimxmlattrinfo') + if has_key(g:html_omni, 'vimxmlattrinfo') let final_menu = [] for i in range(len(menu)) let item = menu[i] - if has_key(g:xmldata_xhtml10s['vimxmlattrinfo'], item) - let m_menu = g:xmldata_xhtml10s['vimxmlattrinfo'][item][0] - let m_info = g:xmldata_xhtml10s['vimxmlattrinfo'][item][1] + if has_key(g:html_omni['vimxmlattrinfo'], item) + let m_menu = g:html_omni['vimxmlattrinfo'][item][0] + let m_info = g:html_omni['vimxmlattrinfo'][item][1] if m_menu !~ 'Bool' let item .= '="' endif @@ -569,9 +540,9 @@ function! htmlcomplete#CompleteTags(findstart, base) endif endif " Load data {{{ - if !exists("g:xmldata_xhtml10s") - runtime! autoload/xml/xhtml10s.vim - "call htmlcomplete#LoadData() + if !exists("g:html_omni") + "runtime! autoload/xml/xhtml10s.vim + call htmlcomplete#LoadData() endif " }}} " Tag completion {{{ @@ -580,15 +551,15 @@ function! htmlcomplete#CompleteTags(findstart, base) " MM: TODO: GLOT works always the same but with some weird situation it " behaves as intended in HTML but screws in PHP let g:ot = opentag - if opentag == '' || &ft == 'php' && !has_key(g:xmldata_xhtml10s, opentag) + if opentag == '' || &ft == 'php' && !has_key(g:html_omni, opentag) " Hack for sometimes failing GetLastOpenTag. " As far as I tested fail isn't GLOT fault but problem " of invalid document - not properly closed tags and other mish-mash. " Also when document is empty. Return list of *all* tags. - let tags = keys(g:xmldata_xhtml10s) + let tags = keys(g:html_omni) call filter(tags, 'v:val !~ "^vimxml"') else - let tags = g:xmldata_xhtml10s[opentag][0] + let tags = g:html_omni[opentag][0] endif " }}} @@ -600,13 +571,13 @@ function! htmlcomplete#CompleteTags(findstart, base) endif endfor let menu = res + res2 - if has_key(g:xmldata_xhtml10s, 'vimxmltaginfo') + if has_key(g:html_omni, 'vimxmltaginfo') let final_menu = [] for i in range(len(menu)) let item = menu[i] - if has_key(g:xmldata_xhtml10s['vimxmltaginfo'], item) - let m_menu = g:xmldata_xhtml10s['vimxmltaginfo'][item][0] - let m_info = g:xmldata_xhtml10s['vimxmltaginfo'][item][1] + if has_key(g:html_omni['vimxmltaginfo'], item) + let m_menu = g:html_omni['vimxmltaginfo'][item][0] + let m_info = g:html_omni['vimxmltaginfo'][item][1] else let m_menu = '' let m_info = '' @@ -621,4 +592,27 @@ function! htmlcomplete#CompleteTags(findstart, base) " }}} endif endfunction + +function! htmlcomplete#LoadData() " {{{ + if !exists("g:html_omni_flavor") + let g:html_omni_flavor = 'xhtml10s' + endif + exe 'runtime! autoload/xml/'.g:html_omni_flavor.'.vim' + " This one is necessary because we don't know if + " g:html_omni_flavor file exists and was sourced + " Proper checking for files would require iterating through 'rtp' + " and could introduce OS dependent mess. + if !exists("g:xmldata_".g:html_omni_flavor) + let g:html_omni_flavor = 'xhtml10s' + runtime! autoload/xml/xhtml10s.vim + endif + + exe 'let g:html_omni = g:xmldata_'.g:html_omni_flavor + + " Free some memory + exe 'unlet! g:xmldata_'.g:html_omni_flavor + + "call htmlcomplete#LoadData() +endfunction +" }}} " vim:set foldmethod=marker: diff --git a/runtime/autoload/xml/xhtml10s.vim b/runtime/autoload/xml/xhtml10s.vim index 1d15cef153..2fe68cdd23 100644 --- a/runtime/autoload/xml/xhtml10s.vim +++ b/runtime/autoload/xml/xhtml10s.vim @@ -1460,9 +1460,21 @@ let g:xmldata_xhtml10s = { \ 'style' : [[], \ { \ 'lang' : [], -\ 'media' : [], +\ 'media' : [ +\ 'screen', +\ 'tty', +\ 'tv', +\ 'projection', +\ 'handheld', +\ 'print', +\ 'braille', +\ 'aural', +\ 'all' +\ ], \ 'title' : [], -\ 'type' : [], +\ 'type' : [ +\ 'text/css' +\ ], \ 'xml:space' : [ \ 'preserve' \ ], @@ -3342,7 +3354,17 @@ let g:xmldata_xhtml10s = { \ ], \ 'onkeydown' : [], \ 'onkeyup' : [], -\ 'media' : [], +\ 'media' : [ +\ 'screen', +\ 'tty', +\ 'tv', +\ 'projection', +\ 'handheld', +\ 'print', +\ 'braille', +\ 'aural', +\ 'all' +\ ], \ 'href' : [], \ 'onmouseup' : [], \ 'id' : [], @@ -3369,7 +3391,9 @@ let g:xmldata_xhtml10s = { \ 'BOOL' \ ], \ 'src' : [], -\ 'type' : [], +\ 'type' : [ +\ 'text/javascript' +\ ], \ 'charset' : [], \ 'xml:space' : [ \ 'preserve' diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index 550bb3007d..1b6d59771b 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1,4 +1,4 @@ -*insert.txt* For Vim version 7.0e. Last change: 2006 Apr 14 +*insert.txt* For Vim version 7.0e. Last change: 2006 Apr 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1103,7 +1103,7 @@ Vim can display the matches in a simplistic popup menu. The menu is used when: - The 'completeopt' option contains "menu" or "menuone". - The terminal supports at least 8 colors. -- There are at least two matches. +- There are at least two matches. One of "menuone" is used. The 'pumheight' option can be used to set a maximum height. The default is to use all space available. @@ -1264,6 +1264,26 @@ Note: Completion may fail in badly formatted documents. In such case try to run |:make| command to detect formatting problems. +HTML flavor *html-flavor* + +By default HTML completion provides completion for XHTML 1.0 Strict. This is +not the only HTML version. To use another data file and still have benefits of +custom completion for class, style, etc. attributes set g:html_omni_flavor +variable. Example (in .vimrc or filetype plugin file): > + + let g:html_omni_flavor = 'xhtml10t' + +Data for HTML completion will be read from 'autoload/xml/xhtml10t.vim' file +located somewhere in 'runtimepath' (not in default distribution). + +More about format of data file in |xml-omni-datafile|. Some of data files may +in future be found on vim-online site (|www|). + +Note that g:html_omni_flavor may point to file with any XML data. This makes +possible to mix PHP (|ft-php-omni|) completion with whatever XML dialect +(assuming you have data file for it). + + JAVASCRIPT *ft-javascript-omni* Completion of most elements of JavaScript language and DOM elements. @@ -1479,10 +1499,23 @@ In example are visible four special elements: names, as value two element List for additional menu info and long description. -Note: Tag names in data file MUST not contain namespace description. Check +Note: Tag names in data file MUST not contain namespace description. Check xsl.vim for example. +DTD -> Vim *dtd2vim* + +On |www| is script |dtd2vim| which parses DTD and creates XML data file +for Vim XML omni completion. + + dtd2vim: http://www.vim.org/scripts/script.php?script_id=1462 + +Check there and beginning of file for details of usage. +Script requires perl and: + + perlSGML: http://savannah.nongnu.org/projects/perlsgml + + Commands :XMLns {name} [{namespace}] *:XMLns* diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt index af12147ba4..8555788520 100644 --- a/runtime/doc/motion.txt +++ b/runtime/doc/motion.txt @@ -1,4 +1,4 @@ -*motion.txt* For Vim version 7.0e. Last change: 2006 Jan 02 +*motion.txt* For Vim version 7.0e. Last change: 2006 Apr 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1059,7 +1059,8 @@ The result is that when repeating CTRL-O you will get back to old positions only once. When the |:keepjumps| command modifier is used, jumps are not stored in the -jumplist. +jumplist. Jumps are also not stored in other cases, e.g., in a |:global| +command. You can explicitly add a jump by setting the ' mark. After the CTRL-O command that got you into line 1154 you could give another jump command (e.g., "G"). The jump list would then become: diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 2cfd730124..1b18f804c9 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.0e. Last change: 2006 Apr 12 +*options.txt* For Vim version 7.0e. Last change: 2006 Apr 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1651,10 +1651,11 @@ A jump table for the options with a short description can be found at |Q_op|. Useful when there is additional information about the match, e.g., what file it comes from. - longest Only insert the longest common text of the matches. Use - CTRL-L to add more characters. Whether case is ignored - depends on the kind of completion. For buffer text the - 'ignorecase' option is used. + longest Only insert the longest common text of the matches. If + the menu is displayed you can use CTRL-L to add more + characters. Whether case is ignored depends on the kind + of completion. For buffer text the 'ignorecase' option is + used. preview Show extra information about the currently selected completion in the preview window. diff --git a/runtime/doc/tags b/runtime/doc/tags index a327261d90..e8d6853fea 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -4984,6 +4984,7 @@ drag-n-drop gui.txt /*drag-n-drop* drag-n-drop-win32 gui_w32.txt /*drag-n-drop-win32* drag-status-line term.txt /*drag-status-line* dtd.vim syntax.txt /*dtd.vim* +dtd2vim insert.txt /*dtd2vim* dying-variable eval.txt /*dying-variable* e motion.txt /*e* easy starting.txt /*easy* @@ -5716,6 +5717,7 @@ howto howto.txt /*howto* howto.txt howto.txt /*howto.txt* hpterm term.txt /*hpterm* hpterm-color syntax.txt /*hpterm-color* +html-flavor insert.txt /*html-flavor* html.vim syntax.txt /*html.vim* htmlos.vim syntax.txt /*htmlos.vim* http pi_netrw.txt /*http* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 599e3702b9..4f98431a25 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.0e. Last change: 2006 Apr 17 +*todo.txt* For Vim version 7.0e. Last change: 2006 Apr 18 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/usr_44.txt b/runtime/doc/usr_44.txt index 308337a0a2..4c148c4243 100644 --- a/runtime/doc/usr_44.txt +++ b/runtime/doc/usr_44.txt @@ -1,4 +1,4 @@ -*usr_44.txt* For Vim version 7.0e. Last change: 2006 Mar 27 +*usr_44.txt* For Vim version 7.0e. Last change: 2006 Apr 18 VIM USER MANUAL - by Bram Moolenaar @@ -667,8 +667,13 @@ the syntax file "name.vim", 'filetype', b:current_syntax the start of each syntax group (nameType, nameStatement, nameString, etc). Start with a check for "b:current_syntax". If it is defined, some other -syntax file, earlier in 'runtimepath' was already loaded. To be compatible -with Vim 5.8 use: > +syntax file, earlier in 'runtimepath' was already loaded: > + + if exists("b:current_syntax") + finish + endif + +To be compatible with Vim 5.8 use: > if version < 600 syntax clear diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt index 6d0183d51b..4bafdbed59 100644 --- a/runtime/doc/version7.txt +++ b/runtime/doc/version7.txt @@ -1,4 +1,4 @@ -*version7.txt* For Vim version 7.0e. Last change: 2006 Apr 17 +*version7.txt* For Vim version 7.0e. Last change: 2006 Apr 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -350,6 +350,10 @@ When moving the cursor through the text and it is on a paren, then the matching paren can be highlighted. This uses the new |CursorMoved| autocommand event. +This means some commands are executed every time you move the cursor. If this +slows you down too much switch it off with: > + :NoMatchParen + See |matchparen| for more information. The plugin uses the |:match| command. It now supports three match patterns. @@ -890,6 +894,7 @@ BibTeX indent file. (Dorai Sitaram) BTM ftplugin file. (Bram Moolenaar) calendar ftplugin file. (Nikolai Weibull) Changelog indent file. (Nikolai Weibull) +Cmake indent and syntax file. (Andy Cedilnik) conf ftplugin file. (Nikolai Weibull) context syntax and ftplugin file. (Nikolai Weibull) CRM114 ftplugin file. (Nikolai Weibull) @@ -949,6 +954,7 @@ racc syntax and ftplugin file. (Nikolai Weibull) rd syntax file. (Johannes Ranke) readline ftplugin file. (Nikolai Weibull) rhelp syntax file. (Johannes Ranke) +rnoweb syntax file. (Johannes Ranke) Relax NG compact ftplugin file. (Nikolai Weibull) Scheme indent file. (Sergey Khorev) screen ftplugin file. (Nikolai Weibull) @@ -970,6 +976,7 @@ sudoers ftplugin file. (Nikolai Weibull) sysctl syntax and ftplugin file. (Nikolai Weibull) terminfo ftplugin file. (Nikolai Weibull) trustees syntax file. (Nima Talebi) +Vera syntax file. (David Eggum) udev config, permissions and rules syntax and ftplugin files. (Nikolai Weibull) updatedb syntax and ftplugin file. (Nikolai Weibull) VHDL indent file (Gerald Lai) @@ -2520,4 +2527,33 @@ if 'encoding' is a multi-byte encoding. Spell checking: spellbadword() didn't see a missing capital in the first word of a line. Popup menu now only suggest the capitalized word when appropriate. +When using whole line completion CTRL-L moves throught the matches but it +didn't work when at the original text. + +When completion finds the longest match, don't go to the first match but stick +at the original text, so that CTRL-N selects the first one. + +Recognize "zsh-beta" like "zsh" for setting the 'shellpipe' default. (James +Vega) + +When using ":map <expr>" and the expression results in something with a +special byte (NUL or CSI) then it didn't work properly. Now escape special +bytes. + +The default Visual highlighting for a color xterm with 8 colors was a magenta +background, which made magenta text disappear. Now use reverse in this +specific situation. + +After completing the longest match "." didn't insert the same text. Repeating +also didn't work correctly for multi-byte text. + +When using Insert mode completion and BS the whole word that was completed +would result in all possible matches. Now stop completion. Also fixes that +for spell completion the previous word was deleted. + +GTK: When 'encoding' is "latin1" and using non-ASCII characters in a file name +the tab page label was wrong and an error message would be given. + +The taglist() function could hang on a tags line with a non-ASCII character. + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 26463a8be3..2e14397c9b 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: 2006 Apr 15 +" Last Change: 2006 Apr 18 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -427,6 +427,9 @@ au BufNewFile,BufRead *.prg \ setf clipper | \ endif +" Cmake +au BufNewFile,BufRead CMakeLists.txt,*.cmake,*.cmake.in setf cmake + " Cobol au BufNewFile,BufRead *.cbl,*.cob,*.lib setf cobol " cobol or zope form controller python script? (heuristic) @@ -1332,10 +1335,25 @@ au BufNewFile,BufRead *.rib setf rib au BufNewFile,BufRead *.rexx,*.rex setf rexx " R (Splus) -au BufNewFile,BufRead *.s,*.S setf r +if has("fname_case") + au BufNewFile,BufRead *.s,*.S setf r +else + au BufNewFile,BufRead *.s setf r +endif " R Help file -au BufNewFile,BufRead *.rd,*.Rd setf rhelp +if has("fname_case") + au BufNewFile,BufRead *.rd,*.Rd setf rhelp +else + au BufNewFile,BufRead *.rd setf rhelp +endif + +" R noweb file +if has("fname_case") + au BufNewFile,BufRead *.Rnw,*.rnw,*.Snw,*.snw setf rnoweb +else + au BufNewFile,BufRead *.rnw,*.snw setf rnoweb +endif " Rexx, Rebol or R au BufNewFile,BufRead *.r,*.R call s:FTr() @@ -1822,6 +1840,9 @@ au BufNewFile,BufRead *.uc setf uc " Updatedb au BufNewFile,BufRead /etc/updatedb.conf setf updatedb +" Vera +au BufNewFile,BufRead *.vr,*.vri,*.vrh setf vera + " Verilog HDL au BufNewFile,BufRead *.v setf verilog diff --git a/runtime/indent/cmake.vim b/runtime/indent/cmake.vim new file mode 100644 index 0000000000..e36937df5b --- /dev/null +++ b/runtime/indent/cmake.vim @@ -0,0 +1,92 @@ +" ============================================================================= +" +" Program: CMake - Cross-Platform Makefile Generator +" Module: $RCSfile$ +" Language: VIM +" Date: $Date$ +" Version: $Revision$ +" +" ============================================================================= + +" Vim indent file +" Language: CMake (ft=cmake) +" Author: Andy Cedilnik <andy.cedilnik@kitware.com> +" Maintainer: Andy Cedilnik <andy.cedilnik@kitware.com> +" Last Change: $Date$ +" Version: $Revision$ +" +" Licence: The CMake license applies to this file. See +" http://www.cmake.org/HTML/Copyright.html +" This implies that distribution with Vim is allowed + +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal indentexpr=CMakeGetIndent(v:lnum) + +" Only define the function once. +if exists("*CMakeGetIndent") + finish +endif + +fun! CMakeGetIndent(lnum) + let this_line = getline(a:lnum) + + " Find a non-blank line above the current line. + let lnum = a:lnum + let lnum = prevnonblank(lnum - 1) + let previous_line = getline(lnum) + + " Hit the start of the file, use zero indent. + if lnum == 0 + return 0 + endif + + let ind = indent(lnum) + + let or = '\|' + " Regular expressions used by line indentation function. + let cmake_regex_comment = '#.*' + let cmake_regex_identifier = '[A-Za-z][A-Za-z0-9_]*' + let cmake_regex_quoted = '"\([^"\\]\|\\.\)*"' + let cmake_regex_arguments = '\(' . cmake_regex_quoted . + \ or . '\$(' . cmake_regex_identifier . ')' . + \ or . '[^()\\#"]' . or . '\\.' . '\)*' + + let cmake_indent_comment_line = '^\s*' . cmake_regex_comment + let cmake_indent_blank_regex = '^\s*$') + let cmake_indent_open_regex = '^\s*' . cmake_regex_identifier . + \ '\s*(' . cmake_regex_arguments . + \ '\(' . cmake_regex_comment . '\)\?$' + + let cmake_indent_close_regex = '^' . cmake_regex_arguments . + \ ')\s*' . + \ '\(' . cmake_regex_comment . '\)\?$' + + let cmake_indent_begin_regex = '^\s*\(IF\|MACRO\|FOREACH\|ELSE\)\s*(' + let cmake_indent_end_regex = '^\s*\(ENDIF\|ENDFOREACH\|ENDMACRO\|ELSE\)\s*(' + + " Add + if previous_line =~? cmake_indent_comment_line " Handle comments + let ind = ind + else + if previous_line =~? cmake_indent_begin_regex + let ind = ind + &sw + endif + if previous_line =~? cmake_indent_open_regex + let ind = ind + &sw + endif + endif + + " Subtract + if this_line =~? cmake_indent_end_regex + let ind = ind - &sw + endif + if previous_line =~? cmake_indent_close_regex + let ind = ind - &sw + endif + + return ind +endfun diff --git a/runtime/lang/menu_chinese_gb.936.vim b/runtime/lang/menu_chinese_gb.936.vim index 9c3bf6dcd9..55a24422d3 100644 --- a/runtime/lang/menu_chinese_gb.936.vim +++ b/runtime/lang/menu_chinese_gb.936.vim @@ -1,6 +1,8 @@ -" Menu Translations: Simplified Chinese (Windows) -" Translated By: Wang Jun <junw@turbolinux.com.cn> -" Last Change: Tue Sep 4 11:26:52 CST 2001 +" Menu Translations: Simplified Chinese <i18n-translation@lists.linux.net.cn> +" Translated By: Yuheng Xie <elephant@linux.net.cn> +" Last Change: Tue Apr 18 22:00:00 2006 + +" vim: ts=8 sw=8 noet " Quit when menu translations have already been done. if exists("did_menu_trans") @@ -14,62 +16,68 @@ scriptencoding cp936 menutrans &Help 帮助(&H) menutrans &Overview<Tab><F1> 预览(&O)<Tab><F1> menutrans &User\ Manual 用户手册(&U) -menutrans &GUI 图形界面(&G) -menutrans &How-to\ links HOWTO文 |