diff options
Diffstat (limited to 'runtime')
27 files changed, 1955 insertions, 761 deletions
diff --git a/runtime/autoload/htmlcomplete.vim b/runtime/autoload/htmlcomplete.vim index 61d2a09d9..c663e3c6b 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 1d15cef15..2fe68cdd2 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 550bb3007..1b6d59771 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 af12147ba..855578852 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 2cfd73012..1b18f804c 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 a327261d9..e8d6853fe 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 599e3702b..4f98431a2 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 308337a0a..4c148c424 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 6d0183d51..4bafdbed5 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 26463a8be..2e14397c9 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 000000000..e36937df5 --- /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 9c3bf6dcd..55a24422d 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文档\.\.\.(&H) +menutrans &How-to\ links How-to\ 连接(&H) +menutrans &Find\.\.\. 查找(&F)\.\.\. menutrans &Credits 作者(&C) menutrans Co&pying 版权(&P) menutrans &Version 版本(&V) -menutrans &About 关于\ Vim(&A) +menutrans &Sponsor/Register 赞助/注册(&S) +menutrans O&rphans 孤儿(&R) +menutrans &Version 版本(&V) +menutrans &About 关于(&A) " File menu menutrans &File 文件(&F) menutrans &Open\.\.\.<Tab>:e 打开(&O)\.\.\.<Tab>:e -menutrans Sp&lit-Open\.\.\.<Tab>:sp 分割窗口并打开(&L)<Tab>:sp +menutrans Sp&lit-Open\.\.\.<Tab>:sp 分割并打开(&L)\.\.\.<Tab>:sp +menutrans Open\ Tab\.\.\.<Tab>:tabnew 打开标签\.\.\.<Tab>:tabnew menutrans &New<Tab>:enew 新建(&N)<Tab>:enew menutrans &Close<Tab>:close 关闭(&C)<Tab>:close menutrans &Save<Tab>:w 保存(&S)<Tab>:w menutrans Save\ &As\.\.\.<Tab>:sav 另存为(&A)\.\.\.<Tab>:sav -menutrans Split\ &Diff\ with\.\.\. 分割比较(&Diff)\.\.\. -menutrans Split\ Patched\ &By\.\.\. 分割打补丁(&Patch)\.\.\. +menutrans Split\ &Diff\ with\.\.\. 分割比较(Diff)(&D)\.\.\. +menutrans Split\ Patched\ &By\.\.\. 分割打补丁(Patch)(&B)\.\.\. menutrans &Print 打印(&P) menutrans Sa&ve-Exit<Tab>:wqa 保存并退出(&V)<Tab>:wqa menutrans E&xit<Tab>:qa 退出(&X)<Tab>:qa " Edit menu menutrans &Edit 编辑(&E) -menutrans &Undo<Tab>u 恢复(&U)<Tab>u +menutrans &Undo<Tab>u 撤销(&U)<Tab>u menutrans &Redo<Tab>^R 重做(&R)<Tab>^R -menutrans Rep&eat<Tab>\. 重复上次动作(&E)<Tab>\. +menutrans Rep&eat<Tab>\. 重复上次操作(&E)<Tab>\. menutrans Cu&t<Tab>"+x 剪切(&T)<Tab>"+x menutrans &Copy<Tab>"+y 复制(&C)<Tab>"+y -menutrans &Paste<Tab>"+gP 粘帖(&P)<Tab>"+gP -menutrans Put\ &Before<Tab>[p 贴到光标前(&B)<Tab>[p -menutrans Put\ &After<Tab>]p 贴到光标后(&A)<Tab>]p +menutrans &Paste<Tab>"+gP 粘贴(&P)<Tab>"+gP +menutrans Put\ &Before<Tab>[p 粘贴到光标前(&B)<Tab>[p +menutrans Put\ &After<Tab>]p 粘贴到光标后(&A)<Tab>]p menutrans &Delete<Tab>x 删除(&D)<Tab>x -menutrans &Select\ all<Tab>ggVG 全选(&S)<Tab>ggvG +menutrans &Select\ all<Tab>ggVG 全选(&S)<Tab>ggVG menutrans &Find\.\.\. 查找(&F)\.\.\. -menutrans Find\ and\ Rep&lace\.\.\. 查找替换(&L)\.\.\. +menutrans Find\ and\ Rep&lace\.\.\. 查找和替换(&L)\.\.\. +menutrans &Find<Tab>/ 查找(&F)<Tab>/ +menutrans Find\ and\ Rep&lace<Tab>:%s 查找和替换(&L)<Tab>:%s menutrans Settings\ &Window 设定窗口(&W) +menutrans Startup\ &Settings 启动设定(&S) menutrans &Global\ Settings 全局设定(&G) -" Build boolean options -menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! 开/关增量查找模式<Tab>:set\ hls! -menutrans Toggle\ &Ignore-case<Tab>:set\ ic! 开/关忽略大小写模式<Tab>:set\ ic! -menutrans Toggle\ &Showmatch<Tab>:set\ sm! 开/关匹配显示<Tab>:set sm! +" Edit/Global Settings +menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! 开/关模式高亮(&H)<Tab>:set\ hls! +menutrans Toggle\ &Ignore-case<Tab>:set\ ic! 开/关忽略大小写(&I)<Tab>:set\ ic! +menutrans Toggle\ &Showmatch<Tab>:set\ sm! 开/关显示配对(&S)<Tab>:set\ sm! menutrans &Context\ lines 上下文行数(&C) -menutrans &Virtual\ Edit 可视化编辑模式(&V) +menutrans &Virtual\ Edit 虚拟编辑(&V) menutrans Never 从不 menutrans Block\ Selection 块选择 menutrans Insert\ mode 插入模式 -menutrans Block\ and\ Insert 块选择与插入模式 -menutrans Always 所有模式 - -menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! 开/关插入模式<Tab>:set\ im! +menutrans Block\ and\ Insert 块选择和插入模式 +menutrans Always 总是 -menutrans Search\ &Path\.\.\. 查找路径\.\.\.(&P) - -menutrans Ta&g\ Files\.\.\. 标签文件\.\.\.(&g) +menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! 开/关插入模式(&M)<Tab>:set\ im! +menutrans Toggle\ Vi\ C&ompatible<Tab>:set\ cp! 开/关\ Vi\ 兼容<Tab>:set\ cp! +menutrans Search\ &Path\.\.\. 查找路径(&P)\.\.\. +menutrans Ta&g\ Files\.\.\. Tag\ 文件(&T)\.\.\. " GUI options menutrans Toggle\ &Toolbar 开/关工具条(&T) @@ -77,87 +85,111 @@ menutrans Toggle\ &Bottom\ Scrollbar 开/关底部滚动条(&B) menutrans Toggle\ &Left\ Scrollbar 开/关左端滚动条(&L) menutrans Toggle\ &Right\ Scrollbar 开/关右端滚动条(&R) - " Edit/File Settings -menutrans F&ile\ Settings 文件设定(&i) +menutrans F&ile\ Settings 文件设定(&I) " Boolean options -menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! 开/关显示行号<Tab>:set\ nu! -menutrans Toggle\ &List\ Mode<Tab>:set\ list! 开/关显示Tab<Tab>:set\ list! -menutrans Toggle\ Line\ &Wrap<Tab>:set\ wrap! 开/关自动折行<Tab>:set\ wrap! -menutrans Toggle\ W&rap\ at\ word<Tab>:set\ lbr! 开/关词尾折行<Tab>:set\ lbr! -menutrans Toggle\ &expand-tab<Tab>:set\ et! 开/关expand-tab<Tab>:set\ et! -menutrans Toggle\ &auto-indent<Tab>:set\ ai! 开/关auto-indent<Tab>:set\ ai! -menutrans Toggle\ &C-indenting<Tab>:set\ cin! 开/关C-indent<Tab>:set\ cin! - +menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! 开/关显示行号(&N)<Tab>:set\ nu! +menutrans Toggle\ &List\ Mode<Tab>:set\ list! 开/关\ list\ 模式(&L)<Tab>:set\ list! +menutrans Toggle\ Line\ &Wrap<Tab>:set\ wrap! 开/关折行(&W)<Tab>:set\ wrap! +menutrans Toggle\ W&rap\ at\ word<Tab>:set\ lbr! 开/关整词折行(&R)<Tab>:set\ lbr! +menutrans Toggle\ &expand-tab<Tab>:set\ et! 开/关扩展\ tab(&E)<Tab>:set\ et! +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 Soft\ &Tabstop 伪Tab宽度(&T) -menutrans Te&xt\ Width\.\.\. 页面宽度(&x)\.\.\. +menutrans &Shiftwidth 缩进宽度(&S) +menutrans Soft\ &Tabstop Soft\ Tab\ 宽度(&T) +menutrans Te&xt\ Width\.\.\. 文本宽度(&X)\.\.\. menutrans &File\ Format\.\.\. 文件格式(&F)\.\.\. - -menutrans C&olor\ Scheme 调色板(&o) -menutrans Select\ Fo&nt\.\.\. 选择字体(&n)\.\.\. - +menutrans C&olor\ Scheme 配色方案(&O) +menutrans Select\ Fo&nt\.\.\. 选择字体(&N)\.\.\. +menutrans &Keymap Keymap(&K) " Programming menu menutrans &Tools 工具(&T) -menutrans &Jump\ to\ this\ tag<Tab>g^] 检索光标处的标签关键字(tag)(&J)<Tab>g^] -menutrans Jump\ &back<Tab>^T 跳回检索前的位置(&B)<Tab>^T -menutrans Build\ &Tags\ File 建立标签索引文件\ Tags(&T) -menutrans &Folding Folding设定(&F) -menutrans &Diff 比较(&D) -menutrans &Make<Tab>:make 执行\ Make(&M)<Tab>:make -menutrans &List\ Errors<Tab>:cl 列出编译错误(&E)<Tab>:cl -menutrans L&ist\ Messages<Tab>:cl! 列出所有信息(&I)<Tab>:cl! -menutrans &Next\ Error<Tab>:cn 下一个编译错误处(&N)<Tab>:cn -menutrans &Previous\ Error<Tab>:cp 上一个编译错误处(&P)<Tab>:cp -menutrans &Older\ List<Tab>:cold 旧错误列表(&O)<Tab>:cold -menutrans N&ewer\ List<Tab>:cnew 新错误列表(&E)<Tab>:cnew -menutrans Error\ &Window 错误信息窗口(&W) -menutrans &Set\ Compiler 设置编译器(&S) -menutrans &Convert\ to\ HEX<Tab>:%!xxd 转换成16进制<Tab>:%!xxd -menutrans Conve&rt\ back<Tab>:%!xxd\ -r 从16进制转换回文字<Tab>:%!xxd\ -r +menutrans &Jump\ to\ this\ tag<Tab>g^] 跳转到这个\ tag(&J)<Tab>g^] +menutrans Jump\ &back<Tab>^T 跳转返回(&B)<Tab>^T +menutrans Build\ &Tags\ File 建立 Tags 文件(&T) + +" Tools.Spelling Menu +menutrans &Spelling 拼写检查(&S) +menutrans &Spell\ Check\ On 打开拼写检查(&S) +menutrans Spell\ Check\ &Off 关闭拼写检查(&O) +menutrans To\ &Next\ error<Tab>]s 上一个错误(&N)<Tab>]s +menutrans To\ &Previous\ error<Tab>[s 下一个错误(&P)<Tab>[s +menutrans Suggest\ &Corrections<Tab>z= 修正建议(&C)<Tab>z= +menutrans &Repeat\ correction<Tab>:spellrepall 重复修正(&R)<Tab>:spellrepall +menutrans Set\ language\ to\ "en" 设定语言为\ "en" +menutrans Set\ language\ to\ "en_au" 设定语言为\ "en_au" +menutrans Set\ language\ to\ "en_ca" 设定语言为\ "en_ca" +menutrans Set\ language\ to\ "en_gb" 设定语言为\ "en_gb" +menutrans Set\ language\ to\ "en_nz" 设定语言为\ "en_nz" +menutrans Set\ language\ to\ "en_us" 设定语言为\ "en_us" +menutrans &Find\ More\ Languages 查找更多语言(&F) " Tools.Fold Menu -menutrans &Enable/Disable\ folds<Tab>zi 使用/不使用Folding(&E)<Tab>zi +" open close folds +menutrans &Folding 折叠(&F) +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 关闭Folds(&L)<Tab>zm -menutrans &Close\ all\ folds<Tab>zM 关闭所有Folds(&C)<Tab>zM -menutrans O&pen\ more\ folds<Tab>zr 展开Folds(&P)<Tab>zr -menutrans &Open\ all\ folds<Tab>zR 展开所有Folds(&O)<Tab>zR +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 &Open\ all\ folds<Tab>zR 打开所有折叠(&O)<Tab>zR " fold method -menutrans Fold\ Met&hod Fold方式(&H) -menutrans Create\ &Fold<Tab>zf 建立Fold(&F)<Tab>zf -menutrans &Delete\ Fold<Tab>zd 删除Fold(&D)<Tab>zd -menutrans Delete\ &All\ Folds<Tab>zD 删除所有Fold(&A)<Tab>zD +menutrans Fold\ Met&hod 折叠方法(&H) +menutrans M&anual 手工(&A) +menutrans I&ndent 缩进(&N) +menutrans E&xpression 表达式(&X) +menutrans S&yntax 语法(&Y) +menutrans &Diff 比较(Diff)(&D) +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 " moving around in folds -menutrans Fold\ column\ &width 设定Fold栏宽(&W) +menutrans Fold\ column\ &width 折叠栏宽度(&W) " Tools.Diff Menu -menutrans &Update 更新(&U) -menutrans &Get\ Block 取得不同部分(&G) -menutrans &Put\ Block 将不同部分应用到对方(&P) +menutrans &Diff 比较(Diff)(&D) +menutrans &Update 更新(&U) +menutrans &Get\ Block 得到块(&G) +menutrans &Put\ Block 放置块(&P) +menutrans &Make<Tab>:make Make(&M)<Tab>:make +menutrans &List\ Errors<Tab>:cl 列出错误(&L)<Tab>:cl +menutrans L&ist\ Messages<Tab>:cl! 列出消息(&I)<Tab>:cl! +menutrans &Next\ Error<Tab>:cn 下一个错误(&N)<Tab>:cn +menutrans &Previous\ Error<Tab>:cp 上一个错误(&P)<Tab>:cp +menutrans &Older\ List<Tab>:cold 更旧的错误列表(&O)<Tab>:cold +menutrans N&ewer\ List<Tab>:cnew 更新的错误列表(&E)<Tab>:cnew +menutrans Error\ &Window 错误窗口(&W) +menutrans &Update<Tab>:cwin 更新(&U)<Tab>:cwin +menutrans &Open<Tab>:copen 打开(&O)<Tab>:copen +menutrans &Close<Tab>:cclose 关闭(&C)<Tab>:cclose +menutrans &Convert\ to\ HEX<Tab>:%!xxd 转换成十六进制<Tab>:%!xxd +menutrans Conve&rt\ back<Tab>:%!xxd\ -r 转换返回<Tab>:%!xxd\ -r +menutrans Se&T\ Compiler 设定编译器(&T) " Names for buffer menu. menutrans &Buffers 缓冲区(&B) -menutrans &Refresh\ menu 更新(&R) +menutrans &Refresh\ menu 更新菜单(&R) menutrans &Delete 删除(&D) -menutrans &Alternate 修改(&L) +menutrans &Alternate 交替(&A) menutrans &Next 下一个(&N) -menutrans &Previous 前一个(&P) +menutrans &Previous 上一个(&P) " Window menu menutrans &Window 窗口(&W) -menutrans &New<Tab>^Wn 新建窗口(&N)<Tab>^Wn -menutrans S&plit<Tab>^Ws 分割窗口(&P)<Tab>^Ws -menutrans Sp&lit\ To\ #<Tab>^W^^ 分割到#(&L)<Tab>^W^^ +menutrans &New<Tab>^Wn 新建(&N)<Tab>^Wn +menutrans S&plit<Tab>^Ws 分割(&P)<Tab>^Ws +menutrans Sp&lit\ To\ #<Tab>^W^^ 分割到\ #(&L)<Tab>^W^^ menutrans Split\ &Vertically<Tab>^Wv 垂直分割(&V)<Tab>^Wv -menutrans Split\ File\ E&xplorer 文件浏览器式分割(&X) -menutrans &Close<Tab>^Wc 关闭窗口(&C)<Tab>^Wc +menutrans Split\ File\ E&xplorer 分割文件浏览器(&X) +menutrans &Close<Tab>^Wc 关闭(&C)<Tab>^Wc menutrans Close\ &Other(s)<Tab>^Wo 关闭其它窗口(&O)<Tab>^Wo menutrans Move\ &To 移动到(&T) menutrans &Top<Tab>^WK 顶端(&T)<Tab>^WK @@ -166,13 +198,13 @@ menutrans &Left\ side<Tab>^WH 左边(&L)<Tab>^WH menutrans &Right\ side<Tab>^WL 右边(&R)<Tab>^WL " menutrans Ne&xt<Tab>^Ww 下一个(&X)<Tab>^Ww " menutrans P&revious<Tab>^WW 上一个(&R)<Tab>^WW -menutrans Rotate\ &Up<Tab>^WR 上移窗口(&U)<Tab>^WR -menutrans Rotate\ &Down<Tab>^Wr 下移窗口(&D)<Tab>^Wr -menutrans &Equal\ Size<Tab>^W= 所有窗口等高(&E)<Tab>^W= +menutrans Rotate\ &Up<Tab>^WR 向上轮换(&U)<Tab>^WR +menutrans Rotate\ &Down<Tab>^Wr 向下轮换(&D)<Tab>^Wr +menutrans &Equal\ Size<Tab>^W= 等大(&E)<Tab>^W= menutrans &Max\ Height<Tab>^W_ 最大高度(&M)<Tab>^W -menutrans M&in\ Height<Tab>^W1_ 最小高度(&i)<Tab>^W1_ +menutrans M&in\ Height<Tab>^W1_ 最小高度(&I)<Tab>^W1_ menutrans Max\ &Width<Tab>^W\| 最大宽度(&W)<Tab>^W\| -menutrans Min\ Widt&h<Tab>^W1\| 最小宽度(&h)<Tab>^W1\| +menutrans Min\ Widt&h<Tab>^W1\| 最小宽度(&H)<Tab>^W1\| " " The popup menu menutrans &Undo 撤销(&U) @@ -180,8 +212,10 @@ menutrans Cu&t 剪切(&T) menutrans &Copy 复制(&C) menutrans &Paste 粘帖(&P) menutrans &Delete 删除(&D) -menutrans Select\ Blockwise Blockwise选择 +menutrans Select\ Blockwise 选择块 menutrans Select\ &Word 选择单词(&W) +menutrans Select\ &Sentence 选择句子(&S) +menutrans Select\ Pa&ragraph 选择段落(&R) menutrans Select\ &Line 选择行(&L) menutrans Select\ &Block 选择块(&B) menutrans Select\ &All 全选(&A) @@ -196,35 +230,35 @@ if has("toolbar") tmenu ToolBar.Save 保存当前文件 tmenu ToolBar.SaveAll 保存全部文件 tmenu ToolBar.Print 打印 - tmenu ToolBar.Undo 撤销上次修改 - tmenu ToolBar.Redo 重做上次撤销的动作 - tmenu ToolBar.Cut 剪切至剪贴板 + tmenu ToolBar.Undo 撤销 + tmenu ToolBar.Redo 重做 + tmenu ToolBar.Cut 剪切到剪贴板 tmenu ToolBar.Copy 复制到剪贴板 - tmenu ToolBar.Paste 由剪贴板粘帖 + tmenu ToolBar.Paste 从剪贴板粘帖 tmenu ToolBar.Find 查找... tmenu ToolBar.FindNext 查找下一个 tmenu ToolBar.FindPrev 查找上一个 - tmenu ToolBar.Replace 替换... + tmenu ToolBar.Replace 查找和替换... tmenu ToolBar.LoadSesn 加载会话 - tmenu ToolBar.SaveSesn 保存当前的会话 - tmenu ToolBar.RunScript 运行Vim脚本 - tmenu ToolBar.Make 执行 Make - tmenu ToolBar.Shell 打开一个命令窗口 - tmenu ToolBar.RunCtags 执行 ctags - tmenu ToolBar.TagJump 跳到当前光标位置的标签 + tmenu ToolBar.SaveSesn 保存当前会话 + tmenu ToolBar.RunScript 运行 Vim 脚本 + tmenu ToolBar.Make 执行 Make (:make) + tmenu ToolBar.RunCtags 在当前目录建立 tags (!ctags -R .) + tmenu ToolBar.TagJump 跳转到光标位置的 tag tmenu ToolBar.Help Vim 帮助 tmenu ToolBar.FindHelp 查找 Vim 帮助 endfun endif " Syntax menu -menutrans &Syntax 语法(&S) -menutrans Set\ '&syntax'\ only 只设定\ 'syntax'(&s) -menutrans Set\ '&filetype'\ too 也设定\ 'filetype'(&f) -menutrans &Off 关闭(&O) -menutrans &Manual 手动设定(&M) -menutrans A&utomatic 自动设定(&U) -menutrans on/off\ for\ &This\ file 只对这个文件打开/关闭(&T) -menutrans Co&lor\ test 色彩显示测试(&L) -menutrans &Highlight\ test 语法效果测试(&H) -menutrans &Convert\ to\ HTML 转换成\ HTML\ 格式(&C) +menutrans &Syntax 语法(&S) +menutrans &Manual 手工(&M) +menutrans A&utomatic 自动(&U) +menutrans on/off\ for\ &This\ file 仅对这个文件开/关(&T) +menutrans &Show\ filetypes\ in\ menu 在菜单中显示文件类型(&S) +menutrans &Off 关闭(&O) +menutrans Co&lor\ test 色彩测试(&L) +menutrans &Highlight\ test 高亮测试(&H) +menutrans &Convert\ to\ HTML 转换成\ HTML(&C) +menutrans Set\ '&syntax'\ only 仅设定\ 'syntax'(&S) +menutrans Set\ '&filetype'\ too 也设定\ 'filetype'(&F) diff --git a/runtime/lang/menu_ja_jp.euc-jp.vim b/runtime/lang/menu_ja_jp.euc-jp.vim index e73376c6f..ee9f0e50e 100644 --- a/runtime/lang/menu_ja_jp.euc-jp.vim +++ b/runtime/lang/menu_ja_jp.euc-jp.vim @@ -2,7 +2,7 @@ " " Menu Translations: Japanese (EUC-JP) " Translated By: MURAOKA Taro <koron@tka.att.ne.jp> -" Last Change: 28-Mar-2006. +" Last Change: 18-Apr-2006. " Quit when menu translations have already been done. if exists("did_menu_trans") @@ -60,6 +60,7 @@ menutrans Find\ and\ Rep&lace<Tab>:%s 弥垂(&L)<Tab>:%s menutrans Find\ and\ Rep&lace<Tab>:s 弥垂(&L)<Tab>:s "menutrans Options\.\.\. オプション(&O)\.\.\. menutrans Settings\ &Window 肋年ウィンドウ(&W) +menutrans Startup\ &Settings 弹瓢箕の肋年(&S) " Edit/Global Settings menutrans &Global\ Settings 链挛肋年(&G) diff --git a/runtime/lang/menu_ja_jp.utf-8.vim b/runtime/lang/menu_ja_jp.utf-8.vim index 2491f0c7a..c36d6a049 100644 --- a/runtime/lang/menu_ja_jp.utf-8.vim +++ b/runtime/lang/menu_ja_jp.utf-8.vim @@ -2,7 +2,7 @@ " " Menu Translations: Japanese (UTF-8) " Translated By: MURAOKA Taro <koron@tka.att.ne.jp> -" Last Change: 06-Feb-2006. +" Last Change: 18-Apr-2006. " Quit when menu translations have already been done. if exists("did_menu_trans") @@ -60,6 +60,7 @@ menutrans Find\ and\ Rep&lace<Tab>:%s 缃彌(&L)<Tab>:%s menutrans Find\ and\ Rep&lace<Tab>:s 缃彌(&L)<Tab>:s "menutrans Options\.\.\. 銈儣銈枫儳銉(&O)\.\.\. menutrans Settings\ &Window 瑷畾銈︺偅銉炽儔銈(&W) +menutrans Startup\ &Settings 璧峰嫊鏅傘伄瑷畾(&S) " Edit/Global Settings menutrans &Global\ Settings 鍏ㄤ綋瑷畾(&G) diff --git a/runtime/lang/menu_japanese_japan.932.vim b/runtime/lang/menu_japanese_japan.932.vim index 16a2635c8..5c836becb 100644 --- a/runtime/lang/menu_japanese_japan.932.vim +++ b/runtime/lang/menu_japanese_japan.932.vim @@ -2,7 +2,7 @@ " " Menu Translations: Japanese (CP932) " Translated By: MURAOKA Taro <koron@tka.att.ne.jp> -" Last Change: 28-Mar-2006. +" Last Change: 18-Apr-2006. " Quit when menu translations have already been done. if exists("did_menu_trans") @@ -60,6 +60,7 @@ menutrans Find\ and\ Rep&lace<Tab>:%s 抲姺(&L)<Tab>:%s menutrans Find\ and\ Rep&lace<Tab>:s 抲姺(&L)<Tab>:s "menutrans Options\.\.\. 僆僾僔儑儞(&O)\.\.\. menutrans Settings\ &Window 愝掕僂傿儞僪僂(&W) +menutrans Startup\ &Settings 婲摦帪偺愝掕(&S) " Edit/Global Settings menutrans &Global\ Settings 慡懱愝掕(&G) diff --git a/runtime/lang/menu_sv_se.latin1.vim b/runtime/lang/menu_sv_se.latin1.vim index 744d2721c..8935e0da0 100644 --- a/runtime/lang/menu_sv_se.latin1.vim +++ b/runtime/lang/menu_sv_se.latin1.vim @@ -1,6 +1,6 @@ " Menu Translations: Swedish " Maintainer: Johan Svedberg <johan@svedberg.com> -" Last Change: 2005 Oct 09 +" Last Change: 2006 Apr 13 " Quit when menu translations have already been done. if exists("did_menu_trans") @@ -31,6 +31,7 @@ menutrans &About &Om menutrans &File &Arkiv menutrans &Open\.\.\.<Tab>:e &謕pna\.\.\.<Tab>:e menutrans Sp&lit-Open\.\.\.<Tab>:sp 謕pna\ i\ splitt-vy\.\.\.<Tab>:sp +menutrans Open\ Tab\.\.\.<Tab>:tabnew 謕pna\ flik\.\.\.<Tab>:tabnew menutrans &New<Tab>:enew &Ny<Tab>:enew menutrans &Close<Tab>:close S&t鋘g<Tab>:close menutrans &Save<Tab>:w &Spara<Tab>:w @@ -66,24 +67,24 @@ menutrans &Keymap &Tangentbordsupps鋞tning " Edit.Global Settings menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! V鋢la\ m鰊sterframh鋠ning<Tab>:set\ hls! -menutrans Toggle\ &Ignore-case<Tab>:set\ ic! V鋢la\ ignorering\ av\ storlek<Tab>:set\ ic! -menutrans Toggle\ &Showmatch<Tab>:set\ sm! V鋢la\ matchningsvisning<Tab>:set\ sm! -menutrans &Context\ lines Sammanhangsrader -menutrans &Virtual\ Edit Virtuell\ redigering -menutrans Never Aldrig -menutrans Block\ Selection Blockval -menutrans Insert\ mode Infogningsl鋑e -menutrans Block\ and\ Insert Block\ och\ infogning -menutrans Always Alltid -menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! V鋢la\ infogningsl鋑e<Tab>:set\ im! -menutrans Toggle\ Vi\ C&ompatible<Tab>:set\ cp! V鋢la\ Vi-kompabilitet<Tab>:set\ cp! -menutrans Search\ &Path\.\.\. S鰇v鋑\.\.\. -menutrans Ta&g\ Files\.\.\. Taggfiler\.\.\. -menutrans Toggle\ &Toolbar V鋢la\ verktygsrad -menutrans Toggle\ &Bottom\ Scrollbar V鋢la\ rullningslista\ i\ botten -menutrans Toggle\ &Left\ Scrollbar V鋢la\ v鋘ster\ rullningslista -menutrans Toggle\ &Right\ Scrollbar V鋢la\ h鰃er\ rullningslista -menutrans None Ingen +menutrans Toggle\ &Ignore-case<Tab>:set\ ic! V鋢la\ ignorering\ av\ storlek<Tab>:set\ ic! +menutrans Toggle\ &Showmatch<Tab>:set\ sm! V鋢la\ matchningsvisning<Tab>:set\ sm! +menutrans &Context\ lines Sammanhangsrader +menutrans &Virtual\ Edit Virtuell\ redigering +menutrans Never Aldrig +menutrans Block\ Selection Blockval +menutrans Insert\ mode Infogningsl鋑e +menutrans Block\ and\ Insert Block\ och\ infogning +menutrans Always Alltid +menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! V鋢la\ infogningsl鋑e<Tab>:set\ im! +menutrans Toggle\ Vi\ C&ompatible<Tab>:set\ cp! V鋢la\ Vi-kompabilitet<Tab>:set\ cp! +menutrans Search\ &Path\.\.\. S鰇v鋑\.\.\. +menutrans Ta&g\ Files\.\.\. Taggfiler\.\.\. +menutrans Toggle\ &Toolbar V鋢la\ verktygsrad +menutrans Toggle\ &Bottom\ Scrollbar V鋢la\ rullningslista\ i\ botten +menutrans Toggle\ &Left\ Scrollbar V鋢la\ v鋘ster\ rullningslista +menutrans Toggle\ &Right\ Scrollbar V鋢la\ h鰃er\ rullningslista +menutrans None Ingen " Edit.File Settings menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! V鋢la\ radnumrering<Tab>:set\ nu! @@ -94,7 +95,7 @@ menutrans Toggle\ &expand-tab<Tab>:set\ et! V鋢la\ tab-expandering<Tab>:set\ et menutrans Toggle\ &auto-indent<Tab>:set\ ai! V鋢la\ auto-indentering<Tab>:set\ ai! menutrans Toggle\ &C-indenting<Tab>:set\ cin! V鋢la\ C-indentering<Tab>:set\ cin! menutrans &Shiftwidth Shiftbredd -menutrans Soft &Tabstop Mjuk tab-stopp +menutrans Soft\ &Tabstop Mjuk\ tab-stopp menutrans Te&xt\ Width\.\.\. Textbredd\.\.\. menutrans &File\ Format\.\.\. Filformat\.\.\. @@ -116,7 +117,16 @@ menutrans &Open<Tab>:copen &謕pna<Tab>:copen menutrans &Close<Tab>:cclose &St鋘g<Tab>:cclose menutrans &Convert\ to\ HEX<Tab>:%!xxd Konvertera\ till\ HEX<Tab>:%!xxd menutrans Conve&rt\ back<Tab>:%!xxd\ -r Konvertera\ tillbaka<Tab>:%!xxd\ -r -menutrans &Set\ Compiler S鋞t\ kompilerare +menutrans Se&T\ Compiler S鋞t\ &kompilerare + +" Tools.Spelling +menutrans &Spelling &Stavning +menutrans &Spell\ Check\ On &Stavningskontroll\ p +menutrans &Spell\ Check\ Off Stavningskontroll\ &av +menutrans To\ &Next\ error<Tab>]s Till\ &n鋝ta\ fel +menutrans To\ &Previous\ error<Tab>[s Till\ &f鰎eg錯nde\ fel +menutrans Suggest\ &Corrections<Tab>z= F鰎esl錦 &korrigeringar +menutrans &Repeat\ correction<Tab>:spellrepall &Upprepa\ korrigering " Tools.Folding menutrans &Enable/Disable\ folds<Tab>zi V鋢la\ veck<Tab>zi diff --git a/runtime/lang/menu_zh_cn.gb2312.vim b/runtime/lang/menu_zh_cn.gb2312.vim index b0eac38e7..78840ec43 100644 --- a/runtime/lang/menu_zh_cn.gb2312.vim +++ b/runtime/lang/menu_zh_cn.gb2312.vim @@ -1,6 +1,8 @@ -" Menu Translations: Simplified Chinese (UNIX) -" 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 gb2312 menutrans &Help 帮助(&H) menutrans &Overview<Tab><F1> 预览(&O)<Tab><F1> menutrans &User\ Manual 用户手册(&U) -menutrans &GUI 图形界面(&G) -menutrans &How-to\ links HOWTO文档\.\.\.(&H) +menutrans &How-to\ links How-to\ 连接(&H) +menutrans &Find\.\.\. 查找(&F)\.\.\. menutrans &Credits 作者(&C) menutrans Co&pying 版权(&P) menutrans &Version 版本(&V) -menutrans &About 关于\ Vim(&A) +menutrans &Sponsor/Register 赞助/注册(&S) +menutrans O&rphans 孤儿(&R) +menutrans &Version 版本(&V) +menutrans &About 关于(&A) " File menu menutrans &File 文件(&F) menutrans &Open\.\.\.<Tab>:e 打开(&O)\.\.\.<Tab>:e -menutrans Sp&lit-Open\.\.\.<Tab>:sp 分割窗口并打开(&L)<Tab>:sp +menutrans Sp&lit-Open\.\.\.<Tab>:sp 分割并打开(&L)\.\.\.<Tab>:sp +menutrans Open\ Tab\.\.\.<Tab>:tabnew 打开标签\.\.\.<Tab>:tabnew menutrans &New<Tab>:enew 新建(&N)<Tab>:enew menutrans &Close<Tab>:close 关闭(&C)<Tab>:close menutrans &Save<Tab>:w 保存(&S)<Tab>:w menutrans Save\ &As\.\.\.<Tab>:sav 另存为(&A)\.\.\.<Tab>:sav -menutrans Split\ &Diff\ with\.\.\. 分割比较(&Diff)\.\.\. -menutrans Split\ Patched\ &By\.\.\. 分割打补丁(&Patch)\.\.\. +menutrans Split\ &Diff\ with\.\.\. 分割比较(Diff)(&D)\.\.\. +menutrans Split\ Patched\ &By\.\.\. 分割打补丁(Patch)(&B)\.\.\. menutrans &Print 打印(&P) menutrans Sa&ve-Exit<Tab>:wqa 保存并退出(&V)<Tab>:wqa menutrans E&xit<Tab>:qa 退出(&X)<Tab>:qa " Edit menu menutrans &Edit 编辑(&E) -menutrans &Undo<Tab>u 恢复(&U)<Tab>u +menutrans &Undo<Tab>u 撤销(&U)<Tab>u menutrans &Redo<Tab>^R 重做(&R)<Tab>^R -menutrans Rep&eat<Tab>\. 重复上次动作(&E)<Tab>\. +menutrans Rep&eat<Tab>\. 重复上次操作(&E)<Tab>\. menutrans Cu&t<Tab>"+x 剪切(&T)<Tab>"+x menutrans &Copy<Tab>"+y 复制(&C)<Tab>"+y -menutrans &Paste<Tab>"+gP 粘帖(&P)<Tab>"+gP -menutrans Put\ &Before<Tab>[p 贴到光标前(&B)<Tab>[p -menutrans Put\ &After<Tab>]p 贴到光标后(&A)<Tab>]p +menutrans &Paste<Tab>"+gP 粘贴(&P)<Tab>"+gP +menutrans Put\ &Before<Tab>[p 粘贴到光标前(&B)<Tab>[p +menutrans Put\ &After<Tab>]p 粘贴到光标后(&A)<Tab>]p menutrans &Delete<Tab>x 删除(&D)<Tab>x -menutrans &Select\ all<Tab>ggVG 全选(&S)<Tab>ggvG +menutrans &Select\ all<Tab>ggVG 全选(&S)<Tab>ggVG menutrans &Find\.\.\. 查找(&F)\.\.\. -menutrans Find\ and\ Rep&lace\.\.\. 查找替换(&L)\.\.\. +menutrans Find\ and\ Rep&lace\.\.\. 查找和替换(&L)\.\.\. +menutrans &Find<Tab>/ 查找(&F)<Tab>/ +menutrans Find\ and\ Rep&lace<Tab>:%s 查找和替换(&L)<Tab>:%s menutrans Settings\ &Window 设定窗口(&W) +menutrans Startup\ &Settings 启动设定(&S) menutrans &Global\ Settings 全局设定(&G) -" Build boolean options -menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! 开/关增量查找模式<Tab>:set\ hls! -menutrans Toggle\ &Ignore-case<Tab>:set\ ic! 开/关忽略大小写模式<Tab>:set\ ic! -menutrans Toggle\ &Showmatch<Tab>:set\ sm! 开/关匹配显示<Tab>:set sm! +" Edit/Global Settings +menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! 开/关模式高亮(&H)<Tab>:set\ hls! +menutrans Toggle\ &Ignore-case<Tab>:set\ ic! 开/关忽略大小写(&I)<Tab>:set\ ic! +menutrans Toggle\ &Showmatch<Tab>:set\ sm! 开/关显示配对(&S)<Tab>:set\ sm! menutrans &Context\ lines 上下文行数(&C) -menutrans &Virtual\ Edit 可视化编辑模式(&V) +menutrans &Virtual\ Edit 虚拟编辑(&V) menutrans Never 从不 menutrans Block\ Selection 块选择 menutrans Insert\ mode 插入模式 -menutrans Block\ and\ Insert 块选择与插入模式 -menutrans Always 所有模式 - -menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! 开/关插入模式<Tab>:set\ im! +menutrans Block\ and\ Insert 块选择和插入模式 +menutrans Always 总是 -menutrans Search\ &Path\.\.\. 查找路径\.\.\.(&P) - -menutrans Ta&g\ Files\.\.\. 标签文件\.\.\.(&g) +menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! 开/关插入模式(&M)<Tab>:set\ im! +menutrans Toggle\ Vi\ C&ompatible<Tab>:set\ cp! 开/关\ Vi\ 兼容<Tab>:set\ cp! +menutrans Search\ &Path\.\.\. 查找路径(&P)\.\.\. +menutrans Ta&g\ Files\.\.\. Tag\ 文件(&T)\.\.\. " GUI options menutrans Toggle\ &Toolbar 开/关工具条(&T) @@ -77,87 +85,111 @@ menutrans Toggle\ &Bottom\ Scrollbar 开/关底部滚动条(&B) menutrans Toggle\ &Left\ Scrollbar 开/关左端滚动条(&L) menutrans Toggle\ &Right\ Scrollbar 开/关右端滚动条(&R) - " Edit/File Settings -menutrans F&ile\ Settings 文件设定(&i) +menutrans F&ile\ Settings 文件设定(&I) " Boolean options -menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! 开/关显示行号<Tab>:set\ nu! -menutrans Toggle\ &List\ Mode<Tab>:set\ list! 开/关显示Tab<Tab>:set\ list! -menutrans Toggle\ Line\ &Wrap<Tab>:set\ wrap! 开/关自动折行<Tab>:set\ wrap! -menutrans Toggle\ W&rap\ at\ word<Tab>:set\ lbr! 开/关词尾折行<Tab>:set\ lbr! -menutrans Toggle\ &expand-tab<Tab>:set\ et! 开/关expand-tab<Tab>:set\ et! -menutrans Toggle\ &auto-indent<Tab>:set\ ai! 开/关auto-indent<Tab>:set\ ai! -menutrans Toggle\ &C-indenting<Tab>:set\ cin! 开/关C-indent<Tab>:set\ cin! - +menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! 开/关显示行号(&N)<Tab>:set\ nu! +menutrans Toggle\ &List\ Mode<Tab>:set\ list! 开/关\ list\ 模式(&L)<Tab>:set\ list! +menutrans Toggle\ Line\ &Wrap<Tab>:set\ wrap! 开/关折行(&W)<Tab>:set\ wrap! +menutrans Toggle\ W&rap\ at\ word<Tab>:set\ lbr! 开/关整词折行(&R)<Tab>:set\ lbr! +menutrans Toggle\ &expand-tab<Tab>:set\ et! 开/关扩展\ tab(&E)<Tab>:set\ et! +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 Soft\ &Tabstop 伪Tab宽度(&T) -menutrans Te&xt\ Width\.\.\. 页面宽度(&x)\.\.\. +menutrans &Shiftwidth 缩进宽度(&S) +menutrans Soft\ &Tabstop Soft\ Tab\ 宽度(&T) +menutrans Te&xt\ Width\.\.\. 文本宽度(&X)\.\.\. menutrans &File\ Format\.\.\. 文件格式(&F)\.\.\. - -menutrans C&olor\ Scheme 调色板(&o) -menutrans Select\ Fo&nt\.\.\. 选择字体(&n)\.\.\. - +menutrans C&olor\ Scheme 配色方案(&O) +menutrans Select\ Fo&nt\.\.\. 选择字体(&N)\.\.\. +menutrans &Keymap Keymap(&K) " Programming menu menutrans &Tools 工具(&T) -menutrans &Jump\ to\ this\ tag<Tab>g^] 检索光标处的标签关键字(tag)(&J)<Tab>g^] -menutrans Jump\ &back<Tab>^T 跳回检索前的位置(&B)<Tab>^T -menutrans Build\ &Tags\ File 建立标签索引文件\ Tags(&T) -menutrans &Folding Folding设定(&F) -menutrans &Diff 比较(&D) -menutrans &Make<Tab>:make 执行\ Make(&M)<Tab>:make -menutrans &List\ Errors<Tab>:cl 列出编译错误(&E)<Tab>:cl -menutrans L&ist\ Messages<Tab>:cl! 列出所有信息(&I)<Tab>:cl! -menutrans &Next\ Error<Tab>:cn 下一个编译错误处(&N)<Tab>:cn -menutrans &Previous\ Error<Tab>:cp 上一个编译错误处(&P)<Tab>:cp -menutrans &Older\ List<Tab>:cold 旧错误列表(&O)<Tab>:cold -menutrans N&ewer\ List<Tab>:cnew 新错误列表(&E)<Tab>:cnew -menutrans Error\ &Window 错误信息窗口(&W) -menutrans &Set\ Compiler 设置编译器(&S) -menutrans &Convert\ to\ HEX<Tab>:%!xxd 转换成16进制<Tab>:%!xxd -menutrans Conve&rt\ back<Tab>:%!xxd\ -r 从16进制转换回文字<Tab>:%!xxd\ -r +menutrans &Jump\ to\ this\ tag<Tab>g^] 跳转到这个\ tag(&J)<Tab>g^] +menutrans Jump\ &back<Tab>^T 跳转返回(&B)<Tab>^T +menutrans Build\ &Tags\ File 建立 Tags 文件(&T) + +" Tools.Spelling Menu +menutrans &Spelling 拼写检查(&S) +menutrans &Spell\ Check\ On 打开拼写检查(&S) +menutrans Spell\ Check\ &Off 关闭拼写检查(&O) +menutrans To\ &Next\ error<Tab>]s 上一个错误(&N)<Tab>]s +menutrans To\ &Previous\ error<Tab>[s 下一个错误(&P)<Tab>[s +menutrans Suggest\ &Corrections<Tab>z= 修正建议(&C)<Tab>z= +menutrans &Repeat\ correction<Tab>:spellrepall 重复修正(&R)<Tab>:spellrepall +menutrans Set\ language\ to\ "en" 设定语言为\ "en" +menutrans Set\ language\ to\ "en_au" 设定语言为\ "en_au" +menutrans Set\ language\ to\ "en_ca" 设定语言为\ "en_ca" +menutrans Set\ language\ to\ "en_gb" 设定语言为\ "en_gb" +menutrans Set\ language\ to\ "en_nz" 设定语言为\ "en_nz" +menutrans Set\ language\ to\ "en_us" 设定语言为\ "en_us" +menutrans &Find\ More\ Languages 查找更多语言(&F) " Tools.Fold Menu -menutrans &Enable/Disable\ folds<Tab>zi 使用/不使用Folding(&E)<Tab>zi +" open close folds +menutrans &Folding 折叠(&F) +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 关闭Folds(&L)<Tab>zm -menutrans &Close\ all\ folds<Tab>zM 关闭所有Folds(&C)<Tab>zM -menutrans O&pen\ more\ folds<Tab>zr 展开Folds(&P)<Tab>zr -menutrans &Open\ all\ folds<Tab>zR 展开所有Folds(&O)<Tab>zR +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 &Open\ all\ folds<Tab>zR 打开所有折叠(&O)<Tab>zR " fold method -menutrans Fold\ Met&hod Fold方式(&H) -menutrans Create\ &Fold<Tab>zf 建立Fold(&F)<Tab>zf -menutrans &Delete\ Fold<Tab>zd 删除Fold(&D)<Tab>zd -menutrans Delete\ &All\ Folds<Tab>zD 删除所有Fold(&A)<Tab>zD +menutrans Fold\ Met&hod 折叠方法(&H) +menutrans M&anual 手工(&A) +menutrans I&ndent 缩进(&N) +menutrans E&xpression 表达式(&X) +menutrans S&yntax 语法(&Y) +menutrans &Diff 比较(Diff)(&D) +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 " moving around in folds -menutrans Fold\ column\ &width 设定Fold栏宽(&W) +menutrans Fold\ column\ &width 折叠栏宽度(&W) " Tools.Diff Menu -menutrans &Update 更新(&U) -menutrans &Get\ Block 取得不同部分(&G) -menutrans &Put\ Block 将不同部分应用到对方(&P) +menutrans &Diff 比较(Diff)(&D) +menutrans &Update 更新(&U) +menutrans &Get\ Block 得到块(&G) +menutrans &Put\ Block 放置块(&P) +menutrans &Make<Tab>:make Make(&M)<Tab>:make +menutrans &List\ Errors<Tab>:cl 列出错误(&L)<Tab>:cl +menutrans L&ist\ Messages<Tab>:cl! 列出消息(&I)<Tab>:cl! +menutrans &Next\ Error<Tab>:cn 下一个错误(&N)<Tab>:cn +menutrans &Previous\ Error<Tab>:cp 上一个错误(&P)<Tab>:cp +menutrans &Older\ List<Tab>:cold 更旧的错误列表(&O)<Tab>:cold +menutrans N&ewer\ List<Tab>:cnew 更新的错误列表(&E)<Tab>:cnew +menutrans Error\ &Window 错误窗口(&W) +menutrans &Update<Tab>:cwin 更新(&U)<Tab>:cwin +menutrans &Open<Tab>:copen 打开(&O)<Tab>:copen +menutrans &Close<Tab>:cclose 关闭(&C)<Tab>:cclose +menutrans &Convert\ to\ HEX<Tab>:%!xxd 转换成十六进制<Tab>:%!xxd +menutrans Conve&rt\ back<Tab>:%!xxd\ -r 转换返回<Tab>:%!xxd\ -r +menutrans Se&T\ Compiler 设定编译器(&T) " Names for buffer menu. menutrans &Buffers 缓冲区(&B) -menutrans &Refresh\ menu 更新(&R) +menutrans &Refresh\ menu 更新菜单(&R) menutrans &Delete 删除(&D) -menutrans &Alternate 修改(&L) +menutrans &Alternate 交替(&A) menutrans &Next 下一个(&N) -menutrans &Previous 前一个(&P) +menutrans &Previous 上一个(&P) " Window menu menutrans &Window 窗口(&W) -menutrans &New<Tab>^Wn 新建窗口(&N)<Tab>^Wn -menutrans S&plit<Tab>^Ws 分割窗口(&P)<Tab>^Ws -menutrans Sp&lit\ To\ #<Tab>^W^^ 分割到#(&L)<Tab>^W^^ +menutrans &New<Tab>^Wn 新建(&N)<Tab>^Wn +menutrans S&plit<Tab>^Ws 分割(&P)<Tab>^Ws +menutrans Sp&lit\ To\ #<Tab>^W^^ 分割到\ #(&L)<Tab>^W^^ menutrans Split\ &Vertically<Tab>^Wv 垂直分割(&V)<Tab>^Wv -menutrans Split\ File\ E&xplorer 文件浏览器式分割(&X) -menutrans &Close<Tab>^Wc 关闭窗口(&C)<Tab>^Wc +menutrans Split\ File\ E&xplorer 分割文件浏览器(&X) +menutrans &Close<Tab>^Wc 关闭(&C)<Tab>^Wc menutrans Close\ &Other(s)<Tab>^Wo 关闭其它窗口(&O)<Tab>^Wo menutrans Move\ &To 移动到(&T) menutrans &Top<Tab>^WK 顶端(&T)<Tab>^WK @@ -166,13 +198,13 @@ menutrans &Left\ side<Tab>^WH 左边(&L)<Tab>^WH menutrans &Right\ side<Tab>^WL 右边(&R)<Tab>^WL " menutrans Ne&xt<Tab>^Ww 下一个(&X)<Tab>^Ww " menutrans P&revious<Tab>^WW 上一个(&R)<Tab>^WW -menutrans Rotate\ &Up<Tab>^WR 上移窗口(&U)<Tab>^WR -menutrans Rotate\ &Down<Tab>^Wr 下移窗口(&D)<Tab>^Wr -menutrans &Equal\ Size<Tab>^W= 所有窗口等高(&E)<Tab>^W= +menutrans Rotate\ &Up<Tab>^WR 向上轮换(&U)<Tab>^WR +menutrans Rotate\ &Down<Tab>^Wr 向下轮换(&D)<Tab>^Wr +menutrans &Equal\ Size<Tab>^W= 等大(&E)<Tab>^W= menutrans &Max\ Height<Tab>^W_ 最大高度(&M)<Tab>^W -menutrans M&in\ Height<Tab>^W1_ 最小高度(&i)<Tab>^W1_ +menutrans M&in\ Height<Tab>^W1_ 最小高度(&I)<Tab>^W1_ menutrans Max\ &Width<Tab>^W\| 最大宽度(&W)<Tab>^W\| -menutrans Min\ Widt&h<Tab>^W1\| 最小宽度(&h)<Tab>^W1\| +menutrans Min\ Widt&h<Tab>^W1\| 最小宽度(&H)<Tab>^W1\| " " The popup menu menutrans &Undo 撤销(&U) @@ -180,8 +212,10 @@ menutrans Cu&t 剪切(&T) menutrans &Copy 复制(&C) menutrans &Paste 粘帖(&P) menutrans &Delete 删除(&D) -menutrans Select\ Blockwise Blockwise选择 +menutrans Select\ Blockwise 选择块 menutrans Select\ &Word 选择单词(&W) +menutrans Select\ &Sentence 选择句子(&S) +menutrans Select\ Pa&ragraph 选择段落(&R) menutrans Select\ &Line 选择行(&L) menutrans Select\ &Block 选择块(&B) menutrans Select\ &All 全选(&A) @@ -196,35 +230,35 @@ if has("toolbar") tmenu ToolBar.Save 保存当前文件 tmenu ToolBar.SaveAll 保存全部文件 tmenu ToolBar.Print 打印 - tmenu ToolBar.Undo 撤销上次修改 - tmenu ToolBar.Redo 重做上次撤销的动作 - tmenu ToolBar.Cut 剪切至剪贴板 + tmenu ToolBar.Undo 撤销 + tmenu ToolBar.Redo 重做 + tmenu ToolBar.Cut 剪切到剪贴板 tmenu ToolBar.Copy 复制到剪贴板 - tmenu ToolBar.Paste 由剪贴板粘帖 + tmenu ToolBar.Paste 从剪贴板粘帖 tmenu ToolBar.Find 查找... tmenu ToolBar.FindNext 查找下一个 tmenu ToolBar.FindPrev 查找上一个 - tmenu ToolBar.Replace 替换... + tmenu ToolBar.Replace 查找和替换... tmenu ToolBar.LoadSesn 加载会话 - tmenu ToolBar.SaveSesn 保存当前的会话 - tmenu ToolBar.RunScript 运行Vim脚本 - tmenu ToolBar.Make 执行 Make - tmenu ToolBar.Shell 打开一个命令窗口 - tmenu ToolBar.RunCtags 执行 ctags - tmenu ToolBar.TagJump 跳到当前光标位置的标签 + tmenu ToolBar.SaveSesn 保存当前会话 + tmenu ToolBar.RunScript 运行 Vim 脚本 + tmenu ToolBar.Make 执行 Make (:make) + tmenu ToolBar.RunCtags 在当前目录建立 tags (!ctags -R .) + tmenu ToolBar.TagJump 跳转到光标位置的 tag tmenu ToolBar.Help Vim 帮助 tmenu ToolBar.FindHelp 查找 Vim 帮助 endfun endif " Syntax menu -menutrans &Syntax 语法(&S) -menutrans Set\ '&syntax'\ only 只设定\ 'syntax'(&s) -menutrans Set\ '&filetype'\ too 也设定\ 'filetype'(&f) -menutrans &Off 关闭(&O) -menutrans &Manual 手动设定(&M) -menutrans A&utomatic 自动设定(&U) -menutrans on/off\ for\ &This\ file 只对这个文件打开/关闭(&T) -menutrans Co&lor\ test 色彩显示测试(&L) -menutrans &Highlight\ test 语法效果测试(&H) -menutrans &Convert\ to\ HTML 转换成\ HTML\ 格式(&C) +menutrans &Syntax 语法(&S) +menutrans &Manual 手工(&M) +menutrans A&utomatic 自动(&U) +menutrans on/off\ for\ &This\ file 仅对这个文件开/关(&T) +menutrans &Show\ filetypes\ in\ menu 在菜单中显示文件类型(&S) +menutrans &Off 关闭(&O) +menutrans Co&lor\ test 色彩测试(&L) +menutrans &Highlight\ test 高亮测试(&H) +menutrans &Convert\ to\ HTML 转换成\ HTML(&C) +menutrans Set\ '&syntax'\ only 仅设定\ 'syntax'(&S) +menutrans Set\ '&filetype'\ too 也设定\ 'filetype'(&F) diff --git a/runtime/makemenu.vim b/runtime/makemenu.vim index 097e96af8..845393db0 100644 --- a/runtime/makemenu.vim +++ b/runtime/makemenu.vim @@ -1,6 +1,6 @@ " Script to define the syntax menu in synmenu.vim " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2006 Apr 16 +" Last Change: 2006 Apr 18 " This is used by "make menu" in the src directory. edit <sfile>:p:h/synmenu.vim @@ -119,6 +119,7 @@ SynMenu C.CHILL:chill SynMenu C.Clean:clean SynMenu C.Clever:cl SynMenu C.Clipper:clipper +SynMenu C.Cmake:cmake SynMenu C.Cold\ Fusion:cf SynMenu C.Config.Cfg\ Config\ file:cfg SynMenu C.Config.Generic\ Config\ file:conf @@ -363,8 +364,9 @@ SynMenu PQ.Python:python SynMenu PQ.Quake:quake SynMenu PQ.Quickfix\ window:qf -SynMenu R-Sg.R:r -SynMenu R-Sg.R\ help:rhelp +SynMenu R-Sg.R.R:r +SynMenu R-Sg.R.R\ help:rhelp +SynMenu R-Sg.R.R\ noweb:rnoweb SynMenu R-Sg.Racc\ input:racc SynMenu R-Sg.Radiance:radiance SynMenu R-Sg.Ratpoison:ratpoison @@ -490,6 +492,7 @@ SynMenu TUV.UIT/UIL:uil SynMenu TUV.UnrealScript:uc SynMenu TUV.Updatedb\.conf:updatedb SynMenu TUV.Valgrind:valgrind +SynMenu TUV.Vera:vera SynMenu TUV.Verilog-AMS\ HDL:verilogams SynMenu TUV.Verilog\ HDL:verilog SynMenu TUV.Vgrindefs:vgrindefs diff --git a/runtime/synmenu.vim b/runtime/synmenu.vim index 1dd2f00f1..c6b96b712 100644 --- a/runtime/synmenu.vim +++ b/runtime/synmenu.vim @@ -100,19 +100,20 @@ an 50.20.230 &Syntax.C.CHILL :cal SetSyn("chill")<CR> an 50.20.240 &Syntax.C.Clean :cal SetSyn("clean")<CR> an 50.20.250 &Syntax.C.Clever :cal SetSyn("cl")<CR> an 50.20.260 &Syntax.C.Clipper :cal SetSyn("clipper")<CR> -an 50.20.270 &Syntax.C.Cold\ Fusion :cal SetSyn("cf")<CR> -an 50.20.280 &Syntax.C.Config.Cfg\ Config\ file :cal SetSyn("cfg")<CR> -an 50.20.290 &Syntax.C.Config.Generic\ Config\ file :cal SetSyn("conf")<CR> -an 50.20.300 &Syntax.C.Config.Configure\.in :cal SetSyn("config")<CR> -an 50.20.310 &Syntax.C.ConTeXt :cal SetSyn("context")<CR> -an 50.20.320 &Syntax.C.CRM114 :cal SetSyn("crm")<CR> -an 50.20.330 &Syntax.C.Ctrl-H :cal SetSyn("ctrlh")<CR> -an 50.20.340 &Syntax.C.Cobol :cal SetSyn("cobol")<CR> -an 50.20.350 &Syntax.C.CSP :cal SetSyn("csp")<CR> -an 50.20.360 &Syntax.C.CUPL.CUPL :cal SetSyn("cupl")<CR> -an 50.20.370 &Syntax.C.CUPL.Simulation :cal SetSyn("cuplsim")<CR> -an 50.20.380 &Syntax.C.CVS.commit\ file :cal SetSyn("cvs")<CR> -an 50.20.390 &Syntax.C.CVS.cvsrc :cal SetSyn("cvsrc")<CR> +an 50.20.270 &Syntax.C.Cmake :cal SetSyn("cmake")<CR> +an 50.20.280 &Syntax.C.Cold\ Fusion :cal SetSyn("cf")<CR> +an 50.20.290 &Syntax.C.Config.Cfg\ Config\ file :cal SetSyn("cfg")<CR> +an 50.20.300 &Syntax.C.Config.Generic\ Config\ file :cal SetSyn("conf")<CR> +an 50.20.310 &Syntax.C.Config.Configure\.in :cal SetSyn("config")<CR> +an 50.20.320 &Syntax.C.ConTeXt :cal SetSyn("context")<CR> +an 50.20.330 &Syntax.C.CRM114 :cal SetSyn("crm")<CR> +an 50.20.340 &Syntax.C.Ctrl-H :cal SetSyn("ctrlh")<CR> +an 50.20.350 &Syntax.C.Cobol :cal SetSyn("cobol")<CR> +an 50.20.360 &Syntax.C.CSP :cal SetSyn("csp")<CR> +an 50.20.370 &Syntax.C.CUPL.CUPL :cal SetSyn("cupl")<CR> +an 50.20.380 &Syntax.C.CUPL.Simulation :cal SetSyn("cuplsim")<CR> +an 50.20.390 &Syntax.C.CVS.commit\ file :cal SetSyn("cvs")<CR> +an 50.20.400 &Syntax.C.CVS.cvsrc :cal SetSyn("cvsrc")<CR> an 50.30.100 &Syntax.DE.D :cal SetSyn("d")<CR> an 50.30.110 &Syntax.DE.Debian.Debian\ ChangeLog :cal SetSyn("debchangelog")<CR> an 50.30.120 &Syntax.DE.Debian.Debian\ Control :cal SetSyn("debcontrol")<CR> @@ -335,49 +336,50 @@ an 50.80.430 &Syntax.PQ.Pyrex :cal SetSyn("pyrex")<CR> an 50.80.440 &Syntax.PQ.Python :cal SetSyn("python")<CR> an 50.80.460 &Syntax.PQ.Quake :cal SetSyn("quake")<CR> an 50.80.470 &Syntax.PQ.Quickfix\ window :cal SetSyn("qf")<CR> -an 50.90.100 &Syntax.R-Sg.R :cal SetSyn("r")<CR> -an 50.90.110 &Syntax.R-Sg.R\ help :cal SetSyn("rhelp")<CR> -an 50.90.120 &Syntax.R-Sg.Racc\ input :cal SetSyn("racc")<CR> -an 50.90.130 &Syntax.R-Sg.Radiance :cal SetSyn("radiance")<CR> -an 50.90.140 &Syntax.R-Sg.Ratpoison :cal SetSyn("ratpoison")<CR> -an 50.90.150 &Syntax.R-Sg.RCS.RCS\ log\ output :cal SetSyn("rcslog")<CR> -an 50.90.160 &Syntax.R-Sg.RCS.RCS\ file :cal SetSyn("rcs")<CR> -an 50.90.170 &Syntax.R-Sg.Readline\ config :cal SetSyn("readline")<CR> -an 50.90.180 &Syntax.R-Sg.Rebol :cal SetSyn("rebol")<CR> -an 50.90.190 &Syntax.R-Sg.Remind :cal SetSyn("remind")<CR> -an 50.90.200 &Syntax.R-Sg.Relax\ NG\ compact :cal SetSyn("rnc")<CR> -an 50.90.210 &Syntax.R-Sg.Renderman.Renderman\ Shader\ Lang :cal SetSyn("sl")<CR> -an 50.90.220 &Syntax.R-Sg.Renderman.Renderman\ Interface\ Bytestream :cal SetSyn("rib")<CR> -an 50.90.230 &Syntax.R-Sg.Resolv\.conf :cal SetSyn("resolv")<CR> -an 50.90.240 &Syntax.R-Sg.Rexx :cal SetSyn("rexx")<CR> -an 50.90.250 &Syntax.R-Sg.Robots\.txt :cal SetSyn("robots")<CR> -an 50.90.260 &Syntax.R-Sg.RockLinux\ package\ desc\. :cal SetSyn("desc")<CR> -an 50.90.270 &Syntax.R-Sg.Rpcgen :cal SetSyn("rpcgen")<CR> -an 50.90.280 &Syntax.R-Sg.RPL/2 :cal SetSyn("rpl")<CR> -an 50.90.290 &Syntax.R-Sg.ReStructuredText :cal SetSyn("rst")<CR> -an 50.90.300 &Syntax.R-Sg.RTF :cal SetSyn("rtf")<CR> -an 50.90.310 &Syntax.R-Sg.Ruby :cal SetSyn("ruby")<CR> -an 50.90.330 &Syntax.R-Sg.S-Lang :cal SetSyn("slang")<CR> -an 50.90.340 &Syntax.R-Sg.Samba\ config :cal SetSyn("samba")<CR> -an 50.90.350 &Syntax.R-Sg.SAS :cal SetSyn("sas")<CR> -an 50.90.360 &Syntax.R-Sg.Sather :cal SetSyn("sather")<CR> -an 50.90.370 &Syntax.R-Sg.Scheme :cal SetSyn("scheme")<CR> -an 50.90.380 &Syntax.R-Sg.Scilab :cal SetSyn("scilab")<CR> -an 50.90.390 &Syntax.R-Sg.Screen\ RC :cal SetSyn("screen")<CR> -an 50.90.400 &Syntax.R-Sg.SDL :cal SetSyn("sdl")<CR> -an 50.90.410 &Syntax.R-Sg.Sed :cal SetSyn("sed")<CR> -an 50.90.420 &Syntax.R-Sg.Sendmail\.cf :cal SetSyn("sm")<CR> -an 50.90.430 &Syntax.R-Sg.Send-pr :cal SetSyn("sendpr")<CR> -an 50.90.440 &Syntax.R-Sg.Sensors\.conf :cal SetSyn("sensors")<CR> -an 50.90.450 &Syntax.R-Sg.Service\ Location\ config :cal SetSyn("slpconf")<CR> -an 50.90.460 &Syntax.R-Sg.Service\ Location\ registration :cal SetSyn("slpreg")<CR> -an 50.90.470 &Syntax.R-Sg.Service\ Location\ SPI :cal SetSyn("slpspi")<CR> -an 50.90.480 &Syntax.R-Sg.Services :cal SetSyn("services")<CR> -an 50.90.490 &Syntax.R-Sg.Setserial\ config :cal SetSyn("setserial")<CR> -an 50.90.500 &Syntax.R-Sg.SGML.SGML\ catalog :cal SetSyn("catalog")<CR> -an 50.90.510 &Syntax.R-Sg.SGML.SGML\ DTD :cal SetSyn("sgml")<CR> -an 50.90.520 &Syntax.R-Sg.SGML.SGML\ Declaration :cal SetSyn("sgmldecl")<CR> -an 50.90.530 &Syntax.R-Sg.SGML.SGML-linuxdoc :cal SetSyn("sgmllnx")<CR> +an 50.90.100 &Syntax.R-Sg.R.R :cal SetSyn("r")<CR> +an 50.90.110 &Syntax.R-Sg.R.R\ help :cal SetSyn("rhelp")<CR> +an 50.90.120 &Syntax.R-Sg.R.R\ noweb :cal SetSyn("rnoweb")<CR> +an 50.90.130 &Syntax.R-Sg.Racc\ input :cal SetSyn("racc")<CR> +an 50.90.140 &Syntax.R-Sg.Radiance :cal SetSyn("radiance")<CR> +an 50.90.150 &Syntax.R-Sg.Ratpoison :cal SetSyn("ratpoison")<CR> +an 50.90.160 &Syntax.R-Sg.RCS.RCS\ log\ output :cal SetSyn("rcslog")<CR> +an 50.90.170 &Syntax.R-Sg.RCS.RCS\ file :cal SetSyn("rcs")<CR> +an 50.90.180 &Syntax.R-Sg.Readline\ config :cal SetSyn("readline")<CR> +an 50.90.190 &Syntax.R-Sg.Rebol :cal SetSyn("rebol")<CR> +an 50.90.200 &Syntax.R-Sg.Remind :cal SetSyn("remind")<CR> +an 50.90.210 &Syntax.R-Sg.Relax\ NG\ compact :cal SetSyn("rnc")<CR> +an 50.90.220 &Syntax.R-Sg.Renderman.Renderman\ Shader\ Lang :cal SetSyn("sl")<CR> +an 50.90.230 &Syntax.R-Sg.Renderman.Renderman\ Interface\ Bytestream :cal SetSyn("rib")<CR> +an 50.90.240 &Syntax.R-Sg.Resolv\.conf :cal SetSyn("resolv")<CR> +an 50.90.250 &Syntax.R-Sg.Rexx :cal SetSyn("rexx")<CR> +an 50.90.260 &Syntax.R-Sg.Robots\.txt :cal SetSyn("robots")<CR> +an 50.90.270 &Syntax.R-Sg.RockLinux\ package\ desc\. :cal SetSyn("desc")<CR> +an 50.90.280 &Syntax.R-Sg.Rpcgen :cal SetSyn("rpcgen")<CR> +an 50.90.290 &Syntax.R-Sg.RPL/2 :cal SetSyn("rpl")<CR> +an 50.90.300 &Syntax.R-Sg.ReStructuredText :cal SetSyn("rst")<CR> +an 50.90.310 &Syntax.R-Sg.RTF :cal SetSyn("rtf")<CR> +an 50.90.320 &Syntax.R-Sg.Ruby :cal SetSyn("ruby")<CR> +an 50.90.340 &Syntax.R-Sg.S-Lang :cal SetSyn("slang")<CR> +an 50.90.350 &Syntax.R-Sg.Samba\ config :cal SetSyn("samba")<CR> +an 50.90.360 &Syntax.R-Sg.SAS :cal SetSyn("sas")<CR> +an 50.90.370 &Syntax.R-Sg.Sather :cal SetSyn("sather")<CR> +an 50.90.380 &Syntax.R-Sg.Scheme :cal SetSyn("scheme")<CR> +an 50.90.390 &Syntax.R-Sg.Scilab :cal SetSyn("scilab")<CR> +an 50.90.400 &Syntax.R-Sg.Screen\ RC :cal SetSyn("screen")<CR> +an 50.90.410 &Syntax.R-Sg.SDL :cal SetSyn("sdl")<CR> +an 50.90.420 &Syntax.R-Sg.Sed :cal SetSyn("sed")<CR> +an 50.90.430 &Syntax.R-Sg.Sendmail\.cf :cal SetSyn("sm")<CR> +an 50.90.440 &Syntax.R-Sg.Send-pr :cal SetSyn("sendpr")<CR> +an 50.90.450 &Syntax.R-Sg.Sensors\.conf :cal SetSyn("sensors")<CR> +an 50.90.460 &Syntax.R-Sg.Service\ Location\ config :cal SetSyn("slpconf")<CR> +an 50.90.470 &Syntax.R-Sg.Service\ Location\ registration :cal SetSyn("slpreg")<CR> +an 50.90.480 &Syntax.R-Sg.Service\ Location\ SPI :cal SetSyn("slpspi")<CR> +an 50.90.490 &Syntax.R-Sg.Services :cal SetSyn("services")<CR> +an 50.90.500 &Syntax.R-Sg.Setserial\ config :cal SetSyn("setserial")<CR> +an 50.90.510 &Syntax.R-Sg.SGML.SGML\ catalog :cal SetSyn("catalog")<CR> +an 50.90.520 &Syntax.R-Sg.SGML.SGML\ DTD :cal SetSyn("sgml")<CR> +an 50.90.530 &Syntax.R-Sg.SGML.SGML\ Declaration :cal SetSyn("sgmldecl")<CR> +an 50.90.540 &Syntax.R-Sg.SGML.SGML-linuxdoc :cal SetSyn("sgmllnx")<CR> an 50.100.100 &Syntax.Sh-S.Shell\ script.sh\ and\ ksh :cal SetSyn("sh")<CR> an 50.100.110 &Syntax.Sh-S.Shell\ script.csh :cal SetSyn("csh")<CR> an 50.100.120 &Syntax.Sh-S.Shell\ script.tcsh :cal SetSyn("tcsh")<CR> diff --git a/runtime/syntax/2html.vim b/runtime/syntax/2html.vim index 49feceea9..b852f48a9 100644 --- a/runtime/syntax/2html.vim +++ b/runtime/syntax/2html.vim @@ -1,6 +1,6 @@ " Vim syntax support file " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2005 Dec 04 +" Last Change: 2006 Apr 18 " (modified by David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>) " (XHTML support by Panagiotis Issaris <takis@lumumba.luc.ac.be>) @@ -224,14 +224,16 @@ else endif let s:HtmlSpace = ' ' +let s:LeadingSpace = ' ' let s:HtmlEndline = '' if exists("html_no_pre") let s:HtmlEndline = '<br' . s:tag_close if exists("use_xhtml") - let s:HtmlSpace = '\ ' + let s:LeadingSpace = ' ' else - let s:HtmlSpace = '\ ' + let s:LeadingSpace = ' ' endif + let s:HtmlSpace = '\' . s:LeadingSpace endif " HTML header, with the title and generator ;-). Left free space for the CSS, @@ -246,9 +248,17 @@ if exists("html_use_css") exe "normal! a<style type=\"text/css\">\n<!--\n-->\n</style>\n\e" endif if exists("html_no_pre") - exe "normal! a</head>\n<body>\n\e" + if exists("use_xhtml") + exe "normal! a</head>\n<body>\n<p>\n\e" + else + exe "normal! a</head>\n<body>\n\e" + endif else - exe "normal! a</head>\n<body>\n<pre>\n\e" + if exists("use_xhtml") + exe "normal! a</head>\n<body>\n<p>\n<pre>\n\e" + else + exe "normal! a</head>\n<body>\n<pre>\n\e" + endif endif exe s:orgwin . "wincmd w" @@ -296,7 +306,7 @@ while s:lnum <= s:end while s:n > 0 if s:numblines " Indent if line numbering is on - let s:new = repeat(' ', strlen(s:end) + 1) . repeat(s:difffillchar, 3) + let s:new = repeat(s:LeadingSpace, strlen(s:end) + 1) . repeat(s:difffillchar, 3) else let s:new = repeat(s:difffillchar, 3) endif @@ -406,9 +416,17 @@ endwhile " Finish with the last line exe s:newwin . "wincmd w" if exists("html_no_pre") - exe "normal! a\n</body>\n</html>\e" + if exists("use_xhtml") + exe "normal! a</p>\n</body>\n</html>\e" + else + exe "normal! a\n</body>\n</html>\e" + endif else - exe "normal! a</pre>\n</body>\n</html>\e" + if exists("use_xhtml") + exe "normal! a</pre>\n</p>\n</body>\n</html>\e" + else + exe "normal! a</pre>\n</body>\n</html>\e" + endif endif @@ -525,4 +543,4 @@ if !v:profiling delfunc s:HtmlClosing endif endif -silent! unlet s:diffattr s:difffillchar s:foldfillchar s:HtmlSpace s:HtmlEndline +silent! unlet s:diffattr s:difffillchar s:foldfillchar s:HtmlSpace s:LeadingSpace s:HtmlEndline diff --git a/runtime/syntax/cmake.vim b/runtime/syntax/cmake.vim new file mode 100644 index 000000000..8dfe3d713 --- /dev/null +++ b/runtime/syntax/cmake.vim @@ -0,0 +1,85 @@ +" ============================================================================= +" +" Program: CMake - Cross-Platform Makefile Generator +" Module: $RCSfile$ +" Language: VIM +" Date: $Date$ +" Version: $Revision$ +" +" ============================================================================= + +" Vim syntax file +" Language: 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 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore +syn match cmakeComment /#.*$/ +syn region cmakeRegistry start=/\[/ end=/\]/ skip=/\\[\[\]]/ + \ contained +syn match cmakeArgument /[^()"]+/ + \ contained +syn match cmakeVariableValue /\${[^}]*}/ + \ contained oneline +syn match cmakeEnvironment /\$ENV{.*}/ + \ contained +syn keyword cmakeSystemVariables + \ WIN32 UNIX APPLE CYGWIN BORLAND MINGW MSVC MSVC_IDE MSVC60 MSVC70 MSVC71 MSVC80 +syn keyword cmakeOperators + \ AND BOOL CACHE COMMAND DEFINED DOC EQUAL EXISTS FALSE GREATER INTERNAL LESS MATCHES NAME NAMES NAME_WE NOT OFF ON OR PATH PATHS PROGRAM STREQUAL STRGREATER STRING STRLESS TRUE +" \ contained +syn region cmakeString start=/"/ end=/"/ skip=/\\"/ + \ contains=ALLBUT,cmakeString +syn region cmakeArguments start=/\s*(/ end=/)/ + \ contains=ALLBUT,cmakeArguments +syn keyword cmakeDeprecated ABSTRACT_FILES BUILD_NAME SOURCE_FILES SOURCE_FILES_REMOVE VTK_MAKE_INSTANTIATOR VTK_WRAP_JAVA VTK_WRAP_PYTHON VTK_WRAP_TCL WRAP_EXCLUDE_FILES + \ nextgroup=cmakeArgument +syn keyword cmakeStatement + \ ADD_CUSTOM_COMMAND ADD_CUSTOM_TARGET ADD_DEFINITIONS ADD_DEPENDENCIES ADD_EXECUTABLE ADD_LIBRARY ADD_SUBDIRECTORY ADD_TEST AUX_SOURCE_DIRECTORY BUILD_COMMAND BUILD_NAME CMAKE_MINIMUM_REQUIRED CONFIGURE_FILE CREATE_TEST_SOURCELIST ELSE ENABLE_LANGUAGE ENABLE_TESTING ENDFOREACH ENDIF ENDWHILE EXEC_PROGRAM EXECUTE_PROCESS EXPORT_LIBRARY_DEPENDENCIES FILE FIND_FILE FIND_LIBRARY FIND_PACKAGE FIND_PATH FIND_PROGRAM FLTK_WRAP_UI FOREACH GET_CMAKE_PROPERTY GET_DIRECTORY_PROPERTY GET_FILENAME_COMPONENT GET_SOURCE_FILE_PROPERTY GET_TARGET_PROPERTY GET_TEST_PROPERTY IF INCLUDE INCLUDE_DIRECTORIES INCLUDE_EXTERNAL_MSPROJECT INCLUDE_REGULAR_EXPRESSION INSTALL INSTALL_FILES INSTALL_PROGRAMS INSTALL_TARGETS LINK_DIRECTORIES LINK_LIBRARIES LIST LOAD_CACHE LOAD_COMMAND MACRO MAKE_DIRECTORY MARK_AS_ADVANCED MATH MESSAGE OPTION OUTPUT_REQUIRED_FILES PROJECT QT_WRAP_CPP QT_WRAP_UI REMOVE REMOVE_DEFINITIONS SEPARATE_ARGUMENTS SET SET_DIRECTORY_PROPERTIES SET_SOURCE_FILES_PROPERTIES SET_TARGET_PROPERTIES SET_TESTS_PROPERTIES SITE_NAME SOURCE_GROUP STRING SUBDIR_DEPENDS SUBDIRS TARGET_LINK_LIBRARIES TRY_COMPILE TRY_RUN USE_MANGLED_MESA UTILITY_SOURCE VARIABLE_REQUIRES VTK_MAKE_INSTANTIATOR VTK_WRAP_JAVA VTK_WRAP_PYTHON VTK_WRAP_TCL WHILE WRITE_FILE + \ nextgroup=cmakeArgumnts + +"syn match cmakeMacro /^\s*[A-Z_]\+/ nextgroup=cmakeArgumnts + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_cmake_syntax_inits") + if version < 508 + let did_cmake_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink cmakeStatement Statement + HiLink cmakeComment Comment + HiLink cmakeString String + HiLink cmakeVariableValue Type + HiLink cmakeRegistry Underlined + HiLink cmakeArguments Identifier + HiLink cmakeArgument Constant + HiLink cmakeEnvironment Special + HiLink cmakeOperators Operator + HiLink cmakeMacro PreProc + HiLink cmakeError Error + + delcommand HiLink +endif + +let b:current_syntax = "cmake" + +"EOF" diff --git a/runtime/syntax/rnoweb.vim b/runtime/syntax/rnoweb.vim new file mode 100644 index 000000000..7a106ecb9 --- /dev/null +++ b/runtime/syntax/rnoweb.vim @@ -0,0 +1,55 @@ +" Vim syntax file +" Language: R noweb Files +" Maintainer: Johannes Ranke <jranke@uni-bremen.de> +" Last Change: 2006 Apr 18 +" Version: 0.5 +" SVN: $Id$ +" Remarks: - This file is inspired by the proposal of +" Fernando Henrique Ferraz Pereira da Rosa <feferraz@ime.usp.br> +" http://www.ime.usp.br/~feferraz/en/sweavevim.html +" - It extends some clusters from syntax/tex.vim (version 33, +" March 06 2006) and therefore depends on some contents +" of this file +" + +" Version Clears: {{{1 +" For version 5.x: Clear all syntax items +" For version 6.x and 7.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case match + +" Extension of Tex regions {{{1 +runtime syntax/tex.vim +unlet b:current_syntax + +syn cluster texDocGroup contains=texPartZone,@texPartGroup,@rnoweb +syn cluster texPartGroup contains=texChapterZone,texSectionZone,texParaZone,@rnoweb +syn cluster texChapterGroup contains=texSectionZone,texParaZone,@rnoweb +syn cluster texSectionGroup contains=texSubSectionZone,texParaZone,@rnoweb +syn cluster texSubSectionGroup contains=texSubSubSectionZone,texParaZone,@rnoweb +syn cluster texSubSubSectionGroup contains=texParaZone,@rnoweb +syn cluster texParaGroup contains=texSubParaZone,@rnoweb + +" Highlighting of R code using an existing r.vim syntax file if available {{{1 +syn include @rnowebR syntax/r.vim +syn region rnowebChunk matchgroup=rnowebDelimiter start="^<<.*>>=" matchgroup=rnowebDelimiter end="^@" contains=@rnowebR,rnowebChunkReference,rnowebChunk keepend +syn match rnowebChunkReference "^<<.*>>$" contained +syn region rnowebSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter end="}" contains=@rnowebR + +" Sweave options command {{{1 +syn region rnowebSweaveopts matchgroup=Delimiter start="\\SweaveOpts{" matchgroup=Delimiter end="}" + +" rnoweb Cluster {{{1 +syn cluster rnoweb contains=rnowebChunk,rnowebChunkReference,rnowebDelimiter,rnowebSexpr,rnowebSweaveopts + +" Highlighting {{{1 +hi def link rnowebDelimiter Delimiter +hi def link rnowebSweaveOpts Statement + +let b:current_syntax = "rnoweb" +" vim: foldmethod=marker: diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim index 5a5e6a2a4..6452e725e 100644 --- a/runtime/syntax/tex.vim +++ b/runtime/syntax/tex.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: TeX " Maintainer: Dr. Charles E. Campbell, Jr. <NdrchipO@ScampbellPfamily.AbizM> -" Last Change: Apr 12, 2006 -" Version: 34 +" Last Change: Apr 18, 2006 +" Version: 35 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax " " Notes: {{{1 @@ -391,6 +391,12 @@ endif " will appropriately terminate. Ideally vim would let me save a " character from the start pattern and re-use it in the end-pattern. syn region texZone start="\\begin{verbatim}" end="\\end{verbatim}\|%stopzone\>" contains=@Spell +" listings package: +syn region texZone start="\\begin{lstlisting}" end="\\end{lstlisting}\|%stopzone\>" contains=@Spell +" moreverb package: +syn region texZone start="\\begin{verbatimtab}" end="\\end{verbatimtab}\|%stopzone\>" contains=@Spell +syn region texZone start="\\begin{verbatimwrite}" end="\\end{verbatimwrite}\|%stopzone\>" contains=@Spell +syn region texZone start="\\begin{boxedverbatim}" end="\\end{boxedverbatim}\|%stopzone\>" contains=@Spell if version < 600 syn region texZone start="\\verb\*\=`" end="`\|%stopzone\>" syn region texZone start="\\verb\*\=#" end="#\|%stopzone\>" diff --git a/runtime/syntax/vera.vim b/runtime/syntax/vera.vim new file mode 100644 index 000000000..b8e25cf34 --- /dev/null +++ b/runtime/syntax/vera.vim @@ -0,0 +1,361 @@ +" Vim syntax file +" Language: Vera +" Maintainer: Dave Eggum (opine at bluebottle dOt com) +" Last Change: 2005 Dec 19 + +" NOTE: extra white space at the end of the line will be highlighted if you +" add this line to your colorscheme: + +" highlight SpaceError guibg=#204050 + +" (change the value for guibg to any color you like) + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" A bunch of useful Vera keywords +syn keyword veraStatement break return continue fork join terminate +syn keyword veraStatement breakpoint proceed + +syn keyword veraLabel bad_state bad_trans bind constraint coverage_group +syn keyword veraLabel class CLOCK default function interface m_bad_state +syn keyword veraLabel m_bad_trans m_state m_trans program randseq state +syn keyword veraLabel task trans + +syn keyword veraConditional if else case casex casez randcase +syn keyword veraRepeat repeat while for do foreach +syn keyword veraModifier after all any around assoc_size async +syn keyword veraModifier before big_endian bit_normal bit_reverse export +syn keyword veraModifier extends extern little_endian local hdl_node hdl_task +syn keyword veraModifier negedge none packed protected posedge public rules +syn keyword veraModifier shadow soft static super this typedef unpacked var +syn keyword veraModifier vca virtual virtuals wildcard with + +syn keyword veraType reg string enum event bit +syn keyword veraType rand randc integer port prod + +syn keyword veraDeprecated call_func call_task close_conn get_bind get_bind_id +syn keyword veraDeprecated get_conn_err mailbox_receive mailbox_send make_client +syn keyword veraDeprecated make_server simwave_plot up_connections + +" predefined tasks and functions +syn keyword veraTask alloc assoc_index cast_assign cm_coverage +syn keyword veraTask cm_get_coverage cm_get_limit delay error error_mode +syn keyword veraTask exit fclose feof ferror fflush flag fopen fprintf +syn keyword veraTask freadb freadh freadstr get_cycle get_env get_memsize +syn keyword veraTask get_plus_arg getstate get_systime get_time get_time_unit +syn keyword veraTask initstate lock_file mailbox_get mailbox_put os_command +syn keyword veraTask printf prodget prodset psprintf query query_str query_x +syn keyword veraTask rand48 random region_enter region_exit rewind +syn keyword veraTask semaphore_get semaphore_put setstate signal_connect +syn keyword veraTask sprintf srandom sscanf stop suspend_thread sync +syn keyword veraTask timeout trace trigger unit_delay unlock_file urand48 +syn keyword veraTask urandom urandom_range vera_bit_reverse vera_crc +syn keyword veraTask vera_pack vera_pack_big_endian vera_plot +syn keyword veraTask vera_report_profile vera_unpack vera_unpack_big_endian +syn keyword veraTask vsv_call_func vsv_call_task vsv_get_conn_err +syn keyword veraTask vsv_make_client vsv_make_server vsv_up_connections +syn keyword veraTask vsv_wait_for_done vsv_wait_for_input wait_child wait_var + +syn cluster veraOperGroup contains=veraOperator,veraOperParen,veraNumber,veraString,veraOperOk,veraType +" syn match veraOperator "++\|--\|&\|\~&\||\|\~|\|^\|\~^\|\~\|><" +" syn match veraOperator "*\|/\|%\|+\|-\|<<\|>>\|<\|<=\|>\|>=\|!in" +" syn match veraOperator "=?=\|!?=\|==\|!=\|===\|!==\|&\~\|^\~\||\~" +" syn match veraOperator "&&\|||\|=\|+=\|-=\|*=\|/=\|%=\|<<=\|>>=\|&=" +" syn match veraOperator "|=\|^=\|\~&=\|\~|=\|\~^=" + +syn match veraOperator "[&|\~><!*@+/=,.\^\-]" +syn keyword veraOperator or in dist not + +" open vera class methods +syn keyword veraMethods atobin atohex atoi atooct backref bittostr capacity +syn keyword veraMethods compare Configure constraint_mode delete DisableTrigger +syn keyword veraMethods DoAction empty EnableCount EnableTrigger Event find +syn keyword veraMethods find_index first first_index GetAssert get_at_least +syn keyword veraMethods get_auto_bin getc GetCount get_coverage_goal get_cov_weight +syn keyword veraMethods get_cross_bin_max GetFirstAssert GetName GetNextAssert +syn keyword veraMethods get_status get_status_msg hide hash icompare insert +syn keyword veraMethods inst_get_at_least inst_get_auto_bin_max inst_get_collect +syn keyword veraMethods inst_get_coverage_goal inst_get_cov_weight inst_getcross_bin_max +syn keyword veraMethods inst_query inst_set_at_least inst_set_auto_bin_max +syn keyword veraMethods inst_set_bin_activiation inst_set_collect inst_set_coverage_goal +syn keyword veraMethods inst_set_cov_weight inst_set_cross_bin_max itoa last last_index +syn keyword veraMethods len load match max max_index min min_index new object_compare +syn keyword veraMethods object_compare object_copy object_print pack pick_index +syn keyword veraMethods pop_back pop_front post_boundary postmatch post_pack post_pack +syn keyword veraMethods post_randomize post_randomize post_unpack post_unpack +syn keyword veraMethods pre_boundary prematch pre_pack pre_pack pre_randomize +syn keyword veraMethods pre-randomize pre_unpack push_back push_front putc query +syn keyword veraMethods query_str rand_mode randomize reserve reverse rsort search +syn keyword veraMethods set_at_least set_auto_bin_max set_bin_activiation +syn keyword veraMethods set_coverage_goal set_cov_weight set_cross_bin_max set_name +syn keyword veraMethods size sort substr sum thismatch tolower toupper unique_index +syn keyword veraMethods unpack Wait + +" interface keywords +syn keyword veraInterface ASYNC CLOCK gnr gr0 gr1 grx grz NHOLD nr NR0 NR1 +syn keyword veraInterface NRZ NRZ NSAMPLE PHOLD PR0 PR1 PRX PRZ r0 r1 rx snr +syn keyword veraInterface sr0 sr1 srx srz depth inout input output +syn match veraInterface "\$\w\+" + + +syn keyword veraTodo contained TODO FIXME XXX FINISH + +" veraCommentGroup allows adding matches for special things in comments +syn cluster veraCommentGroup contains=veraTodo + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match veraSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" +syn match veraFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpnm]\|\[\^\=.[^]]*\]\)" contained +syn match veraFormat display "%%" contained +syn region veraString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=veraSpecial,veraFormat,@Spell +syn region veraConcat contained transparent oneline start='{' end='}' + +" veraCppString: same as veraString, but ends at end of line +syn region veraCppString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=veraSpecial,veraFormat,@Spell + +syn match veraCharacter "'[^\\]'" +syn match veraCharacter "L'[^']*'" contains=veraSpecial +syn match veraSpecialError "'\\[^'\"?\\abefnrtv]'" +syn match veraSpecialCharacter "'\\['\"?\\abefnrtv]'" +syn match veraSpecialCharacter display "'\\\o\{1,3}'" +syn match veraSpecialCharacter display "'\\x\x\{1,2}'" +syn match veraSpecialCharacter display "L'\\x\x\+'" + +" highlight trailing white space +syn match veraSpaceError display excludenl "\s\+$" +syn match veraSpaceError display " \+\t"me=e-1 + +"catch errors caused by wrong parenthesis and brackets +syn cluster veraParenGroup contains=veraParenError,veraIncluded,veraSpecial,veraCommentSkip,veraCommentString,veraComment2String,@veraCommentGroup,veraCommentStartError,veraUserCont,veraUserLabel,veraBitField,veraCommentSkip,veraOctalZero,veraCppOut,veraCppOut2,veraCppSkip,veraFormat,veraNumber,veraFloat,veraOctal,veraOctalError,veraNumbersCom + +syn region veraParen transparent start='(' end=')' contains=ALLBUT,@veraParenGroup,veraCppParen,veraErrInBracket,veraCppBracket,veraCppString,@Spell +" veraCppParen: same as veraParen but ends at end-of-line; used in veraDefine +syn region veraCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@veraParenGroup,veraErrInBracket,veraParen,veraBracket,veraString,@Spell +syn match veraParenError display "[\])]" +" syn match veraErrInParen display contained "[\]{}]" +syn match veraErrInParen display contained "[\]]" +syn region veraBracket transparent start='\[' end=']' contains=ALLBUT,@veraParenGroup,veraErrInParen,veraCppParen,veraCppBracket,veraCppString,@Spell + +" veraCppBracket: same as veraParen but ends at end-of-line; used in veraDefine +syn region veraCppBracket transparent start='\[' skip='\\$' excludenl end=']' end='$' contained contains=ALLBUT,@veraParenGroup,veraErrInParen,veraParen,veraBracket,veraString,@Spell +syn match veraErrInBracket display contained "[);{}]" + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match veraNumbers display transparent "\<\d\|\.\d" contains=veraNumber,veraFloat,veraOctalError,veraOctal +" Same, but without octal error (for comments) +syn match veraNumbersCom display contained transparent "\<\d\|\.\d" contains=veraNumber,veraFloat,veraOctal +" syn match veraNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" +" "hex number +" syn match veraNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" +" syn match veraNumber "\(\<[0-9]\+\|\)'[bdoh][0-9a-fxzA-FXZ_]\+\>" +syn match veraNumber "\<\(\<[0-9]\+\)\?\('[bdoh]\)\?[0-9a-fxz_]\+\>" +" syn match veraNumber "\<[+-]\=[0-9]\+\>" +" Flag the first zero of an octal number as something special +syn match veraOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=veraOctalZero +syn match veraOctalZero display contained "\<0" +syn match veraFloat display contained "\d\+f" +"floating point number, with dot, optional exponent +syn match veraFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" +"floating point number, starting with a dot, optional exponent +syn match veraFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match veraFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" +"hexadecimal floating point number, optional leading digits, with dot, with exponent +syn match veraFloat display contained "0x\x*\.\x\+p[-+]\=\d\+[fl]\=\>" +"hexadecimal floating point number, with leading digits, optional dot, with exponent +syn match veraFloat display contained "0x\x\+\.\=p[-+]\=\d\+[fl]\=\>" + +" flag an octal number with wrong digits +syn match veraOctalError display contained "0\o*[89]\d*" +syn case match + +let vera_comment_strings = 1 + +if exists("vera_comment_strings") + " A comment can contain veraString, veraCharacter and veraNumber. + " But a "*/" inside a veraString in a veraComment DOES end the comment! So we + " need to use a special type of veraString: veraCommentString, which also ends on + " "*/", and sees a "*" at the start of the line as comment again. + " Unfortunately this doesn't work very well for // type of comments :-( + syntax match veraCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region veraCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=veraSpecial,veraCommentSkip + syntax region veraComment2String contained start=+\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=veraSpecial + syntax region veraCommentL start="//" skip="\\$" end="$" keepend contains=@veraCommentGroup,veraComment2String,veraCharacter,veraNumbersCom,veraSpaceError,@Spell + if exists("vera_no_comment_fold") + syntax region veraComment matchgroup=veraCommentStart start="/\*" end="\*/" contains=@veraCommentGroup,veraCommentStartError,veraCommentString,veraCharacter,veraNumbersCom,veraSpaceError,@Spell + else + syntax region veraComment matchgroup=veraCommentStart start="/\*" end="\*/" contains=@veraCommentGroup,veraCommentStartError,veraCommentString,veraCharacter,veraNumbersCom,veraSpaceError,@Spell fold + endif +else + syn region veraCommentL start="//" skip="\\$" end="$" keepend contains=@veraCommentGroup,veraSpaceError,@Spell + if exists("vera_no_comment_fold") + syn region veraComment matchgroup=veraCommentStart start="/\*" end="\*/" contains=@veraCommentGroup,veraCommentStartError,veraSpaceError,@Spell + else + syn region veraComment matchgroup=veraCommentStart start="/\*" end="\*/" contains=@veraCommentGroup,veraCommentStartError,veraSpaceError,@Spell fold + endif +endif +" keep a // comment separately, it terminates a preproc. conditional +syntax match veraCommentError display "\*/" +syntax match veraCommentStartError display "/\*"me=e-1 contained + +syntax region veraBlock start="{" end="}" transparent fold + +" open vera pre-defined constants +syn keyword veraConstant ALL ANY BAD_STATE BAD_TRANS CALL CHECK CHGEDGE +syn keyword veraConstant CLEAR COPY_NO_WAIT COPY_WAIT CROSS CROSS_TRANS +syn keyword veraConstant DEBUG DELETE EC_ARRAYX EC_CODE_END EC_CONFLICT +syn keyword veraConstant EC_EVNTIMOUT EC_EXPECT EC_FULLEXPECT EC_MBXTMOUT +syn keyword veraConstant EC_NEXPECT EC_RETURN EC_RGNTMOUT EC_SCONFLICT +syn keyword veraConstant EC_SEMTMOUT EC_SEXPECT EC_SFULLEXPECT EC_SNEXTPECT +syn keyword veraConstant EC_USERSET EQ EVENT FAIL FIRST FORK GE GOAL GT +syn keyword veraConstant HAND_SHAKE HI HIGH HNUM LE LIC_EXIT LIC_PRERR +syn keyword veraConstant LIC_PRWARN LIC_WAIT LO LOAD LOW LT MAILBOX MAX_COM +syn keyword veraConstant NAME NE NEGEDGE NEXT NO_OVERLAP NO_OVERLAP_STATE +syn keyword veraConstant NO_OVERLAP_TRANS NO_VARS NO_WAIT NUM NUM_BIN +syn keyword veraConstant NUM_DET null OFF OK OK_LAST ON ONE_BLAST ONE_SHOT ORDER +syn keyword veraConstant PAST_IT PERCENT POSEDGE PROGRAM RAWIN REGION REPORT +syn keyword veraConstant SAMPLE SAVE SEMAPHORE SET SILENT STATE stderr +syn keyword veraConstant stdin stdout STR STR_ERR_OUT_OF_RANGE +syn keyword veraConstant STR_ERR_REGEXP_SYNTAX SUM TRANS VERBOSE void WAIT +syn keyword veraConstant __LINE__ __FILE__ __DATE__ __TIME__ __VERA__ +syn keyword veraConstant __VERSION__ __VERA_VERSION__ __VERA_MINOR__ +syn keyword veraConstant __VERA_PATCH__ __VERA_VMC__ __VERA_VMC_MINOR__ + +syn match veraUserConstant "\<[A-Z][A-Z0-9_]\+\>" + +syn match veraClass "\zs\w\+\ze::" +syn match veraClass "\zs\w\+\ze\s\+\w\+\s*[=;,)\[]" contains=veraConstant,veraUserConstant +syn match veraClass "\zs\w\+\ze\s\+\w\+\s*$" contains=veraConstant,veraUserConstant +syn match veraUserMethod "\zs\w\+\ze\s*(" contains=veraConstant,veraUserConstant +syn match veraObject "\zs\w\+\ze\.\w" +syn match veraObject "\zs\w\+\ze\.\$\w" + +" Accept ` for # (Verilog) +syn region veraPreCondit start="^\s*\(`\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=veraComment,veraCppString,veraCharacter,veraCppParen,veraParenError,veraNumbers,veraCommentError,veraSpaceError +syn match veraPreCondit display "^\s*\(`\|#\)\s*\(else\|endif\)\>" +if !exists("vera_no_if0") + syn region veraCppOut start="^\s*\(`\|#\)\s*if\s\+0\+\>" end=".\@=\|$" contains=veraCppOut2 + syn region veraCppOut2 contained start="0" end="^\s*\(`\|#\)\s*\(endif\>\|else\>\|elif\>\)" contains=veraSpaceError,veraCppSkip + syn region veraCppSkip contained start="^\s*\(`\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(`\|#\)\s*endif\>" contains=veraSpaceError,veraCppSkip +endif +syn region veraIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match veraIncluded display contained "<[^>]*>" +syn match veraInclude display "^\s*\(`\|#\)\s*include\>\s*["<]" contains=veraIncluded +"syn match veraLineSkip "\\$" +syn cluster veraPreProcGroup contains=veraPreCondit,veraIncluded,veraInclude,veraDefine,veraErrInParen,veraErrInBracket,veraUserLabel,veraSpecial,veraOctalZero,veraCppOut,veraCppOut2,veraCppSkip,veraFormat,veraNumber,veraFloat,veraOctal,veraOctalError,veraNumbersCom,veraString,veraCommentSkip,veraCommentString,veraComment2String,@veraCommentGroup,veraCommentStartError,veraParen,veraBracket,veraMulti +syn region veraDefine start="^\s*\(`\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" end="//"me=s-1 contains=ALLBUT,@veraPreProcGroup,@Spell +syn region veraPreProc start="^\s*\(`\|#\)\s*\(pragma\>\|line\>\|warning\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@veraPreProcGroup,@Spell + +" Highlight User Labels +syn cluster veraMultiGroup contains=veraIncluded,veraSpecial,veraCommentSkip,veraCommentString,veraComment2String,@veraCommentGroup,veraCommentStartError,veraUserCont,veraUserLabel,veraBitField,veraOctalZero,veraCppOut,veraCppOut2,veraCppSkip,veraFormat,veraNumber,veraFloat,veraOctal,veraOctalError,veraNumbersCom,veraCppParen,veraCppBracket,veraCppString +syn region veraMulti transparent start='?' skip='::' end=':' contains=ALLBUT,@veraMultiGroup,@Spell +" syn region veraMulti transparent start='?' skip='::' end=':' contains=ALL +" The above causes veraCppOut2 to catch on: +" i = (isTrue) ? 0 : 1; +" which ends up commenting the rest of the file + +" Avoid matching foo::bar() by requiring that the next char is not ':' +syn cluster veraLabelGroup contains=veraUserLabel +syn match veraUserCont display "^\s*\I\i*\s*:$" contains=@veraLabelGroup +syn match veraUserCont display ";\s*\I\i*\s*:$" contains=@veraLabelGroup +syn match veraUserCont display "^\s*\I\i*\s*:[^:]"me=e-1 contains=@veraLabelGroup +syn match veraUserCont display ";\s*\I\i*\s*:[^:]"me=e-1 contains=@veraLabelGroup + +syn match veraUserLabel display "\I\i*" contained + +" Avoid recognizing most bitfields as labels +syn match veraBitField display "^\s*\I\i*\s*:\s*[1-9]"me=e-1 +syn match veraBitField display ";\s*\I\i*\s*:\s*[1-9]"me=e-1 + +if exists("vera_minlines") + let b:vera_minlines = vera_minlines +else + if !exists("vera_no_if0") + let b:vera_minlines = 50 " #if 0 constructs can be long + else + let b:vera_minlines = 15 " mostly for () constructs + endif +endif +exec "syn sync ccomment veraComment minlines=" . b:vera_minlines + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_vera_syn_inits") + if version < 508 + let did_vera_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink veraClass Identifier + HiLink veraObject Identifier + HiLink veraUserMethod Function + HiLink veraTask Keyword + HiLink veraModifier Tag + HiLink veraDeprecated veraError + HiLink veraMethods Statement + " HiLink veraInterface Label + HiLink veraInterface Function + + HiLink veraFormat veraSpecial + HiLink veraCppString veraString + HiLink veraCommentL veraComment + HiLink veraCommentStart veraComment + HiLink veraLabel Label + HiLink veraUserLabel Label + HiLink veraConditional Conditional + HiLink veraRepeat Repeat + HiLink veraCharacter Character + HiLink veraSpecialCharacter veraSpecial + HiLink veraNumber Number + HiLink veraOctal Number + HiLink veraOctalZero PreProc " link this to Error if you want + HiLink veraFloat Float + HiLink veraOctalError veraError + HiLink veraParenError veraError + HiLink veraErrInParen veraError + HiLink veraErrInBracket veraError + HiLink veraCommentError veraError + HiLink veraCommentStartError veraError + HiLink veraSpaceError SpaceError + HiLink veraSpecialError veraError + HiLink veraOperator Operator + HiLink veraStructure Structure + HiLink veraInclude Include + HiLink veraPreProc PreProc + HiLink veraDefine Macro + HiLink veraIncluded veraString + HiLink veraError Error + HiLink veraStatement Statement + HiLink veraPreCondit PreCondit + HiLink veraType Type + " HiLink veraConstant Constant + HiLink veraConstant Keyword + HiLink veraUserConstant Constant + HiLink veraCommentString veraString + HiLink veraComment2String veraString + HiLink veraCommentSkip veraComment + HiLink veraString String + HiLink veraComment Comment + HiLink veraSpecial SpecialChar + HiLink veraTodo Todo + HiLink veraCppSkip veraCppOut + HiLink veraCppOut2 veraCppOut + HiLink veraCppOut Comment + + delcommand HiLink +endif + +let b:current_syntax = "vera" + +" vim: ts=8 diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index f5e654af5..5b8b32edb 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Vim 7.0 script " Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> -" Last Change: Apr 12, 2006 -" Version: 7.0-42 +" Last Change: Apr 18, 2006 +" Version: 7.0-44 " Automatically generated keyword lists: {{{1 " Quit when a syntax file was already loaded {{{2 @@ -129,7 +129,7 @@ syn cluster vimOperGroup contains=vimOper,vimOperParen,vimNumber,vimString,vimRe syn match vimOper "\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile syn region vimOperParen oneline matchgroup=vimOper start="(" end=")" contains=@vimOperGroup -syn region vimOperParen matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar +syn region vimOperParen oneline matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar if !exists("g:vimsyntax_noerror") syn match vimOperError ")" endif @@ -252,7 +252,7 @@ syn match vimFilter contained "\A!.\{-}\(|\|$\)"ms=s+1 contains=vimSpecFile "syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\)' " Set command and associated set-options (vimOptions) with comment {{{2 -syn region vimSet matchgroup=vimCommand start="\<setlocal\|set\>" skip="\%(\\\\\)*\\." end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod +syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|set\)\>" skip="\%(\\\\\)*\\." end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod syn region vimSetEqual contained start="=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation oneline syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar syn match vimSetSep contained "[,:]" diff --git a/runtime/tutor/tutor.sk b/runtime/tutor/tutor.sk index 243493bd1..f56cdfb93 100644 --- a/runtime/tutor/tutor.sk +++ b/runtime/tutor/tutor.sk @@ -1,5 +1,5 @@ =============================================================================== -= V i t a j t e v o V I M T u t o r i a l i - Verzia 1.5 = += V i t a j t e v o V I M T u t o r i a l i - Verzia 1.7 = =============================================================================== Vim je ve祄i v齥onn editor, ktor m pr韑i ve礱 pr韐azov na to aby @@ -10,6 +10,7 @@ Pribli緉 鑑s potrebn na prebratie tejto v齯ky je 25-30 min鷗, z醰is na tom, ko祂o je str醰en閔o 鑑su s preskavan韒. + UPOZORNENIE: Pr韐azy v lekci醕h modifikuj text. Vytvor k髉iu tohto s鷅oru aby sa mohlo precvi鑟va na 騩m (pri 箃arte "vimtutor" je toto k髉ia). @@ -20,16 +21,17 @@ Presved sa, 緀 Shift-Lock NIEJE stla鑕n a stla鑤 kl醰esu j nieko祂o kr醫, aby sa kurzor posunul nato祂o, 緀 lekcia 1.1 celkom zapln obrazovku. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcia 1.1: POHYB KURZOROM ** Pre pohyb kurzorum stla kl醰esy h,j,k,l ako je zn醶ornen. ** - ^ - k Funkcia: Kl醰esa h je na礱vo a vykon pohyb do礱va. - < h l > Kl醰esa l je napravo a vykon pohyb doprava. - j Kl醰esa j vyzer ako 鬼pka dole - v + ^ + k Funkcia: Kl醰esa h je na礱vo a vykon pohyb do礱va. + < h l > Kl醰esa l je napravo a vykon pohyb doprava. + j Kl醰esa j vyzer ako 鬼pka dole + v 1. Pohybuj kurzorom po obrazovke, k齧 si na to nezvykne. 2. Dr stla鑕n kl醰esu pre pohyb dole (j), k齧 sa jej funkcia nezopakuje. @@ -38,34 +40,33 @@ 3. Pou緄t韒 kl醰esy pre pohyb dole prejdi na Lekciu 1.2. Pozn醡ka: Ak si niesi ist t齧 鑟 si nap韘al, stla <ESC> - na prechod do norm醠neho m骴u. + na prechod do norm醠neho m骴u. Pozn醡ka: Kurzorov kl醰esy s tie funk鑞. Ale pou卷van韒 hjkl sa bude - schopn pohybova r齝hlej筰e, ke si zvykne ich pou卷va. + schopn pohybova r齝hlej筰e, ke si zvykne ich pou卷va. Naozaj! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 1.2: SP讴獳NIE A ZATV罵ANIE VIMU + LEKCIA 1.2: ZATV罵ANIE VIMU + !! POZN罬KA: Pred vykonan韒 t齝hto krokov si pre桧taj cel t鷗o lekciu !! 1. Stla kl醰esu <ESC> (aby si sa u鑙te nach醖zal v norm醠nom m骴e) - 2. Nap砉: :q! <ENTER>. - ----> T齧 ukon桧 pr醕u s editorom BEZ ulo緀nia zmien, ktor si vykonal. - Ak chce ulo緄 vykonan zmeny a ukon鑙 pr醕u s editorom nap砉: - :wq <ENTER> + 2. Nap砉: :q! <ENTER>. + T齧 ukon桧 pr醕u s editorom BEZ ulo緀nia zmien, ktor si vykonal. 3. Ke sa dostane na pr韐azov riadok, nap砉 pr韐az, ktor齧 sa dostane spe do tejto v齯ky. To m艟e by: vimtutor <ENTER> - Zvy鑑jne sa pou卷va: vim tutor <ENTER> - ----> 'vim' znamen spustenie editora vim, 'tutor' je n醶ov s鷅oru, ktor - chce editova. 4. Ak si si tieto kroky spo礱hlivo zapam鋞al, vykonaj kroky 1 a 3, pre - ukon鑕nie a znovu spustenie editora. Potom presu kurzor dole na - lekciu 1.3. + ukon鑕nie a znovu spustenie editora. + +POZN罬KA: :q! <ENTER> neulo卷 zmeny, ktor si vykonal. O nieko祂o lekci + sa nau桧 ako ulo緄 zmeny do s鷅oru + + 5. presu kurzor dole na lekciu 1.3. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcia 1.3: EDIT罜IA TEXTU - MAZANIE @@ -85,7 +86,7 @@ Pozn醡ka: Kurzorov kl醰esy s tie funk鑞. Ale pou卷van韒 hjkl sa bude 5. Ak je veta spr醰na, prejdi na lekciu 1.4. -POZN罬KA: Neskaj si zapamet浠 obsah tejto v齯ky, ale sa u pou卷van韒. +POZN罬KA: Neskaj si zapam鋞a obsah tejto v齯ky, ale sa u pou卷van韒. @@ -93,7 +94,7 @@ POZN罬KA: Neskaj si zapamet浠 obsah tejto v齯ky, ale sa u pou卷van韒. Lekcia 1.4: EDIT罜IA TEXTU - VKLADANIE - ** Stla鑕nie kl醰esy i v norm醠nom m骴e umo掘uje vkladanie textu. ** + ** Stla鑕nie kl醰esy i umo掘uje vkladanie textu. ** 1. Presu kurzor ni竟ie na prv riadok za zna鑛u --->. @@ -111,26 +112,73 @@ POZN罬KA: Neskaj si zapamet浠 obsah tejto v齯ky, ale sa u pou卷van韒. 5. Ke sa dostato鑞e nau桧 vklada text, prejdi na nasleduj鷆e zhrnutie. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 1.5: EDIT罜IA TEXTU - PRID罺ANIE + + + ** Stla鑕nie kl醰esy A umo掘uje prid醰a text. ** + + 1. Presu kurozr ni竟ie na prv riadok za zna鑛ou --->. + Nez醠e卷 na tom, na ktorom znaku sa kurzor v tom riadku nach醖za. + + 2. Stla kl醰esu A a nap砉 potrebn text. + + 3. Po pridan textu stla kl醰esu <ESC> pre n醰rat do Norm醠neho m骴u. + + 4. Presu kurozr na druh riadok ozna鑕n ---> a zopakuj + kroky 2 a 3 k齧 nieje veta spr醰na. + +---> Tu je nejak text ch齜aj鷆i o + Tu je nejak text ch齜aj鷆i od tia祎o. +---> Tu tie ch齜a nej + Tu tie ch齜a nejak text. + + 5. Ke sa dostato鑞e nau桧 prid醰a text, prejdi na lekciu 1.6. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 1.6: EDIT罜IA S贐ORU + + + ** Nap韘an韒 :wq sa s鷅or ulo卷 a zavrie ** + +!! POZN罬KA: Pred vykonan韒 t齝hto krokov si pre桧taj cel lekciu!! + +1. Opusti t鷗o v齯ku, ako si to urobil v lekcii 1.2: :q! + +2. Do pr韐azov閔o riadku nap砉 pr韐az: vim tutor <ENTER> + 'vim' je pr韐az, ktor spust editor Vim, 'tutor' je meno s鷅oru, + ktor chce editova. Pou緄 tak s鷅or, ktor m艟e meni. + +3. Vlo a zma text tak, ako si sa nau鑙l v predo筶齝h lekciach. + +4. Ulo s鷅or so zmenami a opusti Vim pr韐azom: :wq <ENTER> + +5. Re箃artuj vimtutor a presu sa dole na nasleduj鷆e zhrnutie. + +6. Urob tak po pre桧tan predo筶齝h krokov a porozumeniu im. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ZHRNUTIE LEKCIE 1 1. Kurzor sa pohybuje pou緄t韒 kl醰es so 鬼pkami alebo kl醰esmi hjkl. - h (do lava) j (dole) k (hore) l (doprava) + h (do lava) j (dole) k (hore) l (doprava) 2. Pre spustenie Vimu (z pr韐azov閔o riadku) nap砉: vim FILENAME <ENTER> 3. Na ukon鑕nie Vimu nap砉: <ESC> :q! <ENTER> pre zru筫nie v筫tk齝h zmien alebo nap砉: <ESC> :wq <ENTER> pre ulo緀nie zmien. - 4. Na zmazanie znaku na mieste kurzora nap砉 v norm醠nom m骴e: x + 4. Na zmazanie znaku na mieste kurzora nap砉: x 5. Pre vlo緀nie textu na mieste kurzora v norm醠nom m骴e nap砉: - i vkladan text <ESC> + i nap砉 vkladan text <ESC> vkladanie pred kurzor + A nap砉 prid醰an text <EXC> vkladanie za riadok POZN罬KA: Stla鑕nie <ESC> 籥 premiestn do norm醠neho m骴u alebo zru鬼 - nejak nechcen a 鑙asto鑞e dokon鑕n pr韐az. + nejak nechcen a 鑙asto鑞e dokon鑕n pr韐az. Teraz pokra鑥j lekciou 2. @@ -149,8 +197,10 @@ Teraz pokra鑥j lekciou 2. 4. Nap砉 dw aby slovo zmizlo. -POZN罬KA: P韘men dw sa zobrazia na poslednom riadku obrazovky tak ako ich - p砉e. Ak p砉e nie鑟 zle, stla <ESC> a za鑞i znova. +POZN罬KA: P韘meno d sa zobraz na poslednom riadku obrazovky ke ho + nap砉e. Vim na teba po鑛, aby si mohol nap韘a + p韘meno w. Ak vid砉 nie鑟 in ako d , tak si nap韘al + nespr醰ny znak; stla <ESC> a za鑞i znova. ---> Tu je nieko祂o slov z醔ava, ktor nie patria list do tejto vety. @@ -178,34 +228,75 @@ POZN罬KA: P韘men dw sa zobrazia na poslednom riadku obrazovky tak ako ich 5. Prejdi na lekciu 2.3 pre pochopenie toho 鑟 sa stalo. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.3: OPER罷ORY A POHYBY + + Ve礱 pr韐azov, ktor menia text s odvoden od oper醫orov a pohybov. + Form醫 pre pr韐az mazania kl醰esou d je nasledovn: + + d pohyb + + kde: + d - je mazac oper醫or + pohyb - je to 鑟 oper醫or vykon醰a (vyp韘an ni竟ie) + + Kr醫ky list pohybov: + w - do za鑙atku 颽l筰eho slova, okrem jeho prv閔o p韘mena. + e - do konca teraj筰eho slova, vr醫ane posledn閔o znaku. + $ - do konca riadku, vr醫ane posledn閔o znaku + + Tak緀 nap韘an韒 de sa zma緀 v筫tko od kurzora do konca slova. + +POZN罬KA: Stla鑕n韒 iba pohybu v norm醠nom m骴e bez oper醫ora + sa presunie kurzor tak ako je to 筽ecivikovan. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.4: Pou緄tie viacn醩obn閔o pohybu + + + ** Nap韘an韒 桧sla pred pohyb ho zopakuje zadn po鑕t kr醫 ** + 1. Presu kurozr ni竟ie na za鑙atok riadku ozna鑕n閔o --->. + + 2. Nap砉 2w a kurozr sa presunie o dve slov vpred. + + 3. Nap砉 3e a kurozr sa presunie vpred na koniec tretieho slova. + + 4. Nap砉 0 (nula) a kurozr sa presunie na za鑙atok riadku. + + 5. Zopakuj kroky 2 a 3 s r魖nymi 桧slami. + +---> Toto je riadok so slovami po kotr齝h sa m艟ete pohybova. + + 6. Prejdi na lekciu 2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.3: ROZ㊣ROVACIE PR蚄AZY A OBJEKTY + Lekcia 2.5: POU甀TIE VIACN罶OBN蒆O MAZANIA PRE HROMADN MAZANIE + + ** Nap韘anie 桧sla spolu s oper醫orom ho zopakuje zadan po鑕t kr醫 ** - Form醫 mazacieho pr韐azu d je nasledovn: + V kombin醕ii oper醫orov mazania a pohybu spom韓an閔o vy构ie vlo po鑕t + pred pohyb pre docielenie hromadn閔o mazania: + d 桧slo pohyb - [桧slo] d objekt ALEBO d [桧slo] objekt - Kde: - 桧slo - ud醰a ko祂o kr醫 sa pr韐az vykon (volite祅, implicitne=1) - d - je pr韐az pre mazanie - objekt - ud醰a na 鑟m sa pr韐az vykon醰a (vyp韘an ni竟ie) + 1. Presu kurzor na prv slovo p韘an VE軲I P蚐MENAMI + v riadku ozna鑕nom --->. - Kr醫ky v齪is objektov: - w - od kurzora do konca slova, vr醫anie medzier - e - od kurzora do konca slova, BEZ medzier - $ - od kurzora do konca riadku. + 2. Nap砉 2dw a zma緀 dve slov p韘an VE軲I P蚐MENAMI -POZN罬KA: Ak stla桧 kl醰esu objektu v norm醠nom m骴e bez pr韐azu, kurzor - sa presunie na miesto 筽ecifikovan vo v齪ise objektov. + 3. Zopakuj kroky 1 a 2 s pou緄t韒 r魖neho 桧sla tak aby si zmazal slov + p韘an ve祂齧i p韘menami jedn齧 pr韐azom. +---> Tento ABC DE riadok FGHI JK LMN OP so slovamI je Q RS TUV vycisteny. +POZN罬KA: 软slo medzi oper醫orom d a pohybom funguje podobne ako pri + pou緄t s pohybom bez oper醫ora. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.4: V軳IMKA V 'PR蚄AZOVOM OBJEKTE' + Lekcia 2.6: OPER罜IE S RIADKAMI ** Nap韘anie pr韐azu dd zma緀 cel riadok. ** @@ -216,7 +307,7 @@ Vzh礱dom na frekvenciu mazania cel閔o riadku, sa autori Vimu rozhodli, 1. Presu kurzor na druh riadok v texte na spodu. 2. Nap砉 dd aby si zmazal riadok. 3. Prejdi na 箃vrt riadok. -4. Nap砉 2dd (pametaj si 桧slo-pr韐az-objekt) aby si zmazal dva riadky. +4. Nap砉 2dd aby si zmazal dva riadky. 1) Ru緀 s 鑕rven, 2) Blato je z醔avn, @@ -228,7 +319,7 @@ Vzh礱dom na frekvenciu mazania cel閔o riadku, sa autori Vimu rozhodli, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.5: PR蚄AZ UNDO + Lekcia 2.7: PR蚄AZ UNDO ** Stla u pre vr醫enie posledn閔o pr韐azu, U pre 鷓ravu cel閔o riadku. ** @@ -241,7 +332,7 @@ Vzh礱dom na frekvenciu mazania cel閔o riadku, sa autori Vimu rozhodli, 5. Teraz nap砉 ve祂 U 桧m vr醫砉 riadok do p魐odn閔o stavu. 6. Teraz nap砉 u nieko祂o kr醫, 桧m vr醫砉 sp浠 pr韐az U. 7. Teraz nap砉 CTRL-R (dr kl醰esu CTRL stla鑕n k齧 stl徼a R) nieko祂o - kr醫, 桧m vr醫砉 sp浠 predt齧 vr醫en pr韐azy (redo). + kr醫, 桧m vr醫砉 sp浠 predt齧 vr醫en pr韐azy (undo z undo). ---> Opprav chybby nna toomto riadku a zmee ich pommocou undo. @@ -260,18 +351,22 @@ Vzh礱dom na frekvenciu mazania cel閔o riadku, sa autori Vimu rozhodli, 3. Pre zmazanie cel閔o riadku nap砉: dd - 4. Form醫 pre p韐az v nor醠nom m骴e je: + 4. Pre zopakovanie pohybu, nap砉 pred neho 桧slo: 2w - [桧slo] pr韐az objekt ALEBO pr韐az [桧slo] objekt + 5. Form醫 pre p韐az: + + oper醫or [桧slo] pohyb kde: - 桧slo - ud醰a ko祂o kr醫 sa pr韐az zopakuje - pr韐az - ud醰a vykon醰an pr韐az, ako napr韐lad d pre mazanie - objekt - ud醰a rozsah pr韐azu, ako napr韐lad w(slovo), + oper醫or - 鑟 treba robi, napr韐lad d pre zmazanie + [桧slo] - je volite祅 po鑕t pre opakovanie pohybu + pohyb - pohyb po texte vzh礱dom na oper醫or, napr韐lad w (slovo), $ (do konca riadku), at. - 5. Pre vr醫enie sp浠 predo筶ej oper醕ie nap砉: u (mal u) - Pre vr醫enie v筫tk齝h 鷓rav na riadku nap砉: U (ve祂 U) - Pre vr醫enie vr醫en齝h 鷓rav nap砉: CTRL-R + 6. Pre pohyb na za鑙atok riadku pou緄 nulu: 0 + + 7. Pre vr醫enie sp浠 predo筶ej oper醕ie nap砉: u (mal u) + Pre vr醫enie v筫tk齝h 鷓rav na riadku nap砉: U (ve祂 U) + Pre vr醫enie vr醫en齝h 鷓rav nap砉: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcia 3.1: PR蚄AZ VLO甀 @@ -289,10 +384,10 @@ Vzh礱dom na frekvenciu mazania cel閔o riadku, sa autori Vimu rozhodli, 5. Zopakuj kroky 2 a 4, k齧 riadky nies v spr醰nom porad. - d) Tie sa dok峋e vzdel醰a? - b) Fialky s modr, - c) Inteligencia sa vzdel醰a, - a) Ru緀 s 鑕rven, +---> d) Tie sa dok峋e vzdel醰a? +---> b) Fialky s modr, +---> c) Inteligencia sa vzdel醰a, +---> a) Ru緀 s 鑕rven, @@ -300,15 +395,15 @@ Vzh礱dom na frekvenciu mazania cel閔o riadku, sa autori Vimu rozhodli, Lekcia 3.2: PR蚄AZ NAHRADENIA - ** Nap韘an韒 r a znaku sa nahrad znak na mieste kurzora. ** + ** Nap韘an韒 rx sa nahrad znak na mieste kurzora znakom x . ** 1. Presu kurzor ni竟ie na prv riadok textu ozna鑕n閔o zna鑛ou --->. 2. Presu kurzor na za鑙atok prvej chyby. - 3. nap砉 r a potom znak, ktor nahrad chybu. + 3. nap砉 r a potom znak, ktor tam m by. - 4. Zopakuj kroky 2 a 3, k齧 prv riadok nieje spr醰ny. + 4. Zopakuj kroky 2 a 3, k齧 prv riadok nieje zhodn s druh齧. ---> Ka bol tento riasok p韆an, niekro stla筰l nespr醔ne kl醰esy! ---> Ke bol tento riadok p韘an, niekto stla鑙l nespr醰ne kl醰esy! @@ -323,22 +418,22 @@ POZN罬KA: Pam鋞aj si, 緀 nau鑙 sa m艟e len pou卷vanim, nie pam鋞an韒. Lekcia 3.3. PR蚄AZ 赑RAVY - ** Ak chce zmeni 鑑s slova alebo cel slovo, nap砉 cw . ** + ** Ak chce zmeni 鑑s slova do konca slova, nap砉 ce . ** 1. Presu kurzor ni竟ie na prv riadok ozna鑕n zna鑛ou --->. 2. Umiestni kurzor na p韘meno o v slove rosfpl. - 3. Nap砉 cw a oprav slovo (v tomto pr韕ade nap砉 'iadok'.) + 3. Nap砉 ce a oprav slovo (v tomto pr韕ade nap砉 'iadok'.) - 4. Stla <ESC> a prejdi na 颽l筰u chybu (prv znak, ktor treba zmeni.) + 4. Stla <ESC> a prejdi na 颽l鬼 znak, ktor treba zmeni. 5. Zopakuj kroky 3 a 4, k齧 prv veta nieje rovnak ako druh. ---> Tento rosfpl m nieko祂o skic, ktor je pirewvb zmeni piy籾栳n pr韐azu. ---> Tento riadok m nieko祂o slov, ktor je potrebn zmeni pou緄t韒 pr韐azu. -Pozn醡ka, 緀 cw nielen nahr醖za slovo, ale 籥 aj premiestn do vkladania. +Pozn醡ka, 緀 ce zma緀 slovo a nastav vkladac m骴. @@ -346,13 +441,13 @@ Pozn醡ka, 緀 cw nielen nahr醖za slovo, ale 籥 aj premiestn do vkladania. Lekcia 3.4: VIAC ZMIEN POU甀T蚆 c - ** Pr韐az pre 鷓ravy sa pou卷va s rovnak齧i objektami ako pre mazanie ** + ** Pr韐az pre 鷓ravy sa pou卷va s rovnak齧i pohybmi ako pre mazanie ** 1. Pr韐az pre 鷓ravy pracuje rovnako ako pre mazanie. Form醫 je: - [桧slo] c objekt ALEBO c [桧slo] objekt + c [桧slo] pohyb - 2. Objekty s rovnak, ako napr韐lad w (slovo), $ (koniec riadku), at. + 2. Pohyby s rovnak, ako napr韐lad w (slovo) a $ (koniec riadku). 3. Presu kurzor ni竟ie na prv riadok ozna鑕n zna鑛ou --->. @@ -364,6 +459,7 @@ Pozn醡ka, 緀 cw nielen nahr醖za slovo, ale 籥 aj premiestn do vkladania. ---> Koniec tohto riadku potrebuje pomoc, aby bol ako druhy. ---> Koniec tohto riadku potrebuje opravi pou緄t韒 pr韐azu c$ . +POZN罬KA: M艟e pou緄 kl醰esu backspace na 鷓ravu zmien po鑑s p韘ania. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -376,13 +472,13 @@ Pozn醡ka, 緀 cw nielen nahr醖za slovo, ale 籥 aj premiestn do vkladania. 2. Pre naradenie znaku na mieste kurzora, nap砉 r a potom znak, ktor nahrad p魐odn znak. - 3. Pr韐az na upravenie umo掘uje zmeni 筽ecifikovan objekt od kurzora - a po koniec objektu. napr. Nap砉 cw 桧m zmn砉 text od poz韈ie + 3. Pr韐az na upravenie umo掘uje zmeni od kurzora a po miesto, ktor + ur鑥je pohyb. napr. Nap砉 ce 桧m zmn砉 text od poz韈ie kurzora do konca slova, c$ zmen text do konca riadku. - 4. Format pre nahradenie je: + 4. Form醫 pre nahradenie je: - [桧slo] c objekt ALEBO c [桧slo] objekt + c [桧slo] pohyb Teraz prejdi na nalseduj鷆u lekciu. @@ -394,19 +490,19 @@ Teraz prejdi na nalseduj鷆u lekciu. ** Stla CTRL-g pre zobrazenie svojej poz韈ie v s鷅ore a statusu s鷅oru. - Stla SHIFT-G pre prechod na riadok v s鷅ore. ** + Nap砉 G pre presun na riadok v s鷅ore. ** Pozn醡ka: Pre桧taj si cel t鷗o lekciu sk魊 ako za鑞e vykon醰a kroky!! - 1. Dr stla鑕n kl醰esu Ctrl a stla g . Na spodu obrazovky sa zobraz - stavov riadok s n醶vom s鷅oru a riadkom na ktorom pr醰e si. Zapam鋞aj - si si 桧slo riadku pre krok 3. + 1. Dr stla鑕n kl醰esu Ctrl a stla g . Toto naz齰ame CTRL-G. + Na spodu obrazovky sa zobraz spr醰a s n醶vom s鷅oru a poz韈iou + v s鷅ore. Zapam鋞ajsi si 桧slo riadku pre pou緄tie v kroku 3. - 2. Stla Shift-G 桧m sa dostane na spodok s鷅oru. + 2. Stla G 桧m sa dostane na spodok s鷅oru. + Nap砉 gg 桧m sa dostane na za鑙atok s鷅oru. - 3. Nap砉 桧slo riadku na ktorom si sa nach醖zal a stla Shift-G. To 籥 - vr醫i na riadok, na ktorom si prv kr醫 stla鑙l Ctrl-g. - (Ke p砉e 桧sla, tieto sa nezobrazuj na obrazovke.) + 3. Nap砉 桧slo riadku na ktorom si sa nach醖zal a stla G. To 籥 + vr醫i na riadok, na ktorom si prv kr醫 stla鑙l CTRL-G. 4. Ak sa c韙砉 schopn vykona teto kroky, vykonaj kroky 1 a 3. @@ -419,24 +515,24 @@ Teraz prejdi na nalseduj鷆u lekciu. ** Nap砉 / nasledovan re籥zcom pre vyh礱danie pr韘lu筺閔o re籥zca. ** 1. Nap砉 znak / v norm醠nom m骴e. Pozn醡ka, 緀 tento znak sa spolu - s kurzorom zobraz v dolnej 鑑sti obrazovky ako s : pr韐azom. + s kurzorom zobraz v dolnej 鑑sti obrazovky s : pr韐azom. 2. Teraz nap砉 'errroor' <ENTER>. To je slovo, ktor chce vyh礱da. 3. Pre vyh礱danie 颽l筰eho v齭kytu rovnak閔o re籥zca, stla jednoducho n. Pre vyh礱danie 颽l筰eho v齭kytu rovnak閔o re籥zca opa鑞齧 smerom, - nap砉 Shift-N. + N. 4. Ak chce vyh礱da re籥zec v sp鋞nom smere, pou卷 pr韐az ? miesto pr韐azu /. - ---> Ke vyh礱d醰anie dosiahne koniec tohto s鷅oru, bude pokra鑟va na - za鑙atku. - - "errroor" nie je sp魋ob ako nahradi error; errroor je error. + 5. Pre n醰rat na miesto z ktor閔o si pri筰el stla CTRL-O (dr stla鑕n + kl醰esu Ctrl po鑑s stla鑕nia kl醰esy o). Zopakuj pre 颽l鬼 n醰rat + sp浠. CTRL-I ide vpred. -POZN罬KA: Ke vyh礱d醰anie dosiahne koniec s鷅oru, bude pokra鑟va na jeho - za鑙atku. +POZN罬KA: "errroor" nieje sp魋ob hl醩kovania error; errroor je error. +POZN罬KA: Ke vyh礱d醰anie dosiahne koniec tohto s鷅oru, bude pokra鑟va na + za鑙atku, dokia nieje resetovan nastavenie 'wrapscan' . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -454,16 +550,18 @@ POZN罬KA: Ke vyh礱d醰anie dosiahne koniec s鷅oru, bude pokra鑟va na jeho 4. Nap砉 % pre presun kurzoru sp浠 na otv醨aj鷆u z醫vorku. + 5. Presu kurzor na in zo znakov (,),[,],{ alebo } a v筰mni si + 鑟 % vykon醰a. + ---> Toto ( je testovac riadok s ('s, ['s ] a {'s } v riadku. )) Pozn醡ka: Toto je ve祄i v齢odn pou卷 pri laden programu s ch齜aj鷆imi - uzatv醨aj鷆imi z醫vorkami. - + uzatv醨aj鷆imi z醫vorkami! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 4.4: SPOSOB AKO ZMENI CHYBY + Lekcia 4.4: PR蚄AZ NAHRADENIA ** Nap砉 :s/star/nov/g pre nahradenie slova 'star' za slovo 'nov'. ** @@ -471,7 +569,7 @@ Pozn醡ka: Toto je ve祄i v齢odn pou卷 pri laden programu s ch齜aj鷆imi 1. Presu kurzor ni竟ie na riadok ozna鑕n zna鑛ou --->. 2. Nap砉 :s/thee/the <ENTER> . Poznamka, 緀 tento pr韐az zmen len prv - v齭kyt v riadku. + v齭kyt "thee" v riadku. 3. Teraz nap砉 :s/thee/the/g 鑟 znamen celkov nahradenie v riadku. Toto nahrad v筫tky v齭kyty v riadku. @@ -479,9 +577,11 @@ Pozn醡ka: Toto je ve祄i v齢odn pou卷 pri laden programu s ch齜aj鷆imi ---> Thee best time to see thee flowers in thee spring. 4. Pre zmenu v筫tk齝h v齭kytov dan閔o re籥zca medzi dvomi ridakami, - nap砉 :#,#s/star/nov/g kde #,# s 桧sla dvoch riadkov. + nap砉 :#,#s/star/nov/g kde #,# s 桧sla dvoch riadkov, v rozsahu + ktor齝h sa nahradenie vykon. nap砉 :%s/star/nov/g pre zmenu v筫tk齝h v齭kytov v celom riadku - + nap砉 :%s/star/nov/gc n醞de v筫tky v齭kyty v celom s鷅ore, + s ot醶kou 鑙 nahradi alebo nie @@ -489,23 +589,25 @@ Pozn醡ka: Toto je ve祄i v齢odn pou卷 pri laden programu s ch齜aj鷆imi LEKCIA 4 ZHRNUTIE - 1. Ctrl-g vyp砉e tvoju poz韈iu v s鷅ore a status s鷅oru. - Shift-g 籥 premiestni na koniec riadku. 软slo riadku nasledovan - Shift-g 籥 presunie na dan 桧slo riadku. + 1. CTRL-g vyp砉e tvoju poz韈iu v s鷅ore a status s鷅oru. + G 籥 premiestni na koniec riadku. + 桧slo G 籥 premiestni na riadok s 桧slom. + gg 籥 presunie na prv riadok 2. Nap韘anie / nasledovan re籥zcom vyh礱d re籥zec smerom DOPREDU. Nap韘anie ? nasledovan re籥zcom vyh礱da re籥zec smerom DOZADU. Nap韘anie n po vyh礱d醰an, vyh礱d nasleduj鷆i v齭kyt re籥zca - v rovnakom smere, pri鑟m Shift-N vyh礱d v opa鑞om smere. + v rovnakom smere, pri鑟m N vyh礱d v opa鑞om smere. + CTRL-O 籥 vr醫i sp浠 na star筰u poz韈iu, CTRL-I na nov筰u poz韈iu. 3. Nap韘anie % ke kurzor je na (,),[,],{, alebo } n醞de zodpovdaj鷆u - p醨 z醫vorku. + p醨nu z醫vorku. - 4. Pre nahradenie nov閔o za prv star v riadku nap砉 :s/nov/star - Pre nahradenie nov閔o za v筫tky star v riadku nap砉 :s/nov/star/g - Pre nahradenie re籥zcov medzi dvoma riadkami 3 nap砉 :#,#/nov/star/g + 4. Pre nahradenie nov閔o za prv star v riadku nap砉 :s/star/nov + Pre nahradenie nov閔o za v筫tky star v riadku nap砉 :s/star/nov/g + Pre nahradenie re籥zcov medzi dvoma riadkami 3 nap砉 :#,#/star/nov/g Pre nahradenie v筫tk齝h v齭kytov v s鷅ore nap砉 :%s/star/nov/g - Pre potvrdenie ka綿閔o nahradenia pridaj 'c' :%s/nov/star/gc + Pre potvrdenie ka綿閔o nahradenia pridaj 'c' :%s/star/nov/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -524,7 +626,7 @@ Pozn醡ka: Toto je ve祄i v齢odn pou卷 pri laden programu s ch齜aj鷆imi zobraz obsah tvojho adres醨a rovnako ako na pr韐azovom riadku. Alebo pou緄 :!dir ak ls nefunguje. -Pozn醡ka: Takto je mo緉 spusti hociak vonkaj鬼 pr韐az. +Pozn醡ka: Takto je mo緉 spusti hociak vonkaj鬼 pr韐az s argumentami. Pozn醡ka: V筫tky pr韐azy : musia by dokon鑕n stla鑕n韒 <ENTER> @@ -539,41 +641,43 @@ Pozn醡ka: V筫tky pr韐azy : musia by dokon鑕n stla鑕n韒 <ENTER> 1. Nap砉 :!dir alebo :!ls pre v齪is aktu醠neho adres醨a. U vie, 緀 mus砉 za t齧to stla鑙 <ENTER> . - 2. Vyber n醶ov s鷅oru, ktor E㏕E neexistuje. + 2. Vyber n醶ov s鷅oru, ktor e箃e neexistuje, ako napr. TEST. 3. Teraz nap砉: :w TEST (kde TEST je n醶ov vybrat閔o s鷅oru.) 4. To ulo卷 cel s鷅or (Vim Tutor) pod n醶ovm TEST. Pre overenie nap砉 :!dir , 桧m zobraz砉 obsah adres醨a. -Pozn醡ka: 緀 ak ukon桧 pr醕u s editorom Vim a znovu ho spust砉 s n醶vom - s鷅oru TEST, s鷅or bude k髉ia v齯ky, ke si ho ulo緄l. +Pozn醡ka: 緀 ak ukon桧 pr醕u s editorom Vim a znovu ho spust砉 pr韐azom + vim TEST, s鷅or bude k髉ia v齯ky, ke si ho ulo緄l. 5. Teraz odstr狎 s鷅or nap韘an韒 (MS-DOS): :!del TEST alebo (Unix): :!rm TEST ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 5.3 V軧EROV PR蚄AZ PRE ULO瓻NIE + Lekcia 5.3 V軧ER TEXTU PRE ULO瓻NIE - ** Pre ulo緀nie 鑑sti s鷅oru, nap砉 :#,# w FILENAME ** + ** Pre ulo緀nie 鑑sti s鷅oru, nap砉 v pohyb :w FILENAME ** - 1. Znovu nap砉 :!dir alebo :!ls pre zobrazenie obsahu aktu醠neho - adres醨a a vyber vhodn s鷅or ako TEST. + 1. Presu kurozr na tento riadok. - 2. Presu kurzor na vrch tejto strany a nap砉 Ctrl-g pre vyh礱danie 桧sla - tohto riadku. PAMETAJ SI TOTO 韧SLO! + 2. Stla v a presu kurozr na piatu polo緆u dole. Pozn醡ka, 緀 + tento text je vyzna鑕n (highlighted). - 3. Teraz prejdi na spodok strany a nap砉 Ctrl-g znovu. ZAPAMETAJ SI 韧SLO - AJ TOHTO RIADKU! + 3. Stla kl醰esu : . V spodnej 鑑sti okna sa objav :'<,'>. - 4. Pre ulo緀nie LEN 鑑sti s鷅oru, nap砉 :#,# w TEST kde #,# s dve 桧sla - zapam鋞an齝h riadkov (vrch, spodok) a TEST je n醶ov s鷅oru. + 4. Nap砉 w TEST , kde TEST je meno s鷅oru, ktor zatial neexistuje. + Skontroluj, e vid砉 :'<,'>w TEST predt齧 ne stla桧 Enter. - 5. Znova sa pozri, 鑙 tam ten s鷅or je pomocou pr韐azu :!dir ale - NEODSTRA襏J ho. + 5. Vim zap砉e ozna鑕n riadky do s鷅oru TEST. Pou緄 :!dir alebo !ls + pre overenie. Zatial ho e箃e nema! Pou緄jeme ho v 颽l筫j lekcii. +POZN罬KA: Stla鑕n韒 kl醰esy v sa spust vizu醠ne ozna鑟vanie. + M艟e pohybova kurzorom pre upresnenie vyzna鑕n閔o textu. + Potom m艟e pou緄 oper醫or pre vykonanie nejakej akcie + s textom. Napr韐lad d zma緀 vyzna鑕n text. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -582,21 +686,16 @@ Pozn醡ka: 緀 ak ukon桧 pr醕u s editorom Vim a znovu ho spust砉 s n醶vom ** Pre vlo緀nie obsahu s鷅oru, nap砉 :r FILENAME ** - 1. Nap砉 :!dir aby si sa presved鑙l, 緀 s鷅or TEST st醠e existuje. + 1. Premiestni kurzor nad tento riadok. - 2. Presu kurzor na vrch tejto strany. - -POZN罬KA: Po vykonan kroku 3 uvid砉 Lekciu 5.3. Potom sa presu dole - na t鷗o lekciu. +POZN罬KA: Po vykonan kroku 2 uvid砉 text z lekcie 5.3. Potom sa presu + dole, aby si videl t鷗o lekciu. 3. Teraz vlo s鷅or TEST pou緄t韒 pr韐azu :r TEST kde TEST je n醶ov - s鷅oru. - -POZN罬KA: S鷅or, ktor si vlo緄l sa vlo卷 od miesta, kde sa nach醖za kurzor. - - 4. Pre kontrolu vlo緀nia s鷅oru, presu kurzor sp浠 a v筰mni si, 緀 teraz - m峁 dve k髉ie lekcie 5.3, origin醠 a s鷅orov verziu. + s鷅oru. S鷅or, ktor si pou緄l je umiestnen pod riadkom s kurzorom. +POZN罬KA: M艟e tie na桧ta v齭tup vonkaj筰eho pr韐azu. Napr韐lad :r !ls + na桧ta v齭tup pr韐azu ls a umiestni ho za poz韈iu kurzora. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -606,20 +705,19 @@ POZN罬KA: S鷅or, ktor si vlo緄l sa vlo卷 od miesta, kde sa nach醖za kurzor. 1. :!pr韐az spust vonkaj鬼 pr韐az. Niektor vyu緄te祅 pr韐lady s: - (MS_DOS) (UNIX) - :!dir :!ls - zobraz obsah adres醨a + (MS_DOS) (UNIX) + :!dir :!ls - zobraz obsah adres醨a :!del FILENAME :!rm FILENAME - odstr醤i s鷅or FILENAME 2. :w FILENAME ulo卷 aktu醠ny s鷅or na disk pod menom FILENAME. - - 3. :#,#w FILENAME ulo卷 riadky od # do # do s鷅oru FILENAME. + + 3. v pohyb :w FILENAME ulo卷 vizu醠ne ozna鑕n riadky do + s鷅oru FILENAME. 4. :r FILENAME vyberie z disku s鷅or FILENAME a vlo卷 ho do aktu醠neho s鷅oru za poz韈iou kurzora. - - - + 5. :r !dir na桧ta v齭tup z pr韐azu dir a vlo卷 ho za poz韈iu kurzora. @@ -640,9 +738,10 @@ POZN罬KA: S鷅or, ktor si vlo緄l sa vlo卷 od miesta, kde sa nach醖za kurzor. ---> Po nap韘an o sa kurzor premiestn na vlo緀n riadok do vkladacieho m骴u. - 4. Pre otvorenie riadku nad kurzorom, jednotucho nap砉 ve祂 O , namiesto - mal閔o o. Vyskaj si to na nasleduj鷆om riadku. -Vlo riadok nad t齧to nap韘an韒 Shift-O, ke kurzor je na tomto riadku. + 4. Pre otvorenie riadku nad kurzorom, jednotucho nap砉 ve祂 O , + namiesto mal閔o o. Vyskaj si to na riadku dole. + +---> Vlo riadok nad t齧to nap韘an韒 O, ke kurzor je na tomto riadku. @@ -653,20 +752,21 @@ Vlo riadok nad t齧to nap韘an韒 Shift-O, ke kurzor je na tomto riadku. ** Nap砉 a pre vlo緀nie textu ZA kurzor. ** 1. Presu kurzor ni竟ie na koniec prv閔o riadku ozna鑕n閔o zna鑛ou ---> - nap韘an韒 $ v norm醠nom m骴e. - 2. Nap砉 a (mal p韘meno) pre pridanie textu ZA znakom na mieste - kurzora. (Ve祂 A prid na koniec riadku.) + 2. Stla kl醰esu e dokia kurozr nieje na konci riadku. + + 3. Nap砉 a (mal p韘meno) pre pridanie textu ZA kurzorom. -Pozn醡ka: Toto obch醖za p韘anie i , posledn znak, text na vlo緀nie, <ESC>, - kurzor doprava, a nakoniec, x , na prid醰anie na koniec riadku! + 4. Dokon桧 slovo tak ako je to v druhom riadku. Stla <ESC> pre + opustenie vkladacieho m骴u. - 3. Teraz dokon鑙 prv riadok. Pozn醡ka, 緀 prid醰anie je vlastne rovnak - ako vkladac m骴, okrem miesta, kde sa text vklad. + 5. Pou緄 e na presun na 颽l筰e nedokon鑕n slovo a zopakuj kroky 3 a 4. ----> Tento riadok ti dovo祏je n醕vik +---> Tento ri ti dovo祏je n醕v pri醰an testu na koniec riadku. ---> Tento riadok ti dovo祏je n醕vik prid醰ania textu na koniec riadku. +POZN罬KA: a, i, A 箃artuj rovnak vkladac m骴, jedin rozidel je, kde + sa znaky vkladaj. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -675,24 +775,52 @@ Pozn醡ka: Toto obch醖za p韘anie i , posledn znak, text na vlo緀nie, <ESC>, ** Nap砉 ve祂 R pre nahradenie viac ako jedn閔o znaku. ** - 1. Presu kurzor ni竟ie na prv riadok ozna鑕n zna鑛ou --->. + 1. Presu kurzor ni竟ie na prv riadok ozna鑕n zna鑛ou --->. Premiestni + kurzor na za鑙atok prv閔o v齭kytu xxx. + + 2. Teraz nap砉 R a nap砉 桧slo uveden v druhom riadku, tak緀 + sa n韒 nahrad p魐odn xxx. + + 3. Stla <ESC> pre opustenie nahradzovacieho m骴u. Pozn醡ka, 緀 zvy筼k + riadku zostane nezmenen. + + 4. Zopakuj tieto kroky pre nahradenie zvy筺齝h xxx. - 2. Premiestni kurzor na za鑙atok prv閔o slova, ktor je odli筺 od druh閔o - riadku ozna鑕n閔o ---> (slovo 'posledn'). +---> Pridan韒 123 ku xxx dostane xxx. +---> Pridan韒 123 ku 456 dostane 579. - 3. Teraz nap砉 R a nahra zvy筼k textu na prvom riadku p韘an韒 cez star - text tak, aby prv riadok bol rovnak ako druh. +POZN罬KA: Nahradzovac m骴 je ako vkladac m骴, ale ka綿 nap韘an znak + zma緀 existuj鷆i znak. ----> Na 鷓ravu prv閔o riadku do tvaru ako je posledn na strane pou緄 kl醰esy. ----> Na 鷓ravu prv閔o riadku do tavru ako je druh, nap砉 R a nov text. - 4. Pozn醡ka, 緀 ak stla桧 <ESC> pre ukon鑕nie, v筫tok nezmenen text - zostane. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lekcia 6.4: Copy Paste textu + + ** pou卷 oper醫or y pre copy textku a p pre jeho paste ** + + 1. Cho ni竟ie na riadok ozna鑕n ---> a umiestni kurozr za "a)". + + 2. Na箃artuj vizu醠ny m骴 pou緄t韒 v a presu kurozr pred "first". + + 3. Nap砉 y pre vystrihnutie (copy) ozna鑕n閔o textu. + + 4. Presu kurozr na koniec 颽l筰eho riadku: j$ + 5. Nap砉 p pre vlo緉ie (paste) textu. Potom nap砉: a druha <ESC>. + + 6. Pou緄 vizu醠ny m骴 pre ozna鑕nie "polo緆a.", vystrihni to + pou緄t韒 y, presu sa na koniec nasleduj鷆eho riadku pou緄t韒 j$ + a vlo sem text pou緄t韒 p. + +---> a) toto je prv polo緆a +---> b) + +POZN罬KA: M艟e pou緄 tie y ako oper醫or; yw vystrihne jedno slovo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 6.4: NASTAVENIE MO甆OST + Lekcia 6.5: NASTAVENIE MO甆OST ** Nastav mo緉osti, tak緀 vyh礱d醰anie alebo nahradzovanie ignoruje @@ -700,40 +828,52 @@ Pozn醡ka: Toto obch醖za p韘anie i , posledn znak, text na vlo緀nie, <ESC>, 1. Vyh礱daj re籥zec 'ignore' nap韘an韒: - /ignore - Zopakuj vyh礱d醰anie nieko祂o kr醫 stla鑕n韒 kl醰esy n + /ignore <ENTER> + Zopakuj vyh礱d醰anie nieko祂o kr醫 stla鑕n韒 kl醰esy n . 2. Nastav mo緉os 'ic' (Ignore case) nap韘an韒 pr韐azu: :set ic - 3. Teraz vyh礱daj re籥zec 'ingore' znova stla鑕n韒 kl醰esy: n - Zopakuj vyh礱d醰anie nieko祂o kr醫 stla鑕n韒 kl醰esy n + 3. Teraz vyh礱daj re籥zec 'ingore' znova stla鑕n韒 kl醰esy n + Pozn醡ka, 緀 teraz s vyh礱dan aj Ignore a IGNORE. 4. Nastav mo緉os籭 'hlsearch' a 'incsearch': :set hls is 5. Teraz spusti vyh礱d醰ac pr韐az znovu, a pozri 鑟 sa stalo: - /ignore + /ignore <ENTER> - 6. Na odstr醤enie zv齬aznenia v齬azov nap砉: - :nohlsearch + 6. Pre opetovn zapnutie rozly筼vania ve祂齝h a mal齝h p韘men + nap砉: :set noic + +POZN罬KA: Na odstr醤enie zv齬aznenia v齬azov nap砉: :nohlsearch +POZN罬KA: Ak chce nerozly筼va ve祂os p韘men len pre jedno + pou緄tie vyh礱d醰acieho pr韐azu, pou緄 \c: /ignore\c <ENTER> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LEKCIA 6 ZHRNUTIE - 1. Nap韘an韒 o sa otvor nov riadok pod kurzorom a premiestni sa kurzor - na vlo緀n riadok do vkladacieho m骴u. - nap韘an韒 ve祂閔o O sa otvor riadok nad aktu醠nym riadkom s kurzorom. + 1. Nap砉 o pre otvorenie riadku pod kurzorom a 箃art vkladacieho m骴u. + Nap砉 O pre otvorenie riadku nad kurzorom. + + 2. Nap砉 a pre vkladanie textu ZA kurzor. + Nap砉 A pre vkladanie textu za koncom riadku. + + 3. Pr韐az e presunie kurozr na koniec slova - 2. Nap砉 a pre vkladanie textu ZA znak na poz韈ii kurzoru. - Nap韘an韒 ve祂閔o A sa text automatick prid醰a na koniec riadku. + 4. Oper醫or y vystrihne (skop韗uje) text, p ho vlo卷. - 3. Nap韘anie ve祂閔o R prepne do nahradzovacieho m骴u, k齧 nieje - stla鑕n <ESC> pre ukon鑕nie nahradzovacieho m骴u. + 5. Nap韘anie ve祂閔o R prepne do nahradzovacieho m骴u, k齧 nieje + stla鑕n <ESC>. - 4. Nap韘anie ":set xxx" nastav mo緉os "xxx". + 6. Nap韘anie ":set xxx" nastav mo緉os "xxx". Niektor nastavenia s: + 'ic' 'ignorecase' ignoruje ve祂 a mal p韘men po鑑s vyh礱d醰ania. + 'is' 'incsearch' zobrazuje 鑙asto鑞 re籥zce vyh礱d醰an閔o re籥zca. + 'hls' 'hlsearch' vyzna桧 v筫tky vyh礱d醰an re籥zce. + M艟e pou緄 hociktor z dlh齝h a kr醫kych n醶vov mo緉ost. + 7. Vlo "no" pred nastavenie pre jeho vypnutie: :set noic @@ -742,7 +882,7 @@ Pozn醡ka: Toto obch醖za p韘anie i , posledn znak, text na vlo緀nie, <ESC>, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 7: PR蚄AZY ON-LINE N罰OVEDY + LEKCIA 7.1: Z蚐KANIE N罰OVEDY ** Pou卷vaj on-line syst閙 n醦ovedy ** @@ -753,19 +893,21 @@ Pozn醡ka: Toto obch醖za p韘anie i , posledn znak, text na vlo緀nie, <ESC>, - stla kl醰esu <F1> (ak nejak m峁) - nap砉 :help <ENTER> - Nap砉 :q <ENTER> 桧m zatvor砉 okno n醦ovedy. + 软taj text v okne n醦ovedy pre z韘kanie predstavy ako n醦oveda funguje. + Nap砉 CTRL-W CTRL-W pre skok z jedn閔o okna do druh閔o. + Nap砉 :q <ENTER> 桧m zatvor砉 okno n醦ovedy. M艟e n醞s help ku hociakej t閙e pridan韒 argumentu ku pr韐azu ":help". Vyskaj tieto (nezabudni stla鑙 <ENTER>): :help w - :help c_<T + :help c_CTRL-D :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 8: VYTVORENIE ㏕ARTOVACIEHO SKRIPTU + LEKCIA 7.2: VYTVORENIE ㏕ARTOVACIEHO SKRIPTU ** Zapni funkcie editora Vim ** @@ -773,22 +915,67 @@ Pozn醡ka: Toto obch醖za p韘anie i , posledn znak, text na vlo緀nie, <ESC>, vypnut. Pre pou卷vanie viac Vim funkcii vytvor "vimrc" s鷅or. 1. Za鑞i editova "vimrc" s鷅or, to z醰is na pou緄tom syst閙e: - :edit ~/.vimrc pre Unix - :edit $VIM/_vimrc pre MS-Windows + :e ~/.vimrc pre Unix + :e $VIM/_vimrc pre MS-Windows 2. Teraz si pre桧taj text pr韐ladu "vimrc" s鷅oru: - :read $VIMRUNTIME/vimrc_example.vim + :r $VIMRUNTIME/vimrc_example.vim 3. Ulo s鷅or: - - :write + :w Pri nasleduj鷆om 箃arte editora Vim sa pou緄je zv齬az騩vanie syntaxe. Do "vimrc" s鷅oru m艟e prida v筫tky svoje uprednost騩van nastavenia. + Pre viac inform醕ii nap砉 :help vimrc-intro + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + LEKCIA 7.3 DOKON菶NIE + + ** Dokon鑙 pr韐az na pr韐azovom riadku pou緄t韒 CTRL-D a <TAB> ** + + 1. Uisti sa, 緀 Vim nieje v kompatibilnom m骴e: :set nocp + + 2. Pozri sa ak s鷅ory sa nach醖zaj v adres醨i: :!ls alebo :!dir + + 3. Nap砉 za鑙atok pr韐azu: :e + + 4. Stla CTRL-D a Vim zobraz zoznam pr韐azov za桧naj鷆ich "e". + + 5. Stla <TAB> a Vim dokon桧 meno pr韐azu na ":edit". + + 6. Teraz pridaj medzern韐 a za鑙atok mena existuj鷆eho s鷅oru: + :edit FIL + + 7. Stla <TAB>. Vim dokon桧 meno (ak je jedine鑞). + +POZN罬KA: Dokon鑟vanie funguje pre ve礱 pr韐azov. Vyskaj stla鑕nie + CTRL-D a <TAB>. ﹑eci醠ne je to u緄to鑞 pre pr韐az :help. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 7 ZHRNUTIE + + 1. Nap砉 :help alebo stla <F1> alebo <Help> pre otvorenie okna n醦ovedy. + + 2. Nap砉 :help pr韐az pre vyh礱danie n醦ovedy ku pr韐azu pr韐az. + + 3. Nap砉 CTRL-W CTRL-W na presko鑕nie do in閔o okna. + + 4. Nap砉 :q pre zatvorenie okna n醦ovedy + + 5. Vytvor 箃artovac skript vimrc pre udr綼nie uprednost騩van齝h nastaven. + + 6. Po鑑s p韘ania pr韐azu : stla CTRL-D pre zobrazenie dokon鑕n. + Stla <TAB> pre pou緄tie jedn閔o z dokon鑕n. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + Toto vymedzuje v齯ku Vimu. Toto je ur鑕n pre strucn preh礱d o editore Vim, 鷓lne posta鑥j鷆e pre 礱hk a obstojn pou卷vanie tohto editora. T醫o v齯ka je 颽leko od kompletnosti, preto緀 Vim m omnoho viacej pr韐azov. @@ -817,5 +1004,5 @@ Pozn醡ka: Toto obch醖za p韘anie i , posledn znak, text na vlo緀nie, <ESC>, Preklad do Sloven鑙ny: bo 萫lko e-mail: celbos@inmail.sk - Last Change: 2004 Apr 29 - Encoding: iso8859-2 + Last Change: 2006 Apr 18 + encoding: iso8859-2 diff --git a/runtime/tutor/tutor.sk.cp1250 b/runtime/tutor/tutor.sk.cp1250 index dc13b2636..891b3556d 100644 --- a/runtime/tutor/tutor.sk.cp1250 +++ b/runtime/tutor/tutor.sk.cp1250 @@ -1,5 +1,5 @@ =============================================================================== -= V i t a j t e v o V I M T u t o r i a l i - Verzia 1.5 = += V i t a j t e v o V I M T u t o r i a l i - Verzia 1.7 = =============================================================================== Vim je ve緈i v齥onn editor, ktor m pr韑i ve綼 pr韐azov na to aby @@ -10,6 +10,7 @@ Pribli瀗 鑑s potrebn na prebratie tejto v齯ky je 25-30 min鷗, z醰is na tom, ko緆o je str醰en閔o 鑑su s presk鷼avan韒. + UPOZORNENIE: Pr韐azy v lekci醕h modifikuj text. Vytvor k髉iu tohto s鷅oru aby sa mohlo precvi鑟va na 騩m (pri 歵arte "vimtutor" je toto k髉ia). @@ -20,16 +21,17 @@ Presved sa, 瀍 Shift-Lock NIEJE stla鑕n a stla鑤 kl醰esu j nieko緆o kr醫, aby sa kurzor posunul nato緆o, 瀍 lekcia 1.1 celkom zapln obrazovku. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcia 1.1: POHYB KURZOROM ** Pre pohyb kurzorum stla kl醰esy h,j,k,l ako je zn醶ornen. ** - ^ - k Funkcia: Kl醰esa h je na綼vo a vykon pohyb do綼va. - < h l > Kl醰esa l je napravo a vykon pohyb doprava. - j Kl醰esa j vyzer ako 氻pka dole - v + ^ + k Funkcia: Kl醰esa h je na綼vo a vykon pohyb do綼va. + < h l > Kl醰esa l je napravo a vykon pohyb doprava. + j Kl醰esa j vyzer ako 氻pka dole + v 1. Pohybuj kurzorom po obrazovke, k齧 si na to nezvykne. 2. Dr stla鑕n kl醰esu pre pohyb dole (j), k齧 sa jej funkcia nezopakuje. @@ -38,34 +40,33 @@ 3. Pou瀒t韒 kl醰esy pre pohyb dole prejdi na Lekciu 1.2. Pozn醡ka: Ak si niesi ist t齧 鑟 si nap韘al, stla <ESC> - na prechod do norm醠neho m骴u. + na prechod do norm醠neho m骴u. Pozn醡ka: Kurzorov kl醰esy s tie funk鑞. Ale pou烅van韒 hjkl sa bude - schopn pohybova r齝hlej歩e, ke si zvykne ich pou烅va. + schopn pohybova r齝hlej歩e, ke si zvykne ich pou烅va. Naozaj! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 1.2: SP趭岮NIE A ZATV罵ANIE VIMU + LEKCIA 1.2: ZATV罵ANIE VIMU + !! POZN罬KA: Pred vykonan韒 t齝hto krokov si pre桧taj cel t鷗o lekciu !! 1. Stla kl醰esu <ESC> (aby si sa u鑙te nach醖zal v norm醠nom m骴e) - 2. Nap須: :q! <ENTER>. - ----> T齧 ukon桧 pr醕u s editorom BEZ ulo瀍nia zmien, ktor si vykonal. - Ak chce ulo瀒 vykonan zmeny a ukon鑙 pr醕u s editorom nap須: - :wq <ENTER> + 2. Nap須: :q! <ENTER>. + T齧 ukon桧 pr醕u s editorom BEZ ulo瀍nia zmien, ktor si vykonal. 3. Ke sa dostane na pr韐azov riadok, nap須 pr韐az, ktor齧 sa dostane spe do tejto v齯ky. To m魹e by: vimtutor <ENTER> - Zvy鑑jne sa pou烅va: vim tutor <ENTER> - ----> 'vim' znamen spustenie editora vim, 'tutor' je n醶ov s鷅oru, ktor - chce editova. 4. Ak si si tieto kroky spo綼hlivo zapam鋞al, vykonaj kroky 1 a 3, pre - ukon鑕nie a znovu spustenie editora. Potom presu kurzor dole na - lekciu 1.3. + ukon鑕nie a znovu spustenie editora. + +POZN罬KA: :q! <ENTER> neulo烅 zmeny, ktor si vykonal. O nieko緆o lekci + sa nau桧 ako ulo瀒 zmeny do s鷅oru + + 5. presu kurzor dole na lekciu 1.3. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcia 1.3: EDIT罜IA TEXTU - MAZANIE @@ -85,7 +86,7 @@ Pozn醡ka: Kurzorov kl醰esy s tie funk鑞. Ale pou烅van韒 hjkl sa bude 5. Ak je veta spr醰na, prejdi na lekciu 1.4. -POZN罬KA: Nesk鷼aj si zapamet錆 obsah tejto v齯ky, ale sa u pou烅van韒. +POZN罬KA: Nesk鷼aj si zapam鋞a obsah tejto v齯ky, ale sa u pou烅van韒. @@ -93,7 +94,7 @@ POZN罬KA: Nesk鷼aj si zapamet錆 obsah tejto v齯ky, ale sa u pou烅van韒. Lekcia 1.4: EDIT罜IA TEXTU - VKLADANIE - ** Stla鑕nie kl醰esy i v norm醠nom m骴e umo烌uje vkladanie textu. ** + ** Stla鑕nie kl醰esy i umo烌uje vkladanie textu. ** 1. Presu kurzor ni灇ie na prv riadok za zna鑛u --->. @@ -111,26 +112,73 @@ POZN罬KA: Nesk鷼aj si zapamet錆 obsah tejto v齯ky, ale sa u pou烅van韒. 5. Ke sa dostato鑞e nau桧 vklada text, prejdi na nasleduj鷆e zhrnutie. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 1.5: EDIT罜IA TEXTU - PRID罺ANIE + + + ** Stla鑕nie kl醰esy A umo烌uje prid醰a text. ** + + 1. Presu kurozr ni灇ie na prv riadok za zna鑛ou --->. + Nez醠e烅 na tom, na ktorom znaku sa kurzor v tom riadku nach醖za. + + 2. Stla kl醰esu A a nap須 potrebn text. + + 3. Po pridan textu stla kl醰esu <ESC> pre n醰rat do Norm醠neho m骴u. + + 4. Presu kurozr na druh riadok ozna鑕n ---> a zopakuj + kroky 2 a 3 k齧 nieje veta spr醰na. + +---> Tu je nejak text ch齜aj鷆i o + Tu je nejak text ch齜aj鷆i od tia総o. +---> Tu tie ch齜a nej + Tu tie ch齜a nejak text. + + 5. Ke sa dostato鑞e nau桧 prid醰a text, prejdi na lekciu 1.6. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 1.6: EDIT罜IA S贐ORU + + + ** Nap韘an韒 :wq sa s鷅or ulo烅 a zavrie ** + +!! POZN罬KA: Pred vykonan韒 t齝hto krokov si pre桧taj cel lekciu!! + +1. Opusti t鷗o v齯ku, ako si to urobil v lekcii 1.2: :q! + +2. Do pr韐azov閔o riadku nap須 pr韐az: vim tutor <ENTER> + 'vim' je pr韐az, ktor spust editor Vim, 'tutor' je meno s鷅oru, + ktor chce editova. Pou瀒 tak s鷅or, ktor m魹e meni. + +3. Vlo a zma text tak, ako si sa nau鑙l v predo歭齝h lekciach. + +4. Ulo s鷅or so zmenami a opusti Vim pr韐azom: :wq <ENTER> + +5. Re歵artuj vimtutor a presu sa dole na nasleduj鷆e zhrnutie. + +6. Urob tak po pre桧tan predo歭齝h krokov a porozumeniu im. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ZHRNUTIE LEKCIE 1 1. Kurzor sa pohybuje pou瀒t韒 kl醰es so 氻pkami alebo kl醰esmi hjkl. - h (do lava) j (dole) k (hore) l (doprava) + h (do lava) j (dole) k (hore) l (doprava) 2. Pre spustenie Vimu (z pr韐azov閔o riadku) nap須: vim FILENAME <ENTER> 3. Na ukon鑕nie Vimu nap須: <ESC> :q! <ENTER> pre zru歟nie v歟tk齝h zmien alebo nap須: <ESC> :wq <ENTER> pre ulo瀍nie zmien. - 4. Na zmazanie znaku na mieste kurzora nap須 v norm醠nom m骴e: x + 4. Na zmazanie znaku na mieste kurzora nap須: x 5. Pre vlo瀍nie textu na mieste kurzora v norm醠nom m骴e nap須: - i vkladan text <ESC> + i nap須 vkladan text <ESC> vkladanie pred kurzor + A nap須 prid醰an text <EXC> vkladanie za riadok POZN罬KA: Stla鑕nie <ESC> 漚 premiestn do norm醠neho m骴u alebo zru氻 - nejak nechcen a 鑙asto鑞e dokon鑕n pr韐az. + nejak nechcen a 鑙asto鑞e dokon鑕n pr韐az. Teraz pokra鑥j lekciou 2. @@ -149,8 +197,10 @@ Teraz pokra鑥j lekciou 2. 4. Nap須 dw aby slovo zmizlo. -POZN罬KA: P韘men dw sa zobrazia na poslednom riadku obrazovky tak ako ich - p須e. Ak p須e nie鑟 zle, stla <ESC> a za鑞i znova. +POZN罬KA: P韘meno d sa zobraz na poslednom riadku obrazovky ke ho + nap須e. Vim na teba po鑛, aby si mohol nap韘a + p韘meno w. Ak vid須 nie鑟 in ako d , tak si nap韘al + nespr醰ny znak; stla <ESC> a za鑞i znova. ---> Tu je nieko緆o slov z醔ava, ktor nie patria list do tejto vety. @@ -178,34 +228,75 @@ POZN罬KA: P韘men dw sa zobrazia na poslednom riadku obrazovky tak ako ich 5. Prejdi na lekciu 2.3 pre pochopenie toho 鑟 sa stalo. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.3: OPER罷ORY A POHYBY + + Ve綼 pr韐azov, ktor menia text s odvoden od oper醫orov a pohybov. + Form醫 pre pr韐az mazania kl醰esou d je nasledovn: + + d pohyb + + kde: + d - je mazac oper醫or + pohyb - je to 鑟 oper醫or vykon醰a (vyp韘an ni灇ie) + + Kr醫ky list pohybov: + w - do za鑙atku 颽l歩eho slova, okrem jeho prv閔o p韘mena. + e - do konca teraj歩eho slova, vr醫ane posledn閔o znaku. + $ - do konca riadku, vr醫ane posledn閔o znaku + + Tak瀍 nap韘an韒 de sa zma瀍 v歟tko od kurzora do konca slova. + +POZN罬KA: Stla鑕n韒 iba pohybu v norm醠nom m骴e bez oper醫ora + sa presunie kurzor tak ako je to 歱ecivikovan. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.4: Pou瀒tie viacn醩obn閔o pohybu + + + ** Nap韘an韒 桧sla pred pohyb ho zopakuje zadn po鑕t kr醫 ** + 1. Presu kurozr ni灇ie na za鑙atok riadku ozna鑕n閔o --->. + + 2. Nap須 2w a kurozr sa presunie o dve slov vpred. + + 3. Nap須 3e a kurozr sa presunie vpred na koniec tretieho slova. + + 4. Nap須 0 (nula) a kurozr sa presunie na za鑙atok riadku. + + 5. Zopakuj kroky 2 a 3 s r魖nymi 桧slami. + +---> Toto je riadok so slovami po kotr齝h sa m魹ete pohybova. + + 6. Prejdi na lekciu 2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.3: ROZ奍ROVACIE PR蚄AZY A OBJEKTY + Lekcia 2.5: POU嶪TIE VIACN罶OBN蒆O MAZANIA PRE HROMADN MAZANIE + + ** Nap韘anie 桧sla spolu s oper醫orom ho zopakuje zadan po鑕t kr醫 ** - Form醫 mazacieho pr韐azu d je nasledovn: + V kombin醕ii oper醫orov mazania a pohybu spom韓an閔o vy殮ie vlo po鑕t + pred pohyb pre docielenie hromadn閔o mazania: + d 桧slo pohyb - [桧slo] d objekt ALEBO d [桧slo] objekt - Kde: - 桧slo - ud醰a ko緆o kr醫 sa pr韐az vykon (volite緉, implicitne=1) - d - je pr韐az pre mazanie - objekt - ud醰a na 鑟m sa pr韐az vykon醰a (vyp韘an ni灇ie) + 1. Presu kurzor na prv slovo p韘an VE糑軲I P蚐MENAMI + v riadku ozna鑕nom --->. - Kr醫ky v齪is objektov: - w - od kurzora do konca slova, vr醫anie medzier - e - od kurzora do konca slova, BEZ medzier - $ - od kurzora do konca riadku. + 2. Nap須 2dw a zma瀍 dve slov p韘an VE糑軲I P蚐MENAMI -POZN罬KA: Ak stla桧 kl醰esu objektu v norm醠nom m骴e bez pr韐azu, kurzor - sa presunie na miesto 歱ecifikovan vo v齪ise objektov. + 3. Zopakuj kroky 1 a 2 s pou瀒t韒 r魖neho 桧sla tak aby si zmazal slov + p韘an ve緆齧i p韘menami jedn齧 pr韐azom. +---> Tento ABC DE riadok FGHI JK LMN OP so slovamI je Q RS TUV vycisteny. +POZN罬KA: 软slo medzi oper醫orom d a pohybom funguje podobne ako pri + pou瀒t s pohybom bez oper醫ora. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.4: V軳IMKA V 'PR蚄AZOVOM OBJEKTE' + Lekcia 2.6: OPER罜IE S RIADKAMI ** Nap韘anie pr韐azu dd zma瀍 cel riadok. ** @@ -216,7 +307,7 @@ Vzh綼dom na frekvenciu mazania cel閔o riadku, sa autori Vimu rozhodli, 1. Presu kurzor na druh riadok v texte na spodu. 2. Nap須 dd aby si zmazal riadok. 3. Prejdi na 歵vrt riadok. -4. Nap須 2dd (pametaj si 桧slo-pr韐az-objekt) aby si zmazal dva riadky. +4. Nap須 2dd aby si zmazal dva riadky. 1) Ru瀍 s 鑕rven, 2) Blato je z醔avn, @@ -228,7 +319,7 @@ Vzh綼dom na frekvenciu mazania cel閔o riadku, sa autori Vimu rozhodli, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.5: PR蚄AZ UNDO + Lekcia 2.7: PR蚄AZ UNDO ** Stla u pre vr醫enie posledn閔o pr韐azu, U pre 鷓ravu cel閔o riadku. ** @@ -241,7 +332,7 @@ Vzh綼dom na frekvenciu mazania cel閔o riadku, sa autori Vimu rozhodli, 5. Teraz nap須 ve緆 U 桧m vr醫須 riadok do p魐odn閔o stavu. 6. Teraz nap須 u nieko緆o kr醫, 桧m vr醫須 sp錆 pr韐az U. 7. Teraz nap須 CTRL-R (dr kl醰esu CTRL stla鑕n k齧 stl徼a R) nieko緆o - kr醫, 桧m vr醫須 sp錆 predt齧 vr醫en pr韐azy (redo). + kr醫, 桧m vr醫須 sp錆 predt齧 vr醫en pr韐azy (undo z undo). ---> Opprav chybby nna toomto riadku a zmee ich pommocou undo. @@ -260,16 +351,20 @@ Vzh綼dom na frekvenciu mazania cel閔o riadku, sa autori Vimu rozhodli, 3. Pre zmazanie cel閔o riadku nap須: dd - 4. Form醫 pre p韐az v nor醠nom m骴e je: + 4. Pre zopakovanie pohybu, nap須 pred neho 桧slo: 2w - [桧slo] pr韐az objekt ALEBO pr韐az [桧slo] objekt + 5. Form醫 pre p韐az: + + oper醫or [桧slo] pohyb kde: - 桧slo - ud醰a ko緆o kr醫 sa pr韐az zopakuje - pr韐az - ud醰a vykon醰an pr韐az, ako napr韐lad d pre mazanie - objekt - ud醰a rozsah pr韐azu, ako napr韐lad w(slovo), + oper醫or - 鑟 treba robi, napr韐lad d pre zmazanie + [桧slo] - je volite緉 po鑕t pre opakovanie pohybu + pohyb - pohyb po texte vzh綼dom na oper醫or, napr韐lad w (slovo), $ (do konca riadku), at. - 5. Pre vr醫enie sp錆 predo歭ej oper醕ie nap須: u (mal u) + 6. Pre pohyb na za鑙atok riadku pou瀒 nulu: 0 + + 7. Pre vr醫enie sp錆 predo歭ej oper醕ie nap須: u (mal u) Pre vr醫enie v歟tk齝h 鷓rav na riadku nap須: U (ve緆 U) Pre vr醫enie vr醫en齝h 鷓rav nap須: CTRL-R @@ -289,10 +384,10 @@ Vzh綼dom na frekvenciu mazania cel閔o riadku, sa autori Vimu rozhodli, 5. Zopakuj kroky 2 a 4, k齧 riadky nies v spr醰nom porad. - d) Tie sa dok釣e vzdel醰a? - b) Fialky s modr, - c) Inteligencia sa vzdel醰a, - a) Ru瀍 s 鑕rven, +---> d) Tie sa dok釣e vzdel醰a? +---> b) Fialky s modr, +---> c) Inteligencia sa vzdel醰a, +---> a) Ru瀍 s 鑕rven, @@ -300,15 +395,15 @@ Vzh綼dom na frekvenciu mazania cel閔o riadku, sa autori Vimu rozhodli, Lekcia 3.2: PR蚄AZ NAHRADENIA - ** Nap韘an韒 r a znaku sa nahrad znak na mieste kurzora. ** + ** Nap韘an韒 rx sa nahrad znak na mieste kurzora znakom x . ** 1. Presu kurzor ni灇ie na prv riadok textu ozna鑕n閔o zna鑛ou --->. 2. Presu kurzor na za鑙atok prvej chyby. - 3. nap須 r a potom znak, ktor nahrad chybu. + 3. nap須 r a potom znak, ktor tam m by. - 4. Zopakuj kroky 2 a 3, k齧 prv riadok nieje spr醰ny. + 4. Zopakuj kroky 2 a 3, k齧 prv riadok nieje zhodn s druh齧. ---> Ka bol tento riasok p韆an, niekro stla歩l nespr醔ne kl醰esy! ---> Ke bol tento riadok p韘an, niekto stla鑙l nespr醰ne kl醰esy! @@ -323,22 +418,22 @@ POZN罬KA: Pam鋞aj si, 瀍 nau鑙 sa m魹e len pou烅vanim, nie pam鋞an韒. Lekcia 3.3. PR蚄AZ 赑RAVY - ** Ak chce zmeni 鑑s slova alebo cel slovo, nap須 cw . ** + ** Ak chce zmeni 鑑s slova do konca slova, nap須 ce . ** 1. Presu kurzor ni灇ie na prv riadok ozna鑕n zna鑛ou --->. 2. Umiestni kurzor na p韘meno o v slove rosfpl. - 3. Nap須 cw a oprav slovo (v tomto pr韕ade nap須 'iadok'.) + 3. Nap須 ce a oprav slovo (v tomto pr韕ade nap須 'iadok'.) - 4. Stla <ESC> a prejdi na 颽l歩u chybu (prv znak, ktor treba zmeni.) + 4. Stla <ESC> a prejdi na 颽l氻 znak, ktor treba zmeni. 5. Zopakuj kroky 3 a 4, k齧 prv veta nieje rovnak ako druh. ---> Tento rosfpl m nieko緆o skic, ktor je pirewvb zmeni piy漸栳n pr韐azu. ---> Tento riadok m nieko緆o slov, ktor je potrebn zmeni pou瀒t韒 pr韐azu. -Pozn醡ka, 瀍 cw nielen nahr醖za slovo, ale 漚 aj premiestn do vkladania. +Pozn醡ka, 瀍 ce zma瀍 slovo a nastav vkladac m骴. @@ -346,13 +441,13 @@ Pozn醡ka, 瀍 cw nielen nahr醖za slovo, ale 漚 aj premiestn do vkladania. Lekcia 3.4: VIAC ZMIEN POU嶪T蚆 c - ** Pr韐az pre 鷓ravy sa pou烅va s rovnak齧i objektami ako pre mazanie ** + ** Pr韐az pre 鷓ravy sa pou烅va s rovnak齧i pohybmi ako pre mazanie ** 1. Pr韐az pre 鷓ravy pracuje rovnako ako pre mazanie. Form醫 je: - [桧slo] c objekt ALEBO c [桧slo] objekt + c [桧slo] pohyb - 2. Objekty s rovnak, ako napr韐lad w (slovo), $ (koniec riadku), at. + 2. Pohyby s rovnak, ako napr韐lad w (slovo) a $ (koniec riadku). 3. Presu kurzor ni灇ie na prv riadok ozna鑕n zna鑛ou --->. @@ -364,6 +459,7 @@ Pozn醡ka, 瀍 cw nielen nahr醖za slovo, ale 漚 aj premiestn do vkladania. ---> Koniec tohto riadku potrebuje pomoc, aby bol ako druhy. ---> Koniec tohto riadku potrebuje opravi pou瀒t韒 pr韐azu c$ . +POZN罬KA: M魹e pou瀒 kl醰esu backspace na 鷓ravu zmien po鑑s p韘ania. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -376,13 +472,13 @@ Pozn醡ka, 瀍 cw nielen nahr醖za slovo, ale 漚 aj premiestn do vkladania. 2. Pre naradenie znaku na mieste kurzora, nap須 r a potom znak, ktor nahrad p魐odn znak. - 3. Pr韐az na upravenie umo烌uje zmeni 歱ecifikovan objekt od kurzora - a po koniec objektu. napr. Nap須 cw 桧m zmn須 text od poz韈ie + 3. Pr韐az na upravenie umo烌uje zmeni od kurzora a po miesto, ktor + ur鑥je pohyb. napr. Nap須 ce 桧m zmn須 text od poz韈ie kurzora do konca slova, c$ zmen text do konca riadku. - 4. Format pre nahradenie je: + 4. Form醫 pre nahradenie je: - [桧slo] c objekt ALEBO c [桧slo] objekt + c [桧slo] pohyb Teraz prejdi na nalseduj鷆u lekciu. @@ -394,19 +490,19 @@ Teraz prejdi na nalseduj鷆u lekciu. ** Stla CTRL-g pre zobrazenie svojej poz韈ie v s鷅ore a statusu s鷅oru. - Stla SHIFT-G pre prechod na riadok v s鷅ore. ** + Nap須 G pre presun na riadok v s鷅ore. ** Pozn醡ka: Pre桧taj si cel t鷗o lekciu sk魊 ako za鑞e vykon醰a kroky!! - 1. Dr stla鑕n kl醰esu Ctrl a stla g . Na spodu obrazovky sa zobraz - stavov riadok s n醶vom s鷅oru a riadkom na ktorom pr醰e si. Zapam鋞aj - si si 桧slo riadku pre krok 3. + 1. Dr stla鑕n kl醰esu Ctrl a stla g . Toto naz齰ame CTRL-G. + Na spodu obrazovky sa zobraz spr醰a s n醶vom s鷅oru a poz韈iou + v s鷅ore. Zapam鋞ajsi si 桧slo riadku pre pou瀒tie v kroku 3. - 2. Stla Shift-G 桧m sa dostane na spodok s鷅oru. + 2. Stla G 桧m sa dostane na spodok s鷅oru. + Nap須 gg 桧m sa dostane na za鑙atok s鷅oru. - 3. Nap須 桧slo riadku na ktorom si sa nach醖zal a stla Shift-G. To 漚 - vr醫i na riadok, na ktorom si prv kr醫 stla鑙l Ctrl-g. - (Ke p須e 桧sla, tieto sa nezobrazuj na obrazovke.) + 3. Nap須 桧slo riadku na ktorom si sa nach醖zal a stla G. To 漚 + vr醫i na riadok, na ktorom si prv kr醫 stla鑙l CTRL-G. 4. Ak sa c韙須 schopn vykona teto kroky, vykonaj kroky 1 a 3. @@ -419,24 +515,24 @@ Teraz prejdi na nalseduj鷆u lekciu. ** Nap須 / nasledovan re漚zcom pre vyh綼danie pr韘lu歯閔o re漚zca. ** 1. Nap須 znak / v norm醠nom m骴e. Pozn醡ka, 瀍 tento znak sa spolu - s kurzorom zobraz v dolnej 鑑sti obrazovky ako s : pr韐azom. + s kurzorom zobraz v dolnej 鑑sti obrazovky s : pr韐azom. 2. Teraz nap須 'errroor' <ENTER>. To je slovo, ktor chce vyh綼da. 3. Pre vyh綼danie 颽l歩eho v齭kytu rovnak閔o re漚zca, stla jednoducho n. Pre vyh綼danie 颽l歩eho v齭kytu rovnak閔o re漚zca opa鑞齧 smerom, - nap須 Shift-N. + N. 4. Ak chce vyh綼da re漚zec v sp鋞nom smere, pou烅 pr韐az ? miesto pr韐azu /. - ---> Ke vyh綼d醰anie dosiahne koniec tohto s鷅oru, bude pokra鑟va na - za鑙atku. - - "errroor" nie je sp魋ob ako nahradi error; errroor je error. + 5. Pre n醰rat na miesto z ktor閔o si pri歩el stla CTRL-O (dr stla鑕n + kl醰esu Ctrl po鑑s stla鑕nia kl醰esy o). Zopakuj pre 颽l氻 n醰rat + sp錆. CTRL-I ide vpred. -POZN罬KA: Ke vyh綼d醰anie dosiahne koniec s鷅oru, bude pokra鑟va na jeho - za鑙atku. +POZN罬KA: "errroor" nieje sp魋ob hl醩kovania error; errroor je error. +POZN罬KA: Ke vyh綼d醰anie dosiahne koniec tohto s鷅oru, bude pokra鑟va na + za鑙atku, dokia nieje resetovan nastavenie 'wrapscan' . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -454,16 +550,18 @@ POZN罬KA: Ke vyh綼d醰anie dosiahne koniec s鷅oru, bude pokra鑟va na jeho 4. Nap須 % pre presun kurzoru sp錆 na otv醨aj鷆u z醫vorku. + 5. Presu kurzor na in zo znakov (,),[,],{ alebo } a v歩mni si + 鑟 % vykon醰a. + ---> Toto ( je testovac riadok s ('s, ['s ] a {'s } v riadku. )) Pozn醡ka: Toto je ve緈i v齢odn pou烅 pri laden programu s ch齜aj鷆imi - uzatv醨aj鷆imi z醫vorkami. - + uzatv醨aj鷆imi z醫vorkami! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 4.4: SPOSOB AKO ZMENI CHYBY + Lekcia 4.4: PR蚄AZ NAHRADENIA ** Nap須 :s/star/nov/g pre nahradenie slova 'star' za slovo 'nov'. ** @@ -471,7 +569,7 @@ Pozn醡ka: Toto je ve緈i v齢odn pou烅 pri laden programu s ch齜aj鷆imi 1. Presu kurzor ni灇ie na riadok ozna鑕n zna鑛ou --->. 2. Nap須 :s/thee/the <ENTER> . Poznamka, 瀍 tento pr韐az zmen len prv - v齭kyt v riadku. + v齭kyt "thee" v riadku. 3. Teraz nap須 :s/thee/the/g 鑟 znamen celkov nahradenie v riadku. Toto nahrad v歟tky v齭kyty v riadku. @@ -479,9 +577,11 @@ Pozn醡ka: Toto je ve緈i v齢odn pou烅 pri laden programu s ch齜aj鷆imi ---> Thee best time to see thee flowers in thee spring. 4. Pre zmenu v歟tk齝h v齭kytov dan閔o re漚zca medzi dvomi ridakami, - nap須 :#,#s/star/nov/g kde #,# s 桧sla dvoch riadkov. + nap須 :#,#s/star/nov/g kde #,# s 桧sla dvoch riadkov, v rozsahu + ktor齝h sa nahradenie vykon. nap須 :%s/star/nov/g pre zmenu v歟tk齝h v齭kytov v celom riadku - + nap須 :%s/star/nov/gc n醞de v歟tky v齭kyty v celom s鷅ore, + s ot醶kou 鑙 nahradi alebo nie @@ -489,23 +589,25 @@ Pozn醡ka: Toto je ve緈i v齢odn pou烅 pri laden programu s ch齜aj鷆imi LEKCIA 4 ZHRNUTIE - 1. Ctrl-g vyp須e tvoju poz韈iu v s鷅ore a status s鷅oru. - Shift-g 漚 premiestni na koniec riadku. 软slo riadku nasledovan - Shift-g 漚 presunie na dan 桧slo riadku. + 1. CTRL-g vyp須e tvoju poz韈iu v s鷅ore a status s鷅oru. + G 漚 premiestni na koniec riadku. + 桧slo G 漚 premiestni na riadok s 桧slom. + gg 漚 presunie na prv riadok 2. Nap韘anie / nasledovan re漚zcom vyh綼d re漚zec smerom DOPREDU. Nap韘anie ? nasledovan re漚zcom vyh綼da re漚zec smerom DOZADU. Nap韘anie n po vyh綼d醰an, vyh綼d nasleduj鷆i v齭kyt re漚zca - v rovnakom smere, pri鑟m Shift-N vyh綼d v opa鑞om smere. + v rovnakom smere, pri鑟m N vyh綼d v opa鑞om smere. + CTRL-O 漚 vr醫i sp錆 na star歩u poz韈iu, CTRL-I na nov歩u poz韈iu. 3. Nap韘anie % ke kurzor je na (,),[,],{, alebo } n醞de zodpovdaj鷆u - p醨 z醫vorku. + p醨nu z醫vorku. - 4. Pre nahradenie nov閔o za prv star v riadku nap須 :s/nov/star - Pre nahradenie nov閔o za v歟tky star v riadku nap須 :s/nov/star/g - Pre nahradenie re漚zcov medzi dvoma riadkami 3 nap須 :#,#/nov/star/g + 4. Pre nahradenie nov閔o za prv star v riadku nap須 :s/star/nov + Pre nahradenie nov閔o za v歟tky star v riadku nap須 :s/star/nov/g + Pre nahradenie re漚zcov medzi dvoma riadkami 3 nap須 :#,#/star/nov/g Pre nahradenie v歟tk齝h v齭kytov v s鷅ore nap須 :%s/star/nov/g - Pre potvrdenie ka瀌閔o nahradenia pridaj 'c' :%s/nov/star/gc + Pre potvrdenie ka瀌閔o nahradenia pridaj 'c' :%s/star/nov/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -524,7 +626,7 @@ Pozn醡ka: Toto je ve緈i v齢odn pou烅 pri laden programu s ch齜aj鷆imi zobraz obsah tvojho adres醨a rovnako ako na pr韐azovom riadku. Alebo pou瀒 :!dir ak ls nefunguje. -Pozn醡ka: Takto je mo瀗 spusti hociak vonkaj氻 pr韐az. +Pozn醡ka: Takto je mo瀗 spusti hociak vonkaj氻 pr韐az s argumentami. Pozn醡ka: V歟tky pr韐azy : musia by dokon鑕n stla鑕n韒 <ENTER> @@ -539,41 +641,43 @@ Pozn醡ka: V歟tky pr韐azy : musia by dokon鑕n stla鑕n韒 <ENTER> 1. Nap須 :!dir alebo :!ls pre v齪is aktu醠neho adres醨a. U vie, 瀍 mus須 za t齧to stla鑙 <ENTER> . - 2. Vyber n醶ov s鷅oru, ktor E奣E neexistuje. + 2. Vyber n醶ov s鷅oru, ktor e歵e neexistuje, ako napr. TEST. 3. Teraz nap須: :w TEST (kde TEST je n醶ov vybrat閔o s鷅oru.) 4. To ulo烅 cel s鷅or (Vim Tutor) pod n醶ovm TEST. Pre overenie nap須 :!dir , 桧m zobraz須 obsah adres醨a. -Pozn醡ka: 瀍 ak ukon桧 pr醕u s editorom Vim a znovu ho spust須 s n醶vom - s鷅oru TEST, s鷅or bude k髉ia v齯ky, ke si ho ulo瀒l. +Pozn醡ka: 瀍 ak ukon桧 pr醕u s editorom Vim a znovu ho spust須 pr韐azom + vim TEST, s鷅or bude k髉ia v齯ky, ke si ho ulo瀒l. 5. Teraz odstr狎 s鷅or nap韘an韒 (MS-DOS): :!del TEST alebo (Unix): :!rm TEST ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 5.3 V軧EROV PR蚄AZ PRE ULO嶦NIE + Lekcia 5.3 V軧ER TEXTU PRE ULO嶦NIE - ** Pre ulo瀍nie 鑑sti s鷅oru, nap須 :#,# w FILENAME ** + ** Pre ulo瀍nie 鑑sti s鷅oru, nap須 v pohyb :w FILENAME ** - 1. Znovu nap須 :!dir alebo :!ls pre zobrazenie obsahu aktu醠neho - adres醨a a vyber vhodn s鷅or ako TEST. + 1. Presu kurozr na tento riadok. - 2. Presu kurzor na vrch tejto strany a nap須 Ctrl-g pre vyh綼danie 桧sla - tohto riadku. PAMETAJ SI TOTO 韧SLO! + 2. Stla v a presu kurozr na piatu polo瀔u dole. Pozn醡ka, 瀍 + tento text je vyzna鑕n (highlighted). - 3. Teraz prejdi na spodok strany a nap須 Ctrl-g znovu. ZAPAMETAJ SI 韧SLO - AJ TOHTO RIADKU! + 3. Stla kl醰esu : . V spodnej 鑑sti okna sa objav :'<,'>. - 4. Pre ulo瀍nie LEN 鑑sti s鷅oru, nap須 :#,# w TEST kde #,# s dve 桧sla - zapam鋞an齝h riadkov (vrch, spodok) a TEST je n醶ov s鷅oru. + 4. Nap須 w TEST , kde TEST je meno s鷅oru, ktor zatial neexistuje. + Skontroluj, e vid須 :'<,'>w TEST predt齧 ne stla桧 Enter. - 5. Znova sa pozri, 鑙 tam ten s鷅or je pomocou pr韐azu :!dir ale - NEODSTRA襏J ho. + 5. Vim zap須e ozna鑕n riadky do s鷅oru TEST. Pou瀒 :!dir alebo !ls + pre overenie. Zatial ho e歵e nema! Pou瀒jeme ho v 颽l歟j lekcii. +POZN罬KA: Stla鑕n韒 kl醰esy v sa spust vizu醠ne ozna鑟vanie. + M魹e pohybova kurzorom pre upresnenie vyzna鑕n閔o textu. + Potom m魹e pou瀒 oper醫or pre vykonanie nejakej akcie + s textom. Napr韐lad d zma瀍 vyzna鑕n text. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -582,21 +686,16 @@ Pozn醡ka: 瀍 ak ukon桧 pr醕u s editorom Vim a znovu ho spust須 s n醶vom ** Pre vlo瀍nie obsahu s鷅oru, nap須 :r FILENAME ** - 1. Nap須 :!dir aby si sa presved鑙l, 瀍 s鷅or TEST st醠e existuje. + 1. Premiestni kurzor nad tento riadok. - 2. Presu kurzor na vrch tejto strany. - -POZN罬KA: Po vykonan kroku 3 uvid須 Lekciu 5.3. Potom sa presu dole - na t鷗o lekciu. +POZN罬KA: Po vykonan kroku 2 uvid須 text z lekcie 5.3. Potom sa presu + dole, aby si videl t鷗o lekciu. 3. Teraz vlo s鷅or TEST pou瀒t韒 pr韐azu :r TEST kde TEST je n醶ov - s鷅oru. - -POZN罬KA: S鷅or, ktor si vlo瀒l sa vlo烅 od miesta, kde sa nach醖za kurzor. - - 4. Pre kontrolu vlo瀍nia s鷅oru, presu kurzor sp錆 a v歩mni si, 瀍 teraz - m釟 dve k髉ie lekcie 5.3, origin醠 a s鷅orov verziu. + s鷅oru. S鷅or, ktor si pou瀒l je umiestnen pod riadkom s kurzorom. +POZN罬KA: M魹e tie na桧ta v齭tup vonkaj歩eho pr韐azu. Napr韐lad :r !ls + na桧ta v齭tup pr韐azu ls a umiestni ho za poz韈iu kurzora. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -606,20 +705,19 @@ POZN罬KA: S鷅or, ktor si vlo瀒l sa vlo烅 od miesta, kde sa nach醖za kurzor. 1. :!pr韐az spust vonkaj氻 pr韐az. Niektor vyu瀒te緉 pr韐lady s: - (MS_DOS) (UNIX) - :!dir :!ls - zobraz obsah adres醨a + (MS_DOS) (UNIX) + :!dir :!ls - zobraz obsah adres醨a :!del FILENAME :!rm FILENAME - odstr醤i s鷅or FILENAME 2. :w FILENAME ulo烅 aktu醠ny s鷅or na disk pod menom FILENAME. - - 3. :#,#w FILENAME ulo烅 riadky od # do # do s鷅oru FILENAME. + + 3. v pohyb :w FILENAME ulo烅 vizu醠ne ozna鑕n riadky do + s鷅oru FILENAME. 4. :r FILENAME vyberie z disku s鷅or FILENAME a vlo烅 ho do aktu醠neho s鷅oru za poz韈iou kurzora. - - - + 5. :r !dir na桧ta v齭tup z pr韐azu dir a vlo烅 ho za poz韈iu kurzora. @@ -640,9 +738,10 @@ POZN罬KA: S鷅or, ktor si vlo瀒l sa vlo烅 od miesta, kde sa nach醖za kurzor. ---> Po nap韘an o sa kurzor premiestn na vlo瀍n riadok do vkladacieho m骴u. - 4. Pre otvorenie riadku nad kurzorom, jednotucho nap須 ve緆 O , namiesto - mal閔o o. Vysk鷼aj si to na nasleduj鷆om riadku. -Vlo riadok nad t齧to nap韘an韒 Shift-O, ke kurzor je na tomto riadku. + 4. Pre otvorenie riadku nad kurzorom, jednotucho nap須 ve緆 O , + namiesto mal閔o o. Vysk鷼aj si to na riadku dole. + +---> Vlo riadok nad t齧to nap韘an韒 O, ke kurzor je na tomto riadku. @@ -653,20 +752,21 @@ Vlo riadok nad t齧to nap韘an韒 Shift-O, ke kurzor je na tomto riadku. ** Nap須 a pre vlo瀍nie textu ZA kurzor. ** 1. Presu kurzor ni灇ie na koniec prv閔o riadku ozna鑕n閔o zna鑛ou ---> - nap韘an韒 $ v norm醠nom m骴e. - 2. Nap須 a (mal p韘meno) pre pridanie textu ZA znakom na mieste - kurzora. (Ve緆 A prid na koniec riadku.) + 2. Stla kl醰esu e dokia kurozr nieje na konci riadku. + + 3. Nap須 a (mal p韘meno) pre pridanie textu ZA kurzorom. -Pozn醡ka: Toto obch醖za p韘anie i , posledn znak, text na vlo瀍nie, <ESC>, - kurzor doprava, a nakoniec, x , na prid醰anie na koniec riadku! + 4. Dokon桧 slovo tak ako je to v druhom riadku. Stla <ESC> pre + opustenie vkladacieho m骴u. - 3. Teraz dokon鑙 prv riadok. Pozn醡ka, 瀍 prid醰anie je vlastne rovnak - ako vkladac m骴, okrem miesta, kde sa text vklad. + 5. Pou瀒 e na presun na 颽l歩e nedokon鑕n slovo a zopakuj kroky 3 a 4. ----> Tento riadok ti dovo緐je n醕vik +---> Tento ri ti dovo緐je n醕v pri醰an testu na koniec riadku. ---> Tento riadok ti dovo緐je n醕vik prid醰ania textu na koniec riadku. +POZN罬KA: a, i, A 歵artuj rovnak vkladac m骴, jedin rozidel je, kde + sa znaky vkladaj. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -675,24 +775,52 @@ Pozn醡ka: Toto obch醖za p韘anie i , posledn znak, text na vlo瀍nie, <ESC>, ** Nap須 ve緆 R pre nahradenie viac ako jedn閔o znaku. ** - 1. Presu kurzor ni灇ie na prv riadok ozna鑕n zna鑛ou --->. + 1. Presu kurzor ni灇ie na prv riadok ozna鑕n zna鑛ou --->. Premiestni + kurzor na za鑙atok prv閔o v齭kytu xxx. + + 2. Teraz nap須 R a nap須 桧slo uveden v druhom riadku, tak瀍 + sa n韒 nahrad p魐odn xxx. + + 3. Stla <ESC> pre opustenie nahradzovacieho m骴u. Pozn醡ka, 瀍 zvy歰k + riadku zostane nezmenen. + + 4. Zopakuj tieto kroky pre nahradenie zvy歯齝h xxx. - 2. Premiestni kurzor na za鑙atok prv閔o slova, ktor je odli歯 od druh閔o - riadku ozna鑕n閔o ---> (slovo 'posledn'). +---> Pridan韒 123 ku xxx dostane xxx. +---> Pridan韒 123 ku 456 dostane 579. - 3. Teraz nap須 R a nahra zvy歰k textu na prvom riadku p韘an韒 cez star - text tak, aby prv riadok bol rovnak ako druh. +POZN罬KA: Nahradzovac m骴 je ako vkladac m骴, ale ka瀌 nap韘an znak + zma瀍 existuj鷆i znak. ----> Na 鷓ravu prv閔o riadku do tvaru ako je posledn na strane pou瀒 kl醰esy. ----> Na 鷓ravu prv閔o riadku do tavru ako je druh, nap須 R a nov text. - 4. Pozn醡ka, 瀍 ak stla桧 <ESC> pre ukon鑕nie, v歟tok nezmenen text - zostane. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lekcia 6.4: Copy Paste textu + + ** pou烅 oper醫or y pre copy textku a p pre jeho paste ** + + 1. Cho ni灇ie na riadok ozna鑕n ---> a umiestni kurozr za "a)". + + 2. Na歵artuj vizu醠ny m骴 pou瀒t韒 v a presu kurozr pred "first". + + 3. Nap須 y pre vystrihnutie (copy) ozna鑕n閔o textu. + + 4. Presu kurozr na koniec 颽l歩eho riadku: j$ + 5. Nap須 p pre vlo瀗ie (paste) textu. Potom nap須: a druha <ESC>. + + 6. Pou瀒 vizu醠ny m骴 pre ozna鑕nie "polo瀔a.", vystrihni to + pou瀒t韒 y, presu sa na koniec nasleduj鷆eho riadku pou瀒t韒 j$ + a vlo sem text pou瀒t韒 p. + +---> a) toto je prv polo瀔a +---> b) + +POZN罬KA: M魹e pou瀒 tie y ako oper醫or; yw vystrihne jedno slovo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 6.4: NASTAVENIE MO嶯OST + Lekcia 6.5: NASTAVENIE MO嶯OST ** Nastav mo瀗osti, tak瀍 vyh綼d醰anie alebo nahradzovanie ignoruje @@ -700,40 +828,52 @@ Pozn醡ka: Toto obch醖za p韘anie i , posledn znak, text na vlo瀍nie, <ESC>, 1. Vyh綼daj re漚zec 'ignore' nap韘an韒: - /ignore - Zopakuj vyh綼d醰anie nieko緆o kr醫 stla鑕n韒 kl醰esy n + /ignore <ENTER> + Zopakuj vyh綼d醰anie nieko緆o kr醫 stla鑕n韒 kl醰esy n . 2. Nastav mo瀗os 'ic' (Ignore case) nap韘an韒 pr韐azu: :set ic - 3. Teraz vyh綼daj re漚zec 'ingore' znova stla鑕n韒 kl醰esy: n - Zopakuj vyh綼d醰anie nieko緆o kr醫 stla鑕n韒 kl醰esy n + 3. Teraz vyh綼daj re漚zec 'ingore' znova stla鑕n韒 kl醰esy n + Pozn醡ka, 瀍 teraz s vyh綼dan aj Ignore a IGNORE. 4. Nastav mo瀗os漣 'hlsearch' a 'incsearch': :set hls is 5. Teraz spusti vyh綼d醰ac pr韐az znovu, a pozri 鑟 sa stalo: - /ignore + /ignore <ENTER> - 6. Na odstr醤enie zv齬aznenia v齬azov nap須: - :nohlsearch + 6. Pre opetovn zapnutie rozly歰vania ve緆齝h a mal齝h p韘men + nap須: :set noic + +POZN罬KA: Na odstr醤enie zv齬aznenia v齬azov nap須: :nohlsearch +POZN罬KA: Ak chce nerozly歰va ve緆os p韘men len pre jedno + pou瀒tie vyh綼d醰acieho pr韐azu, pou瀒 \c: /ignore\c <ENTER> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LEKCIA 6 ZHRNUTIE - 1. Nap韘an韒 o sa otvor nov riadok pod kurzorom a premiestni sa kurzor - na vlo瀍n riadok do vkladacieho m骴u. - nap韘an韒 ve緆閔o O sa otvor riadok nad aktu醠nym riadkom s kurzorom. + 1. Nap須 o pre otvorenie riadku pod kurzorom a 歵art vkladacieho m骴u. + Nap須 O pre otvorenie riadku nad kurzorom. + + 2. Nap須 a pre vkladanie textu ZA kurzor. + Nap須 A pre vkladanie textu za koncom riadku. + + 3. Pr韐az e presunie kurozr na koniec slova - 2. Nap須 a pre vkladanie textu ZA znak na poz韈ii kurzoru. - Nap韘an韒 ve緆閔o A sa text automatick prid醰a na koniec riadku. + 4. Oper醫or y vystrihne (skop韗uje) text, p ho vlo烅. - 3. Nap韘anie ve緆閔o R prepne do nahradzovacieho m骴u, k齧 nieje - stla鑕n <ESC> pre ukon鑕nie nahradzovacieho m骴u. + 5. Nap韘anie ve緆閔o R prepne do nahradzovacieho m骴u, k齧 nieje + stla鑕n <ESC>. - 4. Nap韘anie ":set xxx" nastav mo瀗os "xxx". + 6. Nap韘anie ":set xxx" nastav mo瀗os "xxx". Niektor nastavenia s: + 'ic' 'ignorecase' ignoruje ve緆 a mal p韘men po鑑s vyh綼d醰ania. + 'is' 'incsearch' zobrazuje 鑙asto鑞 re漚zce vyh綼d醰an閔o re漚zca. + 'hls' 'hlsearch' vyzna桧 v歟tky vyh綼d醰an re漚zce. + M魹e pou瀒 hociktor z dlh齝h a kr醫kych n醶vov mo瀗ost. + 7. Vlo "no" pred nastavenie pre jeho vypnutie: :set noic @@ -742,7 +882,7 @@ Pozn醡ka: Toto obch醖za p韘anie i , posledn znak, text na vlo瀍nie, <ESC>, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 7: PR蚄AZY ON-LINE N罰OVEDY + LEKCIA 7.1: Z蚐KANIE N罰OVEDY ** Pou烅vaj on-line syst閙 n醦ovedy ** @@ -753,19 +893,21 @@ Pozn醡ka: Toto obch醖za p韘anie i , posledn znak, text na vlo瀍nie, <ESC>, - stla kl醰esu <F1> (ak nejak m釟) - nap須 :help <ENTER> - Nap須 :q <ENTER> 桧m zatvor須 okno n醦ovedy. + 软taj text v okne n醦ovedy pre z韘kanie predstavy ako n醦oveda funguje. + Nap須 CTRL-W CTRL-W pre skok z jedn閔o okna do druh閔o. + Nap須 :q <ENTER> 桧m zatvor須 okno n醦ovedy. M魹e n醞s help ku hociakej t閙e pridan韒 argumentu ku pr韐azu ":help". Vysk鷼aj tieto (nezabudni stla鑙 <ENTER>): :help w - :help c_<T + :help c_CTRL-D :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 8: VYTVORENIE 奣ARTOVACIEHO SKRIPTU + LEKCIA 7.2: VYTVORENIE 奣ARTOVACIEHO SKRIPTU ** Zapni funkcie editora Vim ** @@ -773,22 +915,67 @@ Pozn醡ka: Toto obch醖za p韘anie i , posledn znak, text na vlo瀍nie, <ESC>, vypnut. Pre pou烅vanie viac Vim funkcii vytvor "vimrc" s鷅or. 1. Za鑞i editova "vimrc" s鷅or, to z醰is na pou瀒tom syst閙e: - :edit ~/.vimrc pre Unix - :edit $VIM/_vimrc pre MS-Windows + :e ~/.vimrc pre Unix + :e $VIM/_vimrc pre MS-Windows 2. Teraz si pre桧taj text pr韐ladu "vimrc" s鷅oru: - :read $VIMRUNTIME/vimrc_example.vim + :r $VIMRUNTIME/vimrc_example.vim 3. Ulo s鷅or: - - :write + :w Pri nasleduj鷆om 歵arte editora Vim sa pou瀒je zv齬az騩vanie syntaxe. Do "vimrc" s鷅oru m魹e prida v歟tky svoje uprednost騩van nastavenia. + Pre viac inform醕ii nap須 :help vimrc-intro + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + LEKCIA 7.3 DOKON菶NIE + + ** Dokon鑙 pr韐az na pr韐azovom riadku pou瀒t韒 CTRL-D a <TAB> ** + + 1. Uisti sa, 瀍 Vim nieje v kompatibilnom m骴e: :set nocp + + 2. Pozri sa ak s鷅ory sa nach醖zaj v adres醨i: :!ls alebo :!dir + + 3. Nap須 za鑙atok pr韐azu: :e + + 4. Stla CTRL-D a Vim zobraz zoznam pr韐azov za桧naj鷆ich "e". + + 5. Stla <TAB> a Vim dokon桧 meno pr韐azu na ":edit". + + 6. Teraz pridaj medzern韐 a za鑙atok mena existuj鷆eho s鷅oru: + :edit FIL + + 7. Stla <TAB>. Vim dokon桧 meno (ak je jedine鑞). + +POZN罬KA: Dokon鑟vanie funguje pre ve綼 pr韐azov. Vysk鷼aj stla鑕nie + CTRL-D a <TAB>. 妏eci醠ne je to u瀒to鑞 pre pr韐az :help. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 7 ZHRNUTIE + + 1. Nap須 :help alebo stla <F1> alebo <Help> pre otvorenie okna n醦ovedy. + + 2. Nap須 :help pr韐az pre vyh綼danie n醦ovedy ku pr韐azu pr韐az. + + 3. Nap須 CTRL-W CTRL-W na presko鑕nie do in閔o okna. + + 4. Nap須 :q pre zatvorenie okna n醦ovedy + + 5. Vytvor 歵artovac skript vimrc pre udr瀉nie uprednost騩van齝h nastaven. + + 6. Po鑑s p韘ania pr韐azu : stla CTRL-D pre zobrazenie dokon鑕n. + Stla <TAB> pre pou瀒tie jedn閔o z dokon鑕n. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + Toto vymedzuje v齯ku Vimu. Toto je ur鑕n pre strucn preh綼d o editore Vim, 鷓lne posta鑥j鷆e pre 綼hk a obstojn pou烅vanie tohto editora. T醫o v齯ka je 颽leko od kompletnosti, preto瀍 Vim m omnoho viacej pr韐azov. @@ -817,5 +1004,5 @@ Pozn醡ka: Toto obch醖za p韘anie i , posledn znak, text na vlo瀍nie, <ESC>, Preklad do Sloven鑙ny: 紆bo 萫lko e-mail: celbos@inmail.sk - Last Change: 2004 Apr 29 + Last Change: 2006 Apr 18 encoding: cp1250 |