commit 064a074ddfde97dd6e33bf4118d1608e11081e9c Author: Joe Fleming Date: Sun May 6 12:17:04 2012 -0700 inital checkin using existing vim and preparing for use of bash_magic diff --git a/bash/bash_magic b/bash/bash_magic new file mode 160000 index 0000000..c289364 --- /dev/null +++ b/bash/bash_magic @@ -0,0 +1 @@ +Subproject commit c289364fbe28495dda730f53750e933b12461589 diff --git a/vim/README.md b/vim/README.md new file mode 100644 index 0000000..c996f53 --- /dev/null +++ b/vim/README.md @@ -0,0 +1,33 @@ + +What is this? +=== + +My personal vim scripts and settings. Nothing too mind-blowing, but I +find it useful having it online and maybe someone will learn something +or find out about a vim script they never heard of before. + +This uses [pathogen](http://www.vim.org/scripts/script.php?script_id=2332), +which is probably the greatest thing since sliced bread. + +Under bundle, you'll find custom, which is just some custom stuff I added. +Nothing too magical, just some indenting rules settings, aliases and other +jazz that I didn't want mucking up my vimrc. + + +Usage +=== + +Clone the repo to ~/.vim and symlink ~/.vim/vimrc to ~/.vimrc and you'll see what I see. + + +Included Scripts +=== + +- [phpfolding.vim](https://github.com/vim-scripts/phpfolding.vim) +- [snipmate.vim](https://github.com/msanders/snipmate.vim) +- [syntastic](https://github.com/scrooloose/syntastic) +- [vim-coffee-script](https://github.com/kchmck/vim-coffee-script) +- [vim-colors-solarized](https://github.com/altercation/vim-colors-solarized) +- [vim-jade](https://github.com/digitaltoad/vim-jade) +- [vim-stylus](https://github.com/wavded/vim-stylus) +- [vim-surround](https://github.com/tpope/vim-surround) diff --git a/vim/autoload/pathogen.vim b/vim/autoload/pathogen.vim new file mode 100644 index 0000000..be68389 --- /dev/null +++ b/vim/autoload/pathogen.vim @@ -0,0 +1,230 @@ +" pathogen.vim - path option manipulation +" Maintainer: Tim Pope +" Version: 2.0 + +" Install in ~/.vim/autoload (or ~\vimfiles\autoload). +" +" For management of individually installed plugins in ~/.vim/bundle (or +" ~\vimfiles\bundle), adding `call pathogen#infect()` to your .vimrc +" prior to `fileype plugin indent on` is the only other setup necessary. +" +" The API is documented inline below. For maximum ease of reading, +" :set foldmethod=marker + +if exists("g:loaded_pathogen") || &cp + finish +endif +let g:loaded_pathogen = 1 + +" Point of entry for basic default usage. Give a directory name to invoke +" pathogen#runtime_append_all_bundles() (defaults to "bundle"), or a full path +" to invoke pathogen#runtime_prepend_subdirectories(). Afterwards, +" pathogen#cycle_filetype() is invoked. +function! pathogen#infect(...) abort " {{{1 + let source_path = a:0 ? a:1 : 'bundle' + if source_path =~# '[\\/]' + call pathogen#runtime_prepend_subdirectories(source_path) + else + call pathogen#runtime_append_all_bundles(source_path) + endif + call pathogen#cycle_filetype() +endfunction " }}}1 + +" Split a path into a list. +function! pathogen#split(path) abort " {{{1 + if type(a:path) == type([]) | return a:path | endif + let split = split(a:path,'\\\@,'edit',) +command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(,'edit',) +command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(,'split',) +command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(,'vsplit',) +command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(,'tabedit',) +command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(,'pedit',) +command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(,'read',) +command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(,'edit',,'lcd') + +" vim:set ft=vim ts=8 sw=2 sts=2: diff --git a/vim/bundle/custom/ftdetect/ctp.vim b/vim/bundle/custom/ftdetect/ctp.vim new file mode 100644 index 0000000..5318413 --- /dev/null +++ b/vim/bundle/custom/ftdetect/ctp.vim @@ -0,0 +1,2 @@ +" custom rule for cake template files +au BufNewFile,BufRead *.ctp setfiletype php diff --git a/vim/bundle/custom/ftplugin/coffee.vim b/vim/bundle/custom/ftplugin/coffee.vim new file mode 100644 index 0000000..c87d2fe --- /dev/null +++ b/vim/bundle/custom/ftplugin/coffee.vim @@ -0,0 +1,10 @@ +" modify the indenting +set expandtab " insert spaces instead of tabs +set tabstop=2 " use X spaces when tab is pressed +set shiftwidth=2 " shifttabs are also X spaces + +" vim-coffee-sript settings +" TODO: add check for vim-coffee-script +vmap v :'<,'>:CoffeeCompile vert +map v :CoffeeCompile vert +map c :silent CoffeeMake diff --git a/vim/bundle/custom/ftplugin/jade.vim b/vim/bundle/custom/ftplugin/jade.vim new file mode 100644 index 0000000..d395208 --- /dev/null +++ b/vim/bundle/custom/ftplugin/jade.vim @@ -0,0 +1,4 @@ +" modify the indenting +set expandtab " insert spaces instead of tabs +set tabstop=2 " use X spaces when tab is pressed +set shiftwidth=2 " shifttabs are also X spaces diff --git a/vim/bundle/custom/ftplugin/javascript.vim b/vim/bundle/custom/ftplugin/javascript.vim new file mode 100644 index 0000000..047c0d0 --- /dev/null +++ b/vim/bundle/custom/ftplugin/javascript.vim @@ -0,0 +1,12 @@ +" disable default indent rules +"let b:did_indent = 1 + +" disable indenting on the fly +nnoremap :setl noai nosi nocin indentexpr= indentkeys= +" enable indenting on the fly +nnoremap :setl ai si cin indentexpr= indentkeys=0{,0},:,0#,!^F,o,O,e + +" modify the indenting +"set expandtab " insert spaces instead of tabs +set tabstop=2 " use X spaces when tab is pressed +set shiftwidth=2 " shifttabs are also X spaces diff --git a/vim/bundle/custom/ftplugin/php.vim b/vim/bundle/custom/ftplugin/php.vim new file mode 100644 index 0000000..f097fdd --- /dev/null +++ b/vim/bundle/custom/ftplugin/php.vim @@ -0,0 +1,8 @@ +" disable indenting on the fly +nnoremap :setl indentexpr= indentkeys= +" enable indenting on the fly +nnoremap :setl indentexpr=GetPhpIndent() indentkeys=0{,0},0),:,!^F,o,O,e,*,=?>,= + +Based on e.g. functions declared like this: + + + +SCREENSHOT +You can view a screenshot here: http://www.fighterz.net/trig/folding.gif + +FEATURES +- It remembers fold settings. If you add functions and execute the script again, + your opened folds will not be closed. +- It will not be confused by brackets in comment blocks or string literals. +- The folding of class properties with their PhpDoc comments. +- The folding of all class properties into one fold. +- Folding the original marker style folds too. +- An "**" postfixing the fold indicates PhpDoc is inside (configurable). +- An "**#@+" postfixing the fold indicates PhpDocBlock is inside (configurable). +- Empty lines postfixing the folds can be configured to be included in the fold. +- Nested folds are supported (functions inside functions, etc.) + +FUTURE +- Better 'configurability' as opposed to editting the PHPCustomFolds() function and + some "Script configuration" global variables. + +NOTE +If anyone has emailed me and I have not replied, it's probably lost. I just found out +hotmail recognizes alot as junk. I now turned off the junk filter.. + +NOTE2: +I'm currently more active again with this project, so if you have any contributions to +this project, please let me know. + +COMPATIBILITY +This script is tested successfully with Vim version >= 6.3 on windows and linux +(With 6.0 it works *sometimes*, I don't recommend using it in that version) diff --git a/vim/bundle/phpfolding.vim/plugin/phpfolding.vim b/vim/bundle/phpfolding.vim/plugin/phpfolding.vim new file mode 100644 index 0000000..b25a3c7 --- /dev/null +++ b/vim/bundle/phpfolding.vim/plugin/phpfolding.vim @@ -0,0 +1,611 @@ +" Plugin for automatic folding of PHP functions (also folds related PHPdoc) +" +" Maintainer: Ray Burgemeestre +" Last Change: 2010 Jan 15 +" +" USAGE +" If you enabled the script in your after/ftplugin directory (see install) +" then it will be executed after you open a .php file. +" +" After e.g. adding/moving functions, you can re-execute the script by using +" the following key mappings: +" +" F5 - To fold functions, classes, and other stuff with PHPdoc (depending +" on your configuration). +" F6 - To do the same with more extensive bracket checking (might work +" better if your folds are messed up due to misinterpreted brackets). +" F7 - To remove all folds. +" +" INSTALL +" 1. Put phpfolding.vim in your plugin directory (~/.vim/plugin) +" 2. You might want to add the following keyboard mappings to your .vimrc: +" +" map :EnableFastPHPFolds +" map :EnablePHPFolds +" map :DisablePHPFolds +" +" 3. You can disable auto folding in your .vimrc with: +" +" let g:DisableAutoPHPFolding = 1 +" +" By default EnableFastPHPFolds is called. Do these mess up your folds, +" you can try to replace EnableFastPHPFolds by EnablePHPFolds. You can +" change this in function s:CheckAutocmdEnablePHPFold. +" +" NOTE +" It may be that you need to load the plugin from your .vimrc manually, in +" case it doesn't work: +" +" let php_folding=0 +" (if you can't use the after directory in step 3) +" source ~/path/to/phpfolding.vim +" (if you're not using the default plugin directory) +" +" MORE INFORMATION +" - In PHPCustomFolds() you can i.e. comment the PHPFoldPureBlock('class', ...) +" call to have the script not fold classes. You can also change the second +" parameter passed to that function call, to have it or not have it fold +" PhpDoc comments. All other folding you can turn on/off in this function. +" - You can tweak the foldtext to your liking in the function PHPFoldText(). +" - You can set some preferences and default settings a few lines below +" at the "Script configuration" part. +" +" This script is tested with Vim version >= 6.3 on windows and linux. + +" Avoid reloading {{{1 +if exists('loaded_phpfolding') + finish +endif + +let loaded_phpfolding = 1 +" }}} + +" .vimrc variable to disable autofolding for php files {{{1 +if !exists("g:DisableAutoPHPFolding") + let g:DisableAutoPHPFolding = 0 +endif +" }}} + +command! EnableFastPHPFolds call EnableFastPHPFolds() +command! -nargs=* EnablePHPFolds call EnablePHPFolds() +command! DisablePHPFolds call DisablePHPFolds() + +" {{{ Script configuration +" Display the following after the foldtext if a fold contains phpdoc +let g:phpDocIncludedPostfix = '**' +let g:phpDocBlockIncludedPostfix = '**#@+' + +" Default values +" .. search this # of empty lines for PhpDoc comments +let g:searchPhpDocLineCount = 1 +" .. search this # of empty lines that 'trail' the foldmatch +let g:searchEmptyLinesPostfixing = 1 +" }}} +" {{{ Script constants +let s:synIDattr_exists = exists('*synIDattr') +let s:TRUE = 1 +let s:FALSE = 0 +let s:MODE_CREATE_FOLDS = 1 +let s:MODE_REMEMBER_FOLD_SETTINGS = 2 +let s:FOLD_WITH_PHPDOC = 1 +let s:FOLD_WITHOUT_PHPDOC = 2 +let s:SEARCH_PAIR_START_FIRST = 1 +let s:SEARCH_PAIR_IMMEDIATELY = 2 +" }}} + +function! s:EnableFastPHPFolds() " {{{ + call s:EnablePHPFolds(s:FALSE) +endfunction +" }}} +function! s:EnablePHPFolds(...) " {{{ + let s:extensiveBracketChecking = s:TRUE + + " Check function arguments + if a:0 == 1 + let s:extensiveBracketChecking = a:1 + endif + + " Remember cursor information if possible + let s:savedCursor = line(".") + + " Initialize variables + set foldmethod=manual + set foldtext=PHPFoldText() + let s:openFoldListItems = 0 + let s:fileLineCount = line('$') + + let s:searchPhpDocLineCount = g:searchPhpDocLineCount + let s:searchEmptyLinesPostfixing = g:searchEmptyLinesPostfixing + + + " Move to end of file + exec s:fileLineCount + + " First pass: Look for Folds, remember opened folds + let s:foldingMode = s:MODE_REMEMBER_FOLD_SETTINGS + call s:PHPCustomFolds() + + " Second pass: Recreate Folds, restore previously opened + let s:foldingMode = s:MODE_CREATE_FOLDS + " .. Remove all folds first + normal zE + let s:foldsCreated = 0 + call s:PHPCustomFolds() + " .. Fold all + normal zM + + " Restore previously opened folds + let currentItem = 0 + while currentItem < s:openFoldListItems + exec s:foldsOpenedList{currentItem} + normal zo + let currentItem = currentItem + 1 + endwhile + + :redraw + echo s:foldsCreated . " fold(s) created" + + " Restore cursor + exec s:savedCursor + +endfunction +" }}} +function! s:DisablePHPFolds() " {{{ + "set foldmethod=manual + set foldtext= + normal zE + echo "php fold(s) deleted" +endfunction +" }}} +function! s:PHPCustomFolds() " {{{ + " NOTE: The two last parameters for functions PHPFoldProperties() and + " PHPFoldPureBlock() overwrite: 'g:searchPhpDocLineCount' and + " 'g:searchEmptyLinesPostfixing'.. + + " Fold function with PhpDoc (function foo() {}) + call s:PHPFoldPureBlock('function', s:FOLD_WITH_PHPDOC) + + " Fold class properties with PhpDoc (var $foo = NULL;) + call s:PHPFoldProperties('^\s*var\s\$', ";", s:FOLD_WITH_PHPDOC, 1, 1) + + " Fold class without PhpDoc (class foo {}) + call s:PHPFoldPureBlock('^\s*\(abstract\s*\)\?class', s:FOLD_WITH_PHPDOC) + + " Fold define()'s with their PhpDoc + call s:PHPFoldProperties('^\s*define\s*(', ";", s:FOLD_WITH_PHPDOC) + + " Fold includes with their PhpDoc + call s:PHPFoldProperties('^\s*require\s*', ";", s:FOLD_WITH_PHPDOC) + call s:PHPFoldProperties('^\s*include\s*', ";", s:FOLD_WITH_PHPDOC) + + " Fold GLOBAL Arrays with their PhpDoc (some PEAR packages use these) + call s:PHPFoldProperties('^\s*\$GLOBALS.*array\s*(', ";", s:FOLD_WITH_PHPDOC) + + " Fold marker style comments ({{{ foo }}}) + call s:PHPFoldMarkers('{{{', '}}}') + + " Fold PhpDoc "DocBlock" templates (#@+ foo #@-) + call s:PHPFoldMarkers('#@+', '#@-') +endfunction +" }}} +function! s:PHPFoldPureBlock(startPattern, ...) " {{{ + let s:searchPhpDocLineCount = g:searchPhpDocLineCount + let s:searchEmptyLinesPostfixing = g:searchEmptyLinesPostfixing + let s:currentPhpDocMode = s:FOLD_WITH_PHPDOC + + if a:0 >= 1 + " Do we also put the PHP doc part in the fold? + let s:currentPhpDocMode = a:1 + endif + if a:0 >= 2 + " How far do we want to look for PhpDoc comments? + let s:searchPhpDocLineCount = a:2 + endif + if a:0 == 3 + " How greedy are we on postfixing empty lines? + let s:searchEmptyLinesPostfixing = a:3 + endif + + " Move to file end + exec s:fileLineCount + + " Loop through file, searching for folds + while 1 + let s:lineStart = s:FindPureBlockStart(a:startPattern) + + if s:lineStart != 0 + + let s:lineStart = s:FindOptionalPHPDocComment() + let s:lineStop = s:FindPureBlockEnd('{', '}', s:SEARCH_PAIR_START_FIRST) + + " Stop on Error + if s:lineStop == 0 + break + endif + + " Do something with the potential fold based on the Mode we're in + call s:HandleFold() + + else + break + endif + + " Goto fold start (remember we're searching upwards) + exec s:lineStart + endwhile + + + if s:foldingMode != s:MODE_REMEMBER_FOLD_SETTINGS + " Remove created folds + normal zR + endif +endfunction +" }}} +function! s:PHPFoldMarkers(startPattern, endPattern, ...) " {{{ + let s:currentPhpDocMode = s:FOLD_WITHOUT_PHPDOC + + " Move to file end + exec s:fileLineCount + + " Loop through file, searching for folds + while 1 + let s:lineStart = s:FindPatternStart(a:startPattern) + + if s:lineStart != 0 + let s:lineStart = s:FindOptionalPHPDocComment() + " The fourth parameter is for disabling the search for trailing + " empty lines.. + let s:lineStop = s:FindPureBlockEnd(a:startPattern, a:endPattern, + \ s:SEARCH_PAIR_IMMEDIATELY, s:FALSE) + + " Stop on Error + if s:lineStop == 0 + break + endif + + " Do something with the potential fold based on the Mode we're in + call s:HandleFold() + else + break + endif + + " Goto fold start (remember we're searching upwards) + exec s:lineStart + endwhile + + if s:foldingMode != s:MODE_REMEMBER_FOLD_SETTINGS + " Remove created folds + normal zR + endif +endfunction +" }}} +function! s:PHPFoldProperties(startPattern, endPattern, ...) " {{{ + let s:searchPhpDocLineCount = g:searchPhpDocLineCount + let s:searchEmptyLinesPostfixing = g:searchEmptyLinesPostfixing + let s:currentPhpDocMode = s:FOLD_WITH_PHPDOC + if a:0 >= 1 + " Do we also put the PHP doc part in the fold? + let s:currentPhpDocMode = a:1 + endif + if a:0 >= 2 + " How far do we want to look for PhpDoc comments? + let s:searchPhpDocLineCount = a:2 + endif + if a:0 == 3 + " How greedy are we on postfixing empty lines? + let s:searchEmptyLinesPostfixing = a:3 + endif + + " Move to end of file + exec s:fileLineCount + + " Loop through file, searching for folds + while 1 + let s:lineStart = s:FindPatternStart(a:startPattern) + + if s:lineStart != 0 + let s:lineStart = s:FindOptionalPHPDocComment() + let s:lineStop = s:FindPatternEnd(a:endPattern) + + " Stop on Error + if s:lineStop == 0 + break + endif + + " Do something with the potential fold based on the Mode we're in + call s:HandleFold() + else + break + endif + + " Goto fold start (remember we're searching upwards) + exec s:lineStart + + endwhile + + if s:foldingMode != s:MODE_REMEMBER_FOLD_SETTINGS + " Remove created folds + normal zR + endif +endfunction +" }}} +function! s:HandleFold() " {{{ + if s:foldingMode == s:MODE_REMEMBER_FOLD_SETTINGS + " If we are in an actual fold.., + if foldlevel(s:lineStart) != 0 + " .. and it is not closed.., + if foldclosed(s:lineStart) == -1 + " .. and it is more then one lines + " (it has to be or it will be open by default) + if s:lineStop - s:lineStart >= 1 + " Remember it as an open fold + let s:foldsOpenedList{s:openFoldListItems} = s:lineStart + let s:openFoldListItems = s:openFoldListItems + 1 + endif + endif + endif + + " If the cursor is inside the fold, it needs to be opened + if s:lineStart <= s:savedCursor && s:lineStop >= s:savedCursor + " Remember it as an open fold + let s:foldsOpenedList{s:openFoldListItems} = s:lineStart + let s:openFoldListItems = s:openFoldListItems + 1 + endif + + elseif s:foldingMode == s:MODE_CREATE_FOLDS + " Correct lineStop if needed (the script might have mistaken lines + " beyond the file's scope for trailing empty lines) + if s:lineStop > s:fileLineCount + let s:lineStop = s:fileLineCount + endif + " Create the actual fold! + exec s:lineStart . "," . s:lineStop . "fold" + let s:foldsCreated = s:foldsCreated + 1 + endif +endfunction +" }}} +function! s:FindPureBlockStart(startPattern) " {{{ + " When the startPattern is 'function', this following search will match: + " + " function foo($bar) { function foo($bar) + " { + " + " function foo($bar) function foo($bar1, + " .. { $bar2) + " { + " + "return search(a:startPattern . '.*\%[\n].*{', 'W') + "return search(a:startPattern . '.*\%[\n].*\%[\n].*{', 'bW') + + " This function can match the line its on *again* if the cursor was + " restored.. hence we search twice if needed.. + let currentLine = line('.') + let line = search(a:startPattern . '.*\%[\n].*\%[\n].*{', 'bW') + if currentLine == line + let line = search(a:startPattern . '.*\%[\n].*\%[\n].*{', 'bW') + endif + return line +endfunction +" }}} +function! s:FindPatternStart(startPattern) " {{{ + " This function can match the line its on *again* if the cursor was + " restored.. hence we search twice if needed.. + let currentLine = line('.') + let line = search(a:startPattern, 'bW') + if currentLine == line + let line = search(a:startPattern, 'bW') + endif + return line +endfunction +" }}} +function! s:FindOptionalPHPDocComment() " {{{ + " Is searching for PHPDoc disabled? + if s:currentPhpDocMode == s:FOLD_WITHOUT_PHPDOC + " .. Return the original Fold's start + return s:lineStart + endif + + " Skipover 'empty' lines in search for PhpDoc + let s:counter = 0 + let s:currentLine = s:lineStart - 1 + while s:counter < s:searchPhpDocLineCount + let line = getline(s:currentLine) + if (matchstr(line, '^\s*$') == line) + let s:currentLine = s:currentLine - 1 + endif + let s:counter = s:counter + 1 + endwhile + + " Is there a closing C style */ on the above line? + let checkLine = s:currentLine + if strridx(getline(checkLine), "\*\/") != -1 + " Then search for the matching C style /* opener + while 1 + if strridx(getline(checkLine), "\/\*") != -1 + " Only continue adjusting the Fold's start if it really is PHPdoc.. + " (which is characterized by a double asterisk, like /**) + if strridx(getline(checkLine), "\/\*\*") != -1 + " Also only continue adjusting if the PHPdoc opener does + " not contain a '/**#@+'. Those type of comments are + " supposed to match with a #@- .. + if strridx(getline(checkLine), '#@+') == -1 + " .. Return this as the Fold's start + return checkLine + else + break + endif + else + break + endif + endif + let checkLine = checkLine - 1 + endwhile + endif + " .. Return the original Fold's start + return s:lineStart +endfunction +" }}} +function! s:FindPureBlockEnd(startPair, endPair, searchStartPairFirst, ...) " {{{ + " Place Cursor on the opening pair/brace? + if a:searchStartPairFirst == s:SEARCH_PAIR_START_FIRST + let line = search(a:startPair, 'W') + endif + + " Search for the entangled closing brace + " call cursor(line, 1) " set the cursor to the start of the lnum line + if s:extensiveBracketChecking == s:TRUE + let line = searchpair(a:startPair, a:startPair, a:endPair, 'W', 'SkipMatch()') + else + let line = searchpair(a:startPair, a:startPair, a:endPair, 'W') + endif + if line == 0 + let line = search(a:endPair, 'W') + endif + if line == 0 + " Return error + return 0 + endif + + " If the fold exceeds more than one line, and searching for empty lines is + " not disabled.. + let foldExceedsOneLine = line - s:lineStart >= 1 + if a:0 == 1 + let emptyLinesNotDisabled = a:1 + else + let emptyLinesNotDisabled = s:TRUE + endif + if foldExceedsOneLine && emptyLinesNotDisabled + " Then be greedy with extra 'trailing' empty line(s) + let s:counter = 0 + while s:counter < s:searchEmptyLinesPostfixing + let linestr = getline(line + 1) + if (matchstr(linestr, '^\s*$') == linestr) + let line = line + 1 + endif + let s:counter = s:counter + 1 + endwhile + endif + + return line +endfunction +" }}} +function! s:FindPatternEnd(endPattern) " {{{ + let line = search(a:endPattern, 'W') + + " If the fold exceeds more than one line + if line - s:lineStart >= 1 + " Then be greedy with extra 'trailing' empty line(s) + let s:counter = 0 + while s:counter < s:searchEmptyLinesPostfixing + let linestr = getline(line + 1) + if (matchstr(linestr, '^\s*$') == linestr) + let line = line + 1 + endif + let s:counter = s:counter + 1 + endwhile + endif + + return line +endfunction +" }}} + +function! PHPFoldText() " {{{ + let currentLine = v:foldstart + let lines = (v:foldend - v:foldstart + 1) + let lineString = getline(currentLine) + " See if we folded a marker + if strridx(lineString, "{{{") != -1 " }}} + " Is there text after the fold opener? + if (matchstr(lineString, '^.*{{{..*$') == lineString) " }}} + " Then only show that text + let lineString = substitute(lineString, '^.*{{{', '', 'g') " }}} + " There is text before the fold opener + else + " Try to strip away the remainder + let lineString = substitute(lineString, '\s*{{{.*$', '', 'g') " }}} + endif + " See if we folded a DocBlock + elseif strridx(lineString, '#@+') != -1 + " Is there text after the #@+ piece? + if (matchstr(lineString, '^.*#@+..*$') == lineString) + " Then show that text + let lineString = substitute(lineString, '^.*#@+', '', 'g') . ' ' . g:phpDocBlockIncludedPostfix + " There is nothing? + else + " Use the next line.. + let lineString = getline(currentLine + 1) . ' ' . g:phpDocBlockIncludedPostfix + endif + " See if we folded an API comment block + elseif strridx(lineString, "\/\*\*") != -1 + " (I can't get search() or searchpair() to work.., therefore the + " following loop) + let s:state = 0 + while currentLine < v:foldend + let line = getline(currentLine) + if s:state == 0 && strridx(line, "\*\/") != -1 + " Found the end, now we need to find the first not-empty line + let s:state = 1 + elseif s:state == 1 && (matchstr(line, '^\s*$') != line) + " Found the line to display in fold! + break + endif + let currentLine = currentLine + 1 + endwhile + let lineString = getline(currentLine) + endif + + " Some common replaces... + " if currentLine != v:foldend + let lineString = substitute(lineString, '/\*\|\*/\d\=', '', 'g') + let lineString = substitute(lineString, '^\s*\*\?\s*', '', 'g') + let lineString = substitute(lineString, '{$', '', 'g') + let lineString = substitute(lineString, '($', '(..);', 'g') + " endif + + " Emulates printf("%3d", lines).. + if lines < 10 + let lines = " " . lines + elseif lines < 100 + let lines = " " . lines + endif + + " Append an (a) if there is PhpDoc in the fold (a for API) + if currentLine != v:foldstart + let lineString = lineString . " " . g:phpDocIncludedPostfix . " " + endif + + " Return the foldtext + return "+--".lines." lines: " . lineString +endfunction +" }}} +function! SkipMatch() " {{{ +" This function is modified from a PHP indent file by John Wellesz +" found here: http://www.vim.org/scripts/script.php?script_id=1120 + if (!s:synIDattr_exists) + return 0 + endif + let synname = synIDattr(synID(line("."), col("."), 0), "name") + if synname == "phpParent" || synname == "javaScriptBraces" || synname == "phpComment" + return 0 + else + return 1 + endif +endfun +" }}} + +" Check filetype == php before automatically creating (fast) folds {{{1 +function! s:CheckAutocmdEnablePHPFold() + if &filetype == "php" && ! g:DisableAutoPHPFolding + call s:EnableFastPHPFolds() + endif +endfunction +" }}} + +" Call CheckAutocmdEnablePHPFold on BufReadPost {{{1 +augroup SetPhpFolds + au! + au BufReadPost * call s:CheckAutocmdEnablePHPFold() +augroup END +" }}} + +" vim:ft=vim:foldmethod=marker:nowrap:tabstop=4:shiftwidth=4 diff --git a/vim/bundle/snipmate.vim/README.markdown b/vim/bundle/snipmate.vim/README.markdown new file mode 100644 index 0000000..160f807 --- /dev/null +++ b/vim/bundle/snipmate.vim/README.markdown @@ -0,0 +1,5 @@ +Quickly install with: + + git clone git://github.com/msanders/snipmate.vim.git + cd snipmate.vim + cp -R * ~/.vim diff --git a/vim/bundle/snipmate.vim/after/plugin/snipMate.vim b/vim/bundle/snipmate.vim/after/plugin/snipMate.vim new file mode 100644 index 0000000..bdbe199 --- /dev/null +++ b/vim/bundle/snipmate.vim/after/plugin/snipMate.vim @@ -0,0 +1,40 @@ +" These are the mappings for snipMate.vim. Putting it here ensures that it +" will be mapped after other plugins such as supertab.vim. +if !exists('loaded_snips') || exists('s:did_snips_mappings') + finish +endif +let s:did_snips_mappings = 1 + +" This is put here in the 'after' directory in order for snipMate to override +" other plugin mappings (e.g., supertab). +" +" You can safely adjust these mappings to your preferences (as explained in +" :help snipMate-remap). +ino =TriggerSnippet() +snor i=TriggerSnippet() +ino =BackwardsSnippet() +snor i=BackwardsSnippet() +ino =ShowAvailableSnips() + +" The default mappings for these are annoying & sometimes break snipMate. +" You can change them back if you want, I've put them here for convenience. +snor b +snor a +snor bi +snor ' b' +snor ` b` +snor % b% +snor U bU +snor ^ b^ +snor \ b\ +snor b + +" By default load snippets in snippets_dir +if empty(snippets_dir) + finish +endif + +call GetSnippets(snippets_dir, '_') " Get global snippets + +au FileType * if &ft != 'help' | call GetSnippets(snippets_dir, &ft) | endif +" vim:noet:sw=4:ts=4:ft=vim diff --git a/vim/bundle/snipmate.vim/autoload/snipMate.vim b/vim/bundle/snipmate.vim/autoload/snipMate.vim new file mode 100644 index 0000000..0ad5a58 --- /dev/null +++ b/vim/bundle/snipmate.vim/autoload/snipMate.vim @@ -0,0 +1,435 @@ +fun! Filename(...) + let filename = expand('%:t:r') + if filename == '' | return a:0 == 2 ? a:2 : '' | endif + return !a:0 || a:1 == '' ? filename : substitute(a:1, '$1', filename, 'g') +endf + +fun s:RemoveSnippet() + unl! g:snipPos s:curPos s:snipLen s:endCol s:endLine s:prevLen + \ s:lastBuf s:oldWord + if exists('s:update') + unl s:startCol s:origWordLen s:update + if exists('s:oldVars') | unl s:oldVars s:oldEndCol | endif + endif + aug! snipMateAutocmds +endf + +fun snipMate#expandSnip(snip, col) + let lnum = line('.') | let col = a:col + + let snippet = s:ProcessSnippet(a:snip) + " Avoid error if eval evaluates to nothing + if snippet == '' | return '' | endif + + " Expand snippet onto current position with the tab stops removed + let snipLines = split(substitute(snippet, '$\d\+\|${\d\+.\{-}}', '', 'g'), "\n", 1) + + let line = getline(lnum) + let afterCursor = strpart(line, col - 1) + " Keep text after the cursor + if afterCursor != "\t" && afterCursor != ' ' + let line = strpart(line, 0, col - 1) + let snipLines[-1] .= afterCursor + else + let afterCursor = '' + " For some reason the cursor needs to move one right after this + if line != '' && col == 1 && &ve != 'all' && &ve != 'onemore' + let col += 1 + endif + endif + + call setline(lnum, line.snipLines[0]) + + " Autoindent snippet according to previous indentation + let indent = matchend(line, '^.\{-}\ze\(\S\|$\)') + 1 + call append(lnum, map(snipLines[1:], "'".strpart(line, 0, indent - 1)."'.v:val")) + + " Open any folds snippet expands into + if &fen | sil! exe lnum.','.(lnum + len(snipLines) - 1).'foldopen' | endif + + let [g:snipPos, s:snipLen] = s:BuildTabStops(snippet, lnum, col - indent, indent) + + if s:snipLen + aug snipMateAutocmds + au CursorMovedI * call s:UpdateChangedSnip(0) + au InsertEnter * call s:UpdateChangedSnip(1) + aug END + let s:lastBuf = bufnr(0) " Only expand snippet while in current buffer + let s:curPos = 0 + let s:endCol = g:snipPos[s:curPos][1] + let s:endLine = g:snipPos[s:curPos][0] + + call cursor(g:snipPos[s:curPos][0], g:snipPos[s:curPos][1]) + let s:prevLen = [line('$'), col('$')] + if g:snipPos[s:curPos][2] != -1 | return s:SelectWord() | endif + else + unl g:snipPos s:snipLen + " Place cursor at end of snippet if no tab stop is given + let newlines = len(snipLines) - 1 + call cursor(lnum + newlines, indent + len(snipLines[-1]) - len(afterCursor) + \ + (newlines ? 0: col - 1)) + endif + return '' +endf + +" Prepare snippet to be processed by s:BuildTabStops +fun s:ProcessSnippet(snip) + let snippet = a:snip + " Evaluate eval (`...`) expressions. + " Backquotes prefixed with a backslash "\" are ignored. + " Using a loop here instead of a regex fixes a bug with nested "\=". + if stridx(snippet, '`') != -1 + while match(snippet, '\(^\|[^\\]\)`.\{-}[^\\]`') != -1 + let snippet = substitute(snippet, '\(^\|[^\\]\)\zs`.\{-}[^\\]`\ze', + \ substitute(eval(matchstr(snippet, '\(^\|[^\\]\)`\zs.\{-}[^\\]\ze`')), + \ "\n\\%$", '', ''), '') + endw + let snippet = substitute(snippet, "\r", "\n", 'g') + let snippet = substitute(snippet, '\\`', '`', 'g') + endif + + " Place all text after a colon in a tab stop after the tab stop + " (e.g. "${#:foo}" becomes "${:foo}foo"). + " This helps tell the position of the tab stops later. + let snippet = substitute(snippet, '${\d\+:\(.\{-}\)}', '&\1', 'g') + + " Update the a:snip so that all the $# become the text after + " the colon in their associated ${#}. + " (e.g. "${1:foo}" turns all "$1"'s into "foo") + let i = 1 + while stridx(snippet, '${'.i) != -1 + let s = matchstr(snippet, '${'.i.':\zs.\{-}\ze}') + if s != '' + let snippet = substitute(snippet, '$'.i, s.'&', 'g') + endif + let i += 1 + endw + + if &et " Expand tabs to spaces if 'expandtab' is set. + return substitute(snippet, '\t', repeat(' ', &sts ? &sts : &sw), 'g') + endif + return snippet +endf + +" Counts occurences of haystack in needle +fun s:Count(haystack, needle) + let counter = 0 + let index = stridx(a:haystack, a:needle) + while index != -1 + let index = stridx(a:haystack, a:needle, index+1) + let counter += 1 + endw + return counter +endf + +" Builds a list of a list of each tab stop in the snippet containing: +" 1.) The tab stop's line number. +" 2.) The tab stop's column number +" (by getting the length of the string between the last "\n" and the +" tab stop). +" 3.) The length of the text after the colon for the current tab stop +" (e.g. "${1:foo}" would return 3). If there is no text, -1 is returned. +" 4.) If the "${#:}" construct is given, another list containing all +" the matches of "$#", to be replaced with the placeholder. This list is +" composed the same way as the parent; the first item is the line number, +" and the second is the column. +fun s:BuildTabStops(snip, lnum, col, indent) + let snipPos = [] + let i = 1 + let withoutVars = substitute(a:snip, '$\d\+', '', 'g') + while stridx(a:snip, '${'.i) != -1 + let beforeTabStop = matchstr(withoutVars, '^.*\ze${'.i.'\D') + let withoutOthers = substitute(withoutVars, '${\('.i.'\D\)\@!\d\+.\{-}}', '', 'g') + + let j = i - 1 + call add(snipPos, [0, 0, -1]) + let snipPos[j][0] = a:lnum + s:Count(beforeTabStop, "\n") + let snipPos[j][1] = a:indent + len(matchstr(withoutOthers, '.*\(\n\|^\)\zs.*\ze${'.i.'\D')) + if snipPos[j][0] == a:lnum | let snipPos[j][1] += a:col | endif + + " Get all $# matches in another list, if ${#:name} is given + if stridx(withoutVars, '${'.i.':') != -1 + let snipPos[j][2] = len(matchstr(withoutVars, '${'.i.':\zs.\{-}\ze}')) + let dots = repeat('.', snipPos[j][2]) + call add(snipPos[j], []) + let withoutOthers = substitute(a:snip, '${\d\+.\{-}}\|$'.i.'\@!\d\+', '', 'g') + while match(withoutOthers, '$'.i.'\(\D\|$\)') != -1 + let beforeMark = matchstr(withoutOthers, '^.\{-}\ze'.dots.'$'.i.'\(\D\|$\)') + call add(snipPos[j][3], [0, 0]) + let snipPos[j][3][-1][0] = a:lnum + s:Count(beforeMark, "\n") + let snipPos[j][3][-1][1] = a:indent + (snipPos[j][3][-1][0] > a:lnum + \ ? len(matchstr(beforeMark, '.*\n\zs.*')) + \ : a:col + len(beforeMark)) + let withoutOthers = substitute(withoutOthers, '$'.i.'\ze\(\D\|$\)', '', '') + endw + endif + let i += 1 + endw + return [snipPos, i - 1] +endf + +fun snipMate#jumpTabStop(backwards) + let leftPlaceholder = exists('s:origWordLen') + \ && s:origWordLen != g:snipPos[s:curPos][2] + if leftPlaceholder && exists('s:oldEndCol') + let startPlaceholder = s:oldEndCol + 1 + endif + + if exists('s:update') + call s:UpdatePlaceholderTabStops() + else + call s:UpdateTabStops() + endif + + " Don't reselect placeholder if it has been modified + if leftPlaceholder && g:snipPos[s:curPos][2] != -1 + if exists('startPlaceholder') + let g:snipPos[s:curPos][1] = startPlaceholder + else + let g:snipPos[s:curPos][1] = col('.') + let g:snipPos[s:curPos][2] = 0 + endif + endif + + let s:curPos += a:backwards ? -1 : 1 + " Loop over the snippet when going backwards from the beginning + if s:curPos < 0 | let s:curPos = s:snipLen - 1 | endif + + if s:curPos == s:snipLen + let sMode = s:endCol == g:snipPos[s:curPos-1][1]+g:snipPos[s:curPos-1][2] + call s:RemoveSnippet() + return sMode ? "\" : TriggerSnippet() + endif + + call cursor(g:snipPos[s:curPos][0], g:snipPos[s:curPos][1]) + + let s:endLine = g:snipPos[s:curPos][0] + let s:endCol = g:snipPos[s:curPos][1] + let s:prevLen = [line('$'), col('$')] + + return g:snipPos[s:curPos][2] == -1 ? '' : s:SelectWord() +endf + +fun s:UpdatePlaceholderTabStops() + let changeLen = s:origWordLen - g:snipPos[s:curPos][2] + unl s:startCol s:origWordLen s:update + if !exists('s:oldVars') | return | endif + " Update tab stops in snippet if text has been added via "$#" + " (e.g., in "${1:foo}bar$1${2}"). + if changeLen != 0 + let curLine = line('.') + + for pos in g:snipPos + if pos == g:snipPos[s:curPos] | continue | endif + let changed = pos[0] == curLine && pos[1] > s:oldEndCol + let changedVars = 0 + let endPlaceholder = pos[2] - 1 + pos[1] + " Subtract changeLen from each tab stop that was after any of + " the current tab stop's placeholders. + for [lnum, col] in s:oldVars + if lnum > pos[0] | break | endif + if pos[0] == lnum + if pos[1] > col || (pos[2] == -1 && pos[1] == col) + let changed += 1 + elseif col < endPlaceholder + let changedVars += 1 + endif + endif + endfor + let pos[1] -= changeLen * changed + let pos[2] -= changeLen * changedVars " Parse variables within placeholders + " e.g., "${1:foo} ${2:$1bar}" + + if pos[2] == -1 | continue | endif + " Do the same to any placeholders in the other tab stops. + for nPos in pos[3] + let changed = nPos[0] == curLine && nPos[1] > s:oldEndCol + for [lnum, col] in s:oldVars + if lnum > nPos[0] | break | endif + if nPos[0] == lnum && nPos[1] > col + let changed += 1 + endif + endfor + let nPos[1] -= changeLen * changed + endfor + endfor + endif + unl s:endCol s:oldVars s:oldEndCol +endf + +fun s:UpdateTabStops() + let changeLine = s:endLine - g:snipPos[s:curPos][0] + let changeCol = s:endCol - g:snipPos[s:curPos][1] + if exists('s:origWordLen') + let changeCol -= s:origWordLen + unl s:origWordLen + endif + let lnum = g:snipPos[s:curPos][0] + let col = g:snipPos[s:curPos][1] + " Update the line number of all proceeding tab stops if has + " been inserted. + if changeLine != 0 + let changeLine -= 1 + for pos in g:snipPos + if pos[0] >= lnum + if pos[0] == lnum | let pos[1] += changeCol | endif + let pos[0] += changeLine + endif + if pos[2] == -1 | continue | endif + for nPos in pos[3] + if nPos[0] >= lnum + if nPos[0] == lnum | let nPos[1] += changeCol | endif + let nPos[0] += changeLine + endif + endfor + endfor + elseif changeCol != 0 + " Update the column of all proceeding tab stops if text has + " been inserted/deleted in the current line. + for pos in g:snipPos + if pos[1] >= col && pos[0] == lnum + let pos[1] += changeCol + endif + if pos[2] == -1 | continue | endif + for nPos in pos[3] + if nPos[0] > lnum | break | endif + if nPos[0] == lnum && nPos[1] >= col + let nPos[1] += changeCol + endif + endfor + endfor + endif +endf + +fun s:SelectWord() + let s:origWordLen = g:snipPos[s:curPos][2] + let s:oldWord = strpart(getline('.'), g:snipPos[s:curPos][1] - 1, + \ s:origWordLen) + let s:prevLen[1] -= s:origWordLen + if !empty(g:snipPos[s:curPos][3]) + let s:update = 1 + let s:endCol = -1 + let s:startCol = g:snipPos[s:curPos][1] - 1 + endif + if !s:origWordLen | return '' | endif + let l = col('.') != 1 ? 'l' : '' + if &sel == 'exclusive' + return "\".l.'v'.s:origWordLen."l\" + endif + return s:origWordLen == 1 ? "\".l.'gh' + \ : "\".l.'v'.(s:origWordLen - 1)."l\" +endf + +" This updates the snippet as you type when text needs to be inserted +" into multiple places (e.g. in "${1:default text}foo$1bar$1", +" "default text" would be highlighted, and if the user types something, +" UpdateChangedSnip() would be called so that the text after "foo" & "bar" +" are updated accordingly) +" +" It also automatically quits the snippet if the cursor is moved out of it +" while in insert mode. +fun s:UpdateChangedSnip(entering) + if exists('g:snipPos') && bufnr(0) != s:lastBuf + call s:RemoveSnippet() + elseif exists('s:update') " If modifying a placeholder + if !exists('s:oldVars') && s:curPos + 1 < s:snipLen + " Save the old snippet & word length before it's updated + " s:startCol must be saved too, in case text is added + " before the snippet (e.g. in "foo$1${2}bar${1:foo}"). + let s:oldEndCol = s:startCol + let s:oldVars = deepcopy(g:snipPos[s:curPos][3]) + endif + let col = col('.') - 1 + + if s:endCol != -1 + let changeLen = col('$') - s:prevLen[1] + let s:endCol += changeLen + else " When being updated the first time, after leaving select mode + if a:entering | return | endif + let s:endCol = col - 1 + endif + + " If the cursor moves outside the snippet, quit it + if line('.') != g:snipPos[s:curPos][0] || col < s:startCol || + \ col - 1 > s:endCol + unl! s:startCol s:origWordLen s:oldVars s:update + return s:RemoveSnippet() + endif + + call s:UpdateVars() + let s:prevLen[1] = col('$') + elseif exists('g:snipPos') + if !a:entering && g:snipPos[s:curPos][2] != -1 + let g:snipPos[s:curPos][2] = -2 + endif + + let col = col('.') + let lnum = line('.') + let changeLine = line('$') - s:prevLen[0] + + if lnum == s:endLine + let s:endCol += col('$') - s:prevLen[1] + let s:prevLen = [line('$'), col('$')] + endif + if changeLine != 0 + let s:endLine += changeLine + let s:endCol = col + endif + + " Delete snippet if cursor moves out of it in insert mode + if (lnum == s:endLine && (col > s:endCol || col < g:snipPos[s:curPos][1])) + \ || lnum > s:endLine || lnum < g:snipPos[s:curPos][0] + call s:RemoveSnippet() + endif + endif +endf + +" This updates the variables in a snippet when a placeholder has been edited. +" (e.g., each "$1" in "${1:foo} $1bar $1bar") +fun s:UpdateVars() + let newWordLen = s:endCol - s:startCol + 1 + let newWord = strpart(getline('.'), s:startCol, newWordLen) + if newWord == s:oldWord || empty(g:snipPos[s:curPos][3]) + return + endif + + let changeLen = g:snipPos[s:curPos][2] - newWordLen + let curLine = line('.') + let startCol = col('.') + let oldStartSnip = s:startCol + let updateTabStops = changeLen != 0 + let i = 0 + + for [lnum, col] in g:snipPos[s:curPos][3] + if updateTabStops + let start = s:startCol + if lnum == curLine && col <= start + let s:startCol -= changeLen + let s:endCol -= changeLen + endif + for nPos in g:snipPos[s:curPos][3][(i):] + " This list is in ascending order, so quit if we've gone too far. + if nPos[0] > lnum | break | endif + if nPos[0] == lnum && nPos[1] > col + let nPos[1] -= changeLen + endif + endfor + if lnum == curLine && col > start + let col -= changeLen + let g:snipPos[s:curPos][3][i][1] = col + endif + let i += 1 + endif + + " "Very nomagic" is used here to allow special characters. + call setline(lnum, substitute(getline(lnum), '\%'.col.'c\V'. + \ escape(s:oldWord, '\'), escape(newWord, '\&'), '')) + endfor + if oldStartSnip != s:startCol + call cursor(0, startCol + s:startCol - oldStartSnip) + endif + + let s:oldWord = newWord + let g:snipPos[s:curPos][2] = newWordLen +endf +" vim:noet:sw=4:ts=4:ft=vim diff --git a/vim/bundle/snipmate.vim/doc/snipMate.txt b/vim/bundle/snipmate.vim/doc/snipMate.txt new file mode 100644 index 0000000..521235d --- /dev/null +++ b/vim/bundle/snipmate.vim/doc/snipMate.txt @@ -0,0 +1,322 @@ +*snipMate.txt* Plugin for using TextMate-style snippets in Vim. + +snipMate *snippet* *snippets* *snipMate* +Last Change: December 27, 2009 + +|snipMate-description| Description +|snipMate-syntax| Snippet syntax +|snipMate-usage| Usage +|snipMate-settings| Settings +|snipMate-features| Features +|snipMate-disadvantages| Disadvantages to TextMate +|snipMate-contact| Contact +|snipMate-license| License + +For Vim version 7.0 or later. +This plugin only works if 'compatible' is not set. +{Vi does not have any of these features.} + +============================================================================== +DESCRIPTION *snipMate-description* + +snipMate.vim implements some of TextMate's snippets features in Vim. A +snippet is a piece of often-typed text that you can insert into your +document using a trigger word followed by a . + +For instance, in a C file using the default installation of snipMate.vim, if +you type "for" in insert mode, it will expand a typical for loop in C: > + + for (i = 0; i < count; i++) { + + } + + +To go to the next item in the loop, simply over to it; if there is +repeated code, such as the "i" variable in this example, you can simply +start typing once it's highlighted and all the matches specified in the +snippet will be updated. To go in reverse, use . + +============================================================================== +SYNTAX *snippet-syntax* + +Snippets can be defined in two ways. They can be in their own file, named +after their trigger in 'snippets//.snippet', or they can be +defined together in a 'snippets/.snippets' file. Note that dotted +'filetype' syntax is supported -- e.g., you can use > + + :set ft=html.eruby + +to activate snippets for both HTML and eRuby for the current file. + +The syntax for snippets in *.snippets files is the following: > + + snippet trigger + expanded text + more expanded text + +Note that the first hard tab after the snippet trigger is required, and not +expanded in the actual snippet. The syntax for *.snippet files is the same, +only without the trigger declaration and starting indentation. + +Also note that snippets must be defined using hard tabs. They can be expanded +to spaces later if desired (see |snipMate-indenting|). + +"#" is used as a line-comment character in *.snippets files; however, they can +only be used outside of a snippet declaration. E.g.: > + + # this is a correct comment + snippet trigger + expanded text + snippet another_trigger + # this isn't a comment! + expanded text +< +This should hopefully be obvious with the included syntax highlighting. + + *snipMate-${#}* +Tab stops ~ + +By default, the cursor is placed at the end of a snippet. To specify where the +cursor is to be placed next, use "${#}", where the # is the number of the tab +stop. E.g., to place the cursor first on the id of a
tag, and then allow +the user to press to go to the middle of it: + > + snippet div +
+ ${2} +
+< + *snipMate-placeholders* *snipMate-${#:}* *snipMate-$#* +Placeholders ~ + +Placeholder text can be supplied using "${#:text}", where # is the number of +the tab stop. This text then can be copied throughout the snippet using "$#", +given # is the same number as used before. So, to make a C for loop: > + + snippet for + for (${2:i}; $2 < ${1:count}; $1++) { + ${4} + } + +This will cause "count" to first be selected and change if the user starts +typing. When is pressed, the "i" in ${2}'s position will be selected; +all $2 variables will default to "i" and automatically be updated if the user +starts typing. +NOTE: "$#" syntax is used only for variables, not for tab stops as in TextMate. + +Variables within variables are also possible. For instance: > + + snippet opt + + +Will, as usual, cause "option" to first be selected and update all the $1 +variables if the user starts typing. Since one of these variables is inside of +${2}, this text will then be used as a placeholder for the next tab stop, +allowing the user to change it if he wishes. + +To copy a value throughout a snippet without supplying default text, simply +use the "${#:}" construct without the text; e.g.: > + + snippet foo + ${1:}bar$1 +< *snipMate-commands* +Interpolated Vim Script ~ + +Snippets can also contain Vim script commands that are executed (via |eval()|) +when the snippet is inserted. Commands are given inside backticks (`...`); for +TextMates's functionality, use the |system()| function. E.g.: > + + snippet date + `system("date +%Y-%m-%d")` + +will insert the current date, assuming you are on a Unix system. Note that you +can also (and should) use |strftime()| for this example. + +Filename([{expr}] [, {defaultText}]) *snipMate-filename* *Filename()* + +Since the current filename is used often in snippets, a default function +has been defined for it in snipMate.vim, appropriately called Filename(). + +With no arguments, the default filename without an extension is returned; +the first argument specifies what to place before or after the filename, +and the second argument supplies the default text to be used if the file +has not been named. "$1" in the first argument is replaced with the filename; +if you only want the filename to be returned, the first argument can be left +blank. Examples: > + + snippet filename + `Filename()` + snippet filename_with_default + `Filename('', 'name')` + snippet filename_foo + `filename('$1_foo')` + +The first example returns the filename if it the file has been named, and an +empty string if it hasn't. The second returns the filename if it's been named, +and "name" if it hasn't. The third returns the filename followed by "_foo" if +it has been named, and an empty string if it hasn't. + + *multi_snip* +To specify that a snippet can have multiple matches in a *.snippets file, use +this syntax: > + + snippet trigger A description of snippet #1 + expand this text + snippet trigger A description of snippet #2 + expand THIS text! + +In this example, when "trigger" is typed, a numbered menu containing all +of the descriptions of the "trigger" will be shown; when the user presses the +corresponding number, that snippet will then be expanded. + +To create a snippet with multiple matches using *.snippet files, +simply place all the snippets in a subdirectory with the trigger name: +'snippets///.snippet'. + +============================================================================== +USAGE *snipMate-usage* + + *'snippets'* *g:snippets_dir* +Snippets are by default looked for any 'snippets' directory in your +'runtimepath'. Typically, it is located at '~/.vim/snippets/' on *nix or +'$HOME\vimfiles\snippets\' on Windows. To change that location or add another +one, change the g:snippets_dir variable in your |.vimrc| to your preferred +directory, or use the |ExtractSnips()|function. This will be used by the +|globpath()| function, and so accepts the same syntax as it (e.g., +comma-separated paths). + +ExtractSnipsFile({directory}, {filetype}) *ExtractSnipsFile()* *.snippets* + +ExtractSnipsFile() extracts the specified *.snippets file for the given +filetype. A .snippets file contains multiple snippet declarations for the +filetype. It is further explained above, in |snippet-syntax|. + +ExtractSnips({directory}, {filetype}) *ExtractSnips()* *.snippet* + +ExtractSnips() extracts *.snippet files from the specified directory and +defines them as snippets for the given filetype. The directory tree should +look like this: 'snippets//.snippet'. If the snippet has +multiple matches, it should look like this: +'snippets///.snippet' (see |multi_snip|). + +ResetAllSnippets() *ResetAllSnippets()* +ResetAllSnippets() removes all snippets from memory. This is useful to put at +the top of a snippet setup file for if you would like to |:source| it multiple +times. + +ResetSnippets({filetype}) *ResetSnippets()* +ResetSnippets() removes all snippets from memory for the given filetype. + +ReloadAllSnippets() *ReloadAllSnippets()* +ReloadAllSnippets() reloads all snippets for all filetypes. This is useful for +testing and debugging. + +ReloadSnippets({filetype}) *ReloadSnippets()* +ReloadSnippets() reloads all snippets for the given filetype. + + *list-snippets* *i_CTRL-R_* +If you would like to see what snippets are available, simply type +in the current buffer to show a list via |popupmenu-completion|. + +============================================================================== +SETTINGS *snipMate-settings* *g:snips_author* + +The g:snips_author string (similar to $TM_FULLNAME in TextMate) should be set +to your name; it can then be used in snippets to automatically add it. E.g.: > + + let g:snips_author = 'Hubert Farnsworth' + snippet name + `g:snips_author` +< + *snipMate-expandtab* *snipMate-indenting* +If you would like your snippets to be expanded using spaces instead of tabs, +just enable 'expandtab' and set 'softtabstop' to your preferred amount of +spaces. If 'softtabstop' is not set, 'shiftwidth' is used instead. + + *snipMate-remap* +snipMate does not come with a setting to customize the trigger key, but you +can remap it easily in the two lines it's defined in the 'after' directory +under 'plugin/snipMate.vim'. For instance, to change the trigger key +to CTRL-J, just change this: > + + ino =TriggerSnippet() + snor i=TriggerSnippet() + +to this: > + ino =TriggerSnippet() + snor i=TriggerSnippet() + +============================================================================== +FEATURES *snipMate-features* + +snipMate.vim has the following features among others: + - The syntax of snippets is very similar to TextMate's, allowing + easy conversion. + - The position of the snippet is kept transparently (i.e. it does not use + markers/placeholders written to the buffer), which allows you to escape + out of an incomplete snippet, something particularly useful in Vim. + - Variables in snippets are updated as-you-type. + - Snippets can have multiple matches. + - Snippets can be out of order. For instance, in a do...while loop, the + condition can be added before the code. + - [New] File-based snippets are supported. + - [New] Triggers after non-word delimiters are expanded, e.g. "foo" + in "bar.foo". + - [New] can now be used to jump tab stops in reverse order. + +============================================================================== +DISADVANTAGES *snipMate-disadvantages* + +snipMate.vim currently has the following disadvantages to TextMate's snippets: + - There is no $0; the order of tab stops must be explicitly stated. + - Placeholders within placeholders are not possible. E.g.: > + + '${3}
' +< + In TextMate this would first highlight ' id="some_id"', and if + you hit delete it would automatically skip ${2} and go to ${3} + on the next , but if you didn't delete it it would highlight + "some_id" first. You cannot do this in snipMate.vim. + - Regex cannot be performed on variables, such as "${1/.*/\U&}" + - Placeholders cannot span multiple lines. + - Activating snippets in different scopes of the same file is + not possible. + +Perhaps some of these features will be added in a later release. + +============================================================================== +CONTACT *snipMate-contact* *snipMate-author* + +To contact the author (Michael Sanders), please email: + msanders42+snipmate gmail com + +I greatly appreciate any suggestions or improvements offered for the script. + +============================================================================== +LICENSE *snipMate-license* + +snipMate is released under the MIT license: + +Copyright 2009-2010 Michael Sanders. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +The software is provided "as is", without warranty of any kind, express or +implied, including but not limited to the warranties of merchantability, +fitness for a particular purpose and noninfringement. In no event shall the +authors or copyright holders be liable for any claim, damages or other +liability, whether in an action of contract, tort or otherwise, arising from, +out of or in connection with the software or the use or other dealings in the +software. + +============================================================================== + +vim:tw=78:ts=8:ft=help:norl: diff --git a/vim/bundle/snipmate.vim/doc/tags b/vim/bundle/snipmate.vim/doc/tags new file mode 100644 index 0000000..b86c27f --- /dev/null +++ b/vim/bundle/snipmate.vim/doc/tags @@ -0,0 +1,37 @@ +'snippets' snipMate.txt /*'snippets'* +.snippet snipMate.txt /*.snippet* +.snippets snipMate.txt /*.snippets* +ExtractSnips() snipMate.txt /*ExtractSnips()* +ExtractSnipsFile() snipMate.txt /*ExtractSnipsFile()* +Filename() snipMate.txt /*Filename()* +ReloadAllSnippets() snipMate.txt /*ReloadAllSnippets()* +ReloadSnippets() snipMate.txt /*ReloadSnippets()* +ResetAllSnippets() snipMate.txt /*ResetAllSnippets()* +ResetSnippets() snipMate.txt /*ResetSnippets()* +g:snippets_dir snipMate.txt /*g:snippets_dir* +g:snips_author snipMate.txt /*g:snips_author* +i_CTRL-R_ snipMate.txt /*i_CTRL-R_* +list-snippets snipMate.txt /*list-snippets* +multi_snip snipMate.txt /*multi_snip* +snipMate snipMate.txt /*snipMate* +snipMate-$# snipMate.txt /*snipMate-$#* +snipMate-${#:} snipMate.txt /*snipMate-${#:}* +snipMate-${#} snipMate.txt /*snipMate-${#}* +snipMate-author snipMate.txt /*snipMate-author* +snipMate-commands snipMate.txt /*snipMate-commands* +snipMate-contact snipMate.txt /*snipMate-contact* +snipMate-description snipMate.txt /*snipMate-description* +snipMate-disadvantages snipMate.txt /*snipMate-disadvantages* +snipMate-expandtab snipMate.txt /*snipMate-expandtab* +snipMate-features snipMate.txt /*snipMate-features* +snipMate-filename snipMate.txt /*snipMate-filename* +snipMate-indenting snipMate.txt /*snipMate-indenting* +snipMate-license snipMate.txt /*snipMate-license* +snipMate-placeholders snipMate.txt /*snipMate-placeholders* +snipMate-remap snipMate.txt /*snipMate-remap* +snipMate-settings snipMate.txt /*snipMate-settings* +snipMate-usage snipMate.txt /*snipMate-usage* +snipMate.txt snipMate.txt /*snipMate.txt* +snippet snipMate.txt /*snippet* +snippet-syntax snipMate.txt /*snippet-syntax* +snippets snipMate.txt /*snippets* diff --git a/vim/bundle/snipmate.vim/ftplugin/html_snip_helper.vim b/vim/bundle/snipmate.vim/ftplugin/html_snip_helper.vim new file mode 100644 index 0000000..2e54570 --- /dev/null +++ b/vim/bundle/snipmate.vim/ftplugin/html_snip_helper.vim @@ -0,0 +1,10 @@ +" Helper function for (x)html snippets +if exists('s:did_snip_helper') || &cp || !exists('loaded_snips') + finish +endif +let s:did_snip_helper = 1 + +" Automatically closes tag if in xhtml +fun! Close() + return stridx(&ft, 'xhtml') == -1 ? '' : ' /' +endf diff --git a/vim/bundle/snipmate.vim/plugin-info.txt b/vim/bundle/snipmate.vim/plugin-info.txt new file mode 100644 index 0000000..0936bc1 --- /dev/null +++ b/vim/bundle/snipmate.vim/plugin-info.txt @@ -0,0 +1,8 @@ +{ + "name" : "snipmate", + "version" : "dev", + "author" : "Michael Sanders ", + "repository" : {"type": "git", "url": "git://github.com/msanders/snipmate.vim.git"}, + "dependencies" : {}, + "description" : "snipMate.vim aims to be a concise vim script that implements some of TextMate's snippets features in Vim." +} diff --git a/vim/bundle/snipmate.vim/plugin/snipMate.vim b/vim/bundle/snipmate.vim/plugin/snipMate.vim new file mode 100644 index 0000000..ef03b12 --- /dev/null +++ b/vim/bundle/snipmate.vim/plugin/snipMate.vim @@ -0,0 +1,271 @@ +" File: snipMate.vim +" Author: Michael Sanders +" Version: 0.84 +" Description: snipMate.vim implements some of TextMate's snippets features in +" Vim. A snippet is a piece of often-typed text that you can +" insert into your document using a trigger word followed by a "". +" +" For more help see snipMate.txt; you can do this by using: +" :helptags ~/.vim/doc +" :h snipMate.txt + +if exists('loaded_snips') || &cp || version < 700 + finish +endif +let loaded_snips = 1 +if !exists('snips_author') | let snips_author = 'Me' | endif + +au BufRead,BufNewFile *.snippets\= set ft=snippet +au FileType snippet setl noet fdm=indent + +let s:snippets = {} | let s:multi_snips = {} + +if !exists('snippets_dir') + let snippets_dir = substitute(globpath(&rtp, 'snippets/'), "\n", ',', 'g') +endif + +fun! MakeSnip(scope, trigger, content, ...) + let multisnip = a:0 && a:1 != '' + let var = multisnip ? 's:multi_snips' : 's:snippets' + if !has_key({var}, a:scope) | let {var}[a:scope] = {} | endif + if !has_key({var}[a:scope], a:trigger) + let {var}[a:scope][a:trigger] = multisnip ? [[a:1, a:content]] : a:content + elseif multisnip | let {var}[a:scope][a:trigger] += [[a:1, a:content]] + else + echom 'Warning in snipMate.vim: Snippet '.a:trigger.' is already defined.' + \ .' See :h multi_snip for help on snippets with multiple matches.' + endif +endf + +fun! ExtractSnips(dir, ft) + for path in split(globpath(a:dir, '*'), "\n") + if isdirectory(path) + let pathname = fnamemodify(path, ':t') + for snipFile in split(globpath(path, '*.snippet'), "\n") + call s:ProcessFile(snipFile, a:ft, pathname) + endfor + elseif fnamemodify(path, ':e') == 'snippet' + call s:ProcessFile(path, a:ft) + endif + endfor +endf + +" Processes a single-snippet file; optionally add the name of the parent +" directory for a snippet with multiple matches. +fun s:ProcessFile(file, ft, ...) + let keyword = fnamemodify(a:file, ':t:r') + if keyword == '' | return | endif + try + let text = join(readfile(a:file), "\n") + catch /E484/ + echom "Error in snipMate.vim: couldn't read file: ".a:file + endtry + return a:0 ? MakeSnip(a:ft, a:1, text, keyword) + \ : MakeSnip(a:ft, keyword, text) +endf + +fun! ExtractSnipsFile(file, ft) + if !filereadable(a:file) | return | endif + let text = readfile(a:file) + let inSnip = 0 + for line in text + ["\n"] + if inSnip && (line[0] == "\t" || line == '') + let content .= strpart(line, 1)."\n" + continue + elseif inSnip + call MakeSnip(a:ft, trigger, content[:-2], name) + let inSnip = 0 + endif + + if line[:6] == 'snippet' + let inSnip = 1 + let trigger = strpart(line, 8) + let name = '' + let space = stridx(trigger, ' ') + 1 + if space " Process multi snip + let name = strpart(trigger, space) + let trigger = strpart(trigger, 0, space - 1) + endif + let content = '' + endif + endfor +endf + +" Reset snippets for filetype. +fun! ResetSnippets(ft) + let ft = a:ft == '' ? '_' : a:ft + for dict in [s:snippets, s:multi_snips, g:did_ft] + if has_key(dict, ft) + unlet dict[ft] + endif + endfor +endf + +" Reset snippets for all filetypes. +fun! ResetAllSnippets() + let s:snippets = {} | let s:multi_snips = {} | let g:did_ft = {} +endf + +" Reload snippets for filetype. +fun! ReloadSnippets(ft) + let ft = a:ft == '' ? '_' : a:ft + call ResetSnippets(ft) + call GetSnippets(g:snippets_dir, ft) +endf + +" Reload snippets for all filetypes. +fun! ReloadAllSnippets() + for ft in keys(g:did_ft) + call ReloadSnippets(ft) + endfor +endf + +let g:did_ft = {} +fun! GetSnippets(dir, filetypes) + for ft in split(a:filetypes, '\.') + if has_key(g:did_ft, ft) | continue | endif + call s:DefineSnips(a:dir, ft, ft) + if ft == 'objc' || ft == 'cpp' || ft == 'cs' + call s:DefineSnips(a:dir, 'c', ft) + elseif ft == 'xhtml' + call s:DefineSnips(a:dir, 'html', 'xhtml') + endif + let g:did_ft[ft] = 1 + endfor +endf + +" Define "aliasft" snippets for the filetype "realft". +fun s:DefineSnips(dir, aliasft, realft) + for path in split(globpath(a:dir, a:aliasft.'/')."\n". + \ globpath(a:dir, a:aliasft.'-*/'), "\n") + call ExtractSnips(path, a:realft) + endfor + for path in split(globpath(a:dir, a:aliasft.'.snippets')."\n". + \ globpath(a:dir, a:aliasft.'-*.snippets'), "\n") + call ExtractSnipsFile(path, a:realft) + endfor +endf + +fun! TriggerSnippet() + if exists('g:SuperTabMappingForward') + if g:SuperTabMappingForward == "" + let SuperTabKey = "\" + elseif g:SuperTabMappingBackward == "" + let SuperTabKey = "\" + endif + endif + + if pumvisible() " Update snippet if completion is used, or deal with supertab + if exists('SuperTabKey') + call feedkeys(SuperTabKey) | return '' + endif + call feedkeys("\a", 'n') " Close completion menu + call feedkeys("\") | return '' + endif + + if exists('g:snipPos') | return snipMate#jumpTabStop(0) | endif + + let word = matchstr(getline('.'), '\S\+\%'.col('.').'c') + for scope in [bufnr('%')] + split(&ft, '\.') + ['_'] + let [trigger, snippet] = s:GetSnippet(word, scope) + " If word is a trigger for a snippet, delete the trigger & expand + " the snippet. + if snippet != '' + let col = col('.') - len(trigger) + sil exe 's/\V'.escape(trigger, '/\.').'\%#//' + return snipMate#expandSnip(snippet, col) + endif + endfor + + if exists('SuperTabKey') + call feedkeys(SuperTabKey) + return '' + endif + return "\" +endf + +fun! BackwardsSnippet() + if exists('g:snipPos') | return snipMate#jumpTabStop(1) | endif + + if exists('g:SuperTabMappingForward') + if g:SuperTabMappingBackward == "" + let SuperTabKey = "\" + elseif g:SuperTabMappingForward == "" + let SuperTabKey = "\" + endif + endif + if exists('SuperTabKey') + call feedkeys(SuperTabKey) + return '' + endif + return "\" +endf + +" Check if word under cursor is snippet trigger; if it isn't, try checking if +" the text after non-word characters is (e.g. check for "foo" in "bar.foo") +fun s:GetSnippet(word, scope) + let word = a:word | let snippet = '' + while snippet == '' + if exists('s:snippets["'.a:scope.'"]["'.escape(word, '\"').'"]') + let snippet = s:snippets[a:scope][word] + elseif exists('s:multi_snips["'.a:scope.'"]["'.escape(word, '\"').'"]') + let snippet = s:ChooseSnippet(a:scope, word) + if snippet == '' | break | endif + else + if match(word, '\W') == -1 | break | endif + let word = substitute(word, '.\{-}\W', '', '') + endif + endw + if word == '' && a:word != '.' && stridx(a:word, '.') != -1 + let [word, snippet] = s:GetSnippet('.', a:scope) + endif + return [word, snippet] +endf + +fun s:ChooseSnippet(scope, trigger) + let snippet = [] + let i = 1 + for snip in s:multi_snips[a:scope][a:trigger] + let snippet += [i.'. '.snip[0]] + let i += 1 + endfor + if i == 2 | return s:multi_snips[a:scope][a:trigger][0][1] | endif + let num = inputlist(snippet) - 1 + return num == -1 ? '' : s:multi_snips[a:scope][a:trigger][num][1] +endf + +fun! ShowAvailableSnips() + let line = getline('.') + let col = col('.') + let word = matchstr(getline('.'), '\S\+\%'.col.'c') + let words = [word] + if stridx(word, '.') + let words += split(word, '\.', 1) + endif + let matchlen = 0 + let matches = [] + for scope in [bufnr('%')] + split(&ft, '\.') + ['_'] + let triggers = has_key(s:snippets, scope) ? keys(s:snippets[scope]) : [] + if has_key(s:multi_snips, scope) + let triggers += keys(s:multi_snips[scope]) + endif + for trigger in triggers + for word in words + if word == '' + let matches += [trigger] " Show all matches if word is empty + elseif trigger =~ '^'.word + let matches += [trigger] + let len = len(word) + if len > matchlen | let matchlen = len | endif + endif + endfor + endfor + endfor + + " This is to avoid a bug with Vim when using complete(col - matchlen, matches) + " (Issue#46 on the Google Code snipMate issue tracker). + call setline(line('.'), substitute(line, repeat('.', matchlen).'\%'.col.'c', '', '')) + call complete(col, matches) + return '' +endf +" vim:noet:sw=4:ts=4:ft=vim diff --git a/vim/bundle/snipmate.vim/snippets/_.snippets b/vim/bundle/snipmate.vim/snippets/_.snippets new file mode 100644 index 0000000..d3ee355 --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/_.snippets @@ -0,0 +1,9 @@ +# Global snippets + +# (c) holds no legal value ;) +snippet c) + Copyright `&enc[:2] == "utf" ? "©" : "(c)"` `strftime("%Y")` ${1:`g:snips_author`}. All Rights Reserved.${2} +snippet date + `strftime("%Y-%m-%d")` +snippet ddate + `strftime("%B %d, %Y")` diff --git a/vim/bundle/snipmate.vim/snippets/autoit.snippets b/vim/bundle/snipmate.vim/snippets/autoit.snippets new file mode 100644 index 0000000..690018c --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/autoit.snippets @@ -0,0 +1,66 @@ +snippet if + If ${1:condition} Then + ${2:; True code} + EndIf +snippet el + Else + ${1} +snippet elif + ElseIf ${1:condition} Then + ${2:; True code} +# If/Else block +snippet ifel + If ${1:condition} Then + ${2:; True code} + Else + ${3:; Else code} + EndIf +# If/ElseIf/Else block +snippet ifelif + If ${1:condition 1} Then + ${2:; True code} + ElseIf ${3:condition 2} Then + ${4:; True code} + Else + ${5:; Else code} + EndIf +# Switch block +snippet switch + Switch (${1:condition}) + Case {$2:case1}: + {$3:; Case 1 code} + Case Else: + {$4:; Else code} + EndSwitch +# Select block +snippet select + Select (${1:condition}) + Case {$2:case1}: + {$3:; Case 1 code} + Case Else: + {$4:; Else code} + EndSelect +# While loop +snippet while + While (${1:condition}) + ${2:; code...} + WEnd +# For loop +snippet for + For ${1:n} = ${3:1} to ${2:count} + ${4:; code...} + Next +# New Function +snippet func + Func ${1:fname}(${2:`indent('.') ? 'self' : ''`}): + ${4:Return} + EndFunc +# Message box +snippet msg + MsgBox(${3:MsgType}, ${1:"Title"}, ${2:"Message Text"}) +# Debug Message +snippet debug + MsgBox(0, "Debug", ${1:"Debug Message"}) +# Show Variable Debug Message +snippet showvar + MsgBox(0, "${1:VarName}", $1) diff --git a/vim/bundle/snipmate.vim/snippets/c.snippets b/vim/bundle/snipmate.vim/snippets/c.snippets new file mode 100644 index 0000000..e1c4f05 --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/c.snippets @@ -0,0 +1,113 @@ +# main() +snippet main + int main(int argc, const char *argv[]) + { + ${1} + return 0; + } +snippet mainn + int main(void) + { + ${1} + return 0; + } +# #include <...> +snippet inc + #include <${1:stdio}.h>${2} +# #include "..." +snippet Inc + #include "${1:`Filename("$1.h")`}"${2} +# #ifndef ... #define ... #endif +snippet Def + #ifndef $1 + #define ${1:SYMBOL} ${2:value} + #endif${3} +snippet def + #define +snippet ifdef + #ifdef ${1:FOO} + ${2:#define } + #endif +snippet #if + #if ${1:FOO} + ${2} + #endif +# Header Include-Guard +snippet once + #ifndef ${1:`toupper(Filename('$1_H', 'UNTITLED_H'))`} + + #define $1 + + ${2} + + #endif /* end of include guard: $1 */ +# If Condition +snippet if + if (${1:/* condition */}) { + ${2:/* code */} + } +snippet el + else { + ${1} + } +# Ternary conditional +snippet t + ${1:/* condition */} ? ${2:a} : ${3:b} +# Do While Loop +snippet do + do { + ${2:/* code */} + } while (${1:/* condition */}); +# While Loop +snippet wh + while (${1:/* condition */}) { + ${2:/* code */} + } +# For Loop +snippet for + for (${2:i} = 0; $2 < ${1:count}; $2${3:++}) { + ${4:/* code */} + } +# Custom For Loop +snippet forr + for (${1:i} = ${2:0}; ${3:$1 < 10}; $1${4:++}) { + ${5:/* code */} + } +# Function +snippet fun + ${1:void} ${2:function_name}(${3}) + { + ${4:/* code */} + } +# Function Declaration +snippet fund + ${1:void} ${2:function_name}(${3});${4} +# Typedef +snippet td + typedef ${1:int} ${2:MyCustomType};${3} +# Struct +snippet st + struct ${1:`Filename('$1_t', 'name')`} { + ${2:/* data */} + }${3: /* optional variable list */};${4} +# Typedef struct +snippet tds + typedef struct ${2:_$1 }{ + ${3:/* data */} + } ${1:`Filename('$1_t', 'name')`}; +# Typdef enum +snippet tde + typedef enum { + ${1:/* data */} + } ${2:foo}; +# printf +# unfortunately version this isn't as nice as TextMates's, given the lack of a +# dynamic `...` +snippet pr + printf("${1:%s}\n"${2});${3} +# fprintf (again, this isn't as nice as TextMate's version, but it works) +snippet fpr + fprintf(${1:stderr}, "${2:%s}\n"${3});${4} +# This is kind of convenient +snippet . + [${1}]${2} diff --git a/vim/bundle/snipmate.vim/snippets/coffee.snippets b/vim/bundle/snipmate.vim/snippets/coffee.snippets new file mode 100644 index 0000000..520bb82 --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/coffee.snippets @@ -0,0 +1,63 @@ +snippet bfun + ${1:(${2:args}) }=> + ${3:# body...} + +snippet cla + class ${1:ClassName}${2: extends ${3:Ancestor}} + ${4:constructor: (${5:args}) -> + ${6:# body...}} + $7 + +snippet elif + else if ${1:condition} + ${2:# body...} + +snippet fora + for ${1:name} in ${2:array} + ${3:# body...} + +snippet foro + for ${1:key}, ${2:value} of ${3:Object} + ${0:# body...} + +snippet forr + for ${1:name} in [${2:start}..${3:finish}]${4: by ${5:step}} + ${6:# body...} + +snippet forrex + for ${1:name} in [${2:start}...${3:finish}]${4: by ${5:step}} + ${6:# body...} + +snippet fun + ${1:name} = (${2:args}) -> + ${3:# body...} + +snippet if + if ${1:condition} + ${2:# body...} + +snippet ife + if ${1:condition} + ${2:# body...} + else + ${3:# body...} + +snippet ifte + if ${1:condition} then ${2:value} else ${3:other} + +snippet log + console.log $1 + +snippet swi + switch ${1:object} + when ${2:value} + ${0:# body...} + +snippet try + try + $1 + catch ${2:error} + $3 + +snippet unl + ${1:action} unless ${2:condition} diff --git a/vim/bundle/snipmate.vim/snippets/cpp.snippets b/vim/bundle/snipmate.vim/snippets/cpp.snippets new file mode 100644 index 0000000..fdabd63 --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/cpp.snippets @@ -0,0 +1,34 @@ +# Read File Into Vector +snippet readfile + std::vector v; + if (FILE *${2:fp} = fopen(${1:"filename"}, "r")) { + char buf[1024]; + while (size_t len = fread(buf, 1, sizeof(buf), $2)) + v.insert(v.end(), buf, buf + len); + fclose($2); + }${3} +# std::map +snippet map + std::map<${1:key}, ${2:value}> map${3}; +# std::vector +snippet vector + std::vector<${1:char}> v${2}; +# Namespace +snippet ns + namespace ${1:`Filename('', 'my')`} { + ${2} + } /* $1 */ +# Class +snippet cl + class ${1:`Filename('$1_t', 'name')`} { + public: + $1 (${2:arguments}); + virtual ~$1 (); + + private: + ${3:/* data */} + }; +snippet fori + for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) { + ${4:/* code */} + } diff --git a/vim/bundle/snipmate.vim/snippets/erlang.snippets b/vim/bundle/snipmate.vim/snippets/erlang.snippets new file mode 100644 index 0000000..7238149 --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/erlang.snippets @@ -0,0 +1,39 @@ +# module and export all +snippet mod + -module(${1:`Filename('', 'my')`}). + + -compile([export_all]). + + start() -> + ${2} + + stop() -> + ok. +# define directive +snippet def + -define(${1:macro}, ${2:body}).${3} +# export directive +snippet exp + -export([${1:function}/${2:arity}]). +# include directive +snippet inc + -include("${1:file}").${2} +# behavior directive +snippet beh + -behaviour(${1:behaviour}).${2} +# if expression +snippet if + if + ${1:guard} -> + ${2:body} + end +# case expression +snippet case + case ${1:expression} of + ${2:pattern} -> + ${3:body}; + end +# record directive +snippet rec + -record(${1:record}, { + ${2:field}=${3:value}}).${4} diff --git a/vim/bundle/snipmate.vim/snippets/html.snippets b/vim/bundle/snipmate.vim/snippets/html.snippets new file mode 100644 index 0000000..302cea2 --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/html.snippets @@ -0,0 +1,190 @@ +# Some useful Unicode entities +# Non-Breaking Space +snippet nbs +   +# ↠+snippet left + ← +# → +snippet right + → +# ↑ +snippet up + ↑ +# ↓ +snippet down + ↓ +# ↩ +snippet return + ↩ +# ⇤ +snippet backtab + ⇤ +# ⇥ +snippet tab + ⇥ +# ⇧ +snippet shift + ⇧ +# ⌃ +snippet control + ⌃ +# ⌅ +snippet enter + ⌅ +# ⌘ +snippet command + ⌘ +# ⌥ +snippet option + ⌥ +# ⌦ +snippet delete + ⌦ +# ⌫ +snippet backspace + ⌫ +# ⎋ +snippet escape + ⎋ +# Generic Doctype +snippet doctype HTML 4.01 Strict + +snippet doctype HTML 4.01 Transitional + +snippet doctype HTML 5 + +snippet doctype XHTML 1.0 Frameset + +snippet doctype XHTML 1.0 Strict + +snippet doctype XHTML 1.0 Transitional + +snippet doctype XHTML 1.1 + +# HTML Doctype 4.01 Strict +snippet docts + +# HTML Doctype 4.01 Transitional +snippet doct + +# HTML Doctype 5 +snippet doct5 + +# XHTML Doctype 1.0 Frameset +snippet docxf + +# XHTML Doctype 1.0 Strict +snippet docxs + +# XHTML Doctype 1.0 Transitional +snippet docxt + +# XHTML Doctype 1.1 +snippet docx + +snippet html + + ${1} + +snippet xhtml + + ${1} + +snippet body + + ${1} + +snippet head + + + + ${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`} + ${2} + +snippet title + ${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`}${2} +snippet script + ${2} +snippet scriptsrc + ${2} +snippet style + ${3} +snippet base + +snippet r + +snippet div +
+ ${2} +
+# Embed QT Movie +snippet movie + + + + + + ${6} +snippet fieldset +
+ ${1:name} + + ${3} +
+snippet form +
+ ${3} + + +

+
+snippet h1 +

${2:$1}

+snippet input + ${4} +snippet label + ${7} +snippet link + ${4} +snippet mailto + ${3:email me} +snippet meta + ${3} +snippet opt + ${3} +snippet optt + ${2} +snippet select + ${5} +snippet table + + + +
${2:Header}
${3:Data}
${4} +snippet textarea + ${5} diff --git a/vim/bundle/snipmate.vim/snippets/java.snippets b/vim/bundle/snipmate.vim/snippets/java.snippets new file mode 100644 index 0000000..dd96b79 --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/java.snippets @@ -0,0 +1,95 @@ +snippet main + public static void main (String [] args) + { + ${1:/* code */} + } +snippet pu + public +snippet po + protected +snippet pr + private +snippet st + static +snippet fi + final +snippet ab + abstract +snippet re + return +snippet br + break; +snippet de + default: + ${1} +snippet ca + catch(${1:Exception} ${2:e}) ${3} +snippet th + throw +snippet sy + synchronized +snippet im + import +snippet imp + implements +snippet ext + extends +snippet j.u + java.util +snippet j.i + java.io. +snippet j.b + java.beans. +snippet j.n + java.net. +snippet j.m + java.math. +snippet if + if (${1}) ${2} +snippet el + else +snippet elif + else if (${1}) ${2} +snippet wh + while (${1}) ${2} +snippet for + for (${1}; ${2}; ${3}) ${4} +snippet fore + for (${1} : ${2}) ${3} +snippet sw + switch (${1}) ${2} +snippet cs + case ${1}: + ${2} + ${3} +snippet tc + public class ${1:`Filename()`} extends ${2:TestCase} +snippet t + public void test${1:Name}() throws Exception ${2} +snippet cl + class ${1:`Filename("", "untitled")`} ${2} +snippet in + interface ${1:`Filename("", "untitled")`} ${2:extends Parent}${3} +snippet m + ${1:void} ${2:method}(${3}) ${4:throws }${5} +snippet v + ${1:String} ${2:var}${3: = null}${4};${5} +snippet co + static public final ${1:String} ${2:var} = ${3};${4} +snippet cos + static public final String ${1:var} = "${2}";${3} +snippet as + assert ${1:test} : "${2:Failure message}";${3} +snippet try + try { + ${3} + } catch(${1:Exception} ${2:e}) { + } +snippet tryf + try { + ${3} + } catch(${1:Exception} ${2:e}) { + } finally { + } +snippet rst + ResultSet ${1:rst}${2: = null}${3};${4} diff --git a/vim/bundle/snipmate.vim/snippets/javascript.snippets b/vim/bundle/snipmate.vim/snippets/javascript.snippets new file mode 100644 index 0000000..f869e2f --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/javascript.snippets @@ -0,0 +1,74 @@ +# Prototype +snippet proto + ${1:class_name}.prototype.${2:method_name} = + function(${3:first_argument}) { + ${4:// body...} + }; +# Function +snippet fun + function ${1:function_name} (${2:argument}) { + ${3:// body...} + } +# Anonymous Function +snippet f + function(${1}) {${2}}; +# if +snippet if + if (${1:true}) {${2}} +# if ... else +snippet ife + if (${1:true}) {${2}} + else{${3}} +# tertiary conditional +snippet t + ${1:/* condition */} ? ${2:a} : ${3:b} +# switch +snippet switch + switch(${1:expression}) { + case '${3:case}': + ${4:// code} + break; + ${5} + default: + ${2:// code} + } +# case +snippet case + case '${1:case}': + ${2:// code} + break; + ${3} +# for (...) {...} +snippet for + for (var ${2:i} = 0; $2 < ${1:Things}.length; $2${3:++}) { + ${4:$1[$2]} + }; +# for (...) {...} (Improved Native For-Loop) +snippet forr + for (var ${2:i} = ${1:Things}.length - 1; $2 >= 0; $2${3:--}) { + ${4:$1[$2]} + }; +# while (...) {...} +snippet wh + while (${1:/* condition */}) { + ${2:/* code */} + } +# do...while +snippet do + do { + ${2:/* code */} + } while (${1:/* condition */}); +# Object Method +snippet :f + ${1:method_name}: function(${2:attribute}) { + ${4} + }${3:,} +# setTimeout function +snippet timeout + setTimeout(function() {${3}}${2}, ${1:10}; +# Get Elements +snippet get + getElementsBy${1:TagName}('${2}')${3} +# Get Element +snippet gett + getElementBy${1:Id}('${2}')${3} diff --git a/vim/bundle/snipmate.vim/snippets/mako.snippets b/vim/bundle/snipmate.vim/snippets/mako.snippets new file mode 100644 index 0000000..2a0aef9 --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/mako.snippets @@ -0,0 +1,54 @@ +snippet def + <%def name="${1:name}"> + ${2:} + +snippet call + <%call expr="${1:name}"> + ${2:} + +snippet doc + <%doc> + ${1:} + +snippet text + <%text> + ${1:} + +snippet for + % for ${1:i} in ${2:iter}: + ${3:} + % endfor +snippet if if + % if ${1:condition}: + ${2:} + % endif +snippet if if/else + % if ${1:condition}: + ${2:} + % else: + ${3:} + % endif +snippet try + % try: + ${1:} + % except${2:}: + ${3:pass} + % endtry +snippet wh + % while ${1:}: + ${2:} + % endwhile +snippet $ + ${ ${1:} } +snippet <% + <% ${1:} %> +snippet +snippet inherit + <%inherit file="${1:filename}" /> +snippet include + <%include file="${1:filename}" /> +snippet namespace + <%namespace file="${1:name}" /> +snippet page + <%page args="${1:}" /> diff --git a/vim/bundle/snipmate.vim/snippets/objc.snippets b/vim/bundle/snipmate.vim/snippets/objc.snippets new file mode 100644 index 0000000..85b80d9 --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/objc.snippets @@ -0,0 +1,247 @@ +# #import <...> +snippet Imp + #import <${1:Cocoa/Cocoa.h}>${2} +# #import "..." +snippet imp + #import "${1:`Filename()`.h}"${2} +# @selector(...) +snippet sel + @selector(${1:method}:)${3} +# @"..." string +snippet s + @"${1}"${2} +# Object +snippet o + ${1:NSObject} *${2:foo} = [${3:$1 alloc}]${4};${5} +# NSLog(...) +snippet log + NSLog(@"${1:%@}"${2});${3} +# Class +snippet objc + @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject} + { + } + @end + + @implementation $1 + ${3} + @end +# Class Interface +snippet int + @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject} + {${3} + } + ${4} + @end +snippet @interface + @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject} + {${3} + } + ${4} + @end +# Class Implementation +snippet impl + @implementation ${1:`Filename('', 'someClass')`} + ${2} + @end +snippet @implementation + @implementation ${1:`Filename('', 'someClass')`} + ${2} + @end +# Protocol +snippet pro + @protocol ${1:`Filename('$1Delegate', 'MyProtocol')`} ${2:} + ${3} + @end +snippet @protocol + @protocol ${1:`Filename('$1Delegate', 'MyProtocol')`} ${2:} + ${3} + @end +# init Definition +snippet init + - (id)init + { + if (self = [super init]) { + ${1} + } + return self; + } +# dealloc Definition +snippet dealloc + - (void) dealloc + { + ${1:deallocations} + [super dealloc]; + } +snippet su + [super ${1:init}]${2} +snippet ibo + IBOutlet ${1:NSSomeClass} *${2:$1};${3} +# Category +snippet cat + @interface ${1:NSObject} (${2:MyCategory}) + @end + + @implementation $1 ($2) + ${3} + @end +# Category Interface +snippet cath + @interface ${1:`Filename('$1', 'NSObject')`} (${2:MyCategory}) + ${3} + @end +# Method +snippet m + - (${1:id})${2:method} + { + ${3} + } +# Method declaration +snippet md + - (${1:id})${2:method};${3} +# IBAction declaration +snippet ibad + - (IBAction)${1:method}:(${2:id})sender;${3} +# IBAction method +snippet iba + - (IBAction)${1:method}:(${2:id})sender + { + ${3} + } +# awakeFromNib method +snippet wake + - (void)awakeFromNib + { + ${1} + } +# Class Method +snippet M + + (${1:id})${2:method} + { + ${3:return nil;} + } +# Sub-method (Call super) +snippet sm + - (${1:id})${2:method} + { + [super $2];${3} + return self; + } +# Accessor Methods For: +# Object +snippet objacc + - (${1:id})${2:thing} + { + return $2; + } + + - (void)set$2:($1)${3:new$2} + { + [$3 retain]; + [$2 release]; + $2 = $3; + }${4} +# for (object in array) +snippet forin + for (${1:Class} *${2:some$1} in ${3:array}) { + ${4} + } +snippet fore + for (${1:object} in ${2:array}) { + ${3:statements} + } +snippet forarray + unsigned int ${1:object}Count = [${2:array} count]; + + for (unsigned int index = 0; index < $1Count; index++) { + ${3:id} $1 = [$2 $1AtIndex:index]; + ${4} + } +snippet fora + unsigned int ${1:object}Count = [${2:array} count]; + + for (unsigned int index = 0; index < $1Count; index++) { + ${3:id} $1 = [$2 $1AtIndex:index]; + ${4} + } +# Try / Catch Block +snippet @try + @try { + ${1:statements} + } + @catch (NSException * e) { + ${2:handler} + } + @finally { + ${3:statements} + } +snippet @catch + @catch (${1:exception}) { + ${2:handler} + } +snippet @finally + @finally { + ${1:statements} + } +# IBOutlet +# @property (Objective-C 2.0) +snippet prop + @property (${1:retain}) ${2:NSSomeClass} ${3:*$2};${4} +# @synthesize (Objective-C 2.0) +snippet syn + @synthesize ${1:property};${2} +# [[ alloc] init] +snippet alloc + [[${1:foo} alloc] init${2}];${3} +snippet a + [[${1:foo} alloc] init${2}];${3} +# retain +snippet ret + [${1:foo} retain];${2} +# release +snippet rel + [${1:foo} release]; +# autorelease +snippet arel + [${1:foo} autorelease]; +# autorelease pool +snippet pool + NSAutoreleasePool *${1:pool} = [[NSAutoreleasePool alloc] init]; + ${2:/* code */} + [$1 drain]; +# Throw an exception +snippet except + NSException *${1:badness}; + $1 = [NSException exceptionWithName:@"${2:$1Name}" + reason:@"${3}" + userInfo:nil]; + [$1 raise]; +snippet prag + #pragma mark ${1:-} +snippet cl + @class ${1:Foo};${2} +snippet color + [[NSColor ${1:blackColor}] set]; +# NSArray +snippet array + NSMutableArray *${1:array} = [NSMutable array];${2} +snippet nsa + NSArray ${1} +snippet nsma + NSMutableArray ${1} +snippet aa + NSArray * array;${1} +snippet ma + NSMutableArray * array;${1} +# NSDictionary +snippet dict + NSMutableDictionary *${1:dict} = [NSMutableDictionary dictionary];${2} +snippet nsd + NSDictionary ${1} +snippet nsmd + NSMutableDictionary ${1} +# NSString +snippet nss + NSString ${1} +snippet nsms + NSMutableString ${1} diff --git a/vim/bundle/snipmate.vim/snippets/perl.snippets b/vim/bundle/snipmate.vim/snippets/perl.snippets new file mode 100644 index 0000000..c85ff11 --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/perl.snippets @@ -0,0 +1,97 @@ +# #!/usr/bin/perl +snippet #! + #!/usr/bin/perl + +# Hash Pointer +snippet . + => +# Function +snippet sub + sub ${1:function_name} { + ${2:#body ...} + } +# Conditional +snippet if + if (${1}) { + ${2:# body...} + } +# Conditional if..else +snippet ife + if (${1}) { + ${2:# body...} + } + else { + ${3:# else...} + } +# Conditional if..elsif..else +snippet ifee + if (${1}) { + ${2:# body...} + } + elsif (${3}) { + ${4:# elsif...} + } + else { + ${5:# else...} + } +# Conditional One-line +snippet xif + ${1:expression} if ${2:condition};${3} +# Unless conditional +snippet unless + unless (${1}) { + ${2:# body...} + } +# Unless conditional One-line +snippet xunless + ${1:expression} unless ${2:condition};${3} +# Try/Except +snippet eval + eval { + ${1:# do something risky...} + }; + if ($@) { + ${2:# handle failure...} + } +# While Loop +snippet wh + while (${1}) { + ${2:# body...} + } +# While Loop One-line +snippet xwh + ${1:expression} while ${2:condition};${3} +# C-style For Loop +snippet cfor + for (my $${2:var} = 0; $$2 < ${1:count}; $$2${3:++}) { + ${4:# body...} + } +# For loop one-line +snippet xfor + ${1:expression} for @${2:array};${3} +# Foreach Loop +snippet for + foreach my $${1:x} (@${2:array}) { + ${3:# body...} + } +# Foreach Loop One-line +snippet fore + ${1:expression} foreach @${2:array};${3} +# Package +snippet cl + package ${1:ClassName}; + + use base qw(${2:ParentClass}); + + sub new { + my $class = shift; + $class = ref $class if ref $class; + my $self = bless {}, $class; + $self; + } + + 1;${3} +# Read File +snippet slurp + my $${1:var}; + { local $/ = undef; local *FILE; open FILE, "<${2:file}"; $$1 = ; close FILE }${3} diff --git a/vim/bundle/snipmate.vim/snippets/php.default b/vim/bundle/snipmate.vim/snippets/php.default new file mode 100644 index 0000000..faed6b8 --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/php.default @@ -0,0 +1,222 @@ +snippet php + +snippet ec + echo "${1:string}"${2}; +snippet inc + include '${1:file}';${2} +snippet inc1 + include_once '${1:file}';${2} +snippet req + require '${1:file}';${2} +snippet req1 + require_once '${1:file}';${2} +# $GLOBALS['...'] +snippet globals + $GLOBALS['${1:variable}']${2: = }${3:something}${4:;}${5} +snippet $_ COOKIE['...'] + $_COOKIE['${1:variable}']${2} +snippet $_ ENV['...'] + $_ENV['${1:variable}']${2} +snippet $_ FILES['...'] + $_FILES['${1:variable}']${2} +snippet $_ Get['...'] + $_GET['${1:variable}']${2} +snippet $_ POST['...'] + $_POST['${1:variable}']${2} +snippet $_ REQUEST['...'] + $_REQUEST['${1:variable}']${2} +snippet $_ SERVER['...'] + $_SERVER['${1:variable}']${2} +snippet $_ SESSION['...'] + $_SESSION['${1:variable}']${2} +# Start Docblock +snippet /* + /** + * ${1} + **/ +# Class - post doc +snippet doc_cp + /** + * ${1:undocumented class} + * + * @package ${2:default} + * @author ${3:`g:snips_author`} + **/${4} +# Class Variable - post doc +snippet doc_vp + /** + * ${1:undocumented class variable} + * + * @var ${2:string} + **/${3} +# Class Variable +snippet doc_v + /** + * ${3:undocumented class variable} + * + * @var ${4:string} + **/ + ${1:var} $${2};${5} +# Class +snippet doc_c + /** + * ${3:undocumented class} + * + * @packaged ${4:default} + * @author ${5:`g:snips_author`} + **/ + ${1:}class ${2:} + {${6} + } // END $1class $2 +# Constant Definition - post doc +snippet doc_dp + /** + * ${1:undocumented constant} + **/${2} +# Constant Definition +snippet doc_d + /** + * ${3:undocumented constant} + **/ + define(${1}, ${2});${4} +# Function - post doc +snippet doc_fp + /** + * ${1:undocumented function} + * + * @return ${2:void} + * @author ${3:`g:snips_author`} + **/${4} +# Function signature +snippet doc_s + /** + * ${4:undocumented function} + * + * @return ${5:void} + * @author ${6:`g:snips_author`} + **/ + ${1}function ${2}(${3});${7} +# Function +snippet doc_f + /** + * ${4:undocumented function} + * + * @return ${5:void} + * @author ${6:`g:snips_author`} + **/ + ${1}function ${2}(${3}) + {${7} + } +# Header +snippet doc_h + /** + * ${1} + * + * @author ${2:`g:snips_author`} + * @version ${3:$Id$} + * @copyright ${4:$2}, `strftime('%d %B, %Y')` + * @package ${5:default} + **/ + + /** + * Define DocBlock + *// +# Interface +snippet doc_i + /** + * ${2:undocumented class} + * + * @package ${3:default} + * @author ${4:`g:snips_author`} + **/ + interface ${1:} + {${5} + } // END interface $1 +# class ... +snippet class + /** + * ${1} + **/ + class ${2:ClassName} + { + ${3} + function ${4:__construct}(${5:argument}) + { + ${6:// code...} + } + } +# define(...) +snippet def + define('${1}'${2});${3} +# defined(...) +snippet def? + ${1}defined('${2}')${3} +snippet wh + while (${1:/* condition */}) { + ${2:// code...} + } +# do ... while +snippet do + do { + ${2:// code... } + } while (${1:/* condition */}); +snippet if + if (${1:/* condition */}) { + ${2:// code...} + } +snippet ife + if (${1:/* condition */}) { + ${2:// code...} + } else { + ${3:// code...} + } + ${4} +snippet else + else { + ${1:// code...} + } +snippet elseif + elseif (${1:/* condition */}) { + ${2:// code...} + } +# Tertiary conditional +snippet t + $${1:retVal} = (${2:condition}) ? ${3:a} : ${4:b};${5} +snippet switch + switch ($${1:variable}) { + case '${2:value}': + ${3:// code...} + break; + ${5} + default: + ${4:// code...} + break; + } +snippet case + case '${1:value}': + ${2:// code...} + break;${3} +snippet for + for ($${2:i} = 0; $$2 < ${1:count}; $$2${3:++}) { + ${4: // code...} + } +snippet foreach + foreach ($${1:variable} as $${2:key}) { + ${3:// code...} + } +snippet fun + ${1:public }function ${2:FunctionName}(${3}) + { + ${4:// code...} + } +# $... = array (...) +snippet array + $${1:arrayName} = array('${2}' => ${3});${4} +snippet arr + array( + '${1:key}' => ${2:value} + ); +snippet a + array('${1:key}' => ${2:value}); diff --git a/vim/bundle/snipmate.vim/snippets/php.snippets b/vim/bundle/snipmate.vim/snippets/php.snippets new file mode 100644 index 0000000..dbb08cf --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/php.snippets @@ -0,0 +1,221 @@ +snippet php + +snippet ec + echo "${1:string}"${2}; +snippet { + { + ${1} + } +snippet inc + include '${1:file}';${2} +snippet inc1 + include_once '${1:file}';${2} +snippet req + require '${1:file}';${2} +snippet req1 + require_once '${1:file}';${2} +# $GLOBALS['...'] +snippet globals + $GLOBALS['${1:variable}']${2: = }${3:something}${4:;}${5} +snippet $_ COOKIE['...'] + $_COOKIE['${1:variable}']${2} +snippet $_ ENV['...'] + $_ENV['${1:variable}']${2} +snippet $_ FILES['...'] + $_FILES['${1:variable}']${2} +snippet $_ Get['...'] + $_GET['${1:variable}']${2} +snippet $_ POST['...'] + $_POST['${1:variable}']${2} +snippet $_ REQUEST['...'] + $_REQUEST['${1:variable}']${2} +snippet $_ SERVER['...'] + $_SERVER['${1:variable}']${2} +snippet $_ SESSION['...'] + $_SESSION['${1:variable}']${2} +# Start Docblock +snippet /* + /** + * ${1:description} + * + * @param ${2:int} ${3:var} ${4:desc} + * @return ${5:int} ${6:desc} + * @access ${7:public} + **/ +# Class - post doc +snippet doc_cp + /** + * ${1:undocumented class} + * + * @package ${2:default} + * @author ${3:`g:snips_author`} + **/${4} +# Class Variable - post doc +snippet doc_vp + /** + * ${1:undocumented class variable} + * + * @var ${2:string} + **/${3} +# Class Variable +snippet doc_v + /** + * ${3:undocumented class variable} + * + * @var ${4:string} + **/ + ${1:var} $${2};${5} +# Class +snippet doc_c + /** + * ${3:undocumented class} + * + * @packaged ${4:default} + * @author ${5:`g:snips_author`} + **/ + ${1:}class ${2:} + {${6} + } // END $1class $2 +# Constant Definition - post doc +snippet doc_dp + /** + * ${1:undocumented constant} + **/${2} +# Constant Definition +snippet doc_d + /** + * ${3:undocumented constant} + **/ + define(${1}, ${2});${4} +# Function - post doc +snippet doc_fp + /** + * ${1:undocumented function} + * + * @return ${2:void} + * @author ${3:`g:snips_author`} + **/${4} +# Function signature +snippet doc_s + /** + * ${4:undocumented function} + * + * @return ${5:void} + * @author ${6:`g:snips_author`} + **/ + ${1}function ${2}(${3});${7} +# Function +snippet doc_f + /** + * ${4:undocumented function} + * + * @return ${5:void} + * @author ${6:`g:snips_author`} + **/ + ${1}function ${2}(${3}) + {${7} + } +# Header +snippet doc_h + /** + * ${1} + * + * @author ${2:`g:snips_author`} + * @version ${3:$Id$} + * @copyright ${4:$2}, `strftime('%d %B, %Y')` + * @package ${5:default} + **/ + + /** + * Define DocBlock + *// +# Interface +snippet doc_i + /** + * ${2:undocumented class} + * + * @package ${3:default} + * @author ${4:`g:snips_author`} + **/ + interface ${1:} + {${5} + } // END interface $1 +# class ... +snippet class + class ${1:ClassName} ${2:extends} ${3:ClassName} { + ${4} + } +# define(...) +snippet def + define('${1}', ${2});${3} +# defined(...) +snippet def? + ${1}defined('${2}')${3} +snippet while + while (${1:/* condition */}) { + ${2:// code...} + } +# do ... while +snippet do + do { + ${2:// code... } + } while (${1:/* condition */}); +snippet if + if (${1:/* condition */}) { + ${2:// code...} + } +snippet ife + if (${1:/* condition */}) { + ${2:// code...} + } else { + ${3:// code...} + } + ${4} +snippet else + else { + ${1:// code...} + } +snippet elseif + elseif (${1:/* condition */}) { + ${2:// code...} + } +# Tertiary conditional +snippet t + $${1:retVal} = (${2:condition}) ? ${3:a} : ${4:b};${5} +snippet switch + switch ($${1:variable}) { + case '${2:value}': + ${3:// code...} + break; + ${5} + default: + ${4:// code...} + break; + } +snippet case + case '${1:value}': + ${2:// code...} + break;${3} +snippet for + for ($${1:i}=${2:0}; $$1 < ${3:count}; $$1${4:++}) { + ${5: // code...} + } +snippet foreach + foreach ($${1:variable} as $${2:key}) { + ${3:// code...} + } +snippet fun + ${1:public} function ${2:FunctionName}(${3}) { + ${4} + } +# $... = array (...) +snippet ar + $${1:arrayName} = array(${2:key} => ${3:value}); +snippet a + array(${1}) +snippet arr + array( + ${1} + ) diff --git a/vim/bundle/snipmate.vim/snippets/python.snippets b/vim/bundle/snipmate.vim/snippets/python.snippets new file mode 100644 index 0000000..28a2948 --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/python.snippets @@ -0,0 +1,86 @@ +snippet #! + #!/usr/bin/env python + +snippet imp + import ${1:module} +# Module Docstring +snippet docs + ''' + File: ${1:`Filename('$1.py', 'foo.py')`} + Author: ${2:`g:snips_author`} + Description: ${3} + ''' +snippet wh + while ${1:condition}: + ${2:# code...} +snippet for + for ${1:needle} in ${2:haystack}: + ${3:# code...} +# New Class +snippet cl + class ${1:ClassName}(${2:object}): + """${3:docstring for $1}""" + def __init__(self, ${4:arg}): + ${5:super($1, self).__init__()} + self.$4 = $4 + ${6} +# New Function +snippet def + def ${1:fname}(${2:`indent('.') ? 'self' : ''`}): + """${3:docstring for $1}""" + ${4:pass} +snippet deff + def ${1:fname}(${2:`indent('.') ? 'self' : ''`}): + ${3} +# New Method +snippet defs + def ${1:mname}(self, ${2:arg}): + ${3:pass} +# New Property +snippet property + def ${1:foo}(): + doc = "${2:The $1 property.}" + def fget(self): + ${3:return self._$1} + def fset(self, value): + ${4:self._$1 = value} +# Lambda +snippet ld + ${1:var} = lambda ${2:vars} : ${3:action} +snippet . + self. +snippet try Try/Except + try: + ${1:pass} + except ${2:Exception}, ${3:e}: + ${4:raise $3} +snippet try Try/Except/Else + try: + ${1:pass} + except ${2:Exception}, ${3:e}: + ${4:raise $3} + else: + ${5:pass} +snippet try Try/Except/Finally + try: + ${1:pass} + except ${2:Exception}, ${3:e}: + ${4:raise $3} + finally: + ${5:pass} +snippet try Try/Except/Else/Finally + try: + ${1:pass} + except ${2:Exception}, ${3:e}: + ${4:raise $3} + else: + ${5:pass} + finally: + ${6:pass} +# if __name__ == '__main__': +snippet ifmain + if __name__ == '__main__': + ${1:main()} +# __magic__ +snippet _ + __${1:init}__${2} diff --git a/vim/bundle/snipmate.vim/snippets/ruby.snippets b/vim/bundle/snipmate.vim/snippets/ruby.snippets new file mode 100644 index 0000000..50080d9 --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/ruby.snippets @@ -0,0 +1,504 @@ +# #!/usr/bin/env ruby +snippet #! + #!/usr/bin/env ruby + +# New Block +snippet =b + =begin rdoc + ${1} + =end +snippet y + :yields: ${1:arguments} +snippet rb + #!/usr/bin/env ruby -wKU +snippet beg + begin + ${3} + rescue ${1:Exception} => ${2:e} + end + +snippet req + require "${1}"${2} +snippet # + # => +snippet end + __END__ +snippet case + case ${1:object} + when ${2:condition} + ${3} + end +snippet when + when ${1:condition} + ${2} +snippet def + def ${1:method_name} + ${2} + end +snippet deft + def test_${1:case_name} + ${2} + end +snippet if + if ${1:condition} + ${2} + end +snippet ife + if ${1:condition} + ${2} + else + ${3} + end +snippet elsif + elsif ${1:condition} + ${2} +snippet unless + unless ${1:condition} + ${2} + end +snippet while + while ${1:condition} + ${2} + end +snippet for + for ${1:e} in ${2:c} + ${3} + end +snippet until + until ${1:condition} + ${2} + end +snippet cla class .. end + class ${1:`substitute(Filename(), '^.', '\u&', '')`} + ${2} + end +snippet cla class .. initialize .. end + class ${1:`substitute(Filename(), '^.', '\u&', '')`} + def initialize(${2:args}) + ${3} + end + + + end +snippet cla class .. < ParentClass .. initialize .. end + class ${1:`substitute(Filename(), '^.', '\u&', '')`} < ${2:ParentClass} + def initialize(${3:args}) + ${4} + end + + + end +snippet cla ClassName = Struct .. do .. end + ${1:`substitute(Filename(), '^.', '\u&', '')`} = Struct.new(:${2:attr_names}) do + def ${3:method_name} + ${4} + end + + + end +snippet cla class BlankSlate .. initialize .. end + class ${1:BlankSlate} + instance_methods.each { |meth| undef_method(meth) unless meth =~ /\A__/ } +snippet cla class << self .. end + class << ${1:self} + ${2} + end +# class .. < DelegateClass .. initialize .. end +snippet cla- + class ${1:`substitute(Filename(), '^.', '\u&', '')`} < DelegateClass(${2:ParentClass}) + def initialize(${3:args}) + super(${4:del_obj}) + + ${5} + end + + + end +snippet mod module .. end + module ${1:`substitute(Filename(), '^.', '\u&', '')`} + ${2} + end +snippet mod module .. module_function .. end + module ${1:`substitute(Filename(), '^.', '\u&', '')`} + module_function + + ${2} + end +snippet mod module .. ClassMethods .. end + module ${1:`substitute(Filename(), '^.', '\u&', '')`} + module ClassMethods + ${2} + end + + module InstanceMethods + + end + + def self.included(receiver) + receiver.extend ClassMethods + receiver.send :include, InstanceMethods + end + end +# attr_reader +snippet r + attr_reader :${1:attr_names} +# attr_writer +snippet w + attr_writer :${1:attr_names} +# attr_accessor +snippet rw + attr_accessor :${1:attr_names} +# include Enumerable +snippet Enum + include Enumerable + + def each(&block) + ${1} + end +# include Comparable +snippet Comp + include Comparable + + def <=>(other) + ${1} + end +# extend Forwardable +snippet Forw- + extend Forwardable +# def self +snippet defs + def self.${1:class_method_name} + ${2} + end +# def method_missing +snippet defmm + def method_missing(meth, *args, &blk) + ${1} + end +snippet defd + def_delegator :${1:@del_obj}, :${2:del_meth}, :${3:new_name} +snippet defds + def_delegators :${1:@del_obj}, :${2:del_methods} +snippet am + alias_method :${1:new_name}, :${2:old_name} +snippet app + if __FILE__ == $PROGRAM_NAME + ${1} + end +# usage_if() +snippet usai + if ARGV.${1} + abort "Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}"${3} + end +# usage_unless() +snippet usau + unless ARGV.${1} + abort "Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}"${3} + end +snippet array + Array.new(${1:10}) { |${2:i}| ${3} } +snippet hash + Hash.new { |${1:hash}, ${2:key}| $1[$2] = ${3} } +snippet file File.foreach() { |line| .. } + File.foreach(${1:"path/to/file"}) { |${2:line}| ${3} } +snippet file File.read() + File.read(${1:"path/to/file"})${2} +snippet Dir Dir.global() { |file| .. } + Dir.glob(${1:"dir/glob/*"}) { |${2:file}| ${3} } +snippet Dir Dir[".."] + Dir[${1:"glob/**/*.rb"}]${2} +snippet dir + Filename.dirname(__FILE__) +snippet deli + delete_if { |${1:e}| ${2} } +snippet fil + fill(${1:range}) { |${2:i}| ${3} } +# flatten_once() +snippet flao + inject(Array.new) { |${1:arr}, ${2:a}| $1.push(*$2)}${3} +snippet zip + zip(${1:enums}) { |${2:row}| ${3} } +# downto(0) { |n| .. } +snippet dow + downto(${1:0}) { |${2:n}| ${3} } +snippet ste + step(${1:2}) { |${2:n}| ${3} } +snippet tim + times { |${1:n}| ${2} } +snippet upt + upto(${1:1.0/0.0}) { |${2:n}| ${3} } +snippet loo + loop { ${1} } +snippet ea + each { |${1:e}| ${2} } +snippet ead + each do |${1:e}| + ${2} + end +snippet eab + each_byte { |${1:byte}| ${2} } +snippet eac- each_char { |chr| .. } + each_char { |${1:chr}| ${2} } +snippet eac- each_cons(..) { |group| .. } + each_cons(${1:2}) { |${2:group}| ${3} } +snippet eai + each_index { |${1:i}| ${2} } +snippet eaid + each_index do |${1:i}| + end +snippet eak + each_key { |${1:key}| ${2} } +snippet eakd + each_key do |${1:key}| + ${2} + end +snippet eal + each_line { |${1:line}| ${2} } +snippet eald + each_line do |${1:line}| + ${2} + end +snippet eap + each_pair { |${1:name}, ${2:val}| ${3} } +snippet eapd + each_pair do |${1:name}, ${2:val}| + ${3} + end +snippet eas- + each_slice(${1:2}) { |${2:group}| ${3} } +snippet easd- + each_slice(${1:2}) do |${2:group}| + ${3} + end +snippet eav + each_value { |${1:val}| ${2} } +snippet eavd + each_value do |${1:val}| + ${2} + end +snippet eawi + each_with_index { |${1:e}, ${2:i}| ${3} } +snippet eawid + each_with_index do |${1:e},${2:i}| + ${3} + end +snippet reve + reverse_each { |${1:e}| ${2} } +snippet reved + reverse_each do |${1:e}| + ${2} + end +snippet inj + inject(${1:init}) { |${2:mem}, ${3:var}| ${4} } +snippet injd + inject(${1:init}) do |${2:mem}, ${3:var}| + ${4} + end +snippet map + map { |${1:e}| ${2} } +snippet mapd + map do |${1:e}| + ${2} + end +snippet mapwi- + enum_with_index.map { |${1:e}, ${2:i}| ${3} } +snippet sor + sort { |a, b| ${1} } +snippet sorb + sort_by { |${1:e}| ${2} } +snippet ran + sort_by { rand } +snippet all + all? { |${1:e}| ${2} } +snippet any + any? { |${1:e}| ${2} } +snippet cl + classify { |${1:e}| ${2} } +snippet col + collect { |${1:e}| ${2} } +snippet cold + collect do |${1:e}| + ${2} + end +snippet det + detect { |${1:e}| ${2} } +snippet detd + detect do |${1:e}| + ${2} + end +snippet fet + fetch(${1:name}) { |${2:key}| ${3} } +snippet fin + find { |${1:e}| ${2} } +snippet find + find do |${1:e}| + ${2} + end +snippet fina + find_all { |${1:e}| ${2} } +snippet finad + find_all do |${1:e}| + ${2} + end +snippet gre + grep(${1:/pattern/}) { |${2:match}| ${3} } +snippet sub + ${1:g}sub(${2:/pattern/}) { |${3:match}| ${4} } +snippet sca + scan(${1:/pattern/}) { |${2:match}| ${3} } +snippet scad + scan(${1:/pattern/}) do |${2:match}| + ${3} + end +snippet max + max { |a, b| ${1} } +snippet min + min { |a, b| ${1} } +snippet par + partition { |${1:e}| ${2} } +snippet pard + partition do |${1:e}| + ${2} + end +snippet rej + reject { |${1:e}| ${2} } +snippet rejd + reject do |${1:e}| + ${2} + end +snippet sel + select { |${1:e}| ${2} } +snippet seld + select do |${1:e}| + ${2} + end +snippet lam + lambda { |${1:args}| ${2} } +snippet do + do |${1:variable}| + ${2} + end +snippet : + :${1:key} => ${2:"value"}${3} +snippet ope + open(${1:"path/or/url/or/pipe"}, "${2:w}") { |${3:io}| ${4} } +# path_from_here() +snippet patfh + File.join(File.dirname(__FILE__), *%2[${1:rel path here}])${2} +# unix_filter {} +snippet unif + ARGF.each_line${1} do |${2:line}| + ${3} + end +# option_parse {} +snippet optp + require "optparse" + + options = {${1:default => "args"}} + + ARGV.options do |opts| + opts.banner = "Usage: #{File.basename($PROGRAM_NAME)} +snippet opt + opts.on( "-${1:o}", "--${2:long-option-name}", ${3:String}, + "${4:Option description.}") do |${5:opt}| + ${6} + end +snippet tc + require "test/unit" + + require "${1:library_file_name}" + + class Test${2:$1} < Test::Unit::TestCase + def test_${3:case_name} + ${4} + end + end +snippet ts + require "test/unit" + + require "tc_${1:test_case_file}" + require "tc_${2:test_case_file}"${3} +snippet as + assert(${1:test}, "${2:Failure message.}")${3} +snippet ase + assert_equal(${1:expected}, ${2:actual})${3} +snippet asne + assert_not_equal(${1:unexpected}, ${2:actual})${3} +snippet asid + assert_in_delta(${1:expected_float}, ${2:actual_float}, ${3:2 ** -20})${4} +snippet asio + assert_instance_of(${1:ExpectedClass}, ${2:actual_instance})${3} +snippet asko + assert_kind_of(${1:ExpectedKind}, ${2:actual_instance})${3} +snippet asn + assert_nil(${1:instance})${2} +snippet asnn + assert_not_nil(${1:instance})${2} +snippet asm + assert_match(/${1:expected_pattern}/, ${2:actual_string})${3} +snippet asnm + assert_no_match(/${1:unexpected_pattern}/, ${2:actual_string})${3} +snippet aso + assert_operator(${1:left}, :${2:operator}, ${3:right})${4} +snippet asr + assert_raise(${1:Exception}) { ${2} } +snippet asnr + assert_nothing_raised(${1:Exception}) { ${2} } +snippet asrt + assert_respond_to(${1:object}, :${2:method})${3} +snippet ass assert_same(..) + assert_same(${1:expected}, ${2:actual})${3} +snippet ass assert_send(..) + assert_send([${1:object}, :${2:message}, ${3:args}])${4} +snippet asns + assert_not_same(${1:unexpected}, ${2:actual})${3} +snippet ast + assert_throws(:${1:expected}) { ${2} } +snippet asnt + assert_nothing_thrown { ${1} } +snippet fl + flunk("${1:Failure message.}")${2} +# Benchmark.bmbm do .. end +snippet bm- + TESTS = ${1:10_000} + Benchmark.bmbm do |results| + ${2} + end +snippet rep + results.report("${1:name}:") { TESTS.times { ${2} }} +# Marshal.dump(.., file) +snippet Md + File.open(${1:"path/to/file.dump"}, "wb") { |${2:file}| Marshal.dump(${3:obj}, $2) }${4} +# Mashal.load(obj) +snippet Ml + File.open(${1:"path/to/file.dump"}, "rb") { |${2:file}| Marshal.load($2) }${3} +# deep_copy(..) +snippet deec + Marshal.load(Marshal.dump(${1:obj_to_copy}))${2} +snippet Pn- + PStore.new(${1:"file_name.pstore"})${2} +snippet tra + transaction(${1:true}) { ${2} } +# xmlread(..) +snippet xml- + REXML::Document.new(File.read(${1:"path/to/file"}))${2} +# xpath(..) { .. } +snippet xpa + elements.each(${1:"//Xpath"}) do |${2:node}| + ${3} + end +# class_from_name() +snippet clafn + split("::").inject(Object) { |par, const| par.const_get(const) } +# singleton_class() +snippet sinc + class << self; self end +snippet nam + namespace :${1:`Filename()`} do + ${2} + end +snippet tas + desc "${1:Task description\}" + task :${2:task_name => [:dependent, :tasks]} do + ${3} + end diff --git a/vim/bundle/snipmate.vim/snippets/sh.snippets b/vim/bundle/snipmate.vim/snippets/sh.snippets new file mode 100644 index 0000000..f035126 --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/sh.snippets @@ -0,0 +1,28 @@ +# #!/bin/bash +snippet #! + #!/bin/bash + +snippet if + if [[ ${1:condition} ]]; then + ${2:#statements} + fi +snippet elif + elif [[ ${1:condition} ]]; then + ${2:#statements} +snippet for + for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do + ${3:#statements} + done +snippet wh + while [[ ${1:condition} ]]; do + ${2:#statements} + done +snippet until + until [[ ${1:condition} ]]; do + ${2:#statements} + done +snippet case + case ${1:word} in + ${2:pattern}) + ${3};; + esac diff --git a/vim/bundle/snipmate.vim/snippets/snippet.snippets b/vim/bundle/snipmate.vim/snippets/snippet.snippets new file mode 100644 index 0000000..854c058 --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/snippet.snippets @@ -0,0 +1,7 @@ +# snippets for making snippets :) +snippet snip + snippet ${1:trigger} + ${2} +snippet msnip + snippet ${1:trigger} ${2:description} + ${3} diff --git a/vim/bundle/snipmate.vim/snippets/tcl.snippets b/vim/bundle/snipmate.vim/snippets/tcl.snippets new file mode 100644 index 0000000..1fe1cb9 --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/tcl.snippets @@ -0,0 +1,92 @@ +# #!/usr/bin/env tclsh +snippet #! + #!/usr/bin/env tclsh + +# Process +snippet pro + proc ${1:function_name} {${2:args}} { + ${3:#body ...} + } +#xif +snippet xif + ${1:expr}? ${2:true} : ${3:false} +# Conditional +snippet if + if {${1}} { + ${2:# body...} + } +# Conditional if..else +snippet ife + if {${1}} { + ${2:# body...} + } else { + ${3:# else...} + } +# Conditional if..elsif..else +snippet ifee + if {${1}} { + ${2:# body...} + } elseif {${3}} { + ${4:# elsif...} + } else { + ${5:# else...} + } +# If catch then +snippet ifc + if { [catch {${1:#do something...}} ${2:err}] } { + ${3:# handle failure...} + } +# Catch +snippet catch + catch {${1}} ${2:err} ${3:options} +# While Loop +snippet wh + while {${1}} { + ${2:# body...} + } +# For Loop +snippet for + for {set ${2:var} 0} {$$2 < ${1:count}} {${3:incr} $2} { + ${4:# body...} + } +# Foreach Loop +snippet fore + foreach ${1:x} {${2:#list}} { + ${3:# body...} + } +# after ms script... +snippet af + after ${1:ms} ${2:#do something} +# after cancel id +snippet afc + after cancel ${1:id or script} +# after idle +snippet afi + after idle ${1:script} +# after info id +snippet afin + after info ${1:id} +# Expr +snippet exp + expr {${1:#expression here}} +# Switch +snippet sw + switch ${1:var} { + ${3:pattern 1} { + ${4:#do something} + } + default { + ${2:#do something} + } + } +# Case +snippet ca + ${1:pattern} { + ${2:#do something} + }${3} +# Namespace eval +snippet ns + namespace eval ${1:path} {${2:#script...}} +# Namespace current +snippet nsc + namespace current diff --git a/vim/bundle/snipmate.vim/snippets/tex.snippets b/vim/bundle/snipmate.vim/snippets/tex.snippets new file mode 100644 index 0000000..22f7316 --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/tex.snippets @@ -0,0 +1,115 @@ +# \begin{}...\end{} +snippet begin + \begin{${1:env}} + ${2} + \end{$1} +# Tabular +snippet tab + \begin{${1:tabular}}{${2:c}} + ${3} + \end{$1} +# Align(ed) +snippet ali + \begin{align${1:ed}} + ${2} + \end{align$1} +# Gather(ed) +snippet gat + \begin{gather${1:ed}} + ${2} + \end{gather$1} +# Equation +snippet eq + \begin{equation} + ${1} + \end{equation} +# Unnumbered Equation +snippet \ + \\[ + ${1} + \\] +# Enumerate +snippet enum + \begin{enumerate} + \item ${1} + \end{enumerate} +# Itemize +snippet item + \begin{itemize} + \item ${1} + \end{itemize} +# Description +snippet desc + \begin{description} + \item[${1}] ${2} + \end{description} +# Matrix +snippet mat + \begin{${1:p/b/v/V/B/small}matrix} + ${2} + \end{$1matrix} +# Cases +snippet cas + \begin{cases} + ${1:equation}, &\text{ if }${2:case}\\ + ${3} + \end{cases} +# Split +snippet spl + \begin{split} + ${1} + \end{split} +# Part +snippet part + \part{${1:part name}} % (fold) + \label{prt:${2:$1}} + ${3} + % part $2 (end) +# Chapter +snippet cha + \chapter{${1:chapter name}} % (fold) + \label{cha:${2:$1}} + ${3} + % chapter $2 (end) +# Section +snippet sec + \section{${1:section name}} % (fold) + \label{sec:${2:$1}} + ${3} + % section $2 (end) +# Sub Section +snippet sub + \subsection{${1:subsection name}} % (fold) + \label{sub:${2:$1}} + ${3} + % subsection $2 (end) +# Sub Sub Section +snippet subs + \subsubsection{${1:subsubsection name}} % (fold) + \label{ssub:${2:$1}} + ${3} + % subsubsection $2 (end) +# Paragraph +snippet par + \paragraph{${1:paragraph name}} % (fold) + \label{par:${2:$1}} + ${3} + % paragraph $2 (end) +# Sub Paragraph +snippet subp + \subparagraph{${1:subparagraph name}} % (fold) + \label{subp:${2:$1}} + ${3} + % subparagraph $2 (end) +snippet itd + \item[${1:description}] ${2:item} +snippet figure + ${1:Figure}~\ref{${2:fig:}}${3} +snippet table + ${1:Table}~\ref{${2:tab:}}${3} +snippet listing + ${1:Listing}~\ref{${2:list}}${3} +snippet section + ${1:Section}~\ref{${2:sec:}}${3} +snippet page + ${1:page}~\pageref{${2}}${3} diff --git a/vim/bundle/snipmate.vim/snippets/vim.snippets b/vim/bundle/snipmate.vim/snippets/vim.snippets new file mode 100644 index 0000000..64e7807 --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/vim.snippets @@ -0,0 +1,32 @@ +snippet header + " File: ${1:`expand('%:t')`} + " Author: ${2:`g:snips_author`} + " Description: ${3} + ${4:" Last Modified: `strftime("%B %d, %Y")`} +snippet guard + if exists('${1:did_`Filename()`}') || &cp${2: || version < 700} + finish + endif + let $1 = 1${3} +snippet f + fun ${1:function_name}(${2}) + ${3:" code} + endf +snippet for + for ${1:needle} in ${2:haystack} + ${3:" code} + endfor +snippet wh + while ${1:condition} + ${2:" code} + endw +snippet if + if ${1:condition} + ${2:" code} + endif +snippet ife + if ${1:condition} + ${2} + else + ${3} + endif diff --git a/vim/bundle/snipmate.vim/snippets/zsh.snippets b/vim/bundle/snipmate.vim/snippets/zsh.snippets new file mode 100644 index 0000000..7aee05b --- /dev/null +++ b/vim/bundle/snipmate.vim/snippets/zsh.snippets @@ -0,0 +1,58 @@ +# #!/bin/zsh +snippet #! + #!/bin/zsh + +snippet if + if ${1:condition}; then + ${2:# statements} + fi +snippet ife + if ${1:condition}; then + ${2:# statements} + else + ${3:# statements} + fi +snippet elif + elif ${1:condition} ; then + ${2:# statements} +snippet for + for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do + ${3:# statements} + done +snippet fore + for ${1:item} in ${2:list}; do + ${3:# statements} + done +snippet wh + while ${1:condition}; do + ${2:# statements} + done +snippet until + until ${1:condition}; do + ${2:# statements} + done +snippet repeat + repeat ${1:integer}; do + ${2:# statements} + done +snippet case + case ${1:word} in + ${2:pattern}) + ${3};; + esac +snippet select + select ${1:answer} in ${2:choices}; do + ${3:# statements} + done +snippet ( + ( ${1:#statements} ) +snippet { + { ${1:#statements} } +snippet [ + [[ ${1:test} ]] +snippet always + { ${1:try} } always { ${2:always} } +snippet fun + function ${1:name} (${2:args}) { + ${3:# body} + } diff --git a/vim/bundle/snipmate.vim/syntax/snippet.vim b/vim/bundle/snipmate.vim/syntax/snippet.vim new file mode 100644 index 0000000..3aa8571 --- /dev/null +++ b/vim/bundle/snipmate.vim/syntax/snippet.vim @@ -0,0 +1,19 @@ +" Syntax highlighting for snippet files (used for snipMate.vim) +" Hopefully this should make snippets a bit nicer to write! +syn match snipComment '^#.*' +syn match placeHolder '\${\d\+\(:.\{-}\)\=}' contains=snipCommand +syn match tabStop '\$\d\+' +syn match snipCommand '[^\\]`.\{-}`' +syn match snippet '^snippet.*' transparent contains=multiSnipText,snipKeyword +syn match multiSnipText '\S\+ \zs.*' contained +syn match snipKeyword '^snippet'me=s+8 contained +syn match snipError "^[^#s\t].*$" + +hi link snipComment Comment +hi link multiSnipText String +hi link snipKeyword Keyword +hi link snipComment Comment +hi link placeHolder Special +hi link tabStop Special +hi link snipCommand String +hi link snipError Error diff --git a/vim/bundle/syntastic/README.markdown b/vim/bundle/syntastic/README.markdown new file mode 100644 index 0000000..c6712c5 --- /dev/null +++ b/vim/bundle/syntastic/README.markdown @@ -0,0 +1,142 @@ + , + / \,,_ .'| + ,{{| /}}}}/_.' _____________________________________________ + }}}}` '{{' '. / \ + {{{{{ _ ;, \ / Gentlemen, \ + ,}}}}}} /o`\ ` ;) | | + {{{{{{ / ( | this is ... | + }}}}}} | \ | | + {{{{{{{{ \ \ | | + }}}}}}}}} '.__ _ | | _____ __ __ _ | + {{{{{{{{ /`._ (_\ / | / ___/__ ______ / /_____ ______/ /_(_)____ | + }}}}}}' | //___/ --=: \__ \/ / / / __ \/ __/ __ `/ ___/ __/ / ___/ | + jgs `{{{{` | '--' | ___/ / /_/ / / / / /_/ /_/ (__ ) /_/ / /__ | + }}}` | /____/\__, /_/ /_/\__/\__,_/____/\__/_/\___/ | + | /____/ | + | / + \_____________________________________________/ + + + + +Syntastic is a syntax checking plugin that runs files through external syntax +checkers and displays any resulting errors to the user. This can be done on +demand, or automatically as files are saved. If syntax errors are detected, the +user is notified and is happy because they didn't have to compile their code or +execute their script to find them. + +At the time of this writing, syntax checking plugins exist for applescript, c, +coffee, cpp, css, cucumber, cuda, docbk, erlang, eruby, fortran, +gentoo_metadata, go, haml, haskell, html, javascript, json, less, lua, matlab, +perl, php, puppet, python, rst, ruby, sass/scss, sh, tcl, tex, vala, xhtml, +xml, xslt, yaml, zpt + +Screenshot +---------- + +Below is a screenshot showing the methods that Syntastic uses to display syntax +errors. Note that, in practise, you will only have a subset of these methods +enabled. + +![Screenshot 1](https://github.com/scrooloose/syntastic/raw/master/_assets/screenshot_1.png) + +1. Errors are loaded into the location list for the corresponding window. +2. When the cursor is on a line containing an error, the error message is echoed in the command window. +3. Signs are placed beside lines with errors - note that warnings are displayed in a different color. +4. There is a configurable statusline flag you can include in your statusline config. +5. Hover the mouse over a line containing an error and the error message is displayed as a balloon. +6. (not shown) Highlighting errors with syntax highlighting. Erroneous parts of lines can be highlighted. + +Installation +------------ + +[pathogen.vim](https://github.com/tpope/vim-pathogen) is the recommended way to install syntastic. + + cd ~/.vim/bundle + git clone https://github.com/scrooloose/syntastic.git + +Then reload vim, run `:helptags`, and check out `:help syntastic.txt`. + + +Google group +------------ + +To get information or make suggestions check out the [google group](https://groups.google.com/group/vim-syntastic). + + +Changelog +--------- + +2.2.0 (24-dec-2011) + + * only do syntax checks when files are saved (not when first opened) - add g:syntastic_check_on_open option to get the old behavior back + * bug fix with echoing error messages; fixes incompatability with cmd-t (datanoise) + * dont allow warnings to mask errors when signing/echoing errors (ashikase) + * auto close location list when leaving buffer. (millermedeiros) + * update errors appropriately when :SyntasticToggleMode is called + * updates/fixes to existing checkers: + * javascript/jshint (millermedeiros) + * javascript/jslint + * c (kongo2002) + * Support for new filetypes: + * JSON (millermedeiros, tocer) + * rst (reStructuredText files) (JNRowe) + * gentoo-metadata (JNRowe) + +2.1.0 (14-dec-2011) + + * when the cursor is on a line containing an error, echo the + * error msg (kevinw) + * various bug fixes and refactoring + * updates/fixes to existing checkers: + * html (millermedeiros) + * erlang + * coffeescript + * javascript + * sh + * php (add support for phpcs - technosophos) + * add an applescript checker (Zhai Cai) + * add support for hyphenated filetypes (JNRowe) + +2.0.0 (2-dec-2011): + + * Add support for highlighting the erroneous parts of lines (kstep) + * Add support for displaying errors via balloons (kstep) + * Add syntastic_mode_map option to give more control over when checking should be done. + * Add :SyntasticCheck command to force a syntax check - useful in passive mode (justone). + * Add the option to automatically close the location list, but not automatically open it (milkypostman) + * Add syntastic_auto_jump option to automatically jump to the first error (milkypostman) + * Only source syntax checkers as needed - instead of loading all of them when vim starts + + * Support for new filetypes: + * less (julienXX) + * docbook (tpope) + * matlab (jasongraham) + * go (dtjm) + * puppet (uggedal, roman, zsprackett) + * haskell (baldo, roman) + * tcl (et) + * vala (kstep) + * cuda (temporaer) + * css (oryband, sitedyno) + * fortran (Karl Yngve LervÃ¥g) + * xml (kusnier) + * xslt (kusnier) + * erlang (kTT) + * zpt (claytron) + + * updates to existing checkers: + * javascript (mogren, bryanforbes, cjab, ajduncan) + * sass/scss (tmm1, atourino, dlee, epeli) + * ruby (changa) + * perl (harleypig) + * haml (bmihelac) + * php (kstep, docteurklein) + * python (kstep, soli) + * lua (kstep) + * html (kstep) + * xhtml (kstep) + * c (kongo2002, brandonw) + * cpp (kongo2002) + * coffee (industrial) + * eruby (sergevm) diff --git a/vim/bundle/syntastic/_assets/screenshot_1.png b/vim/bundle/syntastic/_assets/screenshot_1.png new file mode 100644 index 0000000..c1b69f4 Binary files /dev/null and b/vim/bundle/syntastic/_assets/screenshot_1.png differ diff --git a/vim/bundle/syntastic/autoload/syntastic/c.vim b/vim/bundle/syntastic/autoload/syntastic/c.vim new file mode 100644 index 0000000..b2880ab --- /dev/null +++ b/vim/bundle/syntastic/autoload/syntastic/c.vim @@ -0,0 +1,171 @@ +if exists("g:loaded_syntastic_c_autoload") + finish +endif +let g:loaded_syntastic_c_autoload = 1 + +let s:save_cpo = &cpo +set cpo&vim + +" initialize c/cpp syntax checker handlers +function! s:Init() + let s:handlers = [] + let s:cflags = {} + + call s:RegHandler('gtk', 'syntastic#c#CheckPKG', + \ ['gtk', 'gtk+-2.0', 'gtk+', 'glib-2.0', 'glib']) + call s:RegHandler('glib', 'syntastic#c#CheckPKG', + \ ['glib', 'glib-2.0', 'glib']) + call s:RegHandler('glade', 'syntastic#c#CheckPKG', + \ ['glade', 'libglade-2.0', 'libglade']) + call s:RegHandler('libsoup', 'syntastic#c#CheckPKG', + \ ['libsoup', 'libsoup-2.4', 'libsoup-2.2']) + call s:RegHandler('webkit', 'syntastic#c#CheckPKG', + \ ['webkit', 'webkit-1.0']) + call s:RegHandler('cairo', 'syntastic#c#CheckPKG', + \ ['cairo', 'cairo']) + call s:RegHandler('pango', 'syntastic#c#CheckPKG', + \ ['pango', 'pango']) + call s:RegHandler('libxml', 'syntastic#c#CheckPKG', + \ ['libxml', 'libxml-2.0', 'libxml']) + call s:RegHandler('freetype', 'syntastic#c#CheckPKG', + \ ['freetype', 'freetype2', 'freetype']) + call s:RegHandler('SDL', 'syntastic#c#CheckPKG', + \ ['sdl', 'sdl']) + call s:RegHandler('opengl', 'syntastic#c#CheckPKG', + \ ['opengl', 'gl']) + call s:RegHandler('ruby', 'syntastic#c#CheckRuby', []) + call s:RegHandler('Python\.h', 'syntastic#c#CheckPython', []) + call s:RegHandler('php\.h', 'syntastic#c#CheckPhp', []) +endfunction + +" search the first 100 lines for include statements that are +" given in the handlers dictionary +function! syntastic#c#SearchHeaders() + let includes = '' + let files = [] + let found = [] + let lines = filter(getline(1, 100), 'v:val =~# "#\s*include"') + + " search current buffer + for line in lines + let file = matchstr(line, '"\zs\S\+\ze"') + if file != '' + call add(files, file) + continue + endif + for handler in s:handlers + if line =~# handler["regex"] + let includes .= call(handler["func"], handler["args"]) + call add(found, handler["regex"]) + break + endif + endfor + endfor + + " search included headers + for hfile in files + if hfile != '' + let filename = expand('%:p:h') . ((has('win32') || has('win64')) ? + \ '\' : '/') . hfile + try + let lines = readfile(filename, '', 100) + catch /E484/ + continue + endtry + let lines = filter(lines, 'v:val =~# "#\s*include"') + for handler in s:handlers + if index(found, handler["regex"]) != -1 + continue + endif + for line in lines + if line =~# handler["regex"] + let includes .= call(handler["func"], handler["args"]) + call add(found, handler["regex"]) + break + endif + endfor + endfor + endif + endfor + + return includes +endfunction + +" try to find library with 'pkg-config' +" search possible libraries from first to last given +" argument until one is found +function! syntastic#c#CheckPKG(name, ...) + if executable('pkg-config') + if !has_key(s:cflags, a:name) + for i in range(a:0) + let l:cflags = system('pkg-config --cflags '.a:000[i]) + " since we cannot necessarily trust the pkg-config exit code + " we have to check for an error output as well + if v:shell_error == 0 && l:cflags !~? 'not found' + let l:cflags = ' '.substitute(l:cflags, "\n", '', '') + let s:cflags[a:name] = l:cflags + return l:cflags + endif + endfor + else + return s:cflags[a:name] + endif + endif + return '' +endfunction + +" try to find PHP includes with 'php-config' +function! syntastic#c#CheckPhp() + if executable('php-config') + if !exists('s:php_flags') + let s:php_flags = system('php-config --includes') + let s:php_flags = ' ' . substitute(s:php_flags, "\n", '', '') + endif + return s:php_flags + endif + return '' +endfunction + +" try to find the ruby headers with 'rbconfig' +function! syntastic#c#CheckRuby() + if executable('ruby') + if !exists('s:ruby_flags') + let s:ruby_flags = system('ruby -r rbconfig -e ' + \ . '''puts Config::CONFIG["archdir"]''') + let s:ruby_flags = substitute(s:ruby_flags, "\n", '', '') + let s:ruby_flags = ' -I' . s:ruby_flags + endif + return s:ruby_flags + endif + return '' +endfunction + +" try to find the python headers with distutils +function! syntastic#c#CheckPython() + if executable('python') + if !exists('s:python_flags') + let s:python_flags = system('python -c ''from distutils import ' + \ . 'sysconfig; print sysconfig.get_python_inc()''') + let s:python_flags = substitute(s:python_flags, "\n", '', '') + let s:python_flags = ' -I' . s:python_flags + endif + return s:python_flags + endif + return '' +endfunction + +" return a handler dictionary object +function! s:RegHandler(regex, function, args) + let handler = {} + let handler["regex"] = a:regex + let handler["func"] = function(a:function) + let handler["args"] = a:args + call add(s:handlers, handler) +endfunction + +call s:Init() + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/vim/bundle/syntastic/doc/syntastic.txt b/vim/bundle/syntastic/doc/syntastic.txt new file mode 100644 index 0000000..6b9b6e4 --- /dev/null +++ b/vim/bundle/syntastic/doc/syntastic.txt @@ -0,0 +1,527 @@ +*syntastic.txt* Syntax checking on the fly has never been so pimp. +*syntastic* + + + It's a bird! It's a plane! ZOMG It's ... ~ + + _____ __ __ _ ~ + / ___/__ ______ / /_____ ______/ /_(_)____ ~ + \__ \/ / / / __ \/ __/ __ `/ ___/ __/ / ___/ ~ + ___/ / /_/ / / / / /_/ /_/ (__ ) /_/ / /__ ~ + /____/\__, /_/ /_/\__/\__,_/____/\__/_/\___/ ~ + /____/ ~ + + + + Reference Manual~ + + +============================================================================== +CONTENTS *syntastic-contents* + + 1.Intro...................................|syntastic-intro| + 2.Functionality provided..................|syntastic-functionality| + 2.1.The statusline flag...............|syntastic-statusline-flag| + 2.2.Error signs.......................|syntastic-error-signs| + 2.3.Error window......................|syntastic-error-window| + 3.Commands................................|syntastic-commands| + 4.Options.................................|syntastic-options| + 5.Writing syntax checkers.................|syntastic-syntax-checkers| + 6.About...................................|syntastic-about| + 7.Changelog...............................|syntastic-changelog| + 8.Credits.................................|syntastic-credits| + 9.License.................................|syntastic-license| + + +============================================================================== +1. Intro *syntastic-intro* + +Syntastic is a syntax checking plugin that runs files through external syntax +checkers. This can be done on demand, or automatically as files are saved and +opened. If syntax errors are detected, the user is notified and is happy +because they didn't have to compile their code or execute their script to find +them. + +Syntastic comes in two parts: the syntax checker plugins, and the core script +(i.e. syntastic.vim). The syntax checker plugins are defined on a per-filetype +basis where each one wraps up an external syntax checking program. The core +script delegates off to these plugins and uses their output to provide the +syntastic functionality. At the time of this writing, syntax checking plugins +exist for c, coffee, cpp, css, cucumber, cuda, docbk, erlang, eruby, fortran, +go, haml, haskell, html, javascript, less, lua, matlab, perl, php, puppet, +python, ruby, sass/scss, sh, tcl, tex, vala, xhtml, xml, xslt, zpt + +Take a look in the syntax_checkers directory for the most up to date list. + +If your language is not supported then see |syntastic-syntax-checkers| for +details on how to implement a syntax checking plugin, and be sure to send me a +patch ;-) + +This plugin is currently only recommended for *nix users. It is functional on +Windows, but since the syntax checking plugins shell out, the command window +briefly appears whenever one is executed. + + +============================================================================== +2. Functionality provided *syntastic-functionality* + +Syntax checking can be done automatically or on demand (see +|'syntastic_mode_map'| for configuring this). + +When syntax checking is done, the features below can be used to notify the +user of errors. See |syntastic-options| for how to configure and +activate/deactivate these features. + + * A configurable statusline flag + * Lines with errors can have |signs| placed beside them - where a different + sign is used for errors and warnings. + * A |location-list| can be displayed with error messages for erroneous + buffers. + * Offending parts of lines can be highlighted (this functionality is only + provided by some syntax checkers). + * Balloons (if compiled in) can be used to display error messages for + erroneous lines when hovering the mouse over them. + + +Note: This functionality is only available if a syntax checker plugin is +present for the filetype of the buffer in question. See +|syntastic-syntax-checkers| for details. + +------------------------------------------------------------------------------ +2.1. The statusline flag *syntastic-statusline-flag* + +To use the statusline flag, this must appear in your |'statusline'| setting > + %{SyntasticStatuslineFlag()} +< +Something like this could be more useful: > + set statusline+=%#warningmsg# + set statusline+=%{SyntasticStatuslineFlag()} + set statusline+=%* +< +When syntax errors are detected a flag will be shown. The content of the flag +is derived from the |syntastic_stl_format| option +------------------------------------------------------------------------------ +2.2. Error signs *syntastic-error-signs* + +Syntastic uses the |:sign| commands to mark lines with errors and warnings in +the sign column. To enable this feature, use the |'syntastic_enable_signs'| +option. + +------------------------------------------------------------------------------ +2.3. The error window *:Errors* *syntastic-error-window* + +You can use the :Errors command to display the errors for the current buffer +in the |location-list|. + +Note that when you use :Errors, the current location list is overwritten with +Syntastic's own location list. + + +============================================================================== +3. Commands *syntastic-commands* + +:Errors *:SyntasticErrors* + +When errors have been detected, use this command to pop up the |location-list| +and display the error messages. + + +:SyntasticToggleMode *:SyntasticToggleMode* + +Toggles syntastic between active and passive mode. See |'syntastic_mode_map'| +for more info. + + +:SyntasticCheck *:SyntasticCheck* + +Manually cause a syntax check to be done. Useful in passive mode, or if the +current filetype is set to passive. See |'syntastic_mode_map'| for more info. + + +============================================================================== +4. Options *syntastic-options* + + + *'syntastic_check_on_open'* +Default: 0 +If enabled, syntastic will do syntax checks when buffers are first loaded as +well as on saving > + let g:syntastic_check_on_open=1 +< + + *'syntastic_echo_current_error'* +Default: 1 +If enabled, syntastic will error message associated with the current line to +the command window. If multiple errors are found, the first will be used. > + let g:syntastic_echo_current_error=1 +< + + *'syntastic_enable_signs'* +Default: 1 +Use this option to tell syntastic whether to use the |:sign| interface to mark +syntax errors: > + let g:syntastic_enable_signs=1 +< + + *'syntastic_enable_balloons'* +Default: 1 +Use this option to tell syntastic whether to display error messages in balloons +when the mouse is hovered over erroneous lines: > + let g:syntastic_enable_balloons = 1 +< +Note that vim must be compiled with |+balloon_eval|. + + *'syntastic_enable_highlighting'* +Default: 1 +Use this option to tell syntastic whether to use syntax highlighting to mark +errors (where possible). Highlighting can be turned off with the following > + let g:syntastic_enable_highlighting = 0 +< + + *'syntastic_auto_jump'* +Default: 0 +Enable this option if you want the cursor to jump to the first detected error +when saving or opening a file: > + let g:syntastic_auto_jump=1 +< + + *'syntastic_auto_loc_list'* +Default: 2 +Use this option to tell syntastic to automatically open and/or close the +|location-list| (see |syntastic-error-window|). + +When set to 0 the error window will not be opened or closed automatically. > + let g:syntastic_auto_loc_list=0 +< + +When set to 1 the error window will be automatically opened when errors are +detected, and closed when none are detected. > + let g:syntastic_auto_loc_list=1 +< +When set to 2 the error window will be automatically closed when no errors are +detected, but not opened automatically. > + let g:syntastic_auto_loc_list=2 +< + + *'syntastic_mode_map'* +Default: { "mode": "active", + "active_filetypes": [], + "passive_filetypes": [] } + +Use this option to fine tune when automatic syntax checking is done (or not +done). + +The option should be set to something like: > + + let g:syntastic_mode_map = { 'mode': 'active', + \ 'active_filetypes': ['ruby', 'php'], + \ 'passive_filetypes': ['puppet'] } +< + +"mode" can be mapped to one of two values - "active" or "passive". When set to +active, syntastic does automatic checking whenever a buffer is saved or +initially opened. When set to "passive" syntastic only checks when the user +calls :SyntasticCheck. + +The exceptions to these rules are defined with "active_filetypes" and +"passive_filetypes". In passive mode, automatic checks are still done +for all filetypes in the "active_filetypes" array. In active mode, +automatic checks are not done for any filetypes in the +"passive_filetypes" array. + +At runtime, the |:SyntasticToggleMode| command can be used to switch between +active and passive mode. + +If any of "mode", "active_filetypes", or "passive_filetypes" are not specified +then they will default to their default value as above. + + *'syntastic_quiet_warnings'* + +Use this option if you only care about syntax errors, not warnings. When set, +this option has the following effects: + * no |signs| appear unless there is at least one error, whereupon both + errors and warnings are displayed + * the |'syntastic_auto_loc_list'| option only pops up the error window if + there's at least one error, whereupon both errors and warnings are + displayed +> + let g:syntastic_quiet_warnings=1 +< + + *'syntastic_stl_format'* + +Default: [Syntax: line:%F (%t)] +Use this option to control what the syntastic statusline text contains. Several +magic flags are availble to insert information: + %e - number of errors + %w - number of warnings + %t - total number of warnings and errors + %fe - line number of first error + %fw - line number of first warning + %F - line number of first warning or error + +Several additional flags are available to hide text under certain conditions: + %E{...} - hide the text in the brackets unless there are errors + %W{...} - hide the text in the brackets unless there are warnings + %B{...} - hide the text in the brackets unless there are both warnings AND + errors +These flags cant be nested. + +Example: > + let g:syntastic_stl_format = '[%E{Err: %fe #%e}%B{, }%W{Warn: %fw #%w}]' +< +If this format is used and the current buffer has 5 errors and 1 warning +starting on lines 20 and 10 respectively then this would appear on the +statusline: > + [Err: 20 #5, Warn: 10 #1] +< +If the buffer had 2 warnings, starting on line 5 then this would appear: > + [Warn: 5 #2] +< + + +============================================================================== +5. Writing syntax checkers *syntastic-syntax-checkers* + + +A syntax checker plugin is really nothing more than a single function. You +should define them in ~/.vim/syntax_checkers/.vim, but this is +purely for convenience; Syntastic doesn't actually care where these functions +are defined. + +A syntax checker plugin must define a function of the form: +> + SyntaxCheckers__GetLocList() +< +The output of this function must be of the same format as that returned by +the |getloclist()| function. See |getloclist()| and |getqflist()| for +details. + +To achieve this, the function should call |SyntasticMake()| or shell out to a +syntax checker, parse the output and munge it into the format. + +There are several syntax checker plugins provided with this plugin. The ruby +one is a good example of |SyntasticMake()|, while the haml one is a good +example of how to create the data structure manually. + + +SyntasticMake({options}) *SyntasticMake()* + {options} must be a dictionary. It can contain "makeprg" and "errorformat" + as keys (both optional). + + SyntasticMake will run |:lmake| with the given |'makeprg'| and + |'errorformat'| (using the current settings if none are supplied). It will + store the resulting error list and use it to provide all of the + |syntastic-functionality|. The previous makeprg and errorformat settings + will then be restored, as well as the location list for the window. From + the user's perspective, it will be as though |:lmake| was never run. + + Note that the given "makeprg" and "errorformat" will be set using |:let-&|, + so you should not escape spaces. + + +============================================================================== +6. About *syntastic-about* + +The author of syntastic is a mighty wild stallion, hear him roar! > + _ _ _____ _____ ___ ___ ___ ____ _ _ _ + | \ | | ____| ____|_ _|_ _|_ _/ ___| | | | | + | \| | _| | _| | | | | | | | _| |_| | | + | |\ | |___| |___ | | | | | | |_| | _ |_| + |_| \_|_____|_____|___|___|___\____|_| |_(_) + +< +He likes to trot around in the back yard reading his emails and sipping a +scolding hot cup of Earl Grey. Email him at martin.grenfell at gmail dot com. +He can also be found trolling the #vim channel on the freenode IRC network as +scrooloose. + +Bug reports, feedback, suggestions etc are welcomed. + + +The latest official releases will be on vim.org at some point. + +The latest dev versions are on github + http://github.com/scrooloose/syntastic + +============================================================================== +7. Changelog *syntastic-changelog* + +next + - Support for new filetypes: + - yaml + +2.2.0 + - only do syntax checks when files are saved (not when first opened) - add + g:syntastic_check_on_open option to get the old behavior back + - bug fix with echoing error messages; fixes incompatability with cmd-t (datanoise) + - dont allow warnings to mask errors when signing/echoing errors (ashikase) + - auto close location list when leaving buffer. (millermedeiros) + - update errors appropriately when :SyntasticToggleMode is called + - updates/fixes to existing checkers: + - javascript/jshint (millermedeiros) + - javascript/jslint + - c (kongo2002) + - Support for new filetypes: + - JSON (millermedeiros, tocer) + - rst (reStructuredText files) (JNRowe) + - gentoo-metadata (JNRowe) + + +2.1.0 + - when the cursor is on a line containing an error, echo the + error msg (kevinw) + - various bug fixes and refactoring + - updates/fixes to existing checkers: + - html (millermedeiros) + - erlang + - coffeescript + - javascript + - sh + - php (add support for phpcs - technosophos) + - add an applescript checker (Zhai Cai) + - add support for hyphenated filetypes (JNRowe) + +2.0.0 + - Add support for highlighting the erroneous parts of lines (kstep) + - Add support for displaying errors via balloons (kstep) + - Add syntastic_mode_map option to give more control over when checking + should be done. + - Add :SyntasticCheck command to force a syntax check - useful in passive + mode (justone). + - Add the option to automatically close the location list, but not + automatically open it (milkypostman) + - Add syntastic_auto_jump option to automatically jump to the first + error (milkypostman) + - Only source syntax checkers as needed - instead of loading all of them + when vim starts + + - Support for new filetypes: + - less (julienXX) + - docbook (tpope) + - matlab (jasongraham) + - go (dtjm) + - puppet (uggedal, roman, zsprackett) + - haskell (baldo, roman) + - tcl (et) + - vala (kstep) + - cuda (temporaer) + - css (oryband, sitedyno) + - fortran (Karl Yngve LervÃ¥g) + - xml (kusnier) + - xslt (kusnier) + - erlang (kTT) + - zpt (claytron) + + - updates to existing checkers: + - javascript (mogren, bryanforbes, cjab, ajduncan) + - sass/scss (tmm1, atourino, dlee, epeli) + - ruby (changa) + - perl (harleypig) + - haml (bmihelac) + - php (kstep, docteurklein) + - python (kstep, soli) + - lua (kstep) + - html (kstep) + - xhtml (kstep) + - c (kongo2002, brandonw) + - cpp (kongo2002) + - coffee (industrial) + - eruby (sergevm) + +1.2.0 + - New syntax checkers from github:kongo2002 + - c (thanks also to github:jperras) + - cpp + - lua + - sh (thanks also to github:jmcantrell) + - add coffee syntax checked by github:lstoll + - add tex syntax checker + - make html checker play nicer with html5, thanks to github:enaeseth + - escape filenames properly when invoking syntax checkers, thanks to + github:jmcantrell + - adjust the ruby syntax checker to avoid some common annoying warnings, + thanks to github:robertwahler + +1.1.0 [codenamed: tpimp] + - Dont load rubygems for ruby/eruby syntax checkers. Thanks tpope. + - Improve the javascript syntax checker to catch some warnings that were + getting missed. Thanks tpope. + - Dont automatically focus the error window. Thanks tpope. + - Add support for cucumber [tpope], haskell & perl [Anthony Carapetis], + and xhtml + - Add commands to enable/disable syntax checking at runtime. See :help + syntastic-commands. + - Add an option to specifiy syntax checkers that should be disabled by + default. See :help syntastic_disabled_filetypes. + - Dont use :signs if vim wasnt compiled with support for them. +) + +============================================================================== +8. Credits *syntastic-credits* + +Thanks to the following people for testing, bug reports, patches etc. They own, +hard. + + Benji Fisher (benjifisher) + Lance Fetters (ashikase) + datanoise + Giuseppe Rota (grota) + tocer + James Rowe (JNRowe) + Zhai Cai + Matt Butcher (technosophos) + Kevin Watters (kevinw) + Miller Medeiros (millermedeiros) + Pawel Salata (kTT) + Fjölnir Ãsgeirsson (aptiva) + Clayton Parker (claytron) + S. Zachariah Sprackett (zsprackett) + Sylvain Soliman (soli) + Ricardo Catalinas Jiménez (jimenezrick) + kusnier + Klein Florian (docteurklein) + sitedyno + Matthew Batema (mlb-) + Nate Jones (justone) + sergevm + Karl Yngve LervÃ¥g + Pavel Argentov (argent-smith) + Andy Duncan (ajduncan) + Antonio Touriño (atourino) + Chad Jablonski (cjab) + Roman Gonzalez (roman) + Tom Wieland (industrial) + Ory Band (oryband) + Esa-Matti Suuronen (epeli) + Brandon Waskiewicz (brandonw) + dlee + temporaer + Jason Graham (jasongraham) + Sam Nguyen (dtjm) + Claes Mogren (mogren) + Eivind Uggedal (uggedal) + kstep + Andreas Baldeau (baldo) + Eric Thomas (et) + Brian Donovan (eventualbuddha) + Bryan Forbes (bryanforbes) + Aman Gupta (tmm1) + Donald Ephraim Curtis (milkypostman) + Dominique Rose-Rosette (changa) + Harley Pig (harleypig) + bmihelac + Julien Blanchard (julienXX) + Gregor Uhlenheuer (kongo2002) + Lincoln Stoll + Tim Carey-Smith (halorgium) + Tim Pope (tpope) + Travis Jeffery + Anthony Carapetis + + +============================================================================== +9. License *syntastic-license* + +Syntastic is released under the wtfpl. +See http://sam.zoy.org/wtfpl/COPYING. diff --git a/vim/bundle/syntastic/plugin/syntastic.vim b/vim/bundle/syntastic/plugin/syntastic.vim new file mode 100644 index 0000000..ccfbb79 --- /dev/null +++ b/vim/bundle/syntastic/plugin/syntastic.vim @@ -0,0 +1,562 @@ +"============================================================================ +"File: syntastic.vim +"Description: vim plugin for on the fly syntax checking +"Maintainer: Martin Grenfell +"Version: 2.2.0 +"Last Change: 24 Dec, 2011 +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ + +if exists("g:loaded_syntastic_plugin") + finish +endif +let g:loaded_syntastic_plugin = 1 + +let s:running_windows = has("win16") || has("win32") || has("win64") + +if !s:running_windows + let s:uname = system('uname') +endif + +if !exists("g:syntastic_enable_signs") + let g:syntastic_enable_signs = 1 +endif +if !has('signs') + let g:syntastic_enable_signs = 0 +endif + +if !exists("g:syntastic_enable_balloons") + let g:syntastic_enable_balloons = 1 +endif +if !has('balloon_eval') + let g:syntastic_enable_balloons = 0 +endif + +if !exists("g:syntastic_enable_highlighting") + let g:syntastic_enable_highlighting = 1 +endif + +if !exists("g:syntastic_echo_current_error") + let g:syntastic_echo_current_error = 1 +endif + +if !exists("g:syntastic_auto_loc_list") + let g:syntastic_auto_loc_list = 2 +endif + +if !exists("g:syntastic_auto_jump") + let syntastic_auto_jump=0 +endif + +if !exists("g:syntastic_quiet_warnings") + let g:syntastic_quiet_warnings = 0 +endif + +if !exists("g:syntastic_stl_format") + let g:syntastic_stl_format = '[Syntax: line:%F (%t)]' +endif + +if !exists("g:syntastic_mode_map") + let g:syntastic_mode_map = {} +endif + +if !has_key(g:syntastic_mode_map, "mode") + let g:syntastic_mode_map['mode'] = 'active' +endif + +if !has_key(g:syntastic_mode_map, "active_filetypes") + let g:syntastic_mode_map['active_filetypes'] = [] +endif + +if !has_key(g:syntastic_mode_map, "passive_filetypes") + let g:syntastic_mode_map['passive_filetypes'] = [] +endif + +if !exists("g:syntastic_check_on_open") + let g:syntastic_check_on_open = 0 +endif + +command! SyntasticToggleMode call s:ToggleMode() +command! SyntasticCheck call s:UpdateErrors(0) redraw! +command! Errors call s:ShowLocList() + +highlight link SyntasticError SpellBad +highlight link SyntasticWarning SpellCap + +augroup syntastic + if g:syntastic_echo_current_error + autocmd cursormoved * call s:EchoCurrentError() + endif + + autocmd BufReadPost * if g:syntastic_check_on_open | call s:UpdateErrors(1) | endif + autocmd BufWritePost * call s:UpdateErrors(1) + + autocmd BufWinEnter * if empty(&bt) | call s:AutoToggleLocList() | endif + autocmd BufWinLeave * if empty(&bt) | lclose | endif +augroup END + + +"refresh and redraw all the error info for this buf when saving or reading +function! s:UpdateErrors(auto_invoked) + if !empty(&buftype) + return + endif + + if !a:auto_invoked || s:ModeMapAllowsAutoChecking() + call s:CacheErrors() + end + + if s:BufHasErrorsOrWarningsToDisplay() + call setloclist(0, s:LocList()) + endif + + if g:syntastic_enable_balloons + call s:RefreshBalloons() + endif + + if g:syntastic_enable_signs + call s:RefreshSigns() + endif + + if g:syntastic_auto_jump && s:BufHasErrorsOrWarningsToDisplay() + silent! ll + endif + + call s:AutoToggleLocList() +endfunction + +"automatically open/close the location list window depending on the users +"config and buffer error state +function! s:AutoToggleLocList() + if s:BufHasErrorsOrWarningsToDisplay() + if g:syntastic_auto_loc_list == 1 + call s:ShowLocList() + endif + else + if g:syntastic_auto_loc_list > 0 + + "TODO: this will close the loc list window if one was opened by + "something other than syntastic + lclose + endif + endif +endfunction + +"lazy init the loc list for the current buffer +function! s:LocList() + if !exists("b:syntastic_loclist") + let b:syntastic_loclist = [] + endif + return b:syntastic_loclist +endfunction + +"clear the loc list for the buffer +function! s:ClearLocList() + let b:syntastic_loclist = [] +endfunction + +"detect and cache all syntax errors in this buffer +" +"depends on a function called SyntaxCheckers_{&ft}_GetLocList() existing +"elsewhere +function! s:CacheErrors() + call s:ClearLocList() + + if filereadable(expand("%")) + + "sub - for _ in filetypes otherwise we cant name syntax checker + "functions legally for filetypes like "gentoo-metadata" + let fts = substitute(&ft, '-', '_', 'g') + for ft in split(fts, '\.') + if s:Checkable(ft) + let errors = SyntaxCheckers_{ft}_GetLocList() + "make errors have type "E" by default + call SyntasticAddToErrors(errors, {'type': 'E'}) + call extend(s:LocList(), errors) + endif + endfor + endif +endfunction + +"toggle the g:syntastic_mode_map['mode'] +function! s:ToggleMode() + if g:syntastic_mode_map['mode'] == "active" + let g:syntastic_mode_map['mode'] = "passive" + else + let g:syntastic_mode_map['mode'] = "active" + endif + + call s:ClearLocList() + call s:UpdateErrors(1) + + echo "Syntastic: " . g:syntastic_mode_map['mode'] . " mode enabled" +endfunction + +"check the current filetypes against g:syntastic_mode_map to determine whether +"active mode syntax checking should be done +function! s:ModeMapAllowsAutoChecking() + let fts = split(&ft, '\.') + + if g:syntastic_mode_map['mode'] == 'passive' + "check at least one filetype is active + let actives = g:syntastic_mode_map["active_filetypes"] + return !empty(filter(fts, 'index(actives, v:val) != -1')) + else + "check no filetypes are passive + let passives = g:syntastic_mode_map["passive_filetypes"] + return empty(filter(fts, 'index(passives, v:val) != -1')) + endif +endfunction + +"return true if there are cached errors/warnings for this buf +function! s:BufHasErrorsOrWarnings() + return !empty(s:LocList()) +endfunction + +"return true if there are cached errors for this buf +function! s:BufHasErrors() + return len(s:ErrorsForType('E')) > 0 +endfunction + +function! s:BufHasErrorsOrWarningsToDisplay() + return s:BufHasErrors() || (!g:syntastic_quiet_warnings && s:BufHasErrorsOrWarnings()) +endfunction + +function! s:ErrorsForType(type) + return s:FilterLocList({'type': a:type}) +endfunction + +function! s:Errors() + return s:ErrorsForType("E") +endfunction + +function! s:Warnings() + return s:ErrorsForType("W") +endfunction + +"Filter a loc list (defaults to s:LocList()) by a:filters +"e.g. +" s:FilterLocList({'bufnr': 10, 'type': 'e'}) +" +"would return all errors in s:LocList() for buffer 10. +" +"Note that all comparisons are done with ==? +function! s:FilterLocList(filters, ...) + let llist = a:0 ? a:1 : s:LocList() + + let rv = deepcopy(llist) + for error in llist + for key in keys(a:filters) + let rhs = a:filters[key] + if type(rhs) == 1 "string + let rhs = '"' . rhs . '"' + endif + + call filter(rv, "v:val['".key."'] ==? " . rhs) + endfor + endfor + return rv +endfunction + +if g:syntastic_enable_signs + "use >> to display syntax errors in the sign column + sign define SyntasticError text=>> texthl=error + sign define SyntasticWarning text=>> texthl=todo +endif + +"start counting sign ids at 5000, start here to hopefully avoid conflicting +"with any other code that places signs (not sure if this precaution is +"actually needed) +let s:first_sign_id = 5000 +let s:next_sign_id = s:first_sign_id + +"place signs by all syntax errs in the buffer +function! s:SignErrors() + if s:BufHasErrorsOrWarningsToDisplay() + + let errors = s:FilterLocList({'bufnr': bufnr('')}) + for i in errors + let sign_type = 'SyntasticError' + if i['type'] ==? 'W' + let sign_type = 'SyntasticWarning' + endif + + if !s:WarningMasksError(i, errors) + exec "sign place ". s:next_sign_id ." line=". i['lnum'] ." name=". sign_type ." file=". expand("%:p") + call add(s:BufSignIds(), s:next_sign_id) + let s:next_sign_id += 1 + endif + endfor + endif +endfunction + +"return true if the given error item is a warning that, if signed, would +"potentially mask an error if displayed at the same time +function! s:WarningMasksError(error, llist) + if a:error['type'] !=? 'w' + return 0 + endif + + return len(s:FilterLocList({ 'type': "E", 'lnum': a:error['lnum'] }, a:llist)) > 0 +endfunction + +"remove the signs with the given ids from this buffer +function! s:RemoveSigns(ids) + for i in a:ids + exec "sign unplace " . i + call remove(s:BufSignIds(), index(s:BufSignIds(), i)) + endfor +endfunction + +"get all the ids of the SyntaxError signs in the buffer +function! s:BufSignIds() + if !exists("b:syntastic_sign_ids") + let b:syntastic_sign_ids = [] + endif + return b:syntastic_sign_ids +endfunction + +"update the error signs +function! s:RefreshSigns() + let old_signs = copy(s:BufSignIds()) + call s:SignErrors() + call s:RemoveSigns(old_signs) + let s:first_sign_id = s:next_sign_id +endfunction + +"display the cached errors for this buf in the location list +function! s:ShowLocList() + if !empty(s:LocList()) + let num = winnr() + lopen + if num != winnr() + wincmd p + endif + endif +endfunction + +"remove all error highlights from the window +function! s:ClearErrorHighlights() + for match in getmatches() + if stridx(match['group'], 'Syntastic') == 0 + call matchdelete(match['id']) + endif + endfor +endfunction + +"check if a syntax checker exists for the given filetype - and attempt to +"load one +function! s:Checkable(ft) + if !exists("g:loaded_" . a:ft . "_syntax_checker") + exec "runtime syntax_checkers/" . a:ft . ".vim" + endif + + return exists("*SyntaxCheckers_". a:ft ."_GetLocList") +endfunction + +"set up error ballons for the current set of errors +function! s:RefreshBalloons() + let b:syntastic_balloons = {} + if s:BufHasErrorsOrWarningsToDisplay() + for i in s:LocList() + let b:syntastic_balloons[i['lnum']] = i['text'] + endfor + set beval bexpr=SyntasticErrorBalloonExpr() + endif +endfunction + +"print as much of a:msg as possible without "Press Enter" prompt appearing +function! s:WideMsg(msg) + let old_ruler = &ruler + let old_showcmd = &showcmd + + let msg = strpart(a:msg, 0, winwidth(0)-1) + + "This is here because it is possible for some error messages to begin with + "\n which will cause a "press enter" prompt. I have noticed this in the + "javascript:jshint checker and have been unable to figure out why it + "happens + let msg = substitute(msg, "\n", "", "g") + + set noruler noshowcmd + redraw + + echo msg + + let &ruler=old_ruler + let &showcmd=old_showcmd +endfunction + +"echo out the first error we find for the current line in the cmd window +function! s:EchoCurrentError() + "If we have an error or warning at the current line, show it + let errors = s:FilterLocList({'lnum': line("."), "type": 'e'}) + let warnings = s:FilterLocList({'lnum': line("."), "type": 'w'}) + + let b:syntastic_echoing_error = len(errors) || len(warnings) + if len(errors) + return s:WideMsg(errors[0]['text']) + endif + if len(warnings) + return s:WideMsg(warnings[0]['text']) + endif + + "Otherwise, clear the status line + if b:syntastic_echoing_error + echo + let b:syntastic_echoing_error = 0 + endif +endfunction + +"return a string representing the state of buffer according to +"g:syntastic_stl_format +" +"return '' if no errors are cached for the buffer +function! SyntasticStatuslineFlag() + if s:BufHasErrorsOrWarningsToDisplay() + let errors = s:Errors() + let warnings = s:Warnings() + + let output = g:syntastic_stl_format + + "hide stuff wrapped in %E(...) unless there are errors + let output = substitute(output, '\C%E{\([^}]*\)}', len(errors) ? '\1' : '' , 'g') + + "hide stuff wrapped in %W(...) unless there are warnings + let output = substitute(output, '\C%W{\([^}]*\)}', len(warnings) ? '\1' : '' , 'g') + + "hide stuff wrapped in %B(...) unless there are both errors and warnings + let output = substitute(output, '\C%B{\([^}]*\)}', (len(warnings) && len(errors)) ? '\1' : '' , 'g') + + "sub in the total errors/warnings/both + let output = substitute(output, '\C%w', len(warnings), 'g') + let output = substitute(output, '\C%e', len(errors), 'g') + let output = substitute(output, '\C%t', len(s:LocList()), 'g') + + "first error/warning line num + let output = substitute(output, '\C%F', s:LocList()[0]['lnum'], 'g') + + "first error line num + let output = substitute(output, '\C%fe', len(errors) ? errors[0]['lnum'] : '', 'g') + + "first warning line num + let output = substitute(output, '\C%fw', len(warnings) ? warnings[0]['lnum'] : '', 'g') + + return output + else + return '' + endif +endfunction + +"A wrapper for the :lmake command. Sets up the make environment according to +"the options given, runs make, resets the environment, returns the location +"list +" +"a:options can contain the following keys: +" 'makeprg' +" 'errorformat' +" +"The corresponding options are set for the duration of the function call. They +"are set with :let, so dont escape spaces. +" +"a:options may also contain: +" 'defaults' - a dict containing default values for the returned errors +function! SyntasticMake(options) + let old_loclist = getloclist(0) + let old_makeprg = &makeprg + let old_shellpipe = &shellpipe + let old_shell = &shell + let old_errorformat = &errorformat + + if !s:running_windows && (s:uname !~ "FreeBSD") + "this is a hack to stop the screen needing to be ':redraw'n when + "when :lmake is run. Otherwise the screen flickers annoyingly + let &shellpipe='&>' + let &shell = '/bin/bash' + endif + + if has_key(a:options, 'makeprg') + let &makeprg = a:options['makeprg'] + endif + + if has_key(a:options, 'errorformat') + let &errorformat = a:options['errorformat'] + endif + + silent lmake! + let errors = getloclist(0) + + call setloclist(0, old_loclist) + let &makeprg = old_makeprg + let &errorformat = old_errorformat + let &shellpipe=old_shellpipe + let &shell=old_shell + + if !s:running_windows && s:uname =~ "FreeBSD" + redraw! + endif + + if has_key(a:options, 'defaults') + call SyntasticAddToErrors(errors, a:options['defaults']) + endif + + return errors +endfunction + +"get the error balloon for the current mouse position +function! SyntasticErrorBalloonExpr() + if !exists('b:syntastic_balloons') + return '' + endif + return get(b:syntastic_balloons, v:beval_lnum, '') +endfunction + +"highlight the list of errors (a:errors) using matchadd() +" +"a:termfunc is provided to highlight errors that do not have a 'col' key (and +"hence cant be done automatically). This function must take one arg (an error +"item) and return a regex to match that item in the buffer. +" +"an optional boolean third argument can be provided to force a:termfunc to be +"used regardless of whether a 'col' key is present for the error +function! SyntasticHighlightErrors(errors, termfunc, ...) + if !g:syntastic_enable_highlighting + return + endif + + call s:ClearErrorHighlights() + + let force_callback = a:0 && a:1 + for item in a:errors + let group = item['type'] == 'E' ? 'SyntasticError' : 'SyntasticWarning' + if item['col'] && !force_callback + let lastcol = col([item['lnum'], '$']) + let lcol = min([lastcol, item['col']]) + call matchadd(group, '\%'.item['lnum'].'l\%'.lcol.'c') + else + let term = a:termfunc(item) + if len(term) > 0 + call matchadd(group, '\%' . item['lnum'] . 'l' . term) + endif + endif + endfor +endfunction + +"take a list of errors and add default values to them from a:options +function! SyntasticAddToErrors(errors, options) + for i in range(0, len(a:errors)-1) + for key in keys(a:options) + if empty(a:errors[i][key]) + let a:errors[i][key] = a:options[key] + endif + endfor + endfor + return a:errors +endfunction + +" vim: set et sts=4 sw=4: diff --git a/vim/bundle/syntastic/syntax_checkers/applescript.vim b/vim/bundle/syntastic/syntax_checkers/applescript.vim new file mode 100644 index 0000000..eb7a6f2 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/applescript.vim @@ -0,0 +1,43 @@ +"============================================================================== +" FileName: applescript.vim +" Desc: Syntax checking plugin for syntastic.vim +" Author: Zhao Cai +" Email: caizhaoff@gmail.com +" Version: 0.2.1 +" Date Created: Thu 09 Sep 2011 10:30:09 AM EST +" Last Modified: Fri 09 Dec 2011 01:10:24 PM EST +" +" History: 0.1.0 - working, but it will run the script everytime to check +" syntax. Should use osacompile but strangely it does not give +" errors. +" +" 0.2.0 - switch to osacompile, it gives less errors compared +" with osascript. +" +" 0.2.1 - remove g:syntastic_applescript_tempfile. use +" tempname() instead. +" +" License: This program is free software. It comes without any +" warranty, to the extent permitted by applicable law. You can +" redistribute it and/or modify it under the terms of the Do What The +" Fuck You Want To Public License, Version 2, as published by Sam +" Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ + +if exists("loaded_applescript_syntax_checker") + finish +endif +let loaded_applescript_syntax_checker = 1 + +"bail if the user doesnt have osacompile installed +if !executable("osacompile") + finish +endif + +function! SyntaxCheckers_applescript_GetLocList() + let makeprg = 'osacompile -o ' . tempname() . '.scpt '. shellescape(expand('%')) + let errorformat = '%f:%l:%m' + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/c.vim b/vim/bundle/syntastic/syntax_checkers/c.vim new file mode 100644 index 0000000..8bd486b --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/c.vim @@ -0,0 +1,156 @@ +"============================================================================ +"File: c.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Gregor Uhlenheuer +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ + +" In order to also check header files add this to your .vimrc: +" (this usually creates a .gch file in your source directory) +" +" let g:syntastic_c_check_header = 1 +" +" To disable the search of included header files after special +" libraries like gtk and glib add this line to your .vimrc: +" +" let g:syntastic_c_no_include_search = 1 +" +" To enable header files being re-checked on every file write add the +" following line to your .vimrc. Otherwise the header files are checked only +" one time on initially loading the file. +" In order to force syntastic to refresh the header includes simply +" unlet b:syntastic_c_includes. Then the header files are being re-checked on +" the next file write. +" +" let g:syntastic_c_auto_refresh_includes = 1 +" +" Alternatively you can set the buffer local variable b:syntastic_c_cflags. +" If this variable is set for the current buffer no search for additional +" libraries is done. I.e. set the variable like this: +" +" let b:syntastic_c_cflags = ' -I/usr/include/libsoup-2.4' +" +" In order to add some custom include directories that should be added to the +" gcc command line you can add those to the global variable +" g:syntastic_c_include_dirs. This list can be used like this: +" +" let g:syntastic_c_include_dirs = [ 'includes', 'headers' ] +" +" Moreover it is possible to add additional compiler options to the syntax +" checking execution via the variable 'g:syntastic_c_compiler_options': +" +" let g:syntastic_c_compiler_options = ' -ansi' +" +" Using the global variable 'g:syntastic_c_remove_include_errors' you can +" specify whether errors of files included via the g:syntastic_c_include_dirs' +" setting are removed from the result set: +" +" let g:syntastic_c_remove_include_errors = 1 + +if exists('loaded_c_syntax_checker') + finish +endif +let loaded_c_syntax_checker = 1 + +if !executable('gcc') + finish +endif + +let s:save_cpo = &cpo +set cpo&vim + +" default include directories +let s:default_includes = [ '.', '..', 'include', 'includes', + \ '../include', '../includes' ] + +" uniquify the input list +function! s:Unique(list) + let l = [] + for elem in a:list + if index(l, elem) == -1 + let l = add(l, elem) + endif + endfor + return l +endfunction + +" get the gcc include directory argument depending on the default +" includes and the optional user-defined 'g:syntastic_c_include_dirs' +function! s:GetIncludeDirs() + let include_dirs = s:default_includes + + if exists('g:syntastic_c_include_dirs') + call extend(include_dirs, g:syntastic_c_include_dirs) + endif + + return join(map(s:Unique(include_dirs), '"-I" . v:val'), ' ') +endfunction + +function! SyntaxCheckers_c_GetLocList() + let makeprg = 'gcc -fsyntax-only -std=gnu99 '.shellescape(expand('%')). + \ ' '.s:GetIncludeDirs() + let errorformat = '%-G%f:%s:,%-G%f:%l: %#error: %#(Each undeclared '. + \ 'identifier is reported only%.%#,%-G%f:%l: %#error: %#for '. + \ 'each function it appears%.%#,%-GIn file included%.%#,'. + \ '%-G %#from %f:%l\,,%f:%l:%c: %m,%f:%l: %trror: %m,%f:%l: %m' + + " determine whether to parse header files as well + if expand('%') =~? '.h$' + if exists('g:syntastic_c_check_header') + let makeprg = 'gcc -c '.shellescape(expand('%')). + \ ' '.s:GetIncludeDirs() + else + return [] + endif + endif + + " add optional user-defined compiler options + if exists('g:syntastic_c_compiler_options') + let makeprg .= g:syntastic_c_compiler_options + endif + + " check if the user manually set some cflags + if !exists('b:syntastic_c_cflags') + " check whether to search for include files at all + if !exists('g:syntastic_c_no_include_search') || + \ g:syntastic_c_no_include_search != 1 + " refresh the include file search if desired + if exists('g:syntastic_c_auto_refresh_includes') && + \ g:syntastic_c_auto_refresh_includes != 0 + let makeprg .= syntastic#c#SearchHeaders() + else + " search for header includes if not cached already + if !exists('b:syntastic_c_includes') + let b:syntastic_c_includes = syntastic#c#SearchHeaders() + endif + let makeprg .= b:syntastic_c_includes + endif + endif + else + " use the user-defined cflags + let makeprg .= b:syntastic_c_cflags + endif + + " process makeprg + let errors = SyntasticMake({ 'makeprg': makeprg, + \ 'errorformat': errorformat }) + + " filter the processed errors if desired + if exists('g:syntastic_c_remove_include_errors') && + \ g:syntastic_c_remove_include_errors != 0 + return filter(errors, + \ 'has_key(v:val, "bufnr") && v:val["bufnr"]=='.bufnr('')) + else + return errors + endif +endfunction + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/vim/bundle/syntastic/syntax_checkers/coffee.vim b/vim/bundle/syntastic/syntax_checkers/coffee.vim new file mode 100644 index 0000000..59dca75 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/coffee.vim @@ -0,0 +1,27 @@ +"============================================================================ +"File: coffee.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Lincoln Stoll +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ +if exists("loaded_coffee_syntax_checker") + finish +endif +let loaded_coffee_syntax_checker = 1 + +"bail if the user doesnt have coffee installed +if !executable("coffee") + finish +endif + +function! SyntaxCheckers_coffee_GetLocList() + let makeprg = 'coffee -c -l -o /tmp '.shellescape(expand('%')) + let errorformat = 'Syntax%trror: In %f\, %m on line %l,%EError: In %f\, Parse error on line %l: %m,%EError: In %f\, %m on line %l,%W%f(%l): lint warning: %m,%-Z%p^,%W%f(%l): warning: %m,%-Z%p^,%E%f(%l): SyntaxError: %m,%-Z%p^,%-G%.%#' + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/cpp.vim b/vim/bundle/syntastic/syntax_checkers/cpp.vim new file mode 100644 index 0000000..1bacf93 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/cpp.vim @@ -0,0 +1,94 @@ +"============================================================================ +"File: cpp.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Gregor Uhlenheuer +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ + +" in order to also check header files add this to your .vimrc: +" (this usually creates a .gch file in your source directory) +" +" let g:syntastic_cpp_check_header = 1 +" +" To disable the search of included header files after special +" libraries like gtk and glib add this line to your .vimrc: +" +" let g:syntastic_cpp_no_include_search = 1 +" +" To enable header files being re-checked on every file write add the +" following line to your .vimrc. Otherwise the header files are checked only +" one time on initially loading the file. +" In order to force syntastic to refresh the header includes simply +" unlet b:syntastic_cpp_includes. Then the header files are being re-checked +" on the next file write. +" +" let g:syntastic_cpp_auto_refresh_includes = 1 +" +" Alternatively you can set the buffer local variable b:syntastic_cpp_cflags. +" If this variable is set for the current buffer no search for additional +" libraries is done. I.e. set the variable like this: +" +" let b:syntastic_cpp_cflags = ' -I/usr/include/libsoup-2.4' +" +" Moreover it is possible to add additional compiler options to the syntax +" checking execution via the variable 'g:syntastic_cpp_compiler_options': +" +" let g:syntastic_cpp_compiler_options = ' -std=c++0x' + +if exists('loaded_cpp_syntax_checker') + finish +endif +let loaded_cpp_syntax_checker = 1 + +if !executable('g++') + finish +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_cpp_GetLocList() + let makeprg = 'g++ -fsyntax-only '.shellescape(expand('%')) + let errorformat = '%-G%f:%s:,%f:%l:%c: %m,%f:%l: %m' + + if expand('%') =~? '\%(.h\|.hpp\|.hh\)$' + if exists('g:syntastic_cpp_check_header') + let makeprg = 'g++ -c '.shellescape(expand('%')) + else + return [] + endif + endif + + if exists('g:syntastic_cpp_compiler_options') + let makeprg .= g:syntastic_cpp_compiler_options + endif + + if !exists('b:syntastic_cpp_cflags') + if !exists('g:syntastic_cpp_no_include_search') || + \ g:syntastic_cpp_no_include_search != 1 + if exists('g:syntastic_cpp_auto_refresh_includes') && + \ g:syntastic_cpp_auto_refresh_includes != 0 + let makeprg .= syntastic#c#SearchHeaders() + else + if !exists('b:syntastic_cpp_includes') + let b:syntastic_cpp_includes = syntastic#c#SearchHeaders() + endif + let makeprg .= b:syntastic_cpp_includes + endif + endif + else + let makeprg .= b:syntastic_cpp_cflags + endif + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/vim/bundle/syntastic/syntax_checkers/css.vim b/vim/bundle/syntastic/syntax_checkers/css.vim new file mode 100644 index 0000000..99a16b8 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/css.vim @@ -0,0 +1,31 @@ +"============================================================================ +"File: css.vim +"Description: Syntax checking plugin for syntastic.vim using `csslint` CLI tool (http://csslint.net). +"Maintainer: Ory Band +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +"============================================================================ +if exists("loaded_css_syntax_checker") + finish +endif +let loaded_css_syntax_checker = 1 + +" Bail if the user doesn't have `csslint` installed. +if !executable("csslint") + finish +endif + +function! SyntaxCheckers_css_GetLocList() + let makeprg = 'csslint --format=compact '.shellescape(expand('%')) + + " Print CSS Lint's error/warning messages from compact format. Ignores blank lines. + let errorformat = '%-G,%-G%f: lint free!,%f: line %l\, col %c\, %trror - %m,%f: line %l\, col %c\, %tarning - %m,%f: line %l\, col %c\, %m,' + + return SyntasticMake({ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr("")} }) + +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/cucumber.vim b/vim/bundle/syntastic/syntax_checkers/cucumber.vim new file mode 100644 index 0000000..c9a87e1 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/cucumber.vim @@ -0,0 +1,27 @@ +"============================================================================ +"File: cucumber.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ +if exists("loaded_cucumber_syntax_checker") + finish +endif +let loaded_cucumber_syntax_checker = 1 + +"bail if the user doesnt have cucumber installed +if !executable("cucumber") + finish +endif + +function! SyntaxCheckers_cucumber_GetLocList() + let makeprg = 'cucumber --dry-run --quiet --strict --format pretty '.shellescape(expand('%')) + let errorformat = '%f:%l:%c:%m,%W %.%# (%m),%-Z%f:%l:%.%#,%-G%.%#' + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/cuda.vim b/vim/bundle/syntastic/syntax_checkers/cuda.vim new file mode 100644 index 0000000..816505e --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/cuda.vim @@ -0,0 +1,37 @@ +"============================================================================ +"File: cuda.vim +"Description: Syntax checking plugin for syntastic.vim +" +"Author: Hannes Schulz +" +"============================================================================ + +" in order to also check header files add this to your .vimrc: +" (this creates an empty .syntastic_dummy.cu file in your source directory) +" +" let g:syntastic_cuda_check_header = 1 + +if exists('loaded_cuda_syntax_checker') + finish +endif +let loaded_cuda_syntax_checker = 1 + +if !executable('nvcc') + finish +endif + +function! SyntaxCheckers_cuda_GetLocList() + let makeprg = 'nvcc --cuda -O0 -I . -Xcompiler -fsyntax-only '.shellescape(expand('%')).' -o /dev/null' + "let errorformat = '%-G%f:%s:,%f:%l:%c: %m,%f:%l: %m' + let errorformat = '%*[^"]"%f"%*\D%l: %m,"%f"%*\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,"%f"\, line %l%*\D%c%*[^ ] %m,%D%*\a[%*\d]: Entering directory `%f'',%X%*\a[%*\d]: Leaving directory `%f'',%D%*\a: Entering directory `%f'',%X%*\a: Leaving directory `%f'',%DMaking %*\a in %f,%f|%l| %m' + + if expand('%') =~? '\%(.h\|.hpp\|.cuh\)$' + if exists('g:syntastic_cuda_check_header') + let makeprg = 'echo > .syntastic_dummy.cu ; nvcc --cuda -O0 -I . .syntastic_dummy.cu -Xcompiler -fsyntax-only -include '.shellescape(expand('%')).' -o /dev/null' + else + return [] + endif + endif + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/docbk.vim b/vim/bundle/syntastic/syntax_checkers/docbk.vim new file mode 100644 index 0000000..cd360e4 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/docbk.vim @@ -0,0 +1,29 @@ +"============================================================================ +"File: docbk.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ +if exists("loaded_docbk_syntax_checker") + finish +endif +let loaded_docbk_syntax_checker = 1 + +"bail if the user doesnt have tidy or grep installed +if !executable("xmllint") + finish +endif + +function! SyntaxCheckers_docbk_GetLocList() + + let makeprg="xmllint --xinclude --noout --postvalid ".shellescape(expand(%:p)) + let errorformat='%E%f:%l: parser error : %m,%W%f:%l: parser warning : %m,%E%f:%l:%.%# validity error : %m,%W%f:%l:%.%# validity warning : %m,%-Z%p^,%-C%.%#,%-G%.%#' + let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) + + return loclist +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/erlang.vim b/vim/bundle/syntastic/syntax_checkers/erlang.vim new file mode 100644 index 0000000..d7dceae --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/erlang.vim @@ -0,0 +1,42 @@ +"============================================================================ +"File: erlang.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Pawel Salata +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ +if exists("loaded_erlang_syntax_checker") + finish +endif +let loaded_erlang_syntax_checker = 1 + +"bail if the user doesnt have escript installed +if !executable("escript") + finish +endif + +let s:check_file = expand(':p:h') . '/erlang_check_file.erl' + +function! SyntaxCheckers_erlang_GetLocList() + let extension = expand('%:e') + if match(extension, 'hrl') >= 0 + return [] + endif + let shebang = getbufline(bufnr('%'), 1)[0] + if len(shebang) > 0 + if match(shebang, 'escript') >= 0 + let makeprg = 'escript -s '.shellescape(expand('%:p')) + else + let makeprg = s:check_file . ' '. shellescape(expand('%:p')) + endif + else + let makeprg = s:check_file . ' ' . shellescape(expand('%:p')) + endif + let errorformat = '%f:%l:\ %tarning:\ %m,%E%f:%l:\ %m' + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/erlang_check_file.erl b/vim/bundle/syntastic/syntax_checkers/erlang_check_file.erl new file mode 100755 index 0000000..8a85bf6 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/erlang_check_file.erl @@ -0,0 +1,12 @@ +#!/usr/bin/env escript +-export([main/1]). + +main([FileName]) -> + compile:file(FileName, [warn_obsolete_guard, + warn_unused_import, + warn_shadow_vars, + warn_export_vars, + strong_validation, + report, + {i, filename:dirname(FileName) ++ "/../include"} + ]). diff --git a/vim/bundle/syntastic/syntax_checkers/eruby.vim b/vim/bundle/syntastic/syntax_checkers/eruby.vim new file mode 100644 index 0000000..fcff063 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/eruby.vim @@ -0,0 +1,34 @@ +"============================================================================ +"File: eruby.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ +if exists("loaded_eruby_syntax_checker") + finish +endif +let loaded_eruby_syntax_checker = 1 + +"bail if the user doesnt have ruby or cat installed +if !executable("ruby") || !executable("cat") + finish +endif + +function! SyntaxCheckers_eruby_GetLocList() + if has('win32') || has('win64') + let makeprg='sed "s/<\%=/<\%/g" '. shellescape(expand("%")) . ' \| ruby -e "require \"erb\"; puts ERB.new(ARGF.read, nil, \"-\").src" \| ruby -c' + else + let makeprg='sed "s/<\%=/<\%/g" '. shellescape(expand("%")) . ' \| RUBYOPT= ruby -e "require \"erb\"; puts ERB.new(ARGF.read, nil, \"-\").src" \| RUBYOPT= ruby -c' + endif + + let errorformat='%-GSyntax OK,%E-:%l: syntax error\, %m,%Z%p^,%W-:%l: warning: %m,%Z%p^,%-C%.%#' + return SyntasticMake({ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr("")} }) + +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/fortran.vim b/vim/bundle/syntastic/syntax_checkers/fortran.vim new file mode 100644 index 0000000..ee176f2 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/fortran.vim @@ -0,0 +1,44 @@ +"============================================================================ +"File: fortran.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Karl Yngve LervÃ¥g +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +"Note: This syntax checker uses gfortran with the option -fsyntax-only +" to check for errors and warnings. Additional flags may be +" supplied through both local and global variables, +" b:syntastic_fortran_flags, +" g:syntastic_fortran_flags. +" This is particularly useful when the source requires module files +" in order to compile (that is when it needs modules defined in +" separate files). +" +"============================================================================ + +if exists("loaded_fortran_syntax_checker") + finish +endif +let loaded_fortran_syntax_checker = 1 + +"bail if the user doesnt have fortran installed +if !executable("gfortran") + finish +endif + +if !exists('g:syntastic_fortran_flags') + let g:syntastic_fortran_flags = '' +endif + +function! SyntaxCheckers_fortran_GetLocList() + let makeprg = 'gfortran -fsyntax-only' + let makeprg .= g:syntastic_fortran_flags + if exists('b:syntastic_fortran_flags') + let makeprg .= b:syntastic_fortran_flags + endif + let makeprg .= ' ' . shellescape(expand('%')) + let errorformat = '%-C %#,%-C %#%.%#,%A%f:%l.%c:,%Z%m,%G%.%#' + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/gentoo_metadata.vim b/vim/bundle/syntastic/syntax_checkers/gentoo_metadata.vim new file mode 100644 index 0000000..d016a88 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/gentoo_metadata.vim @@ -0,0 +1,37 @@ +"============================================================================ +"File: gentoo-metadata.vim +"Description: Syntax checking plugin for Gentoo's metadata.xml files +"Maintainer: James Rowe +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ + +" The DTDs required to validate metadata.xml files are available in +" $PORTDIR/metadata/dtd, and these local files can be used to significantly +" speed up validation. You can create a catalog file with: +" +" xmlcatalog --create --add rewriteURI http://www.gentoo.org/dtd/ \ +" ${PORTDIR:-/usr/portage}/metadata/dtd/ /etc/xml/gentoo +" +" See xmlcatalog(1) and http://www.xmlsoft.org/catalog.html for more +" information. + +if exists("loaded_gentoo_metadata_syntax_checker") + finish +endif +let loaded_gentoo_metadata_syntax_checker = 1 + +"bail if the user doesn't have xmllint installed +if !executable("xmllint") + finish +endif + +runtime syntax_checkers/xml.vim + +function! SyntaxCheckers_gentoo_metadata_GetLocList() + return SyntaxCheckers_xml_GetLocList() +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/go.vim b/vim/bundle/syntastic/syntax_checkers/go.vim new file mode 100644 index 0000000..b5b5ea8 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/go.vim @@ -0,0 +1,27 @@ +"============================================================================ +"File: go.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Sam Nguyen +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ +if exists("loaded_go_syntax_checker") + finish +endif +let loaded_go_syntax_checker = 1 + +"bail if the user doesnt have 6g installed +if !executable("6g") + finish +endif + +function! SyntaxCheckers_go_GetLocList() + let makeprg = '6g -o /dev/null %' + let errorformat = '%E%f:%l: %m' + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/haml.vim b/vim/bundle/syntastic/syntax_checkers/haml.vim new file mode 100644 index 0000000..b9ad6ad --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/haml.vim @@ -0,0 +1,26 @@ +"============================================================================ +"File: haml.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ +if exists("loaded_haml_syntax_checker") + finish +endif +let loaded_haml_syntax_checker = 1 + +"bail if the user doesnt have the haml binary installed +if !executable("haml") + finish +endif + +function! SyntaxCheckers_haml_GetLocList() + let makeprg = "haml -c " . shellescape(expand("%")) + let errorformat = 'Haml error on line %l: %m,Syntax error on line %l: %m,%-G%.%#' + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/haskell.vim b/vim/bundle/syntastic/syntax_checkers/haskell.vim new file mode 100644 index 0000000..07c55e8 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/haskell.vim @@ -0,0 +1,37 @@ +"============================================================================ +"File: haskell.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Anthony Carapetis +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ +if exists("loaded_haskell_syntax_checker") + finish +endif +let loaded_haskell_syntax_checker = 1 + +"bail if the user doesnt have ghc-mod installed +if !executable("ghc-mod") + finish +endif + +function! SyntaxCheckers_haskell_GetLocList() + let makeprg = + \ "{ ". + \ "ghc-mod check ". shellescape(expand('%')) . "; " . + \ "ghc-mod lint " . shellescape(expand('%')) . ";" . + \ " }" + let errorformat = '%-G\\s%#,%f:%l:%c:%trror: %m,%f:%l:%c:%tarning: %m,'. + \ '%f:%l:%c: %trror: %m,%f:%l:%c: %tarning: %m,%f:%l:%c:%m,'. + \ '%E%f:%l:%c:,%Z%m,' + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction + +function! SyntaxCheckers_lhaskell_GetLocList() + return SyntaxCheckers_haskell_GetLocList() +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/haxe.vim b/vim/bundle/syntastic/syntax_checkers/haxe.vim new file mode 100755 index 0000000..22183ee --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/haxe.vim @@ -0,0 +1,55 @@ +"============================================================================ +"File: haxe.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: David Bernard +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ +if exists("loaded_haxe_syntax_checker") + finish +endif +let loaded_haxe_syntax_checker = 1 + +"bail if the user doesn't have haxe installed +if !executable("haxe") + finish +endif + +" s:FindInParent +" find the file argument and returns the path to it. +" Starting with the current working dir, it walks up the parent folders +" until it finds the file, or it hits the stop dir. +" If it doesn't find it, it returns "Nothing" +function! s:FindInParent(fln,flsrt,flstp) + let here = a:flsrt + while ( strlen( here) > 0 ) + let p = split(globpath(here, a:fln), '\n') + if len(p) > 0 + return ['ok', here, fnamemodify(p[0], ':p:t')] + endif + let fr = match(here, '/[^/]*$') + if fr == -1 + break + endif + let here = strpart(here, 0, fr) + if here == a:flstp + break + endif + endwhile + return ['fail', '', ''] +endfunction + +function! SyntaxCheckers_haxe_GetLocList() + let [success, hxmldir, hxmlname] = s:FindInParent('*.hxml', expand('%:p:h'), '/') + if success == 'ok' + let makeprg = 'cd ' . hxmldir . '; haxe ' . hxmlname + let errorformat = '%E%f:%l: characters %c-%*[0-9] : %m' + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) + else + return SyntasticMake({}) + endif +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/html.vim b/vim/bundle/syntastic/syntax_checkers/html.vim new file mode 100644 index 0000000..2c1b8b4 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/html.vim @@ -0,0 +1,86 @@ +"============================================================================ +"File: html.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ +if exists("loaded_html_syntax_checker") + finish +endif +let loaded_html_syntax_checker = 1 + +"bail if the user doesnt have tidy or grep installed +if !executable("tidy") || !executable("grep") + finish +endif + +" TODO: join this with xhtml.vim for DRY's sake? +function! s:TidyEncOptByFenc() + let tidy_opts = { + \'utf-8' : '-utf8', + \'ascii' : '-ascii', + \'latin1' : '-latin1', + \'iso-2022-jp' : '-iso-2022', + \'cp1252' : '-win1252', + \'macroman' : '-mac', + \'utf-16le' : '-utf16le', + \'utf-16' : '-utf16', + \'big5' : '-big5', + \'sjis' : '-shiftjis', + \'cp850' : '-ibm858', + \} + return get(tidy_opts, &fileencoding, '-utf8') +endfunction + +let s:ignore_html_errors = [ + \ " lacks \"summary\" attribute", + \ "not approved by W3C", + \ "attribute \"placeholder\"", + \ " proprietary attribute \"charset\"", + \ " lacks \"content\" attribute", + \ "inserting \"type\" attribute", + \ "proprietary attribute \"data-" + \] + +function! s:ValidateError(text) + let valid = 0 + for i in s:ignore_html_errors + if stridx(a:text, i) != -1 + let valid = 1 + break + endif + endfor + return valid +endfunction + + +function! SyntaxCheckers_html_GetLocList() + + let encopt = s:TidyEncOptByFenc() + let makeprg="tidy ".encopt." --new-blocklevel-tags ".shellescape('section, article, aside, hgroup, header, footer, nav, figure, figcaption')." --new-inline-tags ".shellescape('video, audio, embed, mark, progress, meter, time, ruby, rt, rp, canvas, command, details, datalist')." --new-empty-tags ".shellescape('wbr, keygen')." -e ".shellescape(expand('%'))." 2>&1" + let errorformat='%Wline %l column %c - Warning: %m,%Eline %l column %c - Error: %m,%-G%.%#,%-G%.%#' + let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) + + " process loclist since we need to add some info and filter out valid HTML5 + " from the errors + let n = len(loclist) - 1 + let bufnum = bufnr("") + while n >= 0 + let i = loclist[n] + " filter out valid HTML5 + if s:ValidateError(i['text']) == 1 + unlet loclist[n] + else + "the file name isnt in the output so stick in the buf num manually + let i['bufnr'] = bufnum + endif + let n -= 1 + endwhile + + return loclist +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/javascript.vim b/vim/bundle/syntastic/syntax_checkers/javascript.vim new file mode 100644 index 0000000..0f1bd29 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/javascript.vim @@ -0,0 +1,41 @@ +"============================================================================ +"File: javascript.vim +"Description: Figures out which javascript syntax checker (if any) to load +" from the javascript directory. +"Maintainer: Martin Grenfell +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +" Use g:syntastic_javascript_checker option to specify which jslint executable +" should be used (see below for a list of supported checkers). +" If g:syntastic_javascript_checker is not set, just use the first syntax +" checker that we find installed. +"============================================================================ +if exists("loaded_javascript_syntax_checker") + finish +endif +let loaded_javascript_syntax_checker = 1 + +let s:supported_checkers = ["gjslint", "jslint", "jsl", "jshint"] + +function! s:load_checker(checker) + exec "runtime syntax_checkers/javascript/" . a:checker . ".vim" +endfunction + +if exists("g:syntastic_javascript_checker") + if index(s:supported_checkers, g:syntastic_javascript_checker) != -1 && executable(g:syntastic_javascript_checker) + call s:load_checker(g:syntastic_javascript_checker) + else + echoerr "Javascript syntax not supported or not installed." + endif +else + for checker in s:supported_checkers + if executable(checker) + call s:load_checker(checker) + break + endif + endfor +endif diff --git a/vim/bundle/syntastic/syntax_checkers/javascript/gjslint.vim b/vim/bundle/syntastic/syntax_checkers/javascript/gjslint.vim new file mode 100644 index 0000000..05e1c0f --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/javascript/gjslint.vim @@ -0,0 +1,20 @@ +"============================================================================ +"File: gjslint.vim +"Description: Javascript syntax checker - using gjslint +"Maintainer: Martin Grenfell +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +"============================================================================ +if !exists("g:syntastic_javascript_gjslint_conf") + let g:syntastic_javascript_gjslint_conf = "" +endif + +function! SyntaxCheckers_javascript_GetLocList() + let makeprg = "gjslint " . g:syntastic_javascript_gjslint_conf . " --nosummary --unix_mode --nodebug_indentation --nobeep " . shellescape(expand('%')) + let errorformat="%f:%l:(New Error -%\\?\%n) %m,%f:%l:(-%\\?%n) %m,%-G1 files checked, no errors found.,%-G%.%#" + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction + diff --git a/vim/bundle/syntastic/syntax_checkers/javascript/jshint.vim b/vim/bundle/syntastic/syntax_checkers/javascript/jshint.vim new file mode 100644 index 0000000..7670045 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/javascript/jshint.vim @@ -0,0 +1,21 @@ +"============================================================================ +"File: jshint.vim +"Description: Javascript syntax checker - using jshint +"Maintainer: Martin Grenfell +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +"============================================================================ +if !exists("g:syntastic_javascript_jshint_conf") + let g:syntastic_javascript_jshint_conf = "" +endif + +function! SyntaxCheckers_javascript_GetLocList() + " node-jshint uses .jshintrc as config unless --config arg is present + let args = g:syntastic_javascript_jshint_conf? ' --config ' . g:syntastic_javascript_jshint_conf : '' + let makeprg = 'jshint ' . shellescape(expand("%")) . args + let errorformat = '%ELine %l:%c,%Z\\s%#Reason: %m,%C%.%#,%f: line %l\, col %c\, %m,%-G%.%#' + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'defaults': {'bufnr': bufnr('')} }) +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/javascript/jsl.vim b/vim/bundle/syntastic/syntax_checkers/javascript/jsl.vim new file mode 100644 index 0000000..36c7efc --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/javascript/jsl.vim @@ -0,0 +1,20 @@ +"============================================================================ +"File: jsl.vim +"Description: Javascript syntax checker - using jsl +"Maintainer: Martin Grenfell +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +"============================================================================ +if !exists("g:syntastic_javascript_jsl_conf") + let g:syntastic_javascript_jsl_conf = "" +endif + +function! SyntaxCheckers_javascript_GetLocList() + let makeprg = "jsl " . g:syntastic_javascript_jsl_conf . " -nologo -nofilelisting -nosummary -nocontext -process ".shellescape(expand('%')) + let errorformat='%W%f(%l): lint warning: %m,%-Z%p^,%W%f(%l): warning: %m,%-Z%p^,%E%f(%l): SyntaxError: %m,%-Z%p^,%-G' + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction + diff --git a/vim/bundle/syntastic/syntax_checkers/javascript/jslint.vim b/vim/bundle/syntastic/syntax_checkers/javascript/jslint.vim new file mode 100644 index 0000000..94d48f0 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/javascript/jslint.vim @@ -0,0 +1,31 @@ +"============================================================================ +"File: jslint.vim +"Description: Javascript syntax checker - using jslint +"Maintainer: Martin Grenfell +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"Tested with jslint 0.1.4. +"============================================================================ +if !exists("g:syntastic_javascript_jslint_conf") + let g:syntastic_javascript_jslint_conf = "--white --undef --nomen --regexp --plusplus --bitwise --newcap --sloppy --vars" +endif + +function! SyntaxCheckers_javascript_HighlightTerm(error) + let unexpected = matchstr(a:error['text'], 'Expected.*and instead saw \'\zs.*\ze\'') + if len(unexpected) < 1 | return '' | end + return '\V'.split(unexpected, "'")[1] +endfunction + +function! SyntaxCheckers_javascript_GetLocList() + let makeprg = "jslint " . g:syntastic_javascript_jslint_conf . " " . shellescape(expand('%')) + let errorformat='%E %##%n %m,%-Z%.%#Line %l\, Pos %c,%-G%.%#' + let errors = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'defaults': {'bufnr': bufnr("")} }) + call SyntasticHighlightErrors(errors, function('SyntaxCheckers_javascript_HighlightTerm')) + + return errors +endfunction + diff --git a/vim/bundle/syntastic/syntax_checkers/json.vim b/vim/bundle/syntastic/syntax_checkers/json.vim new file mode 100644 index 0000000..c528b1e --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/json.vim @@ -0,0 +1,41 @@ +"============================================================================ +"File: json.vim +"Description: Figures out which json syntax checker (if any) to load +" from the json directory. +"Maintainer: Miller Medeiros +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +" Use g:syntastic_json_checker option to specify which jsonlint executable +" should be used (see below for a list of supported checkers). +" If g:syntastic_json_checker is not set, just use the first syntax +" checker that we find installed. +"============================================================================ +if exists("loaded_json_syntax_checker") + finish +endif +let loaded_json_syntax_checker = 1 + +let s:supported_checkers = ["jsonlint", "jsonval"] + +function! s:load_checker(checker) + exec "runtime syntax_checkers/json/" . a:checker . ".vim" +endfunction + +if exists("g:syntastic_json_checker") + if index(s:supported_checkers, g:syntastic_json_checker) != -1 && executable(g:syntastic_json_checker) + call s:load_checker(g:syntastic_json_checker) + else + echoerr "JSON syntax not supported or not installed." + endif +else + for checker in s:supported_checkers + if executable(checker) + call s:load_checker(checker) + break + endif + endfor +endif diff --git a/vim/bundle/syntastic/syntax_checkers/json/jsonlint.vim b/vim/bundle/syntastic/syntax_checkers/json/jsonlint.vim new file mode 100644 index 0000000..6e4a4c0 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/json/jsonlint.vim @@ -0,0 +1,16 @@ +"============================================================================ +"File: jsonlint.vim +"Description: JSON syntax checker - using jsonlint +"Maintainer: Miller Medeiros +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +"============================================================================ + +function! SyntaxCheckers_json_GetLocList() + let makeprg = 'jsonlint ' . shellescape(expand("%")) . ' --compact' + let errorformat = '%ELine %l:%c,%Z\\s%#Reason: %m,%C%.%#,%f: line %l\, col %c\, %m,%-G%.%#' + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'defaults': {'bufnr': bufnr('')} }) +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/json/jsonval.vim b/vim/bundle/syntastic/syntax_checkers/json/jsonval.vim new file mode 100644 index 0000000..f288039 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/json/jsonval.vim @@ -0,0 +1,17 @@ +"============================================================================ +"File: jsonval.vim +"Description: JSON syntax checker - using jsonval +"Maintainer: Miller Medeiros +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +"============================================================================ + +function! SyntaxCheckers_json_GetLocList() + " based on https://gist.github.com/1196345 + let makeprg = 'jsonval '. shellescape(expand('%')) + let errorformat = '%E%f:\ %m\ at\ line\ %l,%-G%.%#' + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'defaults': {'bufnr': bufnr('')} }) +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/less.vim b/vim/bundle/syntastic/syntax_checkers/less.vim new file mode 100644 index 0000000..7393b3e --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/less.vim @@ -0,0 +1,38 @@ +"============================================================================ +"File: less.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Julien Blanchard +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ +if exists("loaded_less_syntax_checker") + finish +endif +let loaded_less_syntax_checker = 1 + +"bail if the user doesnt have the lessc binary installed +if !executable("lessc") + finish +endif + +if !exists("g:syntastic_less_options") + let g:syntastic_less_options = "--no-color" +endif + +function! SyntaxCheckers_less_GetLocList() + let makeprg = 'lessc '. g:syntastic_less_options .' '. shellescape(expand('%')) . ' /dev/null' + + "lessc >= 1.2 + let errorformat = 'ParseError: Syntax Error on line %[0-9]%# in %f:%l:%c' + "lessc < 1.2 + let errorformat .= ', Syntax %trror on line %l in %f,Syntax %trror on line %l,! Syntax %trror: on line %l: %m,%-G%.%#' + + return SyntasticMake({ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr(""), 'text': "Syntax error"} }) +endfunction + diff --git a/vim/bundle/syntastic/syntax_checkers/lua.vim b/vim/bundle/syntastic/syntax_checkers/lua.vim new file mode 100644 index 0000000..03acb08 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/lua.vim @@ -0,0 +1,58 @@ +"============================================================================ +"File: lua.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Gregor Uhlenheuer +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ + +if exists('loaded_lua_syntax_checker') + finish +endif +let loaded_lua_syntax_checker = 1 + +" check if the lua compiler is installed +if !executable('luac') + finish +endif + +function! SyntaxCheckers_lua_Term(pos) + let near = matchstr(a:pos['text'], "near '[^']\\+'") + let result = '' + if len(near) > 0 + let near = split(near, "'")[1] + if near == '' + let p = getpos('$') + let a:pos['lnum'] = p[1] + let a:pos['col'] = p[2] + let result = '\%'.p[2].'c' + else + let result = '\V'.near + endif + let open = matchstr(a:pos['text'], "(to close '[^']\\+' at line [0-9]\\+)") + if len(open) > 0 + let oline = split(open, "'")[1:2] + let line = 0+strpart(oline[1], 9) + call matchadd('SpellCap', '\%'.line.'l\V'.oline[0]) + endif + endif + return result +endfunction + +function! SyntaxCheckers_lua_GetLocList() + let makeprg = 'luac -p ' . shellescape(expand('%')) + let errorformat = 'luac: %#%f:%l: %m' + + let loclist = SyntasticMake({ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': { 'bufnr': bufnr(''), 'type': 'E' } }) + + call SyntasticHighlightErrors(loclist, function("SyntaxCheckers_lua_Term")) + + return loclist +endfunction + diff --git a/vim/bundle/syntastic/syntax_checkers/matlab.vim b/vim/bundle/syntastic/syntax_checkers/matlab.vim new file mode 100644 index 0000000..595b312 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/matlab.vim @@ -0,0 +1,28 @@ +"============================================================================ +"File: matlab.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Jason Graham +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ + +if exists("loaded_matlab_syntax_checker") + finish +endif +let loaded_matlab_syntax_checker = 1 + +"bail if the user doesn't have mlint installed +if !executable("mlint") + finish +endif + +function! SyntaxCheckers_matlab_GetLocList() + let makeprg = 'mlint -id $* '.shellescape(expand('%')) + let errorformat = 'L %l (C %c): %*[a-zA-Z0-9]: %m,L %l (C %c-%*[0-9]): %*[a-zA-Z0-9]: %m' + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'defaults': {'bufnr': bufnr("")} }) +endfunction + diff --git a/vim/bundle/syntastic/syntax_checkers/ocaml.vim b/vim/bundle/syntastic/syntax_checkers/ocaml.vim new file mode 100644 index 0000000..6a2470f --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/ocaml.vim @@ -0,0 +1,89 @@ +"============================================================================ +"File: ocaml.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Török Edwin +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ +" +" By default the camlp4o preprocessor is used to check the syntax of .ml, and .mli files, +" ocamllex is used to check .mll files and menhir is used to check .mly files. +" The output is all redirected to /dev/null, nothing is written to the disk. +" +" If your source code needs camlp4r then you can define this in your .vimrc: +" +" let g:syntastic_ocaml_camlp4r = 1 +" +" If you used some syntax extensions, or you want to also typecheck the source +" code, then you can define this: +" +" let g:syntastic_ocaml_use_ocamlbuild = 1 +" +" This will run ocamlbuild .inferred.mli, so it will write to your _build +" directory (and possibly rebuild your myocamlbuild.ml plugin), only enable this +" if you are ok with that. +" +" If you are using syntax extensions / external libraries and have a properly +" set up _tags (and myocamlbuild.ml file) then it should just work +" to enable this flag and get syntax / type checks through syntastic. +" +" For best results your current directory should be the project root +" (same situation if you want useful output from :make). + +if exists("loaded_ocaml_syntax_checker") + finish +endif +let loaded_ocaml_syntax_checker = 1 + +if exists('g:syntastic_ocaml_camlp4r') && + \ g:syntastic_ocaml_camlp4r != 0 + let s:ocamlpp="camlp4r" +else + let s:ocamlpp="camlp4o" +endif + +"bail if the user doesnt have the preprocessor +if !executable(s:ocamlpp) + finish +endif + +function! SyntaxCheckers_ocaml_GetLocList() + if exists('g:syntastic_ocaml_use_ocamlbuild') && + \ g:syntastic_ocaml_use_ocamlbuild != 0 && + \ executable("ocamlbuild") && + \ isdirectory('_build') + let makeprg = "ocamlbuild -quiet -no-log -tag annot,". s:ocamlpp. " -no-links -no-hygiene -no-sanitize ". + \ shellescape(expand('%:r')).".cmi" + else + let extension = expand('%:e') + if match(extension, 'mly') >= 0 + " ocamlyacc output can't be redirected, so use menhir + if !executable("menhir") + return [] + endif + let makeprg = "menhir --only-preprocess ".shellescape(expand('%')) . " >/dev/null" + elseif match(extension,'mll') >= 0 + if !executable("ocamllex") + return [] + endif + let makeprg = "ocamllex -q -o /dev/null ".shellescape(expand('%')) + else + let makeprg = "camlp4o -o /dev/null ".shellescape(expand('%')) + endif + endif + let errorformat = '%AFile "%f"\, line %l\, characters %c-%*\d:,'. + \ '%AFile "%f"\, line %l\, characters %c-%*\d (end at line %*\d\, character %*\d):,'. + \ '%AFile "%f"\, line %l\, character %c:,'. + \ '%AFile "%f"\, line %l\, character %c:%m,'. + \ '%-GPreprocessing error %.%#,'. + \ '%-GCommand exited %.%#,'. + \ '%C%tarning %n: %m,'. + \ '%C%m,'. + \ '%-G+%.%#' + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/perl.vim b/vim/bundle/syntastic/syntax_checkers/perl.vim new file mode 100644 index 0000000..34e3b01 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/perl.vim @@ -0,0 +1,35 @@ +"============================================================================ +"File: perl.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Anthony Carapetis +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ + +" This checker requires efm_perl.pl, which is distributed with Vim version +" seven and greater, as far as I know. + +if exists("loaded_perl_syntax_checker") + finish +endif +let loaded_perl_syntax_checker = 1 + +"bail if the user doesnt have perl installed +if !executable("perl") + finish +endif + +if !exists("g:syntastic_perl_efm_program") + let g:syntastic_perl_efm_program = 'perl '.$VIMRUNTIME.'/tools/efm_perl.pl -c' +endif + +function! SyntaxCheckers_perl_GetLocList() + let makeprg = g:syntastic_perl_efm_program . ' ' . shellescape(expand('%')) + let errorformat = '%f:%l:%m' + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/php.vim b/vim/bundle/syntastic/syntax_checkers/php.vim new file mode 100644 index 0000000..d48b8e8 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/php.vim @@ -0,0 +1,57 @@ +"============================================================================ +"File: php.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ +if exists("loaded_php_syntax_checker") + finish +endif +let loaded_php_syntax_checker = 1 + +"bail if the user doesnt have php installed +if !executable("php") + finish +endif + +"Support passing configuration directives to phpcs +if !exists("g:syntastic_phpcs_conf") + let g:syntastic_phpcs_conf = "" +endif + +if !exists("g:syntastic_phpcs_disable") + let g:syntastic_phpcs_disable = 0 +endif + +function! SyntaxCheckers_php_Term(item) + let unexpected = matchstr(a:item['text'], "unexpected '[^']\\+'") + if len(unexpected) < 1 | return '' | end + return '\V'.split(unexpected, "'")[1] +endfunction + +function! SyntaxCheckers_php_GetLocList() + + let errors = [] + if !g:syntastic_phpcs_disable && executable("phpcs") + let errors = s:GetPHPCSErrors() + endif + + let makeprg = "php -l ".shellescape(expand('%')) + let errorformat='%-GNo syntax errors detected in%.%#,PHP Parse error: %#syntax %trror\, %m in %f on line %l,PHP Fatal %trror: %m in %f on line %l,%-GErrors parsing %.%#,%-G\s%#,Parse error: %#syntax %trror\, %m in %f on line %l,Fatal %trror: %m in %f on line %l' + let errors = errors + SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) + + call SyntasticHighlightErrors(errors, function('SyntaxCheckers_php_Term')) + + return errors +endfunction + +function! s:GetPHPCSErrors() + let makeprg = "phpcs " . g:syntastic_phpcs_conf . " --report=csv ".shellescape(expand('%')) + let errorformat = '%-GFile\,Line\,Column\,Type\,Message\,Source\,Severity,"%f"\,%l\,%c\,%t%*[a-zA-Z]\,"%m"\,%*[a-zA-Z0-9_.-]\,%*[0-9]' + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/puppet.vim b/vim/bundle/syntastic/syntax_checkers/puppet.vim new file mode 100644 index 0000000..e4fc648 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/puppet.vim @@ -0,0 +1,38 @@ +"============================================================================ +"File: puppet.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Eivind Uggedal +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ +if exists("loaded_puppet_syntax_checker") + finish +endif +let loaded_puppet_syntax_checker = 1 + +"bail if the user doesnt have puppet installed +if !executable("puppet") + finish +endif + +function! SyntaxCheckers_puppet_GetLocList() + let l:puppetVersion = system("puppet --version") + let l:digits = split(l:puppetVersion, "\\.") + " + " If it is on the 2.7 series... use new executable + if l:digits[0] == '2' && l:digits[1] == '7' + let makeprg = 'puppet parser validate ' . + \ shellescape(expand('%')) . + \ ' --color=false --ignoreimport' + else + let makeprg = 'puppet --color=false --parseonly --ignoreimport '.shellescape(expand('%')) + endif + + let errorformat = 'err: Could not parse for environment %*[a-z]: %m at %f:%l' + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/python.vim b/vim/bundle/syntastic/syntax_checkers/python.vim new file mode 100644 index 0000000..ed9a682 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/python.vim @@ -0,0 +1,77 @@ +"============================================================================ +"File: python.vim +"Description: Syntax checking plugin for syntastic.vim +" +"Authors: Martin Grenfell +" kstep +" Parantapa Bhattacharya +" +"============================================================================ +" +" For forcing the use of flake8, pyflakes, or pylint set +" +" let g:syntastic_python_checker = 'pyflakes' +" +" in your .vimrc. Default is flake8. + +if exists("loaded_python_syntax_checker") + finish +endif +let loaded_python_syntax_checker = 1 + +"bail if the user doesnt have his favorite checker or flake8 or pyflakes installed +if !exists('g:syntastic_python_checker') || !executable('g:syntastic_python_checker') + if executable("flake8") + let g:syntastic_python_checker = 'flake8' + elseif executable("pyflakes") + let g:syntastic_python_checker = 'pyflakes' + elseif executable("pylint") + let g:syntastic_python_checker = 'pylint' + else + finish + endif +endif + +function! SyntaxCheckers_python_Term(i) + if a:i['type'] ==# 'E' + let a:i['text'] = "Syntax error" + endif + if match(a:i['text'], 'is assigned to but never used') > -1 + \ || match(a:i['text'], 'imported but unused') > -1 + \ || match(a:i['text'], 'undefined name') > -1 + \ || match(a:i['text'], 'redefinition of') > -1 + \ || match(a:i['text'], 'referenced before assignment') > -1 + \ || match(a:i['text'], 'duplicate argument') > -1 + \ || match(a:i['text'], 'after other statements') > -1 + \ || match(a:i['text'], 'shadowed by loop variable') > -1 + + let term = split(a:i['text'], "'", 1)[1] + return '\V\<'.term.'\>' + endif + return '' +endfunction + +if g:syntastic_python_checker == 'pylint' + function! SyntaxCheckers_python_GetLocList() + let makeprg = 'pylint -f parseable -r n -i y ' . + \ shellescape(expand('%')) . + \ ' \| sed ''s_: \[[RC]_: \[W_''' . + \ ' \| sed ''s_: \[[F]_:\ \[E_''' + let errorformat = '%f:%l: [%t%n] %m,%-GNo config%m' + let errors = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) + + return errors + endfunction +else + function! SyntaxCheckers_python_GetLocList() + let makeprg = g:syntastic_python_checker.' '.shellescape(expand('%')) + let errorformat = + \ '%E%f:%l: could not compile,%-Z%p^,%W%f:%l:%c: %m,%W%f:%l: %m,%-G%.%#' + + let errors = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) + + call SyntasticHighlightErrors(errors, function('SyntaxCheckers_python_Term')) + + return errors + endfunction +endif diff --git a/vim/bundle/syntastic/syntax_checkers/rst.vim b/vim/bundle/syntastic/syntax_checkers/rst.vim new file mode 100644 index 0000000..107aafe --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/rst.vim @@ -0,0 +1,37 @@ +"============================================================================ +"File: rst.vim +"Description: Syntax checking plugin for docutil's reStructuredText files +"Maintainer: James Rowe +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ + +" We use rst2pseudoxml.py, as it is ever so marginally faster than the other +" rst2${x} tools in docutils. + +if exists("loaded_rst_syntax_checker") + finish +endif +let loaded_rst_syntax_checker = 1 + +"bail if the user doesn't have rst2pseudoxml.py installed +if !executable("rst2pseudoxml.py") + finish +endif + +function! SyntaxCheckers_rst_GetLocList() + let makeprg = 'rst2pseudoxml.py --report=1 --exit-status=1 ' . + \ shellescape(expand('%')) . ' /dev/null' + + let errorformat = '%f:%l:\ (%tNFO/1)\ %m, + \%f:%l:\ (%tARNING/2)\ %m, + \%f:%l:\ (%tRROR/3)\ %m, + \%f:%l:\ (%tEVERE/4)\ %m, + \%-G%.%#' + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/ruby.vim b/vim/bundle/syntastic/syntax_checkers/ruby.vim new file mode 100644 index 0000000..8c3cd81 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/ruby.vim @@ -0,0 +1,32 @@ +"============================================================================ +"File: ruby.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ +if exists("loaded_ruby_syntax_checker") + finish +endif +let loaded_ruby_syntax_checker = 1 + +"bail if the user doesnt have ruby installed +if !executable("ruby") + finish +endif + +function! SyntaxCheckers_ruby_GetLocList() + " we cannot set RUBYOPT on windows like that + if has('win32') || has('win64') + let makeprg = 'ruby -W1 -T1 -c '.shellescape(expand('%')) + else + let makeprg = 'RUBYOPT= ruby -W1 -c '.shellescape(expand('%')) + endif + let errorformat = '%-GSyntax OK,%E%f:%l: syntax error\, %m,%Z%p^,%W%f:%l: warning: %m,%Z%p^,%W%f:%l: %m,%-C%.%#' + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/sass.vim b/vim/bundle/syntastic/syntax_checkers/sass.vim new file mode 100644 index 0000000..23bf345 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/sass.vim @@ -0,0 +1,35 @@ +"============================================================================ +"File: sass.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ +if exists("loaded_sass_syntax_checker") + finish +endif +let loaded_sass_syntax_checker = 1 + +"bail if the user doesnt have the sass binary installed +if !executable("sass") + finish +endif + +"use compass imports if available +let s:imports = "" +if executable("compass") + let s:imports = "--compass" +endif + +function! SyntaxCheckers_sass_GetLocList() + let makeprg='sass '.s:imports.' --check '.shellescape(expand('%')) + let errorformat = '%ESyntax %trror:%m,%C on line %l of %f,%Z%.%#' + let errorformat .= ',%Wwarning on line %l:,%Z%m,Syntax %trror on line %l: %m' + let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) + + return loclist +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/scss.vim b/vim/bundle/syntastic/syntax_checkers/scss.vim new file mode 100644 index 0000000..d3ae5e7 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/scss.vim @@ -0,0 +1,27 @@ + +"============================================================================ +"File: scss.vim +"Description: scss syntax checking plugin for syntastic +"Maintainer: Martin Grenfell +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ +if exists("loaded_scss_syntax_checker") + finish +endif +let loaded_scss_syntax_checker = 1 + +"bail if the user doesnt have the sass binary installed +if !executable("sass") + finish +endif + +runtime syntax_checkers/sass.vim + +function! SyntaxCheckers_scss_GetLocList() + return SyntaxCheckers_sass_GetLocList() +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/sh.vim b/vim/bundle/syntastic/syntax_checkers/sh.vim new file mode 100644 index 0000000..5b55172 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/sh.vim @@ -0,0 +1,52 @@ +"============================================================================ +"File: sh.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Gregor Uhlenheuer +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ +if exists('loaded_sh_syntax_checker') + finish +endif +let loaded_sh_syntax_checker = 1 + +function! s:GetShell() + if !exists('b:shell') || b:shell == "" + let b:shell = '' + let shebang = getbufline(bufnr('%'), 1)[0] + if len(shebang) > 0 + if match(shebang, 'bash') >= 0 + let b:shell = 'bash' + elseif match(shebang, 'zsh') >= 0 + let b:shell = 'zsh' + elseif match(shebang, 'sh') >= 0 + let b:shell = 'sh' + endif + endif + endif + return b:shell +endfunction + +function! SyntaxCheckers_sh_GetLocList() + if len(s:GetShell()) == 0 || !executable(s:GetShell()) + return [] + endif + let output = split(system(s:GetShell().' -n '.shellescape(expand('%'))), '\n') + if v:shell_error != 0 + let result = [] + for err_line in output + let line = substitute(err_line, '^[^:]*:\D\{-}\(\d\+\):.*', '\1', '') + let msg = substitute(err_line, '^[^:]*:\D\{-}\d\+: \(.*\)', '\1', '') + call add(result, {'lnum' : line, + \ 'text' : msg, + \ 'bufnr': bufnr(''), + \ 'type': 'E' }) + endfor + return result + endif + return [] +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/tcl.vim b/vim/bundle/syntastic/syntax_checkers/tcl.vim new file mode 100644 index 0000000..83b5df3 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/tcl.vim @@ -0,0 +1,28 @@ +"============================================================================ +"File: tcl.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Eric Thomas +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ + +if exists("loaded_tcl_syntax_checker") + finish +endif +let loaded_tcl_syntax_checker = 1 + +"bail if the user doesnt have tclsh installed +if !executable("tclsh") + finish +endif + +function! SyntaxCheckers_tcl_GetLocList() + let makeprg = 'tclsh '.shellescape(expand('%')) + let errorformat = '%f:%l:%m' + + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/tex.vim b/vim/bundle/syntastic/syntax_checkers/tex.vim new file mode 100644 index 0000000..4369f4c --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/tex.vim @@ -0,0 +1,26 @@ +"============================================================================ +"File: tex.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ +if exists("loaded_tex_syntax_checker") + finish +endif +let loaded_tex_syntax_checker = 1 + +"bail if the user doesnt have lacheck installed +if !executable("lacheck") + finish +endif + +function! SyntaxCheckers_tex_GetLocList() + let makeprg = 'lacheck '.shellescape(expand('%')) + let errorformat = '%-G** %f:,%E"%f"\, line %l: %m' + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/vala.vim b/vim/bundle/syntastic/syntax_checkers/vala.vim new file mode 100644 index 0000000..f174790 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/vala.vim @@ -0,0 +1,56 @@ +"============================================================================ +"File: vala.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Konstantin Stepanov (me@kstep.me) +"Notes: Add special comment line into your vala file starting with +" "// modules: " and containing space delimited list of vala +" modules, used by the file, so this script can build correct +" --pkg arguments. +" Valac compiler is not the fastest thing in the world, so you +" may want to disable this plugin with +" let g:syntastic_vala_check_disabled = 1 command in your .vimrc or +" command line. Unlet this variable to set it to 0 to reenable +" this checker. +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ + +if exists('loaded_vala_syntax_checker') + finish +endif +let loaded_vala_syntax_checker = 1 + +if !executable('valac') + finish +endif + +if exists('g:syntastic_vala_check_disabled') && g:syntastic_vala_check_disabled + finish +endif + +function! SyntaxCheckers_vala_Term(pos) + let strlength = strlen(matchstr(a:pos['text'], '\^\+$')) + return '\%>'.(a:pos.col-1).'c.*\%<'.(a:pos.col+strlength+1).'c' +endfunction + +function! s:GetValaModules() + let modules_line = search('^// modules: ', 'n') + let modules_str = getline(modules_line) + let modules = split(strpart(modules_str, 12), '\s\+') + return modules +endfunction + +function! SyntaxCheckers_vala_GetLocList() + let vala_pkg_args = join(map(s:GetValaModules(), '"--pkg ".v:val'), ' ') + let makeprg = 'valac -C ' . vala_pkg_args . ' ' .shellescape(expand('%')) + let errorformat = '%A%f:%l.%c-%\d%\+.%\d%\+: %t%[a-z]%\+: %m,%C%m,%Z%m' + + let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) + call SyntasticHighlightErrors(loclist, function("SyntaxCheckers_vala_Term"), 1) + return loclist +endfunction + diff --git a/vim/bundle/syntastic/syntax_checkers/xhtml.vim b/vim/bundle/syntastic/syntax_checkers/xhtml.vim new file mode 100644 index 0000000..80d981a --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/xhtml.vim @@ -0,0 +1,46 @@ +"============================================================================ +"File: xhtml.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ +if exists("loaded_xhtml_syntax_checker") + finish +endif +let loaded_xhtml_syntax_checker = 1 + +"bail if the user doesnt have tidy or grep installed +if !executable("tidy") + finish +endif + +" TODO: join this with html.vim DRY's sake? +function! s:TidyEncOptByFenc() + let tidy_opts = { + \'utf-8' : '-utf8', + \'ascii' : '-ascii', + \'latin1' : '-latin1', + \'iso-2022-jp' : '-iso-2022', + \'cp1252' : '-win1252', + \'macroman' : '-mac', + \'utf-16le' : '-utf16le', + \'utf-16' : '-utf16', + \'big5' : '-big5', + \'sjis' : '-shiftjis', + \'cp850' : '-ibm858', + \} + return get(tidy_opts, &fileencoding, '-utf8') +endfunction + +function! SyntaxCheckers_xhtml_GetLocList() + + let encopt = s:TidyEncOptByFenc() + let makeprg="tidy ".encopt." -xml -e ".shellescape(expand('%')) + let errorformat='%Wline %l column %c - Warning: %m,%Eline %l column %c - Error: %m,%-G%.%#,%-G%.%#' + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'defaults': {'bufnr': bufnr("")} }) +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/xml.vim b/vim/bundle/syntastic/syntax_checkers/xml.vim new file mode 100644 index 0000000..55c0cdd --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/xml.vim @@ -0,0 +1,42 @@ +"============================================================================ +"File: xml.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Sebastian Kusnier +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ + +" You can use a local installation of DTDs to significantly speed up validation +" and allow you to validate XML data without network access, see xmlcatalog(1) +" and http://www.xmlsoft.org/catalog.html for more information. + +if exists("loaded_xml_syntax_checker") + finish +endif +let loaded_xml_syntax_checker = 1 + +"bail if the user doesnt have tidy or grep installed +if !executable("xmllint") + finish +endif + +function! SyntaxCheckers_xml_GetLocList() + + let makeprg="xmllint --xinclude --noout --postvalid " . shellescape(expand("%:p")) + let errorformat='%E%f:%l:\ error\ :\ %m, + \%-G%f:%l:\ validity\ error\ :\ Validation\ failed:\ no\ DTD\ found\ %m, + \%W%f:%l:\ warning\ :\ %m, + \%W%f:%l:\ validity\ warning\ :\ %m, + \%E%f:%l:\ validity\ error\ :\ %m, + \%E%f:%l:\ parser\ error\ :\ %m, + \%E%f:%l:\ %m, + \%-Z%p^, + \%-G%.%#' + let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) + + return loclist +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/xslt.vim b/vim/bundle/syntastic/syntax_checkers/xslt.vim new file mode 100644 index 0000000..b9b3cac --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/xslt.vim @@ -0,0 +1,38 @@ +"============================================================================ +"File: xslt.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Sebastian Kusnier +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ +if exists("loaded_xslt_syntax_checker") + finish +endif +let loaded_xslt_syntax_checker = 1 + +"bail if the user doesnt have tidy or grep installed +if !executable("xmllint") + finish +endif + +function! SyntaxCheckers_xslt_GetLocList() + + let makeprg="xmllint --xinclude --noout --postvalid " . shellescape(expand("%:p")) + let errorformat='%E%f:%l:\ error\ :\ %m, + \%-G%f:%l:\ validity\ error\ :\ Validation\ failed:\ no\ DTD\ found\ %m, + \%W%f:%l:\ warning\ :\ %m, + \%W%f:%l:\ validity\ warning\ :\ %m, + \%E%f:%l:\ validity\ error\ :\ %m, + \%E%f:%l:\ parser\ error\ :\ %m, + \%E%f:%l:\ namespace\ error\ :\ %m, + \%E%f:%l:\ %m, + \%-Z%p^, + \%-G%.%#' + let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) + + return loclist +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/yaml.vim b/vim/bundle/syntastic/syntax_checkers/yaml.vim new file mode 100644 index 0000000..f45d849 --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/yaml.vim @@ -0,0 +1,30 @@ +"============================================================================ +"File: yaml.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Martin Grenfell +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +" +"Installation: $ npm install -g js-yaml.bin +" +"============================================================================ +if exists("loaded_yaml_syntax_checker") + finish +endif +let loaded_yaml_syntax_checker = 1 + +if !executable("js-yaml") + finish +endif + +function! SyntaxCheckers_yaml_GetLocList() + let makeprg='js-yaml --compact ' . shellescape(expand('%')) + let errorformat='Error on line %l\, col %c:%m,%-G%.%#' + return SyntasticMake({ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'bufnr': bufnr("")} }) +endfunction diff --git a/vim/bundle/syntastic/syntax_checkers/zpt.vim b/vim/bundle/syntastic/syntax_checkers/zpt.vim new file mode 100644 index 0000000..0b0063b --- /dev/null +++ b/vim/bundle/syntastic/syntax_checkers/zpt.vim @@ -0,0 +1,36 @@ +"============================================================================ +"File: zpt.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: claytron +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ + +" In order for this plugin to be useful, you will need to set up the +" zpt filetype in your vimrc +" +" " set up zope page templates as the zpt filetype +" au BufNewFile,BufRead *.pt,*.cpt,*.zpt set filetype=zpt syntax=xml +" +" Then install the zptlint program, found on pypi: +" http://pypi.python.org/pypi/zptlint + +if exists("loaded_zpt_syntax_checker") + finish +endif +let loaded_zpt_syntax_checker = 1 + +" Bail if the user doesn't have zptlint installed +if !executable("zptlint") + finish +endif + +function! SyntaxCheckers_zpt_GetLocList() + let makeprg="zptlint ".shellescape(expand('%')) + let errorformat='%-P*** Error in: %f,%Z%*\s\, at line %l\, column %c,%E%*\s%m,%-Q' + return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) +endfunction diff --git a/vim/bundle/ubuntu-vim72/autoload/README.txt b/vim/bundle/ubuntu-vim72/autoload/README.txt new file mode 100644 index 0000000..3b18d3d --- /dev/null +++ b/vim/bundle/ubuntu-vim72/autoload/README.txt @@ -0,0 +1,22 @@ +The autoload directory is for standard Vim autoload scripts. + +These are functions used by plugins and for general use. They will be loaded +automatically when the function is invoked. See ":help autoload". + +gzip.vim for editing compressed files +netrw*.vim browsing (remote) directories and editing remote files +tar.vim browsing tar files +zip.vim browsing zip files +paste.vim common code for mswin.vim, menu.vim and macmap.vim +spellfile.vim downloading of a missing spell file + +Omni completion files: +ccomplete.vim C +csscomplete.vim HTML / CSS +htmlcomplete.vim HTML +javascriptcomplete.vim Javascript +phpcomplete.vim PHP +pythoncomplete.vim Python +rubycomplete.vim Ruby +syntaxcomplete.vim from syntax highlighting +xmlcomplete.vim XML (uses files in the xml directory) diff --git a/vim/bundle/ubuntu-vim72/autoload/ada.vim b/vim/bundle/ubuntu-vim72/autoload/ada.vim new file mode 100644 index 0000000..8f525f4 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/autoload/ada.vim @@ -0,0 +1,630 @@ +"------------------------------------------------------------------------------ +" Description: Perform Ada specific completion & tagging. +" Language: Ada (2005) +" $Id: ada.vim 887 2008-07-08 14:29:01Z krischik $ +" Maintainer: Martin Krischik +" Taylor Venable +" Neil Bird +" Ned Okie +" $Author: krischik $ +" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ +" Version: 4.6 +" $Revision: 887 $ +" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $ +" History: 24.05.2006 MK Unified Headers +" 26.05.2006 MK ' should not be in iskeyword. +" 16.07.2006 MK Ada-Mode as vim-ball +" 02.10.2006 MK Better folding. +" 15.10.2006 MK Bram's suggestion for runtime integration +" 05.11.2006 MK Bram suggested not to use include protection for +" autoload +" 05.11.2006 MK Bram suggested to save on spaces +" 08.07.2007 TV fix mapleader problems. +" 09.05.2007 MK Session just won't work no matter how much +" tweaking is done +" 19.09.2007 NO still some mapleader problems +" Help Page: ft-ada-functions +"------------------------------------------------------------------------------ + +if version < 700 + finish +endif + +" Section: Constants {{{1 +" +let g:ada#DotWordRegex = '\a\w*\(\_s*\.\_s*\a\w*\)*' +let g:ada#WordRegex = '\a\w*' +let g:ada#Comment = "\\v^(\"[^\"]*\"|'.'|[^\"']){-}\\zs\\s*--.*" +let g:ada#Keywords = [] + +" Section: g:ada#Keywords {{{1 +" +" Section: add Ada keywords {{{2 +" +for Item in ['abort', 'else', 'new', 'return', 'abs', 'elsif', 'not', 'reverse', 'abstract', 'end', 'null', 'accept', 'entry', 'select', 'access', 'exception', 'of', 'separate', 'aliased', 'exit', 'or', 'subtype', 'all', 'others', 'synchronized', 'and', 'for', 'out', 'array', 'function', 'overriding', 'tagged', 'at', 'task', 'generic', 'package', 'terminate', 'begin', 'goto', 'pragma', 'then', 'body', 'private', 'type', 'if', 'procedure', 'case', 'in', 'protected', 'until', 'constant', 'interface', 'use', 'is', 'raise', 'declare', 'range', 'when', 'delay', 'limited', 'record', 'while', 'delta', 'loop', 'rem', 'with', 'digits', 'renames', 'do', 'mod', 'requeue', 'xor'] + let g:ada#Keywords += [{ + \ 'word': Item, + \ 'menu': 'keyword', + \ 'info': 'Ada keyword.', + \ 'kind': 'k', + \ 'icase': 1}] +endfor + +" Section: GNAT Project Files {{{3 +" +if exists ('g:ada_with_gnat_project_files') + for Item in ['project'] + let g:ada#Keywords += [{ + \ 'word': Item, + \ 'menu': 'keyword', + \ 'info': 'GNAT projectfile keyword.', + \ 'kind': 'k', + \ 'icase': 1}] + endfor +endif + +" Section: add standart exception {{{2 +" +for Item in ['Constraint_Error', 'Program_Error', 'Storage_Error', 'Tasking_Error', 'Status_Error', 'Mode_Error', 'Name_Error', 'Use_Error', 'Device_Error', 'End_Error', 'Data_Error', 'Layout_Error', 'Length_Error', 'Pattern_Error', 'Index_Error', 'Translation_Error', 'Time_Error', 'Argument_Error', 'Tag_Error', 'Picture_Error', 'Terminator_Error', 'Conversion_Error', 'Pointer_Error', 'Dereference_Error', 'Update_Error'] + let g:ada#Keywords += [{ + \ 'word': Item, + \ 'menu': 'exception', + \ 'info': 'Ada standart exception.', + \ 'kind': 'x', + \ 'icase': 1}] +endfor + +" Section: add GNAT exception {{{3 +" +if exists ('g:ada_gnat_extensions') + for Item in ['Assert_Failure'] + let g:ada#Keywords += [{ + \ 'word': Item, + \ 'menu': 'exception', + \ 'info': 'GNAT exception.', + \ 'kind': 'x', + \ 'icase': 1}] + endfor +endif + +" Section: add Ada buildin types {{{2 +" +for Item in ['Boolean', 'Integer', 'Natural', 'Positive', 'Float', 'Character', 'Wide_Character', 'Wide_Wide_Character', 'String', 'Wide_String', 'Wide_Wide_String', 'Duration'] + let g:ada#Keywords += [{ + \ 'word': Item, + \ 'menu': 'type', + \ 'info': 'Ada buildin type.', + \ 'kind': 't', + \ 'icase': 1}] +endfor + +" Section: add GNAT buildin types {{{3 +" +if exists ('g:ada_gnat_extensions') + for Item in ['Short_Integer', 'Short_Short_Integer', 'Long_Integer', 'Long_Long_Integer', 'Short_Float', 'Short_Short_Float', 'Long_Float', 'Long_Long_Float'] + let g:ada#Keywords += [{ + \ 'word': Item, + \ 'menu': 'type', + \ 'info': 'GNAT buildin type.', + \ 'kind': 't', + \ 'icase': 1}] + endfor +endif + +" Section: add Ada Attributes {{{2 +" +for Item in ['''Access', '''Address', '''Adjacent', '''Aft', '''Alignment', '''Base', '''Bit_Order', '''Body_Version', '''Callable', '''Caller', '''Ceiling', '''Class', '''Component_Size', '''Compose', '''Constrained', '''Copy_Sign', '''Count', '''Definite', '''Delta', '''Denorm', '''Digits', '''Emax', '''Exponent', '''External_Tag', '''Epsilon', '''First', '''First_Bit', '''Floor', '''Fore', '''Fraction', '''Identity', '''Image', '''Input', '''Large', '''Last', '''Last_Bit', '''Leading_Part', '''Length', '''Machine', '''Machine_Emax', '''Machine_Emin', '''Machine_Mantissa', '''Machine_Overflows', '''Machine_Radix', '''Machine_Rounding', '''Machine_Rounds', '''Mantissa', '''Max', '''Max_Size_In_Storage_Elements', '''Min', '''Mod', '''Model', '''Model_Emin', '''Model_Epsilon', '''Model_Mantissa', '''Model_Small', '''Modulus', '''Output', '''Partition_ID', '''Pos', '''Position', '''Pred', '''Priority', '''Range', '''Read', '''Remainder', '''Round', '''Rounding', '''Safe_Emax', '''Safe_First', '''Safe_Large', '''Safe_Last', '''Safe_Small', '''Scale', '''Scaling', '''Signed_Zeros', '''Size', '''Small', '''Storage_Pool', '''Storage_Size', '''Stream_Size', '''Succ', '''Tag', '''Terminated', '''Truncation', '''Unbiased_Rounding', '''Unchecked_Access', '''Val', '''Valid', '''Value', '''Version', '''Wide_Image', '''Wide_Value', '''Wide_Wide_Image', '''Wide_Wide_Value', '''Wide_Wide_Width', '''Wide_Width', '''Width', '''Write'] + let g:ada#Keywords += [{ + \ 'word': Item, + \ 'menu': 'attribute', + \ 'info': 'Ada attribute.', + \ 'kind': 'a', + \ 'icase': 1}] +endfor + +" Section: add GNAT Attributes {{{3 +" +if exists ('g:ada_gnat_extensions') + for Item in ['''Abort_Signal', '''Address_Size', '''Asm_Input', '''Asm_Output', '''AST_Entry', '''Bit', '''Bit_Position', '''Code_Address', '''Default_Bit_Order', '''Elaborated', '''Elab_Body', '''Elab_Spec', '''Emax', '''Enum_Rep', '''Epsilon', '''Fixed_Value', '''Has_Access_Values', '''Has_Discriminants', '''Img', '''Integer_Value', '''Machine_Size', '''Max_Interrupt_Priority', '''Max_Priority', '''Maximum_Alignment', '''Mechanism_Code', '''Null_Parameter', '''Object_Size', '''Passed_By_Reference', '''Range_Length', '''Storage_Unit', '''Target_Name', '''Tick', '''To_Address', '''Type_Class', '''UET_Address', '''Unconstrained_Array', '''Universal_Literal_String', '''Unrestricted_Access', '''VADS_Size', '''Value_Size', '''Wchar_T_Size', '''Word_Size'] + let g:ada#Keywords += [{ + \ 'word': Item, + \ 'menu': 'attribute', + \ 'info': 'GNAT attribute.', + \ 'kind': 'a', + \ 'icase': 1}] + endfor +endif + +" Section: add Ada Pragmas {{{2 +" +for Item in ['All_Calls_Remote', 'Assert', 'Assertion_Policy', 'Asynchronous', 'Atomic', 'Atomic_Components', 'Attach_Handler', 'Controlled', 'Convention', 'Detect_Blocking', 'Discard_Names', 'Elaborate', 'Elaborate_All', 'Elaborate_Body', 'Export', 'Import', 'Inline', 'Inspection_Point', 'Interface (Obsolescent)', 'Interrupt_Handler', 'Interrupt_Priority', 'Linker_Options', 'List', 'Locking_Policy', 'Memory_Size (Obsolescent)', 'No_Return', 'Normalize_Scalars', 'Optimize', 'Pack', 'Page', 'Partition_Elaboration_Policy', 'Preelaborable_Initialization', 'Preelaborate', 'Priority', 'Priority_Specific_Dispatching', 'Profile', 'Pure', 'Queueing_Policy', 'Relative_Deadline', 'Remote_Call_Interface', 'Remote_Types', 'Restrictions', 'Reviewable', 'Shared (Obsolescent)', 'Shared_Passive', 'Storage_Size', 'Storage_Unit (Obsolescent)', 'Suppress', 'System_Name (Obsolescent)', 'Task_Dispatching_Policy', 'Unchecked_Union', 'Unsuppress', 'Volatile', 'Volatile_Components'] + let g:ada#Keywords += [{ + \ 'word': Item, + \ 'menu': 'pragma', + \ 'info': 'Ada pragma.', + \ 'kind': 'p', + \ 'icase': 1}] +endfor + +" Section: add GNAT Pragmas {{{3 +" +if exists ('g:ada_gnat_extensions') + for Item in ['Abort_Defer', 'Ada_83', 'Ada_95', 'Ada_05', 'Annotate', 'Ast_Entry', 'C_Pass_By_Copy', 'Comment', 'Common_Object', 'Compile_Time_Warning', 'Complex_Representation', 'Component_Alignment', 'Convention_Identifier', 'CPP_Class', 'CPP_Constructor', 'CPP_Virtual', 'CPP_Vtable', 'Debug', 'Elaboration_Checks', 'Eliminate', 'Export_Exception', 'Export_Function', 'Export_Object', 'Export_Procedure', 'Export_Value', 'Export_Valued_Procedure', 'Extend_System', 'External', 'External_Name_Casing', 'Finalize_Storage_Only', 'Float_Representation', 'Ident', 'Import_Exception', 'Import_Function', 'Import_Object', 'Import_Procedure', 'Import_Valued_Procedure', 'Initialize_Scalars', 'Inline_Always', 'Inline_Generic', 'Interface_Name', 'Interrupt_State', 'Keep_Names', 'License', 'Link_With', 'Linker_Alias', 'Linker_Section', 'Long_Float', 'Machine_Attribute', 'Main_Storage', 'Obsolescent', 'Passive', 'Polling', 'Profile_Warnings', 'Propagate_Exceptions', 'Psect_Object', 'Pure_Function', 'Restriction_Warnings', 'Source_File_Name', 'Source_File_Name_Project', 'Source_Reference', 'Stream_Convert', 'Style_Checks', 'Subtitle', 'Suppress_All', 'Suppress_Exception_Locations', 'Suppress_Initialization', 'Task_Info', 'Task_Name', 'Task_Storage', 'Thread_Body', 'Time_Slice', 'Title', 'Unimplemented_Unit', 'Universal_Data', 'Unreferenced', 'Unreserve_All_Interrupts', 'Use_VADS_Size', 'Validity_Checks', 'Warnings', 'Weak_External'] + let g:ada#Keywords += [{ + \ 'word': Item, + \ 'menu': 'pragma', + \ 'info': 'GNAT pragma.', + \ 'kind': 'p', + \ 'icase': 1}] + endfor +endif +" 1}}} + +" Section: g:ada#Ctags_Kinds {{{1 +" +let g:ada#Ctags_Kinds = { + \ 'P': ["packspec", "package specifications"], + \ 'p': ["package", "packages"], + \ 'T': ["typespec", "type specifications"], + \ 't': ["type", "types"], + \ 'U': ["subspec", "subtype specifications"], + \ 'u': ["subtype", "subtypes"], + \ 'c': ["component", "record type components"], + \ 'l': ["literal", "enum type literals"], + \ 'V': ["varspec", "variable specifications"], + \ 'v': ["variable", "variables"], + \ 'f': ["formal", "generic formal parameters"], + \ 'n': ["constant", "constants"], + \ 'x': ["exception", "user defined exceptions"], + \ 'R': ["subprogspec", "subprogram specifications"], + \ 'r': ["subprogram", "subprograms"], + \ 'K': ["taskspec", "task specifications"], + \ 'k': ["task", "tasks"], + \ 'O': ["protectspec", "protected data specifications"], + \ 'o': ["protected", "protected data"], + \ 'E': ["entryspec", "task/protected data entry specifications"], + \ 'e': ["entry", "task/protected data entries"], + \ 'b': ["label", "labels"], + \ 'i': ["identifier", "loop/declare identifiers"], + \ 'a': ["autovar", "automatic variables"], + \ 'y': ["annon", "loops and blocks with no identifier"]} + +" Section: ada#Word (...) {{{1 +" +" Extract current Ada word across multiple lines +" AdaWord ([line, column])\ +" +function ada#Word (...) + if a:0 > 1 + let l:Line_Nr = a:1 + let l:Column_Nr = a:2 - 1 + else + let l:Line_Nr = line('.') + let l:Column_Nr = col('.') - 1 + endif + + let l:Line = substitute (getline (l:Line_Nr), g:ada#Comment, '', '' ) + + " Cope with tag searching for items in comments; if we are, don't loop + " backards looking for previous lines + if l:Column_Nr > strlen(l:Line) + " We were in a comment + let l:Line = getline(l:Line_Nr) + let l:Search_Prev_Lines = 0 + else + let l:Search_Prev_Lines = 1 + endif + + " Go backwards until we find a match (Ada ID) that *doesn't* include our + " location - i.e., the previous ID. This is because the current 'correct' + " match will toggle matching/not matching as we traverse characters + " backwards. Thus, we have to find the previous unrelated match, exclude + " it, then use the next full match (ours). + " Remember to convert vim column 'l:Column_Nr' [1..n] to string offset [0..(n-1)] + " ... but start, here, one after the required char. + let l:New_Column = l:Column_Nr + 1 + while 1 + let l:New_Column = l:New_Column - 1 + if l:New_Column < 0 + " Have to include previous l:Line from file + let l:Line_Nr = l:Line_Nr - 1 + if l:Line_Nr < 1 || !l:Search_Prev_Lines + " Start of file or matching in a comment + let l:Line_Nr = 1 + let l:New_Column = 0 + let l:Our_Match = match (l:Line, g:ada#WordRegex ) + break + endif + " Get previous l:Line, and prepend it to our search string + let l:New_Line = substitute (getline (l:Line_Nr), g:ada#Comment, '', '' ) + let l:New_Column = strlen (l:New_Line) - 1 + let l:Column_Nr = l:Column_Nr + l:New_Column + let l:Line = l:New_Line . l:Line + endif + " Check to see if this is a match excluding 'us' + let l:Match_End = l:New_Column + + \ matchend (strpart (l:Line,l:New_Column), g:ada#WordRegex ) - 1 + if l:Match_End >= l:New_Column && + \ l:Match_End < l:Column_Nr + " Yes + let l:Our_Match = l:Match_End+1 + + \ match (strpart (l:Line,l:Match_End+1), g:ada#WordRegex ) + break + endif + endwhile + + " Got anything? + if l:Our_Match < 0 + return '' + else + let l:Line = strpart (l:Line, l:Our_Match) + endif + + " Now simply add further lines until the match gets no bigger + let l:Match_String = matchstr (l:Line, g:ada#WordRegex) + let l:Last_Line = line ('$') + let l:Line_Nr = line ('.') + 1 + while l:Line_Nr <= l:Last_Line + let l:Last_Match = l:Match_String + let l:Line = l:Line . + \ substitute (getline (l:Line_Nr), g:ada#Comment, '', '') + let l:Match_String = matchstr (l:Line, g:ada#WordRegex) + if l:Match_String == l:Last_Match + break + endif + endwhile + + " Strip whitespace & return + return substitute (l:Match_String, '\s\+', '', 'g') +endfunction ada#Word + +" Section: ada#List_Tag (...) {{{1 +" +" List tags in quickfix window +" +function ada#List_Tag (...) + if a:0 > 1 + let l:Tag_Word = ada#Word (a:1, a:2) + elseif a:0 > 0 + let l:Tag_Word = a:1 + else + let l:Tag_Word = ada#Word () + endif + + echo "Searching for" l:Tag_Word + + let l:Pattern = '^' . l:Tag_Word . '$' + let l:Tag_List = taglist (l:Pattern) + let l:Error_List = [] + " + " add symbols + " + for Tag_Item in l:Tag_List + if l:Tag_Item['kind'] == '' + let l:Tag_Item['kind'] = 's' + endif + + let l:Error_List += [ + \ l:Tag_Item['filename'] . '|' . + \ l:Tag_Item['cmd'] . '|' . + \ l:Tag_Item['kind'] . "\t" . + \ l:Tag_Item['name'] ] + endfor + set errorformat=%f\|%l\|%m + cexpr l:Error_List + cwindow +endfunction ada#List_Tag + +" Section: ada#Jump_Tag (Word, Mode) {{{1 +" +" Word tag - include '.' and if Ada make uppercase +" +function ada#Jump_Tag (Word, Mode) + if a:Word == '' + " Get current word + let l:Word = ada#Word() + if l:Word == '' + throw "NOT_FOUND: no identifier found." + endif + else + let l:Word = a:Word + endif + + echo "Searching for " . l:Word + + try + execute a:Mode l:Word + catch /.*:E426:.*/ + let ignorecase = &ignorecase + set ignorecase + execute a:Mode l:Word + let &ignorecase = ignorecase + endtry + + return +endfunction ada#Jump_Tag + +" Section: ada#Insert_Backspace () {{{1 +" +" Backspace at end of line after auto-inserted commentstring '-- ' wipes it +" +function ada#Insert_Backspace () + let l:Line = getline ('.') + if col ('.') > strlen (l:Line) && + \ match (l:Line, '-- $') != -1 && + \ match (&comments,'--') != -1 + return "\\\" + else + return "\" + endif + + return +endfunction ada#InsertBackspace + +" Section: Insert Completions {{{1 +" +" Section: ada#User_Complete(findstart, base) {{{2 +" +" This function is used for the 'complete' option. +" +function! ada#User_Complete(findstart, base) + if a:findstart == 1 + " + " locate the start of the word + " + let line = getline ('.') + let start = col ('.') - 1 + while start > 0 && line[start - 1] =~ '\i\|''' + let start -= 1 + endwhile + return start + else + " + " look up matches + " + let l:Pattern = '^' . a:base . '.*$' + " + " add keywords + " + for Tag_Item in g:ada#Keywords + if l:Tag_Item['word'] =~? l:Pattern + if complete_add (l:Tag_Item) == 0 + return [] + endif + if complete_check () + return [] + endif + endif + endfor + return [] + endif +endfunction ada#User_Complete + +" Section: ada#Completion (cmd) {{{2 +" +" Word completion (^N/^R/^X^]) - force '.' inclusion +function ada#Completion (cmd) + set iskeyword+=46 + return a:cmd . "\=ada#Completion_End ()\" +endfunction ada#Completion + +" Section: ada#Completion_End () {{{2 +" +function ada#Completion_End () + set iskeyword-=46 + return '' +endfunction ada#Completion_End + +" Section: ada#Create_Tags {{{1 +" +function ada#Create_Tags (option) + if a:option == 'file' + let l:Filename = fnamemodify (bufname ('%'), ':p') + elseif a:option == 'dir' + let l:Filename = + \ fnamemodify (bufname ('%'), ':p:h') . "*.ada " . + \ fnamemodify (bufname ('%'), ':p:h') . "*.adb " . + \ fnamemodify (bufname ('%'), ':p:h') . "*.ads" + else + let l:Filename = a:option + endif + execute '!ctags --excmd=number ' . l:Filename +endfunction ada#Create_Tags + +" Section: ada#Switch_Session {{{1 +" +function ada#Switch_Session (New_Session) + " + " you should not save to much date into the seession since they will + " be sourced + " + let l:sessionoptions=&sessionoptions + + try + set sessionoptions=buffers,curdir,folds,globals,resize,slash,tabpages,tabpages,unix,winpos,winsize + + if a:New_Session != v:this_session + " + " We actualy got a new session - otherwise there + " is nothing to do. + " + if strlen (v:this_session) > 0 + execute 'mksession! ' . v:this_session + endif + + let v:this_session = a:New_Session + + "if filereadable (v:this_session) + "execute 'source ' . v:this_session + "endif + + augroup ada_session + autocmd! + autocmd VimLeavePre * execute 'mksession! ' . v:this_session + augroup END + + "if exists ("g:Tlist_Auto_Open") && g:Tlist_Auto_Open + "TlistOpen + "endif + + endif + finally + let &sessionoptions=l:sessionoptions + endtry + + return +endfunction ada#Switch_Session + +" Section: GNAT Pretty Printer folding {{{1 +" +if exists('g:ada_folding') && g:ada_folding[0] == 'g' + " + " Lines consisting only of ')' ';' are due to a gnat pretty bug and + " have the same level as the line above (can't happen in the first + " line). + " + let s:Fold_Collate = '^\([;)]*$\|' + + " + " some lone statements are folded with the line above + " + if stridx (g:ada_folding, 'i') >= 0 + let s:Fold_Collate .= '\s\+\$\|' + endif + if stridx (g:ada_folding, 'b') >= 0 + let s:Fold_Collate .= '\s\+\$\|' + endif + if stridx (g:ada_folding, 'p') >= 0 + let s:Fold_Collate .= '\s\+\$\|' + endif + if stridx (g:ada_folding, 'x') >= 0 + let s:Fold_Collate .= '\s\+\$\|' + endif + + " We also handle empty lines and + " comments here. + let s:Fold_Collate .= '--\)' + + function ada#Pretty_Print_Folding (Line) " {{{2 + let l:Text = getline (a:Line) + + if l:Text =~ s:Fold_Collate + " + " fold with line above + " + let l:Level = "=" + elseif l:Text =~ '^\s\+(' + " + " gnat outdents a line which stards with a ( by one characters so + " that parameters which follow are aligned. + " + let l:Level = (indent (a:Line) + 1) / &shiftwidth + else + let l:Level = indent (a:Line) / &shiftwidth + endif + + return l:Level + endfunction ada#Pretty_Print_Folding " }}}2 +endif + +" Section: Options and Menus {{{1 +" +" Section: ada#Switch_Syntax_Options {{{2 +" +function ada#Switch_Syntax_Option (option) + syntax off + if exists ('g:ada_' . a:option) + unlet g:ada_{a:option} + echo a:option . 'now off' + else + let g:ada_{a:option}=1 + echo a:option . 'now on' + endif + syntax on +endfunction ada#Switch_Syntax_Option + +" Section: ada#Map_Menu {{{2 +" +function ada#Map_Menu (Text, Keys, Command) + if a:Keys[0] == ':' + execute + \ "50amenu " . + \ "Ada." . escape(a:Text, ' ') . + \ "" . a:Keys . + \ " :" . a:Command . "" + execute + \ "command -buffer " . + \ a:Keys[1:] . + \" :" . a:Command . "" + elseif a:Keys[0] == '<' + execute + \ "50amenu " . + \ "Ada." . escape(a:Text, ' ') . + \ "" . a:Keys . + \ " :" . a:Command . "" + execute + \ "nnoremap " . + \ a:Keys . + \" :" . a:Command . "" + execute + \ "inoremap " . + \ a:Keys . + \" :" . a:Command . "" + else + if exists("g:mapleader") + let l:leader = g:mapleader + else + let l:leader = '\' + endif + execute + \ "50amenu " . + \ "Ada." . escape(a:Text, ' ') . + \ "" . escape(l:leader . "a" . a:Keys , '\') . + \ " :" . a:Command . "" + execute + \ "nnoremap " . + \ escape(l:leader . "a" . a:Keys , '\') . + \" :" . a:Command + execute + \ "inoremap " . + \ escape(l:leader . "a" . a:Keys , '\') . + \" :" . a:Command + endif + return +endfunction + +" Section: ada#Map_Popup {{{2 +" +function ada#Map_Popup (Text, Keys, Command) + if exists("g:mapleader") + let l:leader = g:mapleader + else + let l:leader = '\' + endif + execute + \ "50amenu " . + \ "PopUp." . escape(a:Text, ' ') . + \ "" . escape(l:leader . "a" . a:Keys , '\') . + \ " :" . a:Command . "" + + call ada#Map_Menu (a:Text, a:Keys, a:Command) + return +endfunction ada#Map_Popup + +" }}}1 + +lockvar g:ada#WordRegex +lockvar g:ada#DotWordRegex +lockvar g:ada#Comment +lockvar! g:ada#Keywords +lockvar! g:ada#Ctags_Kinds + +finish " 1}}} + +"------------------------------------------------------------------------------ +" Copyright (C) 2006 Martin Krischik +" +" Vim is Charityware - see ":help license" or uganda.txt for licence details. +"------------------------------------------------------------------------------ +" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab +" vim: foldmethod=marker diff --git a/vim/bundle/ubuntu-vim72/autoload/adacomplete.vim b/vim/bundle/ubuntu-vim72/autoload/adacomplete.vim new file mode 100644 index 0000000..2659f51 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/autoload/adacomplete.vim @@ -0,0 +1,109 @@ +"------------------------------------------------------------------------------ +" Description: Vim Ada omnicompletion file +" Language: Ada (2005) +" $Id: adacomplete.vim 887 2008-07-08 14:29:01Z krischik $ +" Maintainer: Martin Krischik +" $Author: krischik $ +" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ +" Version: 4.6 +" $Revision: 887 $ +" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $ +" History: 24.05.2006 MK Unified Headers +" 26.05.2006 MK improved search for begin of word. +" 16.07.2006 MK Ada-Mode as vim-ball +" 15.10.2006 MK Bram's suggestion for runtime integration +" 05.11.2006 MK Bram suggested not to use include protection for +" autoload +" 05.11.2006 MK Bram suggested agaist using setlocal omnifunc +" 05.11.2006 MK Bram suggested to save on spaces +" Help Page: ft-ada-omni +"------------------------------------------------------------------------------ + +if version < 700 + finish +endif + +" Section: adacomplete#Complete () {{{1 +" +" This function is used for the 'omnifunc' option. +" +function! adacomplete#Complete (findstart, base) + if a:findstart == 1 + return ada#User_Complete (a:findstart, a:base) + else + " + " look up matches + " + if exists ("g:ada_omni_with_keywords") + call ada#User_Complete (a:findstart, a:base) + endif + " + " search tag file for matches + " + let l:Pattern = '^' . a:base . '.*$' + let l:Tag_List = taglist (l:Pattern) + " + " add symbols + " + for Tag_Item in l:Tag_List + if l:Tag_Item['kind'] == '' + " + " Tag created by gnat xref + " + let l:Match_Item = { + \ 'word': l:Tag_Item['name'], + \ 'menu': l:Tag_Item['filename'], + \ 'info': "Symbol from file " . l:Tag_Item['filename'] . " line " . l:Tag_Item['cmd'], + \ 'kind': 's', + \ 'icase': 1} + else + " + " Tag created by ctags + " + let l:Info = 'Symbol : ' . l:Tag_Item['name'] . "\n" + let l:Info .= 'Of type : ' . g:ada#Ctags_Kinds[l:Tag_Item['kind']][1] . "\n" + let l:Info .= 'Defined in File : ' . l:Tag_Item['filename'] . "\n" + + if has_key( l:Tag_Item, 'package') + let l:Info .= 'Package : ' . l:Tag_Item['package'] . "\n" + let l:Menu = l:Tag_Item['package'] + elseif has_key( l:Tag_Item, 'separate') + let l:Info .= 'Separate from Package : ' . l:Tag_Item['separate'] . "\n" + let l:Menu = l:Tag_Item['separate'] + elseif has_key( l:Tag_Item, 'packspec') + let l:Info .= 'Package Specification : ' . l:Tag_Item['packspec'] . "\n" + let l:Menu = l:Tag_Item['packspec'] + elseif has_key( l:Tag_Item, 'type') + let l:Info .= 'Datetype : ' . l:Tag_Item['type'] . "\n" + let l:Menu = l:Tag_Item['type'] + else + let l:Menu = l:Tag_Item['filename'] + endif + + let l:Match_Item = { + \ 'word': l:Tag_Item['name'], + \ 'menu': l:Menu, + \ 'info': l:Info, + \ 'kind': l:Tag_Item['kind'], + \ 'icase': 1} + endif + if complete_add (l:Match_Item) == 0 + return [] + endif + if complete_check () + return [] + endif + endfor + return [] + endif +endfunction adacomplete#Complete + +finish " 1}}} + +"------------------------------------------------------------------------------ +" Copyright (C) 2006 Martin Krischik +" +" Vim is Charityware - see ":help license" or uganda.txt for licence details. +"------------------------------------------------------------------------------ +" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab +" vim: foldmethod=marker diff --git a/vim/bundle/ubuntu-vim72/autoload/ccomplete.vim b/vim/bundle/ubuntu-vim72/autoload/ccomplete.vim new file mode 100644 index 0000000..6850e19 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/autoload/ccomplete.vim @@ -0,0 +1,605 @@ +" Vim completion script +" Language: C +" Maintainer: Bram Moolenaar +" Last Change: 2007 Aug 30 + + +" This function is used for the 'omnifunc' option. +function! ccomplete#Complete(findstart, base) + if a:findstart + " Locate the start of the item, including ".", "->" and "[...]". + let line = getline('.') + let start = col('.') - 1 + let lastword = -1 + while start > 0 + if line[start - 1] =~ '\w' + let start -= 1 + elseif line[start - 1] =~ '\.' + if lastword == -1 + let lastword = start + endif + let start -= 1 + elseif start > 1 && line[start - 2] == '-' && line[start - 1] == '>' + if lastword == -1 + let lastword = start + endif + let start -= 2 + elseif line[start - 1] == ']' + " Skip over [...]. + let n = 0 + let start -= 1 + while start > 0 + let start -= 1 + if line[start] == '[' + if n == 0 + break + endif + let n -= 1 + elseif line[start] == ']' " nested [] + let n += 1 + endif + endwhile + else + break + endif + endwhile + + " Return the column of the last word, which is going to be changed. + " Remember the text that comes before it in s:prepended. + if lastword == -1 + let s:prepended = '' + return start + endif + let s:prepended = strpart(line, start, lastword - start) + return lastword + endif + + " Return list of matches. + + let base = s:prepended . a:base + + " Don't do anything for an empty base, would result in all the tags in the + " tags file. + if base == '' + return [] + endif + + " init cache for vimgrep to empty + let s:grepCache = {} + + " Split item in words, keep empty word after "." or "->". + " "aa" -> ['aa'], "aa." -> ['aa', ''], "aa.bb" -> ['aa', 'bb'], etc. + " We can't use split, because we need to skip nested [...]. + let items = [] + let s = 0 + while 1 + let e = match(base, '\.\|->\|\[', s) + if e < 0 + if s == 0 || base[s - 1] != ']' + call add(items, strpart(base, s)) + endif + break + endif + if s == 0 || base[s - 1] != ']' + call add(items, strpart(base, s, e - s)) + endif + if base[e] == '.' + let s = e + 1 " skip over '.' + elseif base[e] == '-' + let s = e + 2 " skip over '->' + else + " Skip over [...]. + let n = 0 + let s = e + let e += 1 + while e < len(base) + if base[e] == ']' + if n == 0 + break + endif + let n -= 1 + elseif base[e] == '[' " nested [...] + let n += 1 + endif + let e += 1 + endwhile + let e += 1 + call add(items, strpart(base, s, e - s)) + let s = e + endif + endwhile + + " Find the variable items[0]. + " 1. in current function (like with "gd") + " 2. in tags file(s) (like with ":tag") + " 3. in current file (like with "gD") + let res = [] + if searchdecl(items[0], 0, 1) == 0 + " Found, now figure out the type. + " TODO: join previous line if it makes sense + let line = getline('.') + let col = col('.') + if stridx(strpart(line, 0, col), ';') != -1 + " Handle multiple declarations on the same line. + let col2 = col - 1 + while line[col2] != ';' + let col2 -= 1 + endwhile + let line = strpart(line, col2 + 1) + let col -= col2 + endif + if stridx(strpart(line, 0, col), ',') != -1 + " Handle multiple declarations on the same line in a function + " declaration. + let col2 = col - 1 + while line[col2] != ',' + let col2 -= 1 + endwhile + if strpart(line, col2 + 1, col - col2 - 1) =~ ' *[^ ][^ ]* *[^ ]' + let line = strpart(line, col2 + 1) + let col -= col2 + endif + endif + if len(items) == 1 + " Completing one word and it's a local variable: May add '[', '.' or + " '->'. + let match = items[0] + let kind = 'v' + if match(line, '\<' . match . '\s*\[') > 0 + let match .= '[' + else + let res = s:Nextitem(strpart(line, 0, col), [''], 0, 1) + if len(res) > 0 + " There are members, thus add "." or "->". + if match(line, '\*[ \t(]*' . match . '\>') > 0 + let match .= '->' + else + let match .= '.' + endif + endif + endif + let res = [{'match': match, 'tagline' : '', 'kind' : kind, 'info' : line}] + else + " Completing "var.", "var.something", etc. + let res = s:Nextitem(strpart(line, 0, col), items[-1], 0, 1) + endif + endif + + if len(items) == 1 + " Only one part, no "." or "->": complete from tags file. + let tags = taglist('^' . base) + + " Remove members, these can't appear without something in front. + call filter(tags, 'has_key(v:val, "kind") ? v:val["kind"] != "m" : 1') + + " Remove static matches in other files. + call filter(tags, '!has_key(v:val, "static") || !v:val["static"] || bufnr("%") == bufnr(v:val["filename"])') + + call extend(res, map(tags, 's:Tag2item(v:val)')) + endif + + if len(res) == 0 + " Find the variable in the tags file(s) + let diclist = taglist('^' . items[0] . '$') + + " Remove members, these can't appear without something in front. + call filter(diclist, 'has_key(v:val, "kind") ? v:val["kind"] != "m" : 1') + + let res = [] + for i in range(len(diclist)) + " New ctags has the "typeref" field. Patched version has "typename". + if has_key(diclist[i], 'typename') + call extend(res, s:StructMembers(diclist[i]['typename'], items[1:], 1)) + elseif has_key(diclist[i], 'typeref') + call extend(res, s:StructMembers(diclist[i]['typeref'], items[1:], 1)) + endif + + " For a variable use the command, which must be a search pattern that + " shows the declaration of the variable. + if diclist[i]['kind'] == 'v' + let line = diclist[i]['cmd'] + if line[0] == '/' && line[1] == '^' + let col = match(line, '\<' . items[0] . '\>') + call extend(res, s:Nextitem(strpart(line, 2, col - 2), items[1:], 0, 1)) + endif + endif + endfor + endif + + if len(res) == 0 && searchdecl(items[0], 1) == 0 + " Found, now figure out the type. + " TODO: join previous line if it makes sense + let line = getline('.') + let col = col('.') + let res = s:Nextitem(strpart(line, 0, col), items[1:], 0, 1) + endif + + " If the last item(s) are [...] they need to be added to the matches. + let last = len(items) - 1 + let brackets = '' + while last >= 0 + if items[last][0] != '[' + break + endif + let brackets = items[last] . brackets + let last -= 1 + endwhile + + return map(res, 's:Tagline2item(v:val, brackets)') +endfunc + +function! s:GetAddition(line, match, memarg, bracket) + " Guess if the item is an array. + if a:bracket && match(a:line, a:match . '\s*\[') > 0 + return '[' + endif + + " Check if the item has members. + if len(s:SearchMembers(a:memarg, [''], 0)) > 0 + " If there is a '*' before the name use "->". + if match(a:line, '\*[ \t(]*' . a:match . '\>') > 0 + return '->' + else + return '.' + endif + endif + return '' +endfunction + +" Turn the tag info "val" into an item for completion. +" "val" is is an item in the list returned by taglist(). +" If it is a variable we may add "." or "->". Don't do it for other types, +" such as a typedef, by not including the info that s:GetAddition() uses. +function! s:Tag2item(val) + let res = {'match': a:val['name']} + + let res['extra'] = s:Tagcmd2extra(a:val['cmd'], a:val['name'], a:val['filename']) + + let s = s:Dict2info(a:val) + if s != '' + let res['info'] = s + endif + + let res['tagline'] = '' + if has_key(a:val, "kind") + let kind = a:val['kind'] + let res['kind'] = kind + if kind == 'v' + let res['tagline'] = "\t" . a:val['cmd'] + let res['dict'] = a:val + elseif kind == 'f' + let res['match'] = a:val['name'] . '(' + endif + endif + + return res +endfunction + +" Use all the items in dictionary for the "info" entry. +function! s:Dict2info(dict) + let info = '' + for k in sort(keys(a:dict)) + let info .= k . repeat(' ', 10 - len(k)) + if k == 'cmd' + let info .= substitute(matchstr(a:dict['cmd'], '/^\s*\zs.*\ze$/'), '\\\(.\)', '\1', 'g') + else + let info .= a:dict[k] + endif + let info .= "\n" + endfor + return info +endfunc + +" Parse a tag line and return a dictionary with items like taglist() +function! s:ParseTagline(line) + let l = split(a:line, "\t") + let d = {} + if len(l) >= 3 + let d['name'] = l[0] + let d['filename'] = l[1] + let d['cmd'] = l[2] + let n = 2 + if l[2] =~ '^/' + " Find end of cmd, it may contain Tabs. + while n < len(l) && l[n] !~ '/;"$' + let n += 1 + let d['cmd'] .= " " . l[n] + endwhile + endif + for i in range(n + 1, len(l) - 1) + if l[i] == 'file:' + let d['static'] = 1 + elseif l[i] !~ ':' + let d['kind'] = l[i] + else + let d[matchstr(l[i], '[^:]*')] = matchstr(l[i], ':\zs.*') + endif + endfor + endif + + return d +endfunction + +" Turn a match item "val" into an item for completion. +" "val['match']" is the matching item. +" "val['tagline']" is the tagline in which the last part was found. +function! s:Tagline2item(val, brackets) + let line = a:val['tagline'] + let add = s:GetAddition(line, a:val['match'], [a:val], a:brackets == '') + let res = {'word': a:val['match'] . a:brackets . add } + + if has_key(a:val, 'info') + " Use info from Tag2item(). + let res['info'] = a:val['info'] + else + " Parse the tag line and add each part to the "info" entry. + let s = s:Dict2info(s:ParseTagline(line)) + if s != '' + let res['info'] = s + endif + endif + + if has_key(a:val, 'kind') + let res['kind'] = a:val['kind'] + elseif add == '(' + let res['kind'] = 'f' + else + let s = matchstr(line, '\t\(kind:\)\=\zs\S\ze\(\t\|$\)') + if s != '' + let res['kind'] = s + endif + endif + + if has_key(a:val, 'extra') + let res['menu'] = a:val['extra'] + return res + endif + + " Isolate the command after the tag and filename. + let s = matchstr(line, '[^\t]*\t[^\t]*\t\zs\(/^.*$/\|[^\t]*\)\ze\(;"\t\|\t\|$\)') + if s != '' + let res['menu'] = s:Tagcmd2extra(s, a:val['match'], matchstr(line, '[^\t]*\t\zs[^\t]*\ze\t')) + endif + return res +endfunction + +" Turn a command from a tag line to something that is useful in the menu +function! s:Tagcmd2extra(cmd, name, fname) + if a:cmd =~ '^/^' + " The command is a search command, useful to see what it is. + let x = matchstr(a:cmd, '^/^\s*\zs.*\ze$/') + let x = substitute(x, '\<' . a:name . '\>', '@@', '') + let x = substitute(x, '\\\(.\)', '\1', 'g') + let x = x . ' - ' . a:fname + elseif a:cmd =~ '^\d*$' + " The command is a line number, the file name is more useful. + let x = a:fname . ' - ' . a:cmd + else + " Not recognized, use command and file name. + let x = a:cmd . ' - ' . a:fname + endif + return x +endfunction + +" Find composing type in "lead" and match items[0] with it. +" Repeat this recursively for items[1], if it's there. +" When resolving typedefs "depth" is used to avoid infinite recursion. +" Return the list of matches. +function! s:Nextitem(lead, items, depth, all) + + " Use the text up to the variable name and split it in tokens. + let tokens = split(a:lead, '\s\+\|\<') + + " Try to recognize the type of the variable. This is rough guessing... + let res = [] + for tidx in range(len(tokens)) + + " Skip tokens starting with a non-ID character. + if tokens[tidx] !~ '^\h' + continue + endif + + " Recognize "struct foobar" and "union foobar". + " Also do "class foobar" when it's C++ after all (doesn't work very well + " though). + if (tokens[tidx] == 'struct' || tokens[tidx] == 'union' || tokens[tidx] == 'class') && tidx + 1 < len(tokens) + let res = s:StructMembers(tokens[tidx] . ':' . tokens[tidx + 1], a:items, a:all) + break + endif + + " TODO: add more reserved words + if index(['int', 'short', 'char', 'float', 'double', 'static', 'unsigned', 'extern'], tokens[tidx]) >= 0 + continue + endif + + " Use the tags file to find out if this is a typedef. + let diclist = taglist('^' . tokens[tidx] . '$') + for tagidx in range(len(diclist)) + let item = diclist[tagidx] + + " New ctags has the "typeref" field. Patched version has "typename". + if has_key(item, 'typeref') + call extend(res, s:StructMembers(item['typeref'], a:items, a:all)) + continue + endif + if has_key(item, 'typename') + call extend(res, s:StructMembers(item['typename'], a:items, a:all)) + continue + endif + + " Only handle typedefs here. + if item['kind'] != 't' + continue + endif + + " Skip matches local to another file. + if has_key(item, 'static') && item['static'] && bufnr('%') != bufnr(item['filename']) + continue + endif + + " For old ctags we recognize "typedef struct aaa" and + " "typedef union bbb" in the tags file command. + let cmd = item['cmd'] + let ei = matchend(cmd, 'typedef\s\+') + if ei > 1 + let cmdtokens = split(strpart(cmd, ei), '\s\+\|\<') + if len(cmdtokens) > 1 + if cmdtokens[0] == 'struct' || cmdtokens[0] == 'union' || cmdtokens[0] == 'class' + let name = '' + " Use the first identifier after the "struct" or "union" + for ti in range(len(cmdtokens) - 1) + if cmdtokens[ti] =~ '^\w' + let name = cmdtokens[ti] + break + endif + endfor + if name != '' + call extend(res, s:StructMembers(cmdtokens[0] . ':' . name, a:items, a:all)) + endif + elseif a:depth < 10 + " Could be "typedef other_T some_T". + call extend(res, s:Nextitem(cmdtokens[0], a:items, a:depth + 1, a:all)) + endif + endif + endif + endfor + if len(res) > 0 + break + endif + endfor + + return res +endfunction + + +" Search for members of structure "typename" in tags files. +" Return a list with resulting matches. +" Each match is a dictionary with "match" and "tagline" entries. +" When "all" is non-zero find all, otherwise just return 1 if there is any +" member. +function! s:StructMembers(typename, items, all) + " Todo: What about local structures? + let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) + if fnames == '' + return [] + endif + + let typename = a:typename + let qflist = [] + let cached = 0 + if a:all == 0 + let n = '1' " stop at first found match + if has_key(s:grepCache, a:typename) + let qflist = s:grepCache[a:typename] + let cached = 1 + endif + else + let n = '' + endif + if !cached + while 1 + exe 'silent! ' . n . 'vimgrep /\t' . typename . '\(\t\|$\)/j ' . fnames + + let qflist = getqflist() + if len(qflist) > 0 || match(typename, "::") < 0 + break + endif + " No match for "struct:context::name", remove "context::" and try again. + let typename = substitute(typename, ':[^:]*::', ':', '') + endwhile + + if a:all == 0 + " Store the result to be able to use it again later. + let s:grepCache[a:typename] = qflist + endif + endif + + " Put matching members in matches[]. + let matches = [] + for l in qflist + let memb = matchstr(l['text'], '[^\t]*') + if memb =~ '^' . a:items[0] + " Skip matches local to another file. + if match(l['text'], "\tfile:") < 0 || bufnr('%') == bufnr(matchstr(l['text'], '\t\zs[^\t]*')) + let item = {'match': memb, 'tagline': l['text']} + + " Add the kind of item. + let s = matchstr(l['text'], '\t\(kind:\)\=\zs\S\ze\(\t\|$\)') + if s != '' + let item['kind'] = s + if s == 'f' + let item['match'] = memb . '(' + endif + endif + + call add(matches, item) + endif + endif + endfor + + if len(matches) > 0 + " Skip over [...] items + let idx = 1 + while 1 + if idx >= len(a:items) + return matches " No further items, return the result. + endif + if a:items[idx][0] != '[' + break + endif + let idx += 1 + endwhile + + " More items following. For each of the possible members find the + " matching following members. + return s:SearchMembers(matches, a:items[idx :], a:all) + endif + + " Failed to find anything. + return [] +endfunction + +" For matching members, find matches for following items. +" When "all" is non-zero find all, otherwise just return 1 if there is any +" member. +function! s:SearchMembers(matches, items, all) + let res = [] + for i in range(len(a:matches)) + let typename = '' + if has_key(a:matches[i], 'dict') + if has_key(a:matches[i].dict, 'typename') + let typename = a:matches[i].dict['typename'] + elseif has_key(a:matches[i].dict, 'typeref') + let typename = a:matches[i].dict['typeref'] + endif + let line = "\t" . a:matches[i].dict['cmd'] + else + let line = a:matches[i]['tagline'] + let e = matchend(line, '\ttypename:') + if e < 0 + let e = matchend(line, '\ttyperef:') + endif + if e > 0 + " Use typename field + let typename = matchstr(line, '[^\t]*', e) + endif + endif + + if typename != '' + call extend(res, s:StructMembers(typename, a:items, a:all)) + else + " Use the search command (the declaration itself). + let s = match(line, '\t\zs/^') + if s > 0 + let e = match(line, '\<' . a:matches[i]['match'] . '\>', s) + if e > 0 + call extend(res, s:Nextitem(strpart(line, s, e - s), a:items, 0, a:all)) + endif + endif + endif + if a:all == 0 && len(res) > 0 + break + endif + endfor + return res +endfunc diff --git a/vim/bundle/ubuntu-vim72/autoload/csscomplete.vim b/vim/bundle/ubuntu-vim72/autoload/csscomplete.vim new file mode 100644 index 0000000..9eebb87 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/autoload/csscomplete.vim @@ -0,0 +1,429 @@ +" Vim completion script +" Language: CSS 2.1 +" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) +" Last Change: 2007 May 5 + + let s:values = split("azimuth background background-attachment background-color background-image background-position background-repeat border bottom border-collapse border-color border-spacing border-style border-top border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width border-bottom-width border-left-width border-width caption-side clear clip color content counter-increment counter-reset cue cue-after cue-before cursor display direction elevation empty-cells float font font-family font-size font-style font-variant font-weight height left letter-spacing line-height list-style list-style-image list-style-position list-style-type margin margin-right margin-left margin-top margin-bottom max-height max-width min-height min-width orphans outline outline-color outline-style outline-width overflow padding padding-top padding-right padding-bottom padding-left page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position quotes right richness speak speak-header speak-numeral speak-punctuation speech-rate stress table-layout text-align text-decoration text-indent text-transform top unicode-bidi vertical-align visibility voice-family volume white-space width widows word-spacing z-index") + +function! csscomplete#CompleteCSS(findstart, base) + +if a:findstart + " We need whole line to proper checking + let line = getline('.') + let start = col('.') - 1 + let compl_begin = col('.') - 2 + while start >= 0 && line[start - 1] =~ '\%(\k\|-\)' + let start -= 1 + endwhile + let b:compl_context = line[0:compl_begin] + return start +endif + +" There are few chars important for context: +" ^ ; : { } /* */ +" Where ^ is start of line and /* */ are comment borders +" Depending on their relative position to cursor we will know what should +" be completed. +" 1. if nearest are ^ or { or ; current word is property +" 2. if : it is value (with exception of pseudo things) +" 3. if } we are outside of css definitions +" 4. for comments ignoring is be the easiest but assume they are the same +" as 1. +" 5. if @ complete at-rule +" 6. if ! complete important +if exists("b:compl_context") + let line = b:compl_context + unlet! b:compl_context +else + let line = a:base +endif + +let res = [] +let res2 = [] +let borders = {} + +" Check last occurrence of sequence + +let openbrace = strridx(line, '{') +let closebrace = strridx(line, '}') +let colon = strridx(line, ':') +let semicolon = strridx(line, ';') +let opencomm = strridx(line, '/*') +let closecomm = strridx(line, '*/') +let style = strridx(line, 'style\s*=') +let atrule = strridx(line, '@') +let exclam = strridx(line, '!') + +if openbrace > -1 + let borders[openbrace] = "openbrace" +endif +if closebrace > -1 + let borders[closebrace] = "closebrace" +endif +if colon > -1 + let borders[colon] = "colon" +endif +if semicolon > -1 + let borders[semicolon] = "semicolon" +endif +if opencomm > -1 + let borders[opencomm] = "opencomm" +endif +if closecomm > -1 + let borders[closecomm] = "closecomm" +endif +if style > -1 + let borders[style] = "style" +endif +if atrule > -1 + let borders[atrule] = "atrule" +endif +if exclam > -1 + let borders[exclam] = "exclam" +endif + + +if len(borders) == 0 || borders[max(keys(borders))] =~ '^\%(openbrace\|semicolon\|opencomm\|closecomm\|style\)$' + " Complete properties + + + let entered_property = matchstr(line, '.\{-}\zs[a-zA-Z-]*$') + + for m in s:values + if m =~? '^'.entered_property + call add(res, m . ':') + elseif m =~? entered_property + call add(res2, m . ':') + endif + endfor + + return res + res2 + +elseif borders[max(keys(borders))] == 'colon' + " Get name of property + let prop = tolower(matchstr(line, '\zs[a-zA-Z-]*\ze\s*:[^:]\{-}$')) + + if prop == 'azimuth' + let values = ["left-side", "far-left", "left", "center-left", "center", "center-right", "right", "far-right", "right-side", "behind", "leftwards", "rightwards"] + elseif prop == 'background-attachment' + let values = ["scroll", "fixed"] + elseif prop == 'background-color' + let values = ["transparent", "rgb(", "#"] + elseif prop == 'background-image' + let values = ["url(", "none"] + elseif prop == 'background-position' + let vals = matchstr(line, '.*:\s*\zs.*') + if vals =~ '^\%([a-zA-Z]\+\)\?$' + let values = ["top", "center", "bottom"] + elseif vals =~ '^[a-zA-Z]\+\s\+\%([a-zA-Z]\+\)\?$' + let values = ["left", "center", "right"] + else + return [] + endif + elseif prop == 'background-repeat' + let values = ["repeat", "repeat-x", "repeat-y", "no-repeat"] + elseif prop == 'background' + let values = ["url(", "scroll", "fixed", "transparent", "rgb(", "#", "none", "top", "center", "bottom" , "left", "right", "repeat", "repeat-x", "repeat-y", "no-repeat"] + elseif prop == 'border-collapse' + let values = ["collapse", "separate"] + elseif prop == 'border-color' + let values = ["rgb(", "#", "transparent"] + elseif prop == 'border-spacing' + return [] + elseif prop == 'border-style' + let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"] + elseif prop =~ 'border-\%(top\|right\|bottom\|left\)$' + let vals = matchstr(line, '.*:\s*\zs.*') + if vals =~ '^\%([a-zA-Z0-9.]\+\)\?$' + let values = ["thin", "thick", "medium"] + elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\%([a-zA-Z]\+\)\?$' + let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"] + elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\%([a-zA-Z(]\+\)\?$' + let values = ["rgb(", "#", "transparent"] + else + return [] + endif + elseif prop =~ 'border-\%(top\|right\|bottom\|left\)-color' + let values = ["rgb(", "#", "transparent"] + elseif prop =~ 'border-\%(top\|right\|bottom\|left\)-style' + let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"] + elseif prop =~ 'border-\%(top\|right\|bottom\|left\)-width' + let values = ["thin", "thick", "medium"] + elseif prop == 'border-width' + let values = ["thin", "thick", "medium"] + elseif prop == 'border' + let vals = matchstr(line, '.*:\s*\zs.*') + if vals =~ '^\%([a-zA-Z0-9.]\+\)\?$' + let values = ["thin", "thick", "medium"] + elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\%([a-zA-Z]\+\)\?$' + let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"] + elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\%([a-zA-Z(]\+\)\?$' + let values = ["rgb(", "#", "transparent"] + else + return [] + endif + elseif prop == 'bottom' + let values = ["auto"] + elseif prop == 'caption-side' + let values = ["top", "bottom"] + elseif prop == 'clear' + let values = ["none", "left", "right", "both"] + elseif prop == 'clip' + let values = ["auto", "rect("] + elseif prop == 'color' + let values = ["rgb(", "#"] + elseif prop == 'content' + let values = ["normal", "attr(", "open-quote", "close-quote", "no-open-quote", "no-close-quote"] + elseif prop =~ 'counter-\%(increment\|reset\)$' + let values = ["none"] + elseif prop =~ '^\%(cue-after\|cue-before\|cue\)$' + let values = ["url(", "none"] + elseif prop == 'cursor' + let values = ["url(", "auto", "crosshair", "default", "pointer", "move", "e-resize", "ne-resize", "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "text", "wait", "help", "progress"] + elseif prop == 'direction' + let values = ["ltr", "rtl"] + elseif prop == 'display' + let values = ["inline", "block", "list-item", "run-in", "inline-block", "table", "inline-table", "table-row-group", "table-header-group", "table-footer-group", "table-row", "table-column-group", "table-column", "table-cell", "table-caption", "none"] + elseif prop == 'elevation' + let values = ["below", "level", "above", "higher", "lower"] + elseif prop == 'empty-cells' + let values = ["show", "hide"] + elseif prop == 'float' + let values = ["left", "right", "none"] + elseif prop == 'font-family' + let values = ["sans-serif", "serif", "monospace", "cursive", "fantasy"] + elseif prop == 'font-size' + let values = ["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller"] + elseif prop == 'font-style' + let values = ["normal", "italic", "oblique"] + elseif prop == 'font-variant' + let values = ["normal", "small-caps"] + elseif prop == 'font-weight' + let values = ["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900"] + elseif prop == 'font' + let values = ["normal", "italic", "oblique", "small-caps", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900", "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller", "sans-serif", "serif", "monospace", "cursive", "fantasy", "caption", "icon", "menu", "message-box", "small-caption", "status-bar"] + elseif prop =~ '^\%(height\|width\)$' + let values = ["auto"] + elseif prop =~ '^\%(left\|rigth\)$' + let values = ["auto"] + elseif prop == 'letter-spacing' + let values = ["normal"] + elseif prop == 'line-height' + let values = ["normal"] + elseif prop == 'list-style-image' + let values = ["url(", "none"] + elseif prop == 'list-style-position' + let values = ["inside", "outside"] + elseif prop == 'list-style-type' + let values = ["disc", "circle", "square", "decimal", "decimal-leading-zero", "lower-roman", "upper-roman", "lower-latin", "upper-latin", "none"] + elseif prop == 'list-style' + return [] + elseif prop == 'margin' + let values = ["auto"] + elseif prop =~ 'margin-\%(right\|left\|top\|bottom\)$' + let values = ["auto"] + elseif prop == 'max-height' + let values = ["auto"] + elseif prop == 'max-width' + let values = ["none"] + elseif prop == 'min-height' + let values = ["none"] + elseif prop == 'min-width' + let values = ["none"] + elseif prop == 'orphans' + return [] + elseif prop == 'outline-color' + let values = ["rgb(", "#"] + elseif prop == 'outline-style' + let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"] + elseif prop == 'outline-width' + let values = ["thin", "thick", "medium"] + elseif prop == 'outline' + let vals = matchstr(line, '.*:\s*\zs.*') + if vals =~ '^\%([a-zA-Z0-9,()#]\+\)\?$' + let values = ["rgb(", "#"] + elseif vals =~ '^[a-zA-Z0-9,()#]\+\s\+\%([a-zA-Z]\+\)\?$' + let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"] + elseif vals =~ '^[a-zA-Z0-9,()#]\+\s\+[a-zA-Z]\+\s\+\%([a-zA-Z(]\+\)\?$' + let values = ["thin", "thick", "medium"] + else + return [] + endif + elseif prop == 'overflow' + let values = ["visible", "hidden", "scroll", "auto"] + elseif prop == 'padding' + return [] + elseif prop =~ 'padding-\%(top\|right\|bottom\|left\)$' + return [] + elseif prop =~ 'page-break-\%(after\|before\)$' + let values = ["auto", "always", "avoid", "left", "right"] + elseif prop == 'page-break-inside' + let values = ["auto", "avoid"] + elseif prop =~ 'pause-\%(after\|before\)$' + return [] + elseif prop == 'pause' + return [] + elseif prop == 'pitch-range' + return [] + elseif prop == 'pitch' + let values = ["x-low", "low", "medium", "high", "x-high"] + elseif prop == 'play-during' + let values = ["url(", "mix", "repeat", "auto", "none"] + elseif prop == 'position' + let values = ["static", "relative", "absolute", "fixed"] + elseif prop == 'quotes' + let values = ["none"] + elseif prop == 'richness' + return [] + elseif prop == 'speak-header' + let values = ["once", "always"] + elseif prop == 'speak-numeral' + let values = ["digits", "continuous"] + elseif prop == 'speak-punctuation' + let values = ["code", "none"] + elseif prop == 'speak' + let values = ["normal", "none", "spell-out"] + elseif prop == 'speech-rate' + let values = ["x-slow", "slow", "medium", "fast", "x-fast", "faster", "slower"] + elseif prop == 'stress' + return [] + elseif prop == 'table-layout' + let values = ["auto", "fixed"] + elseif prop == 'text-align' + let values = ["left", "right", "center", "justify"] + elseif prop == 'text-decoration' + let values = ["none", "underline", "overline", "line-through", "blink"] + elseif prop == 'text-indent' + return [] + elseif prop == 'text-transform' + let values = ["capitalize", "uppercase", "lowercase", "none"] + elseif prop == 'top' + let values = ["auto"] + elseif prop == 'unicode-bidi' + let values = ["normal", "embed", "bidi-override"] + elseif prop == 'vertical-align' + let values = ["baseline", "sub", "super", "top", "text-top", "middle", "bottom", "text-bottom"] + elseif prop == 'visibility' + let values = ["visible", "hidden", "collapse"] + elseif prop == 'voice-family' + return [] + elseif prop == 'volume' + let values = ["silent", "x-soft", "soft", "medium", "loud", "x-loud"] + elseif prop == 'white-space' + let values = ["normal", "pre", "nowrap", "pre-wrap", "pre-line"] + elseif prop == 'widows' + return [] + elseif prop == 'word-spacing' + let values = ["normal"] + elseif prop == 'z-index' + let values = ["auto"] + else + " If no property match it is possible we are outside of {} and + " trying to complete pseudo-(class|element) + let element = tolower(matchstr(line, '\zs[a-zA-Z1-6]*\ze:[^:[:space:]]\{-}$')) + if stridx(',a,abbr,acronym,address,area,b,base,bdo,big,blockquote,body,br,button,caption,cite,code,col,colgroup,dd,del,dfn,div,dl,dt,em,fieldset,form,head,h1,h2,h3,h4,h5,h6,hr,html,i,img,input,ins,kbd,label,legend,li,link,map,meta,noscript,object,ol,optgroup,option,p,param,pre,q,samp,script,select,small,span,strong,style,sub,sup,table,tbody,td,textarea,tfoot,th,thead,title,tr,tt,ul,var,', ','.element.',') > -1 + let values = ["first-child", "link", "visited", "hover", "active", "focus", "lang", "first-line", "first-letter", "before", "after"] + else + return [] + endif + endif + + " Complete values + let entered_value = matchstr(line, '.\{-}\zs[a-zA-Z0-9#,.(_-]*$') + + for m in values + if m =~? '^'.entered_value + call add(res, m) + elseif m =~? entered_value + call add(res2, m) + endif + endfor + + return res + res2 + +elseif borders[max(keys(borders))] == 'closebrace' + + return [] + +elseif borders[max(keys(borders))] == 'exclam' + + " Complete values + let entered_imp = matchstr(line, '.\{-}!\s*\zs[a-zA-Z ]*$') + + let values = ["important"] + + for m in values + if m =~? '^'.entered_imp + call add(res, m) + endif + endfor + + return res + +elseif borders[max(keys(borders))] == 'atrule' + + let afterat = matchstr(line, '.*@\zs.*') + + if afterat =~ '\s' + + let atrulename = matchstr(line, '.*@\zs[a-zA-Z-]\+\ze') + + if atrulename == 'media' + let values = ["screen", "tty", "tv", "projection", "handheld", "print", "braille", "aural", "all"] + + let entered_atruleafter = matchstr(line, '.*@media\s\+\zs.*$') + + elseif atrulename == 'import' + let entered_atruleafter = matchstr(line, '.*@import\s\+\zs.*$') + + if entered_atruleafter =~ "^[\"']" + let filestart = matchstr(entered_atruleafter, '^.\zs.*') + let files = split(glob(filestart.'*'), '\n') + let values = map(copy(files), '"\"".v:val') + + elseif entered_atruleafter =~ "^url(" + let filestart = matchstr(entered_atruleafter, "^url([\"']\\?\\zs.*") + let files = split(glob(filestart.'*'), '\n') + let values = map(copy(files), '"url(".v:val') + + else + let values = ['"', 'url('] + + endif + + else + return [] + + endif + + for m in values + if m =~? '^'.entered_atruleafter + call add(res, m) + elseif m =~? entered_atruleafter + call add(res2, m) + endif + endfor + + return res + res2 + + endif + + let values = ["charset", "page", "media", "import", "font-face"] + + let entered_atrule = matchstr(line, '.*@\zs[a-zA-Z-]*$') + + for m in values + if m =~? '^'.entered_atrule + call add(res, m .' ') + elseif m =~? entered_atrule + call add(res2, m .' ') + endif + endfor + + return res + res2 + +endif + +return [] + +endfunction diff --git a/vim/bundle/ubuntu-vim72/autoload/decada.vim b/vim/bundle/ubuntu-vim72/autoload/decada.vim new file mode 100644 index 0000000..7741ff0 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/autoload/decada.vim @@ -0,0 +1,75 @@ +"------------------------------------------------------------------------------ +" Description: Vim Ada/Dec Ada compiler file +" Language: Ada (Dec Ada) +" $Id: decada.vim 887 2008-07-08 14:29:01Z krischik $ +" Copyright: Copyright (C) 2006 Martin Krischik +" Maintainer: Martin Krischik +" $Author: krischik $ +" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ +" Version: 4.6 +" $Revision: 887 $ +" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $ +" History: 21.07.2006 MK New Dec Ada +" 15.10.2006 MK Bram's suggestion for runtime integration +" 05.11.2006 MK Bram suggested not to use include protection for +" autoload +" 05.11.2006 MK Bram suggested to save on spaces +" Help Page: compiler-decada +"------------------------------------------------------------------------------ + +if version < 700 + finish +endif + +function decada#Unit_Name () dict " {{{1 + " Convert filename into acs unit: + " 1: remove the file extenstion. + " 2: replace all double '_' or '-' with an dot (which denotes a separate) + " 3: remove a trailing '_' (wich denotes a specification) + return substitute (substitute (expand ("%:t:r"), '__\|-', ".", "g"), '_$', "", '') +endfunction decada#Unit_Name " }}}1 + +function decada#Make () dict " {{{1 + let l:make_prg = substitute (g:self.Make_Command, '%<', self.Unit_Name(), '') + let &errorformat = g:self.Error_Format + let &makeprg = l:make_prg + wall + make + copen + set wrap + wincmd W +endfunction decada#Build " }}}1 + +function decada#Set_Session (...) dict " {{{1 + if a:0 > 0 + call ada#Switch_Session (a:1) + elseif argc() == 0 && strlen (v:servername) > 0 + call ada#Switch_Session ( + \ expand('~')[0:-2] . ".vimfiles.session]decada_" . + \ v:servername . ".vim") + endif + return +endfunction decada#Set_Session " }}}1 + +function decada#New () " }}}1 + let Retval = { + \ 'Make' : function ('decada#Make'), + \ 'Unit_Name' : function ('decada#Unit_Name'), + \ 'Set_Session' : function ('decada#Set_Session'), + \ 'Project_Dir' : '', + \ 'Make_Command' : 'ACS COMPILE /Wait /Log /NoPreLoad /Optimize=Development /Debug %<', + \ 'Error_Format' : '%+A%%ADAC-%t-%m,%C %#%m,%Zat line number %l in file %f,' . + \ '%+I%%ada-I-%m,%C %#%m,%Zat line number %l in file %f'} + + return Retval +endfunction decada#New " }}}1 + +finish " 1}}} + +"------------------------------------------------------------------------------ +" Copyright (C) 2006 Martin Krischik +" +" Vim is Charityware - see ":help license" or uganda.txt for licence details. +"------------------------------------------------------------------------------ +" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab +" vim: foldmethod=marker diff --git a/vim/bundle/ubuntu-vim72/autoload/getscript.vim b/vim/bundle/ubuntu-vim72/autoload/getscript.vim new file mode 100644 index 0000000..6e01976 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/autoload/getscript.vim @@ -0,0 +1,644 @@ +" --------------------------------------------------------------------- +" getscript.vim +" Author: Charles E. Campbell, Jr. +" Date: Dec 28, 2009 +" Version: 32 +" Installing: :help glvs-install +" Usage: :help glvs +" +" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim +"redraw!|call inputsave()|call input("Press to continue")|call inputrestore() +" --------------------------------------------------------------------- +" Initialization: {{{1 +" if you're sourcing this file, surely you can't be +" expecting vim to be in its vi-compatible mode! +if exists("g:loaded_getscript") + finish +endif +let g:loaded_getscript= "v32" +if &cp + echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)" + finish +endif +if v:version < 702 + echohl WarningMsg + echo "***warning*** this version of getscript needs vim 7.2" + echohl Normal + finish +endif +let s:keepcpo = &cpo +set cpo&vim +"DechoTabOn + +" --------------------------- +" Global Variables: {{{1 +" --------------------------- +" Cygwin Detection ------- {{{2 +if !exists("g:getscript_cygwin") + if has("win32") || has("win95") || has("win64") || has("win16") + if &shell =~ '\%(\\|\\)\%(\.exe\)\=$' + let g:getscript_cygwin= 1 + else + let g:getscript_cygwin= 0 + endif + else + let g:getscript_cygwin= 0 + endif +endif + +" wget vs curl {{{2 +if !exists("g:GetLatestVimScripts_wget") + if executable("wget") + let g:GetLatestVimScripts_wget= "wget" + elseif executable("curl") + let g:GetLatestVimScripts_wget= "curl" + else + let g:GetLatestVimScripts_wget = 'echo "GetLatestVimScripts needs wget or curl"' + let g:GetLatestVimScripts_options = "" + endif +endif + +" options that wget and curl require: +if !exists("g:GetLatestVimScripts_options") + if g:GetLatestVimScripts_wget == "wget" + let g:GetLatestVimScripts_options= "-q -O" + elseif g:GetLatestVimScripts_wget == "curl" + let g:GetLatestVimScripts_options= "-s -O" + else + let g:GetLatestVimScripts_options= "" + endif +endif + +" by default, allow autoinstall lines to work +if !exists("g:GetLatestVimScripts_allowautoinstall") + let g:GetLatestVimScripts_allowautoinstall= 1 +endif + +"" For debugging: +"let g:GetLatestVimScripts_wget = "echo" +"let g:GetLatestVimScripts_options = "options" + +" --------------------------------------------------------------------- +" Check If AutoInstall Capable: {{{1 +let s:autoinstall= "" +if g:GetLatestVimScripts_allowautoinstall + + if (has("win32") || has("gui_win32") || has("gui_win32s") || has("win16") || has("win64") || has("win32unix") || has("win95")) && &shell != "bash" + " windows (but not cygwin/bash) + let s:dotvim= "vimfiles" + if !exists("g:GetLatestVimScripts_mv") + let g:GetLatestVimScripts_mv= "ren" + endif + + else + " unix + let s:dotvim= ".vim" + if !exists("g:GetLatestVimScripts_mv") + let g:GetLatestVimScripts_mv= "mv" + endif + endif + + if exists("g:GetLatestVimScripts_autoinstalldir") && isdirectory(g:GetLatestVimScripts_autoinstalldir) + let s:autoinstall= g:GetLatestVimScripts_autoinstalldir" + elseif exists('$HOME') && isdirectory(expand("$HOME")."/".s:dotvim) + let s:autoinstall= $HOME."/".s:dotvim + endif +" call Decho("s:autoinstall<".s:autoinstall.">") +"else "Decho +" call Decho("g:GetLatestVimScripts_allowautoinstall=".g:GetLatestVimScripts_allowautoinstall.": :AutoInstall: disabled") +endif + +" --------------------------------------------------------------------- +" Public Interface: {{{1 +com! -nargs=0 GetLatestVimScripts call getscript#GetLatestVimScripts() +com! -nargs=0 GetScript call getscript#GetLatestVimScripts() +silent! com -nargs=0 GLVS call getscript#GetLatestVimScripts() + +" --------------------------------------------------------------------- +" GetLatestVimScripts: this function gets the latest versions of {{{1 +" scripts based on the list in +" (first dir in runtimepath)/GetLatest/GetLatestVimScripts.dat +fun! getscript#GetLatestVimScripts() +" call Dfunc("GetLatestVimScripts() autoinstall<".s:autoinstall.">") + +" insure that wget is executable + if executable(g:GetLatestVimScripts_wget) != 1 + echoerr "GetLatestVimScripts needs ".g:GetLatestVimScripts_wget." which apparently is not available on your system" +" call Dret("GetLatestVimScripts : wget not executable/availble") + return + endif + + " insure that fnameescape() is available + if !exists("*fnameescape") + echoerr "GetLatestVimScripts needs fnameescape() (provided by 7.1.299 or later)" + return + endif + + " Find the .../GetLatest subdirectory under the runtimepath + for datadir in split(&rtp,',') + [''] + if isdirectory(datadir."/GetLatest") +" call Decho("found directory<".datadir.">") + let datadir= datadir . "/GetLatest" + break + endif + if filereadable(datadir."GetLatestVimScripts.dat") +" call Decho("found ".datadir."/GetLatestVimScripts.dat") + break + endif + endfor + + " Sanity checks: readability and writability + if datadir == "" + echoerr 'Missing "GetLatest/" on your runtimepath - see :help glvs-dist-install' +" call Dret("GetLatestVimScripts : unable to find a GetLatest subdirectory") + return + endif + if filewritable(datadir) != 2 + echoerr "(getLatestVimScripts) Your ".datadir." isn't writable" +" call Dret("GetLatestVimScripts : non-writable directory<".datadir.">") + return + endif + let datafile= datadir."/GetLatestVimScripts.dat" + if !filereadable(datafile) + echoerr "Your data file<".datafile."> isn't readable" +" call Dret("GetLatestVimScripts : non-readable datafile<".datafile.">") + return + endif + if !filewritable(datafile) + echoerr "Your data file<".datafile."> isn't writable" +" call Dret("GetLatestVimScripts : non-writable datafile<".datafile.">") + return + endif + " -------------------- + " Passed sanity checks + " -------------------- + +" call Decho("datadir <".datadir.">") +" call Decho("datafile <".datafile.">") + + " don't let any event handlers interfere (like winmanager's, taglist's, etc) + let eikeep = &ei + let hlskeep = &hls + let acdkeep = &acd + set ei=all hls&vim noacd + + " Edit the datafile (ie. GetLatestVimScripts.dat): + " 1. record current directory (origdir), + " 2. change directory to datadir, + " 3. split window + " 4. edit datafile + let origdir= getcwd() +" call Decho("exe cd ".fnameescape(substitute(datadir,'\','/','ge'))) + exe "cd ".fnameescape(substitute(datadir,'\','/','ge')) + split +" call Decho("exe e ".fnameescape(substitute(datafile,'\','/','ge'))) + exe "e ".fnameescape(substitute(datafile,'\','/','ge')) + res 1000 + let s:downloads = 0 + let s:downerrors= 0 + + " Check on dependencies mentioned in plugins +" call Decho(" ") +" call Decho("searching plugins for GetLatestVimScripts dependencies") + let lastline = line("$") +" call Decho("lastline#".lastline) + let firstdir = substitute(&rtp,',.*$','','') + let plugins = split(globpath(firstdir,"plugin/*.vim"),'\n') + let plugins = plugins + split(globpath(firstdir,"AsNeeded/*.vim"),'\n') + let foundscript = 0 + + " this loop updates the GetLatestVimScripts.dat file + " with dependencies explicitly mentioned in the plugins + " via GetLatestVimScripts: ... lines + " It reads the plugin script at the end of the GetLatestVimScripts.dat + " file, examines it, and then removes it. + for plugin in plugins +" call Decho(" ") +" call Decho("plugin<".plugin.">") + + " read plugin in + " evidently a :r creates a new buffer (the "#" buffer) that is subsequently unused -- bwiping it + $ +" call Decho(".dependency checking<".plugin."> line$=".line("$")) +" call Decho("..exe silent r ".fnameescape(plugin)) + exe "silent r ".fnameescape(plugin) + exe "silent bwipe ".bufnr("#") + + while search('^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+','W') != 0 + let depscript = substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+\s\+\(.*\)$','\1','e') + let depscriptid = substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\(\d\+\)\s\+.*$','\1','') + let llp1 = lastline+1 +" call Decho("..depscript<".depscript.">") + + " found a "GetLatestVimScripts: # #" line in the script; + " check if its already in the datafile by searching backwards from llp1, + " the (prior to reading in the plugin script) last line plus one of the GetLatestVimScripts.dat file, + " for the script-id with no wrapping allowed. + let curline = line(".") + let noai_script = substitute(depscript,'\s*:AutoInstall:\s*','','e') + exe llp1 + let srchline = search('^\s*'.depscriptid.'\s\+\d\+\s\+.*$','bW') + if srchline == 0 + " this second search is taken when, for example, a 0 0 scriptname is to be skipped over + let srchline= search('\<'.noai_script.'\>','bW') + endif +" call Decho("..noai_script<".noai_script."> depscriptid#".depscriptid." srchline#".srchline." curline#".line(".")." lastline#".lastline) + + if srchline == 0 + " found a new script to permanently include in the datafile + let keep_rega = @a + let @a = substitute(getline(curline),'^"\s\+GetLatestVimScripts:\s\+','','') + echomsg "Appending <".@a."> to ".datafile." for ".depscript +" call Decho("..Appending <".@a."> to ".datafile." for ".depscript) + exe lastline."put a" + let @a = keep_rega + let lastline = llp1 + let curline = curline + 1 + let foundscript = foundscript + 1 +" else " Decho +" call Decho("..found <".noai_script."> (already in datafile at line#".srchline.")") + endif + + let curline = curline + 1 + exe curline + endwhile + + " llp1: last line plus one + let llp1= lastline + 1 +" call Decho(".deleting lines: ".llp1.",$d") + exe "silent! ".llp1.",$d" + endfor +" call Decho("--- end dependency checking loop --- foundscript=".foundscript) +" call Decho(" ") +" call Dredir("BUFFER TEST (GetLatestVimScripts 1)","ls!") + + if foundscript == 0 + setlocal nomod + endif + + " -------------------------------------------------------------------- + " Check on out-of-date scripts using GetLatest/GetLatestVimScripts.dat + " -------------------------------------------------------------------- +" call Decho("begin: checking out-of-date scripts using datafile<".datafile.">") + setlocal lz + 1 +" /^-----/,$g/^\s*\d/call Decho(getline(".")) + 1 + /^-----/,$g/^\s*\d/call s:GetOneScript() +" call Decho("--- end out-of-date checking --- ") + + " Final report (an echomsg) + try + silent! ?^-------? + catch /^Vim\%((\a\+)\)\=:E114/ +" call Dret("GetLatestVimScripts : nothing done!") + return + endtry + exe "norm! kz\" + redraw! + let s:msg = "" + if s:downloads == 1 + let s:msg = "Downloaded one updated script to <".datadir.">" + elseif s:downloads == 2 + let s:msg= "Downloaded two updated scripts to <".datadir.">" + elseif s:downloads > 1 + let s:msg= "Downloaded ".s:downloads." updated scripts to <".datadir.">" + else + let s:msg= "Everything was already current" + endif + if s:downerrors > 0 + let s:msg= s:msg." (".s:downerrors." downloading errors)" + endif + echomsg s:msg + " save the file + if &mod + silent! w! + endif + q + + " restore events and current directory + exe "cd ".fnameescape(substitute(origdir,'\','/','ge')) + let &ei = eikeep + let &hls = hlskeep + let &acd = acdkeep + setlocal nolz +" call Dredir("BUFFER TEST (GetLatestVimScripts 2)","ls!") +" call Dret("GetLatestVimScripts : did ".s:downloads." downloads") +endfun + +" --------------------------------------------------------------------- +" GetOneScript: (Get Latest Vim Script) this function operates {{{1 +" on the current line, interpreting two numbers and text as +" ScriptID, SourceID, and Filename. +" It downloads any scripts that have newer versions from vim.sourceforge.net. +fun! s:GetOneScript(...) +" call Dfunc("GetOneScript()") + + " set options to allow progress to be shown on screen + let rega= @a + let t_ti= &t_ti + let t_te= &t_te + let rs = &rs + set t_ti= t_te= nors + + " put current line on top-of-screen and interpret it into + " a script identifer : used to obtain webpage + " source identifier : used to identify current version + " and an associated comment: used to report on what's being considered + if a:0 >= 3 + let scriptid = a:1 + let srcid = a:2 + let fname = a:3 + let cmmnt = "" +" call Decho("scriptid<".scriptid.">") +" call Decho("srcid <".srcid.">") +" call Decho("fname <".fname.">") + else + let curline = getline(".") + if curline =~ '^\s*#' + let @a= rega +" call Dret("GetOneScript : skipping a pure comment line") + return + endif + let parsepat = '^\s*\(\d\+\)\s\+\(\d\+\)\s\+\(.\{-}\)\(\s*#.*\)\=$' + try + let scriptid = substitute(curline,parsepat,'\1','e') + catch /^Vim\%((\a\+)\)\=:E486/ + let scriptid= 0 + endtry + try + let srcid = substitute(curline,parsepat,'\2','e') + catch /^Vim\%((\a\+)\)\=:E486/ + let srcid= 0 + endtry + try + let fname= substitute(curline,parsepat,'\3','e') + catch /^Vim\%((\a\+)\)\=:E486/ + let fname= "" + endtry + try + let cmmnt= substitute(curline,parsepat,'\4','e') + catch /^Vim\%((\a\+)\)\=:E486/ + let cmmnt= "" + endtry +" call Decho("curline <".curline.">") +" call Decho("parsepat<".parsepat.">") +" call Decho("scriptid<".scriptid.">") +" call Decho("srcid <".srcid.">") +" call Decho("fname <".fname.">") + endif + + " plugin author protection from downloading his/her own scripts atop their latest work + if scriptid == 0 || srcid == 0 + " When looking for :AutoInstall: lines, skip scripts that have 0 0 scriptname + let @a= rega +" call Dret("GetOneScript : skipping a scriptid==srcid==0 line") + return + endif + + let doautoinstall= 0 + if fname =~ ":AutoInstall:" +" call Decho("case AutoInstall: fname<".fname.">") + let aicmmnt= substitute(fname,'\s\+:AutoInstall:\s\+',' ','') +" call Decho("aicmmnt<".aicmmnt."> s:autoinstall=".s:autoinstall) + if s:autoinstall != "" + let doautoinstall = g:GetLatestVimScripts_allowautoinstall + endif + else + let aicmmnt= fname + endif +" call Decho("aicmmnt<".aicmmnt.">: doautoinstall=".doautoinstall) + + exe "norm z\" + redraw! +" call Decho('considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid) + echo 'considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid + + " grab a copy of the plugin's vim.sourceforge.net webpage + let scriptaddr = 'http://vim.sourceforge.net/script.php?script_id='.scriptid + let tmpfile = tempname() + let v:errmsg = "" + + " make up to three tries at downloading the description + let itry= 1 + while itry <= 3 +" call Decho(".try#".itry." to download description of <".aicmmnt."> with addr=".scriptaddr) + if has("win32") || has("win16") || has("win95") +" call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile).' '.shellescape(scriptaddr)."|bw!") + new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile).' '.shellescape(scriptaddr)|bw! + else +" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile)." ".shellescape(scriptaddr)) + exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile)." ".shellescape(scriptaddr) + endif + if itry == 1 + exe "silent vsplit ".fnameescape(tmpfile) + else + silent! e % + endif + setlocal bh=wipe + + " find the latest source-id in the plugin's webpage + silent! 1 + let findpkg= search('Click on the package to download','W') + if findpkg > 0 + break + endif + let itry= itry + 1 + endwhile +" call Decho(" --- end downloading tries while loop --- itry=".itry) + + " testing: did finding "Click on the package..." fail? + if findpkg == 0 || itry >= 4 + silent q! + call delete(tmpfile) + " restore options + let &t_ti = t_ti + let &t_te = t_te + let &rs = rs + let s:downerrors = s:downerrors + 1 +" call Decho("***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">") + echomsg "***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">" +" call Dret("GetOneScript : srch for /Click on the package/ failed") + let @a= rega + return + endif +" call Decho('found "Click on the package to download"') + + let findsrcid= search('src_id=','W') + if findsrcid == 0 + silent q! + call delete(tmpfile) + " restore options + let &t_ti = t_ti + let &t_te = t_te + let &rs = rs + let s:downerrors = s:downerrors + 1 +" call Decho("***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">") + echomsg "***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">" + let @a= rega +" call Dret("GetOneScript : srch for /src_id/ failed") + return + endif +" call Decho('found "src_id=" in description page') + + let srcidpat = '^\s*\|\|
\([^<]\+\)<.*$' + let latestsrcid= substitute(getline("."),srcidpat,'\1','') + let sname = substitute(getline("."),srcidpat,'\2','') " script name actually downloaded +" call Decho("srcidpat<".srcidpat."> latestsrcid<".latestsrcid."> sname<".sname.">") + silent q! + call delete(tmpfile) + + " convert the strings-of-numbers into numbers + let srcid = srcid + 0 + let latestsrcid = latestsrcid + 0 +" call Decho("srcid=".srcid." latestsrcid=".latestsrcid." sname<".sname.">") + + " has the plugin's most-recent srcid increased, which indicates that it has been updated + if latestsrcid > srcid +" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."]: need to update <".sname.">") + + let s:downloads= s:downloads + 1 + if sname == bufname("%") + " GetLatestVimScript has to be careful about downloading itself + let sname= "NEW_".sname + endif + + " ----------------------------------------------------------------------------- + " the plugin has been updated since we last obtained it, so download a new copy + " ----------------------------------------------------------------------------- +" call Decho(".downloading new <".sname.">") + echomsg ".downloading new <".sname.">" + if has("win32") || has("win16") || has("win95") +" call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='.latestsrcid)."|q") + new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='.latestsrcid)|q + else +" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id=')) + exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id=').latestsrcid + endif + + " -------------------------------------------------------------------------- + " AutoInstall: only if doautoinstall has been requested by the plugin itself + " -------------------------------------------------------------------------- + if doautoinstall +" call Decho(" ") +" call Decho("Autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname)) + if filereadable(sname) +" call Decho("<".sname."> is readable") +" call Decho("exe silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall)) + exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall) + let curdir = escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #") + let installdir= curdir."/Installed" + if !isdirectory(installdir) + call mkdir(installdir) + endif +" call Decho("curdir<".curdir."> installdir<".installdir.">") +" call Decho("exe cd ".fnameescape(s:autoinstall)) + exe "cd ".fnameescape(s:autoinstall) + + " determine target directory for moves + let firstdir= substitute(&rtp,',.*$','','') + let pname = substitute(sname,'\..*','.vim','') +" call Decho("determine tgtdir: is <".firstdir.'/AsNeeded/'.pname." readable?") + if filereadable(firstdir.'/AsNeeded/'.pname) + let tgtdir= "AsNeeded" + else + let tgtdir= "plugin" + endif +" call Decho("tgtdir<".tgtdir."> pname<".pname.">") + + " decompress + if sname =~ '\.bz2$' +" call Decho("decompress: attempt to bunzip2 ".sname) + exe "silent !bunzip2 ".shellescape(sname) + let sname= substitute(sname,'\.bz2$','','') +" call Decho("decompress: new sname<".sname."> after bunzip2") + elseif sname =~ '\.gz$' +" call Decho("decompress: attempt to gunzip ".sname) + exe "silent !gunzip ".shellescape(sname) + let sname= substitute(sname,'\.gz$','','') +" call Decho("decompress: new sname<".sname."> after gunzip") + else +" call Decho("no decompression needed") + endif + + " distribute archive(.zip, .tar, .vba) contents + if sname =~ '\.zip$' +" call Decho("dearchive: attempt to unzip ".sname) + exe "silent !unzip -o ".shellescape(sname) + elseif sname =~ '\.tar$' +" call Decho("dearchive: attempt to untar ".sname) + exe "silent !tar -xvf ".shellescape(sname) + elseif sname =~ '\.vba$' +" call Decho("dearchive: attempt to handle a vimball: ".sname) + silent 1split + if exists("g:vimball_home") + let oldvimballhome= g:vimball_home + endif + let g:vimball_home= s:autoinstall + exe "silent e ".fnameescape(sname) + silent so % + silent q + if exists("oldvimballhome") + let g:vimball_home= oldvimballhome + else + unlet g:vimball_home + endif + else +" call Decho("no dearchiving needed") + endif + + " --------------------------------------------- + " move plugin to plugin/ or AsNeeded/ directory + " --------------------------------------------- + if sname =~ '.vim$' +" call Decho("dearchive: attempt to simply move ".sname." to ".tgtdir) + exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".tgtdir + else +" call Decho("dearchive: move <".sname."> to installdir<".installdir.">") + exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".installdir + endif + if tgtdir != "plugin" +" call Decho("exe silent !".g:GetLatestVimScripts_mv." plugin/".shellescape(pname)." ".tgtdir) + exe "silent !".g:GetLatestVimScripts_mv." plugin/".shellescape(pname)." ".tgtdir + endif + + " helptags step + let docdir= substitute(&rtp,',.*','','e')."/doc" +" call Decho("helptags: docdir<".docdir.">") + exe "helptags ".fnameescape(docdir) + exe "cd ".fnameescape(curdir) + endif + if fname !~ ':AutoInstall:' + let modline=scriptid." ".latestsrcid." :AutoInstall: ".fname.cmmnt + else + let modline=scriptid." ".latestsrcid." ".fname.cmmnt + endif + else + let modline=scriptid." ".latestsrcid." ".fname.cmmnt + endif + + " update the data in the file + call setline(line("."),modline) +" call Decho("update data in ".expand("%")."#".line(".").": modline<".modline.">") +" else " Decho +" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."], no need to update") + endif + + " restore options + let &t_ti = t_ti + let &t_te = t_te + let &rs = rs + let @a = rega +" call Dredir("BUFFER TEST (GetOneScript)","ls!") + +" call Dret("GetOneScript") +endfun + +" --------------------------------------------------------------------- +" Restore Options: {{{1 +let &cpo= s:keepcpo +unlet s:keepcpo + +" --------------------------------------------------------------------- +" Modelines: {{{1 +" vim: ts=8 sts=2 fdm=marker nowrap diff --git a/vim/bundle/ubuntu-vim72/autoload/gnat.vim b/vim/bundle/ubuntu-vim72/autoload/gnat.vim new file mode 100644 index 0000000..0def672 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/autoload/gnat.vim @@ -0,0 +1,147 @@ +"------------------------------------------------------------------------------ +" Description: Vim Ada/GNAT compiler file +" Language: Ada (GNAT) +" $Id: gnat.vim 887 2008-07-08 14:29:01Z krischik $ +" Copyright: Copyright (C) 2006 Martin Krischik +" Maintainer: Martin Krischi k +" Ned Okie +" $Author: krischik $ +" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ +" Version: 4.6 +" $Revision: 887 $ +" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/gnat.vim $ +" History: 24.05.2006 MK Unified Headers +" 16.07.2006 MK Ada-Mode as vim-ball +" 05.08.2006 MK Add session support +" 15.10.2006 MK Bram's suggestion for runtime integration +" 05.11.2006 MK Bram suggested not to use include protection for +" autoload +" 05.11.2006 MK Bram suggested to save on spaces +" 19.09.2007 NO use project file only when there is a project +" Help Page: compiler-gnat +"------------------------------------------------------------------------------ + +if version < 700 + finish +endif + +function gnat#Make () dict " {{{1 + let &l:makeprg = self.Get_Command('Make') + let &l:errorformat = self.Error_Format + wall + make + copen + set wrap + wincmd W +endfunction gnat#Make " }}}1 + +function gnat#Pretty () dict " {{{1 + execute "!" . self.Get_Command('Pretty') +endfunction gnat#Make " }}}1 + +function gnat#Find () dict " {{{1 + execute "!" . self.Get_Command('Find') +endfunction gnat#Find " }}}1 + +function gnat#Tags () dict " {{{1 + execute "!" . self.Get_Command('Tags') + edit tags + call gnat#Insert_Tags_Header () + update + quit +endfunction gnat#Tags " }}}1 + +function gnat#Set_Project_File (...) dict " {{{1 + if a:0 > 0 + let self.Project_File = a:1 + + if ! filereadable (self.Project_File) + let self.Project_File = findfile ( + \ fnamemodify (self.Project_File, ':r'), + \ $ADA_PROJECT_PATH, + \ 1) + endif + elseif strlen (self.Project_File) > 0 + let self.Project_File = browse (0, 'GNAT Project File?', '', self.Project_File) + elseif expand ("%:e") == 'gpr' + let self.Project_File = browse (0, 'GNAT Project File?', '', expand ("%:e")) + else + let self.Project_File = browse (0, 'GNAT Project File?', '', 'default.gpr') + endif + + if strlen (v:this_session) > 0 + execute 'mksession! ' . v:this_session + endif + + "if strlen (self.Project_File) > 0 + "if has("vms") + "call ada#Switch_Session ( + "\ expand('~')[0:-2] . ".vimfiles.session]gnat_" . + "\ fnamemodify (self.Project_File, ":t:r") . ".vim") + "else + "call ada#Switch_Session ( + "\ expand('~') . "/vimfiles/session/gnat_" . + "\ fnamemodify (self.Project_File, ":t:r") . ".vim") + "endif + "else + "call ada#Switch_Session ('') + "endif + + return +endfunction gnat#Set_Project_File " }}}1 + +function gnat#Get_Command (Command) dict " {{{1 + let l:Command = eval ('self.' . a:Command . '_Command') + return eval (l:Command) +endfunction gnat#Get_Command " }}}1 + +function gnat#Set_Session (...) dict " {{{1 + if argc() == 1 && fnamemodify (argv(0), ':e') == 'gpr' + call self.Set_Project_File (argv(0)) + elseif strlen (v:servername) > 0 + call self.Set_Project_File (v:servername . '.gpr') + endif +endfunction gnat#Set_Session " }}}1 + +function gnat#New () " {{{1 + let l:Retval = { + \ 'Make' : function ('gnat#Make'), + \ 'Pretty' : function ('gnat#Pretty'), + \ 'Find' : function ('gnat#Find'), + \ 'Tags' : function ('gnat#Tags'), + \ 'Set_Project_File' : function ('gnat#Set_Project_File'), + \ 'Set_Session' : function ('gnat#Set_Session'), + \ 'Get_Command' : function ('gnat#Get_Command'), + \ 'Project_File' : '', + \ 'Make_Command' : '"gnat make -P " . self.Project_File . " -F -gnatef "', + \ 'Pretty_Command' : '"gnat pretty -P " . self.Project_File . " "', + \ 'Find_Program' : '"gnat find -P " . self.Project_File . " -F "', + \ 'Tags_Command' : '"gnat xref -P " . self.Project_File . " -v *.AD*"', + \ 'Error_Format' : '%f:%l:%c: %trror: %m,' . + \ '%f:%l:%c: %tarning: %m,' . + \ '%f:%l:%c: (%ttyle) %m'} + + return l:Retval +endfunction gnat#New " }}}1 + +function gnat#Insert_Tags_Header () " {{{1 + 1insert +!_TAG_FILE_FORMAT 1 /extended format; --format=1 will not append ;" to lines/ +!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_PROGRAM_AUTHOR AdaCore /info@adacore.com/ +!_TAG_PROGRAM_NAME gnatxref // +!_TAG_PROGRAM_URL http://www.adacore.com /official site/ +!_TAG_PROGRAM_VERSION 5.05w // +. + return +endfunction gnat#Insert_Tags_Header " }}}1 + +finish " 1}}} + +"------------------------------------------------------------------------------ +" Copyright (C) 2006 Martin Krischik +" +" Vim is Charityware - see ":help license" or uganda.txt for licence details. +"------------------------------------------------------------------------------ +" vim: textwidth=0 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab +" vim: foldmethod=marker diff --git a/vim/bundle/ubuntu-vim72/autoload/gzip.vim b/vim/bundle/ubuntu-vim72/autoload/gzip.vim new file mode 100644 index 0000000..1245fdd --- /dev/null +++ b/vim/bundle/ubuntu-vim72/autoload/gzip.vim @@ -0,0 +1,212 @@ +" Vim autoload file for editing compressed files. +" Maintainer: Bram Moolenaar +" Last Change: 2008 Jul 04 + +" These functions are used by the gzip plugin. + +" Function to check that executing "cmd [-f]" works. +" The result is cached in s:have_"cmd" for speed. +fun s:check(cmd) + let name = substitute(a:cmd, '\(\S*\).*', '\1', '') + if !exists("s:have_" . name) + let e = executable(name) + if e < 0 + let r = system(name . " --version") + let e = (r !~ "not found" && r != "") + endif + exe "let s:have_" . name . "=" . e + endif + exe "return s:have_" . name +endfun + +" Set b:gzip_comp_arg to the gzip argument to be used for compression, based on +" the flags in the compressed file. +" The only compression methods that can be detected are max speed (-1) and max +" compression (-9). +fun s:set_compression(line) + " get the Compression Method + let l:cm = char2nr(a:line[2]) + " if it's 8 (DEFLATE), we can check for the compression level + if l:cm == 8 + " get the eXtra FLags + let l:xfl = char2nr(a:line[8]) + " max compression + if l:xfl == 2 + let b:gzip_comp_arg = "-9" + " min compression + elseif l:xfl == 4 + let b:gzip_comp_arg = "-1" + endif + endif +endfun + + +" After reading compressed file: Uncompress text in buffer with "cmd" +fun gzip#read(cmd) + " don't do anything if the cmd is not supported + if !s:check(a:cmd) + return + endif + + " for gzip check current compression level and set b:gzip_comp_arg. + silent! unlet b:gzip_comp_arg + if a:cmd[0] == 'g' + call s:set_compression(getline(1)) + endif + + " make 'patchmode' empty, we don't want a copy of the written file + let pm_save = &pm + set pm= + " remove 'a' and 'A' from 'cpo' to avoid the alternate file changes + let cpo_save = &cpo + set cpo-=a cpo-=A + " set 'modifiable' + let ma_save = &ma + setlocal ma + " Reset 'foldenable', otherwise line numbers get adjusted. + if has("folding") + let fen_save = &fen + setlocal nofen + endif + + " when filtering the whole buffer, it will become empty + let empty = line("'[") == 1 && line("']") == line("$") + let tmp = tempname() + let tmpe = tmp . "." . expand(":e") + if exists('*fnameescape') + let tmp_esc = fnameescape(tmp) + let tmpe_esc = fnameescape(tmpe) + else + let tmp_esc = escape(tmp, ' ') + let tmpe_esc = escape(tmpe, ' ') + endif + " write the just read lines to a temp file "'[,']w tmp.gz" + execute "silent '[,']w " . tmpe_esc + " uncompress the temp file: call system("gzip -dn tmp.gz") + call system(a:cmd . " " . s:escape(tmpe)) + if !filereadable(tmp) + " uncompress didn't work! Keep the compressed file then. + echoerr "Error: Could not read uncompressed file" + let ok = 0 + else + let ok = 1 + " delete the compressed lines; remember the line number + let l = line("'[") - 1 + if exists(":lockmarks") + lockmarks '[,']d _ + else + '[,']d _ + endif + " read in the uncompressed lines "'[-1r tmp" + " Use ++edit if the buffer was empty, keep the 'ff' and 'fenc' options. + setlocal nobin + if exists(":lockmarks") + if empty + execute "silent lockmarks " . l . "r ++edit " . tmp_esc + else + execute "silent lockmarks " . l . "r " . tmp_esc + endif + else + execute "silent " . l . "r " . tmp_esc + endif + + " if buffer became empty, delete trailing blank line + if empty + silent $delete _ + 1 + endif + " delete the temp file and the used buffers + call delete(tmp) + silent! exe "bwipe " . tmp_esc + silent! exe "bwipe " . tmpe_esc + endif + + " Restore saved option values. + let &pm = pm_save + let &cpo = cpo_save + let &l:ma = ma_save + if has("folding") + let &l:fen = fen_save + endif + + " When uncompressed the whole buffer, do autocommands + if ok && empty + if exists('*fnameescape') + let fname = fnameescape(expand("%:r")) + else + let fname = escape(expand("%:r"), " \t\n*?[{`$\\%#'\"|!<") + endif + if &verbose >= 8 + execute "doau BufReadPost " . fname + else + execute "silent! doau BufReadPost " . fname + endif + endif +endfun + +" After writing compressed file: Compress written file with "cmd" +fun gzip#write(cmd) + " don't do anything if the cmd is not supported + if s:check(a:cmd) + " Rename the file before compressing it. + let nm = resolve(expand("")) + let nmt = s:tempname(nm) + if rename(nm, nmt) == 0 + if exists("b:gzip_comp_arg") + call system(a:cmd . " " . b:gzip_comp_arg . " -- " . s:escape(nmt)) + else + call system(a:cmd . " -- " . s:escape(nmt)) + endif + call rename(nmt . "." . expand(":e"), nm) + endif + endif +endfun + +" Before appending to compressed file: Uncompress file with "cmd" +fun gzip#appre(cmd) + " don't do anything if the cmd is not supported + if s:check(a:cmd) + let nm = expand("") + + " for gzip check current compression level and set b:gzip_comp_arg. + silent! unlet b:gzip_comp_arg + if a:cmd[0] == 'g' + call s:set_compression(readfile(nm, "b", 1)[0]) + endif + + " Rename to a weird name to avoid the risk of overwriting another file + let nmt = expand(":p:h") . "/X~=@l9q5" + let nmte = nmt . "." . expand(":e") + if rename(nm, nmte) == 0 + if &patchmode != "" && getfsize(nm . &patchmode) == -1 + " Create patchmode file by creating the decompressed file new + call system(a:cmd . " -c -- " . s:escape(nmte) . " > " . s:escape(nmt)) + call rename(nmte, nm . &patchmode) + else + call system(a:cmd . " -- " . s:escape(nmte)) + endif + call rename(nmt, nm) + endif + endif +endfun + +" find a file name for the file to be compressed. Use "name" without an +" extension if possible. Otherwise use a weird name to avoid overwriting an +" existing file. +fun s:tempname(name) + let fn = fnamemodify(a:name, ":r") + if !filereadable(fn) && !isdirectory(fn) + return fn + endif + return fnamemodify(a:name, ":p:h") . "/X~=@l9q5" +endfun + +fun s:escape(name) + " shellescape() was added by patch 7.0.111 + if exists("*shellescape") + return shellescape(a:name) + endif + return "'" . a:name . "'" +endfun + +" vim: set sw=2 : diff --git a/vim/bundle/ubuntu-vim72/autoload/htmlcomplete.vim b/vim/bundle/ubuntu-vim72/autoload/htmlcomplete.vim new file mode 100644 index 0000000..5420321 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/autoload/htmlcomplete.vim @@ -0,0 +1,765 @@ +" Vim completion script +" Language: HTML and XHTML +" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) +" Last Change: 2006 Oct 19 + +function! htmlcomplete#CompleteTags(findstart, base) + if a:findstart + " locate the start of the word + let line = getline('.') + let start = col('.') - 1 + let curline = line('.') + let compl_begin = col('.') - 2 + while start >= 0 && line[start - 1] =~ '\(\k\|[!:.-]\)' + let start -= 1 + endwhile + " Handling of entities {{{ + if start >= 0 && line[start - 1] =~ '&' + let b:entitiescompl = 1 + let b:compl_context = '' + return start + endif + " }}} + " Handling of \n" + exe "normal! a\n" + else + " if we aren't doing hover_unfold, use CSS 1 only + exe "normal! a\n" + endif + else + " if we aren't doing any dynamic folding, no need for any special rules + exe "normal! a\n\e" + endif +endif + +" insert javascript to toggle folds open and closed +if exists("s:html_dynamic_folds") + exe "normal! a\n". + \ "\n\e" +endif + +if exists("html_no_pre") + exe "normal! a\n\n\e" +else + exe "normal! a\n\n
\n\e"
+endif
+
+exe s:orgwin . "wincmd w"
+
+" List of all id's
+let s:idlist = ","
+
+" First do some preprocessing for dynamic folding. Do this for the entire file
+" so we don't accidentally start within a closed fold or something.
+let s:allfolds = []
+
+if exists("s:html_dynamic_folds")
+  let s:lnum = 1
+  let s:end = line('$')
+  " save the fold text and set it to the default so we can find fold levels
+  let s:foldtext_save = &foldtext
+  set foldtext&
+
+  " we will set the foldcolumn in the html to the greater of the maximum fold
+  " level and the current foldcolumn setting
+  let s:foldcolumn = &foldcolumn
+
+  " get all info needed to describe currently closed folds
+  while s:lnum < s:end
+    if foldclosed(s:lnum) == s:lnum
+      " default fold text has '+-' and then a number of dashes equal to fold
+      " level, so subtract 2 from index of first non-dash after the dashes
+      " in order to get the fold level of the current fold
+      let s:level = match(foldtextresult(s:lnum), '+-*\zs[^-]') - 2
+      if s:level+1 > s:foldcolumn
+	let s:foldcolumn = s:level+1
+      endif
+      " store fold info for later use
+      let s:newfold = {'firstline': s:lnum, 'lastline': foldclosedend(s:lnum), 'level': s:level,'type': "closed-fold"}
+      call add(s:allfolds, s:newfold)
+      " open the fold so we can find any contained folds
+      execute s:lnum."foldopen"
+    else
+      let s:lnum = s:lnum + 1
+    endif
+  endwhile
+
+  " close all folds to get info for originally open folds
+  silent! %foldclose!
+  let s:lnum = 1
+
+  " the originally open folds will be all folds we encounter that aren't
+  " already in the list of closed folds
+  while s:lnum < s:end
+    if foldclosed(s:lnum) == s:lnum
+      " default fold text has '+-' and then a number of dashes equal to fold
+      " level, so subtract 2 from index of first non-dash after the dashes
+      " in order to get the fold level of the current fold
+      let s:level = match(foldtextresult(s:lnum), '+-*\zs[^-]') - 2
+      if s:level+1 > s:foldcolumn
+	let s:foldcolumn = s:level+1
+      endif
+      let s:newfold = {'firstline': s:lnum, 'lastline': foldclosedend(s:lnum), 'level': s:level,'type': "closed-fold"}
+      " only add the fold if we don't already have it
+      if empty(s:allfolds) || index(s:allfolds, s:newfold) == -1
+	let s:newfold.type = "open-fold"
+	call add(s:allfolds, s:newfold)
+      endif
+      " open the fold so we can find any contained folds
+      execute s:lnum."foldopen"
+    else
+      let s:lnum = s:lnum + 1
+    endif
+  endwhile
+
+  " sort the folds so that we only ever need to look at the first item in the
+  " list of folds
+  call sort(s:allfolds, "s:FoldCompare")
+
+  let &foldtext = s:foldtext_save
+  unlet s:foldtext_save
+
+  " close all folds again so we can get the fold text as we go
+  silent! %foldclose! 
+endif
+
+" Now loop over all lines in the original text to convert to html.
+" Use html_start_line and html_end_line if they are set.
+if exists("html_start_line")
+  let s:lnum = html_start_line
+  if s:lnum < 1 || s:lnum > line("$")
+    let s:lnum = 1
+  endif
+else
+  let s:lnum = 1
+endif
+if exists("html_end_line")
+  let s:end = html_end_line
+  if s:end < s:lnum || s:end > line("$")
+    let s:end = line("$")
+  endif
+else
+  let s:end = line("$")
+endif
+
+" stack to keep track of all the folds containing the current line
+let s:foldstack = []
+
+if s:numblines
+  let s:margin = strlen(s:end) + 1
+else
+  let s:margin = 0
+endif
+
+if has('folding') && !exists('html_ignore_folding')
+  let s:foldfillchar = &fillchars[matchend(&fillchars, 'fold:')]
+  if s:foldfillchar == ''
+    let s:foldfillchar = '-'
+  endif
+endif
+let s:difffillchar = &fillchars[matchend(&fillchars, 'diff:')]
+if s:difffillchar == ''
+  let s:difffillchar = '-'
+endif
+
+let s:foldId = 0
+
+while s:lnum <= s:end
+
+  " If there are filler lines for diff mode, show these above the line.
+  let s:filler = diff_filler(s:lnum)
+  if s:filler > 0
+    let s:n = s:filler
+    while s:n > 0
+      let s:new = repeat(s:difffillchar, 3)
+
+      if s:n > 2 && s:n < s:filler && !exists("html_whole_filler")
+	let s:new = s:new . " " . s:filler . " inserted lines "
+	let s:n = 2
+      endif
+
+      if !exists("html_no_pre")
+	" HTML line wrapping is off--go ahead and fill to the margin
+	let s:new = s:new . repeat(s:difffillchar, &columns - strlen(s:new) - s:margin)
+      else
+	let s:new = s:new . repeat(s:difffillchar, 3)
+      endif
+
+      let s:new = s:HtmlFormat(s:new, "DiffDelete")
+      if s:numblines
+	" Indent if line numbering is on; must be after escaping.
+	let s:new = repeat(s:LeadingSpace, s:margin) . s:new
+      endif
+      exe s:newwin . "wincmd w"
+      exe "normal! a" . s:new . s:HtmlEndline . "\n\e"
+      exe s:orgwin . "wincmd w"
+
+      let s:n = s:n - 1
+    endwhile
+    unlet s:n
+  endif
+  unlet s:filler
+
+  " Start the line with the line number.
+  if s:numblines
+    let s:numcol = repeat(' ', s:margin - 1 - strlen(s:lnum)) . s:lnum . ' '
+  else
+    let s:numcol = ""
+  endif
+
+  let s:new = ""
+
+  if has('folding') && !exists('html_ignore_folding') && foldclosed(s:lnum) > -1 && !exists('s:html_dynamic_folds')
+    "
+    " This is the beginning of a folded block (with no dynamic folding)
+    "
+    let s:new = s:numcol . foldtextresult(s:lnum)
+    if !exists("html_no_pre")
+      " HTML line wrapping is off--go ahead and fill to the margin
+      let s:new = s:new . repeat(s:foldfillchar, &columns - strlen(s:new))
+    endif
+
+    let s:new = s:HtmlFormat(s:new, "Folded")
+
+    " Skip to the end of the fold
+    let s:lnum = foldclosedend(s:lnum)
+
+  else
+    "
+    " A line that is not folded, or doing dynamic folding.
+    "
+    let s:line = getline(s:lnum)
+    let s:len = strlen(s:line)
+
+    if exists("s:html_dynamic_folds")
+      " First insert a closing for any open folds that end on this line
+      while !empty(s:foldstack) && get(s:foldstack,0).lastline == s:lnum-1
+	let s:new = s:new.""
+	call remove(s:foldstack, 0)
+      endwhile
+
+      " Now insert an opening any new folds that start on this line
+      let s:firstfold = 1
+      while !empty(s:allfolds) && get(s:allfolds,0).firstline == s:lnum
+	let s:foldId = s:foldId + 1
+	let s:new = s:new . ""
+
+	" Unless disabled, add a fold column for the opening line of a fold.
+	"
+	" Note that dynamic folds require using css so we just use css to take
+	" care of the leading spaces rather than using   in the case of
+	" html_no_pre to make it easier
+	if !exists("html_no_foldcolumn")
+	  " add fold column that can open the new fold
+	  if s:allfolds[0].level > 1 && s:firstfold
+	    let s:new = s:new . ""
+	    let s:new = s:new . repeat('|', s:allfolds[0].level - 1) . ""
+	  endif
+	  let s:new = s:new . "+"
+	  let s:new = s:new . ""
+
+	  " add fold column that can close the new fold
+	  let s:new = s:new . ""
+	  if s:firstfold
+	    let s:new = s:new . repeat('|', s:allfolds[0].level - 1)
+	  endif
+	  let s:new = s:new . "-"
+	  " only add spaces if we aren't opening another fold on the same line
+	  if get(s:allfolds, 1, {'firstline': 0}).firstline != s:lnum
+	    let s:new = s:new . repeat(" ", s:foldcolumn - s:allfolds[0].level)
+	  endif
+	  let s:new = s:new . ""
+	  let s:firstfold = 0
+	endif
+
+	" add fold text, moving the span ending to the next line so collapsing
+	" of folds works correctly
+	let s:new = s:new . substitute(s:HtmlFormat(s:numcol . foldtextresult(s:lnum), "Folded"), '', s:HtmlEndline.'\r\0', '')
+	let s:new = s:new . ""
+
+	" open the fold now that we have the fold text to allow retrieval of
+	" fold text for subsequent folds
+	execute s:lnum."foldopen"
+	call insert(s:foldstack, remove(s:allfolds,0))
+	let s:foldstack[0].id = s:foldId
+      endwhile
+
+      " Unless disabled, add a fold column for other lines.
+      "
+      " Note that dynamic folds require using css so we just use css to take
+      " care of the leading spaces rather than using   in the case of
+      " html_no_pre to make it easier
+      if !exists("html_no_foldcolumn")
+	if empty(s:foldstack)
+	  " add the empty foldcolumn for unfolded lines
+	  let s:new = s:new . s:HtmlFormat(repeat(' ', s:foldcolumn), "FoldColumn")
+	else
+	  " add the fold column for folds not on the opening line
+	  if get(s:foldstack, 0).firstline < s:lnum
+	    let s:new = s:new . ""
+	    let s:new = s:new . repeat('|', s:foldstack[0].level)
+	    let s:new = s:new . repeat(' ', s:foldcolumn - s:foldstack[0].level) . ""
+	  endif
+	endif
+      endif
+    endif
+
+    " Now continue with the unfolded line text
+    if s:numblines
+      let s:new = s:new . s:HtmlFormat(s:numcol, "lnr")
+    endif
+
+    " Get the diff attribute, if any.
+    let s:diffattr = diff_hlID(s:lnum, 1)
+
+    " Loop over each character in the line
+    let s:col = 1
+    while s:col <= s:len || (s:col == 1 && s:diffattr)
+      let s:startcol = s:col " The start column for processing text
+      if s:diffattr
+	let s:id = diff_hlID(s:lnum, s:col)
+	let s:col = s:col + 1
+	" Speed loop (it's small - that's the trick)
+	" Go along till we find a change in hlID
+	while s:col <= s:len && s:id == diff_hlID(s:lnum, s:col) | let s:col = s:col + 1 | endwhile
+	if s:len < &columns && !exists("html_no_pre")
+	  " Add spaces at the end to mark the changed line.
+	  let s:line = s:line . repeat(' ', &columns - virtcol([s:lnum, s:len]) - s:margin)
+	  let s:len = &columns
+	endif
+      else
+	let s:id = synID(s:lnum, s:col, 1)
+	let s:col = s:col + 1
+	" Speed loop (it's small - that's the trick)
+	" Go along till we find a change in synID
+	while s:col <= s:len && s:id == synID(s:lnum, s:col, 1) | let s:col = s:col + 1 | endwhile
+      endif
+
+      " Expand tabs
+      let s:expandedtab = strpart(s:line, s:startcol - 1, s:col - s:startcol)
+      let s:offset = 0
+      let s:idx = stridx(s:expandedtab, "\t")
+      while s:idx >= 0
+	if has("multi_byte_encoding")
+	  if s:startcol + s:idx == 1
+	    let s:i = &ts
+	  else
+	    if s:idx == 0
+	      let s:prevc = matchstr(s:line, '.\%' . (s:startcol + s:idx + s:offset) . 'c')
+	    else
+	      let s:prevc = matchstr(s:expandedtab, '.\%' . (s:idx + 1) . 'c')
+	    endif
+	    let s:vcol = virtcol([s:lnum, s:startcol + s:idx + s:offset - len(s:prevc)])
+	    let s:i = &ts - (s:vcol % &ts)
+	  endif
+	  let s:offset -= s:i - 1
+	else
+	  let s:i = &ts - ((s:idx + s:startcol - 1) % &ts)
+	endif
+	let s:expandedtab = substitute(s:expandedtab, '\t', repeat(' ', s:i), '')
+	let s:idx = stridx(s:expandedtab, "\t")
+      endwhile
+
+      " Output the text with the same synID, with class set to {s:id_name}
+      let s:id = synIDtrans(s:id)
+      let s:id_name = synIDattr(s:id, "name", s:whatterm)
+      let s:new = s:new . s:HtmlFormat(s:expandedtab,  s:id_name)
+    endwhile
+  endif
+
+  exe s:newwin . "wincmd w"
+  exe "normal! a" . s:new . s:HtmlEndline . "\n\e"
+  exe s:orgwin . "wincmd w"
+  let s:lnum = s:lnum + 1
+endwhile
+" Finish with the last line
+exe s:newwin . "wincmd w"
+
+if exists("s:html_dynamic_folds")
+  " finish off any open folds
+  while !empty(s:foldstack)
+    exe "normal! a"
+    call remove(s:foldstack, 0)
+  endwhile
+
+  " add fold column to the style list if not already there
+  let s:id = hlID('FoldColumn')
+  if stridx(s:idlist, "," . s:id . ",") == -1
+    let s:idlist = s:idlist . s:id . ","
+  endif
+endif
+
+" Close off the font tag that encapsulates the whole 
+if !exists("s:html_use_css")
+  exe "normal! a\e"
+endif
+
+if exists("html_no_pre")
+  exe "normal! a\n\e"
+else
+  exe "normal! a
\n\n\e" +endif + + +" Now, when we finally know which, we define the colors and styles +if exists("s:html_use_css") + 1;/+ contains=@htmlCss,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc + syn match htmlCssStyleComment contained "\(\)" + syn region htmlCssDefinition matchgroup=htmlArg start='style="' keepend matchgroup=htmlString end='"' contains=css.*Attr,css.*Prop,cssComment,cssLength,cssColor,cssURL,cssImportant,cssError,cssString,@htmlPreproc + HtmlHiLink htmlStyleArg htmlString +endif + +if main_syntax == "html" + " synchronizing (does not always work if a comment includes legal + " html tags, but doing it right would mean to always start + " at the first line, which is too slow) + syn sync match htmlHighlight groupthere NONE "<[/a-zA-Z]" + syn sync match htmlHighlight groupthere javaScript "= 508 || !exists("did_html_syn_inits") + if version < 508 + let did_html_syn_inits = 1 + endif + HtmlHiLink htmlTag Function + HtmlHiLink htmlEndTag Identifier + HtmlHiLink htmlArg Type + HtmlHiLink htmlTagName htmlStatement + HtmlHiLink htmlSpecialTagName Exception + HtmlHiLink htmlValue String + HtmlHiLink htmlSpecialChar Special + + if !exists("html_no_rendering") + HtmlHiLink htmlH1 Title + HtmlHiLink htmlH2 htmlH1 + HtmlHiLink htmlH3 htmlH2 + HtmlHiLink htmlH4 htmlH3 + HtmlHiLink htmlH5 htmlH4 + HtmlHiLink htmlH6 htmlH5 + HtmlHiLink htmlHead PreProc + HtmlHiLink htmlTitle Title + HtmlHiLink htmlBoldItalicUnderline htmlBoldUnderlineItalic + HtmlHiLink htmlUnderlineBold htmlBoldUnderline + HtmlHiLink htmlUnderlineItalicBold htmlBoldUnderlineItalic + HtmlHiLink htmlUnderlineBoldItalic htmlBoldUnderlineItalic + HtmlHiLink htmlItalicUnderline htmlUnderlineItalic + HtmlHiLink htmlItalicBold htmlBoldItalic + HtmlHiLink htmlItalicBoldUnderline htmlBoldUnderlineItalic + HtmlHiLink htmlItalicUnderlineBold htmlBoldUnderlineItalic + HtmlHiLink htmlLink Underlined + if !exists("html_my_rendering") + hi def htmlBold term=bold cterm=bold gui=bold + hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline + hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic + hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline + hi def htmlUnderline term=underline cterm=underline gui=underline + hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline + hi def htmlItalic term=italic cterm=italic gui=italic + endif + endif + + HtmlHiLink htmlPreStmt PreProc + HtmlHiLink htmlPreError Error + HtmlHiLink htmlPreProc PreProc + HtmlHiLink htmlPreAttr String + HtmlHiLink htmlPreProcAttrName PreProc + HtmlHiLink htmlPreProcAttrError Error + HtmlHiLink htmlSpecial Special + HtmlHiLink htmlSpecialChar Special + HtmlHiLink htmlString String + HtmlHiLink htmlStatement Statement + HtmlHiLink htmlComment Comment + HtmlHiLink htmlCommentPart Comment + HtmlHiLink htmlValue String + HtmlHiLink htmlCommentError htmlError + HtmlHiLink htmlTagError htmlError + HtmlHiLink htmlEvent javaScript + HtmlHiLink htmlError Error + + HtmlHiLink javaScript Special + HtmlHiLink javaScriptExpression javaScript + HtmlHiLink htmlCssStyleComment Comment + HtmlHiLink htmlCssDefinition Special +endif + +delcommand HtmlHiLink + +let b:current_syntax = "html" + +if main_syntax == 'html' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/htmlcheetah.vim b/vim/bundle/ubuntu-vim72/syntax/htmlcheetah.vim new file mode 100644 index 0000000..f57df90 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/htmlcheetah.vim @@ -0,0 +1,32 @@ +" Vim syntax file +" Language: HTML with Cheetah tags +" Maintainer: Max Ischenko +" Last Change: 2003-05-11 + +" 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 + +if !exists("main_syntax") + let main_syntax = 'html' +endif + +if version < 600 + so :p:h/cheetah.vim + so :p:h/html.vim +else + runtime! syntax/cheetah.vim + runtime! syntax/html.vim + unlet b:current_syntax +endif + +syntax cluster htmlPreproc add=cheetahPlaceHolder +syntax cluster htmlString add=cheetahPlaceHolder + +let b:current_syntax = "htmlcheetah" + + diff --git a/vim/bundle/ubuntu-vim72/syntax/htmldjango.vim b/vim/bundle/ubuntu-vim72/syntax/htmldjango.vim new file mode 100644 index 0000000..4b13863 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/htmldjango.vim @@ -0,0 +1,34 @@ +" Vim syntax file +" Language: Django HTML template +" Maintainer: Dave Hodder +" Last Change: 2007 Jan 26 + +" 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 + +if !exists("main_syntax") + let main_syntax = 'html' +endif + +if version < 600 + so :p:h/django.vim + so :p:h/html.vim +else + runtime! syntax/django.vim + runtime! syntax/html.vim + unlet b:current_syntax +endif + +syn cluster djangoBlocks add=djangoTagBlock,djangoVarBlock,djangoComment,djangoComBlock + +syn region djangoTagBlock start="{%" end="%}" contains=djangoStatement,djangoFilter,djangoArgument,djangoTagError display containedin=ALLBUT,@djangoBlocks +syn region djangoVarBlock start="{{" end="}}" contains=djangoFilter,djangoArgument,djangoVarError display containedin=ALLBUT,@djangoBlocks +syn region djangoComment start="{%\s*comment\s*%}" end="{%\s*endcomment\s*%}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks +syn region djangoComBlock start="{#" end="#}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks + +let b:current_syntax = "htmldjango" diff --git a/vim/bundle/ubuntu-vim72/syntax/htmlm4.vim b/vim/bundle/ubuntu-vim72/syntax/htmlm4.vim new file mode 100644 index 0000000..3119d2d --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/htmlm4.vim @@ -0,0 +1,41 @@ +" Vim syntax file +" Language: HTML and M4 +" Maintainer: Claudio Fleiner +" URL: http://www.fleiner.com/vim/syntax/htmlm4.vim +" Last Change: 2001 Apr 30 + +" 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 + +" we define it here so that included files can test for it +if !exists("main_syntax") + let main_syntax='htmlm4' +endif + +if version < 600 + so :p:h/html.vim +else + runtime! syntax/html.vim +endif +unlet b:current_syntax +syn case match + +if version < 600 + so :p:h/m4.vim +else + runtime! syntax/m4.vim +endif +unlet b:current_syntax +syn cluster htmlPreproc add=@m4Top +syn cluster m4StringContents add=htmlTag,htmlEndTag + +let b:current_syntax = "htmlm4" + +if main_syntax == 'htmlm4' + unlet main_syntax +endif diff --git a/vim/bundle/ubuntu-vim72/syntax/htmlos.vim b/vim/bundle/ubuntu-vim72/syntax/htmlos.vim new file mode 100644 index 0000000..f31b9f6 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/htmlos.vim @@ -0,0 +1,166 @@ +" Vim syntax file +" Language: HTML/OS by Aestiva +" Maintainer: Jason Rust +" URL: http://www.rustyparts.com/vim/syntax/htmlos.vim +" Info: http://www.rustyparts.com/scripts.php +" Last Change: 2003 May 11 +" + +" 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 + +if !exists("main_syntax") + let main_syntax = 'htmlos' +endif + +if version < 600 + so :p:h/html.vim +else + runtime! syntax/html.vim + unlet b:current_syntax +endif + +syn cluster htmlPreproc add=htmlosRegion + +syn case ignore + +" Function names +syn keyword htmlosFunctions expand sleep getlink version system ascii getascii syslock sysunlock cr lf clean postprep listtorow split listtocol coltolist rowtolist tabletolist contained +syn keyword htmlosFunctions cut \display cutall cutx cutallx length reverse lower upper proper repeat left right middle trim trimleft trimright count countx locate locatex replace replacex replaceall replaceallx paste pasteleft pasteleftx pasteleftall pasteleftallx pasteright pasterightall pasterightallx chopleft chopleftx chopright choprightx format concat contained +syn keyword htmlosFunctions goto exitgoto contained +syn keyword htmlosFunctions layout cols rows row items getitem putitem switchitems gettable delrow delrows delcol delcols append merge fillcol fillrow filltable pastetable getcol getrow fillindexcol insindexcol dups nodups maxtable mintable maxcol mincol maxrow minrow avetable avecol averow mediantable mediancol medianrow producttable productcol productrow sumtable sumcol sumrow sumsqrtable sumsqrcol sumsqrrow reversecols reverserows switchcols switchrows inscols insrows insfillcol sortcol reversesortcol sortcoln reversesortcoln sortrow sortrown reversesortrow reversesortrown getcoleq getcoleqn getcolnoteq getcolany getcolbegin getcolnotany getcolnotbegin getcolge getcolgt getcolle getcollt getcolgen getcolgtn getcollen getcoltn getcolend getcolnotend getrowend getrownotend getcolin getcolnotin getcolinbegin getcolnotinbegin getcolinend getcolnotinend getrowin getrownotin getrowinbegin getrownotinbegin getrowinend getrownotinend contained +syn keyword htmlosFunctions dbcreate dbadd dbedit dbdelete dbsearch dbsearchsort dbget dbgetsort dbstatus dbindex dbimport dbfill dbexport dbsort dbgetrec dbremove dbpurge dbfind dbfindsort dbunique dbcopy dbmove dbkill dbtransfer dbpoke dbsearchx dbgetx contained +syn keyword htmlosFunctions syshtmlosname sysstartname sysfixfile fileinfo filelist fileindex domainname page browser regdomain username usernum getenv httpheader copy file ts row sysls syscp sysmv sysmd sysrd filepush filepushlink dirname contained +syn keyword htmlosFunctions mail to address subject netmail netmailopen netmailclose mailfilelist netweb netwebresults webpush netsockopen netsockread netsockwrite netsockclose contained +syn keyword htmlosFunctions today time systime now yesterday tomorrow getday getmonth getyear getminute getweekday getweeknum getyearday getdate gettime getamorpm gethour addhours addminutes adddays timebetween timetill timefrom datetill datefrom mixedtimebetween mixeddatetill mixedtimetill mixedtimefrom mixeddatefrom nextdaybyweekfromdate nextdaybyweekfromtoday nextdaybymonthfromdate nextdaybymonthfromtoday nextdaybyyearfromdate nextdaybyyearfromtoday offsetdaybyweekfromdate offsetdaybyweekfromtoday offsetdaybymonthfromdate offsetdaybymonthfromtoday contained +syn keyword htmlosFunctions isprivate ispublic isfile isdir isblank iserror iserror iseven isodd istrue isfalse islogical istext istag isnumber isinteger isdate istableeq istableeqx istableeqn isfuture ispast istoday isweekday isweekend issamedate iseq isnoteq isge isle ismod10 isvalidstring contained +syn keyword htmlosFunctions celtof celtokel ftocel ftokel keltocel keltof cmtoin intocm fttom mtoft fttomile miletoft kmtomile miletokm mtoyd ydtom galtoltr ltrtogal ltrtoqt qttoltr gtooz oztog kgtolb lbtokg mttoton tontomt contained +syn keyword htmlosFunctions max min abs sign inverse square sqrt cube roundsig round ceiling roundup floor rounddown roundeven rounddowneven roundupeven roundodd roundupodd rounddownodd random factorial summand fibonacci remainder mod radians degrees cos sin tan cotan secant cosecant acos asin atan exp power power10 ln log10 log sinh cosh tanh contained +syn keyword htmlosFunctions xmldelete xmldeletex xmldeleteattr xmldeleteattrx xmledit xmleditx xmleditvalue xmleditvaluex xmleditattr xmleditattrx xmlinsertbefore xmlinsertbeforex smlinsertafter xmlinsertafterx xmlinsertattr xmlinsertattrx smlget xmlgetx xmlgetvalue xmlgetvaluex xmlgetattrvalue xmlgetattrvaluex xmlgetrec xmlgetrecx xmlgetrecattrvalue xmlgetrecattrvaluex xmlchopleftbefore xmlchopleftbeforex xmlchoprightbefore xmlchoprightbeforex xmlchopleftafter xmlchopleftafterx xmlchoprightafter xmlchoprightafterx xmllocatebefore xmllocatebeforex xmllocateafter xmllocateafterx contained + +" Type +syn keyword htmlosType int str dol flt dat grp contained + +" StorageClass +syn keyword htmlosStorageClass locals contained + +" Operator +syn match htmlosOperator "[-=+/\*!]" contained +syn match htmlosRelation "[~]" contained +syn match htmlosRelation "[=~][&!]" contained +syn match htmlosRelation "[!=<>]=" contained +syn match htmlosRelation "[<>]" contained + +" Comment +syn region htmlosComment start="#" end="/#" contained + +" Conditional +syn keyword htmlosConditional if then /if to else elif contained +syn keyword htmlosConditional and or nand nor xor not contained +" Repeat +syn keyword htmlosRepeat while do /while for /for contained + +" Keyword +syn keyword htmlosKeyword name value step do rowname colname rownum contained + +" Repeat +syn keyword htmlosLabel case matched /case switch contained + +" Statement +syn keyword htmlosStatement break exit return continue contained + +" Identifier +syn match htmlosIdentifier "\h\w*[\.]*\w*" contained + +" Special identifier +syn match htmlosSpecialIdentifier "[\$@]" contained + +" Define +syn keyword htmlosDefine function overlay contained + +" Boolean +syn keyword htmlosBoolean true false contained + +" String +syn region htmlosStringDouble keepend matchgroup=None start=+"+ end=+"+ contained +syn region htmlosStringSingle keepend matchgroup=None start=+'+ end=+'+ contained + +" Number +syn match htmlosNumber "-\=\<\d\+\>" contained + +" Float +syn match htmlosFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" contained + +" Error +syn match htmlosError "ERROR" contained + +" Parent +syn match htmlosParent "[({[\]})]" contained + +" Todo +syn keyword htmlosTodo TODO Todo todo contained + +syn cluster htmlosInside contains=htmlosComment,htmlosFunctions,htmlosIdentifier,htmlosSpecialIdentifier,htmlosConditional,htmlosRepeat,htmlosLabel,htmlosStatement,htmlosOperator,htmlosRelation,htmlosStringSingle,htmlosStringDouble,htmlosNumber,htmlosFloat,htmlosError,htmlosKeyword,htmlosType,htmlosBoolean,htmlosParent + +syn cluster htmlosTop contains=@htmlosInside,htmlosDefine,htmlosError,htmlosStorageClass + +syn region htmlosRegion keepend matchgroup=Delimiter start="<<" skip=+".\{-}?>.\{-}"\|'.\{-}?>.\{-}'\|/\*.\{-}?>.\{-}\*/+ end=">>" contains=@htmlosTop +syn region htmlosRegion keepend matchgroup=Delimiter start="\[\[" skip=+".\{-}?>.\{-}"\|'.\{-}?>.\{-}'\|/\*.\{-}?>.\{-}\*/+ end="\]\]" contains=@htmlosTop + + +" sync +if exists("htmlos_minlines") + exec "syn sync minlines=" . htmlos_minlines +else + syn sync minlines=100 +endif + +" 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_htmlos_syn_inits") + if version < 508 + let did_htmlos_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " The default methods for highlighting. Can be overridden later + HiLink htmlosSpecialIdentifier Operator + HiLink htmlosIdentifier Identifier + HiLink htmlosStorageClass StorageClass + HiLink htmlosComment Comment + HiLink htmlosBoolean Boolean + HiLink htmlosStringSingle String + HiLink htmlosStringDouble String + HiLink htmlosNumber Number + HiLink htmlosFloat Float + HiLink htmlosFunctions Function + HiLink htmlosRepeat Repeat + HiLink htmlosConditional Conditional + HiLink htmlosLabel Label + HiLink htmlosStatement Statement + HiLink htmlosKeyword Statement + HiLink htmlosType Type + HiLink htmlosDefine Define + HiLink htmlosParent Delimiter + HiLink htmlosError Error + HiLink htmlosTodo Todo + HiLink htmlosOperator Operator + HiLink htmlosRelation Operator + + delcommand HiLink +endif +let b:current_syntax = "htmlos" + +if main_syntax == 'htmlos' + unlet main_syntax +endif + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/ia64.vim b/vim/bundle/ubuntu-vim72/syntax/ia64.vim new file mode 100644 index 0000000..f0d510b --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/ia64.vim @@ -0,0 +1,311 @@ +" Vim syntax file +" Language: IA-64 (Itanium) assembly language +" Maintainer: Parth Malwankar +" URL: http://www.geocities.com/pmalwankar (Home Page with link to my Vim page) +" http://www.geocities.com/pmalwankar/vim.htm (for VIM) +" File Version: 0.7 +" Last Change: 2006 Sep 08 + +" 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 + + +"ignore case for assembly +syn case ignore + +" Identifier Keyword characters (defines \k) +if version >= 600 + setlocal iskeyword=@,48-57,#,$,.,:,?,@-@,_,~ +else + set iskeyword=@,48-57,#,$,.,:,?,@-@,_,~ +endif + +syn sync minlines=5 + +" Read the MASM syntax to start with +" This is needed as both IA-64 as well as IA-32 instructions are supported +source :p:h/masm.vim + +syn region ia64Comment start="//" end="$" contains=ia64Todo +syn region ia64Comment start="/\*" end="\*/" contains=ia64Todo + +syn match ia64Identifier "[a-zA-Z_$][a-zA-Z0-9_$]*" +syn match ia64Directive "\.[a-zA-Z_$][a-zA-Z_$.]\+" +syn match ia64Label "[a-zA-Z_$.][a-zA-Z0-9_$.]*\s\=:\>"he=e-1 +syn match ia64Label "[a-zA-Z_$.][a-zA-Z0-9_$.]*\s\=::\>"he=e-2 +syn match ia64Label "[a-zA-Z_$.][a-zA-Z0-9_$.]*\s\=#\>"he=e-1 +syn region ia64string start=+L\="+ skip=+\\\\\|\\"+ end=+"+ +syn match ia64Octal "0[0-7_]*\>" +syn match ia64Binary "0[bB][01_]*\>" +syn match ia64Hex "0[xX][0-9a-fA-F_]*\>" +syn match ia64Decimal "[1-9_][0-9_]*\>" +syn match ia64Float "[0-9_]*\.[0-9_]*\([eE][+-]\=[0-9_]*\)\=\>" + +"simple instructions +syn keyword ia64opcode add adds addl addp4 alloc and andcm cover epc +syn keyword ia64opcode fabs fand fandcm fc flushrs fneg fnegabs for +syn keyword ia64opcode fpabs fpack fpneg fpnegabs fselect fand fabdcm +syn keyword ia64opcode fc fwb fxor loadrs movl mux1 mux2 or padd4 +syn keyword ia64opcode pavgsub1 pavgsub2 popcnt psad1 pshl2 pshl4 pshladd2 +syn keyword ia64opcode pshradd2 psub4 rfi rsm rum shl shladd shladdp4 +syn keyword ia64opcode shrp ssm sub sum sync.i tak thash +syn keyword ia64opcode tpa ttag xor + +"put to override these being recognized as floats. They are orignally from masm.vim +"put here to avoid confusion with float +syn match ia64Directive "\.186" +syn match ia64Directive "\.286" +syn match ia64Directive "\.286c" +syn match ia64Directive "\.286p" +syn match ia64Directive "\.287" +syn match ia64Directive "\.386" +syn match ia64Directive "\.386c" +syn match ia64Directive "\.386p" +syn match ia64Directive "\.387" +syn match ia64Directive "\.486" +syn match ia64Directive "\.486c" +syn match ia64Directive "\.486p" +syn match ia64Directive "\.8086" +syn match ia64Directive "\.8087" + + + +"delimiters +syn match ia64delimiter ";;" + +"operators +syn match ia64operators "[\[\]()#,]" +syn match ia64operators "\(+\|-\|=\)" + +"TODO +syn match ia64Todo "\(TODO\|XXX\|FIXME\|NOTE\)" + +"What follows is a long list of regular expressions for parsing the +"ia64 instructions that use many completers + +"br +syn match ia64opcode "br\(\(\.\(cond\|call\|ret\|ia\|cloop\|ctop\|cexit\|wtop\|wexit\)\)\=\(\.\(spnt\|dpnt\|sptk\|dptk\)\)\=\(\.few\|\.many\)\=\(\.clr\)\=\)\=\>" +"break +syn match ia64opcode "break\(\.[ibmfx]\)\=\>" +"brp +syn match ia64opcode "brp\(\.\(sptk\|dptk\|loop\|exit\)\)\(\.imp\)\=\>" +syn match ia64opcode "brp\.ret\(\.\(sptk\|dptk\)\)\{1}\(\.imp\)\=\>" +"bsw +syn match ia64opcode "bsw\.[01]\>" +"chk +syn match ia64opcode "chk\.\(s\(\.[im]\)\=\)\>" +syn match ia64opcode "chk\.a\.\(clr\|nc\)\>" +"clrrrb +syn match ia64opcode "clrrrb\(\.pr\)\=\>" +"cmp/cmp4 +syn match ia64opcode "cmp4\=\.\(eq\|ne\|l[te]\|g[te]\|[lg]tu\|[lg]eu\)\(\.unc\)\=\>" +syn match ia64opcode "cmp4\=\.\(eq\|[lgn]e\|[lg]t\)\.\(\(or\(\.andcm\|cm\)\=\)\|\(and\(\(\.or\)\=cm\)\=\)\)\>" +"cmpxchg +syn match ia64opcode "cmpxchg[1248]\.\(acq\|rel\)\(\.nt1\|\.nta\)\=\>" +"czx +syn match ia64opcode "czx[12]\.[lr]\>" +"dep +syn match ia64opcode "dep\(\.z\)\=\>" +"extr +syn match ia64opcode "extr\(\.u\)\=\>" +"fadd +syn match ia64opcode "fadd\(\.[sd]\)\=\(\.s[0-3]\)\=\>" +"famax/famin +syn match ia64opcode "fa\(max\|min\)\(\.s[0-3]\)\=\>" +"fchkf/fmax/fmin +syn match ia64opcode "f\(chkf\|max\|min\)\(\.s[0-3]\)\=\>" +"fclass +syn match ia64opcode "fclass\(\.n\=m\)\(\.unc\)\=\>" +"fclrf/fpamax +syn match ia64opcode "f\(clrf\|pamax\|pamin\)\(\.s[0-3]\)\=\>" +"fcmp +syn match ia64opcode "fcmp\.\(n\=[lg][te]\|n\=eq\|\(un\)\=ord\)\(\.unc\)\=\(\.s[0-3]\)\=\>" +"fcvt/fcvt.xf/fcvt.xuf.pc.sf +syn match ia64opcode "fcvt\.\(\(fxu\=\(\.trunc\)\=\(\.s[0-3]\)\=\)\|\(xf\|xuf\(\.[sd]\)\=\(\.s[0-3]\)\=\)\)\>" +"fetchadd +syn match ia64opcode "fetchadd[48]\.\(acq\|rel\)\(\.nt1\|\.nta\)\=\>" +"fma/fmpy/fms +syn match ia64opcode "fm\([as]\|py\)\(\.[sd]\)\=\(\.s[0-3]\)\=\>" +"fmerge/fpmerge +syn match ia64opcode "fp\=merge\.\(ns\|se\=\)\>" +"fmix +syn match ia64opcode "fmix\.\(lr\|[lr]\)\>" +"fnma/fnorm/fnmpy +syn match ia64opcode "fn\(ma\|mpy\|orm\)\(\.[sd]\)\=\(\.s[0-3]\)\=\>" +"fpcmp +syn match ia64opcode "fpcmp\.\(n\=[lg][te]\|n\=eq\|\(un\)\=ord\)\(\.s[0-3]\)\=\>" +"fpcvt +syn match ia64opcode "fpcvt\.fxu\=\(\(\.trunc\)\=\(\.s[0-3]\)\=\)\>" +"fpma/fpmax/fpmin/fpmpy/fpms/fpnma/fpnmpy/fprcpa/fpsqrta +syn match ia64opcode "fp\(max\=\|min\|n\=mpy\|ms\|nma\|rcpa\|sqrta\)\(\.s[0-3]\)\=\>" +"frcpa/frsqrta +syn match ia64opcode "fr\(cpa\|sqrta\)\(\.s[0-3]\)\=\>" +"fsetc/famin/fchkf +syn match ia64opcode "f\(setc\|amin\|chkf\)\(\.s[0-3]\)\=\>" +"fsub +syn match ia64opcode "fsub\(\.[sd]\)\=\(\.s[0-3]\)\=\>" +"fswap +syn match ia64opcode "fswap\(\.n[lr]\=\)\=\>" +"fsxt +syn match ia64opcode "fsxt\.[lr]\>" +"getf +syn match ia64opcode "getf\.\([sd]\|exp\|sig\)\>" +"invala +syn match ia64opcode "invala\(\.[ae]\)\=\>" +"itc/itr +syn match ia64opcode "it[cr]\.[id]\>" +"ld +syn match ia64opcode "ld[1248]\>\|ld[1248]\(\.\(sa\=\|a\|c\.\(nc\|clr\(\.acq\)\=\)\|acq\|bias\)\)\=\(\.nt[1a]\)\=\>" +syn match ia64opcode "ld8\.fill\(\.nt[1a]\)\=\>" +"ldf +syn match ia64opcode "ldf[sde8]\(\(\.\(sa\=\|a\|c\.\(nc\|clr\)\)\)\=\(\.nt[1a]\)\=\)\=\>" +syn match ia64opcode "ldf\.fill\(\.nt[1a]\)\=\>" +"ldfp +syn match ia64opcode "ldfp[sd8]\(\(\.\(sa\=\|a\|c\.\(nc\|clr\)\)\)\=\(\.nt[1a]\)\=\)\=\>" +"lfetch +syn match ia64opcode "lfetch\(\.fault\(\.excl\)\=\|\.excl\)\=\(\.nt[12a]\)\=\>" +"mf +syn match ia64opcode "mf\(\.a\)\=\>" +"mix +syn match ia64opcode "mix[124]\.[lr]\>" +"mov +syn match ia64opcode "mov\(\.[im]\)\=\>" +syn match ia64opcode "mov\(\.ret\)\=\(\(\.sptk\|\.dptk\)\=\(\.imp\)\=\)\=\>" +"nop +syn match ia64opcode "nop\(\.[ibmfx]\)\=\>" +"pack +syn match ia64opcode "pack\(2\.[su]ss\|4\.sss\)\>" +"padd //padd4 added to keywords +syn match ia64opcode "padd[12]\(\.\(sss\|uus\|uuu\)\)\=\>" +"pavg +syn match ia64opcode "pavg[12]\(\.raz\)\=\>" +"pcmp +syn match ia64opcode "pcmp[124]\.\(eq\|gt\)\>" +"pmax/pmin +syn match ia64opcode "pm\(ax\|in\)\(\(1\.u\)\|2\)\>" +"pmpy +syn match ia64opcode "pmpy2\.[rl]\>" +"pmpyshr +syn match ia64opcode "pmpyshr2\(\.u\)\=\>" +"probe +syn match ia64opcode "probe\.[rw]\>" +syn match ia64opcode "probe\.\(\(r\|w\|rw\)\.fault\)\>" +"pshr +syn match ia64opcode "pshr[24]\(\.u\)\=\>" +"psub +syn match ia64opcode "psub[12]\(\.\(sss\|uu[su]\)\)\=\>" +"ptc +syn match ia64opcode "ptc\.\(l\|e\|ga\=\)\>" +"ptr +syn match ia64opcode "ptr\.\(d\|i\)\>" +"setf +syn match ia64opcode "setf\.\(s\|d\|exp\|sig\)\>" +"shr +syn match ia64opcode "shr\(\.u\)\=\>" +"srlz +syn match ia64opcode "srlz\(\.[id]\)\>" +"st +syn match ia64opcode "st[1248]\(\.rel\)\=\(\.nta\)\=\>" +syn match ia64opcode "st8\.spill\(\.nta\)\=\>" +"stf +syn match ia64opcode "stf[1248]\(\.nta\)\=\>" +syn match ia64opcode "stf\.spill\(\.nta\)\=\>" +"sxt +syn match ia64opcode "sxt[124]\>" +"tbit/tnat +syn match ia64opcode "t\(bit\|nat\)\(\.nz\|\.z\)\=\(\.\(unc\|or\(\.andcm\|cm\)\=\|and\(\.orcm\|cm\)\=\)\)\=\>" +"unpack +syn match ia64opcode "unpack[124]\.[lh]\>" +"xchq +syn match ia64opcode "xchg[1248]\(\.nt[1a]\)\=\>" +"xma/xmpy +syn match ia64opcode "xm\(a\|py\)\.[lh]u\=\>" +"zxt +syn match ia64opcode "zxt[124]\>" + + +"The regex for different ia64 registers are given below + +"limits the rXXX and fXXX and cr suffix in the range 0-127 +syn match ia64registers "\([fr]\|cr\)\([0-9]\|[1-9][0-9]\|1[0-1][0-9]\|12[0-7]\)\{1}\>" +"branch ia64registers +syn match ia64registers "b[0-7]\>" +"predicate ia64registers +syn match ia64registers "p\([0-9]\|[1-5][0-9]\|6[0-3]\)\>" +"application ia64registers +syn match ia64registers "ar\.\(fpsr\|mat\|unat\|rnat\|pfs\|bsp\|bspstore\|rsc\|lc\|ec\|ccv\|itc\|k[0-7]\)\>" +"ia32 AR's +syn match ia64registers "ar\.\(eflag\|fcr\|csd\|ssd\|cflg\|fsr\|fir\|fdr\)\>" +"sp/gp/pr/pr.rot/rp +syn keyword ia64registers sp gp pr pr.rot rp ip tp +"in/out/local +syn match ia64registers "\(in\|out\|loc\)\([0-9]\|[1-8][0-9]\|9[0-5]\)\>" +"argument ia64registers +syn match ia64registers "farg[0-7]\>" +"return value ia64registers +syn match ia64registers "fret[0-7]\>" +"psr +syn match ia64registers "psr\(\.\(l\|um\)\)\=\>" +"cr +syn match ia64registers "cr\.\(dcr\|itm\|iva\|pta\|ipsr\|isr\|ifa\|iip\|itir\|iipa\|ifs\|iim\|iha\|lid\|ivr\|tpr\|eoi\|irr[0-3]\|itv\|pmv\|lrr[01]\|cmcv\)\>" +"Indirect registers +syn match ia64registers "\(cpuid\|dbr\|ibr\|pkr\|pmc\|pmd\|rr\|itr\|dtr\)\>" +"MUX permutations for 8-bit elements +syn match ia64registers "\(@rev\|@mix\|@shuf\|@alt\|@brcst\)\>" +"floating point classes +syn match ia64registers "\(@nat\|@qnan\|@snan\|@pos\|@neg\|@zero\|@unorm\|@norm\|@inf\)\>" +"link relocation operators +syn match ia64registers "\(@\(\(\(gp\|sec\|seg\|image\)rel\)\|ltoff\|fptr\|ptloff\|ltv\|section\)\)\>" + +"Data allocation syntax +syn match ia64data "data[1248]\(\(\(\.ua\)\=\(\.msb\|\.lsb\)\=\)\|\(\(\.msb\|\.lsb\)\=\(\.ua\)\=\)\)\=\>" +syn match ia64data "real\([48]\|1[06]\)\(\(\(\.ua\)\=\(\.msb\|\.lsb\)\=\)\|\(\(\.msb\|\.lsb\)\=\(\.ua\)\=\)\)\=\>" +syn match ia64data "stringz\=\(\(\(\.ua\)\=\(\.msb\|\.lsb\)\=\)\|\(\(\.msb\|\.lsb\)\=\(\.ua\)\=\)\)\=\>" + +" 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_ia64_syn_inits") + if version < 508 + let did_ia64_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + "put masm groups with our groups + HiLink masmOperator ia64operator + HiLink masmDirective ia64Directive + HiLink masmOpcode ia64Opcode + HiLink masmIdentifier ia64Identifier + HiLink masmFloat ia64Float + + "ia64 specific stuff + HiLink ia64Label Define + HiLink ia64Comment Comment + HiLink ia64Directive Type + HiLink ia64opcode Statement + HiLink ia64registers Operator + HiLink ia64string String + HiLink ia64Hex Number + HiLink ia64Binary Number + HiLink ia64Octal Number + HiLink ia64Float Float + HiLink ia64Decimal Number + HiLink ia64Identifier Identifier + HiLink ia64data Type + HiLink ia64delimiter Delimiter + HiLink ia64operator Operator + HiLink ia64Todo Todo + + delcommand HiLink +endif + +let b:current_syntax = "ia64" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/ibasic.vim b/vim/bundle/ubuntu-vim72/syntax/ibasic.vim new file mode 100644 index 0000000..75e5941 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/ibasic.vim @@ -0,0 +1,176 @@ +" Vim syntax file +" Language: ibasic +" Maintainer: Mark Manning +" Originator: Allan Kelly +" Created: 10/1/2006 +" Updated: 10/21/2006 +" Description: A vim file to handle the IBasic file format. +" Notes: +" Updated by Mark Manning +" Applied IBasic support to the already excellent support for standard +" basic syntax (like QB). +" +" First version based on Micro$soft QBASIC circa 1989, as documented in +" 'Learn BASIC Now' by Halvorson&Rygmyr. Microsoft Press 1989. +" This syntax file not a complete implementation yet. +" Send suggestions to the maintainer. +" +" This version is based upon the commands found in IBasic (www.pyxia.com). +" MEM 10/6/2006 +" +" Quit when a (custom) syntax file was already loaded (Taken from c.vim) +" +if exists("b:current_syntax") + finish +endif +" +" Be sure to turn on the "case ignore" since current versions of basic +" support both upper as well as lowercase letters. +" +syn case ignore +" +" A bunch of useful BASIC keywords +" +syn keyword ibasicStatement beep bload bsave call absolute chain chdir circle +syn keyword ibasicStatement clear close cls color com common const data +syn keyword ibasicStatement loop draw end environ erase error exit field +syn keyword ibasicStatement files function get gosub goto +syn keyword ibasicStatement input input# ioctl key kill let line locate +syn keyword ibasicStatement lock unlock lprint using lset mkdir name +syn keyword ibasicStatement on error open option base out paint palette pcopy +syn keyword ibasicStatement pen play pmap poke preset print print# using pset +syn keyword ibasicStatement put randomize read redim reset restore resume +syn keyword ibasicStatement return rmdir rset run seek screen +syn keyword ibasicStatement shared shell sleep sound static stop strig sub +syn keyword ibasicStatement swap system timer troff tron type unlock +syn keyword ibasicStatement view wait width window write +syn keyword ibasicStatement date$ mid$ time$ +" +" Do the basic variables names first. This is because it +" is the most inclusive of the tests. Later on we change +" this so the identifiers are split up into the various +" types of identifiers like functions, basic commands and +" such. MEM 9/9/2006 +" +syn match ibasicIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>" +syn match ibasicGenericFunction "\<[a-zA-Z_][a-zA-Z0-9_]*\>\s*("me=e-1,he=e-1 +" +" Function list +" +syn keyword ibasicBuiltInFunction abs asc atn cdbl cint clng cos csng csrlin cvd cvdmbf +syn keyword ibasicBuiltInFunction cvi cvl cvs cvsmbf eof erdev erl err exp fileattr +syn keyword ibasicBuiltInFunction fix fre freefile inp instr lbound len loc lof +syn keyword ibasicBuiltInFunction log lpos mod peek pen point pos rnd sadd screen seek +syn keyword ibasicBuiltInFunction setmem sgn sin spc sqr stick strig tab tan ubound +syn keyword ibasicBuiltInFunction val valptr valseg varptr varseg +syn keyword ibasicBuiltInFunction chr\$ command$ date$ environ$ erdev$ hex$ inkey$ +syn keyword ibasicBuiltInFunction input$ ioctl$ lcases$ laft$ ltrim$ mid$ mkdmbf$ mkd$ +syn keyword ibasicBuiltInFunction mki$ mkl$ mksmbf$ mks$ oct$ right$ rtrim$ space$ +syn keyword ibasicBuiltInFunction str$ string$ time$ ucase$ varptr$ +syn keyword ibasicTodo contained TODO +syn cluster ibasicFunctionCluster contains=ibasicBuiltInFunction,ibasicGenericFunction + +syn keyword Conditional if else then elseif endif select case endselect +syn keyword Repeat for do while next enddo endwhile wend + +syn keyword ibasicTypeSpecifier single double defdbl defsng +syn keyword ibasicTypeSpecifier int integer uint uinteger int64 uint64 defint deflng +syn keyword ibasicTypeSpecifier byte char string istring defstr +syn keyword ibasicDefine dim def declare +" +"catch errors caused by wrong parenthesis +" +syn cluster ibasicParenGroup contains=ibasicParenError,ibasicIncluded,ibasicSpecial,ibasicTodo,ibasicUserCont,ibasicUserLabel,ibasicBitField +syn region ibasicParen transparent start='(' end=')' contains=ALLBUT,@bParenGroup +syn match ibasicParenError ")" +syn match ibasicInParen contained "[{}]" +" +"integer number, or floating point number without a dot and with "f". +" +syn region ibasicHex start="&h" end="\W" +syn region ibasicHexError start="&h\x*[g-zG-Z]" end="\W" +syn match ibasicInteger "\<\d\+\(u\=l\=\|lu\|f\)\>" +" +"floating point number, with dot, optional exponent +" +syn match ibasicFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" +" +"floating point number, starting with a dot, optional exponent +" +syn match ibasicFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +" +"floating point number, without dot, with exponent +" +syn match ibasicFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" +" +"hex number +" +syn match ibasicIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>" +syn match ibasicFunction "\<[a-zA-Z_][a-zA-Z0-9_]*\>\s*("me=e-1,he=e-1 +syn case match +syn match ibasicOctalError "\<0\o*[89]" +" +" String and Character contstants +" +syn region ibasicString start='"' end='"' contains=ibasicSpecial,ibasicTodo +syn region ibasicString start="'" end="'" contains=ibasicSpecial,ibasicTodo +" +" Comments +" +syn match ibasicSpecial contained "\\." +syn region ibasicComment start="^rem" end="$" contains=ibasicSpecial,ibasicTodo +syn region ibasicComment start=":\s*rem" end="$" contains=ibasicSpecial,ibasicTodo +syn region ibasicComment start="\s*'" end="$" contains=ibasicSpecial,ibasicTodo +syn region ibasicComment start="^'" end="$" contains=ibasicSpecial,ibasicTodo +" +" Now do the comments and labels +" +syn match ibasicLabel "^\d" +syn region ibasicLineNumber start="^\d" end="\s" +" +" Pre-compiler options : FreeBasic +" +syn region ibasicPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=ibasicString,ibasicCharacter,ibasicNumber,ibasicCommentError,ibasicSpaceError +syn match ibasicInclude "^\s*#\s*include\s*" +" +" Create the clusters +" +syn cluster ibasicNumber contains=ibasicHex,ibasicInteger,ibasicFloat +syn cluster ibasicError contains=ibasicHexError +" +" Used with OPEN statement +" +syn match ibasicFilenumber "#\d\+" +" +"syn sync ccomment ibasicComment +" +syn match ibasicMathOperator "[\+\-\=\|\*\/\>\<\%\()[\]]" contains=ibasicParen +" +" The default methods for highlighting. Can be overridden later +" +hi def link ibasicLabel Label +hi def link ibasicConditional Conditional +hi def link ibasicRepeat Repeat +hi def link ibasicHex Number +hi def link ibasicInteger Number +hi def link ibasicFloat Number +hi def link ibasicError Error +hi def link ibasicHexError Error +hi def link ibasicStatement Statement +hi def link ibasicString String +hi def link ibasicComment Comment +hi def link ibasicLineNumber Comment +hi def link ibasicSpecial Special +hi def link ibasicTodo Todo +hi def link ibasicGenericFunction Function +hi def link ibasicBuiltInFunction Function +hi def link ibasicTypeSpecifier Type +hi def link ibasicDefine Type +hi def link ibasicInclude Include +hi def link ibasicIdentifier Identifier +hi def link ibasicFilenumber ibasicTypeSpecifier +hi def link ibasicMathOperator Operator + +let b:current_syntax = "ibasic" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/icemenu.vim b/vim/bundle/ubuntu-vim72/syntax/icemenu.vim new file mode 100644 index 0000000..d3a733d --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/icemenu.vim @@ -0,0 +1,36 @@ +" Vim syntax file +" Language: Icewm Menu +" Maintainer: James Mahler +" Last Change: Fri Apr 1 15:13:48 EST 2005 +" Extensions: ~/.icewm/menu +" Comment: Icewm is a lightweight window manager. This adds syntax +" highlighting when editing your user's menu file (~/.icewm/menu). + +" clear existing syntax +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" not case sensitive +syntax case ignore + +" icons .xpm .png and .gif +syntax match _icon /"\=\/.*\.xpm"\=/ +syntax match _icon /"\=\/.*\.png"\=/ +syntax match _icon /"\=\/.*\.gif"\=/ +syntax match _icon /"\-"/ + +" separator +syntax keyword _rules separator + +" prog and menu +syntax keyword _ids menu prog + +" highlights +highlight link _rules Underlined +highlight link _ids Type +highlight link _icon Special + +let b:current_syntax = "IceMenu" diff --git a/vim/bundle/ubuntu-vim72/syntax/icon.vim b/vim/bundle/ubuntu-vim72/syntax/icon.vim new file mode 100644 index 0000000..1a73c43 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/icon.vim @@ -0,0 +1,212 @@ +" Vim syntax file +" Language: Icon +" Maintainer: Wendell Turner +" URL: ftp://ftp.halcyon.com/pub/users/wturner/icon.vim +" Last Change: 2003 May 11 + +" 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 keyword iconFunction abs acos any args asin atan bal +syn keyword iconFunction callout center char chdir close collect copy +syn keyword iconFunction cos cset delay delete detab display dtor +syn keyword iconFunction entab errorclear exit exp find flush function +syn keyword iconFunction get getch getche getenv iand icom image +syn keyword iconFunction insert integer ior ishift ixor kbhit key +syn keyword iconFunction left list loadfunc log many map match +syn keyword iconFunction member move name numeric open ord pop +syn keyword iconFunction pos proc pull push put read reads +syn keyword iconFunction real remove rename repl reverse right rtod +syn keyword iconFunction runerr save seek seq set sin sort +syn keyword iconFunction sortf sqrt stop string system tab table +syn keyword iconFunction tan trim type upto variable where write writes + +" Keywords +syn match iconKeyword "&allocated" +syn match iconKeyword "&ascii" +syn match iconKeyword "&clock" +syn match iconKeyword "&collections" +syn match iconKeyword "&cset" +syn match iconKeyword "¤t" +syn match iconKeyword "&date" +syn match iconKeyword "&dateline" +syn match iconKeyword "&digits" +syn match iconKeyword "&dump" +syn match iconKeyword "&e" +syn match iconKeyword "&error" +syn match iconKeyword "&errornumber" +syn match iconKeyword "&errortext" +syn match iconKeyword "&errorvalue" +syn match iconKeyword "&errout" +syn match iconKeyword "&fail" +syn match iconKeyword "&features" +syn match iconKeyword "&file" +syn match iconKeyword "&host" +syn match iconKeyword "&input" +syn match iconKeyword "&lcase" +syn match iconKeyword "&letters" +syn match iconKeyword "&level" +syn match iconKeyword "&line" +syn match iconKeyword "&main" +syn match iconKeyword "&null" +syn match iconKeyword "&output" +syn match iconKeyword "&phi" +syn match iconKeyword "&pi" +syn match iconKeyword "&pos" +syn match iconKeyword "&progname" +syn match iconKeyword "&random" +syn match iconKeyword "®ions" +syn match iconKeyword "&source" +syn match iconKeyword "&storage" +syn match iconKeyword "&subject" +syn match iconKeyword "&time" +syn match iconKeyword "&trace" +syn match iconKeyword "&ucase" +syn match iconKeyword "&version" + +" Reserved words +syn keyword iconReserved break by case create default do +syn keyword iconReserved else end every fail if +syn keyword iconReserved initial link next not of +syn keyword iconReserved procedure repeat return suspend +syn keyword iconReserved then to until while + +" Storage class reserved words +syn keyword iconStorageClass global static local record + +syn keyword iconTodo contained TODO FIXME XXX BUG + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match iconSpecial contained "\\x\x\{2}\|\\\o\{3\}\|\\[bdeflnrtv\"\'\\]\|\\^c[a-zA-Z0-9]\|\\$" +syn region iconString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=iconSpecial +syn region iconCset start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=iconSpecial +syn match iconCharacter "'[^\\]'" + +" not sure about these +"syn match iconSpecialCharacter "'\\[bdeflnrtv]'" +"syn match iconSpecialCharacter "'\\\o\{3\}'" +"syn match iconSpecialCharacter "'\\x\x\{2}'" +"syn match iconSpecialCharacter "'\\^c\[a-zA-Z0-9]'" + +"when wanted, highlight trailing white space +if exists("icon_space_errors") + syn match iconSpaceError "\s*$" + syn match iconSpaceError " \+\t"me=e-1 +endif + +"catch errors caused by wrong parenthesis +syn cluster iconParenGroup contains=iconParenError,iconIncluded,iconSpecial,iconTodo,iconUserCont,iconUserLabel,iconBitField + +syn region iconParen transparent start='(' end=')' contains=ALLBUT,@iconParenGroup +syn match iconParenError ")" +syn match iconInParen contained "[{}]" + + +syn case ignore + +"integer number, or floating point number without a dot +syn match iconNumber "\<\d\+\>" + +"floating point number, with dot, optional exponent +syn match iconFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=\>" + +"floating point number, starting with a dot, optional exponent +syn match iconFloat "\.\d\+\(e[-+]\=\d\+\)\=\>" + +"floating point number, without dot, with exponent +syn match iconFloat "\<\d\+e[-+]\=\d\+\>" + +"radix number +syn match iconRadix "\<\d\{1,2}[rR][a-zA-Z0-9]\+\>" + + +" syn match iconIdentifier "\<[a-z_][a-z0-9_]*\>" + +syn case match + +" Comment +syn match iconComment "#.*" contains=iconTodo,iconSpaceError + +syn region iconPreCondit start="^\s*$\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=iconComment,iconString,iconCharacter,iconNumber,iconCommentError,iconSpaceError + +syn region iconIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match iconIncluded contained "<[^>]*>" +syn match iconInclude "^\s*$\s*include\>\s*["<]" contains=iconIncluded +"syn match iconLineSkip "\\$" + +syn cluster iconPreProcGroup contains=iconPreCondit,iconIncluded,iconInclude,iconDefine,iconInParen,iconUserLabel + +syn region iconDefine start="^\s*$\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,@iconPreProcGroup + +"wt:syn region iconPreProc "start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" "end="$" contains=ALLBUT,@iconPreProcGroup + +" Highlight User Labels + +" syn cluster iconMultiGroup contains=iconIncluded,iconSpecial,iconTodo,iconUserCont,iconUserLabel,iconBitField + +if !exists("icon_minlines") + let icon_minlines = 15 +endif +exec "syn sync ccomment iconComment minlines=" . icon_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 +if version >= 508 || !exists("did_icon_syn_inits") + if version < 508 + let did_icon_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " The default methods for highlighting. Can be overridden later + + " HiLink iconSpecialCharacter iconSpecial + + HiLink iconOctalError iconError + HiLink iconParenError iconError + HiLink iconInParen iconError + HiLink iconCommentError iconError + HiLink iconSpaceError iconError + HiLink iconCommentError iconError + HiLink iconIncluded iconString + HiLink iconCommentString iconString + HiLink iconComment2String iconString + HiLink iconCommentSkip iconComment + + HiLink iconUserLabel Label + HiLink iconCharacter Character + HiLink iconNumber Number + HiLink iconRadix Number + HiLink iconFloat Float + HiLink iconInclude Include + HiLink iconPreProc PreProc + HiLink iconDefine Macro + HiLink iconError Error + HiLink iconStatement Statement + HiLink iconPreCondit PreCondit + HiLink iconString String + HiLink iconCset String + HiLink iconComment Comment + HiLink iconSpecial SpecialChar + HiLink iconTodo Todo + HiLink iconStorageClass StorageClass + HiLink iconFunction Statement + HiLink iconReserved Label + HiLink iconKeyword Operator + + "HiLink iconIdentifier Identifier + + delcommand HiLink +endif + +let b:current_syntax = "icon" + diff --git a/vim/bundle/ubuntu-vim72/syntax/idl.vim b/vim/bundle/ubuntu-vim72/syntax/idl.vim new file mode 100644 index 0000000..39041fc --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/idl.vim @@ -0,0 +1,319 @@ +" Vim syntax file +" Language: IDL (Interface Description Language) +" Created By: Jody Goldberg +" Maintainer: Michael Geddes +" Last Change: Thu Apr 13 2006 + + +" This is an experiment. IDL's structure is simple enough to permit a full +" grammar based approach to rather than using a few heuristics. The result +" is large and somewhat repetative but seems to work. + +" There are some Microsoft extensions to idl files that are here. Some of +" them are disabled by defining idl_no_ms_extensions. +" +" The more complex of the extensions are disabled by defining idl_no_extensions. +" +" History: +" 2.0: Michael's new version +" 2.1: Support for Vim 7 spell (Anduin Withers) +" + +if exists("b:current_syntax") + finish +endif + +if exists("idlsyntax_showerror") + syn match idlError +\S+ skipwhite skipempty nextgroup=idlError +endif + +syn region idlCppQuote start='\]*>" +syn match idlInclude "^[ \t]*#[ \t]*include\>[ \t]*["<]" contains=idlIncluded,idlString +syn region idlPreCondit start="^[ \t]*#[ \t]*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=idlComment,idlCommentError +syn region idlDefine start="^[ \t]*#[ \t]*\(define\>\|undef\>\)" skip="\\$" end="$" contains=idlLiteral,idlString + +" Constants +syn keyword idlConst const skipempty skipwhite nextgroup=idlBaseType,idlBaseTypeInt + +" Attribute +syn keyword idlROAttr readonly skipempty skipwhite nextgroup=idlAttr +syn keyword idlAttr attribute skipempty skipwhite nextgroup=idlBaseTypeInt,idlBaseType + +" Types +syn region idlD4 contained start="<" end=">" skipempty skipwhite nextgroup=idlSimpDecl contains=idlSeqType,idlBaseTypeInt,idlBaseType,idlLiteral +syn keyword idlSeqType contained sequence skipempty skipwhite nextgroup=idlD4 +syn keyword idlBaseType contained float double char boolean octet any skipempty skipwhite nextgroup=idlSimpDecl +syn keyword idlBaseTypeInt contained short long skipempty skipwhite nextgroup=idlSimpDecl +syn keyword idlBaseType contained unsigned skipempty skipwhite nextgroup=idlBaseTypeInt +syn region idlD1 contained start="<" end=">" skipempty skipwhite nextgroup=idlSimpDecl contains=idlString,idlLiteral +syn keyword idlBaseType contained string skipempty skipwhite nextgroup=idlD1,idlSimpDecl +syn match idlBaseType contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlSimpDecl + +" Modules +syn region idlModuleContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=idlUnion,idlStruct,idlEnum,idlInterface,idlComment,idlTypedef,idlConst,idlException,idlModule +syn match idlModuleName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlModuleContent,idlError,idlSemiColon +syn keyword idlModule module skipempty skipwhite nextgroup=idlModuleName + +" Interfaces +syn cluster idlCommentable contains=idlComment +syn cluster idlContentCluster contains=idlUnion,idlStruct,idlEnum,idlROAttr,idlAttr,idlOp,idlOneWayOp,idlException,idlConst,idlTypedef,idlAttributes,idlErrorSquareBracket,idlErrorBracket,idlInterfaceSections + +syn region idlInterfaceContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=@idlContentCluster,@idlCommentable +syn match idlInheritFrom2 contained "," skipempty skipwhite nextgroup=idlInheritFrom +syn match idlInheritFrom contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlInheritFrom2,idlInterfaceContent +syn match idlInherit contained ":" skipempty skipwhite nextgroup=idlInheritFrom +syn match idlInterfaceName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlInterfaceContent,idlInherit,idlError,idlSemiColon +syn keyword idlInterface interface dispinterface skipempty skipwhite nextgroup=idlInterfaceName +syn keyword idlInterfaceSections contained properties methods skipempty skipwhite nextgroup=idlSectionColon,idlError +syn match idlSectionColon contained ":" + + +syn match idlLibraryName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlLibraryContent,idlError,idlSemiColon +syn keyword idlLibrary library skipempty skipwhite nextgroup=idlLibraryName +syn region idlLibraryContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=@idlCommentable,idlAttributes,idlErrorSquareBracket,idlErrorBracket,idlImportlib,idlCoclass,idlTypedef,idlInterface + +syn keyword idlImportlib contained importlib skipempty skipwhite nextgroup=idlStringArg +syn region idlStringArg contained start="(" end=")" contains=idlString nextgroup=idlError,idlSemiColon,idlErrorBrace,idlErrorSquareBracket + +syn keyword idlCoclass coclass contained skipempty skipwhite nextgroup=idlCoclassName +syn match idlCoclassName "[a-zA-Z0-9_]\+" contained skipempty skipwhite nextgroup=idlCoclassDefinition,idlError,idlSemiColon + +syn region idlCoclassDefinition contained start="{" end="}" contains=idlCoclassAttributes,idlInterface,idlErrorBracket,idlErrorSquareBracket skipempty skipwhite nextgroup=idlError,idlSemiColon +syn region idlCoclassAttributes contained start=+\[+ end=+]+ skipempty skipwhite nextgroup=idlInterface contains=idlErrorBracket,idlErrorBrace,idlCoclassAttribute +syn keyword idlCoclassAttribute contained default source +"syn keyword idlInterface interface skipempty skipwhite nextgroup=idlInterfaceStubName + +syn match idlImportString +"\f\+"+ skipempty skipwhite nextgroup=idlError,idlSemiColon +syn keyword idlImport import skipempty skipwhite nextgroup=idlImportString + +syn region idlAttributes start="\[" end="\]" contains=idlAttribute,idlAttributeParam,idlErrorBracket,idlErrorBrace,idlComment +syn keyword idlAttribute contained propput propget propputref id helpstring object uuid pointer_default +if !exists('idl_no_ms_extensions') +syn keyword idlAttribute contained nonextensible dual version aggregatable restricted hidden noncreatable oleautomation +endif +syn region idlAttributeParam contained start="(" end=")" contains=idlString,idlUuid,idlLiteral,idlErrorBrace,idlErrorSquareBracket +" skipwhite nextgroup=idlArraySize,idlParmList contains=idlArraySize,idlLiteral +syn match idlErrorBrace contained "}" +syn match idlErrorBracket contained ")" +syn match idlErrorSquareBracket contained "\]" + +syn match idlUuid contained +[0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12}+ + +" Raises +syn keyword idlRaises contained raises skipempty skipwhite nextgroup=idlRaises,idlContext,idlError,idlSemiColon + +" Context +syn keyword idlContext contained context skipempty skipwhite nextgroup=idlRaises,idlContext,idlError,idlSemiColon + +" Operation +syn match idlParmList contained "," skipempty skipwhite nextgroup=idlOpParms +syn region idlArraySize contained start="\[" end="\]" skipempty skipwhite nextgroup=idlArraySize,idlParmList contains=idlArraySize,idlLiteral +syn match idlParmName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlParmList,idlArraySize +syn keyword idlParmInt contained short long skipempty skipwhite nextgroup=idlParmName +syn keyword idlParmType contained unsigned skipempty skipwhite nextgroup=idlParmInt +syn region idlD3 contained start="<" end=">" skipempty skipwhite nextgroup=idlParmName contains=idlString,idlLiteral +syn keyword idlParmType contained string skipempty skipwhite nextgroup=idlD3,idlParmName +syn keyword idlParmType contained void float double char boolean octet any skipempty skipwhite nextgroup=idlParmName +syn match idlParmType contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlParmName +syn keyword idlOpParms contained in out inout skipempty skipwhite nextgroup=idlParmType + +if !exists('idl_no_ms_extensions') +syn keyword idlOpParms contained retval optional skipempty skipwhite nextgroup=idlParmType + syn match idlOpParms contained +\<\(iid_is\|defaultvalue\)\s*([^)]*)+ skipempty skipwhite nextgroup=idlParamType + + syn keyword idlVariantType contained BSTR VARIANT VARIANT_BOOL long short unsigned double CURRENCY DATE + syn region idlSafeArray contained matchgroup=idlVariantType start=+SAFEARRAY(\s*+ end=+)+ contains=idlVariantType +endif + +syn region idlOpContents contained start="(" end=")" skipempty skipwhite nextgroup=idlRaises,idlContext,idlError,idlSemiColon contains=idlOpParms,idlSafeArray,idlVariantType,@idlCommentable +syn match idlOpName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlOpContents +syn keyword idlOpInt contained short long skipempty skipwhite nextgroup=idlOpName +syn region idlD2 contained start="<" end=">" skipempty skipwhite nextgroup=idlOpName contains=idlString,idlLiteral +syn keyword idlOp contained unsigned skipempty skipwhite nextgroup=idlOpInt +syn keyword idlOp contained string skipempty skipwhite nextgroup=idlD2,idlOpName +syn keyword idlOp contained void float double char boolean octet any skipempty skipwhite nextgroup=idlOpName +syn match idlOp contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlOpName +syn keyword idlOp contained void skipempty skipwhite nextgroup=idlOpName +syn keyword idlOneWayOp contained oneway skipempty skipwhite nextgroup=idOp + +" Enum +syn region idlEnumContents contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlSimpDecl contains=idlId,idlAttributes,@idlCommentable +syn match idlEnumName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlEnumContents +syn keyword idlEnum enum skipempty skipwhite nextgroup=idlEnumName,idlEnumContents + +" Typedef +syn keyword idlTypedef typedef skipempty skipwhite nextgroup=idlTypedefOtherTypeQualifier,idlDefBaseType,idlDefBaseTypeInt,idlDefSeqType,idlDefv1Enum,idlDefEnum,idlDefOtherType,idlDefAttributes,idlError + +if !exists('idl_no_extensions') + syn keyword idlTypedefOtherTypeQualifier contained struct enum interface nextgroup=idlDefBaseType,idlDefBaseTypeInt,idlDefSeqType,idlDefv1Enum,idlDefEnum,idlDefOtherType,idlDefAttributes,idlError skipwhite + + syn region idlDefAttributes contained start="\[" end="\]" contains=idlAttribute,idlAttributeParam,idlErrorBracket,idlErrorBrace skipempty skipwhite nextgroup=idlDefBaseType,idlDefBaseTypeInt,idlDefSeqType,idlDefv1Enum,idlDefEnum,idlDefOtherType,idlError + + syn keyword idlDefBaseType contained float double char boolean octet any skipempty skipwhite nextgroup=idlTypedefDecl,idlError + syn keyword idlDefBaseTypeInt contained short long skipempty skipwhite nextgroup=idlTypedefDecl,idlError + syn match idlDefOtherType contained +\<\k\+\>+ skipempty nextgroup=idlTypedefDecl,idlError + " syn keyword idlDefSeqType contained sequence skipempty skipwhite nextgroup=idlD4 + + " Enum typedef + syn keyword idlDefEnum contained enum skipempty skipwhite nextgroup=idlDefEnumName,idlDefEnumContents + syn match idlDefEnumName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlDefEnumContents,idlTypedefDecl + syn region idlDefEnumContents contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlTypedefDecl contains=idlId,idlAttributes + + syn match idlTypedefDecl contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlError,idlSemiColon +endif + +" Struct +syn region idlStructContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlSimpDecl contains=idlBaseType,idlBaseTypeInt,idlSeqType,@idlCommentable,idlEnum,idlUnion +syn match idlStructName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlStructContent +syn keyword idlStruct struct skipempty skipwhite nextgroup=idlStructName + +" Exception +syn keyword idlException exception skipempty skipwhite nextgroup=idlStructName + +" Union +syn match idlColon contained ":" skipempty skipwhite nextgroup=idlCase,idlSeqType,idlBaseType,idlBaseTypeInt +syn region idlCaseLabel contained start="" skip="::" end=":"me=e-1 skipempty skipwhite nextgroup=idlColon contains=idlLiteral,idlString +syn keyword idlCase contained case skipempty skipwhite nextgroup=idlCaseLabel +syn keyword idlCase contained default skipempty skipwhite nextgroup=idlColon +syn region idlUnionContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlSimpDecl contains=idlCase +syn region idlSwitchType contained start="(" end=")" skipempty skipwhite nextgroup=idlUnionContent +syn keyword idlUnionSwitch contained switch skipempty skipwhite nextgroup=idlSwitchType +syn match idlUnionName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlUnionSwitch +syn keyword idlUnion union skipempty skipwhite nextgroup=idlUnionName + +if !exists('idl_no_extensions') + syn sync match idlInterfaceSync grouphere idlInterfaceContent "\<\(disp\)\=interface\>\s\+\k\+\s*:\s*\k\+\_s*{" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=@idlContentCluster,@idlCommentable + syn sync maxlines=1000 minlines=100 +else + syn sync lines=200 +endif +" syn sync fromstart + +if !exists("did_idl_syntax_inits") + let did_idl_syntax_inits = 1 + " The default methods for highlighting. Can be overridden later + command -nargs=+ HiLink hi def link + + HiLink idlInclude Include + HiLink idlPreProc PreProc + HiLink idlPreCondit PreCondit + HiLink idlDefine Macro + HiLink idlIncluded String + HiLink idlString String + HiLink idlComment Comment + HiLink idlTodo Todo + HiLink idlLiteral Number + HiLink idlUuid Number + HiLink idlType Type + HiLink idlVariantType idlType + + HiLink idlModule Keyword + HiLink idlInterface Keyword + HiLink idlEnum Keyword + HiLink idlStruct Keyword + HiLink idlUnion Keyword + HiLink idlTypedef Keyword + HiLink idlException Keyword + HiLink idlTypedefOtherTypeQualifier keyword + + HiLink idlModuleName Typedef + HiLink idlInterfaceName Typedef + HiLink idlEnumName Typedef + HiLink idlStructName Typedef + HiLink idlUnionName Typedef + + HiLink idlBaseTypeInt idlType + HiLink idlBaseType idlType + HiLink idlSeqType idlType + HiLink idlD1 Paren + HiLink idlD2 Paren + HiLink idlD3 Paren + HiLink idlD4 Paren + "HiLink idlArraySize Paren + "HiLink idlArraySize1 Paren + HiLink idlModuleContent Paren + HiLink idlUnionContent Paren + HiLink idlStructContent Paren + HiLink idlEnumContents Paren + HiLink idlInterfaceContent Paren + + HiLink idlSimpDecl Identifier + HiLink idlROAttr StorageClass + HiLink idlAttr Keyword + HiLink idlConst StorageClass + + HiLink idlOneWayOp StorageClass + HiLink idlOp idlType + HiLink idlParmType idlType + HiLink idlOpName Function + HiLink idlOpParms SpecialComment + HiLink idlParmName Identifier + HiLink idlInheritFrom Identifier + HiLink idlAttribute SpecialComment + + HiLink idlId Constant + "HiLink idlCase Keyword + HiLink idlCaseLabel Constant + + HiLink idlErrorBracket Error + HiLink idlErrorBrace Error + HiLink idlErrorSquareBracket Error + + HiLink idlImport Keyword + HiLink idlImportString idlString + HiLink idlCoclassAttribute StorageClass + HiLink idlLibrary Keyword + HiLink idlImportlib Keyword + HiLink idlCoclass Keyword + HiLink idlLibraryName Typedef + HiLink idlCoclassName Typedef + " hi idlLibraryContent guifg=red + HiLink idlTypedefDecl Typedef + HiLink idlDefEnum Keyword + HiLink idlDefv1Enum Keyword + HiLink idlDefEnumName Typedef + HiLink idlDefEnumContents Paren + HiLink idlDefBaseTypeInt idlType + HiLink idlDefBaseType idlType + HiLink idlDefSeqType idlType + HiLink idlInterfaceSections Label + + if exists("idlsyntax_showerror") + if exists("idlsyntax_showerror_soft") + hi default idlError guibg=#d0ffd0 + else + HiLink idlError Error + endif + endif + delcommand HiLink +endif + +let b:current_syntax = "idl" + +" vim: sw=2 et diff --git a/vim/bundle/ubuntu-vim72/syntax/idlang.vim b/vim/bundle/ubuntu-vim72/syntax/idlang.vim new file mode 100644 index 0000000..9d567e5 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/idlang.vim @@ -0,0 +1,253 @@ +" Interactive Data Language syntax file (IDL, too [:-)] +" Maintainer: Aleksandar Jelenak +" Last change: 2003 Apr 25 +" Created by: Hermann Rochholz + +" Remove any old syntax stuff hanging around +" 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 + +syntax case ignore + +syn match idlangStatement "^\s*pro\s" +syn match idlangStatement "^\s*function\s" +syn keyword idlangStatement return continue mod do break +syn keyword idlangStatement compile_opt forward_function goto +syn keyword idlangStatement begin common end of +syn keyword idlangStatement inherits on_ioerror begin + +syn keyword idlangConditional if else then for while case switch +syn keyword idlangConditional endcase endelse endfor endswitch +syn keyword idlangConditional endif endrep endwhile repeat until + +syn match idlangOperator "\ and\ " +syn match idlangOperator "\ eq\ " +syn match idlangOperator "\ ge\ " +syn match idlangOperator "\ gt\ " +syn match idlangOperator "\ le\ " +syn match idlangOperator "\ lt\ " +syn match idlangOperator "\ ne\ " +syn match idlangOperator /\(\ \|(\)not\ /hs=e-3 +syn match idlangOperator "\ or\ " +syn match idlangOperator "\ xor\ " + +syn keyword idlangStop stop pause + +syn match idlangStrucvar "\h\w*\(\.\h\w*\)\+" +syn match idlangStrucvar "[),\]]\(\.\h\w*\)\+"hs=s+1 + +syn match idlangSystem "\!\a\w*\(\.\w*\)\=" + +syn match idlangKeyword "\([(,]\s*\(\$\_s*\)\=\)\@<=/\h\w*" +syn match idlangKeyword "\([(,]\s*\(\$\_s*\)\=\)\@<=\h\w*\s*=" + +syn keyword idlangTodo contained TODO + +syn region idlangString start=+"+ end=+"+ +syn region idlangString start=+'+ end=+'+ + +syn match idlangPreCondit "^\s*@\w*\(\.\a\{3}\)\=" + +syn match idlangRealNumber "\<\d\+\(\.\=\d*e[+-]\=\d\+\|\.\d*d\|\.\d*\|d\)" +syn match idlangRealNumber "\.\d\+\(d\|e[+-]\=\d\+\)\=" + +syn match idlangNumber "\<\.\@!\d\+\.\@!\(b\|u\|us\|s\|l\|ul\|ll\|ull\)\=\>" + +syn match idlangComment "[\;].*$" contains=idlangTodo + +syn match idlangContinueLine "\$\s*\($\|;\)"he=s+1 contains=idlangComment +syn match idlangContinueLine "&\s*\(\h\|;\)"he=s+1 contains=ALL + +syn match idlangDblCommaError "\,\s*\," + +" List of standard routines as of IDL version 5.4. +syn match idlangRoutine "EOS_\a*" +syn match idlangRoutine "HDF_\a*" +syn match idlangRoutine "CDF_\a*" +syn match idlangRoutine "NCDF_\a*" +syn match idlangRoutine "QUERY_\a*" +syn match idlangRoutine "\= 508 || !exists("did_idlang_syn_inits") + if version < 508 + let did_idlang_syn_inits = 1 + command -nargs=+ HiLink hi link +else + command -nargs=+ HiLink hi def link +endif + + HiLink idlangConditional Conditional + HiLink idlangRoutine Type + HiLink idlangStatement Statement + HiLink idlangContinueLine Todo + HiLink idlangRealNumber Float + HiLink idlangNumber Number + HiLink idlangString String + HiLink idlangOperator Operator + HiLink idlangComment Comment + HiLink idlangTodo Todo + HiLink idlangPreCondit Identifier + HiLink idlangDblCommaError Error + HiLink idlangStop Error + HiLink idlangStrucvar PreProc + HiLink idlangSystem Identifier + HiLink idlangKeyword Special + + delcommand HiLink +endif + +let b:current_syntax = "idlang" +" vim: ts=18 diff --git a/vim/bundle/ubuntu-vim72/syntax/indent.vim b/vim/bundle/ubuntu-vim72/syntax/indent.vim new file mode 100644 index 0000000..4070769 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/indent.vim @@ -0,0 +1,151 @@ +" Vim syntax file +" Language: indent(1) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2007-06-17 +" indent_is_bsd: If exists, will change somewhat to match BSD implementation +" +" TODO: is the deny-all (a la lilo.vim nice or no?)... +" irritating to be wrong to the last char... +" would be sweet if right until one char fails + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +setlocal iskeyword+=-,+ + +syn match indentError '\S\+' + +syn keyword indentTodo contained TODO FIXME XXX NOTE + +syn region indentComment start='/\*' end='\*/' + \ contains=indentTodo,@Spell +syn region indentComment start='//' skip='\\$' end='$' + \ contains=indentTodo,@Spell + +if !exists("indent_is_bsd") + syn match indentOptions '-i\|--indentation-level' + \ nextgroup=indentNumber skipwhite skipempty +endif +syn match indentOptions '-\%(bli\|c\%([bl]i\|[dip]\)\=\|di\=\|ip\=\|lc\=\|pp\=i\|sbi\|ts\|-\%(brace-indent\|comment-indentation\|case-brace-indentation\|declaration-comment-column\|continuation-indentation\|case-indentation\|else-endif-column\|line-comments-indentation\|declaration-indentation\|indent-level\|parameter-indentation\|line-length\|comment-line-length\|paren-indentation\|preprocessor-indentation\|struct-brace-indentation\|tab-size\)\)' + \ nextgroup=indentNumber skipwhite skipempty + +syn match indentNumber display contained '\d\+\>' + +syn match indentOptions '-T' + \ nextgroup=indentIdent skipwhite skipempty + +syn match indentIdent display contained '\h\w*\>' + +syn keyword indentOptions -bacc --blank-lines-after-ifdefs + \ -bad --blank-lines-after-declarations + \ -badp --blank-lines-after-procedure-declarations + \ -bap --blank-lines-after-procedures + \ -bbb --blank-lines-before-block-comments + \ -bbo --break-before-boolean-operator + \ -bc --blank-lines-after-commas + \ -bfda --break-function-decl-args + \ -bfde --break-function-decl-args-end + \ -bl --braces-after-if-line + \ -blf --braces-after-func-def-line + \ -bls --braces-after-struct-decl-line + \ -br --braces-on-if-line + \ -brf --braces-on-func-def-line + \ -brs --braces-on-struct-decl-line + \ -bs --Bill-Shannon --blank-before-sizeof + \ -c++ --c-plus-plus + \ -cdb --comment-delimiters-on-blank-lines + \ -cdw --cuddle-do-while + \ -ce --cuddle-else + \ -cs --space-after-cast + \ -dj --left-justify-declarations + \ -eei --extra-expression-indentation + \ -fc1 --format-first-column-comments + \ -fca --format-all-comments + \ -gnu --gnu-style + \ -h --help --usage + \ -hnl --honour-newlines + \ -kr --k-and-r-style --kernighan-and-ritchie --kernighan-and-ritchie-style + \ -lp --continue-at-parentheses + \ -lps --leave-preprocessor-space + \ -nbacc --no-blank-lines-after-ifdefs + \ -nbad --no-blank-lines-after-declarations + \ -nbadp --no-blank-lines-after-procedure-declarations + \ -nbap --no-blank-lines-after-procedures + \ -nbbb --no-blank-lines-before-block-comments + \ -nbbo --break-after-boolean-operator + \ -nbc --no-blank-lines-after-commas + \ -nbfda --dont-break-function-decl-args + \ -nbfde --dont-break-function-decl-args-end + \ -nbs --no-Bill-Shannon --no-blank-before-sizeof + \ -ncdb --no-comment-delimiters-on-blank-lines + \ -ncdw --dont-cuddle-do-while + \ -nce --dont-cuddle-else + \ -ncs --no-space-after-casts + \ -ndj --dont-left-justify-declarations + \ -neei --no-extra-expression-indentation + \ -nfc1 --dont-format-first-column-comments + \ -nfca --dont-format-comments + \ -nhnl --ignore-newlines + \ -nip --dont-indent-parameters --no-parameter-indentation + \ -nlp --dont-line-up-parentheses + \ -nlps --remove-preprocessor-space + \ -npcs --no-space-after-function-call-names + \ -npmt + \ -npro --ignore-profile + \ -nprs --no-space-after-parentheses + \ -npsl --dont-break-procedure-type + \ -nsaf --no-space-after-for + \ -nsai --no-space-after-if + \ -nsaw --no-space-after-while + \ -nsc --dont-star-comments + \ -nsob --leave-optional-blank-lines + \ -nss --dont-space-special-semicolon + \ -nut --no-tabs + \ -nv --no-verbosity + \ -o --output + \ -o --output-file + \ -orig --berkeley --berkeley-style --original --original-style + \ -pcs --space-after-procedure-calls + \ -pmt --preserve-mtime + \ -prs --space-after-parentheses + \ -psl --procnames-start-lines + \ -saf --space-after-for + \ -sai --space-after-if + \ -saw --space-after-while + \ -sc --start-left-side-of-comments + \ -sob --swallow-optional-blank-lines + \ -ss --space-special-semicolon + \ -st --standard-output + \ -ut --use-tabs + \ -v --verbose + \ -version --version + +if exists("indent_is_bsd") + syn keyword indentOptions -ip -ei -nei +endif + +if exists("c_minlines") + let b:c_minlines = c_minlines +else + if !exists("c_no_if0") + let b:c_minlines = 50 " #if 0 constructs can be long + else + let b:c_minlines = 15 " mostly for () constructs + endif +endif + +hi def link indentError Error +hi def link indentComment Comment +hi def link indentTodo Todo +hi def link indentOptions Keyword +hi def link indentNumber Number +hi def link indentIdent Identifier + +let b:current_syntax = "indent" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/inform.vim b/vim/bundle/ubuntu-vim72/syntax/inform.vim new file mode 100644 index 0000000..d8ba43d --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/inform.vim @@ -0,0 +1,408 @@ +" Vim syntax file +" Language: Inform +" Maintainer: Stephen Thomas (stephen@gowarthomas.com) +" URL: http://www.gowarthomas.com/informvim +" Last Change: 2006 April 20 + +" Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" A bunch of useful Inform keywords. First, case insensitive stuff + +syn case ignore + +syn keyword informDefine Constant + +syn keyword informType Array Attribute Class Nearby +syn keyword informType Object Property String Routine +syn match informType "\" + +syn keyword informInclude Import Include Link Replace System_file + +syn keyword informPreCondit End Endif Ifdef Ifndef Iftrue Iffalse Ifv3 Ifv5 +syn keyword informPreCondit Ifnot + +syn keyword informPreProc Abbreviate Default Fake_action Lowstring +syn keyword informPreProc Message Release Serial Statusline Stub Switches +syn keyword informPreProc Trace Zcharacter + +syn region informGlobalRegion matchgroup=informType start="\" matchgroup=NONE skip=+!.*$\|".*"\|'.*'+ end=";" contains=ALLBUT,informGramPreProc,informPredicate,informGrammar,informAsm,informAsmObsolete + +syn keyword informGramPreProc contained Verb Extend + +if !exists("inform_highlight_simple") + syn keyword informLibAttrib absent animate clothing concealed container + syn keyword informLibAttrib door edible enterable female general light + syn keyword informLibAttrib lockable locked male moved neuter on open + syn keyword informLibAttrib openable pluralname proper scenery scored + syn keyword informLibAttrib static supporter switchable talkable + syn keyword informLibAttrib visited workflag worn + syn match informLibAttrib "\" + + syn keyword informLibProp e_to se_to s_to sw_to w_to nw_to n_to ne_to + syn keyword informLibProp u_to d_to in_to out_to before after life + syn keyword informLibProp door_to with_key door_dir invent plural + syn keyword informLibProp add_to_scope list_together react_before + syn keyword informLibProp react_after grammar orders initial when_open + syn keyword informLibProp when_closed when_on when_off description + syn keyword informLibProp describe article cant_go found_in time_left + syn keyword informLibProp number time_out daemon each_turn capacity + syn keyword informLibProp name short_name short_name_indef parse_name + syn keyword informLibProp articles inside_description + if !exists("inform_highlight_old") + syn keyword informLibProp compass_look before_implicit + syn keyword informLibProp ext_initialise ext_messages + endif + + syn keyword informLibObj e_obj se_obj s_obj sw_obj w_obj nw_obj n_obj + syn keyword informLibObj ne_obj u_obj d_obj in_obj out_obj compass + syn keyword informLibObj thedark selfobj player location second actor + syn keyword informLibObj noun + if !exists("inform_highlight_old") + syn keyword informLibObj LibraryExtensions + endif + + syn keyword informLibRoutine Achieved AfterRoutines AddToScope + syn keyword informLibRoutine AllowPushDir Banner ChangeDefault + syn keyword informLibRoutine ChangePlayer CommonAncestor DictionaryLookup + syn keyword informLibRoutine DisplayStatus DoMenu DrawStatusLine + syn keyword informLibRoutine EnglishNumber HasLightSource GetGNAOfObject + syn keyword informLibRoutine IndirectlyContains IsSeeThrough Locale + syn keyword informLibRoutine LoopOverScope LTI_Insert MoveFloatingObjects + syn keyword informLibRoutine NextWord NextWordStopped NounDomain + syn keyword informLibRoutine ObjectIsUntouchable OffersLight ParseToken + syn keyword informLibRoutine PlaceInScope PlayerTo PrintShortName + syn keyword informLibRoutine PronounNotice ScopeWithin SetPronoun SetTime + syn keyword informLibRoutine StartDaemon StartTimer StopDaemon StopTimer + syn keyword informLibRoutine TestScope TryNumber UnsignedCompare + syn keyword informLibRoutine WordAddress WordInProperty WordLength + syn keyword informLibRoutine WriteListFrom YesOrNo ZRegion RunRoutines + syn keyword informLibRoutine AfterLife AfterPrompt Amusing BeforeParsing + syn keyword informLibRoutine ChooseObjects DarkToDark DeathMessage + syn keyword informLibRoutine GamePostRoutine GamePreRoutine Initialise + syn keyword informLibRoutine InScope LookRoutine NewRoom ParseNoun + syn keyword informLibRoutine ParseNumber ParserError PrintRank PrintVerb + syn keyword informLibRoutine PrintTaskName TimePasses UnknownVerb + if exists("inform_highlight_glulx") + syn keyword informLibRoutine IdentifyGlkObject HandleGlkEvent + syn keyword informLibRoutine InitGlkWindow + endif + if !exists("inform_highlight_old") + syn keyword informLibRoutine KeyCharPrimitive KeyDelay ClearScreen + syn keyword informLibRoutine MoveCursor MainWindow StatusLineHeight + syn keyword informLibRoutine ScreenWidth ScreenHeight SetColour + syn keyword informLibRoutine DecimalNumber PrintToBuffer Length + syn keyword informLibRoutine UpperCase LowerCase PrintCapitalised + syn keyword informLibRoutine Cap Centre + if exists("inform_highlight_glulx") + syn keyword informLibRoutine PrintAnything PrintAnyToArray + endif + endif + + syn keyword informLibAction Quit Restart Restore Verify Save + syn keyword informLibAction ScriptOn ScriptOff Pronouns Score + syn keyword informLibAction Fullscore LMode1 LMode2 LMode3 + syn keyword informLibAction NotifyOn NotifyOff Version Places + syn keyword informLibAction Objects TraceOn TraceOff TraceLevel + syn keyword informLibAction ActionsOn ActionsOff RoutinesOn + syn keyword informLibAction RoutinesOff TimersOn TimersOff + syn keyword informLibAction CommandsOn CommandsOff CommandsRead + syn keyword informLibAction Predictable XPurloin XAbstract XTree + syn keyword informLibAction Scope Goto Gonear Inv InvTall InvWide + syn keyword informLibAction Take Drop Remove PutOn Insert Transfer + syn keyword informLibAction Empty Enter Exit GetOff Go Goin Look + syn keyword informLibAction Examine Search Give Show Unlock Lock + syn keyword informLibAction SwitchOn SwitchOff Open Close Disrobe + syn keyword informLibAction Wear Eat Yes No Burn Pray Wake + syn keyword informLibAction WakeOther Consult Kiss Think Smell + syn keyword informLibAction Listen Taste Touch Dig Cut Jump + syn keyword informLibAction JumpOver Tie Drink Fill Sorry Strong + syn keyword informLibAction Mild Attack Swim Swing Blow Rub Set + syn keyword informLibAction SetTo WaveHands Wave Pull Push PushDir + syn keyword informLibAction Turn Squeeze LookUnder ThrowAt Tell + syn keyword informLibAction Answer Buy Ask AskFor Sing Climb Wait + syn keyword informLibAction Sleep LetGo Receive ThrownAt Order + syn keyword informLibAction TheSame PluralFound Miscellany Prompt + syn keyword informLibAction ChangesOn ChangesOff Showverb Showobj + syn keyword informLibAction EmptyT VagueGo + if exists("inform_highlight_glulx") + syn keyword informLibAction GlkList + endif + + syn keyword informLibVariable keep_silent deadflag action special_number + syn keyword informLibVariable consult_from consult_words etype verb_num + syn keyword informLibVariable verb_word the_time real_location c_style + syn keyword informLibVariable parser_one parser_two listing_together wn + syn keyword informLibVariable parser_action scope_stage scope_reason + syn keyword informLibVariable action_to_be menu_item item_name item_width + syn keyword informLibVariable lm_o lm_n inventory_style task_scores + syn keyword informLibVariable inventory_stage + + syn keyword informLibConst AMUSING_PROVIDED DEBUG Headline MAX_CARRIED + syn keyword informLibConst MAX_SCORE MAX_TIMERS NO_PLACES NUMBER_TASKS + syn keyword informLibConst OBJECT_SCORE ROOM_SCORE SACK_OBJECT Story + syn keyword informLibConst TASKS_PROVIDED WITHOUT_DIRECTIONS + syn keyword informLibConst NEWLINE_BIT INDENT_BIT FULLINV_BIT ENGLISH_BIT + syn keyword informLibConst RECURSE_BIT ALWAYS_BIT TERSE_BIT PARTINV_BIT + syn keyword informLibConst DEFART_BIT WORKFLAG_BIT ISARE_BIT CONCEAL_BIT + syn keyword informLibConst PARSING_REASON TALKING_REASON EACHTURN_REASON + syn keyword informLibConst REACT_BEFORE_REASON REACT_AFTER_REASON + syn keyword informLibConst TESTSCOPE_REASON LOOPOVERSCOPE_REASON + syn keyword informLibConst STUCK_PE UPTO_PE NUMBER_PE CANTSEE_PE TOOLIT_PE + syn keyword informLibConst NOTHELD_PE MULTI_PE MMULTI_PE VAGUE_PE EXCEPT_PE + syn keyword informLibConst ANIMA_PE VERB_PE SCENERY_PE ITGONE_PE + syn keyword informLibConst JUNKAFTER_PE TOOFEW_PE NOTHING_PE ASKSCOPE_PE + if !exists("inform_highlight_old") + syn keyword informLibConst WORDSIZE TARGET_ZCODE TARGET_GLULX + syn keyword informLibConst LIBRARY_PARSER LIBRARY_VERBLIB LIBRARY_GRAMMAR + syn keyword informLibConst LIBRARY_ENGLISH NO_SCORE START_MOVE + syn keyword informLibConst CLR_DEFAULT CLR_BLACK CLR_RED CLR_GREEN + syn keyword informLibConst CLR_YELLOW CLR_BLUE CLR_MAGENTA CLR_CYAN + syn keyword informLibConst CLR_WHITE CLR_PURPLE CLR_AZURE + syn keyword informLibConst WIN_ALL WIN_MAIN WIN_STATUS + endif +endif + +" Now the case sensitive stuff. + +syntax case match + +syn keyword informSysFunc child children elder indirect parent random +syn keyword informSysFunc sibling younger youngest metaclass +if exists("inform_highlight_glulx") + syn keyword informSysFunc glk +endif + +syn keyword informSysConst adjectives_table actions_table classes_table +syn keyword informSysConst identifiers_table preactions_table version_number +syn keyword informSysConst largest_object strings_offset code_offset +syn keyword informSysConst dict_par1 dict_par2 dict_par3 +syn keyword informSysConst actual_largest_object static_memory_offset +syn keyword informSysConst array_names_offset readable_memory_offset +syn keyword informSysConst cpv__start cpv__end ipv__start ipv__end +syn keyword informSysConst array__start array__end lowest_attribute_number +syn keyword informSysConst highest_attribute_number attribute_names_array +syn keyword informSysConst lowest_property_number highest_property_number +syn keyword informSysConst property_names_array lowest_action_number +syn keyword informSysConst highest_action_number action_names_array +syn keyword informSysConst lowest_fake_action_number highest_fake_action_number +syn keyword informSysConst fake_action_names_array lowest_routine_number +syn keyword informSysConst highest_routine_number routines_array +syn keyword informSysConst routine_names_array routine_flags_array +syn keyword informSysConst lowest_global_number highest_global_number globals_array +syn keyword informSysConst global_names_array global_flags_array +syn keyword informSysConst lowest_array_number highest_array_number arrays_array +syn keyword informSysConst array_names_array array_flags_array lowest_constant_number +syn keyword informSysConst highest_constant_number constants_array constant_names_array +syn keyword informSysConst lowest_class_number highest_class_number class_objects_array +syn keyword informSysConst lowest_object_number highest_object_number +if !exists("inform_highlight_old") + syn keyword informSysConst sys_statusline_flag +endif + +syn keyword informConditional default else if switch + +syn keyword informRepeat break continue do for objectloop until while + +syn keyword informStatement box font give inversion jump move new_line +syn keyword informStatement print print_ret quit read remove restore return +syn keyword informStatement rfalse rtrue save spaces string style + +syn keyword informOperator roman reverse bold underline fixed on off to +syn keyword informOperator near from + +syn keyword informKeyword dictionary symbols objects verbs assembly +syn keyword informKeyword expressions lines tokens linker on off alias long +syn keyword informKeyword additive score time string table +syn keyword informKeyword with private has class error fatalerror +syn keyword informKeyword warning self +if !exists("inform_highlight_old") + syn keyword informKeyword buffer +endif + +syn keyword informMetaAttrib remaining create destroy recreate copy call +syn keyword informMetaAttrib print_to_array + +syn keyword informPredicate has hasnt in notin ofclass or +syn keyword informPredicate provides + +syn keyword informGrammar contained noun held multi multiheld multiexcept +syn keyword informGrammar contained multiinside creature special number +syn keyword informGrammar contained scope topic reverse meta only replace +syn keyword informGrammar contained first last + +syn keyword informKeywordObsolete contained initial data initstr + +syn keyword informTodo contained TODO + +" Assembly language mnemonics must be preceded by a '@'. + +syn match informAsmContainer "@\s*\k*" contains=informAsm,informAsmObsolete + +if exists("inform_highlight_glulx") + syn keyword informAsm contained nop add sub mul div mod neg bitand bitor + syn keyword informAsm contained bitxor bitnot shiftl sshiftr ushiftr jump jz + syn keyword informAsm contained jnz jeq jne jlt jge jgt jle jltu jgeu jgtu + syn keyword informAsm contained jleu call return catch throw tailcall copy + syn keyword informAsm contained copys copyb sexs sexb aload aloads aloadb + syn keyword informAsm contained aloadbit astore astores astoreb astorebit + syn keyword informAsm contained stkcount stkpeek stkswap stkroll stkcopy + syn keyword informAsm contained streamchar streamnum streamstr gestalt + syn keyword informAsm contained debugtrap getmemsize setmemsize jumpabs + syn keyword informAsm contained random setrandom quit verify restart save + syn keyword informAsm contained restore saveundo restoreundo protect glk + syn keyword informAsm contained getstringtbl setstringtbl getiosys setiosys + syn keyword informAsm contained linearsearch binarysearch linkedsearch + syn keyword informAsm contained callf callfi callfii callfiii +else + syn keyword informAsm contained je jl jg dec_chk inc_chk jin test or and + syn keyword informAsm contained test_attr set_attr clear_attr store + syn keyword informAsm contained insert_obj loadw loadb get_prop + syn keyword informAsm contained get_prop_addr get_next_prop add sub mul div + syn keyword informAsm contained mod call storew storeb put_prop sread + syn keyword informAsm contained print_num random push pull + syn keyword informAsm contained split_window set_window output_stream + syn keyword informAsm contained input_stream sound_effect jz get_sibling + syn keyword informAsm contained get_child get_parent get_prop_len inc dec + syn keyword informAsm contained remove_obj print_obj ret jump + syn keyword informAsm contained load not rtrue rfalse print + syn keyword informAsm contained print_ret nop save restore restart + syn keyword informAsm contained ret_popped pop quit new_line show_status + syn keyword informAsm contained verify call_2s call_vs aread call_vs2 + syn keyword informAsm contained erase_window erase_line set_cursor get_cursor + syn keyword informAsm contained set_text_style buffer_mode read_char + syn keyword informAsm contained scan_table call_1s call_2n set_colour throw + syn keyword informAsm contained call_vn call_vn2 tokenise encode_text + syn keyword informAsm contained copy_table print_table check_arg_count + syn keyword informAsm contained call_1n catch piracy log_shift art_shift + syn keyword informAsm contained set_font save_undo restore_undo draw_picture + syn keyword informAsm contained picture_data erase_picture set_margins + syn keyword informAsm contained move_window window_size window_style + syn keyword informAsm contained get_wind_prop scroll_window pop_stack + syn keyword informAsm contained read_mouse mouse_window push_stack + syn keyword informAsm contained put_wind_prop print_form make_menu + syn keyword informAsm contained picture_table + if !exists("inform_highlight_old") + syn keyword informAsm contained check_unicode print_unicode + endif + syn keyword informAsmObsolete contained print_paddr print_addr print_char +endif + +" Handling for different versions of VIM. + +if version >= 600 + setlocal iskeyword+=$ + command -nargs=+ SynDisplay syntax display +else + set iskeyword+=$ + command -nargs=+ SynDisplay syntax +endif + +" Grammar sections. + +syn region informGrammarSection matchgroup=informGramPreProc start="\" skip=+".*"+ end=";"he=e-1 contains=ALLBUT,informAsm + +" Special character forms. + +SynDisplay match informBadAccent contained "@[^{[:digit:]]\D" +SynDisplay match informBadAccent contained "@{[^}]*}" +SynDisplay match informAccent contained "@:[aouAOUeiyEI]" +SynDisplay match informAccent contained "@'[aeiouyAEIOUY]" +SynDisplay match informAccent contained "@`[aeiouAEIOU]" +SynDisplay match informAccent contained "@\^[aeiouAEIOU]" +SynDisplay match informAccent contained "@\~[anoANO]" +SynDisplay match informAccent contained "@/[oO]" +SynDisplay match informAccent contained "@ss\|@<<\|@>>\|@oa\|@oA\|@ae\|@AE\|@cc\|@cC" +SynDisplay match informAccent contained "@th\|@et\|@Th\|@Et\|@LL\|@oe\|@OE\|@!!\|@??" +SynDisplay match informAccent contained "@{\x\{1,4}}" +SynDisplay match informBadStrUnicode contained "@@\D" +SynDisplay match informStringUnicode contained "@@\d\+" +SynDisplay match informStringCode contained "@\d\d" + +" String and Character constants. Ordering is important here. +syn region informString start=+"+ skip=+\\\\+ end=+"+ contains=informAccent,informStringUnicode,informStringCode,informBadAccent,informBadStrUnicode +syn region informDictString start="'" end="'" contains=informAccent,informBadAccent +SynDisplay match informBadDictString "''" +SynDisplay match informDictString "'''" + +" Integer numbers: decimal, hexadecimal and binary. +SynDisplay match informNumber "\<\d\+\>" +SynDisplay match informNumber "\<\$\x\+\>" +SynDisplay match informNumber "\<\$\$[01]\+\>" + +" Comments +syn match informComment "!.*" contains=informTodo + +" Syncronization +syn sync match informSyncStringEnd grouphere NONE /"[;,]\s*$/ +syn sync match informSyncRoutineEnd grouphere NONE /][;,]\s*$/ +syn sync match informSyncCommentEnd grouphere NONE /^\s*!.*$/ +syn sync match informSyncRoutine groupthere informGrammarSection "\" +syn sync maxlines=500 + +delcommand SynDisplay + +" The default highlighting. +if version >= 508 || !exists("did_inform_syn_inits") + if version < 508 + let did_inform_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink informDefine Define + HiLink informType Type + HiLink informInclude Include + HiLink informPreCondit PreCondit + HiLink informPreProc PreProc + HiLink informGramPreProc PreProc + HiLink informAsm Special + if !exists("inform_suppress_obsolete") + HiLink informAsmObsolete informError + HiLink informKeywordObsolete informError + else + HiLink informAsmObsolete Special + HiLink informKeywordObsolete Keyword + endif + HiLink informPredicate Operator + HiLink informSysFunc Identifier + HiLink informSysConst Identifier + HiLink informConditional Conditional + HiLink informRepeat Repeat + HiLink informStatement Statement + HiLink informOperator Operator + HiLink informKeyword Keyword + HiLink informGrammar Keyword + HiLink informDictString String + HiLink informNumber Number + HiLink informError Error + HiLink informString String + HiLink informComment Comment + HiLink informAccent Special + HiLink informStringUnicode Special + HiLink informStringCode Special + HiLink informTodo Todo + if !exists("inform_highlight_simple") + HiLink informLibAttrib Identifier + HiLink informLibProp Identifier + HiLink informLibObj Identifier + HiLink informLibRoutine Identifier + HiLink informLibVariable Identifier + HiLink informLibConst Identifier + HiLink informLibAction Identifier + endif + HiLink informBadDictString informError + HiLink informBadAccent informError + HiLink informBadStrUnicode informError + + delcommand HiLink +endif + +let b:current_syntax = "inform" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/initex.vim b/vim/bundle/ubuntu-vim72/syntax/initex.vim new file mode 100644 index 0000000..8f3462f --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/initex.vim @@ -0,0 +1,376 @@ +" Vim syntax file +" Language: TeX (core definition) +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" This follows the grouping (sort of) found at +" http://www.tug.org/utilities/plain/cseq.html#top-fam + +syn keyword initexTodo TODO FIXME XXX NOTE + +syn match initexComment display contains=initexTodo + \ '\\\@' + +syn cluster initexBox + \ contains=initexBoxCommand,initexBoxInternalQuantity, + \ initexBoxParameterDimen,initexBoxParameterInteger, + \ initexBoxParameterToken + +syn cluster initexCharacter + \ contains=initexCharacterCommand,initexCharacterInternalQuantity, + \ initexCharacterParameterInteger + +syn cluster initexDebugging + \ contains=initexDebuggingCommand,initexDebuggingParameterInteger, + \ initexDebuggingParameterToken + +syn cluster initexFileIO + \ contains=initexFileIOCommand,initexFileIOInternalQuantity, + \ initexFileIOParameterToken + +syn cluster initexFonts + \ contains=initexFontsCommand,initexFontsInternalQuantity + +syn cluster initexGlue + \ contains=initexGlueCommand,initexGlueDerivedCommand + +syn cluster initexHyphenation + \ contains=initexHyphenationCommand,initexHyphenationDerivedCommand, + \ initexHyphenationInternalQuantity,initexHyphenationParameterInteger + +syn cluster initexInserts + \ contains=initexInsertsCommand,initexInsertsParameterDimen, + \ initexInsertsParameterGlue,initexInsertsParameterInteger + +syn cluster initexJob + \ contains=initexJobCommand,initexJobInternalQuantity, + \ initexJobParameterInteger + +syn cluster initexKern + \ contains=initexKernCommand,initexKernInternalQuantity + +syn cluster initexLogic + \ contains=initexLogicCommand + +syn cluster initexMacro + \ contains=initexMacroCommand,initexMacroDerivedCommand, + \ initexMacroParameterInteger + +syn cluster initexMarks + \ contains=initexMarksCommand + +syn cluster initexMath + \ contains=initexMathCommand,initexMathDerivedCommand, + \ initexMathInternalQuantity,initexMathParameterDimen, + \ initexMathParameterGlue,initexMathParameterInteger, + \ initexMathParameterMuglue,initexMathParameterToken + +syn cluster initexPage + \ contains=initexPageInternalQuantity,initexPageParameterDimen, + \ initexPageParameterGlue + +syn cluster initexParagraph + \ contains=initexParagraphCommand,initexParagraphInternalQuantity, + \ initexParagraphParameterDimen,initexParagraphParameterGlue, + \ initexParagraphParameterInteger,initexParagraphParameterToken + +syn cluster initexPenalties + \ contains=initexPenaltiesCommand,initexPenaltiesInternalQuantity, + \ initexPenaltiesParameterInteger + +syn cluster initexRegisters + \ contains=initexRegistersCommand,initexRegistersInternalQuantity + +syn cluster initexTables + \ contains=initexTablesCommand,initexTablesParameterGlue, + \ initexTablesParameterToken + +syn cluster initexCommand + \ contains=initexBoxCommand,initexCharacterCommand, + \ initexDebuggingCommand,initexFileIOCommand, + \ initexFontsCommand,initexGlueCommand, + \ initexHyphenationCommand,initexInsertsCommand, + \ initexJobCommand,initexKernCommand,initexLogicCommand, + \ initexMacroCommand,initexMarksCommand,initexMathCommand, + \ initexParagraphCommand,initexPenaltiesCommand,initexRegistersCommand, + \ initexTablesCommand + +syn match initexBoxCommand display contains=@NoSpell + \ '\\\%([hv]\=box\|[cx]\=leaders\|copy\|[hv]rule\|lastbox\|setbox\|un[hv]\%(box\|copy\)\|vtop\)\>' +syn match initexCharacterCommand display contains=@NoSpell + \ '\\\%([] ]\|\%(^^M\|accent\|char\|\%(lower\|upper\)case\|number\|romannumeral\|string\)\>\)' +syn match initexDebuggingCommand display contains=@NoSpell + \ '\\\%(\%(batch\|\%(non\|error\)stop\|scroll\)mode\|\%(err\)\=message\|meaning\|show\%(box\%(breadth\|depth\)\=\|lists\|the\)\)\>' +syn match initexFileIOCommand display contains=@NoSpell + \ '\\\%(\%(close\|open\)\%(in\|out\)\|endinput\|immediate\|input\|read\|shipout\|special\|write\)\>' +syn match initexFontsCommand display contains=@NoSpell + \ '\\\%(/\|fontname\)\>' +syn match initexGlueCommand display contains=@NoSpell + \ '\\\%([hv]\|un\)skip\>' +syn match initexHyphenationCommand display contains=@NoSpell + \ '\\\%(discretionary\|hyphenation\|patterns\|setlanguage\)\>' +syn match initexInsertsCommand display contains=@NoSpell + \ '\\\%(insert\|split\%(bot\|first\)mark\|vsplit\)\>' +syn match initexJobCommand display contains=@NoSpell + \ '\\\%(dump\|end\|jobname\)\>' +syn match initexKernCommand display contains=@NoSpell + \ '\\\%(kern\|lower\|move\%(left\|right\)\|raise\|unkern\)\>' +syn match initexLogicCommand display contains=@NoSpell + \ '\\\%(else\|fi\|if[a-zA-Z@]\+\|or\)\>' +" \ '\\\%(else\|fi\|if\%(case\|cat\|dim\|eof\|false\|[hv]box\|[hmv]mode\|inner\|num\|odd\|true\|void\|x\)\=\|or\)\>' +syn match initexMacroCommand display contains=@NoSpell + \ '\\\%(after\%(assignment\|group\)\|\%(begin\|end\)group\|\%(end\)\=csname\|e\=def\|expandafter\|futurelet\|global\|let\|long\|noexpand\|outer\|relax\|the\)\>' +syn match initexMarksCommand display contains=@NoSpell + \ '\\\%(bot\|first\|top\)\=mark\>' +syn match initexMathCommand display contains=@NoSpell + \ '\\\%(abovewithdelims\|delimiter\|display\%(limits\|style\)\|l\=eqno\|left\|\%(no\)\=limits\|math\%(accent\|bin\|char\|choice\|close\|code\|inner\|op\|open\|ord\|punct\|rel\)\|mkern\|mskip\|muskipdef\|nonscript\|\%(over\|under\)line\|radical\|right\|\%(\%(script\)\{1,2}\|text\)style\|vcenter\)\>' +syn match initexParagraphCommand display contains=@NoSpell + \ '\\\%(ignorespaces\|indent\|no\%(boundary\|indent\)\|par\|vadjust\)\>' +syn match initexPenaltiesCommand display contains=@NoSpell + \ '\\\%(un\)\=penalty\>' +syn match initexRegistersCommand display contains=@NoSpell + \ '\\\%(advance\|\%(count\|dimen\|skip\|toks\)def\|divide\|multiply\)\>' +syn match initexTablesCommand display contains=@NoSpell + \ '\\\%(cr\|crcr\|[hv]align\|noalign\|omit\|span\)\>' + +syn cluster initexDerivedCommand + \ contains=initexGlueDerivedCommand,initexHyphenationDerivedCommand, + \ initexMacroDerivedCommand,initexMathDerivedCommand + +syn match initexGlueDerivedCommand display contains=@NoSpell + \ '\\\%([hv]fil\%(l\|neg\)\=\|[hv]ss\)\>' +syn match initexHyphenationDerivedCommand display contains=@NoSpell + \ '\\-' +syn match initexMacroDerivedCommand display contains=@NoSpell + \ '\\[gx]def\>' +syn match initexMathDerivedCommand display contains=@NoSpell + \ '\\\%(above\|atop\%(withdelims\)\=\|mathchardef\|over\|overwithdelims\)\>' + +syn cluster initexInternalQuantity + \ contains=initexBoxInternalQuantity,initexCharacterInternalQuantity, + \ initexFileIOInternalQuantity,initexFontsInternalQuantity, + \ initexHyphenationInternalQuantity,initexJobInternalQuantity, + \ initexKernInternalQuantity,initexMathInternalQuantity, + \ initexPageInternalQuantity,initexParagraphInternalQuantity, + \ initexPenaltiesInternalQuantity,initexRegistersInternalQuantity + +syn match initexBoxInternalQuantity display contains=@NoSpell + \ '\\\%(badness\|dp\|ht\|prevdepth\|wd\)\>' +syn match initexCharacterInternalQuantity display contains=@NoSpell + \ '\\\%(catcode\|chardef\|\%([ul]c\|sf\)code\)\>' +syn match initexFileIOInternalQuantity display contains=@NoSpell + \ '\\inputlineno\>' +syn match initexFontsInternalQuantity display contains=@NoSpell + \ '\\\%(font\%(dimen\)\=\|nullfont\)\>' +syn match initexHyphenationInternalQuantity display contains=@NoSpell + \ '\\hyphenchar\>' +syn match initexJobInternalQuantity display contains=@NoSpell + \ '\\deadcycles\>' +syn match initexKernInternalQuantity display contains=@NoSpell + \ '\\lastkern\>' +syn match initexMathInternalQuantity display contains=@NoSpell + \ '\\\%(delcode\|mathcode\|muskip\|\%(\%(script\)\{1,2}\|text\)font\|skewchar\)\>' +syn match initexPageInternalQuantity display contains=@NoSpell + \ '\\page\%(depth\|fil\{1,3}stretch\|goal\|shrink\|stretch\|total\)\>' +syn match initexParagraphInternalQuantity display contains=@NoSpell + \ '\\\%(prevgraf\|spacefactor\)\>' +syn match initexPenaltiesInternalQuantity display contains=@NoSpell + \ '\\lastpenalty\>' +syn match initexRegistersInternalQuantity display contains=@NoSpell + \ '\\\%(count\|dimen\|skip\|toks\)\d\+\>' + +syn cluster initexParameterDimen + \ contains=initexBoxParameterDimen,initexInsertsParameterDimen, + \ initexMathParameterDimen,initexPageParameterDimen, + \ initexParagraphParameterDimen + +syn match initexBoxParameterDimen display contains=@NoSpell + \ '\\\%(boxmaxdepth\|[hv]fuzz\|overfullrule\)\>' +syn match initexInsertsParameterDimen display contains=@NoSpell + \ '\\splitmaxdepth\>' +syn match initexMathParameterDimen display contains=@NoSpell + \ '\\\%(delimitershortfall\|display\%(indent\|width\)\|mathsurround\|nulldelimiterspace\|predisplaysize\|scriptspace\)\>' +syn match initexPageParameterDimen display contains=@NoSpell + \ '\\\%([hv]offset\|maxdepth\|vsize\)\>' +syn match initexParagraphParameterDimen display contains=@NoSpell + \ '\\\%(emergencystretch\|\%(hang\|par\)indent\|hsize\|lineskiplimit\)\>' + +syn cluster initexParameterGlue + \ contains=initexInsertsParameterGlue,initexMathParameterGlue, + \ initexPageParameterGlue,initexParagraphParameterGlue, + \ initexTablesParameterGlue + +syn match initexInsertsParameterGlue display contains=@NoSpell + \ '\\splittopskip\>' +syn match initexMathParameterGlue display contains=@NoSpell + \ '\\\%(above\|below\)display\%(short\)\=skip\>' +syn match initexPageParameterGlue display contains=@NoSpell + \ '\\topskip\>' +syn match initexParagraphParameterGlue display contains=@NoSpell + \ '\\\%(baseline\|left\|line\|par\%(fill\)\=\|right\|x\=space\)skip\>' +syn match initexTablesParameterGlue display contains=@NoSpell + \ '\\tabskip\>' + +syn cluster initexParameterInteger + \ contains=initexBoxParameterInteger,initexCharacterParameterInteger, + \ initexDebuggingParameterInteger,initexHyphenationParameterInteger, + \ initexInsertsParameterInteger,initexJobParameterInteger, + \ initexMacroParameterInteger,initexMathParameterInteger, + \ initexParagraphParameterInteger,initexPenaltiesParameterInteger, + +syn match initexBoxParameterInteger display contains=@NoSpell + \ '\\[hv]badness\>' +syn match initexCharacterParameterInteger display contains=@NoSpell + \ '\\\%(\%(endline\|escape\|newline\)char\)\>' +syn match initexDebuggingParameterInteger display contains=@NoSpell + \ '\\\%(errorcontextlines\|pausing\|tracing\%(commands\|lostchars\|macros\|online\|output\|pages\|paragraphs\|restores|stats\)\)\>' +syn match initexHyphenationParameterInteger display contains=@NoSpell + \ '\\\%(defaulthyphenchar\|language\|\%(left\|right\)hyphenmin\|uchyph\)\>' +syn match initexInsertsParameterInteger display contains=@NoSpell + \ '\\\%(holdinginserts\)\>' +syn match initexJobParameterInteger display contains=@NoSpell + \ '\\\%(day\|mag\|maxdeadcycles\|month\|time\|year\)\>' +syn match initexMacroParameterInteger display contains=@NoSpell + \ '\\globaldefs\>' +syn match initexMathParameterInteger display contains=@NoSpell + \ '\\\%(binoppenalty\|defaultskewchar\|delimiterfactor\|displaywidowpenalty\|fam\|\%(post\|pre\)displaypenalty\|relpenalty\)\>' +syn match initexParagraphParameterInteger display contains=@NoSpell + \ '\\\%(\%(adj\|\%(double\|final\)hyphen\)demerits\|looseness\|\%(pre\)\=tolerance\)\>' +syn match initexPenaltiesParameterInteger display contains=@NoSpell + \ '\\\%(broken\|club\|exhyphen\|floating\|hyphen\|interline\|line\|output\|widow\)penalty\>' + +syn cluster initexParameterMuglue + \ contains=initexMathParameterMuglue + +syn match initexMathParameterMuglue display contains=@NoSpell + \ '\\\%(med\|thick\|thin\)muskip\>' + +syn cluster initexParameterDimen + \ contains=initexBoxParameterToken,initexDebuggingParameterToken, + \ initexFileIOParameterToken,initexMathParameterToken, + \ initexParagraphParameterToken,initexTablesParameterToken + +syn match initexBoxParameterToken display contains=@NoSpell + \ '\\every[hv]box\>' +syn match initexDebuggingParameterToken display contains=@NoSpell + \ '\\errhelp\>' +syn match initexFileIOParameterToken display contains=@NoSpell + \ '\\output\>' +syn match initexMathParameterToken display contains=@NoSpell + \ '\\every\%(display\|math\)\>' +syn match initexParagraphParameterToken display contains=@NoSpell + \ '\\everypar\>' +syn match initexTablesParameterToken display contains=@NoSpell + \ '\\everycr\>' + + +hi def link initexCharacter Character +hi def link initexNumber Number + +hi def link initexIdentifier Identifier + +hi def link initexStatement Statement +hi def link initexConditional Conditional + +hi def link initexPreProc PreProc +hi def link initexMacro Macro + +hi def link initexType Type + +hi def link initexDebug Debug + +hi def link initexTodo Todo +hi def link initexComment Comment +hi def link initexDimension initexNumber + +hi def link initexCommand initexStatement +hi def link initexBoxCommand initexCommand +hi def link initexCharacterCommand initexCharacter +hi def link initexDebuggingCommand initexDebug +hi def link initexFileIOCommand initexCommand +hi def link initexFontsCommand initexType +hi def link initexGlueCommand initexCommand +hi def link initexHyphenationCommand initexCommand +hi def link initexInsertsCommand initexCommand +hi def link initexJobCommand initexPreProc +hi def link initexKernCommand initexCommand +hi def link initexLogicCommand initexConditional +hi def link initexMacroCommand initexMacro +hi def link initexMarksCommand initexCommand +hi def link initexMathCommand initexCommand +hi def link initexParagraphCommand initexCommand +hi def link initexPenaltiesCommand initexCommand +hi def link initexRegistersCommand initexCommand +hi def link initexTablesCommand initexCommand + +hi def link initexDerivedCommand initexStatement +hi def link initexGlueDerivedCommand initexDerivedCommand +hi def link initexHyphenationDerivedCommand initexDerivedCommand +hi def link initexMacroDerivedCommand initexDerivedCommand +hi def link initexMathDerivedCommand initexDerivedCommand + +hi def link initexInternalQuantity initexIdentifier +hi def link initexBoxInternalQuantity initexInternalQuantity +hi def link initexCharacterInternalQuantity initexInternalQuantity +hi def link initexFileIOInternalQuantity initexInternalQuantity +hi def link initexFontsInternalQuantity initexInternalQuantity +hi def link initexHyphenationInternalQuantity initexInternalQuantity +hi def link initexJobInternalQuantity initexInternalQuantity +hi def link initexKernInternalQuantity initexInternalQuantity +hi def link initexMathInternalQuantity initexInternalQuantity +hi def link initexPageInternalQuantity initexInternalQuantity +hi def link initexParagraphInternalQuantity initexInternalQuantity +hi def link initexPenaltiesInternalQuantity initexInternalQuantity +hi def link initexRegistersInternalQuantity initexInternalQuantity + +hi def link initexParameterDimen initexNumber +hi def link initexBoxParameterDimen initexParameterDimen +hi def link initexInsertsParameterDimen initexParameterDimen +hi def link initexMathParameterDimen initexParameterDimen +hi def link initexPageParameterDimen initexParameterDimen +hi def link initexParagraphParameterDimen initexParameterDimen + +hi def link initexParameterGlue initexNumber +hi def link initexInsertsParameterGlue initexParameterGlue +hi def link initexMathParameterGlue initexParameterGlue +hi def link initexPageParameterGlue initexParameterGlue +hi def link initexParagraphParameterGlue initexParameterGlue +hi def link initexTablesParameterGlue initexParameterGlue + +hi def link initexParameterInteger initexNumber +hi def link initexBoxParameterInteger initexParameterInteger +hi def link initexCharacterParameterInteger initexParameterInteger +hi def link initexDebuggingParameterInteger initexParameterInteger +hi def link initexHyphenationParameterInteger initexParameterInteger +hi def link initexInsertsParameterInteger initexParameterInteger +hi def link initexJobParameterInteger initexParameterInteger +hi def link initexMacroParameterInteger initexParameterInteger +hi def link initexMathParameterInteger initexParameterInteger +hi def link initexParagraphParameterInteger initexParameterInteger +hi def link initexPenaltiesParameterInteger initexParameterInteger + +hi def link initexParameterMuglue initexNumber +hi def link initexMathParameterMuglue initexParameterMuglue + +hi def link initexParameterToken initexIdentifier +hi def link initexBoxParameterToken initexParameterToken +hi def link initexDebuggingParameterToken initexParameterToken +hi def link initexFileIOParameterToken initexParameterToken +hi def link initexMathParameterToken initexParameterToken +hi def link initexParagraphParameterToken initexParameterToken +hi def link initexTablesParameterToken initexParameterToken + +let b:current_syntax = "initex" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/initng.vim b/vim/bundle/ubuntu-vim72/syntax/initng.vim new file mode 100644 index 0000000..1a912c1 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/initng.vim @@ -0,0 +1,91 @@ +" Vim syntax file +" Language: initng .i files +" Maintainer: Elan Ruusamäe +" URL: http://glen.alkohol.ee/pld/initng/ +" License: GPL v2 +" Version: 0.13 +" Last Change: $Date: 2007/05/05 17:17:40 $ +" +" Syntax highlighting for initng .i files. Inherits from sh.vim and adds +" in the hiliting to start/stop {} blocks. Requires vim 6.3 or later. + +if &compatible || v:version < 603 + finish +endif + +if exists("b:current_syntax") + finish +endif + +syn case match + +let is_bash = 1 +unlet! b:current_syntax +syn include @shTop syntax/sh.vim + +syn region initngService matchgroup=initngServiceHeader start="^\s*\(service\|virtual\|daemon\|class\|cron\)\s\+\(\(\w\|[-/*]\)\+\(\s\+:\s\+\(\w\|[-/*]\)\+\)\?\)\s\+{" end="}" contains=@initngServiceCluster +syn cluster initngServiceCluster contains=initngComment,initngAction,initngServiceOption,initngServiceHeader,initngDelim,initngVariable + +syn region initngAction matchgroup=initngActionHeader start="^\s*\(script start\|script stop\|script run\)\s*=\s*{" end="}" contains=@initngActionCluster +syn cluster initngActionCluster contains=@shTop + +syn match initngDelim /[{}]/ contained + +syn region initngString start=/"/ end=/"/ skip=/\\"/ + +" option = value +syn match initngServiceOption /.\+\s*=.\+;/ contains=initngServiceKeywords,initngSubstMacro contained +" option without value +syn match initngServiceOption /\w\+;/ contains=initngServiceKeywords,initngSubstMacro contained + +" options with value +syn keyword initngServiceKeywords also_stop need use nice setuid contained +syn keyword initngServiceKeywords delay chdir suid sgid start_pause env_file env_parse pid_file pidfile contained +syn keyword initngServiceKeywords pid_of up_when_pid_set stdout stderr syncron just_before contained +syn keyword initngServiceKeywords provide lockfile daemon_stops_badly contained +syn match initngServiceKeywords /\(script\|exec\(_args\)\?\) \(start\|stop\|daemon\)/ contained +syn match initngServiceKeywords /env\s\+\w\+/ contained + +" rlimits +syn keyword initngServiceKeywords rlimit_cpu_hard rlimit_core_soft contained + +" single options +syn keyword initngServiceKeywords last respawn network_provider require_network require_file critical forks contained +" cron options +syn keyword initngServiceKeywords hourly contained +syn match initngVariable /\${\?\w\+\}\?/ + +" Substituted @foo@ macros: +" ========== +syn match initngSubstMacro /@[^@]\+@/ contained +syn cluster initngActionCluster add=initngSubstMacro +syn cluster shCommandSubList add=initngSubstMacro + +" Comments: +" ========== +syn cluster initngCommentGroup contains=initngTodo,@Spell +syn keyword initngTodo TODO FIXME XXX contained +syn match initngComment /#.*$/ contains=@initngCommentGroup + +" install_service #macros +" TODO: syntax check for ifd-endd pairs +" ========== +syn region initngDefine start="^#\(endd\|elsed\|exec\|ifd\|endexec\|endd\)\>" skip="\\$" end="$" end="#"me=s-1 +syn cluster shCommentGroup add=initngDefine +syn cluster initngCommentGroup add=initngDefine + +hi def link initngComment Comment +hi def link initngTodo Todo + +hi def link initngString String +hi def link initngServiceKeywords Define + +hi def link initngServiceHeader Keyword +hi def link initngActionHeader Type +hi def link initngDelim Delimiter + +hi def link initngVariable PreProc +hi def link initngSubstMacro Comment +hi def link initngDefine Macro + +let b:current_syntax = "initng" diff --git a/vim/bundle/ubuntu-vim72/syntax/inittab.vim b/vim/bundle/ubuntu-vim72/syntax/inittab.vim new file mode 100644 index 0000000..b7472f9 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/inittab.vim @@ -0,0 +1,75 @@ +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: SysV-compatible init process control file `inittab' +" Maintainer: David Ne\v{c}as (Yeti) +" Last Change: 2002-09-13 +" URL: http://physics.muni.cz/~yeti/download/syntax/inittab.vim + +" Setup +if version >= 600 + if exists("b:current_syntax") + finish + endif +else + syntax clear +endif + +syn case match + +" Base constructs +syn match inittabError "[^:]\+:"me=e-1 contained +syn match inittabError "[^:]\+$" contained +syn match inittabComment "^[#:].*$" contains=inittabFixme +syn match inittabComment "#.*$" contained contains=inittabFixme +syn keyword inittabFixme FIXME TODO XXX NOT + +" Shell +syn region inittabShString start=+"+ end=+"+ skip=+\\\\\|\\\"+ contained +syn region inittabShString start=+'+ end=+'+ contained +syn match inittabShOption "\s[-+][[:alnum:]]\+"ms=s+1 contained +syn match inittabShOption "\s--[:alnum:][-[:alnum:]]*"ms=s+1 contained +syn match inittabShCommand "/\S\+" contained +syn cluster inittabSh add=inittabShOption,inittabShString,inittabShCommand + +" Keywords +syn keyword inittabActionName respawn wait once boot bootwait off ondemand sysinit powerwait powerfail powerokwait powerfailnow ctrlaltdel kbrequest initdefault contained + +" Line parser +syn match inittabId "^[[:alnum:]~]\{1,4}" nextgroup=inittabColonRunLevels,inittabError +syn match inittabColonRunLevels ":" contained nextgroup=inittabRunLevels,inittabColonAction,inittabError +syn match inittabRunLevels "[0-6A-Ca-cSs]\+" contained nextgroup=inittabColonAction,inittabError +syn match inittabColonAction ":" contained nextgroup=inittabAction,inittabError +syn match inittabAction "\w\+" contained nextgroup=inittabColonProcess,inittabError contains=inittabActionName +syn match inittabColonProcess ":" contained nextgroup=inittabProcessPlus,inittabProcess,inittabError +syn match inittabProcessPlus "+" contained nextgroup=inittabProcess,inittabError +syn region inittabProcess start="/" end="$" transparent oneline contained contains=@inittabSh,inittabComment + +" Define the default highlighting +if version >= 508 || !exists("did_inittab_syntax_inits") + if version < 508 + let did_inittab_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink inittabComment Comment + HiLink inittabFixme Todo + HiLink inittabActionName Type + HiLink inittabError Error + HiLink inittabId Identifier + HiLink inittabRunLevels Special + + HiLink inittabColonProcess inittabColon + HiLink inittabColonAction inittabColon + HiLink inittabColonRunLevels inittabColon + HiLink inittabColon PreProc + + HiLink inittabShString String + HiLink inittabShOption Special + HiLink inittabShCommand Statement + + delcommand HiLink +endif + +let b:current_syntax = "inittab" diff --git a/vim/bundle/ubuntu-vim72/syntax/ipfilter.vim b/vim/bundle/ubuntu-vim72/syntax/ipfilter.vim new file mode 100644 index 0000000..db99812 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/ipfilter.vim @@ -0,0 +1,57 @@ +" ipfilter syntax file +" Language: ipfilter configuration file +" Maintainer: Hendrik Scholz +" Last Change: 2005 Jan 27 +" +" http://www.wormulon.net/files/misc/ipfilter.vim +" +" This will also work for OpenBSD pf but there might be some tags that are +" not correctly identified. +" Please send comments to hendrik@scholz.net + +" 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 + +" Comment +syn match IPFComment /#.*$/ contains=ipfTodo +syn keyword IPFTodo TODO XXX FIXME contained + +syn keyword IPFActionBlock block +syn keyword IPFActionPass pass +syn keyword IPFProto tcp udp icmp +syn keyword IPFSpecial quick log first +" how could we use keyword for words with '-' ? +syn match IPFSpecial /return-rst/ +syn match IPFSpecial /dup-to/ +"syn match IPFSpecial /icmp-type unreach/ +syn keyword IPFAny all any +syn match IPFIPv4 /\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ +syn match IPFNetmask /\/\d\+/ + +" service name constants +syn keyword IPFService auth bgp domain finger ftp http https ident +syn keyword IPFService imap irc isakmp kerberos mail nameserver nfs +syn keyword IPFService nntp ntp pop3 portmap pptp rpcbind rsync smtp +syn keyword IPFService snmp snmptrap socks ssh sunrpc syslog telnet +syn keyword IPFService tftp www + +" Comment +hi def link IPFComment Comment +hi def link IPFTodo Todo + +hi def link IPFService Constant + +hi def link IPFAction Type +hi def link ipfActionBlock String +hi def link ipfActionPass Type +hi def link IPFSpecial Statement +hi def link IPFIPv4 Label +hi def link IPFNetmask String +hi def link IPFAny Statement +hi def link IPFProto Identifier + diff --git a/vim/bundle/ubuntu-vim72/syntax/ishd.vim b/vim/bundle/ubuntu-vim72/syntax/ishd.vim new file mode 100644 index 0000000..1c011f1 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/ishd.vim @@ -0,0 +1,422 @@ +" Vim syntax file +" Language: InstallShield Script +" Maintainer: Robert M. Cortopassi +" Last Change: 2001 May 09 + +" 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 keyword ishdStatement abort begin case default downto else end +syn keyword ishdStatement endif endfor endwhile endswitch endprogram exit elseif +syn keyword ishdStatement error for function goto if +syn keyword ishdStatement program prototype return repeat string step switch +syn keyword ishdStatement struct then to typedef until while + +syn keyword ishdType BOOL BYREF CHAR GDI HWND INT KERNEL LIST LONG +syn keyword ishdType NUMBER POINTER SHORT STRING USER + +syn keyword ishdConstant _MAX_LENGTH _MAX_STRING +syn keyword ishdConstant AFTER ALLCONTENTS ALLCONTROLS APPEND ASKDESTPATH +syn keyword ishdConstant ASKOPTIONS ASKPATH ASKTEXT BATCH_INSTALL BACK +syn keyword ishdConstant BACKBUTTON BACKGROUND BACKGROUNDCAPTION BADPATH +syn keyword ishdConstant BADTAGFILE BASEMEMORY BEFORE BILLBOARD BINARY +syn keyword ishdConstant BITMAP256COLORS BITMAPFADE BITMAPICON BK_BLUE BK_GREEN +syn keyword ishdConstant BK_MAGENTA BK_MAGENTA1 BK_ORANGE BK_PINK BK_RED +syn keyword ishdConstant BK_SMOOTH BK_SOLIDBLACK BK_SOLIDBLUE BK_SOLIDGREEN +syn keyword ishdConstant BK_SOLIDMAGENTA BK_SOLIDORANGE BK_SOLIDPINK BK_SOLIDRED +syn keyword ishdConstant BK_SOLIDWHITE BK_SOLIDYELLOW BK_YELLOW BLACK BLUE +syn keyword ishdConstant BOOTUPDRIVE BUTTON_CHECKED BUTTON_ENTER BUTTON_UNCHECKED +syn keyword ishdConstant BUTTON_UNKNOWN CMDLINE COMMONFILES CANCEL CANCELBUTTON +syn keyword ishdConstant CC_ERR_FILEFORMATERROR CC_ERR_FILEREADERROR +syn keyword ishdConstant CC_ERR_NOCOMPONENTLIST CC_ERR_OUTOFMEMORY CDROM +syn keyword ishdConstant CDROM_DRIVE CENTERED CHANGEDIR CHECKBOX CHECKBOX95 +syn keyword ishdConstant CHECKLINE CHECKMARK CMD_CLOSE CMD_MAXIMIZE CMD_MINIMIZE +syn keyword ishdConstant CMD_PUSHDOWN CMD_RESTORE COLORMODE256 COLORS +syn keyword ishdConstant COMBOBOX_ENTER COMBOBOX_SELECT COMMAND COMMANDEX +syn keyword ishdConstant COMMON COMP_DONE COMP_ERR_CREATEDIR +syn keyword ishdConstant COMP_ERR_DESTCONFLICT COMP_ERR_FILENOTINLIB +syn keyword ishdConstant COMP_ERR_FILESIZE COMP_ERR_FILETOOLARGE +syn keyword ishdConstant COMP_ERR_HEADER COMP_ERR_INCOMPATIBLE +syn keyword ishdConstant COMP_ERR_INTPUTNOTCOMPRESSED COMP_ERR_INVALIDLIST +syn keyword ishdConstant COMP_ERR_LAUNCHSERVER COMP_ERR_MEMORY +syn keyword ishdConstant COMP_ERR_NODISKSPACE COMP_ERR_OPENINPUT +syn keyword ishdConstant COMP_ERR_OPENOUTPUT COMP_ERR_OPTIONS +syn keyword ishdConstant COMP_ERR_OUTPUTNOTCOMPRESSED COMP_ERR_SPLIT +syn keyword ishdConstant COMP_ERR_TARGET COMP_ERR_TARGETREADONLY COMP_ERR_WRITE +syn keyword ishdConstant COMP_INFO_ATTRIBUTE COMP_INFO_COMPSIZE COMP_INFO_DATE +syn keyword ishdConstant COMP_INFO_INVALIDATEPASSWORD COMP_INFO_ORIGSIZE +syn keyword ishdConstant COMP_INFO_SETPASSWORD COMP_INFO_TIME +syn keyword ishdConstant COMP_INFO_VERSIONLS COMP_INFO_VERSIONMS COMP_NORMAL +syn keyword ishdConstant COMP_UPDATE_DATE COMP_UPDATE_DATE_NEWER +syn keyword ishdConstant COMP_UPDATE_SAME COMP_UPDATE_VERSION COMPACT +syn keyword ishdConstant COMPARE_DATE COMPARE_SIZE COMPARE_VERSION +syn keyword ishdConstant COMPONENT_FIELD_CDROM_FOLDER +syn keyword ishdConstant COMPONENT_FIELD_DESCRIPTION COMPONENT_FIELD_DESTINATION +syn keyword ishdConstant COMPONENT_FIELD_DISPLAYNAME COMPONENT_FIELD_FILENEED +syn keyword ishdConstant COMPONENT_FIELD_FTPLOCATION +syn keyword ishdConstant COMPONENT_FIELD_HTTPLOCATION COMPONENT_FIELD_MISC +syn keyword ishdConstant COMPONENT_FIELD_OVERWRITE COMPONENT_FIELD_PASSWORD +syn keyword ishdConstant COMPONENT_FIELD_SELECTED COMPONENT_FIELD_SIZE +syn keyword ishdConstant COMPONENT_FIELD_STATUS COMPONENT_FIELD_VISIBLE +syn keyword ishdConstant COMPONENT_FILEINFO_COMPRESSED +syn keyword ishdConstant COMPONENT_FILEINFO_COMPRESSENGINE +syn keyword ishdConstant COMPONENT_FILEINFO_LANGUAGECOMPONENT_FILEINFO_OS +syn keyword ishdConstant COMPONENT_FILEINFO_POTENTIALLYLOCKED +syn keyword ishdConstant COMPONENT_FILEINFO_SELFREGISTERING +syn keyword ishdConstant COMPONENT_FILEINFO_SHARED COMPONENT_INFO_ATTRIBUTE +syn keyword ishdConstant COMPONENT_INFO_COMPSIZE COMPONENT_INFO_DATE +syn keyword ishdConstant COMPONENT_INFO_DATE_EX_EX COMPONENT_INFO_LANGUAGE +syn keyword ishdConstant COMPONENT_INFO_ORIGSIZE COMPONENT_INFO_OS +syn keyword ishdConstant COMPONENT_INFO_TIME COMPONENT_INFO_VERSIONLS +syn keyword ishdConstant COMPONENT_INFO_VERSIONMS COMPONENT_INFO_VERSIONSTR +syn keyword ishdConstant COMPONENT_VALUE_ALWAYSOVERWRITE +syn keyword ishdConstant COMPONENT_VALUE_CRITICAL +syn keyword ishdConstant COMPONENT_VALUE_HIGHLYRECOMMENDED +syn keyword ishdConstant COMPONENT_FILEINFO_LANGUAGE COMPONENT_FILEINFO_OS +syn keyword ishdConstant COMPONENT_VALUE_NEVEROVERWRITE +syn keyword ishdConstant COMPONENT_VALUE_NEWERDATE COMPONENT_VALUE_NEWERVERSION +syn keyword ishdConstant COMPONENT_VALUE_OLDERDATE COMPONENT_VALUE_OLDERVERSION +syn keyword ishdConstant COMPONENT_VALUE_SAMEORNEWDATE +syn keyword ishdConstant COMPONENT_VALUE_SAMEORNEWERVERSION +syn keyword ishdConstant COMPONENT_VALUE_STANDARD COMPONENT_VIEW_CHANGE +syn keyword ishdConstant COMPONENT_INFO_DATE_EX COMPONENT_VIEW_CHILDVIEW +syn keyword ishdConstant COMPONENT_VIEW_COMPONENT COMPONENT_VIEW_DESCRIPTION +syn keyword ishdConstant COMPONENT_VIEW_MEDIA COMPONENT_VIEW_PARENTVIEW +syn keyword ishdConstant COMPONENT_VIEW_SIZEAVAIL COMPONENT_VIEW_SIZETOTAL +syn keyword ishdConstant COMPONENT_VIEW_TARGETLOCATION COMPRESSHIGH COMPRESSLOW +syn keyword ishdConstant COMPRESSMED COMPRESSNONE CONTIGUOUS CONTINUE +syn keyword ishdConstant COPY_ERR_CREATEDIR COPY_ERR_NODISKSPACE +syn keyword ishdConstant COPY_ERR_OPENINPUT COPY_ERR_OPENOUTPUT +syn keyword ishdConstant COPY_ERR_TARGETREADONLY COPY_ERR_MEMORY +syn keyword ishdConstant CORECOMPONENTHANDLING CPU CUSTOM DATA_COMPONENT +syn keyword ishdConstant DATA_LIST DATA_NUMBER DATA_STRING DATE DEFAULT +syn keyword ishdConstant DEFWINDOWMODE DELETE_EOF DIALOG DIALOGCACHE +syn keyword ishdConstant DIALOGTHINFONT DIR_WRITEABLE DIRECTORY DISABLE DISK +syn keyword ishdConstant DISK_FREESPACE DISK_TOTALSPACE DISKID DLG_ASK_OPTIONS +syn keyword ishdConstant DLG_ASK_PATH DLG_ASK_TEXT DLG_ASK_YESNO DLG_CANCEL +syn keyword ishdConstant DLG_CDIR DLG_CDIR_MSG DLG_CENTERED DLG_CLOSE +syn keyword ishdConstant DLG_DIR_DIRECTORY DLG_DIR_FILE DLG_ENTER_DISK DLG_ERR +syn keyword ishdConstant DLG_ERR_ALREADY_EXISTS DLG_ERR_ENDDLG DLG_INFO_ALTIMAGE +syn keyword ishdConstant DLG_INFO_CHECKMETHOD DLG_INFO_CHECKSELECTION +syn keyword ishdConstant DLG_INFO_ENABLEIMAGE DLG_INFO_KUNITS +syn keyword ishdConstant DLG_INFO_USEDECIMAL DLG_INIT DLG_MSG_ALL +syn keyword ishdConstant DLG_MSG_INFORMATION DLG_MSG_NOT_HAND DLG_MSG_SEVERE +syn keyword ishdConstant DLG_MSG_STANDARD DLG_MSG_WARNING DLG_OK DLG_STATUS +syn keyword ishdConstant DLG_USER_CAPTION DRIVE DRIVEOPEN DLG_DIR_DRIVE +syn keyword ishdConstant EDITBOX_CHANGE EFF_BOXSTRIPE EFF_FADE EFF_HORZREVEAL +syn keyword ishdConstant EFF_HORZSTRIPE EFF_NONE EFF_REVEAL EFF_VERTSTRIPE +syn keyword ishdConstant ENABLE END_OF_FILE END_OF_LIST ENHANCED ENTERDISK +syn keyword ishdConstant ENTERDISK_ERRMSG ENTERDISKBEEP ENVSPACE EQUALS +syn keyword ishdConstant ERR_BADPATH ERR_BADTAGFILE ERR_BOX_BADPATH +syn keyword ishdConstant ERR_BOX_BADTAGFILE ERR_BOX_DISKID ERR_BOX_DRIVEOPEN +syn keyword ishdConstant ERR_BOX_EXIT ERR_BOX_HELP ERR_BOX_NOSPACE ERR_BOX_PAUSE +syn keyword ishdConstant ERR_BOX_READONLY ERR_DISKID ERR_DRIVEOPEN +syn keyword ishdConstant EXCLUDE_SUBDIR EXCLUSIVE EXISTS EXIT EXTENDEDMEMORY +syn keyword ishdConstant EXTENSION_ONLY ERRORFILENAME FADE_IN FADE_OUT +syn keyword ishdConstant FAILIFEXISTS FALSE FDRIVE_NUM FEEDBACK FEEDBACK_FULL +syn keyword ishdConstant FEEDBACK_OPERATION FEEDBACK_SPACE FILE_ATTR_ARCHIVED +syn keyword ishdConstant FILE_ATTR_DIRECTORY FILE_ATTR_HIDDEN FILE_ATTR_NORMAL +syn keyword ishdConstant FILE_ATTR_READONLY FILE_ATTR_SYSTEM FILE_ATTRIBUTE +syn keyword ishdConstant FILE_BIN_CUR FILE_BIN_END FILE_BIN_START FILE_DATE +syn keyword ishdConstant FILE_EXISTS FILE_INSTALLED FILE_INVALID FILE_IS_LOCKED +syn keyword ishdConstant FILE_LINE_LENGTH FILE_LOCKED FILE_MODE_APPEND +syn keyword ishdConstant FILE_MODE_BINARY FILE_MODE_BINARYREADONLY +syn keyword ishdConstant FILE_MODE_NORMAL FILE_NO_VERSION FILE_NOT_FOUND +syn keyword ishdConstant FILE_RD_ONLY FILE_SIZE FILE_SRC_EQUAL FILE_SRC_OLD +syn keyword ishdConstant FILE_TIME FILE_WRITEABLE FILENAME FILENAME_ONLY +syn keyword ishdConstant FINISHBUTTON FIXED_DRIVE FONT_TITLE FREEENVSPACE +syn keyword ishdConstant FS_CREATEDIR FS_DISKONEREQUIRED FS_DONE FS_FILENOTINLIB +syn keyword ishdConstant FS_GENERROR FS_INCORRECTDISK FS_LAUNCHPROCESS +syn keyword ishdConstant FS_OPERROR FS_OUTOFSPACE FS_PACKAGING FS_RESETREQUIRED +syn keyword ishdConstant FS_TARGETREADONLY FS_TONEXTDISK FULL FULLSCREEN +syn keyword ishdConstant FULLSCREENSIZE FULLWINDOWMODE FOLDER_DESKTOP +syn keyword ishdConstant FOLDER_PROGRAMS FOLDER_STARTMENU FOLDER_STARTUP +syn keyword ishdConstant GREATER_THAN GREEN HELP HKEY_CLASSES_ROOT +syn keyword ishdConstant HKEY_CURRENT_CONFIG HKEY_CURRENT_USER HKEY_DYN_DATA +syn keyword ishdConstant HKEY_LOCAL_MACHINE HKEY_PERFORMANCE_DATA HKEY_USERS +syn keyword ishdConstant HOURGLASS HWND_DESKTOP HWND_INSTALL IGNORE_READONLY +syn keyword ishdConstant INCLUDE_SUBDIR INDVFILESTATUS INFO INFO_DESCRIPTION +syn keyword ishdConstant INFO_IMAGE INFO_MISC INFO_SIZE INFO_SUBCOMPONENT +syn keyword ishdConstant INFO_VISIBLE INFORMATION INVALID_LIST IS_186 IS_286 +syn keyword ishdConstant IS_386 IS_486 IS_8514A IS_86 IS_ALPHA IS_CDROM IS_CGA +syn keyword ishdConstant IS_DOS IS_EGA IS_FIXED IS_FOLDER IS_ITEM ISLANG_ALL +syn keyword ishdConstant ISLANG_ARABIC ISLANG_ARABIC_SAUDIARABIA +syn keyword ishdConstant ISLANG_ARABIC_IRAQ ISLANG_ARABIC_EGYPT +syn keyword ishdConstant ISLANG_ARABIC_LIBYA ISLANG_ARABIC_ALGERIA +syn keyword ishdConstant ISLANG_ARABIC_MOROCCO ISLANG_ARABIC_TUNISIA +syn keyword ishdConstant ISLANG_ARABIC_OMAN ISLANG_ARABIC_YEMEN +syn keyword ishdConstant ISLANG_ARABIC_SYRIA ISLANG_ARABIC_JORDAN +syn keyword ishdConstant ISLANG_ARABIC_LEBANON ISLANG_ARABIC_KUWAIT +syn keyword ishdConstant ISLANG_ARABIC_UAE ISLANG_ARABIC_BAHRAIN +syn keyword ishdConstant ISLANG_ARABIC_QATAR ISLANG_AFRIKAANS +syn keyword ishdConstant ISLANG_AFRIKAANS_STANDARD ISLANG_ALBANIAN +syn keyword ishdConstant ISLANG_ENGLISH_TRINIDAD ISLANG_ALBANIAN_STANDARD +syn keyword ishdConstant ISLANG_BASQUE ISLANG_BASQUE_STANDARD ISLANG_BULGARIAN +syn keyword ishdConstant ISLANG_BULGARIAN_STANDARD ISLANG_BELARUSIAN +syn keyword ishdConstant ISLANG_BELARUSIAN_STANDARD ISLANG_CATALAN +syn keyword ishdConstant ISLANG_CATALAN_STANDARD ISLANG_CHINESE +syn keyword ishdConstant ISLANG_CHINESE_TAIWAN ISLANG_CHINESE_PRC +syn keyword ishdConstant ISLANG_SPANISH_PUERTORICO ISLANG_CHINESE_HONGKONG +syn keyword ishdConstant ISLANG_CHINESE_SINGAPORE ISLANG_CROATIAN +syn keyword ishdConstant ISLANG_CROATIAN_STANDARD ISLANG_CZECH +syn keyword ishdConstant ISLANG_CZECH_STANDARD ISLANG_DANISH +syn keyword ishdConstant ISLANG_DANISH_STANDARD ISLANG_DUTCH +syn keyword ishdConstant ISLANG_DUTCH_STANDARD ISLANG_DUTCH_BELGIAN +syn keyword ishdConstant ISLANG_ENGLISH ISLANG_ENGLISH_BELIZE +syn keyword ishdConstant ISLANG_ENGLISH_UNITEDSTATES +syn keyword ishdConstant ISLANG_ENGLISH_UNITEDKINGDOM ISLANG_ENGLISH_AUSTRALIAN +syn keyword ishdConstant ISLANG_ENGLISH_CANADIAN ISLANG_ENGLISH_NEWZEALAND +syn keyword ishdConstant ISLANG_ENGLISH_IRELAND ISLANG_ENGLISH_SOUTHAFRICA +syn keyword ishdConstant ISLANG_ENGLISH_JAMAICA ISLANG_ENGLISH_CARIBBEAN +syn keyword ishdConstant ISLANG_ESTONIAN ISLANG_ESTONIAN_STANDARD +syn keyword ishdConstant ISLANG_FAEROESE ISLANG_FAEROESE_STANDARD ISLANG_FARSI +syn keyword ishdConstant ISLANG_FINNISH ISLANG_FINNISH_STANDARD ISLANG_FRENCH +syn keyword ishdConstant ISLANG_FRENCH_STANDARD ISLANG_FRENCH_BELGIAN +syn keyword ishdConstant ISLANG_FRENCH_CANADIAN ISLANG_FRENCH_SWISS +syn keyword ishdConstant ISLANG_FRENCH_LUXEMBOURG ISLANG_FARSI_STANDARD +syn keyword ishdConstant ISLANG_GERMAN ISLANG_GERMAN_STANDARD +syn keyword ishdConstant ISLANG_GERMAN_SWISS ISLANG_GERMAN_AUSTRIAN +syn keyword ishdConstant ISLANG_GERMAN_LUXEMBOURG ISLANG_GERMAN_LIECHTENSTEIN +syn keyword ishdConstant ISLANG_GREEK ISLANG_GREEK_STANDARD ISLANG_HEBREW +syn keyword ishdConstant ISLANG_HEBREW_STANDARD ISLANG_HUNGARIAN +syn keyword ishdConstant ISLANG_HUNGARIAN_STANDARD ISLANG_ICELANDIC +syn keyword ishdConstant ISLANG_ICELANDIC_STANDARD ISLANG_INDONESIAN +syn keyword ishdConstant ISLANG_INDONESIAN_STANDARD ISLANG_ITALIAN +syn keyword ishdConstant ISLANG_ITALIAN_STANDARD ISLANG_ITALIAN_SWISS +syn keyword ishdConstant ISLANG_JAPANESE ISLANG_JAPANESE_STANDARD ISLANG_KOREAN +syn keyword ishdConstant ISLANG_KOREAN_STANDARD ISLANG_KOREAN_JOHAB +syn keyword ishdConstant ISLANG_LATVIAN ISLANG_LATVIAN_STANDARD +syn keyword ishdConstant ISLANG_LITHUANIAN ISLANG_LITHUANIAN_STANDARD +syn keyword ishdConstant ISLANG_NORWEGIAN ISLANG_NORWEGIAN_BOKMAL +syn keyword ishdConstant ISLANG_NORWEGIAN_NYNORSK ISLANG_POLISH +syn keyword ishdConstant ISLANG_POLISH_STANDARD ISLANG_PORTUGUESE +syn keyword ishdConstant ISLANG_PORTUGUESE_BRAZILIAN ISLANG_PORTUGUESE_STANDARD +syn keyword ishdConstant ISLANG_ROMANIAN ISLANG_ROMANIAN_STANDARD ISLANG_RUSSIAN +syn keyword ishdConstant ISLANG_RUSSIAN_STANDARD ISLANG_SLOVAK +syn keyword ishdConstant ISLANG_SLOVAK_STANDARD ISLANG_SLOVENIAN +syn keyword ishdConstant ISLANG_SLOVENIAN_STANDARD ISLANG_SERBIAN +syn keyword ishdConstant ISLANG_SERBIAN_LATIN ISLANG_SERBIAN_CYRILLIC +syn keyword ishdConstant ISLANG_SPANISH ISLANG_SPANISH_ARGENTINA +syn keyword ishdConstant ISLANG_SPANISH_BOLIVIA ISLANG_SPANISH_CHILE +syn keyword ishdConstant ISLANG_SPANISH_COLOMBIA ISLANG_SPANISH_COSTARICA +syn keyword ishdConstant ISLANG_SPANISH_DOMINICANREPUBLIC ISLANG_SPANISH_ECUADOR +syn keyword ishdConstant ISLANG_SPANISH_ELSALVADOR ISLANG_SPANISH_GUATEMALA +syn keyword ishdConstant ISLANG_SPANISH_HONDURAS ISLANG_SPANISH_MEXICAN +syn keyword ishdConstant ISLANG_THAI_STANDARD ISLANG_SPANISH_MODERNSORT +syn keyword ishdConstant ISLANG_SPANISH_NICARAGUA ISLANG_SPANISH_PANAMA +syn keyword ishdConstant ISLANG_SPANISH_PARAGUAY ISLANG_SPANISH_PERU +syn keyword ishdConstant IISLANG_SPANISH_PUERTORICO +syn keyword ishdConstant ISLANG_SPANISH_TRADITIONALSORT ISLANG_SPANISH_VENEZUELA +syn keyword ishdConstant ISLANG_SPANISH_URUGUAY ISLANG_SWEDISH +syn keyword ishdConstant ISLANG_SWEDISH_FINLAND ISLANG_SWEDISH_STANDARD +syn keyword ishdConstant ISLANG_THAI ISLANG_THA_STANDARDI ISLANG_TURKISH +syn keyword ishdConstant ISLANG_TURKISH_STANDARD ISLANG_UKRAINIAN +syn keyword ishdConstant ISLANG_UKRAINIAN_STANDARD ISLANG_VIETNAMESE +syn keyword ishdConstant ISLANG_VIETNAMESE_STANDARD IS_MIPS IS_MONO IS_OS2 +syn keyword ishdConstant ISOSL_ALL ISOSL_WIN31 ISOSL_WIN95 ISOSL_NT351 +syn keyword ishdConstant ISOSL_NT351_ALPHA ISOSL_NT351_MIPS ISOSL_NT351_PPC +syn keyword ishdConstant ISOSL_NT40 ISOSL_NT40_ALPHA ISOSL_NT40_MIPS +syn keyword ishdConstant ISOSL_NT40_PPC IS_PENTIUM IS_POWERPC IS_RAMDRIVE +syn keyword ishdConstant IS_REMOTE IS_REMOVABLE IS_SVGA IS_UNKNOWN IS_UVGA +syn keyword ishdConstant IS_VALID_PATH IS_VGA IS_WIN32S IS_WINDOWS IS_WINDOWS95 +syn keyword ishdConstant IS_WINDOWSNT IS_WINOS2 IS_XVGA ISTYPE INFOFILENAME +syn keyword ishdConstant ISRES ISUSER ISVERSION LANGUAGE LANGUAGE_DRV LESS_THAN +syn keyword ishdConstant LINE_NUMBER LISTBOX_ENTER LISTBOX_SELECT LISTFIRST +syn keyword ishdConstant LISTLAST LISTNEXT LISTPREV LOCKEDFILE LOGGING +syn keyword ishdConstant LOWER_LEFT LOWER_RIGHT LIST_NULL MAGENTA MAINCAPTION +syn keyword ishdConstant MATH_COPROCESSOR MAX_STRING MENU METAFILE MMEDIA_AVI +syn keyword ishdConstant MMEDIA_MIDI MMEDIA_PLAYASYNCH MMEDIA_PLAYCONTINUOUS +syn keyword ishdConstant MMEDIA_PLAYSYNCH MMEDIA_STOP MMEDIA_WAVE MOUSE +syn keyword ishdConstant MOUSE_DRV MEDIA MODE NETWORK NETWORK_DRV NEXT +syn keyword ishdConstant NEXTBUTTON NO NO_SUBDIR NO_WRITE_ACCESS NONCONTIGUOUS +syn keyword ishdConstant NONEXCLUSIVE NORMAL NORMALMODE NOSET NOTEXISTS NOTRESET +syn keyword ishdConstant NOWAIT NULL NUMBERLIST OFF OK ON ONLYDIR OS OSMAJOR +syn keyword ishdConstant OSMINOR OTHER_FAILURE OUT_OF_DISK_SPACE PARALLEL +syn keyword ishdConstant PARTIAL PATH PATH_EXISTS PAUSE PERSONAL PROFSTRING +syn keyword ishdConstant PROGMAN PROGRAMFILES RAM_DRIVE REAL RECORDMODE RED +syn keyword ishdConstant REGDB_APPPATH REGDB_APPPATH_DEFAULT REGDB_BINARY +syn keyword ishdConstant REGDB_ERR_CONNECTIONEXISTS REGDB_ERR_CORRUPTEDREGISTRY +syn keyword ishdConstant REGDB_ERR_FILECLOSE REGDB_ERR_FILENOTFOUND +syn keyword ishdConstant REGDB_ERR_FILEOPEN REGDB_ERR_FILEREAD +syn keyword ishdConstant REGDB_ERR_INITIALIZATION REGDB_ERR_INVALIDFORMAT +syn keyword ishdConstant REGDB_ERR_INVALIDHANDLE REGDB_ERR_INVALIDNAME +syn keyword ishdConstant REGDB_ERR_INVALIDPLATFORM REGDB_ERR_OUTOFMEMORY +syn keyword ishdConstant REGDB_ERR_REGISTRY REGDB_KEYS REGDB_NAMES REGDB_NUMBER +syn keyword ishdConstant REGDB_STRING REGDB_STRING_EXPAND REGDB_STRING_MULTI +syn keyword ishdConstant REGDB_UNINSTALL_NAME REGKEY_CLASSES_ROOT +syn keyword ishdConstant REGKEY_CURRENT_USER REGKEY_LOCAL_MACHINE REGKEY_USERS +syn keyword ishdConstant REMOTE_DRIVE REMOVE REMOVEABLE_DRIVE REPLACE +syn keyword ishdConstant REPLACE_ITEM RESET RESTART ROOT ROTATE RUN_MAXIMIZED +syn keyword ishdConstant RUN_MINIMIZED RUN_SEPARATEMEMORY SELECTFOLDER +syn keyword ishdConstant SELFREGISTER SELFREGISTERBATCH SELFREGISTRATIONPROCESS +syn keyword ishdConstant SERIAL SET SETUPTYPE SETUPTYPE_INFO_DESCRIPTION +syn keyword ishdConstant SETUPTYPE_INFO_DISPLAYNAME SEVERE SHARE SHAREDFILE +syn keyword ishdConstant SHELL_OBJECT_FOLDER SILENTMODE SPLITCOMPRESS SPLITCOPY +syn keyword ishdConstant SRCTARGETDIR STANDARD STATUS STATUS95 STATUSBAR +syn keyword ishdConstant STATUSDLG STATUSEX STATUSOLD STRINGLIST STYLE_BOLD +syn keyword ishdConstant STYLE_ITALIC STYLE_NORMAL STYLE_SHADOW STYLE_UNDERLINE +syn keyword ishdConstant SW_HIDE SW_MAXIMIZE SW_MINIMIZE SW_NORMAL SW_RESTORE +syn keyword ishdConstant SW_SHOW SW_SHOWMAXIMIZED SW_SHOWMINIMIZED +syn keyword ishdConstant SW_SHOWMINNOACTIVE SW_SHOWNA SW_SHOWNOACTIVATE +syn keyword ishdConstant SW_SHOWNORMAL SYS_BOOTMACHINE SYS_BOOTWIN +syn keyword ishdConstant SYS_BOOTWIN_INSTALL SYS_RESTART SYS_SHUTDOWN SYS_TODOS +syn keyword ishdConstant SELECTED_LANGUAGE SHELL_OBJECT_LANGUAGE SRCDIR SRCDISK +syn keyword ishdConstant SUPPORTDIR TEXT TILED TIME TRUE TYPICAL TARGETDIR +syn keyword ishdConstant TARGETDISK UPPER_LEFT UPPER_RIGHT USER_ADMINISTRATOR +syn keyword ishdConstant UNINST VALID_PATH VARIABLE_LEFT VARIABLE_UNDEFINED +syn keyword ishdConstant VER_DLL_NOT_FOUND VER_UPDATE_ALWAYS VER_UPDATE_COND +syn keyword ishdConstant VERSION VIDEO VOLUMELABEL WAIT WARNING WELCOME WHITE +syn keyword ishdConstant WIN32SINSTALLED WIN32SMAJOR WIN32SMINOR WINDOWS_SHARED +syn keyword ishdConstant WINMAJOR WINMINOR WINDIR WINDISK WINSYSDIR WINSYSDISK +syn keyword ishdConstant XCOPY_DATETIME YELLOW YES + +syn keyword ishdFunction AskDestPath AskOptions AskPath AskText AskYesNo +syn keyword ishdFunction AppCommand AddProfString AddFolderIcon BatchAdd +syn keyword ishdFunction BatchDeleteEx BatchFileLoad BatchFileSave BatchFind +syn keyword ishdFunction BatchGetFileName BatchMoveEx BatchSetFileName +syn keyword ishdFunction ComponentDialog ComponentAddItem +syn keyword ishdFunction ComponentCompareSizeRequired ComponentDialog +syn keyword ishdFunction ComponentError ComponentFileEnum ComponentFileInfo +syn keyword ishdFunction ComponentFilterLanguage ComponentFilterOS +syn keyword ishdFunction ComponentGetData ComponentGetItemSize +syn keyword ishdFunction ComponentInitialize ComponentIsItemSelected +syn keyword ishdFunction ComponentListItems ComponentMoveData +syn keyword ishdFunction ComponentSelectItem ComponentSetData ComponentSetTarget +syn keyword ishdFunction ComponentSetupTypeEnum ComponentSetupTypeGetData +syn keyword ishdFunction ComponentSetupTypeSet ComponentTotalSize +syn keyword ishdFunction ComponentValidate ConfigAdd ConfigDelete ConfigFileLoad +syn keyword ishdFunction ConfigFileSave ConfigFind ConfigGetFileName +syn keyword ishdFunction ConfigGetInt ConfigMove ConfigSetFileName ConfigSetInt +syn keyword ishdFunction CmdGetHwndDlg CtrlClear CtrlDir CtrlGetCurSel +syn keyword ishdFunction CtrlGetMLEText CtrlGetMultCurSel CtrlGetState +syn keyword ishdFunction CtrlGetSubCommand CtrlGetText CtrlPGroups +syn keyword ishdFunction CtrlSelectText CtrlSetCurSel CtrlSetFont CtrlSetList +syn keyword ishdFunction CtrlSetMLEText CtrlSetMultCurSel CtrlSetState +syn keyword ishdFunction CtrlSetText CallDLLFx ChangeDirectory CloseFile +syn keyword ishdFunction CopyFile CreateDir CreateFile CreateRegistrySet +syn keyword ishdFunction CommitSharedFiles CreateProgramFolder +syn keyword ishdFunction CreateShellObjects CopyBytes DefineDialog Delay +syn keyword ishdFunction DeleteDir DeleteFile Do DoInstall DeinstallSetReference +syn keyword ishdFunction DeinstallStart DialogSetInfo DeleteFolderIcon +syn keyword ishdFunction DeleteProgramFolder Disable EzBatchAddPath +syn keyword ishdFunction EzBatchAddString ExBatchReplace EnterDisk +syn keyword ishdFunction EzConfigAddDriver EzConfigAddString EzConfigGetValue +syn keyword ishdFunction EzConfigSetValue EndDialog EzDefineDialog ExistsDir +syn keyword ishdFunction ExistsDisk ExitProgMan Enable EzBatchReplace +syn keyword ishdFunction FileCompare FileDeleteLine FileGrep FileInsertLine +syn keyword ishdFunction FindAllDirs FindAllFiles FindFile FindWindow +syn keyword ishdFunction GetFileInfo GetLine GetFont GetDiskSpace GetEnvVar +syn keyword ishdFunction GetExtents GetMemFree GetMode GetSystemInfo +syn keyword ishdFunction GetValidDrivesList GetWindowHandle GetProfInt +syn keyword ishdFunction GetProfString GetFolderNameList GetGroupNameList +syn keyword ishdFunction GetItemNameList GetDir GetDisk HIWORD Handler Is +syn keyword ishdFunction ISCompareServicePack InstallationInfo LOWORD LaunchApp +syn keyword ishdFunction LaunchAppAndWait ListAddItem ListAddString ListCount +syn keyword ishdFunction ListCreate ListCurrentItem ListCurrentString +syn keyword ishdFunction ListDeleteItem ListDeleteString ListDestroy +syn keyword ishdFunction ListFindItem ListFindString ListGetFirstItem +syn keyword ishdFunction ListGetFirstString ListGetNextItem ListGetNextString +syn keyword ishdFunction ListReadFromFile ListSetCurrentItem +syn keyword ishdFunction ListSetCurrentString ListSetIndex ListWriteToFile +syn keyword ishdFunction LongPathFromShortPath LongPathToQuote +syn keyword ishdFunction LongPathToShortPath MessageBox MessageBeep NumToStr +syn keyword ishdFunction OpenFile OpenFileMode PathAdd PathDelete PathFind +syn keyword ishdFunction PathGet PathMove PathSet ProgDefGroupType ParsePath +syn keyword ishdFunction PlaceBitmap PlaceWindow PlayMMedia QueryProgGroup +syn keyword ishdFunction QueryProgItem QueryShellMgr RebootDialog ReleaseDialog +syn keyword ishdFunction ReadBytes RenameFile ReplaceProfString ReloadProgGroup +syn keyword ishdFunction ReplaceFolderIcon RGB RegDBConnectRegistry +syn keyword ishdFunction RegDBCreateKeyEx RegDBDeleteKey RegDBDeleteValue +syn keyword ishdFunction RegDBDisConnectRegistry RegDBGetAppInfo RegDBGetItem +syn keyword ishdFunction RegDBGetKeyValueEx RegDBKeyExist RegDBQueryKey +syn keyword ishdFunction RegDBSetAppInfo RegDBSetDefaultRoot RegDBSetItem +syn keyword ishdFunction RegDBSetKeyValueEx SeekBytes SelectDir SetFileInfo +syn keyword ishdFunction SelectDir SelectFolder SetupType SprintfBox SdSetupType +syn keyword ishdFunction SdSetupTypeEx SdMakeName SilentReadData SilentWriteData +syn keyword ishdFunction SendMessage Sprintf System SdAskDestPath SdAskOptions +syn keyword ishdFunction SdAskOptionsList SdBitmap SdComponentDialog +syn keyword ishdFunction SdComponentDialog2 SdComponentDialogAdv SdComponentMult +syn keyword ishdFunction SdConfirmNewDir SdConfirmRegistration SdDisplayTopics +syn keyword ishdFunction SdFinish SdFinishReboot SdInit SdLicense SdMakeName +syn keyword ishdFunction SdOptionsButtons SdProductName SdRegisterUser +syn keyword ishdFunction SdRegisterUserEx SdSelectFolder SdSetupType +syn keyword ishdFunction SdSetupTypeEx SdShowAnyDialog SdShowDlgEdit1 +syn keyword ishdFunction SdShowDlgEdit2 SdShowDlgEdit3 SdShowFileMods +syn keyword ishdFunction SdShowInfoList SdShowMsg SdStartCopy SdWelcome +syn keyword ishdFunction SelectFolder ShowGroup ShowProgamFolder SetColor +syn keyword ishdFunction SetDialogTitle SetDisplayEffect SetErrorMsg +syn keyword ishdFunction SetErrorTitle SetFont SetStatusWindow SetTitle +syn keyword ishdFunction SizeWindow StatusUpdate StrCompare StrFind StrGetTokens +syn keyword ishdFunction StrLength StrRemoveLastSlash StrSub StrToLower StrToNum +syn keyword ishdFunction StrToUpper ShowProgramFolder UnUseDLL UseDLL VarRestore +syn keyword ishdFunction VarSave VerUpdateFile VerCompare VerFindFileVersion +syn keyword ishdFunction VerGetFileVersion VerSearchAndUpdateFile VerUpdateFile +syn keyword ishdFunction Welcome WaitOnDialog WriteBytes WriteLine +syn keyword ishdFunction WriteProfString XCopyFile + +syn keyword ishdTodo contained TODO + +"integer number, or floating point number without a dot. +syn match ishdNumber "\<\d\+\>" +"floating point number, with dot +syn match ishdNumber "\<\d\+\.\d*\>" +"floating point number, starting with a dot +syn match ishdNumber "\.\d\+\>" + +" String constants +syn region ishdString start=+"+ skip=+\\\\\|\\"+ end=+"+ + +syn region ishdComment start="//" end="$" contains=ishdTodo +syn region ishdComment start="/\*" end="\*/" contains=ishdTodo + +" Pre-processor commands +syn region ishdPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=ishdComment,ishdString +if !exists("ishd_no_if0") + syn region ishdHashIf0 start="^\s*#\s*if\s\+0\>" end=".\|$" contains=ishdHashIf0End + syn region ishdHashIf0End contained start="0" end="^\s*#\s*\(endif\>\|else\>\|elif\>\)" contains=ishdHashIf0Skip + syn region ishdHashIf0Skip contained start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*#\s*endif\>" contains=ishdHashIf0Skip +endif +syn region ishdIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match ishdInclude +^\s*#\s*include\>\s*"+ contains=ishdIncluded +syn cluster ishdPreProcGroup contains=ishdPreCondit,ishdIncluded,ishdInclude,ishdDefine,ishdHashIf0,ishdHashIf0End,ishdHashIf0Skip,ishdNumber +syn region ishdDefine start="^\s*#\s*\(define\|undef\)\>" end="$" contains=ALLBUT,@ishdPreProcGroup + +" 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_is_syntax_inits") + if version < 508 + let did_is_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink ishdNumber Number + HiLink ishdError Error + HiLink ishdStatement Statement + HiLink ishdString String + HiLink ishdComment Comment + HiLink ishdTodo Todo + HiLink ishdFunction Identifier + HiLink ishdConstant PreProc + HiLink ishdType Type + HiLink ishdInclude Include + HiLink ishdDefine Macro + HiLink ishdIncluded String + HiLink ishdPreCondit PreCondit + HiLink ishdHashIf0Skip ishdHashIf0 + HiLink ishdHashIf0End ishdHashIf0 + HiLink ishdHashIf0 Comment + + delcommand HiLink +endif + +let b:current_syntax = "ishd" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/iss.vim b/vim/bundle/ubuntu-vim72/syntax/iss.vim new file mode 100644 index 0000000..26d9150 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/iss.vim @@ -0,0 +1,149 @@ +" Vim syntax file +" Language: Inno Setup File (iss file) and My InnoSetup extension +" Maintainer: Jason Mills (jmills@cs.mun.ca) +" Previous Maintainer: Dominique Stéphan (dominique@mggen.com) +" Last Change: 2004 Dec 14 +" +" Todo: +" - The paramter String: is matched as flag string (because of case ignore). +" - Pascal scripting syntax is not recognized. +" - Embedded double quotes confuse string matches. e.g. "asfd""asfa" + +" 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 + +" shut case off +syn case ignore + +" Preprocessor +syn region issPreProc start="^\s*#" end="$" + +" Section +syn region issSection start="\[" end="\]" + +" Label in the [Setup] Section +syn match issDirective "^[^=]\+=" + +" URL +syn match issURL "http[s]\=:\/\/.*$" + +" Parameters used for any section. +" syn match issParam"[^: ]\+:" +syn match issParam "Name:" +syn match issParam "MinVersion:\|OnlyBelowVersion:\|Languages:" +syn match issParam "Source:\|DestDir:\|DestName:\|CopyMode:" +syn match issParam "Attribs:\|Permissions:\|FontInstall:\|Flags:" +syn match issParam "FileName:\|Parameters:\|WorkingDir:\|HotKey:\|Comment:" +syn match issParam "IconFilename:\|IconIndex:" +syn match issParam "Section:\|Key:\|String:" +syn match issParam "Root:\|SubKey:\|ValueType:\|ValueName:\|ValueData:" +syn match issParam "RunOnceId:" +syn match issParam "Type:\|Excludes:" +syn match issParam "Components:\|Description:\|GroupDescription:\|Types:\|ExtraDiskSpaceRequired:" +syn match issParam "StatusMsg:\|RunOnceId:\|Tasks:" +syn match issParam "MessagesFile:\|LicenseFile:\|InfoBeforeFile:\|InfoAfterFile:" + +syn match issComment "^\s*;.*$" + +" folder constant +syn match issFolder "{[^{]*}" + +" string +syn region issString start=+"+ end=+"+ contains=issFolder + +" [Dirs] +syn keyword issDirsFlags deleteafterinstall uninsalwaysuninstall uninsneveruninstall + +" [Files] +syn keyword issFilesCopyMode normal onlyifdoesntexist alwaysoverwrite alwaysskipifsameorolder dontcopy +syn keyword issFilesAttribs readonly hidden system +syn keyword issFilesPermissions full modify readexec +syn keyword issFilesFlags allowunsafefiles comparetimestampalso confirmoverwrite deleteafterinstall +syn keyword issFilesFlags dontcopy dontverifychecksum external fontisnttruetype ignoreversion +syn keyword issFilesFlags isreadme onlyifdestfileexists onlyifdoesntexist overwritereadonly +syn keyword issFilesFlags promptifolder recursesubdirs regserver regtypelib restartreplace +syn keyword issFilesFlags sharedfile skipifsourcedoesntexist sortfilesbyextension touch +syn keyword issFilesFlags uninsremovereadonly uninsrestartdelete uninsneveruninstall +syn keyword issFilesFlags replacesameversion nocompression noencryption noregerror + + +" [Icons] +syn keyword issIconsFlags closeonexit createonlyiffileexists dontcloseonexit +syn keyword issIconsFlags runmaximized runminimized uninsneveruninstall useapppaths + +" [INI] +syn keyword issINIFlags createkeyifdoesntexist uninsdeleteentry uninsdeletesection uninsdeletesectionifempty + +" [Registry] +syn keyword issRegRootKey HKCR HKCU HKLM HKU HKCC +syn keyword issRegValueType none string expandsz multisz dword binary +syn keyword issRegFlags createvalueifdoesntexist deletekey deletevalue dontcreatekey +syn keyword issRegFlags preservestringtype noerror uninsclearvalue +syn keyword issRegFlags uninsdeletekey uninsdeletekeyifempty uninsdeletevalue + +" [Run] and [UninstallRun] +syn keyword issRunFlags hidewizard nowait postinstall runhidden runmaximized +syn keyword issRunFlags runminimized shellexec skipifdoesntexist skipifnotsilent +syn keyword issRunFlags skipifsilent unchecked waituntilidle + +" [Types] +syn keyword issTypesFlags iscustom + +" [Components] +syn keyword issComponentsFlags dontinheritcheck exclusive fixed restart disablenouninstallwarning + +" [UninstallDelete] and [InstallDelete] +syn keyword issInstallDeleteType files filesandordirs dirifempty + +" [Tasks] +syn keyword issTasksFlags checkedonce dontinheritcheck exclusive restart unchecked + + +" 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_iss_syntax_inits") + if version < 508 + let did_iss_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " The default methods for highlighting. Can be overridden later + HiLink issSection Special + HiLink issComment Comment + HiLink issDirective Type + HiLink issParam Type + HiLink issFolder Special + HiLink issString String + HiLink issURL Include + HiLink issPreProc PreProc + + HiLink issDirsFlags Keyword + HiLink issFilesCopyMode Keyword + HiLink issFilesAttribs Keyword + HiLink issFilesPermissions Keyword + HiLink issFilesFlags Keyword + HiLink issIconsFlags Keyword + HiLink issINIFlags Keyword + HiLink issRegRootKey Keyword + HiLink issRegValueType Keyword + HiLink issRegFlags Keyword + HiLink issRunFlags Keyword + HiLink issTypesFlags Keyword + HiLink issComponentsFlags Keyword + HiLink issInstallDeleteType Keyword + HiLink issTasksFlags Keyword + + delcommand HiLink +endif + +let b:current_syntax = "iss" + +" vim:ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/ist.vim b/vim/bundle/ubuntu-vim72/syntax/ist.vim new file mode 100644 index 0000000..fd0005e --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/ist.vim @@ -0,0 +1,70 @@ +" Vim syntax file +" Language: Makeindex style file, *.ist +" Maintainer: Peter Meszaros +" Last Change: May 4, 2001 + +" 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 + +if version >= 600 + setlocal iskeyword=$,@,48-57,_ +else + set iskeyword=$,@,48-57,_ +endif + +syn case ignore +syn keyword IstInpSpec actual arg_close arg_open encap escape +syn keyword IstInpSpec keyword level quote range_close range_open +syn keyword IstInpSpec page_compositor + +syn keyword IstOutSpec preamble postamble setpage_prefix setpage_suffix group_skip +syn keyword IstOutSpec headings_flag heading_prefix heading_suffix +syn keyword IstOutSpec lethead_flag lethead_prefix lethead_suffix +syn keyword IstOutSpec symhead_positive symhead_negative numhead_positive numhead_negative +syn keyword IstOutSpec item_0 item_1 item_2 item_01 +syn keyword IstOutSpec item_x1 item_12 item_x2 +syn keyword IstOutSpec delim_0 delim_1 delim_2 +syn keyword IstOutSpec delim_n delim_r delim_t +syn keyword IstOutSpec encap_prefix encap_infix encap_suffix +syn keyword IstOutSpec line_max indent_space indent_length +syn keyword IstOutSpec suffix_2p suffix_3p suffix_mp + +syn region IstString matchgroup=IstDoubleQuote start=+"+ skip=+\\"+ end=+"+ contains=IstSpecial +syn match IstCharacter "'.'" +syn match IstNumber "\d\+" +syn match IstComment "^[\t ]*%.*$" contains=IstTodo +syn match IstSpecial "\\\\\|{\|}\|#\|\\n" contained +syn match IstTodo "DEBUG\|TODO" contained + +" 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_dummy_syn_inits") + if version < 508 + let did_dummy_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink IstInpSpec Type + HiLink IstOutSpec Identifier + HiLink IstString String + HiLink IstNumber Number + HiLink IstComment Comment + HiLink IstTodo Todo + HiLink IstSpecial Special + HiLink IstDoubleQuote Label + HiLink IstCharacter Label + + delcommand HiLink +endif + +let b:current_syntax = "ist" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/jal.vim b/vim/bundle/ubuntu-vim72/syntax/jal.vim new file mode 100644 index 0000000..d0ba672 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/jal.vim @@ -0,0 +1,249 @@ +" Vim syntax file +" Language: JAL +" Version: 0.1 +" Last Change: 2003 May 11 +" Maintainer: Mark Gross +" This is a syntax definition for the JAL language. +" It is based on the Source Forge compiler source code. +" https://sourceforge.net/projects/jal/ +" +" TODO test. + +" 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 sync lines=250 + +syn keyword picTodo NOTE TODO XXX contained + +syn match picIdentifier "[a-z_$][a-z0-9_$]*" +syn match picLabel "^[A-Z_$][A-Z0-9_$]*" +syn match picLabel "^[A-Z_$][A-Z0-9_$]*:"me=e-1 + +syn match picASCII "A\='.'" +syn match picBinary "B'[0-1]\+'" +syn match picDecimal "D'\d\+'" +syn match picDecimal "\d\+" +syn match picHexadecimal "0x\x\+" +syn match picHexadecimal "H'\x\+'" +syn match picHexadecimal "[0-9]\x*h" +syn match picOctal "O'[0-7]\o*'" + +syn match picComment ";.*" contains=picTodo + +syn region picString start=+"+ end=+"+ + +syn keyword picRegister indf tmr0 pcl status fsr port_a port_b port_c port_d port_e x84_eedata x84_eeadr pclath intcon +syn keyword picRegister f877_tmr1l f877_tmr1h f877_t1con f877_t2con f877_ccpr1l f877_ccpr1h f877_ccp1con +syn keyword picRegister f877_pir1 f877_pir2 f877_pie1 f877_adcon1 f877_adcon0 f877_pr2 f877_adresl f877_adresh +syn keyword picRegister f877_eeadr f877_eedath f877_eeadrh f877_eedata f877_eecon1 f877_eecon2 f628_EECON2 +syn keyword picRegister f877_rcsta f877_txsta f877_spbrg f877_txreg f877_rcreg f628_EEDATA f628_EEADR f628_EECON1 + +" Register --- bits +" STATUS +syn keyword picRegisterPart status_c status_dc status_z status_pd +syn keyword picRegisterPart status_to status_rp0 status_rp1 status_irp + +" pins +syn keyword picRegisterPart pin_a0 pin_a1 pin_a2 pin_a3 pin_a4 pin_a5 +syn keyword picRegisterPart pin_b0 pin_b1 pin_b2 pin_b3 pin_b4 pin_b5 pin_b6 pin_b7 +syn keyword picRegisterPart pin_c0 pin_c1 pin_c2 pin_c3 pin_c4 pin_c5 pin_c6 pin_c7 +syn keyword picRegisterPart pin_d0 pin_d1 pin_d2 pin_d3 pin_d4 pin_d5 pin_d6 pin_d7 +syn keyword picRegisterPart pin_e0 pin_e1 pin_e2 + +syn keyword picPortDir port_a_direction port_b_direction port_c_direction port_d_direction port_e_direction + +syn match picPinDir "pin_a[012345]_direction" +syn match picPinDir "pin_b[01234567]_direction" +syn match picPinDir "pin_c[01234567]_direction" +syn match picPinDir "pin_d[01234567]_direction" +syn match picPinDir "pin_e[012]_direction" + + +" INTCON +syn keyword picRegisterPart intcon_gie intcon_eeie intcon_peie intcon_t0ie intcon_inte +syn keyword picRegisterPart intcon_rbie intcon_t0if intcon_intf intcon_rbif + +" TIMER +syn keyword picRegisterPart t1ckps1 t1ckps0 t1oscen t1sync tmr1cs tmr1on tmr1ie tmr1if + +"cpp bits +syn keyword picRegisterPart ccp1x ccp1y + +" adcon bits +syn keyword picRegisterPart adcon0_go adcon0_ch0 adcon0_ch1 adcon0_ch2 + +" EECON +syn keyword picRegisterPart eecon1_rd eecon1_wr eecon1_wren eecon1_wrerr eecon1_eepgd +syn keyword picRegisterPart f628_eecon1_rd f628_eecon1_wr f628_eecon1_wren f628_eecon1_wrerr + +" usart +syn keyword picRegisterPart tx9 txen sync brgh tx9d +syn keyword picRegisterPart spen rx9 cren ferr oerr rx9d +syn keyword picRegisterPart TXIF RCIF + +" OpCodes... +syn keyword picOpcode addlw andlw call clrwdt goto iorlw movlw option retfie retlw return sleep sublw tris +syn keyword picOpcode xorlw addwf andwf clrf clrw comf decf decfsz incf incfsz retiw iorwf movf movwf nop +syn keyword picOpcode rlf rrf subwf swapf xorwf bcf bsf btfsc btfss skpz skpnz setz clrz skpc skpnc setc clrc +syn keyword picOpcode skpdc skpndc setdc clrdc movfw tstf bank page HPAGE mullw mulwf cpfseq cpfsgt cpfslt banka bankb + + +syn keyword jalBoolean true false +syn keyword jalBoolean off on +syn keyword jalBit high low +syn keyword jalConstant Input Output all_input all_output +syn keyword jalConditional if else then elsif end if +syn keyword jalLabel goto +syn keyword jalRepeat for while forever loop +syn keyword jalStatement procedure function +syn keyword jalStatement return end volatile const var +syn keyword jalType bit byte + +syn keyword jalModifier interrupt assembler asm put get +syn keyword jalStatement out in is begin at +syn keyword jalDirective pragma jump_table target target_clock target_chip name error test assert +syn keyword jalPredefined hs xt rc lp internal 16c84 16f84 16f877 sx18 sx28 12c509a 12c508 +syn keyword jalPredefined 12ce674 16f628 18f252 18f242 18f442 18f452 12f629 12f675 16f88 +syn keyword jalPredefined 16f876 16f873 sx_12 sx18 sx28 pic_12 pic_14 pic_16 + +syn keyword jalDirective chip osc clock fuses cpu watchdog powerup protection + +syn keyword jalFunction bank_0 bank_1 bank_2 bank_3 bank_4 bank_5 bank_6 bank_7 trisa trisb trisc trisd trise +syn keyword jalFunction _trisa_flush _trisb_flush _trisc_flush _trisd_flush _trise_flush + +syn keyword jalPIC local idle_loop + +syn region jalAsm matchgroup=jalAsmKey start="\" end="\" contains=jalComment,jalPreProc,jalLabel,picIdentifier, picLabel,picASCII,picDecimal,picHexadecimal,picOctal,picComment,picString,picRegister,picRigisterPart,picOpcode,picDirective,jalPIC +syn region jalAsm matchgroup=jalAsmKey start="\" end=/$/ contains=jalComment,jalPreProc,jalLabel,picIdentifier, picLabel,picASCII,picDecimal,picHexadecimal,picOctal,picComment,picString,picRegister,picRigisterPart,picOpcode,picDirective,jalPIC + +syn region jalPsudoVars matchgroup=jalPsudoVarsKey start="\<'put\>" end="/" contains=jalComment + +syn match jalStringEscape contained "#[12][0-9]\=[0-9]\=" +syn match jalIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>" +syn match jalSymbolOperator "[+\-/*=]" +syn match jalSymbolOperator "!" +syn match jalSymbolOperator "<" +syn match jalSymbolOperator ">" +syn match jalSymbolOperator "<=" +syn match jalSymbolOperator ">=" +syn match jalSymbolOperator "!=" +syn match jalSymbolOperator "==" +syn match jalSymbolOperator "<<" +syn match jalSymbolOperator ">>" +syn match jalSymbolOperator "|" +syn match jalSymbolOperator "&" +syn match jalSymbolOperator "%" +syn match jalSymbolOperator "?" +syn match jalSymbolOperator "[()]" +syn match jalSymbolOperator "[\^.]" +syn match jalLabel "[\^]*:" + +syn match jalNumber "-\=\<\d[0-9_]\+\>" +syn match jalHexNumber "0x[0-9A-Fa-f_]\+\>" +syn match jalBinNumber "0b[01_]\+\>" + +" String +"wrong strings +syn region jalStringError matchgroup=jalStringError start=+"+ end=+"+ end=+$+ contains=jalStringEscape + +"right strings +syn region jalString matchgroup=jalString start=+'+ end=+'+ oneline contains=jalStringEscape +" To see the start and end of strings: +syn region jalString matchgroup=jalString start=+"+ end=+"+ oneline contains=jalStringEscapeGPC + +syn keyword jalTodo contained TODO +syn region jalComment start=/-- / end=/$/ oneline contains=jalTodo +syn region jalComment start=/--\t/ end=/$/ oneline contains=jalTodo +syn match jalComment /--\_$/ +syn region jalPreProc start="include" end=/$/ contains=JalComment,jalToDo + + +if exists("jal_no_tabs") + syn match jalShowTab "\t" +endif + + +" 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_jal_syn_inits") +if version < 508 + let did_jal_syn_inits = 1 + command -nargs=+ HiLink hi link +else + command -nargs=+ HiLink hi def link +endif + + HiLink jalAcces jalStatement + HiLink jalBoolean Boolean + HiLink jalBit Boolean + HiLink jalComment Comment + HiLink jalConditional Conditional + HiLink jalConstant Constant + HiLink jalDelimiter Identifier + HiLink jalDirective PreProc + HiLink jalException Exception + HiLink jalFloat Float + HiLink jalFunction Function + HiLink jalPsudoVarsKey Function + HiLink jalLabel Label + HiLink jalMatrixDelimiter Identifier + HiLink jalModifier Type + HiLink jalNumber Number + HiLink jalBinNumber Number + HiLink jalHexNumber Number + HiLink jalOperator Operator + HiLink jalPredefined Constant + HiLink jalPreProc PreProc + HiLink jalRepeat Repeat + HiLink jalStatement Statement + HiLink jalString String + HiLink jalStringEscape Special + HiLink jalStringEscapeGPC Special + HiLink jalStringError Error + HiLink jalStruct jalStatement + HiLink jalSymbolOperator jalOperator + HiLink jalTodo Todo + HiLink jalType Type + HiLink jalUnclassified Statement + HiLink jalAsm Assembler + HiLink jalError Error + HiLink jalAsmKey Statement + HiLink jalPIC Statement + + HiLink jalShowTab Error + + HiLink picTodo Todo + HiLink picComment Comment + HiLink picDirective Statement + HiLink picLabel Label + HiLink picString String + + HiLink picOpcode Keyword + HiLink picRegister Structure + HiLink picRegisterPart Special + HiLink picPinDir SPecial + HiLink picPortDir SPecial + + HiLink picASCII String + HiLink picBinary Number + HiLink picDecimal Number + HiLink picHexadecimal Number + HiLink picOctal Number + + HiLink picIdentifier Identifier + + delcommand HiLink +endif + + +let b:current_syntax = "jal" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/jam.vim b/vim/bundle/ubuntu-vim72/syntax/jam.vim new file mode 100644 index 0000000..9fe6678 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/jam.vim @@ -0,0 +1,252 @@ +" Vim syntax file +" Language: JAM +" Maintainer: Ralf Lemke (ralflemk@t-online.de) +" Last change: 09-10-2000 + +" 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 + +if version >= 600 + setlocal iskeyword=@,48-57,_,- +else + set iskeyword=@,48-57,_,- +endif + +" A bunch of useful jam keywords +syn keyword jamStatement break call dbms flush global include msg parms proc public receive return send unload vars +syn keyword jamConditional if else +syn keyword jamRepeat for while next step + +syn keyword jamTodo contained TODO FIXME XXX +syn keyword jamDBState1 alias binary catquery close close_all_connections column_names connection continue continue_bottom continue_down continue_top continue_up +syn keyword jamDBState2 cursor declare engine execute format occur onentry onerror onexit sql start store unique with +syn keyword jamSQLState1 all alter and any avg between by count create current data database delete distinct drop exists fetch from grant group +syn keyword jamSQLState2 having index insert into like load max min of open order revoke rollback runstats select set show stop sum synonym table to union update values view where bundle + +syn keyword jamLibFunc1 dm_bin_create_occur dm_bin_delete_occur dm_bin_get_dlength dm_bin_get_occur dm_bin_length dm_bin_max_occur dm_bin_set_dlength dm_convert_empty dm_cursor_connection dm_cursor_consistent dm_cursor_engine dm_dbi_init dm_dbms dm_dbms_noexp dm_disable_styles dm_enable_styles dm_exec_sql dm_expand dm_free_sql_info dm_gen_change_execute_using dm_gen_change_select_from dm_gen_change_select_group_by dm_gen_change_select_having dm_gen_change_select_list dm_gen_change_select_order_by dm_gen_change_select_suffix dm_gen_change_select_where dm_gen_get_tv_alias dm_gen_sql_info + +syn keyword jamLibFunc2 dm_get_db_conn_handle dm_get_db_cursor_handle dm_get_driver_option dm_getdbitext dm_init dm_is_connection dm_is_cursor dm_is_engine dm_odb_preserves_cursor dm_reset dm_set_driver_option dm_set_max_fetches dm_set_max_rows_per_fetch dm_set_tm_clear_fast dm_val_relative sm_adjust_area sm_allget sm_amt_format sm_e_amt_format sm_i_amt_format sm_n_amt_format sm_o_amt_format sm_append_bundle_data sm_append_bundle_done sm_append_bundle_item sm_d_at_cur sm_l_at_cur sm_r_at_cur sm_mw_attach_drawing_func sm_mwn_attach_drawing_func sm_mwe_attach_drawing_func sm_xm_attach_drawing_func sm_xmn_attach_drawing_func sm_xme_attach_drawing_func sm_backtab sm_bel sm_bi_comparesm_bi_copy sm_bi_initialize sm_bkrect sm_c_off sm_c_on sm_c_vis sm_calc sm_cancel sm_ckdigit sm_cl_all_mdts sm_cl_unprot sm_clear_array sm_n_clear_array sm_1clear_array sm_n_1clear_array sm_close_window sm_com_load_picture sm_com_QueryInterface sm_com_result sm_com_result_msg sm_com_set_handler sm_copyarray sm_n_copyarray sm_create_bundle + +syn keyword jamLibFunc3 sm_d_msg_line sm_dblval sm_e_dblval sm_i_dblval sm_n_dblval sm_o_dblval sm_dd_able sm_dde_client_connect_cold sm_dde_client_connect_hot sm_dde_client_connect_warm sm_dde_client_disconnect sm_dde_client_off sm_dde_client_on sm_dde_client_paste_link_cold sm_dde_client_paste_link_hot sm_dde_client_paste_link_warm sm_dde_client_request sm_dde_execute sm_dde_install_notify sm_dde_poke sm_dde_server_off sm_dde_server_on sm_delay_cursor sm_deselect sm_dicname sm_disp_off sm_dlength sm_e_dlength sm_i_dlength sm_n_dlength sm_o_dlength sm_do_uinstalls sm_i_doccur sm_o_doccur sm_drawingarea sm_xm_drawingarea sm_dtofield sm_e_dtofield sm_i_dtofield sm_n_dtofield sm_o_dtofield sm_femsg sm_ferr_reset sm_fi_path sm_file_copy sm_file_exists sm_file_move sm_file_remove sm_fi_open sm_fi_path sm_filebox sm_filetypes sm_fio_a2f sm_fio_close sm_fio_editor sm_fio_error sm_fio_error_set sm_fio_f2a sm_fio_getc sm_fio_gets sm_fio_handle sm_fio_open sm_fio_putc sm_fio_puts sm_fio_rewind sm_flush sm_d_form sm_l_form + +syn keyword jamLibFunc4 sm_r_form sm_formlist sm_fptr sm_e_fptr sm_i_fptr sm_n_fptr sm_o_fptr sm_fqui_msg sm_fquiet_err sm_free_bundle sm_ftog sm_e_ftog sm_i_ftog sm_n_ftog sm_o_ftog sm_fval sm_e_fval sm_i_fval sm_n_fval sm_o_fval sm_i_get_bi_data sm_o_get_bi_data sm_get_bundle_data sm_get_bundle_item_count sm_get_bundle_occur_count sm_get_next_bundle_name sm_i_get_tv_bi_data sm_o_get_tv_bi_data sm_getfield sm_e_getfield sm_i_getfield sm_n_getfield sm_o_getfield sm_getkey sm_gofield sm_e_gofield sm_i_gofield sm_n_gofield sm_o_gofield sm_gtof sm_gval sm_i_gtof sm_n_gval sm_hlp_by_name sm_home sm_inimsg sm_initcrt sm_jinitcrt sm_jxinitcrt sm_input sm_inquire sm_install sm_intval sm_e_intval sm_i_intval sm_n_intval sm_o_intval sm_i_ioccur sm_o_ioccur sm_is_bundle sm_is_no sm_e_is_no sm_i_is_no sm_n_is_no sm_o_is_no sm_is_yes sm_e_is_yes sm_i_is_yes sm_n_is_yes sm_o_is_yes sm_isabort sm_iset sm_issv sm_itofield sm_e_itofield sm_i_itofield sm_n_itofield sm_o_itofield sm_jclose sm_jfilebox sm_jform sm_djplcall sm_jplcall + +syn keyword jamLibFunc5 sm_sjplcall sm_jplpublic sm_jplunload sm_jtop sm_jwindow sm_key_integer sm_keyfilter sm_keyhit sm_keyinit sm_n_keyinit sm_keylabel sm_keyoption sm_l_close sm_l_open sm_l_open_syslib sm_last sm_launch sm_h_ldb_fld_get sm_n_ldb_fld_get sm_h_ldb_n_fld_get sm_n_ldb_n_fld_get sm_h_ldb_fld_store sm_n_ldb_fld_store sm_h_ldb_n_fld_store sm_n_ldb_n_fld_store sm_ldb_get_active sm_ldb_get_inactive sm_ldb_get_next_active sm_ldb_get_next_inactive sm_ldb_getfield sm_i_ldb_getfield sm_n_ldb_getfield sm_o_ldb_getfield sm_ldb_h_getfield sm_i_ldb_h_getfield sm_n_ldb_h_getfield sm_o_ldb_h_getfield sm_ldb_handle sm_ldb_init sm_ldb_is_loaded sm_ldb_load sm_ldb_name sm_ldb_next_handle sm_ldb_pop sm_ldb_push sm_ldb_putfield sm_i_ldb_putfield sm_n_ldb_putfield sm_o_ldb_putfield sm_ldb_h_putfield sm_i_ldb_h_putfield sm_n_ldb_h_putfield sm_o_ldb_h_putfield sm_ldb_state_get sm_ldb_h_state_get sm_ldb_state_set sm_ldb_h_state_set sm_ldb_unload sm_ldb_h_unload sm_leave sm_list_objects_count sm_list_objects_end sm_list_objects_next + +syn keyword jamLibFunc6 sm_list_objects_start sm_lngval sm_e_lngval sm_i_lngval sm_n_lngval sm_o_lngval sm_load_screen sm_log sm_lstore sm_ltofield sm_e_ltofield sm_i_ltofield sm_n_ltofield sm_o_ltofield sm_m_flush sm_menu_bar_error sm_menu_change sm_menu_create sm_menu_delete sm_menu_get_int sm_menu_get_str sm_menu_install sm_menu_remove sm_message_box sm_mncrinit6 sm_mnitem_change sm_n_mnitem_change sm_mnitem_create sm_n_mnitem_create sm_mnitem_delete sm_n_mnitem_delete sm_mnitem_get_int sm_n_mnitem_get_int sm_mnitem_get_str sm_n_mnitem_get_str sm_mnscript_load sm_mnscript_unload sm_ms_inquire sm_msg sm_msg_del sm_msg_get sm_msg_read sm_d_msg_read sm_n_msg_read sm_msgfind sm_mts_CreateInstance sm_mts_CreateProperty sm_mts_CreatePropertyGroup sm_mts_DisableCommit sm_mts_EnableCommit sm_mts_GetPropertyValue sm_mts_IsCallerInRole sm_mts_IsInTransaction sm_mts_IsSecurityEnabled sm_mts_PutPropertyValue sm_mts_SetAbort sm_mts_SetComplete sm_mus_time sm_mw_get_client_wnd sm_mw_get_cmd_show sm_mw_get_frame_wnd sm_mw_get_instance + +syn keyword jamLibFunc7 sm_mw_get_prev_instance sm_mw_PrintScreen sm_next_sync sm_nl sm_null sm_e_null sm_i_null sm_n_null sm_o_null sm_obj_call sm_obj_copy sm_obj_copy_id sm_obj_create sm_obj_delete sm_obj_delete_id sm_obj_get_property sm_obj_onerror sm_obj_set_property sm_obj_sort sm_obj_sort_auto sm_occur_no sm_off_gofield sm_e_off_gofield sm_i_off_gofield sm_n_off_gofield sm_o_off_gofield sm_option sm_optmnu_id sm_pinquire sm_popup_at_cur sm_prop_error sm_prop_get_int sm_prop_get_str sm_prop_get_dbl sm_prop_get_x_int sm_prop_get_x_str sm_prop_get_x_dbl sm_prop_get_m_int sm_prop_get_m_str sm_prop_get_m_dbl sm_prop_id sm_prop_name_to_id sm_prop_set_int sm_prop_set_str sm_prop_set_dbl sm_prop_set_x_int sm_prop_set_x_str sm_prop_set_x_dbl sm_prop_set_m_int sm_prop_set_m_str sm_prop_set_m_dbl sm_pset sm_putfield sm_e_putfield sm_i_putfield sm_n_putfield sm_o_putfield sm_raise_exception sm_receive sm_receive_args sm_rescreen sm_resetcrt sm_jresetcrt sm_jxresetcrt sm_resize sm_restore_data sm_return sm_return_args sm_rmformlist sm_rs_data + +syn keyword jamLibFunc8 sm_rw_error_message sm_rw_play_metafile sm_rw_runreport sm_s_val sm_save_data sm_sdtime sm_select sm_send sm_set_help sm_setbkstat sm_setsibling sm_setstatus sm_sh_off sm_shell sm_shrink_to_fit sm_slib_error sm_slib_install sm_slib_load sm_soption sm_strip_amt_ptr sm_e_strip_amt_ptr sm_i_strip_amt_ptr sm_n_strip_amt_ptr sm_o_strip_amt_ptr sm_sv_data sm_sv_free sm_svscreen sm_tab sm_tm_clear sm_tm_clear_model_events sm_tm_command sm_tm_command_emsgset sm_tm_command_errset sm_tm_continuation_validity sm_tm_dbi_checker sm_tm_error sm_tm_errorlog sm_tm_event sm_tm_event_name sm_tm_failure_message sm_tm_handling sm_tm_inquire sm_tm_iset sm_tm_msg_count_error sm_tm_msg_emsg sm_tm_msg_error sm_tm_old_bi_context sm_tm_pcopy sm_tm_pinquire sm_tm_pop_model_event sm_tm_pset sm_tm_push_model_event sm_tmpnam sm_tp_exec sm_tp_free_arg_buf sm_tp_gen_insert sm_tp_gen_sel_return sm_tp_gen_sel_where sm_tp_gen_val_link sm_tp_gen_val_return sm_tp_get_svc_alias sm_tp_get_tux_callid sm_translatecoords sm_tst_all_mdts + +syn keyword jamLibFunc9 sm_udtime sm_ungetkey sm_unload_screen sm_unsvscreen sm_upd_select sm_validate sm_n_validate sm_vinit sm_n_vinit sm_wcount sm_wdeselect sm_web_get_cookie sm_web_invoke_url sm_web_log_error sm_web_save_global sm_web_set_cookie sm_web_unsave_all_globals sm_web_unsave_global sm_mw_widget sm_mwe_widget sm_mwn_widget sm_xm_widget sm_xme_widget sm_xmn_widget sm_win_shrink sm_d_window sm_d_at_cur sm_l_window sm_l_at_cur sm_r_window sm_r_at_cur sm_winsize sm_wrotate sm_wselect sm_n_wselect sm_ww_length sm_n_ww_length sm_ww_read sm_n_ww_read sm_ww_write sm_n_ww_write sm_xlate_table sm_xm_get_base_window sm_xm_get_display + +syn keyword jamVariable1 SM_SCCS_ID SM_ENTERTERM SM_MALLOC SM_CANCEL SM_BADTERM SM_FNUM SM_DZERO SM_EXPONENT SM_INVDATE SM_MATHERR SM_FRMDATA SM_NOFORM SM_FRMERR SM_BADKEY SM_DUPKEY SM_ERROR SM_SP1 SM_SP2 SM_RENTRY SM_MUSTFILL SM_AFOVRFLW SM_TOO_FEW_DIGITS SM_CKDIGIT SM_HITANY SM_NOHELP SM_MAXHELP SM_OUTRANGE SM_ENTERTERM1 SM_SYSDATE SM_DATFRM SM_DATCLR SM_DATINV SM_KSDATA SM_KSERR SM_KSNONE SM_KSMORE SM_DAYA1 SM_DAYA2 SM_DAYA3 SM_DAYA4 SM_DAYA5 SM_DAYA6 SM_DAYA7 SM_DAYL1 SM_DAYL2 SM_DAYL3 SM_DAYL4 SM_DAYL5 SM_DAYL6 SM_DAYL7 SM_MNSCR_LOAD SM_MENU_INSTALL SM_INSTDEFSCRL SM_INSTSCROLL SM_MOREDATA SM_READY SM_WAIT SM_YES SM_NO SM_NOTEMP SM_FRMHELP SM_FILVER SM_ONLYONE SM_WMSMOVE SM_WMSSIZE SM_WMSOFF SM_LPRINT SM_FMODE SM_NOFILE SM_NOSECTN SM_FFORMAT SM_FREAD SM_RX1 SM_RX2 SM_RX3 SM_TABLOOK SM_MISKET SM_ILLKET SM_ILLBRA SM_MISDBLKET SM_ILLDBLKET SM_ILLDBLBRA SM_ILL_RIGHT SM_ILLELSE SM_NUMBER SM_EOT SM_BREAK SM_NOARGS SM_BIGVAR SM_EXCESS SM_EOL SM_FILEIO SM_FOR SM_RCURLY SM_NONAME SM_1JPL_ERR SM_2JPL_ERR SM_3JPL_ERR + +syn keyword jamVariable2 SM_JPLATCH SM_FORMAT SM_DESTINATION SM_ORAND SM_ORATOR SM_ILL_LEFT SM_MISSPARENS SM_ILLCLOSE_COMM SM_FUNCTION SM_EQUALS SM_MISMATCH SM_QUOTE SM_SYNTAX SM_NEXT SM_VERB_UNKNOWN SM_JPLFORM SM_NOT_LOADED SM_GA_FLG SM_GA_CHAR SM_GA_ARG SM_GA_DIG SM_NOFUNC SM_BADPROTO SM_JPLPUBLIC SM_NOCOMPILE SM_NULLEDIT SM_RP_NULL SM_DBI_NOT_INST SM_NOTJY SM_MAXLIB SM_FL_FLLIB SM_TPI_NOT_INST SM_RW_NOT_INST SM_MONA1 SM_MONA2 SM_MONA3 SM_MONA4 SM_MONA5 SM_MONA6 SM_MONA7 SM_MONA8 SM_MONA9 SM_MONA10 SM_MONA11 SM_MONA12 SM_MONL1 SM_MONL2 SM_MONL3 SM_MONL4 SM_MONL5 SM_MONL6 SM_MONL7 SM_MONL8 SM_MONL9 SM_MONL10 SM_MONL11 SM_MONL12 SM_AM SM_PM SM_0DEF_DTIME SM_1DEF_DTIME SM_2DEF_DTIME SM_3DEF_DTIME SM_4DEF_DTIME SM_5DEF_DTIME SM_6DEF_DTIME SM_7DEF_DTIME SM_8DEF_DTIME SM_9DEF_DTIME SM_CALC_DATE SM_BAD_DIGIT SM_BAD_YN SM_BAD_ALPHA SM_BAD_NUM SM_BAD_ALPHNUM SM_DECIMAL SM_1STATS SM_VERNO SM_DIG_ERR SM_YN_ERR SM_LET_ERR SM_NUM_ERR SM_ANUM_ERR SM_REXP_ERR SM_POSN_ERR SM_FBX_OPEN SM_FBX_WINDOW SM_FBX_SIBLING SM_OPENDIR + +syn keyword jamVariable3 SM_GETFILES SM_CHDIR SM_GETCWD SM_UNCLOSED_COMM SM_MB_OKLABEL SM_MB_CANCELLABEL SM_MB_YESLABEL SM_MB_NOLABEL SM_MB_RETRYLABEL SM_MB_IGNORELABEL SM_MB_ABORTLABEL SM_MB_HELPLABEL SM_MB_STOP SM_MB_QUESTION SM_MB_WARNING SM_MB_INFORMATION SM_MB_YESALLLABEL SM_0MN_CURRDEF SM_1MN_CURRDEF SM_2MN_CURRDEF SM_0DEF_CURR SM_1DEF_CURR SM_2DEF_CURR SM_3DEF_CURR SM_4DEF_CURR SM_5DEF_CURR SM_6DEF_CURR SM_7DEF_CURR SM_8DEF_CURR SM_9DEF_CURR SM_SEND_SYNTAX SM_SEND_ITEM SM_SEND_INVALID_BUNDLE SM_RECEIVE_SYNTAX SM_RECEIVE_ITEM_NUMBER SM_RECEIVE_OVERFLOW SM_RECEIVE_ITEM SM_SYNCH_RECEIVE SM_EXEC_FAIL SM_DYNA_HELP_NOT_AVAIL SM_DLL_LOAD_ERR SM_DLL_UNRESOLVED SM_DLL_VERSION_ERR SM_DLL_OPTION_ERR SM_DEMOERR SM_MB_OKALLLABEL SM_MB_NOALLLABEL SM_BADPROP SM_BETWEEN SM_ATLEAST SM_ATMOST SM_PR_ERROR SM_PR_OBJID SM_PR_OBJECT SM_PR_ITEM SM_PR_PROP SM_PR_PROP_ITEM SM_PR_PROP_VAL SM_PR_CONVERT SM_PR_OBJ_TYPE SM_PR_RANGE SM_PR_NO_SET SM_PR_BYND_SCRN SM_PR_WW_SCROLL SM_PR_NO_SYNC SM_PR_TOO_BIG SM_PR_BAD_MASK SM_EXEC_MEM_ERR + +syn keyword jamVariable4 SM_EXEC_NO_PROG SM_PR_NO_KEYSTRUCT SM_REOPEN_AS_SLIB SM_REOPEN_THE_SLIB SM_ERRLIB SM_WARNLIB SM_LIB_DOWNGRADE SM_OLDER SM_NEWER SM_UPGRADE SM_LIB_READONLY SM_LOPEN_ERR SM_LOPEN_WARN SM_MLOPEN_CREAT SM_MLOPEN_INIT SM_LIB_ERR SM_LIB_ISOLATE SM_LIB_NO_ERR SM_LIB_REC_ERR SM_LIB_FATAL_ERR SM_LIB_LERR_FILE SM_LIB_LERR_NOTLIB SM_LIB_LERR_BADVERS SM_LIB_LERR_FORMAT SM_LIB_LERR_BADCM SM_LIB_LERR_LOCK SM_LIB_LERR_RESERVED SM_LIB_LERR_READONLY SM_LIB_LERR_NOENTRY SM_LIB_LERR_BUSY SM_LIB_LERR_ROVERS SM_LIB_LERR_DEFAULT SM_LIB_BADCM SM_LIB_LERR_NEW SM_STANDALONE_MODE SM_FEATURE_RESTRICT FM_CH_LOST FM_JPL_PROMPT FM_YR4 FM_YR2 FM_MON FM_MON2 FM_DATE FM_DATE2 FM_HOUR FM_HOUR2 FM_MIN FM_MIN2 FM_SEC FM_SEC2 FM_YRDAY FM_AMPM FM_DAYA FM_DAYL FM_MONA FM_MONL FM_0MN_DEF_DT FM_1MN_DEF_DT FM_2MN_DEF_DT FM_DAY JM_QTERMINATE JM_HITSPACE JM_HITACK JM_NOJWIN UT_MEMERR UT_P_OPT UT_V_OPT UT_E_BINOPT UT_NO_INPUT UT_SECLONG UT_1FNAME UT_SLINE UT_FILE UT_ERROR UT_WARNING UT_MISSEQ UT_VOPT UT_M2_DESCR + +syn keyword jamVariable5 UT_M2_PROGNAME UT_M2_USAGE UT_M2_O_OPT UT_M2_COM UT_M2_BADTAG UT_M2_MSSQUOT UT_M2_AFTRQUOT UT_M2_DUPSECT UT_M2_BADUCLSS UT_M2_USECPRFX UT_M2_MPTYUSCT UT_M2_DUPMSGTG UT_M2_TOOLONG UT_M2_LONG UT_K2_DESCR UT_K2_PROGNAME UT_K2_USAGE UT_K2_MNEM UT_K2_NKEYDEF UT_K2_DUPKEY UT_K2_NOTFOUND UT_K2_1FNAME UT_K2_VOPT UT_K2_EXCHAR UT_V2_DESCR UT_V2_PROGNAME UT_V2_USAGE UT_V2_SLINE UT_V2_SEQUAL UT_V2_SVARNAME UT_V2_SNAME UT_V2_VOPT UT_V2_1REQ UT_CB_DESCR UT_CB_PROGNAME UT_CB_USAGE UT_CB_VOPT UT_CB_MIEXT UT_CB_AEXT UT_CB_UNKNOWN UT_CB_ISCHEME UT_CB_BKFGS UT_CB_ABGS UT_CB_REC UT_CB_GUI UT_CB_CONT UT_CB_CONTFG UT_CB_AFILE UT_CB_LEFT_QUOTE UT_CB_NO_EQUAL UT_CB_EXTRA_EQ UT_CB_BAD_LHS UT_CB_BAD_RHS UT_CB_BAD_QUOTED UT_CB_FILE UT_CB_FILE_LINE UT_CB_DUP_ALIAS UT_CB_LINE_LOOP UT_CB_BAD_STYLE UT_CB_DUP_STYLE UT_CB_NO_SECT UT_CB_DUP_SCHEME DM_ERROR DM_NODATABASE DM_NOTLOGGEDON DM_ALREADY_ON DM_ARGS_NEEDED DM_LOGON_DENIED DM_BAD_ARGS DM_BAD_CMD DM_NO_MORE_ROWS DM_ABORTED DM_NO_CURSOR DM_MANY_CURSORS DM_KEYWORD + +syn keyword jamVariable6 DM_INVALID_DATE DM_COMMIT DM_ROLLBACK DM_PARSE_ERROR DM_BIND_COUNT DM_BIND_VAR DM_DESC_COL DM_FETCH DM_NO_NAME DM_END_OF_PROC DM_NOCONNECTION DM_NOTSUPPORTED DM_TRAN_PEND DM_NO_TRANSACTION DM_ALREADY_INIT DM_INIT_ERROR DM_MAX_DEPTH DM_NO_PARENT DM_NO_CHILD DM_MODALITY_NOT_FOUND DM_NATIVE_NO_SUPPORT DM_NATIVE_CANCEL DM_TM_ALREADY DM_TM_IN_PROGRESS DM_TM_CLOSE_ERROR DM_TM_BAD_MODE DM_TM_BAD_CLOSE_ACTION DM_TM_INTERNAL DM_TM_MODEL_INTERNAL DM_TM_NO_ROOT DM_TM_NO_TRANSACTION DM_TM_INITIAL_MODE DM_TM_PARENT_NAME DM_TM_BAD_MEMBER DM_TM_FLD_NAM_LEN DM_TM_NO_PARENT DM_TM_BAD_REQUEST DM_TM_CANNOT_GEN_SQL DM_TM_CANNOT_EXEC_SQL DM_TM_DBI_ERROR DM_TM_DISCARD_ALL DM_TM_DISCARD_LATEST DM_TM_CALL_ERROR DM_TM_CALL_TYPE DM_TM_HOOK_MODEL DM_TM_ROOT_NAME DM_TM_TV_INVALID DM_TM_COL_NOT_FOUND DM_TM_BAD_LINK DM_TM_HOOK_MODEL_ERROR DM_TM_ONE_ROW DM_TM_SOME_ROWS DM_TM_GENERAL DM_TM_NO_HOOK DM_TM_NOSET DM_TM_TBLNAME DM_TM_PRIMARY_KEY DM_TM_INCOMPLETE_KEY DM_TM_CMD_MODE DM_TM_NO_SUCH_CMD DM_TM_NO_SUCH_SCOPE + +syn keyword jamVariable7 DM_TM_NO_SUCH_TV DM_TM_EVENT_LOOP DM_TM_UNSUPPORTED DM_TM_NO_MODEL DM_TM_SYNCH_SV DM_TM_WRONG_FORM DM_TM_VC_FIELD DM_TM_VC_DATE DM_TM_VC_TYPE DM_TM_BAD_CONTINUE DM_JDB_OUT_OF_MEMORY DM_JDB_DUPTABLEALIAS DM_JDB_DUPCURSORNAME DM_JDB_NODB DM_JDB_BINDCOUNT DM_JDB_NO_MORE_ROWS DM_JDB_AMBIGUOUS_COLUMN_REF DM_JDB_UNRESOLVED_COLUMN_REF DM_JDB_TABLE_READ_WRITE_CONFLICT DM_JDB_SYNTAX_ERROR DM_JDB_DUP_COLUMN_ASSIGNMENT DM_JDB_NO_MSG_FILE DM_JDB_NO_MSG DM_JDB_NOT_IMPLEMENTED DM_JDB_AGGREGATE_NOT_ALLOWED DM_JDB_TYPE_MISMATCH DM_JDB_NO_CURRENT_ROW DM_JDB_DB_CORRUPT DM_JDB_BUF_OVERFLOW DM_JDB_FILE_IO_ERR DM_JDB_BAD_HANDLE DM_JDB_DUP_TNAME DM_JDB_INVALID_TABLE_OP DM_JDB_TABLE_NOT_FOUND DM_JDB_CONVERSION_FAILED DM_JDB_INVALID_COLUMN_LIST DM_JDB_TABLE_OPEN DM_JDB_BAD_INPUT DM_JDB_DATATYPE_OVERFLOW DM_JDB_DATABASE_EXISTS DM_JDB_DATABASE_OPEN DM_JDB_DUP_CNAME DM_JDB_TMPDATABASE_ERR DM_JDB_INVALID_VALUES_COUNT DM_JDB_INVALID_COLUMN_COUNT DM_JDB_MAX_RECLEN_EXCEEDED DM_JDB_END_OF_GROUP + +syn keyword jamVariable8 TP_EXC_INVALID_CLIENT_COMMAND TP_EXC_INVALID_CLIENT_OPTION TP_EXC_INVALID_COMMAND TP_EXC_INVALID_COMMAND_SYNTAX TP_EXC_INVALID_CONNECTION TP_EXC_INVALID_CONTEXT TP_EXC_INVALID_FORWARD TP_EXC_INVALID_JAM_VARIABLE_REF TP_EXC_INVALID_MONITOR_COMMAND TP_EXC_INVALID_MONITOR_OPTION TP_EXC_INVALID_OPTION TP_EXC_INVALID_OPTION_VALUE TP_EXC_INVALID_SERVER_COMMAND TP_EXC_INVALID_SERVER_OPTION TP_EXC_INVALID_SERVICE TP_EXC_INVALID_TRANSACTION TP_EXC_JIF_ACCESS_FAILED TP_EXC_JIF_LOWER_VERSION TP_EXC_LOGFILE_ERROR TP_EXC_MONITOR_ERROR TP_EXC_NO_OUTSIDE_TRANSACTION TP_EXC_NO_OUTSTANDING_CALLS TP_EXC_NO_OUTSTANDING_MESSAGE TP_EXC_NO_SERVICES_ADVERTISED TP_EXC_NO_SIGNALS TP_EXC_NONTRANSACTIONAL_SERVICE TP_EXC_NONTRANSACTIONAL_ACTION TP_EXC_OUT_OF_MEMORY TP_EXC_POSTING_FAILED TP_EXC_PERMISSION_DENIED TP_EXC_REQUEST_LIMIT TP_EXC_ROLLBACK_COMMITTED TP_EXC_ROLLBACK_FAILED TP_EXC_SERVICE_FAILED TP_EXC_SERVICE_NOT_IN_JIF TP_EXC_SERVICE_PROTOCOL_ERROR TP_EXC_SUBSCRIPTION_LIMIT + +syn keyword jamVariable9 TP_EXC_SUBSCRIPTION_MATCH TP_EXC_SVC_ADVERTISE_LIMIT TP_EXC_SVC_WORK_OUTSTANDING TP_EXC_SVCROUTINE_MISSING TP_EXC_SVRINIT_WORK_OUTSTANDING TP_EXC_TIMEOUT TP_EXC_TRANSACTION_LIMIT TP_EXC_UNLOAD_FAILED TP_EXC_UNSUPPORTED_BUFFER TP_EXC_UNSUPPORTED_BUF_W_SUBT TP_EXC_USER_ABORT TP_EXC_WORK_OUTSTANDING TP_EXC_XA_CLOSE_FAILED TP_EXC_XA_OPEN_FAILED TP_EXC_QUEUE_BAD_MSGID TP_EXC_QUEUE_BAD_NAMESPACE TP_EXC_QUEUE_BAD_QUEUE TP_EXC_QUEUE_CANT_START_TRAN TP_EXC_QUEUE_FULL TP_EXC_QUEUE_MSG_IN_USE TP_EXC_QUEUE_NO_MSG TP_EXC_QUEUE_NOT_IN_QSPACE TP_EXC_QUEUE_RSRC_NOT_OPEN TP_EXC_QUEUE_SPACE_NOT_IN_JIF TP_EXC_QUEUE_TRAN_ABORTED TP_EXC_QUEUE_TRAN_ABSENT TP_EXC_QUEUE_UNEXPECTED TP_EXC_DCE_LOGIN_REQUIRED TP_EXC_ENC_CELL_NAME_REQUIRED TP_EXC_ENC_CONN_INFO_DIFFS TP_EXC_ENC_SVC_REGISTRY_ERROR TP_INVALID_START_ROUTINE TP_JIF_NOT_FOUND TP_JIF_OPEN_ERROR TP_NO_JIF TP_NO_MONITORS_ERROR TP_NO_SESSIONS_ERROR TP_NO_START_ROUTINE TP_ADV_SERVICE TP_ADV_SERVICE_IN_GROUP TP_PRE_SVCHDL_WINOPEN_FAILED + +syn keyword jamVariable10 PV_YES PV_NO TRUE FALSE TM_TRAN_NAME + +" jamCommentGroup allows adding matches for special things in comments +syn cluster jamCommentGroup contains=jamTodo + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match jamSpecial contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" +if !exists("c_no_utf") + syn match jamSpecial contained "\\\(u\x\{4}\|U\x\{8}\)" +endif +if exists("c_no_cformat") + syn region jamString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial +else + syn match jamFormat "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([diuoxXfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained + syn match jamFormat "%%" contained + syn region jamString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat + hi link jamFormat jamSpecial +endif +syn match jamCharacter "L\='[^\\]'" +syn match jamCharacter "L'[^']*'" contains=jamSpecial +syn match jamSpecialError "L\='\\[^'\"?\\abfnrtv]'" +syn match jamSpecialCharacter "L\='\\['\"?\\abfnrtv]'" +syn match jamSpecialCharacter "L\='\\\o\{1,3}'" +syn match jamSpecialCharacter "'\\x\x\{1,2}'" +syn match jamSpecialCharacter "L'\\x\x\+'" + +"catch errors caused by wrong parenthesis and brackets +syn cluster jamParenGroup contains=jamParenError,jamIncluded,jamSpecial,@jamCommentGroup,jamUserCont,jamUserLabel,jamBitField,jamCommentSkip,jamOctalZero,jamCppOut,jamCppOut2,jamCppSkip,jamFormat,jamNumber,jamFloat,jamOctal,jamOctalError,jamNumbersCom + +syn region jamParen transparent start='(' end=')' contains=ALLBUT,@jamParenGroup,jamErrInBracket +syn match jamParenError "[\])]" +syn match jamErrInParen contained "[\]{}]" +syn region jamBracket transparent start='\[' end=']' contains=ALLBUT,@jamParenGroup,jamErrInParen +syn match jamErrInBracket contained "[);{}]" + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match jamNumbers transparent "\<\d\|\,\d" contains=jamNumber,jamFloat,jamOctalError,jamOctal +" Same, but without octal error (for comments) +syn match jamNumbersCom contained transparent "\<\d\|\,\d" contains=jamNumber,jamFloat,jamOctal +syn match jamNumber contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" +"hex number +syn match jamNumber contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" +" Flag the first zero of an octal number as something special +syn match jamOctal contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero +syn match jamOctalZero contained "\<0" +syn match jamFloat contained "\d\+f" +"floating point number, with dot, optional exponent +syn match jamFloat contained "\d\+\,\d*\(e[-+]\=\d\+\)\=[fl]\=" +"floating point number, starting with a dot, optional exponent +syn match jamFloat contained "\,\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match jamFloat contained "\d\+e[-+]\=\d\+[fl]\=\>" +" flag an octal number with wrong digits +syn match jamOctalError contained "0\o*[89]\d*" +syn case match + +syntax match jamOperator1 "\#\#" +syntax match jamOperator6 "/" +syntax match jamOperator2 "+" +syntax match jamOperator3 "*" +syntax match jamOperator4 "-" +syntax match jamOperator5 "|" +syntax match jamOperator6 "/" +syntax match jamOperator7 "&" +syntax match jamOperator8 ":" +syntax match jamOperator9 "<" +syntax match jamOperator10 ">" +syntax match jamOperator11 "!" +syntax match jamOperator12 "%" +syntax match jamOperator13 "^" +syntax match jamOperator14 "@" + +syntax match jamCommentL "//" + +if exists("jam_comment_strings") + " A comment can contain jamString, jamCharacter and jamNumber. + " But a "*/" inside a jamString in a jamComment DOES end the comment! So we + " need to use a special type of jamString: jamCommentString, which also ends on + " "*/", and sees a "*" at the start of the line as comment again. + " Unfortunately this doesn't very well work for // type of comments :-( + syntax match jamCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region jamCommentString contained start=+L\="+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=jamSpecial,jamCommentSkip + syntax region jamComment2String contained start=+L\="+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=jamSpecial + syntax region jamCommentL start="//" skip="\\$" end="$" keepend contains=@jamCommentGroup,jamComment2String,jamCharacter,jamNumbersCom,jamSpaceError + syntax region jamCommentL2 start="^#\|^\s\+\#" skip="\\$" end="$" keepend contains=@jamCommentGroup,jamComment2String,jamCharacter,jamNumbersCom,jamSpaceError + syntax region jamComment start="/\*" end="\*/" contains=@jamCommentGroup,jamCommentString,jamCharacter,jamNumbersCom,jamSpaceError +else + syn region jamCommentL start="//" skip="\\$" end="$" keepend contains=@jamCommentGroup,jamSpaceError + syn region jamCommentL2 start="^\#\|^\s\+\#" skip="\\$" end="$" keepend contains=@jamCommentGroup,jamSpaceError + syn region jamComment start="/\*" end="\*/" contains=@jamCommentGroup,jamSpaceError +endif + +" keep a // comment separately, it terminates a preproc. conditional +syntax match jamCommentError "\*/" + +syntax match jamOperator3Error "*/" + +" 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_jam_syn_inits") + if version < 508 + let did_jam_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink jamCommentL jamComment + HiLink jamCommentL2 jamComment + HiLink jamOperator3Error jamError + HiLink jamConditional Conditional + HiLink jamRepeat Repeat + HiLink jamCharacter Character + HiLink jamSpecialCharacter jamSpecial + HiLink jamNumber Number + HiLink jamParenError jamError + HiLink jamErrInParen jamError + HiLink jamErrInBracket jamError + HiLink jamCommentError jamError + HiLink jamSpaceError jamError + HiLink jamSpecialError jamError + HiLink jamOperator1 jamOperator + HiLink jamOperator2 jamOperator + HiLink jamOperator3 jamOperator + HiLink jamOperator4 jamOperator + HiLink jamOperator5 jamOperator + HiLink jamOperator6 jamOperator + HiLink jamOperator7 jamOperator + HiLink jamOperator8 jamOperator + HiLink jamOperator9 jamOperator + HiLink jamOperator10 jamOperator + HiLink jamOperator11 jamOperator + HiLink jamOperator12 jamOperator + HiLink jamOperator13 jamOperator + HiLink jamOperator14 jamOperator + HiLink jamError Error + HiLink jamStatement Statement + HiLink jamPreCondit PreCondit + HiLink jamCommentError jamError + HiLink jamCommentString jamString + HiLink jamComment2String jamString + HiLink jamCommentSkip jamComment + HiLink jamString String + HiLink jamComment Comment + HiLink jamSpecial SpecialChar + HiLink jamTodo Todo + HiLink jamCppSkip jamCppOut + HiLink jamCppOut2 jamCppOut + HiLink jamCppOut Comment + HiLink jamDBState1 Identifier + HiLink jamDBState2 Identifier + HiLink jamSQLState1 jamSQL + HiLink jamSQLState2 jamSQL + HiLink jamLibFunc1 jamLibFunc + HiLink jamLibFunc2 jamLibFunc + HiLink jamLibFunc3 jamLibFunc + HiLink jamLibFunc4 jamLibFunc + HiLink jamLibFunc5 jamLibFunc + HiLink jamLibFunc6 jamLibFunc + HiLink jamLibFunc7 jamLibFunc + HiLink jamLibFunc8 jamLibFunc + HiLink jamLibFunc9 jamLibFunc + HiLink jamVariable1 jamVariablen + HiLink jamVariable2 jamVariablen + HiLink jamVariable3 jamVariablen + HiLink jamVariable4 jamVariablen + HiLink jamVariable5 jamVariablen + HiLink jamVariable6 jamVariablen + HiLink jamVariable7 jamVariablen + HiLink jamVariable8 jamVariablen + HiLink jamVariable9 jamVariablen + HiLink jamVariable10 jamVariablen + HiLink jamVariablen Constant + HiLink jamSQL Type + HiLink jamLibFunc PreProc + HiLink jamOperator Special + + delcommand HiLink +endif + +let b:current_syntax = "jam" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/jargon.vim b/vim/bundle/ubuntu-vim72/syntax/jargon.vim new file mode 100644 index 0000000..25a88bc --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/jargon.vim @@ -0,0 +1,36 @@ +" Vim syntax file +" Language: Jargon File +" Maintainer: +" Last Change: 2001 May 26 +" +" 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 match jargonChaptTitle /:[^:]*:/ +syn match jargonEmailAddr /[^<@ ^I]*@[^ ^I>]*/ +syn match jargonUrl +\(http\|ftp\)://[^\t )"]*+ +syn match jargonMark /{[^}]*}/ + +" 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_jargon_syntax_inits") + if version < 508 + let did_jargon_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + HiLink jargonChaptTitle Title + HiLink jargonEmailAddr Comment + HiLink jargonUrl Comment + HiLink jargonMark Label + delcommand HiLink +endif + +let b:current_syntax = "jargon" diff --git a/vim/bundle/ubuntu-vim72/syntax/java.vim b/vim/bundle/ubuntu-vim72/syntax/java.vim new file mode 100644 index 0000000..18e4532 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/java.vim @@ -0,0 +1,349 @@ +" Vim syntax file +" Language: Java +" Maintainer: Claudio Fleiner +" URL: http://www.fleiner.com/vim/syntax/java.vim +" Last Change: 2009 Mar 14 + +" Please check :help java.vim for comments on some of the options available. + +" Quit when a syntax file was already loaded +if !exists("main_syntax") + if version < 600 + syntax clear + elseif exists("b:current_syntax") + finish + endif + " we define it here so that included files can test for it + let main_syntax='java' + syn region javaFold start="{" end="}" transparent fold +endif + +" don't use standard HiLink, it will not work with included syntax files +if version < 508 + command! -nargs=+ JavaHiLink hi link +else + command! -nargs=+ JavaHiLink hi def link +endif + +" some characters that cannot be in a java program (outside a string) +syn match javaError "[\\@`]" +syn match javaError "<<<\|\.\.\|=>\|<>\|||=\|&&=\|[^-]->\|\*\/" +syn match javaOK "\.\.\." + +" use separate name so that it can be deleted in javacc.vim +syn match javaError2 "#\|=<" +JavaHiLink javaError2 javaError + + + +" keyword definitions +syn keyword javaExternal native package +syn match javaExternal "\\(\s\+static\>\)\?" +syn keyword javaError goto const +syn keyword javaConditional if else switch +syn keyword javaRepeat while for do +syn keyword javaBoolean true false +syn keyword javaConstant null +syn keyword javaTypedef this super +syn keyword javaOperator new instanceof +syn keyword javaType boolean char byte short int long float double +syn keyword javaType void +syn keyword javaStatement return +syn keyword javaStorageClass static synchronized transient volatile final strictfp serializable +syn keyword javaExceptions throw try catch finally +syn keyword javaAssert assert +syn keyword javaMethodDecl synchronized throws +syn keyword javaClassDecl extends implements interface +" to differentiate the keyword class from MyClass.class we use a match here +syn match javaTypedef "\.\s*\"ms=s+1 +syn keyword javaClassDecl enum +syn match javaClassDecl "^class\>" +syn match javaClassDecl "[^.]\s*\"ms=s+1 +syn match javaAnnotation "@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>" +syn match javaClassDecl "@interface\>" +syn keyword javaBranch break continue nextgroup=javaUserLabelRef skipwhite +syn match javaUserLabelRef "\k\+" contained +syn match javaVarArg "\.\.\." +syn keyword javaScopeDecl public protected private abstract + +if exists("java_highlight_java_lang_ids") + let java_highlight_all=1 +endif +if exists("java_highlight_all") || exists("java_highlight_java") || exists("java_highlight_java_lang") + " java.lang.* + syn match javaLangClass "\" + syn keyword javaR_JavaLang NegativeArraySizeException ArrayStoreException IllegalStateException RuntimeException IndexOutOfBoundsException UnsupportedOperationException ArrayIndexOutOfBoundsException ArithmeticException ClassCastException EnumConstantNotPresentException StringIndexOutOfBoundsException IllegalArgumentException IllegalMonitorStateException IllegalThreadStateException NumberFormatException NullPointerException TypeNotPresentException SecurityException + syn cluster javaTop add=javaR_JavaLang + syn cluster javaClasses add=javaR_JavaLang + JavaHiLink javaR_JavaLang javaR_Java + syn keyword javaC_JavaLang Process RuntimePermission StringKeySet CharacterData01 Class ThreadLocal ThreadLocalMap CharacterData0E Package Character StringCoding Long ProcessImpl ProcessEnvironment Short AssertionStatusDirectives 1PackageInfoProxy UnicodeBlock InheritableThreadLocal AbstractStringBuilder StringEnvironment ClassLoader ConditionalSpecialCasing CharacterDataPrivateUse StringBuffer StringDecoder Entry StringEntry WrappedHook StringBuilder StrictMath State ThreadGroup Runtime CharacterData02 MethodArray Object CharacterDataUndefined Integer Gate Boolean Enum Variable Subset StringEncoder Void Terminator CharsetSD IntegerCache CharacterCache Byte CharsetSE Thread SystemClassLoaderAction CharacterDataLatin1 StringValues StackTraceElement Shutdown ShortCache String ConverterSD ByteCache Lock EnclosingMethodInfo Math Float Value Double SecurityManager LongCache ProcessBuilder StringEntrySet Compiler Number UNIXProcess ConverterSE ExternalData CaseInsensitiveComparator CharacterData00 NativeLibrary + syn cluster javaTop add=javaC_JavaLang + syn cluster javaClasses add=javaC_JavaLang + JavaHiLink javaC_JavaLang javaC_Java + syn keyword javaE_JavaLang IncompatibleClassChangeError InternalError UnknownError ClassCircularityError AssertionError ThreadDeath IllegalAccessError NoClassDefFoundError ClassFormatError UnsupportedClassVersionError NoSuchFieldError VerifyError ExceptionInInitializerError InstantiationError LinkageError NoSuchMethodError Error UnsatisfiedLinkError StackOverflowError AbstractMethodError VirtualMachineError OutOfMemoryError + syn cluster javaTop add=javaE_JavaLang + syn cluster javaClasses add=javaE_JavaLang + JavaHiLink javaE_JavaLang javaE_Java + syn keyword javaX_JavaLang CloneNotSupportedException Exception NoSuchMethodException IllegalAccessException NoSuchFieldException Throwable InterruptedException ClassNotFoundException InstantiationException + syn cluster javaTop add=javaX_JavaLang + syn cluster javaClasses add=javaX_JavaLang + JavaHiLink javaX_JavaLang javaX_Java + + JavaHiLink javaR_Java javaR_ + JavaHiLink javaC_Java javaC_ + JavaHiLink javaE_Java javaE_ + JavaHiLink javaX_Java javaX_ + JavaHiLink javaX_ javaExceptions + JavaHiLink javaR_ javaExceptions + JavaHiLink javaE_ javaExceptions + JavaHiLink javaC_ javaConstant + + syn keyword javaLangObject clone equals finalize getClass hashCode + syn keyword javaLangObject notify notifyAll toString wait + JavaHiLink javaLangObject javaConstant + syn cluster javaTop add=javaLangObject +endif + +if filereadable(expand(":p:h")."/javaid.vim") + source :p:h/javaid.vim +endif + +if exists("java_space_errors") + if !exists("java_no_trail_space_error") + syn match javaSpaceError "\s\+$" + endif + if !exists("java_no_tab_space_error") + syn match javaSpaceError " \+\t"me=e-1 + endif +endif + +syn region javaLabelRegion transparent matchgroup=javaLabel start="\" matchgroup=NONE end=":" contains=javaNumber,javaCharacter +syn match javaUserLabel "^\s*[_$a-zA-Z][_$a-zA-Z0-9_]*\s*:"he=e-1 contains=javaLabel +syn keyword javaLabel default + +if !exists("java_allow_cpp_keywords") + syn keyword javaError auto delete extern friend inline redeclared + syn keyword javaError register signed sizeof struct template typedef union + syn keyword javaError unsigned operator +endif + +" The following cluster contains all java groups except the contained ones +syn cluster javaTop add=javaExternal,javaError,javaError,javaBranch,javaLabelRegion,javaLabel,javaConditional,javaRepeat,javaBoolean,javaConstant,javaTypedef,javaOperator,javaType,javaType,javaStatement,javaStorageClass,javaAssert,javaExceptions,javaMethodDecl,javaClassDecl,javaClassDecl,javaClassDecl,javaScopeDecl,javaError,javaError2,javaUserLabel,javaLangObject,javaAnnotation,javaVarArg + + +" Comments +syn keyword javaTodo contained TODO FIXME XXX +if exists("java_comment_strings") + syn region javaCommentString contained start=+"+ end=+"+ end=+$+ end=+\*/+me=s-1,he=s-1 contains=javaSpecial,javaCommentStar,javaSpecialChar,@Spell + syn region javaComment2String contained start=+"+ end=+$\|"+ contains=javaSpecial,javaSpecialChar,@Spell + syn match javaCommentCharacter contained "'\\[^']\{1,6\}'" contains=javaSpecialChar + syn match javaCommentCharacter contained "'\\''" contains=javaSpecialChar + syn match javaCommentCharacter contained "'[^\\]'" + syn cluster javaCommentSpecial add=javaCommentString,javaCommentCharacter,javaNumber + syn cluster javaCommentSpecial2 add=javaComment2String,javaCommentCharacter,javaNumber +endif +syn region javaComment start="/\*" end="\*/" contains=@javaCommentSpecial,javaTodo,@Spell +syn match javaCommentStar contained "^\s*\*[^/]"me=e-1 +syn match javaCommentStar contained "^\s*\*$" +syn match javaLineComment "//.*" contains=@javaCommentSpecial2,javaTodo,@Spell +JavaHiLink javaCommentString javaString +JavaHiLink javaComment2String javaString +JavaHiLink javaCommentCharacter javaCharacter + +syn cluster javaTop add=javaComment,javaLineComment + +if !exists("java_ignore_javadoc") && main_syntax != 'jsp' + syntax case ignore + " syntax coloring for javadoc comments (HTML) + syntax include @javaHtml :p:h/html.vim + unlet b:current_syntax + " HTML enables spell checking for all text that is not in a syntax item. This + " is wrong for Java (all identifiers would be spell-checked), so it's undone + " here. + syntax spell default + + syn region javaDocComment start="/\*\*" end="\*/" keepend contains=javaCommentTitle,@javaHtml,javaDocTags,javaDocSeeTag,javaTodo,@Spell + syn region javaCommentTitle contained matchgroup=javaDocComment start="/\*\*" matchgroup=javaCommentTitle keepend end="\.$" end="\.[ \t\r<&]"me=e-1 end="[^{]@"me=s-2,he=s-1 end="\*/"me=s-1,he=s-1 contains=@javaHtml,javaCommentStar,javaTodo,@Spell,javaDocTags,javaDocSeeTag + + syn region javaDocTags contained start="{@\(link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" end="}" + syn match javaDocTags contained "@\(param\|exception\|throws\|since\)\s\+\S\+" contains=javaDocParam + syn match javaDocParam contained "\s\S\+" + syn match javaDocTags contained "@\(version\|author\|return\|deprecated\|serial\|serialField\|serialData\)\>" + syn region javaDocSeeTag contained matchgroup=javaDocTags start="@see\s\+" matchgroup=NONE end="\_."re=e-1 contains=javaDocSeeTagParam + syn match javaDocSeeTagParam contained @"\_[^"]\+"\|\|\(\k\|\.\)*\(#\k\+\((\_[^)]\+)\)\=\)\=@ extend + syntax case match +endif + +" match the special comment /**/ +syn match javaComment "/\*\*/" + +" Strings and constants +syn match javaSpecialError contained "\\." +syn match javaSpecialCharError contained "[^']" +syn match javaSpecialChar contained "\\\([4-9]\d\|[0-3]\d\d\|[\"\\'ntbrf]\|u\+\x\{4\}\)" +syn region javaString start=+"+ end=+"+ end=+$+ contains=javaSpecialChar,javaSpecialError,@Spell +" next line disabled, it can cause a crash for a long line +"syn match javaStringError +"\([^"\\]\|\\.\)*$+ +syn match javaCharacter "'[^']*'" contains=javaSpecialChar,javaSpecialCharError +syn match javaCharacter "'\\''" contains=javaSpecialChar +syn match javaCharacter "'[^\\]'" +syn match javaNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>" +syn match javaNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=" +syn match javaNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" +syn match javaNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>" + +" unicode characters +syn match javaSpecial "\\u\+\d\{4\}" + +syn cluster javaTop add=javaString,javaCharacter,javaNumber,javaSpecial,javaStringError + +if exists("java_highlight_functions") + if java_highlight_functions == "indent" + syn match javaFuncDef "^\(\t\| \{8\}\)[_$a-zA-Z][_$a-zA-Z0-9_. \[\]]*([^-+*/()]*)" contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses + syn region javaFuncDef start=+^\(\t\| \{8\}\)[$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*,\s*+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses + syn match javaFuncDef "^ [$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*)" contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses + syn region javaFuncDef start=+^ [$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*,\s*+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses + else + " This line catches method declarations at any indentation>0, but it assumes + " two things: + " 1. class names are always capitalized (ie: Button) + " 2. method names are never capitalized (except constructors, of course) + syn region javaFuncDef start=+^\s\+\(\(public\|protected\|private\|static\|abstract\|final\|native\|synchronized\)\s\+\)*\(\(void\|boolean\|char\|byte\|short\|int\|long\|float\|double\|\([A-Za-z_][A-Za-z0-9_$]*\.\)*[A-Z][A-Za-z0-9_$]*\)\(<[^>]*>\)\=\(\[\]\)*\s\+[a-z][A-Za-z0-9_$]*\|[A-Z][A-Za-z0-9_$]*\)\s*([^0-9]+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,javaComment,javaLineComment,@javaClasses + endif + syn match javaBraces "[{}]" + syn cluster javaTop add=javaFuncDef,javaBraces +endif + +if exists("java_highlight_debug") + + " Strings and constants + syn match javaDebugSpecial contained "\\\d\d\d\|\\." + syn region javaDebugString contained start=+"+ end=+"+ contains=javaDebugSpecial + syn match javaDebugStringError +"\([^"\\]\|\\.\)*$+ + syn match javaDebugCharacter contained "'[^\\]'" + syn match javaDebugSpecialCharacter contained "'\\.'" + syn match javaDebugSpecialCharacter contained "'\\''" + syn match javaDebugNumber contained "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>" + syn match javaDebugNumber contained "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=" + syn match javaDebugNumber contained "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" + syn match javaDebugNumber contained "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>" + syn keyword javaDebugBoolean contained true false + syn keyword javaDebugType contained null this super + syn region javaDebugParen start=+(+ end=+)+ contained contains=javaDebug.*,javaDebugParen + + " to make this work you must define the highlighting for these groups + syn match javaDebug "\= 508 || !exists("did_c_syn_inits") + JavaHiLink javaDebug Debug + JavaHiLink javaDebugString DebugString + JavaHiLink javaDebugStringError javaError + JavaHiLink javaDebugType DebugType + JavaHiLink javaDebugBoolean DebugBoolean + JavaHiLink javaDebugNumber Debug + JavaHiLink javaDebugSpecial DebugSpecial + JavaHiLink javaDebugSpecialCharacter DebugSpecial + JavaHiLink javaDebugCharacter DebugString + JavaHiLink javaDebugParen Debug + + JavaHiLink DebugString String + JavaHiLink DebugSpecial Special + JavaHiLink DebugBoolean Boolean + JavaHiLink DebugType Type + endif +endif + +if exists("java_mark_braces_in_parens_as_errors") + syn match javaInParen contained "[{}]" + JavaHiLink javaInParen javaError + syn cluster javaTop add=javaInParen +endif + +" catch errors caused by wrong parenthesis +syn region javaParenT transparent matchgroup=javaParen start="(" end=")" contains=@javaTop,javaParenT1 +syn region javaParenT1 transparent matchgroup=javaParen1 start="(" end=")" contains=@javaTop,javaParenT2 contained +syn region javaParenT2 transparent matchgroup=javaParen2 start="(" end=")" contains=@javaTop,javaParenT contained +syn match javaParenError ")" +" catch errors caused by wrong square parenthesis +syn region javaParenT transparent matchgroup=javaParen start="\[" end="\]" contains=@javaTop,javaParenT1 +syn region javaParenT1 transparent matchgroup=javaParen1 start="\[" end="\]" contains=@javaTop,javaParenT2 contained +syn region javaParenT2 transparent matchgroup=javaParen2 start="\[" end="\]" contains=@javaTop,javaParenT contained +syn match javaParenError "\]" + +JavaHiLink javaParenError javaError + +if !exists("java_minlines") + let java_minlines = 10 +endif +exec "syn sync ccomment javaComment minlines=" . java_minlines + +" The default highlighting. +if version >= 508 || !exists("did_java_syn_inits") + if version < 508 + let did_java_syn_inits = 1 + endif + JavaHiLink javaFuncDef Function + JavaHiLink javaVarArg Function + JavaHiLink javaBraces Function + JavaHiLink javaBranch Conditional + JavaHiLink javaUserLabelRef javaUserLabel + JavaHiLink javaLabel Label + JavaHiLink javaUserLabel Label + JavaHiLink javaConditional Conditional + JavaHiLink javaRepeat Repeat + JavaHiLink javaExceptions Exception + JavaHiLink javaAssert Statement + JavaHiLink javaStorageClass StorageClass + JavaHiLink javaMethodDecl javaStorageClass + JavaHiLink javaClassDecl javaStorageClass + JavaHiLink javaScopeDecl javaStorageClass + JavaHiLink javaBoolean Boolean + JavaHiLink javaSpecial Special + JavaHiLink javaSpecialError Error + JavaHiLink javaSpecialCharError Error + JavaHiLink javaString String + JavaHiLink javaCharacter Character + JavaHiLink javaSpecialChar SpecialChar + JavaHiLink javaNumber Number + JavaHiLink javaError Error + JavaHiLink javaStringError Error + JavaHiLink javaStatement Statement + JavaHiLink javaOperator Operator + JavaHiLink javaComment Comment + JavaHiLink javaDocComment Comment + JavaHiLink javaLineComment Comment + JavaHiLink javaConstant Constant + JavaHiLink javaTypedef Typedef + JavaHiLink javaTodo Todo + JavaHiLink javaAnnotation PreProc + + JavaHiLink javaCommentTitle SpecialComment + JavaHiLink javaDocTags Special + JavaHiLink javaDocParam Function + JavaHiLink javaDocSeeTagParam Function + JavaHiLink javaCommentStar javaComment + + JavaHiLink javaType Type + JavaHiLink javaExternal Include + + JavaHiLink htmlComment Special + JavaHiLink htmlCommentPart Special + JavaHiLink javaSpaceError Error +endif + +delcommand JavaHiLink + +let b:current_syntax = "java" + +if main_syntax == 'java' + unlet main_syntax +endif + +let b:spell_options="contained" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/javacc.vim b/vim/bundle/ubuntu-vim72/syntax/javacc.vim new file mode 100644 index 0000000..57c57b5 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/javacc.vim @@ -0,0 +1,77 @@ +" Vim syntax file +" Language: JavaCC, a Java Compiler Compiler written by JavaSoft +" Maintainer: Claudio Fleiner +" URL: http://www.fleiner.com/vim/syntax/javacc.vim +" Last Change: 2001 Jun 20 + +" Uses java.vim, and adds a few special things for JavaCC Parser files. +" Those files usually have the extension *.jj + +" 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 + +" source the java.vim file +if version < 600 + source :p:h/java.vim +else + runtime! syntax/java.vim +endif +unlet b:current_syntax + +"remove catching errors caused by wrong parenthesis (does not work in javacc +"files) (first define them in case they have not been defined in java) +syn match javaParen "--" +syn match javaParenError "--" +syn match javaInParen "--" +syn match javaError2 "--" +syn clear javaParen +syn clear javaParenError +syn clear javaInParen +syn clear javaError2 + +" remove function definitions (they look different) (first define in +" in case it was not defined in java.vim) +"syn match javaFuncDef "--" +syn clear javaFuncDef +syn match javaFuncDef "[$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*)[ \t]*:" contains=javaType + +syn keyword javaccPackages options DEBUG_PARSER DEBUG_LOOKAHEAD DEBUG_TOKEN_MANAGER +syn keyword javaccPackages COMMON_TOKEN_ACTION IGNORE_CASE CHOICE_AMBIGUITY_CHECK +syn keyword javaccPackages OTHER_AMBIGUITY_CHECK STATIC LOOKAHEAD ERROR_REPORTING +syn keyword javaccPackages USER_TOKEN_MANAGER USER_CHAR_STREAM JAVA_UNICODE_ESCAPE +syn keyword javaccPackages UNICODE_INPUT +syn match javaccPackages "PARSER_END([^)]*)" +syn match javaccPackages "PARSER_BEGIN([^)]*)" +syn match javaccSpecToken "" +" the dot is necessary as otherwise it will be matched as a keyword. +syn match javaccSpecToken ".LOOKAHEAD("ms=s+1,me=e-1 +syn match javaccToken "<[^> \t]*>" +syn keyword javaccActionToken TOKEN SKIP MORE SPECIAL_TOKEN +syn keyword javaccError DEBUG IGNORE_IN_BNF + +" 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_css_syn_inits") + if version < 508 + let did_css_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + HiLink javaccSpecToken Statement + HiLink javaccActionToken Type + HiLink javaccPackages javaScopeDecl + HiLink javaccToken String + HiLink javaccError Error + delcommand HiLink +endif + +let b:current_syntax = "javacc" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/javascript.vim b/vim/bundle/ubuntu-vim72/syntax/javascript.vim new file mode 100644 index 0000000..ba8975b --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/javascript.vim @@ -0,0 +1,137 @@ +" Vim syntax file +" Language: JavaScript +" Maintainer: Claudio Fleiner +" Updaters: Scott Shattuck (ss) +" URL: http://www.fleiner.com/vim/syntax/javascript.vim +" Changes: (ss) added keywords, reserved words, and other identifiers +" (ss) repaired several quoting and grouping glitches +" (ss) fixed regex parsing issue with multiple qualifiers [gi] +" (ss) additional factoring of keywords, globals, and members +" Last Change: 2006 Jun 19 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +" tuning parameters: +" unlet javaScript_fold + +if !exists("main_syntax") + if version < 600 + syntax clear + elseif exists("b:current_syntax") + finish + endif + let main_syntax = 'javascript' +endif + +" Drop fold if it set but vim doesn't support it. +if version < 600 && exists("javaScript_fold") + unlet javaScript_fold +endif + +syn case ignore + + +syn keyword javaScriptCommentTodo TODO FIXME XXX TBD contained +syn match javaScriptLineComment "\/\/.*" contains=@Spell,javaScriptCommentTodo +syn match javaScriptCommentSkip "^[ \t]*\*\($\|[ \t]\+\)" +syn region javaScriptComment start="/\*" end="\*/" contains=@Spell,javaScriptCommentTodo +syn match javaScriptSpecial "\\\d\d\d\|\\." +syn region javaScriptStringD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+ contains=javaScriptSpecial,@htmlPreproc +syn region javaScriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ contains=javaScriptSpecial,@htmlPreproc + +syn match javaScriptSpecialCharacter "'\\.'" +syn match javaScriptNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" +syn region javaScriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gi]\{0,2\}\s*$+ end=+/[gi]\{0,2\}\s*[;.,)\]}]+me=e-1 contains=@htmlPreproc oneline + +syn keyword javaScriptConditional if else switch +syn keyword javaScriptRepeat while for do in +syn keyword javaScriptBranch break continue +syn keyword javaScriptOperator new delete instanceof typeof +syn keyword javaScriptType Array Boolean Date Function Number Object String RegExp +syn keyword javaScriptStatement return with +syn keyword javaScriptBoolean true false +syn keyword javaScriptNull null undefined +syn keyword javaScriptIdentifier arguments this var +syn keyword javaScriptLabel case default +syn keyword javaScriptException try catch finally throw +syn keyword javaScriptMessage alert confirm prompt status +syn keyword javaScriptGlobal self window top parent +syn keyword javaScriptMember document event location +syn keyword javaScriptDeprecated escape unescape +syn keyword javaScriptReserved abstract boolean byte char class const debugger double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile + +if exists("javaScript_fold") + syn match javaScriptFunction "\" + syn region javaScriptFunctionFold start="\.*[^};]$" end="^\z1}.*$" transparent fold keepend + + syn sync match javaScriptSync grouphere javaScriptFunctionFold "\" + syn sync match javaScriptSync grouphere NONE "^}" + + setlocal foldmethod=syntax + setlocal foldtext=getline(v:foldstart) +else + syn keyword javaScriptFunction function + syn match javaScriptBraces "[{}\[\]]" + syn match javaScriptParens "[()]" +endif + +syn sync fromstart +syn sync maxlines=100 + +if main_syntax == "javascript" + syn sync ccomment javaScriptComment +endif + +" 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_javascript_syn_inits") + if version < 508 + let did_javascript_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + HiLink javaScriptComment Comment + HiLink javaScriptLineComment Comment + HiLink javaScriptCommentTodo Todo + HiLink javaScriptSpecial Special + HiLink javaScriptStringS String + HiLink javaScriptStringD String + HiLink javaScriptCharacter Character + HiLink javaScriptSpecialCharacter javaScriptSpecial + HiLink javaScriptNumber javaScriptValue + HiLink javaScriptConditional Conditional + HiLink javaScriptRepeat Repeat + HiLink javaScriptBranch Conditional + HiLink javaScriptOperator Operator + HiLink javaScriptType Type + HiLink javaScriptStatement Statement + HiLink javaScriptFunction Function + HiLink javaScriptBraces Function + HiLink javaScriptError Error + HiLink javaScrParenError javaScriptError + HiLink javaScriptNull Keyword + HiLink javaScriptBoolean Boolean + HiLink javaScriptRegexpString String + + HiLink javaScriptIdentifier Identifier + HiLink javaScriptLabel Label + HiLink javaScriptException Exception + HiLink javaScriptMessage Keyword + HiLink javaScriptGlobal Keyword + HiLink javaScriptMember Keyword + HiLink javaScriptDeprecated Exception + HiLink javaScriptReserved Keyword + HiLink javaScriptDebug Debug + HiLink javaScriptConstant Label + + delcommand HiLink +endif + +let b:current_syntax = "javascript" +if main_syntax == 'javascript' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/jess.vim b/vim/bundle/ubuntu-vim72/syntax/jess.vim new file mode 100644 index 0000000..243bab3 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/jess.vim @@ -0,0 +1,161 @@ +" Vim syntax file +" Language: Jess +" Maintainer: Paul Baleme +" Last change: September 14, 2000 +" Based on lisp.vim by : Dr. Charles E. Campbell, Jr. + +" 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 + +if version < 600 + set iskeyword=42,43,45,47-58,60-62,64-90,97-122,_ +else + setlocal iskeyword=42,43,45,47-58,60-62,64-90,97-122,_ +endif + +" Lists +syn match jessSymbol ![^()'`,"; \t]\+! contained +syn match jessBarSymbol !|..\{-}|! contained +syn region jessList matchgroup=Delimiter start="(" skip="|.\{-}|" matchgroup=Delimiter end=")" contains=jessAtom,jessBQList,jessConcat,jessDeclaration,jessList,jessNumber,jessSymbol,jessSpecial,jessFunc,jessKey,jessAtomMark,jessString,jessComment,jessBarSymbol,jessAtomBarSymbol,jessVar +syn region jessBQList matchgroup=PreProc start="`(" skip="|.\{-}|" matchgroup=PreProc end=")" contains=jessAtom,jessBQList,jessConcat,jessDeclaration,jessList,jessNumber,jessSpecial,jessSymbol,jessFunc,jessKey,jessVar,jessAtomMark,jessString,jessComment,jessBarSymbol,jessAtomBarSymbol + +" Atoms +syn match jessAtomMark "'" +syn match jessAtom "'("me=e-1 contains=jessAtomMark nextgroup=jessAtomList +syn match jessAtom "'[^ \t()]\+" contains=jessAtomMark +syn match jessAtomBarSymbol !'|..\{-}|! contains=jessAtomMark +syn region jessAtom start=+'"+ skip=+\\"+ end=+"+ +syn region jessAtomList matchgroup=Special start="(" skip="|.\{-}|" matchgroup=Special end=")" contained contains=jessAtomList,jessAtomNmbr0,jessString,jessComment,jessAtomBarSymbol +syn match jessAtomNmbr "\<[0-9]\+" contained + +" Standard jess Functions and Macros +syn keyword jessFunc * + ** - / < > <= >= <> = +syn keyword jessFunc long longp +syn keyword jessFunc abs agenda and +syn keyword jessFunc assert assert-string bag +syn keyword jessFunc batch bind bit-and +syn keyword jessFunc bit-not bit-or bload +syn keyword jessFunc bsave build call +syn keyword jessFunc clear clear-storage close +syn keyword jessFunc complement$ context count-query-results +syn keyword jessFunc create$ +syn keyword jessFunc delete$ div +syn keyword jessFunc do-backward-chaining e +syn keyword jessFunc engine eq eq* +syn keyword jessFunc eval evenp exit +syn keyword jessFunc exp explode$ external-addressp +syn keyword jessFunc fact-slot-value facts fetch +syn keyword jessFunc first$ float floatp +syn keyword jessFunc foreach format gensym* +syn keyword jessFunc get get-fact-duplication +syn keyword jessFunc get-member get-multithreaded-io +syn keyword jessFunc get-reset-globals get-salience-evaluation +syn keyword jessFunc halt if implode$ +syn keyword jessFunc import insert$ integer +syn keyword jessFunc integerp intersection$ jess-version-number +syn keyword jessFunc jess-version-string length$ +syn keyword jessFunc lexemep list-function$ load-facts +syn keyword jessFunc load-function load-package log +syn keyword jessFunc log10 lowcase matches +syn keyword jessFunc max member$ min +syn keyword jessFunc mod modify multifieldp +syn keyword jessFunc neq new not +syn keyword jessFunc nth$ numberp oddp +syn keyword jessFunc open or pi +syn keyword jessFunc ppdeffunction ppdefglobal ddpefrule +syn keyword jessFunc printout random read +syn keyword jessFunc readline replace$ reset +syn keyword jessFunc rest$ retract retract-string +syn keyword jessFunc return round rules +syn keyword jessFunc run run-query run-until-halt +syn keyword jessFunc save-facts set set-fact-duplication +syn keyword jessFunc set-factory set-member set-multithreaded-io +syn keyword jessFunc set-node-index-hash set-reset-globals +syn keyword jessFunc set-salience-evaluation set-strategy +syn keyword jessFunc setgen show-deffacts show-deftemplates +syn keyword jessFunc show-jess-listeners socket +syn keyword jessFunc sqrt store str-cat +syn keyword jessFunc str-compare str-index str-length +syn keyword jessFunc stringp sub-string subseq$ +syn keyword jessFunc subsetp sym-cat symbolp +syn keyword jessFunc system throw time +syn keyword jessFunc try undefadvice undefinstance +syn keyword jessFunc undefrule union$ unwatch +syn keyword jessFunc upcase view watch +syn keyword jessFunc while +syn match jessFunc "\" + +" jess Keywords (modifiers) +syn keyword jessKey defglobal deffunction defrule +syn keyword jessKey deffacts +syn keyword jessKey defadvice defclass definstance + +" Standard jess Variables +syn region jessVar start="?" end="[^a-zA-Z0-9]"me=e-1 + +" Strings +syn region jessString start=+"+ skip=+\\"+ end=+"+ + +" Shared with Declarations, Macros, Functions +"syn keyword jessDeclaration + +syn match jessNumber "[0-9]\+" + +syn match jessSpecial "\*[a-zA-Z_][a-zA-Z_0-9-]*\*" +syn match jessSpecial !#|[^()'`,"; \t]\+|#! +syn match jessSpecial !#x[0-9a-fA-F]\+! +syn match jessSpecial !#o[0-7]\+! +syn match jessSpecial !#b[01]\+! +syn match jessSpecial !#\\[ -\~]! +syn match jessSpecial !#[':][^()'`,"; \t]\+! +syn match jessSpecial !#([^()'`,"; \t]\+)! + +syn match jessConcat "\s\.\s" +syntax match jessParenError ")" + +" Comments +syn match jessComment ";.*$" + +" synchronization +syn sync lines=100 + +" 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_jess_syntax_inits") + if version < 508 + let did_jess_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink jessAtomNmbr jessNumber + HiLink jessAtomMark jessMark + + HiLink jessAtom Identifier + HiLink jessAtomBarSymbol Special + HiLink jessBarSymbol Special + HiLink jessComment Comment + HiLink jessConcat Statement + HiLink jessDeclaration Statement + HiLink jessFunc Statement + HiLink jessKey Type + HiLink jessMark Delimiter + HiLink jessNumber Number + HiLink jessParenError Error + HiLink jessSpecial Type + HiLink jessString String + HiLink jessVar Identifier + + delcommand HiLink +endif + +let b:current_syntax = "jess" + +" vim: ts=18 diff --git a/vim/bundle/ubuntu-vim72/syntax/jgraph.vim b/vim/bundle/ubuntu-vim72/syntax/jgraph.vim new file mode 100644 index 0000000..7ecd5af --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/jgraph.vim @@ -0,0 +1,58 @@ +" Vim syntax file +" Language: jgraph (graph plotting utility) +" Maintainer: Jonas Munsin jmunsin@iki.fi +" Last Change: 2003 May 04 +" this syntax file is not yet complete + + +" 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 match + +" comments +syn region jgraphComment start="(\* " end=" \*)" + +syn keyword jgraphCmd newcurve newgraph marktype +syn keyword jgraphType xaxis yaxis + +syn keyword jgraphType circle box diamond triangle x cross ellipse +syn keyword jgraphType xbar ybar text postscript eps none general + +syn keyword jgraphType solid dotted dashed longdash dotdash dodotdash +syn keyword jgraphType dotdotdashdash pts + +"integer number, or floating point number without a dot. - or no - +syn match jgraphNumber "\<-\=\d\+\>" +"floating point number, with dot - or no - +syn match jgraphNumber "\<-\=\d\+\.\d*\>" +"floating point number, starting with a dot - or no - +syn match jgraphNumber "\-\=\.\d\+\>" + + +" 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_jgraph_syn_inits") + if version < 508 + let did_jgraph_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink jgraphComment Comment + HiLink jgraphCmd Identifier + HiLink jgraphType Type + HiLink jgraphNumber Number + + delcommand HiLink +endif + + +let b:current_syntax = "jgraph" diff --git a/vim/bundle/ubuntu-vim72/syntax/jproperties.vim b/vim/bundle/ubuntu-vim72/syntax/jproperties.vim new file mode 100644 index 0000000..9343bd2 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/jproperties.vim @@ -0,0 +1,148 @@ +" Vim syntax file +" Language: Java Properties resource file (*.properties[_*]) +" Maintainer: Simon Baldwin +" Last change: 26th Mar 2000 + +" ============================================================================= + +" Optional and tuning variables: + +" jproperties_lines +" ----------------- +" Set a value for the sync block that we use to find long continuation lines +" in properties; the value is already large - if you have larger continuation +" sets you may need to increase it further - if not, and you find editing is +" slow, reduce the value of jproperties_lines. +if !exists("jproperties_lines") + let jproperties_lines = 256 +endif + +" jproperties_strict_syntax +" ------------------------- +" Most properties files assign values with "id=value" or "id:value". But, +" strictly, the Java properties parser also allows "id value", "id", and +" even more bizarrely "=value", ":value", " value", and so on. These latter +" ones, however, are rarely used, if ever, and handling them in the high- +" lighting can obscure errors in the more normal forms. So, in practice +" we take special efforts to pick out only "id=value" and "id:value" forms +" by default. If you want strict compliance, set jproperties_strict_syntax +" to non-zero (and good luck). +if !exists("jproperties_strict_syntax") + let jproperties_strict_syntax = 0 +endif + +" jproperties_show_messages +" ------------------------- +" If this properties file contains messages for use with MessageFormat, +" setting a non-zero value will highlight them. Messages are of the form +" "{...}". Highlighting doesn't go to the pains of picking apart what is +" in the format itself - just the basics for now. +if !exists("jproperties_show_messages") + let jproperties_show_messages = 0 +endif + +" ============================================================================= + +" 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 + +" switch case sensitivity off +syn case ignore + +" set the block +exec "syn sync lines=" . jproperties_lines + +" switch between 'normal' and 'strict' syntax +if jproperties_strict_syntax != 0 + + " an assignment is pretty much any non-empty line at this point, + " trying to not think about continuation lines + syn match jpropertiesAssignment "^\s*[^[:space:]]\+.*$" contains=jpropertiesIdentifier + + " an identifier is anything not a space character, pretty much; it's + " followed by = or :, or space or tab. Or end-of-line. + syn match jpropertiesIdentifier "[^=:[:space:]]*" contained nextgroup=jpropertiesDelimiter + + " treat the delimiter specially to get colours right + syn match jpropertiesDelimiter "\s*[=:[:space:]]\s*" contained nextgroup=jpropertiesString + + " catch the bizarre case of no identifier; a special case of delimiter + syn match jpropertiesEmptyIdentifier "^\s*[=:]\s*" nextgroup=jpropertiesString +else + + " here an assignment is id=value or id:value, and we conveniently + " ignore continuation lines for the present + syn match jpropertiesAssignment "^\s*[^=:[:space:]]\+\s*[=:].*$" contains=jpropertiesIdentifier + + " an identifier is anything not a space character, pretty much; it's + " always followed by = or :, and we find it in an assignment + syn match jpropertiesIdentifier "[^=:[:space:]]\+" contained nextgroup=jpropertiesDelimiter + + " treat the delimiter specially to get colours right; this time the + " delimiter must contain = or : + syn match jpropertiesDelimiter "\s*[=:]\s*" contained nextgroup=jpropertiesString +endif + +" a definition is all up to the last non-\-terminated line; strictly, Java +" properties tend to ignore leading whitespace on all lines of a multi-line +" definition, but we don't look for that here (because it's a major hassle) +syn region jpropertiesString start="" skip="\\$" end="$" contained contains=jpropertiesSpecialChar,jpropertiesError,jpropertiesSpecial + +" {...} is a Java Message formatter - add a minimal recognition of these +" if required +if jproperties_show_messages != 0 + syn match jpropertiesSpecial "{[^}]*}\{-1,\}" contained + syn match jpropertiesSpecial "'{" contained + syn match jpropertiesSpecial "''" contained +endif + +" \uABCD are unicode special characters +syn match jpropertiesSpecialChar "\\u\x\{1,4}" contained + +" ...and \u not followed by a hex digit is an error, though the properties +" file parser won't issue an error on it, just set something wacky like zero +syn match jpropertiesError "\\u\X\{1,4}" contained +syn match jpropertiesError "\\u$"me=e-1 contained + +" other things of note are the \t,r,n,\, and the \ preceding line end +syn match jpropertiesSpecial "\\[trn\\]" contained +syn match jpropertiesSpecial "\\\s" contained +syn match jpropertiesSpecial "\\$" contained + +" comments begin with # or !, and persist to end of line; put here since +" they may have been caught by patterns above us +syn match jpropertiesComment "^\s*[#!].*$" contains=jpropertiesTODO +syn keyword jpropertiesTodo TODO FIXME XXX contained + +" 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_jproperties_syntax_inits") + if version < 508 + let did_jproperties_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink jpropertiesComment Comment + HiLink jpropertiesTodo Todo + HiLink jpropertiesIdentifier Identifier + HiLink jpropertiesString String + HiLink jpropertiesExtendString String + HiLink jpropertiesCharacter Character + HiLink jpropertiesSpecial Special + HiLink jpropertiesSpecialChar SpecialChar + HiLink jpropertiesError Error + + delcommand HiLink +endif + +let b:current_syntax = "jproperties" + +" vim:ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/jsp.vim b/vim/bundle/ubuntu-vim72/syntax/jsp.vim new file mode 100644 index 0000000..523c8e3 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/jsp.vim @@ -0,0 +1,84 @@ +" Vim syntax file +" Language: JSP (Java Server Pages) +" Maintainer: Rafael Garcia-Suarez +" URL: http://rgarciasuarez.free.fr/vim/syntax/jsp.vim +" Last change: 2004 Feb 02 +" Credits : Patch by Darren Greaves (recognizes tags) +" Patch by Thomas Kimpton (recognizes jspExpr inside HTML tags) + +" 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 + +if !exists("main_syntax") + let main_syntax = 'jsp' +endif + +" Source HTML syntax +if version < 600 + source :p:h/html.vim +else + runtime! syntax/html.vim +endif +unlet b:current_syntax + +" Next syntax items are case-sensitive +syn case match + +" Include Java syntax +syn include @jspJava :p:h/java.vim + +syn region jspScriptlet matchgroup=jspTag start=/<%/ keepend end=/%>/ contains=@jspJava +syn region jspComment start=/<%--/ end=/--%>/ +syn region jspDecl matchgroup=jspTag start=/<%!/ keepend end=/%>/ contains=@jspJava +syn region jspExpr matchgroup=jspTag start=/<%=/ keepend end=/%>/ contains=@jspJava +syn region jspDirective start=/<%@/ end=/%>/ contains=htmlString,jspDirName,jspDirArg + +syn keyword jspDirName contained include page taglib +syn keyword jspDirArg contained file uri prefix language extends import session buffer autoFlush +syn keyword jspDirArg contained isThreadSafe info errorPage contentType isErrorPage +syn region jspCommand start=// end=/\/>/ contains=htmlString,jspCommandName,jspCommandArg +syn keyword jspCommandName contained include forward getProperty plugin setProperty useBean param params fallback +syn keyword jspCommandArg contained id scope class type beanName page flush name value property +syn keyword jspCommandArg contained code codebase name archive align height +syn keyword jspCommandArg contained width hspace vspace jreversion nspluginurl iepluginurl + +" Redefine htmlTag so that it can contain jspExpr +syn region htmlTag start=+<[^/%]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster,jspExpr + +" 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_jsp_syn_inits") + if version < 508 + let did_jsp_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + " java.vim has redefined htmlComment highlighting + HiLink htmlComment Comment + HiLink htmlCommentPart Comment + " Be consistent with html highlight settings + HiLink jspComment htmlComment + HiLink jspTag htmlTag + HiLink jspDirective jspTag + HiLink jspDirName htmlTagName + HiLink jspDirArg htmlArg + HiLink jspCommand jspTag + HiLink jspCommandName htmlTagName + HiLink jspCommandArg htmlArg + delcommand HiLink +endif + +if main_syntax == 'jsp' + unlet main_syntax +endif + +let b:current_syntax = "jsp" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/kconfig.vim b/vim/bundle/ubuntu-vim72/syntax/kconfig.vim new file mode 100644 index 0000000..a6ceb17 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/kconfig.vim @@ -0,0 +1,736 @@ +" Vim syntax file +" Maintainer: Nikolai Weibull +" Latest Revision: 2009-05-25 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +if exists("g:kconfig_syntax_heavy") + +syn match kconfigBegin '^' nextgroup=kconfigKeyword + \ skipwhite + +syn keyword kconfigTodo contained TODO FIXME XXX NOTE + +syn match kconfigComment display '#.*$' contains=kconfigTodo + +syn keyword kconfigKeyword config nextgroup=kconfigSymbol + \ skipwhite + +syn keyword kconfigKeyword menuconfig nextgroup=kconfigSymbol + \ skipwhite + +syn keyword kconfigKeyword comment menu mainmenu + \ nextgroup=kconfigKeywordPrompt + \ skipwhite + +syn keyword kconfigKeyword choice + \ nextgroup=@kconfigConfigOptions + \ skipwhite skipnl + +syn keyword kconfigKeyword endmenu endchoice + +syn keyword kconfigPreProc source + \ nextgroup=kconfigPath + \ skipwhite + +" TODO: This is a hack. The who .*Expr stuff should really be generated so +" that we can reuse it for various nextgroups. +syn keyword kconfigConditional if endif + \ nextgroup=@kconfigConfigOptionIfExpr + \ skipwhite + +syn match kconfigKeywordPrompt '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=@kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigPath '"[^"\\]*\%(\\.[^"\\]*\)*"\|\S\+' + \ contained + +syn match kconfigSymbol '\<\k\+\>' + \ contained + \ nextgroup=@kconfigConfigOptions + \ skipwhite skipnl + +" FIXME: There is – probably – no reason to cluster these instead of just +" defining them in the same group. +syn cluster kconfigConfigOptions contains=kconfigTypeDefinition, + \ kconfigInputPrompt, + \ kconfigDefaultValue, + \ kconfigDependencies, + \ kconfigReverseDependencies, + \ kconfigNumericalRanges, + \ kconfigHelpText, + \ kconfigDefBool, + \ kconfigOptional + +syn keyword kconfigTypeDefinition bool boolean tristate string hex int + \ contained + \ nextgroup=kconfigTypeDefPrompt, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigTypeDefPrompt '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigTypeDefPrompt "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn keyword kconfigInputPrompt prompt + \ contained + \ nextgroup=kconfigPromptPrompt + \ skipwhite + +syn match kconfigPromptPrompt '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigPromptPrompt "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn keyword kconfigDefaultValue default + \ contained + \ nextgroup=@kconfigConfigOptionExpr + \ skipwhite + +syn match kconfigDependencies 'depends on\|requires' + \ contained + \ nextgroup=@kconfigConfigOptionIfExpr + \ skipwhite + +syn keyword kconfigReverseDependencies select + \ contained + \ nextgroup=@kconfigRevDepSymbol + \ skipwhite + +syn cluster kconfigRevDepSymbol contains=kconfigRevDepCSymbol, + \ kconfigRevDepNCSymbol + +syn match kconfigRevDepCSymbol '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigRevDepCSymbol "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigRevDepNCSymbol '\<\k\+\>' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn keyword kconfigNumericalRanges range + \ contained + \ nextgroup=@kconfigRangeSymbol + \ skipwhite + +syn cluster kconfigRangeSymbol contains=kconfigRangeCSymbol, + \ kconfigRangeNCSymbol + +syn match kconfigRangeCSymbol '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=@kconfigRangeSymbol2 + \ skipwhite skipnl + +syn match kconfigRangeCSymbol "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=@kconfigRangeSymbol2 + \ skipwhite skipnl + +syn match kconfigRangeNCSymbol '\<\k\+\>' + \ contained + \ nextgroup=@kconfigRangeSymbol2 + \ skipwhite skipnl + +syn cluster kconfigRangeSymbol2 contains=kconfigRangeCSymbol2, + \ kconfigRangeNCSymbol2 + +syn match kconfigRangeCSymbol2 "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigRangeNCSymbol2 '\<\k\+\>' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn region kconfigHelpText contained + \ matchgroup=kconfigConfigOption + \ start='\%(help\|---help---\)\ze\s*\n\z(\s\+\)' + \ skip='^$' + \ end='^\z1\@!' + \ nextgroup=@kconfigConfigOptions + \ skipwhite skipnl + +" XXX: Undocumented +syn keyword kconfigDefBool def_bool + \ contained + \ nextgroup=@kconfigDefBoolSymbol + \ skipwhite + +syn cluster kconfigDefBoolSymbol contains=kconfigDefBoolCSymbol, + \ kconfigDefBoolNCSymbol + +syn match kconfigDefBoolCSymbol '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigDefBoolCSymbol "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigDefBoolNCSymbol '\<\k\+\>' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ @kconfigConfigOptions + \ skipwhite skipnl + +" XXX: This is actually only a valid option for “choiceâ€, but treating it +" specially would require a lot of extra groups. +syn keyword kconfigOptional optional + \ contained + \ nextgroup=@kconfigConfigOptions + \ skipwhite skipnl + +syn keyword kconfigConfigOptionIf if + \ contained + \ nextgroup=@kconfigConfigOptionIfExpr + \ skipwhite + +syn cluster kconfigConfigOptionIfExpr contains=@kconfigConfOptIfExprSym, + \ kconfigConfOptIfExprNeg, + \ kconfigConfOptIfExprGroup + +syn cluster kconfigConfOptIfExprSym contains=kconfigConfOptIfExprCSym, + \ kconfigConfOptIfExprNCSym + +syn match kconfigConfOptIfExprCSym '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=@kconfigConfigOptions, + \ kconfigConfOptIfExprAnd, + \ kconfigConfOptIfExprOr, + \ kconfigConfOptIfExprEq, + \ kconfigConfOptIfExprNEq + \ skipwhite skipnl + +syn match kconfigConfOptIfExprCSym "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=@kconfigConfigOptions, + \ kconfigConfOptIfExprAnd, + \ kconfigConfOptIfExprOr, + \ kconfigConfOptIfExprEq, + \ kconfigConfOptIfExprNEq + \ skipwhite skipnl + +syn match kconfigConfOptIfExprNCSym '\<\k\+\>' + \ contained + \ nextgroup=@kconfigConfigOptions, + \ kconfigConfOptIfExprAnd, + \ kconfigConfOptIfExprOr, + \ kconfigConfOptIfExprEq, + \ kconfigConfOptIfExprNEq + \ skipwhite skipnl + +syn cluster kconfigConfOptIfExprSym2 contains=kconfigConfOptIfExprCSym2, + \ kconfigConfOptIfExprNCSym2 + +syn match kconfigConfOptIfExprEq '=' + \ contained + \ nextgroup=@kconfigConfOptIfExprSym2 + \ skipwhite + +syn match kconfigConfOptIfExprNEq '!=' + \ contained + \ nextgroup=@kconfigConfOptIfExprSym2 + \ skipwhite + +syn match kconfigConfOptIfExprCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=@kconfigConfigOptions, + \ kconfigConfOptIfExprAnd, + \ kconfigConfOptIfExprOr + \ skipwhite skipnl + +syn match kconfigConfOptIfExprNCSym2 '\<\k\+\>' + \ contained + \ nextgroup=@kconfigConfigOptions, + \ kconfigConfOptIfExprAnd, + \ kconfigConfOptIfExprOr + \ skipwhite skipnl + +syn match kconfigConfOptIfExprNeg '!' + \ contained + \ nextgroup=@kconfigConfigOptionIfExpr + \ skipwhite + +syn match kconfigConfOptIfExprAnd '&&' + \ contained + \ nextgroup=@kconfigConfigOptionIfExpr + \ skipwhite + +syn match kconfigConfOptIfExprOr '||' + \ contained + \ nextgroup=@kconfigConfigOptionIfExpr + \ skipwhite + +syn match kconfigConfOptIfExprGroup '(' + \ contained + \ nextgroup=@kconfigConfigOptionIfGExp + \ skipwhite + +" TODO: hm, this kind of recursion doesn't work right. We need another set of +" expressions that have kconfigConfigOPtionIfGExp as nextgroup and a matcher +" for '(' that sets it all off. +syn cluster kconfigConfigOptionIfGExp contains=@kconfigConfOptIfGExpSym, + \ kconfigConfOptIfGExpNeg, + \ kconfigConfOptIfExprGroup + +syn cluster kconfigConfOptIfGExpSym contains=kconfigConfOptIfGExpCSym, + \ kconfigConfOptIfGExpNCSym + +syn match kconfigConfOptIfGExpCSym '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=@kconfigConfigIf, + \ kconfigConfOptIfGExpAnd, + \ kconfigConfOptIfGExpOr, + \ kconfigConfOptIfGExpEq, + \ kconfigConfOptIfGExpNEq + \ skipwhite skipnl + +syn match kconfigConfOptIfGExpCSym "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=@kconfigConfigIf, + \ kconfigConfOptIfGExpAnd, + \ kconfigConfOptIfGExpOr, + \ kconfigConfOptIfGExpEq, + \ kconfigConfOptIfGExpNEq + \ skipwhite skipnl + +syn match kconfigConfOptIfGExpNCSym '\<\k\+\>' + \ contained + \ nextgroup=kconfigConfOptIfExprGrpE, + \ kconfigConfOptIfGExpAnd, + \ kconfigConfOptIfGExpOr, + \ kconfigConfOptIfGExpEq, + \ kconfigConfOptIfGExpNEq + \ skipwhite skipnl + +syn cluster kconfigConfOptIfGExpSym2 contains=kconfigConfOptIfGExpCSym2, + \ kconfigConfOptIfGExpNCSym2 + +syn match kconfigConfOptIfGExpEq '=' + \ contained + \ nextgroup=@kconfigConfOptIfGExpSym2 + \ skipwhite + +syn match kconfigConfOptIfGExpNEq '!=' + \ contained + \ nextgroup=@kconfigConfOptIfGExpSym2 + \ skipwhite + +syn match kconfigConfOptIfGExpCSym2 '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=kconfigConfOptIfExprGrpE, + \ kconfigConfOptIfGExpAnd, + \ kconfigConfOptIfGExpOr + \ skipwhite skipnl + +syn match kconfigConfOptIfGExpCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=kconfigConfOptIfExprGrpE, + \ kconfigConfOptIfGExpAnd, + \ kconfigConfOptIfGExpOr + \ skipwhite skipnl + +syn match kconfigConfOptIfGExpNCSym2 '\<\k\+\>' + \ contained + \ nextgroup=kconfigConfOptIfExprGrpE, + \ kconfigConfOptIfGExpAnd, + \ kconfigConfOptIfGExpOr + \ skipwhite skipnl + +syn match kconfigConfOptIfGExpNeg '!' + \ contained + \ nextgroup=@kconfigConfigOptionIfGExp + \ skipwhite + +syn match kconfigConfOptIfGExpAnd '&&' + \ contained + \ nextgroup=@kconfigConfigOptionIfGExp + \ skipwhite + +syn match kconfigConfOptIfGExpOr '||' + \ contained + \ nextgroup=@kconfigConfigOptionIfGExp + \ skipwhite + +syn match kconfigConfOptIfExprGrpE ')' + \ contained + \ nextgroup=@kconfigConfigOptions, + \ kconfigConfOptIfExprAnd, + \ kconfigConfOptIfExprOr + \ skipwhite skipnl + + +syn cluster kconfigConfigOptionExpr contains=@kconfigConfOptExprSym, + \ kconfigConfOptExprNeg, + \ kconfigConfOptExprGroup + +syn cluster kconfigConfOptExprSym contains=kconfigConfOptExprCSym, + \ kconfigConfOptExprNCSym + +syn match kconfigConfOptExprCSym '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ kconfigConfOptExprAnd, + \ kconfigConfOptExprOr, + \ kconfigConfOptExprEq, + \ kconfigConfOptExprNEq, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigConfOptExprCSym "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ kconfigConfOptExprAnd, + \ kconfigConfOptExprOr, + \ kconfigConfOptExprEq, + \ kconfigConfOptExprNEq, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigConfOptExprNCSym '\<\k\+\>' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ kconfigConfOptExprAnd, + \ kconfigConfOptExprOr, + \ kconfigConfOptExprEq, + \ kconfigConfOptExprNEq, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn cluster kconfigConfOptExprSym2 contains=kconfigConfOptExprCSym2, + \ kconfigConfOptExprNCSym2 + +syn match kconfigConfOptExprEq '=' + \ contained + \ nextgroup=@kconfigConfOptExprSym2 + \ skipwhite + +syn match kconfigConfOptExprNEq '!=' + \ contained + \ nextgroup=@kconfigConfOptExprSym2 + \ skipwhite + +syn match kconfigConfOptExprCSym2 '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ kconfigConfOptExprAnd, + \ kconfigConfOptExprOr, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigConfOptExprCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ kconfigConfOptExprAnd, + \ kconfigConfOptExprOr, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigConfOptExprNCSym2 '\<\k\+\>' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ kconfigConfOptExprAnd, + \ kconfigConfOptExprOr, + \ @kconfigConfigOptions + \ skipwhite skipnl + +syn match kconfigConfOptExprNeg '!' + \ contained + \ nextgroup=@kconfigConfigOptionExpr + \ skipwhite + +syn match kconfigConfOptExprAnd '&&' + \ contained + \ nextgroup=@kconfigConfigOptionExpr + \ skipwhite + +syn match kconfigConfOptExprOr '||' + \ contained + \ nextgroup=@kconfigConfigOptionExpr + \ skipwhite + +syn match kconfigConfOptExprGroup '(' + \ contained + \ nextgroup=@kconfigConfigOptionGExp + \ skipwhite + +syn cluster kconfigConfigOptionGExp contains=@kconfigConfOptGExpSym, + \ kconfigConfOptGExpNeg, + \ kconfigConfOptGExpGroup + +syn cluster kconfigConfOptGExpSym contains=kconfigConfOptGExpCSym, + \ kconfigConfOptGExpNCSym + +syn match kconfigConfOptGExpCSym '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=kconfigConfOptExprGrpE, + \ kconfigConfOptGExpAnd, + \ kconfigConfOptGExpOr, + \ kconfigConfOptGExpEq, + \ kconfigConfOptGExpNEq + \ skipwhite skipnl + +syn match kconfigConfOptGExpCSym "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=kconfigConfOptExprGrpE, + \ kconfigConfOptGExpAnd, + \ kconfigConfOptGExpOr, + \ kconfigConfOptGExpEq, + \ kconfigConfOptGExpNEq + \ skipwhite skipnl + +syn match kconfigConfOptGExpNCSym '\<\k\+\>' + \ contained + \ nextgroup=kconfigConfOptExprGrpE, + \ kconfigConfOptGExpAnd, + \ kconfigConfOptGExpOr, + \ kconfigConfOptGExpEq, + \ kconfigConfOptGExpNEq + \ skipwhite skipnl + +syn cluster kconfigConfOptGExpSym2 contains=kconfigConfOptGExpCSym2, + \ kconfigConfOptGExpNCSym2 + +syn match kconfigConfOptGExpEq '=' + \ contained + \ nextgroup=@kconfigConfOptGExpSym2 + \ skipwhite + +syn match kconfigConfOptGExpNEq '!=' + \ contained + \ nextgroup=@kconfigConfOptGExpSym2 + \ skipwhite + +syn match kconfigConfOptGExpCSym2 '"[^"\\]*\%(\\.[^"\\]*\)*"' + \ contained + \ nextgroup=kconfigConfOptExprGrpE, + \ kconfigConfOptGExpAnd, + \ kconfigConfOptGExpOr + \ skipwhite skipnl + +syn match kconfigConfOptGExpCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'" + \ contained + \ nextgroup=kconfigConfOptExprGrpE, + \ kconfigConfOptGExpAnd, + \ kconfigConfOptGExpOr + \ skipwhite skipnl + +syn match kconfigConfOptGExpNCSym2 '\<\k\+\>' + \ contained + \ nextgroup=kconfigConfOptExprGrpE, + \ kconfigConfOptGExpAnd, + \ kconfigConfOptGExpOr + \ skipwhite skipnl + +syn match kconfigConfOptGExpNeg '!' + \ contained + \ nextgroup=@kconfigConfigOptionGExp + \ skipwhite + +syn match kconfigConfOptGExpAnd '&&' + \ contained + \ nextgroup=@kconfigConfigOptionGExp + \ skipwhite + +syn match kconfigConfOptGExpOr '||' + \ contained + \ nextgroup=@kconfigConfigOptionGExp + \ skipwhite + +syn match kconfigConfOptExprGrpE ')' + \ contained + \ nextgroup=kconfigConfigOptionIf, + \ kconfigConfOptExprAnd, + \ kconfigConfOptExprOr + \ skipwhite skipnl + +syn sync minlines=50 + +hi def link kconfigTodo Todo +hi def link kconfigComment Comment +hi def link kconfigKeyword Keyword +hi def link kconfigPreProc PreProc +hi def link kconfigConditional Conditional +hi def link kconfigPrompt String +hi def link kconfigKeywordPrompt kconfigPrompt +hi def link kconfigPath String +hi def link kconfigSymbol String +hi def link kconfigConstantSymbol Constant +hi def link kconfigConfigOption Type +hi def link kconfigTypeDefinition kconfigConfigOption +hi def link kconfigTypeDefPrompt kconfigPrompt +hi def link kconfigInputPrompt kconfigConfigOption +hi def link kconfigPromptPrompt kconfigPrompt +hi def link kconfigDefaultValue kconfigConfigOption +hi def link kconfigDependencies kconfigConfigOption +hi def link kconfigReverseDependencies kconfigConfigOption +hi def link kconfigRevDepCSymbol kconfigConstantSymbol +hi def link kconfigRevDepNCSymbol kconfigSymbol +hi def link kconfigNumericalRanges kconfigConfigOption +hi def link kconfigRangeCSymbol kconfigConstantSymbol +hi def link kconfigRangeNCSymbol kconfigSymbol +hi def link kconfigRangeCSymbol2 kconfigConstantSymbol +hi def link kconfigRangeNCSymbol2 kconfigSymbol +hi def link kconfigHelpText Normal +hi def link kconfigDefBool kconfigConfigOption +hi def link kconfigDefBoolCSymbol kconfigConstantSymbol +hi def link kconfigDefBoolNCSymbol kconfigSymbol +hi def link kconfigOptional kconfigConfigOption +hi def link kconfigConfigOptionIf Conditional +hi def link kconfigConfOptIfExprCSym kconfigConstantSymbol +hi def link kconfigConfOptIfExprNCSym kconfigSymbol +hi def link kconfigOperator Operator +hi def link kconfigConfOptIfExprEq kconfigOperator +hi def link kconfigConfOptIfExprNEq kconfigOperator +hi def link kconfigConfOptIfExprCSym2 kconfigConstantSymbol +hi def link kconfigConfOptIfExprNCSym2 kconfigSymbol +hi def link kconfigConfOptIfExprNeg kconfigOperator +hi def link kconfigConfOptIfExprAnd kconfigOperator +hi def link kconfigConfOptIfExprOr kconfigOperator +hi def link kconfigDelimiter Delimiter +hi def link kconfigConfOptIfExprGroup kconfigDelimiter +hi def link kconfigConfOptIfGExpCSym kconfigConstantSymbol +hi def link kconfigConfOptIfGExpNCSym kconfigSymbol +hi def link kconfigConfOptIfGExpEq kconfigOperator +hi def link kconfigConfOptIfGExpNEq kconfigOperator +hi def link kconfigConfOptIfGExpCSym2 kconfigConstantSymbol +hi def link kconfigConfOptIfGExpNCSym2 kconfigSymbol +hi def link kconfigConfOptIfGExpNeg kconfigOperator +hi def link kconfigConfOptIfGExpAnd kconfigOperator +hi def link kconfigConfOptIfGExpOr kconfigOperator +hi def link kconfigConfOptIfExprGrpE kconfigDelimiter +hi def link kconfigConfOptExprCSym kconfigConstantSymbol +hi def link kconfigConfOptExprNCSym kconfigSymbol +hi def link kconfigConfOptExprEq kconfigOperator +hi def link kconfigConfOptExprNEq kconfigOperator +hi def link kconfigConfOptExprCSym2 kconfigConstantSymbol +hi def link kconfigConfOptExprNCSym2 kconfigSymbol +hi def link kconfigConfOptExprNeg kconfigOperator +hi def link kconfigConfOptExprAnd kconfigOperator +hi def link kconfigConfOptExprOr kconfigOperator +hi def link kconfigConfOptExprGroup kconfigDelimiter +hi def link kconfigConfOptGExpCSym kconfigConstantSymbol +hi def link kconfigConfOptGExpNCSym kconfigSymbol +hi def link kconfigConfOptGExpEq kconfigOperator +hi def link kconfigConfOptGExpNEq kconfigOperator +hi def link kconfigConfOptGExpCSym2 kconfigConstantSymbol +hi def link kconfigConfOptGExpNCSym2 kconfigSymbol +hi def link kconfigConfOptGExpNeg kconfigOperator +hi def link kconfigConfOptGExpAnd kconfigOperator +hi def link kconfigConfOptGExpOr kconfigOperator +hi def link kconfigConfOptExprGrpE kconfigConfOptIfExprGroup + +else + +syn keyword kconfigTodo contained TODO FIXME XXX NOTE + +syn match kconfigComment display '#.*$' contains=kconfigTodo + +syn keyword kconfigKeyword config menuconfig comment mainmenu + +syn keyword kconfigConditional menu endmenu choice endchoice if endif + +syn keyword kconfigPreProc source + \ nextgroup=kconfigPath + \ skipwhite + +syn keyword kconfigTriState y m n + +syn match kconfigSpecialChar contained '\\.' +syn match kconfigSpecialChar '\\$' + +syn region kconfigPath matchgroup=kconfigPath + \ start=+"+ skip=+\\\\\|\\\"+ end=+"+ + \ contains=kconfigSpecialChar + +syn region kconfigPath matchgroup=kconfigPath + \ start=+'+ skip=+\\\\\|\\\'+ end=+'+ + \ contains=kconfigSpecialChar + +syn match kconfigPath '\S\+' + \ contained + +syn region kconfigString matchgroup=kconfigString + \ start=+"+ skip=+\\\\\|\\\"+ end=+"+ + \ contains=kconfigSpecialChar + +syn region kconfigString matchgroup=kconfigString + \ start=+'+ skip=+\\\\\|\\\'+ end=+'+ + \ contains=kconfigSpecialChar + +syn keyword kconfigType bool boolean tristate string hex int + +syn keyword kconfigOption prompt default requires select range + \ optional +syn match kconfigOption 'depends\%( on\)\=' + +syn keyword kconfigMacro def_bool def_tristate + +syn region kconfigHelpText + \ matchgroup=kconfigOption + \ start='\%(help\|---help---\)\ze\s*\n\z(\s\+\)' + \ skip='^$' + \ end='^\z1\@!' + +syn sync match kconfigSyncHelp grouphere kconfigHelpText 'help\|---help---' + +hi def link kconfigTodo Todo +hi def link kconfigComment Comment +hi def link kconfigKeyword Keyword +hi def link kconfigConditional Conditional +hi def link kconfigPreProc PreProc +hi def link kconfigTriState Boolean +hi def link kconfigSpecialChar SpecialChar +hi def link kconfigPath String +hi def link kconfigString String +hi def link kconfigType Type +hi def link kconfigOption Identifier +hi def link kconfigHelpText Normal +hi def link kconfigmacro Macro + +endif + +let b:current_syntax = "kconfig" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/kix.vim b/vim/bundle/ubuntu-vim72/syntax/kix.vim new file mode 100644 index 0000000..62dc325 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/kix.vim @@ -0,0 +1,182 @@ +" Vim syntax file +" Language: KixTart 95, Kix2001 Windows script language http://kixtart.org/ +" Maintainer: Richard Howarth +" Last Change: 2003 May 11 +" URL: http://www.howsoft.demon.co.uk/ + +" KixTart files identified by *.kix extension. + +" Amendment History: +" 26 April 2001: RMH +" Removed development comments from distro version +" Renamed "Kix*" to "kix*" for consistancy +" Changes made in preperation for VIM version 5.8/6.00 + +" TODO: +" Handle arrays highlighting +" Handle object highlighting +" The next two may not be possible: +" Work out how to error too many "(", i.e. (() should be an error. +" Similarly, "if" without "endif" and similar constructs should error. + +" Clear legacy syntax rules for version 5.x, exit if already processed for version 6+ +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +syn case match +syn keyword kixTODO TODO FIX XXX contained + +" Case insensitive language. +syn case ignore + +" Kix statements +syn match kixStatement "?" +syn keyword kixStatement beep big break +syn keyword kixStatement call cd cls color cookie1 copy +syn keyword kixStatement del dim display +syn keyword kixStatement exit +syn keyword kixStatement flushkb +syn keyword kixStatement get gets global go gosub goto +syn keyword kixStatement md +syn keyword kixStatement password play +syn keyword kixStatement quit +syn keyword kixStatement rd return run +syn keyword kixStatement set setl setm settime shell sleep small +syn keyword kixStatement use + +" Kix2001 +syn keyword kixStatement debug function endfunction redim + +" Simple variables +syn match kixNotVar "\$\$\|@@\|%%" transparent contains=NONE +syn match kixLocalVar "\$\w\+" +syn match kixMacro "@\w\+" +syn match kixEnvVar "%\w\+" + +" Destination labels +syn match kixLabel ":\w\+\>" + +" Identify strings, trap unterminated strings +syn match kixStringError +".*\|'.*+ +syn region kixDoubleString oneline start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=kixLocalVar,kixMacro,kixEnvVar,kixNotVar +syn region kixSingleString oneline start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=kixLocalVar,kixMacro,kixEnvVar,kixNotVar + +" Operators +syn match kixOperator "+\|-\|\*\|/\|=\|&\||" +syn keyword kixOperator and or +" Kix2001 +syn match kixOperator "==" +syn keyword kixOperator not + +" Numeric constants +syn match kixInteger "-\=\<\d\+\>" contains=NONE +syn match kixFloat "-\=\.\d\+\>\|-\=\<\d\+\.\d\+\>" contains=NONE + +" Hex numeric constants +syn match kixHex "\&\x\+\>" contains=NONE + +" Other contants +" Kix2001 +syn keyword kixConstant on off + +" Comments +syn match kixComment ";.*$" contains=kixTODO + +" Trap unmatched parenthesis +syn match kixParenCloseError ")" +syn region kixParen oneline transparent start="(" end=")" contains=ALLBUT,kixParenCloseError + +" Functions (Builtin + UDF) +syn match kixFunction "\w\+("he=e-1,me=e-1 contains=ALL + +" Trap unmatched brackets +syn match kixBrackCloseError "\]" +syn region kixBrack transparent start="\[" end="\]" contains=ALLBUT,kixBrackCloseError + +" Clusters for ALLBUT shorthand +syn cluster kixIfBut contains=kixIfError,kixSelectOK,kixDoOK,kixWhileOK,kixForEachOK,kixForNextOK +syn cluster kixSelectBut contains=kixSelectError,kixIfOK,kixDoOK,kixWhileOK,kixForEachOK,kixForNextOK +syn cluster kixDoBut contains=kixDoError,kixSelectOK,kixIfOK,kixWhileOK,kixForEachOK,kixForNextOK +syn cluster kixWhileBut contains=kixWhileError,kixSelectOK,kixIfOK,kixDoOK,kixForEachOK,kixForNextOK +syn cluster kixForEachBut contains=kixForEachError,kixSelectOK,kixIfOK,kixDoOK,kixForNextOK,kixWhileOK +syn cluster kixForNextBut contains=kixForNextError,kixSelectOK,kixIfOK,kixDoOK,kixForEachOK,kixWhileOK +" Condtional construct errors. +syn match kixIfError "\\|\\|\" +syn match kixIfOK contained "\\|\\|\" +syn region kixIf transparent matchgroup=kixIfOK start="\" end="\" contains=ALLBUT,@kixIfBut +syn match kixSelectError "\\|\\|\" +syn match kixSelectOK contained "\\|\\|\" +syn region kixSelect transparent matchgroup=kixSelectOK start="\" end="\" contains=ALLBUT,@kixSelectBut + +" Program control constructs. +syn match kixDoError "\\|\" +syn match kixDoOK contained "\\|\" +syn region kixDo transparent matchgroup=kixDoOK start="\" end="\" contains=ALLBUT,@kixDoBut +syn match kixWhileError "\\|\" +syn match kixWhileOK contained "\\|\" +syn region kixWhile transparent matchgroup=kixWhileOK start="\" end="\" contains=ALLBUT,@kixWhileBut +syn match kixForNextError "\\|\\|\\|\" +syn match kixForNextOK contained "\\|\\|\\|\" +syn region kixForNext transparent matchgroup=kixForNextOK start="\" end="\" contains=ALLBUT,@kixForBut +syn match kixForEachError "\\|\\|\" +syn match kixForEachOK contained "\\|\\|\" +syn region kixForEach transparent matchgroup=kixForEachOK start="\" end="\" contains=ALLBUT,@kixForEachBut + +" Expressions +syn match kixExpression "<\|>\|<=\|>=\|<>" + + +" Default highlighting. +" Version < 5.8 set default highlight if file not already processed. +" Version >= 5.8 set default highlight only if it doesn't already have a value. +if version > 508 || !exists("did_kix_syn_inits") + if version < 508 + let did_kix_syn_inits=1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink kixDoubleString String + HiLink kixSingleString String + HiLink kixStatement Statement + HiLink kixRepeat Repeat + HiLink kixComment Comment + HiLink kixBuiltin Function + HiLink kixLocalVar Special + HiLink kixMacro Special + HiLink kixEnvVar Special + HiLink kixLabel Type + HiLink kixFunction Function + HiLink kixInteger Number + HiLink kixHex Number + HiLink kixFloat Number + HiLink kixOperator Operator + HiLink kixExpression Operator + + HiLink kixParenCloseError Error + HiLink kixBrackCloseError Error + HiLink kixStringError Error + + HiLink kixWhileError Error + HiLink kixWhileOK Conditional + HiLink kixDoError Error + HiLink kixDoOK Conditional + HiLink kixIfError Error + HiLink kixIfOK Conditional + HiLink kixSelectError Error + HiLink kixSelectOK Conditional + HiLink kixForNextError Error + HiLink kixForNextOK Conditional + HiLink kixForEachError Error + HiLink kixForEachOK Conditional + + delcommand HiLink +endif + +let b:current_syntax = "kix" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/kscript.vim b/vim/bundle/ubuntu-vim72/syntax/kscript.vim new file mode 100644 index 0000000..cefbe39 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/kscript.vim @@ -0,0 +1,70 @@ +" Vim syntax file +" Language: kscript +" Maintainer: Thomas Capricelli +" URL: http://aquila.rezel.enst.fr/thomas/vim/kscript.vim +" CVS: $Id: kscript.vim,v 1.1 2004/06/13 17:40:02 vimboss Exp $ + +" 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 keyword kscriptPreCondit import from + +syn keyword kscriptHardCoded print println connect length arg mid upper lower isEmpty toInt toFloat findApplication +syn keyword kscriptConditional if else switch +syn keyword kscriptRepeat while for do foreach +syn keyword kscriptExceptions emit catch raise try signal +syn keyword kscriptFunction class struct enum +syn keyword kscriptConst FALSE TRUE false true +syn keyword kscriptStatement return delete +syn keyword kscriptLabel case default +syn keyword kscriptStorageClass const +syn keyword kscriptType in out inout var + +syn keyword kscriptTodo contained TODO FIXME XXX + +syn region kscriptComment start="/\*" end="\*/" contains=kscriptTodo +syn match kscriptComment "//.*" contains=kscriptTodo +syn match kscriptComment "#.*$" contains=kscriptTodo + +syn region kscriptString start=+'+ end=+'+ skip=+\\\\\|\\'+ +syn region kscriptString start=+"+ end=+"+ skip=+\\\\\|\\"+ +syn region kscriptString start=+"""+ end=+"""+ +syn region kscriptString start=+'''+ end=+'''+ + +" 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_kscript_syntax_inits") + if version < 508 + let did_kscript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink kscriptConditional Conditional + HiLink kscriptRepeat Repeat + HiLink kscriptExceptions Statement + HiLink kscriptFunction Function + HiLink kscriptConst Constant + HiLink kscriptStatement Statement + HiLink kscriptLabel Label + HiLink kscriptStorageClass StorageClass + HiLink kscriptType Type + HiLink kscriptTodo Todo + HiLink kscriptComment Comment + HiLink kscriptString String + HiLink kscriptPreCondit PreCondit + HiLink kscriptHardCoded Statement + + delcommand HiLink +endif + +let b:current_syntax = "kscript" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/kwt.vim b/vim/bundle/ubuntu-vim72/syntax/kwt.vim new file mode 100644 index 0000000..47be7a8 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/kwt.vim @@ -0,0 +1,87 @@ +" Vim syntax file +" Language: kimwitu++ +" Maintainer: Michael Piefel +" Last Change: 2 May 2001 + +" 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 + +" Read the C++ syntax to start with +if version < 600 + source :p:h/cpp.vim +else + runtime! syntax/cpp.vim + unlet b:current_syntax +endif + +" kimwitu++ extentions + +" Don't stop at eol, messes around with CPP mode, but gives line spanning +" strings in unparse rules +syn region cCppString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat +syn keyword cType integer real casestring nocasestring voidptr list +syn keyword cType uview rview uview_enum rview_enum + +" avoid unparsing rule sth:view being scanned as label +syn clear cUserCont +syn match cUserCont "^\s*\I\i*\s*:$" contains=cUserLabel contained +syn match cUserCont ";\s*\I\i*\s*:$" contains=cUserLabel contained +syn match cUserCont "^\s*\I\i*\s*:[^:]"me=e-1 contains=cUserLabel contained +syn match cUserCont ";\s*\I\i*\s*:[^:]"me=e-1 contains=cUserLabel contained + +" highlight phylum decls +syn match kwtPhylum "^\I\i*:$" +syn match kwtPhylum "^\I\i*\s*{\s*\(!\|\I\)\i*\s*}\s*:$" + +syn keyword kwtStatement with foreach afterforeach provided +syn match kwtDecl "%\(uviewvar\|rviewvar\)" +syn match kwtDecl "^%\(uview\|rview\|ctor\|dtor\|base\|storageclass\|list\|attr\|member\|option\)" +syn match kwtOption "no-csgio\|no-unparse\|no-rewrite\|no-printdot\|no-hashtables\|smart-pointer\|weak-pointer" +syn match kwtSep "^%}$" +syn match kwtSep "^%{\(\s\+\I\i*\)*$" +syn match kwtCast "\= 508 || !exists("did_kwt_syn_inits") + if version < 508 + let did_kwt_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink kwtStatement cppStatement + HiLink kwtDecl cppStatement + HiLink kwtCast cppStatement + HiLink kwtSep Delimiter + HiLink kwtViews Label + HiLink kwtPhylum Type + HiLink kwtOption PreProc + "HiLink cText Comment + + delcommand HiLink +endif + +syn sync lines=300 + +let b:current_syntax = "kwt" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/lace.vim b/vim/bundle/ubuntu-vim72/syntax/lace.vim new file mode 100644 index 0000000..9e64eea --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/lace.vim @@ -0,0 +1,135 @@ +" Vim syntax file +" Language: lace +" Maintainer: Jocelyn Fiat +" Last Change: 2001 May 09 + +" Copyright Interactive Software Engineering, 1998 +" You are free to use this file as you please, but +" if you make a change or improvement you must send +" it to the maintainer at + + +" 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 + +" LACE is case insensitive, but the style guide lines are not. + +if !exists("lace_case_insensitive") + syn case match +else + syn case ignore +endif + +" A bunch of useful LACE keywords +syn keyword laceTopStruct system root default option visible cluster +syn keyword laceTopStruct external generate end +syn keyword laceOptionClause collect assertion debug optimize trace +syn keyword laceOptionClause profile inline precompiled multithreaded +syn keyword laceOptionClause exception_trace dead_code_removal +syn keyword laceOptionClause array_optimization +syn keyword laceOptionClause inlining_size inlining +syn keyword laceOptionClause console_application dynamic_runtime +syn keyword laceOptionClause line_generation +syn keyword laceOptionMark yes no all +syn keyword laceOptionMark require ensure invariant loop check +syn keyword laceClusterProp use include exclude +syn keyword laceAdaptClassName adapt ignore rename as +syn keyword laceAdaptClassName creation export visible +syn keyword laceExternal include_path object makefile + +" Operators +syn match laceOperator "\$" +syn match laceBrackets "[[\]]" +syn match laceExport "[{}]" + +" Constants +syn keyword laceBool true false +syn keyword laceBool True False +syn region laceString start=+"+ skip=+%"+ end=+"+ contains=laceEscape,laceStringError +syn match laceEscape contained "%[^/]" +syn match laceEscape contained "%/\d\+/" +syn match laceEscape contained "^[ \t]*%" +syn match laceEscape contained "%[ \t]*$" +syn match laceStringError contained "%/[^0-9]" +syn match laceStringError contained "%/\d\+[^0-9/]" +syn match laceStringError "'\(%[^/]\|%/\d\+/\|[^'%]\)\+'" +syn match laceCharacter "'\(%[^/]\|%/\d\+/\|[^'%]\)'" contains=laceEscape +syn match laceNumber "-\=\<\d\+\(_\d\+\)*\>" +syn match laceNumber "\<[01]\+[bB]\>" +syn match laceNumber "-\=\<\d\+\(_\d\+\)*\.\(\d\+\(_\d\+\)*\)\=\([eE][-+]\=\d\+\(_\d\+\)*\)\=" +syn match laceNumber "-\=\.\d\+\(_\d\+\)*\([eE][-+]\=\d\+\(_\d\+\)*\)\=" +syn match laceComment "--.*" contains=laceTodo + + +syn case match + +" Case sensitive stuff + +syn keyword laceTodo TODO XXX FIXME +syn match laceClassName "\<[A-Z][A-Z0-9_]*\>" +syn match laceCluster "[a-zA-Z][a-zA-Z0-9_]*\s*:" +syn match laceCluster "[a-zA-Z][a-zA-Z0-9_]*\s*(\s*[a-zA-Z][a-zA-Z0-9_]*\s*)\s*:" + +" Catch mismatched parentheses +syn match laceParenError ")" +syn match laceBracketError "\]" +syn region laceGeneric transparent matchgroup=laceBrackets start="\[" end="\]" contains=ALLBUT,laceBracketError +syn region laceParen transparent start="(" end=")" contains=ALLBUT,laceParenError + +" Should suffice for even very long strings and expressions +syn sync lines=40 + +" 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_lace_syntax_inits") + if version < 508 + let did_lace_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink laceTopStruct PreProc + + HiLink laceOptionClause Statement + HiLink laceOptionMark Constant + HiLink laceClusterProp Label + HiLink laceAdaptClassName Label + HiLink laceExternal Statement + HiLink laceCluster ModeMsg + + HiLink laceEscape Special + + HiLink laceBool Boolean + HiLink laceString String + HiLink laceCharacter Character + HiLink laceClassName Type + HiLink laceNumber Number + + HiLink laceOperator Special + HiLink laceArray Special + HiLink laceExport Special + HiLink laceCreation Special + HiLink laceBrackets Special + HiLink laceConstraint Special + + HiLink laceComment Comment + + HiLink laceError Error + HiLink laceStringError Error + HiLink laceParenError Error + HiLink laceBracketError Error + HiLink laceTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "lace" + +" vim: ts=4 diff --git a/vim/bundle/ubuntu-vim72/syntax/latte.vim b/vim/bundle/ubuntu-vim72/syntax/latte.vim new file mode 100644 index 0000000..e2a8729 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/latte.vim @@ -0,0 +1,98 @@ +" Vim syntax file +" Language: Latte +" Maintainer: Nick Moffitt, +" Last Change: 14 June, 2000 +" +" Notes: +" I based this on the TeX and Scheme syntax files (but mostly scheme). +" See http://www.latte.org for info on the language. + +" 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 match latteError "[{}\\]" +syn match latteOther "\\{" +syn match latteOther "\\}" +syn match latteOther "\\\\" + +if version < 600 + set iskeyword=33,43,45,48-57,63,65-90,95,97-122,_ +else + setlocal iskeyword=33,43,45,48-57,63,65-90,95,97-122,_ +endif + +syn region latteVar matchgroup=SpecialChar start=!\\[A-Za-z_]!rs=s+1 end=![^A-Za-z0-9?!+_-]!me=e-1 contains=ALLBUT,latteNumber,latteOther +syn region latteVar matchgroup=SpecialChar start=!\\[=\&][A-Za-z_]!rs=s+2 end=![^A-Za-z0-9?!+_-]!me=e-1 contains=ALLBUT,latteNumber,latteOther +syn region latteString start=+\\"+ skip=+\\\\"+ end=+\\"+ + +syn region latteGroup matchgroup=Delimiter start="{" skip="\\[{}]" matchgroup=Delimiter end="}" contains=ALLBUT,latteSyntax + +syn region latteUnquote matchgroup=Delimiter start="\\,{" skip="\\[{}]" matchgroup=Delimiter end="}" contains=ALLBUT,latteSyntax +syn region latteSplice matchgroup=Delimiter start="\\,@{" skip="\\[{}]" matchgroup=Delimiter end="}" contains=ALLBUT,latteSyntax +syn region latteQuote matchgroup=Delimiter start="\\'{" skip="\\[{}]" matchgroup=Delimiter end="}" +syn region latteQuote matchgroup=Delimiter start="\\`{" skip="\\[{}]" matchgroup=Delimiter end="}" contains=latteUnquote,latteSplice + +syn match latteOperator '\\/' +syn match latteOperator '=' + +syn match latteComment "\\;.*$" + +" This was gathered by slurping in the index. + +syn keyword latteSyntax __FILE__ __latte-version__ contained +syn keyword latteSyntax _bal-tag _pre _tag add and append apply back contained +syn keyword latteSyntax caar cadr car cdar cddr cdr ceil compose contained +syn keyword latteSyntax concat cons def defmacro divide downcase contained +syn keyword latteSyntax empty? equal? error explode file-contents contained +syn keyword latteSyntax floor foreach front funcall ge? getenv contained +syn keyword latteSyntax greater-equal? greater? group group? gt? html contained +syn keyword latteSyntax if include lambda le? length less-equal? contained +syn keyword latteSyntax less? let lmap load-file load-library lt? macro contained +syn keyword latteSyntax member? modulo multiply not nth operator? contained +syn keyword latteSyntax or ordinary quote process-output push-back contained +syn keyword latteSyntax push-front quasiquote quote random rdc reverse contained +syn keyword latteSyntax set! snoc splicing unquote strict-html4 contained +syn keyword latteSyntax string-append string-ge? string-greater-equal? contained +syn keyword latteSyntax string-greater? string-gt? string-le? contained +syn keyword latteSyntax string-less-equal? string-less? string-lt? contained +syn keyword latteSyntax string? subseq substr subtract contained +syn keyword latteSyntax upcase useless warn while zero? contained + + +" If it's good enough for scheme... + +syn sync match matchPlace grouphere NONE "^[^ \t]" +" ... i.e. synchronize on a line that starts at the left margin + +" 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_latte_syntax_inits") + if version < 508 + let did_latte_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink latteSyntax Statement + HiLink latteVar Function + + HiLink latteString String + HiLink latteQuote String + + HiLink latteDelimiter Delimiter + HiLink latteOperator Operator + + HiLink latteComment Comment + HiLink latteError Error + + delcommand HiLink +endif + +let b:current_syntax = "latte" diff --git a/vim/bundle/ubuntu-vim72/syntax/ld.vim b/vim/bundle/ubuntu-vim72/syntax/ld.vim new file mode 100644 index 0000000..fc12919 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/ld.vim @@ -0,0 +1,81 @@ +" Vim syntax file +" Language: ld(1) script +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword ldTodo contained TODO FIXME XXX NOTE + +syn region ldComment start='/\*' end='\*/' contains=ldTodo,@Spell + +syn region ldFileName start=+"+ end=+"+ + +syn keyword ldPreProc SECTIONS MEMORY OVERLAY PHDRS VERSION INCLUDE +syn match ldPreProc '\' + +syn match ldNumber display '\<0[xX]\x\+\>' +syn match ldNumber display '\d\+[KM]\>' contains=ldNumberMult +syn match ldNumberMult display '[KM]\>' +syn match ldOctal contained display '\<0\o\+\>' + \ contains=ldOctalZero +syn match ldOctalZero contained display '\<0' +syn match ldOctalError contained display '\<0\o*[89]\d*\>' + + +hi def link ldTodo Todo +hi def link ldComment Comment +hi def link ldFileName String +hi def link ldPreProc PreProc +hi def link ldFunction Identifier +hi def link ldKeyword Keyword +hi def link ldType Type +hi def link ldDataType ldType +hi def link ldOutputType ldType +hi def link ldPTType ldType +hi def link ldSpecial Special +hi def link ldIdentifier Identifier +hi def link ldSections Constant +hi def link ldSpecSections Special +hi def link ldNumber Number +hi def link ldNumberMult PreProc +hi def link ldOctal ldNumber +hi def link ldOctalZero PreProc +hi def link ldOctalError Error + +let b:current_syntax = "ld" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/ldapconf.vim b/vim/bundle/ubuntu-vim72/syntax/ldapconf.vim new file mode 100644 index 0000000..70ddaab --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/ldapconf.vim @@ -0,0 +1,338 @@ +" Vim syntax file +" Language: ldap.conf(5) configuration file. +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-12-11 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword ldapconfTodo contained TODO FIXME XXX NOTE + +syn region ldapconfComment display oneline start='^\s*#' end='$' + \ contains=ldapconfTodo, + \ @Spell + +syn match ldapconfBegin display '^' + \ nextgroup=ldapconfOption, + \ ldapconfDeprOption, + \ ldapconfComment + +syn case ignore + +syn keyword ldapconfOption contained URI + \ nextgroup=ldapconfURI + \ skipwhite + +syn keyword ldapconfOption contained + \ BASE + \ BINDDN + \ nextgroup=ldapconfDNAttrType + \ skipwhite + +syn keyword ldapconfDeprOption contained + \ HOST + \ nextgroup=ldapconfHost + \ skipwhite + +syn keyword ldapconfDeprOption contained + \ PORT + \ nextgroup=ldapconfPort + \ skipwhite + +syn keyword ldapconfOption contained + \ REFERRALS + \ nextgroup=ldapconfBoolean + \ skipwhite + +syn keyword ldapconfOption contained + \ SIZELIMIT + \ TIMELIMIT + \ nextgroup=ldapconfInteger + \ skipwhite + +syn keyword ldapconfOption contained + \ DEREF + \ nextgroup=ldapconfDerefWhen + \ skipwhite + +syn keyword ldapconfOption contained + \ SASL_MECH + \ nextgroup=ldapconfSASLMechanism + \ skipwhite + +syn keyword ldapconfOption contained + \ SASL_REALM + \ nextgroup=ldapconfSASLRealm + \ skipwhite + +syn keyword ldapconfOption contained + \ SASL_AUTHCID + \ SASL_AUTHZID + \ nextgroup=ldapconfSASLAuthID + \ skipwhite + +syn keyword ldapconfOption contained + \ SASL_SECPROPS + \ nextgroup=ldapconfSASLSecProps + \ skipwhite + +syn keyword ldapconfOption contained + \ TLS_CACERT + \ TLS_CERT + \ TLS_KEY + \ TLS_RANDFILE + \ nextgroup=ldapconfFilename + \ skipwhite + +syn keyword ldapconfOption contained + \ TLS_CACERTDIR + \ nextgroup=ldapconfPath + \ skipwhite + +syn keyword ldapconfOption contained + \ TLS_CIPHER_SUITE + \ nextgroup=@ldapconfTLSCipher + \ skipwhite + +syn keyword ldapconfOption contained + \ TLS_REQCERT + \ nextgroup=ldapconfTLSCertCheck + \ skipwhite + +syn keyword ldapconfOption contained + \ TLS_CRLCHECK + \ nextgroup=ldapconfTLSCRLCheck + \ skipwhite + +syn case match + +syn match ldapconfURI contained display + \ 'ldaps\=://[^[:space:]:]\+\%(:\d\+\)\=' + \ nextgroup=ldapconfURI + \ skipwhite + +" LDAP Distinguished Names are defined in Section 3 of RFC 2253: +" http://www.ietf.org/rfc/rfc2253.txt. +syn match ldapconfDNAttrType contained display + \ '\a[a-zA-Z0-9-]\+\|\d\+\%(\.\d\+\)*' + \ nextgroup=ldapconfDNAttrTypeEq + +syn match ldapconfDNAttrTypeEq contained display + \ '=' + \ nextgroup=ldapconfDNAttrValue + +syn match ldapconfDNAttrValue contained display + \ '\%([^,=+<>#;\\"]\|\\\%([,=+<>#;\\"]\|\x\x\)\)*\|#\%(\x\x\)\+\|"\%([^\\"]\|\\\%([,=+<>#;\\"]\|\x\x\)\)*"' + \ nextgroup=ldapconfDNSeparator + +syn match ldapconfDNSeparator contained display + \ '[+,]' + \ nextgroup=ldapconfDNAttrType + +syn match ldapconfHost contained display + \ '[^[:space:]:]\+\%(:\d\+\)\=' + \ nextgroup=ldapconfHost + \ skipwhite + +syn match ldapconfPort contained display + \ '\d\+' + +syn keyword ldapconfBoolean contained + \ on + \ true + \ yes + \ off + \ false + \ no + +syn match ldapconfInteger contained display + \ '\d\+' + +syn keyword ldapconfDerefWhen contained + \ never + \ searching + \ finding + \ always + +" Taken from http://www.iana.org/assignments/sasl-mechanisms. +syn keyword ldapconfSASLMechanism contained + \ KERBEROS_V4 + \ GSSAPI + \ SKEY + \ EXTERNAL + \ ANONYMOUS + \ OTP + \ PLAIN + \ SECURID + \ NTLM + \ NMAS_LOGIN + \ NMAS_AUTHEN + \ KERBEROS_V5 + +syn match ldapconfSASLMechanism contained display + \ 'CRAM-MD5\|GSS-SPNEGO\|DIGEST-MD5\|9798-[UM]-\%(RSA-SHA1-ENC\|\%(EC\)\=DSA-SHA1\)\|NMAS-SAMBA-AUTH' + +" TODO: I have been unable to find a definition for a SASL realm, +" authentication identity, and proxy authorization identity. +syn match ldapconfSASLRealm contained display + \ '\S\+' + +syn match ldapconfSASLAuthID contained display + \ '\S\+' + +syn keyword ldapconfSASLSecProps contained + \ none + \ noplain + \ noactive + \ nodict + \ noanonymous + \ forwardsec + \ passcred + \ nextgroup=ldapconfSASLSecPSep + +syn keyword ldapconfSASLSecProps contained + \ minssf + \ maxssf + \ maxbufsize + \ nextgroup=ldapconfSASLSecPEq + +syn match ldapconfSASLSecPEq contained display + \ '=' + \ nextgroup=ldapconfSASLSecFactor + +syn match ldapconfSASLSecFactor contained display + \ '\d\+' + \ nextgroup=ldapconfSASLSecPSep + +syn match ldapconfSASLSecPSep contained display + \ ',' + \ nextgroup=ldapconfSASLSecProps + +syn match ldapconfFilename contained display + \ '.\+' + +syn match ldapconfPath contained display + \ '.\+' + +" Defined in openssl-ciphers(1). +" TODO: Should we include the stuff under CIPHER SUITE NAMES? +syn cluster ldapconfTLSCipher contains=ldapconfTLSCipherOp, + \ ldapconfTLSCipherName, + \ ldapconfTLSCipherSort + +syn match ldapconfTLSCipherOp contained display + \ '[+!-]' + \ nextgroup=ldapconfTLSCipherName + +syn keyword ldapconfTLSCipherName contained + \ DEFAULT + \ COMPLEMENTOFDEFAULT + \ ALL + \ COMPLEMENTOFALL + \ HIGH + \ MEDIUM + \ LOW + \ EXP + \ EXPORT + \ EXPORT40 + \ EXPORT56 + \ eNULL + \ NULL + \ aNULL + \ kRSA + \ RSA + \ kEDH + \ kDHr + \ kDHd + \ aRSA + \ aDSS + \ DSS + \ aDH + \ kFZA + \ aFZA + \ eFZA + \ FZA + \ TLSv1 + \ SSLv3 + \ SSLv2 + \ DH + \ ADH + \ AES + \ 3DES + \ DES + \ RC4 + \ RC2 + \ IDEA + \ MD5 + \ SHA1 + \ SHA + \ Camellia + \ nextgroup=ldapconfTLSCipherSep + +syn match ldapconfTLSCipherSort contained display + \ '@STRENGTH' + \ nextgroup=ldapconfTLSCipherSep + +syn match ldapconfTLSCipherSep contained display + \ '[:, ]' + \ nextgroup=@ldapconfTLSCipher + +syn keyword ldapconfTLSCertCheck contained + \ never + \ allow + \ try + \ demand + \ hard + +syn keyword ldapconfTLSCRLCheck contained + \ none + \ peer + \ all + +hi def link ldapconfTodo Todo +hi def link ldapconfComment Comment +hi def link ldapconfOption Keyword +hi def link ldapconfDeprOption Error +hi def link ldapconfString String +hi def link ldapconfURI ldapconfString +hi def link ldapconfDNAttrType Identifier +hi def link ldapconfOperator Operator +hi def link ldapconfEq ldapconfOperator +hi def link ldapconfDNAttrTypeEq ldapconfEq +hi def link ldapconfValue ldapconfString +hi def link ldapconfDNAttrValue ldapconfValue +hi def link ldapconfSeparator ldapconfOperator +hi def link ldapconfDNSeparator ldapconfSeparator +hi def link ldapconfHost ldapconfURI +hi def link ldapconfNumber Number +hi def link ldapconfPort ldapconfNumber +hi def link ldapconfBoolean Boolean +hi def link ldapconfInteger ldapconfNumber +hi def link ldapconfType Type +hi def link ldapconfDerefWhen ldapconfType +hi def link ldapconfDefine Define +hi def link ldapconfSASLMechanism ldapconfDefine +hi def link ldapconfSASLRealm ldapconfURI +hi def link ldapconfSASLAuthID ldapconfValue +hi def link ldapconfSASLSecProps ldapconfType +hi def link ldapconfSASLSecPEq ldapconfEq +hi def link ldapconfSASLSecFactor ldapconfNumber +hi def link ldapconfSASLSecPSep ldapconfSeparator +hi def link ldapconfFilename ldapconfString +hi def link ldapconfPath ldapconfFilename +hi def link ldapconfTLSCipherOp ldapconfOperator +hi def link ldapconfTLSCipherName ldapconfDefine +hi def link ldapconfSpecial Special +hi def link ldapconfTLSCipherSort ldapconfSpecial +hi def link ldapconfTLSCipherSep ldapconfSeparator +hi def link ldapconfTLSCertCheck ldapconfType +hi def link ldapconfTLSCRLCheck ldapconfType + +let b:current_syntax = "ldapconf" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/ldif.vim b/vim/bundle/ubuntu-vim72/syntax/ldif.vim new file mode 100644 index 0000000..9f67b57 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/ldif.vim @@ -0,0 +1,43 @@ +" Vim syntax file +" Language: LDAP LDIF +" Maintainer: Zak Johnson +" Last Change: 2003-12-30 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn sync minlines=10 linebreaks=1 + +syn match ldifAttribute /^[^ #][^:]*/ contains=ldifOption display +syn match ldifOption /;[^:]\+/ contained contains=ldifPunctuation display +syn match ldifPunctuation /;/ contained display + +syn region ldifStringValue matchgroup=ldifPunctuation start=/: / end=/\_$/ skip=/\n / +syn region ldifBase64Value matchgroup=ldifPunctuation start=/:: / end=/\_$/ skip=/\n / +syn region ldifFileValue matchgroup=ldifPunctuation start=/:< / end=/\_$/ skip=/\n / + +syn region ldifComment start=/^#/ end=/\_$/ skip=/\n / + +if version >= 508 || !exists("did_ldif_syn_inits") + if version < 508 + let did_ldif_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink ldifAttribute Type + HiLink ldifOption Identifier + HiLink ldifPunctuation Normal + HiLink ldifStringValue String + HiLink ldifBase64Value Special + HiLink ldifFileValue Special + HiLink ldifComment Comment + + delcommand HiLink +endif + +let b:current_syntax = "ldif" diff --git a/vim/bundle/ubuntu-vim72/syntax/lex.vim b/vim/bundle/ubuntu-vim72/syntax/lex.vim new file mode 100644 index 0000000..68ae632 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/lex.vim @@ -0,0 +1,129 @@ +" Vim syntax file +" Language: Lex +" Maintainer: Charles E. Campbell, Jr. +" Last Change: Sep 11, 2009 +" Version: 10 +" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax +" +" Option: +" lex_uses_cpp : if this variable exists, then C++ is loaded rather than C + +" 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 + +" Read the C/C++ syntax to start with +if version >= 600 + if exists("lex_uses_cpp") + runtime! syntax/cpp.vim + else + runtime! syntax/c.vim + endif + unlet b:current_syntax +else + if exists("lex_uses_cpp") + so :p:h/cpp.vim + else + so :p:h/c.vim + endif +endif + +" --- ========= --- +" --- Lex stuff --- +" --- ========= --- + +"I'd prefer to use lex.* , but vim doesn't handle forward definitions yet +syn cluster lexListGroup contains=lexAbbrvBlock,lexAbbrv,lexAbbrv,lexAbbrvRegExp,lexInclude,lexPatBlock,lexPat,lexBrace,lexPatString,lexPatTag,lexPatTag,lexPatComment,lexPatCodeLine,lexMorePat,lexPatSep,lexSlashQuote,lexPatCode,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2,cCommentStartError,cParenError +syn cluster lexListPatCodeGroup contains=lexAbbrvBlock,lexAbbrv,lexAbbrv,lexAbbrvRegExp,lexInclude,lexPatBlock,lexPat,lexBrace,lexPatTag,lexPatTag,lexPatTagZoneStart,lexPatComment,lexPatCodeLine,lexMorePat,lexPatSep,lexSlashQuote,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2,cCommentStartError,cParenError + +" Abbreviations Section +if has("folding") + syn region lexAbbrvBlock fold start="^\(\h\+\s\|%{\)" end="^\ze%%$" skipnl nextgroup=lexPatBlock contains=lexAbbrv,lexInclude,lexAbbrvComment,lexStartState +else + syn region lexAbbrvBlock start="^\(\h\+\s\|%{\)" end="^\ze%%$" skipnl nextgroup=lexPatBlock contains=lexAbbrv,lexInclude,lexAbbrvComment,lexStartState +endif +syn match lexAbbrv "^\I\i*\s"me=e-1 skipwhite contained nextgroup=lexAbbrvRegExp +syn match lexAbbrv "^%[sx]" contained +syn match lexAbbrvRegExp "\s\S.*$"lc=1 contained nextgroup=lexAbbrv,lexInclude +if has("folding") + syn region lexInclude fold matchgroup=lexSep start="^%{" end="%}" contained contains=ALLBUT,@lexListGroup + syn region lexAbbrvComment fold start="^\s\+/\*" end="\*/" contains=@Spell + syn region lexStartState fold matchgroup=lexAbbrv start="^%\a\+" end="$" contained +else + syn region lexInclude matchgroup=lexSep start="^%{" end="%}" contained contains=ALLBUT,@lexListGroup + syn region lexAbbrvComment start="^\s\+/\*" end="\*/" contains=@Spell + syn region lexStartState matchgroup=lexAbbrv start="^%\a\+" end="$" contained +endif + +"%% : Patterns {Actions} +if has("folding") + syn region lexPatBlock fold matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat + syn region lexPat fold start=+\S+ skip="\\\\\|\\." end="\s"me=e-1 contained nextgroup=lexMorePat,lexPatSep contains=lexPatTag,lexPatString,lexSlashQuote,lexBrace + syn region lexBrace fold start="\[" skip=+\\\\\|\\+ end="]" contained + syn region lexPatString fold matchgroup=String start=+"+ skip=+\\\\\|\\"+ matchgroup=String end=+"+ contained +else + syn region lexPatBlock matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat + syn region lexPat start=+\S+ skip="\\\\\|\\." end="\s"me=e-1 contained nextgroup=lexMorePat,lexPatSep contains=lexPatTag,lexPatString,lexSlashQuote,lexBrace + syn region lexBrace start="\[" skip=+\\\\\|\\+ end="]" contained + syn region lexPatString matchgroup=String start=+"+ skip=+\\\\\|\\"+ matchgroup=String end=+"+ contained +endif +syn match lexPatTag "^<\I\i*\(,\I\i*\)*>" contained nextgroup=lexPat,lexPatTag,lexMorePat,lexPatSep +syn match lexPatTagZone "^<\I\i*\(,\I\i*\)*>\s*\ze{" contained nextgroup=lexPatTagZoneStart +syn match lexPatTag +^<\I\i*\(,\I\i*\)*>*\(\\\\\)*\\"+ contained nextgroup=lexPat,lexPatTag,lexMorePat,lexPatSep +if has("folding") + syn region lexPatTagZoneStart matchgroup=lexPatTag fold start='{' end='}' contained contains=lexPat,lexPatComment + syn region lexPatComment start="\s\+/\*" end="\*/" fold skipnl contained contains=cTodo skipwhite nextgroup=lexPatComment,lexPat,@Spell +else + syn region lexPatTagZoneStart matchgroup=lexPatTag start='{' end='}' contained contains=lexPat,lexPatComment + syn region lexPatComment start="\s\+/\*" end="\*/" skipnl contained contains=cTodo skipwhite nextgroup=lexPatComment,lexPat,@Spell +endif +syn match lexPatCodeLine ".*$" contained contains=ALLBUT,@lexListGroup +syn match lexMorePat "\s*|\s*$" skipnl contained nextgroup=lexPat,lexPatTag,lexPatComment +syn match lexPatSep "\s\+" contained nextgroup=lexMorePat,lexPatCode,lexPatCodeLine +syn match lexSlashQuote +\(\\\\\)*\\"+ contained +if has("folding") + syn region lexPatCode matchgroup=Delimiter start="{" end="}" fold skipnl contained contains=ALLBUT,@lexListPatCodeGroup +else + syn region lexPatCode matchgroup=Delimiter start="{" end="}" skipnl contained contains=ALLBUT,@lexListPatCodeGroup +endif + +syn keyword lexCFunctions BEGIN input unput woutput yyleng yylook yytext +syn keyword lexCFunctions ECHO output winput wunput yyless yymore yywrap + +" includes several ALLBUTs; these have to be treated so as to exclude lex* groups +syn cluster cParenGroup add=lex.* +syn cluster cDefineGroup add=lex.* +syn cluster cPreProcGroup add=lex.* +syn cluster cMultiGroup add=lex.* + +" Synchronization +syn sync clear +syn sync minlines=300 +syn sync match lexSyncPat grouphere lexPatBlock "^%[a-zA-Z]" +syn sync match lexSyncPat groupthere lexPatBlock "^<$" +syn sync match lexSyncPat groupthere lexPatBlock "^%%$" + +" The default highlighting. +hi def link lexAbbrvComment lexPatComment +hi def link lexBrace lexPat +hi def link lexPatTagZone lexPatTag +hi def link lexSlashQuote lexPat + +hi def link lexAbbrvRegExp Macro +hi def link lexAbbrv SpecialChar +hi def link lexCFunctions Function +hi def link lexMorePat SpecialChar +hi def link lexPatComment Comment +hi def link lexPat Function +hi def link lexPatString Function +hi def link lexPatTag Special +hi def link lexSep Delimiter +hi def link lexStartState Statement + +let b:current_syntax = "lex" + +" vim:ts=10 diff --git a/vim/bundle/ubuntu-vim72/syntax/lftp.vim b/vim/bundle/ubuntu-vim72/syntax/lftp.vim new file mode 100644 index 0000000..6a8e4f9 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/lftp.vim @@ -0,0 +1,152 @@ +" Vim syntax file +" Language: lftp(1) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2007-06-17 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +setlocal iskeyword+=- + +syn region lftpComment display oneline start='#' end='$' + \ contains=lftpTodo,@Spell + +syn keyword lftpTodo contained TODO FIXME XXX NOTE + +syn region lftpString contained display + \ start=+"+ skip=+\\$\|\\"+ end=+"+ end=+$+ + +syn match lftpNumber contained display '\<\d\+\(\.\d\+\)\=\>' + +syn keyword lftpBoolean contained yes no on off true false + +syn keyword lftpInterval contained infinity inf never forever +syn match lftpInterval contained '\<\(\d\+\(\.\d\+\)\=[dhms]\)\+\>' + +syn keyword lftpKeywords alias anon at bookmark cache cat cd chmod close + \ cls command debug du echo exit fg find get + \ get1 glob help history jobs kill lcd lftp + \ lpwd ls mget mirror mkdir module more mput + \ mrm mv nlist open pget put pwd queue quote + \ reget recls rels renlist repeat reput rm + \ rmdir scache site source suspend user version + \ wait zcat zmore + +syn region lftpSet matchgroup=lftpKeywords + \ start="set" end=";" end="$" + \ contains=lftpString,lftpNumber,lftpBoolean, + \ lftpInterval,lftpSettingsPrefix,lftpSettings +syn match lftpSettingsPrefix contained '\<\%(bmk\|cache\|cmd\|color\|dns\):' +syn match lftpSettingsPrefix contained '\<\%(file\|fish\|ftp\|hftp\):' +syn match lftpSettingsPrefix contained '\<\%(http\|https\|mirror\|module\):' +syn match lftpSettingsPrefix contained '\<\%(net\|sftp\|ssl\|xfer\):' +" bmk: +syn keyword lftpSettings contained save-p[asswords] +" cache: +syn keyword lftpSettings contained cache-em[pty-listings] en[able] + \ exp[ire] siz[e] +" cmd: +syn keyword lftpSettings contained at[-exit] cls-c[ompletion-default] + \ cls-d[efault] cs[h-history] + \ default-p[rotocol] default-t[itle] +syn keyword lftpSettings contained fai[l-exit] in[teractive] + \ lo[ng-running] ls[-default] mo[ve-background] + \ prom[pt] + \ rem[ote-completion] + \ save-c[wd-history] save-r[l-history] + \ set-t[erm-status] statu[s-interval] + \ te[rm-status] verb[ose] verify-h[ost] + \ verify-path verify-path[-cached] +" color: +syn keyword lftpSettings contained dir[-colors] use-c[olor] +" dns: +syn keyword lftpSettings contained S[RV-query] cache-en[able] + \ cache-ex[pire] cache-s[ize] + \ fat[al-timeout] o[rder] use-fo[rk] +" file: +syn keyword lftpSettings contained ch[arset] +" fish: +syn keyword lftpSettings contained connect[-program] sh[ell] +" ftp: +syn keyword lftpSettings contained acct anon-p[ass] anon-u[ser] + \ au[to-sync-mode] b[ind-data-socket] + \ ch[arset] cli[ent] dev[ice-prefix] + \ fi[x-pasv-address] fxp-f[orce] + \ fxp-p[assive-source] h[ome] la[ng] + \ list-e[mpty-ok] list-o[ptions] + \ nop[-interval] pas[sive-mode] + \ port-i[pv4] port-r[ange] prox[y] + \ rest-l[ist] rest-s[tor] + \ retry-530 retry-530[-anonymous] + \ sit[e-group] skey-a[llow] + \ skey-f[orce] ssl-allow + \ ssl-allow[-anonymous] ssl-au[th] + \ ssl-f[orce] ssl-protect-d[ata] + \ ssl-protect-l[ist] stat-[interval] + \ sy[nc-mode] timez[one] use-a[bor] + \ use-fe[at] use-fx[p] use-hf[tp] + \ use-mdtm use-mdtm[-overloaded] + \ use-ml[sd] use-p[ret] use-q[uit] + \ use-site-c[hmod] use-site-i[dle] + \ use-site-u[time] use-siz[e] + \ use-st[at] use-te[lnet-iac] + \ verify-a[ddress] verify-p[ort] + \ w[eb-mode] +" hftp: +syn keyword lftpSettings contained w[eb-mode] cache prox[y] + \ use-au[thorization] use-he[ad] use-ty[pe] +" http: +syn keyword lftpSettings contained accept accept-c[harset] + \ accept-l[anguage] cache coo[kie] + \ pos[t-content-type] prox[y] + \ put-c[ontent-type] put-m[ethod] ref[erer] + \ set-c[ookies] user[-agent] +" https: +syn keyword lftpSettings contained prox[y] +" mirror: +syn keyword lftpSettings contained exc[lude-regex] o[rder] + \ parallel-d[irectories] + \ parallel-t[ransfer-count] use-p[get-n] +" module: +syn keyword lftpSettings contained pat[h] +" net: +syn keyword lftpSettings contained connection-l[imit] + \ connection-t[akeover] id[le] limit-m[ax] + \ limit-r[ate] limit-total-m[ax] + \ limit-total-r[ate] max-ret[ries] no-[proxy] + \ pe[rsist-retries] reconnect-interval-b[ase] + \ reconnect-interval-ma[x] + \ reconnect-interval-mu[ltiplier] + \ socket-bind-ipv4 socket-bind-ipv6 + \ socket-bu[ffer] socket-m[axseg] timeo[ut] +" sftp: +syn keyword lftpSettings contained connect[-program] + \ max-p[ackets-in-flight] prot[ocol-version] + \ ser[ver-program] size-r[ead] size-w[rite] +" ssl: +syn keyword lftpSettings contained ca-f[ile] ca-p[ath] ce[rt-file] + \ crl-f[ile] crl-p[ath] k[ey-file] + \ verify-c[ertificate] +" xfer: +syn keyword lftpSettings contained clo[bber] dis[k-full-fatal] + \ eta-p[eriod] eta-t[erse] mak[e-backup] + \ max-red[irections] ra[te-period] + +hi def link lftpComment Comment +hi def link lftpTodo Todo +hi def link lftpString String +hi def link lftpNumber Number +hi def link lftpBoolean Boolean +hi def link lftpInterval Number +hi def link lftpKeywords Keyword +hi def link lftpSettingsPrefix PreProc +hi def link lftpSettings Type + +let b:current_syntax = "lftp" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/lhaskell.vim b/vim/bundle/ubuntu-vim72/syntax/lhaskell.vim new file mode 100644 index 0000000..8cc1ded --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/lhaskell.vim @@ -0,0 +1,146 @@ +" Vim syntax file +" Language: Haskell with literate comments, Bird style, +" TeX style and plain text surrounding +" \begin{code} \end{code} blocks +" Maintainer: Haskell Cafe mailinglist +" Original Author: Arthur van Leeuwen +" Last Change: 2009 May 08 +" Version: 1.04 +" +" Thanks to Ian Lynagh for thoughtful comments on initial versions and +" for the inspiration for writing this in the first place. +" +" This style guesses as to the type of markup used in a literate haskell +" file and will highlight (La)TeX markup if it finds any +" This behaviour can be overridden, both glabally and locally using +" the lhs_markup variable or b:lhs_markup variable respectively. +" +" lhs_markup must be set to either tex or none to indicate that +" you always want (La)TeX highlighting or no highlighting +" must not be set to let the highlighting be guessed +" b:lhs_markup must be set to eiterh tex or none to indicate that +" you want (La)TeX highlighting or no highlighting for +" this particular buffer +" must not be set to let the highlighting be guessed +" +" +" 2004 February 18: New version, based on Ian Lynagh's TeX guessing +" lhaskell.vim, cweb.vim, tex.vim, sh.vim and fortran.vim +" 2004 February 20: Cleaned up the guessing and overriding a bit +" 2004 February 23: Cleaned up syntax highlighting for \begin{code} and +" \end{code}, added some clarification to the attributions +" 2008 July 1: Removed % from guess list, as it totally breaks plain +" text markup guessing +" 2009 April 29: Fixed highlighting breakage in TeX mode, +" thanks to Kalman Noel +" + + +" 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 + +" First off, see if we can inherit a user preference for lhs_markup +if !exists("b:lhs_markup") + if exists("lhs_markup") + if lhs_markup =~ '\<\%(tex\|none\)\>' + let b:lhs_markup = matchstr(lhs_markup,'\<\%(tex\|none\)\>') + else + echohl WarningMsg | echo "Unknown value of lhs_markup" | echohl None + let b:lhs_markup = "unknown" + endif + else + let b:lhs_markup = "unknown" + endif +else + if b:lhs_markup !~ '\<\%(tex\|none\)\>' + let b:lhs_markup = "unknown" + endif +endif + +" Remember where the cursor is, and go to upperleft +let s:oldline=line(".") +let s:oldcolumn=col(".") +call cursor(1,1) + +" If no user preference, scan buffer for our guess of the markup to +" highlight. We only differentiate between TeX and plain markup, where +" plain is not highlighted. The heuristic for finding TeX markup is if +" one of the following occurs anywhere in the file: +" - \documentclass +" - \begin{env} (for env != code) +" - \part, \chapter, \section, \subsection, \subsubsection, etc +if b:lhs_markup == "unknown" + if search('\\documentclass\|\\begin{\(code}\)\@!\|\\\(sub\)*section\|\\chapter|\\part','W') != 0 + let b:lhs_markup = "tex" + else + let b:lhs_markup = "plain" + endif +endif + +" If user wants us to highlight TeX syntax or guess thinks it's TeX, read it. +if b:lhs_markup == "tex" + if version < 600 + source :p:h/tex.vim + set isk+=_ + else + runtime! syntax/tex.vim + unlet b:current_syntax + " Tex.vim removes "_" from 'iskeyword', but we need it for Haskell. + setlocal isk+=_ + endif + syntax cluster lhsTeXContainer contains=tex.*Zone,texAbstract +else + syntax cluster lhsTeXContainer contains=.* +endif + +" Literate Haskell is Haskell in between text, so at least read Haskell +" highlighting +if version < 600 + syntax include @haskellTop :p:h/haskell.vim +else + syntax include @haskellTop syntax/haskell.vim +endif + +syntax region lhsHaskellBirdTrack start="^>" end="\%(^[^>]\)\@=" contains=@haskellTop,lhsBirdTrack containedin=@lhsTeXContainer +syntax region lhsHaskellBeginEndBlock start="^\\begin{code}\s*$" matchgroup=NONE end="\%(^\\end{code}.*$\)\@=" contains=@haskellTop,@beginCode containedin=@lhsTeXContainer + +syntax match lhsBirdTrack "^>" contained + +syntax match beginCodeBegin "^\\begin" nextgroup=beginCodeCode contained +syntax region beginCodeCode matchgroup=texDelimiter start="{" end="}" +syntax cluster beginCode contains=beginCodeBegin,beginCodeCode + +" 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_tex_syntax_inits") + if version < 508 + let did_tex_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink lhsBirdTrack Comment + + HiLink beginCodeBegin texCmdName + HiLink beginCodeCode texSection + + delcommand HiLink +endif + +" Restore cursor to original position, as it may have been disturbed +" by the searches in our guessing code +call cursor (s:oldline, s:oldcolumn) + +unlet s:oldline +unlet s:oldcolumn + +let b:current_syntax = "lhaskell" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/libao.vim b/vim/bundle/ubuntu-vim72/syntax/libao.vim new file mode 100644 index 0000000..25b6e82 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/libao.vim @@ -0,0 +1,27 @@ +" Vim syntax file +" Language: libao.conf(5) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword libaoTodo contained TODO FIXME XXX NOTE + +syn region libaoComment display oneline start='^\s*#' end='$' + \ contains=libaoTodo,@Spell + +syn keyword libaoKeyword default_driver + +hi def link libaoTodo Todo +hi def link libaoComment Comment +hi def link libaoKeyword Keyword + +let b:current_syntax = "libao" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/lifelines.vim b/vim/bundle/ubuntu-vim72/syntax/lifelines.vim new file mode 100644 index 0000000..d825a17 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/lifelines.vim @@ -0,0 +1,160 @@ +" Vim syntax file +" Language: LifeLines (v 3.0.50) http://lifelines.sourceforge.net +" Maintainer: Patrick Texier +" Location: http://www.genindre.org/ftp/lifelines/lifelines.vim +" Last Change: 2005 Dec 22. + +" option to highlight error obsolete statements +" add the following line to your .vimrc file or here : +" (level2 is for baptism) + +" let lifelines_deprecated=1 +" let lifelines_deprecated_level2=1 + +" 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 lifelines keywords 3.0.50 + +syn keyword lifelinesStatement set +syn keyword lifelinesUser getindi geindiset getfam getint getstr choosechild +syn keyword lifelinesUser chooseindi choosespouse choosesubset menuchoose +syn keyword lifelinesUser choosefam +syn keyword lifelinesProc proc func return call +syn keyword lifelinesInclude include +syn keyword lifelinesDef global +syn keyword lifelinesConditional if else elsif switch +syn keyword lifelinesRepeat continue break while +syn keyword lifelinesLogical and or not eq ne lt gt le ge strcmp eqstr nestr +syn keyword lifelinesArithm add sub mul div mod exp neg incr decr +syn keyword lifelinesArithm cos sin tan arccos arcsin arctan +syn keyword lifelinesArithm deg2dms dms2deg spdist +syn keyword lifelinesIndi name fullname surname givens trimname birth +syn keyword lifelinesIndi death burial +syn keyword lifelinesIndi father mother nextsib prevsib sex male female +syn keyword lifelinesIndi pn nspouses nfamilies parents title key +syn keyword lifelinesIndi soundex inode root indi firstindi nextindi +syn keyword lifelinesIndi previndi spouses families forindi indiset +syn keyword lifelinesIndi addtoset deletefromset union intersect +syn keyword lifelinesIndi difference parentset childset spouseset siblingset +syn keyword lifelinesIndi ancestorset descendentset descendantset uniqueset +syn keyword lifelinesIndi namesort keysort valuesort genindiset getindiset +syn keyword lifelinesIndi forindiset lastindi writeindi +syn keyword lifelinesIndi inset +syn keyword lifelinesFam marriage husband wife nchildren firstchild +syn keyword lifelinesFam lastchild fnode fam firstfam nextfam lastfam +syn keyword lifelinesFam prevfam children forfam writefam +syn keyword lifelinesFam fathers mothers Parents +syn keyword lifelinesList list empty length enqueue dequeue requeue +syn keyword lifelinesList push pop setel getel forlist inlist dup clear +syn keyword lifelinesTable table insert lookup +syn keyword lifelinesGedcom xref tag value parent child sibling savenode +syn keyword lifelinesGedcom fornodes traverse createnode addnode +syn keyword lifelinesGedcom detachnode foreven fornotes forothr forsour +syn keyword lifelinesGedcom reference dereference getrecord +syn keyword lifelinesFunct date place year long short gettoday dayformat +syn keyword lifelinesFunct monthformat dateformat extractdate eraformat +syn keyword lifelinesFunct complexdate complexformat complexpic datepic +syn keyword lifelinesFunct extractnames extractplaces extracttokens lower +syn keyword lifelinesFunct yearformat +syn keyword lifelinesFunct upper capitalize trim rjustify +syn keyword lifelinesFunct concat strconcat strlen substring index +syn keyword lifelinesFunct titlecase gettext +syn keyword lifelinesFunct d card ord alpha roman strsoundex strtoint +syn keyword lifelinesFunct atoi linemode pagemod col row pos pageout nl +syn keyword lifelinesFunct sp qt newfile outfile copyfile print lock unlock test +syn keyword lifelinesFunct database version system stddate program +syn keyword lifelinesFunct pvalue pagemode level extractdatestr debug +syn keyword lifelinesFunct f float int free getcol getproperty heapused +syn keyword lifelinesFunct sort rsort +syn keyword lifelinesFunct deleteel +syn keyword lifelinesFunct bytecode convertcode setlocale + +" option to highlight error obsolete statements +" please read ll-reportmanual + +if exists("lifelines_deprecated") + syn keyword lifelinesError getintmsg getindimsg getstrmsg + syn keyword lifelinesError gengedcom gengedcomstrong gengedcomweak deletenode + syn keyword lifelinesError save strsave + syn keyword lifelinesError lengthset +else + syn keyword lifelinesUser getintmsg getindimsg getstrmsg + syn keyword lifelinesGedcom gengedcom gengedcomstrong gengedcomweak deletenode + syn keyword lifelinesFunct save strsave + syn keyword lifelinesIndi lengthset +endif +if exists("lifelines_deprecated_level2") + syn keyword lifelinesError baptism +else + syn keyword lifelinesIndi baptism +endif + +syn region lifelinesString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=lifelinesSpecial + +syn match lifelinesSpecial "\\\(\\\|\(n\|t\)\)" contained + +syn region lifelinesComment start="/\*" end="\*/" + +" integers +syn match lifelinesNumber "-\=\<\d\+\>" +"floats, with dot +syn match lifelinesNumber "-\=\<\d\+\.\d*\>" +"floats, starting with a dot +syn match lifelinesNumber "-\=\.\d\+\>" + +"catch errors caused by wrong parenthesis +"adapted from original c.vim written by Bram Moolenaar + +syn cluster lifelinesParenGroup contains=lifelinesParenError +syn region lifelinesParen transparent start='(' end=')' contains=ALLBUT,@lifelinesParenGroup +syn match lifelinesParenError ")" +syn match lifelinesErrInParen contained "[{}]" + +" 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_lifelines_syn_inits") + if version < 508 + let did_lifelines_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink lifelinesConditional Conditional + HiLink lifelinesArithm Operator + HiLink lifelinesLogical Conditional + HiLink lifelinesInclude Include + HiLink lifelinesComment Comment + HiLink lifelinesStatement Statement + HiLink lifelinesUser Statement + HiLink lifelinesFunct Statement + HiLink lifelinesTable Statement + HiLink lifelinesGedcom Statement + HiLink lifelinesList Statement + HiLink lifelinesRepeat Repeat + HiLink lifelinesFam Statement + HiLink lifelinesIndi Statement + HiLink lifelinesProc Statement + HiLink lifelinesDef Statement + HiLink lifelinesString String + HiLink lifelinesSpecial Special + HiLink lifelinesNumber Number + HiLink lifelinesParenError Error + HiLink lifelinesErrInParen Error + HiLink lifelinesError Error + + delcommand HiLink +endif + +let b:current_syntax = "lifelines" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/lilo.vim b/vim/bundle/ubuntu-vim72/syntax/lilo.vim new file mode 100644 index 0000000..14bd940 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/lilo.vim @@ -0,0 +1,192 @@ +" Vim syntax file +" Language: lilo configuration (lilo.conf) +" Maintainer: help wanted! +" Previous Maintainer: David Necas (Yeti) +" Last Change: 2009-01-27 + +" Setup +if version >= 600 + if exists("b:current_syntax") + finish + endif +else + syntax clear +endif + +if version >= 600 + command -nargs=1 SetIsk setlocal iskeyword= +else + command -nargs=1 SetIsk set iskeyword= +endif +SetIsk @,48-57,.,-,_ +delcommand SetIsk + +syn case ignore + +" Base constructs +syn match liloError "\S\+" +syn match liloComment "#.*$" +syn match liloEnviron "\$\w\+" contained +syn match liloEnviron "\${[^}]\+}" contained +syn match liloDecNumber "\d\+" contained +syn match liloHexNumber "0[xX]\x\+" contained +syn match liloDecNumberP "\d\+p\=" contained +syn match liloSpecial contained "\\\(\"\|\\\|$\)" +syn region liloString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=liloSpecial,liloEnviron +syn match liloLabel :[^ "]\+: contained contains=liloSpecial,liloEnviron +syn region liloPath start=+[$/]+ skip=+\\\\\|\\ \|\\$"+ end=+ \|$+ contained contains=liloSpecial,liloEnviron +syn match liloDecNumberList "\(\d\|,\)\+" contained contains=liloDecNumber +syn match liloDecNumberPList "\(\d\|[,p]\)\+" contained contains=liloDecNumberP,liloDecNumber +syn region liloAnything start=+[^[:space:]#]+ skip=+\\\\\|\\ \|\\$+ end=+ \|$+ contained contains=liloSpecial,liloEnviron,liloString + +" Path +syn keyword liloOption backup bitmap boot disktab force-backup keytable map message nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty +syn keyword liloKernelOpt initrd root nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty +syn keyword liloImageOpt path loader table nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty +syn keyword liloDiskOpt partition nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty + +" Other +syn keyword liloOption menu-scheme raid-extra-boot serial install nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty +syn keyword liloOption bios-passes-dl nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty +syn keyword liloOption default label alias wmdefault nextgroup=liloEqLabelString,liloEqLabelStringComment,liloError skipwhite skipempty +syn keyword liloKernelOpt ramdisk nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty +syn keyword liloImageOpt password range nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty +syn keyword liloDiskOpt set type nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty + +" Symbolic +syn keyword liloKernelOpt vga nextgroup=liloEqVga,liloEqVgaComment,liloError skipwhite skipempty + +" Number +syn keyword liloOption delay timeout verbose nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty +syn keyword liloDiskOpt sectors heads cylinders start nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty + +" String +syn keyword liloOption menu-title nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty +syn keyword liloKernelOpt append addappend nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty +syn keyword liloImageOpt fallback literal nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty + +" Hex number +syn keyword liloImageOpt map-drive to boot-as nextgroup=liloEqHexNumber,liloEqHexNumberComment,liloError skipwhite skipempty +syn keyword liloDiskOpt bios normal hidden nextgroup=liloEqNumber,liloEqNumberComment,liloError skipwhite skipempty + +" Number list +syn keyword liloOption bmp-colors nextgroup=liloEqNumberList,liloEqNumberListComment,liloError skipwhite skipempty + +" Number list, some of the numbers followed by p +syn keyword liloOption bmp-table bmp-timer nextgroup=liloEqDecNumberPList,liloEqDecNumberPListComment,liloError skipwhite skipempty + +" Flag +syn keyword liloOption compact fix-table geometric ignore-table lba32 linear mandatory nowarn prompt +syn keyword liloOption bmp-retain el-torito-bootable-CD large-memory suppress-boot-time-BIOS-data +syn keyword liloKernelOpt read-only read-write +syn keyword liloImageOpt bypass lock mandatory optional restricted single-key unsafe +syn keyword liloImageOpt master-boot wmwarn wmdisable +syn keyword liloDiskOpt change activate deactivate inaccessible reset + +" Image +syn keyword liloImage image other nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty +syn keyword liloDisk disk nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty +syn keyword liloChRules change-rules + +" Vga keywords +syn keyword liloVgaKeyword ask ext extended normal contained + +" Comment followed by equal sign and ... +syn match liloEqPathComment "#.*$" contained nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty +syn match liloEqVgaComment "#.*$" contained nextgroup=liloEqVga,liloEqVgaComment,liloError skipwhite skipempty +syn match liloEqNumberComment "#.*$" contained nextgroup=liloEqNumber,liloEqNumberComment,liloError skipwhite skipempty +syn match liloEqDecNumberComment "#.*$" contained nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty +syn match liloEqHexNumberComment "#.*$" contained nextgroup=liloEqHexNumber,liloEqHexNumberComment,liloError skipwhite skipempty +syn match liloEqStringComment "#.*$" contained nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty +syn match liloEqLabelStringComment "#.*$" contained nextgroup=liloEqLabelString,liloEqLabelStringComment,liloError skipwhite skipempty +syn match liloEqNumberListComment "#.*$" contained nextgroup=liloEqNumberList,liloEqNumberListComment,liloError skipwhite skipempty +syn match liloEqDecNumberPListComment "#.*$" contained nextgroup=liloEqDecNumberPList,liloEqDecNumberPListComment,liloError skipwhite skipempty +syn match liloEqAnythingComment "#.*$" contained nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty + +" Equal sign followed by ... +syn match liloEqPath "=" contained nextgroup=liloPath,liloPathComment,liloError skipwhite skipempty +syn match liloEqVga "=" contained nextgroup=liloVgaKeyword,liloHexNumber,liloDecNumber,liloVgaComment,liloError skipwhite skipempty +syn match liloEqNumber "=" contained nextgroup=liloDecNumber,liloHexNumber,liloNumberComment,liloError skipwhite skipempty +syn match liloEqDecNumber "=" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty +syn match liloEqHexNumber "=" contained nextgroup=liloHexNumber,liloHexNumberComment,liloError skipwhite skipempty +syn match liloEqString "=" contained nextgroup=liloString,liloStringComment,liloError skipwhite skipempty +syn match liloEqLabelString "=" contained nextgroup=liloString,liloLabel,liloLabelStringComment,liloError skipwhite skipempty +syn match liloEqNumberList "=" contained nextgroup=liloDecNumberList,liloDecNumberListComment,liloError skipwhite skipempty +syn match liloEqDecNumberPList "=" contained nextgroup=liloDecNumberPList,liloDecNumberPListComment,liloError skipwhite skipempty +syn match liloEqAnything "=" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty + +" Comment followed by ... +syn match liloPathComment "#.*$" contained nextgroup=liloPath,liloPathComment,liloError skipwhite skipempty +syn match liloVgaComment "#.*$" contained nextgroup=liloVgaKeyword,liloHexNumber,liloVgaComment,liloError skipwhite skipempty +syn match liloNumberComment "#.*$" contained nextgroup=liloDecNumber,liloHexNumber,liloNumberComment,liloError skipwhite skipempty +syn match liloDecNumberComment "#.*$" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty +syn match liloHexNumberComment "#.*$" contained nextgroup=liloHexNumber,liloHexNumberComment,liloError skipwhite skipempty +syn match liloStringComment "#.*$" contained nextgroup=liloString,liloStringComment,liloError skipwhite skipempty +syn match liloLabelStringComment "#.*$" contained nextgroup=liloString,liloLabel,liloLabelStringComment,liloError skipwhite skipempty +syn match liloDecNumberListComment "#.*$" contained nextgroup=liloDecNumberList,liloDecNumberListComment,liloError skipwhite skipempty +syn match liloDecNumberPListComment "#.*$" contained nextgroup=liloDecNumberPList,liloDecNumberPListComment,liloError skipwhite skipempty +syn match liloAnythingComment "#.*$" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty + +" Define the default highlighting +if version >= 508 || !exists("did_lilo_syntax_inits") + if version < 508 + let did_lilo_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink liloEqPath liloEquals + HiLink liloEqWord liloEquals + HiLink liloEqVga liloEquals + HiLink liloEqDecNumber liloEquals + HiLink liloEqHexNumber liloEquals + HiLink liloEqNumber liloEquals + HiLink liloEqString liloEquals + HiLink liloEqAnything liloEquals + HiLink liloEquals Special + + HiLink liloError Error + + HiLink liloEqPathComment liloComment + HiLink liloEqVgaComment liloComment + HiLink liloEqDecNumberComment liloComment + HiLink liloEqHexNumberComment liloComment + HiLink liloEqStringComment liloComment + HiLink liloEqAnythingComment liloComment + HiLink liloPathComment liloComment + HiLink liloVgaComment liloComment + HiLink liloDecNumberComment liloComment + HiLink liloHexNumberComment liloComment + HiLink liloNumberComment liloComment + HiLink liloStringComment liloComment + HiLink liloAnythingComment liloComment + HiLink liloComment Comment + + HiLink liloDiskOpt liloOption + HiLink liloKernelOpt liloOption + HiLink liloImageOpt liloOption + HiLink liloOption Keyword + + HiLink liloDecNumber liloNumber + HiLink liloHexNumber liloNumber + HiLink liloDecNumberP liloNumber + HiLink liloNumber Number + HiLink liloString String + HiLink liloPath Constant + + HiLink liloSpecial Special + HiLink liloLabel Title + HiLink liloDecNumberList Special + HiLink liloDecNumberPList Special + HiLink liloAnything Normal + HiLink liloEnviron Identifier + HiLink liloVgaKeyword Identifier + HiLink liloImage Type + HiLink liloChRules Preproc + HiLink liloDisk Preproc + + delcommand HiLink +endif + +let b:current_syntax = "lilo" diff --git a/vim/bundle/ubuntu-vim72/syntax/limits.vim b/vim/bundle/ubuntu-vim72/syntax/limits.vim new file mode 100644 index 0000000..a6d245a --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/limits.vim @@ -0,0 +1,44 @@ +" Vim syntax file +" Language: limits(5) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword limitsTodo contained TODO FIXME XXX NOTE + +syn region limitsComment display oneline start='^\s*#' end='$' + \ contains=limitsTodo,@Spell + +syn match limitsBegin display '^' + \ nextgroup=limitsUser,limitsDefault,limitsComment + \ skipwhite + +syn match limitsUser contained '[^ \t#*]\+' + \ nextgroup=limitsLimit,limitsDeLimit skipwhite + +syn match limitsDefault contained '*' + \ nextgroup=limitsLimit,limitsDeLimit skipwhite + +syn match limitsLimit contained '[ACDFMNRSTUKLP]' nextgroup=limitsNumber +syn match limitsDeLimit contained '-' + +syn match limitsNumber contained '\d\+\>' nextgroup=limitsLimit skipwhite + +hi def link limitsTodo Todo +hi def link limitsComment Comment +hi def link limitsUser Keyword +hi def link limitsDefault Macro +hi def link limitsLimit Identifier +hi def link limitsDeLimit Special +hi def link limitsNumber Number + +let b:current_syntax = "limits" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/lisp.vim b/vim/bundle/ubuntu-vim72/syntax/lisp.vim new file mode 100644 index 0000000..fd44f60 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/lisp.vim @@ -0,0 +1,625 @@ +" Vim syntax file +" Language: Lisp +" Maintainer: Dr. Charles E. Campbell, Jr. +" Last Change: Mar 05, 2009 +" Version: 21 +" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax +" +" Thanks to F Xavier Noria for a list of 978 Common Lisp symbols +" taken from the HyperSpec +" Clisp additions courtesy of http://clisp.cvs.sourceforge.net/*checkout*/clisp/clisp/emacs/lisp.vim + +" --------------------------------------------------------------------- +" Load Once: {{{1 +" For vim-version 5.x: Clear all syntax items +" For vim-version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if version >= 600 + setlocal iskeyword=38,42,43,45,47-58,60-62,64-90,97-122,_ +else + set iskeyword=38,42,43,45,47-58,60-62,64-90,97-122,_ +endif + +if exists("g:lispsyntax_ignorecase") || exists("g:lispsyntax_clisp") + set ignorecase +endif + +" --------------------------------------------------------------------- +" Clusters: {{{1 +syn cluster lispAtomCluster contains=lispAtomBarSymbol,lispAtomList,lispAtomNmbr0,lispComment,lispDecl,lispFunc,lispLeadWhite +syn cluster lispBaseListCluster contains=lispAtom,lispAtomBarSymbol,lispAtomMark,lispBQList,lispBarSymbol,lispComment,lispConcat,lispDecl,lispFunc,lispKey,lispList,lispNumber,lispSpecial,lispSymbol,lispVar,lispLeadWhite +if exists("g:lisp_instring") + syn cluster lispListCluster contains=@lispBaseListCluster,lispString,lispInString,lispInStringString +else + syn cluster lispListCluster contains=@lispBaseListCluster,lispString +endif + +syn case ignore + +" --------------------------------------------------------------------- +" Lists: {{{1 +syn match lispSymbol contained ![^()'`,"; \t]\+! +syn match lispBarSymbol contained !|..\{-}|! +if exists("g:lisp_rainbow") && g:lisp_rainbow != 0 + syn region lispParen0 matchgroup=hlLevel0 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen1 + syn region lispParen1 contained matchgroup=hlLevel1 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen2 + syn region lispParen2 contained matchgroup=hlLevel2 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen3 + syn region lispParen3 contained matchgroup=hlLevel3 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen4 + syn region lispParen4 contained matchgroup=hlLevel4 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen5 + syn region lispParen5 contained matchgroup=hlLevel5 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen6 + syn region lispParen6 contained matchgroup=hlLevel6 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen7 + syn region lispParen7 contained matchgroup=hlLevel7 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen8 + syn region lispParen8 contained matchgroup=hlLevel8 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen9 + syn region lispParen9 contained matchgroup=hlLevel9 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen0 +else + syn region lispList matchgroup=Delimiter start="(" skip="|.\{-}|" matchgroup=Delimiter end=")" contains=@lispListCluster + syn region lispBQList matchgroup=PreProc start="`(" skip="|.\{-}|" matchgroup=PreProc end=")" contains=@lispListCluster +endif + +" --------------------------------------------------------------------- +" Atoms: {{{1 +syn match lispAtomMark "'" +syn match lispAtom "'("me=e-1 contains=lispAtomMark nextgroup=lispAtomList +syn match lispAtom "'[^ \t()]\+" contains=lispAtomMark +syn match lispAtomBarSymbol !'|..\{-}|! contains=lispAtomMark +syn region lispAtom start=+'"+ skip=+\\"+ end=+"+ +syn region lispAtomList contained matchgroup=Special start="(" skip="|.\{-}|" matchgroup=Special end=")" contains=@lispAtomCluster,lispString,lispSpecial +syn match lispAtomNmbr contained "\<\d\+" +syn match lispLeadWhite contained "^\s\+" + +" --------------------------------------------------------------------- +" Standard Lisp Functions and Macros: {{{1 +syn keyword lispFunc * find-method pprint-indent +syn keyword lispFunc ** find-package pprint-linear +syn keyword lispFunc *** find-restart pprint-logical-block +syn keyword lispFunc + find-symbol pprint-newline +syn keyword lispFunc ++ finish-output pprint-pop +syn keyword lispFunc +++ first pprint-tab +syn keyword lispFunc - fixnum pprint-tabular +syn keyword lispFunc / flet prin1 +syn keyword lispFunc // float prin1-to-string +syn keyword lispFunc /// float-digits princ +syn keyword lispFunc /= float-precision princ-to-string +syn keyword lispFunc 1+ float-radix print +syn keyword lispFunc 1- float-sign print-not-readable +syn keyword lispFunc < floating-point-inexact print-not-readable-object +syn keyword lispFunc <= floating-point-invalid-operation print-object +syn keyword lispFunc = floating-point-overflow print-unreadable-object +syn keyword lispFunc > floating-point-underflow probe-file +syn keyword lispFunc >= floatp proclaim +syn keyword lispFunc abort floor prog +syn keyword lispFunc abs fmakunbound prog* +syn keyword lispFunc access force-output prog1 +syn keyword lispFunc acons format prog2 +syn keyword lispFunc acos formatter progn +syn keyword lispFunc acosh fourth program-error +syn keyword lispFunc add-method fresh-line progv +syn keyword lispFunc adjoin fround provide +syn keyword lispFunc adjust-array ftruncate psetf +syn keyword lispFunc adjustable-array-p ftype psetq +syn keyword lispFunc allocate-instance funcall push +syn keyword lispFunc alpha-char-p function pushnew +syn keyword lispFunc alphanumericp function-keywords putprop +syn keyword lispFunc and function-lambda-expression quote +syn keyword lispFunc append functionp random +syn keyword lispFunc apply gbitp random-state +syn keyword lispFunc applyhook gcd random-state-p +syn keyword lispFunc apropos generic-function rassoc +syn keyword lispFunc apropos-list gensym rassoc-if +syn keyword lispFunc aref gentemp rassoc-if-not +syn keyword lispFunc arithmetic-error get ratio +syn keyword lispFunc arithmetic-error-operands get-decoded-time rational +syn keyword lispFunc arithmetic-error-operation get-dispatch-macro-character rationalize +syn keyword lispFunc array get-internal-real-time rationalp +syn keyword lispFunc array-dimension get-internal-run-time read +syn keyword lispFunc array-dimension-limit get-macro-character read-byte +syn keyword lispFunc array-dimensions get-output-stream-string read-char +syn keyword lispFunc array-displacement get-properties read-char-no-hang +syn keyword lispFunc array-element-type get-setf-expansion read-delimited-list +syn keyword lispFunc array-has-fill-pointer-p get-setf-method read-eval-print +syn keyword lispFunc array-in-bounds-p get-universal-time read-from-string +syn keyword lispFunc array-rank getf read-line +syn keyword lispFunc array-rank-limit gethash read-preserving-whitespace +syn keyword lispFunc array-row-major-index go read-sequence +syn keyword lispFunc array-total-size graphic-char-p reader-error +syn keyword lispFunc array-total-size-limit handler-bind readtable +syn keyword lispFunc arrayp handler-case readtable-case +syn keyword lispFunc ash hash-table readtablep +syn keyword lispFunc asin hash-table-count real +syn keyword lispFunc asinh hash-table-p realp +syn keyword lispFunc assert hash-table-rehash-size realpart +syn keyword lispFunc assoc hash-table-rehash-threshold reduce +syn keyword lispFunc assoc-if hash-table-size reinitialize-instance +syn keyword lispFunc assoc-if-not hash-table-test rem +syn keyword lispFunc atan host-namestring remf +syn keyword lispFunc atanh identity remhash +syn keyword lispFunc atom if remove +syn keyword lispFunc base-char if-exists remove-duplicates +syn keyword lispFunc base-string ignorable remove-if +syn keyword lispFunc bignum ignore remove-if-not +syn keyword lispFunc bit ignore-errors remove-method +syn keyword lispFunc bit-and imagpart remprop +syn keyword lispFunc bit-andc1 import rename-file +syn keyword lispFunc bit-andc2 in-package rename-package +syn keyword lispFunc bit-eqv in-package replace +syn keyword lispFunc bit-ior incf require +syn keyword lispFunc bit-nand initialize-instance rest +syn keyword lispFunc bit-nor inline restart +syn keyword lispFunc bit-not input-stream-p restart-bind +syn keyword lispFunc bit-orc1 inspect restart-case +syn keyword lispFunc bit-orc2 int-char restart-name +syn keyword lispFunc bit-vector integer return +syn keyword lispFunc bit-vector-p integer-decode-float return-from +syn keyword lispFunc bit-xor integer-length revappend +syn keyword lispFunc block integerp reverse +syn keyword lispFunc boole interactive-stream-p room +syn keyword lispFunc boole-1 intern rotatef +syn keyword lispFunc boole-2 internal-time-units-per-second round +syn keyword lispFunc boole-and intersection row-major-aref +syn keyword lispFunc boole-andc1 invalid-method-error rplaca +syn keyword lispFunc boole-andc2 invoke-debugger rplacd +syn keyword lispFunc boole-c1 invoke-restart safety +syn keyword lispFunc boole-c2 invoke-restart-interactively satisfies +syn keyword lispFunc boole-clr isqrt sbit +syn keyword lispFunc boole-eqv keyword scale-float +syn keyword lispFunc boole-ior keywordp schar +syn keyword lispFunc boole-nand labels search +syn keyword lispFunc boole-nor lambda second +syn keyword lispFunc boole-orc1 lambda-list-keywords sequence +syn keyword lispFunc boole-orc2 lambda-parameters-limit serious-condition +syn keyword lispFunc boole-set last set +syn keyword lispFunc boole-xor lcm set-char-bit +syn keyword lispFunc boolean ldb set-difference +syn keyword lispFunc both-case-p ldb-test set-dispatch-macro-character +syn keyword lispFunc boundp ldiff set-exclusive-or +syn keyword lispFunc break least-negative-double-float set-macro-character +syn keyword lispFunc broadcast-stream least-negative-long-float set-pprint-dispatch +syn keyword lispFunc broadcast-stream-streams least-negative-normalized-double-float set-syntax-from-char +syn keyword lispFunc built-in-class least-negative-normalized-long-float setf +syn keyword lispFunc butlast least-negative-normalized-short-float setq +syn keyword lispFunc byte least-negative-normalized-single-float seventh +syn keyword lispFunc byte-position least-negative-short-float shadow +syn keyword lispFunc byte-size least-negative-single-float shadowing-import +syn keyword lispFunc call-arguments-limit least-positive-double-float shared-initialize +syn keyword lispFunc call-method least-positive-long-float shiftf +syn keyword lispFunc call-next-method least-positive-normalized-double-float short-float +syn keyword lispFunc capitalize least-positive-normalized-long-float short-float-epsilon +syn keyword lispFunc car least-positive-normalized-short-float short-float-negative-epsilon +syn keyword lispFunc case least-positive-normalized-single-float short-site-name +syn keyword lispFunc catch least-positive-short-float signal +syn keyword lispFunc ccase least-positive-single-float signed-byte +syn keyword lispFunc cdr length signum +syn keyword lispFunc ceiling let simple-condition +syn keyword lispFunc cell-error let* simple-array +syn keyword lispFunc cell-error-name lisp simple-base-string +syn keyword lispFunc cerror lisp-implementation-type simple-bit-vector +syn keyword lispFunc change-class lisp-implementation-version simple-bit-vector-p +syn keyword lispFunc char list simple-condition-format-arguments +syn keyword lispFunc char-bit list* simple-condition-format-control +syn keyword lispFunc char-bits list-all-packages simple-error +syn keyword lispFunc char-bits-limit list-length simple-string +syn keyword lispFunc char-code listen simple-string-p +syn keyword lispFunc char-code-limit listp simple-type-error +syn keyword lispFunc char-control-bit load simple-vector +syn keyword lispFunc char-downcase load-logical-pathname-translations simple-vector-p +syn keyword lispFunc char-equal load-time-value simple-warning +syn keyword lispFunc char-font locally sin +syn keyword lispFunc char-font-limit log single-flaot-epsilon +syn keyword lispFunc char-greaterp logand single-float +syn keyword lispFunc char-hyper-bit logandc1 single-float-epsilon +syn keyword lispFunc char-int logandc2 single-float-negative-epsilon +syn keyword lispFunc char-lessp logbitp sinh +syn keyword lispFunc char-meta-bit logcount sixth +syn keyword lispFunc char-name logeqv sleep +syn keyword lispFunc char-not-equal logical-pathname slot-boundp +syn keyword lispFunc char-not-greaterp logical-pathname-translations slot-exists-p +syn keyword lispFunc char-not-lessp logior slot-makunbound +syn keyword lispFunc char-super-bit lognand slot-missing +syn keyword lispFunc char-upcase lognor slot-unbound +syn keyword lispFunc char/= lognot slot-value +syn keyword lispFunc char< logorc1 software-type +syn keyword lispFunc char<= logorc2 software-version +syn keyword lispFunc char= logtest some +syn keyword lispFunc char> logxor sort +syn keyword lispFunc char>= long-float space +syn keyword lispFunc character long-float-epsilon special +syn keyword lispFunc characterp long-float-negative-epsilon special-form-p +syn keyword lispFunc check-type long-site-name special-operator-p +syn keyword lispFunc cis loop speed +syn keyword lispFunc class loop-finish sqrt +syn keyword lispFunc class-name lower-case-p stable-sort +syn keyword lispFunc class-of machine-instance standard +syn keyword lispFunc clear-input machine-type standard-char +syn keyword lispFunc clear-output machine-version standard-char-p +syn keyword lispFunc close macro-function standard-class +syn keyword lispFunc clrhash macroexpand standard-generic-function +syn keyword lispFunc code-char macroexpand-1 standard-method +syn keyword lispFunc coerce macroexpand-l standard-object +syn keyword lispFunc commonp macrolet step +syn keyword lispFunc compilation-speed make-array storage-condition +syn keyword lispFunc compile make-array store-value +syn keyword lispFunc compile-file make-broadcast-stream stream +syn keyword lispFunc compile-file-pathname make-char stream-element-type +syn keyword lispFunc compiled-function make-concatenated-stream stream-error +syn keyword lispFunc compiled-function-p make-condition stream-error-stream +syn keyword lispFunc compiler-let make-dispatch-macro-character stream-external-format +syn keyword lispFunc compiler-macro make-echo-stream streamp +syn keyword lispFunc compiler-macro-function make-hash-table streamup +syn keyword lispFunc complement make-instance string +syn keyword lispFunc complex make-instances-obsolete string-capitalize +syn keyword lispFunc complexp make-list string-char +syn keyword lispFunc compute-applicable-methods make-load-form string-char-p +syn keyword lispFunc compute-restarts make-load-form-saving-slots string-downcase +syn keyword lispFunc concatenate make-method string-equal +syn keyword lispFunc concatenated-stream make-package string-greaterp +syn keyword lispFunc concatenated-stream-streams make-pathname string-left-trim +syn keyword lispFunc cond make-random-state string-lessp +syn keyword lispFunc condition make-sequence string-not-equal +syn keyword lispFunc conjugate make-string string-not-greaterp +syn keyword lispFunc cons make-string-input-stream string-not-lessp +syn keyword lispFunc consp make-string-output-stream string-right-strim +syn keyword lispFunc constantly make-symbol string-right-trim +syn keyword lispFunc constantp make-synonym-stream string-stream +syn keyword lispFunc continue make-two-way-stream string-trim +syn keyword lispFunc control-error makunbound string-upcase +syn keyword lispFunc copy-alist map string/= +syn keyword lispFunc copy-list map-into string< +syn keyword lispFunc copy-pprint-dispatch mapc string<= +syn keyword lispFunc copy-readtable mapcan string= +syn keyword lispFunc copy-seq mapcar string> +syn keyword lispFunc copy-structure mapcon string>= +syn keyword lispFunc copy-symbol maphash stringp +syn keyword lispFunc copy-tree mapl structure +syn keyword lispFunc cos maplist structure-class +syn keyword lispFunc cosh mask-field structure-object +syn keyword lispFunc count max style-warning +syn keyword lispFunc count-if member sublim +syn keyword lispFunc count-if-not member-if sublis +syn keyword lispFunc ctypecase member-if-not subseq +syn keyword lispFunc debug merge subsetp +syn keyword lispFunc decf merge-pathname subst +syn keyword lispFunc declaim merge-pathnames subst-if +syn keyword lispFunc declaration method subst-if-not +syn keyword lispFunc declare method-combination substitute +syn keyword lispFunc decode-float method-combination-error substitute-if +syn keyword lispFunc decode-universal-time method-qualifiers substitute-if-not +syn keyword lispFunc defclass min subtypep +syn keyword lispFunc defconstant minusp svref +syn keyword lispFunc defgeneric mismatch sxhash +syn keyword lispFunc define-compiler-macro mod symbol +syn keyword lispFunc define-condition most-negative-double-float symbol-function +syn keyword lispFunc define-method-combination most-negative-fixnum symbol-macrolet +syn keyword lispFunc define-modify-macro most-negative-long-float symbol-name +syn keyword lispFunc define-setf-expander most-negative-short-float symbol-package +syn keyword lispFunc define-setf-method most-negative-single-float symbol-plist +syn keyword lispFunc define-symbol-macro most-positive-double-float symbol-value +syn keyword lispFunc defmacro most-positive-fixnum symbolp +syn keyword lispFunc defmethod most-positive-long-float synonym-stream +syn keyword lispFunc defpackage most-positive-short-float synonym-stream-symbol +syn keyword lispFunc defparameter most-positive-single-float sys +syn keyword lispFunc defsetf muffle-warning system +syn keyword lispFunc defstruct multiple-value-bind t +syn keyword lispFunc deftype multiple-value-call tagbody +syn keyword lispFunc defun multiple-value-list tailp +syn keyword lispFunc defvar multiple-value-prog1 tan +syn keyword lispFunc delete multiple-value-seteq tanh +syn keyword lispFunc delete-duplicates multiple-value-setq tenth +syn keyword lispFunc delete-file multiple-values-limit terpri +syn keyword lispFunc delete-if name-char the +syn keyword lispFunc delete-if-not namestring third +syn keyword lispFunc delete-package nbutlast throw +syn keyword lispFunc denominator nconc time +syn keyword lispFunc deposit-field next-method-p trace +syn keyword lispFunc describe nil translate-logical-pathname +syn keyword lispFunc describe-object nintersection translate-pathname +syn keyword lispFunc destructuring-bind ninth tree-equal +syn keyword lispFunc digit-char no-applicable-method truename +syn keyword lispFunc digit-char-p no-next-method truncase +syn keyword lispFunc directory not truncate +syn keyword lispFunc directory-namestring notany two-way-stream +syn keyword lispFunc disassemble notevery two-way-stream-input-stream +syn keyword lispFunc division-by-zero notinline two-way-stream-output-stream +syn keyword lispFunc do nreconc type +syn keyword lispFunc do* nreverse type-error +syn keyword lispFunc do-all-symbols nset-difference type-error-datum +syn keyword lispFunc do-exeternal-symbols nset-exclusive-or type-error-expected-type +syn keyword lispFunc do-external-symbols nstring type-of +syn keyword lispFunc do-symbols nstring-capitalize typecase +syn keyword lispFunc documentation nstring-downcase typep +syn keyword lispFunc dolist nstring-upcase unbound-slot +syn keyword lispFunc dotimes nsublis unbound-slot-instance +syn keyword lispFunc double-float nsubst unbound-variable +syn keyword lispFunc double-float-epsilon nsubst-if undefined-function +syn keyword lispFunc double-float-negative-epsilon nsubst-if-not unexport +syn keyword lispFunc dpb nsubstitute unintern +syn keyword lispFunc dribble nsubstitute-if union +syn keyword lispFunc dynamic-extent nsubstitute-if-not unless +syn keyword lispFunc ecase nth unread +syn keyword lispFunc echo-stream nth-value unread-char +syn keyword lispFunc echo-stream-input-stream nthcdr unsigned-byte +syn keyword lispFunc echo-stream-output-stream null untrace +syn keyword lispFunc ed number unuse-package +syn keyword lispFunc eighth numberp unwind-protect +syn keyword lispFunc elt numerator update-instance-for-different-class +syn keyword lispFunc encode-universal-time nunion update-instance-for-redefined-class +syn keyword lispFunc end-of-file oddp upgraded-array-element-type +syn keyword lispFunc endp open upgraded-complex-part-type +syn keyword lispFunc enough-namestring open-stream-p upper-case-p +syn keyword lispFunc ensure-directories-exist optimize use-package +syn keyword lispFunc ensure-generic-function or use-value +syn keyword lispFunc eq otherwise user +syn keyword lispFunc eql output-stream-p user-homedir-pathname +syn keyword lispFunc equal package values +syn keyword lispFunc equalp package-error values-list +syn keyword lispFunc error package-error-package vector +syn keyword lispFunc etypecase package-name vector-pop +syn keyword lispFunc eval package-nicknames vector-push +syn keyword lispFunc eval-when package-shadowing-symbols vector-push-extend +syn keyword lispFunc evalhook package-use-list vectorp +syn keyword lispFunc evenp package-used-by-list warn +syn keyword lispFunc every packagep warning +syn keyword lispFunc exp pairlis when +syn keyword lispFunc export parse-error wild-pathname-p +syn keyword lispFunc expt parse-integer with-accessors +syn keyword lispFunc extended-char parse-namestring with-compilation-unit +syn keyword lispFunc fboundp pathname with-condition-restarts +syn keyword lispFunc fceiling pathname-device with-hash-table-iterator +syn keyword lispFunc fdefinition pathname-directory with-input-from-string +syn keyword lispFunc ffloor pathname-host with-open-file +syn keyword lispFunc fifth pathname-match-p with-open-stream +syn keyword lispFunc file-author pathname-name with-output-to-string +syn keyword lispFunc file-error pathname-type with-package-iterator +syn keyword lispFunc file-error-pathname pathname-version with-simple-restart +syn keyword lispFunc file-length pathnamep with-slots +syn keyword lispFunc file-namestring peek-char with-standard-io-syntax +syn keyword lispFunc file-position phase write +syn keyword lispFunc file-stream pi write-byte +syn keyword lispFunc file-string-length plusp write-char +syn keyword lispFunc file-write-date pop write-line +syn keyword lispFunc fill position write-sequence +syn keyword lispFunc fill-pointer position-if write-string +syn keyword lispFunc find position-if-not write-to-string +syn keyword lispFunc find-all-symbols pprint y-or-n-p +syn keyword lispFunc find-class pprint-dispatch yes-or-no-p +syn keyword lispFunc find-if pprint-exit-if-list-exhausted zerop +syn keyword lispFunc find-if-not pprint-fill + +syn match lispFunc "\" +if exists("g:lispsyntax_clisp") + " CLISP FFI: + syn match lispFunc "\<\(ffi:\)\?with-c-\(place\|var\)\>" + syn match lispFunc "\<\(ffi:\)\?with-foreign-\(object\|string\)\>" + syn match lispFunc "\<\(ffi:\)\?default-foreign-\(language\|library\)\>" + syn match lispFunc "\<\([us]_\?\)\?\(element\|deref\|cast\|slot\|validp\)\>" + syn match lispFunc "\<\(ffi:\)\?set-foreign-pointer\>" + syn match lispFunc "\<\(ffi:\)\?allocate-\(deep\|shallow\)\>" + syn match lispFunc "\<\(ffi:\)\?c-lines\>" + syn match lispFunc "\<\(ffi:\)\?foreign-\(value\|free\|variable\|function\|object\)\>" + syn match lispFunc "\<\(ffi:\)\?foreign-address\(-null\|unsigned\)\?\>" + syn match lispFunc "\<\(ffi:\)\?undigned-foreign-address\>" + syn match lispFunc "\<\(ffi:\)\?c-var-\(address\|object\)\>" + syn match lispFunc "\<\(ffi:\)\?typeof\>" + syn match lispFunc "\<\(ffi:\)\?\(bit\)\?sizeof\>" +" CLISP Macros, functions et al: + syn match lispFunc "\<\(ext:\)\?with-collect\>" + syn match lispFunc "\<\(ext:\)\?letf\*\?\>" + syn match lispFunc "\<\(ext:\)\?finalize\>\>" + syn match lispFunc "\<\(ext:\)\?memoized\>" + syn match lispFunc "\<\(ext:\)\?getenv\>" + syn match lispFunc "\<\(ext:\)\?convert-string-\(to\|from\)-bytes\>" + syn match lispFunc "\<\(ext:\)\?ethe\>" + syn match lispFunc "\<\(ext:\)\?with-gensyms\>" + syn match lispFunc "\<\(ext:\)\?open-http\>" + syn match lispFunc "\<\(ext:\)\?string-concat\>" + syn match lispFunc "\<\(ext:\)\?with-http-\(in\|out\)put\>" + syn match lispFunc "\<\(ext:\)\?with-html-output\>" + syn match lispFunc "\<\(ext:\)\?expand-form\>" + syn match lispFunc "\<\(ext:\)\?\(without-\)\?package-lock\>" + syn match lispFunc "\<\(ext:\)\?re-export\>" + syn match lispFunc "\<\(ext:\)\?saveinitmem\>" + syn match lispFunc "\<\(ext:\)\?\(read\|write\)-\(integer\|float\)\>" + syn match lispFunc "\<\(ext:\)\?\(read\|write\)-\(char\|byte\)-sequence\>" + syn match lispFunc "\<\(custom:\)\?\*system-package-list\*\>" + syn match lispFunc "\<\(custom:\)\?\*ansi\*\>" +endif + +" --------------------------------------------------------------------- +" Lisp Keywords (modifiers): {{{1 +syn keyword lispKey :abort :from-end :overwrite +syn keyword lispKey :adjustable :gensym :predicate +syn keyword lispKey :append :host :preserve-whitespace +syn keyword lispKey :array :if-does-not-exist :pretty +syn keyword lispKey :base :if-exists :print +syn keyword lispKey :case :include :print-function +syn keyword lispKey :circle :index :probe +syn keyword lispKey :conc-name :inherited :radix +syn keyword lispKey :constructor :initial-contents :read-only +syn keyword lispKey :copier :initial-element :rehash-size +syn keyword lispKey :count :initial-offset :rehash-threshold +syn keyword lispKey :create :initial-value :rename +syn keyword lispKey :default :input :rename-and-delete +syn keyword lispKey :defaults :internal :size +syn keyword lispKey :device :io :start +syn keyword lispKey :direction :junk-allowed :start1 +syn keyword lispKey :directory :key :start2 +syn keyword lispKey :displaced-index-offset :length :stream +syn keyword lispKey :displaced-to :level :supersede +syn keyword lispKey :element-type :name :test +syn keyword lispKey :end :named :test-not +syn keyword lispKey :end1 :new-version :type +syn keyword lispKey :end2 :nicknames :use +syn keyword lispKey :error :output :verbose +syn keyword lispKey :escape :output-file :version +syn keyword lispKey :external +" defpackage arguments +syn keyword lispKey :documentation :shadowing-import-from :modern :export +syn keyword lispKey :case-sensitive :case-inverted :shadow :import-from :intern +" lambda list keywords +syn keyword lispKey &allow-other-keys &aux &body +syn keyword lispKey &environment &key &optional &rest &whole +" make-array argument +syn keyword lispKey :fill-pointer +" readtable-case values +syn keyword lispKey :upcase :downcase :preserve :invert +" eval-when situations +syn keyword lispKey :load-toplevel :compile-toplevel :execute +" ANSI Extended LOOP: +syn keyword lispKey :while :until :for :do :if :then :else :when :unless :in +syn keyword lispKey :across :finally :collect :nconc :maximize :minimize :sum +syn keyword lispKey :and :with :initially :append :into :count :end :repeat +syn keyword lispKey :always :never :thereis :from :to :upto :downto :below +syn keyword lispKey :above :by :on :being :each :the :hash-key :hash-keys +syn keyword lispKey :hash-value :hash-values :using :of-type :upfrom :downfrom +if exists("g:lispsyntax_clisp") + " CLISP FFI: + syn keyword lispKey :arguments :return-type :library :full :malloc-free + syn keyword lispKey :none :alloca :in :out :in-out :stdc-stdcall :stdc :c + syn keyword lispKey :language :built-in :typedef :external + syn keyword lispKey :fini :init-once :init-always +endif + +" --------------------------------------------------------------------- +" Standard Lisp Variables: {{{1 +syn keyword lispVar *applyhook* *load-pathname* *print-pprint-dispatch* +syn keyword lispVar *break-on-signals* *load-print* *print-pprint-dispatch* +syn keyword lispVar *break-on-signals* *load-truename* *print-pretty* +syn keyword lispVar *break-on-warnings* *load-verbose* *print-radix* +syn keyword lispVar *compile-file-pathname* *macroexpand-hook* *print-readably* +syn keyword lispVar *compile-file-pathname* *modules* *print-right-margin* +syn keyword lispVar *compile-file-truename* *package* *print-right-margin* +syn keyword lispVar *compile-file-truename* *print-array* *query-io* +syn keyword lispVar *compile-print* *print-base* *random-state* +syn keyword lispVar *compile-verbose* *print-case* *read-base* +syn keyword lispVar *compile-verbose* *print-circle* *read-default-float-format* +syn keyword lispVar *debug-io* *print-escape* *read-eval* +syn keyword lispVar *debugger-hook* *print-gensym* *read-suppress* +syn keyword lispVar *default-pathname-defaults* *print-length* *readtable* +syn keyword lispVar *error-output* *print-level* *standard-input* +syn keyword lispVar *evalhook* *print-lines* *standard-output* +syn keyword lispVar *features* *print-miser-width* *terminal-io* +syn keyword lispVar *gensym-counter* *print-miser-width* *trace-output* + +" --------------------------------------------------------------------- +" Strings: {{{1 +syn region lispString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell +if exists("g:lisp_instring") + syn region lispInString keepend matchgroup=Delimiter start=+"(+rs=s+1 skip=+|.\{-}|+ matchgroup=Delimiter end=+)"+ contains=@lispBaseListCluster,lispInStringString + syn region lispInStringString start=+\\"+ skip=+\\\\+ end=+\\"+ contained +endif + +" --------------------------------------------------------------------- +" Shared with Xlisp, Declarations, Macros, Functions: {{{1 +syn keyword lispDecl defmacro do-all-symbols labels +syn keyword lispDecl defsetf do-external-symbols let +syn keyword lispDecl deftype do-symbols locally +syn keyword lispDecl defun dotimes macrolet +syn keyword lispDecl do* flet multiple-value-bind +if exists("g:lispsyntax_clisp") + " CLISP FFI: + syn match lispDecl "\<\(ffi:\)\?def-c-\(var\|const\|enum\|type\|struct\)\>" + syn match lispDecl "\<\(ffi:\)\?def-call-\(out\|in\)\>" + syn match lispDecl "\<\(ffi:\)\?c-\(function\|struct\|pointer\|string\)\>" + syn match lispDecl "\<\(ffi:\)\?c-ptr\(-null\)\?\>" + syn match lispDecl "\<\(ffi:\)\?c-array\(-ptr\|-max\)\?\>" + syn match lispDecl "\<\(ffi:\)\?[us]\?\(char\|short\|int\|long\)\>" + syn match lispDecl "\<\(win32:\|w32\)\?d\?word\>" + syn match lispDecl "\<\([us]_\?\)\?int\(8\|16\|32\|64\)\(_t\)\?\>" + syn keyword lispDecl size_t off_t time_t handle +endif + +" --------------------------------------------------------------------- +" Numbers: supporting integers and floating point numbers {{{1 +syn match lispNumber "-\=\(\.\d\+\|\d\+\(\.\d*\)\=\)\([dDeEfFlL][-+]\=\d\+\)\=" +syn match lispNumber "-\=\(\d\+/\d\+\)" + +syn match lispSpecial "\*\w[a-z_0-9-]*\*" +syn match lispSpecial !#|[^()'`,"; \t]\+|#! +syn match lispSpecial !#x\x\+! +syn match lispSpecial !#o\o\+! +syn match lispSpecial !#b[01]\+! +syn match lispSpecial !#\\[ -}\~]! +syn match lispSpecial !#[':][^()'`,"; \t]\+! +syn match lispSpecial !#([^()'`,"; \t]\+)! +syn match lispSpecial !#\\\%(Space\|Newline\|Tab\|Page\|Rubout\|Linefeed\|Return\|Backspace\)! +syn match lispSpecial "\<+[a-zA-Z_][a-zA-Z_0-9-]*+\>" + +syn match lispConcat "\s\.\s" +syn match lispParenError ")" + +" --------------------------------------------------------------------- +" Comments: {{{1 +syn cluster lispCommentGroup contains=lispTodo,@Spell +syn match lispComment ";.*$" contains=@lispCommentGroup +syn region lispCommentRegion start="#|" end="|#" contains=lispCommentRegion,@lispCommentGroup +syn keyword lispTodo contained combak combak: todo todo: + +" --------------------------------------------------------------------- +" Synchronization: {{{1 +syn sync lines=100 + +" --------------------------------------------------------------------- +" Define Highlighting: {{{1 +" 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 + command -nargs=+ HiLink hi def link + + HiLink lispCommentRegion lispComment + HiLink lispAtomNmbr lispNumber + HiLink lispAtomMark lispMark + HiLink lispInStringString lispString + + HiLink lispAtom Identifier + HiLink lispAtomBarSymbol Special + HiLink lispBarSymbol Special + HiLink lispComment Comment + HiLink lispConcat Statement + HiLink lispDecl Statement + HiLink lispFunc Statement + HiLink lispKey Type + HiLink lispMark Delimiter + HiLink lispNumber Number + HiLink lispParenError Error + HiLink lispSpecial Type + HiLink lispString String + HiLink lispTodo Todo + HiLink lispVar Statement + + if exists("g:lisp_rainbow") && g:lisp_rainbow != 0 + if &bg == "dark" + hi def hlLevel0 ctermfg=red guifg=red1 + hi def hlLevel1 ctermfg=yellow guifg=orange1 + hi def hlLevel2 ctermfg=green guifg=yellow1 + hi def hlLevel3 ctermfg=cyan guifg=greenyellow + hi def hlLevel4 ctermfg=magenta guifg=green1 + hi def hlLevel5 ctermfg=red guifg=springgreen1 + hi def hlLevel6 ctermfg=yellow guifg=cyan1 + hi def hlLevel7 ctermfg=green guifg=slateblue1 + hi def hlLevel8 ctermfg=cyan guifg=magenta1 + hi def hlLevel9 ctermfg=magenta guifg=purple1 + else + hi def hlLevel0 ctermfg=red guifg=red3 + hi def hlLevel1 ctermfg=darkyellow guifg=orangered3 + hi def hlLevel2 ctermfg=darkgreen guifg=orange2 + hi def hlLevel3 ctermfg=blue guifg=yellow3 + hi def hlLevel4 ctermfg=darkmagenta guifg=olivedrab4 + hi def hlLevel5 ctermfg=red guifg=green4 + hi def hlLevel6 ctermfg=darkyellow guifg=paleturquoise3 + hi def hlLevel7 ctermfg=darkgreen guifg=deepskyblue4 + hi def hlLevel8 ctermfg=blue guifg=darkslateblue + hi def hlLevel9 ctermfg=darkmagenta guifg=darkviolet + endif + endif + + delcommand HiLink +endif + +let b:current_syntax = "lisp" + +" --------------------------------------------------------------------- +" vim: ts=8 nowrap fdm=marker diff --git a/vim/bundle/ubuntu-vim72/syntax/lite.vim b/vim/bundle/ubuntu-vim72/syntax/lite.vim new file mode 100644 index 0000000..8abc51d --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/lite.vim @@ -0,0 +1,181 @@ +" Vim syntax file +" Language: lite +" Maintainer: Lutz Eymers +" URL: http://www.isp.de/data/lite.vim +" Email: Subject: send syntax_vim.tgz +" Last Change: 2001 Mai 01 +" +" Options lite_sql_query = 1 for SQL syntax highligthing inside strings +" lite_minlines = x to sync at least x lines backwards + +" 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 + +if !exists("main_syntax") + let main_syntax = 'lite' +endif + +if main_syntax == 'lite' + if exists("lite_sql_query") + if lite_sql_query == 1 + syn include @liteSql :p:h/sql.vim + unlet b:current_syntax + endif + endif +endif + +if main_syntax == 'msql' + if exists("msql_sql_query") + if msql_sql_query == 1 + syn include @liteSql :p:h/sql.vim + unlet b:current_syntax + endif + endif +endif + +syn cluster liteSql remove=sqlString,sqlComment + +syn case match + +" Internal Variables +syn keyword liteIntVar ERRMSG contained + +" Comment +syn region liteComment start="/\*" end="\*/" contains=liteTodo + +" Function names +syn keyword liteFunctions echo printf fprintf open close read +syn keyword liteFunctions readln readtok +syn keyword liteFunctions split strseg chop tr sub substr +syn keyword liteFunctions test unlink umask chmod mkdir chdir rmdir +syn keyword liteFunctions rename truncate link symlink stat +syn keyword liteFunctions sleep system getpid getppid kill +syn keyword liteFunctions time ctime time2unixtime unixtime2year +syn keyword liteFunctions unixtime2year unixtime2month unixtime2day +syn keyword liteFunctions unixtime2hour unixtime2min unixtime2sec +syn keyword liteFunctions strftime +syn keyword liteFunctions getpwnam getpwuid +syn keyword liteFunctions gethostbyname gethostbyaddress +syn keyword liteFunctions urlEncode setContentType includeFile +syn keyword liteFunctions msqlConnect msqlClose msqlSelectDB +syn keyword liteFunctions msqlQuery msqlStoreResult msqlFreeResult +syn keyword liteFunctions msqlFetchRow msqlDataSeek msqlListDBs +syn keyword liteFunctions msqlListTables msqlInitFieldList msqlListField +syn keyword liteFunctions msqlFieldSeek msqlNumRows msqlEncode +syn keyword liteFunctions exit fatal typeof +syn keyword liteFunctions crypt addHttpHeader + +" Conditional +syn keyword liteConditional if else + +" Repeat +syn keyword liteRepeat while + +" Operator +syn keyword liteStatement break return continue + +" Operator +syn match liteOperator "[-+=#*]" +syn match liteOperator "/[^*]"me=e-1 +syn match liteOperator "\$" +syn match liteRelation "&&" +syn match liteRelation "||" +syn match liteRelation "[!=<>]=" +syn match liteRelation "[<>]" + +" Identifier +syn match liteIdentifier "$\h\w*" contains=liteIntVar,liteOperator +syn match liteGlobalIdentifier "@\h\w*" contains=liteIntVar + +" Include +syn keyword liteInclude load + +" Define +syn keyword liteDefine funct + +" Type +syn keyword liteType int uint char real + +" String +syn region liteString keepend matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=liteIdentifier,liteSpecialChar,@liteSql + +" Number +syn match liteNumber "-\=\<\d\+\>" + +" Float +syn match liteFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" + +" SpecialChar +syn match liteSpecialChar "\\[abcfnrtv\\]" contained + +syn match liteParentError "[)}\]]" + +" Todo +syn keyword liteTodo TODO Todo todo contained + +" dont syn #!... +syn match liteExec "^#!.*$" + +" Parents +syn cluster liteInside contains=liteComment,liteFunctions,liteIdentifier,liteGlobalIdentifier,liteConditional,liteRepeat,liteStatement,liteOperator,liteRelation,liteType,liteString,liteNumber,liteFloat,liteParent + +syn region liteParent matchgroup=Delimiter start="(" end=")" contains=@liteInside +syn region liteParent matchgroup=Delimiter start="{" end="}" contains=@liteInside +syn region liteParent matchgroup=Delimiter start="\[" end="\]" contains=@liteInside + +" sync +if main_syntax == 'lite' + if exists("lite_minlines") + exec "syn sync minlines=" . lite_minlines + else + syn sync minlines=100 + endif +endif + +" 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_lite_syn_inits") + if version < 508 + let did_lite_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink liteComment Comment + HiLink liteString String + HiLink liteNumber Number + HiLink liteFloat Float + HiLink liteIdentifier Identifier + HiLink liteGlobalIdentifier Identifier + HiLink liteIntVar Identifier + HiLink liteFunctions Function + HiLink liteRepeat Repeat + HiLink liteConditional Conditional + HiLink liteStatement Statement + HiLink liteType Type + HiLink liteInclude Include + HiLink liteDefine Define + HiLink liteSpecialChar SpecialChar + HiLink liteParentError liteError + HiLink liteError Error + HiLink liteTodo Todo + HiLink liteOperator Operator + HiLink liteRelation Operator + + delcommand HiLink +endif + +let b:current_syntax = "lite" + +if main_syntax == 'lite' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/litestep.vim b/vim/bundle/ubuntu-vim72/syntax/litestep.vim new file mode 100644 index 0000000..b4c15fa --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/litestep.vim @@ -0,0 +1,269 @@ +" Vim syntax file +" Language: LiteStep RC file +" Maintainer: Nikolai Weibull +" Latest Revision: 2007-02-22 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword litestepTodo + \ contained + \ TODO FIXME XXX NOTE + +syn match litestepComment + \ contained display contains=litestepTodo,@Spell + \ ';.*$' + +syn case ignore + +syn cluster litestepBeginnings + \ contains= + \ litestepComment, + \ litestepPreProc, + \ litestepMultiCommandStart, + \ litestepBangCommandStart, + \ litestepGenericDirective + +syn match litestepGenericDirective + \ contained display + \ '\<\h\w\+\>' + +syn match litestepBeginning + \ nextgroup=@litestepBeginnings skipwhite + \ '^' + +syn keyword litestepPreProc + \ contained + \ Include + \ If + \ ElseIf + \ Else + \ EndIf + +syn cluster litestepMultiCommands + \ contains= + \ litestepMultiCommand + +syn match litestepMultiCommandStart + \ nextgroup=@litestepMultiCommands + \ '\*' + +syn match litestepMultiCommand + \ contained display + \ '\<\h\w\+\>' + +syn cluster litestepVariables + \ contains= + \ litestepBuiltinFolderVariable, + \ litestepBuiltinConditionalVariable, + \ litestepBuiltinResourceVariable, + \ litestepBuiltinGUIDFolderMappingVariable, + \ litestepVariable + +syn region litestepVariableExpansion + \ display oneline transparent + \ contains= + \ @litestepVariables, + \ litestepNumber, + \ litestepMathOperator + \ matchgroup=litestepVariableExpansion + \ start='\$' + \ end='\$' + +syn match litestepNumber + \ display + \ '\<\d\+\>' + +syn region litestepString + \ display oneline contains=litestepVariableExpansion + \ start=+"+ end=+"+ + +" TODO: unsure about this one. +syn region litestepSubValue + \ display oneline contains=litestepVariableExpansion + \ start=+'+ end=+'+ + +syn keyword litestepBoolean + \ true + \ false + +"syn keyword litestepLine +" \ ? + +"syn match litestepColor +" \ display +" \ '\<\x\+\>' + +syn match litestepRelationalOperator + \ display + \ '=\|<[>=]\=\|>=\=' + +syn keyword litestepLogicalOperator + \ and + \ or + \ not + +syn match litestepMathOperator + \ contained display + \ '[+*/-]' + +syn keyword litestepBuiltinDirective + \ LoadModule + \ LSNoStartup + \ LSAutoHideModules + \ LSNoShellWarning + \ LSSetAsShell + \ LSUseSystemDDE + \ LSDisableTrayService + \ LSImageFolder + \ ThemeAuthor + \ ThemeName + +syn keyword litestepDeprecatedBuiltinDirective + \ LSLogLevel + \ LSLogFile + +syn match litestepVariable + \ contained display + \ '\<\h\w\+\>' + +syn keyword litestepBuiltinFolderVariable + \ contained + \ AdminToolsDir + \ CommonAdminToolsDir + \ CommonDesktopDir + \ CommonFavorites + \ CommonPrograms + \ CommonStartMenu + \ CommonStartup + \ Cookies + \ Desktop + \ DesktopDir + \ DocumentsDir + \ Favorites + \ Fonts + \ History + \ Internet + \ InternetCache + \ LitestepDir + \ Nethood + \ Printhood + \ Programs + \ QuickLaunch + \ Recent + \ Sendto + \ Startmenu + \ Startup + \ Templates + \ WinDir + \ LitestepDir + +syn keyword litestepBuiltinConditionalVariable + \ contained + \ Win2000 + \ Win95 + \ Win98 + \ Win9X + \ WinME + \ WinNT + \ WinNT4 + \ WinXP + +syn keyword litestepBuiltinResourceVariable + \ contained + \ CompileDate + \ ResolutionX + \ ResolutionY + \ UserName + +syn keyword litestepBuiltinGUIDFolderMappingVariable + \ contained + \ AdminTools + \ BitBucket + \ Controls + \ Dialup + \ Documents + \ Drives + \ Network + \ NetworkAndDialup + \ Printers + \ Scheduled + +syn cluster litestepBangs + \ contains= + \ litestepBuiltinBang, + \ litestepBang + +syn match litestepBangStart + \ nextgroup=@litestepBangs + \ '!' + +syn match litestepBang + \ contained display + \ '\<\h\w\+\>' + +syn keyword litestepBuiltinBang + \ contained + \ About + \ Alert + \ CascadeWindows + \ Confirm + \ Execute + \ Gather + \ HideModules + \ LogOff + \ MinimizeWindows + \ None + \ Quit + \ Recycle + \ Refresh + \ Reload + \ ReloadModule + \ RestoreWindows + \ Run + \ ShowModules + \ Shutdown + \ Switchuser + \ TileWindowsH + \ TileWindowsV + \ ToggleModules + \ UnloadModule + +hi def link litestepTodo Todo +hi def link litestepComment Comment +hi def link litestepDirective Keyword +hi def link litestepGenericDirective litestepDirective +hi def link litestepPreProc PreProc +hi def link litestepMultiCommandStart litestepPreProc +hi def link litestepMultiCommand litestepDirective +hi def link litestepDelimiter Delimiter +hi def link litestepVariableExpansion litestepDelimiter +hi def link litestepNumber Number +hi def link litestepString String +hi def link litestepSubValue litestepString +hi def link litestepBoolean Boolean +"hi def link litestepLine +"hi def link litestepColor Type +hi def link litestepOperator Operator +hi def link litestepRelationalOperator litestepOperator +hi def link litestepLogicalOperator litestepOperator +hi def link litestepMathOperator litestepOperator +hi def link litestepBuiltinDirective litestepDirective +hi def link litestepDeprecatedBuiltinDirective Error +hi def link litestepVariable Identifier +hi def link litestepBuiltinFolderVariable Identifier +hi def link litestepBuiltinConditionalVariable Identifier +hi def link litestepBuiltinResourceVariable Identifier +hi def link litestepBuiltinGUIDFolderMappingVariable Identifier +hi def link litestepBangStart litestepPreProc +hi def link litestepBang litestepDirective +hi def link litestepBuiltinBang litestepBang + +let b:current_syntax = "litestep" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/loginaccess.vim b/vim/bundle/ubuntu-vim72/syntax/loginaccess.vim new file mode 100644 index 0000000..07d60ee --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/loginaccess.vim @@ -0,0 +1,96 @@ +" Vim syntax file +" Language: login.access(5) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword loginaccessTodo contained TODO FIXME XXX NOTE + +syn region loginaccessComment display oneline start='^#' end='$' + \ contains=loginaccessTodo,@Spell + +syn match loginaccessBegin display '^' + \ nextgroup=loginaccessPermission, + \ loginaccessComment skipwhite + +syn match loginaccessPermission contained display '[^#]' + \ contains=loginaccessPermError + \ nextgroup=loginaccessUserSep + +syn match loginaccessPermError contained display '[^+-]' + +syn match loginaccessUserSep contained display ':' + \ nextgroup=loginaccessUsers, + \ loginaccessAllUsers, + \ loginaccessExceptUsers + +syn match loginaccessUsers contained display '[^, \t:]\+' + \ nextgroup=loginaccessUserIntSep, + \ loginaccessOriginSep + +syn match loginaccessAllUsers contained display '\' + \ nextgroup=loginaccessUserIntSep, + \ loginaccessOriginSep + +syn match loginaccessLocalUsers contained display '\' + \ nextgroup=loginaccessUserIntSep, + \ loginaccessOriginSep + +syn match loginaccessExceptUsers contained display '\' + \ nextgroup=loginaccessUserIntSep, + \ loginaccessOriginSep + +syn match loginaccessUserIntSep contained display '[, \t]' + \ nextgroup=loginaccessUsers, + \ loginaccessAllUsers, + \ loginaccessExceptUsers + +syn match loginaccessOriginSep contained display ':' + \ nextgroup=loginaccessOrigins, + \ loginaccessAllOrigins, + \ loginaccessExceptOrigins + +syn match loginaccessOrigins contained display '[^, \t]\+' + \ nextgroup=loginaccessOriginIntSep + +syn match loginaccessAllOrigins contained display '\' + \ nextgroup=loginaccessOriginIntSep + +syn match loginaccessLocalOrigins contained display '\' + \ nextgroup=loginaccessOriginIntSep + +syn match loginaccessExceptOrigins contained display '\' + \ nextgroup=loginaccessOriginIntSep + +syn match loginaccessOriginIntSep contained display '[, \t]' + \ nextgroup=loginaccessOrigins, + \ loginaccessAllOrigins, + \ loginaccessExceptOrigins + +hi def link loginaccessTodo Todo +hi def link loginaccessComment Comment +hi def link loginaccessPermission Type +hi def link loginaccessPermError Error +hi def link loginaccessUserSep Delimiter +hi def link loginaccessUsers Identifier +hi def link loginaccessAllUsers Macro +hi def link loginaccessLocalUsers Macro +hi def link loginaccessExceptUsers Operator +hi def link loginaccessUserIntSep loginaccessUserSep +hi def link loginaccessOriginSep loginaccessUserSep +hi def link loginaccessOrigins Identifier +hi def link loginaccessAllOrigins Macro +hi def link loginaccessLocalOrigins Macro +hi def link loginaccessExceptOrigins loginaccessExceptUsers +hi def link loginaccessOriginIntSep loginaccessUserSep + +let b:current_syntax = "loginaccess" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/logindefs.vim b/vim/bundle/ubuntu-vim72/syntax/logindefs.vim new file mode 100644 index 0000000..7c2b122 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/logindefs.vim @@ -0,0 +1,94 @@ +" Vim syntax file +" Language: login.defs(5) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword logindefsTodo contained TODO FIXME XXX NOTE + +syn region logindefsComment display oneline start='^\s*#' end='$' + \ contains=logindefsTodo,@Spell + +syn match logindefsString contained '[[:graph:]]\+' + +syn match logindefsPath contained '[[:graph:]]\+' + +syn match logindefsPaths contained '[[:graph:]]\+' + \ nextgroup=logindefsPathDelim + +syn match logindefsPathDelim contained ':' nextgroup=logindefsPaths + +syn keyword logindefsBoolean contained yes no + +syn match logindefsDecimal contained '\<\d\+\>' + +syn match logindefsOctal contained display '\<0\o\+\>' + \ contains=logindefsOctalZero +syn match logindefsOctalZero contained display '\<0' +syn match logindefsOctalError contained display '\<0\o*[89]\d*\>' + +syn match logindefsHex contained display '\<0x\x\+\>' + +syn cluster logindefsNumber contains=logindefsDecimal,logindefsOctal, + \ logindefsOctalError,logindefsHex + +syn match logindefsBegin display '^' + \ nextgroup=logindefsKeyword,logindefsComment + \ skipwhite + +syn keyword logindefsKeyword contained CHFN_AUTH CLOSE_SESSIONS CREATE_HOME + \ DEFAULT_HOME FAILLOG_ENAB LASTLOG_ENAB + \ LOG_OK_LOGINS LOG_UNKFAIL_ENAB MAIL_CHECK_ENAB + \ MD5_CRYPT_ENAB OBSCURE_CHECKS_ENAB + \ PASS_ALWAYS_WARN PORTTIME_CHECKS_ENAB + \ QUOTAS_ENAB SU_WHEEL_ONLY SYSLOG_SG_ENAB + \ SYSLOG_SU_ENAB USERGROUPS_ENAB + \ nextgroup=logindefsBoolean skipwhite + +syn keyword logindefsKeyword contained CHFN_RESTRICT CONSOLE CONSOLE_GROUPS + \ ENV_TZ ENV_HZ FAKE_SHELL SU_NAME LOGIN_STRING + \ NOLOGIN_STR TTYGROUP USERDEL_CMD + \ nextgroup=logindefsString skipwhite + +syn keyword logindefsKeyword contained ENVIRON_FILE FTMP_FILE HUSHLOGIN_FILE + \ ISSUE_FILE MAIL_DIR MAIL_FILE NOLOGINS_FILE + \ NOLOGINS_FILE TTYTYPE_FILE QMAIL_DIR + \ SULOG_FILE + \ nextgroup=logindefsPath skipwhite + +syn keyword logindefsKeyword contained CRACKLIB_DICTPATH ENV_PATH + \ ENV_ROOTPATH ENV_SUPATH MOTD_FILE + \ nextgroup=logindefsPaths skipwhite + +syn keyword logindefsKeyword contained ERASECHAR FAIL_DELAY GETPASS_ASTERISKS + \ GID_MAX GID_MIN KILLCHAR LOGIN_RETRIES + \ LOGIN_TIMEOUT PASS_CHANGE_TRIES PASS_MAX_DAYS + \ PASS_MAX_LEN PASS_MIN_DAYS PASS_MIN_LEN + \ PASS_WARN_AGE TTYPERM UID_MAX UID_MIN ULIMIT + \ UMASK + \ nextgroup=@logindefsNumber skipwhite + +hi def link logindefsTodo Todo +hi def link logindefsComment Comment +hi def link logindefsString String +hi def link logindefsPath String +hi def link logindefsPaths logindefsPath +hi def link logindefsPathDelim Delimiter +hi def link logindefsBoolean Boolean +hi def link logindefsDecimal Number +hi def link logindefsOctal Number +hi def link logindefsOctalZero PreProc +hi def link logindefsOctalError Error +hi def link logindefsHex Number +hi def link logindefsKeyword Keyword + +let b:current_syntax = "logindefs" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/logtalk.vim b/vim/bundle/ubuntu-vim72/syntax/logtalk.vim new file mode 100644 index 0000000..7d90cd8 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/logtalk.vim @@ -0,0 +1,398 @@ +" Vim syntax file +" +" Language: Logtalk +" Maintainer: Paulo Moura +" Last Change: Oct 31, 2008 + + +" Quit when a syntax file was already loaded: + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + +" Logtalk is case sensitive: + +syn case match + + +" Logtalk variables + +syn match logtalkVariable "\<\(\u\|_\)\(\w\)*\>" + + +" Logtalk clause functor + +syn match logtalkOperator ":-" + + +" Logtalk quoted atoms and strings + +syn region logtalkString start=+"+ skip=+\\"+ end=+"+ +syn region logtalkAtom start=+'+ skip=+\\'+ end=+'+ contains=logtalkEscapeSequence + +syn match logtalkEscapeSequence contained "\\\([\\abfnrtv\"\']\|\(x[a-fA-F0-9]\+\|[0-7]\+\)\\\)" + + +" Logtalk message sending operators + +syn match logtalkOperator "::" +syn match logtalkOperator ":" +syn match logtalkOperator "\^\^" + + +" Logtalk external call + +syn region logtalkExtCall matchgroup=logtalkExtCallTag start="{" matchgroup=logtalkExtCallTag end="}" contains=ALL + + +" Logtalk opening entity directives + +syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- object(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom,logtalkEntityRel,logtalkLineComment +syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- protocol(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkEntityRel,logtalkLineComment +syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- category(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkEntityRel,logtalkLineComment + + +" Logtalk closing entity directives + +syn match logtalkCloseEntityDir ":- end_object\." +syn match logtalkCloseEntityDir ":- end_protocol\." +syn match logtalkCloseEntityDir ":- end_category\." + + +" Logtalk entity relations + +syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="instantiates(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained +syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="specializes(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained +syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="extends(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained +syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="imports(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained +syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="implements(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained +syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="complements(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained + + +" Logtalk directives + +syn region logtalkDir matchgroup=logtalkDirTag start=":- alias(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- calls(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- encoding(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- initialization(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- info(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- mode(" matchgroup=logtalkDirTag end=")\." contains=logtalkOperator, logtalkAtom +syn region logtalkDir matchgroup=logtalkDirTag start=":- dynamic(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn match logtalkDirTag ":- dynamic\." +syn region logtalkDir matchgroup=logtalkDirTag start=":- discontiguous(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- multifile(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- public(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- protected(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- private(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- meta_predicate(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- op(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- synchronized(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn match logtalkDirTag ":- synchronized\." +syn region logtalkDir matchgroup=logtalkDirTag start=":- uses(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn match logtalkDirTag ":- threaded\." + + +" Module directives + +syn region logtalkDir matchgroup=logtalkDirTag start=":- module(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- export(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- use_module(" matchgroup=logtalkDirTag end=")\." contains=ALL + + +" Logtalk built-in predicates + +syn match logtalkBuiltIn "\<\(abolish\|c\(reate\|urrent\)\)_\(object\|protocol\|category\)\ze(" + +syn match logtalkBuiltIn "\<\(object\|protocol\|category\)_property\ze(" + +syn match logtalkBuiltIn "\" +syn match logtalkKeyword "\" +syn match logtalkKeyword "\" +syn match logtalkOperator "->" +syn match logtalkKeyword "\" +syn match logtalkOperator "@>=" + + +" Term creation and decomposition + +syn match logtalkKeyword "\" + + +" Arithemtic comparison + +syn match logtalkOperator "=:=" +syn match logtalkOperator "=\\=" +syn match logtalkOperator "<" +syn match logtalkOperator "=<" +syn match logtalkOperator ">" +syn match logtalkOperator ">=" + + +" Stream selection and control + +syn match logtalkKeyword "\<\(curren\|se\)t_\(in\|out\)put\ze(" +syn match logtalkKeyword "\" +syn match logtalkKeyword "\" +syn match logtalkKeyword "\" + + +" Term input/output + +syn match logtalkKeyword "\" + + +" Atomic term processing + +syn match logtalkKeyword "\" + + +" Evaluable functors + +syn match logtalkOperator "+" +syn match logtalkOperator "-" +syn match logtalkOperator "\*" +syn match logtalkOperator "//" +syn match logtalkOperator "/" +syn match logtalkKeyword "\" +syn match logtalkKeyword "\" +syn match logtalkKeyword "\>" +syn match logtalkOperator "<<" +syn match logtalkOperator "/\\" +syn match logtalkOperator "\\/" +syn match logtalkOperator "\\" + + +" Logtalk list operator + +syn match logtalkOperator "|" + + +" Logtalk numbers + +syn match logtalkNumber "\<\d\+\>" +syn match logtalkNumber "\<\d\+\.\d\+\>" +syn match logtalkNumber "\<\d\+[eE][-+]\=\d\+\>" +syn match logtalkNumber "\<\d\+\.\d\+[eE][-+]\=\d\+\>" +syn match logtalkNumber "\<0'.\|0''\|0'\"\>" +syn match logtalkNumber "\<0b[0-1]\+\>" +syn match logtalkNumber "\<0o\o\+\>" +syn match logtalkNumber "\<0x\x\+\>" + + +" Logtalk end-of-clause + +syn match logtalkOperator "\." + + +" Logtalk comments + +syn region logtalkBlockComment start="/\*" end="\*/" fold +syn match logtalkLineComment "%.*" + + +" Logtalk entity folding + +syn region logtalkEntity transparent fold keepend start=":- object(" end=":- end_object\." contains=ALL +syn region logtalkEntity transparent fold keepend start=":- protocol(" end=":- end_protocol\." contains=ALL +syn region logtalkEntity transparent fold keepend start=":- category(" end=":- end_category\." contains=ALL + + +syn sync ccomment logtalkBlockComment maxlines=50 + + +" 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_logtalk_syn_inits") + if version < 508 + let did_logtalk_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink logtalkBlockComment Comment + HiLink logtalkLineComment Comment + + HiLink logtalkOpenEntityDir Normal + HiLink logtalkOpenEntityDirTag PreProc + + HiLink logtalkEntity Normal + + HiLink logtalkEntityRel Normal + HiLink logtalkEntityRelTag PreProc + + HiLink logtalkCloseEntityDir PreProc + + HiLink logtalkDir Normal + HiLink logtalkDirTag PreProc + + HiLink logtalkAtom String + HiLink logtalkString String + HiLink logtalkEscapeSequence SpecialChar + + HiLink logtalkNumber Number + + HiLink logtalkKeyword Keyword + + HiLink logtalkBuiltIn Keyword + HiLink logtalkBuiltInMethod Keyword + + HiLink logtalkOperator Operator + + HiLink logtalkExtCall Normal + HiLink logtalkExtCallTag Operator + + HiLink logtalkVariable Identifier + + delcommand HiLink + +endif + + +let b:current_syntax = "logtalk" diff --git a/vim/bundle/ubuntu-vim72/syntax/lotos.vim b/vim/bundle/ubuntu-vim72/syntax/lotos.vim new file mode 100644 index 0000000..3cd83c4 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/lotos.vim @@ -0,0 +1,82 @@ +" Vim syntax file +" Language: LOTOS (Language Of Temporal Ordering Specifications, IS8807) +" Maintainer: Daniel Amyot +" Last Change: Wed Aug 19 1998 +" URL: http://lotos.csi.uottawa.ca/~damyot/vim/lotos.vim +" This file is an adaptation of pascal.vim by Mario Eusebio +" I'm not sure I understand all of the syntax highlight language, +" but this file seems to do the job for standard LOTOS. + +" 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 + +"Comments in LOTOS are between (* and *) +syn region lotosComment start="(\*" end="\*)" contains=lotosTodo + +"Operators [], [...], >>, ->, |||, |[...]|, ||, ;, !, ?, :, =, ,, := +syn match lotosDelimiter "[][]" +syn match lotosDelimiter ">>" +syn match lotosDelimiter "->" +syn match lotosDelimiter "\[>" +syn match lotosDelimiter "[|;!?:=,]" + +"Regular keywords +syn keyword lotosStatement specification endspec process endproc +syn keyword lotosStatement where behaviour behavior +syn keyword lotosStatement any let par accept choice hide of in +syn keyword lotosStatement i stop exit noexit + +"Operators from the Abstract Data Types in IS8807 +syn keyword lotosOperator eq ne succ and or xor implies iff +syn keyword lotosOperator not true false +syn keyword lotosOperator Insert Remove IsIn NotIn Union Ints +syn keyword lotosOperator Minus Includes IsSubsetOf +syn keyword lotosOperator lt le ge gt 0 + +"Sorts in IS8807 +syn keyword lotosSort Boolean Bool FBoolean FBool Element +syn keyword lotosSort Set String NaturalNumber Nat HexString +syn keyword lotosSort HexDigit DecString DecDigit +syn keyword lotosSort OctString OctDigit BitString Bit +syn keyword lotosSort Octet OctetString + +"Keywords for ADTs +syn keyword lotosType type endtype library endlib sorts formalsorts +syn keyword lotosType eqns formaleqns opns formalopns forall ofsort is +syn keyword lotosType for renamedby actualizedby sortnames opnnames +syn keyword lotosType using + +syn sync lines=250 + +" 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_lotos_syntax_inits") + if version < 508 + let did_lotos_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink lotosStatement Statement + HiLink lotosProcess Label + HiLink lotosOperator Operator + HiLink lotosSort Function + HiLink lotosType Type + HiLink lotosComment Comment + HiLink lotosDelimiter String + + delcommand HiLink +endif + +let b:current_syntax = "lotos" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/lout.vim b/vim/bundle/ubuntu-vim72/syntax/lout.vim new file mode 100644 index 0000000..2a0a72c --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/lout.vim @@ -0,0 +1,139 @@ +" Vim syntax file +" Language: Lout +" Maintainer: Christian V. J. Brüssow +" Last Change: Son 22 Jun 2003 20:43:26 CEST +" Filenames: *.lout,*.lt +" URL: http://www.cvjb.de/comp/vim/lout.vim +" $Id: lout.vim,v 1.1 2004/06/13 17:52:18 vimboss Exp $ +" +" Lout: Basser Lout document formatting system. + +" 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 + +" Lout is case sensitive +syn case match + +" Synchronization, I know it is a huge number, but normal texts can be +" _very_ long ;-) +syn sync lines=1000 + +" Characters allowed in keywords +" I don't know if 128-255 are allowed in ANS-FORHT +if version >= 600 + setlocal iskeyword=@,48-57,.,@-@,_,192-255 +else + set iskeyword=@,48-57,.,@-@,_,192-255 +endif + +" Some special keywords +syn keyword loutTodo contained TODO lout Lout LOUT +syn keyword loutDefine def macro + +" Some big structures +syn keyword loutKeyword @Begin @End @Figure @Tab +syn keyword loutKeyword @Book @Doc @Document @Report +syn keyword loutKeyword @Introduction @Abstract @Appendix +syn keyword loutKeyword @Chapter @Section @BeginSections @EndSections + +" All kind of Lout keywords +syn match loutFunction '\<@[^ \t{}]\+\>' + +" Braces -- Don`t edit these lines! +syn match loutMBraces '[{}]' +syn match loutIBraces '[{}]' +syn match loutBBrace '[{}]' +syn match loutBIBraces '[{}]' +syn match loutHeads '[{}]' + +" Unmatched braces. +syn match loutBraceError '}' + +" End of multi-line definitions, like @Document, @Report and @Book. +syn match loutEOmlDef '^//$' + +" Grouping of parameters and objects. +syn region loutObject transparent matchgroup=Delimiter start='{' matchgroup=Delimiter end='}' contains=ALLBUT,loutBraceError + +" The NULL object has a special meaning +syn keyword loutNULL {} + +" Comments +syn region loutComment start='\#' end='$' contains=loutTodo + +" Double quotes +syn region loutSpecial start=+"+ skip=+\\\\\|\\"+ end=+"+ + +" ISO-LATIN-1 characters created with @Char, or Adobe symbols +" created with @Sym +syn match loutSymbols '@\(\(Char\)\|\(Sym\)\)\s\+[A-Za-z]\+' + +" Include files +syn match loutInclude '@IncludeGraphic\s\+\k\+' +syn region loutInclude start='@\(\(SysInclude\)\|\(IncludeGraphic\)\|\(Include\)\)\s*{' end='}' + +" Tags +syn match loutTag '@\(\(Tag\)\|\(PageMark\)\|\(PageOf\)\|\(NumberOf\)\)\s\+\k\+' +syn region loutTag start='@Tag\s*{' end='}' + +" Equations +syn match loutMath '@Eq\s\+\k\+' +syn region loutMath matchgroup=loutMBraces start='@Eq\s*{' matchgroup=loutMBraces end='}' contains=ALLBUT,loutBraceError +" +" Fonts +syn match loutItalic '@I\s\+\k\+' +syn region loutItalic matchgroup=loutIBraces start='@I\s*{' matchgroup=loutIBraces end='}' contains=ALLBUT,loutBraceError +syn match loutBold '@B\s\+\k\+' +syn region loutBold matchgroup=loutBBraces start='@B\s*{' matchgroup=loutBBraces end='}' contains=ALLBUT,loutBraceError +syn match loutBoldItalic '@BI\s\+\k\+' +syn region loutBoldItalic matchgroup=loutBIBraces start='@BI\s*{' matchgroup=loutBIBraces end='}' contains=ALLBUT,loutBraceError +syn region loutHeadings matchgroup=loutHeads start='@\(\(Title\)\|\(Caption\)\)\s*{' matchgroup=loutHeads end='}' contains=ALLBUT,loutBraceError + +" 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_lout_syn_inits") + if version < 508 + let did_lout_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " The default methods for highlighting. Can be overrriden later. + HiLink loutTodo Todo + HiLink loutDefine Define + HiLink loutEOmlDef Define + HiLink loutFunction Function + HiLink loutBraceError Error + HiLink loutNULL Special + HiLink loutComment Comment + HiLink loutSpecial Special + HiLink loutSymbols Character + HiLink loutInclude Include + HiLink loutKeyword Keyword + HiLink loutTag Tag + HiLink loutMath Number + + " HiLink Not really needed here, but I think it is more consistent. + HiLink loutMBraces loutMath + hi loutItalic term=italic cterm=italic gui=italic + HiLink loutIBraces loutItalic + hi loutBold term=bold cterm=bold gui=bold + HiLink loutBBraces loutBold + hi loutBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic + HiLink loutBIBraces loutBoldItalic + hi loutHeadings term=bold cterm=bold guifg=indianred + HiLink loutHeads loutHeadings + + delcommand HiLink +endif + +let b:current_syntax = "lout" + +" vim:ts=8:sw=4:nocindent:smartindent: diff --git a/vim/bundle/ubuntu-vim72/syntax/lpc.vim b/vim/bundle/ubuntu-vim72/syntax/lpc.vim new file mode 100644 index 0000000..7665c1a --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/lpc.vim @@ -0,0 +1,455 @@ +" Vim syntax file +" Language: LPC +" Maintainer: Shizhu Pan +" URL: http://poet.tomud.com/pub/lpc.vim.bz2 +" Last Change: 2003 May 11 +" Comments: If you are using Vim 6.2 or later, see :h lpc.vim for +" file type recognizing, if not, you had to use modeline. + + +" Nodule: This is the start nodule. {{{1 + +" 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 + +" Nodule: Keywords {{{1 + +" LPC keywords +" keywords should always be highlighted so "contained" is not used. +syn cluster lpcKeywdGrp contains=lpcConditional,lpcLabel,lpcOperator,lpcRepeat,lpcStatement,lpcModifier,lpcReserved + +syn keyword lpcConditional if else switch +syn keyword lpcLabel case default +syn keyword lpcOperator catch efun in inherit +syn keyword lpcRepeat do for foreach while +syn keyword lpcStatement break continue return + +syn match lpcEfunError /efun[^:]/ display + +" Illegal to use keyword as function +" It's not working, maybe in the next version. +syn keyword lpcKeywdError contained if for foreach return switch while + +" These are keywords only because they take lvalue or type as parameter, +" so these keywords should only be used as function but cannot be names of +" user-defined functions. +syn keyword lpcKeywdFunc new parse_command sscanf time_expression + +" Nodule: Type and modifiers {{{1 + +" Type names list. + +" Special types +syn keyword lpcType void mixed unknown +" Scalar/Value types. +syn keyword lpcType int float string +" Pointer types. +syn keyword lpcType array buffer class function mapping object +" Other types. +if exists("lpc_compat_32") + syn keyword lpcType closure status funcall +else + syn keyword lpcError closure status + syn keyword lpcType multiset +endif + +" Type modifier. +syn keyword lpcModifier nomask private public +syn keyword lpcModifier varargs virtual + +" sensible modifiers +if exists("lpc_pre_v22") + syn keyword lpcReserved nosave protected ref + syn keyword lpcModifier static +else + syn keyword lpcError static + syn keyword lpcModifier nosave protected ref +endif + +" Nodule: Applies {{{1 + +" Match a function declaration or function pointer +syn match lpcApplyDecl excludenl /->\h\w*(/me=e-1 contains=lpcApplies transparent display + +" We should note that in func_spec.c the efun definition syntax is so +" complicated that I use such a long regular expression to describe. +syn match lpcLongDecl excludenl /\(\s\|\*\)\h\+\s\h\+(/me=e-1 contains=@lpcEfunGroup,lpcType,@lpcKeywdGrp transparent display + +" this is form for all functions +" ->foo() form had been excluded +syn match lpcFuncDecl excludenl /\h\w*(/me=e-1 contains=lpcApplies,@lpcEfunGroup,lpcKeywdError transparent display + +" The (: :) parenthesis or $() forms a function pointer +syn match lpcFuncName /(:\s*\h\+\s*:)/me=e-1 contains=lpcApplies,@lpcEfunGroup transparent display contained +syn match lpcFuncName /(:\s*\h\+,/ contains=lpcApplies,@lpcEfunGroup transparent display contained +syn match lpcFuncName /\$(\h\+)/ contains=lpcApplies,@lpcEfunGroup transparent display contained + +" Applies list. +" system applies +syn keyword lpcApplies contained __INIT clean_up create destructor heart_beat id init move_or_destruct reset +" interactive +syn keyword lpcApplies contained catch_tell logon net_dead process_input receive_message receive_snoop telnet_suboption terminal_type window_size write_prompt +" master applies +syn keyword lpcApplies contained author_file compile_object connect crash creator_file domain_file epilog error_handler flag get_bb_uid get_root_uid get_save_file_name log_error make_path_absolute object_name preload privs_file retrieve_ed_setup save_ed_setup slow_shutdown +syn keyword lpcApplies contained valid_asm valid_bind valid_compile_to_c valid_database valid_hide valid_link valid_object valid_override valid_read valid_save_binary valid_seteuid valid_shadow valid_socket valid_write +" parsing +syn keyword lpcApplies contained inventory_accessible inventory_visible is_living parse_command_adjectiv_id_list parse_command_adjective_id_list parse_command_all_word parse_command_id_list parse_command_plural_id_list parse_command_prepos_list parse_command_users parse_get_environment parse_get_first_inventory parse_get_next_inventory parser_error_message + + +" Nodule: Efuns {{{1 + +syn cluster lpcEfunGroup contains=lpc_efuns,lpcOldEfuns,lpcNewEfuns,lpcKeywdFunc + +" Compat32 efuns +if exists("lpc_compat_32") + syn keyword lpc_efuns contained closurep heart_beat_info m_delete m_values m_indices query_once_interactive strstr +else + syn match lpcErrFunc /#`\h\w*/ + " Shell compatible first line comment. + syn region lpcCommentFunc start=/^#!/ end=/$/ +endif + +" pre-v22 efuns which are removed in newer versions. +syn keyword lpcOldEfuns contained tail dump_socket_status + +" new efuns after v22 should be added here! +syn keyword lpcNewEfuns contained socket_status + +" LPC efuns list. +" DEBUG efuns Not included. +" New efuns should NOT be added to this list, see v22 efuns above. +" Efuns list {{{2 +syn keyword lpc_efuns contained acos add_action all_inventory all_previous_objects allocate allocate_buffer allocate_mapping apply arrayp asin atan author_stats +syn keyword lpc_efuns contained bind break_string bufferp +syn keyword lpc_efuns contained cache_stats call_other call_out call_out_info call_stack capitalize catch ceil check_memory children classp clear_bit clone_object clonep command commands copy cos cp crc32 crypt ctime +syn keyword lpc_efuns contained db_close db_commit db_connect db_exec db_fetch db_rollback db_status debug_info debugmalloc debug_message deep_inherit_list deep_inventory destruct disable_commands disable_wizard domain_stats dumpallobj dump_file_descriptors dump_prog +syn keyword lpc_efuns contained each ed ed_cmd ed_start enable_commands enable_wizard environment error errorp eval_cost evaluate exec exp explode export_uid external_start +syn keyword lpc_efuns contained fetch_variable file_length file_name file_size filter filter_array filter_mapping find_call_out find_living find_object find_player first_inventory floatp floor flush_messages function_exists function_owner function_profile functionp functions +syn keyword lpc_efuns contained generate_source get_char get_config get_dir geteuid getuid +syn keyword lpc_efuns contained heart_beats +syn keyword lpc_efuns contained id_matrix implode in_edit in_input inherit_list inherits input_to interactive intp +syn keyword lpc_efuns contained keys +syn keyword lpc_efuns contained link living livings load_object localtime log log10 lookat_rotate lower_case lpc_info +syn keyword lpc_efuns contained malloc_check malloc_debug malloc_status map map_array map_delete map_mapping mapp master match_path max_eval_cost member_array memory_info memory_summary message mkdir moncontrol move_object mud_status +syn keyword lpc_efuns contained named_livings network_stats next_bit next_inventory notify_fail nullp +syn keyword lpc_efuns contained objectp objects oldcrypt opcprof origin +syn keyword lpc_efuns contained parse_add_rule parse_add_synonym parse_command parse_dump parse_init parse_my_rules parse_refresh parse_remove parse_sentence pluralize pointerp pow present previous_object printf process_string process_value program_info +syn keyword lpc_efuns contained query_ed_mode query_heart_beat query_host_name query_idle query_ip_name query_ip_number query_ip_port query_load_average query_notify_fail query_privs query_replaced_program query_shadowing query_snoop query_snooping query_verb +syn keyword lpc_efuns contained random read_buffer read_bytes read_file receive reclaim_objects refs regexp reg_assoc reload_object remove_action remove_call_out remove_interactive remove_shadow rename repeat_string replace_program replace_string replaceable reset_eval_cost resolve restore_object restore_variable rm rmdir rotate_x rotate_y rotate_z rusage +syn keyword lpc_efuns contained save_object save_variable say scale set_author set_bit set_eval_limit set_heart_beat set_hide set_light set_living_name set_malloc_mask set_privs set_reset set_this_player set_this_user seteuid shadow shallow_inherit_list shout shutdown sin sizeof snoop socket_accept socket_acquire socket_address socket_bind socket_close socket_connect socket_create socket_error socket_listen socket_release socket_write sort_array sprintf sqrt stat store_variable strcmp stringp strlen strsrch +syn keyword lpc_efuns contained tan tell_object tell_room terminal_colour test_bit this_interactive this_object this_player this_user throw time to_float to_int trace traceprefix translate typeof +syn keyword lpc_efuns contained undefinedp unique_array unique_mapping upper_case uptime userp users +syn keyword lpc_efuns contained values variables virtualp +syn keyword lpc_efuns contained wizardp write write_buffer write_bytes write_file + +" Nodule: Constants {{{1 + +" LPC Constants. +" like keywords, constants are always highlighted, be careful to choose only +" the constants we used to add to this list. +syn keyword lpcConstant __ARCH__ __COMPILER__ __DIR__ __FILE__ __OPTIMIZATION__ __PORT__ __VERSION__ +" Defines in options.h are all predefined in LPC sources surrounding by +" two underscores. Do we need to include all of that? +syn keyword lpcConstant __SAVE_EXTENSION__ __HEARTBEAT_INTERVAL__ +" from the documentation we know that these constants remains only for +" backward compatibility and should not be used any more. +syn keyword lpcConstant HAS_ED HAS_PRINTF HAS_RUSAGE HAS_DEBUG_LEVEL +syn keyword lpcConstant MUD_NAME F__THIS_OBJECT + +" Nodule: Todo for this file. {{{1 + +" TODO : need to check for LPC4 syntax and other series of LPC besides +" v22, b21 and l32, if you had a good idea, contact me at poet@mudbuilder.net +" and I will be appreciated about that. + +" Notes about some FAQ: +" +" About variables : We adopts the same behavior for C because almost all the +" LPC programmers are also C programmers, so we don't need separate settings +" for C and LPC. That is the reason why I don't change variables like +" "c_no_utf"s to "lpc_no_utf"s. +" +" Copy : Some of the following seems to be copied from c.vim but not quite +" the same in details because the syntax for C and LPC is different. +" +" Color scheme : this syntax file had been thouroughly tested to work well +" for all of the dark-backgrounded color schemes Vim has provided officially, +" and it should be quite Ok for all of the bright-backgrounded color schemes, +" of course it works best for the color scheme that I am using, download it +" from http://poet.tomud.com/pub/ps_color.vim.bz2 if you want to try it. +" + +" Nodule: String and Character {{{1 + + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match lpcSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" +if !exists("c_no_utf") + syn match lpcSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)" +endif + +" LPC version of sprintf() format, +syn match lpcFormat display "%\(\d\+\)\=[-+ |=#@:.]*\(\d\+\)\=\('\I\+'\|'\I*\\'\I*'\)\=[OsdicoxXf]" contained +syn match lpcFormat display "%%" contained +syn region lpcString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=lpcSpecial,lpcFormat +" lpcCppString: same as lpcString, but ends at end of line +syn region lpcCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=lpcSpecial,lpcFormat + +" LPC preprocessor for the text formatting short cuts +" Thanks to Dr. Charles E. Campbell +" he suggests the best way to do this. +syn region lpcTextString start=/@\z(\h\w*\)$/ end=/^\z1/ contains=lpcSpecial +syn region lpcArrayString start=/@@\z(\h\w*\)$/ end=/^\z1/ contains=lpcSpecial + +" Character +syn match lpcCharacter "L\='[^\\]'" +syn match lpcCharacter "L'[^']*'" contains=lpcSpecial +syn match lpcSpecialError "L\='\\[^'\"?\\abefnrtv]'" +syn match lpcSpecialCharacter "L\='\\['\"?\\abefnrtv]'" +syn match lpcSpecialCharacter display "L\='\\\o\{1,3}'" +syn match lpcSpecialCharacter display "'\\x\x\{1,2}'" +syn match lpcSpecialCharacter display "L'\\x\x\+'" + +" Nodule: White space {{{1 + +" when wanted, highlight trailing white space +if exists("c_space_errors") + if !exists("c_no_trail_space_error") + syn match lpcSpaceError display excludenl "\s\+$" + endif + if !exists("c_no_tab_space_error") + syn match lpcSpaceError display " \+\t"me=e-1 + endif +endif + +" Nodule: Parenthesis and brackets {{{1 + +" catch errors caused by wrong parenthesis and brackets +syn cluster lpcParenGroup contains=lpcParenError,lpcIncluded,lpcSpecial,lpcCommentSkip,lpcCommentString,lpcComment2String,@lpcCommentGroup,lpcCommentStartError,lpcUserCont,lpcUserLabel,lpcBitField,lpcCommentSkip,lpcOctalZero,lpcCppOut,lpcCppOut2,lpcCppSkip,lpcFormat,lpcNumber,lpcFloat,lpcOctal,lpcOctalError,lpcNumbersCom +syn region lpcParen transparent start='(' end=')' contains=ALLBUT,@lpcParenGroup,lpcCppParen,lpcErrInBracket,lpcCppBracket,lpcCppString,@lpcEfunGroup,lpcApplies,lpcKeywdError +" lpcCppParen: same as lpcParen but ends at end-of-line; used in lpcDefine +syn region lpcCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@lpcParenGroup,lpcErrInBracket,lpcParen,lpcBracket,lpcString,@lpcEfunGroup,lpcApplies,lpcKeywdError +syn match lpcParenError display ")" +syn match lpcParenError display "\]" +" for LPC: +" Here we should consider the array ({ }) parenthesis and mapping ([ ]) +" parenthesis and multiset (< >) parenthesis. +syn match lpcErrInParen display contained "[^^]{"ms=s+1 +syn match lpcErrInParen display contained "\(}\|\]\)[^)]"me=e-1 +syn region lpcBracket transparent start='\[' end=']' contains=ALLBUT,@lpcParenGroup,lpcErrInParen,lpcCppParen,lpcCppBracket,lpcCppString,@lpcEfunGroup,lpcApplies,lpcFuncName,lpcKeywdError +" lpcCppBracket: same as lpcParen but ends at end-of-line; used in lpcDefine +syn region lpcCppBracket transparent start='\[' skip='\\$' excludenl end=']' end='$' contained contains=ALLBUT,@lpcParenGroup,lpcErrInParen,lpcParen,lpcBracket,lpcString,@lpcEfunGroup,lpcApplies,lpcFuncName,lpcKeywdError +syn match lpcErrInBracket display contained "[);{}]" + +" Nodule: Numbers {{{1 + +" integer number, or floating point number without a dot and with "f". +syn case ignore +syn match lpcNumbers display transparent "\<\d\|\.\d" contains=lpcNumber,lpcFloat,lpcOctalError,lpcOctal +" Same, but without octal error (for comments) +syn match lpcNumbersCom display contained transparent "\<\d\|\.\d" contains=lpcNumber,lpcFloat,lpcOctal +syn match lpcNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" +" hex number +syn match lpcNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" +" Flag the first zero of an octal number as something special +syn match lpcOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=lpcOctalZero +syn match lpcOctalZero display contained "\<0" +syn match lpcFloat display contained "\d\+f" +" floating point number, with dot, optional exponent +syn match lpcFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" +" floating point number, starting with a dot, optional exponent +syn match lpcFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +" floating point number, without dot, with exponent +syn match lpcFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" +" flag an octal number with wrong digits +syn match lpcOctalError display contained "0\o*[89]\d*" +syn case match + +" Nodule: Comment string {{{1 + +" lpcCommentGroup allows adding matches for special things in comments +syn keyword lpcTodo contained TODO FIXME XXX +syn cluster lpcCommentGroup contains=lpcTodo + +if exists("c_comment_strings") + " A comment can contain lpcString, lpcCharacter and lpcNumber. + syntax match lpcCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region lpcCommentString contained start=+L\=\\\@" skip="\\$" end="$" end="//"me=s-1 contains=lpcComment,lpcCppString,lpcCharacter,lpcCppParen,lpcParenError,lpcNumbers,lpcCommentError,lpcSpaceError +syn match lpcPreCondit display "^\s*#\s*\(else\|endif\)\>" +if !exists("c_no_if0") + syn region lpcCppOut start="^\s*#\s*if\s\+0\+\>" end=".\|$" contains=lpcCppOut2 + syn region lpcCppOut2 contained start="0" end="^\s*#\s*\(endif\>\|else\>\|elif\>\)" contains=lpcSpaceError,lpcCppSkip + syn region lpcCppSkip contained start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*#\s*endif\>" contains=lpcSpaceError,lpcCppSkip +endif +syn region lpcIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match lpcIncluded display contained "<[^>]*>" +syn match lpcInclude display "^\s*#\s*include\>\s*["<]" contains=lpcIncluded +syn match lpcLineSkip "\\$" +syn cluster lpcPreProcGroup contains=lpcPreCondit,lpcIncluded,lpcInclude,lpcDefine,lpcErrInParen,lpcErrInBracket,lpcUserLabel,lpcSpecial,lpcOctalZero,lpcCppOut,lpcCppOut2,lpcCppSkip,lpcFormat,lpcNumber,lpcFloat,lpcOctal,lpcOctalError,lpcNumbersCom,lpcString,lpcCommentSkip,lpcCommentString,lpcComment2String,@lpcCommentGroup,lpcCommentStartError,lpcParen,lpcBracket,lpcMulti,lpcKeywdError +syn region lpcDefine start="^\s*#\s*\(define\|undef\)\>" skip="\\$" end="$" end="//"me=s-1 contains=ALLBUT,@lpcPreProcGroup + +if exists("lpc_pre_v22") + syn region lpcPreProc start="^\s*#\s*\(pragma\>\|echo\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@lpcPreProcGroup +else + syn region lpcPreProc start="^\s*#\s*\(pragma\>\|echo\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@lpcPreProcGroup +endif + +" Nodule: User labels {{{1 + +" Highlight Labels +" User labels in LPC is not allowed, only "case x" and "default" is supported +syn cluster lpcMultiGroup contains=lpcIncluded,lpcSpecial,lpcCommentSkip,lpcCommentString,lpcComment2String,@lpcCommentGroup,lpcCommentStartError,lpcUserCont,lpcUserLabel,lpcBitField,lpcOctalZero,lpcCppOut,lpcCppOut2,lpcCppSkip,lpcFormat,lpcNumber,lpcFloat,lpcOctal,lpcOctalError,lpcNumbersCom,lpcCppParen,lpcCppBracket,lpcCppString,lpcKeywdError +syn region lpcMulti transparent start='\(case\|default\|public\|protected\|private\)' skip='::' end=':' contains=ALLBUT,@lpcMultiGroup + +syn cluster lpcLabelGroup contains=lpcUserLabel +syn match lpcUserCont display "^\s*lpc:$" contains=@lpcLabelGroup + +" Don't want to match anything +syn match lpcUserLabel display "lpc" contained + +" Nodule: Initializations {{{1 + +if exists("c_minlines") + let b:c_minlines = c_minlines +else + if !exists("c_no_if0") + let b:c_minlines = 50 " #if 0 constructs can be long + else + let b:c_minlines = 15 " mostly for () constructs + endif +endif +exec "syn sync ccomment lpcComment minlines=" . b:c_minlines + +" Make sure these options take place since we no longer depend on file type +" plugin for C +setlocal cindent +setlocal fo-=t fo+=croql +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// +set cpo-=C + +" Win32 can filter files in the browse dialog +if has("gui_win32") && !exists("b:browsefilter") + let b:browsefilter = "LPC Source Files (*.c *.d *.h)\t*.c;*.d;*.h\n" . + \ "LPC Data Files (*.scr *.o *.dat)\t*.scr;*.o;*.dat\n" . + \ "Text Documentation (*.txt)\t*.txt\n" . + \ "All Files (*.*)\t*.*\n" +endif + +" Nodule: Highlight links {{{1 + +" 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_lpc_syn_inits") + if version < 508 + let did_lpc_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink lpcModifier lpcStorageClass + + HiLink lpcQuotedFmt lpcFormat + HiLink lpcFormat lpcSpecial + HiLink lpcCppString lpcString " Cpp means + " C Pre-Processor + HiLink lpcCommentL lpcComment + HiLink lpcCommentStart lpcComment + HiLink lpcUserLabel lpcLabel + HiLink lpcSpecialCharacter lpcSpecial + HiLink lpcOctal lpcPreProc + HiLink lpcOctalZero lpcSpecial " LPC will treat octal numbers + " as decimals, programmers should + " be aware of that. + HiLink lpcEfunError lpcError + HiLink lpcKeywdError lpcError + HiLink lpcOctalError lpcError + HiLink lpcParenError lpcError + HiLink lpcErrInParen lpcError + HiLink lpcErrInBracket lpcError + HiLink lpcCommentError lpcError + HiLink lpcCommentStartError lpcError + HiLink lpcSpaceError lpcError + HiLink lpcSpecialError lpcError + HiLink lpcErrFunc lpcError + + if exists("lpc_pre_v22") + HiLink lpcOldEfuns lpc_efuns + HiLink lpcNewEfuns lpcError + else + HiLink lpcOldEfuns lpcReserved + HiLink lpcNewEfuns lpc_efuns + endif + HiLink lpc_efuns lpcFunction + + HiLink lpcReserved lpcPreProc + HiLink lpcTextString lpcString " This should be preprocessors, but + HiLink lpcArrayString lpcPreProc " let's make some difference + " between text and array + + HiLink lpcIncluded lpcString + HiLink lpcCommentString lpcString + HiLink lpcComment2String lpcString + HiLink lpcCommentSkip lpcComment + HiLink lpcCommentFunc lpcComment + + HiLink lpcCppSkip lpcCppOut + HiLink lpcCppOut2 lpcCppOut + HiLink lpcCppOut lpcComment + + " Standard type below + HiLink lpcApplies Special + HiLink lpcCharacter Character + HiLink lpcComment Comment + HiLink lpcConditional Conditional + HiLink lpcConstant Constant + HiLink lpcDefine Macro + HiLink lpcError Error + HiLink lpcFloat Float + HiLink lpcFunction Function + HiLink lpcIdentifier Identifier + HiLink lpcInclude Include + HiLink lpcLabel Label + HiLink lpcNumber Number + HiLink lpcOperator Operator + HiLink lpcPreCondit PreCondit + HiLink lpcPreProc PreProc + HiLink lpcRepeat Repeat + HiLink lpcStatement Statement + HiLink lpcStorageClass StorageClass + HiLink lpcString String + HiLink lpcStructure Structure + HiLink lpcSpecial LineNr + HiLink lpcTodo Todo + HiLink lpcType Type + + delcommand HiLink +endif + +" Nodule: This is the end nodule. {{{1 + +let b:current_syntax = "lpc" + +" vim:ts=8:nosta:sw=2:ai:si: +" vim600:set fdm=marker: }}}1 diff --git a/vim/bundle/ubuntu-vim72/syntax/lprolog.vim b/vim/bundle/ubuntu-vim72/syntax/lprolog.vim new file mode 100644 index 0000000..086c00f --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/lprolog.vim @@ -0,0 +1,137 @@ +" Vim syntax file +" Language: LambdaProlog (Teyjus) +" Filenames: *.mod *.sig +" Maintainer: Markus Mottl +" URL: http://www.ocaml.info/vim/syntax/lprolog.vim +" Last Change: 2006 Feb 05 +" 2001 Apr 26 - Upgraded for new Vim version +" 2000 Jun 5 - Initial release + +" 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 + +" Lambda Prolog is case sensitive. +syn case match + +syn match lprologBrackErr "\]" +syn match lprologParenErr ")" + +syn cluster lprologContained contains=lprologTodo,lprologModuleName,lprologTypeNames,lprologTypeName + +" Enclosing delimiters +syn region lprologEncl transparent matchgroup=lprologKeyword start="(" matchgroup=lprologKeyword end=")" contains=ALLBUT,@lprologContained,lprologParenErr +syn region lprologEncl transparent matchgroup=lprologKeyword start="\[" matchgroup=lprologKeyword end="\]" contains=ALLBUT,@lprologContained,lprologBrackErr + +" General identifiers +syn match lprologIdentifier "\<\(\w\|[-+*/\\^<>=`'~?@#$&!_]\)*\>" +syn match lprologVariable "\<\(\u\|_\)\(\w\|[-+*/\\^<>=`'~?@#$&!]\)*\>" + +syn match lprologOperator "/" + +" Comments +syn region lprologComment start="/\*" end="\*/" contains=lprologComment,lprologTodo +syn region lprologComment start="%" end="$" contains=lprologTodo +syn keyword lprologTodo contained TODO FIXME XXX + +syn match lprologInteger "\<\d\+\>" +syn match lprologReal "\<\(\d\+\)\=\.\d+\>" +syn region lprologString start=+"+ skip=+\\\\\|\\"+ end=+"+ + +" Clause definitions +syn region lprologClause start="^\w\+" end=":-\|\." + +" Modules +syn region lprologModule matchgroup=lprologKeyword start="^\" matchgroup=lprologKeyword end="\." + +" Types +syn match lprologKeyword "^\" skipwhite nextgroup=lprologTypeNames +syn region lprologTypeNames matchgroup=lprologBraceErr start="\<\w\+\>" matchgroup=lprologKeyword end="\." contained contains=lprologTypeName,lprologOperator +syn match lprologTypeName "\<\w\+\>" contained + +" Keywords +syn keyword lprologKeyword end import accumulate accum_sig +syn keyword lprologKeyword local localkind closed sig +syn keyword lprologKeyword kind exportdef useonly +syn keyword lprologKeyword infixl infixr infix prefix +syn keyword lprologKeyword prefixr postfix postfixl + +syn keyword lprologSpecial pi sigma is true fail halt stop not + +" Operators +syn match lprologSpecial ":-" +syn match lprologSpecial "->" +syn match lprologSpecial "=>" +syn match lprologSpecial "\\" +syn match lprologSpecial "!" + +syn match lprologSpecial "," +syn match lprologSpecial ";" +syn match lprologSpecial "&" + +syn match lprologOperator "+" +syn match lprologOperator "-" +syn match lprologOperator "*" +syn match lprologOperator "\~" +syn match lprologOperator "\^" +syn match lprologOperator "<" +syn match lprologOperator ">" +syn match lprologOperator "=<" +syn match lprologOperator ">=" +syn match lprologOperator "::" +syn match lprologOperator "=" + +syn match lprologOperator "\." +syn match lprologOperator ":" +syn match lprologOperator "|" + +syn match lprologCommentErr "\*/" + +syn sync minlines=50 +syn sync maxlines=500 + + +" 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_lprolog_syntax_inits") + if version < 508 + let did_lprolog_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink lprologComment Comment + HiLink lprologTodo Todo + + HiLink lprologKeyword Keyword + HiLink lprologSpecial Special + HiLink lprologOperator Operator + HiLink lprologIdentifier Normal + + HiLink lprologInteger Number + HiLink lprologReal Number + HiLink lprologString String + + HiLink lprologCommentErr Error + HiLink lprologBrackErr Error + HiLink lprologParenErr Error + + HiLink lprologModuleName Special + HiLink lprologTypeName Identifier + + HiLink lprologVariable Keyword + HiLink lprologAtom Normal + HiLink lprologClause Type + + delcommand HiLink +endif + +let b:current_syntax = "lprolog" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/lscript.vim b/vim/bundle/ubuntu-vim72/syntax/lscript.vim new file mode 100644 index 0000000..648a0eb --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/lscript.vim @@ -0,0 +1,213 @@ +" Vim syntax file +" Language: LotusScript +" Maintainer: Taryn East (taryneast@hotmail.com) +" Last Change: 2003 May 11 + +" This is a rough amalgamation of the visual basic syntax file, and the UltraEdit +" and Textpad syntax highlighters. +" It's not too brilliant given that a) I've never written a syntax.vim file before +" and b) I'm not so crash hot at LotusScript either. If you see any problems +" feel free to email me with them. + +" 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 + +" LotusScript is case insensitive +syn case ignore + +" These are Notes thingies that had an equivalent in the vb highlighter +" or I was already familiar with them +syn keyword lscriptStatement ActivateApp As And Base Beep Call Case ChDir ChDrive Class +syn keyword lscriptStatement Const Dim Declare DefCur DefDbl DefInt DefLng DefSng DefStr +syn keyword lscriptStatement DefVar Do Else %Else ElseIf %ElseIf End %End Erase Event Exit +syn keyword lscriptStatement Explicit FileCopy FALSE For ForAll Function Get GoTo GoSub +syn keyword lscriptStatement If %If In Is Kill Let List Lock Loop MkDir +syn keyword lscriptStatement Name Next New NoCase NoPitch Not Nothing NULL +syn keyword lscriptStatement On Option Or PI Pitch Preserve Private Public +syn keyword lscriptStatement Property Public Put +syn keyword lscriptStatement Randomize ReDim Reset Resume Return RmDir +syn keyword lscriptStatement Select SendKeys SetFileAttr Set Static Sub Then To TRUE +syn keyword lscriptStatement Type Unlock Until While WEnd With Write XOr + +syn keyword lscriptDatatype Array Currency Double Integer Long Single String String$ Variant + +syn keyword lscriptNotesType Field Button Navigator +syn keyword lscriptNotesType NotesACL NotesACLEntry NotesAgent NotesDatabase NotesDateRange +syn keyword lscriptNotesType NotesDateTime NotesDbDirectory NotesDocument +syn keyword lscriptNotesType NotesDocumentCollection NotesEmbeddedObject NotesForm +syn keyword lscriptNotesType NotesInternational NotesItem NotesLog NotesName NotesNewsLetter +syn keyword lscriptNotesType NotesMIMEEntry NotesOutline NotesOutlineEntry NotesRegistration +syn keyword lscriptNotesType NotesReplication NotesRichTextItem NotesRichTextParagraphStyle +syn keyword lscriptNotesType NotesRichTextStyle NotesRichTextTab +syn keyword lscriptNotesType NotesSession NotesTimer NotesView NotesViewColumn NotesViewEntry +syn keyword lscriptNotesType NotesViewEntryCollection NotesViewNavigator NotesUIDatabase +syn keyword lscriptNotesType NotesUIDocument NotesUIView NotesUIWorkspace + +syn keyword lscriptNotesConst ACLLEVEL_AUTHOR ACLLEVEL_DEPOSITOR ACLLEVEL_DESIGNER +syn keyword lscriptNotesConst ACLLEVEL_EDITOR ACLLEVEL_MANAGER ACLLEVEL_NOACCESS +syn keyword lscriptNotesConst ACLLEVEL_READER ACLTYPE_MIXED_GROUP ACLTYPE_PERSON +syn keyword lscriptNotesConst ACLTYPE_PERSON_GROUP ACLTYPE_SERVER ACLTYPE_SERVER_GROUP +syn keyword lscriptNotesConst ACLTYPE_UNSPECIFIED ACTIONCD ALIGN_CENTER +syn keyword lscriptNotesConst ALIGN_FULL ALIGN_LEFT ALIGN_NOWRAP ALIGN_RIGHT +syn keyword lscriptNotesConst ASSISTANTINFO ATTACHMENT AUTHORS COLOR_BLACK +syn keyword lscriptNotesConst COLOR_BLUE COLOR_CYAN COLOR_DARK_BLUE COLOR_DARK_CYAN +syn keyword lscriptNotesConst COLOR_DARK_GREEN COLOR_DARK_MAGENTA COLOR_DARK_RED +syn keyword lscriptNotesConst COLOR_DARK_YELLOW COLOR_GRAY COLOR_GREEN COLOR_LIGHT_GRAY +syn keyword lscriptNotesConst COLOR_MAGENTA COLOR_RED COLOR_WHITE COLOR_YELLOW +syn keyword lscriptNotesConst DATABASE DATETIMES DB_REPLICATION_PRIORITY_HIGH +syn keyword lscriptNotesConst DB_REPLICATION_PRIORITY_LOW DB_REPLICATION_PRIORITY_MED +syn keyword lscriptNotesConst DB_REPLICATION_PRIORITY_NOTSET EFFECTS_EMBOSS +syn keyword lscriptNotesConst EFFECTS_EXTRUDE EFFECTS_NONE EFFECTS_SHADOW +syn keyword lscriptNotesConst EFFECTS_SUBSCRIPT EFFECTS_SUPERSCRIPT EMBED_ATTACHMENT +syn keyword lscriptNotesConst EMBED_OBJECT EMBED_OBJECTLINK EMBEDDEDOBJECT ERRORITEM +syn keyword lscriptNotesConst EV_ALARM EV_COMM EV_MAIL EV_MISC EV_REPLICA EV_RESOURCE +syn keyword lscriptNotesConst EV_SECURITY EV_SERVER EV_UNKNOWN EV_UPDATE FONT_COURIER +syn keyword lscriptNotesConst FONT_HELV FONT_ROMAN FORMULA FT_DATABASE FT_DATE_ASC +syn keyword lscriptNotesConst FT_DATE_DES FT_FILESYSTEM FT_FUZZY FT_SCORES FT_STEMS +syn keyword lscriptNotesConst FT_THESAURUS HTML ICON ID_CERTIFIER ID_FLAT +syn keyword lscriptNotesConst ID_HIERARCHICAL LSOBJECT MIME_PART NAMES NOTESLINKS +syn keyword lscriptNotesConst NOTEREFS NOTES_DESKTOP_CLIENT NOTES_FULL_CLIENT +syn keyword lscriptNotesConst NOTES_LIMITED_CLIENT NUMBERS OTHEROBJECT +syn keyword lscriptNotesConst OUTLINE_CLASS_DATABASE OUTLINE_CLASS_DOCUMENT +syn keyword lscriptNotesConst OUTLINE_CLASS_FOLDER OUTLINE_CLASS_FORM +syn keyword lscriptNotesConst OUTLINE_CLASS_FRAMESET OUTLINE_CLASS_NAVIGATOR +syn keyword lscriptNotesConst OUTLINE_CLASS_PAGE OUTLINE_CLASS_UNKNOWN +syn keyword lscriptNotesConst OUTLINE_CLASS_VIEW OUTLINE_OTHER_FOLDERS_TYPE +syn keyword lscriptNotesConst OUTLINE_OTHER_UNKNOWN_TYPE OUTLINE_OTHER_VIEWS_TYPE +syn keyword lscriptNotesConst OUTLINE_TYPE_ACTION OUTLINE_TYPE_NAMEDELEMENT +syn keyword lscriptNotesConst OUTLINE_TYPE_NOTELINK OUTLINE_TYPE_URL PAGINATE_BEFORE +syn keyword lscriptNotesConst PAGINATE_DEFAULT PAGINATE_KEEP_TOGETHER +syn keyword lscriptNotesConst PAGINATE_KEEP_WITH_NEXT PICKLIST_CUSTOM PICKLIST_NAMES +syn keyword lscriptNotesConst PICKLIST_RESOURCES PICKLIST_ROOMS PROMPT_OK PROMPT_OKCANCELCOMBO +syn keyword lscriptNotesConst PROMPT_OKCANCELEDIT PROMPT_OKCANCELEDITCOMBO PROMPT_OKCANCELLIST +syn keyword lscriptNotesConst PROMPT_OKCANCELLISTMULT PROMPT_PASSWORD PROMPT_YESNO +syn keyword lscriptNotesConst PROMPT_YESNOCANCEL QUERYCD READERS REPLICA_CANDIDATE +syn keyword lscriptNotesConst RICHTEXT RULER_ONE_CENTIMETER RULER_ONE_INCH SEV_FAILURE +syn keyword lscriptNotesConst SEV_FATAL SEV_NORMAL SEV_WARNING1 SEV_WARNING2 +syn keyword lscriptNotesConst SIGNATURE SPACING_DOUBLE SPACING_ONE_POINT_50 +syn keyword lscriptNotesConst SPACING_SINGLE STYLE_NO_CHANGE TAB_CENTER TAB_DECIMAL +syn keyword lscriptNotesConst TAB_LEFT TAB_RIGHT TARGET_ALL_DOCS TARGET_ALL_DOCS_IN_VIEW +syn keyword lscriptNotesConst TARGET_NEW_DOCS TARGET_NEW_OR_MODIFIED_DOCS TARGET_NONE +syn keyword lscriptNotesConst TARGET_RUN_ONCE TARGET_SELECTED_DOCS TARGET_UNREAD_DOCS_IN_VIEW +syn keyword lscriptNotesConst TEMPLATE TEMPLATE_CANDIDATE TEXT TRIGGER_AFTER_MAIL_DELIVERY +syn keyword lscriptNotesConst TRIGGER_BEFORE_MAIL_DELIVERY TRIGGER_DOC_PASTED +syn keyword lscriptNotesConst TRIGGER_DOC_UPDATE TRIGGER_MANUAL TRIGGER_NONE +syn keyword lscriptNotesConst TRIGGER_SCHEDULED UNAVAILABLE UNKNOWN USERDATA +syn keyword lscriptNotesConst USERID VC_ALIGN_CENTER VC_ALIGN_LEFT VC_ALIGN_RIGHT +syn keyword lscriptNotesConst VC_ATTR_PARENS VC_ATTR_PUNCTUATED VC_ATTR_PERCENT +syn keyword lscriptNotesConst VC_FMT_ALWAYS VC_FMT_CURRENCY VC_FMT_DATE VC_FMT_DATETIME +syn keyword lscriptNotesConst VC_FMT_FIXED VC_FMT_GENERAL VC_FMT_HM VC_FMT_HMS +syn keyword lscriptNotesConst VC_FMT_MD VC_FMT_NEVER VC_FMT_SCIENTIFIC +syn keyword lscriptNotesConst VC_FMT_SOMETIMES VC_FMT_TIME VC_FMT_TODAYTIME VC_FMT_YM +syn keyword lscriptNotesConst VC_FMT_YMD VC_FMT_Y4M VC_FONT_BOLD VC_FONT_ITALIC +syn keyword lscriptNotesConst VC_FONT_STRIKEOUT VC_FONT_UNDERLINE VC_SEP_COMMA +syn keyword lscriptNotesConst VC_SEP_NEWLINE VC_SEP_SEMICOLON VC_SEP_SPACE +syn keyword lscriptNotesConst VIEWMAPDATA VIEWMAPLAYOUT VW_SPACING_DOUBLE +syn keyword lscriptNotesConst VW_SPACING_ONE_POINT_25 VW_SPACING_ONE_POINT_50 +syn keyword lscriptNotesConst VW_SPACING_ONE_POINT_75 VW_SPACING_SINGLE + +syn keyword lscriptFunction Abs Asc Atn Atn2 ACos ASin +syn keyword lscriptFunction CCur CDat CDbl Chr Chr$ CInt CLng Command Command$ +syn keyword lscriptFunction Cos CSng CStr +syn keyword lscriptFunction CurDir CurDir$ CVar Date Date$ DateNumber DateSerial DateValue +syn keyword lscriptFunction Day Dir Dir$ Environ$ Environ EOF Error Error$ Evaluate Exp +syn keyword lscriptFunction FileAttr FileDateTime FileLen Fix Format Format$ FreeFile +syn keyword lscriptFunction GetFileAttr GetThreadInfo Hex Hex$ Hour +syn keyword lscriptFunction IMESetMode IMEStatus Input Input$ InputB InputB$ +syn keyword lscriptFunction InputBP InputBP$ InputBox InputBox$ InStr InStrB InStrBP InstrC +syn keyword lscriptFunction IsA IsArray IsDate IsElement IsList IsNumeric +syn keyword lscriptFunction IsObject IsResponse IsScalar IsUnknown LCase LCase$ +syn keyword lscriptFunction Left Left$ LeftB LeftB$ LeftC +syn keyword lscriptFunction LeftBP LeftBP$ Len LenB LenBP LenC Loc LOF Log +syn keyword lscriptFunction LSet LTrim LTrim$ MessageBox Mid Mid$ MidB MidB$ MidC +syn keyword lscriptFunction Minute Month Now Oct Oct$ Responses Right Right$ +syn keyword lscriptFunction RightB RightB$ RightBP RightBP$ RightC Round Rnd RSet RTrim RTrim$ +syn keyword lscriptFunction Second Seek Sgn Shell Sin Sleep Space Space$ Spc Sqr Str Str$ +syn keyword lscriptFunction StrConv StrLeft StrleftBack StrRight StrRightBack +syn keyword lscriptFunction StrCompare Tab Tan Time Time$ TimeNumber Timer +syn keyword lscriptFunction TimeValue Trim Trim$ Today TypeName UCase UCase$ +syn keyword lscriptFunction UniversalID Val Weekday Year + +syn keyword lscriptMethods AppendToTextList ArrayAppend ArrayReplace ArrayGetIndex +syn keyword lscriptMethods Append Bind Close +"syn keyword lscriptMethods Contains +syn keyword lscriptMethods CopyToDatabase CopyAllItems Count CurrentDatabase Delete Execute +syn keyword lscriptMethods GetAllDocumentsByKey GetDatabase GetDocumentByKey +syn keyword lscriptMethods GetDocumentByUNID GetFirstDocument GetFirstItem +syn keyword lscriptMethods GetItems GetItemValue GetNthDocument GetView +syn keyword lscriptMethods IsEmpty IsNull %Include Items +syn keyword lscriptMethods Line LBound LoadMsgText Open Print +syn keyword lscriptMethods RaiseEvent ReplaceItemValue Remove RemoveItem Responses +syn keyword lscriptMethods Save Stop UBound UnprocessedDocuments Write + +syn keyword lscriptEvents Compare OnError + +"************************************************************************************* +"These are Notes thingies that I'm not sure how to classify as they had no vb equivalent +" At a wild guess I'd put them as Functions... +" if anyone sees something really out of place... tell me! + +syn keyword lscriptFunction Access Alias Any Bin Bin$ Binary ByVal +syn keyword lscriptFunction CodeLock CodeLockCheck CodeUnlock CreateLock +syn keyword lscriptFunction CurDrive CurDrive$ DataType DestroyLock Eqv +syn keyword lscriptFunction Erl Err Fraction From FromFunction FullTrim +syn keyword lscriptFunction Imp Int Lib Like ListTag LMBCS LSServer Me +syn keyword lscriptFunction Mod MsgDescription MsgText Output Published +syn keyword lscriptFunction Random Read Shared Step UChr UChr$ Uni Unicode +syn keyword lscriptFunction Until Use UseLSX UString UString$ Width Yield + + +syn keyword lscriptTodo contained TODO + +"integer number, or floating point number without a dot. +syn match lscriptNumber "\<\d\+\>" +"floating point number, with dot +syn match lscriptNumber "\<\d\+\.\d*\>" +"floating point number, starting with a dot +syn match lscriptNumber "\.\d\+\>" + +" String and Character constants +syn region lscriptString start=+"+ end=+"+ +syn region lscriptComment start="REM" end="$" contains=lscriptTodo +syn region lscriptComment start="'" end="$" contains=lscriptTodo +syn region lscriptLineNumber start="^\d" end="\s" +syn match lscriptTypeSpecifier "[a-zA-Z0-9][\$%&!#]"ms=s+1 + +" 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_lscript_syntax_inits") + if version < 508 + let did_lscript_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + hi lscriptNotesType term=underline ctermfg=DarkGreen guifg=SeaGreen gui=bold + + HiLink lscriptNotesConst lscriptNotesType + HiLink lscriptLineNumber Comment + HiLink lscriptDatatype Type + HiLink lscriptNumber Number + HiLink lscriptError Error + HiLink lscriptStatement Statement + HiLink lscriptString String + HiLink lscriptComment Comment + HiLink lscriptTodo Todo + HiLink lscriptFunction Identifier + HiLink lscriptMethods PreProc + HiLink lscriptEvents Special + HiLink lscriptTypeSpecifier Type + + delcommand HiLink +endif + +let b:current_syntax = "lscript" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/lsl.vim b/vim/bundle/ubuntu-vim72/syntax/lsl.vim new file mode 100644 index 0000000..3f24816 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/lsl.vim @@ -0,0 +1,272 @@ +" Vim syntax file +" Language: Linden Scripting Language +" Maintainer: Timo Frenay +" Last Change: 2008 Mar 29 + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Initializations +syn case match + +" Keywords +syn keyword lslKeyword default do else for if jump return state while + +" Types +syn keyword lslType float integer key list quaternion rotation string vector + +" Labels +syn match lslLabel +@\h\w*+ display + +" Constants +syn keyword lslConstant +\ ACTIVE AGENT AGENT_ALWAYS_RUN AGENT_ATTACHMENTS AGENT_AWAY AGENT_BUSY +\ AGENT_CROUCHING AGENT_FLYING AGENT_IN_AIR AGENT_MOUSELOOK AGENT_ON_OBJECT +\ AGENT_SCRIPTED AGENT_SITTING AGENT_TYPING AGENT_WALKING ALL_SIDES ANIM_ON +\ ATTACH_BACK ATTACH_BELLY ATTACH_CHEST ATTACH_CHIN ATTACH_HEAD +\ ATTACH_HUD_BOTTOM ATTACH_HUD_BOTTOM_LEFT ATTACH_HUD_BOTTOM_RIGHT +\ ATTACH_HUD_CENTER_1 ATTACH_HUD_CENTER_2 ATTACH_HUD_TOP_CENTER +\ ATTACH_HUD_TOP_LEFT ATTACH_HUD_TOP_RIGHT ATTACH_LEAR ATTACH_LEYE ATTACH_LFOOT +\ ATTACH_LHAND ATTACH_LHIP ATTACH_LLARM ATTACH_LLLEG ATTACH_LPEC +\ ATTACH_LSHOULDER ATTACH_LUARM ATTACH_LULEG ATTACH_MOUTH ATTACH_NOSE +\ ATTACH_PELVIS ATTACH_REAR ATTACH_REYE ATTACH_RFOOT ATTACH_RHAND ATTACH_RHIP +\ ATTACH_RLARM ATTACH_RLLEG ATTACH_RPEC ATTACH_RSHOULDER ATTACH_RUARM +\ ATTACH_RULEG CAMERA_ACTIVE CAMERA_BEHINDNESS_ANGLE CAMERA_BEHINDNESS_LAG +\ CAMERA_DISTANCE CAMERA_FOCUS CAMERA_FOCUS_LAG CAMERA_FOCUS_LOCKED +\ CAMERA_FOCUS_OFFSET CAMERA_FOCUS_THRESHOLD CAMERA_PITCH CAMERA_POSITION +\ CAMERA_POSITION_LAG CAMERA_POSITION_LOCKED CAMERA_POSITION_THRESHOLD +\ CHANGED_ALLOWED_DROP CHANGED_COLOR CHANGED_INVENTORY CHANGED_LINK +\ CHANGED_OWNER CHANGED_REGION CHANGED_SCALE CHANGED_SHAPE CHANGED_TELEPORT +\ CHANGED_TEXTURE CLICK_ACTION_BUY CLICK_ACTION_NONE CLICK_ACTION_OPEN +\ CLICK_ACTION_OPEN_MEDIA CLICK_ACTION_PAY CLICK_ACTION_PLAY CLICK_ACTION_SIT +\ CLICK_ACTION_TOUCH CONTROL_BACK CONTROL_DOWN CONTROL_FWD CONTROL_LBUTTON +\ CONTROL_LEFT CONTROL_ML_LBUTTON CONTROL_RIGHT CONTROL_ROT_LEFT +\ CONTROL_ROT_RIGHT CONTROL_UP DATA_BORN DATA_NAME DATA_ONLINE DATA_PAYINFO +\ DATA_RATING DATA_SIM_POS DATA_SIM_RATING DATA_SIM_STATUS DEBUG_CHANNEL +\ DEG_TO_RAD EOF FALSE HTTP_BODY_MAXLENGTH HTTP_BODY_TRUNCATED HTTP_METHOD +\ HTTP_MIMETYPE HTTP_VERIFY_CERT INVENTORY_ALL INVENTORY_ANIMATION +\ INVENTORY_BODYPART INVENTORY_CLOTHING INVENTORY_GESTURE INVENTORY_LANDMARK +\ INVENTORY_NONE INVENTORY_NOTECARD INVENTORY_OBJECT INVENTORY_SCRIPT +\ INVENTORY_SOUND INVENTORY_TEXTURE LAND_LARGE_BRUSH LAND_LEVEL LAND_LOWER +\ LAND_MEDIUM_BRUSH LAND_NOISE LAND_RAISE LAND_REVERT LAND_SMALL_BRUSH +\ LAND_SMOOTH LINK_ALL_CHILDREN LINK_ALL_OTHERS LINK_ROOT LINK_SET LINK_THIS +\ LIST_STAT_GEOMETRIC_MEAN LIST_STAT_MAX LIST_STAT_MEAN LIST_STAT_MEDIAN +\ LIST_STAT_MIN LIST_STAT_NUM_COUNT LIST_STAT_RANGE LIST_STAT_STD_DEV +\ LIST_STAT_SUM LIST_STAT_SUM_SQUARES LOOP MASK_BASE MASK_EVERYONE MASK_GROUP +\ MASK_NEXT MASK_OWNER NULL_KEY OBJECT_CREATOR OBJECT_DESC OBJECT_GROUP +\ OBJECT_NAME OBJECT_OWNER OBJECT_POS OBJECT_ROT OBJECT_UNKNOWN_DETAIL +\ OBJECT_VELOCITY PARCEL_COUNT_GROUP PARCEL_COUNT_OTHER PARCEL_COUNT_OWNER +\ PARCEL_COUNT_SELECTED PARCEL_COUNT_TEMP PARCEL_COUNT_TOTAL PARCEL_DETAILS_AREA +\ PARCEL_DETAILS_DESC PARCEL_DETAILS_GROUP PARCEL_DETAILS_NAME +\ PARCEL_DETAILS_OWNER PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY +\ PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS PARCEL_FLAG_ALLOW_CREATE_OBJECTS +\ PARCEL_FLAG_ALLOW_DAMAGE PARCEL_FLAG_ALLOW_FLY +\ PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY PARCEL_FLAG_ALLOW_GROUP_SCRIPTS +\ PARCEL_FLAG_ALLOW_LANDMARK PARCEL_FLAG_ALLOW_SCRIPTS +\ PARCEL_FLAG_ALLOW_TERRAFORM PARCEL_FLAG_LOCAL_SOUND_ONLY +\ PARCEL_FLAG_RESTRICT_PUSHOBJECT PARCEL_FLAG_USE_ACCESS_GROUP +\ PARCEL_FLAG_USE_ACCESS_LIST PARCEL_FLAG_USE_BAN_LIST +\ PARCEL_FLAG_USE_LAND_PASS_LIST PARCEL_MEDIA_COMMAND_AGENT +\ PARCEL_MEDIA_COMMAND_AUTO_ALIGN PARCEL_MEDIA_COMMAND_DESC +\ PARCEL_MEDIA_COMMAND_LOOP PARCEL_MEDIA_COMMAND_LOOP_SET +\ PARCEL_MEDIA_COMMAND_PAUSE PARCEL_MEDIA_COMMAND_PLAY PARCEL_MEDIA_COMMAND_SIZE +\ PARCEL_MEDIA_COMMAND_STOP PARCEL_MEDIA_COMMAND_TEXTURE +\ PARCEL_MEDIA_COMMAND_TIME PARCEL_MEDIA_COMMAND_TYPE +\ PARCEL_MEDIA_COMMAND_UNLOAD PARCEL_MEDIA_COMMAND_URL PASSIVE +\ PAYMENT_INFO_ON_FILE PAYMENT_INFO_USED PAY_DEFAULT PAY_HIDE PERM_ALL PERM_COPY +\ PERM_MODIFY PERM_MOVE PERM_TRANSFER PERMISSION_ATTACH PERMISSION_CHANGE_LINKS +\ PERMISSION_CONTROL_CAMERA PERMISSION_DEBIT PERMISSION_TAKE_CONTROLS +\ PERMISSION_TRACK_CAMERA PERMISSION_TRIGGER_ANIMATION PI PI_BY_TWO PING_PONG +\ PRIM_BUMP_BARK PRIM_BUMP_BLOBS PRIM_BUMP_BRICKS PRIM_BUMP_BRIGHT +\ PRIM_BUMP_CHECKER PRIM_BUMP_CONCRETE PRIM_BUMP_DARK PRIM_BUMP_DISKS +\ PRIM_BUMP_GRAVEL PRIM_BUMP_LARGETILE PRIM_BUMP_NONE PRIM_BUMP_SHINY +\ PRIM_BUMP_SIDING PRIM_BUMP_STONE PRIM_BUMP_STUCCO PRIM_BUMP_SUCTION +\ PRIM_BUMP_TILE PRIM_BUMP_WEAVE PRIM_BUMP_WOOD PRIM_CAST_SHADOWS PRIM_COLOR +\ PRIM_FLEXIBLE PRIM_FULLBRIGHT PRIM_HOLE_CIRCLE PRIM_HOLE_DEFAULT +\ PRIM_HOLE_SQUARE PRIM_HOLE_TRIANGLE PRIM_MATERIAL PRIM_MATERIAL_FLESH +\ PRIM_MATERIAL_GLASS PRIM_MATERIAL_LIGHT PRIM_MATERIAL_METAL +\ PRIM_MATERIAL_PLASTIC PRIM_MATERIAL_RUBBER PRIM_MATERIAL_STONE +\ PRIM_MATERIAL_WOOD PRIM_PHANTOM PRIM_PHYSICS PRIM_POINT_LIGHT PRIM_POSITION +\ PRIM_ROTATION PRIM_SCULPT_TYPE_CYLINDER PRIM_SCULPT_TYPE_PLANE +\ PRIM_SCULPT_TYPE_SPHERE PRIM_SCULPT_TYPE_TORUS PRIM_SHINY_HIGH PRIM_SHINY_LOW +\ PRIM_SHINY_MEDIUM PRIM_SHINY_NONE PRIM_SIZE PRIM_TEMP_ON_REZ PRIM_TEXGEN +\ PRIM_TEXGEN_DEFAULT PRIM_TEXGEN_PLANAR PRIM_TEXTURE PRIM_TYPE PRIM_TYPE_BOX +\ PRIM_TYPE_BOX PRIM_TYPE_CYLINDER PRIM_TYPE_CYLINDER PRIM_TYPE_LEGACY +\ PRIM_TYPE_PRISM PRIM_TYPE_PRISM PRIM_TYPE_RING PRIM_TYPE_SCULPT +\ PRIM_TYPE_SPHERE PRIM_TYPE_SPHERE PRIM_TYPE_TORUS PRIM_TYPE_TORUS +\ PRIM_TYPE_TUBE PRIM_TYPE_TUBE PSYS_PART_BEAM_MASK PSYS_PART_BOUNCE_MASK +\ PSYS_PART_DEAD_MASK PSYS_PART_EMISSIVE_MASK PSYS_PART_END_ALPHA +\ PSYS_PART_END_COLOR PSYS_PART_END_SCALE PSYS_PART_FLAGS +\ PSYS_PART_FOLLOW_SRC_MASK PSYS_PART_FOLLOW_VELOCITY_MASK +\ PSYS_PART_INTERP_COLOR_MASK PSYS_PART_INTERP_SCALE_MASK PSYS_PART_MAX_AGE +\ PSYS_PART_RANDOM_ACCEL_MASK PSYS_PART_RANDOM_VEL_MASK PSYS_PART_START_ALPHA +\ PSYS_PART_START_COLOR PSYS_PART_START_SCALE PSYS_PART_TARGET_LINEAR_MASK +\ PSYS_PART_TARGET_POS_MASK PSYS_PART_TRAIL_MASK PSYS_PART_WIND_MASK +\ PSYS_SRC_ACCEL PSYS_SRC_ANGLE_BEGIN PSYS_SRC_ANGLE_END +\ PSYS_SRC_BURST_PART_COUNT PSYS_SRC_BURST_RADIUS PSYS_SRC_BURST_RATE +\ PSYS_SRC_BURST_SPEED_MAX PSYS_SRC_BURST_SPEED_MIN PSYS_SRC_INNERANGLE +\ PSYS_SRC_MAX_AGE PSYS_SRC_OMEGA PSYS_SRC_OUTERANGLE PSYS_SRC_PATTERN +\ PSYS_SRC_PATTERN_ANGLE PSYS_SRC_PATTERN_ANGLE_CONE +\ PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY PSYS_SRC_PATTERN_DROP +\ PSYS_SRC_PATTERN_EXPLODE PSYS_SRC_TARGET_KEY PSYS_SRC_TEXTURE PUBLIC_CHANNEL +\ RAD_TO_DEG REGION_FLAG_ALLOW_DAMAGE REGION_FLAG_ALLOW_DIRECT_TELEPORT +\ REGION_FLAG_BLOCK_FLY REGION_FLAG_BLOCK_TERRAFORM +\ REGION_FLAG_DISABLE_COLLISIONS REGION_FLAG_DISABLE_PHYSICS +\ REGION_FLAG_FIXED_SUN REGION_FLAG_RESTRICT_PUSHOBJECT REGION_FLAG_SANDBOX +\ REMOTE_DATA_CHANNEL REMOTE_DATA_REPLY REMOTE_DATA_REQUEST REVERSE ROTATE SCALE +\ SCRIPTED SMOOTH SQRT2 STATUS_BLOCK_GRAB STATUS_CAST_SHADOWS STATUS_DIE_AT_EDGE +\ STATUS_PHANTOM STATUS_PHYSICS STATUS_RETURN_AT_EDGE STATUS_ROTATE_X +\ STATUS_ROTATE_Y STATUS_ROTATE_Z STATUS_SANDBOX STRING_TRIM STRING_TRIM_HEAD +\ STRING_TRIM_TAIL TRUE TWO_PI TYPE_FLOAT TYPE_INTEGER TYPE_INVALID TYPE_KEY +\ TYPE_ROTATION TYPE_STRING TYPE_VECTOR VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY +\ VEHICLE_ANGULAR_DEFLECTION_TIMESCALE VEHICLE_ANGULAR_FRICTION_TIMESCALE +\ VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE VEHICLE_ANGULAR_MOTOR_DIRECTION +\ VEHICLE_ANGULAR_MOTOR_TIMESCALE VEHICLE_BANKING_EFFICIENCY VEHICLE_BANKING_MIX +\ VEHICLE_BANKING_TIMESCALE VEHICLE_BUOYANCY VEHICLE_FLAG_CAMERA_DECOUPLED +\ VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT VEHICLE_FLAG_HOVER_TERRAIN_ONLY +\ VEHICLE_FLAG_HOVER_UP_ONLY VEHICLE_FLAG_HOVER_WATER_ONLY +\ VEHICLE_FLAG_LIMIT_MOTOR_UP VEHICLE_FLAG_LIMIT_ROLL_ONLY +\ VEHICLE_FLAG_MOUSELOOK_BANK VEHICLE_FLAG_MOUSELOOK_STEER +\ VEHICLE_FLAG_NO_DEFLECTION_UP VEHICLE_HOVER_EFFICIENCY VEHICLE_HOVER_HEIGHT +\ VEHICLE_HOVER_TIMESCALE VEHICLE_LINEAR_DEFLECTION_EFFICIENCY +\ VEHICLE_LINEAR_DEFLECTION_TIMESCALE VEHICLE_LINEAR_FRICTION_TIMESCALE +\ VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE VEHICLE_LINEAR_MOTOR_TIMESCALE +\ VEHICLE_LINEAR_MOTOR_DIRECTION VEHICLE_LINEAR_MOTOR_OFFSET +\ VEHICLE_REFERENCE_FRAME VEHICLE_TYPE_AIRPLANE VEHICLE_TYPE_BALLOON +\ VEHICLE_TYPE_BOAT VEHICLE_TYPE_CAR VEHICLE_TYPE_NONE VEHICLE_TYPE_SLED +\ VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY VEHICLE_VERTICAL_ATTRACTION_TIMESCALE +\ ZERO_ROTATION ZERO_VECTOR + +" Events +syn keyword lslEvent +\ attach at_rot_target at_target changed collision collision_end collision_start +\ control dataserver email http_response land_collision land_collision_end +\ land_collision_start link_message listen money moving_end moving_start +\ not_at_rot_target no_sensor object_rez on_rez remote_data run_time_permissions +\ sensor state_entry state_exit timer touch touch_end touch_start not_at_target + +" Functions +syn keyword lslFunction +\ llAbs llAcos llAddToLandBanList llAddToLandPassList llAdjustSoundVolume +\ llAllowInventoryDrop llAngleBetween llApplyImpulse llApplyRotationalImpulse +\ llAsin llAtan2 llAttachToAvatar llAvatarOnSitTarget llAxes2Rot llAxisAngle2Rot +\ llBase64ToInteger llBase64ToString llBreakAllLinks llBreakLink llCSV2List +\ llCeil llClearCameraParams llCloseRemoteDataChannel llCloud llCollisionFilter +\ llCollisionSound llCollisionSprite llCos llCreateLink llDeleteSubList +\ llDeleteSubString llDetachFromAvatar llDetectedGrab llDetectedGroup +\ llDetectedKey llDetectedLinkNumber llDetectedName llDetectedOwner +\ llDetectedPos llDetectedRot llDetectedType llDetectedVel llDialog llDie +\ llDumpList2String llEdgeOfWorld llEjectFromLand llEmail llEscapeURL +\ llEuler2Rot llFabs llFloor llForceMouselook llFrand llGetAccel llGetAgentInfo +\ llGetAgentSize llGetAlpha llGetAndResetTime llGetAnimation llGetAnimationList +\ llGetAttached llGetBoundingBox llGetCameraPos llGetCameraRot llGetCenterOfMass +\ llGetColor llGetCreator llGetDate llGetEnergy llGetForce llGetFreeMemory +\ llGetGMTclock llGetGeometricCenter llGetInventoryCreator llGetInventoryKey +\ llGetInventoryName llGetInventoryNumber llGetInventoryPermMask +\ llGetInventoryType llGetKey llGetLandOwnerAt llGetLinkKey llGetLinkName +\ llGetLinkNumber llGetListEntryType llGetListLength llGetLocalPos llGetLocalRot +\ llGetMass llGetNextEmail llGetNotecardLine llGetNumberOfNotecardLines +\ llGetNumberOfPrims llGetNumberOfSides llGetObjectDesc llGetObjectDetails +\ llGetObjectMass llGetObjectName llGetObjectPermMask llGetObjectPrimCount +\ llGetOmega llGetOwner llGetOwnerKey llGetParcelDetails llGetParcelFlags +\ llGetParcelMaxPrims llGetParcelPrimCount llGetParcelPrimOwners +\ llGetPermissions llGetPermissionsKey llGetPos llGetPrimitiveParams +\ llGetRegionCorner llGetRegionFPS llGetRegionFlags llGetRegionName +\ llGetRegionTimeDilation llGetRootPosition llGetRootRotation llGetRot +\ llGetScale llGetScriptName llGetScriptState llGetSimulatorHostname +\ llGetStartParameter llGetStatus llGetSubString llGetSunDirection llGetTexture +\ llGetTextureOffset llGetTextureRot llGetTextureScale llGetTime llGetTimeOfDay +\ llGetTimestamp llGetTorque llGetUnixTime llGetVel llGetWallclock +\ llGiveInventory llGiveInventoryList llGiveMoney llGodLikeRezObject llGround +\ llGroundContour llGroundNormal llGroundRepel llGroundSlope llHTTPRequest +\ llInsertString llInstantMessage llIntegerToBase64 llKey2Name llList2CSV +\ llList2Float llList2Integer llList2Key llList2List llList2ListStrided +\ llList2Rot llList2String llList2Vector llListFindList llListInsertList +\ llListRandomize llListReplaceList llListSort llListStatistics llListen +\ llListenControl llListenRemove llLoadURL llLog llLog10 llLookAt llLoopSound +\ llLoopSoundMaster llLoopSoundSlave llMD5String llMakeExplosion llMakeFire +\ llMakeFountain llMakeSmoke llMapDestination llMessageLinked llMinEventDelay +\ llModPow llModifyLand llMoveToTarget llOffsetTexture llOpenRemoteDataChannel +\ llOverMyLand llOwnerSay llParcelMediaCommandList llParcelMediaQuery +\ llParseString2List llParseStringKeepNulls llParticleSystem llPassCollisions +\ llPassTouches llPlaySound llPlaySoundSlave llPointAt llPow llPreloadSound +\ llPushObject llRefreshPrimURL llRegionSay llReleaseCamera llReleaseControls +\ llRemoteDataReply llRemoteDataSetRegion llRemoteLoadScript +\ llRemoteLoadScriptPin llRemoveFromLandBanList llRemoveFromLandPassList +\ llRemoveInventory llRemoveVehicleFlags llRequestAgentData +\ llRequestInventoryData llRequestPermissions llRequestSimulatorData +\ llResetLandBanList llResetLandPassList llResetOtherScript llResetScript +\ llResetTime llRezAtRoot llRezObject llRot2Angle llRot2Axis llRot2Euler +\ llRot2Fwd llRot2Left llRot2Up llRotBetween llRotLookAt llRotTarget +\ llRotTargetRemove llRotateTexture llRound llSameGroup llSay llScaleTexture +\ llScriptDanger llSendRemoteData llSensor llSensorRemove llSensorRepeat +\ llSetAlpha llSetBuoyancy llSetCameraAtOffset llSetCameraEyeOffset +\ llSetCameraParams llSetClickAction llSetColor llSetDamage llSetForce +\ llSetForceAndTorque llSetHoverHeight llSetInventoryPermMask llSetLinkAlpha +\ llSetLinkColor llSetLinkPrimitiveParams llSetLinkTexture llSetLocalRot +\ llSetObjectDesc llSetObjectName llSetObjectPermMask llSetParcelMusicURL +\ llSetPayPrice llSetPos llSetPrimURL llSetPrimitiveParams +\ llSetRemoteScriptAccessPin llSetRot llSetScale llSetScriptState llSetSitText +\ llSetSoundQueueing llSetSoundRadius llSetStatus llSetText llSetTexture +\ llSetTextureAnim llSetTimerEvent llSetTorque llSetTouchText llSetVehicleFlags +\ llSetVehicleFloatParam llSetVehicleRotationParam llSetVehicleType +\ llSetVehicleVectorParam llShout llSin llSitTarget llSleep llSound +\ llSoundPreload llSqrt llStartAnimation llStopAnimation llStopHover +\ llStopLookAt llStopMoveToTarget llStopPointAt llStopSound llStringLength +\ llStringToBase64 llStringTrim llSubStringIndex llTakeCamera llTakeControls +\ llTan llTarget llTargetOmega llTargetRemove llTeleportAgentHome llToLower +\ llToUpper llTriggerSound llTriggerSoundLimited llUnSit llUnescapeURL llVecDist +\ llVecMag llVecNorm llVolumeDetect llWater llWhisper llWind llXorBase64Strings +\ llXorBase64StringsCorrect + +" Operators +syn match lslOperator +[-!%&*+/<=>^|~]+ display + +" Numbers +syn match lslNumber +-\=\%(\<\d\+\|\%(\<\d\+\)\=\.\d\+\)\%([Ee][-+]\=\d\+\)\=\>\|\<0x\x\+\>+ display + +" Vectors and rotations +syn match lslVectorRot +<[-\t +.0-9A-Za-z_]\+\%(,[-\t +.0-9A-Za-z_]\+\)\{2,3}>+ contains=lslNumber display + +" Vector and rotation properties +syn match lslProperty +\.\@<=[sxyz]\>+ display + +" Strings +syn region lslString start=+"+ skip=+\\.+ end=+"+ contains=lslSpecialChar,@Spell +syn match lslSpecialChar +\\.+ contained display + +" Keys +syn match lslKey +"\x\{8}-\x\{4}-\x\{4}-\x\{4}-\x\{12}"+ display + +" Parentheses, braces and brackets +syn match lslBlock +[][(){}]+ display + +" Typecast operators +syn match lslTypecast +(\%(float\|integer\|key\|list\|quaternion\|rotation\|string\|vector\))+ contains=lslType display + +" Comments +syn match lslComment +//.*+ contains=@Spell + +" Define the default highlighting. +hi def link lslKeyword Keyword +hi def link lslType Type +hi def link lslLabel Label +hi def link lslConstant Constant +hi def link lslEvent PreProc +hi def link lslFunction Function +hi def link lslOperator Operator +hi def link lslNumber Number +hi def link lslVectorRot Special +hi def link lslProperty Identifier +hi def link lslString String +hi def link lslSpecialChar SpecialChar +hi def link lslKey Special +hi def link lslBlock Special +hi def link lslTypecast Operator +hi def link lslComment Comment + +let b:current_syntax = "lsl" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/lss.vim b/vim/bundle/ubuntu-vim72/syntax/lss.vim new file mode 100644 index 0000000..6620707 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/lss.vim @@ -0,0 +1,133 @@ +" Vim syntax file +" Language: Lynx 2.7.1 style file +" Maintainer: Scott Bigham +" Last Change: 2004 Oct 06 + +" 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 + +" This setup is probably atypical for a syntax highlighting file, because +" most of it is not really intended to be overrideable. Instead, the +" highlighting is supposed to correspond to the highlighting specified by +" the .lss file entries themselves; ie. the "bold" keyword should be bold, +" the "red" keyword should be red, and so forth. The exceptions to this +" are comments, of course, and the initial keyword identifying the affected +" element, which will inherit the usual Identifier highlighting. + +syn match lssElement "^[^:]\+" nextgroup=lssMono + +syn match lssMono ":[^:]\+" contained nextgroup=lssFgColor contains=lssReverse,lssUnderline,lssBold,lssStandout + +syn keyword lssBold bold contained +syn keyword lssReverse reverse contained +syn keyword lssUnderline underline contained +syn keyword lssStandout standout contained + +syn match lssFgColor ":[^:]\+" contained nextgroup=lssBgColor contains=lssRedFg,lssBlueFg,lssGreenFg,lssBrownFg,lssMagentaFg,lssCyanFg,lssLightgrayFg,lssGrayFg,lssBrightredFg,lssBrightgreenFg,lssYellowFg,lssBrightblueFg,lssBrightmagentaFg,lssBrightcyanFg + +syn case ignore +syn keyword lssRedFg red contained +syn keyword lssBlueFg blue contained +syn keyword lssGreenFg green contained +syn keyword lssBrownFg brown contained +syn keyword lssMagentaFg magenta contained +syn keyword lssCyanFg cyan contained +syn keyword lssLightgrayFg lightgray contained +syn keyword lssGrayFg gray contained +syn keyword lssBrightredFg brightred contained +syn keyword lssBrightgreenFg brightgreen contained +syn keyword lssYellowFg yellow contained +syn keyword lssBrightblueFg brightblue contained +syn keyword lssBrightmagentaFg brightmagenta contained +syn keyword lssBrightcyanFg brightcyan contained +syn case match + +syn match lssBgColor ":[^:]\+" contained contains=lssRedBg,lssBlueBg,lssGreenBg,lssBrownBg,lssMagentaBg,lssCyanBg,lssLightgrayBg,lssGrayBg,lssBrightredBg,lssBrightgreenBg,lssYellowBg,lssBrightblueBg,lssBrightmagentaBg,lssBrightcyanBg,lssWhiteBg + +syn case ignore +syn keyword lssRedBg red contained +syn keyword lssBlueBg blue contained +syn keyword lssGreenBg green contained +syn keyword lssBrownBg brown contained +syn keyword lssMagentaBg magenta contained +syn keyword lssCyanBg cyan contained +syn keyword lssLightgrayBg lightgray contained +syn keyword lssGrayBg gray contained +syn keyword lssBrightredBg brightred contained +syn keyword lssBrightgreenBg brightgreen contained +syn keyword lssYellowBg yellow contained +syn keyword lssBrightblueBg brightblue contained +syn keyword lssBrightmagentaBg brightmagenta contained +syn keyword lssBrightcyanBg brightcyan contained +syn keyword lssWhiteBg white contained +syn case match + +syn match lssComment "#.*$" + +" 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_lss_syntax_inits") + if version < 508 + let did_lss_syntax_inits = 1 + endif + + hi def link lssComment Comment + hi def link lssElement Identifier + + hi def lssBold term=bold cterm=bold + hi def lssReverse term=reverse cterm=reverse + hi def lssUnderline term=underline cterm=underline + hi def lssStandout term=standout cterm=standout + + hi def lssRedFg ctermfg=red + hi def lssBlueFg ctermfg=blue + hi def lssGreenFg ctermfg=green + hi def lssBrownFg ctermfg=brown + hi def lssMagentaFg ctermfg=magenta + hi def lssCyanFg ctermfg=cyan + hi def lssGrayFg ctermfg=gray + if $COLORTERM == "rxvt" + " On rxvt's, bright colors are activated by setting the bold attribute. + hi def lssLightgrayFg ctermfg=gray cterm=bold + hi def lssBrightredFg ctermfg=red cterm=bold + hi def lssBrightgreenFg ctermfg=green cterm=bold + hi def lssYellowFg ctermfg=yellow cterm=bold + hi def lssBrightblueFg ctermfg=blue cterm=bold + hi def lssBrightmagentaFg ctermfg=magenta cterm=bold + hi def lssBrightcyanFg ctermfg=cyan cterm=bold + else + hi def lssLightgrayFg ctermfg=lightgray + hi def lssBrightredFg ctermfg=lightred + hi def lssBrightgreenFg ctermfg=lightgreen + hi def lssYellowFg ctermfg=yellow + hi def lssBrightblueFg ctermfg=lightblue + hi def lssBrightmagentaFg ctermfg=lightmagenta + hi def lssBrightcyanFg ctermfg=lightcyan + endif + + hi def lssRedBg ctermbg=red + hi def lssBlueBg ctermbg=blue + hi def lssGreenBg ctermbg=green + hi def lssBrownBg ctermbg=brown + hi def lssMagentaBg ctermbg=magenta + hi def lssCyanBg ctermbg=cyan + hi def lssLightgrayBg ctermbg=lightgray + hi def lssGrayBg ctermbg=gray + hi def lssBrightredBg ctermbg=lightred + hi def lssBrightgreenBg ctermbg=lightgreen + hi def lssYellowBg ctermbg=yellow + hi def lssBrightblueBg ctermbg=lightblue + hi def lssBrightmagentaBg ctermbg=lightmagenta + hi def lssBrightcyanBg ctermbg=lightcyan + hi def lssWhiteBg ctermbg=white ctermfg=black +endif + +let b:current_syntax = "lss" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/lua.vim b/vim/bundle/ubuntu-vim72/syntax/lua.vim new file mode 100644 index 0000000..c40c628 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/lua.vim @@ -0,0 +1,304 @@ +" Vim syntax file +" Language: Lua 4.0, Lua 5.0 and Lua 5.1 +" Maintainer: Marcus Aurelius Farias +" First Author: Carlos Augusto Teixeira Mendes +" Last Change: 2006 Aug 10 +" Options: lua_version = 4 or 5 +" lua_subversion = 0 (4.0, 5.0) or 1 (5.1) +" default 5.1 + +" 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 + +if !exists("lua_version") + " Default is lua 5.1 + let lua_version = 5 + let lua_subversion = 1 +elseif !exists("lua_subversion") + " lua_version exists, but lua_subversion doesn't. So, set it to 0 + let lua_subversion = 0 +endif + +syn case match + +" syncing method +syn sync minlines=100 + +" Comments +syn keyword luaTodo contained TODO FIXME XXX +syn match luaComment "--.*$" contains=luaTodo,@Spell +if lua_version == 5 && lua_subversion == 0 + syn region luaComment matchgroup=luaComment start="--\[\[" end="\]\]" contains=luaTodo,luaInnerComment,@Spell + syn region luaInnerComment contained transparent start="\[\[" end="\]\]" +elseif lua_version > 5 || (lua_version == 5 && lua_subversion >= 1) + " Comments in Lua 5.1: --[[ ... ]], [=[ ... ]=], [===[ ... ]===], etc. + syn region luaComment matchgroup=luaComment start="--\[\z(=*\)\[" end="\]\z1\]" contains=luaTodo,@Spell +endif + +" First line may start with #! +syn match luaComment "\%^#!.*" + +" catch errors caused by wrong parenthesis and wrong curly brackets or +" keywords placed outside their respective blocks + +syn region luaParen transparent start='(' end=')' contains=ALLBUT,luaError,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaCondStart,luaBlock,luaRepeatBlock,luaRepeat,luaStatement +syn match luaError ")" +syn match luaError "}" +syn match luaError "\<\%(end\|else\|elseif\|then\|until\|in\)\>" + +" Function declaration +syn region luaFunctionBlock transparent matchgroup=luaFunction start="\" end="\" contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaRepeat + +" if then else elseif end +syn keyword luaCond contained else + +" then ... end +syn region luaCondEnd contained transparent matchgroup=luaCond start="\" end="\" contains=ALLBUT,luaTodo,luaSpecial,luaRepeat + +" elseif ... then +syn region luaCondElseif contained transparent matchgroup=luaCond start="\" end="\" contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaRepeat + +" if ... then +syn region luaCondStart transparent matchgroup=luaCond start="\" end="\"me=e-4 contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaRepeat nextgroup=luaCondEnd skipwhite skipempty + +" do ... end +syn region luaBlock transparent matchgroup=luaStatement start="\" end="\" contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaRepeat + +" repeat ... until +syn region luaRepeatBlock transparent matchgroup=luaRepeat start="\" end="\" contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaRepeat + +" while ... do +syn region luaRepeatBlock transparent matchgroup=luaRepeat start="\" end="\"me=e-2 contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaRepeat nextgroup=luaBlock skipwhite skipempty + +" for ... do and for ... in ... do +syn region luaRepeatBlock transparent matchgroup=luaRepeat start="\" end="\"me=e-2 contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd nextgroup=luaBlock skipwhite skipempty + +" Following 'else' example. This is another item to those +" contains=ALLBUT,... because only the 'for' luaRepeatBlock contains it. +syn keyword luaRepeat contained in + +" other keywords +syn keyword luaStatement return local break +syn keyword luaOperator and or not +syn keyword luaConstant nil +if lua_version > 4 + syn keyword luaConstant true false +endif + +" Strings +if lua_version < 5 + syn match luaSpecial contained "\\[\\abfnrtv\'\"]\|\\\d\{,3}" +elseif lua_version == 5 && lua_subversion == 0 + syn match luaSpecial contained "\\[\\abfnrtv\'\"[\]]\|\\\d\{,3}" + syn region luaString2 matchgroup=luaString start=+\[\[+ end=+\]\]+ contains=luaString2,@Spell +elseif lua_version > 5 || (lua_version == 5 && lua_subversion >= 1) + syn match luaSpecial contained "\\[\\abfnrtv\'\"]\|\\\d\{,3}" + syn region luaString2 matchgroup=luaString start="\[\z(=*\)\[" end="\]\z1\]" contains=@Spell +endif +syn region luaString start=+'+ end=+'+ skip=+\\\\\|\\'+ contains=luaSpecial,@Spell +syn region luaString start=+"+ end=+"+ skip=+\\\\\|\\"+ contains=luaSpecial,@Spell + +" integer number +syn match luaNumber "\<\d\+\>" +" floating point number, with dot, optional exponent +syn match luaFloat "\<\d\+\.\d*\%(e[-+]\=\d\+\)\=\>" +" floating point number, starting with a dot, optional exponent +syn match luaFloat "\.\d\+\%(e[-+]\=\d\+\)\=\>" +" floating point number, without dot, with exponent +syn match luaFloat "\<\d\+e[-+]\=\d\+\>" + +" hex numbers +if lua_version > 5 || (lua_version == 5 && lua_subversion >= 1) + syn match luaNumber "\<0x\x\+\>" +endif + +" tables +syn region luaTableBlock transparent matchgroup=luaTable start="{" end="}" contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaCondStart,luaBlock,luaRepeatBlock,luaRepeat,luaStatement + +syn keyword luaFunc assert collectgarbage dofile error next +syn keyword luaFunc print rawget rawset tonumber tostring type _VERSION + +if lua_version == 4 + syn keyword luaFunc _ALERT _ERRORMESSAGE gcinfo + syn keyword luaFunc call copytagmethods dostring + syn keyword luaFunc foreach foreachi getglobal getn + syn keyword luaFunc gettagmethod globals newtag + syn keyword luaFunc setglobal settag settagmethod sort + syn keyword luaFunc tag tinsert tremove + syn keyword luaFunc _INPUT _OUTPUT _STDIN _STDOUT _STDERR + syn keyword luaFunc openfile closefile flush seek + syn keyword luaFunc setlocale execute remove rename tmpname + syn keyword luaFunc getenv date clock exit + syn keyword luaFunc readfrom writeto appendto read write + syn keyword luaFunc PI abs sin cos tan asin + syn keyword luaFunc acos atan atan2 ceil floor + syn keyword luaFunc mod frexp ldexp sqrt min max log + syn keyword luaFunc log10 exp deg rad random + syn keyword luaFunc randomseed strlen strsub strlower strupper + syn keyword luaFunc strchar strrep ascii strbyte + syn keyword luaFunc format strfind gsub + syn keyword luaFunc getinfo getlocal setlocal setcallhook setlinehook +elseif lua_version == 5 + " Not sure if all these functions need to be highlighted... + syn keyword luaFunc _G getfenv getmetatable ipairs loadfile + syn keyword luaFunc loadstring pairs pcall rawequal + syn keyword luaFunc require setfenv setmetatable unpack xpcall + if lua_subversion == 0 + syn keyword luaFunc gcinfo loadlib LUA_PATH _LOADED _REQUIREDNAME + elseif lua_subversion == 1 + syn keyword luaFunc load module select + syn match luaFunc /package\.cpath/ + syn match luaFunc /package\.loaded/ + syn match luaFunc /package\.loadlib/ + syn match luaFunc /package\.path/ + syn match luaFunc /package\.preload/ + syn match luaFunc /package\.seeall/ + syn match luaFunc /coroutine\.running/ + endif + syn match luaFunc /coroutine\.create/ + syn match luaFunc /coroutine\.resume/ + syn match luaFunc /coroutine\.status/ + syn match luaFunc /coroutine\.wrap/ + syn match luaFunc /coroutine\.yield/ + syn match luaFunc /string\.byte/ + syn match luaFunc /string\.char/ + syn match luaFunc /string\.dump/ + syn match luaFunc /string\.find/ + syn match luaFunc /string\.len/ + syn match luaFunc /string\.lower/ + syn match luaFunc /string\.rep/ + syn match luaFunc /string\.sub/ + syn match luaFunc /string\.upper/ + syn match luaFunc /string\.format/ + syn match luaFunc /string\.gsub/ + if lua_subversion == 0 + syn match luaFunc /string\.gfind/ + syn match luaFunc /table\.getn/ + syn match luaFunc /table\.setn/ + syn match luaFunc /table\.foreach/ + syn match luaFunc /table\.foreachi/ + elseif lua_subversion == 1 + syn match luaFunc /string\.gmatch/ + syn match luaFunc /string\.match/ + syn match luaFunc /string\.reverse/ + syn match luaFunc /table\.maxn/ + endif + syn match luaFunc /table\.concat/ + syn match luaFunc /table\.sort/ + syn match luaFunc /table\.insert/ + syn match luaFunc /table\.remove/ + syn match luaFunc /math\.abs/ + syn match luaFunc /math\.acos/ + syn match luaFunc /math\.asin/ + syn match luaFunc /math\.atan/ + syn match luaFunc /math\.atan2/ + syn match luaFunc /math\.ceil/ + syn match luaFunc /math\.sin/ + syn match luaFunc /math\.cos/ + syn match luaFunc /math\.tan/ + syn match luaFunc /math\.deg/ + syn match luaFunc /math\.exp/ + syn match luaFunc /math\.floor/ + syn match luaFunc /math\.log/ + syn match luaFunc /math\.log10/ + syn match luaFunc /math\.max/ + syn match luaFunc /math\.min/ + if lua_subversion == 0 + syn match luaFunc /math\.mod/ + elseif lua_subversion == 1 + syn match luaFunc /math\.fmod/ + syn match luaFunc /math\.modf/ + syn match luaFunc /math\.cosh/ + syn match luaFunc /math\.sinh/ + syn match luaFunc /math\.tanh/ + endif + syn match luaFunc /math\.pow/ + syn match luaFunc /math\.rad/ + syn match luaFunc /math\.sqrt/ + syn match luaFunc /math\.frexp/ + syn match luaFunc /math\.ldexp/ + syn match luaFunc /math\.random/ + syn match luaFunc /math\.randomseed/ + syn match luaFunc /math\.pi/ + syn match luaFunc /io\.stdin/ + syn match luaFunc /io\.stdout/ + syn match luaFunc /io\.stderr/ + syn match luaFunc /io\.close/ + syn match luaFunc /io\.flush/ + syn match luaFunc /io\.input/ + syn match luaFunc /io\.lines/ + syn match luaFunc /io\.open/ + syn match luaFunc /io\.output/ + syn match luaFunc /io\.popen/ + syn match luaFunc /io\.read/ + syn match luaFunc /io\.tmpfile/ + syn match luaFunc /io\.type/ + syn match luaFunc /io\.write/ + syn match luaFunc /os\.clock/ + syn match luaFunc /os\.date/ + syn match luaFunc /os\.difftime/ + syn match luaFunc /os\.execute/ + syn match luaFunc /os\.exit/ + syn match luaFunc /os\.getenv/ + syn match luaFunc /os\.remove/ + syn match luaFunc /os\.rename/ + syn match luaFunc /os\.setlocale/ + syn match luaFunc /os\.time/ + syn match luaFunc /os\.tmpname/ + syn match luaFunc /debug\.debug/ + syn match luaFunc /debug\.gethook/ + syn match luaFunc /debug\.getinfo/ + syn match luaFunc /debug\.getlocal/ + syn match luaFunc /debug\.getupvalue/ + syn match luaFunc /debug\.setlocal/ + syn match luaFunc /debug\.setupvalue/ + syn match luaFunc /debug\.sethook/ + syn match luaFunc /debug\.traceback/ + if lua_subversion == 1 + syn match luaFunc /debug\.getfenv/ + syn match luaFunc /debug\.getmetatable/ + syn match luaFunc /debug\.getregistry/ + syn match luaFunc /debug\.setfenv/ + syn match luaFunc /debug\.setmetatable/ + endif +endif + +" 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_lua_syntax_inits") + if version < 508 + let did_lua_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink luaStatement Statement + HiLink luaRepeat Repeat + HiLink luaString String + HiLink luaString2 String + HiLink luaNumber Number + HiLink luaFloat Float + HiLink luaOperator Operator + HiLink luaConstant Constant + HiLink luaCond Conditional + HiLink luaFunction Function + HiLink luaComment Comment + HiLink luaTodo Todo + HiLink luaTable Structure + HiLink luaError Error + HiLink luaSpecial SpecialChar + HiLink luaFunc Identifier + + delcommand HiLink +endif + +let b:current_syntax = "lua" + +" vim: et ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/lynx.vim b/vim/bundle/ubuntu-vim72/syntax/lynx.vim new file mode 100644 index 0000000..2e37ff6 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/lynx.vim @@ -0,0 +1,94 @@ +" Vim syntax file +" Language: Lynx configuration file (lynx.cfg) +" Maintainer: Doug Kearns +" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/lynx.vim +" Last Change: 2007 Mar 20 + +" Lynx 2.8.5 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn match lynxLeadingWS "^\s*" transparent nextgroup=lynxOption + +syn match lynxComment "\(^\|\s\+\)#.*$" contains=lynxTodo + +syn keyword lynxTodo TODO NOTE FIXME XXX contained + +syn match lynxDelimiter ":" contained nextgroup=lynxBoolean,lynxNumber + +syn case ignore +syn keyword lynxBoolean TRUE FALSE contained +syn case match + +syn match lynxNumber "-\=\<\d\+\>" contained + +syn case ignore +syn keyword lynxOption ACCEPT_ALL_COOKIES ALERTSECS ALWAYS_RESUBMIT_POSTS ALWAYS_TRUSTED_EXEC ASSUME_CHARSET + \ ASSUMED_COLOR ASSUMED_DOC_CHARSET_CHOICE ASSUME_LOCAL_CHARSET ASSUME_UNREC_CHARSET AUTO_UNCACHE_DIRLISTS + \ BIBP_BIBHOST BIBP_GLOBAL_SERVER BLOCK_MULTI_BOOKMARKS BOLD_H1 BOLD_HEADERS + \ BOLD_NAME_ANCHORS CASE_SENSITIVE_ALWAYS_ON CHARACTER_SET CHARSETS_DIRECTORY CHARSET_SWITCH_RULES + \ CHECKMAIL COLLAPSE_BR_TAGS COLOR CONNECT_TIMEOUT COOKIE_ACCEPT_DOMAINS + \ COOKIE_FILE COOKIE_LOOSE_INVALID_DOMAINS COOKIE_QUERY_INVALID_DOMAINS COOKIE_REJECT_DOMAINS COOKIE_SAVE_FILE + \ COOKIE_STRICT_INVALID_DOMAINS CSO_PROXY CSWING_PATH DEBUGSECS DEFAULT_BOOKMARK_FILE + \ DEFAULT_CACHE_SIZE DEFAULT_EDITOR DEFAULT_INDEX_FILE DEFAULT_KEYPAD_MODE DEFAULT_KEYPAD_MODE_IS_NUMBERS_AS_ARROWS + \ DEFAULT_USER_MODE DEFAULT_VIRTUAL_MEMORY_SIZE DIRED_MENU DISPLAY_CHARSET_CHOICE DOWNLOADER + \ EMACS_KEYS_ALWAYS_ON ENABLE_LYNXRC ENABLE_SCROLLBACK EXTERNAL FINGER_PROXY + \ FOCUS_WINDOW FORCE_8BIT_TOUPPER FORCE_COOKIE_PROMPT FORCE_EMPTY_HREFLESS_A FORCE_SSL_COOKIES_SECURE + \ FORCE_SSL_PROMPT FORMS_OPTIONS FTP_PASSIVE FTP_PROXY GLOBAL_EXTENSION_MAP + \ GLOBAL_MAILCAP GOPHER_PROXY GOTOBUFFER HELPFILE HIDDEN_LINK_MARKER + \ HISTORICAL_COMMENTS HTMLSRC_ATTRNAME_XFORM HTMLSRC_TAGNAME_XFORM HTTP_PROXY HTTPS_PROXY + \ INCLUDE INFOSECS JUMPBUFFER JUMPFILE JUMP_PROMPT + \ JUSTIFY JUSTIFY_MAX_VOID_PERCENT KEYBOARD_LAYOUT KEYMAP LEFTARROW_IN_TEXTFIELD_PROMPT + \ LIST_FORMAT LIST_NEWS_DATES LIST_NEWS_NUMBERS LOCAL_DOMAIN LOCALE_CHARSET + \ LOCAL_EXECUTION_LINKS_ALWAYS_ON LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE LOCALHOST_ALIAS LYNXCGI_DOCUMENT_ROOT LYNXCGI_ENVIRONMENT + \ LYNX_HOST_NAME LYNX_SIG_FILE MAIL_ADRS MAIL_SYSTEM_ERROR_LOGGING MAKE_LINKS_FOR_ALL_IMAGES + \ MAKE_PSEUDO_ALTS_FOR_INLINES MESSAGESECS MINIMAL_COMMENTS MULTI_BOOKMARK_SUPPORT NCR_IN_BOOKMARKS + \ NEWS_CHUNK_SIZE NEWS_MAX_CHUNK NEWS_POSTING NEWSPOST_PROXY NEWS_PROXY + \ NEWSREPLY_PROXY NNTP_PROXY NNTPSERVER NO_DOT_FILES NO_FILE_REFERER + \ NO_FORCED_CORE_DUMP NO_FROM_HEADER NO_ISMAP_IF_USEMAP NONRESTARTING_SIGWINCH NO_PROXY + \ NO_REFERER_HEADER NO_TABLE_CENTER NUMBER_FIELDS_ON_LEFT NUMBER_LINKS_ON_LEFT OUTGOING_MAIL_CHARSET + \ PARTIAL PARTIAL_THRES PERSISTENT_COOKIES PERSONAL_EXTENSION_MAP PERSONAL_MAILCAP + \ PREFERRED_CHARSET PREFERRED_LANGUAGE PREPEND_BASE_TO_SOURCE PREPEND_CHARSET_TO_SOURCE PRETTYSRC + \ PRETTYSRC_SPEC PRETTYSRC_VIEW_NO_ANCHOR_NUMBERING PRINTER QUIT_DEFAULT_YES REFERER_WITH_QUERY + \ REPLAYSECS REUSE_TEMPFILES RULE RULESFILE SAVE_SPACE + \ SCAN_FOR_BURIED_NEWS_REFS SCREEN_SIZE SCROLLBAR SCROLLBAR_ARROW SEEK_FRAG_AREA_IN_CUR + \ SEEK_FRAG_MAP_IN_CUR SET_COOKIES SHOW_CURSOR SHOW_KB_NAME SHOW_KB_RATE + \ SNEWSPOST_PROXY SNEWS_PROXY SNEWSREPLY_PROXY SOFT_DQUOTES SOURCE_CACHE + \ SOURCE_CACHE_FOR_ABORTED STARTFILE STRIP_DOTDOT_URLS SUBSTITUTE_UNDERSCORES SUFFIX + \ SUFFIX_ORDER SYSTEM_EDITOR SYSTEM_MAIL SYSTEM_MAIL_FLAGS TAGSOUP + \ TEXTFIELDS_NEED_ACTIVATION TIMEOUT TRIM_INPUT_FIELDS TRUSTED_EXEC TRUSTED_LYNXCGI + \ UNDERLINE_LINKS UPLOADER URL_DOMAIN_PREFIXES URL_DOMAIN_SUFFIXES USE_FIXED_RECORDS + \ USE_MOUSE USE_SELECT_POPUPS VERBOSE_IMAGES VIEWER VI_KEYS_ALWAYS_ON + \ WAIS_PROXY XLOADIMAGE_COMMAND contained nextgroup=lynxDelimiter +syn keyword lynxOption BZIP2_PATH CHMOD_PATH COMPRESS_PATH COPY_PATH GZIP_PATH + \ INSTALL_PATH MKDIR_PATH MV_PATH RLOGIN_PATH RMDIR_PATH + \ RM_PATH TAR_PATH TELNET_PATH TN3270_PATH TOUCH_PATH + \ UNCOMPRESS_PATH UNZIP_PATH UUDECODE_PATH ZCAT_PATH ZIP_PATH contained nextgroup=lynxDelimiter +syn case match + +" NOTE: set this if you want the cfg2html.pl formatting directives to be highlighted +if exists("lynx_formatting_directives") + syn match lynxFormatDir "^\.\(h1\|h2\)\s.*$" + syn match lynxFormatDir "^\.\(ex\|nf\)\(\s\+\d\+\)\=$" + syn match lynxFormatDir "^\.fi$" +endif + +hi def link lynxBoolean Boolean +hi def link lynxComment Comment +hi def link lynxDelimiter Special +hi def link lynxFormatDir Special +hi def link lynxNumber Number +hi def link lynxOption Identifier +hi def link lynxTodo Todo + +let b:current_syntax = "lynx" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/m4.vim b/vim/bundle/ubuntu-vim72/syntax/m4.vim new file mode 100644 index 0000000..ba7a294 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/m4.vim @@ -0,0 +1,73 @@ +" Vim syntax file +" Language: M4 +" Maintainer: Claudio Fleiner (claudio@fleiner.com) +" URL: http://www.fleiner.com/vim/syntax/m4.vim +" Last Change: 2005 Jan 15 + +" This file will highlight user function calls if they use only +" capital letters and have at least one argument (i.e. the '(' +" must be there). Let me know if this is a problem. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if !exists("main_syntax") + if version < 600 + syntax clear + elseif exists("b:current_syntax") + finish +endif +" we define it here so that included files can test for it + let main_syntax='m4' +endif + +" define the m4 syntax +syn match m4Variable contained "\$\d\+" +syn match m4Special contained "$[@*#]" +syn match m4Comment "\<\(m4_\)\=dnl\>.*" contains=SpellErrors +syn match m4Constants "\<\(m4_\)\=__file__" +syn match m4Constants "\<\(m4_\)\=__line__" +syn keyword m4Constants divnum sysval m4_divnum m4_sysval +syn region m4Paren matchgroup=m4Delimiter start="(" end=")" contained contains=@m4Top +syn region m4Command matchgroup=m4Function start="\<\(m4_\)\=\(define\|defn\|pushdef\)(" end=")" contains=@m4Top +syn region m4Command matchgroup=m4Preproc start="\<\(m4_\)\=\(include\|sinclude\)("he=e-1 end=")" contains=@m4Top +syn region m4Command matchgroup=m4Statement start="\<\(m4_\)\=\(syscmd\|esyscmd\|ifdef\|ifelse\|indir\|builtin\|shift\|errprint\|m4exit\|changecom\|changequote\|changeword\|m4wrap\|debugfile\|divert\|undivert\)("he=e-1 end=")" contains=@m4Top +syn region m4Command matchgroup=m4builtin start="\<\(m4_\)\=\(len\|index\|regexp\|substr\|translit\|patsubst\|format\|incr\|decr\|eval\|maketemp\)("he=e-1 end=")" contains=@m4Top +syn keyword m4Statement divert undivert +syn region m4Command matchgroup=m4Type start="\<\(m4_\)\=\(undefine\|popdef\)("he=e-1 end=")" contains=@m4Top +syn region m4Function matchgroup=m4Type start="\<[_A-Z][_A-Z0-9]*("he=e-1 end=")" contains=@m4Top +syn region m4String start="`" end="'" contained contains=@m4Top,@m4StringContents,SpellErrors +syn cluster m4Top contains=m4Comment,m4Constants,m4Special,m4Variable,m4String,m4Paren,m4Command,m4Statement,m4Function + +" 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_m4_syn_inits") + if version < 508 + let did_m4_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + HiLink m4Delimiter Delimiter + HiLink m4Comment Comment + HiLink m4Function Function + HiLink m4Keyword Keyword + HiLink m4Special Special + HiLink m4String String + HiLink m4Statement Statement + HiLink m4Preproc PreProc + HiLink m4Type Type + HiLink m4Special Special + HiLink m4Variable Special + HiLink m4Constants Constant + HiLink m4Builtin Statement + delcommand HiLink +endif + +let b:current_syntax = "m4" + +if main_syntax == 'm4' + unlet main_syntax +endif + +" vim: ts=4 diff --git a/vim/bundle/ubuntu-vim72/syntax/mail.vim b/vim/bundle/ubuntu-vim72/syntax/mail.vim new file mode 100644 index 0000000..c89d2de --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/mail.vim @@ -0,0 +1,106 @@ +" Vim syntax file +" Language: Mail file +" Previous Maintainer: Felix von Leitner +" Maintainer: Gautam Iyer +" Last Change: Thu 06 Nov 2008 10:10:55 PM PST + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" The mail header is recognized starting with a "keyword:" line and ending +" with an empty line or other line that can't be in the header. All lines of +" the header are highlighted. Headers of quoted messages (quoted with >) are +" also highlighted. + +" Syntax clusters +syn cluster mailHeaderFields contains=mailHeaderKey,mailSubject,mailHeaderEmail,@mailLinks +syn cluster mailLinks contains=mailURL,mailEmail +syn cluster mailQuoteExps contains=mailQuoteExp1,mailQuoteExp2,mailQuoteExp3,mailQuoteExp4,mailQuoteExp5,mailQuoteExp6 + +syn case match +" For "From " matching case is required. The "From " is not matched in quoted +" emails +" According to RFC 2822 any printable ASCII character can appear in a field +" name, except ':'. +syn region mailHeader contains=@mailHeaderFields,@NoSpell start="^From .*\d\d\d\d$" skip="^\s" end="\v^[!-9;-~]*([^!-~]|$)"me=s-1 fold +syn match mailHeaderKey contained contains=mailEmail,@NoSpell "^From\s.*\d\d\d\d$" + +" Nothing else depends on case. +syn case ignore + +" Headers in properly quoted (with "> " or ">") emails are matched +syn region mailHeader keepend contains=@mailHeaderFields,@mailQuoteExps,@NoSpell start="^\z(\(> \?\)*\)\v(newsgroups|x-([a-z\-])*|path|xref|message-id|from|((in-)?reply-)?to|b?cc|subject|return-path|received|date|replied):" skip="^\z1\s" end="\v^\z1[!-9;-~]*([^!-~]|$)"me=s-1 end="\v^\z1@!"me=s-1 end="\v^\z1(\> ?)+"me=s-1 fold + +" Usenet headers +syn match mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@NoSpell "\v(^(\> ?)*)@<=(Newsgroups|Followup-To|Message-ID|Supersedes|Control):.*$" + + +syn region mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@mailQuoteExps,@NoSpell start="\v(^(\> ?)*)@<=(to|b?cc):" skip=",$" end="$" +syn match mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@NoSpell "\v(^(\> ?)*)@<=(from|reply-to):.*$" fold +syn match mailHeaderKey contained contains=@NoSpell "\v(^(\> ?)*)@<=date:" +syn match mailSubject contained "\v^subject:.*$" fold +syn match mailSubject contained contains=@NoSpell "\v(^(\> ?)+)@<=subject:.*$" + +" Anything in the header between < and > is an email address +syn match mailHeaderEmail contained contains=@NoSpell "<.\{-}>" + +" Mail Signatures. (Begin with "-- ", end with change in quote level) +syn region mailSignature keepend contains=@mailLinks,@mailQuoteExps start="^--\s$" end="^$" end="^\(> \?\)\+"me=s-1 fold +syn region mailSignature keepend contains=@mailLinks,@mailQuoteExps,@NoSpell start="^\z(\(> \?\)\+\)--\s$" end="^\z1$" end="^\z1\@!"me=s-1 end="^\z1\(> \?\)\+"me=s-1 fold + +" Treat verbatim Text special. +syn region mailVerbatim contains=@NoSpell keepend start="^#v+$" end="^#v-$" fold +syn region mailVerbatim contains=@mailQuoteExps,@NoSpell start="^\z(\(> \?\)\+\)#v+$" end="\z1#v-$" fold + +" URLs start with a known protocol or www,web,w3. +syn match mailURL contains=@NoSpell `\v<(((https?|ftp|gopher)://|(mailto|file|news):)[^' <>"]+|(www|web|w3)[a-z0-9_-]*\.[a-z0-9._-]+\.[^' <>"]+)[a-z0-9/]` +syn match mailEmail contains=@NoSpell "\v[_=a-z\./+0-9-]+\@[a-z0-9._-]+\a{2}" + +" Make sure quote markers in regions (header / signature) have correct color +syn match mailQuoteExp1 contained "\v^(\> ?)" +syn match mailQuoteExp2 contained "\v^(\> ?){2}" +syn match mailQuoteExp3 contained "\v^(\> ?){3}" +syn match mailQuoteExp4 contained "\v^(\> ?){4}" +syn match mailQuoteExp5 contained "\v^(\> ?){5}" +syn match mailQuoteExp6 contained "\v^(\> ?){6}" + +" Even and odd quoted lines. Order is important here! +syn region mailQuoted6 keepend contains=mailVerbatim,mailHeader,@mailLinks,mailSignature,@NoSpell start="^\z(\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{5}\([a-z]\+>\|[]|}>]\)\)" end="^\z1\@!" fold +syn region mailQuoted5 keepend contains=mailQuoted6,mailVerbatim,mailHeader,@mailLinks,mailSignature,@NoSpell start="^\z(\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{4}\([a-z]\+>\|[]|}>]\)\)" end="^\z1\@!" fold +syn region mailQuoted4 keepend contains=mailQuoted5,mailQuoted6,mailVerbatim,mailHeader,@mailLinks,mailSignature,@NoSpell start="^\z(\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{3}\([a-z]\+>\|[]|}>]\)\)" end="^\z1\@!" fold +syn region mailQuoted3 keepend contains=mailQuoted4,mailQuoted5,mailQuoted6,mailVerbatim,mailHeader,@mailLinks,mailSignature,@NoSpell start="^\z(\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{2}\([a-z]\+>\|[]|}>]\)\)" end="^\z1\@!" fold +syn region mailQuoted2 keepend contains=mailQuoted3,mailQuoted4,mailQuoted5,mailQuoted6,mailVerbatim,mailHeader,@mailLinks,mailSignature,@NoSpell start="^\z(\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{1}\([a-z]\+>\|[]|}>]\)\)" end="^\z1\@!" fold +syn region mailQuoted1 keepend contains=mailQuoted2,mailQuoted3,mailQuoted4,mailQuoted5,mailQuoted6,mailVerbatim,mailHeader,@mailLinks,mailSignature,@NoSpell start="^\z([a-z]\+>\|[]|}>]\)" end="^\z1\@!" fold + +" Need to sync on the header. Assume we can do that within 100 lines +if exists("mail_minlines") + exec "syn sync minlines=" . mail_minlines +else + syn sync minlines=100 +endif + +" Define the default highlighting. +hi def link mailVerbatim Special +hi def link mailHeader Statement +hi def link mailHeaderKey Type +hi def link mailSignature PreProc +hi def link mailHeaderEmail mailEmail +hi def link mailEmail Special +hi def link mailURL String +hi def link mailSubject LineNR +hi def link mailQuoted1 Comment +hi def link mailQuoted3 mailQuoted1 +hi def link mailQuoted5 mailQuoted1 +hi def link mailQuoted2 Identifier +hi def link mailQuoted4 mailQuoted2 +hi def link mailQuoted6 mailQuoted2 +hi def link mailQuoteExp1 mailQuoted1 +hi def link mailQuoteExp2 mailQuoted2 +hi def link mailQuoteExp3 mailQuoted3 +hi def link mailQuoteExp4 mailQuoted4 +hi def link mailQuoteExp5 mailQuoted5 +hi def link mailQuoteExp6 mailQuoted6 + +let b:current_syntax = "mail" diff --git a/vim/bundle/ubuntu-vim72/syntax/mailaliases.vim b/vim/bundle/ubuntu-vim72/syntax/mailaliases.vim new file mode 100644 index 0000000..743068f --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/mailaliases.vim @@ -0,0 +1,71 @@ +" Vim syntax file +" Language: aliases(5) local alias database file +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-04-14 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword mailaliasesTodo contained TODO FIXME XXX NOTE + +syn region mailaliasesComment display oneline start='^\s*#' end='$' + \ contains=mailaliasesTodo,@Spell + +syn match mailaliasesBegin display '^' + \ nextgroup=mailaliasesName, + \ mailaliasesComment + +syn match mailaliasesName contained '[[:alnum:]\._-]\+' + \ nextgroup=mailaliasesColon + +syn region mailaliasesName contained oneline start=+"+ + \ skip=+\\\\\|\\"+ end=+"+ + \ nextgroup=mailaliasesColon + +syn match mailaliasesColon contained ':' + \ nextgroup=@mailaliasesValue + \ skipwhite skipnl + +syn cluster mailaliasesValue contains=mailaliasesValueAddress, + \ mailaliasesValueFile, + \ mailaliasesValueCommand, + \ mailaliasesValueInclude + +syn match mailaliasesValueAddress contained '[^ \t/|,]\+' + \ nextgroup=mailaliasesValueSep + \ skipwhite skipnl + +syn match mailaliasesValueFile contained '/[^,]*' + \ nextgroup=mailaliasesValueSep + \ skipwhite skipnl + +syn match mailaliasesValueCommand contained '|[^,]*' + \ nextgroup=mailaliasesValueSep + \ skipwhite skipnl + +syn match mailaliasesValueInclude contained ':include:[^,]*' + \ nextgroup=mailaliasesValueSep + \ skipwhite skipnl + +syn match mailaliasesValueSep contained ',' + \ nextgroup=@mailaliasesValue + \ skipwhite skipnl + +hi def link mailaliasesTodo Todo +hi def link mailaliasesComment Comment +hi def link mailaliasesName Identifier +hi def link mailaliasesColon Delimiter +hi def link mailaliasesValueAddress String +hi def link mailaliasesValueFile String +hi def link mailaliasesValueCommand String +hi def link mailaliasesValueInclude PreProc +hi def link mailaliasesValueSep Delimiter + +let b:current_syntax = "mailaliases" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/mailcap.vim b/vim/bundle/ubuntu-vim72/syntax/mailcap.vim new file mode 100644 index 0000000..547db73 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/mailcap.vim @@ -0,0 +1,54 @@ +" Vim syntax file +" Language: Mailcap configuration file +" Maintainer: Doug Kearns +" Last Change: 2004 Nov 27 +" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/mailcap.vim + +" 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 match mailcapComment "^#.*" + +syn region mailcapString start=+"+ end=+"+ contains=mailcapSpecial oneline + +syn match mailcapDelimiter "\\\@" +syn match mailcapFieldname "\<\(compose\|composetyped\|print\|edit\|test\|x11-bitmap\|nametemplate\|textualnewlines\|description\|x-\w+\)\>\ze\s*=" +syn match mailcapTypeField "^\(text\|image\|audio\|video\|application\|message\|multipart\|model\|x-[[:graph:]]\+\)\(/\(\*\|[[:graph:]]\+\)\)\=\ze\s*;" +syn case match + +" 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_mailcap_syntax_inits") + if version < 508 + let did_mailcap_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink mailcapComment Comment + HiLink mailcapDelimiter Delimiter + HiLink mailcapFlag Statement + HiLink mailcapFieldname Statement + HiLink mailcapSpecial Identifier + HiLink mailcapTypeField Type + HiLink mailcapString String + + delcommand HiLink +endif + +let b:current_syntax = "mailcap" + +" vim: tabstop=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/make.vim b/vim/bundle/ubuntu-vim72/syntax/make.vim new file mode 100644 index 0000000..e9d7ee9 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/make.vim @@ -0,0 +1,137 @@ +" Vim syntax file +" Language: Makefile +" Maintainer: Claudio Fleiner +" URL: http://www.fleiner.com/vim/syntax/make.vim +" Last Change: 2008 Aug 04 + +" 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 + +" some special characters +syn match makeSpecial "^\s*[@+-]\+" +syn match makeNextLine "\\\n\s*" + +" some directives +syn match makePreCondit "^ *\(ifeq\>\|else\>\|endif\>\|ifneq\>\|ifdef\>\|ifndef\>\)" +syn match makeInclude "^ *[-s]\=include" +syn match makeStatement "^ *vpath" +syn match makeExport "^ *\(export\|unexport\)\>" +syn match makeOverride "^ *override" +hi link makeOverride makeStatement +hi link makeExport makeStatement + +" Koehler: catch unmatched define/endef keywords. endef only matches it is by itself on a line +syn region makeDefine start="^\s*define\s" end="^\s*endef\s*$" contains=makeStatement,makeIdent,makePreCondit,makeDefine + +" Microsoft Makefile specials +syn case ignore +syn match makeInclude "^! *include" +syn match makePreCondit "! *\(cmdswitches\|error\|message\|include\|if\|ifdef\|ifndef\|else\|elseif\|else if\|else\s*ifdef\|else\s*ifndef\|endif\|undef\)\>" +syn case match + +" identifiers +syn region makeIdent start="\$(" skip="\\)\|\\\\" end=")" contains=makeStatement,makeIdent,makeSString,makeDString +syn region makeIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent,makeSString,makeDString +syn match makeIdent "\$\$\w*" +syn match makeIdent "\$[^({]" +syn match makeIdent "^ *\a\w*\s*[:+?!*]="me=e-2 +syn match makeIdent "^ *\a\w*\s*="me=e-1 +syn match makeIdent "%" + +" Makefile.in variables +syn match makeConfig "@[A-Za-z0-9_]\+@" + +" make targets +" syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>" +syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:[^=]"me=e-2 nextgroup=makeSource +syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:$"me=e-1 nextgroup=makeSource + +syn region makeTarget transparent matchgroup=makeTarget start="^[A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]"rs=e-1 end=";"re=e-1,me=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine skipnl nextGroup=makeCommands +syn match makeTarget "^[A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*::\=\s*$" contains=makeIdent,makeSpecTarget skipnl nextgroup=makeCommands,makeCommandError + +syn region makeSpecTarget transparent matchgroup=makeSpecTarget start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*:\{1,2}[^:=]"rs=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine skipnl nextGroup=makeCommands +syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*::\=\s*$" contains=makeIdent skipnl nextgroup=makeCommands,makeCommandError + +syn match makeCommandError "^\s\+\S.*" contained +syn region makeCommands start=";"hs=s+1 start="^\t" end="^[^\t#]"me=e-1,re=e-1 end="^$" contained contains=makeCmdNextLine,makeSpecial,makeComment,makeIdent,makePreCondit,makeDefine,makeDString,makeSString nextgroup=makeCommandError +syn match makeCmdNextLine "\\\n."he=e-1 contained + + +" Statements / Functions (GNU make) +syn match makeStatement contained "(\(subst\|abspath\|addprefix\|addsuffix\|and\|basename\|call\|dir\|error\|eval\|filter-out\|filter\|findstring\|firstword\|flavor\|foreach\|if\|info\|join\|lastword\|notdir\|or\|origin\|patsubst\|realpath\|shell\|sort\|strip\|suffix\|value\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1 + +" Comment +if exists("make_microsoft") + syn match makeComment "#.*" contains=@Spell,makeTodo +elseif !exists("make_no_comments") + syn region makeComment start="#" end="^$" end="[^\\]$" keepend contains=@Spell,makeTodo + syn match makeComment "#$" contains=@Spell +endif +syn keyword makeTodo TODO FIXME XXX contained + +" match escaped quotes and any other escaped character +" except for $, as a backslash in front of a $ does +" not make it a standard character, but instead it will +" still act as the beginning of a variable +" The escaped char is not highlightet currently +syn match makeEscapedChar "\\[^$]" + + +syn region makeDString start=+\(\\\)\@= 508 || !exists("did_make_syn_inits") + if version < 508 + let did_make_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink makeNextLine makeSpecial + HiLink makeCmdNextLine makeSpecial + HiLink makeSpecTarget Statement + if !exists("make_no_commands") + HiLink makeCommands Number + endif + HiLink makeImplicit Function + HiLink makeTarget Function + HiLink makeInclude Include + HiLink makePreCondit PreCondit + HiLink makeStatement Statement + HiLink makeIdent Identifier + HiLink makeSpecial Special + HiLink makeComment Comment + HiLink makeDString String + HiLink makeSString String + HiLink makeBString Function + HiLink makeError Error + HiLink makeTodo Todo + HiLink makeDefine Define + HiLink makeCommandError Error + HiLink makeConfig PreCondit + delcommand HiLink +endif + +let b:current_syntax = "make" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/man.vim b/vim/bundle/ubuntu-vim72/syntax/man.vim new file mode 100644 index 0000000..4172a02 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/man.vim @@ -0,0 +1,67 @@ +" Vim syntax file +" Language: Man page +" Maintainer: SungHyun Nam +" Previous Maintainer: Gautam H. Mudunuri +" Version Info: +" Last Change: 2008 Sep 17 + +" Additional highlighting by Johannes Tanzler : +" * manSubHeading +" * manSynopsis (only for sections 2 and 3) + +" 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 + +" Get the CTRL-H syntax to handle backspaced text +if version >= 600 + runtime! syntax/ctrlh.vim +else + source :p:h/ctrlh.vim +endif + +syn case ignore +syn match manReference "\f\+([1-9][a-z]\=)" +syn match manTitle "^\f\+([0-9]\+[a-z]\=).*" +syn match manSectionHeading "^[a-z][a-z ]*[a-z]$" +syn match manSubHeading "^\s\{3\}[a-z][a-z ]*[a-z]$" +syn match manOptionDesc "^\s*[+-][a-z0-9]\S*" +syn match manLongOptionDesc "^\s*--[a-z0-9-]\S*" +" syn match manHistory "^[a-z].*last change.*$" + +if getline(1) =~ '^[a-zA-Z_]\+([23])' + syntax include @cCode :p:h/c.vim + syn match manCFuncDefinition display "\<\h\w*\>\s*("me=e-1 contained + syn region manSynopsis start="^SYNOPSIS"hs=s+8 end="^\u\+\s*$"me=e-12 keepend contains=manSectionHeading,@cCode,manCFuncDefinition +endif + + +" 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_man_syn_inits") + if version < 508 + let did_man_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink manTitle Title + HiLink manSectionHeading Statement + HiLink manOptionDesc Constant + HiLink manLongOptionDesc Constant + HiLink manReference PreProc + HiLink manSubHeading Function + HiLink manCFuncDefinition Function + + delcommand HiLink +endif + +let b:current_syntax = "man" + +" vim:ts=8 sts=2 sw=2: diff --git a/vim/bundle/ubuntu-vim72/syntax/manconf.vim b/vim/bundle/ubuntu-vim72/syntax/manconf.vim new file mode 100644 index 0000000..90ecc8e --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/manconf.vim @@ -0,0 +1,117 @@ +" Vim syntax file +" Language: man.conf(5) - man configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword manconfTodo contained TODO FIXME XXX NOTE + +syn region manconfComment display oneline start='^#' end='$' + \ contains=manconfTodo,@Spell + +if !has("win32") && $OSTYPE =~ 'bsd' + syn match manconfBegin display '^' + \ nextgroup=manconfKeyword,manconfSection, + \ manconfComment skipwhite + + syn keyword manconfKeyword contained _build _crunch + \ nextgroup=manconfExtCmd skipwhite + + syn keyword manconfKeyword contained _suffix + \ nextgroup=manconfExt skipwhite + + syn keyword manconfKeyword contained _crunch + + syn keyword manconfKeyword contained _subdir _version _whatdb + \ nextgroup=manconfPaths skipwhite + + syn match manconfExtCmd contained display '\.\S\+' + \ nextgroup=manconfPaths skipwhite + + syn match manconfSection contained '[^#_ \t]\S*' + \ nextgroup=manconfPaths skipwhite + + syn keyword manconfSection contained _default + \ nextgroup=manconfPaths skipwhite + + syn match manconfPaths contained display '\S\+' + \ nextgroup=manconfPaths skipwhite + + syn match manconfExt contained display '\.\S\+' + + hi def link manconfExtCmd Type + hi def link manconfSection Identifier + hi def link manconfPaths String +else + syn match manconfBegin display '^' + \ nextgroup=manconfBoolean,manconfKeyword, + \ manconfDecompress,manconfComment skipwhite + + syn keyword manconfBoolean contained FSSTND FHS NOAUTOPATH NOCACHE + + syn keyword manconfKeyword contained MANBIN + \ nextgroup=manconfPath skipwhite + + syn keyword manconfKeyword contained MANPATH MANPATH_MAP + \ nextgroup=manconfFirstPath skipwhite + + syn keyword manconfKeyword contained APROPOS WHATIS TROFF NROFF JNROFF EQN + \ NEQN JNEQN TBL COL REFER PIC VGRIND GRAP + \ PAGER BROWSER HTMLPAGER CMP CAT COMPRESS + \ DECOMPRESS MANDEFOPTIONS + \ nextgroup=manconfCommand skipwhite + + syn keyword manconfKeyword contained COMPRESS_EXT + \ nextgroup=manconfExt skipwhite + + syn keyword manconfKeyword contained MANSECT + \ nextgroup=manconfManSect skipwhite + + syn match manconfPath contained display '\S\+' + + syn match manconfFirstPath contained display '\S\+' + \ nextgroup=manconfSecondPath skipwhite + + syn match manconfSecondPath contained display '\S\+' + + syn match manconfCommand contained display '\%(/[^/ \t]\+\)\+' + \ nextgroup=manconfCommandOpt skipwhite + + syn match manconfCommandOpt contained display '\S\+' + \ nextgroup=manconfCommandOpt skipwhite + + syn match manconfExt contained display '\.\S\+' + + syn match manconfManSect contained '[^:]\+' nextgroup=manconfManSectSep + + syn match manconfManSectSep contained ':' nextgroup=manconfManSect + + syn match manconfDecompress contained '\.\S\+' + \ nextgroup=manconfCommand skipwhite + + hi def link manconfBoolean Boolean + hi def link manconfPath String + hi def link manconfFirstPath manconfPath + hi def link manconfSecondPath manconfPath + hi def link manconfCommand String + hi def link manconfCommandOpt Special + hi def link manconfManSect Identifier + hi def link manconfManSectSep Delimiter + hi def link manconfDecompress Type +endif + +hi def link manconfTodo Todo +hi def link manconfComment Comment +hi def link manconfKeyword Keyword +hi def link manconfExt Type + +let b:current_syntax = "manconf" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/manual.vim b/vim/bundle/ubuntu-vim72/syntax/manual.vim new file mode 100644 index 0000000..5ea3731 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/manual.vim @@ -0,0 +1,28 @@ +" Vim syntax support file +" Maintainer: Bram Moolenaar +" Last Change: 2008 Jan 26 + +" This file is used for ":syntax manual". +" It installs the Syntax autocommands, but no the FileType autocommands. + +if !has("syntax") + finish +endif + +" Load the Syntax autocommands and set the default methods for highlighting. +if !exists("syntax_on") + so :p:h/synload.vim +endif + +let syntax_manual = 1 + +" Remove the connection between FileType and Syntax autocommands. +if exists('#syntaxset') + au! syntaxset FileType +endif + +" If the GUI is already running, may still need to install the FileType menu. +" Don't do it when the 'M' flag is included in 'guioptions'. +if has("menu") && has("gui_running") && !exists("did_install_syntax_menu") && &guioptions !~# 'M' + source $VIMRUNTIME/menu.vim +endif diff --git a/vim/bundle/ubuntu-vim72/syntax/maple.vim b/vim/bundle/ubuntu-vim72/syntax/maple.vim new file mode 100644 index 0000000..37abf16 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/maple.vim @@ -0,0 +1,631 @@ +" Vim syntax file +" Language: Maple V (based on release 4) +" Maintainer: Dr. Charles E. Campbell, Jr. +" Last Change: Sep 11, 2006 +" Version: 9 +" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax +" +" Package Function Selection: {{{1 +" Because there are a lot of packages, and because of the potential for namespace +" clashes, this version of needs the user to select which, if any, +" package functions should be highlighted. Select your packages and put into your +" <.vimrc> none or more of the lines following let ...=1 lines: +" +" if exists("mvpkg_all") +" ... +" endif +" +" *OR* let mvpkg_all=1 + +" This syntax file contains all the keywords and top-level packages of Maple 9.5 +" but only the contents of packages of Maple V Release 4, and the top-level +" routines of Release 4. + +" 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 + +" Iskeyword Effects: {{{1 +if version < 600 + set iskeyword=$,48-57,_,a-z,@-Z +else + setlocal iskeyword=$,48-57,_,a-z,@-Z +endif + +" Package Selection: {{{1 +" allow user to simply select all packages for highlighting +if exists("mvpkg_all") + let mv_DEtools = 1 + let mv_Galois = 1 + let mv_GaussInt = 1 + let mv_LREtools = 1 + let mv_combinat = 1 + let mv_combstruct = 1 + let mv_difforms = 1 + let mv_finance = 1 + let mv_genfunc = 1 + let mv_geometry = 1 + let mv_grobner = 1 + let mv_group = 1 + let mv_inttrans = 1 + let mv_liesymm = 1 + let mv_linalg = 1 + let mv_logic = 1 + let mv_networks = 1 + let mv_numapprox = 1 + let mv_numtheory = 1 + let mv_orthopoly = 1 + let mv_padic = 1 + let mv_plots = 1 + let mv_plottools = 1 + let mv_powseries = 1 + let mv_process = 1 + let mv_simplex = 1 + let mv_stats = 1 + let mv_student = 1 + let mv_sumtools = 1 + let mv_tensor = 1 + let mv_totorder = 1 +endif + +" Parenthesis/curly/brace sanity checker: {{{1 +syn case match + +" parenthesis/curly/brace sanity checker +syn region mvZone matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" transparent contains=ALLBUT,mvError,mvBraceError,mvCurlyError +syn region mvZone matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" transparent contains=ALLBUT,mvError,mvBraceError,mvParenError +syn region mvZone matchgroup=Delimiter start="\[" matchgroup=Delimiter end="]" transparent contains=ALLBUT,mvError,mvCurlyError,mvParenError +syn match mvError "[)\]}]" +syn match mvBraceError "[)}]" contained +syn match mvCurlyError "[)\]]" contained +syn match mvParenError "[\]}]" contained +syn match mvComma "[,;:]" +syn match mvSemiError "[;:]" contained +syn match mvDcolon "::" + +" Maple Packages, updated for Maple 9.5 +syn keyword mvPackage algcurves ArrayTools Cache codegen +syn keyword mvPackage CodeGeneration CodeTools combinat combstruct +syn keyword mvPackage ContextMenu CurveFitting DEtools diffalg +syn keyword mvPackage difforms DiscreteTransforms Domains ExternalCalling +syn keyword mvPackage FileTools finance GaussInt genfunc +syn keyword mvPackage geom3d geometry gfun Groebner +syn keyword mvPackage group hashmset IntegerRelations inttrans +syn keyword mvPackage LargeExpressions LibraryTools liesymm linalg +syn keyword mvPackage LinearAlgebra LinearFunctionalSystems LinearOperators +syn keyword mvPackage ListTools Logic LREtools Maplets +syn keyword mvPackage MathematicalFunctions MathML Matlab +syn keyword mvPackage MatrixPolynomialAlgebra MmaTranslator networks +syn keyword mvPackage numapprox numtheory Optimization OreTools +syn keyword mvPackage Ore_algebra OrthogonalSeries orthopoly padic +syn keyword mvPackage PDEtools plots plottools PolynomialIdeals +syn keyword mvPackage PolynomialTools powseries process QDifferenceEquations +syn keyword mvPackage RandomTools RationalNormalForms RealDomain RootFinding +syn keyword mvPackage ScientificConstants ScientificErrorAnalysis simplex +syn keyword mvPackage Slode SNAP Sockets SoftwareMetrics +syn keyword mvPackage SolveTools Spread stats StringTools +syn keyword mvPackage Student student sumtools SumTools +syn keyword mvPackage tensor TypeTools Units VariationalCalculus +syn keyword mvPackage VectorCalculus Worksheet XMLTools + +" Language Support: {{{1 +syn keyword mvTodo contained COMBAK FIXME TODO XXX +if exists("g:mapleversion") && g:mapleversion < 9 + syn region mvString start=+`+ skip=+``+ end=+`+ keepend contains=mvTodo,@Spell + syn region mvString start=+"+ skip=+""+ end=+"+ keepend contains=@Spell + syn region mvDelayEval start=+'+ end=+'+ keepend contains=ALLBUT,mvError,mvBraceError,mvCurlyError,mvParenError,mvSemiError + syn match mvVarAssign "[a-zA-Z_][a-zA-Z_0-9]*[ \t]*:=" contains=mvAssign + syn match mvAssign ":=" contained +else + syn region mvName start=+`+ skip=+``+ end=+`+ keepend contains=mvTodo + syn region mvString start=+"+ skip=+""+ end=+"+ keepend contains=@Spell + syn region mvDelayEval start=+'+ end=+'+ keepend contains=ALLBUT,mvError,mvBraceError,mvCurlyError,mvParenError + syn match mvDelim "[;:]" display + syn match mvAssign ":=" +endif + +" Lower-Priority Operators: {{{1 +syn match mvOper "\." + +" Number handling: {{{1 +syn match mvNumber "\<\d\+" " integer + syn match mvNumber "[-+]\=\.\d\+" " . integer +syn match mvNumber "\<\d\+\.\d\+" " integer . integer +syn match mvNumber "\<\d\+\." " integer . +syn match mvNumber "\<\d\+\.\." contains=mvRange " integer .. + +syn match mvNumber "\<\d\+e[-+]\=\d\+" " integer e [-+] integer +syn match mvNumber "[-+]\=\.\d\+e[-+]\=\d\+" " . integer e [-+] integer +syn match mvNumber "\<\d\+\.\d*e[-+]\=\d\+" " integer . [integer] e [-+] integer + +syn match mvNumber "[-+]\d\+" " integer +syn match mvNumber "[-+]\d\+\.\d\+" " integer . integer +syn match mvNumber "[-+]\d\+\." " integer . +syn match mvNumber "[-+]\d\+\.\." contains=mvRange " integer .. + +syn match mvNumber "[-+]\d\+e[-+]\=\d\+" " integer e [-+] integer +syn match mvNumber "[-+]\d\+\.\d*e[-+]\=\d\+" " integer . [integer] e [-+] integer + +syn match mvRange "\.\." + +" Operators: {{{1 +syn keyword mvOper and not or xor implies union intersect subset minus mod +syn match mvOper "<>\|[<>]=\|[<>]\|=" +syn match mvOper "&+\|&-\|&\*\|&\/\|&" +syn match mvError "\.\.\." + +" MapleV Statements: ? statement {{{1 + +" MapleV Statements: ? statement +" Split into booleans, conditionals, operators, repeat-logic, etc +syn keyword mvBool true false FAIL +syn keyword mvCond elif else fi if then + +syn keyword mvRepeat by for in to +syn keyword mvRepeat do from od while + +syn keyword mvSpecial NULL +syn match mvSpecial "\[\]\|{}" + +if exists("g:mapleversion") && g:mapleversion < 9 + syn keyword mvStatement Order fail options read save + syn keyword mvStatement break local point remember stop + syn keyword mvStatement done mod proc restart with + syn keyword mvStatement end mods quit return + syn keyword mvStatement error next +else + syn keyword mvStatement option options read save + syn keyword mvStatement break local remember stop + syn keyword mvStatement done mod proc restart + syn keyword mvStatement end mods quit return + syn keyword mvStatement error next try catch + syn keyword mvStatement finally assuming global export + syn keyword mvStatement module description use +endif + +" Builtin Constants: ? constants {{{1 +syn keyword mvConstant Catalan I gamma infinity +syn keyword mvConstant Pi + +" Comments: DEBUG, if in a comment, is specially highlighted. {{{1 +syn keyword mvDebug contained DEBUG +syn cluster mvCommentGroup contains=mvTodo,mvDebug,@Spell +syn match mvComment "#.*$" contains=@mvCommentGroup + +" Basic Library Functions: ? index[function] +syn keyword mvLibrary $ @ @@ ERROR +syn keyword mvLibrary AFactor KelvinHer arctan factor log rhs +syn keyword mvLibrary AFactors KelvinKei arctanh factors log10 root +syn keyword mvLibrary AiryAi KelvinKer argument fclose lprint roots +syn keyword mvLibrary AiryBi LambertW array feof map round +syn keyword mvLibrary AngerJ Lcm assign fflush map2 rsolve +syn keyword mvLibrary Berlekamp LegendreE assigned filepos match savelib +syn keyword mvLibrary BesselI LegendreEc asspar fixdiv matrix scanf +syn keyword mvLibrary BesselJ LegendreEc1 assume float max searchtext +syn keyword mvLibrary BesselK LegendreF asubs floor maximize sec +syn keyword mvLibrary BesselY LegendreKc asympt fnormal maxnorm sech +syn keyword mvLibrary Beta LegendreKc1 attribute fopen maxorder select +syn keyword mvLibrary C LegendrePi bernstein forget member seq +syn keyword mvLibrary Chi LegendrePic branches fortran min series +syn keyword mvLibrary Ci LegendrePic1 bspline fprintf minimize setattribute +syn keyword mvLibrary CompSeq Li cat frac minpoly shake +syn keyword mvLibrary Content Linsolve ceil freeze modp showprofile +syn keyword mvLibrary D MOLS chrem fremove modp1 showtime +syn keyword mvLibrary DESol Maple_floats close frontend modp2 sign +syn keyword mvLibrary Det MeijerG close fscanf modpol signum +syn keyword mvLibrary Diff Norm coeff fsolve mods simplify +syn keyword mvLibrary Dirac Normal coeffs galois msolve sin +syn keyword mvLibrary DistDeg Nullspace coeftayl gc mtaylor singular +syn keyword mvLibrary Divide Power collect gcd mul sinh +syn keyword mvLibrary Ei Powmod combine gcdex nextprime sinterp +syn keyword mvLibrary Eigenvals Prem commutat genpoly nops solve +syn keyword mvLibrary EllipticCE Primfield comparray harmonic norm sort +syn keyword mvLibrary EllipticCK Primitive compoly has normal sparse +syn keyword mvLibrary EllipticCPi Primpart conjugate hasfun numboccur spline +syn keyword mvLibrary EllipticE ProbSplit content hasoption numer split +syn keyword mvLibrary EllipticF Product convergs hastype op splits +syn keyword mvLibrary EllipticK Psi convert heap open sprem +syn keyword mvLibrary EllipticModulus Quo coords history optimize sprintf +syn keyword mvLibrary EllipticNome RESol copy hypergeom order sqrfree +syn keyword mvLibrary EllipticPi Randpoly cos iFFT parse sqrt +syn keyword mvLibrary Eval Randprime cosh icontent pclose sscanf +syn keyword mvLibrary Expand Ratrecon cost identity pclose ssystem +syn keyword mvLibrary FFT Re cot igcd pdesolve stack +syn keyword mvLibrary Factor Rem coth igcdex piecewise sturm +syn keyword mvLibrary Factors Resultant csc ilcm plot sturmseq +syn keyword mvLibrary FresnelC RootOf csch ilog plot3d subs +syn keyword mvLibrary FresnelS Roots csgn ilog10 plotsetup subsop +syn keyword mvLibrary Fresnelf SPrem dawson implicitdiff pochhammer substring +syn keyword mvLibrary Fresnelg Searchtext define indets pointto sum +syn keyword mvLibrary Frobenius Shi degree index poisson surd +syn keyword mvLibrary GAMMA Si denom indexed polar symmdiff +syn keyword mvLibrary GaussAGM Smith depends indices polylog symmetric +syn keyword mvLibrary Gaussejord Sqrfree diagonal inifcn polynom system +syn keyword mvLibrary Gausselim Ssi diff ininame powmod table +syn keyword mvLibrary Gcd StruveH dilog initialize prem tan +syn keyword mvLibrary Gcdex StruveL dinterp insert prevprime tanh +syn keyword mvLibrary HankelH1 Sum disassemble int primpart testeq +syn keyword mvLibrary HankelH2 Svd discont interface print testfloat +syn keyword mvLibrary Heaviside TEXT discrim interp printf thaw +syn keyword mvLibrary Hermite Trace dismantle invfunc procbody thiele +syn keyword mvLibrary Im WeberE divide invztrans procmake time +syn keyword mvLibrary Indep WeierstrassP dsolve iostatus product translate +syn keyword mvLibrary Interp WeierstrassPPrime eliminate iperfpow proot traperror +syn keyword mvLibrary Inverse WeierstrassSigma ellipsoid iquo property trigsubs +syn keyword mvLibrary Irreduc WeierstrassZeta entries iratrecon protect trunc +syn keyword mvLibrary Issimilar Zeta eqn irem psqrt type +syn keyword mvLibrary JacobiAM abs erf iroot quo typematch +syn keyword mvLibrary JacobiCD add erfc irreduc radnormal unames +syn keyword mvLibrary JacobiCN addcoords eulermac iscont radsimp unapply +syn keyword mvLibrary JacobiCS addressof eval isdifferentiable rand unassign +syn keyword mvLibrary JacobiDC algebraic evala isolate randomize unload +syn keyword mvLibrary JacobiDN algsubs evalapply ispoly randpoly unprotect +syn keyword mvLibrary JacobiDS alias evalb isqrfree range updatesR4 +syn keyword mvLibrary JacobiNC allvalues evalc isqrt rationalize userinfo +syn keyword mvLibrary JacobiND anames evalf issqr ratrecon value +syn keyword mvLibrary JacobiNS antisymm evalfint latex readbytes vector +syn keyword mvLibrary JacobiSC applyop evalgf lattice readdata verify +syn keyword mvLibrary JacobiSD arccos evalhf lcm readlib whattype +syn keyword mvLibrary JacobiSN arccosh evalm lcoeff readline with +syn keyword mvLibrary JacobiTheta1 arccot evaln leadterm readstat writebytes +syn keyword mvLibrary JacobiTheta2 arccoth evalr length realroot writedata +syn keyword mvLibrary JacobiTheta3 arccsc exp lexorder recipoly writeline +syn keyword mvLibrary JacobiTheta4 arccsch expand lhs rem writestat +syn keyword mvLibrary JacobiZeta arcsec expandoff limit remove writeto +syn keyword mvLibrary KelvinBei arcsech expandon ln residue zip +syn keyword mvLibrary KelvinBer arcsin extract lnGAMMA resultant ztrans +syn keyword mvLibrary KelvinHei arcsinh + + +" == PACKAGES ======================================================= {{{1 +" Note: highlighting of package functions is now user-selectable by package. + +" Package: DEtools differential equations tools {{{2 +if exists("mv_DEtools") + syn keyword mvPkg_DEtools DEnormal Dchangevar autonomous dfieldplot reduceOrder untranslate + syn keyword mvPkg_DEtools DEplot PDEchangecoords convertAlg indicialeq regularsp varparam + syn keyword mvPkg_DEtools DEplot3d PDEplot convertsys phaseportrait translate +endif + +" Package: Domains: create domains of computation {{{2 +if exists("mv_Domains") +endif + +" Package: GF: Galois Fields {{{2 +if exists("mv_GF") + syn keyword mvPkg_Galois galois +endif + +" Package: GaussInt: Gaussian Integers {{{2 +if exists("mv_GaussInt") + syn keyword mvPkg_GaussInt GIbasis GIfactor GIissqr GInorm GIquadres GIsmith + syn keyword mvPkg_GaussInt GIchrem GIfactors GIlcm GInormal GIquo GIsqrfree + syn keyword mvPkg_GaussInt GIdivisor GIgcd GImcmbine GIorder GIrem GIsqrt + syn keyword mvPkg_GaussInt GIfacpoly GIgcdex GInearest GIphi GIroots GIunitnormal + syn keyword mvPkg_GaussInt GIfacset GIhermite GInodiv GIprime GIsieve +endif + +" Package: LREtools: manipulate linear recurrence relations {{{2 +if exists("mv_LREtools") + syn keyword mvPkg_LREtools REcontent REprimpart REtodelta delta hypergeomsols ratpolysols + syn keyword mvPkg_LREtools REcreate REreduceorder REtoproc dispersion polysols shift + syn keyword mvPkg_LREtools REplot REtoDE constcoeffsol +endif + +" Package: combinat: combinatorial functions {{{2 +if exists("mv_combinat") + syn keyword mvPkg_combinat Chi composition graycode numbcomb permute randperm + syn keyword mvPkg_combinat bell conjpart inttovec numbcomp powerset stirling1 + syn keyword mvPkg_combinat binomial decodepart lastpart numbpart prevpart stirling2 + syn keyword mvPkg_combinat cartprod encodepart multinomial numbperm randcomb subsets + syn keyword mvPkg_combinat character fibonacci nextpart partition randpart vectoint + syn keyword mvPkg_combinat choose firstpart +endif + +" Package: combstruct: combinatorial structures {{{2 +if exists("mv_combstruct") + syn keyword mvPkg_combstruct allstructs draw iterstructs options specification structures + syn keyword mvPkg_combstruct count finished nextstruct +endif + +" Package: difforms: differential forms {{{2 +if exists("mv_difforms") + syn keyword mvPkg_difforms const defform formpart parity scalarpart wdegree + syn keyword mvPkg_difforms d form mixpar scalar simpform wedge +endif + +" Package: finance: financial mathematics {{{2 +if exists("mv_finance") + syn keyword mvPkg_finance amortization cashflows futurevalue growingperpetuity mv_finance presentvalue + syn keyword mvPkg_finance annuity effectiverate growingannuity levelcoupon perpetuity yieldtomaturity + syn keyword mvPkg_finance blackscholes +endif + +" Package: genfunc: rational generating functions {{{2 +if exists("mv_genfunc") + syn keyword mvPkg_genfunc rgf_charseq rgf_expand rgf_hybrid rgf_pfrac rgf_sequence rgf_term + syn keyword mvPkg_genfunc rgf_encode rgf_findrecur rgf_norm rgf_relate rgf_simp termscale +endif + +" Package: geometry: Euclidean geometry {{{2 +if exists("mv_geometry") + syn keyword mvPkg_geometry circle dsegment hyperbola parabola segment triangle + syn keyword mvPkg_geometry conic ellipse line point square +endif + +" Package: grobner: Grobner bases {{{2 +if exists("mv_grobner") + syn keyword mvPkg_grobner finduni gbasis leadmon normalf solvable spoly + syn keyword mvPkg_grobner finite gsolve +endif + +" Package: group: permutation and finitely-presented groups {{{2 +if exists("mv_group") + syn keyword mvPkg_group DerivedS areconjugate cosets grouporder issubgroup permrep + syn keyword mvPkg_group LCS center cosrep inter mulperms pres + syn keyword mvPkg_group NormalClosure centralizer derived invperm normalizer subgrel + syn keyword mvPkg_group RandElement convert grelgroup isabelian orbit type + syn keyword mvPkg_group Sylow core groupmember isnormal permgroup +endif + +" Package: inttrans: integral transforms {{{2 +if exists("mv_inttrans") + syn keyword mvPkg_inttrans addtable fouriercos hankel invfourier invlaplace mellin + syn keyword mvPkg_inttrans fourier fouriersin hilbert invhilbert laplace +endif + +" Package: liesymm: Lie symmetries {{{2 +if exists("mv_liesymm") + syn keyword mvPkg_liesymm &^ TD depvars getform mixpar vfix + syn keyword mvPkg_liesymm &mod annul determine hasclosure prolong wcollect + syn keyword mvPkg_liesymm Eta autosimp dvalue hook reduce wdegree + syn keyword mvPkg_liesymm Lie close extvars indepvars setup wedgeset + syn keyword mvPkg_liesymm Lrank d getcoeff makeforms translate wsubs +endif + +" Package: linalg: Linear algebra {{{2 +if exists("mv_linalg") + syn keyword mvPkg_linalg GramSchmidt coldim equal indexfunc mulcol singval + syn keyword mvPkg_linalg JordanBlock colspace exponential innerprod multiply smith + syn keyword mvPkg_linalg LUdecomp colspan extend intbasis norm stack + syn keyword mvPkg_linalg QRdecomp companion ffgausselim inverse normalize submatrix + syn keyword mvPkg_linalg addcol cond fibonacci ismith orthog subvector + syn keyword mvPkg_linalg addrow copyinto forwardsub issimilar permanent sumbasis + syn keyword mvPkg_linalg adjoint crossprod frobenius iszero pivot swapcol + syn keyword mvPkg_linalg angle curl gausselim jacobian potential swaprow + syn keyword mvPkg_linalg augment definite gaussjord jordan randmatrix sylvester + syn keyword mvPkg_linalg backsub delcols geneqns kernel randvector toeplitz + syn keyword mvPkg_linalg band delrows genmatrix laplacian rank trace + syn keyword mvPkg_linalg basis det grad leastsqrs references transpose + syn keyword mvPkg_linalg bezout diag hadamard linsolve row vandermonde + syn keyword mvPkg_linalg blockmatrix diverge hermite matadd rowdim vecpotent + syn keyword mvPkg_linalg charmat dotprod hessian matrix rowspace vectdim + syn keyword mvPkg_linalg charpoly eigenval hilbert minor rowspan vector + syn keyword mvPkg_linalg cholesky eigenvect htranspose minpoly scalarmul wronskian + syn keyword mvPkg_linalg col entermatrix ihermite +endif + +" Package: logic: Boolean logic {{{2 +if exists("mv_logic") + syn keyword mvPkg_logic MOD2 bsimp distrib environ randbool tautology + syn keyword mvPkg_logic bequal canon dual frominert satisfy toinert +endif + +" Package: networks: graph networks {{{2 +if exists("mv_networks") + syn keyword mvPkg_networks acycpoly connect dinic graph mincut show + syn keyword mvPkg_networks addedge connectivity djspantree graphical mindegree shrink + syn keyword mvPkg_networks addvertex contract dodecahedron gsimp neighbors span + syn keyword mvPkg_networks adjacency countcuts draw gunion new spanpoly + syn keyword mvPkg_networks allpairs counttrees duplicate head octahedron spantree + syn keyword mvPkg_networks ancestor cube edges icosahedron outdegree tail + syn keyword mvPkg_networks arrivals cycle ends incidence path tetrahedron + syn keyword mvPkg_networks bicomponents cyclebase eweight incident petersen tuttepoly + syn keyword mvPkg_networks charpoly daughter flow indegree random vdegree + syn keyword mvPkg_networks chrompoly degreeseq flowpoly induce rank vertices + syn keyword mvPkg_networks complement delete fundcyc isplanar rankpoly void + syn keyword mvPkg_networks complete departures getlabel maxdegree shortpathtree vweight + syn keyword mvPkg_networks components diameter girth +endif + +" Package: numapprox: numerical approximation {{{2 +if exists("mv_numapprox") + syn keyword mvPkg_numapprox chebdeg chebsort fnorm laurent minimax remez + syn keyword mvPkg_numapprox chebmult chebyshev hornerform laurent pade taylor + syn keyword mvPkg_numapprox chebpade confracform infnorm minimax +endif + +" Package: numtheory: number theory {{{2 +if exists("mv_numtheory") + syn keyword mvPkg_numtheory B cyclotomic invcfrac mcombine nthconver primroot + syn keyword mvPkg_numtheory F divisors invphi mersenne nthdenom quadres + syn keyword mvPkg_numtheory GIgcd euler isolve minkowski nthnumer rootsunity + syn keyword mvPkg_numtheory J factorEQ isprime mipolys nthpow safeprime + syn keyword mvPkg_numtheory L factorset issqrfree mlog order sigma + syn keyword mvPkg_numtheory M fermat ithprime mobius pdexpand sq2factor + syn keyword mvPkg_numtheory bernoulli ifactor jacobi mroot phi sum2sqr + syn keyword mvPkg_numtheory bigomega ifactors kronecker msqrt pprimroot tau + syn keyword mvPkg_numtheory cfrac imagunit lambda nearestp prevprime thue + syn keyword mvPkg_numtheory cfracpol index legendre nextprime +endif + +" Package: orthopoly: orthogonal polynomials {{{2 +if exists("mv_orthopoly") + syn keyword mvPkg_orthopoly G H L P T U +endif + +" Package: padic: p-adic numbers {{{2 +if exists("mv_padic") + syn keyword mvPkg_padic evalp function orderp ratvaluep rootp valuep + syn keyword mvPkg_padic expansion lcoeffp ordp +endif + +" Package: plots: graphics package {{{2 +if exists("mv_plots") + syn keyword mvPkg_plots animate coordplot3d gradplot3d listplot3d polarplot setoptions3d + syn keyword mvPkg_plots animate3d cylinderplot implicitplot loglogplot polygonplot spacecurve + syn keyword mvPkg_plots changecoords densityplot implicitplot3d logplot polygonplot3d sparsematrixplot + syn keyword mvPkg_plots complexplot display inequal matrixplot polyhedraplot sphereplot + syn keyword mvPkg_plots complexplot3d display3d listcontplot odeplot replot surfdata + syn keyword mvPkg_plots conformal fieldplot listcontplot3d pareto rootlocus textplot + syn keyword mvPkg_plots contourplot fieldplot3d listdensityplot pointplot semilogplot textplot3d + syn keyword mvPkg_plots contourplot3d gradplot listplot pointplot3d setoptions tubeplot + syn keyword mvPkg_plots coordplot +endif + +" Package: plottools: basic graphical objects {{{2 +if exists("mv_plottools") + syn keyword mvPkg_plottools arc curve dodecahedron hyperbola pieslice semitorus + syn keyword mvPkg_plottools arrow cutin ellipse icosahedron point sphere + syn keyword mvPkg_plottools circle cutout ellipticArc line polygon tetrahedron + syn keyword mvPkg_plottools cone cylinder hemisphere octahedron rectangle torus + syn keyword mvPkg_plottools cuboid disk hexahedron +endif + +" Package: powseries: formal power series {{{2 +if exists("mv_powseries") + syn keyword mvPkg_powseries compose multiply powcreate powlog powsolve reversion + syn keyword mvPkg_powseries evalpow negative powdiff powpoly powsqrt subtract + syn keyword mvPkg_powseries inverse powadd powexp powseries quotient tpsform + syn keyword mvPkg_powseries multconst powcos powint powsin +endif + +" Package: process: (Unix)-multi-processing {{{2 +if exists("mv_process") + syn keyword mvPkg_process block fork pclose pipe popen wait + syn keyword mvPkg_process exec kill +endif + +" Package: simplex: linear optimization {{{2 +if exists("mv_simplex") + syn keyword mvPkg_simplex NONNEGATIVE cterm dual maximize pivoteqn setup + syn keyword mvPkg_simplex basis define_zero equality minimize pivotvar standardize + syn keyword mvPkg_simplex convexhull display feasible pivot ratio +endif + +" Package: stats: statistics {{{2 +if exists("mv_stats") + syn keyword mvPkg_stats anova describe fit random statevalf statplots +endif + +" Package: student: student calculus {{{2 +if exists("mv_student") + syn keyword mvPkg_student D Product distance isolate middlesum rightsum + syn keyword mvPkg_student Diff Sum equate leftbox midpoint showtangent + syn keyword mvPkg_student Doubleint Tripleint extrema leftsum minimize simpson + syn keyword mvPkg_student Int changevar integrand makeproc minimize slope + syn keyword mvPkg_student Limit combine intercept maximize powsubs trapezoid + syn keyword mvPkg_student Lineint completesquare intparts middlebox rightbox value + syn keyword mvPkg_student Point +endif + +" Package: sumtools: indefinite and definite sums {{{2 +if exists("mv_sumtools") + syn keyword mvPkg_sumtools Hypersum extended_gosper hyperrecursion hyperterm sumrecursion sumtohyper + syn keyword mvPkg_sumtools Sumtohyper gosper hypersum simpcomb +endif + +" Package: tensor: tensor computations and General Relativity {{{2 +if exists("mv_tensor") + syn keyword mvPkg_tensor Christoffel1 Riemann connexF display_allGR get_compts partial_diff + syn keyword mvPkg_tensor Christoffel2 RiemannF contract dual get_rank permute_indices + syn keyword mvPkg_tensor Einstein Weyl convertNP entermetric invars petrov + syn keyword mvPkg_tensor Jacobian act cov_diff exterior_diff invert prod + syn keyword mvPkg_tensor Killing_eqns antisymmetrize create exterior_prod lin_com raise + syn keyword mvPkg_tensor Levi_Civita change_basis d1metric frame lower symmetrize + syn keyword mvPkg_tensor Lie_diff commutator d2metric geodesic_eqns npcurve tensorsGR + syn keyword mvPkg_tensor Ricci compare directional_diff get_char npspin transform + syn keyword mvPkg_tensor Ricciscalar conj displayGR +endif + +" Package: totorder: total orders on names {{{2 +if exists("mv_totorder") + syn keyword mvPkg_totorder forget init ordering tassume tis +endif +" ===================================================================== + +" Highlighting: Define the default highlighting. {{{1 +" 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_maplev_syntax_inits") + if version < 508 + let did_maplev_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " Maple->Maple Links {{{2 + HiLink mvBraceError mvError + HiLink mvCurlyError mvError + HiLink mvDebug mvTodo + HiLink mvParenError mvError + HiLink mvPkg_DEtools mvPkgFunc + HiLink mvPkg_Galois mvPkgFunc + HiLink mvPkg_GaussInt mvPkgFunc + HiLink mvPkg_LREtools mvPkgFunc + HiLink mvPkg_combinat mvPkgFunc + HiLink mvPkg_combstruct mvPkgFunc + HiLink mvPkg_difforms mvPkgFunc + HiLink mvPkg_finance mvPkgFunc + HiLink mvPkg_genfunc mvPkgFunc + HiLink mvPkg_geometry mvPkgFunc + HiLink mvPkg_grobner mvPkgFunc + HiLink mvPkg_group mvPkgFunc + HiLink mvPkg_inttrans mvPkgFunc + HiLink mvPkg_liesymm mvPkgFunc + HiLink mvPkg_linalg mvPkgFunc + HiLink mvPkg_logic mvPkgFunc + HiLink mvPkg_networks mvPkgFunc + HiLink mvPkg_numapprox mvPkgFunc + HiLink mvPkg_numtheory mvPkgFunc + HiLink mvPkg_orthopoly mvPkgFunc + HiLink mvPkg_padic mvPkgFunc + HiLink mvPkg_plots mvPkgFunc + HiLink mvPkg_plottools mvPkgFunc + HiLink mvPkg_powseries mvPkgFunc + HiLink mvPkg_process mvPkgFunc + HiLink mvPkg_simplex mvPkgFunc + HiLink mvPkg_stats mvPkgFunc + HiLink mvPkg_student mvPkgFunc + HiLink mvPkg_sumtools mvPkgFunc + HiLink mvPkg_tensor mvPkgFunc + HiLink mvPkg_totorder mvPkgFunc + HiLink mvRange mvOper + HiLink mvSemiError mvError + HiLink mvDelim Delimiter + + " Maple->Standard Links {{{2 + HiLink mvAssign Delimiter + HiLink mvBool Boolean + HiLink mvComma Delimiter + HiLink mvComment Comment + HiLink mvCond Conditional + HiLink mvConstant Number + HiLink mvDelayEval Label + HiLink mvDcolon Delimiter + HiLink mvError Error + HiLink mvLibrary Statement + HiLink mvNumber Number + HiLink mvOper Operator + HiLink mvAssign Delimiter + HiLink mvPackage Type + HiLink mvPkgFunc Function + HiLink mvPktOption Special + HiLink mvRepeat Repeat + HiLink mvSpecial Special + HiLink mvStatement Statement + HiLink mvName String + HiLink mvString String + HiLink mvTodo Todo + + delcommand HiLink +endif + +" Current Syntax: {{{1 +let b:current_syntax = "maple" +" vim: ts=20 fdm=marker diff --git a/vim/bundle/ubuntu-vim72/syntax/masm.vim b/vim/bundle/ubuntu-vim72/syntax/masm.vim new file mode 100644 index 0000000..4ffd22b --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/masm.vim @@ -0,0 +1,343 @@ +" Vim syntax file +" Language: Microsoft Macro Assembler (80x86) +" Orig Author: Rob Brady +" Maintainer: Wu Yongwei +" Last Change: $Date: 2007/04/21 13:20:15 $ +" $Revision: 1.44 $ + +" 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 masmIdentifier "[@a-z_$?][@a-z0-9_$?]*" +syn match masmLabel "^\s*[@a-z_$?][@a-z0-9_$?]*:"he=e-1 + +syn match masmDecimal "[-+]\?\d\+[dt]\?" +syn match masmBinary "[-+]\?[0-1]\+[by]" "put this before hex or 0bfh dies! +syn match masmOctal "[-+]\?[0-7]\+[oq]" +syn match masmHexadecimal "[-+]\?[0-9]\x*h" +syn match masmFloatRaw "[-+]\?[0-9]\x*r" +syn match masmFloat "[-+]\?\d\+\.\(\d*\(E[-+]\?\d\+\)\?\)\?" + +syn match masmComment ";.*" contains=@Spell +syn region masmComment start=+COMMENT\s*\z(\S\)+ end=+\z1.*+ contains=@Spell +syn region masmString start=+'+ end=+'+ oneline contains=@Spell +syn region masmString start=+"+ end=+"+ oneline contains=@Spell + +syn region masmTitleArea start=+\" +syn match masmOperator "CARRY?" +syn match masmOperator "OVERFLOW?" +syn match masmOperator "PARITY?" +syn match masmOperator "SIGN?" +syn match masmOperator "ZERO?" +syn keyword masmDirective ALIAS ASSUME CATSTR COMM DB DD DF DOSSEG DQ DT +syn keyword masmDirective DW ECHO ELSE ELSEIF ELSEIF1 ELSEIF2 ELSEIFB +syn keyword masmDirective ELSEIFDEF ELSEIFDIF ELSEIFDIFI ELSEIFE +syn keyword masmDirective ELSEIFIDN ELSEIFIDNI ELSEIFNB ELSEIFNDEF END +syn keyword masmDirective ENDIF ENDM ENDP ENDS EQU EVEN EXITM EXTERN +syn keyword masmDirective EXTERNDEF EXTRN FOR FORC GOTO GROUP IF IF1 IF2 +syn keyword masmDirective IFB IFDEF IFDIF IFDIFI IFE IFIDN IFIDNI IFNB +syn keyword masmDirective IFNDEF INCLUDE INCLUDELIB INSTR INVOKE IRP +syn keyword masmDirective IRPC LABEL LOCAL MACRO NAME OPTION ORG PAGE +syn keyword masmDirective POPCONTEXT PROC PROTO PUBLIC PURGE PUSHCONTEXT +syn keyword masmDirective RECORD REPEAT REPT SEGMENT SIZESTR STRUC +syn keyword masmDirective STRUCT SUBSTR SUBTITLE SUBTTL TEXTEQU TITLE +syn keyword masmDirective TYPEDEF UNION WHILE +syn match masmDirective "\.8086\>" +syn match masmDirective "\.8087\>" +syn match masmDirective "\.NO87\>" +syn match masmDirective "\.186\>" +syn match masmDirective "\.286\>" +syn match masmDirective "\.286C\>" +syn match masmDirective "\.286P\>" +syn match masmDirective "\.287\>" +syn match masmDirective "\.386\>" +syn match masmDirective "\.386C\>" +syn match masmDirective "\.386P\>" +syn match masmDirective "\.387\>" +syn match masmDirective "\.486\>" +syn match masmDirective "\.486P\>" +syn match masmDirective "\.586\>" +syn match masmDirective "\.586P\>" +syn match masmDirective "\.686\>" +syn match masmDirective "\.686P\>" +syn match masmDirective "\.K3D\>" +syn match masmDirective "\.MMX\>" +syn match masmDirective "\.XMM\>" +syn match masmDirective "\.ALPHA\>" +syn match masmDirective "\.DOSSEG\>" +syn match masmDirective "\.SEQ\>" +syn match masmDirective "\.CODE\>" +syn match masmDirective "\.CONST\>" +syn match masmDirective "\.DATA\>" +syn match masmDirective "\.DATA?" +syn match masmDirective "\.EXIT\>" +syn match masmDirective "\.FARDATA\>" +syn match masmDirective "\.FARDATA?" +syn match masmDirective "\.MODEL\>" +syn match masmDirective "\.STACK\>" +syn match masmDirective "\.STARTUP\>" +syn match masmDirective "\.IF\>" +syn match masmDirective "\.ELSE\>" +syn match masmDirective "\.ELSEIF\>" +syn match masmDirective "\.ENDIF\>" +syn match masmDirective "\.REPEAT\>" +syn match masmDirective "\.UNTIL\>" +syn match masmDirective "\.UNTILCXZ\>" +syn match masmDirective "\.WHILE\>" +syn match masmDirective "\.ENDW\>" +syn match masmDirective "\.BREAK\>" +syn match masmDirective "\.CONTINUE\>" +syn match masmDirective "\.ERR\>" +syn match masmDirective "\.ERR1\>" +syn match masmDirective "\.ERR2\>" +syn match masmDirective "\.ERRB\>" +syn match masmDirective "\.ERRDEF\>" +syn match masmDirective "\.ERRDIF\>" +syn match masmDirective "\.ERRDIFI\>" +syn match masmDirective "\.ERRE\>" +syn match masmDirective "\.ERRIDN\>" +syn match masmDirective "\.ERRIDNI\>" +syn match masmDirective "\.ERRNB\>" +syn match masmDirective "\.ERRNDEF\>" +syn match masmDirective "\.ERRNZ\>" +syn match masmDirective "\.LALL\>" +syn match masmDirective "\.SALL\>" +syn match masmDirective "\.XALL\>" +syn match masmDirective "\.LFCOND\>" +syn match masmDirective "\.SFCOND\>" +syn match masmDirective "\.TFCOND\>" +syn match masmDirective "\.CREF\>" +syn match masmDirective "\.NOCREF\>" +syn match masmDirective "\.XCREF\>" +syn match masmDirective "\.LIST\>" +syn match masmDirective "\.NOLIST\>" +syn match masmDirective "\.XLIST\>" +syn match masmDirective "\.LISTALL\>" +syn match masmDirective "\.LISTIF\>" +syn match masmDirective "\.NOLISTIF\>" +syn match masmDirective "\.LISTMACRO\>" +syn match masmDirective "\.NOLISTMACRO\>" +syn match masmDirective "\.LISTMACROALL\>" +syn match masmDirective "\.FPO\>" +syn match masmDirective "\.RADIX\>" +syn match masmDirective "\.SAFESEH\>" +syn match masmDirective "%OUT\>" +syn match masmDirective "ALIGN\>" +syn match masmOption "ALIGN([0-9]\+)" + +syn keyword masmRegister AX BX CX DX SI DI BP SP +syn keyword masmRegister CS DS SS ES FS GS +syn keyword masmRegister AH BH CH DH AL BL CL DL +syn keyword masmRegister EAX EBX ECX EDX ESI EDI EBP ESP +syn keyword masmRegister CR0 CR2 CR3 CR4 +syn keyword masmRegister DR0 DR1 DR2 DR3 DR6 DR7 +syn keyword masmRegister TR3 TR4 TR5 TR6 TR7 +syn match masmRegister "ST([0-7])" + + +" Instruction prefixes +syn keyword masmOpcode LOCK REP REPE REPNE REPNZ REPZ + +" 8086/8088 opcodes +syn keyword masmOpcode AAA AAD AAM AAS ADC ADD AND CALL CBW CLC CLD +syn keyword masmOpcode CLI CMC CMP CMPS CMPSB CMPSW CWD DAA DAS DEC +syn keyword masmOpcode DIV ESC HLT IDIV IMUL IN INC INT INTO IRET +syn keyword masmOpcode JCXZ JMP LAHF LDS LEA LES LODS LODSB LODSW +syn keyword masmOpcode LOOP LOOPE LOOPEW LOOPNE LOOPNEW LOOPNZ +syn keyword masmOpcode LOOPNZW LOOPW LOOPZ LOOPZW MOV MOVS MOVSB +syn keyword masmOpcode MOVSW MUL NEG NOP NOT OR OUT POP POPF PUSH +syn keyword masmOpcode PUSHF RCL RCR RET RETF RETN ROL ROR SAHF SAL +syn keyword masmOpcode SAR SBB SCAS SCASB SCASW SHL SHR STC STD STI +syn keyword masmOpcode STOS STOSB STOSW SUB TEST WAIT XCHG XLAT XLATB +syn keyword masmOpcode XOR +syn match masmOpcode "J\(P[EO]\|\(N\?\([ABGL]E\?\|[CEOPSZ]\)\)\)\>" + +" 80186 opcodes +syn keyword masmOpcode BOUND ENTER INS INSB INSW LEAVE OUTS OUTSB +syn keyword masmOpcode OUTSW POPA PUSHA PUSHW + +" 80286 opcodes +syn keyword masmOpcode ARPL LAR LSL SGDT SIDT SLDT SMSW STR VERR VERW + +" 80286/80386 privileged opcodes +syn keyword masmOpcode CLTS LGDT LIDT LLDT LMSW LTR + +" 80386 opcodes +syn keyword masmOpcode BSF BSR BT BTC BTR BTS CDQ CMPSD CWDE INSD +syn keyword masmOpcode IRETD IRETDF IRETF JECXZ LFS LGS LODSD LOOPD +syn keyword masmOpcode LOOPED LOOPNED LOOPNZD LOOPZD LSS MOVSD MOVSX +syn keyword masmOpcode MOVZX OUTSD POPAD POPFD PUSHAD PUSHD PUSHFD +syn keyword masmOpcode SCASD SHLD SHRD STOSD +syn match masmOpcode "SET\(P[EO]\|\(N\?\([ABGL]E\?\|[CEOPSZ]\)\)\)\>" + +" 80486 opcodes +syn keyword masmOpcode BSWAP CMPXCHG INVD INVLPG WBINVD XADD + +" Floating-point opcodes as of 487 +syn keyword masmOpFloat F2XM1 FABS FADD FADDP FBLD FBSTP FCHS FCLEX +syn keyword masmOpFloat FNCLEX FCOM FCOMP FCOMPP FCOS FDECSTP FDISI +syn keyword masmOpFloat FNDISI FDIV FDIVP FDIVR FDIVRP FENI FNENI +syn keyword masmOpFloat FFREE FIADD FICOM FICOMP FIDIV FIDIVR FILD +syn keyword masmOpFloat FIMUL FINCSTP FINIT FNINIT FIST FISTP FISUB +syn keyword masmOpFloat FISUBR FLD FLDCW FLDENV FLDLG2 FLDLN2 FLDL2E +syn keyword masmOpFloat FLDL2T FLDPI FLDZ FLD1 FMUL FMULP FNOP FPATAN +syn keyword masmOpFloat FPREM FPREM1 FPTAN FRNDINT FRSTOR FSAVE FNSAVE +syn keyword masmOpFloat FSCALE FSETPM FSIN FSINCOS FSQRT FST FSTCW +syn keyword masmOpFloat FNSTCW FSTENV FNSTENV FSTP FSTSW FNSTSW FSUB +syn keyword masmOpFloat FSUBP FSUBR FSUBRP FTST FUCOM FUCOMP FUCOMPP +syn keyword masmOpFloat FWAIT FXAM FXCH FXTRACT FYL2X FYL2XP1 + +" Floating-point opcodes in Pentium and later processors +syn keyword masmOpFloat FCMOVE FCMOVNE FCMOVB FCMOVBE FCMOVNB FCMOVNBE +syn keyword masmOpFloat FCMOVU FCMOVNU FCOMI FUCOMI FCOMIP FUCOMIP +syn keyword masmOpFloat FXSAVE FXRSTOR + +" MMX opcodes (Pentium w/ MMX, Pentium II, and later) +syn keyword masmOpcode MOVD MOVQ PACKSSWB PACKSSDW PACKUSWB +syn keyword masmOpcode PUNPCKHBW PUNPCKHWD PUNPCKHDQ +syn keyword masmOpcode PUNPCKLBW PUNPCKLWD PUNPCKLDQ +syn keyword masmOpcode PADDB PADDW PADDD PADDSB PADDSW PADDUSB PADDUSW +syn keyword masmOpcode PSUBB PSUBW PSUBD PSUBSB PSUBSW PSUBUSB PSUBUSW +syn keyword masmOpcode PMULHW PMULLW PMADDWD +syn keyword masmOpcode PCMPEQB PCMPEQW PCMPEQD PCMPGTB PCMPGTW PCMPGTD +syn keyword masmOpcode PAND PANDN POR PXOR +syn keyword masmOpcode PSLLW PSLLD PSLLQ PSRLW PSRLD PSRLQ PSRAW PSRAD +syn keyword masmOpcode EMMS + +" SSE opcodes (Pentium III and later) +syn keyword masmOpcode MOVAPS MOVUPS MOVHPS MOVHLPS MOVLPS MOVLHPS +syn keyword masmOpcode MOVMSKPS MOVSS +syn keyword masmOpcode ADDPS ADDSS SUBPS SUBSS MULPS MULSS DIVPS DIVSS +syn keyword masmOpcode RCPPS RCPSS SQRTPS SQRTSS RSQRTPS RSQRTSS +syn keyword masmOpcode MAXPS MAXSS MINPS MINSS +syn keyword masmOpcode CMPPS CMPSS COMISS UCOMISS +syn keyword masmOpcode ANDPS ANDNPS ORPS XORPS +syn keyword masmOpcode SHUFPS UNPCKHPS UNPCKLPS +syn keyword masmOpcode CVTPI2PS CVTSI2SS CVTPS2PI CVTTPS2PI +syn keyword masmOpcode CVTSS2SI CVTTSS2SI +syn keyword masmOpcode LDMXCSR STMXCSR +syn keyword masmOpcode PAVGB PAVGW PEXTRW PINSRW PMAXUB PMAXSW +syn keyword masmOpcode PMINUB PMINSW PMOVMSKB PMULHUW PSADBW PSHUFW +syn keyword masmOpcode MASKMOVQ MOVNTQ MOVNTPS SFENCE +syn keyword masmOpcode PREFETCHT0 PREFETCHT1 PREFETCHT2 PREFETCHNTA + +" SSE2 opcodes (Pentium 4 and later) +syn keyword masmOpcode MOVAPD MOVUPD MOVHPD MOVLPD MOVMSKPD MOVSD +syn keyword masmOpcode ADDPD ADDSD SUBPD SUBSD MULPD MULSD DIVPD DIVSD +syn keyword masmOpcode SQRTPD SQRTSD MAXPD MAXSD MINPD MINSD +syn keyword masmOpcode ANDPD ANDNPD ORPD XORPD +syn keyword masmOpcode CMPPD CMPSD COMISD UCOMISD +syn keyword masmOpcode SHUFPD UNPCKHPD UNPCKLPD +syn keyword masmOpcode CVTPD2PI CVTTPD2PI CVTPI2PD CVTPD2DQ +syn keyword masmOpcode CVTTPD2DQ CVTDQ2PD CVTPS2PD CVTPD2PS +syn keyword masmOpcode CVTSS2SD CVTSD2SS CVTSD2SI CVTTSD2SI CVTSI2SD +syn keyword masmOpcode CVTDQ2PS CVTPS2DQ CVTTPS2DQ +syn keyword masmOpcode MOVDQA MOVDQU MOVQ2DQ MOVDQ2Q PMULUDQ +syn keyword masmOpcode PADDQ PSUBQ PSHUFLW PSHUFHW PSHUFD +syn keyword masmOpcode PSLLDQ PSRLDQ PUNPCKHQDQ PUNPCKLQDQ +syn keyword masmOpcode CLFLUSH LFENCE MFENCE PAUSE MASKMOVDQU +syn keyword masmOpcode MOVNTPD MOVNTDQ MOVNTI + +" SSE3 opcodes (Pentium 4 w/ Hyper-Threading and later) +syn keyword masmOpcode FISTTP LDDQU ADDSUBPS ADDSUBPD +syn keyword masmOpcode HADDPS HSUBPS HADDPD HSUBPD +syn keyword masmOpcode MOVSHDUP MOVSLDUP MOVDDUP MONITOR MWAIT + +" Other opcodes in Pentium and later processors +syn keyword masmOpcode CMPXCHG8B CPUID UD2 +syn keyword masmOpcode RSM RDMSR WRMSR RDPMC RDTSC SYSENTER SYSEXIT +syn match masmOpcode "CMOV\(P[EO]\|\(N\?\([ABGL]E\?\|[CEOPSZ]\)\)\)\>" + + +" 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_masm_syntax_inits") + if version < 508 + let did_masm_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " The default methods for highlighting. Can be overridden later + HiLink masmLabel PreProc + HiLink masmComment Comment + HiLink masmDirective Statement + HiLink masmType Type + HiLink masmOperator Type + HiLink masmOption Special + HiLink masmRegister Special + HiLink masmString String + HiLink masmText String + HiLink masmTitle Title + HiLink masmOpcode Statement + HiLink masmOpFloat Statement + + HiLink masmHexadecimal Number + HiLink masmDecimal Number + HiLink masmOctal Number + HiLink masmBinary Number + HiLink masmFloatRaw Number + HiLink masmFloat Number + + HiLink masmIdentifier Identifier + + syntax sync minlines=50 + + delcommand HiLink +endif + +let b:current_syntax = "masm" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/mason.vim b/vim/bundle/ubuntu-vim72/syntax/mason.vim new file mode 100644 index 0000000..40bdb0e --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/mason.vim @@ -0,0 +1,99 @@ +" Vim syntax file +" Language: Mason (Perl embedded in HTML) +" Maintainer: Andrew Smith +" Last change: 2003 May 11 +" URL: http://www.masonhq.com/editors/mason.vim +" +" This seems to work satisfactorily with html.vim and perl.vim for version 5.5. +" Please mail any fixes or improvements to the above address. Things that need +" doing include: +" +" - Add match for component names in <& &> blocks. +" - Add match for component names in <%def> and <%method> block delimiters. +" - Fix <%text> blocks to show HTML tags but ignore Mason tags. +" + +" Clear previous syntax settings unless this is v6 or above, in which case just +" exit without doing anything. +" +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +" The HTML syntax file included below uses this variable. +" +if !exists("main_syntax") + let main_syntax = 'mason' +endif + +" First pull in the HTML syntax. +" +if version < 600 + so :p:h/html.vim +else + runtime! syntax/html.vim + unlet b:current_syntax +endif + +syn cluster htmlPreproc add=@masonTop + +" Now pull in the Perl syntax. +" +if version < 600 + syn include @perlTop :p:h/perl.vim +else + syn include @perlTop syntax/perl.vim +endif + +" It's hard to reduce down to the correct sub-set of Perl to highlight in some +" of these cases so I've taken the safe option of just using perlTop in all of +" them. If you have any suggestions, please let me know. +" +syn region masonLine matchgroup=Delimiter start="^%" end="$" contains=@perlTop +syn region masonExpr matchgroup=Delimiter start="<%" end="%>" contains=@perlTop +syn region masonPerl matchgroup=Delimiter start="<%perl>" end="" contains=@perlTop +syn region masonComp keepend matchgroup=Delimiter start="<&" end="&>" contains=@perlTop + +syn region masonArgs matchgroup=Delimiter start="<%args>" end="" contains=@perlTop + +syn region masonInit matchgroup=Delimiter start="<%init>" end="" contains=@perlTop +syn region masonCleanup matchgroup=Delimiter start="<%cleanup>" end="" contains=@perlTop +syn region masonOnce matchgroup=Delimiter start="<%once>" end="" contains=@perlTop +syn region masonShared matchgroup=Delimiter start="<%shared>" end="" contains=@perlTop + +syn region masonDef matchgroup=Delimiter start="<%def[^>]*>" end="" contains=@htmlTop +syn region masonMethod matchgroup=Delimiter start="<%method[^>]*>" end="" contains=@htmlTop + +syn region masonFlags matchgroup=Delimiter start="<%flags>" end="" contains=@perlTop +syn region masonAttr matchgroup=Delimiter start="<%attr>" end="" contains=@perlTop + +syn region masonFilter matchgroup=Delimiter start="<%filter>" end="" contains=@perlTop + +syn region masonDoc matchgroup=Delimiter start="<%doc>" end="" +syn region masonText matchgroup=Delimiter start="<%text>" end="" + +syn cluster masonTop contains=masonLine,masonExpr,masonPerl,masonComp,masonArgs,masonInit,masonCleanup,masonOnce,masonShared,masonDef,masonMethod,masonFlags,masonAttr,masonFilter,masonDoc,masonText + +" Set up default highlighting. Almost all of this is done in the included +" syntax files. +" +if version >= 508 || !exists("did_mason_syn_inits") + if version < 508 + let did_mason_syn_inits = 1 + com -nargs=+ HiLink hi link + else + com -nargs=+ HiLink hi def link + endif + + HiLink masonDoc Comment + + delc HiLink +endif + +let b:current_syntax = "mason" + +if main_syntax == 'mason' + unlet main_syntax +endif diff --git a/vim/bundle/ubuntu-vim72/syntax/master.vim b/vim/bundle/ubuntu-vim72/syntax/master.vim new file mode 100644 index 0000000..40d644e --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/master.vim @@ -0,0 +1,50 @@ +" Vim syntax file +" Language: Focus Master File +" Maintainer: Rob Brady +" Last Change: $Date: 2004/06/13 15:54:03 $ +" URL: http://www.datatone.com/~robb/vim/syntax/master.vim +" $Revision: 1.1 $ + +" this is a very simple syntax file - I will be improving it +" add entire DEFINE syntax + +" 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 match + +" A bunch of useful keywords +syn keyword masterKeyword FILENAME SUFFIX SEGNAME SEGTYPE PARENT FIELDNAME +syn keyword masterKeyword FIELD ALIAS USAGE INDEX MISSING ON +syn keyword masterKeyword FORMAT CRFILE CRKEY +syn keyword masterDefine DEFINE DECODE EDIT +syn region masterString start=+"+ end=+"+ +syn region masterString start=+'+ end=+'+ +syn match masterComment "\$.*" + +" 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_master_syntax_inits") + if version < 508 + let did_master_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink masterKeyword Keyword + HiLink masterComment Comment + HiLink masterString String + + delcommand HiLink +endif + +let b:current_syntax = "master" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/matlab.vim b/vim/bundle/ubuntu-vim72/syntax/matlab.vim new file mode 100644 index 0000000..0e281c1 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/matlab.vim @@ -0,0 +1,126 @@ +" Vim syntax file +" Language: Matlab +" Maintainer: Maurizio Tranchero - maurizio.tranchero@gmail.com +" Credits: Preben 'Peppe' Guldberg +" Original author: Mario Eusebio +" Change History: +" Sat Jul 25 16:14:55 CEST 2009 +" - spell check enabled only for comments (thanks to James Vega) +" +" Tue Apr 21 10:03:31 CEST 2009 +" - added object oriented support +" - added multi-line comments %{ ...\n... %} + +" 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 keyword matlabStatement return +syn keyword matlabLabel case switch +syn keyword matlabConditional else elseif end if otherwise +syn keyword matlabRepeat do for while +" MT_ADDON - added exception-specific keywords +syn keyword matlabExceptions try catch +syn keyword matlabOO classdef properties events methods + +syn keyword matlabTodo contained TODO + +" If you do not want these operators lit, uncommment them and the "hi link" below +syn match matlabArithmeticOperator "[-+]" +syn match matlabArithmeticOperator "\.\=[*/\\^]" +syn match matlabRelationalOperator "[=~]=" +syn match matlabRelationalOperator "[<>]=\=" +syn match matlabLogicalOperator "[&|~]" + +syn match matlabLineContinuation "\.\{3}" + +"syn match matlabIdentifier "\<\a\w*\>" + +" String +" MT_ADDON - added 'skip' in order to deal with 'tic' escaping sequence +syn region matlabString start=+'+ end=+'+ oneline skip=+''+ contains=@Spell + +" If you don't like tabs +syn match matlabTab "\t" + +" Standard numbers +syn match matlabNumber "\<\d\+[ij]\=\>" +" floating point number, with dot, optional exponent +syn match matlabFloat "\<\d\+\(\.\d*\)\=\([edED][-+]\=\d\+\)\=[ij]\=\>" +" floating point number, starting with a dot, optional exponent +syn match matlabFloat "\.\d\+\([edED][-+]\=\d\+\)\=[ij]\=\>" + +" Transpose character and delimiters: Either use just [...] or (...) aswell +syn match matlabDelimiter "[][]" +"syn match matlabDelimiter "[][()]" +syn match matlabTransposeOperator "[])a-zA-Z0-9.]'"lc=1 + +syn match matlabSemicolon ";" + +syn match matlabComment "%.*$" contains=matlabTodo,matlabTab,@Spell +" MT_ADDON - correctly highlights words after '...' as comments +syn match matlabComment "\.\.\..*$" contains=matlabTodo,matlabTab,@Spell +syn region matlabMultilineComment start=+%{+ end=+%}+ contains=matlabTodo,matlabTab,@Spell + +syn keyword matlabOperator break zeros default margin round ones rand +syn keyword matlabOperator ceil floor size clear zeros eye mean std cov + +syn keyword matlabFunction error eval function + +syn keyword matlabImplicit abs acos atan asin cos cosh exp log prod sum +syn keyword matlabImplicit log10 max min sign sin sqrt tan reshape + +syn match matlabError "-\=\<\d\+\.\d\+\.[^*/\\^]" +syn match matlabError "-\=\<\d\+\.\d\+[eEdD][-+]\=\d\+\.\([^*/\\^]\)" + +" 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_matlab_syntax_inits") + if version < 508 + let did_matlab_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink matlabTransposeOperator matlabOperator + HiLink matlabOperator Operator + HiLink matlabLineContinuation Special + HiLink matlabLabel Label + HiLink matlabConditional Conditional + HiLink matlabExceptions Conditional + HiLink matlabRepeat Repeat + HiLink matlabTodo Todo + HiLink matlabString String + HiLink matlabDelimiter Identifier + HiLink matlabTransposeOther Identifier + HiLink matlabNumber Number + HiLink matlabFloat Float + HiLink matlabFunction Function + HiLink matlabError Error + HiLink matlabImplicit matlabStatement + HiLink matlabStatement Statement + HiLink matlabOO Statement + HiLink matlabSemicolon SpecialChar + HiLink matlabComment Comment + HiLink matlabMultilineComment Comment + + HiLink matlabArithmeticOperator matlabOperator + HiLink matlabRelationalOperator matlabOperator + HiLink matlabLogicalOperator matlabOperator + +"optional highlighting + "HiLink matlabIdentifier Identifier + "HiLink matlabTab Error + + delcommand HiLink +endif + +let b:current_syntax = "matlab" + +"EOF vim: ts=8 noet tw=100 sw=8 sts=0 diff --git a/vim/bundle/ubuntu-vim72/syntax/maxima.vim b/vim/bundle/ubuntu-vim72/syntax/maxima.vim new file mode 100644 index 0000000..27dcc18 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/maxima.vim @@ -0,0 +1,274 @@ +" Vim syntax file +" Language: Maxima (symbolic algebra program) +" Maintainer: Robert Dodier (robert.dodier@gmail.com) +" Last Change: April 6, 2006 +" Version: 1 +" Adapted mostly from xmath.vim +" Number formats adapted from r.vim +" +" 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 sync lines=1000 + +" parenthesis sanity checker +syn region maximaZone matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" transparent contains=ALLBUT,maximaError,maximaBraceError,maximaCurlyError +syn region maximaZone matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" transparent contains=ALLBUT,maximaError,maximaBraceError,maximaParenError +syn region maximaZone matchgroup=Delimiter start="\[" matchgroup=Delimiter end="]" transparent contains=ALLBUT,maximaError,maximaCurlyError,maximaParenError +syn match maximaError "[)\]}]" +syn match maximaBraceError "[)}]" contained +syn match maximaCurlyError "[)\]]" contained +syn match maximaParenError "[\]}]" contained +syn match maximaComma "[\[\](),;]" +syn match maximaComma "\.\.\.$" + +" A bunch of useful maxima keywords +syn keyword maximaConditional if then else elseif and or not +syn keyword maximaRepeat do for thru + +" ---------------------- BEGIN LIST OF ALL FUNCTIONS (EXCEPT KEYWORDS) ---------------------- +syn keyword maximaFunc abasep abs absboxchar absint acos acosh acot acoth acsc +syn keyword maximaFunc acsch activate activecontexts addcol additive addrow adim +syn keyword maximaFunc adjoint af aform airy algebraic algepsilon algexact algsys +syn keyword maximaFunc alg_type alias aliases allbut all_dotsimp_denoms allroots allsym +syn keyword maximaFunc alphabetic antid antidiff antisymmetric append appendfile +syn keyword maximaFunc apply apply1 apply2 applyb1 apropos args array arrayapply +syn keyword maximaFunc arrayinfo arraymake arrays asec asech asin asinh askexp +syn keyword maximaFunc askinteger asksign assoc assoc_legendre_p assoc_legendre_q assume +syn keyword maximaFunc assume_pos assume_pos_pred assumescalar asymbol asympa at atan +syn keyword maximaFunc atan2 atanh atensimp atom atomgrad atrig1 atvalue augcoefmatrix +syn keyword maximaFunc av backsubst backtrace bashindices batch batchload bc2 bdvac +syn keyword maximaFunc berlefact bern bernpoly bessel besselexpand bessel_i bessel_j +syn keyword maximaFunc bessel_k bessel_y beta bezout bffac bfhzeta bfloat bfloatp +syn keyword maximaFunc bfpsi bfpsi0 bftorat bftrunc bfzeta bimetric binomial block +syn keyword maximaFunc bothcoef box boxchar break breakup bug_report build_info buildq +syn keyword maximaFunc burn cabs canform canten carg cartan catch cauchysum cbffac +syn keyword maximaFunc cdisplay cf cfdisrep cfexpand cflength cframe_flag cgeodesic +syn keyword maximaFunc changename changevar charpoly checkdiv check_overlaps christof +syn keyword maximaFunc clear_rules closefile closeps cmetric cnonmet_flag coeff +syn keyword maximaFunc coefmatrix cograd col collapse columnvector combine commutative +syn keyword maximaFunc comp2pui compfile compile compile_file components concan concat +syn keyword maximaFunc conj conjugate conmetderiv cons constant constantp cont2part +syn keyword maximaFunc content context contexts contortion contract contragrad coord +syn keyword maximaFunc copylist copymatrix cos cosh cosnpiflag cot coth covdiff +syn keyword maximaFunc covect create_list csc csch csetup ctaylor ctaypov ctaypt +syn keyword maximaFunc ctayswitch ctayvar ct_coords ct_coordsys ctorsion_flag ctransform +syn keyword maximaFunc ctrgsimp current_let_rule_package dblint deactivate debugmode +syn keyword maximaFunc declare declare_translated declare_weight decsym +syn keyword maximaFunc default_let_rule_package defcon define define_variable defint +syn keyword maximaFunc defmatch defrule deftaylor del delete deleten delta demo +syn keyword maximaFunc demoivre denom dependencies depends derivabbrev derivdegree +syn keyword maximaFunc derivlist derivsubst describe desolve determinant detout +syn keyword maximaFunc diagmatrix diagmatrixp diagmetric diff dim dimension direct +syn keyword maximaFunc disolate disp dispcon dispflag dispform dispfun display +syn keyword maximaFunc display2d display_format_internal disprule dispterms distrib +syn keyword maximaFunc divide divsum doallmxops domain domxexpt domxmxops domxnctimes +syn keyword maximaFunc dontfactor doscmxops doscmxplus dot0nscsimp dot0simp dot1simp +syn keyword maximaFunc dotassoc dotconstrules dotdistrib dotexptsimp dotident dotscrules +syn keyword maximaFunc dotsimp dpart dscalar %e echelon %edispflag eigenvalues +syn keyword maximaFunc eigenvectors eighth einstein eivals eivects ele2comp +syn keyword maximaFunc ele2polynome ele2pui elem eliminate elliptic_e elliptic_ec +syn keyword maximaFunc elliptic_eu elliptic_f elliptic_kc elliptic_pi ematrix %emode +syn keyword maximaFunc endcons entermatrix entertensor entier %enumer equal equalp erf +syn keyword maximaFunc erfflag errcatch error errormsg error_size error_syms +syn keyword maximaFunc %e_to_numlog euler ev eval evenp every evflag evfun evundiff +syn keyword maximaFunc example exp expand expandwrt expandwrt_denom expandwrt_factored +syn keyword maximaFunc explose expon exponentialize expop express expt exptdispflag +syn keyword maximaFunc exptisolate exptsubst extdiff extract_linear_equations ezgcd +syn keyword maximaFunc facexpand factcomb factlim factor factorflag factorial factorout +syn keyword maximaFunc factorsum facts false fast_central_elements fast_linsolve +syn keyword maximaFunc fasttimes fb feature featurep features fft fib fibtophi fifth +syn keyword maximaFunc filename_merge file_search file_search_demo file_search_lisp +syn keyword maximaFunc file_search_maxima file_type fillarray findde first fix flatten +syn keyword maximaFunc flipflag float float2bf floatnump flush flush1deriv flushd +syn keyword maximaFunc flushnd forget fortindent fortran fortspaces fourcos fourexpand +syn keyword maximaFunc fourier fourint fourintcos fourintsin foursimp foursin fourth +syn keyword maximaFunc fpprec fpprintprec frame_bracket freeof fullmap fullmapl +syn keyword maximaFunc fullratsimp fullratsubst funcsolve functions fundef funmake funp +syn keyword maximaFunc gamma %gamma gammalim gauss gcd gcdex gcfactor gdet genfact +syn keyword maximaFunc genindex genmatrix gensumnum get getchar gfactor gfactorsum +syn keyword maximaFunc globalsolve go gradef gradefs gramschmidt grind grobner_basis +syn keyword maximaFunc gschmit hach halfangles hermite hipow hodge horner i0 i1 +syn keyword maximaFunc *read-base* ic1 ic2 icc1 icc2 ic_convert ichr1 ichr2 icounter +syn keyword maximaFunc icurvature ident idiff idim idummy idummyx ieqn ieqnprint ifb +syn keyword maximaFunc ifc1 ifc2 ifg ifgi ifr iframe_bracket_form iframes ifri ift +syn keyword maximaFunc igeodesic_coords igeowedge_flag ikt1 ikt2 ilt imagpart imetric +syn keyword maximaFunc inchar indexed_tensor indices inf %inf infeval infinity infix +syn keyword maximaFunc inflag infolists init_atensor init_ctensor inm inmc1 inmc2 +syn keyword maximaFunc innerproduct in_netmath inpart inprod inrt integerp integrate +syn keyword maximaFunc integrate_use_rootsof integration_constant_counter interpolate +syn keyword maximaFunc intfaclim intopois intosum intpolabs intpolerror intpolrel +syn keyword maximaFunc invariant1 invariant2 inverse_jacobi_cd inverse_jacobi_cn +syn keyword maximaFunc inverse_jacobi_cs inverse_jacobi_dc inverse_jacobi_dn +syn keyword maximaFunc inverse_jacobi_ds inverse_jacobi_nc inverse_jacobi_nd +syn keyword maximaFunc inverse_jacobi_ns inverse_jacobi_sc inverse_jacobi_sd +syn keyword maximaFunc inverse_jacobi_sn invert is ishow isolate isolate_wrt_times +syn keyword maximaFunc isqrt itr j0 j1 jacobi jacobi_cd jacobi_cn jacobi_cs jacobi_dc +syn keyword maximaFunc jacobi_dn jacobi_ds jacobi_nc jacobi_nd jacobi_ns jacobi_sc +syn keyword maximaFunc jacobi_sd jacobi_sn jn kdels kdelta keepfloat kill killcontext +syn keyword maximaFunc kinvariant kostka kt labels lambda laplace lassociative last +syn keyword maximaFunc lc2kdt lc_l lcm lc_u ldefint ldisp ldisplay leinstein length +syn keyword maximaFunc let letrat let_rule_packages letrules letsimp levi_civita lfg +syn keyword maximaFunc lfreeof lg lgtreillis lhospitallim lhs liediff limit limsubst +syn keyword maximaFunc linear linechar linel linenum linsolve linsolve_params +syn keyword maximaFunc linsolvewarn listarith listarray listconstvars listdummyvars +syn keyword maximaFunc list_nc_monomials listoftens listofvars listp lmxchar load +syn keyword maximaFunc loadfile loadprint local log logabs logarc logconcoeffp +syn keyword maximaFunc logcontract logexpand lognegint lognumer logsimp lopow +syn keyword maximaFunc lorentz_gauge lpart lratsubst lriem lriemann lsum ltreillis +syn keyword maximaFunc m1pbranch macroexpansion mainvar make_array makebox makefact +syn keyword maximaFunc makegamma makelist make_random_state make_transform map mapatom +syn keyword maximaFunc maperror maplist matchdeclare matchfix matrix matrix_element_add +syn keyword maximaFunc matrix_element_mult matrix_element_transpose matrixmap matrixp +syn keyword maximaFunc mattrace max maxapplydepth maxapplyheight maxnegex maxposex +syn keyword maximaFunc maxtayorder member min %minf minfactorial minor mod +syn keyword maximaFunc mode_check_errorp mode_checkp mode_check_warnp mode_declare +syn keyword maximaFunc mode_identity modulus mon2schur mono monomial_dimensions +syn keyword maximaFunc multi_elem multinomial multi_orbit multiplicative multiplicities +syn keyword maximaFunc multi_pui multsym multthru myoptions nc_degree ncexpt ncharpoly +syn keyword maximaFunc negdistrib negsumdispflag newcontext newdet newton niceindices +syn keyword maximaFunc niceindicespref ninth nm nmc noeval nolabels nonmetricity +syn keyword maximaFunc nonscalar nonscalarp noun noundisp nounify nouns np npi +syn keyword maximaFunc nptetrad nroots nterms ntermst nthroot ntrig num numberp numer +syn keyword maximaFunc numerval numfactor nusum obase oddp ode2 op openplot_curves +syn keyword maximaFunc operatorp opproperties opsubst optimize optimprefix optionset +syn keyword maximaFunc orbit ordergreat ordergreatp orderless orderlessp outative +syn keyword maximaFunc outchar outermap outofpois packagefile pade part part2cont +syn keyword maximaFunc partfrac partition partpol partswitch permanent permut petrov +syn keyword maximaFunc pfeformat pi pickapart piece playback plog plot2d plot2d_ps +syn keyword maximaFunc plot3d plot_options poisdiff poisexpt poisint poislim poismap +syn keyword maximaFunc poisplus poissimp poisson poissubst poistimes poistrim polarform +syn keyword maximaFunc polartorect polynome2ele posfun potential powerdisp powers +syn keyword maximaFunc powerseries pred prederror primep print printpois printprops +syn keyword maximaFunc prodhack prodrac product programmode prompt properties props +syn keyword maximaFunc propvars pscom psdraw_curve psexpand psi pui pui2comp pui2ele +syn keyword maximaFunc pui2polynome pui_direct puireduc put qput qq quad_qag quad_qagi +syn keyword maximaFunc quad_qags quad_qawc quad_qawf quad_qawo quad_qaws quanc8 quit +syn keyword maximaFunc qunit quotient radcan radexpand radsubstflag random rank +syn keyword maximaFunc rassociative rat ratalgdenom ratchristof ratcoef ratdenom +syn keyword maximaFunc ratdenomdivide ratdiff ratdisrep rateinstein ratepsilon ratexpand +syn keyword maximaFunc ratfac ratmx ratnumer ratnump ratp ratprint ratriemann ratsimp +syn keyword maximaFunc ratsimpexpons ratsubst ratvars ratweight ratweights ratweyl +syn keyword maximaFunc ratwtlvl read readonly realonly realpart realroots rearray +syn keyword maximaFunc rectform recttopolar rediff refcheck rem remainder remarray +syn keyword maximaFunc rembox remcomps remcon remcoord remfun remfunction remlet +syn keyword maximaFunc remove remrule remsym remvalue rename reset residue resolvante +syn keyword maximaFunc resolvante_alternee1 resolvante_bipartite resolvante_diedrale +syn keyword maximaFunc resolvante_klein resolvante_klein3 resolvante_produit_sym +syn keyword maximaFunc resolvante_unitaire resolvante_vierer rest resultant return +syn keyword maximaFunc reveal reverse revert revert2 rhs ric ricci riem riemann +syn keyword maximaFunc rinvariant risch rmxchar rncombine %rnum_list romberg rombergabs +syn keyword maximaFunc rombergit rombergmin rombergtol room rootsconmode rootscontract +syn keyword maximaFunc rootsepsilon round row run_testsuite save savedef savefactors +syn keyword maximaFunc scalarmatrixp scalarp scalefactors scanmap schur2comp sconcat +syn keyword maximaFunc scsimp scurvature sec sech second setcheck setcheckbreak +syn keyword maximaFunc setelmx set_plot_option set_random_state setup_autoload +syn keyword maximaFunc set_up_dot_simplifications setval seventh sf show showcomps +syn keyword maximaFunc showratvars showtime sign signum similaritytransform simpsum +syn keyword maximaFunc simtran sin sinh sinnpiflag sixth solve solvedecomposes +syn keyword maximaFunc solveexplicit solvefactors solve_inconsistent_error solvenullwarn +syn keyword maximaFunc solveradcan solvetrigwarn somrac sort sparse spherical_bessel_j +syn keyword maximaFunc spherical_bessel_y spherical_hankel1 spherical_hankel2 +syn keyword maximaFunc spherical_harmonic splice sqfr sqrt sqrtdispflag sstatus +syn keyword maximaFunc stardisp status string stringout sublis sublis_apply_lambda +syn keyword maximaFunc sublist submatrix subst substinpart substpart subvarp sum +syn keyword maximaFunc sumcontract sumexpand sumhack sumsplitfact supcontext symbolp +syn keyword maximaFunc symmetric symmetricp system tan tanh taylor taylordepth +syn keyword maximaFunc taylorinfo taylor_logexpand taylor_order_coefficients taylorp +syn keyword maximaFunc taylor_simplifier taylor_truncate_polynomials taytorat tcl_output +syn keyword maximaFunc tcontract tellrat tellsimp tellsimpafter tensorkill tentex tenth +syn keyword maximaFunc tex %th third throw time timer timer_devalue timer_info +syn keyword maximaFunc tldefint tlimit tlimswitch todd_coxeter to_lisp totaldisrep +syn keyword maximaFunc totalfourier totient tpartpol tr trace trace_options +syn keyword maximaFunc transcompile translate translate_file transpose transrun +syn keyword maximaFunc tr_array_as_ref tr_bound_function_applyp treillis treinat +syn keyword maximaFunc tr_file_tty_messagesp tr_float_can_branch_complex +syn keyword maximaFunc tr_function_call_default triangularize trigexpand trigexpandplus +syn keyword maximaFunc trigexpandtimes triginverses trigrat trigreduce trigsign trigsimp +syn keyword maximaFunc tr_numer tr_optimize_max_loop tr_semicompile tr_state_vars true +syn keyword maximaFunc trunc truncate tr_warn_bad_function_calls tr_warn_fexpr +syn keyword maximaFunc tr_warnings_get tr_warn_meval tr_warn_mode tr_warn_undeclared +syn keyword maximaFunc tr_warn_undefined_variable tr_windy ttyoff ueivects ufg ug +syn keyword maximaFunc ultraspherical undiff uniteigenvectors unitvector unknown unorder +syn keyword maximaFunc unsum untellrat untimer untrace uric uricci uriem uriemann +syn keyword maximaFunc use_fast_arrays uvect values vect_cross vectorpotential +syn keyword maximaFunc vectorsimp verb verbify verbose weyl with_stdout writefile +syn keyword maximaFunc xgraph_curves xthru zerobern zeroequiv zeromatrix zeta zeta%pi +syn match maximaOp "[\*\/\+\-\#\!\~\^\=\:\<\>\@]" +" ---------------------- END LIST OF ALL FUNCTIONS (EXCEPT KEYWORDS) ---------------------- + + +syn case match + +" Labels (supports maxima's goto) +syn match maximaLabel "^\s*<[a-zA-Z_][a-zA-Z0-9%_]*>" + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match maximaSpecial contained "\\\d\d\d\|\\." +syn region maximaString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=maximaSpecial +syn match maximaCharacter "'[^\\]'" +syn match maximaSpecialChar "'\\.'" + +" number with no fractional part or exponent +syn match maximaNumber /\<\d\+\>/ +" floating point number with integer and fractional parts and optional exponent +syn match maximaFloat /\<\d\+\.\d*\([BbDdEeSs][-+]\=\d\+\)\=\>/ +" floating point number with no integer part and optional exponent +syn match maximaFloat /\<\.\d\+\([BbDdEeSs][-+]\=\d\+\)\=\>/ +" floating point number with no fractional part and optional exponent +syn match maximaFloat /\<\d\+[BbDdEeSs][-+]\=\d\+\>/ + +" Comments: +" maxima supports /* ... */ (like C) +syn keyword maximaTodo contained TODO Todo DEBUG +syn region maximaCommentBlock start="/\*" end="\*/" contains=maximaString,maximaTodo,maximaCommentBlock + +" synchronizing +syn sync match maximaSyncComment grouphere maximaCommentBlock "/*" +syn sync match maximaSyncComment groupthere NONE "*/" + +" 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_maxima_syntax_inits") + if version < 508 + let did_maxima_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink maximaBraceError maximaError + HiLink maximaCmd maximaStatement + HiLink maximaCurlyError maximaError + HiLink maximaFuncCmd maximaStatement + HiLink maximaParenError maximaError + + " The default methods for highlighting. Can be overridden later + HiLink maximaCharacter Character + HiLink maximaComma Function + HiLink maximaCommentBlock Comment + HiLink maximaConditional Conditional + HiLink maximaError Error + HiLink maximaFunc Delimiter + HiLink maximaOp Delimiter + HiLink maximaLabel PreProc + HiLink maximaNumber Number + HiLink maximaFloat Float + HiLink maximaRepeat Repeat + HiLink maximaSpecial Type + HiLink maximaSpecialChar SpecialChar + HiLink maximaStatement Statement + HiLink maximaString String + HiLink maximaTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "maxima" diff --git a/vim/bundle/ubuntu-vim72/syntax/mel.vim b/vim/bundle/ubuntu-vim72/syntax/mel.vim new file mode 100644 index 0000000..dab8948 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/mel.vim @@ -0,0 +1,121 @@ +" Vim syntax file +" Language: MEL (Maya Extension Language) +" Maintainer: Robert Minsk +" Last Change: May 27 1999 +" Based on: Bram Moolenaar C syntax file + +" 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 + +" when wanted, highlight trailing white space and spaces before tabs +if exists("mel_space_errors") + sy match melSpaceError "\s\+$" + sy match melSpaceError " \+\t"me=e-1 +endif + +" A bunch of usefull MEL keyworks +sy keyword melBoolean true false yes no on off + +sy keyword melFunction proc +sy match melIdentifier "\$\(\a\|_\)\w*" + +sy keyword melStatement break continue return +sy keyword melConditional if else switch +sy keyword melRepeat while for do in +sy keyword melLabel case default +sy keyword melOperator size eval env exists whatIs +sy keyword melKeyword alias +sy keyword melException catch error warning + +sy keyword melInclude source + +sy keyword melType int float string vector matrix +sy keyword melStorageClass global + +sy keyword melDebug trace + +sy keyword melTodo contained TODO FIXME XXX + +" MEL data types +sy match melCharSpecial contained "\\[ntr\\"]" +sy match melCharError contained "\\[^ntr\\"]" + +sy region melString start=+"+ skip=+\\"+ end=+"+ contains=melCharSpecial,melCharError + +sy case ignore +sy match melInteger "\<\d\+\(e[-+]\=\d\+\)\=\>" +sy match melFloat "\<\d\+\(e[-+]\=\d\+\)\=f\>" +sy match melFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=f\=\>" +sy match melFloat "\.\d\+\(e[-+]\=\d\+\)\=f\=\>" +sy case match + +sy match melCommaSemi contained "[,;]" +sy region melMatrixVector start=/<>/ contains=melInteger,melFloat,melIdentifier,melCommaSemi + +sy cluster melGroup contains=melFunction,melStatement,melConditional,melLabel,melKeyword,melStorageClass,melTODO,melCharSpecial,melCharError,melCommaSemi + +" catch errors caused by wrong parenthesis +sy region melParen transparent start='(' end=')' contains=ALLBUT,@melGroup,melParenError,melInParen +sy match melParenError ")" +sy match melInParen contained "[{}]" + +" comments +sy region melComment start="/\*" end="\*/" contains=melTodo,melSpaceError +sy match melComment "//.*" contains=melTodo,melSpaceError +sy match melCommentError "\*/" + +sy region melQuestionColon matchgroup=melConditional transparent start='?' end=':' contains=ALLBUT,@melGroup + +if !exists("mel_minlines") + let mel_minlines=15 +endif +exec "sy sync ccomment melComment minlines=" . mel_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_mel_syntax_inits") + if version < 508 + let did_mel_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink melBoolean Boolean + HiLink melFunction Function + HiLink melIdentifier Identifier + HiLink melStatement Statement + HiLink melConditional Conditional + HiLink melRepeat Repeat + HiLink melLabel Label + HiLink melOperator Operator + HiLink melKeyword Keyword + HiLink melException Exception + HiLink melInclude Include + HiLink melType Type + HiLink melStorageClass StorageClass + HiLink melDebug Debug + HiLink melTodo Todo + HiLink melCharSpecial SpecialChar + HiLink melString String + HiLink melInteger Number + HiLink melFloat Float + HiLink melMatrixVector Float + HiLink melComment Comment + HiLink melError Error + HiLink melSpaceError melError + HiLink melCharError melError + HiLink melParenError melError + HiLink melInParen melError + HiLink melCommentError melError + + delcommand HiLink +endif + +let b:current_syntax = "mel" diff --git a/vim/bundle/ubuntu-vim72/syntax/messages.vim b/vim/bundle/ubuntu-vim72/syntax/messages.vim new file mode 100644 index 0000000..4648e94 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/messages.vim @@ -0,0 +1,72 @@ +" Vim syntax file +" Language: /var/log/messages file +" Maintainer: Yakov Lerner +" Latest Revision: 2008-06-29 +" Changes: 2008-06-29 support for RFC3339 tuimestamps James Vega + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn match messagesBegin display '^' nextgroup=messagesDate,messagesDateRFC3339 + +syn match messagesDate contained display '\a\a\a [ 0-9]\d *' + \ nextgroup=messagesHour + +syn match messagesHour contained display '\d\d:\d\d:\d\d\s*' + \ nextgroup=messagesHost + +syn match messagesDateRFC3339 contained display '\d\{4}-\d\d-\d\d' + \ nextgroup=messagesRFC3339T + +syn match messagesRFC3339T contained display '\cT' + \ nextgroup=messagesHourRFC3339 + +syn match messagesHourRFC3339 contained display '\c\d\d:\d\d:\d\d\(\.\d\+\)\=\([+-]\d\d:\d\d\|Z\)' + \ nextgroup=messagesHost + +syn match messagesHost contained display '\S*\s*' + \ nextgroup=messagesLabel + +syn match messagesLabel contained display '\s*[^:]*:\s*' + \ nextgroup=messagesText contains=messagesKernel,messagesPID + +syn match messagesPID contained display '\[\zs\d\+\ze\]' + +syn match messagesKernel contained display 'kernel:' + + +syn match messagesIP '\d\+\.\d\+\.\d\+\.\d\+' + +syn match messagesURL '\w\+://\S\+' + +syn match messagesText contained display '.*' + \ contains=messagesNumber,messagesIP,messagesURL,messagesError + +syn match messagesNumber contained '0x[0-9a-fA-F]*\|\[<[0-9a-f]\+>\]\|\<\d[0-9a-fA-F]*' + +syn match messagesError contained '\c.*\<\(FATAL\|ERROR\|ERRORS\|FAILED\|FAILURE\).*' + + +hi def link messagesDate Constant +hi def link messagesHour Type +hi def link messagesDateRFC3339 Constant +hi def link messagesHourRFC3339 Type +hi def link messagesRFC3339T Normal +hi def link messagesHost Identifier +hi def link messagesLabel Operator +hi def link messagesPID Constant +hi def link messagesKernel Special +hi def link messagesError ErrorMsg +hi def link messagesIP Constant +hi def link messagesURL Underlined +hi def link messagesText Normal +hi def link messagesNumber Number + +let b:current_syntax = "messages" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/mf.vim b/vim/bundle/ubuntu-vim72/syntax/mf.vim new file mode 100644 index 0000000..8bc48fe --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/mf.vim @@ -0,0 +1,197 @@ +" Vim syntax file +" Language: Metafont +" Maintainer: Andreas Scherer +" Last Change: April 25, 2001 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +" Metafont 'primitives' as defined in chapter 25 of 'The METAFONTbook' +" Page 210: 'boolean expressions' +syn keyword mfBoolExp true false known unknown odd charexists not and or + +" Page 210: 'numeric expression' +syn keyword mfNumExp normaldeviate length ASCII oct hex angle turningnumber +syn keyword mfNumExp totalweight directiontime xpart ypart xxpart xypart +syn keyword mfNumExp yxpart yypart sqrt sind cosd mlog mexp floor +syn keyword mfNumExp uniformdeviate + +" Page 211: 'internal quantities' +syn keyword mfInternal tracingtitles tracingequations tracingcapsules +syn keyword mfInternal tracingchoices tracingspecs tracingpens +syn keyword mfInternal tracingcommands tracingrestores tracingmacros +syn keyword mfInternal tracingedges tracingoutput tracingonline tracingstats +syn keyword mfInternal pausing showstopping fontmaking proofing +syn keyword mfInternal turningcheck warningcheck smoothing autorounding +syn keyword mfInternal granularity fillin year month day time +syn keyword mfInternal charcode charext charwd charht chardp charic +syn keyword mfInternal chardx chardy designsize hppp vppp xoffset yoffset +syn keyword mfInternal boundarychar + +" Page 212: 'pair expressions' +syn keyword mfPairExp point of precontrol postcontrol penoffset rotated +syn keyword mfPairExp scaled shifted slanted transformed xscaled yscaled +syn keyword mfPairExp zscaled + +" Page 213: 'path expressions' +syn keyword mfPathExp makepath reverse subpath curl tension atleast +syn keyword mfPathExp controls cycle + +" Page 214: 'pen expressions' +syn keyword mfPenExp nullpen pencircle makepen + +" Page 214: 'picutre expressions' +syn keyword mfPicExp nullpicture + +" Page 214: 'string expressions' +syn keyword mfStringExp jobname readstring str char decimal substring + +" Page 217: 'commands and statements' +syn keyword mfCommand end dump save interim newinternal randomseed let +syn keyword mfCommand delimiters outer everyjob show showvariable showtoken +syn keyword mfCommand showdependencies showstats message errmessage errhelp +syn keyword mfCommand batchmode nonstopmode scrollmode errorstopmode +syn keyword mfCommand addto also contour doublepath withpen withweight cull +syn keyword mfCommand keeping dropping display inwindow openwindow at from to +syn keyword mfCommand shipout special numspecial + +" Page 56: 'types' +syn keyword mfType boolean numeric pair path pen picture string transform + +" Page 155: 'grouping' +syn keyword mfStatement begingroup endgroup + +" Page 165: 'definitions' +syn keyword mfDefinition enddef def expr suffix text primary secondary +syn keyword mfDefinition tertiary vardef primarydef secondarydef tertiarydef + +" Page 169: 'conditions and loops' +syn keyword mfCondition if fi else elseif endfor for forsuffixes forever +syn keyword mfCondition step until exitif + +" Other primitives listed in the index +syn keyword mfPrimitive charlist endinput expandafter extensible +syn keyword mfPrimitive fontdimen headerbyte inner input intersectiontimes +syn keyword mfPrimitive kern ligtable quote scantokens skipto + +" Keywords defined by plain.mf (defined on pp.262-278) +if !exists("plain_mf_macros") + let plain_mf_macros = 1 " Set this to '0' if your source gets too colourful + " metapost.vim does so to turn off Metafont macros +endif +if plain_mf_macros + syn keyword mfMacro abs addto_currentpicture aspect_ratio base_name + syn keyword mfMacro base_version beginchar blacker blankpicture bot bye byte + syn keyword mfMacro capsule_def ceiling change_width clear_pen_memory clearit + syn keyword mfMacro clearpen clearxy counterclockwise culldraw cullit + syn keyword mfMacro currentpen currentpen_path currentpicture + syn keyword mfMacro currenttransform currentwindow cutdraw cutoff d decr + syn keyword mfMacro define_blacker_pixels define_corrected_pixels + syn keyword mfMacro define_good_x_pixels define_good_y_pixels + syn keyword mfMacro define_horizontal_corrected_pixels define_pixels + syn keyword mfMacro define_whole_blacker_pixels define_whole_pixels + syn keyword mfMacro define_whole_vertical_blacker_pixels + syn keyword mfMacro define_whole_vertical_pixels dir direction directionpoint + syn keyword mfMacro displaying ditto div dotprod down downto draw drawdot + syn keyword mfMacro endchar eps epsilon extra_beginchar extra_endchar + syn keyword mfMacro extra_setup erase exitunless fill filldraw fix_units flex + syn keyword mfMacro font_coding_scheme font_extra_space font_identifier + syn keyword mfMacro font_normal_shrink font_normal_space font_normal_stretch + syn keyword mfMacro font_quad font_setup font_size font_slant font_x_height + syn keyword mfMacro fullcircle generate gfcorners gobble gobbled grayfont h + syn keyword mfMacro halfcircle hide hround identity image_rules incr infinity + syn keyword mfMacro interact interpath intersectionpoint inverse italcorr + syn keyword mfMacro join_radius killtext labelfont labels left lft localfont + syn keyword mfMacro loggingall lowres lowres_fix mag magstep makebox makegrid + syn keyword mfMacro makelabel maketicks max min mod mode mode_def mode_name + syn keyword mfMacro mode_setup nodisplays notransforms number_of_modes numtok + syn keyword mfMacro o_correction openit origin pen_bot pen_lft pen_rt pen_top + syn keyword mfMacro penlabels penpos penrazor penspeck pensquare penstroke + syn keyword mfMacro pickup pixels_per_inch proof proofoffset proofrule + syn keyword mfMacro proofrulethickness quartercircle range reflectedabout + syn keyword mfMacro relax right rotatedabout rotatedaround round rt rulepen + syn keyword mfMacro savepen screenchars screen_rows screen_cols screenrule + syn keyword mfMacro screenstrokes shipit showit slantfont smode smoke softjoin + syn keyword mfMacro solve stop superellipse takepower tensepath titlefont + syn keyword mfMacro tolerance top tracingall tracingnone undraw undrawdot + syn keyword mfMacro unfill unfilldraw unitpixel unitsquare unitvector up upto + syn keyword mfMacro vround w whatever +endif + +" Some other basic macro names, e.g., from cmbase, logo, etc. +if !exists("other_mf_macros") + let other_mf_macros = 1 " Set this to '0' if your code gets too colourful + " metapost.vim does so to turn off Metafont macros +endif +if other_mf_macros + syn keyword mfMacro beginlogochar +endif + +" Numeric tokens +syn match mfNumeric "[-]\=\d\+" +syn match mfNumeric "[-]\=\.\d\+" +syn match mfNumeric "[-]\=\d\+\.\d\+" + +" Metafont lengths +syn match mfLength "\<\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\>" +syn match mfLength "\<[-]\=\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=\>" +syn match mfLength "\<[-]\=\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=\>" +syn match mfLength "\<[-]\=\d\+\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=\>" + +" Metafont coordinates and points +syn match mfCoord "\<[xy]\d\+\>" +syn match mfPoint "\" + +" String constants +syn region mfString start=+"+ end=+"+ + +" Comments: +syn match mfComment "%.*$" + +" synchronizing +syn sync maxlines=50 + +" 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_mf_syntax_inits") + if version < 508 + let did_mf_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink mfBoolExp Statement + HiLink mfNumExp Statement + HiLink mfInternal Identifier + HiLink mfPairExp Statement + HiLink mfPathExp Statement + HiLink mfPenExp Statement + HiLink mfPicExp Statement + HiLink mfStringExp Statement + HiLink mfCommand Statement + HiLink mfType Type + HiLink mfStatement Statement + HiLink mfDefinition Statement + HiLink mfCondition Conditional + HiLink mfPrimitive Statement + HiLink mfMacro Macro + HiLink mfCoord Identifier + HiLink mfPoint Identifier + HiLink mfNumeric Number + HiLink mfLength Number + HiLink mfComment Comment + HiLink mfString String + + delcommand HiLink +endif + +let b:current_syntax = "mf" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/mgl.vim b/vim/bundle/ubuntu-vim72/syntax/mgl.vim new file mode 100644 index 0000000..55ae137 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/mgl.vim @@ -0,0 +1,128 @@ +" Vim syntax file +" Language: MGL +" Version: 1.0 +" Last Change: 2006 Feb 21 +" Maintainer: Gero Kuhlmann +" +" $Id: mgl.vim,v 1.1 2006/02/21 22:08:20 vimboss Exp $ +" +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + +syn sync lines=250 + +syn keyword mglBoolean true false +syn keyword mglConditional if else then +syn keyword mglConstant nil +syn keyword mglPredefined maxint +syn keyword mglLabel case goto label +syn keyword mglOperator to downto in of with +syn keyword mglOperator and not or xor div mod +syn keyword mglRepeat do for repeat while to until +syn keyword mglStatement procedure function break continue return restart +syn keyword mglStatement program begin end const var type +syn keyword mglStruct record +syn keyword mglType integer string char boolean char ipaddr array + + +" String +if !exists("mgl_one_line_string") + syn region mglString matchgroup=mglString start=+'+ end=+'+ contains=mglStringEscape + syn region mglString matchgroup=mglString start=+"+ end=+"+ contains=mglStringEscapeGPC +else + "wrong strings + syn region mglStringError matchgroup=mglStringError start=+'+ end=+'+ end=+$+ contains=mglStringEscape + syn region mglStringError matchgroup=mglStringError start=+"+ end=+"+ end=+$+ contains=mglStringEscapeGPC + "right strings + syn region mglString matchgroup=mglString start=+'+ end=+'+ oneline contains=mglStringEscape + syn region mglString matchgroup=mglString start=+"+ end=+"+ oneline contains=mglStringEscapeGPC +end +syn match mglStringEscape contained "''" +syn match mglStringEscapeGPC contained '""' + + +if exists("mgl_symbol_operator") + syn match mglSymbolOperator "[+\-/*=\%]" + syn match mglSymbolOperator "[<>]=\=" + syn match mglSymbolOperator "<>" + syn match mglSymbolOperator ":=" + syn match mglSymbolOperator "[()]" + syn match mglSymbolOperator "\.\." + syn match mglMatrixDelimiter "(." + syn match mglMatrixDelimiter ".)" + syn match mglMatrixDelimiter "[][]" +endif + +syn match mglNumber "-\=\<\d\+\>" +syn match mglHexNumber "\$[0-9a-fA-F]\+\>" +syn match mglCharacter "\#[0-9]\+\>" +syn match mglIpAddr "[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\>" + +syn region mglComment start="(\*" end="\*)" +syn region mglComment start="{" end="}" +syn region mglComment start="//" end="$" + +if !exists("mgl_no_functions") + syn keyword mglFunction dispose new + syn keyword mglFunction get load print select + syn keyword mglFunction odd pred succ + syn keyword mglFunction chr ord abs sqr + syn keyword mglFunction exit + syn keyword mglOperator at timeout +endif + + +syn region mglPreProc start="(\*\$" end="\*)" +syn region mglPreProc start="{\$" end="}" + +syn keyword mglException try except raise +syn keyword mglPredefined exception + + +" 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_mgl_syn_inits") + if version < 508 + let did_mgl_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink mglBoolean Boolean + HiLink mglComment Comment + HiLink mglConditional Conditional + HiLink mglConstant Constant + HiLink mglException Exception + HiLink mglFunction Function + HiLink mglLabel Label + HiLink mglMatrixDelimiter Identifier + HiLink mglNumber Number + HiLink mglHexNumber Number + HiLink mglCharacter Number + HiLink mglIpAddr Number + HiLink mglOperator Operator + HiLink mglPredefined mglFunction + HiLink mglPreProc PreProc + HiLink mglRepeat Repeat + HiLink mglStatement Statement + HiLink mglString String + HiLink mglStringEscape Special + HiLink mglStringEscapeGPC Special + HiLink mglStringError Error + HiLink mglStruct mglStatement + HiLink mglSymbolOperator mglOperator + HiLink mglType Type + + delcommand HiLink +endif + + +let b:current_syntax = "mgl" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/mgp.vim b/vim/bundle/ubuntu-vim72/syntax/mgp.vim new file mode 100644 index 0000000..76b9661 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/mgp.vim @@ -0,0 +1,83 @@ +" Vim syntax file +" Language: mgp - MaGic Point +" Maintainer: Gerfried Fuchs +" Filenames: *.mgp +" Last Change: 25 Apr 2001 +" URL: http://alfie.ist.org/vim/syntax/mgp.vim +" +" Comments are very welcome - but please make sure that you are commenting on +" the latest version of this file. +" SPAM is _NOT_ welcome - be ready to be reported! + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + + +syn match mgpLineSkip "\\$" + +" all the commands that are currently recognized +syn keyword mgpCommand contained size fore back bgrad left leftfill center +syn keyword mgpCommand contained right shrink lcutin rcutin cont xfont vfont +syn keyword mgpCommand contained tfont tmfont tfont0 bar image newimage +syn keyword mgpCommand contained prefix icon bimage default tab vgap hgap +syn keyword mgpCommand contained pause mark again system filter endfilter +syn keyword mgpCommand contained vfcap tfdir deffont font embed endembed +syn keyword mgpCommand contained noop pcache include + +" charset is not yet supported :-) +" syn keyword mgpCommand contained charset + +syn region mgpFile contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match mgpValue contained "\d\+" +syn match mgpSize contained "\d\+x\d\+" +syn match mgpLine +^%.*$+ contains=mgpCommand,mgpFile,mgpSize,mgpValue + +" Comments +syn match mgpPercent +^%%.*$+ +syn match mgpHash +^#.*$+ + +" these only work alone +syn match mgpPage +^%page$+ +syn match mgpNoDefault +^%nodefault$+ + + +" 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_mgp_syn_inits") + let did_mgp_syn_inits = 1 + if version < 508 + let did_mgp_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink mgpLineSkip Special + + HiLink mgpHash mgpComment + HiLink mgpPercent mgpComment + HiLink mgpComment Comment + + HiLink mgpCommand Identifier + + HiLink mgpLine Type + + HiLink mgpFile String + HiLink mgpSize Number + HiLink mgpValue Number + + HiLink mgpPage mgpDefine + HiLink mgpNoDefault mgpDefine + HiLink mgpDefine Define + + delcommand HiLink +endif + +let b:current_syntax = "mgp" diff --git a/vim/bundle/ubuntu-vim72/syntax/mib.vim b/vim/bundle/ubuntu-vim72/syntax/mib.vim new file mode 100644 index 0000000..a29242d --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/mib.vim @@ -0,0 +1,77 @@ +" Vim syntax file +" Language: Vim syntax file for SNMPv1 and SNMPv2 MIB and SMI files +" Author: David Pascoe +" Written: Wed Jan 28 14:37:23 GMT--8:00 1998 +" Last Changed: Thu Feb 27 10:18:16 WST 2003 + +" 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 + +if version >= 600 + setlocal iskeyword=@,48-57,_,128-167,224-235,-,:,= +else + set iskeyword=@,48-57,_,128-167,224-235,-,:,= +endif + +syn keyword mibImplicit ACCESS ANY AUGMENTS BEGIN BIT BITS BOOLEAN CHOICE +syn keyword mibImplicit COMPONENTS CONTACT-INFO DEFINITIONS DEFVAL +syn keyword mibImplicit DESCRIPTION DISPLAY-HINT END ENTERPRISE EXTERNAL FALSE +syn keyword mibImplicit FROM GROUP IMPLICIT IMPLIED IMPORTS INDEX +syn keyword mibImplicit LAST-UPDATED MANDATORY-GROUPS MAX-ACCESS +syn keyword mibImplicit MIN-ACCESS MODULE MODULE-COMPLIANCE MODULE-IDENTITY +syn keyword mibImplicit NOTIFICATION-GROUP NOTIFICATION-TYPE NOTIFICATIONS +syn keyword mibImplicit NULL OBJECT-GROUP OBJECT-IDENTITY OBJECT-TYPE +syn keyword mibImplicit OBJECTS OF OPTIONAL ORGANIZATION REFERENCE +syn keyword mibImplicit REVISION SEQUENCE SET SIZE STATUS SYNTAX +syn keyword mibImplicit TEXTUAL-CONVENTION TRAP-TYPE TRUE UNITS VARIABLES +syn keyword mibImplicit WRITE-SYNTAX ::= +syn keyword mibValue accessible-for-notify current DisplayString +syn keyword mibValue deprecated mandatory not-accessible obsolete optional +syn keyword mibValue read-create read-only read-write write-only INTEGER +syn keyword mibValue Counter Gauge IpAddress OCTET STRING experimental mib-2 +syn keyword mibValue TimeTicks RowStatus TruthValue UInteger32 snmpModules +syn keyword mibValue Integer32 Counter32 TestAndIncr TimeStamp InstancePointer +syn keyword mibValue OBJECT IDENTIFIER Gauge32 AutonomousType Counter64 +syn keyword mibValue PhysAddress TimeInterval MacAddress StorageType RowPointer +syn keyword mibValue TDomain TAddress ifIndex + +" Epilogue SMI extensions +syn keyword mibEpilogue FORCE-INCLUDE EXCLUDE cookie get-function set-function +syn keyword mibEpilogue test-function get-function-async set-function-async +syn keyword mibEpilogue test-function-async next-function next-function-async +syn keyword mibEpilogue leaf-name +syn keyword mibEpilogue DEFAULT contained + +syn match mibComment "\ *--.*$" +syn match mibNumber "\<['0-9a-fA-FhH]*\>" +syn region mibDescription start="\"" end="\"" contains=DEFAULT + +" 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_mib_syn_inits") + if version < 508 + let did_mib_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink mibImplicit Statement + HiLink mibComment Comment + HiLink mibConstants String + HiLink mibNumber Number + HiLink mibDescription Identifier + HiLink mibEpilogue SpecialChar + HiLink mibValue Structure + delcommand HiLink +endif + +let b:current_syntax = "mib" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/mma.vim b/vim/bundle/ubuntu-vim72/syntax/mma.vim new file mode 100644 index 0000000..f48dcce --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/mma.vim @@ -0,0 +1,325 @@ +" Vim syntax file +" Language: Mathematica +" Maintainer: steve layland +" Last Change: Thu May 19 21:36:04 CDT 2005 +" Source: http://members.wri.com/layland/vim/syntax/mma.vim +" http://vim.sourceforge.net/scripts/script.php?script_id=1273 +" Id: $Id: mma.vim,v 1.4 2006/04/14 20:40:38 vimboss Exp $ +" NOTE: +" +" Empty .m files will automatically be presumed as Matlab files +" unless you have the following in your .vimrc: +" +" let filetype_m="mma" +" +" I also recommend setting the default 'Comment' hilighting to something +" other than the color used for 'Function', since both are plentiful in +" most mathematica files, and they are often the same color (when using +" background=dark). +" +" Credits: +" o Original Mathematica syntax version written by +" Wolfgang Waltenberger +" o Some ideas like the CommentStar,CommentTitle were adapted +" from the Java vim syntax file by Claudio Fleiner. Thanks! +" o Everything else written by steve +" +" Bugs: +" o Vim 6.1 didn't really have support for character classes +" of other named character classes. For example, [\a\d] +" didn't work. Therefore, a lot of this code uses explicit +" character classes instead: [0-9a-zA-Z] +" +" TODO: +" folding +" fix nesting +" finish populating popular symbols + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Group Definitions: +syntax cluster mmaNotes contains=mmaTodo,mmaFixme +syntax cluster mmaComments contains=mmaComment,mmaFunctionComment,mmaItem,mmaFunctionTitle,mmaCommentStar +syntax cluster mmaCommentStrings contains=mmaLooseQuote,mmaCommentString,mmaUnicode +syntax cluster mmaStrings contains=@mmaCommentStrings,mmaString +syntax cluster mmaTop contains=mmaOperator,mmaGenericFunction,mmaPureFunction,mmaVariable + +" Predefined Constants: +" to list all predefined Symbols would be too insane... +" it's probably smarter to define a select few, and get the rest from +" context if absolutely necessary. +" TODO - populate this with other often used Symbols + +" standard fixed symbols: +syntax keyword mmaVariable True False None Automatic All Null C General + +" mathematical constants: +syntax keyword mmaVariable Pi I E Infinity ComplexInfinity Indeterminate GoldenRatio EulerGamma Degree Catalan Khinchin Glaisher + +" stream data / atomic heads: +syntax keyword mmaVariable Byte Character Expression Number Real String Word EndOfFile Integer Symbol + +" sets: +syntax keyword mmaVariable Integers Complexes Reals Booleans Rationals + +" character classes: +syntax keyword mmaPattern DigitCharacter LetterCharacter WhitespaceCharacter WordCharacter EndOfString StartOfString EndOfLine StartOfLine WordBoundary + +" SelectionMove directions/units: +syntax keyword mmaVariable Next Previous After Before Character Word Expression TextLine CellContents Cell CellGroup EvaluationCell ButtonCell GeneratedCell Notebook +syntax keyword mmaVariable CellTags CellStyle CellLabel + +" TableForm positions: +syntax keyword mmaVariable Above Below Left Right + +" colors: +syntax keyword mmaVariable Black Blue Brown Cyan Gray Green Magenta Orange Pink Purple Red White Yellow + +" function attributes +syntax keyword mmaVariable Protected Listable OneIdentity Orderless Flat Constant NumericFunction Locked ReadProtected HoldFirst HoldRest HoldAll HoldAllComplete SequenceHold NHoldFirst NHoldRest NHoldAll Temporary Stub + +" Comment Sections: +" this: +" :that: +syntax match mmaItem "\%(^[( |*\t]*\)\@<=\%(:\+\|\w\)\w\+\%( \w\+\)\{0,3}:" contained contains=@mmaNotes + +" Comment Keywords: +syntax keyword mmaTodo TODO NOTE HEY contained +syntax match mmaTodo "X\{3,}" contained +syntax keyword mmaFixme FIX[ME] FIXTHIS BROKEN contained +syntax match mmaFixme "BUG\%( *\#\=[0-9]\+\)\=" contained +" yay pirates... +syntax match mmaFixme "\%(Y\=A\+R\+G\+\|GRR\+\|CR\+A\+P\+\)\%(!\+\)\=" contained + +" EmPHAsis: +" this unnecessary, but whatever :) +syntax match mmaemPHAsis "\%(^\|\s\)\([_/]\)[a-zA-Z0-9]\+\%([- \t':]\+[a-zA-Z0-9]\+\)*\1\%(\s\|$\)" contained contains=mmaemPHAsis +syntax match mmaemPHAsis "\%(^\|\s\)(\@]\@!" contains=mmaOperator +"pattern default: +syntax match mmaPattern ": *[^ ,]\+[\], ]\@=" contains=@mmaCommentStrings,@mmaTop,mmaOperator +"pattern head/test: +syntax match mmaPattern "[A-Za-z0-9`]*_\+\%(\a\+\)\=\%(?([^)]\+)\|?[^\]},]\+\)\=" contains=@mmaTop,@mmaCommentStrings,mmaPatternError + +" Operators: +" /: ^= ^:= UpValue +" /; Conditional +" := = DownValue +" == === || +" != =!= && Logic +" >= <= < > +" += -= *= +" /= ++ -- Math +" ^* +" -> :> Rules +" @@ @@@ Apply +" /@ //@ Map +" /. //. Replace +" // @ Function application +" <> ~~ String/Pattern join +" ~ infix operator +" . : Pattern operators +syntax match mmaOperator "\%(@\{1,3}\|//[.@]\=\)" +syntax match mmaOperator "\%(/[;:@.]\=\|\^\=:\==\)" +syntax match mmaOperator "\%([-:=]\=>\|<=\=\)" +"syntax match mmaOperator "\%(++\=\|--\=\|[/+-*]=\|[^*]\)" +syntax match mmaOperator "[*+=^.:?-]" +syntax match mmaOperator "\%(\~\~\=\)" +syntax match mmaOperator "\%(=\{2,3}\|=\=!=\|||\=\|&&\|!\)" contains=ALLBUT,mmaPureFunction + +" Symbol Tags: +" "SymbolName::item" +"syntax match mmaSymbol "`\=[a-zA-Z$]\+[0-9a-zA-Z$]*\%(`\%([a-zA-Z$]\+[0-9a-zA-Z$]*\)\=\)*" contained +syntax match mmaMessage "`\=\([a-zA-Z$]\+[0-9a-zA-Z$]*\)\%(`\%([a-zA-Z$]\+[0-9a-zA-Z$]*\)\=\)*::\a\+" contains=mmaMessageType +syntax match mmaMessageType "::\a\+"hs=s+2 contained + +" Pure Functions: +syntax match mmaPureFunction "#\%(#\|\d\+\)\=" +syntax match mmaPureFunction "&" + +" Named Functions: +" Since everything is pretty much a function, get this straight +" from context +syntax match mmaGenericFunction "[A-Za-z0-9`]\+\s*\%([@[]\|/:\|/\=/@\)\@=" contains=mmaOperator +syntax match mmaGenericFunction "\~\s*[^~]\+\s*\~"hs=s+1,he=e-1 contains=mmaOperator,mmaBoring +syntax match mmaGenericFunction "//\s*[A-Za-z0-9`]\+"hs=s+2 contains=mmaOperator + +" Numbers: +syntax match mmaNumber "\<\%(\d\+\.\=\d*\|\d*\.\=\d\+\)\>" +syntax match mmaNumber "`\d\+\%(\d\@!\.\|\>\)" + +" Special Characters: +" \[Name] named character +" \ooo octal +" \.xx 2 digit hex +" \:xxxx 4 digit hex (multibyte unicode) +syntax match mmaUnicode "\\\[\w\+\d*\]" +syntax match mmaUnicode "\\\%(\x\{3}\|\.\x\{2}\|:\x\{4}\)" + +" Syntax Errors: +syntax match mmaError "\*)" containedin=ALLBUT,@mmaComments,@mmaStrings +syntax match mmaError "\%([/]{3,}\|[&:|+*?~-]\{3,}\|[.=]\{4,}\|_\@<=\.\{2,}\|`\{2,}\)" containedin=ALLBUT,@mmaComments,@mmaStrings + +" Punctuation: +" things that shouldn't really be highlighted, or highlighted +" in they're own group if you _really_ want. :) +" ( ) { } +" TODO - use Delimiter group? +syntax match mmaBoring "[(){}]" contained + +" ------------------------------------ +" future explorations... +" ------------------------------------ +" Function Arguments: +" anything between brackets [] +" (fold) +"syntax region mmaArgument start="\[" end="\]" containedin=ALLBUT,@mmaComments,@mmaStrings transparent fold + +" Lists: +" (fold) +"syntax region mmaLists start="{" end="}" containedin=ALLBUT,@mmaComments,@mmaStrings transparent fold + +" Regions: +" (fold) +"syntax region mmaRegion start="(\*\+[^<]* \*)" containedin=ALLBUT,@mmaStrings transparent fold keepend + +" show fold text +set commentstring='(*%s*)' +"set foldtext=MmaFoldText() + +"function MmaFoldText() +" let line = getline(v:foldstart) +" +" let lines = v:foldend-v:foldstart+1 +" +" let sub = substitute(line, '(\*\+|\*\+)|[-*_]\+', '', 'g') +" +" if match(line, '(\*') != -1 +" let lines = lines.' line comment' +" else +" let lines = lines.' lines' +" endif +" +" return v:folddashes.' '.lines.' '.sub +"endf + +"this is slow for computing folds, but it does so accurately +syntax sync fromstart + +" but this seems to do alright for non fold syntax coloring. +" for folding, however, it doesn't get the nesting right. +" TODO - find sync group for multiline modules? ick... + +" sync multi line comments +"syntax sync match syncComments groupthere NONE "\*)" +"syntax sync match syncComments groupthere mmaComment "(\*" + +"set foldmethod=syntax +"set foldnestmax=1 +"set foldminlines=15 + +if version >= 508 || !exists("did_mma_syn_inits") + if version < 508 + let did_mma_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " NOTE - the following links are not guaranteed to + " look good under all colorschemes. You might need to + " :so $VIMRUNTIME/syntax/hitest.vim and tweak these to + " look good in yours + + + HiLink mmaComment Comment + HiLink mmaCommentStar Comment + HiLink mmaFunctionComment Comment + HiLink mmaLooseQuote Comment + HiLink mmaGenericFunction Function + HiLink mmaVariable Identifier +" HiLink mmaSymbol Identifier + HiLink mmaOperator Operator + HiLink mmaPatternOp Operator + HiLink mmaPureFunction Operator + HiLink mmaString String + HiLink mmaCommentString String + HiLink mmaUnicode String + HiLink mmaMessage Type + HiLink mmaNumber Type + HiLink mmaPattern Type + HiLink mmaError Error + HiLink mmaFixme Error + HiLink mmaPatternError Error + HiLink mmaTodo Todo + HiLink mmaemPHAsis Special + HiLink mmaFunctionTitle Special + HiLink mmaMessageType Special + HiLink mmaItem Preproc + + delcommand HiLink +endif + +let b:current_syntax = "mma" diff --git a/vim/bundle/ubuntu-vim72/syntax/mmix.vim b/vim/bundle/ubuntu-vim72/syntax/mmix.vim new file mode 100644 index 0000000..5b6a443 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/mmix.vim @@ -0,0 +1,162 @@ +" Vim syntax file +" Language: MMIX +" Maintainer: Dirk Hüsken, +" Last Change: Wed Apr 24 01:18:52 CEST 2002 +" Filenames: *.mms +" URL: http://homepages.uni-tuebingen.de/student/dirk.huesken/vim/syntax/mmix.vim + +" Limitations: Comments must start with either % or // +" (preferrably %, Knuth-Style) + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" MMIX data types +syn keyword mmixType byte wyde tetra octa + +" different literals... +syn match decNumber "[0-9]*" +syn match octNumber "0[0-7][0-7]\+" +syn match hexNumber "#[0-9a-fA-F]\+" +syn region mmixString start=+"+ skip=+\\"+ end=+"+ +syn match mmixChar "'.'" + +" ...and more special MMIX stuff +syn match mmixAt "@" +syn keyword mmixSegments Data_Segment Pool_Segment Stack_Segment + +syn match mmixIdentifier "[a-z_][a-z0-9_]*" + +" labels (for branches etc) +syn match mmixLabel "^[a-z0-9_:][a-z0-9_]*" +syn match mmixLabel "[0-9][HBF]" + +" pseudo-operations +syn keyword mmixPseudo is loc greg + +" comments +syn match mmixComment "%.*" +syn match mmixComment "//.*" +syn match mmixComment "^\*.*" + + +syn keyword mmixOpcode trap fcmp fun feql fadd fix fsub fixu +syn keyword mmixOpcode fmul fcmpe fune feqle fdiv fsqrt frem fint + +syn keyword mmixOpcode floti flotui sfloti sflotui i +syn keyword mmixOpcode muli mului divi divui +syn keyword mmixOpcode addi addui subi subui +syn keyword mmixOpcode 2addui 4addui 8addui 16addui +syn keyword mmixOpcode cmpi cmpui negi negui +syn keyword mmixOpcode sli slui sri srui +syn keyword mmixOpcode bnb bzb bpb bodb +syn keyword mmixOpcode bnnb bnzb bnpb bevb +syn keyword mmixOpcode pbnb pbzb pbpb pbodb +syn keyword mmixOpcode pbnnb pbnzb pbnpb pbevb +syn keyword mmixOpcode csni cszi cspi csodi +syn keyword mmixOpcode csnni csnzi csnpi csevi +syn keyword mmixOpcode zsni zszi zspi zsodi +syn keyword mmixOpcode zsnni zsnzi zsnpi zsevi +syn keyword mmixOpcode ldbi ldbui ldwi ldwui +syn keyword mmixOpcode ldti ldtui ldoi ldoui +syn keyword mmixOpcode ldsfi ldhti cswapi ldunci +syn keyword mmixOpcode ldvtsi preldi pregoi goi +syn keyword mmixOpcode stbi stbui stwi stwui +syn keyword mmixOpcode stti sttui stoi stoui +syn keyword mmixOpcode stsfi sthti stcoi stunci +syn keyword mmixOpcode syncdi presti syncidi pushgoi +syn keyword mmixOpcode ori orni nori xori +syn keyword mmixOpcode andi andni nandi nxori +syn keyword mmixOpcode bdifi wdifi tdifi odifi +syn keyword mmixOpcode muxi saddi mori mxori +syn keyword mmixOpcode muli mului divi divui + +syn keyword mmixOpcode flot flotu sflot sflotu +syn keyword mmixOpcode mul mulu div divu +syn keyword mmixOpcode add addu sub subu +syn keyword mmixOpcode 2addu 4addu 8addu 16addu +syn keyword mmixOpcode cmp cmpu neg negu +syn keyword mmixOpcode sl slu sr sru +syn keyword mmixOpcode bn bz bp bod +syn keyword mmixOpcode bnn bnz bnp bev +syn keyword mmixOpcode pbn pbz pbp pbod +syn keyword mmixOpcode pbnn pbnz pbnp pbev +syn keyword mmixOpcode csn csz csp csod +syn keyword mmixOpcode csnn csnz csnp csev +syn keyword mmixOpcode zsn zsz zsp zsod +syn keyword mmixOpcode zsnn zsnz zsnp zsev +syn keyword mmixOpcode ldb ldbu ldw ldwu +syn keyword mmixOpcode ldt ldtu ldo ldou +syn keyword mmixOpcode ldsf ldht cswap ldunc +syn keyword mmixOpcode ldvts preld prego go +syn keyword mmixOpcode stb stbu stw stwu +syn keyword mmixOpcode stt sttu sto stou +syn keyword mmixOpcode stsf stht stco stunc +syn keyword mmixOpcode syncd prest syncid pushgo +syn keyword mmixOpcode or orn nor xor +syn keyword mmixOpcode and andn nand nxor +syn keyword mmixOpcode bdif wdif tdif odif +syn keyword mmixOpcode mux sadd mor mxor + +syn keyword mmixOpcode seth setmh setml setl inch incmh incml incl +syn keyword mmixOpcode orh ormh orml orl andh andmh andml andnl +syn keyword mmixOpcode jmp pushj geta put +syn keyword mmixOpcode pop resume save unsave sync swym get trip +syn keyword mmixOpcode set lda + +" switch back to being case sensitive +syn case match + +" general-purpose and special-purpose registers +syn match mmixRegister "$[0-9]*" +syn match mmixRegister "r[A-Z]" +syn keyword mmixRegister rBB rTT rWW rXX rYY rZZ + +" 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_mmix_syntax_inits") + if version < 508 + let did_mmix_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " The default methods for highlighting. Can be overridden later + HiLink mmixAt Type + HiLink mmixPseudo Type + HiLink mmixRegister Special + HiLink mmixSegments Type + + HiLink mmixLabel Special + HiLink mmixComment Comment + HiLink mmixOpcode Keyword + + HiLink hexNumber Number + HiLink decNumber Number + HiLink octNumber Number + + HiLink mmixString String + HiLink mmixChar String + + HiLink mmixType Type + HiLink mmixIdentifier Normal + HiLink mmixSpecialComment Comment + + " My default color overrides: + " hi mmixSpecialComment ctermfg=red + "hi mmixLabel ctermfg=lightcyan + " hi mmixType ctermbg=black ctermfg=brown + + delcommand HiLink +endif + +let b:current_syntax = "mmix" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/mmp.vim b/vim/bundle/ubuntu-vim72/syntax/mmp.vim new file mode 100644 index 0000000..0117e77 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/mmp.vim @@ -0,0 +1,53 @@ +" Vim syntax file +" Language: Symbian meta-makefile definition (MMP) +" Maintainer: Ron Aaron +" Last Change: 2007/11/07 +" URL: http://ronware.org/wiki/vim/mmp +" Filetypes: *.mmp + +" 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 mmpComment "//.*" +syn region mmpComment start="/\*" end="\*\/" + +syn keyword mmpKeyword aif asspabi assplibrary aaspexports baseaddress +syn keyword mmpKeyword debuglibrary deffile document epocheapsize +syn keyword mmpKeyword epocprocesspriority epocstacksize exportunfrozen +syn keyword mmpStorage lang library linkas macro nostrictdef option +syn keyword mmpStorage resource source sourcepath srcdbg startbitmap +syn keyword mmpStorage start end staticlibrary strictdepend systeminclude +syn keyword mmpStorage systemresource target targettype targetpath uid +syn keyword mmpStorage userinclude win32_library + +syn match mmpIfdef "\#\(include\|ifdef\|ifndef\|if\|endif\|else\|elif\)" + +syn match mmpNumber "\d+" +syn match mmpNumber "0x\x\+" + + +" 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 !exists("did_mmp_syntax_inits") + let did_mmp_syntax_inits=1 + + hi def link mmpComment Comment + hi def link mmpKeyword Keyword + hi def link mmpStorage StorageClass + hi def link mmpString String + hi def link mmpNumber Number + hi def link mmpOrdinal Operator + hi def link mmpIfdef PreCondit +endif + +let b:current_syntax = "mmp" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/modconf.vim b/vim/bundle/ubuntu-vim72/syntax/modconf.vim new file mode 100644 index 0000000..54b6593 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/modconf.vim @@ -0,0 +1,44 @@ +" Vim syntax file +" Language: modules.conf(5) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2007-10-25 + +if exists("b:current_syntax") + finish +endif + +setlocal iskeyword+=- + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword modconfTodo FIXME TODO XXX NOTE + +syn region modconfComment start='#' skip='\\$' end='$' + \ contains=modconfTodo,@Spell + +syn keyword modconfConditional if else elseif endif + +syn keyword modconfPreProc alias define include keep prune + \ post-install post-remove pre-install + \ pre-remove persistdir blacklist + +syn keyword modconfKeyword add above below install options probe probeall + \ remove + +syn keyword modconfIdentifier depfile insmod_opt path generic_stringfile + \ pcimapfile isapnpmapfile usbmapfile + \ parportmapfile ieee1394mapfile pnpbiosmapfile +syn match modconfIdentifier 'path\[[^]]\+\]' + +hi def link modconfTodo Todo +hi def link modconfComment Comment +hi def link modconfConditional Conditional +hi def link modconfPreProc PreProc +hi def link modconfKeyword Keyword +hi def link modconfIdentifier Identifier + +let b:current_syntax = "modconf" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/model.vim b/vim/bundle/ubuntu-vim72/syntax/model.vim new file mode 100644 index 0000000..5f3b7f8 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/model.vim @@ -0,0 +1,44 @@ +" Vim syntax file +" Language: Model +" Maintainer: Bram Moolenaar +" Last Change: 2005 Jun 20 + +" very basic things only (based on the vgrindefs file). +" If you use this language, please improve it, and send me the patches! + +" Quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" A bunch of keywords +syn keyword modelKeyword abs and array boolean by case cdnl char copied dispose +syn keyword modelKeyword div do dynamic else elsif end entry external FALSE false +syn keyword modelKeyword fi file for formal fortran global if iff ift in integer include +syn keyword modelKeyword inline is lbnd max min mod new NIL nil noresult not notin od of +syn keyword modelKeyword or procedure public read readln readonly record recursive rem rep +syn keyword modelKeyword repeat res result return set space string subscript such then TRUE +syn keyword modelKeyword true type ubnd union until varies while width + +" Special keywords +syn keyword modelBlock beginproc endproc + +" Comments +syn region modelComment start="\$" end="\$" end="$" + +" Strings +syn region modelString start=+"+ end=+"+ + +" Character constant (is this right?) +syn match modelString "'." + +" Define the default highlighting. +" Only used when an item doesn't have highlighting yet +hi def link modelKeyword Statement +hi def link modelBlock PreProc +hi def link modelComment Comment +hi def link modelString String + +let b:current_syntax = "model" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/modsim3.vim b/vim/bundle/ubuntu-vim72/syntax/modsim3.vim new file mode 100644 index 0000000..04e9ab9 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/modsim3.vim @@ -0,0 +1,109 @@ +" Vim syntax file +" Language: Modsim III, by compuware corporation (www.compuware.com) +" Maintainer: Philipp Jocham +" Extension: *.mod +" Last Change: 2001 May 10 +" +" 2001 March 24: +" - Modsim III is a registered trademark from compuware corporation +" - made compatible with Vim 6.0 +" +" 1999 Apr 22 : Changed modsim3Literal from region to match +" +" very basic things only (based on the modula2 and c files). + +if version < 600 + " Remove any old syntax stuff hanging around + syn clear +elseif exists("b:current_syntax") + finish +endif + + +" syn case match " case sensitiv match is default + +" A bunch of keywords +syn keyword modsim3Keyword ACTID ALL AND AS ASK +syn keyword modsim3Keyword BY CALL CASE CLASS CONST DIV +syn keyword modsim3Keyword DOWNTO DURATION ELSE ELSIF EXIT FALSE FIXED FOR +syn keyword modsim3Keyword FOREACH FORWARD IF IN INHERITED INOUT +syn keyword modsim3Keyword INTERRUPT LOOP +syn keyword modsim3Keyword MOD MONITOR NEWVALUE +syn keyword modsim3Keyword NONMODSIM NOT OBJECT OF ON OR ORIGINAL OTHERWISE OUT +syn keyword modsim3Keyword OVERRIDE PRIVATE PROTO REPEAT +syn keyword modsim3Keyword RETURN REVERSED SELF STRERR TELL +syn keyword modsim3Keyword TERMINATE THISMETHOD TO TRUE TYPE UNTIL VALUE VAR +syn keyword modsim3Keyword WAIT WAITFOR WHEN WHILE WITH + +" Builtin functions and procedures +syn keyword modsim3Builtin ABS ACTIVATE ADDMONITOR CAP CHARTOSTR CHR CLONE +syn keyword modsim3Builtin DEACTIVATE DEC DISPOSE FLOAT GETMONITOR HIGH INC +syn keyword modsim3Builtin INPUT INSERT INTTOSTR ISANCESTOR LOW LOWER MAX MAXOF +syn keyword modsim3Builtin MIN MINOF NEW OBJTYPEID OBJTYPENAME OBJVARID ODD +syn keyword modsim3Builtin ONERROR ONEXIT ORD OUTPUT POSITION PRINT REALTOSTR +syn keyword modsim3Builtin REPLACE REMOVEMONITOR ROUND SCHAR SIZEOF SPRINT +syn keyword modsim3Builtin STRLEN STRTOCHAR STRTOINT STRTOREAL SUBSTR TRUNC +syn keyword modsim3Builtin UPDATEVALUE UPPER VAL + +syn keyword modsim3BuiltinNoParen HALT TRACE + +" Special keywords +syn keyword modsim3Block PROCEDURE METHOD MODULE MAIN DEFINITION IMPLEMENTATION +syn keyword modsim3Block BEGIN END + +syn keyword modsim3Include IMPORT FROM + +syn keyword modsim3Type ANYARRAY ANYOBJ ANYREC ARRAY BOOLEAN CHAR INTEGER +syn keyword modsim3Type LMONITORED LRMONITORED NILARRAY NILOBJ NILREC REAL +syn keyword modsim3Type RECORD RMONITOR RMONITORED STRING + +" catch errros cause by wrong parenthesis +" slight problem with "( *)" or "(* )". Hints? +syn region modsim3Paren transparent start='(' end=')' contains=ALLBUT,modsim3ParenError +syn match modsim3ParenError ")" + +" Comments +syn region modsim3Comment1 start="{" end="}" contains=modsim3Comment1,modsim3Comment2 +syn region modsim3Comment2 start="(\*" end="\*)" contains=modsim3Comment1,modsim3Comment2 +" highlighting is wrong for constructs like "{ (* } *)", +" which are allowed in Modsim III, but +" I think something like that shouldn't be used anyway. + +" Strings +syn region modsim3String start=+"+ end=+"+ + +" Literals +"syn region modsim3Literal start=+'+ end=+'+ +syn match modsim3Literal "'[^']'\|''''" + +" 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_modsim3_syntax_inits") + if version < 508 + let did_modsim3_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " The default methods for highlighting. Can be overridden later + HiLink modsim3Keyword Statement + HiLink modsim3Block Statement + HiLink modsim3Comment1 Comment + HiLink modsim3Comment2 Comment + HiLink modsim3String String + HiLink modsim3Literal Character + HiLink modsim3Include Statement + HiLink modsim3Type Type + HiLink modsim3ParenError Error + HiLink modsim3Builtin Function + HiLink modsim3BuiltinNoParen Function + + delcommand HiLink +endif + +let b:current_syntax = "modsim3" + +" vim: ts=8 sw=2 + diff --git a/vim/bundle/ubuntu-vim72/syntax/modula2.vim b/vim/bundle/ubuntu-vim72/syntax/modula2.vim new file mode 100644 index 0000000..3018900 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/modula2.vim @@ -0,0 +1,86 @@ +" Vim syntax file +" Language: Modula 2 +" Maintainer: pf@artcom0.north.de (Peter Funk) +" based on original work of Bram Moolenaar +" Last Change: 2001 May 09 + +" 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 + +" Don't ignore case (Modula-2 is case significant). This is the default in vim + +" Especially emphasize headers of procedures and modules: +syn region modula2Header matchgroup=modula2Header start="PROCEDURE " end="(" contains=modula2Ident oneline +syn region modula2Header matchgroup=modula2Header start="MODULE " end=";" contains=modula2Ident oneline +syn region modula2Header matchgroup=modula2Header start="BEGIN (\*" end="\*)" contains=modula2Ident oneline +syn region modula2Header matchgroup=modula2Header start="END " end=";" contains=modula2Ident oneline +syn region modula2Keyword start="END" end=";" contains=ALLBUT,modula2Ident oneline + +" Some very important keywords which should be emphasized more than others: +syn keyword modula2AttKeyword CONST EXIT HALT RETURN TYPE VAR +" All other keywords in alphabetical order: +syn keyword modula2Keyword AND ARRAY BY CASE DEFINITION DIV DO ELSE +syn keyword modula2Keyword ELSIF EXPORT FOR FROM IF IMPLEMENTATION IMPORT +syn keyword modula2Keyword IN LOOP MOD NOT OF OR POINTER QUALIFIED RECORD +syn keyword modula2Keyword SET THEN TO UNTIL WHILE WITH + +syn keyword modula2Type ADDRESS BITSET BOOLEAN CARDINAL CHAR INTEGER REAL WORD +syn keyword modula2StdFunc ABS CAP CHR DEC EXCL INC INCL ORD SIZE TSIZE VAL +syn keyword modula2StdConst FALSE NIL TRUE +" The following may be discussed, since NEW and DISPOSE are some kind of +" special builtin macro functions: +syn keyword modula2StdFunc NEW DISPOSE +" The following types are added later on and may be missing from older +" Modula-2 Compilers (they are at least missing from the original report +" by N.Wirth from March 1980 ;-) Highlighting should apply nevertheless: +syn keyword modula2Type BYTE LONGCARD LONGINT LONGREAL PROC SHORTCARD SHORTINT +" same note applies to min and max, which were also added later to m2: +syn keyword modula2StdFunc MAX MIN +" The underscore was originally disallowed in m2 ids, it was also added later: +syn match modula2Ident " [A-Z,a-z][A-Z,a-z,0-9,_]*" contained + +" Comments may be nested in Modula-2: +syn region modula2Comment start="(\*" end="\*)" contains=modula2Comment,modula2Todo +syn keyword modula2Todo contained TODO FIXME XXX + +" Strings +syn region modula2String start=+"+ end=+"+ +syn region modula2String start="'" end="'" +syn region modula2Set start="{" end="}" + +" 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_modula2_syntax_inits") + if version < 508 + let did_modula2_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink modula2Ident Identifier + HiLink modula2StdConst Boolean + HiLink modula2Type Identifier + HiLink modula2StdFunc Identifier + HiLink modula2Header Type + HiLink modula2Keyword Statement + HiLink modula2AttKeyword PreProc + HiLink modula2Comment Comment + " The following is just a matter of taste (you want to try this instead): + " hi modula2Comment term=bold ctermfg=DarkBlue guifg=Blue gui=bold + HiLink modula2Todo Todo + HiLink modula2String String + HiLink modula2Set String + + delcommand HiLink +endif + +let b:current_syntax = "modula2" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/modula3.vim b/vim/bundle/ubuntu-vim72/syntax/modula3.vim new file mode 100644 index 0000000..d6f72af --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/modula3.vim @@ -0,0 +1,72 @@ +" Vim syntax file +" Language: Modula-3 +" Maintainer: Timo Pedersen +" Last Change: 2001 May 10 + +" Basic things only... +" Based on the modula 2 syntax file + +" 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 + +" Modula-3 is case-sensitive +" syn case ignore + +" Modula-3 keywords +syn keyword modula3Keyword ABS ADDRES ADR ADRSIZE AND ANY +syn keyword modula3Keyword ARRAY AS BITS BITSIZE BOOLEAN BRANDED BY BYTESIZE +syn keyword modula3Keyword CARDINAL CASE CEILING CHAR CONST DEC DEFINITION +syn keyword modula3Keyword DISPOSE DIV +syn keyword modula3Keyword EVAL EXIT EXCEPT EXCEPTION +syn keyword modula3Keyword EXIT EXPORTS EXTENDED FALSE FINALLY FIRST FLOAT +syn keyword modula3Keyword FLOOR FROM GENERIC IMPORT +syn keyword modula3Keyword IN INC INTEGER ISTYPE LAST LOCK +syn keyword modula3Keyword LONGREAL LOOPHOLE MAX METHOD MIN MOD MUTEX +syn keyword modula3Keyword NARROW NEW NIL NOT NULL NUMBER OF OR ORD RAISE +syn keyword modula3Keyword RAISES READONLY REAL RECORD REF REFANY +syn keyword modula3Keyword RETURN ROOT +syn keyword modula3Keyword ROUND SET SUBARRAY TEXT TRUE TRUNC TRY TYPE +syn keyword modula3Keyword TYPECASE TYPECODE UNSAFE UNTRACED VAL VALUE VAR WITH + +" Special keywords, block delimiters etc +syn keyword modula3Block PROCEDURE FUNCTION MODULE INTERFACE REPEAT THEN +syn keyword modula3Block BEGIN END OBJECT METHODS OVERRIDES RECORD REVEAL +syn keyword modula3Block WHILE UNTIL DO TO IF FOR ELSIF ELSE LOOP + +" Comments +syn region modula3Comment start="(\*" end="\*)" + +" Strings +syn region modula3String start=+"+ end=+"+ +syn region modula3String start=+'+ end=+'+ + +" 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_modula3_syntax_inits") + if version < 508 + let did_modula3_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " The default methods for highlighting. Can be overridden later + HiLink modula3Keyword Statement + HiLink modula3Block PreProc + HiLink modula3Comment Comment + HiLink modula3String String + + delcommand HiLink +endif + +let b:current_syntax = "modula3" + +"I prefer to use this... +"set ai +"vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/monk.vim b/vim/bundle/ubuntu-vim72/syntax/monk.vim new file mode 100644 index 0000000..560b79c --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/monk.vim @@ -0,0 +1,228 @@ +" Vim syntax file +" Language: Monk (See-Beyond Technologies) +" Maintainer: Mike Litherland +" Last Change: March 6, 2002 + +" This syntax file is good enough for my needs, but others +" may desire more features. Suggestions and bug reports +" are solicited by the author (above). + +" Originally based on the Scheme syntax file by: + +" Maintainer: Dirk van Deun +" Last Change: April 30, 1998 + +" In fact it's almost identical. :) + +" The original author's notes: +" This script incorrectly recognizes some junk input as numerals: +" parsing the complete system of Scheme numerals using the pattern +" language is practically impossible: I did a lax approximation. + +" Initializing: + +" 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 + +" Fascist highlighting: everything that doesn't fit the rules is an error... + +syn match monkError oneline ![^ \t()";]*! +syn match monkError oneline ")" + +" Quoted and backquoted stuff + +syn region monkQuoted matchgroup=Delimiter start="['`]" end=![ \t()";]!me=e-1 contains=ALLBUT,monkStruc,monkSyntax,monkFunc + +syn region monkQuoted matchgroup=Delimiter start="['`](" matchgroup=Delimiter end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc +syn region monkQuoted matchgroup=Delimiter start="['`]#(" matchgroup=Delimiter end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc + +syn region monkStrucRestricted matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc +syn region monkStrucRestricted matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc + +syn region monkUnquote matchgroup=Delimiter start="," end=![ \t()";]!me=e-1 contains=ALLBUT,monkStruc,monkSyntax,monkFunc +syn region monkUnquote matchgroup=Delimiter start=",@" end=![ \t()";]!me=e-1 contains=ALLBUT,monkStruc,monkSyntax,monkFunc + +syn region monkUnquote matchgroup=Delimiter start=",(" end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc +syn region monkUnquote matchgroup=Delimiter start=",@(" end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc + +syn region monkUnquote matchgroup=Delimiter start=",#(" end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc +syn region monkUnquote matchgroup=Delimiter start=",@#(" end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc + +" R5RS Scheme Functions and Syntax: + +if version < 600 + set iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ +else + setlocal iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ +endif + +syn keyword monkSyntax lambda and or if cond case define let let* letrec +syn keyword monkSyntax begin do delay set! else => +syn keyword monkSyntax quote quasiquote unquote unquote-splicing +syn keyword monkSyntax define-syntax let-syntax letrec-syntax syntax-rules + +syn keyword monkFunc not boolean? eq? eqv? equal? pair? cons car cdr set-car! +syn keyword monkFunc set-cdr! caar cadr cdar cddr caaar caadr cadar caddr +syn keyword monkFunc cdaar cdadr cddar cdddr caaaar caaadr caadar caaddr +syn keyword monkFunc cadaar cadadr caddar cadddr cdaaar cdaadr cdadar cdaddr +syn keyword monkFunc cddaar cddadr cdddar cddddr null? list? list length +syn keyword monkFunc append reverse list-ref memq memv member assq assv assoc +syn keyword monkFunc symbol? symbol->string string->symbol number? complex? +syn keyword monkFunc real? rational? integer? exact? inexact? = < > <= >= +syn keyword monkFunc zero? positive? negative? odd? even? max min + * - / abs +syn keyword monkFunc quotient remainder modulo gcd lcm numerator denominator +syn keyword monkFunc floor ceiling truncate round rationalize exp log sin cos +syn keyword monkFunc tan asin acos atan sqrt expt make-rectangular make-polar +syn keyword monkFunc real-part imag-part magnitude angle exact->inexact +syn keyword monkFunc inexact->exact number->string string->number char=? +syn keyword monkFunc char-ci=? char? char-ci>? char<=? +syn keyword monkFunc char-ci<=? char>=? char-ci>=? char-alphabetic? char? +syn keyword monkFunc char-numeric? char-whitespace? char-upper-case? +syn keyword monkFunc char-lower-case? +syn keyword monkFunc char->integer integer->char char-upcase char-downcase +syn keyword monkFunc string? make-string string string-length string-ref +syn keyword monkFunc string-set! string=? string-ci=? string? string-ci>? string<=? string-ci<=? string>=? +syn keyword monkFunc string-ci>=? substring string-append vector? make-vector +syn keyword monkFunc vector vector-length vector-ref vector-set! procedure? +syn keyword monkFunc apply map for-each call-with-current-continuation +syn keyword monkFunc call-with-input-file call-with-output-file input-port? +syn keyword monkFunc output-port? current-input-port current-output-port +syn keyword monkFunc open-input-file open-output-file close-input-port +syn keyword monkFunc close-output-port eof-object? read read-char peek-char +syn keyword monkFunc write display newline write-char call/cc +syn keyword monkFunc list-tail string->list list->string string-copy +syn keyword monkFunc string-fill! vector->list list->vector vector-fill! +syn keyword monkFunc force with-input-from-file with-output-to-file +syn keyword monkFunc char-ready? load transcript-on transcript-off eval +syn keyword monkFunc dynamic-wind port? values call-with-values +syn keyword monkFunc monk-report-environment null-environment +syn keyword monkFunc interaction-environment + +" Keywords specific to STC's implementation + +syn keyword monkFunc $event-clear $event-parse $event->string $make-event-map +syn keyword monkFunc $resolve-event-definition change-pattern copy copy-strip +syn keyword monkFunc count-data-children count-map-children count-rep data-map +syn keyword monkFunc duplicate duplicate-strip file-check file-lookup get +syn keyword monkFunc insert list-lookup node-has-data? not-verify path? +syn keyword monkFunc path-defined-as-repeating? path-nodeclear path-nodedepth +syn keyword monkFunc path-nodename path-nodeparentname path->string path-valid? +syn keyword monkFunc regex string->path timestamp uniqueid verify + +" Keywords from the Monk function library (from e*Gate 4.1 programmers ref) +syn keyword monkFunc allcap? capitalize char-punctuation? char-substitute +syn keyword monkFunc char-to-char conv count-used-children degc->degf +syn keyword monkFunc diff-two-dates display-error empty-string? fail_id +syn keyword monkFunc fail_id_if fail_translation fail_translation_if +syn keyword monkFunc find-get-after find-get-before get-timestamp julian-date? +syn keyword monkFunc julian->standard leap-year? map-string not-empty-string? +syn keyword monkFunc standard-date? standard->julian string-begins-with? +syn keyword monkFunc string-contains? string-ends-with? string-search-from-left +syn keyword monkFunc string-search-from-right string->ssn strip-punct +syn keyword monkFunc strip-string substring=? symbol-table-get symbol-table-put +syn keyword monkFunc trim-string-left trim-string-right valid-decimal? +syn keyword monkFunc valid-integer? verify-type + +" Writing out the complete description of Scheme numerals without +" using variables is a day's work for a trained secretary... +" This is a useful lax approximation: + +syn match monkNumber oneline "[-#+0-9.][-#+/0-9a-f@i.boxesfdl]*" +syn match monkError oneline ![-#+0-9.][-#+/0-9a-f@i.boxesfdl]*[^-#+/0-9a-f@i.boxesfdl \t()";][^ \t()";]*! + +syn match monkOther oneline ![+-][ \t()";]!me=e-1 +syn match monkOther oneline ![+-]$! +" ... so that a single + or -, inside a quoted context, would not be +" interpreted as a number (outside such contexts, it's a monkFunc) + +syn match monkDelimiter oneline !\.[ \t()";]!me=e-1 +syn match monkDelimiter oneline !\.$! +" ... and a single dot is not a number but a delimiter + +" Simple literals: + +syn match monkBoolean oneline "#[tf]" +syn match monkError oneline !#[tf][^ \t()";]\+! + +syn match monkChar oneline "#\\" +syn match monkChar oneline "#\\." +syn match monkError oneline !#\\.[^ \t()";]\+! +syn match monkChar oneline "#\\space" +syn match monkError oneline !#\\space[^ \t()";]\+! +syn match monkChar oneline "#\\newline" +syn match monkError oneline !#\\newline[^ \t()";]\+! + +" This keeps all other stuff unhighlighted, except *stuff* and : + +syn match monkOther oneline ,[a-z!$%&*/:<=>?^_~][-a-z!$%&*/:<=>?^_~0-9+.@]*, +syn match monkError oneline ,[a-z!$%&*/:<=>?^_~][-a-z!$%&*/:<=>?^_~0-9+.@]*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*, + +syn match monkOther oneline "\.\.\." +syn match monkError oneline !\.\.\.[^ \t()";]\+! +" ... a special identifier + +syn match monkConstant oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[ \t()";],me=e-1 +syn match monkConstant oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*$, +syn match monkError oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*, + +syn match monkConstant oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[ \t()";],me=e-1 +syn match monkConstant oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>$, +syn match monkError oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*, + +" Monk input and output structures +syn match monkSyntax oneline "\(\~input\|\[I\]->\)[^ \t]*" +syn match monkFunc oneline "\(\~output\|\[O\]->\)[^ \t]*" + +" Non-quoted lists, and strings: + +syn region monkStruc matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALL +syn region monkStruc matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALL + +syn region monkString start=+"+ skip=+\\[\\"]+ end=+"+ + +" Comments: + +syn match monkComment ";.*$" + +" Synchronization and the wrapping up... + +syn sync match matchPlace grouphere NONE "^[^ \t]" +" ... i.e. synchronize on a line that starts at the left margin + +" 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_monk_syntax_inits") + if version < 508 + let did_monk_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink monkSyntax Statement + HiLink monkFunc Function + + HiLink monkString String + HiLink monkChar Character + HiLink monkNumber Number + HiLink monkBoolean Boolean + + HiLink monkDelimiter Delimiter + HiLink monkConstant Constant + + HiLink monkComment Comment + HiLink monkError Error + + delcommand HiLink +endif + +let b:current_syntax = "monk" diff --git a/vim/bundle/ubuntu-vim72/syntax/moo.vim b/vim/bundle/ubuntu-vim72/syntax/moo.vim new file mode 100644 index 0000000..10c5d3b --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/moo.vim @@ -0,0 +1,173 @@ +" Vim syntax file +" Language: MOO +" Maintainer: Timo Frenay +" Last Change: 2001 Oct 06 +" Note: Requires Vim 6.0 or above + +" Quit when a syntax file was already loaded +if version < 600 || exists("b:current_syntax") + finish +endif + +" Initializations +syn case ignore + +" C-style comments +syn match mooUncommentedError display ~\*/~ +syn match mooCStyleCommentError display ~/\ze\*~ contained +syn region mooCStyleComment matchgroup=mooComment start=~/\*~ end=~\*/~ contains=mooCStyleCommentError + +" Statements +if exists("moo_extended_cstyle_comments") + syn match mooIdentifier display ~\%(\%(/\*.\{-}\*/\s*\)*\)\@>\<\h\w*\>~ contained transparent contains=mooCStyleComment,@mooKeyword,mooType,mooVariable +else + syn match mooIdentifier display ~\<\h\w*\>~ contained transparent contains=@mooKeyword,mooType,mooVariable +endif +syn keyword mooStatement break continue else elseif endfor endfork endif endtry endwhile finally for if try +syn keyword mooStatement except fork while nextgroup=mooIdentifier skipwhite +syn keyword mooStatement return nextgroup=mooString skipwhite + +" Operators +syn keyword mooOperatorIn in + +" Error constants +syn keyword mooAny ANY +syn keyword mooErrorConstant E_ARGS E_INVARG E_DIV E_FLOAT E_INVIND E_MAXREC E_NACC E_NONE E_PERM E_PROPNF E_QUOTA E_RANGE E_RECMOVE E_TYPE E_VARNF E_VERBNF + +" Builtin variables +syn match mooType display ~\<\%(ERR\|FLOAT\|INT\|LIST\|NUM\|OBJ\|STR\)\>~ +syn match mooVariable display ~\<\%(args\%(tr\)\=\|caller\|dobj\%(str\)\=\|iobj\%(str\)\=\|player\|prepstr\|this\|verb\)\>~ + +" Strings +syn match mooStringError display ~[^\t -[\]-~]~ contained +syn match mooStringSpecialChar display ~\\["\\]~ contained +if !exists("moo_no_regexp") + " Regular expressions + syn match mooRegexp display ~%%~ contained containedin=mooString,mooRegexpParentheses transparent contains=NONE + syn region mooRegexpParentheses display matchgroup=mooRegexpOr start=~%(~ skip=~%%~ end=~%)~ contained containedin=mooString,mooRegexpParentheses transparent oneline + syn match mooRegexpOr display ~%|~ contained containedin=mooString,mooRegexpParentheses +endif +if !exists("moo_no_pronoun_sub") + " Pronoun substitutions + syn match mooPronounSub display ~%%~ contained containedin=mooString transparent contains=NONE + syn match mooPronounSub display ~%[#dilnopqrst]~ contained containedin=mooString + syn match mooPronounSub display ~%\[#[dilnt]\]~ contained containedin=mooString + syn match mooPronounSub display ~%(\h\w*)~ contained containedin=mooString + syn match mooPronounSub display ~%\[[dilnt]\h\w*\]~ contained containedin=mooString + syn match mooPronounSub display ~%<\%([dilnt]:\)\=\a\+>~ contained containedin=mooString +endif +if exists("moo_unmatched_quotes") + syn region mooString matchgroup=mooStringError start=~"~ end=~$~ contains=@mooStringContents keepend + syn region mooString start=~"~ skip=~\\.~ end=~"~ contains=@mooStringContents oneline keepend +else + syn region mooString start=~"~ skip=~\\.~ end=~"\|$~ contains=@mooStringContents keepend +endif + +" Numbers and object numbers +syn match mooNumber display ~\%(\%(\<\d\+\)\=\.\d\+\|\<\d\+\)\%(e[+\-]\=\d\+\)\=\>~ +syn match mooObject display ~#-\=\d\+\>~ + +" Properties and verbs +if exists("moo_builtin_properties") + "Builtin properties + syn keyword mooBuiltinProperty contents f location name owner programmer r w wizard contained containedin=mooPropRef +endif +if exists("moo_extended_cstyle_comments") + syn match mooPropRef display ~\.\s*\%(\%(/\*.\{-}\*/\s*\)*\)\@>\h\w*\>~ transparent contains=mooCStyleComment,@mooKeyword + syn match mooVerbRef display ~:\s*\%(\%(/\*.\{-}\*/\s*\)*\)\@>\h\w*\>~ transparent contains=mooCStyleComment,@mooKeyword +else + syn match mooPropRef display ~\.\s*\h\w*\>~ transparent contains=@mooKeyword + syn match mooVerbRef display ~:\s*\h\w*\>~ transparent contains=@mooKeyword +endif + +" Builtin functions, core properties and core verbs +if exists("moo_extended_cstyle_comments") + syn match mooBuiltinFunction display ~\<\h\w*\s*\%(\%(/\*.\{-}\*/\s*\)*\)\@>\ze(~ contains=mooCStyleComment + syn match mooCorePropOrVerb display ~\$\s*\%(\%(/\*.\{-}\*/\s*\)*\)\@>\%(in\>\)\@!\h\w*\>~ contains=mooCStyleComment,@mooKeyword +else + syn match mooBuiltinFunction display ~\<\h\w*\s*\ze(~ contains=NONE + syn match mooCorePropOrVerb display ~\$\s*\%(in\>\)\@!\h\w*\>~ contains=@mooKeyword +endif +if exists("moo_unknown_builtin_functions") + syn match mooUnknownBuiltinFunction ~\<\h\w*\>~ contained containedin=mooBuiltinFunction contains=mooKnownBuiltinFunction + " Known builtin functions as of version 1.8.1 of the server + " Add your own extensions to this group if you like + syn keyword mooKnownBuiltinFunction abs acos add_property add_verb asin atan binary_hash boot_player buffered_output_length callers caller_perms call_function ceil children chparent clear_property connected_players connected_seconds connection_name connection_option connection_options cos cosh create crypt ctime db_disk_size decode_binary delete_property delete_verb disassemble dump_database encode_binary equal eval exp floatstr floor flush_input force_input function_info idle_seconds index is_clear_property is_member is_player kill_task length listappend listdelete listen listeners listinsert listset log log10 match max max_object memory_usage min move notify object_bytes open_network_connection output_delimiters parent pass players properties property_info queued_tasks queue_info raise random read recycle renumber reset_max_object resume rindex rmatch seconds_left server_log server_version setadd setremove set_connection_option set_player_flag set_property_info set_task_perms set_verb_args set_verb_code set_verb_info shutdown sin sinh sqrt strcmp string_hash strsub substitute suspend tan tanh task_id task_stack ticks_left time tofloat toint toliteral tonum toobj tostr trunc typeof unlisten valid value_bytes value_hash verbs verb_args verb_code verb_info contained +endif + +" Enclosed expressions +syn match mooUnenclosedError display ~[')\]|}]~ +syn match mooParenthesesError display ~[';\]|}]~ contained +syn region mooParentheses start=~(~ end=~)~ transparent contains=@mooEnclosedContents,mooParenthesesError +syn match mooBracketsError display ~[');|}]~ contained +syn region mooBrackets start=~\[~ end=~\]~ transparent contains=@mooEnclosedContents,mooBracketsError +syn match mooBracesError display ~[');\]|]~ contained +syn region mooBraces start=~{~ end=~}~ transparent contains=@mooEnclosedContents,mooBracesError +syn match mooQuestionError display ~[');\]}]~ contained +syn region mooQuestion start=~?~ end=~|~ transparent contains=@mooEnclosedContents,mooQuestionError +syn match mooCatchError display ~[);\]|}]~ contained +syn region mooCatch matchgroup=mooExclamation start=~`~ end=~'~ transparent contains=@mooEnclosedContents,mooCatchError,mooExclamation +if exists("moo_extended_cstyle_comments") + syn match mooExclamation display ~[\t !%&(*+,\-/<=>?@[^`{|]\@!=\@!~ contained contains=mooCStyleComment +else + syn match mooExclamation display ~[\t !%&(*+,\-/<=>?@[^`{|]\@?@^|]\@?~ transparent contains=mooCStyleComment +else + syn match mooScattering ~[,{]\@<=\s*?~ transparent contains=NONE +endif + +" Clusters +syn cluster mooKeyword contains=mooStatement,mooOperatorIn,mooAny,mooErrorConstant +syn cluster mooStringContents contains=mooStringError,mooStringSpecialChar +syn cluster mooEnclosedContents contains=TOP,mooUnenclosedError,mooComment,mooNonCode + +" Define the default highlighting. +hi def link mooUncommentedError Error +hi def link mooCStyleCommentError Error +hi def link mooCStyleComment Comment +hi def link mooStatement Statement +hi def link mooOperatorIn Operator +hi def link mooAny Constant " link this to Keyword if you want +hi def link mooErrorConstant Constant +hi def link mooType Type +hi def link mooVariable Type +hi def link mooStringError Error +hi def link mooStringSpecialChar SpecialChar +hi def link mooRegexpOr SpecialChar +hi def link mooPronounSub SpecialChar +hi def link mooString String +hi def link mooNumber Number +hi def link mooObject Number +hi def link mooBuiltinProperty Type +hi def link mooBuiltinFunction Function +hi def link mooUnknownBuiltinFunction Error +hi def link mooKnownBuiltinFunction Function +hi def link mooCorePropOrVerb Identifier +hi def link mooUnenclosedError Error +hi def link mooParenthesesError Error +hi def link mooBracketsError Error +hi def link mooBracesError Error +hi def link mooQuestionError Error +hi def link mooCatchError Error +hi def link mooExclamation Exception +hi def link mooComment Comment +hi def link mooNonCode PreProc + +let b:current_syntax = "moo" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/mp.vim b/vim/bundle/ubuntu-vim72/syntax/mp.vim new file mode 100644 index 0000000..c0fd60b --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/mp.vim @@ -0,0 +1,132 @@ +" Vim syntax file +" Language: MetaPost +" Maintainer: Andreas Scherer +" Last Change: April 30, 2001 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +let plain_mf_macros = 0 " plain.mf has no special meaning for MetaPost +let other_mf_macros = 0 " cmbase.mf, logo.mf, ... neither + +" Read the Metafont syntax to start with +if version < 600 + source :p:h/mf.vim +else + runtime! syntax/mf.vim +endif + +" MetaPost has TeX inserts for typeset labels +" verbatimtex, btex, and etex will be treated as keywords +syn match mpTeXbegin "\(verbatimtex\|btex\)" +syn match mpTeXend "etex" +syn region mpTeXinsert start="\(verbatimtex\|btex\)"hs=e+1 end="etex"he=s-1 contains=mpTeXbegin,mpTeXend keepend + +" MetaPost primitives not found in Metafont +syn keyword mpInternal bluepart clip color dashed fontsize greenpart infont +syn keyword mpInternal linecap linejoin llcorner lrcorner miterlimit mpxbreak +syn keyword mpInternal prologues redpart setbounds tracinglostchars +syn keyword mpInternal truecorners ulcorner urcorner withcolor + +" Metafont primitives not found in MetaPost +syn keyword notDefined autorounding chardx chardy fillin granularity hppp +syn keyword notDefined proofing smoothing tracingedges tracingpens +syn keyword notDefined turningcheck vppp xoffset yoffset + +" Keywords defined by plain.mp +if !exists("plain_mp_macros") + let plain_mp_macros = 1 " Set this to '0' if your source gets too colourful +endif +if plain_mp_macros + syn keyword mpMacro ahangle ahlength background bbox bboxmargin beginfig + syn keyword mpMacro beveled black blue buildcycle butt center cutafter + syn keyword mpMacro cutbefore cuttings dashpattern defaultfont defaultpen + syn keyword mpMacro defaultscale dotlabel dotlabels drawarrow drawdblarrow + syn keyword mpMacro drawoptions endfig evenly extra_beginfig extra_endfig + syn keyword mpMacro green label labeloffset mitered red rounded squared + syn keyword mpMacro thelabel white base_name base_version + syn keyword mpMacro upto downto exitunless relax gobble gobbled + syn keyword mpMacro interact loggingall tracingall tracingnone + syn keyword mpMacro eps epsilon infinity right left up down origin + syn keyword mpMacro quartercircle halfcircle fullcircle unitsquare identity + syn keyword mpMacro blankpicture withdots ditto EOF pensquare penrazor + syn keyword mpMacro penspeck whatever abs round ceiling byte dir unitvector + syn keyword mpMacro inverse counterclockwise tensepath mod div dotprod + syn keyword mpMacro takepower direction directionpoint intersectionpoint + syn keyword mpMacro softjoin incr decr reflectedabout rotatedaround + syn keyword mpMacro rotatedabout min max flex superellipse interpath + syn keyword mpMacro magstep currentpen currentpen_path currentpicture + syn keyword mpMacro fill draw filldraw drawdot unfill undraw unfilldraw + syn keyword mpMacro undrawdot erase cutdraw image pickup numeric_pickup + syn keyword mpMacro pen_lft pen_rt pen_top pen_bot savepen clearpen + syn keyword mpMacro clear_pen_memory lft rt top bot ulft urt llft lrt + syn keyword mpMacro penpos penstroke arrowhead makelabel labels penlabel + syn keyword mpMacro range numtok thru clearxy clearit clearpen pickup + syn keyword mpMacro shipit bye hide stop solve +endif + +" Keywords defined by mfplain.mp +if !exists("mfplain_mp_macros") + let mfplain_mp_macros = 0 " Set this to '1' to include these macro names +endif +if mfplain_mp_macros + syn keyword mpMacro beginchar blacker capsule_def change_width + syn keyword mpMacro define_blacker_pixels define_corrected_pixels + syn keyword mpMacro define_good_x_pixels define_good_y_pixels + syn keyword mpMacro define_horizontal_corrected_pixels + syn keyword mpMacro define_pixels define_whole_blacker_pixels + syn keyword mpMacro define_whole_vertical_blacker_pixels + syn keyword mpMacro define_whole_vertical_pixels endchar + syn keyword mpMacro extra_beginchar extra_endchar extra_setup + syn keyword mpMacro font_coding_scheme font_extra_space font_identifier + syn keyword mpMacro font_normal_shrink font_normal_space + syn keyword mpMacro font_normal_stretch font_quad font_size + syn keyword mpMacro font_slant font_x_height italcorr labelfont + syn keyword mpMacro makebox makegrid maketicks mode_def mode_setup + syn keyword mpMacro o_correction proofrule proofrulethickness rulepen smode + + " plus some no-ops, also from mfplain.mp + syn keyword mpMacro cullit currenttransform gfcorners grayfont hround + syn keyword mpMacro imagerules lowres_fix nodisplays notransforms openit + syn keyword mpMacro proofoffset screenchars screenrule screenstrokes + syn keyword mpMacro showit slantfont titlefont unitpixel vround +endif + +" Keywords defined by other macro packages, e.g., boxes.mp +if !exists("other_mp_macros") + let other_mp_macros = 1 " Set this to '0' if your source gets too colourful +endif +if other_mp_macros + syn keyword mpMacro circmargin defaultdx defaultdy + syn keyword mpMacro boxit boxjoin bpath circleit drawboxed drawboxes + syn keyword mpMacro drawunboxed fixpos fixsize pic +endif + +" 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_mp_syntax_inits") + if version < 508 + let did_mp_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink mpTeXinsert String + HiLink mpTeXbegin Statement + HiLink mpTeXend Statement + HiLink mpInternal mfInternal + HiLink mpMacro Macro + + delcommand HiLink +endif + +let b:current_syntax = "mp" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/mplayerconf.vim b/vim/bundle/ubuntu-vim72/syntax/mplayerconf.vim new file mode 100644 index 0000000..b348327 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/mplayerconf.vim @@ -0,0 +1,83 @@ +" Vim syntax file +" Language: mplayer(1) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2007-06-17 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +setlocal iskeyword+=- + +syn keyword mplayerconfTodo contained TODO FIXME XXX NOTE + +syn region mplayerconfComment display oneline start='#' end='$' + \ contains=mplayerconfTodo,@Spell + +syn keyword mplayerconfPreProc include + +syn keyword mplayerconfBoolean yes no + +syn match mplayerconfNumber '\<\d\+\>' + +syn keyword mplayerconfOption hardframedrop nomouseinput bandwidth dumpstream + \ rtsp-stream-over-tcp tv overlapsub + \ sub-bg-alpha subfont-outline unicode format + \ vo edl cookies fps zrfd af-adv nosound + \ audio-density passlogfile vobsuboutindex autoq + \ autosync benchmark colorkey nocolorkey edlout + \ enqueue fixed-vo framedrop h identify input + \ lircconf list-options loop menu menu-cfg + \ menu-root nojoystick nolirc nortc playlist + \ quiet really-quiet shuffle skin slave + \ softsleep speed sstep use-stdin aid alang + \ audio-demuxer audiofile audiofile-cache + \ cdrom-device cache cdda channels chapter + \ cookies-file demuxer dumpaudio dumpfile + \ dumpvideo dvbin dvd-device dvdangle forceidx + \ frames hr-mp3-seek idx ipv4-only-proxy + \ loadidx mc mf ni nobps noextbased + \ passwd prefer-ipv4 prefer-ipv6 rawaudio + \ rawvideo saveidx sb srate ss tskeepbroken + \ tsprog tsprobe user user-agent vid vivo + \ dumpjacosub dumpmicrodvdsub dumpmpsub dumpsami + \ dumpsrtsub dumpsub ffactor flip-hebrew font + \ forcedsubsonly fribidi-charset ifo noautosub + \ osdlevel sid slang spuaa spualign spugauss + \ sub sub-bg-color sub-demuxer sub-fuzziness + \ sub-no-text-pp subalign subcc subcp subdelay + \ subfile subfont-autoscale subfont-blur + \ subfont-encoding subfont-osd-scale + \ subfont-text-scale subfps subpos subwidth + \ utf8 vobsub vobsubid abs ao aofile aop delay + \ mixer nowaveheader aa bpp brightness contrast + \ dfbopts display double dr dxr2 fb fbmode + \ fbmodeconfig forcexv fs fsmode-dontuse fstype + \ geometry guiwid hue jpeg monitor-dotclock + \ monitor-hfreq monitor-vfreq monitoraspect + \ nograbpointer nokeepaspect noxv ontop panscan + \ rootwin saturation screenw stop-xscreensaver + \ vm vsync wid xineramascreen z zrbw zrcrop + \ zrdev zrhelp zrnorm zrquality zrvdec zrxdoff + \ ac af afm aspect flip lavdopts noaspect + \ noslices novideo oldpp pp pphelp ssf stereo + \ sws vc vfm x xvidopts xy y zoom vf vop + \ audio-delay audio-preload endpos ffourcc + \ include info noautoexpand noskip o oac of + \ ofps ovc skiplimit v vobsubout vobsuboutid + \ lameopts lavcopts nuvopts xvidencopts + +hi def link mplayerconfTodo Todo +hi def link mplayerconfComment Comment +hi def link mplayerconfPreProc PreProc +hi def link mplayerconfBoolean Boolean +hi def link mplayerconfNumber Number +hi def link mplayerconfOption Keyword + +let b:current_syntax = "mplayerconf" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/mrxvtrc.vim b/vim/bundle/ubuntu-vim72/syntax/mrxvtrc.vim new file mode 100644 index 0000000..878021e --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/mrxvtrc.vim @@ -0,0 +1,276 @@ +" Created : Wed 26 Apr 2006 01:20:53 AM CDT +" Modified : Mon 27 Aug 2007 12:10:37 PM PDT +" Author : Gautam Iyer +" Description : Vim syntax file for mrxvtrc (for mrxvt-0.5.0 and up) + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case match + +" Errors +syn match mrxvtrcError contained '\v\S+' + +" Comments +syn match mrxvtrcComment contains=@Spell '^\s*[!#].*$' +syn match mrxvtrcComment '\v^\s*[#!]\s*\w+[.*]\w+.*:.*' + +" +" Options. +" +syn match mrxvtrcClass '\v^\s*\w+[.*]' + \ nextgroup=mrxvtrcOptions,mrxvtrcProfile,@mrxvtrcPOpts,mrxvtrcError + +" Boolean options +syn keyword mrxvtrcOptions contained nextgroup=mrxvtrcBColon,mrxvtrcError + \ highlightTabOnBell syncTabTitle hideTabbar + \ autohideTabbar bottomTabbar hideButtons + \ syncTabIcon veryBoldFont maximized + \ fullscreen reverseVideo loginShell + \ jumpScroll scrollBar scrollbarRight + \ scrollbarFloating scrollTtyOutputInhibit + \ scrollTtyKeypress transparentForce + \ transparentScrollbar transparentMenubar + \ transparentTabbar tabUsePixmap utmpInhibit + \ visualBell mapAlert meta8 + \ mouseWheelScrollPage multibyte_cursor + \ tripleclickwords showMenu xft xftNomFont + \ xftSlowOutput xftAntialias xftHinting + \ xftAutoHint xftGlobalAdvance cmdAllTabs + \ protectSecondary thai borderLess + \ overrideRedirect broadcast smartResize + \ pointerBlank cursorBlink noSysConfig + \ disableMacros linuxHomeEndKey sessionMgt + \ boldColors smoothResize useFifo veryBright +syn match mrxvtrcOptions contained nextgroup=mrxvtrcBColon,mrxvtrcError + \ '\v' +syn match mrxvtrcBColon contained skipwhite + \ nextgroup=mrxvtrcBoolVal,mrxvtrcError ':' +syn case ignore +syn keyword mrxvtrcBoolVal contained skipwhite nextgroup=mrxvtrcError + \ 0 1 yes no on off true false +syn case match + +" Color options +syn keyword mrxvtrcOptions contained nextgroup=mrxvtrcCColon,mrxvtrcError + \ ufBackground textShadow tabForeground + \ itabForeground tabBackground itabBackground + \ scrollColor troughColor highlightColor + \ cursorColor cursorColor2 pointerColor + \ borderColor tintColor +syn match mrxvtrcOptions contained nextgroup=mrxvtrcCColon,mrxvtrcError + \ '\v' +syn match mrxvtrcCColon contained skipwhite + \ nextgroup=mrxvtrcColorVal ':' +syn match mrxvtrcColorVal contained skipwhite nextgroup=mrxvtrcError + \ '\v#[0-9a-fA-F]{6}' + +" Numeric options +syn keyword mrxvtrcOptions contained nextgroup=mrxvtrcNColon,mrxvtrcError + \ maxTabWidth minVisibleTabs + \ scrollbarThickness xftmSize xftSize desktop + \ externalBorder internalBorder lineSpace + \ pointerBlankDelay cursorBlinkInterval + \ shading backgroundFade bgRefreshInterval + \ fading opacity opacityDegree xftPSize +syn match mrxvtrcNColon contained skipwhite + \ nextgroup=mrxvtrcNumVal,mrxvtrcError ':' +syn match mrxvtrcNumVal contained skipwhite nextgroup=mrxvtrcError + \ '\v[+-]?<(0[0-7]+|\d+|0x[0-9a-f]+)>' + +" String options +syn keyword mrxvtrcOptions contained nextgroup=mrxvtrcSColon,mrxvtrcError + \ tabTitle termName title clientName iconName + \ bellCommand backspaceKey deleteKey + \ printPipe cutChars answerbackString + \ smClientID geometry path boldFont xftFont + \ xftmFont xftPFont inputMethod + \ greektoggle_key menu menubarPixmap + \ scrollbarPixmap tabbarPixmap appIcon + \ multichar_encoding initProfileList +syn match mrxvtrcOptions contained nextgroup=mrxvtrcSColon,mrxvtrcError + \ '\v' +syn match mrxvtrcSColon contained skipwhite nextgroup=mrxvtrcStrVal ':' +syn match mrxvtrcStrVal contained '\v\S.*' + +" Profile options +syn cluster mrxvtrcPOpts contains=mrxvtrcPSOpts,mrxvtrcPCOpts,mrxvtrcPNOpts +syn match mrxvtrcProfile contained nextgroup=@mrxvtrcPOpts,mrxvtrcError + \ '\vprofile\d+\.' +syn keyword mrxvtrcPSOpts contained nextgroup=mrxvtrcSColon,mrxvtrcError + \ tabTitle command holdExitText holdExitTitle + \ Pixmap workingDirectory titleFormat + \ winTitleFormat +syn keyword mrxvtrcPCOpts contained nextgroup=mrxvtrcCColon,mrxvtrcError + \ background foreground +syn keyword mrxvtrcPNOpts contained nextgroup=mrxvtrcNColon,mrxvtrcError + \ holdExit saveLines + +" scrollbarStyle +syn match mrxvtrcOptions contained skipwhite + \ nextgroup=mrxvtrcSBstyle,mrxvtrcError + \ '\v' + +" +" Highlighting groups +" +hi def link mrxvtrcError Error +hi def link mrxvtrcComment Comment + +hi def link mrxvtrcClass Statement +hi def link mrxvtrcOptions mrxvtrcClass +hi def link mrxvtrcBColon mrxvtrcClass +hi def link mrxvtrcCColon mrxvtrcClass +hi def link mrxvtrcNColon mrxvtrcClass +hi def link mrxvtrcSColon mrxvtrcClass +hi def link mrxvtrcProfile mrxvtrcClass +hi def link mrxvtrcPSOpts mrxvtrcClass +hi def link mrxvtrcPCOpts mrxvtrcClass +hi def link mrxvtrcPNOpts mrxvtrcClass + +hi def link mrxvtrcBoolVal Boolean +hi def link mrxvtrcStrVal String +hi def link mrxvtrcColorVal Constant +hi def link mrxvtrcNumVal Number + +hi def link mrxvtrcSBstyle mrxvtrcStrVal +hi def link mrxvtrcSBalign mrxvtrcStrVal +hi def link mrxvtrcTSmode mrxvtrcStrVal +hi def link mrxvtrcGrkKbd mrxvtrcStrVal +hi def link mrxvtrcXftWt mrxvtrcStrVal +hi def link mrxvtrcXftSl mrxvtrcStrVal +hi def link mrxvtrcXftWd mrxvtrcStrVal +hi def link mrxvtrcXftHt mrxvtrcStrVal +hi def link mrxvtrcPedit mrxvtrcStrVal +hi def link mrxvtrcMod mrxvtrcStrVal +hi def link mrxvtrcSelSty mrxvtrcStrVal + +hi def link mrxvtrcMacro Identifier +hi def link mrxvtrcKey mrxvtrcClass +hi def link mrxvtrcTitle mrxvtrcStrVal +hi def link mrxvtrcShell Special +hi def link mrxvtrcCmd PreProc +hi def link mrxvtrcSubwin mrxvtrcStrVal + +let b:current_syntax = "mrxvtrc" diff --git a/vim/bundle/ubuntu-vim72/syntax/msidl.vim b/vim/bundle/ubuntu-vim72/syntax/msidl.vim new file mode 100644 index 0000000..cf270ee --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/msidl.vim @@ -0,0 +1,92 @@ +" Vim syntax file +" Language: MS IDL (Microsoft dialect of Interface Description Language) +" Maintainer: Vadim Zeitlin +" Last Change: 2003 May 11 + +" 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 + +" Misc basic +syn match msidlId "[a-zA-Z][a-zA-Z0-9_]*" +syn match msidlUUID "{\?[[:xdigit:]]\{8}-\([[:xdigit:]]\{4}-\)\{3}[[:xdigit:]]\{12}}\?" +syn region msidlString start=/"/ skip=/\\\(\\\\\)*"/ end=/"/ +syn match msidlLiteral "\d\+\(\.\d*\)\=" +syn match msidlLiteral "\.\d\+" +syn match msidlSpecial contained "[]\[{}:]" + +" Comments +syn keyword msidlTodo contained TODO FIXME XXX +syn region msidlComment start="/\*" end="\*/" contains=msidlTodo +syn match msidlComment "//.*" contains=msidlTodo +syn match msidlCommentError "\*/" + +" C style Preprocessor +syn region msidlIncluded contained start=+"+ skip=+\\\(\\\\\)*"+ end=+"+ +syn match msidlIncluded contained "<[^>]*>" +syn match msidlInclude "^[ \t]*#[ \t]*include\>[ \t]*["<]" contains=msidlIncluded,msidlString +syn region msidlPreCondit start="^[ \t]*#[ \t]*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=msidlComment,msidlCommentError +syn region msidlDefine start="^[ \t]*#[ \t]*\(define\>\|undef\>\)" skip="\\$" end="$" contains=msidlLiteral, msidlString + +" Attributes +syn keyword msidlAttribute contained in out propget propput propputref retval +syn keyword msidlAttribute contained aggregatable appobject binadable coclass control custom default defaultbind defaultcollelem defaultvalue defaultvtable dispinterface displaybind dual entry helpcontext helpfile helpstring helpstringdll hidden id immediatebind lcid library licensed nonbrowsable noncreatable nonextensible oleautomation optional object public readonly requestedit restricted source string uidefault usesgetlasterror vararg version +syn match msidlAttribute /uuid(.*)/he=s+4 contains=msidlUUID +syn match msidlAttribute /helpstring(.*)/he=s+10 contains=msidlString +syn region msidlAttributes start="\[" end="]" keepend contains=msidlSpecial,msidlString,msidlAttribute,msidlComment,msidlCommentError + +" Keywords +syn keyword msidlEnum enum +syn keyword msidlImport import importlib +syn keyword msidlStruct interface library coclass +syn keyword msidlTypedef typedef + +" Types +syn keyword msidlStandardType byte char double float hyper int long short void wchar_t +syn keyword msidlStandardType BOOL BSTR HRESULT VARIANT VARIANT_BOOL +syn region msidlSafeArray start="SAFEARRAY(" end=")" contains=msidlStandardType + +syn sync lines=50 + +" 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_msidl_syntax_inits") + if version < 508 + let did_msidl_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink msidlInclude Include + HiLink msidlPreProc PreProc + HiLink msidlPreCondit PreCondit + HiLink msidlDefine Macro + HiLink msidlIncluded String + HiLink msidlString String + HiLink msidlComment Comment + HiLink msidlTodo Todo + HiLink msidlSpecial SpecialChar + HiLink msidlLiteral Number + HiLink msidlUUID Number + + HiLink msidlImport Include + HiLink msidlEnum StorageClass + HiLink msidlStruct Structure + HiLink msidlTypedef Typedef + HiLink msidlAttribute StorageClass + + HiLink msidlStandardType Type + HiLink msidlSafeArray Type + + delcommand HiLink +endif + +let b:current_syntax = "msidl" + +" vi: set ts=8 sw=4: diff --git a/vim/bundle/ubuntu-vim72/syntax/msmessages.vim b/vim/bundle/ubuntu-vim72/syntax/msmessages.vim new file mode 100644 index 0000000..6058857 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/msmessages.vim @@ -0,0 +1,135 @@ +" Vim syntax file +" Language: MS Message Text files (*.mc) +" Maintainer: Kevin Locke +" Last Change: 2008 April 09 +" Location: http://kevinlocke.name/programs/vim/syntax/msmessages.vim + +" See format description at +" This file is based on the rc.vim and c.vim + +" 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 + +" Common MS Messages keywords +syn case ignore +syn keyword msmessagesIdentifier MessageIdTypedef +syn keyword msmessagesIdentifier SeverityNames +syn keyword msmessagesIdentifier FacilityNames +syn keyword msmessagesIdentifier LanguageNames +syn keyword msmessagesIdentifier OutputBase + +syn keyword msmessagesIdentifier MessageId +syn keyword msmessagesIdentifier Severity +syn keyword msmessagesIdentifier Facility +syn keyword msmessagesIdentifier OutputBase + +syn match msmessagesIdentifier /\/ nextgroup=msmessagesIdentEq skipwhite +syn match msmessagesIdentEq transparent /=/ nextgroup=msmessagesIdentDef skipwhite contained +syn match msmessagesIdentDef display /\w\+/ contained +" Note: The Language keyword is highlighted as part of an msmessagesLangEntry + +" Set value +syn case match +syn region msmessagesSet start="(" end=")" transparent fold contains=msmessagesName keepend +syn match msmessagesName /\w\+/ nextgroup=msmessagesSetEquals skipwhite contained +syn match msmessagesSetEquals /=/ display transparent nextgroup=msmessagesNumVal skipwhite contained +syn match msmessagesNumVal display transparent "\<\d\|\.\d" contains=msmessagesNumber,msmessagesFloat,msmessagesOctalError,msmessagesOctal nextgroup=msmessagesValSep +syn match msmessagesValSep /:/ display nextgroup=msmessagesNameDef contained +syn match msmessagesNameDef /\w\+/ display contained + + +" Comments are converted to C source (by removing leading ;) +" So we highlight the comments as C +syn include @msmessagesC syntax/c.vim +unlet b:current_syntax +syn region msmessagesCComment matchgroup=msmessagesComment start=/;/ end=/$/ contains=@msmessagesC keepend + +" String and Character constants +" Highlight special characters (those which have a escape) differently +syn case ignore +syn region msmessagesLangEntry start=/\\s*=\s*\S\+\s*$/hs=e+1 end=/^\./ contains=msmessagesFormat,msmessagesLangEntryEnd,msmessagesLanguage keepend +syn match msmessagesLanguage /\" +"hex number +syn match msmessagesNumber display contained "\<0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" +" Flag the first zero of an octal number as something special +syn match msmessagesOctal display contained "\<0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=msmessagesOctalZero +syn match msmessagesOctalZero display contained "\<0" +" flag an octal number with wrong digits +syn match msmessagesOctalError display contained "\<0\o*[89]\d*" +syn match msmessagesFloat display contained "\d\+f" +"floating point number, with dot, optional exponent +syn match msmessagesFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" +"floating point number, starting with a dot, optional exponent +syn match msmessagesFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match msmessagesFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" +"hexadecimal floating point number, optional leading digits, with dot, with exponent +syn match msmessagesFloat display contained "0x\x*\.\x\+p[-+]\=\d\+[fl]\=\>" +"hexadecimal floating point number, with leading digits, optional dot, with exponent +syn match msmessagesFloat display contained "0x\x\+\.\=p[-+]\=\d\+[fl]\=\>" + +" Types (used in MessageIdTypedef statement) +syn case match +syn keyword msmessagesType int long short char +syn keyword msmessagesType signed unsigned +syn keyword msmessagesType size_t ssize_t sig_atomic_t +syn keyword msmessagesType int8_t int16_t int32_t int64_t +syn keyword msmessagesType uint8_t uint16_t uint32_t uint64_t +syn keyword msmessagesType int_least8_t int_least16_t int_least32_t int_least64_t +syn keyword msmessagesType uint_least8_t uint_least16_t uint_least32_t uint_least64_t +syn keyword msmessagesType int_fast8_t int_fast16_t int_fast32_t int_fast64_t +syn keyword msmessagesType uint_fast8_t uint_fast16_t uint_fast32_t uint_fast64_t +syn keyword msmessagesType intptr_t uintptr_t +syn keyword msmessagesType intmax_t uintmax_t +" Add some Windows datatypes that will be common in msmessages files +syn keyword msmessagesType BYTE CHAR SHORT SIZE_T SSIZE_T TBYTE TCHAR UCHAR USHORT +syn keyword msmessagesType DWORD DWORDLONG DWORD32 DWORD64 +syn keyword msmessagesType INT INT32 INT64 UINT UINT32 UINT64 +syn keyword msmessagesType LONG LONGLONG LONG32 LONG64 +syn keyword msmessagesType ULONG ULONGLONG ULONG32 ULONG64 + +" Sync to language entries, since they should be most common +syn sync match msmessagesLangSync grouphere msmessagesLangEntry "\ +" URL: http://www.isp.de/data/msql.vim +" Email: Subject: send syntax_vim.tgz +" Last Change: 2001 May 10 +" +" Options msql_sql_query = 1 for SQL syntax highligthing inside strings +" msql_minlines = x to sync at least x lines backwards + +" 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 + +if !exists("main_syntax") + let main_syntax = 'msql' +endif + +if version < 600 + so :p:h/html.vim +else + runtime! syntax/html.vim + unlet b:current_syntax +endif + +syn cluster htmlPreproc add=msqlRegion + +syn case match + +" Internal Variables +syn keyword msqlIntVar ERRMSG contained + +" Env Variables +syn keyword msqlEnvVar SERVER_SOFTWARE SERVER_NAME SERVER_URL GATEWAY_INTERFACE contained +syn keyword msqlEnvVar SERVER_PROTOCOL SERVER_PORT REQUEST_METHOD PATH_INFO contained +syn keyword msqlEnvVar PATH_TRANSLATED SCRIPT_NAME QUERY_STRING REMOTE_HOST contained +syn keyword msqlEnvVar REMOTE_ADDR AUTH_TYPE REMOTE_USER CONTEN_TYPE contained +syn keyword msqlEnvVar CONTENT_LENGTH HTTPS HTTPS_KEYSIZE HTTPS_SECRETKEYSIZE contained +syn keyword msqlEnvVar HTTP_ACCECT HTTP_USER_AGENT HTTP_IF_MODIFIED_SINCE contained +syn keyword msqlEnvVar HTTP_FROM HTTP_REFERER contained + +" Inlclude lLite +syn include @msqlLite :p:h/lite.vim + +" Msql Region +syn region msqlRegion matchgroup=Delimiter start="D]" end=">" contains=@msqlLite,msql.* + +" sync +if exists("msql_minlines") + exec "syn sync minlines=" . msql_minlines +else + syn sync minlines=100 +endif + +" 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_msql_syn_inits") + if version < 508 + let did_msql_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink msqlComment Comment + HiLink msqlString String + HiLink msqlNumber Number + HiLink msqlFloat Float + HiLink msqlIdentifier Identifier + HiLink msqlGlobalIdentifier Identifier + HiLink msqlIntVar Identifier + HiLink msqlEnvVar Identifier + HiLink msqlFunctions Function + HiLink msqlRepeat Repeat + HiLink msqlConditional Conditional + HiLink msqlStatement Statement + HiLink msqlType Type + HiLink msqlInclude Include + HiLink msqlDefine Define + HiLink msqlSpecialChar SpecialChar + HiLink msqlParentError Error + HiLink msqlTodo Todo + HiLink msqlOperator Operator + HiLink msqlRelation Operator + + delcommand HiLink +endif + +let b:current_syntax = "msql" + +if main_syntax == 'msql' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/mupad.vim b/vim/bundle/ubuntu-vim72/syntax/mupad.vim new file mode 100644 index 0000000..109f880 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/mupad.vim @@ -0,0 +1,295 @@ +" Vim syntax file +" Language: MuPAD source +" Maintainer: Dave Silvia +" Filenames: *.mu +" Date: 6/30/2004 + + +" 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 + +" Set default highlighting to Win2k +if !exists("mupad_cmdextversion") + let mupad_cmdextversion = 2 +endif + +syn case match + +syn match mupadComment "//\p*$" +syn region mupadComment start="/\*" end="\*/" + +syn region mupadString start="\"" skip=/\\"/ end="\"" + +syn match mupadOperator "(\|)\|:=\|::\|:\|;" +" boolean +syn keyword mupadOperator and or not xor +syn match mupadOperator "==>\|\<=\>" + +" Informational +syn keyword mupadSpecial FILEPATH NOTEBOOKFILE NOTEBOOKPATH +" Set-able, e.g., DIGITS:=10 +syn keyword mupadSpecial DIGITS HISTORY LEVEL +syn keyword mupadSpecial MAXLEVEL MAXDEPTH ORDER +syn keyword mupadSpecial TEXTWIDTH +" Set-able, e.g., PRETTYPRINT:=TRUE +syn keyword mupadSpecial PRETTYPRINT +" Set-able, e.g., LIBPATH:="C:\\MuPAD Pro\\mylibdir" or LIBPATH:="/usr/MuPAD Pro/mylibdir" +syn keyword mupadSpecial LIBPATH PACKAGEPATH +syn keyword mupadSpecial READPATH TESTPATH WRITEPATH +" Symbols and Constants +syn keyword mupadDefine FAIL NIL +syn keyword mupadDefine TRUE FALSE UNKNOWN +syn keyword mupadDefine complexInfinity infinity +syn keyword mupadDefine C_ CATALAN E EULER I PI Q_ R_ +syn keyword mupadDefine RD_INF RD_NINF undefined unit universe Z_ +" print() directives +syn keyword mupadDefine Unquoted NoNL KeepOrder Typeset +" domain specifics +syn keyword mupadStatement domain begin end_domain end +syn keyword mupadIdentifier inherits category axiom info doc interface +" basic programming statements +syn keyword mupadStatement proc begin end_proc +syn keyword mupadUnderlined name local option save +syn keyword mupadConditional if then elif else end_if +syn keyword mupadConditional case of do break end_case +syn keyword mupadRepeat for do next break end_for +syn keyword mupadRepeat while do next break end_while +syn keyword mupadRepeat repeat next break until end_repeat +" domain packages/libraries +syn keyword mupadType detools import linalg numeric numlib plot polylib +syn match mupadType '\' + +"syn keyword mupadFunction contains +" Functions dealing with prime numbers +syn keyword mupadFunction phi invphi mersenne nextprime numprimedivisors +syn keyword mupadFunction pollard prevprime primedivisors +" Functions operating on Lists, Matrices, Sets, ... +syn keyword mupadFunction array _index +" Evaluation +syn keyword mupadFunction float contains +" stdlib +syn keyword mupadFunction _exprseq _invert _lazy_and _lazy_or _negate +syn keyword mupadFunction _stmtseq _invert intersect minus union +syn keyword mupadFunction Ci D Ei O Re Im RootOf Si +syn keyword mupadFunction Simplify +syn keyword mupadFunction abs airyAi airyBi alias unalias anames append +syn keyword mupadFunction arcsin arccos arctan arccsc arcsec arccot +syn keyword mupadFunction arcsinh arccosh arctanh arccsch arcsech arccoth +syn keyword mupadFunction arg args array assert assign assignElements +syn keyword mupadFunction assume assuming asympt bernoulli +syn keyword mupadFunction besselI besselJ besselK besselY beta binomial bool +syn keyword mupadFunction bytes card +syn keyword mupadFunction ceil floor round trunc +syn keyword mupadFunction coeff coerce collect combine copyClosure +syn keyword mupadFunction conjugate content context contfrac +syn keyword mupadFunction debug degree degreevec delete _delete denom +syn keyword mupadFunction densematrix diff dilog dirac discont div _div +syn keyword mupadFunction divide domtype doprint erf erfc error eval evalassign +syn keyword mupadFunction evalp exp expand export unexport expose expr +syn keyword mupadFunction expr2text external extnops extop extsubsop +syn keyword mupadFunction fact fact2 factor fclose finput fname fopen fprint +syn keyword mupadFunction fread ftextinput readbitmap readdata pathname +syn keyword mupadFunction protocol read readbytes write writebytes +syn keyword mupadFunction float frac frame _frame frandom freeze unfreeze +syn keyword mupadFunction funcenv gamma gcd gcdex genident genpoly +syn keyword mupadFunction getpid getprop ground has hastype heaviside help +syn keyword mupadFunction history hold hull hypergeom icontent id +syn keyword mupadFunction ifactor igamma igcd igcdex ilcm in _in +syn keyword mupadFunction indets indexval info input int int2text +syn keyword mupadFunction interpolate interval irreducible is +syn keyword mupadFunction isprime isqrt iszero ithprime kummerU lambertW +syn keyword mupadFunction last lasterror lcm lcoeff ldegree length +syn keyword mupadFunction level lhs rhs limit linsolve lllint +syn keyword mupadFunction lmonomial ln loadmod loadproc log lterm +syn keyword mupadFunction match map mapcoeffs maprat matrix max min +syn keyword mupadFunction mod modp mods monomials multcoeffs new +syn keyword mupadFunction newDomain _next nextprime nops +syn keyword mupadFunction norm normal nterms nthcoeff nthmonomial nthterm +syn keyword mupadFunction null numer ode op operator package +syn keyword mupadFunction pade partfrac patchlevel pdivide +syn keyword mupadFunction piecewise plot plotfunc2d plotfunc3d +syn keyword mupadFunction poly poly2list polylog powermod print +syn keyword mupadFunction product protect psi quit _quit radsimp random rationalize +syn keyword mupadFunction rec rectform register reset return revert +syn keyword mupadFunction rewrite select series setuserinfo share sign signIm +syn keyword mupadFunction simplify +syn keyword mupadFunction sin cos tan csc sec cot +syn keyword mupadFunction sinh cosh tanh csch sech coth +syn keyword mupadFunction slot solve +syn keyword mupadFunction pdesolve matlinsolve matlinsolveLU toeplitzSolve +syn keyword mupadFunction vandermondeSolve fsolve odesolve odesolve2 +syn keyword mupadFunction polyroots polysysroots odesolveGeometric +syn keyword mupadFunction realroot realroots mroots lincongruence +syn keyword mupadFunction msqrts +syn keyword mupadFunction sort split sqrt strmatch strprint +syn keyword mupadFunction subs subset subsex subsop substring sum +syn keyword mupadFunction surd sysname sysorder system table taylor tbl2text +syn keyword mupadFunction tcoeff testargs testeq testtype text2expr +syn keyword mupadFunction text2int text2list text2tbl rtime time +syn keyword mupadFunction traperror type unassume unit universe +syn keyword mupadFunction unloadmod unprotect userinfo val version +syn keyword mupadFunction warning whittakerM whittakerW zeta zip + +" graphics plot:: +syn keyword mupadFunction getDefault setDefault copy modify Arc2d Arrow2d +syn keyword mupadFunction Arrow3d Bars2d Bars3d Box Boxplot Circle2d Circle3d +syn keyword mupadFunction Cone Conformal Curve2d Curve3d Cylinder Cylindrical +syn keyword mupadFunction Density Ellipse2d Function2d Function3d Hatch +syn keyword mupadFunction Histogram2d HOrbital Implicit2d Implicit3d +syn keyword mupadFunction Inequality Iteration Line2d Line3d Lsys Matrixplot +syn keyword mupadFunction MuPADCube Ode2d Ode3d Parallelogram2d Parallelogram3d +syn keyword mupadFunction Piechart2d Piechart3d Point2d Point3d Polar +syn keyword mupadFunction Polygon2d Polygon3d Raster Rectangle Sphere +syn keyword mupadFunction Ellipsoid Spherical Sum Surface SurfaceSet +syn keyword mupadFunction SurfaceSTL Tetrahedron Hexahedron Octahedron +syn keyword mupadFunction Dodecahedron Icosahedron Text2d Text3d Tube Turtle +syn keyword mupadFunction VectorField2d XRotate ZRotate Canvas CoordinateSystem2d +syn keyword mupadFunction CoordinateSystem3d Group2d Group3d Scene2d Scene3d ClippingBox +syn keyword mupadFunction Rotate2d Rotate3d Scale2d Scale3d Transform2d +syn keyword mupadFunction Transform3d Translate2d Translate3d AmbientLight +syn keyword mupadFunction Camera DistantLight PointLight SpotLight + +" graphics Attributes +" graphics Output Attributes +syn keyword mupadIdentifier OutputFile OutputOptions +" graphics Defining Attributes +syn keyword mupadIdentifier Angle AngleRange AngleBegin AngleEnd +syn keyword mupadIdentifier Area Axis AxisX AxisY AxisZ Base Top +syn keyword mupadIdentifier BaseX TopX BaseY TopY BaseZ TopZ +syn keyword mupadIdentifier BaseRadius TopRadius Cells +syn keyword mupadIdentifier Center CenterX CenterY CenterZ +syn keyword mupadIdentifier Closed ColorData CommandList Contours CoordinateType +syn keyword mupadIdentifier Data DensityData DensityFunction From To +syn keyword mupadIdentifier FromX ToX FromY ToY FromZ ToZ +syn keyword mupadIdentifier Function FunctionX FunctionY FunctionZ +syn keyword mupadIdentifier Function1 Function2 Baseline +syn keyword mupadIdentifier Generations RotationAngle IterationRules StartRule StepLength +syn keyword mupadIdentifier TurtleRules Ground Heights Moves Inequalities +syn keyword mupadIdentifier InputFile Iterations StartingPoint +syn keyword mupadIdentifier LineColorFunction FillColorFunction +syn keyword mupadIdentifier Matrix2d Matrix3d +syn keyword mupadIdentifier MeshList MeshListType MeshListNormals +syn keyword mupadIdentifier MagneticQuantumNumber MomentumQuantumNumber PrincipalQuantumNumber +syn keyword mupadIdentifier Name Normal NormalX NormalY NormalZ +syn keyword mupadIdentifier ParameterName ParameterBegin ParameterEnd ParameterRange +syn keyword mupadIdentifier Points2d Points3d Radius RadiusFunction +syn keyword mupadIdentifier Position PositionX PositionY PositionZ +syn keyword mupadIdentifier Scale ScaleX ScaleY ScaleZ Shift ShiftX ShiftY ShiftZ +syn keyword mupadIdentifier SemiAxes SemiAxisX SemiAxisY SemiAxisZ +syn keyword mupadIdentifier Tangent1 Tangent1X Tangent1Y Tangent1Z +syn keyword mupadIdentifier Tangent2 Tangent2X Tangent2Y Tangent2Z +syn keyword mupadIdentifier Text TextOrientation TextRotation +syn keyword mupadIdentifier UName URange UMin UMax VName VRange VMin VMax +syn keyword mupadIdentifier XName XRange XMin XMax YName YRange YMin YMax +syn keyword mupadIdentifier ZName ZRange ZMin ZMax ViewingBox +syn keyword mupadIdentifier ViewingBoxXMin ViewingBoxXMax ViewingBoxXRange +syn keyword mupadIdentifier ViewingBoxYMin ViewingBoxYMax ViewingBoxYRange +syn keyword mupadIdentifier ViewingBoxZMin ViewingBoxZMax ViewingBoxZRange +syn keyword mupadIdentifier Visible +" graphics Axis Attributes +syn keyword mupadIdentifier Axes AxesInFront AxesLineColor AxesLineWidth +syn keyword mupadIdentifier AxesOrigin AxesOriginX AxesOriginY AxesOriginZ +syn keyword mupadIdentifier AxesTips AxesTitleAlignment +syn keyword mupadIdentifier AxesTitleAlignmentX AxesTitleAlignmentY AxesTitleAlignmentZ +syn keyword mupadIdentifier AxesTitles XAxisTitle YAxisTitle ZAxisTitle +syn keyword mupadIdentifier AxesVisible XAxisVisible YAxisVisible ZAxisVisible +syn keyword mupadIdentifier YAxisTitleOrientation +" graphics Tick Marks Attributes +syn keyword mupadIdentifier TicksAnchor XTicksAnchor YTicksAnchor ZTicksAnchor +syn keyword mupadIdentifier TicksAt XTicksAt YTicksAt ZTicksAt +syn keyword mupadIdentifier TicksBetween XTicksBetween YTicksBetween ZTicksBetween +syn keyword mupadIdentifier TicksDistance XTicksDistance YTicksDistance ZTicksDistance +syn keyword mupadIdentifier TicksNumber XTicksNumber YTicksNumber ZTicksNumber +syn keyword mupadIdentifier TicksVisible XTicksVisible YTicksVisible ZTicksVisible +syn keyword mupadIdentifier TicksLength TicksLabelStyle +syn keyword mupadIdentifier XTicksLabelStyle YTicksLabelStyle ZTicksLabelStyle +syn keyword mupadIdentifier TicksLabelsVisible +syn keyword mupadIdentifier XTicksLabelsVisible YTicksLabelsVisible ZTicksLabelsVisible +" graphics Grid Lines Attributes +syn keyword mupadIdentifier GridInFront GridLineColor SubgridLineColor +syn keyword mupadIdentifier GridLineStyle SubgridLineStyle GridLineWidth SubgridLineWidth +syn keyword mupadIdentifier GridVisible XGridVisible YGridVisible ZGridVisible +syn keyword mupadIdentifier SubgridVisible XSubgridVisible YSubgridVisible ZSubgridVisible +" graphics Animation Attributes +syn keyword mupadIdentifier Frames TimeRange TimeBegin TimeEnd +syn keyword mupadIdentifier VisibleAfter VisibleBefore VisibleFromTo +syn keyword mupadIdentifier VisibleAfterEnd VisibleBeforeBegin +" graphics Annotation Attributes +syn keyword mupadIdentifier Footer Header FooterAlignment HeaderAlignment +syn keyword mupadIdentifier HorizontalAlignment TitleAlignment VerticalAlignment +syn keyword mupadIdentifier Legend LegendEntry LegendText +syn keyword mupadIdentifier LegendAlignment LegendPlacement LegendVisible +syn keyword mupadIdentifier Title Titles +syn keyword mupadIdentifier TitlePosition TitlePositionX TitlePositionY TitlePositionZ +" graphics Layout Attributes +syn keyword mupadIdentifier Bottom Left Height Width Layout Rows Columns +syn keyword mupadIdentifier Margin BottomMargin TopMargin LeftMargin RightMargin +syn keyword mupadIdentifier OutputUnits Spacing +" graphics Calculation Attributes +syn keyword mupadIdentifier AdaptiveMesh DiscontinuitySearch Mesh SubMesh +syn keyword mupadIdentifier UMesh USubMesh VMesh VSubMesh +syn keyword mupadIdentifier XMesh XSubMesh YMesh YSubMesh Zmesh +" graphics Camera and Lights Attributes +syn keyword mupadIdentifier CameraCoordinates CameraDirection +syn keyword mupadIdentifier CameraDirectionX CameraDirectionY CameraDirectionZ +syn keyword mupadIdentifier FocalPoint FocalPointX FocalPointY FocalPointZ +syn keyword mupadIdentifier LightColor Lighting LightIntensity OrthogonalProjection +syn keyword mupadIdentifier SpotAngle ViewingAngle +syn keyword mupadIdentifier Target TargetX TargetY TargetZ +" graphics Presentation Style and Fonts Attributes +syn keyword mupadIdentifier ArrowLength +syn keyword mupadIdentifier AxesTitleFont FooterFont HeaderFont LegendFont +syn keyword mupadIdentifier TextFont TicksLabelFont TitleFont +syn keyword mupadIdentifier BackgroundColor BackgroundColor2 BackgroundStyle +syn keyword mupadIdentifier BackgroundTransparent Billboarding BorderColor BorderWidth +syn keyword mupadIdentifier BoxCenters BoxWidths DrawMode Gap XGap YGap +syn keyword mupadIdentifier Notched NotchWidth Scaling YXRatio ZXRatio +syn keyword mupadIdentifier VerticalAsymptotesVisible VerticalAsymptotesStyle +syn keyword mupadIdentifier VerticalAsymptotesColor VerticalAsymptotesWidth +" graphics Line Style Attributes +syn keyword mupadIdentifier LineColor LineColor2 LineColorType LineStyle +syn keyword mupadIdentifier LinesVisible ULinesVisible VLinesVisible XLinesVisible +syn keyword mupadIdentifier YLinesVisible LineWidth MeshVisible +" graphics Point Style Attributes +syn keyword mupadIdentifier PointColor PointSize PointStyle PointsVisible +" graphics Surface Style Attributes +syn keyword mupadIdentifier BarStyle Shadows Color Colors FillColor FillColor2 +syn keyword mupadIdentifier FillColorTrue FillColorFalse FillColorUnknown FillColorType +syn keyword mupadIdentifier Filled FillPattern FillPatterns FillStyle +syn keyword mupadIdentifier InterpolationStyle Shading UseNormals +" graphics Arrow Style Attributes +syn keyword mupadIdentifier TipAngle TipLength TipStyle TubeDiameter +syn keyword mupadIdentifier Tubular +" graphics meta-documentation Attributes +syn keyword mupadIdentifier objectGroupsListed + +if version >= 508 || !exists("did_mupad_syntax_inits") + if version < 508 + let did_mupad_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink mupadComment Comment + HiLink mupadString String + HiLink mupadOperator Operator + HiLink mupadSpecial Special + HiLink mupadStatement Statement + HiLink mupadUnderlined Underlined + HiLink mupadConditional Conditional + HiLink mupadRepeat Repeat + HiLink mupadFunction Function + HiLink mupadType Type + HiLink mupadDefine Define + HiLink mupadIdentifier Identifier + + delcommand HiLink +endif + +" TODO More comprehensive listing. diff --git a/vim/bundle/ubuntu-vim72/syntax/mush.vim b/vim/bundle/ubuntu-vim72/syntax/mush.vim new file mode 100644 index 0000000..0645f33 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/mush.vim @@ -0,0 +1,227 @@ +" MUSHcode syntax file +" Maintainer: Rick Bird +" Based on vim Syntax file by: Bek Oberin +" Last Updated: Fri Nov 04 20:28:15 2005 +" +" 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 + + +" regular mush functions + +syntax keyword mushFunction contained @@ abs accent accname acos add after align +syntax keyword mushFunction contained allof alphamax alphamin and andflags +syntax keyword mushFunction contained andlflags andlpowers andpowers ansi aposs art +syntax keyword mushFunction contained asin atan atan2 atrlock attrcnt band baseconv +syntax keyword mushFunction contained beep before blank2tilde bnand bnot bor bound +syntax keyword mushFunction contained brackets break bxor cand cansee capstr case +syntax keyword mushFunction contained caseall cat ceil center checkpass children +syntax keyword mushFunction contained chr clone cmds cnetpost comp con config conn +syntax keyword mushFunction contained controls convsecs convtime convutcsecs cor +syntax keyword mushFunction contained cos create ctime ctu dec decrypt default +syntax keyword mushFunction contained delete die dig digest dist2d dist3d div +syntax keyword mushFunction contained division divscope doing downdiv dynhelp e +syntax keyword mushFunction contained edefault edit element elements elist elock +syntax keyword mushFunction contained emit empire empower encrypt endtag entrances +syntax keyword mushFunction contained eq escape etimefmt eval exit exp extract fdiv +syntax keyword mushFunction contained filter filterbool findable first firstof +syntax keyword mushFunction contained flags flip floor floordiv fmod fold +syntax keyword mushFunction contained folderstats followers following foreach +syntax keyword mushFunction contained fraction fullname functions get get_eval grab +syntax keyword mushFunction contained graball grep grepi gt gte hasattr hasattrp +syntax keyword mushFunction contained hasattrpval hasattrval hasdivpower hasflag +syntax keyword mushFunction contained haspower haspowergroup hastype height hidden +syntax keyword mushFunction contained home host hostname html idle idlesecs +syntax keyword mushFunction contained idle_average idle_times idle_total if ifelse +syntax keyword mushFunction contained ilev iname inc index indiv indivall insert +syntax keyword mushFunction contained inum ipaddr isdaylight isdbref isint isnum +syntax keyword mushFunction contained isword itemize items iter itext last lattr +syntax keyword mushFunction contained lcon lcstr ldelete ldivisions left lemit +syntax keyword mushFunction contained level lexits lflags link list lit ljust lmath +syntax keyword mushFunction contained ln lnum loc localize locate lock loctree log +syntax keyword mushFunction contained lparent lplayers lports lpos lsearch lsearchr +syntax keyword mushFunction contained lstats lt lte lthings lvcon lvexits lvplayers +syntax keyword mushFunction contained lvthings lwho mail maildstats mailfrom +syntax keyword mushFunction contained mailfstats mailstats mailstatus mailsubject +syntax keyword mushFunction contained mailtime map match matchall max mean median +syntax keyword mushFunction contained member merge mid min mix mod modulo modulus +syntax keyword mushFunction contained money mtime mudname mul munge mwho name nand +syntax keyword mushFunction contained nattr ncon nearby neq nexits next nor not +syntax keyword mushFunction contained nplayers nsemit nslemit nsoemit nspemit +syntax keyword mushFunction contained nsremit nszemit nthings null num nvcon +syntax keyword mushFunction contained nvexits nvplayers nvthings obj objeval objid +syntax keyword mushFunction contained objmem oemit ooref open or ord orflags +syntax keyword mushFunction contained orlflags orlpowers orpowers owner parent +syntax keyword mushFunction contained parse pcreate pemit pi pickrand playermem +syntax keyword mushFunction contained pmatch poll ports pos poss power powergroups +syntax keyword mushFunction contained powers powover program prompt pueblo quitprog +syntax keyword mushFunction contained quota r rand randword recv regedit regeditall +syntax keyword mushFunction contained regeditalli regediti regmatch regmatchi +syntax keyword mushFunction contained regrab regraball regraballi regrabi regrep +syntax keyword mushFunction contained regrepi remainder remit remove repeat replace +syntax keyword mushFunction contained rest restarts restarttime reswitch +syntax keyword mushFunction contained reswitchall reswitchalli reswitchi reverse +syntax keyword mushFunction contained revwords right rjust rloc rnum room root +syntax keyword mushFunction contained round s scan scramble search secs secure sent +syntax keyword mushFunction contained set setdiff setinter setq setr setunion sha0 +syntax keyword mushFunction contained shl shr shuffle sign signal sin sort sortby +syntax keyword mushFunction contained soundex soundlike soundslike space spellnum +syntax keyword mushFunction contained splice sql sqlescape sqrt squish ssl +syntax keyword mushFunction contained starttime stats stddev step strcat strinsert +syntax keyword mushFunction contained stripaccents stripansi strlen strmatch +syntax keyword mushFunction contained strreplace sub subj switch switchall t table +syntax keyword mushFunction contained tag tagwrap tan tel terminfo textfile +syntax keyword mushFunction contained tilde2blank time timefmt timestring tr +syntax keyword mushFunction contained trigger trim trimpenn trimtiny trunc type u +syntax keyword mushFunction contained ucstr udefault ufun uldefault ulocal updiv +syntax keyword mushFunction contained utctime v vadd val valid vcross vdim vdot +syntax keyword mushFunction contained version visible vmag vmax vmin vmul vsub +syntax keyword mushFunction contained vtattr vtcount vtcreate vtdestroy vtlcon +syntax keyword mushFunction contained vtloc vtlocate vtmaster vtname vtref vttel +syntax keyword mushFunction contained vunit wait where width wipe wordpos words +syntax keyword mushFunction contained wrap xcon xexits xget xor xplayers xthings +syntax keyword mushFunction contained xvcon xvexits xvplayers xvthings zemit zfun +syntax keyword mushFunction contained zmwho zone zwho + +" only highligh functions when they have an in-bracket immediately after +syntax match mushFunctionBrackets "\i*(" contains=mushFunction +" +" regular mush commands +syntax keyword mushAtCommandList contained @ALLHALT @ALLQUOTA @ASSERT @ATRCHOWN @ATRLOCK @ATTRIBUTE @BOOT +syntax keyword mushAtCommandList contained @BREAK @CEMIT @CHANNEL @CHAT @CHOWN @CHOWNALL @CHZONE @CHZONEALL +syntax keyword mushAtCommandList contained @CLOCK @CLONE @COBJ @COMMAND @CONFIG @CPATTR @CREATE @CRPLOG @DBCK +syntax keyword mushAtCommandList contained @DECOMPILE @DESTROY @DIG @DISABLE @DIVISION @DOING @DOLIST @DRAIN +syntax keyword mushAtCommandList contained @DUMP @EDIT @ELOCK @EMIT @EMPOWER @ENABLE @ENTRANCES @EUNLOCK @FIND +syntax keyword mushAtCommandList contained @FIRSTEXIT @FLAG @FORCE @FUNCTION @EDIT @GREP @HALT @HIDE @HOOK @KICK +syntax keyword mushAtCommandList contained @LEMIT @LEVEL @LINK @LIST @LISTMOTD @LOCK @LOG @LOGWIPE @LSET @MAIL @MALIAS +syntax keyword mushAtCommandList contained @MAP @MOTD @MVATTR @NAME @NEWPASSWORD @NOTIFY @NSCEMIT @NSEMIT @NSLEMIT +syntax keyword mushAtCommandList contained @NSOEMIT @NSPEMIT @NSPEMIT @NSREMIT @NSZEMIT @NUKE @OEMIT @OPEN @PARENT @PASSWORD +syntax keyword mushAtCommandList contained @PCREATE @PEMIT @POLL @POOR @POWERLEVEL @PROGRAM @PROMPT @PS @PURGE @QUOTA +syntax keyword mushAtCommandList contained @READCACHE @RECYCLE @REJECTMOTD @REMIT @RESTART @SCAN @SEARCH @SELECT @SET +syntax keyword mushAtCommandList contained @SHUTDOWN @SITELOCK @SNOOP @SQL @SQUOTA @STATS @SWITCH @SWEEP @SWITCH @TELEPORT +syntax keyword mushAtCommandList contained @TRIGGER @ULOCK @UNDESTROY @UNLINK @UNLOCK @UNRECYCLE @UPTIME @UUNLOCK @VERB +syntax keyword mushAtCommandList contained @VERSION @WAIT @WALL @WARNINGS @WCHECK @WHEREIS @WIPE @ZCLONE @ZEMIT +syntax match mushCommand "@\i\I*" contains=mushAtCommandList + + +syntax keyword mushCommand AHELP ANEWS ATTRIB_SET BRIEF BRIEF BUY CHANGES DESERT +syntax keyword mushCommand DISMISS DROP EMPTY ENTER EXAMINE FOLLOW GET GIVE GOTO +syntax keyword mushCommand HELP HUH_COMMAND INVENTORY INVENTORY LOOK LEAVE LOOK +syntax keyword mushCommand GOTO NEWS PAGE PAGE POSE RULES SAY SCORE SEMIPOSE +syntax keyword mushCommand SPECIALNEWS TAKE TEACH THINK UNFOLLOW USE WHISPER WHISPER +syntax keyword mushCommand WARN_ON_MISSING WHISPER WITH + +syntax match mushSpecial "\*\|!\|=\|-\|\\\|+" +syntax match mushSpecial2 contained "\*" + +syn region mushString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=mushSpecial,mushSpecial2,@Spell + + +syntax match mushIdentifier "&[^ ]\+" + +syntax match mushVariable "%r\|%t\|%cr\|%[A-Za-z0-9]\+\|%#\|##\|here" + +" numbers +syntax match mushNumber +[0-9]\++ + +" A comment line starts with a or # or " at the start of the line +" or an @@ +syntax keyword mushTodo contained TODO FIXME XXX +syntax cluster mushCommentGroup contains=mushTodo +syntax match mushComment "^\s*@@.*$" contains=mushTodo +syntax match mushComment "^#[^define|^ifdef|^else|^pragma|^ifndef|^echo|^elif|^undef|^warning].*$" contains=mushTodo +syntax match mushComment "^#$" contains=mushTodo +syntax region mushComment matchgroup=mushCommentStart start="/@@" end="@@/" contains=@mushCommentGroup,mushCommentStartError,mushCommentString,@Spell +syntax region mushCommentString contained start=+L\=\\\@" skip="\\$" end="$" end="//"me=s-1 contains=mushComment +syn match mushPreCondit display "^\s*\(%:\|#\)\s*\(else\|endif\)\>" + +syn cluster mushPreProcGroup contains=mushPreCondit,mushIncluded,mushInclude,mushDefine,mushSpecial,mushString,mushCommentSkip,mushCommentString,@mushCommentGroup,mushCommentStartError + +syn region mushIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match mushIncluded display contained "<[^>]*>" +syn match mushInclude display "^\s*\(%:\|#\)\s*include\>\s*["<]" contains=mushIncluded +syn region mushDefine start="^\s*\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" end="//"me=s-1 contains=ALLBUT,@mushPreProcGroup,@Spell +syn region mushPreProc start="^\s*\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@mushPreProcGroup + + +syntax region mushFuncBoundaries start="\[" end="\]" contains=mushFunction,mushFlag,mushAttributes,mushNumber,mushCommand,mushVariable,mushSpecial2 + +" FLAGS +syntax keyword mushFlag PLAYER ABODE BUILDER CHOWN_OK DARK FLOATING +syntax keyword mushFlag GOING HAVEN INHERIT JUMP_OK KEY LINK_OK MONITOR +syntax keyword mushFlag NOSPOOF OPAQUE QUIET STICKY TRACE UNFINDABLE VISUAL +syntax keyword mushFlag WIZARD PARENT_OK ZONE AUDIBLE CONNECTED DESTROY_OK +syntax keyword mushFlag ENTER_OK HALTED IMMORTAL LIGHT MYOPIC PUPPET TERSE +syntax keyword mushFlag ROBOT SAFE TRANSPARENT VERBOSE CONTROL_OK COMMANDS + +syntax keyword mushAttribute aahear aclone aconnect adesc adfail adisconnect +syntax keyword mushAttribute adrop aefail aenter afail agfail ahear akill +syntax keyword mushAttribute aleave alfail alias amhear amove apay arfail +syntax keyword mushAttribute asucc atfail atport aufail ause away charges +syntax keyword mushAttribute cost desc dfail drop ealias efail enter fail +syntax keyword mushAttribute filter forwardlist gfail idesc idle infilter +syntax keyword mushAttribute inprefix kill lalias last lastsite leave lfail +syntax keyword mushAttribute listen move odesc odfail odrop oefail oenter +syntax keyword mushAttribute ofail ogfail okill oleave olfail omove opay +syntax keyword mushAttribute orfail osucc otfail otport oufail ouse oxenter +syntax keyword mushAttribute oxleave oxtport pay prefix reject rfail runout +syntax keyword mushAttribute semaphore sex startup succ tfail tport ufail +syntax keyword mushAttribute use va vb vc vd ve vf vg vh vi vj vk vl vm vn +syntax keyword mushAttribute vo vp vq vr vs vt vu vv vw vx vy vz + + +if version >= 508 || !exists("did_mush_syntax_inits") + if version < 508 + let did_mush_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " The default methods for highlighting. Can be overridden later + HiLink mushAttribute Constant + HiLink mushCommand Function + HiLink mushNumber Number + HiLink mushSetting PreProc + HiLink mushFunction Statement + HiLink mushVariable Identifier + HiLink mushSpecial Special + HiLink mushTodo Todo + HiLink mushFlag Special + HiLink mushIdentifier Identifier + HiLink mushDefine Macro + HiLink mushPreProc PreProc + HiLink mushPreProcGroup PreProc + HiLink mushPreCondit PreCondit + HiLink mushIncluded cString + HiLink mushInclude Include + + + +" Comments + HiLink mushCommentStart mushComment + HiLink mushComment Comment + HiLink mushCommentString mushString + + + delcommand HiLink +endif + +let b:current_syntax = "mush" + +" mush: ts=17 diff --git a/vim/bundle/ubuntu-vim72/syntax/muttrc.vim b/vim/bundle/ubuntu-vim72/syntax/muttrc.vim new file mode 100644 index 0000000..068609c --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/muttrc.vim @@ -0,0 +1,707 @@ +" Vim syntax file +" Language: Mutt setup files +" Original: Preben 'Peppe' Guldberg +" Maintainer: Kyle Wheeler +" Last Change: 12 Jun 2008 + +" This file covers mutt version 1.5.18 (and most of the mercurial tip) +" Included are also a few features from 1.4.2.1 + +" 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 + +" Set the keyword characters +if version < 600 + set isk=@,48-57,_,- +else + setlocal isk=@,48-57,_,- +endif + +syn match muttrcComment "^# .*$" contains=@Spell +syn match muttrcComment "^#[^ ].*$" +syn match muttrcComment "^#$" +syn match muttrcComment "[^\\]#.*$"lc=1 + +" Escape sequences (back-tick and pipe goes here too) +syn match muttrcEscape +\\[#tnr"'Cc ]+ +syn match muttrcEscape +[`|]+ +syn match muttrcEscape +\\$+ + +" The variables takes the following arguments +syn match muttrcString "=\s*[^ #"'`]\+"lc=1 contains=muttrcEscape +syn region muttrcString start=+"+ms=e skip=+\\"+ end=+"+ contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction,muttrcShellString +syn region muttrcString start=+'+ms=e skip=+\\'+ end=+'+ contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction + +syn region muttrcShellString matchgroup=muttrcEscape keepend start=+`+ skip=+\\`+ end=+`+ contains=muttrcVarStr,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcCommand,muttrcSet + +syn match muttrcRXChars contained /[^\\][][.*?+]\+/hs=s+1 +syn match muttrcRXChars contained /[][|()][.*?+]*/ +syn match muttrcRXChars contained /['"]^/ms=s+1 +syn match muttrcRXChars contained /$['"]/me=e-1 +syn match muttrcRXChars contained /\\/ +" Why does muttrcRXString2 work with one \ when muttrcRXString requires two? +syn region muttrcRXString contained start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXChars +syn region muttrcRXString contained start=+"+ skip=+\\"+ end=+"+ contains=muttrcRXChars +syn region muttrcRXString2 contained start=+'+ skip=+\'+ end=+'+ contains=muttrcRXChars +syn region muttrcRXString2 contained start=+"+ skip=+\"+ end=+"+ contains=muttrcRXChars + +syn region muttrcRXPat contained start=+'+ skip=+\\'+ end=+'\s*+ keepend skipwhite contains=muttrcRXString nextgroup=muttrcRXPat +syn region muttrcRXPat contained start=+"+ skip=+\\"+ end=+"\s*+ keepend skipwhite contains=muttrcRXString nextgroup=muttrcRXPat +syn match muttrcRXPat contained /[^-'"#!]\S\+\%(\s\|$\)/ skipwhite contains=muttrcRXChars nextgroup=muttrcRXPat +syn match muttrcRXDef contained "-rx\s\+" skipwhite nextgroup=muttrcRXPat + +syn match muttrcSpecial +\(['"]\)!\1+ + +" Numbers and Quadoptions may be surrounded by " or ' +syn match muttrcNumber /=\s*\d\+/lc=1 +syn match muttrcNumber /=\s*"\d\+"/lc=1 +syn match muttrcNumber /=\s*'\d\+'/lc=1 +syn match muttrcQuadopt +=\s*\%(ask-\)\=\%(yes\|no\)+lc=1 +syn match muttrcQuadopt +=\s*"\%(ask-\)\=\%(yes\|no\)"+lc=1 +syn match muttrcQuadopt +=\s*'\%(ask-\)\=\%(yes\|no\)'+lc=1 + +" Now catch some email addresses and headers (purified version from mail.vim) +syn match muttrcEmail "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+" +syn match muttrcHeader "\<\%(From\|To\|C[Cc]\|B[Cc][Cc]\|Reply-To\|Subject\|Return-Path\|Received\|Date\|Replied\|Attach\)\>:\=" + +syn match muttrcKeySpecial contained +\%(\\[Cc'"]\|\^\|\\[01]\d\{2}\)+ +syn match muttrcKey contained "\S\+" contains=muttrcKeySpecial,muttrcKeyName +syn region muttrcKey contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=muttrcKeySpecial,muttrcKeyName +syn region muttrcKey contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=muttrcKeySpecial,muttrcKeyName +syn match muttrcKeyName contained "\" +syn match muttrcKeyName contained "\\[trne]" +syn match muttrcKeyName contained "\c<\%(BackSpace\|Delete\|Down\|End\|Enter\|Esc\|Home\|Insert\|Left\|PageDown\|PageUp\|Return\|Right\|Space\|Tab\|Up\)>" +syn match muttrcKeyName contained "" + +syn keyword muttrcVarBool contained allow_8bit allow_ansi arrow_cursor ascii_chars askbcc +syn keyword muttrcVarBool contained askcc attach_split auto_tag autoedit beep beep_new +syn keyword muttrcVarBool contained bounce_delivered braille_friendly check_new check_mbox_size collapse_unread +syn keyword muttrcVarBool contained confirmappend confirmcreate crypt_autoencrypt crypt_autopgp +syn keyword muttrcVarBool contained crypt_autosign crypt_autosmime crypt_replyencrypt +syn keyword muttrcVarBool contained crypt_replysign crypt_replysignencrypted crypt_timestamp +syn keyword muttrcVarBool contained crypt_use_gpgme crypt_use_pka delete_untag digest_collapse duplicate_threads +syn keyword muttrcVarBool contained edit_hdrs edit_headers encode_from envelope_from fast_reply +syn keyword muttrcVarBool contained fcc_attach fcc_clear followup_to force_name forw_decode +syn keyword muttrcVarBool contained forw_decrypt forw_quote forward_decode forward_decrypt +syn keyword muttrcVarBool contained forward_quote hdrs header help hidden_host hide_limited +syn keyword muttrcVarBool contained hide_missing hide_thread_subject hide_top_limited +syn keyword muttrcVarBool contained hide_top_missing ignore_linear_white_space ignore_list_reply_to imap_check_subscribed +syn keyword muttrcVarBool contained imap_list_subscribed imap_passive imap_peek imap_servernoise +syn keyword muttrcVarBool contained implicit_autoview include_onlyfirst keep_flagged +syn keyword muttrcVarBool contained mailcap_sanitize maildir_header_cache_verify maildir_trash +syn keyword muttrcVarBool contained mark_old markers menu_move_off menu_scroll message_cache_clean meta_key +syn keyword muttrcVarBool contained metoo mh_purge mime_forward_decode narrow_tree pager_stop +syn keyword muttrcVarBool contained pgp_auto_decode pgp_auto_traditional pgp_autoencrypt +syn keyword muttrcVarBool contained pgp_autoinline pgp_autosign pgp_check_exit +syn keyword muttrcVarBool contained pgp_create_traditional pgp_ignore_subkeys pgp_long_ids +syn keyword muttrcVarBool contained pgp_replyencrypt pgp_replyinline pgp_replysign +syn keyword muttrcVarBool contained pgp_replysignencrypted pgp_retainable_sigs pgp_show_unusable +syn keyword muttrcVarBool contained pgp_strict_enc pgp_use_gpg_agent pipe_decode pipe_split +syn keyword muttrcVarBool contained pop_auth_try_all pop_last print_decode print_split +syn keyword muttrcVarBool contained prompt_after read_only reply_self resolve reverse_alias +syn keyword muttrcVarBool contained reverse_name reverse_realname rfc2047_parameters save_address +syn keyword muttrcVarBool contained save_empty save_name score sig_dashes sig_on_top +syn keyword muttrcVarBool contained smart_wrap smime_ask_cert_label smime_decrypt_use_default_key +syn keyword muttrcVarBool contained smime_is_default sort_re ssl_force_tls ssl_use_sslv2 +syn keyword muttrcVarBool contained ssl_use_sslv3 ssl_use_tlsv1 ssl_usesystemcerts status_on_top +syn keyword muttrcVarBool contained strict_mime strict_threads suspend text_flowed thorough_search +syn keyword muttrcVarBool contained thread_received tilde uncollapse_jump use_8bitmime +syn keyword muttrcVarBool contained use_domain use_envelope_from use_from use_idn use_ipv6 +syn keyword muttrcVarBool contained user_agent wait_key weed wrap_search write_bcc + +syn keyword muttrcVarBool contained noallow_8bit noallow_ansi noarrow_cursor noascii_chars noaskbcc +syn keyword muttrcVarBool contained noaskcc noattach_split noauto_tag noautoedit nobeep nobeep_new +syn keyword muttrcVarBool contained nobounce_delivered nobraille_friendly nocheck_new nocollapse_unread +syn keyword muttrcVarBool contained noconfirmappend noconfirmcreate nocrypt_autoencrypt nocrypt_autopgp +syn keyword muttrcVarBool contained nocrypt_autosign nocrypt_autosmime nocrypt_replyencrypt +syn keyword muttrcVarBool contained nocrypt_replysign nocrypt_replysignencrypted nocrypt_timestamp +syn keyword muttrcVarBool contained nocrypt_use_gpgme nodelete_untag nodigest_collapse noduplicate_threads +syn keyword muttrcVarBool contained noedit_hdrs noedit_headers noencode_from noenvelope_from nofast_reply +syn keyword muttrcVarBool contained nofcc_attach nofcc_clear nofollowup_to noforce_name noforw_decode +syn keyword muttrcVarBool contained noforw_decrypt noforw_quote noforward_decode noforward_decrypt +syn keyword muttrcVarBool contained noforward_quote nohdrs noheader nohelp nohidden_host nohide_limited +syn keyword muttrcVarBool contained nohide_missing nohide_thread_subject nohide_top_limited +syn keyword muttrcVarBool contained nohide_top_missing noignore_list_reply_to noimap_check_subscribed +syn keyword muttrcVarBool contained noimap_list_subscribed noimap_passive noimap_peek noimap_servernoise +syn keyword muttrcVarBool contained noimplicit_autoview noinclude_onlyfirst nokeep_flagged +syn keyword muttrcVarBool contained nomailcap_sanitize nomaildir_header_cache_verify nomaildir_trash +syn keyword muttrcVarBool contained nomark_old nomarkers nomenu_move_off nomenu_scroll nometa_key +syn keyword muttrcVarBool contained nometoo nomh_purge nomime_forward_decode nonarrow_tree nopager_stop +syn keyword muttrcVarBool contained nopgp_auto_decode nopgp_auto_traditional nopgp_autoencrypt +syn keyword muttrcVarBool contained nopgp_autoinline nopgp_autosign nopgp_check_exit +syn keyword muttrcVarBool contained nopgp_create_traditional nopgp_ignore_subkeys nopgp_long_ids +syn keyword muttrcVarBool contained nopgp_replyencrypt nopgp_replyinline nopgp_replysign +syn keyword muttrcVarBool contained nopgp_replysignencrypted nopgp_retainable_sigs nopgp_show_unusable +syn keyword muttrcVarBool contained nopgp_strict_enc nopgp_use_gpg_agent nopipe_decode nopipe_split +syn keyword muttrcVarBool contained nopop_auth_try_all nopop_last noprint_decode noprint_split +syn keyword muttrcVarBool contained noprompt_after noread_only noreply_self noresolve noreverse_alias +syn keyword muttrcVarBool contained noreverse_name noreverse_realname norfc2047_parameters nosave_address +syn keyword muttrcVarBool contained nosave_empty nosave_name noscore nosig_dashes nosig_on_top +syn keyword muttrcVarBool contained nosmart_wrap nosmime_ask_cert_label nosmime_decrypt_use_default_key +syn keyword muttrcVarBool contained nosmime_is_default nosort_re nossl_force_tls nossl_use_sslv2 +syn keyword muttrcVarBool contained nossl_use_sslv3 nossl_use_tlsv1 nossl_usesystemcerts nostatus_on_top +syn keyword muttrcVarBool contained nostrict_threads nosuspend notext_flowed nothorough_search +syn keyword muttrcVarBool contained nothread_received notilde nouncollapse_jump nouse_8bitmime +syn keyword muttrcVarBool contained nouse_domain nouse_envelope_from nouse_from nouse_idn nouse_ipv6 +syn keyword muttrcVarBool contained nouser_agent nowait_key noweed nowrap_search nowrite_bcc + +syn keyword muttrcVarBool contained invallow_8bit invallow_ansi invarrow_cursor invascii_chars invaskbcc +syn keyword muttrcVarBool contained invaskcc invattach_split invauto_tag invautoedit invbeep invbeep_new +syn keyword muttrcVarBool contained invbounce_delivered invbraille_friendly invcheck_new invcollapse_unread +syn keyword muttrcVarBool contained invconfirmappend invconfirmcreate invcrypt_autoencrypt invcrypt_autopgp +syn keyword muttrcVarBool contained invcrypt_autosign invcrypt_autosmime invcrypt_replyencrypt +syn keyword muttrcVarBool contained invcrypt_replysign invcrypt_replysignencrypted invcrypt_timestamp +syn keyword muttrcVarBool contained invcrypt_use_gpgme invdelete_untag invdigest_collapse invduplicate_threads +syn keyword muttrcVarBool contained invedit_hdrs invedit_headers invencode_from invenvelope_from invfast_reply +syn keyword muttrcVarBool contained invfcc_attach invfcc_clear invfollowup_to invforce_name invforw_decode +syn keyword muttrcVarBool contained invforw_decrypt invforw_quote invforward_decode invforward_decrypt +syn keyword muttrcVarBool contained invforward_quote invhdrs invheader invhelp invhidden_host invhide_limited +syn keyword muttrcVarBool contained invhide_missing invhide_thread_subject invhide_top_limited +syn keyword muttrcVarBool contained invhide_top_missing invignore_list_reply_to invimap_check_subscribed +syn keyword muttrcVarBool contained invimap_list_subscribed invimap_passive invimap_peek invimap_servernoise +syn keyword muttrcVarBool contained invimplicit_autoview invinclude_onlyfirst invkeep_flagged +syn keyword muttrcVarBool contained invmailcap_sanitize invmaildir_header_cache_verify invmaildir_trash +syn keyword muttrcVarBool contained invmark_old invmarkers invmenu_move_off invmenu_scroll invmeta_key +syn keyword muttrcVarBool contained invmetoo invmh_purge invmime_forward_decode invnarrow_tree invpager_stop +syn keyword muttrcVarBool contained invpgp_auto_decode invpgp_auto_traditional invpgp_autoencrypt +syn keyword muttrcVarBool contained invpgp_autoinline invpgp_autosign invpgp_check_exit +syn keyword muttrcVarBool contained invpgp_create_traditional invpgp_ignore_subkeys invpgp_long_ids +syn keyword muttrcVarBool contained invpgp_replyencrypt invpgp_replyinline invpgp_replysign +syn keyword muttrcVarBool contained invpgp_replysignencrypted invpgp_retainable_sigs invpgp_show_unusable +syn keyword muttrcVarBool contained invpgp_strict_enc invpgp_use_gpg_agent invpipe_decode invpipe_split +syn keyword muttrcVarBool contained invpop_auth_try_all invpop_last invprint_decode invprint_split +syn keyword muttrcVarBool contained invprompt_after invread_only invreply_self invresolve invreverse_alias +syn keyword muttrcVarBool contained invreverse_name invreverse_realname invrfc2047_parameters invsave_address +syn keyword muttrcVarBool contained invsave_empty invsave_name invscore invsig_dashes invsig_on_top +syn keyword muttrcVarBool contained invsmart_wrap invsmime_ask_cert_label invsmime_decrypt_use_default_key +syn keyword muttrcVarBool contained invsmime_is_default invsort_re invssl_force_tls invssl_use_sslv2 +syn keyword muttrcVarBool contained invssl_use_sslv3 invssl_use_tlsv1 invssl_usesystemcerts invstatus_on_top +syn keyword muttrcVarBool contained invstrict_threads invsuspend invtext_flowed invthorough_search +syn keyword muttrcVarBool contained invthread_received invtilde invuncollapse_jump invuse_8bitmime +syn keyword muttrcVarBool contained invuse_domain invuse_envelope_from invuse_from invuse_idn invuse_ipv6 +syn keyword muttrcVarBool contained invuser_agent invwait_key invweed invwrap_search invwrite_bcc + +syn keyword muttrcVarQuad contained abort_nosubject abort_unmodified bounce copy +syn keyword muttrcVarQuad contained crypt_verify_sig delete forward_edit honor_followup_to +syn keyword muttrcVarQuad contained include mime_forward mime_forward_rest mime_fwd move +syn keyword muttrcVarQuad contained pgp_mime_auto pgp_verify_sig pop_delete pop_reconnect +syn keyword muttrcVarQuad contained postpone print quit recall reply_to ssl_starttls + +syn keyword muttrcVarQuad contained noabort_nosubject noabort_unmodified nobounce nocopy +syn keyword muttrcVarQuad contained nocrypt_verify_sig nodelete noforward_edit nohonor_followup_to +syn keyword muttrcVarQuad contained noinclude nomime_forward nomime_forward_rest nomime_fwd nomove +syn keyword muttrcVarQuad contained nopgp_mime_auto nopgp_verify_sig nopop_delete nopop_reconnect +syn keyword muttrcVarQuad contained nopostpone noprint noquit norecall noreply_to nossl_starttls + +syn keyword muttrcVarQuad contained invabort_nosubject invabort_unmodified invbounce invcopy +syn keyword muttrcVarQuad contained invcrypt_verify_sig invdelete invforward_edit invhonor_followup_to +syn keyword muttrcVarQuad contained invinclude invmime_forward invmime_forward_rest invmime_fwd invmove +syn keyword muttrcVarQuad contained invpgp_mime_auto invpgp_verify_sig invpop_delete invpop_reconnect +syn keyword muttrcVarQuad contained invpostpone invprint invquit invrecall invreply_to invssl_starttls + +syn keyword muttrcVarNum contained connect_timeout history imap_keepalive mail_check menu_context net_inc +syn keyword muttrcVarNum contained pager_context pager_index_lines pgp_timeout pop_checkinterval read_inc +syn keyword muttrcVarNum contained save_history score_threshold_delete score_threshold_flag +syn keyword muttrcVarNum contained score_threshold_read sendmail_wait sleep_time smime_timeout +syn keyword muttrcVarNum contained ssl_min_dh_prime_bits timeout time_inc wrap wrapmargin write_inc + +syn match muttrcStrftimeEscapes contained /%[AaBbCcDdeFGgHhIjklMmnpRrSsTtUuVvWwXxYyZz+%]/ +syn match muttrcStrftimeEscapes contained /%E[cCxXyY]/ +syn match muttrcStrftimeEscapes contained /%O[BdeHImMSuUVwWy]/ + +syn match muttrcFormatErrors contained /%./ + +syn region muttrcIndexFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes +syn region muttrcIndexFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes +syn region muttrcQueryFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcQueryFormatEscapes,muttrcQueryFormatConditionals,muttrcFormatErrors +syn region muttrcAliasFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAliasFormatEscapes,muttrcFormatErrors +syn region muttrcAliasFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAliasFormatEscapes,muttrcFormatErrors +syn region muttrcAttachFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors +syn region muttrcAttachFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors +syn region muttrcComposeFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcComposeFormatEscapes,muttrcFormatErrors +syn region muttrcComposeFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcComposeFormatEscapes,muttrcFormatErrors +syn region muttrcFolderFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors +syn region muttrcFolderFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors +syn region muttrcMixFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors +syn region muttrcMixFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors +syn region muttrcPGPFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPFormatEscapes,muttrcPGPFormatConditionals,muttrcFormatErrors,muttrcPGPTimeEscapes +syn region muttrcPGPFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPFormatEscapes,muttrcPGPFormatConditionals,muttrcFormatErrors,muttrcPGPTimeEscapes +syn region muttrcPGPCmdFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors +syn region muttrcPGPCmdFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors +syn region muttrcStatusFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors +syn region muttrcStatusFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors +syn region muttrcPGPGetKeysFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPGetKeysFormatEscapes,muttrcFormatErrors +syn region muttrcPGPGetKeysFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPGetKeysFormatEscapes,muttrcFormatErrors +syn region muttrcSmimeFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcSmimeFormatEscapes,muttrcSmimeFormatConditionals,muttrcVariable,muttrcFormatErrors +syn region muttrcSmimeFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcSmimeFormatEscapes,muttrcSmimeFormatConditionals,muttrcVariable,muttrcFormatErrors + +" The following info was pulled from hdr_format_str in hdrline.c +syn match muttrcIndexFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[aAbBcCdDeEfFHilLmMnNOPsStTuvXyYZ%]/ +syn match muttrcIndexFormatConditionals contained /%?[EFHlLMNOXyY]?/ nextgroup=muttrcFormatConditionals2 +" The following info was pulled from alias_format_str in addrbook.c +syn match muttrcAliasFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[afnrt%]/ +" The following info was pulled from query_format_str in query.c +syn match muttrcQueryFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[acent%]/ +syn match muttrcQueryFormatConditionals contained /%?[e]?/ nextgroup=muttrcFormatConditionals2 +" The following info was pulled from mutt_attach_fmt in recvattach.c +syn match muttrcAttachFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[CcDdefImMnQstTuX%]/ +syn match muttrcAttachFormatEscapes contained /%[>|*]./ +syn match muttrcAttachFormatConditionals contained /%?[CcdDefInmMQstTuX]?/ nextgroup=muttrcFormatConditionals2 +syn match muttrcFormatConditionals2 contained /[^?]*?/ +" The following info was pulled from compose_format_str in compose.c +syn match muttrcComposeFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[ahlv%]/ +syn match muttrcComposeFormatEscapes contained /%[>|*]./ +" The following info was pulled from folder_format_str in browser.c +syn match muttrcFolderFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[CdfFglNstu%]/ +syn match muttrcFolderFormatEscapes contained /%[>|*]./ +syn match muttrcFolderFormatConditionals contained /%?[N]?/ +" The following info was pulled from mix_entry_fmt in remailer.c +syn match muttrcMixFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[ncsa%]/ +syn match muttrcMixFormatConditionals contained /%?[ncsa]?/ +" The following info was pulled from crypt_entry_fmt in crypt-gpgme.c +" and pgp_entry_fmt in pgpkey.c (note that crypt_entry_fmt supports +" 'p', but pgp_entry_fmt does not). +syn match muttrcPGPFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[nkualfctp%]/ +syn match muttrcPGPFormatConditionals contained /%?[nkualfct]?/ +" The following info was pulled from _mutt_fmt_pgp_command in +" pgpinvoke.c +syn match muttrcPGPCmdFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[pfsar%]/ +syn match muttrcPGPCmdFormatConditionals contained /%?[pfsar]?/ nextgroup=muttrcFormatConditionals2 +" The following info was pulled from status_format_str in status.c +syn match muttrcStatusFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[bdfFhlLmMnopPrsStuvV%]/ +syn match muttrcStatusFormatEscapes contained /%[>|*]./ +syn match muttrcStatusFormatConditionals contained /%?[bdFlLmMnoptuV]?/ nextgroup=muttrcFormatConditionals2 +" This matches the documentation, but directly contradicts the code +" (according to the code, this should be identical to the +" muttrcPGPCmdFormatEscapes +syn match muttrcPGPGetKeysFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[r%]/ +" The following info was pulled from _mutt_fmt_smime_command in +" smime.c +syn match muttrcSmimeFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[Cciskaf%]/ +syn match muttrcSmimeFormatConditionals contained /%?[Cciskaf]?/ nextgroup=muttrcFormatConditionals2 + +syn region muttrcTimeEscapes contained start=+%{+ end=+}+ contains=muttrcStrftimeEscapes +syn region muttrcTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes +syn region muttrcTimeEscapes contained start=+%(+ end=+)+ contains=muttrcStrftimeEscapes +syn region muttrcTimeEscapes contained start=+%<+ end=+>+ contains=muttrcStrftimeEscapes +syn region muttrcPGPTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes + +syn keyword muttrcVarStr contained attribution index_format message_format pager_format nextgroup=muttrcVarEqualsIdxFmt +syn match muttrcVarEqualsIdxFmt contained " *= *" nextgroup=muttrcIndexFormatStr +syn keyword muttrcVarStr contained alias_format nextgroup=muttrcVarEqualsAliasFmt +syn match muttrcVarEqualsAliasFmt contained " *= *" nextgroup=muttrcAliasFormatStr +syn keyword muttrcVarStr contained attach_format nextgroup=muttrcVarEqualsAttachFmt +syn match muttrcVarEqualsAttachFmt contained " *= *" nextgroup=muttrcAttachFormatStr +syn keyword muttrcVarStr contained compose_format nextgroup=muttrcVarEqualsComposeFmt +syn match muttrcVarEqualsComposeFmt contained " *= *" nextgroup=muttrcComposeFormatStr +syn keyword muttrcVarStr contained folder_format nextgroup=muttrcVarEqualsFolderFmt +syn match muttrcVarEqualsFolderFmt contained " *= *" nextgroup=muttrcFolderFormatStr +syn keyword muttrcVarStr contained mix_entry_format nextgroup=muttrcVarEqualsMixFmt +syn match muttrcVarEqualsMixFmt contained " *= *" nextgroup=muttrcMixFormatStr +syn keyword muttrcVarStr contained pgp_entry_format nextgroup=muttrcVarEqualsPGPFmt +syn match muttrcVarEqualsPGPFmt contained " *= *" nextgroup=muttrcPGPFormatStr +syn keyword muttrcVarStr contained query_format nextgroup=muttrcVarEqualsQueryFmt +syn match muttrcVarEqualsQueryFmt contained " *= *" nextgroup=muttrcQueryFormatStr +syn keyword muttrcVarStr contained pgp_decode_command pgp_verify_command pgp_decrypt_command pgp_clearsign_command pgp_sign_command pgp_encrypt_sign_command pgp_encrypt_only_command pgp_import_command pgp_export_command pgp_verify_key_command pgp_list_secring_command pgp_list_pubring_command nextgroup=muttrcVarEqualsPGPCmdFmt +syn match muttrcVarEqualsPGPCmdFmt contained " *= *" nextgroup=muttrcPGPCmdFormatStr +syn keyword muttrcVarStr contained status_format nextgroup=muttrcVarEqualsStatusFmt +syn match muttrcVarEqualsStatusFmt contained " *= *" nextgroup=muttrcStatusFormatStr +syn keyword muttrcVarStr contained pgp_getkeys_command nextgroup=muttrcVarEqualsPGPGetKeysFmt +syn match muttrcVarEqualsPGPGetKeysFmt contained " *= *" nextgroup=muttrcPGPGetKeysFormatStr +syn keyword muttrcVarStr contained smime_decrypt_command smime_verify_command smime_verify_opaque_command smime_sign_command smime_sign_opaque_command smime_encrypt_command smime_pk7out_command smime_get_cert_command smime_get_signer_cert_command smime_import_cert_command smime_get_cert_email_command nextgroup=muttrcVarEqualsSmimeFmt +syn match muttrcVarEqualsSmimeFmt contained " *= *" nextgroup=muttrcSmimeFormatStr + +syn match muttrcVarStr contained 'my_[a-zA-Z0-9_]\+' +syn keyword muttrcVarStr contained alias_file assumed_charset attach_charset attach_sep +syn keyword muttrcVarStr contained certificate_file charset config_charset content_type +syn keyword muttrcVarStr contained date_format default_hook display_filter dotlock_program dsn_notify +syn keyword muttrcVarStr contained dsn_return editor entropy_file envelope_from_address escape folder +syn keyword muttrcVarStr contained forw_format forward_format from gecos_mask hdr_format +syn keyword muttrcVarStr contained header_cache header_cache_pagesize history_file hostname imap_authenticators +syn keyword muttrcVarStr contained imap_delim_chars imap_headers imap_idle imap_login imap_pass +syn keyword muttrcVarStr contained imap_user indent_str indent_string ispell locale mailcap_path +syn keyword muttrcVarStr contained mask mbox mbox_type message_cachedir mh_seq_flagged mh_seq_replied +syn keyword muttrcVarStr contained mh_seq_unseen mixmaster msg_format pager +syn keyword muttrcVarStr contained pgp_good_sign +syn keyword muttrcVarStr contained pgp_mime_signature_filename +syn keyword muttrcVarStr contained pgp_mime_signature_description pgp_sign_as +syn keyword muttrcVarStr contained pgp_sort_keys +syn keyword muttrcVarStr contained pipe_sep pop_authenticators pop_host pop_pass pop_user post_indent_str +syn keyword muttrcVarStr contained post_indent_string postponed preconnect print_cmd print_command +syn keyword muttrcVarStr contained query_command quote_regexp realname record reply_regexp send_charset +syn keyword muttrcVarStr contained sendmail shell signature simple_search smileys smime_ca_location +syn keyword muttrcVarStr contained smime_certificates smime_default_key +syn keyword muttrcVarStr contained smime_encrypt_with +syn keyword muttrcVarStr contained smime_keys smime_sign_as +syn keyword muttrcVarStr contained smtp_url smtp_authenticators smtp_pass sort sort_alias sort_aux +syn keyword muttrcVarStr contained sort_browser spam_separator spoolfile ssl_ca_certificates_file ssl_client_cert +syn keyword muttrcVarStr contained status_chars tmpdir to_chars tunnel visual + +" Present in 1.4.2.1 (pgp_create_traditional was a bool then) +syn keyword muttrcVarBool contained imap_force_ssl imap_force_ssl noinvimap_force_ssl +"syn keyword muttrcVarQuad contained pgp_create_traditional nopgp_create_traditional invpgp_create_traditional +syn keyword muttrcVarStr contained alternates + +syn keyword muttrcMenu contained alias attach browser compose editor index pager postpone pgp mix query generic +syn match muttrcMenuList "\S\+" contained contains=muttrcMenu +syn match muttrcMenuCommas /,/ contained + +syn keyword muttrcCommand auto_view alternative_order charset-hook exec unalternative_order +syn keyword muttrcCommand hdr_order iconv-hook ignore mailboxes my_hdr unmailboxes +syn keyword muttrcCommand pgp-hook push score source unauto_view unhdr_order +syn keyword muttrcCommand unignore unmono unmy_hdr unscore +syn keyword muttrcCommand mime_lookup unmime_lookup spam ungroup +syn keyword muttrcCommand nospam unalternative_order + +syn keyword muttrcHooks contained account-hook charset-hook iconv-hook message-hook folder-hook mbox-hook save-hook fcc-hook fcc-save-hook send-hook send2-hook reply-hook crypt-hook +syn keyword muttrcUnhook contained unhook +syn region muttrcUnhookLine keepend start=+^\s*unhook\s+ skip=+\\$+ end=+$+ contains=muttrcUnhook,muttrcHooks,muttrcUnHighlightSpace,muttrcComment + +syn match muttrcAttachmentsMimeType contained "[*a-z0-9_-]\+/[*a-z0-9._-]\+\s*" skipwhite nextgroup=muttrcAttachmentsMimeType +syn match muttrcAttachmentsFlag contained "[+-]\%([AI]\|inline\|attachment\)\s\+" skipwhite nextgroup=muttrcAttachmentsMimeType +syn match muttrcAttachmentsLine "^\s*\%(un\)\?attachments\s\+" skipwhite nextgroup=muttrcAttachmentsFlag + +syn match muttrcUnHighlightSpace contained "\%(\s\+\|\\$\)" + +syn keyword muttrcListsKeyword contained lists unlists +syn region muttrcListsLine keepend start=+^\s*\%(un\)\?lists\s+ skip=+\\$+ end=+$+ contains=muttrcListsKeyword,muttrcRXPat,muttrcGroupDef,muttrcUnHighlightSpace,muttrcComment + +syn keyword muttrcSubscribeKeyword contained subscribe unsubscribe +syn region muttrcSubscribeLine keepend start=+^\s*\%(un\)\?subscribe\s+ skip=+\\$+ end=+$+ contains=muttrcSubscribeKeyword,muttrcRXPat,muttrcGroupDef,muttrcUnHighlightSpace,muttrcComment + +syn keyword muttrcAlternateKeyword contained alternates unalternates +syn region muttrcAlternatesLine keepend start=+^\s*\%(un\)\?alternates\s+ skip=+\\$+ end=+$+ contains=muttrcAlternateKeyword,muttrcGroupDef,muttrcRXPat,muttrcUnHighlightSpace,muttrcComment + +syn match muttrcVariable "\$[a-zA-Z_-]\+" + +syn match muttrcBadAction contained "[^<>]\+" contains=muttrcEmail +syn match muttrcFunction contained "\<\%(attach\|bounce\|copy\|delete\|display\|flag\|forward\|parent\|pipe\|postpone\|print\|recall\|resend\|save\|send\|tag\|undelete\)-message\>" +syn match muttrcFunction contained "\<\%(delete\|next\|previous\|read\|tag\|undelete\)-thread\>" +syn match muttrcFunction contained "\<\%(backward\|capitalize\|downcase\|forward\|kill\|upcase\)-word\>" +syn match muttrcFunction contained "\<\%(delete\|filter\|first\|last\|next\|pipe\|previous\|print\|save\|select\|tag\|undelete\)-entry\>" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\<\%(backspace\|backward-char\|bol\|bottom\|bottom-page\|buffy-cycle\|clear-flag\|complete\%(-query\)\?\|copy-file\|create-alias\|detach-file\|eol\|exit\|extract-keys\|\%(imap-\)\?fetch-mail\|forget-passphrase\|forward-char\|group-reply\|help\|ispell\|jump\|limit\|list-reply\|mail\|mail-key\|mark-as-new\|middle-page\|new-mime\|noop\|pgp-menu\|query\|query-append\|quit\|quote-char\|read-subthread\|redraw-screen\|refresh\|rename-file\|reply\|select-new\|set-flag\|shell-escape\|skip-quoted\|sort\|subscribe\|sync-mailbox\|top\|top-page\|transpose-chars\|unsubscribe\|untag-pattern\|verify-key\|what-key\|write-fcc\)\>" +syn match muttrcAction contained "<[^>]\{-}>" contains=muttrcBadAction,muttrcFunction,muttrcKeyName + +syn keyword muttrcSet set skipwhite nextgroup=muttrcVar.* +syn keyword muttrcUnset unset skipwhite nextgroup=muttrcVar.* +syn keyword muttrcReset reset skipwhite nextgroup=muttrcVar.* +syn keyword muttrcToggle toggle skipwhite nextgroup=muttrcVar.* + +" First, functions that take regular expressions: +syn match muttrcRXHookNot contained /!\s*/ skipwhite nextgroup=muttrcRXString +syn match muttrcRXHooks /^\s*\%(account\|folder\)-hook\s\+/ skipwhite nextgroup=muttrcRXHookNot,muttrcRXString + +" Now, functions that take patterns +syn match muttrcPatHookNot contained /!\s*/ skipwhite nextgroup=muttrcPattern +syn match muttrcPatHooks /^\s*\%(message\|mbox\|save\|fcc\%(-save\)\?\|send2\?\|reply\|crypt\)-hook\s\+/ nextgroup=muttrcPatHookNot,muttrcPattern + +syn match muttrcBindFunction contained /\S\+\%(\s\|$\)/ skipwhite contains=muttrcFunction +syn match muttrcBindFunctionNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindFunction,muttrcBindFunctionNL +syn match muttrcBindKey contained /\S\+/ skipwhite contains=muttrcKey nextgroup=muttrcBindFunction,muttrcBindFunctionNL +syn match muttrcBindKeyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindKey,muttrcBindKeyNL +syn match muttrcBindMenuList contained /\S\+/ skipwhite contains=muttrcMenu,muttrcMenuCommas nextgroup=muttrcBindKey,muttrcBindKeyNL +syn match muttrcBindMenuListNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindMenuList,muttrcBindMenuListNL +syn match muttrcBind /^\s*bind\s\?/ skipwhite nextgroup=muttrcBindMenuList,muttrcBindMenuListNL + +syn region muttrcMacroDescr contained keepend skipwhite start=+\s*\S+ms=e skip=+\\ + end=+ \|$+me=s +syn region muttrcMacroDescr contained keepend skipwhite start=+'+ms=e skip=+\\'+ end=+'+me=s +syn region muttrcMacroDescr contained keepend skipwhite start=+"+ms=e skip=+\\"+ end=+"+me=s +syn match muttrcMacroDescrNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroDescr,muttrcMacroDescrNL +syn region muttrcMacroBody contained skipwhite start="\S" skip='\\ \|\\$' end=' \|$' contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction nextgroup=muttrcMacroDescr,muttrcMacroDescrNL +syn region muttrcMacroBody matchgroup=Type contained skipwhite start=+'+ms=e skip=+\\'\|\\$+ end=+'\|$+me=s contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction nextgroup=muttrcMacroDescr,muttrcMacroDescrNL +syn region muttrcMacroBody matchgroup=Type contained skipwhite start=+"+ms=e skip=+\\"\|\\$+ end=+"\|$+me=s contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction nextgroup=muttrcMacroDescr,muttrcMacroDescrNL +syn match muttrcMacroBodyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroBody,muttrcMacroBodyNL +syn match muttrcMacroKey contained /\S\+/ skipwhite contains=muttrcKey nextgroup=muttrcMacroBody,muttrcMacroBodyNL +syn match muttrcMacroKeyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroKey,muttrcMacroKeyNL +syn match muttrcMacroMenuList contained /\S\+/ skipwhite contains=muttrcMenu,muttrcMenuCommas nextgroup=muttrcMacroKey,muttrcMacroKeyNL +syn match muttrcMacroMenuListNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroMenuList,muttrcMacroMenuListNL +syn match muttrcMacro /^\s*macro\s\?/ skipwhite nextgroup=muttrcMacroMenuList,muttrcMacroMenuListNL + +syn match muttrcAddrContent contained "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+\s*" skipwhite contains=muttrcEmail nextgroup=muttrcAddrContent +syn region muttrcAddrContent contained start=+'+ end=+'\s*+ skip=+\\'+ skipwhite contains=muttrcEmail nextgroup=muttrcAddrContent +syn region muttrcAddrContent contained start=+"+ end=+"\s*+ skip=+\\"+ skipwhite contains=muttrcEmail nextgroup=muttrcAddrContent +syn match muttrcAddrDef contained "-addr\s\+" skipwhite nextgroup=muttrcAddrContent + +syn match muttrcGroupFlag contained "-group" +syn region muttrcGroupDef contained start="-group\s\+" skip="\\$" end="\s" skipwhite keepend contains=muttrcGroupFlag,muttrcUnHighlightSpace + +syn keyword muttrcGroupKeyword contained group ungroup +syn region muttrcGroupLine keepend start=+^\s*\%(un\)\?group\s+ skip=+\\$+ end=+$+ contains=muttrcGroupKeyword,muttrcGroupDef,muttrcAddrDef,muttrcRXDef,muttrcUnHighlightSpace,muttrcComment + +syn match muttrcAliasGroupName contained /\w\+/ skipwhite nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL +syn match muttrcAliasGroupDefNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasGroupName,muttrcAliasGroupDefNL +syn match muttrcAliasGroupDef contained /\s*-group/ skipwhite nextgroup=muttrcAliasGroupName,muttrcAliasGroupDefNL contains=muttrcGroupFlag +syn match muttrcAliasComma contained /,/ skipwhite nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL +syn match muttrcAliasEmail contained /\S\+@\S\+/ contains=muttrcEmail nextgroup=muttrcAliasName,muttrcAliasNameNL skipwhite +syn match muttrcAliasEncEmail contained /<[^>]\+>/ contains=muttrcEmail nextgroup=muttrcAliasComma +syn match muttrcAliasEncEmailNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL +syn match muttrcAliasNameNoParens contained /[^<(@]\+\s\+/ nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL +syn region muttrcAliasName contained matchgroup=Type start=/(/ end=/)/ skipwhite +syn match muttrcAliasNameNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasName,muttrcAliasNameNL +syn match muttrcAliasENNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL +syn match muttrcAliasKey contained /\s*[^- \t]\S\+/ skipwhite nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL +syn match muttrcAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL +syn match muttrcAlias /^\s*alias\s/ skipwhite nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL + +syn match muttrcUnAliasKey contained "\s*\w\+\s*" skipwhite nextgroup=muttrcUnAliasKey,muttrcUnAliasNL +syn match muttrcUnAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcUnAliasKey,muttrcUnAliasNL +syn match muttrcUnAlias /^\s*unalias\s\?/ nextgroup=muttrcUnAliasKey,muttrcUnAliasNL + +syn match muttrcSimplePat contained "!\?\^\?[~][ADEFgGklNOpPQRSTuUvV=$]" +syn match muttrcSimplePat contained "!\?\^\?[~][mnXz]\s\+\%([<>-][0-9]\+\|[0-9]\+[-][0-9]*\)" +syn match muttrcSimplePat contained "!\?\^\?[~][dr]\s\+\%(\%(-\?[0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)*\)\|\%(\%([0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)*\)-\%([0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)\?\)\?\)\|\%([<>=][0-9]\+[ymwd]\)\|\%(`[^`]\+`\)\|\%(\$[a-zA-Z0-9_-]\+\)\)" contains=muttrcShellString,muttrcVariable +syn match muttrcSimplePat contained "!\?\^\?[~][bBcCefhHiLstxy]\s\+" nextgroup=muttrcSimplePatRXContainer +syn match muttrcSimplePat contained "!\?\^\?[%][bBcCefhHiLstxy]\s\+" nextgroup=muttrcSimplePatString +syn match muttrcSimplePat contained "!\?\^\?[=][bh]\s\+" nextgroup=muttrcSimplePatString +syn region muttrcSimplePat contained keepend start=+!\?\^\?[~](+ end=+)+ contains=muttrcSimplePat +"syn match muttrcSimplePat contained /'[^~=%][^']*/ +"contains=muttrcRXPat +syn match muttrcSimplePatString contained /[a-zA-Z0-9]\+/ +syn region muttrcSimplePatString contained keepend start=+"+ end=+"+ skip=+\\"+ +syn region muttrcSimplePatString contained keepend start=+'+ end=+'+ skip=+\\'+ +syn region muttrcSimplePatRXContainer contained keepend start=+"+ end=+"+ skip=+\\"+ contains=muttrcRXPat +syn region muttrcSimplePatRXContainer contained keepend start=+'+ end=+'+ skip=+\\'+ contains=muttrcRXPat +syn match muttrcSimplePatRXContainer contained /\S\+/ contains=muttrcRXPat +syn match muttrcSimplePatMetas contained /[(|)]/ + +syn region muttrcPattern contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPatternInner +syn region muttrcPattern contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPatternInner +syn match muttrcPattern contained "[~]\([A-Za-z]\|([^)]\+)\)" contains=muttrcSimplePat +syn region muttrcPatternInner contained keepend start=+"[~=%!(^]+ms=s+1 skip=+\\"+ end=+"+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas +syn region muttrcPatternInner contained keepend start=+'[~=%!(^]+ms=s+1 skip=+\\'+ end=+'+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas + +" Colour definitions takes object, foreground and background arguments (regexps excluded). +syn match muttrcColorMatchCount contained "[0-9]\+" +syn match muttrcColorMatchCountNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL +syn region muttrcColorRXPat contained start=+\s*'+ skip=+\\'+ end=+'\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL +syn region muttrcColorRXPat contained start=+\s*"+ skip=+\\"+ end=+"\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL +syn keyword muttrcColorField contained attachment body bold error hdrdefault header index indicator markers message normal quoted search signature status tilde tree underline +syn match muttrcColorField contained "\" +syn keyword muttrcColor contained black blue cyan default green magenta red white yellow +syn keyword muttrcColor contained brightblack brightblue brightcyan brightdefault brightgreen brightmagenta brightred brightwhite brightyellow +syn match muttrcColor contained "\<\%(bright\)\=color\d\{1,2}\>" +" Now for the structure of the color line +syn match muttrcColorRXNL contained skipnl "\s*\\$" nextgroup=muttrcColorRXPat,muttrcColorRXNL +syn match muttrcColorBG contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorRXPat,muttrcColorRXNL +syn match muttrcColorBGNL contained skipnl "\s*\\$" nextgroup=muttrcColorBG,muttrcColorBGNL +syn match muttrcColorFG contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBG,muttrcColorBGNL +syn match muttrcColorFGNL contained skipnl "\s*\\$" nextgroup=muttrcColorFG,muttrcColorFGNL +syn match muttrcColorContext contained /\s*[$]\?\w\+/ contains=muttrcColorField,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorFG,muttrcColorFGNL +syn match muttrcColorNL contained skipnl "\s*\\$" nextgroup=muttrcColorContext,muttrcColorNL +syn match muttrcColorKeyword contained /^\s*color\s\+/ nextgroup=muttrcColorContext,muttrcColorNL +syn region muttrcColorLine keepend start=/^\s*color\s\+\%(index\)\@!/ skip=+\\$+ end=+$+ contains=muttrcColorKeyword,muttrcComment,muttrcUnHighlightSpace +" Now for the structure of the color index line +syn match muttrcPatternNL contained skipnl "\s*\\$" nextgroup=muttrcPattern,muttrcPatternNL +syn match muttrcColorBGI contained /\s*[$]\?\w\+\s*/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcPattern,muttrcPatternNL +syn match muttrcColorBGNLI contained skipnl "\s*\\$" nextgroup=muttrcColorBGI,muttrcColorBGNLI +syn match muttrcColorFGI contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBGI,muttrcColorBGNLI +syn match muttrcColorFGNLI contained skipnl "\s*\\$" nextgroup=muttrcColorFGI,muttrcColorFGNLI +syn match muttrcColorContextI contained /\s*index/ contains=muttrcUnHighlightSpace nextgroup=muttrcColorFGI,muttrcColorFGNLI +syn match muttrcColorNLI contained skipnl "\s*\\$" nextgroup=muttrcColorContextI,muttrcColorNLI +syn match muttrcColorKeywordI contained /^\s*color\s\+/ nextgroup=muttrcColorContextI,muttrcColorNLI +syn region muttrcColorLine keepend start=/^\s*color\s\+index/ skip=+\\$+ end=+$+ contains=muttrcColorKeywordI,muttrcComment,muttrcUnHighlightSpace +" And now color's brother: +syn region muttrcUnColorPatterns contained skipwhite start=+\s*'+ end=+'+ skip=+\\'+ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL +syn region muttrcUnColorPatterns contained skipwhite start=+\s*"+ end=+"+ skip=+\\"+ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL +syn match muttrcUnColorPatterns contained skipwhite /\s*[^'"\s]\S\*/ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL +syn match muttrcUnColorPatNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL +syn match muttrcUnColorAll contained skipwhite /[*]/ +syn match muttrcUnColorAPNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorPatterns,muttrcUnColorAll,muttrcUnColorAPNL +syn match muttrcUnColorIndex contained skipwhite /\s*index\s\+/ nextgroup=muttrcUnColorPatterns,muttrcUnColorAll,muttrcUnColorAPNL +syn match muttrcUnColorIndexNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorIndex,muttrcUnColorIndexNL +syn match muttrcUnColorKeyword contained skipwhite /^\s*uncolor\s\+/ nextgroup=muttrcUnColorIndex,muttrcUnColorIndexNL +syn region muttrcUnColorLine keepend start=+^\s*uncolor\s+ skip=+\\$+ end=+$+ contains=muttrcUnColorKeyword,muttrcComment,muttrcUnHighlightSpace + +" Mono are almost like color (ojects inherited from color) +syn keyword muttrcMonoAttrib contained bold none normal reverse standout underline +syn keyword muttrcMono contained mono skipwhite nextgroup=muttrcColorField +syn match muttrcMonoLine "^\s*mono\s\+\S\+" skipwhite nextgroup=muttrcMonoAttrib contains=muttrcMono + +" 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_muttrc_syntax_inits") + if version < 508 + let did_muttrc_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink muttrcComment Comment + HiLink muttrcEscape SpecialChar + HiLink muttrcRXChars SpecialChar + HiLink muttrcString String + HiLink muttrcRXString String + HiLink muttrcRXString2 String + HiLink muttrcSpecial Special + HiLink muttrcHooks Type + HiLink muttrcGroupFlag Type + HiLink muttrcGroupDef Macro + HiLink muttrcAddrDef muttrcGroupFlag + HiLink muttrcRXDef muttrcGroupFlag + HiLink muttrcRXPat String + HiLink muttrcAliasGroupName Macro + HiLink muttrcAliasKey Identifier + HiLink muttrcUnAliasKey Identifier + HiLink muttrcAliasEncEmail Identifier + HiLink muttrcAliasParens Type + HiLink muttrcNumber Number + HiLink muttrcQuadopt Boolean + HiLink muttrcEmail Special + HiLink muttrcVariable Special + HiLink muttrcHeader Type + HiLink muttrcKeySpecial SpecialChar + HiLink muttrcKey Type + HiLink muttrcKeyName SpecialChar + HiLink muttrcVarBool Identifier + HiLink muttrcVarQuad Identifier + HiLink muttrcVarNum Identifier + HiLink muttrcVarStr Identifier + HiLink muttrcMenu Identifier + HiLink muttrcCommand Keyword + HiLink muttrcSet Keyword + HiLink muttrcUnset muttrcCommand + HiLink muttrcReset muttrcCommand + HiLink muttrcToggle muttrcCommand + HiLink muttrcBind muttrcCommand + HiLink muttrcMacro muttrcCommand + HiLink muttrcMacroDescr String + HiLink muttrcAlias muttrcCommand + HiLink muttrcUnAlias muttrcCommand + HiLink muttrcUnhook muttrcCommand + HiLink muttrcUnhookLine Error + HiLink muttrcAction Macro + HiLink muttrcBadAction Error + HiLink muttrcBindFunction Error + HiLink muttrcBindMenuList Error + HiLink muttrcFunction Macro + HiLink muttrcGroupKeyword muttrcCommand + HiLink muttrcGroupLine Error + HiLink muttrcSubscribeKeyword muttrcCommand + HiLink muttrcSubscribeLine Error + HiLink muttrcListsKeyword muttrcCommand + HiLink muttrcListsLine Error + HiLink muttrcAlternateKeyword muttrcCommand + HiLink muttrcAlternatesLine Error + HiLink muttrcAttachmentsLine muttrcCommand + HiLink muttrcAttachmentsFlag Type + HiLink muttrcAttachmentsMimeType String + HiLink muttrcColorLine Error + HiLink muttrcColorContext Error + HiLink muttrcColorContextI Identifier + HiLink muttrcColorKeyword muttrcCommand + HiLink muttrcColorKeywordI muttrcColorKeyword + HiLink muttrcColorField Identifier + HiLink muttrcColor Type + HiLink muttrcColorFG Error + HiLink muttrcColorFGI Error + HiLink muttrcColorBG Error + HiLink muttrcColorBGI Error + HiLink muttrcMonoAttrib muttrcColor + HiLink muttrcMono muttrcCommand + HiLink muttrcSimplePat Identifier + HiLink muttrcSimplePatString Macro + HiLink muttrcSimplePatMetas Special + HiLink muttrcPattern Type + HiLink muttrcPatternInner Error + HiLink muttrcUnColorLine Error + HiLink muttrcUnColorKeyword muttrcCommand + HiLink muttrcUnColorIndex Identifier + HiLink muttrcShellString muttrcEscape + HiLink muttrcRXHooks muttrcCommand + HiLink muttrcRXHookNot Type + HiLink muttrcPatHooks muttrcCommand + HiLink muttrcPatHookNot Type + HiLink muttrcFormatConditionals2 Type + HiLink muttrcIndexFormatStr muttrcString + HiLink muttrcIndexFormatEscapes muttrcEscape + HiLink muttrcIndexFormatConditionals muttrcFormatConditionals2 + HiLink muttrcAliasFormatStr muttrcString + HiLink muttrcAliasFormatEscapes muttrcEscape + HiLink muttrcAttachFormatStr muttrcString + HiLink muttrcAttachFormatEscapes muttrcEscape + HiLink muttrcAttachFormatConditionals muttrcFormatConditionals2 + HiLink muttrcComposeFormatStr muttrcString + HiLink muttrcComposeFormatEscapes muttrcEscape + HiLink muttrcFolderFormatStr muttrcString + HiLink muttrcFolderFormatEscapes muttrcEscape + HiLink muttrcFolderFormatConditionals muttrcFormatConditionals2 + HiLink muttrcMixFormatStr muttrcString + HiLink muttrcMixFormatEscapes muttrcEscape + HiLink muttrcMixFormatConditionals muttrcFormatConditionals2 + HiLink muttrcPGPFormatStr muttrcString + HiLink muttrcPGPFormatEscapes muttrcEscape + HiLink muttrcPGPFormatConditionals muttrcFormatConditionals2 + HiLink muttrcPGPCmdFormatStr muttrcString + HiLink muttrcPGPCmdFormatEscapes muttrcEscape + HiLink muttrcPGPCmdFormatConditionals muttrcFormatConditionals2 + HiLink muttrcStatusFormatStr muttrcString + HiLink muttrcStatusFormatEscapes muttrcEscape + HiLink muttrcStatusFormatConditionals muttrcFormatConditionals2 + HiLink muttrcPGPGetKeysFormatStr muttrcString + HiLink muttrcPGPGetKeysFormatEscapes muttrcEscape + HiLink muttrcSmimeFormatStr muttrcString + HiLink muttrcSmimeFormatEscapes muttrcEscape + HiLink muttrcSmimeFormatConditionals muttrcFormatConditionals2 + HiLink muttrcTimeEscapes muttrcEscape + HiLink muttrcPGPTimeEscapes muttrcEscape + HiLink muttrcStrftimeEscapes Type + HiLink muttrcFormatErrors Error + + HiLink muttrcBindFunctionNL SpecialChar + HiLink muttrcBindKeyNL SpecialChar + HiLink muttrcBindMenuListNL SpecialChar + HiLink muttrcMacroDescrNL SpecialChar + HiLink muttrcMacroBodyNL SpecialChar + HiLink muttrcMacroKeyNL SpecialChar + HiLink muttrcMacroMenuListNL SpecialChar + HiLink muttrcColorMatchCountNL SpecialChar + HiLink muttrcColorNL SpecialChar + HiLink muttrcColorRXNL SpecialChar + HiLink muttrcColorBGNL SpecialChar + HiLink muttrcColorFGNL SpecialChar + HiLink muttrcAliasNameNL SpecialChar + HiLink muttrcAliasENNL SpecialChar + HiLink muttrcAliasNL SpecialChar + HiLink muttrcUnAliasNL SpecialChar + HiLink muttrcAliasGroupDefNL SpecialChar + HiLink muttrcAliasEncEmailNL SpecialChar + HiLink muttrcPatternNL SpecialChar + HiLink muttrcUnColorPatNL SpecialChar + HiLink muttrcUnColorAPNL SpecialChar + HiLink muttrcUnColorIndexNL SpecialChar + + delcommand HiLink +endif + +let b:current_syntax = "muttrc" + +"EOF vim: ts=8 noet tw=100 sw=8 sts=0 ft=vim diff --git a/vim/bundle/ubuntu-vim72/syntax/mysql.vim b/vim/bundle/ubuntu-vim72/syntax/mysql.vim new file mode 100644 index 0000000..86a6c07 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/mysql.vim @@ -0,0 +1,297 @@ +" Vim syntax file +" Language: mysql +" Maintainer: Kenneth J. Pronovici +" Last Change: $LastChangedDate: 2009-06-29 23:08:37 -0500 (Mon, 29 Jun 2009) $ +" Filenames: *.mysql +" URL: ftp://cedar-solutions.com/software/mysql.vim +" Note: The definitions below are taken from the mysql user manual as of April 2002, for version 3.23 + +" 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 + +" Always ignore case +syn case ignore + +" General keywords which don't fall into other categories +syn keyword mysqlKeyword action add after aggregate all alter as asc auto_increment avg avg_row_length +syn keyword mysqlKeyword both by +syn keyword mysqlKeyword cascade change character check checksum column columns comment constraint create cross +syn keyword mysqlKeyword current_date current_time current_timestamp +syn keyword mysqlKeyword data database databases day day_hour day_minute day_second +syn keyword mysqlKeyword default delayed delay_key_write delete desc describe distinct distinctrow drop +syn keyword mysqlKeyword enclosed escape escaped explain +syn keyword mysqlKeyword fields file first flush for foreign from full function +syn keyword mysqlKeyword global grant grants group +syn keyword mysqlKeyword having heap high_priority hosts hour hour_minute hour_second +syn keyword mysqlKeyword identified ignore index infile inner insert insert_id into isam +syn keyword mysqlKeyword join +syn keyword mysqlKeyword key keys kill last_insert_id leading left limit lines load local lock logs long +syn keyword mysqlKeyword low_priority +syn keyword mysqlKeyword match max_rows middleint min_rows minute minute_second modify month myisam +syn keyword mysqlKeyword natural no +syn keyword mysqlKeyword on optimize option optionally order outer outfile +syn keyword mysqlKeyword pack_keys partial password primary privileges procedure process processlist +syn keyword mysqlKeyword read references reload rename replace restrict returns revoke right row rows +syn keyword mysqlKeyword second select show shutdown soname sql_big_result sql_big_selects sql_big_tables sql_log_off +syn keyword mysqlKeyword sql_log_update sql_low_priority_updates sql_select_limit sql_small_result sql_warnings starting +syn keyword mysqlKeyword status straight_join string +syn keyword mysqlKeyword table tables temporary terminated to trailing type +syn keyword mysqlKeyword unique unlock unsigned update usage use using +syn keyword mysqlKeyword values varbinary variables varying +syn keyword mysqlKeyword where with write +syn keyword mysqlKeyword year_month +syn keyword mysqlKeyword zerofill + +" Special values +syn keyword mysqlSpecial false null true + +" Strings (single- and double-quote) +syn region mysqlString start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn region mysqlString start=+'+ skip=+\\\\\|\\'+ end=+'+ + +" Numbers and hexidecimal values +syn match mysqlNumber "-\=\<[0-9]*\>" +syn match mysqlNumber "-\=\<[0-9]*\.[0-9]*\>" +syn match mysqlNumber "-\=\<[0-9][0-9]*e[+-]\=[0-9]*\>" +syn match mysqlNumber "-\=\<[0-9]*\.[0-9]*e[+-]\=[0-9]*\>" +syn match mysqlNumber "\<0x[abcdefABCDEF0-9]*\>" + +" User variables +syn match mysqlVariable "@\a*[A-Za-z0-9]*[._]*[A-Za-z0-9]*" + +" Comments (c-style, mysql-style and modified sql-style) +syn region mysqlComment start="/\*" end="\*/" +syn match mysqlComment "#.*" +syn match mysqlComment "--\_s.*" +syn sync ccomment mysqlComment + +" Column types +" +" This gets a bit ugly. There are two different problems we have to +" deal with. +" +" The first problem is that some keywoards like 'float' can be used +" both with and without specifiers, i.e. 'float', 'float(1)' and +" 'float(@var)' are all valid. We have to account for this and we +" also have to make sure that garbage like floatn or float_(1) is not +" highlighted. +" +" The second problem is that some of these keywords are included in +" function names. For instance, year() is part of the name of the +" dayofyear() function, and the dec keyword (no parenthesis) is part of +" the name of the decode() function. + +syn keyword mysqlType tinyint smallint mediumint int integer bigint +syn keyword mysqlType date datetime time bit bool +syn keyword mysqlType tinytext mediumtext longtext text +syn keyword mysqlType tinyblob mediumblob longblob blob +syn region mysqlType start="float\W" end="."me=s-1 +syn region mysqlType start="float$" end="."me=s-1 +syn region mysqlType start="float(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="double\W" end="."me=s-1 +syn region mysqlType start="double$" end="."me=s-1 +syn region mysqlType start="double(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="double precision\W" end="."me=s-1 +syn region mysqlType start="double precision$" end="."me=s-1 +syn region mysqlType start="double precision(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="real\W" end="."me=s-1 +syn region mysqlType start="real$" end="."me=s-1 +syn region mysqlType start="real(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="numeric(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="dec\W" end="."me=s-1 +syn region mysqlType start="dec$" end="."me=s-1 +syn region mysqlType start="dec(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="decimal\W" end="."me=s-1 +syn region mysqlType start="decimal$" end="."me=s-1 +syn region mysqlType start="decimal(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="\Wtimestamp\W" end="."me=s-1 +syn region mysqlType start="\Wtimestamp$" end="."me=s-1 +syn region mysqlType start="\Wtimestamp(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="^timestamp\W" end="."me=s-1 +syn region mysqlType start="^timestamp$" end="."me=s-1 +syn region mysqlType start="^timestamp(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="\Wyear(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="^year(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="char(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="varchar(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="enum(" end=")" contains=mysqlString,mysqlVariable +syn region mysqlType start="\Wset(" end=")" contains=mysqlString,mysqlVariable +syn region mysqlType start="^set(" end=")" contains=mysqlString,mysqlVariable + +" Logical, string and numeric operators +syn keyword mysqlOperator between not and or is in like regexp rlike binary exists +syn region mysqlOperator start="isnull(" end=")" contains=ALL +syn region mysqlOperator start="coalesce(" end=")" contains=ALL +syn region mysqlOperator start="interval(" end=")" contains=ALL + +" Control flow functions +syn keyword mysqlFlow case when then else end +syn region mysqlFlow start="ifnull(" end=")" contains=ALL +syn region mysqlFlow start="nullif(" end=")" contains=ALL +syn region mysqlFlow start="if(" end=")" contains=ALL + +" General Functions +" +" I'm leery of just defining keywords for functions, since according to the MySQL manual: +" +" Function names do not clash with table or column names. For example, ABS is a +" valid column name. The only restriction is that for a function call, no spaces +" are allowed between the function name and the `(' that follows it. +" +" This means that if I want to highlight function names properly, I have to use a +" region to define them, not just a keyword. This will probably cause the syntax file +" to load more slowly, but at least it will be 'correct'. + +syn region mysqlFunction start="abs(" end=")" contains=ALL +syn region mysqlFunction start="acos(" end=")" contains=ALL +syn region mysqlFunction start="adddate(" end=")" contains=ALL +syn region mysqlFunction start="ascii(" end=")" contains=ALL +syn region mysqlFunction start="asin(" end=")" contains=ALL +syn region mysqlFunction start="atan(" end=")" contains=ALL +syn region mysqlFunction start="atan2(" end=")" contains=ALL +syn region mysqlFunction start="benchmark(" end=")" contains=ALL +syn region mysqlFunction start="bin(" end=")" contains=ALL +syn region mysqlFunction start="bit_and(" end=")" contains=ALL +syn region mysqlFunction start="bit_count(" end=")" contains=ALL +syn region mysqlFunction start="bit_or(" end=")" contains=ALL +syn region mysqlFunction start="ceiling(" end=")" contains=ALL +syn region mysqlFunction start="character_length(" end=")" contains=ALL +syn region mysqlFunction start="char_length(" end=")" contains=ALL +syn region mysqlFunction start="concat(" end=")" contains=ALL +syn region mysqlFunction start="concat_ws(" end=")" contains=ALL +syn region mysqlFunction start="connection_id(" end=")" contains=ALL +syn region mysqlFunction start="conv(" end=")" contains=ALL +syn region mysqlFunction start="cos(" end=")" contains=ALL +syn region mysqlFunction start="cot(" end=")" contains=ALL +syn region mysqlFunction start="count(" end=")" contains=ALL +syn region mysqlFunction start="curdate(" end=")" contains=ALL +syn region mysqlFunction start="curtime(" end=")" contains=ALL +syn region mysqlFunction start="date_add(" end=")" contains=ALL +syn region mysqlFunction start="date_format(" end=")" contains=ALL +syn region mysqlFunction start="date_sub(" end=")" contains=ALL +syn region mysqlFunction start="dayname(" end=")" contains=ALL +syn region mysqlFunction start="dayofmonth(" end=")" contains=ALL +syn region mysqlFunction start="dayofweek(" end=")" contains=ALL +syn region mysqlFunction start="dayofyear(" end=")" contains=ALL +syn region mysqlFunction start="decode(" end=")" contains=ALL +syn region mysqlFunction start="degrees(" end=")" contains=ALL +syn region mysqlFunction start="elt(" end=")" contains=ALL +syn region mysqlFunction start="encode(" end=")" contains=ALL +syn region mysqlFunction start="encrypt(" end=")" contains=ALL +syn region mysqlFunction start="exp(" end=")" contains=ALL +syn region mysqlFunction start="export_set(" end=")" contains=ALL +syn region mysqlFunction start="extract(" end=")" contains=ALL +syn region mysqlFunction start="field(" end=")" contains=ALL +syn region mysqlFunction start="find_in_set(" end=")" contains=ALL +syn region mysqlFunction start="floor(" end=")" contains=ALL +syn region mysqlFunction start="format(" end=")" contains=ALL +syn region mysqlFunction start="from_days(" end=")" contains=ALL +syn region mysqlFunction start="from_unixtime(" end=")" contains=ALL +syn region mysqlFunction start="get_lock(" end=")" contains=ALL +syn region mysqlFunction start="greatest(" end=")" contains=ALL +syn region mysqlFunction start="group_unique_users(" end=")" contains=ALL +syn region mysqlFunction start="hex(" end=")" contains=ALL +syn region mysqlFunction start="inet_aton(" end=")" contains=ALL +syn region mysqlFunction start="inet_ntoa(" end=")" contains=ALL +syn region mysqlFunction start="instr(" end=")" contains=ALL +syn region mysqlFunction start="lcase(" end=")" contains=ALL +syn region mysqlFunction start="least(" end=")" contains=ALL +syn region mysqlFunction start="length(" end=")" contains=ALL +syn region mysqlFunction start="load_file(" end=")" contains=ALL +syn region mysqlFunction start="locate(" end=")" contains=ALL +syn region mysqlFunction start="log(" end=")" contains=ALL +syn region mysqlFunction start="log10(" end=")" contains=ALL +syn region mysqlFunction start="lower(" end=")" contains=ALL +syn region mysqlFunction start="lpad(" end=")" contains=ALL +syn region mysqlFunction start="ltrim(" end=")" contains=ALL +syn region mysqlFunction start="make_set(" end=")" contains=ALL +syn region mysqlFunction start="master_pos_wait(" end=")" contains=ALL +syn region mysqlFunction start="max(" end=")" contains=ALL +syn region mysqlFunction start="md5(" end=")" contains=ALL +syn region mysqlFunction start="mid(" end=")" contains=ALL +syn region mysqlFunction start="min(" end=")" contains=ALL +syn region mysqlFunction start="mod(" end=")" contains=ALL +syn region mysqlFunction start="monthname(" end=")" contains=ALL +syn region mysqlFunction start="now(" end=")" contains=ALL +syn region mysqlFunction start="oct(" end=")" contains=ALL +syn region mysqlFunction start="octet_length(" end=")" contains=ALL +syn region mysqlFunction start="ord(" end=")" contains=ALL +syn region mysqlFunction start="period_add(" end=")" contains=ALL +syn region mysqlFunction start="period_diff(" end=")" contains=ALL +syn region mysqlFunction start="pi(" end=")" contains=ALL +syn region mysqlFunction start="position(" end=")" contains=ALL +syn region mysqlFunction start="pow(" end=")" contains=ALL +syn region mysqlFunction start="power(" end=")" contains=ALL +syn region mysqlFunction start="quarter(" end=")" contains=ALL +syn region mysqlFunction start="radians(" end=")" contains=ALL +syn region mysqlFunction start="rand(" end=")" contains=ALL +syn region mysqlFunction start="release_lock(" end=")" contains=ALL +syn region mysqlFunction start="repeat(" end=")" contains=ALL +syn region mysqlFunction start="reverse(" end=")" contains=ALL +syn region mysqlFunction start="round(" end=")" contains=ALL +syn region mysqlFunction start="rpad(" end=")" contains=ALL +syn region mysqlFunction start="rtrim(" end=")" contains=ALL +syn region mysqlFunction start="sec_to_time(" end=")" contains=ALL +syn region mysqlFunction start="session_user(" end=")" contains=ALL +syn region mysqlFunction start="sign(" end=")" contains=ALL +syn region mysqlFunction start="sin(" end=")" contains=ALL +syn region mysqlFunction start="soundex(" end=")" contains=ALL +syn region mysqlFunction start="space(" end=")" contains=ALL +syn region mysqlFunction start="sqrt(" end=")" contains=ALL +syn region mysqlFunction start="std(" end=")" contains=ALL +syn region mysqlFunction start="stddev(" end=")" contains=ALL +syn region mysqlFunction start="strcmp(" end=")" contains=ALL +syn region mysqlFunction start="subdate(" end=")" contains=ALL +syn region mysqlFunction start="substring(" end=")" contains=ALL +syn region mysqlFunction start="substring_index(" end=")" contains=ALL +syn region mysqlFunction start="subtime(" end=")" contains=ALL +syn region mysqlFunction start="sum(" end=")" contains=ALL +syn region mysqlFunction start="sysdate(" end=")" contains=ALL +syn region mysqlFunction start="system_user(" end=")" contains=ALL +syn region mysqlFunction start="tan(" end=")" contains=ALL +syn region mysqlFunction start="time_format(" end=")" contains=ALL +syn region mysqlFunction start="time_to_sec(" end=")" contains=ALL +syn region mysqlFunction start="to_days(" end=")" contains=ALL +syn region mysqlFunction start="trim(" end=")" contains=ALL +syn region mysqlFunction start="ucase(" end=")" contains=ALL +syn region mysqlFunction start="unique_users(" end=")" contains=ALL +syn region mysqlFunction start="unix_timestamp(" end=")" contains=ALL +syn region mysqlFunction start="upper(" end=")" contains=ALL +syn region mysqlFunction start="user(" end=")" contains=ALL +syn region mysqlFunction start="version(" end=")" contains=ALL +syn region mysqlFunction start="week(" end=")" contains=ALL +syn region mysqlFunction start="weekday(" end=")" contains=ALL +syn region mysqlFunction start="yearweek(" end=")" contains=ALL + +" 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_mysql_syn_inits") + if version < 508 + let did_mysql_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink mysqlKeyword Statement + HiLink mysqlSpecial Special + HiLink mysqlString String + HiLink mysqlNumber Number + HiLink mysqlVariable Identifier + HiLink mysqlComment Comment + HiLink mysqlType Type + HiLink mysqlOperator Statement + HiLink mysqlFlow Statement + HiLink mysqlFunction Function + + delcommand HiLink +endif + +let b:current_syntax = "mysql" + diff --git a/vim/bundle/ubuntu-vim72/syntax/named.vim b/vim/bundle/ubuntu-vim72/syntax/named.vim new file mode 100644 index 0000000..faec5f6 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/named.vim @@ -0,0 +1,248 @@ +" Vim syntax file +" Language: BIND configuration file +" Maintainer: Nick Hibma +" Last change: 2007-01-30 +" Filenames: named.conf, rndc.conf +" Location: http://www.van-laarhoven.org/vim/syntax/named.vim +" +" Previously maintained by glory hump and updated by Marcin +" Dalecki. +" +" This file could do with a lot of improvements, so comments are welcome. +" Please submit the named.conf (segment) with any comments. +" +" 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 match + +if version >= 600 + setlocal iskeyword=.,-,48-58,A-Z,a-z,_ +else + set iskeyword=.,-,48-58,A-Z,a-z,_ +endif + +if version >= 600 + syn sync match namedSync grouphere NONE "^(zone|controls|acl|key)" +endif + +let s:save_cpo = &cpo +set cpo-=C + +" BIND configuration file + +syn match namedComment "//.*" +syn match namedComment "#.*" +syn region namedComment start="/\*" end="\*/" +syn region namedString start=/"/ end=/"/ contained +" --- omitted trailing semicolon +syn match namedError /[^;{#]$/ + +" --- top-level keywords + +syn keyword namedInclude include nextgroup=namedString skipwhite +syn keyword namedKeyword acl key nextgroup=namedIntIdent skipwhite +syn keyword namedKeyword server nextgroup=namedIdentifier skipwhite +syn keyword namedKeyword controls nextgroup=namedSection skipwhite +syn keyword namedKeyword trusted-keys nextgroup=namedIntSection skipwhite +syn keyword namedKeyword logging nextgroup=namedLogSection skipwhite +syn keyword namedKeyword options nextgroup=namedOptSection skipwhite +syn keyword namedKeyword zone nextgroup=namedZoneString skipwhite + +" --- Identifier: name of following { ... } Section +syn match namedIdentifier contained /\k\+/ nextgroup=namedSection skipwhite +" --- IntIdent: name of following IntSection +syn match namedIntIdent contained /"\=\k\+"\=/ nextgroup=namedIntSection skipwhite + +" --- Section: { ... } clause +syn region namedSection contained start=+{+ end=+};+ contains=namedSection,namedIntKeyword + +" --- IntSection: section that does not contain other sections +syn region namedIntSection contained start=+{+ end=+}+ contains=namedIntKeyword,namedError + +" --- IntKeyword: keywords contained within `{ ... }' sections only +" + these keywords are contained within `key' and `acl' sections +syn keyword namedIntKeyword contained key algorithm +syn keyword namedIntKeyword contained secret nextgroup=namedString skipwhite + +" + these keywords are contained within `server' section only +syn keyword namedIntKeyword contained bogus support-ixfr nextgroup=namedBool,namedNotBool skipwhite +syn keyword namedIntKeyword contained transfers nextgroup=namedNumber,namedNotNumber skipwhite +syn keyword namedIntKeyword contained transfer-format +syn keyword namedIntKeyword contained keys nextgroup=namedIntSection skipwhite + +" + these keywords are contained within `controls' section only +syn keyword namedIntKeyword contained inet nextgroup=namedIPaddr,namedIPerror skipwhite +syn keyword namedIntKeyword contained unix nextgroup=namedString skipwhite +syn keyword namedIntKeyword contained port perm owner group nextgroup=namedNumber,namedNotNumber skipwhite +syn keyword namedIntKeyword contained allow nextgroup=namedIntSection skipwhite + +" + these keywords are contained within `update-policy' section only +syn keyword namedIntKeyword contained grant nextgroup=namedString skipwhite +syn keyword namedIntKeyword contained name self subdomain wildcard nextgroup=namedString skipwhite +syn keyword namedIntKeyword TXT A PTR NS SOA A6 CNAME MX ANY skipwhite + +" --- options +syn region namedOptSection contained start=+{+ end=+};+ contains=namedOption,namedCNOption,namedComment,namedParenError + +syn keyword namedOption contained version directory +\ nextgroup=namedString skipwhite +syn keyword namedOption contained named-xfer dump-file pid-file +\ nextgroup=namedString skipwhite +syn keyword namedOption contained mem-statistics-file statistics-file +\ nextgroup=namedString skipwhite +syn keyword namedOption contained auth-nxdomain deallocate-on-exit +\ nextgroup=namedBool,namedNotBool skipwhite +syn keyword namedOption contained dialup fake-iquery fetch-glue +\ nextgroup=namedBool,namedNotBool skipwhite +syn keyword namedOption contained has-old-clients host-statistics +\ nextgroup=namedBool,namedNotBool skipwhite +syn keyword namedOption contained maintain-ixfr-base multiple-cnames +\ nextgroup=namedBool,namedNotBool skipwhite +syn keyword namedOption contained notify recursion rfc2308-type1 +\ nextgroup=namedBool,namedNotBool skipwhite +syn keyword namedOption contained use-id-pool treat-cr-as-space +\ nextgroup=namedBool,namedNotBool skipwhite +syn keyword namedOption contained also-notify forwarders +\ nextgroup=namedIPlist skipwhite +syn keyword namedOption contained forward check-names +syn keyword namedOption contained allow-query allow-transfer allow-recursion +\ nextgroup=namedAML skipwhite +syn keyword namedOption contained blackhole listen-on +\ nextgroup=namedIntSection skipwhite +syn keyword namedOption contained lame-ttl max-transfer-time-in +\ nextgroup=namedNumber,namedNotNumber skipwhite +syn keyword namedOption contained max-ncache-ttl min-roots +\ nextgroup=namedNumber,namedNotNumber skipwhite +syn keyword namedOption contained serial-queries transfers-in +\ nextgroup=namedNumber,namedNotNumber skipwhite +syn keyword namedOption contained transfers-out transfers-per-ns +syn keyword namedOption contained transfer-format +syn keyword namedOption contained transfer-source +\ nextgroup=namedIPaddr,namedIPerror skipwhite +syn keyword namedOption contained max-ixfr-log-size +\ nextgroup=namedNumber,namedNotNumber skipwhite +syn keyword namedOption contained coresize datasize files stacksize +syn keyword namedOption contained cleaning-interval interface-interval statistics-interval heartbeat-interval +\ nextgroup=namedNumber,namedNotNumber skipwhite +syn keyword namedOption contained topology sortlist rrset-order +\ nextgroup=namedIntSection skipwhite + +syn match namedOption contained /\/ nextgroup=namedSpareDot +syn match namedDomain contained /"\."/ms=s+1,me=e-1 +syn match namedSpareDot contained /\./ + +" --- syntax errors +syn match namedIllegalDom contained /"\S*[^-A-Za-z0-9.[:space:]]\S*"/ms=s+1,me=e-1 +syn match namedIPerror contained /\<\S*[^0-9.[:space:];]\S*/ +syn match namedEParenError contained +{+ +syn match namedParenError +}\([^;]\|$\)+ + +" 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_named_syn_inits") + if version < 508 + let did_named_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink namedComment Comment + HiLink namedInclude Include + HiLink namedKeyword Keyword + HiLink namedIntKeyword Keyword + HiLink namedIdentifier Identifier + HiLink namedIntIdent Identifier + + HiLink namedString String + HiLink namedBool Type + HiLink namedNotBool Error + HiLink namedNumber Number + HiLink namedNotNumber Error + + HiLink namedOption namedKeyword + HiLink namedLogOption namedKeyword + HiLink namedCNOption namedKeyword + HiLink namedQSKeywords Type + HiLink namedCNKeywords Type + HiLink namedLogCategory Type + HiLink namedIPaddr Number + HiLink namedDomain Identifier + HiLink namedZoneOpt namedKeyword + HiLink namedZoneType Type + HiLink namedParenError Error + HiLink namedEParenError Error + HiLink namedIllegalDom Error + HiLink namedIPerror Error + HiLink namedSpareDot Error + HiLink namedError Error + + delcommand HiLink +endif + +let &cpo = s:save_cpo +unlet s:save_cpo + +let b:current_syntax = "named" + +" vim: ts=17 diff --git a/vim/bundle/ubuntu-vim72/syntax/nanorc.vim b/vim/bundle/ubuntu-vim72/syntax/nanorc.vim new file mode 100644 index 0000000..2ae4961 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/nanorc.vim @@ -0,0 +1,243 @@ +" Vim syntax file +" Language: nanorc(5) - GNU nano configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword nanorcTodo contained TODO FIXME XXX NOTE + +syn region nanorcComment display oneline start='^\s*#' end='$' + \ contains=nanorcTodo,@Spell + +syn match nanorcBegin display '^' + \ nextgroup=nanorcKeyword,nanorcComment + \ skipwhite + +syn keyword nanorcKeyword contained set unset + \ nextgroup=nanorcBoolOption, + \ nanorcStringOption,nanorcNumberOption + \ skipwhite + +syn keyword nanorcKeyword contained syntax + \ nextgroup=nanorcSynGroupName skipwhite + +syn keyword nanorcKeyword contained color + \ nextgroup=@nanorcFGColor skipwhite + +syn keyword nanorcBoolOption contained autoindent backup const cut + \ historylog morespace mouse multibuffer + \ noconvert nofollow nohelp nowrap preserve + \ rebinddelete regexp smarthome smooth suspend + \ tempfile view + +syn keyword nanorcStringOption contained backupdir brackets operatingdir + \ punct quotestr speller whitespace + \ nextgroup=nanorcString skipwhite + +syn keyword nanorcNumberOption contained fill tabsize + \ nextgroup=nanorcNumber skipwhite + +syn region nanorcSynGroupName contained display oneline start=+"+ + \ end=+"\ze\%([[:blank:]]\|$\)+ + \ nextgroup=nanorcRegexes skipwhite + +syn match nanorcString contained display '".*"' + +syn region nanorcRegexes contained display oneline start=+"+ + \ end=+"\ze\%([[:blank:]]\|$\)+ + \ nextgroup=nanorcRegexes skipwhite + +syn match nanorcNumber contained display '[+-]\=\<\d\+\>' + +syn cluster nanorcFGColor contains=nanorcFGWhite,nanorcFGBlack, + \ nanorcFGRed,nanorcFGBlue,nanorcFGGreen, + \ nanorcFGYellow,nanorcFGMagenta,nanorcFGCyan, + \ nanorcFGBWhite,nanorcFGBBlack,nanorcFGBRed, + \ nanorcFGBBlue,nanorcFGBGreen,nanorcFGBYellow, + \ nanorcFGBMagenta,nanorcFGBCyan + +syn keyword nanorcFGWhite contained white + \ nextgroup=@nanorcFGSpec skipwhite + +syn keyword nanorcFGBlack contained black + \ nextgroup=@nanorcFGSpec skipwhite + +syn keyword nanorcFGRed contained red + \ nextgroup=@nanorcFGSpec skipwhite + +syn keyword nanorcFGBlue contained blue + \ nextgroup=@nanorcFGSpec skipwhite + +syn keyword nanorcFGGreen contained green + \ nextgroup=@nanorcFGSpec skipwhite + +syn keyword nanorcFGYellow contained yellow + \ nextgroup=@nanorcFGSpec skipwhite + +syn keyword nanorcFGMagenta contained magenta + \ nextgroup=@nanorcFGSpec skipwhite + +syn keyword nanorcFGCyan contained cyan + \ nextgroup=@nanorcFGSpec skipwhite + +syn keyword nanorcFGBWhite contained brightwhite + \ nextgroup=@nanorcFGSpec skipwhite + +syn keyword nanorcFGBBlack contained brightblack + \ nextgroup=@nanorcFGSpec skipwhite + +syn keyword nanorcFGBRed contained brightred + \ nextgroup=@nanorcFGSpec skipwhite + +syn keyword nanorcFGBBlue contained brightblue + \ nextgroup=@nanorcFGSpec skipwhite + +syn keyword nanorcFGBGreen contained brightgreen + \ nextgroup=@nanorcFGSpec skipwhite + +syn keyword nanorcFGBYellow contained brightyellow + \ nextgroup=@nanorcFGSpec skipwhite + +syn keyword nanorcFGBMagenta contained brightmagenta + \ nextgroup=@nanorcFGSpec skipwhite + +syn keyword nanorcFGBCyan contained brightcyan + \ nextgroup=@nanorcFGSpec skipwhite + +syn cluster nanorcBGColor contains=nanorcBGWhite,nanorcBGBlack, + \ nanorcBGRed,nanorcBGBlue,nanorcBGGreen, + \ nanorcBGYellow,nanorcBGMagenta,nanorcBGCyan, + \ nanorcBGBWhite,nanorcBGBBlack,nanorcBGBRed, + \ nanorcBGBBlue,nanorcBGBGreen,nanorcBGBYellow, + \ nanorcBGBMagenta,nanorcBGBCyan + +syn keyword nanorcBGWhite contained white + \ nextgroup=@nanorcBGSpec skipwhite + +syn keyword nanorcBGBlack contained black + \ nextgroup=@nanorcBGSpec skipwhite + +syn keyword nanorcBGRed contained red + \ nextgroup=@nanorcBGSpec skipwhite + +syn keyword nanorcBGBlue contained blue + \ nextgroup=@nanorcBGSpec skipwhite + +syn keyword nanorcBGGreen contained green + \ nextgroup=@nanorcBGSpec skipwhite + +syn keyword nanorcBGYellow contained yellow + \ nextgroup=@nanorcBGSpec skipwhite + +syn keyword nanorcBGMagenta contained magenta + \ nextgroup=@nanorcBGSpec skipwhite + +syn keyword nanorcBGCyan contained cyan + \ nextgroup=@nanorcBGSpec skipwhite + +syn keyword nanorcBGBWhite contained brightwhite + \ nextgroup=@nanorcBGSpec skipwhite + +syn keyword nanorcBGBBlack contained brightblack + \ nextgroup=@nanorcBGSpec skipwhite + +syn keyword nanorcBGBRed contained brightred + \ nextgroup=@nanorcBGSpec skipwhite + +syn keyword nanorcBGBBlue contained brightblue + \ nextgroup=@nanorcBGSpec skipwhite + +syn keyword nanorcBGBGreen contained brightgreen + \ nextgroup=@nanorcBGSpec skipwhite + +syn keyword nanorcBGBYellow contained brightyellow + \ nextgroup=@nanorcBGSpec skipwhite + +syn keyword nanorcBGBMagenta contained brightmagenta + \ nextgroup=@nanorcBGSpec skipwhite + +syn keyword nanorcBGBCyan contained brightcyan + \ nextgroup=@nanorcBGSpec skipwhite + +syn match nanorcBGColorSep contained ',' nextgroup=@nanorcBGColor + +syn cluster nanorcFGSpec contains=nanorcBGColorSep,nanorcRegexes, + \ nanorcStartRegion + +syn cluster nanorcBGSpec contains=nanorcRegexes,nanorcStartRegion + +syn keyword nanorcStartRegion contained start nextgroup=nanorcStartRegionEq + +syn match nanorcStartRegionEq contained '=' nextgroup=nanorcRegion + +syn region nanorcRegion contained display oneline start=+"+ + \ end=+"\ze\%([[:blank:]]\|$\)+ + \ nextgroup=nanorcEndRegion skipwhite + +syn keyword nanorcEndRegion contained end nextgroup=nanorcStartRegionEq + +syn match nanorcEndRegionEq contained '=' nextgroup=nanorcRegex + +syn region nanorcRegex contained display oneline start=+"+ + \ end=+"\ze\%([[:blank:]]\|$\)+ + +hi def link nanorcTodo Todo +hi def link nanorcComment Comment +hi def link nanorcKeyword Keyword +hi def link nanorcBoolOption Identifier +hi def link nanorcStringOption Identifier +hi def link nanorcNumberOption Identifier +hi def link nanorcSynGroupName String +hi def link nanorcString String +hi def link nanorcRegexes nanorcString +hi def link nanorcNumber Number +hi def nanorcFGWhite ctermfg=Gray guifg=Gray +hi def nanorcFGBlack ctermfg=Black guifg=Black +hi def nanorcFGRed ctermfg=DarkRed guifg=DarkRed +hi def nanorcFGBlue ctermfg=DarkBlue guifg=DarkBlue +hi def nanorcFGGreen ctermfg=DarkGreen guifg=DarkGreen +hi def nanorcFGYellow ctermfg=Brown guifg=Brown +hi def nanorcFGMagenta ctermfg=DarkMagenta guifg=DarkMagenta +hi def nanorcFGCyan ctermfg=DarkCyan guifg=DarkCyan +hi def nanorcFGBWhite ctermfg=White guifg=White +hi def nanorcFGBBlack ctermfg=DarkGray guifg=DarkGray +hi def nanorcFGBRed ctermfg=Red guifg=Red +hi def nanorcFGBBlue ctermfg=Blue guifg=Blue +hi def nanorcFGBGreen ctermfg=Green guifg=Green +hi def nanorcFGBYellow ctermfg=Yellow guifg=Yellow +hi def nanorcFGBMagenta ctermfg=Magenta guifg=Magenta +hi def nanorcFGBCyan ctermfg=Cyan guifg=Cyan +hi def link nanorcBGColorSep Normal +hi def nanorcBGWhite ctermbg=Gray guibg=Gray +hi def nanorcBGBlack ctermbg=Black guibg=Black +hi def nanorcBGRed ctermbg=DarkRed guibg=DarkRed +hi def nanorcBGBlue ctermbg=DarkBlue guibg=DarkBlue +hi def nanorcBGGreen ctermbg=DarkGreen guibg=DarkGreen +hi def nanorcBGYellow ctermbg=Brown guibg=Brown +hi def nanorcBGMagenta ctermbg=DarkMagenta guibg=DarkMagenta +hi def nanorcBGCyan ctermbg=DarkCyan guibg=DarkCyan +hi def nanorcBGBWhite ctermbg=White guibg=White +hi def nanorcBGBBlack ctermbg=DarkGray guibg=DarkGray +hi def nanorcBGBRed ctermbg=Red guibg=Red +hi def nanorcBGBBlue ctermbg=Blue guibg=Blue +hi def nanorcBGBGreen ctermbg=Green guibg=Green +hi def nanorcBGBYellow ctermbg=Yellow guibg=Yellow +hi def nanorcBGBMagenta ctermbg=Magenta guibg=Magenta +hi def nanorcBGBCyan ctermbg=Cyan guibg=Cyan +hi def link nanorcStartRegion Type +hi def link nanorcStartRegionEq Operator +hi def link nanorcRegion nanorcString +hi def link nanorcEndRegion Type +hi def link nanorcEndRegionEq Operator +hi def link nanorcRegex nanoRegexes + +let b:current_syntax = "nanorc" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/nasm.vim b/vim/bundle/ubuntu-vim72/syntax/nasm.vim new file mode 100644 index 0000000..6bbf33a --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/nasm.vim @@ -0,0 +1,522 @@ +" Vim syntax file +" Language: NASM - The Netwide Assembler (v0.98) +" Maintainer: Manuel M.H. Stol +" Last Change: 2003 May 11 +" Vim URL: http://www.vim.org/lang.html +" NASM Home: http://www.cryogen.com/Nasm/ + + + +" Setup Syntax: +" Clear old syntax settings +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif +" Assembler syntax is case insensetive +syn case ignore + + + +" Vim search and movement commands on identifers +if version < 600 + " Comments at start of a line inside which to skip search for indentifiers + set comments=:; + " Identifier Keyword characters (defines \k) + set iskeyword=@,48-57,#,$,.,?,@-@,_,~ +else + " Comments at start of a line inside which to skip search for indentifiers + setlocal comments=:; + " Identifier Keyword characters (defines \k) + setlocal iskeyword=@,48-57,#,$,.,?,@-@,_,~ +endif + + + +" Comments: +syn region nasmComment start=";" keepend end="$" contains=@nasmGrpInComments +syn region nasmSpecialComment start=";\*\*\*" keepend end="$" +syn keyword nasmInCommentTodo contained TODO FIXME XXX[XXXXX] +syn cluster nasmGrpInComments contains=nasmInCommentTodo +syn cluster nasmGrpComments contains=@nasmGrpInComments,nasmComment,nasmSpecialComment + + + +" Label Identifiers: +" in NASM: 'Everything is a Label' +" Definition Label = label defined by %[i]define or %[i]assign +" Identifier Label = label defined as first non-keyword on a line or %[i]macro +syn match nasmLabelError "$\=\(\d\+\K\|[#\.@]\|\$\$\k\)\k*\>" +syn match nasmLabel "\<\(\h\|[?@]\)\k*\>" +syn match nasmLabel "[\$\~]\(\h\|[?@]\)\k*\>"lc=1 +" Labels starting with one or two '.' are special +syn match nasmLocalLabel "\<\.\(\w\|[#$?@~]\)\k*\>" +syn match nasmLocalLabel "\<\$\.\(\w\|[#$?@~]\)\k*\>"ms=s+1 +if !exists("nasm_no_warn") + syn match nasmLabelWarn "\<\~\=\$\=[_\.][_\.\~]*\>" +endif +if exists("nasm_loose_syntax") + syn match nasmSpecialLabel "\<\.\.@\k\+\>" + syn match nasmSpecialLabel "\<\$\.\.@\k\+\>"ms=s+1 + if !exists("nasm_no_warn") + syn match nasmLabelWarn "\<\$\=\.\.@\(\d\|[#$\.~]\)\k*\>" + endif + " disallow use of nasm internal label format + syn match nasmLabelError "\<\$\=\.\.@\d\+\.\k*\>" +else + syn match nasmSpecialLabel "\<\.\.@\(\h\|[?@]\)\k*\>" + syn match nasmSpecialLabel "\<\$\.\.@\(\h\|[?@]\)\k*\>"ms=s+1 +endif +" Labels can be dereferenced with '$' to destinguish them from reserved words +syn match nasmLabelError "\<\$\K\k*\s*:" +syn match nasmLabelError "^\s*\$\K\k*\>" +syn match nasmLabelError "\<\~\s*\(\k*\s*:\|\$\=\.\k*\)" + + + +" Constants: +syn match nasmStringError +["']+ +syn match nasmString +\("[^"]\{-}"\|'[^']\{-}'\)+ +syn match nasmBinNumber "\<[0-1]\+b\>" +syn match nasmBinNumber "\<\~[0-1]\+b\>"lc=1 +syn match nasmOctNumber "\<\o\+q\>" +syn match nasmOctNumber "\<\~\o\+q\>"lc=1 +syn match nasmDecNumber "\<\d\+\>" +syn match nasmDecNumber "\<\~\d\+\>"lc=1 +syn match nasmHexNumber "\<\(\d\x*h\|0x\x\+\|\$\d\x*\)\>" +syn match nasmHexNumber "\<\~\(\d\x*h\|0x\x\+\|\$\d\x*\)\>"lc=1 +syn match nasmFltNumber "\<\d\+\.\d*\(e[+-]\=\d\+\)\=\>" +syn keyword nasmFltNumber Inf Infinity Indefinite NaN SNaN QNaN +syn match nasmNumberError "\<\~\s*\d\+\.\d*\(e[+-]\=\d\+\)\=\>" + + + +" Netwide Assembler Storage Directives: +" Storage types +syn keyword nasmTypeError DF EXTRN FWORD RESF TBYTE +syn keyword nasmType FAR NEAR SHORT +syn keyword nasmType BYTE WORD DWORD QWORD DQWORD HWORD DHWORD TWORD +syn keyword nasmType CDECL FASTCALL NONE PASCAL STDCALL +syn keyword nasmStorage DB DW DD DQ DDQ DT +syn keyword nasmStorage RESB RESW RESD RESQ RESDQ REST +syn keyword nasmStorage EXTERN GLOBAL COMMON +" Structured storage types +syn match nasmTypeError "\<\(AT\|I\=\(END\)\=\(STRUCT\=\|UNION\)\|I\=END\)\>" +syn match nasmStructureLabel contained "\<\(AT\|I\=\(END\)\=\(STRUCT\=\|UNION\)\|I\=END\)\>" +" structures cannot be nested (yet) -> use: 'keepend' and 're=' +syn cluster nasmGrpCntnStruc contains=ALLBUT,@nasmGrpInComments,nasmMacroDef,@nasmGrpInMacros,@nasmGrpInPreCondits,nasmStructureDef,@nasmGrpInStrucs +syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="^\s*STRUCT\>"hs=e-5 end="^\s*ENDSTRUCT\>"re=e-9 contains=@nasmGrpCntnStruc +syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="^\s*STRUC\>"hs=e-4 end="^\s*ENDSTRUC\>"re=e-8 contains=@nasmGrpCntnStruc +syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="\" end="\" contains=@nasmGrpCntnStruc,nasmInStructure +" union types are not part of nasm (yet) +"syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="^\s*UNION\>"hs=e-4 end="^\s*ENDUNION\>"re=e-8 contains=@nasmGrpCntnStruc +"syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="\" end="\" contains=@nasmGrpCntnStruc,nasmInStructure +syn match nasmInStructure contained "^\s*AT\>"hs=e-1 +syn cluster nasmGrpInStrucs contains=nasmStructure,nasmInStructure,nasmStructureLabel + + + +" PreProcessor Instructions: +" NAsm PreProcs start with %, but % is not a character +syn match nasmPreProcError "%{\=\(%\=\k\+\|%%\+\k*\|[+-]\=\d\+\)}\=" +if exists("nasm_loose_syntax") + syn cluster nasmGrpNxtCtx contains=nasmStructureLabel,nasmLabel,nasmLocalLabel,nasmSpecialLabel,nasmLabelError,nasmPreProcError +else + syn cluster nasmGrpNxtCtx contains=nasmStructureLabel,nasmLabel,nasmLabelError,nasmPreProcError +endif + +" Multi-line macro +syn cluster nasmGrpCntnMacro contains=ALLBUT,@nasmGrpInComments,nasmStructureDef,@nasmGrpInStrucs,nasmMacroDef,@nasmGrpPreCondits,nasmMemReference,nasmInMacPreCondit,nasmInMacStrucDef +syn region nasmMacroDef matchgroup=nasmMacro keepend start="^\s*%macro\>"hs=e-5 start="^\s*%imacro\>"hs=e-6 end="^\s*%endmacro\>"re=e-9 contains=@nasmGrpCntnMacro,nasmInMacStrucDef +if exists("nasm_loose_syntax") + syn match nasmInMacLabel contained "%\(%\k\+\>\|{%\k\+}\)" + syn match nasmInMacLabel contained "%\($\+\(\w\|[#\.?@~]\)\k*\>\|{$\+\(\w\|[#\.?@~]\)\k*}\)" + syn match nasmInMacPreProc contained "^\s*%\(push\|repl\)\>"hs=e-4 skipwhite nextgroup=nasmStructureLabel,nasmLabel,nasmInMacParam,nasmLocalLabel,nasmSpecialLabel,nasmLabelError,nasmPreProcError + if !exists("nasm_no_warn") + syn match nasmInMacLblWarn contained "%\(%[$\.]\k*\>\|{%[$\.]\k*}\)" + syn match nasmInMacLblWarn contained "%\($\+\(\d\|[#\.@~]\)\k*\|{\$\+\(\d\|[#\.@~]\)\k*}\)" + hi link nasmInMacCatLabel nasmInMacLblWarn + else + hi link nasmInMacCatLabel nasmInMacLabel + endif +else + syn match nasmInMacLabel contained "%\(%\(\w\|[#?@~]\)\k*\>\|{%\(\w\|[#?@~]\)\k*}\)" + syn match nasmInMacLabel contained "%\($\+\(\h\|[?@]\)\k*\>\|{$\+\(\h\|[?@]\)\k*}\)" + hi link nasmInMacCatLabel nasmLabelError +endif +syn match nasmInMacCatLabel contained "\d\K\k*"lc=1 +syn match nasmInMacLabel contained "\d}\k\+"lc=2 +if !exists("nasm_no_warn") + syn match nasmInMacLblWarn contained "%\(\($\+\|%\)[_~][._~]*\>\|{\($\+\|%\)[_~][._~]*}\)" +endif +syn match nasmInMacPreProc contained "^\s*%pop\>"hs=e-3 +syn match nasmInMacPreProc contained "^\s*%\(push\|repl\)\>"hs=e-4 skipwhite nextgroup=@nasmGrpNxtCtx +" structures cannot be nested (yet) -> use: 'keepend' and 're=' +syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="^\s*STRUCT\>"hs=e-5 end="^\s*ENDSTRUCT\>"re=e-9 contains=@nasmGrpCntnMacro +syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="^\s*STRUC\>"hs=e-4 end="^\s*ENDSTRUC\>"re=e-8 contains=@nasmGrpCntnMacro +syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="\" end="\" contains=@nasmGrpCntnMacro,nasmInStructure +" union types are not part of nasm (yet) +"syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="^\s*UNION\>"hs=e-4 end="^\s*ENDUNION\>"re=e-8 contains=@nasmGrpCntnMacro +"syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="\" end="\" contains=@nasmGrpCntnMacro,nasmInStructure +syn region nasmInMacPreConDef contained transparent matchgroup=nasmInMacPreCondit start="^\s*%ifnidni\>"hs=e-7 start="^\s*%if\(idni\|n\(ctx\|def\|idn\|num\|str\)\)\>"hs=e-6 start="^\s*%if\(ctx\|def\|idn\|nid\|num\|str\)\>"hs=e-5 start="^\s*%ifid\>"hs=e-4 start="^\s*%if\>"hs=e-2 end="%endif\>" contains=@nasmGrpCntnMacro,nasmInMacPreCondit,nasmInPreCondit +syn match nasmInMacPreCondit contained transparent "ctx\s"lc=3 skipwhite nextgroup=@nasmGrpNxtCtx +syn match nasmInMacPreCondit contained "^\s*%elifctx\>"hs=e-7 skipwhite nextgroup=@nasmGrpNxtCtx +syn match nasmInMacPreCondit contained "^\s*%elifnctx\>"hs=e-8 skipwhite nextgroup=@nasmGrpNxtCtx +syn match nasmInMacParamNum contained "\<\d\+\.list\>"me=e-5 +syn match nasmInMacParamNum contained "\<\d\+\.nolist\>"me=e-7 +syn match nasmInMacDirective contained "\.\(no\)\=list\>" +syn match nasmInMacMacro contained transparent "macro\s"lc=5 skipwhite nextgroup=nasmStructureLabel +syn match nasmInMacMacro contained "^\s*%rotate\>"hs=e-6 +syn match nasmInMacParam contained "%\([+-]\=\d\+\|{[+-]\=\d\+}\)" +" nasm conditional macro operands/arguments +" Todo: check feasebility; add too nasmGrpInMacros, etc. +"syn match nasmInMacCond contained "\<\(N\=\([ABGL]E\=\|[CEOSZ]\)\|P[EO]\=\)\>" +syn cluster nasmGrpInMacros contains=nasmMacro,nasmInMacMacro,nasmInMacParam,nasmInMacParamNum,nasmInMacDirective,nasmInMacLabel,nasmInMacLblWarn,nasmInMacMemRef,nasmInMacPreConDef,nasmInMacPreCondit,nasmInMacPreProc,nasmInMacStrucDef + +" Context pre-procs that are better used inside a macro +if exists("nasm_ctx_outside_macro") + syn region nasmPreConditDef transparent matchgroup=nasmCtxPreCondit start="^\s*%ifnctx\>"hs=e-6 start="^\s*%ifctx\>"hs=e-5 end="%endif\>" contains=@nasmGrpCntnPreCon + syn match nasmCtxPreProc "^\s*%pop\>"hs=e-3 + if exists("nasm_loose_syntax") + syn match nasmCtxLocLabel "%$\+\(\w\|[#\.?@~]\)\k*\>" + else + syn match nasmCtxLocLabel "%$\+\(\h\|[?@]\)\k*\>" + endif + syn match nasmCtxPreProc "^\s*%\(push\|repl\)\>"hs=e-4 skipwhite nextgroup=@nasmGrpNxtCtx + syn match nasmCtxPreCondit contained transparent "ctx\s"lc=3 skipwhite nextgroup=@nasmGrpNxtCtx + syn match nasmCtxPreCondit contained "^\s*%elifctx\>"hs=e-7 skipwhite nextgroup=@nasmGrpNxtCtx + syn match nasmCtxPreCondit contained "^\s*%elifnctx\>"hs=e-8 skipwhite nextgroup=@nasmGrpNxtCtx + if exists("nasm_no_warn") + hi link nasmCtxPreCondit nasmPreCondit + hi link nasmCtxPreProc nasmPreProc + hi link nasmCtxLocLabel nasmLocalLabel + else + hi link nasmCtxPreCondit nasmPreProcWarn + hi link nasmCtxPreProc nasmPreProcWarn + hi link nasmCtxLocLabel nasmLabelWarn + endif +endif + +" Conditional assembly +syn cluster nasmGrpCntnPreCon contains=ALLBUT,@nasmGrpInComments,@nasmGrpInMacros,@nasmGrpInStrucs +syn region nasmPreConditDef transparent matchgroup=nasmPreCondit start="^\s*%ifnidni\>"hs=e-7 start="^\s*%if\(idni\|n\(def\|idn\|num\|str\)\)\>"hs=e-6 start="^\s*%if\(def\|idn\|nid\|num\|str\)\>"hs=e-5 start="^\s*%ifid\>"hs=e-4 start="^\s*%if\>"hs=e-2 end="%endif\>" contains=@nasmGrpCntnPreCon +syn match nasmInPreCondit contained "^\s*%el\(if\|se\)\>"hs=e-4 +syn match nasmInPreCondit contained "^\s*%elifid\>"hs=e-6 +syn match nasmInPreCondit contained "^\s*%elif\(def\|idn\|nid\|num\|str\)\>"hs=e-7 +syn match nasmInPreCondit contained "^\s*%elif\(n\(def\|idn\|num\|str\)\|idni\)\>"hs=e-8 +syn match nasmInPreCondit contained "^\s*%elifnidni\>"hs=e-9 +syn cluster nasmGrpInPreCondits contains=nasmPreCondit,nasmInPreCondit,nasmCtxPreCondit +syn cluster nasmGrpPreCondits contains=nasmPreConditDef,@nasmGrpInPreCondits,nasmCtxPreProc,nasmCtxLocLabel + +" Other pre-processor statements +syn match nasmPreProc "^\s*%rep\>"hs=e-3 +syn match nasmPreProc "^\s*%line\>"hs=e-4 +syn match nasmPreProc "^\s*%\(clear\|error\)\>"hs=e-5 +syn match nasmPreProc "^\s*%endrep\>"hs=e-6 +syn match nasmPreProc "^\s*%exitrep\>"hs=e-7 +syn match nasmDefine "^\s*%undef\>"hs=e-5 +syn match nasmDefine "^\s*%\(assign\|define\)\>"hs=e-6 +syn match nasmDefine "^\s*%i\(assign\|define\)\>"hs=e-7 +syn match nasmInclude "^\s*%include\>"hs=e-7 + +" Multiple pre-processor instructions on single line detection (obsolete) +"syn match nasmPreProcError +^\s*\([^\t "%';][^"%';]*\|[^\t "';][^"%';]\+\)%\a\+\>+ +syn cluster nasmGrpPreProcs contains=nasmMacroDef,@nasmGrpInMacros,@nasmGrpPreCondits,nasmPreProc,nasmDefine,nasmInclude,nasmPreProcWarn,nasmPreProcError + + + +" Register Identifiers: +" Register operands: +syn match nasmGen08Register "\<[A-D][HL]\>" +syn match nasmGen16Register "\<\([A-D]X\|[DS]I\|[BS]P\)\>" +syn match nasmGen32Register "\" +syn match nasmSegRegister "\<[C-GS]S\>" +syn match nasmSpcRegister "\" +syn match nasmFpuRegister "\" +syn match nasmMmxRegister "\" +syn match nasmSseRegister "\" +syn match nasmCtrlRegister "\" +syn match nasmDebugRegister "\" +syn match nasmTestRegister "\" +syn match nasmRegisterError "\<\(CR[15-9]\|DR[4-58-9]\|TR[0-28-9]\)\>" +syn match nasmRegisterError "\" +syn match nasmRegisterError "\\)" +syn match nasmRegisterError "\" +" Memory reference operand (address): +syn match nasmMemRefError "[\[\]]" +syn cluster nasmGrpCntnMemRef contains=ALLBUT,@nasmGrpComments,@nasmGrpPreProcs,@nasmGrpInStrucs,nasmMemReference,nasmMemRefError +syn match nasmInMacMemRef contained "\[[^;\[\]]\{-}\]" contains=@nasmGrpCntnMemRef,nasmPreProcError,nasmInMacLabel,nasmInMacLblWarn,nasmInMacParam +syn match nasmMemReference "\[[^;\[\]]\{-}\]" contains=@nasmGrpCntnMemRef,nasmPreProcError,nasmCtxLocLabel + + + +" Netwide Assembler Directives: +" Compilation constants +syn keyword nasmConstant __BITS__ __DATE__ __FILE__ __FORMAT__ __LINE__ +syn keyword nasmConstant __NASM_MAJOR__ __NASM_MINOR__ __NASM_VERSION__ +syn keyword nasmConstant __TIME__ +" Instruction modifiers +syn match nasmInstructnError "\" +syn match nasmInstrModifier "\(^\|:\)\s*[C-GS]S\>"ms=e-1 +syn keyword nasmInstrModifier A16 A32 O16 O32 +syn match nasmInstrModifier "\"lc=5,ms=e-1 +" the 'to' keyword is not allowed for fpu-pop instructions (yet) +"syn match nasmInstrModifier "\"lc=6,ms=e-1 +" NAsm directives +syn keyword nasmRepeat TIMES +syn keyword nasmDirective ALIGN[B] INCBIN EQU NOSPLIT SPLIT +syn keyword nasmDirective ABSOLUTE BITS SECTION SEGMENT +syn keyword nasmDirective ENDSECTION ENDSEGMENT +syn keyword nasmDirective __SECT__ +" Macro created standard directives: (requires %include) +syn case match +syn keyword nasmStdDirective ENDPROC EPILOGUE LOCALS PROC PROLOGUE USES +syn keyword nasmStdDirective ENDIF ELSE ELIF ELSIF IF +"syn keyword nasmStdDirective BREAK CASE DEFAULT ENDSWITCH SWITCH +"syn keyword nasmStdDirective CASE OF ENDCASE +syn keyword nasmStdDirective DO ENDFOR ENDWHILE FOR REPEAT UNTIL WHILE EXIT +syn case ignore +" Format specific directives: (all formats) +" (excluded: extension directives to section, global, common and extern) +syn keyword nasmFmtDirective ORG +syn keyword nasmFmtDirective EXPORT IMPORT GROUP UPPERCASE SEG WRT +syn keyword nasmFmtDirective LIBRARY +syn case match +syn keyword nasmFmtDirective _GLOBAL_OFFSET_TABLE_ __GLOBAL_OFFSET_TABLE_ +syn keyword nasmFmtDirective ..start ..got ..gotoff ..gotpc ..plt ..sym +syn case ignore + + + +" Standard Instructions: +syn match nasmInstructnError "\<\(F\=CMOV\|SET\)N\=\a\{0,2}\>" +syn keyword nasmInstructnError CMPS MOVS LCS LODS STOS XLAT +syn match nasmStdInstruction "\" +syn match nasmInstructnError "\\s*[^:]"he=e-1 +syn match nasmStdInstruction "\<\(CMOV\|J\|SET\)\(N\=\([ABGL]E\=\|[CEOSZ]\)\|P[EO]\=\)\>" +syn match nasmStdInstruction "\" +syn keyword nasmStdInstruction AAA AAD AAM AAS ADC ADD AND +syn keyword nasmStdInstruction BOUND BSF BSR BSWAP BT[C] BTR BTS +syn keyword nasmStdInstruction CALL CBW CDQ CLC CLD CMC CMP CMPSB CMPSD CMPSW +syn keyword nasmStdInstruction CMPXCHG CMPXCHG8B CPUID CWD[E] +syn keyword nasmStdInstruction DAA DAS DEC DIV ENTER +syn keyword nasmStdInstruction IDIV IMUL INC INT[O] IRET[D] IRETW +syn keyword nasmStdInstruction JCXZ JECXZ JMP +syn keyword nasmStdInstruction LAHF LDS LEA LEAVE LES LFS LGS LODSB LODSD +syn keyword nasmStdInstruction LODSW LOOP[E] LOOPNE LOOPNZ LOOPZ LSS +syn keyword nasmStdInstruction MOVSB MOVSD MOVSW MOVSX MOVZX MUL NEG NOP NOT +syn keyword nasmStdInstruction OR POPA[D] POPAW POPF[D] POPFW +syn keyword nasmStdInstruction PUSH[AD] PUSHAW PUSHF[D] PUSHFW +syn keyword nasmStdInstruction RCL RCR RETF RET[N] ROL ROR +syn keyword nasmStdInstruction SAHF SAL SAR SBB SCASB SCASD SCASW +syn keyword nasmStdInstruction SHL[D] SHR[D] STC STD STOSB STOSD STOSW SUB +syn keyword nasmStdInstruction TEST XADD XCHG XLATB XOR + + +" System Instructions: (usually privileged) +" Verification of pointer parameters +syn keyword nasmSysInstruction ARPL LAR LSL VERR VERW +" Addressing descriptor tables +syn keyword nasmSysInstruction LLDT SLDT LGDT SGDT +" Multitasking +syn keyword nasmSysInstruction LTR STR +" Coprocessing and Multiprocessing (requires fpu and multiple cpu's resp.) +syn keyword nasmSysInstruction CLTS LOCK WAIT +" Input and Output +syn keyword nasmInstructnError INS OUTS +syn keyword nasmSysInstruction IN INSB INSW INSD OUT OUTSB OUTSB OUTSW OUTSD +" Interrupt control +syn keyword nasmSysInstruction CLI STI LIDT SIDT +" System control +syn match nasmSysInstruction "\"me=s+3 +syn keyword nasmSysInstruction HLT INVD LMSW +syn keyword nasmSseInstruction PREFETCHT0 PREFETCHT1 PREFETCHT2 PREFETCHNTA +syn keyword nasmSseInstruction RSM SFENCE SMSW SYSENTER SYSEXIT UD2 WBINVD +" TLB (Translation Lookahead Buffer) testing +syn match nasmSysInstruction "\"me=s+3 +syn keyword nasmSysInstruction INVLPG + +" Debugging Instructions: (privileged) +syn match nasmDbgInstruction "\"me=s+3 +syn keyword nasmDbgInstruction INT1 INT3 RDMSR RDTSC RDPMC WRMSR + + +" Floating Point Instructions: (requires FPU) +syn match nasmFpuInstruction "\" +syn keyword nasmFpuInstruction F2XM1 FABS FADD[P] FBLD FBSTP +syn keyword nasmFpuInstruction FCHS FCLEX FCOM[IP] FCOMP[P] FCOS +syn keyword nasmFpuInstruction FDECSTP FDISI FDIV[P] FDIVR[P] FENI FFREE +syn keyword nasmFpuInstruction FIADD FICOM[P] FIDIV[R] FILD +syn keyword nasmFpuInstruction FIMUL FINCSTP FINIT FIST[P] FISUB[R] +syn keyword nasmFpuInstruction FLD[1] FLDCW FLDENV FLDL2E FLDL2T FLDLG2 +syn keyword nasmFpuInstruction FLDLN2 FLDPI FLDZ FMUL[P] +syn keyword nasmFpuInstruction FNCLEX FNDISI FNENI FNINIT FNOP FNSAVE +syn keyword nasmFpuInstruction FNSTCW FNSTENV FNSTSW FNSTSW +syn keyword nasmFpuInstruction FPATAN FPREM[1] FPTAN FRNDINT FRSTOR +syn keyword nasmFpuInstruction FSAVE FSCALE FSETPM FSIN FSINCOS FSQRT +syn keyword nasmFpuInstruction FSTCW FSTENV FST[P] FSTSW FSUB[P] FSUBR[P] +syn keyword nasmFpuInstruction FTST FUCOM[IP] FUCOMP[P] +syn keyword nasmFpuInstruction FXAM FXCH FXTRACT FYL2X FYL2XP1 + + +" Multi Media Xtension Packed Instructions: (requires MMX unit) +" Standard MMX instructions: (requires MMX1 unit) +syn match nasmInstructnError "\" +syn match nasmInstructnError "\" +syn keyword nasmMmxInstruction EMMS MOVD MOVQ +syn keyword nasmMmxInstruction PACKSSDW PACKSSWB PACKUSWB PADDB PADDD PADDW +syn keyword nasmMmxInstruction PADDSB PADDSW PADDUSB PADDUSW PAND[N] +syn keyword nasmMmxInstruction PCMPEQB PCMPEQD PCMPEQW PCMPGTB PCMPGTD PCMPGTW +syn keyword nasmMmxInstruction PMACHRIW PMADDWD PMULHW PMULLW POR +syn keyword nasmMmxInstruction PSLLD PSLLQ PSLLW PSRAD PSRAW PSRLD PSRLQ PSRLW +syn keyword nasmMmxInstruction PSUBB PSUBD PSUBW PSUBSB PSUBSW PSUBUSB PSUBUSW +syn keyword nasmMmxInstruction PUNPCKHBW PUNPCKHDQ PUNPCKHWD +syn keyword nasmMmxInstruction PUNPCKLBW PUNPCKLDQ PUNPCKLWD PXOR +" Extended MMX instructions: (requires MMX2/SSE unit) +syn keyword nasmMmxInstruction MASKMOVQ MOVNTQ +syn keyword nasmMmxInstruction PAVGB PAVGW PEXTRW PINSRW PMAXSW PMAXUB +syn keyword nasmMmxInstruction PMINSW PMINUB PMOVMSKB PMULHUW PSADBW PSHUFW + + +" Streaming SIMD Extension Packed Instructions: (requires SSE unit) +syn match nasmInstructnError "\" +syn match nasmSseInstruction "\" +syn keyword nasmSseInstruction ADDPS ADDSS ANDNPS ANDPS +syn keyword nasmSseInstruction COMISS CVTPI2PS CVTPS2PI +syn keyword nasmSseInstruction CVTSI2SS CVTSS2SI CVTTPS2PI CVTTSS2SI +syn keyword nasmSseInstruction DIVPS DIVSS FXRSTOR FXSAVE LDMXCSR +syn keyword nasmSseInstruction MAXPS MAXSS MINPS MINSS MOVAPS MOVHLPS MOVHPS +syn keyword nasmSseInstruction MOVLHPS MOVLPS MOVMSKPS MOVNTPS MOVSS MOVUPS +syn keyword nasmSseInstruction MULPS MULSS +syn keyword nasmSseInstruction ORPS RCPPS RCPSS RSQRTPS RSQRTSS +syn keyword nasmSseInstruction SHUFPS SQRTPS SQRTSS STMXCSR SUBPS SUBSS +syn keyword nasmSseInstruction UCOMISS UNPCKHPS UNPCKLPS XORPS + + +" Three Dimensional Now Packed Instructions: (requires 3DNow! unit) +syn keyword nasmNowInstruction FEMMS PAVGUSB PF2ID PFACC PFADD PFCMPEQ PFCMPGE +syn keyword nasmNowInstruction PFCMPGT PFMAX PFMIN PFMUL PFRCP PFRCPIT1 +syn keyword nasmNowInstruction PFRCPIT2 PFRSQIT1 PFRSQRT PFSUB[R] PI2FD +syn keyword nasmNowInstruction PMULHRWA PREFETCH[W] + + +" Vendor Specific Instructions: +" Cyrix instructions (requires Cyrix processor) +syn keyword nasmCrxInstruction PADDSIW PAVEB PDISTIB PMAGW PMULHRW[C] PMULHRIW +syn keyword nasmCrxInstruction PMVGEZB PMVLZB PMVNZB PMVZB PSUBSIW +syn keyword nasmCrxInstruction RDSHR RSDC RSLDT SMINT SMINTOLD SVDC SVLDT SVTS +syn keyword nasmCrxInstruction WRSHR +" AMD instructions (requires AMD processor) +syn keyword nasmAmdInstruction SYSCALL SYSRET + + +" Undocumented Instructions: +syn match nasmUndInstruction "\"me=s+3 +syn keyword nasmUndInstruction CMPXCHG486 IBTS ICEBP INT01 INT03 LOADALL +syn keyword nasmUndInstruction LOADALL286 LOADALL386 SALC SMI UD1 UMOV XBTS + + + +" Synchronize Syntax: +syn sync clear +syn sync minlines=50 "for multiple region nesting +syn sync match nasmSync grouphere nasmMacroDef "^\s*%i\=macro\>"me=s-1 +syn sync match nasmSync grouphere NONE "^\s*%endmacro\>" + + +" 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_nasm_syntax_inits") + if version < 508 + let did_nasm_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " Sub Links: + HiLink nasmInMacDirective nasmDirective + HiLink nasmInMacLabel nasmLocalLabel + HiLink nasmInMacLblWarn nasmLabelWarn + HiLink nasmInMacMacro nasmMacro + HiLink nasmInMacParam nasmMacro + HiLink nasmInMacParamNum nasmDecNumber + HiLink nasmInMacPreCondit nasmPreCondit + HiLink nasmInMacPreProc nasmPreProc + HiLink nasmInPreCondit nasmPreCondit + HiLink nasmInStructure nasmStructure + HiLink nasmStructureLabel nasmStructure + + " Comment Group: + HiLink nasmComment Comment + HiLink nasmSpecialComment SpecialComment + HiLink nasmInCommentTodo Todo + + " Constant Group: + HiLink nasmString String + HiLink nasmStringError Error + HiLink nasmBinNumber Number + HiLink nasmOctNumber Number + HiLink nasmDecNumber Number + HiLink nasmHexNumber Number + HiLink nasmFltNumber Float + HiLink nasmNumberError Error + + " Identifier Group: + HiLink nasmLabel Identifier + HiLink nasmLocalLabel Identifier + HiLink nasmSpecialLabel Special + HiLink nasmLabelError Error + HiLink nasmLabelWarn Todo + + " PreProc Group: + HiLink nasmPreProc PreProc + HiLink nasmDefine Define + HiLink nasmInclude Include + HiLink nasmMacro Macro + HiLink nasmPreCondit PreCondit + HiLink nasmPreProcError Error + HiLink nasmPreProcWarn Todo + + " Type Group: + HiLink nasmType Type + HiLink nasmStorage StorageClass + HiLink nasmStructure Structure + HiLink nasmTypeError Error + + " Directive Group: + HiLink nasmConstant Constant + HiLink nasmInstrModifier Operator + HiLink nasmRepeat Repeat + HiLink nasmDirective Keyword + HiLink nasmStdDirective Operator + HiLink nasmFmtDirective Keyword + + " Register Group: + HiLink nasmCtrlRegister Special + HiLink nasmDebugRegister Debug + HiLink nasmTestRegister Special + HiLink nasmRegisterError Error + HiLink nasmMemRefError Error + + " Instruction Group: + HiLink nasmStdInstruction Statement + HiLink nasmSysInstruction Statement + HiLink nasmDbgInstruction Debug + HiLink nasmFpuInstruction Statement + HiLink nasmMmxInstruction Statement + HiLink nasmSseInstruction Statement + HiLink nasmNowInstruction Statement + HiLink nasmAmdInstruction Special + HiLink nasmCrxInstruction Special + HiLink nasmUndInstruction Todo + HiLink nasmInstructnError Error + + delcommand HiLink +endif + +let b:current_syntax = "nasm" + +" vim:ts=8 sw=4 diff --git a/vim/bundle/ubuntu-vim72/syntax/nastran.vim b/vim/bundle/ubuntu-vim72/syntax/nastran.vim new file mode 100644 index 0000000..f792769 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/nastran.vim @@ -0,0 +1,193 @@ +" Vim syntax file +" Language: NASTRAN input/DMAP +" Maintainer: Tom Kowalski +" Last change: April 27, 2001 +" Thanks to the authors and maintainers of fortran.vim. +" Since DMAP shares some traits with fortran, this syntax file +" is based on the fortran.vim syntax file. +"---------------------------------------------------------------------- +" Remove any old syntax stuff hanging around +"syn clear +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif +" DMAP is not case dependent +syn case ignore +" +"--------------------DMAP SYNTAX--------------------------------------- +" +" -------Executive Modules and Statements +" +syn keyword nastranDmapexecmod call dbview delete end equiv equivx exit +syn keyword nastranDmapexecmod file message purge purgex return subdmap +syn keyword nastranDmapType type +syn keyword nastranDmapLabel go to goto +syn keyword nastranDmapRepeat if else elseif endif then +syn keyword nastranDmapRepeat do while +syn region nastranDmapString start=+"+ end=+"+ oneline +syn region nastranDmapString start=+'+ end=+'+ oneline +" If you don't like initial tabs in dmap (or at all) +"syn match nastranDmapIniTab "^\t.*$" +"syn match nastranDmapTab "\t" + +" Any integer +syn match nastranDmapNumber "-\=\<[0-9]\+\>" +" floating point number, with dot, optional exponent +syn match nastranDmapFloat "\<[0-9]\+\.[0-9]*\([edED][-+]\=[0-9]\+\)\=\>" +" floating point number, starting with a dot, optional exponent +syn match nastranDmapFloat "\.[0-9]\+\([edED][-+]\=[0-9]\+\)\=\>" +" floating point number, without dot, with exponent +syn match nastranDmapFloat "\<[0-9]\+[edED][-+]\=[0-9]\+\>" + +syn match nastranDmapLogical "\(true\|false\)" + +syn match nastranDmapPreCondit "^#define\>" +syn match nastranDmapPreCondit "^#include\>" +" +" -------Comments may be contained in another line. +" +syn match nastranDmapComment "^[\$].*$" +syn match nastranDmapComment "\$.*$" +syn match nastranDmapComment "^[\$].*$" contained +syn match nastranDmapComment "\$.*$" contained +" Treat all past 72nd column as a comment. Do not work with tabs! +" Breaks down when 72-73rd column is in another match (eg number or keyword) +syn match nastranDmapComment "^.\{-72}.*$"lc=72 contained + +" +" -------Utility Modules +" +syn keyword nastranDmapUtilmod append copy dbc dbdict dbdir dmin drms1 +syn keyword nastranDmapUtilmod dtiin eltprt ifp ifp1 inputt2 inputt4 lamx +syn keyword nastranDmapUtilmod matgen matgpr matmod matpch matprn matprt +syn keyword nastranDmapUtilmod modtrl mtrxin ofp output2 output4 param +syn keyword nastranDmapUtilmod paraml paramr prtparam pvt scalar +syn keyword nastranDmapUtilmod seqp setval tabedit tabprt tabpt vec vecplot +syn keyword nastranDmapUtilmod xsort +" +" -------Matrix Modules +" +syn keyword nastranDmapMatmod add add5 cead dcmp decomp diagonal fbs merge +syn keyword nastranDmapMatmod mpyad norm read reigl smpyad solve solvit +syn keyword nastranDmapMatmod trnsp umerge umerge1 upartn dmiin partn +syn region nastranDmapMatmod start=+^ *[Dd][Mm][Ii]+ end=+[\/]+ +" +" -------Implicit Functions +" +syn keyword nastranDmapImplicit abs acos acosh andl asin asinh atan atan2 +syn keyword nastranDmapImplicit atanh atanh2 char clen clock cmplx concat1 +syn keyword nastranDmapImplicit concat2 concat3 conjg cos cosh dble diagoff +syn keyword nastranDmapImplicit diagon dim dlablank dlxblank dprod eqvl exp +syn keyword nastranDmapImplicit getdiag getsys ichar imag impl index indexstr +syn keyword nastranDmapImplicit int itol leq lge lgt lle llt lne log log10 +syn keyword nastranDmapImplicit logx ltoi mcgetsys mcputsys max min mod neqvl +syn keyword nastranDmapImplicit nint noop normal notl numeq numge numgt numle +syn keyword nastranDmapImplicit numlt numne orl pi precison putdiag putsys +syn keyword nastranDmapImplicit rand rdiagon real rtimtogo setcore sign sin +syn keyword nastranDmapImplicit sinh sngl sprod sqrt substrin tan tanh +syn keyword nastranDmapImplicit timetogo wlen xorl +" +" +"--------------------INPUT FILE SYNTAX--------------------------------------- +" +" +" -------Nastran Statement +" +syn keyword nastranNastranCard nastran +" +" -------The File Management Section (FMS) +" +syn region nastranFMSCard start=+^ *[Aa][Cc][Qq][Uu][Ii]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Aa][Ss][Ss][Ii][Gg]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Cc][oO][Nn][Nn][Ee]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Dd][Bb][Cc][Ll][Ee]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Dd][Bb][Dd][Ii][Cc]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Dd][Bb][Dd][Ii][Rr]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Dd][Bb][Ff][Ii][Xx]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Dd][Bb][Ll][Oo][Aa]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Dd][Bb][Ll][Oo][Cc]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Dd][Bb][Ss][Ee][Tt]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Dd][Bb][Uu][Nn][Ll]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Dd][Bb][Uu][Pp][Dd]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Dd][Ee][Ff][Ii][Nn]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Ee][Nn][Dd][Jj][Oo]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Ee][Xx][Pp][Aa][Nn]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Ii][Nn][Cc][Ll][Uu]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Ii][Nn][Ii][Tt]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Pp][Rr][Oo][Jj]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Rr][Ee][Ss][Tt]+ end=+$+ oneline +syn match nastranDmapUtilmod "^ *[Rr][Ee][Ss][Tt][Aa].*,.*," contains=nastranDmapComment +" +" -------Executive Control Section +" +syn region nastranECSCard start=+^ *[Aa][Ll][Tt][Ee][Rr]+ end=+$+ oneline +syn region nastranECSCard start=+^ *[Aa][Pp][Pp]+ end=+$+ oneline +syn region nastranECSCard start=+^ *[Cc][Oo][Mm][Pp][Ii]+ end=+$+ oneline +syn region nastranECSCard start=+^ *[Dd][Ii][Aa][Gg] + end=+$+ oneline +syn region nastranECSCard start=+^ *[Ee][Cc][Hh][Oo]+ end=+$+ oneline +syn region nastranECSCard start=+^ *[Ee][Nn][Dd][Aa][Ll]+ end=+$+ oneline +syn region nastranECSCard start=+^ *[Ii][Dd]+ end=+$+ oneline +syn region nastranECSCard start=+^ *[Ii][Nn][Cc][Ll][Uu]+ end=+$+ oneline +syn region nastranECSCard start=+^ *[Ll][Ii][Nn][Kk]+ end=+$+ oneline +syn region nastranECSCard start=+^ *[Mm][Aa][Ll][Tt][Ee]+ end=+$+ oneline +syn region nastranECSCard start=+^ *[Ss][Oo][Ll] + end=+$+ oneline +syn region nastranECSCard start=+^ *[Tt][Ii][Mm][Ee]+ end=+$+ oneline +" +" -------Delimiters +" +syn match nastranDelimiter "[Cc][Ee][Nn][Dd]" contained +syn match nastranDelimiter "[Bb][Ee][Gg][Ii][Nn]" contained +syn match nastranDelimiter " *[Bb][Uu][Ll][Kk]" contained +syn match nastranDelimiter "[Ee][Nn][Dd] *[dD][Aa][Tt][Aa]" contained +" +" -------Case Control section +" +syn region nastranCC start=+^ *[Cc][Ee][Nn][Dd]+ end=+^ *[Bb][Ee][Gg][Ii][Nn]+ contains=nastranDelimiter,nastranBulkData,nastranDmapComment + +" +" -------Bulk Data section +" +syn region nastranBulkData start=+ *[Bb][Uu][Ll][Kk] *$+ end=+^ [Ee][Nn][Dd] *[Dd]+ contains=nastranDelimiter,nastranDmapComment +" +" -------The following cards may appear in multiple sections of the file +" +syn keyword nastranUtilCard ECHOON ECHOOFF INCLUDE PARAM + + +if version >= 508 || !exists("did_nastran_syntax_inits") + if version < 508 + let did_nastran_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi link + endif + " The default methods for highlighting. Can be overridden later + HiLink nastranDmapexecmod Statement + HiLink nastranDmapType Type + HiLink nastranDmapPreCondit Error + HiLink nastranDmapUtilmod PreProc + HiLink nastranDmapMatmod nastranDmapUtilmod + HiLink nastranDmapString String + HiLink nastranDmapNumber Constant + HiLink nastranDmapFloat nastranDmapNumber + HiLink nastranDmapInitTab nastranDmapNumber + HiLink nastranDmapTab nastranDmapNumber + HiLink nastranDmapLogical nastranDmapExecmod + HiLink nastranDmapImplicit Identifier + HiLink nastranDmapComment Comment + HiLink nastranDmapRepeat nastranDmapexecmod + HiLink nastranNastranCard nastranDmapPreCondit + HiLink nastranECSCard nastranDmapUtilmod + HiLink nastranFMSCard nastranNastranCard + HiLink nastranCC nastranDmapexecmod + HiLink nastranDelimiter Special + HiLink nastranBulkData nastranDmapType + HiLink nastranUtilCard nastranDmapexecmod + delcommand HiLink +endif + +let b:current_syntax = "nastran" + +"EOF vim: ts=8 noet tw=120 sw=8 sts=0 diff --git a/vim/bundle/ubuntu-vim72/syntax/natural.vim b/vim/bundle/ubuntu-vim72/syntax/natural.vim new file mode 100644 index 0000000..2628151 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/natural.vim @@ -0,0 +1,209 @@ +" Vim syntax file +" +" Language: NATURAL +" Version: 2.1.0.3 +" Maintainer: Marko von Oppen +" Last Changed: 2008-07-29 01:40:52 +" Support: http://www.von-oppen.com/ + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when this syntax file was already loaded +if v:version < 600 + syntax clear + set iskeyword+=-,*,#,+,_,/ +elseif exists("b:current_syntax") + finish +else + setlocal iskeyword+=-,*,#,+,_,/ +endif + +" NATURAL is case insensitive +syntax case ignore + +" preprocessor +syn keyword naturalInclude include nextgroup=naturalObjName skipwhite + +" define data +syn keyword naturalKeyword define data end-define +syn keyword naturalKeyword independent global parameter local redefine view +syn keyword naturalKeyword const[ant] init initial + +" loops +syn keyword naturalLoop read end-read end-work find end-find histogram end-histogram +syn keyword naturalLoop end-all sort end-sort sorted descending ascending +syn keyword naturalRepeat repeat end-repeat while until for step end-for +syn keyword naturalKeyword in file with field starting from ending at thru by isn where +syn keyword naturalError on error end-error +syn keyword naturalKeyword accept reject end-enddata number unique retain as release +syn keyword naturalKeyword start end-start break end-break physical page top sequence +syn keyword naturalKeyword end-toppage end-endpage end-endfile before processing +syn keyword naturalKeyword end-before + +" conditionals +syn keyword naturalConditional if then else end-if end-norec +syn keyword naturalConditional decide end-decide value when condition none any + +" assignment / calculation +syn keyword naturalKeyword reset assign move left right justified compress to into edited +syn keyword naturalKeyword add subtract multiply divide compute name +syn keyword naturalKeyword all giving remainder rounded leaving space numeric +syn keyword naturalKeyword examine full replace giving separate delimiter modified +syn keyword naturalKeyword suspend identical suppress + +" program flow +syn keyword naturalFlow callnat fetch return enter escape bottom top stack formatted +syn keyword naturalFlow command call +syn keyword naturalflow end-subroutine routine + +" file operations +syn keyword naturalKeyword update store get delete end transaction work once close + +" other keywords +syn keyword naturalKeyword first every of no record[s] found ignore immediate +syn keyword naturalKeyword set settime key control stop terminate + +" in-/output +syn keyword naturalKeyword write display input reinput notitle nohdr map newpage +syn keyword naturalKeyword alarm text help eject index window base size +syn keyword naturalKeyword format printer skip lines + +" functions +syn keyword naturalKeyword abs atn cos exp frac int log sgn sin sqrt tan val old +syn keyword naturalKeyword pos + +" report mode keywords +syn keyword naturalRMKeyword same loop obtain indexed do doend + +" Subroutine name +syn keyword naturalFlow perform subroutine nextgroup=naturalFunction skipwhite +syn match naturalFunction "\<[a-z][-_a-z0-9]*\>" + +syn keyword naturalFlow using nextgroup=naturalKeyword,naturalObjName skipwhite +syn match naturalObjName "\<[a-z][-_a-z0-9]\{,7}\>" + +" Labels +syn match naturalLabel "\<[+#a-z][-_#a-z0-9]*\." +syn match naturalRef "\<[+#a-z][-_#a-z0-9]*\>\.\<[+#a-z][*]\=[-_#a-z0-9]*\>" + +" mark keyword special handling +syn keyword naturalKeyword mark nextgroup=naturalMark skipwhite +syn match naturalMark "\<\*[a-z][-_#.a-z0-9]*\>" + +" System variables +syn match naturalSysVar "\<\*[a-z][-a-z0-9]*\>" + +"integer number, or floating point number without a dot. +syn match naturalNumber "\<-\=\d\+\>" +"floating point number, with dot +syn match naturalNumber "\<-\=\d\+\.\d\+\>" +"floating point number, starting with a dot +syn match naturalNumber "\.\d\+" + +" Formats in write statement +syn match naturalFormat "\<\d\+[TX]\>" + +" String and Character contstants +syn match naturalString "H'\x\+'" +syn region naturalString start=+"+ end=+"+ +syn region naturalString start=+'+ end=+'+ + +" Type definition +syn match naturalAttribute "\<[-a-z][a-z]=[-a-z0-9_\.,]\+\>" +syn match naturalType contained "\<[ABINP]\d\+\(,\d\+\)\=\>" +syn match naturalType contained "\<[CL]\>" + +" "TODO" / other comments +syn keyword naturalTodo contained todo test +syn match naturalCommentMark contained "[a-z][^ \t/:|]*\(\s[^ \t/:'"|]\+\)*:\s"he=e-1 + +" comments +syn region naturalComment start="/\*" end="$" contains=naturalTodo,naturalLineRef,naturalCommentMark +syn region naturalComment start="^\*[ *]" end="$" contains=naturalTodo,naturalLineRef,naturalCommentMark +syn region naturalComment start="^\d\{4} \*[\ \*]"lc=5 end="$" contains=naturalTodo,naturalLineRef,naturalCommentMark +syn match naturalComment "^\*$" +syn match naturalComment "^\d\{4} \*$"lc=5 +" /* is legal syntax in parentheses e.g. "#ident(label./*)" +syn region naturalPComment contained start="/\*\s*[^),]" end="$" contains=naturalTodo,naturalLineRef,naturalCommentMark + +" operators +syn keyword naturalOperator and or not eq ne gt lt ge le mask scan modified + +" constants +syn keyword naturalBoolean true false +syn match naturalLineNo "^\d\{4}" + +" identifiers +syn match naturalIdent "\<[+#a-z][-_#a-z0-9]*\>[^\.']"me=e-1 +syn match naturalIdent "\<[+#a-z][-_#a-z0-9]*$" +syn match naturalLegalIdent "[+#a-z][-_#a-z0-9]*/[-_#a-z0-9]*" + +" parentheses +syn region naturalPar matchgroup=naturalParGui start="(" end=")" contains=naturalLabel,naturalRef,naturalOperator,@naturalConstant,naturalType,naturalSysVar,naturalPar,naturalLineNo,naturalPComment +syn match naturalLineRef "(\d\{4})" + +" build syntax groups +syntax cluster naturalConstant contains=naturalString,naturalNumber,naturalAttribute,naturalBoolean + +" folding +if v:version >= 600 + set foldignore=* +endif + + +if v:version >= 508 || !exists("did_natural_syntax_inits") + if v:version < 508 + let did_natural_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + " The default methods for highlighting. Can be overridden later + + " Constants + HiLink naturalFormat Constant + HiLink naturalAttribute Constant + HiLink naturalNumber Number + HiLink naturalString String + HiLink naturalBoolean Boolean + + " All kinds of keywords + HiLink naturalConditional Conditional + HiLink naturalRepeat Repeat + HiLink naturalLoop Repeat + HiLink naturalFlow Keyword + HiLink naturalError Keyword + HiLink naturalKeyword Keyword + HiLink naturalOperator Operator + HiLink naturalParGui Operator + + " Labels + HiLink naturalLabel Label + HiLink naturalRefLabel Label + + " Comments + HiLink naturalPComment Comment + HiLink naturalComment Comment + HiLink naturalTodo Todo + HiLink naturalCommentMark PreProc + + HiLink naturalInclude Include + HiLink naturalSysVar Identifier + HiLink naturalLineNo LineNr + HiLink naturalLineRef Error + HiLink naturalSpecial Special + HiLink naturalComKey Todo + + " illegal things + HiLink naturalRMKeyword Error + HiLink naturalLegalIdent Error + + HiLink naturalType Type + HiLink naturalFunction Function + HiLink naturalObjName PreProc + + delcommand HiLink +endif + +let b:current_syntax = "natural" + +" vim:set ts=8 sw=8 noet ft=vim: diff --git a/vim/bundle/ubuntu-vim72/syntax/ncf.vim b/vim/bundle/ubuntu-vim72/syntax/ncf.vim new file mode 100644 index 0000000..2019c03 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/ncf.vim @@ -0,0 +1,258 @@ +" Vim syntax file +" Language: Novell "NCF" Batch File +" Maintainer: Jonathan J. Miner +" Last Change: Tue, 04 Sep 2001 16:20:33 CDT +" $Id: ncf.vim,v 1.1 2004/06/13 16:31:58 vimboss Exp $ + +" Remove any old syntax stuff hanging around +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +syn keyword ncfCommands mount load unload +syn keyword ncfBoolean on off +syn keyword ncfCommands set nextgroup=ncfSetCommands +syn keyword ncfTimeTypes Reference Primary Secondary Single +syn match ncfLoad "\(unl\|l\)oad .*"lc=4 contains=ALLBUT,Error +syn match ncfMount "mount .*"lc=5 contains=ALLBUT,Error + +syn match ncfComment "^\ *rem.*$" +syn match ncfComment "^\ *;.*$" +syn match ncfComment "^\ *#.*$" + +syn match ncfSearchPath "search \(add\|del\) " nextgroup=ncfPath +syn match ncfPath "\<[^: ]\+:\([A-Za-z0-9._]\|\\\)*\>" +syn match ncfServerName "^file server name .*$" +syn match ncfIPXNet "^ipx internal net" + +" String +syn region ncfString start=+"+ end=+"+ +syn match ncfContString "= \(\(\.\{0,1}\(OU=\|O=\)\{0,1}[A-Z_]\+\)\+;\{0,1}\)\+"lc=2 + +syn match ncfHexNumber "\<\d\(\d\+\|[A-F]\+\)*\>" +syn match ncfNumber "\<\d\+\.\{0,1}\d*\>" +syn match ncfIPAddr "\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}" +syn match ncfTime "\(+|=\)\{0,1}\d\{1,2}:\d\{1,2}:\d\{1,2}" +syn match ncfDSTTime "([^ ]\+ [^ ]\+ \(FIRST\|LAST\)\s*\d\{1,2}:\d\{1,2}:\d\{1,2} \(AM\|PM\))" +syn match ncfTimeZone "[A-Z]\{3}\d[A-Z]\{3}" + +syn match ncfLogins "^\([Dd]is\|[Ee]n\)able login[s]*" +syn match ncfScript "[^ ]*\.ncf" + +" SET Commands that take a Number following +syn match ncfSetCommandsNum "\(Alert Message Nodes\)\s*=" +syn match ncfSetCommandsNum "\(Auto Restart After Abend\)\s*=" +syn match ncfSetCommandsNum "\(Auto Restart After Abend Delay Time\)\s*=" +syn match ncfSetCommandsNum "\(Compression Daily Check Starting Hour\)\s*=" +syn match ncfSetCommandsNum "\(Compression Daily Check Stop Hour\)\s*=" +syn match ncfSetCommandsNum "\(Concurrent Remirror Requests\)\s*=" +syn match ncfSetCommandsNum "\(Convert Compressed to Uncompressed Option\)\s*=" +syn match ncfSetCommandsNum "\(Days Untouched Before Compression\)\s*=" +syn match ncfSetCommandsNum "\(Decompress Free Space Warning Interval\)\s*=" +syn match ncfSetCommandsNum "\(Decompress Percent Disk Space Free to Allow Commit\)\s*=" +syn match ncfSetCommandsNum "\(Deleted Files Compression Option\)\s*=" +syn match ncfSetCommandsNum "\(Directory Cache Allocation Wait Time\)\s*=" +syn match ncfSetCommandsNum "\(Enable IPX Checksums\)\s*=" +syn match ncfSetCommandsNum "\(Garbage Collection Interval\)\s*=" +syn match ncfSetCommandsNum "\(IPX NetBIOS Replication Option\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Concurrent Compressions\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Concurrent Directory Cache Writes\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Concurrent Disk Cache Writes\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Directory Cache Buffers\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Extended Attributes per File or Path\)\s*=" +syn match ncfSetCommandsNum "\(Maximum File Locks\)\s*=" +syn match ncfSetCommandsNum "\(Maximum File Locks Per Connection\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Interrupt Events\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Number of Directory Handles\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Number of Internal Directory Handles\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Outstanding NCP Searches\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Packet Receive Buffers\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Physical Receive Packet Size\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Record Locks\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Record Locks Per Connection\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Service Processes\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Subdirectory Tree Depth\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Transactions\)\s*=" +syn match ncfSetCommandsNum "\(Minimum Compression Percentage Gain\)\s*=" +syn match ncfSetCommandsNum "\(Minimum Directory Cache Buffers\)\s*=" +syn match ncfSetCommandsNum "\(Minimum File Cache Buffers\)\s*=" +syn match ncfSetCommandsNum "\(Minimum File Cache Report Threshold\)\s*=" +syn match ncfSetCommandsNum "\(Minimum Free Memory for Garbage Collection\)\s*=" +syn match ncfSetCommandsNum "\(Minimum Packet Receive Buffers\)\s*=" +syn match ncfSetCommandsNum "\(Minimum Service Processes\)\s*=" +syn match ncfSetCommandsNum "\(NCP Packet Signature Option\)\s*=" +syn match ncfSetCommandsNum "\(NDS Backlink Interval\)\s*=" +syn match ncfSetCommandsNum "\(NDS Client NCP Retries\)\s*=" +syn match ncfSetCommandsNum "\(NDS External Reference Life Span\)\s*=" +syn match ncfSetCommandsNum "\(NDS Inactivity Synchronization Interval\)\s*=" +syn match ncfSetCommandsNum "\(NDS Janitor Interval\)\s*=" +syn match ncfSetCommandsNum "\(New Service Process Wait Time\)\s*=" +syn match ncfSetCommandsNum "\(Number of Frees for Garbage Collection\)\s*=" +syn match ncfSetCommandsNum "\(Number of Watchdog Packets\)\s*=" +syn match ncfSetCommandsNum "\(Pseudo Preemption Count\)\s*=" +syn match ncfSetCommandsNum "\(Read Ahead LRU Sitting Time Threshold\)\s*=" +syn match ncfSetCommandsNum "\(Remirror Block Size\)\s*=" +syn match ncfSetCommandsNum "\(Reserved Buffers Below 16 Meg\)\s*=" +syn match ncfSetCommandsNum "\(Server Log File Overflow Size\)\s*=" +syn match ncfSetCommandsNum "\(Server Log File State\)\s*=" +syn match ncfSetCommandsNum "\(SMP Polling Count\)\s*=" +syn match ncfSetCommandsNum "\(SMP Stack Size\)\s*=" +syn match ncfSetCommandsNum "\(TIMESYNC Polling Count\)\s*=" +syn match ncfSetCommandsNum "\(TIMESYNC Polling Interval\)\s*=" +syn match ncfSetCommandsNum "\(TIMESYNC Synchronization Radius\)\s*=" +syn match ncfSetCommandsNum "\(TIMESYNC Write Value\)\s*=" +syn match ncfSetCommandsNum "\(Volume Log File Overflow Size\)\s*=" +syn match ncfSetCommandsNum "\(Volume Log File State\)\s*=" +syn match ncfSetCommandsNum "\(Volume Low Warning Reset Threshold\)\s*=" +syn match ncfSetCommandsNum "\(Volume Low Warning Threshold\)\s*=" +syn match ncfSetCommandsNum "\(Volume TTS Log File Overflow Size\)\s*=" +syn match ncfSetCommandsNum "\(Volume TTS Log File State\)\s*=" +syn match ncfSetCommandsNum "\(Worker Thread Execute In a Row Count\)\s*=" + +" SET Commands that take a Boolean (ON/OFF) + +syn match ncfSetCommandsBool "\(Alloc Memory Check Flag\)\s*=" +syn match ncfSetCommandsBool "\(Allow Audit Passwords\)\s*=" +syn match ncfSetCommandsBool "\(Allow Change to Client Rights\)\s*=" +syn match ncfSetCommandsBool "\(Allow Deletion of Active Directories\)\s*=" +syn match ncfSetCommandsBool "\(Allow Invalid Pointers\)\s*=" +syn match ncfSetCommandsBool "\(Allow LIP\)\s*=" +syn match ncfSetCommandsBool "\(Allow Unencrypted Passwords\)\s*=" +syn match ncfSetCommandsBool "\(Allow Unowned Files To Be Extended\)\s*=" +syn match ncfSetCommandsBool "\(Auto Register Memory Above 16 Megabytes\)\s*=" +syn match ncfSetCommandsBool "\(Auto TTS Backout Flag\)\s*=" +syn match ncfSetCommandsBool "\(Automatically Repair Bad Volumes\)\s*=" +syn match ncfSetCommandsBool "\(Check Equivalent to Me\)\s*=" +syn match ncfSetCommandsBool "\(Command Line Prompt Default Choice\)\s*=" +syn match ncfSetCommandsBool "\(Console Display Watchdog Logouts\)\s*=" +syn match ncfSetCommandsBool "\(Daylight Savings Time Status\)\s*=" +syn match ncfSetCommandsBool "\(Developer Option\)\s*=" +syn match ncfSetCommandsBool "\(Display Incomplete IPX Packet Alerts\)\s*=" +syn match ncfSetCommandsBool "\(Display Lost Interrupt Alerts\)\s*=" +syn match ncfSetCommandsBool "\(Display NCP Bad Component Warnings\)\s*=" +syn match ncfSetCommandsBool "\(Display NCP Bad Length Warnings\)\s*=" +syn match ncfSetCommandsBool "\(Display Old API Names\)\s*=" +syn match ncfSetCommandsBool "\(Display Relinquish Control Alerts\)\s*=" +syn match ncfSetCommandsBool "\(Display Spurious Interrupt Alerts\)\s*=" +syn match ncfSetCommandsBool "\(Enable Deadlock Detection\)\s*=" +syn match ncfSetCommandsBool "\(Enable Disk Read After Write Verify\)\s*=" +syn match ncfSetCommandsBool "\(Enable File Compression\)\s*=" +syn match ncfSetCommandsBool "\(Enable IO Handicap Attribute\)\s*=" +syn match ncfSetCommandsBool "\(Enable SECURE.NCF\)\s*=" +syn match ncfSetCommandsBool "\(Fast Volume Mounts\)\s*=" +syn match ncfSetCommandsBool "\(Global Pseudo Preemption\)\s*=" +syn match ncfSetCommandsBool "\(Halt System on Invalid Parameters\)\s*=" +syn match ncfSetCommandsBool "\(Ignore Disk Geometry\)\s*=" +syn match ncfSetCommandsBool "\(Immediate Purge of Deleted Files\)\s*=" +syn match ncfSetCommandsBool "\(NCP File Commit\)\s*=" +syn match ncfSetCommandsBool "\(NDS Trace File Length to Zero\)\s*=" +syn match ncfSetCommandsBool "\(NDS Trace to File\)\s*=" +syn match ncfSetCommandsBool "\(NDS Trace to Screen\)\s*=" +syn match ncfSetCommandsBool "\(New Time With Daylight Savings Time Status\)\s*=" +syn match ncfSetCommandsBool "\(Read Ahead Enabled\)\s*=" +syn match ncfSetCommandsBool "\(Read Fault Emulation\)\s*=" +syn match ncfSetCommandsBool "\(Read Fault Notification\)\s*=" +syn match ncfSetCommandsBool "\(Reject NCP Packets with Bad Components\)\s*=" +syn match ncfSetCommandsBool "\(Reject NCP Packets with Bad Lengths\)\s*=" +syn match ncfSetCommandsBool "\(Replace Console Prompt with Server Name\)\s*=" +syn match ncfSetCommandsBool "\(Reply to Get Nearest Server\)\s*=" +syn match ncfSetCommandsBool "\(SMP Developer Option\)\s*=" +syn match ncfSetCommandsBool "\(SMP Flush Processor Cache\)\s*=" +syn match ncfSetCommandsBool "\(SMP Intrusive Abend Mode\)\s*=" +syn match ncfSetCommandsBool "\(SMP Memory Protection\)\s*=" +syn match ncfSetCommandsBool "\(Sound Bell for Alerts\)\s*=" +syn match ncfSetCommandsBool "\(TIMESYNC Configured Sources\)\s*=" +syn match ncfSetCommandsBool "\(TIMESYNC Directory Tree Mode\)\s*=" +syn match ncfSetCommandsBool "\(TIMESYNC Hardware Clock\)\s*=" +syn match ncfSetCommandsBool "\(TIMESYNC RESET\)\s*=" +syn match ncfSetCommandsBool "\(TIMESYNC Restart Flag\)\s*=" +syn match ncfSetCommandsBool "\(TIMESYNC Service Advertising\)\s*=" +syn match ncfSetCommandsBool "\(TIMESYNC Write Parameters\)\s*=" +syn match ncfSetCommandsBool "\(TTS Abort Dump Flag\)\s*=" +syn match ncfSetCommandsBool "\(Upgrade Low Priority Threads\)\s*=" +syn match ncfSetCommandsBool "\(Volume Low Warn All Users\)\s*=" +syn match ncfSetCommandsBool "\(Write Fault Emulation\)\s*=" +syn match ncfSetCommandsBool "\(Write Fault Notification\)\s*=" + +" Set Commands that take a "string" -- NOT QUOTED + +syn match ncfSetCommandsStr "\(Default Time Server Type\)\s*=" +syn match ncfSetCommandsStr "\(SMP NetWare Kernel Mode\)\s*=" +syn match ncfSetCommandsStr "\(Time Zone\)\s*=" +syn match ncfSetCommandsStr "\(TIMESYNC ADD Time Source\)\s*=" +syn match ncfSetCommandsStr "\(TIMESYNC REMOVE Time Source\)\s*=" +syn match ncfSetCommandsStr "\(TIMESYNC Time Source\)\s*=" +syn match ncfSetCommandsStr "\(TIMESYNC Type\)\s*=" + +" SET Commands that take a "Time" + +syn match ncfSetCommandsTime "\(Command Line Prompt Time Out\)\s*=" +syn match ncfSetCommandsTime "\(Delay Before First Watchdog Packet\)\s*=" +syn match ncfSetCommandsTime "\(Delay Between Watchdog Packets\)\s*=" +syn match ncfSetCommandsTime "\(Directory Cache Buffer NonReferenced Delay\)\s*=" +syn match ncfSetCommandsTime "\(Dirty Directory Cache Delay Time\)\s*=" +syn match ncfSetCommandsTime "\(Dirty Disk Cache Delay Time\)\s*=" +syn match ncfSetCommandsTime "\(File Delete Wait Time\)\s*=" +syn match ncfSetCommandsTime "\(Minimum File Delete Wait Time\)\s*=" +syn match ncfSetCommandsTime "\(Mirrored Devices Are Out of Sync Message Frequency\)\s*=" +syn match ncfSetCommandsTime "\(New Packet Receive Buffer Wait Time\)\s*=" +syn match ncfSetCommandsTime "\(TTS Backout File Truncation Wait Time\)\s*=" +syn match ncfSetCommandsTime "\(TTS UnWritten Cache Wait Time\)\s*=" +syn match ncfSetCommandsTime "\(Turbo FAT Re-Use Wait Time\)\s*=" +syn match ncfSetCommandsTime "\(Daylight Savings Time Offset\)\s*=" + +syn match ncfSetCommandsTimeDate "\(End of Daylight Savings Time\)\s*=" +syn match ncfSetCommandsTimeDate "\(Start of Daylight Savings Time\)\s*=" + +syn match ncfSetCommandsBindCon "\(Bindery Context\)\s*=" nextgroup=ncfContString + +syn cluster ncfSetCommands contains=ncfSetCommandsNum,ncfSetCommandsBool,ncfSetCommandsStr,ncfSetCommandsTime,ncfSetCommandsTimeDate,ncfSetCommandsBindCon + + +if exists("ncf_highlight_unknowns") + syn match Error "[^ \t]*" contains=ALL +endif + +if version >= 508 || !exists("did_ncf_syntax_inits") + if version < 508 + let did_ncf_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " The default methods for highlighting. Can be overridden later + HiLink ncfCommands Statement + HiLink ncfSetCommands ncfCommands + HiLink ncfLogins ncfCommands + HiLink ncfString String + HiLink ncfContString ncfString + HiLink ncfComment Comment + HiLink ncfImplicit Type + HiLink ncfBoolean Boolean + HiLink ncfScript Identifier + HiLink ncfNumber Number + HiLink ncfIPAddr ncfNumber + HiLink ncfHexNumber ncfNumber + HiLink ncfTime ncfNumber + HiLink ncfDSTTime ncfNumber + HiLink ncfPath Constant + HiLink ncfServerName Special + HiLink ncfIPXNet ncfServerName + HiLink ncfTimeTypes Constant + HiLink ncfSetCommandsNum ncfSetCommands + HiLink ncfSetCommandsBool ncfSetCommands + HiLink ncfSetCommandsStr ncfSetCommands + HiLink ncfSetCommandsTime ncfSetCommands + HiLink ncfSetCommandsTimeDate ncfSetCommands + HiLink ncfSetCommandsBindCon ncfSetCommands + + delcommand HiLink + +endif + +let b:current_syntax = "ncf" diff --git a/vim/bundle/ubuntu-vim72/syntax/netrc.vim b/vim/bundle/ubuntu-vim72/syntax/netrc.vim new file mode 100644 index 0000000..9f15d16 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/netrc.vim @@ -0,0 +1,52 @@ +" Vim syntax file +" Language: netrc(5) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2010-01-03 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword netrcKeyword machine nextgroup=netrcMachine skipwhite skipnl +syn keyword netrcKeyword account + \ login + \ nextgroup=netrcLogin,netrcSpecial skipwhite skipnl +syn keyword netrcKeyword password nextgroup=netrcPassword skipwhite skipnl +syn keyword netrcKeyword default +syn keyword netrcKeyword macdef + \ nextgroup=netrcInit,netrcMacroName skipwhite skipnl +syn region netrcMacro contained start='.' end='^$' + +syn match netrcMachine contained display '\S\+' +syn match netrcMachine contained display '"[^\\"]*\(\\.[^\\"]*\)*"' +syn match netrcLogin contained display '\S\+' +syn match netrcLogin contained display '"[^\\"]*\(\\.[^\\"]*\)*"' +syn match netrcPassword contained display '\S\+' +syn match netrcPassword contained display '"[^\\"]*\(\\.[^\\"]*\)*"' +syn match netrcMacroName contained display '\S\+' + \ nextgroup=netrcMacro skipwhite skipnl +syn match netrcMacroName contained display '"[^\\"]*\(\\.[^\\"]*\)*"' + \ nextgroup=netrcMacro skipwhite skipnl + +syn keyword netrcSpecial contained anonymous +syn match netrcInit contained '\" contains=netrwTreeBar,@NoSpell + syn match netrwCompress "\(\S\+ \)*\S\+\.\%(gz\|bz2\|Z\|zip\)\>" contains=netrwTreeBar,@NoSpell + if has("unix") + syn match netrwCoreDump "\" contains=netrwTreeBar,@NoSpell + endif + syn match netrwData "\(\S\+ \)*\S\+\.dat\>" contains=netrwTreeBar,@NoSpell + syn match netrwHdr "\(\S\+ \)*\S\+\.h\>" contains=netrwTreeBar,@NoSpell + syn match netrwLib "\(\S\+ \)*\S*\.\%(a\|so\|lib\|dll\)\>" contains=netrwTreeBar,@NoSpell + syn match netrwMakeFile "\<[mM]akefile\>\|\(\S\+ \)*\S\+\.mak\>" contains=netrwTreeBar,@NoSpell + syn match netrwObj "\(\S\+ \)*\S*\.\%(o\|obj\)\>" contains=netrwTreeBar,@NoSpell + syn match netrwTags "\" contains=netrwTreeBar,@NoSpell + syn match netrwTags "\<\(ANmenu\|ANtags\)\>" contains=netrwTreeBar,@NoSpell + syn match netrwTilde "\(\S\+ \)*\S\+\~\>" contains=netrwTreeBar,@NoSpell + syn match netrwTmp "\\|\(\S\+ \)*\S*tmp\>" contains=netrwTreeBar,@NoSpell +endif + +" --------------------------------------------------------------------- +" Highlighting Links: {{{1 +if !exists("did_drchip_netrwlist_syntax") + let did_drchip_netrwlist_syntax= 1 + hi default link netrwClassify Function + hi default link netrwCmdSep Delimiter + hi default link netrwComment Comment + hi default link netrwDir Directory + hi default link netrwHelpCmd Function + hi default link netrwHidePat Statement + hi default link netrwHideSep netrwComment + hi default link netrwList Statement + hi default link netrwVersion Identifier + hi default link netrwSymLink Question + hi default link netrwExe PreProc + hi default link netrwDateSep Delimiter + + hi default link netrwTreeBar Special + hi default link netrwTimeSep netrwDateSep + hi default link netrwComma netrwComment + hi default link netrwHide netrwComment + hi default link netrwMarkFile Identifier + + " special syntax highlighting (see :he g:netrw_special_syntax) + hi default link netrwBak NonText + hi default link netrwCompress Folded + hi default link netrwCoreDump WarningMsg + hi default link netrwData DiffChange + hi default link netrwLib DiffChange + hi default link netrwMakefile DiffChange + hi default link netrwObj Folded + hi default link netrwTilde Folded + hi default link netrwTmp Folded + hi default link netrwTags Folded +endif + +" Current Syntax: {{{1 +let b:current_syntax = "netrwlist" +" --------------------------------------------------------------------- +" vim: ts=8 fdm=marker diff --git a/vim/bundle/ubuntu-vim72/syntax/nosyntax.vim b/vim/bundle/ubuntu-vim72/syntax/nosyntax.vim new file mode 100644 index 0000000..0ab3412 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/nosyntax.vim @@ -0,0 +1,30 @@ +" Vim syntax support file +" Maintainer: Bram Moolenaar +" Last Change: 2006 Apr 16 + +" This file is used for ":syntax off". +" It removes the autocommands and stops highlighting for all buffers. + +if !has("syntax") + finish +endif + +" Remove all autocommands for the Syntax event. This also avoids that +" "syntax=foo" in a modeline triggers the SynSet() function of synload.vim. +au! Syntax + +" remove all syntax autocommands and remove the syntax for each buffer +augroup syntaxset + au! + au BufEnter * syn clear + au BufEnter * if exists("b:current_syntax") | unlet b:current_syntax | endif + doautoall syntaxset BufEnter * + au! +augroup END + +if exists("syntax_on") + unlet syntax_on +endif +if exists("syntax_manual") + unlet syntax_manual +endif diff --git a/vim/bundle/ubuntu-vim72/syntax/nqc.vim b/vim/bundle/ubuntu-vim72/syntax/nqc.vim new file mode 100644 index 0000000..0a3cd6b --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/nqc.vim @@ -0,0 +1,378 @@ +" Vim syntax file +" Language: NQC - Not Quite C, for LEGO mindstorms +" NQC homepage: http://www.enteract.com/~dbaum/nqc/ +" Maintainer: Stefan Scherer +" Last Change: 2001 May 10 +" URL: http://www.enotes.de/twiki/pub/Home/LegoMindstorms/nqc.vim +" Filenames: .nqc + +" 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 + +" Statements +syn keyword nqcStatement break return continue start stop abs sign +syn keyword nqcStatement sub task +syn keyword nqcLabel case default +syn keyword nqcConditional if else switch +syn keyword nqcRepeat while for do until repeat + +" Scout and RCX2 +syn keyword nqcEvents acquire catch monitor + +" types and classes +syn keyword nqcType int true false void +syn keyword nqcStorageClass asm const inline + + + +" Sensors -------------------------------------------- +" Input Sensors +syn keyword nqcConstant SENSOR_1 SENSOR_2 SENSOR_3 + +" Types for SetSensorType() +syn keyword nqcConstant SENSOR_TYPE_TOUCH SENSOR_TYPE_TEMPERATURE +syn keyword nqcConstant SENSOR_TYPE_LIGHT SENSOR_TYPE_ROTATION +syn keyword nqcConstant SENSOR_LIGHT SENSOR_TOUCH + +" Modes for SetSensorMode() +syn keyword nqcConstant SENSOR_MODE_RAW SENSOR_MODE_BOOL +syn keyword nqcConstant SENSOR_MODE_EDGE SENSOR_MODE_PULSE +syn keyword nqcConstant SENSOR_MODE_PERCENT SENSOR_MODE_CELSIUS +syn keyword nqcConstant SENSOR_MODE_FAHRENHEIT SENSOR_MODE_ROTATION + +" Sensor configurations for SetSensor() +syn keyword nqcConstant SENSOR_TOUCH SENSOR_LIGHT SENSOR_ROTATION +syn keyword nqcConstant SENSOR_CELSIUS SENSOR_FAHRENHEIT SENSOR_PULSE +syn keyword nqcConstant SENSOR_EDGE + +" Functions - All +syn keyword nqcFunction ClearSensor +syn keyword nqcFunction SensorValue SensorType + +" Functions - RCX +syn keyword nqcFunction SetSensor SetSensorType +syn keyword nqcFunction SensorValueBool + +" Functions - RCX, CyberMaster +syn keyword nqcFunction SetSensorMode SensorMode + +" Functions - RCX, Scout +syn keyword nqcFunction SensorValueRaw + +" Functions - Scout +syn keyword nqcFunction SetSensorLowerLimit SetSensorUpperLimit +syn keyword nqcFunction SetSensorHysteresis CalibrateSensor + + +" Outputs -------------------------------------------- +" Outputs for On(), Off(), etc. +syn keyword nqcConstant OUT_A OUT_B OUT_C + +" Modes for SetOutput() +syn keyword nqcConstant OUT_ON OUT_OFF OUT_FLOAT + +" Directions for SetDirection() +syn keyword nqcConstant OUT_FWD OUT_REV OUT_TOGGLE + +" Output power for SetPower() +syn keyword nqcConstant OUT_LOW OUT_HALF OUT_FULL + +" Functions - All +syn keyword nqcFunction SetOutput SetDirection SetPower OutputStatus +syn keyword nqcFunction On Off Float Fwd Rev Toggle +syn keyword nqcFunction OnFwd OnRev OnFor + +" Functions - RXC2, Scout +syn keyword nqcFunction SetGlobalOutput SetGlobalDirection SetMaxPower +syn keyword nqcFunction GlobalOutputStatus + + +" Sound ---------------------------------------------- +" Sounds for PlaySound() +syn keyword nqcConstant SOUND_CLICK SOUND_DOUBLE_BEEP SOUND_DOWN +syn keyword nqcConstant SOUND_UP SOUND_LOW_BEEP SOUND_FAST_UP + +" Functions - All +syn keyword nqcFunction PlaySound PlayTone + +" Functions - RCX2, Scout +syn keyword nqcFunction MuteSound UnmuteSound ClearSound +syn keyword nqcFunction SelectSounds + + +" LCD ------------------------------------------------ +" Modes for SelectDisplay() +syn keyword nqcConstant DISPLAY_WATCH DISPLAY_SENSOR_1 DISPLAY_SENSOR_2 +syn keyword nqcConstant DISPLAY_SENSOR_3 DISPLAY_OUT_A DISPLAY_OUT_B +syn keyword nqcConstant DISPLAY_OUT_C +" RCX2 +syn keyword nqcConstant DISPLAY_USER + +" Functions - RCX +syn keyword nqcFunction SelectDisplay +" Functions - RCX2 +syn keyword nqcFunction SetUserDisplay + + +" Communication -------------------------------------- +" Messages - RCX, Scout ------------------------------ +" Tx power level for SetTxPower() +syn keyword nqcConstant TX_POWER_LO TX_POWER_HI + +" Functions - RCX, Scout +syn keyword nqcFunction Message ClearMessage SendMessage SetTxPower + +" Serial - RCX2 -------------------------------------- +" for SetSerialComm() +syn keyword nqcConstant SERIAL_COMM_DEFAULT SERIAL_COMM_4800 +syn keyword nqcConstant SERIAL_COMM_DUTY25 SERIAL_COMM_76KHZ + +" for SetSerialPacket() +syn keyword nqcConstant SERIAL_PACKET_DEFAULT SERIAL_PACKET_PREAMBLE +syn keyword nqcConstant SERIAL_PACKET_NEGATED SERIAL_PACKET_CHECKSUM +syn keyword nqcConstant SERIAL_PACKET_RCX + +" Functions - RCX2 +syn keyword nqcFunction SetSerialComm SetSerialPacket SetSerialData +syn keyword nqcFunction SerialData SendSerial + +" VLL - Scout ---------------------------------------- +" Functions - Scout +syn keyword nqcFunction SendVLL + + +" Timers --------------------------------------------- +" Functions - All +syn keyword nqcFunction ClearTimer Timer + +" Functions - RCX2 +syn keyword nqcFunction SetTimer FastTimer + + +" Counters ------------------------------------------- +" Functions - RCX2, Scout +syn keyword nqcFunction ClearCounter IncCounter DecCounter Counter + + +" Access Control ------------------------------------- +syn keyword nqcConstant ACQUIRE_OUT_A ACQUIRE_OUT_B ACQUIRE_OUT_C +syn keyword nqcConstant ACQUIRE_SOUND +" RCX2 only +syn keyword nqcConstant ACQUIRE_USER_1 ACQUIRE_USER_2 ACQUIRE_USER_3 +syn keyword nqcConstant ACQUIRE_USER_4 + +" Functions - RCX2, Scout +syn keyword nqcFunction SetPriority + + +" Events --------------------------------------------- +" RCX2 Events +syn keyword nqcConstant EVENT_TYPE_PRESSED EVENT_TYPE_RELEASED +syn keyword nqcConstant EVENT_TYPE_PULSE EVENT_TYPE_EDGE +syn keyword nqcConstant EVENT_TYPE_FAST_CHANGE EVENT_TYPE_LOW +syn keyword nqcConstant EVENT_TYPE_NORMAL EVENT_TYPE_HIGH +syn keyword nqcConstant EVENT_TYPE_CLICK EVENT_TYPE_DOUBLECLICK +syn keyword nqcConstant EVENT_TYPE_MESSAGE + +" Scout Events +syn keyword nqcConstant EVENT_1_PRESSED EVENT_1_RELEASED +syn keyword nqcConstant EVENT_2_PRESSED EVENT_2_RELEASED +syn keyword nqcConstant EVENT_LIGHT_HIGH EVENT_LIGHT_NORMAL +syn keyword nqcConstant EVENT_LIGHT_LOW EVENT_LIGHT_CLICK +syn keyword nqcConstant EVENT_LIGHT_DOUBLECLICK EVENT_COUNTER_0 +syn keyword nqcConstant EVENT_COUNTER_1 EVENT_TIMER_0 EVENT_TIMER_1 +syn keyword nqcConstant EVENT_TIMER_2 EVENT_MESSAGE + +" Functions - RCX2, Scout +syn keyword nqcFunction ActiveEvents Event + +" Functions - RCX2 +syn keyword nqcFunction CurrentEvents +syn keyword nqcFunction SetEvent ClearEvent ClearAllEvents EventState +syn keyword nqcFunction CalibrateEvent SetUpperLimit UpperLimit +syn keyword nqcFunction SetLowerLimit LowerLimit SetHysteresis +syn keyword nqcFunction Hysteresis +syn keyword nqcFunction SetClickTime ClickTime SetClickCounter +syn keyword nqcFunction ClickCounter + +" Functions - Scout +syn keyword nqcFunction SetSensorClickTime SetCounterLimit +syn keyword nqcFunction SetTimerLimit + + +" Data Logging --------------------------------------- +" Functions - RCX +syn keyword nqcFunction CreateDatalog AddToDatalog +syn keyword nqcFunction UploadDatalog + + +" General Features ----------------------------------- +" Functions - All +syn keyword nqcFunction Wait StopAllTasks Random +syn keyword nqcFunction SetSleepTime SleepNow + +" Functions - RCX +syn keyword nqcFunction Program Watch SetWatch + +" Functions - RCX2 +syn keyword nqcFunction SetRandomSeed SelectProgram +syn keyword nqcFunction BatteryLevel FirmwareVersion + +" Functions - Scout +" Parameters for SetLight() +syn keyword nqcConstant LIGHT_ON LIGHT_OFF +syn keyword nqcFunction SetScoutRules ScoutRules SetScoutMode +syn keyword nqcFunction SetEventFeedback EventFeedback SetLight + +" additional CyberMaster defines +syn keyword nqcConstant OUT_L OUT_R OUT_X +syn keyword nqcConstant SENSOR_L SENSOR_M SENSOR_R +" Functions - CyberMaster +syn keyword nqcFunction Drive OnWait OnWaitDifferent +syn keyword nqcFunction ClearTachoCounter TachoCount TachoSpeed +syn keyword nqcFunction ExternalMotorRunning AGC + + + +" nqcCommentGroup allows adding matches for special things in comments +syn keyword nqcTodo contained TODO FIXME XXX +syn cluster nqcCommentGroup contains=nqcTodo + +"when wanted, highlight trailing white space +if exists("nqc_space_errors") + if !exists("nqc_no_trail_space_error") + syn match nqcSpaceError display excludenl "\s\+$" + endif + if !exists("nqc_no_tab_space_error") + syn match nqcSpaceError display " \+\t"me=e-1 + endif +endif + +"catch errors caused by wrong parenthesis and brackets +syn cluster nqcParenGroup contains=nqcParenError,nqcIncluded,nqcCommentSkip,@nqcCommentGroup,nqcCommentStartError,nqcCommentSkip,nqcCppOut,nqcCppOut2,nqcCppSkip,nqcNumber,nqcFloat,nqcNumbers +if exists("nqc_no_bracket_error") + syn region nqcParen transparent start='(' end=')' contains=ALLBUT,@nqcParenGroup,nqcCppParen + " nqcCppParen: same as nqcParen but ends at end-of-line; used in nqcDefine + syn region nqcCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@nqcParenGroup,nqcParen + syn match nqcParenError display ")" + syn match nqcErrInParen display contained "[{}]" +else + syn region nqcParen transparent start='(' end=')' contains=ALLBUT,@nqcParenGroup,nqcCppParen,nqcErrInBracket,nqcCppBracket + " nqcCppParen: same as nqcParen but ends at end-of-line; used in nqcDefine + syn region nqcCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@nqcParenGroup,nqcErrInBracket,nqcParen,nqcBracket + syn match nqcParenError display "[\])]" + syn match nqcErrInParen display contained "[\]{}]" + syn region nqcBracket transparent start='\[' end=']' contains=ALLBUT,@nqcParenGroup,nqcErrInParen,nqcCppParen,nqcCppBracket + " nqcCppBracket: same as nqcParen but ends at end-of-line; used in nqcDefine + syn region nqcCppBracket transparent start='\[' skip='\\$' excludenl end=']' end='$' contained contains=ALLBUT,@nqcParenGroup,nqcErrInParen,nqcParen,nqcBracket + syn match nqcErrInBracket display contained "[);{}]" +endif + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match nqcNumbers display transparent "\<\d\|\.\d" contains=nqcNumber,nqcFloat +" Same, but without octal error (for comments) +syn match nqcNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" +"hex number +syn match nqcNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" +" Flag the first zero of an octal number as something special +syn match nqcFloat display contained "\d\+f" +"floating point number, with dot, optional exponent +syn match nqcFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" +"floating point number, starting with a dot, optional exponent +syn match nqcFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match nqcFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" +" flag an octal number with wrong digits +syn case match + +syn region nqcCommentL start="//" skip="\\$" end="$" keepend contains=@nqcCommentGroup,nqcSpaceError +syn region nqcComment matchgroup=nqcCommentStart start="/\*" matchgroup=NONE end="\*/" contains=@nqcCommentGroup,nqcCommentStartError,nqcSpaceError + +" keep a // comment separately, it terminates a preproc. conditional +syntax match nqcCommentError display "\*/" +syntax match nqcCommentStartError display "/\*" contained + + + + + +syn region nqcPreCondit start="^\s*#\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=nqcComment,nqcCharacter,nqcCppParen,nqcParenError,nqcNumbers,nqcCommentError,nqcSpaceError +syn match nqcPreCondit display "^\s*#\s*\(else\|endif\)\>" +if !exists("nqc_no_if0") + syn region nqcCppOut start="^\s*#\s*if\s\+0\>" end=".\|$" contains=nqcCppOut2 + syn region nqcCppOut2 contained start="0" end="^\s*#\s*\(endif\>\|else\>\|elif\>\)" contains=nqcSpaceError,nqcCppSkip + syn region nqcCppSkip contained start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*#\s*endif\>" contains=nqcSpaceError,nqcCppSkip +endif +syn region nqcIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match nqcInclude display "^\s*#\s*include\>\s*["]" contains=nqcIncluded +"syn match nqcLineSkip "\\$" +syn cluster nqcPreProcGroup contains=nqcPreCondit,nqcIncluded,nqcInclude,nqcDefine,nqcErrInParen,nqcErrInBracket,nqcCppOut,nqcCppOut2,nqcCppSkip,nqcNumber,nqcFloat,nqcNumbers,nqcCommentSkip,@nqcCommentGroup,nqcCommentStartError,nqcParen,nqcBracket +syn region nqcDefine start="^\s*#\s*\(define\|undef\)\>" skip="\\$" end="$" contains=ALLBUT,@nqcPreProcGroup +syn region nqcPreProc start="^\s*#\s*\(pragma\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@nqcPreProcGroup + +if !exists("nqc_minlines") + if !exists("nqc_no_if0") + let nqc_minlines = 50 " #if 0 constructs can be long + else + let nqc_minlines = 15 " mostly for () constructs + endif +endif +exec "syn sync ccomment nqcComment minlines=" . nqc_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_nqc_syn_inits") + if version < 508 + let did_nqc_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " The default methods for highlighting. Can be overridden later + HiLink nqcLabel Label + HiLink nqcConditional Conditional + HiLink nqcRepeat Repeat + HiLink nqcCharacter Character + HiLink nqcNumber Number + HiLink nqcFloat Float + HiLink nqcFunction Function + HiLink nqcParenError nqcError + HiLink nqcErrInParen nqcError + HiLink nqcErrInBracket nqcError + HiLink nqcCommentL nqcComment + HiLink nqcCommentStart nqcComment + HiLink nqcCommentError nqcError + HiLink nqcCommentStartError nqcError + HiLink nqcSpaceError nqcError + HiLink nqcStorageClass StorageClass + HiLink nqcInclude Include + HiLink nqcPreProc PreProc + HiLink nqcDefine Macro + HiLink nqcIncluded String + HiLink nqcError Error + HiLink nqcStatement Statement + HiLink nqcEvents Statement + HiLink nqcPreCondit PreCondit + HiLink nqcType Type + HiLink nqcConstant Constant + HiLink nqcCommentSkip nqcComment + HiLink nqcComment Comment + HiLink nqcTodo Todo + HiLink nqcCppSkip nqcCppOut + HiLink nqcCppOut2 nqcCppOut + HiLink nqcCppOut Comment + + delcommand HiLink +endif + +let b:current_syntax = "nqc" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/nroff.vim b/vim/bundle/ubuntu-vim72/syntax/nroff.vim new file mode 100644 index 0000000..6f2a131 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/nroff.vim @@ -0,0 +1,259 @@ +" VIM syntax file +" Language: nroff/groff +" Maintainer: Alejandro López-Valencia +" URL: http://dradul.tripod.com/vim +" Last Change: 2006 Apr 14 +" +" {{{1 Acknowledgements +" +" ACKNOWLEDGEMENTS: +" +" My thanks to Jérôme Plût , who was the +" creator and maintainer of this syntax file for several years. +" May I be as good at it as he has been. +" +" {{{1 Todo +" +" TODO: +" +" * Write syntax highlighting files for the preprocessors, +" and integrate with nroff.vim. +" +" +" {{{1 Start syntax highlighting. +" +" 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 + +" +" {{{1 plugin settings... +" +" {{{2 enable spacing error highlighting +" +if exists("nroff_space_errors") + syn match nroffError /\s\+$/ + syn match nroffSpaceError /[.,:;!?]\s\{2,}/ +endif +" +" +" {{{1 Special file settings +" +" {{{2 ms exdented paragraphs are not in the default paragraphs list. +" +setlocal paragraphs+=XP +" +" {{{2 Activate navigation to preporcessor sections. +" +if exists("b:preprocs_as_sections") + setlocal sections=EQTSPS[\ G1GS +endif + +" {{{1 Escape sequences +" ------------------------------------------------------------ + +syn match nroffEscChar /\\[CN]/ nextgroup=nroffEscCharArg +syn match nroffEscape /\\[*fgmnYV]/ nextgroup=nroffEscRegPar,nroffEscRegArg +syn match nroffEscape /\\s[+-]\=/ nextgroup=nroffSize +syn match nroffEscape /\\[$AbDhlLRvxXZ]/ nextgroup=nroffEscPar,nroffEscArg + +syn match nroffEscRegArg /./ contained +syn match nroffEscRegArg2 /../ contained +syn match nroffEscRegPar /(/ contained nextgroup=nroffEscRegArg2 +syn match nroffEscArg /./ contained +syn match nroffEscArg2 /../ contained +syn match nroffEscPar /(/ contained nextgroup=nroffEscArg2 +syn match nroffSize /\((\d\)\=\d/ contained + +syn region nroffEscCharArg start=/'/ end=/'/ contained +syn region nroffEscArg start=/'/ end=/'/ contained contains=nroffEscape,@nroffSpecial + +if exists("b:nroff_is_groff") + syn region nroffEscRegArg matchgroup=nroffEscape start=/\[/ end=/\]/ contained oneline + syn region nroffSize matchgroup=nroffEscape start=/\[/ end=/\]/ contained +endif + +syn match nroffEscape /\\[adprtu{}]/ +syn match nroffEscape /\\$/ +syn match nroffEscape /\\\$[@*]/ + +" {{{1 Strings and special characters +" ------------------------------------------------------------ + +syn match nroffSpecialChar /\\[\\eE?!-]/ +syn match nroffSpace "\\[&%~|^0)/,]" +syn match nroffSpecialChar /\\(../ + +if exists("b:nroff_is_groff") + syn match nroffSpecialChar /\\\[[^]]*]/ + syn region nroffPreserve matchgroup=nroffSpecialChar start=/\\?/ end=/\\?/ oneline +endif + +syn region nroffPreserve matchgroup=nroffSpecialChar start=/\\!/ end=/$/ oneline + +syn cluster nroffSpecial contains=nroffSpecialChar,nroffSpace + + +syn region nroffString start=/"/ end=/"/ skip=/\\$/ contains=nroffEscape,@nroffSpecial contained +syn region nroffString start=/'/ end=/'/ skip=/\\$/ contains=nroffEscape,@nroffSpecial contained + + +" {{{1 Numbers and units +" ------------------------------------------------------------ +syn match nroffNumBlock /[0-9.]\a\=/ contained contains=nroffNumber +syn match nroffNumber /\d\+\(\.\d*\)\=/ contained nextgroup=nroffUnit,nroffBadChar +syn match nroffNumber /\.\d\+)/ contained nextgroup=nroffUnit,nroffBadChar +syn match nroffBadChar /./ contained +syn match nroffUnit /[icpPszmnvMu]/ contained + + +" {{{1 Requests +" ------------------------------------------------------------ + +" Requests begin with . or ' at the beginning of a line, or +" after .if or .ie. + +syn match nroffReqLeader /^[.']/ nextgroup=nroffReqName skipwhite +syn match nroffReqLeader /[.']/ contained nextgroup=nroffReqName skipwhite + +if exists("b:nroff_is_groff") +" +" GNU troff allows long request names +" + syn match nroffReqName /[^\t \\\[?]\+/ contained nextgroup=nroffReqArg +else + syn match nroffReqName /[^\t \\\[?]\{1,2}/ contained nextgroup=nroffReqArg +endif + +syn region nroffReqArg start=/\S/ skip=/\\$/ end=/$/ contained contains=nroffEscape,@nroffSpecial,nroffString,nroffError,nroffSpaceError,nroffNumBlock,nroffComment + +" {{{2 Conditional: .if .ie .el +syn match nroffReqName /\(if\|ie\)/ contained nextgroup=nroffCond skipwhite +syn match nroffReqName /el/ contained nextgroup=nroffReqLeader skipwhite +syn match nroffCond /\S\+/ contained nextgroup=nroffReqLeader skipwhite + +" {{{2 String definition: .ds .as +syn match nroffReqname /[da]s/ contained nextgroup=nroffDefIdent skipwhite +syn match nroffDefIdent /\S\+/ contained nextgroup=nroffDefinition skipwhite +syn region nroffDefinition matchgroup=nroffSpecialChar start=/"/ matchgroup=NONE end=/\\"/me=e-2 skip=/\\$/ start=/\S/ end=/$/ contained contains=nroffDefSpecial +syn match nroffDefSpecial /\\$/ contained +syn match nroffDefSpecial /\\\((.\)\=./ contained + +if exists("b:nroff_is_groff") + syn match nroffDefSpecial /\\\[[^]]*]/ contained +endif + +" {{{2 Macro definition: .de .am, also diversion: .di +syn match nroffReqName /\(d[ei]\|am\)/ contained nextgroup=nroffIdent skipwhite +syn match nroffIdent /[^[?( \t]\+/ contained +if exists("b:nroff_is_groff") + syn match nroffReqName /als/ contained nextgroup=nroffIdent skipwhite +endif + +" {{{2 Register definition: .rn .rr +syn match nroffReqName /[rn]r/ contained nextgroup=nroffIdent skipwhite +if exists("b:nroff_is_groff") + syn match nroffReqName /\(rnn\|aln\)/ contained nextgroup=nroffIdent skipwhite +endif + + +" {{{1 eqn/tbl/pic +" ------------------------------------------------------------ +" +" XXX: write proper syntax highlight for eqn / tbl / pic ? +" + +syn region nroffEquation start=/^\.\s*EQ\>/ end=/^\.\s*EN\>/ +syn region nroffTable start=/^\.\s*TS\>/ end=/^\.\s*TE\>/ +syn region nroffPicture start=/^\.\s*PS\>/ end=/^\.\s*PE\>/ +syn region nroffRefer start=/^\.\s*\[\>/ end=/^\.\s*\]\>/ +syn region nroffGrap start=/^\.\s*G1\>/ end=/^\.\s*G2\>/ +syn region nroffGremlin start=/^\.\s*GS\>/ end=/^\.\s*GE|GF\>/ + +" {{{1 Comments +" ------------------------------------------------------------ + +syn region nroffIgnore start=/^[.']\s*ig/ end=/^['.]\s*\./ +syn match nroffComment /\(^[.']\s*\)\=\\".*/ contains=nroffTodo +syn match nroffComment /^'''.*/ contains=nroffTodo + +if exists("b:nroff_is_groff") + syn match nroffComment "\\#.*$" contains=nroffTodo +endif + +syn keyword nroffTodo TODO XXX FIXME contained + +" {{{1 Hilighting +" ------------------------------------------------------------ +" + +" +" 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_nroff_syn_inits") + + if version < 508 + let did_nroff_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink nroffEscChar nroffSpecialChar + HiLink nroffEscCharAr nroffSpecialChar + HiLink nroffSpecialChar SpecialChar + HiLink nroffSpace Delimiter + + HiLink nroffEscRegArg2 nroffEscRegArg + HiLink nroffEscRegArg nroffIdent + + HiLink nroffEscArg2 nroffEscArg + HiLink nroffEscPar nroffEscape + + HiLink nroffEscRegPar nroffEscape + HiLink nroffEscArg nroffEscape + HiLink nroffSize nroffEscape + HiLink nroffEscape Preproc + + HiLink nroffIgnore Comment + HiLink nroffComment Comment + HiLink nroffTodo Todo + + HiLink nroffReqLeader nroffRequest + HiLink nroffReqName nroffRequest + HiLink nroffRequest Statement + HiLink nroffCond PreCondit + HiLink nroffDefIdent nroffIdent + HiLink nroffIdent Identifier + + HiLink nroffEquation PreProc + HiLink nroffTable PreProc + HiLink nroffPicture PreProc + HiLink nroffRefer PreProc + HiLink nroffGrap PreProc + HiLink nroffGremlin PreProc + + HiLink nroffNumber Number + HiLink nroffBadChar nroffError + HiLink nroffSpaceError nroffError + HiLink nroffError Error + + HiLink nroffPreserve String + HiLink nroffString String + HiLink nroffDefinition String + HiLink nroffDefSpecial Special + + delcommand HiLink + +endif + +let b:current_syntax = "nroff" + +" vim600: set fdm=marker fdl=2: diff --git a/vim/bundle/ubuntu-vim72/syntax/nsis.vim b/vim/bundle/ubuntu-vim72/syntax/nsis.vim new file mode 100644 index 0000000..d6d8037 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/nsis.vim @@ -0,0 +1,271 @@ +" Vim syntax file +" Language: NSIS script, for version of NSIS 1.91 and later +" Maintainer: Alex Jakushev +" Last Change: 2004 May 12 + +" 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 + + +"COMMENTS +syn keyword nsisTodo todo attention note fixme readme +syn region nsisComment start=";" end="$" contains=nsisTodo +syn region nsisComment start="#" end="$" contains=nsisTodo + +"LABELS +syn match nsisLocalLabel "\a\S\{-}:" +syn match nsisGlobalLabel "\.\S\{-1,}:" + +"PREPROCESSOR +syn match nsisPreprocSubst "${.\{-}}" +syn match nsisDefine "!define\>" +syn match nsisDefine "!undef\>" +syn match nsisPreCondit "!ifdef\>" +syn match nsisPreCondit "!ifndef\>" +syn match nsisPreCondit "!endif\>" +syn match nsisPreCondit "!else\>" +syn match nsisMacro "!macro\>" +syn match nsisMacro "!macroend\>" +syn match nsisMacro "!insertmacro\>" + +"COMPILER UTILITY +syn match nsisInclude "!include\>" +syn match nsisSystem "!cd\>" +syn match nsisSystem "!system\>" +syn match nsisSystem "!packhdr\>" + +"VARIABLES +syn match nsisUserVar "$\d" +syn match nsisUserVar "$R\d" +syn match nsisSysVar "$INSTDIR" +syn match nsisSysVar "$OUTDIR" +syn match nsisSysVar "$CMDLINE" +syn match nsisSysVar "$PROGRAMFILES" +syn match nsisSysVar "$DESKTOP" +syn match nsisSysVar "$EXEDIR" +syn match nsisSysVar "$WINDIR" +syn match nsisSysVar "$SYSDIR" +syn match nsisSysVar "$TEMP" +syn match nsisSysVar "$STARTMENU" +syn match nsisSysVar "$SMPROGRAMS" +syn match nsisSysVar "$SMSTARTUP" +syn match nsisSysVar "$QUICKLAUNCH" +syn match nsisSysVar "$HWNDPARENT" +syn match nsisSysVar "$\\r" +syn match nsisSysVar "$\\n" +syn match nsisSysVar "$\$" + +"STRINGS +syn region nsisString start=/"/ skip=/'\|`/ end=/"/ contains=nsisPreprocSubst,nsisUserVar,nsisSysVar,nsisRegistry +syn region nsisString start=/'/ skip=/"\|`/ end=/'/ contains=nsisPreprocSubst,nsisUserVar,nsisSysVar,nsisRegistry +syn region nsisString start=/`/ skip=/"\|'/ end=/`/ contains=nsisPreprocSubst,nsisUserVar,nsisSysVar,nsisRegistry + +"CONSTANTS +syn keyword nsisBoolean true false on off + +syn keyword nsisAttribOptions hide show nevershow auto force try ifnewer normal silent silentlog +syn keyword nsisAttribOptions smooth colored SET CUR END RO none listonly textonly both current all +syn keyword nsisAttribOptions zlib bzip2 lzma + +syn match nsisAttribOptions '\/NOCUSTOM' +syn match nsisAttribOptions '\/CUSTOMSTRING' +syn match nsisAttribOptions '\/COMPONENTSONLYONCUSTOM' +syn match nsisAttribOptions '\/windows' +syn match nsisAttribOptions '\/r' +syn match nsisAttribOptions '\/oname' +syn match nsisAttribOptions '\/REBOOTOK' +syn match nsisAttribOptions '\/SILENT' +syn match nsisAttribOptions '\/FILESONLY' +syn match nsisAttribOptions '\/SHORT' + +syn keyword nsisExecShell SW_SHOWNORMAL SW_SHOWMAXIMIZED SW_SHOWMINIMIZED + +syn keyword nsisRegistry HKCR HKLM HKCU HKU HKCC HKDD HKPD +syn keyword nsisRegistry HKEY_CLASSES_ROOT HKEY_LOCAL_MACHINE HKEY_CURRENT_USER HKEY_USERS +syn keyword nsisRegistry HKEY_CURRENT_CONFIG HKEY_DYN_DATA HKEY_PERFORMANCE_DATA + +syn keyword nsisFileAttrib NORMAL ARCHIVE HIDDEN OFFLINE READONLY SYSTEM TEMPORARY +syn keyword nsisFileAttrib FILE_ATTRIBUTE_NORMAL FILE_ATTRIBUTE_ARCHIVE FILE_ATTRIBUTE_HIDDEN +syn keyword nsisFileAttrib FILE_ATTRIBUTE_OFFLINE FILE_ATTRIBUTE_READONLY FILE_ATTRIBUTE_SYSTEM +syn keyword nsisFileAttrib FILE_ATTRIBUTE_TEMPORARY + +syn keyword nsisMessageBox MB_OK MB_OKCANCEL MB_ABORTRETRYIGNORE MB_RETRYCANCEL MB_YESNO MB_YESNOCANCEL +syn keyword nsisMessageBox MB_ICONEXCLAMATION MB_ICONINFORMATION MB_ICONQUESTION MB_ICONSTOP +syn keyword nsisMessageBox MB_TOPMOST MB_SETFOREGROUND MB_RIGHT +syn keyword nsisMessageBox MB_DEFBUTTON1 MB_DEFBUTTON2 MB_DEFBUTTON3 MB_DEFBUTTON4 +syn keyword nsisMessageBox IDABORT IDCANCEL IDIGNORE IDNO IDOK IDRETRY IDYES + +syn match nsisNumber "\<[^0]\d*\>" +syn match nsisNumber "\<0x\x\+\>" +syn match nsisNumber "\<0\o*\>" + + +"INSTALLER ATTRIBUTES - General installer configuration +syn keyword nsisAttribute OutFile Name Caption SubCaption BrandingText Icon +syn keyword nsisAttribute WindowIcon BGGradient SilentInstall SilentUnInstall +syn keyword nsisAttribute CRCCheck MiscButtonText InstallButtonText FileErrorText + +"INSTALLER ATTRIBUTES - Install directory configuration +syn keyword nsisAttribute InstallDir InstallDirRegKey + +"INSTALLER ATTRIBUTES - License page configuration +syn keyword nsisAttribute LicenseText LicenseData + +"INSTALLER ATTRIBUTES - Component page configuration +syn keyword nsisAttribute ComponentText InstType EnabledBitmap DisabledBitmap SpaceTexts + +"INSTALLER ATTRIBUTES - Directory page configuration +syn keyword nsisAttribute DirShow DirText AllowRootDirInstall + +"INSTALLER ATTRIBUTES - Install page configuration +syn keyword nsisAttribute InstallColors InstProgressFlags AutoCloseWindow +syn keyword nsisAttribute ShowInstDetails DetailsButtonText CompletedText + +"INSTALLER ATTRIBUTES - Uninstall configuration +syn keyword nsisAttribute UninstallText UninstallIcon UninstallCaption +syn keyword nsisAttribute UninstallSubCaption ShowUninstDetails UninstallButtonText + +"COMPILER ATTRIBUTES +syn keyword nsisCompiler SetOverwrite SetCompress SetCompressor SetDatablockOptimize SetDateSave + + +"FUNCTIONS - general purpose +syn keyword nsisInstruction SetOutPath File Exec ExecWait ExecShell +syn keyword nsisInstruction Rename Delete RMDir + +"FUNCTIONS - registry & ini +syn keyword nsisInstruction WriteRegStr WriteRegExpandStr WriteRegDWORD WriteRegBin +syn keyword nsisInstruction WriteINIStr ReadRegStr ReadRegDWORD ReadINIStr ReadEnvStr +syn keyword nsisInstruction ExpandEnvStrings DeleteRegValue DeleteRegKey EnumRegKey +syn keyword nsisInstruction EnumRegValue DeleteINISec DeleteINIStr + +"FUNCTIONS - general purpose, advanced +syn keyword nsisInstruction CreateDirectory CopyFiles SetFileAttributes CreateShortCut +syn keyword nsisInstruction GetFullPathName SearchPath GetTempFileName CallInstDLL +syn keyword nsisInstruction RegDLL UnRegDLL GetDLLVersion GetDLLVersionLocal +syn keyword nsisInstruction GetFileTime GetFileTimeLocal + +"FUNCTIONS - Branching, flow control, error checking, user interaction, etc instructions +syn keyword nsisInstruction Goto Call Return IfErrors ClearErrors SetErrors FindWindow +syn keyword nsisInstruction SendMessage IsWindow IfFileExists MessageBox StrCmp +syn keyword nsisInstruction IntCmp IntCmpU Abort Quit GetFunctionAddress GetLabelAddress +syn keyword nsisInstruction GetCurrentAddress + +"FUNCTIONS - File and directory i/o instructions +syn keyword nsisInstruction FindFirst FindNext FindClose FileOpen FileClose FileRead +syn keyword nsisInstruction FileWrite FileReadByte FileWriteByte FileSeek + +"FUNCTIONS - Misc instructions +syn keyword nsisInstruction SetDetailsView SetDetailsPrint SetAutoClose DetailPrint +syn keyword nsisInstruction Sleep BringToFront HideWindow SetShellVarContext + +"FUNCTIONS - String manipulation support +syn keyword nsisInstruction StrCpy StrLen + +"FUNCTIONS - Stack support +syn keyword nsisInstruction Push Pop Exch + +"FUNCTIONS - Integer manipulation support +syn keyword nsisInstruction IntOp IntFmt + +"FUNCTIONS - Rebooting support +syn keyword nsisInstruction Reboot IfRebootFlag SetRebootFlag + +"FUNCTIONS - Uninstaller instructions +syn keyword nsisInstruction WriteUninstaller + +"FUNCTIONS - Install logging instructions +syn keyword nsisInstruction LogSet LogText + +"FUNCTIONS - Section management instructions +syn keyword nsisInstruction SectionSetFlags SectionGetFlags SectionSetText +syn keyword nsisInstruction SectionGetText + + +"SPECIAL FUNCTIONS - install +syn match nsisCallback "\.onInit" +syn match nsisCallback "\.onUserAbort" +syn match nsisCallback "\.onInstSuccess" +syn match nsisCallback "\.onInstFailed" +syn match nsisCallback "\.onVerifyInstDir" +syn match nsisCallback "\.onNextPage" +syn match nsisCallback "\.onPrevPage" +syn match nsisCallback "\.onSelChange" + +"SPECIAL FUNCTIONS - uninstall +syn match nsisCallback "un\.onInit" +syn match nsisCallback "un\.onUserAbort" +syn match nsisCallback "un\.onInstSuccess" +syn match nsisCallback "un\.onInstFailed" +syn match nsisCallback "un\.onVerifyInstDir" +syn match nsisCallback "un\.onNextPage" + + +"STATEMENTS - sections +syn keyword nsisStatement Section SectionIn SectionEnd SectionDivider +syn keyword nsisStatement AddSize + +"STATEMENTS - functions +syn keyword nsisStatement Function FunctionEnd + +"STATEMENTS - pages +syn keyword nsisStatement Page UninstPage PageEx PageExEnc PageCallbacks + + +"ERROR +syn keyword nsisError UninstallExeName + + +" 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_nsis_syn_inits") + + if version < 508 + let did_nsys_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + + HiLink nsisInstruction Function + HiLink nsisComment Comment + HiLink nsisLocalLabel Label + HiLink nsisGlobalLabel Label + HiLink nsisStatement Statement + HiLink nsisString String + HiLink nsisBoolean Boolean + HiLink nsisAttribOptions Constant + HiLink nsisExecShell Constant + HiLink nsisFileAttrib Constant + HiLink nsisMessageBox Constant + HiLink nsisRegistry Identifier + HiLink nsisNumber Number + HiLink nsisError Error + HiLink nsisUserVar Identifier + HiLink nsisSysVar Identifier + HiLink nsisAttribute Type + HiLink nsisCompiler Type + HiLink nsisTodo Todo + HiLink nsisCallback Operator + " preprocessor commands + HiLink nsisPreprocSubst PreProc + HiLink nsisDefine Define + HiLink nsisMacro Macro + HiLink nsisPreCondit PreCondit + HiLink nsisInclude Include + HiLink nsisSystem PreProc + + delcommand HiLink +endif + +let b:current_syntax = "nsis" + diff --git a/vim/bundle/ubuntu-vim72/syntax/objc.vim b/vim/bundle/ubuntu-vim72/syntax/objc.vim new file mode 100644 index 0000000..c575cf2 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/objc.vim @@ -0,0 +1,110 @@ +" Vim syntax file +" Language: Objective C +" Maintainer: Kazunobu Kuriyama +" Ex-maintainer: Anthony Hodsdon +" First Author: Valentino Kyriakides <1kyriaki@informatik.uni-hamburg.de> +" Last Change: 2007 Feb 21 + +" 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 + +if &filetype != 'objcpp' + " Read the C syntax to start with + if version < 600 + source :p:h/c.vim + else + runtime! syntax/c.vim + endif +endif + +" Objective C extentions follow below +" +" NOTE: Objective C is abbreviated to ObjC/objc +" and uses *.h, *.m as file extensions! + + +" ObjC keywords, types, type qualifiers etc. +syn keyword objcStatement self super _cmd +syn keyword objcType id Class SEL IMP BOOL +syn keyword objcTypeModifier bycopy in out inout oneway +syn keyword objcConstant nil Nil + +" Match the ObjC #import directive (like C's #include) +syn region objcImported display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match objcImported display contained "<[-_0-9a-zA-Z.\/]*>" +syn match objcImport display "^\s*\(%:\|#\)\s*import\>\s*["<]" contains=objcImported + +" Match the important ObjC directives +syn match objcScopeDecl "@public\|@private\|@protected" +syn match objcDirective "@interface\|@implementation" +syn match objcDirective "@class\|@end\|@defs" +syn match objcDirective "@encode\|@protocol\|@selector" +syn match objcDirective "@try\|@catch\|@finally\|@throw\|@synchronized" + +" Match the ObjC method types +" +" NOTE: here I match only the indicators, this looks +" much nicer and reduces cluttering color highlightings. +" However, if you prefer full method declaration matching +" append .* at the end of the next two patterns! +" +syn match objcInstMethod "^\s*-\s*" +syn match objcFactMethod "^\s*+\s*" + +" To distinguish from a header inclusion from a protocol list. +syn match objcProtocol display "<[_a-zA-Z][_a-zA-Z0-9]*>" contains=objcType,cType,Type + + +" To distinguish labels from the keyword for a method's parameter. +syn region objcKeyForMethodParam display + \ start="^\s*[_a-zA-Z][_a-zA-Z0-9]*\s*:\s*(" + \ end=")\s*[_a-zA-Z][_a-zA-Z0-9]*" + \ contains=objcType,objcTypeModifier,cType,cStructure,cStorageClass,Type + +" Objective-C Constant Strings +syn match objcSpecial display "%@" contained +syn region objcString start=+\(@"\|"\)+ skip=+\\\\\|\\"+ end=+"+ contains=cFormat,cSpecial,objcSpecial + +" Objective-C Message Expressions +syn region objcMessage display start="\[" end="\]" contains=objcMessage,objcStatement,objcType,objcTypeModifier,objcString,objcConstant,objcDirective,cType,cStructure,cStorageClass,cString,cCharacter,cSpecialCharacter,cNumbers,cConstant,cOperator,cComment,cCommentL,Type + +syn cluster cParenGroup add=objcMessage +syn cluster cPreProcGroup add=objcMessage + +" 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_objc_syntax_inits") + if version < 508 + let did_objc_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink objcImport Include + HiLink objcImported cString + HiLink objcTypeModifier objcType + HiLink objcType Type + HiLink objcScopeDecl Statement + HiLink objcInstMethod Function + HiLink objcFactMethod Function + HiLink objcStatement Statement + HiLink objcDirective Statement + HiLink objcKeyForMethodParam None + HiLink objcString cString + HiLink objcSpecial Special + HiLink objcProtocol None + HiLink objcConstant cConstant + + delcommand HiLink +endif + +let b:current_syntax = "objc" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/objcpp.vim b/vim/bundle/ubuntu-vim72/syntax/objcpp.vim new file mode 100644 index 0000000..e80eed9 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/objcpp.vim @@ -0,0 +1,28 @@ +" Vim syntax file +" Language: Objective C++ +" Maintainer: Kazunobu Kuriyama +" Ex-Maintainer: Anthony Hodsdon +" Last Change: 2007 Oct 29 + +" 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 + +" Read in C++ and ObjC syntax files +if version < 600 + so :p:h/cpp.vim + so :p:h/objc.vim +else + runtime! syntax/cpp.vim + unlet b:current_syntax + runtime! syntax/objc.vim +endif + +syn keyword objCppNonStructure class template namespace transparent contained +syn keyword objCppNonStatement new delete friend using transparent contained + +let b:current_syntax = "objcpp" diff --git a/vim/bundle/ubuntu-vim72/syntax/ocaml.vim b/vim/bundle/ubuntu-vim72/syntax/ocaml.vim new file mode 100644 index 0000000..27eb390 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/ocaml.vim @@ -0,0 +1,327 @@ +" Vim syntax file +" Language: OCaml +" Filenames: *.ml *.mli *.mll *.mly +" Maintainers: Markus Mottl +" Karl-Heinz Sylla +" Issac Trotts +" URL: http://www.ocaml.info/vim/syntax/ocaml.vim +" Last Change: 2007 Apr 13 - Added highlighting of nativeints (MM) +" 2006 Oct 09 - More highlighting improvements to numbers (MM) +" 2006 Sep 19 - Improved highlighting of numbers (Florent Monnier) + +" A minor patch was applied to the official version so that object/end +" can be distinguished from begin/end, which is used for indentation, +" and folding. (David Baelde) + +" 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") && b:current_syntax == "ocaml" + finish +endif + +" OCaml is case sensitive. +syn case match + +" Script headers highlighted like comments +syn match ocamlComment "^#!.*" + +" Scripting directives +syn match ocamlScript "^#\<\(quit\|labels\|warnings\|directory\|cd\|load\|use\|install_printer\|remove_printer\|require\|thread\|trace\|untrace\|untrace_all\|print_depth\|print_length\)\>" + +" Script headers highlighted like comments +syn match ocamlComment "^#!.*" + +" lowercase identifier - the standard way to match +syn match ocamlLCIdentifier /\<\(\l\|_\)\(\w\|'\)*\>/ + +syn match ocamlKeyChar "|" + +" Errors +syn match ocamlBraceErr "}" +syn match ocamlBrackErr "\]" +syn match ocamlParenErr ")" +syn match ocamlArrErr "|]" + +syn match ocamlCommentErr "\*)" + +syn match ocamlCountErr "\" +syn match ocamlCountErr "\" + +if !exists("ocaml_revised") + syn match ocamlDoErr "\" +endif + +syn match ocamlDoneErr "\" +syn match ocamlThenErr "\" + +" Error-highlighting of "end" without synchronization: +" as keyword or as error (default) +if exists("ocaml_noend_error") + syn match ocamlKeyword "\" +else + syn match ocamlEndErr "\" +endif + +" Some convenient clusters +syn cluster ocamlAllErrs contains=ocamlBraceErr,ocamlBrackErr,ocamlParenErr,ocamlCommentErr,ocamlCountErr,ocamlDoErr,ocamlDoneErr,ocamlEndErr,ocamlThenErr + +syn cluster ocamlAENoParen contains=ocamlBraceErr,ocamlBrackErr,ocamlCommentErr,ocamlCountErr,ocamlDoErr,ocamlDoneErr,ocamlEndErr,ocamlThenErr + +syn cluster ocamlContained contains=ocamlTodo,ocamlPreDef,ocamlModParam,ocamlModParam1,ocamlPreMPRestr,ocamlMPRestr,ocamlMPRestr1,ocamlMPRestr2,ocamlMPRestr3,ocamlModRHS,ocamlFuncWith,ocamlFuncStruct,ocamlModTypeRestr,ocamlModTRWith,ocamlWith,ocamlWithRest,ocamlModType,ocamlFullMod + + +" Enclosing delimiters +syn region ocamlEncl transparent matchgroup=ocamlKeyword start="(" matchgroup=ocamlKeyword end=")" contains=ALLBUT,@ocamlContained,ocamlParenErr +syn region ocamlEncl transparent matchgroup=ocamlKeyword start="{" matchgroup=ocamlKeyword end="}" contains=ALLBUT,@ocamlContained,ocamlBraceErr +syn region ocamlEncl transparent matchgroup=ocamlKeyword start="\[" matchgroup=ocamlKeyword end="\]" contains=ALLBUT,@ocamlContained,ocamlBrackErr +syn region ocamlEncl transparent matchgroup=ocamlKeyword start="\[|" matchgroup=ocamlKeyword end="|\]" contains=ALLBUT,@ocamlContained,ocamlArrErr + + +" Comments +syn region ocamlComment start="(\*" end="\*)" contains=ocamlComment,ocamlTodo +syn keyword ocamlTodo contained TODO FIXME XXX NOTE + + +" Objects +syn region ocamlEnd matchgroup=ocamlObject start="\" matchgroup=ocamlObject end="\" contains=ALLBUT,@ocamlContained,ocamlEndErr + + +" Blocks +if !exists("ocaml_revised") + syn region ocamlEnd matchgroup=ocamlKeyword start="\" matchgroup=ocamlKeyword end="\" contains=ALLBUT,@ocamlContained,ocamlEndErr +endif + + +" "for" +syn region ocamlNone matchgroup=ocamlKeyword start="\" matchgroup=ocamlKeyword end="\<\(to\|downto\)\>" contains=ALLBUT,@ocamlContained,ocamlCountErr + + +" "do" +if !exists("ocaml_revised") + syn region ocamlDo matchgroup=ocamlKeyword start="\" matchgroup=ocamlKeyword end="\" contains=ALLBUT,@ocamlContained,ocamlDoneErr +endif + +" "if" +syn region ocamlNone matchgroup=ocamlKeyword start="\" matchgroup=ocamlKeyword end="\" contains=ALLBUT,@ocamlContained,ocamlThenErr + + +"" Modules + +" "struct" +syn region ocamlStruct matchgroup=ocamlModule start="\" matchgroup=ocamlModule end="\" contains=ALLBUT,@ocamlContained,ocamlEndErr + +" "sig" +syn region ocamlSig matchgroup=ocamlModule start="\" matchgroup=ocamlModule end="\" contains=ALLBUT,@ocamlContained,ocamlEndErr,ocamlModule +syn region ocamlModSpec matchgroup=ocamlKeyword start="\" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\>" contained contains=@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup=ocamlModTRWith,ocamlMPRestr + +" "open" +syn region ocamlNone matchgroup=ocamlKeyword start="\" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\(\.\u\(\w\|'\)*\)*\>" contains=@ocamlAllErrs,ocamlComment + +" "include" +syn match ocamlKeyword "\" skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod + +" "module" - somewhat complicated stuff ;-) +syn region ocamlModule matchgroup=ocamlKeyword start="\" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\>" contains=@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup=ocamlPreDef +syn region ocamlPreDef start="."me=e-1 matchgroup=ocamlKeyword end="\l\|="me=e-1 contained contains=@ocamlAllErrs,ocamlComment,ocamlModParam,ocamlModTypeRestr,ocamlModTRWith nextgroup=ocamlModPreRHS +syn region ocamlModParam start="([^*]" end=")" contained contains=@ocamlAENoParen,ocamlModParam1 +syn match ocamlModParam1 "\<\u\(\w\|'\)*\>" contained skipwhite skipempty nextgroup=ocamlPreMPRestr + +syn region ocamlPreMPRestr start="."me=e-1 end=")"me=e-1 contained contains=@ocamlAllErrs,ocamlComment,ocamlMPRestr,ocamlModTypeRestr + +syn region ocamlMPRestr start=":" end="."me=e-1 contained contains=@ocamlComment skipwhite skipempty nextgroup=ocamlMPRestr1,ocamlMPRestr2,ocamlMPRestr3 +syn region ocamlMPRestr1 matchgroup=ocamlModule start="\ssig\s\=" matchgroup=ocamlModule end="\" contained contains=ALLBUT,@ocamlContained,ocamlEndErr,ocamlModule +syn region ocamlMPRestr2 start="\sfunctor\(\s\|(\)\="me=e-1 matchgroup=ocamlKeyword end="->" contained contains=@ocamlAllErrs,ocamlComment,ocamlModParam skipwhite skipempty nextgroup=ocamlFuncWith,ocamlMPRestr2 +syn match ocamlMPRestr3 "\w\(\w\|'\)*\(\.\w\(\w\|'\)*\)*" contained +syn match ocamlModPreRHS "=" contained skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod +syn region ocamlModRHS start="." end=".\w\|([^*]"me=e-2 contained contains=ocamlComment skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod +syn match ocamlFullMod "\<\u\(\w\|'\)*\(\.\u\(\w\|'\)*\)*" contained skipwhite skipempty nextgroup=ocamlFuncWith + +syn region ocamlFuncWith start="([^*]"me=e-1 end=")" contained contains=ocamlComment,ocamlWith,ocamlFuncStruct skipwhite skipempty nextgroup=ocamlFuncWith +syn region ocamlFuncStruct matchgroup=ocamlModule start="[^a-zA-Z]struct\>"hs=s+1 matchgroup=ocamlModule end="\" contains=ALLBUT,@ocamlContained,ocamlEndErr + +syn match ocamlModTypeRestr "\<\w\(\w\|'\)*\(\.\w\(\w\|'\)*\)*\>" contained +syn region ocamlModTRWith start=":\s*("hs=s+1 end=")" contained contains=@ocamlAENoParen,ocamlWith +syn match ocamlWith "\<\(\u\(\w\|'\)*\.\)*\w\(\w\|'\)*\>" contained skipwhite skipempty nextgroup=ocamlWithRest +syn region ocamlWithRest start="[^)]" end=")"me=e-1 contained contains=ALLBUT,@ocamlContained + +" "module type" +syn region ocamlKeyword start="\\s*\" matchgroup=ocamlModule end="\<\w\(\w\|'\)*\>" contains=ocamlComment skipwhite skipempty nextgroup=ocamlMTDef +syn match ocamlMTDef "=\s*\w\(\w\|'\)*\>"hs=s+1,me=s + +syn keyword ocamlKeyword and as assert class +syn keyword ocamlKeyword constraint else +syn keyword ocamlKeyword exception external fun + +syn keyword ocamlKeyword in inherit initializer +syn keyword ocamlKeyword land lazy let match +syn keyword ocamlKeyword method mutable new of +syn keyword ocamlKeyword parser private raise rec +syn keyword ocamlKeyword try type +syn keyword ocamlKeyword val virtual when while with + +if exists("ocaml_revised") + syn keyword ocamlKeyword do value + syn keyword ocamlBoolean True False +else + syn keyword ocamlKeyword function + syn keyword ocamlBoolean true false + syn match ocamlKeyChar "!" +endif + +syn keyword ocamlType array bool char exn float format format4 +syn keyword ocamlType int int32 int64 lazy_t list nativeint option +syn keyword ocamlType string unit + +syn keyword ocamlOperator asr lor lsl lsr lxor mod not + +syn match ocamlConstructor "(\s*)" +syn match ocamlConstructor "\[\s*\]" +syn match ocamlConstructor "\[|\s*>|]" +syn match ocamlConstructor "\[<\s*>\]" +syn match ocamlConstructor "\u\(\w\|'\)*\>" + +" Polymorphic variants +syn match ocamlConstructor "`\w\(\w\|'\)*\>" + +" Module prefix +syn match ocamlModPath "\u\(\w\|'\)*\."he=e-1 + +syn match ocamlCharacter "'\\\d\d\d'\|'\\[\'ntbr]'\|'.'" +syn match ocamlCharErr "'\\\d\d'\|'\\\d'" +syn match ocamlCharErr "'\\[^\'ntbr]'" +syn region ocamlString start=+"+ skip=+\\\\\|\\"+ end=+"+ + +syn match ocamlFunDef "->" +syn match ocamlRefAssign ":=" +syn match ocamlTopStop ";;" +syn match ocamlOperator "\^" +syn match ocamlOperator "::" + +syn match ocamlOperator "&&" +syn match ocamlOperator "<" +syn match ocamlOperator ">" +syn match ocamlAnyVar "\<_\>" +syn match ocamlKeyChar "|[^\]]"me=e-1 +syn match ocamlKeyChar ";" +syn match ocamlKeyChar "\~" +syn match ocamlKeyChar "?" +syn match ocamlKeyChar "\*" +syn match ocamlKeyChar "=" + +if exists("ocaml_revised") + syn match ocamlErr "<-" +else + syn match ocamlOperator "<-" +endif + +syn match ocamlNumber "\<-\=\d\(_\|\d\)*[l|L|n]\?\>" +syn match ocamlNumber "\<-\=0[x|X]\(\x\|_\)\+[l|L|n]\?\>" +syn match ocamlNumber "\<-\=0[o|O]\(\o\|_\)\+[l|L|n]\?\>" +syn match ocamlNumber "\<-\=0[b|B]\([01]\|_\)\+[l|L|n]\?\>" +syn match ocamlFloat "\<-\=\d\(_\|\d\)*\.\(_\|\d\)*\([eE][-+]\=\d\(_\|\d\)*\)\=\>" + +" Labels +syn match ocamlLabel "\~\(\l\|_\)\(\w\|'\)*"lc=1 +syn match ocamlLabel "?\(\l\|_\)\(\w\|'\)*"lc=1 +syn region ocamlLabel transparent matchgroup=ocamlLabel start="?(\(\l\|_\)\(\w\|'\)*"lc=2 end=")"me=e-1 contains=ALLBUT,@ocamlContained,ocamlParenErr + + +" Synchronization +syn sync minlines=50 +syn sync maxlines=500 + +if !exists("ocaml_revised") + syn sync match ocamlDoSync grouphere ocamlDo "\" + syn sync match ocamlDoSync groupthere ocamlDo "\" +endif + +if exists("ocaml_revised") + syn sync match ocamlEndSync grouphere ocamlEnd "\<\(object\)\>" +else + syn sync match ocamlEndSync grouphere ocamlEnd "\<\(begin\|object\)\>" +endif + +syn sync match ocamlEndSync groupthere ocamlEnd "\" +syn sync match ocamlStructSync grouphere ocamlStruct "\" +syn sync match ocamlStructSync groupthere ocamlStruct "\" +syn sync match ocamlSigSync grouphere ocamlSig "\" +syn sync match ocamlSigSync groupthere ocamlSig "\" + +" 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_ocaml_syntax_inits") + if version < 508 + let did_ocaml_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink ocamlBraceErr Error + HiLink ocamlBrackErr Error + HiLink ocamlParenErr Error + HiLink ocamlArrErr Error + + HiLink ocamlCommentErr Error + + HiLink ocamlCountErr Error + HiLink ocamlDoErr Error + HiLink ocamlDoneErr Error + HiLink ocamlEndErr Error + HiLink ocamlThenErr Error + + HiLink ocamlCharErr Error + + HiLink ocamlErr Error + + HiLink ocamlComment Comment + + HiLink ocamlModPath Include + HiLink ocamlObject Include + HiLink ocamlModule Include + HiLink ocamlModParam1 Include + HiLink ocamlModType Include + HiLink ocamlMPRestr3 Include + HiLink ocamlFullMod Include + HiLink ocamlModTypeRestr Include + HiLink ocamlWith Include + HiLink ocamlMTDef Include + + HiLink ocamlScript Include + + HiLink ocamlConstructor Constant + + HiLink ocamlModPreRHS Keyword + HiLink ocamlMPRestr2 Keyword + HiLink ocamlKeyword Keyword + HiLink ocamlMethod Include + HiLink ocamlFunDef Keyword + HiLink ocamlRefAssign Keyword + HiLink ocamlKeyChar Keyword + HiLink ocamlAnyVar Keyword + HiLink ocamlTopStop Keyword + HiLink ocamlOperator Keyword + + HiLink ocamlBoolean Boolean + HiLink ocamlCharacter Character + HiLink ocamlNumber Number + HiLink ocamlFloat Float + HiLink ocamlString String + + HiLink ocamlLabel Identifier + + HiLink ocamlType Type + + HiLink ocamlTodo Todo + + HiLink ocamlEncl Keyword + + delcommand HiLink +endif + +let b:current_syntax = "ocaml" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/occam.vim b/vim/bundle/ubuntu-vim72/syntax/occam.vim new file mode 100644 index 0000000..1c84bf0 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/occam.vim @@ -0,0 +1,126 @@ +" Vim syntax file +" Language: occam +" Copyright: Fred Barnes , Mario Schweigler +" Maintainer: Mario Schweigler +" Last Change: 24 May 2003 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +"{{{ Settings +" Set shift width for indent +setlocal shiftwidth=2 +" Set the tab key size to two spaces +setlocal softtabstop=2 +" Let tab keys always be expanded to spaces +setlocal expandtab + +" Dots are valid in occam identifiers +setlocal iskeyword+=. +"}}} + +syn case match + +syn keyword occamType BYTE BOOL INT INT16 INT32 INT64 REAL32 REAL64 ANY +syn keyword occamType CHAN DATA OF TYPE TIMER INITIAL VAL PORT MOBILE PLACED +syn keyword occamType PROCESSOR PACKED RECORD PROTOCOL SHARED ROUND TRUNC + +syn keyword occamStructure SEQ PAR IF ALT PRI FORKING PLACE AT + +syn keyword occamKeyword PROC IS TRUE FALSE SIZE RECURSIVE REC +syn keyword occamKeyword RETYPES RESHAPES STEP FROM FOR RESCHEDULE STOP SKIP FORK +syn keyword occamKeyword FUNCTION VALOF RESULT ELSE CLONE CLAIM +syn keyword occamBoolean TRUE FALSE +syn keyword occamRepeat WHILE +syn keyword occamConditional CASE +syn keyword occamConstant MOSTNEG MOSTPOS + +syn match occamBrackets /\[\|\]/ +syn match occamParantheses /(\|)/ + +syn keyword occamOperator AFTER TIMES MINUS PLUS INITIAL REM AND OR XOR NOT +syn keyword occamOperator BITAND BITOR BITNOT BYTESIN OFFSETOF + +syn match occamOperator /::\|:=\|?\|!/ +syn match occamOperator /<\|>\|+\|-\|\*\|\/\|\\\|=\|\~/ +syn match occamOperator /@\|\$\$\|%\|&&\|<&\|&>\|<\]\|\[>\|\^/ + +syn match occamSpecialChar /\M**\|*'\|*"\|*#\(\[0-9A-F\]\+\)/ contained +syn match occamChar /\M\L\='\[^*\]'/ +syn match occamChar /L'[^']*'/ contains=occamSpecialChar + +syn case ignore +syn match occamTodo /\:\=/ contained +syn match occamNote /\:\=/ contained +syn case match +syn keyword occamNote NOT contained + +syn match occamComment /--.*/ contains=occamCommentTitle,occamTodo,occamNote +syn match occamCommentTitle /--\s*\u\a*\(\s\+\u\a*\)*:/hs=s+2 contained contains=occamTodo,occamNote +syn match occamCommentTitle /--\s*KROC-LIBRARY\(\.so\|\.a\)\=\s*$/hs=s+2 contained +syn match occamCommentTitle /--\s*\(KROC-OPTIONS:\|RUN-PARAMETERS:\)/hs=s+2 contained + +syn match occamIdentifier /\<[A-Z.][A-Z.0-9]*\>/ +syn match occamFunction /\<[A-Za-z.][A-Za-z0-9.]*\>/ contained + +syn match occamPPIdentifier /##.\{-}\>/ + +syn region occamString start=/"/ skip=/\M*"/ end=/"/ contains=occamSpecialChar +syn region occamCharString start=/'/ end=/'/ contains=occamSpecialChar + +syn match occamNumber /\<\d\+\(\.\d\+\(E\(+\|-\)\d\+\)\=\)\=/ +syn match occamNumber /-\d\+\(\.\d\+\(E\(+\|-\)\d\+\)\=\)\=/ +syn match occamNumber /#\(\d\|[A-F]\)\+/ +syn match occamNumber /-#\(\d\|[A-F]\)\+/ + +syn keyword occamCDString SHARED EXTERNAL DEFINED NOALIAS NOUSAGE NOT contained +syn keyword occamCDString FILE LINE PROCESS.PRIORITY OCCAM2.5 contained +syn keyword occamCDString USER.DEFINED.OPERATORS INITIAL.DECL MOBILES contained +syn keyword occamCDString BLOCKING.SYSCALLS VERSION NEED.QUAD.ALIGNMENT contained +syn keyword occamCDString TARGET.CANONICAL TARGET.CPU TARGET.OS TARGET.VENDOR contained +syn keyword occamCDString TRUE FALSE AND OR contained +syn match occamCDString /<\|>\|=\|(\|)/ contained + +syn region occamCDirective start=/#\(USE\|INCLUDE\|PRAGMA\|DEFINE\|UNDEFINE\|UNDEF\|IF\|ELIF\|ELSE\|ENDIF\|WARNING\|ERROR\|RELAX\)\>/ end=/$/ contains=occamString,occamComment,occamCDString + +if version >= 508 || !exists("did_occam_syn_inits") + if version < 508 + let did_occam_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink occamType Type + HiLink occamKeyword Keyword + HiLink occamComment Comment + HiLink occamCommentTitle PreProc + HiLink occamTodo Todo + HiLink occamNote Todo + HiLink occamString String + HiLink occamCharString String + HiLink occamNumber Number + HiLink occamCDirective PreProc + HiLink occamCDString String + HiLink occamPPIdentifier PreProc + HiLink occamBoolean Boolean + HiLink occamSpecialChar SpecialChar + HiLink occamChar Character + HiLink occamStructure Structure + HiLink occamIdentifier Identifier + HiLink occamConstant Constant + HiLink occamOperator Operator + HiLink occamFunction Ignore + HiLink occamRepeat Repeat + HiLink occamConditional Conditional + HiLink occamBrackets Type + HiLink occamParantheses Delimiter + + delcommand HiLink +endif + +let b:current_syntax = "occam" + diff --git a/vim/bundle/ubuntu-vim72/syntax/omnimark.vim b/vim/bundle/ubuntu-vim72/syntax/omnimark.vim new file mode 100644 index 0000000..698b3c0 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/omnimark.vim @@ -0,0 +1,123 @@ +" Vim syntax file +" Language: Omnimark +" Maintainer: Paul Terray +" Last Change: 11 Oct 2000 + +" 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 + +if version < 600 + set iskeyword=@,48-57,_,128-167,224-235,- +else + setlocal iskeyword=@,48-57,_,128-167,224-235,- +endif + +syn keyword omnimarkKeywords ACTIVATE AGAIN +syn keyword omnimarkKeywords CATCH CLEAR CLOSE COPY COPY-CLEAR CROSS-TRANSLATE +syn keyword omnimarkKeywords DEACTIVATE DECLARE DECREMENT DEFINE DISCARD DIVIDE DO DOCUMENT-END DOCUMENT-START DONE DTD-START +syn keyword omnimarkKeywords ELEMENT ELSE ESCAPE EXIT +syn keyword omnimarkKeywords FAIL FIND FIND-END FIND-START FORMAT +syn keyword omnimarkKeywords GROUP +syn keyword omnimarkKeywords HALT HALT-EVERYTHING +syn keyword omnimarkKeywords IGNORE IMPLIED INCLUDE INCLUDE-END INCLUDE-START INCREMENT INPUT +syn keyword omnimarkKeywords JOIN +syn keyword omnimarkKeywords LINE-END LINE-START LOG LOOKAHEAD +syn keyword omnimarkKeywords MACRO +syn keyword omnimarkKeywords MACRO-END MARKED-SECTION MARKUP-COMMENT MARKUP-ERROR MARKUP-PARSER MASK MATCH MINUS MODULO +syn keyword omnimarkKeywords NEW NEWLINE NEXT +syn keyword omnimarkKeywords OPEN OUTPUT OUTPUT-TO OVER +syn keyword omnimarkKeywords PROCESS PROCESS-END PROCESS-START PROCESSING-INSTRUCTION PROLOG-END PROLOG-IN-ERROR PUT +syn keyword omnimarkKeywords REMOVE REOPEN REPEAT RESET RETHROW RETURN +syn keyword omnimarkKeywords WHEN WHITE-SPACE +syn keyword omnimarkKeywords SAVE SAVE-CLEAR SCAN SELECT SET SGML SGML-COMMENT SGML-DECLARATION-END SGML-DTD SGML-DTDS SGML-ERROR SGML-IN SGML-OUT SGML-PARSE SGML-PARSER SHIFT SUBMIT SUCCEED SUPPRESS +syn keyword omnimarkKeywords SYSTEM-CALL +syn keyword omnimarkKeywords TEST-SYSTEM THROW TO TRANSLATE +syn keyword omnimarkKeywords UC UL UNLESS UP-TRANSLATE +syn keyword omnimarkKeywords XML-PARSE + +syn keyword omnimarkCommands ACTIVE AFTER ANCESTOR AND ANOTHER ARG AS ATTACHED ATTRIBUTE ATTRIBUTES +syn keyword omnimarkCommands BASE BEFORE BINARY BINARY-INPUT BINARY-MODE BINARY-OUTPUT BREAK-WIDTH BUFFER BY +syn keyword omnimarkCommands CASE CHILDREN CLOSED COMPILED-DATE COMPLEMENT CONREF CONTENT CONTEXT-TRANSLATE COUNTER CREATED CREATING CREATOR CURRENT +syn keyword omnimarkCommands DATA-ATTRIBUTE DATA-ATTRIBUTES DATA-CONTENT DATA-LETTERS DATE DECLARED-CONREF DECLARED-CURRENT DECLARED-DEFAULTED DECLARED-FIXED DECLARED-IMPLIED DECLARED-REQUIRED +syn keyword omnimarkCommands DEFAULT-ENTITY DEFAULTED DEFAULTING DELIMITER DIFFERENCE DIRECTORY DOCTYPE DOCUMENT DOCUMENT-ELEMENT DOMAIN-FREE DOWN-TRANSLATE DTD DTD-END DTDS +syn keyword omnimarkCommands ELEMENTS ELSEWHERE EMPTY ENTITIES ENTITY EPILOG-START EQUAL EXCEPT EXISTS EXTERNAL EXTERNAL-DATA-ENTITY EXTERNAL-ENTITY EXTERNAL-FUNCTION EXTERNAL-OUTPUT-FUNCTION +syn keyword omnimarkCommands EXTERNAL-TEXT-ENTITY +syn keyword omnimarkCommands FALSE FILE FUNCTION FUNCTION-LIBRARY +syn keyword omnimarkCommands GENERAL GLOBAL GREATER-EQUAL GREATER-THAN GROUPS +syn keyword omnimarkCommands HAS HASNT HERALDED-NAMES +syn keyword omnimarkCommands ID ID-CHECKING IDREF IDREFS IN IN-LIBRARY INCLUSION INITIAL INITIAL-SIZE INSERTION-BREAK INSTANCE INTERNAL INVALID-DATA IS ISNT ITEM +syn keyword omnimarkCommands KEY KEYED +syn keyword omnimarkCommands LAST LASTMOST LC LENGTH LESS-EQUAL LESS-THAN LETTERS LIBRARY LITERAL LOCAL +syn keyword omnimarkCommands MATCHES MIXED MODIFIABLE +syn keyword omnimarkCommands NAME NAME-LETTERS NAMECASE NAMED NAMES NDATA-ENTITY NEGATE NESTED-REFERENTS NMTOKEN NMTOKENS NO NO-DEFAULT-IO NON-CDATA NON-IMPLIED NON-SDATA NOT NOTATION NUMBER-OF NUMBERS +syn keyword omnimarkCommands NUTOKEN NUTOKENS +syn keyword omnimarkCommands OCCURRENCE OF OPAQUE OPTIONAL OR +syn keyword omnimarkCommands PARAMETER PARENT PAST PATTERN PLUS PREPARENT PREVIOUS PROPER PUBLIC +syn keyword omnimarkCommands READ-ONLY READABLE REFERENT REFERENTS REFERENTS-ALLOWED REFERENTS-DISPLAYED REFERENTS-NOT-ALLOWED REMAINDER REPEATED REPLACEMENT-BREAK REVERSED +syn keyword omnimarkCommands SILENT-REFERENT SIZE SKIP SOURCE SPECIFIED STATUS STREAM SUBDOC-ENTITY SUBDOCUMENT SUBDOCUMENTS SUBELEMENT SWITCH SYMBOL SYSTEM +syn keyword omnimarkCommands TEXT-MODE THIS TIMES TOKEN TRUE +syn keyword omnimarkCommands UNANCHORED UNATTACHED UNION USEMAP USING +syn keyword omnimarkCommands VALUE VALUED VARIABLE +syn keyword omnimarkCommands WITH WRITABLE +syn keyword omnimarkCommands XML XML-DTD XML-DTDS +syn keyword omnimarkCommands YES +syn keyword omnimarkCommands #ADDITIONAL-INFO #APPINFO #CAPACITY #CHARSET #CLASS #COMMAND-LINE-NAMES #CONSOLE #CURRENT-INPUT #CURRENT-OUTPUT #DATA #DOCTYPE #DOCUMENT #DTD #EMPTY #ERROR #ERROR-CODE +syn keyword omnimarkCommands #FILE-NAME #FIRST #GROUP #IMPLIED #ITEM #LANGUAGE-VERSION #LAST #LIBPATH #LIBRARY #LIBVALUE #LINE-NUMBER #MAIN-INPUT #MAIN-OUTPUT #MARKUP-ERROR-COUNT #MARKUP-ERROR-TOTAL +syn keyword omnimarkCommands #MARKUP-PARSER #MARKUP-WARNING-COUNT #MARKUP-WARNING-TOTAL #MESSAGE #NONE #OUTPUT #PLATFORM-INFO #PROCESS-INPUT #PROCESS-OUTPUT #RECOVERY-INFO #SGML #SGML-ERROR-COUNT +syn keyword omnimarkCommands #SGML-ERROR-TOTAL #SGML-WARNING-COUNT #SGML-WARNING-TOTAL #SUPPRESS #SYNTAX #! + +syn keyword omnimarkPatterns ANY ANY-TEXT +syn keyword omnimarkPatterns BLANK +syn keyword omnimarkPatterns CDATA CDATA-ENTITY CONTENT-END CONTENT-START +syn keyword omnimarkPatterns DIGIT +syn keyword omnimarkPatterns LETTER +syn keyword omnimarkPatterns NUMBER +syn keyword omnimarkPatterns PCDATA +syn keyword omnimarkPatterns RCDATA +syn keyword omnimarkPatterns SDATA SDATA-ENTITY SPACE +syn keyword omnimarkPatterns TEXT +syn keyword omnimarkPatterns VALUE-END VALUE-START +syn keyword omnimarkPatterns WORD-END WORD-START + +syn region omnimarkComment start=";" end="$" + +" strings +syn region omnimarkString matchgroup=Normal start=+'+ end=+'+ skip=+%'+ contains=omnimarkEscape +syn region omnimarkString matchgroup=Normal start=+"+ end=+"+ skip=+%"+ contains=omnimarkEscape +syn match omnimarkEscape contained +%.+ +syn match omnimarkEscape contained +%[0-9][0-9]#+ + +"syn sync maxlines=100 +syn sync minlines=2000 + +" 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_omnimark_syntax_inits") + if version < 508 + let did_omnimark_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink omnimarkCommands Statement + HiLink omnimarkKeywords Identifier + HiLink omnimarkString String + HiLink omnimarkPatterns Macro +" HiLink omnimarkNumber Number + HiLink omnimarkComment Comment + HiLink omnimarkEscape Special + + delcommand HiLink +endif + +let b:current_syntax = "omnimark" + +" vim: ts=8 + diff --git a/vim/bundle/ubuntu-vim72/syntax/openroad.vim b/vim/bundle/ubuntu-vim72/syntax/openroad.vim new file mode 100644 index 0000000..3f9a78d --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/openroad.vim @@ -0,0 +1,266 @@ +" Vim syntax file +" Language: CA-OpenROAD +" Maintainer: Luis Moreno +" Last change: 2001 Jun 12 + +" 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 + +syntax case ignore + +" Keywords +" +syntax keyword openroadKeyword ABORT ALL ALTER AND ANY AS ASC AT AVG BEGIN +syntax keyword openroadKeyword BETWEEN BY BYREF CALL CALLFRAME CALLPROC CASE +syntax keyword openroadKeyword CLEAR CLOSE COMMIT CONNECT CONTINUE COPY COUNT +syntax keyword openroadKeyword CREATE CURRENT DBEVENT DECLARE DEFAULT DELETE +syntax keyword openroadKeyword DELETEROW DESC DIRECT DISCONNECT DISTINCT DO +syntax keyword openroadKeyword DROP ELSE ELSEIF END ENDCASE ENDDECLARE ENDFOR +syntax keyword openroadKeyword ENDIF ENDLOOP ENDWHILE ESCAPE EXECUTE EXISTS +syntax keyword openroadKeyword EXIT FETCH FIELD FOR FROM GOTOFRAME GRANT GROUP +syntax keyword openroadKeyword HAVING IF IMMEDIATE IN INDEX INITIALISE +syntax keyword openroadKeyword INITIALIZE INQUIRE_INGRES INQUIRE_SQL INSERT +syntax keyword openroadKeyword INSERTROW INSTALLATION INTEGRITY INTO KEY LIKE +syntax keyword openroadKeyword LINK MAX MESSAGE METHOD MIN MODE MODIFY NEXT +syntax keyword openroadKeyword NOECHO NOT NULL OF ON OPEN OPENFRAME OR ORDER +syntax keyword openroadKeyword PERMIT PROCEDURE PROMPT QUALIFICATION RAISE +syntax keyword openroadKeyword REGISTER RELOCATE REMOVE REPEAT REPEATED RESUME +syntax keyword openroadKeyword RETURN RETURNING REVOKE ROLE ROLLBACK RULE SAVE +syntax keyword openroadKeyword SAVEPOINT SELECT SET SLEEP SOME SUM SYSTEM TABLE +syntax keyword openroadKeyword THEN TO TRANSACTION UNION UNIQUE UNTIL UPDATE +syntax keyword openroadKeyword VALUES VIEW WHERE WHILE WITH WORK + +syntax keyword openroadTodo contained TODO + +" Catch errors caused by wrong parenthesis +" +syntax cluster openroadParenGroup contains=openroadParenError,openroadTodo +syntax region openroadParen transparent start='(' end=')' contains=ALLBUT,@openroadParenGroup +syntax match openroadParenError ")" +highlight link openroadParenError cError + +" Numbers +" +syntax match openroadNumber "\<[0-9]\+\>" + +" String +" +syntax region openroadString start=+'+ end=+'+ + +" Operators, Data Types and Functions +" +syntax match openroadOperator /[\+\-\*\/=\<\>;\(\)]/ + +syntax keyword openroadType ARRAY BYTE CHAR DATE DECIMAL FLOAT FLOAT4 +syntax keyword openroadType FLOAT8 INT1 INT2 INT4 INTEGER INTEGER1 +syntax keyword openroadType INTEGER2 INTEGER4 MONEY OBJECT_KEY +syntax keyword openroadType SECURITY_LABEL SMALLINT TABLE_KEY VARCHAR + +syntax keyword openroadFunc IFNULL + +" System Classes +" +syntax keyword openroadClass ACTIVEFIELD ANALOGFIELD APPFLAG APPSOURCE +syntax keyword openroadClass ARRAYOBJECT ATTRIBUTEOBJECT BARFIELD +syntax keyword openroadClass BITMAPOBJECT BOXTRIM BREAKSPEC BUTTONFIELD +syntax keyword openroadClass CELLATTRIBUTE CHOICEBITMAP CHOICEDETAIL +syntax keyword openroadClass CHOICEFIELD CHOICEITEM CHOICELIST CLASS +syntax keyword openroadClass CLASSSOURCE COLUMNCROSS COLUMNFIELD +syntax keyword openroadClass COMPOSITEFIELD COMPSOURCE CONTROLBUTTON +syntax keyword openroadClass CROSSTABLE CURSORBITMAP CURSOROBJECT DATASTREAM +syntax keyword openroadClass DATEOBJECT DBEVENTOBJECT DBSESSIONOBJECT +syntax keyword openroadClass DISPLAYFORM DYNEXPR ELLIPSESHAPE ENTRYFIELD +syntax keyword openroadClass ENUMFIELD EVENT EXTOBJECT EXTOBJFIELD +syntax keyword openroadClass FIELDOBJECT FLEXIBLEFORM FLOATOBJECT FORMFIELD +syntax keyword openroadClass FRAMEEXEC FRAMEFORM FRAMESOURCE FREETRIM +syntax keyword openroadClass GHOSTEXEC GHOSTSOURCE IMAGEFIELD IMAGETRIM +syntax keyword openroadClass INTEGEROBJECT LISTFIELD LISTVIEWCOLATTR +syntax keyword openroadClass LISTVIEWFIELD LONGBYTEOBJECT LONGVCHAROBJECT +syntax keyword openroadClass MATRIXFIELD MENUBAR MENUBUTTON MENUFIELD +syntax keyword openroadClass MENUGROUP MENUITEM MENULIST MENUSEPARATOR +syntax keyword openroadClass MENUSTACK MENUTOGGLE METHODEXEC METHODOBJECT +syntax keyword openroadClass MONEYOBJECT OBJECT OPTIONFIELD OPTIONMENU +syntax keyword openroadClass PALETTEFIELD POPUPBUTTON PROC4GLSOURCE PROCEXEC +syntax keyword openroadClass PROCHANDLE QUERYCOL QUERYOBJECT QUERYPARM +syntax keyword openroadClass QUERYTABLE RADIOFIELD RECTANGLESHAPE ROWCROSS +syntax keyword openroadClass SCALARFIELD SCOPE SCROLLBARFIELD SEGMENTSHAPE +syntax keyword openroadClass SESSIONOBJECT SHAPEFIELD SLIDERFIELD SQLSELECT +syntax keyword openroadClass STACKFIELD STRINGOBJECT SUBFORM TABBAR +syntax keyword openroadClass TABFIELD TABFOLDER TABLEFIELD TABPAGE +syntax keyword openroadClass TOGGLEFIELD TREE TREENODE TREEVIEWFIELD +syntax keyword openroadClass USERCLASSOBJECT USEROBJECT VIEWPORTFIELD + +" System Events +" +syntax keyword openroadEvent CHILDCLICK CHILDCLICKPOINT CHILDCOLLAPSED +syntax keyword openroadEvent CHILDDETAILS CHILDDOUBLECLICK CHILDDRAGBOX +syntax keyword openroadEvent CHILDDRAGSEGMENT CHILDENTRY CHILDEXIT +syntax keyword openroadEvent CHILDEXPANDED CHILDHEADERCLICK CHILDMOVED +syntax keyword openroadEvent CHILDPROPERTIES CHILDRESIZED CHILDSCROLL +syntax keyword openroadEvent CHILDSELECT CHILDSELECTIONCHANGED CHILDSETVALUE +syntax keyword openroadEvent CHILDUNSELECT CHILDVALIDATE CLICK CLICKPOINT +syntax keyword openroadEvent COLLAPSED DBEVENT DETAILS DOUBLECLICK DRAGBOX +syntax keyword openroadEvent DRAGSEGMENT ENTRY EXIT EXPANDED EXTCLASSEVENT +syntax keyword openroadEvent FRAMEACTIVATE FRAMEDEACTIVATE HEADERCLICK +syntax keyword openroadEvent INSERTROW LABELCHANGED MOVED PAGEACTIVATED +syntax keyword openroadEvent PAGECHANGED PAGEDEACTIVATED PROPERTIES RESIZED +syntax keyword openroadEvent SCROLL SELECT SELECTIONCHANGED SETVALUE +syntax keyword openroadEvent TERMINATE UNSELECT USEREVENT VALIDATE +syntax keyword openroadEvent WINDOWCLOSE WINDOWICON WINDOWMOVED WINDOWRESIZED +syntax keyword openroadEvent WINDOWVISIBLE + +" System Constants +" +syntax keyword openroadConst BF_BMP BF_GIF BF_SUNRASTER BF_TIFF +syntax keyword openroadConst BF_WINDOWCURSOR BF_WINDOWICON BF_XBM +syntax keyword openroadConst CC_BACKGROUND CC_BLACK CC_BLUE CC_BROWN CC_CYAN +syntax keyword openroadConst CC_DEFAULT_1 CC_DEFAULT_10 CC_DEFAULT_11 +syntax keyword openroadConst CC_DEFAULT_12 CC_DEFAULT_13 CC_DEFAULT_14 +syntax keyword openroadConst CC_DEFAULT_15 CC_DEFAULT_16 CC_DEFAULT_17 +syntax keyword openroadConst CC_DEFAULT_18 CC_DEFAULT_19 CC_DEFAULT_2 +syntax keyword openroadConst CC_DEFAULT_20 CC_DEFAULT_21 CC_DEFAULT_22 +syntax keyword openroadConst CC_DEFAULT_23 CC_DEFAULT_24 CC_DEFAULT_25 +syntax keyword openroadConst CC_DEFAULT_26 CC_DEFAULT_27 CC_DEFAULT_28 +syntax keyword openroadConst CC_DEFAULT_29 CC_DEFAULT_3 CC_DEFAULT_30 +syntax keyword openroadConst CC_DEFAULT_4 CC_DEFAULT_5 CC_DEFAULT_6 +syntax keyword openroadConst CC_DEFAULT_7 CC_DEFAULT_8 CC_DEFAULT_9 +syntax keyword openroadConst CC_FOREGROUND CC_GRAY CC_GREEN CC_LIGHT_BLUE +syntax keyword openroadConst CC_LIGHT_BROWN CC_LIGHT_CYAN CC_LIGHT_GRAY +syntax keyword openroadConst CC_LIGHT_GREEN CC_LIGHT_ORANGE CC_LIGHT_PINK +syntax keyword openroadConst CC_LIGHT_PURPLE CC_LIGHT_RED CC_LIGHT_YELLOW +syntax keyword openroadConst CC_MAGENTA CC_ORANGE CC_PALE_BLUE CC_PALE_BROWN +syntax keyword openroadConst CC_PALE_CYAN CC_PALE_GRAY CC_PALE_GREEN +syntax keyword openroadConst CC_PALE_ORANGE CC_PALE_PINK CC_PALE_PURPLE +syntax keyword openroadConst CC_PALE_RED CC_PALE_YELLOW CC_PINK CC_PURPLE +syntax keyword openroadConst CC_RED CC_SYS_ACTIVEBORDER CC_SYS_ACTIVECAPTION +syntax keyword openroadConst CC_SYS_APPWORKSPACE CC_SYS_BACKGROUND +syntax keyword openroadConst CC_SYS_BTNFACE CC_SYS_BTNSHADOW CC_SYS_BTNTEXT +syntax keyword openroadConst CC_SYS_CAPTIONTEXT CC_SYS_GRAYTEXT +syntax keyword openroadConst CC_SYS_HIGHLIGHT CC_SYS_HIGHLIGHTTEXT +syntax keyword openroadConst CC_SYS_INACTIVEBORDER CC_SYS_INACTIVECAPTION +syntax keyword openroadConst CC_SYS_INACTIVECAPTIONTEXT CC_SYS_MENU +syntax keyword openroadConst CC_SYS_MENUTEXT CC_SYS_SCROLLBAR CC_SYS_SHADOW +syntax keyword openroadConst CC_SYS_WINDOW CC_SYS_WINDOWFRAME +syntax keyword openroadConst CC_SYS_WINDOWTEXT CC_WHITE CC_YELLOW +syntax keyword openroadConst CL_INVALIDVALUE CP_BOTH CP_COLUMNS CP_NONE +syntax keyword openroadConst CP_ROWS CS_CLOSED CS_CURRENT CS_NOCURRENT +syntax keyword openroadConst CS_NO_MORE_ROWS CS_OPEN CS_OPEN_CACHED DC_BW +syntax keyword openroadConst DC_COLOR DP_AUTOSIZE_FIELD DP_CLIP_IMAGE +syntax keyword openroadConst DP_SCALE_IMAGE_H DP_SCALE_IMAGE_HW +syntax keyword openroadConst DP_SCALE_IMAGE_W DS_CONNECTED DS_DISABLED +syntax keyword openroadConst DS_DISCONNECTED DS_INGRES_DBMS DS_NO_DBMS +syntax keyword openroadConst DS_ORACLE_DBMS DS_SQLSERVER_DBMS DV_NULL +syntax keyword openroadConst DV_STRING DV_SYSTEM EH_NEXT_HANDLER EH_RESUME +syntax keyword openroadConst EH_RETRY EP_INTERACTIVE EP_NONE EP_OUTPUT +syntax keyword openroadConst ER_FAIL ER_NAMEEXISTS ER_OK ER_OUTOFRANGE +syntax keyword openroadConst ER_ROWNOTFOUND ER_USER1 ER_USER10 ER_USER2 +syntax keyword openroadConst ER_USER3 ER_USER4 ER_USER5 ER_USER6 ER_USER7 +syntax keyword openroadConst ER_USER8 ER_USER9 FALSE FA_BOTTOMCENTER +syntax keyword openroadConst FA_BOTTOMLEFT FA_BOTTOMRIGHT FA_CENTER +syntax keyword openroadConst FA_CENTERLEFT FA_CENTERRIGHT FA_DEFAULT FA_NONE +syntax keyword openroadConst FA_TOPCENTER FA_TOPLEFT FA_TOPRIGHT +syntax keyword openroadConst FB_CHANGEABLE FB_CLICKPOINT FB_DIMMED FB_DRAGBOX +syntax keyword openroadConst FB_DRAGSEGMENT FB_FLEXIBLE FB_INVISIBLE +syntax keyword openroadConst FB_LANDABLE FB_MARKABLE FB_RESIZEABLE +syntax keyword openroadConst FB_VIEWABLE FB_VISIBLE FC_LOWER FC_NONE FC_UPPER +syntax keyword openroadConst FM_QUERY FM_READ FM_UPDATE FM_USER1 FM_USER2 +syntax keyword openroadConst FM_USER3 FO_DEFAULT FO_HORIZONTAL FO_VERTICAL +syntax keyword openroadConst FP_BITMAP FP_CLEAR FP_CROSSHATCH FP_DARKSHADE +syntax keyword openroadConst FP_DEFAULT FP_HORIZONTAL FP_LIGHTSHADE FP_SHADE +syntax keyword openroadConst FP_SOLID FP_VERTICAL FT_NOTSETVALUE FT_SETVALUE +syntax keyword openroadConst FT_TABTO FT_TAKEFOCUS GF_BOTTOM GF_DEFAULT +syntax keyword openroadConst GF_LEFT GF_RIGHT GF_TOP HC_DOUBLEQUOTE +syntax keyword openroadConst HC_FORMFEED HC_NEWLINE HC_QUOTE HC_SPACE HC_TAB +syntax keyword openroadConst HV_CONTENTS HV_CONTEXT HV_HELPONHELP HV_KEY +syntax keyword openroadConst HV_QUIT LS_3D LS_DASH LS_DASHDOT LS_DASHDOTDOT +syntax keyword openroadConst LS_DEFAULT LS_DOT LS_SOLID LW_DEFAULT +syntax keyword openroadConst LW_EXTRATHIN LW_MAXIMUM LW_MIDDLE LW_MINIMUM +syntax keyword openroadConst LW_NOLINE LW_THICK LW_THIN LW_VERYTHICK +syntax keyword openroadConst LW_VERYTHIN MB_DISABLED MB_ENABLED MB_INVISIBLE +syntax keyword openroadConst MB_MOVEABLE MT_ERROR MT_INFO MT_NONE MT_WARNING +syntax keyword openroadConst OP_APPEND OP_NONE OS3D OS_DEFAULT OS_SHADOW +syntax keyword openroadConst OS_SOLID PU_CANCEL PU_OK QS_ACTIVE QS_INACTIVE +syntax keyword openroadConst QS_SETCOL QY_ARRAY QY_CACHE QY_CURSOR QY_DIRECT +syntax keyword openroadConst RC_CHILDSELECTED RC_DOWN RC_END RC_FIELDFREED +syntax keyword openroadConst RC_FIELDORPHANED RC_GROUPSELECT RC_HOME RC_LEFT +syntax keyword openroadConst RC_MODECHANGED RC_MOUSECLICK RC_MOUSEDRAG +syntax keyword openroadConst RC_NEXT RC_NOTAPPLICABLE RC_PAGEDOWN RC_PAGEUP +syntax keyword openroadConst RC_PARENTSELECTED RC_PREVIOUS RC_PROGRAM +syntax keyword openroadConst RC_RESUME RC_RETURN RC_RIGHT RC_ROWDELETED +syntax keyword openroadConst RC_ROWINSERTED RC_ROWSALLDELETED RC_SELECT +syntax keyword openroadConst RC_TFSCROLL RC_TOGGLESELECT RC_UP RS_CHANGED +syntax keyword openroadConst RS_DELETED RS_NEW RS_UNCHANGED RS_UNDEFINED +syntax keyword openroadConst SK_CLOSE SK_COPY SK_CUT SK_DELETE SK_DETAILS +syntax keyword openroadConst SK_DUPLICATE SK_FIND SK_GO SK_HELP SK_NEXT +syntax keyword openroadConst SK_NONE SK_PASTE SK_PROPS SK_QUIT SK_REDO +syntax keyword openroadConst SK_SAVE SK_TFDELETEALLROWS SK_TFDELETEROW +syntax keyword openroadConst SK_TFFIND SK_TFINSERTROW SK_UNDO SP_APPSTARTING +syntax keyword openroadConst SP_ARROW SP_CROSS SP_IBEAM SP_ICON SP_NO +syntax keyword openroadConst SP_SIZE SP_SIZENESW SP_SIZENS SP_SIZENWSE +syntax keyword openroadConst SP_SIZEWE SP_UPARROW SP_WAIT SY_NT SY_OS2 +syntax keyword openroadConst SY_UNIX SY_VMS SY_WIN95 TF_COURIER TF_HELVETICA +syntax keyword openroadConst TF_LUCIDA TF_MENUDEFAULT TF_NEWCENTURY TF_SYSTEM +syntax keyword openroadConst TF_TIMESROMAN TRUE UE_DATAERROR UE_EXITED +syntax keyword openroadConst UE_NOTACTIVE UE_PURGED UE_RESUMED UE_UNKNOWN +syntax keyword openroadConst WI_MOTIF WI_MSWIN32 WI_MSWINDOWS WI_NONE WI_PM +syntax keyword openroadConst WP_FLOATING WP_INTERACTIVE WP_PARENTCENTERED +syntax keyword openroadConst WP_PARENTRELATIVE WP_SCREENCENTERED +syntax keyword openroadConst WP_SCREENRELATIVE WV_ICON WV_INVISIBLE +syntax keyword openroadConst WV_UNREALIZED WV_VISIBLE + +" System Variables +" +syntax keyword openroadVar CurFrame CurProcedure CurMethod CurObject + +" Identifiers +" +syntax match openroadIdent /[a-zA-Z_][a-zA-Z_]*![a-zA-Z_][a-zA-Z_]*/ + +" Comments +" +if exists("openroad_comment_strings") + syntax match openroadCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region openroadCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" + syntax region openroadComment start="/\*" end="\*/" contains=openroadCommentString,openroadCharacter,openroadNumber + syntax match openroadComment "//.*" contains=openroadComment2String,openroadCharacter,openroadNumber +else + syn region openroadComment start="/\*" end="\*/" + syn match openroadComment "//.*" +endif + +" 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_openroad_syntax_inits") + if version < 508 + let did_openroad_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink openroadKeyword Statement + HiLink openroadNumber Number + HiLink openroadString String + HiLink openroadComment Comment + HiLink openroadOperator Operator + HiLink openroadType Type + HiLink openroadFunc Special + HiLink openroadClass Type + HiLink openroadEvent Statement + HiLink openroadConst Constant + HiLink openroadVar Identifier + HiLink openroadIdent Identifier + HiLink openroadTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "openroad" diff --git a/vim/bundle/ubuntu-vim72/syntax/opl.vim b/vim/bundle/ubuntu-vim72/syntax/opl.vim new file mode 100644 index 0000000..aa3cb9e --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/opl.vim @@ -0,0 +1,96 @@ +" Vim syntax file +" Language: OPL +" Maintainer: Czo +" $Id: opl.vim,v 1.1 2004/06/13 17:34:11 vimboss Exp $ + +" Open Psion Language... (EPOC16/EPOC32) + +" 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 + +" case is not significant +syn case ignore + +" A bunch of useful OPL keywords +syn keyword OPLStatement proc endp abs acos addr adjustalloc alert alloc app +syn keyword OPLStatement append appendsprite asc asin at atan back beep +syn keyword OPLStatement begintrans bookmark break busy byref cache +syn keyword OPLStatement cachehdr cacherec cachetidy call cancel caption +syn keyword OPLStatement changesprite chr$ clearflags close closesprite cls +syn keyword OPLStatement cmd$ committrans compact compress const continue +syn keyword OPLStatement copy cos count create createsprite cursor +syn keyword OPLStatement datetosecs datim$ day dayname$ days daystodate +syn keyword OPLStatement dbuttons dcheckbox dchoice ddate declare dedit +syn keyword OPLStatement deditmulti defaultwin deg delete dfile dfloat +syn keyword OPLStatement dialog diaminit diampos dinit dir$ dlong do dow +syn keyword OPLStatement dposition drawsprite dtext dtime dxinput edit else +syn keyword OPLStatement elseif enda endif endv endwh entersend entersend0 +syn keyword OPLStatement eof erase err err$ errx$ escape eval exist exp ext +syn keyword OPLStatement external find findfield findlib first fix$ flags +syn keyword OPLStatement flt font freealloc gat gborder gbox gbutton +syn keyword OPLStatement gcircle gclock gclose gcls gcolor gcopy gcreate +syn keyword OPLStatement gcreatebit gdrawobject gellipse gen$ get get$ +syn keyword OPLStatement getcmd$ getdoc$ getevent getevent32 geteventa32 +syn keyword OPLStatement geteventc getlibh gfill gfont ggmode ggrey gheight +syn keyword OPLStatement gidentity ginfo ginfo32 ginvert giprint glineby +syn keyword OPLStatement glineto gloadbit gloadfont global gmove gorder +syn keyword OPLStatement goriginx goriginy goto gotomark gpatt gpeekline +syn keyword OPLStatement gpoly gprint gprintb gprintclip grank gsavebit +syn keyword OPLStatement gscroll gsetpenwidth gsetwin gstyle gtmode gtwidth +syn keyword OPLStatement gunloadfont gupdate guse gvisible gwidth gx +syn keyword OPLStatement gxborder gxprint gy hex$ hour iabs icon if include +syn keyword OPLStatement input insert int intf intrans key key$ keya keyc +syn keyword OPLStatement killmark kmod last lclose left$ len lenalloc +syn keyword OPLStatement linklib ln loadlib loadm loc local lock log lopen +syn keyword OPLStatement lower$ lprint max mcard mcasc mean menu mid$ min +syn keyword OPLStatement minit minute mkdir modify month month$ mpopup +syn keyword OPLStatement newobj newobjh next notes num$ odbinfo off onerr +syn keyword OPLStatement open openr opx os parse$ path pause peek pi +syn keyword OPLStatement pointerfilter poke pos position possprite print +syn keyword OPLStatement put rad raise randomize realloc recsize rename +syn keyword OPLStatement rept$ return right$ rmdir rnd rollback sci$ screen +syn keyword OPLStatement screeninfo second secstodate send setdoc setflags +syn keyword OPLStatement setname setpath sin space sqr statuswin +syn keyword OPLStatement statwininfo std stop style sum tan testevent trap +syn keyword OPLStatement type uadd unloadlib unloadm until update upper$ +syn keyword OPLStatement use usr usr$ usub val var vector week while year +" syn keyword OPLStatement rem + + +syn match OPLNumber "\<\d\+\>" +syn match OPLNumber "\<\d\+\.\d*\>" +syn match OPLNumber "\.\d\+\>" + +syn region OPLString start=+"+ end=+"+ +syn region OPLComment start="REM[\t ]" end="$" +syn match OPLMathsOperator "-\|=\|[:<>+\*^/\\]" + +" 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_OPL_syntax_inits") + if version < 508 + let did_OPL_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink OPLStatement Statement + HiLink OPLNumber Number + HiLink OPLString String + HiLink OPLComment Comment + HiLink OPLMathsOperator Conditional +" HiLink OPLError Error + + delcommand HiLink +endif + +let b:current_syntax = "opl" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/ora.vim b/vim/bundle/ubuntu-vim72/syntax/ora.vim new file mode 100644 index 0000000..bf5d322 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/ora.vim @@ -0,0 +1,478 @@ +" Vim syntax file +" Language: Oracle config files (.ora) (Oracle 8i, ver. 8.1.5) +" Maintainer: Sandor Kopanyi +" Url: <-> +" Last Change: 2003 May 11 + +" * the keywords are listed by file (sqlnet.ora, listener.ora, etc.) +" * the parathesis-checking is made at the beginning for all keywords +" * possible values are listed also +" * there are some overlappings (e.g. METHOD is mentioned both for +" sqlnet-ora and tnsnames.ora; since will not cause(?) problems +" is easier to follow separately each file's keywords) + +" Remove any old syntax stuff hanging around, if needed +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'ora' +endif + +syn case ignore + +"comments +syn match oraComment "\#.*" + +" catch errors caused by wrong parenthesis +syn region oraParen transparent start="(" end=")" contains=@oraAll,oraParen +syn match oraParenError ")" + +" strings +syn region oraString start=+"+ end=+"+ + +"common .ora staff + +"common protocol parameters +syn keyword oraKeywordGroup ADDRESS ADDRESS_LIST +syn keyword oraKeywordGroup DESCRIPTION_LIST DESCRIPTION +"all protocols +syn keyword oraKeyword PROTOCOL +syn keyword oraValue ipc tcp nmp +"Bequeath +syn keyword oraKeyword PROGRAM ARGV0 ARGS +"IPC +syn keyword oraKeyword KEY +"Named Pipes +syn keyword oraKeyword SERVER PIPE +"LU6.2 +syn keyword oraKeyword LU_NAME LLU LOCAL_LU LLU_NAME LOCAL_LU_NAME +syn keyword oraKeyword MODE MDN +syn keyword oraKeyword PLU PARTNER_LU_NAME PLU_LA PARTNER_LU_LOCAL_ALIAS +syn keyword oraKeyword TP_NAME TPN +"SPX +syn keyword oraKeyword SERVICE +"TCP/IP and TCP/IP with SSL +syn keyword oraKeyword HOST PORT + +"misc. keywords I've met but didn't find in manual (maybe they are deprecated?) +syn keyword oraKeywordGroup COMMUNITY_LIST +syn keyword oraKeyword COMMUNITY NAME DEFAULT_ZONE +syn keyword oraValue tcpcom + +"common values +syn keyword oraValue yes no on off true false null all none ok +"word 'world' is used a lot... +syn keyword oraModifier world + +"misc. common keywords +syn keyword oraKeyword TRACE_DIRECTORY TRACE_LEVEL TRACE_FILE + + +"sqlnet.ora +syn keyword oraKeywordPref NAMES NAMESCTL +syn keyword oraKeywordPref OSS SOURCE SQLNET TNSPING +syn keyword oraKeyword AUTOMATIC_IPC BEQUEATH_DETACH DAEMON TRACE_MASK +syn keyword oraKeyword DISABLE_OOB +syn keyword oraKeyword LOG_DIRECTORY_CLIENT LOG_DIRECTORY_SERVER +syn keyword oraKeyword LOG_FILE_CLIENT LOG_FILE_SERVER +syn keyword oraKeyword DCE PREFIX DEFAULT_DOMAIN DIRECTORY_PATH +syn keyword oraKeyword INITIAL_RETRY_TIMEOUT MAX_OPEN_CONNECTIONS +syn keyword oraKeyword MESSAGE_POOL_START_SIZE NIS META_MAP +syn keyword oraKeyword PASSWORD PREFERRED_SERVERS REQUEST_RETRIES +syn keyword oraKeyword INTERNAL_ENCRYPT_PASSWORD INTERNAL_USE +syn keyword oraKeyword NO_INITIAL_SERVER NOCONFIRM +syn keyword oraKeyword SERVER_PASSWORD TRACE_UNIQUE MY_WALLET +syn keyword oraKeyword LOCATION DIRECTORY METHOD METHOD_DATA +syn keyword oraKeyword SQLNET_ADDRESS +syn keyword oraKeyword AUTHENTICATION_SERVICES +syn keyword oraKeyword AUTHENTICATION_KERBEROS5_SERVICE +syn keyword oraKeyword AUTHENTICATION_GSSAPI_SERVICE +syn keyword oraKeyword CLIENT_REGISTRATION +syn keyword oraKeyword CRYPTO_CHECKSUM_CLIENT CRYPTO_CHECKSUM_SERVER +syn keyword oraKeyword CRYPTO_CHECKSUM_TYPES_CLIENT CRYPTO_CHECKSUM_TYPES_SERVER +syn keyword oraKeyword CRYPTO_SEED +syn keyword oraKeyword ENCRYPTION_CLIENT ENCRYPTION_SERVER +syn keyword oraKeyword ENCRYPTION_TYPES_CLIENT ENCRYPTION_TYPES_SERVER +syn keyword oraKeyword EXPIRE_TIME +syn keyword oraKeyword IDENTIX_FINGERPRINT_DATABASE IDENTIX_FINGERPRINT_DATABASE_USER +syn keyword oraKeyword IDENTIX_FINGERPRINT_DATABASE_PASSWORD IDENTIX_FINGERPRINT_METHOD +syn keyword oraKeyword KERBEROS5_CC_NAME KERBEROS5_CLOCKSKEW KERBEROS5_CONF +syn keyword oraKeyword KERBEROS5_KEYTAB KERBEROS5_REALMS +syn keyword oraKeyword RADIUS_ALTERNATE RADIUS_ALTERNATE_PORT RADIUS_ALTERNATE_RETRIES +syn keyword oraKeyword RADIUS_AUTHENTICATION_TIMEOUT RADIUS_AUTHENTICATION +syn keyword oraKeyword RADIUS_AUTHENTICATION_INTERFACE RADIUS_AUTHENTICATION_PORT +syn keyword oraKeyword RADIUS_AUTHENTICATION_RETRIES RADIUS_AUTHENTICATION_TIMEOUT +syn keyword oraKeyword RADIUS_CHALLENGE_RESPONSE RADIUS_SECRET RADIUS_SEND_ACCOUNTING +syn keyword oraKeyword SSL_CLIENT_AUTHENTICATION SSL_CIPHER_SUITES SSL_VERSION +syn keyword oraKeyword TRACE_DIRECTORY_CLIENT TRACE_DIRECTORY_SERVER +syn keyword oraKeyword TRACE_FILE_CLIENT TRACE_FILE_SERVER +syn keyword oraKeyword TRACE_LEVEL_CLIENT TRACE_LEVEL_SERVER +syn keyword oraKeyword TRACE_UNIQUE_CLIENT +syn keyword oraKeyword USE_CMAN USE_DEDICATED_SERVER +syn keyword oraValue user admin support +syn keyword oraValue accept accepted reject rejected requested required +syn keyword oraValue md5 rc4_40 rc4_56 rc4_128 des des_40 +syn keyword oraValue tnsnames onames hostname dce nis novell +syn keyword oraValue file oracle +syn keyword oraValue oss +syn keyword oraValue beq nds nts kerberos5 securid cybersafe identix dcegssapi radius +syn keyword oraValue undetermined + +"tnsnames.ora +syn keyword oraKeywordGroup CONNECT_DATA FAILOVER_MODE +syn keyword oraKeyword FAILOVER LOAD_BALANCE SOURCE_ROUTE TYPE_OF_SERVICE +syn keyword oraKeyword BACKUP TYPE METHOD GLOBAL_NAME HS +syn keyword oraKeyword INSTANCE_NAME RDB_DATABASE SDU SERVER +syn keyword oraKeyword SERVICE_NAME SERVICE_NAMES SID +syn keyword oraKeyword HANDLER_NAME EXTPROC_CONNECTION_DATA +syn keyword oraValue session select basic preconnect dedicated shared + +"listener.ora +syn keyword oraKeywordGroup SID_LIST SID_DESC PRESPAWN_LIST PRESPAWN_DESC +syn match oraKeywordGroup "SID_LIST_\w*" +syn keyword oraKeyword PROTOCOL_STACK PRESENTATION SESSION +syn keyword oraKeyword GLOBAL_DBNAME ORACLE_HOME PROGRAM SID_NAME +syn keyword oraKeyword PRESPAWN_MAX POOL_SIZE TIMEOUT +syn match oraKeyword "CONNECT_TIMEOUT_\w*" +syn match oraKeyword "LOG_DIRECTORY_\w*" +syn match oraKeyword "LOG_FILE_\w*" +syn match oraKeyword "PASSWORDS_\w*" +syn match oraKeyword "STARTUP_WAIT_TIME_\w*" +syn match oraKeyword "STARTUP_WAITTIME_\w*" +syn match oraKeyword "TRACE_DIRECTORY_\w*" +syn match oraKeyword "TRACE_FILE_\w*" +syn match oraKeyword "TRACE_LEVEL_\w*" +syn match oraKeyword "USE_PLUG_AND_PLAY_\w*" +syn keyword oraValue ttc giop ns raw + +"names.ora +syn keyword oraKeywordGroup ADDRESSES ADMIN_REGION +syn keyword oraKeywordGroup DEFAULT_FORWARDERS FORWARDER_LIST FORWARDER +syn keyword oraKeywordGroup DOMAIN_HINTS HINT_DESC HINT_LIST +syn keyword oraKeywordGroup DOMAINS DOMAIN_LIST DOMAIN +syn keyword oraKeywordPref NAMES +syn keyword oraKeyword EXPIRE REFRESH REGION RETRY USERID VERSION +syn keyword oraKeyword AUTHORITY_REQUIRED CONNECT_TIMEOUT +syn keyword oraKeyword AUTO_REFRESH_EXPIRE AUTO_REFRESH_RETRY +syn keyword oraKeyword CACHE_CHECKPOINT_FILE CACHE_CHECKPOINT_INTERVAL +syn keyword oraKeyword CONFIG_CHECKPOINT_FILE DEFAULT_FORWARDERS_ONLY +syn keyword oraKeyword HINT FORWARDING_AVAILABLE FORWARDING_DESIRED +syn keyword oraKeyword KEEP_DB_OPEN +syn keyword oraKeyword LOG_DIRECTORY LOG_FILE LOG_STATS_INTERVAL LOG_UNIQUE +syn keyword oraKeyword MAX_OPEN_CONNECTIONS MAX_REFORWARDS +syn keyword oraKeyword MESSAGE_POOL_START_SIZE +syn keyword oraKeyword NO_MODIFY_REQUESTS NO_REGION_DATABASE +syn keyword oraKeyword PASSWORD REGION_CHECKPOINT_FILE +syn keyword oraKeyword RESET_STATS_INTERVAL SAVE_CONFIG_ON_STOP +syn keyword oraKeyword SERVER_NAME TRACE_FUNC TRACE_UNIQUE + +"cman.ora +syn keyword oraKeywordGroup CMAN CMAN_ADMIN CMAN_PROFILE PARAMETER_LIST +syn keyword oraKeywordGroup CMAN_RULES RULES_LIST RULE +syn keyword oraKeyword ANSWER_TIMEOUT AUTHENTICATION_LEVEL LOG_LEVEL +syn keyword oraKeyword MAX_FREELIST_BUFFERS MAXIMUM_CONNECT_DATA MAXIMUM_RELAYS +syn keyword oraKeyword RELAY_STATISTICS SHOW_TNS_INFO TRACING +syn keyword oraKeyword USE_ASYNC_CALL SRC DST SRV ACT + +"protocol.ora +syn match oraKeyword "\w*\.EXCLUDED_NODES" +syn match oraKeyword "\w*\.INVITED_NODES" +syn match oraKeyword "\w*\.VALIDNODE_CHECKING" +syn keyword oraKeyword TCP NODELAY + + + + +"--------------------------------------- +"init.ora + +"common values +syn keyword oraValue nested_loops merge hash unlimited + +"init params +syn keyword oraKeyword O7_DICTIONARY_ACCESSIBILITY ALWAYS_ANTI_JOIN ALWAYS_SEMI_JOIN +syn keyword oraKeyword AQ_TM_PROCESSES ARCH_IO_SLAVES AUDIT_FILE_DEST AUDIT_TRAIL +syn keyword oraKeyword BACKGROUND_CORE_DUMP BACKGROUND_DUMP_DEST +syn keyword oraKeyword BACKUP_TAPE_IO_SLAVES BITMAP_MERGE_AREA_SIZE +syn keyword oraKeyword BLANK_TRIMMING BUFFER_POOL_KEEP BUFFER_POOL_RECYCLE +syn keyword oraKeyword COMMIT_POINT_STRENGTH COMPATIBLE CONTROL_FILE_RECORD_KEEP_TIME +syn keyword oraKeyword CONTROL_FILES CORE_DUMP_DEST CPU_COUNT +syn keyword oraKeyword CREATE_BITMAP_AREA_SIZE CURSOR_SPACE_FOR_TIME +syn keyword oraKeyword DB_BLOCK_BUFFERS DB_BLOCK_CHECKING DB_BLOCK_CHECKSUM +syn keyword oraKeyword DB_BLOCK_LRU_LATCHES DB_BLOCK_MAX_DIRTY_TARGET +syn keyword oraKeyword DB_BLOCK_SIZE DB_DOMAIN +syn keyword oraKeyword DB_FILE_DIRECT_IO_COUNT DB_FILE_MULTIBLOCK_READ_COUNT +syn keyword oraKeyword DB_FILE_NAME_CONVERT DB_FILE_SIMULTANEOUS_WRITES +syn keyword oraKeyword DB_FILES DB_NAME DB_WRITER_PROCESSES +syn keyword oraKeyword DBLINK_ENCRYPT_LOGIN DBWR_IO_SLAVES +syn keyword oraKeyword DELAYED_LOGGING_BLOCK_CLEANOUTS DISCRETE_TRANSACTIONS_ENABLED +syn keyword oraKeyword DISK_ASYNCH_IO DISTRIBUTED_TRANSACTIONS +syn keyword oraKeyword DML_LOCKS ENQUEUE_RESOURCES ENT_DOMAIN_NAME EVENT +syn keyword oraKeyword FAST_START_IO_TARGET FAST_START_PARALLEL_ROLLBACK +syn keyword oraKeyword FIXED_DATE FREEZE_DB_FOR_FAST_INSTANCE_RECOVERY +syn keyword oraKeyword GC_DEFER_TIME GC_FILES_TO_LOCKS GC_RELEASABLE_LOCKS GC_ROLLBACK_LOCKS +syn keyword oraKeyword GLOBAL_NAMES HASH_AREA_SIZE +syn keyword oraKeyword HASH_JOIN_ENABLED HASH_MULTIBLOCK_IO_COUNT +syn keyword oraKeyword HI_SHARED_MEMORY_ADDRESS HS_AUTOREGISTER +syn keyword oraKeyword IFILE +syn keyword oraKeyword INSTANCE_GROUPS INSTANCE_NAME INSTANCE_NUMBER +syn keyword oraKeyword JAVA_POOL_SIZE JOB_QUEUE_INTERVAL JOB_QUEUE_PROCESSES LARGE_POOL_SIZE +syn keyword oraKeyword LICENSE_MAX_SESSIONS LICENSE_MAX_USERS LICENSE_SESSIONS_WARNING +syn keyword oraKeyword LM_LOCKS LM_PROCS LM_RESS +syn keyword oraKeyword LOCAL_LISTENER LOCK_NAME_SPACE LOCK_SGA LOCK_SGA_AREAS +syn keyword oraKeyword LOG_ARCHIVE_BUFFER_SIZE LOG_ARCHIVE_BUFFERS LOG_ARCHIVE_DEST +syn match oraKeyword "LOG_ARCHIVE_DEST_\(1\|2\|3\|4\|5\)" +syn match oraKeyword "LOG_ARCHIVE_DEST_STATE_\(1\|2\|3\|4\|5\)" +syn keyword oraKeyword LOG_ARCHIVE_DUPLEX_DEST LOG_ARCHIVE_FORMAT LOG_ARCHIVE_MAX_PROCESSES +syn keyword oraKeyword LOG_ARCHIVE_MIN_SUCCEED_DEST LOG_ARCHIVE_START +syn keyword oraKeyword LOG_BUFFER LOG_CHECKPOINT_INTERVAL LOG_CHECKPOINT_TIMEOUT +syn keyword oraKeyword LOG_CHECKPOINTS_TO_ALERT LOG_FILE_NAME_CONVERT +syn keyword oraKeyword MAX_COMMIT_PROPAGATION_DELAY MAX_DUMP_FILE_SIZE +syn keyword oraKeyword MAX_ENABLED_ROLES MAX_ROLLBACK_SEGMENTS +syn keyword oraKeyword MTS_DISPATCHERS MTS_MAX_DISPATCHERS MTS_MAX_SERVERS MTS_SERVERS +syn keyword oraKeyword NLS_CALENDAR NLS_COMP NLS_CURRENCY NLS_DATE_FORMAT +syn keyword oraKeyword NLS_DATE_LANGUAGE NLS_DUAL_CURRENCY NLS_ISO_CURRENCY NLS_LANGUAGE +syn keyword oraKeyword NLS_NUMERIC_CHARACTERS NLS_SORT NLS_TERRITORY +syn keyword oraKeyword OBJECT_CACHE_MAX_SIZE_PERCENT OBJECT_CACHE_OPTIMAL_SIZE +syn keyword oraKeyword OPEN_CURSORS OPEN_LINKS OPEN_LINKS_PER_INSTANCE +syn keyword oraKeyword OPS_ADMINISTRATION_GROUP +syn keyword oraKeyword OPTIMIZER_FEATURES_ENABLE OPTIMIZER_INDEX_CACHING +syn keyword oraKeyword OPTIMIZER_INDEX_COST_ADJ OPTIMIZER_MAX_PERMUTATIONS +syn keyword oraKeyword OPTIMIZER_MODE OPTIMIZER_PERCENT_PARALLEL +syn keyword oraKeyword OPTIMIZER_SEARCH_LIMIT +syn keyword oraKeyword ORACLE_TRACE_COLLECTION_NAME ORACLE_TRACE_COLLECTION_PATH +syn keyword oraKeyword ORACLE_TRACE_COLLECTION_SIZE ORACLE_TRACE_ENABLE +syn keyword oraKeyword ORACLE_TRACE_FACILITY_NAME ORACLE_TRACE_FACILITY_PATH +syn keyword oraKeyword OS_AUTHENT_PREFIX OS_ROLES +syn keyword oraKeyword PARALLEL_ADAPTIVE_MULTI_USER PARALLEL_AUTOMATIC_TUNING +syn keyword oraKeyword PARALLEL_BROADCAST_ENABLED PARALLEL_EXECUTION_MESSAGE_SIZE +syn keyword oraKeyword PARALLEL_INSTANCE_GROUP PARALLEL_MAX_SERVERS +syn keyword oraKeyword PARALLEL_MIN_PERCENT PARALLEL_MIN_SERVERS +syn keyword oraKeyword PARALLEL_SERVER PARALLEL_SERVER_INSTANCES PARALLEL_THREADS_PER_CPU +syn keyword oraKeyword PARTITION_VIEW_ENABLED PLSQL_V2_COMPATIBILITY +syn keyword oraKeyword PRE_PAGE_SGA PROCESSES +syn keyword oraKeyword QUERY_REWRITE_ENABLED QUERY_REWRITE_INTEGRITY +syn keyword oraKeyword RDBMS_SERVER_DN READ_ONLY_OPEN_DELAYED RECOVERY_PARALLELISM +syn keyword oraKeyword REMOTE_DEPENDENCIES_MODE REMOTE_LOGIN_PASSWORDFILE +syn keyword oraKeyword REMOTE_OS_AUTHENT REMOTE_OS_ROLES +syn keyword oraKeyword REPLICATION_DEPENDENCY_TRACKING +syn keyword oraKeyword RESOURCE_LIMIT RESOURCE_MANAGER_PLAN +syn keyword oraKeyword ROLLBACK_SEGMENTS ROW_LOCKING SERIAL _REUSE SERVICE_NAMES +syn keyword oraKeyword SESSION_CACHED_CURSORS SESSION_MAX_OPEN_FILES SESSIONS +syn keyword oraKeyword SHADOW_CORE_DUMP +syn keyword oraKeyword SHARED_MEMORY_ADDRESS SHARED_POOL_RESERVED_SIZE SHARED_POOL_SIZE +syn keyword oraKeyword SORT_AREA_RETAINED_SIZE SORT_AREA_SIZE SORT_MULTIBLOCK_READ_COUNT +syn keyword oraKeyword SQL92_SECURITY SQL_TRACE STANDBY_ARCHIVE_DEST +syn keyword oraKeyword STAR_TRANSFORMATION_ENABLED TAPE_ASYNCH_IO THREAD +syn keyword oraKeyword TIMED_OS_STATISTICS TIMED_STATISTICS +syn keyword oraKeyword TRANSACTION_AUDITING TRANSACTIONS TRANSACTIONS_PER_ROLLBACK_SEGMENT +syn keyword oraKeyword USE_INDIRECT_DATA_BUFFERS USER_DUMP_DEST +syn keyword oraKeyword UTL_FILE_DIR +syn keyword oraKeywordObs ALLOW_PARTIAL_SN_RESULTS B_TREE_BITMAP_PLANS +syn keyword oraKeywordObs BACKUP_DISK_IO_SLAVES CACHE_SIZE_THRESHOLD +syn keyword oraKeywordObs CCF_IO_SIZE CLEANUP_ROLLBACK_ENTRIES +syn keyword oraKeywordObs CLOSE_CACHED_OPEN_CURSORS COMPATIBLE_NO_RECOVERY +syn keyword oraKeywordObs COMPLEX_VIEW_MERGING +syn keyword oraKeywordObs DB_BLOCK_CHECKPOINT_BATCH DB_BLOCK_LRU_EXTENDED_STATISTICS +syn keyword oraKeywordObs DB_BLOCK_LRU_STATISTICS +syn keyword oraKeywordObs DISTRIBUTED_LOCK_TIMEOUT DISTRIBUTED_RECOVERY_CONNECTION_HOLD_TIME +syn keyword oraKeywordObs FAST_FULL_SCAN_ENABLED GC_LATCHES GC_LCK_PROCS +syn keyword oraKeywordObs LARGE_POOL_MIN_ALLOC LGWR_IO_SLAVES +syn keyword oraKeywordObs LOG_BLOCK_CHECKSUM LOG_FILES +syn keyword oraKeywordObs LOG_SIMULTANEOUS_COPIES LOG_SMALL_ENTRY_MAX_SIZE +syn keyword oraKeywordObs MAX_TRANSACTION_BRANCHES +syn keyword oraKeywordObs MTS_LISTENER_ADDRESS MTS_MULTIPLE_LISTENERS +syn keyword oraKeywordObs MTS_RATE_LOG_SIZE MTS_RATE_SCALE MTS_SERVICE +syn keyword oraKeywordObs OGMS_HOME OPS_ADMIN_GROUP +syn keyword oraKeywordObs PARALLEL_DEFAULT_MAX_INSTANCES PARALLEL_MIN_MESSAGE_POOL +syn keyword oraKeywordObs PARALLEL_SERVER_IDLE_TIME PARALLEL_TRANSACTION_RESOURCE_TIMEOUT +syn keyword oraKeywordObs PUSH_JOIN_PREDICATE REDUCE_ALARM ROW_CACHE_CURSORS +syn keyword oraKeywordObs SEQUENCE_CACHE_ENTRIES SEQUENCE_CACHE_HASH_BUCKETS +syn keyword oraKeywordObs SHARED_POOL_RESERVED_MIN_ALLOC +syn keyword oraKeywordObs SORT_DIRECT_WRITES SORT_READ_FAC SORT_SPACEMAP_SIZE +syn keyword oraKeywordObs SORT_WRITE_BUFFER_SIZE SORT_WRITE_BUFFERS +syn keyword oraKeywordObs SPIN_COUNT TEMPORARY_TABLE_LOCKS USE_ISM +syn keyword oraValue db os full partial mandatory optional reopen enable defer +syn keyword oraValue always default intent disable dml plsql temp_disable +syn match oravalue "Arabic Hijrah" +syn match oravalue "English Hijrah" +syn match oravalue "Gregorian" +syn match oravalue "Japanese Imperial" +syn match oravalue "Persian" +syn match oravalue "ROC Official" +syn match oravalue "Thai Buddha" +syn match oravalue "8.0.0" +syn match oravalue "8.0.3" +syn match oravalue "8.0.4" +syn match oravalue "8.1.3" +syn match oraModifier "archived log" +syn match oraModifier "backup corruption" +syn match oraModifier "backup datafile" +syn match oraModifier "backup piece " +syn match oraModifier "backup redo log" +syn match oraModifier "backup set" +syn match oraModifier "copy corruption" +syn match oraModifier "datafile copy" +syn match oraModifier "deleted object" +syn match oraModifier "loghistory" +syn match oraModifier "offline range" + +"undocumented init params +"up to 7.2 (inclusive) +syn keyword oraKeywordUndObs _latch_spin_count _trace_instance_termination +syn keyword oraKeywordUndObs _wakeup_timeout _lgwr_async_write +"7.3 +syn keyword oraKeywordUndObs _standby_lock_space_name _enable_dba_locking +"8.0.5 +syn keyword oraKeywordUnd _NUMA_instance_mapping _NUMA_pool_size +syn keyword oraKeywordUnd _advanced_dss_features _affinity_on _all_shared_dblinks +syn keyword oraKeywordUnd _allocate_creation_order _allow_resetlogs_corruption +syn keyword oraKeywordUnd _always_star_transformation _bump_highwater_mark_count +syn keyword oraKeywordUnd _column_elimination_off _controlfile_enqueue_timeout +syn keyword oraKeywordUnd _corrupt_blocks_on_stuck_recovery _corrupted_rollback_segments +syn keyword oraKeywordUnd _cr_deadtime _cursor_db_buffers_pinned +syn keyword oraKeywordUnd _db_block_cache_clone _db_block_cache_map _db_block_cache_protect +syn keyword oraKeywordUnd _db_block_hash_buckets _db_block_hi_priority_batch_size +syn keyword oraKeywordUnd _db_block_max_cr_dba _db_block_max_scan_cnt +syn keyword oraKeywordUnd _db_block_med_priority_batch_size _db_block_no_idle_writes +syn keyword oraKeywordUnd _db_block_write_batch _db_handles _db_handles_cached +syn keyword oraKeywordUnd _db_large_dirty_queue _db_no_mount_lock +syn keyword oraKeywordUnd _db_writer_histogram_statistics _db_writer_scan_depth +syn keyword oraKeywordUnd _db_writer_scan_depth_decrement _db_writer_scan_depth_increment +syn keyword oraKeywordUnd _disable_incremental_checkpoints +syn keyword oraKeywordUnd _disable_latch_free_SCN_writes_via_32cas +syn keyword oraKeywordUnd _disable_latch_free_SCN_writes_via_64cas +syn keyword oraKeywordUnd _disable_logging _disable_ntlog_events +syn keyword oraKeywordUnd _dss_cache_flush _dynamic_stats_threshold +syn keyword oraKeywordUnd _enable_cscn_caching _enable_default_affinity +syn keyword oraKeywordUnd _enqueue_debug_multi_instance _enqueue_hash +syn keyword oraKeywordUnd _enqueue_hash_chain_latches _enqueue_locks +syn keyword oraKeywordUnd _fifth_spare_parameter _first_spare_parameter _fourth_spare_parameter +syn keyword oraKeywordUnd _gc_class_locks _groupby_nopushdown_cut_ratio +syn keyword oraKeywordUnd _idl_conventional_index_maintenance _ignore_failed_escalates +syn keyword oraKeywordUnd _init_sql_file +syn keyword oraKeywordUnd _io_slaves_disabled _ioslave_batch_count _ioslave_issue_count +syn keyword oraKeywordUnd _kgl_bucket_count _kgl_latch_count _kgl_multi_instance_invalidation +syn keyword oraKeywordUnd _kgl_multi_instance_lock _kgl_multi_instance_pin +syn keyword oraKeywordUnd _latch_miss_stat_sid _latch_recovery_alignment _latch_wait_posting +syn keyword oraKeywordUnd _lm_ast_option _lm_direct_sends _lm_dlmd_procs _lm_domains _lm_groups +syn keyword oraKeywordUnd _lm_non_fault_tolerant _lm_send_buffers _lm_statistics _lm_xids +syn keyword oraKeywordUnd _log_blocks_during_backup _log_buffers_debug _log_checkpoint_recovery_check +syn keyword oraKeywordUnd _log_debug_multi_instance _log_entry_prebuild_threshold _log_io_size +syn keyword oraKeywordUnd _log_space_errors +syn keyword oraKeywordUnd _max_exponential_sleep _max_sleep_holding_latch +syn keyword oraKeywordUnd _messages _minimum_giga_scn _mts_load_constants _nested_loop_fudge +syn keyword oraKeywordUnd _no_objects _no_or_expansion +syn keyword oraKeywordUnd _number_cached_attributes _offline_rollback_segments _open_files_limit +syn keyword oraKeywordUnd _optimizer_undo_changes +syn keyword oraKeywordUnd _oracle_trace_events _oracle_trace_facility_version +syn keyword oraKeywordUnd _ordered_nested_loop _parallel_server_sleep_time +syn keyword oraKeywordUnd _passwordfile_enqueue_timeout _pdml_slaves_diff_part +syn keyword oraKeywordUnd _plsql_dump_buffer_events _predicate_elimination_enabled +syn keyword oraKeywordUnd _project_view_columns +syn keyword oraKeywordUnd _px_broadcast_fudge_factor _px_broadcast_trace _px_dop_limit_degree +syn keyword oraKeywordUnd _px_dop_limit_threshold _px_kxfr_granule_allocation _px_kxib_tracing +syn keyword oraKeywordUnd _release_insert_threshold _reuse_index_loop +syn keyword oraKeywordUnd _rollback_segment_count _rollback_segment_initial +syn keyword oraKeywordUnd _row_cache_buffer_size _row_cache_instance_locks +syn keyword oraKeywordUnd _save_escalates _scn_scheme +syn keyword oraKeywordUnd _second_spare_parameter _session_idle_bit_latches +syn keyword oraKeywordUnd _shared_session_sort_fetch_buffer _single_process +syn keyword oraKeywordUnd _small_table_threshold _sql_connect_capability_override +syn keyword oraKeywordUnd _sql_connect_capability_table +syn keyword oraKeywordUnd _test_param_1 _test_param_2 _test_param_3 +syn keyword oraKeywordUnd _third_spare_parameter _tq_dump_period +syn keyword oraKeywordUnd _trace_archive_dest _trace_archive_start _trace_block_size +syn keyword oraKeywordUnd _trace_buffers_per_process _trace_enabled _trace_events +syn keyword oraKeywordUnd _trace_file_size _trace_files_public _trace_flushing _trace_write_batch_size +syn keyword oraKeywordUnd _upconvert_from_ast _use_vector_post _wait_for_sync _walk_insert_threshold +"dunno which version; may be 8.1.x, may be obsoleted +syn keyword oraKeywordUndObs _arch_io_slaves _average_dirties_half_life _b_tree_bitmap_plans +syn keyword oraKeywordUndObs _backup_disk_io_slaves _backup_io_pool_size +syn keyword oraKeywordUndObs _cleanup_rollback_entries _close_cached_open_cursors +syn keyword oraKeywordUndObs _compatible_no_recovery _complex_view_merging +syn keyword oraKeywordUndObs _cpu_to_io _cr_server +syn keyword oraKeywordUndObs _db_aging_cool_count _db_aging_freeze_cr _db_aging_hot_criteria +syn keyword oraKeywordUndObs _db_aging_stay_count _db_aging_touch_time +syn keyword oraKeywordUndObs _db_percent_hot_default _db_percent_hot_keep _db_percent_hot_recycle +syn keyword oraKeywordUndObs _db_writer_chunk_writes _db_writer_max_writes +syn keyword oraKeywordUndObs _dbwr_async_io _dbwr_tracing +syn keyword oraKeywordUndObs _defer_multiple_waiters _discrete_transaction_enabled +syn keyword oraKeywordUndObs _distributed_lock_timeout _distributed_recovery _distribited_recovery_ +syn keyword oraKeywordUndObs _domain_index_batch_size _domain_index_dml_batch_size +syn keyword oraKeywordUndObs _enable_NUMA_optimization _enable_block_level_transaction_recovery +syn keyword oraKeywordUndObs _enable_list_io _enable_multiple_sampling +syn keyword oraKeywordUndObs _fairness_treshold _fast_full_scan_enabled _foreground_locks +syn keyword oraKeywordUndObs _full_pwise_join_enabled _gc_latches _gc_lck_procs +syn keyword oraKeywordUndObs _high_server_treshold _index_prefetch_factor _kcl_debug +syn keyword oraKeywordUndObs _kkfi_trace _large_pool_min_alloc _lazy_freelist_close _left_nested_loops_random +syn keyword oraKeywordUndObs _lgwr_async_io _lgwr_io_slaves _lock_sga_areas +syn keyword oraKeywordUndObs _log_archive_buffer_size _log_archive_buffers _log_simultaneous_copies +syn keyword oraKeywordUndObs _low_server_treshold _max_transaction_branches +syn keyword oraKeywordUndObs _mts_rate_log_size _mts_rate_scale +syn keyword oraKeywordUndObs _mview_cost_rewrite _mview_rewrite_2 +syn keyword oraKeywordUndObs _ncmb_readahead_enabled _ncmb_readahead_tracing +syn keyword oraKeywordUndObs _ogms_home +syn keyword oraKeywordUndObs _parallel_adaptive_max_users _parallel_default_max_instances +syn keyword oraKeywordUndObs _parallel_execution_message_align _parallel_fake_class_pct +syn keyword oraKeywordUndObs _parallel_load_bal_unit _parallel_load_balancing +syn keyword oraKeywordUndObs _parallel_min_message_pool _parallel_recovery_stopat +syn keyword oraKeywordUndObs _parallel_server_idle_time _parallelism_cost_fudge_factor +syn keyword oraKeywordUndObs _partial_pwise_join_enabled _pdml_separate_gim _push_join_predicate +syn keyword oraKeywordUndObs _px_granule_size _px_index_sampling _px_load_publish_interval +syn keyword oraKeywordUndObs _px_max_granules_per_slave _px_min_granules_per_slave _px_no_stealing +syn keyword oraKeywordUndObs _row_cache_cursors _serial_direct_read _shared_pool_reserved_min_alloc +syn keyword oraKeywordUndObs _sort_space_for_write_buffers _spin_count _system_trig_enabled +syn keyword oraKeywordUndObs _trace_buffer_flushes _trace_cr_buffer_creates _trace_multi_block_reads +syn keyword oraKeywordUndObs _transaction_recovery_servers _use_ism _yield_check_interval + + +syn cluster oraAll add=oraKeyword,oraKeywordGroup,oraKeywordPref,oraKeywordObs,oraKeywordUnd,oraKeywordUndObs +syn cluster oraAll add=oraValue,oraModifier,oraString,oraSpecial,oraComment + +"============================================================================== +" 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_ora_syn_inits") + + if version < 508 + let did_ora_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink oraKeyword Statement "usual keywords + HiLink oraKeywordGroup Type "keywords which group other keywords + HiLink oraKeywordPref oraKeywordGroup "keywords which act as prefixes + HiLink oraKeywordObs Todo "obsolete keywords + HiLink oraKeywordUnd PreProc "undocumented keywords + HiLink oraKeywordUndObs oraKeywordObs "undocumented obsolete keywords + HiLink oraValue Identifier "values, like true or false + HiLink oraModifier oraValue "modifies values + HiLink oraString String "strings + + HiLink oraSpecial Special "special characters + HiLink oraError Error "errors + HiLink oraParenError oraError "errors caused by mismatching parantheses + + HiLink oraComment Comment "comments + + delcommand HiLink +endif + + + +let b:current_syntax = "ora" + +if main_syntax == 'ora' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/pamconf.vim b/vim/bundle/ubuntu-vim72/syntax/pamconf.vim new file mode 100644 index 0000000..46cd3c3 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/pamconf.vim @@ -0,0 +1,118 @@ +" Vim syntax file +" Language: pam(8) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn match pamconfService '^[[:graph:]]\+' + \ nextgroup=pamconfType, + \ pamconfServiceLineCont skipwhite + +syn keyword pamconfTodo contained TODO FIXME XXX NOTE + +syn region pamconfComment display oneline start='#' end='$' + \ contains=pamconfTodo,@Spell + +syn match pamconfServiceLineCont contained '\\$' + \ nextgroup=pamconfType, + \ pamconfServiceLineCont skipwhite skipnl + +syn keyword pamconfType account auth password session + \ nextgroup=pamconfControl, + \ pamconfTypeLineCont skipwhite + +syn match pamconfTypeLineCont contained '\\$' + \ nextgroup=pamconfControl, + \ pamconfTypeLineCont skipwhite skipnl + +syn keyword pamconfControl contained requisite required sufficient + \ optional + \ nextgroup=pamconfMPath, + \ pamconfControlLineContH skipwhite + +syn match pamconfControlBegin '\[' nextgroup=pamconfControlValues, + \ pamconfControlLineCont skipwhite + +syn match pamconfControlLineCont contained '\\$' + \ nextgroup=pamconfControlValues, + \ pamconfControlLineCont skipwhite skipnl + +syn keyword pamconfControlValues contained success open_err symbol_err + \ service_err system_err buf_err + \ perm_denied auth_err cred_insufficient + \ authinfo_unavail user_unknown maxtries + \ new_authtok_reqd acct_expired session_err + \ cred_unavail cred_expired cred_err + \ no_module_data conv_err authtok_err + \ authtok_recover_err authtok_lock_busy + \ authtok_disable_aging try_again ignore + \ abort authtok_expired module_unknown + \ bad_item and default + \ nextgroup=pamconfControlValueEq + +syn match pamconfControlValueEq contained '=' nextgroup=pamconfControlAction + +syn match pamconfControlActionN contained '\d\+\>' + \ nextgroup=pamconfControlValues, + \ pamconfControlLineCont,pamconfControlEnd + \ skipwhite +syn keyword pamconfControlAction contained ignore bad die ok done reset + \ nextgroup=pamconfControlValues, + \ pamconfControlLineCont,pamconfControlEnd + \ skipwhite + +syn match pamconfControlEnd contained '\]' + \ nextgroup=pamconfMPath, + \ pamconfControlLineContH skipwhite + +syn match pamconfControlLineContH contained '\\$' + \ nextgroup=pamconfMPath, + \ pamconfControlLineContH skipwhite skipnl + +syn match pamconfMPath contained '\S\+' + \ nextgroup=pamconfMPathLineCont, + \ pamconfArgs skipwhite + +syn match pamconfArgs contained '\S\+' + \ nextgroup=pamconfArgsLineCont, + \ pamconfArgs skipwhite + +syn match pamconfMPathLineCont contained '\\$' + \ nextgroup=pamconfMPathLineCont, + \ pamconfArgs skipwhite skipnl + +syn match pamconfArgsLineCont contained '\\$' + \ nextgroup=pamconfArgsLineCont, + \ pamconfArgs skipwhite skipnl + +hi def link pamconfTodo Todo +hi def link pamconfComment Comment +hi def link pamconfService Statement +hi def link pamconfServiceLineCont Special +hi def link pamconfType Type +hi def link pamconfTypeLineCont pamconfServiceLineCont +hi def link pamconfControl Macro +hi def link pamconfControlBegin Delimiter +hi def link pamconfControlLineContH pamconfServiceLineCont +hi def link pamconfControlLineCont pamconfServiceLineCont +hi def link pamconfControlValues Identifier +hi def link pamconfControlValueEq Operator +hi def link pamconfControlActionN Number +hi def link pamconfControlAction Identifier +hi def link pamconfControlEnd Delimiter +hi def link pamconfMPath String +hi def link pamconfMPathLineCont pamconfServiceLineCont +hi def link pamconfArgs Normal +hi def link pamconfArgsLineCont pamconfServiceLineCont + +let b:current_syntax = "pamconf" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/papp.vim b/vim/bundle/ubuntu-vim72/syntax/papp.vim new file mode 100644 index 0000000..d86dce6 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/papp.vim @@ -0,0 +1,93 @@ +" Vim syntax file for the "papp" file format (_p_erl _app_lication) +" +" Language: papp +" Maintainer: Marc Lehmann +" Last Change: 2009 Nov 11 +" Filenames: *.papp *.pxml *.pxsl +" URL: http://papp.plan9.de/ + +" You can set the "papp_include_html" variable so that html will be +" rendered as such inside phtml sections (in case you actually put html +" there - papp does not require that). Also, rendering html tends to keep +" the clutter high on the screen - mixing three languages is difficult +" enough(!). PS: it is also slow. + +" pod is, btw, allowed everywhere, which is actually wrong :( + +" 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 + +" source is basically xml, with included html (this is common) and perl bits +if version < 600 + so :p:h/xml.vim +else + runtime! syntax/xml.vim +endif +unlet b:current_syntax + +if exists("papp_include_html") + if version < 600 + syn include @PAppHtml :p:h/html.vim + else + syn include @PAppHtml syntax/html.vim + endif + unlet b:current_syntax + syntax spell default " added by Bram +endif + +if version < 600 + syn include @PAppPerl :p:h/perl.vim +else + syn include @PAppPerl syntax/perl.vim +endif + +if v:version >= 600 + syn cluster xmlFoldCluster add=papp_perl,papp_xperl,papp_phtml,papp_pxml,papp_perlPOD +endif + +" preprocessor commands +syn region papp_prep matchgroup=papp_prep start="^#\s*\(if\|elsif\)" end="$" keepend contains=@perlExpr contained +syn match papp_prep /^#\s*\(else\|endif\|??\).*$/ contained +" translation entries +syn region papp_gettext start=/__"/ end=/"/ contained contains=@papp_perlInterpDQ +syn cluster PAppHtml add=papp_gettext,papp_prep + +" add special, paired xperl, perl and phtml tags +syn region papp_perl matchgroup=xmlTag start="" end="" contains=papp_CDATAp,@PAppPerl keepend +syn region papp_xperl matchgroup=xmlTag start="" end="" contains=papp_CDATAp,@PAppPerl keepend +syn region papp_phtml matchgroup=xmlTag start="" end="" contains=papp_CDATAh,papp_ph_perl,papp_ph_html,papp_ph_hint,@PAppHtml keepend +syn region papp_pxml matchgroup=xmlTag start="" end="" contains=papp_CDATAx,papp_ph_perl,papp_ph_xml,papp_ph_xint keepend +syn region papp_perlPOD start="^=[a-z]" end="^=cut" contains=@Pod,perlTodo keepend + +" cdata sections +syn region papp_CDATAp matchgroup=xmlCdataDecl start="" contains=@PAppPerl contained keepend +syn region papp_CDATAh matchgroup=xmlCdataDecl start="" contains=papp_ph_perl,papp_ph_html,papp_ph_hint,@PAppHtml contained keepend +syn region papp_CDATAx matchgroup=xmlCdataDecl start="" contains=papp_ph_perl,papp_ph_xml,papp_ph_xint contained keepend + +syn region papp_ph_perl matchgroup=Delimiter start="<[:?]" end="[:?]>"me=e-2 nextgroup=papp_ph_html contains=@PAppPerl contained keepend +syn region papp_ph_html matchgroup=Delimiter start=":>" end="<[:?]"me=e-2 nextgroup=papp_ph_perl contains=@PAppHtml contained keepend +syn region papp_ph_hint matchgroup=Delimiter start="?>" end="<[:?]"me=e-2 nextgroup=papp_ph_perl contains=@perlInterpDQ,@PAppHtml contained keepend +syn region papp_ph_xml matchgroup=Delimiter start=":>" end="<[:?]"me=e-2 nextgroup=papp_ph_perl contains= contained keepend +syn region papp_ph_xint matchgroup=Delimiter start="?>" end="<[:?]"me=e-2 nextgroup=papp_ph_perl contains=@perlInterpDQ contained keepend + +" synchronization is horrors! +syn sync clear +syn sync match pappSync grouphere papp_CDATAh "" +syn sync match pappSync grouphere papp_CDATAh "^# *\(if\|elsif\|else\|endif\)" +syn sync match pappSync grouphere papp_CDATAh "" +syn sync match pappSync grouphere NONE "" + +syn sync maxlines=300 +syn sync minlines=5 + +" The default highlighting. + +hi def link papp_prep preCondit +hi def link papp_gettext String + +let b:current_syntax = "papp" diff --git a/vim/bundle/ubuntu-vim72/syntax/pascal.vim b/vim/bundle/ubuntu-vim72/syntax/pascal.vim new file mode 100644 index 0000000..d2b6060 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/pascal.vim @@ -0,0 +1,373 @@ +" Vim syntax file +" Language: Pascal +" Version: 2.8 +" Last Change: 2004/10/17 17:47:30 +" Maintainer: Xavier Crégut +" Previous Maintainer: Mario Eusebio + +" Contributors: Tim Chase , +" Stas Grabois , +" Mazen NEIFER , +" Klaus Hast , +" Austin Ziegler , +" Markus Koenig + +" 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 sync lines=250 + +syn keyword pascalBoolean true false +syn keyword pascalConditional if else then +syn keyword pascalConstant nil maxint +syn keyword pascalLabel case goto label +syn keyword pascalOperator and div downto in mod not of or packed with +syn keyword pascalRepeat do for do repeat while to until +syn keyword pascalStatement procedure function +syn keyword pascalStatement program begin end const var type +syn keyword pascalStruct record +syn keyword pascalType array boolean char integer file pointer real set +syn keyword pascalType string text variant + + + " 20011222az: Added new items. +syn keyword pascalTodo contained TODO FIXME XXX DEBUG NOTE + + " 20010723az: When wanted, highlight the trailing whitespace -- this is + " based on c_space_errors; to enable, use "pascal_space_errors". +if exists("pascal_space_errors") + if !exists("pascal_no_trail_space_error") + syn match pascalSpaceError "\s\+$" + endif + if !exists("pascal_no_tab_space_error") + syn match pascalSpaceError " \+\t"me=e-1 + endif +endif + + + +" String +if !exists("pascal_one_line_string") + syn region pascalString matchgroup=pascalString start=+'+ end=+'+ contains=pascalStringEscape + if exists("pascal_gpc") + syn region pascalString matchgroup=pascalString start=+"+ end=+"+ contains=pascalStringEscapeGPC + else + syn region pascalStringError matchgroup=pascalStringError start=+"+ end=+"+ contains=pascalStringEscape + endif +else + "wrong strings + syn region pascalStringError matchgroup=pascalStringError start=+'+ end=+'+ end=+$+ contains=pascalStringEscape + if exists("pascal_gpc") + syn region pascalStringError matchgroup=pascalStringError start=+"+ end=+"+ end=+$+ contains=pascalStringEscapeGPC + else + syn region pascalStringError matchgroup=pascalStringError start=+"+ end=+"+ end=+$+ contains=pascalStringEscape + endif + + "right strings + syn region pascalString matchgroup=pascalString start=+'+ end=+'+ oneline contains=pascalStringEscape + " To see the start and end of strings: + " syn region pascalString matchgroup=pascalStringError start=+'+ end=+'+ oneline contains=pascalStringEscape + if exists("pascal_gpc") + syn region pascalString matchgroup=pascalString start=+"+ end=+"+ oneline contains=pascalStringEscapeGPC + else + syn region pascalStringError matchgroup=pascalStringError start=+"+ end=+"+ oneline contains=pascalStringEscape + endif +end +syn match pascalStringEscape contained "''" +syn match pascalStringEscapeGPC contained '""' + + +" syn match pascalIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>" + + +if exists("pascal_symbol_operator") + syn match pascalSymbolOperator "[+\-/*=]" + syn match pascalSymbolOperator "[<>]=\=" + syn match pascalSymbolOperator "<>" + syn match pascalSymbolOperator ":=" + syn match pascalSymbolOperator "[()]" + syn match pascalSymbolOperator "\.\." + syn match pascalSymbolOperator "[\^.]" + syn match pascalMatrixDelimiter "[][]" + "if you prefer you can highlight the range + "syn match pascalMatrixDelimiter "[\d\+\.\.\d\+]" +endif + +syn match pascalNumber "-\=\<\d\+\>" +syn match pascalFloat "-\=\<\d\+\.\d\+\>" +syn match pascalFloat "-\=\<\d\+\.\d\+[eE]-\=\d\+\>" +syn match pascalHexNumber "\$[0-9a-fA-F]\+\>" + +if exists("pascal_no_tabs") + syn match pascalShowTab "\t" +endif + +syn region pascalComment start="(\*\|{" end="\*)\|}" contains=pascalTodo,pascalSpaceError + + +if !exists("pascal_no_functions") + " array functions + syn keyword pascalFunction pack unpack + + " memory function + syn keyword pascalFunction Dispose New + + " math functions + syn keyword pascalFunction Abs Arctan Cos Exp Ln Sin Sqr Sqrt + + " file functions + syn keyword pascalFunction Eof Eoln Write Writeln + syn keyword pascalPredefined Input Output + + if exists("pascal_traditional") + " These functions do not seem to be defined in Turbo Pascal + syn keyword pascalFunction Get Page Put + endif + + " ordinal functions + syn keyword pascalFunction Odd Pred Succ + + " transfert functions + syn keyword pascalFunction Chr Ord Round Trunc +endif + + +if !exists("pascal_traditional") + + syn keyword pascalStatement constructor destructor implementation inherited + syn keyword pascalStatement interface unit uses + syn keyword pascalModifier absolute assembler external far forward inline + syn keyword pascalModifier interrupt near virtual + syn keyword pascalAcces private public + syn keyword pascalStruct object + syn keyword pascalOperator shl shr xor + + syn region pascalPreProc start="(\*\$" end="\*)" contains=pascalTodo + syn region pascalPreProc start="{\$" end="}" + + syn region pascalAsm matchgroup=pascalAsmKey start="\" end="\" contains=pascalComment,pascalPreProc + + syn keyword pascalType ShortInt LongInt Byte Word + syn keyword pascalType ByteBool WordBool LongBool + syn keyword pascalType Cardinal LongWord + syn keyword pascalType Single Double Extended Comp + syn keyword pascalType PChar + + + if !exists ("pascal_fpc") + syn keyword pascalPredefined Result + endif + + if exists("pascal_fpc") + syn region pascalComment start="//" end="$" contains=pascalTodo,pascalSpaceError + syn keyword pascalStatement fail otherwise operator + syn keyword pascalDirective popstack + syn keyword pascalPredefined self + syn keyword pascalType ShortString AnsiString WideString + endif + + if exists("pascal_gpc") + syn keyword pascalType SmallInt + syn keyword pascalType AnsiChar + syn keyword pascalType PAnsiChar + endif + + if exists("pascal_delphi") + syn region pascalComment start="//" end="$" contains=pascalTodo,pascalSpaceError + syn keyword pascalType SmallInt Int64 + syn keyword pascalType Real48 Currency + syn keyword pascalType AnsiChar WideChar + syn keyword pascalType ShortString AnsiString WideString + syn keyword pascalType PAnsiChar PWideChar + syn match pascalFloat "-\=\<\d\+\.\d\+[dD]-\=\d\+\>" + syn match pascalStringEscape contained "#[12][0-9]\=[0-9]\=" + syn keyword pascalStruct class dispinterface + syn keyword pascalException try except raise at on finally + syn keyword pascalStatement out + syn keyword pascalStatement library package + syn keyword pascalStatement initialization finalization uses exports + syn keyword pascalStatement property out resourcestring threadvar + syn keyword pascalModifier contains + syn keyword pascalModifier overridden reintroduce abstract + syn keyword pascalModifier override export dynamic name message + syn keyword pascalModifier dispid index stored default nodefault readonly + syn keyword pascalModifier writeonly implements overload requires resident + syn keyword pascalAcces protected published automated + syn keyword pascalDirective register pascal cvar cdecl stdcall safecall + syn keyword pascalOperator as is + endif + + if exists("pascal_no_functions") + "syn keyword pascalModifier read write + "may confuse with Read and Write functions. Not easy to handle. + else + " control flow functions + syn keyword pascalFunction Break Continue Exit Halt RunError + + " ordinal functions + syn keyword pascalFunction Dec Inc High Low + + " math functions + syn keyword pascalFunction Frac Int Pi + + " string functions + syn keyword pascalFunction Concat Copy Delete Insert Length Pos Str Val + + " memory function + syn keyword pascalFunction FreeMem GetMem MaxAvail MemAvail + + " pointer and address functions + syn keyword pascalFunction Addr Assigned CSeg DSeg Ofs Ptr Seg SPtr SSeg + + " misc functions + syn keyword pascalFunction Exclude FillChar Hi Include Lo Move ParamCount + syn keyword pascalFunction ParamStr Random Randomize SizeOf Swap TypeOf + syn keyword pascalFunction UpCase + + " predefined variables + syn keyword pascalPredefined ErrorAddr ExitCode ExitProc FileMode FreeList + syn keyword pascalPredefined FreeZero HeapEnd HeapError HeapOrg HeapPtr + syn keyword pascalPredefined InOutRes OvrCodeList OvrDebugPtr OvrDosHandle + syn keyword pascalPredefined OvrEmsHandle OvrHeapEnd OvrHeapOrg OvrHeapPtr + syn keyword pascalPredefined OvrHeapSize OvrLoadList PrefixSeg RandSeed + syn keyword pascalPredefined SaveInt00 SaveInt02 SaveInt1B SaveInt21 + syn keyword pascalPredefined SaveInt23 SaveInt24 SaveInt34 SaveInt35 + syn keyword pascalPredefined SaveInt36 SaveInt37 SaveInt38 SaveInt39 + syn keyword pascalPredefined SaveInt3A SaveInt3B SaveInt3C SaveInt3D + syn keyword pascalPredefined SaveInt3E SaveInt3F SaveInt75 SegA000 SegB000 + syn keyword pascalPredefined SegB800 SelectorInc StackLimit Test8087 + + " file functions + syn keyword pascalFunction Append Assign BlockRead BlockWrite ChDir Close + syn keyword pascalFunction Erase FilePos FileSize Flush GetDir IOResult + syn keyword pascalFunction MkDir Read Readln Rename Reset Rewrite RmDir + syn keyword pascalFunction Seek SeekEof SeekEoln SetTextBuf Truncate + + " crt unit + syn keyword pascalFunction AssignCrt ClrEol ClrScr Delay DelLine GotoXY + syn keyword pascalFunction HighVideo InsLine KeyPressed LowVideo NormVideo + syn keyword pascalFunction NoSound ReadKey Sound TextBackground TextColor + syn keyword pascalFunction TextMode WhereX WhereY Window + syn keyword pascalPredefined CheckBreak CheckEOF CheckSnow DirectVideo + syn keyword pascalPredefined LastMode TextAttr WindMin WindMax + syn keyword pascalFunction BigCursor CursorOff CursorOn + syn keyword pascalConstant Black Blue Green Cyan Red Magenta Brown + syn keyword pascalConstant LightGray DarkGray LightBlue LightGreen + syn keyword pascalConstant LightCyan LightRed LightMagenta Yellow White + syn keyword pascalConstant Blink ScreenWidth ScreenHeight bw40 + syn keyword pascalConstant co40 bw80 co80 mono + syn keyword pascalPredefined TextChar + + " DOS unit + syn keyword pascalFunction AddDisk DiskFree DiskSize DosExitCode DosVersion + syn keyword pascalFunction EnvCount EnvStr Exec Expand FindClose FindFirst + syn keyword pascalFunction FindNext FSearch FSplit GetCBreak GetDate + syn keyword pascalFunction GetEnv GetFAttr GetFTime GetIntVec GetTime + syn keyword pascalFunction GetVerify Intr Keep MSDos PackTime SetCBreak + syn keyword pascalFunction SetDate SetFAttr SetFTime SetIntVec SetTime + syn keyword pascalFunction SetVerify SwapVectors UnPackTime + syn keyword pascalConstant FCarry FParity FAuxiliary FZero FSign FOverflow + syn keyword pascalConstant Hidden Sysfile VolumeId Directory Archive + syn keyword pascalConstant AnyFile fmClosed fmInput fmOutput fmInout + syn keyword pascalConstant TextRecNameLength TextRecBufSize + syn keyword pascalType ComStr PathStr DirStr NameStr ExtStr SearchRec + syn keyword pascalType FileRec TextBuf TextRec Registers DateTime + syn keyword pascalPredefined DosError + + "Graph Unit + syn keyword pascalFunction Arc Bar Bar3D Circle ClearDevice ClearViewPort + syn keyword pascalFunction CloseGraph DetectGraph DrawPoly Ellipse + syn keyword pascalFunction FillEllipse FillPoly FloodFill GetArcCoords + syn keyword pascalFunction GetAspectRatio GetBkColor GetColor + syn keyword pascalFunction GetDefaultPalette GetDriverName GetFillPattern + syn keyword pascalFunction GetFillSettings GetGraphMode GetImage + syn keyword pascalFunction GetLineSettings GetMaxColor GetMaxMode GetMaxX + syn keyword pascalFunction GetMaxY GetModeName GetModeRange GetPalette + syn keyword pascalFunction GetPaletteSize GetPixel GetTextSettings + syn keyword pascalFunction GetViewSettings GetX GetY GraphDefaults + syn keyword pascalFunction GraphErrorMsg GraphResult ImageSize InitGraph + syn keyword pascalFunction InstallUserDriver InstallUserFont Line LineRel + syn keyword pascalFunction LineTo MoveRel MoveTo OutText OutTextXY + syn keyword pascalFunction PieSlice PutImage PutPixel Rectangle + syn keyword pascalFunction RegisterBGIDriver RegisterBGIFont + syn keyword pascalFunction RestoreCRTMode Sector SetActivePage + syn keyword pascalFunction SetAllPallette SetAspectRatio SetBkColor + syn keyword pascalFunction SetColor SetFillPattern SetFillStyle + syn keyword pascalFunction SetGraphBufSize SetGraphMode SetLineStyle + syn keyword pascalFunction SetPalette SetRGBPalette SetTextJustify + syn keyword pascalFunction SetTextStyle SetUserCharSize SetViewPort + syn keyword pascalFunction SetVisualPage SetWriteMode TextHeight TextWidth + syn keyword pascalType ArcCoordsType FillPatternType FillSettingsType + syn keyword pascalType LineSettingsType PaletteType PointType + syn keyword pascalType TextSettingsType ViewPortType + + " string functions + syn keyword pascalFunction StrAlloc StrBufSize StrCat StrComp StrCopy + syn keyword pascalFunction StrDispose StrECopy StrEnd StrFmt StrIComp + syn keyword pascalFunction StrLCat StrLComp StrLCopy StrLen StrLFmt + syn keyword pascalFunction StrLIComp StrLower StrMove StrNew StrPas + syn keyword pascalFunction StrPCopy StrPLCopy StrPos StrRScan StrScan + syn keyword pascalFunction StrUpper + endif + +endif + +" 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_pascal_syn_inits") + if version < 508 + let did_pascal_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink pascalAcces pascalStatement + HiLink pascalBoolean Boolean + HiLink pascalComment Comment + HiLink pascalConditional Conditional + HiLink pascalConstant Constant + HiLink pascalDelimiter Identifier + HiLink pascalDirective pascalStatement + HiLink pascalException Exception + HiLink pascalFloat Float + HiLink pascalFunction Function + HiLink pascalLabel Label + HiLink pascalMatrixDelimiter Identifier + HiLink pascalModifier Type + HiLink pascalNumber Number + HiLink pascalOperator Operator + HiLink pascalPredefined pascalStatement + HiLink pascalPreProc PreProc + HiLink pascalRepeat Repeat + HiLink pascalSpaceError Error + HiLink pascalStatement Statement + HiLink pascalString String + HiLink pascalStringEscape Special + HiLink pascalStringEscapeGPC Special + HiLink pascalStringError Error + HiLink pascalStruct pascalStatement + HiLink pascalSymbolOperator pascalOperator + HiLink pascalTodo Todo + HiLink pascalType Type + HiLink pascalUnclassified pascalStatement + " HiLink pascalAsm Assembler + HiLink pascalError Error + HiLink pascalAsmKey pascalStatement + HiLink pascalShowTab Error + + delcommand HiLink +endif + + +let b:current_syntax = "pascal" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/passwd.vim b/vim/bundle/ubuntu-vim72/syntax/passwd.vim new file mode 100644 index 0000000..cdaed58 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/passwd.vim @@ -0,0 +1,71 @@ +" Vim syntax file +" Language: passwd(5) password file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-10-03 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn match passwdBegin display '^' nextgroup=passwdAccount + +syn match passwdAccount contained display '[^:]\+' + \ nextgroup=passwdPasswordColon + +syn match passwdPasswordColon contained display ':' + \ nextgroup=passwdPassword,passwdShadow + +syn match passwdPassword contained display '[^:]\+' + \ nextgroup=passwdUIDColon + +syn match passwdShadow contained display '[x*!]' + \ nextgroup=passwdUIDColon + +syn match passwdUIDColon contained display ':' nextgroup=passwdUID + +syn match passwdUID contained display '\d\{0,10}' + \ nextgroup=passwdGIDColon + +syn match passwdGIDColon contained display ':' nextgroup=passwdGID + +syn match passwdGID contained display '\d\{0,10}' + \ nextgroup=passwdGecosColon + +syn match passwdGecosColon contained display ':' nextgroup=passwdGecos + +syn match passwdGecos contained display '[^:]*' + \ nextgroup=passwdDirColon + +syn match passwdDirColon contained display ':' nextgroup=passwdDir + +syn match passwdDir contained display '/[^:]*' + \ nextgroup=passwdShellColon + +syn match passwdShellColon contained display ':' + \ nextgroup=passwdShell + +syn match passwdShell contained display '.*' + +hi def link passwdColon Normal +hi def link passwdAccount Identifier +hi def link passwdPasswordColon passwdColon +hi def link passwdPassword Number +hi def link passwdShadow Special +hi def link passwdUIDColon passwdColon +hi def link passwdUID Number +hi def link passwdGIDColon passwdColon +hi def link passwdGID Number +hi def link passwdGecosColon passwdColon +hi def link passwdGecos Comment +hi def link passwdDirColon passwdColon +hi def link passwdDir Type +hi def link passwdShellColon passwdColon +hi def link passwdShell Operator + +let b:current_syntax = "passwd" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/pcap.vim b/vim/bundle/ubuntu-vim72/syntax/pcap.vim new file mode 100644 index 0000000..17d0d42 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/pcap.vim @@ -0,0 +1,65 @@ +" Vim syntax file +" Config file: printcap +" Maintainer: Lennart Schultz (defunct) +" Modified by Bram +" Last Change: 2003 May 11 + +" 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 + +"define keywords +if version < 600 + set isk=@,46-57,_,-,#,=,192-255 +else + setlocal isk=@,46-57,_,-,#,=,192-255 +endif + +"first all the bad guys +syn match pcapBad '^.\+$' "define any line as bad +syn match pcapBadword '\k\+' contained "define any sequence of keywords as bad +syn match pcapBadword ':' contained "define any single : as bad +syn match pcapBadword '\\' contained "define any single \ as bad +"then the good boys +" Boolean keywords +syn match pcapKeyword contained ':\(fo\|hl\|ic\|rs\|rw\|sb\|sc\|sf\|sh\)' +" Numeric Keywords +syn match pcapKeyword contained ':\(br\|du\|fc\|fs\|mx\|pc\|pl\|pw\|px\|py\|xc\|xs\)#\d\+' +" String Keywords +syn match pcapKeyword contained ':\(af\|cf\|df\|ff\|gf\|if\|lf\|lo\|lp\|nd\|nf\|of\|rf\|rg\|rm\|rp\|sd\|st\|tf\|tr\|vf\)=\k*' +" allow continuation +syn match pcapEnd ':\\$' contained +" +syn match pcapDefineLast '^\s.\+$' contains=pcapBadword,pcapKeyword +syn match pcapDefine '^\s.\+$' contains=pcapBadword,pcapKeyword,pcapEnd +syn match pcapHeader '^\k[^|]\+\(|\k[^|]\+\)*:\\$' +syn match pcapComment "#.*$" + +syn sync minlines=50 + + +" 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_pcap_syntax_inits") + if version < 508 + let did_pcap_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink pcapBad WarningMsg + HiLink pcapBadword WarningMsg + HiLink pcapComment Comment + + delcommand HiLink +endif + +let b:current_syntax = "pcap" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/pccts.vim b/vim/bundle/ubuntu-vim72/syntax/pccts.vim new file mode 100644 index 0000000..8341f5b --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/pccts.vim @@ -0,0 +1,106 @@ +" Vim syntax file +" Language: PCCTS +" Maintainer: Scott Bigham +" Last Change: 10 Aug 1999 + +" 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 + +" Read the C++ syntax to start with +if version < 600 + syn include @cppTopLevel :p:h/cpp.vim +else + syn include @cppTopLevel syntax/cpp.vim +endif + +syn region pcctsAction matchgroup=pcctsDelim start="<<" end=">>?\=" contains=@cppTopLevel,pcctsRuleRef + +syn region pcctsArgBlock matchgroup=pcctsDelim start="\(>\s*\)\=\[" end="\]" contains=@cppTopLevel,pcctsRuleRef + +syn region pcctsString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=pcctsSpecialChar +syn match pcctsSpecialChar "\\\\\|\\\"" contained + +syn region pcctsComment start="/\*" end="\*/" contains=cTodo +syn match pcctsComment "//.*$" contains=cTodo + +syn region pcctsDirective start="^\s*#header\s\+<<" end=">>" contains=pcctsAction keepend +syn match pcctsDirective "^\s*#parser\>.*$" contains=pcctsString,pcctsComment +syn match pcctsDirective "^\s*#tokdefs\>.*$" contains=pcctsString,pcctsComment +syn match pcctsDirective "^\s*#token\>.*$" contains=pcctsString,pcctsAction,pcctsTokenName,pcctsComment +syn region pcctsDirective start="^\s*#tokclass\s\+[A-Z]\i*\s\+{" end="}" contains=pcctsString,pcctsTokenName +syn match pcctsDirective "^\s*#lexclass\>.*$" contains=pcctsTokenName +syn region pcctsDirective start="^\s*#errclass\s\+[^{]\+\s\+{" end="}" contains=pcctsString,pcctsTokenName +syn match pcctsDirective "^\s*#pred\>.*$" contains=pcctsTokenName,pcctsAction + +syn cluster pcctsInRule contains=pcctsString,pcctsRuleName,pcctsTokenName,pcctsAction,pcctsArgBlock,pcctsSubRule,pcctsLabel,pcctsComment + +syn region pcctsRule start="\<[a-z][A-Za-z0-9_]*\>\(\s*\[[^]]*\]\)\=\(\s*>\s*\[[^]]*\]\)\=\s*:" end=";" contains=@pcctsInRule + +syn region pcctsSubRule matchgroup=pcctsDelim start="(" end=")\(+\|\*\|?\(\s*=>\)\=\)\=" contains=@pcctsInRule contained +syn region pcctsSubRule matchgroup=pcctsDelim start="{" end="}" contains=@pcctsInRule contained + +syn match pcctsRuleName "\<[a-z]\i*\>" contained +syn match pcctsTokenName "\<[A-Z]\i*\>" contained + +syn match pcctsLabel "\<\I\i*:\I\i*" contained contains=pcctsLabelHack,pcctsRuleName,pcctsTokenName +syn match pcctsLabel "\<\I\i*:\"\([^\\]\|\\.\)*\"" contained contains=pcctsLabelHack,pcctsString +syn match pcctsLabelHack "\<\I\i*:" contained + +syn match pcctsRuleRef "\$\I\i*\>" contained +syn match pcctsRuleRef "\$\d\+\(\.\d\+\)\>" contained + +syn keyword pcctsClass class nextgroup=pcctsClassName skipwhite +syn match pcctsClassName "\<\I\i*\>" contained nextgroup=pcctsClassBlock skipwhite skipnl +syn region pcctsClassBlock start="{" end="}" contained contains=pcctsRule,pcctsComment,pcctsDirective,pcctsAction,pcctsException,pcctsExceptionHandler + +syn keyword pcctsException exception nextgroup=pcctsExceptionRuleRef skipwhite +syn match pcctsExceptionRuleRef "\[\I\i*\]" contained contains=pcctsExceptionID +syn match pcctsExceptionID "\I\i*" contained +syn keyword pcctsExceptionHandler catch default +syn keyword pcctsExceptionHandler NoViableAlt NoSemViableAlt +syn keyword pcctsExceptionHandler MismatchedToken + +syn sync clear +syn sync match pcctsSyncAction grouphere pcctsAction "<<" +syn sync match pcctsSyncAction "<<\([^>]\|>[^>]\)*>>" +syn sync match pcctsSyncRule grouphere pcctsRule "\<[a-z][A-Za-z0-9_]*\>\s*\[[^]]*\]\s*:" +syn sync match pcctsSyncRule grouphere pcctsRule "\<[a-z][A-Za-z0-9_]*\>\(\s*\[[^]]*\]\)\=\s*>\s*\[[^]]*\]\s*:" + +" 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_pccts_syntax_inits") + if version < 508 + let did_pccts_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink pcctsDelim Special + HiLink pcctsTokenName Identifier + HiLink pcctsRuleName Statement + HiLink pcctsLabelHack Label + HiLink pcctsDirective PreProc + HiLink pcctsString String + HiLink pcctsComment Comment + HiLink pcctsClass Statement + HiLink pcctsClassName Identifier + HiLink pcctsException Statement + HiLink pcctsExceptionHandler Keyword + HiLink pcctsExceptionRuleRef pcctsDelim + HiLink pcctsExceptionID Identifier + HiLink pcctsRuleRef Identifier + HiLink pcctsSpecialChar SpecialChar + + delcommand HiLink +endif + +let b:current_syntax = "pccts" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/pdf.vim b/vim/bundle/ubuntu-vim72/syntax/pdf.vim new file mode 100644 index 0000000..86d80da --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/pdf.vim @@ -0,0 +1,73 @@ +" Vim syntax file +" Language: PDF +" Maintainer: Tim Pope +" Last Change: 2007 Dec 16 + +if exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'pdf' +endif + +syn include @pdfXML syntax/xml.vim + +syn case match + +syn cluster pdfObjects contains=pdfBoolean,pdfConstant,pdfNumber,pdfFloat,pdfName,pdfHexString,pdfString,pdfArray,pdfHash,pdfReference,pdfComment +syn keyword pdfBoolean true false contained +syn keyword pdfConstant null contained +syn match pdfNumber "[+-]\=\<\d\+\>" +syn match pdfFloat "[+-]\=\<\%(\d\+\.\|\d*\.\d\+\)\>" contained + +syn match pdfNameError "#\X\|#\x\X\|#00" contained containedin=pdfName +syn match pdfSpecialChar "#\x\x" contained containedin=pdfName +syn match pdfName "/[^[:space:]\[\](){}<>/]*" contained +syn match pdfHexError "[^[:space:][:xdigit:]<>]" contained +"syn match pdfHexString "<\s*\x[^<>]*\x\s*>" contained contains=pdfHexError +"syn match pdfHexString "<\s*\x\=\s*>" contained +syn region pdfHexString matchgroup=pdfDelimiter start="<<\@!" end=">" contained contains=pdfHexError +syn match pdfStringError "\\." contained containedin=pdfString +syn match pdfSpecialChar "\\\%(\o\{1,3\}\|[nrtbf()\\]\)" contained containedin=pdfString +syn region pdfString matchgroup=pdfDelimiter start="\\\@>" contains=@pdfObjects contained +syn match pdfReference "\<\d\+\s\+\d\+\s\+R\>" +"syn keyword pdfOperator R contained containedin=pdfReference + +syn region pdfObject matchgroup=pdfType start="\" end="\" contains=@pdfObjects +syn region pdfObject matchgroup=pdfType start="\ +" Last Change: 2006 November 23 +" Location: http://www.van-laarhoven.org/vim/syntax/perl.vim +" +" Please download most recent version first before mailing +" any comments. +" See also the file perl.vim.regression.pl to check whether your +" modifications work in the most odd cases +" http://www.van-laarhoven.org/vim/syntax/perl.vim.regression.pl +" +" Original version: Sonia Heimann +" Thanks to many people for their contribution. + +" The following parameters are available for tuning the +" perl syntax highlighting, with defaults given: +" +" unlet perl_include_pod +" unlet perl_want_scope_in_variables +" unlet perl_extended_vars +" unlet perl_string_as_statement +" unlet perl_no_sync_on_sub +" unlet perl_no_sync_on_global_var +" let perl_sync_dist = 100 +" unlet perl_fold +" unlet perl_fold_blocks +" let perl_nofold_packages = 1 +" let perl_nofold_subs = 1 + +" Remove any old syntax stuff that was loaded (5.x) or quit when a syntax file +" was already loaded (6.x). +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Unset perl_fold if it set but vim doesn't support it. +if version < 600 && exists("perl_fold") + unlet perl_fold +endif + + +" POD starts with ^= and ends with ^=cut + +if exists("perl_include_pod") + " Include a while extra syntax file + syn include @Pod syntax/pod.vim + unlet b:current_syntax + if exists("perl_fold") + syn region perlPOD start="^=[a-z]" end="^=cut" contains=@Pod,@Spell,perlTodo keepend fold + syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend fold + else + syn region perlPOD start="^=[a-z]" end="^=cut" contains=@Pod,@Spell,perlTodo keepend + syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend + endif +else + " Use only the bare minimum of rules + if exists("perl_fold") + syn region perlPOD start="^=[a-z]" end="^=cut" fold + else + syn region perlPOD start="^=[a-z]" end="^=cut" + endif +endif + + +" All keywords +" +if exists("perl_fold") && exists("perl_fold_blocks") + syn match perlConditional "\" + syn match perlConditional "\" + syn match perlConditional "\" + syn match perlConditional "\" nextgroup=perlElseIfError skipwhite skipnl skipempty +else + syn keyword perlConditional if elsif unless + syn keyword perlConditional else nextgroup=perlElseIfError skipwhite skipnl skipempty +endif +syn keyword perlConditional switch eq ne gt lt ge le cmp not and or xor err +if exists("perl_fold") && exists("perl_fold_blocks") + syn match perlRepeat "\" + syn match perlRepeat "\" + syn match perlRepeat "\" + syn match perlRepeat "\" + syn match perlRepeat "\" + syn match perlRepeat "\" +else + syn keyword perlRepeat while for foreach do until continue +endif +syn keyword perlOperator defined undef and or not bless ref +if exists("perl_fold") + " if BEGIN/END would be a keyword the perlBEGINENDFold does not work + syn match perlControl "\" contained +else + syn keyword perlControl BEGIN END CHECK INIT +endif + +syn keyword perlStatementStorage my local our +syn keyword perlStatementControl goto return last next redo +syn keyword perlStatementScalar chomp chop chr crypt index lc lcfirst length ord pack reverse rindex sprintf substr uc ucfirst +syn keyword perlStatementRegexp pos quotemeta split study +syn keyword perlStatementNumeric abs atan2 cos exp hex int log oct rand sin sqrt srand +syn keyword perlStatementList splice unshift shift push pop split join reverse grep map sort unpack +syn keyword perlStatementHash each exists keys values tie tied untie +syn keyword perlStatementIOfunc carp confess croak dbmclose dbmopen die syscall +syn keyword perlStatementFiledesc binmode close closedir eof fileno getc lstat print printf readdir readline readpipe rewinddir select stat tell telldir write nextgroup=perlFiledescStatementNocomma skipwhite +syn keyword perlStatementFiledesc fcntl flock ioctl open opendir read seek seekdir sysopen sysread sysseek syswrite truncate nextgroup=perlFiledescStatementComma skipwhite +syn keyword perlStatementVector pack vec +syn keyword perlStatementFiles chdir chmod chown chroot glob link mkdir readlink rename rmdir symlink umask unlink utime +syn match perlStatementFiles "-[rwxoRWXOezsfdlpSbctugkTBMAC]\>" +syn keyword perlStatementFlow caller die dump eval exit wantarray +syn keyword perlStatementInclude require +syn match perlStatementInclude "\<\(use\|no\)\s\+\(\(integer\|strict\|lib\|sigtrap\|subs\|vars\|warnings\|utf8\|byte\|base\|fields\)\>\)\=" +syn keyword perlStatementScope import +syn keyword perlStatementProc alarm exec fork getpgrp getppid getpriority kill pipe setpgrp setpriority sleep system times wait waitpid +syn keyword perlStatementSocket accept bind connect getpeername getsockname getsockopt listen recv send setsockopt shutdown socket socketpair +syn keyword perlStatementIPC msgctl msgget msgrcv msgsnd semctl semget semop shmctl shmget shmread shmwrite +syn keyword perlStatementNetwork endhostent endnetent endprotoent endservent gethostbyaddr gethostbyname gethostent getnetbyaddr getnetbyname getnetent getprotobyname getprotobynumber getprotoent getservbyname getservbyport getservent sethostent setnetent setprotoent setservent +syn keyword perlStatementPword getpwuid getpwnam getpwent setpwent endpwent getgrent getgrgid getlogin getgrnam setgrent endgrent +syn keyword perlStatementTime gmtime localtime time times + +syn keyword perlStatementMisc warn formline reset scalar delete prototype lock +syn keyword perlStatementNew new + +syn keyword perlTodo TODO TBD FIXME XXX contained + +" Perl Identifiers. +" +" Should be cleaned up to better handle identifiers in particular situations +" (in hash keys for example) +" +" Plain identifiers: $foo, @foo, $#foo, %foo, &foo and dereferences $$foo, @$foo, etc. +" We do not process complex things such as @{${"foo"}}. Too complicated, and +" too slow. And what is after the -> is *not* considered as part of the +" variable - there again, too complicated and too slow. + +" Special variables first ($^A, ...) and ($|, $', ...) +syn match perlVarPlain "$^[ADEFHILMOPSTWX]\=" +syn match perlVarPlain "$[\\\"\[\]'&`+*.,;=%~!?@#$<>(-]" +syn match perlVarPlain "$\(0\|[1-9][0-9]*\)" +" Same as above, but avoids confusion in $::foo (equivalent to $main::foo) +syn match perlVarPlain "$:[^:]" +" These variables are not recognized within matches. +syn match perlVarNotInMatches "$[|)]" +" This variable is not recognized within matches delimited by m//. +syn match perlVarSlash "$/" + +" And plain identifiers +syn match perlPackageRef "\(\h\w*\)\=\(::\|'\)\I"me=e-1 contained + +" To highlight packages in variables as a scope reference - i.e. in $pack::var, +" pack:: is a scope, just set "perl_want_scope_in_variables" +" If you *want* complex things like @{${"foo"}} to be processed, +" just set the variable "perl_extended_vars"... + +" FIXME value between {} should be marked as string. is treated as such by Perl. +" At the moment it is marked as something greyish instead of read. Probably todo +" with transparency. Or maybe we should handle the bare word in that case. or make it into + +if exists("perl_want_scope_in_variables") + syn match perlVarPlain "\\\=\([@$]\|\$#\)\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember,perlMethod + syn match perlVarPlain2 "\\\=%\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember,perlMethod + syn match perlFunctionName "\\\=&\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember +else + syn match perlVarPlain "\\\=\([@$]\|\$#\)\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod + syn match perlVarPlain2 "\\\=%\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod + syn match perlFunctionName "\\\=&\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" nextgroup=perlVarMember,perlVarSimpleMember +endif + +if exists("perl_extended_vars") + syn cluster perlExpr contains=perlStatementScalar,perlStatementRegexp,perlStatementNumeric,perlStatementList,perlStatementHash,perlStatementFiles,perlStatementTime,perlStatementMisc,perlVarPlain,perlVarPlain2,perlVarNotInMatches,perlVarSlash,perlVarBlock,perlShellCommand,perlFloat,perlNumber,perlStringUnexpanded,perlString,perlQQ + syn region perlVarBlock matchgroup=perlVarPlain start="\($#\|[@%$]\)\$*{" skip="\\}" end="}" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember + syn region perlVarBlock matchgroup=perlVarPlain start="&\$*{" skip="\\}" end="}" contains=@perlExpr + syn match perlVarPlain "\\\=\(\$#\|[@%&$]\)\$*{\I\i*}" nextgroup=perlVarMember,perlVarSimpleMember + syn region perlVarMember matchgroup=perlVarPlain start="\(->\)\={" skip="\\}" end="}" contained contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember + syn match perlVarSimpleMember "\(->\)\={\I\i*}" nextgroup=perlVarMember,perlVarSimpleMember contains=perlVarSimpleMemberName contained + syn match perlVarSimpleMemberName "\I\i*" contained + syn region perlVarMember matchgroup=perlVarPlain start="\(->\)\=\[" skip="\\]" end="]" contained contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember + syn match perlMethod "\(->\)\I\i*" contained +endif + +" File Descriptors +syn match perlFiledescRead "[<]\h\w\+[>]" + +syn match perlFiledescStatementComma "(\=\s*\u\w*\s*,"me=e-1 transparent contained contains=perlFiledescStatement +syn match perlFiledescStatementNocomma "(\=\s*\u\w*\s*[^, \t]"me=e-1 transparent contained contains=perlFiledescStatement + +syn match perlFiledescStatement "\u\w*" contained + +" Special characters in strings and matches +syn match perlSpecialString "\\\(\d\+\|[xX]\x\+\|c\u\|.\)" contained +syn match perlSpecialStringU "\\['\\]" contained +syn match perlSpecialMatch "{\d\+\(,\(\d\+\)\=\)\=}" contained +syn match perlSpecialMatch "\[\(\]\|-\)\=[^\[\]]*\(\[\|\-\)\=\]" contained +syn match perlSpecialMatch "[+*()?.]" contained +syn match perlSpecialMatch "(?[#:=!]" contained +syn match perlSpecialMatch "(?[imsx]\+)" contained +" FIXME the line below does not work. It should mark end of line and +" begin of line as perlSpecial. +" syn match perlSpecialBEOM "^\^\|\$$" contained + +" Possible errors +" +" Highlight lines with only whitespace (only in blank delimited here documents) as errors +syn match perlNotEmptyLine "^\s\+$" contained +" Highlight '} else if (...) {', it should be '} else { if (...) { ' or +" '} elsif (...) {'. +"syn keyword perlElseIfError if contained + +" Variable interpolation +" +" These items are interpolated inside "" strings and similar constructs. +syn cluster perlInterpDQ contains=perlSpecialString,perlVarPlain,perlVarNotInMatches,perlVarSlash,perlVarBlock +" These items are interpolated inside '' strings and similar constructs. +syn cluster perlInterpSQ contains=perlSpecialStringU +" These items are interpolated inside m// matches and s/// substitutions. +syn cluster perlInterpSlash contains=perlSpecialString,perlSpecialMatch,perlVarPlain,perlVarBlock,perlSpecialBEOM +" These items are interpolated inside m## matches and s### substitutions. +syn cluster perlInterpMatch contains=@perlInterpSlash,perlVarSlash + +" Shell commands +syn region perlShellCommand matchgroup=perlMatchStartEnd start="`" end="`" contains=@perlInterpDQ + +" Constants +" +" Numbers +syn match perlNumber "[-+]\=\(\<\d[[:digit:]_]*L\=\>\|0[xX]\x[[:xdigit:]_]*\>\)" +syn match perlFloat "[-+]\=\<\d[[:digit:]_]*[eE][\-+]\=\d\+" +syn match perlFloat "[-+]\=\<\d[[:digit:]_]*\.[[:digit:]_]*\([eE][\-+]\=\d\+\)\=" +syn match perlFloat "[-+]\=\<\.[[:digit:]_]\+\([eE][\-+]\=\d\+\)\=" + + +" Simple version of searches and matches +" caters for m//, m##, m{} and m[] (and the !/ variant) +syn region perlMatch matchgroup=perlMatchStartEnd start=+[m!]/+ end=+/[cgimosx]*+ contains=@perlInterpSlash +syn region perlMatch matchgroup=perlMatchStartEnd start=+[m!]#+ end=+#[cgimosx]*+ contains=@perlInterpMatch +syn region perlMatch matchgroup=perlMatchStartEnd start=+[m!]{+ end=+}[cgimosx]*+ contains=@perlInterpMatch +syn region perlMatch matchgroup=perlMatchStartEnd start=+[m!]\[+ end=+\][cgimosx]*+ contains=@perlInterpMatch + +" A special case for m!!x which allows for comments and extra whitespace in the pattern +syn region perlMatch matchgroup=perlMatchStartEnd start=+[m!]!+ end=+![cgimosx]*+ contains=@perlInterpSlash,perlComment + +" Below some hacks to recognise the // variant. This is virtually impossible to catch in all +" cases as the / is used in so many other ways, but these should be the most obvious ones. +syn region perlMatch matchgroup=perlMatchStartEnd start=+^split /+lc=5 start=+[^$@%]\ operator forces a bareword to the left of it to be interpreted as +" a string +syn match perlString "\<\I\i*\s*=>"me=e-2 + +" Strings and q, qq, qw and qr expressions + +" Brackets in qq() +syn region perlBrackets start=+(+ end=+)+ contained transparent contains=perlBrackets,@perlStringSQ + +syn region perlStringUnexpanded matchgroup=perlStringStartEnd start="'" end="'" contains=@perlInterpSQ +syn region perlString matchgroup=perlStringStartEnd start=+"+ end=+"+ contains=@perlInterpDQ +syn region perlQQ matchgroup=perlStringStartEnd start=+\= 600 + " XXX Any statements after the identifier are in perlString colour (i.e. + " 'if $a' in 'print <~]\+\(\.\.\.\)\=" contained +syn match perlFormatField "[@^]#[#.]*" contained +syn match perlFormatField "@\*" contained +syn match perlFormatField "@[^A-Za-z_|<>~#*]"me=e-1 contained +syn match perlFormatField "@$" contained + +" __END__ and __DATA__ clauses +if exists("perl_fold") + syntax region perlDATA start="^__\(DATA\|END\)__$" skip="." end="." contains=perlPOD,@perlDATA fold +else + syntax region perlDATA start="^__\(DATA\|END\)__$" skip="." end="." contains=perlPOD,@perlDATA +endif + + +" +" Folding + +if exists("perl_fold") + if !exists("perl_nofold_packages") + syn region perlPackageFold start="^package \S\+;\s*\(#.*\)\=$" end="^1;\s*\(#.*\)\=$" end="\n\+package"me=s-1 transparent fold keepend + endif + if !exists("perl_nofold_subs") + syn region perlSubFold start="^\z(\s*\)\.*[^};]$" end="^\z1}\s*\(#.*\)\=$" transparent fold keepend + syn region perlSubFold start="^\z(\s*\)\<\(BEGIN\|END\|CHECK\|INIT\)\>.*[^};]$" end="^\z1}\s*$" transparent fold keepend + endif + + if exists("perl_fold_blocks") + syn region perlBlockFold start="^\z(\s*\)\(if\|elsif\|unless\|for\|while\|until\)\s*(.*)\(\s*{\)\=\s*\(#.*\)\=$" start="^\z(\s*\)foreach\s*\(\(my\|our\)\=\s*\S\+\s*\)\=(.*)\(\s*{\)\=\s*\(#.*\)\=$" end="^\z1}\s*;\=\(#.*\)\=$" transparent fold keepend + syn region perlBlockFold start="^\z(\s*\)\(do\|else\)\(\s*{\)\=\s*\(#.*\)\=$" end="^\z1}\s*while" end="^\z1}\s*;\=\(#.*\)\=$" transparent fold keepend + endif + + setlocal foldmethod=syntax + syn sync fromstart +else + " fromstart above seems to set minlines even if perl_fold is not set. + syn sync minlines=0 +endif + + +if version >= 508 || !exists("did_perl_syn_inits") + if version < 508 + let did_perl_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " The default highlighting. + HiLink perlSharpBang PreProc + HiLink perlControl PreProc + HiLink perlInclude Include + HiLink perlSpecial Special + HiLink perlString String + HiLink perlCharacter Character + HiLink perlNumber Number + HiLink perlFloat Float + HiLink perlType Type + HiLink perlIdentifier Identifier + HiLink perlLabel Label + HiLink perlStatement Statement + HiLink perlConditional Conditional + HiLink perlRepeat Repeat + HiLink perlOperator Operator + HiLink perlFunction Function + HiLink perlFunctionPrototype perlFunction + HiLink perlComment Comment + HiLink perlTodo Todo + if exists("perl_string_as_statement") + HiLink perlStringStartEnd perlStatement + else + HiLink perlStringStartEnd perlString + endif + HiLink perlList perlStatement + HiLink perlMisc perlStatement + HiLink perlVarPlain perlIdentifier + HiLink perlVarPlain2 perlIdentifier + HiLink perlFiledescRead perlIdentifier + HiLink perlFiledescStatement perlIdentifier + HiLink perlVarSimpleMember perlIdentifier + HiLink perlVarSimpleMemberName perlString + HiLink perlVarNotInMatches perlIdentifier + HiLink perlVarSlash perlIdentifier + HiLink perlQQ perlString + if version >= 600 + HiLink perlHereDoc perlString + else + HiLink perlHereIdentifier perlStringStartEnd + HiLink perlUntilEOFDQ perlString + HiLink perlUntilEOFSQ perlString + HiLink perlUntilEmptyDQ perlString + HiLink perlUntilEmptySQ perlString + HiLink perlUntilEOF perlString + endif + HiLink perlStringUnexpanded perlString + HiLink perlSubstitutionSQ perlString + HiLink perlSubstitutionDQ perlString + HiLink perlSubstitutionSlash perlString + HiLink perlSubstitutionHash perlString + HiLink perlSubstitutionBracket perlString + HiLink perlSubstitutionCurly perlString + HiLink perlSubstitutionPling perlString + HiLink perlTranslationSlash perlString + HiLink perlTranslationHash perlString + HiLink perlTranslationBracket perlString + HiLink perlTranslationCurly perlString + HiLink perlMatch perlString + HiLink perlMatchStartEnd perlStatement + HiLink perlFormatName perlIdentifier + HiLink perlFormatField perlString + HiLink perlPackageDecl perlType + HiLink perlStorageClass perlType + HiLink perlPackageRef perlType + HiLink perlStatementPackage perlStatement + HiLink perlStatementSub perlStatement + HiLink perlStatementStorage perlStatement + HiLink perlStatementControl perlStatement + HiLink perlStatementScalar perlStatement + HiLink perlStatementRegexp perlStatement + HiLink perlStatementNumeric perlStatement + HiLink perlStatementList perlStatement + HiLink perlStatementHash perlStatement + HiLink perlStatementIOfunc perlStatement + HiLink perlStatementFiledesc perlStatement + HiLink perlStatementVector perlStatement + HiLink perlStatementFiles perlStatement + HiLink perlStatementFlow perlStatement + HiLink perlStatementScope perlStatement + HiLink perlStatementInclude perlStatement + HiLink perlStatementProc perlStatement + HiLink perlStatementSocket perlStatement + HiLink perlStatementIPC perlStatement + HiLink perlStatementNetwork perlStatement + HiLink perlStatementPword perlStatement + HiLink perlStatementTime perlStatement + HiLink perlStatementMisc perlStatement + HiLink perlStatementNew perlStatement + HiLink perlFunctionName perlIdentifier + HiLink perlMethod perlIdentifier + HiLink perlFunctionPRef perlType + HiLink perlPOD perlComment + HiLink perlShellCommand perlString + HiLink perlSpecialAscii perlSpecial + HiLink perlSpecialDollar perlSpecial + HiLink perlSpecialString perlSpecial + HiLink perlSpecialStringU perlSpecial + HiLink perlSpecialMatch perlSpecial + HiLink perlSpecialBEOM perlSpecial + HiLink perlDATA perlComment + + HiLink perlBrackets Error + + " Possible errors + HiLink perlNotEmptyLine Error + HiLink perlElseIfError Error + + delcommand HiLink +endif + +" Syncing to speed up processing +" +if !exists("perl_no_sync_on_sub") + syn sync match perlSync grouphere NONE "^\s*\ +" Last Change: 2003 May 27 + +" 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 + +setlocal foldmethod=syntax +syn sync fromstart + +syn cluster pfNotLS contains=pfComment,pfTodo,pfVarAssign +syn keyword pfCmd altq anchor antispoof binat nat pass +syn keyword pfCmd queue rdr scrub table set +syn keyword pfService auth bgp domain finger ftp http https ident +syn keyword pfService imap irc isakmp kerberos mail nameserver nfs +syn keyword pfService nntp ntp pop3 portmap pptp rpcbind rsync smtp +syn keyword pfService snmp snmptrap socks ssh sunrpc syslog telnet +syn keyword pfService tftp www +syn keyword pfTodo TODO XXX contained +syn keyword pfWildAddr all any +syn match pfCmd /block\s/ +syn match pfComment /#.*$/ contains=pfTodo +syn match pfCont /\\$/ +syn match pfErrClose /}/ +syn match pfIPv4 /\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ +syn match pfIPv6 /[a-fA-F0-9:]*::[a-fA-F0-9:.]*/ +syn match pfIPv6 /[a-fA-F0-9:]\+:[a-fA-F0-9:]\+:[a-fA-F0-9:.]\+/ +syn match pfNetmask /\/\d\+/ +syn match pfNum /[a-zA-Z0-9_:.]\@/ +syn match pfVar /$[a-zA-Z][a-zA-Z0-9_]*/ +syn match pfVarAssign /^\s*[a-zA-Z][a-zA-Z0-9_]*\s*=/me=e-1 +syn region pfFold1 start=/^#\{1}>/ end=/^#\{1,3}>/me=s-1 transparent fold +syn region pfFold2 start=/^#\{2}>/ end=/^#\{2,3}>/me=s-1 transparent fold +syn region pfFold3 start=/^#\{3}>/ end=/^#\{3}>/me=s-1 transparent fold +syn region pfList start=/{/ end=/}/ transparent contains=ALLBUT,pfErrClose,@pfNotLS +syn region pfString start=/"/ end=/"/ transparent contains=ALLBUT,pfString,@pfNotLS +syn region pfString start=/'/ end=/'/ transparent contains=ALLBUT,pfString,@pfNotLS + +" 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_c_syn_inits") + if version < 508 + let did_c_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink pfCmd Statement + HiLink pfComment Comment + HiLink pfCont Statement + HiLink pfErrClose Error + HiLink pfIPv4 Type + HiLink pfIPv6 Type + HiLink pfNetmask Constant + HiLink pfNum Constant + HiLink pfService Constant + HiLink pfTable Identifier + HiLink pfTodo Todo + HiLink pfVar Identifier + HiLink pfVarAssign Identifier + HiLink pfWildAddr Type + + delcommand HiLink +endif + +let b:current_syntax = "pf" diff --git a/vim/bundle/ubuntu-vim72/syntax/pfmain.vim b/vim/bundle/ubuntu-vim72/syntax/pfmain.vim new file mode 100644 index 0000000..233c8d9 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/pfmain.vim @@ -0,0 +1,1114 @@ +" Vim syntax file +" Language: Postfix main.cf configuration +" Maintainer: KELEMEN Peter +" Last Change: 2006 Apr 15 +" Version: 0.20 +" URL: http://cern.ch/fuji/vim/syntax/pfmain.vim +" Comment: Based on Postfix 2.3.x defaults. + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if version >= 600 + setlocal iskeyword=@,48-57,_,- +else + set iskeyword=@,48-57,_,- +endif + +syntax case match +syntax sync minlines=1 + +syntax keyword pfmainConf 2bounce_notice_recipient +syntax keyword pfmainConf access_map_reject_code +syntax keyword pfmainConf address_verify_default_transport +syntax keyword pfmainConf address_verify_local_transport +syntax keyword pfmainConf address_verify_map +syntax keyword pfmainConf address_verify_negative_cache +syntax keyword pfmainConf address_verify_negative_expire_time +syntax keyword pfmainConf address_verify_negative_refresh_time +syntax keyword pfmainConf address_verify_poll_count +syntax keyword pfmainConf address_verify_poll_delay +syntax keyword pfmainConf address_verify_positive_expire_time +syntax keyword pfmainConf address_verify_positive_refresh_time +syntax keyword pfmainConf address_verify_relay_transport +syntax keyword pfmainConf address_verify_relayhost +syntax keyword pfmainConf address_verify_sender +syntax keyword pfmainConf address_verify_sender_dependent_relayhost_maps +syntax keyword pfmainConf address_verify_service_name +syntax keyword pfmainConf address_verify_transport_maps +syntax keyword pfmainConf address_verify_virtual_transport +syntax keyword pfmainConf alias_database +syntax keyword pfmainConf alias_maps +syntax keyword pfmainConf allow_mail_to_commands +syntax keyword pfmainConf allow_mail_to_files +syntax keyword pfmainConf allow_min_user +syntax keyword pfmainConf allow_percent_hack +syntax keyword pfmainConf allow_untrusted_routing +syntax keyword pfmainConf alternate_config_directories +syntax keyword pfmainConf always_bcc +syntax keyword pfmainConf anvil_rate_time_unit +syntax keyword pfmainConf anvil_status_update_time +syntax keyword pfmainConf append_at_myorigin +syntax keyword pfmainConf append_dot_mydomain +syntax keyword pfmainConf application_event_drain_time +syntax keyword pfmainConf authorized_flush_users +syntax keyword pfmainConf authorized_mailq_users +syntax keyword pfmainConf authorized_submit_users +syntax keyword pfmainConf backwards_bounce_logfile_compatibility +syntax keyword pfmainConf berkeley_db_create_buffer_size +syntax keyword pfmainConf berkeley_db_read_buffer_size +syntax keyword pfmainConf best_mx_transport +syntax keyword pfmainConf biff +syntax keyword pfmainConf body_checks +syntax keyword pfmainConf body_checks_size_limit +syntax keyword pfmainConf bounce_notice_recipient +syntax keyword pfmainConf bounce_queue_lifetime +syntax keyword pfmainConf bounce_service_name +syntax keyword pfmainConf bounce_size_limit +syntax keyword pfmainConf bounce_template_file +syntax keyword pfmainConf broken_sasl_auth_clients +syntax keyword pfmainConf canonical_classes +syntax keyword pfmainConf canonical_maps +syntax keyword pfmainConf cleanup_service_name +syntax keyword pfmainConf command_directory +syntax keyword pfmainConf command_execution_directory +syntax keyword pfmainConf command_expansion_filter +syntax keyword pfmainConf command_time_limit +syntax keyword pfmainConf config_directory +syntax keyword pfmainConf connection_cache_protocol_timeout +syntax keyword pfmainConf connection_cache_service_name +syntax keyword pfmainConf connection_cache_status_update_time +syntax keyword pfmainConf connection_cache_ttl_limit +syntax keyword pfmainConf content_filter +syntax keyword pfmainConf daemon_directory +syntax keyword pfmainConf daemon_timeout +syntax keyword pfmainConf debug_peer_level +syntax keyword pfmainConf debug_peer_list +syntax keyword pfmainConf default_database_type +syntax keyword pfmainConf default_delivery_slot_cost +syntax keyword pfmainConf default_delivery_slot_discount +syntax keyword pfmainConf default_delivery_slot_loan +syntax keyword pfmainConf default_destination_concurrency_limit +syntax keyword pfmainConf default_destination_recipient_limit +syntax keyword pfmainConf default_extra_recipient_limit +syntax keyword pfmainConf default_minimum_delivery_slots +syntax keyword pfmainConf default_privs +syntax keyword pfmainConf default_process_limit +syntax keyword pfmainConf default_rbl_reply +syntax keyword pfmainConf default_recipient_limit +syntax keyword pfmainConf default_transport +syntax keyword pfmainConf default_verp_delimiters +syntax keyword pfmainConf defer_code +syntax keyword pfmainConf defer_service_name +syntax keyword pfmainConf defer_transports +syntax keyword pfmainConf delay_logging_resolution_limit +syntax keyword pfmainConf delay_notice_recipient +syntax keyword pfmainConf delay_warning_time +syntax keyword pfmainConf deliver_lock_attempts +syntax keyword pfmainConf deliver_lock_delay +syntax keyword pfmainConf disable_dns_lookups +syntax keyword pfmainConf disable_mime_input_processing +syntax keyword pfmainConf disable_mime_output_conversion +syntax keyword pfmainConf disable_verp_bounces +syntax keyword pfmainConf disable_vrfy_command +syntax keyword pfmainConf dont_remove +syntax keyword pfmainConf double_bounce_sender +syntax keyword pfmainConf duplicate_filter_limit +syntax keyword pfmainConf empty_address_recipient +syntax keyword pfmainConf enable_original_recipient +syntax keyword pfmainConf error_notice_recipient +syntax keyword pfmainConf error_service_name +syntax keyword pfmainConf execution_directory_expansion_filter +syntax keyword pfmainConf expand_owner_alias +syntax keyword pfmainConf export_environment +syntax keyword pfmainConf fallback_transport +syntax keyword pfmainConf fallback_transport_maps +syntax keyword pfmainConf fast_flush_domains +syntax keyword pfmainConf fast_flush_purge_time +syntax keyword pfmainConf fast_flush_refresh_time +syntax keyword pfmainConf fault_injection_code +syntax keyword pfmainConf flush_service_name +syntax keyword pfmainConf fork_attempts +syntax keyword pfmainConf fork_delay +syntax keyword pfmainConf forward_expansion_filter +syntax keyword pfmainConf forward_path +syntax keyword pfmainConf frozen_delivered_to +syntax keyword pfmainConf hash_queue_depth +syntax keyword pfmainConf hash_queue_names +syntax keyword pfmainConf header_address_token_limit +syntax keyword pfmainConf header_checks +syntax keyword pfmainConf header_size_limit +syntax keyword pfmainConf helpful_warnings +syntax keyword pfmainConf home_mailbox +syntax keyword pfmainConf hopcount_limit +syntax keyword pfmainConf html_directory +syntax keyword pfmainConf ignore_mx_lookup_error +syntax keyword pfmainConf import_environment +syntax keyword pfmainConf in_flow_delay +syntax keyword pfmainConf inet_interfaces +syntax keyword pfmainConf inet_protocols +syntax keyword pfmainConf initial_destination_concurrency +syntax keyword pfmainConf invalid_hostname_reject_code +syntax keyword pfmainConf ipc_idle +syntax keyword pfmainConf ipc_timeout +syntax keyword pfmainConf ipc_ttl +syntax keyword pfmainConf line_length_limit +syntax keyword pfmainConf lmtp_bind_address +syntax keyword pfmainConf lmtp_bind_address6 +syntax keyword pfmainConf lmtp_cname_overrides_servername +syntax keyword pfmainConf lmtp_connect_timeout +syntax keyword pfmainConf lmtp_connection_cache_destinations +syntax keyword pfmainConf lmtp_connection_cache_on_demand +syntax keyword pfmainConf lmtp_connection_cache_time_limit +syntax keyword pfmainConf lmtp_connection_reuse_time_limit +syntax keyword pfmainConf lmtp_data_done_timeout +syntax keyword pfmainConf lmtp_data_init_timeout +syntax keyword pfmainConf lmtp_data_xfer_timeout +syntax keyword pfmainConf lmtp_defer_if_no_mx_address_found +syntax keyword pfmainConf lmtp_destination_concurrency_limit +syntax keyword pfmainConf lmtp_destination_recipient_limit +syntax keyword pfmainConf lmtp_discard_lhlo_keyword_address_maps +syntax keyword pfmainConf lmtp_discard_lhlo_keywords +syntax keyword pfmainConf lmtp_enforce_tls +syntax keyword pfmainConf lmtp_generic_maps +syntax keyword pfmainConf lmtp_host_lookup +syntax keyword pfmainConf lmtp_lhlo_name +syntax keyword pfmainConf lmtp_lhlo_timeout +syntax keyword pfmainConf lmtp_line_length_limit +syntax keyword pfmainConf lmtp_mail_timeout +syntax keyword pfmainConf lmtp_mx_address_limit +syntax keyword pfmainConf lmtp_mx_session_limit +syntax keyword pfmainConf lmtp_pix_workaround_delay_time +syntax keyword pfmainConf lmtp_pix_workaround_threshold_time +syntax keyword pfmainConf lmtp_quit_timeout +syntax keyword pfmainConf lmtp_quote_rfc821_envelope +syntax keyword pfmainConf lmtp_randomize_addresses +syntax keyword pfmainConf lmtp_rcpt_timeout +syntax keyword pfmainConf lmtp_rset_timeout +syntax keyword pfmainConf lmtp_sasl_auth_enable +syntax keyword pfmainConf lmtp_sasl_mechanism_filter +syntax keyword pfmainConf lmtp_sasl_password_maps +syntax keyword pfmainConf lmtp_sasl_path +syntax keyword pfmainConf lmtp_sasl_security_options +syntax keyword pfmainConf lmtp_sasl_tls_security_options +syntax keyword pfmainConf lmtp_sasl_tls_verified_security_options +syntax keyword pfmainConf lmtp_sasl_type +syntax keyword pfmainConf lmtp_send_xforward_command +syntax keyword pfmainConf lmtp_sender_dependent_authentication +syntax keyword pfmainConf lmtp_skip_5xx_greeting +syntax keyword pfmainConf lmtp_starttls_timeout +syntax keyword pfmainConf lmtp_tcp_port +syntax keyword pfmainConf lmtp_tls_enforce_peername +syntax keyword pfmainConf lmtp_tls_note_starttls_offer +syntax keyword pfmainConf lmtp_tls_per_site +syntax keyword pfmainConf lmtp_tls_scert_verifydepth +syntax keyword pfmainConf lmtp_use_tls +syntax keyword pfmainConf lmtp_xforward_timeout +syntax keyword pfmainConf local_command_shell +syntax keyword pfmainConf local_destination_concurrency_limit +syntax keyword pfmainConf local_destination_recipient_limit +syntax keyword pfmainConf local_header_rewrite_clients +syntax keyword pfmainConf local_recipient_maps +syntax keyword pfmainConf local_transport +syntax keyword pfmainConf luser_relay +syntax keyword pfmainConf mail_name +syntax keyword pfmainConf mail_owner +syntax keyword pfmainConf mail_release_date +syntax keyword pfmainConf mail_spool_directory +syntax keyword pfmainConf mail_version +syntax keyword pfmainConf mailbox_command +syntax keyword pfmainConf mailbox_command_maps +syntax keyword pfmainConf mailbox_delivery_lock +syntax keyword pfmainConf mailbox_size_limit +syntax keyword pfmainConf mailbox_transport +syntax keyword pfmainConf mailbox_transport_maps +syntax keyword pfmainConf mailq_path +syntax keyword pfmainConf manpage_directory +syntax keyword pfmainConf maps_rbl_domains +syntax keyword pfmainConf maps_rbl_reject_code +syntax keyword pfmainConf masquerade_classes +syntax keyword pfmainConf masquerade_domains +syntax keyword pfmainConf masquerade_exceptions +syntax keyword pfmainConf max_idle +syntax keyword pfmainConf max_use +syntax keyword pfmainConf maximal_backoff_time +syntax keyword pfmainConf maximal_queue_lifetime +syntax keyword pfmainConf message_reject_characters +syntax keyword pfmainConf message_size_limit +syntax keyword pfmainConf message_strip_characters +syntax keyword pfmainConf mime_boundary_length_limit +syntax keyword pfmainConf mime_header_checks +syntax keyword pfmainConf mime_nesting_limit +syntax keyword pfmainConf minimal_backoff_time +syntax keyword pfmainConf multi_recipient_bounce_reject_code +syntax keyword pfmainConf mydestination +syntax keyword pfmainConf mydomain +syntax keyword pfmainConf myhostname +syntax keyword pfmainConf mynetworks +syntax keyword pfmainConf mynetworks_style +syntax keyword pfmainConf myorigin +syntax keyword pfmainConf nested_header_checks +syntax keyword pfmainConf newaliases_path +syntax keyword pfmainConf non_fqdn_reject_code +syntax keyword pfmainConf notify_classes +syntax keyword pfmainConf owner_request_special +syntax keyword pfmainConf parent_domain_matches_subdomains +syntax keyword pfmainConf permit_mx_backup_networks +syntax keyword pfmainConf pickup_service_name +syntax keyword pfmainConf plaintext_reject_code +syntax keyword pfmainConf prepend_delivered_header +syntax keyword pfmainConf process_id_directory +syntax keyword pfmainConf propagate_unmatched_extensions +syntax keyword pfmainConf proxy_interfaces +syntax keyword pfmainConf proxy_read_maps +syntax keyword pfmainConf qmgr_clog_warn_time +syntax keyword pfmainConf qmgr_fudge_factor +syntax keyword pfmainConf qmgr_message_active_limit +syntax keyword pfmainConf qmgr_message_recipient_limit +syntax keyword pfmainConf qmgr_message_recipient_minimum +syntax keyword pfmainConf qmqpd_authorized_clients +syntax keyword pfmainConf qmqpd_error_delay +syntax keyword pfmainConf qmqpd_timeout +syntax keyword pfmainConf queue_directory +syntax keyword pfmainConf queue_file_attribute_count_limit +syntax keyword pfmainConf queue_minfree +syntax keyword pfmainConf queue_run_delay +syntax keyword pfmainConf queue_service_name +syntax keyword pfmainConf rbl_reply_maps +syntax keyword pfmainConf readme_directory +syntax keyword pfmainConf receive_override_options +syntax keyword pfmainConf recipient_bcc_maps +syntax keyword pfmainConf recipient_canonical_classes +syntax keyword pfmainConf recipient_canonical_maps +syntax keyword pfmainConf recipient_delimiter +syntax keyword pfmainConf reject_code +syntax keyword pfmainConf relay_clientcerts +syntax keyword pfmainConf relay_destination_concurrency_limit +syntax keyword pfmainConf relay_destination_recipient_limit +syntax keyword pfmainConf relay_domains +syntax keyword pfmainConf relay_domains_reject_code +syntax keyword pfmainConf relay_recipient_maps +syntax keyword pfmainConf relay_transport +syntax keyword pfmainConf relayhost +syntax keyword pfmainConf relocated_maps +syntax keyword pfmainConf remote_header_rewrite_domain +syntax keyword pfmainConf require_home_directory +syntax keyword pfmainConf resolve_dequoted_address +syntax keyword pfmainConf resolve_null_domain +syntax keyword pfmainConf resolve_numeric_domain +syntax keyword pfmainConf rewrite_service_name +syntax keyword pfmainConf sample_directory +syntax keyword pfmainConf sender_bcc_maps +syntax keyword pfmainConf sender_canonical_classes +syntax keyword pfmainConf sender_canonical_maps +syntax keyword pfmainConf sender_dependent_relayhost_maps +syntax keyword pfmainConf sendmail_path +syntax keyword pfmainConf service_throttle_time +syntax keyword pfmainConf setgid_group +syntax keyword pfmainConf show_user_unknown_table_name +syntax keyword pfmainConf showq_service_name +syntax keyword pfmainConf smtp_always_send_ehlo +syntax keyword pfmainConf smtp_bind_address +syntax keyword pfmainConf smtp_bind_address6 +syntax keyword pfmainConf smtp_cname_overrides_servername +syntax keyword pfmainConf smtp_connect_timeout +syntax keyword pfmainConf smtp_connection_cache_destinations +syntax keyword pfmainConf smtp_connection_cache_on_demand +syntax keyword pfmainConf smtp_connection_cache_time_limit +syntax keyword pfmainConf smtp_connection_reuse_time_limit +syntax keyword pfmainConf smtp_data_done_timeout +syntax keyword pfmainConf smtp_data_init_timeout +syntax keyword pfmainConf smtp_data_xfer_timeout +syntax keyword pfmainConf smtp_defer_if_no_mx_address_found +syntax keyword pfmainConf smtp_destination_concurrency_limit +syntax keyword pfmainConf smtp_destination_recipient_limit +syntax keyword pfmainConf smtp_discard_ehlo_keyword_address_maps +syntax keyword pfmainConf smtp_discard_ehlo_keywords +syntax keyword pfmainConf smtp_enforce_tls +syntax keyword pfmainConf smtp_fallback_relay +syntax keyword pfmainConf smtp_generic_maps +syntax keyword pfmainConf smtp_helo_name +syntax keyword pfmainConf smtp_helo_timeout +syntax keyword pfmainConf smtp_host_lookup +syntax keyword pfmainConf smtp_line_length_limit +syntax keyword pfmainConf smtp_mail_timeout +syntax keyword pfmainConf smtp_mx_address_limit +syntax keyword pfmainConf smtp_mx_session_limit +syntax keyword pfmainConf smtp_never_send_ehlo +syntax keyword pfmainConf smtp_pix_workaround_delay_time +syntax keyword pfmainConf smtp_pix_workaround_threshold_time +syntax keyword pfmainConf smtp_quit_timeout +syntax keyword pfmainConf smtp_quote_rfc821_envelope +syntax keyword pfmainConf smtp_randomize_addresses +syntax keyword pfmainConf smtp_rcpt_timeout +syntax keyword pfmainConf smtp_rset_timeout +syntax keyword pfmainConf smtp_sasl_auth_enable +syntax keyword pfmainConf smtp_sasl_mechanism_filter +syntax keyword pfmainConf smtp_sasl_password_maps +syntax keyword pfmainConf smtp_sasl_path +syntax keyword pfmainConf smtp_sasl_security_options +syntax keyword pfmainConf smtp_sasl_tls_security_options +syntax keyword pfmainConf smtp_sasl_tls_verified_security_options +syntax keyword pfmainConf smtp_sasl_type +syntax keyword pfmainConf smtp_send_xforward_command +syntax keyword pfmainConf smtp_sender_dependent_authentication +syntax keyword pfmainConf smtp_skip_5xx_greeting +syntax keyword pfmainConf smtp_skip_quit_response +syntax keyword pfmainConf smtp_starttls_timeout +syntax keyword pfmainConf smtp_tls_CAfile +syntax keyword pfmainConf smtp_tls_CApath +syntax keyword pfmainConf smtp_tls_cert_file +syntax keyword pfmainConf smtp_tls_cipherlist +syntax keyword pfmainConf smtp_tls_dcert_file +syntax keyword pfmainConf smtp_tls_dkey_file +syntax keyword pfmainConf smtp_tls_enforce_peername +syntax keyword pfmainConf smtp_tls_key_file +syntax keyword pfmainConf smtp_tls_loglevel +syntax keyword pfmainConf smtp_tls_note_starttls_offer +syntax keyword pfmainConf smtp_tls_per_site +syntax keyword pfmainConf smtp_tls_scert_verifydepth +syntax keyword pfmainConf smtp_tls_session_cache_database +syntax keyword pfmainConf smtp_tls_session_cache_timeout +syntax keyword pfmainConf smtp_use_tls +syntax keyword pfmainConf smtp_xforward_timeout +syntax keyword pfmainConf smtpd_authorized_verp_clients +syntax keyword pfmainConf smtpd_authorized_xclient_hosts +syntax keyword pfmainConf smtpd_authorized_xforward_hosts +syntax keyword pfmainConf smtpd_banner +syntax keyword pfmainConf smtpd_client_connection_count_limit +syntax keyword pfmainConf smtpd_client_connection_rate_limit +syntax keyword pfmainConf smtpd_client_event_limit_exceptions +syntax keyword pfmainConf smtpd_client_message_rate_limit +syntax keyword pfmainConf smtpd_client_new_tls_session_rate_limit +syntax keyword pfmainConf smtpd_client_recipient_rate_limit +syntax keyword pfmainConf smtpd_client_restrictions +syntax keyword pfmainConf smtpd_data_restrictions +syntax keyword pfmainConf smtpd_delay_open_until_valid_rcpt +syntax keyword pfmainConf smtpd_delay_reject +syntax keyword pfmainConf smtpd_discard_ehlo_keyword_address_maps +syntax keyword pfmainConf smtpd_discard_ehlo_keywords +syntax keyword pfmainConf smtpd_end_of_data_restrictions +syntax keyword pfmainConf smtpd_enforce_tls +syntax keyword pfmainConf smtpd_error_sleep_time +syntax keyword pfmainConf smtpd_etrn_restrictions +syntax keyword pfmainConf smtpd_expansion_filter +syntax keyword pfmainConf smtpd_forbidden_commands +syntax keyword pfmainConf smtpd_hard_error_limit +syntax keyword pfmainConf smtpd_helo_required +syntax keyword pfmainConf smtpd_helo_restrictions +syntax keyword pfmainConf smtpd_history_flush_threshold +syntax keyword pfmainConf smtpd_junk_command_limit +syntax keyword pfmainConf smtpd_noop_commands +syntax keyword pfmainConf smtpd_null_access_lookup_key +syntax keyword pfmainConf smtpd_peername_lookup +syntax keyword pfmainConf smtpd_policy_service_max_idle +syntax keyword pfmainConf smtpd_policy_service_max_ttl +syntax keyword pfmainConf smtpd_policy_service_timeout +syntax keyword pfmainConf smtpd_proxy_ehlo +syntax keyword pfmainConf smtpd_proxy_filter +syntax keyword pfmainConf smtpd_proxy_timeout +syntax keyword pfmainConf smtpd_recipient_limit +syntax keyword pfmainConf smtpd_recipient_overshoot_limit +syntax keyword pfmainConf smtpd_recipient_restrictions +syntax keyword pfmainConf smtpd_reject_unlisted_recipient +syntax keyword pfmainConf smtpd_reject_unlisted_sender +syntax keyword pfmainConf smtpd_restriction_classes +syntax keyword pfmainConf smtpd_sasl_auth_enable +syntax keyword pfmainConf smtpd_sasl_authenticated_header +syntax keyword pfmainConf smtpd_sasl_exceptions_networks +syntax keyword pfmainConf smtpd_sasl_local_domain +syntax keyword pfmainConf smtpd_sasl_path +syntax keyword pfmainConf smtpd_sasl_security_options +syntax keyword pfmainConf smtpd_sasl_tls_security_options +syntax keyword pfmainConf smtpd_sasl_type +syntax keyword pfmainConf smtpd_sender_login_maps +syntax keyword pfmainConf smtpd_sender_restrictions +syntax keyword pfmainConf smtpd_soft_error_limit +syntax keyword pfmainConf smtpd_starttls_timeout +syntax keyword pfmainConf smtpd_timeout +syntax keyword pfmainConf smtpd_tls_CAfile +syntax keyword pfmainConf smtpd_tls_CApath +syntax keyword pfmainConf smtpd_tls_ask_ccert +syntax keyword pfmainConf smtpd_tls_auth_only +syntax keyword pfmainConf smtpd_tls_ccert_verifydepth +syntax keyword pfmainConf smtpd_tls_cert_file +syntax keyword pfmainConf smtpd_tls_cipherlist +syntax keyword pfmainConf smtpd_tls_dcert_file +syntax keyword pfmainConf smtpd_tls_dh1024_param_file +syntax keyword pfmainConf smtpd_tls_dh512_param_file +syntax keyword pfmainConf smtpd_tls_dkey_file +syntax keyword pfmainConf smtpd_tls_key_file +syntax keyword pfmainConf smtpd_tls_loglevel +syntax keyword pfmainConf smtpd_tls_received_header +syntax keyword pfmainConf smtpd_tls_req_ccert +syntax keyword pfmainConf smtpd_tls_session_cache_database +syntax keyword pfmainConf smtpd_tls_session_cache_timeout +syntax keyword pfmainConf smtpd_tls_wrappermode +syntax keyword pfmainConf smtpd_use_tls +syntax keyword pfmainConf soft_bounce +syntax keyword pfmainConf stale_lock_time +syntax keyword pfmainConf strict_7bit_headers +syntax keyword pfmainConf strict_8bitmime +syntax keyword pfmainConf strict_8bitmime_body +syntax keyword pfmainConf strict_mime_encoding_domain +syntax keyword pfmainConf strict_rfc821_envelopes +syntax keyword pfmainConf sun_mailtool_compatibility +syntax keyword pfmainConf swap_bangpath +syntax keyword pfmainConf syslog_facility +syntax keyword pfmainConf syslog_name +syntax keyword pfmainConf tls_daemon_random_bytes +syntax keyword pfmainConf tls_random_bytes +syntax keyword pfmainConf tls_random_exchange_name +syntax keyword pfmainConf tls_random_prng_update_period +syntax keyword pfmainConf tls_random_reseed_period +syntax keyword pfmainConf tls_random_source +syntax keyword pfmainConf trace_service_name +syntax keyword pfmainConf transport_maps +syntax keyword pfmainConf transport_retry_time +syntax keyword pfmainConf trigger_timeout +syntax keyword pfmainConf undisclosed_recipients_header +syntax keyword pfmainConf unknown_address_reject_code +syntax keyword pfmainConf unknown_client_reject_code +syntax keyword pfmainConf unknown_hostname_reject_code +syntax keyword pfmainConf unknown_local_recipient_reject_code +syntax keyword pfmainConf unknown_relay_recipient_reject_code +syntax keyword pfmainConf unknown_virtual_alias_reject_code +syntax keyword pfmainConf unknown_virtual_mailbox_reject_code +syntax keyword pfmainConf unverified_recipient_reject_code +syntax keyword pfmainConf unverified_sender_reject_code +syntax keyword pfmainConf verp_delimiter_filter +syntax keyword pfmainConf virtual_alias_domains +syntax keyword pfmainConf virtual_alias_expansion_limit +syntax keyword pfmainConf virtual_alias_maps +syntax keyword pfmainConf virtual_alias_recursion_limit +syntax keyword pfmainConf virtual_destination_concurrency_limit +syntax keyword pfmainConf virtual_destination_recipient_limit +syntax keyword pfmainConf virtual_gid_maps +syntax keyword pfmainConf virtual_mailbox_base +syntax keyword pfmainConf virtual_mailbox_domains +syntax keyword pfmainConf virtual_mailbox_limit +syntax keyword pfmainConf virtual_mailbox_lock +syntax keyword pfmainConf virtual_mailbox_maps +syntax keyword pfmainConf virtual_minimum_uid +syntax keyword pfmainConf virtual_transport +syntax keyword pfmainConf virtual_uid_maps +syntax match pfmainRef "$\<2bounce_notice_recipient\>" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax keyword pfmainWord all +syntax keyword pfmainWord check_address_map +syntax keyword pfmainWord check_ccert_access +syntax keyword pfmainWord check_client_access +syntax keyword pfmainWord check_etrn_access +syntax keyword pfmainWord check_helo_access +syntax keyword pfmainWord check_helo_mx_access +syntax keyword pfmainWord check_helo_ns_access +syntax keyword pfmainWord check_policy_service +syntax keyword pfmainWord check_recipient_access +syntax keyword pfmainWord check_recipient_maps +syntax keyword pfmainWord check_recipient_mx_access +syntax keyword pfmainWord check_recipient_ns_access +syntax keyword pfmainWord check_relay_domains +syntax keyword pfmainWord check_sender_access +syntax keyword pfmainWord check_sender_mx_access +syntax keyword pfmainWord check_sender_ns_access +syntax keyword pfmainWord class +syntax keyword pfmainWord defer_if_permit +syntax keyword pfmainWord defer_if_reject +syntax keyword pfmainWord dns +syntax keyword pfmainWord envelope_recipient +syntax keyword pfmainWord envelope_sender +syntax keyword pfmainWord header_recipient +syntax keyword pfmainWord header_sender +syntax keyword pfmainWord host +syntax keyword pfmainWord ipv4 +syntax keyword pfmainWord ipv6 +syntax keyword pfmainWord native +syntax keyword pfmainWord permit +syntax keyword pfmainWord permit_auth_destination +syntax keyword pfmainWord permit_inet_interfaces +syntax keyword pfmainWord permit_mx_backup +syntax keyword pfmainWord permit_mynetworks +syntax keyword pfmainWord permit_naked_ip_address +syntax keyword pfmainWord permit_sasl_authenticated +syntax keyword pfmainWord permit_tls_all_clientcerts +syntax keyword pfmainWord permit_tls_clientcerts +syntax keyword pfmainWord reject +syntax keyword pfmainWord reject_invalid_helo_hostname +syntax keyword pfmainWord reject_invalid_hostname +syntax keyword pfmainWord reject_maps_rbl +syntax keyword pfmainWord reject_multi_recipient_bounce +syntax keyword pfmainWord reject_non_fqdn_helo_hostname +syntax keyword pfmainWord reject_non_fqdn_hostname +syntax keyword pfmainWord reject_non_fqdn_recipient +syntax keyword pfmainWord reject_non_fqdn_sender +syntax keyword pfmainWord reject_plaintext_session +syntax keyword pfmainWord reject_rbl +syntax keyword pfmainWord reject_rbl_client +syntax keyword pfmainWord reject_rhsbl_client +syntax keyword pfmainWord reject_rhsbl_helo +syntax keyword pfmainWord reject_rhsbl_recipient +syntax keyword pfmainWord reject_rhsbl_sender +syntax keyword pfmainWord reject_sender_login_mismatch +syntax keyword pfmainWord reject_unauth_destination +syntax keyword pfmainWord reject_unauth_pipelining +syntax keyword pfmainWord reject_unknown_address +syntax keyword pfmainWord reject_unknown_client +syntax keyword pfmainWord reject_unknown_client_hostname +syntax keyword pfmainWord reject_unknown_forward_client_hostname +syntax keyword pfmainWord reject_unknown_helo_hostname +syntax keyword pfmainWord reject_unknown_hostname +syntax keyword pfmainWord reject_unknown_recipient_domain +syntax keyword pfmainWord reject_unknown_reverse_client_hostname +syntax keyword pfmainWord reject_unknown_sender_domain +syntax keyword pfmainWord reject_unlisted_recipient +syntax keyword pfmainWord reject_unlisted_sender +syntax keyword pfmainWord reject_unverified_recipient +syntax keyword pfmainWord reject_unverified_sender +syntax keyword pfmainWord sleep +syntax keyword pfmainWord smtpd_access_maps +syntax keyword pfmainWord subnet +syntax keyword pfmainWord warn_if_reject + +syntax keyword pfmainDict btree cidr environ hash nis pcre proxy regexp sdbm sdbm static tcp unix +syntax keyword pfmainQueueDir incoming active deferred corrupt hold +syntax keyword pfmainTransport smtp lmtp unix local relay uucp virtual +syntax keyword pfmainLock fcntl flock dotlock +syntax keyword pfmainAnswer yes no + +syntax match pfmainComment "#.*$" +syntax match pfmainNumber "\<\d\+\>" +syntax match pfmainTime "\<\d\+[hmsd]\>" +syntax match pfmainIP "\<\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\>" +syntax match pfmainVariable "\$\w\+" contains=pfmainRef + +syntax match pfmainSpecial "\" +syntax match pfmainSpecial "\" +syntax match pfmainSpecial "\" +syntax match pfmainSpecial "\" +syntax match pfmainSpecial "\" +syntax match pfmainSpecial "\" +syntax match pfmainSpecial "\" +syntax match pfmainSpecial "\" +syntax match pfmainSpecial "\" + +syntax match pfmainSpecial "\" +syntax match pfmainSpecial "\" +syntax match pfmainSpecial "\" +syntax match pfmainSpecial "\" +syntax match pfmainSpecial "\" +syntax match pfmainSpecial "\" +syntax match pfmainSpecial "\" +syntax match pfmainSpecial "\" +syntax match pfmainSpecial "\" +syntax match pfmainSpecial "\" +syntax match pfmainSpecial "\" +syntax match pfmainSpecial "\" +syntax match pfmainSpecial "\" +syntax match pfmainSpecial "\" + +if version >= 508 || !exists("pfmain_syntax_init") + if version < 508 + let pfmain_syntax_init = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink pfmainConf Statement + HiLink pfmainRef PreProc + HiLink pfmainWord identifier + + HiLink pfmainDict Type + HiLink pfmainQueueDir Constant + HiLink pfmainTransport Constant + HiLink pfmainLock Constant + HiLink pfmainAnswer Constant + + HiLink pfmainComment Comment + HiLink pfmainNumber Number + HiLink pfmainTime Number + HiLink pfmainIP Number + HiLink pfmainVariable Error + HiLink pfmainSpecial Special + + delcommand HiLink +endif + +let b:current_syntax = "pfmain" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/php.vim b/vim/bundle/ubuntu-vim72/syntax/php.vim new file mode 100644 index 0000000..4e6b95c --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/php.vim @@ -0,0 +1,649 @@ +" Vim syntax file +" Language: php PHP 3/4/5 +" Maintainer: Peter Hodge +" Last Change: June 9, 2006 +" URL: http://www.vim.org/scripts/script.php?script_id=1571 +" +" Former Maintainer: Debian VIM Maintainers +" Former URL: http://svn.debian.org/wsvn/pkg-vim/trunk/runtime/syntax/php.vim?op=file&rev=0&sc=0 +" +" Note: If you are using a colour terminal with dark background, you will probably find +" the 'elflord' colorscheme is much better for PHP's syntax than the default +" colourscheme, because elflord's colours will better highlight the break-points +" (Statements) in your code. +" +" Options: php_sql_query = 1 for SQL syntax highlighting inside strings +" php_htmlInStrings = 1 for HTML syntax highlighting inside strings +" php_baselib = 1 for highlighting baselib functions +" php_asp_tags = 1 for highlighting ASP-style short tags +" php_parent_error_close = 1 for highlighting parent error ] or ) +" php_parent_error_open = 1 for skipping an php end tag, if there exists an open ( or [ without a closing one +" php_oldStyle = 1 for using old colorstyle +" php_noShortTags = 1 don't sync as php +" php_folding = 1 for folding classes and functions +" php_folding = 2 for folding all { } regions +" php_sync_method = x +" x=-1 to sync by search ( default ) +" x>0 to sync at least x lines backwards +" x=0 to sync from start +" +" Added by Peter Hodge On June 9, 2006: +" php_special_functions = 1|0 to highlight functions with abnormal behaviour +" php_alt_comparisons = 1|0 to highlight comparison operators in an alternate colour +" php_alt_assignByReference = 1|0 to highlight '= &' in an alternate colour +" +" Note: these all default to 1 (On), so you would set them to '0' to turn them off. +" E.g., in your .vimrc or _vimrc file: +" let php_special_functions = 0 +" let php_alt_comparisons = 0 +" let php_alt_assignByReference = 0 +" Unletting these variables will revert back to their default (On). +" +" +" Note: +" Setting php_folding=1 will match a closing } by comparing the indent +" before the class or function keyword with the indent of a matching }. +" Setting php_folding=2 will match all of pairs of {,} ( see known +" bugs ii ) + +" Known Bugs: +" - setting php_parent_error_close on and php_parent_error_open off +" has these two leaks: +" i) A closing ) or ] inside a string match to the last open ( or [ +" before the string, when the the closing ) or ] is on the same line +" where the string started. In this case a following ) or ] after +" the string would be highlighted as an error, what is incorrect. +" ii) Same problem if you are setting php_folding = 2 with a closing +" } inside an string on the first line of this string. +" +" - A double-quoted string like this: +" "$foo->someVar->someOtherVar->bar" +" will highight '->someOtherVar->bar' as though they will be parsed +" as object member variables, but PHP only recognizes the first +" object member variable ($foo->someVar). +" +" + +" 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 + +if !exists("main_syntax") + let main_syntax = 'php' +endif + +if version < 600 + unlet! php_folding + if exists("php_sync_method") && !php_sync_method + let php_sync_method=-1 + endif + so :p:h/html.vim +else + runtime! syntax/html.vim + unlet b:current_syntax +endif + +" accept old options +if !exists("php_sync_method") + if exists("php_minlines") + let php_sync_method=php_minlines + else + let php_sync_method=-1 + endif +endif + +if exists("php_parentError") && !exists("php_parent_error_open") && !exists("php_parent_error_close") + let php_parent_error_close=1 + let php_parent_error_open=1 +endif + +syn cluster htmlPreproc add=phpRegion,phpRegionAsp,phpRegionSc + +if version < 600 + syn include @sqlTop :p:h/sql.vim +else + syn include @sqlTop syntax/sql.vim +endif +syn sync clear +unlet b:current_syntax +syn cluster sqlTop remove=sqlString,sqlComment +if exists( "php_sql_query") + syn cluster phpAddStrings contains=@sqlTop +endif + +if exists( "php_htmlInStrings") + syn cluster phpAddStrings add=@htmlTop +endif + +syn case match + +" Env Variables +syn keyword phpEnvVar GATEWAY_INTERFACE SERVER_NAME SERVER_SOFTWARE SERVER_PROTOCOL REQUEST_METHOD QUERY_STRING DOCUMENT_ROOT HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ENCODING HTTP_ACCEPT_LANGUAGE HTTP_CONNECTION HTTP_HOST HTTP_REFERER HTTP_USER_AGENT REMOTE_ADDR REMOTE_PORT SCRIPT_FILENAME SERVER_ADMIN SERVER_PORT SERVER_SIGNATURE PATH_TRANSLATED SCRIPT_NAME REQUEST_URI contained + +" Internal Variables +syn keyword phpIntVar GLOBALS PHP_ERRMSG PHP_SELF HTTP_GET_VARS HTTP_POST_VARS HTTP_COOKIE_VARS HTTP_POST_FILES HTTP_ENV_VARS HTTP_SERVER_VARS HTTP_SESSION_VARS HTTP_RAW_POST_DATA HTTP_STATE_VARS _GET _POST _COOKIE _FILES _SERVER _ENV _SERVER _REQUEST _SESSION contained + +" Constants +syn keyword phpCoreConstant PHP_VERSION PHP_OS DEFAULT_INCLUDE_PATH PEAR_INSTALL_DIR PEAR_EXTENSION_DIR PHP_EXTENSION_DIR PHP_BINDIR PHP_LIBDIR PHP_DATADIR PHP_SYSCONFDIR PHP_LOCALSTATEDIR PHP_CONFIG_FILE_PATH PHP_OUTPUT_HANDLER_START PHP_OUTPUT_HANDLER_CONT PHP_OUTPUT_HANDLER_END E_ERROR E_WARNING E_PARSE E_NOTICE E_CORE_ERROR E_CORE_WARNING E_COMPILE_ERROR E_COMPILE_WARNING E_USER_ERROR E_USER_WARNING E_USER_NOTICE E_ALL contained + +syn case ignore + +syn keyword phpConstant __LINE__ __FILE__ __FUNCTION__ __METHOD__ __CLASS__ contained + + +" Function and Methods ripped from php_manual_de.tar.gz Jan 2003 +syn keyword phpFunctions apache_child_terminate apache_get_modules apache_get_version apache_getenv apache_lookup_uri apache_note apache_request_headers apache_response_headers apache_setenv ascii2ebcdic ebcdic2ascii getallheaders virtual contained +syn keyword phpFunctions array_change_key_case array_chunk array_combine array_count_values array_diff_assoc array_diff_uassoc array_diff array_fill array_filter array_flip array_intersect_assoc array_intersect array_key_exists array_keys array_map array_merge_recursive array_merge array_multisort array_pad array_pop array_push array_rand array_reduce array_reverse array_search array_shift array_slice array_splice array_sum array_udiff_assoc array_udiff_uassoc array_udiff array_unique array_unshift array_values array_walk array arsort asort compact count current each end extract in_array key krsort ksort list natcasesort natsort next pos prev range reset rsort shuffle sizeof sort uasort uksort usort contained +syn keyword phpFunctions aspell_check aspell_new aspell_suggest contained +syn keyword phpFunctions bcadd bccomp bcdiv bcmod bcmul bcpow bcpowmod bcscale bcsqrt bcsub contained +syn keyword phpFunctions bzclose bzcompress bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite contained +syn keyword phpFunctions cal_days_in_month cal_from_jd cal_info cal_to_jd easter_date easter_days frenchtojd gregoriantojd jddayofweek jdmonthname jdtofrench jdtogregorian jdtojewish jdtojulian jdtounix jewishtojd juliantojd unixtojd contained +syn keyword phpFunctions ccvs_add ccvs_auth ccvs_command ccvs_count ccvs_delete ccvs_done ccvs_init ccvs_lookup ccvs_new ccvs_report ccvs_return ccvs_reverse ccvs_sale ccvs_status ccvs_textvalue ccvs_void contained +syn keyword phpFunctions call_user_method_array call_user_method class_exists get_class_methods get_class_vars get_class get_declared_classes get_object_vars get_parent_class is_a is_subclass_of method_exists contained +syn keyword phpFunctions com VARIANT com_addref com_get com_invoke com_isenum com_load_typelib com_load com_propget com_propput com_propset com_release com_set contained +syn keyword phpFunctions cpdf_add_annotation cpdf_add_outline cpdf_arc cpdf_begin_text cpdf_circle cpdf_clip cpdf_close cpdf_closepath_fill_stroke cpdf_closepath_stroke cpdf_closepath cpdf_continue_text cpdf_curveto cpdf_end_text cpdf_fill_stroke cpdf_fill cpdf_finalize_page cpdf_finalize cpdf_global_set_document_limits cpdf_import_jpeg cpdf_lineto cpdf_moveto cpdf_newpath cpdf_open cpdf_output_buffer cpdf_page_init cpdf_place_inline_image cpdf_rect cpdf_restore cpdf_rlineto cpdf_rmoveto cpdf_rotate_text cpdf_rotate cpdf_save_to_file cpdf_save cpdf_scale cpdf_set_action_url cpdf_set_char_spacing cpdf_set_creator cpdf_set_current_page cpdf_set_font_directories cpdf_set_font_map_file cpdf_set_font cpdf_set_horiz_scaling cpdf_set_keywords cpdf_set_leading cpdf_set_page_animation cpdf_set_subject cpdf_set_text_matrix cpdf_set_text_pos cpdf_set_text_rendering cpdf_set_text_rise cpdf_set_title cpdf_set_viewer_preferences cpdf_set_word_spacing cpdf_setdash cpdf_setflat cpdf_setgray_fill cpdf_setgray_stroke cpdf_setgray cpdf_setlinecap cpdf_setlinejoin cpdf_setlinewidth cpdf_setmiterlimit cpdf_setrgbcolor_fill cpdf_setrgbcolor_stroke cpdf_setrgbcolor cpdf_show_xy cpdf_show cpdf_stringwidth cpdf_stroke cpdf_text cpdf_translate contained +syn keyword phpFunctions crack_check crack_closedict crack_getlastmessage crack_opendict contained +syn keyword phpFunctions ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_graph ctype_lower ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit contained +syn keyword phpFunctions curl_close curl_errno curl_error curl_exec curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_setopt curl_version contained +syn keyword phpFunctions cybercash_base64_decode cybercash_base64_encode cybercash_decr cybercash_encr contained +syn keyword phpFunctions cyrus_authenticate cyrus_bind cyrus_close cyrus_connect cyrus_query cyrus_unbind contained +syn keyword phpFunctions checkdate date getdate gettimeofday gmdate gmmktime gmstrftime localtime microtime mktime strftime strtotime time contained +syn keyword phpFunctions dba_close dba_delete dba_exists dba_fetch dba_firstkey dba_handlers dba_insert dba_key_split dba_list dba_nextkey dba_open dba_optimize dba_popen dba_replace dba_sync contained +syn keyword phpFunctions dbase_add_record dbase_close dbase_create dbase_delete_record dbase_get_header_info dbase_get_record_with_names dbase_get_record dbase_numfields dbase_numrecords dbase_open dbase_pack dbase_replace_record contained +syn keyword phpFunctions dblist dbmclose dbmdelete dbmexists dbmfetch dbmfirstkey dbminsert dbmnextkey dbmopen dbmreplace contained +syn keyword phpFunctions dbplus_add dbplus_aql dbplus_chdir dbplus_close dbplus_curr dbplus_errcode dbplus_errno dbplus_find dbplus_first dbplus_flush dbplus_freealllocks dbplus_freelock dbplus_freerlocks dbplus_getlock dbplus_getunique dbplus_info dbplus_last dbplus_lockrel dbplus_next dbplus_open dbplus_prev dbplus_rchperm dbplus_rcreate dbplus_rcrtexact dbplus_rcrtlike dbplus_resolve dbplus_restorepos dbplus_rkeys dbplus_ropen dbplus_rquery dbplus_rrename dbplus_rsecindex dbplus_runlink dbplus_rzap dbplus_savepos dbplus_setindex dbplus_setindexbynumber dbplus_sql dbplus_tcl dbplus_tremove dbplus_undo dbplus_undoprepare dbplus_unlockrel dbplus_unselect dbplus_update dbplus_xlockrel dbplus_xunlockrel contained +syn keyword phpFunctions dbx_close dbx_compare dbx_connect dbx_error dbx_escape_string dbx_fetch_row dbx_query dbx_sort contained +syn keyword phpFunctions dio_close dio_fcntl dio_open dio_read dio_seek dio_stat dio_tcsetattr dio_truncate dio_write contained +syn keyword phpFunctions chdir chroot dir closedir getcwd opendir readdir rewinddir scandir contained +syn keyword phpFunctions domxml_new_doc domxml_open_file domxml_open_mem domxml_version domxml_xmltree domxml_xslt_stylesheet_doc domxml_xslt_stylesheet_file domxml_xslt_stylesheet xpath_eval_expression xpath_eval xpath_new_context xptr_eval xptr_new_context contained +syn keyword phpMethods name specified value create_attribute create_cdata_section create_comment create_element_ns create_element create_entity_reference create_processing_instruction create_text_node doctype document_element dump_file dump_mem get_element_by_id get_elements_by_tagname html_dump_mem xinclude entities internal_subset name notations public_id system_id get_attribute_node get_attribute get_elements_by_tagname has_attribute remove_attribute set_attribute tagname add_namespace append_child append_sibling attributes child_nodes clone_node dump_node first_child get_content has_attributes has_child_nodes insert_before is_blank_node last_child next_sibling node_name node_type node_value owner_document parent_node prefix previous_sibling remove_child replace_child replace_node set_content set_name set_namespace unlink_node data target process result_dump_file result_dump_mem contained +syn keyword phpFunctions dotnet_load contained +syn keyword phpFunctions debug_backtrace debug_print_backtrace error_log error_reporting restore_error_handler set_error_handler trigger_error user_error contained +syn keyword phpFunctions escapeshellarg escapeshellcmd exec passthru proc_close proc_get_status proc_nice proc_open proc_terminate shell_exec system contained +syn keyword phpFunctions fam_cancel_monitor fam_close fam_monitor_collection fam_monitor_directory fam_monitor_file fam_next_event fam_open fam_pending fam_resume_monitor fam_suspend_monitor contained +syn keyword phpFunctions fbsql_affected_rows fbsql_autocommit fbsql_change_user fbsql_close fbsql_commit fbsql_connect fbsql_create_blob fbsql_create_clob fbsql_create_db fbsql_data_seek fbsql_database_password fbsql_database fbsql_db_query fbsql_db_status fbsql_drop_db fbsql_errno fbsql_error fbsql_fetch_array fbsql_fetch_assoc fbsql_fetch_field fbsql_fetch_lengths fbsql_fetch_object fbsql_fetch_row fbsql_field_flags fbsql_field_len fbsql_field_name fbsql_field_seek fbsql_field_table fbsql_field_type fbsql_free_result fbsql_get_autostart_info fbsql_hostname fbsql_insert_id fbsql_list_dbs fbsql_list_fields fbsql_list_tables fbsql_next_result fbsql_num_fields fbsql_num_rows fbsql_password fbsql_pconnect fbsql_query fbsql_read_blob fbsql_read_clob fbsql_result fbsql_rollback fbsql_select_db fbsql_set_lob_mode fbsql_set_transaction fbsql_start_db fbsql_stop_db fbsql_tablename fbsql_username fbsql_warnings contained +syn keyword phpFunctions fdf_add_doc_javascript fdf_add_template fdf_close fdf_create fdf_enum_values fdf_errno fdf_error fdf_get_ap fdf_get_attachment fdf_get_encoding fdf_get_file fdf_get_flags fdf_get_opt fdf_get_status fdf_get_value fdf_get_version fdf_header fdf_next_field_name fdf_open_string fdf_open fdf_remove_item fdf_save_string fdf_save fdf_set_ap fdf_set_encoding fdf_set_file fdf_set_flags fdf_set_javascript_action fdf_set_opt fdf_set_status fdf_set_submit_form_action fdf_set_target_frame fdf_set_value fdf_set_version contained +syn keyword phpFunctions filepro_fieldcount filepro_fieldname filepro_fieldtype filepro_fieldwidth filepro_retrieve filepro_rowcount filepro contained +syn keyword phpFunctions basename chgrp chmod chown clearstatcache copy delete dirname disk_free_space disk_total_space diskfreespace fclose feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents file fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype flock fnmatch fopen fpassthru fputs fread fscanf fseek fstat ftell ftruncate fwrite glob is_dir is_executable is_file is_link is_readable is_uploaded_file is_writable is_writeable link linkinfo lstat mkdir move_uploaded_file parse_ini_file pathinfo pclose popen readfile readlink realpath rename rewind rmdir set_file_buffer stat symlink tempnam tmpfile touch umask unlink contained +syn keyword phpFunctions fribidi_log2vis contained +syn keyword phpFunctions ftp_alloc ftp_cdup ftp_chdir ftp_chmod ftp_close ftp_connect ftp_delete ftp_exec ftp_fget ftp_fput ftp_get_option ftp_get ftp_login ftp_mdtm ftp_mkdir ftp_nb_continue ftp_nb_fget ftp_nb_fput ftp_nb_get ftp_nb_put ftp_nlist ftp_pasv ftp_put ftp_pwd ftp_quit ftp_raw ftp_rawlist ftp_rename ftp_rmdir ftp_set_option ftp_site ftp_size ftp_ssl_connect ftp_systype contained +syn keyword phpFunctions call_user_func_array call_user_func create_function func_get_arg func_get_args func_num_args function_exists get_defined_functions register_shutdown_function register_tick_function unregister_tick_function contained +syn keyword phpFunctions bind_textdomain_codeset bindtextdomain dcgettext dcngettext dgettext dngettext gettext ngettext textdomain contained +syn keyword phpFunctions gmp_abs gmp_add gmp_and gmp_clrbit gmp_cmp gmp_com gmp_div_q gmp_div_qr gmp_div_r gmp_div gmp_divexact gmp_fact gmp_gcd gmp_gcdext gmp_hamdist gmp_init gmp_intval gmp_invert gmp_jacobi gmp_legendre gmp_mod gmp_mul gmp_neg gmp_or gmp_perfect_square gmp_popcount gmp_pow gmp_powm gmp_prob_prime gmp_random gmp_scan0 gmp_scan1 gmp_setbit gmp_sign gmp_sqrt gmp_sqrtrem gmp_sqrtrm gmp_strval gmp_sub gmp_xor contained +syn keyword phpFunctions header headers_list headers_sent setcookie contained +syn keyword phpFunctions hw_api_attribute hwapi_hgcsp hw_api_content hw_api_object contained +syn keyword phpMethods key langdepvalue value values checkin checkout children mimetype read content copy dbstat dcstat dstanchors dstofsrcanchors count reason find ftstat hwstat identify info insert insertanchor insertcollection insertdocument link lock move assign attreditable count insert remove title value object objectbyanchor parents description type remove replace setcommitedversion srcanchors srcsofdst unlock user userlist contained +syn keyword phpFunctions hw_Array2Objrec hw_changeobject hw_Children hw_ChildrenObj hw_Close hw_Connect hw_connection_info hw_cp hw_Deleteobject hw_DocByAnchor hw_DocByAnchorObj hw_Document_Attributes hw_Document_BodyTag hw_Document_Content hw_Document_SetContent hw_Document_Size hw_dummy hw_EditText hw_Error hw_ErrorMsg hw_Free_Document hw_GetAnchors hw_GetAnchorsObj hw_GetAndLock hw_GetChildColl hw_GetChildCollObj hw_GetChildDocColl hw_GetChildDocCollObj hw_GetObject hw_GetObjectByQuery hw_GetObjectByQueryColl hw_GetObjectByQueryCollObj hw_GetObjectByQueryObj hw_GetParents hw_GetParentsObj hw_getrellink hw_GetRemote hw_getremotechildren hw_GetSrcByDestObj hw_GetText hw_getusername hw_Identify hw_InCollections hw_Info hw_InsColl hw_InsDoc hw_insertanchors hw_InsertDocument hw_InsertObject hw_mapid hw_Modifyobject hw_mv hw_New_Document hw_objrec2array hw_Output_Document hw_pConnect hw_PipeDocument hw_Root hw_setlinkroot hw_stat hw_Unlock hw_Who contained +syn keyword phpFunctions ibase_add_user ibase_affected_rows ibase_blob_add ibase_blob_cancel ibase_blob_close ibase_blob_create ibase_blob_echo ibase_blob_get ibase_blob_import ibase_blob_info ibase_blob_open ibase_close ibase_commit_ret ibase_commit ibase_connect ibase_delete_user ibase_drop_db ibase_errcode ibase_errmsg ibase_execute ibase_fetch_assoc ibase_fetch_object ibase_fetch_row ibase_field_info ibase_free_event_handler ibase_free_query ibase_free_result ibase_gen_id ibase_modify_user ibase_name_result ibase_num_fields ibase_num_params ibase_param_info ibase_pconnect ibase_prepare ibase_query ibase_rollback_ret ibase_rollback ibase_set_event_handler ibase_timefmt ibase_trans ibase_wait_event contained +syn keyword phpFunctions iconv_get_encoding iconv_mime_decode_headers iconv_mime_decode iconv_mime_encode iconv_set_encoding iconv_strlen iconv_strpos iconv_strrpos iconv_substr iconv ob_iconv_handler contained +syn keyword phpFunctions ifx_affected_rows ifx_blobinfile_mode ifx_byteasvarchar ifx_close ifx_connect ifx_copy_blob ifx_create_blob ifx_create_char ifx_do ifx_error ifx_errormsg ifx_fetch_row ifx_fieldproperties ifx_fieldtypes ifx_free_blob ifx_free_char ifx_free_result ifx_get_blob ifx_get_char ifx_getsqlca ifx_htmltbl_result ifx_nullformat ifx_num_fields ifx_num_rows ifx_pconnect ifx_prepare ifx_query ifx_textasvarchar ifx_update_blob ifx_update_char ifxus_close_slob ifxus_create_slob ifxus_free_slob ifxus_open_slob ifxus_read_slob ifxus_seek_slob ifxus_tell_slob ifxus_write_slob contained +syn keyword phpFunctions exif_imagetype exif_read_data exif_thumbnail gd_info getimagesize image_type_to_mime_type image2wbmp imagealphablending imageantialias imagearc imagechar imagecharup imagecolorallocate imagecolorallocatealpha imagecolorat imagecolorclosest imagecolorclosestalpha imagecolorclosesthwb imagecolordeallocate imagecolorexact imagecolorexactalpha imagecolormatch imagecolorresolve imagecolorresolvealpha imagecolorset imagecolorsforindex imagecolorstotal imagecolortransparent imagecopy imagecopymerge imagecopymergegray imagecopyresampled imagecopyresized imagecreate imagecreatefromgd2 imagecreatefromgd2part imagecreatefromgd imagecreatefromgif imagecreatefromjpeg imagecreatefrompng imagecreatefromstring imagecreatefromwbmp imagecreatefromxbm imagecreatefromxpm imagecreatetruecolor imagedashedline imagedestroy imageellipse imagefill imagefilledarc imagefilledellipse imagefilledpolygon imagefilledrectangle imagefilltoborder imagefontheight imagefontwidth imageftbbox imagefttext imagegammacorrect imagegd2 imagegd imagegif imageinterlace imageistruecolor imagejpeg imageline imageloadfont imagepalettecopy imagepng imagepolygon imagepsbbox imagepscopyfont imagepsencodefont imagepsextendfont imagepsfreefont imagepsloadfont imagepsslantfont imagepstext imagerectangle imagerotate imagesavealpha imagesetbrush imagesetpixel imagesetstyle imagesetthickness imagesettile imagestring imagestringup imagesx imagesy imagetruecolortopalette imagettfbbox imagettftext imagetypes imagewbmp iptcembed iptcparse jpeg2wbmp png2wbmp read_exif_data contained +syn keyword phpFunctions imap_8bit imap_alerts imap_append imap_base64 imap_binary imap_body imap_bodystruct imap_check imap_clearflag_full imap_close imap_createmailbox imap_delete imap_deletemailbox imap_errors imap_expunge imap_fetch_overview imap_fetchbody imap_fetchheader imap_fetchstructure imap_get_quota imap_get_quotaroot imap_getacl imap_getmailboxes imap_getsubscribed imap_header imap_headerinfo imap_headers imap_last_error imap_list imap_listmailbox imap_listscan imap_listsubscribed imap_lsub imap_mail_compose imap_mail_copy imap_mail_move imap_mail imap_mailboxmsginfo imap_mime_header_decode imap_msgno imap_num_msg imap_num_recent imap_open imap_ping imap_qprint imap_renamemailbox imap_reopen imap_rfc822_parse_adrlist imap_rfc822_parse_headers imap_rfc822_write_address imap_scanmailbox imap_search imap_set_quota imap_setacl imap_setflag_full imap_sort imap_status imap_subscribe imap_thread imap_timeout imap_uid imap_undelete imap_unsubscribe imap_utf7_decode imap_utf7_encode imap_utf8 contained +syn keyword phpFunctions assert_options assert dl extension_loaded get_cfg_var get_current_user get_defined_constants get_extension_funcs get_include_path get_included_files get_loaded_extensions get_magic_quotes_gpc get_magic_quotes_runtime get_required_files getenv getlastmod getmygid getmyinode getmypid getmyuid getopt getrusage ini_alter ini_get_all ini_get ini_restore ini_set main memory_get_usage php_ini_scanned_files php_logo_guid php_sapi_name php_uname phpcredits phpinfo phpversion putenv restore_include_path set_include_path set_magic_quotes_runtime set_time_limit version_compare zend_logo_guid zend_version contained +syn keyword phpFunctions ingres_autocommit ingres_close ingres_commit ingres_connect ingres_fetch_array ingres_fetch_object ingres_fetch_row ingres_field_length ingres_field_name ingres_field_nullable ingres_field_precision ingres_field_scale ingres_field_type ingres_num_fields ingres_num_rows ingres_pconnect ingres_query ingres_rollback contained +syn keyword phpFunctions ircg_channel_mode ircg_disconnect ircg_fetch_error_msg ircg_get_username ircg_html_encode ircg_ignore_add ircg_ignore_del ircg_is_conn_alive ircg_join ircg_kick ircg_lookup_format_messages ircg_msg ircg_nick ircg_nickname_escape ircg_nickname_unescape ircg_notice ircg_part ircg_pconnect ircg_register_format_messages ircg_set_current ircg_set_file ircg_set_on_die ircg_topic ircg_whois contained +syn keyword phpFunctions java_last_exception_clear java_last_exception_get contained +syn keyword phpFunctions ldap_8859_to_t61 ldap_add ldap_bind ldap_close ldap_compare ldap_connect ldap_count_entries ldap_delete ldap_dn2ufn ldap_err2str ldap_errno ldap_error ldap_explode_dn ldap_first_attribute ldap_first_entry ldap_first_reference ldap_free_result ldap_get_attributes ldap_get_dn ldap_get_entries ldap_get_option ldap_get_values_len ldap_get_values ldap_list ldap_mod_add ldap_mod_del ldap_mod_replace ldap_modify ldap_next_attribute ldap_next_entry ldap_next_reference ldap_parse_reference ldap_parse_result ldap_read ldap_rename ldap_search ldap_set_option ldap_set_rebind_proc ldap_sort ldap_start_tls ldap_t61_to_8859 ldap_unbind contained +syn keyword phpFunctions lzf_compress lzf_decompress lzf_optimized_for contained +syn keyword phpFunctions ezmlm_hash mail contained +syn keyword phpFunctions mailparse_determine_best_xfer_encoding mailparse_msg_create mailparse_msg_extract_part_file mailparse_msg_extract_part mailparse_msg_free mailparse_msg_get_part_data mailparse_msg_get_part mailparse_msg_get_structure mailparse_msg_parse_file mailparse_msg_parse mailparse_rfc822_parse_addresses mailparse_stream_encode mailparse_uudecode_all contained +syn keyword phpFunctions abs acos acosh asin asinh atan2 atan atanh base_convert bindec ceil cos cosh decbin dechex decoct deg2rad exp expm1 floor fmod getrandmax hexdec hypot is_finite is_infinite is_nan lcg_value log10 log1p log max min mt_getrandmax mt_rand mt_srand octdec pi pow rad2deg rand round sin sinh sqrt srand tan tanh contained +syn keyword phpFunctions mb_convert_case mb_convert_encoding mb_convert_kana mb_convert_variables mb_decode_mimeheader mb_decode_numericentity mb_detect_encoding mb_detect_order mb_encode_mimeheader mb_encode_numericentity mb_ereg_match mb_ereg_replace mb_ereg_search_getpos mb_ereg_search_getregs mb_ereg_search_init mb_ereg_search_pos mb_ereg_search_regs mb_ereg_search_setpos mb_ereg_search mb_ereg mb_eregi_replace mb_eregi mb_get_info mb_http_input mb_http_output mb_internal_encoding mb_language mb_output_handler mb_parse_str mb_preferred_mime_name mb_regex_encoding mb_regex_set_options mb_send_mail mb_split mb_strcut mb_strimwidth mb_strlen mb_strpos mb_strrpos mb_strtolower mb_strtoupper mb_strwidth mb_substitute_character mb_substr_count mb_substr contained +syn keyword phpFunctions mcal_append_event mcal_close mcal_create_calendar mcal_date_compare mcal_date_valid mcal_day_of_week mcal_day_of_year mcal_days_in_month mcal_delete_calendar mcal_delete_event mcal_event_add_attribute mcal_event_init mcal_event_set_alarm mcal_event_set_category mcal_event_set_class mcal_event_set_description mcal_event_set_end mcal_event_set_recur_daily mcal_event_set_recur_monthly_mday mcal_event_set_recur_monthly_wday mcal_event_set_recur_none mcal_event_set_recur_weekly mcal_event_set_recur_yearly mcal_event_set_start mcal_event_set_title mcal_expunge mcal_fetch_current_stream_event mcal_fetch_event mcal_is_leap_year mcal_list_alarms mcal_list_events mcal_next_recurrence mcal_open mcal_popen mcal_rename_calendar mcal_reopen mcal_snooze mcal_store_event mcal_time_valid mcal_week_of_year contained +syn keyword phpFunctions mcrypt_cbc mcrypt_cfb mcrypt_create_iv mcrypt_decrypt mcrypt_ecb mcrypt_enc_get_algorithms_name mcrypt_enc_get_block_size mcrypt_enc_get_iv_size mcrypt_enc_get_key_size mcrypt_enc_get_modes_name mcrypt_enc_get_supported_key_sizes mcrypt_enc_is_block_algorithm_mode mcrypt_enc_is_block_algorithm mcrypt_enc_is_block_mode mcrypt_enc_self_test mcrypt_encrypt mcrypt_generic_deinit mcrypt_generic_end mcrypt_generic_init mcrypt_generic mcrypt_get_block_size mcrypt_get_cipher_name mcrypt_get_iv_size mcrypt_get_key_size mcrypt_list_algorithms mcrypt_list_modes mcrypt_module_close mcrypt_module_get_algo_block_size mcrypt_module_get_algo_key_size mcrypt_module_get_supported_key_sizes mcrypt_module_is_block_algorithm_mode mcrypt_module_is_block_algorithm mcrypt_module_is_block_mode mcrypt_module_open mcrypt_module_self_test mcrypt_ofb mdecrypt_generic contained +syn keyword phpFunctions mcve_adduser mcve_adduserarg mcve_bt mcve_checkstatus mcve_chkpwd mcve_chngpwd mcve_completeauthorizations mcve_connect mcve_connectionerror mcve_deleteresponse mcve_deletetrans mcve_deleteusersetup mcve_deluser mcve_destroyconn mcve_destroyengine mcve_disableuser mcve_edituser mcve_enableuser mcve_force mcve_getcell mcve_getcellbynum mcve_getcommadelimited mcve_getheader mcve_getuserarg mcve_getuserparam mcve_gft mcve_gl mcve_gut mcve_initconn mcve_initengine mcve_initusersetup mcve_iscommadelimited mcve_liststats mcve_listusers mcve_maxconntimeout mcve_monitor mcve_numcolumns mcve_numrows mcve_override mcve_parsecommadelimited mcve_ping mcve_preauth mcve_preauthcompletion mcve_qc mcve_responseparam mcve_return mcve_returncode mcve_returnstatus mcve_sale mcve_setblocking mcve_setdropfile mcve_setip mcve_setssl_files mcve_setssl mcve_settimeout mcve_settle mcve_text_avs mcve_text_code mcve_text_cv mcve_transactionauth mcve_transactionavs mcve_transactionbatch mcve_transactioncv mcve_transactionid mcve_transactionitem mcve_transactionssent mcve_transactiontext mcve_transinqueue mcve_transnew mcve_transparam mcve_transsend mcve_ub mcve_uwait mcve_verifyconnection mcve_verifysslcert mcve_void contained +syn keyword phpFunctions mhash_count mhash_get_block_size mhash_get_hash_name mhash_keygen_s2k mhash contained +syn keyword phpFunctions mime_content_type contained +syn keyword phpFunctions ming_setcubicthreshold ming_setscale ming_useswfversion SWFAction SWFBitmap swfbutton_keypress SWFbutton SWFDisplayItem SWFFill SWFFont SWFGradient SWFMorph SWFMovie SWFShape SWFSprite SWFText SWFTextField contained +syn keyword phpMethods getHeight getWidth addAction addShape setAction setdown setHit setOver setUp addColor move moveTo multColor remove Rotate rotateTo scale scaleTo setDepth setName setRatio skewX skewXTo skewY skewYTo moveTo rotateTo scaleTo skewXTo skewYTo getwidth addEntry getshape1 getshape2 add nextframe output remove save setbackground setdimension setframes setrate streammp3 addFill drawCurve drawCurveTo drawLine drawLineTo movePen movePenTo setLeftFill setLine setRightFill add nextframe remove setframes addString getWidth moveTo setColor setFont setHeight setSpacing addstring align setbounds setcolor setFont setHeight setindentation setLeftMargin setLineSpacing setMargins setname setrightMargin contained +syn keyword phpFunctions connection_aborted connection_status connection_timeout constant define defined die eval exit get_browser highlight_file highlight_string ignore_user_abort pack show_source sleep uniqid unpack usleep contained +syn keyword phpFunctions udm_add_search_limit udm_alloc_agent udm_api_version udm_cat_list udm_cat_path udm_check_charset udm_check_stored udm_clear_search_limits udm_close_stored udm_crc32 udm_errno udm_error udm_find udm_free_agent udm_free_ispell_data udm_free_res udm_get_doc_count udm_get_res_field udm_get_res_param udm_load_ispell_data udm_open_stored udm_set_agent_param contained +syn keyword phpFunctions msession_connect msession_count msession_create msession_destroy msession_disconnect msession_find msession_get_array msession_get msession_getdata msession_inc msession_list msession_listvar msession_lock msession_plugin msession_randstr msession_set_array msession_set msession_setdata msession_timeout msession_uniq msession_unlock contained +syn keyword phpFunctions msql_affected_rows msql_close msql_connect msql_create_db msql_createdb msql_data_seek msql_dbname msql_drop_db msql_dropdb msql_error msql_fetch_array msql_fetch_field msql_fetch_object msql_fetch_row msql_field_seek msql_fieldflags msql_fieldlen msql_fieldname msql_fieldtable msql_fieldtype msql_free_result msql_freeresult msql_list_dbs msql_list_fields msql_list_tables msql_listdbs msql_listfields msql_listtables msql_num_fields msql_num_rows msql_numfields msql_numrows msql_pconnect msql_query msql_regcase msql_result msql_select_db msql_selectdb msql_tablename msql contained +syn keyword phpFunctions mssql_bind mssql_close mssql_connect mssql_data_seek mssql_execute mssql_fetch_array mssql_fetch_assoc mssql_fetch_batch mssql_fetch_field mssql_fetch_object mssql_fetch_row mssql_field_length mssql_field_name mssql_field_seek mssql_field_type mssql_free_result mssql_free_statement mssql_get_last_message mssql_guid_string mssql_init mssql_min_error_severity mssql_min_message_severity mssql_next_result mssql_num_fields mssql_num_rows mssql_pconnect mssql_query mssql_result mssql_rows_affected mssql_select_db contained +syn keyword phpFunctions muscat_close muscat_get muscat_give muscat_setup_net muscat_setup contained +syn keyword phpFunctions mysql_affected_rows mysql_change_user mysql_client_encoding mysql_close mysql_connect mysql_create_db mysql_data_seek mysql_db_name mysql_db_query mysql_drop_db mysql_errno mysql_error mysql_escape_string mysql_fetch_array mysql_fetch_assoc mysql_fetch_field mysql_fetch_lengths mysql_fetch_object mysql_fetch_row mysql_field_flags mysql_field_len mysql_field_name mysql_field_seek mysql_field_table mysql_field_type mysql_free_result mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql_insert_id mysql_list_dbs mysql_list_fields mysql_list_processes mysql_list_tables mysql_num_fields mysql_num_rows mysql_pconnect mysql_ping mysql_query mysql_real_escape_string mysql_result mysql_select_db mysql_stat mysql_tablename mysql_thread_id mysql_unbuffered_query contained +syn keyword phpFunctions mysqli_affected_rows mysqli_autocommit mysqli_bind_param mysqli_bind_result mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect mysqli_data_seek mysqli_debug mysqli_disable_reads_from_master mysqli_disable_rpl_parse mysqli_dump_debug_info mysqli_enable_reads_from_master mysqli_enable_rpl_parse mysqli_errno mysqli_error mysqli_execute mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_fetch mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_client_info mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_master_query mysqli_num_fields mysqli_num_rows mysqli_options mysqli_param_count mysqli_ping mysqli_prepare_result mysqli_prepare mysqli_profiler mysqli_query mysqli_read_query_result mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reload mysqli_rollback mysqli_rpl_parse_enabled mysqli_rpl_probe mysqli_rpl_query_type mysqli_select_db mysqli_send_long_data mysqli_send_query mysqli_slave_query mysqli_ssl_set mysqli_stat mysqli_stmt_affected_rows mysqli_stmt_close mysqli_stmt_errno mysqli_stmt_error mysqli_stmt_store_result mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count contained +syn keyword phpFunctions ncurses_addch ncurses_addchnstr ncurses_addchstr ncurses_addnstr ncurses_addstr ncurses_assume_default_colors ncurses_attroff ncurses_attron ncurses_attrset ncurses_baudrate ncurses_beep ncurses_bkgd ncurses_bkgdset ncurses_border ncurses_bottom_panel ncurses_can_change_color ncurses_cbreak ncurses_clear ncurses_clrtobot ncurses_clrtoeol ncurses_color_content ncurses_color_set ncurses_curs_set ncurses_def_prog_mode ncurses_def_shell_mode ncurses_define_key ncurses_del_panel ncurses_delay_output ncurses_delch ncurses_deleteln ncurses_delwin ncurses_doupdate ncurses_echo ncurses_echochar ncurses_end ncurses_erase ncurses_erasechar ncurses_filter ncurses_flash ncurses_flushinp ncurses_getch ncurses_getmaxyx ncurses_getmouse ncurses_getyx ncurses_halfdelay ncurses_has_colors ncurses_has_ic ncurses_has_il ncurses_has_key ncurses_hide_panel ncurses_hline ncurses_inch ncurses_init_color ncurses_init_pair ncurses_init ncurses_insch ncurses_insdelln ncurses_insertln ncurses_insstr ncurses_instr ncurses_isendwin ncurses_keyok ncurses_keypad ncurses_killchar ncurses_longname ncurses_meta ncurses_mouse_trafo ncurses_mouseinterval ncurses_mousemask ncurses_move_panel ncurses_move ncurses_mvaddch ncurses_mvaddchnstr ncurses_mvaddchstr ncurses_mvaddnstr ncurses_mvaddstr ncurses_mvcur ncurses_mvdelch ncurses_mvgetch ncurses_mvhline ncurses_mvinch ncurses_mvvline ncurses_mvwaddstr ncurses_napms ncurses_new_panel ncurses_newpad ncurses_newwin ncurses_nl ncurses_nocbreak ncurses_noecho ncurses_nonl ncurses_noqiflush ncurses_noraw ncurses_pair_content ncurses_panel_above ncurses_panel_below ncurses_panel_window ncurses_pnoutrefresh ncurses_prefresh ncurses_putp ncurses_qiflush ncurses_raw ncurses_refresh ncurses_replace_panel ncurses_reset_prog_mode ncurses_reset_shell_mode ncurses_resetty ncurses_savetty ncurses_scr_dump ncurses_scr_init ncurses_scr_restore ncurses_scr_set ncurses_scrl ncurses_show_panel ncurses_slk_attr ncurses_slk_attroff ncurses_slk_attron ncurses_slk_attrset ncurses_slk_clear ncurses_slk_color ncurses_slk_init ncurses_slk_noutrefresh ncurses_slk_refresh ncurses_slk_restore ncurses_slk_set ncurses_slk_touch ncurses_standend ncurses_standout ncurses_start_color ncurses_termattrs ncurses_termname ncurses_timeout ncurses_top_panel ncurses_typeahead ncurses_ungetch ncurses_ungetmouse ncurses_update_panels ncurses_use_default_colors ncurses_use_env ncurses_use_extended_names ncurses_vidattr ncurses_vline ncurses_waddch ncurses_waddstr ncurses_wattroff ncurses_wattron ncurses_wattrset ncurses_wborder ncurses_wclear ncurses_wcolor_set ncurses_werase ncurses_wgetch ncurses_whline ncurses_wmouse_trafo ncurses_wmove ncurses_wnoutrefresh ncurses_wrefresh ncurses_wstandend ncurses_wstandout ncurses_wvline contained +syn keyword phpFunctions checkdnsrr closelog debugger_off debugger_on define_syslog_variables dns_check_record dns_get_mx dns_get_record fsockopen gethostbyaddr gethostbyname gethostbynamel getmxrr getprotobyname getprotobynumber getservbyname getservbyport ip2long long2ip openlog pfsockopen socket_get_status socket_set_blocking socket_set_timeout syslog contained +syn keyword phpFunctions yp_all yp_cat yp_err_string yp_errno yp_first yp_get_default_domain yp_master yp_match yp_next yp_order contained +syn keyword phpFunctions notes_body notes_copy_db notes_create_db notes_create_note notes_drop_db notes_find_note notes_header_info notes_list_msgs notes_mark_read notes_mark_unread notes_nav_create notes_search notes_unread notes_version contained +syn keyword phpFunctions nsapi_request_headers nsapi_response_headers nsapi_virtual contained +syn keyword phpFunctions aggregate_info aggregate_methods_by_list aggregate_methods_by_regexp aggregate_methods aggregate_properties_by_list aggregate_properties_by_regexp aggregate_properties aggregate aggregation_info deaggregate contained +syn keyword phpFunctions ocibindbyname ocicancel ocicloselob ocicollappend ocicollassign ocicollassignelem ocicollgetelem ocicollmax ocicollsize ocicolltrim ocicolumnisnull ocicolumnname ocicolumnprecision ocicolumnscale ocicolumnsize ocicolumntype ocicolumntyperaw ocicommit ocidefinebyname ocierror ociexecute ocifetch ocifetchinto ocifetchstatement ocifreecollection ocifreecursor ocifreedesc ocifreestatement ociinternaldebug ociloadlob ocilogoff ocilogon ocinewcollection ocinewcursor ocinewdescriptor ocinlogon ocinumcols ociparse ociplogon ociresult ocirollback ocirowcount ocisavelob ocisavelobfile ociserverversion ocisetprefetch ocistatementtype ociwritelobtofile ociwritetemporarylob contained +syn keyword phpFunctions odbc_autocommit odbc_binmode odbc_close_all odbc_close odbc_columnprivileges odbc_columns odbc_commit odbc_connect odbc_cursor odbc_data_source odbc_do odbc_error odbc_errormsg odbc_exec odbc_execute odbc_fetch_array odbc_fetch_into odbc_fetch_object odbc_fetch_row odbc_field_len odbc_field_name odbc_field_num odbc_field_precision odbc_field_scale odbc_field_type odbc_foreignkeys odbc_free_result odbc_gettypeinfo odbc_longreadlen odbc_next_result odbc_num_fields odbc_num_rows odbc_pconnect odbc_prepare odbc_primarykeys odbc_procedurecolumns odbc_procedures odbc_result_all odbc_result odbc_rollback odbc_setoption odbc_specialcolumns odbc_statistics odbc_tableprivileges odbc_tables contained +syn keyword phpFunctions openssl_csr_export_to_file openssl_csr_export openssl_csr_new openssl_csr_sign openssl_error_string openssl_free_key openssl_get_privatekey openssl_get_publickey openssl_open openssl_pkcs7_decrypt openssl_pkcs7_encrypt openssl_pkcs7_sign openssl_pkcs7_verify openssl_pkey_export_to_file openssl_pkey_export openssl_pkey_get_private openssl_pkey_get_public openssl_pkey_new openssl_private_decrypt openssl_private_encrypt openssl_public_decrypt openssl_public_encrypt openssl_seal openssl_sign openssl_verify openssl_x509_check_private_key openssl_x509_checkpurpose openssl_x509_export_to_file openssl_x509_export openssl_x509_free openssl_x509_parse openssl_x509_read contained +syn keyword phpFunctions ora_bind ora_close ora_columnname ora_columnsize ora_columntype ora_commit ora_commitoff ora_commiton ora_do ora_error ora_errorcode ora_exec ora_fetch_into ora_fetch ora_getcolumn ora_logoff ora_logon ora_numcols ora_numrows ora_open ora_parse ora_plogon ora_rollback contained +syn keyword phpFunctions flush ob_clean ob_end_clean ob_end_flush ob_flush ob_get_clean ob_get_contents ob_get_flush ob_get_length ob_get_level ob_get_status ob_gzhandler ob_implicit_flush ob_list_handlers ob_start output_add_rewrite_var output_reset_rewrite_vars contained +syn keyword phpFunctions overload contained +syn keyword phpFunctions ovrimos_close ovrimos_commit ovrimos_connect ovrimos_cursor ovrimos_exec ovrimos_execute ovrimos_fetch_into ovrimos_fetch_row ovrimos_field_len ovrimos_field_name ovrimos_field_num ovrimos_field_type ovrimos_free_result ovrimos_longreadlen ovrimos_num_fields ovrimos_num_rows ovrimos_prepare ovrimos_result_all ovrimos_result ovrimos_rollback contained +syn keyword phpFunctions pcntl_exec pcntl_fork pcntl_signal pcntl_waitpid pcntl_wexitstatus pcntl_wifexited pcntl_wifsignaled pcntl_wifstopped pcntl_wstopsig pcntl_wtermsig contained +syn keyword phpFunctions preg_grep preg_match_all preg_match preg_quote preg_replace_callback preg_replace preg_split contained +syn keyword phpFunctions pdf_add_annotation pdf_add_bookmark pdf_add_launchlink pdf_add_locallink pdf_add_note pdf_add_outline pdf_add_pdflink pdf_add_thumbnail pdf_add_weblink pdf_arc pdf_arcn pdf_attach_file pdf_begin_page pdf_begin_pattern pdf_begin_template pdf_circle pdf_clip pdf_close_image pdf_close_pdi_page pdf_close_pdi pdf_close pdf_closepath_fill_stroke pdf_closepath_stroke pdf_closepath pdf_concat pdf_continue_text pdf_curveto pdf_delete pdf_end_page pdf_end_pattern pdf_end_template pdf_endpath pdf_fill_stroke pdf_fill pdf_findfont pdf_get_buffer pdf_get_font pdf_get_fontname pdf_get_fontsize pdf_get_image_height pdf_get_image_width pdf_get_majorversion pdf_get_minorversion pdf_get_parameter pdf_get_pdi_parameter pdf_get_pdi_value pdf_get_value pdf_initgraphics pdf_lineto pdf_makespotcolor pdf_moveto pdf_new pdf_open_CCITT pdf_open_file pdf_open_gif pdf_open_image_file pdf_open_image pdf_open_jpeg pdf_open_memory_image pdf_open_pdi_page pdf_open_pdi pdf_open_png pdf_open_tiff pdf_open pdf_place_image pdf_place_pdi_page pdf_rect pdf_restore pdf_rotate pdf_save pdf_scale pdf_set_border_color pdf_set_border_dash pdf_set_border_style pdf_set_char_spacing pdf_set_duration pdf_set_font pdf_set_horiz_scaling pdf_set_info_author pdf_set_info_creator pdf_set_info_keywords pdf_set_info_subject pdf_set_info_title pdf_set_info pdf_set_leading pdf_set_parameter pdf_set_text_matrix pdf_set_text_pos pdf_set_text_rendering pdf_set_text_rise pdf_set_value pdf_set_word_spacing pdf_setcolor pdf_setdash pdf_setflat pdf_setfont pdf_setgray_fill pdf_setgray_stroke pdf_setgray pdf_setlinecap pdf_setlinejoin pdf_setlinewidth pdf_setmatrix pdf_setmiterlimit pdf_setpolydash pdf_setrgbcolor_fill pdf_setrgbcolor_stroke pdf_setrgbcolor pdf_show_boxed pdf_show_xy pdf_show pdf_skew pdf_stringwidth pdf_stroke pdf_translate contained +syn keyword phpFunctions pfpro_cleanup pfpro_init pfpro_process_raw pfpro_process pfpro_version contained +syn keyword phpFunctions pg_affected_rows pg_cancel_query pg_client_encoding pg_close pg_connect pg_connection_busy pg_connection_reset pg_connection_status pg_convert pg_copy_from pg_copy_to pg_dbname pg_delete pg_end_copy pg_escape_bytea pg_escape_string pg_fetch_all pg_fetch_array pg_fetch_assoc pg_fetch_object pg_fetch_result pg_fetch_row pg_field_is_null pg_field_name pg_field_num pg_field_prtlen pg_field_size pg_field_type pg_free_result pg_get_notify pg_get_pid pg_get_result pg_host pg_insert pg_last_error pg_last_notice pg_last_oid pg_lo_close pg_lo_create pg_lo_export pg_lo_import pg_lo_open pg_lo_read_all pg_lo_read pg_lo_seek pg_lo_tell pg_lo_unlink pg_lo_write pg_meta_data pg_num_fields pg_num_rows pg_options pg_pconnect pg_ping pg_port pg_put_line pg_query pg_result_error pg_result_seek pg_result_status pg_select pg_send_query pg_set_client_encoding pg_trace pg_tty pg_unescape_bytea pg_untrace pg_update contained +syn keyword phpFunctions posix_ctermid posix_get_last_error posix_getcwd posix_getegid posix_geteuid posix_getgid posix_getgrgid posix_getgrnam posix_getgroups posix_getlogin posix_getpgid posix_getpgrp posix_getpid posix_getppid posix_getpwnam posix_getpwuid posix_getrlimit posix_getsid posix_getuid posix_isatty posix_kill posix_mkfifo posix_setegid posix_seteuid posix_setgid posix_setpgid posix_setsid posix_setuid posix_strerror posix_times posix_ttyname posix_uname contained +syn keyword phpFunctions printer_abort printer_close printer_create_brush printer_create_dc printer_create_font printer_create_pen printer_delete_brush printer_delete_dc printer_delete_font printer_delete_pen printer_draw_bmp printer_draw_chord printer_draw_elipse printer_draw_line printer_draw_pie printer_draw_rectangle printer_draw_roundrect printer_draw_text printer_end_doc printer_end_page printer_get_option printer_list printer_logical_fontheight printer_open printer_select_brush printer_select_font printer_select_pen printer_set_option printer_start_doc printer_start_page printer_write contained +syn keyword phpFunctions pspell_add_to_personal pspell_add_to_session pspell_check pspell_clear_session pspell_config_create pspell_config_ignore pspell_config_mode pspell_config_personal pspell_config_repl pspell_config_runtogether pspell_config_save_repl pspell_new_config pspell_new_personal pspell_new pspell_save_wordlist pspell_store_replacement pspell_suggest contained +syn keyword phpFunctions qdom_error qdom_tree contained +syn keyword phpFunctions readline_add_history readline_clear_history readline_completion_function readline_info readline_list_history readline_read_history readline_write_history readline contained +syn keyword phpFunctions recode_file recode_string recode contained +syn keyword phpFunctions ereg_replace ereg eregi_replace eregi split spliti sql_regcase contained +syn keyword phpFunctions ftok msg_get_queue msg_receive msg_remove_queue msg_send msg_set_queue msg_stat_queue sem_acquire sem_get sem_release sem_remove shm_attach shm_detach shm_get_var shm_put_var shm_remove_var shm_remove contained +syn keyword phpFunctions sesam_affected_rows sesam_commit sesam_connect sesam_diagnostic sesam_disconnect sesam_errormsg sesam_execimm sesam_fetch_array sesam_fetch_result sesam_fetch_row sesam_field_array sesam_field_name sesam_free_result sesam_num_fields sesam_query sesam_rollback sesam_seek_row sesam_settransaction contained +syn keyword phpFunctions session_cache_expire session_cache_limiter session_decode session_destroy session_encode session_get_cookie_params session_id session_is_registered session_module_name session_name session_regenerate_id session_register session_save_path session_set_cookie_params session_set_save_handler session_start session_unregister session_unset session_write_close contained +syn keyword phpFunctions shmop_close shmop_delete shmop_open shmop_read shmop_size shmop_write contained +syn keyword phpFunctions snmp_get_quick_print snmp_set_quick_print snmpget snmprealwalk snmpset snmpwalk snmpwalkoid contained +syn keyword phpFunctions socket_accept socket_bind socket_clear_error socket_close socket_connect socket_create_listen socket_create_pair socket_create socket_get_option socket_getpeername socket_getsockname socket_iovec_add socket_iovec_alloc socket_iovec_delete socket_iovec_fetch socket_iovec_free socket_iovec_set socket_last_error socket_listen socket_read socket_readv socket_recv socket_recvfrom socket_recvmsg socket_select socket_send socket_sendmsg socket_sendto socket_set_block socket_set_nonblock socket_set_option socket_shutdown socket_strerror socket_write socket_writev contained +syn keyword phpFunctions sqlite_array_query sqlite_busy_timeout sqlite_changes sqlite_close sqlite_column sqlite_create_aggregate sqlite_create_function sqlite_current sqlite_error_string sqlite_escape_string sqlite_fetch_array sqlite_fetch_single sqlite_fetch_string sqlite_field_name sqlite_has_more sqlite_last_error sqlite_last_insert_rowid sqlite_libencoding sqlite_libversion sqlite_next sqlite_num_fields sqlite_num_rows sqlite_open sqlite_popen sqlite_query sqlite_rewind sqlite_seek sqlite_udf_decode_binary sqlite_udf_encode_binary sqlite_unbuffered_query contained +syn keyword phpFunctions stream_context_create stream_context_get_options stream_context_set_option stream_context_set_params stream_copy_to_stream stream_filter_append stream_filter_prepend stream_filter_register stream_get_contents stream_get_filters stream_get_line stream_get_meta_data stream_get_transports stream_get_wrappers stream_register_wrapper stream_select stream_set_blocking stream_set_timeout stream_set_write_buffer stream_socket_accept stream_socket_client stream_socket_get_name stream_socket_recvfrom stream_socket_sendto stream_socket_server stream_wrapper_register contained +syn keyword phpFunctions addcslashes addslashes bin2hex chop chr chunk_split convert_cyr_string count_chars crc32 crypt explode fprintf get_html_translation_table hebrev hebrevc html_entity_decode htmlentities htmlspecialchars implode join levenshtein localeconv ltrim md5_file md5 metaphone money_format nl_langinfo nl2br number_format ord parse_str print printf quoted_printable_decode quotemeta rtrim setlocale sha1_file sha1 similar_text soundex sprintf sscanf str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split str_word_count strcasecmp strchr strcmp strcoll strcspn strip_tags stripcslashes stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpos strrchr strrev strripos strrpos strspn strstr strtok strtolower strtoupper strtr substr_compare substr_count substr_replace substr trim ucfirst ucwords vprintf vsprintf wordwrap contained +syn keyword phpFunctions swf_actiongeturl swf_actiongotoframe swf_actiongotolabel swf_actionnextframe swf_actionplay swf_actionprevframe swf_actionsettarget swf_actionstop swf_actiontogglequality swf_actionwaitforframe swf_addbuttonrecord swf_addcolor swf_closefile swf_definebitmap swf_definefont swf_defineline swf_definepoly swf_definerect swf_definetext swf_endbutton swf_enddoaction swf_endshape swf_endsymbol swf_fontsize swf_fontslant swf_fonttracking swf_getbitmapinfo swf_getfontinfo swf_getframe swf_labelframe swf_lookat swf_modifyobject swf_mulcolor swf_nextid swf_oncondition swf_openfile swf_ortho2 swf_ortho swf_perspective swf_placeobject swf_polarview swf_popmatrix swf_posround swf_pushmatrix swf_removeobject swf_rotate swf_scale swf_setfont swf_setframe swf_shapearc swf_shapecurveto3 swf_shapecurveto swf_shapefillbitmapclip swf_shapefillbitmaptile swf_shapefilloff swf_shapefillsolid swf_shapelinesolid swf_shapelineto swf_shapemoveto swf_showframe swf_startbutton swf_startdoaction swf_startshape swf_startsymbol swf_textwidth swf_translate swf_viewport contained +syn keyword phpFunctions sybase_affected_rows sybase_close sybase_connect sybase_data_seek sybase_deadlock_retry_count sybase_fetch_array sybase_fetch_assoc sybase_fetch_field sybase_fetch_object sybase_fetch_row sybase_field_seek sybase_free_result sybase_get_last_message sybase_min_client_severity sybase_min_error_severity sybase_min_message_severity sybase_min_server_severity sybase_num_fields sybase_num_rows sybase_pconnect sybase_query sybase_result sybase_select_db sybase_set_message_handler sybase_unbuffered_query contained +syn keyword phpFunctions tidy_access_count tidy_clean_repair tidy_config_count tidy_diagnose tidy_error_count tidy_get_body tidy_get_config tidy_get_error_buffer tidy_get_head tidy_get_html_ver tidy_get_html tidy_get_output tidy_get_release tidy_get_root tidy_get_status tidy_getopt tidy_is_xhtml tidy_load_config tidy_parse_file tidy_parse_string tidy_repair_file tidy_repair_string tidy_reset_config tidy_save_config tidy_set_encoding tidy_setopt tidy_warning_count contained +syn keyword phpMethods attributes children get_attr get_nodes has_children has_siblings is_asp is_comment is_html is_jsp is_jste is_text is_xhtml is_xml next prev tidy_node contained +syn keyword phpFunctions token_get_all token_name contained +syn keyword phpFunctions base64_decode base64_encode get_meta_tags http_build_query parse_url rawurldecode rawurlencode urldecode urlencode contained +syn keyword phpFunctions doubleval empty floatval get_defined_vars get_resource_type gettype import_request_variables intval is_array is_bool is_callable is_double is_float is_int is_integer is_long is_null is_numeric is_object is_real is_resource is_scalar is_string isset print_r serialize settype strval unserialize unset var_dump var_export contained +syn keyword phpFunctions vpopmail_add_alias_domain_ex vpopmail_add_alias_domain vpopmail_add_domain_ex vpopmail_add_domain vpopmail_add_user vpopmail_alias_add vpopmail_alias_del_domain vpopmail_alias_del vpopmail_alias_get_all vpopmail_alias_get vpopmail_auth_user vpopmail_del_domain_ex vpopmail_del_domain vpopmail_del_user vpopmail_error vpopmail_passwd vpopmail_set_user_quota contained +syn keyword phpFunctions w32api_deftype w32api_init_dtype w32api_invoke_function w32api_register_function w32api_set_call_method contained +syn keyword phpFunctions wddx_add_vars wddx_deserialize wddx_packet_end wddx_packet_start wddx_serialize_value wddx_serialize_vars contained +syn keyword phpFunctions utf8_decode utf8_encode xml_error_string xml_get_current_byte_index xml_get_current_column_number xml_get_current_line_number xml_get_error_code xml_parse_into_struct xml_parse xml_parser_create_ns xml_parser_create xml_parser_free xml_parser_get_option xml_parser_set_option xml_set_character_data_handler xml_set_default_handler xml_set_element_handler xml_set_end_namespace_decl_handler xml_set_external_entity_ref_handler xml_set_notation_decl_handler xml_set_object xml_set_processing_instruction_handler xml_set_start_namespace_decl_handler xml_set_unparsed_entity_decl_handler contained +syn keyword phpFunctions xmlrpc_decode_request xmlrpc_decode xmlrpc_encode_request xmlrpc_encode xmlrpc_get_type xmlrpc_parse_method_descriptions xmlrpc_server_add_introspection_data xmlrpc_server_call_method xmlrpc_server_create xmlrpc_server_destroy xmlrpc_server_register_introspection_callback xmlrpc_server_register_method xmlrpc_set_type contained +syn keyword phpFunctions xslt_create xslt_errno xslt_error xslt_free xslt_output_process xslt_set_base xslt_set_encoding xslt_set_error_handler xslt_set_log xslt_set_sax_handler xslt_set_sax_handlers xslt_set_scheme_handler xslt_set_scheme_handlers contained +syn keyword phpFunctions yaz_addinfo yaz_ccl_conf yaz_ccl_parse yaz_close yaz_connect yaz_database yaz_element yaz_errno yaz_error yaz_es_result yaz_get_option yaz_hits yaz_itemorder yaz_present yaz_range yaz_record yaz_scan_result yaz_scan yaz_schema yaz_search yaz_set_option yaz_sort yaz_syntax yaz_wait contained +syn keyword phpFunctions zip_close zip_entry_close zip_entry_compressedsize zip_entry_compressionmethod zip_entry_filesize zip_entry_name zip_entry_open zip_entry_read zip_open zip_read contained +syn keyword phpFunctions gzclose gzcompress gzdeflate gzencode gzeof gzfile gzgetc gzgets gzgetss gzinflate gzopen gzpassthru gzputs gzread gzrewind gzseek gztell gzuncompress gzwrite readgzfile zlib_get_coding_type contained + +if exists( "php_baselib" ) + syn keyword phpMethods query next_record num_rows affected_rows nf f p np num_fields haltmsg seek link_id query_id metadata table_names nextid connect halt free register unregister is_registered delete url purl self_url pself_url hidden_session add_query padd_query reimport_get_vars reimport_post_vars reimport_cookie_vars set_container set_tokenname release_token put_headers get_id get_id put_id freeze thaw gc reimport_any_vars start url purl login_if is_authenticated auth_preauth auth_loginform auth_validatelogin auth_refreshlogin auth_registerform auth_doregister start check have_perm permsum perm_invalid contained + syn keyword phpFunctions page_open page_close sess_load sess_save contained +endif + +" Conditional +syn keyword phpConditional declare else enddeclare endswitch elseif endif if switch contained + +" Repeat +syn keyword phpRepeat as do endfor endforeach endwhile for foreach while contained + +" Repeat +syn keyword phpLabel case default switch contained + +" Statement +syn keyword phpStatement return break continue exit contained + +" Keyword +syn keyword phpKeyword var const contained + +" Type +syn keyword phpType bool[ean] int[eger] real double float string array object NULL contained + +" Structure +syn keyword phpStructure extends implements instanceof parent self contained + +" Operator +syn match phpOperator "[-=+%^&|*!.~?:]" contained display +syn match phpOperator "[-+*/%^&|.]=" contained display +syn match phpOperator "/[^*/]"me=e-1 contained display +syn match phpOperator "\$" contained display +syn match phpOperator "&&\|\" contained display +syn match phpOperator "||\|\" contained display +syn match phpRelation "[!=<>]=" contained display +syn match phpRelation "[<>]" contained display +syn match phpMemberSelector "->" contained display +syn match phpVarSelector "\$" contained display + +" Identifier +syn match phpIdentifier "$\h\w*" contained contains=phpEnvVar,phpIntVar,phpVarSelector display +syn match phpIdentifierSimply "${\h\w*}" contains=phpOperator,phpParent contained display +syn region phpIdentifierComplex matchgroup=phpParent start="{\$"rs=e-1 end="}" contains=phpIdentifier,phpMemberSelector,phpVarSelector,phpIdentifierComplexP contained extend +syn region phpIdentifierComplexP matchgroup=phpParent start="\[" end="]" contains=@phpClInside contained + +" Methoden +syn match phpMethodsVar "->\h\w*" contained contains=phpMethods,phpMemberSelector display + +" Include +syn keyword phpInclude include require include_once require_once contained + +" Peter Hodge - added 'clone' keyword +" Define +syn keyword phpDefine new clone contained + +" Boolean +syn keyword phpBoolean true false contained + +" Number +syn match phpNumber "-\=\<\d\+\>" contained display +syn match phpNumber "\<0x\x\{1,8}\>" contained display + +" Float +syn match phpFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" contained display + +" SpecialChar +syn match phpSpecialChar "\\[abcfnrtyv\\]" contained display +syn match phpSpecialChar "\\\d\{3}" contained contains=phpOctalError display +syn match phpSpecialChar "\\x\x\{2}" contained display + +" Error +syn match phpOctalError "[89]" contained display +if exists("php_parent_error_close") + syn match phpParentError "[)\]}]" contained display +endif + +" Todo +syn keyword phpTodo todo fixme xxx contained + +" Comment +if exists("php_parent_error_open") + syn region phpComment start="/\*" end="\*/" contained contains=phpTodo +else + syn region phpComment start="/\*" end="\*/" contained contains=phpTodo extend +endif +if version >= 600 + syn match phpComment "#.\{-}\(?>\|$\)\@=" contained contains=phpTodo + syn match phpComment "//.\{-}\(?>\|$\)\@=" contained contains=phpTodo +else + syn match phpComment "#.\{-}$" contained contains=phpTodo + syn match phpComment "#.\{-}?>"me=e-2 contained contains=phpTodo + syn match phpComment "//.\{-}$" contained contains=phpTodo + syn match phpComment "//.\{-}?>"me=e-2 contained contains=phpTodo +endif + +" String +if exists("php_parent_error_open") + syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained keepend + syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained keepend + syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings contained keepend +else + syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained extend keepend + syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained extend keepend + syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings contained keepend extend +endif + +" HereDoc +if version >= 600 + syn case match + syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend +" including HTML,JavaScript,SQL even if not enabled via options + syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend + syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend + syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend + syn case ignore +endif + +" Parent +if exists("php_parent_error_close") || exists("php_parent_error_open") + syn match phpParent "[{}]" contained + syn region phpParent matchgroup=Delimiter start="(" end=")" contained contains=@phpClInside transparent + syn region phpParent matchgroup=Delimiter start="\[" end="\]" contained contains=@phpClInside transparent + if !exists("php_parent_error_close") + syn match phpParent "[\])]" contained + endif +else + syn match phpParent "[({[\]})]" contained +endif + +syn cluster phpClConst contains=phpFunctions,phpIdentifier,phpConditional,phpRepeat,phpStatement,phpOperator,phpRelation,phpStringSingle,phpStringDouble,phpBacktick,phpNumber,phpFloat,phpKeyword,phpType,phpBoolean,phpStructure,phpMethodsVar,phpConstant,phpCoreConstant,phpException +syn cluster phpClInside contains=@phpClConst,phpComment,phpLabel,phpParent,phpParentError,phpInclude,phpHereDoc +syn cluster phpClFunction contains=@phpClInside,phpDefine,phpParentError,phpStorageClass +syn cluster phpClTop contains=@phpClFunction,phpFoldFunction,phpFoldClass,phpFoldInterface,phpFoldTry,phpFoldCatch + +" Php Region +if exists("php_parent_error_open") + if exists("php_noShortTags") + syn region phpRegion matchgroup=Delimiter start="" contains=@phpClTop + else + syn region phpRegion matchgroup=Delimiter start="" contains=@phpClTop + endif + syn region phpRegionSc matchgroup=Delimiter start=++ contains=@phpClTop + if exists("php_asp_tags") + syn region phpRegionAsp matchgroup=Delimiter start="<%\(=\)\=" end="%>" contains=@phpClTop + endif +else + if exists("php_noShortTags") + syn region phpRegion matchgroup=Delimiter start="" contains=@phpClTop keepend + else + syn region phpRegion matchgroup=Delimiter start="" contains=@phpClTop keepend + endif + syn region phpRegionSc matchgroup=Delimiter start=++ contains=@phpClTop keepend + if exists("php_asp_tags") + syn region phpRegionAsp matchgroup=Delimiter start="<%\(=\)\=" end="%>" contains=@phpClTop keepend + endif +endif + +" Fold +if exists("php_folding") && php_folding==1 +" match one line constructs here and skip them at folding + syn keyword phpSCKeyword abstract final private protected public static contained + syn keyword phpFCKeyword function contained + syn keyword phpStorageClass global contained + syn match phpDefine "\(\s\|^\)\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function\(\s\+.*[;}]\)\@=" contained contains=phpSCKeyword + syn match phpStructure "\(\s\|^\)\(abstract\s\+\|final\s\+\)*class\(\s\+.*}\)\@=" contained + syn match phpStructure "\(\s\|^\)interface\(\s\+.*}\)\@=" contained + syn match phpException "\(\s\|^\)try\(\s\+.*}\)\@=" contained + syn match phpException "\(\s\|^\)catch\(\s\+.*}\)\@=" contained + + set foldmethod=syntax + syn region phpFoldHtmlInside matchgroup=Delimiter start="?>" end="" end="\h\w*" contained contains=phpMethods,phpMemberSelector display containedin=phpStringDouble + +" highlight constant E_STRICT +syntax case match +syntax keyword phpCoreConstant E_STRICT contained +syntax case ignore + +" different syntax highlighting for 'echo', 'print', 'switch', 'die' and 'list' keywords +" to better indicate what they are. +syntax keyword phpDefine echo print contained +syntax keyword phpStructure list contained +syntax keyword phpConditional switch contained +syntax keyword phpStatement die contained + +" Highlighting for PHP5's user-definable magic class methods +syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier + \ __construct __destruct __call __toString __sleep __wakeup __set __get __unset __isset __clone __set_state +" Highlighting for __autoload slightly different from line above +syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar + \ __autoload +highlight link phpSpecialFunction phpOperator + +" Highlighting for PHP5's built-in classes +" - built-in classes harvested from get_declared_classes() in 5.1.4 +syntax keyword phpClasses containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar + \ stdClass __PHP_Incomplete_Class php_user_filter Directory ArrayObject + \ Exception ErrorException LogicException BadFunctionCallException BadMethodCallException DomainException + \ RecursiveIteratorIterator IteratorIterator FilterIterator RecursiveFilterIterator ParentIterator LimitIterator + \ CachingIterator RecursiveCachingIterator NoRewindIterator AppendIterator InfiniteIterator EmptyIterator + \ ArrayIterator RecursiveArrayIterator DirectoryIterator RecursiveDirectoryIterator + \ InvalidArgumentException LengthException OutOfRangeException RuntimeException OutOfBoundsException + \ OverflowException RangeException UnderflowException UnexpectedValueException + \ PDO PDOException PDOStatement PDORow + \ Reflection ReflectionFunction ReflectionParameter ReflectionMethod ReflectionClass + \ ReflectionObject ReflectionProperty ReflectionExtension ReflectionException + \ SplFileInfo SplFileObject SplTempFileObject SplObjectStorage + \ XMLWriter LibXMLError XMLReader SimpleXMLElement SimpleXMLIterator + \ DOMException DOMStringList DOMNameList DOMDomError DOMErrorHandler + \ DOMImplementation DOMImplementationList DOMImplementationSource + \ DOMNode DOMNameSpaceNode DOMDocumentFragment DOMDocument DOMNodeList DOMNamedNodeMap + \ DOMCharacterData DOMAttr DOMElement DOMText DOMComment DOMTypeinfo DOMUserDataHandler + \ DOMLocator DOMConfiguration DOMCdataSection DOMDocumentType DOMNotation DOMEntity + \ DOMEntityReference DOMProcessingInstruction DOMStringExtend DOMXPath +highlight link phpClasses phpFunctions + +" Highlighting for PHP5's built-in interfaces +" - built-in classes harvested from get_declared_interfaces() in 5.1.4 +syntax keyword phpInterfaces containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar + \ Iterator IteratorAggregate RecursiveIterator OuterIterator SeekableIterator + \ Traversable ArrayAccess Serializable Countable SplObserver SplSubject Reflector +highlight link phpInterfaces phpConstant + +" option defaults: +if ! exists('php_special_functions') + let php_special_functions = 1 +endif +if ! exists('php_alt_comparisons') + let php_alt_comparisons = 1 +endif +if ! exists('php_alt_assignByReference') + let php_alt_assignByReference = 1 +endif + +if php_special_functions + " Highlighting for PHP built-in functions which exhibit special behaviours + " - isset()/unset()/empty() are not real functions. + " - compact()/extract() directly manipulate variables in the local scope where + " regular functions would not be able to. + " - eval() is the token 'make_your_code_twice_as_complex()' function for PHP. + " - user_error()/trigger_error() can be overloaded by set_error_handler and also + " have the capacity to terminate your script when type is E_USER_ERROR. + syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle + \ user_error trigger_error isset unset eval extract compact empty +endif + +if php_alt_assignByReference + " special highlighting for '=&' operator + syntax match phpAssignByRef /=\s*&/ containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle + highlight link phpAssignByRef Type +endif + +if php_alt_comparisons + " highlight comparison operators differently + syntax match phpComparison "\v[=!]\=\=?" contained containedin=phpRegion + syntax match phpComparison "\v[=<>-]@]\=?[<>]@!" contained containedin=phpRegion + + " highlight the 'instanceof' operator as a comparison operator rather than a structure + syntax case ignore + syntax keyword phpComparison instanceof contained containedin=phpRegion + + hi link phpComparison Statement +endif + +" ================================================================ + +" Sync +if php_sync_method==-1 + if exists("php_noShortTags") + syn sync match phpRegionSync grouphere phpRegion "^\s*\s*$+ + if exists("php_asp_tags") + syn sync match phpRegionSync grouphere phpRegionAsp "^\s*<%\(=\)\=\s*$" + endif + syn sync match phpRegionSync grouphere NONE "^\s*?>\s*$" + syn sync match phpRegionSync grouphere NONE "^\s*%>\s*$" + syn sync match phpRegionSync grouphere phpRegion "function\s.*(.*\$" + "syn sync match phpRegionSync grouphere NONE "/\i*>\s*$" +elseif php_sync_method>0 + exec "syn sync minlines=" . php_sync_method +else + exec "syn sync fromstart" +endif + +" 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_php_syn_inits") + if version < 508 + let did_php_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink phpConstant Constant + HiLink phpCoreConstant Constant + HiLink phpComment Comment + HiLink phpException Exception + HiLink phpBoolean Boolean + HiLink phpStorageClass StorageClass + HiLink phpSCKeyword StorageClass + HiLink phpFCKeyword Define + HiLink phpStructure Structure + HiLink phpStringSingle String + HiLink phpStringDouble String + HiLink phpBacktick String + HiLink phpNumber Number + HiLink phpFloat Float + HiLink phpMethods Function + HiLink phpFunctions Function + HiLink phpBaselib Function + HiLink phpRepeat Repeat + HiLink phpConditional Conditional + HiLink phpLabel Label + HiLink phpStatement Statement + HiLink phpKeyword Statement + HiLink phpType Type + HiLink phpInclude Include + HiLink phpDefine Define + HiLink phpSpecialChar SpecialChar + HiLink phpParent Delimiter + HiLink phpIdentifierConst Delimiter + HiLink phpParentError Error + HiLink phpOctalError Error + HiLink phpTodo Todo + HiLink phpMemberSelector Structure + if exists("php_oldStyle") + hi phpIntVar guifg=Red ctermfg=DarkRed + hi phpEnvVar guifg=Red ctermfg=DarkRed + hi phpOperator guifg=SeaGreen ctermfg=DarkGreen + hi phpVarSelector guifg=SeaGreen ctermfg=DarkGreen + hi phpRelation guifg=SeaGreen ctermfg=DarkGreen + hi phpIdentifier guifg=DarkGray ctermfg=Brown + hi phpIdentifierSimply guifg=DarkGray ctermfg=Brown + else + HiLink phpIntVar Identifier + HiLink phpEnvVar Identifier + HiLink phpOperator Operator + HiLink phpVarSelector Operator + HiLink phpRelation Operator + HiLink phpIdentifier Identifier + HiLink phpIdentifierSimply Identifier + endif + + delcommand HiLink +endif + +let b:current_syntax = "php" + +if main_syntax == 'php' + unlet main_syntax +endif + +" vim: ts=8 sts=2 sw=2 expandtab diff --git a/vim/bundle/ubuntu-vim72/syntax/phtml.vim b/vim/bundle/ubuntu-vim72/syntax/phtml.vim new file mode 100644 index 0000000..646129a --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/phtml.vim @@ -0,0 +1,6 @@ +" Vim syntax file +" PHTML used to be the filetype for PHP 2.0. Now everything is PHP. + +if !exists("b:current_syntax") + runtime! syntax/php.vim +endif diff --git a/vim/bundle/ubuntu-vim72/syntax/pic.vim b/vim/bundle/ubuntu-vim72/syntax/pic.vim new file mode 100644 index 0000000..adc964e --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/pic.vim @@ -0,0 +1,127 @@ +" Vim syntax file +" Language: PIC16F84 Assembler (Microchip's microcontroller) +" Maintainer: Aleksandar Veselinovic +" Last Change: 2003 May 11 +" URL: http://galeb.etf.bg.ac.yu/~alexa/vim/syntax/pic.vim +" Revision: 1.01 + +" 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 match +syn keyword picTodo NOTE TODO XXX contained + +syn case ignore + +syn match picIdentifier "[a-z_$][a-z0-9_$]*" +syn match picLabel "^[A-Z_$][A-Z0-9_$]*" +syn match picLabel "^[A-Z_$][A-Z0-9_$]*:"me=e-1 + +syn match picASCII "A\='.'" +syn match picBinary "B'[0-1]\+'" +syn match picDecimal "D'\d\+'" +syn match picDecimal "\d\+" +syn match picHexadecimal "0x\x\+" +syn match picHexadecimal "H'\x\+'" +syn match picHexadecimal "[0-9]\x*h" +syn match picOctal "O'[0-7]\o*'" + + +syn match picComment ";.*" contains=picTodo + +syn region picString start=+"+ end=+"+ + +syn keyword picRegister INDF TMR0 PCL STATUS FSR PORTA PORTB +syn keyword picRegister EEDATA EEADR PCLATH INTCON INDF OPTION_REG PCL +syn keyword picRegister FSR TRISA TRISB EECON1 EECON2 INTCON OPTION + + +" Register --- bits + +" STATUS +syn keyword picRegisterPart IRP RP1 RP0 TO PD Z DC C + +" PORTA +syn keyword picRegisterPart T0CKI +syn match picRegisterPart "RA[0-4]" + +" PORTB +syn keyword picRegisterPart INT +syn match picRegisterPart "RB[0-7]" + +" INTCON +syn keyword picRegisterPart GIE EEIE T0IE INTE RBIE T0IF INTF RBIF + +" OPTION +syn keyword picRegisterPart RBPU INTEDG T0CS T0SE PSA PS2 PS1 PS0 + +" EECON2 +syn keyword picRegisterPart EEIF WRERR WREN WR RD + +" INTCON +syn keyword picRegisterPart GIE EEIE T0IE INTE RBIE T0IF INTF RBIF + + +" OpCodes... +syn keyword picOpcode ADDWF ANDWF CLRF CLRW COMF DECF DECFSZ INCF INCFSZ +syn keyword picOpcode IORWF MOVF MOVWF NOP RLF RRF SUBWF SWAPF XORWF +syn keyword picOpcode BCF BSF BTFSC BTFSS +syn keyword picOpcode ADDLW ANDLW CALL CLRWDT GOTO IORLW MOVLW RETFIE +syn keyword picOpcode RETLW RETURN SLEEP SUBLW XORLW +syn keyword picOpcode GOTO + + +" Directives +syn keyword picDirective __BADRAM BANKISEL BANKSEL CBLOCK CODE __CONFIG +syn keyword picDirective CONSTANT DATA DB DE DT DW ELSE END ENDC +syn keyword picDirective ENDIF ENDM ENDW EQU ERROR ERRORLEVEL EXITM EXPAND +syn keyword picDirective EXTERN FILL GLOBAL IDATA __IDLOCS IF IFDEF IFNDEF +syn keyword picDirective INCLUDE LIST LOCAL MACRO __MAXRAM MESSG NOEXPAND +syn keyword picDirective NOLIST ORG PAGE PAGESEL PROCESSOR RADIX RES SET +syn keyword picDirective SPACE SUBTITLE TITLE UDATA UDATA_OVR UDATA_SHR +syn keyword picDirective VARIABLE WHILE INCLUDE +syn match picDirective "#\=UNDEFINE" +syn match picDirective "#\=INCLUDE" +syn match picDirective "#\=DEFINE" + + +" 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_pic16f84_syntax_inits") + if version < 508 + let did_pic16f84_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink picTodo Todo + HiLink picComment Comment + HiLink picDirective Statement + HiLink picLabel Label + HiLink picString String + + "HiLink picOpcode Keyword + "HiLink picRegister Structure + "HiLink picRegisterPart Special + + HiLink picASCII String + HiLink picBinary Number + HiLink picDecimal Number + HiLink picHexadecimal Number + HiLink picOctal Number + + HiLink picIdentifier Identifier + + delcommand HiLink +endif + +let b:current_syntax = "pic" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/pike.vim b/vim/bundle/ubuntu-vim72/syntax/pike.vim new file mode 100644 index 0000000..efbafd5 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/pike.vim @@ -0,0 +1,155 @@ +" Vim syntax file +" Language: Pike +" Maintainer: Francesco Chemolli +" Last Change: 2001 May 10 + +" 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 C keywords +syn keyword pikeStatement goto break return continue +syn keyword pikeLabel case default +syn keyword pikeConditional if else switch +syn keyword pikeRepeat while for foreach do +syn keyword pikeStatement gauge destruct lambda inherit import typeof +syn keyword pikeException catch +syn keyword pikeType inline nomask private protected public static + + +syn keyword pikeTodo contained TODO FIXME XXX + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match pikeSpecial contained "\\[0-7][0-7][0-7]\=\|\\." +syn region pikeString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=pikeSpecial +syn match pikeCharacter "'[^\\]'" +syn match pikeSpecialCharacter "'\\.'" +syn match pikeSpecialCharacter "'\\[0-7][0-7]'" +syn match pikeSpecialCharacter "'\\[0-7][0-7][0-7]'" + +" Compound data types +syn region pikeCompoundType start='({' contains=pikeString,pikeCompoundType,pikeNumber,pikeFloat end='})' +syn region pikeCompoundType start='(\[' contains=pikeString,pikeCompoundType,pikeNumber,pikeFloat end='\])' +syn region pikeCompoundType start='(<' contains=pikeString,pikeCompoundType,pikeNumber,pikeFloat end='>)' + +"catch errors caused by wrong parenthesis +syn region pikeParen transparent start='([^{[<(]' end=')' contains=ALLBUT,pikeParenError,pikeIncluded,pikeSpecial,pikeTodo,pikeUserLabel,pikeBitField +syn match pikeParenError ")" +syn match pikeInParen contained "[^(][{}][^)]" + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match pikeNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" +"floating point number, with dot, optional exponent +syn match pikeFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, starting with a dot, optional exponent +syn match pikeFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match pikeFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" +"hex number +syn match pikeNumber "\<0x[0-9a-f]\+\(u\=l\=\|lu\)\>" +"syn match pikeIdentifier "\<[a-z_][a-z0-9_]*\>" +syn case match +" flag an octal number with wrong digits +syn match pikeOctalError "\<0[0-7]*[89]" + +if exists("c_comment_strings") + " A comment can contain pikeString, pikeCharacter and pikeNumber. + " But a "*/" inside a pikeString in a pikeComment DOES end the comment! So we + " need to use a special type of pikeString: pikeCommentString, which also ends on + " "*/", and sees a "*" at the start of the line as comment again. + " Unfortunately this doesn't very well work for // type of comments :-( + syntax match pikeCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region pikeCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=pikeSpecial,pikeCommentSkip + syntax region pikeComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=pikeSpecial + syntax region pikeComment start="/\*" end="\*/" contains=pikeTodo,pikeCommentString,pikeCharacter,pikeNumber,pikeFloat + syntax match pikeComment "//.*" contains=pikeTodo,pikeComment2String,pikeCharacter,pikeNumber + syntax match pikeComment "#\!.*" contains=pikeTodo,pikeComment2String,pikeCharacter,pikeNumber +else + syn region pikeComment start="/\*" end="\*/" contains=pikeTodo + syn match pikeComment "//.*" contains=pikeTodo + syn match pikeComment "#!.*" contains=pikeTodo +endif +syntax match pikeCommentError "\*/" + +syn keyword pikeOperator sizeof +syn keyword pikeType int string void float mapping array multiset mixed +syn keyword pikeType program object function + +syn region pikePreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=pikeComment,pikeString,pikeCharacter,pikeNumber,pikeCommentError +syn region pikeIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match pikeIncluded contained "<[^>]*>" +syn match pikeInclude "^\s*#\s*include\>\s*["<]" contains=pikeIncluded +"syn match pikeLineSkip "\\$" +syn region pikeDefine start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,pikePreCondit,pikeIncluded,pikeInclude,pikeDefine,pikeInParen +syn region pikePreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,pikePreCondit,pikeIncluded,pikeInclude,pikeDefine,pikeInParen + +" Highlight User Labels +syn region pikeMulti transparent start='?' end=':' contains=ALLBUT,pikeIncluded,pikeSpecial,pikeTodo,pikeUserLabel,pikeBitField +" Avoid matching foo::bar() in C++ by requiring that the next char is not ':' +syn match pikeUserLabel "^\s*\I\i*\s*:$" +syn match pikeUserLabel ";\s*\I\i*\s*:$"ms=s+1 +syn match pikeUserLabel "^\s*\I\i*\s*:[^:]"me=e-1 +syn match pikeUserLabel ";\s*\I\i*\s*:[^:]"ms=s+1,me=e-1 + +" Avoid recognizing most bitfields as labels +syn match pikeBitField "^\s*\I\i*\s*:\s*[1-9]"me=e-1 +syn match pikeBitField ";\s*\I\i*\s*:\s*[1-9]"me=e-1 + +syn sync ccomment pikeComment minlines=10 + +" 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_pike_syntax_inits") + if version < 508 + let did_pike_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink pikeLabel Label + HiLink pikeUserLabel Label + HiLink pikeConditional Conditional + HiLink pikeRepeat Repeat + HiLink pikeCharacter Character + HiLink pikeSpecialCharacter pikeSpecial + HiLink pikeNumber Number + HiLink pikeFloat Float + HiLink pikeOctalError pikeError + HiLink pikeParenError pikeError + HiLink pikeInParen pikeError + HiLink pikeCommentError pikeError + HiLink pikeOperator Operator + HiLink pikeInclude Include + HiLink pikePreProc PreProc + HiLink pikeDefine Macro + HiLink pikeIncluded pikeString + HiLink pikeError Error + HiLink pikeStatement Statement + HiLink pikePreCondit PreCondit + HiLink pikeType Type + HiLink pikeCommentError pikeError + HiLink pikeCommentString pikeString + HiLink pikeComment2String pikeString + HiLink pikeCommentSkip pikeComment + HiLink pikeString String + HiLink pikeComment Comment + HiLink pikeSpecial SpecialChar + HiLink pikeTodo Todo + HiLink pikeException pikeStatement + HiLink pikeCompoundType Constant + "HiLink pikeIdentifier Identifier + + delcommand HiLink +endif + +let b:current_syntax = "pike" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/pilrc.vim b/vim/bundle/ubuntu-vim72/syntax/pilrc.vim new file mode 100644 index 0000000..86d5611 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/pilrc.vim @@ -0,0 +1,148 @@ +" Vim syntax file +" Language: pilrc - a resource compiler for Palm OS development +" Maintainer: Brian Schau +" Last change: 2003 May 11 +" Available on: http://www.schau.com/pilrcvim/pilrc.vim + +" Remove any old syntax +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" Notes: TRANSPARENT, FONT and FONT ID are defined in the specials +" section below. Beware of the order of the specials! +" Look in the syntax.txt and usr_27.txt files in vim\vim{version}\doc +" directory for regexps etc. + +" Keywords - basic +syn keyword pilrcKeyword ALERT APPLICATION APPLICATIONICONNAME AREA +syn keyword pilrcKeyword BITMAP BITMAPCOLOR BITMAPCOLOR16 BITMAPCOLOR16K +syn keyword pilrcKeyword BITMAPFAMILY BITMAPFAMILYEX BITMAPFAMILYSPECIAL +syn keyword pilrcKeyword BITMAPGREY BITMAPGREY16 BITMAPSCREENFAMILY +syn keyword pilrcKeyword BOOTSCREENFAMILY BUTTON BUTTONS BYTELIST +syn keyword pilrcKeyword CATEGORIES CHECKBOX COUNTRYLOCALISATION +syn keyword pilrcKeyword DATA +syn keyword pilrcKeyword FEATURE FIELD FONTINDEX FORM FORMBITMAP +syn keyword pilrcKeyword GADGET GENERATEHEADER +syn keyword pilrcKeyword GRAFFITIINPUTAREA GRAFFITISTATEINDICATOR +syn keyword pilrcKeyword HEX +syn keyword pilrcKeyword ICON ICONFAMILY ICONFAMILYEX INTEGER +syn keyword pilrcKeyword KEYBOARD +syn keyword pilrcKeyword LABEL LAUNCHERCATEGORY LIST LONGWORDLIST +syn keyword pilrcKeyword MENU MENUITEM MESSAGE MIDI +syn keyword pilrcKeyword PALETTETABLE POPUPLIST POPUPTRIGGER +syn keyword pilrcKeyword PULLDOWN PUSHBUTTON +syn keyword pilrcKeyword REPEATBUTTON RESETAUTOID +syn keyword pilrcKeyword SCROLLBAR SELECTORTRIGGER SLIDER SMALLICON +syn keyword pilrcKeyword SMALLICONFAMILY SMALLICONFAMILYEX STRING STRINGTABLE +syn keyword pilrcKeyword TABLE TITLE TRANSLATION TRAP +syn keyword pilrcKeyword VERSION +syn keyword pilrcKeyword WORDLIST + +" Types +syn keyword pilrcType AT AUTOSHIFT +syn keyword pilrcType BACKGROUNDID BITMAPID BOLDFRAME BPP +syn keyword pilrcType CHECKED COLORTABLE COLUMNS COLUMNWIDTHS COMPRESS +syn keyword pilrcType COMPRESSBEST COMPRESSPACKBITS COMPRESSRLE COMPRESSSCANLINE +syn keyword pilrcType CONFIRMATION COUNTRY CREATOR CURRENCYDECIMALPLACES +syn keyword pilrcType CURRENCYNAME CURRENCYSYMBOL CURRENCYUNIQUESYMBOL +syn keyword pilrcType DATEFORMAT DAYLIGHTSAVINGS DEFAULTBTNID DEFAULTBUTTON +syn keyword pilrcType DENSITY DISABLED DYNAMICSIZE +syn keyword pilrcType EDITABLE ENTRY ERROR EXTENDED +syn keyword pilrcType FEEDBACK FILE FONTID FORCECOMPRESS FRAME +syn keyword pilrcType GRAFFITI GRAPHICAL GROUP +syn keyword pilrcType HASSCROLLBAR HELPID +syn keyword pilrcType ID INDEX INFORMATION +syn keyword pilrcType KEYDOWNCHR KEYDOWNKEYCODE KEYDOWNMODIFIERS +syn keyword pilrcType LANGUAGE LEFTALIGN LEFTANCHOR LONGDATEFORMAT +syn keyword pilrcType MAX MAXCHARS MEASUREMENTSYSTEM MENUID MIN LOCALE +syn keyword pilrcType MINUTESWESTOFGMT MODAL MULTIPLELINES +syn keyword pilrcType NAME NOCOLORTABLE NOCOMPRESS NOFRAME NONEDITABLE +syn keyword pilrcType NONEXTENDED NONUSABLE NOSAVEBEHIND NUMBER NUMBERFORMAT +syn keyword pilrcType NUMERIC +syn keyword pilrcType PAGESIZE +syn keyword pilrcType RECTFRAME RIGHTALIGN RIGHTANCHOR ROWS +syn keyword pilrcType SAVEBEHIND SEARCH SCREEN SELECTEDBITMAPID SINGLELINE +syn keyword pilrcType THUMBID TRANSPARENTINDEX TIMEFORMAT +syn keyword pilrcType UNDERLINED USABLE +syn keyword pilrcType VALUE VERTICAL VISIBLEITEMS +syn keyword pilrcType WARNING WEEKSTARTDAY + +" Country +syn keyword pilrcCountry Australia Austria Belgium Brazil Canada Denmark +syn keyword pilrcCountry Finland France Germany HongKong Iceland Indian +syn keyword pilrcCountry Indonesia Ireland Italy Japan Korea Luxembourg Malaysia +syn keyword pilrcCountry Mexico Netherlands NewZealand Norway Philippines +syn keyword pilrcCountry RepChina Singapore Spain Sweden Switzerland Thailand +syn keyword pilrcCountry Taiwan UnitedKingdom UnitedStates + +" Language +syn keyword pilrcLanguage English French German Italian Japanese Spanish + +" String +syn match pilrcString "\"[^"]*\"" + +" Number +syn match pilrcNumber "\<0x\x\+\>" +syn match pilrcNumber "\<\d\+\>" + +" Comment +syn region pilrcComment start="/\*" end="\*/" +syn region pilrcComment start="//" end="$" + +" Constants +syn keyword pilrcConstant AUTO AUTOID BOTTOM CENTER PREVBOTTOM PREVHEIGHT +syn keyword pilrcConstant PREVLEFT PREVRIGHT PREVTOP PREVWIDTH RIGHT +syn keyword pilrcConstant SEPARATOR + +" Identifier +syn match pilrcIdentifier "\<\h\w*\>" + +" Specials +syn match pilrcType "\" +syn match pilrcKeyword "\\s*\" +syn match pilrcType "\" + +" Function +syn keyword pilrcFunction BEGIN END + +" Include +syn match pilrcInclude "\#include" +syn match pilrcInclude "\#define" +syn keyword pilrcInclude equ +syn keyword pilrcInclude package +syn region pilrcInclude start="public class" end="}" + +syn sync ccomment pilrcComment + +if version >= 508 || !exists("did_pilrc_syntax_inits") + if version < 508 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + let did_pilrc_syntax_inits = 1 + + " The default methods for highlighting + HiLink pilrcKeyword Statement + HiLink pilrcType Type + HiLink pilrcError Error + HiLink pilrcCountry SpecialChar + HiLink pilrcLanguage SpecialChar + HiLink pilrcString SpecialChar + HiLink pilrcNumber Number + HiLink pilrcComment Comment + HiLink pilrcConstant Constant + HiLink pilrcFunction Function + HiLink pilrcInclude SpecialChar + HiLink pilrcIdentifier Number + + delcommand HiLink +endif + +let b:current_syntax = "pilrc" diff --git a/vim/bundle/ubuntu-vim72/syntax/pine.vim b/vim/bundle/ubuntu-vim72/syntax/pine.vim new file mode 100644 index 0000000..749535e --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/pine.vim @@ -0,0 +1,372 @@ +" Vim syntax file +" Language: Pine (email program) run commands +" Maintainer: David Pascoe +" Last Change: Thu Feb 27 10:18:48 WST 2003, update for pine 4.53 + +" 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 + +if version >= 600 + setlocal iskeyword=@,48-57,_,128-167,224-235,-, +else + set iskeyword=@,48-57,_,128-167,224-235,-, +endif + +syn keyword pineConfig addrbook-sort-rule +syn keyword pineConfig address-book +syn keyword pineConfig addressbook-formats +syn keyword pineConfig alt-addresses +syn keyword pineConfig bugs-additional-data +syn keyword pineConfig bugs-address +syn keyword pineConfig bugs-fullname +syn keyword pineConfig character-set +syn keyword pineConfig color-style +syn keyword pineConfig compose-mime +syn keyword pineConfig composer-wrap-column +syn keyword pineConfig current-indexline-style +syn keyword pineConfig cursor-style +syn keyword pineConfig customized-hdrs +syn keyword pineConfig debug-memory +syn keyword pineConfig default-composer-hdrs +syn keyword pineConfig default-fcc +syn keyword pineConfig default-saved-msg-folder +syn keyword pineConfig disable-these-authenticators +syn keyword pineConfig disable-these-drivers +syn keyword pineConfig display-filters +syn keyword pineConfig download-command +syn keyword pineConfig download-command-prefix +syn keyword pineConfig editor +syn keyword pineConfig elm-style-save +syn keyword pineConfig empty-header-message +syn keyword pineConfig fcc-name-rule +syn keyword pineConfig feature-level +syn keyword pineConfig feature-list +syn keyword pineConfig file-directory +syn keyword pineConfig folder-collections +syn keyword pineConfig folder-extension +syn keyword pineConfig folder-sort-rule +syn keyword pineConfig font-char-set +syn keyword pineConfig font-name +syn keyword pineConfig font-size +syn keyword pineConfig font-style +syn keyword pineConfig forced-abook-entry +syn keyword pineConfig form-letter-folder +syn keyword pineConfig global-address-book +syn keyword pineConfig goto-default-rule +syn keyword pineConfig header-in-reply +syn keyword pineConfig image-viewer +syn keyword pineConfig inbox-path +syn keyword pineConfig incoming-archive-folders +syn keyword pineConfig incoming-folders +syn keyword pineConfig incoming-startup-rule +syn keyword pineConfig index-answered-background-color +syn keyword pineConfig index-answered-foreground-color +syn keyword pineConfig index-deleted-background-color +syn keyword pineConfig index-deleted-foreground-color +syn keyword pineConfig index-format +syn keyword pineConfig index-important-background-color +syn keyword pineConfig index-important-foreground-color +syn keyword pineConfig index-new-background-color +syn keyword pineConfig index-new-foreground-color +syn keyword pineConfig index-recent-background-color +syn keyword pineConfig index-recent-foreground-color +syn keyword pineConfig index-to-me-background-color +syn keyword pineConfig index-to-me-foreground-color +syn keyword pineConfig index-unseen-background-color +syn keyword pineConfig index-unseen-foreground-color +syn keyword pineConfig initial-keystroke-list +syn keyword pineConfig kblock-passwd-count +syn keyword pineConfig keylabel-background-color +syn keyword pineConfig keylabel-foreground-color +syn keyword pineConfig keyname-background-color +syn keyword pineConfig keyname-foreground-color +syn keyword pineConfig last-time-prune-questioned +syn keyword pineConfig last-version-used +syn keyword pineConfig ldap-servers +syn keyword pineConfig literal-signature +syn keyword pineConfig local-address +syn keyword pineConfig local-fullname +syn keyword pineConfig mail-check-interval +syn keyword pineConfig mail-directory +syn keyword pineConfig mailcap-search-path +syn keyword pineConfig mimetype-search-path +syn keyword pineConfig new-version-threshold +syn keyword pineConfig news-active-file-path +syn keyword pineConfig news-collections +syn keyword pineConfig news-spool-directory +syn keyword pineConfig newsrc-path +syn keyword pineConfig nntp-server +syn keyword pineConfig normal-background-color +syn keyword pineConfig normal-foreground-color +syn keyword pineConfig old-style-reply +syn keyword pineConfig operating-dir +syn keyword pineConfig patterns +syn keyword pineConfig patterns-filters +syn keyword pineConfig patterns-filters2 +syn keyword pineConfig patterns-indexcolors +syn keyword pineConfig patterns-other +syn keyword pineConfig patterns-roles +syn keyword pineConfig patterns-scores +syn keyword pineConfig patterns-scores2 +syn keyword pineConfig personal-name +syn keyword pineConfig personal-print-category +syn keyword pineConfig personal-print-command +syn keyword pineConfig postponed-folder +syn keyword pineConfig print-font-char-set +syn keyword pineConfig print-font-name +syn keyword pineConfig print-font-size +syn keyword pineConfig print-font-style +syn keyword pineConfig printer +syn keyword pineConfig prompt-background-color +syn keyword pineConfig prompt-foreground-color +syn keyword pineConfig pruned-folders +syn keyword pineConfig pruning-rule +syn keyword pineConfig quote1-background-color +syn keyword pineConfig quote1-foreground-color +syn keyword pineConfig quote2-background-color +syn keyword pineConfig quote2-foreground-color +syn keyword pineConfig quote3-background-color +syn keyword pineConfig quote3-foreground-color +syn keyword pineConfig read-message-folder +syn keyword pineConfig remote-abook-history +syn keyword pineConfig remote-abook-metafile +syn keyword pineConfig remote-abook-validity +syn keyword pineConfig reply-indent-string +syn keyword pineConfig reply-leadin +syn keyword pineConfig reverse-background-color +syn keyword pineConfig reverse-foreground-color +syn keyword pineConfig rsh-command +syn keyword pineConfig rsh-open-timeout +syn keyword pineConfig rsh-path +syn keyword pineConfig save-by-sender +syn keyword pineConfig saved-msg-name-rule +syn keyword pineConfig scroll-margin +syn keyword pineConfig selectable-item-background-color +syn keyword pineConfig selectable-item-foreground-color +syn keyword pineConfig sending-filters +syn keyword pineConfig sendmail-path +syn keyword pineConfig show-all-characters +syn keyword pineConfig signature-file +syn keyword pineConfig smtp-server +syn keyword pineConfig sort-key +syn keyword pineConfig speller +syn keyword pineConfig ssh-command +syn keyword pineConfig ssh-open-timeout +syn keyword pineConfig ssh-path +syn keyword pineConfig standard-printer +syn keyword pineConfig status-background-color +syn keyword pineConfig status-foreground-color +syn keyword pineConfig status-message-delay +syn keyword pineConfig suggest-address +syn keyword pineConfig suggest-fullname +syn keyword pineConfig tcp-open-timeout +syn keyword pineConfig tcp-query-timeout +syn keyword pineConfig tcp-read-warning-timeout +syn keyword pineConfig tcp-write-warning-timeout +syn keyword pineConfig threading-display-style +syn keyword pineConfig threading-expanded-character +syn keyword pineConfig threading-index-style +syn keyword pineConfig threading-indicator-character +syn keyword pineConfig threading-lastreply-character +syn keyword pineConfig title-background-color +syn keyword pineConfig title-foreground-color +syn keyword pineConfig titlebar-color-style +syn keyword pineConfig upload-command +syn keyword pineConfig upload-command-prefix +syn keyword pineConfig url-viewers +syn keyword pineConfig use-only-domain-name +syn keyword pineConfig user-domain +syn keyword pineConfig user-id +syn keyword pineConfig user-id +syn keyword pineConfig user-input-timeout +syn keyword pineConfig viewer-hdr-colors +syn keyword pineConfig viewer-hdrs +syn keyword pineConfig viewer-overlap +syn keyword pineConfig window-position + +syn keyword pineOption allow-changing-from +syn keyword pineOption allow-talk +syn keyword pineOption alternate-compose-menu +syn keyword pineOption assume-slow-link +syn keyword pineOption auto-move-read-msgs +syn keyword pineOption auto-open-next-unread +syn keyword pineOption auto-unzoom-after-apply +syn keyword pineOption auto-zoom-after-select +syn keyword pineOption cache-remote-pinerc +syn keyword pineOption check-newmail-when-quitting +syn keyword pineOption combined-addrbook-display +syn keyword pineOption combined-folder-display +syn keyword pineOption combined-subdirectory-display +syn keyword pineOption compose-cut-from-cursor +syn keyword pineOption compose-maps-delete-key-to-ctrl-d +syn keyword pineOption compose-rejects-unqualified-addrs +syn keyword pineOption compose-send-offers-first-filter +syn keyword pineOption compose-sets-newsgroup-without-confirm +syn keyword pineOption confirm-role-even-for-default +syn keyword pineOption continue-tab-without-confirm +syn keyword pineOption delete-skips-deleted +syn keyword pineOption disable-2022-jp-conversions +syn keyword pineOption disable-busy-alarm +syn keyword pineOption disable-charset-conversions +syn keyword pineOption disable-config-cmd +syn keyword pineOption disable-keyboard-lock-cmd +syn keyword pineOption disable-keymenu +syn keyword pineOption disable-password-caching +syn keyword pineOption disable-password-cmd +syn keyword pineOption disable-pipes-in-sigs +syn keyword pineOption disable-pipes-in-templates +syn keyword pineOption disable-roles-setup-cmd +syn keyword pineOption disable-roles-sig-edit +syn keyword pineOption disable-roles-template-edit +syn keyword pineOption disable-sender +syn keyword pineOption disable-shared-namespaces +syn keyword pineOption disable-signature-edit-cmd +syn keyword pineOption disable-take-last-comma-first +syn keyword pineOption enable-8bit-esmtp-negotiation +syn keyword pineOption enable-8bit-nntp-posting +syn keyword pineOption enable-aggregate-command-set +syn keyword pineOption enable-alternate-editor-cmd +syn keyword pineOption enable-alternate-editor-implicitly +syn keyword pineOption enable-arrow-navigation +syn keyword pineOption enable-arrow-navigation-relaxed +syn keyword pineOption enable-background-sending +syn keyword pineOption enable-bounce-cmd +syn keyword pineOption enable-cruise-mode +syn keyword pineOption enable-cruise-mode-delete +syn keyword pineOption enable-delivery-status-notification +syn keyword pineOption enable-dot-files +syn keyword pineOption enable-dot-folders +syn keyword pineOption enable-exit-via-lessthan-command +syn keyword pineOption enable-fast-recent-test +syn keyword pineOption enable-flag-cmd +syn keyword pineOption enable-flag-screen-implicitly +syn keyword pineOption enable-full-header-and-text +syn keyword pineOption enable-full-header-cmd +syn keyword pineOption enable-goto-in-file-browser +syn keyword pineOption enable-incoming-folders +syn keyword pineOption enable-jump-shortcut +syn keyword pineOption enable-lame-list-mode +syn keyword pineOption enable-mail-check-cue +syn keyword pineOption enable-mailcap-param-substitution +syn keyword pineOption enable-mouse-in-xterm +syn keyword pineOption enable-msg-view-addresses +syn keyword pineOption enable-msg-view-attachments +syn keyword pineOption enable-msg-view-forced-arrows +syn keyword pineOption enable-msg-view-urls +syn keyword pineOption enable-msg-view-web-hostnames +syn keyword pineOption enable-newmail-in-xterm-icon +syn keyword pineOption enable-partial-match-lists +syn keyword pineOption enable-print-via-y-command +syn keyword pineOption enable-reply-indent-string-editing +syn keyword pineOption enable-rules-under-take +syn keyword pineOption enable-search-and-replace +syn keyword pineOption enable-sigdashes +syn keyword pineOption enable-suspend +syn keyword pineOption enable-tab-completion +syn keyword pineOption enable-take-export +syn keyword pineOption enable-tray-icon +syn keyword pineOption enable-unix-pipe-cmd +syn keyword pineOption enable-verbose-smtp-posting +syn keyword pineOption expanded-view-of-addressbooks +syn keyword pineOption expanded-view-of-distribution-lists +syn keyword pineOption expanded-view-of-folders +syn keyword pineOption expose-hidden-config +syn keyword pineOption expunge-only-manually +syn keyword pineOption expunge-without-confirm +syn keyword pineOption expunge-without-confirm-everywhere +syn keyword pineOption fcc-on-bounce +syn keyword pineOption fcc-only-without-confirm +syn keyword pineOption fcc-without-attachments +syn keyword pineOption include-attachments-in-reply +syn keyword pineOption include-header-in-reply +syn keyword pineOption include-text-in-reply +syn keyword pineOption ldap-result-to-addrbook-add +syn keyword pineOption mark-fcc-seen +syn keyword pineOption mark-for-cc +syn keyword pineOption news-approximates-new-status +syn keyword pineOption news-deletes-across-groups +syn keyword pineOption news-offers-catchup-on-close +syn keyword pineOption news-post-without-validation +syn keyword pineOption news-read-in-newsrc-order +syn keyword pineOption next-thread-without-confirm +syn keyword pineOption old-growth +syn keyword pineOption pass-control-characters-as-is +syn keyword pineOption prefer-plain-text +syn keyword pineOption preserve-start-stop-characters +syn keyword pineOption print-formfeed-between-messages +syn keyword pineOption print-includes-from-line +syn keyword pineOption print-index-enabled +syn keyword pineOption print-offers-custom-cmd-prompt +syn keyword pineOption quell-attachment-extra-prompt +syn keyword pineOption quell-berkeley-format-timezone +syn keyword pineOption quell-content-id +syn keyword pineOption quell-dead-letter-on-cancel +syn keyword pineOption quell-empty-directories +syn keyword pineOption quell-extra-post-prompt +syn keyword pineOption quell-folder-internal-msg +syn keyword pineOption quell-imap-envelope-update +syn keyword pineOption quell-lock-failure-warnings +syn keyword pineOption quell-maildomain-warning +syn keyword pineOption quell-news-envelope-update +syn keyword pineOption quell-partial-fetching +syn keyword pineOption quell-ssl-largeblocks +syn keyword pineOption quell-status-message-beeping +syn keyword pineOption quell-timezone-comment-when-sending +syn keyword pineOption quell-user-lookup-in-passwd-file +syn keyword pineOption quit-without-confirm +syn keyword pineOption reply-always-uses-reply-to +syn keyword pineOption save-aggregates-copy-sequence +syn keyword pineOption save-will-advance +syn keyword pineOption save-will-not-delete +syn keyword pineOption save-will-quote-leading-froms +syn keyword pineOption scramble-message-id +syn keyword pineOption select-without-confirm +syn keyword pineOption selectable-item-nobold +syn keyword pineOption separate-folder-and-directory-entries +syn keyword pineOption show-cursor +syn keyword pineOption show-plain-text-internally +syn keyword pineOption show-selected-in-boldface +syn keyword pineOption signature-at-bottom +syn keyword pineOption single-column-folder-list +syn keyword pineOption slash-collapses-entire-thread +syn keyword pineOption spell-check-before-sending +syn keyword pineOption store-window-position-in-config +syn keyword pineOption strip-from-sigdashes-on-reply +syn keyword pineOption tab-visits-next-new-message-only +syn keyword pineOption termdef-takes-precedence +syn keyword pineOption thread-index-shows-important-color +syn keyword pineOption try-alternative-authentication-driver-first +syn keyword pineOption unselect-will-not-advance +syn keyword pineOption use-current-dir +syn keyword pineOption use-function-keys +syn keyword pineOption use-sender-not-x-sender +syn keyword pineOption use-subshell-for-suspend +syn keyword pineOption vertical-folder-list + +syn match pineComment "^#.*$" + +" 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_pine_syn_inits") + if version < 508 + let did_pine_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink pineConfig Type + HiLink pineComment Comment + HiLink pineOption Macro + delcommand HiLink +endif + +let b:current_syntax = "pine" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/pinfo.vim b/vim/bundle/ubuntu-vim72/syntax/pinfo.vim new file mode 100644 index 0000000..bf4126e --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/pinfo.vim @@ -0,0 +1,110 @@ +" Vim syntax file +" Language: pinfo(1) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2007-06-17 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +setlocal iskeyword+=- + +syn case ignore + +syn keyword pinfoTodo contained FIXME TODO XXX NOTE + +syn region pinfoComment start='^#' end='$' contains=pinfoTodo,@Spell + +syn keyword pinfoOptions MANUAL CUT-MAN-HEADERS CUT-EMPTY-MAN-LINES + \ RAW-FILENAME APROPOS + \ DONT-HANDLE-WITHOUT-TAG-TABLE HTTPVIEWER + \ FTPVIEWER MAILEDITOR PRINTUTILITY MANLINKS + \ INFOPATH MAN-OPTIONS STDERR-REDIRECTION + \ LONG-MANUAL-LINKS FILTER-0xB7 + \ QUIT-CONFIRMATION QUIT-CONFIRM-DEFAULT + \ CLEAR-SCREEN-AT-EXIT CALL-READLINE-HISTORY + \ HIGHLIGHTREGEXP SAFE-USER SAFE-GROUP + +syn keyword pinfoColors COL_NORMAL COL_TOPLINE COL_BOTTOMLINE + \ COL_MENU COL_MENUSELECTED COL_NOTE + \ COL_NOTESELECTED COL_URL COL_URLSELECTED + \ COL_INFOHIGHLIGHT COL_MANUALBOLD + \ COL_MANUALITALIC COL_SEARCHHIGHLIGHT + +syn keyword pinfoColorDefault COLOR_DEFAULT +syn keyword pinfoColorBold BOLD +syn keyword pinfoColorNoBold NO_BOLD +syn keyword pinfoColorBlink BLINK +syn keyword pinfoColorNoBlink NO_BLINK +syn keyword pinfoColorBlack COLOR_BLACK +syn keyword pinfoColorRed COLOR_RED +syn keyword pinfoColorGreen COLOR_GREEN +syn keyword pinfoColorYellow COLOR_YELLOW +syn keyword pinfoColorBlue COLOR_BLUE +syn keyword pinfoColorMagenta COLOR_MAGENTA +syn keyword pinfoColorCyan COLOR_CYAN +syn keyword pinfoColorWhite COLOR_WHITE + +syn keyword pinfoKeys KEY_TOTALSEARCH_1 KEY_TOTALSEARCH_2 + \ KEY_SEARCH_1 KEY_SEARCH_2 + \ KEY_SEARCH_AGAIN_1 KEY_SEARCH_AGAIN_2 + \ KEY_GOTO_1 KEY_GOTO_2 KEY_PREVNODE_1 + \ KEY_PREVNODE_2 KEY_NEXTNODE_1 + \ KEY_NEXTNODE_2 KEY_UP_1 KEY_UP_2 KEY_END_1 + \ KEY_END_2 KEY_PGDN_1 KEY_PGDN_2 + \ KEY_PGDN_AUTO_1 KEY_PGDN_AUTO_2 KEY_HOME_1 + \ KEY_HOME_2 KEY_PGUP_1 KEY_PGUP_2 + \ KEY_PGUP_AUTO_1 KEY_PGUP_AUTO_2 KEY_DOWN_1 + \ KEY_DOWN_2 KEY_TOP_1 KEY_TOP_2 KEY_BACK_1 + \ KEY_BACK_2 KEY_FOLLOWLINK_1 + \ KEY_FOLLOWLINK_2 KEY_REFRESH_1 + \ KEY_REFRESH_2 KEY_SHELLFEED_1 + \ KEY_SHELLFEED_2 KEY_QUIT_1 KEY_QUIT_2 + \ KEY_GOLINE_1 KEY_GOLINE_2 KEY_PRINT_1 + \ KEY_PRINT_2 KEY_DIRPAGE_1 KEY_DIRPAGE_2 + \ KEY_TWODOWN_1 KEY_TWODOWN_2 KEY_TWOUP_1 + \ KEY_TWOUP_2 + +syn keyword pinfoSpecialKeys KEY_BREAK KEY_DOWN KEY_UP KEY_LEFT KEY_RIGHT + \ KEY_DOWN KEY_HOME KEY_BACKSPACE KEY_NPAGE + \ KEY_PPAGE KEY_END KEY_IC KEY_DC +syn region pinfoSpecialKeys matchgroup=pinfoSpecialKeys transparent + \ start=+KEY_\%(F\|CTRL\|ALT\)(+ end=+)+ +syn region pinfoSimpleKey start=+'+ skip=+\\'+ end=+'+ + \ contains=pinfoSimpleKeyEscape +syn match pinfoSimpleKeyEscape +\\[\\nt']+ +syn match pinfoKeycode '\<\d\+\>' + +syn keyword pinfoConstants TRUE FALSE YES NO + +hi def link pinfoTodo Todo +hi def link pinfoComment Comment +hi def link pinfoOptions Keyword +hi def link pinfoColors Keyword +hi def link pinfoColorDefault Normal +hi def link pinfoSpecialKeys SpecialChar +hi def link pinfoSimpleKey String +hi def link pinfoSimpleKeyEscape SpecialChar +hi def link pinfoKeycode Number +hi def link pinfoConstants Constant +hi def link pinfoKeys Keyword +hi def pinfoColorBold cterm=bold +hi def pinfoColorNoBold cterm=none +hi def pinfoColorBlink cterm=inverse +hi def pinfoColorNoBlink cterm=none +hi def pinfoColorBlack ctermfg=Black guifg=Black +hi def pinfoColorRed ctermfg=DarkRed guifg=DarkRed +hi def pinfoColorGreen ctermfg=DarkGreen guifg=DarkGreen +hi def pinfoColorYellow ctermfg=DarkYellow guifg=DarkYellow +hi def pinfoColorBlue ctermfg=DarkBlue guifg=DarkBlue +hi def pinfoColorMagenta ctermfg=DarkMagenta guifg=DarkMagenta +hi def pinfoColorCyan ctermfg=DarkCyan guifg=DarkCyan +hi def pinfoColorWhite ctermfg=LightGray guifg=LightGray + +let b:current_syntax = "pinfo" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/plaintex.vim b/vim/bundle/ubuntu-vim72/syntax/plaintex.vim new file mode 100644 index 0000000..7020c68 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/plaintex.vim @@ -0,0 +1,170 @@ +" Vim syntax file +" Language: TeX (plain.tex format) +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-10-26 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn match plaintexControlSequence display contains=@NoSpell + \ '\\[a-zA-Z@]\+' + +runtime! syntax/initex.vim +unlet b:current_syntax + +syn match plaintexComment display + \ contains=ALLBUT,initexComment,plaintexComment + \ '^\s*%[CDM].*$' + +if exists("g:plaintex_delimiters") + syn match plaintexDelimiter display '[][{}]' +endif + +syn match plaintexRepeat display contains=@NoSpell + \ '\\\%(loop\|repeat\)\>' + +syn match plaintexCommand display contains=@NoSpell + \ '\\\%(plainoutput\|TeX\)\>' +syn match plaintexBoxCommand display contains=@NoSpell + \ '\\\%(null\|strut\)\>' +syn match plaintexDebuggingCommand display contains=@NoSpell + \ '\\\%(showhyphens\|tracingall\|wlog\)\>' +syn match plaintexFontsCommand display contains=@NoSpell + \ '\\\%(bf\|\%(five\|seven\)\%(bf\|i\|rm\|sy\)\|it\|oldstyle\|rm\|sl\|ten\%(bf\|ex\|it\=\|rm\|sl\|sy\|tt\)\|tt\)\>' +syn match plaintexGlueCommand display contains=@NoSpell + \ '\\\%(\%(big\|en\|med\|\%(no\|off\)interline\|small\)skip\|\%(center\|left\|right\)\=line\|\%(dot\|\%(left\|right\)arrow\)fill\|[hv]glue\|[lr]lap\|q\=quad\|space\|topglue\)\>' +syn match plaintexInsertsCommand display contains=@NoSpell + \ '\\\%(\%(end\|top\)insert\|v\=footnote\)\>' +syn match plaintexJobCommand display contains=@NoSpell + \ '\\\%(bye\|fmt\%(name\|version\)\)\>' +syn match plaintexInsertsCommand display contains=@NoSpell + \ '\\\%(mid\|page\)insert\>' +syn match plaintexKernCommand display contains=@NoSpell + \ '\\\%(en\|\%(neg\)\=thin\)space\>' +syn match plaintexMacroCommand display contains=@NoSpell + \ '\\\%(active\|[be]group\|empty\)\>' +syn match plaintexPageCommand display contains=@NoSpell + \ '\\\%(\%(super\)\=eject\|nopagenumbers\|\%(normal\|ragged\)bottom\)\>' +syn match plaintexParagraphCommand display contains=@NoSpell + \ '\\\%(endgraf\|\%(non\)\=frenchspacing\|hang\|item\%(item\)\=\|narrower\|normalbaselines\|obey\%(lines\|spaces\)\|openup\|proclaim\|\%(tt\)\=raggedright\|textindent\)\>' +syn match plaintexPenaltiesCommand display contains=@NoSpell + \ '\\\%(allow\|big\|fil\|good\|med\|no\|small\)\=break\>' +syn match plaintexRegistersCommand display contains=@NoSpell + \ '\\\%(advancepageno\|new\%(box\|count\|dimen\|fam\|help\|if\|insert\|language\|muskip\|read\|skip\|toks\|write\)\)\>' +syn match plaintexTablesCommand display contains=@NoSpell + \ '&\|\\+\|\\\%(cleartabs\|endline\|hidewidth\|ialign\|multispan\|settabs\|tabalign\)\>' + +if !exists("g:plaintex_no_math") + syn region plaintexMath matchgroup=plaintexMath + \ contains=@plaintexMath,@NoSpell + \ start='\$' skip='\\\\\|\\\$' end='\$' + syn region plaintexMath matchgroup=plaintexMath + \ contains=@plaintexMath,@NoSpell keepend + \ start='\$\$' skip='\\\\\|\\\$' end='\$\$' +endif + +" Keep this after plaintexMath, as we don’t want math mode started at a \$. +syn match plaintexCharacterCommand display contains=@NoSpell + \ /\\\%(["#$%&'.=^_`~]\|``\|''\|-\{2,3}\|[?!]`\|^^L\|\~\|\%(a[ae]\|A[AE]\|acute\|[cdHoOPStuvijlL]\|copyright\|d\=dag\|folio\|ldotp\|[lr]q\|oe\|OE\|slash\|ss\|underbar\)\>\)/ + +syn cluster plaintexMath + \ contains=plaintexMathCommand,plaintexMathBoxCommand, + \ plaintexMathCharacterCommand,plaintexMathDelimiter, + \ plaintexMathFontsCommand,plaintexMathLetter,plaintexMathSymbol, + \ plaintexMathFunction,plaintexMathOperator,plaintexMathPunctuation, + \ plaintexMathRelation + +syn match plaintexMathCommand display contains=@NoSpell contained + \ '\\\%([!*,;>{}|_^]\|\%([aA]rrowvert\|[bB]ig\%(g[lmr]\=\|r\)\=\|\%(border\|p\)\=matrix\|displaylines\|\%(down\|up\)bracefill\|eqalign\%(no\)\|leqalignno\|[lr]moustache\|mathpalette\|root\|s[bp]\|skew\|sqrt\)\>\)' +syn match plaintexMathBoxCommand display contains=@NoSpell contained + \ '\\\%([hv]\=phantom\|mathstrut\|smash\)\>' +syn match plaintexMathCharacterCommand display contains=@NoSpell contained + \ '\\\%(b\|bar\|breve\|check\|d\=dots\=\|grave\|hat\|[lv]dots\|tilde\|vec\|wide\%(hat\|tilde\)\)\>' +syn match plaintexMathDelimiter display contains=@NoSpell contained + \ '\\\%(brace\%(vert\)\=\|brack\|cases\|choose\|[lr]\%(angle\|brace\|brack\|ceil\|floor\|group\)\|over\%(brace\|\%(left\|right\)arrow\)\|underbrace\)\>' +syn match plaintexMathFontsCommand display contains=@NoSpell contained + \ '\\\%(\%(bf\|it\|sl\|tt\)fam\|cal\|mit\)\>' +syn match plaintexMathLetter display contains=@NoSpell contained + \ '\\\%(aleph\|alpha\|beta\|chi\|[dD]elta\|ell\|epsilon\|eta\|[gG]amma\|[ij]math\|iota\|kappa\|[lL]ambda\|[mn]u\|[oO]mega\|[pP][hs]\=i\|rho\|[sS]igma\|tau\|[tT]heta\|[uU]psilon\|var\%(epsilon\|ph\=i\|rho\|sigma\|theta\)\|[xX]i\|zeta\)\>' +syn match plaintexMathSymbol display contains=@NoSpell contained + \ '\\\%(angle\|backslash\|bot\|clubsuit\|emptyset\|epsilon\|exists\|flat\|forall\|hbar\|heartsuit\|Im\|infty\|int\|lnot\|nabla\|natural\|neg\|pmod\|prime\|Re\|sharp\|smallint\|spadesuit\|surd\|top\|triangle\%(left\|right\)\=\|vdash\|wp\)\>' +syn match plaintexMathFunction display contains=@NoSpell contained + \ '\\\%(arc\%(cos\|sin\|tan\)\|arg\|\%(cos\|sin\|tan\)h\=\|coth\=\|csc\|de[gt]\|dim\|exp\|gcd\|hom\|inf\|ker\|lo\=g\|lim\%(inf\|sup\)\=\|ln\|max\|min\|Pr\|sec\|sup\)\>' +syn match plaintexMathOperator display contains=@NoSpell contained + \ '\\\%(amalg\|ast\|big\%(c[au]p\|circ\|o\%(dot\|plus\|times\|sqcup\)\|triangle\%(down\|up\)\|uplus\|vee\|wedge\|bmod\|bullet\)\|c[au]p\|cdot[ps]\=\|circ\|coprod\|d\=dagger\|diamond\%(suit\)\=\|div\|land\|lor\|mp\|o\%(dot\|int\|minus\|plus\|slash\|times\)pm\|prod\|setminus\|sqc[au]p\|sqsu[bp]seteq\|star\|su[bp]set\%(eq\)\=\|sum\|times\|uplus\|vee\|wedge\|wr\)\>' +syn match plaintexMathPunctuation display contains=@NoSpell contained + \ '\\\%(colon\)\>' +syn match plaintexMathRelation display contains=@NoSpell contained + \ '\\\%(approx\|asymp\|bowtie\|buildrel\|cong\|dashv\|doteq\|[dD]ownarrow\|equiv\|frown\|geq\=\|gets\|gg\|hook\%(left\|right\)arrow\|iff\|in\|leq\=\|[lL]eftarrow\|\%(left\|right\)harpoon\%(down\|up\)\|[lL]eftrightarrow\|ll\|[lL]ongleftrightarrow\|longmapsto\|[lL]ongrightarrow\|mapsto\|mid\|models\|[ns][ew]arrow\|neq\=\|ni\|not\%(in\)\=\|owns\|parallel\|perp\|prec\%(eq\)\=\|propto\|[rR]ightarrow\|rightleftharpoons\|sim\%(eq\)\=\|smile\|succ\%(eq\)\=\|to\|[uU]parrow\|[uU]pdownarrow\|[vV]ert\)\>' + +syn match plaintexParameterDimen display contains=@NoSpell + \ '\\maxdimen\>' +syn match plaintexMathParameterDimen display contains=@NoSpell + \ '\\jot\>' +syn match plaintexParagraphParameterGlue display contains=@NoSpell + \ '\\\%(\%(big\|med\|small\)skipamount\|normalbaselineskip\|normallineskip\%(limit\)\=\)\>' + +syn match plaintexFontParameterInteger display contains=@NoSpell + \ '\\magstep\%(half\)\=\>' +syn match plaintexJobParameterInteger display contains=@NoSpell + \ '\\magnification\>' +syn match plaintexPageParameterInteger display contains=@NoSpell + \ '\\pageno\>' + +syn match plaintexPageParameterToken display contains=@NoSpell + \ '\\\%(foot\|head\)line\>' + +hi def link plaintexOperator Operator + +hi def link plaintexDelimiter Delimiter + +hi def link plaintexControlSequence Identifier +hi def link plaintexComment Comment +hi def link plaintexInclude Include +hi def link plaintexRepeat Repeat + +hi def link plaintexCommand initexCommand +hi def link plaintexBoxCommand plaintexCommand +hi def link plaintexCharacterCommand initexCharacterCommand +hi def link plaintexDebuggingCommand initexDebuggingCommand +hi def link plaintexFontsCommand initexFontsCommand +hi def link plaintexGlueCommand plaintexCommand +hi def link plaintexInsertsCommand plaintexCommand +hi def link plaintexJobCommand initexJobCommand +hi def link plaintexKernCommand plaintexCommand +hi def link plaintexMacroCommand initexMacroCommand +hi def link plaintexPageCommand plaintexCommand +hi def link plaintexParagraphCommand plaintexCommand +hi def link plaintexPenaltiesCommand plaintexCommand +hi def link plaintexRegistersCommand plaintexCommand +hi def link plaintexTablesCommand plaintexCommand + +hi def link plaintexMath String +hi def link plaintexMathCommand plaintexCommand +hi def link plaintexMathBoxCommand plaintexBoxCommand +hi def link plaintexMathCharacterCommand plaintexCharacterCommand +hi def link plaintexMathDelimiter plaintexDelimiter +hi def link plaintexMathFontsCommand plaintexFontsCommand +hi def link plaintexMathLetter plaintexMathCharacterCommand +hi def link plaintexMathSymbol plaintexMathLetter +hi def link plaintexMathFunction Function +hi def link plaintexMathOperator plaintexOperator +hi def link plaintexMathPunctuation plaintexCharacterCommand +hi def link plaintexMathRelation plaintexOperator + +hi def link plaintexParameterDimen initexParameterDimen +hi def link plaintexMathParameterDimen initexMathParameterDimen +hi def link plaintexParagraphParameterGlue initexParagraphParameterGlue +hi def link plaintexFontParameterInteger initexFontParameterInteger +hi def link plaintexJobParameterInteger initexJobParameterInteger +hi def link plaintexPageParameterInteger initexPageParameterInteger +hi def link plaintexPageParameterToken initexParameterToken + +let b:current_syntax = "plaintex" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/plm.vim b/vim/bundle/ubuntu-vim72/syntax/plm.vim new file mode 100644 index 0000000..bf7c32f --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/plm.vim @@ -0,0 +1,147 @@ +" Vim syntax file +" Language: PL/M +" Maintainer: Philippe Coulonges +" Last change: 2003 May 11 + +" 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 + +" PL/M is a case insensitive language +syn case ignore + +syn keyword plmTodo contained TODO FIXME XXX + +" String +syn region plmString start=+'+ end=+'+ + +syn match plmOperator "[@=\+\-\*\/\<\>]" + +syn match plmIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>" + +syn match plmDelimiter "[();,]" + +syn region plmPreProc start="^\s*\$\s*" skip="\\$" end="$" + +" FIXME : No Number support for floats, as I'm working on an embedded +" project that doesn't use any. +syn match plmNumber "-\=\<\d\+\>" +syn match plmNumber "\<[0-9a-fA-F]*[hH]*\>" + +" If you don't like tabs +"syn match plmShowTab "\t" +"syn match plmShowTabc "\t" + +"when wanted, highlight trailing white space +if exists("c_space_errors") + syn match plmSpaceError "\s*$" + syn match plmSpaceError " \+\t"me=e-1 +endif + +" + " Use the same control variable as C language for I believe + " users will want the same behavior +if exists("c_comment_strings") + " FIXME : don't work fine with c_comment_strings set, + " which I don't care as I don't use + + " A comment can contain plmString, plmCharacter and plmNumber. + " But a "*/" inside a plmString in a plmComment DOES end the comment! So we + " need to use a special type of plmString: plmCommentString, which also ends on + " "*/", and sees a "*" at the start of the line as comment again. + syntax match plmCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region plmCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=plmSpecial,plmCommentSkip + syntax region plmComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=plmSpecial + syntax region plmComment start="/\*" end="\*/" contains=plmTodo,plmCommentString,plmCharacter,plmNumber,plmFloat,plmSpaceError + syntax match plmComment "//.*" contains=plmTodo,plmComment2String,plmCharacter,plmNumber,plmSpaceError +else + syn region plmComment start="/\*" end="\*/" contains=plmTodo,plmSpaceError + syn match plmComment "//.*" contains=plmTodo,plmSpaceError +endif + +syntax match plmCommentError "\*/" + +syn keyword plmReserved ADDRESS AND AT BASED BY BYTE CALL CASE +syn keyword plmReserved DATA DECLARE DISABLE DO DWORD +syn keyword plmReserved ELSE ENABLE END EOF EXTERNAL +syn keyword plmReserved GO GOTO HALT IF INITIAL INTEGER INTERRUPT +syn keyword plmReserved LABEL LITERALLY MINUS MOD NOT OR +syn keyword plmReserved PLUS POINTER PROCEDURE PUBLIC +syn keyword plmReserved REAL REENTRANT RETURN SELECTOR STRUCTURE +syn keyword plmReserved THEN TO WHILE WORD XOR +syn keyword plm386Reserved CHARINT HWORD LONGINT OFFSET QWORD SHORTINT + +syn keyword plmBuiltIn ABS ADJUSTRPL BLOCKINPUT BLOCKINWORD BLOCKOUTPUT +syn keyword plmBuiltIn BLOCKOUTWORD BUILPTR CARRY CAUSEINTERRUPT CMPB +syn keyword plmBuiltIn CMPW DEC DOUBLE FINDB FINDRB FINDRW FINDW FIX +syn keyword plmBuiltIn FLAGS FLOAT GETREALERROR HIGH IABS INITREALMATHUNIT +syn keyword plmBuiltIn INPUT INT INWORD LAST LOCKSET LENGTH LOW MOVB MOVE +syn keyword plmBuiltIn MOVRB MOVRW MOVW NIL OUTPUT OUTWORD RESTOREREALSTATUS +syn keyword plmBuiltIn ROL ROR SAL SAVEREALSTATUS SCL SCR SELECTOROF SETB +syn keyword plmBuiltIn SETREALMODE SETW SHL SHR SIGN SIGNED SIZE SKIPB +syn keyword plmBuiltIn SKIPRB SKIPRW SKIPW STACKBASE STACKPTR TIME SIZE +syn keyword plmBuiltIn UNSIGN XLAT ZERO +syn keyword plm386BuiltIn INTERRUPT SETINTERRUPT +syn keyword plm286BuiltIn CLEARTASKSWITCHEDFLAG GETACCESSRIGHTS +syn keyword plm286BuiltIn GETSEGMENTLIMIT LOCALTABLE MACHINESTATUS +syn keyword plm286BuiltIn OFFSETOF PARITY RESTOREGLOBALTABLE +syn keyword plm286BuiltIn RESTOREINTERRUPTTABLE SAVEGLOBALTABLE +syn keyword plm286BuiltIn SAVEINTERRUPTTABLE SEGMENTREADABLE +syn keyword plm286BuiltIn SEGMENTWRITABLE TASKREGISTER WAITFORINTERRUPT +syn keyword plm386BuiltIn CONTROLREGISTER DEBUGREGISTER FINDHW +syn keyword plm386BuiltIn FINDRHW INHWORD MOVBIT MOVRBIT MOVHW MOVRHW +syn keyword plm386BuiltIn OUTHWORD SCANBIT SCANRBIT SETHW SHLD SHRD +syn keyword plm386BuiltIn SKIPHW SKIPRHW TESTREGISTER +syn keyword plm386w16BuiltIn BLOCKINDWORD BLOCKOUTDWORD CMPD FINDD +syn keyword plm386w16BuiltIn FINDRD INDWORD MOVD MOVRD OUTDWORD +syn keyword plm386w16BuiltIn SETD SKIPD SKIPRD + +syn sync lines=50 + +" 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_plm_syntax_inits") + if version < 508 + let did_plm_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " The default methods for highlighting. Can be overridden later +" HiLink plmLabel Label +" HiLink plmConditional Conditional +" HiLink plmRepeat Repeat + HiLink plmTodo Todo + HiLink plmNumber Number + HiLink plmOperator Operator + HiLink plmDelimiter Operator + "HiLink plmShowTab Error + "HiLink plmShowTabc Error + HiLink plmIdentifier Identifier + HiLink plmBuiltIn Statement + HiLink plm286BuiltIn Statement + HiLink plm386BuiltIn Statement + HiLink plm386w16BuiltIn Statement + HiLink plmReserved Statement + HiLink plm386Reserved Statement + HiLink plmPreProc PreProc + HiLink plmCommentError plmError + HiLink plmCommentString plmString + HiLink plmComment2String plmString + HiLink plmCommentSkip plmComment + HiLink plmString String + HiLink plmComment Comment + + delcommand HiLink +endif + +let b:current_syntax = "plm" + +" vim: ts=8 sw=2 + diff --git a/vim/bundle/ubuntu-vim72/syntax/plp.vim b/vim/bundle/ubuntu-vim72/syntax/plp.vim new file mode 100644 index 0000000..f59702d --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/plp.vim @@ -0,0 +1,45 @@ +" Vim syntax file +" Language: PLP (Perl in HTML) +" Maintainer: Juerd +" Last Change: 2003 Apr 25 +" Cloned From: aspperl.vim + +" Add to filetype.vim the following line (without quote sign): +" au BufNewFile,BufRead *.plp setf plp + +" 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 + +if !exists("main_syntax") + let main_syntax = 'perlscript' +endif + +if version < 600 + so :p:h/html.vim + syn include @PLPperl :p:h/perl.vim +else + runtime! syntax/html.vim + unlet b:current_syntax + syn include @PLPperl syntax/perl.vim +endif + +syn cluster htmlPreproc add=PLPperlblock + +syn keyword perlControl PLP_END +syn keyword perlStatementInclude include Include +syn keyword perlStatementFiles ReadFile WriteFile Counter +syn keyword perlStatementScalar Entity AutoURL DecodeURI EncodeURI + +syn cluster PLPperlcode contains=perlStatement.*,perlFunction,perlOperator,perlVarPlain,perlVarNotInMatches,perlShellCommand,perlFloat,perlNumber,perlStringUnexpanded,perlString,perlQQ,perlControl,perlConditional,perlRepeat,perlComment,perlPOD,perlHereDoc,perlPackageDecl,perlElseIfError,perlFiledescRead,perlMatch + +syn region PLPperlblock keepend matchgroup=Delimiter start=+<:=\=+ end=+:>+ transparent contains=@PLPperlcode + +syn region PLPinclude keepend matchgroup=Delimiter start=+<(+ end=+)>+ + +let b:current_syntax = "plp" + diff --git a/vim/bundle/ubuntu-vim72/syntax/plsql.vim b/vim/bundle/ubuntu-vim72/syntax/plsql.vim new file mode 100644 index 0000000..6e51366 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/plsql.vim @@ -0,0 +1,277 @@ +" Vim syntax file +" Language: Oracle Procedureal SQL (PL/SQL) +" Maintainer: Jeff Lanzarotta (jefflanzarotta at yahoo dot com) +" Original Maintainer: C. Laurence Gonsalves (clgonsal@kami.com) +" URL: http://lanzarotta.tripod.com/vim/syntax/plsql.vim.zip +" Last Change: September 18, 2002 +" History: Geoff Evans & Bill Pribyl (bill at plnet dot org) +" Added 9i keywords. +" Austin Ziegler (austin at halostatue dot ca) +" Added 8i+ features. +" +" 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 + +" Todo. +syn keyword plsqlTodo TODO FIXME XXX DEBUG NOTE +syn cluster plsqlCommentGroup contains=plsqlTodo + +syn case ignore + +syn match plsqlGarbage "[^ \t()]" +syn match plsqlIdentifier "[a-z][a-z0-9$_#]*" +syn match plsqlHostIdentifier ":[a-z][a-z0-9$_#]*" + +" When wanted, highlight the trailing whitespace. +if exists("c_space_errors") + if !exists("c_no_trail_space_error") + syn match plsqlSpaceError "\s\+$" + endif + + if !exists("c_no_tab_space_error") + syn match plsqlSpaceError " \+\t"me=e-1 + endif +endif + +" Symbols. +syn match plsqlSymbol "\(;\|,\|\.\)" + +" Operators. +syn match plsqlOperator "\(+\|-\|\*\|/\|=\|<\|>\|@\|\*\*\|!=\|\~=\)" +syn match plsqlOperator "\(^=\|<=\|>=\|:=\|=>\|\.\.\|||\|<<\|>>\|\"\)" + +" Some of Oracle's SQL keywords. +syn keyword plsqlSQLKeyword ABORT ACCESS ACCESSED ADD AFTER ALL ALTER AND ANY +syn keyword plsqlSQLKeyword AS ASC ATTRIBUTE AUDIT AUTHORIZATION AVG BASE_TABLE +syn keyword plsqlSQLKeyword BEFORE BETWEEN BY CASCADE CAST CHECK CLUSTER +syn keyword plsqlSQLKeyword CLUSTERS COLAUTH COLUMN COMMENT COMPRESS CONNECT +syn keyword plsqlSQLKeyword CONSTRAINT CRASH CREATE CURRENT DATA DATABASE +syn keyword plsqlSQLKeyword DATA_BASE DBA DEFAULT DELAY DELETE DESC DISTINCT +syn keyword plsqlSQLKeyword DROP DUAL ELSE EXCLUSIVE EXISTS EXTENDS EXTRACT +syn keyword plsqlSQLKeyword FILE FORCE FOREIGN FROM GRANT GROUP HAVING HEAP +syn keyword plsqlSQLKeyword IDENTIFIED IDENTIFIER IMMEDIATE IN INCLUDING +syn keyword plsqlSQLKeyword INCREMENT INDEX INDEXES INITIAL INSERT INSTEAD +syn keyword plsqlSQLKeyword INTERSECT INTO INVALIDATE IS ISOLATION KEY LIBRARY +syn keyword plsqlSQLKeyword LIKE LOCK MAXEXTENTS MINUS MODE MODIFY MULTISET +syn keyword plsqlSQLKeyword NESTED NOAUDIT NOCOMPRESS NOT NOWAIT OF OFF OFFLINE +syn keyword plsqlSQLKeyword ON ONLINE OPERATOR OPTION OR ORDER ORGANIZATION +syn keyword plsqlSQLKeyword PCTFREE PRIMARY PRIOR PRIVATE PRIVILEGES PUBLIC +syn keyword plsqlSQLKeyword QUOTA RELEASE RENAME REPLACE RESOURCE REVOKE ROLLBACK +syn keyword plsqlSQLKeyword ROW ROWLABEL ROWS SCHEMA SELECT SEPARATE SESSION SET +syn keyword plsqlSQLKeyword SHARE SIZE SPACE START STORE SUCCESSFUL SYNONYM +syn keyword plsqlSQLKeyword SYSDATE TABLE TABLES TABLESPACE TEMPORARY TO TREAT +syn keyword plsqlSQLKeyword TRIGGER TRUNCATE UID UNION UNIQUE UNLIMITED UPDATE +syn keyword plsqlSQLKeyword USE USER VALIDATE VALUES VIEW WHENEVER WHERE WITH + +" PL/SQL's own keywords. +syn keyword plsqlKeyword AGENT AND ANY ARRAY ASSIGN AS AT AUTHID BEGIN BODY BY +syn keyword plsqlKeyword BULK C CASE CHAR_BASE CHARSETFORM CHARSETID CLOSE +syn keyword plsqlKeyword COLLECT CONSTANT CONSTRUCTOR CONTEXT CURRVAL DECLARE +syn keyword plsqlKeyword DVOID EXCEPTION EXCEPTION_INIT EXECUTE EXIT FETCH +syn keyword plsqlKeyword FINAL FUNCTION GOTO HASH IMMEDIATE IN INDICATOR +syn keyword plsqlKeyword INSTANTIABLE IS JAVA LANGUAGE LIBRARY MAP MAXLEN +syn keyword plsqlKeyword MEMBER NAME NEW NOCOPY NUMBER_BASE OBJECT OCICOLL +syn keyword plsqlKeyword OCIDATE OCIDATETIME OCILOBLOCATOR OCINUMBER OCIRAW +syn keyword plsqlKeyword OCISTRING OF OPAQUE OPEN OR ORDER OTHERS OUT +syn keyword plsqlKeyword OVERRIDING PACKAGE PARALLEL_ENABLE PARAMETERS +syn keyword plsqlKeyword PARTITION PIPELINED PRAGMA PROCEDURE RAISE RANGE REF +syn keyword plsqlKeyword RESULT RETURN REVERSE ROWTYPE SB1 SELF SHORT SIZE_T +syn keyword plsqlKeyword SQL SQLCODE SQLERRM STATIC STRUCT SUBTYPE TDO THEN +syn keyword plsqlKeyword TABLE TIMEZONE_ABBR TIMEZONE_HOUR TIMEZONE_MINUTE +syn keyword plsqlKeyword TIMEZONE_REGION TYPE UNDER UNSIGNED USING VARIANCE +syn keyword plsqlKeyword VARRAY VARYING WHEN WRITE +syn match plsqlKeyword "\" +syn match plsqlKeyword "\.COUNT\>"hs=s+1 +syn match plsqlKeyword "\.EXISTS\>"hs=s+1 +syn match plsqlKeyword "\.FIRST\>"hs=s+1 +syn match plsqlKeyword "\.LAST\>"hs=s+1 +syn match plsqlKeyword "\.DELETE\>"hs=s+1 +syn match plsqlKeyword "\.PREV\>"hs=s+1 +syn match plsqlKeyword "\.NEXT\>"hs=s+1 + +" PL/SQL functions. +syn keyword plsqlFunction ABS ACOS ADD_MONTHS ASCII ASCIISTR ASIN ATAN ATAN2 +syn keyword plsqlFunction BFILENAME BITAND CEIL CHARTOROWID CHR COALESCE +syn keyword plsqlFunction COMMIT COMMIT_CM COMPOSE CONCAT CONVERT COS COSH +syn keyword plsqlFunction COUNT CUBE CURRENT_DATE CURRENT_TIME CURRENT_TIMESTAMP +syn keyword plsqlFunction DBTIMEZONE DECODE DECOMPOSE DEREF DUMP EMPTY_BLOB +syn keyword plsqlFunction EMPTY_CLOB EXISTS EXP FLOOR FROM_TZ GETBND GLB +syn keyword plsqlFunction GREATEST GREATEST_LB GROUPING HEXTORAW INITCAP +syn keyword plsqlFunction INSTR INSTR2 INSTR4 INSTRB INSTRC ISNCHAR LAST_DAY +syn keyword plsqlFunction LEAST LEAST_UB LENGTH LENGTH2 LENGTH4 LENGTHB LENGTHC +syn keyword plsqlFunction LN LOCALTIME LOCALTIMESTAMP LOG LOWER LPAD +syn keyword plsqlFunction LTRIM LUB MAKE_REF MAX MIN MOD MONTHS_BETWEEN +syn keyword plsqlFunction NCHARTOROWID NCHR NEW_TIME NEXT_DAY NHEXTORAW +syn keyword plsqlFunction NLS_CHARSET_DECL_LEN NLS_CHARSET_ID NLS_CHARSET_NAME +syn keyword plsqlFunction NLS_INITCAP NLS_LOWER NLSSORT NLS_UPPER NULLFN NULLIF +syn keyword plsqlFunction NUMTODSINTERVAL NUMTOYMINTERVAL NVL POWER +syn keyword plsqlFunction RAISE_APPLICATION_ERROR RAWTOHEX RAWTONHEX REF +syn keyword plsqlFunction REFTOHEX REPLACE ROLLBACK_NR ROLLBACK_SV ROLLUP ROUND +syn keyword plsqlFunction ROWIDTOCHAR ROWIDTONCHAR ROWLABEL RPAD RTRIM +syn keyword plsqlFunction SAVEPOINT SESSIONTIMEZONE SETBND SET_TRANSACTION_USE +syn keyword plsqlFunction SIGN SIN SINH SOUNDEX SQLCODE SQLERRM SQRT STDDEV +syn keyword plsqlFunction SUBSTR SUBSTR2 SUBSTR4 SUBSTRB SUBSTRC SUM +syn keyword plsqlFunction SYS_AT_TIME_ZONE SYS_CONTEXT SYSDATE SYS_EXTRACT_UTC +syn keyword plsqlFunction SYS_GUID SYS_LITERALTODATE SYS_LITERALTODSINTERVAL +syn keyword plsqlFunction SYS_LITERALTOTIME SYS_LITERALTOTIMESTAMP +syn keyword plsqlFunction SYS_LITERALTOTZTIME SYS_LITERALTOTZTIMESTAMP +syn keyword plsqlFunction SYS_LITERALTOYMINTERVAL SYS_OVER__DD SYS_OVER__DI +syn keyword plsqlFunction SYS_OVER__ID SYS_OVER_IID SYS_OVER_IIT +syn keyword plsqlFunction SYS_OVER__IT SYS_OVER__TI SYS_OVER__TT +syn keyword plsqlFunction SYSTIMESTAMP TAN TANH TO_ANYLOB TO_BLOB TO_CHAR +syn keyword plsqlFunction TO_CLOB TO_DATE TO_DSINTERVAL TO_LABEL TO_MULTI_BYTE +syn keyword plsqlFunction TO_NCHAR TO_NCLOB TO_NUMBER TO_RAW TO_SINGLE_BYTE +syn keyword plsqlFunction TO_TIME TO_TIMESTAMP TO_TIMESTAMP_TZ TO_TIME_TZ +syn keyword plsqlFunction TO_YMINTERVAL TRANSLATE TREAT TRIM TRUNC TZ_OFFSET UID +syn keyword plsqlFunction UNISTR UPPER UROWID USER USERENV VALUE VARIANCE +syn keyword plsqlFunction VSIZE WORK XOR +syn match plsqlFunction "\" + +" PL/SQL Exceptions +syn keyword plsqlException ACCESS_INTO_NULL CASE_NOT_FOUND COLLECTION_IS_NULL +syn keyword plsqlException CURSOR_ALREADY_OPEN DUP_VAL_ON_INDEX INVALID_CURSOR +syn keyword plsqlException INVALID_NUMBER LOGIN_DENIED NO_DATA_FOUND +syn keyword plsqlException NOT_LOGGED_ON PROGRAM_ERROR ROWTYPE_MISMATCH +syn keyword plsqlException SELF_IS_NULL STORAGE_ERROR SUBSCRIPT_BEYOND_COUNT +syn keyword plsqlException SUBSCRIPT_OUTSIDE_LIMIT SYS_INVALID_ROWID +syn keyword plsqlException TIMEOUT_ON_RESOURCE TOO_MANY_ROWS VALUE_ERROR +syn keyword plsqlException ZERO_DIVIDE + +" Oracle Pseudo Colums. +syn keyword plsqlPseudo CURRVAL LEVEL NEXTVAL ROWID ROWNUM + +if exists("plsql_highlight_triggers") + syn keyword plsqlTrigger INSERTING UPDATING DELETING +endif + +" Conditionals. +syn keyword plsqlConditional ELSIF ELSE IF +syn match plsqlConditional "\" + +" Loops. +syn keyword plsqlRepeat FOR LOOP WHILE FORALL +syn match plsqlRepeat "\" + +" Various types of comments. +if exists("c_comment_strings") + syntax match plsqlCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region plsqlCommentString contained start=+L\="+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=plsqlCommentSkip + syntax region plsqlComment2String contained start=+L\="+ skip=+\\\\\|\\"+ end=+"+ end="$" + syntax region plsqlCommentL start="--" skip="\\$" end="$" keepend contains=@plsqlCommentGroup,plsqlComment2String,plsqlCharLiteral,plsqlBooleanLiteral,plsqlNumbersCom,plsqlSpaceError + syntax region plsqlComment start="/\*" end="\*/" contains=@plsqlCommentGroup,plsqlComment2String,plsqlCharLiteral,plsqlBooleanLiteral,plsqlNumbersCom,plsqlSpaceError +else + syntax region plsqlCommentL start="--" skip="\\$" end="$" keepend contains=@plsqlCommentGroup,plsqlSpaceError + syntax region plsqlComment start="/\*" end="\*/" contains=@plsqlCommentGroup,plsqlSpaceError +endif + +syn sync ccomment plsqlComment +syn sync ccomment plsqlCommentL + +" To catch unterminated string literals. +syn match plsqlStringError "'.*$" + +" Various types of literals. +syn match plsqlNumbers transparent "\<[+-]\=\d\|[+-]\=\.\d" contains=plsqlIntLiteral,plsqlFloatLiteral +syn match plsqlNumbersCom contained transparent "\<[+-]\=\d\|[+-]\=\.\d" contains=plsqlIntLiteral,plsqlFloatLiteral +syn match plsqlIntLiteral contained "[+-]\=\d\+" +syn match plsqlFloatLiteral contained "[+-]\=\d\+\.\d*" +syn match plsqlFloatLiteral contained "[+-]\=\d*\.\d*" +syn match plsqlCharLiteral "'[^']'" +syn match plsqlStringLiteral "'\([^']\|''\)*'" +syn keyword plsqlBooleanLiteral TRUE FALSE NULL + +" The built-in types. +syn keyword plsqlStorage ANYDATA ANYTYPE BFILE BINARY_INTEGER BLOB BOOLEAN +syn keyword plsqlStorage BYTE CHAR CHARACTER CLOB CURSOR DATE DAY DEC DECIMAL +syn keyword plsqlStorage DOUBLE DSINTERVAL_UNCONSTRAINED FLOAT HOUR +syn keyword plsqlStorage INT INTEGER INTERVAL LOB LONG MINUTE +syn keyword plsqlStorage MLSLABEL MONTH NATURAL NATURALN NCHAR NCHAR_CS NCLOB +syn keyword plsqlStorage NUMBER NUMERIC NVARCHAR PLS_INT PLS_INTEGER +syn keyword plsqlStorage POSITIVE POSITIVEN PRECISION RAW REAL RECORD +syn keyword plsqlStorage SECOND SIGNTYPE SMALLINT STRING SYS_REFCURSOR TABLE TIME +syn keyword plsqlStorage TIMESTAMP TIMESTAMP_UNCONSTRAINED +syn keyword plsqlStorage TIMESTAMP_TZ_UNCONSTRAINED +syn keyword plsqlStorage TIMESTAMP_LTZ_UNCONSTRAINED UROWID VARCHAR +syn keyword plsqlStorage VARCHAR2 YEAR YMINTERVAL_UNCONSTRAINED ZONE + +" A type-attribute is really a type. +syn match plsqlTypeAttribute "%\(TYPE\|ROWTYPE\)\>" + +" All other attributes. +syn match plsqlAttribute "%\(BULK_EXCEPTIONS\|BULK_ROWCOUNT\|ISOPEN\|FOUND\|NOTFOUND\|ROWCOUNT\)\>" + +" This'll catch mis-matched close-parens. +syn cluster plsqlParenGroup contains=plsqlParenError,@plsqlCommentGroup,plsqlCommentSkip,plsqlIntLiteral,plsqlFloatLiteral,plsqlNumbersCom +if exists("c_no_bracket_error") + syn region plsqlParen transparent start='(' end=')' contains=ALLBUT,@plsqlParenGroup + syn match plsqlParenError ")" + syn match plsqlErrInParen contained "[{}]" +else + syn region plsqlParen transparent start='(' end=')' contains=ALLBUT,@plsqlParenGroup,plsqlErrInBracket + syn match plsqlParenError "[\])]" + syn match plsqlErrInParen contained "[{}]" + syn region plsqlBracket transparent start='\[' end=']' contains=ALLBUT,@plsqlParenGroup,plsqlErrInParen + syn match plsqlErrInBracket contained "[);{}]" +endif + +" Syntax Synchronizing +syn sync minlines=10 maxlines=100 + +" Define the default highlighting. +" For version 5.x 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_plsql_syn_inits") + if version < 508 + let did_plsql_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink plsqlAttribute Macro + HiLink plsqlBlockError Error + HiLink plsqlBooleanLiteral Boolean + HiLink plsqlCharLiteral Character + HiLink plsqlComment Comment + HiLink plsqlCommentL Comment + HiLink plsqlConditional Conditional + HiLink plsqlError Error + HiLink plsqlErrInBracket Error + HiLink plsqlErrInBlock Error + HiLink plsqlErrInParen Error + HiLink plsqlException Function + HiLink plsqlFloatLiteral Float + HiLink plsqlFunction Function + HiLink plsqlGarbage Error + HiLink plsqlHostIdentifier Label + HiLink plsqlIdentifier Normal + HiLink plsqlIntLiteral Number + HiLink plsqlOperator Operator + HiLink plsqlParen Normal + HiLink plsqlParenError Error + HiLink plsqlSpaceError Error + HiLink plsqlPseudo PreProc + HiLink plsqlKeyword Keyword + HiLink plsqlRepeat Repeat + HiLink plsqlStorage StorageClass + HiLink plsqlSQLKeyword Function + HiLink plsqlStringError Error + HiLink plsqlStringLiteral String + HiLink plsqlCommentString String + HiLink plsqlComment2String String + HiLink plsqlSymbol Normal + HiLink plsqlTrigger Function + HiLink plsqlTypeAttribute StorageClass + HiLink plsqlTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "plsql" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/po.vim b/vim/bundle/ubuntu-vim72/syntax/po.vim new file mode 100644 index 0000000..459efe6 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/po.vim @@ -0,0 +1,139 @@ +" Vim syntax file +" Language: po (gettext) +" Maintainer: Dwayne Bailey +" Last Change: 2008 Sep 17 +" Contributors: Dwayne Bailey (Most advanced syntax highlighting) +" Leonardo Fontenelle (Spell checking) +" SungHyun Nam (Original maintainer) + +" 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 + +let s:cpo_save = &cpo +set cpo-=C " Allow line continuations + +syn sync minlines=10 + +" Identifiers +syn match poStatementMsgCTxt "^msgctxt" +syn match poStatementMsgidplural "^msgid_plural" contained +syn match poPluralCaseN "[0-9]" contained +syn match poStatementMsgstr "^msgstr\(\[[0-9]\]\)" contains=poPluralCaseN + +" Simple HTML and XML highlighting +syn match poHtml "<\_[^<>]\+>" contains=poHtmlTranslatables,poLineBreak +syn match poHtmlNot +"<[^<]\+>"+ms=s+1,me=e-1 +syn region poHtmlTranslatables start=+\(abbr\|alt\|content\|summary\|standby\|title\)=\\"+ms=e-1 end=+\\"+ contained contains=@Spell +syn match poLineBreak +"\n"+ contained + +" Translation blocks +syn region poMsgCTxt matchgroup=poStatementMsgCTxt start=+^msgctxt "+rs=e-1 matchgroup=poStringCTxt end=+^msgid "+me=s-1 contains=poStringCTxt +syn region poMsgID matchgroup=poStatementMsgid start=+^msgid "+rs=e-1 matchgroup=poStringID end=+^msgstr\(\|\[[\]0\[]\]\) "+me=s-1 contains=poStringID,poStatementMsgidplural,poStatementMsgid +syn region poMsgSTR matchgroup=poStatementMsgstr start=+^msgstr\(\|\[[\]0\[]\]\) "+rs=e-1 matchgroup=poStringSTR end=+\n\n+me=s-1 contains=poStringSTR,poStatementMsgstr +syn region poStringCTxt start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn region poStringID start=+"+ skip=+\\\\\|\\"+ end=+"+ contained + \ contains=poSpecial,poFormat,poCommentKDE,poPluralKDE,poKDEdesktopFile,poHtml,poAcceleratorId,poHtmlNot,poVariable +syn region poStringSTR start=+"+ skip=+\\\\\|\\"+ end=+"+ contained + \ contains=@Spell,poSpecial,poFormat,poHeaderItem,poCommentKDEError,poHeaderUndefined,poPluralKDEError,poMsguniqError,poKDEdesktopFile,poHtml,poAcceleratorStr,poHtmlNot,poVariable + +" Header and Copyright +syn match poHeaderItem "\(Project-Id-Version\|Report-Msgid-Bugs-To\|POT-Creation-Date\|PO-Revision-Date\|Last-Translator\|Language-Team\|MIME-Version\|Content-Type\|Content-Transfer-Encoding\|Plural-Forms\|X-Generator\): " contained +syn match poHeaderUndefined "\(PACKAGE VERSION\|YEAR-MO-DA HO:MI+ZONE\|FULL NAME \|LANGUAGE \|CHARSET\|ENCODING\|INTEGER\|EXPRESSION\)" contained +syn match poCopyrightUnset "SOME DESCRIPTIVE TITLE\|FIRST AUTHOR , YEAR\|Copyright (C) YEAR Free Software Foundation, Inc\|YEAR THE PACKAGE\'S COPYRIGHT HOLDER\|PACKAGE" contained + +" Translation comment block including: translator comment, automatic coments, flags and locations +syn match poComment "^#.*$" +syn keyword poFlagFuzzy fuzzy contained +syn match poCommentTranslator "^# .*$" contains=poCopyrightUnset +syn match poCommentAutomatic "^#\..*$" +syn match poCommentSources "^#:.*$" +syn match poCommentFlags "^#,.*$" contains=poFlagFuzzy + +" Translations (also includes header fields as they appear in a translation msgstr) +syn region poCommentKDE start=+"_: +ms=s+1 end="\\n" end="\"\n^msgstr"me=s-1 contained +syn region poCommentKDEError start=+"\(\|\s\+\)_:+ms=s+1 end="\\n" end=+"\n\n+me=s-1 contained +syn match poPluralKDE +"_n: +ms=s+1 contained +syn region poPluralKDEError start=+"\(\|\s\+\)_n:+ms=s+1 end="\"\n\n"me=s-1 contained +syn match poSpecial contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" +syn match poFormat "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([diuoxXfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained +syn match poFormat "%%" contained + +" msguniq and msgcat conflicts +syn region poMsguniqError matchgroup=poMsguniqErrorMarkers start="#-#-#-#-#" end='#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)\\n' contained + +" Obsolete messages +syn match poObsolete "^#\~.*$" + +" KDE Name= handling +syn match poKDEdesktopFile "\"\(Name\|Comment\|GenericName\|Description\|Keywords\|About\)="ms=s+1,me=e-1 + +" Accelerator keys - this messes up if the preceding or following char is a multibyte unicode char +syn match poAcceleratorId contained "[^&_~][&_~]\(\a\|\d\)[^:]"ms=s+1,me=e-1 +syn match poAcceleratorStr contained "[^&_~][&_~]\(\a\|\d\)[^:]"ms=s+1,me=e-1 contains=@Spell + +" Variables simple +syn match poVariable contained "%\d" + +" 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_po_syn_inits") + if version < 508 + let did_po_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink poCommentSources PreProc + HiLink poComment Comment + HiLink poCommentAutomatic Comment + HiLink poCommentTranslator Comment + HiLink poCommentFlags Special + HiLink poCopyrightUnset Todo + HiLink poFlagFuzzy Todo + HiLink poObsolete Comment + + HiLink poStatementMsgid Statement + HiLink poStatementMsgstr Statement + HiLink poStatementMsgidplural Statement + HiLink poStatementMsgCTxt Statement + HiLink poPluralCaseN Constant + + HiLink poStringCTxt Comment + HiLink poStringID String + HiLink poStringSTR String + HiLink poCommentKDE Comment + HiLink poCommentKDEError Error + HiLink poPluralKDE Comment + HiLink poPluralKDEError Error + HiLink poHeaderItem Identifier + HiLink poHeaderUndefined Todo + HiLink poKDEdesktopFile Identifier + + HiLink poHtml Identifier + HiLink poHtmlNot String + HiLink poHtmlTranslatables String + HiLink poLineBreak String + + HiLink poFormat poSpecial + HiLink poSpecial Special + HiLink poAcceleratorId Special + HiLink poAcceleratorStr Special + HiLink poVariable Special + + HiLink poMsguniqError Special + HiLink poMsguniqErrorMarkers Comment + + delcommand HiLink +endif + +let &cpo = s:cpo_save +let b:current_syntax = "po" + +" vim:set ts=8 sts=2 sw=2 noet: diff --git a/vim/bundle/ubuntu-vim72/syntax/pod.vim b/vim/bundle/ubuntu-vim72/syntax/pod.vim new file mode 100644 index 0000000..9809d00 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/pod.vim @@ -0,0 +1,88 @@ +" Vim syntax file +" Language: Perl POD format +" Maintainer: Scott Bigham +" Last Change: 2007 Jan 21 + +" To add embedded POD documentation highlighting to your syntax file, add +" the commands: +" +" syn include @Pod :p:h/pod.vim +" syn region myPOD start="^=pod" start="^=head" end="^=cut" keepend contained contains=@Pod +" +" and add myPod to the contains= list of some existing region, probably a +" comment. The "keepend" flag is needed because "=cut" is matched as a +" pattern in its own right. + + +" Remove any old syntax stuff hanging around (this is suppressed +" automatically by ":syn include" if necessary). +" 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 + +" POD commands +syn match podCommand "^=head[1234]" nextgroup=podCmdText contains=@NoSpell +syn match podCommand "^=item" nextgroup=podCmdText contains=@NoSpell +syn match podCommand "^=over" nextgroup=podOverIndent skipwhite contains=@NoSpell +syn match podCommand "^=back" contains=@NoSpell +syn match podCommand "^=cut" contains=@NoSpell +syn match podCommand "^=pod" contains=@NoSpell +syn match podCommand "^=for" nextgroup=podForKeywd skipwhite contains=@NoSpell +syn match podCommand "^=begin" nextgroup=podForKeywd skipwhite contains=@NoSpell +syn match podCommand "^=end" nextgroup=podForKeywd skipwhite contains=@NoSpell + +" Text of a =head1, =head2 or =item command +syn match podCmdText ".*$" contained contains=podFormat,@NoSpell + +" Indent amount of =over command +syn match podOverIndent "\d\+" contained contains=@NoSpell + +" Formatter identifier keyword for =for, =begin and =end commands +syn match podForKeywd "\S\+" contained contains=@NoSpell + +" An indented line, to be displayed verbatim +syn match podVerbatimLine "^\s.*$" contains=@NoSpell + +" Inline textual items handled specially by POD +syn match podSpecial "\(\<\|&\)\I\i*\(::\I\i*\)*([^)]*)" contains=@NoSpell +syn match podSpecial "[$@%]\I\i*\(::\I\i*\)*\>" contains=@NoSpell + +" Special formatting sequences +syn region podFormat start="[IBSCLFX]<[^<]"me=e-1 end=">" oneline contains=podFormat,@NoSpell +syn region podFormat start="[IBSCLFX]<<\s" end="\s>>" oneline contains=podFormat,@NoSpell +syn match podFormat "Z<>" +syn match podFormat "E<\(\d\+\|\I\i*\)>" contains=podEscape,podEscape2,@NoSpell +syn match podEscape "\I\i*>"me=e-1 contained contains=@NoSpell +syn match podEscape2 "\d\+>"me=e-1 contained contains=@NoSpell + +" 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_pod_syntax_inits") + if version < 508 + let did_pod_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink podCommand Statement + HiLink podCmdText String + HiLink podOverIndent Number + HiLink podForKeywd Identifier + HiLink podFormat Identifier + HiLink podVerbatimLine PreProc + HiLink podSpecial Identifier + HiLink podEscape String + HiLink podEscape2 Number + + delcommand HiLink +endif + +let b:current_syntax = "pod" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/postscr.vim b/vim/bundle/ubuntu-vim72/syntax/postscr.vim new file mode 100644 index 0000000..fddfe4c --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/postscr.vim @@ -0,0 +1,797 @@ +" Vim syntax file +" Language: PostScript - all Levels, selectable +" Maintainer: Mike Williams +" Filenames: *.ps,*.eps +" Last Change: 31st October 2007 +" URL: http://www.eandem.co.uk/mrw/vim +" +" Options Flags: +" postscr_level - language level to use for highligting (1, 2, or 3) +" postscr_display - include display PS operators +" postscr_ghostscript - include GS extensions +" postscr_fonts - highlight standard font names (a lot for PS 3) +" postscr_encodings - highlight encoding names (there are a lot) +" postscr_andornot_binary - highlight and, or, and not as binary operators (not logical) +" +" 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 + +" PostScript is case sensitive +syn case match + +" Keyword characters - all 7-bit ASCII bar PS delimiters and ws +if version >= 600 + setlocal iskeyword=33-127,^(,^),^<,^>,^[,^],^{,^},^/,^% +else + set iskeyword=33-127,^(,^),^<,^>,^[,^],^{,^},^/,^% +endif + +" Yer trusty old TODO highlghter! +syn keyword postscrTodo contained TODO + +" Comment +syn match postscrComment "%.*$" contains=postscrTodo,@Spell +" DSC comment start line (NB: defines DSC level, not PS level!) +syn match postscrDSCComment "^%!PS-Adobe-\d\+\.\d\+\s*.*$" +" DSC comment line (no check on possible comments - another language!) +syn match postscrDSCComment "^%%\u\+.*$" contains=@postscrString,@postscrNumber,@Spell +" DSC continuation line (no check that previous line is DSC comment) +syn match postscrDSCComment "^%%+ *.*$" contains=@postscrString,@postscrNumber,@Spell + +" Names +syn match postscrName "\k\+" + +" Identifiers +syn match postscrIdentifierError "/\{1,2}[[:space:]\[\]{}]"me=e-1 +syn match postscrIdentifier "/\{1,2}\k\+" contains=postscrConstant,postscrBoolean,postscrCustConstant + +" Numbers +syn case ignore +" In file hex data - usually complete lines +syn match postscrHex "^[[:xdigit:]][[:xdigit:][:space:]]*$" +"syn match postscrHex "\<\x\{2,}\>" +" Integers +syn match postscrInteger "\<[+-]\=\d\+\>" +" Radix +syn match postscrRadix "\d\+#\x\+\>" +" Reals - upper and lower case e is allowed +syn match postscrFloat "[+-]\=\d\+\.\>" +syn match postscrFloat "[+-]\=\d\+\.\d*\(e[+-]\=\d\+\)\=\>" +syn match postscrFloat "[+-]\=\.\d\+\(e[+-]\=\d\+\)\=\>" +syn match postscrFloat "[+-]\=\d\+e[+-]\=\d\+\>" +syn cluster postscrNumber contains=postscrInteger,postscrRadix,postscrFloat +syn case match + +" Escaped characters +syn match postscrSpecialChar contained "\\[nrtbf\\()]" +syn match postscrSpecialCharError contained "\\[^nrtbf\\()]"he=e-1 +" Escaped octal characters +syn match postscrSpecialChar contained "\\\o\{1,3}" + +" Strings +" ASCII strings +syn region postscrASCIIString start=+(+ end=+)+ skip=+([^)]*)+ contains=postscrSpecialChar,postscrSpecialCharError,@Spell +syn match postscrASCIIStringError ")" +" Hex strings +syn match postscrHexCharError contained "[^<>[:xdigit:][:space:]]" +syn region postscrHexString start=+<\($\|[^<]\)+ end=+>+ contains=postscrHexCharError +syn match postscrHexString "<>" +" ASCII85 strings +syn match postscrASCII85CharError contained "[^<>\~!-uz[:space:]]" +syn region postscrASCII85String start=+<\~+ end=+\~>+ contains=postscrASCII85CharError +syn cluster postscrString contains=postscrASCIIString,postscrHexString,postscrASCII85String + + +" Set default highlighting to level 2 - most common at the moment +if !exists("postscr_level") + let postscr_level = 2 +endif + + +" PS level 1 operators - common to all levels (well ...) + +" Stack operators +syn keyword postscrOperator pop exch dup copy index roll clear count mark cleartomark counttomark + +" Math operators +syn keyword postscrMathOperator add div idiv mod mul sub abs neg ceiling floor round truncate sqrt atan cos +syn keyword postscrMathOperator sin exp ln log rand srand rrand + +" Array operators +syn match postscrOperator "[\[\]{}]" +syn keyword postscrOperator array length get put getinterval putinterval astore aload copy +syn keyword postscrRepeat forall + +" Dictionary operators +syn keyword postscrOperator dict maxlength begin end def load store known where currentdict +syn keyword postscrOperator countdictstack dictstack cleardictstack internaldict +syn keyword postscrConstant $error systemdict userdict statusdict errordict + +" String operators +syn keyword postscrOperator string anchorsearch search token + +" Logic operators +syn keyword postscrLogicalOperator eq ne ge gt le lt and not or +if exists("postscr_andornot_binaryop") + syn keyword postscrBinaryOperator and or not +else + syn keyword postscrLogicalOperator and not or +endif +syn keyword postscrBinaryOperator xor bitshift +syn keyword postscrBoolean true false + +" PS Type names +syn keyword postscrConstant arraytype booleantype conditiontype dicttype filetype fonttype gstatetype +syn keyword postscrConstant integertype locktype marktype nametype nulltype operatortype +syn keyword postscrConstant packedarraytype realtype savetype stringtype + +" Control operators +syn keyword postscrConditional if ifelse +syn keyword postscrRepeat for repeat loop +syn keyword postscrOperator exec exit stop stopped countexecstack execstack quit +syn keyword postscrProcedure start + +" Object operators +syn keyword postscrOperator type cvlit cvx xcheck executeonly noaccess readonly rcheck wcheck cvi cvn cvr +syn keyword postscrOperator cvrs cvs + +" File operators +syn keyword postscrOperator file closefile read write readhexstring writehexstring readstring writestring +syn keyword postscrOperator bytesavailable flush flushfile resetfile status run currentfile print +syn keyword postscrOperator stack pstack readline deletefile setfileposition fileposition renamefile +syn keyword postscrRepeat filenameforall +syn keyword postscrProcedure = == + +" VM operators +syn keyword postscrOperator save restore + +" Misc operators +syn keyword postscrOperator bind null usertime executive echo realtime +syn keyword postscrConstant product revision serialnumber version +syn keyword postscrProcedure prompt + +" GState operators +syn keyword postscrOperator gsave grestore grestoreall initgraphics setlinewidth setlinecap currentgray +syn keyword postscrOperator currentlinejoin setmiterlimit currentmiterlimit setdash currentdash setgray +syn keyword postscrOperator sethsbcolor currenthsbcolor setrgbcolor currentrgbcolor currentlinewidth +syn keyword postscrOperator currentlinecap setlinejoin setcmykcolor currentcmykcolor + +" Device gstate operators +syn keyword postscrOperator setscreen currentscreen settransfer currenttransfer setflat currentflat +syn keyword postscrOperator currentblackgeneration setblackgeneration setundercolorremoval +syn keyword postscrOperator setcolorscreen currentcolorscreen setcolortransfer currentcolortransfer +syn keyword postscrOperator currentundercolorremoval + +" Matrix operators +syn keyword postscrOperator matrix initmatrix identmatrix defaultmatrix currentmatrix setmatrix translate +syn keyword postscrOperator concat concatmatrix transform dtransform itransform idtransform invertmatrix +syn keyword postscrOperator scale rotate + +" Path operators +syn keyword postscrOperator newpath currentpoint moveto rmoveto lineto rlineto arc arcn arcto curveto +syn keyword postscrOperator closepath flattenpath reversepath strokepath charpath clippath pathbbox +syn keyword postscrOperator initclip clip eoclip rcurveto +syn keyword postscrRepeat pathforall + +" Painting operators +syn keyword postscrOperator erasepage fill eofill stroke image imagemask colorimage + +" Device operators +syn keyword postscrOperator showpage copypage nulldevice + +" Character operators +syn keyword postscrProcedure findfont +syn keyword postscrConstant FontDirectory ISOLatin1Encoding StandardEncoding +syn keyword postscrOperator definefont scalefont makefont setfont currentfont show ashow +syn keyword postscrOperator stringwidth kshow setcachedevice +syn keyword postscrOperator setcharwidth widthshow awidthshow findencoding cshow rootfont setcachedevice2 + +" Interpreter operators +syn keyword postscrOperator vmstatus cachestatus setcachelimit + +" PS constants +syn keyword postscrConstant contained Gray Red Green Blue All None DeviceGray DeviceRGB + +" PS Filters +syn keyword postscrConstant contained ASCIIHexDecode ASCIIHexEncode ASCII85Decode ASCII85Encode LZWDecode +syn keyword postscrConstant contained RunLengthDecode RunLengthEncode SubFileDecode NullEncode +syn keyword postscrConstant contained GIFDecode PNGDecode LZWEncode + +" PS JPEG filter dictionary entries +syn keyword postscrConstant contained DCTEncode DCTDecode Colors HSamples VSamples QuantTables QFactor +syn keyword postscrConstant contained HuffTables ColorTransform + +" PS CCITT filter dictionary entries +syn keyword postscrConstant contained CCITTFaxEncode CCITTFaxDecode Uncompressed K EndOfLine +syn keyword postscrConstant contained Columns Rows EndOfBlock Blacks1 DamagedRowsBeforeError +syn keyword postscrConstant contained EncodedByteAlign + +" PS Form dictionary entries +syn keyword postscrConstant contained FormType XUID BBox Matrix PaintProc Implementation + +" PS Errors +syn keyword postscrProcedure handleerror +syn keyword postscrConstant contained configurationerror dictfull dictstackunderflow dictstackoverflow +syn keyword postscrConstant contained execstackoverflow interrupt invalidaccess +syn keyword postscrConstant contained invalidcontext invalidexit invalidfileaccess invalidfont +syn keyword postscrConstant contained invalidid invalidrestore ioerror limitcheck nocurrentpoint +syn keyword postscrConstant contained rangecheck stackoverflow stackunderflow syntaxerror timeout +syn keyword postscrConstant contained typecheck undefined undefinedfilename undefinedresource +syn keyword postscrConstant contained undefinedresult unmatchedmark unregistered VMerror + +if exists("postscr_fonts") +" Font names + syn keyword postscrConstant contained Symbol Times-Roman Times-Italic Times-Bold Times-BoldItalic + syn keyword postscrConstant contained Helvetica Helvetica-Oblique Helvetica-Bold Helvetica-BoldOblique + syn keyword postscrConstant contained Courier Courier-Oblique Courier-Bold Courier-BoldOblique +endif + + +if exists("postscr_display") +" Display PS only operators + syn keyword postscrOperator currentcontext fork join detach lock monitor condition wait notify yield + syn keyword postscrOperator viewclip eoviewclip rectviewclip initviewclip viewclippath deviceinfo + syn keyword postscrOperator sethalftonephase currenthalftonephase wtranslation defineusername +endif + +" PS Character encoding names +if exists("postscr_encodings") +" Common encoding names + syn keyword postscrConstant contained .notdef + +" Standard and ISO encoding names + syn keyword postscrConstant contained space exclam quotedbl numbersign dollar percent ampersand quoteright + syn keyword postscrConstant contained parenleft parenright asterisk plus comma hyphen period slash zero + syn keyword postscrConstant contained one two three four five six seven eight nine colon semicolon less + syn keyword postscrConstant contained equal greater question at + syn keyword postscrConstant contained bracketleft backslash bracketright asciicircum underscore quoteleft + syn keyword postscrConstant contained braceleft bar braceright asciitilde + syn keyword postscrConstant contained exclamdown cent sterling fraction yen florin section currency + syn keyword postscrConstant contained quotesingle quotedblleft guillemotleft guilsinglleft guilsinglright + syn keyword postscrConstant contained fi fl endash dagger daggerdbl periodcentered paragraph bullet + syn keyword postscrConstant contained quotesinglbase quotedblbase quotedblright guillemotright ellipsis + syn keyword postscrConstant contained perthousand questiondown grave acute circumflex tilde macron breve + syn keyword postscrConstant contained dotaccent dieresis ring cedilla hungarumlaut ogonek caron emdash + syn keyword postscrConstant contained AE ordfeminine Lslash Oslash OE ordmasculine ae dotlessi lslash + syn keyword postscrConstant contained oslash oe germandbls +" The following are valid names, but are used as short procedure names in generated PS! +" a b c d e f g h i j k l m n o p q r s t u v w x y z +" A B C D E F G H I J K L M N O P Q R S T U V W X Y Z + +" Symbol encoding names + syn keyword postscrConstant contained universal existential suchthat asteriskmath minus + syn keyword postscrConstant contained congruent Alpha Beta Chi Delta Epsilon Phi Gamma Eta Iota theta1 + syn keyword postscrConstant contained Kappa Lambda Mu Nu Omicron Pi Theta Rho Sigma Tau Upsilon sigma1 + syn keyword postscrConstant contained Omega Xi Psi Zeta therefore perpendicular + syn keyword postscrConstant contained radicalex alpha beta chi delta epsilon phi gamma eta iota phi1 + syn keyword postscrConstant contained kappa lambda mu nu omicron pi theta rho sigma tau upsilon omega1 + syn keyword postscrConstant contained Upsilon1 minute lessequal infinity club diamond heart spade + syn keyword postscrConstant contained arrowboth arrowleft arrowup arrowright arrowdown degree plusminus + syn keyword postscrConstant contained second greaterequal multiply proportional partialdiff divide + syn keyword postscrConstant contained notequal equivalence approxequal arrowvertex arrowhorizex + syn keyword postscrConstant contained aleph Ifraktur Rfraktur weierstrass circlemultiply circleplus + syn keyword postscrConstant contained emptyset intersection union propersuperset reflexsuperset notsubset + syn keyword postscrConstant contained propersubset reflexsubset element notelement angle gradient + syn keyword postscrConstant contained registerserif copyrightserif trademarkserif radical dotmath + syn keyword postscrConstant contained logicalnot logicaland logicalor arrowdblboth arrowdblleft arrowdblup + syn keyword postscrConstant contained arrowdblright arrowdbldown omega xi psi zeta similar carriagereturn + syn keyword postscrConstant contained lozenge angleleft registersans copyrightsans trademarksans summation + syn keyword postscrConstant contained parenlefttp parenleftex parenleftbt bracketlefttp bracketleftex + syn keyword postscrConstant contained bracketleftbt bracelefttp braceleftmid braceleftbt braceex euro + syn keyword postscrConstant contained angleright integral integraltp integralex integralbt parenrighttp + syn keyword postscrConstant contained parenrightex parenrightbt bracketrighttp bracketrightex + syn keyword postscrConstant contained bracketrightbt bracerighttp bracerightmid bracerightbt + +" ISO Latin1 encoding names + syn keyword postscrConstant contained brokenbar copyright registered twosuperior threesuperior + syn keyword postscrConstant contained onesuperior onequarter onehalf threequarters + syn keyword postscrConstant contained Agrave Aacute Acircumflex Atilde Adieresis Aring Ccedilla Egrave + syn keyword postscrConstant contained Eacute Ecircumflex Edieresis Igrave Iacute Icircumflex Idieresis + syn keyword postscrConstant contained Eth Ntilde Ograve Oacute Ocircumflex Otilde Odieresis Ugrave Uacute + syn keyword postscrConstant contained Ucircumflex Udieresis Yacute Thorn + syn keyword postscrConstant contained agrave aacute acircumflex atilde adieresis aring ccedilla egrave + syn keyword postscrConstant contained eacute ecircumflex edieresis igrave iacute icircumflex idieresis + syn keyword postscrConstant contained eth ntilde ograve oacute ocircumflex otilde odieresis ugrave uacute + syn keyword postscrConstant contained ucircumflex udieresis yacute thorn ydieresis + syn keyword postscrConstant contained zcaron exclamsmall Hungarumlautsmall dollaroldstyle dollarsuperior + syn keyword postscrConstant contained ampersandsmall Acutesmall parenleftsuperior parenrightsuperior + syn keyword postscrConstant contained twodotenleader onedotenleader zerooldstyle oneoldstyle twooldstyle + syn keyword postscrConstant contained threeoldstyle fouroldstyle fiveoldstyle sixoldstyle sevenoldstyle + syn keyword postscrConstant contained eightoldstyle nineoldstyle commasuperior + syn keyword postscrConstant contained threequartersemdash periodsuperior questionsmall asuperior bsuperior + syn keyword postscrConstant contained centsuperior dsuperior esuperior isuperior lsuperior msuperior + syn keyword postscrConstant contained nsuperior osuperior rsuperior ssuperior tsuperior ff ffi ffl + syn keyword postscrConstant contained parenleftinferior parenrightinferior Circumflexsmall hyphensuperior + syn keyword postscrConstant contained Gravesmall Asmall Bsmall Csmall Dsmall Esmall Fsmall Gsmall Hsmall + syn keyword postscrConstant contained Ismall Jsmall Ksmall Lsmall Msmall Nsmall Osmall Psmall Qsmall + syn keyword postscrConstant contained Rsmall Ssmall Tsmall Usmall Vsmall Wsmall Xsmall Ysmall Zsmall + syn keyword postscrConstant contained colonmonetary onefitted rupiah Tildesmall exclamdownsmall + syn keyword postscrConstant contained centoldstyle Lslashsmall Scaronsmall Zcaronsmall Dieresissmall + syn keyword postscrConstant contained Brevesmall Caronsmall Dotaccentsmall Macronsmall figuredash + syn keyword postscrConstant contained hypheninferior Ogoneksmall Ringsmall Cedillasmall questiondownsmall + syn keyword postscrConstant contained oneeighth threeeighths fiveeighths seveneighths onethird twothirds + syn keyword postscrConstant contained zerosuperior foursuperior fivesuperior sixsuperior sevensuperior + syn keyword postscrConstant contained eightsuperior ninesuperior zeroinferior oneinferior twoinferior + syn keyword postscrConstant contained threeinferior fourinferior fiveinferior sixinferior seveninferior + syn keyword postscrConstant contained eightinferior nineinferior centinferior dollarinferior periodinferior + syn keyword postscrConstant contained commainferior Agravesmall Aacutesmall Acircumflexsmall + syn keyword postscrConstant contained Atildesmall Adieresissmall Aringsmall AEsmall Ccedillasmall + syn keyword postscrConstant contained Egravesmall Eacutesmall Ecircumflexsmall Edieresissmall Igravesmall + syn keyword postscrConstant contained Iacutesmall Icircumflexsmall Idieresissmall Ethsmall Ntildesmall + syn keyword postscrConstant contained Ogravesmall Oacutesmall Ocircumflexsmall Otildesmall Odieresissmall + syn keyword postscrConstant contained OEsmall Oslashsmall Ugravesmall Uacutesmall Ucircumflexsmall + syn keyword postscrConstant contained Udieresissmall Yacutesmall Thornsmall Ydieresissmall Black Bold Book + syn keyword postscrConstant contained Light Medium Regular Roman Semibold + +" Sundry standard and expert encoding names + syn keyword postscrConstant contained trademark Scaron Ydieresis Zcaron scaron softhyphen overscore + syn keyword postscrConstant contained graybox Sacute Tcaron Zacute sacute tcaron zacute Aogonek Scedilla + syn keyword postscrConstant contained Zdotaccent aogonek scedilla Lcaron lcaron zdotaccent Racute Abreve + syn keyword postscrConstant contained Lacute Cacute Ccaron Eogonek Ecaron Dcaron Dcroat Nacute Ncaron + syn keyword postscrConstant contained Ohungarumlaut Rcaron Uring Uhungarumlaut Tcommaaccent racute abreve + syn keyword postscrConstant contained lacute cacute ccaron eogonek ecaron dcaron dcroat nacute ncaron + syn keyword postscrConstant contained ohungarumlaut rcaron uring uhungarumlaut tcommaaccent Gbreve + syn keyword postscrConstant contained Idotaccent gbreve blank apple +endif + + +" By default level 3 includes all level 2 operators +if postscr_level == 2 || postscr_level == 3 +" Dictionary operators + syn match postscrL2Operator "\(<<\|>>\)" + syn keyword postscrL2Operator undef + syn keyword postscrConstant globaldict shareddict + +" Device operators + syn keyword postscrL2Operator setpagedevice currentpagedevice + +" Path operators + syn keyword postscrL2Operator rectclip setbbox uappend ucache upath ustrokepath arct + +" Painting operators + syn keyword postscrL2Operator rectfill rectstroke ufill ueofill ustroke + +" Array operators + syn keyword postscrL2Operator currentpacking setpacking packedarray + +" Misc operators + syn keyword postscrL2Operator languagelevel + +" Insideness operators + syn keyword postscrL2Operator infill ineofill instroke inufill inueofill inustroke + +" GState operators + syn keyword postscrL2Operator gstate setgstate currentgstate setcolor + syn keyword postscrL2Operator setcolorspace currentcolorspace setstrokeadjust currentstrokeadjust + syn keyword postscrL2Operator currentcolor + +" Device gstate operators + syn keyword postscrL2Operator sethalftone currenthalftone setoverprint currentoverprint + syn keyword postscrL2Operator setcolorrendering currentcolorrendering + +" Character operators + syn keyword postscrL2Constant GlobalFontDirectory SharedFontDirectory + syn keyword postscrL2Operator glyphshow selectfont + syn keyword postscrL2Operator addglyph undefinefont xshow xyshow yshow + +" Pattern operators + syn keyword postscrL2Operator makepattern setpattern execform + +" Resource operators + syn keyword postscrL2Operator defineresource undefineresource findresource resourcestatus + syn keyword postscrL2Repeat resourceforall + +" File operators + syn keyword postscrL2Operator filter printobject writeobject setobjectformat currentobjectformat + +" VM operators + syn keyword postscrL2Operator currentshared setshared defineuserobject execuserobject undefineuserobject + syn keyword postscrL2Operator gcheck scheck startjob currentglobal setglobal + syn keyword postscrConstant UserObjects + +" Interpreter operators + syn keyword postscrL2Operator setucacheparams setvmthreshold ucachestatus setsystemparams + syn keyword postscrL2Operator setuserparams currentuserparams setcacheparams currentcacheparams + syn keyword postscrL2Operator currentdevparams setdevparams vmreclaim currentsystemparams + +" PS2 constants + syn keyword postscrConstant contained DeviceCMYK Pattern Indexed Separation Cyan Magenta Yellow Black + syn keyword postscrConstant contained CIEBasedA CIEBasedABC CIEBasedDEF CIEBasedDEFG + +" PS2 $error dictionary entries + syn keyword postscrConstant contained newerror errorname command errorinfo ostack estack dstack + syn keyword postscrConstant contained recordstacks binary + +" PS2 Category dictionary + syn keyword postscrConstant contained DefineResource UndefineResource FindResource ResourceStatus + syn keyword postscrConstant contained ResourceForAll Category InstanceType ResourceFileName + +" PS2 Category names + syn keyword postscrConstant contained Font Encoding Form Pattern ProcSet ColorSpace Halftone + syn keyword postscrConstant contained ColorRendering Filter ColorSpaceFamily Emulator IODevice + syn keyword postscrConstant contained ColorRenderingType FMapType FontType FormType HalftoneType + syn keyword postscrConstant contained ImageType PatternType Category Generic + +" PS2 pagedevice dictionary entries + syn keyword postscrConstant contained PageSize MediaColor MediaWeight MediaType InputAttributes ManualFeed + syn keyword postscrConstant contained OutputType OutputAttributes NumCopies Collate Duplex Tumble + syn keyword postscrConstant contained Separations HWResolution Margins NegativePrint MirrorPrint + syn keyword postscrConstant contained CutMedia AdvanceMedia AdvanceDistance ImagingBBox + syn keyword postscrConstant contained Policies Install BeginPage EndPage PolicyNotFound PolicyReport + syn keyword postscrConstant contained ManualSize OutputFaceUp Jog + syn keyword postscrConstant contained Bind BindDetails Booklet BookletDetails CollateDetails + syn keyword postscrConstant contained DeviceRenderingInfo ExitJamRecovery Fold FoldDetails Laminate + syn keyword postscrConstant contained ManualFeedTimeout Orientation OutputPage + syn keyword postscrConstant contained PostRenderingEnhance PostRenderingEnhanceDetails + syn keyword postscrConstant contained PreRenderingEnhance PreRenderingEnhanceDetails + syn keyword postscrConstant contained Signature SlipSheet Staple StapleDetails Trim + syn keyword postscrConstant contained ProofSet REValue PrintQuality ValuesPerColorComponent AntiAlias + +" PS2 PDL resource entries + syn keyword postscrConstant contained Selector LanguageFamily LanguageVersion + +" PS2 halftone dictionary entries + syn keyword postscrConstant contained HalftoneType HalftoneName + syn keyword postscrConstant contained AccurateScreens ActualAngle Xsquare Ysquare AccurateFrequency + syn keyword postscrConstant contained Frequency SpotFunction Angle Width Height Thresholds + syn keyword postscrConstant contained RedFrequency RedSpotFunction RedAngle RedWidth RedHeight + syn keyword postscrConstant contained GreenFrequency GreenSpotFunction GreenAngle GreenWidth GreenHeight + syn keyword postscrConstant contained BlueFrequency BlueSpotFunction BlueAngle BlueWidth BlueHeight + syn keyword postscrConstant contained GrayFrequency GrayAngle GraySpotFunction GrayWidth GrayHeight + syn keyword postscrConstant contained GrayThresholds BlueThresholds GreenThresholds RedThresholds + syn keyword postscrConstant contained TransferFunction + +" PS2 CSR dictionaries + syn keyword postscrConstant contained RangeA DecodeA MatrixA RangeABC DecodeABC MatrixABC BlackPoint + syn keyword postscrConstant contained RangeLMN DecodeLMN MatrixLMN WhitePoint RangeDEF DecodeDEF RangeHIJ + syn keyword postscrConstant contained RangeDEFG DecodeDEFG RangeHIJK Table + +" PS2 CRD dictionaries + syn keyword postscrConstant contained ColorRenderingType EncodeLMB EncodeABC RangePQR MatrixPQR + syn keyword postscrConstant contained AbsoluteColorimetric RelativeColorimetric Saturation Perceptual + syn keyword postscrConstant contained TransformPQR RenderTable + +" PS2 Pattern dictionary + syn keyword postscrConstant contained PatternType PaintType TilingType XStep YStep + +" PS2 Image dictionary + syn keyword postscrConstant contained ImageType ImageMatrix MultipleDataSources DataSource + syn keyword postscrConstant contained BitsPerComponent Decode Interpolate + +" PS2 Font dictionaries + syn keyword postscrConstant contained FontType FontMatrix FontName FontInfo LanguageLevel WMode Encoding + syn keyword postscrConstant contained UniqueID StrokeWidth Metrics Metrics2 CDevProc CharStrings Private + syn keyword postscrConstant contained FullName Notice version ItalicAngle isFixedPitch UnderlinePosition + syn keyword postscrConstant contained FMapType Encoding FDepVector PrefEnc EscChar ShiftOut ShiftIn + syn keyword postscrConstant contained WeightVector Blend $Blend CIDFontType sfnts CIDSystemInfo CodeMap + syn keyword postscrConstant contained CMap CIDFontName CIDSystemInfo UIDBase CIDDevProc CIDCount + syn keyword postscrConstant contained CIDMapOffset FDArray FDBytes GDBytes GlyphData GlyphDictionary + syn keyword postscrConstant contained SDBytes SubrMapOffset SubrCount BuildGlyph CIDMap FID MIDVector + syn keyword postscrConstant contained Ordering Registry Supplement CMapName CMapVersion UIDOffset + syn keyword postscrConstant contained SubsVector UnderlineThickness FamilyName FontBBox CurMID + syn keyword postscrConstant contained Weight + +" PS2 User paramters + syn keyword postscrConstant contained MaxFontItem MinFontCompress MaxUPathItem MaxFormItem MaxPatternItem + syn keyword postscrConstant contained MaxScreenItem MaxOpStack MaxDictStack MaxExecStack MaxLocalVM + syn keyword postscrConstant contained VMReclaim VMThreshold + +" PS2 System paramters + syn keyword postscrConstant contained SystemParamsPassword StartJobPassword BuildTime ByteOrder RealFormat + syn keyword postscrConstant contained MaxFontCache CurFontCache MaxOutlineCache CurOutlineCache + syn keyword postscrConstant contained MaxUPathCache CurUPathCache MaxFormCache CurFormCache + syn keyword postscrConstant contained MaxPatternCache CurPatternCache MaxScreenStorage CurScreenStorage + syn keyword postscrConstant contained MaxDisplayList CurDisplayList + +" PS2 LZW Filters + syn keyword postscrConstant contained Predictor + +" Paper Size operators + syn keyword postscrL2Operator letter lettersmall legal ledger 11x17 a4 a3 a4small b5 note + +" Paper Tray operators + syn keyword postscrL2Operator lettertray legaltray ledgertray a3tray a4tray b5tray 11x17tray + +" SCC compatibility operators + syn keyword postscrL2Operator sccbatch sccinteractive setsccbatch setsccinteractive + +" Page duplexing operators + syn keyword postscrL2Operator duplexmode firstside newsheet setduplexmode settumble tumble + +" Device compatability operators + syn keyword postscrL2Operator devdismount devformat devmount devstatus + syn keyword postscrL2Repeat devforall + +" Imagesetter compatability operators + syn keyword postscrL2Operator accuratescreens checkscreen pagemargin pageparams setaccuratescreens setpage + syn keyword postscrL2Operator setpagemargin setpageparams + +" Misc compatability operators + syn keyword postscrL2Operator appletalktype buildtime byteorder checkpassword defaulttimeouts diskonline + syn keyword postscrL2Operator diskstatus manualfeed manualfeedtimeout margins mirrorprint pagecount + syn keyword postscrL2Operator pagestackorder printername processcolors sethardwareiomode setjobtimeout + syn keyword postscrL2Operator setpagestockorder setprintername setresolution doprinterrors dostartpage + syn keyword postscrL2Operator hardwareiomode initializedisk jobname jobtimeout ramsize realformat resolution + syn keyword postscrL2Operator setdefaulttimeouts setdoprinterrors setdostartpage setdosysstart + syn keyword postscrL2Operator setuserdiskpercent softwareiomode userdiskpercent waittimeout + syn keyword postscrL2Operator setsoftwareiomode dosysstart emulate setmargins setmirrorprint + +endif " PS2 highlighting + +if postscr_level == 3 +" Shading operators + syn keyword postscrL3Operator setsmoothness currentsmoothness shfill + +" Clip operators + syn keyword postscrL3Operator clipsave cliprestore + +" Pagedevive operators + syn keyword postscrL3Operator setpage setpageparams + +" Device gstate operators + syn keyword postscrL3Operator findcolorrendering + +" Font operators + syn keyword postscrL3Operator composefont + +" PS LL3 Output device resource entries + syn keyword postscrConstant contained DeviceN TrappingDetailsType + +" PS LL3 pagdevice dictionary entries + syn keyword postscrConstant contained DeferredMediaSelection ImageShift InsertSheet LeadingEdge MaxSeparations + syn keyword postscrConstant contained MediaClass MediaPosition OutputDevice PageDeviceName PageOffset ProcessColorModel + syn keyword postscrConstant contained RollFedMedia SeparationColorNames SeparationOrder Trapping TrappingDetails + syn keyword postscrConstant contained TraySwitch UseCIEColor + syn keyword postscrConstant contained ColorantDetails ColorantName ColorantType NeutralDensity TrappingOrder + syn keyword postscrConstant contained ColorantSetName + +" PS LL3 trapping dictionary entries + syn keyword postscrConstant contained BlackColorLimit BlackDensityLimit BlackWidth ColorantZoneDetails + syn keyword postscrConstant contained SlidingTrapLimit StepLimit TrapColorScaling TrapSetName TrapWidth + syn keyword postscrConstant contained ImageResolution ImageToObjectTrapping ImageTrapPlacement + syn keyword postscrConstant contained StepLimit TrapColorScaling Enabled ImageInternalTrapping + +" PS LL3 filters and entries + syn keyword postscrConstant contained ReusableStreamDecode CloseSource CloseTarget UnitSize LowBitFirst + syn keyword postscrConstant contained FlateEncode FlateDecode DecodeParams Intent AsyncRead + +" PS LL3 halftone dictionary entries + syn keyword postscrConstant contained Height2 Width2 + +" PS LL3 function dictionary entries + syn keyword postscrConstant contained FunctionType Domain Range Order BitsPerSample Encode Size C0 C1 N + syn keyword postscrConstant contained Functions Bounds + +" PS LL3 image dictionary entries + syn keyword postscrConstant contained InterleaveType MaskDict DataDict MaskColor + +" PS LL3 Pattern and shading dictionary entries + syn keyword postscrConstant contained Shading ShadingType Background ColorSpace Coords Extend Function + syn keyword postscrConstant contained VerticesPerRow BitsPerCoordinate BitsPerFlag + +" PS LL3 image dictionary entries + syn keyword postscrConstant contained XOrigin YOrigin UnpaintedPath PixelCopy + +" PS LL3 colorrendering procedures + syn keyword postscrProcedure GetHalftoneName GetPageDeviceName GetSubstituteCRD + +" PS LL3 CIDInit procedures + syn keyword postscrProcedure beginbfchar beginbfrange begincidchar begincidrange begincmap begincodespacerange + syn keyword postscrProcedure beginnotdefchar beginnotdefrange beginrearrangedfont beginusematrix + syn keyword postscrProcedure endbfchar endbfrange endcidchar endcidrange endcmap endcodespacerange + syn keyword postscrProcedure endnotdefchar endnotdefrange endrearrangedfont endusematrix + syn keyword postscrProcedure StartData usefont usecmp + +" PS LL3 Trapping procedures + syn keyword postscrProcedure settrapparams currenttrapparams settrapzone + +" PS LL3 BitmapFontInit procedures + syn keyword postscrProcedure removeall removeglyphs + +" PS LL3 Font names + if exists("postscr_fonts") + syn keyword postscrConstant contained AlbertusMT AlbertusMT-Italic AlbertusMT-Light Apple-Chancery Apple-ChanceryCE + syn keyword postscrConstant contained AntiqueOlive-Roman AntiqueOlive-Italic AntiqueOlive-Bold AntiqueOlive-Compact + syn keyword postscrConstant contained AntiqueOliveCE-Roman AntiqueOliveCE-Italic AntiqueOliveCE-Bold AntiqueOliveCE-Compact + syn keyword postscrConstant contained ArialMT Arial-ItalicMT Arial-LightMT Arial-BoldMT Arial-BoldItalicMT + syn keyword postscrConstant contained ArialCE ArialCE-Italic ArialCE-Light ArialCE-Bold ArialCE-BoldItalic + syn keyword postscrConstant contained AvantGarde-Book AvantGarde-BookOblique AvantGarde-Demi AvantGarde-DemiOblique + syn keyword postscrConstant contained AvantGardeCE-Book AvantGardeCE-BookOblique AvantGardeCE-Demi AvantGardeCE-DemiOblique + syn keyword postscrConstant contained Bodoni Bodoni-Italic Bodoni-Bold Bodoni-BoldItalic Bodoni-Poster Bodoni-PosterCompressed + syn keyword postscrConstant contained BodoniCE BodoniCE-Italic BodoniCE-Bold BodoniCE-BoldItalic BodoniCE-Poster BodoniCE-PosterCompressed + syn keyword postscrConstant contained Bookman-Light Bookman-LightItalic Bookman-Demi Bookman-DemiItalic + syn keyword postscrConstant contained BookmanCE-Light BookmanCE-LightItalic BookmanCE-Demi BookmanCE-DemiItalic + syn keyword postscrConstant contained Carta Chicago ChicagoCE Clarendon Clarendon-Light Clarendon-Bold + syn keyword postscrConstant contained ClarendonCE ClarendonCE-Light ClarendonCE-Bold CooperBlack CooperBlack-Italic + syn keyword postscrConstant contained Copperplate-ThirtyTwoBC CopperPlate-ThirtyThreeBC Coronet-Regular CoronetCE-Regular + syn keyword postscrConstant contained CourierCE CourierCE-Oblique CourierCE-Bold CourierCE-BoldOblique + syn keyword postscrConstant contained Eurostile Eurostile-Bold Eurostile-ExtendedTwo Eurostile-BoldExtendedTwo + syn keyword postscrConstant contained Eurostile EurostileCE-Bold EurostileCE-ExtendedTwo EurostileCE-BoldExtendedTwo + syn keyword postscrConstant contained Geneva GenevaCE GillSans GillSans-Italic GillSans-Bold GillSans-BoldItalic GillSans-BoldCondensed + syn keyword postscrConstant contained GillSans-Light GillSans-LightItalic GillSans-ExtraBold + syn keyword postscrConstant contained GillSansCE-Roman GillSansCE-Italic GillSansCE-Bold GillSansCE-BoldItalic GillSansCE-BoldCondensed + syn keyword postscrConstant contained GillSansCE-Light GillSansCE-LightItalic GillSansCE-ExtraBold + syn keyword postscrConstant contained Goudy Goudy-Italic Goudy-Bold Goudy-BoldItalic Goudy-ExtraBould + syn keyword postscrConstant contained HelveticaCE HelveticaCE-Oblique HelveticaCE-Bold HelveticaCE-BoldOblique + syn keyword postscrConstant contained Helvetica-Condensed Helvetica-Condensed-Oblique Helvetica-Condensed-Bold Helvetica-Condensed-BoldObl + syn keyword postscrConstant contained HelveticaCE-Condensed HelveticaCE-Condensed-Oblique HelveticaCE-Condensed-Bold + syn keyword postscrConstant contained HelveticaCE-Condensed-BoldObl Helvetica-Narrow Helvetica-Narrow-Oblique Helvetica-Narrow-Bold + syn keyword postscrConstant contained Helvetica-Narrow-BoldOblique HelveticaCE-Narrow HelveticaCE-Narrow-Oblique HelveticaCE-Narrow-Bold + syn keyword postscrConstant contained HelveticaCE-Narrow-BoldOblique HoeflerText-Regular HoeflerText-Italic HoeflerText-Black + syn keyword postscrConstant contained HoeflerText-BlackItalic HoeflerText-Ornaments HoeflerTextCE-Regular HoeflerTextCE-Italic + syn keyword postscrConstant contained HoeflerTextCE-Black HoeflerTextCE-BlackItalic + syn keyword postscrConstant contained JoannaMT JoannaMT-Italic JoannaMT-Bold JoannaMT-BoldItalic + syn keyword postscrConstant contained JoannaMTCE JoannaMTCE-Italic JoannaMTCE-Bold JoannaMTCE-BoldItalic + syn keyword postscrConstant contained LetterGothic LetterGothic-Slanted LetterGothic-Bold LetterGothic-BoldSlanted + syn keyword postscrConstant contained LetterGothicCE LetterGothicCE-Slanted LetterGothicCE-Bold LetterGothicCE-BoldSlanted + syn keyword postscrConstant contained LubalinGraph-Book LubalinGraph-BookOblique LubalinGraph-Demi LubalinGraph-DemiOblique + syn keyword postscrConstant contained LubalinGraphCE-Book LubalinGraphCE-BookOblique LubalinGraphCE-Demi LubalinGraphCE-DemiOblique + syn keyword postscrConstant contained Marigold Monaco MonacoCE MonaLisa-Recut Oxford Symbol Tekton + syn keyword postscrConstant contained NewCennturySchlbk-Roman NewCenturySchlbk-Italic NewCenturySchlbk-Bold NewCenturySchlbk-BoldItalic + syn keyword postscrConstant contained NewCenturySchlbkCE-Roman NewCenturySchlbkCE-Italic NewCenturySchlbkCE-Bold + syn keyword postscrConstant contained NewCenturySchlbkCE-BoldItalic NewYork NewYorkCE + syn keyword postscrConstant contained Optima Optima-Italic Optima-Bold Optima-BoldItalic + syn keyword postscrConstant contained OptimaCE OptimaCE-Italic OptimaCE-Bold OptimaCE-BoldItalic + syn keyword postscrConstant contained Palatino-Roman Palatino-Italic Palatino-Bold Palatino-BoldItalic + syn keyword postscrConstant contained PalatinoCE-Roman PalatinoCE-Italic PalatinoCE-Bold PalatinoCE-BoldItalic + syn keyword postscrConstant contained StempelGaramond-Roman StempelGaramond-Italic StempelGaramond-Bold StempelGaramond-BoldItalic + syn keyword postscrConstant contained StempelGaramondCE-Roman StempelGaramondCE-Italic StempelGaramondCE-Bold StempelGaramondCE-BoldItalic + syn keyword postscrConstant contained TimesCE-Roman TimesCE-Italic TimesCE-Bold TimesCE-BoldItalic + syn keyword postscrConstant contained TimesNewRomanPSMT TimesNewRomanPS-ItalicMT TimesNewRomanPS-BoldMT TimesNewRomanPS-BoldItalicMT + syn keyword postscrConstant contained TimesNewRomanCE TimesNewRomanCE-Italic TimesNewRomanCE-Bold TimesNewRomanCE-BoldItalic + syn keyword postscrConstant contained Univers Univers-Oblique Univers-Bold Univers-BoldOblique + syn keyword postscrConstant contained UniversCE-Medium UniversCE-Oblique UniversCE-Bold UniversCE-BoldOblique + syn keyword postscrConstant contained Univers-Light Univers-LightOblique UniversCE-Light UniversCE-LightOblique + syn keyword postscrConstant contained Univers-Condensed Univers-CondensedOblique Univers-CondensedBold Univers-CondensedBoldOblique + syn keyword postscrConstant contained UniversCE-Condensed UniversCE-CondensedOblique UniversCE-CondensedBold UniversCE-CondensedBoldOblique + syn keyword postscrConstant contained Univers-Extended Univers-ExtendedObl Univers-BoldExt Univers-BoldExtObl + syn keyword postscrConstant contained UniversCE-Extended UniversCE-ExtendedObl UniversCE-BoldExt UniversCE-BoldExtObl + syn keyword postscrConstant contained Wingdings-Regular ZapfChancery-MediumItalic ZapfChanceryCE-MediumItalic ZapfDingBats + endif " Font names + +endif " PS LL3 highlighting + + +if exists("postscr_ghostscript") + " GS gstate operators + syn keyword postscrGSOperator .setaccuratecurves .currentaccuratecurves .setclipoutside + syn keyword postscrGSOperator .setdashadapt .currentdashadapt .setdefaultmatrix .setdotlength + syn keyword postscrGSOperator .currentdotlength .setfilladjust2 .currentfilladjust2 + syn keyword postscrGSOperator .currentclipoutside .setcurvejoin .currentcurvejoin + syn keyword postscrGSOperator .setblendmode .currentblendmode .setopacityalpha .currentopacityalpha .setshapealpha .currentshapealpha + syn keyword postscrGSOperator .setlimitclamp .currentlimitclamp .setoverprintmode .currentoverprintmode + + " GS path operators + syn keyword postscrGSOperator .dashpath .rectappend + + " GS painting operators + syn keyword postscrGSOperator .setrasterop .currentrasterop .setsourcetransparent + syn keyword postscrGSOperator .settexturetransparent .currenttexturetransparent + syn keyword postscrGSOperator .currentsourcetransparent + + " GS character operators + syn keyword postscrGSOperator .charboxpath .type1execchar %Type1BuildChar %Type1BuildGlyph + + " GS mathematical operators + syn keyword postscrGSMathOperator arccos arcsin + + " GS dictionary operators + syn keyword postscrGSOperator .dicttomark .forceput .forceundef .knownget .setmaxlength + + " GS byte and string operators + syn keyword postscrGSOperator .type1encrypt .type1decrypt + syn keyword postscrGSOperator .bytestring .namestring .stringmatch + + " GS relational operators (seem like math ones to me!) + syn keyword postscrGSMathOperator max min + + " GS file operators + syn keyword postscrGSOperator findlibfile unread writeppmfile + syn keyword postscrGSOperator .filename .fileposition .peekstring .unread + + " GS vm operators + syn keyword postscrGSOperator .forgetsave + + " GS device operators + syn keyword postscrGSOperator copydevice .getdevice makeimagedevice makewordimagedevice copyscanlines + syn keyword postscrGSOperator setdevice currentdevice getdeviceprops putdeviceprops flushpage + syn keyword postscrGSOperator finddevice findprotodevice .getbitsrect + + " GS misc operators + syn keyword postscrGSOperator getenv .makeoperator .setdebug .oserrno .oserror .execn + + " GS rendering stack operators + syn keyword postscrGSOperator .begintransparencygroup .discardtransparencygroup .endtransparencygroup + syn keyword postscrGSOperator .begintransparencymask .discardtransparencymask .endtransparencymask .inittransparencymask + syn keyword postscrGSOperator .settextknockout .currenttextknockout + + " GS filters + syn keyword postscrConstant contained BCPEncode BCPDecode eexecEncode eexecDecode PCXDecode + syn keyword postscrConstant contained PixelDifferenceEncode PixelDifferenceDecode + syn keyword postscrConstant contained PNGPredictorDecode TBCPEncode TBCPDecode zlibEncode + syn keyword postscrConstant contained zlibDecode PNGPredictorEncode PFBDecode + syn keyword postscrConstant contained MD5Encode + + " GS filter keys + syn keyword postscrConstant contained InitialCodeLength FirstBitLowOrder BlockData DecodedByteAlign + + " GS device parameters + syn keyword postscrConstant contained BitsPerPixel .HWMargins HWSize Name GrayValues + syn keyword postscrConstant contained ColorValues TextAlphaBits GraphicsAlphaBits BufferSpace + syn keyword postscrConstant contained OpenOutputFile PageCount BandHeight BandWidth BandBufferSpace + syn keyword postscrConstant contained ViewerPreProcess GreenValues BlueValues OutputFile + syn keyword postscrConstant contained MaxBitmap RedValues + +endif " GhostScript highlighting + +" 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_postscr_syntax_inits") + if version < 508 + let did_postscr_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink postscrComment Comment + + HiLink postscrConstant Constant + HiLink postscrString String + HiLink postscrASCIIString postscrString + HiLink postscrHexString postscrString + HiLink postscrASCII85String postscrString + HiLink postscrNumber Number + HiLink postscrInteger postscrNumber + HiLink postscrHex postscrNumber + HiLink postscrRadix postscrNumber + HiLink postscrFloat Float + HiLink postscrBoolean Boolean + + HiLink postscrIdentifier Identifier + HiLink postscrProcedure Function + + HiLink postscrName Statement + HiLink postscrConditional Conditional + HiLink postscrRepeat Repeat + HiLink postscrL2Repeat postscrRepeat + HiLink postscrOperator Operator + HiLink postscrL1Operator postscrOperator + HiLink postscrL2Operator postscrOperator + HiLink postscrL3Operator postscrOperator + HiLink postscrMathOperator postscrOperator + HiLink postscrLogicalOperator postscrOperator + HiLink postscrBinaryOperator postscrOperator + + HiLink postscrDSCComment SpecialComment + HiLink postscrSpecialChar SpecialChar + + HiLink postscrTodo Todo + + HiLink postscrError Error + HiLink postscrSpecialCharError postscrError + HiLink postscrASCII85CharError postscrError + HiLink postscrHexCharError postscrError + HiLink postscrASCIIStringError postscrError + HiLink postscrIdentifierError postscrError + + if exists("postscr_ghostscript") + HiLink postscrGSOperator postscrOperator + HiLink postscrGSMathOperator postscrMathOperator + else + HiLink postscrGSOperator postscrError + HiLink postscrGSMathOperator postscrError + endif + + delcommand HiLink +endif + +let b:current_syntax = "postscr" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/pov.vim b/vim/bundle/ubuntu-vim72/syntax/pov.vim new file mode 100644 index 0000000..700bb31 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/pov.vim @@ -0,0 +1,144 @@ +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: PoV-Ray(tm) 3.5 Scene Description Language +" Maintainer: David Ne\v{c}as (Yeti) +" Last Change: 2003 Apr 25 +" URL: http://physics.muni.cz/~yeti/download/syntax/pov.vim +" Required Vim Version: 6.0 + +" Setup +if version >= 600 + " Quit when a syntax file was already loaded + if exists("b:current_syntax") + finish + endif +else + " Croak when an old Vim is sourcing us. + echo "Sorry, but this syntax file relies on Vim 6 features. Either upgrade Vim or use a version of " . expand(":t:r") . " syntax file appropriate for Vim " . version/100 . "." . version %100 . "." + finish +endif + +syn case match + +" Top level stuff +syn keyword povCommands global_settings +syn keyword povObjects array atmosphere background bicubic_patch blob box camera component cone cubic cylinder disc fog height_field isosurface julia_fractal lathe light_group light_source mesh mesh2 object parametric pattern photons plane poly polygon prism quadric quartic rainbow sky_sphere smooth_triangle sor sphere sphere_sweep spline superellipsoid text torus triangle +syn keyword povCSG clipped_by composite contained_by difference intersection merge union +syn keyword povAppearance interior material media texture interior_texture texture_list +syn keyword povGlobalSettings ambient_light assumed_gamma charset hf_gray_16 irid_wavelength max_intersections max_trace_level number_of_waves radiosity noise_generator +syn keyword povTransform inverse matrix rotate scale translate transform + +" Descriptors +syn keyword povDescriptors finish normal pigment uv_mapping uv_vectors vertex_vectors +syn keyword povDescriptors adc_bailout always_sample brightness count error_bound distance_maximum gray_threshold load_file low_error_factor max_sample media minimum_reuse nearest_count normal pretrace_end pretrace_start recursion_limit save_file +syn keyword povDescriptors color colour gray rgb rgbt rgbf rgbft red green blue +syn keyword povDescriptors bump_map color_map colour_map image_map material_map pigment_map quick_color quick_colour normal_map texture_map image_pattern pigment_pattern +syn keyword povDescriptors ambient brilliance conserve_energy crand diffuse fresnel irid metallic phong phong_size refraction reflection reflection_exponent roughness specular +syn keyword povDescriptors cylinder fisheye omnimax orthographic panoramic perspective spherical ultra_wide_angle +syn keyword povDescriptors agate average brick boxed bozo bumps cells checker crackle cylindrical dents facets function gradient granite hexagon julia leopard magnet mandel marble onion planar quilted radial ripples slope spherical spiral1 spiral2 spotted tiles tiles2 toroidal waves wood wrinkles +syn keyword povDescriptors density_file +syn keyword povDescriptors area_light shadowless spotlight parallel +syn keyword povDescriptors absorption confidence density emission intervals ratio samples scattering variance +syn keyword povDescriptors distance fog_alt fog_offset fog_type turb_depth +syn keyword povDescriptors b_spline bezier_spline cubic_spline evaluate face_indices form linear_spline max_gradient natural_spline normal_indices normal_vectors quadratic_spline uv_indices +syn keyword povDescriptors target + +" Modifiers +syn keyword povModifiers caustics dispersion dispersion_samples fade_color fade_colour fade_distance fade_power ior +syn keyword povModifiers bounded_by double_illuminate hierarchy hollow no_shadow open smooth sturm threshold water_level +syn keyword povModifiers hypercomplex max_iteration precision quaternion slice +syn keyword povModifiers conic_sweep linear_sweep +syn keyword povModifiers flatness type u_steps v_steps +syn keyword povModifiers aa_level aa_threshold adaptive falloff jitter looks_like media_attenuation media_interaction method point_at radius tightness +syn keyword povModifiers angle aperture blur_samples confidence direction focal_point h_angle location look_at right sky up v_angle variance +syn keyword povModifiers all bump_size filter interpolate map_type once slope_map transmit use_alpha use_color use_colour use_index +syn keyword povModifiers black_hole agate_turb brick_size control0 control1 cubic_wave density_map flip frequency interpolate inverse lambda metric mortar octaves offset omega phase poly_wave ramp_wave repeat scallop_wave sine_wave size strength triangle_wave thickness turbulence turb_depth type warp +syn keyword povModifiers eccentricity extinction +syn keyword povModifiers arc_angle falloff_angle width +syn keyword povModifiers accuracy all_intersections altitude autostop circular collect coords cutaway_textures dist_exp expand_thresholds exponent exterior gather global_lights major_radius max_trace no_bump_scale no_image no_reflection orient orientation pass_through precompute projected_through range_divider solid spacing split_union tolerance + +" Words not marked `reserved' in documentation, but... +syn keyword povBMPType alpha gif iff jpeg pgm png pot ppm sys tga tiff contained +syn keyword povFontType ttf contained +syn keyword povDensityType df3 contained +syn keyword povCharset ascii utf8 contained + +" Math functions on floats, vectors and strings +syn keyword povFunctions abs acos acosh asc asin asinh atan atan2 atanh ceil cos cosh defined degrees dimensions dimension_size div exp file_exists floor int internal ln log max min mod pow radians rand seed select sin sinh sqrt strcmp strlen tan tanh val vdot vlength vstr vturbulence +syn keyword povFunctions min_extent max_extent trace vcross vrotate vaxis_rotate vnormalize vturbulence +syn keyword povFunctions chr concat substr str strupr strlwr +syn keyword povJuliaFunctions acosh asinh atan cosh cube pwr reciprocal sinh sqr tanh + +" Specialities +syn keyword povConsts clock clock_delta clock_on final_clock final_frame frame_number initial_clock initial_frame image_width image_height false no off on pi t true u v version x y yes z +syn match povDotItem "\.\@<=\(blue\|green\|filter\|red\|transmit\|t\|u\|v\|x\|y\|z\)\>" display + +" Comments +syn region povComment start="/\*" end="\*/" contains=povTodo,povComment +syn match povComment "//.*" contains=povTodo +syn match povCommentError "\*/" +syn sync ccomment povComment +syn sync minlines=50 +syn keyword povTodo TODO FIXME XXX NOT contained +syn cluster povPRIVATE add=povTodo + +" Language directives +syn match povConditionalDir "#\s*\(else\|end\|if\|ifdef\|ifndef\|switch\|while\)\>" +syn match povLabelDir "#\s*\(break\|case\|default\|range\)\>" +syn match povDeclareDir "#\s*\(declare\|default\|local\|macro\|undef\|version\)\>" +syn match povIncludeDir "#\s*include\>" +syn match povFileDir "#\s*\(fclose\|fopen\|read\|write\)\>" +syn match povMessageDir "#\s*\(debug\|error\|render\|statistics\|warning\)\>" +syn region povFileOpen start="#\s*fopen\>" skip=+"[^"]*"+ matchgroup=povOpenType end="\<\(read\|write\|append\)\>" contains=ALLBUT,PovParenError,PovBraceError,@PovPRIVATE transparent keepend + +" Literal strings +syn match povSpecialChar "\\\d\d\d\|\\." contained +syn region povString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=povSpecialChar oneline +syn cluster povPRIVATE add=povSpecialChar + +" Catch errors caused by wrong parenthesization +syn region povParen start='(' end=')' contains=ALLBUT,povParenError,@povPRIVATE transparent +syn match povParenError ")" +syn region povBrace start='{' end='}' contains=ALLBUT,povBraceError,@povPRIVATE transparent +syn match povBraceError "}" + +" Numbers +syn match povNumber "\(^\|\W\)\@<=[+-]\=\(\d\+\)\=\.\=\d\+\([eE][+-]\=\d\+\)\=" + +" Define the default highlighting +hi def link povComment Comment +hi def link povTodo Todo +hi def link povNumber Number +hi def link povString String +hi def link povFileOpen Constant +hi def link povConsts Constant +hi def link povDotItem Constant +hi def link povBMPType povSpecial +hi def link povCharset povSpecial +hi def link povDensityType povSpecial +hi def link povFontType povSpecial +hi def link povOpenType povSpecial +hi def link povSpecialChar povSpecial +hi def link povSpecial Special +hi def link povConditionalDir PreProc +hi def link povLabelDir PreProc +hi def link povDeclareDir Define +hi def link povIncludeDir Include +hi def link povFileDir PreProc +hi def link povMessageDir Debug +hi def link povAppearance povDescriptors +hi def link povObjects povDescriptors +hi def link povGlobalSettings povDescriptors +hi def link povDescriptors Type +hi def link povJuliaFunctions PovFunctions +hi def link povModifiers povFunctions +hi def link povFunctions Function +hi def link povCommands Operator +hi def link povTransform Operator +hi def link povCSG Operator +hi def link povParenError povError +hi def link povBraceError povError +hi def link povCommentError povError +hi def link povError Error + +let b:current_syntax = "pov" diff --git a/vim/bundle/ubuntu-vim72/syntax/povini.vim b/vim/bundle/ubuntu-vim72/syntax/povini.vim new file mode 100644 index 0000000..02169ea --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/povini.vim @@ -0,0 +1,62 @@ +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: PoV-Ray(tm) 3.5 configuration/initialization files +" Maintainer: David Ne\v{c}as (Yeti) +" Last Change: 2002-06-01 +" URL: http://physics.muni.cz/~yeti/download/syntax/povini.vim +" Required Vim Version: 6.0 + +" Setup +if version >= 600 + " Quit when a syntax file was already loaded + if exists("b:current_syntax") + finish + endif +else + " Croak when an old Vim is sourcing us. + echo "Sorry, but this syntax file relies on Vim 6 features. Either upgrade Vim or usea version of " . expand(":t:r") . " syntax file appropriate for Vim " . version/100 . "." . version %100 . "." + finish +endif + +syn case ignore + +" Syntax +syn match poviniInclude "^\s*[^[+-;]\S*\s*$" contains=poviniSection +syn match poviniLabel "^.\{-1,}\ze=" transparent contains=poviniKeyword nextgroup=poviniBool,poviniNumber +syn keyword poviniBool On Off True False Yes No +syn match poviniNumber "\<\d*\.\=\d\+\>" +syn keyword poviniKeyword Clock Initial_Frame Final_Frame Initial_Clock Final_Clock Subset_Start_Frame Subset_End_Frame Cyclic_Animation Field_Render Odd_Field +syn keyword poviniKeyword Width Height Start_Column Start_Row End_Column End_Row Test_Abort Test_Abort_Count Continue_Trace Create_Ini +syn keyword poviniKeyword Display Video_Mode Palette Display_Gamma Pause_When_Done Verbose Draw_Vistas Preview_Start_Size Preview_End_Size +syn keyword poviniKeyword Output_to_File Output_File_Type Output_Alpha Bits_Per_Color Output_File_Name Buffer_Output Buffer_Size +syn keyword poviniKeyword Histogram_Type Histogram_Grid_Size Histogram_Name +syn keyword poviniKeyword Input_File_Name Include_Header Library_Path Version +syn keyword poviniKeyword Debug_Console Fatal_Console Render_Console Statistic_Console Warning_Console All_Console Debug_File Fatal_File Render_File Statistic_File Warning_File All_File Warning_Level +syn keyword poviniKeyword Quality Radiosity Bounding Bounding_Threshold Light_Buffer Vista_Buffer Remove_Bounds Split_Unions Antialias Sampling_Method Antialias_Threshold Jitter Jitter_Amount Antialias_Depth +syn keyword poviniKeyword Pre_Scene_Return Pre_Frame_Return Post_Scene_Return Post_Frame_Return User_Abort_Return Fatal_Error_Return +syn match poviniShellOut "^\s*\(Pre_Scene_Command\|Pre_Frame_Command\|Post_Scene_Command\|Post_Frame_Command\|User_Abort_Command\|Fatal_Error_Command\)\>" nextgroup=poviniShellOutEq skipwhite +syn match poviniShellOutEq "=" nextgroup=poviniShellOutRHS skipwhite contained +syn match poviniShellOutRHS "[^;]\+" skipwhite contained contains=poviniShellOutSpecial +syn match poviniShellOutSpecial "%[osnkhw%]" contained +syn keyword poviniDeclare Declare +syn match poviniComment ";.*$" +syn match poviniOption "^\s*[+-]\S*" +syn match poviniIncludeLabel "^\s*Include_INI\s*=" nextgroup=poviniIncludedFile skipwhite +syn match poviniIncludedFile "[^;]\+" contains=poviniSection contained +syn region poviniSection start="\[" end="\]" + +" Define the default highlighting +hi def link poviniSection Special +hi def link poviniComment Comment +hi def link poviniDeclare poviniKeyword +hi def link poviniShellOut poviniKeyword +hi def link poviniIncludeLabel poviniKeyword +hi def link poviniKeyword Type +hi def link poviniShellOutSpecial Special +hi def link poviniIncludedFile poviniInclude +hi def link poviniInclude Include +hi def link poviniOption Keyword +hi def link poviniBool Constant +hi def link poviniNumber Number + +let b:current_syntax = "povini" diff --git a/vim/bundle/ubuntu-vim72/syntax/ppd.vim b/vim/bundle/ubuntu-vim72/syntax/ppd.vim new file mode 100644 index 0000000..192f70c --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/ppd.vim @@ -0,0 +1,48 @@ +" Vim syntax file +" Language: PPD (PostScript printer description) file +" Maintainer: Bjoern Jacke +" Last Change: 2001-10-06 + +" 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 match ppdComment "^\*%.*" +syn match ppdDef "\*[a-zA-Z0-9]\+" +syn match ppdDefine "\*[a-zA-Z0-9\-_]\+:" +syn match ppdUI "\*[a-zA-Z]*\(Open\|Close\)UI" +syn match ppdUIGroup "\*[a-zA-Z]*\(Open\|Close\)Group" +syn match ppdGUIText "/.*:" +syn match ppdContraints "^*UIConstraints:" + +" 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_ahdl_syn_inits") + if version < 508 + let did_ahdl_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + + HiLink ppdComment Comment + HiLink ppdDefine Statement + HiLink ppdUI Function + HiLink ppdUIGroup Function + HiLink ppdDef String + HiLink ppdGUIText Type + HiLink ppdContraints Special + + delcommand HiLink +endif + +let b:current_syntax = "ppd" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/ppwiz.vim b/vim/bundle/ubuntu-vim72/syntax/ppwiz.vim new file mode 100644 index 0000000..d3d7b3a --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/ppwiz.vim @@ -0,0 +1,97 @@ +" Vim syntax file +" Language: PPWizard (preprocessor by Dennis Bareis) +" Maintainer: Stefan Schwarzer +" URL: http://www.ndh.net/home/sschwarzer/download/ppwiz.vim +" Last Change: 2003 May 11 +" Filename: ppwiz.vim + +" Remove old syntax stuff +" 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 + +if !exists("ppwiz_highlight_defs") + let ppwiz_highlight_defs = 1 +endif + +if !exists("ppwiz_with_html") + let ppwiz_with_html = 1 +endif + +" comments +syn match ppwizComment "^;.*$" +syn match ppwizComment ";;.*$" +" HTML +if ppwiz_with_html > 0 + syn region ppwizHTML start="<" end=">" contains=ppwizArg,ppwizMacro + syn match ppwizHTML "\&\w\+;" +endif +" define, evaluate etc. +if ppwiz_highlight_defs == 1 + syn match ppwizDef "^\s*\#\S\+\s\+\S\+" contains=ALL + syn match ppwizDef "^\s*\#\(if\|else\|endif\)" contains=ALL + syn match ppwizDef "^\s*\#\({\|break\|continue\|}\)" contains=ALL +" elseif ppwiz_highlight_defs == 2 +" syn region ppwizDef start="^\s*\#" end="[^\\]$" end="^$" keepend contains=ALL +else + syn region ppwizDef start="^\s*\#" end="[^\\]$" end="^$" keepend contains=ppwizCont +endif +syn match ppwizError "\s.\\$" +syn match ppwizCont "\s\([+\-%]\|\)\\$" +" macros to execute +syn region ppwizMacro start="<\$" end=">" contains=@ppwizArgVal,ppwizCont +" macro arguments +syn region ppwizArg start="{" end="}" contains=ppwizEqual,ppwizString +syn match ppwizEqual "=" contained +syn match ppwizOperator "<>\|=\|<\|>" contained +" standard variables (builtin) +syn region ppwizStdVar start="" contains=@ppwizArgVal +" Rexx variables +syn region ppwizRexxVar start="" contains=@ppwizArgVal +" Constants +syn region ppwizString start=+"+ end=+"+ contained contains=ppwizMacro,ppwizArg,ppwizHTML,ppwizCont,ppwizStdVar,ppwizRexxVar +syn region ppwizString start=+'+ end=+'+ contained contains=ppwizMacro,ppwizArg,ppwizHTML,ppwizCont,ppwizStdVar,ppwizRexxVar +syn match ppwizInteger "\d\+" contained + +" Clusters +syn cluster ppwizArgVal add=ppwizString,ppwizInteger + +" 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_ppwiz_syn_inits") + if version < 508 + let did_ppwiz_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink ppwizSpecial Special + HiLink ppwizEqual ppwizSpecial + HiLink ppwizOperator ppwizSpecial + HiLink ppwizComment Comment + HiLink ppwizDef PreProc + HiLink ppwizMacro Statement + HiLink ppwizArg Identifier + HiLink ppwizStdVar Identifier + HiLink ppwizRexxVar Identifier + HiLink ppwizString Constant + HiLink ppwizInteger Constant + HiLink ppwizCont ppwizSpecial + HiLink ppwizError Error + HiLink ppwizHTML Type + + delcommand HiLink +endif + +let b:current_syntax = "ppwiz" + +" vim: ts=4 + diff --git a/vim/bundle/ubuntu-vim72/syntax/prescribe.vim b/vim/bundle/ubuntu-vim72/syntax/prescribe.vim new file mode 100644 index 0000000..d89ee35 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/prescribe.vim @@ -0,0 +1,69 @@ +" Vim syntax file +" Language: Kyocera PreScribe2e +" Maintainer: Klaus Muth +" URL: http://www.hampft.de/vim/syntax/prescribe.vim +" Last Change: 2005 Mar 04 + +" 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 match prescribeSpecial "!R!" + +" all prescribe commands +syn keyword prescribeStatement ALTF AMCR ARC ASFN ASTK BARC BLK BOX CALL +syn keyword prescribeStatement CASS CIR CLIP CLPR CLSP COPY CPTH CSET CSTK +syn keyword prescribeStatement CTXT DAF DAM DAP DELF DELM DPAT DRP DRPA DUPX +syn keyword prescribeStatement DXPG DXSD DZP ENDD ENDM ENDR EPL EPRM EXIT +syn keyword prescribeStatement FDIR FILL FLAT FLST FONT FPAT FRPO FSET FTMD +syn keyword prescribeStatement GPAT ICCD INTL JOG LDFC MAP MCRO MDAT MID +syn keyword prescribeStatement MLST MRP MRPA MSTK MTYP MZP NEWP PAGE PARC PAT +syn keyword prescribeStatement PCRP PCZP PDIR RDRP PDZP PELP PIE PMRA PMRP PMZP +syn keyword prescribeStatement PRBX PRRC PSRC PXPL RDMP RES RSL RGST RPCS RPF +syn keyword prescribeStatement RPG RPP RPU RTTX RTXT RVCD RVRD SBM SCAP SCCS +syn keyword prescribeStatement SCF SCG SCP SCPI SCRC SCS SCU SDP SEM SETF SFA +syn keyword prescribeStatement SFNT SIMG SIR SLJN SLM SLPI SLPP SLS SMLT SPD +syn keyword prescribeStatement SPL SPLT SPO SPSZ SPW SRM SRO SROP SSTK STAT STRK +syn keyword prescribeStatement SULP SVCP TATR TEXT TPRS UNIT UOM WIDE WRED XPAT +syn match prescribeStatement "\" +syn match prescribeStatement "\" +syn match prescribeStatement "\" +syn match prescribeStatement "\" +syn match prescribeStatement "\" +syn match prescribeStatement "\" +syn match prescribeStatement "\" + +syn match prescribeCSETArg "[0-9]\{1,3}[A-Z]" +syn match prescribeFRPOArg "[A-Z][0-9]\{1,2}" +syn match prescribeNumber "[0-9]\+" +syn region prescribeString start=+'+ end=+'+ skip=+\\'+ +syn region prescribeComment start=+CMNT+ end=+;+ + +" 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_prescribe_syn_inits") + if version < 508 + let did_prescribe_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink prescribeSpecial PreProc + HiLink prescribeStatement Statement + HiLink prescribeNumber Number + HiLink prescribeCSETArg String + HiLink prescribeFRPOArg String + HiLink prescribeComment Comment + + delcommand HiLink +endif + +let b:current_syntax = "prescribe" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/privoxy.vim b/vim/bundle/ubuntu-vim72/syntax/privoxy.vim new file mode 100644 index 0000000..9e6ff1d --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/privoxy.vim @@ -0,0 +1,71 @@ +" Vim syntax file +" Language: Privoxy actions file +" Maintainer: Doug Kearns +" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/privoxy.vim +" Last Change: 2007 Mar 30 + +" Privoxy 3.0.6 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +setlocal iskeyword=@,48-57,_,- + +syn keyword privoxyTodo contained TODO FIXME XXX NOTE +syn match privoxyComment "#.*" contains=privoxyTodo,@Spell + +syn region privoxyActionLine matchgroup=privoxyActionLineDelimiter start="^\s*\zs{" end="}\ze\s*$" + \ contains=privoxyEnabledPrefix,privoxyDisabledPrefix + +syn match privoxyEnabledPrefix "\%(^\|\s\|{\)\@<=+\l\@=" nextgroup=privoxyAction,privoxyFilterAction contained +syn match privoxyDisabledPrefix "\%(^\|\s\|{\)\@<=-\l\@=" nextgroup=privoxyAction,privoxyFilterAction contained + +syn match privoxyAction "\%(add-header\|block\|content-type-overwrite\|crunch-client-header\|crunch-if-none-match\)\>" contained +syn match privoxyAction "\%(crunch-incoming-cookies\|crunch-outgoing-cookies\|crunch-server-header\|deanimate-gifs\)\>" contained +syn match privoxyAction "\%(downgrade-http-version\|fast-redirects\|filter-client-headers\|filter-server-headers\)\>" contained +syn match privoxyAction "\%(filter\|force-text-mode\|handle-as-empty-document\|handle-as-image\)\>" contained +syn match privoxyAction "\%(hide-accept-language\|hide-content-disposition\|hide-forwarded-for-headers\)\>" contained +syn match privoxyAction "\%(hide-from-header\|hide-if-modified-since\|hide-referrer\|hide-user-agent\|inspect-jpegs\)\>" contained +syn match privoxyAction "\%(kill-popups\|limit-connect\|overwrite-last-modified\|prevent-compression\|redirect\)\>" contained +syn match privoxyAction "\%(send-vanilla-wafer\|send-wafer\|session-cookies-only\|set-image-blocker\)\>" contained +syn match privoxyAction "\%(treat-forbidden-connects-like-blocks\)\>" + +syn match privoxyFilterAction "filter{[^}]*}" contained contains=privoxyFilterArg,privoxyActionBraces +syn match privoxyActionBraces "[{}]" contained +syn keyword privoxyFilterArg js-annoyances js-events html-annoyances content-cookies refresh-tags unsolicited-popups all-popups + \ img-reorder banners-by-size banners-by-link webbugs tiny-textforms jumping-windows frameset-borders demoronizer + \ shockwave-flash quicktime-kioskmode fun crude-parental ie-exploits site-specifics no-ping google yahoo msn blogspot + \ x-httpd-php-to-html html-to-xml xml-to-html hide-tor-exit-notation contained + +" Alternative spellings +syn match privoxyAction "\%(kill-popup\|hide-referer\|prevent-keeping-cookies\)\>" contained + +" Pre-3.0 compatibility +syn match privoxyAction "\%(no-cookie-read\|no-cookie-set\|prevent-reading-cookies\|prevent-setting-cookies\)\>" contained +syn match privoxyAction "\%(downgrade\|hide-forwarded\|hide-from\|image\|image-blocker\|no-compression\)\>" contained +syn match privoxyAction "\%(no-cookies-keep\|no-cookies-read\|no-cookies-set\|no-popups\|vanilla-wafer\|wafer\)\>" contained + +syn match privoxySetting "\" + +syn match privoxyHeader "^\s*\zs{{\%(alias\|settings\)}}\ze\s*$" + +hi def link privoxyAction Identifier +hi def link privoxyFilterAction Identifier +hi def link privoxyActionLineDelimiter Delimiter +hi def link privoxyDisabledPrefix SpecialChar +hi def link privoxyEnabledPrefix SpecialChar +hi def link privoxyHeader PreProc +hi def link privoxySetting Identifier +hi def link privoxyFilterArg Constant + +hi def link privoxyComment Comment +hi def link privoxyTodo Todo + +let b:current_syntax = "privoxy" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/procmail.vim b/vim/bundle/ubuntu-vim72/syntax/procmail.vim new file mode 100644 index 0000000..c2ffa39 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/procmail.vim @@ -0,0 +1,67 @@ +" Vim syntax file +" Language: Procmail definition file +" Maintainer: Melchior FRANZ +" Last Change: 2003 Aug 14 +" Author: Sonia Heimann + +" 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 match procmailComment "#.*$" contains=procmailTodo +syn keyword procmailTodo contained Todo TBD + +syn region procmailString start=+"+ skip=+\\"+ end=+"+ +syn region procmailString start=+'+ skip=+\\'+ end=+'+ + +syn region procmailVarDeclRegion start="^\s*[a-zA-Z0-9_]\+\s*="hs=e-1 skip=+\\$+ end=+$+ contains=procmailVar,procmailVarDecl,procmailString +syn match procmailVarDecl contained "^\s*[a-zA-Z0-9_]\+" +syn match procmailVar "$[a-zA-Z0-9_]\+" + +syn match procmailCondition contained "^\s*\*.*" + +syn match procmailActionFolder contained "^\s*[-_a-zA-Z0-9/]\+" +syn match procmailActionVariable contained "^\s*$[a-zA-Z_]\+" +syn region procmailActionForward start=+^\s*!+ skip=+\\$+ end=+$+ +syn region procmailActionPipe start=+^\s*|+ skip=+\\$+ end=+$+ +syn region procmailActionNested start=+^\s*{+ end=+^\s*}+ contains=procmailRecipe,procmailComment,procmailVarDeclRegion + +syn region procmailRecipe start=+^\s*:.*$+ end=+^\s*\($\|}\)+me=e-1 contains=procmailComment,procmailCondition,procmailActionFolder,procmailActionVariable,procmailActionForward,procmailActionPipe,procmailActionNested,procmailVarDeclRegion + +" 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_procmail_syntax_inits") + if version < 508 + let did_procmail_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink procmailComment Comment + HiLink procmailTodo Todo + + HiLink procmailRecipe Statement + "HiLink procmailCondition Statement + + HiLink procmailActionFolder procmailAction + HiLink procmailActionVariable procmailAction + HiLink procmailActionForward procmailAction + HiLink procmailActionPipe procmailAction + HiLink procmailAction Function + HiLink procmailVar Identifier + HiLink procmailVarDecl Identifier + + HiLink procmailString String + + delcommand HiLink +endif + +let b:current_syntax = "procmail" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/progress.vim b/vim/bundle/ubuntu-vim72/syntax/progress.vim new file mode 100644 index 0000000..6816548 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/progress.vim @@ -0,0 +1,231 @@ +" Vim syntax file +" Language: Progress 4GL +" Filename extensions: *.p (collides with Pascal), +" *.i (collides with assembler) +" *.w (collides with cweb) +" Maintainer: Philip Uren Remove "SPAX" spam block +" Contributors: Chris Ruprecht (Chris, where are you now?) +" Mikhail Kuperblum +" John Florian +" Last Change: Wed Apr 12 08:55:35 EST 2006 +" $Id: progress.vim,v 1.3 2006/04/12 21:48:47 vimboss Exp $ + +" 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 + +if version >= 600 + setlocal iskeyword=@,48-57,_,-,!,#,$,% +else + set iskeyword=@,48-57,_,-,!,#,$,% +endif + +" The Progress editor doesn't cope with tabs very well. +set expandtab + +syn case ignore + +" Progress Blocks of code and mismatched "end." errors. +syn match ProgressEndError "\" +syn region ProgressDoBlock transparent matchgroup=ProgressDo start="\" matchgroup=ProgressDo end="\" contains=ALLBUT,ProgressProcedure,ProgressFunction +syn region ProgressForBlock transparent matchgroup=ProgressFor start="\" matchgroup=ProgressFor end="\" contains=ALLBUT,ProgressProcedure,ProgressFunction +syn region ProgressRepeatBlock transparent matchgroup=ProgressRepeat start="\" matchgroup=ProgressRepeat end="\" contains=ALLBUT,ProgressProcedure,ProgressFunction +syn region ProgressCaseBlock transparent matchgroup=ProgressCase start="\" matchgroup=ProgressCase end="\\|\" contains=ALLBUT,ProgressProcedure,ProgressFunction + +" These are Progress reserved words, +" and they could go in ProgressReserved, +" but I found it more helpful to highlight them in a different color. +syn keyword ProgressConditional if else then when otherwise +syn keyword ProgressFor each where + +" Make those TODO and debugging notes stand out! +syn keyword ProgressTodo contained TODO BUG FIX +syn keyword ProgressDebug contained DEBUG +syn keyword ProgressDebug debugger +syn match ProgressTodo contained "NEED[S]*\s\s*WORK" + +" If you like to highlight the whole line of +" the start and end of procedures +" to make the whole block of code stand out: +syn match ProgressProcedure "^\s*procedure.*" +syn match ProgressProcedure "^\s*end\s\s*procedure.*" +syn match ProgressFunction "^\s*function.*" +syn match ProgressFunction "^\s*end\s\s*function.*" +" ... otherwise use this: +" syn keyword ProgressFunction procedure function + +syn keyword ProgressReserved accum[ulate] active-window add alias all alter ambig[uous] analyz[e] and any apply as asc[ending] assign at attr[-space] +syn keyword ProgressReserved authorization auto-ret[urn] avail[able] back[ground] before-h[ide] begins bell between blank break btos by call can-do can-find +syn keyword ProgressReserved center[ed] character check chr clear clipboard col colon color col[umn] column-lab[el] col[umns] compiler connected control count-of +syn keyword ProgressReserved cpstream create ctos current current-changed current-lang[uage] current-window current_date curs[or] database dataservers +syn keyword ProgressReserved dbcodepage dbcollation dbname dbrest[rictions] dbtaskid dbtype dbvers[ion] dde deblank debug-list debugger decimal decimals declare +syn keyword ProgressReserved def default default-noxl[ate] default-window def[ine] delete delimiter desc[ending] dict[ionary] disable discon[nect] disp +syn keyword ProgressReserved disp[lay] distinct dos down drop editing enable encode entry error-stat[us] escape etime except exclusive +syn keyword ProgressReserved exclusive[-lock] exclusive-web-us[er] exists export false fetch field field[s] file-info[rmation] fill find find-case-sensitive +syn keyword ProgressReserved find-global find-next-occurrence find-prev-occurrence find-select find-wrap-around first first-of focus font form form[at] +syn keyword ProgressReserved fram[e] frame-col frame-db frame-down frame-field frame-file frame-inde[x] frame-line frame-name frame-row frame-val[ue] +syn keyword ProgressReserved from from-c[hars] from-p[ixels] gateway[s] get-byte get-codepage[s] get-coll[ations] get-key-val[ue] getbyte global go-on +syn keyword ProgressReserved go-pend[ing] grant graphic-e[dge] group having header help hide import in index indicator input input-o[utput] insert +syn keyword ProgressReserved integer into is is-attr[-space] join kblabel key-code key-func[tion] key-label keycode keyfunc[tion] keylabel keys keyword label +syn keyword ProgressReserved last last-even[t] last-key last-of lastkey ldbname leave library like line-count[er] listi[ng] locked lookup machine-class +syn keyword ProgressReserved map member message message-lines mouse mpe new next next-prompt no no-attr[-space] no-error no-f[ill] no-help no-hide no-label[s] +syn keyword ProgressReserved no-lock no-map no-mes[sage] no-pause no-prefe[tch] no-undo no-val[idate] no-wait not null num-ali[ases] num-dbs num-entries +syn keyword ProgressReserved of off old on open opsys option or os-append os-command os-copy os-create-dir os-delete os-dir os-drive[s] os-error os-rename +syn keyword ProgressReserved os2 os400 output overlay page page-bot[tom] page-num[ber] page-top param[eter] pause pdbname persist[ent] pixels +syn keyword ProgressReserved preproc[ess] privileges proc-ha[ndle] proc-st[atus] process program-name Progress prompt prompt[-for] promsgs propath provers[ion] +syn keyword ProgressReserved put put-byte put-key-val[ue] putbyte query query-tuning quit r-index rcode-informatio[n] readkey recid record-len[gth] rect[angle] +syn keyword ProgressReserved release reposition retain retry return return-val[ue] revert revoke run save schema screen screen-io screen-lines +syn keyword ProgressReserved scroll sdbname search seek select self session set setuser[id] share[-lock] shared show-stat[s] skip some space status stream +syn keyword ProgressReserved stream-io string-xref system-dialog table term term[inal] text text-cursor text-seg[-growth] this-procedure time title +syn keyword ProgressReserved to today top-only trans trans[action] trigger triggers trim true underl[ine] undo unform[atted] union unique unix up update +syn keyword ProgressReserved use-index use-revvideo use-underline user user[id] using v6frame value values variable view view-as vms wait-for web-con[text] +syn keyword ProgressReserved window window-maxim[ized] window-minim[ized] window-normal with work-tab[le] workfile write xcode xref yes _cbit +syn keyword ProgressReserved _control _list _memory _msg _pcontrol _serial[-num] _trace + +" Strings. Handles embedded quotes. +" Note that, for some reason, Progress doesn't use the backslash, "\" +" as the escape character; it uses tilde, "~". +syn region ProgressString matchgroup=ProgressQuote start=+"+ end=+"+ skip=+\~'\|\~\~+ +syn region ProgressString matchgroup=ProgressQuote start=+'+ end=+'+ skip=+\~'\|\~\~+ + +syn match ProgressIdentifier "\<[a-zA-Z_%#]+\>()" + +" syn match ProgressDelimiter "()" + +syn match ProgressMatrixDelimiter "[][]" +" If you prefer you can highlight the range +"syn match ProgressMatrixDelimiter "[\d\+\.\.\d\+]" + +syn match ProgressNumber "\<\-\=\d\+\(u\=l\=\|lu\|f\)\>" +syn match ProgressByte "\$[0-9a-fA-F]\+" + +" More values: Logicals, and Progress's unknown value, ?. +syn match ProgressNumber "?" +syn keyword ProgressNumber true false yes no + +" If you don't like tabs: +syn match ProgressShowTab "\t" + +" If you don't like white space on the end of lines: +" syn match ProgressSpaceError "\s\+$" + +syn region ProgressComment start="/\*" end="\*/" contains=ProgressComment,ProgressTodo,ProgressDebug +syn region ProgressInclude start="^[ ]*[{][^&]" end="[}]" contains=ProgressPreProc,ProgressOperator,ProgressString,ProgressComment +syn region ProgressPreProc start="&" end="\>" contained + +" This next line works reasonably well. +" syn match ProgressOperator "[!;|)(:.><+*=-]" +" +" Progress allows a '-' to be part of an identifier. To be considered +" the subtraction/negation operation operator it needs a non-word +" character on either side. Also valid are cases where the minus +" operation appears at the beginning or end of a line. +" This next line trips up on "no-undo" etc. +" syn match ProgressOperator "[!;|)(:.><+*=]\|\W-\W\|^-\W\|\W-$" +syn match ProgressOperator "[!;|)(:.><+*=]\|\s-\s\|^-\s\|\s-$" + +syn keyword ProgressOperator <= <> >= abs[olute] accelerator across add-first add-last advise alert-box allow-replication ansi-only anywhere append appl-alert[-boxes] application as-cursor ask-overwrite +syn keyword ProgressOperator attach[ment] auto-end-key auto-endkey auto-go auto-ind[ent] auto-resize auto-z[ap] available-formats ave[rage] avg backward[s] base-key batch[-mode] bgc[olor] binary +syn keyword ProgressOperator bind-where block-iteration-display border-bottom border-bottom-ch[ars] border-bottom-pi[xels] border-left border-left-char[s] border-left-pixe[ls] border-right border-right-cha[rs] +syn keyword ProgressOperator border-right-pix[els] border-t[op] border-t[op-chars] border-top-pixel[s] both bottom box box-select[able] browse browse-header buffer buffer-chars buffer-lines +syn keyword ProgressOperator button button[s] byte cache cache-size can-query can-set cancel-break cancel-button caps careful-paint case-sensitive cdecl char[acter] character_length charset +syn keyword ProgressOperator checked choose clear-select[ion] close code codepage codepage-convert col-of colon-align[ed] color-table column-bgc[olor] column-dcolor column-fgc[olor] column-font +syn keyword ProgressOperator column-label-bgc[olor] column-label-dcolor column-label-fgc[olor] column-label-font column-of column-pfc[olor] column-sc[rolling] combo-box command compile complete +syn keyword ProgressOperator connect constrained contents context context-pop[up] control-containe[r] c[ontrol-form] convert-to-offse[t] convert count cpcase cpcoll cpint[ernal] cplog +syn keyword ProgressOperator cpprint cprcodein cprcodeout cpterm crc-val[ue] c[reate-control] create-result-list-entry create-test-file current-column current-environm[ent] current-iteration +syn keyword ProgressOperator current-result-row current-row-modified current-value cursor-char cursor-line cursor-offset data-entry-retur[n] data-t[ype] date date-f[ormat] day db-references +syn keyword ProgressOperator dcolor dde-error dde-i[d] dde-item dde-name dde-topic debu[g] dec[imal] default-b[utton] default-extensio[n] defer-lob-fetch define defined delete-char delete-current-row +syn keyword ProgressOperator delete-line delete-selected-row delete-selected-rows deselect-focused-row deselect-rows deselect-selected-row d[esign-mode] dialog-box dialog-help dir disabled display-message +syn keyword ProgressOperator display-t[ype] double drag-enabled drop-down drop-down-list dump dynamic echo edge edge[-chars] edge-p[ixels] editor empty end-key endkey entered eq error error-col[umn] +syn keyword ProgressOperator error-row event-t[ype] event[s] exclusive-id execute exp expand extended extent external extract fetch-selected-row fgc[olor] file file-name file-off[set] file-type +syn keyword ProgressOperator filename fill-in filled filters first-child first-column first-proc[edure] first-tab-i[tem] fixed-only float focused-row font-based-layout font-table force-file +syn keyword ProgressOperator fore[ground] form-input forward[s] frame-spa[cing] frame-x frame-y frequency from-cur[rent] full-height full-height-char[s] full-height-pixe[ls] full-pathn[ame] +syn keyword ProgressOperator full-width full-width[-chars] full-width-pixel[s] ge get get-blue[-value] g[et-char-property] get-double get-dynamic get-file get-float get-green[-value] +syn keyword ProgressOperator get-iteration get-license get-long get-message get-number get-pointer-value get-red[-value] get-repositioned-row get-selected-wid[get] get-short get-signature get-size +syn keyword ProgressOperator get-string get-tab-item get-text-height get-text-height-char[s] get-text-height-pixe[ls] get-text-width get-text-width-c[hars] get-text-width-pixel[s] get-unsigned-short +syn keyword ProgressOperator grayed grid-factor-horizont[al] grid-factor-vert[ical] grid-set grid-snap grid-unit-height grid-unit-height-cha[rs] grid-unit-height-pix[els] grid-unit-width grid-unit-width-char[s] +syn keyword ProgressOperator grid-unit-width-pixe[ls] grid-visible gt handle height height[-chars] height-p[ixels] help-con[text] helpfile-n[ame] hidden hint hori[zontal] hwnd image image-down +syn keyword ProgressOperator image-insensitive image-size image-size-c[hars] image-size-pixel[s] image-up immediate-display index-hint indexed-reposition info[rmation] init init[ial] initial-dir +syn keyword ProgressOperator initial-filter initiate inner inner-chars inner-lines insert-b[acktab] insert-file insert-row insert-string insert-t[ab] int[eger] internal-entries is-lead-byte +syn keyword ProgressOperator is-row-selected is-selected item items-per-row join-by-sqldb keep-frame-z-ord[er] keep-messages keep-tab-order key keyword-all label-bgc[olor] label-dc[olor] label-fgc[olor] +syn keyword ProgressOperator label-font label-pfc[olor] labels language[s] large large-to-small last-child last-tab-i[tem] last-proce[dure] lc le leading left left-align[ed] left-trim length +syn keyword ProgressOperator line list-events list-items list-query-attrs list-set-attrs list-widgets load l[oad-control] load-icon load-image load-image-down load-image-insensitive load-image-up +syn keyword ProgressOperator load-mouse-point[er] load-small-icon log logical lookahead lower lt manual-highlight margin-extra margin-height margin-height-ch[ars] margin-height-pi[xels] margin-width +syn keyword ProgressOperator margin-width-cha[rs] margin-width-pix[els] matches max max-chars max-data-guess max-height max-height[-chars] max-height-pixel[s] max-rows max-size max-val[ue] max-width +syn keyword ProgressOperator max-width[-chars] max-width-p[ixels] maximize max[imum] memory menu menu-bar menu-item menu-k[ey] menu-m[ouse] menubar message-area message-area-font message-line +syn keyword ProgressOperator min min-height min-height[-chars] min-height-pixel[s] min-size min-val[ue] min-width min-width[-chars] min-width-p[ixels] min[imum] mod modified mod[ulo] month mouse-p[ointer] +syn keyword ProgressOperator movable move-after-tab-i[tem] move-before-tab-[item] move-col[umn] move-to-b[ottom] move-to-eof move-to-t[op] multiple multiple-key multitasking-interval must-exist +syn keyword ProgressOperator name native ne new-row next-col[umn] next-sibling next-tab-ite[m] next-value no-apply no-assign no-bind-where no-box no-column-scroll[ing] no-convert no-current-value +syn keyword ProgressOperator no-debug no-drag no-echo no-index-hint no-join-by-sqldb no-lookahead no-row-markers no-scrolling no-separate-connection no-separators no-und[erline] no-word-wrap +syn keyword ProgressOperator none num-but[tons] num-col[umns] num-copies num-formats num-items num-iterations num-lines num-locked-colum[ns] num-messages num-results num-selected num-selected-rows +syn keyword ProgressOperator num-selected-widgets num-tabs num-to-retain numeric numeric-f[ormat] octet_length ok ok-cancel on-frame[-border] ordered-join ordinal orientation os-getenv outer +syn keyword ProgressOperator outer-join override owner page-size page-wid[th] paged parent partial-key pascal pathname pfc[olor] pinnable pixels-per-colum[n] pixels-per-row popup-m[enu] popup-o[nly] +syn keyword ProgressOperator position precision presel[ect] prev prev-col[umn] prev-sibling prev-tab-i[tem] primary printer-control-handle printer-setup private-d[ata] profiler Progress-s[ource] +syn keyword ProgressOperator publish put-double put-float put-long put-short put-string put-unsigned-short query-off-end question radio-buttons radio-set random raw raw-transfer read-file read-only +syn keyword ProgressOperator real recursive refresh refreshable replace replace-selection-text replication-create replication-delete replication-write request resiza[ble] resize retry-cancel +syn keyword ProgressOperator return-ins[erted] return-to-start-di[r] reverse-from right right-align[ed] right-trim round row row-ma[rkers] row-of rowid rule rule-row rule-y save-as save-file +syn keyword ProgressOperator screen-val[ue] scroll-bars scroll-delta scroll-horiz-value scroll-offset scroll-to-current-row scroll-to-i[tem] scroll-to-selected-row scroll-vert-value scrollable +syn keyword ProgressOperator scrollbar-horizo[ntal] scrollbar-vertic[al] scrolled-row-positio[n] scrolling se-check-pools se-enable-of[f] se-enable-on se-num-pools se-use-messa[ge] section select-focused-row +syn keyword ProgressOperator select-next-row select-prev-row select-repositioned-row select-row selectable selected selected-items selection-end selection-list selection-start selection-text +syn keyword ProgressOperator send sensitive separate-connection separators set-blue[-value] set-break set-cell-focus set-contents set-dynamic set-green[-value] set-leakpoint set-pointer-valu[e] +syn keyword ProgressOperator s[et-property] set-red[-value] set-repositioned-row set-selection set-size set-wait[-state] side-lab side-lab[e] side-lab[el] side-label-handl[e] side-lab[els] silent +syn keyword ProgressOperator simple single size size-c[hars] size-p[ixels] slider smallint sort source source-procedure sql sqrt start status-area status-area-font status-bar stdcall stenciled stop stoppe[d] +syn keyword ProgressOperator stored-proc[edure] string sub-ave[rage] sub-count sub-max[imum] sub-me[nu] sub-menu-help sub-min[imum] sub-total subscribe subst[itute] substr[ing] subtype sum super suppress-warning[s] +syn keyword ProgressOperator system-alert-box[es] system-help tab-position tabbable target target-procedure temp-dir[ectory] temp-table terminate text-selected three-d through thru tic-marks time-source title-bgc[olor] +syn keyword ProgressOperator title-dc[olor] title-fgc[olor] title-fo[nt] to-rowid toggle-box tool-bar top topic total trailing trunc[ate] type unbuff[ered] unique-id unload unsubscribe upper use use-dic[t-exps] +syn keyword ProgressOperator use-filename use-text v6display valid-event valid-handle validate validate-condition validate-message var[iable] vert[ical] virtual-height virtual-height-c[hars] +syn keyword ProgressOperator virtual-height-pixel[s] virtual-width virtual-width-ch[ars] virtual-width-pi[xels] visible wait warning weekday widget widget-e[nter] widget-h[andle] widget-l[eave] +syn keyword ProgressOperator widget-pool width width[-chars] width-p[ixels] window-name window-sta[te] window-sys[tem] word-wrap x-of y-of year yes-no yes-no-cancel _dcm + +syn keyword ProgressType char[acter] int[eger] format +syn keyword ProgressType var[iable] log[ical] da[te] + +syn sync lines=800 + +" 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_progress_syntax_inits") + if version < 508 + let did_progress_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " The default methods for highlighting. Can be overridden later. + HiLink ProgressByte Number + HiLink ProgressCase Repeat + HiLink ProgressComment Comment + HiLink ProgressConditional Conditional + HiLink ProgressDebug Debug + HiLink ProgressDo Repeat + HiLink ProgressEndError Error + HiLink ProgressFor Repeat + HiLink ProgressFunction Procedure + HiLink ProgressIdentifier Identifier + HiLink ProgressInclude Include + HiLink ProgressMatrixDelimiter Identifier + HiLink ProgressNumber Number + HiLink ProgressOperator Operator + HiLink ProgressPreProc PreProc + HiLink ProgressProcedure Procedure + HiLink ProgressQuote Delimiter + HiLink ProgressRepeat Repeat + HiLink ProgressReserved Statement + HiLink ProgressSpaceError Error + HiLink ProgressString String + HiLink ProgressTodo Todo + HiLink ProgressType Statement + HiLink ProgressShowTab Error + + delcommand HiLink +endif + +let b:current_syntax = "progress" + +" vim: ts=8 sw=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/prolog.vim b/vim/bundle/ubuntu-vim72/syntax/prolog.vim new file mode 100644 index 0000000..58de71f --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/prolog.vim @@ -0,0 +1,119 @@ +" Vim syntax file +" Language: PROLOG +" Maintainers: Thomas Koehler +" Last Change: 2009 Dec 04 +" URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/vim/syntax/prolog.vim + +" There are two sets of highlighting in here: +" If the "prolog_highlighting_clean" variable exists, it is rather sparse. +" Otherwise you get more highlighting. + +" Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Prolog is case sensitive. +syn case match + +" Very simple highlighting for comments, clause heads and +" character codes. It respects prolog strings and atoms. + +syn region prologCComment start=+/\*+ end=+\*/+ +syn match prologComment +%.*+ + +syn keyword prologKeyword module meta_predicate multifile dynamic +syn match prologCharCode +0'\\\=.+ +syn region prologString start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn region prologAtom start=+'+ skip=+\\\\\|\\'+ end=+'+ +syn region prologClauseHead start=+^[a-z][^(]*(+ skip=+\.[^ ]+ end=+:-\|\.$\|\.[ ]\|-->+ contains=prologComment,prologCComment,prologString + +if !exists("prolog_highlighting_clean") + + " some keywords + " some common predicates are also highlighted as keywords + " is there a better solution? + syn keyword prologKeyword abolish current_output peek_code + syn keyword prologKeyword append current_predicate put_byte + syn keyword prologKeyword arg current_prolog_flag put_char + syn keyword prologKeyword asserta fail put_code + syn keyword prologKeyword assertz findall read + syn keyword prologKeyword at_end_of_stream float read_term + syn keyword prologKeyword atom flush_output repeat + syn keyword prologKeyword atom_chars functor retract + syn keyword prologKeyword atom_codes get_byte set_input + syn keyword prologKeyword atom_concat get_char set_output + syn keyword prologKeyword atom_length get_code set_prolog_flag + syn keyword prologKeyword atomic halt set_stream_position + syn keyword prologKeyword bagof integer setof + syn keyword prologKeyword call is stream_property + syn keyword prologKeyword catch nl sub_atom + syn keyword prologKeyword char_code nonvar throw + syn keyword prologKeyword char_conversion number true + syn keyword prologKeyword clause number_chars unify_with_occurs_check + syn keyword prologKeyword close number_codes var + syn keyword prologKeyword compound once write + syn keyword prologKeyword copy_term op write_canonical + syn keyword prologKeyword current_char_conversion open write_term + syn keyword prologKeyword current_input peek_byte writeq + syn keyword prologKeyword current_op peek_char + + syn match prologOperator "=\\=\|=:=\|\\==\|=<\|==\|>=\|\\=\|\\+\|<\|>\|=" + syn match prologAsIs "===\|\\===\|<=\|=>" + + syn match prologNumber "\<[0123456789]*\>'\@!" + syn match prologCommentError "\*/" + syn match prologSpecialCharacter ";" + syn match prologSpecialCharacter "!" + syn match prologQuestion "?-.*\." contains=prologNumber + + +endif + +syn sync maxlines=50 + + +" 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_prolog_syn_inits") + if version < 508 + let did_prolog_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " The default highlighting. + HiLink prologComment Comment + HiLink prologCComment Comment + HiLink prologCharCode Special + + if exists ("prolog_highlighting_clean") + + HiLink prologKeyword Statement + HiLink prologClauseHead Statement + + else + + HiLink prologKeyword Keyword + HiLink prologClauseHead Constant + HiLink prologQuestion PreProc + HiLink prologSpecialCharacter Special + HiLink prologNumber Number + HiLink prologAsIs Normal + HiLink prologCommentError Error + HiLink prologAtom String + HiLink prologString String + HiLink prologOperator Operator + + endif + + delcommand HiLink +endif + +let b:current_syntax = "prolog" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/promela.vim b/vim/bundle/ubuntu-vim72/syntax/promela.vim new file mode 100644 index 0000000..e812bc2 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/promela.vim @@ -0,0 +1,56 @@ +" Vim syntax file +" Language: ProMeLa +" Maintainer: Maurizio Tranchero - +" First Release: Mon Oct 16 08:49:46 CEST 2006 +" Last Change: Thu Aug 7 21:22:48 CEST 2008 +" Version: 0.5 + +" 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 + +" case is significant +" syn case ignore +" ProMeLa Keywords +syn keyword promelaStatement proctype if else while chan do od fi break goto unless +syn keyword promelaStatement active assert label atomic +syn keyword promelaFunctions skip timeout run +syn keyword promelaTodo contained TODO +" ProMeLa Types +syn keyword promelaType bit bool byte short int +" Operators and special characters +syn match promelaOperator "!" +syn match promelaOperator "?" +syn match promelaOperator "->" +syn match promelaOperator "=" +syn match promelaOperator "+" +syn match promelaOperator "*" +syn match promelaOperator "/" +syn match promelaOperator "-" +syn match promelaOperator "<" +syn match promelaOperator ">" +syn match promelaOperator "<=" +syn match promelaOperator ">=" +syn match promelaSpecial "\[" +syn match promelaSpecial "\]" +syn match promelaSpecial ";" +syn match promelaSpecial "::" +" ProMeLa Comments +syn region promelaComment start="/\*" end="\*/" contains=promelaTodo,@Spell +syn match promelaComment "//.*" contains=promelaTodo,@Spell + +" Class Linking +hi def link promelaStatement Statement +hi def link promelaType Type +hi def link promelaComment Comment +hi def link promelaOperator Type +hi def link promelaSpecial Special +hi def link promelaFunctions Special +hi def link promelaString String +hi def link promelaTodo Todo + +let b:current_syntax = "promela" diff --git a/vim/bundle/ubuntu-vim72/syntax/protocols.vim b/vim/bundle/ubuntu-vim72/syntax/protocols.vim new file mode 100644 index 0000000..1dc109c --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/protocols.vim @@ -0,0 +1,44 @@ +" Vim syntax file +" Language: protocols(5) - Internet protocols definition file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn match protocolsBegin display '^' + \ nextgroup=protocolsName,protocolsComment + +syn match protocolsName contained display '[[:graph:]]\+' + \ nextgroup=protocolsPort skipwhite + +syn match protocolsPort contained display '\d\+' + \ nextgroup=protocolsAliases,protocolsComment + \ skipwhite + +syn match protocolsAliases contained display '\S\+' + \ nextgroup=protocolsAliases,protocolsComment + \ skipwhite + +syn keyword protocolsTodo contained TODO FIXME XXX NOTE + +syn region protocolsComment display oneline start='#' end='$' + \ contains=protocolsTodo,@Spell + +hi def link protocolsTodo Todo +hi def link protocolsComment Comment +hi def link protocolsName Identifier +hi def link protocolsPort Number +hi def link protocolsPPDiv Delimiter +hi def link protocolsPPDivDepr Error +hi def link protocolsProtocol Type +hi def link protocolsAliases Macro + +let b:current_syntax = "protocols" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/psf.vim b/vim/bundle/ubuntu-vim72/syntax/psf.vim new file mode 100644 index 0000000..2b376f9 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/psf.vim @@ -0,0 +1,103 @@ +" Vim syntax file +" Language: Software Distributor product specification file +" (POSIX 1387.2-1995). +" Maintainer: Rex Barzee +" Last change: 25 Apr 2001 + +if version < 600 + " Remove any old syntax stuff hanging around + syn clear +elseif exists("b:current_syntax") + finish +endif + +" Product specification files are case sensitive +syn case match + +syn keyword psfObject bundle category control_file depot distribution +syn keyword psfObject end file fileset host installed_software media +syn keyword psfObject product root subproduct vendor + +syn match psfUnquotString +[^"# ][^#]*+ contained +syn region psfQuotString start=+"+ skip=+\\"+ end=+"+ contained + +syn match psfObjTag "\<[-_+A-Z0-9a-z]\+\(\.[-_+A-Z0-9a-z]\+\)*" contained +syn match psfAttAbbrev ",\<\(fa\|fr\|[aclqrv]\)\(<\|>\|<=\|>=\|=\|==\)[^,]\+" contained +syn match psfObjTags "\<[-_+A-Z0-9a-z]\+\(\.[-_+A-Z0-9a-z]\+\)*\(\s\+\<[-_+A-Z0-9a-z]\+\(\.[-_+A-Z0-9a-z]\+\)*\)*" contained + +syn match psfNumber "\<\d\+\>" contained +syn match psfFloat "\<\d\+\>\(\.\<\d\+\>\)*" contained + +syn match psfLongDate "\<\d\d\d\d\d\d\d\d\d\d\d\d\.\d\d\>" contained + +syn keyword psfState available configured corrupt installed transient contained +syn keyword psfPState applied committed superseded contained + +syn keyword psfBoolean false true contained + + +"Some of the attributes covered by attUnquotString and attQuotString: +" architecture category_tag control_directory copyright +" create_date description directory file_permissions install_source +" install_type location machine_type mod_date number os_name os_release +" os_version pose_as_os_name pose_as_os_release readme revision +" share_link title vendor_tag +syn region psfAttUnquotString matchgroup=psfAttrib start=~^\s*[^# ]\+\s\+[^#" ]~rs=e-1 contains=psfUnquotString,psfComment end=~$~ keepend oneline + +syn region psfAttQuotString matchgroup=psfAttrib start=~^\s*[^# ]\+\s\+"~rs=e-1 contains=psfQuotString,psfComment skip=~\\"~ matchgroup=psfQuotString end=~"~ keepend + + +" These regions are defined in attempt to do syntax checking for some +" of the attributes. +syn region psfAttTag matchgroup=psfAttrib start="^\s*tag\s\+" contains=psfObjTag,psfComment end="$" keepend oneline + +syn region psfAttSpec matchgroup=psfAttrib start="^\s*\(ancestor\|applied_patches\|applied_to\|contents\|corequisites\|exrequisites\|prerequisites\|software_spec\|supersedes\|superseded_by\)\s\+" contains=psfObjTag,psfAttAbbrev,psfComment end="$" keepend + +syn region psfAttTags matchgroup=psfAttrib start="^\s*all_filesets\s\+" contains=psfObjTags,psfComment end="$" keepend + +syn region psfAttNumber matchgroup=psfAttrib start="^\s*\(compressed_size\|instance_id\|media_sequence_number\|sequence_number\|size\)\s\+" contains=psfNumber,psfComment end="$" keepend oneline + +syn region psfAttTime matchgroup=psfAttrib start="^\s*\(create_time\|ctime\|mod_time\|mtime\|timestamp\)\s\+" contains=psfNumber,psfComment end="$" keepend oneline + +syn region psfAttFloat matchgroup=psfAttrib start="^\s*\(data_model_revision\|layout_version\)\s\+" contains=psfFloat,psfComment end="$" keepend oneline + +syn region psfAttLongDate matchgroup=psfAttrib start="^\s*install_date\s\+" contains=psfLongDate,psfComment end="$" keepend oneline + +syn region psfAttState matchgroup=psfAttrib start="^\s*\(state\)\s\+" contains=psfState,psfComment end="$" keepend oneline + +syn region psfAttPState matchgroup=psfAttrib start="^\s*\(patch_state\)\s\+" contains=psfPState,psfComment end="$" keepend oneline + +syn region psfAttBoolean matchgroup=psfAttrib start="^\s*\(is_kernel\|is_locatable\|is_patch\|is_protected\|is_reboot\|is_reference\|is_secure\|is_sparse\)\s\+" contains=psfBoolean,psfComment end="$" keepend oneline + +syn match psfComment "#.*$" + + +" 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_psf_syntax_inits") + if version < 508 + let did_psf_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink psfObject Statement + HiLink psfAttrib Type + HiLink psfQuotString String + HiLink psfObjTag Identifier + HiLink psfAttAbbrev PreProc + HiLink psfObjTags Identifier + + HiLink psfComment Comment + + delcommand HiLink +endif + +" Long descriptions and copyrights confuse the syntax highlighting, so +" force vim to backup at least 100 lines before the top visible line +" looking for a sync location. +syn sync lines=100 + +let b:current_syntax = "psf" diff --git a/vim/bundle/ubuntu-vim72/syntax/ptcap.vim b/vim/bundle/ubuntu-vim72/syntax/ptcap.vim new file mode 100644 index 0000000..45590cf --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/ptcap.vim @@ -0,0 +1,107 @@ +" Vim syntax file +" Language: printcap/termcap database +" Maintainer: Haakon Riiser +" URL: http://folk.uio.no/hakonrk/vim/syntax/ptcap.vim +" Last Change: 2001 May 15 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +" Since I only highlight based on the structure of the databases, not +" specific keywords, case sensitivity isn't required +syn case ignore + +" Since everything that is not caught by the syntax patterns is assumed +" to be an error, we start parsing 20 lines up, unless something else +" is specified +if exists("ptcap_minlines") + exe "syn sync lines=".ptcap_minlines +else + syn sync lines=20 +endif + +" Highlight everything that isn't caught by the rules as errors, +" except blank lines +syn match ptcapError "^.*\S.*$" + +syn match ptcapLeadBlank "^\s\+" contained + +" `:' and `|' are delimiters for fields and names, and should not be +" highlighted. Hence, they are linked to `NONE' +syn match ptcapDelimiter "[:|]" contained + +" Escaped characters receive special highlighting +syn match ptcapEscapedChar "\\." contained +syn match ptcapEscapedChar "\^." contained +syn match ptcapEscapedChar "\\\o\{3}" contained + +" A backslash at the end of a line will suppress the newline +syn match ptcapLineCont "\\$" contained + +" A number follows the same rules as an integer in C +syn match ptcapNumber "#\(+\|-\)\=\d\+"lc=1 contained +syn match ptcapNumberError "#\d*[^[:digit:]:\\]"lc=1 contained +syn match ptcapNumber "#0x\x\{1,8}"lc=1 contained +syn match ptcapNumberError "#0x\X"me=e-1,lc=1 contained +syn match ptcapNumberError "#0x\x\{9}"lc=1 contained +syn match ptcapNumberError "#0x\x*[^[:xdigit:]:\\]"lc=1 contained + +" The `@' operator clears a flag (i.e., sets it to zero) +" The `#' operator assigns a following number to the flag +" The `=' operator assigns a string to the preceding flag +syn match ptcapOperator "[@#=]" contained + +" Some terminal capabilites have special names like `#5' and `@1', and we +" need special rules to match these properly +syn match ptcapSpecialCap "\W[#@]\d" contains=ptcapDelimiter contained + +" If editing a termcap file, an entry in the database is terminated by +" a (non-escaped) newline. Otherwise, it is terminated by a line which +" does not start with a colon (:) +if exists("b:ptcap_type") && b:ptcap_type[0] == 't' + syn region ptcapEntry start="^\s*[^[:space:]:]" end="[^\\]\(\\\\\)*$" end="^$" contains=ptcapNames,ptcapField,ptcapLeadBlank keepend +else + syn region ptcapEntry start="^\s*[^[:space:]:]"me=e-1 end="^\s*[^[:space:]:#]"me=e-1 contains=ptcapNames,ptcapField,ptcapLeadBlank,ptcapComment +endif +syn region ptcapNames start="^\s*[^[:space:]:]" skip="[^\\]\(\\\\\)*\\:" end=":"me=e-1 contains=ptcapDelimiter,ptcapEscapedChar,ptcapLineCont,ptcapLeadBlank,ptcapComment keepend contained +syn region ptcapField start=":" skip="[^\\]\(\\\\\)*\\$" end="[^\\]\(\\\\\)*:"me=e-1 end="$" contains=ptcapDelimiter,ptcapString,ptcapNumber,ptcapNumberError,ptcapOperator,ptcapLineCont,ptcapSpecialCap,ptcapLeadBlank,ptcapComment keepend contained +syn region ptcapString matchgroup=ptcapOperator start="=" skip="[^\\]\(\\\\\)*\\:" matchgroup=ptcapDelimiter end=":"me=e-1 matchgroup=NONE end="[^\\]\(\\\\\)*[^\\]$" end="^$" contains=ptcapEscapedChar,ptcapLineCont keepend contained +syn region ptcapComment start="^\s*#" end="$" contains=ptcapLeadBlank + +if version >= 508 || !exists("did_ptcap_syntax_inits") + if version < 508 + let did_ptcap_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink ptcapComment Comment + HiLink ptcapDelimiter Delimiter + " The highlighting of "ptcapEntry" should always be overridden by + " its contents, so I use Todo highlighting to indicate that there + " is work to be done with the syntax file if you can see it :-) + HiLink ptcapEntry Todo + HiLink ptcapError Error + HiLink ptcapEscapedChar SpecialChar + HiLink ptcapField Type + HiLink ptcapLeadBlank NONE + HiLink ptcapLineCont Special + HiLink ptcapNames Label + HiLink ptcapNumber NONE + HiLink ptcapNumberError Error + HiLink ptcapOperator Operator + HiLink ptcapSpecialCap Type + HiLink ptcapString NONE + + delcommand HiLink +endif + +let b:current_syntax = "ptcap" + +" vim: sts=4 sw=4 ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/purifylog.vim b/vim/bundle/ubuntu-vim72/syntax/purifylog.vim new file mode 100644 index 0000000..8bcfb4b --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/purifylog.vim @@ -0,0 +1,119 @@ +" Vim syntax file +" Language: purify log files +" Maintainer: Gautam H. Mudunuri +" Last Change: 2003 May 11 + +" 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 + +" Purify header +syn match purifyLogHeader "^\*\*\*\*.*$" + +" Informational messages +syn match purifyLogFIU "^FIU:.*$" +syn match purifyLogMAF "^MAF:.*$" +syn match purifyLogMIU "^MIU:.*$" +syn match purifyLogSIG "^SIG:.*$" +syn match purifyLogWPF "^WPF:.*$" +syn match purifyLogWPM "^WPM:.*$" +syn match purifyLogWPN "^WPN:.*$" +syn match purifyLogWPR "^WPR:.*$" +syn match purifyLogWPW "^WPW:.*$" +syn match purifyLogWPX "^WPX:.*$" + +" Warning messages +syn match purifyLogABR "^ABR:.*$" +syn match purifyLogBSR "^BSR:.*$" +syn match purifyLogBSW "^BSW:.*$" +syn match purifyLogFMR "^FMR:.*$" +syn match purifyLogMLK "^MLK:.*$" +syn match purifyLogMSE "^MSE:.*$" +syn match purifyLogPAR "^PAR:.*$" +syn match purifyLogPLK "^PLK:.*$" +syn match purifyLogSBR "^SBR:.*$" +syn match purifyLogSOF "^SOF:.*$" +syn match purifyLogUMC "^UMC:.*$" +syn match purifyLogUMR "^UMR:.*$" + +" Corrupting messages +syn match purifyLogABW "^ABW:.*$" +syn match purifyLogBRK "^BRK:.*$" +syn match purifyLogFMW "^FMW:.*$" +syn match purifyLogFNH "^FNH:.*$" +syn match purifyLogFUM "^FUM:.*$" +syn match purifyLogMRE "^MRE:.*$" +syn match purifyLogSBW "^SBW:.*$" + +" Fatal messages +syn match purifyLogCOR "^COR:.*$" +syn match purifyLogNPR "^NPR:.*$" +syn match purifyLogNPW "^NPW:.*$" +syn match purifyLogZPR "^ZPR:.*$" +syn match purifyLogZPW "^ZPW:.*$" + +" 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_purifyLog_syntax_inits") + if version < 508 + let did_purifyLog_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink purifyLogFIU purifyLogInformational + HiLink purifyLogMAF purifyLogInformational + HiLink purifyLogMIU purifyLogInformational + HiLink purifyLogSIG purifyLogInformational + HiLink purifyLogWPF purifyLogInformational + HiLink purifyLogWPM purifyLogInformational + HiLink purifyLogWPN purifyLogInformational + HiLink purifyLogWPR purifyLogInformational + HiLink purifyLogWPW purifyLogInformational + HiLink purifyLogWPX purifyLogInformational + + HiLink purifyLogABR purifyLogWarning + HiLink purifyLogBSR purifyLogWarning + HiLink purifyLogBSW purifyLogWarning + HiLink purifyLogFMR purifyLogWarning + HiLink purifyLogMLK purifyLogWarning + HiLink purifyLogMSE purifyLogWarning + HiLink purifyLogPAR purifyLogWarning + HiLink purifyLogPLK purifyLogWarning + HiLink purifyLogSBR purifyLogWarning + HiLink purifyLogSOF purifyLogWarning + HiLink purifyLogUMC purifyLogWarning + HiLink purifyLogUMR purifyLogWarning + + HiLink purifyLogABW purifyLogCorrupting + HiLink purifyLogBRK purifyLogCorrupting + HiLink purifyLogFMW purifyLogCorrupting + HiLink purifyLogFNH purifyLogCorrupting + HiLink purifyLogFUM purifyLogCorrupting + HiLink purifyLogMRE purifyLogCorrupting + HiLink purifyLogSBW purifyLogCorrupting + + HiLink purifyLogCOR purifyLogFatal + HiLink purifyLogNPR purifyLogFatal + HiLink purifyLogNPW purifyLogFatal + HiLink purifyLogZPR purifyLogFatal + HiLink purifyLogZPW purifyLogFatal + + HiLink purifyLogHeader Comment + HiLink purifyLogInformational PreProc + HiLink purifyLogWarning Type + HiLink purifyLogCorrupting Error + HiLink purifyLogFatal Error + + delcommand HiLink +endif + +let b:current_syntax = "purifylog" + +" vim:ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/pyrex.vim b/vim/bundle/ubuntu-vim72/syntax/pyrex.vim new file mode 100644 index 0000000..7dc9b95 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/pyrex.vim @@ -0,0 +1,67 @@ +" Vim syntax file +" Language: Pyrex +" Maintainer: Marco Barisione +" URL: http://marcobari.altervista.org/pyrex_vim.html +" Last Change: 2009 Nov 09 + +" 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 + +" Read the Python syntax to start with +if version < 600 + so :p:h/python.vim +else + runtime! syntax/python.vim + unlet b:current_syntax +endif + +" Pyrex extentions +syn keyword pyrexStatement cdef typedef ctypedef sizeof +syn keyword pyrexType int long short float double char object void +syn keyword pyrexType signed unsigned +syn keyword pyrexStructure struct union enum +syn keyword pyrexInclude include cimport +syn keyword pyrexAccess public private property readonly extern +" If someome wants Python's built-ins highlighted probably he +" also wants Pyrex's built-ins highlighted +if exists("python_highlight_builtins") || exists("pyrex_highlight_builtins") + syn keyword pyrexBuiltin NULL +endif + +" This deletes "from" from the keywords and re-adds it as a +" match with lower priority than pyrexForFrom +syn clear pythonInclude +syn keyword pythonInclude import +syn match pythonInclude "from" + +" With "for[^:]*\zsfrom" VIM does not match "for" anymore, so +" I used the slower "\@<=" form +syn match pyrexForFrom "\(for[^:]*\)\@<=from" + +" Default highlighting +if version >= 508 || !exists("did_pyrex_syntax_inits") + if version < 508 + let did_pyrex_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + HiLink pyrexStatement Statement + HiLink pyrexType Type + HiLink pyrexStructure Structure + HiLink pyrexInclude PreCondit + HiLink pyrexAccess pyrexStatement + if exists("python_highlight_builtins") || exists("pyrex_highlight_builtins") + HiLink pyrexBuiltin Function + endif + HiLink pyrexForFrom Statement + + delcommand HiLink +endif + +let b:current_syntax = "pyrex" diff --git a/vim/bundle/ubuntu-vim72/syntax/python.vim b/vim/bundle/ubuntu-vim72/syntax/python.vim new file mode 100644 index 0000000..d590743 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/python.vim @@ -0,0 +1,295 @@ +" Vim syntax file +" Language: Python +" Maintainer: Neil Schemenauer +" Last Change: 2009-10-13 +" Credits: Zvezdan Petkovic +" Neil Schemenauer +" Dmitry Vasiliev +" +" This version is a major rewrite by Zvezdan Petkovic. +" +" - introduced highlighting of doctests +" - updated keywords, built-ins, and exceptions +" - corrected regular expressions for +" +" * functions +" * decorators +" * strings +" * escapes +" * numbers +" * space error +" +" - corrected synchronization +" - more highlighting is ON by default, except +" - space error highlighting is OFF by default +" +" Optional highlighting can be controlled using these variables. +" +" let python_no_builtin_highlight = 1 +" let python_no_doctest_code_highlight = 1 +" let python_no_doctest_highlight = 1 +" let python_no_exception_highlight = 1 +" let python_no_number_highlight = 1 +" let python_space_error_highlight = 1 +" +" All the options above can be switched on together. +" +" let python_highlight_all = 1 +" + +" 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 + +" Keep Python keywords in alphabetical order inside groups for easy +" comparison with the table in the 'Python Language Reference' +" http://docs.python.org/reference/lexical_analysis.html#keywords. +" Groups are in the order presented in NAMING CONVENTIONS in syntax.txt. +" Exceptions come last at the end of each group (class and def below). +" +" Keywords 'with' and 'as' are new in Python 2.6 +" (use 'from __future__ import with_statement' in Python 2.5). +" +" Some compromises had to be made to support both Python 3.0 and 2.6. +" We include Python 3.0 features, but when a definition is duplicated, +" the last definition takes precedence. +" +" - 'False', 'None', and 'True' are keywords in Python 3.0 but they are +" built-ins in 2.6 and will be highlighted as built-ins below. +" - 'exec' is a built-in in Python 3.0 and will be highlighted as +" built-in below. +" - 'nonlocal' is a keyword in Python 3.0 and will be highlighted. +" - 'print' is a built-in in Python 3.0 and will be highlighted as +" built-in below (use 'from __future__ import print_function' in 2.6) +" +syn keyword pythonStatement False, None, True +syn keyword pythonStatement as assert break continue del exec global +syn keyword pythonStatement lambda nonlocal pass print return with yield +syn keyword pythonStatement class def nextgroup=pythonFunction skipwhite +syn keyword pythonConditional elif else if +syn keyword pythonRepeat for while +syn keyword pythonOperator and in is not or +syn keyword pythonException except finally raise try +syn keyword pythonInclude from import + +" Decorators (new in Python 2.4) +syn match pythonDecorator "@" display nextgroup=pythonFunction skipwhite +" The zero-length non-grouping match before the function name is +" extremely important in pythonFunction. Without it, everything is +" interpreted as a function inside the contained environment of +" doctests. +" A dot must be allowed because of @MyClass.myfunc decorators. +syn match pythonFunction + \ "\%(\%(def\s\|class\s\|@\)\s*\)\@<=\h\%(\w\|\.\)*" contained + +syn match pythonComment "#.*$" contains=pythonTodo,@Spell +syn keyword pythonTodo FIXME NOTE NOTES TODO XXX contained + +" Triple-quoted strings can contain doctests. +syn region pythonString + \ start=+[uU]\=\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1" + \ contains=pythonEscape,@Spell +syn region pythonString + \ start=+[uU]\=\z('''\|"""\)+ end="\z1" keepend + \ contains=pythonEscape,pythonSpaceError,pythonDoctest,@Spell +syn region pythonRawString + \ start=+[uU]\=[rR]\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1" + \ contains=@Spell +syn region pythonRawString + \ start=+[uU]\=[rR]\z('''\|"""\)+ end="\z1" keepend + \ contains=pythonSpaceError,pythonDoctest,@Spell + +syn match pythonEscape +\\[abfnrtv'"\\]+ contained +syn match pythonEscape "\\\o\{1,3}" contained +syn match pythonEscape "\\x\x\{2}" contained +syn match pythonEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained +" Python allows case-insensitive Unicode IDs: http://www.unicode.org/charts/ +syn match pythonEscape "\\N{\a\+\%(\s\a\+\)*}" contained +syn match pythonEscape "\\$" + +if exists("python_highlight_all") + if exists("python_no_builtin_highlight") + unlet python_no_builtin_highlight + endif + if exists("python_no_doctest_code_highlight") + unlet python_no_doctest_code_highlight + endif + if exists("python_no_doctest_highlight") + unlet python_no_doctest_highlight + endif + if exists("python_no_exception_highlight") + unlet python_no_exception_highlight + endif + if exists("python_no_number_highlight") + unlet python_no_number_highlight + endif + let python_space_error_highlight = 1 +endif + +" It is very important to understand all details before changing the +" regular expressions below or their order. +" The word boundaries are *not* the floating-point number boundaries +" because of a possible leading or trailing decimal point. +" The expressions below ensure that all valid number literals are +" highlighted, and invalid number literals are not. For example, +" +" - a decimal point in '4.' at the end of a line is highlighted, +" - a second dot in 1.0.0 is not highlighted, +" - 08 is not highlighted, +" - 08e0 or 08j are highlighted, +" +" and so on, as specified in the 'Python Language Reference'. +" http://docs.python.org/reference/lexical_analysis.html#numeric-literals +if !exists("python_no_number_highlight") + " numbers (including longs and complex) + syn match pythonNumber "\<0[oO]\=\o\+[Ll]\=\>" + syn match pythonNumber "\<0[xX]\x\+[Ll]\=\>" + syn match pythonNumber "\<0[bB][01]\+[Ll]\=\>" + syn match pythonNumber "\<\%([1-9]\d*\|0\)[Ll]\=\>" + syn match pythonNumber "\<\d\+[jJ]\>" + syn match pythonNumber "\<\d\+[eE][+-]\=\d\+[jJ]\=\>" + syn match pythonNumber + \ "\<\d\+\.\%([eE][+-]\=\d\+\)\=[jJ]\=\%(\W\|$\)\@=" + syn match pythonNumber + \ "\%(^\|\W\)\@<=\d*\.\d\+\%([eE][+-]\=\d\+\)\=[jJ]\=\>" +endif + +" Group the built-ins in the order in the 'Python Library Reference' for +" easier comparison. +" http://docs.python.org/library/constants.html +" http://docs.python.org/library/functions.html +" http://docs.python.org/library/functions.html#non-essential-built-in-functions +" Python built-in functions are in alphabetical order. +if !exists("python_no_builtin_highlight") + " built-in constants + " 'False', 'True', and 'None' are also reserved words in Python 3.0 + syn keyword pythonBuiltin False True None + syn keyword pythonBuiltin NotImplemented Ellipsis __debug__ + " built-in functions + syn keyword pythonBuiltin abs all any bin bool chr classmethod + syn keyword pythonBuiltin compile complex delattr dict dir divmod + syn keyword pythonBuiltin enumerate eval filter float format + syn keyword pythonBuiltin frozenset getattr globals hasattr hash + syn keyword pythonBuiltin help hex id input int isinstance + syn keyword pythonBuiltin issubclass iter len list locals map max + syn keyword pythonBuiltin min next object oct open ord pow print + syn keyword pythonBuiltin property range repr reversed round set + syn keyword pythonBuiltin setattr slice sorted staticmethod str + syn keyword pythonBuiltin sum super tuple type vars zip __import__ + " Python 2.6 only + syn keyword pythonBuiltin basestring callable cmp execfile file + syn keyword pythonBuiltin long raw_input reduce reload unichr + syn keyword pythonBuiltin unicode xrange + " Python 3.0 only + syn keyword pythonBuiltin ascii bytearray bytes exec memoryview + " non-essential built-in functions; Python 2.6 only + syn keyword pythonBuiltin apply buffer coerce intern +endif + +" From the 'Python Library Reference' class hierarchy at the bottom. +" http://docs.python.org/library/exceptions.html +if !exists("python_no_exception_highlight") + " builtin base exceptions (only used as base classes for other exceptions) + syn keyword pythonExceptions BaseException Exception + syn keyword pythonExceptions ArithmeticError EnvironmentError + syn keyword pythonExceptions LookupError + " builtin base exception removed in Python 3.0 + syn keyword pythonExceptions StandardError + " builtin exceptions (actually raised) + syn keyword pythonExceptions AssertionError AttributeError BufferError + syn keyword pythonExceptions EOFError FloatingPointError GeneratorExit + syn keyword pythonExceptions IOError ImportError IndentationError + syn keyword pythonExceptions IndexError KeyError KeyboardInterrupt + syn keyword pythonExceptions MemoryError NameError NotImplementedError + syn keyword pythonExceptions OSError OverflowError ReferenceError + syn keyword pythonExceptions RuntimeError StopIteration SyntaxError + syn keyword pythonExceptions SystemError SystemExit TabError TypeError + syn keyword pythonExceptions UnboundLocalError UnicodeError + syn keyword pythonExceptions UnicodeDecodeError UnicodeEncodeError + syn keyword pythonExceptions UnicodeTranslateError ValueError VMSError + syn keyword pythonExceptions WindowsError ZeroDivisionError + " builtin warnings + syn keyword pythonExceptions BytesWarning DeprecationWarning FutureWarning + syn keyword pythonExceptions ImportWarning PendingDeprecationWarning + syn keyword pythonExceptions RuntimeWarning SyntaxWarning UnicodeWarning + syn keyword pythonExceptions UserWarning Warning +endif + +if exists("python_space_error_highlight") + " trailing whitespace + syn match pythonSpaceError display excludenl "\s\+$" + " mixed tabs and spaces + syn match pythonSpaceError display " \+\t" + syn match pythonSpaceError display "\t\+ " +endif + +" Do not spell doctests inside strings. +" Notice that the end of a string, either ''', or """, will end the contained +" doctest too. Thus, we do *not* need to have it as an end pattern. +if !exists("python_no_doctest_highlight") + if !exists("python_no_doctest_code_higlight") + syn region pythonDoctest + \ start="^\s*>>>\s" end="^\s*$" + \ contained contains=ALLBUT,pythonDoctest,@Spell + syn region pythonDoctestValue + \ start=+^\s*\%(>>>\s\|\.\.\.\s\|"""\|'''\)\@!\S\++ end="$" + \ contained + else + syn region pythonDoctest + \ start="^\s*>>>" end="^\s*$" + \ contained contains=@NoSpell + endif +endif + +" Sync at the beginning of class, function, or method definition. +syn sync match pythonSync grouphere NONE "^\s*\%(def\|class\)\s\+\h\w*\s*(" + +if version >= 508 || !exists("did_python_syn_inits") + if version <= 508 + let did_python_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " The default highlight links. Can be overridden later. + HiLink pythonStatement Statement + HiLink pythonConditional Conditional + HiLink pythonRepeat Repeat + HiLink pythonOperator Operator + HiLink pythonException Exception + HiLink pythonInclude Include + HiLink pythonDecorator Define + HiLink pythonFunction Function + HiLink pythonComment Comment + HiLink pythonTodo Todo + HiLink pythonString String + HiLink pythonRawString String + HiLink pythonEscape Special + if !exists("python_no_number_highlight") + HiLink pythonNumber Number + endif + if !exists("python_no_builtin_highlight") + HiLink pythonBuiltin Function + endif + if !exists("python_no_exception_highlight") + HiLink pythonExceptions Structure + endif + if exists("python_space_error_highlight") + HiLink pythonSpaceError Error + endif + if !exists("python_no_doctest_highlight") + HiLink pythonDoctest Special + HiLink pythonDoctestValue Define + endif + + delcommand HiLink +endif + +let b:current_syntax = "python" + +" vim:set sw=2 sts=2 ts=8 noet: diff --git a/vim/bundle/ubuntu-vim72/syntax/qf.vim b/vim/bundle/ubuntu-vim72/syntax/qf.vim new file mode 100644 index 0000000..5c987a9 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/qf.vim @@ -0,0 +1,24 @@ +" Vim syntax file +" Language: Quickfix window +" Maintainer: Bram Moolenaar +" Last change: 2001 Jan 15 + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" A bunch of useful C keywords +syn match qfFileName "^[^|]*" nextgroup=qfSeparator +syn match qfSeparator "|" nextgroup=qfLineNr contained +syn match qfLineNr "[^|]*" contained contains=qfError +syn match qfError "error" contained + +" The default highlighting. +hi def link qfFileName Directory +hi def link qfLineNr LineNr +hi def link qfError Error + +let b:current_syntax = "qf" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/quake.vim b/vim/bundle/ubuntu-vim72/syntax/quake.vim new file mode 100644 index 0000000..3a9b68d --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/quake.vim @@ -0,0 +1,170 @@ +" Vim syntax file +" Language: Quake[1-3] configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2007-06-17 +" quake_is_quake1 - the syntax is to be used for quake1 configs +" quake_is_quake2 - the syntax is to be used for quake2 configs +" quake_is_quake3 - the syntax is to be used for quake3 configs +" Credits: Tomasz Kalkosinski wrote the original quake3Colors stuff + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +setlocal iskeyword+=-,+ + +syn keyword quakeTodo contained TODO FIXME XXX NOTE + +syn region quakeComment display oneline start='//' end='$' end=';' + \ keepend contains=quakeTodo,@Spell + +syn region quakeString display oneline start=+"+ skip=+\\\\\|\\"+ + \ end=+"\|$+ contains=quakeNumbers, + \ @quakeCommands,@quake3Colors + +syn case ignore + +syn match quakeNumbers display transparent '\<-\=\d\|\.\d' + \ contains=quakeNumber,quakeFloat, + \ quakeOctalError,quakeOctal +syn match quakeNumber contained display '\d\+\>' +syn match quakeFloat contained display '\d\+\.\d*' +syn match quakeFloat contained display '\.\d\+\>' + +if exists("quake_is_quake1") || exists("quake_is_quake2") + syn match quakeOctal contained display '0\o\+\>' + \ contains=quakeOctalZero + syn match quakeOctalZero contained display '\<0' + syn match quakeOctalError contained display '0\o*[89]\d*' +endif + +syn cluster quakeCommands contains=quakeCommand,quake1Command, + \ quake12Command,Quake2Command,Quake23Command, + \ Quake3Command + +syn keyword quakeCommand +attack +back +forward +left +lookdown +lookup +syn keyword quakeCommand +mlook +movedown +moveleft +moveright +moveup +syn keyword quakeCommand +right +speed +strafe -attack -back bind +syn keyword quakeCommand bindlist centerview clear connect cvarlist dir +syn keyword quakeCommand disconnect dumpuser echo error exec -forward +syn keyword quakeCommand god heartbeat joy_advancedupdate kick kill +syn keyword quakeCommand killserver -left -lookdown -lookup map +syn keyword quakeCommand messagemode messagemode2 -mlook modellist +syn keyword quakeCommand -movedown -moveleft -moveright -moveup play +syn keyword quakeCommand quit rcon reconnect record -right say say_team +syn keyword quakeCommand screenshot serverinfo serverrecord serverstop +syn keyword quakeCommand set sizedown sizeup snd_restart soundinfo +syn keyword quakeCommand soundlist -speed spmap status -strafe stopsound +syn keyword quakeCommand toggleconsole unbind unbindall userinfo pause +syn keyword quakeCommand vid_restart viewpos wait weapnext weapprev + +if exists("quake_is_quake1") + syn keyword quake1Command sv +endif + +if exists("quake_is_quake1") || exists("quake_is_quake2") + syn keyword quake12Command +klook alias cd impulse link load save + syn keyword quake12Command timerefresh changing info loading + syn keyword quake12Command pingservers playerlist players score +endif + +if exists("quake_is_quake2") + syn keyword quake2Command cmd demomap +use condump download drop gamemap + syn keyword quake2Command give gun_model setmaster sky sv_maplist wave + syn keyword quake2Command cmdlist gameversiona gun_next gun_prev invdrop + syn keyword quake2Command inven invnext invnextp invnextw invprev + syn keyword quake2Command invprevp invprevw invuse menu_addressbook + syn keyword quake2Command menu_credits menu_dmoptions menu_game + syn keyword quake2Command menu_joinserver menu_keys menu_loadgame + syn keyword quake2Command menu_main menu_multiplayer menu_options + syn keyword quake2Command menu_playerconfig menu_quit menu_savegame + syn keyword quake2Command menu_startserver menu_video + syn keyword quake2Command notarget precache prog togglechat vid_front + syn keyword quake2Command weaplast +endif + +if exists("quake_is_quake2") || exists("quake_is_quake3") + syn keyword quake23Command imagelist modellist path z_stats +endif + +if exists("quake_is_quake3") + syn keyword quake3Command +info +scores +zoom addbot arena banClient + syn keyword quake3Command banUser callteamvote callvote changeVectors + syn keyword quake3Command cinematic clientinfo clientkick cmd cmdlist + syn keyword quake3Command condump configstrings crash cvar_restart devmap + syn keyword quake3Command fdir follow freeze fs_openedList Fs_pureList + syn keyword quake3Command Fs_referencedList gfxinfo globalservers + syn keyword quake3Command hunk_stats in_restart -info levelshot + syn keyword quake3Command loaddeferred localservers map_restart mem_info + syn keyword quake3Command messagemode3 messagemode4 midiinfo model music + syn keyword quake3Command modelist net_restart nextframe nextskin noclip + syn keyword quake3Command notarget ping prevframe prevskin reset restart + syn keyword quake3Command s_disable_a3d s_enable_a3d s_info s_list s_stop + syn keyword quake3Command scanservers -scores screenshotJPEG sectorlist + syn keyword quake3Command serverstatus seta setenv sets setu setviewpos + syn keyword quake3Command shaderlist showip skinlist spdevmap startOribt + syn keyword quake3Command stats stopdemo stoprecord systeminfo togglemenu + syn keyword quake3Command tcmd team teamtask teamvote tell tell_attacker + syn keyword quake3Command tell_target testgun testmodel testshader toggle + syn keyword quake3Command touchFile vminfo vmprofile vmtest vosay + syn keyword quake3Command vosay_team vote votell vsay vsay_team vstr + syn keyword quake3Command vtaunt vtell vtell_attacker vtell_target weapon + syn keyword quake3Command writeconfig -zoom + syn match quake3Command display "\<[+-]button\(\d\|1[0-4]\)\>" +endif + +if exists("quake_is_quake3") + syn cluster quake3Colors contains=quake3Red,quake3Green,quake3Yellow, + \ quake3Blue,quake3Cyan,quake3Purple,quake3White, + \ quake3Orange,quake3Grey,quake3Black,quake3Shadow + + syn region quake3Red contained start=+\^1+hs=e+1 end=+[$^"\n]+he=e-1 + syn region quake3Green contained start=+\^2+hs=e+1 end=+[$^"\n]+he=e-1 + syn region quake3Yellow contained start=+\^3+hs=e+1 end=+[$^"\n]+he=e-1 + syn region quake3Blue contained start=+\^4+hs=e+1 end=+[$^"\n]+he=e-1 + syn region quake3Cyan contained start=+\^5+hs=e+1 end=+[$^"\n]+he=e-1 + syn region quake3Purple contained start=+\^6+hs=e+1 end=+[$^"\n]+he=e-1 + syn region quake3White contained start=+\^7+hs=e+1 end=+[$^"\n]+he=e-1 + syn region quake3Orange contained start=+\^8+hs=e+1 end=+[$^\"\n]+he=e-1 + syn region quake3Grey contained start=+\^9+hs=e+1 end=+[$^"\n]+he=e-1 + syn region quake3Black contained start=+\^0+hs=e+1 end=+[$^"\n]+he=e-1 + syn region quake3Shadow contained start=+\^[Xx]+hs=e+1 end=+[$^"\n]+he=e-1 +endif + +hi def link quakeComment Comment +hi def link quakeTodo Todo +hi def link quakeString String +hi def link quakeNumber Number +hi def link quakeOctal Number +hi def link quakeOctalZero PreProc +hi def link quakeFloat Number +hi def link quakeOctalError Error +hi def link quakeCommand quakeCommands +hi def link quake1Command quakeCommands +hi def link quake12Command quakeCommands +hi def link quake2Command quakeCommands +hi def link quake23Command quakeCommands +hi def link quake3Command quakeCommands +hi def link quakeCommands Keyword + +if exists("quake_is_quake3") + hi quake3Red ctermfg=Red guifg=Red + hi quake3Green ctermfg=Green guifg=Green + hi quake3Yellow ctermfg=Yellow guifg=Yellow + hi quake3Blue ctermfg=Blue guifg=Blue + hi quake3Cyan ctermfg=Cyan guifg=Cyan + hi quake3Purple ctermfg=DarkMagenta guifg=Purple + hi quake3White ctermfg=White guifg=White + hi quake3Black ctermfg=Black guifg=Black + hi quake3Orange ctermfg=Brown guifg=Orange + hi quake3Grey ctermfg=LightGrey guifg=LightGrey + hi quake3Shadow cterm=underline gui=underline +endif + +let b:current_syntax = "quake" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/r.vim b/vim/bundle/ubuntu-vim72/syntax/r.vim new file mode 100644 index 0000000..f3e730e --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/r.vim @@ -0,0 +1,111 @@ +" Vim syntax file +" Language: R (GNU S) +" Maintainer: Vaidotas Zemlys +" Last Change: 2006 Apr 30 +" Filenames: *.R *.Rout *.r *.Rhistory *.Rt *.Rout.save *.Rout.fail +" URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/r.vim + +" First maintainer Tom Payne +" Modified to make syntax less colourful and added the highlighting of +" R assignment arrow + +" 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 + +if version >= 600 + setlocal iskeyword=@,48-57,_,. +else + set iskeyword=@,48-57,_,. +endif + +syn case match + +" Comment +syn match rComment /\#.*/ + +" Constant +" string enclosed in double quotes +syn region rString start=/"/ skip=/\\\\\|\\"/ end=/"/ +" string enclosed in single quotes +syn region rString start=/'/ skip=/\\\\\|\\'/ end=/'/ +" number with no fractional part or exponent +syn match rNumber /\d\+/ +" floating point number with integer and fractional parts and optional exponent +syn match rFloat /\d\+\.\d*\([Ee][-+]\=\d\+\)\=/ +" floating point number with no integer part and optional exponent +syn match rFloat /\.\d\+\([Ee][-+]\=\d\+\)\=/ +" floating point number with no fractional part and optional exponent +syn match rFloat /\d\+[Ee][-+]\=\d\+/ + +" Identifier +" identifier with leading letter and optional following keyword characters +syn match rIdentifier /\a\k*/ +" identifier with leading period, one or more digits, and at least one non-digit keyword character +syn match rIdentifier /\.\d*\K\k*/ + +" Statement +syn keyword rStatement break next return +syn keyword rConditional if else +syn keyword rRepeat for in repeat while + +" Constant +syn keyword rConstant LETTERS letters month.ab month.name pi +syn keyword rConstant NULL +syn keyword rBoolean FALSE TRUE +syn keyword rNumber NA +syn match rArrow /<\{1,2}-/ + +" Type +syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame + +" Special +syn match rDelimiter /[,;:]/ + +" Error +syn region rRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError +syn region rRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError +syn region rRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError +syn match rError /[)\]}]/ +syn match rBraceError /[)}]/ contained +syn match rCurlyError /[)\]]/ contained +syn match rParenError /[\]}]/ contained + +" 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_r_syn_inits") + if version < 508 + let did_r_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + HiLink rComment Comment + HiLink rConstant Constant + HiLink rString String + HiLink rNumber Number + HiLink rBoolean Boolean + HiLink rFloat Float + HiLink rStatement Statement + HiLink rConditional Conditional + HiLink rRepeat Repeat + HiLink rIdentifier Normal + HiLink rArrow Statement + HiLink rType Type + HiLink rDelimiter Delimiter + HiLink rError Error + HiLink rBraceError Error + HiLink rCurlyError Error + HiLink rParenError Error + delcommand HiLink +endif + +let b:current_syntax="r" + +" vim: ts=8 sw=2 + diff --git a/vim/bundle/ubuntu-vim72/syntax/racc.vim b/vim/bundle/ubuntu-vim72/syntax/racc.vim new file mode 100644 index 0000000..d412227 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/racc.vim @@ -0,0 +1,142 @@ +" Vim default file +" Language: Racc input file +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-06-22 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword raccTodo contained TODO FIXME XXX NOTE + +syn region raccComment start='/\*' end='\*/' + \ contains=raccTodo,@Spell +syn region raccComment display oneline start='#' end='$' + \ contains=raccTodo,@Spell + +syn region raccClass transparent matchgroup=raccKeyword + \ start='\' end='\'he=e-4 + \ contains=raccComment,raccPrecedence, + \ raccTokenDecl,raccExpect,raccOptions,raccConvert, + \ raccStart, + +syn region raccPrecedence transparent matchgroup=raccKeyword + \ start='\' end='\' + \ contains=raccComment,raccPrecSpec + +syn keyword raccPrecSpec contained nonassoc left right + \ nextgroup=raccPrecToken,raccPrecString skipwhite + \ skipnl + +syn match raccPrecToken contained '\<\u[A-Z0-9_]*\>' + \ nextgroup=raccPrecToken,raccPrecString skipwhite + \ skipnl + +syn region raccPrecString matchgroup=raccPrecString start=+"+ + \ skip=+\\\\\|\\"+ end=+"+ + \ contains=raccSpecial + \ nextgroup=raccPrecToken,raccPrecString skipwhite + \ skipnl +syn region raccPrecString matchgroup=raccPrecString start=+'+ + \ skip=+\\\\\|\\'+ end=+'+ contains=raccSpecial + \ nextgroup=raccPrecToken,raccPrecString skipwhite + \ skipnl + +syn keyword raccTokenDecl contained token + \ nextgroup=raccTokenR skipwhite skipnl + +syn match raccTokenR contained '\<\u[A-Z0-9_]*\>' + \ nextgroup=raccTokenR skipwhite skipnl + +syn keyword raccExpect contained expect + \ nextgroup=raccNumber skipwhite skipnl + +syn match raccNumber contained '\<\d\+\>' + +syn keyword raccOptions contained options + \ nextgroup=raccOptionsR skipwhite skipnl + +syn keyword raccOptionsR contained omit_action_call result_var + \ nextgroup=raccOptionsR skipwhite skipnl + +syn region raccConvert transparent contained matchgroup=raccKeyword + \ start='\' end='\' + \ contains=raccComment,raccConvToken skipwhite + \ skipnl + +syn match raccConvToken contained '\<\u[A-Z0-9_]*\>' + \ nextgroup=raccString skipwhite skipnl + +syn keyword raccStart contained start + \ nextgroup=raccTargetS skipwhite skipnl + +syn match raccTargetS contained '\<\l[a-z0-9_]*\>' + +syn match raccSpecial contained '\\["'\\]' + +syn region raccString start=+"+ skip=+\\\\\|\\"+ end=+"+ + \ contains=raccSpecial +syn region raccString start=+'+ skip=+\\\\\|\\'+ end=+'+ + \ contains=raccSpecial + +syn region raccRules transparent matchgroup=raccKeyword start='\' + \ end='\' contains=raccComment,raccString, + \ raccNumber,raccToken,raccTarget,raccDelimiter, + \ raccAction + +syn match raccTarget contained '\<\l[a-z0-9_]*\>' + +syn match raccDelimiter contained '[:|]' + +syn match raccToken contained '\<\u[A-Z0-9_]*\>' + +syn include @raccRuby syntax/ruby.vim + +syn region raccAction transparent matchgroup=raccDelimiter + \ start='{' end='}' contains=@raccRuby + +syn region raccHeader transparent matchgroup=raccPreProc + \ start='^---- header.*' end='^----'he=e-4 + \ contains=@raccRuby + +syn region raccInner transparent matchgroup=raccPreProc + \ start='^---- inner.*' end='^----'he=e-4 + \ contains=@raccRuby + +syn region raccFooter transparent matchgroup=raccPreProc + \ start='^---- footer.*' end='^----'he=e-4 + \ contains=@raccRuby + +syn sync match raccSyncHeader grouphere raccHeader '^---- header' +syn sync match raccSyncInner grouphere raccInner '^---- inner' +syn sync match raccSyncFooter grouphere raccFooter '^---- footer' + +hi def link raccTodo Todo +hi def link raccComment Comment +hi def link raccPrecSpec Type +hi def link raccPrecToken raccToken +hi def link raccPrecString raccString +hi def link raccTokenDecl Keyword +hi def link raccToken Identifier +hi def link raccTokenR raccToken +hi def link raccExpect Keyword +hi def link raccNumber Number +hi def link raccOptions Keyword +hi def link raccOptionsR Identifier +hi def link raccConvToken raccToken +hi def link raccStart Keyword +hi def link raccTargetS Type +hi def link raccSpecial special +hi def link raccString String +hi def link raccTarget Type +hi def link raccDelimiter Delimiter +hi def link raccPreProc PreProc +hi def link raccKeyword Keyword + +let b:current_syntax = "racc" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/radiance.vim b/vim/bundle/ubuntu-vim72/syntax/radiance.vim new file mode 100644 index 0000000..461b708 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/radiance.vim @@ -0,0 +1,159 @@ +" Vim syntax file +" Language: Radiance Scene Description +" Maintainer: Georg Mischler +" Last change: 26. April. 2001 + +" Radiance is a lighting simulation software package written +" by Gregory Ward-Larson ("the computer artist formerly known +" as Greg Ward"), then at LBNL. +" +" http://radsite.lbl.gov/radiance/HOME.html +" +" Of course, there is also information available about it +" from http://www.schorsch.com/ + + +" We take a minimalist approach here, highlighting just the +" essential properties of each object, its type and ID, as well as +" comments, external command names and the null-modifier "void". + + +" 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 + +" all printing characters except '#' and '!' are valid in names. +if version >= 600 + setlocal iskeyword=\",$-~ +else + set iskeyword=\",$-~ +endif + +" The null-modifier +syn keyword radianceKeyword void + +" The different kinds of scene description object types +" Reference types +syn keyword radianceExtraType contained alias instance +" Surface types +syn keyword radianceSurfType contained ring polygon sphere bubble +syn keyword radianceSurfType contained cone cup cylinder tube source +" Emitting material types +syn keyword radianceLightType contained light glow illum spotlight +" Material types +syn keyword radianceMatType contained mirror mist prism1 prism2 +syn keyword radianceMatType contained metal plastic trans +syn keyword radianceMatType contained metal2 plastic2 trans2 +syn keyword radianceMatType contained metfunc plasfunc transfunc +syn keyword radianceMatType contained metdata plasdata transdata +syn keyword radianceMatType contained dielectric interface glass +syn keyword radianceMatType contained BRTDfunc antimatter +" Pattern modifier types +syn keyword radiancePatType contained colorfunc brightfunc +syn keyword radiancePatType contained colordata colorpict brightdata +syn keyword radiancePatType contained colortext brighttext +" Texture modifier types +syn keyword radianceTexType contained texfunc texdata +" Mixture types +syn keyword radianceMixType contained mixfunc mixdata mixpict mixtext + + +" Each type name is followed by an ID. +" This doesn't work correctly if the id is one of the type names of the +" same class (which is legal for radiance), in which case the id will get +" type color as well, and the int count (or alias reference) gets id color. + +syn region radianceID start="\" end="\<\k*\>" contains=radianceExtraType +syn region radianceID start="\" end="\<\k*\>" contains=radianceExtraType + +syn region radianceID start="\" end="\<\k*\>" contains=radianceSurfType +syn region radianceID start="\" end="\<\k*\>" contains=radianceSurfType +syn region radianceID start="\" end="\<\k*\>" contains=radianceSurfType +syn region radianceID start="\" end="\<\k*\>" contains=radianceSurfType +syn region radianceID start="\" end="\<\k*\>" contains=radianceSurfType +syn region radianceID start="\" end="\<\k*\>" contains=radianceSurfType +syn region radianceID start="\" end="\<\k*\>" contains=radianceSurfType +syn region radianceID start="\" end="\<\k*\>" contains=radianceSurfType +syn region radianceID start="\" end="\<\k*\>" contains=radianceSurfType + +syn region radianceID start="\" end="\<\k*\>" contains=radianceLightType +syn region radianceID start="\" end="\<\k*\>" contains=radianceLightType +syn region radianceID start="\" end="\<\k*\>" contains=radianceLightType +syn region radianceID start="\" end="\<\k*\>" contains=radianceLightType + +syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType + +syn region radianceID start="\" end="\<\k*\>" contains=radiancePatType +syn region radianceID start="\" end="\<\k*\>" contains=radiancePatType +syn region radianceID start="\" end="\<\k*\>" contains=radiancePatType +syn region radianceID start="\" end="\<\k*\>" contains=radiancePatType +syn region radianceID start="\" end="\<\k*\>" contains=radiancePatType +syn region radianceID start="\" end="\<\k*\>" contains=radiancePatType +syn region radianceID start="\" end="\<\k*\>" contains=radiancePatType + +syn region radianceID start="\" end="\<\k*\>" contains=radianceTexType +syn region radianceID start="\" end="\<\k*\>" contains=radianceTexType + +syn region radianceID start="\" end="\<\k*\>" contains=radianceMixType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMixType +syn region radianceID start="\" end="\<\k*\>" contains=radianceMixType + +" external commands (generators, xform et al.) +syn match radianceCommand "^\s*!\s*[^\s]\+\>" + +" The usual suspects +syn keyword radianceTodo contained TODO XXX +syn match radianceComment "#.*$" contains=radianceTodo + +" 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_radiance_syn_inits") + if version < 508 + let did_radiance_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + HiLink radianceKeyword Keyword + HiLink radianceExtraType Type + HiLink radianceSurfType Type + HiLink radianceLightType Type + HiLink radianceMatType Type + HiLink radiancePatType Type + HiLink radianceTexType Type + HiLink radianceMixType Type + HiLink radianceComment Comment + HiLink radianceCommand Function + HiLink radianceID String + HiLink radianceTodo Todo + delcommand HiLink +endif + +let b:current_syntax = "radiance" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/ratpoison.vim b/vim/bundle/ubuntu-vim72/syntax/ratpoison.vim new file mode 100644 index 0000000..b147560 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/ratpoison.vim @@ -0,0 +1,272 @@ +" Vim syntax file +" Language: Ratpoison configuration/commands file ( /etc/ratpoisonrc ~/.ratpoisonrc ) +" Maintainer: Doug Kearns +" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/ratpoison.vim +" Last Change: 2005 Oct 06 + +" 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 match ratpoisonComment "^\s*#.*$" contains=ratpoisonTodo + +syn keyword ratpoisonTodo TODO NOTE FIXME XXX contained + +syn case ignore +syn keyword ratpoisonBooleanArg on off contained +syn case match + +syn keyword ratpoisonCommandArg abort addhook alias banish chdir contained +syn keyword ratpoisonCommandArg clrunmanaged cnext colon compat cother contained +syn keyword ratpoisonCommandArg cprev curframe dedicate definekey delete contained +syn keyword ratpoisonCommandArg delkmap describekey echo escape exec contained +syn keyword ratpoisonCommandArg fdump focus focusdown focuslast focusleft contained +syn keyword ratpoisonCommandArg focusprev focusright focusup frestore fselect contained +syn keyword ratpoisonCommandArg gdelete getenv getsel gmerge gmove contained +syn keyword ratpoisonCommandArg gnew gnewbg gnext gprev gravity contained +syn keyword ratpoisonCommandArg groups gselect help hsplit inext contained +syn keyword ratpoisonCommandArg info iother iprev kill lastmsg contained +syn keyword ratpoisonCommandArg license link listhook meta msgwait contained +syn keyword ratpoisonCommandArg newkmap newwm next nextscreen number contained +syn keyword ratpoisonCommandArg only other prev prevscreen prompt contained +syn keyword ratpoisonCommandArg putsel quit ratclick rathold ratrelwarp contained +syn keyword ratpoisonCommandArg ratwarp readkey redisplay redo remhook contained +syn keyword ratpoisonCommandArg remove resize restart rudeness sdump contained +syn keyword ratpoisonCommandArg select set setenv sfdump shrink contained +syn keyword ratpoisonCommandArg source sselect startup_message time title contained +syn keyword ratpoisonCommandArg tmpwm unalias undefinekey undo unmanage contained +syn keyword ratpoisonCommandArg unsetenv verbexec version vsplit warp contained +syn keyword ratpoisonCommandArg windows contained + +syn match ratpoisonGravityArg "\<\(n\|north\)\>" contained +syn match ratpoisonGravityArg "\<\(nw\|northwest\)\>" contained +syn match ratpoisonGravityArg "\<\(ne\|northeast\)\>" contained +syn match ratpoisonGravityArg "\<\(w\|west\)\>" contained +syn match ratpoisonGravityArg "\<\(c\|center\)\>" contained +syn match ratpoisonGravityArg "\<\(e\|east\)\>" contained +syn match ratpoisonGravityArg "\<\(s\|south\)\>" contained +syn match ratpoisonGravityArg "\<\(sw\|southwest\)\>" contained +syn match ratpoisonGravityArg "\<\(se\|southeast\)\>" contained +syn case match + +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(F[1-9][0-9]\=\|\(\a\|\d\)\)\>" contained nextgroup=ratpoisonCommandArg skipwhite + +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(space\|exclam\|quotedbl\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(numbersign\|dollar\|percent\|ampersand\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(apostrophe\|quoteright\|parenleft\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(parenright\|asterisk\|plus\|comma\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(minus\|period\|slash\|colon\|semicolon\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(less\|equal\|greater\|question\|at\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(bracketleft\|backslash\|bracketright\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(asciicircum\|underscore\|grave\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(quoteleft\|braceleft\|bar\|braceright\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(asciitilde\)\>" contained nextgroup=ratpoisonCommandArg skipwhite + +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(BackSpace\|Tab\|Linefeed\|Clear\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Return\|Pause\|Scroll_Lock\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Sys_Req\|Escape\|Delete\)\>" contained nextgroup=ratpoisonCommandArg skipwhite + +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Home\|Left\|Up\|Right\|Down\|Prior\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Page_Up\|Next\|Page_Down\|End\|Begin\)\>" contained nextgroup=ratpoisonCommandArg skipwhite + +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Select\|Print\|Execute\|Insert\|Undo\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Redo\|Menu\|Find\|Cancel\|Help\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Break\|Mode_switch\|script_switch\|Num_Lock\)\>" contained nextgroup=ratpoisonCommandArg skipwhite + +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(Space\|Tab\|Enter\|F[1234]\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(Home\|Left\|Up\|Right\|Down\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(Prior\|Page_Up\|Next\|Page_Down\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(End\|Begin\|Insert\|Delete\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(Equal\|Multiply\|Add\|Separator\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(Subtract\|Decimal\|Divide\|\d\)\>" contained nextgroup=ratpoisonCommandArg skipwhite + +syn match ratpoisonHookArg "\<\(key\|switchwin\|switchframe\|switchgroup\|quit\|restart\)\>" contained + +syn match ratpoisonNumberArg "\<\d\+\>" contained nextgroup=ratpoisonNumberArg skipwhite + +syn keyword ratpoisonSetArg barborder contained nextgroup=ratpoisonNumberArg +syn keyword ratpoisonSetArg bargravity contained nextgroup=ratpoisonGravityArg +syn keyword ratpoisonSetArg barpadding contained nextgroup=ratpoisonNumberArg +syn keyword ratpoisonSetArg bgcolor +syn keyword ratpoisonSetArg border contained nextgroup=ratpoisonNumberArg +syn keyword ratpoisonSetArg fgcolor +syn keyword ratpoisonSetArg font +syn keyword ratpoisonSetArg framesels +syn keyword ratpoisonSetArg inputwidth contained nextgroup=ratpoisonNumberArg +syn keyword ratpoisonSetArg maxsizegravity contained nextgroup=ratpoisonGravityArg +syn keyword ratpoisonSetArg padding contained nextgroup=ratpoisonNumberArg +syn keyword ratpoisonSetArg resizeunit contained nextgroup=ratpoisonNumberArg +syn keyword ratpoisonSetArg transgravity contained nextgroup=ratpoisonGravityArg +syn keyword ratpoisonSetArg waitcursor contained nextgroup=ratpoisonNumberArg +syn keyword ratpoisonSetArg winfmt contained nextgroup=ratpoisonWinFmtArg +syn keyword ratpoisonSetArg wingravity contained nextgroup=ratpoisonGravityArg +syn keyword ratpoisonSetArg winliststyle contained nextgroup=ratpoisonWinListArg +syn keyword ratpoisonSetArg winname contained nextgroup=ratpoisonWinNameArg + +syn match ratpoisonWinFmtArg "%[nstacil]" contained nextgroup=ratpoisonWinFmtArg skipwhite + +syn match ratpoisonWinListArg "\<\(row\|column\)\>" contained + +syn match ratpoisonWinNameArg "\<\(name\|title\|class\)\>" contained + +syn match ratpoisonDefCommand "^\s*set\s*" nextgroup=ratpoisonSetArg +syn match ratpoisonDefCommand "^\s*defbarborder\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonDefCommand "^\s*defbargravity\s*" nextgroup=ratpoisonGravityArg +syn match ratpoisonDefCommand "^\s*defbarpadding\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonDefCommand "^\s*defbgcolor\s*" +syn match ratpoisonDefCommand "^\s*defborder\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonDefCommand "^\s*deffgcolor\s*" +syn match ratpoisonDefCommand "^\s*deffont\s*" +syn match ratpoisonDefCommand "^\s*defframesels\s*" +syn match ratpoisonDefCommand "^\s*definputwidth\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonDefCommand "^\s*defmaxsizegravity\s*" nextgroup=ratpoisonGravityArg +syn match ratpoisonDefCommand "^\s*defpadding\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonDefCommand "^\s*defresizeunit\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonDefCommand "^\s*deftransgravity\s*" nextgroup=ratpoisonGravityArg +syn match ratpoisonDefCommand "^\s*defwaitcursor\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonDefCommand "^\s*defwinfmt\s*" nextgroup=ratpoisonWinFmtArg +syn match ratpoisonDefCommand "^\s*defwingravity\s*" nextgroup=ratpoisonGravityArg +syn match ratpoisonDefCommand "^\s*defwinliststyle\s*" nextgroup=ratpoisonWinListArg +syn match ratpoisonDefCommand "^\s*defwinname\s*" nextgroup=ratpoisonWinNameArg +syn match ratpoisonDefCommand "^\s*msgwait\s*" nextgroup=ratpoisonNumberArg + +syn match ratpoisonStringCommand "^\s*\zsaddhook\ze\s*" nextgroup=ratpoisonHookArg +syn match ratpoisonStringCommand "^\s*\zsalias\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsbind\ze\s*" nextgroup=ratpoisonKeySeqArg +syn match ratpoisonStringCommand "^\s*\zschdir\ze\s*" +syn match ratpoisonStringCommand "^\s*\zscolon\ze\s*" nextgroup=ratpoisonCommandArg +syn match ratpoisonStringCommand "^\s*\zsdedicate\ze\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonStringCommand "^\s*\zsdefinekey\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsdelkmap\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsdescribekey\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsecho\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsescape\ze\s*" nextgroup=ratpoisonKeySeqArg +syn match ratpoisonStringCommand "^\s*\zsexec\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsfdump\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsfrestore\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsgdelete\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsgetenv\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsgravity\ze\s*" nextgroup=ratpoisonGravityArg +syn match ratpoisonStringCommand "^\s*\zsgselect\ze\s*" +syn match ratpoisonStringCommand "^\s*\zslink\ze\s*" nextgroup=ratpoisonKeySeqArg +syn match ratpoisonStringCommand "^\s*\zslisthook\ze\s*" nextgroup=ratpoisonHookArg +syn match ratpoisonStringCommand "^\s*\zsnewkmap\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsnewwm\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsnumber\ze\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonStringCommand "^\s*\zsprompt\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsratwarp\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsratrelwarp\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsratclick\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsrathold\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsreadkey\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsremhook\ze\s*" nextgroup=ratpoisonHookArg +syn match ratpoisonStringCommand "^\s*\zsresize\ze\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonStringCommand "^\s*\zsrudeness\ze\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonStringCommand "^\s*\zsselect\ze\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonStringCommand "^\s*\zssetenv\ze\s*" +syn match ratpoisonStringCommand "^\s*\zssource\ze\s*" +syn match ratpoisonStringCommand "^\s*\zssselect\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsstartup_message\ze\s*" nextgroup=ratpoisonBooleanArg +syn match ratpoisonStringCommand "^\s*\zstitle\ze\s*" +syn match ratpoisonStringCommand "^\s*\zstmpwm\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsunalias\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsunbind\ze\s*" nextgroup=ratpoisonKeySeqArg +syn match ratpoisonStringCommand "^\s*\zsundefinekey\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsunmanage\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsunsetenv\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsverbexec\ze\s*" +syn match ratpoisonStringCommand "^\s*\zswarp\ze\s*" nextgroup=ratpoisonBooleanArg + +syn match ratpoisonVoidCommand "^\s*\zsabort\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsbanish\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsclrunmanaged\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zscnext\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zscompat\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zscother\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zscprev\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zscurframe\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsdelete\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsfocusdown\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsfocuslast\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsfocusleft\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsfocusprev\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsfocusright\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsfocusup\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsfocus\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsfselect\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsgetsel\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsgmerge\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsgmove\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsgnewbg\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsgnew\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsgnext\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsgprev\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsgroups\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zshelp\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zshsplit\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsinext\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsinfo\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsiother\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsiprev\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zskill\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zslastmsg\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zslicense\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsmeta\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsnextscreen\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsnext\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsonly\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsother\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsprevscreen\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsprev\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsputsel\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsquit\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsredisplay\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsredo\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsremove\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsrestart\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zssdump\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zssfdump\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsshrink\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zssplit\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zstime\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsundo\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsversion\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsvsplit\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zswindows\ze\s*$" + +" 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_ratpoison_syn_inits") + if version < 508 + let did_ratpoison_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink ratpoisonBooleanArg Boolean + HiLink ratpoisonCommandArg Keyword + HiLink ratpoisonComment Comment + HiLink ratpoisonDefCommand Identifier + HiLink ratpoisonGravityArg Constant + HiLink ratpoisonKeySeqArg Special + HiLink ratpoisonNumberArg Number + HiLink ratpoisonSetArg Keyword + HiLink ratpoisonStringCommand Identifier + HiLink ratpoisonTodo Todo + HiLink ratpoisonVoidCommand Identifier + HiLink ratpoisonWinFmtArg Special + HiLink ratpoisonWinNameArg Constant + HiLink ratpoisonWinListArg Constant + + delcommand HiLink +endif + +let b:current_syntax = "ratpoison" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/rc.vim b/vim/bundle/ubuntu-vim72/syntax/rc.vim new file mode 100644 index 0000000..c3feb97 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/rc.vim @@ -0,0 +1,200 @@ +" Vim syntax file +" Language: M$ Resource files (*.rc) +" Maintainer: Heiko Erhardt +" Last Change: 2001 May 09 + +" This file is based on the c.vim + +" 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 + +" Common RC keywords +syn keyword rcLanguage LANGUAGE + +syn keyword rcMainObject TEXTINCLUDE VERSIONINFO BITMAP ICON CURSOR CURSOR +syn keyword rcMainObject MENU ACCELERATORS TOOLBAR DIALOG +syn keyword rcMainObject STRINGTABLE MESSAGETABLE RCDATA DLGINIT DESIGNINFO + +syn keyword rcSubObject POPUP MENUITEM SEPARATOR +syn keyword rcSubObject CONTROL LTEXT CTEXT EDITTEXT +syn keyword rcSubObject BUTTON PUSHBUTTON DEFPUSHBUTTON GROUPBOX LISTBOX COMBOBOX +syn keyword rcSubObject FILEVERSION PRODUCTVERSION FILEFLAGSMASK FILEFLAGS FILEOS +syn keyword rcSubObject FILETYPE FILESUBTYPE + +syn keyword rcCaptionParam CAPTION +syn keyword rcParam CHARACTERISTICS CLASS STYLE EXSTYLE VERSION FONT + +syn keyword rcStatement BEGIN END BLOCK VALUE + +syn keyword rcCommonAttribute PRELOAD LOADONCALL FIXED MOVEABLE DISCARDABLE PURE IMPURE + +syn keyword rcAttribute WS_OVERLAPPED WS_POPUP WS_CHILD WS_MINIMIZE WS_VISIBLE WS_DISABLED WS_CLIPSIBLINGS +syn keyword rcAttribute WS_CLIPCHILDREN WS_MAXIMIZE WS_CAPTION WS_BORDER WS_DLGFRAME WS_VSCROLL WS_HSCROLL +syn keyword rcAttribute WS_SYSMENU WS_THICKFRAME WS_GROUP WS_TABSTOP WS_MINIMIZEBOX WS_MAXIMIZEBOX WS_TILED +syn keyword rcAttribute WS_ICONIC WS_SIZEBOX WS_TILEDWINDOW WS_OVERLAPPEDWINDOW WS_POPUPWINDOW WS_CHILDWINDOW +syn keyword rcAttribute WS_EX_DLGMODALFRAME WS_EX_NOPARENTNOTIFY WS_EX_TOPMOST WS_EX_ACCEPTFILES +syn keyword rcAttribute WS_EX_TRANSPARENT WS_EX_MDICHILD WS_EX_TOOLWINDOW WS_EX_WINDOWEDGE WS_EX_CLIENTEDGE +syn keyword rcAttribute WS_EX_CONTEXTHELP WS_EX_RIGHT WS_EX_LEFT WS_EX_RTLREADING WS_EX_LTRREADING +syn keyword rcAttribute WS_EX_LEFTSCROLLBAR WS_EX_RIGHTSCROLLBAR WS_EX_CONTROLPARENT WS_EX_STATICEDGE +syn keyword rcAttribute WS_EX_APPWINDOW WS_EX_OVERLAPPEDWINDOW WS_EX_PALETTEWINDOW +syn keyword rcAttribute ES_LEFT ES_CENTER ES_RIGHT ES_MULTILINE ES_UPPERCASE ES_LOWERCASE ES_PASSWORD +syn keyword rcAttribute ES_AUTOVSCROLL ES_AUTOHSCROLL ES_NOHIDESEL ES_OEMCONVERT ES_READONLY ES_WANTRETURN +syn keyword rcAttribute ES_NUMBER +syn keyword rcAttribute BS_PUSHBUTTON BS_DEFPUSHBUTTON BS_CHECKBOX BS_AUTOCHECKBOX BS_RADIOBUTTON BS_3STATE +syn keyword rcAttribute BS_AUTO3STATE BS_GROUPBOX BS_USERBUTTON BS_AUTORADIOBUTTON BS_OWNERDRAW BS_LEFTTEXT +syn keyword rcAttribute BS_TEXT BS_ICON BS_BITMAP BS_LEFT BS_RIGHT BS_CENTER BS_TOP BS_BOTTOM BS_VCENTER +syn keyword rcAttribute BS_PUSHLIKE BS_MULTILINE BS_NOTIFY BS_FLAT BS_RIGHTBUTTON +syn keyword rcAttribute SS_LEFT SS_CENTER SS_RIGHT SS_ICON SS_BLACKRECT SS_GRAYRECT SS_WHITERECT +syn keyword rcAttribute SS_BLACKFRAME SS_GRAYFRAME SS_WHITEFRAME SS_USERITEM SS_SIMPLE SS_LEFTNOWORDWRAP +syn keyword rcAttribute SS_OWNERDRAW SS_BITMAP SS_ENHMETAFILE SS_ETCHEDHORZ SS_ETCHEDVERT SS_ETCHEDFRAME +syn keyword rcAttribute SS_TYPEMASK SS_NOPREFIX SS_NOTIFY SS_CENTERIMAGE SS_RIGHTJUST SS_REALSIZEIMAGE +syn keyword rcAttribute SS_SUNKEN SS_ENDELLIPSIS SS_PATHELLIPSIS SS_WORDELLIPSIS SS_ELLIPSISMASK +syn keyword rcAttribute DS_ABSALIGN DS_SYSMODAL DS_LOCALEDIT DS_SETFONT DS_MODALFRAME DS_NOIDLEMSG +syn keyword rcAttribute DS_SETFOREGROUND DS_3DLOOK DS_FIXEDSYS DS_NOFAILCREATE DS_CONTROL DS_CENTER +syn keyword rcAttribute DS_CENTERMOUSE DS_CONTEXTHELP +syn keyword rcAttribute LBS_NOTIFY LBS_SORT LBS_NOREDRAW LBS_MULTIPLESEL LBS_OWNERDRAWFIXED +syn keyword rcAttribute LBS_OWNERDRAWVARIABLE LBS_HASSTRINGS LBS_USETABSTOPS LBS_NOINTEGRALHEIGHT +syn keyword rcAttribute LBS_MULTICOLUMN LBS_WANTKEYBOARDINPUT LBS_EXTENDEDSEL LBS_DISABLENOSCROLL +syn keyword rcAttribute LBS_NODATA LBS_NOSEL LBS_STANDARD +syn keyword rcAttribute CBS_SIMPLE CBS_DROPDOWN CBS_DROPDOWNLIST CBS_OWNERDRAWFIXED CBS_OWNERDRAWVARIABLE +syn keyword rcAttribute CBS_AUTOHSCROLL CBS_OEMCONVERT CBS_SORT CBS_HASSTRINGS CBS_NOINTEGRALHEIGHT +syn keyword rcAttribute CBS_DISABLENOSCROLL CBS_UPPERCASE CBS_LOWERCASE +syn keyword rcAttribute SBS_HORZ SBS_VERT SBS_TOPALIGN SBS_LEFTALIGN SBS_BOTTOMALIGN SBS_RIGHTALIGN +syn keyword rcAttribute SBS_SIZEBOXTOPLEFTALIGN SBS_SIZEBOXBOTTOMRIGHTALIGN SBS_SIZEBOX SBS_SIZEGRIP +syn keyword rcAttribute CCS_TOP CCS_NOMOVEY CCS_BOTTOM CCS_NORESIZE CCS_NOPARENTALIGN CCS_ADJUSTABLE +syn keyword rcAttribute CCS_NODIVIDER +syn keyword rcAttribute LVS_ICON LVS_REPORT LVS_SMALLICON LVS_LIST LVS_TYPEMASK LVS_SINGLESEL LVS_SHOWSELALWAYS +syn keyword rcAttribute LVS_SORTASCENDING LVS_SORTDESCENDING LVS_SHAREIMAGELISTS LVS_NOLABELWRAP +syn keyword rcAttribute LVS_EDITLABELS LVS_OWNERDATA LVS_NOSCROLL LVS_TYPESTYLEMASK LVS_ALIGNTOP LVS_ALIGNLEFT +syn keyword rcAttribute LVS_ALIGNMASK LVS_OWNERDRAWFIXED LVS_NOCOLUMNHEADER LVS_NOSORTHEADER LVS_AUTOARRANGE +syn keyword rcAttribute TVS_HASBUTTONS TVS_HASLINES TVS_LINESATROOT TVS_EDITLABELS TVS_DISABLEDRAGDROP +syn keyword rcAttribute TVS_SHOWSELALWAYS +syn keyword rcAttribute TCS_FORCEICONLEFT TCS_FORCELABELLEFT TCS_TABS TCS_BUTTONS TCS_SINGLELINE TCS_MULTILINE +syn keyword rcAttribute TCS_RIGHTJUSTIFY TCS_FIXEDWIDTH TCS_RAGGEDRIGHT TCS_FOCUSONBUTTONDOWN +syn keyword rcAttribute TCS_OWNERDRAWFIXED TCS_TOOLTIPS TCS_FOCUSNEVER +syn keyword rcAttribute ACS_CENTER ACS_TRANSPARENT ACS_AUTOPLAY +syn keyword rcStdId IDI_APPLICATION IDI_HAND IDI_QUESTION IDI_EXCLAMATION IDI_ASTERISK IDI_WINLOGO IDI_WINLOGO +syn keyword rcStdId IDI_WARNING IDI_ERROR IDI_INFORMATION +syn keyword rcStdId IDCANCEL IDABORT IDRETRY IDIGNORE IDYES IDNO IDCLOSE IDHELP IDC_STATIC + +" Common RC keywords + +" Common RC keywords +syn keyword rcTodo contained TODO FIXME XXX + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match rcSpecial contained "\\[0-7][0-7][0-7]\=\|\\." +syn region rcString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rcSpecial +syn match rcCharacter "'[^\\]'" +syn match rcSpecialCharacter "'\\.'" +syn match rcSpecialCharacter "'\\[0-7][0-7]'" +syn match rcSpecialCharacter "'\\[0-7][0-7][0-7]'" + +"catch errors caused by wrong parenthesis +syn region rcParen transparent start='(' end=')' contains=ALLBUT,rcParenError,rcIncluded,rcSpecial,rcTodo +syn match rcParenError ")" +syn match rcInParen contained "[{}]" + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match rcNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" +"floating point number, with dot, optional exponent +syn match rcFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, starting with a dot, optional exponent +syn match rcFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match rcFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" +"hex number +syn match rcNumber "\<0x[0-9a-f]\+\(u\=l\=\|lu\)\>" +"syn match rcIdentifier "\<[a-z_][a-z0-9_]*\>" +syn case match +" flag an octal number with wrong digits +syn match rcOctalError "\<0[0-7]*[89]" + +if exists("rc_comment_strings") + " A comment can contain rcString, rcCharacter and rcNumber. + " But a "*/" inside a rcString in a rcComment DOES end the comment! So we + " need to use a special type of rcString: rcCommentString, which also ends on + " "*/", and sees a "*" at the start of the line as comment again. + " Unfortunately this doesn't very well work for // type of comments :-( + syntax match rcCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region rcCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=rcSpecial,rcCommentSkip + syntax region rcComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=rcSpecial + syntax region rcComment start="/\*" end="\*/" contains=rcTodo,rcCommentString,rcCharacter,rcNumber,rcFloat + syntax match rcComment "//.*" contains=rcTodo,rcComment2String,rcCharacter,rcNumber +else + syn region rcComment start="/\*" end="\*/" contains=rcTodo + syn match rcComment "//.*" contains=rcTodo +endif +syntax match rcCommentError "\*/" + +syn region rcPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=rcComment,rcString,rcCharacter,rcNumber,rcCommentError +syn region rcIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match rcIncluded contained "<[^>]*>" +syn match rcInclude "^\s*#\s*include\>\s*["<]" contains=rcIncluded +"syn match rcLineSkip "\\$" +syn region rcDefine start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,rcPreCondit,rcIncluded,rcInclude,rcDefine,rcInParen +syn region rcPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,rcPreCondit,rcIncluded,rcInclude,rcDefine,rcInParen + +syn sync ccomment rcComment minlines=10 + +" 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_rc_syntax_inits") + if version < 508 + let did_rc_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink rcCharacter Character + HiLink rcSpecialCharacter rcSpecial + HiLink rcNumber Number + HiLink rcFloat Float + HiLink rcOctalError rcError + HiLink rcParenError rcError + HiLink rcInParen rcError + HiLink rcCommentError rcError + HiLink rcInclude Include + HiLink rcPreProc PreProc + HiLink rcDefine Macro + HiLink rcIncluded rcString + HiLink rcError Error + HiLink rcPreCondit PreCondit + HiLink rcCommentString rcString + HiLink rcComment2String rcString + HiLink rcCommentSkip rcComment + HiLink rcString String + HiLink rcComment Comment + HiLink rcSpecial SpecialChar + HiLink rcTodo Todo + + HiLink rcAttribute rcCommonAttribute + HiLink rcStdId rcStatement + HiLink rcStatement Statement + + " Default color overrides + hi def rcLanguage term=reverse ctermbg=Red ctermfg=Yellow guibg=Red guifg=Yellow + hi def rcMainObject term=underline ctermfg=Blue guifg=Blue + hi def rcSubObject ctermfg=Green guifg=Green + hi def rcCaptionParam term=underline ctermfg=DarkGreen guifg=Green + hi def rcParam ctermfg=DarkGreen guifg=DarkGreen + hi def rcStatement ctermfg=DarkGreen guifg=DarkGreen + hi def rcCommonAttribute ctermfg=Brown guifg=Brown + + "HiLink rcIdentifier Identifier + + delcommand HiLink +endif + +let b:current_syntax = "rc" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/rcs.vim b/vim/bundle/ubuntu-vim72/syntax/rcs.vim new file mode 100644 index 0000000..04a2cce --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/rcs.vim @@ -0,0 +1,76 @@ +" Vim syntax file +" Language: RCS file +" Maintainer: Dmitry Vasiliev +" URL: http://www.hlabs.spb.ru/vim/rcs.vim +" Revision: $Id: rcs.vim,v 1.2 2006/03/27 16:41:00 vimboss Exp $ +" Filenames: *,v +" Version: 1.11 + +" Options: +" rcs_folding = 1 For folding strings + +" 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 + +" RCS file must end with a newline. +syn match rcsEOFError ".\%$" containedin=ALL + +" Keywords. +syn keyword rcsKeyword head branch access symbols locks strict +syn keyword rcsKeyword comment expand date author state branches +syn keyword rcsKeyword next desc log +syn keyword rcsKeyword text nextgroup=rcsTextStr skipwhite skipempty + +" Revision numbers and dates. +syn match rcsNumber "\<[0-9.]\+\>" display + +" Strings. +if exists("rcs_folding") && has("folding") + " Folded strings. + syn region rcsString matchgroup=rcsString start="@" end="@" skip="@@" fold contains=rcsSpecial + syn region rcsTextStr matchgroup=rcsTextStr start="@" end="@" skip="@@" fold contained contains=rcsSpecial,rcsDiffLines +else + syn region rcsString matchgroup=rcsString start="@" end="@" skip="@@" contains=rcsSpecial + syn region rcsTextStr matchgroup=rcsTextStr start="@" end="@" skip="@@" contained contains=rcsSpecial,rcsDiffLines +endif +syn match rcsSpecial "@@" contained +syn match rcsDiffLines "[da]\d\+ \d\+$" contained + +" Synchronization. +syn sync clear +if exists("rcs_folding") && has("folding") + syn sync fromstart +else + " We have incorrect folding if following sync patterns is turned on. + syn sync match rcsSync grouphere rcsString "[0-9.]\+\(\s\|\n\)\+log\(\s\|\n\)\+@"me=e-1 + syn sync match rcsSync grouphere rcsTextStr "@\(\s\|\n\)\+text\(\s\|\n\)\+@"me=e-1 +endif + +" 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_rcs_syn_inits") + if version <= 508 + let did_rcs_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink rcsKeyword Keyword + HiLink rcsNumber Identifier + HiLink rcsString String + HiLink rcsTextStr String + HiLink rcsSpecial Special + HiLink rcsDiffLines Special + HiLink rcsEOFError Error + + delcommand HiLink +endif + +let b:current_syntax = "rcs" diff --git a/vim/bundle/ubuntu-vim72/syntax/rcslog.vim b/vim/bundle/ubuntu-vim72/syntax/rcslog.vim new file mode 100644 index 0000000..acacfa1 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/rcslog.vim @@ -0,0 +1,38 @@ +" Vim syntax file +" Language: RCS log output +" Maintainer: Joe Karthauser +" Last Change: 2001 May 09 + +" 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 match rcslogRevision "^revision.*$" +syn match rcslogFile "^RCS file:.*" +syn match rcslogDate "^date: .*$" + +" 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_rcslog_syntax_inits") + if version < 508 + let did_rcslog_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink rcslogFile Type + HiLink rcslogRevision Constant + HiLink rcslogDate Identifier + + delcommand HiLink +endif + +let b:current_syntax = "rcslog" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/readline.vim b/vim/bundle/ubuntu-vim72/syntax/readline.vim new file mode 100644 index 0000000..91094c7 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/readline.vim @@ -0,0 +1,176 @@ +" Vim syntax file +" Language: readline(3) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2009-05-25 +" readline_has_bash - if defined add support for bash specific +" settings/functions + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +setlocal iskeyword+=- + +syn keyword readlineTodo contained TODO FIXME XXX NOTE + +syn region readlineComment display oneline start='^\s*#' end='$' + \ contains=readlineTodo,@Spell + +syn match readlineString '^\s*[A-Za-z-]\+:'me=e-1 contains=readlineKeys +syn region readlineString display oneline start=+"+ skip=+\\\\\|\\"+ + \ end=+"+ contains=readlineKeysTwo + +syn case ignore +syn keyword readlineKeys contained Control Meta Del Esc Escape LFD + \ Newline Ret Return Rubout Space Spc Tab +syn case match + +syn match readlineKeysTwo contained display + \ +\\\([CM]-\|[e\\"'abdfnrtv]\|\o\{3}\|x\x\{3}\)+ + +syn match readlineKeymaps contained display + \ 'emacs\(-standard\|-meta\|-ctlx\)\=' +syn match readlineKeymaps contained display + \ 'vi\(-move\|-command\|-insert\)\=' + +syn keyword readlineBellStyles contained audible visible none + +syn match readlineNumber contained display '\<\d\+\>' + +syn case ignore +syn keyword readlineBoolean contained on off +syn case match + +syn keyword readlineIfOps contained mode term + +syn region readlineConditional display oneline transparent + \ matchgroup=readlineConditional + \ start='^\s*$if' end="$" + \ contains=readlineIfOps,readlineKeymaps +syn match readlineConditional display '^\s*$\(else\|endif\)\>' + +syn match readlineInclude display '^\s*$include\>' + +syn region readlineSet display oneline transparent + \ matchgroup=readlineKeyword start='^\s*set\>' + \ end="$"me=e-1 contains=readlineNumber, + \ readlineBoolean,readlineKeymaps, + \ readlineBellStyles,readlineSettings + +syn keyword readlineSettings contained bell-style comment-begin + \ completion-ignore-case completion-query-items + \ convert-meta disable-completion editing-mode + \ enable-keypad expand-tilde + \ horizontal-scroll-mode mark-directories + \ keymap mark-modified-lines meta-flag + \ input-meta output-meta + \ print-completions-horizontally + \ show-all-if-ambiguous visible-stats + \ prefer-visible-bell blink-matching-paren + \ match-hidden-files history-preserve-point + \ isearch-terminators + +syn region readlineBinding display oneline transparent + \ matchgroup=readlineKeyword start=':' end='$' + \ contains=readlineKeys,readlineFunctions + +syn keyword readlineFunctions contained display + \ beginning-of-line end-of-line forward-char + \ backward-char forward-word backward-word + \ clear-screen redraw-current-line + \ accept-line previous-history + \ next-history beginning-of-history + \ end-of-history reverse-search-history + \ forward-search-history + \ non-incremental-reverse-search-history + \ non-incremental-forward-search-history + \ history-search-forward + \ history-search-backward + \ yank-nth-arg yank-last-arg + \ delete-char backward-delete-char + \ forward-backward-delete-char quoted-insert + \ tab-insert self-insert transpose-chars + \ transpose-words upcase-word downcase-word + \ capitalize-word overwrite-mode kill-line + \ backward-kill-line unix-line-discard + \ kill-whole-line kill-word backward-kill-word + \ unix-word-rubout unix-filename-rubout + \ delete-horizontal-space kill-region + \ copy-region-as-kill copy-backward-word + \ copy-forward-word yank yank-pop + \ digit-argument universal-argument complete + \ possible-completions insert-completions + \ menu-complete delete-char-or-list + \ start-kbd-macro end-kbd-macro + \ call-last-kbd-macro re-read-init-file + \ abort do-uppercase-version prefix-meta + \ undo revert-line tilde-expand set-mark + \ exchange-point-and-mark character-search + \ character-search-backward insert-comment + \ dump-functions dump-variables dump-macros + \ emacs-editing-mode vi-editing-mode + \ vi-complete vi-char-search vi-redo + \ vi-search vi-arg-digit vi-append-eol + \ vi-prev-word vi-change-to vi-delete-to + \ vi-end-word vi-fetch-history vi-insert-beg + \ vi-search-again vi-put vi-replace + \ vi-subst vi-yank-to vi-first-print + \ vi-yank-arg vi-goto-mark vi-append-mode + \ vi-insertion-mode prev-history vi-set-mark + \ vi-search-again vi-put vi-change-char + \ vi-subst vi-delete vi-yank-to + \ vi-column vi-change-case vi-overstrike + \ vi-overstrike-delete do-lowercase-version + \ delete-char-or-list tty-status + \ arrow-key-prefix vi-back-to-indent vi-bword + \ vi-bWord vi-eword vi-eWord vi-fword vi-fWord + \ vi-next-word + \ vi-movement-mode + +if exists("readline_has_bash") + syn keyword readlineFunctions contained + \ shell-expand-line history-expand-line + \ magic-space alias-expand-line + \ history-and-alias-expand-line + \ insert-last-argument operate-and-get-next + \ forward-backward-delete-char + \ delete-char-or-list complete-filename + \ possible-filename-completions + \ complete-username + \ possible-username-completions + \ complete-variable + \ possible-variable-completions + \ complete-hostname + \ possible-hostname-completions + \ complete-command + \ possible-command-completions + \ dynamic-complete-history + \ complete-into-braces + \ glob-expand-word glob-list-expansions + \ display-shell-version glob-complete-word + \ edit-and-execute-command +endif + +hi def link readlineComment Comment +hi def link readlineTodo Todo +hi def link readlineString String +hi def link readlineKeys SpecialChar +hi def link readlineKeysTwo SpecialChar +hi def link readlineKeymaps Constant +hi def link readlineBellStyles Constant +hi def link readlineNumber Number +hi def link readlineBoolean Boolean +hi def link readlineIfOps Type +hi def link readlineConditional Conditional +hi def link readlineInclude Include +hi def link readlineKeyword Keyword +hi def link readlineSettings Type +hi def link readlineFunctions Type + +let b:current_syntax = "readline" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/rebol.vim b/vim/bundle/ubuntu-vim72/syntax/rebol.vim new file mode 100644 index 0000000..e639575 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/rebol.vim @@ -0,0 +1,216 @@ +" Vim syntax file +" Language: Rebol +" Maintainer: Mike Williams +" Filenames: *.r +" Last Change: 27th June 2002 +" URL: http://www.eandem.co.uk/mrw/vim +" + +" 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 + +" Rebol is case insensitive +syn case ignore + +" As per current users documentation +if version < 600 + set isk=@,48-57,?,!,.,',+,-,*,&,\|,=,_,~ +else + setlocal isk=@,48-57,?,!,.,',+,-,*,&,\|,=,_,~ +endif + +" Yer TODO highlighter +syn keyword rebolTodo contained TODO + +" Comments +syn match rebolComment ";.*$" contains=rebolTodo + +" Words +syn match rebolWord "\a\k*" +syn match rebolWordPath "[^[:space:]]/[^[:space]]"ms=s+1,me=e-1 + +" Booleans +syn keyword rebolBoolean true false on off yes no + +" Values +" Integers +syn match rebolInteger "\<[+-]\=\d\+\('\d*\)*\>" +" Decimals +syn match rebolDecimal "[+-]\=\(\d\+\('\d*\)*\)\=[,.]\d*\(e[+-]\=\d\+\)\=" +syn match rebolDecimal "[+-]\=\d\+\('\d*\)*\(e[+-]\=\d\+\)\=" +" Time +syn match rebolTime "[+-]\=\(\d\+\('\d*\)*\:\)\{1,2}\d\+\('\d*\)*\([.,]\d\+\)\=\([AP]M\)\=\>" +syn match rebolTime "[+-]\=:\d\+\([.,]\d*\)\=\([AP]M\)\=\>" +" Dates +" DD-MMM-YY & YYYY format +syn match rebolDate "\d\{1,2}\([/-]\)\(Jan\|Feb\|Mar\|Apr\|May\|Jun\|Jul\|Aug\|Sep\|Oct\|Nov\|Dec\)\1\(\d\{2}\)\{1,2}\>" +" DD-month-YY & YYYY format +syn match rebolDate "\d\{1,2}\([/-]\)\(January\|February\|March\|April\|May\|June\|July\|August\|September\|October\|November\|December\)\1\(\d\{2}\)\{1,2}\>" +" DD-MM-YY & YY format +syn match rebolDate "\d\{1,2}\([/-]\)\d\{1,2}\1\(\d\{2}\)\{1,2}\>" +" YYYY-MM-YY format +syn match rebolDate "\d\{4}-\d\{1,2}-\d\{1,2}\>" +" DD.MM.YYYY format +syn match rebolDate "\d\{1,2}\.\d\{1,2}\.\d\{4}\>" +" Money +syn match rebolMoney "\a*\$\d\+\('\d*\)*\([,.]\d\+\)\=" +" Strings +syn region rebolString oneline start=+"+ skip=+^"+ end=+"+ contains=rebolSpecialCharacter +syn region rebolString start=+[^#]{+ end=+}+ skip=+{[^}]*}+ contains=rebolSpecialCharacter +" Binary +syn region rebolBinary start=+\d*#{+ end=+}+ contains=rebolComment +" Email +syn match rebolEmail "\<\k\+@\(\k\+\.\)*\k\+\>" +" File +syn match rebolFile "%\(\k\+/\)*\k\+[/]\=" contains=rebolSpecialCharacter +syn region rebolFile oneline start=+%"+ end=+"+ contains=rebolSpecialCharacter +" URLs +syn match rebolURL "http://\k\+\(\.\k\+\)*\(:\d\+\)\=\(/\(\k\+/\)*\(\k\+\)\=\)*" +syn match rebolURL "file://\k\+\(\.\k\+\)*/\(\k\+/\)*\k\+" +syn match rebolURL "ftp://\(\k\+:\k\+@\)\=\k\+\(\.\k\+\)*\(:\d\+\)\=/\(\k\+/\)*\k\+" +syn match rebolURL "mailto:\k\+\(\.\k\+\)*@\k\+\(\.\k\+\)*" +" Issues +syn match rebolIssue "#\(\d\+-\)*\d\+" +" Tuples +syn match rebolTuple "\(\d\+\.\)\{2,}" + +" Characters +syn match rebolSpecialCharacter contained "\^[^[:space:][]" +syn match rebolSpecialCharacter contained "%\d\+" + + +" Operators +" Math operators +syn match rebolMathOperator "\(\*\{1,2}\|+\|-\|/\{1,2}\)" +syn keyword rebolMathFunction abs absolute add arccosine arcsine arctangent cosine +syn keyword rebolMathFunction divide exp log-10 log-2 log-e max maximum min +syn keyword rebolMathFunction minimum multiply negate power random remainder sine +syn keyword rebolMathFunction square-root subtract tangent +" Binary operators +syn keyword rebolBinaryOperator complement and or xor ~ +" Logic operators +syn match rebolLogicOperator "[<>=]=\=" +syn match rebolLogicOperator "<>" +syn keyword rebolLogicOperator not +syn keyword rebolLogicFunction all any +syn keyword rebolLogicFunction head? tail? +syn keyword rebolLogicFunction negative? positive? zero? even? odd? +syn keyword rebolLogicFunction binary? block? char? date? decimal? email? empty? +syn keyword rebolLogicFunction file? found? function? integer? issue? logic? money? +syn keyword rebolLogicFunction native? none? object? paren? path? port? series? +syn keyword rebolLogicFunction string? time? tuple? url? word? +syn keyword rebolLogicFunction exists? input? same? value? + +" Datatypes +syn keyword rebolType binary! block! char! date! decimal! email! file! +syn keyword rebolType function! integer! issue! logic! money! native! +syn keyword rebolType none! object! paren! path! port! string! time! +syn keyword rebolType tuple! url! word! +syn keyword rebolTypeFunction type? + +" Control statements +syn keyword rebolStatement break catch exit halt reduce return shield +syn keyword rebolConditional if else +syn keyword rebolRepeat for forall foreach forskip loop repeat while until do + +" Series statements +syn keyword rebolStatement change clear copy fifth find first format fourth free +syn keyword rebolStatement func function head insert last match next parse past +syn keyword rebolStatement pick remove second select skip sort tail third trim length? + +" Context +syn keyword rebolStatement alias bind use + +" Object +syn keyword rebolStatement import make make-object rebol info? + +" I/O statements +syn keyword rebolStatement delete echo form format import input load mold prin +syn keyword rebolStatement print probe read save secure send write +syn keyword rebolOperator size? modified? + +" Debug statement +syn keyword rebolStatement help probe trace + +" Misc statements +syn keyword rebolStatement func function free + +" Constants +syn keyword rebolConstant none + + +" 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_rebol_syntax_inits") + if version < 508 + let did_rebol_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink rebolTodo Todo + + HiLink rebolStatement Statement + HiLink rebolLabel Label + HiLink rebolConditional Conditional + HiLink rebolRepeat Repeat + + HiLink rebolOperator Operator + HiLink rebolLogicOperator rebolOperator + HiLink rebolLogicFunction rebolLogicOperator + HiLink rebolMathOperator rebolOperator + HiLink rebolMathFunction rebolMathOperator + HiLink rebolBinaryOperator rebolOperator + HiLink rebolBinaryFunction rebolBinaryOperator + + HiLink rebolType Type + HiLink rebolTypeFunction rebolOperator + + HiLink rebolWord Identifier + HiLink rebolWordPath rebolWord + HiLink rebolFunction Function + + HiLink rebolCharacter Character + HiLink rebolSpecialCharacter SpecialChar + HiLink rebolString String + + HiLink rebolNumber Number + HiLink rebolInteger rebolNumber + HiLink rebolDecimal rebolNumber + HiLink rebolTime rebolNumber + HiLink rebolDate rebolNumber + HiLink rebolMoney rebolNumber + HiLink rebolBinary rebolNumber + HiLink rebolEmail rebolString + HiLink rebolFile rebolString + HiLink rebolURL rebolString + HiLink rebolIssue rebolNumber + HiLink rebolTuple rebolNumber + HiLink rebolFloat Float + HiLink rebolBoolean Boolean + + HiLink rebolConstant Constant + + HiLink rebolComment Comment + + HiLink rebolError Error + + delcommand HiLink +endif + +if exists("my_rebol_file") + if file_readable(expand(my_rebol_file)) + execute "source " . my_rebol_file + endif +endif + +let b:current_syntax = "rebol" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/registry.vim b/vim/bundle/ubuntu-vim72/syntax/registry.vim new file mode 100644 index 0000000..e9ff8fc --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/registry.vim @@ -0,0 +1,114 @@ +" Vim syntax file +" Language: Windows Registry export with regedit (*.reg) +" Maintainer: Dominique Stéphan (dominique@mggen.com) +" URL: http://www.mggen.com/vim/syntax/registry.zip +" Last change: 2004 Apr 23 + +" clear any unwanted syntax defs +" 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 + +" shut case off +syn case ignore + +" Head of regedit .reg files, it's REGEDIT4 on Win9#/NT +syn match registryHead "^REGEDIT[0-9]*$" + +" Comment +syn match registryComment "^;.*$" + +" Registry Key constant +syn keyword registryHKEY HKEY_LOCAL_MACHINE HKEY_CLASSES_ROOT HKEY_CURRENT_USER +syn keyword registryHKEY HKEY_USERS HKEY_CURRENT_CONFIG HKEY_DYN_DATA +" Registry Key shortcuts +syn keyword registryHKEY HKLM HKCR HKCU HKU HKCC HKDD + +" Some values often found in the registry +" GUID (Global Unique IDentifier) +syn match registryGUID "{[0-9A-Fa-f]\{8}\-[0-9A-Fa-f]\{4}\-[0-9A-Fa-f]\{4}\-[0-9A-Fa-f]\{4}\-[0-9A-Fa-f]\{12}}" contains=registrySpecial + +" Disk +" syn match registryDisk "[a-zA-Z]:\\\\" + +" Special and Separator characters +syn match registrySpecial "\\" +syn match registrySpecial "\\\\" +syn match registrySpecial "\\\"" +syn match registrySpecial "\." +syn match registrySpecial "," +syn match registrySpecial "\/" +syn match registrySpecial ":" +syn match registrySpecial "-" + +" String +syn match registryString "\".*\"" contains=registryGUID,registrySpecial + +" Path +syn region registryPath start="\[" end="\]" contains=registryHKEY,registryGUID,registrySpecial + +" Path to remove +" like preceding path but with a "-" at begin +syn region registryRemove start="\[\-" end="\]" contains=registryHKEY,registryGUID,registrySpecial + +" Subkey +syn match registrySubKey "^\".*\"=" +" Default value +syn match registrySubKey "^\@=" + +" Numbers + +" Hex or Binary +" The format can be precised between () : +" 0 REG_NONE +" 1 REG_SZ +" 2 REG_EXPAND_SZ +" 3 REG_BINARY +" 4 REG_DWORD, REG_DWORD_LITTLE_ENDIAN +" 5 REG_DWORD_BIG_ENDIAN +" 6 REG_LINK +" 7 REG_MULTI_SZ +" 8 REG_RESOURCE_LIST +" 9 REG_FULL_RESOURCE_DESCRIPTOR +" 10 REG_RESOURCE_REQUIREMENTS_LIST +" The value can take several lines, if \ ends the line +" The limit to 999 matches is arbitrary, it avoids Vim crashing on a very long +" line of hex values that ends in a comma. +"syn match registryHex "hex\(([0-9]\{0,2})\)\=:\([0-9a-fA-F]\{2},\)\{0,999}\([0-9a-fA-F]\{2}\|\\\)$" contains=registrySpecial +syn match registryHex "hex\(([0-9]\{0,2})\)\=:\([0-9a-fA-F]\{2},\)*\([0-9a-fA-F]\{2}\|\\\)$" contains=registrySpecial +syn match registryHex "^\s*\([0-9a-fA-F]\{2},\)\{0,999}\([0-9a-fA-F]\{2}\|\\\)$" contains=registrySpecial +" Dword (32 bits) +syn match registryDword "dword:[0-9a-fA-F]\{8}$" contains=registrySpecial + +if version >= 508 || !exists("did_registry_syntax_inits") + if version < 508 + let did_registry_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + +" The default methods for highlighting. Can be overridden later + HiLink registryComment Comment + HiLink registryHead Constant + HiLink registryHKEY Constant + HiLink registryPath Special + HiLink registryRemove PreProc + HiLink registryGUID Identifier + HiLink registrySpecial Special + HiLink registrySubKey Type + HiLink registryString String + HiLink registryHex Number + HiLink registryDword Number + + delcommand HiLink +endif + + +let b:current_syntax = "registry" + +" vim:ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/remind.vim b/vim/bundle/ubuntu-vim72/syntax/remind.vim new file mode 100644 index 0000000..93a7178 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/remind.vim @@ -0,0 +1,79 @@ +" Vim syntax file +" Language: Remind +" Maintainer: Davide Alberani +" Last Change: 18 Sep 2009 +" Version: 0.5 +" URL: http://erlug.linux.it/~da/vim/syntax/remind.vim +" +" remind is a sophisticated reminder service +" you can download remind from: +" http://www.roaringpenguin.com/penguin/open_source_remind.php + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" shut case off. +syn case ignore + +syn keyword remindCommands REM OMIT SET FSET UNSET +syn keyword remindExpiry UNTIL FROM SCANFROM SCAN WARN SCHED +syn keyword remindTag PRIORITY TAG +syn keyword remindTimed AT DURATION +syn keyword remindMove ONCE SKIP BEFORE AFTER +syn keyword remindSpecial INCLUDE INC BANNER PUSH-OMIT-CONTEXT PUSH CLEAR-OMIT-CONTEXT CLEAR POP-OMIT-CONTEXT POP COLOR +syn keyword remindRun MSG MSF RUN CAL SATISFY SPECIAL PS PSFILE SHADE MOON +syn keyword remindConditional IF ELSE ENDIF IFTRIG +syn keyword remindDebug DEBUG DUMPVARS DUMP ERRMSG FLUSH PRESERVE +syn match remindComment "#.*$" +syn region remindString start=+'+ end=+'+ skip=+\\\\\|\\'+ oneline +syn region remindString start=+"+ end=+"+ skip=+\\\\\|\\"+ oneline +syn match remindVar "\$[_a-zA-Z][_a-zA-Z0-9]*" +syn match remindSubst "%[^ ]" +syn match remindAdvanceNumber "\(\*\|+\|-\|++\|--\)[0-9]\+" +" XXX: use different separators for dates and times? +syn match remindDateSeparators "[/:@\.-]" contained +syn match remindTimes "[0-9]\{1,2}[:\.][0-9]\{1,2}" contains=remindDateSeparators +" XXX: why not match only valid dates? Ok, checking for 'Feb the 30' would +" be impossible, but at least check for valid months and times. +syn match remindDates "'[0-9]\{4}[/-][0-9]\{1,2}[/-][0-9]\{1,2}\(@[0-9]\{1,2}[:\.][0-9]\{1,2}\)\?'" contains=remindDateSeparators +" This will match trailing whitespaces that seem to break rem2ps. +" Courtesy of Michael Dunn. +syn match remindWarning display excludenl "\S\s\+$"ms=s+1 + + +if version >= 508 || !exists("did_remind_syn_inits") + if version < 508 + let did_remind_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink remindCommands Function + HiLink remindExpiry Repeat + HiLink remindTag Label + HiLink remindTimed Statement + HiLink remindMove Statement + HiLink remindSpecial Include + HiLink remindRun Function + HiLink remindConditional Conditional + HiLink remindComment Comment + HiLink remindTimes String + HiLink remindString String + HiLink remindDebug Debug + HiLink remindVar Identifier + HiLink remindSubst Constant + HiLink remindAdvanceNumber Number + HiLink remindDateSeparators Comment + HiLink remindDates String + HiLink remindWarning Error + + delcommand HiLink +endif + +let b:current_syntax = "remind" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/resolv.vim b/vim/bundle/ubuntu-vim72/syntax/resolv.vim new file mode 100644 index 0000000..6ec42d2 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/resolv.vim @@ -0,0 +1,88 @@ +" Vim syntax file +" Language: resolver configuration file +" Maintainer: David Ne\v{c}as (Yeti) +" Original Maintaner: Radu Dineiu +" License: This file can be redistribued and/or modified under the same terms +" as Vim itself. +" URL: http://trific.ath.cx/Ftp/vim/syntax/resolv.vim +" Last Change: 2006-04-16 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Errors, comments and operators +syn match resolvError /./ +syn match resolvComment /\s*[#;].*$/ +syn match resolvOperator /[\/:]/ contained + +" IP +syn cluster resolvIPCluster contains=resolvIPError,resolvIPSpecial +syn match resolvIPError /\%(\d\{4,}\|25[6-9]\|2[6-9]\d\|[3-9]\d\{2}\)[\.0-9]*/ contained +syn match resolvIPSpecial /\%(127\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)/ contained + +" General +syn match resolvIP contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}/ contains=@resolvIPCluster +syn match resolvIPNetmask contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\%(\%(\d\{1,4}\.\)\{,3}\d\{1,4}\)\)\?/ contains=resolvOperator,@resolvIPCluster +syn match resolvHostname contained /\w\{-}\.[-0-9A-Za-z_\.]*/ + +" Particular +syn match resolvIPNameserver contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\s\|$\)\)\+/ contains=@resolvIPCluster +syn match resolvHostnameSearch contained /\%(\%([-0-9A-Za-z_]\+\.\)*[-0-9A-Za-z_]\+\.\?\%(\s\|$\)\)\+/ +syn match resolvIPNetmaskSortList contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\%(\%(\d\{1,4}\.\)\{,3}\d\{1,4}\)\)\?\%(\s\|$\)\)\+/ contains=resolvOperator,@resolvIPCluster + +" Identifiers +syn match resolvNameserver /^\s*nameserver\>/ nextgroup=resolvIPNameserver skipwhite +syn match resolvLwserver /^\s*lwserver\>/ nextgroup=resolvIPNameserver skipwhite +syn match resolvDomain /^\s*domain\>/ nextgroup=resolvHostname skipwhite +syn match resolvSearch /^\s*search\>/ nextgroup=resolvHostnameSearch skipwhite +syn match resolvSortList /^\s*sortlist\>/ nextgroup=resolvIPNetmaskSortList skipwhite +syn match resolvOptions /^\s*options\>/ nextgroup=resolvOption skipwhite + +" Options +" FIXME: The manual page and the source code do not exactly agree on the set +" of allowed options +syn match resolvOption /\<\%(debug\|no_tld_query\|rotate\|no-check-names\|inet6\)\>/ contained nextgroup=resolvOption skipwhite +syn match resolvOption /\<\%(ndots\|timeout\|attempts\):\d\+\>/ contained contains=resolvOperator nextgroup=resolvOption skipwhite + +" Additional errors +syn match resolvError /^search .\{257,}/ + +if version >= 508 || !exists("did_config_syntax_inits") + if version < 508 + let did_config_syntax_inits = 1 + command! -nargs=+ HiLink hi link + else + command! -nargs=+ HiLink hi def link + endif + + HiLink resolvIP Number + HiLink resolvIPNetmask Number + HiLink resolvHostname String + HiLink resolvOption String + + HiLink resolvIPNameserver Number + HiLink resolvHostnameSearch String + HiLink resolvIPNetmaskSortList Number + + HiLink resolvNameServer Identifier + HiLink resolvLwserver Identifier + HiLink resolvDomain Identifier + HiLink resolvSearch Identifier + HiLink resolvSortList Identifier + HiLink resolvOptions Identifier + + HiLink resolvComment Comment + HiLink resolvOperator Operator + HiLink resolvError Error + HiLink resolvIPError Error + HiLink resolvIPSpecial Special + + delcommand HiLink +endif + +let b:current_syntax = "resolv" + +" vim: ts=8 ft=vim diff --git a/vim/bundle/ubuntu-vim72/syntax/reva.vim b/vim/bundle/ubuntu-vim72/syntax/reva.vim new file mode 100644 index 0000000..7e11ffe --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/reva.vim @@ -0,0 +1,191 @@ +" Vim syntax file +" Language: Reva Forth +" Version: 7.1 +" Last Change: 2008/01/11 +" Maintainer: Ron Aaron +" URL: http://ronware.org/reva/ +" Filetypes: *.rf *.frt +" NOTE: You should also have the ftplugin/reva.vim file to set 'isk' + +" For version 5.x: Clear all syntax items and don't load +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear + echo "Reva syntax file requires version 6.0 or later of vim!" + finish +elseif exists("b:current_syntax") + finish +endif + +syn clear + +" Synchronization method +syn sync ccomment +syn sync maxlines=100 + + +syn case ignore +" Some special, non-FORTH keywords +"syn keyword revaTodo contained todo fixme bugbug todo: bugbug: note: +syn match revaTodo contained '\(todo\|fixme\|bugbug\|note\)[:]*' +syn match revaTodo contained 'copyright\(\s(c)\)\=\(\s[0-9]\{2,4}\)\=' + +syn match revaHelpDesc '\S.*' contained +syn match revaHelpStuff '\<\(def\|stack\|ctx\|ver\|os\|related\):\s.*' +syn region revaHelpStuff start='\' end='^\S' contains=revaHelpDesc +syn region revaEOF start='\<|||\>' end='{$}' contains=revaHelpStuff + + +syn case match +" basic mathematical and logical operators +syn keyword revaoperators + - * / mod /mod negate abs min max umin umax +syn keyword revaoperators and or xor not invert 1+ 1- +syn keyword revaoperators m+ */ */mod m* um* m*/ um/mod fm/mod sm/rem +syn keyword revaoperators d+ d- dnegate dabs dmin dmax > < = >> << u< <> + + +" stack manipulations +syn keyword revastack drop nip dup over tuck swap rot -rot ?dup pick roll +syn keyword revastack 2drop 2nip 2dup 2over 2swap 2rot 3drop +syn keyword revastack >r r> r@ rdrop +" syn keyword revastack sp@ sp! rp@ rp! + +" address operations +syn keyword revamemory @ ! +! c@ c! 2@ 2! align aligned allot allocate here free resize +syn keyword revaadrarith chars char+ cells cell+ cell cell- 2cell+ 2cell- 3cell+ 4cell+ +syn keyword revamemblks move fill + +" conditionals +syn keyword revacond if else then =if >if if if0 ;; catch throw + +" iterations +syn keyword revaloop while repeat until again +syn keyword revaloop do loop i j leave unloop skip more + +" new words +syn match revaColonDef '\ immediate +syn keyword revadefine compile literal ' ['] + +" Built in words +com! -nargs=+ Builtin syn keyword revaBuiltin +Builtin execute ahead interp bye >body here pad words make +Builtin accept close cr creat delete ekey emit fsize ioerr key? +Builtin mtime open/r open/rw read rename seek space spaces stat +Builtin tell type type_ write (seek) (argv) (save) 0; 0drop; +Builtin >class >lz >name >xt alias alias: appname argc asciiz, asciizl, +Builtin body> clamp depth disassemble findprev fnvhash getenv here, +Builtin iterate last! last@ later link lz> lzmax os parse/ peek +Builtin peek-n pop prior push put rp@ rpick save setenv slurp +Builtin stack-empty? stack-iterate stack-size stack: THROW_BADFUNC +Builtin THROW_BADLIB THROW_GENERIC used xt>size z, +Builtin +lplace +place -chop /char /string bounds c+lplace c+place +Builtin chop cmp cmpi count lc lcount lplace place quote rsplit search split +Builtin zcount zt \\char +Builtin chdir g32 k32 u32 getcwd getpid hinst osname stdin stdout +Builtin (-lib) (bye) (call) (else) (find) (func) (here) (if (lib) (s0) (s^) +Builtin (to~) (while) >in >rel ?literal appstart cold compiling? context? d0 default_class +Builtin defer? dict dolstr dostr find-word h0 if) interp isa onexit +Builtin onstartup pdoes pop>ebx prompt rel> rp0 s0 src srcstr state str0 then,> then> tib +Builtin tp vector vector! word? xt? .ver revaver revaver# && '' 'constant 'context +Builtin 'create 'defer 'does 'forth 'inline 'macro 'macront 'notail 'value 'variable +Builtin (.r) (context) (create) (header) (hide) (inline) (p.r) (words~) (xfind) +Builtin ++ -- , -2drop -2nip -link -swap . .2x .classes .contexts .funcs .libs .needs .r +Builtin .rs .x 00; 0do 0if 1, 2, 3, 2* 2/ 2constant 2variable 3dup 4dup ;then >base >defer +Builtin >rr ? ?do @execute @rem appdir argv as back base base! between chain cleanup-libs +Builtin cmove> context?? ctrl-c ctx>name data: defer: defer@def dictgone do_cr eleave +Builtin endcase endof eval exception exec false find func: header heapgone help help/ +Builtin hex# hide inline{ last lastxt lib libdir literal, makeexename mnotail ms ms@ +Builtin newclass noop nosavedict notail nul of off on p: padchar parse parseln +Builtin parsews rangeof rdepth remains reset reva revaused rol8 rr> scratch setclass sp +Builtin strof super> temp time&date true turnkey? undo vfunc: w! w@ +Builtin xchg xchg2 xfind xt>name xwords { {{ }} } _+ _1+ _1- pathsep case \|| +" p[ [''] [ ['] + + +" debugging +syn keyword revadebug .s dump see + +" basic character operations +" syn keyword revaCharOps (.) CHAR EXPECT FIND WORD TYPE -TRAILING EMIT KEY +" syn keyword revaCharOps KEY? TIB CR +" syn match revaCharOps '\d >digit digit> >single >double >number >float + +" contexts +syn keyword revavocs forth macro inline +syn keyword revavocs context: +syn match revavocs /\<\~[^~ ]*/ +syn match revavocs /[^~ ]*\~\>/ + +" numbers +syn keyword revamath decimal hex base binary octal +syn match revainteger '\<-\=[0-9.]*[0-9.]\+\>' +" recognize hex and binary numbers, the '$' and '%' notation is for greva +syn match revainteger '\<\$\x*\x\+\>' " *1* --- dont't mess +syn match revainteger '\<\x*\d\x*\>' " *2* --- this order! +syn match revainteger '\<%[0-1]*[0-1]\+\>' +syn match revainteger "\<'.\>" + +" Strings +" syn region revaString start=+\.\?\"+ end=+"+ end=+$+ +syn region revaString start=/"/ skip=/\\"/ end=/"/ + +" Comments +syn region revaComment start='\\S\s' end='.*' contains=revaTodo +syn match revaComment '\.(\s[^)]\{-})' contains=revaTodo +syn region revaComment start='(\s' skip='\\)' end=')' contains=revaTodo +syn match revaComment '(\s[^\-]*\-\-[^\-]\{-})' contains=revaTodo +syn match revaComment '\<|\s.*$' contains=revaTodo +syn match revaColonDef '\<:m\?\s*[^ \t]\+\>' contains=revaComment + +" Include files +syn match revaInclude '\<\(include\|needs\)\s\+\S\+' + + +" Define the default highlighting. +if !exists("did_reva_syntax_inits") + let did_reva_syntax_inits=1 + " The default methods for highlighting. Can be overriden later. + hi def link revaEOF cIf0 + hi def link revaHelpStuff special + hi def link revaHelpDesc Comment + hi def link revaTodo Todo + hi def link revaOperators Operator + hi def link revaMath Number + hi def link revaInteger Number + hi def link revaStack Special + hi def link revaFStack Special + hi def link revaSP Special + hi def link revaMemory Operator + hi def link revaAdrArith Function + hi def link revaMemBlks Function + hi def link revaCond Conditional + hi def link revaLoop Repeat + hi def link revaColonDef Define + hi def link revaEndOfColonDef Define + hi def link revaDefine Define + hi def link revaDebug Debug + hi def link revaCharOps Character + hi def link revaConversion String + hi def link revaForth Statement + hi def link revaVocs Statement + hi def link revaString String + hi def link revaComment Comment + hi def link revaClassDef Define + hi def link revaEndOfClassDef Define + hi def link revaObjectDef Define + hi def link revaEndOfObjectDef Define + hi def link revaInclude Include + hi def link revaBuiltin Keyword +endif + +let b:current_syntax = "reva" + +" vim: ts=8:sw=4:nocindent:smartindent: diff --git a/vim/bundle/ubuntu-vim72/syntax/rexx.vim b/vim/bundle/ubuntu-vim72/syntax/rexx.vim new file mode 100644 index 0000000..b4d0732 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/rexx.vim @@ -0,0 +1,298 @@ +" Vim syntax file +" Language: Rexx +" Maintainer: Thomas Geulig +" Last Change: 2005 Dez 9, added some -coloring, +" line comments, do *over*, messages, directives, +" highlighting classes, methods, routines and requires +" 2007 Oct 17, added support for new ooRexx 3.2 features +" Rony G. Flatscher +" +" URL: http://www.geulig.de/vim/rexx.vim +" +" Special Thanks to Dan Sharp and Rony G. Flatscher +" for comments and additions + +" 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 + +" add to valid identifier chars +setlocal iskeyword+=. +setlocal iskeyword+=! +setlocal iskeyword+=? + +" ---rgf, position important: must be before comments etc. ! +syn match rexxOperator "[=|\/\\\+\*\[\],;:<>&\~%\-]" + +" rgf syn match rexxIdentifier "\<[a-zA-Z\!\?_]\([a-zA-Z0-9._?!]\)*\>" +syn match rexxIdentifier "\<\K\k*\>" +syn match rexxEnvironmentSymbol "\<\.\k\+\>" + +" A Keyword is the first symbol in a clause. A clause begins at the start +" of a line or after a semicolon. THEN, ELSE, OTHERWISE, and colons are always +" followed by an implied semicolon. +syn match rexxClause "\(^\|;\|:\|then \|else \|when \|otherwise \)\s*\S*" contains=ALLBUT,rexxParse2,rexxRaise2,rexxForward2 + +" Considered keywords when used together in a phrase and begin a clause +syn match rexxParse "\\|version\)\>" containedin=rexxClause contains=rexxParse2 +syn match rexxParse2 "\" containedin=rexxParse + +syn match rexxKeyword contained "\" +syn match rexxKeyword contained "\<\(address\|trace\)\( value\)\?\>" +syn match rexxKeyword contained "\" + +syn match rexxKeyword contained "\<\(do\|loop\)\>\(\s\+label\s\+\k*\)\?\(\s\+forever\)\?\>" +syn match rexxKeyword contained "\\s*\(strict\s*\)\?\" + +" Another keyword phrase, separated to aid highlighting in rexxFunction +syn match rexxRegularCallSignal contained "\<\(call\|signal\)\s\(\s*on\>\|\s*off\>\)\@!\(\k\+\ze\|\ze(\)\(\s*\|;\|$\|(\)" +syn region rexxLabel contained start="\<\(call\|signal\)\>\s*\zs\(\k*\|(\)" end="\ze\(\s*\|;\|$\|(\)" containedin=rexxRegularCallSignal + +syn match rexxExceptionHandling contained "\<\(call\|signal\)\>\s\+\<\(on\|off\)\>.*\(;\|$\)" + +" hilite label given after keyword "name" +syn match rexxLabel "name\s\+\zs\k\+\ze" containedin=rexxExceptionHandling +" hilite condition name (serves as label) +syn match rexxLabel "\<\(call\|signal\)\>\s\+\<\(on\|off\)\>\s*\zs\k\+\ze\s*\(;\|$\)" containedin=rexxExceptionHandling +" user exception handling, hilite user defined name +syn region rexxLabel contained start="user\s\+\zs\k" end="\ze\(\s\|;\|$\)" containedin=rexxExceptionHandling + +" Considered keywords when they begin a clause +syn match rexxKeywordStatements "\<\(arg\|catch\|do\|drop\|end\|exit\|expose\|finally\|forward\|if\|interpret\|iterate\|leave\|loop\|nop\)\>" +syn match rexxKeywordStatements "\<\(options\|pull\|push\|queue\|raise\|reply\|return\|say\|select\|trace\)\>" + +" Conditional keywords starting a new statement +syn match rexxConditional "\<\(then\|else\|when\|otherwise\)\(\s*\|;\|\_$\|\)\>" contains=rexxKeywordStatements + +" Conditional phrases +syn match rexxLoopKeywords "\<\(to\|by\|for\|until\|while\|over\)\>" containedin=doLoopSelectLabelRegion + +" must be after Conditional phrases! +syn match doLoopSelectLabelRegion "\<\(do\|loop\|select\)\>\s\+\(label\s\+\)\?\(\s\+\k\+\s\+\zs\\)\?\k*\(\s\+forever\)\?\(\s\|;\|$\)" + +" color label's name +syn match rexxLabel2 "\<\(do\|loop\|select\)\>\s\+label\s\+\zs\k*\ze" containedin=doLoopSelectLabelRegion + +" make sure control variable is normal +syn match rexxControlVariable "\<\(do\|loop\)\>\(\s\+label\s\+\k*\)\?\s\+\zs.*\ze\s\+\" containedin=doLoopSelectLabelRegion + +" make sure control variable assignment is normal +syn match rexxStartValueAssignment "\<\(do\|loop\)\>\(\s\+label\s\+\k*\)\?\s\+\zs.*\ze\(=.*\)\?\s\+\" containedin=doLoopSelectLabelRegion + +" highlight label name +syn match endIterateLeaveLabelRegion "\<\(end\|leave\|iterate\)\>\(\s\+\K\k*\)" contains=rexxLabel2 +syn match rexxLabel2 "\<\(end\|leave\|iterate\)\>\s\+\zs\k*\ze" containedin=endIterateLeaveLabelRegion + +" Guard statement +syn match rexxGuard "\(^\|;\|:\)\s*\\s\+\<\(on\|off\)\>" + +" Trace statement +syn match rexxTrace "\(^\|;\|:\)\s*\\s\+\<\K\k*\>" + +" Raise statement +syn match rexxRaise "\(^\|;\|:\)\s\+\\s*\<\(propagate\|error\|failure\|syntax\|user\)\>\?" contains=rexxRaise2 +syn match rexxRaise2 "\<\(additional\|array\|description\|exit\|propagate\|return\)\>" containedin=rexxRaise + +" Forward statement +syn match rexxForward "\(^\|;\|:\)\\s*" contains=rexxForward2 +syn match rexxForward2 "\<\(arguments\|array\|continue\|message\|class\|to\)\>" contained + +" Functions/Procedures +syn match rexxFunction "\<\<[a-zA-Z\!\?_]\k*\>("me=e-1 +syn match rexxFunction "[()]" + +" String constants +syn region rexxString start=+"+ skip=+""+ end=+"\(x\|b\)\?+ oneline +syn region rexxString start=+'+ skip=+''+ end=+'\(x\|b\)\?+ oneline + +syn region rexxParen transparent start='(' end=')' contains=ALLBUT,rexxParenError,rexxTodo,rexxLabel,rexxKeyword +" Catch errors caused by wrong parenthesis +syn match rexxParenError ")" +syn match rexxInParen "[\\[\\]{}]" + +" Comments +syn region rexxComment start="/\*" end="\*/" contains=rexxTodo,rexxComment +syn match rexxCommentError "\*/" +syn region rexxLineComment start="--" end="\_$" oneline + +" Highlight User Labels +" check for labels between comments, labels stated in a statement in the middle of a line +syn match rexxLabel "\(\_^\|;\)\s*\(\/\*.*\*\/\)*\s*\k\+\s*\(\/\*.*\*\/\)*\s*:"me=e-1 contains=rexxTodo,rexxComment + +syn keyword rexxTodo contained TODO FIXME XXX + +" ooRexx messages +syn region rexxMessageOperator start="\(\~\|\~\~\)" end="\(\S\|\s\)"me=e-1 +syn match rexxMessage "\(\~\|\~\~\)\s*\<\.*[a-zA-Z]\([a-zA-Z0-9._?!]\)*\>" contains=rexxMessageOperator + +" line continuations, take care of (line-)comments after it +syn match rexxLineContinue ",\ze\s*\(--.*\|\/\*.*\)*$" + +" the following is necessary, otherwise three consecutive dashes will cause it to highlight the first one +syn match rexxLineContinue "-\ze-\@!\s*\(--.*\|\s*\/\*.*\)\?$" + +" Special Variables +syn keyword rexxSpecialVariable sigl rc result self super +syn keyword rexxSpecialVariable .environment .error .input .local .methods .output .rs .stderr .stdin .stdout .stdque + +" Constants +syn keyword rexxConst .true .false .nil .endOfLine .line + +syn match rexxNumber "\(-\|+\)\?\s*\zs\<\(\d\+\.\?\|\d*\.\d\+\(E\(+\|-\)\d\{2,2}\)\?\)\?\>" + +" ooRexx builtin classes (as of version 3.2.0, fall 2007), first define dot to be o.k. in keywords +syn keyword rexxBuiltinClass .Alarm .ArgUtil .Array .Bag .CaselessColumnComparator +syn keyword rexxBuiltinClass .CaselessComparator .CaselessDescendingComparator .CircularQueue +syn keyword rexxBuiltinClass .Class .Collection .ColumnComparator .Comparable .Comparator +syn keyword rexxBuiltinClass .DateTime .DescendingComparator .Directory .InputOutputStream +syn keyword rexxBuiltinClass .InputStream .InvertingComparator .List .MapCollection +syn keyword rexxBuiltinClass .Message .Method .Monitor .MutableBuffer .Object +syn keyword rexxBuiltinClass .OrderedCollection .OutputStream .Properties .Queue +syn keyword rexxBuiltinClass .Relation .RexxQueue .Set .SetCollection .Stem .Stream +syn keyword rexxBuiltinClass .StreamSupplier .String .Supplier .Table .TimeSpan + +" Windows-only classes +syn keyword rexxBuiltinClass .AdvancedControls .AnimatedButton .BaseDialog .ButtonControl +syn keyword rexxBuiltinClass .CategoryDialog .CheckBox .CheckList .ComboBox .DialogControl +syn keyword rexxBuiltinClass .DialogExtensions .DlgArea .DlgAreaU .DynamicDialog +syn keyword rexxBuiltinClass .EditControl .InputBox .IntegerBox .ListBox .ListChoice +syn keyword rexxBuiltinClass .ListControl .MenuObject .MessageExtensions .MultiInputBox +syn keyword rexxBuiltinClass .MultiListChoice .PasswordBox .PlainBaseDialog .PlainUserDialog +syn keyword rexxBuiltinClass .ProgressBar .ProgressIndicator .PropertySheet .RadioButton +syn keyword rexxBuiltinClass .RcDialog .ResDialog .ScrollBar .SingleSelection .SliderControl +syn keyword rexxBuiltinClass .StateIndicator .StaticControl .TabControl .TimedMessage +syn keyword rexxBuiltinClass .TreeControl .UserDialog .VirtualKeyCodes .WindowBase +syn keyword rexxBuiltinClass .WindowExtensions .WindowObject .WindowsClassesBase .WindowsClipboard +syn keyword rexxBuiltinClass .WindowsEventLog .WindowsManager .WindowsProgramManager .WindowsRegistry + +" ooRexx directives, ---rgf location important, otherwise directives in top of file not matched! +syn region rexxClassDirective start="::\s*class\s*"ms=e+1 end="\ze\(\s\|;\|$\)" +syn region rexxMethodDirective start="::\s*method\s*"ms=e+1 end="\ze\(\s\|;\|$\)" +syn region rexxRequiresDirective start="::\s*requires\s*"ms=e+1 end="\ze\(\s\|;\|$\)" +syn region rexxRoutineDirective start="::\s*routine\s*"ms=e+1 end="\ze\(\s\|;\|$\)" +syn region rexxAttributeDirective start="::\s*attribute\s*"ms=e+1 end="\ze\(\s\|;\|$\)" + +syn region rexxDirective start="\(^\|;\)\s*::\s*\w\+" end="\($\|;\)" contains=rexxString,rexxComment,rexxLineComment,rexxClassDirective,rexxMethodDirective,rexxRoutineDirective,rexxRequiresDirective,rexxAttributeDirective keepend + +syn region rexxVariable start="\zs\<\(\.\)\@!\K\k\+\>\ze\s*\(=\|,\|)\|%\|\]\|\\\||\|&\|+=\|-=\|<\|>\)" end="\(\_$\|.\)"me=e-1 +syn match rexxVariable "\(=\|,\|)\|%\|\]\|\\\||\|&\|+=\|-=\|<\|>\)\s*\zs\K\k*\ze" + +" rgf, 2007-07-22: unfortunately, the entire region is colored (not only the +" patterns), hence useless (vim 7.0)! (syntax-docs hint that that should work) +" attempt: just colorize the parenthesis in matching colors, keep content +" transparent to keep the formatting already done to it! +" syn region par1 matchgroup=par1 start="(" matchgroup=par1 end=")" transparent contains=par2 +" syn region par2 matchgroup=par2 start="(" matchgroup=par2 end=")" transparent contains=par3 contained +" syn region par3 matchgroup=par3 start="(" matchgroup=par3 end=")" transparent contains=par4 contained +" syn region par4 matchgroup=par4 start="(" matchgroup=par4 end=")" transparent contains=par5 contained +" syn region par5 matchgroup=par5 start="(" matchgroup=par5 end=")" transparent contains=par1 contained + +" this will colorize the entire region, removing any colorizing already done! +" syn region par1 matchgroup=par1 start="(" end=")" contains=par2 +" syn region par2 matchgroup=par2 start="(" end=")" contains=par3 contained +" syn region par3 matchgroup=par3 start="(" end=")" contains=par4 contained +" syn region par4 matchgroup=par4 start="(" end=")" contains=par5 contained +" syn region par5 matchgroup=par5 start="(" end=")" contains=par1 contained + +hi par1 ctermfg=red guifg=red +hi par2 ctermfg=blue guifg=blue +hi par3 ctermfg=darkgreen guifg=darkgreen +hi par4 ctermfg=darkyellow guifg=darkyellow +hi par5 ctermfg=darkgrey guifg=darkgrey + +" line continuation (trailing comma or single dash) +syn sync linecont "\(,\|-\ze-\@!\)\ze\s*\(--.*\|\/\*.*\)*$" + +" if !exists("rexx_minlines") +" let rexx_minlines = 500 +" endif +" exec "syn sync ccomment rexxComment minlines=" . rexx_minlines + +" always scan from start, PCs are powerful enough for that in 2007 ! +exec "syn sync fromstart" + +" 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_rexx_syn_inits") + if version < 508 + let did_rexx_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " make binary and hex strings stand out + hi rexxStringConstant term=bold,underline ctermfg=5 cterm=bold guifg=darkMagenta gui=bold + + HiLink rexxLabel2 Function + HiLink doLoopSelectLabelRegion rexxKeyword + HiLink endIterateLeaveLabelRegion rexxKeyword + HiLink rexxLoopKeywords rexxKeyword " Todo + + HiLink rexxNumber Normal +" HiLink rexxIdentifier DiffChange + + HiLink rexxRegularCallSignal Statement + HiLink rexxExceptionHandling Statement + + HiLink rexxLabel Function + HiLink rexxCharacter Character + HiLink rexxParenError rexxError + HiLink rexxInParen rexxError + HiLink rexxCommentError rexxError + HiLink rexxError Error + HiLink rexxKeyword Statement + HiLink rexxKeywordStatements Statement + + HiLink rexxFunction Function + HiLink rexxString String + HiLink rexxComment Comment + HiLink rexxTodo Todo + HiLink rexxSpecialVariable Special + HiLink rexxConditional rexxKeyword + + HiLink rexxOperator Operator + HiLink rexxMessageOperator rexxOperator + HiLink rexxLineComment Comment + + HiLink rexxLineContinue WildMenu + + HiLink rexxDirective rexxKeyword + HiLink rexxClassDirective Type + HiLink rexxMethodDirective rexxFunction + HiLink rexxAttributeDirective rexxFunction + HiLink rexxRequiresDirective Include + HiLink rexxRoutineDirective rexxFunction + + HiLink rexxConst Constant + HiLink rexxTypeSpecifier Type + HiLink rexxBuiltinClass rexxTypeSpecifier + + HiLink rexxEnvironmentSymbol rexxConst + HiLink rexxMessage rexxFunction + + HiLink rexxParse rexxKeyword + HiLink rexxParse2 rexxParse + + HiLink rexxGuard rexxKeyword + HiLink rexxTrace rexxKeyword + + HiLink rexxRaise rexxKeyword + HiLink rexxRaise2 rexxRaise + + HiLink rexxForward rexxKeyword + HiLink rexxForward2 rexxForward + + delcommand HiLink +endif + +let b:current_syntax = "rexx" + +"vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/rhelp.vim b/vim/bundle/ubuntu-vim72/syntax/rhelp.vim new file mode 100644 index 0000000..fa585b2 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/rhelp.vim @@ -0,0 +1,157 @@ +" Vim syntax file +" Language: R Help File +" Maintainer: Johannes Ranke +" Last Change: 2009 Mai 12 +" Version: 0.7.2 +" SVN: $Id: rhelp.vim 86 2009-05-12 19:23:47Z ranke $ +" Remarks: - Now includes R syntax highlighting in the appropriate +" sections if an r.vim file is in the same directory or in the +" default debian location. +" - There is no Latex markup in equations +" - Thanks to Will Gray for finding and fixing a bug + +" 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 + +" R help identifiers {{{ +syn region rhelpIdentifier matchgroup=rhelpSection start="\\name{" end="}" +syn region rhelpIdentifier matchgroup=rhelpSection start="\\alias{" end="}" +syn region rhelpIdentifier matchgroup=rhelpSection start="\\pkg{" end="}" +syn region rhelpIdentifier matchgroup=rhelpSection start="\\item{" end="}" contained contains=rhelpDots +syn region rhelpIdentifier matchgroup=rhelpSection start="\\method{" end=/}/ contained + +" Highlighting of R code using an existing r.vim syntax file if available {{{1 +syn include @R syntax/r.vim +syn match rhelpDots "\\dots" containedin=@R +syn region rhelpRcode matchgroup=Delimiter start="\\examples{" matchgroup=Delimiter transparent end=/}/ contains=@R,rhelpSection +syn region rhelpRcode matchgroup=Delimiter start="\\usage{" matchgroup=Delimiter transparent end=/}/ contains=@R,rhelpIdentifier,rhelpS4method +syn region rhelpRcode matchgroup=Delimiter start="\\synopsis{" matchgroup=Delimiter transparent end=/}/ contains=@R +syn region rhelpRcode matchgroup=Delimiter start="\\special{" matchgroup=Delimiter transparent end=/}/ contains=@R contained +syn region rhelpRcode matchgroup=Delimiter start="\\code{" matchgroup=Delimiter transparent end=/}/ contains=@R,rhelpLink contained +syn region rhelpS4method matchgroup=Delimiter start="\\S4method{.*}(" matchgroup=Delimiter transparent end=/)/ contains=@R,rhelpDots contained + +" Strings {{{1 +syn region rhelpString start=/"/ end=/"/ + +" Special characters ( \$ \& \% \# \{ \} \_) {{{1 +syn match rhelpSpecialChar "\\[$&%#{}_]" + +" Special Delimiters {{{1 +syn match rhelpDelimiter "\\cr" +syn match rhelpDelimiter "\\tab " + +" Keywords {{{1 +syn match rhelpKeyword "\\R" +syn match rhelpKeyword "\\ldots" +syn match rhelpKeyword "--" +syn match rhelpKeyword "---" +syn match rhelpKeyword "<" +syn match rhelpKeyword ">" + +" Links {{{1 +syn region rhelpLink matchgroup=rhelpSection start="\\link{" end="}" contained keepend +syn region rhelpLink matchgroup=rhelpSection start="\\link\[.\{-}\]{" end="}" contained keepend +syn region rhelpLink matchgroup=rhelpSection start="\\linkS4class{" end="}" contained keepend + +" Type Styles {{{1 +syn match rhelpType "\\emph\>" +syn match rhelpType "\\strong\>" +syn match rhelpType "\\bold\>" +syn match rhelpType "\\sQuote\>" +syn match rhelpType "\\dQuote\>" +syn match rhelpType "\\preformatted\>" +syn match rhelpType "\\kbd\>" +syn match rhelpType "\\samp\>" +syn match rhelpType "\\eqn\>" +syn match rhelpType "\\deqn\>" +syn match rhelpType "\\file\>" +syn match rhelpType "\\email\>" +syn match rhelpType "\\url\>" +syn match rhelpType "\\var\>" +syn match rhelpType "\\env\>" +syn match rhelpType "\\option\>" +syn match rhelpType "\\command\>" +syn match rhelpType "\\dfn\>" +syn match rhelpType "\\cite\>" +syn match rhelpType "\\acronym\>" + +" rhelp sections {{{1 +syn match rhelpSection "\\encoding\>" +syn match rhelpSection "\\title\>" +syn match rhelpSection "\\description\>" +syn match rhelpSection "\\concept\>" +syn match rhelpSection "\\arguments\>" +syn match rhelpSection "\\details\>" +syn match rhelpSection "\\value\>" +syn match rhelpSection "\\references\>" +syn match rhelpSection "\\note\>" +syn match rhelpSection "\\author\>" +syn match rhelpSection "\\seealso\>" +syn match rhelpSection "\\keyword\>" +syn match rhelpSection "\\docType\>" +syn match rhelpSection "\\format\>" +syn match rhelpSection "\\source\>" +syn match rhelpSection "\\itemize\>" +syn match rhelpSection "\\describe\>" +syn match rhelpSection "\\enumerate\>" +syn match rhelpSection "\\item " +syn match rhelpSection "\\item$" +syn match rhelpSection "\\tabular{[lcr]*}" +syn match rhelpSection "\\dontrun\>" +syn match rhelpSection "\\dontshow\>" +syn match rhelpSection "\\testonly\>" +syn match rhelpSection "\\donttest\>" + +" Freely named Sections {{{1 +syn region rhelpFreesec matchgroup=Delimiter start="\\section{" matchgroup=Delimiter transparent end=/}/ + +" R help file comments {{{1 +syn match rhelpComment /%.*$/ contained + +" Error {{{1 +syn region rhelpRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rhelpError,rhelpBraceError,rhelpCurlyError +syn region rhelpRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rhelpError,rhelpBraceError,rhelpParenError +syn region rhelpRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rhelpError,rhelpCurlyError,rhelpParenError +syn match rhelpError /[)\]}]/ +syn match rhelpBraceError /[)}]/ contained +syn match rhelpCurlyError /[)\]]/ contained +syn match rhelpParenError /[\]}]/ contained + +" Define the default highlighting {{{1 +" 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_rhelp_syntax_inits") + if version < 508 + let did_rhelp_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + HiLink rhelpIdentifier Identifier + HiLink rhelpString String + HiLink rhelpKeyword Keyword + HiLink rhelpDots Keyword + HiLink rhelpLink Underlined + HiLink rhelpType Type + HiLink rhelpSection PreCondit + HiLink rhelpError Error + HiLink rhelpBraceError Error + HiLink rhelpCurlyError Error + HiLink rhelpParenError Error + HiLink rhelpDelimiter Delimiter + HiLink rhelpComment Comment + HiLink rhelpRComment Comment + HiLink rhelpSpecialChar SpecialChar + delcommand HiLink +endif + +let b:current_syntax = "rhelp" +" vim: foldmethod=marker: diff --git a/vim/bundle/ubuntu-vim72/syntax/rib.vim b/vim/bundle/ubuntu-vim72/syntax/rib.vim new file mode 100644 index 0000000..6b9f2b0 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/rib.vim @@ -0,0 +1,73 @@ +" Vim syntax file +" Language: Renderman Interface Bytestream +" Maintainer: Andrew Bromage +" Last Change: 2003 May 11 +" + +" Remove any old syntax stuff hanging around +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +syn case match + +" Comments +syn match ribLineComment "#.*$" +syn match ribStructureComment "##.*$" + +syn case ignore +syn match ribCommand /[A-Z][a-zA-Z]*/ +syn case match + +syn region ribString start=/"/ skip=/\\"/ end=/"/ + +syn match ribStructure "[A-Z][a-zA-Z]*Begin\>\|[A-Z][a-zA-Z]*End" +syn region ribSectionFold start="FrameBegin" end="FrameEnd" fold transparent keepend extend +syn region ribSectionFold start="WorldBegin" end="WorldEnd" fold transparent keepend extend +syn region ribSectionFold start="TransformBegin" end="TransformEnd" fold transparent keepend extend +syn region ribSectionFold start="AttributeBegin" end="AttributeEnd" fold transparent keepend extend +syn region ribSectionFold start="MotionBegin" end="MotionEnd" fold transparent keepend extend +syn region ribSectionFold start="SolidBegin" end="SolidEnd" fold transparent keepend extend +syn region ribSectionFold start="ObjectBegin" end="ObjectEnd" fold transparent keepend extend + +syn sync fromstart + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match ribNumbers display transparent "[-]\=\<\d\|\.\d" contains=ribNumber,ribFloat +syn match ribNumber display contained "[-]\=\d\+\>" +"floating point number, with dot, optional exponent +syn match ribFloat display contained "[-]\=\d\+\.\d*\(e[-+]\=\d\+\)\=" +"floating point number, starting with a dot, optional exponent +syn match ribFloat display contained "[-]\=\.\d\+\(e[-+]\=\d\+\)\=\>" +"floating point number, without dot, with exponent +syn match ribFloat display contained "[-]\=\d\+e[-+]\d\+\>" +syn case match + +if version >= 508 || !exists("did_rib_syntax_inits") + if version < 508 + let did_rib_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink ribStructure Structure + HiLink ribCommand Statement + + HiLink ribStructureComment SpecialComment + HiLink ribLineComment Comment + + HiLink ribString String + HiLink ribNumber Number + HiLink ribFloat Float + + delcommand HiLink +end + + +let b:current_syntax = "rib" + +" Options for vi: ts=8 sw=2 sts=2 nowrap noexpandtab ft=vim diff --git a/vim/bundle/ubuntu-vim72/syntax/rnc.vim b/vim/bundle/ubuntu-vim72/syntax/rnc.vim new file mode 100644 index 0000000..8436c88 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/rnc.vim @@ -0,0 +1,68 @@ +" Vim syntax file +" Language: Relax NG compact syntax +" Maintainer: Nikolai Weibull +" Latest Revision: 2007-06-17 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +setlocal iskeyword+=-,. + +syn keyword rncTodo contained TODO FIXME XXX NOTE + +syn region rncComment display oneline start='^\s*#' end='$' + \ contains=rncTodo,@Spell + +syn match rncOperator display '[-|,&+?*~]' +syn match rncOperator display '\%(|&\)\==' +syn match rncOperator display '>>' + +syn match rncNamespace display '\<\k\+:' + +syn match rncQuoted display '\\\k\+\>' + +syn match rncSpecial display '\\x{\x\+}' + +syn region rncAnnotation transparent start='\[' end='\]' + \ contains=ALLBUT,rncComment,rncTodo + +syn region rncLiteral display oneline start=+"+ end=+"+ + \ contains=rncSpecial +syn region rncLiteral display oneline start=+'+ end=+'+ +syn region rncLiteral display oneline start=+"""+ end=+"""+ + \ contains=rncSpecial +syn region rncLiteral display oneline start=+'''+ end=+'''+ + +syn match rncDelimiter display '[{},()]' + +syn keyword rncKeyword datatypes default div empty external grammar +syn keyword rncKeyword include inherit list mixed name namespace +syn keyword rncKeyword notAllowed parent start string text token + +syn match rncIdentifier display '\k\+\_s*\%(=\|&=\||=\)\@=' + \ nextgroup=rncOperator +syn keyword rncKeyword element attribute + \ nextgroup=rncIdName skipwhite skipempty +syn match rncIdName contained '\k\+' + +hi def link rncTodo Todo +hi def link rncComment Comment +hi def link rncOperator Operator +hi def link rncNamespace Identifier +hi def link rncQuoted Special +hi def link rncSpecial SpecialChar +hi def link rncAnnotation Special +hi def link rncLiteral String +hi def link rncDelimiter Delimiter +hi def link rncKeyword Keyword +hi def link rncIdentifier Identifier +hi def link rncIdName Identifier + +let b:current_syntax = "rnc" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/rnoweb.vim b/vim/bundle/ubuntu-vim72/syntax/rnoweb.vim new file mode 100644 index 0000000..7d42395 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/rnoweb.vim @@ -0,0 +1,57 @@ +" Vim syntax file +" Language: R noweb Files +" Maintainer: Johannes Ranke +" Last Change: 2009 May 05 +" Version: 0.9 +" SVN: $Id: rnoweb.vim 84 2009-05-03 19:52:47Z ranke $ +" Remarks: - This file is inspired by the proposal of +" Fernando Henrique Ferraz Pereira da Rosa +" http://www.ime.usp.br/~feferraz/en/sweavevim.html +" + +" 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 clusters {{{1 +runtime syntax/tex.vim +unlet b:current_syntax + +syn cluster texMatchGroup add=@rnoweb +syn cluster texMathMatchGroup add=rnowebSexpr +syn cluster texEnvGroup add=@rnoweb +syn cluster texFoldGroup add=@rnoweb +syn cluster texDocGroup add=@rnoweb +syn cluster texPartGroup add=@rnoweb +syn cluster texChapterGroup add=@rnoweb +syn cluster texSectionGroup add=@rnoweb +syn cluster texSubSectionGroup add=@rnoweb +syn cluster texSubSubSectionGroup add=@rnoweb +syn cluster texParaGroup add=@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 fold 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 +hi def link rnowebChunkReference Delimiter + +let b:current_syntax = "rnoweb" +" vim: foldmethod=marker: diff --git a/vim/bundle/ubuntu-vim72/syntax/robots.vim b/vim/bundle/ubuntu-vim72/syntax/robots.vim new file mode 100644 index 0000000..066628b --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/robots.vim @@ -0,0 +1,69 @@ +" Vim syntax file +" Language: "Robots.txt" files +" Robots.txt files indicate to WWW robots which parts of a web site should not be accessed. +" Maintainer: Dominique Stéphan (dominique@mggen.com) +" URL: http://www.mggen.com/vim/syntax/robots.zip +" Last change: 2001 May 09 + +" 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 + + +" shut case off +syn case ignore + +" Comment +syn match robotsComment "#.*$" contains=robotsUrl,robotsMail,robotsString + +" Star * (means all spiders) +syn match robotsStar "\*" + +" : +syn match robotsDelimiter ":" + + +" The keywords +" User-agent +syn match robotsAgent "^[Uu][Ss][Ee][Rr]\-[Aa][Gg][Ee][Nn][Tt]" +" Disallow +syn match robotsDisallow "^[Dd][Ii][Ss][Aa][Ll][Ll][Oo][Ww]" + +" Disallow: or User-Agent: and the rest of the line before an eventual comment +synt match robotsLine "\(^[Uu][Ss][Ee][Rr]\-[Aa][Gg][Ee][Nn][Tt]\|^[Dd][Ii][Ss][Aa][Ll][Ll][Oo][Ww]\):[^#]*" contains=robotsAgent,robotsDisallow,robotsStar,robotsDelimiter + +" Some frequent things in comments +syn match robotsUrl "http[s]\=://\S*" +syn match robotsMail "\S*@\S*" +syn region robotsString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ + +if version >= 508 || !exists("did_robos_syntax_inits") + if version < 508 + let did_robots_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink robotsComment Comment + HiLink robotsAgent Type + HiLink robotsDisallow Statement + HiLink robotsLine Special + HiLink robotsStar Operator + HiLink robotsDelimiter Delimiter + HiLink robotsUrl String + HiLink robotsMail String + HiLink robotsString String + + delcommand HiLink +endif + + +let b:current_syntax = "robots" + +" vim: ts=8 sw=2 + diff --git a/vim/bundle/ubuntu-vim72/syntax/rpcgen.vim b/vim/bundle/ubuntu-vim72/syntax/rpcgen.vim new file mode 100644 index 0000000..548f8c8 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/rpcgen.vim @@ -0,0 +1,63 @@ +" Vim syntax file +" Language: rpcgen +" Maintainer: Dr. Charles E. Campbell, Jr. +" Last Change: Sep 06, 2005 +" Version: 8 +" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax + +" 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 + +" Read the C syntax to start with +if version < 600 + source :p:h/c.vim +else + runtime! syntax/c.vim +endif + +syn keyword rpcProgram program skipnl skipwhite nextgroup=rpcProgName +syn match rpcProgName contained "\<\i\I*\>" skipnl skipwhite nextgroup=rpcProgZone +syn region rpcProgZone contained matchgroup=Delimiter start="{" matchgroup=Delimiter end="}\s*=\s*\(\d\+\|0x[23]\x\{7}\)\s*;"me=e-1 contains=rpcVersion,cComment,rpcProgNmbrErr +syn keyword rpcVersion contained version skipnl skipwhite nextgroup=rpcVersName +syn match rpcVersName contained "\<\i\I*\>" skipnl skipwhite nextgroup=rpcVersZone +syn region rpcVersZone contained matchgroup=Delimiter start="{" matchgroup=Delimiter end="}\s*=\s*\d\+\s*;"me=e-1 contains=cType,cStructure,cStorageClass,rpcDecl,rpcProcNmbr,cComment +syn keyword rpcDecl contained string +syn match rpcProcNmbr contained "=\s*\d\+;"me=e-1 +syn match rpcProgNmbrErr contained "=\s*0x[^23]\x*"ms=s+1 +syn match rpcPassThru "^\s*%.*$" + +" 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_rpcgen_syntax_inits") + if version < 508 + let did_rpcgen_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink rpcProgName rpcName + HiLink rpcProgram rpcStatement + HiLink rpcVersName rpcName + HiLink rpcVersion rpcStatement + + HiLink rpcDecl cType + HiLink rpcPassThru cComment + + HiLink rpcName Special + HiLink rpcProcNmbr Delimiter + HiLink rpcProgNmbrErr Error + HiLink rpcStatement Statement + + delcommand HiLink +endif + +let b:current_syntax = "rpcgen" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/rpl.vim b/vim/bundle/ubuntu-vim72/syntax/rpl.vim new file mode 100644 index 0000000..bc50475 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/rpl.vim @@ -0,0 +1,491 @@ +" Vim syntax file +" Language: RPL/2 +" Version: 0.15.15 against RPL/2 version 4.00pre7i +" Last Change: 2003 august 24 +" Maintainer: Joël BERTRAND +" URL: http://www.makalis.fr/~bertrand/rpl2/download/vim/indent/rpl.vim +" Credits: Nothing + +" 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 + +" Keyword characters (not used) +" set iskeyword=33-127 + +" Case sensitive +syntax case match + +" Constants +syntax match rplConstant "\(^\|\s\+\)\(e\|i\)\ze\($\|\s\+\)" + +" Any binary number +syntax match rplBinaryError "\(^\|\s\+\)#\s*\S\+b\ze" +syntax match rplBinary "\(^\|\s\+\)#\s*[01]\+b\ze\($\|\s\+\)" +syntax match rplOctalError "\(^\|\s\+\)#\s*\S\+o\ze" +syntax match rplOctal "\(^\|\s\+\)#\s*\o\+o\ze\($\|\s\+\)" +syntax match rplDecimalError "\(^\|\s\+\)#\s*\S\+d\ze" +syntax match rplDecimal "\(^\|\s\+\)#\s*\d\+d\ze\($\|\s\+\)" +syntax match rplHexadecimalError "\(^\|\s\+\)#\s*\S\+h\ze" +syntax match rplHexadecimal "\(^\|\s\+\)#\s*\x\+h\ze\($\|\s\+\)" + +" Case unsensitive +syntax case ignore + +syntax match rplControl "\(^\|\s\+\)abort\ze\($\|\s\+\)" +syntax match rplControl "\(^\|\s\+\)kill\ze\($\|\s\+\)" +syntax match rplControl "\(^\|\s\+\)cont\ze\($\|\s\+\)" +syntax match rplControl "\(^\|\s\+\)halt\ze\($\|\s\+\)" +syntax match rplControl "\(^\|\s\+\)cmlf\ze\($\|\s\+\)" +syntax match rplControl "\(^\|\s\+\)sst\ze\($\|\s\+\)" + +syntax match rplConstant "\(^\|\s\+\)pi\ze\($\|\s\+\)" + +syntax match rplStatement "\(^\|\s\+\)return\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)last\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)syzeval\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)wait\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)type\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)kind\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)eval\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)use\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)remove\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)external\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)dup\([2n]\|\)\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)drop\([2n]\|\)\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)depth\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)roll\(d\|\)\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)pick\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)rot\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)swap\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)over\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)clear\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)warranty\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)copyright\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)convert\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)date\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)time\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)mem\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)clmf\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)->num\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)help\ze\($\|\s\+\)" + +syntax match rplStorage "\(^\|\s\+\)get\(i\|r\|c\|\)\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)put\(i\|r\|c\|\)\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)rcl\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)purge\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)sinv\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)sneg\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)sconj\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)steq\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)rceq\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)vars\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)clusr\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)sto\([+-/\*]\|\)\ze\($\|\s\+\)" + +syntax match rplAlgConditional "\(^\|\s\+\)ift\(e\|\)\ze\($\|\s\+\)" + +syntax match rplOperator "\(^\|\s\+\)and\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)\(x\|\)or\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)not\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)same\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)==\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)<=\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)=<\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)=>\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)>=\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)<>\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)>\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)<\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)[+-]\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)[/\*]\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)\^\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)\*\*\ze\($\|\s\+\)" + +syntax match rplBoolean "\(^\|\s\+\)true\ze\($\|\s\+\)" +syntax match rplBoolean "\(^\|\s\+\)false\ze\($\|\s\+\)" + +syntax match rplReadWrite "\(^\|\s\+\)store\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)recall\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)\(\|wf\|un\)lock\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)open\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)close\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)delete\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)create\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)format\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)rewind\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)backspace\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)\(\|re\)write\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)read\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)inquire\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)sync\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)append\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)suppress\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)seek\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)pr\(1\|int\|st\|stc\|lcd\|var\|usr\|md\)\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)paper\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)cr\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)erase\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)disp\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)input\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)prompt\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)key\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)cllcd\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)\(\|re\)draw\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)drax\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)indep\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)depnd\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)res\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)axes\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)label\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)pmin\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)pmax\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)centr\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)persist\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)title\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)\(slice\|auto\|log\|\)scale\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)eyept\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)\(p\|s\)par\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)function\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)polar\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)scatter\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)plotter\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)wireframe\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)parametric\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)slice\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)\*w\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)\*h\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)\*d\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)\*s\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)->lcd\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)lcd->\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)edit\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)visit\ze\($\|\s\+\)" + +syntax match rplIntrinsic "\(^\|\s\+\)abs\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)arg\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)conj\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)re\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)im\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)mant\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)xpon\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)ceil\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)fact\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)fp\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)floor\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)inv\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)ip\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)max\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)min\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)mod\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)neg\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)relax\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)sign\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)sq\(\|rt\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)xroot\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)cos\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)sin\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)tan\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)tg\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)a\(\|rc\)cos\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)a\(\|rc\)sin\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)atan\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)arctg\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|a\)cosh\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|a\)sinh\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|a\)tanh\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|arg\)th\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)arg[cst]h\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|a\)log\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)ln\(\|1\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)exp\(\|m\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)trn\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)con\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)idn\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)rdm\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)rsd\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)cnrm\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)cross\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)d[eo]t\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)[cr]swp\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)rci\(j\|\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(in\|de\)cr\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)bessel\ze\($\|\s\+\)" + +syntax match rplIntrinsic "\(^\|\s\+\)\(\|g\)egvl\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|g\)\(\|l\|r\)egv\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)rnrm\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(std\|fix\|sci\|eng\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(rad\|deg\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|n\)rand\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)rdz\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|i\)fft\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(dec\|bin\|oct\|hex\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)rclf\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)stof\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)[cs]f\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)chr\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)num\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)pos\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)sub\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)size\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(st\|rc\)ws\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(r\|s\)\(r\|l\)\(\|b\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)as\(r\|l\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(int\|der\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)stos\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|r\)cls\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)drws\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)scls\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)ns\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)tot\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)mean\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|p\)sdev\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|p\)var\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)maxs\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)mins\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|p\)cov\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)cols\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)s\(x\(\|y\|2\)\|y\(\|2\)\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(x\|y\)col\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)corr\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)utp[cfnt]\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)comb\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)perm\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|p\)lu\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)[lu]chol\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)schur\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)%\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)%ch\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)%t\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)hms->\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)->hms\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)hms+\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)hms-\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)d->r\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)r->d\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)b->r\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)r->b\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)c->r\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)r->c\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)r->p\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)p->r\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)str->\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)->str\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)array->\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)->array\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)list->\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)->list\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)s+\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)s-\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)col-\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)col+\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)row-\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)row+\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)->q\ze\($\|\s\+\)" + +syntax match rplObsolete "\(^\|\s\+\)arry->\ze\($\|\s\+\)"hs=e-5 +syntax match rplObsolete "\(^\|\s\+\)->arry\ze\($\|\s\+\)"hs=e-5 + +" Conditional structures +syntax match rplConditionalError "\(^\|\s\+\)case\ze\($\|\s\+\)"hs=e-3 +syntax match rplConditionalError "\(^\|\s\+\)then\ze\($\|\s\+\)"hs=e-3 +syntax match rplConditionalError "\(^\|\s\+\)else\ze\($\|\s\+\)"hs=e-3 +syntax match rplConditionalError "\(^\|\s\+\)elseif\ze\($\|\s\+\)"hs=e-5 +syntax match rplConditionalError "\(^\|\s\+\)end\ze\($\|\s\+\)"hs=e-2 +syntax match rplConditionalError "\(^\|\s\+\)\(step\|next\)\ze\($\|\s\+\)"hs=e-3 +syntax match rplConditionalError "\(^\|\s\+\)until\ze\($\|\s\+\)"hs=e-4 +syntax match rplConditionalError "\(^\|\s\+\)repeat\ze\($\|\s\+\)"hs=e-5 +syntax match rplConditionalError "\(^\|\s\+\)default\ze\($\|\s\+\)"hs=e-6 + +" FOR/(CYCLE)/(EXIT)/NEXT +" FOR/(CYCLE)/(EXIT)/STEP +" START/(CYCLE)/(EXIT)/NEXT +" START/(CYCLE)/(EXIT)/STEP +syntax match rplCycle "\(^\|\s\+\)\(cycle\|exit\)\ze\($\|\s\+\)" +syntax region rplForNext matchgroup=rplRepeat start="\(^\|\s\+\)\(for\|start\)\ze\($\|\s\+\)" end="\(^\|\s\+\)\(next\|step\)\ze\($\|\s\+\)" contains=ALL keepend extend + +" ELSEIF/END +syntax region rplElseifEnd matchgroup=rplConditional start="\(^\|\s\+\)elseif\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contained contains=ALLBUT,rplElseEnd keepend + +" ELSE/END +syntax region rplElseEnd matchgroup=rplConditional start="\(^\|\s\+\)else\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contained contains=ALLBUT,rplElseEnd,rplThenEnd,rplElseifEnd keepend + +" THEN/END +syntax region rplThenEnd matchgroup=rplConditional start="\(^\|\s\+\)then\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contained containedin=rplIfEnd contains=ALLBUT,rplThenEnd keepend + +" IF/END +syntax region rplIfEnd matchgroup=rplConditional start="\(^\|\s\+\)if\(err\|\)\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contains=ALLBUT,rplElseEnd,rplElseifEnd keepend extend +" if end is accepted ! +" select end too ! + +" CASE/THEN +syntax region rplCaseThen matchgroup=rplConditional start="\(^\|\s\+\)case\ze\($\|\s\+\)" end="\(^\|\s\+\)then\ze\($\|\s\+\)" contains=ALLBUT,rplCaseThen,rplCaseEnd,rplThenEnd keepend extend contained containedin=rplCaseEnd + +" CASE/END +syntax region rplCaseEnd matchgroup=rplConditional start="\(^\|\s\+\)case\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contains=ALLBUT,rplCaseEnd,rplThenEnd,rplElseEnd keepend extend contained containedin=rplSelectEnd + +" DEFAULT/END +syntax region rplDefaultEnd matchgroup=rplConditional start="\(^\|\s\+\)default\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contains=ALLBUT,rplDefaultEnd keepend contained containedin=rplSelectEnd + +" SELECT/END +syntax region rplSelectEnd matchgroup=rplConditional start="\(^\|\s\+\)select\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contains=ALLBUT,rplThenEnd keepend extend +" select end is accepted ! + +" DO/UNTIL/END +syntax region rplUntilEnd matchgroup=rplConditional start="\(^\|\s\+\)until\ze\($\|\s\+\)" end="\(^\|\s\+\)\zsend\ze\($\|\s\+\)" contains=ALLBUT,rplUntilEnd contained containedin=rplDoUntil extend keepend +syntax region rplDoUntil matchgroup=rplConditional start="\(^\|\s\+\)do\ze\($\|\s\+\)" end="\(^\|\s\+\)until\ze\($\|\s\+\)" contains=ALL keepend extend + +" WHILE/REPEAT/END +syntax region rplRepeatEnd matchgroup=rplConditional start="\(^\|\s\+\)repeat\ze\($\|\s\+\)" end="\(^\|\s\+\)\zsend\ze\($\|\s\+\)" contains=ALLBUT,rplRepeatEnd contained containedin=rplWhileRepeat extend keepend +syntax region rplWhileRepeat matchgroup=rplConditional start="\(^\|\s\+\)while\ze\($\|\s\+\)" end="\(^\|\s\+\)repeat\ze\($\|\s\+\)" contains=ALL keepend extend + +" Comments +syntax match rplCommentError "\*/" +syntax region rplCommentString contained start=+"+ end=+"+ end=+\*/+me=s-1 +syntax region rplCommentLine start="\(^\|\s\+\)//\ze" skip="\\$" end="$" contains=NONE keepend extend +syntax region rplComment start="\(^\|\s\+\)/\*\ze" end="\*/" contains=rplCommentString keepend extend + +" Catch errors caused by too many right parentheses +syntax region rplParen transparent start="(" end=")" contains=ALLBUT,rplParenError,rplComplex,rplIncluded keepend extend +syntax match rplParenError ")" + +" Subroutines +" Catch errors caused by too many right '>>' +syntax match rplSubError "\(^\|\s\+\)>>\ze\($\|\s\+\)"hs=e-1 +syntax region rplSub matchgroup=rplSubDelimitor start="\(^\|\s\+\)<<\ze\($\|\s\+\)" end="\(^\|\s\+\)>>\ze\($\|\s\+\)" contains=ALLBUT,rplSubError,rplIncluded,rplDefaultEnd,rplStorageSub keepend extend + +" Expressions +syntax region rplExpr start="\(^\|\s\+\)'" end="'\ze\($\|\s\+\)" contains=rplParen,rplParenError + +" Local variables +syntax match rplStorageError "\(^\|\s\+\)->\ze\($\|\s\+\)"hs=e-1 +syntax region rplStorageSub matchgroup=rplStorage start="\(^\|\s\+\)<<\ze\($\|\s\+\)" end="\(^\|\s\+\)>>\ze\($\|\s\+\)" contains=ALLBUT,rplSubError,rplIncluded,rplDefaultEnd,rplStorageExpr contained containedin=rplLocalStorage keepend extend +syntax region rplStorageExpr matchgroup=rplStorage start="\(^\|\s\+\)'" end="'\ze\($\|\s\+\)" contains=rplParen,rplParenError extend contained containedin=rplLocalStorage +syntax region rplLocalStorage matchgroup=rplStorage start="\(^\|\s\+\)->\ze\($\|\s\+\)" end="\(^\|\s\+\)\(<<\ze\($\|\s\+\)\|'\)" contains=rplStorageSub,rplStorageExpr,rplComment,rplCommentLine keepend extend + +" Catch errors caused by too many right brackets +syntax match rplArrayError "\]" +syntax match rplArray "\]" contained containedin=rplArray +syntax region rplArray matchgroup=rplArray start="\[" end="\]" contains=ALLBUT,rplArrayError keepend extend + +" Catch errors caused by too many right '}' +syntax match rplListError "}" +syntax match rplList "}" contained containedin=rplList +syntax region rplList matchgroup=rplList start="{" end="}" contains=ALLBUT,rplListError,rplIncluded keepend extend + +" cpp is used by RPL/2 +syntax match rplPreProc "\_^#\s*\(define\|undef\)\>" +syntax match rplPreProc "\_^#\s*\(warning\|error\)\>" +syntax match rplPreCondit "\_^#\s*\(if\|ifdef\|ifndef\|elif\|else\|endif\)\>" +syntax match rplIncluded contained "\<<\s*\S*\s*>\>" +syntax match rplInclude "\_^#\s*include\>\s*["<]" contains=rplIncluded,rplString +"syntax match rplExecPath "\%^\_^#!\s*\S*" +syntax match rplExecPath "\%^\_^#!\p*\_$" + +" Any integer +syntax match rplInteger "\(^\|\s\+\)[-+]\=\d\+\ze\($\|\s\+\)" + +" Floating point number +" [S][ip].[fp] +syntax match rplFloat "\(^\|\s\+\)[-+]\=\(\d*\)\=[\.,]\(\d*\)\=\ze\($\|\s\+\)" contains=ALLBUT,rplPoint,rplSign +" [S]ip[.fp]E[S]exp +syntax match rplFloat "\(^\|\s\+\)[-+]\=\d\+\([\.,]\d*\)\=[eE]\([-+]\)\=\d\+\ze\($\|\s\+\)" contains=ALLBUT,rplPoint,rplSign +" [S].fpE[S]exp +syntax match rplFloat "\(^\|\s\+\)[-+]\=\(\d*\)\=[\.,]\d\+[eE]\([-+]\)\=\d\+\ze\($\|\s\+\)" contains=ALLBUT,rplPoint,rplSign +syntax match rplPoint "\<[\.,]\>" +syntax match rplSign "\<[+-]\>" + +" Complex number +" (x,y) +syntax match rplComplex "\(^\|\s\+\)([-+]\=\(\d*\)\=\.\=\d*\([eE][-+]\=\d\+\)\=\s*,\s*[-+]\=\(\d*\)\=\.\=\d*\([eE][-+]\=\d\+\)\=)\ze\($\|\s\+\)" +" (x.y) +syntax match rplComplex "\(^\|\s\+\)([-+]\=\(\d*\)\=,\=\d*\([eE][-+]\=\d\+\)\=\s*\.\s*[-+]\=\(\d*\)\=,\=\d*\([eE][-+]\=\d\+\)\=)\ze\($\|\s\+\)" + +" Strings +syntax match rplStringGuilles "\\\"" +syntax match rplStringAntislash "\\\\" +syntax region rplString start=+\(^\|\s\+\)"+ end=+"\ze\($\|\s\+\)+ contains=rplStringGuilles,rplStringAntislash + +syntax match rplTab "\t" transparent + +" 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_rpl_syntax_inits") + if version < 508 + let did_rpl_syntax_inits = 1 + command -nargs=+ HiLink highlight link + else + command -nargs=+ HiLink highlight default link + endif + + " The default highlighting. + + HiLink rplControl Statement + HiLink rplStatement Statement + HiLink rplAlgConditional Conditional + HiLink rplConditional Repeat + HiLink rplConditionalError Error + HiLink rplRepeat Repeat + HiLink rplCycle Repeat + HiLink rplUntil Repeat + HiLink rplIntrinsic Special + HiLink rplStorage StorageClass + HiLink rplStorageExpr StorageClass + HiLink rplStorageError Error + HiLink rplReadWrite rplIntrinsic + + HiLink rplOperator Operator + + HiLink rplList Special + HiLink rplArray Special + HiLink rplConstant Identifier + HiLink rplExpr Type + + HiLink rplString String + HiLink rplStringGuilles String + HiLink rplStringAntislash String + + HiLink rplBinary Boolean + HiLink rplOctal Boolean + HiLink rplDecimal Boolean + HiLink rplHexadecimal Boolean + HiLink rplInteger Number + HiLink rplFloat Float + HiLink rplComplex Float + HiLink rplBoolean Identifier + + HiLink rplObsolete Todo + + HiLink rplPreCondit PreCondit + HiLink rplInclude Include + HiLink rplIncluded rplString + HiLink rplInclude Include + HiLink rplExecPath Include + HiLink rplPreProc PreProc + HiLink rplComment Comment + HiLink rplCommentLine Comment + HiLink rplCommentString Comment + HiLink rplSubDelimitor rplStorage + HiLink rplCommentError Error + HiLink rplParenError Error + HiLink rplSubError Error + HiLink rplArrayError Error + HiLink rplListError Error + HiLink rplTab Error + HiLink rplBinaryError Error + HiLink rplOctalError Error + HiLink rplDecimalError Error + HiLink rplHexadecimalError Error + + delcommand HiLink +endif + +let b:current_syntax = "rpl" + +" vim: ts=8 tw=132 diff --git a/vim/bundle/ubuntu-vim72/syntax/rst.vim b/vim/bundle/ubuntu-vim72/syntax/rst.vim new file mode 100644 index 0000000..245c3ae --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/rst.vim @@ -0,0 +1,175 @@ +" Vim syntax file +" Language: reStructuredText documentation format +" Maintainer: Nikolai Weibull +" Latest Revision: 2009-05-25 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn case ignore + +syn match rstSections "^\%(\([=`:.'"~^_*+#-]\)\1\+\n\)\=.\+\n\([=`:.'"~^_*+#-]\)\2\+$" + +syn match rstTransition /^[=`:.'"~^_*+#-]\{4,}\s*$/ + +syn cluster rstCruft contains=rstEmphasis,rstStrongEmphasis, + \ rstInterpretedText,rstInlineLiteral,rstSubstitutionReference, + \ rstInlineInternalTargets,rstFootnoteReference,rstHyperlinkReference + +syn region rstLiteralBlock matchgroup=rstDelimiter + \ start='::\_s*\n\ze\z(\s\+\)' skip='^$' end='^\z1\@!' + \ contains=@NoSpell + +syn region rstQuotedLiteralBlock matchgroup=rstDelimiter + \ start="::\_s*\n\ze\z([!\"#$%&'()*+,-./:;<=>?@[\]^_`{|}~]\)" + \ end='^\z1\@!' contains=@NoSpell + +syn region rstDoctestBlock oneline display matchgroup=rstDelimiter + \ start='^>>>\s' end='^$' + +syn region rstTable transparent start='^\n\s*+[-=+]\+' end='^$' + \ contains=rstTableLines,@rstCruft +syn match rstTableLines contained display '|\|+\%(=\+\|-\+\)\=' + +syn region rstSimpleTable transparent + \ start='^\n\%(\s*\)\@>\%(\%(=\+\)\@>\%(\s\+\)\@>\)\%(\%(\%(=\+\)\@>\%(\s*\)\@>\)\+\)\@>$' + \ end='^$' + \ contains=rstSimpleTableLines,@rstCruft +syn match rstSimpleTableLines contained display + \ '^\%(\s*\)\@>\%(\%(=\+\)\@>\%(\s\+\)\@>\)\%(\%(\%(=\+\)\@>\%(\s*\)\@>\)\+\)\@>$' +syn match rstSimpleTableLines contained display + \ '^\%(\s*\)\@>\%(\%(-\+\)\@>\%(\s\+\)\@>\)\%(\%(\%(-\+\)\@>\%(\s*\)\@>\)\+\)\@>$' + +syn cluster rstDirectives contains=rstFootnote,rstCitation, + \ rstHyperlinkTarget,rstExDirective + +syn match rstExplicitMarkup '^\.\.\_s' + \ nextgroup=@rstDirectives,rstComment,rstSubstitutionDefinition + +let s:ReferenceName = '[[:alnum:]]\+\%([_.-][[:alnum:]]\+\)*' + +syn keyword rstTodo contained FIXME TODO XXX NOTE + +execute 'syn region rstComment contained' . + \ ' start=/.*/' + \ ' end=/^\s\@!/ contains=rstTodo' + +execute 'syn region rstFootnote contained matchgroup=rstDirective' . + \ ' start=+\[\%(\d\+\|#\%(' . s:ReferenceName . '\)\=\|\*\)\]\_s+' . + \ ' skip=+^$+' . + \ ' end=+^\s\@!+ contains=@rstCruft,@NoSpell' + +execute 'syn region rstCitation contained matchgroup=rstDirective' . + \ ' start=+\[' . s:ReferenceName . '\]\_s+' . + \ ' skip=+^$+' . + \ ' end=+^\s\@!+ contains=@rstCruft,@NoSpell' + +syn region rstHyperlinkTarget contained matchgroup=rstDirective + \ start='_\%(_\|[^:\\]*\%(\\.[^:\\]*\)*\):\_s' skip=+^$+ end=+^\s\@!+ + +syn region rstHyperlinkTarget contained matchgroup=rstDirective + \ start='_`[^`\\]*\%(\\.[^`\\]*\)*`:\_s' skip=+^$+ end=+^\s\@!+ + +syn region rstHyperlinkTarget matchgroup=rstDirective + \ start=+^__\_s+ skip=+^$+ end=+^\s\@!+ + +execute 'syn region rstExDirective contained matchgroup=rstDirective' . + \ ' start=+' . s:ReferenceName . '::\_s+' . + \ ' skip=+^$+' . + \ ' end=+^\s\@!+ contains=@rstCruft' + +execute 'syn match rstSubstitutionDefinition contained' . + \ ' /|' . s:ReferenceName . '|\_s\+/ nextgroup=@rstDirectives' + +function! s:DefineOneInlineMarkup(name, start, middle, end, char_left, char_right) + execute 'syn region rst' . a:name . + \ ' start=+' . a:char_left . '\zs' . a:start . + \ '\ze[^[:space:]' . a:char_right . a:start[strlen(a:start) - 1] . ']+' . + \ a:middle . + \ ' end=+\S' . a:end . '\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)+' +endfunction + +function! s:DefineInlineMarkup(name, start, middle, end) + let middle = a:middle != "" ? + \ (' skip=+\\\\\|\\' . a:middle . '+') : + \ "" + + call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, "'", "'") + call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '"', '"') + call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '(', ')') + call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\[', '\]') + call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '{', '}') + call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '<', '>') + + call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\%(^\|\s\|[/:]\)', '') + + execute 'syn match rst' . a:name . + \ ' +\%(^\|\s\|[''"([{/:.,;!?\\-]\)+' + + execute 'hi def link rst' . a:name . 'Delimiter' . ' rst' . a:name +endfunction + +call s:DefineInlineMarkup('Emphasis', '\*', '\*', '\*') +call s:DefineInlineMarkup('StrongEmphasis', '\*\*', '\*', '\*\*') +call s:DefineInlineMarkup('InterpretedTextOrHyperlinkReference', '`', '`', '`_\{0,2}') +call s:DefineInlineMarkup('InlineLiteral', '``', "", '``') +call s:DefineInlineMarkup('SubstitutionReference', '|', '|', '|_\{0,2}') +call s:DefineInlineMarkup('InlineInternalTargets', '_`', '`', '`') + +" TODO: Can’t remember why these two can’t be defined like the ones above. +execute 'syn match rstFootnoteReference contains=@NoSpell' . + \ ' +\[\%(\d\+\|#\%(' . s:ReferenceName . '\)\=\|\*\)\]_+' + +execute 'syn match rstCitationReference contains=@NoSpell' . + \ ' +\[' . s:ReferenceName . '\]_\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)+' + +execute 'syn match rstHyperlinkReference' . + \ ' /\<' . s:ReferenceName . '__\=\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)/' + +syn match rstStandaloneHyperlink contains=@NoSpell + \ "\<\%(\%(\%(https\=\|file\|ftp\|gopher\)://\|\%(mailto\|news\):\)[^[:space:]'\"<>]\+\|www[[:alnum:]_-]*\.[[:alnum:]_-]\+\.[^[:space:]'\"<>]\+\)[[:alnum:]/]" + +" TODO: Use better syncing. I don’t know the specifics of syncing well enough, +" though. +syn sync minlines=50 + +hi def link rstTodo Todo +hi def link rstComment Comment +hi def link rstSections Type +hi def link rstTransition Type +hi def link rstLiteralBlock String +hi def link rstQuotedLiteralBlock String +hi def link rstDoctestBlock PreProc +hi def link rstTableLines rstDelimiter +hi def link rstSimpleTableLines rstTableLines +hi def link rstExplicitMarkup rstDirective +hi def link rstDirective Keyword +hi def link rstFootnote String +hi def link rstCitation String +hi def link rstHyperlinkTarget String +hi def link rstExDirective String +hi def link rstSubstitutionDefinition rstDirective +hi def link rstDelimiter Delimiter +" TODO: I dunno... +hi def rstEmphasis term=italic cterm=italic gui=italic +hi def link rstStrongEmphasis Special +"term=bold cterm=bold gui=bold +hi def link rstInterpretedTextOrHyperlinkReference Identifier +hi def link rstInlineLiteral String +hi def link rstSubstitutionReference PreProc +hi def link rstInlineInternalTargets Identifier +hi def link rstFootnoteReference Identifier +hi def link rstCitationReference Identifier +hi def link rstHyperLinkReference Identifier +hi def link rstStandaloneHyperlink Identifier + +let b:current_syntax = "rst" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/rtf.vim b/vim/bundle/ubuntu-vim72/syntax/rtf.vim new file mode 100644 index 0000000..8f5ea71 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/rtf.vim @@ -0,0 +1,88 @@ +" Vim syntax file +" Language: Rich Text Format +" "*.rtf" files +" +" The Rich Text Format (RTF) Specification is a method of encoding formatted +" text and graphics for easy transfer between applications. +" .hlp (windows help files) use compiled rtf files +" rtf documentation at http://night.primate.wisc.edu/software/RTF/ +" +" Maintainer: Dominique Stéphan (dominique@mggen.com) +" URL: http://www.mggen.com/vim/syntax/rtf.zip +" Last change: 2001 Mai 02 + +" TODO: render underline, italic, bold + +" 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 + +" case on (all controls must be lower case) +syn case match + +" Control Words +syn match rtfControlWord "\\[a-z]\+[\-]\=[0-9]*" + +" New Control Words (not in the 1987 specifications) +syn match rtfNewControlWord "\\\*\\[a-z]\+[\-]\=[0-9]*" + +" Control Symbol : any \ plus a non alpha symbol, *, \, { and } and ' +syn match rtfControlSymbol "\\[^a-zA-Z\*\{\}\\']" + +" { } and \ are special characters, to use them +" we add a backslash \ +syn match rtfCharacter "\\\\" +syn match rtfCharacter "\\{" +syn match rtfCharacter "\\}" +" Escaped characters (for 8 bytes characters upper than 127) +syn match rtfCharacter "\\'[A-Za-z0-9][A-Za-z0-9]" +" Unicode +syn match rtfUnicodeCharacter "\\u[0-9][0-9]*" + +" Color values, we will put this value in Red, Green or Blue +syn match rtfRed "\\red[0-9][0-9]*" +syn match rtfGreen "\\green[0-9][0-9]*" +syn match rtfBlue "\\blue[0-9][0-9]*" + +" Some stuff for help files +syn match rtfFootNote "[#$K+]{\\footnote.*}" contains=rtfControlWord,rtfNewControlWord + +" 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_rtf_syntax_inits") + if version < 508 + let did_rtf_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + + HiLink rtfControlWord Statement + HiLink rtfNewControlWord Special + HiLink rtfControlSymbol Constant + HiLink rtfCharacter Character + HiLink rtfUnicodeCharacter SpecialChar + HiLink rtfFootNote Comment + + " Define colors for the syntax file + hi rtfRed term=underline cterm=underline ctermfg=DarkRed gui=underline guifg=DarkRed + hi rtfGreen term=underline cterm=underline ctermfg=DarkGreen gui=underline guifg=DarkGreen + hi rtfBlue term=underline cterm=underline ctermfg=DarkBlue gui=underline guifg=DarkBlue + + HiLink rtfRed rtfRed + HiLink rtfGreen rtfGreen + HiLink rtfBlue rtfBlue + + delcommand HiLink +endif + + +let b:current_syntax = "rtf" + +" vim:ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/ruby.vim b/vim/bundle/ubuntu-vim72/syntax/ruby.vim new file mode 100644 index 0000000..f82b4c2 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/ruby.vim @@ -0,0 +1,360 @@ +" Vim syntax file +" Language: Ruby +" Maintainer: Doug Kearns +" Info: $Id: ruby.vim,v 1.152 2008/06/29 04:33:41 tpope Exp $ +" URL: http://vim-ruby.rubyforge.org +" Anon CVS: See above site +" Release Coordinator: Doug Kearns +" ---------------------------------------------------------------------------- +" +" Previous Maintainer: Mirko Nasato +" Thanks to perl.vim authors, and to Reimer Behrends. :-) (MN) +" ---------------------------------------------------------------------------- + +if exists("b:current_syntax") + finish +endif + +if has("folding") && exists("ruby_fold") + setlocal foldmethod=syntax +endif + +syn cluster rubyNotTop contains=@rubyExtendedStringSpecial,@rubyRegexpSpecial,@rubyDeclaration,rubyConditional,rubyTodo + +if exists("ruby_space_errors") + if !exists("ruby_no_trail_space_error") + syn match rubySpaceError display excludenl "\s\+$" + endif + if !exists("ruby_no_tab_space_error") + syn match rubySpaceError display " \+\t"me=e-1 + endif +endif + +" Operators +if exists("ruby_operators") + syn match rubyOperator "\%([~!^&|*/%+-]\|\%(class\s*\)\@\|<=\|\%(<\|\>\|>=\|=\@\|\*\*\|\.\.\.\|\.\.\|::\)" + syn match rubyPseudoOperator "\%(-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|!\~\|!=\)" + syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\w[?!]\=\|[]})]\)\@<=\[\s*" end="\s*]" contains=ALLBUT,@rubyNotTop +endif + +" Expression Substitution and Backslash Notation +syn match rubyStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display +syn match rubyStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display + +syn region rubyInterpolation matchgroup=rubyInterpolationDelimiter start="#{" end="}" contained contains=ALLBUT,@rubyNotTop +syn match rubyInterpolation "#\%(\$\|@@\=\)\w\+" display contained contains=rubyInterpolationDelimiter,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable,rubyPredefinedVariable +syn match rubyInterpolationDelimiter "#\ze\%(\$\|@@\=\)\w\+" display contained +syn match rubyInterpolation "#\$\%(-\w\|\W\)" display contained contains=rubyInterpolationDelimiter,rubyPredefinedVariable,rubyInvalidVariable +syn match rubyInterpolationDelimiter "#\ze\$\%(-\w\|\W\)" display contained +syn region rubyNoInterpolation start="\\#{" end="}" contained +syn match rubyNoInterpolation "\\#{" display contained +syn match rubyNoInterpolation "\\#\%(\$\|@@\=\)\w\+" display contained +syn match rubyNoInterpolation "\\#\$\W" display contained + +syn match rubyDelimEscape "\\[(<{\[)>}\]]" transparent display contained contains=NONE + +syn region rubyNestedParentheses start="(" skip="\\\\\|\\)" matchgroup=rubyString end=")" transparent contained +syn region rubyNestedCurlyBraces start="{" skip="\\\\\|\\}" matchgroup=rubyString end="}" transparent contained +syn region rubyNestedAngleBrackets start="<" skip="\\\\\|\\>" matchgroup=rubyString end=">" transparent contained +syn region rubyNestedSquareBrackets start="\[" skip="\\\\\|\\\]" matchgroup=rubyString end="\]" transparent contained + +" These are mostly Oniguruma ready +syn region rubyRegexpComment matchgroup=rubyRegexpSpecial start="(?#" skip="\\)" end=")" contained +syn region rubyRegexpParens matchgroup=rubyRegexpSpecial start="(\(?:\|?<\=[=!]\|?>\|?<[a-z_]\w*>\|?[imx]*-[imx]*:\=\|\%(?#\)\@!\)" skip="\\)" end=")" contained transparent contains=@rubyRegexpSpecial +syn region rubyRegexpBrackets matchgroup=rubyRegexpCharClass start="\[\^\=" skip="\\\]" end="\]" contained transparent contains=rubyStringEscape,rubyRegexpEscape,rubyRegexpCharClass oneline +syn match rubyRegexpCharClass "\\[DdHhSsWw]" contained display +syn match rubyRegexpCharClass "\[:\^\=\%(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\):\]" contained +syn match rubyRegexpEscape "\\[].*?+^$|\\/(){}[]" contained display +syn match rubyRegexpQuantifier "[*?+][?+]\=" contained display +syn match rubyRegexpQuantifier "{\d\+\%(,\d*\)\=}?\=" contained display +syn match rubyRegexpAnchor "[$^]\|\\[ABbGZz]" contained display +syn match rubyRegexpDot "\." contained display +syn match rubyRegexpSpecial "|" contained display +syn match rubyRegexpSpecial "\\[1-9]\d\=\d\@!" contained display +syn match rubyRegexpSpecial "\\k<\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\=>" contained display +syn match rubyRegexpSpecial "\\k'\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\='" contained display +syn match rubyRegexpSpecial "\\g<\%([a-z_]\w*\|-\=\d\+\)>" contained display +syn match rubyRegexpSpecial "\\g'\%([a-z_]\w*\|-\=\d\+\)'" contained display + +syn cluster rubyStringSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyStringEscape +syn cluster rubyExtendedStringSpecial contains=@rubyStringSpecial,rubyNestedParentheses,rubyNestedCurlyBraces,rubyNestedAngleBrackets,rubyNestedSquareBrackets +syn cluster rubyRegexpSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyStringEscape,rubyRegexpSpecial,rubyRegexpEscape,rubyRegexpBrackets,rubyRegexpCharClass,rubyRegexpDot,rubyRegexpQuantifier,rubyRegexpAnchor,rubyRegexpParens,rubyRegexpComment + +" Numbers and ASCII Codes +syn match rubyASCIICode "\%(\w\|[]})\"'/]\)\@" display +syn match rubyInteger "\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)\>" display +syn match rubyInteger "\<0[oO]\=\o\+\%(_\o\+\)*\>" display +syn match rubyInteger "\<0[bB][01]\+\%(_[01]\+\)*\>" display +syn match rubyFloat "\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\.\d\+\%(_\d\+\)*\>" display +syn match rubyFloat "\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)\>" display + +" Identifiers +syn match rubyLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display transparent +syn match rubyBlockArgument "&[_[:lower:]][_[:alnum:]]" contains=NONE display transparent + +syn match rubyConstant "\%(\%([.@$]\@\|::\)\@=\%(\s*(\)\@!" +syn match rubyClassVariable "@@\h\w*" display +syn match rubyInstanceVariable "@\h\w*" display +syn match rubyGlobalVariable "$\%(\h\w*\|-.\)" +syn match rubySymbol "[]})\"':]\@\|<=\|<\|===\|==\|=\~\|>>\|>=\|>\||\|-@\|-\|/\|\[]=\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)" +syn match rubySymbol "[]})\"':]\@_,;:!?/.'"@$*\&+0]\)" +syn match rubySymbol "[]})\"':]\@\@!\)\=" +syn region rubySymbol start="[]})\"':]\@\|{\)\s*\)\@<=|" end="|" oneline display contains=rubyBlockParameter + +syn match rubyInvalidVariable "$[^ A-Za-z_-]" +syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~1-9]# +syn match rubyPredefinedVariable "$_\>" display +syn match rubyPredefinedVariable "$-[0FIKadilpvw]\>" display +syn match rubyPredefinedVariable "$\%(deferr\|defout\|stderr\|stdin\|stdout\)\>" display +syn match rubyPredefinedVariable "$\%(DEBUG\|FILENAME\|KCODE\|LOADED_FEATURES\|LOAD_PATH\|PROGRAM_NAME\|SAFE\|VERBOSE\)\>" display +syn match rubyPredefinedConstant "\%(\%(\.\@\%(\s*(\)\@!" +syn match rubyPredefinedConstant "\%(\%(\.\@\%(\s*(\)\@!" +syn match rubyPredefinedConstant "\%(\%(\.\@\%(\s*(\)\@!" +"Obsolete Global Constants +"syn match rubyPredefinedConstant "\%(::\)\=\zs\%(PLATFORM\|RELEASE_DATE\|VERSION\)\>" +"syn match rubyPredefinedConstant "\%(::\)\=\zs\%(NotImplementError\)\>" + +" Normal Regular Expression +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,[>]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial keepend fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=]\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold + +" Generalized Regular Expression +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{" end="}[iomxneus]*" skip="\\\\\|\\}" contains=@rubyRegexpSpecial fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomxneus]*" skip="\\\\\|\\>" contains=@rubyRegexpSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyRegexpSpecial fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold + +" Normal String and Shell Command Output +syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold +syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" fold +syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold + +" Generalized Single Quoted String, Symbol and Array of Strings +syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape +syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape +syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape +syn region rubyString matchgroup=rubyStringDelimiter start="%[qw](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape +syn region rubySymbol matchgroup=rubySymbolDelimiter start="%[s]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold +syn region rubySymbol matchgroup=rubySymbolDelimiter start="%[s]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape +syn region rubySymbol matchgroup=rubySymbolDelimiter start="%[s]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape +syn region rubySymbol matchgroup=rubySymbolDelimiter start="%[s]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape +syn region rubySymbol matchgroup=rubySymbolDelimiter start="%[s](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape + +" Generalized Double Quoted String and Array of Strings and Shell Command Output +" Note: %= is not matched here as the beginning of a double quoted string +syn region rubyString matchgroup=rubyStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\={" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold + +" Here Document +syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@>\|[<>]=\=\|<=>\|===\|==\|=\~\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration + +syn cluster rubyDeclaration contains=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration,rubyModuleDeclaration,rubyClassDeclaration,rubyFunction,rubyBlockParameter + +" Expensive Mode - match 'end' with the appropriate opening keyword for syntax +" based folding and special highlighting of module/class/method definitions +if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive") + syn match rubyDefine "\" nextgroup=rubyAliasDeclaration skipwhite skipnl + syn match rubyDefine "\" nextgroup=rubyMethodDeclaration skipwhite skipnl + syn match rubyDefine "\" nextgroup=rubyFunction skipwhite skipnl + syn match rubyClass "\" nextgroup=rubyClassDeclaration skipwhite skipnl + syn match rubyModule "\" nextgroup=rubyModuleDeclaration skipwhite skipnl + syn region rubyBlock start="\" matchgroup=rubyDefine end="\%(\" contains=ALLBUT,@rubyNotTop fold + syn region rubyBlock start="\" matchgroup=rubyClass end="\" contains=ALLBUT,@rubyNotTop fold + syn region rubyBlock start="\" matchgroup=rubyModule end="\" contains=ALLBUT,@rubyNotTop fold + + " modifiers + syn match rubyConditionalModifier "\<\%(if\|unless\)\>" display + syn match rubyRepeatModifier "\<\%(while\|until\)\>" display + + syn region rubyDoBlock matchgroup=rubyControl start="\" end="\" contains=ALLBUT,@rubyNotTop fold + " curly bracket block or hash literal + syn region rubyCurlyBlock start="{" end="}" contains=ALLBUT,@rubyNotTop fold + syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\w\|[\]})]\)\@" end="\" contains=ALLBUT,@rubyNotTop fold + syn region rubyCaseExpression matchgroup=rubyConditional start="\" end="\" contains=ALLBUT,@rubyNotTop fold + syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" end="\" contains=ALLBUT,@rubyNotTop fold + + syn match rubyConditional "\<\%(then\|else\|when\)\>[?!]\@!" contained containedin=rubyCaseExpression + syn match rubyConditional "\<\%(then\|else\|elsif\)\>[?!]\@!" contained containedin=rubyConditionalExpression + + " statements with optional 'do' + syn region rubyOptionalDoLine matchgroup=rubyRepeat start="\[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" matchgroup=rubyOptionalDo end="\%(\\)" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@rubyNotTop + syn region rubyRepeatExpression start="\[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" matchgroup=rubyRepeat end="\" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine fold + + if !exists("ruby_minlines") + let ruby_minlines = 50 + endif + exec "syn sync minlines=" . ruby_minlines + +else + syn match rubyControl "\[?!]\@!" nextgroup=rubyMethodDeclaration skipwhite skipnl + syn match rubyControl "\[?!]\@!" nextgroup=rubyClassDeclaration skipwhite skipnl + syn match rubyControl "\[?!]\@!" nextgroup=rubyModuleDeclaration skipwhite skipnl + syn match rubyControl "\<\%(case\|begin\|do\|for\|if\|unless\|while\|until\|else\|elsif\|then\|when\|end\)\>[?!]\@!" + syn match rubyKeyword "\<\%(alias\|undef\)\>[?!]\@!" +endif + +" Keywords +" Note: the following keywords have already been defined: +" begin case class def do end for if module unless until while +syn match rubyControl "\<\%(and\|break\|ensure\|in\|next\|not\|or\|redo\|rescue\|retry\|return\)\>[?!]\@!" +syn match rubyOperator "\[?!]\@!" +syn match rubyBoolean "\<\%(true\|false\)\>[?!]\@!" +syn match rubyPseudoVariable "\<\%(nil\|self\|__FILE__\|__LINE__\)\>[?!]\@!" +syn match rubyBeginEnd "\<\%(BEGIN\|END\)\>[?!]\@!" + +" Special Methods +if !exists("ruby_no_special_methods") + syn keyword rubyAccess public protected private module_function + " attr is a common variable name + syn match rubyAttribute "\%(\%(^\|;\)\s*\)\@<=attr\>\(\s*[.=]\)\@!" + syn keyword rubyAttribute attr_accessor attr_reader attr_writer + syn match rubyControl "\<\%(exit!\|\%(abort\|at_exit\|exit\|fork\|loop\|trap\)\>[?!]\@!\)" + syn keyword rubyEval eval class_eval instance_eval module_eval + syn keyword rubyException raise fail catch throw + " false positive with 'include?' + syn match rubyInclude "\[?!]\@!" + syn keyword rubyInclude autoload extend load require + syn keyword rubyKeyword callcc caller lambda proc +endif + +" Comments and Documentation +syn match rubySharpBang "\%^#!.*" display +syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE XXX contained +syn match rubyComment "#.*" contains=rubySharpBang,rubySpaceError,rubyTodo,@Spell +if !exists("ruby_no_comment_fold") + syn region rubyMultilineComment start="\%(\%(^\s*#.*\n\)\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE + +syn match rubyKeywordAsMethod "\<\%(alias\|begin\|case\|class\|def\|do\|end\)[?!]" transparent contains=NONE +syn match rubyKeywordAsMethod "\<\%(if\|module\|undef\|unless\|until\|while\)[?!]" transparent contains=NONE + +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE + +" __END__ Directive +syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$" fold + +hi def link rubyClass rubyDefine +hi def link rubyModule rubyDefine +hi def link rubyDefine Define +hi def link rubyFunction Function +hi def link rubyConditional Conditional +hi def link rubyConditionalModifier rubyConditional +hi def link rubyRepeat Repeat +hi def link rubyRepeatModifier rubyRepeat +hi def link rubyOptionalDo rubyRepeat +hi def link rubyControl Statement +hi def link rubyInclude Include +hi def link rubyInteger Number +hi def link rubyASCIICode Character +hi def link rubyFloat Float +hi def link rubyBoolean Boolean +hi def link rubyException Exception +if !exists("ruby_no_identifiers") + hi def link rubyIdentifier Identifier +else + hi def link rubyIdentifier NONE +endif +hi def link rubyClassVariable rubyIdentifier +hi def link rubyConstant Type +hi def link rubyGlobalVariable rubyIdentifier +hi def link rubyBlockParameter rubyIdentifier +hi def link rubyInstanceVariable rubyIdentifier +hi def link rubyPredefinedIdentifier rubyIdentifier +hi def link rubyPredefinedConstant rubyPredefinedIdentifier +hi def link rubyPredefinedVariable rubyPredefinedIdentifier +hi def link rubySymbol Constant +hi def link rubyKeyword Keyword +hi def link rubyOperator Operator +hi def link rubyPseudoOperator rubyOperator +hi def link rubyBeginEnd Statement +hi def link rubyAccess Statement +hi def link rubyAttribute Statement +hi def link rubyEval Statement +hi def link rubyPseudoVariable Constant + +hi def link rubyComment Comment +hi def link rubyData Comment +hi def link rubyDataDirective Delimiter +hi def link rubyDocumentation Comment +hi def link rubyTodo Todo + +hi def link rubyStringEscape Special +hi def link rubyInterpolationDelimiter Delimiter +hi def link rubyNoInterpolation rubyString +hi def link rubySharpBang PreProc +hi def link rubyRegexpDelimiter rubyStringDelimiter +hi def link rubySymbolDelimiter rubyStringDelimiter +hi def link rubyStringDelimiter Delimiter +hi def link rubyString String +hi def link rubyRegexpEscape rubyRegexpSpecial +hi def link rubyRegexpQuantifier rubyRegexpSpecial +hi def link rubyRegexpAnchor rubyRegexpSpecial +hi def link rubyRegexpDot rubyRegexpCharClass +hi def link rubyRegexpCharClass rubyRegexpSpecial +hi def link rubyRegexpSpecial Special +hi def link rubyRegexpComment Comment +hi def link rubyRegexp rubyString + +hi def link rubyInvalidVariable Error +hi def link rubyError Error +hi def link rubySpaceError rubyError + +let b:current_syntax = "ruby" + +" vim: nowrap sw=2 sts=2 ts=8 noet: diff --git a/vim/bundle/ubuntu-vim72/syntax/samba.vim b/vim/bundle/ubuntu-vim72/syntax/samba.vim new file mode 100644 index 0000000..dae4040 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/samba.vim @@ -0,0 +1,131 @@ +" Vim syntax file +" Language: samba configuration files (smb.conf) +" Maintainer: Rafael Garcia-Suarez +" URL: http://rgarciasuarez.free.fr/vim/syntax/samba.vim +" Last change: 2009 Aug 06 +" +" New maintainer wanted! +" +" Don't forget to run your config file through testparm(1)! + +" 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 sambaParameter /^[a-zA-Z \t]\+=/ contains=sambaKeyword +syn match sambaSection /^\s*\[[a-zA-Z0-9_\-.$ ]\+\]/ +syn match sambaMacro /%[SPugUGHvhmLMNpRdaITD]/ +syn match sambaMacro /%$([a-zA-Z0-9_]\+)/ +syn match sambaComment /^\s*[;#].*/ +syn match sambaContinue /\\$/ +syn keyword sambaBoolean true false yes no + +" Keywords for Samba 2.0.5a +syn keyword sambaKeyword contained account acl action add address admin aliases +syn keyword sambaKeyword contained allow alternate always announce anonymous +syn keyword sambaKeyword contained archive as auto available bind blocking +syn keyword sambaKeyword contained bmpx break browsable browse browseable ca +syn keyword sambaKeyword contained cache case casesignames cert certDir +syn keyword sambaKeyword contained certFile change char character chars chat +syn keyword sambaKeyword contained ciphers client clientcert code coding +syn keyword sambaKeyword contained command comment compatibility config +syn keyword sambaKeyword contained connections contention controller copy +syn keyword sambaKeyword contained create deadtime debug debuglevel default +syn keyword sambaKeyword contained delete deny descend dfree dir directory +syn keyword sambaKeyword contained disk dns domain domains dont dos dot drive +syn keyword sambaKeyword contained driver encrypt encrypted equiv exec fake +syn keyword sambaKeyword contained file files filetime filetimes filter follow +syn keyword sambaKeyword contained force fstype getwd group groups guest +syn keyword sambaKeyword contained hidden hide home homedir hosts include +syn keyword sambaKeyword contained interfaces interval invalid keepalive +syn keyword sambaKeyword contained kernel key ldap length level level2 limit +syn keyword sambaKeyword contained links list lm load local location lock +syn keyword sambaKeyword contained locking locks log logon logons logs lppause +syn keyword sambaKeyword contained lpq lpresume lprm machine magic mangle +syn keyword sambaKeyword contained mangled mangling map mask master max mem +syn keyword sambaKeyword contained message min mode modes mux name names +syn keyword sambaKeyword contained netbios nis notify nt null offset ok ole +syn keyword sambaKeyword contained only open oplock oplocks options order os +syn keyword sambaKeyword contained output packet page panic passwd password +syn keyword sambaKeyword contained passwords path permissions pipe port ports +syn keyword sambaKeyword contained postexec postscript prediction preexec +syn keyword sambaKeyword contained prefered preferred preload preserve print +syn keyword sambaKeyword contained printable printcap printer printers +syn keyword sambaKeyword contained printing program protocol proxy public +syn keyword sambaKeyword contained queuepause queueresume raw read readonly +syn keyword sambaKeyword contained realname remote require resign resolution +syn keyword sambaKeyword contained resolve restrict revalidate rhosts root +syn keyword sambaKeyword contained script security sensitive server servercert +syn keyword sambaKeyword contained service services set share shared short +syn keyword sambaKeyword contained size smb smbrun socket space ssl stack stat +syn keyword sambaKeyword contained status strict string strip suffix support +syn keyword sambaKeyword contained symlinks sync syslog system time timeout +syn keyword sambaKeyword contained times timestamp to trusted ttl unix update +syn keyword sambaKeyword contained use user username users valid version veto +syn keyword sambaKeyword contained volume wait wide wins workgroup writable +syn keyword sambaKeyword contained write writeable xmit + +" New keywords for Samba 2.0.6 +syn keyword sambaKeyword contained hook hires pid uid close rootpreexec + +" New keywords for Samba 2.0.7 +syn keyword sambaKeyword contained utmp wtmp hostname consolidate +syn keyword sambaKeyword contained inherit source environment + +" New keywords for Samba 2.2.0 +syn keyword sambaKeyword contained addprinter auth browsing deleteprinter +syn keyword sambaKeyword contained enhanced enumports filemode gid host jobs +syn keyword sambaKeyword contained lanman msdfs object os2 posix processes +syn keyword sambaKeyword contained scope separator shell show smbd template +syn keyword sambaKeyword contained total vfs winbind wizard + +" New keywords for Samba 2.2.1 +syn keyword sambaKeyword contained large obey pam readwrite restrictions +syn keyword sambaKeyword contained unreadable + +" New keywords for Samba 2.2.2 - 2.2.4 +syn keyword sambaKeyword contained acls allocate bytes count csc devmode +syn keyword sambaKeyword contained disable dn egd entropy enum extensions mmap +syn keyword sambaKeyword contained policy spin spoolss + +" Since Samba 3.0.2 +syn keyword sambaKeyword contained abort afs algorithmic backend +syn keyword sambaKeyword contained charset cups defer display +syn keyword sambaKeyword contained enable idmap kerberos lookups +syn keyword sambaKeyword contained methods modules nested NIS ntlm NTLMv2 +syn keyword sambaKeyword contained objects paranoid partners passdb +syn keyword sambaKeyword contained plaintext prefix primary private +syn keyword sambaKeyword contained profile quota realm replication +syn keyword sambaKeyword contained reported rid schannel sendfile sharing +syn keyword sambaKeyword contained shutdown signing special spnego +syn keyword sambaKeyword contained store unknown unwriteable + +" 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_samba_syn_inits") + if version < 508 + let did_samba_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + HiLink sambaParameter Normal + HiLink sambaKeyword Type + HiLink sambaSection Statement + HiLink sambaMacro PreProc + HiLink sambaComment Comment + HiLink sambaContinue Operator + HiLink sambaBoolean Constant + delcommand HiLink +endif + +let b:current_syntax = "samba" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/sas.vim b/vim/bundle/ubuntu-vim72/syntax/sas.vim new file mode 100644 index 0000000..976dca2 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sas.vim @@ -0,0 +1,291 @@ +" Vim syntax file +" Language: SAS +" Maintainer: James Kidd +" Last Change: 18 Jul 2008 by Paulo Tanimoto +" Fixed comments with * taking multiple lines. +" Fixed highlighting of macro keywords. +" Added words to cases that didn't fit anywhere. +" 02 Jun 2003 +" Added highlighting for additional keywords and such; +" Attempted to match SAS default syntax colors; +" Changed syncing so it doesn't lose colors on large blocks; +" Much thanks to Bob Heckel for knowledgeable tweaking. +" 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 region sasString start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn region sasString start=+'+ skip=+\\\\\|\\"+ end=+'+ + +" Want region from 'cards;' to ';' to be captured (Bob Heckel) +syn region sasCards start="^\s*CARDS.*" end="^\s*;\s*$" +syn region sasCards start="^\s*DATALINES.*" end="^\s*;\s*$" + +syn match sasNumber "-\=\<\d*\.\=[0-9_]\>" + +" Block comment +syn region sasComment start="/\*" end="\*/" contains=sasTodo + +" Ignore misleading //JCL SYNTAX... (Bob Heckel) +syn region sasComment start="[^/][^/]/\*" end="\*/" contains=sasTodo + +" Previous code for comments was written by Bob Heckel +" Comments with * may take multiple lines (Paulo Tanimoto) +syn region sasComment start=";\s*\*"hs=s+1 end=";" contains=sasTodo + +" Comments with * starting after a semicolon (Paulo Tanimoto) +syn region sasComment start="^\s*\*" end=";" contains=sasTodo + +" This line defines macro variables in code. HiLink at end of file +" defines the color scheme. Begin region with ampersand and end with +" any non-word character offset by -1; put ampersand in the skip list +" just in case it is used to concatenate macro variable values. + +" Thanks to ronald höllwarth for this fix to an intra-versioning +" problem with this little feature + +if version < 600 + syn region sasMacroVar start="\&" skip="[_&]" end="\W"he=e-1 +else " for the older Vim's just do it their way ... + syn region sasMacroVar start="&" skip="[_&]" end="\W"he=e-1 +endif + + +" I dont think specific PROCs need to be listed if use this line (Bob Heckel). +syn match sasProc "^\s*PROC \w\+" +syn keyword sasStep RUN QUIT DATA + + +" Base SAS Procs - version 8.1 + +syn keyword sasConditional DO ELSE END IF THEN UNTIL WHILE + +syn keyword sasStatement ABORT ARRAY ATTRIB BY CALL CARDS CARDS4 CATNAME +syn keyword sasStatement CONTINUE DATALINES DATALINES4 DELETE DISPLAY +syn keyword sasStatement DM DROP ENDSAS ERROR FILE FILENAME FOOTNOTE +syn keyword sasStatement FORMAT GOTO INFILE INFORMAT INPUT KEEP +syn keyword sasStatement LABEL LEAVE LENGTH LIBNAME LINK LIST LOSTCARD +syn keyword sasStatement MERGE MISSING MODIFY OPTIONS OUTPUT PAGE +syn keyword sasStatement PUT REDIRECT REMOVE RENAME REPLACE RETAIN +syn keyword sasStatement RETURN SELECT SET SKIP STARTSAS STOP TITLE +syn keyword sasStatement UPDATE WAITSAS WHERE WINDOW X SYSTASK + +" Keywords that are used in Proc SQL +" I left them as statements because SAS's enhanced editor highlights +" them the same as normal statements used in data steps (Jim Kidd) + +syn keyword sasStatement ADD AND ALTER AS CASCADE CHECK CREATE +syn keyword sasStatement DELETE DESCRIBE DISTINCT DROP FOREIGN +syn keyword sasStatement FROM GROUP HAVING INDEX INSERT INTO IN +syn keyword sasStatement KEY LIKE MESSAGE MODIFY MSGTYPE NOT +syn keyword sasStatement NULL ON OR ORDER PRIMARY REFERENCES +syn keyword sasStatement RESET RESTRICT SELECT SET TABLE +syn keyword sasStatement UNIQUE UPDATE VALIDATE VIEW WHERE + +" Match declarations have to appear one per line (Paulo Tanimoto) +syn match sasStatement "FOOTNOTE\d" +syn match sasStatement "TITLE\d" + +" Match declarations have to appear one per line (Paulo Tanimoto) +syn match sasMacro "%BQUOTE" +syn match sasMacro "%NRBQUOTE" +syn match sasMacro "%CMPRES" +syn match sasMacro "%QCMPRES" +syn match sasMacro "%COMPSTOR" +syn match sasMacro "%DATATYP" +syn match sasMacro "%DISPLAY" +syn match sasMacro "%DO" +syn match sasMacro "%ELSE" +syn match sasMacro "%END" +syn match sasMacro "%EVAL" +syn match sasMacro "%GLOBAL" +syn match sasMacro "%GOTO" +syn match sasMacro "%IF" +syn match sasMacro "%INDEX" +syn match sasMacro "%INPUT" +syn match sasMacro "%KEYDEF" +syn match sasMacro "%LABEL" +syn match sasMacro "%LEFT" +syn match sasMacro "%LENGTH" +syn match sasMacro "%LET" +syn match sasMacro "%LOCAL" +syn match sasMacro "%LOWCASE" +syn match sasMacro "%MACRO" +syn match sasMacro "%MEND" +syn match sasMacro "%NRBQUOTE" +syn match sasMacro "%NRQUOTE" +syn match sasMacro "%NRSTR" +syn match sasMacro "%PUT" +syn match sasMacro "%QCMPRES" +syn match sasMacro "%QLEFT" +syn match sasMacro "%QLOWCASE" +syn match sasMacro "%QSCAN" +syn match sasMacro "%QSUBSTR" +syn match sasMacro "%QSYSFUNC" +syn match sasMacro "%QTRIM" +syn match sasMacro "%QUOTE" +syn match sasMacro "%QUPCASE" +syn match sasMacro "%SCAN" +syn match sasMacro "%STR" +syn match sasMacro "%SUBSTR" +syn match sasMacro "%SUPERQ" +syn match sasMacro "%SYSCALL" +syn match sasMacro "%SYSEVALF" +syn match sasMacro "%SYSEXEC" +syn match sasMacro "%SYSFUNC" +syn match sasMacro "%SYSGET" +syn match sasMacro "%SYSLPUT" +syn match sasMacro "%SYSPROD" +syn match sasMacro "%SYSRC" +syn match sasMacro "%SYSRPUT" +syn match sasMacro "%THEN" +syn match sasMacro "%TO" +syn match sasMacro "%TRIM" +syn match sasMacro "%UNQUOTE" +syn match sasMacro "%UNTIL" +syn match sasMacro "%UPCASE" +syn match sasMacro "%VERIFY" +syn match sasMacro "%WHILE" +syn match sasMacro "%WINDOW" + +" SAS Functions + +syn keyword sasFunction ABS ADDR AIRY ARCOS ARSIN ATAN ATTRC ATTRN +syn keyword sasFunction BAND BETAINV BLSHIFT BNOT BOR BRSHIFT BXOR +syn keyword sasFunction BYTE CDF CEIL CEXIST CINV CLOSE CNONCT COLLATE +syn keyword sasFunction COMPBL COMPOUND COMPRESS COS COSH CSS CUROBS +syn keyword sasFunction CV DACCDB DACCDBSL DACCSL DACCSYD DACCTAB +syn keyword sasFunction DAIRY DATE DATEJUL DATEPART DATETIME DAY +syn keyword sasFunction DCLOSE DEPDB DEPDBSL DEPDBSL DEPSL DEPSL +syn keyword sasFunction DEPSYD DEPSYD DEPTAB DEPTAB DEQUOTE DHMS +syn keyword sasFunction DIF DIGAMMA DIM DINFO DNUM DOPEN DOPTNAME +syn keyword sasFunction DOPTNUM DREAD DROPNOTE DSNAME ERF ERFC EXIST +syn keyword sasFunction EXP FAPPEND FCLOSE FCOL FDELETE FETCH FETCHOBS +syn keyword sasFunction FEXIST FGET FILEEXIST FILENAME FILEREF FINFO +syn keyword sasFunction FINV FIPNAME FIPNAMEL FIPSTATE FLOOR FNONCT +syn keyword sasFunction FNOTE FOPEN FOPTNAME FOPTNUM FPOINT FPOS +syn keyword sasFunction FPUT FREAD FREWIND FRLEN FSEP FUZZ FWRITE +syn keyword sasFunction GAMINV GAMMA GETOPTION GETVARC GETVARN HBOUND +syn keyword sasFunction HMS HOSTHELP HOUR IBESSEL INDEX INDEXC +syn keyword sasFunction INDEXW INPUT INPUTC INPUTN INT INTCK INTNX +syn keyword sasFunction INTRR IRR JBESSEL JULDATE KURTOSIS LAG LBOUND +syn keyword sasFunction LEFT LENGTH LGAMMA LIBNAME LIBREF LOG LOG10 +syn keyword sasFunction LOG2 LOGPDF LOGPMF LOGSDF LOWCASE MAX MDY +syn keyword sasFunction MEAN MIN MINUTE MOD MONTH MOPEN MORT N +syn keyword sasFunction NETPV NMISS NORMAL NOTE NPV OPEN ORDINAL +syn keyword sasFunction PATHNAME PDF PEEK PEEKC PMF POINT POISSON POKE +syn keyword sasFunction PROBBETA PROBBNML PROBCHI PROBF PROBGAM +syn keyword sasFunction PROBHYPR PROBIT PROBNEGB PROBNORM PROBT PUT +syn keyword sasFunction PUTC PUTN QTR QUOTE RANBIN RANCAU RANEXP +syn keyword sasFunction RANGAM RANGE RANK RANNOR RANPOI RANTBL RANTRI +syn keyword sasFunction RANUNI REPEAT RESOLVE REVERSE REWIND RIGHT +syn keyword sasFunction ROUND SAVING SCAN SDF SECOND SIGN SIN SINH +syn keyword sasFunction SKEWNESS SOUNDEX SPEDIS SQRT STD STDERR STFIPS +syn keyword sasFunction STNAME STNAMEL SUBSTR SUM SYMGET SYSGET SYSMSG +syn keyword sasFunction SYSPROD SYSRC SYSTEM TAN TANH TIME TIMEPART +syn keyword sasFunction TINV TNONCT TODAY TRANSLATE TRANWRD TRIGAMMA +syn keyword sasFunction TRIM TRIMN TRUNC UNIFORM UPCASE USS VAR +syn keyword sasFunction VARFMT VARINFMT VARLABEL VARLEN VARNAME +syn keyword sasFunction VARNUM VARRAY VARRAYX VARTYPE VERIFY VFORMAT +syn keyword sasFunction VFORMATD VFORMATDX VFORMATN VFORMATNX VFORMATW +syn keyword sasFunction VFORMATWX VFORMATX VINARRAY VINARRAYX VINFORMAT +syn keyword sasFunction VINFORMATD VINFORMATDX VINFORMATN VINFORMATNX +syn keyword sasFunction VINFORMATW VINFORMATWX VINFORMATX VLABEL +syn keyword sasFunction VLABELX VLENGTH VLENGTHX VNAME VNAMEX VTYPE +syn keyword sasFunction VTYPEX WEEKDAY YEAR YYQ ZIPFIPS ZIPNAME ZIPNAMEL +syn keyword sasFunction ZIPSTATE + +" Handy settings for using vim with log files +syn keyword sasLogMsg NOTE +syn keyword sasWarnMsg WARNING +syn keyword sasErrMsg ERROR + +" Always contained in a comment (Bob Heckel) +syn keyword sasTodo TODO TBD FIXME contained + +" These don't fit anywhere else (Bob Heckel). +" Added others that were missing. +syn match sasUnderscore "_ALL_" +syn match sasUnderscore "_AUTOMATIC_" +syn match sasUnderscore "_CHARACTER_" +syn match sasUnderscore "_INFILE_" +syn match sasUnderscore "_N_" +syn match sasUnderscore "_NAME_" +syn match sasUnderscore "_NULL_" +syn match sasUnderscore "_NUMERIC_" +syn match sasUnderscore "_USER_" +syn match sasUnderscore "_WEBOUT_" + +" End of SAS Functions + +" 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_sas_syntax_inits") + if version < 508 + let did_sas_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " Default sas enhanced editor color syntax + hi sComment term=bold cterm=NONE ctermfg=Green ctermbg=Black gui=NONE guifg=DarkGreen guibg=White + hi sCard term=bold cterm=NONE ctermfg=Black ctermbg=Yellow gui=NONE guifg=Black guibg=LightYellow + hi sDate_Time term=NONE cterm=bold ctermfg=Green ctermbg=Black gui=bold guifg=SeaGreen guibg=White + hi sKeyword term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=NONE guifg=Blue guibg=White + hi sFmtInfmt term=NONE cterm=NONE ctermfg=LightGreen ctermbg=Black gui=NONE guifg=SeaGreen guibg=White + hi sString term=NONE cterm=NONE ctermfg=Magenta ctermbg=Black gui=NONE guifg=Purple guibg=White + hi sText term=NONE cterm=NONE ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White + hi sNumber term=NONE cterm=bold ctermfg=Green ctermbg=Black gui=bold guifg=SeaGreen guibg=White + hi sProc term=NONE cterm=bold ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White + hi sSection term=NONE cterm=bold ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White + hi mDefine term=NONE cterm=bold ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White + hi mKeyword term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=NONE guifg=Blue guibg=White + hi mReference term=NONE cterm=bold ctermfg=White ctermbg=Black gui=bold guifg=Blue guibg=White + hi mSection term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White + hi mText term=NONE cterm=NONE ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White + +" Colors that closely match SAS log colors for default color scheme + hi lError term=NONE cterm=NONE ctermfg=Red ctermbg=Black gui=none guifg=Red guibg=White + hi lWarning term=NONE cterm=NONE ctermfg=Green ctermbg=Black gui=none guifg=Green guibg=White + hi lNote term=NONE cterm=NONE ctermfg=Cyan ctermbg=Black gui=none guifg=Blue guibg=White + + + " Special hilighting for the SAS proc section + + HiLink sasComment sComment + HiLink sasConditional sKeyword + HiLink sasStep sSection + HiLink sasFunction sKeyword + HiLink sasMacro mKeyword + HiLink sasMacroVar NonText + HiLink sasNumber sNumber + HiLink sasStatement sKeyword + HiLink sasString sString + HiLink sasProc sProc + " (Bob Heckel) + HiLink sasTodo Todo + HiLink sasErrMsg lError + HiLink sasWarnMsg lWarning + HiLink sasLogMsg lNote + HiLink sasCards sCard + " (Bob Heckel) + HiLink sasUnderscore PreProc + delcommand HiLink +endif + +" Syncronize from beginning to keep large blocks from losing +" syntax coloring while moving through code. +syn sync fromstart + +let b:current_syntax = "sas" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/sass.vim b/vim/bundle/ubuntu-vim72/syntax/sass.vim new file mode 100644 index 0000000..1a2e7a4 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sass.vim @@ -0,0 +1,56 @@ +" Vim syntax file +" Language: Sass +" Maintainer: Tim Pope +" Filenames: *.sass + +if exists("b:current_syntax") + finish +endif + +runtime! syntax/css.vim + +syn case ignore + +syn cluster sassCssProperties contains=cssFontProp,cssFontDescriptorProp,cssColorProp,cssTextProp,cssBoxProp,cssGeneratedContentProp,cssPagingProp,cssUIProp,cssRenderProp,cssAuralProp,cssTableProp +syn cluster sassCssAttributes contains=css.*Attr,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssRenderProp + +syn match sassProperty "^\s*\zs\s\%([[:alnum:]-]\+:\|:[[:alnum:]-]\+\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=sassCssAttribute +syn match sassCssAttribute ".*$" contained contains=@sassCssAttributes,sassConstant +syn match sassConstant "![[:alnum:]_-]\+" +syn match sassConstantAssignment "\%(![[:alnum:]_]\+\s*\)\@<==" nextgroup=sassCssAttribute skipwhite +syn match sassMixin "^=.*" +syn match sassMixing "^\s\+\zs+.*" + +syn match sassEscape "^\s*\zs\\" +syn match sassIdChar "#[[:alnum:]_-]\@=" nextgroup=sassId +syn match sassId "[[:alnum:]_-]\+" contained +syn match sassClassChar "\.[[:alnum:]_-]\@=" nextgroup=sassClass +syn match sassClass "[[:alnum:]_-]\+" contained +syn match sassAmpersand "&" + +" TODO: Attribute namespaces +" TODO: Arithmetic (including strings and concatenation) + +syn region sassInclude start="@import" end=";\|$" contains=cssComment,cssURL,cssUnicodeEscape,cssMediaType + +syn keyword sassTodo FIXME NOTE TODO OPTIMIZE XXX contained +syn region sassComment start="^\z(\s*\)//" end="^\%(\z1 \)\@!" contains=sassTodo +syn region sassCssComment start="^\z(\s*\)/\*" end="^\%(\z1 \)\@!" contains=sassTodo + +hi def link sassCssComment sassComment +hi def link sassComment Comment +hi def link sassConstant Identifier +hi def link sassMixing PreProc +hi def link sassMixin PreProc +hi def link sassTodo Todo +hi def link sassInclude Include +hi def link sassEscape Special +hi def link sassIdChar Special +hi def link sassClassChar Special +hi def link sassAmpersand Character +hi def link sassId Identifier +hi def link sassClass Type + +let b:current_syntax = "sass" + +" vim:set sw=2: diff --git a/vim/bundle/ubuntu-vim72/syntax/sather.vim b/vim/bundle/ubuntu-vim72/syntax/sather.vim new file mode 100644 index 0000000..759591b --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sather.vim @@ -0,0 +1,105 @@ +" Vim syntax file +" Language: Sather/pSather +" Maintainer: Claudio Fleiner +" URL: http://www.fleiner.com/vim/syntax/sather.vim +" Last Change: 2003 May 11 + +" Sather is a OO-language developped at the International Computer Science +" Institute (ICSI) in Berkeley, CA. pSather is a parallel extension to Sather. +" Homepage: http://www.icsi.berkeley.edu/~sather +" Sather files use .sa as suffix + +" 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 + +" keyword definitions +syn keyword satherExternal extern +syn keyword satherBranch break continue +syn keyword satherLabel when then +syn keyword satherConditional if else elsif end case typecase assert with +syn match satherConditional "near$" +syn match satherConditional "far$" +syn match satherConditional "near *[^(]"he=e-1 +syn match satherConditional "far *[^(]"he=e-1 +syn keyword satherSynchronize lock guard sync +syn keyword satherRepeat loop parloop do +syn match satherRepeat "while!" +syn match satherRepeat "break!" +syn match satherRepeat "until!" +syn keyword satherBoolValue true false +syn keyword satherValue self here cluster +syn keyword satherOperator new "== != & ^ | && || +syn keyword satherOperator and or not +syn match satherOperator "[#!]" +syn match satherOperator ":-" +syn keyword satherType void attr where +syn match satherType "near *("he=e-1 +syn match satherType "far *("he=e-1 +syn keyword satherStatement return +syn keyword satherStorageClass static const +syn keyword satherExceptions try raise catch +syn keyword satherMethodDecl is pre post +syn keyword satherClassDecl abstract value class include +syn keyword satherScopeDecl public private readonly + + +syn match satherSpecial contained "\\\d\d\d\|\\." +syn region satherString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=satherSpecial +syn match satherCharacter "'[^\\]'" +syn match satherSpecialCharacter "'\\.'" +syn match satherNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" +syn match satherCommentSkip contained "^\s*\*\($\|\s\+\)" +syn region satherComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+$\|"+ contains=satherSpecial +syn match satherComment "--.*" contains=satherComment2String,satherCharacter,satherNumber + + +syn sync ccomment satherComment + +" 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_sather_syn_inits") + if version < 508 + let did_sather_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink satherBranch satherStatement + HiLink satherLabel satherStatement + HiLink satherConditional satherStatement + HiLink satherSynchronize satherStatement + HiLink satherRepeat satherStatement + HiLink satherExceptions satherStatement + HiLink satherStorageClass satherDeclarative + HiLink satherMethodDecl satherDeclarative + HiLink satherClassDecl satherDeclarative + HiLink satherScopeDecl satherDeclarative + HiLink satherBoolValue satherValue + HiLink satherSpecial satherValue + HiLink satherString satherValue + HiLink satherCharacter satherValue + HiLink satherSpecialCharacter satherValue + HiLink satherNumber satherValue + HiLink satherStatement Statement + HiLink satherOperator Statement + HiLink satherComment Comment + HiLink satherType Type + HiLink satherValue String + HiLink satherString String + HiLink satherSpecial String + HiLink satherCharacter String + HiLink satherDeclarative Type + HiLink satherExternal PreCondit + delcommand HiLink +endif + +let b:current_syntax = "sather" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/scheme.vim b/vim/bundle/ubuntu-vim72/syntax/scheme.vim new file mode 100644 index 0000000..f987034 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/scheme.vim @@ -0,0 +1,324 @@ +" Vim syntax file +" Language: Scheme (R5RS + some R6RS extras) +" Last Change: 2009 Nov 27 +" Maintainer: Sergey Khorev +" Original author: Dirk van Deun + +" This script incorrectly recognizes some junk input as numerals: +" parsing the complete system of Scheme numerals using the pattern +" language is practically impossible: I did a lax approximation. + +" MzScheme extensions can be activated with setting is_mzscheme variable + +" Suggestions and bug reports are solicited by the author. + +" Initializing: + +" 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 + +" Fascist highlighting: everything that doesn't fit the rules is an error... + +syn match schemeError ![^ \t()\[\]";]*! +syn match schemeError ")" + +" Quoted and backquoted stuff + +syn region schemeQuoted matchgroup=Delimiter start="['`]" end=![ \t()\[\]";]!me=e-1 contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc + +syn region schemeQuoted matchgroup=Delimiter start="['`](" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc +syn region schemeQuoted matchgroup=Delimiter start="['`]#(" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc + +syn region schemeStrucRestricted matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc +syn region schemeStrucRestricted matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc + +" Popular Scheme extension: +" using [] as well as () +syn region schemeStrucRestricted matchgroup=Delimiter start="\[" matchgroup=Delimiter end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc +syn region schemeStrucRestricted matchgroup=Delimiter start="#\[" matchgroup=Delimiter end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc + +syn region schemeUnquote matchgroup=Delimiter start="," end=![ \t\[\]()";]!me=e-1 contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc +syn region schemeUnquote matchgroup=Delimiter start=",@" end=![ \t\[\]()";]!me=e-1 contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc + +syn region schemeUnquote matchgroup=Delimiter start=",(" end=")" contains=ALL +syn region schemeUnquote matchgroup=Delimiter start=",@(" end=")" contains=ALL + +syn region schemeUnquote matchgroup=Delimiter start=",#(" end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc +syn region schemeUnquote matchgroup=Delimiter start=",@#(" end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc + +syn region schemeUnquote matchgroup=Delimiter start=",\[" end="\]" contains=ALL +syn region schemeUnquote matchgroup=Delimiter start=",@\[" end="\]" contains=ALL + +syn region schemeUnquote matchgroup=Delimiter start=",#\[" end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc +syn region schemeUnquote matchgroup=Delimiter start=",@#\[" end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc + +" R5RS Scheme Functions and Syntax: + +if version < 600 + set iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ +else + setlocal iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ +endif + +syn keyword schemeSyntax lambda and or if cond case define let let* letrec +syn keyword schemeSyntax begin do delay set! else => +syn keyword schemeSyntax quote quasiquote unquote unquote-splicing +syn keyword schemeSyntax define-syntax let-syntax letrec-syntax syntax-rules +" R6RS +syn keyword schemeSyntax define-record-type fields protocol + +syn keyword schemeFunc not boolean? eq? eqv? equal? pair? cons car cdr set-car! +syn keyword schemeFunc set-cdr! caar cadr cdar cddr caaar caadr cadar caddr +syn keyword schemeFunc cdaar cdadr cddar cdddr caaaar caaadr caadar caaddr +syn keyword schemeFunc cadaar cadadr caddar cadddr cdaaar cdaadr cdadar cdaddr +syn keyword schemeFunc cddaar cddadr cdddar cddddr null? list? list length +syn keyword schemeFunc append reverse list-ref memq memv member assq assv assoc +syn keyword schemeFunc symbol? symbol->string string->symbol number? complex? +syn keyword schemeFunc real? rational? integer? exact? inexact? = < > <= >= +syn keyword schemeFunc zero? positive? negative? odd? even? max min + * - / abs +syn keyword schemeFunc quotient remainder modulo gcd lcm numerator denominator +syn keyword schemeFunc floor ceiling truncate round rationalize exp log sin cos +syn keyword schemeFunc tan asin acos atan sqrt expt make-rectangular make-polar +syn keyword schemeFunc real-part imag-part magnitude angle exact->inexact +syn keyword schemeFunc inexact->exact number->string string->number char=? +syn keyword schemeFunc char-ci=? char? char-ci>? char<=? +syn keyword schemeFunc char-ci<=? char>=? char-ci>=? char-alphabetic? char? +syn keyword schemeFunc char-numeric? char-whitespace? char-upper-case? +syn keyword schemeFunc char-lower-case? +syn keyword schemeFunc char->integer integer->char char-upcase char-downcase +syn keyword schemeFunc string? make-string string string-length string-ref +syn keyword schemeFunc string-set! string=? string-ci=? string? string-ci>? string<=? string-ci<=? string>=? +syn keyword schemeFunc string-ci>=? substring string-append vector? make-vector +syn keyword schemeFunc vector vector-length vector-ref vector-set! procedure? +syn keyword schemeFunc apply map for-each call-with-current-continuation +syn keyword schemeFunc call-with-input-file call-with-output-file input-port? +syn keyword schemeFunc output-port? current-input-port current-output-port +syn keyword schemeFunc open-input-file open-output-file close-input-port +syn keyword schemeFunc close-output-port eof-object? read read-char peek-char +syn keyword schemeFunc write display newline write-char call/cc +syn keyword schemeFunc list-tail string->list list->string string-copy +syn keyword schemeFunc string-fill! vector->list list->vector vector-fill! +syn keyword schemeFunc force with-input-from-file with-output-to-file +syn keyword schemeFunc char-ready? load transcript-on transcript-off eval +syn keyword schemeFunc dynamic-wind port? values call-with-values +syn keyword schemeFunc scheme-report-environment null-environment +syn keyword schemeFunc interaction-environment +" R6RS +syn keyword schemeFunc make-eq-hashtable make-eqv-hashtable make-hashtable +syn keyword schemeFunc hashtable? hashtable-size hashtable-ref hashtable-set! +syn keyword schemeFunc hashtable-delete! hashtable-contains? hashtable-update! +syn keyword schemeFunc hashtable-copy hashtable-clear! hashtable-keys +syn keyword schemeFunc hashtable-entries hashtable-equivalence-function hashtable-hash-function +syn keyword schemeFunc hashtable-mutable? equal-hash string-hash string-ci-hash symbol-hash +syn keyword schemeFunc find for-all exists filter partition fold-left fold-right +syn keyword schemeFunc remp remove remv remq memp assp cons* + +" ... so that a single + or -, inside a quoted context, would not be +" interpreted as a number (outside such contexts, it's a schemeFunc) + +syn match schemeDelimiter !\.[ \t\[\]()";]!me=e-1 +syn match schemeDelimiter !\.$! +" ... and a single dot is not a number but a delimiter + +" This keeps all other stuff unhighlighted, except *stuff* and : + +syn match schemeOther ,[a-z!$%&*/:<=>?^_~+@#%-][-a-z!$%&*/:<=>?^_~0-9+.@#%]*, +syn match schemeError ,[a-z!$%&*/:<=>?^_~+@#%-][-a-z!$%&*/:<=>?^_~0-9+.@#%]*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t\[\]()";]\+[^ \t\[\]()";]*, + +syn match schemeOther "\.\.\." +syn match schemeError !\.\.\.[^ \t\[\]()";]\+! +" ... a special identifier + +syn match schemeConstant ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]\+\*[ \t\[\]()";],me=e-1 +syn match schemeConstant ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]\+\*$, +syn match schemeError ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t\[\]()";]\+[^ \t\[\]()";]*, + +syn match schemeConstant ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[ \t\[\]()";],me=e-1 +syn match schemeConstant ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>$, +syn match schemeError ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[^-a-z!$%&*/:<=>?^_~0-9+.@ \t\[\]()";]\+[^ \t\[\]()";]*, + +" Non-quoted lists, and strings: + +syn region schemeStruc matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALL +syn region schemeStruc matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALL + +syn region schemeStruc matchgroup=Delimiter start="\[" matchgroup=Delimiter end="\]" contains=ALL +syn region schemeStruc matchgroup=Delimiter start="#\[" matchgroup=Delimiter end="\]" contains=ALL + +" Simple literals: +syn region schemeString start=+\%(\\\)\@?^_~0-9+.@#%]\+" + " anything limited by |'s is identifier + syn match schemeOther "|[^|]\+|" + + syn match schemeCharacter "#\\\%(return\|tab\)" + + " Modules require stmt + syn keyword schemeExtSyntax module require dynamic-require lib prefix all-except prefix-all-except rename + " modules provide stmt + syn keyword schemeExtSyntax provide struct all-from all-from-except all-defined all-defined-except + " Other from MzScheme + syn keyword schemeExtSyntax with-handlers when unless instantiate define-struct case-lambda syntax-case + syn keyword schemeExtSyntax free-identifier=? bound-identifier=? module-identifier=? syntax-object->datum + syn keyword schemeExtSyntax datum->syntax-object + syn keyword schemeExtSyntax let-values let*-values letrec-values set!-values fluid-let parameterize begin0 + syn keyword schemeExtSyntax error raise opt-lambda define-values unit unit/sig define-signature + syn keyword schemeExtSyntax invoke-unit/sig define-values/invoke-unit/sig compound-unit/sig import export + syn keyword schemeExtSyntax link syntax quasisyntax unsyntax with-syntax + + syn keyword schemeExtFunc format system-type current-extension-compiler current-extension-linker + syn keyword schemeExtFunc use-standard-linker use-standard-compiler + syn keyword schemeExtFunc find-executable-path append-object-suffix append-extension-suffix + syn keyword schemeExtFunc current-library-collection-paths current-extension-compiler-flags make-parameter + syn keyword schemeExtFunc current-directory build-path normalize-path current-extension-linker-flags + syn keyword schemeExtFunc file-exists? directory-exists? delete-directory/files delete-directory delete-file + syn keyword schemeExtFunc system compile-file system-library-subpath getenv putenv current-standard-link-libraries + syn keyword schemeExtFunc remove* file-size find-files fold-files directory-list shell-execute split-path + syn keyword schemeExtFunc current-error-port process/ports process printf fprintf open-input-string open-output-string + syn keyword schemeExtFunc get-output-string + " exceptions + syn keyword schemeExtFunc exn exn:application:arity exn:application:continuation exn:application:fprintf:mismatch + syn keyword schemeExtFunc exn:application:mismatch exn:application:type exn:application:mismatch exn:break exn:i/o:filesystem exn:i/o:port + syn keyword schemeExtFunc exn:i/o:port:closed exn:i/o:tcp exn:i/o:udp exn:misc exn:misc:application exn:misc:unsupported exn:module exn:read + syn keyword schemeExtFunc exn:read:non-char exn:special-comment exn:syntax exn:thread exn:user exn:variable exn:application:mismatch + syn keyword schemeExtFunc exn? exn:application:arity? exn:application:continuation? exn:application:fprintf:mismatch? exn:application:mismatch? + syn keyword schemeExtFunc exn:application:type? exn:application:mismatch? exn:break? exn:i/o:filesystem? exn:i/o:port? exn:i/o:port:closed? + syn keyword schemeExtFunc exn:i/o:tcp? exn:i/o:udp? exn:misc? exn:misc:application? exn:misc:unsupported? exn:module? exn:read? exn:read:non-char? + syn keyword schemeExtFunc exn:special-comment? exn:syntax? exn:thread? exn:user? exn:variable? exn:application:mismatch? + " Command-line parsing + syn keyword schemeExtFunc command-line current-command-line-arguments once-any help-labels multi once-each + + " syntax quoting, unquoting and quasiquotation + syn region schemeUnquote matchgroup=Delimiter start="#," end=![ \t\[\]()";]!me=e-1 contains=ALL + syn region schemeUnquote matchgroup=Delimiter start="#,@" end=![ \t\[\]()";]!me=e-1 contains=ALL + syn region schemeUnquote matchgroup=Delimiter start="#,(" end=")" contains=ALL + syn region schemeUnquote matchgroup=Delimiter start="#,@(" end=")" contains=ALL + syn region schemeUnquote matchgroup=Delimiter start="#,\[" end="\]" contains=ALL + syn region schemeUnquote matchgroup=Delimiter start="#,@\[" end="\]" contains=ALL + syn region schemeQuoted matchgroup=Delimiter start="#['`]" end=![ \t()\[\]";]!me=e-1 contains=ALL + syn region schemeQuoted matchgroup=Delimiter start="#['`](" matchgroup=Delimiter end=")" contains=ALL +endif + + +if exists("b:is_chicken") || exists("is_chicken") + " multiline comment + syntax region schemeMultilineComment start=/#|/ end=/|#/ contains=schemeMultilineComment + + syn match schemeOther "##[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+" + syn match schemeExtSyntax "#:[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+" + + syn keyword schemeExtSyntax unit uses declare hide foreign-declare foreign-parse foreign-parse/spec + syn keyword schemeExtSyntax foreign-lambda foreign-lambda* define-external define-macro load-library + syn keyword schemeExtSyntax let-values let*-values letrec-values ->string require-extension + syn keyword schemeExtSyntax let-optionals let-optionals* define-foreign-variable define-record + syn keyword schemeExtSyntax pointer tag-pointer tagged-pointer? define-foreign-type + syn keyword schemeExtSyntax require require-for-syntax cond-expand and-let* receive argc+argv + syn keyword schemeExtSyntax fixnum? fx= fx> fx< fx>= fx<= fxmin fxmax + syn keyword schemeExtFunc ##core#inline ##sys#error ##sys#update-errno + + " here-string + syn region schemeString start=+#<<\s*\z(.*\)+ end=+^\z1$+ + + if filereadable(expand(":p:h")."/cpp.vim") + unlet! b:current_syntax + syn include @ChickenC :p:h/cpp.vim + syn region ChickenC matchgroup=schemeOther start=+(\@<=foreign-declare "+ end=+")\@=+ contains=@ChickenC + syn region ChickenC matchgroup=schemeComment start=+foreign-declare\s*#<<\z(.*\)$+hs=s+15 end=+^\z1$+ contains=@ChickenC + syn region ChickenC matchgroup=schemeOther start=+(\@<=foreign-parse "+ end=+")\@=+ contains=@ChickenC + syn region ChickenC matchgroup=schemeComment start=+foreign-parse\s*#<<\z(.*\)$+hs=s+13 end=+^\z1$+ contains=@ChickenC + syn region ChickenC matchgroup=schemeOther start=+(\@<=foreign-parse/spec "+ end=+")\@=+ contains=@ChickenC + syn region ChickenC matchgroup=schemeComment start=+foreign-parse/spec\s*#<<\z(.*\)$+hs=s+18 end=+^\z1$+ contains=@ChickenC + syn region ChickenC matchgroup=schemeComment start=+#>+ end=+<#+ contains=@ChickenC + syn region ChickenC matchgroup=schemeComment start=+#>?+ end=+<#+ contains=@ChickenC + syn region ChickenC matchgroup=schemeComment start=+#>!+ end=+<#+ contains=@ChickenC + syn region ChickenC matchgroup=schemeComment start=+#>\$+ end=+<#+ contains=@ChickenC + syn region ChickenC matchgroup=schemeComment start=+#>%+ end=+<#+ contains=@ChickenC + endif + + " suggested by Alex Queiroz + syn match schemeExtSyntax "#![-a-z!$%&*/:<=>?^_~0-9+.@#%]\+" + syn region schemeString start=+#<#\s*\z(.*\)+ end=+^\z1$+ +endif + +" Synchronization and the wrapping up... + +syn sync match matchPlace grouphere NONE "^[^ \t]" +" ... i.e. synchronize on a line that starts at the left margin + +" 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_scheme_syntax_inits") + if version < 508 + let did_scheme_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink schemeSyntax Statement + HiLink schemeFunc Function + + HiLink schemeString String + HiLink schemeCharacter Character + HiLink schemeNumber Number + HiLink schemeBoolean Boolean + + HiLink schemeDelimiter Delimiter + HiLink schemeConstant Constant + + HiLink schemeComment Comment + HiLink schemeMultilineComment Comment + HiLink schemeError Error + + HiLink schemeExtSyntax Type + HiLink schemeExtFunc PreProc + delcommand HiLink +endif + +let b:current_syntax = "scheme" diff --git a/vim/bundle/ubuntu-vim72/syntax/scilab.vim b/vim/bundle/ubuntu-vim72/syntax/scilab.vim new file mode 100644 index 0000000..1bfc003 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/scilab.vim @@ -0,0 +1,115 @@ +" +" Vim syntax file +" Language : Scilab +" Maintainer : Benoit Hamelin +" File type : *.sci (see :help filetype) +" History +" 28jan2002 benoith 0.1 Creation. Adapted from matlab.vim. +" 04feb2002 benoith 0.5 Fixed bugs with constant highlighting. +" + + +" 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 + + +" Reserved words. +syn keyword scilabStatement abort clear clearglobal end exit global mode predef quit resume +syn keyword scilabStatement return +syn keyword scilabFunction function endfunction funptr +syn keyword scilabPredicate null iserror isglobal +syn keyword scilabKeyword typename +syn keyword scilabDebug debug pause what where whereami whereis who whos +syn keyword scilabRepeat for while break +syn keyword scilabConditional if then else elseif +syn keyword scilabMultiplex select case + +" Reserved constants. +syn match scilabConstant "\(%\)[0-9A-Za-z?!#$]\+" +syn match scilabBoolean "\(%\)[FTft]\>" + +" Delimiters and operators. +syn match scilabDelimiter "[][;,()]" +syn match scilabComparison "[=~]=" +syn match scilabComparison "[<>]=\=" +syn match scilabComparison "<>" +syn match scilabLogical "[&|~]" +syn match scilabAssignment "=" +syn match scilabArithmetic "[+-]" +syn match scilabArithmetic "\.\=[*/\\]\.\=" +syn match scilabArithmetic "\.\=^" +syn match scilabRange ":" +syn match scilabMlistAccess "\." + +syn match scilabLineContinuation "\.\{2,}" + +syn match scilabTransposition "[])a-zA-Z0-9?!_#$.]'"lc=1 + +" Comments and tools. +syn keyword scilabTodo TODO todo FIXME fixme TBD tbd contained +syn match scilabComment "//.*$" contains=scilabTodo + +" Constants. +syn match scilabNumber "[0-9]\+\(\.[0-9]*\)\=\([DEde][+-]\=[0-9]\+\)\=" +syn match scilabNumber "\.[0-9]\+\([DEde][+-]\=[0-9]\+\)\=" +syn region scilabString start=+'+ skip=+''+ end=+'+ oneline +syn region scilabString start=+"+ end=+"+ oneline + +" Identifiers. +syn match scilabIdentifier "\<[A-Za-z?!_#$][A-Za-z0-9?!_#$]*\>" +syn match scilabOverload "%[A-Za-z0-9?!_#$]\+_[A-Za-z0-9?!_#$]\+" + + +" 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_scilab_syntax_inits") + if version < 508 + let did_scilab_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink scilabStatement Statement + HiLink scilabFunction Keyword + HiLink scilabPredicate Keyword + HiLink scilabKeyword Keyword + HiLink scilabDebug Debug + HiLink scilabRepeat Repeat + HiLink scilabConditional Conditional + HiLink scilabMultiplex Conditional + + HiLink scilabConstant Constant + HiLink scilabBoolean Boolean + + HiLink scilabDelimiter Delimiter + HiLink scilabMlistAccess Delimiter + HiLink scilabComparison Operator + HiLink scilabLogical Operator + HiLink scilabAssignment Operator + HiLink scilabArithmetic Operator + HiLink scilabRange Operator + HiLink scilabLineContinuation Underlined + HiLink scilabTransposition Operator + + HiLink scilabTodo Todo + HiLink scilabComment Comment + + HiLink scilabNumber Number + HiLink scilabString String + + HiLink scilabIdentifier Identifier + HiLink scilabOverload Special + + delcommand HiLink +endif + +let b:current_syntax = "scilab" + +"EOF vim: ts=4 noet tw=100 sw=4 sts=0 diff --git a/vim/bundle/ubuntu-vim72/syntax/screen.vim b/vim/bundle/ubuntu-vim72/syntax/screen.vim new file mode 100644 index 0000000..71b3d3e --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/screen.vim @@ -0,0 +1,246 @@ +" Vim syntax file +" Language: screen(1) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2010-01-03 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn match screenEscape '\\.' + +syn keyword screenTodo contained TODO FIXME XXX NOTE + +syn region screenComment display oneline start='#' end='$' + \ contains=screenTodo,@Spell + +syn region screenString display oneline start=+"+ skip=+\\"+ end=+"+ + \ contains=screenVariable,screenSpecial + +syn region screenLiteral display oneline start=+'+ skip=+\\'+ end=+'+ + +syn match screenVariable contained display '$\%(\h\w*\|{\h\w*}\)' + +syn keyword screenBoolean on off + +syn match screenNumbers display '\<\d\+\>' + +syn match screenSpecials contained + \ '%\%([%aAdDhlmMstuwWyY?:{]\|[0-9]*n\|0?cC\)' + +syn keyword screenCommands + \ acladd + \ aclchg + \ acldel + \ aclgrp + \ aclumask + \ activity + \ addacl + \ allpartial + \ altscreen + \ at + \ attrcolor + \ autodetach + \ autonuke + \ backtick + \ bce + \ bd_bc_down + \ bd_bc_left + \ bd_bc_right + \ bd_bc_up + \ bd_bell + \ bd_braille_table + \ bd_eightdot + \ bd_info + \ bd_link + \ bd_lower_left + \ bd_lower_right + \ bd_ncrc + \ bd_port + \ bd_scroll + \ bd_skip + \ bd_start_braille + \ bd_type + \ bd_upper_left + \ bd_upper_right + \ bd_width + \ bell + \ bell_msg + \ bind + \ bindkey + \ blanker + \ blankerprg + \ break + \ breaktype + \ bufferfile + \ c1 + \ caption + \ chacl + \ charset + \ chdir + \ clear + \ colon + \ command + \ compacthist + \ console + \ copy + \ crlf + \ debug + \ defautonuke + \ defbce + \ defbreaktype + \ defc1 + \ defcharset + \ defencoding + \ defescape + \ defflow + \ defgr + \ defhstatus + \ defkanji + \ deflog + \ deflogin + \ defmode + \ defmonitor + \ defnonblock + \ defobuflimit + \ defscrollback + \ defshell + \ defsilence + \ defslowpaste + \ defutf8 + \ defwrap + \ defwritelock + \ detach + \ digraph + \ dinfo + \ displays + \ dumptermcap + \ echo + \ encoding + \ escape + \ eval + \ exec + \ fit + \ flow + \ focus + \ gr + \ hardcopy + \ hardcopy_append + \ hardcopydir + \ hardstatus + \ height + \ help + \ history + \ hstatus + \ idle + \ ignorecase + \ info + \ kanji + \ kill + \ lastmsg + \ layout + \ license + \ lockscreen + \ log + \ logfile + \ login + \ logtstamp + \ mapdefault + \ mapnotnext + \ maptimeout + \ markkeys + \ maxwin + \ meta + \ monitor + \ msgminwait + \ msgwait + \ multiuser + \ nethack + \ next + \ nonblock + \ number + \ obuflimit + \ only + \ other + \ partial + \ password + \ paste + \ pastefont + \ pow_break + \ pow_detach + \ pow_detach_msg + \ prev + \ printcmd + \ process + \ quit + \ readbuf + \ readreg + \ redisplay + \ register + \ remove + \ removebuf + \ reset + \ resize + \ screen + \ scrollback + \ select + \ sessionname + \ setenv + \ setsid + \ shell + \ shelltitle + \ silence + \ silencewait + \ sleep + \ slowpaste + \ sorendition + \ source + \ split + \ startup_message + \ stuff + \ su + \ suspend + \ term + \ termcap + \ termcapinfo + \ terminfo + \ time + \ title + \ umask + \ unsetenv + \ utf8 + \ vbell + \ vbell_msg + \ vbellwait + \ verbose + \ version + \ wall + \ width + \ windowlist + \ windows + \ wrap + \ writebuf + \ writelock + \ xoff + \ xon + \ zmodem + \ zombie + +hi def link screenEscape Special +hi def link screenComment Comment +hi def link screenTodo Todo +hi def link screenString String +hi def link screenLiteral String +hi def link screenVariable Identifier +hi def link screenBoolean Boolean +hi def link screenNumbers Number +hi def link screenSpecials Special +hi def link screenCommands Keyword + +let b:current_syntax = "screen" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/sd.vim b/vim/bundle/ubuntu-vim72/syntax/sd.vim new file mode 100644 index 0000000..bb201ca --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sd.vim @@ -0,0 +1,75 @@ +" Language: streaming descriptor file +" Maintainer: Puria Nafisi Azizi (pna) +" License: This file can be redistribued and/or modified under the same terms +" as Vim itself. +" URL: http://netstudent.polito.it/vim_syntax/ +" Last Change: 2006-09-27 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Always ignore case +syn case ignore + +" Comments +syn match sdComment /\s*[#;].*$/ + +" IP Adresses +syn cluster sdIPCluster contains=sdIPError,sdIPSpecial +syn match sdIPError /\%(\d\{4,}\|25[6-9]\|2[6-9]\d\|[3-9]\d\{2}\)[\.0-9]*/ contained +syn match sdIPSpecial /\%(127\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)/ contained +syn match sdIP contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}/ contains=@sdIPCluster + +" Statements +syn keyword sdStatement AGGREGATE AUDIO_CHANNELS +syn keyword sdStatement BYTE_PER_PCKT BIT_PER_SAMPLE BITRATE +syn keyword sdStatement CLOCK_RATE CODING_TYPE CREATOR +syn match sdStatement /^\s*CODING_TYPE\>/ nextgroup=sdCoding skipwhite +syn match sdStatement /^\s*ENCODING_NAME\>/ nextgroup=sdEncoding skipwhite +syn keyword sdStatement FILE_NAME FRAME_LEN FRAME_RATE FORCE_FRAME_RATE +syn keyword sdStatement LICENSE +syn match sdStatement /^\s*MEDIA_SOURCE\>/ nextgroup=sdSource skipwhite +syn match sdStatement /^\s*MULTICAST\>/ nextgroup=sdIP skipwhite +syn keyword sdStatement PAYLOAD_TYPE PKT_LEN PRIORITY +syn keyword sdStatement SAMPLE_RATE +syn keyword sdStatement TITLE TWIN +syn keyword sdStatement VERIFY + +" Known Options +syn keyword sdEncoding H26L MPV MP2T MP4V-ES +syn keyword sdCoding FRAME SAMPLE +syn keyword sdSource STORED LIVE + +"Specials +syn keyword sdSpecial TRUE FALSE NULL +syn keyword sdDelimiter STREAM STREAM_END +syn match sdError /^search .\{257,}/ + +if version >= 508 || !exists("did_config_syntax_inits") + if version < 508 + let did_config_syntax_inits = 1 + command! -nargs=+ HiLink hi link + else + command! -nargs=+ HiLink hi def link + endif + + HiLink sdIP Number + HiLink sdHostname Type + HiLink sdEncoding Identifier + HiLink sdCoding Identifier + HiLink sdSource Identifier + HiLink sdComment Comment + HiLink sdIPError Error + HiLink sdError Error + HiLink sdStatement Statement + HiLink sdIPSpecial Special + HiLink sdSpecial Special + HiLink sdDelimiter Delimiter + + delcommand HiLink +endif + +let b:current_syntax = "sd" diff --git a/vim/bundle/ubuntu-vim72/syntax/sdc.vim b/vim/bundle/ubuntu-vim72/syntax/sdc.vim new file mode 100644 index 0000000..0ca9bec --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sdc.vim @@ -0,0 +1,41 @@ +" Vim syntax file +" Language: SDC - Synopsys Design Constraints +" Maintainer: Maurizio Tranchero - maurizio.tranchero@gmail.com +" Last Change: Thu Mar 25 17:35:16 CET 2009 +" Credits: based on TCL Vim syntax file +" Version: 0.3 + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Read the TCL syntax to start with +runtime! syntax/tcl.vim + +" SDC-specific keywords +syn keyword sdcCollections foreach_in_collection +syn keyword sdcObjectsQuery get_clocks get_ports +syn keyword sdcObjectsInfo get_point_info get_node_info get_path_info +syn keyword sdcObjectsInfo get_timing_paths set_attribute +syn keyword sdcConstraints set_false_path +syn keyword sdcNonIdealities set_min_delay set_max_delay +syn keyword sdcNonIdealities set_input_delay set_output_delay +syn keyword sdcNonIdealities set_load set_min_capacitance set_max_capacitance +syn keyword sdcCreateOperations create_clock create_timing_netlist update_timing_netlist + +" command flags highlighting +syn match sdcFlags "[[:space:]]-[[:alpha:]]*\>" + +" Define the default highlighting. +hi def link sdcCollections Repeat +hi def link sdcObjectsInfo Operator +hi def link sdcCreateOperations Operator +hi def link sdcObjectsQuery Operator +hi def link sdcConstraints Operator +hi def link sdcNonIdealities Operator +hi def link sdcFlags Special + +let b:current_syntax = "sdc" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/sdl.vim b/vim/bundle/ubuntu-vim72/syntax/sdl.vim new file mode 100644 index 0000000..d0165e7 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sdl.vim @@ -0,0 +1,167 @@ +" Vim syntax file +" Language: SDL +" Maintainer: Michael Piefel +" Last Change: 2 May 2001 + +" 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 + +if !exists("sdl_2000") + syntax case ignore +endif + +" A bunch of useful SDL keywords +syn keyword sdlStatement task else nextstate +syn keyword sdlStatement in out with from interface +syn keyword sdlStatement to via env and use +syn keyword sdlStatement process procedure block system service type +syn keyword sdlStatement endprocess endprocedure endblock endsystem +syn keyword sdlStatement package endpackage connection endconnection +syn keyword sdlStatement channel endchannel connect +syn keyword sdlStatement synonym dcl signal gate timer signallist signalset +syn keyword sdlStatement create output set reset call +syn keyword sdlStatement operators literals +syn keyword sdlStatement active alternative any as atleast constants +syn keyword sdlStatement default endalternative endmacro endoperator +syn keyword sdlStatement endselect endsubstructure external +syn keyword sdlStatement if then fi for import macro macrodefinition +syn keyword sdlStatement macroid mod nameclass nodelay not operator or +syn keyword sdlStatement parent provided referenced rem +syn keyword sdlStatement select spelling substructure xor +syn keyword sdlNewState state endstate +syn keyword sdlInput input start stop return none save priority +syn keyword sdlConditional decision enddecision join +syn keyword sdlVirtual virtual redefined finalized adding inherits +syn keyword sdlExported remote exported export + +if !exists("sdl_no_96") + syn keyword sdlStatement all axioms constant endgenerator endrefinement endservice + syn keyword sdlStatement error fpar generator literal map noequality ordering + syn keyword sdlStatement refinement returns revealed reverse service signalroute + syn keyword sdlStatement view viewed + syn keyword sdlExported imported +endif + +if exists("sdl_2000") + syn keyword sdlStatement abstract aggregation association break choice composition + syn keyword sdlStatement continue endmethod handle method + syn keyword sdlStatement ordered private protected public + syn keyword sdlException exceptionhandler endexceptionhandler onexception + syn keyword sdlException catch new raise + " The same in uppercase + syn keyword sdlStatement TASK ELSE NEXTSTATE + syn keyword sdlStatement IN OUT WITH FROM INTERFACE + syn keyword sdlStatement TO VIA ENV AND USE + syn keyword sdlStatement PROCESS PROCEDURE BLOCK SYSTEM SERVICE TYPE + syn keyword sdlStatement ENDPROCESS ENDPROCEDURE ENDBLOCK ENDSYSTEM + syn keyword sdlStatement PACKAGE ENDPACKAGE CONNECTION ENDCONNECTION + syn keyword sdlStatement CHANNEL ENDCHANNEL CONNECT + syn keyword sdlStatement SYNONYM DCL SIGNAL GATE TIMER SIGNALLIST SIGNALSET + syn keyword sdlStatement CREATE OUTPUT SET RESET CALL + syn keyword sdlStatement OPERATORS LITERALS + syn keyword sdlStatement ACTIVE ALTERNATIVE ANY AS ATLEAST CONSTANTS + syn keyword sdlStatement DEFAULT ENDALTERNATIVE ENDMACRO ENDOPERATOR + syn keyword sdlStatement ENDSELECT ENDSUBSTRUCTURE EXTERNAL + syn keyword sdlStatement IF THEN FI FOR IMPORT MACRO MACRODEFINITION + syn keyword sdlStatement MACROID MOD NAMECLASS NODELAY NOT OPERATOR OR + syn keyword sdlStatement PARENT PROVIDED REFERENCED REM + syn keyword sdlStatement SELECT SPELLING SUBSTRUCTURE XOR + syn keyword sdlNewState STATE ENDSTATE + syn keyword sdlInput INPUT START STOP RETURN NONE SAVE PRIORITY + syn keyword sdlConditional DECISION ENDDECISION JOIN + syn keyword sdlVirtual VIRTUAL REDEFINED FINALIZED ADDING INHERITS + syn keyword sdlExported REMOTE EXPORTED EXPORT + + syn keyword sdlStatement ABSTRACT AGGREGATION ASSOCIATION BREAK CHOICE COMPOSITION + syn keyword sdlStatement CONTINUE ENDMETHOD ENDOBJECT ENDVALUE HANDLE METHOD OBJECT + syn keyword sdlStatement ORDERED PRIVATE PROTECTED PUBLIC + syn keyword sdlException EXCEPTIONHANDLER ENDEXCEPTIONHANDLER ONEXCEPTION + syn keyword sdlException CATCH NEW RAISE +endif + +" String and Character contstants +" Highlight special characters (those which have a backslash) differently +syn match sdlSpecial contained "\\\d\d\d\|\\." +syn region sdlString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial +syn region sdlString start=+'+ skip=+''+ end=+'+ + +" No, this doesn't happen, I just wanted to scare you. SDL really allows all +" these characters for identifiers; fortunately, keywords manage without them. +" set iskeyword=@,48-57,_,192-214,216-246,248-255,- + +syn region sdlComment start="/\*" end="\*/" +syn region sdlComment start="comment" end=";" +syn region sdlComment start="--" end="--\|$" +syn match sdlCommentError "\*/" + +syn keyword sdlOperator present +syn keyword sdlType integer real natural duration pid boolean time +syn keyword sdlType character charstring ia5string +syn keyword sdlType self now sender offspring +syn keyword sdlStructure asntype endasntype syntype endsyntype struct + +if !exists("sdl_no_96") + syn keyword sdlStructure newtype endnewtype +endif + +if exists("sdl_2000") + syn keyword sdlStructure object endobject value endvalue + " The same in uppercase + syn keyword sdlStructure OBJECT ENDOBJECT VALUE ENDVALUE + syn keyword sdlOperator PRESENT + syn keyword sdlType INTEGER NATURAL DURATION PID BOOLEAN TIME + syn keyword sdlType CHARSTRING IA5STRING + syn keyword sdlType SELF NOW SENDER OFFSPRING + syn keyword sdlStructure ASNTYPE ENDASNTYPE SYNTYPE ENDSYNTYPE STRUCT +endif + +" ASN.1 in SDL +syn case match +syn keyword sdlType SET OF BOOLEAN INTEGER REAL BIT OCTET +syn keyword sdlType SEQUENCE CHOICE +syn keyword sdlType STRING OBJECT IDENTIFIER NULL + +syn sync ccomment sdlComment + +" 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_sdl_syn_inits") + if version < 508 + let did_sdl_syn_inits = 1 + command -nargs=+ HiLink hi link + command -nargs=+ Hi hi + else + command -nargs=+ HiLink hi def link + command -nargs=+ Hi hi def + endif + + HiLink sdlException Label + HiLink sdlConditional sdlStatement + HiLink sdlVirtual sdlStatement + HiLink sdlExported sdlFlag + HiLink sdlCommentError sdlError + HiLink sdlOperator Operator + HiLink sdlStructure sdlType + Hi sdlStatement term=bold ctermfg=4 guifg=Blue + Hi sdlFlag term=bold ctermfg=4 guifg=Blue gui=italic + Hi sdlNewState term=italic ctermfg=2 guifg=Magenta gui=underline + Hi sdlInput term=bold guifg=Red + HiLink sdlType Type + HiLink sdlString String + HiLink sdlComment Comment + HiLink sdlSpecial Special + HiLink sdlError Error + + delcommand HiLink + delcommand Hi +endif + +let b:current_syntax = "sdl" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/sed.vim b/vim/bundle/ubuntu-vim72/syntax/sed.vim new file mode 100644 index 0000000..0383b6f --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sed.vim @@ -0,0 +1,122 @@ +" Vim syntax file +" Language: sed +" Maintainer: Haakon Riiser +" URL: http://folk.uio.no/hakonrk/vim/syntax/sed.vim +" Last Change: 2005 Dec 15 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +syn match sedError "\S" + +syn match sedWhitespace "\s\+" contained +syn match sedSemicolon ";" +syn match sedAddress "[[:digit:]$]" +syn match sedAddress "\d\+\~\d\+" +syn region sedAddress matchgroup=Special start="[{,;]\s*/\(\\/\)\="lc=1 skip="[^\\]\(\\\\\)*\\/" end="/I\=" contains=sedTab,sedRegexpMeta +syn region sedAddress matchgroup=Special start="^\s*/\(\\/\)\=" skip="[^\\]\(\\\\\)*\\/" end="/I\=" contains=sedTab,sedRegexpMeta +syn match sedComment "^\s*#.*$" +syn match sedFunction "[dDgGhHlnNpPqQx=]\s*\($\|;\)" contains=sedSemicolon,sedWhitespace +syn match sedLabel ":[^;]*" +syn match sedLineCont "^\(\\\\\)*\\$" contained +syn match sedLineCont "[^\\]\(\\\\\)*\\$"ms=e contained +syn match sedSpecial "[{},!]" +if exists("highlight_sedtabs") + syn match sedTab "\t" contained +endif + +" Append/Change/Insert +syn region sedACI matchgroup=sedFunction start="[aci]\\$" matchgroup=NONE end="^.*$" contains=sedLineCont,sedTab + +syn region sedBranch matchgroup=sedFunction start="[bt]" matchgroup=sedSemicolon end=";\|$" contains=sedWhitespace +syn region sedRW matchgroup=sedFunction start="[rw]" matchgroup=sedSemicolon end=";\|$" contains=sedWhitespace + +" Substitution/transform with various delimiters +syn region sedFlagwrite matchgroup=sedFlag start="w" matchgroup=sedSemicolon end=";\|$" contains=sedWhitespace contained +syn match sedFlag "[[:digit:]gpI]*w\=" contains=sedFlagwrite contained +syn match sedRegexpMeta "[.*^$]" contained +syn match sedRegexpMeta "\\." contains=sedTab contained +syn match sedRegexpMeta "\[.\{-}\]" contains=sedTab contained +syn match sedRegexpMeta "\\{\d\*,\d*\\}" contained +syn match sedRegexpMeta "\\(.\{-}\\)" contains=sedTab contained +syn match sedReplaceMeta "&\|\\\($\|.\)" contains=sedTab contained + +" Metacharacters: $ * . \ ^ [ ~ +" @ is used as delimiter and treated on its own below +let __at = char2nr("@") +let __sed_i = char2nr(" ") +if has("ebcdic") + let __sed_last = 255 +else + let __sed_last = 126 +endif +let __sed_metacharacters = '$*.\^[~' +while __sed_i <= __sed_last + let __sed_delimiter = escape(nr2char(__sed_i), __sed_metacharacters) + if __sed_i != __at + exe 'syn region sedAddress matchgroup=Special start=@\\'.__sed_delimiter.'\(\\'.__sed_delimiter.'\)\=@ skip=@[^\\]\(\\\\\)*\\'.__sed_delimiter.'@ end=@'.__sed_delimiter.'I\=@ contains=sedTab' + exe 'syn region sedRegexp'.__sed_i 'matchgroup=Special start=@'.__sed_delimiter.'\(\\\\\|\\'.__sed_delimiter.'\)*@ skip=@[^\\'.__sed_delimiter.']\(\\\\\)*\\'.__sed_delimiter.'@ end=@'.__sed_delimiter.'@me=e-1 contains=sedTab,sedRegexpMeta keepend contained nextgroup=sedReplacement'.__sed_i + exe 'syn region sedReplacement'.__sed_i 'matchgroup=Special start=@'.__sed_delimiter.'\(\\\\\|\\'.__sed_delimiter.'\)*@ skip=@[^\\'.__sed_delimiter.']\(\\\\\)*\\'.__sed_delimiter.'@ end=@'.__sed_delimiter.'@ contains=sedTab,sedReplaceMeta keepend contained nextgroup=sedFlag' + endif + let __sed_i = __sed_i + 1 +endwhile +syn region sedAddress matchgroup=Special start=+\\@\(\\@\)\=+ skip=+[^\\]\(\\\\\)*\\@+ end=+@I\=+ contains=sedTab,sedRegexpMeta +syn region sedRegexp64 matchgroup=Special start=+@\(\\\\\|\\@\)*+ skip=+[^\\@]\(\\\\\)*\\@+ end=+@+me=e-1 contains=sedTab,sedRegexpMeta keepend contained nextgroup=sedReplacement64 +syn region sedReplacement64 matchgroup=Special start=+@\(\\\\\|\\@\)*+ skip=+[^\\@]\(\\\\\)*\\@+ end=+@+ contains=sedTab,sedReplaceMeta keepend contained nextgroup=sedFlag + +" Since the syntax for the substituion command is very similar to the +" syntax for the transform command, I use the same pattern matching +" for both commands. There is one problem -- the transform command +" (y) does not allow any flags. To save memory, I ignore this problem. +syn match sedST "[sy]" nextgroup=sedRegexp\d\+ + +if version >= 508 || !exists("did_sed_syntax_inits") + if version < 508 + let did_sed_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink sedAddress Macro + HiLink sedACI NONE + HiLink sedBranch Label + HiLink sedComment Comment + HiLink sedDelete Function + HiLink sedError Error + HiLink sedFlag Type + HiLink sedFlagwrite Constant + HiLink sedFunction Function + HiLink sedLabel Label + HiLink sedLineCont Special + HiLink sedPutHoldspc Function + HiLink sedReplaceMeta Special + HiLink sedRegexpMeta Special + HiLink sedRW Constant + HiLink sedSemicolon Special + HiLink sedST Function + HiLink sedSpecial Special + HiLink sedWhitespace NONE + if exists("highlight_sedtabs") + HiLink sedTab Todo + endif + let __sed_i = 32 + while __sed_i <= 126 + exe "HiLink sedRegexp".__sed_i "Macro" + exe "HiLink sedReplacement".__sed_i "NONE" + let __sed_i = __sed_i + 1 + endwhile + + delcommand HiLink +endif + +unlet __sed_i __sed_delimiter __sed_metacharacters + +let b:current_syntax = "sed" + +" vim: sts=4 sw=4 ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/sendpr.vim b/vim/bundle/ubuntu-vim72/syntax/sendpr.vim new file mode 100644 index 0000000..28a26e6 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sendpr.vim @@ -0,0 +1,32 @@ +" Vim syntax file +" Language: FreeBSD send-pr file +" Maintainer: Hendrik Scholz +" Last Change: 2002 Mar 21 +" +" http://raisdorf.net/files/misc/send-pr.vim + +" 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 match sendprComment /^SEND-PR:/ +" email address +syn match sendprType /<[a-zA-Z0-9\-\_\.]*@[a-zA-Z0-9\-\_\.]*>/ +" ^> lines +syn match sendprString /^>[a-zA-Z\-]*:/ +syn region sendprLabel start="\[" end="\]" +syn match sendprString /^To:/ +syn match sendprString /^From:/ +syn match sendprString /^Reply-To:/ +syn match sendprString /^Cc:/ +syn match sendprString /^X-send-pr-version:/ +syn match sendprString /^X-GNATS-Notify:/ + +hi def link sendprComment Comment +hi def link sendprType Type +hi def link sendprString String +hi def link sendprLabel Label diff --git a/vim/bundle/ubuntu-vim72/syntax/sensors.vim b/vim/bundle/ubuntu-vim72/syntax/sensors.vim new file mode 100644 index 0000000..63cecec --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sensors.vim @@ -0,0 +1,52 @@ +" Vim syntax file +" Language: sensors.conf(5) - libsensors configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword sensorsTodo contained TODO FIXME XXX NOTE + +syn region sensorsComment display oneline start='#' end='$' + \ contains=sensorsTodo,@Spell + + +syn keyword sensorsKeyword bus chip label compute ignore set + +syn region sensorsName display oneline + \ start=+"+ skip=+\\\\\|\\"+ end=+"+ + \ contains=sensorsNameSpecial +syn match sensorsName display '\w\+' + +syn match sensorsNameSpecial display '\\["\\rnt]' + +syn match sensorsLineContinue '\\$' + +syn match sensorsNumber display '\d*.\d\+\>' + +syn match sensorsRealWorld display '@' + +syn match sensorsOperator display '[+*/-]' + +syn match sensorsDelimiter display '[()]' + +hi def link sensorsTodo Todo +hi def link sensorsComment Comment +hi def link sensorsKeyword Keyword +hi def link sensorsName String +hi def link sensorsNameSpecial SpecialChar +hi def link sensorsLineContinue Special +hi def link sensorsNumber Number +hi def link sensorsRealWorld Identifier +hi def link sensorsOperator Normal +hi def link sensorsDelimiter Normal + +let b:current_syntax = "sensors" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/services.vim b/vim/bundle/ubuntu-vim72/syntax/services.vim new file mode 100644 index 0000000..661f57a --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/services.vim @@ -0,0 +1,54 @@ +" Vim syntax file +" Language: services(5) - Internet network services list +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn match servicesBegin display '^' + \ nextgroup=servicesName,servicesComment + +syn match servicesName contained display '[[:graph:]]\+' + \ nextgroup=servicesPort skipwhite + +syn match servicesPort contained display '\d\+' + \ nextgroup=servicesPPDiv,servicesPPDivDepr + \ skipwhite + +syn match servicesPPDiv contained display '/' + \ nextgroup=servicesProtocol skipwhite + +syn match servicesPPDivDepr contained display ',' + \ nextgroup=servicesProtocol skipwhite + +syn match servicesProtocol contained display '\S\+' + \ nextgroup=servicesAliases,servicesComment + \ skipwhite + +syn match servicesAliases contained display '\S\+' + \ nextgroup=servicesAliases,servicesComment + \ skipwhite + +syn keyword servicesTodo contained TODO FIXME XXX NOTE + +syn region servicesComment display oneline start='#' end='$' + \ contains=servicesTodo,@Spell + +hi def link servicesTodo Todo +hi def link servicesComment Comment +hi def link servicesName Identifier +hi def link servicesPort Number +hi def link servicesPPDiv Delimiter +hi def link servicesPPDivDepr Error +hi def link servicesProtocol Type +hi def link servicesAliases Macro + +let b:current_syntax = "services" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/setserial.vim b/vim/bundle/ubuntu-vim72/syntax/setserial.vim new file mode 100644 index 0000000..cdd309d --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/setserial.vim @@ -0,0 +1,120 @@ +" Vim syntax file +" Language: setserial(8) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn match setserialBegin display '^' + \ nextgroup=setserialDevice,setserialComment + \ skipwhite + +syn match setserialDevice contained display '\%(/[^ \t/]*\)\+' + \ nextgroup=setserialParameter skipwhite + +syn keyword setserialParameter contained port irq baud_base divisor + \ close_delay closing_wait rx_trigger + \ tx_trigger flow_off flow_on rx_timeout + \ nextgroup=setserialNumber skipwhite + +syn keyword setserialParameter contained uart + \ nextgroup=setserialUARTType skipwhite + +syn keyword setserialParameter contained autoconfig auto_irq skip_test + \ spd_hi spd_vhi spd_shi spd_warp spd_cust + \ spd_normal sak fourport session_lockout + \ pgrp_lockout hup_notify split_termios + \ callout_nohup low_latency + \ nextgroup=setserialParameter skipwhite + +syn match setserialParameter contained display + \ '\^\%(auto_irq\|skip_test\|sak\|fourport\)' + \ contains=setserialNegation + \ nextgroup=setserialParameter skipwhite + +syn match setserialParameter contained display + \ '\^\%(session_lockout\|pgrp_lockout\)' + \ contains=setserialNegation + \ nextgroup=setserialParameter skipwhite + +syn match setserialParameter contained display + \ '\^\%(hup_notify\|split_termios\)' + \ contains=setserialNegation + \ nextgroup=setserialParameter skipwhite + +syn match setserialParameter contained display + \ '\^\%(callout_nohup\|low_latency\)' + \ contains=setserialNegation + \ nextgroup=setserialParameter skipwhite + +syn keyword setserialParameter contained set_multiport + \ nextgroup=setserialMultiport skipwhite + +syn match setserialNumber contained display '\<\d\+\>' + \ nextgroup=setserialParameter skipwhite +syn match setserialNumber contained display '0x\x\+' + \ nextgroup=setserialParameter skipwhite + +syn keyword setserialUARTType contained none + +syn match setserialUARTType contained display + \ '8250\|16[4789]50\|16550A\=\|16650\%(V2\)\=' + \ nextgroup=setserialParameter skipwhite + +syn match setserialUARTType contained display '166[59]4' + \ nextgroup=setserialParameter skipwhite + +syn match setserialNegation contained display '\^' + +syn match setserialMultiport contained '\' + \ nextgroup=setserialPort skipwhite + +syn match setserialPort contained display '\<\d\+\>' + \ nextgroup=setserialMask skipwhite +syn match setserialPort contained display '0x\x\+' + \ nextgroup=setserialMask skipwhite + +syn match setserialMask contained '\' + \ nextgroup=setserialBitMask skipwhite + +syn match setserialBitMask contained display '\<\d\+\>' + \ nextgroup=setserialMatch skipwhite +syn match setserialBitMask contained display '0x\x\+' + \ nextgroup=setserialMatch skipwhite + +syn match setserialMatch contained '\' + \ nextgroup=setserialMatchBits skipwhite + +syn match setserialMatchBits contained display '\<\d\+\>' + \ nextgroup=setserialMultiport skipwhite +syn match setserialMatchBits contained display '0x\x\+' + \ nextgroup=setserialMultiport skipwhite + +syn keyword setserialTodo contained TODO FIXME XXX NOTE + +syn region setserialComment display oneline start='^\s*#' end='$' + \ contains=setserialTodo,@Spell + +hi def link setserialTodo Todo +hi def link setserialComment Comment +hi def link setserialDevice Normal +hi def link setserialParameter Identifier +hi def link setserialNumber Number +hi def link setserialUARTType Type +hi def link setserialNegation Operator +hi def link setserialMultiport Type +hi def link setserialPort setserialNumber +hi def link setserialMask Type +hi def link setserialBitMask setserialNumber +hi def link setserialMatch Type +hi def link setserialMatchBits setserialNumber + +let b:current_syntax = "setserial" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/sgml.vim b/vim/bundle/ubuntu-vim72/syntax/sgml.vim new file mode 100644 index 0000000..c0c3643 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sgml.vim @@ -0,0 +1,337 @@ +" Vim syntax file +" Language: SGML +" Maintainer: Johannes Zellner +" Last Change: Tue, 27 Apr 2004 15:05:21 CEST +" Filenames: *.sgml,*.sgm +" $Id: sgml.vim,v 1.1 2004/06/13 17:52:57 vimboss Exp $ + +" 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 + +let s:sgml_cpo_save = &cpo +set cpo&vim + +syn case match + +" mark illegal characters +syn match sgmlError "[<&]" + + +" unicode numbers: +" provide different highlithing for unicode characters +" inside strings and in plain text (character data). +" +" EXAMPLE: +" +" \u4e88 +" +syn match sgmlUnicodeNumberAttr +\\u\x\{4}+ contained contains=sgmlUnicodeSpecifierAttr +syn match sgmlUnicodeSpecifierAttr +\\u+ contained +syn match sgmlUnicodeNumberData +\\u\x\{4}+ contained contains=sgmlUnicodeSpecifierData +syn match sgmlUnicodeSpecifierData +\\u+ contained + + +" strings inside character data or comments +" +syn region sgmlString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=sgmlEntity,sgmlUnicodeNumberAttr display +syn region sgmlString contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=sgmlEntity,sgmlUnicodeNumberAttr display + +" punctuation (within attributes) e.g. +" ^ ^ +syn match sgmlAttribPunct +[:.]+ contained display + + +" no highlighting for sgmlEqual (sgmlEqual has no highlighting group) +syn match sgmlEqual +=+ + + +" attribute, everything before the '=' +" +" PROVIDES: @sgmlAttribHook +" +" EXAMPLE: +" +" +" ^^^^^^^^^^^^^ +" +syn match sgmlAttrib + \ +[^-'"<]\@<=\<[a-zA-Z0-9.:]\+\>\([^'">]\@=\|$\)+ + \ contained + \ contains=sgmlAttribPunct,@sgmlAttribHook + \ display + + +" UNQUOTED value (not including the '=' -- sgmlEqual) +" +" PROVIDES: @sgmlValueHook +" +" EXAMPLE: +" +" +" ^^^^^ +" +syn match sgmlValue + \ +[^"' =/!?<>][^ =/!?<>]*+ + \ contained + \ contains=sgmlEntity,sgmlUnicodeNumberAttr,@sgmlValueHook + \ display + + +" QUOTED value (not including the '=' -- sgmlEqual) +" +" PROVIDES: @sgmlValueHook +" +" EXAMPLE: +" +" +" ^^^^^^^ +" +" ^^^^^^^ +" +syn region sgmlValue contained start=+"+ skip=+\\\\\|\\"+ end=+"+ + \ contains=sgmlEntity,sgmlUnicodeNumberAttr,@sgmlValueHook +syn region sgmlValue contained start=+'+ skip=+\\\\\|\\'+ end=+'+ + \ contains=sgmlEntity,sgmlUnicodeNumberAttr,@sgmlValueHook + + +" value, everything after (and including) the '=' +" no highlighting! +" +" EXAMPLE: +" +" +" ^^^^^^^^^ +" +" ^^^^^^^ +" +syn match sgmlEqualValue + \ +=\s*[^ =/!?<>]\++ + \ contained + \ contains=sgmlEqual,sgmlString,sgmlValue + \ display + + +" start tag +" use matchgroup=sgmlTag to skip over the leading '<' +" see also sgmlEmptyTag below. +" +" PROVIDES: @sgmlTagHook +" +syn region sgmlTag + \ matchgroup=sgmlTag start=+<[^ /!?"']\@=+ + \ matchgroup=sgmlTag end=+>+ + \ contained + \ contains=sgmlError,sgmlAttrib,sgmlEqualValue,@sgmlTagHook + + +" tag content for empty tags. This is the same as sgmlTag +" above, except the `matchgroup=sgmlEndTag for highlighting +" the end '/>' differently. +" +" PROVIDES: @sgmlTagHook +" +syn region sgmlEmptyTag + \ matchgroup=sgmlTag start=+<[^ /!?"']\@=+ + \ matchgroup=sgmlEndTag end=+/>+ + \ contained + \ contains=sgmlError,sgmlAttrib,sgmlEqualValue,@sgmlTagHook + + +" end tag +" highlight everything but not the trailing '>' which +" was already highlighted by the containing sgmlRegion. +" +" PROVIDES: @sgmlTagHook +" (should we provide a separate @sgmlEndTagHook ?) +" +syn match sgmlEndTag + \ +"']\+>+ + \ contained + \ contains=@sgmlTagHook + + +" [-- SGML SPECIFIC --] + +" SGML specific +" tag content for abbreviated regions +" +" PROVIDES: @sgmlTagHook +" +syn region sgmlAbbrTag + \ matchgroup=sgmlTag start=+<[^ /!?"']\@=+ + \ matchgroup=sgmlTag end=+/+ + \ contained + \ contains=sgmlError,sgmlAttrib,sgmlEqualValue,@sgmlTagHook + + +" SGML specific +" just highlight the trailing '/' +syn match sgmlAbbrEndTag +/+ + + +" SGML specific +" abbreviated regions +" +" No highlighing, highlighing is done by contained elements. +" +" PROVIDES: @sgmlRegionHook +" +" EXAMPLE: +" +" "']\+/\_[^/]\+/+ + \ contains=sgmlAbbrTag,sgmlAbbrEndTag,sgmlCdata,sgmlComment,sgmlEntity,sgmlUnicodeNumberData,@sgmlRegionHook + +" [-- END OF SGML SPECIFIC --] + + +" real (non-empty) elements. We cannot do syntax folding +" as in xml, because end tags may be optional in sgml depending +" on the dtd. +" No highlighing, highlighing is done by contained elements. +" +" PROVIDES: @sgmlRegionHook +" +" EXAMPLE: +" +" +" +" +" +" some data +" +" +" SGML specific: +" compared to xmlRegion: +" - removed folding +" - added a single '/'in the start pattern +" +syn region sgmlRegion + \ start=+<\z([^ /!?>"']\+\)\(\(\_[^/>]*[^/!?]>\)\|>\)+ + \ end=++ + \ contains=sgmlTag,sgmlEndTag,sgmlCdata,@sgmlRegionCluster,sgmlComment,sgmlEntity,sgmlUnicodeNumberData,@sgmlRegionHook + \ keepend + \ extend + + +" empty tags. Just a container, no highlighting. +" Compare this with sgmlTag. +" +" EXAMPLE: +" +" +" +" TODO use sgmlEmptyTag intead of sgmlTag +syn match sgmlEmptyRegion + \ +<[^ /!?>"']\(\_[^"'<>]\|"\_[^"]*"\|'\_[^']*'\)*/>+ + \ contains=sgmlEmptyTag + + +" cluster which contains the above two elements +syn cluster sgmlRegionCluster contains=sgmlRegion,sgmlEmptyRegion,sgmlAbbrRegion + + +" &entities; compare with dtd +syn match sgmlEntity "&[^; \t]*;" contains=sgmlEntityPunct +syn match sgmlEntityPunct contained "[&.;]" + + +" The real comments (this implements the comments as defined by sgml, +" but not all sgml pages actually conform to it. Errors are flagged. +syn region sgmlComment start=++ contains=sgmlCommentPart,sgmlString,sgmlCommentError,sgmlTodo +syn keyword sgmlTodo contained TODO FIXME XXX display +syn match sgmlCommentError contained "[^>+ + \ contains=sgmlCdataStart,sgmlCdataEnd,@sgmlCdataHook + \ keepend + \ extend +" using the following line instead leads to corrupt folding at CDATA regions +" syn match sgmlCdata ++ contains=sgmlCdataStart,sgmlCdataEnd,@sgmlCdataHook +syn match sgmlCdataStart ++ contained + + +" Processing instructions +" This allows "?>" inside strings -- good idea? +syn region sgmlProcessing matchgroup=sgmlProcessingDelim start="" contains=sgmlAttrib,sgmlEqualValue + + +" DTD -- we use dtd.vim here +syn region sgmlDocType matchgroup=sgmlDocTypeDecl start="\c" contains=sgmlDocTypeKeyword,sgmlInlineDTD,sgmlString +syn keyword sgmlDocTypeKeyword contained DOCTYPE PUBLIC SYSTEM +syn region sgmlInlineDTD contained start="\[" end="]" contains=@sgmlDTD +syn include @sgmlDTD :p:h/dtd.vim + + +" synchronizing +" TODO !!! to be improved !!! + +syn sync match sgmlSyncDT grouphere sgmlDocType +\_.\(+ + +syn sync match sgmlSync grouphere sgmlRegion +\_.\(<[^ /!?>"']\+\)\@=+ +" syn sync match sgmlSync grouphere sgmlRegion "<[^ /!?>"']*>" +syn sync match sgmlSync groupthere sgmlRegion +"']\+>+ + +syn sync minlines=100 + + +" The default highlighting. +hi def link sgmlTodo Todo +hi def link sgmlTag Function +hi def link sgmlEndTag Identifier +" SGML specifig +hi def link sgmlAbbrEndTag Identifier +hi def link sgmlEmptyTag Function +hi def link sgmlEntity Statement +hi def link sgmlEntityPunct Type + +hi def link sgmlAttribPunct Comment +hi def link sgmlAttrib Type + +hi def link sgmlValue String +hi def link sgmlString String +hi def link sgmlComment Comment +hi def link sgmlCommentPart Comment +hi def link sgmlCommentError Error +hi def link sgmlError Error + +hi def link sgmlProcessingDelim Comment +hi def link sgmlProcessing Type + +hi def link sgmlCdata String +hi def link sgmlCdataCdata Statement +hi def link sgmlCdataStart Type +hi def link sgmlCdataEnd Type + +hi def link sgmlDocTypeDecl Function +hi def link sgmlDocTypeKeyword Statement +hi def link sgmlInlineDTD Function +hi def link sgmlUnicodeNumberAttr Number +hi def link sgmlUnicodeSpecifierAttr SpecialChar +hi def link sgmlUnicodeNumberData Number +hi def link sgmlUnicodeSpecifierData SpecialChar + +let b:current_syntax = "sgml" + +let &cpo = s:sgml_cpo_save +unlet s:sgml_cpo_save + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/sgmldecl.vim b/vim/bundle/ubuntu-vim72/syntax/sgmldecl.vim new file mode 100644 index 0000000..6a69fc5 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sgmldecl.vim @@ -0,0 +1,79 @@ +" Vim syntax file +" Language: SGML (SGML Declaration ) +" Last Change: jueves, 28 de diciembre de 2000, 13:51:44 CLST +" Maintainer: "Daniel A. Molina W." +" You can modify and maintain this file, in other case send comments +" the maintainer email address. + +" 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 region sgmldeclDeclBlock transparent start=++ +syn region sgmldeclTagBlock transparent start=+<+ end=+>+ + \ contains=ALLBUT, + \ @sgmlTagError,@sgmlErrInTag +syn region sgmldeclComment contained start=+--+ end=+--+ + +syn keyword sgmldeclDeclKeys SGML CHARSET CAPACITY SCOPE SYNTAX + \ FEATURES + +syn keyword sgmldeclTypes BASESET DESCSET DOCUMENT NAMING DELIM + \ NAMES QUANTITY SHUNCHAR DOCTYPE + \ ELEMENT ENTITY ATTLIST NOTATION + \ TYPE + +syn keyword sgmldeclStatem CONTROLS FUNCTION NAMECASE MINIMIZE + \ LINK OTHER APPINFO REF ENTITIES + +syn keyword sgmldeclVariables TOTALCAP GRPCAP ENTCAP DATATAG OMITTAG RANK + \ SIMPLE IMPLICIT EXPLICIT CONCUR SUBDOC FORMAL ATTCAP + \ ATTCHCAP AVGRPCAP ELEMCAP ENTCHCAP IDCAP IDREFCAP + \ SHORTTAG + +syn match sgmldeclNConst contained +[0-9]\++ + +syn region sgmldeclString contained start=+"+ end=+"+ + +syn keyword sgmldeclBool YES NO + +syn keyword sgmldeclSpecial SHORTREF SGMLREF UNUSED NONE GENERAL + \ SEEALSO ANY + +syn sync lines=250 + + +" 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_sgmldecl_syntax_init") + if version < 508 + let did_sgmldecl_syntax_init = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink sgmldeclDeclKeys Keyword + HiLink sgmldeclTypes Type + HiLink sgmldeclConst Constant + HiLink sgmldeclNConst Constant + HiLink sgmldeclString String + HiLink sgmldeclDeclBlock Normal + HiLink sgmldeclBool Boolean + HiLink sgmldeclSpecial Special + HiLink sgmldeclComment Comment + HiLink sgmldeclStatem Statement + HiLink sgmldeclVariables Type + + delcommand HiLink +endif + +let b:current_syntax = "sgmldecl" +" vim:set tw=78 ts=4: diff --git a/vim/bundle/ubuntu-vim72/syntax/sgmllnx.vim b/vim/bundle/ubuntu-vim72/syntax/sgmllnx.vim new file mode 100644 index 0000000..99e6ea2 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sgmllnx.vim @@ -0,0 +1,68 @@ +" Vim syntax file +" Language: SGML-linuxdoc (supported by old sgmltools-1.x) +" (for more information, visit www.sgmltools.org) +" Maintainer: SungHyun Nam +" Last Change: 2008 Sep 17 + +" 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 + +" tags +syn region sgmllnxEndTag start=++ contains=sgmllnxTagN,sgmllnxTagError +syn region sgmllnxTag start=+<[^/]+ end=+>+ contains=sgmllnxTagN,sgmllnxTagError +syn match sgmllnxTagN contained +<\s*[-a-zA-Z0-9]\++ms=s+1 contains=sgmllnxTagName +syn match sgmllnxTagN contained ++ +syn region sgmllnxDocType start=++ + +" 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_sgmllnx_syn_inits") + if version < 508 + let did_sgmllnx_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink sgmllnxTag2 Function + HiLink sgmllnxTagN2 Function + HiLink sgmllnxTag Special + HiLink sgmllnxEndTag Special + HiLink sgmllnxParen Special + HiLink sgmllnxEntity Type + HiLink sgmllnxDocEnt Type + HiLink sgmllnxTagName Statement + HiLink sgmllnxComment Comment + HiLink sgmllnxSpecial Special + HiLink sgmllnxDocType PreProc + HiLink sgmllnxTagError Error + + delcommand HiLink +endif + +let b:current_syntax = "sgmllnx" + +" vim:set tw=78 ts=8 sts=2 sw=2 noet: diff --git a/vim/bundle/ubuntu-vim72/syntax/sh.vim b/vim/bundle/ubuntu-vim72/syntax/sh.vim new file mode 100644 index 0000000..6ef4fba --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sh.vim @@ -0,0 +1,598 @@ +" Vim syntax file +" Language: shell (sh) Korn shell (ksh) bash (sh) +" Maintainer: Dr. Charles E. Campbell, Jr. +" Previous Maintainer: Lennart Schultz +" Last Change: Nov 17, 2009 +" Version: 110 +" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax +" For options and settings, please use: :help ft-sh-syntax +" This file includes many ideas from Éric Brunet (eric.brunet@ens.fr) + +" For version 5.x: Clear all syntax items {{{1 +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" handling /bin/sh with is_kornshell/is_sh {{{1 +" b:is_sh is set when "#! /bin/sh" is found; +" However, it often is just a masquerade by bash (typically Linux) +" or kornshell (typically workstations with Posix "sh"). +" So, when the user sets "is_bash" or "is_kornshell", +" a b:is_sh is converted into b:is_bash/b:is_kornshell, +" respectively. +if !exists("b:is_kornshell") && !exists("b:is_bash") + if exists("g:is_posix") && !exists("g:is_kornshell") + let g:is_kornshell= g:is_posix + endif + if exists("g:is_kornshell") + let b:is_kornshell= 1 + if exists("b:is_sh") + unlet b:is_sh + endif + elseif exists("g:is_bash") + let b:is_bash= 1 + if exists("b:is_sh") + unlet b:is_sh + endif + else + let b:is_sh= 1 + endif +endif + +" set up default g:sh_fold_enabled {{{1 +if !exists("g:sh_fold_enabled") + let g:sh_fold_enabled= 0 +elseif g:sh_fold_enabled != 0 && !has("folding") + let g:sh_fold_enabled= 0 + echomsg "Ignoring g:sh_fold_enabled=".g:sh_fold_enabled."; need to re-compile vim for +fold support" +endif +if !exists("s:sh_fold_functions") + let s:sh_fold_functions = 1 +endif +if !exists("s:sh_fold_heredoc") + let s:sh_fold_heredoc = 2 +endif +if !exists("s:sh_fold_ifdofor") + let s:sh_fold_ifdofor = 4 +endif +if g:sh_fold_enabled && &fdm == "manual" + set fdm=syntax +endif + +" sh syntax is case sensitive {{{1 +syn case match + +" Clusters: contains=@... clusters {{{1 +"================================== +syn cluster shErrorList contains=shDoError,shIfError,shInError,shCaseError,shEsacError,shCurlyError,shParenError,shTestError,shOK +if exists("b:is_kornshell") + syn cluster ErrorList add=shDTestError +endif +syn cluster shArithParenList contains=shArithmetic,shCaseEsac,shDeref,shDerefSimple,shEcho,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement +syn cluster shArithList contains=@shArithParenList,shParenError +syn cluster shCaseEsacList contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange +syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq +syn cluster shColonList contains=@shCaseList +syn cluster shCommandSubList contains=shArithmetic,shDeref,shDerefSimple,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shSingleQuote,shDoubleQuote,shStatement,shVariable,shSubSh,shAlias,shTest,shCtrlSeq,shSpecial +syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial +syn cluster shDblQuoteList contains=shCommandSub,shDeref,shDerefSimple,shPosnParm,shExSingleQuote,shCtrlSeq,shSpecial +syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPPS +syn cluster shDerefVarList contains=shDerefOp,shDerefVarArray,shDerefOpError +syn cluster shEchoList contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shExpr,shExSingleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote +syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq +syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest +syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq +if exists("b:is_kornshell") || exists("b:is_bash") + syn cluster shFunctionList add=shRepeat + syn cluster shFunctionList add=shDblBrace,shDblParen +endif +syn cluster shHereBeginList contains=@shCommandSubList +syn cluster shHereList contains=shBeginHere,shHerePayload +syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload +syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shRedir,shExSingleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial +syn cluster shLoopList contains=@shCaseList,shTestOpr,shExpr,shDblBrace,shConditional,shCaseEsac,shTest,@shErrorList,shSet +syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator +syn cluster shTestList contains=shCharClass,shComment,shCommandSub,shDeref,shDerefSimple,shDoubleQuote,shExpr,shExpr,shNumber,shOperator,shExSingleQuote,shSingleQuote,shTestOpr,shTest,shCtrlSeq + +" Echo: {{{1 +" ==== +" This one is needed INSIDE a CommandSub, so that `echo bla` be correct +syn region shEcho matchgroup=shStatement start="\" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=@shEchoList skipwhite nextgroup=shQuickComment +syn region shEcho matchgroup=shStatement start="\" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=@shEchoList skipwhite nextgroup=shQuickComment +syn match shEchoQuote contained '\%(\\\\\)*\\["`'()]' + +" This must be after the strings, so that ... \" will be correct +syn region shEmbeddedEcho contained matchgroup=shStatement start="\" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|`)]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=shNumber,shExSingleQuote,shSingleQuote,shDeref,shDerefSimple,shSpecialVar,shOperator,shDoubleQuote,shCharClass,shCtrlSeq + +" Alias: {{{1 +" ===== +if exists("b:is_kornshell") || exists("b:is_bash") + syn match shStatement "\" + syn region shAlias matchgroup=shStatement start="\\s\+\(\w\+\)\@=" skip="\\$" end="\>\|`" + syn region shAlias matchgroup=shStatement start="\\s\+\(\w\+=\)\@=" skip="\\$" end="=" +endif + +" Error Codes: {{{1 +" ============ +syn match shDoError "\" +syn match shIfError "\" +syn match shInError "\" +syn match shCaseError ";;" +syn match shEsacError "\" +syn match shCurlyError "}" +syn match shParenError ")" +syn match shOK '\.\(done\|fi\|in\|esac\)' +if exists("b:is_kornshell") + syn match shDTestError "]]" +endif +syn match shTestError "]" + +" Options: {{{1 +" ==================== +syn match shOption "\s\zs[-+][a-zA-Z0-9]\+\>" +syn match shOption "\s\zs--[^ \t$`'"|]\+" + +" File Redirection Highlighted As Operators: {{{1 +"=========================================== +syn match shRedir "\d\=>\(&[-0-9]\)\=" +syn match shRedir "\d\=>>-\=" +syn match shRedir "\d\=<\(&[-0-9]\)\=" +syn match shRedir "\d<<-\=" + +" Operators: {{{1 +" ========== +syn match shOperator "<<\|>>" contained +syn match shOperator "[!&;|]" contained +syn match shOperator "\[[[^:]\|\]]" contained +syn match shOperator "!\==" skipwhite nextgroup=shPattern +syn match shPattern "\<\S\+\())\)\@=" contained contains=shExSingleQuote,shSingleQuote,shDoubleQuote,shDeref + +" Subshells: {{{1 +" ========== +syn region shExpr transparent matchgroup=shExprRegion start="{" end="}" contains=@shExprList2 nextgroup=shMoreSpecial +syn region shSubSh transparent matchgroup=shSubShRegion start="(" end=")" contains=@shSubShList nextgroup=shMoreSpecial + +" Tests: {{{1 +"======= +syn region shExpr matchgroup=shRange start="\[" skip=+\\\\\|\\$+ end="\]" contains=@shTestList,shSpecial +syn region shTest transparent matchgroup=shStatement start="\=\|!=\|==\|-.\>\|-\(nt\|ot\|ef\|eq\|ne\|lt\|le\|gt\|ge\)\>\|[!<>]" +syn match shTestOpr contained '=' skipwhite nextgroup=shTestDoubleQuote,shTestSingleQuote,shTestPattern +syn match shTestPattern contained '\w\+' +syn match shTestDoubleQuote contained '"[^"]*"' +syn match shTestSingleQuote contained '\\.' +syn match shTestSingleQuote contained "'[^']*'" +if exists("b:is_kornshell") || exists("b:is_bash") + syn region shDblBrace matchgroup=Delimiter start="\[\[" skip=+\\\\\|\\$+ end="\]\]" contains=@shTestList + syn region shDblParen matchgroup=Delimiter start="((" skip=+\\\\\|\\$+ end="))" contains=@shTestList +endif + +" Character Class In Range: {{{1 +" ========================= +syn match shCharClass contained "\[:\(backspace\|escape\|return\|xdigit\|alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|tab\):\]" + +" Loops: do, if, while, until {{{1 +" ====== +if (g:sh_fold_enabled % (s:sh_fold_ifdofor * 2))/s:sh_fold_ifdofor + syn region shDo fold transparent matchgroup=shConditional start="\" matchgroup=shConditional end="\" contains=@shLoopList + syn region shIf fold transparent matchgroup=shConditional start="\#\=" +syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained +if exists("b:is_bash") + syn match shSpecial "\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained +endif +if exists("b:is_bash") + syn region shExSingleQuote matchgroup=shOperator start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial +else + syn region shExSingleQuote matchGroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial +endif +syn region shSingleQuote matchgroup=shOperator start=+'+ end=+'+ contains=@Spell +syn region shDoubleQuote matchgroup=shOperator start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell +syn match shStringSpecial "[^[:print:] \t]" contained +syn match shStringSpecial "\%(\\\\\)*\\[\\"'`$()#]" +syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial +syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]" +syn match shMoreSpecial "\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial contained + +" Comments: {{{1 +"========== +syn cluster shCommentGroup contains=shTodo,@Spell +syn keyword shTodo contained COMBAK FIXME TODO XXX +syn match shComment "^\s*\zs#.*$" contains=@shCommentGroup +syn match shComment "\s\zs#.*$" contains=@shCommentGroup +syn match shQuickComment contained "#.*$" + +" Here Documents: {{{1 +" ========================================= +if version < 600 + syn region shHereDoc matchgroup=shRedir start="<<\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shRedir end="^END[a-zA-Z_0-9]*$" contains=@shDblQuoteList + syn region shHereDoc matchgroup=shRedir start="<<-\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shRedir end="^\s*END[a-zA-Z_0-9]*$" contains=@shDblQuoteList + syn region shHereDoc matchgroup=shRedir start="<<\s*\**EOF\**" matchgroup=shRedir end="^EOF$" contains=@shDblQuoteList + syn region shHereDoc matchgroup=shRedir start="<<-\s*\**EOF\**" matchgroup=shRedir end="^\s*EOF$" contains=@shDblQuoteList + syn region shHereDoc matchgroup=shRedir start="<<\s*\**\.\**" matchgroup=shRedir end="^\.$" contains=@shDblQuoteList + syn region shHereDoc matchgroup=shRedir start="<<-\s*\**\.\**" matchgroup=shRedir end="^\s*\.$" contains=@shDblQuoteList + +elseif (g:sh_fold_enabled % (s:sh_fold_heredoc * 2))/s:sh_fold_heredoc + syn region shHereDoc matchgroup=shRedir fold start="<<\s*\z(\S*\)" matchgroup=shRedir end="^\z1\s*$" contains=@shDblQuoteList + syn region shHereDoc matchgroup=shRedir fold start="<<\s*\"\z(\S*\)\"" matchgroup=shRedir end="^\z1\s*$" + syn region shHereDoc matchgroup=shRedir fold start="<<\s*'\z(\S*\)'" matchgroup=shRedir end="^\z1\s*$" + syn region shHereDoc matchgroup=shRedir fold start="<<-\s*\z(\S*\)" matchgroup=shRedir end="^\s*\z1\s*$" contains=@shDblQuoteList + syn region shHereDoc matchgroup=shRedir fold start="<<-\s*\"\z(\S*\)\"" matchgroup=shRedir end="^\s*\z1\s*$" + syn region shHereDoc matchgroup=shRedir fold start="<<-\s*'\z(\S*\)'" matchgroup=shRedir end="^\s*\z1\s*$" + syn region shHereDoc matchgroup=shRedir fold start="<<\s*\\\_$\_s*\z(\S*\)" matchgroup=shRedir end="^\z1\s*$" + syn region shHereDoc matchgroup=shRedir fold start="<<\s*\\\_$\_s*\"\z(\S*\)\"" matchgroup=shRedir end="^\z1\s*$" + syn region shHereDoc matchgroup=shRedir fold start="<<-\s*\\\_$\_s*'\z(\S*\)'" matchgroup=shRedir end="^\s*\z1\s*$" + syn region shHereDoc matchgroup=shRedir fold start="<<-\s*\\\_$\_s*\z(\S*\)" matchgroup=shRedir end="^\s*\z1\s*$" + syn region shHereDoc matchgroup=shRedir fold start="<<-\s*\\\_$\_s*\"\z(\S*\)\"" matchgroup=shRedir end="^\s*\z1\s*$" + syn region shHereDoc matchgroup=shRedir fold start="<<\s*\\\_$\_s*'\z(\S*\)'" matchgroup=shRedir end="^\z1\s*$" + syn region shHereDoc matchgroup=shRedir fold start="<<\\\z(\S*\)" matchgroup=shRedir end="^\z1\s*$" + +else + syn region shHereDoc matchgroup=shRedir start="<<\s*\\\=\z(\S*\)" matchgroup=shRedir end="^\z1\s*$" contains=@shDblQuoteList + syn region shHereDoc matchgroup=shRedir start="<<\s*\"\z(\S*\)\"" matchgroup=shRedir end="^\z1\s*$" + syn region shHereDoc matchgroup=shRedir start="<<-\s*\z(\S*\)" matchgroup=shRedir end="^\s*\z1\s*$" contains=@shDblQuoteList + syn region shHereDoc matchgroup=shRedir start="<<-\s*'\z(\S*\)'" matchgroup=shRedir end="^\s*\z1\s*$" + syn region shHereDoc matchgroup=shRedir start="<<\s*'\z(\S*\)'" matchgroup=shRedir end="^\z1\s*$" + syn region shHereDoc matchgroup=shRedir start="<<-\s*\"\z(\S*\)\"" matchgroup=shRedir end="^\s*\z1\s*$" + syn region shHereDoc matchgroup=shRedir start="<<\s*\\\_$\_s*\z(\S*\)" matchgroup=shRedir end="^\z1\s*$" + syn region shHereDoc matchgroup=shRedir start="<<-\s*\\\_$\_s*\z(\S*\)" matchgroup=shRedir end="^\s*\z1\s*$" + syn region shHereDoc matchgroup=shRedir start="<<-\s*\\\_$\_s*'\z(\S*\)'" matchgroup=shRedir end="^\s*\z1\s*$" + syn region shHereDoc matchgroup=shRedir start="<<\s*\\\_$\_s*'\z(\S*\)'" matchgroup=shRedir end="^\z1\s*$" + syn region shHereDoc matchgroup=shRedir start="<<\s*\\\_$\_s*\"\z(\S*\)\"" matchgroup=shRedir end="^\z1\s*$" + syn region shHereDoc matchgroup=shRedir start="<<-\s*\\\_$\_s*\"\z(\S*\)\"" matchgroup=shRedir end="^\s*\z1\s*$" + syn region shHereDoc matchgroup=shRedir start="<<\\\z(\S*\)" matchgroup=shRedir end="^\z1\s*$" +endif + +" Here Strings: {{{1 +" ============= +if exists("b:is_bash") + syn match shRedir "<<<" +endif + +" Identifiers: {{{1 +"============= +syn match shSetOption "\s\zs[-+][a-zA-Z0-9]\+\>" contained +syn match shVariable "\<\([bwglsav]:\)\=[a-zA-Z0-9.!@_%+,]*\ze=" nextgroup=shSetIdentifier +syn match shSetIdentifier "=" contained nextgroup=shPattern,shDeref,shDerefSimple,shDoubleQuote,shSingleQuote,shExSingleQuote +if exists("b:is_bash") + syn region shSetList oneline matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shOperator end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+#\|=" contains=@shIdList + syn region shSetList oneline matchgroup=shSet start="\\ze[^/]" end="\ze[;|)]\|$" matchgroup=shOperator end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList +elseif exists("b:is_kornshell") + syn region shSetList oneline matchgroup=shSet start="\<\(typeset\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shOperator end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList + syn region shSetList oneline matchgroup=shSet start="\\ze[^/]" end="$" matchgroup=shOperator end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList +else + syn region shSetList oneline matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shOperator end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList +endif + +" Functions: {{{1 +if !exists("g:is_posix") + syn keyword shFunctionKey function skipwhite skipnl nextgroup=shFunctionTwo +endif + +if exists("b:is_bash") + if (g:sh_fold_enabled % (s:sh_fold_functions * 2))/s:sh_fold_functions + syn region shFunctionOne fold matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment + syn region shFunctionTwo fold matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment + else + syn region shFunctionOne matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList + syn region shFunctionTwo matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained + endif +else + if (g:sh_fold_enabled % (s:sh_fold_functions * 2))/s:sh_fold_functions + syn region shFunctionOne fold matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment + syn region shFunctionTwo fold matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment + else + syn region shFunctionOne matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList + syn region shFunctionTwo matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained + endif +endif + +" Parameter Dereferencing: {{{1 +" ======================== +syn match shDerefSimple "\$\%(\h\w*\|\d\)" +syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray +syn match shDerefWordError "[^}$[]" contained +syn match shDerefSimple "\$[-#*@!?]" +syn match shDerefSimple "\$\$" +if exists("b:is_bash") || exists("b:is_kornshell") + syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList + syn region shDeref matchgroup=PreProc start="\${\$\$" end="}" contains=@shDerefList +endif + +" bash: ${!prefix*} and ${#parameter}: {{{1 +" ==================================== +if exists("b:is_bash") + syn region shDeref matchgroup=PreProc start="\${!" end="\*\=}" contains=@shDerefList,shDerefOp + syn match shDerefVar contained "{\@<=!\w\+" nextgroup=@shDerefVarList +endif + +syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefOpError +syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@shDerefVarList,shDerefOp +syn match shDerefVar contained "{\@<=\w\+" nextgroup=@shDerefVarList + +" sh ksh bash : ${var[... ]...} array reference: {{{1 +syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" contains=@shCommandSubList nextgroup=shDerefOp,shDerefOpError + +" Special ${parameter OPERATOR word} handling: {{{1 +" sh ksh bash : ${parameter:-word} word is default value +" sh ksh bash : ${parameter:=word} assign word as default value +" sh ksh bash : ${parameter:?word} display word if parameter is null +" sh ksh bash : ${parameter:+word} use word if parameter is not null, otherwise nothing +" ksh bash : ${parameter#pattern} remove small left pattern +" ksh bash : ${parameter##pattern} remove large left pattern +" ksh bash : ${parameter%pattern} remove small right pattern +" ksh bash : ${parameter%%pattern} remove large right pattern +syn cluster shDerefPatternList contains=shDerefPattern,shDerefString +syn match shDerefOpError contained ":[[:punct:]]" +syn match shDerefOp contained ":\=[-=?]" nextgroup=@shDerefPatternList +syn match shDerefOp contained ":\=+" nextgroup=@shDerefPatternList +if exists("b:is_bash") || exists("b:is_kornshell") + syn match shDerefOp contained "#\{1,2}" nextgroup=@shDerefPatternList + syn match shDerefOp contained "%\{1,2}" nextgroup=@shDerefPatternList + syn match shDerefPattern contained "[^{}]\+" contains=shDeref,shDerefSimple,shDerefPattern,shDerefString,shCommandSub,shDerefEscape nextgroup=shDerefPattern + syn region shDerefPattern contained start="{" end="}" contains=shDeref,shDerefSimple,shDerefString,shCommandSub nextgroup=shDerefPattern + syn match shDerefEscape contained '\%(\\\\\)*\\.' +endif +syn region shDerefString contained matchgroup=shOperator start=+\%(\\\)\@" +syn sync match shCaseEsacSync groupthere shCaseEsac "\" +syn sync match shDoSync grouphere shDo "\" +syn sync match shDoSync groupthere shDo "\" +syn sync match shForSync grouphere shFor "\" +syn sync match shForSync groupthere shFor "\" +syn sync match shIfSync grouphere shIf "\" +syn sync match shIfSync groupthere shIf "\" +syn sync match shUntilSync grouphere shRepeat "\" +syn sync match shWhileSync grouphere shRepeat "\" + +" Default Highlighting: {{{1 +" ===================== +hi def link shArithRegion shShellVariables +hi def link shBeginHere shRedir +hi def link shCaseBar shConditional +hi def link shCaseCommandSub shCommandSub +hi def link shCaseDoubleQuote shDoubleQuote +hi def link shCaseIn shConditional +hi def link shCaseSingleQuote shSingleQuote +hi def link shCaseStart shConditional +hi def link shCmdSubRegion shShellVariables +hi def link shColon shComment +hi def link shDerefOp shOperator +hi def link shDerefPOL shDerefOp +hi def link shDerefPPS shDerefOp +hi def link shDeref shShellVariables +hi def link shDerefSimple shDeref +hi def link shDerefSpecial shDeref +hi def link shDerefString shDoubleQuote +hi def link shDerefVar shDeref +hi def link shDoubleQuote shString +hi def link shEcho shString +hi def link shEchoQuote shString +hi def link shEmbeddedEcho shString +hi def link shEscape shCommandSub +hi def link shExSingleQuote shSingleQuote +hi def link shFunction Function +hi def link shHereDoc shString +hi def link shHerePayload shHereDoc +hi def link shLoop shStatement +hi def link shMoreSpecial shSpecial +hi def link shOption shCommandSub +hi def link shPattern shString +hi def link shParen shArithmetic +hi def link shPosnParm shShellVariables +hi def link shQuickComment shComment +hi def link shRange shOperator +hi def link shRedir shOperator +hi def link shSetOption shOption +hi def link shSingleQuote shString +hi def link shSource shOperator +hi def link shStringSpecial shSpecial +hi def link shSubShRegion shOperator +hi def link shTestOpr shConditional +hi def link shTestPattern shString +hi def link shTestDoubleQuote shString +hi def link shTestSingleQuote shString +hi def link shVariable shSetList +hi def link shWrapLineOperator shOperator + +if exists("b:is_bash") + hi def link bashAdminStatement shStatement + hi def link bashSpecialVariables shShellVariables + hi def link bashStatement shStatement + hi def link shFunctionParen Delimiter + hi def link shFunctionDelim Delimiter +endif +if exists("b:is_kornshell") + hi def link kshSpecialVariables shShellVariables + hi def link kshStatement shStatement + hi def link shFunctionParen Delimiter +endif + +hi def link shCaseError Error +hi def link shCondError Error +hi def link shCurlyError Error +hi def link shDerefError Error +hi def link shDerefOpError Error +hi def link shDerefWordError Error +hi def link shDoError Error +hi def link shEsacError Error +hi def link shIfError Error +hi def link shInError Error +hi def link shParenError Error +hi def link shTestError Error +if exists("b:is_kornshell") + hi def link shDTestError Error +endif + +hi def link shArithmetic Special +hi def link shCharClass Identifier +hi def link shSnglCase Statement +hi def link shCommandSub Special +hi def link shComment Comment +hi def link shConditional Conditional +hi def link shCtrlSeq Special +hi def link shExprRegion Delimiter +hi def link shFunctionKey Function +hi def link shFunctionName Function +hi def link shNumber Number +hi def link shOperator Operator +hi def link shRepeat Repeat +hi def link shSet Statement +hi def link shSetList Identifier +hi def link shShellVariables PreProc +hi def link shSpecial Special +hi def link shStatement Statement +hi def link shString String +hi def link shTodo Todo +hi def link shAlias Identifier + +" Set Current Syntax: {{{1 +" =================== +if exists("b:is_bash") + let b:current_syntax = "bash" +elseif exists("b:is_kornshell") + let b:current_syntax = "ksh" +else + let b:current_syntax = "sh" +endif + +" vim: ts=16 fdm=marker diff --git a/vim/bundle/ubuntu-vim72/syntax/sicad.vim b/vim/bundle/ubuntu-vim72/syntax/sicad.vim new file mode 100644 index 0000000..7e32451 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sicad.vim @@ -0,0 +1,413 @@ +" Vim syntax file +" Language: SiCAD (procedure language) +" Maintainer: Zsolt Branyiczky +" Last Change: 2003 May 11 +" URL: http://lmark.mgx.hu:81/download/vim/sicad.vim + +" 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 + +" use SQL highlighting after 'sql' command +if version >= 600 + syn include @SQL syntax/sql.vim +else + syn include @SQL :p:h/sql.vim +endif +unlet b:current_syntax + +" spaces are used in (auto)indents since sicad hates tabulator characters +if version >= 600 + setlocal expandtab +else + set expandtab +endif + +" ignore case +syn case ignore + +" most important commands - not listed by ausku +syn keyword sicadStatement define +syn keyword sicadStatement dialog +syn keyword sicadStatement do +syn keyword sicadStatement dop contained +syn keyword sicadStatement end +syn keyword sicadStatement enddo +syn keyword sicadStatement endp +syn keyword sicadStatement erroff +syn keyword sicadStatement erron +syn keyword sicadStatement exitp +syn keyword sicadGoto goto contained +syn keyword sicadStatement hh +syn keyword sicadStatement if +syn keyword sicadStatement in +syn keyword sicadStatement msgsup +syn keyword sicadStatement out +syn keyword sicadStatement padd +syn keyword sicadStatement parbeg +syn keyword sicadStatement parend +syn keyword sicadStatement pdoc +syn keyword sicadStatement pprot +syn keyword sicadStatement procd +syn keyword sicadStatement procn +syn keyword sicadStatement psav +syn keyword sicadStatement psel +syn keyword sicadStatement psymb +syn keyword sicadStatement ptrace +syn keyword sicadStatement ptstat +syn keyword sicadStatement set +syn keyword sicadStatement sql contained +syn keyword sicadStatement step +syn keyword sicadStatement sys +syn keyword sicadStatement ww + +" functions +syn match sicadStatement "\"me=s+1 +syn match sicadStatement "\"me=s+1 + +" logical operators +syn match sicadOperator "\.and\." +syn match sicadOperator "\.ne\." +syn match sicadOperator "\.not\." +syn match sicadOperator "\.eq\." +syn match sicadOperator "\.ge\." +syn match sicadOperator "\.gt\." +syn match sicadOperator "\.le\." +syn match sicadOperator "\.lt\." +syn match sicadOperator "\.or\." +syn match sicadOperator "\.eqv\." +syn match sicadOperator "\.neqv\." + +" variable name +syn match sicadIdentifier "%g\=[irpt][0-9]\{1,2}\>" +syn match sicadIdentifier "%g\=l[0-9]\>" +syn match sicadIdentifier "%g\=[irptl]("me=e-1 +syn match sicadIdentifier "%error\>" +syn match sicadIdentifier "%nsel\>" +syn match sicadIdentifier "%nvar\>" +syn match sicadIdentifier "%scl\>" +syn match sicadIdentifier "%wd\>" +syn match sicadIdentifier "\$[irt][0-9]\{1,2}\>" contained + +" label +syn match sicadLabel1 "^ *\.[a-z][a-z0-9]\{0,7} \+[^ ]"me=e-1 +syn match sicadLabel1 "^ *\.[a-z][a-z0-9]\{0,7}\*"me=e-1 +syn match sicadLabel2 "\" contains=sicadGoto +syn match sicadLabel2 "\" contains=sicadGoto + +" boolean +syn match sicadBoolean "\.[ft]\." +" integer without sign +syn match sicadNumber "\<[0-9]\+\>" +" floating point number, with dot, optional exponent +syn match sicadFloat "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=\>" +" floating point number, starting with a dot, optional exponent +syn match sicadFloat "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\>" +" floating point number, without dot, with exponent +syn match sicadFloat "\<[0-9]\+e[-+]\=[0-9]\+\>" + +" without this extraString definition a ' ; ' could stop the comment +syn region sicadString_ transparent start=+'+ end=+'+ oneline contained +" string +syn region sicadString start=+'+ end=+'+ oneline + +" comments - nasty ones in sicad + +" - ' * blabla' or ' * blabla;' +syn region sicadComment start="^ *\*" skip='\\ *$' end=";"me=e-1 end="$" contains=sicadString_ +" - ' .LABEL03 * blabla' or ' .LABEL03 * blabla;' +syn region sicadComment start="^ *\.[a-z][a-z0-9]\{0,7} *\*" skip='\\ *$' end=";"me=e-1 end="$" contains=sicadLabel1,sicadString_ +" - '; * blabla' or '; * blabla;' +syn region sicadComment start="; *\*"ms=s+1 skip='\\ *$' end=";"me=e-1 end="$" contains=sicadString_ +" - comments between docbeg and docend +syn region sicadComment matchgroup=sicadStatement start="\" end="\" + +" catch \ at the end of line +syn match sicadLineCont "\\ *$" + +" parameters in dop block - for the time being it is not used +"syn match sicadParameter " [a-z][a-z0-9]*[=:]"me=e-1 contained +" dop block - for the time being it is not used +syn region sicadDopBlock transparent matchgroup=sicadStatement start='\' skip='\\ *$' end=';'me=e-1 end='$' contains=ALL + +" sql block - new highlighting mode is used (see syn include) +syn region sicadSqlBlock transparent matchgroup=sicadStatement start='\' skip='\\ *$' end=';'me=e-1 end='$' contains=@SQL,sicadIdentifier,sicadLineCont + +" synchronizing +syn sync clear " clear sync used in sql.vim +syn sync match sicadSyncComment groupthere NONE "\" +syn sync match sicadSyncComment grouphere sicadComment "\" +" next line must be examined too +syn sync linecont "\\ *$" + +" catch error caused by tabulator key +syn match sicadError "\t" +" catch errors caused by wrong parenthesis +"syn region sicadParen transparent start='(' end=')' contains=ALLBUT,sicadParenError +syn region sicadParen transparent start='(' skip='\\ *$' end=')' end='$' contains=ALLBUT,sicadParenError +syn match sicadParenError ')' +"syn region sicadApostrophe transparent start=+'+ end=+'+ contains=ALLBUT,sicadApostropheError +"syn match sicadApostropheError +'+ +" not closed apostrophe +"syn region sicadError start=+'+ end=+$+ contains=ALLBUT,sicadApostropheError +"syn match sicadApostropheError +'[^']*$+me=s+1 contained + +" SICAD keywords +syn keyword sicadStatement abst add addsim adrin aib +syn keyword sicadStatement aibzsn aidump aifgeo aisbrk alknam +syn keyword sicadStatement alknr alksav alksel alktrc alopen +syn keyword sicadStatement ansbo aractiv ararea arareao ararsfs +syn keyword sicadStatement arbuffer archeck arcomv arcont arconv +syn keyword sicadStatement arcopy arcopyo arcorr arcreate arerror +syn keyword sicadStatement areval arflfm arflop arfrast argbkey +syn keyword sicadStatement argenf argraph argrapho arinters arkompfl +syn keyword sicadStatement arlasso arlcopy arlgraph arline arlining +syn keyword sicadStatement arlisly armakea armemo arnext aroverl +syn keyword sicadStatement arovers arparkmd arpars arrefp arselect +syn keyword sicadStatement arset arstruct arunify arupdate arvector +syn keyword sicadStatement arveinfl arvflfl arvoroni ausku basis +syn keyword sicadStatement basisaus basisdar basisnr bebos befl +syn keyword sicadStatement befla befli befls beo beorta +syn keyword sicadStatement beortn bep bepan bepap bepola +syn keyword sicadStatement bepoln bepsn bepsp ber berili +syn keyword sicadStatement berk bewz bkl bli bma +syn keyword sicadStatement bmakt bmakts bmbm bmerk bmerw +syn keyword sicadStatement bmerws bminit bmk bmorth bmos +syn keyword sicadStatement bmoss bmpar bmsl bmsum bmsums +syn keyword sicadStatement bmver bmvero bmw bo bta +syn keyword sicadStatement buffer bvl bw bza bzap +syn keyword sicadStatement bzd bzgera bzorth cat catel +syn keyword sicadStatement cdbdiff ce cgmparam close closesim +syn keyword sicadStatement comgener comp comp conclose conclose coninfo +syn keyword sicadStatement conopen conread contour conwrite cop +syn keyword sicadStatement copar coparp coparp2 copel cr +syn keyword sicadStatement cs cstat cursor d da +syn keyword sicadStatement dal dasp dasps dataout dcol +syn keyword sicadStatement dd defsr del delel deskrdef +syn keyword sicadStatement df dfn dfns dfpos dfr +syn keyword sicadStatement dgd dgm dgp dgr dh +syn keyword sicadStatement diag diaus dir disbsd dkl +syn keyword sicadStatement dktx dkur dlgfix dlgfre dma +syn keyword sicadStatement dprio dr druse dsel dskinfo +syn keyword sicadStatement dsr dv dve eba ebd +syn keyword sicadStatement ebdmod ebs edbsdbin edbssnin edbsvtin +syn keyword sicadStatement edt egaus egdef egdefs eglist +syn keyword sicadStatement egloe egloenp egloes egxx eib +syn keyword sicadStatement ekur ekuradd elel elpos epg +syn keyword sicadStatement esau esauadd esek eta etap +syn keyword sicadStatement etav feparam ficonv filse fl +syn keyword sicadStatement fli flin flini flinit flins +syn keyword sicadStatement flkor fln flnli flop flout +syn keyword sicadStatement flowert flparam flraster flsy flsyd +syn keyword sicadStatement flsym flsyms flsymt fmtatt fmtdia +syn keyword sicadStatement fmtlib fpg gbadddb gbaim gbanrs +syn keyword sicadStatement gbatw gbau gbaudit gbclosp gbcredic +syn keyword sicadStatement gbcreem gbcreld gbcresdb gbcretd gbde +syn keyword sicadStatement gbdeldb gbdeldic gbdelem gbdelld gbdelref +syn keyword sicadStatement gbdeltd gbdisdb gbdisem gbdisld gbdistd +syn keyword sicadStatement gbebn gbemau gbepsv gbgetdet gbgetes +syn keyword sicadStatement gbgetmas gbgqel gbgqelr gbgqsa gbgrant +syn keyword sicadStatement gbimpdic gbler gblerb gblerf gbles +syn keyword sicadStatement gblocdic gbmgmg gbmntdb gbmoddb gbnam +syn keyword sicadStatement gbneu gbopenp gbpoly gbpos gbpruef +syn keyword sicadStatement gbpruefg gbps gbqgel gbqgsa gbrefdic +syn keyword sicadStatement gbreftab gbreldic gbresem gbrevoke gbsav +syn keyword sicadStatement gbsbef gbsddk gbsicu gbsrt gbss +syn keyword sicadStatement gbstat gbsysp gbszau gbubp gbueb +syn keyword sicadStatement gbunmdb gbuseem gbw gbweg gbwieh +syn keyword sicadStatement gbzt gelp gera getvar hgw +syn keyword sicadStatement hpg hr0 hra hrar icclchan +syn keyword sicadStatement iccrecon icdescon icfree icgetcon icgtresp +syn keyword sicadStatement icopchan icputcon icreacon icreqd icreqnw +syn keyword sicadStatement icreqw icrespd icresrve icwricon imsget +syn keyword sicadStatement imsgqel imsmget imsplot imsprint inchk +syn keyword sicadStatement inf infd inst kbml kbmls +syn keyword sicadStatement kbmm kbmms kbmt kbmtdps kbmts +syn keyword sicadStatement khboe khbol khdob khe khetap +syn keyword sicadStatement khfrw khktk khlang khld khmfrp +syn keyword sicadStatement khmks khms khpd khpfeil khpl +syn keyword sicadStatement khprofil khrand khsa khsabs khsaph +syn keyword sicadStatement khsd khsdl khse khskbz khsna +syn keyword sicadStatement khsnum khsob khspos khsvph khtrn +syn keyword sicadStatement khver khzpe khzpl kib kldat +syn keyword sicadStatement klleg klsch klsym klvert kmpg +syn keyword sicadStatement kmtlage kmtp kmtps kodef kodefp +syn keyword sicadStatement kodefs kok kokp kolae kom +syn keyword sicadStatement kontly kopar koparp kopg kosy +syn keyword sicadStatement kp kr krsek krtclose krtopen +syn keyword sicadStatement ktk lad lae laesel language +syn keyword sicadStatement lasso lbdes lcs ldesk ldesks +syn keyword sicadStatement le leak leattdes leba lebas +syn keyword sicadStatement lebaznp lebd lebm lebv lebvaus +syn keyword sicadStatement lebvlist lede ledel ledepo ledepol +syn keyword sicadStatement ledepos leder ledist ledm lee +syn keyword sicadStatement leeins lees lege lekr lekrend +syn keyword sicadStatement lekwa lekwas lel lelh lell +syn keyword sicadStatement lelp lem lena lend lenm +syn keyword sicadStatement lep lepe lepee lepko lepl +syn keyword sicadStatement lepmko lepmkop lepos leposm leqs +syn keyword sicadStatement leqsl leqssp leqsv leqsvov les +syn keyword sicadStatement lesch lesr less lestd let +syn keyword sicadStatement letaum letl lev levm levtm +syn keyword sicadStatement levtp levtr lew lewm lexx +syn keyword sicadStatement lfs li lining lldes lmode +syn keyword sicadStatement loedk loepkt lop lose loses +syn keyword sicadStatement lp lppg lppruef lr ls +syn keyword sicadStatement lsop lsta lstat ly lyaus +syn keyword sicadStatement lz lza lzae lzbz lze +syn keyword sicadStatement lznr lzo lzpos ma ma0 +syn keyword sicadStatement ma1 mad map mapoly mcarp +syn keyword sicadStatement mccfr mccgr mcclr mccrf mcdf +syn keyword sicadStatement mcdma mcdr mcdrp mcdve mcebd +syn keyword sicadStatement mcgse mcinfo mcldrp md me +syn keyword sicadStatement mefd mefds minmax mipg ml +syn keyword sicadStatement mmcmdme mmdbf mmdellb mmdir mmdome +syn keyword sicadStatement mmfsb mminfolb mmlapp mmlbf mmlistlb +syn keyword sicadStatement mmloadcm mmmsg mmreadlb mmsetlb mmshowcm +syn keyword sicadStatement mmstatme mnp mpo mr mra +syn keyword sicadStatement ms msav msgout msgsnd msp +syn keyword sicadStatement mspf mtd nasel ncomp new +syn keyword sicadStatement nlist nlistlt nlistly nlistnp nlistpo +syn keyword sicadStatement np npa npdes npe npem +syn keyword sicadStatement npinfa npruef npsat npss npssa +syn keyword sicadStatement ntz oa oan odel odf +syn keyword sicadStatement odfx oj oja ojaddsk ojaed +syn keyword sicadStatement ojaeds ojaef ojaefs ojaen ojak +syn keyword sicadStatement ojaks ojakt ojakz ojalm ojatkis +syn keyword sicadStatement ojatt ojatw ojbsel ojcasel ojckon +syn keyword sicadStatement ojde ojdtl ojeb ojebd ojel +syn keyword sicadStatement ojelpas ojesb ojesbd ojex ojezge +syn keyword sicadStatement ojko ojlb ojloe ojlsb ojmerk +syn keyword sicadStatement ojmos ojnam ojpda ojpoly ojprae +syn keyword sicadStatement ojs ojsak ojsort ojstrukt ojsub +syn keyword sicadStatement ojtdef ojvek ojx old oldd +syn keyword sicadStatement op opa opa1 open opensim +syn keyword sicadStatement opnbsd orth osanz ot otp +syn keyword sicadStatement otrefp param paranf pas passw +syn keyword sicadStatement pcatchf pda pdadd pg pg0 +syn keyword sicadStatement pgauf pgaufsel pgb pgko pgm +syn keyword sicadStatement pgr pgvs pily pkpg plot +syn keyword sicadStatement plotf plotfr pmap pmdata pmdi +syn keyword sicadStatement pmdp pmeb pmep pminfo pmlb +syn keyword sicadStatement pmli pmlp pmmod pnrver poa +syn keyword sicadStatement pos posa posaus post printfr +syn keyword sicadStatement protect prs prssy prsym ps +syn keyword sicadStatement psadd psclose psopen psparam psprw +syn keyword sicadStatement psres psstat psw pswr qualif +syn keyword sicadStatement rahmen raster rasterd rbbackup rbchang2 +syn keyword sicadStatement rbchange rbcmd rbcoldst rbcolor rbcopy +syn keyword sicadStatement rbcut rbcut2 rbdbcl rbdbload rbdbop +syn keyword sicadStatement rbdbwin rbdefs rbedit rbfdel rbfill +syn keyword sicadStatement rbfill2 rbfload rbfload2 rbfnew rbfnew2 +syn keyword sicadStatement rbfpar rbfree rbg rbgetcol rbgetdst +syn keyword sicadStatement rbinfo rbpaste rbpixel rbrstore rbsnap +syn keyword sicadStatement rbsta rbtile rbtrpix rbvtor rcol +syn keyword sicadStatement rd rdchange re reb rebmod +syn keyword sicadStatement refunc ren renel rk rkpos +syn keyword sicadStatement rohr rohrpos rpr rr rr0 +syn keyword sicadStatement rra rrar rs samtosdb sav +syn keyword sicadStatement savd savesim savx scol scopy +syn keyword sicadStatement scopye sdbtosam sddk sdwr se +syn keyword sicadStatement selaus selpos seman semi sesch +syn keyword sicadStatement setscl setvar sfclntpf sfconn sffetchf +syn keyword sicadStatement sffpropi sfftypi sfqugeoc sfquwhcl sfself +syn keyword sicadStatement sfstat sftest sge sid sie +syn keyword sicadStatement sig sigp skk skks sn +syn keyword sicadStatement sn21 snpa snpar snparp snparps +syn keyword sicadStatement snpars snpas snpd snpi snpkor +syn keyword sicadStatement snpl snpm sob sob0 sobloe +syn keyword sicadStatement sobs sof sop split spr +syn keyword sicadStatement sqdadd sqdlad sqdold sqdsav +syn keyword sicadStatement sr sres srt sset stat +syn keyword sicadStatement stdtxt string strukt strupru suinfl +syn keyword sicadStatement suinflk suinfls supo supo1 sva +syn keyword sicadStatement svr sy sya syly sysout +syn keyword sicadStatement syu syux taa tabeg tabl +syn keyword sicadStatement tabm tam tanr tapg tapos +syn keyword sicadStatement tarkd tas tase tb tbadd +syn keyword sicadStatement tbd tbext tbget tbint tbout +syn keyword sicadStatement tbput tbsat tbsel tbstr tcaux +syn keyword sicadStatement tccable tcchkrep tccomm tccond tcdbg +syn keyword sicadStatement tcgbnr tcgrpos tcinit tclconv tcmodel +syn keyword sicadStatement tcnwe tcpairs tcpath tcrect tcrmdli +syn keyword sicadStatement tcscheme tcschmap tcse tcselc tcstar +syn keyword sicadStatement tcstrman tcsubnet tcsymbol tctable tcthrcab +syn keyword sicadStatement tctrans tctst tdb tdbdel tdbget +syn keyword sicadStatement tdblist tdbput tgmod titel tmoff +syn keyword sicadStatement tmon tp tpa tps tpta +syn keyword sicadStatement tra trans transkdo transopt transpro +syn keyword sicadStatement triangle trm trpg trrkd trs +syn keyword sicadStatement ts tsa tx txa txchk +syn keyword sicadStatement txcng txju txl txp txpv +syn keyword sicadStatement txtcmp txv txz uckon uiinfo +syn keyword sicadStatement uistatus umdk umdk1 umdka umge +syn keyword sicadStatement umges umr verbo verflli verif +syn keyword sicadStatement verly versinfo vfg vpactive vpcenter +syn keyword sicadStatement vpcreate vpdelete vpinfo vpmodify vpscroll +syn keyword sicadStatement vpsta wabsym wzmerk zdrhf zdrhfn +syn keyword sicadStatement zdrhfw zdrhfwn zefp zfl zflaus +syn keyword sicadStatement zka zlel zlels zortf zortfn +syn keyword sicadStatement zortfw zortfwn zortp zortpn zparb +syn keyword sicadStatement zparbn zparf zparfn zparfw zparfwn +syn keyword sicadStatement zparp zparpn zwinkp zwinkpn + +" 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_sicad_syntax_inits") + + if version < 508 + let did_sicad_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink sicadLabel PreProc + HiLink sicadLabel1 sicadLabel + HiLink sicadLabel2 sicadLabel + HiLink sicadConditional Conditional + HiLink sicadBoolean Boolean + HiLink sicadNumber Number + HiLink sicadFloat Float + HiLink sicadOperator Operator + HiLink sicadStatement Statement + HiLink sicadParameter sicadStatement + HiLink sicadGoto sicadStatement + HiLink sicadLineCont sicadStatement + HiLink sicadString String + HiLink sicadComment Comment + HiLink sicadSpecial Special + HiLink sicadIdentifier Type +" HiLink sicadIdentifier Identifier + HiLink sicadError Error + HiLink sicadParenError sicadError + HiLink sicadApostropheError sicadError + HiLink sicadStringError sicadError + HiLink sicadCommentError sicadError +" HiLink sqlStatement Special " modified highlight group in sql.vim + + delcommand HiLink + +endif + +let b:current_syntax = "sicad" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/sieve.vim b/vim/bundle/ubuntu-vim72/syntax/sieve.vim new file mode 100644 index 0000000..4bb4417 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sieve.vim @@ -0,0 +1,55 @@ +" Vim syntax file +" Language: Sieve filtering language input file +" Maintainer: Nikolai Weibull +" Latest Revision: 2007-10-25 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword sieveTodo contained TODO FIXME XXX NOTE + +syn region sieveComment start='/\*' end='\*/' contains=sieveTodo,@Spell +syn region sieveComment display oneline start='#' end='$' + \ contains=sieveTodo,@Spell + +syn case ignore + +syn match sieveTag display ':\h\w*' + +syn match sieveNumber display '\<\d\+[KMG]\=\>' + +syn match sieveSpecial display '\\["\\]' + +syn region sieveString start=+"+ skip=+\\\\\|\\"+ end=+"+ + \ contains=sieveSpecial +syn region sieveString start='text:' end='\n.\n' + +syn keyword sieveConditional if elsif else +syn keyword sieveTest address allof anyof envelope exists false header + \ not size true +syn keyword sievePreProc require stop +syn keyword sieveAction reject fileinto redirect keep discard +syn keyword sieveKeyword vacation + +syn case match + +hi def link sieveTodo Todo +hi def link sieveComment Comment +hi def link sieveTag Type +hi def link sieveNumber Number +hi def link sieveSpecial Special +hi def link sieveString String +hi def link sieveConditional Conditional +hi def link sieveTest Keyword +hi def link sievePreProc PreProc +hi def link sieveAction Function +hi def link sieveKeyword Keyword + +let b:current_syntax = "sieve" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/simula.vim b/vim/bundle/ubuntu-vim72/syntax/simula.vim new file mode 100644 index 0000000..e952ee2 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/simula.vim @@ -0,0 +1,99 @@ +" Vim syntax file +" Language: Simula +" Maintainer: Haakon Riiser +" URL: http://folk.uio.no/hakonrk/vim/syntax/simula.vim +" Last Change: 2001 May 15 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +" No case sensitivity in Simula +syn case ignore + +syn match simulaComment "^%.*$" contains=simulaTodo +syn region simulaComment start="!\|\" end=";" contains=simulaTodo + +" Text between the keyword 'end' and either a semicolon or one of the +" keywords 'end', 'else', 'when' or 'otherwise' is also a comment +syn region simulaComment start="\"lc=3 matchgroup=Statement end=";\|\<\(end\|else\|when\|otherwise\)\>" + +syn match simulaCharError "'.\{-2,}'" +syn match simulaCharacter "'.'" +syn match simulaCharacter "'!\d\{-}!'" contains=simulaSpecialChar +syn match simulaString '".\{-}"' contains=simulaSpecialChar,simulaTodo + +syn keyword simulaBoolean true false +syn keyword simulaCompound begin end +syn keyword simulaConditional else if otherwise then until when +syn keyword simulaConstant none notext +syn keyword simulaFunction procedure +syn keyword simulaOperator eq eqv ge gt imp in is le lt ne new not qua +syn keyword simulaRepeat while for +syn keyword simulaReserved activate after at before delay go goto label prior reactivate switch to +syn keyword simulaStatement do inner inspect step this +syn keyword simulaStorageClass external hidden name protected value +syn keyword simulaStructure class +syn keyword simulaType array boolean character integer long real short text virtual +syn match simulaAssigned "\<\h\w*\s*\((.*)\)\=\s*:\(=\|-\)"me=e-2 +syn match simulaOperator "[&:=<>+\-*/]" +syn match simulaOperator "\" +syn match simulaOperator "\" +syn match simulaReferenceType "\" +" Real with optional exponent +syn match simulaReal "-\=\<\d\+\(\.\d\+\)\=\(&&\=[+-]\=\d\+\)\=\>" +" Real starting with a `.', optional exponent +syn match simulaReal "-\=\.\d\+\(&&\=[+-]\=\d\+\)\=\>" + +if version >= 508 || !exists("did_simula_syntax_inits") + if version < 508 + let did_simula_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink simulaAssigned Identifier + HiLink simulaBoolean Boolean + HiLink simulaCharacter Character + HiLink simulaCharError Error + HiLink simulaComment Comment + HiLink simulaCompound Statement + HiLink simulaConditional Conditional + HiLink simulaConstant Constant + HiLink simulaFunction Function + HiLink simulaNumber Number + HiLink simulaOperator Operator + HiLink simulaReal Float + HiLink simulaReferenceType Type + HiLink simulaRepeat Repeat + HiLink simulaReserved Error + HiLink simulaSemicolon Statement + HiLink simulaSpecial Special + HiLink simulaSpecialChar SpecialChar + HiLink simulaSpecialCharErr Error + HiLink simulaStatement Statement + HiLink simulaStorageClass StorageClass + HiLink simulaString String + HiLink simulaStructure Structure + HiLink simulaTodo Todo + HiLink simulaType Type + + delcommand HiLink +endif + +let b:current_syntax = "simula" +" vim: sts=4 sw=4 ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/sinda.vim b/vim/bundle/ubuntu-vim72/syntax/sinda.vim new file mode 100644 index 0000000..2bde267 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sinda.vim @@ -0,0 +1,146 @@ +" Vim syntax file +" Language: sinda85, sinda/fluint input file +" Maintainer: Adrian Nagle, anagle@ball.com +" Last Change: 2003 May 11 +" Filenames: *.sin +" URL: http://www.naglenet.org/vim/syntax/sinda.vim +" MAIN URL: http://www.naglenet.org/vim/ + + + +" 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 + + + +" Ignore case +syn case ignore + + + +" +" +" Begin syntax definitions for sinda input and output files. +" + +" Force free-form fortran format +let fortran_free_source=1 + +" Load FORTRAN syntax file +if version < 600 + source :p:h/fortran.vim +else + runtime! syntax/fortran.vim +endif +unlet b:current_syntax + + + +" Define keywords for SINDA +syn keyword sindaMacro BUILD BUILDF DEBON DEBOFF DEFMOD FSTART FSTOP + +syn keyword sindaOptions TITLE PPSAVE RSI RSO OUTPUT SAVE QMAP USER1 USER2 +syn keyword sindaOptions MODEL PPOUT NOLIST MLINE NODEBUG DIRECTORIES +syn keyword sindaOptions DOUBLEPR + +syn keyword sindaRoutine FORWRD FWDBCK STDSTL FASTIC + +syn keyword sindaControl ABSZRO ACCELX ACCELY ACCELZ ARLXCA ATMPCA +syn keyword sindaControl BACKUP CSGFAC DRLXCA DTIMEH DTIMEI DTIMEL +syn keyword sindaControl DTIMES DTMPCA EBALNA EBALSA EXTLIM ITEROT +syn keyword sindaControl ITERXT ITHOLD NLOOPS NLOOPT OUTPUT OPEITR +syn keyword sindaControl PATMOS SIGMA TIMEO TIMEND UID + +syn keyword sindaSubRoutine ASKERS ADARIN ADDARY ADDMOD ARINDV +syn keyword sindaSubRoutine RYINV ARYMPY ARYSUB ARYTRN BAROC +syn keyword sindaSubRoutine BELACC BNDDRV BNDGET CHENNB CHGFLD +syn keyword sindaSubRoutine CHGLMP CHGSUC CHGVOL CHKCHL CHKCHP +syn keyword sindaSubRoutine CNSTAB COMBAL COMPLQ COMPRS CONTRN +syn keyword sindaSubRoutine CPRINT CRASH CRVINT CRYTRN CSIFLX +syn keyword sindaSubRoutine CVTEMP D11CYL C11DAI D11DIM D11MCY +syn keyword sindaSubRoutine D11MDA D11MDI D11MDT D12CYL D12MCY +syn keyword sindaSubRoutine D12MDA D1D1DA D1D1IM D1D1WM D1D2DA +syn keyword sindaSubRoutine D1D2WM D1DEG1 D1DEG2 D1DG1I D1IMD1 +syn keyword sindaSubRoutine D1IMIM D1IMWM D1M1DA D1M2MD D1M2WM +syn keyword sindaSubRoutine D1MDG1 D1MDG2 D2D1WM D1DEG1 D2DEG2 +syn keyword sindaSubRoutine D2D2 + +syn keyword sindaIdentifier BIV CAL DIM DIV DPM DPV DTV GEN PER PIV PIM +syn keyword sindaIdentifier SIM SIV SPM SPV TVS TVD + + + +" Define matches for SINDA +syn match sindaFortran "^F[0-9 ]"me=e-1 +syn match sindaMotran "^M[0-9 ]"me=e-1 + +syn match sindaComment "^C.*$" +syn match sindaComment "^R.*$" +syn match sindaComment "\$.*$" + +syn match sindaHeader "^header[^,]*" + +syn match sindaIncludeFile "include \+[^ ]\+"hs=s+8 contains=fortranInclude + +syn match sindaMacro "^PSTART" +syn match sindaMacro "^PSTOP" +syn match sindaMacro "^FAC" + +syn match sindaInteger "-\=\<[0-9]*\>" +syn match sindaFloat "-\=\<[0-9]*\.[0-9]*" +syn match sindaScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" + +syn match sindaEndData "^END OF DATA" + +if exists("thermal_todo") + execute 'syn match sindaTodo ' . '"^'.thermal_todo.'.*$"' +else + syn match sindaTodo "^?.*$" +endif + + + +" 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_sinda_syntax_inits") + if version < 508 + let did_sinda_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink sindaMacro Macro + HiLink sindaOptions Special + HiLink sindaRoutine Type + HiLink sindaControl Special + HiLink sindaSubRoutine Function + HiLink sindaIdentifier Identifier + + HiLink sindaFortran PreProc + HiLink sindaMotran PreProc + + HiLink sindaComment Comment + HiLink sindaHeader Typedef + HiLink sindaIncludeFile Type + HiLink sindaInteger Number + HiLink sindaFloat Float + HiLink sindaScientific Float + + HiLink sindaEndData Macro + + HiLink sindaTodo Todo + + delcommand HiLink +endif + + +let b:current_syntax = "sinda" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/sindacmp.vim b/vim/bundle/ubuntu-vim72/syntax/sindacmp.vim new file mode 100644 index 0000000..87b4834 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sindacmp.vim @@ -0,0 +1,74 @@ +" Vim syntax file +" Language: sinda85, sinda/fluint compare file +" Maintainer: Adrian Nagle, anagle@ball.com +" Last Change: 2003 May 11 +" Filenames: *.cmp +" URL: http://www.naglenet.org/vim/syntax/sindacmp.vim +" MAIN URL: http://www.naglenet.org/vim/ + + + +" 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 + + + +" Ignore case +syn case ignore + + + +" +" Begin syntax definitions for compare files. +" + +" Define keywords for sinda compare (sincomp) +syn keyword sindacmpUnit celsius fahrenheit + + + +" Define matches for sinda compare (sincomp) +syn match sindacmpTitle "Steady State Temperature Comparison" + +syn match sindacmpLabel "File [1-6] is" + +syn match sindacmpHeader "^ *Node\( *File \d\)* *Node Description" + +syn match sindacmpInteger "^ *-\=\<[0-9]*\>" +syn match sindacmpFloat "-\=\<[0-9]*\.[0-9]*" + + + +" 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_sindacmp_syntax_inits") + if version < 508 + let did_sindacmp_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink sindacmpTitle Type + HiLink sindacmpUnit PreProc + + HiLink sindacmpLabel Statement + + HiLink sindacmpHeader sindaHeader + + HiLink sindacmpInteger Number + HiLink sindacmpFloat Special + + delcommand HiLink +endif + + +let b:current_syntax = "sindacmp" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/sindaout.vim b/vim/bundle/ubuntu-vim72/syntax/sindaout.vim new file mode 100644 index 0000000..b557e01 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sindaout.vim @@ -0,0 +1,100 @@ +" Vim syntax file +" Language: sinda85, sinda/fluint output file +" Maintainer: Adrian Nagle, anagle@ball.com +" Last Change: 2003 May 11 +" Filenames: *.out +" URL: http://www.naglenet.org/vim/syntax/sindaout.vim +" MAIN URL: http://www.naglenet.org/vim/ + + + +" 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 + + + +" Ignore case +syn case match + + + +" Load SINDA syntax file +if version < 600 + source :p:h/sinda.vim +else + runtime! syntax/sinda.vim +endif +unlet b:current_syntax + + + +" +" +" Begin syntax definitions for sinda output files. +" + +" Define keywords for sinda output +syn case match + +syn keyword sindaoutPos ON SI +syn keyword sindaoutNeg OFF ENG + + + +" Define matches for sinda output +syn match sindaoutFile ": \w*\.TAK"hs=s+2 + +syn match sindaoutInteger "T\=[0-9]*\>"ms=s+1 + +syn match sindaoutSectionDelim "[-<>]\{4,}" contains=sindaoutSectionTitle +syn match sindaoutSectionDelim ":\=\.\{4,}:\=" contains=sindaoutSectionTitle +syn match sindaoutSectionTitle "[-<:] \w[0-9A-Za-z_() ]\+ [->:]"hs=s+1,me=e-1 + +syn match sindaoutHeaderDelim "=\{5,}" +syn match sindaoutHeaderDelim "|\{5,}" +syn match sindaoutHeaderDelim "+\{5,}" + +syn match sindaoutLabel "Input File:" contains=sindaoutFile +syn match sindaoutLabel "Begin Solution: Routine" + +syn match sindaoutError "<<< Error >>>" + + +" 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_sindaout_syntax_inits") + if version < 508 + let did_sindaout_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + hi sindaHeaderDelim ctermfg=Black ctermbg=Green guifg=Black guibg=Green + + HiLink sindaoutPos Statement + HiLink sindaoutNeg PreProc + HiLink sindaoutTitle Type + HiLink sindaoutFile sindaIncludeFile + HiLink sindaoutInteger sindaInteger + + HiLink sindaoutSectionDelim Delimiter + HiLink sindaoutSectionTitle Exception + HiLink sindaoutHeaderDelim SpecialComment + HiLink sindaoutLabel Identifier + + HiLink sindaoutError Error + + delcommand HiLink +endif + + +let b:current_syntax = "sindaout" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/sisu.vim b/vim/bundle/ubuntu-vim72/syntax/sisu.vim new file mode 100644 index 0000000..c7cdf2d --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sisu.vim @@ -0,0 +1,194 @@ +"SiSU Vim syntax file +"SiSU Maintainer: Ralph Amissah +"SiSU Markup: SiSU (sisu-0.69.0, 2008-09-16) +"(originally looked at Ruby Vim by Mirko Nasato) + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +else +endif + +" Errors: +syn match sisu_error contains=sisu_link,sisu_error_wspace "" + +" Markers Identifiers: +if !exists("sisu_no_identifiers") + syn match sisu_mark_endnote "\~^" + syn match sisu_contain contains=@NoSpell "" + syn match sisu_break contains=@NoSpell "
\|
" + syn match sisu_control contains=@NoSpell "

\|

\|

\|<:p[bn]>" + syn match sisu_html "

\|
" + syn match sisu_marktail "[~-]#" + syn match sisu_html contains=@NoSpell "
\|\|
\|
" + syn match sisu_control "\"" + syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)" + syn match sisu_number contains=@NoSpell "[0-9a-f]\{32\}\|[0-9a-f]\{64\}" + syn match sisu_link contains=@NoSpell "\(_\?https\?://\|\.\.\/\)\S\+" + "metaverse specific + syn match sisu_ocn contains=@NoSpell "<\~\d\+;\w\d\+;\w\d\+>" + syn match sisu_marktail "<\~#>" + syn match sisu_markpara contains=@NoSpell "<:i[1-9]>" + syn match sisu_link " \*\~\S\+" + syn match sisu_action "^<:insert\d\+>" + syn match sisu_require contains=@NoSpell "^<<\s*[a-zA-Z0-9^._-]\+\.ss[it]$" + syn match sisu_require contains=@NoSpell "^<<{[a-zA-Z0-9^._-]\+\.ss[it]}$" + syn match sisu_contain "<:e>" + syn match sisu_sem_marker ";{\|};[a-z._]*[a-z]" + syn match sisu_sem_marker_block "\([a-z][a-z._]*\|\):{\|}:[a-z._]*[a-z]" + syn match sisu_sem_ex_marker ";\[\|\];[a-z._]*[a-z]" + syn match sisu_sem_ex_marker_block "\([a-z][a-z._]*\|\):\[\|\]:[a-z._]*[a-z]" + syn match sisu_sem_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):{[^}].\{-}}:\1" + syn match sisu_sem_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";{[^}].\{-}};[a-z]\+" + syn match sisu_sem_ex_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):\[[^}].\{-}\]:\1" + syn match sisu_sem_ex_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";\[[^}].\{-}\];[a-z]\+" +endif + +"URLs Numbers And ASCII Codes: +syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>" +syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)" + +"Tuned Error: (is error if not already matched) +syn match sisu_error contains=sisu_error "[\~/\*!_]{\|}[\~/\*!_]" +syn match sisu_error contains=sisu_error "]" + +"Simple Paired Enclosed Markup: +"url/link +syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$" +"header +syn region sisu_header_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="^0\~\(\S\+\|[^-]\)" end="\n$" +syn region sisu_header_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="^[@%]\S\+:[+-]\?\s"rs=e-1 end="\n$" +"headings +syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-8]\|:\?[A-C]\)\~\(\S\+\|[^-]\)" end="$" +"grouped text +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table" +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n\n" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\(alt\|group\|poem\){" end="^}\(alt\|group\|poem\)" +syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="^code{" end="^}code" +"endnotes +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n" +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n" +syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n\n" +"links and images +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="}\(https\?:/\/\|\.\./\)\S\+" oneline +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="\[[1-5][sS]*\]}\S\+\.ss[tm]" oneline +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline +"some line operations +syn region sisu_control contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_control start="\(\(^\| \)!_ \|<:b>\)" end="$" +syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$" +syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$" +syn region sisu_comment matchgroup=sisu_comment start="^%\{1,2\} " end="$" +"font face curly brackets +"syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_sem start="\S\+:{" end="}:[^<>,.!?:; ]\+" oneline +syn region sisu_index matchgroup=sisu_index_block start="^={" end="}" +syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*" +syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!" +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="_{" end="}_" +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="/{" end="}/" +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," +syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" +syn region sisu_html contains=sisu_error contains=sisu_strikeout matchgroup=sisu_contain start="" end="" oneline +"single words bold italicise etc. "workon +syn region sisu_control contains=sisu_error matchgroup=sisu_control start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline +syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline +"misc +syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline +"metaverse html (flagged as errors for filetype sisu) +syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="" end="" skip="\n" oneline +syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="" end="" skip="\n" oneline +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="" end="" skip="\n" oneline +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="" end="" skip="\n" oneline +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="" end="" skip="\\\\\|\\'" oneline +syn region sisu_identifier contains=sisu_error matchgroup=sisu_html start="" end="" oneline +"metaverse +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="<:Table.\{-}>" end="<:Table[-_]end>" +syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="<:code>" end="<:code[-_]end>" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="<:alt>" end="<:alt[-_]end>" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="<:poem>" end="<:poem[-_]end>" + +"Expensive Mode: +if !exists("sisu_no_expensive") +else " not Expensive + syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline +endif " Expensive? + +"Headers And Headings: (Document Instructions) +syn match sisu_control contains=sisu_error,sisu_error_wspace "4\~! \S\+" +syn region sisu_markpara contains=sisu_error,sisu_error_wspace start="^=begin" end="^=end.*$" + +"Errors: +syn match sisu_error_wspace contains=sisu_error_wspace "^\s\+" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\s\+" +syn match sisu_error_wspace contains=sisu_error_wspace " \s*$" +syn match sisu_error contains=sisu_error_wspace "\t\+" +syn match sisu_error contains=sisu_error,sisu_error_wspace "\([^ (][_\\]\||[^ (}]\)https\?:\S\+" +syn match sisu_error contains=sisu_error "_\?https\?:\S\+[}><]" +syn match sisu_error contains=sisu_error "\([!*/_\+,^]\){\([^(\}\1)]\)\{-}\n\n" +syn match sisu_error contains=sisu_error "^[\~]{[^{]\{-}\n\n" +syn match sisu_error contains=sisu_error "\s\+.{{" +syn match sisu_error contains=sisu_error "^\~\s*$" +syn match sisu_error contains=sisu_error "^[0-9]\~\s*$" +syn match sisu_error contains=sisu_error "^[0-9]\~\S\+\s*$" +syn match sisu_error contains=sisu_error "[^{]\~\^[^ \)]" +syn match sisu_error contains=sisu_error "\~\^\s\+\.\s*" +syn match sisu_error contains=sisu_error "{\~^\S\+" +syn match sisu_error contains=sisu_error "[_/\*!^]{[ .,:;?><]*}[_/\*!^]" +syn match sisu_error contains=sisu_error "[^ (\"'(\[][_/\*!]{\|}[_/\*!][a-zA-Z0-9)\]\"']" +syn match sisu_error contains=sisu_error "" +"errors for filetype sisu, though not error in 'metaverse': +syn match sisu_error contains=sisu_error,sisu_match,sisu_strikeout,sisu_contain,sisu_content_alt,sisu_mark,sisu_break,sisu_number "<[a-zA-Z\/]\+>" +syn match sisu_error "/\?<\([biu]\)>[^()]\{-}\n\n" + +"Error Exceptions: +syn match sisu_control "\n\n" "contains=ALL +syn match sisu_control " //" +syn match sisu_error "%{" +syn match sisu_error "
_\?https\?:\S\+\|_\?https\?:\S\+
" +syn match sisu_error "[><]_\?https\?:\S\+\|_\?https\?:\S\+[><]" + +"Definitions Default Highlighting: +hi def link sisu_normal Normal +hi def link sisu_header PreProc +hi def link sisu_header_content Statement +hi def link sisu_heading Title +hi def link sisu_structure Operator +hi def link sisu_contain Include +hi def link sisu_mark_endnote Include +hi def link sisu_require NonText +hi def link sisu_link NonText +hi def link sisu_linked String +hi def link sisu_fontface Include +hi def link sisu_strikeout DiffDelete +hi def link sisu_content_alt Special +hi def link sisu_sem_content SpecialKey +hi def link sisu_sem_block Special +hi def link sisu_sem_marker Visual +"hi def link sisu_sem_marker Structure +hi def link sisu_sem_marker_block MatchParen +hi def link sisu_sem_ex_marker FoldColumn +hi def link sisu_sem_ex_marker_block Folded +hi def link sisu_sem_ex_content Comment +"hi def link sisu_sem_ex_content SpecialKey +hi def link sisu_sem_ex_block Comment +hi def link sisu_index SpecialKey +hi def link sisu_index_block Visual +hi def link sisu_content_endnote Special +hi def link sisu_control Define +hi def link sisu_ocn Include +hi def link sisu_number Number +hi def link sisu_identifier Function +hi def link sisu_underline Underlined +hi def link sisu_markpara Include +hi def link sisu_marktail Include +hi def link sisu_mark Identifier +hi def link sisu_break Structure +hi def link sisu_html Type +hi def link sisu_action Identifier +hi def link sisu_comment Comment +hi def link sisu_error_sem_marker Error +hi def link sisu_error_wspace Error +hi def link sisu_error Error +let b:current_syntax = "sisu" diff --git a/vim/bundle/ubuntu-vim72/syntax/skill.vim b/vim/bundle/ubuntu-vim72/syntax/skill.vim new file mode 100644 index 0000000..8b96044 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/skill.vim @@ -0,0 +1,562 @@ +" Vim syntax file +" Language: SKILL +" Maintainer: Toby Schaffer +" Last Change: 2003 May 11 +" Comments: SKILL is a Lisp-like programming language for use in EDA +" tools from Cadence Design Systems. It allows you to have +" a programming environment within the Cadence environment +" that gives you access to the complete tool set and design +" database. This file also defines syntax highlighting for +" certain Design Framework II interface functions. + +" 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 keyword skillConstants t nil unbound + +" enumerate all the SKILL reserved words/functions +syn match skillFunction "(abs\>"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillKeywords "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillConditional "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillConditional "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillKeywords "\"hs=s+1 +syn match skillKeywords "\"hs=s+1 +syn match skillKeywords "\"hs=s+1 +syn match skillKeywords "\"hs=s+1 +syn match skillKeywords "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillKeywords "\"hs=s+1 +syn match skillKeywords "\"hs=s+1 +syn match skillKeywords "\"hs=s+1 +syn match skillKeywords "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillRepeat "\"hs=s+1 +syn match skillFunction "\<[fs]\=printf("he=e-1 +syn match skillFunction "(f\=scanf\>"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillRepeat "\"hs=s+1 +syn match skillConditional "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillKeywords "\"hs=s+1 +syn match skillKeywords "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillKeywords "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillKeywords "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillKeywords "\<[mn]\=procedure("he=e-1 +syn match skillFunction "(ncon[cs]\>"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillKeywords "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillKeywords "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillConditional "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillConditional "\"hs=s+1 +syn match skillRepeat "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillFunction "\"hs=s+1 +syn match skillcdfFunctions "\"hs=s+1 +syn match skillgeFunctions "\"hs=s+1 +syn match skillhiFunctions "\"hs=s+1 +syn match skillleFunctions "\"hs=s+1 +syn match skilldbefFunctions "\"hs=s+1 +syn match skillddFunctions "\"hs=s+1 +syn match skillpcFunctions "\"hs=s+1 +syn match skilltechFunctions "\<\(tech\|tc\)\u\a\+("he=e-1 + +" strings +syn region skillString start=+"+ skip=+\\"+ end=+"+ + +syn keyword skillTodo contained TODO FIXME XXX +syn keyword skillNote contained NOTE IMPORTANT + +" comments are either C-style or begin with a semicolon +syn region skillComment start="/\*" end="\*/" contains=skillTodo,skillNote +syn match skillComment ";.*" contains=skillTodo,skillNote +syn match skillCommentError "\*/" + +syn sync ccomment skillComment minlines=10 + +" 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_skill_syntax_inits") + if version < 508 + let did_skill_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink skillcdfFunctions Function + HiLink skillgeFunctions Function + HiLink skillhiFunctions Function + HiLink skillleFunctions Function + HiLink skilldbefFunctions Function + HiLink skillddFunctions Function + HiLink skillpcFunctions Function + HiLink skilltechFunctions Function + HiLink skillConstants Constant + HiLink skillFunction Function + HiLink skillKeywords Statement + HiLink skillConditional Conditional + HiLink skillRepeat Repeat + HiLink skillString String + HiLink skillTodo Todo + HiLink skillNote Todo + HiLink skillComment Comment + HiLink skillCommentError Error + + delcommand HiLink +endif + +let b:current_syntax = "skill" + +" vim: ts=4 diff --git a/vim/bundle/ubuntu-vim72/syntax/sl.vim b/vim/bundle/ubuntu-vim72/syntax/sl.vim new file mode 100644 index 0000000..fa3bca0 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sl.vim @@ -0,0 +1,120 @@ +" Vim syntax file +" Language: Renderman shader language +" Maintainer: Dan Piponi +" Last Change: 2001 May 09 + +" 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 Renderman keywords including special +" RenderMan control structures +syn keyword slStatement break return continue +syn keyword slConditional if else +syn keyword slRepeat while for +syn keyword slRepeat illuminance illuminate solar + +syn keyword slTodo contained TODO FIXME XXX + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match slSpecial contained "\\[0-9][0-9][0-9]\|\\." +syn region slString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=slSpecial +syn match slCharacter "'[^\\]'" +syn match slSpecialCharacter "'\\.'" +syn match slSpecialCharacter "'\\[0-9][0-9]'" +syn match slSpecialCharacter "'\\[0-9][0-9][0-9]'" + +"catch errors caused by wrong parenthesis +syn region slParen transparent start='(' end=')' contains=ALLBUT,slParenError,slIncluded,slSpecial,slTodo,slUserLabel +syn match slParenError ")" +syn match slInParen contained "[{}]" + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match slNumber "\<[0-9]\+\(u\=l\=\|lu\|f\)\>" +"floating point number, with dot, optional exponent +syn match slFloat "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=[fl]\=\>" +"floating point number, starting with a dot, optional exponent +syn match slFloat "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match slFloat "\<[0-9]\+e[-+]\=[0-9]\+[fl]\=\>" +"hex number +syn match slNumber "\<0x[0-9a-f]\+\(u\=l\=\|lu\)\>" +"syn match slIdentifier "\<[a-z_][a-z0-9_]*\>" +syn case match + +if exists("sl_comment_strings") + " A comment can contain slString, slCharacter and slNumber. + " But a "*/" inside a slString in a slComment DOES end the comment! So we + " need to use a special type of slString: slCommentString, which also ends on + " "*/", and sees a "*" at the start of the line as comment again. + " Unfortunately this doesn't very well work for // type of comments :-( + syntax match slCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region slCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=slSpecial,slCommentSkip + syntax region slComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=slSpecial + syntax region slComment start="/\*" end="\*/" contains=slTodo,slCommentString,slCharacter,slNumber +else + syn region slComment start="/\*" end="\*/" contains=slTodo +endif +syntax match slCommentError "\*/" + +syn keyword slOperator sizeof +syn keyword slType float point color string vector normal matrix void +syn keyword slStorageClass varying uniform extern +syn keyword slStorageClass light surface volume displacement transformation imager +syn keyword slVariable Cs Os P dPdu dPdv N Ng u v du dv s t +syn keyword slVariable L Cl Ol E I ncomps time Ci Oi +syn keyword slVariable Ps alpha +syn keyword slVariable dtime dPdtime + +syn sync ccomment slComment minlines=10 + +" 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_sl_syntax_inits") + if version < 508 + let did_sl_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink slLabel Label + HiLink slUserLabel Label + HiLink slConditional Conditional + HiLink slRepeat Repeat + HiLink slCharacter Character + HiLink slSpecialCharacter slSpecial + HiLink slNumber Number + HiLink slFloat Float + HiLink slParenError slError + HiLink slInParen slError + HiLink slCommentError slError + HiLink slOperator Operator + HiLink slStorageClass StorageClass + HiLink slError Error + HiLink slStatement Statement + HiLink slType Type + HiLink slCommentError slError + HiLink slCommentString slString + HiLink slComment2String slString + HiLink slCommentSkip slComment + HiLink slString String + HiLink slComment Comment + HiLink slSpecial SpecialChar + HiLink slTodo Todo + HiLink slVariable Identifier + "HiLink slIdentifier Identifier + + delcommand HiLink +endif + +let b:current_syntax = "sl" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/slang.vim b/vim/bundle/ubuntu-vim72/syntax/slang.vim new file mode 100644 index 0000000..9fa89b4 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/slang.vim @@ -0,0 +1,102 @@ +" Vim syntax file +" Language: S-Lang +" Maintainer: Jan Hlavacek +" Last Change: 980216 + +" 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 keyword slangStatement break return continue EXECUTE_ERROR_BLOCK +syn match slangStatement "\" +syn keyword slangLabel case +syn keyword slangConditional !if if else switch +syn keyword slangRepeat while for _for loop do forever +syn keyword slangDefinition define typedef variable struct +syn keyword slangOperator or and andelse orelse shr shl xor not +syn keyword slangBlock EXIT_BLOCK ERROR_BLOCK +syn match slangBlock "\" +syn keyword slangConstant NULL +syn keyword slangType Integer_Type Double_Type Complex_Type String_Type Struct_Type Ref_Type Null_Type Array_Type DataType_Type + +syn match slangOctal "\<0\d\+\>" contains=slangOctalError +syn match slangOctalError "[89]\+" contained +syn match slangHex "\<0[xX][0-9A-Fa-f]*\>" +syn match slangDecimal "\<[1-9]\d*\>" +syn match slangFloat "\<\d\+\." +syn match slangFloat "\<\d\+\.\d\+\([Ee][-+]\=\d\+\)\=\>" +syn match slangFloat "\<\d\+\.[Ee][-+]\=\d\+\>" +syn match slangFloat "\<\d\+[Ee][-+]\=\d\+\>" +syn match slangFloat "\.\d\+\([Ee][-+]\=\d\+\)\=\>" +syn match slangImaginary "\.\d\+\([Ee][-+]\=\d*\)\=[ij]\>" +syn match slangImaginary "\<\d\+\(\.\d*\)\=\([Ee][-+]\=\d\+\)\=[ij]\>" + +syn region slangString oneline start='"' end='"' skip='\\"' +syn match slangCharacter "'[^\\]'" +syn match slangCharacter "'\\.'" +syn match slangCharacter "'\\[0-7]\{1,3}'" +syn match slangCharacter "'\\d\d\{1,3}'" +syn match slangCharacter "'\\x[0-7a-fA-F]\{1,2}'" + +syn match slangDelim "[][{};:,]" +syn match slangOperator "[-%+/&*=<>|!~^@]" + +"catch errors caused by wrong parenthesis +syn region slangParen matchgroup=slangDelim transparent start='(' end=')' contains=ALLBUT,slangParenError +syn match slangParenError ")" + +syn match slangComment "%.*$" +syn keyword slangOperator sizeof + +syn region slangPreCondit start="^\s*#\s*\(ifdef\>\|ifndef\>\|iftrue\>\|ifnfalse\>\|iffalse\>\|ifntrue\>\|if\$\|ifn\$\|\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=cComment,slangString,slangCharacter,slangNumber + +" 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_slang_syntax_inits") + if version < 508 + let did_slang_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink slangDefinition Type + HiLink slangBlock slangDefinition + HiLink slangLabel Label + HiLink slangConditional Conditional + HiLink slangRepeat Repeat + HiLink slangCharacter Character + HiLink slangFloat Float + HiLink slangImaginary Float + HiLink slangDecimal slangNumber + HiLink slangOctal slangNumber + HiLink slangHex slangNumber + HiLink slangNumber Number + HiLink slangParenError Error + HiLink slangOctalError Error + HiLink slangOperator Operator + HiLink slangStructure Structure + HiLink slangInclude Include + HiLink slangPreCondit PreCondit + HiLink slangError Error + HiLink slangStatement Statement + HiLink slangType Type + HiLink slangString String + HiLink slangConstant Constant + HiLink slangRangeArray slangConstant + HiLink slangComment Comment + HiLink slangSpecial SpecialChar + HiLink slangTodo Todo + HiLink slangDelim Delimiter + + delcommand HiLink +endif + +let b:current_syntax = "slang" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/slice.vim b/vim/bundle/ubuntu-vim72/syntax/slice.vim new file mode 100644 index 0000000..8a4d675 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/slice.vim @@ -0,0 +1,90 @@ +" Vim syntax file +" Language: Slice (ZeroC's Specification Language for Ice) +" Maintainer: Morel Bodin +" Last Change: 2005 Dec 03 + +" 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 + +" The Slice keywords + +syn keyword sliceType bool byte double float int long short string void +syn keyword sliceQualifier const extends idempotent implements local nonmutating out throws +syn keyword sliceConstruct class enum exception dictionary interface module LocalObject Object sequence struct +syn keyword sliceQualifier const extends idempotent implements local nonmutating out throws +syn keyword sliceBoolean false true + +" Include directives +syn match sliceIncluded display contained "<[^>]*>" +syn match sliceInclude display "^\s*#\s*include\>\s*["<]" contains=sliceIncluded + +" Double-include guards +syn region sliceGuard start="^#\(define\|ifndef\|endif\)" end="$" + +" Strings and characters +syn region sliceString start=+"+ end=+"+ + +" Numbers (shamelessly ripped from c.vim, only slightly modified) +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match sliceNumbers display transparent "\<\d\|\.\d" contains=sliceNumber,sliceFloat,sliceOctal +syn match sliceNumber display contained "\d\+" +"hex number +syn match sliceNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" +" Flag the first zero of an octal number as something special +syn match sliceOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=sliceOctalZero +syn match sliceOctalZero display contained "\<0" +syn match sliceFloat display contained "\d\+f" +"floating point number, with dot, optional exponent +syn match sliceFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" +"floating point number, starting with a dot, optional exponent +syn match sliceFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match sliceFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" +" flag an octal number with wrong digits +syn case match + + +" Comments +syn region sliceComment start="/\*" end="\*/" +syn match sliceComment "//.*" + +syn sync ccomment sliceComment + +" 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_slice_syn_inits") + if version < 508 + let did_slice_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink sliceComment Comment + HiLink sliceConstruct Keyword + HiLink sliceType Type + HiLink sliceString String + HiLink sliceIncluded String + HiLink sliceQualifier Keyword + HiLink sliceInclude Include + HiLink sliceGuard PreProc + HiLink sliceBoolean Boolean + HiLink sliceFloat Number + HiLink sliceNumber Number + HiLink sliceOctal Number + HiLink sliceOctalZero Special + HiLink sliceNumberError Special + + delcommand HiLink +endif + +let b:current_syntax = "slice" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/slpconf.vim b/vim/bundle/ubuntu-vim72/syntax/slpconf.vim new file mode 100644 index 0000000..9fe4503 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/slpconf.vim @@ -0,0 +1,273 @@ +" Vim syntax file +" Language: RFC 2614 - An API for Service Location configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword slpconfTodo contained TODO FIXME XXX NOTE + +syn region slpconfComment display oneline start='^[#;]' end='$' + \ contains=slpconfTodo,@Spell + +syn match slpconfBegin display '^' + \ nextgroup=slpconfTag, + \ slpconfComment skipwhite + +syn keyword slpconfTag contained net + \ nextgroup=slpconfNetTagDot + +syn match slpconfNetTagDot contained display '.' + \ nextgroup=slpconfNetTag + +syn keyword slpconfNetTag contained slp + \ nextgroup=slpconfNetSlpTagdot + +syn match slpconfNetSlpTagDot contained display '.' + \ nextgroup=slpconfNetSlpTag + +syn keyword slpconfNetSlpTag contained isDA traceDATraffic traceMsg + \ traceDrop traceReg isBroadcastOnly + \ passiveDADetection securityEnabled + \ nextgroup=slpconfBooleanEq,slpconfBooleanHome + \ skipwhite + +syn match slpconfBooleanHome contained display + \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}' + \ nextgroup=slpconfBooleanEq skipwhite + +syn match slpconfBooleanEq contained display '=' + \ nextgroup=slpconfBoolean skipwhite + +syn keyword slpconfBoolean contained true false TRUE FALSE + +syn keyword slpconfNetSlpTag contained DAHeartBeat multicastTTL + \ DAActiveDiscoveryInterval + \ multicastMaximumWait multicastTimeouts + \ randomWaitBound MTU maxResults + \ nextgroup=slpconfIntegerEq,slpconfIntegerHome + \ skipwhite + +syn match slpconfIntegerHome contained display + \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}' + \ nextgroup=slpconfIntegerEq skipwhite + +syn match slpconfIntegerEq contained display '=' + \ nextgroup=slpconfInteger skipwhite + +syn match slpconfInteger contained display '\<\d\+\>' + +syn keyword slpconfNetSlpTag contained DAAttributes SAAttributes + \ nextgroup=slpconfAttrEq,slpconfAttrHome + \ skipwhite + +syn match slpconfAttrHome contained display + \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}' + \ nextgroup=slpconfAttrEq skipwhite + +syn match slpconfAttrEq contained display '=' + \ nextgroup=slpconfAttrBegin skipwhite + +syn match slpconfAttrBegin contained display '(' + \ nextgroup=slpconfAttrTag skipwhite + +syn match slpconfAttrTag contained display + \ '[^* \t_(),\\!<=>~[:cntrl:]]\+' + \ nextgroup=slpconfAttrTagEq skipwhite + +syn match slpconfAttrTagEq contained display '=' + \ nextgroup=@slpconfAttrValue skipwhite + +syn cluster slpconfAttrValueCon contains=slpconfAttrValueSep,slpconfAttrEnd + +syn cluster slpconfAttrValue contains=slpconfAttrIValue,slpconfAttrSValue, + \ slpconfAttrBValue,slpconfAttrSSValue + +syn match slpconfAttrSValue contained display '[^ (),\\!<=>~[:cntrl:]]\+' + \ nextgroup=@slpconfAttrValueCon skipwhite + +syn match slpconfAttrSSValue contained display '\\FF\%(\\\x\x\)\+' + \ nextgroup=@slpconfAttrValueCon skipwhite + +syn match slpconfAttrIValue contained display '[-]\=\d\+\>' + \ nextgroup=@slpconfAttrValueCon skipwhite + +syn keyword slpconfAttrBValue contained true false + \ nextgroup=@slpconfAttrValueCon skipwhite + +syn match slpconfAttrValueSep contained display ',' + \ nextgroup=@slpconfAttrValue skipwhite + +syn match slpconfAttrEnd contained display ')' + \ nextgroup=slpconfAttrSep skipwhite + +syn match slpconfAttrSep contained display ',' + \ nextgroup=slpconfAttrBegin skipwhite + +syn keyword slpconfNetSlpTag contained useScopes typeHint + \ nextgroup=slpconfStringsEq,slpconfStringsHome + \ skipwhite + +syn match slpconfStringsHome contained display + \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}' + \ nextgroup=slpconfStringsEq skipwhite + +syn match slpconfStringsEq contained display '=' + \ nextgroup=slpconfStrings skipwhite + +syn match slpconfStrings contained display + \ '\%([[:digit:][:alpha:]]\|[!-+./:-@[-`{-~-]\|\\\x\x\)\+' + \ nextgroup=slpconfStringsSep skipwhite + +syn match slpconfStringsSep contained display ',' + \ nextgroup=slpconfStrings skipwhite + +syn keyword slpconfNetSlpTag contained DAAddresses + \ nextgroup=slpconfAddressesEq,slpconfAddrsHome + \ skipwhite + +syn match slpconfAddrsHome contained display + \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}' + \ nextgroup=slpconfAddressesEq skipwhite + +syn match slpconfAddressesEq contained display '=' + \ nextgroup=@slpconfAddresses skipwhite + +syn cluster slpconfAddresses contains=slpconfFQDNs,slpconfHostnumbers + +syn match slpconfFQDNs contained display + \ '\a[[:alnum:]-]*[[:alnum:]]\|\a' + \ nextgroup=slpconfAddressesSep skipwhite + +syn match slpconfHostnumbers contained display + \ '\d\{1,3}\%(\.\d\{1,3}\)\{3}' + \ nextgroup=slpconfAddressesSep skipwhite + +syn match slpconfAddressesSep contained display ',' + \ nextgroup=@slpconfAddresses skipwhite + +syn keyword slpconfNetSlpTag contained serializedRegURL + \ nextgroup=slpconfStringEq,slpconfStringHome + \ skipwhite + +syn match slpconfStringHome contained display + \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}' + \ nextgroup=slpconfStringEq skipwhite + +syn match slpconfStringEq contained display '=' + \ nextgroup=slpconfString skipwhite + +syn match slpconfString contained display + \ '\%([!-+./:-@[-`{-~-]\|\\\x\x\)\+\|[[:digit:][:alpha:]]' + +syn keyword slpconfNetSlpTag contained multicastTimeouts DADiscoveryTimeouts + \ datagramTimeouts + \ nextgroup=slpconfIntegersEq, + \ slpconfIntegersHome skipwhite + +syn match slpconfIntegersHome contained display + \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}' + \ nextgroup=slpconfIntegersEq skipwhite + +syn match slpconfIntegersEq contained display '=' + \ nextgroup=slpconfIntegers skipwhite + +syn match slpconfIntegers contained display '\<\d\+\>' + \ nextgroup=slpconfIntegersSep skipwhite + +syn match slpconfIntegersSep contained display ',' + \ nextgroup=slpconfIntegers skipwhite + +syn keyword slpconfNetSlpTag contained interfaces + \ nextgroup=slpconfHostnumsEq, + \ slpconfHostnumsHome skipwhite + +syn match slpconfHostnumsHome contained display + \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}' + \ nextgroup=slpconfHostnumsEq skipwhite + +syn match slpconfHostnumsEq contained display '=' + \ nextgroup=slpconfOHostnumbers skipwhite + +syn match slpconfOHostnumbers contained display + \ '\d\{1,3}\%(\.\d\{1,3}\)\{3}' + \ nextgroup=slpconfHostnumsSep skipwhite + +syn match slpconfHostnumsSep contained display ',' + \ nextgroup=slpconfOHostnumbers skipwhite + +syn keyword slpconfNetSlpTag contained locale + \ nextgroup=slpconfLocaleEq,slpconfLocaleHome + \ skipwhite + +syn match slpconfLocaleHome contained display + \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}' + \ nextgroup=slpconfLocaleEq skipwhite + +syn match slpconfLocaleEq contained display '=' + \ nextgroup=slpconfLocale skipwhite + +syn match slpconfLocale contained display '\a\{1,8}\%(-\a\{1,8}\)\=' + +hi def link slpconfTodo Todo +hi def link slpconfComment Comment +hi def link slpconfTag Identifier +hi def link slpconfDelimiter Delimiter +hi def link slpconfNetTagDot slpconfDelimiter +hi def link slpconfNetTag slpconfTag +hi def link slpconfNetSlpTagDot slpconfNetTagDot +hi def link slpconfNetSlpTag slpconfTag +hi def link slpconfHome Special +hi def link slpconfBooleanHome slpconfHome +hi def link slpconfEq Operator +hi def link slpconfBooleanEq slpconfEq +hi def link slpconfBoolean Boolean +hi def link slpconfIntegerHome slpconfHome +hi def link slpconfIntegerEq slpconfEq +hi def link slpconfInteger Number +hi def link slpconfAttrHome slpconfHome +hi def link slpconfAttrEq slpconfEq +hi def link slpconfAttrBegin slpconfDelimiter +hi def link slpconfAttrTag slpconfTag +hi def link slpconfAttrTagEq slpconfEq +hi def link slpconfAttrIValue slpconfInteger +hi def link slpconfAttrSValue slpconfString +hi def link slpconfAttrBValue slpconfBoolean +hi def link slpconfAttrSSValue slpconfString +hi def link slpconfSeparator slpconfDelimiter +hi def link slpconfAttrValueSep slpconfSeparator +hi def link slpconfAttrEnd slpconfAttrBegin +hi def link slpconfAttrSep slpconfSeparator +hi def link slpconfStringsHome slpconfHome +hi def link slpconfStringsEq slpconfEq +hi def link slpconfStrings slpconfString +hi def link slpconfStringsSep slpconfSeparator +hi def link slpconfAddrsHome slpconfHome +hi def link slpconfAddressesEq slpconfEq +hi def link slpconfFQDNs String +hi def link slpconfHostnumbers Number +hi def link slpconfAddressesSep slpconfSeparator +hi def link slpconfStringHome slpconfHome +hi def link slpconfStringEq slpconfEq +hi def link slpconfString String +hi def link slpconfIntegersHome slpconfHome +hi def link slpconfIntegersEq slpconfEq +hi def link slpconfIntegers slpconfInteger +hi def link slpconfIntegersSep slpconfSeparator +hi def link slpconfHostnumsHome slpconfHome +hi def link slpconfHostnumsEq slpconfEq +hi def link slpconfOHostnumbers slpconfHostnumbers +hi def link slpconfHostnumsSep slpconfSeparator +hi def link slpconfLocaleHome slpconfHome +hi def link slpconfLocaleEq slpconfEq +hi def link slpconfLocale slpconfString + +let b:current_syntax = "slpconf" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/slpreg.vim b/vim/bundle/ubuntu-vim72/syntax/slpreg.vim new file mode 100644 index 0000000..f3c8a7f --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/slpreg.vim @@ -0,0 +1,122 @@ +" Vim syntax file +" Language: RFC 2614 - An API for Service Location registration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword slpregTodo contained TODO FIXME XXX NOTE + +syn region slpregComment display oneline start='^[#;]' end='$' + \ contains=slpregTodo,@Spell + +syn match slpregBegin display '^' + \ nextgroup=slpregServiceURL, + \ slpregComment + +syn match slpregServiceURL contained display 'service:' + \ nextgroup=slpregServiceType + +syn match slpregServiceType contained display '\a[[:alpha:][:digit:]+-]*\%(\.\a[[:alpha:][:digit:]+-]*\)\=\%(:\a[[:alpha:][:digit:]+-]*\)\=' + \ nextgroup=slpregServiceSAPCol + +syn match slpregServiceSAPCol contained display ':' + \ nextgroup=slpregSAP + +syn match slpregSAP contained '[^,]\+' + \ nextgroup=slpregLangSep +"syn match slpregSAP contained display '\%(//\%(\%([[:alpha:][:digit:]$-_.~!*\'(),+;&=]*@\)\=\%([[:alnum:]][[:alnum:]-]*[[:alnum:]]\|[[:alnum:]]\.\)*\%(\a[[:alnum:]-]*[[:alnum:]]\|\a\)\%(:\d\+\)\=\)\=\|/at/\%([[:alpha:][:digit:]$-_.~]\|\\\x\x\)\{1,31}:\%([[:alpha:][:digit:]$-_.~]\|\\\x\x\)\{1,31}\%([[:alpha:][:digit:]$-_.~]\|\\\x\x\)\{1,31}\|/ipx/\x\{8}:\x\{12}:\x\{4}\)\%(/\%([[:alpha:][:digit:]$-_.~!*\'()+;?:@&=+]\|\\\x\x\)*\)*\%(;[^()\\!<=>~[:cntrl:]* \t_]\+\%(=[^()\\!<=>~[:cntrl:] ]\+\)\=\)*' + +syn match slpregLangSep contained display ',' + \ nextgroup=slpregLang + +syn match slpregLang contained display '\a\{1,8}\%(-\a\{1,8\}\)\=' + \ nextgroup=slpregLTimeSep + +syn match slpregLTimeSep contained display ',' + \ nextgroup=slpregLTime + +syn match slpregLTime contained display '\d\{1,5}' + \ nextgroup=slpregType,slpregUNewline + +syn match slpregType contained display '\a[[:alpha:][:digit:]+-]*' + \ nextgroup=slpregUNewLine + +syn match slpregUNewLine contained '\s*\n' + \ nextgroup=slpregScopes,slpregAttrList skipnl + +syn keyword slpregScopes contained scopes + \ nextgroup=slpregScopesEq + +syn match slpregScopesEq contained '=' nextgroup=slpregScopeName + +syn match slpregScopeName contained '[^(),\\!<=>[:cntrl:];*+ ]\+' + \ nextgroup=slpregScopeNameSep, + \ slpregScopeNewline + +syn match slpregScopeNameSep contained ',' + \ nextgroup=slpregScopeName + +syn match slpregScopeNewline contained '\s*\n' + \ nextgroup=slpregAttribute skipnl + +syn match slpregAttribute contained '[^(),\\!<=>[:cntrl:]* \t_]\+' + \ nextgroup=slpregAttributeEq, + \ slpregScopeNewline + +syn match slpregAttributeEq contained '=' + \ nextgroup=@slpregAttrValue + +syn cluster slpregAttrValueCon contains=slpregAttribute,slpregAttrValueSep + +syn cluster slpregAttrValue contains=slpregAttrIValue,slpregAttrSValue, + \ slpregAttrBValue,slpregAttrSSValue + +syn match slpregAttrSValue contained display '[^(),\\!<=>~[:cntrl:]]\+' + \ nextgroup=@slpregAttrValueCon skipwhite skipnl + +syn match slpregAttrSSValue contained display '\\FF\%(\\\x\x\)\+' + \ nextgroup=@slpregAttrValueCon skipwhite skipnl + +syn match slpregAttrIValue contained display '[-]\=\d\+\>' + \ nextgroup=@slpregAttrValueCon skipwhite skipnl + +syn keyword slpregAttrBValue contained true false + \ nextgroup=@slpregAttrValueCon skipwhite skipnl + +syn match slpregAttrValueSep contained display ',' + \ nextgroup=@slpregAttrValue skipwhite skipnl + +hi def link slpregTodo Todo +hi def link slpregComment Comment +hi def link slpregServiceURL Type +hi def link slpregServiceType slpregServiceURL +hi def link slpregServiceSAPCol slpregServiceURL +hi def link slpregSAP slpregServiceURL +hi def link slpregDelimiter Delimiter +hi def link slpregLangSep slpregDelimiter +hi def link slpregLang String +hi def link slpregLTimeSep slpregDelimiter +hi def link slpregLTime Number +hi def link slpregType Type +hi def link slpregScopes Identifier +hi def link slpregScopesEq Operator +hi def link slpregScopeName String +hi def link slpregScopeNameSep slpregDelimiter +hi def link slpregAttribute Identifier +hi def link slpregAttributeEq Operator +hi def link slpregAttrSValue String +hi def link slpregAttrSSValue slpregAttrSValue +hi def link slpregAttrIValue Number +hi def link slpregAttrBValue Boolean +hi def link slpregAttrValueSep slpregDelimiter + +let b:current_syntax = "slpreg" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/slpspi.vim b/vim/bundle/ubuntu-vim72/syntax/slpspi.vim new file mode 100644 index 0000000..8507e3d --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/slpspi.vim @@ -0,0 +1,39 @@ +" Vim syntax file +" Language: RFC 2614 - An API for Service Location SPI file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword slpspiTodo contained TODO FIXME XXX NOTE + +syn region slpspiComment display oneline start='^[#;]' end='$' + \ contains=slpspiTodo,@Spell + +syn match slpspiBegin display '^' + \ nextgroup=slpspiKeyType, + \ slpspiComment skipwhite + +syn keyword slpspiKeyType contained PRIVATE PUBLIC + \ nextgroup=slpspiString skipwhite + +syn match slpspiString contained '\S\+' + \ nextgroup=slpspiKeyFile skipwhite + +syn match slpspiKeyFile contained '\S\+' + +hi def link slpspiTodo Todo +hi def link slpspiComment Comment +hi def link slpspiKeyType Type +hi def link slpspiString Identifier +hi def link slpspiKeyFile String + +let b:current_syntax = "slpspi" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/slrnrc.vim b/vim/bundle/ubuntu-vim72/syntax/slrnrc.vim new file mode 100644 index 0000000..038b62e --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/slrnrc.vim @@ -0,0 +1,194 @@ +" Vim syntax file +" Language: Slrn setup file (based on slrn 0.9.8.1) +" Maintainer: Preben 'Peppe' Guldberg +" Last Change: 23 April 2006 + +" 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 keyword slrnrcTodo contained Todo + +" In some places whitespace is illegal +syn match slrnrcSpaceError contained "\s" + +syn match slrnrcNumber contained "-\=\<\d\+\>" +syn match slrnrcNumber contained +'[^']\+'+ + +syn match slrnrcSpecKey contained +\(\\[er"']\|\^[^'"]\|\\\o\o\o\)+ + +syn match slrnrcKey contained "\S\+" contains=slrnrcSpecKey +syn region slrnrcKey contained start=+"+ skip=+\\"+ end=+"+ oneline contains=slrnrcSpecKey +syn region slrnrcKey contained start=+'+ skip=+\\'+ end=+'+ oneline contains=slrnrcSpecKey + +syn match slrnrcSpecChar contained +'+ +syn match slrnrcSpecChar contained +\\[n"]+ +syn match slrnrcSpecChar contained "%[dfmnrs%]" + +syn match slrnrcString contained /[^ \t%"']\+/ contains=slrnrcSpecChar +syn region slrnrcString contained start=+"+ skip=+\\"+ end=+"+ oneline contains=slrnrcSpecChar + +syn match slrnSlangPreCondit "^#\s*ifn\=\(def\>\|false\>\|true\>\|\$\)" +syn match slrnSlangPreCondit "^#\s*e\(lif\|lse\|ndif\)\>" + +syn match slrnrcComment "%.*$" contains=slrnrcTodo + +syn keyword slrnrcVarInt contained abort_unmodified_edits article_window_page_overlap auto_mark_article_as_read beep broken_xref broken_xref cc_followup check_new_groups +syn keyword slrnrcVarInt contained color_by_score confirm_actions custom_sort_by_threads display_cursor_bar drop_bogus_groups editor_uses_mime_charset emphasized_text_mask +syn keyword slrnrcVarInt contained emphasized_text_mode fold_headers fold_headers followup_strip_signature force_authentication force_authentication generate_date_header +syn keyword slrnrcVarInt contained generate_email_from generate_email_from generate_message_id grouplens_port hide_pgpsignature hide_quotes hide_signature +syn keyword slrnrcVarInt contained hide_verbatim_marks hide_verbatim_text highlight_unread_subjects highlight_urls ignore_signature kill_score lines_per_update +syn keyword slrnrcVarInt contained mail_editor_is_mua max_low_score max_queued_groups min_high_score mouse netiquette_warnings new_subject_breaks_threads no_autosave +syn keyword slrnrcVarInt contained no_backups prefer_head process_verbatim_marks query_next_article query_next_group query_read_group_cutoff read_active reject_long_lines +syn keyword slrnrcVarInt contained scroll_by_page show_article show_thread_subject simulate_graphic_chars smart_quote sorting_method spoiler_char spoiler_char +syn keyword slrnrcVarInt contained spoiler_display_mode spoiler_display_mode spool_check_up_on_nov spool_check_up_on_nov uncollapse_threads unsubscribe_new_groups use_blink +syn keyword slrnrcVarInt contained use_color use_flow_control use_grouplens use_grouplens use_header_numbers use_inews use_inews use_localtime use_metamail use_mime use_mime +syn keyword slrnrcVarInt contained use_recommended_msg_id use_slrnpull use_slrnpull use_tilde use_tmpdir use_uudeview use_uudeview warn_followup_to wrap_flags wrap_method +syn keyword slrnrcVarInt contained write_newsrc_flags + +" Listed for removal +syn keyword slrnrcVarInt contained author_display display_author_realname display_score group_dsc_start_column process_verbatum_marks prompt_next_group query_reconnect +syn keyword slrnrcVarInt contained show_descriptions use_xgtitle + +" Match as a "string" too +syn region slrnrcVarIntStr contained matchgroup=slrnrcVarInt start=+"+ end=+"+ oneline contains=slrnrcVarInt,slrnrcSpaceError + +syn keyword slrnrcVarStr contained Xbrowser art_help_line art_status_line cansecret_file cc_post_string charset custom_headers custom_sort_order decode_directory +syn keyword slrnrcVarStr contained editor_command failed_posts_file followup_custom_headers followup_date_format followup_string followupto_string group_help_line +syn keyword slrnrcVarStr contained group_status_line grouplens_host grouplens_pseudoname header_help_line header_status_line hostname inews_program macro_directory +syn keyword slrnrcVarStr contained mail_editor_command metamail_command mime_charset non_Xbrowser organization overview_date_format post_editor_command post_object +syn keyword slrnrcVarStr contained postpone_directory printer_name quote_string realname reply_custom_headers reply_string replyto save_directory save_posts save_replies +syn keyword slrnrcVarStr contained score_editor_command scorefile sendmail_command server_object signature signoff_string spool_active_file spool_activetimes_file +syn keyword slrnrcVarStr contained spool_inn_root spool_newsgroups_file spool_nov_file spool_nov_root spool_overviewfmt_file spool_root supersedes_custom_headers +syn keyword slrnrcVarStr contained top_status_line username + +" Listed for removal +syn keyword slrnrcVarStr contained followup cc_followup_string + +" Match as a "string" too +syn region slrnrcVarStrStr contained matchgroup=slrnrcVarStr start=+"+ end=+"+ oneline contains=slrnrcVarStr,slrnrcSpaceError + +" Various commands +syn region slrnrcCmdLine matchgroup=slrnrcCmd start="\<\(autobaud\|color\|compatible_charsets\|group_display_format\|grouplens_add\|header_display_format\|ignore_quotes\|include\|interpret\|mono\|nnrpaccess\|posting_host\|server\|set\|setkey\|strip_re_regexp\|strip_sig_regexp\|strip_was_regexp\|unsetkey\|visible_headers\)\>" end="$" oneline contains=slrnrc\(String\|Comment\) + +" Listed for removal +syn region slrnrcCmdLine matchgroup=slrnrcCmd start="\<\(cc_followup_string\|decode_directory\|editor_command\|followup\|hostname\|organization\|quote_string\|realname\|replyto\|scorefile\|signature\|username\)\>" end="$" oneline contains=slrnrc\(String\|Comment\) + +" Setting variables +syn keyword slrnrcSet contained set +syn match slrnrcSetStr "^\s*set\s\+\S\+" skipwhite nextgroup=slrnrcString contains=slrnrcSet,slrnrcVarStr\(Str\)\= +syn match slrnrcSetInt contained "^\s*set\s\+\S\+" contains=slrnrcSet,slrnrcVarInt\(Str\)\= +syn match slrnrcSetIntLine "^\s*set\s\+\S\+\s\+\(-\=\d\+\>\|'[^']\+'\)" contains=slrnrcSetInt,slrnrcNumber,slrnrcVarInt + +" Color definitions +syn match slrnrcColorObj contained "\" +syn keyword slrnrcColorObj contained article author boldtext box cursor date description error frame from_myself group grouplens_display header_name header_number headers +syn keyword slrnrcColorObj contained high_score italicstext menu menu_press message neg_score normal pgpsignature pos_score quotes response_char selection signature status +syn keyword slrnrcColorObj contained subject thread_number tilde tree underlinetext unread_subject url verbatim + +" Listed for removal +syn keyword slrnrcColorObj contained verbatum + +syn region slrnrcColorObjStr contained matchgroup=slrnrcColorObj start=+"+ end=+"+ oneline contains=slrnrcColorObj,slrnrcSpaceError +syn keyword slrnrcColorVal contained default +syn keyword slrnrcColorVal contained black blue brightblue brightcyan brightgreen brightmagenta brightred brown cyan gray green lightgray magenta red white yellow +syn region slrnrcColorValStr contained matchgroup=slrnrcColorVal start=+"+ end=+"+ oneline contains=slrnrcColorVal,slrnrcSpaceError +" Mathcing a function with three arguments +syn keyword slrnrcColor contained color +syn match slrnrcColorInit contained "^\s*color\s\+\S\+" skipwhite nextgroup=slrnrcColorVal\(Str\)\= contains=slrnrcColor\(Obj\|ObjStr\)\= +syn match slrnrcColorLine "^\s*color\s\+\S\+\s\+\S\+" skipwhite nextgroup=slrnrcColorVal\(Str\)\= contains=slrnrcColor\(Init\|Val\|ValStr\) + +" Mono settings +syn keyword slrnrcMonoVal contained blink bold none reverse underline +syn region slrnrcMonoValStr contained matchgroup=slrnrcMonoVal start=+"+ end=+"+ oneline contains=slrnrcMonoVal,slrnrcSpaceError +" Color object is inherited +" Mono needs at least one argument +syn keyword slrnrcMono contained mono +syn match slrnrcMonoInit contained "^\s*mono\s\+\S\+" contains=slrnrcMono,slrnrcColorObj\(Str\)\= +syn match slrnrcMonoLine "^\s*mono\s\+\S\+\s\+\S.*" contains=slrnrcMono\(Init\|Val\|ValStr\),slrnrcComment + +" Functions in article mode +syn keyword slrnrcFunArt contained article_bob article_eob article_left article_line_down article_line_up article_page_down article_page_up article_right article_search +syn keyword slrnrcFunArt contained author_search_backward author_search_forward browse_url cancel catchup catchup_all create_score decode delete delete_thread digit_arg +syn keyword slrnrcFunArt contained enlarge_article_window evaluate_cmd exchange_mark expunge fast_quit followup forward forward_digest get_children_headers get_parent_header +syn keyword slrnrcFunArt contained goto_article goto_last_read grouplens_rate_article header_bob header_eob header_line_down header_line_up header_page_down header_page_up +syn keyword slrnrcFunArt contained help hide_article locate_article mark_spot next next_high_score next_same_subject pipe post post_postponed previous print quit redraw +syn keyword slrnrcFunArt contained repeat_last_key reply request save show_spoilers shrink_article_window skip_quotes skip_to_next_group skip_to_previous_group +syn keyword slrnrcFunArt contained subject_search_backward subject_search_forward supersede suspend tag_header toggle_collapse_threads toggle_header_formats +syn keyword slrnrcFunArt contained toggle_header_tag toggle_headers toggle_pgpsignature toggle_quotes toggle_rot13 toggle_signature toggle_sort toggle_verbatim_marks +syn keyword slrnrcFunArt contained toggle_verbatim_text uncatchup uncatchup_all undelete untag_headers view_scores wrap_article zoom_article_window + +" Listed for removal +syn keyword slrnrcFunArt contained art_bob art_eob art_xpunge article_linedn article_lineup article_pagedn article_pageup down enlarge_window goto_beginning goto_end left +syn keyword slrnrcFunArt contained locate_header_by_msgid pagedn pageup pipe_article prev print_article right scroll_dn scroll_up shrink_window skip_to_prev_group +syn keyword slrnrcFunArt contained toggle_show_author up + +" Functions in group mode +syn keyword slrnrcFunGroup contained add_group bob catchup digit_arg eob evaluate_cmd group_search group_search_backward group_search_forward help line_down line_up move_group +syn keyword slrnrcFunGroup contained page_down page_up post post_postponed quit redraw refresh_groups repeat_last_key save_newsrc select_group subscribe suspend +syn keyword slrnrcFunGroup contained toggle_group_formats toggle_hidden toggle_list_all toggle_scoring transpose_groups uncatchup unsubscribe + +" Listed for removal +syn keyword slrnrcFunGroup contained down group_bob group_eob pagedown pageup toggle_group_display uncatch_up up + +" Functions in readline mode (actually from slang's slrline.c) +syn keyword slrnrcFunRead contained bdel bol complete cycle del delbol delbow deleol down enter eol left quoted_insert right self_insert trim up + +" Binding keys +syn keyword slrnrcSetkeyObj contained article group readline +syn region slrnrcSetkeyObjStr contained matchgroup=slrnrcSetkeyObj start=+"+ end=+"+ oneline contains=slrnrcSetkeyObj +syn match slrnrcSetkeyArt contained '\("\=\)\\1\s\+\S\+' skipwhite nextgroup=slrnrcKey contains=slrnrcSetKeyObj\(Str\)\=,slrnrcFunArt +syn match slrnrcSetkeyGroup contained '\("\=\)\\1\s\+\S\+' skipwhite nextgroup=slrnrcKey contains=slrnrcSetKeyObj\(Str\)\=,slrnrcFunGroup +syn match slrnrcSetkeyRead contained '\("\=\)\\1\s\+\S\+' skipwhite nextgroup=slrnrcKey contains=slrnrcSetKeyObj\(Str\)\=,slrnrcFunRead +syn match slrnrcSetkey "^\s*setkey\>" skipwhite nextgroup=slrnrcSetkeyArt,slrnrcSetkeyGroup,slrnrcSetkeyRead + +" Unbinding keys +syn match slrnrcUnsetkey '^\s*unsetkey\s\+\("\)\=\(article\|group\|readline\)\>\1' skipwhite nextgroup=slrnrcKey contains=slrnrcSetkeyObj\(Str\)\= + +" 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_slrnrc_syntax_inits") + if version < 508 + let did_slrnrc_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink slrnrcTodo Todo + HiLink slrnrcSpaceError Error + HiLink slrnrcNumber Number + HiLink slrnrcSpecKey SpecialChar + HiLink slrnrcKey String + HiLink slrnrcSpecChar SpecialChar + HiLink slrnrcString String + HiLink slrnSlangPreCondit Special + HiLink slrnrcComment Comment + HiLink slrnrcVarInt Identifier + HiLink slrnrcVarStr Identifier + HiLink slrnrcCmd slrnrcSet + HiLink slrnrcSet Operator + HiLink slrnrcColor Keyword + HiLink slrnrcColorObj Identifier + HiLink slrnrcColorVal String + HiLink slrnrcMono Keyword + HiLink slrnrcMonoObj Identifier + HiLink slrnrcMonoVal String + HiLink slrnrcFunArt Macro + HiLink slrnrcFunGroup Macro + HiLink slrnrcFunRead Macro + HiLink slrnrcSetkeyObj Identifier + HiLink slrnrcSetkey Keyword + HiLink slrnrcUnsetkey slrnrcSetkey + + delcommand HiLink +endif + +let b:current_syntax = "slrnrc" + +"EOF vim: ts=8 noet tw=120 sw=8 sts=0 diff --git a/vim/bundle/ubuntu-vim72/syntax/slrnsc.vim b/vim/bundle/ubuntu-vim72/syntax/slrnsc.vim new file mode 100644 index 0000000..838af6a --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/slrnsc.vim @@ -0,0 +1,85 @@ +" Vim syntax file +" Language: Slrn score file (based on slrn 0.9.8.0) +" Maintainer: Preben 'Peppe' Guldberg +" Last Change: 8 Oct 2004 + +" 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 + +" characters in newsgroup names +if version < 600 + set isk=@,48-57,.,-,_,+ +else + setlocal isk=@,48-57,.,-,_,+ +endif + +syn match slrnscComment "%.*$" +syn match slrnscSectionCom ".].*"lc=2 + +syn match slrnscGroup contained "\(\k\|\*\)\+" +syn match slrnscNumber contained "\d\+" +syn match slrnscDate contained "\(\d\{1,2}[-/]\)\{2}\d\{4}" +syn match slrnscDelim contained ":" +syn match slrnscComma contained "," +syn match slrnscOper contained "\~" +syn match slrnscEsc contained "\\[ecC<>.]" +syn match slrnscEsc contained "[?^]" +syn match slrnscEsc contained "[^\\]$\s*$"lc=1 + +syn keyword slrnscInclude contained include +syn match slrnscIncludeLine "^\s*Include\s\+\S.*$" + +syn region slrnscSection matchgroup=slrnscSectionStd start="^\s*\[" end='\]' contains=slrnscGroup,slrnscComma,slrnscSectionCom +syn region slrnscSection matchgroup=slrnscSectionNot start="^\s*\[\~" end='\]' contains=slrnscGroup,slrnscCommas,slrnscSectionCom + +syn keyword slrnscItem contained Age Bytes Date Expires From Has-Body Lines Message-Id Newsgroup References Subject Xref + +syn match slrnscScoreItem contained "%.*$" skipempty nextgroup=slrnscScoreItem contains=slrnscComment +syn match slrnscScoreItem contained "^\s*Expires:\s*\(\d\{1,2}[-/]\)\{2}\d\{4}\s*$" skipempty nextgroup=slrnscScoreItem contains=slrnscItem,slrnscDelim,slrnscDate +syn match slrnscScoreItem contained "^\s*\~\=\(Age\|Bytes\|Has-Body\|Lines\):\s*\d\+\s*$" skipempty nextgroup=slrnscScoreItem contains=slrnscOper,slrnscItem,slrnscDelim,slrnscNumber +syn match slrnscScoreItemFill contained ".*$" skipempty nextgroup=slrnscScoreItem contains=slrnscEsc +syn match slrnscScoreItem contained "^\s*\~\=\(Date\|From\|Message-Id\|Newsgroup\|References\|Subject\|Xref\):" nextgroup=slrnscScoreItemFill contains=slrnscOper,slrnscItem,slrnscDelim +syn region slrnscScoreItem contained matchgroup=Special start="^\s*\~\={::\=" end="^\s*}" skipempty nextgroup=slrnscScoreItem contains=slrnscScoreItem + +syn keyword slrnscScore contained Score +syn match slrnscScoreIdent contained "%.*" +syn match slrnScoreLine "^\s*Score::\=\s\+=\=[-+]\=\d\+\s*\(%.*\)\=$" skipempty nextgroup=slrnscScoreItem contains=slrnscScore,slrnscDelim,slrnscOper,slrnscNumber,slrnscScoreIdent + +" 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_slrnsc_syntax_inits") + if version < 508 + let did_slrnsc_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink slrnscComment Comment + HiLink slrnscSectionCom slrnscComment + HiLink slrnscGroup String + HiLink slrnscNumber Number + HiLink slrnscDate Special + HiLink slrnscDelim Delimiter + HiLink slrnscComma SpecialChar + HiLink slrnscOper SpecialChar + HiLink slrnscEsc String + HiLink slrnscSectionStd Type + HiLink slrnscSectionNot Delimiter + HiLink slrnscItem Statement + HiLink slrnscScore Keyword + HiLink slrnscScoreIdent Identifier + HiLink slrnscInclude Keyword + + delcommand HiLink +endif + +let b:current_syntax = "slrnsc" + +"EOF vim: ts=8 noet tw=200 sw=8 sts=0 diff --git a/vim/bundle/ubuntu-vim72/syntax/sm.vim b/vim/bundle/ubuntu-vim72/syntax/sm.vim new file mode 100644 index 0000000..2f9e6d7 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sm.vim @@ -0,0 +1,96 @@ +" Vim syntax file +" Language: sendmail +" Maintainer: Dr. Charles E. Campbell, Jr. +" Last Change: Sep 06, 2005 +" Version: 4 +" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax + +" 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 + +" Comments +syn match smComment "^#.*$" contains=@Spell + +" Definitions, Classes, Files, Options, Precedence, Trusted Users, Mailers +syn match smDefine "^[CDF]." +syn match smDefine "^O[AaBcdDeFfgHiLmNoQqrSsTtuvxXyYzZ]" +syn match smDefine "^O\s"he=e-1 +syn match smDefine "^M[a-zA-Z0-9]\+,"he=e-1 +syn match smDefine "^T" nextgroup=smTrusted +syn match smDefine "^P" nextgroup=smMesg +syn match smTrusted "\S\+$" contained +syn match smMesg "\S*="he=e-1 contained nextgroup=smPrecedence +syn match smPrecedence "-\=[0-9]\+" contained + +" Header Format H?list-of-mailer-flags?name: format +syn match smHeaderSep contained "[?:]" +syn match smHeader "^H\(?[a-zA-Z]\+?\)\=[-a-zA-Z_]\+:" contains=smHeaderSep + +" Variables +syn match smVar "\$[a-z\.\|]" + +" Rulesets +syn match smRuleset "^S\d*" + +" Rewriting Rules +syn match smRewrite "^R" skipwhite nextgroup=smRewriteLhsToken,smRewriteLhsUser + +syn match smRewriteLhsUser contained "[^\t$]\+" skipwhite nextgroup=smRewriteLhsToken,smRewriteLhsSep +syn match smRewriteLhsToken contained "\(\$[-*+]\|\$[-=][A-Za-z]\|\$Y\)\+" skipwhite nextgroup=smRewriteLhsUser,smRewriteLhsSep + +syn match smRewriteLhsSep contained "\t\+" skipwhite nextgroup=smRewriteRhsToken,smRewriteRhsUser + +syn match smRewriteRhsUser contained "[^\t$]\+" skipwhite nextgroup=smRewriteRhsToken,smRewriteRhsSep +syn match smRewriteRhsToken contained "\(\$\d\|\$>\d\|\$#\|\$@\|\$:[-_a-zA-Z]\+\|\$[[\]]\|\$@\|\$:\|\$[A-Za-z]\)\+" skipwhite nextgroup=smRewriteRhsUser,smRewriteRhsSep + +syn match smRewriteRhsSep contained "\t\+" skipwhite nextgroup=smRewriteComment,smRewriteRhsSep +syn match smRewriteRhsSep contained "$" + +syn match smRewriteComment contained "[^\t$]*$" + +" Clauses +syn match smClauseError "\$\." +syn match smElse contained "\$|" +syn match smClauseCont contained "^\t" +syn region smClause matchgroup=Delimiter start="\$?." matchgroup=Delimiter end="\$\." contains=smElse,smClause,smVar,smClauseCont + +" 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_smil_syntax_inits") + if version < 508 + let did_smil_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink smClause Special + HiLink smClauseError Error + HiLink smComment Comment + HiLink smDefine Statement + HiLink smElse Delimiter + HiLink smHeader Statement + HiLink smHeaderSep String + HiLink smMesg Special + HiLink smPrecedence Number + HiLink smRewrite Statement + HiLink smRewriteComment Comment + HiLink smRewriteLhsToken String + HiLink smRewriteLhsUser Statement + HiLink smRewriteRhsToken String + HiLink smRuleset Preproc + HiLink smTrusted Special + HiLink smVar String + + delcommand HiLink +endif + +let b:current_syntax = "sm" + +" vim: ts=18 diff --git a/vim/bundle/ubuntu-vim72/syntax/smarty.vim b/vim/bundle/ubuntu-vim72/syntax/smarty.vim new file mode 100644 index 0000000..6dda366 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/smarty.vim @@ -0,0 +1,86 @@ +" Vim syntax file +" Language: Smarty Templates +" Maintainer: Manfred Stienstra manfred.stienstra@dwerg.net +" Last Change: Mon Nov 4 11:42:23 CET 2002 +" Filenames: *.tpl +" URL: http://www.dwerg.net/projects/vim/smarty.vim + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if !exists("main_syntax") + if version < 600 + syntax clear + elseif exists("b:current_syntax") + finish +endif + let main_syntax = 'smarty' +endif + +syn case ignore + +runtime! syntax/html.vim +"syn cluster htmlPreproc add=smartyUnZone + +syn match smartyBlock contained "[\[\]]" + +syn keyword smartyTagName capture config_load include include_php +syn keyword smartyTagName insert if elseif else ldelim rdelim literal +syn keyword smartyTagName php section sectionelse foreach foreachelse +syn keyword smartyTagName strip assign counter cycle debug eval fetch +syn keyword smartyTagName html_options html_select_date html_select_time +syn keyword smartyTagName math popup_init popup html_checkboxes html_image +syn keyword smartyTagName html_radios html_table mailto textformat + +syn keyword smartyModifier cat capitalize count_characters count_paragraphs +syn keyword smartyModifier count_sentences count_words date_format default +syn keyword smartyModifier escape indent lower nl2br regex_replace replace +syn keyword smartyModifier spacify string_format strip strip_tags truncate +syn keyword smartyModifier upper wordwrap + +syn keyword smartyInFunc neq eq + +syn keyword smartyProperty contained "file=" +syn keyword smartyProperty contained "loop=" +syn keyword smartyProperty contained "name=" +syn keyword smartyProperty contained "include=" +syn keyword smartyProperty contained "skip=" +syn keyword smartyProperty contained "section=" + +syn keyword smartyConstant "\$smarty" + +syn keyword smartyDot . + +syn region smartyZone matchgroup=Delimiter start="{" end="}" contains=smartyProperty, smartyString, smartyBlock, smartyTagName, smartyConstant, smartyInFunc, smartyModifier + +syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,smartyZone +syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,smartyZone + syn region htmlLink start="\_[^>]*\" end=""me=e-4 contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc,smartyZone + + +if version >= 508 || !exists("did_smarty_syn_inits") + if version < 508 + let did_smarty_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink smartyTagName Identifier + HiLink smartyProperty Constant + " if you want the text inside the braces to be colored, then + " remove the comment in from of the next statement + "HiLink smartyZone Include + HiLink smartyInFunc Function + HiLink smartyBlock Constant + HiLink smartyDot SpecialChar + HiLink smartyModifier Function + delcommand HiLink +endif + +let b:current_syntax = "smarty" + +if main_syntax == 'smarty' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/smcl.vim b/vim/bundle/ubuntu-vim72/syntax/smcl.vim new file mode 100644 index 0000000..d9afba6 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/smcl.vim @@ -0,0 +1,308 @@ +" smcl.vim -- Vim syntax file for smcl files. +" Language: SMCL -- Stata Markup and Control Language +" Maintainer: Jeff Pitblado +" Last Change: 26apr2006 +" Version: 1.1.2 + +" Log: +" 20mar2003 updated the match definition for cmdab +" 14apr2006 'syntax clear' only under version control +" check for 'b:current_syntax', removed 'did_smcl_syntax_inits' +" 26apr2006 changed 'stata_smcl' to 'smcl' + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syntax case match + +syn keyword smclCCLword current_date contained +syn keyword smclCCLword current_time contained +syn keyword smclCCLword rmsg_time contained +syn keyword smclCCLword stata_version contained +syn keyword smclCCLword version contained +syn keyword smclCCLword born_date contained +syn keyword smclCCLword flavor contained +syn keyword smclCCLword SE contained +syn keyword smclCCLword mode contained +syn keyword smclCCLword console contained +syn keyword smclCCLword os contained +syn keyword smclCCLword osdtl contained +syn keyword smclCCLword machine_type contained +syn keyword smclCCLword byteorder contained +syn keyword smclCCLword sysdir_stata contained +syn keyword smclCCLword sysdir_updates contained +syn keyword smclCCLword sysdir_base contained +syn keyword smclCCLword sysdir_site contained +syn keyword smclCCLword sysdir_plus contained +syn keyword smclCCLword sysdir_personal contained +syn keyword smclCCLword sysdir_oldplace contained +syn keyword smclCCLword adopath contained +syn keyword smclCCLword pwd contained +syn keyword smclCCLword dirsep contained +syn keyword smclCCLword max_N_theory contained +syn keyword smclCCLword max_N_current contained +syn keyword smclCCLword max_k_theory contained +syn keyword smclCCLword max_k_current contained +syn keyword smclCCLword max_width_theory contained +syn keyword smclCCLword max_width_current contained +syn keyword smclCCLword max_matsize contained +syn keyword smclCCLword min_matsize contained +syn keyword smclCCLword max_macrolen contained +syn keyword smclCCLword macrolen contained +syn keyword smclCCLword max_cmdlen contained +syn keyword smclCCLword cmdlen contained +syn keyword smclCCLword namelen contained +syn keyword smclCCLword mindouble contained +syn keyword smclCCLword maxdouble contained +syn keyword smclCCLword epsdouble contained +syn keyword smclCCLword minfloat contained +syn keyword smclCCLword maxfloat contained +syn keyword smclCCLword epsfloat contained +syn keyword smclCCLword minlong contained +syn keyword smclCCLword maxlong contained +syn keyword smclCCLword minint contained +syn keyword smclCCLword maxint contained +syn keyword smclCCLword minbyte contained +syn keyword smclCCLword maxbyte contained +syn keyword smclCCLword maxstrvarlen contained +syn keyword smclCCLword memory contained +syn keyword smclCCLword maxvar contained +syn keyword smclCCLword matsize contained +syn keyword smclCCLword N contained +syn keyword smclCCLword k contained +syn keyword smclCCLword width contained +syn keyword smclCCLword changed contained +syn keyword smclCCLword filename contained +syn keyword smclCCLword filedate contained +syn keyword smclCCLword more contained +syn keyword smclCCLword rmsg contained +syn keyword smclCCLword dp contained +syn keyword smclCCLword linesize contained +syn keyword smclCCLword pagesize contained +syn keyword smclCCLword logtype contained +syn keyword smclCCLword linegap contained +syn keyword smclCCLword scrollbufsize contained +syn keyword smclCCLword varlabelpos contained +syn keyword smclCCLword reventries contained +syn keyword smclCCLword graphics contained +syn keyword smclCCLword scheme contained +syn keyword smclCCLword printcolor contained +syn keyword smclCCLword adosize contained +syn keyword smclCCLword maxdb contained +syn keyword smclCCLword virtual contained +syn keyword smclCCLword checksum contained +syn keyword smclCCLword timeout1 contained +syn keyword smclCCLword timeout2 contained +syn keyword smclCCLword httpproxy contained +syn keyword smclCCLword h_current contained +syn keyword smclCCLword max_matsize contained +syn keyword smclCCLword min_matsize contained +syn keyword smclCCLword max_macrolen contained +syn keyword smclCCLword macrolen contained +syn keyword smclCCLword max_cmdlen contained +syn keyword smclCCLword cmdlen contained +syn keyword smclCCLword namelen contained +syn keyword smclCCLword mindouble contained +syn keyword smclCCLword maxdouble contained +syn keyword smclCCLword epsdouble contained +syn keyword smclCCLword minfloat contained +syn keyword smclCCLword maxfloat contained +syn keyword smclCCLword epsfloat contained +syn keyword smclCCLword minlong contained +syn keyword smclCCLword maxlong contained +syn keyword smclCCLword minint contained +syn keyword smclCCLword maxint contained +syn keyword smclCCLword minbyte contained +syn keyword smclCCLword maxbyte contained +syn keyword smclCCLword maxstrvarlen contained +syn keyword smclCCLword memory contained +syn keyword smclCCLword maxvar contained +syn keyword smclCCLword matsize contained +syn keyword smclCCLword N contained +syn keyword smclCCLword k contained +syn keyword smclCCLword width contained +syn keyword smclCCLword changed contained +syn keyword smclCCLword filename contained +syn keyword smclCCLword filedate contained +syn keyword smclCCLword more contained +syn keyword smclCCLword rmsg contained +syn keyword smclCCLword dp contained +syn keyword smclCCLword linesize contained +syn keyword smclCCLword pagesize contained +syn keyword smclCCLword logtype contained +syn keyword smclCCLword linegap contained +syn keyword smclCCLword scrollbufsize contained +syn keyword smclCCLword varlabelpos contained +syn keyword smclCCLword reventries contained +syn keyword smclCCLword graphics contained +syn keyword smclCCLword scheme contained +syn keyword smclCCLword printcolor contained +syn keyword smclCCLword adosize contained +syn keyword smclCCLword maxdb contained +syn keyword smclCCLword virtual contained +syn keyword smclCCLword checksum contained +syn keyword smclCCLword timeout1 contained +syn keyword smclCCLword timeout2 contained +syn keyword smclCCLword httpproxy contained +syn keyword smclCCLword httpproxyhost contained +syn keyword smclCCLword httpproxyport contained +syn keyword smclCCLword httpproxyauth contained +syn keyword smclCCLword httpproxyuser contained +syn keyword smclCCLword httpproxypw contained +syn keyword smclCCLword trace contained +syn keyword smclCCLword tracedepth contained +syn keyword smclCCLword tracesep contained +syn keyword smclCCLword traceindent contained +syn keyword smclCCLword traceexapnd contained +syn keyword smclCCLword tracenumber contained +syn keyword smclCCLword type contained +syn keyword smclCCLword level contained +syn keyword smclCCLword seed contained +syn keyword smclCCLword searchdefault contained +syn keyword smclCCLword pi contained +syn keyword smclCCLword rc contained + +" Directive for the contant and current-value class +syn region smclCCL start=/{ccl / end=/}/ oneline contains=smclCCLword + +" The order of the following syntax definitions is roughly that of the on-line +" documentation for smcl in Stata, from within Stata see help smcl. + +" Format directives for line and paragraph modes +syn match smclFormat /{smcl}/ +syn match smclFormat /{sf\(\|:[^}]\+\)}/ +syn match smclFormat /{it\(\|:[^}]\+\)}/ +syn match smclFormat /{bf\(\|:[^}]\+\)}/ +syn match smclFormat /{inp\(\|:[^}]\+\)}/ +syn match smclFormat /{input\(\|:[^}]\+\)}/ +syn match smclFormat /{err\(\|:[^}]\+\)}/ +syn match smclFormat /{error\(\|:[^}]\+\)}/ +syn match smclFormat /{res\(\|:[^}]\+\)}/ +syn match smclFormat /{result\(\|:[^}]\+\)}/ +syn match smclFormat /{txt\(\|:[^}]\+\)}/ +syn match smclFormat /{text\(\|:[^}]\+\)}/ +syn match smclFormat /{com\(\|:[^}]\+\)}/ +syn match smclFormat /{cmd\(\|:[^}]\+\)}/ +syn match smclFormat /{cmdab:[^:}]\+:[^:}()]*\(\|:\|:(\|:()\)}/ +syn match smclFormat /{hi\(\|:[^}]\+\)}/ +syn match smclFormat /{hilite\(\|:[^}]\+\)}/ +syn match smclFormat /{ul \(on\|off\)}/ +syn match smclFormat /{ul:[^}]\+}/ +syn match smclFormat /{hline\(\| \d\+\| -\d\+\|:[^}]\+\)}/ +syn match smclFormat /{dup \d\+:[^}]\+}/ +syn match smclFormat /{c [^}]\+}/ +syn match smclFormat /{char [^}]\+}/ +syn match smclFormat /{reset}/ + +" Formatting directives for line mode +syn match smclFormat /{title:[^}]\+}/ +syn match smclFormat /{center:[^}]\+}/ +syn match smclFormat /{centre:[^}]\+}/ +syn match smclFormat /{center \d\+:[^}]\+}/ +syn match smclFormat /{centre \d\+:[^}]\+}/ +syn match smclFormat /{right:[^}]\+}/ +syn match smclFormat /{lalign \d\+:[^}]\+}/ +syn match smclFormat /{ralign \d\+:[^}]\+}/ +syn match smclFormat /{\.\.\.}/ +syn match smclFormat /{col \d\+}/ +syn match smclFormat /{space \d\+}/ +syn match smclFormat /{tab}/ + +" Formatting directives for paragraph mode +syn match smclFormat /{bind:[^}]\+}/ +syn match smclFormat /{break}/ + +syn match smclFormat /{p}/ +syn match smclFormat /{p \d\+}/ +syn match smclFormat /{p \d\+ \d\+}/ +syn match smclFormat /{p \d\+ \d\+ \d\+}/ +syn match smclFormat /{pstd}/ +syn match smclFormat /{psee}/ +syn match smclFormat /{phang\(\|2\|3\)}/ +syn match smclFormat /{pmore\(\|2\|3\)}/ +syn match smclFormat /{pin\(\|2\|3\)}/ +syn match smclFormat /{p_end}/ + +syn match smclFormat /{opt \w\+\(\|:\w\+\)\(\|([^)}]*)\)}/ + +syn match smclFormat /{opth \w*\(\|:\w\+\)(\w*)}/ +syn match smclFormat /{opth "\w\+\((\w\+:[^)}]\+)\)"}/ +syn match smclFormat /{opth \w\+:\w\+(\w\+:[^)}]\+)}/ + +syn match smclFormat /{dlgtab\s*\(\|\d\+\|\d\+\s\+\d\+\):[^}]\+}/ + +syn match smclFormat /{p2colset\s\+\d\+\s\+\d\+\s\+\d\+\s\+\d\+}/ +syn match smclFormat /{p2col\s\+:[^{}]*}.*{p_end}/ +syn match smclFormat /{p2col\s\+:{[^{}]*}}.*{p_end}/ +syn match smclFormat /{p2coldent\s*:[^{}]*}.*{p_end}/ +syn match smclFormat /{p2coldent\s*:{[^{}]*}}.*{p_end}/ +syn match smclFormat /{p2line\s*\(\|\d\+\s\+\d\+\)}/ +syn match smclFormat /{p2colreset}/ + +syn match smclFormat /{synoptset\s\+\d\+\s\+\w\+}/ +syn match smclFormat /{synopt\s*:[^{}]*}.*{p_end}/ +syn match smclFormat /{synopt\s*:{[^{}]*}}.*{p_end}/ +syn match smclFormat /{syntab\s*:[^{}]*}/ +syn match smclFormat /{synopthdr}/ +syn match smclFormat /{synoptline}/ + +" Link directive for line and paragraph modes +syn match smclLink /{help [^}]\+}/ +syn match smclLink /{helpb [^}]\+}/ +syn match smclLink /{help_d:[^}]\+}/ +syn match smclLink /{search [^}]\+}/ +syn match smclLink /{search_d:[^}]\+}/ +syn match smclLink /{browse [^}]\+}/ +syn match smclLink /{view [^}]\+}/ +syn match smclLink /{view_d:[^}]\+}/ +syn match smclLink /{news:[^}]\+}/ +syn match smclLink /{net [^}]\+}/ +syn match smclLink /{net_d:[^}]\+}/ +syn match smclLink /{netfrom_d:[^}]\+}/ +syn match smclLink /{ado [^}]\+}/ +syn match smclLink /{ado_d:[^}]\+}/ +syn match smclLink /{update [^}]\+}/ +syn match smclLink /{update_d:[^}]\+}/ +syn match smclLink /{dialog [^}]\+}/ +syn match smclLink /{back:[^}]\+}/ +syn match smclLink /{clearmore:[^}]\+}/ +syn match smclLink /{stata [^}]\+}/ + +syn match smclLink /{newvar\(\|:[^}]\+\)}/ +syn match smclLink /{var\(\|:[^}]\+\)}/ +syn match smclLink /{varname\(\|:[^}]\+\)}/ +syn match smclLink /{vars\(\|:[^}]\+\)}/ +syn match smclLink /{varlist\(\|:[^}]\+\)}/ +syn match smclLink /{depvar\(\|:[^}]\+\)}/ +syn match smclLink /{depvars\(\|:[^}]\+\)}/ +syn match smclLink /{depvarlist\(\|:[^}]\+\)}/ +syn match smclLink /{indepvars\(\|:[^}]\+\)}/ + +syn match smclLink /{dtype}/ +syn match smclLink /{ifin}/ +syn match smclLink /{weight}/ + +" Comment +syn region smclComment start=/{\*/ end=/}/ oneline + +" Strings +syn region smclString matchgroup=Nothing start=/"/ end=/"/ oneline +syn region smclEString matchgroup=Nothing start=/`"/ end=/"'/ oneline contains=smclEString + +" assign highlight groups + +hi def link smclEString smclString + +hi def link smclCCLword Statement +hi def link smclCCL Type +hi def link smclFormat Statement +hi def link smclLink Underlined +hi def link smclComment Comment +hi def link smclString String + +let b:current_syntax = "smcl" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/smil.vim b/vim/bundle/ubuntu-vim72/syntax/smil.vim new file mode 100644 index 0000000..0b53d8e --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/smil.vim @@ -0,0 +1,154 @@ +" Vim syntax file +" Language: SMIL (Synchronized Multimedia Integration Language) +" Maintainer: Herve Foucher +" URL: http://www.helio.org/vim/syntax/smil.vim +" Last Change: 2003 May 11 + +" To learn more about SMIL, please refer to http://www.w3.org/AudioVideo/ +" and to http://www.helio.org/products/smil/tutorial/ + +" 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 + +" SMIL is case sensitive +syn case match + +" illegal characters +syn match smilError "[<>&]" +syn match smilError "[()&]" + +if !exists("main_syntax") + let main_syntax = 'smil' +endif + +" tags +syn match smilSpecial contained "\\\d\d\d\|\\." +syn match smilSpecial contained "(" +syn match smilSpecial contained "id(" +syn match smilSpecial contained ")" +syn keyword smilSpecial contained remove freeze true false on off overdub caption new pause replace +syn keyword smilSpecial contained first last +syn keyword smilSpecial contained fill meet slice scroll hidden +syn region smilString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=smilSpecial +syn region smilString contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=smilSpecial +syn match smilValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 +syn region smilEndTag start=++ contains=smilTagN,smilTagError +syn region smilTag start=+<[^/]+ end=+>+ contains=smilTagN,smilString,smilArg,smilValue,smilTagError,smilEvent,smilCssDefinition +syn match smilTagN contained +<\s*[-a-zA-Z0-9]\++ms=s+1 contains=smilTagName,smilSpecialTagName +syn match smilTagN contained +]<"ms=s+1 + +" tag names +syn keyword smilTagName contained smil head body anchor a switch region layout meta +syn match smilTagName contained "root-layout" +syn keyword smilTagName contained par seq +syn keyword smilTagName contained animation video img audio ref text textstream +syn match smilTagName contained "\<\(head\|body\)\>" + + +" legal arg names +syn keyword smilArg contained dur begin end href target id coords show title abstract author copyright alt +syn keyword smilArg contained left top width height fit src name content fill longdesc repeat type +syn match smilArg contained "z-index" +syn match smilArg contained " end-sync" +syn match smilArg contained " region" +syn match smilArg contained "background-color" +syn match smilArg contained "system-bitrate" +syn match smilArg contained "system-captions" +syn match smilArg contained "system-overdub-or-caption" +syn match smilArg contained "system-language" +syn match smilArg contained "system-required" +syn match smilArg contained "system-screen-depth" +syn match smilArg contained "system-screen-size" +syn match smilArg contained "clip-begin" +syn match smilArg contained "clip-end" +syn match smilArg contained "skip-content" + + +" SMIL Boston ext. +" This are new SMIL functionnalities seen on www.w3.org on August 3rd 1999 + +" Animation +syn keyword smilTagName contained animate set move +syn keyword smilArg contained calcMode from to by additive values origin path +syn keyword smilArg contained accumulate hold attribute +syn match smilArg contained "xml:link" +syn keyword smilSpecial contained discrete linear spline parent layout +syn keyword smilSpecial contained top left simple + +" Linking +syn keyword smilTagName contained area +syn keyword smilArg contained actuate behavior inline sourceVolume +syn keyword smilArg contained destinationVolume destinationPlaystate tabindex +syn keyword smilArg contained class style lang dir onclick ondblclick onmousedown onmouseup onmouseover onmousemove onmouseout onkeypress onkeydown onkeyup shape nohref accesskey onfocus onblur +syn keyword smilSpecial contained play pause stop rect circ poly child par seq + +" Media Object +syn keyword smilTagName contained rtpmap +syn keyword smilArg contained port transport encoding payload clipBegin clipEnd +syn match smilArg contained "fmt-list" + +" Timing and Synchronization +syn keyword smilTagName contained excl +syn keyword smilArg contained beginEvent endEvent eventRestart endSync repeatCount repeatDur +syn keyword smilArg contained syncBehavior syncTolerance +syn keyword smilSpecial contained canSlip locked + +" special characters +syn match smilSpecialChar "&[^;]*;" + +if exists("smil_wrong_comments") + syn region smilComment start=++ +else + syn region smilComment start=++ contains=smilCommentPart,smilCommentError + syn match smilCommentError contained "[^>+ + +" 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_smil_syntax_inits") + if version < 508 + let did_smil_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink smilTag Function + HiLink smilEndTag Identifier + HiLink smilArg Type + HiLink smilTagName smilStatement + HiLink smilSpecialTagName Exception + HiLink smilValue Value + HiLink smilSpecialChar Special + + HiLink smilSpecial Special + HiLink smilSpecialChar Special + HiLink smilString String + HiLink smilStatement Statement + HiLink smilComment Comment + HiLink smilCommentPart Comment + HiLink smilPreProc PreProc + HiLink smilValue String + HiLink smilCommentError smilError + HiLink smilTagError smilError + HiLink smilError Error + + delcommand HiLink +endif + +let b:current_syntax = "smil" + +if main_syntax == 'smil' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/smith.vim b/vim/bundle/ubuntu-vim72/syntax/smith.vim new file mode 100644 index 0000000..e05ce69 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/smith.vim @@ -0,0 +1,52 @@ +" Vim syntax file +" Language: SMITH +" Maintainer: Rafal M. Sulejman +" Last Change: 21.07.2000 + +" 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 smithComment ";.*$" + +syn match smithNumber "\<[+-]*[0-9]\d*\>" + +syn match smithRegister "R[\[]*[0-9]*[\]]*" + +syn match smithKeyword "COR\|MOV\|MUL\|NOT\|STOP\|SUB\|NOP\|BLA\|REP" + +syn region smithString start=+"+ skip=+\\\\\|\\"+ end=+"+ + + +syn case match + +" 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_smith_syntax_inits") + if version < 508 + let did_smith_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink smithRegister Identifier + HiLink smithKeyword Keyword + HiLink smithComment Comment + HiLink smithString String + HiLink smithNumber Number + + delcommand HiLink +endif + +let b:current_syntax = "smith" + +" vim: ts=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/sml.vim b/vim/bundle/ubuntu-vim72/syntax/sml.vim new file mode 100644 index 0000000..aa7d64a --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sml.vim @@ -0,0 +1,230 @@ +" Vim syntax file +" Language: SML +" Filenames: *.sml *.sig +" Maintainers: Markus Mottl +" Fabrizio Zeno Cornelli +" URL: http://www.ocaml.info/vim/syntax/sml.vim +" Last Change: 2006 Oct 23 - Fixed character highlighting bug (MM) +" 2002 Jun 02 - Fixed small typo (MM) +" 2001 Nov 20 - Fixed small highlighting bug with modules (MM) + +" 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 + +" SML is case sensitive. +syn case match + +" lowercase identifier - the standard way to match +syn match smlLCIdentifier /\<\(\l\|_\)\(\w\|'\)*\>/ + +syn match smlKeyChar "|" + +" Errors +syn match smlBraceErr "}" +syn match smlBrackErr "\]" +syn match smlParenErr ")" +syn match smlCommentErr "\*)" +syn match smlThenErr "\" + +" Error-highlighting of "end" without synchronization: +" as keyword or as error (default) +if exists("sml_noend_error") + syn match smlKeyword "\" +else + syn match smlEndErr "\" +endif + +" Some convenient clusters +syn cluster smlAllErrs contains=smlBraceErr,smlBrackErr,smlParenErr,smlCommentErr,smlEndErr,smlThenErr + +syn cluster smlAENoParen contains=smlBraceErr,smlBrackErr,smlCommentErr,smlEndErr,smlThenErr + +syn cluster smlContained contains=smlTodo,smlPreDef,smlModParam,smlModParam1,smlPreMPRestr,smlMPRestr,smlMPRestr1,smlMPRestr2,smlMPRestr3,smlModRHS,smlFuncWith,smlFuncStruct,smlModTypeRestr,smlModTRWith,smlWith,smlWithRest,smlModType,smlFullMod + + +" Enclosing delimiters +syn region smlEncl transparent matchgroup=smlKeyword start="(" matchgroup=smlKeyword end=")" contains=ALLBUT,@smlContained,smlParenErr +syn region smlEncl transparent matchgroup=smlKeyword start="{" matchgroup=smlKeyword end="}" contains=ALLBUT,@smlContained,smlBraceErr +syn region smlEncl transparent matchgroup=smlKeyword start="\[" matchgroup=smlKeyword end="\]" contains=ALLBUT,@smlContained,smlBrackErr +syn region smlEncl transparent matchgroup=smlKeyword start="#\[" matchgroup=smlKeyword end="\]" contains=ALLBUT,@smlContained,smlBrackErr + + +" Comments +syn region smlComment start="(\*" end="\*)" contains=smlComment,smlTodo +syn keyword smlTodo contained TODO FIXME XXX + + +" let +syn region smlEnd matchgroup=smlKeyword start="\" matchgroup=smlKeyword end="\" contains=ALLBUT,@smlContained,smlEndErr + +" local +syn region smlEnd matchgroup=smlKeyword start="\" matchgroup=smlKeyword end="\" contains=ALLBUT,@smlContained,smlEndErr + +" abstype +syn region smlNone matchgroup=smlKeyword start="\" matchgroup=smlKeyword end="\" contains=ALLBUT,@smlContained,smlEndErr + +" begin +syn region smlEnd matchgroup=smlKeyword start="\" matchgroup=smlKeyword end="\" contains=ALLBUT,@smlContained,smlEndErr + +" if +syn region smlNone matchgroup=smlKeyword start="\" matchgroup=smlKeyword end="\" contains=ALLBUT,@smlContained,smlThenErr + + +"" Modules + +" "struct" +syn region smlStruct matchgroup=smlModule start="\" matchgroup=smlModule end="\" contains=ALLBUT,@smlContained,smlEndErr + +" "sig" +syn region smlSig matchgroup=smlModule start="\" matchgroup=smlModule end="\" contains=ALLBUT,@smlContained,smlEndErr,smlModule +syn region smlModSpec matchgroup=smlKeyword start="\" matchgroup=smlModule end="\<\u\(\w\|'\)*\>" contained contains=@smlAllErrs,smlComment skipwhite skipempty nextgroup=smlModTRWith,smlMPRestr + +" "open" +syn region smlNone matchgroup=smlKeyword start="\" matchgroup=smlModule end="\<\u\(\w\|'\)*\(\.\u\(\w\|'\)*\)*\>" contains=@smlAllErrs,smlComment + +" "structure" - somewhat complicated stuff ;-) +syn region smlModule matchgroup=smlKeyword start="\<\(structure\|functor\)\>" matchgroup=smlModule end="\<\u\(\w\|'\)*\>" contains=@smlAllErrs,smlComment skipwhite skipempty nextgroup=smlPreDef +syn region smlPreDef start="."me=e-1 matchgroup=smlKeyword end="\l\|="me=e-1 contained contains=@smlAllErrs,smlComment,smlModParam,smlModTypeRestr,smlModTRWith nextgroup=smlModPreRHS +syn region smlModParam start="([^*]" end=")" contained contains=@smlAENoParen,smlModParam1 +syn match smlModParam1 "\<\u\(\w\|'\)*\>" contained skipwhite skipempty nextgroup=smlPreMPRestr + +syn region smlPreMPRestr start="."me=e-1 end=")"me=e-1 contained contains=@smlAllErrs,smlComment,smlMPRestr,smlModTypeRestr + +syn region smlMPRestr start=":" end="."me=e-1 contained contains=@smlComment skipwhite skipempty nextgroup=smlMPRestr1,smlMPRestr2,smlMPRestr3 +syn region smlMPRestr1 matchgroup=smlModule start="\ssig\s\=" matchgroup=smlModule end="\" contained contains=ALLBUT,@smlContained,smlEndErr,smlModule +syn region smlMPRestr2 start="\sfunctor\(\s\|(\)\="me=e-1 matchgroup=smlKeyword end="->" contained contains=@smlAllErrs,smlComment,smlModParam skipwhite skipempty nextgroup=smlFuncWith +syn match smlMPRestr3 "\w\(\w\|'\)*\(\.\w\(\w\|'\)*\)*" contained +syn match smlModPreRHS "=" contained skipwhite skipempty nextgroup=smlModParam,smlFullMod +syn region smlModRHS start="." end=".\w\|([^*]"me=e-2 contained contains=smlComment skipwhite skipempty nextgroup=smlModParam,smlFullMod +syn match smlFullMod "\<\u\(\w\|'\)*\(\.\u\(\w\|'\)*\)*" contained skipwhite skipempty nextgroup=smlFuncWith + +syn region smlFuncWith start="([^*]"me=e-1 end=")" contained contains=smlComment,smlWith,smlFuncStruct +syn region smlFuncStruct matchgroup=smlModule start="[^a-zA-Z]struct\>"hs=s+1 matchgroup=smlModule end="\" contains=ALLBUT,@smlContained,smlEndErr + +syn match smlModTypeRestr "\<\w\(\w\|'\)*\(\.\w\(\w\|'\)*\)*\>" contained +syn region smlModTRWith start=":\s*("hs=s+1 end=")" contained contains=@smlAENoParen,smlWith +syn match smlWith "\<\(\u\(\w\|'\)*\.\)*\w\(\w\|'\)*\>" contained skipwhite skipempty nextgroup=smlWithRest +syn region smlWithRest start="[^)]" end=")"me=e-1 contained contains=ALLBUT,@smlContained + +" "signature" +syn region smlKeyword start="\" matchgroup=smlModule end="\<\w\(\w\|'\)*\>" contains=smlComment skipwhite skipempty nextgroup=smlMTDef +syn match smlMTDef "=\s*\w\(\w\|'\)*\>"hs=s+1,me=s + +syn keyword smlKeyword and andalso case +syn keyword smlKeyword datatype else eqtype +syn keyword smlKeyword exception fn fun handle +syn keyword smlKeyword in infix infixl infixr +syn keyword smlKeyword match nonfix of orelse +syn keyword smlKeyword raise handle type +syn keyword smlKeyword val where while with withtype + +syn keyword smlType bool char exn int list option +syn keyword smlType real string unit + +syn keyword smlOperator div mod not or quot rem + +syn keyword smlBoolean true false +syn match smlConstructor "(\s*)" +syn match smlConstructor "\[\s*\]" +syn match smlConstructor "#\[\s*\]" +syn match smlConstructor "\u\(\w\|'\)*\>" + +" Module prefix +syn match smlModPath "\u\(\w\|'\)*\."he=e-1 + +syn match smlCharacter +#"\\""\|#"."\|#"\\\d\d\d"+ +syn match smlCharErr +#"\\\d\d"\|#"\\\d"+ +syn region smlString start=+"+ skip=+\\\\\|\\"+ end=+"+ + +syn match smlFunDef "=>" +syn match smlRefAssign ":=" +syn match smlTopStop ";;" +syn match smlOperator "\^" +syn match smlOperator "::" +syn match smlAnyVar "\<_\>" +syn match smlKeyChar "!" +syn match smlKeyChar ";" +syn match smlKeyChar "\*" +syn match smlKeyChar "=" + +syn match smlNumber "\<-\=\d\+\>" +syn match smlNumber "\<-\=0[x|X]\x\+\>" +syn match smlReal "\<-\=\d\+\.\d*\([eE][-+]\=\d\+\)\=[fl]\=\>" + +" Synchronization +syn sync minlines=20 +syn sync maxlines=500 + +syn sync match smlEndSync grouphere smlEnd "\" +syn sync match smlEndSync groupthere smlEnd "\" +syn sync match smlStructSync grouphere smlStruct "\" +syn sync match smlStructSync groupthere smlStruct "\" +syn sync match smlSigSync grouphere smlSig "\" +syn sync match smlSigSync groupthere smlSig "\" + +" 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_sml_syntax_inits") + if version < 508 + let did_sml_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink smlBraceErr Error + HiLink smlBrackErr Error + HiLink smlParenErr Error + + HiLink smlCommentErr Error + + HiLink smlEndErr Error + HiLink smlThenErr Error + + HiLink smlCharErr Error + + HiLink smlComment Comment + + HiLink smlModPath Include + HiLink smlModule Include + HiLink smlModParam1 Include + HiLink smlModType Include + HiLink smlMPRestr3 Include + HiLink smlFullMod Include + HiLink smlModTypeRestr Include + HiLink smlWith Include + HiLink smlMTDef Include + + HiLink smlConstructor Constant + + HiLink smlModPreRHS Keyword + HiLink smlMPRestr2 Keyword + HiLink smlKeyword Keyword + HiLink smlFunDef Keyword + HiLink smlRefAssign Keyword + HiLink smlKeyChar Keyword + HiLink smlAnyVar Keyword + HiLink smlTopStop Keyword + HiLink smlOperator Keyword + + HiLink smlBoolean Boolean + HiLink smlCharacter Character + HiLink smlNumber Number + HiLink smlReal Float + HiLink smlString String + HiLink smlType Type + HiLink smlTodo Todo + HiLink smlEncl Keyword + + delcommand HiLink +endif + +let b:current_syntax = "sml" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/snnsnet.vim b/vim/bundle/ubuntu-vim72/syntax/snnsnet.vim new file mode 100644 index 0000000..6b24de5 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/snnsnet.vim @@ -0,0 +1,77 @@ +" Vim syntax file +" Language: SNNS network file +" Maintainer: Davide Alberani +" Last Change: 28 Apr 2001 +" Version: 0.2 +" URL: http://digilander.iol.it/alberanid/vim/syntax/snnsnet.vim +" +" SNNS http://www-ra.informatik.uni-tuebingen.de/SNNS/ +" is a simulator for neural networks. + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn match snnsnetTitle "no\." +syn match snnsnetTitle "type name" +syn match snnsnetTitle "unit name" +syn match snnsnetTitle "act\( func\)\=" +syn match snnsnetTitle "out func" +syn match snnsnetTitle "site\( name\)\=" +syn match snnsnetTitle "site function" +syn match snnsnetTitle "source:weight" +syn match snnsnetTitle "unitNo\." +syn match snnsnetTitle "delta x" +syn match snnsnetTitle "delta y" +syn keyword snnsnetTitle typeName unitName bias st position subnet layer sites name target z LLN LUN Toff Soff Ctype + +syn match snnsnetType "SNNS network definition file [Vv]\d.\d.*" contains=snnsnetNumbers +syn match snnsnetType "generated at.*" contains=snnsnetNumbers +syn match snnsnetType "network name\s*:" +syn match snnsnetType "source files\s*:" +syn match snnsnetType "no\. of units\s*:.*" contains=snnsnetNumbers +syn match snnsnetType "no\. of connections\s*:.*" contains=snnsnetNumbers +syn match snnsnetType "no\. of unit types\s*:.*" contains=snnsnetNumbers +syn match snnsnetType "no\. of site types\s*:.*" contains=snnsnetNumbers +syn match snnsnetType "learning function\s*:" +syn match snnsnetType "pruning function\s*:" +syn match snnsnetType "subordinate learning function\s*:" +syn match snnsnetType "update function\s*:" + +syn match snnsnetSection "unit definition section" +syn match snnsnetSection "unit default section" +syn match snnsnetSection "site definition section" +syn match snnsnetSection "type definition section" +syn match snnsnetSection "connection definition section" +syn match snnsnetSection "layer definition section" +syn match snnsnetSection "subnet definition section" +syn match snnsnetSection "3D translation section" +syn match snnsnetSection "time delay section" + +syn match snnsnetNumbers "\d" contained +syn match snnsnetComment "#.*$" contains=snnsnetTodo +syn keyword snnsnetTodo TODO XXX FIXME contained + +if version >= 508 || !exists("did_snnsnet_syn_inits") + if version < 508 + let did_snnsnet_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink snnsnetType Type + HiLink snnsnetComment Comment + HiLink snnsnetNumbers Number + HiLink snnsnetSection Statement + HiLink snnsnetTitle Label + HiLink snnsnetTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "snnsnet" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/snnspat.vim b/vim/bundle/ubuntu-vim72/syntax/snnspat.vim new file mode 100644 index 0000000..3c07fad --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/snnspat.vim @@ -0,0 +1,68 @@ +" Vim syntax file +" Language: SNNS pattern file +" Maintainer: Davide Alberani +" Last Change: 28 Apr 2001 +" Version: 0.2 +" URL: http://digilander.iol.it/alberanid/vim/syntax/snnspat.vim +" +" SNNS http://www-ra.informatik.uni-tuebingen.de/SNNS/ +" is a simulator for neural networks. + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + +" anything that isn't part of the header, a comment or a number +" is wrong +syn match snnspatError ".*" +" hoping that matches any kind of notation... +syn match snnspatAccepted "\([-+]\=\(\d\+\.\|\.\)\=\d\+\([Ee][-+]\=\d\+\)\=\)" +syn match snnspatAccepted "\s" +syn match snnspatBrac "\[\s*\d\+\(\s\|\d\)*\]" contains=snnspatNumbers + +" the accepted fields in the header +syn match snnspatNoHeader "No\. of patterns\s*:\s*" contained +syn match snnspatNoHeader "No\. of input units\s*:\s*" contained +syn match snnspatNoHeader "No\. of output units\s*:\s*" contained +syn match snnspatNoHeader "No\. of variable input dimensions\s*:\s*" contained +syn match snnspatNoHeader "No\. of variable output dimensions\s*:\s*" contained +syn match snnspatNoHeader "Maximum input dimensions\s*:\s*" contained +syn match snnspatNoHeader "Maximum output dimensions\s*:\s*" contained +syn match snnspatGen "generated at.*" contained contains=snnspatNumbers +syn match snnspatGen "SNNS pattern definition file [Vv]\d\.\d" contained contains=snnspatNumbers + +" the header, what is not an accepted field, is an error +syn region snnspatHeader start="^SNNS" end="^\s*[-+\.]\=[0-9#]"me=e-2 contains=snnspatNoHeader,snnspatNumbers,snnspatGen,snnspatBrac + +" numbers inside the header +syn match snnspatNumbers "\d" contained +syn match snnspatComment "#.*$" contains=snnspatTodo +syn keyword snnspatTodo TODO XXX FIXME contained + +if version >= 508 || !exists("did_snnspat_syn_inits") + if version < 508 + let did_snnspat_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink snnspatGen Statement + HiLink snnspatHeader Error + HiLink snnspatNoHeader Define + HiLink snnspatNumbers Number + HiLink snnspatComment Comment + HiLink snnspatError Error + HiLink snnspatTodo Todo + HiLink snnspatAccepted NONE + HiLink snnspatBrac NONE + + delcommand HiLink +endif + +let b:current_syntax = "snnspat" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/snnsres.vim b/vim/bundle/ubuntu-vim72/syntax/snnsres.vim new file mode 100644 index 0000000..4c1d596 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/snnsres.vim @@ -0,0 +1,60 @@ +" Vim syntax file +" Language: SNNS result file +" Maintainer: Davide Alberani +" Last Change: 28 Apr 2001 +" Version: 0.2 +" URL: http://digilander.iol.it/alberanid/vim/syntax/snnsres.vim +" +" SNNS http://www-ra.informatik.uni-tuebingen.de/SNNS/ +" is a simulator for neural networks. + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" the accepted fields in the header +syn match snnsresNoHeader "No\. of patterns\s*:\s*" contained +syn match snnsresNoHeader "No\. of input units\s*:\s*" contained +syn match snnsresNoHeader "No\. of output units\s*:\s*" contained +syn match snnsresNoHeader "No\. of variable input dimensions\s*:\s*" contained +syn match snnsresNoHeader "No\. of variable output dimensions\s*:\s*" contained +syn match snnsresNoHeader "Maximum input dimensions\s*:\s*" contained +syn match snnsresNoHeader "Maximum output dimensions\s*:\s*" contained +syn match snnsresNoHeader "startpattern\s*:\s*" contained +syn match snnsresNoHeader "endpattern\s*:\s*" contained +syn match snnsresNoHeader "input patterns included" contained +syn match snnsresNoHeader "teaching output included" contained +syn match snnsresGen "generated at.*" contained contains=snnsresNumbers +syn match snnsresGen "SNNS result file [Vv]\d\.\d" contained contains=snnsresNumbers + +" the header, what is not an accepted field, is an error +syn region snnsresHeader start="^SNNS" end="^\s*[-+\.]\=[0-9#]"me=e-2 contains=snnsresNoHeader,snnsresNumbers,snnsresGen + +" numbers inside the header +syn match snnsresNumbers "\d" contained +syn match snnsresComment "#.*$" contains=snnsresTodo +syn keyword snnsresTodo TODO XXX FIXME contained + +if version >= 508 || !exists("did_snnsres_syn_inits") + if version < 508 + let did_snnsres_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink snnsresGen Statement + HiLink snnsresHeader Statement + HiLink snnsresNoHeader Define + HiLink snnsresNumbers Number + HiLink snnsresComment Comment + HiLink snnsresTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "snnsres" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/snobol4.vim b/vim/bundle/ubuntu-vim72/syntax/snobol4.vim new file mode 100644 index 0000000..07eb63d --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/snobol4.vim @@ -0,0 +1,125 @@ +" Vim syntax file +" Language: SNOBOL4 +" Maintainer: Rafal Sulejman +" Site: http://rms.republika.pl/vim/syntax/snobol4.vim +" Last change: 2006 may 10 +" Changes: +" - strict snobol4 mode (set snobol4_strict_mode to activate) +" - incorrect HL of dots in strings corrected +" - incorrect HL of dot-variables in parens corrected +" - one character labels weren't displayed correctly. +" - nonexistent Snobol4 keywords displayed as errors. + +" 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 + +syntax case ignore + +" Snobol4 keywords +syn keyword snobol4Keyword any apply arb arbno arg array +syn keyword snobol4Keyword break +syn keyword snobol4Keyword char clear code collect convert copy +syn keyword snobol4Keyword data datatype date define detach differ dump dupl +syn keyword snobol4Keyword endfile eq eval +syn keyword snobol4Keyword field +syn keyword snobol4Keyword ge gt ident +syn keyword snobol4Keyword input integer item +syn keyword snobol4Keyword le len lgt local lpad lt +syn keyword snobol4Keyword ne notany +syn keyword snobol4Keyword opsyn output +syn keyword snobol4Keyword pos prototype +syn keyword snobol4Keyword remdr replace rpad rpos rtab rewind +syn keyword snobol4Keyword size span stoptr +syn keyword snobol4Keyword tab table time trace trim terminal +syn keyword snobol4Keyword unload +syn keyword snobol4Keyword value + +" CSNOBOL keywords +syn keyword snobol4ExtKeyword breakx +syn keyword snobol4ExtKeyword char chop +syn keyword snobol4ExtKeyword date delete +syn keyword snobol4ExtKeyword exp +syn keyword snobol4ExtKeyword freeze function +syn keyword snobol4ExtKeyword host +syn keyword snobol4ExtKeyword io_findunit +syn keyword snobol4ExtKeyword label lpad leq lge lle llt lne log +syn keyword snobol4ExtKeyword ord +syn keyword snobol4ExtKeyword reverse rpad rsort rename +syn keyword snobol4ExtKeyword serv_listen sset set sort sqrt substr +syn keyword snobol4ExtKeyword thaw +syn keyword snobol4ExtKeyword vdiffer + +syn region snobol4String matchgroup=Quote start=+"+ end=+"+ +syn region snobol4String matchgroup=Quote start=+'+ end=+'+ +syn match snobol4BogusStatement "^-[^ ][^ ]*" +syn match snobol4Statement "^-\(include\|copy\|module\|line\|plusopts\|case\|error\|noerrors\|list\|unlist\|execute\|noexecute\|copy\)" +syn match snobol4Constant /"[^a-z"']\.[a-z][a-z0-9\-]*"/hs=s+1 +syn region snobol4Goto start=":[sf]\{0,1}(" end=")\|$\|;" contains=ALLBUT,snobol4ParenError +syn match snobol4Number "\<\d*\(\.\d\d*\)*\>" +syn match snobol4BogusSysVar "&\w\{1,}" +syn match snobol4SysVar "&\(abort\|alphabet\|anchor\|arb\|bal\|case\|code\|dump\|errlimit\|errtext\|errtype\|fail\|fence\|fnclevel\|ftrace\|fullscan\|input\|lastno\|lcase\|maxlngth\|output\|parm\|rem\|rtntype\|stcount\|stfcount\|stlimit\|stno\|succeed\|trace\|trim\|ucase\)" +syn match snobol4ExtSysVar "&\(gtrace\|line\|file\|lastline\|lastfile\)" +syn match snobol4Label "\(^\|;\)[^-\.\+ \t\*\.]\{1,}[^ \t\*\;]*" +syn match snobol4Comment "\(^\|;\)\([\*\|!;#].*$\)" + +" Parens matching +syn cluster snobol4ParenGroup contains=snobol4ParenError +syn region snobol4Paren transparent start='(' end=')' contains=ALLBUT,@snobol4ParenGroup,snobol4ErrInBracket +syn match snobol4ParenError display "[\])]" +syn match snobol4ErrInParen display contained "[\]{}]\|<%\|%>" +syn region snobol4Bracket transparent start='\[\|<:' end=']\|:>' contains=ALLBUT,@snobol4ParenGroup,snobol4ErrInParen +syn match snobol4ErrInBracket display contained "[){}]\|<%\|%>" + +" optional shell shebang line +" syn match snobol4Comment "^\#\!.*$" + +" 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_snobol4_syntax_inits") + if version < 508 + let did_snobol4_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink snobol4Constant Constant + HiLink snobol4Label Label + HiLink snobol4Goto Repeat + HiLink snobol4Conditional Conditional + HiLink snobol4Repeat Repeat + HiLink snobol4Number Number + HiLink snobol4Error Error + HiLink snobol4Statement PreProc + HiLink snobol4BogusStatement snobol4Error + HiLink snobol4String String + HiLink snobol4Comment Comment + HiLink snobol4Special Special + HiLink snobol4Todo Todo + HiLink snobol4Keyword Keyword + HiLink snobol4Function Function + HiLink snobol4MathsOperator Operator + HiLink snobol4ParenError snobol4Error + HiLink snobol4ErrInParen snobol4Error + HiLink snobol4ErrInBracket snobol4Error + HiLink snobol4SysVar Keyword + HiLink snobol4BogusSysVar snobol4Error + if exists("snobol4_strict_mode") + HiLink snobol4ExtSysVar WarningMsg + HiLink snobol4ExtKeyword WarningMsg + else + HiLink snobol4ExtSysVar snobol4SysVar + HiLink snobol4ExtKeyword snobol4Keyword + endif + + delcommand HiLink +endif + +let b:current_syntax = "snobol4" +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/spec.vim b/vim/bundle/ubuntu-vim72/syntax/spec.vim new file mode 100644 index 0000000..8c9dd1f --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/spec.vim @@ -0,0 +1,235 @@ +" Filename: spec.vim +" Purpose: Vim syntax file +" Language: SPEC: Build/install scripts for Linux RPM packages +" Maintainer: Donovan Rebbechi elflord@panix.com +" Last Change: Fri Dec 3 11:54 EST 2004 Marcin Dalecki + +" 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 sync minlines=1000 + +syn match specSpecialChar contained '[][!$()\\|>^;:{}]' +syn match specColon contained ':' +syn match specPercent contained '%' + +syn match specVariables contained '\$\h\w*' contains=specSpecialVariablesNames,specSpecialChar +syn match specVariables contained '\${\w*}' contains=specSpecialVariablesNames,specSpecialChar + +syn match specMacroIdentifier contained '%\h\w*' contains=specMacroNameLocal,specMacroNameOther,specPercent +syn match specMacroIdentifier contained '%{\w*}' contains=specMacroNameLocal,specMacroNameOther,specPercent,specSpecialChar + +syn match specSpecialVariables contained '\$[0-9]\|\${[0-9]}' +syn match specCommandOpts contained '\s\(-\w\+\|--\w[a-zA-Z_-]\+\)'ms=s+1 +syn match specComment '^\s*#.*$' + + +syn case match + + +"matches with no highlight +syn match specNoNumberHilite 'X11\|X11R6\|[a-zA-Z]*\.\d\|[a-zA-Z][-/]\d' +syn match specManpageFile '[a-zA-Z]\.1' + +"Day, Month and most used license acronyms +syn keyword specLicense contained GPL LGPL BSD MIT GNU +syn keyword specWeekday contained Mon Tue Wed Thu Fri Sat Sun +syn keyword specMonth contained Jan Feb Mar Apr Jun Jul Aug Sep Oct Nov Dec +syn keyword specMonth contained January February March April May June July August September October November December + +"#, @, www +syn match specNumber '\(^-\=\|[ \t]-\=\|-\)[0-9.-]*[0-9]' +syn match specEmail contained "<\=\<[A-Za-z0-9_.-]\+@\([A-Za-z0-9_-]\+\.\)\+[A-Za-z]\+\>>\=" +syn match specURL contained '\<\(\(https\{0,1}\|ftp\)://\|\(www[23]\{0,1}\.\|ftp\.\)\)[A-Za-z0-9._/~:,#-]\+\>' +syn match specURLMacro contained '\<\(\(https\{0,1}\|ftp\)://\|\(www[23]\{0,1}\.\|ftp\.\)\)[A-Za-z0-9._/~:,#%{}-]\+\>' contains=specMacroIdentifier + +"TODO take specSpecialVariables out of the cluster for the sh* contains (ALLBUT) +"Special system directories +syn match specListedFilesPrefix contained '/\(usr\|local\|opt\|X11R6\|X11\)/'me=e-1 +syn match specListedFilesBin contained '/s\=bin/'me=e-1 +syn match specListedFilesLib contained '/\(lib\|include\)/'me=e-1 +syn match specListedFilesDoc contained '/\(man\d*\|doc\|info\)\>' +syn match specListedFilesEtc contained '/etc/'me=e-1 +syn match specListedFilesShare contained '/share/'me=e-1 +syn cluster specListedFiles contains=specListedFilesBin,specListedFilesLib,specListedFilesDoc,specListedFilesEtc,specListedFilesShare,specListedFilesPrefix,specVariables,specSpecialChar + +"specComands +syn match specConfigure contained '\./configure' +syn match specTarCommand contained '\' + +"valid _macro names from /usr/lib/rpm/macros +syn keyword specMacroNameLocal contained _arch _binary_payload _bindir _build _build_alias _build_cpu _builddir _build_os _buildshell _buildsubdir _build_vendor _bzip2bin _datadir _dbpath _dbpath_rebuild _defaultdocdir _docdir _excludedocs _exec_prefix _fixgroup _fixowner _fixperms _ftpport _ftpproxy _gpg_path _gzipbin _host _host_alias _host_cpu _host_os _host_vendor _httpport _httpproxy _includedir _infodir _install_langs _install_script_path _instchangelog _langpatt _lib _libdir _libexecdir _localstatedir _mandir _netsharedpath _oldincludedir _os _pgpbin _pgp_path _prefix _preScriptEnvironment _provides _rpmdir _rpmfilename _sbindir _sharedstatedir _signature _sourcedir _source_payload _specdir _srcrpmdir _sysconfdir _target _target_alias _target_cpu _target_os _target_platform _target_vendor _timecheck _tmppath _topdir _usr _usrsrc _var _vendor + + +"------------------------------------------------------------------------------ +" here's is all the spec sections definitions: PreAmble, Description, Package, +" Scripts, Files and Changelog + +"One line macros - valid in all ScriptAreas +"tip: remember do include new items on specScriptArea's skip section +syn region specSectionMacroArea oneline matchgroup=specSectionMacro start='^%\(define\|patch\d*\|setup\|configure\|GNUconfigure\|find_lang\|makeinstall\|include\)\>' end='$' contains=specCommandOpts,specMacroIdentifier +syn region specSectionMacroBracketArea oneline matchgroup=specSectionMacro start='^%{\(configure\|GNUconfigure\|find_lang\|makeinstall\)}' end='$' contains=specCommandOpts,specMacroIdentifier + +"%% Files Section %% +"TODO %config valid parameters: missingok\|noreplace +"TODO %verify valid parameters: \(not\)\= \(md5\|atime\|...\) +syn region specFilesArea matchgroup=specSection start='^%[Ff][Ii][Ll][Ee][Ss]\>' skip='%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|verify\|ghost\)\>' end='^%[a-zA-Z]'me=e-2 contains=specFilesOpts,specFilesDirective,@specListedFiles,specComment,specCommandSpecial,specMacroIdentifier +"tip: remember to include new itens in specFilesArea above +syn match specFilesDirective contained '%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|verify\|ghost\)\>' + +"valid options for certain section headers +syn match specDescriptionOpts contained '\s-[ln]\s*\a'ms=s+1,me=e-1 +syn match specPackageOpts contained '\s-n\s*\w'ms=s+1,me=e-1 +syn match specFilesOpts contained '\s-f\s*\w'ms=s+1,me=e-1 + + +syn case ignore + + +"%% PreAmble Section %% +"Copyright and Serial were deprecated by License and Epoch +syn region specPreAmbleDeprecated oneline matchgroup=specError start='^\(Copyright\|Serial\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier +syn region specPreAmble oneline matchgroup=specCommand start='^\(Prereq\|Summary\|Name\|Version\|Packager\|Requires\|Icon\|URL\|Source\d*\|Patch\d*\|Prefix\|Packager\|Group\|License\|Release\|BuildRoot\|Distribution\|Vendor\|Provides\|ExclusiveArch\|ExcludeArch\|ExclusiveOS\|Obsoletes\|BuildArch\|BuildArchitectures\|BuildRequires\|BuildConflicts\|BuildPreReq\|Conflicts\|AutoRequires\|AutoReq\|AutoReqProv\|AutoProv\|Epoch\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier + +"%% Description Section %% +syn region specDescriptionArea matchgroup=specSection start='^%description' end='^%'me=e-1 contains=specDescriptionOpts,specEmail,specURL,specNumber,specMacroIdentifier,specComment + +"%% Package Section %% +syn region specPackageArea matchgroup=specSection start='^%package' end='^%'me=e-1 contains=specPackageOpts,specPreAmble,specComment + +"%% Scripts Section %% +syn region specScriptArea matchgroup=specSection start='^%\(prep\|build\|install\|clean\|pre\|postun\|preun\|post\)\>' skip='^%{\|^%\(define\|patch\d*\|configure\|GNUconfigure\|setup\|find_lang\|makeinstall\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2 + +"%% Changelog Section %% +syn region specChangelogArea matchgroup=specSection start='^%changelog' end='^%'me=e-1 contains=specEmail,specURL,specWeekday,specMonth,specNumber,specComment,specLicense + + + +"------------------------------------------------------------------------------ +"here's the shell syntax for all the Script Sections + + +syn case match + + +"sh-like comment stile, only valid in script part +syn match shComment contained '#.*$' + +syn region shQuote1 contained matchgroup=shQuoteDelim start=+'+ skip=+\\'+ end=+'+ contains=specMacroIdentifier +syn region shQuote2 contained matchgroup=shQuoteDelim start=+"+ skip=+\\"+ end=+"+ contains=specVariables,specMacroIdentifier + +syn match shOperator contained '[><|!&;]\|[!=]=' +syn region shDo transparent matchgroup=specBlock start="\" end="\" contains=ALLBUT,shFunction,shDoError,shCase,specPreAmble,@specListedFiles + +syn region specIf matchgroup=specBlock start="%ifosf\|%ifos\|%ifnos\|%ifarch\|%ifnarch\|%else" end='%endif' contains=ALLBUT, specIfError, shCase + +syn region shIf transparent matchgroup=specBlock start="\" end="\" contains=ALLBUT,shFunction,shIfError,shCase,@specListedFiles + +syn region shFor matchgroup=specBlock start="\" end="\" contains=ALLBUT,shFunction,shInError,shCase,@specListedFiles + +syn region shCaseEsac transparent matchgroup=specBlock start="\" matchgroup=NONE end="\"me=s-1 contains=ALLBUT,shFunction,shCaseError,@specListedFiles nextgroup=shCaseEsac +syn region shCaseEsac matchgroup=specBlock start="\" end="\" contains=ALLBUT,shFunction,shCaseError,@specListedFilesBin +syn region shCase matchgroup=specBlock contained start=")" end=";;" contains=ALLBUT,shFunction,shCaseError,shCase,@specListedFiles + +syn sync match shDoSync grouphere shDo "\" +syn sync match shDoSync groupthere shDo "\" +syn sync match shIfSync grouphere shIf "\" +syn sync match shIfSync groupthere shIf "\" +syn sync match specIfSync grouphere specIf "%ifarch\|%ifos\|%ifnos" +syn sync match specIfSync groupthere specIf "%endIf" +syn sync match shForSync grouphere shFor "\" +syn sync match shForSync groupthere shFor "\" +syn sync match shCaseEsacSync grouphere shCaseEsac "\" +syn sync match shCaseEsacSync groupthere shCaseEsac "\" + +" 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_spec_syntax_inits") + if version < 508 + let did_spec_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + "main types color definitions + HiLink specSection Structure + HiLink specSectionMacro Macro + HiLink specWWWlink PreProc + HiLink specOpts Operator + + "yes, it's ugly, but white is sooo cool + if &background == "dark" + hi def specGlobalMacro ctermfg=white + else + HiLink specGlobalMacro Identifier + endif + + "sh colors + HiLink shComment Comment + HiLink shIf Statement + HiLink shOperator Special + HiLink shQuote1 String + HiLink shQuote2 String + HiLink shQuoteDelim Statement + + "spec colors + HiLink specBlock Function + HiLink specColon Special + HiLink specCommand Statement + HiLink specCommandOpts specOpts + HiLink specCommandSpecial Special + HiLink specComment Comment + HiLink specConfigure specCommand + HiLink specDate String + HiLink specDescriptionOpts specOpts + HiLink specEmail specWWWlink + HiLink specError Error + HiLink specFilesDirective specSectionMacro + HiLink specFilesOpts specOpts + HiLink specLicense String + HiLink specMacroNameLocal specGlobalMacro + HiLink specMacroNameOther specGlobalMacro + HiLink specManpageFile NONE + HiLink specMonth specDate + HiLink specNoNumberHilite NONE + HiLink specNumber Number + HiLink specPackageOpts specOpts + HiLink specPercent Special + HiLink specSpecialChar Special + HiLink specSpecialVariables specGlobalMacro + HiLink specSpecialVariablesNames specGlobalMacro + HiLink specTarCommand specCommand + HiLink specURL specWWWlink + HiLink specURLMacro specWWWlink + HiLink specVariables Identifier + HiLink specWeekday specDate + HiLink specListedFilesBin Statement + HiLink specListedFilesDoc Statement + HiLink specListedFilesEtc Statement + HiLink specListedFilesLib Statement + HiLink specListedFilesPrefix Statement + HiLink specListedFilesShare Statement + + delcommand HiLink +endif + +let b:current_syntax = "spec" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/specman.vim b/vim/bundle/ubuntu-vim72/syntax/specman.vim new file mode 100644 index 0000000..3fb77a2 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/specman.vim @@ -0,0 +1,182 @@ +" Vim syntax file +" Language: SPECMAN E-LANGUAGE +" Maintainer: Or Freund +" Last Update: Wed Oct 24 2001 + +"--------------------------------------------------------- +"| If anyone found an error or fix the parenthesis part | +"| I will be happy to hear about it | +"| Thanks Or. | +"--------------------------------------------------------- + +" Remove any old syntax stuff hanging around +" 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 keyword specmanTodo contained TODO todo ToDo FIXME XXX + +syn keyword specmanStatement var instance on compute start event expect check that routine +syn keyword specmanStatement specman is also first only with like +syn keyword specmanStatement list of all radix hex dec bin ignore illegal +syn keyword specmanStatement traceable untraceable +syn keyword specmanStatement cover using count_only trace_only at_least transition item ranges +syn keyword specmanStatement cross text call task within + +syn keyword specmanMethod initialize non_terminal testgroup delayed exit finish +syn keyword specmanMethod out append print outf appendf +syn keyword specmanMethod post_generate pre_generate setup_test finalize_test extract_test +syn keyword specmanMethod init run copy as_a set_config dut_error add clear lock quit +syn keyword specmanMethod lock unlock release swap quit to_string value stop_run +syn keyword specmanMethod crc_8 crc_32 crc_32_flip get_config add0 all_indices and_all +syn keyword specmanMethod apply average count delete exists first_index get_indices +syn keyword specmanMethod has insert is_a_permutation is_empty key key_exists key_index +syn keyword specmanMethod last last_index max max_index max_value min min_index +syn keyword specmanMethod min_value or_all pop pop0 push push0 product resize reverse +syn keyword specmanMethod sort split sum top top0 unique clear is_all_iterations +syn keyword specmanMethod get_enclosing_unit hdl_path exec deep_compare deep_compare_physical +syn keyword specmanMethod pack unpack warning error fatal +syn match specmanMethod "size()" +syn keyword specmanPacking packing low high +syn keyword specmanType locker address +syn keyword specmanType body code vec chars +syn keyword specmanType integer real bool int long uint byte bits bit time string +syn keyword specmanType byte_array external_pointer +syn keyword specmanBoolean TRUE FALSE +syn keyword specmanPreCondit #ifdef #ifndef #else + +syn keyword specmanConditional choose matches +syn keyword specmanConditional if then else when try + + + +syn keyword specmanLabel case casex casez default + +syn keyword specmanLogical and or not xor + +syn keyword specmanRepeat until repeat while for from to step each do break continue +syn keyword specmanRepeat before next sequence always -kind network +syn keyword specmanRepeat index it me in new return result select + +syn keyword specmanTemporal cycle sample events forever +syn keyword specmanTemporal wait change negedge rise fall delay sync sim true detach eventually emit + +syn keyword specmanConstant MAX_INT MIN_INT NULL UNDEF + +syn keyword specmanDefine define as computed type extend +syn keyword specmanDefine verilog vhdl variable global sys +syn keyword specmanStructure struct unit +syn keyword specmanInclude import +syn keyword specmanConstraint gen keep keeping soft before + +syn keyword specmanSpecial untyped symtab ECHO DOECHO +syn keyword specmanFile files load module ntv source_ref script read write +syn keyword specmanFSM initial idle others posedge clock cycles + + +syn match specmanOperator "[&|~>"hs=s+2 end="^<'"he=e-2 + +syn match specmanHDL "'[`.a-zA-Z0-9_@\[\]]\+\>'" + + +syn match specmanCompare "==" +syn match specmanCompare "!===" +syn match specmanCompare "===" +syn match specmanCompare "!=" +syn match specmanCompare ">=" +syn match specmanCompare "<=" +syn match specmanNumber "[0-9]:[0-9]" +syn match specmanNumber "\(\<\d\+\|\)'[bB]\s*[0-1_xXzZ?]\+\>" +syn match specmanNumber "0[bB]\s*[0-1_xXzZ?]\+\>" +syn match specmanNumber "\(\<\d\+\|\)'[oO]\s*[0-7_xXzZ?]\+\>" +syn match specmanNumber "0[oO]\s*[0-9a-fA-F_xXzZ?]\+\>" +syn match specmanNumber "\(\<\d\+\|\)'[dD]\s*[0-9_xXzZ?]\+\>" +syn match specmanNumber "\(\<\d\+\|\)'[hH]\s*[0-9a-fA-F_xXzZ?]\+\>" +syn match specmanNumber "0[xX]\s*[0-9a-fA-F_xXzZ?]\+\>" +syn match specmanNumber "\<[+-]\=[0-9_]\+\(\.[0-9_]*\|\)\(e[0-9_]*\|\)\>" + +syn region specmanString start=+"+ end=+"+ + + + +"********************************************************************** +" I took this section from c.vim but I didnt succeded to make it work +" ANY one who dare jumping to this deep watter is more than welocome! +"********************************************************************** +""catch errors caused by wrong parenthesis and brackets + +"syn cluster specmanParenGroup contains=specmanParenError +"" ,specmanNumbera,specmanComment +"if exists("specman_no_bracket_error") +"syn region specmanParen transparent start='(' end=')' contains=ALLBUT,@specmanParenGroup +"syn match specmanParenError ")" +"syn match specmanErrInParen contained "[{}]" +"else +"syn region specmanParen transparent start='(' end=')' contains=ALLBUT,@specmanParenGroup,specmanErrInBracket +"syn match specmanParenError "[\])]" +"syn match specmanErrInParen contained "[\]{}]" +"syn region specmanBracket transparent start='\[' end=']' contains=ALLBUT,@specmanParenGroup,specmanErrInParen +"syn match specmanErrInBracket contained "[);{}]" +"endif +" + +"Modify the following as needed. The trade-off is performance versus +"functionality. + +syn sync lines=50 + +" 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_specman_syn_inits") + if version < 508 + let did_specman_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + " The default methods for highlighting. Can be overridden later + HiLink specmanConditional Conditional + HiLink specmanConstraint Conditional + HiLink specmanRepeat Repeat + HiLink specmanString String + HiLink specmanComment Comment + HiLink specmanConstant Macro + HiLink specmanNumber Number + HiLink specmanCompare Operator + HiLink specmanOperator Operator + HiLink specmanLogical Operator + HiLink specmanStatement Statement + HiLink specmanHDL SpecialChar + HiLink specmanMethod Function + HiLink specmanInclude Include + HiLink specmanStructure Structure + HiLink specmanBoolean Boolean + HiLink specmanFSM Label + HiLink specmanSpecial Special + HiLink specmanType Type + HiLink specmanTemporal Type + HiLink specmanFile Include + HiLink specmanPreCondit Include + HiLink specmanDefine Typedef + HiLink specmanLabel Label + HiLink specmanPacking keyword + HiLink specmanTodo Todo + HiLink specmanParenError Error + HiLink specmanErrInParen Error + HiLink specmanErrInBracket Error + delcommand HiLink +endif + +let b:current_syntax = "specman" diff --git a/vim/bundle/ubuntu-vim72/syntax/spice.vim b/vim/bundle/ubuntu-vim72/syntax/spice.vim new file mode 100644 index 0000000..ee1433e --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/spice.vim @@ -0,0 +1,87 @@ +" Vim syntax file +" Language: Spice circuit simulator input netlist +" Maintainer: Noam Halevy +" Last Change: 12/08/99 +" +" This is based on sh.vim by Lennart Schultz +" but greatly simplified + +" 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 + +" spice syntax is case INsensitive +syn case ignore + +syn keyword spiceTodo contained TODO + +syn match spiceComment "^ \=\*.*$" +syn match spiceComment "\$.*$" + +" Numbers, all with engineering suffixes and optional units +"========================================================== +"floating point number, with dot, optional exponent +syn match spiceNumber "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=\(meg\=\|[afpnumkg]\)\=" +"floating point number, starting with a dot, optional exponent +syn match spiceNumber "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\(meg\=\|[afpnumkg]\)\=" +"integer number with optional exponent +syn match spiceNumber "\<[0-9]\+\(e[-+]\=[0-9]\+\)\=\(meg\=\|[afpnumkg]\)\=" + +" Misc +"===== +syn match spiceWrapLineOperator "\\$" +syn match spiceWrapLineOperator "^+" + +syn match spiceStatement "^ \=\.\I\+" + +" Matching pairs of parentheses +"========================================== +syn region spiceParen transparent matchgroup=spiceOperator start="(" end=")" contains=ALLBUT,spiceParenError +syn region spiceSinglequote matchgroup=spiceOperator start=+'+ end=+'+ + +" Errors +"======= +syn match spiceParenError ")" + +" Syncs +" ===== +syn sync minlines=50 + +" 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_spice_syntax_inits") + if version < 508 + let did_spice_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink spiceTodo Todo + HiLink spiceWrapLineOperator spiceOperator + HiLink spiceSinglequote spiceExpr + HiLink spiceExpr Function + HiLink spiceParenError Error + HiLink spiceStatement Statement + HiLink spiceNumber Number + HiLink spiceComment Comment + HiLink spiceOperator Operator + + delcommand HiLink +endif + +let b:current_syntax = "spice" + +" insert the following to $VIM/syntax/scripts.vim +" to autodetect HSpice netlists and text listing output: +" +" " Spice netlists and text listings +" elseif getline(1) =~ 'spice\>' || getline("$") =~ '^\.end' +" so :p:h/spice.vim + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/splint.vim b/vim/bundle/ubuntu-vim72/syntax/splint.vim new file mode 100644 index 0000000..dc09d8b --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/splint.vim @@ -0,0 +1,260 @@ +" Vim syntax file +" Language: splint (C with lclint/splint Annotations) +" Maintainer: Ralf Wildenhues +" Splint Home: http://www.splint.org/ +" Last Change: $Date: 2004/06/13 20:08:47 $ +" $Revision: 1.1 $ + +" Note: Splint annotated files are not detected by default. +" If you want to use this file for highlighting C code, +" please make sure splint.vim is sourced instead of c.vim, +" for example by putting +" /* vim: set filetype=splint : */ +" at the end of your code or something like +" au! BufRead,BufNewFile *.c setfiletype splint +" in your vimrc file or filetype.vim + + +" 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 + +" Read the C syntax to start with +if version < 600 + so :p:h/c.vim +else + runtime! syntax/c.vim +endif + + +" FIXME: uses and changes several clusters defined in c.vim +" so watch for changes there + +" TODO: make a little more grammar explicit +" match flags with hyphen and underscore notation +" match flag expanded forms +" accept other comment char than @ + +syn case match +" splint annotations (taken from 'splint -help annotations') +syn match splintStateAnnot contained "\(pre\|post\):\(only\|shared\|owned\|dependent\|observer\|exposed\|isnull\|notnull\)" +syn keyword splintSpecialAnnot contained special +syn keyword splintSpecTag contained uses sets defines allocated releases +syn keyword splintModifies contained modifies +syn keyword splintRequires contained requires ensures +syn keyword splintGlobals contained globals +syn keyword splintGlobitem contained internalState fileSystem +syn keyword splintGlobannot contained undef killed +syn keyword splintWarning contained warn + +syn keyword splintModitem contained internalState fileSystem nothing +syn keyword splintReqitem contained MaxSet MaxRead result +syn keyword splintIter contained iter yield +syn keyword splintConst contained constant +syn keyword splintAlt contained alt + +syn keyword splintType contained abstract concrete mutable immutable refcounted numabstract +syn keyword splintGlobalType contained unchecked checkmod checked checkedstrict +syn keyword splintMemMgm contained dependent keep killref only owned shared temp +syn keyword splintAlias contained unique returned +syn keyword splintExposure contained observer exposed +syn keyword splintDefState contained out in partial reldef +syn keyword splintGlobState contained undef killed +syn keyword splintNullState contained null notnull relnull +syn keyword splintNullPred contained truenull falsenull nullwhentrue falsewhennull +syn keyword splintExit contained exits mayexit trueexit falseexit neverexit +syn keyword splintExec contained noreturn maynotreturn noreturnwhentrue noreturnwhenfalse alwaysreturns +syn keyword splintSef contained sef +syn keyword splintDecl contained unused external +syn keyword splintCase contained fallthrough +syn keyword splintBreak contained innerbreak loopbreak switchbreak innercontinue +syn keyword splintUnreach contained notreached +syn keyword splintSpecFunc contained printflike scanflike messagelike + +" TODO: make these region or match +syn keyword splintErrSupp contained i ignore end t +syn match splintErrSupp contained "[it]\d\+\>" +syn keyword splintTypeAcc contained access noaccess + +syn keyword splintMacro contained notfunction +syn match splintSpecType contained "\(\|unsigned\|signed\)integraltype" + +" Flags taken from 'splint -help flags full' divided in local and global flags +" Local Flags: +syn keyword splintFlag contained abstract abstractcompare accessall accessczech accessczechoslovak +syn keyword splintFlag contained accessfile accessmodule accessslovak aliasunique allblock +syn keyword splintFlag contained allempty allglobs allimponly allmacros alwaysexits +syn keyword splintFlag contained annotationerror ansi89limits assignexpose badflag bitwisesigned +syn keyword splintFlag contained boolcompare boolfalse boolint boolops booltrue +syn keyword splintFlag contained booltype bounds boundscompacterrormessages boundsread boundswrite +syn keyword splintFlag contained branchstate bufferoverflow bufferoverflowhigh bugslimit casebreak +syn keyword splintFlag contained caseinsensitivefilenames castexpose castfcnptr charindex charint +syn keyword splintFlag contained charintliteral charunsignedchar checkedglobalias checkmodglobalias checkpost +syn keyword splintFlag contained checkstrictglobalias checkstrictglobs codeimponly commentchar commenterror +syn keyword splintFlag contained compdef compdestroy compmempass constmacros constprefix +syn keyword splintFlag contained constprefixexclude constuse continuecomment controlnestdepth cppnames +syn keyword splintFlag contained csvoverwrite czech czechconsts czechfcns czechmacros +syn keyword splintFlag contained czechoslovak czechoslovakconsts czechoslovakfcns czechoslovakmacros czechoslovaktypes +syn keyword splintFlag contained czechoslovakvars czechtypes czechvars debugfcnconstraint declundef +syn keyword splintFlag contained deepbreak deparrays dependenttrans distinctexternalnames distinctinternalnames +syn keyword splintFlag contained duplicatecases duplicatequals elseifcomplete emptyret enumindex +syn keyword splintFlag contained enumint enummembers enummemuse enumprefix enumprefixexclude +syn keyword splintFlag contained evalorder evalorderuncon exitarg exportany exportconst +syn keyword splintFlag contained exportfcn exportheader exportheadervar exportiter exportlocal +syn keyword splintFlag contained exportmacro exporttype exportvar exposetrans externalnamecaseinsensitive +syn keyword splintFlag contained externalnamelen externalprefix externalprefixexclude fcnderef fcnmacros +syn keyword splintFlag contained fcnpost fcnuse fielduse fileextensions filestaticprefix +syn keyword splintFlag contained filestaticprefixexclude firstcase fixedformalarray floatdouble forblock +syn keyword splintFlag contained forcehints forempty forloopexec formalarray formatcode +syn keyword splintFlag contained formatconst formattype forwarddecl freshtrans fullinitblock +syn keyword splintFlag contained globalias globalprefix globalprefixexclude globimponly globnoglobs +syn keyword splintFlag contained globs globsimpmodsnothing globstate globuse gnuextensions +syn keyword splintFlag contained grammar hasyield hints htmlfileformat ifblock +syn keyword splintFlag contained ifempty ignorequals ignoresigns immediatetrans impabstract +syn keyword splintFlag contained impcheckedglobs impcheckedspecglobs impcheckedstatics impcheckedstrictglobs impcheckedstrictspecglobs +syn keyword splintFlag contained impcheckedstrictstatics impcheckmodglobs impcheckmodinternals impcheckmodspecglobs impcheckmodstatics +syn keyword splintFlag contained impconj implementationoptional implictconstraint impouts imptype +syn keyword splintFlag contained includenest incompletetype incondefs incondefslib indentspaces +syn keyword splintFlag contained infloops infloopsuncon initallelements initsize internalglobs +syn keyword splintFlag contained internalglobsnoglobs internalnamecaseinsensitive internalnamelen internalnamelookalike iso99limits +syn keyword splintFlag contained isoreserved isoreservedinternal iterbalance iterloopexec iterprefix +syn keyword splintFlag contained iterprefixexclude iteryield its4low its4moderate its4mostrisky +syn keyword splintFlag contained its4risky its4veryrisky keep keeptrans kepttrans +syn keyword splintFlag contained legacy libmacros likelyboundsread likelyboundswrite likelybool +syn keyword splintFlag contained likelybounds limit linelen lintcomments localprefix +syn keyword splintFlag contained localprefixexclude locindentspaces longint longintegral longsignedintegral +syn keyword splintFlag contained longunsignedintegral longunsignedunsignedintegral loopexec looploopbreak looploopcontinue +syn keyword splintFlag contained loopswitchbreak macroassign macroconstdecl macrodecl macroempty +syn keyword splintFlag contained macrofcndecl macromatchname macroparams macroparens macroredef +syn keyword splintFlag contained macroreturn macrostmt macrounrecog macrovarprefix macrovarprefixexclude +syn keyword splintFlag contained maintype matchanyintegral matchfields mayaliasunique memchecks +syn keyword splintFlag contained memimp memtrans misplacedsharequal misscase modfilesys +syn keyword splintFlag contained modglobs modglobsnomods modglobsunchecked modinternalstrict modnomods +syn keyword splintFlag contained modobserver modobserveruncon mods modsimpnoglobs modstrictglobsnomods +syn keyword splintFlag contained moduncon modunconnomods modunspec multithreaded mustdefine +syn keyword splintFlag contained mustfree mustfreefresh mustfreeonly mustmod mustnotalias +syn keyword splintFlag contained mutrep namechecks needspec nestcomment nestedextern +syn keyword splintFlag contained newdecl newreftrans nextlinemacros noaccess nocomments +syn keyword splintFlag contained noeffect noeffectuncon noparams nopp noret +syn keyword splintFlag contained null nullassign nullderef nullinit nullpass +syn keyword splintFlag contained nullptrarith nullret nullstate nullterminated +syn keyword splintFlag contained numabstract numabstractcast numabstractindex numabstractlit numabstractprint +syn keyword splintFlag contained numenummembers numliteral numstructfields observertrans obviousloopexec +syn keyword splintFlag contained oldstyle onlytrans onlyunqglobaltrans orconstraint overload +syn keyword splintFlag contained ownedtrans paramimptemp paramuse parenfileformat partial +syn keyword splintFlag contained passunknown portability predassign predbool predboolint +syn keyword splintFlag contained predboolothers predboolptr preproc protoparammatch protoparamname +syn keyword splintFlag contained protoparamprefix protoparamprefixexclude ptrarith ptrcompare ptrnegate +syn keyword splintFlag contained quiet readonlystrings readonlytrans realcompare redecl +syn keyword splintFlag contained redef redundantconstraints redundantsharequal refcounttrans relaxquals +syn keyword splintFlag contained relaxtypes repeatunrecog repexpose retalias retexpose +syn keyword splintFlag contained retimponly retval retvalbool retvalint retvalother +syn keyword splintFlag contained sefparams sefuncon shadow sharedtrans shiftimplementation +syn keyword splintFlag contained shiftnegative shortint showallconjs showcolumn showconstraintlocation +syn keyword splintFlag contained showconstraintparens showdeephistory showfunc showloadloc showscan +syn keyword splintFlag contained showsourceloc showsummary sizeofformalarray sizeoftype skipisoheaders +syn keyword splintFlag contained skipposixheaders slashslashcomment slovak slovakconsts slovakfcns +syn keyword splintFlag contained slovakmacros slovaktypes slovakvars specglobimponly specimponly +syn keyword splintFlag contained specmacros specretimponly specstructimponly specundecl specundef +syn keyword splintFlag contained stackref statemerge statetransfer staticinittrans statictrans +syn keyword splintFlag contained strictbranchstate strictdestroy strictops strictusereleased stringliterallen +syn keyword splintFlag contained stringliteralnoroom stringliteralnoroomfinalnull stringliteralsmaller stringliteraltoolong structimponly +syn keyword splintFlag contained superuser switchloopbreak switchswitchbreak syntax sysdirerrors +syn keyword splintFlag contained sysdirexpandmacros sysunrecog tagprefix tagprefixexclude temptrans +syn keyword splintFlag contained tmpcomments toctou topuse trytorecover type +syn keyword splintFlag contained typeprefix typeprefixexclude typeuse uncheckedglobalias uncheckedmacroprefix +syn keyword splintFlag contained uncheckedmacroprefixexclude uniondef unixstandard unqualifiedinittrans unqualifiedtrans +syn keyword splintFlag contained unreachable unrecog unrecogcomments unrecogdirective unrecogflagcomments +syn keyword splintFlag contained unsignedcompare unusedspecial usedef usereleased usevarargs +syn keyword splintFlag contained varuse voidabstract warnflags warnlintcomments warnmissingglobs +syn keyword splintFlag contained warnmissingglobsnoglobs warnposixheaders warnrc warnsysfiles warnunixlib +syn keyword splintFlag contained warnuse whileblock whileempty whileloopexec zerobool +syn keyword splintFlag contained zeroptr +" Global Flags: +syn keyword splintGlobalFlag contained csv dump errorstream errorstreamstderr errorstreamstdout +syn keyword splintGlobalFlag contained expect f help i isolib +syn keyword splintGlobalFlag contained larchpath lclexpect lclimportdir lcs lh +syn keyword splintGlobalFlag contained load messagestream messagestreamstderr messagestreamstdout mts +syn keyword splintGlobalFlag contained neverinclude nof nolib posixlib posixstrictlib +syn keyword splintGlobalFlag contained showalluses singleinclude skipsysheaders stats streamoverwrite +syn keyword splintGlobalFlag contained strictlib supcounts sysdirs timedist tmpdir +syn keyword splintGlobalFlag contained unixlib unixstrictlib warningstream warningstreamstderr warningstreamstdout +syn keyword splintGlobalFlag contained whichlib +syn match splintFlagExpr contained "[\+\-\=]" nextgroup=splintFlag,splintGlobalFlag + +" detect missing /*@ and wrong */ +syn match splintAnnError "@\*/" +syn cluster cCommentGroup add=splintAnnError +syn match splintAnnError2 "[^@]\*/"hs=s+1 contained +syn region splintAnnotation start="/\*@" end="@\*/" contains=@splintAnnotElem,cType keepend +syn match splintShortAnn "/\*@\*/" +syn cluster splintAnnotElem contains=splintStateAnnot,splintSpecialAnnot,splintSpecTag,splintModifies,splintRequires,splintGlobals,splintGlobitem,splintGlobannot,splintWarning,splintModitem,splintIter,splintConst,splintAlt,splintType,splintGlobalType,splintMemMgm,splintAlias,splintExposure,splintDefState,splintGlobState,splintNullState,splintNullPred,splintExit,splintExec,splintSef,splintDecl,splintCase,splintBreak,splintUnreach,splintSpecFunc,splintErrSupp,splintTypeAcc,splintMacro,splintSpecType,splintAnnError2,splintFlagExpr +syn cluster splintAllStuff contains=@splintAnnotElem,splintFlag,splintGlobalFlag +syn cluster cParenGroup add=@splintAllStuff +syn cluster cPreProcGroup add=@splintAllStuff +syn cluster cMultiGroup add=@splintAllStuff + +" 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_splint_syntax_inits") + if version < 508 + let did_splint_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink splintShortAnn splintAnnotation + HiLink splintAnnotation Comment + HiLink splintAnnError splintError + HiLink splintAnnError2 splintError + HiLink splintFlag SpecialComment + HiLink splintGlobalFlag splintError + HiLink splintSpecialAnnot splintAnnKey + HiLink splintStateAnnot splintAnnKey + HiLink splintSpecTag splintAnnKey + HiLink splintModifies splintAnnKey + HiLink splintRequires splintAnnKey + HiLink splintGlobals splintAnnKey + HiLink splintGlobitem Constant + HiLink splintGlobannot splintAnnKey + HiLink splintWarning splintAnnKey + HiLink splintModitem Constant + HiLink splintIter splintAnnKey + HiLink splintConst splintAnnKey + HiLink splintAlt splintAnnKey + HiLink splintType splintAnnKey + HiLink splintGlobalType splintAnnKey + HiLink splintMemMgm splintAnnKey + HiLink splintAlias splintAnnKey + HiLink splintExposure splintAnnKey + HiLink splintDefState splintAnnKey + HiLink splintGlobState splintAnnKey + HiLink splintNullState splintAnnKey + HiLink splintNullPred splintAnnKey + HiLink splintExit splintAnnKey + HiLink splintExec splintAnnKey + HiLink splintSef splintAnnKey + HiLink splintDecl splintAnnKey + HiLink splintCase splintAnnKey + HiLink splintBreak splintAnnKey + HiLink splintUnreach splintAnnKey + HiLink splintSpecFunc splintAnnKey + HiLink splintErrSupp splintAnnKey + HiLink splintTypeAcc splintAnnKey + HiLink splintMacro splintAnnKey + HiLink splintSpecType splintAnnKey + HiLink splintAnnKey Type + HiLink splintError Error + + delcommand HiLink +endif + +let b:current_syntax = "splint" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/spup.vim b/vim/bundle/ubuntu-vim72/syntax/spup.vim new file mode 100644 index 0000000..af57737 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/spup.vim @@ -0,0 +1,277 @@ +" Vim syntax file +" Language: Speedup, plant simulator from AspenTech +" Maintainer: Stefan.Schwarzer +" URL: http://www.ndh.net/home/sschwarzer/download/spup.vim +" Last Change: 2003 May 11 +" Filename: spup.vim + +" Bugs +" - in the appropriate sections keywords are always highlighted +" even if they are not used with the appropriate meaning; +" example: in +" MODEL demonstration +" TYPE +" *area AS area +" both "area" are highlighted as spupType. +" +" If you encounter problems or have questions or suggestions, mail me + +" Remove old syntax stuff +" 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 + +" don't hightlight several keywords like subsections +"let strict_subsections = 1 + +" highlight types usually found in DECLARE section +if !exists("hightlight_types") + let highlight_types = 1 +endif + +" one line comment syntax (# comments) +" 1. allow appended code after comment, do not complain +" 2. show code beginnig with the second # as an error +" 3. show whole lines with more than one # as an error +if !exists("oneline_comments") + let oneline_comments = 2 +endif + +" Speedup SECTION regions +syn case ignore +syn region spupCdi matchgroup=spupSection start="^CDI" end="^\*\*\*\*" contains=spupCdiSubs,@spupOrdinary +syn region spupConditions matchgroup=spupSection start="^CONDITIONS" end="^\*\*\*\*" contains=spupConditionsSubs,@spupOrdinary,spupConditional,spupOperator,spupCode +syn region spupDeclare matchgroup=spupSection start="^DECLARE" end="^\*\*\*\*" contains=spupDeclareSubs,@spupOrdinary,spupTypes,spupCode +syn region spupEstimation matchgroup=spupSection start="^ESTIMATION" end="^\*\*\*\*" contains=spupEstimationSubs,@spupOrdinary +syn region spupExternal matchgroup=spupSection start="^EXTERNAL" end="^\*\*\*\*" contains=spupExternalSubs,@spupOrdinary +syn region spupFlowsheet matchgroup=spupSection start="^FLOWSHEET" end="^\*\*\*\*" contains=spupFlowsheetSubs,@spupOrdinary,spupStreams,@spupTextproc +syn region spupFunction matchgroup=spupSection start="^FUNCTION" end="^\*\*\*\*" contains=spupFunctionSubs,@spupOrdinary,spupHelp,spupCode,spupTypes +syn region spupGlobal matchgroup=spupSection start="^GLOBAL" end="^\*\*\*\*" contains=spupGlobalSubs,@spupOrdinary +syn region spupHomotopy matchgroup=spupSection start="^HOMOTOPY" end="^\*\*\*\*" contains=spupHomotopySubs,@spupOrdinary +syn region spupMacro matchgroup=spupSection start="^MACRO" end="^\*\*\*\*" contains=spupMacroSubs,@spupOrdinary,@spupTextproc,spupTypes,spupStreams,spupOperator +syn region spupModel matchgroup=spupSection start="^MODEL" end="^\*\*\*\*" contains=spupModelSubs,@spupOrdinary,spupConditional,spupOperator,spupTypes,spupStreams,@spupTextproc,spupHelp +syn region spupOperation matchgroup=spupSection start="^OPERATION" end="^\*\*\*\*" contains=spupOperationSubs,@spupOrdinary,@spupTextproc +syn region spupOptions matchgroup=spupSection start="^OPTIONS" end="^\*\*\*\*" contains=spupOptionsSubs,@spupOrdinary +syn region spupProcedure matchgroup=spupSection start="^PROCEDURE" end="^\*\*\*\*" contains=spupProcedureSubs,@spupOrdinary,spupHelp,spupCode,spupTypes +syn region spupProfiles matchgroup=spupSection start="^PROFILES" end="^\*\*\*\*" contains=@spupOrdinary,@spupTextproc +syn region spupReport matchgroup=spupSection start="^REPORT" end="^\*\*\*\*" contains=spupReportSubs,@spupOrdinary,spupHelp,@spupTextproc +syn region spupTitle matchgroup=spupSection start="^TITLE" end="^\*\*\*\*" contains=spupTitleSubs,spupComment,spupConstant,spupError +syn region spupUnit matchgroup=spupSection start="^UNIT" end="^\*\*\*\*" contains=spupUnitSubs,@spupOrdinary + +" Subsections +syn keyword spupCdiSubs INPUT FREE OUTPUT LINEARTIME MINNONZERO CALCULATE FILES SCALING contained +syn keyword spupDeclareSubs TYPE STREAM contained +syn keyword spupEstimationSubs ESTIMATE SSEXP DYNEXP RESULT contained +syn keyword spupExternalSubs TRANSMIT RECEIVE contained +syn keyword spupFlowsheetSubs STREAM contained +syn keyword spupFunctionSubs INPUT OUTPUT contained +syn keyword spupGlobalSubs VARIABLES MAXIMIZE MINIMIZE CONSTRAINT contained +syn keyword spupHomotopySubs VARY OPTIONS contained +syn keyword spupMacroSubs MODEL FLOWSHEET contained +syn keyword spupModelSubs CATEGORY SET TYPE STREAM EQUATION PROCEDURE contained +syn keyword spupOperationSubs SET PRESET INITIAL SSTATE FREE contained +syn keyword spupOptionsSubs ROUTINES TRANSLATE EXECUTION contained +syn keyword spupProcedureSubs INPUT OUTPUT SPACE PRECALL POSTCALL DERIVATIVE STREAM contained +" no subsections for Profiles +syn keyword spupReportSubs SET INITIAL FIELDS FIELDMARK DISPLAY WITHIN contained +syn keyword spupUnitSubs ROUTINES SET contained + +" additional keywords for subsections +if !exists( "strict_subsections" ) + syn keyword spupConditionsSubs STOP PRINT contained + syn keyword spupDeclareSubs UNIT SET COMPONENTS THERMO OPTIONS contained + syn keyword spupEstimationSubs VARY MEASURE INITIAL contained + syn keyword spupFlowsheetSubs TYPE FEED PRODUCT INPUT OUTPUT CONNECTION OF IS contained + syn keyword spupMacroSubs CONNECTION STREAM SET INPUT OUTPUT OF IS FEED PRODUCT TYPE contained + syn keyword spupModelSubs AS ARRAY OF INPUT OUTPUT CONNECTION contained + syn keyword spupOperationSubs WITHIN contained + syn keyword spupReportSubs LEFT RIGHT CENTER CENTRE UOM TIME DATE VERSION RELDATE contained + syn keyword spupUnitSubs IS A contained +endif + +" Speedup data types +if exists( "highlight_types" ) + syn keyword spupTypes act_coeff_liq area coefficient concentration contained + syn keyword spupTypes control_signal cond_liq cond_vap cp_mass_liq contained + syn keyword spupTypes cp_mol_liq cp_mol_vap cv_mol_liq cv_mol_vap contained + syn keyword spupTypes diffus_liq diffus_vap delta_p dens_mass contained + syn keyword spupTypes dens_mass_sol dens_mass_liq dens_mass_vap dens_mol contained + syn keyword spupTypes dens_mol_sol dens_mol_liq dens_mol_vap enthflow contained + syn keyword spupTypes enth_mass enth_mass_liq enth_mass_vap enth_mol contained + syn keyword spupTypes enth_mol_sol enth_mol_liq enth_mol_vap entr_mol contained + syn keyword spupTypes entr_mol_sol entr_mol_liq entr_mol_vap fraction contained + syn keyword spupTypes flow_mass flow_mass_liq flow_mass_vap flow_mol contained + syn keyword spupTypes flow_mol_vap flow_mol_liq flow_vol flow_vol_vap contained + syn keyword spupTypes flow_vol_liq fuga_vap fuga_liq fuga_sol contained + syn keyword spupTypes gibb_mol_sol heat_react heat_trans_coeff contained + syn keyword spupTypes holdup_heat holdup_heat_liq holdup_heat_vap contained + syn keyword spupTypes holdup_mass holdup_mass_liq holdup_mass_vap contained + syn keyword spupTypes holdup_mol holdup_mol_liq holdup_mol_vap k_value contained + syn keyword spupTypes length length_delta length_short liqfraction contained + syn keyword spupTypes liqmassfraction mass massfraction molefraction contained + syn keyword spupTypes molweight moment_inertia negative notype percent contained + syn keyword spupTypes positive pressure press_diff press_drop press_rise contained + syn keyword spupTypes ratio reaction reaction_mass rotation surf_tens contained + syn keyword spupTypes temperature temperature_abs temp_diff temp_drop contained + syn keyword spupTypes temp_rise time vapfraction vapmassfraction contained + syn keyword spupTypes velocity visc_liq visc_vap volume zmom_rate contained + syn keyword spupTypes seg_rate smom_rate tmom_rate zmom_mass seg_mass contained + syn keyword spupTypes smom_mass tmom_mass zmom_holdup seg_holdup contained + syn keyword spupTypes smom_holdup tmom_holdup contained +endif + +" stream types +syn keyword spupStreams mainstream vapour liquid contained + +" "conditional" keywords +syn keyword spupConditional IF THEN ELSE ENDIF contained +" Operators, symbols etc. +syn keyword spupOperator AND OR NOT contained +syn match spupSymbol "[,\-+=:;*/\"<>@%()]" contained +syn match spupSpecial "[&\$?]" contained +" Surprisingly, Speedup allows no unary + instead of the - +syn match spupError "[(=+\-*/]\s*+\d\+\([ed][+-]\=\d\+\)\=\>"lc=1 contained +syn match spupError "[(=+\-*/]\s*+\d\+\.\([ed][+-]\=\d\+\)\=\>"lc=1 contained +syn match spupError "[(=+\-*/]\s*+\d*\.\d\+\([ed][+-]\=\d\+\)\=\>"lc=1 contained +" String +syn region spupString start=+"+ end=+"+ oneline contained +syn region spupString start=+'+ end=+'+ oneline contained +" Identifier +syn match spupIdentifier "\<[a-z][a-z0-9_]*\>" contained +" Textprocessor directives +syn match spupTextprocGeneric "?[a-z][a-z0-9_]*\>" contained +syn region spupTextprocError matchgroup=spupTextprocGeneric start="?ERROR" end="?END"he=s-1 contained +" Number, without decimal point +syn match spupNumber "-\=\d\+\([ed][+-]\=\d\+\)\=" contained +" Number, allows 1. before exponent +syn match spupNumber "-\=\d\+\.\([ed][+-]\=\d\+\)\=" contained +" Number allows .1 before exponent +syn match spupNumber "-\=\d*\.\d\+\([ed][+-]\=\d\+\)\=" contained +" Help subsections +syn region spupHelp start="^HELP"hs=e+1 end="^\$ENDHELP"he=s-1 contained +" Fortran code +syn region spupCode start="^CODE"hs=e+1 end="^\$ENDCODE"he=s-1 contained +" oneline comments +if oneline_comments > 3 + oneline_comments = 2 " default +endif +if oneline_comments == 1 + syn match spupComment "#[^#]*#\=" +elseif oneline_comments == 2 + syn match spupError "#.*$" + syn match spupComment "#[^#]*" nextgroup=spupError +elseif oneline_comments == 3 + syn match spupComment "#[^#]*" + syn match spupError "#[^#]*#.*" +endif +" multiline comments +syn match spupOpenBrace "{" contained +syn match spupError "}" +syn region spupComment matchgroup=spupComment2 start="{" end="}" keepend contains=spupOpenBrace + +syn cluster spupOrdinary contains=spupNumber,spupIdentifier,spupSymbol +syn cluster spupOrdinary add=spupError,spupString,spupComment +syn cluster spupTextproc contains=spupTextprocGeneric,spupTextprocError + +" define syncronizing; especially OPERATION sections can become very large +syn sync clear +syn sync minlines=100 +syn sync maxlines=500 + +syn sync match spupSyncOperation grouphere spupOperation "^OPERATION" +syn sync match spupSyncCdi grouphere spupCdi "^CDI" +syn sync match spupSyncConditions grouphere spupConditions "^CONDITIONS" +syn sync match spupSyncDeclare grouphere spupDeclare "^DECLARE" +syn sync match spupSyncEstimation grouphere spupEstimation "^ESTIMATION" +syn sync match spupSyncExternal grouphere spupExternal "^EXTERNAL" +syn sync match spupSyncFlowsheet grouphere spupFlowsheet "^FLOWSHEET" +syn sync match spupSyncFunction grouphere spupFunction "^FUNCTION" +syn sync match spupSyncGlobal grouphere spupGlobal "^GLOBAL" +syn sync match spupSyncHomotopy grouphere spupHomotopy "^HOMOTOPY" +syn sync match spupSyncMacro grouphere spupMacro "^MACRO" +syn sync match spupSyncModel grouphere spupModel "^MODEL" +syn sync match spupSyncOperation grouphere spupOperation "^OPERATION" +syn sync match spupSyncOptions grouphere spupOptions "^OPTIONS" +syn sync match spupSyncProcedure grouphere spupProcedure "^PROCEDURE" +syn sync match spupSyncProfiles grouphere spupProfiles "^PROFILES" +syn sync match spupSyncReport grouphere spupReport "^REPORT" +syn sync match spupSyncTitle grouphere spupTitle "^TITLE" +syn sync match spupSyncUnit grouphere spupUnit "^UNIT" + +" 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_spup_syn_inits") + if version < 508 + let did_spup_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink spupCdi spupSection + HiLink spupConditions spupSection + HiLink spupDeclare spupSection + HiLink spupEstimation spupSection + HiLink spupExternal spupSection + HiLink spupFlowsheet spupSection + HiLink spupFunction spupSection + HiLink spupGlobal spupSection + HiLink spupHomotopy spupSection + HiLink spupMacro spupSection + HiLink spupModel spupSection + HiLink spupOperation spupSection + HiLink spupOptions spupSection + HiLink spupProcedure spupSection + HiLink spupProfiles spupSection + HiLink spupReport spupSection + HiLink spupTitle spupConstant " this is correct, truly ;) + HiLink spupUnit spupSection + + HiLink spupCdiSubs spupSubs + HiLink spupConditionsSubs spupSubs + HiLink spupDeclareSubs spupSubs + HiLink spupEstimationSubs spupSubs + HiLink spupExternalSubs spupSubs + HiLink spupFlowsheetSubs spupSubs + HiLink spupFunctionSubs spupSubs + HiLink spupHomotopySubs spupSubs + HiLink spupMacroSubs spupSubs + HiLink spupModelSubs spupSubs + HiLink spupOperationSubs spupSubs + HiLink spupOptionsSubs spupSubs + HiLink spupProcedureSubs spupSubs + HiLink spupReportSubs spupSubs + HiLink spupUnitSubs spupSubs + + HiLink spupCode Normal + HiLink spupComment Comment + HiLink spupComment2 spupComment + HiLink spupConditional Statement + HiLink spupConstant Constant + HiLink spupError Error + HiLink spupHelp Normal + HiLink spupIdentifier Identifier + HiLink spupNumber Constant + HiLink spupOperator Special + HiLink spupOpenBrace spupError + HiLink spupSection Statement + HiLink spupSpecial spupTextprocGeneric + HiLink spupStreams Type + HiLink spupString Constant + HiLink spupSubs Statement + HiLink spupSymbol Special + HiLink spupTextprocError Normal + HiLink spupTextprocGeneric PreProc + HiLink spupTypes Type + + delcommand HiLink +endif + +let b:current_syntax = "spup" + +" vim:ts=4 diff --git a/vim/bundle/ubuntu-vim72/syntax/spyce.vim b/vim/bundle/ubuntu-vim72/syntax/spyce.vim new file mode 100644 index 0000000..e76cb1a --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/spyce.vim @@ -0,0 +1,111 @@ +" Vim syntax file +" Language: SPYCE +" Maintainer: Rimon Barr +" URL: http://spyce.sourceforge.net +" Last Change: 2009 Nov 11 + +" 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 + +" we define it here so that included files can test for it +if !exists("main_syntax") + let main_syntax='spyce' +endif + +" Read the HTML syntax to start with +let b:did_indent = 1 " don't perform HTML indentation! +let html_no_rendering = 1 " do not render ,, etc... +if version < 600 + so :p:h/html.vim +else + runtime! syntax/html.vim + unlet b:current_syntax + syntax spell default " added by Bram +endif + +" include python +syn include @Python :p:h/python.vim +syn include @Html :p:h/html.vim + +" spyce definitions +syn keyword spyceDirectiveKeyword include compact module import contained +syn keyword spyceDirectiveArg name names file contained +syn region spyceDirectiveString start=+"+ end=+"+ contained +syn match spyceDirectiveValue "=[\t ]*[^'", \t>][^, \t>]*"hs=s+1 contained + +syn match spyceBeginErrorS ,\[\[, +syn match spyceBeginErrorA ,<%, +syn cluster spyceBeginError contains=spyceBeginErrorS,spyceBeginErrorA +syn match spyceEndErrorS ,\]\], +syn match spyceEndErrorA ,%>, +syn cluster spyceEndError contains=spyceEndErrorS,spyceEndErrorA + +syn match spyceEscBeginS ,\\\[\[, +syn match spyceEscBeginA ,\\<%, +syn cluster spyceEscBegin contains=spyceEscBeginS,spyceEscBeginA +syn match spyceEscEndS ,\\\]\], +syn match spyceEscEndA ,\\%>, +syn cluster spyceEscEnd contains=spyceEscEndS,spyceEscEndA +syn match spyceEscEndCommentS ,--\\\]\], +syn match spyceEscEndCommentA ,--\\%>, +syn cluster spyceEscEndComment contains=spyceEscEndCommentS,spyceEscEndCommentA + +syn region spyceStmtS matchgroup=spyceStmtDelim start=,\[\[, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend +syn region spyceStmtA matchgroup=spyceStmtDelim start=,<%, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend +syn region spyceChunkS matchgroup=spyceChunkDelim start=,\[\[\\, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend +syn region spyceChunkA matchgroup=spyceChunkDelim start=,<%\\, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend +syn region spyceEvalS matchgroup=spyceEvalDelim start=,\[\[=, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend +syn region spyceEvalA matchgroup=spyceEvalDelim start=,<%=, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend +syn region spyceDirectiveS matchgroup=spyceDelim start=,\[\[\., end=,\]\], contains=spyceBeginError,spyceDirectiveKeyword,spyceDirectiveArg,spyceDirectiveValue,spyceDirectiveString keepend +syn region spyceDirectiveA matchgroup=spyceDelim start=,<%@, end=,%>, contains=spyceBeginError,spyceDirectiveKeyword,spyceDirectiveArg,spyceDirectiveValue,spyceDirectiveString keepend +syn region spyceCommentS matchgroup=spyceCommentDelim start=,\[\[--, end=,--\]\], +syn region spyceCommentA matchgroup=spyceCommentDelim start=,<%--, end=,--%>, +syn region spyceLambdaS matchgroup=spyceLambdaDelim start=,\[\[spy!\?, end=,\]\], contains=@Html,@spyce extend +syn region spyceLambdaA matchgroup=spyceLambdaDelim start=,<%spy!\?, end=,%>, contains=@Html,@spyce extend + +syn cluster spyce contains=spyceStmtS,spyceStmtA,spyceChunkS,spyceChunkA,spyceEvalS,spyceEvalA,spyceCommentS,spyceCommentA,spyceDirectiveS,spyceDirectiveA + +syn cluster htmlPreproc contains=@spyce + +hi link spyceDirectiveKeyword Special +hi link spyceDirectiveArg Type +hi link spyceDirectiveString String +hi link spyceDirectiveValue String + +hi link spyceDelim Special +hi link spyceStmtDelim spyceDelim +hi link spyceChunkDelim spyceDelim +hi link spyceEvalDelim spyceDelim +hi link spyceLambdaDelim spyceDelim +hi link spyceCommentDelim Comment + +hi link spyceBeginErrorS Error +hi link spyceBeginErrorA Error +hi link spyceEndErrorS Error +hi link spyceEndErrorA Error + +hi link spyceStmtS spyce +hi link spyceStmtA spyce +hi link spyceChunkS spyce +hi link spyceChunkA spyce +hi link spyceEvalS spyce +hi link spyceEvalA spyce +hi link spyceDirectiveS spyce +hi link spyceDirectiveA spyce +hi link spyceCommentS Comment +hi link spyceCommentA Comment +hi link spyceLambdaS Normal +hi link spyceLambdaA Normal + +hi link spyce Statement + +let b:current_syntax = "spyce" +if main_syntax == 'spyce' + unlet main_syntax +endif + diff --git a/vim/bundle/ubuntu-vim72/syntax/sql.vim b/vim/bundle/ubuntu-vim72/syntax/sql.vim new file mode 100644 index 0000000..7ba20f3 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sql.vim @@ -0,0 +1,39 @@ +" Vim syntax file loader +" Language: SQL +" Maintainer: David Fishburn +" Last Change: Thu Sep 15 2005 10:30:02 AM +" Version: 1.0 + +" Description: Checks for a: +" buffer local variable, +" global variable, +" If the above exist, it will source the type specified. +" If none exist, it will source the default sql.vim file. +" +" 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 + +" Default to the standard Vim distribution file +let filename = 'sqloracle' + +" Check for overrides. Buffer variables have the highest priority. +if exists("b:sql_type_override") + " Check the runtimepath to see if the file exists + if globpath(&runtimepath, 'syntax/'.b:sql_type_override.'.vim') != '' + let filename = b:sql_type_override + endif +elseif exists("g:sql_type_default") + if globpath(&runtimepath, 'syntax/'.g:sql_type_default.'.vim') != '' + let filename = g:sql_type_default + endif +endif + +" Source the appropriate file +exec 'runtime syntax/'.filename.'.vim' + +" vim:sw=4: diff --git a/vim/bundle/ubuntu-vim72/syntax/sqlanywhere.vim b/vim/bundle/ubuntu-vim72/syntax/sqlanywhere.vim new file mode 100644 index 0000000..5abab38 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sqlanywhere.vim @@ -0,0 +1,686 @@ + +" Vim syntax file +" Language: SQL, Adaptive Server Anywhere +" Maintainer: David Fishburn +" Last Change: 2009 Mar 15 +" Version: 11.0.1 + +" Description: Updated to Adaptive Server Anywhere 11.0.1 +" Updated to Adaptive Server Anywhere 10.0.1 +" Updated to Adaptive Server Anywhere 9.0.2 +" Updated to Adaptive Server Anywhere 9.0.1 +" Updated to Adaptive Server Anywhere 9.0.0 +" +" 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 + +" The SQL reserved words, defined as keywords. + +syn keyword sqlSpecial false null true + +" common functions +syn keyword sqlFunction count sum avg min max debug_eng isnull +syn keyword sqlFunction greater lesser argn string ymd todate +syn keyword sqlFunction totimestamp date today now utc_now +syn keyword sqlFunction number identity years months weeks days +syn keyword sqlFunction hours minutes seconds second minute hour +syn keyword sqlFunction day month year dow date_format substr +syn keyword sqlFunction substring byte_substr length byte_length +syn keyword sqlFunction datalength ifnull evaluate list +syn keyword sqlFunction soundex similar difference like_start +syn keyword sqlFunction like_end regexp_compile +syn keyword sqlFunction regexp_compile_patindex remainder abs +syn keyword sqlFunction graphical_plan plan explanation ulplan +syn keyword sqlFunction graphical_ulplan long_ulplan +syn keyword sqlFunction short_ulplan rewrite watcomsql +syn keyword sqlFunction transactsql dialect estimate +syn keyword sqlFunction estimate_source index_estimate +syn keyword sqlFunction experience_estimate traceback wsql_state +syn keyword sqlFunction lang_message dateadd datediff datepart +syn keyword sqlFunction datename dayname monthname quarter +syn keyword sqlFunction tsequal hextoint inttohex rand textptr +syn keyword sqlFunction rowid grouping stddev variance rank +syn keyword sqlFunction dense_rank density percent_rank user_name +syn keyword sqlFunction user_id str stuff char_length nullif +syn keyword sqlFunction sortkey compare ts_index_statistics +syn keyword sqlFunction ts_table_statistics isdate isnumeric +syn keyword sqlFunction get_identity lookup newid uuidtostr +syn keyword sqlFunction strtouuid varexists + +" 9.0.1 functions +syn keyword sqlFunction acos asin atan atn2 cast ceiling convert cos cot +syn keyword sqlFunction char_length coalesce dateformat datetime degrees exp +syn keyword sqlFunction floor getdate insertstr +syn keyword sqlFunction log log10 lower mod pi power +syn keyword sqlFunction property radians replicate round sign sin +syn keyword sqlFunction sqldialect tan truncate truncnum +syn keyword sqlFunction base64_encode base64_decode +syn keyword sqlFunction hash compress decompress encrypt decrypt + +" 11.0.1 functions +syn keyword sqlFunction connection_extended_property text_handle_vector_match +syn keyword sqlFunction read_client_file write_client_file + +" string functions +syn keyword sqlFunction ascii char left ltrim repeat +syn keyword sqlFunction space right rtrim trim lcase ucase +syn keyword sqlFunction locate charindex patindex replace +syn keyword sqlFunction errormsg csconvert + +" property functions +syn keyword sqlFunction db_id db_name property_name +syn keyword sqlFunction property_description property_number +syn keyword sqlFunction next_connection next_database property +syn keyword sqlFunction connection_property db_property db_extended_property +syn keyword sqlFunction event_parmeter event_condition event_condition_name + +" sa_ procedures +syn keyword sqlFunction sa_add_index_consultant_analysis +syn keyword sqlFunction sa_add_workload_query +syn keyword sqlFunction sa_app_deregister +syn keyword sqlFunction sa_app_get_infoStr +syn keyword sqlFunction sa_app_get_status +syn keyword sqlFunction sa_app_register +syn keyword sqlFunction sa_app_registration_unlock +syn keyword sqlFunction sa_app_set_infoStr +syn keyword sqlFunction sa_audit_string +syn keyword sqlFunction sa_check_commit +syn keyword sqlFunction sa_checkpoint_execute +syn keyword sqlFunction sa_conn_activity +syn keyword sqlFunction sa_conn_compression_info +syn keyword sqlFunction sa_conn_deregister +syn keyword sqlFunction sa_conn_info +syn keyword sqlFunction sa_conn_properties +syn keyword sqlFunction sa_conn_properties_by_conn +syn keyword sqlFunction sa_conn_properties_by_name +syn keyword sqlFunction sa_conn_register +syn keyword sqlFunction sa_conn_set_status +syn keyword sqlFunction sa_create_analysis_from_query +syn keyword sqlFunction sa_db_info +syn keyword sqlFunction sa_db_properties +syn keyword sqlFunction sa_disable_auditing_type +syn keyword sqlFunction sa_disable_index +syn keyword sqlFunction sa_disk_free_space +syn keyword sqlFunction sa_enable_auditing_type +syn keyword sqlFunction sa_enable_index +syn keyword sqlFunction sa_end_forward_to +syn keyword sqlFunction sa_eng_properties +syn keyword sqlFunction sa_event_schedules +syn keyword sqlFunction sa_exec_script +syn keyword sqlFunction sa_flush_cache +syn keyword sqlFunction sa_flush_statistics +syn keyword sqlFunction sa_forward_to +syn keyword sqlFunction sa_get_dtt +syn keyword sqlFunction sa_get_histogram +syn keyword sqlFunction sa_get_request_profile +syn keyword sqlFunction sa_get_request_profile_sub +syn keyword sqlFunction sa_get_request_times +syn keyword sqlFunction sa_get_server_messages +syn keyword sqlFunction sa_get_simulated_scale_factors +syn keyword sqlFunction sa_get_workload_capture_status +syn keyword sqlFunction sa_index_density +syn keyword sqlFunction sa_index_levels +syn keyword sqlFunction sa_index_statistics +syn keyword sqlFunction sa_internal_alter_index_ability +syn keyword sqlFunction sa_internal_create_analysis_from_query +syn keyword sqlFunction sa_internal_disk_free_space +syn keyword sqlFunction sa_internal_get_dtt +syn keyword sqlFunction sa_internal_get_histogram +syn keyword sqlFunction sa_internal_get_request_times +syn keyword sqlFunction sa_internal_get_simulated_scale_factors +syn keyword sqlFunction sa_internal_get_workload_capture_status +syn keyword sqlFunction sa_internal_index_density +syn keyword sqlFunction sa_internal_index_levels +syn keyword sqlFunction sa_internal_index_statistics +syn keyword sqlFunction sa_internal_java_loaded_classes +syn keyword sqlFunction sa_internal_locks +syn keyword sqlFunction sa_internal_pause_workload_capture +syn keyword sqlFunction sa_internal_procedure_profile +syn keyword sqlFunction sa_internal_procedure_profile_summary +syn keyword sqlFunction sa_internal_read_backup_history +syn keyword sqlFunction sa_internal_recommend_indexes +syn keyword sqlFunction sa_internal_reset_identity +syn keyword sqlFunction sa_internal_resume_workload_capture +syn keyword sqlFunction sa_internal_start_workload_capture +syn keyword sqlFunction sa_internal_stop_index_consultant +syn keyword sqlFunction sa_internal_stop_workload_capture +syn keyword sqlFunction sa_internal_table_fragmentation +syn keyword sqlFunction sa_internal_table_page_usage +syn keyword sqlFunction sa_internal_table_stats +syn keyword sqlFunction sa_internal_virtual_sysindex +syn keyword sqlFunction sa_internal_virtual_sysixcol +syn keyword sqlFunction sa_java_loaded_classes +syn keyword sqlFunction sa_jdk_version +syn keyword sqlFunction sa_locks +syn keyword sqlFunction sa_make_object +syn keyword sqlFunction sa_pause_workload_capture +syn keyword sqlFunction sa_proc_debug_attach_to_connection +syn keyword sqlFunction sa_proc_debug_connect +syn keyword sqlFunction sa_proc_debug_detach_from_connection +syn keyword sqlFunction sa_proc_debug_disconnect +syn keyword sqlFunction sa_proc_debug_get_connection_name +syn keyword sqlFunction sa_proc_debug_release_connection +syn keyword sqlFunction sa_proc_debug_request +syn keyword sqlFunction sa_proc_debug_version +syn keyword sqlFunction sa_proc_debug_wait_for_connection +syn keyword sqlFunction sa_procedure_profile +syn keyword sqlFunction sa_procedure_profile_summary +syn keyword sqlFunction sa_read_backup_history +syn keyword sqlFunction sa_recommend_indexes +syn keyword sqlFunction sa_recompile_views +syn keyword sqlFunction sa_remove_index_consultant_analysis +syn keyword sqlFunction sa_remove_index_consultant_workload +syn keyword sqlFunction sa_reset_identity +syn keyword sqlFunction sa_resume_workload_capture +syn keyword sqlFunction sa_server_option +syn keyword sqlFunction sa_set_simulated_scale_factor +syn keyword sqlFunction sa_setremoteuser +syn keyword sqlFunction sa_setsubscription +syn keyword sqlFunction sa_start_recording_commits +syn keyword sqlFunction sa_start_workload_capture +syn keyword sqlFunction sa_statement_text +syn keyword sqlFunction sa_stop_index_consultant +syn keyword sqlFunction sa_stop_recording_commits +syn keyword sqlFunction sa_stop_workload_capture +syn keyword sqlFunction sa_sync +syn keyword sqlFunction sa_sync_sub +syn keyword sqlFunction sa_table_fragmentation +syn keyword sqlFunction sa_table_page_usage +syn keyword sqlFunction sa_table_stats +syn keyword sqlFunction sa_update_index_consultant_workload +syn keyword sqlFunction sa_validate +syn keyword sqlFunction sa_virtual_sysindex +syn keyword sqlFunction sa_virtual_sysixcol + +" sp_ procedures +syn keyword sqlFunction sp_addalias +syn keyword sqlFunction sp_addauditrecord +syn keyword sqlFunction sp_adddumpdevice +syn keyword sqlFunction sp_addgroup +syn keyword sqlFunction sp_addlanguage +syn keyword sqlFunction sp_addlogin +syn keyword sqlFunction sp_addmessage +syn keyword sqlFunction sp_addremotelogin +syn keyword sqlFunction sp_addsegment +syn keyword sqlFunction sp_addserver +syn keyword sqlFunction sp_addthreshold +syn keyword sqlFunction sp_addtype +syn keyword sqlFunction sp_adduser +syn keyword sqlFunction sp_auditdatabase +syn keyword sqlFunction sp_auditlogin +syn keyword sqlFunction sp_auditobject +syn keyword sqlFunction sp_auditoption +syn keyword sqlFunction sp_auditsproc +syn keyword sqlFunction sp_bindefault +syn keyword sqlFunction sp_bindmsg +syn keyword sqlFunction sp_bindrule +syn keyword sqlFunction sp_changedbowner +syn keyword sqlFunction sp_changegroup +syn keyword sqlFunction sp_checknames +syn keyword sqlFunction sp_checkperms +syn keyword sqlFunction sp_checkreswords +syn keyword sqlFunction sp_clearstats +syn keyword sqlFunction sp_column_privileges +syn keyword sqlFunction sp_columns +syn keyword sqlFunction sp_commonkey +syn keyword sqlFunction sp_configure +syn keyword sqlFunction sp_cursorinfo +syn keyword sqlFunction sp_databases +syn keyword sqlFunction sp_datatype_info +syn keyword sqlFunction sp_dboption +syn keyword sqlFunction sp_dbremap +syn keyword sqlFunction sp_depends +syn keyword sqlFunction sp_diskdefault +syn keyword sqlFunction sp_displaylogin +syn keyword sqlFunction sp_dropalias +syn keyword sqlFunction sp_dropdevice +syn keyword sqlFunction sp_dropgroup +syn keyword sqlFunction sp_dropkey +syn keyword sqlFunction sp_droplanguage +syn keyword sqlFunction sp_droplogin +syn keyword sqlFunction sp_dropmessage +syn keyword sqlFunction sp_dropremotelogin +syn keyword sqlFunction sp_dropsegment +syn keyword sqlFunction sp_dropserver +syn keyword sqlFunction sp_dropthreshold +syn keyword sqlFunction sp_droptype +syn keyword sqlFunction sp_dropuser +syn keyword sqlFunction sp_estspace +syn keyword sqlFunction sp_extendsegment +syn keyword sqlFunction sp_fkeys +syn keyword sqlFunction sp_foreignkey +syn keyword sqlFunction sp_getmessage +syn keyword sqlFunction sp_help +syn keyword sqlFunction sp_helpconstraint +syn keyword sqlFunction sp_helpdb +syn keyword sqlFunction sp_helpdevice +syn keyword sqlFunction sp_helpgroup +syn keyword sqlFunction sp_helpindex +syn keyword sqlFunction sp_helpjoins +syn keyword sqlFunction sp_helpkey +syn keyword sqlFunction sp_helplanguage +syn keyword sqlFunction sp_helplog +syn keyword sqlFunction sp_helpprotect +syn keyword sqlFunction sp_helpremotelogin +syn keyword sqlFunction sp_helpsegment +syn keyword sqlFunction sp_helpserver +syn keyword sqlFunction sp_helpsort +syn keyword sqlFunction sp_helptext +syn keyword sqlFunction sp_helpthreshold +syn keyword sqlFunction sp_helpuser +syn keyword sqlFunction sp_indsuspect +syn keyword sqlFunction sp_lock +syn keyword sqlFunction sp_locklogin +syn keyword sqlFunction sp_logdevice +syn keyword sqlFunction sp_login_environment +syn keyword sqlFunction sp_modifylogin +syn keyword sqlFunction sp_modifythreshold +syn keyword sqlFunction sp_monitor +syn keyword sqlFunction sp_password +syn keyword sqlFunction sp_pkeys +syn keyword sqlFunction sp_placeobject +syn keyword sqlFunction sp_primarykey +syn keyword sqlFunction sp_procxmode +syn keyword sqlFunction sp_recompile +syn keyword sqlFunction sp_remap +syn keyword sqlFunction sp_remote_columns +syn keyword sqlFunction sp_remote_exported_keys +syn keyword sqlFunction sp_remote_imported_keys +syn keyword sqlFunction sp_remote_pcols +syn keyword sqlFunction sp_remote_primary_keys +syn keyword sqlFunction sp_remote_procedures +syn keyword sqlFunction sp_remote_tables +syn keyword sqlFunction sp_remoteoption +syn keyword sqlFunction sp_rename +syn keyword sqlFunction sp_renamedb +syn keyword sqlFunction sp_reportstats +syn keyword sqlFunction sp_reset_tsql_environment +syn keyword sqlFunction sp_role +syn keyword sqlFunction sp_server_info +syn keyword sqlFunction sp_servercaps +syn keyword sqlFunction sp_serverinfo +syn keyword sqlFunction sp_serveroption +syn keyword sqlFunction sp_setlangalias +syn keyword sqlFunction sp_setreplicate +syn keyword sqlFunction sp_setrepproc +syn keyword sqlFunction sp_setreptable +syn keyword sqlFunction sp_spaceused +syn keyword sqlFunction sp_special_columns +syn keyword sqlFunction sp_sproc_columns +syn keyword sqlFunction sp_statistics +syn keyword sqlFunction sp_stored_procedures +syn keyword sqlFunction sp_syntax +syn keyword sqlFunction sp_table_privileges +syn keyword sqlFunction sp_tables +syn keyword sqlFunction sp_tsql_environment +syn keyword sqlFunction sp_tsql_feature_not_supported +syn keyword sqlFunction sp_unbindefault +syn keyword sqlFunction sp_unbindmsg +syn keyword sqlFunction sp_unbindrule +syn keyword sqlFunction sp_volchanged +syn keyword sqlFunction sp_who +syn keyword sqlFunction xp_scanf +syn keyword sqlFunction xp_sprintf + +" server functions +syn keyword sqlFunction col_length +syn keyword sqlFunction col_name +syn keyword sqlFunction index_col +syn keyword sqlFunction object_id +syn keyword sqlFunction object_name +syn keyword sqlFunction proc_role +syn keyword sqlFunction show_role +syn keyword sqlFunction xp_cmdshell +syn keyword sqlFunction xp_msver +syn keyword sqlFunction xp_read_file +syn keyword sqlFunction xp_real_cmdshell +syn keyword sqlFunction xp_real_read_file +syn keyword sqlFunction xp_real_sendmail +syn keyword sqlFunction xp_real_startmail +syn keyword sqlFunction xp_real_startsmtp +syn keyword sqlFunction xp_real_stopmail +syn keyword sqlFunction xp_real_stopsmtp +syn keyword sqlFunction xp_real_write_file +syn keyword sqlFunction xp_scanf +syn keyword sqlFunction xp_sendmail +syn keyword sqlFunction xp_sprintf +syn keyword sqlFunction xp_startmail +syn keyword sqlFunction xp_startsmtp +syn keyword sqlFunction xp_stopmail +syn keyword sqlFunction xp_stopsmtp +syn keyword sqlFunction xp_write_file + +" http functions +syn keyword sqlFunction http_header http_variable +syn keyword sqlFunction next_http_header next_http_variable +syn keyword sqlFunction sa_set_http_header sa_set_http_option +syn keyword sqlFunction sa_http_variable_info sa_http_header_info + +" http functions 9.0.1 +syn keyword sqlFunction http_encode http_decode +syn keyword sqlFunction html_encode html_decode + +" keywords +syn keyword sqlKeyword absolute accent action active add address aes_decrypt +syn keyword sqlKeyword after aggregate algorithm allow_dup_row allowed +syn keyword sqlKeyword alter and ansi_substring any as append apply asc ascii ase +syn keyword sqlKeyword assign at atan2 atomic attach attended audit authorization +syn keyword sqlKeyword autoincrement autostop batch bcp before +syn keyword sqlKeyword between bit_and bit_length bit_or bit_substr bit_xor +syn keyword sqlKeyword blank blanks block +syn keyword sqlKeyword both bottom unbounded break breaker bufferpool +syn keyword sqlKeyword build bulk by byte bytes cache calibrate calibration +syn keyword sqlKeyword cancel capability cascade cast +syn keyword sqlKeyword catalog ceil changes char char_convert check checksum +syn keyword sqlKeyword class classes client cmp +syn keyword sqlKeyword cluster clustered collation +syn keyword sqlKeyword column columns +syn keyword sqlKeyword command comment committed comparisons +syn keyword sqlKeyword compatible component compressed compute computes +syn keyword sqlKeyword concat configuration confirm conflict connection +syn keyword sqlKeyword console consolidate consolidated +syn keyword sqlKeyword constraint constraints content continue +syn keyword sqlKeyword convert coordinator copy count count_set_bits +syn keyword sqlKeyword crc createtime cross cube cume_dist +syn keyword sqlKeyword current cursor data data database +syn keyword sqlKeyword current_timestamp current_user +syn keyword sqlKeyword databases datatype dba dbfile +syn keyword sqlKeyword dbspace dbspaces dbspacename debug decoupled +syn keyword sqlKeyword decrypted default defaults default_dbspace deferred +syn keyword sqlKeyword definer definition +syn keyword sqlKeyword delay deleting delimited dependencies desc +syn keyword sqlKeyword description detach deterministic directory +syn keyword sqlKeyword disable disabled distinct do domain download duplicate +syn keyword sqlKeyword dsetpass dttm dynamic each editproc ejb +syn keyword sqlKeyword else elseif empty enable encapsulated encrypted end +syn keyword sqlKeyword encoding endif engine environment erase error escape escapes event +syn keyword sqlKeyword event_parameter every except exception exclude excluded exclusive exec +syn keyword sqlKeyword existing exists expanded expiry express exprtype extended_property +syn keyword sqlKeyword external externlogin factor failover false +syn keyword sqlKeyword fastfirstrow fieldproc file files filler +syn keyword sqlKeyword fillfactor finish first first_keyword first_value +syn keyword sqlKeyword following force foreign format forxml forxml_sep fp frame +syn keyword sqlKeyword freepage french fresh full function gb get_bit go global +syn keyword sqlKeyword group handler hash having header hexadecimal +syn keyword sqlKeyword hidden high history hg hng hold holdlock host +syn keyword sqlKeyword hours http_body http_session_timeout id identified identity ignore +syn keyword sqlKeyword ignore_dup_key ignore_dup_row immediate +syn keyword sqlKeyword in inactiv inactive inactivity included incremental +syn keyword sqlKeyword index index_enabled index_lparen indexonly info +syn keyword sqlKeyword inline inner inout insensitive inserting +syn keyword sqlKeyword instead integrated +syn keyword sqlKeyword internal intersection into introduced invoker iq is isolation +syn keyword sqlKeyword jar java java_location java_main_userid java_vm_options +syn keyword sqlKeyword jconnect jdk join kb key keep kerberos language last +syn keyword sqlKeyword last_keyword last_value lateral ld left len lf ln level like +syn keyword sqlKeyword limit local location log +syn keyword sqlKeyword logging login logscan long low lru main manual mark +syn keyword sqlKeyword match matched materialized max maximum mb membership +syn keyword sqlKeyword merge metadata methods minimum minutes mirror mode modify monitor move mru +syn keyword sqlKeyword multiplex name named national native natural new next no +syn keyword sqlKeyword noholdlock nolock nonclustered none not +syn keyword sqlKeyword notify null nullable_constant nulls object oem_string of off offline +syn keyword sqlKeyword old on online only openstring optimization optimizer option +syn keyword sqlKeyword or order others out outer over +syn keyword sqlKeyword package packetsize padding page pages +syn keyword sqlKeyword paglock parallel part partial partition partitions partner password path +syn keyword sqlKeyword pctfree plan policy populate port postfilter preceding precision +syn keyword sqlKeyword prefetch prefilter prefix preserve preview primary +syn keyword sqlKeyword prior priority priqty private privileges procedure profile +syn keyword sqlKeyword property_is_cumulative property_is_numeric public publication publish publisher +syn keyword sqlKeyword quiesce quote quotes range readclientfile readcommitted reader readfile readonly +syn keyword sqlKeyword readpast readuncommitted readwrite rebuild +syn keyword sqlKeyword received recompile recover recursive references +syn keyword sqlKeyword referencing refresh regex regexp regexp_substr relative relocate +syn keyword sqlKeyword rename repeatable repeatableread +syn keyword sqlKeyword replicate request_timeout required rereceive resend reserve reset +syn keyword sqlKeyword resizing resolve resource respect +syn keyword sqlKeyword restrict result retain +syn keyword sqlKeyword returns reverse right role +syn keyword sqlKeyword rollup root row row_number rowlock rows save +syn keyword sqlKeyword sa_index_hash sa_internal_fk_verify sa_internal_termbreak +syn keyword sqlKeyword sa_order_preserving_hash sa_order_preserving_hash_big sa_order_preserving_hash_prefix +syn keyword sqlKeyword schedule schema scope scripted scroll seconds secqty security +syn keyword sqlKeyword send sensitive sent serializable +syn keyword sqlKeyword server server session set_bit set_bits sets +syn keyword sqlKeyword share simple since site size skip +syn keyword sqlKeyword snapshot soapheader soap_header split some sorted_data +syn keyword sqlKeyword sqlcode sqlid sqlflagger sqlstate sqrt square +syn keyword sqlKeyword stacker stale statement statistics status stddev_pop stddev_samp +syn keyword sqlKeyword stemmer stogroup stoplist store +syn keyword sqlKeyword strip stripesizekb striping subpages subscribe subscription +syn keyword sqlKeyword subtransaction suser_id suser_name synchronization +syn keyword sqlKeyword syntax_error table tablock +syn keyword sqlKeyword tablockx tb temp template temporary term then +syn keyword sqlKeyword ties timezone to to_char to_nchar top traced_plan tracing +syn keyword sqlKeyword transfer transaction transactional tries true +syn keyword sqlKeyword tsequal type tune uncommitted unconditionally +syn keyword sqlKeyword unenforced unicode unique union unistr unknown unlimited unload +syn keyword sqlKeyword unpartition unquiesce updatetime updating updlock upgrade upload +syn keyword sqlKeyword upper use user +syn keyword sqlKeyword using utc utilities validproc +syn keyword sqlKeyword value values varchar variable +syn keyword sqlKeyword varying var_pop var_samp vcat verify versions view virtual wait +syn keyword sqlKeyword warning wd web when where window with with_auto +syn keyword sqlKeyword with_auto with_cube with_rollup without +syn keyword sqlKeyword with_lparen within word work workload write writefile +syn keyword sqlKeyword writeclientfile writer writers writeserver xlock zeros +" XML function support +syn keyword sqlFunction openxml xmlelement xmlforest xmlgen xmlconcat xmlagg +syn keyword sqlFunction xmlattributes +syn keyword sqlKeyword raw auto elements explicit +" HTTP support +syn keyword sqlKeyword authorization secure url service next_soap_header +" HTTP 9.0.2 new procedure keywords +syn keyword sqlKeyword namespace certificate clientport proxy +" OLAP support 9.0.0 +syn keyword sqlKeyword covar_pop covar_samp corr regr_slope regr_intercept +syn keyword sqlKeyword regr_count regr_r2 regr_avgx regr_avgy +syn keyword sqlKeyword regr_sxx regr_syy regr_sxy + +" Alternate keywords +syn keyword sqlKeyword character dec options proc reference +syn keyword sqlKeyword subtrans tran syn keyword + + +syn keyword sqlOperator in any some all between exists +syn keyword sqlOperator like escape not is and or +syn keyword sqlOperator intersect minus +syn keyword sqlOperator prior distinct + +syn keyword sqlStatement allocate alter backup begin call case +syn keyword sqlStatement checkpoint clear close commit configure connect +syn keyword sqlStatement create deallocate declare delete describe +syn keyword sqlStatement disconnect drop execute exit explain fetch +syn keyword sqlStatement for forward from get goto grant help if include +syn keyword sqlStatement input insert install leave load lock loop +syn keyword sqlStatement message open output parameter parameters passthrough +syn keyword sqlStatement prepare print put raiserror read readtext release +syn keyword sqlStatement remote remove reorganize resignal restore resume +syn keyword sqlStatement return revoke rollback savepoint select +syn keyword sqlStatement set setuser signal start stop synchronize +syn keyword sqlStatement system trigger truncate unload update +syn keyword sqlStatement validate waitfor whenever while writetext + + +syn keyword sqlType char long varchar text +syn keyword sqlType bigint decimal double float int integer numeric +syn keyword sqlType smallint tinyint real +syn keyword sqlType money smallmoney +syn keyword sqlType bit +syn keyword sqlType date datetime smalldate time timestamp +syn keyword sqlType binary image varbinary uniqueidentifier +syn keyword sqlType xml unsigned +" New types 10.0.0 +syn keyword sqlType varbit nchar nvarchar + +syn keyword sqlOption Allow_nulls_by_default +syn keyword sqlOption Allow_read_client_file +syn keyword sqlOption Allow_snapshot_isolation +syn keyword sqlOption Allow_write_client_file +syn keyword sqlOption Ansi_blanks +syn keyword sqlOption Ansi_close_cursors_on_rollback +syn keyword sqlOption Ansi_permissions +syn keyword sqlOption Ansi_substring +syn keyword sqlOption Ansi_update_constraints +syn keyword sqlOption Ansinull +syn keyword sqlOption Auditing +syn keyword sqlOption Auditing_options +syn keyword sqlOption Background_priority +syn keyword sqlOption Blocking +syn keyword sqlOption Blocking_timeout +syn keyword sqlOption Chained +syn keyword sqlOption Checkpoint_time +syn keyword sqlOption Cis_option +syn keyword sqlOption Cis_rowset_size +syn keyword sqlOption Close_on_endtrans +syn keyword sqlOption Collect_statistics_on_dml_updates +syn keyword sqlOption Conn_auditing +syn keyword sqlOption Connection_authentication +syn keyword sqlOption Continue_after_raiserror +syn keyword sqlOption Conversion_error +syn keyword sqlOption Cooperative_commit_timeout +syn keyword sqlOption Cooperative_commits +syn keyword sqlOption Database_authentication +syn keyword sqlOption Date_format +syn keyword sqlOption Date_order +syn keyword sqlOption Debug_messages +syn keyword sqlOption Dedicated_task +syn keyword sqlOption Default_dbspace +syn keyword sqlOption Default_timestamp_increment +syn keyword sqlOption Delayed_commit_timeout +syn keyword sqlOption Delayed_commits +syn keyword sqlOption Escape_character +syn keyword sqlOption Exclude_operators +syn keyword sqlOption Extended_join_syntax +syn keyword sqlOption Fire_triggers +syn keyword sqlOption First_day_of_week +syn keyword sqlOption For_xml_null_treatment +syn keyword sqlOption Force_view_creation +syn keyword sqlOption Global_database_id +syn keyword sqlOption Http_session_timeout +syn keyword sqlOption Integrated_server_name +syn keyword sqlOption Isolation_level +syn keyword sqlOption Java_location +syn keyword sqlOption Java_main_userid +syn keyword sqlOption Java_vm_options +syn keyword sqlOption Lock_rejected_rows +syn keyword sqlOption Log_deadlocks +syn keyword sqlOption Login_mode +syn keyword sqlOption Login_procedure +syn keyword sqlOption Materialized_view_optimization +syn keyword sqlOption Max_client_statements_cached +syn keyword sqlOption Max_cursor_count +syn keyword sqlOption Max_hash_size +syn keyword sqlOption Max_plans_cached +syn keyword sqlOption Max_priority +syn keyword sqlOption Max_query_tasks +syn keyword sqlOption Max_recursive_iterations +syn keyword sqlOption Max_statement_count +syn keyword sqlOption Max_temp_space +syn keyword sqlOption Min_password_length +syn keyword sqlOption Nearest_century +syn keyword sqlOption Non_keywords +syn keyword sqlOption Odbc_describe_binary_as_varbinary +syn keyword sqlOption Odbc_distinguish_char_and_varchar +syn keyword sqlOption Oem_string +syn keyword sqlOption On_charset_conversion_failure +syn keyword sqlOption On_tsql_error +syn keyword sqlOption Optimization_goal +syn keyword sqlOption Optimization_level +syn keyword sqlOption Optimization_workload +syn keyword sqlOption Pinned_cursor_percent_of_cache +syn keyword sqlOption Post_login_procedure +syn keyword sqlOption Precision +syn keyword sqlOption Prefetch +syn keyword sqlOption Preserve_source_format +syn keyword sqlOption Prevent_article_pkey_update +syn keyword sqlOption Priority +syn keyword sqlOption Query_mem_timeout +syn keyword sqlOption Quoted_identifier +syn keyword sqlOption Read_past_deleted +syn keyword sqlOption Recovery_time +syn keyword sqlOption Remote_idle_timeout +syn keyword sqlOption Replicate_all +syn keyword sqlOption Request_timeout +syn keyword sqlOption Return_date_time_as_string +syn keyword sqlOption Rollback_on_deadlock +syn keyword sqlOption Row_counts +syn keyword sqlOption Scale +syn keyword sqlOption Secure_feature_key +syn keyword sqlOption Sort_collation +syn keyword sqlOption Sql_flagger_error_level +syn keyword sqlOption Sql_flagger_warning_level +syn keyword sqlOption String_rtruncation +syn keyword sqlOption Subsume_row_locks +syn keyword sqlOption Suppress_tds_debugging +syn keyword sqlOption Synchronize_mirror_on_commit +syn keyword sqlOption Tds_empty_string_is_null +syn keyword sqlOption Temp_space_limit_check +syn keyword sqlOption Time_format +syn keyword sqlOption Time_zone_adjustment +syn keyword sqlOption Timestamp_format +syn keyword sqlOption Truncate_timestamp_values +syn keyword sqlOption Tsql_outer_joins +syn keyword sqlOption Tsql_variables +syn keyword sqlOption Updatable_statement_isolation +syn keyword sqlOption Update_statistics +syn keyword sqlOption Upgrade_database_capability +syn keyword sqlOption User_estimates +syn keyword sqlOption Verify_password_function +syn keyword sqlOption Wait_for_commit +syn keyword sqlOption Webservice_namespace_host + +" Strings and characters: +syn region sqlString start=+"+ end=+"+ contains=@Spell +syn region sqlString start=+'+ end=+'+ contains=@Spell + +" Numbers: +syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>" + +" Comments: +syn region sqlDashComment start=/--/ end=/$/ contains=@Spell +syn region sqlSlashComment start=/\/\// end=/$/ contains=@Spell +syn region sqlMultiComment start="/\*" end="\*/" contains=sqlMultiComment,@Spell +syn cluster sqlComment contains=sqlDashComment,sqlSlashComment,sqlMultiComment,@Spell +syn sync ccomment sqlComment +syn sync ccomment sqlDashComment +syn sync ccomment sqlSlashComment + +" 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_sql_syn_inits") + if version < 508 + let did_sql_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi link + endif + + HiLink sqlDashComment Comment + HiLink sqlSlashComment Comment + HiLink sqlMultiComment Comment + HiLink sqlNumber Number + HiLink sqlOperator Operator + HiLink sqlSpecial Special + HiLink sqlKeyword Keyword + HiLink sqlStatement Statement + HiLink sqlString String + HiLink sqlType Type + HiLink sqlFunction Function + HiLink sqlOption PreProc + + delcommand HiLink +endif + +let b:current_syntax = "sqlanywhere" + +" vim:sw=4: diff --git a/vim/bundle/ubuntu-vim72/syntax/sqlforms.vim b/vim/bundle/ubuntu-vim72/syntax/sqlforms.vim new file mode 100644 index 0000000..055b2ae --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sqlforms.vim @@ -0,0 +1,168 @@ +" Vim syntax file +" Language: SQL*Forms (Oracle 7), based on sql.vim (vim5.0) +" Maintainer: Austin Ziegler (austin@halostatue.ca) +" Last Change: 2003 May 11 +" Prev Change: 19980710 +" URL: http://www.halostatue.ca/vim/syntax/proc.vim +" +" TODO Find a new maintainer who knows SQL*Forms. + + " 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 + +syntax case ignore + +if version >= 600 + setlocal iskeyword=a-z,A-Z,48-57,_,.,-,> +else + set iskeyword=a-z,A-Z,48-57,_,.,-,> +endif + + + " The SQL reserved words, defined as keywords. +syntax match sqlTriggers /on-.*$/ +syntax match sqlTriggers /key-.*$/ +syntax match sqlTriggers /post-.*$/ +syntax match sqlTriggers /pre-.*$/ +syntax match sqlTriggers /user-.*$/ + +syntax keyword sqlSpecial null false true + +syntax keyword sqlProcedure abort_query anchor_view bell block_menu break call +syntax keyword sqlProcedure call_input call_query clear_block clear_eol +syntax keyword sqlProcedure clear_field clear_form clear_record commit_form +syntax keyword sqlProcedure copy count_query create_record default_value +syntax keyword sqlProcedure delete_record display_error display_field down +syntax keyword sqlProcedure duplicate_field duplicate_record edit_field +syntax keyword sqlProcedure enter enter_query erase execute_query +syntax keyword sqlProcedure execute_trigger exit_form first_Record go_block +syntax keyword sqlProcedure go_field go_record help hide_menu hide_page host +syntax keyword sqlProcedure last_record list_values lock_record message +syntax keyword sqlProcedure move_view new_form next_block next_field next_key +syntax keyword sqlProcedure next_record next_set pause post previous_block +syntax keyword sqlProcedure previous_field previous_record print redisplay +syntax keyword sqlProcedure replace_menu resize_view scroll_down scroll_up +syntax keyword sqlProcedure set_field show_keys show_menu show_page +syntax keyword sqlProcedure synchronize up user_exit + +syntax keyword sqlFunction block_characteristic error_code error_text +syntax keyword sqlFunction error_type field_characteristic form_failure +syntax keyword sqlFunction form_fatal form_success name_in + +syntax keyword sqlParameters hide no_hide replace no_replace ask_commit +syntax keyword sqlParameters do_commit no_commit no_validate all_records +syntax keyword sqlParameters for_update no_restrict restrict no_screen +syntax keyword sqlParameters bar full_screen pull_down auto_help auto_skip +syntax keyword sqlParameters fixed_length enterable required echo queryable +syntax keyword sqlParameters updateable update_null upper_case attr_on +syntax keyword sqlParameters attr_off base_table first_field last_field +syntax keyword sqlParameters datatype displayed display_length field_length +syntax keyword sqlParameters list page primary_key query_length x_pos y_pos + +syntax match sqlSystem /system\.block_status/ +syntax match sqlSystem /system\.current_block/ +syntax match sqlSystem /system\.current_field/ +syntax match sqlSystem /system\.current_form/ +syntax match sqlSystem /system\.current_value/ +syntax match sqlSystem /system\.cursor_block/ +syntax match sqlSystem /system\.cursor_field/ +syntax match sqlSystem /system\.cursor_record/ +syntax match sqlSystem /system\.cursor_value/ +syntax match sqlSystem /system\.form_status/ +syntax match sqlSystem /system\.last_query/ +syntax match sqlSystem /system\.last_record/ +syntax match sqlSystem /system\.message_level/ +syntax match sqlSystem /system\.record_status/ +syntax match sqlSystem /system\.trigger_block/ +syntax match sqlSystem /system\.trigger_field/ +syntax match sqlSystem /system\.trigger_record/ +syntax match sqlSystem /\$\$date\$\$/ +syntax match sqlSystem /\$\$time\$\$/ + +syntax keyword sqlKeyword accept access add as asc by check cluster column +syntax keyword sqlKeyword compress connect current decimal default +syntax keyword sqlKeyword desc exclusive file for from group +syntax keyword sqlKeyword having identified immediate increment index +syntax keyword sqlKeyword initial into is level maxextents mode modify +syntax keyword sqlKeyword nocompress nowait of offline on online start +syntax keyword sqlKeyword successful synonym table to trigger uid +syntax keyword sqlKeyword unique user validate values view whenever +syntax keyword sqlKeyword where with option order pctfree privileges +syntax keyword sqlKeyword public resource row rowlabel rownum rows +syntax keyword sqlKeyword session share size smallint sql\*forms_version +syntax keyword sqlKeyword terse define form name title procedure begin +syntax keyword sqlKeyword default_menu_application trigger block field +syntax keyword sqlKeyword enddefine declare exception raise when cursor +syntax keyword sqlKeyword definition base_table pragma +syntax keyword sqlKeyword column_name global trigger_type text description +syntax match sqlKeyword "<<<" +syntax match sqlKeyword ">>>" + +syntax keyword sqlOperator not and or out to_number to_date message erase +syntax keyword sqlOperator in any some all between exists substr nvl +syntax keyword sqlOperator exception_init +syntax keyword sqlOperator like escape trunc lpad rpad sum +syntax keyword sqlOperator union intersect minus to_char greatest +syntax keyword sqlOperator prior distinct decode least avg +syntax keyword sqlOperator sysdate true false field_characteristic +syntax keyword sqlOperator display_field call host + +syntax keyword sqlStatement alter analyze audit comment commit create +syntax keyword sqlStatement delete drop explain grant insert lock noaudit +syntax keyword sqlStatement rename revoke rollback savepoint select set +syntax keyword sqlStatement truncate update if elsif loop then +syntax keyword sqlStatement open fetch close else end + +syntax keyword sqlType char character date long raw mlslabel number rowid +syntax keyword sqlType varchar varchar2 float integer boolean global + +syntax keyword sqlCodes sqlcode no_data_found too_many_rows others +syntax keyword sqlCodes form_trigger_failure notfound found +syntax keyword sqlCodes validate no_commit + + " Comments: +syntax region sqlComment start="/\*" end="\*/" +syntax match sqlComment "--.*" + + " Strings and characters: +syntax region sqlString start=+"+ skip=+\\\\\|\\"+ end=+"+ +syntax region sqlString start=+'+ skip=+\\\\\|\\"+ end=+'+ + + " Numbers: +syntax match sqlNumber "-\=\<[0-9]*\.\=[0-9_]\>" + +syntax sync ccomment sqlComment + +if version >= 508 || !exists("did_sqlforms_syn_inits") + if version < 508 + let did_sqlforms_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink sqlComment Comment + HiLink sqlKeyword Statement + HiLink sqlNumber Number + HiLink sqlOperator Statement + HiLink sqlProcedure Statement + HiLink sqlFunction Statement + HiLink sqlSystem Identifier + HiLink sqlSpecial Special + HiLink sqlStatement Statement + HiLink sqlString String + HiLink sqlType Type + HiLink sqlCodes Identifier + HiLink sqlTriggers PreProc + + delcommand HiLink +endif + +let b:current_syntax = "sqlforms" + +" vim: ts=8 sw=4 diff --git a/vim/bundle/ubuntu-vim72/syntax/sqlinformix.vim b/vim/bundle/ubuntu-vim72/syntax/sqlinformix.vim new file mode 100644 index 0000000..b4d0236 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sqlinformix.vim @@ -0,0 +1,196 @@ +" Vim syntax file +" Informix Structured Query Language (SQL) and Stored Procedure Language (SPL) +" Language: SQL, SPL (Informix Dynamic Server 2000 v9.2) +" Maintainer: Dean Hill +" Last Change: 2004 Aug 30 + +" 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 + + + +" === Comment syntax group === +syn region sqlComment start="{" end="}" contains=sqlTodo +syn match sqlComment "--.*$" contains=sqlTodo +syn sync ccomment sqlComment + + + +" === Constant syntax group === +" = Boolean subgroup = +syn keyword sqlBoolean true false +syn keyword sqlBoolean null +syn keyword sqlBoolean public user +syn keyword sqlBoolean current today +syn keyword sqlBoolean year month day hour minute second fraction + +" = String subgroup = +syn region sqlString start=+"+ end=+"+ +syn region sqlString start=+'+ end=+'+ + +" = Numbers subgroup = +syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>" + + + +" === Statement syntax group === +" SQL +syn keyword sqlStatement allocate alter +syn keyword sqlStatement begin +syn keyword sqlStatement close commit connect create +syn keyword sqlStatement database deallocate declare delete describe disconnect drop +syn keyword sqlStatement execute fetch flush free get grant info insert +syn keyword sqlStatement load lock open output +syn keyword sqlStatement prepare put +syn keyword sqlStatement rename revoke rollback select set start stop +syn keyword sqlStatement truncate unload unlock update +syn keyword sqlStatement whenever +" SPL +syn keyword sqlStatement call continue define +syn keyword sqlStatement exit +syn keyword sqlStatement let +syn keyword sqlStatement return system trace + +" = Conditional subgroup = +" SPL +syn keyword sqlConditional elif else if then +syn keyword sqlConditional case +" Highlight "end if" with one or more separating spaces +syn match sqlConditional "end \+if" + +" = Repeat subgroup = +" SQL/SPL +" Handle SQL triggers' "for each row" clause and SPL "for" loop +syn match sqlRepeat "for\( \+each \+row\)\=" +" SPL +syn keyword sqlRepeat foreach while +" Highlight "end for", etc. with one or more separating spaces +syn match sqlRepeat "end \+for" +syn match sqlRepeat "end \+foreach" +syn match sqlRepeat "end \+while" + +" = Exception subgroup = +" SPL +syn match sqlException "on \+exception" +syn match sqlException "end \+exception" +syn match sqlException "end \+exception \+with \+resume" +syn match sqlException "raise \+exception" + +" = Keyword subgroup = +" SQL +syn keyword sqlKeyword aggregate add as authorization autofree by +syn keyword sqlKeyword cache cascade check cluster collation +syn keyword sqlKeyword column connection constraint cross +syn keyword sqlKeyword dataskip debug default deferred_prepare +syn keyword sqlKeyword descriptor diagnostics +syn keyword sqlKeyword each escape explain external +syn keyword sqlKeyword file foreign fragment from function +syn keyword sqlKeyword group having +syn keyword sqlKeyword immediate index inner into isolation +syn keyword sqlKeyword join key +syn keyword sqlKeyword left level log +syn keyword sqlKeyword mode modify mounting new no +syn keyword sqlKeyword object of old optical option +syn keyword sqlKeyword optimization order outer +syn keyword sqlKeyword pdqpriority pload primary procedure +syn keyword sqlKeyword references referencing release reserve +syn keyword sqlKeyword residency right role routine row +syn keyword sqlKeyword schedule schema scratch session set +syn keyword sqlKeyword statement statistics synonym +syn keyword sqlKeyword table temp temporary timeout to transaction trigger +syn keyword sqlKeyword using values view violations +syn keyword sqlKeyword where with work +" Highlight "on" (if it's not followed by some words we've already handled) +syn match sqlKeyword "on \+\(exception\)\@!" +" SPL +" Highlight "end" (if it's not followed by some words we've already handled) +syn match sqlKeyword "end \+\(if\|for\|foreach\|while\|exception\)\@!" +syn keyword sqlKeyword resume returning + +" = Operator subgroup = +" SQL +syn keyword sqlOperator not and or +syn keyword sqlOperator in is any some all between exists +syn keyword sqlOperator like matches +syn keyword sqlOperator union intersect +syn keyword sqlOperator distinct unique + + + +" === Identifier syntax group === +" = Function subgroup = +" SQL +syn keyword sqlFunction abs acos asin atan atan2 avg +syn keyword sqlFunction cardinality cast char_length character_length cos count +syn keyword sqlFunction exp filetoblob filetoclob hex +syn keyword sqlFunction initcap length logn log10 lower lpad +syn keyword sqlFunction min max mod octet_length pow range replace root round rpad +syn keyword sqlFunction sin sqrt stdev substr substring sum +syn keyword sqlFunction to_char tan to_date trim trunc upper variance + + + +" === Type syntax group === +" SQL +syn keyword sqlType blob boolean byte char character clob +syn keyword sqlType date datetime dec decimal double +syn keyword sqlType float int int8 integer interval list lvarchar +syn keyword sqlType money multiset nchar numeric nvarchar +syn keyword sqlType real serial serial8 smallfloat smallint +syn keyword sqlType text varchar varying + + + +" === Todo syntax group === +syn keyword sqlTodo TODO FIXME XXX DEBUG NOTE + + + +" 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_sql_syn_inits") + if version < 508 + let did_sql_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + + " === Comment syntax group === + HiLink sqlComment Comment + + " === Constant syntax group === + HiLink sqlNumber Number + HiLink sqlBoolean Boolean + HiLink sqlString String + + " === Statment syntax group === + HiLink sqlStatement Statement + HiLink sqlConditional Conditional + HiLink sqlRepeat Repeat + HiLink sqlKeyword Keyword + HiLink sqlOperator Operator + HiLink sqlException Exception + + " === Identifier syntax group === + HiLink sqlFunction Function + + " === Type syntax group === + HiLink sqlType Type + + " === Todo syntax group === + HiLink sqlTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "sqlinformix" diff --git a/vim/bundle/ubuntu-vim72/syntax/sqlj.vim b/vim/bundle/ubuntu-vim72/syntax/sqlj.vim new file mode 100644 index 0000000..51398ef --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sqlj.vim @@ -0,0 +1,102 @@ +" Vim syntax file +" Language: sqlj +" Maintainer: Andreas Fischbach +" This file is based on sql.vim && java.vim (thanx) +" with a handful of additional sql words and still +" a subset of whatever standard +" Last change: 31th Dec 2001 + +" au BufNewFile,BufRead *.sqlj so $VIM/syntax/sqlj.vim + +" Remove any old syntax stuff hanging around +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the Java syntax to start with +source :p:h/java.vim + +" SQLJ extentions +" The SQL reserved words, defined as keywords. + +syn case ignore +syn keyword sqljSpecial null + +syn keyword sqljKeyword access add as asc by check cluster column +syn keyword sqljKeyword compress connect current decimal default +syn keyword sqljKeyword desc else exclusive file for from group +syn keyword sqljKeyword having identified immediate increment index +syn keyword sqljKeyword initial into is level maxextents mode modify +syn keyword sqljKeyword nocompress nowait of offline on online start +syn keyword sqljKeyword successful synonym table then to trigger uid +syn keyword sqljKeyword unique user validate values view whenever +syn keyword sqljKeyword where with option order pctfree privileges +syn keyword sqljKeyword public resource row rowlabel rownum rows +syn keyword sqljKeyword session share size smallint + +syn keyword sqljKeyword fetch database context iterator field join +syn keyword sqljKeyword foreign outer inner isolation left right +syn keyword sqljKeyword match primary key + +syn keyword sqljOperator not and or +syn keyword sqljOperator in any some all between exists +syn keyword sqljOperator like escape +syn keyword sqljOperator union intersect minus +syn keyword sqljOperator prior distinct +syn keyword sqljOperator sysdate + +syn keyword sqljOperator max min avg sum count hex + +syn keyword sqljStatement alter analyze audit comment commit create +syn keyword sqljStatement delete drop explain grant insert lock noaudit +syn keyword sqljStatement rename revoke rollback savepoint select set +syn keyword sqljStatement truncate update begin work + +syn keyword sqljType char character date long raw mlslabel number +syn keyword sqljType rowid varchar varchar2 float integer + +syn keyword sqljType byte text serial + + +" Strings and characters: +syn region sqljString start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn region sqljString start=+'+ skip=+\\\\\|\\"+ end=+'+ + +" Numbers: +syn match sqljNumber "-\=\<\d*\.\=[0-9_]\>" + +" PreProc +syn match sqljPre "#sql" + +" Comments: +syn region sqljComment start="/\*" end="\*/" +syn match sqlComment "--.*" + +syn sync ccomment sqljComment + +if version >= 508 || !exists("did_sqlj_syn_inits") + if version < 508 + let did_sqlj_syn_inits = 1 + command! -nargs=+ HiLink hi link + else + command! -nargs=+ HiLink hi def link + endif + + " The default methods for highlighting. Can be overridden later. + HiLink sqljComment Comment + HiLink sqljKeyword sqljSpecial + HiLink sqljNumber Number + HiLink sqljOperator sqljStatement + HiLink sqljSpecial Special + HiLink sqljStatement Statement + HiLink sqljString String + HiLink sqljType Type + HiLink sqljPre PreProc + + delcommand HiLink +endif + +let b:current_syntax = "sqlj" + diff --git a/vim/bundle/ubuntu-vim72/syntax/sqloracle.vim b/vim/bundle/ubuntu-vim72/syntax/sqloracle.vim new file mode 100644 index 0000000..f9a7c19 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sqloracle.vim @@ -0,0 +1,89 @@ +" Vim syntax file +" Language: SQL, PL/SQL (Oracle 8i) +" Maintainer: Paul Moore +" Last Change: 2005 Dec 23 + +" 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 + +" The SQL reserved words, defined as keywords. + +syn keyword sqlSpecial false null true + +syn keyword sqlKeyword access add as asc begin by check cluster column +syn keyword sqlKeyword compress connect current cursor decimal default desc +syn keyword sqlKeyword else elsif end exception exclusive file for from +syn keyword sqlKeyword function group having identified if immediate increment +syn keyword sqlKeyword index initial into is level loop maxextents mode modify +syn keyword sqlKeyword nocompress nowait of offline on online start +syn keyword sqlKeyword successful synonym table then to trigger uid +syn keyword sqlKeyword unique user validate values view whenever +syn keyword sqlKeyword where with option order pctfree privileges procedure +syn keyword sqlKeyword public resource return row rowlabel rownum rows +syn keyword sqlKeyword session share size smallint type using + +syn keyword sqlOperator not and or +syn keyword sqlOperator in any some all between exists +syn keyword sqlOperator like escape +syn keyword sqlOperator union intersect minus +syn keyword sqlOperator prior distinct +syn keyword sqlOperator sysdate out + +syn keyword sqlStatement alter analyze audit comment commit create +syn keyword sqlStatement delete drop execute explain grant insert lock noaudit +syn keyword sqlStatement rename revoke rollback savepoint select set +syn keyword sqlStatement truncate update + +syn keyword sqlType boolean char character date float integer long +syn keyword sqlType mlslabel number raw rowid varchar varchar2 varray + +" Strings and characters: +syn region sqlString start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn region sqlString start=+'+ skip=+\\\\\|\\'+ end=+'+ + +" Numbers: +syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>" + +" Comments: +syn region sqlComment start="/\*" end="\*/" contains=sqlTodo +syn match sqlComment "--.*$" contains=sqlTodo + +syn sync ccomment sqlComment + +" Todo. +syn keyword sqlTodo contained TODO FIXME XXX DEBUG NOTE + +" 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_sql_syn_inits") + if version < 508 + let did_sql_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink sqlComment Comment + HiLink sqlKeyword sqlSpecial + HiLink sqlNumber Number + HiLink sqlOperator sqlStatement + HiLink sqlSpecial Special + HiLink sqlStatement Statement + HiLink sqlString String + HiLink sqlType Type + HiLink sqlTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "sql" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/sqr.vim b/vim/bundle/ubuntu-vim72/syntax/sqr.vim new file mode 100644 index 0000000..8749447 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sqr.vim @@ -0,0 +1,295 @@ +" Vim syntax file +" Language: Structured Query Report Writer (SQR) +" Maintainer: Nathan Stratton Treadway (nathanst at ontko dot com) +" URL: http://www.ontko.com/sqr/#editor_config_files +" +" Modification History: +" 2002-Apr-12: Updated for SQR v6.x +" 2002-Jul-30: Added { and } to iskeyword definition +" 2003-Oct-15: Allow "." in variable names +" highlight entire open '... literal when it contains +" "''" inside it (e.g. "'I can''t say" is treated +" as one open string, not one terminated and one open) +" {} variables can occur inside of '...' literals +" +" Thanks to the previous maintainer of this file, Jeff Lanzarotta: +" http://lanzarotta.tripod.com/vim.html +" jefflanzarotta at yahoo dot com + +" 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 + +if version >= 600 + setlocal iskeyword=@,48-57,_,-,#,$,{,} +else + set iskeyword=@,48-57,_,-,#,$,{,} +endif + +syn case ignore + +" BEGIN GENERATED SECTION ============================================ + +" Generated by generate_vim_syntax.sqr at 2002/04/11 13:04 +" (based on the UltraEdit syntax file for SQR 6.1.4 +" found at http://www.ontko.com/sqr/#editor_config_files ) + +syn keyword sqrSection begin-footing begin-heading begin-procedure +syn keyword sqrSection begin-program begin-report begin-setup +syn keyword sqrSection end-footing end-heading end-procedure +syn keyword sqrSection end-program end-report end-setup + +syn keyword sqrParagraph alter-color-map alter-conection +syn keyword sqrParagraph alter-locale alter-printer alter-report +syn keyword sqrParagraph begin-document begin-execute begin-select +syn keyword sqrParagraph begin-sql declare-chart declare-image +syn keyword sqrParagraph declare-color-map declare-conection +syn keyword sqrParagraph declare-layout declare-printer +syn keyword sqrParagraph declare-report declare-procedure +syn keyword sqrParagraph declare-toc declare-variable end-declare +syn keyword sqrParagraph end-document end-select exit-select end-sql +syn keyword sqrParagraph load-lookup + +syn keyword sqrReserved #current-column #current-date #current-line +syn keyword sqrReserved #end-file #page-count #return-status +syn keyword sqrReserved #sql-count #sql-status #sqr-max-columns +syn keyword sqrReserved #sqr-max-lines #sqr-pid #sqr-toc-level +syn keyword sqrReserved #sqr-toc-page $sqr-database {sqr-database} +syn keyword sqrReserved $sqr-dbcs {sqr-dbcs} $sqr-encoding +syn keyword sqrReserved {sqr-encoding} $sqr-encoding-console +syn keyword sqrReserved {sqr-encoding-console} +syn keyword sqrReserved $sqr-encoding-database +syn keyword sqrReserved {sqr-encoding-database} +syn keyword sqrReserved $sqr-encoding-file-input +syn keyword sqrReserved {sqr-encoding-file-input} +syn keyword sqrReserved $sqr-encoding-file-output +syn keyword sqrReserved {sqr-encoding-file-output} +syn keyword sqrReserved $sqr-encoding-report-input +syn keyword sqrReserved {sqr-encoding-report-input} +syn keyword sqrReserved $sqr-encoding-report-output +syn keyword sqrReserved {sqr-encoding-report-output} +syn keyword sqrReserved $sqr-encoding-source {sqr-encoding-source} +syn keyword sqrReserved $sql-error $sqr-hostname {sqr-hostname} +syn keyword sqrReserved $sqr-locale $sqr-platform {sqr-platform} +syn keyword sqrReserved $sqr-program $sqr-report $sqr-toc-text +syn keyword sqrReserved $sqr-ver $username + +syn keyword sqrPreProc #define #else #end-if #endif #if #ifdef +syn keyword sqrPreProc #ifndef #include + +syn keyword sqrCommand add array-add array-divide array-multiply +syn keyword sqrCommand array-subtract ask break call clear-array +syn keyword sqrCommand close columns commit concat connect +syn keyword sqrCommand create-array create-color-palette date-time +syn keyword sqrCommand display divide do dollar-symbol else encode +syn keyword sqrCommand end-evaluate end-if end-while evaluate +syn keyword sqrCommand execute extract find get get-color goto +syn keyword sqrCommand graphic if input last-page let lookup +syn keyword sqrCommand lowercase mbtosbs money-symbol move +syn keyword sqrCommand multiply new-page new-report next-column +syn keyword sqrCommand next-listing no-formfeed open page-number +syn keyword sqrCommand page-size position print print-bar-code +syn keyword sqrCommand print-chart print-direct print-image +syn keyword sqrCommand printer-deinit printer-init put read +syn keyword sqrCommand rollback security set-color set-delay-print +syn keyword sqrCommand set-generations set-levels set-members +syn keyword sqrCommand sbtombs show stop string subtract toc-entry +syn keyword sqrCommand unstring uppercase use use-column +syn keyword sqrCommand use-printer-type use-procedure use-report +syn keyword sqrCommand while write + +syn keyword sqrParam 3d-effects after after-bold after-page +syn keyword sqrParam after-report after-toc and as at-end before +syn keyword sqrParam background batch-mode beep before-bold +syn keyword sqrParam before-page before-report before-toc blink +syn keyword sqrParam bold border bottom-margin box break by +syn keyword sqrParam caption center char char-size char-width +syn keyword sqrParam chars-inch chart-size checksum cl +syn keyword sqrParam clear-line clear-screen color color-palette +syn keyword sqrParam cs color_ data-array +syn keyword sqrParam data-array-column-count +syn keyword sqrParam data-array-column-labels +syn keyword sqrParam data-array-row-count data-labels date +syn keyword sqrParam date-edit-mask date-seperator +syn keyword sqrParam day-of-week-case day-of-week-full +syn keyword sqrParam day-of-week-short decimal decimal-seperator +syn keyword sqrParam default-numeric delay distinct dot-leader +syn keyword sqrParam edit-option-ad edit-option-am +syn keyword sqrParam edit-option-bc edit-option-na +syn keyword sqrParam edit-option-pm encoding entry erase-page +syn keyword sqrParam extent field fill fixed fixed_nolf float +syn keyword sqrParam font font-style font-type footing +syn keyword sqrParam footing-size foreground for-append +syn keyword sqrParam for-reading for-reports for-tocs +syn keyword sqrParam for-writing format formfeed from goto-top +syn keyword sqrParam group having heading heading-size height +syn keyword sqrParam horz-line image-size in indentation +syn keyword sqrParam init-string input-date-edit-mask insert +syn keyword sqrParam integer into item-color item-size key +syn keyword sqrParam layout left-margin legend legend-placement +syn keyword sqrParam legend-presentation legend-title level +syn keyword sqrParam line-height line-size line-width lines-inch +syn keyword sqrParam local locale loops max-columns max-lines +syn keyword sqrParam maxlen money money-edit-mask money-sign +syn keyword sqrParam money-sign-location months-case months-full +syn keyword sqrParam months-short name need newline newpage +syn keyword sqrParam no-advance nolf noline noprompt normal not +syn keyword sqrParam nowait number number-edit-mask on-break +syn keyword sqrParam on-error or order orientation page-depth +syn keyword sqrParam paper-size pie-segment-explode +syn keyword sqrParam pie-segment-percent-display +syn keyword sqrParam pie-segment-quantity-display pitch +syn keyword sqrParam point-markers point-size printer +syn keyword sqrParam printer-type quiet record reset-string +syn keyword sqrParam return_value reverse right-margin rows save +syn keyword sqrParam select size skip skiplines sort source +syn keyword sqrParam sqr-database sqr-platform startup-file +syn keyword sqrParam status stop sub-title symbol-set system +syn keyword sqrParam table text thousand-seperator +syn keyword sqrParam time-seperator times title to toc +syn keyword sqrParam top-margin type underline update using +syn keyword sqrParam value vary vert-line wait warn when +syn keyword sqrParam when-other where with x-axis-grid +syn keyword sqrParam x-axis-label x-axis-major-increment +syn keyword sqrParam x-axis-major-tick-marks x-axis-max-value +syn keyword sqrParam x-axis-min-value x-axis-minor-increment +syn keyword sqrParam x-axis-minor-tick-marks x-axis-rotate +syn keyword sqrParam x-axis-scale x-axis-tick-mark-placement xor +syn keyword sqrParam y-axis-grid y-axis-label +syn keyword sqrParam y-axis-major-increment +syn keyword sqrParam y-axis-major-tick-marks y-axis-max-value +syn keyword sqrParam y-axis-min-value y-axis-minor-increment +syn keyword sqrParam y-axis-minor-tick-marks y-axis-scale +syn keyword sqrParam y-axis-tick-mark-placement y2-type +syn keyword sqrParam y2-data-array y2-data-array-row-count +syn keyword sqrParam y2-data-array-column-count +syn keyword sqrParam y2-data-array-column-labels +syn keyword sqrParam y2-axis-color-palette y2-axis-label +syn keyword sqrParam y2-axis-major-increment +syn keyword sqrParam y2-axis-major-tick-marks y2-axis-max-value +syn keyword sqrParam y2-axis-min-value y2-axis-minor-increment +syn keyword sqrParam y2-axis-minor-tick-marks y2-axis-scale + +syn keyword sqrFunction abs acos asin atan array ascii asciic ceil +syn keyword sqrFunction cos cosh chr cond deg delete dateadd +syn keyword sqrFunction datediff datenow datetostr e10 exp edit +syn keyword sqrFunction exists floor getenv instr instrb isblank +syn keyword sqrFunction isnull log log10 length lengthb lengthp +syn keyword sqrFunction lengtht lower lpad ltrim mod nvl power rad +syn keyword sqrFunction round range replace roman rpad rtrim rename +syn keyword sqrFunction sign sin sinh sqrt substr substrb substrp +syn keyword sqrFunction substrt strtodate tan tanh trunc to_char +syn keyword sqrFunction to_multi_byte to_number to_single_byte +syn keyword sqrFunction transform translate unicode upper wrapdepth + +" END GENERATED SECTION ============================================== + +" Variables +syn match sqrVariable /\(\$\|#\|&\)\(\k\|\.\)*/ + + +" Debug compiler directives +syn match sqrPreProc /\s*#debug\a\=\(\s\|$\)/ +syn match sqrSubstVar /{\k*}/ + + +" Strings +" Note: if an undoubled ! is found, this is not a valid string +" (SQR will treat the end of the line as a comment) +syn match sqrString /'\(!!\|[^!']\)*'/ contains=sqrSubstVar +syn match sqrStrOpen /'\(!!\|''\|[^!']\)*$/ +" If we find a ' followed by an unmatched ! before a matching ', +" flag the error. +syn match sqrError /'\(!!\|[^'!]\)*![^!]/me=e-1 +syn match sqrError /'\(!!\|[^'!]\)*!$/ + +" Numbers: +syn match sqrNumber /-\=\<\d*\.\=[0-9_]\>/ + + + +" Comments: +" Handle comments that start with "!=" specially; they are only valid +" in the first column of the source line. Also, "!!" is only treated +" as a start-comment if there is only whitespace ahead of it on the line. + +syn keyword sqrTodo TODO FIXME XXX DEBUG NOTE ### +syn match sqrTodo /???/ + +if version >= 600 + " See also the sqrString section above for handling of ! characters + " inside of strings. (Those patterns override the ones below.) + syn match sqrComment /!\@= 508 || !exists("did_sqr_syn_inits") + if version < 508 + let did_sqr_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink sqrSection Statement + HiLink sqrParagraph Statement + HiLink sqrReserved Statement + HiLink sqrParameter Statement + HiLink sqrPreProc PreProc + HiLink sqrSubstVar PreProc + HiLink sqrCommand Statement + HiLink sqrParam Type + HiLink sqrFunction Special + + HiLink sqrString String + HiLink sqrStrOpen Todo + HiLink sqrNumber Number + HiLink sqrVariable Identifier + + HiLink sqrComment Comment + HiLink sqrTodo Todo + HiLink sqrError Error + + delcommand HiLink +endif + +let b:current_syntax = "sqr" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/squid.vim b/vim/bundle/ubuntu-vim72/syntax/squid.vim new file mode 100644 index 0000000..a8462bb --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/squid.vim @@ -0,0 +1,153 @@ +" Vim syntax file +" Language: Squid config file +" Maintainer: Klaus Muth +" Last Change: 2005 Jun 12 +" URL: http://www.hampft.de/vim/syntax/squid.vim +" ThanksTo: Ilya Sher , +" Michael Dotzler + + +" 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 + +" squid.conf syntax seems to be case insensitive +syn case ignore + +syn keyword squidTodo contained TODO +syn match squidComment "#.*$" contains=squidTodo,squidTag +syn match squidTag contained "TAG: .*$" + +" Lots & lots of Keywords! +syn keyword squidConf acl always_direct announce_host announce_period +syn keyword squidConf announce_port announce_to anonymize_headers +syn keyword squidConf append_domain as_whois_server auth_param_basic +syn keyword squidConf authenticate_children authenticate_program +syn keyword squidConf authenticate_ttl broken_posts buffered_logs +syn keyword squidConf cache_access_log cache_announce cache_dir +syn keyword squidConf cache_dns_program cache_effective_group +syn keyword squidConf cache_effective_user cache_host cache_host_acl +syn keyword squidConf cache_host_domain cache_log cache_mem +syn keyword squidConf cache_mem_high cache_mem_low cache_mgr +syn keyword squidConf cachemgr_passwd cache_peer cache_peer_access +syn keyword squidConf cahce_replacement_policy cache_stoplist +syn keyword squidConf cache_stoplist_pattern cache_store_log cache_swap +syn keyword squidConf cache_swap_high cache_swap_log cache_swap_low +syn keyword squidConf client_db client_lifetime client_netmask +syn keyword squidConf connect_timeout coredump_dir dead_peer_timeout +syn keyword squidConf debug_options delay_access delay_class +syn keyword squidConf delay_initial_bucket_level delay_parameters +syn keyword squidConf delay_pools deny_info dns_children dns_defnames +syn keyword squidConf dns_nameservers dns_testnames emulate_httpd_log +syn keyword squidConf err_html_text fake_user_agent firewall_ip +syn keyword squidConf forwarded_for forward_snmpd_port fqdncache_size +syn keyword squidConf ftpget_options ftpget_program ftp_list_width +syn keyword squidConf ftp_passive ftp_user half_closed_clients +syn keyword squidConf header_access header_replace hierarchy_stoplist +syn keyword squidConf high_response_time_warning high_page_fault_warning +syn keyword squidConf htcp_port http_access http_anonymizer httpd_accel +syn keyword squidConf httpd_accel_host httpd_accel_port +syn keyword squidConf httpd_accel_uses_host_header +syn keyword squidConf httpd_accel_with_proxy http_port http_reply_access +syn keyword squidConf icp_access icp_hit_stale icp_port +syn keyword squidConf icp_query_timeout ident_lookup ident_lookup_access +syn keyword squidConf ident_timeout incoming_http_average +syn keyword squidConf incoming_icp_average inside_firewall ipcache_high +syn keyword squidConf ipcache_low ipcache_size local_domain local_ip +syn keyword squidConf logfile_rotate log_fqdn log_icp_queries +syn keyword squidConf log_mime_hdrs maximum_object_size +syn keyword squidConf maximum_single_addr_tries mcast_groups +syn keyword squidConf mcast_icp_query_timeout mcast_miss_addr +syn keyword squidConf mcast_miss_encode_key mcast_miss_port memory_pools +syn keyword squidConf memory_pools_limit memory_replacement_policy +syn keyword squidConf mime_table min_http_poll_cnt min_icp_poll_cnt +syn keyword squidConf minimum_direct_hops minimum_object_size +syn keyword squidConf minimum_retry_timeout miss_access negative_dns_ttl +syn keyword squidConf negative_ttl neighbor_timeout neighbor_type_domain +syn keyword squidConf netdb_high netdb_low netdb_ping_period +syn keyword squidConf netdb_ping_rate never_direct no_cache +syn keyword squidConf passthrough_proxy pconn_timeout pid_filename +syn keyword squidConf pinger_program positive_dns_ttl prefer_direct +syn keyword squidConf proxy_auth proxy_auth_realm query_icmp quick_abort +syn keyword squidConf quick_abort quick_abort_max quick_abort_min +syn keyword squidConf quick_abort_pct range_offset_limit read_timeout +syn keyword squidConf redirect_children redirect_program +syn keyword squidConf redirect_rewrites_host_header reference_age +syn keyword squidConf reference_age refresh_pattern reload_into_ims +syn keyword squidConf request_body_max_size request_size request_timeout +syn keyword squidConf shutdown_lifetime single_parent_bypass +syn keyword squidConf siteselect_timeout snmp_access +syn keyword squidConf snmp_incoming_address snmp_port source_ping +syn keyword squidConf ssl_proxy store_avg_object_size +syn keyword squidConf store_objects_per_bucket strip_query_terms +syn keyword squidConf swap_level1_dirs swap_level2_dirs +syn keyword squidConf tcp_incoming_address tcp_outgoing_address +syn keyword squidConf tcp_recv_bufsize test_reachability udp_hit_obj +syn keyword squidConf udp_hit_obj_size udp_incoming_address +syn keyword squidConf udp_outgoing_address unique_hostname +syn keyword squidConf unlinkd_program uri_whitespace useragent_log +syn keyword squidConf visible_hostname wais_relay wais_relay_host +syn keyword squidConf wais_relay_port + +syn keyword squidOpt proxy-only weight ttl no-query default +syn keyword squidOpt round-robin multicast-responder +syn keyword squidOpt on off all deny allow +syn keyword squidopt via parent no-digest heap lru realm +syn keyword squidopt children credentialsttl none disable +syn keyword squidopt offline_toggle diskd q1 q2 + +" Security Actions for cachemgr_passwd +syn keyword squidAction shutdown info parameter server_list +syn keyword squidAction client_list +syn match squidAction "stats/\(objects\|vm_objects\|utilization\|ipcache\|fqdncache\|dns\|redirector\|io\|reply_headers\|filedescriptors\|netdb\)" +syn match squidAction "log\(/\(status\|enable\|disable\|clear\)\)\=" +syn match squidAction "squid\.conf" + +" Keywords for the acl-config +syn keyword squidAcl url_regex urlpath_regex referer_regex port proto +syn keyword squidAcl req_mime_type rep_mime_type +syn keyword squidAcl method browser user src dst +syn keyword squidAcl time dstdomain ident snmp_community + +syn match squidNumber "\<\d\+\>" +syn match squidIP "\<\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\>" +syn match squidStr "\(^\s*acl\s\+\S\+\s\+\(\S*_regex\|re[pq]_mime_type\|browser\|_domain\|user\)\+\s\+\)\@<=.*" contains=squidRegexOpt +syn match squidRegexOpt contained "\(^\s*acl\s\+\S\+\s\+\S\+\(_regex\|_mime_type\)\s\+\)\@<=[-+]i\s\+" + +" All config is in one line, so this has to be sufficient +" Make it fast like hell :) +syn sync minlines=3 + +" 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_squid_syntax_inits") + if version < 508 + let did_squid_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink squidTodo Todo + HiLink squidComment Comment + HiLink squidTag Special + HiLink squidConf Keyword + HiLink squidOpt Constant + HiLink squidAction String + HiLink squidNumber Number + HiLink squidIP Number + HiLink squidAcl Keyword + HiLink squidStr String + HiLink squidRegexOpt Special + + delcommand HiLink +endif + +let b:current_syntax = "squid" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/sshconfig.vim b/vim/bundle/ubuntu-vim72/syntax/sshconfig.vim new file mode 100644 index 0000000..45947f2 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sshconfig.vim @@ -0,0 +1,116 @@ +" Vim syntax file +" Language: OpenSSH client configuration file (ssh_config) +" Maintainer: David Necas (Yeti) +" Last Change: 2009-07-09 + +" Setup +if version >= 600 + if exists("b:current_syntax") + finish + endif +else + syntax clear +endif + +if version >= 600 + setlocal iskeyword=_,-,a-z,A-Z,48-57 +else + set iskeyword=_,-,a-z,A-Z,48-57 +endif + +syn case ignore + +" Comments +syn match sshconfigComment "#.*$" contains=sshconfigTodo +syn keyword sshconfigTodo TODO FIXME NOT contained + +" Constants +syn keyword sshconfigYesNo yes no ask +syn keyword sshconfigYesNo any auto +syn keyword sshconfigCipher aes128-cbc 3des-cbc blowfish-cbc cast128-cbc +syn keyword sshconfigCipher aes192-cbc aes256-cbc aes128-ctr aes256-ctr +syn keyword sshconfigCipher arcfour arcfour128 arcfour256 cast128-cbc +syn keyword sshconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96 +syn keyword sshconfigMAC hmac-md5-96 +syn match sshconfigMAC "\" +syn keyword sshconfigHostKeyAlg ssh-rsa ssh-dss +syn keyword sshconfigPreferredAuth hostbased publickey password +syn keyword sshconfigPreferredAuth keyboard-interactive +syn keyword sshconfigLogLevel QUIET FATAL ERROR INFO VERBOSE +syn keyword sshconfigLogLevel DEBUG DEBUG1 DEBUG2 DEBUG3 +syn keyword sshconfigSysLogFacility DAEMON USER AUTH AUTHPRIV LOCAL0 LOCAL1 +syn keyword sshconfigSysLogFacility LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7 +syn match sshconfigVar "%[rhpldun]\>" +syn match sshconfigSpecial "[*?]" +syn match sshconfigNumber "\d\+" +syn match sshconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>" +syn match sshconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>" +syn match sshconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}[:/]\d\+\>" + +" Keywords +syn keyword sshconfigHostSect Host +syn keyword sshconfigKeyword AddressFamily +syn keyword sshconfigKeyword BatchMode BindAddress +syn keyword sshconfigKeyword ChallengeResponseAuthentication CheckHostIP +syn keyword sshconfigKeyword Cipher Ciphers ClearAllForwardings +syn keyword sshconfigKeyword Compression CompressionLevel ConnectTimeout +syn keyword sshconfigKeyword ConnectionAttempts ControlMaster +syn keyword sshconfigKeyword ControlPath DynamicForward +syn keyword sshconfigKeyword EnableSSHKeysign EscapeChar ExitOnForwardFailure +syn keyword sshconfigKeyword ForwardAgent ForwardX11 +syn keyword sshconfigKeyword ForwardX11Trusted +syn keyword sshconfigKeyword GSSAPIAuthentication +syn keyword sshconfigKeyword GSSAPIDelegateCredentials GatewayPorts +syn keyword sshconfigKeyword GlobalKnownHostsFile +syn keyword sshconfigKeyword HostKeyAlgorithms HashKnownHosts +syn keyword sshconfigKeyword HostKeyAlias HostName HostbasedAuthentication +syn keyword sshconfigKeyword IdentitiesOnly IdentityFile +syn keyword sshconfigKeyword KbdInteractiveAuthentication KbdInteractiveDevices +syn keyword sshconfigKeyword LocalCommand LocalForward LogLevel +syn keyword sshconfigKeyword MACs +syn keyword sshconfigKeyword NoHostAuthenticationForLocalhost +syn keyword sshconfigKeyword NumberOfPasswordPrompts +syn keyword sshconfigKeyword PasswordAuthentication PermitLocalCommand +syn keyword sshconfigKeyword Port PreferredAuthentications Protocol +syn keyword sshconfigKeyword ProxyCommand PubkeyAuthentication +syn keyword sshconfigKeyword PermitLocalCommand +syn keyword sshconfigKeyword RSAAuthentication RemoteForward RekeyLimit +syn keyword sshconfigKeyword RhostsRSAAuthentication +syn keyword sshconfigKeyword SendEnv ServerAliveCountMax ServerAliveInterval +syn keyword sshconfigKeyword SmartcardDevice StrictHostKeyChecking +syn keyword sshconfigKeyword Tunnel TunnelDevice +syn keyword sshconfigKeyword TCPKeepAlive UsePrivilegedPort User +syn keyword sshconfigKeyword UserKnownHostsFile +syn keyword sshconfigKeyword VerifyHostKeyDNS VisualHostKey +syn keyword sshconfigKeyword XAuthLocation + +" Define the default highlighting +if version >= 508 || !exists("did_sshconfig_syntax_inits") + if version < 508 + let did_sshconfig_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink sshconfigComment Comment + HiLink sshconfigTodo Todo + HiLink sshconfigHostPort sshconfigConstant + HiLink sshconfigNumber sshconfigConstant + HiLink sshconfigConstant Constant + HiLink sshconfigYesNo sshconfigEnum + HiLink sshconfigCipher sshconfigEnum + HiLink sshconfigMAC sshconfigEnum + HiLink sshconfigHostKeyAlg sshconfigEnum + HiLink sshconfigLogLevel sshconfigEnum + HiLink sshconfigSysLogFacility sshconfigEnum + HiLink sshconfigPreferredAuth sshconfigEnum + HiLink sshconfigVar sshconfigEnum + HiLink sshconfigEnum Identifier + HiLink sshconfigSpecial Special + HiLink sshconfigKeyword Keyword + HiLink sshconfigHostSect Type + delcommand HiLink +endif + +let b:current_syntax = "sshconfig" diff --git a/vim/bundle/ubuntu-vim72/syntax/sshdconfig.vim b/vim/bundle/ubuntu-vim72/syntax/sshdconfig.vim new file mode 100644 index 0000000..97ee8f8 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sshdconfig.vim @@ -0,0 +1,111 @@ +" Vim syntax file +" Language: OpenSSH server configuration file (sshd_config) +" Maintainer: David Necas (Yeti) +" Last Change: 2009-07-09 + +" Setup +if version >= 600 + if exists("b:current_syntax") + finish + endif +else + syntax clear +endif + +if version >= 600 + setlocal iskeyword=_,-,a-z,A-Z,48-57 +else + set iskeyword=_,-,a-z,A-Z,48-57 +endif + +syn case ignore + +" Comments +syn match sshdconfigComment "#.*$" contains=sshdconfigTodo +syn keyword sshdconfigTodo TODO FIXME NOT contained + +" Constants +syn keyword sshdconfigYesNo yes no none +syn keyword sshdconfigAddressFamily any inet inet6 +syn keyword sshdconfigCipher aes128-cbc 3des-cbc blowfish-cbc cast128-cbc +syn keyword sshdconfigCipher aes192-cbc aes256-cbc aes128-ctr aes256-ctr +syn keyword sshdconfigCipher arcfour arcfour128 arcfour256 cast128-cbc +syn keyword sshdconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96 +syn keyword sshdconfigMAC hmac-md5-96 +syn match sshdconfigMAC "\" +syn keyword sshdconfigRootLogin without-password forced-commands-only +syn keyword sshdconfigLogLevel QUIET FATAL ERROR INFO VERBOSE +syn keyword sshdconfigLogLevel DEBUG DEBUG1 DEBUG2 DEBUG3 +syn keyword sshdconfigSysLogFacility DAEMON USER AUTH AUTHPRIV LOCAL0 LOCAL1 +syn keyword sshdconfigSysLogFacility LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7 +syn match sshdconfigSpecial "[*?]" +syn match sshdconfigNumber "\d\+" +syn match sshdconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>" +syn match sshdconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>" +" FIXME: this matches quite a few things which are NOT valid IPv6 addresses +syn match sshdconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}:\d\+\>" +syn match sshdconfigTime "\<\(\d\+[sSmMhHdDwW]\)\+\>" + +" Keywords +syn keyword sshdconfigMatch Host User Group Address +syn keyword sshdconfigKeyword AcceptEnv AddressFamily AllowAgentForwarding +syn keyword sshdconfigKeyword AllowGroups AllowTcpForwarding +syn keyword sshdconfigKeyword AllowUsers AuthorizedKeysFile +syn keyword sshdconfigKeyword Banner +syn keyword sshdconfigKeyword ChallengeResponseAuthentication ChrootDirectory +syn keyword sshdconfigKeyword Ciphers ClientAliveCountMax +syn keyword sshdconfigKeyword ClientAliveInterval Compression +syn keyword sshdconfigKeyword DenyGroups DenyUsers +syn keyword sshdconfigKeyword ForceCommand +syn keyword sshdconfigKeyword GatewayPorts GSSAPIAuthentication +syn keyword sshdconfigKeyword GSSAPICleanupCredentials +syn keyword sshdconfigKeyword HostbasedAuthentication HostKey +syn keyword sshdconfigKeyword IgnoreRhosts IgnoreUserKnownHosts +syn keyword sshdconfigKeyword KerberosAuthentication KerberosGetAFSToken +syn keyword sshdconfigKeyword KerberosOrLocalPasswd KerberosTicketCleanup +syn keyword sshdconfigKeyword KeyRegenerationInterval +syn keyword sshdconfigKeyword ListenAddress LoginGraceTime LogLevel +syn keyword sshdconfigKeyword MACs Match MaxAuthTries MaxSessions MaxStartups +syn keyword sshdconfigKeyword PasswordAuthentication PermitEmptyPasswords +syn keyword sshdconfigKeyword PermitRootLogin PermitOpen PermitTunnel +syn keyword sshdconfigKeyword PermitUserEnvironment PidFile Port +syn keyword sshdconfigKeyword PrintLastLog PrintMotd Protocol +syn keyword sshdconfigKeyword PubkeyAuthentication +syn keyword sshdconfigKeyword RhostsRSAAuthentication RSAAuthentication +syn keyword sshdconfigKeyword ServerKeyBits ShowPatchLevel StrictModes +syn keyword sshdconfigKeyword Subsystem SyslogFacility +syn keyword sshdconfigKeyword TCPKeepAlive +syn keyword sshdconfigKeyword UseDNS UseLogin UsePAM UsePrivilegeSeparation +syn keyword sshdconfigKeyword X11DisplayOffset X11Forwarding +syn keyword sshdconfigKeyword X11UseLocalhost XAuthLocation + +" Define the default highlighting +if version >= 508 || !exists("did_sshdconfig_syntax_inits") + if version < 508 + let did_sshdconfig_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink sshdconfigComment Comment + HiLink sshdconfigTodo Todo + HiLink sshdconfigHostPort sshdconfigConstant + HiLink sshdconfigTime sshdconfigConstant + HiLink sshdconfigNumber sshdconfigConstant + HiLink sshdconfigConstant Constant + HiLink sshdconfigYesNo sshdconfigEnum + HiLink sshdconfigAddressFamily sshdconfigEnum + HiLink sshdconfigCipher sshdconfigEnum + HiLink sshdconfigMAC sshdconfigEnum + HiLink sshdconfigRootLogin sshdconfigEnum + HiLink sshdconfigLogLevel sshdconfigEnum + HiLink sshdconfigSysLogFacility sshdconfigEnum + HiLink sshdconfigEnum Function + HiLink sshdconfigSpecial Special + HiLink sshdconfigKeyword Keyword + HiLink sshdconfigMatch Type + delcommand HiLink +endif + +let b:current_syntax = "sshdconfig" diff --git a/vim/bundle/ubuntu-vim72/syntax/st.vim b/vim/bundle/ubuntu-vim72/syntax/st.vim new file mode 100644 index 0000000..d629eb4 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/st.vim @@ -0,0 +1,102 @@ +" Vim syntax file +" Language: Smalltalk +" Maintainer: Arndt Hesse +" Last Change: 2001 May 09 + +" 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 + +" some Smalltalk keywords and standard methods +syn keyword stKeyword super self class true false new not +syn keyword stKeyword notNil isNil inspect out nil +syn match stMethod "\:" +syn match stMethod "\:" +syn match stMethod "\:" +syn match stMethod "\:" +syn match stMethod "\:" +syn match stMethod "\:" +syn match stMethod "\:" +syn match stMethod "\:" +syn match stMethod "\:" +syn match stMethod "\:" +syn match stMethod "\:" +syn match stMethod "\:" +syn match stMethod "\:" +syn match stMethod "\:" +syn match stMethod "\:" +syn match stMethod "\:" +syn match stMethod "\:" + +" the block of local variables of a method +syn region stLocalVariables start="^[ \t]*|" end="|" + +" the Smalltalk comment +syn region stComment start="\"" end="\"" + +" the Smalltalk strings and single characters +syn region stString start='\'' skip="''" end='\'' +syn match stCharacter "$." + +syn case ignore + +" the symols prefixed by a '#' +syn match stSymbol "\(#\<[a-z_][a-z0-9_]*\>\)" +syn match stSymbol "\(#'[^']*'\)" + +" the variables in a statement block for loops +syn match stBlockVariable "\(:[ \t]*\<[a-z_][a-z0-9_]*\>[ \t]*\)\+|" contained + +" some representations of numbers +syn match stNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" +syn match stFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" +syn match stFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" + +syn case match + +" a try to higlight paren mismatches +syn region stParen transparent start='(' end=')' contains=ALLBUT,stParenError +syn match stParenError ")" +syn region stBlock transparent start='\[' end='\]' contains=ALLBUT,stBlockError +syn match stBlockError "\]" +syn region stSet transparent start='{' end='}' contains=ALLBUT,stSetError +syn match stSetError "}" + +hi link stParenError stError +hi link stSetError stError +hi link stBlockError stError + +" synchronization for syntax analysis +syn sync minlines=50 + +" 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_st_syntax_inits") + if version < 508 + let did_st_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink stKeyword Statement + HiLink stMethod Statement + HiLink stComment Comment + HiLink stCharacter Constant + HiLink stString Constant + HiLink stSymbol Special + HiLink stNumber Type + HiLink stFloat Type + HiLink stError Error + HiLink stLocalVariables Identifier + HiLink stBlockVariable Identifier + + delcommand HiLink +endif + +let b:current_syntax = "st" diff --git a/vim/bundle/ubuntu-vim72/syntax/stata.vim b/vim/bundle/ubuntu-vim72/syntax/stata.vim new file mode 100644 index 0000000..e1f19c8 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/stata.vim @@ -0,0 +1,451 @@ +" stata.vim -- Vim syntax file for Stata do, ado, and class files. +" Language: Stata and/or Mata +" Maintainer: Jeff Pitblado +" Last Change: 26apr2006 +" Version: 1.1.4 + +" Log: +" 14apr2006 renamed syntax groups st* to stata* +" 'syntax clear' only under version control +" check for 'b:current_syntax', removed 'did_stata_syntax_inits' +" 17apr2006 fixed start expression for stataFunc +" 26apr2006 fixed brace confusion in stataErrInParen and stataErrInBracket +" fixed paren/bracket confusion in stataFuncGroup + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syntax case match + +" comments - single line +" note that the triple slash continuing line comment comes free +syn region stataStarComment start=/^\s*\*/ end=/$/ contains=stataComment oneline +syn region stataSlashComment start="\s//" end=/$/ contains=stataComment oneline +syn region stataSlashComment start="^//" end=/$/ contains=stataComment oneline +" comments - multiple line +syn region stataComment start="/\*" end="\*/" contains=stataComment + +" global macros - simple case +syn match stataGlobal /\$\a\w*/ +" global macros - general case +syn region stataGlobal start=/\${/ end=/}/ oneline contains=@stataMacroGroup +" local macros - general case +syn region stataLocal start=/`/ end=/'/ oneline contains=@stataMacroGroup + +" numeric formats +syn match stataFormat /%-\=\d\+\.\d\+[efg]c\=/ +" numeric hex format +syn match stataFormat /%-\=21x/ +" string format +syn match stataFormat /%\(\|-\|\~\)\d\+s/ + +" Statements +syn keyword stataConditional else if +syn keyword stataRepeat foreach +syn keyword stataRepeat forv[alues] +syn keyword stataRepeat while + +" Common programming commands +syn keyword stataCommand about +syn keyword stataCommand adopath +syn keyword stataCommand adoupdate +syn keyword stataCommand assert +syn keyword stataCommand break +syn keyword stataCommand by +syn keyword stataCommand cap[ture] +syn keyword stataCommand cd +syn keyword stataCommand chdir +syn keyword stataCommand checksum +syn keyword stataCommand class +syn keyword stataCommand classutil +syn keyword stataCommand compress +syn keyword stataCommand conf[irm] +syn keyword stataCommand conren +syn keyword stataCommand continue +syn keyword stataCommand cou[nt] +syn keyword stataCommand cscript +syn keyword stataCommand cscript_log +syn keyword stataCommand #delimit +syn keyword stataCommand d[escribe] +syn keyword stataCommand dir +syn keyword stataCommand discard +syn keyword stataCommand di[splay] +syn keyword stataCommand do +syn keyword stataCommand doedit +syn keyword stataCommand drop +syn keyword stataCommand edit +syn keyword stataCommand end +syn keyword stataCommand erase +syn keyword stataCommand eret[urn] +syn keyword stataCommand err[or] +syn keyword stataCommand e[xit] +syn keyword stataCommand expand +syn keyword stataCommand expandcl +syn keyword stataCommand file +syn keyword stataCommand findfile +syn keyword stataCommand format +syn keyword stataCommand g[enerate] +syn keyword stataCommand gettoken +syn keyword stataCommand gl[obal] +syn keyword stataCommand help +syn keyword stataCommand hexdump +syn keyword stataCommand include +syn keyword stataCommand infile +syn keyword stataCommand infix +syn keyword stataCommand input +syn keyword stataCommand insheet +syn keyword stataCommand joinby +syn keyword stataCommand la[bel] +syn keyword stataCommand levelsof +syn keyword stataCommand list +syn keyword stataCommand loc[al] +syn keyword stataCommand log +syn keyword stataCommand ma[cro] +syn keyword stataCommand mark +syn keyword stataCommand markout +syn keyword stataCommand marksample +syn keyword stataCommand mata +syn keyword stataCommand matrix +syn keyword stataCommand memory +syn keyword stataCommand merge +syn keyword stataCommand mkdir +syn keyword stataCommand more +syn keyword stataCommand net +syn keyword stataCommand nobreak +syn keyword stataCommand n[oisily] +syn keyword stataCommand note[s] +syn keyword stataCommand numlist +syn keyword stataCommand outfile +syn keyword stataCommand outsheet +syn keyword stataCommand _parse +syn keyword stataCommand pause +syn keyword stataCommand plugin +syn keyword stataCommand post +syn keyword stataCommand postclose +syn keyword stataCommand postfile +syn keyword stataCommand preserve +syn keyword stataCommand print +syn keyword stataCommand printer +syn keyword stataCommand profiler +syn keyword stataCommand pr[ogram] +syn keyword stataCommand q[uery] +syn keyword stataCommand qui[etly] +syn keyword stataCommand rcof +syn keyword stataCommand reg[ress] +syn keyword stataCommand rename +syn keyword stataCommand repeat +syn keyword stataCommand replace +syn keyword stataCommand reshape +syn keyword stataCommand ret[urn] +syn keyword stataCommand _rmcoll +syn keyword stataCommand _rmcoll +syn keyword stataCommand _rmcollright +syn keyword stataCommand rmdir +syn keyword stataCommand _robust +syn keyword stataCommand save +syn keyword stataCommand sca[lar] +syn keyword stataCommand search +syn keyword stataCommand serset +syn keyword stataCommand set +syn keyword stataCommand shell +syn keyword stataCommand sleep +syn keyword stataCommand sort +syn keyword stataCommand split +syn keyword stataCommand sret[urn] +syn keyword stataCommand ssc +syn keyword stataCommand su[mmarize] +syn keyword stataCommand syntax +syn keyword stataCommand sysdescribe +syn keyword stataCommand sysdir +syn keyword stataCommand sysuse +syn keyword stataCommand token[ize] +syn keyword stataCommand translate +syn keyword stataCommand type +syn keyword stataCommand unab +syn keyword stataCommand unabcmd +syn keyword stataCommand update +syn keyword stataCommand use +syn keyword stataCommand vers[ion] +syn keyword stataCommand view +syn keyword stataCommand viewsource +syn keyword stataCommand webdescribe +syn keyword stataCommand webseek +syn keyword stataCommand webuse +syn keyword stataCommand which +syn keyword stataCommand who +syn keyword stataCommand window + +" Literals +syn match stataQuote /"/ +syn region stataEString matchgroup=Nothing start=/`"/ end=/"'/ oneline contains=@stataMacroGroup,stataQuote,stataString,stataEString +syn region stataString matchgroup=Nothing start=/"/ end=/"/ oneline contains=@stataMacroGroup + +" define clusters +syn cluster stataFuncGroup contains=@stataMacroGroup,stataFunc,stataString,stataEstring,stataParen,stataBracket +syn cluster stataMacroGroup contains=stataGlobal,stataLocal +syn cluster stataParenGroup contains=stataParenError,stataBracketError,stataBraceError,stataSpecial,stataFormat + +" Stata functions +" Math +syn region stataFunc matchgroup=Function start=/\" + +" Conditional. +syn keyword stpConditional if else elseif then +syn match stpConditional "\" + +" Repeats. +syn keyword stpRepeat for while loop +syn match stpRepeat "\" + +" Operators. +syn keyword stpOperator asc not and or desc group having in is any some all +syn keyword stpOperator between exists like escape with union intersect minus +syn keyword stpOperator out prior distinct sysdate + +" Statements. +syn keyword stpStatement alter analyze as audit avg by close clustered comment +syn keyword stpStatement commit continue count create cursor declare delete +syn keyword stpStatement drop exec execute explain fetch from index insert +syn keyword stpStatement into lock max min next noaudit nonclustered open +syn keyword stpStatement order output print raiserror recompile rename revoke +syn keyword stpStatement rollback savepoint select set sum transaction +syn keyword stpStatement truncate unique update values where + +" Functions. +syn keyword stpFunction abs acos ascii asin atan atn2 avg ceiling charindex +syn keyword stpFunction charlength convert col_name col_length cos cot count +syn keyword stpFunction curunreservedpgs datapgs datalength dateadd datediff +syn keyword stpFunction datename datepart db_id db_name degree difference +syn keyword stpFunction exp floor getdate hextoint host_id host_name index_col +syn keyword stpFunction inttohex isnull lct_admin log log10 lower ltrim max +syn keyword stpFunction min now object_id object_name patindex pi pos power +syn keyword stpFunction proc_role radians rand replace replicate reserved_pgs +syn keyword stpFunction reverse right rtrim rowcnt round show_role sign sin +syn keyword stpFunction soundex space sqrt str stuff substr substring sum +syn keyword stpFunction suser_id suser_name tan tsequal upper used_pgs user +syn keyword stpFunction user_id user_name valid_name valid_user message + +" Types. +syn keyword stpType binary bit char datetime decimal double float image +syn keyword stpType int integer long money nchar numeric precision real +syn keyword stpType smalldatetime smallint smallmoney text time tinyint +syn keyword stpType timestamp varbinary varchar + +" Globals. +syn match stpGlobals '@@char_convert' +syn match stpGlobals '@@cient_csname' +syn match stpGlobals '@@client_csid' +syn match stpGlobals '@@connections' +syn match stpGlobals '@@cpu_busy' +syn match stpGlobals '@@error' +syn match stpGlobals '@@identity' +syn match stpGlobals '@@idle' +syn match stpGlobals '@@io_busy' +syn match stpGlobals '@@isolation' +syn match stpGlobals '@@langid' +syn match stpGlobals '@@language' +syn match stpGlobals '@@max_connections' +syn match stpGlobals '@@maxcharlen' +syn match stpGlobals '@@ncharsize' +syn match stpGlobals '@@nestlevel' +syn match stpGlobals '@@pack_received' +syn match stpGlobals '@@pack_sent' +syn match stpGlobals '@@packet_errors' +syn match stpGlobals '@@procid' +syn match stpGlobals '@@rowcount' +syn match stpGlobals '@@servername' +syn match stpGlobals '@@spid' +syn match stpGlobals '@@sqlstatus' +syn match stpGlobals '@@testts' +syn match stpGlobals '@@textcolid' +syn match stpGlobals '@@textdbid' +syn match stpGlobals '@@textobjid' +syn match stpGlobals '@@textptr' +syn match stpGlobals '@@textsize' +syn match stpGlobals '@@thresh_hysteresis' +syn match stpGlobals '@@timeticks' +syn match stpGlobals '@@total_error' +syn match stpGlobals '@@total_read' +syn match stpGlobals '@@total_write' +syn match stpGlobals '@@tranchained' +syn match stpGlobals '@@trancount' +syn match stpGlobals '@@transtate' +syn match stpGlobals '@@version' + +" Todos. +syn keyword stpTodo TODO FIXME XXX DEBUG NOTE + +" Strings and characters. +syn match stpStringError "'.*$" +syn match stpString "'\([^']\|''\)*'" + +" Numbers. +syn match stpNumber "-\=\<\d*\.\=[0-9_]\>" + +" Comments. +syn region stpComment start="/\*" end="\*/" contains=stpTodo +syn match stpComment "--.*" contains=stpTodo +syn sync ccomment stpComment + +" Parens. +syn region stpParen transparent start='(' end=')' contains=ALLBUT,stpParenError +syn match stpParenError ")" + +" Syntax Synchronizing. +syn sync minlines=10 maxlines=100 + +" Define the default highlighting. +" For version 5.x and earlier, only when not done already. +" For version 5.8 and later, only when and item doesn't have highlighting yet. +if version >= 508 || !exists("did_stp_syn_inits") + if version < 508 + let did_stp_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink stpConditional Conditional + HiLink stpComment Comment + HiLink stpKeyword Keyword + HiLink stpNumber Number + HiLink stpOperator Operator + HiLink stpSpecial Special + HiLink stpStatement Statement + HiLink stpString String + HiLink stpStringError Error + HiLink stpType Type + HiLink stpTodo Todo + HiLink stpFunction Function + HiLink stpGlobals Macro + HiLink stpParen Normal + HiLink stpParenError Error + HiLink stpSQLKeyword Function + HiLink stpRepeat Repeat + + delcommand HiLink +endif + +let b:current_syntax = "stp" + +" vim ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/strace.vim b/vim/bundle/ubuntu-vim72/syntax/strace.vim new file mode 100644 index 0000000..80cd262 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/strace.vim @@ -0,0 +1,66 @@ +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: strace output +" Maintainer: David Ne\v{c}as (Yeti) +" Last Change: 2002-10-10 +" URL: http://trific.ath.cx/Ftp/vim/syntax/strace.vim + +" Setup +if version >= 600 + if exists("b:current_syntax") + finish + endif +else + syntax clear +endif + +syn case match + +" Parse the line +syn match straceSpecialChar "\\\d\d\d\|\\." contained +syn region straceString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=straceSpecialChar oneline +syn match straceNumber "\W[+-]\=\(\d\+\)\=\.\=\d\+\([eE][+-]\=\d\+\)\="lc=1 +syn match straceNumber "\W0x\x\+"lc=1 +syn match straceNumberRHS "\W\(0x\x\+\|-\=\d\+\)"lc=1 contained +syn match straceOtherRHS "?" contained +syn match straceConstant "[A-Z_]\{2,}" +syn region straceVerbosed start="(" end=")" matchgroup=Normal contained oneline +syn region straceReturned start="\s=\s" end="$" contains=StraceEquals,straceNumberRHS,straceOtherRHS,straceConstant,straceVerbosed oneline transparent +syn match straceEquals "\s=\s"ms=s+1,me=e-1 +syn match straceParenthesis "[][(){}]" +syn match straceSysCall "^\w\+" +syn match straceOtherPID "^\[[^]]*\]" contains=stracePID,straceNumber nextgroup=straceSysCallEmbed skipwhite +syn match straceSysCallEmbed "\w\+" contained +syn keyword stracePID pid contained +syn match straceOperator "[-+=*/!%&|:,]" +syn region straceComment start="/\*" end="\*/" oneline + +" Define the default highlighting +if version >= 508 || !exists("did_strace_syntax_inits") + if version < 508 + let did_strace_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink straceComment Comment + HiLink straceVerbosed Comment + HiLink stracePID PreProc + HiLink straceNumber Number + HiLink straceNumberRHS Type + HiLink straceOtherRHS Type + HiLink straceString String + HiLink straceConstant Function + HiLink straceEquals Type + HiLink straceSysCallEmbed straceSysCall + HiLink straceSysCall Statement + HiLink straceParenthesis Statement + HiLink straceOperator Normal + HiLink straceSpecialChar Special + HiLink straceOtherPID PreProc + + delcommand HiLink +endif + +let b:current_syntax = "strace" diff --git a/vim/bundle/ubuntu-vim72/syntax/sudoers.vim b/vim/bundle/ubuntu-vim72/syntax/sudoers.vim new file mode 100644 index 0000000..1bcd03f --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sudoers.vim @@ -0,0 +1,266 @@ +" Vim syntax file +" Language: sudoers(5) configuration files +" Maintainer: Nikolai Weibull +" Latest Revision: 2007-08-02 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" TODO: instead of 'skipnl', we would like to match a specific group that would +" match \\$ and then continue with the nextgroup, actually, the skipnl doesn't +" work... +" TODO: treat 'ALL' like a special (yay, a bundle of new rules!!!) + +syn match sudoersUserSpec '^' nextgroup=@sudoersUserInSpec skipwhite + +syn match sudoersSpecEquals contained '=' nextgroup=@sudoersCmndSpecList skipwhite + +syn cluster sudoersCmndSpecList contains=sudoersUserRunasBegin,sudoersPASSWD,@sudoersCmndInSpec + +syn keyword sudoersTodo contained TODO FIXME XXX NOTE + +syn region sudoersComment display oneline start='#' end='$' contains=sudoersTodo + +syn keyword sudoersAlias User_Alias Runas_Alias nextgroup=sudoersUserAlias skipwhite skipnl +syn keyword sudoersAlias Host_Alias nextgroup=sudoersHostAlias skipwhite skipnl +syn keyword sudoersAlias Cmnd_Alias nextgroup=sudoersCmndAlias skipwhite skipnl + +syn match sudoersUserAlias contained '\<\u[A-Z0-9_]*\>' nextgroup=sudoersUserAliasEquals skipwhite skipnl +syn match sudoersUserNameInList contained '\<\l\+\>' nextgroup=@sudoersUserList skipwhite skipnl +syn match sudoersUIDInList contained '#\d\+\>' nextgroup=@sudoersUserList skipwhite skipnl +syn match sudoersGroupInList contained '%\l\+\>' nextgroup=@sudoersUserList skipwhite skipnl +syn match sudoersUserNetgroupInList contained '+\l\+\>' nextgroup=@sudoersUserList skipwhite skipnl +syn match sudoersUserAliasInList contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersUserList skipwhite skipnl + +syn match sudoersUserName contained '\<\l\+\>' nextgroup=@sudoersParameter skipwhite skipnl +syn match sudoersUID contained '#\d\+\>' nextgroup=@sudoersParameter skipwhite skipnl +syn match sudoersGroup contained '%\l\+\>' nextgroup=@sudoersParameter skipwhite skipnl +syn match sudoersUserNetgroup contained '+\l\+\>' nextgroup=@sudoersParameter skipwhite skipnl +syn match sudoersUserAliasRef contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersParameter skipwhite skipnl + +syn match sudoersUserNameInSpec contained '\<\l\+\>' nextgroup=@sudoersUserSpec skipwhite skipnl +syn match sudoersUIDInSpec contained '#\d\+\>' nextgroup=@sudoersUserSpec skipwhite skipnl +syn match sudoersGroupInSpec contained '%\l\+\>' nextgroup=@sudoersUserSpec skipwhite skipnl +syn match sudoersUserNetgroupInSpec contained '+\l\+\>' nextgroup=@sudoersUserSpec skipwhite skipnl +syn match sudoersUserAliasInSpec contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersUserSpec skipwhite skipnl + +syn match sudoersUserNameInRunas contained '\<\l\+\>' nextgroup=@sudoersUserRunas skipwhite skipnl +syn match sudoersUIDInRunas contained '#\d\+\>' nextgroup=@sudoersUserRunas skipwhite skipnl +syn match sudoersGroupInRunas contained '%\l\+\>' nextgroup=@sudoersUserRunas skipwhite skipnl +syn match sudoersUserNetgroupInRunas contained '+\l\+\>' nextgroup=@sudoersUserRunas skipwhite skipnl +syn match sudoersUserAliasInRunas contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersUserRunas skipwhite skipnl + +syn match sudoersHostAlias contained '\<\u[A-Z0-9_]*\>' nextgroup=sudoersHostAliasEquals skipwhite skipnl +syn match sudoersHostNameInList contained '\<\l\+\>' nextgroup=@sudoersHostList skipwhite skipnl +syn match sudoersIPAddrInList contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}' nextgroup=@sudoersHostList skipwhite skipnl +syn match sudoersNetworkInList contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}\%(/\%(\%(\d\{1,3}\.\)\{3}\d\{1,3}\|\d\+\)\)\=' nextgroup=@sudoersHostList skipwhite skipnl +syn match sudoersHostNetgroupInList contained '+\l\+\>' nextgroup=@sudoersHostList skipwhite skipnl +syn match sudoersHostAliasInList contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersHostList skipwhite skipnl + +syn match sudoersHostName contained '\<\l\+\>' nextgroup=@sudoersParameter skipwhite skipnl +syn match sudoersIPAddr contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}' nextgroup=@sudoersParameter skipwhite skipnl +syn match sudoersNetwork contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}\%(/\%(\%(\d\{1,3}\.\)\{3}\d\{1,3}\|\d\+\)\)\=' nextgroup=@sudoersParameter skipwhite skipnl +syn match sudoersHostNetgroup contained '+\l\+\>' nextgroup=@sudoersParameter skipwhite skipnl +syn match sudoersHostAliasRef contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersParameter skipwhite skipnl + +syn match sudoersHostNameInSpec contained '\<\l\+\>' nextgroup=@sudoersHostSpec skipwhite skipnl +syn match sudoersIPAddrInSpec contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}' nextgroup=@sudoersHostSpec skipwhite skipnl +syn match sudoersNetworkInSpec contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}\%(/\%(\%(\d\{1,3}\.\)\{3}\d\{1,3}\|\d\+\)\)\=' nextgroup=@sudoersHostSpec skipwhite skipnl +syn match sudoersHostNetgroupInSpec contained '+\l\+\>' nextgroup=@sudoersHostSpec skipwhite skipnl +syn match sudoersHostAliasInSpec contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersHostSpec skipwhite skipnl + +syn match sudoersCmndAlias contained '\<\u[A-Z0-9_]*\>' nextgroup=sudoersCmndAliasEquals skipwhite skipnl +syn match sudoersCmndNameInList contained '[^[:space:],:=\\]\+\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=@sudoersCmndList,sudoersCommandEmpty,sudoersCommandArgs skipwhite +syn match sudoersCmndAliasInList contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersCmndList skipwhite skipnl + +syn match sudoersCmndNameInSpec contained '[^[:space:],:=\\]\+\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=@sudoersCmndSpec,sudoersCommandEmptyInSpec,sudoersCommandArgsInSpec skipwhite +syn match sudoersCmndAliasInSpec contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersCmndSpec skipwhite skipnl + +syn match sudoersUserAliasEquals contained '=' nextgroup=@sudoersUserInList skipwhite skipnl +syn match sudoersUserListComma contained ',' nextgroup=@sudoersUserInList skipwhite skipnl +syn match sudoersUserListColon contained ':' nextgroup=sudoersUserAlias skipwhite skipnl +syn cluster sudoersUserList contains=sudoersUserListComma,sudoersUserListColon + +syn match sudoersUserSpecComma contained ',' nextgroup=@sudoersUserInSpec skipwhite skipnl +syn cluster sudoersUserSpec contains=sudoersUserSpecComma,@sudoersHostInSpec + +syn match sudoersUserRunasBegin contained '(' nextgroup=@sudoersUserInRunas skipwhite skipnl +syn match sudoersUserRunasComma contained ',' nextgroup=@sudoersUserInRunas skipwhite skipnl +syn match sudoersUserRunasEnd contained ')' nextgroup=sudoersPASSWD,@sudoersCmndInSpec skipwhite skipnl +syn cluster sudoersUserRunas contains=sudoersUserRunasComma,@sudoersUserInRunas,sudoersUserRunasEnd + + +syn match sudoersHostAliasEquals contained '=' nextgroup=@sudoersHostInList skipwhite skipnl +syn match sudoersHostListComma contained ',' nextgroup=@sudoersHostInList skipwhite skipnl +syn match sudoersHostListColon contained ':' nextgroup=sudoersHostAlias skipwhite skipnl +syn cluster sudoersHostList contains=sudoersHostListComma,sudoersHostListColon + +syn match sudoersHostSpecComma contained ',' nextgroup=@sudoersHostInSpec skipwhite skipnl +syn cluster sudoersHostSpec contains=sudoersHostSpecComma,sudoersSpecEquals + + +syn match sudoersCmndAliasEquals contained '=' nextgroup=@sudoersCmndInList skipwhite skipnl +syn match sudoersCmndListComma contained ',' nextgroup=@sudoersCmndInList skipwhite skipnl +syn match sudoersCmndListColon contained ':' nextgroup=sudoersCmndAlias skipwhite skipnl +syn cluster sudoersCmndList contains=sudoersCmndListComma,sudoersCmndListColon + +syn match sudoersCmndSpecComma contained ',' nextgroup=@sudoersCmndSpecList skipwhite skipnl +syn match sudoersCmndSpecColon contained ':' nextgroup=@sudoersUserInSpec skipwhite skipnl +syn cluster sudoersCmndSpec contains=sudoersCmndSpecComma,sudoersCmndSpecColon + +syn cluster sudoersUserInList contains=sudoersUserNegationInList,sudoersUserNameInList,sudoersUIDInList,sudoersGroupInList,sudoersUserNetgroupInList,sudoersUserAliasInList +syn cluster sudoersHostInList contains=sudoersHostNegationInList,sudoersHostNameInList,sudoersIPAddrInList,sudoersNetworkInList,sudoersHostNetgroupInList,sudoersHostAliasInList +syn cluster sudoersCmndInList contains=sudoersCmndNegationInList,sudoersCmndNameInList,sudoersCmndAliasInList + +syn cluster sudoersUser contains=sudoersUserNegation,sudoersUserName,sudoersUID,sudoersGroup,sudoersUserNetgroup,sudoersUserAliasRef +syn cluster sudoersHost contains=sudoersHostNegation,sudoersHostName,sudoersIPAddr,sudoersNetwork,sudoersHostNetgroup,sudoersHostAliasRef + +syn cluster sudoersUserInSpec contains=sudoersUserNegationInSpec,sudoersUserNameInSpec,sudoersUIDInSpec,sudoersGroupInSpec,sudoersUserNetgroupInSpec,sudoersUserAliasInSpec +syn cluster sudoersHostInSpec contains=sudoersHostNegationInSpec,sudoersHostNameInSpec,sudoersIPAddrInSpec,sudoersNetworkInSpec,sudoersHostNetgroupInSpec,sudoersHostAliasInSpec +syn cluster sudoersUserInRunas contains=sudoersUserNegationInRunas,sudoersUserNameInRunas,sudoersUIDInRunas,sudoersGroupInRunas,sudoersUserNetgroupInRunas,sudoersUserAliasInRunas +syn cluster sudoersCmndInSpec contains=sudoersCmndNegationInSpec,sudoersCmndNameInSpec,sudoersCmndAliasInSpec + +syn match sudoersUserNegationInList contained '!\+' nextgroup=@sudoersUserInList skipwhite skipnl +syn match sudoersHostNegationInList contained '!\+' nextgroup=@sudoersHostInList skipwhite skipnl +syn match sudoersCmndNegationInList contained '!\+' nextgroup=@sudoersCmndInList skipwhite skipnl + +syn match sudoersUserNegation contained '!\+' nextgroup=@sudoersUser skipwhite skipnl +syn match sudoersHostNegation contained '!\+' nextgroup=@sudoersHost skipwhite skipnl + +syn match sudoersUserNegationInSpec contained '!\+' nextgroup=@sudoersUserInSpec skipwhite skipnl +syn match sudoersHostNegationInSpec contained '!\+' nextgroup=@sudoersHostInSpec skipwhite skipnl +syn match sudoersUserNegationInRunas contained '!\+' nextgroup=@sudoersUserInRunas skipwhite skipnl +syn match sudoersCmndNegationInSpec contained '!\+' nextgroup=@sudoersCmndInSpec skipwhite skipnl + +syn match sudoersCommandArgs contained '[^[:space:],:=\\]\+\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=sudoersCommandArgs,@sudoersCmndList skipwhite +syn match sudoersCommandEmpty contained '""' nextgroup=@sudoersCmndList skipwhite skipnl + +syn match sudoersCommandArgsInSpec contained '[^[:space:],:=\\]\+\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=sudoersCommandArgsInSpec,@sudoersCmndSpec skipwhite +syn match sudoersCommandEmptyInSpec contained '""' nextgroup=@sudoersCmndSpec skipwhite skipnl + +syn keyword sudoersDefaultEntry Defaults nextgroup=sudoersDefaultTypeAt,sudoersDefaultTypeColon,sudoersDefaultTypeGreaterThan,@sudoersParameter skipwhite skipnl +syn match sudoersDefaultTypeAt contained '@' nextgroup=@sudoersHost skipwhite skipnl +syn match sudoersDefaultTypeColon contained ':' nextgroup=@sudoersUser skipwhite skipnl +syn match sudoersDefaultTypeGreaterThan contained '>' nextgroup=@sudoersUser skipwhite skipnl + +" TODO: could also deal with special characters here +syn match sudoersBooleanParameter contained '!' nextgroup=sudoersBooleanParameter skipwhite skipnl +syn keyword sudoersBooleanParameter contained long_opt_prompt ignore_dot mail_always mail_badpass mail_no_user mail_no_perms tty_tickets lecture authenticate root_sudo log_host log_year shell_noargs set_home always_set_home path_info preserve_groups fqdn insults requiretty env_editor rootpw runaspw targetpw set_logname stay_setuid env_reset use_loginclass nextgroup=sudoersParameterListComma skipwhite skipnl +syn keyword sudoersIntegerParameter contained passwd_tries loglinelen timestamp_timeout passwd_timeout umask nextgroup=sudoersIntegerParameterEquals skipwhite skipnl +syn keyword sudoersStringParameter contained mailsub badpass_message timestampdir timestampowner passprompt runas_default syslog_goodpri syslog_badpri editor logfile syslog mailerpath mailerflags mailto exempt_group verifypw listpw nextgroup=sudoersStringParameterEquals skipwhite skipnl +syn keyword sudoersListParameter contained env_check env_delete env_keep nextgroup=sudoersListParameterEquals skipwhite skipnl + +syn match sudoersParameterListComma contained ',' nextgroup=@sudoersParameter skipwhite skipnl + +syn cluster sudoersParameter contains=sudoersBooleanParameter,sudoersIntegerParameter,sudoersStringParameter,sudoersListParameter + +syn match sudoersIntegerParameterEquals contained '[+-]\==' nextgroup=sudoersIntegerValue skipwhite skipnl +syn match sudoersStringParameterEquals contained '[+-]\==' nextgroup=sudoersStringValue skipwhite skipnl +syn match sudoersListParameterEquals contained '[+-]\==' nextgroup=sudoersListValue skipwhite skipnl + +syn match sudoersIntegerValue contained '\d\+' nextgroup=sudoersParameterListComma skipwhite skipnl +syn match sudoersStringValue contained '[^[:space:],:=\\]*\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=sudoersParameterListComma skipwhite skipnl +syn region sudoersStringValue contained start=+"+ skip=+\\"+ end=+"+ nextgroup=sudoersParameterListComma skipwhite skipnl +syn match sudoersListValue contained '[^[:space:],:=\\]*\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=sudoersParameterListComma skipwhite skipnl +syn region sudoersListValue contained start=+"+ skip=+\\"+ end=+"+ nextgroup=sudoersParameterListComma skipwhite skipnl + +syn match sudoersPASSWD contained '\%(NO\)\=PASSWD:' nextgroup=@sudoersCmndInSpec skipwhite + +hi def link sudoersSpecEquals Operator +hi def link sudoersTodo Todo +hi def link sudoersComment Comment +hi def link sudoersAlias Keyword +hi def link sudoersUserAlias Identifier +hi def link sudoersUserNameInList String +hi def link sudoersUIDInList Number +hi def link sudoersGroupInList PreProc +hi def link sudoersUserNetgroupInList PreProc +hi def link sudoersUserAliasInList PreProc +hi def link sudoersUserName String +hi def link sudoersUID Number +hi def link sudoersGroup PreProc +hi def link sudoersUserNetgroup PreProc +hi def link sudoersUserAliasRef PreProc +hi def link sudoersUserNameInSpec String +hi def link sudoersUIDInSpec Number +hi def link sudoersGroupInSpec PreProc +hi def link sudoersUserNetgroupInSpec PreProc +hi def link sudoersUserAliasInSpec PreProc +hi def link sudoersUserNameInRunas String +hi def link sudoersUIDInRunas Number +hi def link sudoersGroupInRunas PreProc +hi def link sudoersUserNetgroupInRunas PreProc +hi def link sudoersUserAliasInRunas PreProc +hi def link sudoersHostAlias Identifier +hi def link sudoersHostNameInList String +hi def link sudoersIPAddrInList Number +hi def link sudoersNetworkInList Number +hi def link sudoersHostNetgroupInList PreProc +hi def link sudoersHostAliasInList PreProc +hi def link sudoersHostName String +hi def link sudoersIPAddr Number +hi def link sudoersNetwork Number +hi def link sudoersHostNetgroup PreProc +hi def link sudoersHostAliasRef PreProc +hi def link sudoersHostNameInSpec String +hi def link sudoersIPAddrInSpec Number +hi def link sudoersNetworkInSpec Number +hi def link sudoersHostNetgroupInSpec PreProc +hi def link sudoersHostAliasInSpec PreProc +hi def link sudoersCmndAlias Identifier +hi def link sudoersCmndNameInList String +hi def link sudoersCmndAliasInList PreProc +hi def link sudoersCmndNameInSpec String +hi def link sudoersCmndAliasInSpec PreProc +hi def link sudoersUserAliasEquals Operator +hi def link sudoersUserListComma Delimiter +hi def link sudoersUserListColon Delimiter +hi def link sudoersUserSpecComma Delimiter +hi def link sudoersUserRunasBegin Delimiter +hi def link sudoersUserRunasComma Delimiter +hi def link sudoersUserRunasEnd Delimiter +hi def link sudoersHostAliasEquals Operator +hi def link sudoersHostListComma Delimiter +hi def link sudoersHostListColon Delimiter +hi def link sudoersHostSpecComma Delimiter +hi def link sudoersCmndAliasEquals Operator +hi def link sudoersCmndListComma Delimiter +hi def link sudoersCmndListColon Delimiter +hi def link sudoersCmndSpecComma Delimiter +hi def link sudoersCmndSpecColon Delimiter +hi def link sudoersUserNegationInList Operator +hi def link sudoersHostNegationInList Operator +hi def link sudoersCmndNegationInList Operator +hi def link sudoersUserNegation Operator +hi def link sudoersHostNegation Operator +hi def link sudoersUserNegationInSpec Operator +hi def link sudoersHostNegationInSpec Operator +hi def link sudoersUserNegationInRunas Operator +hi def link sudoersCmndNegationInSpec Operator +hi def link sudoersCommandArgs String +hi def link sudoersCommandEmpty Special +hi def link sudoersDefaultEntry Keyword +hi def link sudoersDefaultTypeAt Special +hi def link sudoersDefaultTypeColon Special +hi def link sudoersDefaultTypeGreaterThan Special +hi def link sudoersBooleanParameter Identifier +hi def link sudoersIntegerParameter Identifier +hi def link sudoersStringParameter Identifier +hi def link sudoersListParameter Identifier +hi def link sudoersParameterListComma Delimiter +hi def link sudoersIntegerParameterEquals Operator +hi def link sudoersStringParameterEquals Operator +hi def link sudoersListParameterEquals Operator +hi def link sudoersIntegerValue Number +hi def link sudoersStringValue String +hi def link sudoersListValue String +hi def link sudoersPASSWD Special + +let b:current_syntax = "sudoers" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/svn.vim b/vim/bundle/ubuntu-vim72/syntax/svn.vim new file mode 100644 index 0000000..0cd770a --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/svn.vim @@ -0,0 +1,51 @@ +" Vim syntax file +" Language: Subversion (svn) commit file +" Maintainer: Dmitry Vasiliev +" URL: http://www.hlabs.spb.ru/vim/svn.vim +" Revision: $Id: svn.vim 683 2008-07-30 11:52:38Z hdima $ +" Filenames: svn-commit*.tmp +" Version: 1.6 + +" Contributors: +" Stefano Zacchiroli +" A. S. Budden + +" 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 region svnRegion start="^--.*--$" end="\%$" contains=ALL contains=@NoSpell +syn match svnRemoved "^D .*$" contained +syn match svnAdded "^A[ M] .*$" contained +syn match svnModified "^M[ M] .*$" contained +syn match svnProperty "^_M .*$" contained + +" Synchronization. +syn sync clear +syn sync match svnSync grouphere svnRegion "^--.*--$"me=s-1 + +" 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_svn_syn_inits") + if version <= 508 + let did_svn_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink svnRegion Comment + HiLink svnRemoved Constant + HiLink svnAdded Identifier + HiLink svnModified Special + HiLink svnProperty Special + + delcommand HiLink +endif + +let b:current_syntax = "svn" diff --git a/vim/bundle/ubuntu-vim72/syntax/syncolor.vim b/vim/bundle/ubuntu-vim72/syntax/syncolor.vim new file mode 100644 index 0000000..8d0064d --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/syncolor.vim @@ -0,0 +1,85 @@ +" Vim syntax support file +" Maintainer: Bram Moolenaar +" Last Change: 2001 Sep 12 + +" This file sets up the default methods for highlighting. +" It is loaded from "synload.vim" and from Vim for ":syntax reset". +" Also used from init_highlight(). + +if !exists("syntax_cmd") || syntax_cmd == "on" + " ":syntax on" works like in Vim 5.7: set colors but keep links + command -nargs=* SynColor hi + command -nargs=* SynLink hi link +else + if syntax_cmd == "enable" + " ":syntax enable" keeps any existing colors + command -nargs=* SynColor hi def + command -nargs=* SynLink hi def link + elseif syntax_cmd == "reset" + " ":syntax reset" resets all colors to the default + command -nargs=* SynColor hi + command -nargs=* SynLink hi! link + else + " User defined syncolor file has already set the colors. + finish + endif +endif + +" Many terminals can only use six different colors (plus black and white). +" Therefore the number of colors used is kept low. It doesn't look nice with +" too many colors anyway. +" Careful with "cterm=bold", it changes the color to bright for some terminals. +" There are two sets of defaults: for a dark and a light background. +if &background == "dark" + SynColor Comment term=bold cterm=NONE ctermfg=Cyan ctermbg=NONE gui=NONE guifg=#80a0ff guibg=NONE + SynColor Constant term=underline cterm=NONE ctermfg=Magenta ctermbg=NONE gui=NONE guifg=#ffa0a0 guibg=NONE + SynColor Special term=bold cterm=NONE ctermfg=LightRed ctermbg=NONE gui=NONE guifg=Orange guibg=NONE + SynColor Identifier term=underline cterm=bold ctermfg=Cyan ctermbg=NONE gui=NONE guifg=#40ffff guibg=NONE + SynColor Statement term=bold cterm=NONE ctermfg=Yellow ctermbg=NONE gui=bold guifg=#ffff60 guibg=NONE + SynColor PreProc term=underline cterm=NONE ctermfg=LightBlue ctermbg=NONE gui=NONE guifg=#ff80ff guibg=NONE + SynColor Type term=underline cterm=NONE ctermfg=LightGreen ctermbg=NONE gui=bold guifg=#60ff60 guibg=NONE + SynColor Underlined term=underline cterm=underline ctermfg=LightBlue gui=underline guifg=#80a0ff + SynColor Ignore term=NONE cterm=NONE ctermfg=black ctermbg=NONE gui=NONE guifg=bg guibg=NONE +else + SynColor Comment term=bold cterm=NONE ctermfg=DarkBlue ctermbg=NONE gui=NONE guifg=Blue guibg=NONE + SynColor Constant term=underline cterm=NONE ctermfg=DarkRed ctermbg=NONE gui=NONE guifg=Magenta guibg=NONE + SynColor Special term=bold cterm=NONE ctermfg=DarkMagenta ctermbg=NONE gui=NONE guifg=SlateBlue guibg=NONE + SynColor Identifier term=underline cterm=NONE ctermfg=DarkCyan ctermbg=NONE gui=NONE guifg=DarkCyan guibg=NONE + SynColor Statement term=bold cterm=NONE ctermfg=Brown ctermbg=NONE gui=bold guifg=Brown guibg=NONE + SynColor PreProc term=underline cterm=NONE ctermfg=DarkMagenta ctermbg=NONE gui=NONE guifg=Purple guibg=NONE + SynColor Type term=underline cterm=NONE ctermfg=DarkGreen ctermbg=NONE gui=bold guifg=SeaGreen guibg=NONE + SynColor Underlined term=underline cterm=underline ctermfg=DarkMagenta gui=underline guifg=SlateBlue + SynColor Ignore term=NONE cterm=NONE ctermfg=white ctermbg=NONE gui=NONE guifg=bg guibg=NONE +endif +SynColor Error term=reverse cterm=NONE ctermfg=White ctermbg=Red gui=NONE guifg=White guibg=Red +SynColor Todo term=standout cterm=NONE ctermfg=Black ctermbg=Yellow gui=NONE guifg=Blue guibg=Yellow + +" Common groups that link to default highlighting. +" You can specify other highlighting easily. +SynLink String Constant +SynLink Character Constant +SynLink Number Constant +SynLink Boolean Constant +SynLink Float Number +SynLink Function Identifier +SynLink Conditional Statement +SynLink Repeat Statement +SynLink Label Statement +SynLink Operator Statement +SynLink Keyword Statement +SynLink Exception Statement +SynLink Include PreProc +SynLink Define PreProc +SynLink Macro PreProc +SynLink PreCondit PreProc +SynLink StorageClass Type +SynLink Structure Type +SynLink Typedef Type +SynLink Tag Special +SynLink SpecialChar Special +SynLink Delimiter Special +SynLink SpecialComment Special +SynLink Debug Special + +delcommand SynColor +delcommand SynLink diff --git a/vim/bundle/ubuntu-vim72/syntax/synload.vim b/vim/bundle/ubuntu-vim72/syntax/synload.vim new file mode 100644 index 0000000..54aecbb --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/synload.vim @@ -0,0 +1,76 @@ +" Vim syntax support file +" Maintainer: Bram Moolenaar +" Last Change: 2006 Apr 30 + +" This file sets up for syntax highlighting. +" It is loaded from "syntax.vim" and "manual.vim". +" 1. Set the default highlight groups. +" 2. Install Syntax autocommands for all the available syntax files. + +if !has("syntax") + finish +endif + +" let others know that syntax has been switched on +let syntax_on = 1 + +" Set the default highlighting colors. Use a color scheme if specified. +if exists("colors_name") + exe "colors " . colors_name +else + runtime! syntax/syncolor.vim +endif + +" Line continuation is used here, remove 'C' from 'cpoptions' +let s:cpo_save = &cpo +set cpo&vim + +" First remove all old syntax autocommands. +au! Syntax + +au Syntax * call s:SynSet() + +fun! s:SynSet() + " clear syntax for :set syntax=OFF and any syntax name that doesn't exist + syn clear + if exists("b:current_syntax") + unlet b:current_syntax + endif + + let s = expand("") + if s == "ON" + " :set syntax=ON + if &filetype == "" + echohl ErrorMsg + echo "filetype unknown" + echohl None + endif + let s = &filetype + endif + + if s != "" + " Load the syntax file(s). When there are several, separated by dots, + " load each in sequence. + for name in split(s, '\.') + exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim" + endfor + endif +endfun + + +" Handle adding doxygen to other languages (C, C++, IDL) +au Syntax cpp,c,idl + \ if (exists('b:load_doxygen_syntax') && b:load_doxygen_syntax) + \ || (exists('g:load_doxygen_syntax') && g:load_doxygen_syntax) + \ | runtime! syntax/doxygen.vim + \ | endif + + +" Source the user-specified syntax highlighting file +if exists("mysyntaxfile") && filereadable(expand(mysyntaxfile)) + execute "source " . mysyntaxfile +endif + +" Restore 'cpoptions' +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/syntax.vim b/vim/bundle/ubuntu-vim72/syntax/syntax.vim new file mode 100644 index 0000000..f274d93 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/syntax.vim @@ -0,0 +1,43 @@ +" Vim syntax support file +" Maintainer: Bram Moolenaar +" Last Change: 2001 Sep 04 + +" This file is used for ":syntax on". +" It installs the autocommands and starts highlighting for all buffers. + +if !has("syntax") + finish +endif + +" If Syntax highlighting appears to be on already, turn it off first, so that +" any leftovers are cleared. +if exists("syntax_on") || exists("syntax_manual") + so :p:h/nosyntax.vim +endif + +" Load the Syntax autocommands and set the default methods for highlighting. +runtime syntax/synload.vim + +" Load the FileType autocommands if not done yet. +if exists("did_load_filetypes") + let s:did_ft = 1 +else + filetype on + let s:did_ft = 0 +endif + +" Set up the connection between FileType and Syntax autocommands. +" This makes the syntax automatically set when the file type is detected. +augroup syntaxset + au! FileType * exe "set syntax=" . expand("") +augroup END + + +" Execute the syntax autocommands for the each buffer. +" If the filetype wasn't detected yet, do that now. +" Always do the syntaxset autocommands, for buffers where the 'filetype' +" already was set manually (e.g., help buffers). +doautoall syntaxset FileType +if !s:did_ft + doautoall filetypedetect BufRead +endif diff --git a/vim/bundle/ubuntu-vim72/syntax/sysctl.vim b/vim/bundle/ubuntu-vim72/syntax/sysctl.vim new file mode 100644 index 0000000..d16d458 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/sysctl.vim @@ -0,0 +1,39 @@ +" Vim syntax file +" Language: sysctl.conf(5) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn match sysctlBegin display '^' + \ nextgroup=sysctlToken,sysctlComment skipwhite + +syn match sysctlToken contained display '\S\+' + \ nextgroup=sysctlTokenEq skipwhite + +syn match sysctlTokenEq contained display '=' nextgroup=sysctlValue skipwhite + +syn region sysctlValue contained display oneline + \ matchgroup=sysctlValue start='\S' + \ matchgroup=Normal end='\s*$' + +syn keyword sysctlTodo contained TODO FIXME XXX NOTE + +syn region sysctlComment display oneline start='^\s*[#;]' end='$' + \ contains=sysctlTodo,@Spell + +hi def link sysctlTodo Todo +hi def link sysctlComment Comment +hi def link sysctlToken Identifier +hi def link sysctlTokenEq Operator +hi def link sysctlValue String + +let b:current_syntax = "sysctl" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/tads.vim b/vim/bundle/ubuntu-vim72/syntax/tads.vim new file mode 100644 index 0000000..260ff36 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/tads.vim @@ -0,0 +1,184 @@ +" Vim syntax file +" Language: TADS +" Maintainer: Amir Karger +" $Date: 2004/06/13 19:28:45 $ +" $Revision: 1.1 $ +" Stolen from: Bram Moolenaar's C language file +" Newest version at: http://www.hec.utah.edu/~karger/vim/syntax/tads.vim +" History info at the bottom of the file + +" TODO lots more keywords +" global, self, etc. are special *objects*, not functions. They should +" probably be a different color than the special functions +" Actually, should cvtstr etc. be functions?! (change tadsFunction) +" Make global etc. into Identifiers, since we don't have regular variables? + +" 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 keywords +syn keyword tadsStatement goto break return continue pass +syn keyword tadsLabel case default +syn keyword tadsConditional if else switch +syn keyword tadsRepeat while for do +syn keyword tadsStorageClass local compoundWord formatstring specialWords +syn keyword tadsBoolean nil true + +" TADS keywords +syn keyword tadsKeyword replace modify +syn keyword tadsKeyword global self inherited +" builtin functions +syn keyword tadsKeyword cvtstr cvtnum caps lower upper substr +syn keyword tadsKeyword say length +syn keyword tadsKeyword setit setscore +syn keyword tadsKeyword datatype proptype +syn keyword tadsKeyword car cdr +syn keyword tadsKeyword defined isclass +syn keyword tadsKeyword find firstobj nextobj +syn keyword tadsKeyword getarg argcount +syn keyword tadsKeyword input yorn askfile +syn keyword tadsKeyword rand randomize +syn keyword tadsKeyword restart restore quit save undo +syn keyword tadsException abort exit exitobj + +syn keyword tadsTodo contained TODO FIXME XXX + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match tadsSpecial contained "\\." +syn region tadsDoubleString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=tadsSpecial,tadsEmbedded +syn region tadsSingleString start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=tadsSpecial +" Embedded expressions in strings +syn region tadsEmbedded contained start="<<" end=">>" contains=tadsKeyword + +" TADS doesn't have \xxx, right? +"syn match cSpecial contained "\\[0-7][0-7][0-7]\=\|\\." +"syn match cSpecialCharacter "'\\[0-7][0-7]'" +"syn match cSpecialCharacter "'\\[0-7][0-7][0-7]'" + +"catch errors caused by wrong parenthesis +"syn region cParen transparent start='(' end=')' contains=ALLBUT,cParenError,cIncluded,cSpecial,cTodo,cUserCont,cUserLabel +"syn match cParenError ")" +"syn match cInParen contained "[{}]" +syn region tadsBrace transparent start='{' end='}' contains=ALLBUT,tadsBraceError,tadsIncluded,tadsSpecial,tadsTodo +syn match tadsBraceError "}" + +"integer number (TADS has no floating point numbers) +syn case ignore +syn match tadsNumber "\<[0-9]\+\>" +"hex number +syn match tadsNumber "\<0x[0-9a-f]\+\>" +syn match tadsIdentifier "\<[a-z][a-z0-9_$]*\>" +syn case match +" flag an octal number with wrong digits +syn match tadsOctalError "\<0[0-7]*[89]" + +" Removed complicated c_comment_strings +syn region tadsComment start="/\*" end="\*/" contains=tadsTodo +syn match tadsComment "//.*" contains=tadsTodo +syntax match tadsCommentError "\*/" + +syn region tadsPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=tadsComment,tadsString,tadsNumber,tadsCommentError +syn region tadsIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match tadsIncluded contained "<[^>]*>" +syn match tadsInclude "^\s*#\s*include\>\s*["<]" contains=tadsIncluded +syn region tadsDefine start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,tadsPreCondit,tadsIncluded,tadsInclude,tadsDefine,tadsInBrace,tadsIdentifier + +syn region tadsPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,tadsPreCondit,tadsIncluded,tadsInclude,tadsDefine,tadsInParen,tadsIdentifier + +" Highlight User Labels +" TODO labels for gotos? +"syn region cMulti transparent start='?' end=':' contains=ALLBUT,cIncluded,cSpecial,cTodo,cUserCont,cUserLabel,cBitField +" Avoid matching foo::bar() in C++ by requiring that the next char is not ':' +"syn match cUserCont "^\s*\I\i*\s*:$" contains=cUserLabel +"syn match cUserCont ";\s*\I\i*\s*:$" contains=cUserLabel +"syn match cUserCont "^\s*\I\i*\s*:[^:]" contains=cUserLabel +"syn match cUserCont ";\s*\I\i*\s*:[^:]" contains=cUserLabel + +"syn match cUserLabel "\I\i*" contained + +" identifier: class-name [, class-name [...]] [property-list] ; +" Don't highlight comment in class def +syn match tadsClassDef "\[^/]*" contains=tadsObjectDef,tadsClass +syn match tadsClass contained "\" +syn match tadsObjectDef "\<[a-zA-Z][a-zA-Z0-9_$]*\s*:\s*[a-zA-Z0-9_$]\+\(\s*,\s*[a-zA-Z][a-zA-Z0-9_$]*\)*\(\s*;\)\=" +syn keyword tadsFunction contained function +syn match tadsFunctionDef "\<[a-zA-Z][a-zA-Z0-9_$]*\s*:\s*function[^{]*" contains=tadsFunction +"syn region tadsObject transparent start = '[a-zA-Z][\i$]\s*:\s*' end=";" contains=tadsBrace,tadsObjectDef + +" How far back do we go to find matching groups +if !exists("tads_minlines") + let tads_minlines = 15 +endif +exec "syn sync ccomment tadsComment minlines=" . tads_minlines +if !exists("tads_sync_dist") + let tads_sync_dist = 100 +endif +execute "syn sync maxlines=" . tads_sync_dist + +" 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_tads_syn_inits") + if version < 508 + let did_tads_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " The default methods for highlighting. Can be overridden later + HiLink tadsFunctionDef Function + HiLink tadsFunction Structure + HiLink tadsClass Structure + HiLink tadsClassDef Identifier + HiLink tadsObjectDef Identifier +" no highlight for tadsEmbedded, so it prints as normal text w/in the string + + HiLink tadsOperator Operator + HiLink tadsStructure Structure + HiLink tadsTodo Todo + HiLink tadsLabel Label + HiLink tadsConditional Conditional + HiLink tadsRepeat Repeat + HiLink tadsException Exception + HiLink tadsStatement Statement + HiLink tadsStorageClass StorageClass + HiLink tadsKeyWord Keyword + HiLink tadsSpecial SpecialChar + HiLink tadsNumber Number + HiLink tadsBoolean Boolean + HiLink tadsDoubleString tadsString + HiLink tadsSingleString tadsString + + HiLink tadsOctalError tadsError + HiLink tadsCommentError tadsError + HiLink tadsBraceError tadsError + HiLink tadsInBrace tadsError + HiLink tadsError Error + + HiLink tadsInclude Include + HiLink tadsPreProc PreProc + HiLink tadsDefine Macro + HiLink tadsIncluded tadsString + HiLink tadsPreCondit PreCondit + + HiLink tadsString String + HiLink tadsComment Comment + + delcommand HiLink +endif + + +let b:current_syntax = "tads" + +" Changes: +" 11/18/99 Added a bunch of TADS functions, tadsException +" 10/22/99 Misspelled Moolenaar (sorry!), c_minlines to tads_minlines +" +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/tags.vim b/vim/bundle/ubuntu-vim72/syntax/tags.vim new file mode 100644 index 0000000..051d65a --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/tags.vim @@ -0,0 +1,47 @@ +" Language: tags +" Maintainer: Dr. Charles E. Campbell, Jr. +" Last Change: Sep 06, 2005 +" Version: 3 +" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax + +" 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 match tagName "^[^\t]\+" skipwhite nextgroup=tagPath +syn match tagPath "[^\t]\+" contained skipwhite nextgroup=tagAddr contains=tagBaseFile +syn match tagBaseFile "[a-zA-Z_]\+[\.a-zA-Z_0-9]*\t"me=e-1 contained +syn match tagAddr "\d*" contained skipwhite nextgroup=tagComment +syn region tagAddr matchgroup=tagDelim start="/" skip="\(\\\\\)*\\/" matchgroup=tagDelim end="$\|/" oneline contained skipwhite nextgroup=tagComment +syn match tagComment ";.*$" contained contains=tagField +syn match tagComment "^!_TAG_.*$" +syn match tagField contained "[a-z]*:" + +" 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_drchip_tags_inits") + if version < 508 + let did_drchip_tags_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink tagBaseFile PreProc + HiLink tagComment Comment + HiLink tagDelim Delimiter + HiLink tagField Number + HiLink tagName Identifier + HiLink tagPath PreProc + + delcommand HiLink +endif + +let b:current_syntax = "tags" + +" vim: ts=12 diff --git a/vim/bundle/ubuntu-vim72/syntax/tak.vim b/vim/bundle/ubuntu-vim72/syntax/tak.vim new file mode 100644 index 0000000..20186db --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/tak.vim @@ -0,0 +1,136 @@ +" Vim syntax file +" Language: TAK2, TAK3, TAK2000 thermal modeling input file +" Maintainer: Adrian Nagle, anagle@ball.com +" Last Change: 2003 May 11 +" Filenames: *.tak +" URL: http://www.naglenet.org/vim/syntax/tak.vim +" MAIN URL: http://www.naglenet.org/vim/ + + + +" 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 + + + +" Ignore case +syn case ignore + + + +" +" +" Begin syntax definitions for tak input file. +" + +" Force free-form fortran format +let fortran_free_source=1 + +" Load FORTRAN syntax file +if version < 600 + source :p:h/fortran.vim +else + runtime! syntax/fortran.vim +endif +unlet b:current_syntax + + + +" Define keywords for TAK and TAKOUT +syn keyword takOptions AUTODAMP CPRINT CSGDUMP GPRINT HPRINT LODTMP +syn keyword takOptions LOGIC LPRINT NCVPRINT PLOTQ QPRINT QDUMP +syn keyword takOptions SUMMARY SOLRTN UID DICTIONARIES + +syn keyword takRoutine SSITER FWDWRD FWDBCK BCKWRD + +syn keyword takControl ABSZRO BACKUP DAMP DTIMEI DTIMEL DTIMEH IFC +syn keyword takControl MAXTEMP NLOOPS NLOOPT NODELIST OUTPUT PLOT +syn keyword takControl SCALE SIGMA SSCRIT TIMEND TIMEN TIMEO TRCRIT +syn keyword takControl PLOT + +syn keyword takSolids PLATE CYL +syn keyword takSolidsArg ID MATNAM NTYPE TEMP XL YL ZL ISTRN ISTRG NNX +syn keyword takSolidsArg NNY NNZ INCX INCY INCZ IAK IAC DIFF ARITH BOUN +syn keyword takSolidsArg RMIN RMAX AXMAX NNR NNTHETA INCR INCTHETA END + +syn case ignore + +syn keyword takMacro fac pstart pstop +syn keyword takMacro takcommon fstart fstop + +syn keyword takIdentifier flq flx gen ncv per sim siv stf stv tvd tvs +syn keyword takIdentifier tvt pro thm + + + +" Define matches for TAK +syn match takFortran "^F[0-9 ]"me=e-1 +syn match takMotran "^M[0-9 ]"me=e-1 + +syn match takComment "^C.*$" +syn match takComment "^R.*$" +syn match takComment "\$.*$" + +syn match takHeader "^header[^,]*" + +syn match takIncludeFile "include \+[^ ]\+"hs=s+8 contains=fortranInclude + +syn match takInteger "-\=\<[0-9]*\>" +syn match takFloat "-\=\<[0-9]*\.[0-9]*" +syn match takScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" + +syn match takEndData "END OF DATA" + +if exists("thermal_todo") + execute 'syn match takTodo ' . '"^'.thermal_todo.'.*$"' +else + syn match takTodo "^?.*$" +endif + + + +" 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_tak_syntax_inits") + if version < 508 + let did_tak_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink takMacro Macro + HiLink takOptions Special + HiLink takRoutine Type + HiLink takControl Special + HiLink takSolids Special + HiLink takSolidsArg Statement + HiLink takIdentifier Identifier + + HiLink takFortran PreProc + HiLink takMotran PreProc + + HiLink takComment Comment + HiLink takHeader Typedef + HiLink takIncludeFile Type + HiLink takInteger Number + HiLink takFloat Float + HiLink takScientific Float + + HiLink takEndData Macro + + HiLink takTodo Todo + + delcommand HiLink +endif + + +let b:current_syntax = "tak" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/takcmp.vim b/vim/bundle/ubuntu-vim72/syntax/takcmp.vim new file mode 100644 index 0000000..a94609b --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/takcmp.vim @@ -0,0 +1,82 @@ +" Vim syntax file +" Language: TAK2, TAK3, TAK2000 thermal modeling compare file +" Maintainer: Adrian Nagle, anagle@ball.com +" Last Change: 2003 May 11 +" Filenames: *.cmp +" URL: http://www.naglenet.org/vim/syntax/takcmp.vim +" MAIN URL: http://www.naglenet.org/vim/ + + + +" 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 + + + +" Ignore case +syn case ignore + + + +" +" +" Begin syntax definitions for compare files. +" +" Define keywords for TAK compare + syn keyword takcmpUnit celsius fahrenheit + + + +" Define matches for TAK compare + syn match takcmpTitle "Steady State Temperature Comparison" + + syn match takcmpLabel "Run Date:" + syn match takcmpLabel "Run Time:" + syn match takcmpLabel "Temp. File \d Units:" + syn match takcmpLabel "Filename:" + syn match takcmpLabel "Output Units:" + + syn match takcmpHeader "^ *Node\( *File \d\)* *Node Description" + + syn match takcmpDate "\d\d\/\d\d\/\d\d" + syn match takcmpTime "\d\d:\d\d:\d\d" + syn match takcmpInteger "^ *-\=\<[0-9]*\>" + syn match takcmpFloat "-\=\<[0-9]*\.[0-9]*" + + + +" 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_takcmp_syntax_inits") + if version < 508 + let did_takcmp_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink takcmpTitle Type + HiLink takcmpUnit PreProc + + HiLink takcmpLabel Statement + + HiLink takcmpHeader takHeader + + HiLink takcmpDate Identifier + HiLink takcmpTime Identifier + HiLink takcmpInteger Number + HiLink takcmpFloat Special + + delcommand HiLink +endif + + +let b:current_syntax = "takcmp" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/takout.vim b/vim/bundle/ubuntu-vim72/syntax/takout.vim new file mode 100644 index 0000000..7743539 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/takout.vim @@ -0,0 +1,102 @@ +" Vim syntax file +" Language: TAK2, TAK3, TAK2000 thermal modeling output file +" Maintainer: Adrian Nagle, anagle@ball.com +" Last Change: 2003 May 11 +" Filenames: *.out +" URL: http://www.naglenet.org/vim/syntax/takout.vim +" MAIN URL: http://www.naglenet.org/vim/ + + + +" 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 + + + +" Ignore case +syn case match + + + +" Load TAK syntax file +if version < 600 + source :p:h/tak.vim +else + runtime! syntax/tak.vim +endif +unlet b:current_syntax + + + +" +" +" Begin syntax definitions for tak output files. +" + +" Define keywords for TAK output +syn case match + +syn keyword takoutPos ON SI +syn keyword takoutNeg OFF ENG + + + +" Define matches for TAK output +syn match takoutTitle "TAK III" +syn match takoutTitle "Release \d.\d\d" +syn match takoutTitle " K & K Associates *Thermal Analysis Kit III *Serial Number \d\d-\d\d\d" + +syn match takoutFile ": \w*\.TAK"hs=s+2 + +syn match takoutInteger "T\=[0-9]*\>"ms=s+1 + +syn match takoutSectionDelim "[-<>]\{4,}" contains=takoutSectionTitle +syn match takoutSectionDelim ":\=\.\{4,}:\=" contains=takoutSectionTitle +syn match takoutSectionTitle "[-<:] \w[0-9A-Za-z_() ]\+ [->:]"hs=s+1,me=e-1 + +syn match takoutHeaderDelim "=\{5,}" +syn match takoutHeaderDelim "|\{5,}" +syn match takoutHeaderDelim "+\{5,}" + +syn match takoutLabel "Input File:" contains=takoutFile +syn match takoutLabel "Begin Solution: Routine" + +syn match takoutError "<<< Error >>>" + + +" 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_takout_syntax_inits") + if version < 508 + let did_takout_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink takoutPos Statement + HiLink takoutNeg PreProc + HiLink takoutTitle Type + HiLink takoutFile takIncludeFile + HiLink takoutInteger takInteger + + HiLink takoutSectionDelim Delimiter + HiLink takoutSectionTitle Exception + HiLink takoutHeaderDelim SpecialComment + HiLink takoutLabel Identifier + + HiLink takoutError Error + + delcommand HiLink +endif + + +let b:current_syntax = "takout" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/tar.vim b/vim/bundle/ubuntu-vim72/syntax/tar.vim new file mode 100644 index 0000000..497683a --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/tar.vim @@ -0,0 +1,17 @@ +" Language : Tar Listing Syntax +" Maintainer : Bram Moolenaar +" Last change: Sep 08, 2004 + +if exists("b:current_syntax") + finish +endif + +syn match tarComment '^".*' contains=tarFilename +syn match tarFilename 'tarfile \zs.*' contained +syn match tarDirectory '.*/$' + +hi def link tarComment Comment +hi def link tarFilename Constant +hi def link tarDirectory Type + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/taskdata.vim b/vim/bundle/ubuntu-vim72/syntax/taskdata.vim new file mode 100644 index 0000000..79186e0 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/taskdata.vim @@ -0,0 +1,43 @@ +" Vim syntax file +" Language: task data +" Maintainer: John Florian +" Updated: Wed Jul 8 19:46:20 EDT 2009 + + +" 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 + +" Key Names for values. +syn keyword taskdataKey description due end entry imask mask parent +syn keyword taskdataKey priority project recur start status tags uuid +syn match taskdataKey "annotation_\d\+" +syn match taskdataUndo "^time.*$" +syn match taskdataUndo "^\(old \|new \|---\)" + +" Values associated with key names. +" +" Strings +syn region taskdataString matchgroup=Normal start=+"+ end=+"+ + \ contains=taskdataEncoded,taskdataUUID,@Spell +" +" Special Embedded Characters (e.g., ",") +syn match taskdataEncoded "&\a\+;" contained +" UUIDs +syn match taskdataUUID "\x\{8}-\(\x\{4}-\)\{3}\x\{12}" contained + + +" The default methods for highlighting. Can be overridden later. +hi def link taskdataEncoded Function +hi def link taskdataKey Statement +hi def link taskdataString String +hi def link taskdataUUID Special +hi def link taskdataUndo Type + +let b:current_syntax = "taskdata" + +" vim:noexpandtab diff --git a/vim/bundle/ubuntu-vim72/syntax/taskedit.vim b/vim/bundle/ubuntu-vim72/syntax/taskedit.vim new file mode 100644 index 0000000..c7e0ea7 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/taskedit.vim @@ -0,0 +1,35 @@ +" Vim syntax file +" Language: support for 'task 42 edit' +" Maintainer: John Florian +" Updated: Wed Jul 8 19:46:32 EDT 2009 + + +" 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 match taskeditHeading "^\s*#\s*Name\s\+Editable details\s*$" contained +syn match taskeditHeading "^\s*#\s*-\+\s\+-\+\s*$" contained +syn match taskeditReadOnly "^\s*#\s*\(UU\)\?ID:.*$" contained +syn match taskeditReadOnly "^\s*#\s*Status:.*$" contained +syn match taskeditReadOnly "^\s*#\s*i\?Mask:.*$" contained +syn match taskeditKey "^ *.\{-}:" nextgroup=taskeditString +syn match taskeditComment "^\s*#.*$" + \ contains=taskeditReadOnly,taskeditHeading +syn match taskeditString ".*$" contained contains=@Spell + + +" The default methods for highlighting. Can be overridden later. +hi def link taskeditComment Comment +hi def link taskeditHeading Function +hi def link taskeditKey Statement +hi def link taskeditReadOnly Special +hi def link taskeditString String + +let b:current_syntax = "taskedit" + +" vim:noexpandtab diff --git a/vim/bundle/ubuntu-vim72/syntax/tasm.vim b/vim/bundle/ubuntu-vim72/syntax/tasm.vim new file mode 100644 index 0000000..1cfc121 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/tasm.vim @@ -0,0 +1,122 @@ +" Vim syntax file +" Language: TASM: turbo assembler by Borland +" Maintaner: FooLman of United Force +" Last change: 22 aug 2000 + +" 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 tasmLabel "^[\ \t]*[@a-z_$][a-z0-9_$@]*\ *:" +syn keyword tasmDirective ALIAS ALIGN ARG ASSUME %BIN CATSRT CODESEG +syn match tasmDirective "\<\(byte\|word\|dword\|qword\)\ ptr\>" +" CALL extended syntax +syn keyword tasmDirective COMM %CONDS CONST %CREF %CREFALL %CREFREF +syn keyword tasmDirective %CREFUREF %CTLS DATASEG DB DD %DEPTH DF DISPLAY +syn keyword tasmDirective DOSSEG DP DQ DT DW ELSE EMUL END ENDIF +" IF XXXX +syn keyword tasmDirective ENDM ENDP ENDS ENUM EQU ERR EVEN EVENDATA EXITCODE +syn keyword tasmDirective EXITM EXTRN FARDATA FASTIMUL FLIPFLAG GETFIELD GLOBAL +syn keyword tasmDirective GOTO GROUP IDEAL %INCL INCLUDE INCLUDELIB INSTR IRP +"JMP +syn keyword tasmDirective IRPC JUMPS LABEL LARGESTACK %LINUM %LIST LOCAL +syn keyword tasmDirective LOCALS MACRO %MACS MASKFLAG MASM MASM51 MODEL +syn keyword tasmDirective MULTERRS NAME %NEWPAGE %NOCONDS %NOCREF %NOCTLS +syn keyword tasmDirective NOEMUL %NOINCL NOJUMPS %NOLIST NOLOCALS %NOMACS +syn keyword tasmDirective NOMASM51 NOMULTERRS NOSMART %NOSYMS %NOTRUNC NOWARN +syn keyword tasmDirective %PAGESIZE %PCNT PNO87 %POPLCTL POPSTATE PROC PROCDESC +syn keyword tasmDirective PROCTYPE PUBLIC PUBLICDLL PURGE %PUSHCTL PUSHSTATE +"rept, ret +syn keyword tasmDirective QUIRKS RADIX RECORD RETCODE SEGMENT SETFIELD +syn keyword tasmDirective SETFLAG SIZESTR SMALLSTACK SMART STACK STARTUPCODE +syn keyword tasmDirective STRUC SUBSTR %SUBTTL %SYMS TABLE %TABSIZE TBLINIT +syn keyword tasmDirective TBLINST TBLPTR TESTFLAG %TEXT %TITLE %TRUNC TYPEDEF +syn keyword tasmDirective UDATASEG UFARDATA UNION USES VERSION WAR WHILE ?DEBUG + +syn keyword tasmInstruction AAA AAD AAM AAS ADC ADD AND ARPL BOUND BSF BSR +syn keyword tasmInstruction BSWAP BT BTC BTR BTS CALL CBW CLC CLD CLI CLTS +syn keyword tasmInstruction CMC CMP CMPXCHG CMPXCHG8B CPUID CWD CDQ CWDE +syn keyword tasmInstruction DAA DAS DEC DIV ENTER RETN RETF F2XM1 +syn keyword tasmCoprocInstr FABS FADD FADDP FBLD FBSTP FCHG FCOM FCOM2 FCOMI +syn keyword tasmCoprocInstr FCOMIP FCOMP FCOMP3 FCOMP5 FCOMPP FCOS FDECSTP +syn keyword tasmCoprocInstr FDISI FDIV FDIVP FDIVR FENI FFREE FFREEP FIADD +syn keyword tasmCoprocInstr FICOM FICOMP FIDIV FIDIVR FILD FIMUL FINIT FINCSTP +syn keyword tasmCoprocInstr FIST FISTP FISUB FISUBR FLD FLD1 FLDCW FLDENV +syn keyword tasmCoprocInstr FLDL2E FLDL2T FLDLG2 FLDLN2 FLDPI FLDZ FMUL FMULP +syn keyword tasmCoprocInstr FNCLEX FNINIT FNOP FNSAVE FNSTCW FNSTENV FNSTSW +syn keyword tasmCoprocInstr FPATAN FPREM FPREM1 FPTAN FRNDINT FRSTOR FSCALE +syn keyword tasmCoprocInstr FSETPM FSIN FSINCOM FSQRT FST FSTP FSTP1 FSTP8 +syn keyword tasmCoprocInstr FSTP9 FSUB FSUBP FSUBR FSUBRP FTST FUCOM FUCOMI +syn keyword tasmCoprocInstr FUCOMPP FWAIT FXAM FXCH FXCH4 FXCH7 FXTRACT FYL2X +syn keyword tasmCoprocInstr FYL2XP1 FSTCW FCHS FSINCOS +syn keyword tasmInstruction IDIV IMUL IN INC INT INTO INVD INVLPG IRET JMP +syn keyword tasmInstruction LAHF LAR LDS LEA LEAVE LES LFS LGDT LGS LIDT LLDT +syn keyword tasmInstruction LMSW LOCK LODSB LSL LSS LTR MOV MOVSX MOVZX MUL +syn keyword tasmInstruction NEG NOP NOT OR OUT POP POPA POPAD POPF POPFD PUSH +syn keyword tasmInstruction PUSHA PUSHAD PUSHF PUSHFD RCL RCR RDMSR RDPMC RDTSC +syn keyword tasmInstruction REP RET ROL ROR RSM SAHF SAR SBB SGDT SHL SAL SHLD +syn keyword tasmInstruction SHR SHRD SIDT SMSW STC STD STI STR SUB TEST VERR +syn keyword tasmInstruction VERW WBINVD WRMSR XADD XCHG XLAT XOR +syn keyword tasmMMXinst EMMS MOVD MOVQ PACKSSDW PACKSSWB PACKUSWB PADDB +syn keyword tasmMMXinst PADDD PADDSB PADDSB PADDSW PADDUSB PADDUSW PADDW +syn keyword tasmMMXinst PAND PANDN PCMPEQB PCMPEQD PCMPEQW PCMPGTB PCMPGTD +syn keyword tasmMMXinst PCMPGTW PMADDWD PMULHW PMULLW POR PSLLD PSLLQ +syn keyword tasmMMXinst PSLLW PSRAD PSRAW PSRLD PSRLQ PSRLW PSUBB PSUBD +syn keyword tasmMMXinst PSUBSB PSUBSW PSUBUSB PSUBUSW PSUBW PUNPCKHBW +syn keyword tasmMMXinst PUNPCKHBQ PUNPCKHWD PUNPCKLBW PUNPCKLDQ PUNPCKLWD +syn keyword tasmMMXinst PXOR +"FCMOV +syn match tasmInstruction "\<\(CMPS\|MOVS\|OUTS\|SCAS\|STOS\|LODS\|INS\)[BWD]" +syn match tasmInstruction "\<\(CMOV\|SET\|J\)N\=[ABCGLESXZ]\>" +syn match tasmInstruction "\<\(CMOV\|SET\|J\)N\=[ABGL]E\>" +syn match tasmInstruction "\<\(LOOP\|REP\)N\=[EZ]\=\>" +syn match tasmRegister "\<[A-D][LH]\>" +syn match tasmRegister "\" +syn match tasmRegister "\<[C-GS]S\>" +syn region tasmComment start=";" end="$" +"HACK! comment ? ... selection +syn region tasmComment start="comment \+\$" end="\$" +syn region tasmComment start="comment \+\~" end="\~" +syn region tasmComment start="comment \+#" end="#" +syn region tasmString start="'" end="'" +syn region tasmString start='"' end='"' + +syn match tasmDec "\<-\=[0-9]\+\.\=[0-9]*\>" +syn match tasmHex "\<[0-9][0-9A-F]*H\>" +syn match tasmOct "\<[0-7]\+O\>" +syn match tasmBin "\<[01]\+B\>" + +" 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_tasm_syntax_inits") + if version < 508 + let did_tasm_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink tasmString String + HiLink tasmDec Number + HiLink tasmHex Number + HiLink tasmOct Number + HiLink tasmBin Number + HiLink tasmInstruction Keyword + HiLink tasmCoprocInstr Keyword + HiLink tasmMMXInst Keyword + HiLink tasmDirective PreProc + HiLink tasmRegister Identifier + HiLink tasmProctype PreProc + HiLink tasmComment Comment + HiLink tasmLabel Label + + delcommand HiLink +endif + +let b:curret_syntax = "tasm" diff --git a/vim/bundle/ubuntu-vim72/syntax/tcl.vim b/vim/bundle/ubuntu-vim72/syntax/tcl.vim new file mode 100644 index 0000000..d15422d --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/tcl.vim @@ -0,0 +1,282 @@ +" Vim syntax file +" Language: Tcl/Tk +" Maintainer: Taylor Venable +" (previously Brett Cannon ) +" (previously Dean Copsey ) +" (previously Matt Neumann ) +" (previously Allan Kelly ) +" Original: Robin Becker +" Last Change: 2009/04/06 02:38:36 +" Version: 1.13 +" URL: http://real.metasyntax.net:2357/cvs/cvsweb.cgi/Config/vim/syntax/tcl.vim +" +" Keywords TODO: click anchor + +" 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 + +" Basic Tcl commands: http://www.tcl.tk/man/tcl8.5/TclCmd/contents.htm +syn keyword tclCommand after append apply array bgerror binary catch cd chan clock +syn keyword tclCommand close concat dde dict encoding eof error eval exec exit +syn keyword tclCommand expr fblocked fconfigure fcopy file fileevent filename flush +syn keyword tclCommand format gets glob global history incr info interp join +syn keyword tclCommand lappend lassign lindex linsert list llength load lrange lrepeat +syn keyword tclCommand lreplace lreverse lsearch lset lsort memory namespace open package +syn keyword tclCommand pid proc puts pwd read regexp registry regsub rename return +syn keyword tclCommand scan seek set socket source split string subst tell time +syn keyword tclCommand trace unknown unload unset update uplevel upvar variable vwait + +" The 'Tcl Standard Library' commands: http://www.tcl.tk/man/tcl8.5/TclCmd/library.htm +syn keyword tclCommand auto_execok auto_import auto_load auto_mkindex auto_mkindex_old +syn keyword tclCommand auto_qualify auto_reset parray tcl_endOfWord tcl_findLibrary +syn keyword tclCommand tcl_startOfNextWord tcl_startOfPreviousWord tcl_wordBreakAfter +syn keyword tclCommand tcl_wordBreakBefore + +" Commands that were added in Tcl 8.6 + +syn keyword tclCommand my oo::copy oo::define oo::objdefine self +syn keyword tclCommand coroutine tailcall throw yield + +" Global variables used by Tcl: http://www.tcl.tk/man/tcl8.5/TclCmd/tclvars.htm +syn keyword tclVars env errorCode errorInfo tcl_library tcl_patchLevel tcl_pkgPath +syn keyword tclVars tcl_platform tcl_precision tcl_rcFileName tcl_traceCompile +syn keyword tclVars tcl_traceExec tcl_wordchars tcl_nonwordchars tcl_version argc argv +syn keyword tclVars argv0 tcl_interactive geometry + +" Strings which expr accepts as boolean values, aside from zero / non-zero. +syn keyword tclBoolean true false on off yes no + +syn keyword tclLabel case default +syn keyword tclConditional if then else elseif switch +syn keyword tclConditional try finally +syn keyword tclRepeat while for foreach break continue +syn keyword tcltkSwitch contained insert create polygon fill outline tag + +" WIDGETS +" commands associated with widgets +syn keyword tcltkWidgetSwitch contained background highlightbackground insertontime cget +syn keyword tcltkWidgetSwitch contained selectborderwidth borderwidth highlightcolor insertwidth +syn keyword tcltkWidgetSwitch contained selectforeground cursor highlightthickness padx setgrid +syn keyword tcltkWidgetSwitch contained exportselection insertbackground pady takefocus +syn keyword tcltkWidgetSwitch contained font insertborderwidth relief xscrollcommand +syn keyword tcltkWidgetSwitch contained foreground insertofftime selectbackground yscrollcommand +syn keyword tcltkWidgetSwitch contained height spacing1 spacing2 spacing3 +syn keyword tcltkWidgetSwitch contained state tabs width wrap +" button +syn keyword tcltkWidgetSwitch contained command default +" canvas +syn keyword tcltkWidgetSwitch contained closeenough confine scrollregion xscrollincrement yscrollincrement orient +" checkbutton, radiobutton +syn keyword tcltkWidgetSwitch contained indicatoron offvalue onvalue selectcolor selectimage state variable +" entry, frame +syn keyword tcltkWidgetSwitch contained show class colormap container visual +" listbox, menu +syn keyword tcltkWidgetSwitch contained selectmode postcommand selectcolor tearoff tearoffcommand title type +" menubutton, message +syn keyword tcltkWidgetSwitch contained direction aspect justify +" scale +syn keyword tcltkWidgetSwitch contained bigincrement digits from length resolution showvalue sliderlength sliderrelief tickinterval to +" scrollbar +syn keyword tcltkWidgetSwitch contained activerelief elementborderwidth +" image +syn keyword tcltkWidgetSwitch contained delete names types create +" variable reference + " ::optional::namespaces +syn match tclVarRef "$\(\(::\)\?\([[:alnum:]_]*::\)*\)\a[[:alnum:]_]*" + " ${...} may contain any character except '}' +syn match tclVarRef "${[^}]*}" + +" The syntactic unquote-splicing replacement for [expand]. +syn match tclExpand '\s{\*}' +syn match tclExpand '^{\*}' + +" menu, mane add +syn keyword tcltkWidgetSwitch contained active end last none cascade checkbutton command radiobutton separator +syn keyword tcltkWidgetSwitch contained activebackground actveforeground accelerator background bitmap columnbreak +syn keyword tcltkWidgetSwitch contained font foreground hidemargin image indicatoron label menu offvalue onvalue +syn keyword tcltkWidgetSwitch contained selectcolor selectimage state underline value variable +syn keyword tcltkWidgetSwitch contained add clone configure delete entrycget entryconfigure index insert invoke +syn keyword tcltkWidgetSwitch contained post postcascade type unpost yposition activate +"syn keyword tcltkWidgetSwitch contained +"syn match tcltkWidgetSwitch contained +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef + +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +" These words are dual purpose. +" match switches +"syn match tcltkWidgetSwitch contained "-text"hs=s+1 +syn match tcltkWidgetSwitch contained "-text\(var\)\?"hs=s+1 +syn match tcltkWidgetSwitch contained "-menu"hs=s+1 +syn match tcltkWidgetSwitch contained "-label"hs=s+1 +" match commands - 2 lines for pretty match. +"variable +" Special case - If a number follows a variable region, it must be at the end of +" the pattern, by definition. Therefore, (1) either include a number as the region +" end and exclude tclNumber from the contains list, or (2) make variable +" keepend. As (1) would put variable out of step with everything else, use (2). +syn region tcltkCommand matchgroup=tcltkCommandColor start="^\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tclString,tclNumber,tclVarRef,tcltkCommand +syn region tcltkCommand matchgroup=tcltkCommandColor start="\s\\|\[\"hs=s+1 matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tclString,tclNumber,tclVarRef,tcltkCommand +" menu +syn region tcltkWidget matchgroup=tcltkWidgetColor start="^\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\s\\|\[\"hs=s+1 matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +" label +syn region tcltkWidget matchgroup=tcltkWidgetColor start="^\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\s\\|\[\"hs=s+1 matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +" text +syn region tcltkWidget matchgroup=tcltkWidgetColor start="^\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidget,tcltkWidgetSwitch,tcltkSwitch,tclNumber,tclVarRef,tclString +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\s\\|\[\"hs=s+1 matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidget,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef + +" This isn't contained (I don't think) so it's OK to just associate with the Color group. +" TODO: This could be wrong. +syn keyword tcltkWidgetColor toplevel + + +syn region tcltkPackConf matchgroup=tcltkPackConfColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tcltkPackConfSwitch,tclNumber,tclVarRef keepend +syn region tcltkPackConf matchgroup=tcltkPackConfColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"me=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tcltkPackConfSwitch,tclNumber,tclVarRef + + +" NAMESPACE +" commands associated with namespace +syn keyword tcltkNamespaceSwitch contained children code current delete eval +syn keyword tcltkNamespaceSwitch contained export forget import inscope origin +syn keyword tcltkNamespaceSwitch contained parent qualifiers tail which command variable +syn region tcltkCommand matchgroup=tcltkCommandColor start="\" matchgroup=NONE skip="^\s*$" end="{\|}\|]\|\"\|[^\\]*\s*$"me=e-1 contains=tclLineContinue,tcltkNamespaceSwitch + +" EXPR +" commands associated with expr +syn keyword tcltkMaths contained abs acos asin atan atan2 bool ceil cos cosh double entier +syn keyword tcltkMaths contained exp floor fmod hypot int isqrt log log10 max min pow rand +syn keyword tcltkMaths contained round sin sinh sqrt srand tan tanh wide + +syn region tcltkCommand matchgroup=tcltkCommandColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"me=e-1 contains=tclLineContinue,tcltkMaths,tclNumber,tclVarRef,tclString,tcltlWidgetSwitch,tcltkCommand,tcltkPackConf + +" format +syn region tcltkCommand matchgroup=tcltkCommandColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"me=e-1 contains=tclLineContinue,tcltkMaths,tclNumber,tclVarRef,tclString,tcltlWidgetSwitch,tcltkCommand,tcltkPackConf + +" PACK +" commands associated with pack +syn keyword tcltkPackSwitch contained forget info propogate slaves +syn keyword tcltkPackConfSwitch contained after anchor before expand fill in ipadx ipady padx pady side +syn region tcltkCommand matchgroup=tcltkCommandColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkPackSwitch,tcltkPackConf,tcltkPackConfSwitch,tclNumber,tclVarRef,tclString,tcltkCommand keepend + +" STRING +" commands associated with string +syn keyword tcltkStringSwitch contained compare first index last length match range tolower toupper trim trimleft trimright wordstart wordend +syn region tcltkCommand matchgroup=tcltkCommandColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkStringSwitch,tclNumber,tclVarRef,tclString,tcltkCommand + +" ARRAY +" commands associated with array +syn keyword tcltkArraySwitch contained anymore donesearch exists get names nextelement size startsearch set +" match from command name to ] or EOL +syn region tcltkCommand matchgroup=tcltkCommandColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkArraySwitch,tclNumber,tclVarRef,tclString,tcltkCommand + +" LSORT +" switches for lsort +syn keyword tcltkLsortSwitch contained ascii dictionary integer real command increasing decreasing index +" match from command name to ] or EOL +syn region tcltkCommand matchgroup=tcltkCommandColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkLsortSwitch,tclNumber,tclVarRef,tclString,tcltkCommand + +syn keyword tclTodo contained TODO + +" Sequences which are backslash-escaped: http://www.tcl.tk/man/tcl8.5/TclCmd/Tcl.htm#M16 +" Octal, hexadecimal, unicode codepoints, and the classics. +" Tcl takes as many valid characters in a row as it can, so \xAZ in a string is newline followed by 'Z'. +syn match tclSpecial contained '\\\([0-7]\{1,3}\|x\x\{1,2}\|u\x\{1,4}\|[abfnrtv]\)' +syn match tclSpecial contained '\\[\[\]\{\}\"\$]' + +" Command appearing inside another command or inside a string. +syn region tclEmbeddedStatement start='\[' end='\]' contained contains=tclCommand,tclNumber,tclLineContinue,tclString,tclVarRef,tclEmbeddedStatement +" A string needs the skip argument as it may legitimately contain \". +" Match at start of line +syn region tclString start=+^"+ end=+"+ contains=tclSpecial skip=+\\\\\|\\"+ +"Match all other legal strings. +syn region tclString start=+[^\\]"+ms=s+1 end=+"+ contains=tclSpecial,tclVarRef,tclEmbeddedStatement skip=+\\\\\|\\"+ + +" Line continuation is backslash immediately followed by newline. +syn match tclLineContinue '\\$' + +if exists('g:tcl_warn_continuation') + syn match tclNotLineContinue '\\\s\+$' +endif + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match tclNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" +"floating point number, with dot, optional exponent +syn match tclNumber "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, starting with a dot, optional exponent +syn match tclNumber "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match tclNumber "\<\d\+e[-+]\=\d\+[fl]\=\>" +"hex number +syn match tclNumber "0x[0-9a-f]\+\(u\=l\=\|lu\)\>" +"syn match tclIdentifier "\<[a-z_][a-z0-9_]*\>" +syn case match + +syn region tclComment start="^\s*\#" skip="\\$" end="$" contains=tclTodo +syn region tclComment start=/;\s*\#/hs=s+1 skip="\\$" end="$" contains=tclTodo + +"syn sync ccomment tclComment + +" 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_tcl_syntax_inits") + if version < 508 + let did_tcl_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink tcltkSwitch Special + HiLink tclExpand Special + HiLink tclLabel Label + HiLink tclConditional Conditional + HiLink tclRepeat Repeat + HiLink tclNumber Number + HiLink tclError Error + HiLink tclCommand Statement + HiLink tclString String + HiLink tclComment Comment + HiLink tclSpecial Special + HiLink tclTodo Todo + " Below here are the commands and their options. + HiLink tcltkCommandColor Statement + HiLink tcltkWidgetColor Structure + HiLink tclLineContinue WarningMsg +if exists('g:tcl_warn_continuation') + HiLink tclNotLineContinue ErrorMsg +endif + HiLink tcltkStringSwitch Special + HiLink tcltkArraySwitch Special + HiLink tcltkLsortSwitch Special + HiLink tcltkPackSwitch Special + HiLink tcltkPackConfSwitch Special + HiLink tcltkMaths Special + HiLink tcltkNamespaceSwitch Special + HiLink tcltkWidgetSwitch Special + HiLink tcltkPackConfColor Identifier + HiLink tclVarRef Identifier + + delcommand HiLink +endif + +let b:current_syntax = "tcl" + +" vim: ts=8 noet diff --git a/vim/bundle/ubuntu-vim72/syntax/tcsh.vim b/vim/bundle/ubuntu-vim72/syntax/tcsh.vim new file mode 100644 index 0000000..b535d11 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/tcsh.vim @@ -0,0 +1,248 @@ +" tcsh.vim: Vim syntax file for tcsh scripts +" Maintainer: Gautam Iyer +" Modified: Thu 17 Dec 2009 06:05:07 PM EST +" +" Description: We break up each statement into a "command" and an "end" part. +" All groups are either a "command" or part of the "end" of a statement (ie +" everything after the "command"). This is because blindly highlighting tcsh +" statements as keywords caused way too many false positives. Eg: +" +" set history=200 +" +" causes history to come up as a keyword, which we want to avoid. + +" Quit when a syntax file was already loaded +if exists('b:current_syntax') + finish +endif + +let s:oldcpo = &cpo +set cpo&vim " Line continuation is used + +setlocal iskeyword+=- + +syn case match + +" ----- Clusters ----- +syn cluster tcshModifiers contains=tcshModifier,tcshModifierError +syn cluster tcshQuoteList contains=tcshDQuote,tcshSQuote,tcshBQuote +syn cluster tcshStatementEnds contains=@tcshQuoteList,tcshComment,@tcshVarList,tcshRedir,tcshMeta,tcshHereDoc,tcshSpecial,tcshArguement +syn cluster tcshStatements contains=tcshBuiltin,tcshCommands,tcshIf,tcshWhile +syn cluster tcshVarList contains=tcshUsrVar,tcshArgv,tcshSubst +syn cluster tcshConditions contains=tcshCmdSubst,tcshParenExpr,tcshOperator,tcshNumber,@tcshVarList + +" ----- Errors ----- +" Define first, so can be easily overridden. +syn match tcshError contained '\v\S.+' + +" ----- Statements ----- +" Tcsh commands: Any filename / modifiable variable (must be first!) +syn match tcshCommands '\v[a-zA-Z0-9\\./_$:-]+' contains=tcshSpecial,tcshUsrVar,tcshArgv,tcshVarError nextgroup=tcshStatementEnd + +" Builtin commands except those treated specially. Currently (un)set(env), +" (un)alias, if, while, else, bindkey +syn keyword tcshBuiltin nextgroup=tcshStatementEnd alloc bg break breaksw builtins bye case cd chdir complete continue default dirs echo echotc end endif endsw eval exec exit fg filetest foreach getspath getxvers glob goto hashstat history hup inlib jobs kill limit log login logout ls ls-F migrate newgrp nice nohup notify onintr popd printenv pushd rehash repeat rootnode sched setpath setspath settc setty setxvers shift source stop suspend switch telltc time umask uncomplete unhash universe unlimit ver wait warp watchlog where which + +" StatementEnd is anything after a built-in / command till the lexical end of a +" statement (;, |, ||, |&, && or end of line) +syn region tcshStatementEnd transparent contained matchgroup=tcshBuiltin start='' end='\v\\@|$' contains=@tcshConditions,tcshSpecial,@tcshStatementEnds +syn region tcshIfEnd contained matchgroup=tcshBuiltin contains=@tcshConditions,tcshSpecial start='(' end='\v\)%(\s+then>)?' skipwhite nextgroup=@tcshStatementEnds +syn region tcshIfEnd contained matchgroup=tcshBuiltin contains=tcshCommands,tcshSpecial start='\v\{\s+' end='\v\s+\}%(\s+then>)?' skipwhite nextgroup=@tcshStatementEnds keepend + +" else statements +syn keyword tcshBuiltin nextgroup=tcshIf skipwhite else + +" while statements (contains expressions / operators) +syn keyword tcshBuiltin nextgroup=@tcshConditions,tcshSpecial skipwhite while + +" Conditions (for if and while) +syn region tcshParenExpr contained contains=@tcshConditions,tcshSpecial matchgroup=tcshBuiltin start='(' end=')' +syn region tcshCmdSubst contained contains=tcshCommands matchgroup=tcshBuiltin start='\v\{\s+' end='\v\s+\}' keepend + +" Bindkey. Internal editor functions +syn keyword tcshBindkeyFuncs contained backward-char backward-delete-char + \ backward-delete-word backward-kill-line backward-word + \ beginning-of-line capitalize-word change-case + \ change-till-end-of-line clear-screen complete-word + \ complete-word-fwd complete-word-back complete-word-raw + \ copy-prev-word copy-region-as-kill dabbrev-expand delete-char + \ delete-char-or-eof delete-char-or-list + \ delete-char-or-list-or-eof delete-word digit digit-argument + \ down-history downcase-word end-of-file end-of-line + \ exchange-point-and-mark expand-glob expand-history expand-line + \ expand-variables forward-char forward-word + \ gosmacs-transpose-chars history-search-backward + \ history-search-forward insert-last-word i-search-fwd + \ i-search-back keyboard-quit kill-line kill-region + \ kill-whole-line list-choices list-choices-raw list-glob + \ list-or-eof load-average magic-space newline normalize-path + \ normalize-command overwrite-mode prefix-meta quoted-insert + \ redisplay run-fg-editor run-help self-insert-command + \ sequence-lead-in set-mark-command spell-word spell-line + \ stuff-char toggle-literal-history transpose-chars + \ transpose-gosling tty-dsusp tty-flush-output tty-sigintr + \ tty-sigquit tty-sigtsusp tty-start-output tty-stop-output + \ undefined-key universal-argument up-history upcase-word + \ vi-beginning-of-next-word vi-add vi-add-at-eol vi-chg-case + \ vi-chg-meta vi-chg-to-eol vi-cmd-mode vi-cmd-mode-complete + \ vi-delprev vi-delmeta vi-endword vi-eword vi-char-back + \ vi-char-fwd vi-charto-back vi-charto-fwd vi-insert + \ vi-insert-at-bol vi-repeat-char-fwd vi-repeat-char-back + \ vi-repeat-search-fwd vi-repeat-search-back vi-replace-char + \ vi-replace-mode vi-search-back vi-search-fwd vi-substitute-char + \ vi-substitute-line vi-word-back vi-word-fwd vi-undo vi-zero + \ which-command yank yank-pop e_copy_to_clipboard + \ e_paste_from_clipboard e_dosify_next e_dosify_prev e_page_up + \ e_page_down +syn keyword tcshBuiltin nextgroup=tcshBindkeyEnd bindkey +syn region tcshBindkeyEnd contained transparent matchgroup=tcshBuiltin start='' skip='\\$' end='$' contains=@tcshQuoteList,tcshComment,@tcshVarList,tcshMeta,tcshSpecial,tcshArguement,tcshBindkeyFuncs + +" Expressions start with @. +syn match tcshExprStart '\v\@\s+' nextgroup=tcshExprVar +syn match tcshExprVar contained '\v\h\w*%(\[\d+\])?' contains=tcshShellVar,tcshEnvVar nextgroup=tcshExprOp +syn match tcshExprOp contained '++\|--' +syn match tcshExprOp contained '\v\s*\=' nextgroup=tcshExprEnd +syn match tcshExprEnd contained '\v.*$'hs=e+1 contains=@tcshConditions +syn match tcshExprEnd contained '\v.{-};'hs=e contains=@tcshConditions + +" ----- Comments: ----- +syn match tcshComment '#\s.*' contains=tcshTodo,tcshCommentTi,@Spell +syn match tcshComment '\v#($|\S.*)' contains=tcshTodo,tcshCommentTi +syn match tcshSharpBang '^#! .*$' +syn match tcshCommentTi contained '\v#\s*\u\w*(\s+\u\w*)*:'hs=s+1 contains=tcshTodo +syn match tcshTodo contained '\v\c' + +" ----- Strings ----- +" Tcsh does not allow \" in strings unless the "backslash_quote" shell +" variable is set. Set the vim variable "tcsh_backslash_quote" to 0 if you +" want VIM to assume that no backslash quote constructs exist. + +" Backquotes are treated as commands, and are not contained in anything +if(exists('tcsh_backslash_quote') && tcsh_backslash_quote == 0) + syn region tcshSQuote keepend contained start="\v\\@, >>, >>&, >>!, >>&!] +syn match tcshRedir contained '\v\<|\>\>?\&?!?' + +" Meta-chars +syn match tcshMeta contained '\v[]{}*?[]' + +" Here documents (<<) +syn region tcshHereDoc contained matchgroup=tcshShellVar start='\v\<\<\s*\z(\h\w*)' end='^\z1$' contains=@tcshVarList,tcshSpecial +syn region tcshHereDoc contained matchgroup=tcshShellVar start="\v\<\<\s*'\z(\h\w*)'" start='\v\<\<\s*"\z(\h\w*)"$' start='\v\<\<\s*\\\z(\h\w*)$' end='^\z1$' + +" Operators +syn match tcshOperator contained '&&\|!\~\|!=\|<<\|<=\|==\|=\~\|>=\|>>\|\*\|\^\|\~\|||\|!\|%\|&\|+\|-\|/\|<\|>\||' +"syn match tcshOperator contained '[(){}]' + +" Numbers +syn match tcshNumber contained '\v<-?\d+>' + +" Arguments +syn match tcshArguement contained '\v\s@<=-(\w|-)*' + +" Special characters. \xxx, or backslashed characters. +"syn match tcshSpecial contained '\v\\@ +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn match terminfoKeywords '[,=#|]' + +syn keyword terminfoTodo contained TODO FIXME XXX NOTE + +syn region terminfoComment display oneline start='^#' end='$' + \ contains=terminfoTodo,@Spell + +syn match terminfoNumbers '\<[0-9]\+\>' + +syn match terminfoSpecialChar '\\\(\o\{3}\|[Eenlrtbfs^\,:0]\)' +syn match terminfoSpecialChar '\^\a' + +syn match terminfoDelay '$<[0-9]\+>' + +syn keyword terminfoBooleans bw am bce ccc xhp xhpa cpix crxw xt xenl eo gn + \ hc chts km daisy hs hls in lpix da db mir + \ msgr nxon xsb npc ndscr nrrmc os mc5i xcpa + \ sam eslok hz ul xon + +syn keyword terminfoNumerics cols it lh lw lines lm xmc ma colors pairs wnum + \ ncv nlab pb vt wsl bitwin bitype bufsz btns + \ spinh spinv maddr mjump mcs npins orc orhi + \ orl orvi cps widcs + +syn keyword terminfoStrings acsc cbt bel cr cpi lpi chr cvr csr rmp tbc mgc + \ clear el1 el ed hpa cmdch cwin cup cud1 home + \ civis cub1 mrcup cnorm cuf1 ll cuu1 cvvis + \ defc dch1 dl1 dial dsl dclk hd enacs smacs + \ smam blink bold smcup smdc dim swidm sdrfq + \ smir sitm slm smicm snlq snrmq prot rev + \ invis sshm smso ssubm ssupm smul sum smxon + \ ech rmacs rmam sgr0 rmcup rmdc rwidm rmir + \ ritm rlm rmicm rshm rmso rsubm rsupm rmul + \ rum rmxon pause hook flash ff fsl wingo hup + \ is1 is2 is3 if iprog initc initp ich1 il1 ip + \ ka1 ka3 kb2 kbs kbeg kcbt kc1 kc3 kcan ktbc + \ kclr kclo kcmd kcpy kcrt kctab kdch1 kdl1 + \ kcud1 krmir kend kent kel ked kext kfnd khlp + \ khome kich1 kil1 kcub1 kll kmrk kmsg kmov + \ knxt knp kopn kopt kpp kprv kprt krdo kref + \ krfr krpl krst kres kcuf1 ksav kBEG kCAN + \ kCMD kCPY kCRT kDC kDL kslt kEND kEOL kEXT + \ kind kFND kHLP kHOM kIC kLFT kMSG kMOV kNXT + \ kOPT kPRV kPRT kri kRDO kRPL kRIT kRES kSAV + \ kSPD khts kUND kspd kund kcuu1 rmkx smkx + \ lf0 lf1 lf10 lf2 lf3 lf4 lf5 lf6 lf7 lf8 lf9 + \ fln rmln smln rmm smm mhpa mcud1 mcub1 mcuf1 + \ mvpa mcuu1 nel porder oc op pad dch dl cud + \ mcud ich indn il cub mcub cuf mcuf rin cuu + \ mccu pfkey pfloc pfx pln mc0 mc5p mc4 mc5 + \ pulse qdial rmclk rep rfi rs1 rs2 rs3 rf rc + \ vpa sc ind ri scs sgr setbsmgb smgbp sclk + \ scp setb setf smgl smglp smgr smgrp hts smgt + \ smgtp wind sbim scsd rbim rcsd subcs supcs + \ ht docr tsl tone uc hu u0 u1 u2 u3 u4 u5 u6 + \ u7 u8 u9 wait xoffc xonc zerom scesa bicr + \ binel birep csnm csin colornm defbi devt + \ dispc endbi smpch smsc rmpch rmsc getm kmous + \ minfo pctrm pfxl reqmp scesc s0ds s1ds s2ds + \ s3ds setab setaf setcolor smglr slines smgtb + \ ehhlm elhlm erhlm ethlm evhlm sgr1 slengthsL +syn match terminfoStrings display '\' + +syn match terminfoParameters '%[%dcspl+*/mAO&|^=<>!~i?te;-]' +syn match terminfoParameters "%\('[A-Z]'\|{[0-9]\{1,2}}\|p[1-9]\|P[a-z]\|g[A-Z]\)" + +hi def link terminfoComment Comment +hi def link terminfoTodo Todo +hi def link terminfoNumbers Number +hi def link terminfoSpecialChar SpecialChar +hi def link terminfoDelay Special +hi def link terminfoBooleans Type +hi def link terminfoNumerics Type +hi def link terminfoStrings Type +hi def link terminfoParameters Keyword +hi def link terminfoKeywords Keyword + +let b:current_syntax = "terminfo" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/tex.vim b/vim/bundle/ubuntu-vim72/syntax/tex.vim new file mode 100644 index 0000000..6898834 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/tex.vim @@ -0,0 +1,565 @@ +" Vim syntax file +" Language: TeX +" Maintainer: Dr. Charles E. Campbell, Jr. +" Last Change: Dec 28, 2009 +" Version: 46 +" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax +" +" Notes: {{{1 +" +" 1. If you have a \begin{verbatim} that appears to overrun its boundaries, +" use %stopzone. +" +" 2. Run-on equations ($..$ and $$..$$, particularly) can also be stopped +" by suitable use of %stopzone. +" +" 3. If you have a slow computer, you may wish to modify +" +" syn sync maxlines=200 +" syn sync minlines=50 +" +" to values that are more to your liking. +" +" 4. There is no match-syncing for $...$ and $$...$$; hence large +" equation blocks constructed that way may exhibit syncing problems. +" (there's no difference between begin/end patterns) +" +" 5. If you have the variable "g:tex_no_error" defined then none of the +" lexical error-checking will be done. +" +" ie. let g:tex_no_error=1 + +" Version Clears: {{{1 +" 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 + +" Define the default highlighting. {{{1 +" 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_tex_syntax_inits") + let did_tex_syntax_inits = 1 + if version < 508 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif +endif +if exists("g:tex_tex") && !exists("g:tex_no_error") + let g:tex_no_error= 1 +endif + +" Determine whether or not to use "*.sty" mode {{{1 +" The user may override the normal determination by setting +" g:tex_stylish to 1 (for "*.sty" mode) +" or to 0 else (normal "*.tex" mode) +" or on a buffer-by-buffer basis with b:tex_stylish +let b:extfname=expand("%:e") +if exists("g:tex_stylish") + let b:tex_stylish= g:tex_stylish +elseif !exists("b:tex_stylish") + if b:extfname == "sty" || b:extfname == "cls" || b:extfname == "clo" || b:extfname == "dtx" || b:extfname == "ltx" + let b:tex_stylish= 1 + else + let b:tex_stylish= 0 + endif +endif + +" handle folding {{{1 +if !exists("g:tex_fold_enabled") + let g:tex_fold_enabled= 0 +elseif g:tex_fold_enabled && !has("folding") + let g:tex_fold_enabled= 0 + echomsg "Ignoring g:tex_fold_enabled=".g:tex_fold_enabled."; need to re-compile vim for +fold support" +endif +if g:tex_fold_enabled && &fdm == "manual" + set fdm=syntax +endif + +" (La)TeX keywords: only use the letters a-zA-Z {{{1 +" but _ is the only one that causes problems. +if version < 600 + set isk-=_ + if b:tex_stylish + set isk+=@ + endif +else + setlocal isk-=_ + if b:tex_stylish + setlocal isk+=@ + endif +endif + +" Clusters: {{{1 +" -------- +syn cluster texCmdGroup contains=texCmdBody,texComment,texDefParm,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texSectionMarker,texSectionName,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle +if !exists("g:tex_no_error") + syn cluster texCmdGroup add=texMathError +endif +syn cluster texEnvGroup contains=texMatcher,texMathDelim,texSpecialChar,texStatement +syn cluster texFoldGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texSectionMarker,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract +syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,@Spell +syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,@Spell,texStyleMatcher +syn cluster texRefGroup contains=texMatcher,texComment,texDelimiter +if !exists("tex_no_math") + syn cluster texMathZones contains=texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ + syn cluster texMatchGroup add=@texMathZones + syn cluster texMathDelimGroup contains=texMathDelimBad,texMathDelimKey,texMathDelimSet1,texMathDelimSet2 + syn cluster texMathMatchGroup contains=@texMathZones,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathMatcher,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone + syn cluster texMathZoneGroup contains=texComment,texDelimiter,texLength,texMathDelim,texMathMatcher,texMathOper,texRefZone,texSpecialChar,texStatement,texTypeSize,texTypeStyle + if !exists("g:tex_no_error") + syn cluster texMathMatchGroup add=texMathError + syn cluster texMathZoneGroup add=texMathError + endif + syn cluster texMathZoneGroup add=@NoSpell + " following used in the \part \chapter \section \subsection \subsubsection + " \paragraph \subparagraph \author \title highlighting + syn cluster texDocGroup contains=texPartZone,@texPartGroup + syn cluster texPartGroup contains=texChapterZone,texSectionZone,texParaZone + syn cluster texChapterGroup contains=texSectionZone,texParaZone + syn cluster texSectionGroup contains=texSubSectionZone,texParaZone + syn cluster texSubSectionGroup contains=texSubSubSectionZone,texParaZone + syn cluster texSubSubSectionGroup contains=texParaZone + syn cluster texParaGroup contains=texSubParaZone +endif + +" Try to flag {} and () mismatches: {{{1 +if !exists("g:tex_no_error") + syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texMatchGroup,texError + syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup,texError +else + syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texMatchGroup + syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup +endif +syn region texParen start="(" end=")" contains=@texMatchGroup,@Spell +if !exists("g:tex_no_error") + syn match texError "[}\])]" +endif +if !exists("tex_no_math") + if !exists("g:tex_no_error") + syn match texMathError "}" contained + endif + syn region texMathMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\}" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup +endif + +" TeX/LaTeX keywords: {{{1 +" Instead of trying to be All Knowing, I just match \..alphameric.. +" Note that *.tex files may not have "@" in their \commands +if exists("g:tex_tex") || b:tex_stylish + syn match texStatement "\\[a-zA-Z@]\+" +else + syn match texStatement "\\\a\+" + if !exists("g:tex_no_error") + syn match texError "\\\a*@[a-zA-Z@]*" + endif +endif + +" TeX/LaTeX delimiters: {{{1 +syn match texDelimiter "&" +syn match texDelimiter "\\\\" + +" Tex/Latex Options: {{{1 +syn match texOption "[^\\]\zs#\d\+\|^#\d\+" + +" texAccent (tnx to Karim Belabas) avoids annoying highlighting for accents: {{{1 +if b:tex_stylish + syn match texAccent "\\[bcdvuH][^a-zA-Z@]"me=e-1 + syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)[^a-zA-Z@]"me=e-1 +else + syn match texAccent "\\[bcdvuH]\A"me=e-1 + syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)\A"me=e-1 +endif +syn match texAccent "\\[bcdvuH]$" +syn match texAccent +\\[=^.\~"`']+ +syn match texAccent +\\['=t'.c^ud"vb~Hr]{\a}+ +syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)$" + +" \begin{}/\end{} section markers: {{{1 +syn match texSectionMarker "\\begin\>\|\\end\>" nextgroup=texSectionName +syn region texSectionName matchgroup=Delimiter start="{" end="}" contained nextgroup=texSectionModifier contains=texComment +syn region texSectionModifier matchgroup=Delimiter start="\[" end="]" contained contains=texComment + +" \documentclass, \documentstyle, \usepackage: {{{1 +syn match texDocType "\\documentclass\>\|\\documentstyle\>\|\\usepackage\>" nextgroup=texSectionName,texDocTypeArgs +syn region texDocTypeArgs matchgroup=Delimiter start="\[" end="]" contained nextgroup=texSectionName contains=texComment + +" Preamble syntax-based folding support: {{{1 +if g:tex_fold_enabled && has("folding") + syn region texPreamble transparent fold start='\zs\\documentclass\>' end='\ze\\begin{document}' contains=texStyle,@texMatchGroup +endif + +" TeX input: {{{1 +syn match texInput "\\input\s\+[a-zA-Z/.0-9_^]\+"hs=s+7 contains=texStatement +syn match texInputFile "\\include\(graphics\|list\)\=\(\[.\{-}\]\)\=\s*{.\{-}}" contains=texStatement,texInputCurlies,texInputFileOpt +syn match texInputFile "\\\(epsfig\|input\|usepackage\)\s*\(\[.*\]\)\={.\{-}}" contains=texStatement,texInputCurlies,texInputFileOpt +syn match texInputCurlies "[{}]" contained +syn region texInputFileOpt matchgroup=Delimiter start="\[" end="\]" contained contains=texComment + +" Type Styles (LaTeX 2.09): {{{1 +syn match texTypeStyle "\\rm\>" +syn match texTypeStyle "\\em\>" +syn match texTypeStyle "\\bf\>" +syn match texTypeStyle "\\it\>" +syn match texTypeStyle "\\sl\>" +syn match texTypeStyle "\\sf\>" +syn match texTypeStyle "\\sc\>" +syn match texTypeStyle "\\tt\>" + +" Type Styles: attributes, commands, families, etc (LaTeX2E): {{{1 +syn match texTypeStyle "\\textbf\>" +syn match texTypeStyle "\\textit\>" +syn match texTypeStyle "\\textmd\>" +syn match texTypeStyle "\\textrm\>" +syn match texTypeStyle "\\textsc\>" +syn match texTypeStyle "\\textsf\>" +syn match texTypeStyle "\\textsl\>" +syn match texTypeStyle "\\texttt\>" +syn match texTypeStyle "\\textup\>" +syn match texTypeStyle "\\emph\>" + +syn match texTypeStyle "\\mathbb\>" +syn match texTypeStyle "\\mathbf\>" +syn match texTypeStyle "\\mathcal\>" +syn match texTypeStyle "\\mathfrak\>" +syn match texTypeStyle "\\mathit\>" +syn match texTypeStyle "\\mathnormal\>" +syn match texTypeStyle "\\mathrm\>" +syn match texTypeStyle "\\mathsf\>" +syn match texTypeStyle "\\mathtt\>" + +syn match texTypeStyle "\\rmfamily\>" +syn match texTypeStyle "\\sffamily\>" +syn match texTypeStyle "\\ttfamily\>" + +syn match texTypeStyle "\\itshape\>" +syn match texTypeStyle "\\scshape\>" +syn match texTypeStyle "\\slshape\>" +syn match texTypeStyle "\\upshape\>" + +syn match texTypeStyle "\\bfseries\>" +syn match texTypeStyle "\\mdseries\>" + +" Some type sizes: {{{1 +syn match texTypeSize "\\tiny\>" +syn match texTypeSize "\\scriptsize\>" +syn match texTypeSize "\\footnotesize\>" +syn match texTypeSize "\\small\>" +syn match texTypeSize "\\normalsize\>" +syn match texTypeSize "\\large\>" +syn match texTypeSize "\\Large\>" +syn match texTypeSize "\\LARGE\>" +syn match texTypeSize "\\huge\>" +syn match texTypeSize "\\Huge\>" + +" Spacecodes (TeX'isms): {{{1 +" \mathcode`\^^@="2201 \delcode`\(="028300 \sfcode`\)=0 \uccode`X=`X \lccode`x=`x +syn match texSpaceCode "\\\(math\|cat\|del\|lc\|sf\|uc\)code`"me=e-1 nextgroup=texSpaceCodeChar +syn match texSpaceCodeChar "`\\\=.\(\^.\)\==\(\d\|\"\x\{1,6}\|`.\)" contained + +" Sections, subsections, etc: {{{1 +if g:tex_fold_enabled && has("folding") + syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' fold contains=@texFoldGroup,@texDocGroup,@Spell + syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texPartGroup,@Spell + syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texChapterGroup,@Spell + syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSectionGroup,@Spell + syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSectionGroup,@Spell + syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSubSectionGroup,@Spell + syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texParaGroup,@Spell + syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@Spell + syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' fold contains=@texFoldGroup,@Spell + syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' fold contains=@texFoldGroup,@Spell +else + syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup,@Spell + syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup,@Spell + syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup,@Spell + syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup,@Spell + syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup,@Spell + syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup,@Spell + syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup,@Spell + syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@Spell + syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup,@Spell + syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup,@Spell +endif + +" Bad Math (mismatched): {{{1 +if !exists("tex_no_math") + syn match texBadMath "\\end\s*{\s*\(array\|gathered\|bBpvV]matrix\|split\|subequations\|smallmatrix\|xxalignat\)\s*}" + syn match texBadMath "\\end\s*{\s*\(align\|alignat\|displaymath\|displaymath\|eqnarray\|equation\|flalign\|gather\|math\|multline\|xalignat\)\*\=\s*}" + syn match texBadMath "\\[\])]" +endif + +" Math Zones: {{{1 +if !exists("tex_no_math") + " TexNewMathZone: function creates a mathzone with the given suffix and mathzone name. {{{2 + " Starred forms are created if starform is true. Starred + " forms have syntax group and synchronization groups with a + " "S" appended. Handles: cluster, syntax, sync, and HiLink. + fun! TexNewMathZone(sfx,mathzone,starform) + let grpname = "texMathZone".a:sfx + let syncname = "texSyncMathZone".a:sfx + if g:tex_fold_enabled + let foldcmd= " fold" + else + let foldcmd= "" + endif + exe "syn cluster texMathZones add=".grpname + exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\s*}'."'".' keepend contains=@texMathZoneGroup'.foldcmd + exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' + exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' + exe 'hi def link '.grpname.' texMath' + if a:starform + let grpname = "texMathZone".a:sfx.'S' + let syncname = "texSyncMathZone".a:sfx.'S' + exe "syn cluster texMathZones add=".grpname + exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\*\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\*\s*}'."'".' keepend contains=@texMathZoneGroup'.foldcmd + exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' + exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' + exe 'hi def link '.grpname.' texMath' + endif + endfun + + " Standard Math Zones: {{{2 + call TexNewMathZone("A","align",1) + call TexNewMathZone("B","alignat",1) + call TexNewMathZone("C","displaymath",1) + call TexNewMathZone("D","eqnarray",1) + call TexNewMathZone("E","equation",1) + call TexNewMathZone("F","flalign",1) + call TexNewMathZone("G","gather",1) + call TexNewMathZone("H","math",1) + call TexNewMathZone("I","multline",1) + call TexNewMathZone("J","subequations",0) + call TexNewMathZone("K","xalignat",1) + call TexNewMathZone("L","xxalignat",0) + + " Inline Math Zones: {{{2 + syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend contains=@texMathZoneGroup + syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend contains=@texMathZoneGroup + syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" contains=@texMathZoneGroup + syn region texMathZoneY matchgroup=Delimiter start="\$\$" matchgroup=Delimiter end="\$\$" end="%stopzone\>" keepend contains=@texMathZoneGroup + syn region texMathZoneZ matchgroup=texStatement start="\\ensuremath\s*{" matchgroup=texStatement end="}" end="%stopzone\>" contains=@texMathZoneGroup + + syn match texMathOper "[_^=]" contained + + " \left..something.. and \right..something.. support: {{{2 + syn match texMathDelimBad contained "\S" + syn match texMathDelim contained "\\\(left\|right\|[bB]igg\=[lr]\)\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad + syn match texMathDelim contained "\\\(left\|right\)arrow\>\|\<\([aA]rrow\|brace\)\=vert\>" + syn match texMathDelim contained "\\lefteqn\>" + syn match texMathDelimSet2 contained "\\" nextgroup=texMathDelimKey,texMathDelimBad + syn match texMathDelimSet1 contained "[<>()[\]|/.]\|\\[{}|]" + syn keyword texMathDelimKey contained backslash lceil lVert rgroup uparrow + syn keyword texMathDelimKey contained downarrow lfloor rangle rmoustache Uparrow + syn keyword texMathDelimKey contained Downarrow lgroup rbrace rvert updownarrow + syn keyword texMathDelimKey contained langle lmoustache rceil rVert Updownarrow + syn keyword texMathDelimKey contained lbrace lvert rfloor +endif + +" Special TeX characters ( \$ \& \% \# \{ \} \_ \S \P ) : {{{1 +syn match texSpecialChar "\\[$&%#{}_]" +if b:tex_stylish + syn match texSpecialChar "\\[SP@][^a-zA-Z@]"me=e-1 +else + syn match texSpecialChar "\\[SP@]\A"me=e-1 +endif +syn match texSpecialChar "\\\\" +if !exists("tex_no_math") + syn match texOnlyMath "[_^]" +endif +syn match texSpecialChar "\^\^[0-9a-f]\{2}\|\^\^\S" + +" Comments: {{{1 +" Normal TeX LaTeX : %.... +" Documented TeX Format: ^^A... -and- leading %s (only) +if !exists("g:tex_comment_nospell") || !g:tex_comment_nospell + syn cluster texCommentGroup contains=texTodo,@Spell +else + syn cluster texCommentGroup contains=texTodo,@NoSpell +endif +syn case ignore +syn keyword texTodo contained combak fixme todo xxx +syn case match +if b:extfname == "dtx" + syn match texComment "\^\^A.*$" contains=@texCommentGroup + syn match texComment "^%\+" contains=@texCommentGroup +else + if g:tex_fold_enabled + " allows syntax-folding of 2 or more contiguous comment lines + " single-line comments are not folded + syn match texComment "%.*$" contains=@texCommentGroup + syn region texComment start="^\zs\s*%.*\_s*%" skip="^\s*%" end='^\ze\s*[^%]' fold + else + syn match texComment "%.*$" contains=@texCommentGroup + endif +endif + +" Separate lines used for verb` and verb# so that the end conditions {{{1 +" 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{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" +" 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\>" +syn region texZone start="\\begin{verbatimwrite}" end="\\end{verbatimwrite}\|%stopzone\>" +syn region texZone start="\\begin{boxedverbatim}" end="\\end{boxedverbatim}\|%stopzone\>" +if version < 600 + syn region texZone start="\\verb\*\=`" end="`\|%stopzone\>" + syn region texZone start="\\verb\*\=#" end="#\|%stopzone\>" +else + if b:tex_stylish + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" + else + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>" + endif +endif + +" Tex Reference Zones: {{{1 +syn region texZone matchgroup=texStatement start="@samp{" end="}\|%stopzone\>" contains=@texRefGroup +syn region texRefZone matchgroup=texStatement start="\\nocite{" end="}\|%stopzone\>" contains=@texRefGroup +syn region texRefZone matchgroup=texStatement start="\\bibliography{" end="}\|%stopzone\>" contains=@texRefGroup +syn region texRefZone matchgroup=texStatement start="\\label{" end="}\|%stopzone\>" contains=@texRefGroup +syn region texRefZone matchgroup=texStatement start="\\\(page\|eq\)ref{" end="}\|%stopzone\>" contains=@texRefGroup +syn region texRefZone matchgroup=texStatement start="\\v\=ref{" end="}\|%stopzone\>" contains=@texRefGroup +syn match texRefZone '\\cite\%([tp]\*\=\)\=' nextgroup=texRefOption,texCite +syn region texRefOption contained matchgroup=Delimiter start='\[' end=']' contains=@texRefGroup nextgroup=texRefOption,texCite +syn region texCite contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup + +" Handle newcommand, newenvironment : {{{1 +syn match texNewCmd "\\newcommand\>" nextgroup=texCmdName skipwhite skipnl +syn region texCmdName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texCmdArgs,texCmdBody skipwhite skipnl +syn region texCmdArgs contained matchgroup=Delimiter start="\["rs=s+1 end="]" nextgroup=texCmdBody skipwhite skipnl +syn region texCmdBody contained matchgroup=Delimiter start="{"rs=s+1 skip="\\\\\|\\[{}]" matchgroup=Delimiter end="}" contains=@texCmdGroup +syn match texNewEnv "\\newenvironment\>" nextgroup=texEnvName skipwhite skipnl +syn region texEnvName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvBgn skipwhite skipnl +syn region texEnvBgn contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvEnd skipwhite skipnl contains=@texEnvGroup +syn region texEnvEnd contained matchgroup=Delimiter start="{"rs=s+1 end="}" skipwhite skipnl contains=@texEnvGroup + +" Definitions/Commands: {{{1 +syn match texDefCmd "\\def\>" nextgroup=texDefName skipwhite skipnl +if b:tex_stylish + syn match texDefName contained "\\[a-zA-Z@]\+" nextgroup=texDefParms,texCmdBody skipwhite skipnl + syn match texDefName contained "\\[^a-zA-Z@]" nextgroup=texDefParms,texCmdBody skipwhite skipnl +else + syn match texDefName contained "\\\a\+" nextgroup=texDefParms,texCmdBody skipwhite skipnl + syn match texDefName contained "\\\A" nextgroup=texDefParms,texCmdBody skipwhite skipnl +endif +syn match texDefParms contained "#[^{]*" contains=texDefParm nextgroup=texCmdBody skipwhite skipnl +syn match texDefParm contained "#\d\+" + +" TeX Lengths: {{{1 +syn match texLength "\<\d\+\([.,]\d\+\)\=\s*\(true\)\=\s*\(bp\|cc\|cm\|dd\|em\|ex\|in\|mm\|pc\|pt\|sp\)\>" + +" TeX String Delimiters: {{{1 +syn match texString "\(``\|''\|,,\)" + +" makeatletter -- makeatother sections +if !exists("g:tex_no_error") + syn region texStyle matchgroup=texStatement start='\\makeatletter' end='\\makeatother' contains=@texStyleGroup contained + syn match texStyleStatement "\\[a-zA-Z@]\+" contained + syn region texStyleMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texStyleGroup,texError contained + syn region texStyleMatcher matchgroup=Delimiter start="\[" end="]" contains=@texStyleGroup,texError contained +endif + +" LaTeX synchronization: {{{1 +syn sync maxlines=200 +syn sync minlines=50 + +syn sync match texSyncStop groupthere NONE "%stopzone\>" + +" Synchronization: {{{1 +" The $..$ and $$..$$ make for impossible sync patterns +" (one can't tell if a "$$" starts or stops a math zone by itself) +" The following grouptheres coupled with minlines above +" help improve the odds of good syncing. +if !exists("tex_no_math") + syn sync match texSyncMathZoneA groupthere NONE "\\end{abstract}" + syn sync match texSyncMathZoneA groupthere NONE "\\end{center}" + syn sync match texSyncMathZoneA groupthere NONE "\\end{description}" + syn sync match texSyncMathZoneA groupthere NONE "\\end{enumerate}" + syn sync match texSyncMathZoneA groupthere NONE "\\end{itemize}" + syn sync match texSyncMathZoneA groupthere NONE "\\end{table}" + syn sync match texSyncMathZoneA groupthere NONE "\\end{tabular}" + syn sync match texSyncMathZoneA groupthere NONE "\\\(sub\)*section\>" +endif + +" Highlighting: {{{1 +if did_tex_syntax_inits == 1 + let did_tex_syntax_inits= 2 + " TeX highlighting groups which should share similar highlighting + if !exists("g:tex_no_error") + if !exists("tex_no_math") + HiLink texBadMath texError + HiLink texMathDelimBad texError + HiLink texMathError texError + if !b:tex_stylish + HiLink texOnlyMath texError + endif + endif + HiLink texError Error + endif + + HiLink texCite texRefZone + HiLink texDefCmd texDef + HiLink texDefName texDef + HiLink texDocType texCmdName + HiLink texDocTypeArgs texCmdArgs + HiLink texInputFileOpt texCmdArgs + HiLink texInputCurlies texDelimiter + HiLink texLigature texSpecialChar + if !exists("tex_no_math") + HiLink texMathDelimSet1 texMathDelim + HiLink texMathDelimSet2 texMathDelim + HiLink texMathDelimKey texMathDelim + HiLink texMathMatcher texMath + HiLink texMathZoneV texMath + HiLink texMathZoneW texMath + HiLink texMathZoneX texMath + HiLink texMathZoneY texMath + HiLink texMathZoneV texMath + HiLink texMathZoneZ texMath + endif + HiLink texSectionMarker texCmdName + HiLink texSectionName texSection + HiLink texSpaceCode texStatement + HiLink texStyleStatement texStatement + HiLink texTypeSize texType + HiLink texTypeStyle texType + + " Basic TeX highlighting groups + HiLink texCmdArgs Number + HiLink texCmdName Statement + HiLink texComment Comment + HiLink texDef Statement + HiLink texDefParm Special + HiLink texDelimiter Delimiter + HiLink texInput Special + HiLink texInputFile Special + HiLink texLength Number + HiLink texMath Special + HiLink texMathDelim Statement + HiLink texMathOper Operator + HiLink texNewCmd Statement + HiLink texNewEnv Statement + HiLink texOption Number + HiLink texRefZone Special + HiLink texSection PreCondit + HiLink texSpaceCodeChar Special + HiLink texSpecialChar SpecialChar + HiLink texStatement Statement + HiLink texString String + HiLink texTodo Todo + HiLink texType Type + HiLink texZone PreCondit + + delcommand HiLink +endif + +" Current Syntax: {{{1 +unlet b:extfname +let b:current_syntax = "tex" +" vim: ts=8 fdm=marker diff --git a/vim/bundle/ubuntu-vim72/syntax/texinfo.vim b/vim/bundle/ubuntu-vim72/syntax/texinfo.vim new file mode 100644 index 0000000..134fc67 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/texinfo.vim @@ -0,0 +1,409 @@ +" Vim syntax file +" Language: Texinfo (macro package for TeX) +" Maintainer: Sandor Kopanyi +" URL: <-> +" Last Change: 2004 Jun 23 +" +" the file follows the Texinfo manual structure; this file is based +" on manual for Texinfo version 4.0, 28 September 1999 +" since @ can have special meanings, everything is 'match'-ed and 'region'-ed +" (including @ in 'iskeyword' option has unexpected effects) + +" Remove any old syntax stuff hanging around, if needed +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'texinfo' +endif + +"in Texinfo can be real big things, like tables; sync for that +syn sync lines=200 + +"some general stuff +"syn match texinfoError "\S" contained TODO +syn match texinfoIdent "\k\+" contained "IDENTifier +syn match texinfoAssignment "\k\+\s*=\s*\k\+\s*$" contained "assigment statement ( var = val ) +syn match texinfoSinglePar "\k\+\s*$" contained "single parameter (used for several @-commands) +syn match texinfoIndexPar "\k\k\s*$" contained "param. used for different *index commands (+ @documentlanguage command) + + +"marking words and phrases (chap. 9 in Texinfo manual) +"(almost) everything appears as 'contained' too; is for tables (@table) + +"this chapter is at the beginning of this file to avoid overwritings + +syn match texinfoSpecialChar "@acronym" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@acronym{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@b" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@b{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@cite" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@cite{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@code" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@code{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@command" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@command{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@dfn" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@dfn{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@email" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@email{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@emph" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@emph{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@env" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@env{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@file" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@file{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@i" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@i{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@kbd" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@kbd{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@key" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@key{" end="}" contains=texinfoSpecialChar +syn match texinfoSpecialChar "@option" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@option{" end="}" contains=texinfoSpecialChar +syn match texinfoSpecialChar "@r" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@r{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@samp" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@samp{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@sc" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@sc{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@strong" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@strong{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@t" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@t{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@url" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@url{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@var" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@var{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoAtCmd "^@kbdinputstyle" nextgroup=texinfoSinglePar skipwhite + + +"overview of Texinfo (chap. 1 in Texinfo manual) +syn match texinfoComment "@c .*" +syn match texinfoComment "@c$" +syn match texinfoComment "@comment .*" +syn region texinfoMltlnAtCmd matchgroup=texinfoComment start="^@ignore\s*$" end="^@end ignore\s*$" contains=ALL + + +"beginning a Texinfo file (chap. 3 in Texinfo manual) +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="@center " skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd oneline +syn region texinfoMltlnDMAtCmd matchgroup=texinfoAtCmd start="^@detailmenu\s*$" end="^@end detailmenu\s*$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@setfilename " skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@settitle " skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@shorttitlepage " skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@title " skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@titlefont{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@titlepage\s*$" end="^@end titlepage\s*$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoMltlnDMAtCmd,texinfoAtCmd,texinfoPrmAtCmd,texinfoMltlnAtCmd +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@vskip " skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn match texinfoAtCmd "^@exampleindent" nextgroup=texinfoSinglePar skipwhite +syn match texinfoAtCmd "^@headings" nextgroup=texinfoSinglePar skipwhite +syn match texinfoAtCmd "^\\input" nextgroup=texinfoSinglePar skipwhite +syn match texinfoAtCmd "^@paragraphindent" nextgroup=texinfoSinglePar skipwhite +syn match texinfoAtCmd "^@setchapternewpage" nextgroup=texinfoSinglePar skipwhite + + +"ending a Texinfo file (chap. 4 in Texinfo manual) +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="@author " skip="\\$" end="$" contains=texinfoSpecialChar oneline +"all below @bye should be comment TODO +syn match texinfoAtCmd "^@bye\s*$" +syn match texinfoAtCmd "^@contents\s*$" +syn match texinfoAtCmd "^@printindex" nextgroup=texinfoIndexPar skipwhite +syn match texinfoAtCmd "^@setcontentsaftertitlepage\s*$" +syn match texinfoAtCmd "^@setshortcontentsaftertitlepage\s*$" +syn match texinfoAtCmd "^@shortcontents\s*$" +syn match texinfoAtCmd "^@summarycontents\s*$" + + +"chapter structuring (chap. 5 in Texinfo manual) +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendix" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendixsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendixsection" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendixsubsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendixsubsubsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@centerchap" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@chapheading" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@chapter" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@heading" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@majorheading" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@section" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subheading " skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subsection" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subsubheading" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subsubsection" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subtitle" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@unnumbered" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@unnumberedsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@unnumberedsubsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@unnumberedsubsubsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn match texinfoAtCmd "^@lowersections\s*$" +syn match texinfoAtCmd "^@raisesections\s*$" + + +"nodes (chap. 6 in Texinfo manual) +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@anchor{" end="}" +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@top" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@node" skip="\\$" end="$" contains=texinfoSpecialChar oneline + + +"menus (chap. 7 in Texinfo manual) +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@menu\s*$" end="^@end menu\s*$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoMltlnDMAtCmd + + +"cross references (chap. 8 in Texinfo manual) +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@inforef{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@pxref{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@ref{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@uref{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@xref{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd + + +"marking words and phrases (chap. 9 in Texinfo manual) +"(almost) everything appears as 'contained' too; is for tables (@table) + +"this chapter is at the beginning of this file to avoid overwritings + + +"quotations and examples (chap. 10 in Texinfo manual) +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@cartouche\s*$" end="^@end cartouche\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@display\s*$" end="^@end display\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@example\s*$" end="^@end example\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@flushleft\s*$" end="^@end flushleft\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@flushright\s*$" end="^@end flushright\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@format\s*$" end="^@end format\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@lisp\s*$" end="^@end lisp\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@quotation\s*$" end="^@end quotation\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@smalldisplay\s*$" end="^@end smalldisplay\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@smallexample\s*$" end="^@end smallexample\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@smallformat\s*$" end="^@end smallformat\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@smalllisp\s*$" end="^@end smalllisp\s*$" contains=ALL +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@exdent" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn match texinfoAtCmd "^@noindent\s*$" +syn match texinfoAtCmd "^@smallbook\s*$" + + +"lists and tables (chap. 11 in Texinfo manual) +syn match texinfoAtCmd "@asis" contained +syn match texinfoAtCmd "@columnfractions" contained +syn match texinfoAtCmd "@item" contained +syn match texinfoAtCmd "@itemx" contained +syn match texinfoAtCmd "@tab" contained +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@enumerate" end="^@end enumerate\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ftable" end="^@end ftable\s*$" contains=ALL +syn region texinfoMltlnNAtCmd matchgroup=texinfoAtCmd start="^@itemize" end="^@end itemize\s*$" contains=ALL +syn region texinfoMltlnNAtCmd matchgroup=texinfoAtCmd start="^@multitable" end="^@end multitable\s*$" contains=ALL +syn region texinfoMltlnNAtCmd matchgroup=texinfoAtCmd start="^@table" end="^@end table\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@vtable" end="^@end vtable\s*$" contains=ALL + + +"indices (chap. 12 in Texinfo manual) +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@\(c\|f\|k\|p\|t\|v\)index" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@..index" skip="\\$" end="$" contains=texinfoSpecialChar oneline +"@defcodeindex and @defindex is defined after chap. 15's @def* commands (otherwise those ones will overwrite these ones) +syn match texinfoSIPar "\k\k\s*\k\k\s*$" contained +syn match texinfoAtCmd "^@syncodeindex" nextgroup=texinfoSIPar skipwhite +syn match texinfoAtCmd "^@synindex" nextgroup=texinfoSIPar skipwhite + +"special insertions (chap. 13 in Texinfo manual) +syn match texinfoSpecialChar "@\(!\|?\|@\|\s\)" +syn match texinfoSpecialChar "@{" +syn match texinfoSpecialChar "@}" +"accents +syn match texinfoSpecialChar "@=." +syn match texinfoSpecialChar "@\('\|\"\|\^\|`\)[aeiouyAEIOUY]" +syn match texinfoSpecialChar "@\~[aeinouyAEINOUY]" +syn match texinfoSpecialChar "@dotaccent{.}" +syn match texinfoSpecialChar "@H{.}" +syn match texinfoSpecialChar "@,{[cC]}" +syn match texinfoSpecialChar "@AA{}" +syn match texinfoSpecialChar "@aa{}" +syn match texinfoSpecialChar "@L{}" +syn match texinfoSpecialChar "@l{}" +syn match texinfoSpecialChar "@O{}" +syn match texinfoSpecialChar "@o{}" +syn match texinfoSpecialChar "@ringaccent{.}" +syn match texinfoSpecialChar "@tieaccent{..}" +syn match texinfoSpecialChar "@u{.}" +syn match texinfoSpecialChar "@ubaraccent{.}" +syn match texinfoSpecialChar "@udotaccent{.}" +syn match texinfoSpecialChar "@v{.}" +"ligatures +syn match texinfoSpecialChar "@AE{}" +syn match texinfoSpecialChar "@ae{}" +syn match texinfoSpecialChar "@copyright{}" +syn match texinfoSpecialChar "@bullet" contained "for tables and lists +syn match texinfoSpecialChar "@bullet{}" +syn match texinfoSpecialChar "@dotless{i}" +syn match texinfoSpecialChar "@dotless{j}" +syn match texinfoSpecialChar "@dots{}" +syn match texinfoSpecialChar "@enddots{}" +syn match texinfoSpecialChar "@equiv" contained "for tables and lists +syn match texinfoSpecialChar "@equiv{}" +syn match texinfoSpecialChar "@error{}" +syn match texinfoSpecialChar "@exclamdown{}" +syn match texinfoSpecialChar "@expansion{}" +syn match texinfoSpecialChar "@minus" contained "for tables and lists +syn match texinfoSpecialChar "@minus{}" +syn match texinfoSpecialChar "@OE{}" +syn match texinfoSpecialChar "@oe{}" +syn match texinfoSpecialChar "@point" contained "for tables and lists +syn match texinfoSpecialChar "@point{}" +syn match texinfoSpecialChar "@pounds{}" +syn match texinfoSpecialChar "@print{}" +syn match texinfoSpecialChar "@questiondown{}" +syn match texinfoSpecialChar "@result" contained "for tables and lists +syn match texinfoSpecialChar "@result{}" +syn match texinfoSpecialChar "@ss{}" +syn match texinfoSpecialChar "@TeX{}" +"other +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@dmn{" end="}" +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@footnote{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@image{" end="}" +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@math{" end="}" +syn match texinfoAtCmd "@footnotestyle" nextgroup=texinfoSinglePar skipwhite + + +"making and preventing breaks (chap. 14 in Texinfo manual) +syn match texinfoSpecialChar "@\(\*\|-\|\.\)" +syn match texinfoAtCmd "^@need" nextgroup=texinfoSinglePar skipwhite +syn match texinfoAtCmd "^@page\s*$" +syn match texinfoAtCmd "^@sp" nextgroup=texinfoSinglePar skipwhite +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@group\s*$" end="^@end group\s*$" contains=ALL +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@hyphenation{" end="}" +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@w{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd + + +"definition commands (chap. 15 in Texinfo manual) +syn match texinfoMltlnAtCmdFLine "^@def\k\+" contained +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@def\k\+" end="^@end def\k\+$" contains=ALL + +"next 2 commands are from chap. 12; must be defined after @def* commands above to overwrite them +syn match texinfoAtCmd "@defcodeindex" nextgroup=texinfoIndexPar skipwhite +syn match texinfoAtCmd "@defindex" nextgroup=texinfoIndexPar skipwhite + + +"conditionally visible text (chap. 16 in Texinfo manual) +syn match texinfoAtCmd "^@clear" nextgroup=texinfoSinglePar skipwhite +syn region texinfoMltln2AtCmd matchgroup=texinfoAtCmd start="^@html\s*$" end="^@end html\s*$" +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifclear" end="^@end ifclear\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifhtml" end="^@end ifhtml\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifinfo" end="^@end ifinfo\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifnothtml" end="^@end ifnothtml\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifnotinfo" end="^@end ifnotinfo\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifnottex" end="^@end ifnottex\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifset" end="^@end ifset\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@iftex" end="^@end iftex\s*$" contains=ALL +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@set " skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoTexCmd start="\$\$" end="\$\$" contained +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@tex" end="^@end tex\s*$" contains=texinfoTexCmd +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@value{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd + + +"internationalization (chap. 17 in Texinfo manual) +syn match texinfoAtCmd "@documentencoding" nextgroup=texinfoSinglePar skipwhite +syn match texinfoAtCmd "@documentlanguage" nextgroup=texinfoIndexPar skipwhite + + +"defining new texinfo commands (chap. 18 in Texinfo manual) +syn match texinfoAtCmd "@alias" nextgroup=texinfoAssignment skipwhite +syn match texinfoDIEPar "\S*\s*,\s*\S*\s*,\s*\S*\s*$" contained +syn match texinfoAtCmd "@definfoenclose" nextgroup=texinfoDIEPar skipwhite +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@macro" end="^@end macro\s*$" contains=ALL + + +"formatting hardcopy (chap. 19 in Texinfo manual) +syn match texinfoAtCmd "^@afourlatex\s*$" +syn match texinfoAtCmd "^@afourpaper\s*$" +syn match texinfoAtCmd "^@afourwide\s*$" +syn match texinfoAtCmd "^@finalout\s*$" +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@pagesizes" end="$" oneline + + +"creating and installing Info Files (chap. 20 in Texinfo manual) +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@dircategory" skip="\\$" end="$" oneline +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@direntry\s*$" end="^@end direntry\s*$" contains=texinfoSpecialChar +syn match texinfoAtCmd "^@novalidate\s*$" + + +"include files (appendix E in Texinfo manual) +syn match texinfoAtCmd "^@include" nextgroup=texinfoSinglePar skipwhite + + +"page headings (appendix F in Texinfo manual) +syn match texinfoHFSpecialChar "@|" contained +syn match texinfoThisAtCmd "@thischapter" contained +syn match texinfoThisAtCmd "@thischaptername" contained +syn match texinfoThisAtCmd "@thisfile" contained +syn match texinfoThisAtCmd "@thispage" contained +syn match texinfoThisAtCmd "@thistitle" contained +syn match texinfoThisAtCmd "@today{}" contained +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@evenfooting" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@evenheading" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@everyfooting" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@everyheading" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@oddfooting" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@oddheading" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline + + +"refilling paragraphs (appendix H in Texinfo manual) +syn match texinfoAtCmd "@refill" + + +syn cluster texinfoAll contains=ALLBUT,texinfoThisAtCmd,texinfoHFSpecialChar +syn cluster texinfoReducedAll contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +"============================================================================== +" 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_texinfo_syn_inits") + + if version < 508 + let did_texinfo_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink texinfoSpecialChar Special + HiLink texinfoHFSpecialChar Special + + HiLink texinfoError Error + HiLink texinfoIdent Identifier + HiLink texinfoAssignment Identifier + HiLink texinfoSinglePar Identifier + HiLink texinfoIndexPar Identifier + HiLink texinfoSIPar Identifier + HiLink texinfoDIEPar Identifier + HiLink texinfoTexCmd PreProc + + + HiLink texinfoAtCmd Statement "@-command + HiLink texinfoPrmAtCmd String "@-command in one line with unknown nr. of parameters + "is String because is found as a region and is 'matchgroup'-ed + "to texinfoAtCmd + HiLink texinfoBrcPrmAtCmd String "@-command with parameter(s) in braces ({}) + "is String because is found as a region and is 'matchgroup'-ed to texinfoAtCmd + HiLink texinfoMltlnAtCmdFLine texinfoAtCmd "repeated embedded First lines in @-commands + HiLink texinfoMltlnAtCmd String "@-command in multiple lines + "is String because is found as a region and is 'matchgroup'-ed to texinfoAtCmd + HiLink texinfoMltln2AtCmd PreProc "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors) + HiLink texinfoMltlnDMAtCmd PreProc "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors; used for @detailmenu, which can be included in @menu) + HiLink texinfoMltlnNAtCmd Normal "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors) + HiLink texinfoThisAtCmd Statement "@-command used in headers and footers (@this... series) + + HiLink texinfoComment Comment + + delcommand HiLink +endif + + +let b:current_syntax = "texinfo" + +if main_syntax == 'texinfo' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/texmf.vim b/vim/bundle/ubuntu-vim72/syntax/texmf.vim new file mode 100644 index 0000000..7b91168 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/texmf.vim @@ -0,0 +1,86 @@ +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: Web2C TeX texmf.cnf configuration file +" Maintainer: David Ne\v{c}as (Yeti) +" Last Change: 2001-05-13 +" URL: http://physics.muni.cz/~yeti/download/syntax/texmf.vim + +" Setup +if version >= 600 + if exists("b:current_syntax") + finish + endif +else + syntax clear +endif + +syn case match + +" Comments +syn match texmfComment "%..\+$" contains=texmfTodo +syn match texmfComment "%\s*$" contains=texmfTodo +syn keyword texmfTodo TODO FIXME XXX NOT contained + +" Constants and parameters +syn match texmfPassedParameter "[-+]\=%\w\W" +syn match texmfPassedParameter "[-+]\=%\w$" +syn match texmfNumber "\<\d\+\>" +syn match texmfVariable "\$\(\w\k*\|{\w\k*}\)" +syn match texmfSpecial +\\"\|\\$+ +syn region texmfString start=+"+ end=+"+ skip=+\\"\\\\+ contains=texmfVariable,texmfSpecial,texmfPassedParameter + +" Assignments +syn match texmfLHSStart "^\s*\w\k*" nextgroup=texmfLHSDot,texmfEquals +syn match texmfLHSVariable "\w\k*" contained nextgroup=texmfLHSDot,texmfEquals +syn match texmfLHSDot "\." contained nextgroup=texmfLHSVariable +syn match texmfEquals "\s*=" contained + +" Specialities +syn match texmfComma "," contained +syn match texmfColons ":\|;" +syn match texmfDoubleExclam "!!" contained + +" Catch errors caused by wrong parenthesization +syn region texmfBrace matchgroup=texmfBraceBrace start="{" end="}" contains=ALLBUT,texmfTodo,texmfBraceError,texmfLHSVariable,texmfLHSDot transparent +syn match texmfBraceError "}" + +" Define the default highlighting +if version >= 508 || !exists("did_texmf_syntax_inits") + if version < 508 + let did_texmf_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink texmfComment Comment + HiLink texmfTodo Todo + + HiLink texmfPassedParameter texmfVariable + HiLink texmfVariable Identifier + + HiLink texmfNumber Number + HiLink texmfString String + + HiLink texmfLHSStart texmfLHS + HiLink texmfLHSVariable texmfLHS + HiLink texmfLHSDot texmfLHS + HiLink texmfLHS Type + + HiLink texmfEquals Normal + + HiLink texmfBraceBrace texmfDelimiter + HiLink texmfComma texmfDelimiter + HiLink texmfColons texmfDelimiter + HiLink texmfDelimiter Preproc + + HiLink texmfDoubleExclam Statement + HiLink texmfSpecial Special + + HiLink texmfBraceError texmfError + HiLink texmfError Error + + delcommand HiLink +endif + +let b:current_syntax = "texmf" diff --git a/vim/bundle/ubuntu-vim72/syntax/tf.vim b/vim/bundle/ubuntu-vim72/syntax/tf.vim new file mode 100644 index 0000000..2a9a999 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/tf.vim @@ -0,0 +1,209 @@ +" Vim syntax file +" Language: tf +" Maintainer: Lutz Eymers +" URL: http://www.isp.de/data/tf.vim +" Email: send syntax_vim.tgz +" Last Change: 2001 May 10 +" +" Options lite_minlines = x to sync at least x lines backwards + +" Remove any old syntax stuff hanging around + +" 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 match + +if !exists("main_syntax") + let main_syntax = 'tf' +endif + +" Special global variables +syn keyword tfVar HOME LANG MAIL SHELL TERM TFHELP TFLIBDIR TFLIBRARY TZ contained +syn keyword tfVar background backslash contained +syn keyword tfVar bamf bg_output borg clearfull cleardone clock connect contained +syn keyword tfVar emulation end_color gag gethostbyname gpri hook hilite contained +syn keyword tfVar hiliteattr histsize hpri insert isize istrip kecho contained +syn keyword tfVar kprefix login lp lpquote maildelay matching max_iter contained +syn keyword tfVar max_recur mecho more mprefix oldslash promt_sec contained +syn keyword tfVar prompt_usec proxy_host proxy_port ptime qecho qprefix contained +syn keyword tfVar quite quitdone redef refreshtime scroll shpause snarf sockmload contained +syn keyword tfVar start_color tabsize telopt sub time_format visual contained +syn keyword tfVar watch_dog watchname wordpunct wrap wraplog wrapsize contained +syn keyword tfVar wrapspace contained + +" Worldvar +syn keyword tfWorld world_name world_character world_password world_host contained +syn keyword tfWorld world_port world_mfile world_type contained + +" Number +syn match tfNumber "-\=\<\d\+\>" + +" Float +syn match tfFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" + +" Operator +syn match tfOperator "[-+=?:&|!]" +syn match tfOperator "/[^*~@]"he=e-1 +syn match tfOperator ":=" +syn match tfOperator "[^/%]\*"hs=s+1 +syn match tfOperator "$\+[([{]"he=e-1,me=e-1 +syn match tfOperator "\^\[\+"he=s+1 contains=tfSpecialCharEsc + +" Relational +syn match tfRelation "&&" +syn match tfRelation "||" +syn match tfRelation "[<>/!=]=" +syn match tfRelation "[<>]" +syn match tfRelation "[!=]\~" +syn match tfRelation "[=!]/" + + +" Readonly Var +syn match tfReadonly "[#*]" contained +syn match tfReadonly "\<-\=L\=\d\{-}\>" contained +syn match tfReadonly "\" contained +syn match tfReadonly "\" contained + +" Identifier +syn match tfIdentifier "%\+[a-zA-Z_#*-0-9]\w*" contains=tfVar,tfReadonly +syn match tfIdentifier "%\+[{]"he=e-1,me=e-1 +syn match tfIdentifier "\$\+{[a-zA-Z_#*-0-9]\w*}" contains=tfWorld + +" Function names +syn keyword tfFunctions ascii char columns echo filename ftime fwrite getopts +syn keyword tfFunctions getpid idle kbdel kbgoto kbhead kblen kbmatch kbpoint +syn keyword tfFunctions kbtail kbwordleft kbwordright keycode lines mod +syn keyword tfFunctions moresize pad rand read regmatch send strcat strchr +syn keyword tfFunctions strcmp strlen strncmp strrchr strrep strstr substr +syn keyword tfFunctions systype time tolower toupper + +syn keyword tfStatement addworld bamf beep bind break cat changes connect contained +syn keyword tfStatement dc def dokey echo edit escape eval export expr fg for contained +syn keyword tfStatement gag getfile grab help hilite histsize hook if input contained +syn keyword tfStatement kill lcd let list listsockets listworlds load contained +syn keyword tfStatement localecho log nohilite not partial paste ps purge contained +syn keyword tfStatement purgeworld putfile quit quote recall recordline save contained +syn keyword tfStatement saveworld send sh shift sub substitute contained +syn keyword tfStatement suspend telnet test time toggle trig trigger unbind contained +syn keyword tfStatement undef undefn undeft unhook untrig unworld contained +syn keyword tfStatement version watchdog watchname while world contained + +" Hooks +syn keyword tfHook ACTIVITY BACKGROUND BAMF CONFAIL CONFLICT CONNECT DISCONNECT +syn keyword tfHook KILL LOAD LOADFAIL LOG LOGIN MAIL MORE PENDING PENDING +syn keyword tfHook PROCESS PROMPT PROXY REDEF RESIZE RESUME SEND SHADOW SHELL +syn keyword tfHook SIGHUP SIGTERM SIGUSR1 SIGUSR2 WORLD + +" Conditional +syn keyword tfConditional if endif then else elseif contained + +" Repeat +syn keyword tfRepeat while do done repeat for contained + +" Statement +syn keyword tfStatement break quit contained + +" Include +syn keyword tfInclude require load save loaded contained + +" Define +syn keyword tfDefine bind unbind def undef undefn undefn purge hook unhook trig untrig contained +syn keyword tfDefine set unset setenv contained + +" Todo +syn keyword tfTodo TODO Todo todo contained + +" SpecialChar +syn match tfSpecialChar "\\[abcfnrtyv\\]" contained +syn match tfSpecialChar "\\\d\{3}" contained contains=tfOctalError +syn match tfSpecialChar "\\x[0-9a-fA-F]\{2}" contained +syn match tfSpecialCharEsc "\[\+" contained + +syn match tfOctalError "[89]" contained + +" Comment +syn region tfComment start="^;" end="$" contains=tfTodo + +" String +syn region tfString oneline matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=tfIdentifier,tfSpecialChar,tfEscape +syn region tfString matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=tfIdentifier,tfSpecialChar,tfEscape + +syn match tfParentError "[)}\]]" + +" Parents +syn region tfParent matchgroup=Delimiter start="(" end=")" contains=ALLBUT,tfReadonly +syn region tfParent matchgroup=Delimiter start="\[" end="\]" contains=ALL +syn region tfParent matchgroup=Delimiter start="{" end="}" contains=ALL + +syn match tfEndCommand "%%\{-};" +syn match tfJoinLines "\\$" + +" Types + +syn match tfType "/[a-zA-Z_~@][a-zA-Z0-9_]*" contains=tfConditional,tfRepeat,tfStatement,tfInclude,tfDefine,tfStatement + +" Catch /quote .. ' +syn match tfQuotes "/quote .\{-}'" contains=ALLBUT,tfString +" Catch $(/escape ) +syn match tfEscape "(/escape .*)" + +" sync +if exists("tf_minlines") + exec "syn sync minlines=" . tf_minlines +else + syn sync minlines=100 +endif + +" 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_tf_syn_inits") + if version < 508 + let did_tf_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink tfComment Comment + HiLink tfString String + HiLink tfNumber Number + HiLink tfFloat Float + HiLink tfIdentifier Identifier + HiLink tfVar Identifier + HiLink tfWorld Identifier + HiLink tfReadonly Identifier + HiLink tfHook Identifier + HiLink tfFunctions Function + HiLink tfRepeat Repeat + HiLink tfConditional Conditional + HiLink tfLabel Label + HiLink tfStatement Statement + HiLink tfType Type + HiLink tfInclude Include + HiLink tfDefine Define + HiLink tfSpecialChar SpecialChar + HiLink tfSpecialCharEsc SpecialChar + HiLink tfParentError Error + HiLink tfTodo Todo + HiLink tfEndCommand Delimiter + HiLink tfJoinLines Delimiter + HiLink tfOperator Operator + HiLink tfRelation Operator + + delcommand HiLink +endif + +let b:current_syntax = "tf" + +if main_syntax == 'tf' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/tidy.vim b/vim/bundle/ubuntu-vim72/syntax/tidy.vim new file mode 100644 index 0000000..b23dc3a --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/tidy.vim @@ -0,0 +1,162 @@ +" Vim syntax file +" Language: HMTL Tidy configuration file ( /etc/tidyrc ~/.tidyrc ) +" Maintainer: Doug Kearns +" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/tidy.vim +" Last Change: 2005 Oct 06 + +" 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 + +if version < 600 + set iskeyword=@,48-57,- +else + setlocal iskeyword=@,48-57,- +endif + +syn match tidyComment "^\s*//.*$" contains=tidyTodo +syn match tidyComment "^\s*#.*$" contains=tidyTodo +syn keyword tidyTodo TODO NOTE FIXME XXX contained + +syn match tidyAssignment "^[a-z0-9-]\+:\s*.*$" contains=tidyOption,@tidyValue,tidyDelimiter +syn match tidyDelimiter ":" contained + +syn match tidyNewTagAssignment "^new-\l\+-tags:\s*.*$" contains=tidyNewTagOption,tidyNewTagDelimiter,tidyNewTagValue,tidyDelimiter +syn match tidyNewTagDelimiter "," contained +syn match tidyNewTagValue "\<\w\+\>" contained + +syn case ignore +syn keyword tidyBoolean t[rue] f[alse] y[es] n[o] contained +syn case match +syn match tidyDoctype "\" contained +" NOTE: use match rather than keyword here so that tidyEncoding 'raw' does not +" always have precedence over tidyOption 'raw' +syn match tidyEncoding "\<\(ascii\|latin0\|latin1\|raw\|utf8\|iso2022\|mac\|utf16le\|utf16be\|utf16\|win1252\|ibm858\|big5\|shiftjis\)\>" contained +syn match tidyNewline "\<\(LF\|CRLF\|CR\)\>" +syn match tidyNumber "\<\d\+\>" contained +syn match tidyRepeat "\" contained +syn region tidyString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline +syn region tidyString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline +syn cluster tidyValue contains=tidyBoolean,tidyDoctype,tidyEncoding,tidyNewline,tidyNumber,tidyRepeat,tidyString + +syn match tidyOption "^accessibility-check" contained +syn match tidyOption "^add-xml-decl" contained +syn match tidyOption "^add-xml-pi" contained +syn match tidyOption "^add-xml-space" contained +syn match tidyOption "^alt-text" contained +syn match tidyOption "^ascii-chars" contained +syn match tidyOption "^assume-xml-procins" contained +syn match tidyOption "^bare" contained +syn match tidyOption "^break-before-br" contained +syn match tidyOption "^char-encoding" contained +syn match tidyOption "^clean" contained +syn match tidyOption "^css-prefix" contained +syn match tidyOption "^doctype" contained +syn match tidyOption "^doctype-mode" contained +syn match tidyOption "^drop-empty-paras" contained +syn match tidyOption "^drop-font-tags" contained +syn match tidyOption "^drop-proprietary-attributes" contained +syn match tidyOption "^enclose-block-text" contained +syn match tidyOption "^enclose-text" contained +syn match tidyOption "^error-file" contained +syn match tidyOption "^escape-cdata" contained +syn match tidyOption "^fix-backslash" contained +syn match tidyOption "^fix-bad-comments" contained +syn match tidyOption "^fix-uri" contained +syn match tidyOption "^force-output" contained +syn match tidyOption "^gnu-emacs" contained +syn match tidyOption "^gnu-emacs-file" contained +syn match tidyOption "^hide-comments" contained +syn match tidyOption "^hide-endtags" contained +syn match tidyOption "^indent" contained +syn match tidyOption "^indent-attributes" contained +syn match tidyOption "^indent-cdata" contained +syn match tidyOption "^indent-spaces" contained +syn match tidyOption "^input-encoding" contained +syn match tidyOption "^input-xml" contained +syn match tidyOption "^join-classes" contained +syn match tidyOption "^join-styles" contained +syn match tidyOption "^keep-time" contained +syn match tidyOption "^language" contained +syn match tidyOption "^literal-attributes" contained +syn match tidyOption "^logical-emphasis" contained +syn match tidyOption "^lower-literals" contained +syn match tidyOption "^markup" contained +syn match tidyOption "^merge-divs" contained +syn match tidyOption "^ncr" contained +syn match tidyOption "^newline" contained +syn match tidyOption "^numeric-entities" contained +syn match tidyOption "^output-bom" contained +syn match tidyOption "^output-encoding" contained +syn match tidyOption "^output-file" contained +syn match tidyOption "^output-html" contained +syn match tidyOption "^output-xhtml" contained +syn match tidyOption "^output-xml" contained +syn match tidyOption "^punctuation-wrap" contained +syn match tidyOption "^quiet" contained +syn match tidyOption "^quote-ampersand" contained +syn match tidyOption "^quote-marks" contained +syn match tidyOption "^quote-nbsp" contained +syn match tidyOption "^raw" contained +syn match tidyOption "^repeated-attributes" contained +syn match tidyOption "^replace-color" contained +syn match tidyOption "^show-body-only" contained +syn match tidyOption "^show-errors" contained +syn match tidyOption "^show-warnings" contained +syn match tidyOption "^slide-style" contained +syn match tidyOption "^split" contained +syn match tidyOption "^tab-size" contained +syn match tidyOption "^tidy-mark" contained +syn match tidyOption "^uppercase-attributes" contained +syn match tidyOption "^uppercase-tags" contained +syn match tidyOption "^word-2000" contained +syn match tidyOption "^wrap" contained +syn match tidyOption "^wrap-asp" contained +syn match tidyOption "^wrap-attributes" contained +syn match tidyOption "^wrap-jste" contained +syn match tidyOption "^wrap-php" contained +syn match tidyOption "^wrap-script-literals" contained +syn match tidyOption "^wrap-sections" contained +syn match tidyOption "^write-back" contained +syn match tidyOption "^vertical-space" contained +syn match tidyNewTagOption "^new-blocklevel-tags" contained +syn match tidyNewTagOption "^new-empty-tags" contained +syn match tidyNewTagOption "^new-inline-tags" contained +syn match tidyNewTagOption "^new-pre-tags" contained + +" 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_tidy_syn_inits") + if version < 508 + let did_tidy_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink tidyBoolean Boolean + HiLink tidyComment Comment + HiLink tidyDelimiter Special + HiLink tidyDoctype Constant + HiLink tidyEncoding Constant + HiLink tidyNewline Constant + HiLink tidyNewTagDelimiter Special + HiLink tidyNewTagOption Identifier + HiLink tidyNewTagValue Constant + HiLink tidyNumber Number + HiLink tidyOption Identifier + HiLink tidyRepeat Constant + HiLink tidyString String + HiLink tidyTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "tidy" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/tilde.vim b/vim/bundle/ubuntu-vim72/syntax/tilde.vim new file mode 100644 index 0000000..3fdebf1 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/tilde.vim @@ -0,0 +1,41 @@ +" Vim syntax file +" This file works only for Vim6.x +" Language: Tilde +" Maintainer: Tobias Rundström +" URL: http://www.tildesoftware.net +" CVS: $Id: tilde.vim,v 1.1 2004/06/13 19:31:51 vimboss Exp $ + +if exists("b:current_syntax") + finish +endif + +"tilde dosent care ... +syn case ignore + +syn match tildeFunction "\~[a-z_0-9]\+"ms=s+1 +syn region tildeParen start="(" end=")" contains=tildeString,tildeNumber,tildeVariable,tildeField,tildeSymtab,tildeFunction,tildeParen,tildeHexNumber,tildeOperator +syn region tildeString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ keepend +syn region tildeString contained start=+'+ skip=+\\\\\|\\"+ end=+'+ keepend +syn match tildeNumber "\d" contained +syn match tildeOperator "or\|and" contained +syn match tildeHexNumber "0x[a-z0-9]\+" contained +syn match tildeVariable "$[a-z_0-9]\+" contained +syn match tildeField "%[a-z_0-9]\+" contained +syn match tildeSymtab "@[a-z_0-9]\+" contained +syn match tildeComment "^#.*" +syn region tildeCurly start=+{+ end=+}+ contained contains=tildeLG,tildeString,tildeNumber,tildeVariable,tildeField,tildeFunction,tildeSymtab,tildeHexNumber +syn match tildeLG "=>" contained + + +hi def link tildeComment Comment +hi def link tildeFunction Operator +hi def link tildeOperator Operator +hi def link tildeString String +hi def link tildeNumber Number +hi def link tildeHexNumber Number +hi def link tildeVariable Identifier +hi def link tildeField Identifier +hi def link tildeSymtab Identifier +hi def link tildeError Error + +let b:current_syntax = "tilde" diff --git a/vim/bundle/ubuntu-vim72/syntax/tli.vim b/vim/bundle/ubuntu-vim72/syntax/tli.vim new file mode 100644 index 0000000..5685a6c --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/tli.vim @@ -0,0 +1,71 @@ +" Vim syntax file +" Language: TealInfo source files (*.tli) +" Maintainer: Kurt W. Andrews +" Last Change: 2001 May 10 +" Version: 1.0 + +" 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 + +" TealInfo Objects + +syn keyword tliObject LIST POPLIST WINDOW POPWINDOW OUTLINE CHECKMARK GOTO +syn keyword tliObject LABEL IMAGE RECT TRES PASSWORD POPEDIT POPIMAGE CHECKLIST + +" TealInfo Fields + +syn keyword tliField X Y W H BX BY BW BH SX SY FONT BFONT CYCLE DELAY TABS +syn keyword tliField STYLE BTEXT RECORD DATABASE KEY TARGET DEFAULT TEXT +syn keyword tliField LINKS MAXVAL + +" TealInfo Styles + +syn keyword tliStyle INVERTED HORIZ_RULE VERT_RULE NO_SCROLL NO_BORDER BOLD_BORDER +syn keyword tliStyle ROUND_BORDER ALIGN_RIGHT ALIGN_CENTER ALIGN_LEFT_START ALIGN_RIGHT_START +syn keyword tliStyle ALIGN_CENTER_START ALIGN_LEFT_END ALIGN_RIGHT_END ALIGN_CENTER_END +syn keyword tliStyle LOCKOUT BUTTON_SCROLL BUTTON_SELECT STROKE_FIND FILLED REGISTER + +" String and Character constants + +syn match tliSpecial "@" +syn region tliString start=+"+ end=+"+ + +"TealInfo Numbers, identifiers and comments + +syn case ignore +syn match tliNumber "\d*" +syn match tliIdentifier "\<\h\w*\>" +syn match tliComment "#.*" +syn case match + +" 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_tli_syntax_inits") + if version < 508 + let did_tli_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink tliNumber Number + HiLink tliString String + HiLink tliComment Comment + HiLink tliSpecial SpecialChar + HiLink tliIdentifier Identifier + HiLink tliObject Statement + HiLink tliField Type + HiLink tliStyle PreProc + + delcommand HiLink +endif + +let b:current_syntax = "tli" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/tpp.vim b/vim/bundle/ubuntu-vim72/syntax/tpp.vim new file mode 100644 index 0000000..050a2ba --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/tpp.vim @@ -0,0 +1,100 @@ +" Vim syntax file +" Language: tpp - Text Presentation Program +" Maintainer: Debian Vim Maintainers +" Former Maintainer: Gerfried Fuchs +" Last Change: 2007-10-14 +" URL: http://git.debian.org/?p=pkg-vim/vim.git;a=blob_plain;f=runtime/syntax/tpp.vim;hb=debian +" Filenames: *.tpp +" License: BSD +" +" XXX This file is in need of a new maintainer, Debian VIM Maintainers maintain +" it only because patches have been submitted for it by Debian users and the +" former maintainer was MIA (Missing In Action), taking over its +" maintenance was thus the only way to include those patches. +" If you care about this file, and have time to maintain it please do so! +" +" Comments are very welcome - but please make sure that you are commenting on +" the latest version of this file. +" SPAM is _NOT_ welcome - be ready to be reported! + +" 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 + +if !exists("main_syntax") + let main_syntax = 'tpp' +endif + + +"" list of the legal switches/options +syn match tppAbstractOptionKey contained "^--\%(author\|title\|date\|footer\) *" nextgroup=tppString +syn match tppPageLocalOptionKey contained "^--\%(heading\|center\|right\|huge\|sethugefont\|exec\) *" nextgroup=tppString +syn match tppPageLocalSwitchKey contained "^--\%(horline\|-\|\%(begin\|end\)\%(\%(shell\)\?output\|slide\%(left\|right\|top\|bottom\)\)\|\%(bold\|rev\|ul\)\%(on\|off\)\|withborder\)" +syn match tppNewPageOptionKey contained "^--newpage *" nextgroup=tppString +syn match tppColorOptionKey contained "^--\%(\%(bg\|fg\)\?color\) *" +syn match tppTimeOptionKey contained "^--sleep *" + +syn match tppString contained ".*" +syn match tppColor contained "\%(white\|yellow\|red\|green\|blue\|cyan\|magenta\|black\|default\)" +syn match tppTime contained "\d\+" + +syn region tppPageLocalSwitch start="^--" end="$" contains=tppPageLocalSwitchKey oneline +syn region tppColorOption start="^--\%(\%(bg\|fg\)\?color\)" end="$" contains=tppColorOptionKey,tppColor oneline +syn region tppTimeOption start="^--sleep" end="$" contains=tppTimeOptionKey,tppTime oneline +syn region tppNewPageOption start="^--newpage" end="$" contains=tppNewPageOptionKey oneline +syn region tppPageLocalOption start="^--\%(heading\|center\|right\|huge\|sethugefont\|exec\)" end="$" contains=tppPageLocalOptionKey oneline +syn region tppAbstractOption start="^--\%(author\|title\|date\|footer\)" end="$" contains=tppAbstractOptionKey oneline + +if main_syntax != 'sh' + " shell command + if version < 600 + syn include @tppShExec :p:h/sh.vim + else + syn include @tppShExec syntax/sh.vim + endif + unlet b:current_syntax + + syn region shExec matchgroup=tppPageLocalOptionKey start='^--exec *' keepend end='$' contains=@tppShExec + +endif + +syn match tppComment "^--##.*$" + +" 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_tpp_syn_inits") + if version < 508 + let did_tpp_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink tppAbstractOptionKey Special + HiLink tppPageLocalOptionKey Keyword + HiLink tppPageLocalSwitchKey Keyword + HiLink tppColorOptionKey Keyword + HiLink tppTimeOptionKey Comment + HiLink tppNewPageOptionKey PreProc + HiLink tppString String + HiLink tppColor String + HiLink tppTime Number + HiLink tppComment Comment + HiLink tppAbstractOption Error + HiLink tppPageLocalOption Error + HiLink tppPageLocalSwitch Error + HiLink tppColorOption Error + HiLink tppNewPageOption Error + HiLink tppTimeOption Error + + delcommand HiLink +endif + +let b:current_syntax = "tpp" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/trasys.vim b/vim/bundle/ubuntu-vim72/syntax/trasys.vim new file mode 100644 index 0000000..cfecc1c --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/trasys.vim @@ -0,0 +1,177 @@ +" Vim syntax file +" Language: TRASYS input file +" Maintainer: Adrian Nagle, anagle@ball.com +" Last Change: 2003 May 11 +" Filenames: *.inp +" URL: http://www.naglenet.org/vim/syntax/trasys.vim +" MAIN URL: http://www.naglenet.org/vim/ + + + +" 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 + + +" Force free-form fortran format +let fortran_free_source=1 + +" Load FORTRAN syntax file +if version < 600 + source :p:h/fortran.vim +else + runtime! syntax/fortran.vim +endif +unlet b:current_syntax + + +" Ignore case +syn case ignore + + + +" Define keywords for TRASYS +syn keyword trasysOptions model rsrec info maxfl nogo dmpdoc +syn keyword trasysOptions rsi rti rso rto bcdou cmerg emerg +syn keyword trasysOptions user1 nnmin erplot + +syn keyword trasysSurface icsn tx ty tz rotx roty rotz inc bcsn +syn keyword trasysSurface nnx nny nnz nnax nnr nnth unnx +syn keyword trasysSurface unny unnz unnax unnr unnth type idupsf +syn keyword trasysSurface imagsf act active com shade bshade axmin +syn keyword trasysSurface axmax zmin zmax rmin rmax thmin thmin +syn keyword trasysSurface thmax alpha emiss trani trans spri sprs +syn keyword trasysSurface refno posit com dupbcs dimensions +syn keyword trasysSurface dimension position prop surfn + +syn keyword trasysSurfaceType rect trap disk cyl cone sphere parab +syn keyword trasysSurfaceType box5 box6 shpero tor ogiv elem tape poly + +syn keyword trasysSurfaceArgs ff di top bottom in out both no only + +syn keyword trasysArgs fig smn nodea zero only ir sol +syn keyword trasysArgs both wband stepn initl + +syn keyword trasysOperations orbgen build + +"syn keyword trasysSubRoutine call +syn keyword trasysSubRoutine chgblk ndata ndatas odata odatas +syn keyword trasysSubRoutine pldta ffdata cmdata adsurf rbdata +syn keyword trasysSubRoutine rtdata pffshd orbit1 orbit2 orient +syn keyword trasysSubRoutine didt1 didt1s didt2 didt2s spin +syn keyword trasysSubRoutine spinav dicomp distab drdata gbdata +syn keyword trasysSubRoutine gbaprx rkdata rcdata aqdata stfaq +syn keyword trasysSubRoutine qodata qoinit modar modpr modtr +syn keyword trasysSubRoutine modprs modshd moddat rstoff rston +syn keyword trasysSubRoutine rsmerg ffread diread ffusr1 diusr1 +syn keyword trasysSubRoutine surfp didt3 didt3s romain stfrc +syn keyword trasysSubRoutine rornt rocstr romove flxdata title + +syn keyword trassyPrcsrSegm nplot oplot plot cmcal ffcal rbcal +syn keyword trassyPrcsrSegm rtcal dical drcal sfcal gbcal rccal +syn keyword trassyPrcsrSegm rkcal aqcal qocal + + + +" Define matches for TRASYS +syn match trasysOptions "list source" +syn match trasysOptions "save source" +syn match trasysOptions "no print" + +"syn match trasysSurface "^K *.* [^$]" +"syn match trasysSurface "^D *[0-9]*\.[0-9]\+" +"syn match trasysSurface "^I *.*[0-9]\+\.\=" +"syn match trasysSurface "^N *[0-9]\+" +"syn match trasysSurface "^M *[a-z[A-Z0-9]\+" +"syn match trasysSurface "^B[C][S] *[a-zA-Z0-9]*" +"syn match trasysSurface "^S *SURFN.*[0-9]" +syn match trasysSurface "P[0-9]* *="he=e-1 + +syn match trasysIdentifier "^L "he=e-1 +syn match trasysIdentifier "^K "he=e-1 +syn match trasysIdentifier "^D "he=e-1 +syn match trasysIdentifier "^I "he=e-1 +syn match trasysIdentifier "^N "he=e-1 +syn match trasysIdentifier "^M "he=e-1 +syn match trasysIdentifier "^B[C][S]" +syn match trasysIdentifier "^S "he=e-1 + +syn match trasysComment "^C.*$" +syn match trasysComment "^R.*$" +syn match trasysComment "\$.*$" + +syn match trasysHeader "^header[^,]*" + +syn match trasysMacro "^FAC" + +syn match trasysInteger "-\=\<[0-9]*\>" +syn match trasysFloat "-\=\<[0-9]*\.[0-9]*" +syn match trasysScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" + +syn match trasysBlank "' \+'"hs=s+1,he=e-1 + +syn match trasysEndData "^END OF DATA" + +if exists("thermal_todo") + execute 'syn match trasysTodo ' . '"^'.thermal_todo.'.*$"' +else + syn match trasysTodo "^?.*$" +endif + + + +" Define regions for TRASYS +syn region trasysComment matchgroup=trasysHeader start="^HEADER DOCUMENTATION DATA" end="^HEADER[^,]*" + + + +" Define synchronizing patterns for TRASYS +syn sync maxlines=500 +syn sync match trasysSync grouphere trasysComment "^HEADER DOCUMENTATION DATA" + + + +" 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_trasys_syntax_inits") + if version < 508 + let did_trasys_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink trasysOptions Special + HiLink trasysSurface Special + HiLink trasysSurfaceType Constant + HiLink trasysSurfaceArgs Constant + HiLink trasysArgs Constant + HiLink trasysOperations Statement + HiLink trasysSubRoutine Statement + HiLink trassyPrcsrSegm PreProc + HiLink trasysIdentifier Identifier + HiLink trasysComment Comment + HiLink trasysHeader Typedef + HiLink trasysMacro Macro + HiLink trasysInteger Number + HiLink trasysFloat Float + HiLink trasysScientific Float + + HiLink trasysBlank SpecialChar + + HiLink trasysEndData Macro + + HiLink trasysTodo Todo + + delcommand HiLink +endif + + +let b:current_syntax = "trasys" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/trustees.vim b/vim/bundle/ubuntu-vim72/syntax/trustees.vim new file mode 100644 index 0000000..4bc8874 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/trustees.vim @@ -0,0 +1,43 @@ +" Vim syntax file +" Language: trustees +" Maintainer: Nima Talebi +" Last Change: 2005-10-12 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syntax case match +syntax sync minlines=0 maxlines=0 + +" Errors & Comments +syntax match tfsError /.*/ +highlight link tfsError Error +syntax keyword tfsSpecialComment TODO XXX FIXME contained +highlight link tfsSpecialComment Todo +syntax match tfsComment ~\s*#.*~ contains=tfsSpecialComment +highlight link tfsComment Comment + +" Operators & Delimiters +highlight link tfsSpecialChar Operator +syntax match tfsSpecialChar ~[*!+]~ contained +highlight link tfsDelimiter Delimiter +syntax match tfsDelimiter ~:~ contained + +" Trustees Rules - Part 1 of 3 - The Device +syntax region tfsRuleDevice matchgroup=tfsDeviceContainer start=~\[/~ end=~\]~ nextgroup=tfsRulePath oneline +highlight link tfsRuleDevice Label +highlight link tfsDeviceContainer PreProc + +" Trustees Rules - Part 2 of 3 - The Path +syntax match tfsRulePath ~/[-_a-zA-Z0-9/]*~ nextgroup=tfsRuleACL contained contains=tfsDelimiter +highlight link tfsRulePath String + +" Trustees Rules - Part 3 of 3 - The ACLs +syntax match tfsRuleACL ~\(:\(\*\|[+]\{0,1\}[a-zA-Z0-9/]\+\):[RWEBXODCU!]\+\)\+$~ contained contains=tfsDelimiter,tfsRuleWho,tfsRuleWhat +syntax match tfsRuleWho ~\(\*\|[+]\{0,1\}[a-zA-Z0-9/]\+\)~ contained contains=tfsSpecialChar +highlight link tfsRuleWho Identifier +syntax match tfsRuleWhat ~[RWEBXODCU!]\+~ contained contains=tfsSpecialChar +highlight link tfsRuleWhat Structure diff --git a/vim/bundle/ubuntu-vim72/syntax/tsalt.vim b/vim/bundle/ubuntu-vim72/syntax/tsalt.vim new file mode 100644 index 0000000..56f1755 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/tsalt.vim @@ -0,0 +1,214 @@ +" Vim syntax file +" Language: Telix (Modem Comm Program) SALT Script +" Maintainer: Sean M. McKee +" Last Change: 2001 May 09 +" Version Info: @(#)tsalt.vim 1.5 97/12/16 08:11:15 + +" 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 + +" turn case matching off +syn case ignore + +"FUNCTIONS +" Character Handling Functions +syn keyword tsaltFunction IsAscii IsAlNum IsAlpha IsCntrl IsDigit +syn keyword tsaltFunction IsLower IsUpper ToLower ToUpper + +" Connect Device Operations +syn keyword tsaltFunction Carrier cInp_Cnt cGetC cGetCT cPutC cPutN +syn keyword tsaltFunction cPutS cPutS_TR FlushBuf Get_Baud +syn keyword tsaltFunction Get_DataB Get_Port Get_StopB Hangup +syn keyword tsaltFunction KillConnectDevice MakeConnectDevice +syn keyword tsaltFunction Send_Brk Set_ConnectDevice Set_Port + +" File Input/Output Operations +syn keyword tsaltFunction fClearErr fClose fDelete fError fEOF fFlush +syn keyword tsaltFunction fGetC fGetS FileAttr FileFind FileSize +syn keyword tsaltFunction FileTime fnStrip fOpen fPutC fPutS fRead +syn keyword tsaltFunction fRename fSeek fTell fWrite + +" File Transfers and Logs +syn keyword tsaltFunction Capture Capture_Stat Printer Receive Send +syn keyword tsaltFunction Set_DefProt UsageLog Usage_Stat UStamp + +" Input String Matching +syn keyword tsaltFunction Track Track_AddChr Track_Free Track_Hit +syn keyword tsaltFunction WaitFor + +" Keyboard Operations +syn keyword tsaltFunction InKey InKeyW KeyGet KeyLoad KeySave KeySet + +" Miscellaneous Functions +syn keyword tsaltFunction ChatMode Dos Dial DosFunction ExitTelix +syn keyword tsaltFunction GetEnv GetFon HelpScreen LoadFon NewDir +syn keyword tsaltFunction Randon Redial RedirectDOS Run +syn keyword tsaltFunction Set_Terminal Show_Directory TelixVersion +syn keyword tsaltFunction Terminal TransTab Update_Term + +" Script Management +syn keyword tsaltFunction ArgCount Call CallD CompileScript GetRunPath +syn keyword tsaltFunction Is_Loaded Load_Scr ScriptVersion +syn keyword tsaltFunction TelixForWindows Unload_Scr + +" Sound Functions +syn keyword tsaltFunction Alarm PlayWave Tone + +" String Handling +syn keyword tsaltFunction CopyChrs CopyStr DelChrs GetS GetSXY +syn keyword tsaltFunction InputBox InsChrs ItoS SetChr StoI StrCat +syn keyword tsaltFunction StrChr StrCompI StrLen StrLower StrMaxLen +syn keyword tsaltFunction StrPos StrPosI StrUpper SubChr SubChrs +syn keyword tsaltFunction SubStr + +" Time, Date, and Timer Operations +syn keyword tsaltFunction CurTime Date Delay Delay_Scr Get_OnlineTime +syn keyword tsaltFunction tDay tHour tMin tMonth tSec tYear Time +syn keyword tsaltFunction Time_Up Timer_Free Time_Restart +syn keyword tsaltFunction Time_Start Time_Total + +" Video Operations +syn keyword tsaltFunction Box CNewLine Cursor_OnOff Clear_Scr +syn keyword tsaltFunction GetTermHeight GetTermWidth GetX GetY +syn keyword tsaltFunction GotoXY MsgBox NewLine PrintC PrintC_Trm +syn keyword tsaltFunction PrintN PrintN_Trm PrintS PrintS_Trm +syn keyword tsaltFunction PrintSC PRintSC_Trm +syn keyword tsaltFunction PStrA PStrAXY Scroll Status_Wind vGetChr +syn keyword tsaltFunction vGetChrs vGetChrsA vPutChr vPutChrs +syn keyword tsaltFunction vPutChrsA vRstrArea vSaveArea + +" Dynamic Data Exchange (DDE) Operations +syn keyword tsaltFunction DDEExecute DDEInitate DDEPoke DDERequest +syn keyword tsaltFunction DDETerminate DDETerminateAll +"END FUNCTIONS + +"PREDEFINED VARAIABLES +syn keyword tsaltSysVar _add_lf _alarm_on _answerback_str _asc_rcrtrans +syn keyword tsaltSysVar _asc_remabort _asc_rlftrans _asc_scpacing +syn keyword tsaltSysVar _asc_scrtrans _asc_secho _asc_slpacing +syn keyword tsaltSysVar _asc_spacechr _asc_striph _back_color +syn keyword tsaltSysVar _capture_fname _connect_str _dest_bs +syn keyword tsaltSysVar _dial_pause _dial_time _dial_post +syn keyword tsaltSysVar _dial_pref1 _dial_pref2 _dial_pref3 +syn keyword tsaltSysVar _dial_pref4 _dir_prog _down_dir +syn keyword tsaltSysVar _entry_bbstype _entry_comment _entry_enum +syn keyword tsaltSysVar _entry_name _entry_num _entry_logonname +syn keyword tsaltSysVar _entry_pass _fore_color _image_file +syn keyword tsaltSysVar _local_echo _mdm_hang_str _mdm_init_str +syn keyword tsaltSysVar _no_connect1 _no_connect2 _no_connect3 +syn keyword tsaltSysVar _no_connect4 _no_connect5 _redial_stop +syn keyword tsaltSysVar _scr_chk_key _script_dir _sound_on +syn keyword tsaltSysVar _strip_high _swap_bs _telix_dir _up_dir +syn keyword tsaltSysVar _usage_fname _zmodauto _zmod_rcrash +syn keyword tsaltSysVar _zmod_scrash +"END PREDEFINED VARAIABLES + +"TYPE +syn keyword tsaltType str int +"END TYPE + +"KEYWORDS +syn keyword tsaltStatement goto break return continue +syn keyword tsaltConditional if then else +syn keyword tsaltRepeat while for do +"END KEYWORDS + +syn keyword tsaltTodo contained TODO + +" the rest is pretty close to C ----------------------------------------- + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match tsaltSpecial contained "\^\d\d\d\|\^." +syn region tsaltString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=tsaltSpecial +syn match tsaltCharacter "'[^\\]'" +syn match tsaltSpecialCharacter "'\\.'" + +"catch errors caused by wrong parenthesis +syn region tsaltParen transparent start='(' end=')' contains=ALLBUT,tsaltParenError,tsaltIncluded,tsaltSpecial,tsaltTodo +syn match tsaltParenError ")" +syn match tsaltInParen contained "[{}]" + +hi link tsaltParenError tsaltError +hi link tsaltInParen tsaltError + +"integer number, or floating point number without a dot and with "f". +syn match tsaltNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" +"floating point number, with dot, optional exponent +syn match tsaltFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, starting with a dot, optional exponent +syn match tsaltFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match tsaltFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" +"hex number +syn match tsaltNumber "0x[0-9a-f]\+\(u\=l\=\|lu\)\>" +"syn match cIdentifier "\<[a-z_][a-z0-9_]*\>" + +syn region tsaltComment start="/\*" end="\*/" contains=cTodo +syn match tsaltComment "//.*" contains=cTodo +syn match tsaltCommentError "\*/" + +syn region tsaltPreCondit start="^[ \t]*#[ \t]*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=tsaltComment,tsaltString,tsaltCharacter,tsaltNumber,tsaltCommentError +syn region tsaltIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match tsaltIncluded contained "<[^>]*>" +syn match tsaltInclude "^[ \t]*#[ \t]*include\>[ \t]*["<]" contains=tsaltIncluded +"syn match TelixSalyLineSkip "\\$" +syn region tsaltDefine start="^[ \t]*#[ \t]*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,tsaltPreCondit,tsaltIncluded,tsaltInclude,tsaltDefine,tsaltInParen +syn region tsaltPreProc start="^[ \t]*#[ \t]*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,tsaltPreCondit,tsaltIncluded,tsaltInclude,tsaltDefine,tsaltInParen + +" Highlight User Labels +syn region tsaltMulti transparent start='?' end=':' contains=ALLBUT,tsaltIncluded,tsaltSpecial,tsaltTodo + +syn sync ccomment tsaltComment + + +" 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_tsalt_syntax_inits") + if version < 508 + let did_tsalt_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink tsaltFunction Statement + HiLink tsaltSysVar Type + "HiLink tsaltLibFunc UserDefFunc + "HiLink tsaltConstants Type + "HiLink tsaltFuncArg Type + "HiLink tsaltOperator Operator + "HiLink tsaltLabel Label + "HiLink tsaltUserLabel Label + HiLink tsaltConditional Conditional + HiLink tsaltRepeat Repeat + HiLink tsaltCharacter SpecialChar + HiLink tsaltSpecialCharacter SpecialChar + HiLink tsaltNumber Number + HiLink tsaltFloat Float + HiLink tsaltCommentError tsaltError + HiLink tsaltInclude Include + HiLink tsaltPreProc PreProc + HiLink tsaltDefine Macro + HiLink tsaltIncluded tsaltString + HiLink tsaltError Error + HiLink tsaltStatement Statement + HiLink tsaltPreCondit PreCondit + HiLink tsaltType Type + HiLink tsaltString String + HiLink tsaltComment Comment + HiLink tsaltSpecial Special + HiLink tsaltTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "tsalt" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/tsscl.vim b/vim/bundle/ubuntu-vim72/syntax/tsscl.vim new file mode 100644 index 0000000..3fc18c6 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/tsscl.vim @@ -0,0 +1,217 @@ +" Vim syntax file +" Language: TSS (Thermal Synthesizer System) Command Line +" Maintainer: Adrian Nagle, anagle@ball.com +" Last Change: 2003 May 11 +" Filenames: *.tsscl +" URL: http://www.naglenet.org/vim/syntax/tsscl.vim +" MAIN URL: http://www.naglenet.org/vim/ + + + +" 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 + + + +" Ignore case +syn case ignore + + + +" +" +" Begin syntax definitions for tss geomtery file. +" + +" Load TSS geometry syntax file +"source $VIM/myvim/tssgm.vim +"source $VIMRUNTIME/syntax/c.vim + +" Define keywords for TSS +syn keyword tssclCommand begin radk list heatrates attr draw + +syn keyword tssclKeyword cells rays error nodes levels objects cpu +syn keyword tssclKeyword units length positions energy time unit solar +syn keyword tssclKeyword solar_constant albedo planet_power + +syn keyword tssclEnd exit + +syn keyword tssclUnits cm feet meters inches +syn keyword tssclUnits Celsius Kelvin Fahrenheit Rankine + + + +" Define matches for TSS +syn match tssclString /"[^"]\+"/ contains=ALLBUT,tssInteger,tssclKeyword,tssclCommand,tssclEnd,tssclUnits + +syn match tssclComment "#.*$" + +" rational and logical operators +" < Less than +" > Greater than +" <= Less than or equal +" >= Greater than or equal +" == or = Equal to +" != Not equal to +" && or & Logical AND +" || or | Logical OR +" ! Logical NOT +" +" algebraic operators: +" ^ or ** Exponentation +" * Multiplication +" / Division +" % Remainder +" + Addition +" - Subtraction +" +syn match tssclOper "||\||\|&&\|&\|!=\|!\|>=\|<=\|>\|<\|+\|-\|^\|\*\*\|\*\|/\|%\|==\|=\|\." skipwhite + +" CLI Directive Commands, with arguments +" +" BASIC COMMAND LIST +" *ADD input_source +" *ARITHMETIC { [ON] | OFF } +" *CLOSE unit_number +" *CPU +" *DEFINE +" *ECHO[/qualifiers] { [ON] | OFF } +" *ELSE [IF { 0 | 1 } ] +" *END { IF | WHILE } +" *EXIT +" *IF { 0 | 1 } +" *LIST/n list variable +" *OPEN[/r | /r+ | /w | /w+ ] unit_number file_name +" *PROMPT prompt_string sybol_name +" *READ/unit=unit_number[/LOCAL | /GLOBAL ] sym1 [sym2, [sym3 ...]] +" *REWIND +" *STOP +" *STRCMP string_1 string_2 difference +" *SYSTEM command +" *UNDEFINE[/LOCAL][/GLOBAL] symbol_name +" *WHILE { 0 | 1 } +" *WRITE[/unit=unit_number] output text +" +syn match tssclDirective "\*ADD" +syn match tssclDirective "\*ARITHMETIC \+\(ON\|OFF\)" +syn match tssclDirective "\*CLOSE" +syn match tssclDirective "\*CPU" +syn match tssclDirective "\*DEFINE" +syn match tssclDirective "\*ECHO" +syn match tssclConditional "\*ELSE" +syn match tssclConditional "\*END \+\(IF\|WHILE\)" +syn match tssclDirective "\*EXIT" +syn match tssclConditional "\*IF" +syn match tssclDirective "\*LIST" +syn match tssclDirective "\*OPEN" +syn match tssclDirective "\*PROMPT" +syn match tssclDirective "\*READ" +syn match tssclDirective "\*REWIND" +syn match tssclDirective "\*STOP" +syn match tssclDirective "\*STRCMP" +syn match tssclDirective "\*SYSTEM" +syn match tssclDirective "\*UNDEFINE" +syn match tssclConditional "\*WHILE" +syn match tssclDirective "\*WRITE" + +syn match tssclContChar "-$" + +" C library functoins +" Bessel functions (jn, yn) +" Error and complementary error fuctions (erf, erfc) +" Exponential functions (exp) +" Logrithm (log, log10) +" Power (pow) +" Square root (sqrt) +" Floor (floor) +" Ceiling (ceil) +" Floating point remainder (fmod) +" Floating point absolute value (fabs) +" Gamma (gamma) +" Euclidean distance function (hypot) +" Hperbolic functions (sinh, cosh, tanh) +" Trigometric functions in radians (sin, cos, tan, asin, acos, atan, atan2) +" Trigometric functions in degrees (sind, cosd, tand, asind, acosd, atand, +" atan2d) +" +" local varialbles: cl_arg1, cl_arg2, etc. (cl_arg is an array of arguments) +" cl_args is the number of arguments +" +" +" I/O: *PROMPT, *WRITE, *READ +" +" Conditional branching: +" IF, ELSE IF, END +" *IF value *IF I==10 +" *ELSE IF value *ELSE IF I<10 +" *ELSE *ELSE +" *ENDIF *ENDIF +" +" +" Iterative looping: +" WHILE +" *WHILE test +" ..... +" *END WHILE +" +" +" EXAMPLE: +" *DEFINE I = 1 +" *WHILE (I <= 10) +" *WRITE I = 'I' +" *DEFINE I = (I + 1) +" *END WHILE +" + +syn match tssclQualifier "/[^/ ]\+"hs=s+1 +syn match tssclSymbol "'\S\+'" +"syn match tssclSymbol2 " \S\+ " contained + +syn match tssclInteger "-\=\<[0-9]*\>" +syn match tssclFloat "-\=\<[0-9]*\.[0-9]*" +syn match tssclScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" + + + +" 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_tsscl_syntax_inits") + if version < 508 + let did_tsscl_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink tssclCommand Statement + HiLink tssclKeyword Special + HiLink tssclEnd Macro + HiLink tssclUnits Special + + HiLink tssclComment Comment + HiLink tssclDirective Statement + HiLink tssclConditional Conditional + HiLink tssclContChar Macro + HiLink tssclQualifier Typedef + HiLink tssclSymbol Identifier + HiLink tssclSymbol2 Symbol + HiLink tssclString String + HiLink tssclOper Operator + + HiLink tssclInteger Number + HiLink tssclFloat Number + HiLink tssclScientific Number + + delcommand HiLink +endif + + +let b:current_syntax = "tsscl" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/tssgm.vim b/vim/bundle/ubuntu-vim72/syntax/tssgm.vim new file mode 100644 index 0000000..b8182d4 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/tssgm.vim @@ -0,0 +1,111 @@ +" Vim syntax file +" Language: TSS (Thermal Synthesizer System) Geometry +" Maintainer: Adrian Nagle, anagle@ball.com +" Last Change: 2003 May 11 +" Filenames: *.tssgm +" URL: http://www.naglenet.org/vim/syntax/tssgm.vim +" MAIN URL: http://www.naglenet.org/vim/ + + + +" 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 + + + +" Ignore case +syn case ignore + + + +" +" +" Begin syntax definitions for tss geomtery file. +" + +" Define keywords for TSS +syn keyword tssgmParam units mirror param active sides submodel include +syn keyword tssgmParam iconductor nbeta ngamma optics material thickness color +syn keyword tssgmParam initial_temp +syn keyword tssgmParam initial_id node_ids node_add node_type +syn keyword tssgmParam gamma_boundaries gamma_add beta_boundaries +syn keyword tssgmParam p1 p2 p3 p4 p5 p6 rot1 rot2 rot3 tx ty tz + +syn keyword tssgmSurfType rectangle trapezoid disc ellipse triangle +syn keyword tssgmSurfType polygon cylinder cone sphere ellipic-cone +syn keyword tssgmSurfType ogive torus box paraboloid hyperboloid ellipsoid +syn keyword tssgmSurfType quadrilateral trapeziod + +syn keyword tssgmArgs OUT IN DOWN BOTH DOUBLE NONE SINGLE RADK CC FECC +syn keyword tssgmArgs white red blue green yellow orange violet pink +syn keyword tssgmArgs turquoise grey black +syn keyword tssgmArgs Arithmetic Boundary Heater + +syn keyword tssgmDelim assembly + +syn keyword tssgmEnd end + +syn keyword tssgmUnits cm feet meters inches +syn keyword tssgmUnits Celsius Kelvin Fahrenheit Rankine + + + +" Define matches for TSS +syn match tssgmDefault "^DEFAULT/LENGTH = \(ft\|in\|cm\|m\)" +syn match tssgmDefault "^DEFAULT/TEMP = [CKFR]" + +syn match tssgmComment /comment \+= \+".*"/ contains=tssParam,tssgmCommentString +syn match tssgmCommentString /".*"/ contained + +syn match tssgmSurfIdent " \S\+\.\d\+ \=$" + +syn match tssgmString /"[^" ]\+"/ms=s+1,me=e-1 contains=ALLBUT,tssInteger + +syn match tssgmArgs / = [xyz],"/ms=s+3,me=e-2 + +syn match tssgmInteger "-\=\<[0-9]*\>" +syn match tssgmFloat "-\=\<[0-9]*\.[0-9]*" +syn match tssgmScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" + + + +" 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_tssgm_syntax_inits") + if version < 508 + let did_tssgm_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink tssgmParam Statement + HiLink tssgmSurfType Type + HiLink tssgmArgs Special + HiLink tssgmDelim Typedef + HiLink tssgmEnd Macro + HiLink tssgmUnits Special + + HiLink tssgmDefault SpecialComment + HiLink tssgmComment Statement + HiLink tssgmCommentString Comment + HiLink tssgmSurfIdent Identifier + HiLink tssgmString Delimiter + + HiLink tssgmInteger Number + HiLink tssgmFloat Float + HiLink tssgmScientific Float + + delcommand HiLink +endif + + +let b:current_syntax = "tssgm" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/tssop.vim b/vim/bundle/ubuntu-vim72/syntax/tssop.vim new file mode 100644 index 0000000..d416df0 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/tssop.vim @@ -0,0 +1,87 @@ +" Vim syntax file +" Language: TSS (Thermal Synthesizer System) Optics +" Maintainer: Adrian Nagle, anagle@ball.com +" Last Change: 2003 May 11 +" Filenames: *.tssop +" URL: http://www.naglenet.org/vim/syntax/tssop.vim +" MAIN URL: http://www.naglenet.org/vim/ + + + +" 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 + + + +" Ignore case +syn case ignore + + + +" +" +" Begin syntax definitions for tss optics file. +" + +" Define keywords for TSS +syn keyword tssopParam ir_eps ir_trans ir_spec ir_tspec ir_refract +syn keyword tssopParam sol_eps sol_trans sol_spec sol_tspec sol_refract +syn keyword tssopParam color + +"syn keyword tssopProp property + +syn keyword tssopArgs white red blue green yellow orange violet pink +syn keyword tssopArgs turquoise grey black + + + +" Define matches for TSS +syn match tssopComment /comment \+= \+".*"/ contains=tssopParam,tssopCommentString +syn match tssopCommentString /".*"/ contained + +syn match tssopProp "property " +syn match tssopProp "edit/optic " +syn match tssopPropName "^property \S\+" contains=tssopProp +syn match tssopPropName "^edit/optic \S\+$" contains=tssopProp + +syn match tssopInteger "-\=\<[0-9]*\>" +syn match tssopFloat "-\=\<[0-9]*\.[0-9]*" +syn match tssopScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" + + + +" 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_tssop_syntax_inits") + if version < 508 + let did_tssop_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink tssopParam Statement + HiLink tssopProp Identifier + HiLink tssopArgs Special + + HiLink tssopComment Statement + HiLink tssopCommentString Comment + HiLink tssopPropName Typedef + + HiLink tssopInteger Number + HiLink tssopFloat Float + HiLink tssopScientific Float + + delcommand HiLink +endif + + +let b:current_syntax = "tssop" + +" vim: ts=8 sw=2 diff --git a/vim/bundle/ubuntu-vim72/syntax/uc.vim b/vim/bundle/ubuntu-vim72/syntax/uc.vim new file mode 100644 index 0000000..7eab1d4 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/uc.vim @@ -0,0 +1,178 @@ +" Vim syntax file +" Language: UnrealScript +" Maintainer: Mark Ferrell +" URL: ftp://ftp.chaoticdreams.org/pub/ut/vim/uc.vim +" Credits: Based on the java.vim syntax file by Claudio Fleiner +" Last change: 2003 May 31 + +" Please check :help uc.vim for comments on some of the options available. + +" 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 + +" some characters that cannot be in a UnrealScript program (outside a string) +syn match ucError "[\\@`]" +syn match ucError "<<<\|\.\.\|=>\|<>\|||=\|&&=\|[^-]->\|\*\/" + +" we define it here so that included files can test for it +if !exists("main_syntax") + let main_syntax='uc' +endif + +syntax case ignore + +" keyword definitions +syn keyword ucBranch break continue +syn keyword ucConditional if else switch +syn keyword ucRepeat while for do foreach +syn keyword ucBoolean true false +syn keyword ucConstant null +syn keyword ucOperator new instanceof +syn keyword ucType boolean char byte short int long float double +syn keyword ucType void Pawn sound state auto exec function ipaddr +syn keyword ucType ELightType actor ammo defaultproperties bool +syn keyword ucType native noexport var out vector name local string +syn keyword ucType event +syn keyword ucStatement return +syn keyword ucStorageClass static synchronized transient volatile final +syn keyword ucMethodDecl synchronized throws + +" UnrealScript defines classes in sorta fscked up fashion +syn match ucClassDecl "^[Cc]lass[\s$]*\S*[\s$]*expands[\s$]*\S*;" contains=ucSpecial,ucSpecialChar,ucClassKeys +syn keyword ucClassKeys class expands extends +syn match ucExternal "^\#exec.*" contains=ucCommentString,ucNumber +syn keyword ucScopeDecl public protected private abstract + +" UnrealScript Functions +syn match ucFuncDef "^.*function\s*[\(]*" contains=ucType,ucStorageClass +syn match ucEventDef "^.*event\s*[\(]*" contains=ucType,ucStorageClass +syn match ucClassLabel "[a-zA-Z0-9]*\'[a-zA-Z0-9]*\'" contains=ucCharacter + +syn region ucLabelRegion transparent matchgroup=ucLabel start="\" matchgroup=NONE end=":" contains=ucNumber +syn match ucUserLabel "^\s*[_$a-zA-Z][_$a-zA-Z0-9_]*\s*:"he=e-1 contains=ucLabel +syn keyword ucLabel default + +" The following cluster contains all java groups except the contained ones +syn cluster ucTop contains=ucExternal,ucError,ucError,ucBranch,ucLabelRegion,ucLabel,ucConditional,ucRepeat,ucBoolean,ucConstant,ucTypedef,ucOperator,ucType,ucType,ucStatement,ucStorageClass,ucMethodDecl,ucClassDecl,ucClassDecl,ucClassDecl,ucScopeDecl,ucError,ucError2,ucUserLabel,ucClassLabel + +" Comments +syn keyword ucTodo contained TODO FIXME XXX +syn region ucCommentString contained start=+"+ end=+"+ end=+\*/+me=s-1,he=s-1 contains=ucSpecial,ucCommentStar,ucSpecialChar +syn region ucComment2String contained start=+"+ end=+$\|"+ contains=ucSpecial,ucSpecialChar +syn match ucCommentCharacter contained "'\\[^']\{1,6\}'" contains=ucSpecialChar +syn match ucCommentCharacter contained "'\\''" contains=ucSpecialChar +syn match ucCommentCharacter contained "'[^\\]'" +syn region ucComment start="/\*" end="\*/" contains=ucCommentString,ucCommentCharacter,ucNumber,ucTodo +syn match ucCommentStar contained "^\s*\*[^/]"me=e-1 +syn match ucCommentStar contained "^\s*\*$" +syn match ucLineComment "//.*" contains=ucComment2String,ucCommentCharacter,ucNumber,ucTodo +hi link ucCommentString ucString +hi link ucComment2String ucString +hi link ucCommentCharacter ucCharacter + +syn cluster ucTop add=ucComment,ucLineComment + +" match the special comment /**/ +syn match ucComment "/\*\*/" + +" Strings and constants +syn match ucSpecialError contained "\\." +"syn match ucSpecialCharError contained "[^']" +syn match ucSpecialChar contained "\\\([4-9]\d\|[0-3]\d\d\|[\"\\'ntbrf]\|u\x\{4\}\)" +syn region ucString start=+"+ end=+"+ contains=ucSpecialChar,ucSpecialError +syn match ucStringError +"\([^"\\]\|\\.\)*$+ +syn match ucCharacter "'[^']*'" contains=ucSpecialChar,ucSpecialCharError +syn match ucCharacter "'\\''" contains=ucSpecialChar +syn match ucCharacter "'[^\\]'" +syn match ucNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>" +syn match ucNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=" +syn match ucNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" +syn match ucNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>" + +" unicode characters +syn match ucSpecial "\\u\d\{4\}" + +syn cluster ucTop add=ucString,ucCharacter,ucNumber,ucSpecial,ucStringError + +" catch errors caused by wrong parenthesis +syn region ucParen transparent start="(" end=")" contains=@ucTop,ucParen +syn match ucParenError ")" +hi link ucParenError ucError + +if !exists("uc_minlines") + let uc_minlines = 10 +endif +exec "syn sync ccomment ucComment minlines=" . uc_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_uc_syntax_inits") + if version < 508 + let did_uc_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink ucFuncDef Conditional + HiLink ucEventDef Conditional + HiLink ucBraces Function + HiLink ucBranch Conditional + HiLink ucLabel Label + HiLink ucUserLabel Label + HiLink ucConditional Conditional + HiLink ucRepeat Repeat + HiLink ucStorageClass StorageClass + HiLink ucMethodDecl ucStorageClass + HiLink ucClassDecl ucStorageClass + HiLink ucScopeDecl ucStorageClass + HiLink ucBoolean Boolean + HiLink ucSpecial Special + HiLink ucSpecialError Error + HiLink ucSpecialCharError Error + HiLink ucString String + HiLink ucCharacter Character + HiLink ucSpecialChar SpecialChar + HiLink ucNumber Number + HiLink ucError Error + HiLink ucStringError Error + HiLink ucStatement Statement + HiLink ucOperator Operator + HiLink ucOverLoaded Operator + HiLink ucComment Comment + HiLink ucDocComment Comment + HiLink ucLineComment Comment + HiLink ucConstant ucBoolean + HiLink ucTypedef Typedef + HiLink ucTodo Todo + + HiLink ucCommentTitle SpecialComment + HiLink ucDocTags Special + HiLink ucDocParam Function + HiLink ucCommentStar ucComment + + HiLink ucType Type + HiLink ucExternal Include + + HiLink ucClassKeys Conditional + HiLink ucClassLabel Conditional + + HiLink htmlComment Special + HiLink htmlCommentPart Special + + delcommand HiLink +endif + +let b:current_syntax = "uc" + +if main_syntax == 'uc' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/udevconf.vim b/vim/bundle/ubuntu-vim72/syntax/udevconf.vim new file mode 100644 index 0000000..a294604 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/udevconf.vim @@ -0,0 +1,39 @@ +" Vim syntax file +" Language: udev(8) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword udevconfTodo contained TODO FIXME XXX NOTE + +syn region udevconfComment display oneline start='^\s*#' end='$' + \ contains=udevconfTodo,@Spell + +syn match udevconfBegin display '^' + \ nextgroup=udevconfVariable,udevconfComment + \ skipwhite + +syn keyword udevconfVariable contained udev_root udev_db udev_rules udev_log + \ nextgroup=udevconfVariableEq + +syn match udevconfVariableEq contained '[[:space:]=]' + \ nextgroup=udevconfString skipwhite + +syn region udevconfString contained display oneline start=+"+ end=+"+ + +hi def link udevconfTodo Todo +hi def link udevconfComment Comment +hi def link udevconfVariable Identifier +hi def link udevconfVariableEq Operator +hi def link udevconfString String + +let b:current_syntax = "udevconf" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/udevperm.vim b/vim/bundle/ubuntu-vim72/syntax/udevperm.vim new file mode 100644 index 0000000..9d3af09 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/udevperm.vim @@ -0,0 +1,69 @@ +" Vim syntax file +" Language: udev(8) permissions file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn match udevpermBegin display '^' nextgroup=udevpermDevice + +syn match udevpermDevice contained display '[^:]\+' + \ contains=udevpermPattern + \ nextgroup=udevpermUserColon + +syn match udevpermPattern contained '[*?]' +syn region udevpermPattern contained start='\[!\=' end='\]' + \ contains=udevpermPatRange + +syn match udevpermPatRange contained '[^[-]-[^]-]' + +syn match udevpermUserColon contained display ':' + \ nextgroup=udevpermUser + +syn match udevpermUser contained display '[^:]\+' + \ nextgroup=udevpermGroupColon + +syn match udevpermGroupColon contained display ':' + \ nextgroup=udevpermGroup + +syn match udevpermGroup contained display '[^:]\+' + \ nextgroup=udevpermPermColon + +syn match udevpermPermColon contained display ':' + \ nextgroup=udevpermPerm + +syn match udevpermPerm contained display '\<0\=\o\+\>' + \ contains=udevpermOctalZero + +syn match udevpermOctalZero contained display '\<0' +syn match udevpermOctalError contained display '\<0\o*[89]\d*\>' + +syn keyword udevpermTodo contained TODO FIXME XXX NOTE + +syn region udevpermComment display oneline start='^\s*#' end='$' + \ contains=udevpermTodo,@Spell + +hi def link udevpermTodo Todo +hi def link udevpermComment Comment +hi def link udevpermDevice String +hi def link udevpermPattern SpecialChar +hi def link udevpermPatRange udevpermPattern +hi def link udevpermColon Normal +hi def link udevpermUserColon udevpermColon +hi def link udevpermUser Identifier +hi def link udevpermGroupColon udevpermColon +hi def link udevpermGroup Type +hi def link udevpermPermColon udevpermColon +hi def link udevpermPerm Number +hi def link udevpermOctalZero PreProc +hi def link udevpermOctalError Error + +let b:current_syntax = "udevperm" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/udevrules.vim b/vim/bundle/ubuntu-vim72/syntax/udevrules.vim new file mode 100644 index 0000000..b04d728 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/udevrules.vim @@ -0,0 +1,171 @@ +" Vim syntax file +" Language: udev(8) rules file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-12-18 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" TODO: Line continuations. + +syn keyword udevrulesTodo contained TODO FIXME XXX NOTE + +syn region udevrulesComment display oneline start='^\s*#' end='$' + \ contains=udevrulesTodo,@Spell + +syn keyword udevrulesRuleKey ACTION DEVPATH KERNEL SUBSYSTEM KERNELS + \ SUBSYSTEMS DRIVERS RESULT + \ nextgroup=udevrulesRuleTest + \ skipwhite + +syn keyword udevrulesRuleKey ATTRS nextgroup=udevrulesAttrsPath + +syn region udevrulesAttrsPath display transparent + \ matchgroup=udevrulesDelimiter start='{' + \ matchgroup=udevrulesDelimiter end='}' + \ contains=udevrulesPath + \ nextgroup=udevrulesRuleTest + \ skipwhite + +syn keyword udevrulesRuleKey ENV nextgroup=udevrulesEnvVar + +syn region udevrulesEnvVar display transparent + \ matchgroup=udevrulesDelimiter start='{' + \ matchgroup=udevrulesDelimiter end='}' + \ contains=udevrulesVariable + \ nextgroup=udevrulesRuleTest,udevrulesRuleEq + \ skipwhite + +syn keyword udevrulesRuleKey PROGRAM RESULT + \ nextgroup=udevrulesEStringTest,udevrulesEStringEq + \ skipwhite + +syn keyword udevrulesAssignKey NAME SYMLINK OWNER GROUP RUN + \ nextgroup=udevrulesEStringEq + \ skipwhite + +syn keyword udevrulesAssignKey MODE LABEL GOTO WAIT_FOR_SYSFS + \ nextgroup=udevrulesRuleEq + \ skipwhite + +syn keyword udevrulesAssignKey ATTR nextgroup=udevrulesAttrsPath + +syn region udevrulesAttrKey display transparent + \ matchgroup=udevrulesDelimiter start='{' + \ matchgroup=udevrulesDelimiter end='}' + \ contains=udevrulesKey + \ nextgroup=udevrulesRuleEq + \ skipwhite + +syn keyword udevrulesAssignKey IMPORT nextgroup=udevrulesImport, + \ udevrulesEStringEq + \ skipwhite + +syn region udevrulesImport display transparent + \ matchgroup=udevrulesDelimiter start='{' + \ matchgroup=udevrulesDelimiter end='}' + \ contains=udevrulesImportType + \ nextgroup=udevrulesEStringEq + \ skipwhite + +syn keyword udevrulesImportType program file parent + +syn keyword udevrulesAssignKey OPTIONS + \ nextgroup=udevrulesOptionsEq + +syn match udevrulesPath contained display '[^}]\+' + +syn match udevrulesVariable contained display '[^}]\+' + +syn match udevrulesRuleTest contained display '[=!:]=' + \ nextgroup=udevrulesString skipwhite + +syn match udevrulesEStringTest contained display '[=!+:]=' + \ nextgroup=udevrulesEString skipwhite + +syn match udevrulesRuleEq contained display '+=\|=\ze[^=]' + \ nextgroup=udevrulesString skipwhite + +syn match udevrulesEStringEq contained '+=\|=\ze[^=]' + \ nextgroup=udevrulesEString skipwhite + +syn match udevrulesOptionsEq contained '+=\|=\ze[^=]' + \ nextgroup=udevrulesOptions skipwhite + +syn region udevrulesEString contained display oneline start=+"+ end=+"+ + \ contains=udevrulesStrEscapes,udevrulesStrVars + +syn match udevrulesStrEscapes contained '%[knpbMmcPrN%]' + +" TODO: This can actually stand alone (without {…}), so add a nextgroup here. +syn region udevrulesStrEscapes contained start='%c{' end='}' + \ contains=udevrulesStrNumber + +syn region udevrulesStrEscapes contained start='%s{' end='}' + \ contains=udevrulesPath + +syn region udevrulesStrEscapes contained start='%E{' end='}' + \ contains=udevrulesVariable + +syn match udevrulesStrNumber contained '\d\++\=' + +syn match udevrulesStrVars contained display '$\%(kernel\|number\|devpath\|id\|major\|minor\|result\|parent\|root\|tempnode\)\>' + +syn region udevrulesStrVars contained start='$attr{' end='}' + \ contains=udevrulesPath + +syn region udevrulesStrVars contained start='$env{' end='}' + \ contains=udevrulesVariable + +syn match udevrulesStrVars contained display '\$\$' + +syn region udevrulesString contained display oneline start=+"+ end=+"+ + \ contains=udevrulesPattern + +syn match udevrulesPattern contained '[*?]' +syn region udevrulesPattern contained start='\[!\=' end='\]' + \ contains=udevrulesPatRange + +syn match udevrulesPatRange contained '[^[-]-[^]-]' + +syn region udevrulesOptions contained display oneline start=+"+ end=+"+ + \ contains=udevrulesOption,udevrulesOptionSep + +syn keyword udevrulesOption contained last_rule ignore_device ignore_remove + \ all_partitions + +syn match udevrulesOptionSep contained ',' + +hi def link udevrulesTodo Todo +hi def link udevrulesComment Comment +hi def link udevrulesRuleKey Keyword +hi def link udevrulesDelimiter Delimiter +hi def link udevrulesAssignKey Identifier +hi def link udevrulesPath Identifier +hi def link udevrulesVariable Identifier +hi def link udevrulesAttrKey Identifier +" XXX: setting this to Operator makes for extremely intense highlighting. +hi def link udevrulesEq Normal +hi def link udevrulesRuleEq udevrulesEq +hi def link udevrulesEStringEq udevrulesEq +hi def link udevrulesOptionsEq udevrulesEq +hi def link udevrulesEString udevrulesString +hi def link udevrulesStrEscapes SpecialChar +hi def link udevrulesStrNumber Number +hi def link udevrulesStrVars Identifier +hi def link udevrulesString String +hi def link udevrulesPattern SpecialChar +hi def link udevrulesPatRange SpecialChar +hi def link udevrulesOptions udevrulesString +hi def link udevrulesOption Type +hi def link udevrulesOptionSep Delimiter +hi def link udevrulesImportType Type + +let b:current_syntax = "udevrules" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/uil.vim b/vim/bundle/ubuntu-vim72/syntax/uil.vim new file mode 100644 index 0000000..a439984 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/uil.vim @@ -0,0 +1,86 @@ +" Vim syntax file +" Language: Motif UIL (User Interface Language) +" Maintainer: Thomas Koehler +" Last Change: 2009 Dec 04 +" URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/vim/syntax/uil.vim + + +" Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" A bunch of useful keywords +syn keyword uilType arguments callbacks color +syn keyword uilType compound_string controls end +syn keyword uilType exported file include +syn keyword uilType module object procedure +syn keyword uilType user_defined xbitmapfile + +syn keyword uilTodo contained TODO + +" String and Character contstants +" Highlight special characters (those which have a backslash) differently +syn match uilSpecial contained "\\\d\d\d\|\\." +syn region uilString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=uilSpecial +syn match uilCharacter "'[^\\]'" +syn region uilString start=+'+ skip=+\\\\\|\\"+ end=+'+ contains=uilSpecial +syn match uilSpecialCharacter "'\\.'" +syn match uilSpecialStatement "Xm[^ =(){}]*" +syn match uilSpecialFunction "MrmNcreateCallback" +syn match uilRessource "XmN[^ =(){}]*" + +syn match uilNumber "-\=\<\d*\.\=\d\+\(e\=f\=\|[uU]\=[lL]\=\)\>" +syn match uilNumber "0[xX][0-9a-fA-F]\+\>" + +syn region uilComment start="/\*" end="\*/" contains=uilTodo +syn match uilComment "!.*" contains=uilTodo +syn match uilCommentError "\*/" + +syn region uilPreCondit start="^#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=uilComment,uilString,uilCharacter,uilNumber,uilCommentError +syn match uilIncluded contained "<[^>]*>" +syn match uilInclude "^#\s*include\s\+." contains=uilString,uilIncluded +syn match uilLineSkip "\\$" +syn region uilDefine start="^#\s*\(define\>\|undef\>\)" end="$" contains=uilLineSkip,uilComment,uilString,uilCharacter,uilNumber,uilCommentError + +syn sync ccomment uilComment + +" 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_uil_syn_inits") + if version < 508 + let did_uil_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " The default highlighting. + HiLink uilCharacter uilString + HiLink uilSpecialCharacter uilSpecial + HiLink uilNumber uilString + HiLink uilCommentError uilError + HiLink uilInclude uilPreCondit + HiLink uilDefine uilPreCondit + HiLink uilIncluded uilString + HiLink uilSpecialFunction uilRessource + HiLink uilRessource Identifier + HiLink uilSpecialStatement Keyword + HiLink uilError Error + HiLink uilPreCondit PreCondit + HiLink uilType Type + HiLink uilString String + HiLink uilComment Comment + HiLink uilSpecial Special + HiLink uilTodo Todo + + delcommand HiLink +endif + + +let b:current_syntax = "uil" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/updatedb.vim b/vim/bundle/ubuntu-vim72/syntax/updatedb.vim new file mode 100644 index 0000000..7c082d6 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/updatedb.vim @@ -0,0 +1,41 @@ +" Vim syntax file +" Language: updatedb.conf(5) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2009-05-25 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword updatedbTodo contained TODO FIXME XXX NOTE + +syn region updatedbComment display oneline start='^\s*#' end='$' + \ contains=updatedbTodo,@Spell + +syn match updatedbBegin display '^' + \ nextgroup=updatedbName,updatedbComment skipwhite + +syn keyword updatedbName contained + \ PRUNEFS + \ PRUNENAMES + \ PRUNEPATHS + \ PRUNE_BIND_MOUNTS + \ nextgroup=updatedbNameEq + +syn match updatedbNameEq contained display '=' nextgroup=updatedbValue + +syn region updatedbValue contained display oneline start='"' end='"' + +hi def link updatedbTodo Todo +hi def link updatedbComment Comment +hi def link updatedbName Identifier +hi def link updatedbNameEq Operator +hi def link updatedbValue String + +let b:current_syntax = "updatedb" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/vim/bundle/ubuntu-vim72/syntax/valgrind.vim b/vim/bundle/ubuntu-vim72/syntax/valgrind.vim new file mode 100644 index 0000000..f23b792 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/valgrind.vim @@ -0,0 +1,99 @@ +" Vim syntax file +" Language: Valgrind Memory Debugger Output +" Maintainer: Roger Luethi +" Program URL: http://devel-home.kde.org/~sewardj/ +" Last Change: 2002 Apr 07 +" +" Notes: mostly based on strace.vim and xml.vim + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case match +syn sync minlines=50 + +syn match valgrindSpecLine "^[+-]\{2}\d\+[+-]\{2}.*$" + +syn region valgrindRegion + \ start=+^==\z(\d\+\)== \w.*$+ + \ skip=+^==\z1==\( \| .*\)$+ + \ end=+^+ + \ fold + \ keepend + \ contains=valgrindPidChunk,valgrindLine + +syn region valgrindPidChunk + \ start=+\(^==\)\@<=+ + \ end=+\(==\)\@=+ + \ contained + \ contains=valgrindPid0,valgrindPid1,valgrindPid2,valgrindPid3,valgrindPid4,valgrindPid5,valgrindPid6,valgrindPid7,valgrindPid8,valgrindPid9 + \ keepend + +syn match valgrindPid0 "\d\+0=" contained +syn match valgrindPid1 "\d\+1=" contained +syn match valgrindPid2 "\d\+2=" contained +syn match valgrindPid3 "\d\+3=" contained +syn match valgrindPid4 "\d\+4=" contained +syn match valgrindPid5 "\d\+5=" contained +syn match valgrindPid6 "\d\+6=" contained +syn match valgrindPid7 "\d\+7=" contained +syn match valgrindPid8 "\d\+8=" contained +syn match valgrindPid9 "\d\+9=" contained + +syn region valgrindLine + \ start=+\(^==\d\+== \)\@<=+ + \ end=+$+ + \ keepend + \ contained + \ contains=valgrindOptions,valgrindMsg,valgrindLoc + +syn match valgrindOptions "[ ]\{3}-.*$" contained + +syn match valgrindMsg "\S.*$" contained + \ contains=valgrindError,valgrindNote,valgrindSummary +syn match valgrindError "\(Invalid\|\d\+ errors\|.* definitely lost\).*$" contained +syn match valgrindNote ".*still reachable.*" contained +syn match valgrindSummary ".*SUMMARY:" contained + +syn match valgrindLoc "\s\+\(by\|at\|Address\).*$" contained + \ contains=valgrindAt,valgrindAddr,valgrindFunc,valgrindBin,valgrindSrc +syn match valgrindAt "at\s\@=" contained +syn match valgrindAddr "\(\W\)\@<=0x\x\+" contained +syn match valgrindFunc "\(: \)\@<=\w\+" contained +syn match valgrindBin "\((\(with\|\)in \)\@<=\S\+\()\)\@=" contained +syn match valgrindSrc "\((\)\@<=.*:\d\+\()\)\@=" contained + +" Define the default highlighting + +hi def link valgrindSpecLine Type +"hi def link valgrindRegion Special + +hi def link valgrindPid0 Special +hi def link valgrindPid1 Comment +hi def link valgrindPid2 Type +hi def link valgrindPid3 Constant +hi def link valgrindPid4 Number +hi def link valgrindPid5 Identifier +hi def link valgrindPid6 Statement +hi def link valgrindPid7 Error +hi def link valgrindPid8 LineNr +hi def link valgrindPid9 Normal +"hi def link valgrindLine Special + +hi def link valgrindOptions Type +"hi def link valgrindMsg Special +"hi def link valgrindLoc Special + +hi def link valgrindError Special +hi def link valgrindNote Comment +hi def link valgrindSummary Type + +hi def link valgrindAt Special +hi def link valgrindAddr Number +hi def link valgrindFunc Type +hi def link valgrindBin Comment +hi def link valgrindSrc Statement + +let b:current_syntax = "valgrind" diff --git a/vim/bundle/ubuntu-vim72/syntax/vb.vim b/vim/bundle/ubuntu-vim72/syntax/vb.vim new file mode 100644 index 0000000..14f9e64 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/vb.vim @@ -0,0 +1,378 @@ +" Vim syntax file +" Language: Visual Basic +" Maintainer: Tim Chase +" Former Maintainer: Robert M. Cortopassi +" (tried multiple times to contact, but email bounced) +" Last Change: +" 2005 May 25 Synched with work by Thomas Barthel +" 2004 May 30 Added a few keywords + +" This was thrown together after seeing numerous requests on the +" VIM and VIM-DEV mailing lists. It is by no means complete. +" Send comments, suggestions and requests to the maintainer. + +" 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 + +" VB is case insensitive +syn case ignore + +syn keyword vbConditional If Then ElseIf Else Select Case + +syn keyword vbOperator AddressOf And ByRef ByVal Eqv Imp In +syn keyword vbOperator Is Like Mod Not Or To Xor + +syn match vbOperator "[()+.,\-/*=&]" +syn match vbOperator "[<>]=\=" +syn match vbOperator "<>" +syn match vbOperator "\s\+_$" + +syn keyword vbBoolean True False +syn keyword vbConst Null Nothing + +syn keyword vbRepeat Do For ForEach Loop Next +syn keyword vbRepeat Step To Until Wend While + +syn keyword vbEvents AccessKeyPress Activate ActiveRowChanged +syn keyword vbEvents AfterAddFile AfterChangeFileName AfterCloseFile +syn keyword vbEvents AfterColEdit AfterColUpdate AfterDelete +syn keyword vbEvents AfterInsert AfterLabelEdit AfterRemoveFile +syn keyword vbEvents AfterUpdate AfterWriteFile AmbientChanged +syn keyword vbEvents ApplyChanges Associate AsyncProgress +syn keyword vbEvents AsyncReadComplete AsyncReadProgress AxisActivated +syn keyword vbEvents AxisLabelActivated AxisLabelSelected +syn keyword vbEvents AxisLabelUpdated AxisSelected AxisTitleActivated +syn keyword vbEvents AxisTitleSelected AxisTitleUpdated AxisUpdated +syn keyword vbEvents BeforeClick BeforeColEdit BeforeColUpdate +syn keyword vbEvents BeforeConnect BeforeDelete BeforeInsert +syn keyword vbEvents BeforeLabelEdit BeforeLoadFile BeforeUpdate +syn keyword vbEvents BeginRequest BeginTrans ButtonClick +syn keyword vbEvents ButtonCompleted ButtonDropDown ButtonGotFocus +syn keyword vbEvents ButtonLostFocus CallbackKeyDown Change Changed +syn keyword vbEvents ChartActivated ChartSelected ChartUpdated Click +syn keyword vbEvents Close CloseQuery CloseUp ColEdit ColResize +syn keyword vbEvents Collapse ColumnClick CommitTrans Compare +syn keyword vbEvents ConfigChageCancelled ConfigChanged +syn keyword vbEvents ConfigChangedCancelled Connect ConnectionRequest +syn keyword vbEvents CurrentRecordChanged DECommandAdded +syn keyword vbEvents DECommandPropertyChanged DECommandRemoved +syn keyword vbEvents DEConnectionAdded DEConnectionPropertyChanged +syn keyword vbEvents DEConnectionRemoved DataArrival DataChanged +syn keyword vbEvents DataUpdated DateClicked DblClick Deactivate +syn keyword vbEvents DevModeChange DeviceArrival DeviceOtherEvent +syn keyword vbEvents DeviceQueryRemove DeviceQueryRemoveFailed +syn keyword vbEvents DeviceRemoveComplete DeviceRemovePending +syn keyword vbEvents Disconnect DisplayChanged Dissociate +syn keyword vbEvents DoGetNewFileName Done DonePainting DownClick +syn keyword vbEvents DragDrop DragOver DropDown EditProperty EditQuery +syn keyword vbEvents EndRequest EnterCell EnterFocus ExitFocus Expand +syn keyword vbEvents FontChanged FootnoteActivated FootnoteSelected +syn keyword vbEvents FootnoteUpdated Format FormatSize GotFocus +syn keyword vbEvents HeadClick HeightChanged Hide InfoMessage +syn keyword vbEvents IniProperties InitProperties Initialize +syn keyword vbEvents ItemActivated ItemAdded ItemCheck ItemClick +syn keyword vbEvents ItemReloaded ItemRemoved ItemRenamed +syn keyword vbEvents ItemSeletected KeyDown KeyPress KeyUp LeaveCell +syn keyword vbEvents LegendActivated LegendSelected LegendUpdated +syn keyword vbEvents LinkClose LinkError LinkExecute LinkNotify +syn keyword vbEvents LinkOpen Load LostFocus MouseDown MouseMove +syn keyword vbEvents MouseUp NodeCheck NodeClick OLECompleteDrag +syn keyword vbEvents OLEDragDrop OLEDragOver OLEGiveFeedback OLESetData +syn keyword vbEvents OLEStartDrag ObjectEvent ObjectMove OnAddNew +syn keyword vbEvents OnComm Paint PanelClick PanelDblClick PathChange +syn keyword vbEvents PatternChange PlotActivated PlotSelected +syn keyword vbEvents PlotUpdated PointActivated PointLabelActivated +syn keyword vbEvents PointLabelSelected PointLabelUpdated PointSelected +syn keyword vbEvents PointUpdated PowerQuerySuspend PowerResume +syn keyword vbEvents PowerStatusChanged PowerSuspend ProcessTag +syn keyword vbEvents ProcessingTimeout QueryChangeConfig QueryClose +syn keyword vbEvents QueryComplete QueryCompleted QueryTimeout +syn keyword vbEvents QueryUnload ReadProperties RepeatedControlLoaded +syn keyword vbEvents RepeatedControlUnloaded Reposition +syn keyword vbEvents RequestChangeFileName RequestWriteFile Resize +syn keyword vbEvents ResultsChanged RetainedProject RollbackTrans +syn keyword vbEvents RowColChange RowCurrencyChange RowResize +syn keyword vbEvents RowStatusChanged Scroll SelChange SelectionChanged +syn keyword vbEvents SendComplete SendProgress SeriesActivated +syn keyword vbEvents SeriesSelected SeriesUpdated SettingChanged Show +syn keyword vbEvents SplitChange Start StateChanged StatusUpdate +syn keyword vbEvents SysColorsChanged Terminate TimeChanged Timer +syn keyword vbEvents TitleActivated TitleSelected TitleUpdated +syn keyword vbEvents UnboundAddData UnboundDeleteRow +syn keyword vbEvents UnboundGetRelativeBookmark UnboundReadData +syn keyword vbEvents UnboundWriteData Unformat Unload UpClick Updated +syn keyword vbEvents UserEvent Validate ValidationError +syn keyword vbEvents VisibleRecordChanged WillAssociate WillChangeData +syn keyword vbEvents WillDissociate WillExecute WillUpdateRows +syn keyword vbEvents WriteProperties + + +syn keyword vbFunction Abs Array Asc AscB AscW Atn Avg BOF CBool CByte +syn keyword vbFunction CCur CDate CDbl CInt CLng CSng CStr CVDate CVErr +syn keyword vbFunction CVar CallByName Cdec Choose Chr ChrB ChrW Command +syn keyword vbFunction Cos Count CreateObject CurDir DDB Date DateAdd +syn keyword vbFunction DateDiff DatePart DateSerial DateValue Day Dir +syn keyword vbFunction DoEvents EOF Environ Error Exp FV FileAttr +syn keyword vbFunction FileDateTime FileLen FilterFix Fix Format +syn keyword vbFunction FormatCurrency FormatDateTime FormatNumber +syn keyword vbFunction FormatPercent FreeFile GetAllStrings GetAttr +syn keyword vbFunction GetAutoServerSettings GetObject GetSetting Hex +syn keyword vbFunction Hour IIf IMEStatus IPmt InStr Input InputB +syn keyword vbFunction InputBox InstrB Int IsArray IsDate IsEmpty IsError +syn keyword vbFunction IsMissing IsNull IsNumeric IsObject Join LBound +syn keyword vbFunction LCase LOF LTrim Left LeftB Len LenB LoadPicture +syn keyword vbFunction LoadResData LoadResPicture LoadResString Loc Log +syn keyword vbFunction MIRR Max Mid MidB Min Minute Month MonthName +syn keyword vbFunction MsgBox NPV NPer Now Oct PPmt PV Partition Pmt +syn keyword vbFunction QBColor RGB RTrim Rate Replace Right RightB Rnd +syn keyword vbFunction Round SLN SYD Second Seek Sgn Shell Sin Space Spc +syn keyword vbFunction Split Sqr StDev StDevP Str StrComp StrConv +syn keyword vbFunction StrReverse String Sum Switch Tab Tan Time +syn keyword vbFunction TimeSerial TimeValue Timer Trim TypeName UBound +syn keyword vbFunction UCase Val Var VarP VarType Weekday WeekdayName +syn keyword vbFunction Year + +syn keyword vbMethods AboutBox Accept Activate Add AddCustom AddFile +syn keyword vbMethods AddFromFile AddFromGuid AddFromString +syn keyword vbMethods AddFromTemplate AddItem AddNew AddToAddInToolbar +syn keyword vbMethods AddToolboxProgID Append AppendAppendChunk +syn keyword vbMethods AppendChunk Arrange Assert AsyncRead BatchUpdate +syn keyword vbMethods BeginQueryEdit BeginTrans Bind BuildPath +syn keyword vbMethods CanPropertyChange Cancel CancelAsyncRead +syn keyword vbMethods CancelBatch CancelUpdate CaptureImage CellText +syn keyword vbMethods CellValue Circle Clear ClearFields ClearSel +syn keyword vbMethods ClearSelCols ClearStructure Clone Close Cls +syn keyword vbMethods ColContaining CollapseAll ColumnSize CommitTrans +syn keyword vbMethods CompactDatabase Compose Connect Copy CopyFile +syn keyword vbMethods CopyFolder CopyQueryDef Count CreateDatabase +syn keyword vbMethods CreateDragImage CreateEmbed CreateField +syn keyword vbMethods CreateFolder CreateGroup CreateIndex CreateLink +syn keyword vbMethods CreatePreparedStatement CreatePropery CreateQuery +syn keyword vbMethods CreateQueryDef CreateRelation CreateTableDef +syn keyword vbMethods CreateTextFile CreateToolWindow CreateUser +syn keyword vbMethods CreateWorkspace Customize Cut Delete +syn keyword vbMethods DeleteColumnLabels DeleteColumns DeleteFile +syn keyword vbMethods DeleteFolder DeleteLines DeleteRowLabels +syn keyword vbMethods DeleteRows DeselectAll DesignerWindow DoVerb Drag +syn keyword vbMethods Draw DriveExists Edit EditCopy EditPaste EndDoc +syn keyword vbMethods EnsureVisible EstablishConnection Execute Exists +syn keyword vbMethods Expand Export ExportReport ExtractIcon Fetch +syn keyword vbMethods FetchVerbs FileExists Files FillCache Find +syn keyword vbMethods FindFirst FindItem FindLast FindNext FindPrevious +syn keyword vbMethods FolderExists Forward GetAbsolutePathName +syn keyword vbMethods GetBaseName GetBookmark GetChunk GetClipString +syn keyword vbMethods GetData GetDrive GetDriveName GetFile GetFileName +syn keyword vbMethods GetFirstVisible GetFolder GetFormat GetHeader +syn keyword vbMethods GetLineFromChar GetNumTicks GetParentFolderName +syn keyword vbMethods GetRows GetSelectedPart GetSelection +syn keyword vbMethods GetSpecialFolder GetTempName GetText +syn keyword vbMethods GetVisibleCount GoBack GoForward Hide HitTest +syn keyword vbMethods HoldFields Idle Import InitializeLabels Insert +syn keyword vbMethods InsertColumnLabels InsertColumns InsertFile +syn keyword vbMethods InsertLines InsertObjDlg InsertRowLabels +syn keyword vbMethods InsertRows Item Keys KillDoc Layout Line Lines +syn keyword vbMethods LinkExecute LinkPoke LinkRequest LinkSend Listen +syn keyword vbMethods LoadFile LoadResData LoadResPicture LoadResString +syn keyword vbMethods LogEvent MakeCompileFile MakeCompiledFile +syn keyword vbMethods MakeReplica MoreResults Move MoveData MoveFile +syn keyword vbMethods MoveFirst MoveFolder MoveLast MoveNext +syn keyword vbMethods MovePrevious NavigateTo NewPage NewPassword +syn keyword vbMethods NextRecordset OLEDrag OnAddinsUpdate OnConnection +syn keyword vbMethods OnDisconnection OnStartupComplete Open +syn keyword vbMethods OpenAsTextStream OpenConnection OpenDatabase +syn keyword vbMethods OpenQueryDef OpenRecordset OpenResultset OpenURL +syn keyword vbMethods Overlay PSet PaintPicture PastSpecialDlg Paste +syn keyword vbMethods PeekData Play Point PopulatePartial PopupMenu +syn keyword vbMethods Print PrintForm PrintReport PropertyChanged Quit +syn keyword vbMethods Raise RandomDataFill RandomFillColumns +syn keyword vbMethods RandomFillRows ReFill Read ReadAll ReadFromFile +syn keyword vbMethods ReadLine ReadProperty Rebind Refresh RefreshLink +syn keyword vbMethods RegisterDatabase ReleaseInstance Reload Remove +syn keyword vbMethods RemoveAddInFromToolbar RemoveAll RemoveItem Render +syn keyword vbMethods RepairDatabase ReplaceLine Reply ReplyAll Requery +syn keyword vbMethods ResetCustom ResetCustomLabel ResolveName +syn keyword vbMethods RestoreToolbar Resync Rollback RollbackTrans +syn keyword vbMethods RowBookmark RowContaining RowTop Save SaveAs +syn keyword vbMethods SaveFile SaveToFile SaveToOle1File SaveToolbar +syn keyword vbMethods Scale ScaleX ScaleY Scroll SelPrint SelectAll +syn keyword vbMethods SelectPart Send SendData Set SetAutoServerSettings +syn keyword vbMethods SetData SetFocus SetOption SetSelection SetSize +syn keyword vbMethods SetText SetViewport Show ShowColor ShowFont +syn keyword vbMethods ShowHelp ShowOpen ShowPrinter ShowSave +syn keyword vbMethods ShowWhatsThis SignOff SignOn Size Skip SkipLine +syn keyword vbMethods Span Split SplitContaining StartLabelEdit +syn keyword vbMethods StartLogging Stop Synchronize Tag TextHeight +syn keyword vbMethods TextWidth ToDefaults Trace TwipsToChartPart +syn keyword vbMethods TypeByChartType URLFor Update UpdateControls +syn keyword vbMethods UpdateRecord UpdateRow Upto ValidateControls Value +syn keyword vbMethods WhatsThisMode Write WriteBlankLines WriteLine +syn keyword vbMethods WriteProperty WriteTemplate ZOrder +syn keyword vbMethods rdoCreateEnvironment rdoRegisterDataSource + +syn keyword vbStatement Alias AppActivate As Base Beep Begin Call ChDir +syn keyword vbStatement ChDrive Close Const Date Declare DefBool DefByte +syn keyword vbStatement DefCur DefDate DefDbl DefDec DefInt DefLng DefObj +syn keyword vbStatement DefSng DefStr DefVar Deftype DeleteSetting Dim Do +syn keyword vbStatement Each ElseIf End Enum Erase Error Event Exit +syn keyword vbStatement Explicit FileCopy For ForEach Function Get GoSub +syn keyword vbStatement GoTo Gosub Implements Kill LSet Let Lib LineInput +syn keyword vbStatement Load Lock Loop Mid MkDir Name Next On OnError Open +syn keyword vbStatement Option Preserve Private Property Public Put RSet +syn keyword vbStatement RaiseEvent Randomize ReDim Redim Rem Reset Resume +syn keyword vbStatement Return RmDir SavePicture SaveSetting Seek SendKeys +syn keyword vbStatement Sendkeys Set SetAttr Static Step Stop Sub Time +syn keyword vbStatement Type Unload Unlock Until Wend While Width With +syn keyword vbStatement Write + +syn keyword vbKeyword As Binary ByRef ByVal Date Empty Error Friend Get +syn keyword vbKeyword Input Is Len Lock Me Mid New Nothing Null On +syn keyword vbKeyword Option Optional ParamArray Print Private Property +syn keyword vbKeyword Public PublicNotCreateable OnNewProcessSingleUse +syn keyword vbKeyword InSameProcessMultiUse GlobalMultiUse Resume Seek +syn keyword vbKeyword Set Static Step String Time WithEvents + +syn keyword vbTodo contained TODO + +"Datatypes +syn keyword vbTypes Boolean Byte Currency Date Decimal Double Empty +syn keyword vbTypes Integer Long Object Single String Variant + +"VB defined values +syn keyword vbDefine dbBigInt dbBinary dbBoolean dbByte dbChar +syn keyword vbDefine dbCurrency dbDate dbDecimal dbDouble dbFloat +syn keyword vbDefine dbGUID dbInteger dbLong dbLongBinary dbMemo +syn keyword vbDefine dbNumeric dbSingle dbText dbTime dbTimeStamp +syn keyword vbDefine dbVarBinary + +"VB defined values +syn keyword vbDefine vb3DDKShadow vb3DFace vb3DHighlight vb3DLight +syn keyword vbDefine vb3DShadow vbAbort vbAbortRetryIgnore +syn keyword vbDefine vbActiveBorder vbActiveTitleBar vbAlias +syn keyword vbDefine vbApplicationModal vbApplicationWorkspace +syn keyword vbDefine vbAppTaskManager vbAppWindows vbArchive vbArray +syn keyword vbDefine vbBack vbBinaryCompare vbBlack vbBlue vbBoolean +syn keyword vbDefine vbButtonFace vbButtonShadow vbButtonText vbByte +syn keyword vbDefine vbCalGreg vbCalHijri vbCancel vbCr vbCritical +syn keyword vbDefine vbCrLf vbCurrency vbCyan vbDatabaseCompare +syn keyword vbDefine vbDataObject vbDate vbDecimal vbDefaultButton1 +syn keyword vbDefine vbDefaultButton2 vbDefaultButton3 vbDefaultButton4 +syn keyword vbDefine vbDesktop vbDirectory vbDouble vbEmpty vbError +syn keyword vbDefine vbExclamation vbFirstFourDays vbFirstFullWeek +syn keyword vbDefine vbFirstJan1 vbFormCode vbFormControlMenu +syn keyword vbDefine vbFormFeed vbFormMDIForm vbFriday vbFromUnicode +syn keyword vbDefine vbGrayText vbGreen vbHidden vbHide vbHighlight +syn keyword vbDefine vbHighlightText vbHiragana vbIgnore vbIMEAlphaDbl +syn keyword vbDefine vbIMEAlphaSng vbIMEDisable vbIMEHiragana +syn keyword vbDefine vbIMEKatakanaDbl vbIMEKatakanaSng vbIMEModeAlpha +syn keyword vbDefine vbIMEModeAlphaFull vbIMEModeDisable +syn keyword vbDefine vbIMEModeHangul vbIMEModeHangulFull +syn keyword vbDefine vbIMEModeHiragana vbIMEModeKatakana +syn keyword vbDefine vbIMEModeKatakanaHalf vbIMEModeNoControl +syn keyword vbDefine vbIMEModeOff vbIMEModeOn vbIMENoOp vbIMEOff +syn keyword vbDefine vbIMEOn vbInactiveBorder vbInactiveCaptionText +syn keyword vbDefine vbInactiveTitleBar vbInfoBackground vbInformation +syn keyword vbDefine vbInfoText vbInteger vbKatakana vbKey0 vbKey1 +syn keyword vbDefine vbKey2 vbKey3 vbKey4 vbKey5 vbKey6 vbKey7 vbKey8 +syn keyword vbDefine vbKey9 vbKeyA vbKeyAdd vbKeyB vbKeyBack vbKeyC +syn keyword vbDefine vbKeyCancel vbKeyCapital vbKeyClear vbKeyControl +syn keyword vbDefine vbKeyD vbKeyDecimal vbKeyDelete vbKeyDivide +syn keyword vbDefine vbKeyDown vbKeyE vbKeyEnd vbKeyEscape vbKeyExecute +syn keyword vbDefine vbKeyF vbKeyF1 vbKeyF10 vbKeyF11 vbKeyF12 vbKeyF13 +syn keyword vbDefine vbKeyF14 vbKeyF15 vbKeyF16 vbKeyF2 vbKeyF3 vbKeyF4 +syn keyword vbDefine vbKeyF5 vbKeyF6 vbKeyF7 vbKeyF8 vbKeyF9 vbKeyG +syn keyword vbDefine vbKeyH vbKeyHelp vbKeyHome vbKeyI vbKeyInsert +syn keyword vbDefine vbKeyJ vbKeyK vbKeyL vbKeyLButton vbKeyLeft vbKeyM +syn keyword vbDefine vbKeyMButton vbKeyMenu vbKeyMultiply vbKeyN +syn keyword vbDefine vbKeyNumlock vbKeyNumpad0 vbKeyNumpad1 +syn keyword vbDefine vbKeyNumpad2 vbKeyNumpad3 vbKeyNumpad4 +syn keyword vbDefine vbKeyNumpad5 vbKeyNumpad6 vbKeyNumpad7 +syn keyword vbDefine vbKeyNumpad8 vbKeyNumpad9 vbKeyO vbKeyP +syn keyword vbDefine vbKeyPageDown vbKeyPageUp vbKeyPause vbKeyPrint +syn keyword vbDefine vbKeyQ vbKeyR vbKeyRButton vbKeyReturn vbKeyRight +syn keyword vbDefine vbKeyS vbKeySelect vbKeySeparator vbKeyShift +syn keyword vbDefine vbKeySnapshot vbKeySpace vbKeySubtract vbKeyT +syn keyword vbDefine vbKeyTab vbKeyU vbKeyUp vbKeyV vbKeyW vbKeyX +syn keyword vbDefine vbKeyY vbKeyZ vbLf vbLong vbLowerCase vbMagenta +syn keyword vbDefine vbMaximizedFocus vbMenuBar vbMenuText +syn keyword vbDefine vbMinimizedFocus vbMinimizedNoFocus vbMonday +syn keyword vbDefine vbMsgBox vbMsgBoxHelpButton vbMsgBoxRight +syn keyword vbDefine vbMsgBoxRtlReading vbMsgBoxSetForeground +syn keyword vbDefine vbMsgBoxText vbNarrow vbNewLine vbNo vbNormal +syn keyword vbDefine vbNormalFocus vbNormalNoFocus vbNull vbNullChar +syn keyword vbDefine vbNullString vbObject vbObjectError vbOK +syn keyword vbDefine vbOKCancel vbOKOnly vbProperCase vbQuestion +syn keyword vbDefine vbReadOnly vbRed vbRetry vbRetryCancel vbSaturday +syn keyword vbDefine vbScrollBars vbSingle vbString vbSunday vbSystem +syn keyword vbDefine vbSystemModal vbTab vbTextCompare vbThursday +syn keyword vbDefine vbTitleBarText vbTuesday vbUnicode vbUpperCase +syn keyword vbDefine vbUseSystem vbUseSystemDayOfWeek vbVariant +syn keyword vbDefine vbVerticalTab vbVolume vbWednesday vbWhite vbWide +syn keyword vbDefine vbWindowBackground vbWindowFrame vbWindowText +syn keyword vbDefine vbYellow vbYes vbYesNo vbYesNoCancel + +"Numbers +"integer number, or floating point number without a dot. +syn match vbNumber "\<\d\+\>" +"floating point number, with dot +syn match vbNumber "\<\d\+\.\d*\>" +"floating point number, starting with a dot +syn match vbNumber "\.\d\+\>" +"syn match vbNumber "{[[:xdigit:]-]\+}\|&[hH][[:xdigit:]]\+&" +"syn match vbNumber ":[[:xdigit:]]\+" +"syn match vbNumber "[-+]\=\<\d\+\>" +syn match vbFloat "[-+]\=\<\d\+[eE][\-+]\=\d\+" +syn match vbFloat "[-+]\=\<\d\+\.\d*\([eE][\-+]\=\d\+\)\=" +syn match vbFloat "[-+]\=\<\.\d\+\([eE][\-+]\=\d\+\)\=" + +" String and Character contstants +syn region vbString start=+"+ end=+"\|$+ +syn region vbComment start="\(^\|\s\)REM\s" end="$" contains=vbTodo +syn region vbComment start="\(^\|\s\)\'" end="$" contains=vbTodo +syn match vbLineNumber "^\d\+\(\s\|$\)" +syn match vbTypeSpecifier "[a-zA-Z0-9][\$%&!#]"ms=s+1 +syn match vbTypeSpecifier "#[a-zA-Z0-9]"me=e-1 + +" 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_vb_syntax_inits") + if version < 508 + let did_vb_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink vbBoolean Boolean + HiLink vbLineNumber Comment + HiLink vbComment Comment + HiLink vbConditional Conditional + HiLink vbConst Constant + HiLink vbDefine Constant + HiLink vbError Error + HiLink vbFunction Identifier + HiLink vbIdentifier Identifier + HiLink vbNumber Number + HiLink vbFloat Float + HiLink vbMethods PreProc + HiLink vbOperator Operator + HiLink vbRepeat Repeat + HiLink vbString String + HiLink vbStatement Statement + HiLink vbKeyword Statement + HiLink vbEvents Special + HiLink vbTodo Todo + HiLink vbTypes Type + HiLink vbTypeSpecifier Type + + delcommand HiLink +endif + +let b:current_syntax = "vb" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/vera.vim b/vim/bundle/ubuntu-vim72/syntax/vera.vim new file mode 100644 index 0000000..b8e25cf --- /dev/null +++ b/vim/bundle/ubuntu-vim72/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 "[&|\~>" +" "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\=\\\@" + +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 + else + command -nargs=+ HiLink hi def link + 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/vim/bundle/ubuntu-vim72/syntax/verilog.vim b/vim/bundle/ubuntu-vim72/syntax/verilog.vim new file mode 100644 index 0000000..01f312f --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/verilog.vim @@ -0,0 +1,134 @@ +" Vim syntax file +" Language: Verilog +" Maintainer: Mun Johl +" Last Update: Fri Oct 13 11:44:32 PDT 2006 + +" 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 + +" Set the local value of the 'iskeyword' option +if version >= 600 + setlocal iskeyword=@,48-57,_,192-255 +else + set iskeyword=@,48-57,_,192-255 +endif + +" A bunch of useful Verilog keywords + +syn keyword verilogStatement always and assign automatic buf +syn keyword verilogStatement bufif0 bufif1 cell cmos +syn keyword verilogStatement config deassign defparam design +syn keyword verilogStatement disable edge endconfig +syn keyword verilogStatement endfunction endgenerate endmodule +syn keyword verilogStatement endprimitive endspecify endtable endtask +syn keyword verilogStatement event force function +syn keyword verilogStatement generate genvar highz0 highz1 ifnone +syn keyword verilogStatement incdir include initial inout input +syn keyword verilogStatement instance integer large liblist +syn keyword verilogStatement library localparam macromodule medium +syn keyword verilogStatement module nand negedge nmos nor +syn keyword verilogStatement noshowcancelled not notif0 notif1 or +syn keyword verilogStatement output parameter pmos posedge primitive +syn keyword verilogStatement pull0 pull1 pulldown pullup +syn keyword verilogStatement pulsestyle_onevent pulsestyle_ondetect +syn keyword verilogStatement rcmos real realtime reg release +syn keyword verilogStatement rnmos rpmos rtran rtranif0 rtranif1 +syn keyword verilogStatement scalared showcancelled signed small +syn keyword verilogStatement specify specparam strong0 strong1 +syn keyword verilogStatement supply0 supply1 table task time tran +syn keyword verilogStatement tranif0 tranif1 tri tri0 tri1 triand +syn keyword verilogStatement trior trireg unsigned use vectored wait +syn keyword verilogStatement wand weak0 weak1 wire wor xnor xor +syn keyword verilogLabel begin end fork join +syn keyword verilogConditional if else case casex casez default endcase +syn keyword verilogRepeat forever repeat while for + +syn keyword verilogTodo contained TODO + +syn match verilogOperator "[&|~>" +syn match verilogGlobal "`celldefine" +syn match verilogGlobal "`default_nettype" +syn match verilogGlobal "`define" +syn match verilogGlobal "`else" +syn match verilogGlobal "`elsif" +syn match verilogGlobal "`endcelldefine" +syn match verilogGlobal "`endif" +syn match verilogGlobal "`ifdef" +syn match verilogGlobal "`ifndef" +syn match verilogGlobal "`include" +syn match verilogGlobal "`line" +syn match verilogGlobal "`nounconnected_drive" +syn match verilogGlobal "`resetall" +syn match verilogGlobal "`timescale" +syn match verilogGlobal "`unconnected_drive" +syn match verilogGlobal "`undef" +syn match verilogGlobal "$[a-zA-Z0-9_]\+\>" + +syn match verilogConstant "\<[A-Z][A-Z0-9_]\+\>" + +syn match verilogNumber "\(\<\d\+\|\)'[sS]\?[bB]\s*[0-1_xXzZ?]\+\>" +syn match verilogNumber "\(\<\d\+\|\)'[sS]\?[oO]\s*[0-7_xXzZ?]\+\>" +syn match verilogNumber "\(\<\d\+\|\)'[sS]\?[dD]\s*[0-9_xXzZ?]\+\>" +syn match verilogNumber "\(\<\d\+\|\)'[sS]\?[hH]\s*[0-9a-fA-F_xXzZ?]\+\>" +syn match verilogNumber "\<[+-]\=[0-9_]\+\(\.[0-9_]*\|\)\(e[0-9_]*\|\)\>" + +syn region verilogString start=+"+ skip=+\\"+ end=+"+ contains=verilogEscape,@Spell +syn match verilogEscape +\\[nt"\\]+ contained +syn match verilogEscape "\\\o\o\=\o\=" contained + +" Directives +syn match verilogDirective "//\s*synopsys\>.*$" +syn region verilogDirective start="/\*\s*synopsys\>" end="\*/" +syn region verilogDirective start="//\s*synopsys dc_script_begin\>" end="//\s*synopsys dc_script_end\>" + +syn match verilogDirective "//\s*\$s\>.*$" +syn region verilogDirective start="/\*\s*\$s\>" end="\*/" +syn region verilogDirective start="//\s*\$s dc_script_begin\>" end="//\s*\$s dc_script_end\>" + +"Modify the following as needed. The trade-off is performance versus +"functionality. +syn sync minlines=50 + +" 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_verilog_syn_inits") + if version < 508 + let did_verilog_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " The default highlighting. + HiLink verilogCharacter Character + HiLink verilogConditional Conditional + HiLink verilogRepeat Repeat + HiLink verilogString String + HiLink verilogTodo Todo + HiLink verilogComment Comment + HiLink verilogConstant Constant + HiLink verilogLabel Label + HiLink verilogNumber Number + HiLink verilogOperator Special + HiLink verilogStatement Statement + HiLink verilogGlobal Define + HiLink verilogDirective SpecialComment + HiLink verilogEscape Special + + delcommand HiLink +endif + +let b:current_syntax = "verilog" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/verilogams.vim b/vim/bundle/ubuntu-vim72/syntax/verilogams.vim new file mode 100644 index 0000000..d16e4bf --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/verilogams.vim @@ -0,0 +1,149 @@ +" Vim syntax file +" Language: Verilog-AMS +" Maintainer: S. Myles Prather +" +" Version 1.1 S. Myles Prather +" Moved some keywords to the type category. +" Added the metrix suffixes to the number matcher. +" Version 1.2 Prasanna Tamhankar +" Minor reserved keyword updates. +" Last Update: Thursday September 15 15:36:03 CST 2005 + +" 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 + +" Set the local value of the 'iskeyword' option +if version >= 600 + setlocal iskeyword=@,48-57,_,192-255 +else + set iskeyword=@,48-57,_,192-255 +endif + +" Annex B.1 'All keywords' +syn keyword verilogamsStatement above abs absdelay acos acosh ac_stim +syn keyword verilogamsStatement always analog analysis and asin +syn keyword verilogamsStatement asinh assign atan atan2 atanh +syn keyword verilogamsStatement buf bufif0 bufif1 ceil cmos connectmodule +syn keyword verilogamsStatement connectrules cos cosh cross ddt ddx deassign +syn keyword verilogamsStatement defparam disable discipline +syn keyword verilogamsStatement driver_update edge enddiscipline +syn keyword verilogamsStatement endconnectrules endmodule endfunction endgenerate +syn keyword verilogamsStatement endnature endparamset endprimitive endspecify +syn keyword verilogamsStatement endtable endtask event exp final_step +syn keyword verilogamsStatement flicker_noise floor flow force fork +syn keyword verilogamsStatement function generate highz0 +syn keyword verilogamsStatement highz1 hypot idt idtmod if ifnone inf initial +syn keyword verilogamsStatement initial_step inout input join +syn keyword verilogamsStatement laplace_nd laplace_np laplace_zd laplace_zp +syn keyword verilogamsStatement large last_crossing limexp ln localparam log +syn keyword verilogamsStatement macromodule max medium min module nand nature +syn keyword verilogamsStatement negedge net_resolution nmos noise_table nor not +syn keyword verilogamsStatement notif0 notif1 or output paramset pmos +syn keyword verilogamsType parameter real integer electrical input output +syn keyword verilogamsType inout reg tri tri0 tri1 triand trior trireg +syn keyword verilogamsType string from exclude aliasparam ground genvar +syn keyword verilogamsType branch time realtime +syn keyword verilogamsStatement posedge potential pow primitive pull0 pull1 +syn keyword verilogamsStatement pullup pulldown rcmos release +syn keyword verilogamsStatement rnmos rpmos rtran rtranif0 rtranif1 +syn keyword verilogamsStatement scalared sin sinh slew small specify specparam +syn keyword verilogamsStatement sqrt strong0 strong1 supply0 supply1 +syn keyword verilogamsStatement table tan tanh task timer tran tranif0 +syn keyword verilogamsStatement tranif1 transition +syn keyword verilogamsStatement vectored wait wand weak0 weak1 +syn keyword verilogamsStatement white_noise wire wor wreal xnor xor zi_nd +syn keyword verilogamsStatement zi_np zi_zd zi_zp +syn keyword verilogamsRepeat forever repeat while for +syn keyword verilogamsLabel begin end +syn keyword verilogamsConditional if else case casex casez default endcase +syn match verilogamsConstant ":inf"lc=1 +syn match verilogamsConstant "-inf"lc=1 +" Annex B.2 Discipline/nature +syn keyword verilogamsStatement abstol access continuous ddt_nature discrete +syn keyword verilogamsStatement domain idt_nature units +" Annex B.3 Connect Rules +syn keyword verilogamsStatement connect merged resolveto split + +syn match verilogamsOperator "[&|~>" + +syn match verilogamsConstant "\<[A-Z][A-Z0-9_]\+\>" + +syn match verilogamsNumber "\(\<\d\+\|\)'[bB]\s*[0-1_xXzZ?]\+\>" +syn match verilogamsNumber "\(\<\d\+\|\)'[oO]\s*[0-7_xXzZ?]\+\>" +syn match verilogamsNumber "\(\<\d\+\|\)'[dD]\s*[0-9_xXzZ?]\+\>" +syn match verilogamsNumber "\(\<\d\+\|\)'[hH]\s*[0-9a-fA-F_xXzZ?]\+\>" +syn match verilogamsNumber "\<[+-]\=[0-9_]\+\(\.[0-9_]*\|\)\(e[0-9_]*\|\)[TGMKkmunpfa]\=\>" + +syn region verilogamsString start=+"+ skip=+\\"+ end=+"+ contains=verilogamsEscape +syn match verilogamsEscape +\\[nt"\\]+ contained +syn match verilogamsEscape "\\\o\o\=\o\=" contained + +"Modify the following as needed. The trade-off is performance versus +"functionality. +syn sync lines=50 + +" 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_verilogams_syn_inits") + if version < 508 + let did_verilogams_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " The default highlighting. + HiLink verilogamsCharacter Character + HiLink verilogamsConditional Conditional + HiLink verilogamsRepeat Repeat + HiLink verilogamsString String + HiLink verilogamsTodo Todo + HiLink verilogamsComment Comment + HiLink verilogamsConstant Constant + HiLink verilogamsLabel Label + HiLink verilogamsNumber Number + HiLink verilogamsOperator Special + HiLink verilogamsStatement Statement + HiLink verilogamsGlobal Define + HiLink verilogamsDirective SpecialComment + HiLink verilogamsEscape Special + HiLink verilogamsType Type + HiLink verilogamsSystask Function + + delcommand HiLink +endif + +let b:current_syntax = "verilogams" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/vgrindefs.vim b/vim/bundle/ubuntu-vim72/syntax/vgrindefs.vim new file mode 100644 index 0000000..3de31b1 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/vgrindefs.vim @@ -0,0 +1,45 @@ +" Vim syntax file +" Language: Vgrindefs +" Maintainer: Bram Moolenaar +" Last Change: 2005 Jun 20 + +" The Vgrindefs file is used to specify a language for vgrind + +" Quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Comments +syn match vgrindefsComment "^#.*" + +" The fields that vgrind recognizes +syn match vgrindefsField ":ab=" +syn match vgrindefsField ":ae=" +syn match vgrindefsField ":pb=" +syn match vgrindefsField ":bb=" +syn match vgrindefsField ":be=" +syn match vgrindefsField ":cb=" +syn match vgrindefsField ":ce=" +syn match vgrindefsField ":sb=" +syn match vgrindefsField ":se=" +syn match vgrindefsField ":lb=" +syn match vgrindefsField ":le=" +syn match vgrindefsField ":nc=" +syn match vgrindefsField ":tl" +syn match vgrindefsField ":oc" +syn match vgrindefsField ":kw=" + +" Also find the ':' at the end of the line, so all ':' are highlighted +syn match vgrindefsField ":\\$" +syn match vgrindefsField ":$" +syn match vgrindefsField "\\$" + +" Define the default highlighting. +" Only used when an item doesn't have highlighting yet +hi def link vgrindefsField Statement +hi def link vgrindefsComment Comment + +let b:current_syntax = "vgrindefs" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/vhdl.vim b/vim/bundle/ubuntu-vim72/syntax/vhdl.vim new file mode 100644 index 0000000..4ac3b6d --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/vhdl.vim @@ -0,0 +1,184 @@ +" Vim syntax file +" Language: VHDL +" Maintainer: Czo +" Credits: Stephan Hegel +" $Id: vhdl.vim,v 1.1 2004/06/13 15:34:56 vimboss Exp $ + +" VHSIC Hardware Description Language +" Very High Scale Integrated Circuit + +" 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 + +" This is not VHDL. I use the C-Preprocessor cpp to generate different binaries +" from one VHDL source file. Unfortunately there is no preprocessor for VHDL +" available. If you don't like this, please remove the following lines. +syn match cDefine "^#ifdef[ ]\+[A-Za-z_]\+" +syn match cDefine "^#endif" + +" case is not significant +syn case ignore + +" VHDL keywords +syn keyword vhdlStatement access after alias all assert +syn keyword vhdlStatement architecture array attribute +syn keyword vhdlStatement begin block body buffer bus +syn keyword vhdlStatement case component configuration constant +syn keyword vhdlStatement disconnect downto +syn keyword vhdlStatement elsif end entity exit +syn keyword vhdlStatement file for function +syn keyword vhdlStatement generate generic group guarded +syn keyword vhdlStatement impure in inertial inout is +syn keyword vhdlStatement label library linkage literal loop +syn keyword vhdlStatement map +syn keyword vhdlStatement new next null +syn keyword vhdlStatement of on open others out +syn keyword vhdlStatement package port postponed procedure process pure +syn keyword vhdlStatement range record register reject report return +syn keyword vhdlStatement select severity signal shared +syn keyword vhdlStatement subtype +syn keyword vhdlStatement then to transport type +syn keyword vhdlStatement unaffected units until use +syn keyword vhdlStatement variable wait when while with +syn keyword vhdlStatement note warning error failure + +" Special match for "if" and "else" since "else if" shouldn't be highlighted. +" The right keyword is "elsif" +syn match vhdlStatement "\<\(if\|else\)\>" +syn match vhdlNone "\$" +syn match vhdlNone "\\s" + +" Predifined VHDL types +syn keyword vhdlType bit bit_vector +syn keyword vhdlType character boolean integer real time +syn keyword vhdlType string severity_level +" Predifined standard ieee VHDL types +syn keyword vhdlType positive natural signed unsigned +syn keyword vhdlType line text +syn keyword vhdlType std_logic std_logic_vector +syn keyword vhdlType std_ulogic std_ulogic_vector +" Predefined non standard VHDL types for Mentor Graphics Sys1076/QuickHDL +syn keyword vhdlType qsim_state qsim_state_vector +syn keyword vhdlType qsim_12state qsim_12state_vector +syn keyword vhdlType qsim_strength +" Predefined non standard VHDL types for Alliance VLSI CAD +syn keyword vhdlType mux_bit mux_vector reg_bit reg_vector wor_bit wor_vector + +" array attributes +syn match vhdlAttribute "\'high" +syn match vhdlAttribute "\'left" +syn match vhdlAttribute "\'length" +syn match vhdlAttribute "\'low" +syn match vhdlAttribute "\'range" +syn match vhdlAttribute "\'reverse_range" +syn match vhdlAttribute "\'right" +syn match vhdlAttribute "\'ascending" +" block attributes +syn match vhdlAttribute "\'behaviour" +syn match vhdlAttribute "\'structure" +syn match vhdlAttribute "\'simple_name" +syn match vhdlAttribute "\'instance_name" +syn match vhdlAttribute "\'path_name" +syn match vhdlAttribute "\'foreign" +" signal attribute +syn match vhdlAttribute "\'active" +syn match vhdlAttribute "\'delayed" +syn match vhdlAttribute "\'event" +syn match vhdlAttribute "\'last_active" +syn match vhdlAttribute "\'last_event" +syn match vhdlAttribute "\'last_value" +syn match vhdlAttribute "\'quiet" +syn match vhdlAttribute "\'stable" +syn match vhdlAttribute "\'transaction" +syn match vhdlAttribute "\'driving" +syn match vhdlAttribute "\'driving_value" +" type attributes +syn match vhdlAttribute "\'base" +syn match vhdlAttribute "\'high" +syn match vhdlAttribute "\'left" +syn match vhdlAttribute "\'leftof" +syn match vhdlAttribute "\'low" +syn match vhdlAttribute "\'pos" +syn match vhdlAttribute "\'pred" +syn match vhdlAttribute "\'rightof" +syn match vhdlAttribute "\'succ" +syn match vhdlAttribute "\'val" +syn match vhdlAttribute "\'image" +syn match vhdlAttribute "\'value" + +syn keyword vhdlBoolean true false + +" for this vector values case is significant +syn case match +" Values for standard VHDL types +syn match vhdlVector "\'[0L1HXWZU\-\?]\'" +" Values for non standard VHDL types qsim_12state for Mentor Graphics Sys1076/QuickHDL +syn keyword vhdlVector S0S S1S SXS S0R S1R SXR S0Z S1Z SXZ S0I S1I SXI +syn case ignore + +syn match vhdlVector "B\"[01_]\+\"" +syn match vhdlVector "O\"[0-7_]\+\"" +syn match vhdlVector "X\"[0-9a-f_]\+\"" +syn match vhdlCharacter "'.'" +syn region vhdlString start=+"+ end=+"+ + +" floating numbers +syn match vhdlNumber "-\=\<\d\+\.\d\+\(E[+\-]\=\d\+\)\>" +syn match vhdlNumber "-\=\<\d\+\.\d\+\>" +syn match vhdlNumber "0*2#[01_]\+\.[01_]\+#\(E[+\-]\=\d\+\)\=" +syn match vhdlNumber "0*16#[0-9a-f_]\+\.[0-9a-f_]\+#\(E[+\-]\=\d\+\)\=" +" integer numbers +syn match vhdlNumber "-\=\<\d\+\(E[+\-]\=\d\+\)\>" +syn match vhdlNumber "-\=\<\d\+\>" +syn match vhdlNumber "0*2#[01_]\+#\(E[+\-]\=\d\+\)\=" +syn match vhdlNumber "0*16#[0-9a-f_]\+#\(E[+\-]\=\d\+\)\=" +" operators +syn keyword vhdlOperator and nand or nor xor xnor +syn keyword vhdlOperator rol ror sla sll sra srl +syn keyword vhdlOperator mod rem abs not +syn match vhdlOperator "[&><=:+\-*\/|]" +syn match vhdlSpecial "[().,;]" +" time +syn match vhdlTime "\<\d\+\s\+\(\([fpnum]s\)\|\(sec\)\|\(min\)\|\(hr\)\)\>" +syn match vhdlTime "\<\d\+\.\d\+\s\+\(\([fpnum]s\)\|\(sec\)\|\(min\)\|\(hr\)\)\>" + +syn match vhdlComment "--.*$" +" syn match vhdlGlobal "[\'$#~!%@?\^\[\]{}\\]" + +" 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_vhdl_syntax_inits") + if version < 508 + let did_vhdl_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink cDefine PreProc + HiLink vhdlSpecial Special + HiLink vhdlStatement Statement + HiLink vhdlCharacter String + HiLink vhdlString String + HiLink vhdlVector String + HiLink vhdlBoolean String + HiLink vhdlComment Comment + HiLink vhdlNumber String + HiLink vhdlTime String + HiLink vhdlType Type + HiLink vhdlOperator Type + HiLink vhdlGlobal Error + HiLink vhdlAttribute Type + + delcommand HiLink +endif + +let b:current_syntax = "vhdl" + +" vim: ts=8 diff --git a/vim/bundle/ubuntu-vim72/syntax/vim.vim b/vim/bundle/ubuntu-vim72/syntax/vim.vim new file mode 100644 index 0000000..22afcf4 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/syntax/vim.vim @@ -0,0 +1,843 @@ +" Vim syntax file +" Language: Vim 7.2 script +" Maintainer: Dr. Charles E. Campbell, Jr. +" Last Change: Nov 18, 2009 +" Version: 7.2-95 +" Automatically generated keyword lists: {{{1 + +" Quit when a syntax file was already loaded {{{2 +if exists("b:current_syntax") + finish +endif + +" vimTodo: contains common special-notices for comments {{{2 +" Use the vimCommentGroup cluster to add your own. +syn keyword vimTodo contained COMBAK FIXME TODO XXX +syn cluster vimCommentGroup contains=vimTodo,@Spell + +" regular vim commands {{{2 +syn keyword vimCommand contained abc[lear] argdo argu[ment] bel[owright] bN[ext] breakd[el] b[uffer] caddb[uffer] cb[uffer] cex[pr] cg[etfile] checkt[ime] cnew[er] col[der] con[tinue] cq[uit] delc[ommand] diffoff diffu[pdate] dr[op] echom[sg] em[enu] en[dif] ex files fini[sh] foldc[lose] for grepa[dd] helpg[rep] iabc[lear] imapc[lear] j[oin] keepj[umps] laddf[ile] lb[uffer] le[ft] lfir[st] lgr[ep] ll lmapc[lear] lnf[ile] lockv[ar] lp[revious] lv[imgrep] ma[rk] mk[exrc] mkv[imrc] mz[scheme] N[ext] ol[dfiles] opt[ions] perld[o] pp[op] P[rint] promptr[epl] ptj[ump] ptp[revious] pw[d] q[uit] redi[r] reg[isters] rew[ind] rubyd[o] sal[l] sba[ll] sbn[ext] sb[uffer] setf[iletype] sfir[st] sim[alt] sm[ap] sN[ext] snoremenu spe[llgood] spellw[rong] sta[g] stj[ump] sun[hide] sv[iew] tabc[lose] tabfir[st] tabn[ext] tabr[ewind] tc[l] tf[irst] tm to[pleft] ts[elect] u[ndo] unlo[ckvar] vert[ical] vi[sual] vs[plit] windo wN[ext] w[rite] xa[ll] xmenu xnoremenu +syn keyword vimCommand contained abo[veleft] arge[dit] as[cii] bf[irst] bo[tright] breakl[ist] buffers cad[dexpr] cc cf[ile] c[hange] cla[st] cn[ext] colo[rscheme] cope[n] cr[ewind] d[elete] diffpatch dig[raphs] ds[earch] echon emenu* endt[ry] exi[t] filetype fir[st] folddoc[losed] fu[nction] ha[rdcopy] helpt[ags] if is[earch] ju[mps] kee[pmarks] lan[guage] lc[d] lefta[bove] lgetb[uffer] lgrepa[dd] lla[st] lnew[er] lNf[ile] lol[der] lr[ewind] lvimgrepa[dd] marks mks[ession] mod[e] nbkey nmapc[lear] omapc[lear] pc[lose] po[p] pre[serve] profd[el] ps[earch] ptl[ast] ptr[ewind] pyf[ile] quita[ll] red[o] res[ize] ri[ght] rubyf[ile] san[dbox] sbf[irst] sbN[ext] scripte[ncoding] setg[lobal] sh[ell] sla[st] sme sni[ff] sor[t] spelli[nfo] sp[lit] startg[replace] st[op] sunme syncbind tabd[o] tabl[ast] tabN[ext] tabs tcld[o] th[row] tm[enu] tp[revious] tu undoj[oin] up[date] vie[w] viu[sage] wa[ll] winp[os] wp[revious] ws[verb] x[it] XMLent xunme +syn keyword vimCommand contained al[l] argg[lobal] bad[d] bl[ast] bp[revious] br[ewind] bun[load] caddf[ile] ccl[ose] cfir[st] changes cl[ist] cN[ext] comc[lear] co[py] cuna[bbrev] delf[unction] diffpu[t] di[splay] dsp[lit] e[dit] endfo[r] endw[hile] exu[sage] fina[lly] fix[del] foldd[oopen] go[to] h[elp] hid[e] ij[ump] isp[lit] k laddb[uffer] la[st] lch[dir] lex[pr] lgete[xpr] lh[elpgrep] lli[st] lne[xt] lo[adview] lop[en] ls lw[indow] mat[ch] mksp[ell] m[ove] new noh[lsearch] on[ly] ped[it] popu prev[ious] prof[ile] pta[g] ptn[ext] pts[elect] py[thon] r[ead] redr[aw] ret[ab] rightb[elow] ru[ntime] sa[rgument] sbl[ast] sbp[revious] scrip[tnames] setl[ocal] sign sl[eep] smenu sno[magic] so[urce] spellr[epall] spr[evious] star[tinsert] stopi[nsert] sunmenu t tabe[dit] tabm[ove] tabo[nly] ta[g] tclf[ile] tj[ump] tn[ext] tr[ewind] tu[nmenu] undol[ist] verb[ose] vim[grep] vmapc[lear] wh[ile] win[size] wq wv[iminfo] xmapc[lear] XMLns xunmenu +syn keyword vimCommand contained arga[dd] argl[ocal] ba[ll] bm[odified] brea[k] bro[wse] bw[ipeout] cal[l] cd cgetb[uffer] chd[ir] clo[se] cnf[ile] comp[iler] cpf[ile] cw[indow] delm[arks] diffsplit dj[ump] earlier el[se] endf[unction] ene[w] f[ile] fin[d] fo[ld] foldo[pen] gr[ep] helpf[ind] his[tory] il[ist] iuna[bbrev] keepalt lad[dexpr] later lcl[ose] lf[ile] lg[etfile] l[ist] lmak[e] lN[ext] loc[kmarks] lpf[ile] lt[ag] mak[e] menut[ranslate] mkvie[w] mzf[ile] n[ext] nu[mber] o[pen] pe[rl] popu[p] p[rint] promptf[ind] ptf[irst] ptN[ext] pu[t] qa[ll] rec[over] redraws[tatus] retu[rn] rub[y] rv[iminfo] sav[eas] sbm[odified] sbr[ewind] se[t] sf[ind] sil[ent] sm[agic] sn[ext] snoreme spelld[ump] spellu[ndo] sre[wind] startr[eplace] sts[elect] sus[pend] tab tabf[ind] tabnew tabp[revious] tags te[aroff] tl[ast] tN[ext] try una[bbreviate] unh[ide] ve[rsion] vimgrepa[dd] vne[w] winc[md] wn[ext] wqa[ll] X xme xnoreme y[ank] +syn keyword vimCommand contained argd[elete] ar[gs] bd[elete] bn[ext] breaka[dd] bufdo cabc[lear] cat[ch] ce[nter] cgete[xpr] che[ckpath] cmapc[lear] cNf[ile] conf[irm] cp[revious] debugg[reedy] diffg[et] diffthis dl[ist] echoe[rr] elsei[f] +syn match vimCommand contained "\
<> +The <> denotes ignored text. +Line formats are delimited by the ^ (caret) symbol. + +0) Special case: "gmake directory change" lines: + Lines with a format like: + ^gmake[]: Entering directory `'^ + are used to follow the directory changes during the make process, + providing in the part, a relative (if possible) directory + path to the erroneous file. + + +1) GCC: + Recognized lines are of the format: + - ^In file included from ::^ + Line following this one is used as + is always 'e' (error) + is always '0' + + - ^::^ + is always 'e' (error) + is always '0' + + +2) AIX: + Recognized lines are of the format: + - ^"", line .: <> () ", + + +3) HPUX: + Recognized lines are of the format: + - ^cc: "", line : : ^ + is always '0' + + +4) SOLARIS: + Recognized lines are of the format: + - ^"", line : warning: ^ + This assumes is "W" + is always '0' + + - ^"", line : ^ + This assumes is "E" + is always '0' + + +5) ATT / NCR: + Recognized lines are of the format: + - ^ "",L/C<>:^ + or + - ^ "",L/C:^ + Following lines beginning with a pipe (|) are continuation + lines, and are therefore appended to the + + - ^ "",L:^ + is '0' + Following lines beginning with a pipe (|) are continuation + lines, and are therefore appended to the + + +6) SGI-IRIX: + Recognized lines are of the format: + - ^cfe: : : : ^ + or + ^cfe: : , line : ^ + Following lines beginning with a dash (-) are "column-bar" + that end with a caret in the column of the error. These lines + are analyzed to generate the . diff --git a/vim/bundle/ubuntu-vim72/tools/efm_filter.pl b/vim/bundle/ubuntu-vim72/tools/efm_filter.pl new file mode 100755 index 0000000..1d1a4f3 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tools/efm_filter.pl @@ -0,0 +1,39 @@ +#!/usr/bin/env perl +# +# This program works as a filter that reads from stdin, copies to +# stdout *and* creates an error file that can be read by vim. +# +# This program has only been tested on SGI, Irix5.3. +# +# Written by Ives Aerts in 1996. This little program is not guaranteed +# to do (or not do) anything at all and can be freely used for +# whatever purpose you can think of. + +$args = @ARGV; + +unless ($args == 1) { + die("Usage: vimccparse \n"); +} + +$filename = @ARGV[0]; +open (OUT, ">$filename") || die ("Can't open file: \"$filename\""); + +while () { + print; + if ( (/"(.*)", line (\d+): (e)rror\((\d+)\):/) + || (/"(.*)", line (\d+): (w)arning\((\d+)\):/) ) { + $file=$1; + $line=$2; + $errortype="\u$3"; + $errornr=$4; + chop($errormsg=); + $errormsg =~ s/^\s*//; + $sourceline=; + $column=index(, "^") - 1; + + print OUT "$file>$line:$column:$errortype:$errornr:$errormsg\n"; + } +} + +close(OUT); +exit(0); diff --git a/vim/bundle/ubuntu-vim72/tools/efm_filter.txt b/vim/bundle/ubuntu-vim72/tools/efm_filter.txt new file mode 100644 index 0000000..d3f97f4 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tools/efm_filter.txt @@ -0,0 +1,31 @@ +[adopted from a message that Ives posted in the Vim mailing list] + +Some compilers produce an error message that cannot be handled with +'errorformat' in Vim. Following is an example of a Perl script that +translates one error message into something that Vim understands. + + +The compiler that generates this kind of error messages (4 lines): + +"/tmp_mnt/cm/src/apertos/MoU/MetaCore/MetaCore/common/src/MetaCoreImp_M.cc", +line 50: error(3114): + identifier "PRIMITIVE_M" is undefined + return(ExecuteCore(PRIMITIVE_M, + +You can find a small perl program at the end. +The way I use it is: + +:set errorformat=%f>%l:%c:%t:%n:%m +:set makeprg=clearmake\ -C\ gnu +:set shellpipe=2>&1\|\ vimccparse + +If somebody thinks this is useful: feel free to do whatever you can think +of with this code. + +-Ives +____________________________________________________________ +Ives Aerts (SW Developer) Sony Telecom Europe +ives@sonytel.be St.Stevens Woluwestr. 55 +`Death could create most things, B-1130 Brussels, Belgium + except for plumbing.' PHONE : +32 2 724 19 67 + (Soul Music - T.Pratchett) FAX : +32 2 726 26 86 diff --git a/vim/bundle/ubuntu-vim72/tools/efm_perl.pl b/vim/bundle/ubuntu-vim72/tools/efm_perl.pl new file mode 100755 index 0000000..570d6e7 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tools/efm_perl.pl @@ -0,0 +1,153 @@ +#!/usr/bin/perl -w + +# vimparse.pl - Reformats the error messages of the Perl interpreter for use +# with the quickfix mode of Vim +# +# Copyright (©) 2001 by Jörg Ziefle +# You may use and distribute this software under the same terms as Perl itself. +# +# Usage: put one of the two configurations below in your ~/.vimrc (without the +# description and '# ') and enjoy (be sure to adjust the paths to vimparse.pl +# before): +# +# Program is run interactively with 'perl -w': +# +# set makeprg=$HOME/bin/vimparse.pl\ %\ $* +# set errorformat=%f:%l:%m +# +# Program is only compiled with 'perl -wc': +# +# set makeprg=$HOME/bin/vimparse.pl\ -c\ %\ $* +# set errorformat=%f:%l:%m +# +# Usage: +# vimparse.pl [-c] [-f ] [programargs] +# +# -c compile only, don't run (perl -wc) +# -f write errors to +# +# Example usages: +# * From the command line: +# vimparse.pl program.pl +# +# vimparse.pl -c -f errorfile program.pl +# Then run vim -q errorfile to edit the errors with Vim. +# +# * From Vim: +# Edit in Vim (and save, if you don't have autowrite on), then +# type ':mak' or ':mak args' (args being the program arguments) +# to error check. +# +# Version history: +# 0.2 (04/12/2001): +# * First public version (sent to Bram) +# * -c command line option for compiling only +# * grammatical fix: 'There was 1 error.' +# * bug fix for multiple arguments +# * more error checks +# * documentation (top of file, &usage) +# * minor code clean ups +# 0.1 (02/02/2001): +# * Initial version +# * Basic functionality +# +# Todo: +# * test on more systems +# * use portable way to determine the location of perl ('use Config') +# * include option that shows perldiag messages for each error +# * allow to pass in program by STDIN +# * more intuitive behaviour if no error is found (show message) +# +# Tested under SunOS 5.7 with Perl 5.6.0. Let me know if it's not working for +# you. + +use strict; +use Getopt::Std; + +use vars qw/$opt_c $opt_f $opt_h/; # needed for Getopt in combination with use strict 'vars' + +use constant VERSION => 0.2; + +getopts('cf:h'); + +&usage if $opt_h; # not necessarily needed, but good for further extension + +if (defined $opt_f) { + + open FILE, "> $opt_f" or do { + warn "Couldn't open $opt_f: $!. Using STDOUT instead.\n"; + undef $opt_f; + }; + +}; + +my $handle = (defined $opt_f ? \*FILE : \*STDOUT); + +(my $file = shift) or &usage; # display usage if no filename is supplied +my $args = (@ARGV ? ' ' . join ' ', @ARGV : ''); + +my @lines = `perl @{[defined $opt_c ? '-c ' : '' ]} -w "$file$args" 2>&1`; + +my $errors = 0; +foreach my $line (@lines) { + + chomp($line); + my ($file, $lineno, $message, $rest); + + if ($line =~ /^(.*)\sat\s(.*)\sline\s(\d+)(\.|,\snear\s\".*\")$/) { + + ($message, $file, $lineno, $rest) = ($1, $2, $3, $4); + $errors++; + $message .= $rest if ($rest =~ s/^,//); + print $handle "$file:$lineno:$message\n"; + + } else { next }; + +} + +if (defined $opt_f) { + + my $msg; + if ($errors == 1) { + + $msg = "There was 1 error.\n"; + + } else { + + $msg = "There were $errors errors.\n"; + + }; + + print STDOUT $msg; + close FILE; + unlink $opt_f unless $errors; + +}; + +sub usage { + + (local $0 = $0) =~ s/^.*\/([^\/]+)$/$1/; # remove path from name of program + print<] [programargs] + + -c compile only, don't run (executes 'perl -wc') + -f write errors to + +Examples: + * At the command line: + $0 program.pl + Displays output on STDOUT. + + $0 -c -f errorfile program.pl + Then run 'vim -q errorfile' to edit the errors with Vim. + + * In Vim: + Edit in Vim (and save, if you don't have autowrite on), then + type ':mak' or ':mak args' (args being the program arguments) + to error check. +EOT + + exit 0; + +}; diff --git a/vim/bundle/ubuntu-vim72/tools/mve.awk b/vim/bundle/ubuntu-vim72/tools/mve.awk new file mode 100755 index 0000000..2fa18be --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tools/mve.awk @@ -0,0 +1,23 @@ +#!/usr/bin/awk -f +# +# Change "nawk" to "awk" or "gawk" if you get errors. +# +# Make Vim Errors +# Processes errors from cc for use by Vim's quick fix tools +# specifically it translates the ---------^ notation to a +# column number +# +BEGIN { FS="[:,]" } + +/^cfe/ { file=$3 + msg=$5 + split($4,s," ") + line=s[2] +} + +# You may have to substitute a tab character for the \t here: +/^[\t-]*\^/ { + p=match($0, ".*\\^" ) + col=RLENGTH-2 + printf("%s, line %d, col %d : %s\n", file,line,col,msg) +} diff --git a/vim/bundle/ubuntu-vim72/tools/mve.txt b/vim/bundle/ubuntu-vim72/tools/mve.txt new file mode 100644 index 0000000..8aa5cf6 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tools/mve.txt @@ -0,0 +1,20 @@ +[ The mve awk script was posted on the vimdev mailing list ] + +From: jimmer@barney.mdhc.mdc.com (J. McGlasson) +Date: Mon, 31 Mar 1997 13:16:49 -0700 (Mar) + +My compiler (SGI MIPSpro C compiler - IRIX 6.4) works like this. +I have written a script mve (make vim errors), through which I pipe my make +output, which translates output of the following form: + +cfe: Error: syntax.c, line 4: Syntax Error + int i[12; + ------------^ + +into: + + cl.c, line 4, col 12 : Syntax Error + +(in vim notation: %f, line %l, col %c : %m) + +You might be able to tailor this for your compiler's output. diff --git a/vim/bundle/ubuntu-vim72/tools/pltags.pl b/vim/bundle/ubuntu-vim72/tools/pltags.pl new file mode 100755 index 0000000..7a74682 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tools/pltags.pl @@ -0,0 +1,300 @@ +#!/usr/bin/env perl + +# pltags - create a tags file for Perl code, for use by vi(m) +# +# Distributed with Vim , latest version always available +# at +# +# Version 2.3, 28 February 2002 +# +# Written by Michael Schaap . Suggestions for improvement +# are very welcome! +# +# This script will not work with Perl 4 or below! +# +# Revision history: +# 1.0 1997? Original version, quickly hacked together +# 2.0 1999? Completely rewritten, better structured and documented, +# support for variables, packages, Exuberant Ctags extensions +# 2.1 Jun 2000 Fixed critical bug (typo in comment) ;-) +# Support multiple level packages (e.g. Archive::Zip::Member) +# 2.2 Jul 2001 'Glob' wildcards - especially useful under Windows +# (thanks to Serge Sivkov and Jason King) +# Bug fix: reset package name for each file +# 2.21 Jul 2001 Oops... bug in variable detection (/local../ -> /^local.../) +# 2.3 Feb 2002 Support variables declared with "our" +# (thanks to Lutz Mende) + +# Complain about undeclared variables +use strict; + +# Used modules +use Getopt::Long; + +# Options with their defaults +my $do_subs = 1; # --subs, --nosubs include subs in tags file? +my $do_vars = 1; # --vars, --novars include variables in tags file? +my $do_pkgs = 1; # --pkgs, --nopkgs include packages in tags file? +my $do_exts = 1; # --extensions, --noextensions + # include Exuberant Ctags extensions + +# Global variables +my $VERSION = "2.21"; # pltags version +my $status = 0; # GetOptions return value +my $file = ""; # File being processed +my @tags = (); # List of produced tags +my $is_pkg = 0; # Are we tagging a package? +my $has_subs = 0; # Has this file any subs yet? +my $package_name = ""; # Name of current package +my $var_continues = 0; # Variable declaration continues on last line +my $line = ""; # Current line in file +my $stmt = ""; # Current Perl statement +my @vars = (); # List of variables in declaration +my $var = ""; # Variable in declaration +my $tagline = ""; # Tag file line + +# Create a tag file line and push it on the list of found tags +sub MakeTag($$$$$) +{ + my ($tag, # Tag name + $type, # Type of tag + $is_static, # Is this a static tag? + $file, # File in which tag appears + $line) = @_; # Line in which tag appears + + my $tagline = ""; # Created tag line + + # Only process tag if not empty + if ($tag) + { + # Get rid of \n, and escape / and \ in line + chomp $line; + $line =~ s/\\/\\\\/g; + $line =~ s/\//\\\//g; + + # Create a tag line + $tagline = "$tag\t$file\t/^$line\$/"; + + # If we're told to do so, add extensions + if ($do_exts) + { + $tagline .= ";\"\t$type" + . ($is_static ? "\tfile:" : "") + . ($package_name ? "\tclass:$package_name" : ""); + } + + # Push it on the stack + push (@tags, $tagline); + } +} + +# Parse package name from statement +sub PackageName($) +{ + my ($stmt) = @_; # Statement + + # Look for the argument to "package". Return it if found, else return "" + if ($stmt =~ /^package\s+([\w:]+)/) + { + my $pkgname = $1; + + # Remove any parent package name(s) + $pkgname =~ s/.*://; + return $pkgname; + } + else + { + return ""; + } +} + +# Parse sub name from statement +sub SubName($) +{ + my ($stmt) = @_; # Statement + + # Look for the argument to "sub". Return it if found, else return "" + if ($stmt =~ /^sub\s+([\w:]+)/) + { + my $subname = $1; + + # Remove any parent package name(s) + $subname =~ s/.*://; + return $subname; + } + else + { + return ""; + } +} + +# Parse all variable names from statement +sub VarNames($) +{ + my ($stmt) = @_; + + # Remove my or local from statement, if present + $stmt =~ s/^(my|our|local)\s+//; + + # Remove any assignment piece + $stmt =~ s/\s*=.*//; + + # Now find all variable names, i.e. "words" preceded by $, @ or % + @vars = ($stmt =~ /[\$\@\%]([\w:]+)\b/g); + + # Remove any parent package name(s) + map(s/.*://, @vars); + + return (@vars); +} + +############### Start ############### + +print "\npltags $VERSION by Michael Schaap \n\n"; + +# Get options +$status = GetOptions("subs!" => \$do_subs, + "vars!" => \$do_vars, + "pkgs!" => \$do_pkgs, + "extensions!" => \$do_exts); + +# Usage if error in options or no arguments given +unless ($status && @ARGV) +{ + print "\n" unless ($status); + print " Usage: $0 [options] filename ...\n\n"; + print " Where options can be:\n"; + print " --subs (--nosubs) (don't) include sub declarations in tag file\n"; + print " --vars (--novars) (don't) include variable declarations in tag file\n"; + print " --pkgs (--nopkgs) (don't) include package declarations in tag file\n"; + print " --extensions (--noextensions)\n"; + print " (don't) include Exuberant Ctags / Vim style\n"; + print " extensions in tag file\n\n"; + print " Default options: "; + print ($do_subs ? "--subs " : "--nosubs "); + print ($do_vars ? "--vars " : "--novars "); + print ($do_pkgs ? "--pkgs " : "--nopkgs "); + print ($do_exts ? "--extensions\n\n" : "--noextensions\n\n"); + print " Example: $0 *.pl *.pm ../shared/*.pm\n\n"; + exit; +} + +# Loop through files on command line - 'glob' any wildcards, since Windows +# doesn't do this for us +foreach $file (map { glob } @ARGV) +{ + # Skip if this is not a file we can open. Also skip tags files and backup + # files + next unless ((-f $file) && (-r $file) && ($file !~ /tags$/) + && ($file !~ /~$/)); + + print "Tagging file $file...\n"; + + $is_pkg = 0; + $package_name = ""; + $has_subs = 0; + $var_continues = 0; + + open (IN, $file) or die "Can't open file '$file': $!"; + + # Loop through file + foreach $line () + { + # Statement is line with comments and whitespace trimmed + ($stmt = $line) =~ s/#.*//; + $stmt =~ s/^\s*//; + $stmt =~ s/\s*$//; + + # Nothing left? Never mind. + next unless ($stmt); + + # This is a variable declaration if one was started on the previous + # line, or if this line starts with my or local + if ($var_continues or ($stmt =~/^my\b/) + or ($stmt =~/^our\b/) or ($stmt =~/^local\b/)) + { + # The declaration continues if the line does not end with ; + $var_continues = ($stmt !~ /;$/); + + # Loop through all variable names in the declaration + foreach $var (VarNames($stmt)) + { + # Make a tag for this variable unless we're told not to. We + # assume that a variable is always static, unless it appears + # in a package before any sub. (Not necessarily true, but + # it's ok for most purposes and Vim works fine even if it is + # incorrect) + if ($do_vars) + { + MakeTag($var, "v", (!$is_pkg or $has_subs), $file, $line); + } + } + } + + # This is a package declaration if the line starts with package + elsif ($stmt =~/^package\b/) + { + # Get name of the package + $package_name = PackageName($stmt); + + if ($package_name) + { + # Remember that we're doing a package + $is_pkg = 1; + + # Make a tag for this package unless we're told not to. A + # package is never static. + if ($do_pkgs) + { + MakeTag($package_name, "p", 0, $file, $line); + } + } + } + + # This is a sub declaration if the line starts with sub + elsif ($stmt =~/^sub\b/) + { + # Remember that this file has subs + $has_subs = 1; + + # Make a tag for this sub unless we're told not to. We assume + # that a sub is static, unless it appears in a package. (Not + # necessarily true, but it's ok for most purposes and Vim works + # fine even if it is incorrect) + if ($do_subs) + { + MakeTag(SubName($stmt), "s", (!$is_pkg), $file, $line); + } + } + } + close (IN); +} + +# Do we have any tags? If so, write them to the tags file +if (@tags) +{ + # Add some tag file extensions if we're told to + if ($do_exts) + { + push (@tags, "!_TAG_FILE_FORMAT\t2\t/extended format/"); + push (@tags, "!_TAG_FILE_SORTED\t1\t/0=unsorted, 1=sorted/"); + push (@tags, "!_TAG_PROGRAM_AUTHOR\tMichael Schaap\t/mscha\@mscha.com/"); + push (@tags, "!_TAG_PROGRAM_NAME\tpltags\t//"); + push (@tags, "!_TAG_PROGRAM_VERSION\t$VERSION\t/supports multiple tags and extended format/"); + } + + print "\nWriting tags file.\n"; + + open (OUT, ">tags") or die "Can't open tags file: $!"; + + foreach $tagline (sort @tags) + { + print OUT "$tagline\n"; + } + + close (OUT); +} +else +{ + print "\nNo tags found.\n"; +} diff --git a/vim/bundle/ubuntu-vim72/tools/ref b/vim/bundle/ubuntu-vim72/tools/ref new file mode 100755 index 0000000..77bfc80 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tools/ref @@ -0,0 +1,11 @@ +#!/bin/sh +# +# ref - Check spelling of the arguments +# +# Usage: ref word .. +# +# can be used for the K command of Vim +# +spell <\fP] [\fI-s \fP] +.SH DESCRIPTION +\fBshtags\fP creates a \fBvi(1)\fP tags file for shell scripts - which +essentially turns your code into a hypertext document. \fBshtags\fP +attempts to create tags for all function and variable definitions, +although this is a little difficult, because in most shell languages, +variables don't need to be explicitly defined, and as such there is +often no distinct "variable definition". If this is the case, +\fBshtags\fP simply creates a tag for the first instance of a variable +which is being set in a simple way, ie: \fIset x = 5\fP. +.SH OPTIONS +.IP "\fB-t \fP" +Name of tags file to create. (default is 'tags') +.IP "\fB-s \fP" +The name of the shell used by the script(s). By default, +\fBshtags\fP tries to work out which is the appropriate shell for each +file individually by looking at the first line of each file. This wont +work however, if the script starts as a bourne shell script and tries +to be clever about starting the shell it really wants. +.b +Currently supported shells are: +.RS +.IP \fBsh\fP +Bourne Shell +.IP \fBperl\fP +Perl (versions 4 and 5) +.IP \fBksh\fP +Korn Shell +.IP \fBtclsh\fP +The TCL shell +.IP \fBwish\fP +The TK Windowing shell (same as tclsh) +.RE + +.IP \fB-v\fP +Include variable definitions (variables mentioned at the start of a line) +.IP \fB-V\fP +Print version information. +.IP \fB-w\fP +Suppress "duplicate tag" warning messages. +.IP \fB-x\fP +Explicitly create a new tags file. Normally new tags are merged with +the old tags file. +.PP +\fBshtags\fP scans the specified files for subroutines and possibly +variable definitions, and creates a \fBvi\fP style tags file. +.SH FILES +.IP \fBtags\fP +A tags file contains a sorted list of tags, one tag per line. The +format is the same as that used by \fBvi\fP(1) +.SH AUTHOR +Stephen Riehm +.br +sr@pc-plus.de +.SH "SEE ALSO" +ctags(1), etags(1), perl(1), tclsh(1), wish(1), sh(1), ksh(1). diff --git a/vim/bundle/ubuntu-vim72/tools/shtags.pl b/vim/bundle/ubuntu-vim72/tools/shtags.pl new file mode 100755 index 0000000..48dcdc7 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tools/shtags.pl @@ -0,0 +1,144 @@ +#!/usr/bin/env perl +# +# shtags: create a tags file for perl scripts +# +# Author: Stephen Riehm +# Last Changed: 96/11/27 19:46:06 +# +# "@(#) shtags 1.1 by S. Riehm" +# + +# obvious... :-) +sub usage + { + print <<_EOUSAGE_ ; +USAGE: $program [-kvwVx] [-t ] + -t Name of tags file to create. (default is 'tags') + -s Name of the shell language in the script + -v Include variable definitions. + (variables mentioned at the start of a line) + -V Print version information. + -w Suppress "duplicate tag" warnings. + -x Explicitly create a new tags file. Normally tags are merged. + List of files to scan for tags. +_EOUSAGE_ + exit 0 + } + +sub version +{ + # + # Version information + # + @id = split( ', ', 'scripts/bin/shtags, /usr/local/, LOCAL_SCRIPTS, 1.1, 96/11/27, 19:46:06' ); + $id[0] =~ s,.*/,,; + print <<_EOVERS; +$id[0]: $id[3] +Last Modified: @id[4,5] +Component: $id[1] +Release: $id[2] +_EOVERS + exit( 1 ); +} + +# +# initialisations +# +($program = $0) =~ s,.*/,,; +require 'getopts.pl'; + +# +# parse command line +# +&Getopts( "t:s:vVwx" ) || &usage(); +$tags_file = $opt_t || 'tags'; +$explicit = $opt_x; +$variable_tags = $opt_v; +$allow_warnings = ! $opt_w; +&version if $opt_V; +&usage() unless @ARGV != 0; + +# slurp up the existing tags. Some will be replaced, the ones that aren't +# will be re-written exactly as they were read +if( ! $explicit && open( TAGS, "< $tags_file" ) ) + { + while( ) + { + /^\S+/; + $tags{$&} = $_; + } + close( TAGS ); + } + +# +# for each line of every file listed on the command line, look for a +# 'sub' definition, or, if variables are wanted aswell, look for a +# variable definition at the start of a line +# +while( <> ) + { + &check_shell($_), ( $old_file = $ARGV ) if $ARGV ne $old_file; + next unless $shell; + if( $shell eq "sh" ) + { + next unless /^\s*(((\w+)))\s*\(\s*\)/ + || ( $variable_tags && /^(((\w+)=))/ ); + $match = $3; + } + if( $shell eq "ksh" ) + { + # ksh + next unless /^\s*function\s+(((\w+)))/ + || ( $variable_tags && /^(((\w+)=))/ ); + $match = $3; + } + if( $shell eq "perl" ) + { + # perl + next unless /^\s*sub\s+(\w+('|::))?(\w+)/ + || /^\s*(((\w+))):/ + || ( $variable_tags && /^(([(\s]*[\$\@\%]{1}(\w+).*=))/ ); + $match = $3; + } + if( $shell eq "tcl" ) + { + next unless /^\s*proc\s+(((\S+)))/ + || ( $variable_tags && /^\s*set\s+(((\w+)\s))/ ); + $match = $3; + } + chop; + warn "$match - duplicate ignored\n" + if ( $new{$match}++ + || !( $tags{$match} = sprintf( "%s\t%s\t?^%s\$?\n", $match, $ARGV, $_ ) ) ) + && $allow_warnings; + } + +# write the new tags to the tags file - note that the whole file is rewritten +open( TAGS, "> $tags_file" ); +foreach( sort( keys %tags ) ) + { + print TAGS "$tags{$_}"; + } +close( TAGS ); + +sub check_shell + { + local( $_ ) = @_; + # read the first line of a script, and work out which shell it is, + # unless a shell was specified on the command line + # + # This routine can't handle clever scripts which start sh and then + # use sh to start the shell they really wanted. + if( $opt_s ) + { + $shell = $opt_s; + } + else + { + $shell = "sh" if /^:$/ || /^#!.*\/bin\/sh/; + $shell = "ksh" if /^#!.*\/ksh/; + $shell = "perl" if /^#!.*\/perl/; + $shell = "tcl" if /^#!.*\/wish/; + printf "Using $shell for $ARGV\n"; + } + } diff --git a/vim/bundle/ubuntu-vim72/tools/unicode.vim b/vim/bundle/ubuntu-vim72/tools/unicode.vim new file mode 100644 index 0000000..f33df42 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tools/unicode.vim @@ -0,0 +1,280 @@ +" Script to extract tables from Unicode .txt files, to be used in src/mbyte.c. +" The format of the UnicodeData.txt file is explained here: +" http://www.unicode.org/Public/5.1.0/ucd/UCD.html +" For the other files see the header. +" +" Usage: Vim -S +" +" Author: Bram Moolenaar +" Last Update: 2010 Jan 12 + +" Parse lines of UnicodeData.txt. Creates a list of lists in s:dataprops. +func! ParseDataToProps() + let s:dataprops = [] + let lnum = 1 + while lnum <= line('$') + let l = split(getline(lnum), '\s*;\s*', 1) + if len(l) != 15 + echoerr 'Found ' . len(l) . ' items in line ' . lnum . ', expected 15' + return + endif + call add(s:dataprops, l) + let lnum += 1 + endwhile +endfunc + +" Parse lines of CaseFolding.txt. Creates a list of lists in s:foldprops. +func! ParseFoldProps() + let s:foldprops = [] + let lnum = 1 + while lnum <= line('$') + let line = getline(lnum) + if line !~ '^#' && line !~ '^\s*$' + let l = split(line, '\s*;\s*', 1) + if len(l) != 4 + echoerr 'Found ' . len(l) . ' items in line ' . lnum . ', expected 4' + return + endif + call add(s:foldprops, l) + endif + let lnum += 1 + endwhile +endfunc + +" Parse lines of EastAsianWidth.txt. Creates a list of lists in s:widthprops. +func! ParseWidthProps() + let s:widthprops = [] + let lnum = 1 + while lnum <= line('$') + let line = getline(lnum) + if line !~ '^#' && line !~ '^\s*$' + let l = split(line, '\s*;\s*', 1) + if len(l) != 2 + echoerr 'Found ' . len(l) . ' items in line ' . lnum . ', expected 2' + return + endif + call add(s:widthprops, l) + endif + let lnum += 1 + endwhile +endfunc + +" Build the toLower or toUpper table in a new buffer. +" Uses s:dataprops. +func! BuildCaseTable(name, index) + let start = -1 + let end = -1 + let step = 0 + let add = -1 + let ranges = [] + for p in s:dataprops + if p[a:index] != '' + let n = ('0x' . p[0]) + 0 + let nl = ('0x' . p[a:index]) + 0 + if start >= 0 && add == nl - n && (step == 0 || n - end == step) + " continue with same range. + let step = n - end + let end = n + else + if start >= 0 + " produce previous range + call Range(ranges, start, end, step, add) + endif + let start = n + let end = n + let step = 0 + let add = nl - n + endif + endif + endfor + if start >= 0 + call Range(ranges, start, end, step, add) + endif + + " New buffer to put the result in. + new + exe "file to" . a:name + call setline(1, "static convertStruct to" . a:name . "[] =") + call setline(2, "{") + call append('$', ranges) + call setline('$', getline('$')[:-2]) " remove last comma + call setline(line('$') + 1, "};") + wincmd p +endfunc + +" Build the foldCase table in a new buffer. +" Uses s:foldprops. +func! BuildFoldTable() + let start = -1 + let end = -1 + let step = 0 + let add = -1 + let ranges = [] + for p in s:foldprops + if p[1] == 'C' || p[1] == 'S' + let n = ('0x' . p[0]) + 0 + let nl = ('0x' . p[2]) + 0 + if start >= 0 && add == nl - n && (step == 0 || n - end == step) + " continue with same range. + let step = n - end + let end = n + else + if start >= 0 + " produce previous range + call Range(ranges, start, end, step, add) + endif + let start = n + let end = n + let step = 0 + let add = nl - n + endif + endif + endfor + if start >= 0 + call Range(ranges, start, end, step, add) + endif + + " New buffer to put the result in. + new + file foldCase + call setline(1, "static convertStruct foldCase[] =") + call setline(2, "{") + call append('$', ranges) + call setline('$', getline('$')[:-2]) " remove last comma + call setline(line('$') + 1, "};") + wincmd p +endfunc + +func! Range(ranges, start, end, step, add) + let s = printf("\t{0x%x,0x%x,%d,%d},", a:start, a:end, a:step == 0 ? -1 : a:step, a:add) + call add(a:ranges, s) +endfunc + +" Build the combining table. +" Uses s:dataprops. +func! BuildCombiningTable() + let start = -1 + let end = -1 + let ranges = [] + for p in s:dataprops + if p[2] == 'Mn' || p[2] == 'Mc' || p[2] == 'Me' + let n = ('0x' . p[0]) + 0 + if start >= 0 && end + 1 == n + " continue with same range. + let end = n + else + if start >= 0 + " produce previous range + call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end)) + endif + let start = n + let end = n + endif + endif + endfor + if start >= 0 + call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end)) + endif + + " New buffer to put the result in. + new + file combining + call setline(1, " static struct interval combining[] =") + call setline(2, " {") + call append('$', ranges) + call setline('$', getline('$')[:-2]) " remove last comma + call setline(line('$') + 1, " };") + wincmd p +endfunc + +" Build the ambiguous table in a new buffer. +" Uses s:widthprops and s:dataprops. +func! BuildAmbiguousTable() + let start = -1 + let end = -1 + let ranges = [] + let dataidx = 0 + for p in s:widthprops + if p[1][0] == 'A' + let n = ('0x' . p[0]) + 0 + " Find this char in the data table. + while 1 + let dn = ('0x' . s:dataprops[dataidx][0]) + 0 + if dn >= n + break + endif + let dataidx += 1 + endwhile + if dn != n + echoerr "Cannot find character " . n . " in data table" + endif + " Only use the char when it's not a composing char. + let dp = s:dataprops[dataidx] + if dp[2] != 'Mn' && dp[2] != 'Mc' && dp[2] != 'Me' + if start >= 0 && end + 1 == n + " continue with same range. + let end = n + else + if start >= 0 + " produce previous range + call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end)) + endif + let start = n + if p[0] =~ '\.\.' + let end = ('0x' . substitute(p[0], '.*\.\.', '', '')) + 0 + else + let end = n + endif + endif + endif + endif + endfor + if start >= 0 + call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end)) + endif + + " New buffer to put the result in. + new + file ambiguous + call setline(1, " static struct interval ambiguous[] =") + call setline(2, " {") + call append('$', ranges) + call setline('$', getline('$')[:-2]) " remove last comma + call setline(line('$') + 1, " };") + wincmd p +endfunc + + + +" Edit the Unicode text file. Requires the netrw plugin. +edit http://unicode.org/Public/UNIDATA/UnicodeData.txt + +" Parse each line, create a list of lists. +call ParseDataToProps() + +" Build the toLower table. +call BuildCaseTable("Lower", 13) + +" Build the toUpper table. +call BuildCaseTable("Upper", 12) + +" Build the ranges of composing chars. +call BuildCombiningTable() + +" Edit the case folding text file. Requires the netrw plugin. +edit http://www.unicode.org/Public/UNIDATA/CaseFolding.txt + +" Parse each line, create a list of lists. +call ParseFoldProps() + +" Build the foldCase table. +call BuildFoldTable() + +" Edit the width text file. Requires the netrw plugin. +edit http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt + +" Parse each line, create a list of lists. +call ParseWidthProps() + +" Build the ambiguous table. +call BuildAmbiguousTable() diff --git a/vim/bundle/ubuntu-vim72/tools/vim132 b/vim/bundle/ubuntu-vim72/tools/vim132 new file mode 100755 index 0000000..29ea4ce --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tools/vim132 @@ -0,0 +1,13 @@ +#!/bin/csh +# +# Shell script for use with UNIX +# Starts up Vim with the terminal in 132 column mode +# Only works on VT-100 terminals and lookalikes +# You need to have a termcap entry "vt100-w". Same as vt100 but 132 columns. +# +set oldterm=$term +echo "[?3h" +setenv TERM vt100-w +vim $* +set term=$oldterm +echo "[?3l" diff --git a/vim/bundle/ubuntu-vim72/tools/vim_vs_net.cmd b/vim/bundle/ubuntu-vim72/tools/vim_vs_net.cmd new file mode 100644 index 0000000..6307d95 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tools/vim_vs_net.cmd @@ -0,0 +1,24 @@ +@rem +@rem To use this with Visual Studio .Net +@rem Tools->External Tools... +@rem Add +@rem Title - Vim +@rem Command - d:\files\util\vim_vs_net.cmd +@rem Arguments - +$(CurLine) $(ItemPath) +@rem Init Dir - Empty +@rem +@rem Coutesy of Brian Sturk +@rem +@rem --remote-silent +%1 is a command +954, move ahead 954 lines +@rem --remote-silent %2 full path to file +@rem In Vim +@rem :h --remote-silent for mor details +@rem +@rem --servername VS_NET +@rem This will create a new instance of vim called VS_NET. So if you +open +@rem multiple files from VS, they will use the same instance of Vim. +@rem This allows you to have multiple copies of Vim running, but you can +@rem control which one has VS files in it. +@rem +start /b gvim.exe --servername VS_NET --remote-silent "%1" "%2" diff --git a/vim/bundle/ubuntu-vim72/tools/vimm b/vim/bundle/ubuntu-vim72/tools/vimm new file mode 100755 index 0000000..7b84cb2 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tools/vimm @@ -0,0 +1,6 @@ +#!/bin/sh +# enable DEC locator input model on remote terminal +printf "\033[1;2'z\033[1;3'{\c" +vim "$@" +# disable DEC locator input model on remote terminal +printf "\033[2;4'{\033[0'z\c" diff --git a/vim/bundle/ubuntu-vim72/tools/vimspell.sh b/vim/bundle/ubuntu-vim72/tools/vimspell.sh new file mode 100755 index 0000000..d336fe6 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tools/vimspell.sh @@ -0,0 +1,55 @@ +#!/bin/sh +# +# Spell a file & generate the syntax statements necessary to +# highlight in vim. Based on a program from Krishna Gadepalli +# . +# +# I use the following mappings (in .vimrc): +# +# noremap :so `vimspell.sh %` +# noremap :syntax clear SpellErrors +# +# Neil Schemenauer +# March 1999 +# updated 2008 Jul 17 by Bram +# +# Safe method for the temp file by Javier Fernández-Sanguino_Peña + +INFILE=$1 +tmp="${TMPDIR-/tmp}" +OUTFILE=`mktemp -t vimspellXXXXXX || tempfile -p vimspell || echo none` +# If the standard commands failed then create the file +# since we cannot create a directory (we cannot remove it on exit) +# create a file in the safest way possible. +if test "$OUTFILE" = none; then + OUTFILE=$tmp/vimspell$$ + [ -e $OUTFILE ] && { echo "Cannot use temporary file $OUTFILE, it already exists!"; exit 1 ; } + (umask 077; touch $OUTFILE) +fi +# Note the copy of vimspell cannot be deleted on exit since it is +# used by vim, otherwise it should do this: +# trap "rm -f $OUTFILE" 0 1 2 3 9 11 13 15 + + +# +# local spellings +# +LOCAL_DICT=${LOCAL_DICT-$HOME/local/lib/local_dict} + +if [ -f $LOCAL_DICT ] +then + SPELL_ARGS="+$LOCAL_DICT" +fi + +spell $SPELL_ARGS $INFILE | sort -u | +awk ' + { + printf "syntax match SpellErrors \"\\<%s\\>\"\n", $0 ; + } + +END { + printf "highlight link SpellErrors ErrorMsg\n\n" ; + } +' > $OUTFILE +echo "!rm $OUTFILE" >> $OUTFILE +echo $OUTFILE diff --git a/vim/bundle/ubuntu-vim72/tools/vimspell.txt b/vim/bundle/ubuntu-vim72/tools/vimspell.txt new file mode 100644 index 0000000..2842af7 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tools/vimspell.txt @@ -0,0 +1,22 @@ +vimspell.sh +=========== + +This is a simple script to spell check a file and generate the syntax +statements necessary to highlight the errors in vim. It is based on a +similar program by Krishna Gadepalli . + +To use this script, first place it in a directory in your path. Next, +you should add some convenient key mappings. I use the following (in +.vimrc): + + noremap :so `vimspell.sh %` + noremap :syntax clear SpellErrors + +This program requires the old Unix "spell" command. On my Debian +system, "spell" is a wrapper around "ispell". For better security, +you should uncomment the line in the script that uses "tempfile" to +create a temporary file. As all systems don't have "tempfile" the +insecure "pid method" is used. + + + Neil Schemenauer diff --git a/vim/bundle/ubuntu-vim72/tools/xcmdsrv_client.c b/vim/bundle/ubuntu-vim72/tools/xcmdsrv_client.c new file mode 100644 index 0000000..a0e6211 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tools/xcmdsrv_client.c @@ -0,0 +1,584 @@ +/* vi:set ts=8 sts=4 sw=4: + * + * VIM - Vi IMproved by Bram Moolenaar + * X-Windows communication by Flemming Madsen + * + * Do ":help uganda" in Vim to read copying and usage conditions. + * Do ":help credits" in Vim to see a list of people who contributed. + * See README.txt for an overview of the Vim source code. + * + * Client for sending commands to an '+xcmdsrv' enabled vim. + * This is mostly a de-Vimified version of if_xcmdsrv.c in vim. + * See that file for a protocol specification. + * + * You can make a test program with a Makefile like: + * xcmdsrv_client: xcmdsrv_client.c + * cc -o $@ -g -DMAIN -I/usr/X11R6/include -L/usr/X11R6/lib $< -lX11 + * + */ + +#include +#include +#ifdef HAVE_SELECT +#include +#include +#include +#else +#include +#endif +#include +#include + +#define __ARGS(x) x + +/* Client API */ +char * sendToVim __ARGS((Display *dpy, char *name, char *cmd, int asKeys, int *code)); + +#ifdef MAIN +/* A sample program */ +main(int argc, char **argv) +{ + char *res; + int code; + + if (argc == 4) + { + if ((res = sendToVim(XOpenDisplay(NULL), argv[2], argv[3], + argv[1][0] != 'e', &code)) != NULL) + { + if (code) + printf("Error code returned: %d\n", code); + puts(res); + } + exit(0); + } + else + fprintf(stderr, "Usage: %s {k|e} ", argv[0]); + + exit(1); +} +#endif + +/* + * Maximum size property that can be read at one time by + * this module: + */ + +#define MAX_PROP_WORDS 100000 + +/* + * Forward declarations for procedures defined later in this file: + */ + +static int x_error_check __ARGS((Display *dpy, XErrorEvent *error_event)); +static int AppendPropCarefully __ARGS((Display *display, + Window window, Atom property, char *value, int length)); +static Window LookupName __ARGS((Display *dpy, char *name, + int delete, char **loose)); +static int SendInit __ARGS((Display *dpy)); +static char *SendEventProc __ARGS((Display *dpy, XEvent *eventPtr, + int expect, int *code)); +static int IsSerialName __ARGS((char *name)); + +/* Private variables */ +static Atom registryProperty = None; +static Atom commProperty = None; +static Window commWindow = None; +static int got_x_error = FALSE; + + +/* + * sendToVim -- + * Send to an instance of Vim via the X display. + * + * Results: + * A string with the result or NULL. Caller must free if non-NULL + */ + + char * +sendToVim(dpy, name, cmd, asKeys, code) + Display *dpy; /* Where to send. */ + char *name; /* Where to send. */ + char *cmd; /* What to send. */ + int asKeys; /* Interpret as keystrokes or expr ? */ + int *code; /* Return code. 0 => OK */ +{ + Window w; + Atom *plist; + XErrorHandler old_handler; +#define STATIC_SPACE 500 + char *property, staticSpace[STATIC_SPACE]; + int length; + int res; + static int serial = 0; /* Running count of sent commands. + * Used to give each command a + * different serial number. */ + XEvent event; + XPropertyEvent *e = (XPropertyEvent *)&event; + time_t start; + char *result; + char *loosename = NULL; + + if (commProperty == None && dpy != NULL) + { + if (SendInit(dpy) < 0) + return NULL; + } + + /* + * Bind the server name to a communication window. + * + * Find any survivor with a serialno attached to the name if the + * original registrant of the wanted name is no longer present. + * + * Delete any lingering names from dead editors. + */ + + old_handler = XSetErrorHandler(x_error_check); + while (TRUE) + { + got_x_error = FALSE; + w = LookupName(dpy, name, 0, &loosename); + /* Check that the window is hot */ + if (w != None) + { + plist = XListProperties(dpy, w, &res); + XSync(dpy, False); + if (plist != NULL) + XFree(plist); + if (got_x_error) + { + LookupName(dpy, loosename ? loosename : name, + /*DELETE=*/TRUE, NULL); + continue; + } + } + break; + } + if (w == None) + { + fprintf(stderr, "no registered server named %s\n", name); + return NULL; + } + else if (loosename != NULL) + name = loosename; + + /* + * Send the command to target interpreter by appending it to the + * comm window in the communication window. + */ + + length = strlen(name) + strlen(cmd) + 10; + if (length <= STATIC_SPACE) + property = staticSpace; + else + property = (char *) malloc((unsigned) length); + + serial++; + sprintf(property, "%c%c%c-n %s%c-s %s", + 0, asKeys ? 'k' : 'c', 0, name, 0, cmd); + if (name == loosename) + free(loosename); + if (!asKeys) + { + /* Add a back reference to our comm window */ + sprintf(property + length, "%c-r %x %d", 0, (uint) commWindow, serial); + length += strlen(property + length + 1) + 1; + } + + res = AppendPropCarefully(dpy, w, commProperty, property, length + 1); + if (length > STATIC_SPACE) + free(property); + if (res < 0) + { + fprintf(stderr, "Failed to send command to the destination program\n"); + return NULL; + } + + if (asKeys) /* There is no answer for this - Keys are sent async */ + return NULL; + + + /* + * Enter a loop processing X events & pooling chars until we see the result + */ + +#define SEND_MSEC_POLL 50 + + time(&start); + while ((time((time_t *) 0) - start) < 60) + { + /* Look out for the answer */ +#ifndef HAVE_SELECT + struct pollfd fds; + + fds.fd = ConnectionNumber(dpy); + fds.events = POLLIN; + if (poll(&fds, 1, SEND_MSEC_POLL) < 0) + break; +#else + fd_set fds; + struct timeval tv; + + tv.tv_sec = 0; + tv.tv_usec = SEND_MSEC_POLL * 1000; + FD_ZERO(&fds); + FD_SET(ConnectionNumber(dpy), &fds); + if (select(ConnectionNumber(dpy) + 1, &fds, NULL, NULL, &tv) < 0) + break; +#endif + while (XEventsQueued(dpy, QueuedAfterReading) > 0) + { + XNextEvent(dpy, &event); + if (event.type == PropertyNotify && e->window == commWindow) + if ((result = SendEventProc(dpy, &event, serial, code)) != NULL) + return result; + } + } + return NULL; +} + + +/* + * SendInit -- + * This procedure is called to initialize the + * communication channels for sending commands and + * receiving results. + */ + + static int +SendInit(dpy) + Display *dpy; +{ + XErrorHandler old_handler; + + /* + * Create the window used for communication, and set up an + * event handler for it. + */ + old_handler = XSetErrorHandler(x_error_check); + got_x_error = FALSE; + + commProperty = XInternAtom(dpy, "Comm", False); + /* Change this back to "InterpRegistry" to talk to tk processes */ + registryProperty = XInternAtom(dpy, "VimRegistry", False); + + if (commWindow == None) + { + commWindow = + XCreateSimpleWindow(dpy, XDefaultRootWindow(dpy), + getpid(), 0, 10, 10, 0, + WhitePixel(dpy, DefaultScreen(dpy)), + WhitePixel(dpy, DefaultScreen(dpy))); + XSelectInput(dpy, commWindow, PropertyChangeMask); + } + + XSync(dpy, False); + (void) XSetErrorHandler(old_handler); + + return got_x_error ? -1 : 0; +} + +/* + * LookupName -- + * Given an interpreter name, see if the name exists in + * the interpreter registry for a particular display. + * + * Results: + * If the given name is registered, return the ID of + * the window associated with the name. If the name + * isn't registered, then return 0. + */ + + static Window +LookupName(dpy, name, delete, loose) + Display *dpy; /* Display whose registry to check. */ + char *name; /* Name of an interpreter. */ + int delete; /* If non-zero, delete info about name. */ + char **loose; /* Do another search matching -999 if not found + Return result here if a match is found */ +{ + unsigned char *regProp, *entry; + unsigned char *p; + int result, actualFormat; + unsigned long numItems, bytesAfter; + Atom actualType; + Window returnValue; + + /* + * Read the registry property. + */ + + regProp = NULL; + result = XGetWindowProperty(dpy, RootWindow(dpy, 0), registryProperty, 0, + MAX_PROP_WORDS, False, XA_STRING, &actualType, + &actualFormat, &numItems, &bytesAfter, + ®Prop); + + if (actualType == None) + return 0; + + /* + * If the property is improperly formed, then delete it. + */ + + if ((result != Success) || (actualFormat != 8) || (actualType != XA_STRING)) + { + if (regProp != NULL) + XFree(regProp); + XDeleteProperty(dpy, RootWindow(dpy, 0), registryProperty); + return 0; + } + + /* + * Scan the property for the desired name. + */ + + returnValue = None; + entry = NULL; /* Not needed, but eliminates compiler warning. */ + for (p = regProp; (p - regProp) < numItems; ) + { + entry = p; + while ((*p != 0) && (!isspace(*p))) + p++; + if ((*p != 0) && (strcasecmp(name, p + 1) == 0)) + { + sscanf(entry, "%x", (uint*) &returnValue); + break; + } + while (*p != 0) + p++; + p++; + } + + if (loose != NULL && returnValue == None && !IsSerialName(name)) + { + for (p = regProp; (p - regProp) < numItems; ) + { + entry = p; + while ((*p != 0) && (!isspace(*p))) + p++; + if ((*p != 0) && IsSerialName(p + 1) + && (strncmp(name, p + 1, strlen(name)) == 0)) + { + sscanf(entry, "%x", (uint*) &returnValue); + *loose = strdup(p + 1); + break; + } + while (*p != 0) + p++; + p++; + } + } + + /* + * Delete the property, if that is desired (copy down the + * remainder of the registry property to overlay the deleted + * info, then rewrite the property). + */ + + if ((delete) && (returnValue != None)) + { + int count; + + while (*p != 0) + p++; + p++; + count = numItems - (p-regProp); + if (count > 0) + memcpy(entry, p, count); + XChangeProperty(dpy, RootWindow(dpy, 0), registryProperty, XA_STRING, + 8, PropModeReplace, regProp, + (int) (numItems - (p-entry))); + XSync(dpy, False); + } + + XFree(regProp); + return returnValue; +} + + static char * +SendEventProc(dpy, eventPtr, expected, code) + Display *dpy; + XEvent *eventPtr; /* Information about event. */ + int expected; /* The one were waiting for */ + int *code; /* Return code. 0 => OK */ +{ + unsigned char *propInfo; + unsigned char *p; + int result, actualFormat; + int retCode; + unsigned long numItems, bytesAfter; + Atom actualType; + + if ((eventPtr->xproperty.atom != commProperty) + || (eventPtr->xproperty.state != PropertyNewValue)) + { + return; + } + + /* + * Read the comm property and delete it. + */ + + propInfo = NULL; + result = XGetWindowProperty(dpy, commWindow, commProperty, 0, + MAX_PROP_WORDS, True, XA_STRING, &actualType, + &actualFormat, &numItems, &bytesAfter, + &propInfo); + + /* + * If the property doesn't exist or is improperly formed + * then ignore it. + */ + + if ((result != Success) || (actualType != XA_STRING) + || (actualFormat != 8)) + { + if (propInfo != NULL) + { + XFree(propInfo); + } + return; + } + + /* + * Several commands and results could arrive in the property at + * one time; each iteration through the outer loop handles a + * single command or result. + */ + + for (p = propInfo; (p - propInfo) < numItems; ) + { + /* + * Ignore leading NULs; each command or result starts with a + * NUL so that no matter how badly formed a preceding command + * is, we'll be able to tell that a new command/result is + * starting. + */ + + if (*p == 0) + { + p++; + continue; + } + + if ((*p == 'r') && (p[1] == 0)) + { + int serial, gotSerial; + char *res; + + /* + * This is a reply to some command that we sent out. Iterate + * over all of its options. Stop when we reach the end of the + * property or something that doesn't look like an option. + */ + + p += 2; + gotSerial = 0; + res = ""; + retCode = 0; + while (((p-propInfo) < numItems) && (*p == '-')) + { + switch (p[1]) + { + case 'r': + if (p[2] == ' ') + res = p + 3; + break; + case 's': + if (sscanf(p + 2, " %d", &serial) == 1) + gotSerial = 1; + break; + case 'c': + if (sscanf(p + 2, " %d", &retCode) != 1) + retCode = 0; + break; + } + while (*p != 0) + p++; + p++; + } + + if (!gotSerial) + continue; + + if (code != NULL) + *code = retCode; + return serial == expected ? strdup(res) : NULL; + } + else + { + /* + * Didn't recognize this thing. Just skip through the next + * null character and try again. + * Also, throw away commands that we cant process anyway. + */ + + while (*p != 0) + p++; + p++; + } + } + XFree(propInfo); +} + +/* + * AppendPropCarefully -- + * + * Append a given property to a given window, but set up + * an X error handler so that if the append fails this + * procedure can return an error code rather than having + * Xlib panic. + * + * Return: + * 0 on OK - -1 on error + *-------------------------------------------------------------- + */ + + static int +AppendPropCarefully(dpy, window, property, value, length) + Display *dpy; /* Display on which to operate. */ + Window window; /* Window whose property is to + * be modified. */ + Atom property; /* Name of property. */ + char *value; /* Characters to append to property. */ + int length; /* How much to append */ +{ + XErrorHandler old_handler; + + old_handler = XSetErrorHandler(x_error_check); + got_x_error = FALSE; + XChangeProperty(dpy, window, property, XA_STRING, 8, + PropModeAppend, value, length); + XSync(dpy, False); + (void) XSetErrorHandler(old_handler); + return got_x_error ? -1 : 0; +} + + +/* + * Another X Error handler, just used to check for errors. + */ +/* ARGSUSED */ + static int +x_error_check(dpy, error_event) + Display *dpy; + XErrorEvent *error_event; +{ + got_x_error = TRUE; + return 0; +} + +/* + * Check if "str" looks like it had a serial number appended. + * Actually just checks if the name ends in a digit. + */ + static int +IsSerialName(str) + char *str; +{ + int len = strlen(str); + + return (len > 1 && isdigit(str[len - 1])); +} diff --git a/vim/bundle/ubuntu-vim72/tutor/README.el.cp737.txt b/vim/bundle/ubuntu-vim72/tutor/README.el.cp737.txt new file mode 100644 index 0000000..426f929 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/README.el.cp737.txt @@ -0,0 +1,24 @@ +’¦ Tutor œå¤˜  £å˜ "®œ ¨¦¤˜¡« ¡ã" §œ¨ ãšž©ž š ˜ ¤â¦¬ª ®¨ã©«œª «¦¬ +©¬¤«á¡«ž Vim. + +Ž  §œ¨ ©©æ«œ¨¦  ¤â¦  ®¨ã©«œª £§¦¨¦ç¤ ¤˜ «¦ «œ¢œ é©¦¬¤ ©œ ¢ šæ«œ¨¦ ˜§æ +£å˜ 騘. ’¦ ˜§¦«â¢œ©£˜ œå¤˜  æ«  £§¦¨œå«œ ¤˜ ¡á¤œ«œ £å˜ ˜§¢ã œ¨š˜©å˜ +œ§œ¥œ¨š˜©å˜ª ¡œ £â¤¦¬ ®¨ž© £¦§¦ é¤«˜ª «¦¤ ©¬¤«á¡«ž Vim. + +’¦ Tutor œå¤˜  ⤘ ˜¨®œå¦ §¦¬ §œ¨ â®œ  «˜ £˜Ÿã£˜«˜ «žª §¨¦§˜¨˜©¡œ¬ãª. +‹§¦¨œå«œ ¤˜ œ¡«œ¢â©œ«œ ˜§¢á "vim tutor" ¡˜  £œ«á ¤˜ ˜¡¦¢¦¬Ÿã©œ«œ « ª +¦›žšåœª ©«˜ £˜Ÿã£˜«˜. ’˜ £˜Ÿã£˜«˜ Ÿ˜ ©˜ª §¦ç¤œ ¤˜ «¨¦§¦§¦ ã©œ«œ +«¦ ˜¨®œå¦, œ§¦£â¤àª ‹†Œ ’Ž ‰€Œ„’„ ‘’Ž —’Ž’“Ž €Œ’ˆ‚€”Ž ‘€‘. + +‘œ ©ç©«ž£˜ Unix £§¦¨œå«œ œ§å©žª ¤˜ ®¨ž© £¦§¦ ã©œ«œ «¦ §¨æš¨˜££˜ "vimtutor". +‡˜ ›ž£ ¦¬¨šã©œ  §¨é«˜ ⤘ §¨æ®œ ¨¦ ˜¤«åš¨˜­¦ «¦¬ tutor. + +ë®à ©¡œ­«œå ¤˜ §¨¦©Ÿâ©à §œ¨ ©©æ«œ¨˜ §¨¦®à¨ž£â¤˜ £˜Ÿã£˜«˜ ˜¢¢á ›œ¤ â®à ™¨œ  +«¦¤ ˜§˜¨˜å«ž«¦ ®¨æ¤¦. „¤ž£œ¨é©«œ £œ §˜¨˜¡˜¢é §éª Ÿ˜ «¦ Ÿâ¢˜«œ ¡˜  ©«œå¢œ«œ +£¦¬ ¦§¦ œ©›ã§¦«œ ™œ¢« é©œ ª ¡á¤œ«œ. + +Bob Ware, Colorado School of Mines, Golden, Co 80401, USA +(303) 273-3987 +bware@mines.colorado.edu bware@slate.mines.colorado.edu bware@mines.bitnet + +[’¦ ˜¨®œå¦ ˜¬«æ «¨¦§¦§¦ ãŸž¡œ š ˜ «¦¤ Vim ˜§æ «¦¤ Bram Moolenaar] diff --git a/vim/bundle/ubuntu-vim72/tutor/README.el.txt b/vim/bundle/ubuntu-vim72/tutor/README.el.txt new file mode 100644 index 0000000..b2f5e07 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/README.el.txt @@ -0,0 +1,24 @@ +Ôï Tutor åßíáé ìßá "÷åéñïíáêôéêÞ" ðåñéÞãçóç ãéá íÝïõò ÷ñÞóôåò ôïõ +óõíôÜêôç Vim. + +Ïé ðåñéóóüôåñïé íÝïé ÷ñÞóôåò ìðïñïýí íá ôï ôåëåéþóïõí óå ëéãüôåñï áðü +ìßá þñá. Ôï áðïôÝëåóìá åßíáé üôé ìðïñåßôå íá êÜíåôå ìßá áðëÞ åñãáóßá +åðåîåñãáóßáò êåéìÝíïõ ÷ñçóéìïðïéþíôáò ôïí óõíôÜêôç Vim. + +Ôï Tutor åßíáé Ýíá áñ÷åßï ðïõ ðåñéÝ÷åé ôá ìáèÞìáôá ôçò ðñïðáñáóêåõÞò. +Ìðïñåßôå íá åêôåëÝóåôå áðëÜ "vim tutor" êáé ìåôÜ íá áêïëïõèÞóåôå ôéò +ïäçãßåò óôá ìáèÞìáôá. Ôá ìáèÞìáôá èá óáò ðïýíå íá ôñïðïðïéÞóåôå +ôï áñ÷åßï, åðïìÝíùò ÌÇÍ ÔÏ ÊÁÍÅÔÅ ÓÔÏ ÐÑÙÔÏÔÕÐÏ ÁÍÔÉÃÑÁÖÏ ÓÁÓ. + +Óå óýóôçìá Unix ìðïñåßôå åðßóçò íá ÷ñçóéìïðïéÞóåôå ôï ðñüãñáììá "vimtutor". +Èá äçìéïõñãÞóåé ðñþôá Ýíá ðñü÷åéñï áíôßãñáöï ôïõ tutor. + +¸÷ù óêåöôåß íá ðñïóèÝóù ðåñéóóüôåñá ðñï÷ùñçìÝíá ìáèÞìáôá áëëÜ äåí Ý÷ù âñåé +ôïí áðáñáßôçôï ÷ñüíï. Åíçìåñþóôå ìå ðáñáêáëþ ðþò èá ôï èÝëáôå êáé óôåßëåôå +ìïõ ïðïéåóäÞðïôå âåëôéþóåéò êÜíåôå. + +Bob Ware, Colorado School of Mines, Golden, Co 80401, USA +(303) 273-3987 +bware@mines.colorado.edu bware@slate.mines.colorado.edu bware@mines.bitnet + +[Ôï áñ÷åßï áõôü ôñïðïðïéÞèçêå ãéá ôïí Vim áðü ôïí Bram Moolenaar] diff --git a/vim/bundle/ubuntu-vim72/tutor/README.txt b/vim/bundle/ubuntu-vim72/tutor/README.txt new file mode 100644 index 0000000..77097c1 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/README.txt @@ -0,0 +1,22 @@ +Tutor is a "hands on" tutorial for new users of the Vim editor. + +Most new users can get through it in less than one hour. The result +is that you can do a simple editing task using the Vim editor. + +Tutor is a file that contains the tutorial lessons. You can simply +execute "vim tutor" and then follow the instructions in the lessons. +The lessons tell you to modify the file, so DON'T DO THIS ON YOUR +ORIGINAL COPY. + +On Unix you can also use the "vimtutor" program. It will make a +scratch copy of the tutor first. + +I have considered adding more advanced lessons but have not found the +time. Please let me know how you like it and send any improvements you +make. + +Bob Ware, Colorado School of Mines, Golden, Co 80401, USA +(303) 273-3987 +bware@mines.colorado.edu bware@slate.mines.colorado.edu bware@mines.bitnet + +[This file was modified for Vim by Bram Moolenaar] diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor b/vim/bundle/ubuntu-vim72/tutor/tutor new file mode 100644 index 0000000..31ba710 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor @@ -0,0 +1,970 @@ +=============================================================================== += W e l c o m e t o t h e V I M T u t o r - Version 1.7 = +=============================================================================== + + Vim is a very powerful editor that has many commands, too many to + explain in a tutor such as this. This tutor is designed to describe + enough of the commands that you will be able to easily use Vim as + an all-purpose editor. + + The approximate time required to complete the tutor is 25-30 minutes, + depending upon how much time is spent with experimentation. + + ATTENTION: + The commands in the lessons will modify the text. Make a copy of this + file to practise on (if you started "vimtutor" this is already a copy). + + It is important to remember that this tutor is set up to teach by + use. That means that you need to execute the commands to learn them + properly. If you only read the text, you will forget the commands! + + Now, make sure that your Shift-Lock key is NOT depressed and press + the j key enough times to move the cursor so that Lesson 1.1 + completely fills the screen. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 1.1: MOVING THE CURSOR + + + ** To move the cursor, press the h,j,k,l keys as indicated. ** + ^ + k Hint: The h key is at the left and moves left. + < h l > The l key is at the right and moves right. + j The j key looks like a down arrow. + v + 1. Move the cursor around the screen until you are comfortable. + + 2. Hold down the down key (j) until it repeats. + Now you know how to move to the next lesson. + + 3. Using the down key, move to Lesson 1.2. + +NOTE: If you are ever unsure about something you typed, press to place + you in Normal mode. Then retype the command you wanted. + +NOTE: The cursor keys should also work. But using hjkl you will be able to + move around much faster, once you get used to it. Really! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 1.2: EXITING VIM + + + !! NOTE: Before executing any of the steps below, read this entire lesson!! + + 1. Press the key (to make sure you are in Normal mode). + + 2. Type: :q! . + This exits the editor, DISCARDING any changes you have made. + + 3. When you see the shell prompt, type the command that got you into this + tutor. That would be: vimtutor + + 4. If you have these steps memorized and are confident, execute steps + 1 through 3 to exit and re-enter the editor. + +NOTE: :q! discards any changes you made. In a few lessons you + will learn how to save the changes to a file. + + 5. Move the cursor down to Lesson 1.3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 1.3: TEXT EDITING - DELETION + + + ** Press x to delete the character under the cursor. ** + + 1. Move the cursor to the line below marked --->. + + 2. To fix the errors, move the cursor until it is on top of the + character to be deleted. + + 3. Press the x key to delete the unwanted character. + + 4. Repeat steps 2 through 4 until the sentence is correct. + +---> The ccow jumpedd ovverr thhe mooon. + + 5. Now that the line is correct, go on to Lesson 1.4. + +NOTE: As you go through this tutor, do not try to memorize, learn by usage. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 1.4: TEXT EDITING - INSERTION + + + ** Press i to insert text. ** + + 1. Move the cursor to the first line below marked --->. + + 2. To make the first line the same as the second, move the cursor on top + of the first character AFTER where the text is to be inserted. + + 3. Press i and type in the necessary additions. + + 4. As each error is fixed press to return to Normal mode. + Repeat steps 2 through 4 to correct the sentence. + +---> There is text misng this . +---> There is some text missing from this line. + + 5. When you are comfortable inserting text move to lesson 1.5. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 1.5: TEXT EDITING - APPENDING + + + ** Press A to append text. ** + + 1. Move the cursor to the first line below marked --->. + It does not matter on what character the cursor is in that line. + + 2. Press A and type in the necessary additions. + + 3. As the text has been appended press to return to Normal mode. + + 4. Move the cursor to the second line marked ---> and repeat + steps 2 and 3 to correct this sentence. + +---> There is some text missing from th + There is some text missing from this line. +---> There is also some text miss + There is also some text missing here. + + 5. When you are comfortable appending text move to lesson 1.6. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 1.6: EDITING A FILE + + ** Use :wq to save a file and exit. ** + + !! NOTE: Before executing any of the steps below, read this entire lesson!! + + 1. Exit this tutor as you did in lesson 1.2: :q! + Or, if you have access to another terminal, do the following there. + + 2. At the shell prompt type this command: vim tutor + 'vim' is the command to start the Vim editor, 'tutor' is the name of the + file you wish to edit. Use a file that may be changed. + + 3. Insert and delete text as you learned in the previous lessons. + + 4. Save the file with changes and exit Vim with: :wq + + 5. If you have quit vimtutor in step 1 restart the vimtutor and move down to + the following summary. + + 6. After reading the above steps and understanding them: do it. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 1 SUMMARY + + + 1. The cursor is moved using either the arrow keys or the hjkl keys. + h (left) j (down) k (up) l (right) + + 2. To start Vim from the shell prompt type: vim FILENAME + + 3. To exit Vim type: :q! to trash all changes. + OR type: :wq to save the changes. + + 4. To delete the character at the cursor type: x + + 5. To insert or append text type: + i type inserted text insert before the cursor + A type appended text append after the line + +NOTE: Pressing will place you in Normal mode or will cancel + an unwanted and partially completed command. + +Now continue with Lesson 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.1: DELETION COMMANDS + + + ** Type dw to delete a word. ** + + 1. Press to make sure you are in Normal mode. + + 2. Move the cursor to the line below marked --->. + + 3. Move the cursor to the beginning of a word that needs to be deleted. + + 4. Type dw to make the word disappear. + + NOTE: The letter d will appear on the last line of the screen as you type + it. Vim is waiting for you to type w . If you see another character + than d you typed something wrong; press and start over. + +---> There are a some words fun that don't belong paper in this sentence. + + 5. Repeat steps 3 and 4 until the sentence is correct and go to Lesson 2.2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.2: MORE DELETION COMMANDS + + + ** Type d$ to delete to the end of the line. ** + + 1. Press to make sure you are in Normal mode. + + 2. Move the cursor to the line below marked --->. + + 3. Move the cursor to the end of the correct line (AFTER the first . ). + + 4. Type d$ to delete to the end of the line. + +---> Somebody typed the end of this line twice. end of this line twice. + + + 5. Move on to Lesson 2.3 to understand what is happening. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.3: ON OPERATORS AND MOTIONS + + + Many commands that change text are made from an operator and a motion. + The format for a delete command with the d delete operator is as follows: + + d motion + + Where: + d - is the delete operator. + motion - is what the operator will operate on (listed below). + + A short list of motions: + w - until the start of the next word, EXCLUDING its first character. + e - to the end of the current word, INCLUDING the last character. + $ - to the end of the line, INCLUDING the last character. + + Thus typing de will delete from the cursor to the end of the word. + +NOTE: Pressing just the motion while in Normal mode without an operator will + move the cursor as specified. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.4: USING A COUNT FOR A MOTION + + + ** Typing a number before a motion repeats it that many times. ** + + 1. Move the cursor to the start of the line marked ---> below. + + 2. Type 2w to move the cursor two words forward. + + 3. Type 3e to move the cursor to the end of the third word forward. + + 4. Type 0 (zero) to move to the start of the line. + + 5. Repeat steps 2 and 3 with different numbers. + +---> This is just a line with words you can move around in. + + 6. Move on to Lesson 2.5. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.5: USING A COUNT TO DELETE MORE + + + ** Typing a number with an operator repeats it that many times. ** + + In the combination of the delete operator and a motion mentioned above you + insert a count before the motion to delete more: + d number motion + + 1. Move the cursor to the first UPPER CASE word in the line marked --->. + + 2. Type d2w to delete the two UPPER CASE words + + 3. Repeat steps 1 and 2 with a different count to delete the consecutive + UPPER CASE words with one command + +---> this ABC DE line FGHI JK LMN OP of words is Q RS TUV cleaned up. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.6: OPERATING ON LINES + + + ** Type dd to delete a whole line. ** + + Due to the frequency of whole line deletion, the designers of Vi decided + it would be easier to simply type two d's to delete a line. + + 1. Move the cursor to the second line in the phrase below. + 2. Type dd to delete the line. + 3. Now move to the fourth line. + 4. Type 2dd to delete two lines. + +---> 1) Roses are red, +---> 2) Mud is fun, +---> 3) Violets are blue, +---> 4) I have a car, +---> 5) Clocks tell time, +---> 6) Sugar is sweet +---> 7) And so are you. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.7: THE UNDO COMMAND + + + ** Press u to undo the last commands, U to fix a whole line. ** + + 1. Move the cursor to the line below marked ---> and place it on the + first error. + 2. Type x to delete the first unwanted character. + 3. Now type u to undo the last command executed. + 4. This time fix all the errors on the line using the x command. + 5. Now type a capital U to return the line to its original state. + 6. Now type u a few times to undo the U and preceding commands. + 7. Now type CTRL-R (keeping CTRL key pressed while hitting R) a few times + to redo the commands (undo the undo's). + +---> Fiix the errors oon thhis line and reeplace them witth undo. + + 8. These are very useful commands. Now move on to the Lesson 2 Summary. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2 SUMMARY + + + 1. To delete from the cursor up to the next word type: dw + 2. To delete from the cursor to the end of a line type: d$ + 3. To delete a whole line type: dd + + 4. To repeat a motion prepend it with a number: 2w + 5. The format for a change command is: + operator [number] motion + where: + operator - is what to do, such as d for delete + [number] - is an optional count to repeat the motion + motion - moves over the text to operate on, such as w (word), + $ (to the end of line), etc. + + 6. To move to the start of the line use a zero: 0 + + 7. To undo previous actions, type: u (lowercase u) + To undo all the changes on a line, type: U (capital U) + To undo the undo's, type: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 3.1: THE PUT COMMAND + + + ** Type p to put previously deleted text after the cursor. ** + + 1. Move the cursor to the first ---> line below. + + 2. Type dd to delete the line and store it in a Vim register. + + 3. Move the cursor to the c) line, ABOVE where the deleted line should go. + + 4. Type p to put the line below the cursor. + + 5. Repeat steps 2 through 4 to put all the lines in correct order. + +---> d) Can you learn too? +---> b) Violets are blue, +---> c) Intelligence is learned, +---> a) Roses are red, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 3.2: THE REPLACE COMMAND + + + ** Type rx to replace the character at the cursor with x . ** + + 1. Move the cursor to the first line below marked --->. + + 2. Move the cursor so that it is on top of the first error. + + 3. Type r and then the character which should be there. + + 4. Repeat steps 2 and 3 until the first line is equal to the second one. + +---> Whan this lime was tuoed in, someone presswd some wrojg keys! +---> When this line was typed in, someone pressed some wrong keys! + + 5. Now move on to Lesson 3.3. + +NOTE: Remember that you should be learning by doing, not memorization. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 3.3: THE CHANGE OPERATOR + + + ** To change until the end of a word, type ce . ** + + 1. Move the cursor to the first line below marked --->. + + 2. Place the cursor on the u in lubw. + + 3. Type ce and the correct word (in this case, type ine ). + + 4. Press and move to the next character that needs to be changed. + + 5. Repeat steps 3 and 4 until the first sentence is the same as the second. + +---> This lubw has a few wptfd that mrrf changing usf the change operator. +---> This line has a few words that need changing using the change operator. + +Notice that ce deletes the word and places you in Insert mode. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 3.4: MORE CHANGES USING c + + + ** The change operator is used with the same motions as delete. ** + + 1. The change operator works in the same way as delete. The format is: + + c [number] motion + + 2. The motions are the same, such as w (word) and $ (end of line). + + 3. Move to the first line below marked --->. + + 4. Move the cursor to the first error. + + 5. Type c$ and type the rest of the line like the second and press . + +---> The end of this line needs some help to make it like the second. +---> The end of this line needs to be corrected using the c$ command. + +NOTE: You can use the Backspace key to correct mistakes while typing. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 3 SUMMARY + + + 1. To put back text that has just been deleted, type p . This puts the + deleted text AFTER the cursor (if a line was deleted it will go on the + line below the cursor). + + 2. To replace the character under the cursor, type r and then the + character you want to have there. + + 3. The change operator allows you to change from the cursor to where the + motion takes you. eg. Type ce to change from the cursor to the end of + the word, c$ to change to the end of a line. + + 4. The format for change is: + + c [number] motion + +Now go on to the next lesson. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 4.1: CURSOR LOCATION AND FILE STATUS + + ** Type CTRL-G to show your location in the file and the file status. + Type G to move to a line in the file. ** + + NOTE: Read this entire lesson before executing any of the steps!! + + 1. Hold down the Ctrl key and press g . We call this CTRL-G. + A message will appear at the bottom of the page with the filename and the + position in the file. Remember the line number for Step 3. + +NOTE: You may see the cursor position in the lower right corner of the screen + This happens when the 'ruler' option is set (see :help 'ruler' ) + + 2. Press G to move you to the bottom of the file. + Type gg to move you to the start of the file. + + 3. Type the number of the line you were on and then G . This will + return you to the line you were on when you first pressed CTRL-G. + + 4. If you feel confident to do this, execute steps 1 through 3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 4.2: THE SEARCH COMMAND + + + ** Type / followed by a phrase to search for the phrase. ** + + 1. In Normal mode type the / character. Notice that it and the cursor + appear at the bottom of the screen as with the : command. + + 2. Now type 'errroor' . This is the word you want to search for. + + 3. To search for the same phrase again, simply type n . + To search for the same phrase in the opposite direction, type N . + + 4. To search for a phrase in the backward direction, use ? instead of / . + + 5. To go back to where you came from press CTRL-O (Keep Ctrl down while + pressing the letter o). Repeat to go back further. CTRL-I goes forward. + +---> "errroor" is not the way to spell error; errroor is an error. +NOTE: When the search reaches the end of the file it will continue at the + start, unless the 'wrapscan' option has been reset. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 4.3: MATCHING PARENTHESES SEARCH + + + ** Type % to find a matching ),], or } . ** + + 1. Place the cursor on any (, [, or { in the line below marked --->. + + 2. Now type the % character. + + 3. The cursor will move to the matching parenthesis or bracket. + + 4. Type % to move the cursor to the other matching bracket. + + 5. Move the cursor to another (,),[,],{ or } and see what % does. + +---> This ( is a test line with ('s, ['s ] and {'s } in it. )) + + +NOTE: This is very useful in debugging a program with unmatched parentheses! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 4.4: THE SUBSTITUTE COMMAND + + + ** Type :s/old/new/g to substitute 'new' for 'old'. ** + + 1. Move the cursor to the line below marked --->. + + 2. Type :s/thee/the . Note that this command only changes the + first occurrence of "thee" in the line. + + 3. Now type :s/thee/the/g . Adding the g flag means to substitute + globally in the line, change all occurrences of "thee" in the line. + +---> thee best time to see thee flowers is in thee spring. + + 4. To change every occurrence of a character string between two lines, + type :#,#s/old/new/g where #,# are the line numbers of the range + of lines where the substitution is to be done. + Type :%s/old/new/g to change every occurrence in the whole file. + Type :%s/old/new/gc to find every occurrence in the whole file, + with a prompt whether to substitute or not. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 4 SUMMARY + + + 1. CTRL-G displays your location in the file and the file status. + G moves to the end of the file. + number G moves to that line number. + gg moves to the first line. + + 2. Typing / followed by a phrase searches FORWARD for the phrase. + Typing ? followed by a phrase searches BACKWARD for the phrase. + After a search type n to find the next occurrence in the same direction + or N to search in the opposite direction. + CTRL-O takes you back to older positions, CTRL-I to newer positions. + + 3. Typing % while the cursor is on a (,),[,],{, or } goes to its match. + + 4. To substitute new for the first old in a line type :s/old/new + To substitute new for all 'old's on a line type :s/old/new/g + To substitute phrases between two line #'s type :#,#s/old/new/g + To substitute all occurrences in the file type :%s/old/new/g + To ask for confirmation each time add 'c' :%s/old/new/gc + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 5.1: HOW TO EXECUTE AN EXTERNAL COMMAND + + + ** Type :! followed by an external command to execute that command. ** + + 1. Type the familiar command : to set the cursor at the bottom of the + screen. This allows you to enter a command-line command. + + 2. Now type the ! (exclamation point) character. This allows you to + execute any external shell command. + + 3. As an example type ls following the ! and then hit . This + will show you a listing of your directory, just as if you were at the + shell prompt. Or use :!dir if ls doesn't work. + +NOTE: It is possible to execute any external command this way, also with + arguments. + +NOTE: All : commands must be finished by hitting + From here on we will not always mention it. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 5.2: MORE ON WRITING FILES + + + ** To save the changes made to the text, type :w FILENAME. ** + + 1. Type :!dir or :!ls to get a listing of your directory. + You already know you must hit after this. + + 2. Choose a filename that does not exist yet, such as TEST. + + 3. Now type: :w TEST (where TEST is the filename you chose.) + + 4. This saves the whole file (the Vim Tutor) under the name TEST. + To verify this, type :!dir or :!ls again to see your directory. + +NOTE: If you were to exit Vim and start it again with vim TEST , the file + would be an exact copy of the tutor when you saved it. + + 5. Now remove the file by typing (MS-DOS): :!del TEST + or (Unix): :!rm TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 5.3: SELECTING TEXT TO WRITE + + + ** To save part of the file, type v motion :w FILENAME ** + + 1. Move the cursor to this line. + + 2. Press v and move the cursor to the fifth item below. Notice that the + text is highlighted. + + 3. Press the : character. At the bottom of the screen :'<,'> will appear. + + 4. Type w TEST , where TEST is a filename that does not exist yet. Verify + that you see :'<,'>w TEST before you press Enter. + + 5. Vim will write the selected lines to the file TEST. Use :!dir or !ls + to see it. Do not remove it yet! We will use it in the next lesson. + +NOTE: Pressing v starts Visual selection. You can move the cursor around + to make the selection bigger or smaller. Then you can use an operator + to do something with the text. For example, d deletes the text. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 5.4: RETRIEVING AND MERGING FILES + + + ** To insert the contents of a file, type :r FILENAME ** + + 1. Place the cursor just above this line. + +NOTE: After executing Step 2 you will see text from Lesson 5.3. Then move + DOWN to see this lesson again. + + 2. Now retrieve your TEST file using the command :r TEST where TEST is + the name of the file you used. + The file you retrieve is placed below the cursor line. + + 3. To verify that a file was retrieved, cursor back and notice that there + are now two copies of Lesson 5.3, the original and the file version. + +NOTE: You can also read the output of an external command. For example, + :r !ls reads the output of the ls command and puts it below the + cursor. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 5 SUMMARY + + + 1. :!command executes an external command. + + Some useful examples are: + (MS-DOS) (Unix) + :!dir :!ls - shows a directory listing. + :!del FILENAME :!rm FILENAME - removes file FILENAME. + + 2. :w FILENAME writes the current Vim file to disk with name FILENAME. + + 3. v motion :w FILENAME saves the Visually selected lines in file + FILENAME. + + 4. :r FILENAME retrieves disk file FILENAME and puts it below the + cursor position. + + 5. :r !dir reads the output of the dir command and puts it below the + cursor position. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 6.1: THE OPEN COMMAND + + + ** Type o to open a line below the cursor and place you in Insert mode. ** + + 1. Move the cursor to the line below marked --->. + + 2. Type the lowercase letter o to open up a line BELOW the cursor and place + you in Insert mode. + + 3. Now type some text and press to exit Insert mode. + +---> After typing o the cursor is placed on the open line in Insert mode. + + 4. To open up a line ABOVE the cursor, simply type a capital O , rather + than a lowercase o. Try this on the line below. + +---> Open up a line above this by typing O while the cursor is on this line. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 6.2: THE APPEND COMMAND + + + ** Type a to insert text AFTER the cursor. ** + + 1. Move the cursor to the start of the line below marked --->. + + 2. Press e until the cursor is on the end of li . + + 3. Type an a (lowercase) to append text AFTER the cursor. + + 4. Complete the word like the line below it. Press to exit Insert + mode. + + 5. Use e to move to the next incomplete word and repeat steps 3 and 4. + +---> This li will allow you to pract appendi text to a line. +---> This line will allow you to practice appending text to a line. + +NOTE: a, i and A all go to the same Insert mode, the only difference is where + the characters are inserted. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 6.3: ANOTHER WAY TO REPLACE + + + ** Type a capital R to replace more than one character. ** + + 1. Move the cursor to the first line below marked --->. Move the cursor to + the beginning of the first xxx . + + 2. Now press R and type the number below it in the second line, so that it + replaces the xxx . + + 3. Press to leave Replace mode. Notice that the rest of the line + remains unmodified. + + 4. Repeat the steps to replace the remaining xxx. + +---> Adding 123 to xxx gives you xxx. +---> Adding 123 to 456 gives you 579. + +NOTE: Replace mode is like Insert mode, but every typed character deletes an + existing character. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 6.4: COPY AND PASTE TEXT + + + ** Use the y operator to copy text and p to paste it ** + + 1. Go to the line marked with ---> below and place the cursor after "a)". + + 2. Start Visual mode with v and move the cursor to just before "first". + + 3. Type y to yank (copy) the highlighted text. + + 4. Move the cursor to the end of the next line: j$ + + 5. Type p to put (paste) the text. Then type: a second . + + 6. Use Visual mode to select " item.", yank it with y , move to the end of + the next line with j$ and put the text there with p . + +---> a) this is the first item. + b) + + NOTE: you can also use y as an operator; yw yanks one word. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 6.5: SET OPTION + + + ** Set an option so a search or substitute ignores case ** + + 1. Search for 'ignore' by entering: /ignore + Repeat several times by pressing n . + + 2. Set the 'ic' (Ignore case) option by entering: :set ic + + 3. Now search for 'ignore' again by pressing n + Notice that Ignore and IGNORE are now also found. + + 4. Set the 'hlsearch' and 'incsearch' options: :set hls is + + 5. Now type the search command again and see what happens: /ignore + + 6. To disable ignoring case enter: :set noic + +NOTE: To remove the highlighting of matches enter: :nohlsearch +NOTE: If you want to ignore case for just one search command, use \c + in the phrase: /ignore\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 6 SUMMARY + + 1. Type o to open a line BELOW the cursor and start Insert mode. + Type O to open a line ABOVE the cursor. + + 2. Type a to insert text AFTER the cursor. + Type A to insert text after the end of the line. + + 3. The e command moves to the end of a word. + + 4. The y operator yanks (copies) text, p puts (pastes) it. + + 5. Typing a capital R enters Replace mode until is pressed. + + 6. Typing ":set xxx" sets the option "xxx". Some options are: + 'ic' 'ignorecase' ignore upper/lower case when searching + 'is' 'incsearch' show partial matches for a search phrase + 'hls' 'hlsearch' highlight all matching phrases + You can either use the long or the short option name. + + 7. Prepend "no" to switch an option off: :set noic + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 7.1: GETTING HELP + + + ** Use the on-line help system ** + + Vim has a comprehensive on-line help system. To get started, try one of + these three: + - press the key (if you have one) + - press the key (if you have one) + - type :help + + Read the text in the help window to find out how the help works. + Type CTRL-W CTRL-W to jump from one window to another. + Type :q to close the help window. + + You can find help on just about any subject, by giving an argument to the + ":help" command. Try these (don't forget pressing ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 7.2: CREATE A STARTUP SCRIPT + + + ** Enable Vim features ** + + Vim has many more features than Vi, but most of them are disabled by + default. To start using more features you have to create a "vimrc" file. + + 1. Start editing the "vimrc" file. This depends on your system: + :e ~/.vimrc for Unix + :e $VIM/_vimrc for MS-Windows + + 2. Now read the example "vimrc" file contents: + :r $VIMRUNTIME/vimrc_example.vim + + 3. Write the file with: + :w + + The next time you start Vim it will use syntax highlighting. + You can add all your preferred settings to this "vimrc" file. + For more information type :help vimrc-intro + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 7.3: COMPLETION + + + ** Command line completion with CTRL-D and ** + + 1. Make sure Vim is not in compatible mode: :set nocp + + 2. Look what files exist in the directory: :!ls or :!dir + + 3. Type the start of a command: :e + + 4. Press CTRL-D and Vim will show a list of commands that start with "e". + + 5. Press and Vim will complete the command name to ":edit". + + 6. Now add a space and the start of an existing file name: :edit FIL + + 7. Press . Vim will complete the name (if it is unique). + +NOTE: Completion works for many commands. Just try pressing CTRL-D and + . It is especially useful for :help . + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 7 SUMMARY + + + 1. Type :help or press or to open a help window. + + 2. Type :help cmd to find help on cmd . + + 3. Type CTRL-W CTRL-W to jump to another window + + 4. Type :q to close the help window + + 5. Create a vimrc startup script to keep your preferred settings. + + 6. When typing a : command, press CTRL-D to see possible completions. + Press to use one completion. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + This concludes the Vim Tutor. It was intended to give a brief overview of + the Vim editor, just enough to allow you to use the editor fairly easily. + It is far from complete as Vim has many many more commands. Read the user + manual next: ":help user-manual". + + For further reading and studying, this book is recommended: + Vim - Vi Improved - by Steve Oualline + Publisher: New Riders + The first book completely dedicated to Vim. Especially useful for beginners. + There are many examples and pictures. + See http://iccf-holland.org/click5.html + + This book is older and more about Vi than Vim, but also recommended: + Learning the Vi Editor - by Linda Lamb + Publisher: O'Reilly & Associates Inc. + It is a good book to get to know almost anything you want to do with Vi. + The sixth edition also includes information on Vim. + + This tutorial was written by Michael C. Pierce and Robert K. Ware, + Colorado School of Mines using ideas supplied by Charles Smith, + Colorado State University. E-mail: bware@mines.colorado.edu. + + Modified for Vim by Bram Moolenaar. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.bj b/vim/bundle/ubuntu-vim72/tutor/tutor.bj new file mode 100644 index 0000000..642a8f3 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.bj @@ -0,0 +1,987 @@ +=============================================================================== += G o t i k a m i n n W I M M - S c h a i n e r - Fassung 1.7D = +=============================================================================== + + Dyr Wimm ist ayn gro mächtigs Blat, dös was mit aynn Wösn Befelh aufwartt; z + vil, däß myn s allsand in aynn Schainer wie dönn daader unterbräng. Der + Schainer ist yso aufbaut, däß yr halt netty die Befelh allsand bringt, wost + brauchst, däßst mit iem für s Eerste wirklich öbbs anfangen kanst. + Durchhinarechtn kanst di, wennst willst, in ayner halbetn Stund; dös haisst, + wennst di nit grooß mit n Pröbln und Tüftln aufhaltst. + + OBACHT: + Die Faudungen, wost daader finddst, gaand istig s Gwort öndern. Dösswögn + machst eyn n Böstn glei ayn Aamum von derer Dautticht daader. Haast alsnan + dös Gwort daader mit n Befelh "vimtutor bj" ausherlaassn, ist s ee schoon + ayn Aamum. + Mir kan s nit oft gnueg sagn, däß der Schainer daader istig gan n Üebn + ghoert. Also muesst schoon aau die Befelh ausfüern, wennst ys gscheid ler- + nen willst. Mit n Lösn yllain ist s +nit taan! + + Ietz schaust grad non, däß dein Föststölltastn nit druckt ist; und aft geest + glei aynmaal mit dyr j-Tastn abwärts (yso laaufft dös nömlich), hinst däßst + de gantze Letzn 1.1 auf n Bildschirm haast. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.1: MIT N MÖRKL UMAYNANDFARN + +** Dyrmitst mit n Mörkl umaynandkimmst, druck h, j, k und l wie unt zaigt. ** + ^ Ayn Öslsbrugg: + k De Tastn h ist winster und +geet aau gan winster. + < h l > S l leit zesm und richtt si gan zesm. + j S j kan myn wie aynn Pfeil gan unt seghn. + v Mit n k kimmst gan n KOPF. + 1. Ietz ruedertst ainfach mit n Mörkl auf n Bildschirm umaynand, hinst däßst + di sicher füelst. + 2. Halt d Abhin-Tastn (j) druckt; aft rumplt s ainfach weiter. Netty yso + kimmst gan dyr naehstn Letzn. + + 3. Wie gsait, ietz bewögst di also mit derer Tastn gan dyr Letzn 1.2. + +Non öbbs: Allweil, wenn dyr niemer ganz wol ist, wasst öbbenn druckt haast, aft + zipfst ; naacherd bist wider ganz gwon in dyr Befelhs-Artweis. + + + Nöbnbei gsait kimmst gwonerweil aau mit de Pfeiltastnen weiter. Aber + hjkl seind z haissn s Wimm-Urgstain; und de "Hörtn" seind ganz dyr- + für, däß myn bei +dene bleibt. Pröblt s ainfach aus! +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.2: ÖNN WIMM AUSSCHALTTN + + + ALSO, EE WENNST ÖBBS VON DAA UNT AUSFÜERST, LIS LIEBER ZEERST DE GANTZE LET- + ZN! + + 1. Druck d -Tastn, dyrmitst aau gwiß in dyr Befelhs-Artweis bist. + + 2. Demmlt :q! . + Daa dyrmit benddst ys Blat und verwirffst allss, wasst öbbenn göndert + haast. + + 3. Balst önn Eingib seghst, gib dö Faudung ein, wo di zo dönn Schainer brun- + gen haat, also vimtutor bj . + + 4. Also, wenn ietz allsse sitzt, naacherd füerst d Schritt 1 hinst 3 aus, mit + wasst ys Blat verlaasst und aft wider einhinkimmst. + +Anmörkung: Mit :q! verwirffst allss, wasst göndert older enther gschribn + haast. In aynn Öttlych Letznen lernst acht, wiest dös allss in ayner + Dautticht speichertst. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.3: GWORT BARECHTN - LÖSCHN + + + ** Druck x , dyrmitst dös Zaichen unter n Mörkl löschst. ** + + 1. Bewög di mit n Mörkl auf de mit ---> angmörkte Zeil unt. + + 2. Zo n Faeler Verbössern farst mit n Mörkl netty auf dös Zaichen, dös wo + glöscht ghoert. + + 3. Druck de Tastn x , däßst dös überflüssige Zaichen löschst. + + 4. Ietz tuest so lang weiter mit 2 hinst 4, hinst däß dyr Saz stimmt. + +---> De Kkuue sprangg übber nn Maanad. + + 5. Wenn ietz de Zeil verbössert ist, geest gan dyr Letzn 1.4. weiter. + +Und ganz wichtig: Dyrweilst dönn Schainer durcharechtst, versuech nit öbbenn, + allss auswendig z lernen; nän, lern ainfach mit n Anwenddn! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.4: GWORT BARECHTN - EINFÜEGN + + + ** Druck i , dyrmitst öbbs einfüegst. ** + + 1. Bewög önn Mörkl zo dyr eerstn untignen Zeil, wo mit ---> angeet. + + 2. Dyrmitst de eerste Zeil wie de zwaitte machst, bewög önn Mörkl auf dös + eerste Zaichen NAACH derer Stöll, daa wo s Gwort eingfüegt werdn sollt. + + 3. Druck i und gib dös ein, was abgeet. + + 4. Wenn ieweils ayn Faeler verweitert ist, aft druck ; und dyrmit kimmst + gan dyr Befelhsartweis zrugg. + So, und ietz tuest ainfach yso weiter, hinst däß dyr Saz stimmt. + +---> Daader gt dd öbbs b. +---> Daader geet diend öbbs ab. + + 5. Balst mainst, däßst ys Gwort-Einfüegn kanst, aft geest gan dyr Letzn 1.5. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.5: GWORT BARECHTN - ANFÜEGN + + + ** Druck A gan n Gwort Anfüegn. ** + + 1. Gee mit n Mörkl gan dyr eerstn untignen Zeil, wo ayn ---> dyrvor haat. + Daa ist s gleich, wo gnaun dyr Mörkl in derer Zeil steet. + + 2. Demmlt A und gib de entspröchetn Ergöntzungen ein. + + 3. Wennst mit n Anfüegn förtig bist, aft druckst , däßst wider eyn de + Befelhsartweis zruggkimmst. + + 4. So, und ietz geest aft non gan dyr zwaittn mit ---> angmörktn Zeil; und + daadl machst ys netty yso. + +---> In derer Zeil gee + In derer Zeil geet ayn Weeng ayn Gwort ab. +---> Aau daader stee + Aau daader steet öbbs Unvollstöndigs. + + 5. Wennst s Anfüegn von Gwort drauf haast, naacherd gee gan dyr Letzn 1.6. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.6: AYN DAUTTICHT BARECHTN + + + ** Mit :wq speichertst ayn Dautticht und verlaasst önn Wimm ganz. ** + + !! OBACHT: Ee wennst mit dönn alln daa unt weitertuest, lis zeerst de gantze + Letzn durch!! + + 1. Verlaaß also s Blat, wie s in dyr Letzn 1.2. haisst, mit :q! ! + + 2. Gib dö Faudung eyn n Eingib ein: vim Schainer . 'vim' ruefft s Blat + auf, und 'Schainer' haisst de Dautticht, wost barechtn willst. Dyrmit + haast also ayn Dautticht, dö wost barechtn kanst. + + 3. Ietz füegst öbbs ein older löschst öbbs, wiest ys in de vorignen Letznen + glernt haast. + + 4. Speichert de gönderte Dautticht und verlaaß önn Wimm mit :wq . + + 5. Schmeiß önn Wimmschainer neu an und gee gan dyr folgetn Zammenfassung. + + 6. Aft däßst de obignen Schritt glösn und käppt haast, kanst ys durchfüern. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 1 + + + 1. Dyr Mörkl werd mit de Tastnen hjkl older aau mit de Pfeiltastnen gsteuert. + h (winst) j (ab) k (auf) l (zes) + + 2. Um önn Wimm umbb n Eingib aus z ginnen, demmlt: vim DAUTTICHT . + + 3. Willst önn Wimm verlaassn und aau allss verwerffen, aft gibst ein: + :q! . + Gan n Verlaassn und Speichern aber zipfst :wq . + + 4. Willst dös Zaichen löschn, daa wo dyr Mörkl drauf ist, demmltst x . + + 5. Willst öbbs vor n Mörkl eingöbn, zipfst i und drafter . + Mechst ys aber eyn s Zeilnend anhinhöngen, benutzt ys A . + Und ainfach naach n Mörkl füegst ys mit a ein . + +Anmörkung: Druckst , kimmst eyn de Befelhsartweis zrugg older brichst ayn + Faudung ab, dö wo dyr schiefgangen ist. + + Ietz tue mit dyr Letzn 2 weiter. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.1.: LÖSHFAUDUNGEN + + + ** Demmlt dw , dyrmitst ayn Wort löschst ** + + 1. Druck , dyrmit s aau gwiß ist, däßst in dyr Befelhsartweis bist. + + 2. Bewög önn Mörkl zo dyr mit ---> angmörktn Zeil unt. + + 3. Und daa geest ietz auf n Anfang von aynn Wort, dös wo glöscht ghoert. + + 4. Zipf dw , däßst dös gantze Wort löschst. + + Nöbnbei: Dyr Buechstabn d erscheint auf dyr lösstn Zeil von n Bildschirm, + sobaldst n eingibst. Dyr Wimm wartt ietz drauf, däß öbbs kimmt, al- + so daader ayn w . Seghst freilich öbbs Anderts wie ayn d , + naacherd haast öbbs Falschs demmlt. Druck aft und pröblt + s non aynmaal. +---> Ayn Öttlych Wörter lustig ghoernd nit Fisper eyn dönn Saz einhin. + + 5. Äfert d Schritt 3 und 4, hinst däß dyr Saz pässt, und gee aft gan dyr + Letzn 2.2. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.2.: NON MEERER LÖSHFAUDUNGEN + + + ** Gib d$ ein, däßst hinst eyn s Zeilnend löschst. ** + + 1. Druck , dyrmitst aau gwiß in dyr Befelhsartweis bist. + + 2. Bewög önn Mörkl hinst eyn de mit ---> angmörkte Zeil untn. + + 3. Gee mit n Mörkl auf s End von dyr faelerfreien Zeil, NAACH n eerstn . . + + 4. Zipf d$ , däßst hinst eyn s End von dyr Zeil löschst. + +---> Öbber haat s End von dyr Zeil doplt eingöbn. doplt eingöbn. + + + 5. Gee weiter gan dyr Letzn 2.3, dyrmitst versteest, was daader ablaaufft. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.3: PFEMERER UND WOLENDER + + + Vil Faudungen, wo s Gwort öndernd, sötznd si aus aynn Pfemerer und aynn Wo- + lend zamm. Bal i also öbbs löschn will, schreib i ainsting d und aft s "Wo- + lend", dös haisst also, "wolend", "wohin" däß i will - older was i halt gnaun + löschn will. + + + + + + + Daader also, was i wie löschn kan: + w - hinst eyn n Anfang von n naehstn Wort AANE dönn sein eersts Zaichen. + e - gan n End von n ietzundn Wort MIT dönn seinn lösstn Zaichen. + $ - zo n End von dyr Zeil MIT derer irn lösstn Zaichen. + + Also löscht de Tastnfolg de umbb n Mörkl hinst eyn s Wortend. +Anmörkung: Gib i grad dös zwaitte Zaichen yllain ein, ruckt halt dyr Mörkl + entspröchet weiter. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.4: MIT AYNN ZÖLER D WOLENDER ÄFERN + + + ** Gib i ayn Zal vor aynn Wolend ein, werd dös Sel halt widerholt. ** + + 1. Bewög önn Mörkl gan n Anfang von dyr Zeil mit ---> dyrvor unt. + + 2. Zipf 2w , däßst mit n Mörkl zwai Wörter weitergeest. + + 3. Zipf 3e , däßst mit n Mörkl auf s End von n drittn Wort kimmst. + + 4. Zipf 0 (aynn Nuller), däßst eyn n Anfang von dyr Zeil hinkimmst. + + 5. Widerhol d Schritt 2 und 3 mit verschaidne Zöler. + + ---> Dös ist ietz grad ayn Zeil zo n drinn Umaynanderruedern. + + 6. Gee weiter gan dyr Letzn 2.5. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.5: DURCH AYNN ZÖLER GLEI MEERER LÖSCHN + + + ** Ayn Zal vor aynn Pfemerer äfert dönn um seln Werd. ** + + Also, i mecht löschn, und zwaar öbbs Bestimmts, und dös so und so oft: Daa + dyrzue benutz i aynn Zöler: + d Zöler Wolend (also önn Bewögungsschrit) + + 1. Bewög önn Mörkl gan n eerstn Wort in GROOSSBUECHSTABN in dyr mit ---> an- + gmörktn Zeil. + + 2. Demmlt d2w , dyrmitst de ganz grooßgschribnen Wörter löschst. + + 3. Äfert d Schritt 1 und 2 mit dönn entspröchetn Zöler, dyrmitst de drauf- + folgetn ganz großgschribnen Wörter mit ayner ainzignen Faudung löschst: + + +---> Dö ABC DE Zeil FGHI JK LMN OP mit Wörter ist Q RS TUV ietz berichtigt. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.6: ARECHTN AUF ZEILN + + + ** Zipf dd , um ayn gantze Zeil z löschn. ** + + Weil s gro oft vürkimmt, däß myn gantze Zeiln löscht, kaamend schoon d Ent- + wickler von n Urwimm daa drauf, däß myn ainfach dd gan dönn Zwök schreibt. + + + 1. Bewög önn Mörkl gan dyr zwaittn Zeil in n untignen "Gedicht". + 2. Zipf dd , um dö Zeil z löschn. + 3. Ietz bewögst di gan dyr viertn Zeil. + 4. Zipf 2dd , um zwo Zeiln zo n Löschn. + +---> 1) Roosn seind root; +---> 2) Drunter ist s Koot. +---> 3) Veigerln seind blau. +---> 4) Umgrabn tuet s d Sau. +---> 5) D Ur sait de Zeit, +---> 6) Sait, däß s mi freut, +---> 7) Dirndl, dein Gschau. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.7: RUGGGÖNGIG MACHEN (RUGGLN) + + + ** Zipf u , dyrmitst de lösstn Faudungen ruggltst ** + ** older U , um ayn gantze Zeil widerherzstölln. ** + + 1. Bewög önn Mörkl gan dyr mit ---> angmörktn Zeil unt und gee dyrmit auf n + eerstn Faeler. + 2. Zipf x , däßst dös eerste z vile Zaichen löschst. + 3. Ietz demmlt u , dyrmitst de lösste Faudung ruggltst. + 4. Ietz behöb allsand Faeler auf dyr Zeil mit dyr Hilf von n Befelh x . + 5. Aft gibst ayn U (grooß) ein, däßst de Zeil wider yso hinbringst, wie s + gwösn ist. + 6. So, und ietz demmltst so oft u , hinst däßst s U und de andern Fau- + dungen rugggöngig gmacht haast. + 7. Und ietzet widerum schreibst so oft r , hinst däßst allsand Be- + felh widerhergstöllt, z haissn allsse rugg-grugglt haast (also d Rugggön- + gigmachungen rugggöngig gmacht). +---> Beerichtig d Faeller voon dehrer Zeiil und sttöll s mitt n Ruggruggln wi- + der her. + 8. Die Faudungen seind gro wichtig; sö helffend ainn närrisch weiter. + Ietz gee weiter gan dyr Zammenfassung von dyr Letzn 2. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 2 + + + 1. Um von n Mörkl aus hinst eyn s naehste Wort zo n Löschn, zipf: dw + 2. Um umbb n Mörkl hinst eyn s End von dyr Zeil zo n Löschn, demmlt d$ + 3. Dyrmitst ayn gantze Zeil löschst, gib ein: dd + 4. Mechst ayn Bewögung, ayn "Wolend", öfters, stöll de entspröchete Zal dyr- + vor: 3dw older aau: d3w + 5. Dyr Pfueg für ayn Önderungsfaudung lautt yso: + Pfemerer [Zal] Bewögungsschrit (Wolend) + Und dös haisst: + Dyr PFEMERER gibt an, WAS taan ghoert, öbbenn d = löschn (»delete«). + [ZAL] - Ayn Zal KAN myn angöbn, wenn myn halt ayn Wolend öfter habn will. + S WOLEND, also dyr Schrit WOHIN, besagt, auf was i aushin will, öbbenn + auf ayn Wort ( w ), s End von dyr Zeil ( $ ) und so weiter. + + 6. Däßst eyn n Anfang von dyr Zeil hinkimmst, schreib aynn Nuller: 0 + + 7. Um öbbs Vorigs wider z ruggln, gib ein: u (klain also) + Um allsand Önderungen in ayner Zeil z ruggln, haast: U (also grooß) + Um "rugg-z-ruggln", also allss wider herzstölln, zipf: r + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 3.1: ANFÜEGN (»put«) + + + ** Zipf p , dyrmitst öbbs gnetty Glöschts naach n Mörkl anfüegst. ** + + 1. Bewög önn Mörkl gan dyr eerstn untignen Zeil mit ---> dyrvor. + + 2. Zipf dd , um sele Zeil z löschn und dyrmit in aynn Wimm-"Roster" zo n + speichern. + + 3. Bewög önn Mörkl gan dyr Zeil c), ÜBER derer, daa wo de glöschte Zeil ein- + hinkemmen sollt. + + 4. So, und ietz gibst ainfach p ein, und schoon haast dö Zeil unter derer + mit n Mörkl drinn. + 5. Äfert d Schritt 2 hinst 4, hinst däßst allsand Zeiln yso naachynaynand + haast, wie s hinghoernd. + +---> d) Kanst du dös aau? +---> b) Veigerln seind blau. +---> c) Bedachtn kan myn lernen. +---> a) Roosn seind root. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 3.2: ERSÖTZN (»replace«) + + + ** Zipf rx , um dös Zaichen unter n Mörkl durch x z ersötzn. ** + + 1. Bewög önn Mörkl zo dyr eerstn untignen Zeil mit ---> dyrvor. + + 2. Bewög önn Mörkl, hinst däß yr auf n eerstn Faeler steet. + + 3. Zipf r und drafter dös Zaichen, wo dyrfür daa hinghoert. + + 4. Widerhol d Schritt 2 und 3, hinst däßst de eerste Zeil gmaeß dyr zwaittn + berichtigt haast: +---> Wie dö Zeit eingobn wurd, wurdnd ainike falsche Zastnen zipft! +---> Wie dö Zeil eingöbn wurd, wurdnd ainige falsche Tastnen zipft! + + 5. Ietz tue mit dyr Letzn 3.3 weiter. + +Anmörkung: Vergiß nit drauf, däßst mit n Anwenddn lernen solltst und nit öbbenn + mit n Auswendiglernen! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 3.3: ÖNDERN (»change«) + + + ** Um hinst eyn s Wortend z öndern, zipf ce . ** + + 1. Gee mit n Mörkl auf de eerste mit ---> angmörkte Zeil. + + 2. Ietz farst netty auf s "s" von Wstwr hin. + + 3. Zipf ce ein und aft d Wortberichtigung, daader also örter . + + 4. Druck und bewög önn Mörkl gan n naehstn Zaichen, wo göndert ghoert. + + 5. Äfert d Schritt 3 und 4, hinst däß dyr eerste Saz wie dyr zwaitte ist. + +---> Ainige Wstwr von derer Zlww ghhnnd mit n Öndern-Pfemerer gaauu. +---> Ainige Wörter von derer Zeil ghoernd mit n Öndern-Pfemerer göndert. + +ce löscht also s Wort und schlaaufft di eyn d Eingaab-Artweis. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 3.4.: NON MEERER ÖNDERUNGEN PFELFS c + + + ** D Löshfaudung c arechtt mit de nömlichnen Wolender wie dö mit d ** + + 1. Dyr Önder-Pfemerer arechtt anleich wie d Löshfaudung mit d , und zwaar + yso: + c [Zal] Bewögungsschritt (Wolend) + + 2. D Wolender seind de gleichn, öbbenn w für Wort und $ für s Zeilnend. + + + 3. Bewög di zo dyr eerstn untignen Zeil mit ---> . + + 4. Ietz geest auf dönn eerstn Faeler. + + 5. Zipf c$ , gib önn Rest von dyr Zeil wie in dyr zwaittn ein und druck aft + . +---> S End von derer Zeil sollt an de zwaitte daader anglichen werdn. +---> S End von derer Zeil sollt mit n Befelh c$ berichtigt werdn. + +Denk allweil dran, däßst iederzeit mit dyr Ruggtastn Faeler ausbössern kanst. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 3 + + + 1. Um ayn vorher glöschts Gwort anzfüegn, zipf p . Daa dyrmit werd dös + gantze Gwort NAACH n Mörkl angfüegt. Wenn s ayn gantze Zeil gwösn ist, + werd dö sel als de Zeil unterhalb n Mörkl eingfüegt. + + 2. Um dös Zaichen unter n Mörkl, also wo dyr Mörkl ist, z ersötzn, zipf r + und aft dös Zaichen, wost daadl habn willst. + + 3. Dyr Önderungspfemerer ( c = »change«) laasst ainn umbb n Mörkl hinst eyn s + End von n Wolend öndern. Zipf ce , dyrmitst umbb n Mörkl hinst eyn s End + von n Wort öndertst, und c$ hinst eyn s End von dyr Zeil. + + 4. Für d Önderung lautt dyr Pfueg: + + c [Zal] Wolend + +Ietz tue mit dyr naehstn Letzn weiter. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 4.1: MÖRKLSTÖLLUNG UND DAUTTICHTDARSTAND + +** Demmlt g, däßst önn Befand und Darstand von dyr Dautticht anzaigst. ** + ** Zipf G , dyrmitst auf ayn bestimmte Zeil in dyr Dautticht hinkimmst. ** + +Anmörkung: Lis dö gantze Letzn daader durch, ee wennst iewign öbbs unternimmst! + + 1. Druck g . Auf dös hin erscheint auf derer Seitt ganz unt ayn Dar- + standsmeldung mit n Dauttichtnam und n Befand innerhalb dyr Dautticht. + Mörk dyr de Zeilnnummer für n Schrit 3. + +Anmörkung: Müglicherweis seghst aau önn Mörklbefand in n zesmen untern Bild- + schirmögg. Aft ist s "Lindl" (»ruler«) eingstöllt; schau dyrzue mit + n Befelh :help 'ruler' naach. + 2. Druck G , um an s End von dyr Dautticht z kemmen. + gg gibst ein, däßst gan n Anfang von dyr Dautticht aufhinkimmst. + + 3. Gib d Nummer von derer Zeil ein, daa wost vorher warst, und aft non G . + Dös bringt di zrugg gan seler Zeil, daa wost stuenddst, wiest dös eerste + Maal g gadruckst. + + 4. Wennst di sicher gnueg füelst, aft füer d Schritt 1 hinst 3 aus. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 4.2: DYR BEFELH ZO N SUECHEN + + + ** Zipf / und dyrnaach aynn Ausdruk, um selbignen zo n Suechen. ** + + 1. Du gibst also in dyr Befelhsartweis s Zaichen / ein. Dös sel wie aau dyr + Mörkl erscheinend drauf unt auf n Schirm, netty wie bei dyr Faudung : . + + 2. Ietz zipf 'Faeeler' . Netty um dös 'Faeeler' willst ietz suechen. + + 3. Willst um gnaun dönn Ausdruk weitersuechen, zipf ainfach n (wie »next«). + Willst hinzrugg suechen, aft gibst N ein. + + 4. Um von Haus aus zruggaus z suechen, nimm ? statt / her. + + 5. Dyrmitst wider daa hinkimmst, wost herkemmen bist, druck o, und dös + öfter, wennst weiter zrugg willst. Mit i widerum kimmst vorwärts. + +---> Aynn Faeler schreibt myn nit "Faeeler"; Faeeler ist ayn Faeler + +Anmörkung: Wenn d Suech s Dauttichtend dyrraicht haat, geet s eyn n Anfang wi- + der weiter dyrmit, men Sach dyr Schaltter 'wrapscan' wär auf aus. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 4.3: DE GÖGNKLAMMERN FINDDN + + + ** Zipf % , um de entspröchete Klammer ) , ] older } z finddn. ** + + 1. Sötz önn Mörkl auf iewign aine von dene drei Klammern ( , [ older { + in dyr untignen Zeil, wo mit ---> angmörkt ist. + + 2. Ietzet zipf s Zaichen % . + + 3. Dyr Mörkl geet ietz auf de pässete schliessete Klammer. + + 4. Ietz demmlt % , und dyrmit kimmst gan dyr öffneretn Klammer zrugg. + + 5. Sötz önn Mörkl auf ayn anderne Klammer von ({[]}) und pröblt % aus. + +---> Dös ( ist blooß ayn Pochzeil ( mit [ verschaidne ] { Klammern } drinn. )) + +Anmörkung: Um dö Müglichkeit gaast bsunders froo sein, wennst aynmaal in aynn + Spaichgwort verzweiflt ayn faelete Gögnklammer suechst! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 4.4: D ERSÖTZUNGSFAUDUNG (»substitute«) + + + ** Zipf :s/alt/neu/g , um 'alt' durch 'neu' zo n Ersötzn. ** + + 1. Gee mit n Mörkl zo dyr unt steehetn mit ---> angmörktn Zeil. + + 2. Zipf :s/dee/de . Der Befelh ersötzt alsnan grad dös +eerste "dee", + wo vürkimmt. + + 3. Ietz pröblt s mit :s/dee/de/g . Dös zuesötzliche g ("Pflok" nennt myn + öbbs Sölchers) bewirkt, däß allss, was dyrmit kennzaichnet ist, innerhalb + von dyr ainn Zeil ersötzt werd. + +---> Dee schoenste Zeit, däß myn dee Blüemln anschaut, ist dee schoene Lan- + gesszeit. + 4. Um ietz allsand Suechbegriff innerhalb von zwo Zeiln zo n Öndern, zipf + :#,#s/alt/neu/g , wobei # ieweils für de eerste und lösste Zeil von dönn + Pfraich steet. + :%s/alt/neu/g zipfst, däßst d Vürkemmen in dyr gantzn Dautticht öndertst. + Mit :%s/alt/neu/gc finddst allsand Vürkemmen in dyr gsamtn Dautticht; + daa werst aber zeerst non gfraagt, obst ys ersötzn willst older nity. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 4 + + 1. g zaigt dönn ietzundn Dauttichtbefand und önn Darstand dyrvon an. + G bringt di an s End von dyr Dautticht. + G bringt di gan dyr entspröchetn Zeilnnummer. + gg bringt di zo dyr eerstn Zeil. + + 2. D Eingaab von / mit aynn Ausdruk suecht VÜRSHLING um dönn Ausdruk. + Gibst ? und aynn Suechbegrif ein, suecht s um dönn ÄRSHLING. + Zipf naach ayner Suech n ; naacherd werd in de gleiche Richtung weiter- + gsuecht. Mit N geet s umkeerter weiter. + o bringt di zo ölterne Befändd zrugg, i zo neuerne. + + 3. D Eingaab von % , wenn dyr Mörkl auf ainer von dene Klammern steet: ({[ + )]} , bringt di zo dyr Gögnklammer. + + 4. Um dös eerste Vürkemmen von "alt" in ayner Zeil durch "neu" z ersötzn, + zipf :s/alt/neu . + Um allsand in ayner Zeil z ersötzn, zipf :s/alt/neu/g . + Mechst allss in zwo Zeiln ersötzn, demmlt zo n Beispil :5,6s/alt/neu/g . + Mechst allss in dyr gantzn Dautticht ersötzn, gib ein: :%s/alt/neu/g . + Willst ayn ieds Maal bstaetln, höng 'c' wie »confirm« hint anhin. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 5.1: ZWISCHNDRINN AYNN AUSSERIGNEN BEFELH AUSFÜERN + + + ** Willst ayn Gfäßfaudung ausfüern, gib ainfach dö sel naach :! ein. ** + + 1. Zipf dönn bekanntn Befelh : , dyrmitst mit n Mörkl auf n Bildschirm + ganz abhin kimmst. Draufhin kanst aynn gwonen Gfäßbefelh eingöbn. + + 2. Zeerst kimmt aber non ayn Ruefzaichen ! . Und ietz haast de Müglich- + keit, ayn beliebige ausserige Gfäßfaudung auszfüern. + + 3. Als Beispil zipf :!ls ; und schoon haast ayn Auflistung von deinn + Verzaichniss, netty wie wennst ganz gwon in n Eingib wärst. Geet ls + aus iewign aynn Grund nit, aft pröblt s mit :!dir . + +Also non aynmaal: Mit dönn Angang kan ayn iede beliebige ausserige Faudung aus- + gfüert werdn, aau mit Auerwerdd. + +Und wolgmörkt: Allsand Befelh, wo mit : angeend, müessend mit bstö- + tigt werdn. Dös dyrsagn myr vürbaß niemer. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 5.2: NON MEERER DRÜBER, WIE MYN DAUTTICHTN SCHREIBT + + + ** Um öbbs Gönderts neu z speichern, zipf :w NEUER_DAUTTICHTNAM. ** + + 1. Zipf :!dir older :!ls , däßst dyr ayn Auflistung von deinn Verzaich- + niss ausherlaasst. Däßst dyrnaach eingöbn muesst, waisst ee schoon. + + 2. Suech dyr aynn Dauttichtnam aus, dönn wo s non nit geit, öbbenn POCH. + + 3. Ietz demmlt: :w POCH (also mit POCH als dönn neuen Dauttichtnam). + + 4. Dös speichert ietz de gantze Dautticht, also önn Wimmschainer, unter dönn + Nam POCH. Dös kanst leicht überprüeffen, indem däßst ainfach :!ls older + :!dir zipfst und dyrmit deinn Verzaichnissinhalt seghst. + +Anmörkung: Stigst ietz aus n Wimm aus und gännst n aft wider mit vim POCH , + naacherd wär dö Dautticht ayn gnaune Aamum von n Schainer dyrselbn, + wiest n gspeichert haast. + + 5. Ietz verweitert dö Dautticht - fallsst s Fenstl haast - , mit :!del POCH + beziehungsweis bei aynn Ainslgebäu mit :!rm POCH . +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 5.3: AYNN TAIL VON N GWORT ZO N SPEICHERN AUSWALN + +** Um aynn Tail von dyr Dautticht z speichern, zipf v [Wolend] :w DAUTTICHT ** + + 1. Ruck önn Mörkl auf netty dö Zeil daader. + + 2. Demmlt v und gee mit n Mörkl auf dönn fümftn Auflistungspunt untet. Du + seghst glei, däß s Gwort vürherghöbt erscheint. + + 3. Druck s Zaichen : . Ganz unt auf n Bildschirm erscheint :'<,'> . + + 4. Zipf w POCH , wobei s dönn Dauttichtnam POCH non nit geit. Vergwiß di, + däßst dös :'<,'>w POCH aau +seghst, ee wennst druckst. + + 5. Dyr Wimm schreibt de ausgwaltn Zeil eyn de Dautticht POCH einhin. Benutz + :!dir older :!ls , däßst dös überprüeffst. Lösh s fein nit öbbenn! Mir + brauchend s nömlich für de naehste Letzn. + +Anmörkung: Druckt myn v , ginnt d Sichtisch-Auswal. Du kanst mit n Mörkl um- + aynandfarn, um d Auswal z veröndern. Drafter kan myn mit yn aynn + Pfemerer mit dönn Gwort öbbs machen. Zo n Beispil löscht d dös + Gwort. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 5.4: EINLÖSN UND ZAMMENFÜERN VON DAUTTICHTN + + + ** Um önn Inhalt von ayner Dautticht einzlösn, zipf :r DAUTTICHTNAM ** + + 1. Sötz önn Mörkl über dö Zeil daader. + +OBACHT: Aft däßst önn Schrit 2 ausgfüert haast, seghst auf aynmaal öbbs aus + dyr Letzn 5.3. Bewög di naacherd wider abwärts, dyrmitst dö Letzn wi- + derfinddst. + 2. Ietz lis dein Dautticht POCH ein, indem däßst d Faudung :r POCH aus- + füerst, wobei wie gsait POCH für dönn von dir ausgsuechtn Dauttichtnam + steet. De einglösne Dautticht werd unterhalb dyr Mörklzeil eingfüegt. + + 3. Um zo n Überprüeffen, ob de Dautticht aau gwiß einglösn ist, gee zrugg; + und du seghst, däß s ietz zwo Ausförtigungen von dyr Letzn 5.3. geit, s + Urniss und de eingfüegte Dauttichtfassung. + +Anmörkung: Du kanst aau d Ausgaab von aynn Ausserigbefelh einlösn. Zo n Bei- + spil list :r !ls d Ausgaab von dyr Faudung ls ein und füegt s + unterhalb n Mörkl ein. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 5 + + + 1. :!FAUDUNG füert aynn ausserignen Befelh aus. + + Daader ayn Öttlych gwänddte Beispiler: + (Fenstl) (Ainsl - Leinsl) + :!dir :!ls - listt s Verzaichniss auf. + :!del DAUTTICHT :!rm DAUTTICHT - verweitert sele Dautticht. + + 2. :w DAUTTICHT speichert de ietzunde Wimmdautticht unter dönn besagtn Nam. + + 3. v WOLEND :w DAUTTICHTNAM schreibt de sichtisch ausgwaltn Zeiln eyn de + Dautticht mit seln Nam. + + 4. :r DAUTTICHTNAM ladt sele Dautticht und füegt s unterhalb n Mörklbefand + ein. + + 5. :r !dir list d Ausgaab von dyr Faudung dir und füegt s unterhalb n + Mörklbefand ein. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 6.1: ZEIL ÖFFNEN (»open«) + + + ** Zipf o, um ayn Zeil unterhalb n Mörkl z öffnen und eyn d ** + ** Einfüegartweis z kemmen. ** + + 1. Bewög önn Mörkl zo dyr eerstn mit ---> angmörktn Zeil unt. + + 2. Zipf o (klain), um ayn Zeil UNTERHALB n Mörkl z öffnen und mit dyr Ein- + füegartweis weiterztuen. + + 3. Ietz zipf ayn Weeng ayn Gwort und druck , um d Einfüegartweis z ver- + laassn. +---> Mit o werd dyr Mörkl auf de offene Zeil in dyr Einfüegartweis gsötzt. + + 4. Um ayn Zeil OBERHALB n Mörkl aufzmachen, gib ainfach aynn groosss O statt + yn aynn klainen ein. Versuech dös auf dyr untignen Zeil. + +---> Öffnet ayn Zeil über derer daader mit O , wenn dyr Mörkl auf derer Zeil + ist. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 6.2: GWORT ANFÜEGN (»append«) + + + ** Zipf a , um öbbs NAACH n Mörkl einzfüegn. ** + + 1. Bewög önn Mörkl gan n Anfang von dyr eerstn Üebungszeil mit ---> unt. + + 2. Druck e , hinst däß dyr Mörkl an n End von Zei steet. + + 3. Zipf ayn klains a , um öbbs NAACH n Mörkl anzfüegn. + + 4. Vergöntz dös Wort wie in dyr Zeil drunter. Druck , um d Schreib-Art- + weis z verlaassn. + + 5. Bewög di mit e zo n naehstn ungantzn Wort und widerhol d Schritt 3 und + 4. + +---> Dö Ze biett ayn Glögn , ayn Gwort in ayner Zeil anzfü. +---> Dö Zeil biett ayn Glögnet, ayn Gwort in ayner Zeil anzfüegn. + +Anmörkung: a , i und A bringend ainn gleichermaaßn eyn d Einfüegartweis; + dyr ainzige Unterschaid ist, WO mit n Einfüegn angfangt werd. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 6.3: AYN ANDERNE WEIS ZO N ERSÖTZN (»replace«) + + + ** Demmlt ayn groosss R , um meerer als wie grad ain Zaichen z ersötzn. ** + + 1. Bewög önn Mörkl zo dyr eerstn untignen, mit ---> angmörktn Zeil. + Gee mit n Mörkl gan n Anfang von n eerstn xxx . + + 2. Ietz druck R und zipf sele Zal, wo drunter in dyr zwaittn Zeil steet, + yso däß de sel s xxx ersötzt. + + 3. Druck , um d Ersötzungsartweis z verlaassn. Du gspannst, däß dyr + Rest von dyr Zeil unveröndert bleibt. + + 4. Äfert die Schritt, um dös überblibne xxx z ersötzn. + +---> S Zunddn von 123 zo xxx ergibt xxx. +---> S Zunddn von 123 zo 456 ergibt 579. + +Anmörkung: D Ersötzungsartweis ist wie d Einfüegartweis, aber ayn ieds eindem- + mlte Zaichen löscht ayn vorhanddns. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 6.4: GWORT AAMEN UND EINFÜEGN + + ** Benutz önn Pfemerer y , um öbbs z aamen, und p , um öbbs einzfüegn. ** + + 1. Gee zo dyr mit ---> angmörktn Zeil unt und sötz önn Mörkl hinter "a)". + + 2. Ginn d Sichtisch-Artweis mit v und bewög önn Mörkl gnaun vor "eerste". + + 3. Zipf y , um dönn vürherghöbtn Tail z aamen. + + 4. Bewög önn Mörkl gan n End von dyr naehstn Zeil: j$ + + 5. Demmlt p , um dös Gwort einzfüegn, und aft: a zwaitte . + + 6. Benutz d Sichtischartweis, um " Eintrag." auszwaln, aam s pfelfs y, be- + wög di gan n End von dyr naehstn Zeil mit j$ und füeg s Gwort dortn mit + p an. + +---> a) dös ist dyr eerste Eintrag. + b) + +Anmörkung: Du kanst y aau als Pfemerer verwenddn; yw aamt ain Wort. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 6.5: SCHALTTER SÖTZN + +** Sötz aynn Schaltter yso, däß ayn Suech older Ersötzung Grooß- und Klain- ** + ** schreibung übergeet. ** + + 1. Suech um 'übergee", indem däßst /übergee eingibst. + Widerhol d Suech ayn Öttlych Maal, indem däßst de Tastn n druckst. + + 2. Sötz de Zwisl - önn Schaltter - 'ic' (»ignore case«), indem däßst :set ic + eingibst. + 3. Ietz suech wider um 'übergee' und tue aau wider mit n weiter. Daa fallt + dyr auf, däß ietz öbbenn aau Übergee und ÜBERGEE hergeet. + + 4. Sötz de Zwisln 'hlsearch' und 'incsearch' pfelfs: :set hls is + + 5. Widerhol d Suech und bobacht, was ietz gschieght: /übergee + + 6. Däßst grooß und klain wider gwon unterscheidst, zipf: :set noic + +Anmörkung: Mechst de Tröffer niemer vürherghöbt seghn, gib ein: :nohlsearch +Anmörkung: Sollt klain/grooß bei ayner ainzignen Suech wurst sein, benutz \c + in n Suechausdruk: /übergee\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 6 + + 1. Zipf o , um ayn Zeil UNTERHALB n Mörkl z öffnen und d Einfüegartweis z + ginnen. + Zipf O , um ayn Zeil OBERHALB n Mörkl z öffnen. + + 2. Zipf a , um NAACH n Mörkl ayn Gwort einzfüegn. + Zipf A , um ayn Gwort naach n Zeilnend anzfüegn. + + 3. D Faudung e bringt di gan n End von aynn Wort. + + 4. Dyr Pfemerer y (»yank«) aamt öbbs, p (»put«) füegt dös ein. + + 5. Ayn groosss R geet eyn d Ersötzungsartweis, hinst däß myn druckt. + + 6. D Eingaab von ":set xxx" sötzt de Zwisl "xxx". Ayn Öttlych Zwisln seind: + 'ic' 'ignorecase' Grooß/klain wurst bei ayner Suech + 'is' 'incsearch' Zaig aau schoon ayn Tailüberainstimmung + 'hls' 'hlsearch' Höb allsand pässetn Ausdrück vürher + Dyr Schaltternam kan in dyr Kurz- older Langform angöbn werdn. + + 7. Stöll yn ayner Zwisl "no" voran, däßst ys abschalttst: :set noic +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 7.1: AYN HILFGWORT AUFRUEFFEN + + + ** Nutz dös einbaute Hilfgebäu, de "Betribsanlaittung" ** + + Eyn n Wimm ist ayn ausfüerliche "Gebrauchsanweisung" einbaut. Für s Eerste + pröblt ainfach ains von dene dreu aus: + - Druck d -Tastn, wennst öbbenn aine haast. + - Druck de Tastn , fallsst ys haast. + - Zipf :help + + Lis di eyn s Hilffenster ein, dyrmitst draufkimmst, wie dös mit dyr Hilf geet. + Demmlt w w , um von ainn Fenster zo n andern zo n Springen. + Demmlt :q , um s Hilffenster zo n Schliessn. + + Du kanst zo so guet wie allssand ayn Hilf finddn, indem däßst yn dyr Faudung + :help aynn Auerwerd naachstöllst und istig nit vergisst. Pröblt dös: + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 7.2: ERSTÖLL AYN GIN-SCHRIPF + + + ** Mutz önn Wimm mit de einbautn Faehigkeitn auf ** + + Dyr Wimm besitzt ayn Wösn Schäftungen, wo über n Urwimm aushingeend, aber de + meerern dyrvon seind in dyr Vorgaab ausgschaltt. Dyrmitst meerer aus n Wimm + ausherholst, erstöllst ayn "vimrc"-Dautticht. + + 1. Lög ayn "vimrc"-Dautticht an; dös geet ie naach Betribsgebäu verschidn: + :e ~/.vimrc für s Ainsl + :e $VIM/_vimrc bei n Fenstl + + 2. Ietz lis önn Inhalt von dyr Beispil-"vimrc"-Dautticht ein: + :r $VIMRUNTIME/vimrc_example.vim + + 3. Speichert de Dautticht mit: + :w + + 4. Bei n naehstn Gin von n Wimm ist aft d Füegnussvürherhöbung zuegschaltt. + Du kanst dyr allss eyn dö Dautticht einhinschreibn, wasst bständig habn + willst. Meerer dyrzue erfarst unter: :help vimrc-intro +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 7.3: VERGÖNTZN + + + ** Befelhszeilnvergöntzung mit d und ** + + 1. Vergwiß di, däß dyr Wimm nit auf n Urwimm-"Glais" fart: :set nocp + + 2. Schaug naach, wölcherne Dauttichtn däß s in n Verzaichniss geit: :!ls + older :!dir + 3. Zipf önn Anfang von ayner Faudung: :e + + 4. Druck d , und dyr Wimm zaigt ayn Listn von Faudungen, wo mit "e" + angeend. + 5. Druck , und dyr Wimm vervollstöndigt önn Faudungsnam zo ":edit". + + 6. Füeg ayn Laerzaichen und önn Anfang von ayner besteehetn Dautticht an: + :edit DAU + + 7. Druck . Dyr Wimm vergöntzt önn Nam, dös haisst, wenn yr aindeuttig + ist. +Anmörkung: D Vergöntzung geit s für aynn Hauffen Faudungen. Versuech ainfach + d und . Bsunders nützlich ist dös bei :help . +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 7 + + + 1. Zipf :help older druck older , um ayn Hilffenster z öffnen. + + 2. Zipf :help FAUDUNG , um auf ayn Hilf gan aynn Befelh z kemmen. + + 3. Zipf w w , um zo n andern Fenster z springen. + + 4. Zipf :q , um s Hilffenster z schliessn. + + 5. Erstöll ayn vimrc-Ginschripf zuer Sicherung von deine Mötzneinstöllungen. + + 6. Druck d, aft däßst naach : mit ayner Faudung angfangt haast, dyr- + mitst mügliche Vergöntzungen anzaigt kriegst. + Druck für ain Vervollstöndigung yllain. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Dös wär ietzet s End von n Wimmschainer. Gangen ist s daa drum, aynn kurtzn + und bündignen Überblik über s Blat WIMM z lifern, netty vil gnueg, däß myn + für s Eerste wirklich öbbs dyrmit anfangen kan. Dyrmit ist s aber auf kain + Weitn non nit taan; dyr Wimm haat schoon non vil meerer auf Lager. Lis als + Naehsts aynmaal s Benutzerhandbuech: :help user-manual . + + Zo n Weiterlösn und Weiterlernen wör dös Buech daader zo n Empfelhen: + Vim - Vi Improved - von n OUALLINE Steve + Verlaag: New Riders + Dös ist dös eerste Buech, wo ganz yn n Wimm gwidmt ist, netty dös Grechte für + Anfönger. Es haat ayn Wösn Beispiler und aau Bilder drinn. + See http://iccf-holland.org/click5.html + + Dös folgete Buech ist schoon ölter und meerer über n Urwimm als wie über n + Wimm, aber aau zo n Empfelhen: Textbearbeitung mit dem vi-Editor - von dyr + LAMB Linda und n ROBBINS Arnold - Verlaag O'Reilly - Buechlaittzal (ISBN): + 3897211262 + In dönn Buech kan myn fast allss finddn, was myn mit n Urwimm angeen mecht. + De söxte Ausgaab enthaltt aau schoon öbbs über n Wimm. + Als ietzunde Bezugniss für d Fassung 6.2 und ayn pfrenge Einfüerung dient + dös folgete Buech: + vim ge-packt von n WOBST Reinhard + mitp-Verlaag, Buechlaittzal 3-8266-1425-9 + Trotz dyr recht pfrengen Darstöllung ist s durch seine viln nützlichnen Bei- + spiler aau für Einsteiger grad grecht. Probhaeupster und de Beispilschripfer + seind zesig zo n Kriegn; see http://iccf-holland.org/click5.html + + Verfasst habnd dönn Schainer dyr PIERCE Michael C. und WARE Robert K. von dyr + Kolraader Knappnschuel (Colorado School of Mines). Er beruet auf Entwürff, wo + dyr SMITH Charles von dyr Kolraader Allschuel (Colorado State University) + zuer Verfüegung gstöllt haat. Gundpost: bware@mines.colorado.edu. + Für n Wimm haat n dyr MOOLENAAR Bram barechtt. + De bairische Übersötzung stammt von n HELL Sepp 2009. Sein Gundpostbrächt ist + sturmibund@t-online.de + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + + + + diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.bj.utf-8 b/vim/bundle/ubuntu-vim72/tutor/tutor.bj.utf-8 new file mode 100644 index 0000000..80c3ade --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.bj.utf-8 @@ -0,0 +1,987 @@ +=============================================================================== += G o t i k a m i n n W I M M - S c h a i n e r - Fassung 1.7D = +=============================================================================== + + Dyr Wimm ist ayn gro mächtigs Blat, dös was mit aynn Wösn Befelh aufwartt; z + vil, däß myn s allsand in aynn Schainer wie dönn daader unterbräng. Der + Schainer ist yso aufbaut, däß yr halt netty die Befelh allsand bringt, wost + brauchst, däßst mit iem für s Eerste wirklich öbbs anfangen kanst. + Durchhinarechtn kanst di, wennst willst, in ayner halbetn Stund; dös haisst, + wennst di nit grooß mit n Pröbln und Tüftln aufhaltst. + + OBACHT: + Die Faudungen, wost daader finddst, gaand istig s Gwort öndern. Dösswögn + machst eyn n Böstn glei ayn Aamum von derer Dautticht daader. Haast alsnan + dös Gwort daader mit n Befelh "vimtutor bj" ausherlaassn, ist s ee schoon + ayn Aamum. + Mir kan s nit oft gnueg sagn, däß der Schainer daader istig gan n Üebn + ghoert. Also muesst schoon aau die Befelh ausfüern, wennst ys gscheid ler- + nen willst. Mit n Lösn yllain ist s +nit taan! + + Ietz schaust grad non, däß dein Föststölltastn nit druckt ist; und aft geest + glei aynmaal mit dyr j-Tastn abwärts (yso laaufft dös nömlich), hinst däßst + de gantze Letzn 1.1 auf n Bildschirm haast. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.1: MIT N MÖRKL UMAYNANDFARN + +** Dyrmitst mit n Mörkl umaynandkimmst, druck h, j, k und l wie unt zaigt. ** + ^ Ayn Öslsbrugg: + k De Tastn h ist winster und +geet aau gan winster. + < h l > S l leit zesm und richtt si gan zesm. + j S j kan myn wie aynn Pfeil gan unt seghn. + v Mit n k kimmst gan n KOPF. + 1. Ietz ruedertst ainfach mit n Mörkl auf n Bildschirm umaynand, hinst däßst + di sicher füelst. + 2. Halt d Abhin-Tastn (j) druckt; aft rumplt s ainfach weiter. Netty yso + kimmst gan dyr naehstn Letzn. + + 3. Wie gsait, ietz bewögst di also mit derer Tastn gan dyr Letzn 1.2. + +Non öbbs: Allweil, wenn dyr niemer ganz wol ist, wasst öbbenn druckt haast, aft + zipfst ; naacherd bist wider ganz gwon in dyr Befelhs-Artweis. + + + Nöbnbei gsait kimmst gwonerweil aau mit de Pfeiltastnen weiter. Aber + hjkl seind z haissn s Wimm-Urgstain; und de "Hörtn" seind ganz dyr- + für, däß myn bei +dene bleibt. Pröblt s ainfach aus! +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.2: ÖNN WIMM AUSSCHALTTN + + + ALSO, EE WENNST ÖBBS VON DAA UNT AUSFÜERST, LIS LIEBER ZEERST DE GANTZE LET- + ZN! + + 1. Druck d -Tastn, dyrmitst aau gwiß in dyr Befelhs-Artweis bist. + + 2. Demmlt :q! . + Daa dyrmit benddst ys Blat und verwirffst allss, wasst öbbenn göndert + haast. + + 3. Balst önn Eingib seghst, gib dö Faudung ein, wo di zo dönn Schainer brun- + gen haat, also vimtutor bj . + + 4. Also, wenn ietz allsse sitzt, naacherd füerst d Schritt 1 hinst 3 aus, mit + wasst ys Blat verlaasst und aft wider einhinkimmst. + +Anmörkung: Mit :q! verwirffst allss, wasst göndert older enther gschribn + haast. In aynn Öttlych Letznen lernst acht, wiest dös allss in ayner + Dautticht speichertst. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.3: GWORT BARECHTN - LÖSCHN + + + ** Druck x , dyrmitst dös Zaichen unter n Mörkl löschst. ** + + 1. Bewög di mit n Mörkl auf de mit ---> angmörkte Zeil unt. + + 2. Zo n Faeler Verbössern farst mit n Mörkl netty auf dös Zaichen, dös wo + glöscht ghoert. + + 3. Druck de Tastn x , däßst dös überflüssige Zaichen löschst. + + 4. Ietz tuest so lang weiter mit 2 hinst 4, hinst däß dyr Saz stimmt. + +---> De Kkuue sprangg übber nn Maanad. + + 5. Wenn ietz de Zeil verbössert ist, geest gan dyr Letzn 1.4. weiter. + +Und ganz wichtig: Dyrweilst dönn Schainer durcharechtst, versuech nit öbbenn, + allss auswendig z lernen; nän, lern ainfach mit n Anwenddn! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.4: GWORT BARECHTN - EINFÜEGN + + + ** Druck i , dyrmitst öbbs einfüegst. ** + + 1. Bewög önn Mörkl zo dyr eerstn untignen Zeil, wo mit ---> angeet. + + 2. Dyrmitst de eerste Zeil wie de zwaitte machst, bewög önn Mörkl auf dös + eerste Zaichen NAACH derer Stöll, daa wo s Gwort eingfüegt werdn sollt. + + 3. Druck i und gib dös ein, was abgeet. + + 4. Wenn ieweils ayn Faeler verweitert ist, aft druck ; und dyrmit kimmst + gan dyr Befelhsartweis zrugg. + So, und ietz tuest ainfach yso weiter, hinst däß dyr Saz stimmt. + +---> Daader gt dd öbbs b. +---> Daader geet diend öbbs ab. + + 5. Balst mainst, däßst ys Gwort-Einfüegn kanst, aft geest gan dyr Letzn 1.5. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.5: GWORT BARECHTN - ANFÜEGN + + + ** Druck A gan n Gwort Anfüegn. ** + + 1. Gee mit n Mörkl gan dyr eerstn untignen Zeil, wo ayn ---> dyrvor haat. + Daa ist s gleich, wo gnaun dyr Mörkl in derer Zeil steet. + + 2. Demmlt A und gib de entspröchetn Ergöntzungen ein. + + 3. Wennst mit n Anfüegn förtig bist, aft druckst , däßst wider eyn de + Befelhsartweis zruggkimmst. + + 4. So, und ietz geest aft non gan dyr zwaittn mit ---> angmörktn Zeil; und + daadl machst ys netty yso. + +---> In derer Zeil gee + In derer Zeil geet ayn Weeng ayn Gwort ab. +---> Aau daader stee + Aau daader steet öbbs Unvollstöndigs. + + 5. Wennst s Anfüegn von Gwort drauf haast, naacherd gee gan dyr Letzn 1.6. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.6: AYN DAUTTICHT BARECHTN + + + ** Mit :wq speichertst ayn Dautticht und verlaasst önn Wimm ganz. ** + + !! OBACHT: Ee wennst mit dönn alln daa unt weitertuest, lis zeerst de gantze + Letzn durch!! + + 1. Verlaaß also s Blat, wie s in dyr Letzn 1.2. haisst, mit :q! ! + + 2. Gib dö Faudung eyn n Eingib ein: vim Schainer . 'vim' ruefft s Blat + auf, und 'Schainer' haisst de Dautticht, wost barechtn willst. Dyrmit + haast also ayn Dautticht, dö wost barechtn kanst. + + 3. Ietz füegst öbbs ein older löschst öbbs, wiest ys in de vorignen Letznen + glernt haast. + + 4. Speichert de gönderte Dautticht und verlaaß önn Wimm mit :wq . + + 5. Schmeiß önn Wimmschainer neu an und gee gan dyr folgetn Zammenfassung. + + 6. Aft däßst de obignen Schritt glösn und käppt haast, kanst ys durchfüern. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 1 + + + 1. Dyr Mörkl werd mit de Tastnen hjkl older aau mit de Pfeiltastnen gsteuert. + h (winst) j (ab) k (auf) l (zes) + + 2. Um önn Wimm umbb n Eingib aus z ginnen, demmlt: vim DAUTTICHT . + + 3. Willst önn Wimm verlaassn und aau allss verwerffen, aft gibst ein: + :q! . + Gan n Verlaassn und Speichern aber zipfst :wq . + + 4. Willst dös Zaichen löschn, daa wo dyr Mörkl drauf ist, demmltst x . + + 5. Willst öbbs vor n Mörkl eingöbn, zipfst i und drafter . + Mechst ys aber eyn s Zeilnend anhinhöngen, benutzt ys A . + Und ainfach naach n Mörkl füegst ys mit a ein . + +Anmörkung: Druckst , kimmst eyn de Befelhsartweis zrugg older brichst ayn + Faudung ab, dö wo dyr schiefgangen ist. + + Ietz tue mit dyr Letzn 2 weiter. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.1.: LÖSHFAUDUNGEN + + + ** Demmlt dw , dyrmitst ayn Wort löschst ** + + 1. Druck , dyrmit s aau gwiß ist, däßst in dyr Befelhsartweis bist. + + 2. Bewög önn Mörkl zo dyr mit ---> angmörktn Zeil unt. + + 3. Und daa geest ietz auf n Anfang von aynn Wort, dös wo glöscht ghoert. + + 4. Zipf dw , däßst dös gantze Wort löschst. + + Nöbnbei: Dyr Buechstabn d erscheint auf dyr lösstn Zeil von n Bildschirm, + sobaldst n eingibst. Dyr Wimm wartt ietz drauf, däß öbbs kimmt, al- + so daader ayn w . Seghst freilich öbbs Anderts wie ayn d , + naacherd haast öbbs Falschs demmlt. Druck aft und pröblt + s non aynmaal. +---> Ayn Öttlych Wörter lustig ghoernd nit Fisper eyn dönn Saz einhin. + + 5. Äfert d Schritt 3 und 4, hinst däß dyr Saz pässt, und gee aft gan dyr + Letzn 2.2. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.2.: NON MEERER LÖSHFAUDUNGEN + + + ** Gib d$ ein, däßst hinst eyn s Zeilnend löschst. ** + + 1. Druck , dyrmitst aau gwiß in dyr Befelhsartweis bist. + + 2. Bewög önn Mörkl hinst eyn de mit ---> angmörkte Zeil untn. + + 3. Gee mit n Mörkl auf s End von dyr faelerfreien Zeil, NAACH n eerstn . . + + 4. Zipf d$ , däßst hinst eyn s End von dyr Zeil löschst. + +---> Öbber haat s End von dyr Zeil doplt eingöbn. doplt eingöbn. + + + 5. Gee weiter gan dyr Letzn 2.3, dyrmitst versteest, was daader ablaaufft. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.3: PFEMERER UND WOLENDER + + + Vil Faudungen, wo s Gwort öndernd, sötznd si aus aynn Pfemerer und aynn Wo- + lend zamm. Bal i also öbbs löschn will, schreib i ainsting d und aft s "Wo- + lend", dös haisst also, "wolend", "wohin" däß i will - older was i halt gnaun + löschn will. + + + + + + + Daader also, was i wie löschn kan: + w - hinst eyn n Anfang von n naehstn Wort AANE dönn sein eersts Zaichen. + e - gan n End von n ietzundn Wort MIT dönn seinn lösstn Zaichen. + $ - zo n End von dyr Zeil MIT derer irn lösstn Zaichen. + + Also löscht de Tastnfolg de umbb n Mörkl hinst eyn s Wortend. +Anmörkung: Gib i grad dös zwaitte Zaichen yllain ein, ruckt halt dyr Mörkl + entspröchet weiter. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.4: MIT AYNN ZÖLER D WOLENDER ÄFERN + + + ** Gib i ayn Zal vor aynn Wolend ein, werd dös Sel halt widerholt. ** + + 1. Bewög önn Mörkl gan n Anfang von dyr Zeil mit ---> dyrvor unt. + + 2. Zipf 2w , däßst mit n Mörkl zwai Wörter weitergeest. + + 3. Zipf 3e , däßst mit n Mörkl auf s End von n drittn Wort kimmst. + + 4. Zipf 0 (aynn Nuller), däßst eyn n Anfang von dyr Zeil hinkimmst. + + 5. Widerhol d Schritt 2 und 3 mit verschaidne Zöler. + + ---> Dös ist ietz grad ayn Zeil zo n drinn Umaynanderruedern. + + 6. Gee weiter gan dyr Letzn 2.5. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.5: DURCH AYNN ZÖLER GLEI MEERER LÖSCHN + + + ** Ayn Zal vor aynn Pfemerer äfert dönn um seln Werd. ** + + Also, i mecht löschn, und zwaar öbbs Bestimmts, und dös so und so oft: Daa + dyrzue benutz i aynn Zöler: + d Zöler Wolend (also önn Bewögungsschrit) + + 1. Bewög önn Mörkl gan n eerstn Wort in GROOSSBUECHSTABN in dyr mit ---> an- + gmörktn Zeil. + + 2. Demmlt d2w , dyrmitst de ganz grooßgschribnen Wörter löschst. + + 3. Äfert d Schritt 1 und 2 mit dönn entspröchetn Zöler, dyrmitst de drauf- + folgetn ganz großgschribnen Wörter mit ayner ainzignen Faudung löschst: + + +---> Dö ABC DE Zeil FGHI JK LMN OP mit Wörter ist Q RS TUV ietz berichtigt. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.6: ARECHTN AUF ZEILN + + + ** Zipf dd , um ayn gantze Zeil z löschn. ** + + Weil s gro oft vürkimmt, däß myn gantze Zeiln löscht, kaamend schoon d Ent- + wickler von n Urwimm daa drauf, däß myn ainfach dd gan dönn Zwök schreibt. + + + 1. Bewög önn Mörkl gan dyr zwaittn Zeil in n untignen "Gedicht". + 2. Zipf dd , um dö Zeil z löschn. + 3. Ietz bewögst di gan dyr viertn Zeil. + 4. Zipf 2dd , um zwo Zeiln zo n Löschn. + +---> 1) Roosn seind root; +---> 2) Drunter ist s Koot. +---> 3) Veigerln seind blau. +---> 4) Umgrabn tuet s d Sau. +---> 5) D Ur sait de Zeit, +---> 6) Sait, däß s mi freut, +---> 7) Dirndl, dein Gschau. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.7: RUGGGÖNGIG MACHEN (RUGGLN) + + + ** Zipf u , dyrmitst de lösstn Faudungen ruggltst ** + ** older U , um ayn gantze Zeil widerherzstölln. ** + + 1. Bewög önn Mörkl gan dyr mit ---> angmörktn Zeil unt und gee dyrmit auf n + eerstn Faeler. + 2. Zipf x , däßst dös eerste z vile Zaichen löschst. + 3. Ietz demmlt u , dyrmitst de lösste Faudung ruggltst. + 4. Ietz behöb allsand Faeler auf dyr Zeil mit dyr Hilf von n Befelh x . + 5. Aft gibst ayn U (grooß) ein, däßst de Zeil wider yso hinbringst, wie s + gwösn ist. + 6. So, und ietz demmltst so oft u , hinst däßst s U und de andern Fau- + dungen rugggöngig gmacht haast. + 7. Und ietzet widerum schreibst so oft r , hinst däßst allsand Be- + felh widerhergstöllt, z haissn allsse rugg-grugglt haast (also d Rugggön- + gigmachungen rugggöngig gmacht). +---> Beerichtig d Faeller voon dehrer Zeiil und sttöll s mitt n Ruggruggln wi- + der her. + 8. Die Faudungen seind gro wichtig; sö helffend ainn närrisch weiter. + Ietz gee weiter gan dyr Zammenfassung von dyr Letzn 2. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 2 + + + 1. Um von n Mörkl aus hinst eyn s naehste Wort zo n Löschn, zipf: dw + 2. Um umbb n Mörkl hinst eyn s End von dyr Zeil zo n Löschn, demmlt d$ + 3. Dyrmitst ayn gantze Zeil löschst, gib ein: dd + 4. Mechst ayn Bewögung, ayn "Wolend", öfters, stöll de entspröchete Zal dyr- + vor: 3dw older aau: d3w + 5. Dyr Pfueg für ayn Önderungsfaudung lautt yso: + Pfemerer [Zal] Bewögungsschrit (Wolend) + Und dös haisst: + Dyr PFEMERER gibt an, WAS taan ghoert, öbbenn d = löschn (»delete«). + [ZAL] - Ayn Zal KAN myn angöbn, wenn myn halt ayn Wolend öfter habn will. + S WOLEND, also dyr Schrit WOHIN, besagt, auf was i aushin will, öbbenn + auf ayn Wort ( w ), s End von dyr Zeil ( $ ) und so weiter. + + 6. Däßst eyn n Anfang von dyr Zeil hinkimmst, schreib aynn Nuller: 0 + + 7. Um öbbs Vorigs wider z ruggln, gib ein: u (klain also) + Um allsand Önderungen in ayner Zeil z ruggln, haast: U (also grooß) + Um "rugg-z-ruggln", also allss wider herzstölln, zipf: r + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 3.1: ANFÜEGN (»put«) + + + ** Zipf p , dyrmitst öbbs gnetty Glöschts naach n Mörkl anfüegst. ** + + 1. Bewög önn Mörkl gan dyr eerstn untignen Zeil mit ---> dyrvor. + + 2. Zipf dd , um sele Zeil z löschn und dyrmit in aynn Wimm-"Roster" zo n + speichern. + + 3. Bewög önn Mörkl gan dyr Zeil c), ÜBER derer, daa wo de glöschte Zeil ein- + hinkemmen sollt. + + 4. So, und ietz gibst ainfach p ein, und schoon haast dö Zeil unter derer + mit n Mörkl drinn. + 5. Äfert d Schritt 2 hinst 4, hinst däßst allsand Zeiln yso naachynaynand + haast, wie s hinghoernd. + +---> d) Kanst du dös aau? +---> b) Veigerln seind blau. +---> c) Bedachtn kan myn lernen. +---> a) Roosn seind root. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 3.2: ERSÖTZN (»replace«) + + + ** Zipf rx , um dös Zaichen unter n Mörkl durch x z ersötzn. ** + + 1. Bewög önn Mörkl zo dyr eerstn untignen Zeil mit ---> dyrvor. + + 2. Bewög önn Mörkl, hinst däß yr auf n eerstn Faeler steet. + + 3. Zipf r und drafter dös Zaichen, wo dyrfür daa hinghoert. + + 4. Widerhol d Schritt 2 und 3, hinst däßst de eerste Zeil gmaeß dyr zwaittn + berichtigt haast: +---> Wie dö Zeit eingobn wurd, wurdnd ainike falsche Zastnen zipft! +---> Wie dö Zeil eingöbn wurd, wurdnd ainige falsche Tastnen zipft! + + 5. Ietz tue mit dyr Letzn 3.3 weiter. + +Anmörkung: Vergiß nit drauf, däßst mit n Anwenddn lernen solltst und nit öbbenn + mit n Auswendiglernen! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 3.3: ÖNDERN (»change«) + + + ** Um hinst eyn s Wortend z öndern, zipf ce . ** + + 1. Gee mit n Mörkl auf de eerste mit ---> angmörkte Zeil. + + 2. Ietz farst netty auf s "s" von Wstwr hin. + + 3. Zipf ce ein und aft d Wortberichtigung, daader also örter . + + 4. Druck und bewög önn Mörkl gan n naehstn Zaichen, wo göndert ghoert. + + 5. Äfert d Schritt 3 und 4, hinst däß dyr eerste Saz wie dyr zwaitte ist. + +---> Ainige Wstwr von derer Zlww ghhnnd mit n Öndern-Pfemerer gaauu. +---> Ainige Wörter von derer Zeil ghoernd mit n Öndern-Pfemerer göndert. + +ce löscht also s Wort und schlaaufft di eyn d Eingaab-Artweis. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 3.4.: NON MEERER ÖNDERUNGEN PFELFS c + + + ** D Löshfaudung c arechtt mit de nömlichnen Wolender wie dö mit d ** + + 1. Dyr Önder-Pfemerer arechtt anleich wie d Löshfaudung mit d , und zwaar + yso: + c [Zal] Bewögungsschritt (Wolend) + + 2. D Wolender seind de gleichn, öbbenn w für Wort und $ für s Zeilnend. + + + 3. Bewög di zo dyr eerstn untignen Zeil mit ---> . + + 4. Ietz geest auf dönn eerstn Faeler. + + 5. Zipf c$ , gib önn Rest von dyr Zeil wie in dyr zwaittn ein und druck aft + . +---> S End von derer Zeil sollt an de zwaitte daader anglichen werdn. +---> S End von derer Zeil sollt mit n Befelh c$ berichtigt werdn. + +Denk allweil dran, däßst iederzeit mit dyr Ruggtastn Faeler ausbössern kanst. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 3 + + + 1. Um ayn vorher glöschts Gwort anzfüegn, zipf p . Daa dyrmit werd dös + gantze Gwort NAACH n Mörkl angfüegt. Wenn s ayn gantze Zeil gwösn ist, + werd dö sel als de Zeil unterhalb n Mörkl eingfüegt. + + 2. Um dös Zaichen unter n Mörkl, also wo dyr Mörkl ist, z ersötzn, zipf r + und aft dös Zaichen, wost daadl habn willst. + + 3. Dyr Önderungspfemerer ( c = »change«) laasst ainn umbb n Mörkl hinst eyn s + End von n Wolend öndern. Zipf ce , dyrmitst umbb n Mörkl hinst eyn s End + von n Wort öndertst, und c$ hinst eyn s End von dyr Zeil. + + 4. Für d Önderung lautt dyr Pfueg: + + c [Zal] Wolend + +Ietz tue mit dyr naehstn Letzn weiter. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 4.1: MÖRKLSTÖLLUNG UND DAUTTICHTDARSTAND + +** Demmlt g, däßst önn Befand und Darstand von dyr Dautticht anzaigst. ** + ** Zipf G , dyrmitst auf ayn bestimmte Zeil in dyr Dautticht hinkimmst. ** + +Anmörkung: Lis dö gantze Letzn daader durch, ee wennst iewign öbbs unternimmst! + + 1. Druck g . Auf dös hin erscheint auf derer Seitt ganz unt ayn Dar- + standsmeldung mit n Dauttichtnam und n Befand innerhalb dyr Dautticht. + Mörk dyr de Zeilnnummer für n Schrit 3. + +Anmörkung: Müglicherweis seghst aau önn Mörklbefand in n zesmen untern Bild- + schirmögg. Aft ist s "Lindl" (»ruler«) eingstöllt; schau dyrzue mit + n Befelh :help 'ruler' naach. + 2. Druck G , um an s End von dyr Dautticht z kemmen. + gg gibst ein, däßst gan n Anfang von dyr Dautticht aufhinkimmst. + + 3. Gib d Nummer von derer Zeil ein, daa wost vorher warst, und aft non G . + Dös bringt di zrugg gan seler Zeil, daa wost stuenddst, wiest dös eerste + Maal g gadruckst. + + 4. Wennst di sicher gnueg füelst, aft füer d Schritt 1 hinst 3 aus. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 4.2: DYR BEFELH ZO N SUECHEN + + + ** Zipf / und dyrnaach aynn Ausdruk, um selbignen zo n Suechen. ** + + 1. Du gibst also in dyr Befelhsartweis s Zaichen / ein. Dös sel wie aau dyr + Mörkl erscheinend drauf unt auf n Schirm, netty wie bei dyr Faudung : . + + 2. Ietz zipf 'Faeeler' . Netty um dös 'Faeeler' willst ietz suechen. + + 3. Willst um gnaun dönn Ausdruk weitersuechen, zipf ainfach n (wie »next«). + Willst hinzrugg suechen, aft gibst N ein. + + 4. Um von Haus aus zruggaus z suechen, nimm ? statt / her. + + 5. Dyrmitst wider daa hinkimmst, wost herkemmen bist, druck o, und dös + öfter, wennst weiter zrugg willst. Mit i widerum kimmst vorwärts. + +---> Aynn Faeler schreibt myn nit "Faeeler"; Faeeler ist ayn Faeler + +Anmörkung: Wenn d Suech s Dauttichtend dyrraicht haat, geet s eyn n Anfang wi- + der weiter dyrmit, men Sach dyr Schaltter 'wrapscan' wär auf aus. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 4.3: DE GÖGNKLAMMERN FINDDN + + + ** Zipf % , um de entspröchete Klammer ) , ] older } z finddn. ** + + 1. Sötz önn Mörkl auf iewign aine von dene drei Klammern ( , [ older { + in dyr untignen Zeil, wo mit ---> angmörkt ist. + + 2. Ietzet zipf s Zaichen % . + + 3. Dyr Mörkl geet ietz auf de pässete schliessete Klammer. + + 4. Ietz demmlt % , und dyrmit kimmst gan dyr öffneretn Klammer zrugg. + + 5. Sötz önn Mörkl auf ayn anderne Klammer von ({[]}) und pröblt % aus. + +---> Dös ( ist blooß ayn Pochzeil ( mit [ verschaidne ] { Klammern } drinn. )) + +Anmörkung: Um dö Müglichkeit gaast bsunders froo sein, wennst aynmaal in aynn + Spaichgwort verzweiflt ayn faelete Gögnklammer suechst! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 4.4: D ERSÖTZUNGSFAUDUNG (»substitute«) + + + ** Zipf :s/alt/neu/g , um 'alt' durch 'neu' zo n Ersötzn. ** + + 1. Gee mit n Mörkl zo dyr unt steehetn mit ---> angmörktn Zeil. + + 2. Zipf :s/dee/de . Der Befelh ersötzt alsnan grad dös +eerste "dee", + wo vürkimmt. + + 3. Ietz pröblt s mit :s/dee/de/g . Dös zuesötzliche g ("Pflok" nennt myn + öbbs Sölchers) bewirkt, däß allss, was dyrmit kennzaichnet ist, innerhalb + von dyr ainn Zeil ersötzt werd. + +---> Dee schoenste Zeit, däß myn dee Blüemln anschaut, ist dee schoene Lan- + gesszeit. + 4. Um ietz allsand Suechbegriff innerhalb von zwo Zeiln zo n Öndern, zipf + :#,#s/alt/neu/g , wobei # ieweils für de eerste und lösste Zeil von dönn + Pfraich steet. + :%s/alt/neu/g zipfst, däßst d Vürkemmen in dyr gantzn Dautticht öndertst. + Mit :%s/alt/neu/gc finddst allsand Vürkemmen in dyr gsamtn Dautticht; + daa werst aber zeerst non gfraagt, obst ys ersötzn willst older nity. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 4 + + 1. g zaigt dönn ietzundn Dauttichtbefand und önn Darstand dyrvon an. + G bringt di an s End von dyr Dautticht. + G bringt di gan dyr entspröchetn Zeilnnummer. + gg bringt di zo dyr eerstn Zeil. + + 2. D Eingaab von / mit aynn Ausdruk suecht VÜRSHLING um dönn Ausdruk. + Gibst ? und aynn Suechbegrif ein, suecht s um dönn ÄRSHLING. + Zipf naach ayner Suech n ; naacherd werd in de gleiche Richtung weiter- + gsuecht. Mit N geet s umkeerter weiter. + o bringt di zo ölterne Befändd zrugg, i zo neuerne. + + 3. D Eingaab von % , wenn dyr Mörkl auf ainer von dene Klammern steet: ({[ + )]} , bringt di zo dyr Gögnklammer. + + 4. Um dös eerste Vürkemmen von "alt" in ayner Zeil durch "neu" z ersötzn, + zipf :s/alt/neu . + Um allsand in ayner Zeil z ersötzn, zipf :s/alt/neu/g . + Mechst allss in zwo Zeiln ersötzn, demmlt zo n Beispil :5,6s/alt/neu/g . + Mechst allss in dyr gantzn Dautticht ersötzn, gib ein: :%s/alt/neu/g . + Willst ayn ieds Maal bstaetln, höng 'c' wie »confirm« hint anhin. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 5.1: ZWISCHNDRINN AYNN AUSSERIGNEN BEFELH AUSFÜERN + + + ** Willst ayn Gfäßfaudung ausfüern, gib ainfach dö sel naach :! ein. ** + + 1. Zipf dönn bekanntn Befelh : , dyrmitst mit n Mörkl auf n Bildschirm + ganz abhin kimmst. Draufhin kanst aynn gwonen Gfäßbefelh eingöbn. + + 2. Zeerst kimmt aber non ayn Ruefzaichen ! . Und ietz haast de Müglich- + keit, ayn beliebige ausserige Gfäßfaudung auszfüern. + + 3. Als Beispil zipf :!ls ; und schoon haast ayn Auflistung von deinn + Verzaichniss, netty wie wennst ganz gwon in n Eingib wärst. Geet ls + aus iewign aynn Grund nit, aft pröblt s mit :!dir . + +Also non aynmaal: Mit dönn Angang kan ayn iede beliebige ausserige Faudung aus- + gfüert werdn, aau mit Auerwerdd. + +Und wolgmörkt: Allsand Befelh, wo mit : angeend, müessend mit bstö- + tigt werdn. Dös dyrsagn myr vürbaß niemer. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 5.2: NON MEERER DRÜBER, WIE MYN DAUTTICHTN SCHREIBT + + + ** Um öbbs Gönderts neu z speichern, zipf :w NEUER_DAUTTICHTNAM. ** + + 1. Zipf :!dir older :!ls , däßst dyr ayn Auflistung von deinn Verzaich- + niss ausherlaasst. Däßst dyrnaach eingöbn muesst, waisst ee schoon. + + 2. Suech dyr aynn Dauttichtnam aus, dönn wo s non nit geit, öbbenn POCH. + + 3. Ietz demmlt: :w POCH (also mit POCH als dönn neuen Dauttichtnam). + + 4. Dös speichert ietz de gantze Dautticht, also önn Wimmschainer, unter dönn + Nam POCH. Dös kanst leicht überprüeffen, indem däßst ainfach :!ls older + :!dir zipfst und dyrmit deinn Verzaichnissinhalt seghst. + +Anmörkung: Stigst ietz aus n Wimm aus und gännst n aft wider mit vim POCH , + naacherd wär dö Dautticht ayn gnaune Aamum von n Schainer dyrselbn, + wiest n gspeichert haast. + + 5. Ietz verweitert dö Dautticht - fallsst s Fenstl haast - , mit :!del POCH + beziehungsweis bei aynn Ainslgebäu mit :!rm POCH . +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 5.3: AYNN TAIL VON N GWORT ZO N SPEICHERN AUSWALN + +** Um aynn Tail von dyr Dautticht z speichern, zipf v [Wolend] :w DAUTTICHT ** + + 1. Ruck önn Mörkl auf netty dö Zeil daader. + + 2. Demmlt v und gee mit n Mörkl auf dönn fümftn Auflistungspunt untet. Du + seghst glei, däß s Gwort vürherghöbt erscheint. + + 3. Druck s Zaichen : . Ganz unt auf n Bildschirm erscheint :'<,'> . + + 4. Zipf w POCH , wobei s dönn Dauttichtnam POCH non nit geit. Vergwiß di, + däßst dös :'<,'>w POCH aau +seghst, ee wennst druckst. + + 5. Dyr Wimm schreibt de ausgwaltn Zeil eyn de Dautticht POCH einhin. Benutz + :!dir older :!ls , däßst dös überprüeffst. Lösh s fein nit öbbenn! Mir + brauchend s nömlich für de naehste Letzn. + +Anmörkung: Druckt myn v , ginnt d Sichtisch-Auswal. Du kanst mit n Mörkl um- + aynandfarn, um d Auswal z veröndern. Drafter kan myn mit yn aynn + Pfemerer mit dönn Gwort öbbs machen. Zo n Beispil löscht d dös + Gwort. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 5.4: EINLÖSN UND ZAMMENFÜERN VON DAUTTICHTN + + + ** Um önn Inhalt von ayner Dautticht einzlösn, zipf :r DAUTTICHTNAM ** + + 1. Sötz önn Mörkl über dö Zeil daader. + +OBACHT: Aft däßst önn Schrit 2 ausgfüert haast, seghst auf aynmaal öbbs aus + dyr Letzn 5.3. Bewög di naacherd wider abwärts, dyrmitst dö Letzn wi- + derfinddst. + 2. Ietz lis dein Dautticht POCH ein, indem däßst d Faudung :r POCH aus- + füerst, wobei wie gsait POCH für dönn von dir ausgsuechtn Dauttichtnam + steet. De einglösne Dautticht werd unterhalb dyr Mörklzeil eingfüegt. + + 3. Um zo n Überprüeffen, ob de Dautticht aau gwiß einglösn ist, gee zrugg; + und du seghst, däß s ietz zwo Ausförtigungen von dyr Letzn 5.3. geit, s + Urniss und de eingfüegte Dauttichtfassung. + +Anmörkung: Du kanst aau d Ausgaab von aynn Ausserigbefelh einlösn. Zo n Bei- + spil list :r !ls d Ausgaab von dyr Faudung ls ein und füegt s + unterhalb n Mörkl ein. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 5 + + + 1. :!FAUDUNG füert aynn ausserignen Befelh aus. + + Daader ayn Öttlych gwänddte Beispiler: + (Fenstl) (Ainsl - Leinsl) + :!dir :!ls - listt s Verzaichniss auf. + :!del DAUTTICHT :!rm DAUTTICHT - verweitert sele Dautticht. + + 2. :w DAUTTICHT speichert de ietzunde Wimmdautticht unter dönn besagtn Nam. + + 3. v WOLEND :w DAUTTICHTNAM schreibt de sichtisch ausgwaltn Zeiln eyn de + Dautticht mit seln Nam. + + 4. :r DAUTTICHTNAM ladt sele Dautticht und füegt s unterhalb n Mörklbefand + ein. + + 5. :r !dir list d Ausgaab von dyr Faudung dir und füegt s unterhalb n + Mörklbefand ein. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 6.1: ZEIL ÖFFNEN (»open«) + + + ** Zipf o, um ayn Zeil unterhalb n Mörkl z öffnen und eyn d ** + ** Einfüegartweis z kemmen. ** + + 1. Bewög önn Mörkl zo dyr eerstn mit ---> angmörktn Zeil unt. + + 2. Zipf o (klain), um ayn Zeil UNTERHALB n Mörkl z öffnen und mit dyr Ein- + füegartweis weiterztuen. + + 3. Ietz zipf ayn Weeng ayn Gwort und druck , um d Einfüegartweis z ver- + laassn. +---> Mit o werd dyr Mörkl auf de offene Zeil in dyr Einfüegartweis gsötzt. + + 4. Um ayn Zeil OBERHALB n Mörkl aufzmachen, gib ainfach aynn groosss O statt + yn aynn klainen ein. Versuech dös auf dyr untignen Zeil. + +---> Öffnet ayn Zeil über derer daader mit O , wenn dyr Mörkl auf derer Zeil + ist. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 6.2: GWORT ANFÜEGN (»append«) + + + ** Zipf a , um öbbs NAACH n Mörkl einzfüegn. ** + + 1. Bewög önn Mörkl gan n Anfang von dyr eerstn Üebungszeil mit ---> unt. + + 2. Druck e , hinst däß dyr Mörkl an n End von Zei steet. + + 3. Zipf ayn klains a , um öbbs NAACH n Mörkl anzfüegn. + + 4. Vergöntz dös Wort wie in dyr Zeil drunter. Druck , um d Schreib-Art- + weis z verlaassn. + + 5. Bewög di mit e zo n naehstn ungantzn Wort und widerhol d Schritt 3 und + 4. + +---> Dö Ze biett ayn Glögn , ayn Gwort in ayner Zeil anzfü. +---> Dö Zeil biett ayn Glögnet, ayn Gwort in ayner Zeil anzfüegn. + +Anmörkung: a , i und A bringend ainn gleichermaaßn eyn d Einfüegartweis; + dyr ainzige Unterschaid ist, WO mit n Einfüegn angfangt werd. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 6.3: AYN ANDERNE WEIS ZO N ERSÖTZN (»replace«) + + + ** Demmlt ayn groosss R , um meerer als wie grad ain Zaichen z ersötzn. ** + + 1. Bewög önn Mörkl zo dyr eerstn untignen, mit ---> angmörktn Zeil. + Gee mit n Mörkl gan n Anfang von n eerstn xxx . + + 2. Ietz druck R und zipf sele Zal, wo drunter in dyr zwaittn Zeil steet, + yso däß de sel s xxx ersötzt. + + 3. Druck , um d Ersötzungsartweis z verlaassn. Du gspannst, däß dyr + Rest von dyr Zeil unveröndert bleibt. + + 4. Äfert die Schritt, um dös überblibne xxx z ersötzn. + +---> S Zunddn von 123 zo xxx ergibt xxx. +---> S Zunddn von 123 zo 456 ergibt 579. + +Anmörkung: D Ersötzungsartweis ist wie d Einfüegartweis, aber ayn ieds eindem- + mlte Zaichen löscht ayn vorhanddns. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 6.4: GWORT AAMEN UND EINFÜEGN + + ** Benutz önn Pfemerer y , um öbbs z aamen, und p , um öbbs einzfüegn. ** + + 1. Gee zo dyr mit ---> angmörktn Zeil unt und sötz önn Mörkl hinter "a)". + + 2. Ginn d Sichtisch-Artweis mit v und bewög önn Mörkl gnaun vor "eerste". + + 3. Zipf y , um dönn vürherghöbtn Tail z aamen. + + 4. Bewög önn Mörkl gan n End von dyr naehstn Zeil: j$ + + 5. Demmlt p , um dös Gwort einzfüegn, und aft: a zwaitte . + + 6. Benutz d Sichtischartweis, um " Eintrag." auszwaln, aam s pfelfs y, be- + wög di gan n End von dyr naehstn Zeil mit j$ und füeg s Gwort dortn mit + p an. + +---> a) dös ist dyr eerste Eintrag. + b) + +Anmörkung: Du kanst y aau als Pfemerer verwenddn; yw aamt ain Wort. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 6.5: SCHALTTER SÖTZN + +** Sötz aynn Schaltter yso, däß ayn Suech older Ersötzung Grooß- und Klain- ** + ** schreibung übergeet. ** + + 1. Suech um 'übergee", indem däßst /übergee eingibst. + Widerhol d Suech ayn Öttlych Maal, indem däßst de Tastn n druckst. + + 2. Sötz de Zwisl - önn Schaltter - 'ic' (»ignore case«), indem däßst :set ic + eingibst. + 3. Ietz suech wider um 'übergee' und tue aau wider mit n weiter. Daa fallt + dyr auf, däß ietz öbbenn aau Übergee und ÜBERGEE hergeet. + + 4. Sötz de Zwisln 'hlsearch' und 'incsearch' pfelfs: :set hls is + + 5. Widerhol d Suech und bobacht, was ietz gschieght: /übergee + + 6. Däßst grooß und klain wider gwon unterscheidst, zipf: :set noic + +Anmörkung: Mechst de Tröffer niemer vürherghöbt seghn, gib ein: :nohlsearch +Anmörkung: Sollt klain/grooß bei ayner ainzignen Suech wurst sein, benutz \c + in n Suechausdruk: /übergee\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 6 + + 1. Zipf o , um ayn Zeil UNTERHALB n Mörkl z öffnen und d Einfüegartweis z + ginnen. + Zipf O , um ayn Zeil OBERHALB n Mörkl z öffnen. + + 2. Zipf a , um NAACH n Mörkl ayn Gwort einzfüegn. + Zipf A , um ayn Gwort naach n Zeilnend anzfüegn. + + 3. D Faudung e bringt di gan n End von aynn Wort. + + 4. Dyr Pfemerer y (»yank«) aamt öbbs, p (»put«) füegt dös ein. + + 5. Ayn groosss R geet eyn d Ersötzungsartweis, hinst däß myn druckt. + + 6. D Eingaab von ":set xxx" sötzt de Zwisl "xxx". Ayn Öttlych Zwisln seind: + 'ic' 'ignorecase' Grooß/klain wurst bei ayner Suech + 'is' 'incsearch' Zaig aau schoon ayn Tailüberainstimmung + 'hls' 'hlsearch' Höb allsand pässetn Ausdrück vürher + Dyr Schaltternam kan in dyr Kurz- older Langform angöbn werdn. + + 7. Stöll yn ayner Zwisl "no" voran, däßst ys abschalttst: :set noic +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 7.1: AYN HILFGWORT AUFRUEFFEN + + + ** Nutz dös einbaute Hilfgebäu, de "Betribsanlaittung" ** + + Eyn n Wimm ist ayn ausfüerliche "Gebrauchsanweisung" einbaut. Für s Eerste + pröblt ainfach ains von dene dreu aus: + - Druck d -Tastn, wennst öbbenn aine haast. + - Druck de Tastn , fallsst ys haast. + - Zipf :help + + Lis di eyn s Hilffenster ein, dyrmitst draufkimmst, wie dös mit dyr Hilf geet. + Demmlt w w , um von ainn Fenster zo n andern zo n Springen. + Demmlt :q , um s Hilffenster zo n Schliessn. + + Du kanst zo so guet wie allssand ayn Hilf finddn, indem däßst yn dyr Faudung + :help aynn Auerwerd naachstöllst und istig nit vergisst. Pröblt dös: + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 7.2: ERSTÖLL AYN GIN-SCHRIPF + + + ** Mutz önn Wimm mit de einbautn Faehigkeitn auf ** + + Dyr Wimm besitzt ayn Wösn Schäftungen, wo über n Urwimm aushingeend, aber de + meerern dyrvon seind in dyr Vorgaab ausgschaltt. Dyrmitst meerer aus n Wimm + ausherholst, erstöllst ayn "vimrc"-Dautticht. + + 1. Lög ayn "vimrc"-Dautticht an; dös geet ie naach Betribsgebäu verschidn: + :e ~/.vimrc für s Ainsl + :e $VIM/_vimrc bei n Fenstl + + 2. Ietz lis önn Inhalt von dyr Beispil-"vimrc"-Dautticht ein: + :r $VIMRUNTIME/vimrc_example.vim + + 3. Speichert de Dautticht mit: + :w + + 4. Bei n naehstn Gin von n Wimm ist aft d Füegnussvürherhöbung zuegschaltt. + Du kanst dyr allss eyn dö Dautticht einhinschreibn, wasst bständig habn + willst. Meerer dyrzue erfarst unter: :help vimrc-intro +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 7.3: VERGÖNTZN + + + ** Befelhszeilnvergöntzung mit d und ** + + 1. Vergwiß di, däß dyr Wimm nit auf n Urwimm-"Glais" fart: :set nocp + + 2. Schaug naach, wölcherne Dauttichtn däß s in n Verzaichniss geit: :!ls + older :!dir + 3. Zipf önn Anfang von ayner Faudung: :e + + 4. Druck d , und dyr Wimm zaigt ayn Listn von Faudungen, wo mit "e" + angeend. + 5. Druck , und dyr Wimm vervollstöndigt önn Faudungsnam zo ":edit". + + 6. Füeg ayn Laerzaichen und önn Anfang von ayner besteehetn Dautticht an: + :edit DAU + + 7. Druck . Dyr Wimm vergöntzt önn Nam, dös haisst, wenn yr aindeuttig + ist. +Anmörkung: D Vergöntzung geit s für aynn Hauffen Faudungen. Versuech ainfach + d und . Bsunders nützlich ist dös bei :help . +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 7 + + + 1. Zipf :help older druck older , um ayn Hilffenster z öffnen. + + 2. Zipf :help FAUDUNG , um auf ayn Hilf gan aynn Befelh z kemmen. + + 3. Zipf w w , um zo n andern Fenster z springen. + + 4. Zipf :q , um s Hilffenster z schliessn. + + 5. Erstöll ayn vimrc-Ginschripf zuer Sicherung von deine Mötzneinstöllungen. + + 6. Druck d, aft däßst naach : mit ayner Faudung angfangt haast, dyr- + mitst mügliche Vergöntzungen anzaigt kriegst. + Druck für ain Vervollstöndigung yllain. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Dös wär ietzet s End von n Wimmschainer. Gangen ist s daa drum, aynn kurtzn + und bündignen Überblik über s Blat WIMM z lifern, netty vil gnueg, däß myn + für s Eerste wirklich öbbs dyrmit anfangen kan. Dyrmit ist s aber auf kain + Weitn non nit taan; dyr Wimm haat schoon non vil meerer auf Lager. Lis als + Naehsts aynmaal s Benutzerhandbuech: :help user-manual . + + Zo n Weiterlösn und Weiterlernen wör dös Buech daader zo n Empfelhen: + Vim - Vi Improved - von n OUALLINE Steve + Verlaag: New Riders + Dös ist dös eerste Buech, wo ganz yn n Wimm gwidmt ist, netty dös Grechte für + Anfönger. Es haat ayn Wösn Beispiler und aau Bilder drinn. + See http://iccf-holland.org/click5.html + + Dös folgete Buech ist schoon ölter und meerer über n Urwimm als wie über n + Wimm, aber aau zo n Empfelhen: Textbearbeitung mit dem vi-Editor - von dyr + LAMB Linda und n ROBBINS Arnold - Verlaag O'Reilly - Buechlaittzal (ISBN): + 3897211262 + In dönn Buech kan myn fast allss finddn, was myn mit n Urwimm angeen mecht. + De söxte Ausgaab enthaltt aau schoon öbbs über n Wimm. + Als ietzunde Bezugniss für d Fassung 6.2 und ayn pfrenge Einfüerung dient + dös folgete Buech: + vim ge-packt von n WOBST Reinhard + mitp-Verlaag, Buechlaittzal 3-8266-1425-9 + Trotz dyr recht pfrengen Darstöllung ist s durch seine viln nützlichnen Bei- + spiler aau für Einsteiger grad grecht. Probhaeupster und de Beispilschripfer + seind zesig zo n Kriegn; see http://iccf-holland.org/click5.html + + Verfasst habnd dönn Schainer dyr PIERCE Michael C. und WARE Robert K. von dyr + Kolraader Knappnschuel (Colorado School of Mines). Er beruet auf Entwürff, wo + dyr SMITH Charles von dyr Kolraader Allschuel (Colorado State University) + zuer Verfüegung gstöllt haat. Gundpost: bware@mines.colorado.edu. + Für n Wimm haat n dyr MOOLENAAR Bram barechtt. + De bairische Übersötzung stammt von n HELL Sepp 2009. Sein Gundpostbrächt ist + sturmibund@t-online.de + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + + + + diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.ca b/vim/bundle/ubuntu-vim72/tutor/tutor.ca new file mode 100644 index 0000000..603a347 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.ca @@ -0,0 +1,807 @@ +=============================================================================== += B e n v i n g u t s a l t u t o r d e l V I M - Versió 1.5 = +=============================================================================== + + El Vim és un editor molt potent que té moltes ordres, masses com per + explicar-les totes un tutor com aquest. Aquest tutor està dissenyat + per descriure les ordres bàsiques que us permetin fer servir el Vim com + a editor de propòsit general. + + El temps aproximat de seguir el tutor complet és d'uns 25 o 30 minuts + depenent de quant temps dediqueu a experimentar. + + Feu una còpia d'aquest fitxer per practicar-hi (si heu començat amb el + programa vimtutor això que esteu llegint ja és una còpia). + + És important recordar que aquest tutor està pensat per ensenyar + practicant. És a dir, que haureu d'executar les ordres si les voleu + aprendre. Si només llegiu el text el més probable és que les oblideu. + + Ara assegureu-vos que la tecla de bloqueig de majúscules no està + activada i premeu la tecla j per moure el cursor avall, fins que + la lliçó 1.1 ocupi completament la pantalla. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 1.1: MOURE EL CURSOR + + + ** Per moure el cursor premeu les tecles h,j,k,l tal com està indicat. ** + ^ + k Pista: La h és a l'esquerra i mou el cursor cap a l'esquerra. + < h l > La l és a la dreta i mou el cursor cap a la dreta. + j La j sembla una fletxa cap avall. + v + 1. Moveu el cursor per la pantalla fins que us sentiu confortables. + + 2. Mantingueu premuda la tecla avall (j) una estona. +---> Ara sabeu com moure-us fins a la pròxima lliçó. + + 3. Usant la tecla avall, aneu a la lliçó 1.2. + +Nota: Si no esteu segurs de la tecla que heu premut, premeu per tornar + al mode Normal. Llavors torneu a teclejar l'ordre que volíeu. + +Nota: Les tecles de moviment del cursor (fletxes) també funcionen. Però usant + hjkl anireu més ràpid, quan us hi hàgiu acostumant. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 1.2: ENTRAR I SORTIR DEL VIM + + + !! NOTA: Abans de seguir els passos següents llegiu *tota* la lliçó!! + + 1. Premeu (per estar segurs que esteu en el mode Normal). + + 2. Teclegeu: :q! . + +---> Amb això sortireu de l'editor SENSE desar els canvis que hàgiu pogut + fer. Si voleu desar els canvis teclegeu: + :wq + + 3. Quan vegeu l'introductor de la shell escriviu l'ordre amb la qual heu + arribat a aquest tutor. Podria ser: vimtutor + O bé: vim tutor + +---> 'vim' és l'editor vim, i 'tutor' és el fitxer que voleu editar. + + 4. Si heu memoritzat les ordres, feu els passos anteriors, de l'1 al 3, + per sortir i tornar a entrar a l'editor. Llavors moveu el cursor avall + fins la lliçó 1.3. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 1.3: EDITAR TEXT - ESBORRAR + + + ** En mode Normal premeu x per esborrar el caràcter de sota el cursor. ** + + 1. Moveu el cursor fins la línia que hi ha més avall marcada amb --->. + + 2. Poseu el cursor a sobre el caràcter que cal esborrar, per corregir els + errors. + + 3. Premeu la tecla x per esborrar el caràcter. + + 4. Repetiu els passos 2 i 3 fins que la frase sigui correcta. + +---> Unna vaaca vva salttar sobbree la llluna. + + 5. Ara que la línia és correcta, aneu a la lliçó 1.4. + +NOTA: Mentre aneu fent no tracteu de memoritzar, practiqueu i prou. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 1.4: EDITAR TEXT - INSERIR + + + ** En mode Normal premeu i per inserir text. ** + + 1. Moveu el cursor avall fins la primera línia marcada amb --->. + + 2. Per fer la primera línia igual que la segona poseu el cursor sobre el + primer caràcter POSTERIOR al text que s'ha d'inserir. + + 3. Premeu la tecla i i escriviu el text que falta. + + 4. Quan hàgiu acabat premeu per tornar al mode Normal. Repetiu + els passos 2, 3 i 4 per corregir la frase. + +---> Falten carctrs en aquesta . +---> Falten alguns caràcters en aquesta línia. + + 5. Quan us trobeu còmodes inserint text aneu al sumari de baix. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LLIÇÓ 1 SUMARI + + + 1. El cursor es mou amb les fletxes o bé amb les tecles hjkl. + h (esquerra) j (avall) k (amunt) l (dreta) + + 2. Per entrar al Vim (des de la shell) escriviu: vim FITXER + + 3. Per sortir teclegeu: :q! per descartar els canvis. + O BÉ teclegeu: :wq per desar els canvis. + + 4. Per esborrar el caràcter de sota el cursor en el mode Normal premeu: x + + 5. Per inserir text on hi ha el cursor, en mode Normal, premeu: + i escriviu el text + +NOTA: La tecla us portarà al mode Normal o cancel·larà una ordre + que estigui a mitges. + +Ara continueu amb la lliçó 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 2.1: ORDRES PER ESBORRAR + + + ** Teclegeu dw per esborrar fins al final d'una paraula. ** + + 1. Premeu per estar segurs que esteu en mode normal. + + 2. Moveu el cursor avall fins la línia marcada amb --->. + + 3. Moveu el cursor fins el principi de la paraula que s'ha d'esborrar. + + 4. Teclegeu dw per fer desaparèixer la paraula. + +NOTA: Les lletres dw apareixeran a la línia de baix de la pantalla mentre + les aneu escrivint. Si us equivoqueu premeu i torneu a començar. + +---> Hi han algunes paraules divertit que no pertanyen paper a aquesta frase. + + 5. Repetiu el passos 3 i 4 fins que la frase sigui correcta i continueu a + la lliçó 2.2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 2.2: MÉS ORDRES PER ESBORRAR + + + ** Escriviu d$ per esborrar fins al final de la línia. ** + + 1. Premeu per estar segurs que esteu en el mode Normal. + + 2. Moveu el cursor avall fins a la línia marcada amb --->. + + 3. Moveu el cursor fins el final de la línia correcta + (DESPRÉS del primer . ). + + 4. Teclegeu d$ per esborrar fins al final de la línia. + +---> Algú ha escrit el final d'aquesta línia dos cops. línia dos cops. + + 5. Aneu a la lliçó 2.3 per entendre què està passant. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 2.3: SOBRE ORDRES I OBJECTES + + + El format de l'ordre d'esborrar d és el següent: + + [nombre] d objecte O BÉ d [nombre] objecte + On: + nombre - és el nombre de cops que s'ha d'executar (opcional, omissió=1). + d - és l'ordre per esborrar. + objecte - és la cosa amb la qual operar (llista a baix). + + Una petita llista d'objectes: + w - des del cursor fins al final de la paraula, incloent-hi l'espai. + e - des del cursor fins al final de la paraula, SENSE incloure l'espai. + $ - des del cursor fins al final de la línia. + +NOTA: Per als aventurers: si teclegeu només l'objecte, en el mode Normal, + sense cap ordre, el cursor es mourà tal com està especificat a la + llista d'objectes. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 2.4: UNA EXCEPCIÓ A 'ORDRE-OBJECTE' + + + ** Teclegeu dd esborrar tota la línia. ** + + Com que molt sovint s'han d'eliminar línies senceres els dissenyadors del + Vi van creure que seria més fàcil teclejar dd per esborrar tota la línia. + + 1. Moveu el cursor a la segona línia de la frase de baix. + 2. Teclegeu dd per esborrar la línia. + 3. Ara aneu a la quarta línia. + 4. Teclegeu 2dd per esborrar dues línies (recordeu nombre-ordre-objecte). + + 1) Les roses són vermelles, + 2) El fang és divertit, + 3) Les violetes són blaves, + 4) Tinc un cotxe, + 5) Els rellotges diuen l'hora, + 6) El sucre és dolç, + 7) Igual que tu. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 2.5: L'ORDRE DESFER + + + ** Premeu u per desfer els últims canvis, U per arreglar tota la línia. ** + + 1. Moveu el cursor sobre el primer error de línia de baix marcada amb ---> + 2. Premeu x per esborrar el caràcter no desitjat. + 3. Ara premeu u per desfer l'última ordre executada. + 4. Aquest cop corregiu tots els errors de la línia amb l'ordre x. + 5. Ara premeu U per restablir la línia al seu estat original. + 6. Ara premeu u uns quants cops per desfer U i les ordres anteriors. + 7. Ara premeu CONTROL-R (les dues tecles al mateix temps) uns quants cops + per refer les ordres. + +---> Correegiu els errors d'aqquesta línia i dessfeu-los aamb desfer. + + 8. Aquestes ordres són molt útils. Ara aneu al sumari de la lliçó 2. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LLIÇÓ 2 SUMARI + + + 1. Per esborrar del cursor al final de la paraula teclegeu: dw + + 2. Per esborrar del cursor al final de la línia teclegeu: d$ + + 3. Per esborrar una línia sencera teclegeu: dd + + 4. El format de qualsevol ordre del mode Normal és: + + [nombre] ordre objecte O BÉ ordre [nombre] objecte + on: + nombre - és quants cops repetir l'ordre + ordre - és què fer, com ara d per esborrar + objecte - és amb què s'ha d'actuar, com ara w (paraula), + $ (fins a final de línia), etc. + + 5. Per desfer les accions anteriors premeu: u + Per desfer tots el canvis en una línia premeu: U + Per desfer l'ordre desfer premeu: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 3.1: L'ORDRE 'POSAR' + + + ** Premeu p per posar l'última cosa que heu esborrat després del cursor. ** + + + 1. Moveu el cursor a la primera línia de llista de baix. + + 2. Teclegeu dd per esborrar la línia i desar-la a la memòria. + + 3. Moveu el cursor a la línia ANTERIOR on hauria d'anar. + + 4. En mode Normal, premeu p per inserir la línia. + + 5. Repetiu els passos 2, 3 i 4 per ordenar les línies correctament. + + d) Pots aprendre tu? + b) Les violetes són blaves, + c) L'intel·ligència s'aprèn, + a) Les roses són vermelles, + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 3.2: L'ORDRE SUBSTITUIR + + + ** Premeu r i un caràcter per substituir el caràcter de sota el cursor. ** + + 1. Moveu el cursor a la primera línia de sota marcada amb --->. + + 2. Moveu el cursor a sobre del primer caràcter equivocat. + + 3. Premeu r i tot seguit el caràcter correcte per corregir l'error. + + 4. Repetiu els passos 2 i 3 fins que la línia sigui correcta. + +---> Quen van escroure aquerta línia, algh va apretar tikles equivocades! +---> Quan van escriure aquesta línia, algú va apretar tecles equivocades! + + 5. Ara continueu a la lliçó 3.2. + +NOTA: Recordeu que heu de practicar, no memoritzar. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 3.3: L'ORDRE CANVIAR + + + ** Per canviar una part o tota la paraula, escriviu cw . ** + + 1. Moveu el cursor a la primera línia de sota marcada amb --->. + + 2. Poseu el cursor sobre la u de 'lughc'. + + 3. Teclegeu cw i corregiu la paraula (en aquest cas escriviu 'ínia'.) + + 4. Premeu i aneu al següent error. + + 5. Repetiu els passos 3 i 4 fins que les dues frases siguin iguals. + +---> Aquesta lughc té algunes paradskl que s'han de cdddf. +---> Aquesta línia té algunes paraules que s'han de canviar. + +Noteu que cw no només canvia la paraula, també us posa en mode d'inserció. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 3.4: MÉS CANVIS AMB c + + + ** L'ordre canviar s'usa amb els mateixos objectes que l'ordre esborrar. ** + + 1. L'ordre canviar funciona igual que la d'esborrar. El format és: + + [nombre] c objecte O BÉ c [nombre] objecte + + 2. Els objectes són els mateixos, com w (paraula), $ (final de línia), etc. + + 3. Moveu el cursor fins la primera línia marcada amb --->. + + 4. Avanceu fins al primer error. + + 5. Premeu c$ per fer la línia igual que la segona i premeu . + +---> El final d'aquesta línia necessita canvis per ser igual que la segona. +---> El final d'aquesta línia s'ha de corregir amb l'ordre c$. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LLIÇÓ 3 SUMARI + + + 1. Per tornar a posar el text que s'ha esborrat, premeu p . Això posa el + text esborrat DESPRÉS del cursor (si heu esborrat una línia anirà a + parar a la línia SEGÜENT d'on hi ha el cursor). + + 2. Per substituir el caràcter de sota el cursor, premeu r i tot seguit + el caràcter que ha de reemplaçar l'original. + + 3. L'ordre canviar permet canviar l'objecte especificat des del cursor + fins el final de l'objecte. Per exemple, cw canvia el que hi ha des + del cursor fins al final de la paraula, i c$ fins al final de línia. + + 4. El format de l'ordre canviar és: + + [nombre] c objecte O BÉ c [nombre] objecte + +Ara aneu a la pròxima lliçó. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 4.1: SITUACIÓ I ESTAT DEL FITXER + + + ** Premeu CTRL-g per veure la situació dins del fitxer i el seu estat. + Premeu SHIFT-G per anar a una línia determinada. ** + + Nota: No proveu res fins que hàgiu llegit TOTA la lliçó!! + + 1. Mantingueu premuda la tecla Control i premeu g . A la part de baix de + la pàgina apareixerà un línia amb el nom del fitxer i la línia en la + qual us trobeu. Recordeu el número de la línia pel Pas 3. + + 2. Premeu Shift-G per anar al final de tot del fitxer. + + 3. Teclegeu el número de la línia on éreu i després premeu Shift-G. Això + us tornarà a la línia on éreu quan heu premut per primer cop Ctrl-g. + (Quan teclegeu el número NO es veurà a la pantalla.) + + 4. Ara executeu els passos de l'1 al 3. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 4.2: L'ORDRE CERCAR + + + ** Premeu / seguit de la frase que vulgueu cercar. ** + + 1. En el mode Normal premeu el caràcter / . Noteu que el cursor apareix + a la part de baix de la pantalla igual que amb l'ordre : . + + 2. Ara escriviu 'errroor' . Aquesta és la paraula que voleu + cercar. + + 3. Per tornar a cercar la mateixa frase, premeu n . + Per cercar la mateixa frase en direcció contraria, premeu Shift-N . + + 4. Si voleu cercar una frase en direcció ascendent, useu l'ordre ? en + lloc de /. + +---> "errroor" no és com s'escriu error; errroor és un error. + +Note: Quan la cerca arribi al final del fitxer continuarà a l'inici. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 4.3: CERCA DE PARÈNTESIS + + + ** Premeu % per cercar el ),], o } corresponent. ** + + 1. Poseu el cursor en qualsevol (, [, o { de la línia marcada amb --->. + + 2. Ara premeu el caràcter % . + + 3. El cursor hauria d'anar a la clau o parèntesis corresponent. + + 4. Premeu % per tornar el cursor al primer parèntesi. + +---> Això ( és una línia amb caràcters (, [ ] i { } de prova. )) + +Nota: Això és molt útil per trobar errors en programes informàtics! + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 4.4: UNA MANERA DE CANVIAR ERRORS + + + ** Escriviu :s/vell/nou/g per substituir 'vell' per 'nou'. ** + + 1. Moveu el cursor a la línia de sota marcada amb --->. + + 2. Escriviu :s/laa/la . Aquesta ordre només canvia la primera + coincidència que es trobi a la línia. + + 3. Ara escriviu :s/laa/la/g per fer una substitució global. Això + canviarà totes les coincidències que es trobin a la línia. + +---> laa millor època per veure laa flor és laa primavera. + + 4. Per canviar totes les coincidències d'una cadena entre dues línies, + escriviu :#,#s/vell/nou/g on #,# són els nombres de les línies. + Escriviu :%s/vell/nou/g per substituir la cadena a tot el fitxer. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LLIÇÓ 4 SUMARI + + + 1. Ctrl-g mostra la posició dins del fitxer i l'estat del mateix. + Shift-G us porta al final del fitxer. Un número seguit de Shift-G + us porta a la línia corresponent. + + 2. L'ordre / seguida d'una frase cerca la frase ENDAVANT. + L'ordre ? seguida d'una frase cerca la frase ENDARRERE. + Després d'una cerca premeu n per trobar la pròxima coincidència en + la mateixa direcció, o Shift-N per cercar en la direcció contrària. + + 3. L'ordre % quan el cursor és a sobre un (,),[,],{, o } troba la + parella corresponent. + + 4. Per substituir el primer 'vell' per 'nou' en una línia :s/vell/nou + Per substituir tots els 'vell' per 'nou' en una línia :s/vell/nou/g + Per substituir frases entre les línies # i # :#,#s/vell/nou/g + Per substituir totes les coincidències en el fitxer :%s/vell/nou/g + Per demanar confirmació cada cop afegiu 'c' :%s/vell/nou/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 5.1: COM EXECUTAR UNA ORDRE EXTERNA + + + ** Teclegeu :! seguit d'una ordre externa per executar-la. ** + + 1. Premeu el familiar : per col·locar el cursor a la part de baix de + la pantalla. Això us permet entrar una ordre. + + 2. Ara teclegeu el caràcter ! (signe d'exclamació). Això us permet + executar qualsevol ordre de la shell. + + 3. Com a exemple escriviu ls i tot seguit premeu . Això us + mostrarà el contingut del directori, tal com si estiguéssiu a la + línia d'ordres. Feu servir :!dir si ls no funciona. + +Nota: D'aquesta manera es pot executar qualsevol ordre externa. + +Nota: Totes les ordres : s'han d'acabar amb la tecla + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 5.2: MÉS SOBRE L'ESCRIPTURA DE FITXERS + + + ** Per desar els canvis fets, escriviu :w FITXER. *** + + 1. Escriviu :!dir o bé :!ls per obtenir un llistat del directori. + Ja sabeu que heu de prémer després d'això. + + 2. Trieu un nom de fitxer que no existeixi, com ara PROVA. + + 3. Ara feu: :w PROVA (on PROVA és el nom que heu triat.) + + 4. Això desa tot el fitxer amb el nom de PROVA. Per comprovar-ho + escriviu :!dir per veure el contingut del directori. + +Note: Si sortiu del Vim i entreu una altra vegada amb el fitxer PROVA, el + fitxer serà una còpia exacta del tutor que heu desat. + + 5. Ara esborreu el fitxer teclejant (MS-DOS): :!del PROVA + o bé (Unix): :!rm PROVA + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 5.3: UNA ORDRE SELECTIVA PER DESAR + + + ** Per desar una part del fitxer, escriviu :#,# w FITXER ** + + 1. Un altre cop, feu :!dir o :!ls per obtenir un llistat del directori + i trieu un nom de fitxer adequat com ara PROVA. + + 2. Moveu el cursor a dalt de tot de la pàgina i premeu Ctrl-g per + saber el número de la línia. RECORDEU AQUEST NÚMERO! + + 3. Ara aneu a baix de tot de la pàgina i torneu a prémer Ctrl-g. + RECORDEU AQUEST NÚMERO TAMBÉ! + + 4. Per desar NOMÉS una secció en un fitxer, escriviu :#,# w PROVA on + #,# són els dos números que heu recordat (dalt,baix) i PROVA el nom + del fitxer. + + 5. Mireu que el fitxer nou hi sigui amb :!dir però no l'esborreu. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 5.4: OBTENIR I AJUNTAR FITXERS + + + ** Per inserir el contingut d'un fitxer, feu :r FITXER ** + + 1. Assegureu-vos, amb l'ordre :!dir , que el fitxer PROVA encara hi és. + + 2. Poseu el cursor a dalt de tot d'aquesta pàgina. + +NOTA: Després d'executar el Pas 3 veureu la lliçó 5.3. Aleshores moveu-vos + cap avall fins a aquesta lliçó un altre cop. + + 3. Ara obtingueu el fitxer PROVA amb l'ordre :r PROVA on PROVA és el + nom del fitxer. + +NOTA: El fitxer que obtingueu es posa en el lloc on hi hagi el cursor. + + 4. Per comprovar que s'ha obtingut el fitxer tireu enrere i mireu com + ara hi han dues còpies de la lliçó 5.3: l'original i la del fitxer. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LLIÇÓ 5 SUMARI + + + 1. :!ordre executa una ordre externa. + + Alguns exemples útils són: + (MS-DOS) (Unix) + :!dir :!ls - mostra un llistat del directori + :!del FITXER :!rm FITXER - esborra el fitxer FITXER + + 2. :w FITXER escriu el fitxer editat al disc dur, amb el nom FITXER. + + 3. :#,#w FITXER desa les línies de # a # en el fitxer FITXER. + + 4. :r FITXER llegeix el fitxer FITXER del disc dur i l'insereix en el + fitxer editat a la posició on hi ha el cursor. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 6.1: L'ORDRE OBRIR + + +** Premeu o per obrir una línia sota el cursor i entrar en mode inserció. ** + + 1. Moveu el cursor a la línia de sota marcada amb --->. + + 2. Premeu o (minúscula) per obrir una línia SOTA el cursor i situar-vos + en mode d'inserció. + + 3. Ara copieu la línia marcada amb ---> i premeu per tornar al mode + normal. + +---> Després de prémer o el cursor es situa a la línia nova en mode inserció. + + 4. Per obrir una línia SOBRE el cursor, premeu la O majúscula, en lloc + de la minúscula. Proveu-ho amb la línia de sota. +Obriu una línia sobre aquesta amb Shift-O amb el cursor en aquesta línia. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 6.2: L'ORDRE AFEGIR + + + ** Premeu a per afegir text DESPRÉS del cursor. ** + + 1. Moveu el cursor al final de la primera línia de sota marcada + amb ---> prement $ en el mode Normal. + + 2. Premeu la lletra a (minúscula) per afegir text DESPRÉS del caràcter + sota el cursor. (La A majúscula afegeix text al final de línia.) + +Nota: Així s'evita haver de prémer i , l'últim caràcter, el text a inserir, + la tecla , cursor a la dreta, i finalment x , només per afegir + text a final de línia. + + 3. Ara completeu la primera línia. Tingueu en compte que aquesta ordre + és exactament igual que la d'inserir, excepte pel que fa al lloc on + s'insereix el text. + +---> Aquesta línia us permetrà practicar +---> Aquesta línia us permetrà practicar afegir text a final de línia. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 6.3: UNA ALTRA MANERA DE SUBSTITUIR + + + ** Teclegeu una R majúscula per substituir més d'un caràcter. ** + + 1. Moveu el cursor a la línia de sota marcada amb --->. + + 2. Poseu el cursor al principi de la primera paraula que es diferent + respecte a la segona línia marcada amb ---> (la paraula "l'última"). + + 3. Ara premeu R i substituïu el que queda de text a la primera línia + escrivint sobre el text vell, per fer-la igual que la segona. + +---> Per fer aquesta línia igual que l'última useu les tecles. +---> Per fer aquesta línia igual que la segona, premeu R i el text nou. + + 4. Tingueu en compte que en prémer per sortir, el text que no + s'hagi alterat es manté. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 6.4: ESTABLIR OPCIONS + + ** Feu que les ordres cercar o substituir ignorin les diferències + entre majúscules i minúscules ** + + 1. Cerqueu la paraula 'ignorar' amb: /ignorar + Repetiu-ho uns quants cops amb la tecla n. + + 2. Establiu l'opció 'ic' (Ignorar Capitals) escrivint: + :set ic + + 3. Ara cerqueu 'ignorar' un altre cop amb la tecla n. + Repetiu-ho uns quants cops més. + + 4. Establiu les opcions 'hlsearch' i 'incsearch': + :set hls is + + 5. Ara torneu a executar una ordre de cerca, i mireu què passa: + /ignorar + + 6. Per treure el ressalt dels resultats, feu: + :nohlsearch +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LLIÇÓ 6 SUMARI + + + 1. L'ordre o obre una línia SOTA la del cursor i mou el cursor a la nova + línia, en mode Inserció. + La O majúscula obre la línia a SOBRE la que hi ha el cursor. + + 2. Premeu una a per afegir text DESPRÉS del caràcter sota el cursor. + La A majúscula afegeix automàticament el text a final de línia. + + 3. L'ordre R majúscula us posa en mode substitució fins que premeu . + + 4. Escriviu ":set xxx" per establir l'opció "xxx" + + + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LLIÇÓ 7: ORDRES D'AJUDA + + + ** Utilitzeu el sistema intern d'ajuda ** + + El Vim té un extens sistema d'ajuda. Per llegir una introducció proveu una + d'aquestes tres coses: + - premeu la tecla (si en teniu alguna) + - premeu la tecla (si en teniu alguna) + - escriviu :help + + Teclegeu :q per tancar la finestra d'ajuda. + + Podeu trobar ajuda sobre pràcticament qualsevol tema donant un argument + a l'ordre ":help". Proveu això (no oblideu prémer ): + + :help w + :help c_ La l és a la dreta i mou el cursor cap a la dreta. + j La j sembla una fletxa cap avall. + v + 1. Moveu el cursor per la pantalla fins que us sentiu confortables. + + 2. Mantingueu premuda la tecla avall (j) una estona. +---> Ara sabeu com moure-us fins a la pròxima lliçó. + + 3. Usant la tecla avall, aneu a la lliçó 1.2. + +Nota: Si no esteu segurs de la tecla que heu premut, premeu per tornar + al mode Normal. Llavors torneu a teclejar l'ordre que volíeu. + +Nota: Les tecles de moviment del cursor (fletxes) també funcionen. Però usant + hjkl anireu més ràpid, quan us hi hàgiu acostumant. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 1.2: ENTRAR I SORTIR DEL VIM + + + !! NOTA: Abans de seguir els passos següents llegiu *tota* la lliçó!! + + 1. Premeu (per estar segurs que esteu en el mode Normal). + + 2. Teclegeu: :q! . + +---> Amb això sortireu de l'editor SENSE desar els canvis que hàgiu pogut + fer. Si voleu desar els canvis teclegeu: + :wq + + 3. Quan vegeu l'introductor de la shell escriviu l'ordre amb la qual heu + arribat a aquest tutor. Podria ser: vimtutor + O bé: vim tutor + +---> 'vim' és l'editor vim, i 'tutor' és el fitxer que voleu editar. + + 4. Si heu memoritzat les ordres, feu els passos anteriors, de l'1 al 3, + per sortir i tornar a entrar a l'editor. Llavors moveu el cursor avall + fins la lliçó 1.3. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 1.3: EDITAR TEXT - ESBORRAR + + + ** En mode Normal premeu x per esborrar el caràcter de sota el cursor. ** + + 1. Moveu el cursor fins la línia que hi ha més avall marcada amb --->. + + 2. Poseu el cursor a sobre el caràcter que cal esborrar, per corregir els + errors. + + 3. Premeu la tecla x per esborrar el caràcter. + + 4. Repetiu els passos 2 i 3 fins que la frase sigui correcta. + +---> Unna vaaca vva salttar sobbree la llluna. + + 5. Ara que la línia és correcta, aneu a la lliçó 1.4. + +NOTA: Mentre aneu fent no tracteu de memoritzar, practiqueu i prou. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 1.4: EDITAR TEXT - INSERIR + + + ** En mode Normal premeu i per inserir text. ** + + 1. Moveu el cursor avall fins la primera línia marcada amb --->. + + 2. Per fer la primera línia igual que la segona poseu el cursor sobre el + primer caràcter POSTERIOR al text que s'ha d'inserir. + + 3. Premeu la tecla i i escriviu el text que falta. + + 4. Quan hàgiu acabat premeu per tornar al mode Normal. Repetiu + els passos 2, 3 i 4 per corregir la frase. + +---> Falten carctrs en aquesta . +---> Falten alguns caràcters en aquesta línia. + + 5. Quan us trobeu còmodes inserint text aneu al sumari de baix. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LLIÇÓ 1 SUMARI + + + 1. El cursor es mou amb les fletxes o bé amb les tecles hjkl. + h (esquerra) j (avall) k (amunt) l (dreta) + + 2. Per entrar al Vim (des de la shell) escriviu: vim FITXER + + 3. Per sortir teclegeu: :q! per descartar els canvis. + O BÉ teclegeu: :wq per desar els canvis. + + 4. Per esborrar el caràcter de sota el cursor en el mode Normal premeu: x + + 5. Per inserir text on hi ha el cursor, en mode Normal, premeu: + i escriviu el text + +NOTA: La tecla us portarà al mode Normal o cancel·larà una ordre + que estigui a mitges. + +Ara continueu amb la lliçó 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 2.1: ORDRES PER ESBORRAR + + + ** Teclegeu dw per esborrar fins al final d'una paraula. ** + + 1. Premeu per estar segurs que esteu en mode normal. + + 2. Moveu el cursor avall fins la línia marcada amb --->. + + 3. Moveu el cursor fins el principi de la paraula que s'ha d'esborrar. + + 4. Teclegeu dw per fer desaparèixer la paraula. + +NOTA: Les lletres dw apareixeran a la línia de baix de la pantalla mentre + les aneu escrivint. Si us equivoqueu premeu i torneu a començar. + +---> Hi han algunes paraules divertit que no pertanyen paper a aquesta frase. + + 5. Repetiu el passos 3 i 4 fins que la frase sigui correcta i continueu a + la lliçó 2.2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 2.2: MÉS ORDRES PER ESBORRAR + + + ** Escriviu d$ per esborrar fins al final de la línia. ** + + 1. Premeu per estar segurs que esteu en el mode Normal. + + 2. Moveu el cursor avall fins a la línia marcada amb --->. + + 3. Moveu el cursor fins el final de la línia correcta + (DESPRÉS del primer . ). + + 4. Teclegeu d$ per esborrar fins al final de la línia. + +---> Algú ha escrit el final d'aquesta línia dos cops. línia dos cops. + + 5. Aneu a la lliçó 2.3 per entendre què està passant. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 2.3: SOBRE ORDRES I OBJECTES + + + El format de l'ordre d'esborrar d és el següent: + + [nombre] d objecte O BÉ d [nombre] objecte + On: + nombre - és el nombre de cops que s'ha d'executar (opcional, omissió=1). + d - és l'ordre per esborrar. + objecte - és la cosa amb la qual operar (llista a baix). + + Una petita llista d'objectes: + w - des del cursor fins al final de la paraula, incloent-hi l'espai. + e - des del cursor fins al final de la paraula, SENSE incloure l'espai. + $ - des del cursor fins al final de la línia. + +NOTA: Per als aventurers: si teclegeu només l'objecte, en el mode Normal, + sense cap ordre, el cursor es mourà tal com està especificat a la + llista d'objectes. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 2.4: UNA EXCEPCIÓ A 'ORDRE-OBJECTE' + + + ** Teclegeu dd esborrar tota la línia. ** + + Com que molt sovint s'han d'eliminar línies senceres els dissenyadors del + Vi van creure que seria més fàcil teclejar dd per esborrar tota la línia. + + 1. Moveu el cursor a la segona línia de la frase de baix. + 2. Teclegeu dd per esborrar la línia. + 3. Ara aneu a la quarta línia. + 4. Teclegeu 2dd per esborrar dues línies (recordeu nombre-ordre-objecte). + + 1) Les roses són vermelles, + 2) El fang és divertit, + 3) Les violetes són blaves, + 4) Tinc un cotxe, + 5) Els rellotges diuen l'hora, + 6) El sucre és dolç, + 7) Igual que tu. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 2.5: L'ORDRE DESFER + + + ** Premeu u per desfer els últims canvis, U per arreglar tota la línia. ** + + 1. Moveu el cursor sobre el primer error de línia de baix marcada amb ---> + 2. Premeu x per esborrar el caràcter no desitjat. + 3. Ara premeu u per desfer l'última ordre executada. + 4. Aquest cop corregiu tots els errors de la línia amb l'ordre x. + 5. Ara premeu U per restablir la línia al seu estat original. + 6. Ara premeu u uns quants cops per desfer U i les ordres anteriors. + 7. Ara premeu CONTROL-R (les dues tecles al mateix temps) uns quants cops + per refer les ordres. + +---> Correegiu els errors d'aqquesta línia i dessfeu-los aamb desfer. + + 8. Aquestes ordres són molt útils. Ara aneu al sumari de la lliçó 2. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LLIÇÓ 2 SUMARI + + + 1. Per esborrar del cursor al final de la paraula teclegeu: dw + + 2. Per esborrar del cursor al final de la línia teclegeu: d$ + + 3. Per esborrar una línia sencera teclegeu: dd + + 4. El format de qualsevol ordre del mode Normal és: + + [nombre] ordre objecte O BÉ ordre [nombre] objecte + on: + nombre - és quants cops repetir l'ordre + ordre - és què fer, com ara d per esborrar + objecte - és amb què s'ha d'actuar, com ara w (paraula), + $ (fins a final de línia), etc. + + 5. Per desfer les accions anteriors premeu: u + Per desfer tots el canvis en una línia premeu: U + Per desfer l'ordre desfer premeu: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 3.1: L'ORDRE 'POSAR' + + + ** Premeu p per posar l'última cosa que heu esborrat després del cursor. ** + + + 1. Moveu el cursor a la primera línia de llista de baix. + + 2. Teclegeu dd per esborrar la línia i desar-la a la memòria. + + 3. Moveu el cursor a la línia ANTERIOR on hauria d'anar. + + 4. En mode Normal, premeu p per inserir la línia. + + 5. Repetiu els passos 2, 3 i 4 per ordenar les línies correctament. + + d) Pots aprendre tu? + b) Les violetes són blaves, + c) L'intel·ligència s'aprèn, + a) Les roses són vermelles, + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 3.2: L'ORDRE SUBSTITUIR + + + ** Premeu r i un caràcter per substituir el caràcter de sota el cursor. ** + + 1. Moveu el cursor a la primera línia de sota marcada amb --->. + + 2. Moveu el cursor a sobre del primer caràcter equivocat. + + 3. Premeu r i tot seguit el caràcter correcte per corregir l'error. + + 4. Repetiu els passos 2 i 3 fins que la línia sigui correcta. + +---> Quen van escroure aquerta línia, algh va apretar tikles equivocades! +---> Quan van escriure aquesta línia, algú va apretar tecles equivocades! + + 5. Ara continueu a la lliçó 3.2. + +NOTA: Recordeu que heu de practicar, no memoritzar. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 3.3: L'ORDRE CANVIAR + + + ** Per canviar una part o tota la paraula, escriviu cw . ** + + 1. Moveu el cursor a la primera línia de sota marcada amb --->. + + 2. Poseu el cursor sobre la u de 'lughc'. + + 3. Teclegeu cw i corregiu la paraula (en aquest cas escriviu 'ínia'.) + + 4. Premeu i aneu al següent error. + + 5. Repetiu els passos 3 i 4 fins que les dues frases siguin iguals. + +---> Aquesta lughc té algunes paradskl que s'han de cdddf. +---> Aquesta línia té algunes paraules que s'han de canviar. + +Noteu que cw no només canvia la paraula, també us posa en mode d'inserció. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 3.4: MÉS CANVIS AMB c + + + ** L'ordre canviar s'usa amb els mateixos objectes que l'ordre esborrar. ** + + 1. L'ordre canviar funciona igual que la d'esborrar. El format és: + + [nombre] c objecte O BÉ c [nombre] objecte + + 2. Els objectes són els mateixos, com w (paraula), $ (final de línia), etc. + + 3. Moveu el cursor fins la primera línia marcada amb --->. + + 4. Avanceu fins al primer error. + + 5. Premeu c$ per fer la línia igual que la segona i premeu . + +---> El final d'aquesta línia necessita canvis per ser igual que la segona. +---> El final d'aquesta línia s'ha de corregir amb l'ordre c$. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LLIÇÓ 3 SUMARI + + + 1. Per tornar a posar el text que s'ha esborrat, premeu p . Això posa el + text esborrat DESPRÉS del cursor (si heu esborrat una línia anirà a + parar a la línia SEGÜENT d'on hi ha el cursor). + + 2. Per substituir el caràcter de sota el cursor, premeu r i tot seguit + el caràcter que ha de reemplaçar l'original. + + 3. L'ordre canviar permet canviar l'objecte especificat des del cursor + fins el final de l'objecte. Per exemple, cw canvia el que hi ha des + del cursor fins al final de la paraula, i c$ fins al final de línia. + + 4. El format de l'ordre canviar és: + + [nombre] c objecte O BÉ c [nombre] objecte + +Ara aneu a la pròxima lliçó. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 4.1: SITUACIÓ I ESTAT DEL FITXER + + + ** Premeu CTRL-g per veure la situació dins del fitxer i el seu estat. + Premeu SHIFT-G per anar a una línia determinada. ** + + Nota: No proveu res fins que hàgiu llegit TOTA la lliçó!! + + 1. Mantingueu premuda la tecla Control i premeu g . A la part de baix de + la pàgina apareixerà un línia amb el nom del fitxer i la línia en la + qual us trobeu. Recordeu el número de la línia pel Pas 3. + + 2. Premeu Shift-G per anar al final de tot del fitxer. + + 3. Teclegeu el número de la línia on éreu i després premeu Shift-G. Això + us tornarà a la línia on éreu quan heu premut per primer cop Ctrl-g. + (Quan teclegeu el número NO es veurà a la pantalla.) + + 4. Ara executeu els passos de l'1 al 3. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 4.2: L'ORDRE CERCAR + + + ** Premeu / seguit de la frase que vulgueu cercar. ** + + 1. En el mode Normal premeu el caràcter / . Noteu que el cursor apareix + a la part de baix de la pantalla igual que amb l'ordre : . + + 2. Ara escriviu 'errroor' . Aquesta és la paraula que voleu + cercar. + + 3. Per tornar a cercar la mateixa frase, premeu n . + Per cercar la mateixa frase en direcció contraria, premeu Shift-N . + + 4. Si voleu cercar una frase en direcció ascendent, useu l'ordre ? en + lloc de /. + +---> "errroor" no és com s'escriu error; errroor és un error. + +Note: Quan la cerca arribi al final del fitxer continuarà a l'inici. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 4.3: CERCA DE PARÈNTESIS + + + ** Premeu % per cercar el ),], o } corresponent. ** + + 1. Poseu el cursor en qualsevol (, [, o { de la línia marcada amb --->. + + 2. Ara premeu el caràcter % . + + 3. El cursor hauria d'anar a la clau o parèntesis corresponent. + + 4. Premeu % per tornar el cursor al primer parèntesi. + +---> Això ( és una línia amb caràcters (, [ ] i { } de prova. )) + +Nota: Això és molt útil per trobar errors en programes informàtics! + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 4.4: UNA MANERA DE CANVIAR ERRORS + + + ** Escriviu :s/vell/nou/g per substituir 'vell' per 'nou'. ** + + 1. Moveu el cursor a la línia de sota marcada amb --->. + + 2. Escriviu :s/laa/la . Aquesta ordre només canvia la primera + coincidència que es trobi a la línia. + + 3. Ara escriviu :s/laa/la/g per fer una substitució global. Això + canviarà totes les coincidències que es trobin a la línia. + +---> laa millor època per veure laa flor és laa primavera. + + 4. Per canviar totes les coincidències d'una cadena entre dues línies, + escriviu :#,#s/vell/nou/g on #,# són els nombres de les línies. + Escriviu :%s/vell/nou/g per substituir la cadena a tot el fitxer. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LLIÇÓ 4 SUMARI + + + 1. Ctrl-g mostra la posició dins del fitxer i l'estat del mateix. + Shift-G us porta al final del fitxer. Un número seguit de Shift-G + us porta a la línia corresponent. + + 2. L'ordre / seguida d'una frase cerca la frase ENDAVANT. + L'ordre ? seguida d'una frase cerca la frase ENDARRERE. + Després d'una cerca premeu n per trobar la pròxima coincidència en + la mateixa direcció, o Shift-N per cercar en la direcció contrària. + + 3. L'ordre % quan el cursor és a sobre un (,),[,],{, o } troba la + parella corresponent. + + 4. Per substituir el primer 'vell' per 'nou' en una línia :s/vell/nou + Per substituir tots els 'vell' per 'nou' en una línia :s/vell/nou/g + Per substituir frases entre les línies # i # :#,#s/vell/nou/g + Per substituir totes les coincidències en el fitxer :%s/vell/nou/g + Per demanar confirmació cada cop afegiu 'c' :%s/vell/nou/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 5.1: COM EXECUTAR UNA ORDRE EXTERNA + + + ** Teclegeu :! seguit d'una ordre externa per executar-la. ** + + 1. Premeu el familiar : per col·locar el cursor a la part de baix de + la pantalla. Això us permet entrar una ordre. + + 2. Ara teclegeu el caràcter ! (signe d'exclamació). Això us permet + executar qualsevol ordre de la shell. + + 3. Com a exemple escriviu ls i tot seguit premeu . Això us + mostrarà el contingut del directori, tal com si estiguéssiu a la + línia d'ordres. Feu servir :!dir si ls no funciona. + +Nota: D'aquesta manera es pot executar qualsevol ordre externa. + +Nota: Totes les ordres : s'han d'acabar amb la tecla + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 5.2: MÉS SOBRE L'ESCRIPTURA DE FITXERS + + + ** Per desar els canvis fets, escriviu :w FITXER. *** + + 1. Escriviu :!dir o bé :!ls per obtenir un llistat del directori. + Ja sabeu que heu de prémer després d'això. + + 2. Trieu un nom de fitxer que no existeixi, com ara PROVA. + + 3. Ara feu: :w PROVA (on PROVA és el nom que heu triat.) + + 4. Això desa tot el fitxer amb el nom de PROVA. Per comprovar-ho + escriviu :!dir per veure el contingut del directori. + +Note: Si sortiu del Vim i entreu una altra vegada amb el fitxer PROVA, el + fitxer serà una còpia exacta del tutor que heu desat. + + 5. Ara esborreu el fitxer teclejant (MS-DOS): :!del PROVA + o bé (Unix): :!rm PROVA + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 5.3: UNA ORDRE SELECTIVA PER DESAR + + + ** Per desar una part del fitxer, escriviu :#,# w FITXER ** + + 1. Un altre cop, feu :!dir o :!ls per obtenir un llistat del directori + i trieu un nom de fitxer adequat com ara PROVA. + + 2. Moveu el cursor a dalt de tot de la pàgina i premeu Ctrl-g per + saber el número de la línia. RECORDEU AQUEST NÚMERO! + + 3. Ara aneu a baix de tot de la pàgina i torneu a prémer Ctrl-g. + RECORDEU AQUEST NÚMERO TAMBÉ! + + 4. Per desar NOMÉS una secció en un fitxer, escriviu :#,# w PROVA on + #,# són els dos números que heu recordat (dalt,baix) i PROVA el nom + del fitxer. + + 5. Mireu que el fitxer nou hi sigui amb :!dir però no l'esborreu. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 5.4: OBTENIR I AJUNTAR FITXERS + + + ** Per inserir el contingut d'un fitxer, feu :r FITXER ** + + 1. Assegureu-vos, amb l'ordre :!dir , que el fitxer PROVA encara hi és. + + 2. Poseu el cursor a dalt de tot d'aquesta pàgina. + +NOTA: Després d'executar el Pas 3 veureu la lliçó 5.3. Aleshores moveu-vos + cap avall fins a aquesta lliçó un altre cop. + + 3. Ara obtingueu el fitxer PROVA amb l'ordre :r PROVA on PROVA és el + nom del fitxer. + +NOTA: El fitxer que obtingueu es posa en el lloc on hi hagi el cursor. + + 4. Per comprovar que s'ha obtingut el fitxer tireu enrere i mireu com + ara hi han dues còpies de la lliçó 5.3: l'original i la del fitxer. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LLIÇÓ 5 SUMARI + + + 1. :!ordre executa una ordre externa. + + Alguns exemples útils són: + (MS-DOS) (Unix) + :!dir :!ls - mostra un llistat del directori + :!del FITXER :!rm FITXER - esborra el fitxer FITXER + + 2. :w FITXER escriu el fitxer editat al disc dur, amb el nom FITXER. + + 3. :#,#w FITXER desa les línies de # a # en el fitxer FITXER. + + 4. :r FITXER llegeix el fitxer FITXER del disc dur i l'insereix en el + fitxer editat a la posició on hi ha el cursor. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 6.1: L'ORDRE OBRIR + + +** Premeu o per obrir una línia sota el cursor i entrar en mode inserció. ** + + 1. Moveu el cursor a la línia de sota marcada amb --->. + + 2. Premeu o (minúscula) per obrir una línia SOTA el cursor i situar-vos + en mode d'inserció. + + 3. Ara copieu la línia marcada amb ---> i premeu per tornar al mode + normal. + +---> Després de prémer o el cursor es situa a la línia nova en mode inserció. + + 4. Per obrir una línia SOBRE el cursor, premeu la O majúscula, en lloc + de la minúscula. Proveu-ho amb la línia de sota. +Obriu una línia sobre aquesta amb Shift-O amb el cursor en aquesta línia. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 6.2: L'ORDRE AFEGIR + + + ** Premeu a per afegir text DESPRÉS del cursor. ** + + 1. Moveu el cursor al final de la primera línia de sota marcada + amb ---> prement $ en el mode Normal. + + 2. Premeu la lletra a (minúscula) per afegir text DESPRÉS del caràcter + sota el cursor. (La A majúscula afegeix text al final de línia.) + +Nota: Així s'evita haver de prémer i , l'últim caràcter, el text a inserir, + la tecla , cursor a la dreta, i finalment x , només per afegir + text a final de línia. + + 3. Ara completeu la primera línia. Tingueu en compte que aquesta ordre + és exactament igual que la d'inserir, excepte pel que fa al lloc on + s'insereix el text. + +---> Aquesta línia us permetrà practicar +---> Aquesta línia us permetrà practicar afegir text a final de línia. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 6.3: UNA ALTRA MANERA DE SUBSTITUIR + + + ** Teclegeu una R majúscula per substituir més d'un caràcter. ** + + 1. Moveu el cursor a la línia de sota marcada amb --->. + + 2. Poseu el cursor al principi de la primera paraula que es diferent + respecte a la segona línia marcada amb ---> (la paraula "l'última"). + + 3. Ara premeu R i substituïu el que queda de text a la primera línia + escrivint sobre el text vell, per fer-la igual que la segona. + +---> Per fer aquesta línia igual que l'última useu les tecles. +---> Per fer aquesta línia igual que la segona, premeu R i el text nou. + + 4. Tingueu en compte que en prémer per sortir, el text que no + s'hagi alterat es manté. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lliçó 6.4: ESTABLIR OPCIONS + + ** Feu que les ordres cercar o substituir ignorin les diferències + entre majúscules i minúscules ** + + 1. Cerqueu la paraula 'ignorar' amb: /ignorar + Repetiu-ho uns quants cops amb la tecla n. + + 2. Establiu l'opció 'ic' (Ignorar Capitals) escrivint: + :set ic + + 3. Ara cerqueu 'ignorar' un altre cop amb la tecla n. + Repetiu-ho uns quants cops més. + + 4. Establiu les opcions 'hlsearch' i 'incsearch': + :set hls is + + 5. Ara torneu a executar una ordre de cerca, i mireu què passa: + /ignorar + + 6. Per treure el ressalt dels resultats, feu: + :nohlsearch +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LLIÇÓ 6 SUMARI + + + 1. L'ordre o obre una línia SOTA la del cursor i mou el cursor a la nova + línia, en mode Inserció. + La O majúscula obre la línia a SOBRE la que hi ha el cursor. + + 2. Premeu una a per afegir text DESPRÉS del caràcter sota el cursor. + La A majúscula afegeix automàticament el text a final de línia. + + 3. L'ordre R majúscula us posa en mode substitució fins que premeu . + + 4. Escriviu ":set xxx" per establir l'opció "xxx" + + + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LLIÇÓ 7: ORDRES D'AJUDA + + + ** Utilitzeu el sistema intern d'ajuda ** + + El Vim té un extens sistema d'ajuda. Per llegir una introducció proveu una + d'aquestes tres coses: + - premeu la tecla (si en teniu alguna) + - premeu la tecla (si en teniu alguna) + - escriviu :help + + Teclegeu :q per tancar la finestra d'ajuda. + + Podeu trobar ajuda sobre pràcticament qualsevol tema donant un argument + a l'ordre ":help". Proveu això (no oblideu prémer ): + + :help w + :help c_ Klávesa l je vpravo a vykoná pohyb vpravo. + j Klávesa j vypadá na ¹ipku dolu. + v + 1. Pohybuj kurzorem po obrazovce dokud si na to nezvykne¹. + + 2. Dr¾ klávesu pro pohyb dolu (j), dokud se její funkce nezopakuje. +---> Teï ví¹ jak se pøesunout na následující lekci. + + 3. Pou¾itím klávesy dolu pøejdi na lekci 1.2. + +Poznámka: Pokud si nìkdy nejsi jist nìèím, co jsi napsal, stlaè pro + pøechod do Normálního módu. Poté pøepi¹ po¾adovaný pøíkaz. + +Poznámka: Kurzorové klávesy také fungují, av¹ak pou¾ívání hjkl je rychlej¹í + jakmile si na nìj zvykne¹. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 1.2: SPU©TÌNÍ A UKONÈENÍ VIM + + + !! POZNÁMKA: Pøed vykonáním tìchto krokù si pøeèti celou lekci!! + + 1. Stlaè (pro uji¹tìní, ¾e se nachází¹ v Normálním módu). + + 2. Napi¹: :q! . + +---> Tímto ukonèí¹ editor BEZ ulo¾ení zmìn, které si vykonal. + Pokud chce¹ ulo¾it zmìny a ukonèit editor napi¹: + :wq + + 3. A¾ se dostane¹ na pøíkazový øádek, napi¹ pøíkaz, kterým se dostane¹ zpìt + do této výuky. To mù¾e být: vimtutor + Bì¾nì se pou¾ívá: vim tutor + +---> 'vim' znamená spu¹tìní editoru, 'tutor' je soubor k editaci. + + 4. Pokud si tyto kroky spolehlivì pamatuje¹, vykonej kroky 1 a¾ 3, èím¾ + ukonèí¹ a znovu spustí¹ editor. Potom pøesuò kurzor dolu na lekci 1.3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 1.3: ÚPRAVA TEXTU - MAZÁNÍ + + + ** Stisknutím klávesy x v Normálním módu sma¾e¹ znak na místì kurzoru. ** + + 1. Pøesuò kurzor ní¾e na øádek oznaèený --->. + + 2. K odstranìní chyb pøejdi kurzorem na znak, který chce¹ smazat. + + 3. Stlaè klávesu x k odstranìní nechtìných znakù. + + 4. Opakuj kroky 2 a¾ 4 dokud není vìta správnì. + +---> Krááva skoèèilla pøess mìssíc. + + 5. Pokud je vìta správnì, pøejdi na lekci 1.4. + +POZNÁMKA: Nesna¾ se pouze zapamatovat pøedvádìné pøíkazy, uè se je pou¾íváním. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 1.4: ÚPRAVA TEXTU - VKLÁDÁNÍ + + + ** Stlaèení klávesy i v Normálním módu umo¾òuje vkládání textu. ** + + 1. Pøesuò kurzor na první øádek oznaèený --->. + + 2. Pro upravení prvního øádku do podoby øádku druhého, pøesuò kurzor na + první znak za místo, kde má být text vlo¾ený. + + 3. Stlaè i a napi¹ potøebný dodatek. + + 4. Po opravení ka¾dé chyby stlaè pro návrat do Normálního módu. + Opakuj kroky 2 a¾ 4 dokud není vìta správnì. + +---> Nìjaký txt na této . +---> Nìjaký text chybí na této øádce. + + 5. Pokud ji¾ ovládá¹ vkládání textu, pøejdi na následující shrnutí. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SHRNUTÍ LEKCE 1 + + + 1. Kurzorem se pohybuje pomocí ¹ipek nebo klávesami hjkl. + h (vlevo) j (dolu) k (nahoru) l (vpravo) + + 2. Pro spu¹tìní Vimu (z pøíkazového øádku) napi¹: vim SOUBOR + + 3. Pro ukonèení Vimu napi¹: :q! bez ulo¾ení zmìn. + anebo: :wq pro ulo¾ení zmìn. + + 4. Pro smazání znaku pod kurzorem napi¹ v Normálním módu: x + + 5. Pro vkládání textu od místa kurzoru napi¹ v Normálním módu: + i vkládaný text + +POZNÁMKA: Stlaèení tì pøemístí do Normálního módu nebo zru¹í nechtìný + a èásteènì dokonèený pøíkaz. + +Nyní pokraèuj Lekcí 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 2.1: PØÍKAZY MAZÁNÍ + + + ** Pøíkaz dw sma¾e znaky do konce slova. ** + + 1. Stlaè k ubezpeèení, ¾e jsi v Normálním módu. + + 2. Pøesuò kurzor ní¾e na øádek oznaèený --->. + + 3. Pøesuò kurzor na zaèátek slova, které je potøeba smazat. + + 4. Napi¹ dw , aby slovo zmizelo. + +POZNÁMKA: Písmena dw se zobrazí na posledním øádku obrazovky jakmile je + napí¹e¹. Kdy¾ napí¹e¹ nìco ¹patnì, stlaè a zaèni znova. + +---> Jsou tu nìjaká slova zábava, která nepatøí list do této vìty. + + 5. Opakuj kroky 3 a¾ 4 dokud není vìta správnì a pøejdi na lekci 2.2. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 2.2: VÍCE PØÍKAZÙ MAZÁNÍ + + + ** Napsání pøíkazu d$ sma¾e v¹e a¾ do konce øádky. ** + + 1. Stlaè k ubezpeèení, ¾e jsi v Normálním módu. + + 2. Pøesuò kurzor ní¾e na øádek oznaèený --->. + + 3. Pøesuò kurzor na konec správné vìty (ZA první teèku). + + 4. Napi¹ d$ ,aby jsi smazal znaky a¾ do konce øádku. + +---> Nìkdo napsal konec této vìty dvakrát. konec této vìty dvakrát. + + + 5. Pøejdi na lekci 2.3 pro pochopení toho, co se stalo. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 2.3: ROZ©IØOVACÍ PØÍKAZY A OBJEKTY + + + Formát mazacího pøíkazu d je následující: + + [èíslo] d objekt NEBO d [èíslo] objekt + Kde: + èíslo - udává kolikrát se pøíkaz vykoná (volitelné, výchozí=1). + d - je pøíkaz mazání. + objekt - udává na èem se pøíkaz vykonává (vypsané ní¾e). + + Krátký výpis objektù: + w - od kurzoru do konce slova, vèetnì mezer. + e - od kurzoru do konce slova, BEZ mezer. + $ - od kurzoru do konce øádku. + +POZNÁMKA: Stlaèením klávesy objektu v Normálním módu se kurzor pøesune na + místo upøesnìné ve výpisu objektù. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 2.4: VÝJIMKA Z 'PØÍKAZ-OBJEKT' + + + ** Napsáním dd sma¾e¹ celý øádek. ** + + Vzhledem k èastosti mazání celého øádku se autoøi Vimu rozhodli, ¾e bude + jednodu¹í napsat prostì dvì d k smazání celého øádku. + + 1. Pøesuò kurzor na druhý øádek spodního textu. + 2. Napi¹ dd pro smazání øádku. + 3. Pøejdi na ètvrtý øádek. + 4. Napi¹ 2dd (vzpomeò si èíslo-pøíkaz-objekt) pro smazání dvou øádkù. + + 1) Rù¾e jsou èervené, + 2) Bláto je zábavné, + 3) Fialky jsou modré, + 4) Mám auto, + 5) Hodinky ukazují èas, + 6) Cukr je sladký, + 7) A to jsi i ty. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 2.5: PØÍKAZ UNDO + + + ** Stlaè u pro vrácení posledního pøíkazu, U pro celou øádku. ** + + 1. Pøesuò kurzor ní¾e na øádek oznaèený ---> a pøemísti ho na první chybu. + 2. Napi¹ x pro smazání prvního nechtìného znaku. + 3. Teï napi¹ u èím¾ vrátí¹ zpìt poslední vykonaný pøíkaz. + 4. Nyní oprav v¹echny chyby na øádku pomocí pøíkazu x . + 5. Napi¹ velké U èím¾ vrátí¹ øádek do pùvodního stavu. + 6. Teï napi¹ u nìkolikrát, èím¾ vrátí¹ zpìt pøíkaz U . + 7. Stlaè CTRL-R (klávesu CTRL dr¾ stlaèenou a stiskni R) nìkolikrát, + èím¾ vrátí¹ zpìt pøedtím vrácené pøíkazy (redo). + +---> Opprav chybby nna toomto øádku a nahraï je pommocí undo. + + 8. Toto jsou velmi u¾iteèné pøíkazy. Nyní pøejdi na souhrn Lekce 2. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SHRNUTÍ LEKCE 2 + + + 1. Pro smazání znakù od kurzoru do konce slova napi¹: dw + + 2. Pro smazání znakù od kurzoru do konce øádku napi¹: d$ + + 3. Pro smazání celého øádku napi¹: dd + + 4. Formát pøíkazu v Normálním módu je: + + [èíslo] pøíkaz objekt NEBO pøíkaz [èíslo] objekt + kde: + èíslo - udává poèet opakování pøíkazu + pøíkaz - udává co je tøeba vykonat, napøíklad d ma¾e + objekt - udává rozsah pøíkazu, napøíklad w (slovo), + $ (do konce øádku), atd. + + 5. Pro vrácení pøede¹lé èinnosti, napi¹: u (malé u) + Pro vrácení v¹ech úprav na øádku napi¹: U (velké U) + Pro vrácení vrácených úprav (redo) napi¹: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 3.1: PØÍKAZ VLO®IT + + + ** Pøíka p vlo¾í poslední vymazaný text za kurzor. ** + + 1. Pøesuò kurzor ní¾e na poslední øádek textu. + + 2. Napi¹ dd pro smazání øádku a jeho ulo¾ení do bufferu. + + 3. Pøesuò kurzor VÝ©E tam, kam smazaný øádek patøí. + + 4. V Normálním módu napi¹ p pro opìtné vlo¾ení øádku. + + 5. Opakuj kroky 2 a¾ 4 dokud øádky nebudou ve správném poøadí. + + d) Také se doká¾e¹ vzdìlávat? + b) Fialky jsou modré, + c) Inteligence se uèí, + a) Rù¾e jsou èervené, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 3.2: PØÍKAZ NAHRAZENÍ + + + ** Napsáním r a znaku se nahradí znak pod kurzorem. ** + + 1. Pøesuò kurzor ní¾e na první øádek oznaèený --->. + + 2. Pøesuò kurzor na zaèátek první chyby. + + 3. Napi¹ r a potom znak, který nahradí chybu. + + 4. Opakuj kroky 2 a¾ 3 dokud není první øádka správnì. + +---> Kdi¾ byl pzán tento øádeg, nìkdu stla¾il ¹paqné klávesy! +---> Kdy¾ byl psán tento øádek, nìkdo stlaèíl ¹patné klávesy! + + 5. Nyní pøejdi na Lekci 3.2. + +POZNÁMKA: Zapamatuj si, ¾e by ses mìl uèit pou¾íváním, ne zapamatováním. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 3.3: PØÍKAZ ÚPRAVY + + + ** Pokud chce¹ zmìnit èást nebo celé slovo, napi¹ cw . ** + + 1. Pøesuò kurzor ní¾e na první øádek oznaèený --->. + + 2. Umísti kurzor na písmeno i v slovì øi»ok. + + 3. Napi¹ cw a oprav slovo (v tomto pøípadì napi¹ 'ádek'.) + + 4. Stlaè a pøejdi na dal¹í chybu (první znak, který tøeba zmìnit.) + + 5. Opakuj kroky 3 a¾ 4 dokud není první vìta stejná jako ta druhá. + +---> Tento øi»ok má nìkolik skic, které psadoinsa zmìnit pasdgf pøíkazu. +---> Tento øádek má nìkolik slov, které potøebují zmìnit pomocí pøíkazu. + +V¹imni si, ¾e cw nejen nahrazuje slovo, ale také pøemístí do vkládání. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 3.4: VÍCE ZMÌN POU®ITÍM c + + + ** Pøíkaz pro úpravu se dru¾í se stejnými objekty jako ten pro mazání. ** + + 1. Pøíkaz pro úpravu pracuje stejnì jako pro mazání. Formát je: + + [èíslo] c objekt NEBO c [èíslo] objekt + + 2. Objekty jsou také shodné, jako napø.: w (slovo), $ (konec øádku), atd. + + 3. Pøejdi ní¾e na první øádek oznaèený --->. + + 4. Pøesuò kurzor na první rozdíl. + + 5. Napi¹ c$ pro upravení zbytku øádku podle toho druhého a stlaè . + +---> Konec tohoto øádku potøebuje pomoc, aby byl jako ten druhý. +---> Konec tohoto øádku potøebuje opravit pou¾itím pøíkazu c$ . + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SHRNUTÍ LEKCE 3 + + + 1. Pro vlo¾ení textu, který byl smazán, napi¹ p . To vlo¾í smazaný text + ZA kurzor (pokud byl øádek smazaný, pøejde na øádek pod kurzorem). + + 2. Pro nahrazení znaku pod kurzorem, napi¹ r a potom znak, kterým + chce¹ pùvodní znak nahradit. + + 3. Pøíkaz na upravování umo¾òuje zmìnit specifikovaný objekt od kurzoru + do konce objektu. Napøíklad: Napi¹ cw ,èím¾ zmìní¹ text od pozice + kurzoru do konce slova, c$ zmìní text do konce øádku. + + 4. Formát pro nahrazování je: + + [èíslo] c objekt NEBO c [èíslo] objekt + +Nyní pøejdi na následující lekci. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 4.1: POZICE A STATUS SOUBORU + + + ** Stlaè CTRL-g pro zobrazení své pozice v souboru a statusu souboru. + Stlaè SHIFT-G pro pøechod na øádek v souboru. ** + + Poznámka: Pøeèti si celou lekci ne¾ zaène¹ vykonávat kroky!! + + 1. Dr¾ klávesu Ctrl stlaèenou a stiskni g . Vespod obrazovky se zobrazí + stavový øádek s názvem souboru a øádkou na které se nachází¹. Zapamatuj + si èíslo øádku pro krok 3. + + 2. Stlaè shift-G pro pøesun na konec souboru. + + 3. Napi¹ èíslo øádku na kterém si se nacházel a stlaè shift-G. To tì + vrátí na øádek, na kterém jsi døíve stiskl Ctrl-g. + (Kdy¾ pí¹e¹ èísla, tak se NEZOBRAZUJÍ na obrazovce.) + + 4. Pokud se cítí¹ schopný vykonat tyto kroky, vykonej je. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 4.2: PØÍKAZ VYHLEDÁVÁNÍ + + + ** Napi¹ / následované øetìzcem pro vyhledání onoho øetìzce. ** + + 1. Stiskni / v Normálním módu. V¹imni si, ¾e tento znak se spolu s + kurzorem zobrazí v dolní èásti obrazovky jako pøíkaz : . + + 2. Nyní napi¹ 'chhybba' . To je slovo, které chce¹ vyhledat. + + 3. Pro vyhledání dal¹ího výsledku stejného øetìzce, jednodu¹e stlaè n . + Pro vyhledání dal¹ího výsledku stejného øetìzce opaèným smìrem, stiskni + Shift-N. + + 4. Pokud chce¹ vyhledat øetìzec v opaèném smìru, pou¾ij pøíkaz ? místo + pøíkazu / . + +---> "chhybba" není zpùsob, jak hláskovat chyba; chhybba je chyba. + +Poznámka: Kdy¾ vyhledávání dosáhne konce souboru, bude pokraèovat na jeho + zaèátku. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 4.3: VYHLEDÁVÁNÍ PÁROVÉ ZÁVORKY + + + ** Napi¹ % pro nalezení párové ),], nebo } . ** + + 1. Pøemísti kurzor na kteroukoli (, [, nebo { v øádku oznaèeném --->. + + 2. Nyní napi¹ znak % . + + 3. Kurzor se pøemístí na odpovídající závorku. + + 4. Stlaè % pro pøesun kurzoru zpìt na otvírající závorku. + +---> Toto ( je testovací øádek ('s, ['s ] a {'s } v nìm. )) + +Poznámka: Toto je velmi u¾iteèné pøí ladìní programu s chybìjícími + uzavíracími závorkami. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 4.4: ZPÙSOB JAK ZMÌNIT CHYBY + + + ** Napi¹ :s/staré/nové/g pro nahrazení slova 'nové' za 'staré'. ** + + 1. Pøesuò kurzor na øádek oznaèený --->. + + 2. Napi¹ :s/dobréé/dobré . V¹imni si, ¾e tento pøíkaz zmìní pouze + první výskyt v øádku. + + 3. Nyní napi¹ :s/dobréé/dobré/g co¾ znamená celkové nahrazení v øádku. + Toto nahradí v¹echny výskyty v øádku. + +---> dobréé suroviny a dobréé náèiní jsou základem dobréé kuchynì. + + 4. Pro zmìnu v¹ech výskytù øetìzce mezi dvìma øádky, + Napi¹ :#,#s/staré/nové/g kde #,# jsou èísla onìch øádek. + Napi¹ :%s/staré/nové/g pro zmìnu v¹ech výskytù v celém souboru. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SHRNUTÍ LEKCE 4 + + + 1. Ctrl-g vypí¹e tvou pozici v souboru a status souboru. + Shift-G tì pøemístí na konec souboru. Èíslo následované + Shift-G tì pøesune na dané èíslo øádku. + + 2. Napsání / následované øetìzcem vyhledá øetìzec smìrem DOPØEDU. + Napsání ? následované øetìzcem vyhledá øetìzec smìrem DOZADU. + Napsání n po vyhledávání najde následující výskyt øetìzce ve stejném + smìru, Shift-N ve smìru opaèném. + + 3. Stisknutí % kdy¾ je kurzor na (,),[,],{, nebo } najde odpovídající + párovou závorku. + + 4. Pro nahrazení nového za první starý v øádku napi¹ :s/staré/nové + Pro nahrazení nového za v¹echny staré v øádku napi¹ :s/staré/nové/g + Pro nahrazení øetìzcù mezi dvìmi øádkami # napi¹ :#,#s/staré/nové/g + Pro nahrazení v¹ech výskytù v souboru napi¹ :%s/staré/nové/g + Pro potvrzení ka¾dého nahrazení pøidej 'c' :%s/staré/nové/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 5.1: JAK VYKONAT VNÌJ©Í PØÍKAZ + + + ** Napi¹ :! následované vnìj¹ím pøíkazem pro spu¹tìní pøíkazu. ** + + 1. Napi¹ obvyklý pøíkaz : , který umístí kurzor na spodek obrazovky + To umo¾ní napsat pøíkaz. + + 2. Nyní stiskni ! (vykøièník). To umo¾ní vykonat jakýkoliv vnìj¹í + pøíkaz z pøíkazového øádku. + + 3. Napøíklad napi¹ ls za ! a stiskni . Tento pøíkaz zobrazí + obsah tvého adresáøe jako v pøíkazovém øádku. + Vyzkou¹ej :!dir pokud ls nefunguje. + +Poznámka: Takto je mo¾né vykonat jakýkoliv pøíkaz. + +Poznámka: V¹echny pøíkazy : musí být dokonèené stisknutím + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 5.2: VÍCE O UKLÁDÁNÍ SOUBORÙ + + + ** Pro ulo¾ení zmìn v souboru napi¹ :w SOUBOR. ** + + 1. Napi¹ :!dir nebo :!ls pro výpis aktuálního adresáøe. + U¾ ví¹, ¾e za tímto musí¹ stisknout . + + 2. Vyber si název souboru, který je¹tì neexistuje, napøíklad TEST. + + 3. Nyní napi¹: :w TEST (kde TEST je vybraný název souboru.) + + 4. To ulo¾í celý soubor (Výuka Vimu) pod názvem TEST. + Pro ovìøení napi¹ znovu :!dir , èím¾ zobrazí¹ obsah adresáøe. + +Poznámka: Jakmile ukonèí¹ Vim a znovu ho spustí¹ s názvem souboru TEST, + soubor bude pøesná kopie výuky, kdy¾ si ji ukládal. + + 5. Nyní odstraò soubor napsáním (MS-DOS): :!del TEST + nebo (Unix): :!rm TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 5.3: VÝBÌROVÝ PØÍKAZ ULO®ENÍ + + + ** Pro ulo¾ení èásti souboru napi¹ :#,# w SOUBOR ** + + 1. Je¹tì jednou napi¹ :!dir nebo :!ls pro výpis aktuálního adresáøe + a vyber vhodný název souboru jako napø. TEST. + + 2. Pøesuò kurzor na vrch této stránky a stiskni Ctrl-g pro zobrazení + èísla øádku. ZAPAMATUJ SI TOTO ÈÍSLO! + + 3. Nyní se pøesuò na spodek této stránky a opìt stiskni Ctrl-g. + ZAPAMATUJ SI I ÈÍSLO TOHOTO ØÁDKU! + + 4. Pro ulo¾ení POUZE èásti souboru, napi¹ :#,# w TEST kde #,# jsou + èísla dvou zapamatovaných øádkù (vrch, spodek) a TEST je název souboru. + + 5. Znova se ujisti, ¾e tam ten soubor je pomocí :!dir ale NEODSTRAÒUJ ho. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 5.4: SLUÈOVÁNÍ SOUBORÙ + + + ** K vlo¾ení obsahu souboru napi¹ :r NÁZEV_SOUBORU ** + + 1. Napi¹ :!dir pro uji¹tìní, ¾e soubor TEST stále existuje. + + 2. Pøesuò kurzor na vrch této stránky. + +POZNÁMKA: Po vykonání kroku 3 uvidí¹ lekci 5.3. Potom se opìt pøesuò dolù + na tuto lekci. + + 3. Nyní vlo¾ soubor TEST pou¾itím pøíkazu :r TEST kde TEST je název + souboru. + +POZNÁMKA: Soubor, který vkládá¹ se vlo¾í od místa, kde se nachází kurzor. + + 4. Pro potvrzení vlo¾ení souboru, pøesuò kurzor zpìt a v¹imni si, ¾e teï + má¹ dvì kopie lekce 5.3, originál a souborovou verzi. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SHRNUTÍ LEKCE 5 + + + 1. :!pøíkaz vykoná vnìj¹í pøíkaz. + + Nìkteré u¾iteèné pøíklady jsou: + (MS-DOS) (Unix) + :!dir :!ls - zobrazí obsah souboru. + :!del SOUBOR :!rm SOUBOR - odstraní SOUBOR. + + 2. :w SOUBOR ulo¾í aktuální text jako SOUBOR na disk. + + 3. :#,#w SOUBOR ulo¾í øádky od # do # do SOUBORU. + + 4. :r SOUBOR vybere z disku SOUBOR a vlo¾í ho do editovaného souboru + za pozici kurzoru. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 6.1: PØÍKAZ OTEVØÍT + + + ** Napi¹ o pro vlo¾ení øádku pod kurzor a pøepnutí do Vkládacího módu. ** + + 1. Pøemísti kurzor ní¾e na øádek oznaèený --->. + + 2. Napi¹ o (malé) pro vlo¾ení øádku POD kurzor a pøepnutí do + Vkládacího módu. + + 3. Nyní zkopíruj øádek oznaèený ---> a stiskni pro ukonèení + Vkládacího módu. + +---> Po stisknutí o se kurzor pøemístí na vlo¾ený øádek do Vkládacího + módu. + + 4. Pro otevøení øádku NAD kurzorem jednodu¹e napi¹ velké O , místo + malého o. Vyzkou¹ej si to na následujícím øádku. +Vlo¾ øádek nad tímto napsáním Shift-O po umístìní kurzoru na tento øádek. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 6.2: PØÍKAZ PØIDAT + + + ** Stiskni a pro vlo¾ení textu ZA kurzor. ** + + 1. Pøesuò kurzor na ní¾e na konec øádky oznaèené ---> + stisknutím $ v Normálním módu. + + 2. Stiskni a (malé) pro pøidání textu ZA znak, který je pod kurzorem. + (Velké A pøidá na konec øádku.) + +Poznámka: Tímto se vyhne¹ stisknutí i , posledního znaku, textu na vlo¾ení, + , kurzor doprava, a nakonec x na pøidávání na konec øádku! + + 3. Nyní dokonèí první øádek. V¹imni si, ¾e pøidávání je vlastnì stejné jako + Vkládací mód, kromì místa, kam se text vkládá. + +---> Tento øádek ti umo¾òuje nacvièit +---> Tento øádek ti umo¾òuje nacvièit pøidávání textu na konec øádky. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 6.3: JINÝ ZPÙSOB NAHRAZOVÁNÍ + + + ** Napi¹ velké R pro nahrazení víc ne¾ jednoho znaku. ** + + 1. Pøesuò kurzor na první øádek oznaèený --->. + + 2. Umísti kurzor na zaèátek prvního slova, které je odli¹né od druhého + øádku oznaèeného ---> (slovo 'poslední'). + + 3. Nyní stiskni R a nahraï zbytek textu na prvním øádku pøepsáním + starého textu tak, aby byl první øádek stejný jako ten druhý. + +---> Pro upravení prvního øádku do tvaru toho poslední na stranì pou¾ij kl. +---> Pro upravení prvního øádku do tvaru toho druhého, napi¹ R a nový text. + + 4. V¹imni si, ¾e jakmile stiskne¹ v¹echen nezmìnìný text zùstává. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 6.4: NASTAVENÍ MO®NOSTÍ + + ** Nastav mo¾nost, ¾e vyhledávání anebo nahrazování nedbá velikosti písmen ** + + 1. Vyhledej øetìzec 'ignore' napsáním: + /ignore + Zopakuj nìkolikrát stisknutí klávesy n. + + 2. Nastav mo¾nost 'ic' (Ignore case) napsáním pøíkazu: + :set ic + + 3. Nyní znovu vyhledej 'ignore' stisknutím: n + Nìkolikrát hledání zopakuj stisknutím klávesy n. + + 4. Nastav mo¾nosti 'hlsearch' a 'incsearch': + :set hls is + + 5. Nyní znovu vykonej vyhledávací pøíkaz a sleduj, co se stane: + /ignore + + 6. Pro vypnutí zvýrazòování výsledkù napi¹: + :nohlsearch +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SHRHNUTÍ LEKCE 6 + + + 1. Stisknutí o otevøe nový øádek POD kurzorem a umístí kurzor na vlo¾ený + øádek do Vkládacího módu. + Napsání velkého O otevøe øádek NAD øádkem, na kterém je kurzor. + + 2. Stiskni a pro vlo¾ení textu ZA znak na pozici kurzoru. + Napsání velkého A automaticky pøidá text na konec øádku. + + 3. Stisknutí velkého R pøepne do Nahrazovacího módu, dokud + nestiskne¹ pro jeho ukonèení. + + 4. Napsání ":set xxx" nastaví mo¾nosti "xxx". + + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCE 7: PØÍKAZY ON-LINE NÁPOVÌDY + + + ** Pou¾ívej on-line systém nápovìdy ** + + Vim má obsáhlý on-line systém nápovìdy. Pro zaèátek vyzkou¹ej jeden z + následujících: + - stiskni klávesu (pokud ji má¹) + - stiskni klávesu (pokud ji má¹) + - napi¹ :help + + Napi¹ :q pro uzavøení okna nápovìdy. + + Mù¾e¹ najít nápovìdu k jakémukoliv tématu pøidáním argumentu k + pøíkazu ":help". Zkus tyto (nezapomeò stisknout ): + + :help w + :help c_ Klávesa l je vpravo a vykoná pohyb vpravo. + j Klávesa j vypadá na šipku dolu. + v + 1. Pohybuj kurzorem po obrazovce dokud si na to nezvykneš. + + 2. Drž klávesu pro pohyb dolu (j), dokud se její funkce nezopakuje. +---> Teï víš jak se pøesunout na následující lekci. + + 3. Použitím klávesy dolu pøejdi na lekci 1.2. + +Poznámka: Pokud si nìkdy nejsi jist nìèím, co jsi napsal, stlaè pro + pøechod do Normálního módu. Poté pøepiš požadovaný pøíkaz. + +Poznámka: Kurzorové klávesy také fungují, avšak používání hjkl je rychlejší + jakmile si na nìj zvykneš. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 1.2: SPUŠTÌNÍ A UKONÈENÍ VIM + + + !! POZNÁMKA: Pøed vykonáním tìchto krokù si pøeèti celou lekci!! + + 1. Stlaè (pro ujištìní, že se nacházíš v Normálním módu). + + 2. Napiš: :q! . + +---> Tímto ukonèíš editor BEZ uložení zmìn, které si vykonal. + Pokud chceš uložit zmìny a ukonèit editor napiš: + :wq + + 3. Až se dostaneš na pøíkazový øádek, napiš pøíkaz, kterým se dostaneš zpìt + do této výuky. To mùže být: vimtutor + Bìžnì se používá: vim tutor + +---> 'vim' znamená spuštìní editoru, 'tutor' je soubor k editaci. + + 4. Pokud si tyto kroky spolehlivì pamatuješ, vykonej kroky 1 až 3, èímž + ukonèíš a znovu spustíš editor. Potom pøesuò kurzor dolu na lekci 1.3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 1.3: ÚPRAVA TEXTU - MAZÁNÍ + + + ** Stisknutím klávesy x v Normálním módu smažeš znak na místì kurzoru. ** + + 1. Pøesuò kurzor níže na øádek oznaèený --->. + + 2. K odstranìní chyb pøejdi kurzorem na znak, který chceš smazat. + + 3. Stlaè klávesu x k odstranìní nechtìných znakù. + + 4. Opakuj kroky 2 až 4 dokud není vìta správnì. + +---> Krááva skoèèilla pøess mìssíc. + + 5. Pokud je vìta správnì, pøejdi na lekci 1.4. + +POZNÁMKA: Nesnaž se pouze zapamatovat pøedvádìné pøíkazy, uè se je používáním. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 1.4: ÚPRAVA TEXTU - VKLÁDÁNÍ + + + ** Stlaèení klávesy i v Normálním módu umožòuje vkládání textu. ** + + 1. Pøesuò kurzor na první øádek oznaèený --->. + + 2. Pro upravení prvního øádku do podoby øádku druhého, pøesuò kurzor na + první znak za místo, kde má být text vložený. + + 3. Stlaè i a napiš potøebný dodatek. + + 4. Po opravení každé chyby stlaè pro návrat do Normálního módu. + Opakuj kroky 2 až 4 dokud není vìta správnì. + +---> Nìjaký txt na této . +---> Nìjaký text chybí na této øádce. + + 5. Pokud již ovládáš vkládání textu, pøejdi na následující shrnutí. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SHRNUTÍ LEKCE 1 + + + 1. Kurzorem se pohybuje pomocí šipek nebo klávesami hjkl. + h (vlevo) j (dolu) k (nahoru) l (vpravo) + + 2. Pro spuštìní Vimu (z pøíkazového øádku) napiš: vim SOUBOR + + 3. Pro ukonèení Vimu napiš: :q! bez uložení zmìn. + anebo: :wq pro uložení zmìn. + + 4. Pro smazání znaku pod kurzorem napiš v Normálním módu: x + + 5. Pro vkládání textu od místa kurzoru napiš v Normálním módu: + i vkládaný text + +POZNÁMKA: Stlaèení tì pøemístí do Normálního módu nebo zruší nechtìný + a èásteènì dokonèený pøíkaz. + +Nyní pokraèuj Lekcí 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 2.1: PØÍKAZY MAZÁNÍ + + + ** Pøíkaz dw smaže znaky do konce slova. ** + + 1. Stlaè k ubezpeèení, že jsi v Normálním módu. + + 2. Pøesuò kurzor níže na øádek oznaèený --->. + + 3. Pøesuò kurzor na zaèátek slova, které je potøeba smazat. + + 4. Napiš dw , aby slovo zmizelo. + +POZNÁMKA: Písmena dw se zobrazí na posledním øádku obrazovky jakmile je + napíšeš. Když napíšeš nìco špatnì, stlaè a zaèni znova. + +---> Jsou tu nìjaká slova zábava, která nepatøí list do této vìty. + + 5. Opakuj kroky 3 až 4 dokud není vìta správnì a pøejdi na lekci 2.2. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 2.2: VÍCE PØÍKAZÙ MAZÁNÍ + + + ** Napsání pøíkazu d$ smaže vše až do konce øádky. ** + + 1. Stlaè k ubezpeèení, že jsi v Normálním módu. + + 2. Pøesuò kurzor níže na øádek oznaèený --->. + + 3. Pøesuò kurzor na konec správné vìty (ZA první teèku). + + 4. Napiš d$ ,aby jsi smazal znaky až do konce øádku. + +---> Nìkdo napsal konec této vìty dvakrát. konec této vìty dvakrát. + + + 5. Pøejdi na lekci 2.3 pro pochopení toho, co se stalo. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 2.3: ROZŠIØOVACÍ PØÍKAZY A OBJEKTY + + + Formát mazacího pøíkazu d je následující: + + [èíslo] d objekt NEBO d [èíslo] objekt + Kde: + èíslo - udává kolikrát se pøíkaz vykoná (volitelné, výchozí=1). + d - je pøíkaz mazání. + objekt - udává na èem se pøíkaz vykonává (vypsané níže). + + Krátký výpis objektù: + w - od kurzoru do konce slova, vèetnì mezer. + e - od kurzoru do konce slova, BEZ mezer. + $ - od kurzoru do konce øádku. + +POZNÁMKA: Stlaèením klávesy objektu v Normálním módu se kurzor pøesune na + místo upøesnìné ve výpisu objektù. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 2.4: VÝJIMKA Z 'PØÍKAZ-OBJEKT' + + + ** Napsáním dd smažeš celý øádek. ** + + Vzhledem k èastosti mazání celého øádku se autoøi Vimu rozhodli, že bude + jednoduší napsat prostì dvì d k smazání celého øádku. + + 1. Pøesuò kurzor na druhý øádek spodního textu. + 2. Napiš dd pro smazání øádku. + 3. Pøejdi na ètvrtý øádek. + 4. Napiš 2dd (vzpomeò si èíslo-pøíkaz-objekt) pro smazání dvou øádkù. + + 1) Rùže jsou èervené, + 2) Bláto je zábavné, + 3) Fialky jsou modré, + 4) Mám auto, + 5) Hodinky ukazují èas, + 6) Cukr je sladký, + 7) A to jsi i ty. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 2.5: PØÍKAZ UNDO + + + ** Stlaè u pro vrácení posledního pøíkazu, U pro celou øádku. ** + + 1. Pøesuò kurzor níže na øádek oznaèený ---> a pøemísti ho na první chybu. + 2. Napiš x pro smazání prvního nechtìného znaku. + 3. Teï napiš u èímž vrátíš zpìt poslední vykonaný pøíkaz. + 4. Nyní oprav všechny chyby na øádku pomocí pøíkazu x . + 5. Napiš velké U èímž vrátíš øádek do pùvodního stavu. + 6. Teï napiš u nìkolikrát, èímž vrátíš zpìt pøíkaz U . + 7. Stlaè CTRL-R (klávesu CTRL drž stlaèenou a stiskni R) nìkolikrát, + èímž vrátíš zpìt pøedtím vrácené pøíkazy (redo). + +---> Opprav chybby nna toomto øádku a nahraï je pommocí undo. + + 8. Toto jsou velmi užiteèné pøíkazy. Nyní pøejdi na souhrn Lekce 2. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SHRNUTÍ LEKCE 2 + + + 1. Pro smazání znakù od kurzoru do konce slova napiš: dw + + 2. Pro smazání znakù od kurzoru do konce øádku napiš: d$ + + 3. Pro smazání celého øádku napiš: dd + + 4. Formát pøíkazu v Normálním módu je: + + [èíslo] pøíkaz objekt NEBO pøíkaz [èíslo] objekt + kde: + èíslo - udává poèet opakování pøíkazu + pøíkaz - udává co je tøeba vykonat, napøíklad d maže + objekt - udává rozsah pøíkazu, napøíklad w (slovo), + $ (do konce øádku), atd. + + 5. Pro vrácení pøedešlé èinnosti, napiš: u (malé u) + Pro vrácení všech úprav na øádku napiš: U (velké U) + Pro vrácení vrácených úprav (redo) napiš: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 3.1: PØÍKAZ VLOŽIT + + + ** Pøíka p vloží poslední vymazaný text za kurzor. ** + + 1. Pøesuò kurzor níže na poslední øádek textu. + + 2. Napiš dd pro smazání øádku a jeho uložení do bufferu. + + 3. Pøesuò kurzor VÝŠE tam, kam smazaný øádek patøí. + + 4. V Normálním módu napiš p pro opìtné vložení øádku. + + 5. Opakuj kroky 2 až 4 dokud øádky nebudou ve správném poøadí. + + d) Také se dokážeš vzdìlávat? + b) Fialky jsou modré, + c) Inteligence se uèí, + a) Rùže jsou èervené, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 3.2: PØÍKAZ NAHRAZENÍ + + + ** Napsáním r a znaku se nahradí znak pod kurzorem. ** + + 1. Pøesuò kurzor níže na první øádek oznaèený --->. + + 2. Pøesuò kurzor na zaèátek první chyby. + + 3. Napiš r a potom znak, který nahradí chybu. + + 4. Opakuj kroky 2 až 3 dokud není první øádka správnì. + +---> Kdiž byl pzán tento øádeg, nìkdu stlažil špaqné klávesy! +---> Když byl psán tento øádek, nìkdo stlaèíl špatné klávesy! + + 5. Nyní pøejdi na Lekci 3.2. + +POZNÁMKA: Zapamatuj si, že by ses mìl uèit používáním, ne zapamatováním. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 3.3: PØÍKAZ ÚPRAVY + + + ** Pokud chceš zmìnit èást nebo celé slovo, napiš cw . ** + + 1. Pøesuò kurzor níže na první øádek oznaèený --->. + + 2. Umísti kurzor na písmeno i v slovì øiok. + + 3. Napiš cw a oprav slovo (v tomto pøípadì napiš 'ádek'.) + + 4. Stlaè a pøejdi na další chybu (první znak, který tøeba zmìnit.) + + 5. Opakuj kroky 3 až 4 dokud není první vìta stejná jako ta druhá. + +---> Tento øiok má nìkolik skic, které psadoinsa zmìnit pasdgf pøíkazu. +---> Tento øádek má nìkolik slov, které potøebují zmìnit pomocí pøíkazu. + +Všimni si, že cw nejen nahrazuje slovo, ale také pøemístí do vkládání. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 3.4: VÍCE ZMÌN POUŽITÍM c + + + ** Pøíkaz pro úpravu se druží se stejnými objekty jako ten pro mazání. ** + + 1. Pøíkaz pro úpravu pracuje stejnì jako pro mazání. Formát je: + + [èíslo] c objekt NEBO c [èíslo] objekt + + 2. Objekty jsou také shodné, jako napø.: w (slovo), $ (konec øádku), atd. + + 3. Pøejdi níže na první øádek oznaèený --->. + + 4. Pøesuò kurzor na první rozdíl. + + 5. Napiš c$ pro upravení zbytku øádku podle toho druhého a stlaè . + +---> Konec tohoto øádku potøebuje pomoc, aby byl jako ten druhý. +---> Konec tohoto øádku potøebuje opravit použitím pøíkazu c$ . + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SHRNUTÍ LEKCE 3 + + + 1. Pro vložení textu, který byl smazán, napiš p . To vloží smazaný text + ZA kurzor (pokud byl øádek smazaný, pøejde na øádek pod kurzorem). + + 2. Pro nahrazení znaku pod kurzorem, napiš r a potom znak, kterým + chceš pùvodní znak nahradit. + + 3. Pøíkaz na upravování umožòuje zmìnit specifikovaný objekt od kurzoru + do konce objektu. Napøíklad: Napiš cw ,èímž zmìníš text od pozice + kurzoru do konce slova, c$ zmìní text do konce øádku. + + 4. Formát pro nahrazování je: + + [èíslo] c objekt NEBO c [èíslo] objekt + +Nyní pøejdi na následující lekci. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 4.1: POZICE A STATUS SOUBORU + + + ** Stlaè CTRL-g pro zobrazení své pozice v souboru a statusu souboru. + Stlaè SHIFT-G pro pøechod na øádek v souboru. ** + + Poznámka: Pøeèti si celou lekci než zaèneš vykonávat kroky!! + + 1. Drž klávesu Ctrl stlaèenou a stiskni g . Vespod obrazovky se zobrazí + stavový øádek s názvem souboru a øádkou na které se nacházíš. Zapamatuj + si èíslo øádku pro krok 3. + + 2. Stlaè shift-G pro pøesun na konec souboru. + + 3. Napiš èíslo øádku na kterém si se nacházel a stlaè shift-G. To tì + vrátí na øádek, na kterém jsi døíve stiskl Ctrl-g. + (Když píšeš èísla, tak se NEZOBRAZUJÍ na obrazovce.) + + 4. Pokud se cítíš schopný vykonat tyto kroky, vykonej je. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 4.2: PØÍKAZ VYHLEDÁVÁNÍ + + + ** Napiš / následované øetìzcem pro vyhledání onoho øetìzce. ** + + 1. Stiskni / v Normálním módu. Všimni si, že tento znak se spolu s + kurzorem zobrazí v dolní èásti obrazovky jako pøíkaz : . + + 2. Nyní napiš 'chhybba' . To je slovo, které chceš vyhledat. + + 3. Pro vyhledání dalšího výsledku stejného øetìzce, jednoduše stlaè n . + Pro vyhledání dalšího výsledku stejného øetìzce opaèným smìrem, stiskni + Shift-N. + + 4. Pokud chceš vyhledat øetìzec v opaèném smìru, použij pøíkaz ? místo + pøíkazu / . + +---> "chhybba" není zpùsob, jak hláskovat chyba; chhybba je chyba. + +Poznámka: Když vyhledávání dosáhne konce souboru, bude pokraèovat na jeho + zaèátku. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 4.3: VYHLEDÁVÁNÍ PÁROVÉ ZÁVORKY + + + ** Napiš % pro nalezení párové ),], nebo } . ** + + 1. Pøemísti kurzor na kteroukoli (, [, nebo { v øádku oznaèeném --->. + + 2. Nyní napiš znak % . + + 3. Kurzor se pøemístí na odpovídající závorku. + + 4. Stlaè % pro pøesun kurzoru zpìt na otvírající závorku. + +---> Toto ( je testovací øádek ('s, ['s ] a {'s } v nìm. )) + +Poznámka: Toto je velmi užiteèné pøí ladìní programu s chybìjícími + uzavíracími závorkami. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 4.4: ZPÙSOB JAK ZMÌNIT CHYBY + + + ** Napiš :s/staré/nové/g pro nahrazení slova 'nové' za 'staré'. ** + + 1. Pøesuò kurzor na øádek oznaèený --->. + + 2. Napiš :s/dobréé/dobré . Všimni si, že tento pøíkaz zmìní pouze + první výskyt v øádku. + + 3. Nyní napiš :s/dobréé/dobré/g což znamená celkové nahrazení v øádku. + Toto nahradí všechny výskyty v øádku. + +---> dobréé suroviny a dobréé náèiní jsou základem dobréé kuchynì. + + 4. Pro zmìnu všech výskytù øetìzce mezi dvìma øádky, + Napiš :#,#s/staré/nové/g kde #,# jsou èísla onìch øádek. + Napiš :%s/staré/nové/g pro zmìnu všech výskytù v celém souboru. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SHRNUTÍ LEKCE 4 + + + 1. Ctrl-g vypíše tvou pozici v souboru a status souboru. + Shift-G tì pøemístí na konec souboru. Èíslo následované + Shift-G tì pøesune na dané èíslo øádku. + + 2. Napsání / následované øetìzcem vyhledá øetìzec smìrem DOPØEDU. + Napsání ? následované øetìzcem vyhledá øetìzec smìrem DOZADU. + Napsání n po vyhledávání najde následující výskyt øetìzce ve stejném + smìru, Shift-N ve smìru opaèném. + + 3. Stisknutí % když je kurzor na (,),[,],{, nebo } najde odpovídající + párovou závorku. + + 4. Pro nahrazení nového za první starý v øádku napiš :s/staré/nové + Pro nahrazení nového za všechny staré v øádku napiš :s/staré/nové/g + Pro nahrazení øetìzcù mezi dvìmi øádkami # napiš :#,#s/staré/nové/g + Pro nahrazení všech výskytù v souboru napiš :%s/staré/nové/g + Pro potvrzení každého nahrazení pøidej 'c' :%s/staré/nové/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 5.1: JAK VYKONAT VNÌJŠÍ PØÍKAZ + + + ** Napiš :! následované vnìjším pøíkazem pro spuštìní pøíkazu. ** + + 1. Napiš obvyklý pøíkaz : , který umístí kurzor na spodek obrazovky + To umožní napsat pøíkaz. + + 2. Nyní stiskni ! (vykøièník). To umožní vykonat jakýkoliv vnìjší + pøíkaz z pøíkazového øádku. + + 3. Napøíklad napiš ls za ! a stiskni . Tento pøíkaz zobrazí + obsah tvého adresáøe jako v pøíkazovém øádku. + Vyzkoušej :!dir pokud ls nefunguje. + +Poznámka: Takto je možné vykonat jakýkoliv pøíkaz. + +Poznámka: Všechny pøíkazy : musí být dokonèené stisknutím + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 5.2: VÍCE O UKLÁDÁNÍ SOUBORÙ + + + ** Pro uložení zmìn v souboru napiš :w SOUBOR. ** + + 1. Napiš :!dir nebo :!ls pro výpis aktuálního adresáøe. + Už víš, že za tímto musíš stisknout . + + 2. Vyber si název souboru, který ještì neexistuje, napøíklad TEST. + + 3. Nyní napiš: :w TEST (kde TEST je vybraný název souboru.) + + 4. To uloží celý soubor (Výuka Vimu) pod názvem TEST. + Pro ovìøení napiš znovu :!dir , èímž zobrazíš obsah adresáøe. + +Poznámka: Jakmile ukonèíš Vim a znovu ho spustíš s názvem souboru TEST, + soubor bude pøesná kopie výuky, když si ji ukládal. + + 5. Nyní odstraò soubor napsáním (MS-DOS): :!del TEST + nebo (Unix): :!rm TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 5.3: VÝBÌROVÝ PØÍKAZ ULOŽENÍ + + + ** Pro uložení èásti souboru napiš :#,# w SOUBOR ** + + 1. Ještì jednou napiš :!dir nebo :!ls pro výpis aktuálního adresáøe + a vyber vhodný název souboru jako napø. TEST. + + 2. Pøesuò kurzor na vrch této stránky a stiskni Ctrl-g pro zobrazení + èísla øádku. ZAPAMATUJ SI TOTO ÈÍSLO! + + 3. Nyní se pøesuò na spodek této stránky a opìt stiskni Ctrl-g. + ZAPAMATUJ SI I ÈÍSLO TOHOTO ØÁDKU! + + 4. Pro uložení POUZE èásti souboru, napiš :#,# w TEST kde #,# jsou + èísla dvou zapamatovaných øádkù (vrch, spodek) a TEST je název souboru. + + 5. Znova se ujisti, že tam ten soubor je pomocí :!dir ale NEODSTRAÒUJ ho. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 5.4: SLUÈOVÁNÍ SOUBORÙ + + + ** K vložení obsahu souboru napiš :r NÁZEV_SOUBORU ** + + 1. Napiš :!dir pro ujištìní, že soubor TEST stále existuje. + + 2. Pøesuò kurzor na vrch této stránky. + +POZNÁMKA: Po vykonání kroku 3 uvidíš lekci 5.3. Potom se opìt pøesuò dolù + na tuto lekci. + + 3. Nyní vlož soubor TEST použitím pøíkazu :r TEST kde TEST je název + souboru. + +POZNÁMKA: Soubor, který vkládáš se vloží od místa, kde se nachází kurzor. + + 4. Pro potvrzení vložení souboru, pøesuò kurzor zpìt a všimni si, že teï + máš dvì kopie lekce 5.3, originál a souborovou verzi. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SHRNUTÍ LEKCE 5 + + + 1. :!pøíkaz vykoná vnìjší pøíkaz. + + Nìkteré užiteèné pøíklady jsou: + (MS-DOS) (Unix) + :!dir :!ls - zobrazí obsah souboru. + :!del SOUBOR :!rm SOUBOR - odstraní SOUBOR. + + 2. :w SOUBOR uloží aktuální text jako SOUBOR na disk. + + 3. :#,#w SOUBOR uloží øádky od # do # do SOUBORU. + + 4. :r SOUBOR vybere z disku SOUBOR a vloží ho do editovaného souboru + za pozici kurzoru. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 6.1: PØÍKAZ OTEVØÍT + + + ** Napiš o pro vložení øádku pod kurzor a pøepnutí do Vkládacího módu. ** + + 1. Pøemísti kurzor níže na øádek oznaèený --->. + + 2. Napiš o (malé) pro vložení øádku POD kurzor a pøepnutí do + Vkládacího módu. + + 3. Nyní zkopíruj øádek oznaèený ---> a stiskni pro ukonèení + Vkládacího módu. + +---> Po stisknutí o se kurzor pøemístí na vložený øádek do Vkládacího + módu. + + 4. Pro otevøení øádku NAD kurzorem jednoduše napiš velké O , místo + malého o. Vyzkoušej si to na následujícím øádku. +Vlož øádek nad tímto napsáním Shift-O po umístìní kurzoru na tento øádek. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 6.2: PØÍKAZ PØIDAT + + + ** Stiskni a pro vložení textu ZA kurzor. ** + + 1. Pøesuò kurzor na níže na konec øádky oznaèené ---> + stisknutím $ v Normálním módu. + + 2. Stiskni a (malé) pro pøidání textu ZA znak, který je pod kurzorem. + (Velké A pøidá na konec øádku.) + +Poznámka: Tímto se vyhneš stisknutí i , posledního znaku, textu na vložení, + , kurzor doprava, a nakonec x na pøidávání na konec øádku! + + 3. Nyní dokonèí první øádek. Všimni si, že pøidávání je vlastnì stejné jako + Vkládací mód, kromì místa, kam se text vkládá. + +---> Tento øádek ti umožòuje nacvièit +---> Tento øádek ti umožòuje nacvièit pøidávání textu na konec øádky. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 6.3: JINÝ ZPÙSOB NAHRAZOVÁNÍ + + + ** Napiš velké R pro nahrazení víc než jednoho znaku. ** + + 1. Pøesuò kurzor na první øádek oznaèený --->. + + 2. Umísti kurzor na zaèátek prvního slova, které je odlišné od druhého + øádku oznaèeného ---> (slovo 'poslední'). + + 3. Nyní stiskni R a nahraï zbytek textu na prvním øádku pøepsáním + starého textu tak, aby byl první øádek stejný jako ten druhý. + +---> Pro upravení prvního øádku do tvaru toho poslední na stranì použij kl. +---> Pro upravení prvního øádku do tvaru toho druhého, napiš R a nový text. + + 4. Všimni si, že jakmile stiskneš všechen nezmìnìný text zùstává. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 6.4: NASTAVENÍ MOŽNOSTÍ + + ** Nastav možnost, že vyhledávání anebo nahrazování nedbá velikosti písmen ** + + 1. Vyhledej øetìzec 'ignore' napsáním: + /ignore + Zopakuj nìkolikrát stisknutí klávesy n. + + 2. Nastav možnost 'ic' (Ignore case) napsáním pøíkazu: + :set ic + + 3. Nyní znovu vyhledej 'ignore' stisknutím: n + Nìkolikrát hledání zopakuj stisknutím klávesy n. + + 4. Nastav možnosti 'hlsearch' a 'incsearch': + :set hls is + + 5. Nyní znovu vykonej vyhledávací pøíkaz a sleduj, co se stane: + /ignore + + 6. Pro vypnutí zvýrazòování výsledkù napiš: + :nohlsearch +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SHRHNUTÍ LEKCE 6 + + + 1. Stisknutí o otevøe nový øádek POD kurzorem a umístí kurzor na vložený + øádek do Vkládacího módu. + Napsání velkého O otevøe øádek NAD øádkem, na kterém je kurzor. + + 2. Stiskni a pro vložení textu ZA znak na pozici kurzoru. + Napsání velkého A automaticky pøidá text na konec øádku. + + 3. Stisknutí velkého R pøepne do Nahrazovacího módu, dokud + nestiskneš pro jeho ukonèení. + + 4. Napsání ":set xxx" nastaví možnosti "xxx". + + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCE 7: PØÍKAZY ON-LINE NÁPOVÌDY + + + ** Používej on-line systém nápovìdy ** + + Vim má obsáhlý on-line systém nápovìdy. Pro zaèátek vyzkoušej jeden z + následujících: + - stiskni klávesu (pokud ji máš) + - stiskni klávesu (pokud ji máš) + - napiš :help + + Napiš :q pro uzavøení okna nápovìdy. + + Mùžeš najít nápovìdu k jakémukoliv tématu pøidáním argumentu k + pøíkazu ":help". Zkus tyto (nezapomeò stisknout ): + + :help w + :help c_ Klávesa l je vpravo a vykoná pohyb vpravo. + j Klávesa j vypadá na Å¡ipku dolu. + v + 1. Pohybuj kurzorem po obrazovce dokud si na to nezvykneÅ¡. + + 2. Drž klávesu pro pohyb dolu (j), dokud se její funkce nezopakuje. +---> TeÄ víš jak se pÅ™esunout na následující lekci. + + 3. Použitím klávesy dolu pÅ™ejdi na lekci 1.2. + +Poznámka: Pokud si nÄ›kdy nejsi jist nÄ›Äím, co jsi napsal, stlaÄ pro + pÅ™echod do Normálního módu. Poté pÅ™epiÅ¡ požadovaný příkaz. + +Poznámka: Kurzorové klávesy také fungují, avÅ¡ak používání hjkl je rychlejší + jakmile si na nÄ›j zvykneÅ¡. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 1.2: SPUÅ TÄšNà A UKONÄŒENà VIM + + + !! POZNÃMKA: PÅ™ed vykonáním tÄ›chto kroků si pÅ™eÄti celou lekci!! + + 1. StlaÄ (pro ujiÅ¡tÄ›ní, že se nacházíš v Normálním módu). + + 2. NapiÅ¡: :q! . + +---> Tímto ukonÄíš editor BEZ uložení zmÄ›n, které si vykonal. + Pokud chceÅ¡ uložit zmÄ›ny a ukonÄit editor napiÅ¡: + :wq + + 3. Až se dostaneÅ¡ na příkazový řádek, napiÅ¡ příkaz, kterým se dostaneÅ¡ zpÄ›t + do této výuky. To může být: vimtutor + BěžnÄ› se používá: vim tutor + +---> 'vim' znamená spuÅ¡tÄ›ní editoru, 'tutor' je soubor k editaci. + + 4. Pokud si tyto kroky spolehlivÄ› pamatujeÅ¡, vykonej kroky 1 až 3, Äímž + ukonÄíš a znovu spustíš editor. Potom pÅ™esuň kurzor dolu na lekci 1.3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 1.3: ÚPRAVA TEXTU - MAZÃNà + + + ** Stisknutím klávesy x v Normálním módu smažeÅ¡ znak na místÄ› kurzoru. ** + + 1. PÅ™esuň kurzor níže na řádek oznaÄený --->. + + 2. K odstranÄ›ní chyb pÅ™ejdi kurzorem na znak, který chceÅ¡ smazat. + + 3. StlaÄ klávesu x k odstranÄ›ní nechtÄ›ných znaků. + + 4. Opakuj kroky 2 až 4 dokud není vÄ›ta správnÄ›. + +---> Krááva skoÄÄilla pÅ™ess mÄ›ssíc. + + 5. Pokud je vÄ›ta správnÄ›, pÅ™ejdi na lekci 1.4. + +POZNÃMKA: Nesnaž se pouze zapamatovat pÅ™edvádÄ›né příkazy, uÄ se je používáním. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 1.4: ÚPRAVA TEXTU - VKLÃDÃNà + + + ** StlaÄení klávesy i v Normálním módu umožňuje vkládání textu. ** + + 1. PÅ™esuň kurzor na první řádek oznaÄený --->. + + 2. Pro upravení prvního řádku do podoby řádku druhého, pÅ™esuň kurzor na + první znak za místo, kde má být text vložený. + + 3. StlaÄ i a napiÅ¡ potÅ™ebný dodatek. + + 4. Po opravení každé chyby stlaÄ pro návrat do Normálního módu. + Opakuj kroky 2 až 4 dokud není vÄ›ta správnÄ›. + +---> NÄ›jaký txt na této . +---> NÄ›jaký text chybí na této řádce. + + 5. Pokud již ovládáš vkládání textu, pÅ™ejdi na následující shrnutí. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SHRNUTà LEKCE 1 + + + 1. Kurzorem se pohybuje pomocí Å¡ipek nebo klávesami hjkl. + h (vlevo) j (dolu) k (nahoru) l (vpravo) + + 2. Pro spuÅ¡tÄ›ní Vimu (z příkazového řádku) napiÅ¡: vim SOUBOR + + 3. Pro ukonÄení Vimu napiÅ¡: :q! bez uložení zmÄ›n. + anebo: :wq pro uložení zmÄ›n. + + 4. Pro smazání znaku pod kurzorem napiÅ¡ v Normálním módu: x + + 5. Pro vkládání textu od místa kurzoru napiÅ¡ v Normálním módu: + i vkládaný text + +POZNÃMKA: StlaÄení tÄ› pÅ™emístí do Normálního módu nebo zruší nechtÄ›ný + a ÄásteÄnÄ› dokonÄený příkaz. + +Nyní pokraÄuj Lekcí 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 2.1: PŘÃKAZY MAZÃNà + + + ** Příkaz dw smaže znaky do konce slova. ** + + 1. StlaÄ k ubezpeÄení, že jsi v Normálním módu. + + 2. PÅ™esuň kurzor níže na řádek oznaÄený --->. + + 3. PÅ™esuň kurzor na zaÄátek slova, které je potÅ™eba smazat. + + 4. NapiÅ¡ dw , aby slovo zmizelo. + +POZNÃMKA: Písmena dw se zobrazí na posledním řádku obrazovky jakmile je + napíšeÅ¡. Když napíšeÅ¡ nÄ›co Å¡patnÄ›, stlaÄ a zaÄni znova. + +---> Jsou tu nÄ›jaká slova zábava, která nepatří list do této vÄ›ty. + + 5. Opakuj kroky 3 až 4 dokud není vÄ›ta správnÄ› a pÅ™ejdi na lekci 2.2. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 2.2: VÃCE PŘÃKAZÅ® MAZÃNà + + + ** Napsání příkazu d$ smaže vÅ¡e až do konce řádky. ** + + 1. StlaÄ k ubezpeÄení, že jsi v Normálním módu. + + 2. PÅ™esuň kurzor níže na řádek oznaÄený --->. + + 3. PÅ™esuň kurzor na konec správné vÄ›ty (ZA první teÄku). + + 4. NapiÅ¡ d$ ,aby jsi smazal znaky až do konce řádku. + +---> NÄ›kdo napsal konec této vÄ›ty dvakrát. konec této vÄ›ty dvakrát. + + + 5. PÅ™ejdi na lekci 2.3 pro pochopení toho, co se stalo. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 2.3: ROZÅ IŘOVACà PŘÃKAZY A OBJEKTY + + + Formát mazacího příkazu d je následující: + + [Äíslo] d objekt NEBO d [Äíslo] objekt + Kde: + Äíslo - udává kolikrát se příkaz vykoná (volitelné, výchozí=1). + d - je příkaz mazání. + objekt - udává na Äem se příkaz vykonává (vypsané níže). + + Krátký výpis objektů: + w - od kurzoru do konce slova, vÄetnÄ› mezer. + e - od kurzoru do konce slova, BEZ mezer. + $ - od kurzoru do konce řádku. + +POZNÃMKA: StlaÄením klávesy objektu v Normálním módu se kurzor pÅ™esune na + místo upÅ™esnÄ›né ve výpisu objektů. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 2.4: VÃJIMKA Z 'PŘÃKAZ-OBJEKT' + + + ** Napsáním dd smažeÅ¡ celý řádek. ** + + Vzhledem k Äastosti mazání celého řádku se autoÅ™i Vimu rozhodli, že bude + jednoduší napsat prostÄ› dvÄ› d k smazání celého řádku. + + 1. PÅ™esuň kurzor na druhý řádek spodního textu. + 2. NapiÅ¡ dd pro smazání řádku. + 3. PÅ™ejdi na Ätvrtý řádek. + 4. NapiÅ¡ 2dd (vzpomeň si Äíslo-příkaz-objekt) pro smazání dvou řádků. + + 1) Růže jsou Äervené, + 2) Bláto je zábavné, + 3) Fialky jsou modré, + 4) Mám auto, + 5) Hodinky ukazují Äas, + 6) Cukr je sladký, + 7) A to jsi i ty. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 2.5: PŘÃKAZ UNDO + + + ** StlaÄ u pro vrácení posledního příkazu, U pro celou řádku. ** + + 1. PÅ™esuň kurzor níže na řádek oznaÄený ---> a pÅ™emísti ho na první chybu. + 2. NapiÅ¡ x pro smazání prvního nechtÄ›ného znaku. + 3. TeÄ napiÅ¡ u Äímž vrátíš zpÄ›t poslední vykonaný příkaz. + 4. Nyní oprav vÅ¡echny chyby na řádku pomocí příkazu x . + 5. NapiÅ¡ velké U Äímž vrátíš řádek do původního stavu. + 6. TeÄ napiÅ¡ u nÄ›kolikrát, Äímž vrátíš zpÄ›t příkaz U . + 7. StlaÄ CTRL-R (klávesu CTRL drž stlaÄenou a stiskni R) nÄ›kolikrát, + Äímž vrátíš zpÄ›t pÅ™edtím vrácené příkazy (redo). + +---> Opprav chybby nna toomto řádku a nahraÄ je pommocí undo. + + 8. Toto jsou velmi užiteÄné příkazy. Nyní pÅ™ejdi na souhrn Lekce 2. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SHRNUTà LEKCE 2 + + + 1. Pro smazání znaků od kurzoru do konce slova napiÅ¡: dw + + 2. Pro smazání znaků od kurzoru do konce řádku napiÅ¡: d$ + + 3. Pro smazání celého řádku napiÅ¡: dd + + 4. Formát příkazu v Normálním módu je: + + [Äíslo] příkaz objekt NEBO příkaz [Äíslo] objekt + kde: + Äíslo - udává poÄet opakování příkazu + příkaz - udává co je tÅ™eba vykonat, například d maže + objekt - udává rozsah příkazu, například w (slovo), + $ (do konce řádku), atd. + + 5. Pro vrácení pÅ™edeÅ¡lé Äinnosti, napiÅ¡: u (malé u) + Pro vrácení vÅ¡ech úprav na řádku napiÅ¡: U (velké U) + Pro vrácení vrácených úprav (redo) napiÅ¡: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 3.1: PŘÃKAZ VLOŽIT + + + ** Příka p vloží poslední vymazaný text za kurzor. ** + + 1. PÅ™esuň kurzor níže na poslední řádek textu. + + 2. NapiÅ¡ dd pro smazání řádku a jeho uložení do bufferu. + + 3. PÅ™esuň kurzor VÃÅ E tam, kam smazaný řádek patří. + + 4. V Normálním módu napiÅ¡ p pro opÄ›tné vložení řádku. + + 5. Opakuj kroky 2 až 4 dokud řádky nebudou ve správném poÅ™adí. + + d) Také se dokážeÅ¡ vzdÄ›lávat? + b) Fialky jsou modré, + c) Inteligence se uÄí, + a) Růže jsou Äervené, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 3.2: PŘÃKAZ NAHRAZENà + + + ** Napsáním r a znaku se nahradí znak pod kurzorem. ** + + 1. PÅ™esuň kurzor níže na první řádek oznaÄený --->. + + 2. PÅ™esuň kurzor na zaÄátek první chyby. + + 3. NapiÅ¡ r a potom znak, který nahradí chybu. + + 4. Opakuj kroky 2 až 3 dokud není první řádka správnÄ›. + +---> Kdiž byl pzán tento řádeg, nÄ›kdu stlažil Å¡paqné klávesy! +---> Když byl psán tento řádek, nÄ›kdo stlaÄíl Å¡patné klávesy! + + 5. Nyní pÅ™ejdi na Lekci 3.2. + +POZNÃMKA: Zapamatuj si, že by ses mÄ›l uÄit používáním, ne zapamatováním. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 3.3: PŘÃKAZ ÚPRAVY + + + ** Pokud chceÅ¡ zmÄ›nit Äást nebo celé slovo, napiÅ¡ cw . ** + + 1. PÅ™esuň kurzor níže na první řádek oznaÄený --->. + + 2. Umísti kurzor na písmeno i v slovÄ› Å™iÅ¥ok. + + 3. NapiÅ¡ cw a oprav slovo (v tomto případÄ› napiÅ¡ 'ádek'.) + + 4. StlaÄ a pÅ™ejdi na další chybu (první znak, který tÅ™eba zmÄ›nit.) + + 5. Opakuj kroky 3 až 4 dokud není první vÄ›ta stejná jako ta druhá. + +---> Tento Å™iÅ¥ok má nÄ›kolik skic, které psadoinsa zmÄ›nit pasdgf příkazu. +---> Tento řádek má nÄ›kolik slov, které potÅ™ebují zmÄ›nit pomocí příkazu. + +VÅ¡imni si, že cw nejen nahrazuje slovo, ale také pÅ™emístí do vkládání. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 3.4: VÃCE ZMÄšN POUŽITÃM c + + + ** Příkaz pro úpravu se druží se stejnými objekty jako ten pro mazání. ** + + 1. Příkaz pro úpravu pracuje stejnÄ› jako pro mazání. Formát je: + + [Äíslo] c objekt NEBO c [Äíslo] objekt + + 2. Objekty jsou také shodné, jako napÅ™.: w (slovo), $ (konec řádku), atd. + + 3. PÅ™ejdi níže na první řádek oznaÄený --->. + + 4. PÅ™esuň kurzor na první rozdíl. + + 5. NapiÅ¡ c$ pro upravení zbytku řádku podle toho druhého a stlaÄ . + +---> Konec tohoto řádku potÅ™ebuje pomoc, aby byl jako ten druhý. +---> Konec tohoto řádku potÅ™ebuje opravit použitím příkazu c$ . + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SHRNUTà LEKCE 3 + + + 1. Pro vložení textu, který byl smazán, napiÅ¡ p . To vloží smazaný text + ZA kurzor (pokud byl řádek smazaný, pÅ™ejde na řádek pod kurzorem). + + 2. Pro nahrazení znaku pod kurzorem, napiÅ¡ r a potom znak, kterým + chceÅ¡ původní znak nahradit. + + 3. Příkaz na upravování umožňuje zmÄ›nit specifikovaný objekt od kurzoru + do konce objektu. Například: NapiÅ¡ cw ,Äímž zmÄ›níš text od pozice + kurzoru do konce slova, c$ zmÄ›ní text do konce řádku. + + 4. Formát pro nahrazování je: + + [Äíslo] c objekt NEBO c [Äíslo] objekt + +Nyní pÅ™ejdi na následující lekci. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 4.1: POZICE A STATUS SOUBORU + + + ** StlaÄ CTRL-g pro zobrazení své pozice v souboru a statusu souboru. + StlaÄ SHIFT-G pro pÅ™echod na řádek v souboru. ** + + Poznámka: PÅ™eÄti si celou lekci než zaÄneÅ¡ vykonávat kroky!! + + 1. Drž klávesu Ctrl stlaÄenou a stiskni g . Vespod obrazovky se zobrazí + stavový řádek s názvem souboru a řádkou na které se nacházíš. Zapamatuj + si Äíslo řádku pro krok 3. + + 2. StlaÄ shift-G pro pÅ™esun na konec souboru. + + 3. NapiÅ¡ Äíslo řádku na kterém si se nacházel a stlaÄ shift-G. To tÄ› + vrátí na řádek, na kterém jsi dříve stiskl Ctrl-g. + (Když píšeÅ¡ Äísla, tak se NEZOBRAZUJà na obrazovce.) + + 4. Pokud se cítíš schopný vykonat tyto kroky, vykonej je. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 4.2: PŘÃKAZ VYHLEDÃVÃNà + + + ** NapiÅ¡ / následované Å™etÄ›zcem pro vyhledání onoho Å™etÄ›zce. ** + + 1. Stiskni / v Normálním módu. VÅ¡imni si, že tento znak se spolu s + kurzorem zobrazí v dolní Äásti obrazovky jako příkaz : . + + 2. Nyní napiÅ¡ 'chhybba' . To je slovo, které chceÅ¡ vyhledat. + + 3. Pro vyhledání dalšího výsledku stejného Å™etÄ›zce, jednoduÅ¡e stlaÄ n . + Pro vyhledání dalšího výsledku stejného Å™etÄ›zce opaÄným smÄ›rem, stiskni + Shift-N. + + 4. Pokud chceÅ¡ vyhledat Å™etÄ›zec v opaÄném smÄ›ru, použij příkaz ? místo + příkazu / . + +---> "chhybba" není způsob, jak hláskovat chyba; chhybba je chyba. + +Poznámka: Když vyhledávání dosáhne konce souboru, bude pokraÄovat na jeho + zaÄátku. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 4.3: VYHLEDÃVÃNà PÃROVÉ ZÃVORKY + + + ** NapiÅ¡ % pro nalezení párové ),], nebo } . ** + + 1. PÅ™emísti kurzor na kteroukoli (, [, nebo { v řádku oznaÄeném --->. + + 2. Nyní napiÅ¡ znak % . + + 3. Kurzor se pÅ™emístí na odpovídající závorku. + + 4. StlaÄ % pro pÅ™esun kurzoru zpÄ›t na otvírající závorku. + +---> Toto ( je testovací řádek ('s, ['s ] a {'s } v nÄ›m. )) + +Poznámka: Toto je velmi užiteÄné pří ladÄ›ní programu s chybÄ›jícími + uzavíracími závorkami. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 4.4: ZPÅ®SOB JAK ZMÄšNIT CHYBY + + + ** NapiÅ¡ :s/staré/nové/g pro nahrazení slova 'nové' za 'staré'. ** + + 1. PÅ™esuň kurzor na řádek oznaÄený --->. + + 2. NapiÅ¡ :s/dobréé/dobré . VÅ¡imni si, že tento příkaz zmÄ›ní pouze + první výskyt v řádku. + + 3. Nyní napiÅ¡ :s/dobréé/dobré/g což znamená celkové nahrazení v řádku. + Toto nahradí vÅ¡echny výskyty v řádku. + +---> dobréé suroviny a dobréé náÄiní jsou základem dobréé kuchynÄ›. + + 4. Pro zmÄ›nu vÅ¡ech výskytů Å™etÄ›zce mezi dvÄ›ma řádky, + NapiÅ¡ :#,#s/staré/nové/g kde #,# jsou Äísla onÄ›ch řádek. + NapiÅ¡ :%s/staré/nové/g pro zmÄ›nu vÅ¡ech výskytů v celém souboru. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SHRNUTà LEKCE 4 + + + 1. Ctrl-g vypíše tvou pozici v souboru a status souboru. + Shift-G tÄ› pÅ™emístí na konec souboru. Číslo následované + Shift-G tÄ› pÅ™esune na dané Äíslo řádku. + + 2. Napsání / následované Å™etÄ›zcem vyhledá Å™etÄ›zec smÄ›rem DOPŘEDU. + Napsání ? následované Å™etÄ›zcem vyhledá Å™etÄ›zec smÄ›rem DOZADU. + Napsání n po vyhledávání najde následující výskyt Å™etÄ›zce ve stejném + smÄ›ru, Shift-N ve smÄ›ru opaÄném. + + 3. Stisknutí % když je kurzor na (,),[,],{, nebo } najde odpovídající + párovou závorku. + + 4. Pro nahrazení nového za první starý v řádku napiÅ¡ :s/staré/nové + Pro nahrazení nového za vÅ¡echny staré v řádku napiÅ¡ :s/staré/nové/g + Pro nahrazení Å™etÄ›zců mezi dvÄ›mi řádkami # napiÅ¡ :#,#s/staré/nové/g + Pro nahrazení vÅ¡ech výskytů v souboru napiÅ¡ :%s/staré/nové/g + Pro potvrzení každého nahrazení pÅ™idej 'c' :%s/staré/nové/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 5.1: JAK VYKONAT VNÄšJÅ Ã PŘÃKAZ + + + ** NapiÅ¡ :! následované vnÄ›jším příkazem pro spuÅ¡tÄ›ní příkazu. ** + + 1. NapiÅ¡ obvyklý příkaz : , který umístí kurzor na spodek obrazovky + To umožní napsat příkaz. + + 2. Nyní stiskni ! (vykÅ™iÄník). To umožní vykonat jakýkoliv vnÄ›jší + příkaz z příkazového řádku. + + 3. Například napiÅ¡ ls za ! a stiskni . Tento příkaz zobrazí + obsah tvého adresáře jako v příkazovém řádku. + VyzkouÅ¡ej :!dir pokud ls nefunguje. + +Poznámka: Takto je možné vykonat jakýkoliv příkaz. + +Poznámka: VÅ¡echny příkazy : musí být dokonÄené stisknutím + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 5.2: VÃCE O UKLÃDÃNà SOUBORÅ® + + + ** Pro uložení zmÄ›n v souboru napiÅ¡ :w SOUBOR. ** + + 1. NapiÅ¡ :!dir nebo :!ls pro výpis aktuálního adresáře. + Už víš, že za tímto musíš stisknout . + + 2. Vyber si název souboru, který jeÅ¡tÄ› neexistuje, například TEST. + + 3. Nyní napiÅ¡: :w TEST (kde TEST je vybraný název souboru.) + + 4. To uloží celý soubor (Výuka Vimu) pod názvem TEST. + Pro ověření napiÅ¡ znovu :!dir , Äímž zobrazíš obsah adresáře. + +Poznámka: Jakmile ukonÄíš Vim a znovu ho spustíš s názvem souboru TEST, + soubor bude pÅ™esná kopie výuky, když si ji ukládal. + + 5. Nyní odstraň soubor napsáním (MS-DOS): :!del TEST + nebo (Unix): :!rm TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 5.3: VÃBÄšROVà PŘÃKAZ ULOŽENà + + + ** Pro uložení Äásti souboru napiÅ¡ :#,# w SOUBOR ** + + 1. JeÅ¡tÄ› jednou napiÅ¡ :!dir nebo :!ls pro výpis aktuálního adresáře + a vyber vhodný název souboru jako napÅ™. TEST. + + 2. PÅ™esuň kurzor na vrch této stránky a stiskni Ctrl-g pro zobrazení + Äísla řádku. ZAPAMATUJ SI TOTO ÄŒÃSLO! + + 3. Nyní se pÅ™esuň na spodek této stránky a opÄ›t stiskni Ctrl-g. + ZAPAMATUJ SI I ÄŒÃSLO TOHOTO ŘÃDKU! + + 4. Pro uložení POUZE Äásti souboru, napiÅ¡ :#,# w TEST kde #,# jsou + Äísla dvou zapamatovaných řádků (vrch, spodek) a TEST je název souboru. + + 5. Znova se ujisti, že tam ten soubor je pomocí :!dir ale NEODSTRAŇUJ ho. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 5.4: SLUÄŒOVÃNà SOUBORÅ® + + + ** K vložení obsahu souboru napiÅ¡ :r NÃZEV_SOUBORU ** + + 1. NapiÅ¡ :!dir pro ujiÅ¡tÄ›ní, že soubor TEST stále existuje. + + 2. PÅ™esuň kurzor na vrch této stránky. + +POZNÃMKA: Po vykonání kroku 3 uvidíš lekci 5.3. Potom se opÄ›t pÅ™esuň dolů + na tuto lekci. + + 3. Nyní vlož soubor TEST použitím příkazu :r TEST kde TEST je název + souboru. + +POZNÃMKA: Soubor, který vkládáš se vloží od místa, kde se nachází kurzor. + + 4. Pro potvrzení vložení souboru, pÅ™esuň kurzor zpÄ›t a vÅ¡imni si, že teÄ + máš dvÄ› kopie lekce 5.3, originál a souborovou verzi. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SHRNUTà LEKCE 5 + + + 1. :!příkaz vykoná vnÄ›jší příkaz. + + NÄ›které užiteÄné příklady jsou: + (MS-DOS) (Unix) + :!dir :!ls - zobrazí obsah souboru. + :!del SOUBOR :!rm SOUBOR - odstraní SOUBOR. + + 2. :w SOUBOR uloží aktuální text jako SOUBOR na disk. + + 3. :#,#w SOUBOR uloží řádky od # do # do SOUBORU. + + 4. :r SOUBOR vybere z disku SOUBOR a vloží ho do editovaného souboru + za pozici kurzoru. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 6.1: PŘÃKAZ OTEVŘÃT + + + ** NapiÅ¡ o pro vložení řádku pod kurzor a pÅ™epnutí do Vkládacího módu. ** + + 1. PÅ™emísti kurzor níže na řádek oznaÄený --->. + + 2. NapiÅ¡ o (malé) pro vložení řádku POD kurzor a pÅ™epnutí do + Vkládacího módu. + + 3. Nyní zkopíruj řádek oznaÄený ---> a stiskni pro ukonÄení + Vkládacího módu. + +---> Po stisknutí o se kurzor pÅ™emístí na vložený řádek do Vkládacího + módu. + + 4. Pro otevÅ™ení řádku NAD kurzorem jednoduÅ¡e napiÅ¡ velké O , místo + malého o. VyzkouÅ¡ej si to na následujícím řádku. +Vlož řádek nad tímto napsáním Shift-O po umístÄ›ní kurzoru na tento řádek. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 6.2: PŘÃKAZ PŘIDAT + + + ** Stiskni a pro vložení textu ZA kurzor. ** + + 1. PÅ™esuň kurzor na níže na konec řádky oznaÄené ---> + stisknutím $ v Normálním módu. + + 2. Stiskni a (malé) pro pÅ™idání textu ZA znak, který je pod kurzorem. + (Velké A pÅ™idá na konec řádku.) + +Poznámka: Tímto se vyhneÅ¡ stisknutí i , posledního znaku, textu na vložení, + , kurzor doprava, a nakonec x na pÅ™idávání na konec řádku! + + 3. Nyní dokonÄí první řádek. VÅ¡imni si, že pÅ™idávání je vlastnÄ› stejné jako + Vkládací mód, kromÄ› místa, kam se text vkládá. + +---> Tento řádek ti umožňuje nacviÄit +---> Tento řádek ti umožňuje nacviÄit pÅ™idávání textu na konec řádky. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 6.3: JINà ZPÅ®SOB NAHRAZOVÃNà + + + ** NapiÅ¡ velké R pro nahrazení víc než jednoho znaku. ** + + 1. PÅ™esuň kurzor na první řádek oznaÄený --->. + + 2. Umísti kurzor na zaÄátek prvního slova, které je odliÅ¡né od druhého + řádku oznaÄeného ---> (slovo 'poslední'). + + 3. Nyní stiskni R a nahraÄ zbytek textu na prvním řádku pÅ™epsáním + starého textu tak, aby byl první řádek stejný jako ten druhý. + +---> Pro upravení prvního řádku do tvaru toho poslední na stranÄ› použij kl. +---> Pro upravení prvního řádku do tvaru toho druhého, napiÅ¡ R a nový text. + + 4. VÅ¡imni si, že jakmile stiskneÅ¡ vÅ¡echen nezmÄ›nÄ›ný text zůstává. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekce 6.4: NASTAVENà MOŽNOSTà + + ** Nastav možnost, že vyhledávání anebo nahrazování nedbá velikosti písmen ** + + 1. Vyhledej Å™etÄ›zec 'ignore' napsáním: + /ignore + Zopakuj nÄ›kolikrát stisknutí klávesy n. + + 2. Nastav možnost 'ic' (Ignore case) napsáním příkazu: + :set ic + + 3. Nyní znovu vyhledej 'ignore' stisknutím: n + NÄ›kolikrát hledání zopakuj stisknutím klávesy n. + + 4. Nastav možnosti 'hlsearch' a 'incsearch': + :set hls is + + 5. Nyní znovu vykonej vyhledávací příkaz a sleduj, co se stane: + /ignore + + 6. Pro vypnutí zvýrazňování výsledků napiÅ¡: + :nohlsearch +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SHRHNUTà LEKCE 6 + + + 1. Stisknutí o otevÅ™e nový řádek POD kurzorem a umístí kurzor na vložený + řádek do Vkládacího módu. + Napsání velkého O otevÅ™e řádek NAD řádkem, na kterém je kurzor. + + 2. Stiskni a pro vložení textu ZA znak na pozici kurzoru. + Napsání velkého A automaticky pÅ™idá text na konec řádku. + + 3. Stisknutí velkého R pÅ™epne do Nahrazovacího módu, dokud + nestiskneÅ¡ pro jeho ukonÄení. + + 4. Napsání ":set xxx" nastaví možnosti "xxx". + + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCE 7: PŘÃKAZY ON-LINE NÃPOVÄšDY + + + ** Používej on-line systém nápovÄ›dy ** + + Vim má obsáhlý on-line systém nápovÄ›dy. Pro zaÄátek vyzkouÅ¡ej jeden z + následujících: + - stiskni klávesu (pokud ji máš) + - stiskni klávesu (pokud ji máš) + - napiÅ¡ :help + + NapiÅ¡ :q pro uzavÅ™ení okna nápovÄ›dy. + + MůžeÅ¡ najít nápovÄ›du k jakémukoliv tématu pÅ™idáním argumentu k + příkazu ":help". Zkus tyto (nezapomeň stisknout ): + + :help w + :help c_ Die l Taste liegt rechts und bewegt nach rechts. + j Die j Taste ähnelt einem Pfeil nach unten. + v + 1. Bewege den Cursor auf dem Bildschirm umher, bis Du Dich sicher fühlst. + + 2. Halte die Nach-Unten-Taste (j) gedrückt, bis sie sich wiederholt. + Jetzt weißt Du, wie Du Dich zur nächsten Lektion bewegen kannst. + + 3. Benutze die Nach-Unten-Taste, um Dich zu Lektion 1.2 zu bewegen. + +Bemerkung: Immer, wenn Du Dir unsicher bist über das, was Du getippt hast, + drücke , um Dich in den Normalmodus zu begeben. + Dann gib das gewünschte Kommando noch einmal ein. + +Bemerkung: Die Cursor-Tasten sollten ebenfalls funktionieren. Aber wenn Du + hjkl benutzt, wirst Du in der Lage sein, Dich sehr viel schneller + umherzubewegen, wenn Du Dich einmal daran gewöhnt hast. Wirklich! +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 1.2: VIM BEENDEN + + + !! ACHTUNG: Bevor Du einen der unten aufgeführten Schritte ausführst, lies + diese gesamte Lektion!! + + 1. Drücke die Taste (um sicherzustellen, dass Du im Normalmodus bist). + + 2. Tippe: :q! . + Dies beendet den Editor und VERWIRFT alle Änderungen, die Du gemacht hast. + + 3. Wenn Du die Eingabeaufforderung siehst, gib das Kommando ein, das Dich zu + diesem Tutor geführt hat. Dies wäre: vimtutor + + 4. Wenn Du Dir diese Schritte eingeprägt hast und Du Dich sicher fühlst, + führe Schritte 1 bis 3 aus, um den Editor zu verlassen und wieder + hineinzugelangen. + +Bemerkung: :q! verwirft alle Änderungen, die Du gemacht hast. In + einigen Lektionen lernst Du , die Änderungen in einer Datei zu speichern. + + 5. Bewege den Cursor abwärts zu Lektion 1.3. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 1.3: TEXT EDITIEREN - LÖSCHEN + + + ** Drücke x um das Zeichen unter dem Cursor zu löschen. ** + + 1. Bewege den Cursor zu der mit ---> markierten Zeile unten. + + 2. Um die Fehler zu beheben, bewege den Cursor, bis er auf dem Zeichen steht, + das gelöscht werden soll. + + 3. Drücke die x Taste, um das überflüssige Zeichen zu löschen. + + 4. Wiederhole die Schritte 2 bis 4, bis der Satz korrekt ist. + +---> Die Kkuh sprangg übber deen Moond. + + 5. Wenn nun die Zeile korrekt ist, gehe weiter zur Lektion 1.4. + +Anmerkung: Während Du durch diesen Tutor gehst, versuche nicht, auswendig zu + lernen, lerne vielmehr durch Anwenden. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 1.4: TEXT EDITIEREN - EINFÜGEN + + + ** Drücke i , um Text einzufügen. ** + + 1. Bewege den Cursor zur ersten unten stehenden mit ---> markierten Zeile. + + 2. Um die erste Zeile mit der zweiten gleichzumachen, bewege den Cursor auf + das erste Zeichen NACH der Stelle, wo der Text eingefügt werden soll. + + 3. Drücke i und gib die notwendigen Ergänzungen ein. + + 4. Wenn jeweils ein Fehler beseitigt ist, drücke , um zum Normalmodus + zurückzukehren. + Wiederhole die Schritte 2 bis 4, um den Satz zu korrigieren. + +---> In dieser ft etwas . +---> In dieser Zeile fehlt etwas Text. + + 5. Wenn Du Dich mit dem Einfügen von Text sicher fühlst, gehe zu Lektion 1.5. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 1.5: TEXT EDITIEREN - ANFÜGEN + + + ** Drücke A , um Text anzufügen. ** + + 1. Bewege den Cursor zur ersten unten stehenden mit ---> markierten Zeile. + Es ist gleichgültig, auf welchem Zeichen der Zeile der Cursor steht. + + 2. Drücke A und gib die nötigen Ergänzungen ein. + + 3. Wenn das Anfügen abgeschlossen ist, drücke , um in den Normalmodus + zurückzukehren. + + 4. Bewege den Cursor zur zweiten mit ---> markierten Zeile und wiederhole + die Schritte 2 und 3, um den Satz zu korrigieren. + +---> In dieser Zeile feh + In dieser Zeile fehlt etwas Text. +---> Auch hier steh + Auch hier steht etwas Unvollständiges. + + 5. Wenn Du dich mit dem Anfügen von Text sicher fühlst, gehe zu Lektion 1.6. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 1.6: EINE DATEI EDITIEREN + + + ** Benutze :wq , um eine Datei zu speichern und Vim zu verlassen. ** + + !! ACHTUNG: Bevor Du einen der unten aufgeführten Schritte ausführst, lies + diese gesamte Lektion!! + + 1. Verlasse den Editor so wie in Lektion 1.2: :q! + + 2. Gib dieses Kommando in die Eingabeaufforderung ein: vim tutor + 'vim' ist der Aufruf des Editors, 'tutor' ist die zu editierende Datei. + Benutze eine Datei, die geändert werden kann. + + 3. Füge Text ein oder lösche ihn, wie Du in den vorigen Lektionen gelernt + hast. + + 4. Speichere die geänderte Datei und verlasse Vim mit: :wq + + 5. Starte den vimtutor neu und bewege Dich zu der folgenden Zusammenfassung. + + 6. Nachdem Du obige Schritte gelesen und verstanden hast, führe sie durch. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZUSAMMENFASSUNG VON LEKTION 1 + + + 1. Der Cursor wird mit den Pfeiltasten oder den Tasten hjkl bewegt. + h (links) j (unten) k (aufwärts) l (rechts) + + 2. Um Vim von der Eingabeaufforderung auszuführen, tippe: vim DATEI + + 3. Um Vim zu verlassen und alle Änderungen zu verwerfen, tippe: + :q! . + ODER tippe: :wq , um die Änderungen zu speichern. + + 4. Um das Zeichen unter dem Cursor zu löschen, tippe: x + + 5. Um Text einzufügen oder anzufügen, tippe: + i Einzufügenden Text eingeben Einfügen vor dem Cursor + A Anzufügenden Text eingeben Anfügen nach dem Zeilendene + +Bemerkung: Drücken von bringt Dich in den Normalmodus oder bricht ein + ungewolltes, erst teilweise eingegebenes Kommando ab. + + Nun fahre mit Lektion 2 fort. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.1: LÖSCHKOMMANDOS + + + ** Tippe dw , um ein Wort zu löschen. ** + + 1. Drücke um sicherzustellen, dass Du im Normalmodus bist. + + 2. Bewege den Cursor zu der mit ---> markierten Zeile unten. + + 3. Bewege den Cursor zum Anfang eines Wortes, das gelöscht werden soll. + + 4. Tippe dw , um das Wort zu entfernen. + + Bemerkung: Der Buchstabe d erscheint auf der letzten Zeile des Bildschirms, + wenn Du ihn eingibst. Vim wartet darauf, daß Du w eingibst. Wenn Du + ein anderes Zeichen als d siehst, hast Du etwas falsches getippt; + drücke und beginne neu. + +---> Einige Wörter lustig gehören nicht Papier in diesen Satz. + + 5. Wiederhole die Schritte 3 und 4, bis der Satz korrekt ist und gehe + danach zur Lektion 2.2. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.2: WEITERE LÖSCHKOMMANDOS + + + ** Tippe d$ , um bis zum Ende der Zeile zu löschen. ** + + 1. Drücke , um sicherzustellen, dass Du im Normalmodus bist. + + 2. Bewege den Cursor zu der mit ---> markierten Zeile unten. + + 3. Bewege den Cursor zum Ende der korrekten Zeile (NACH dem ersten . ). + + 4. Tippe d$ , um bis zum Ende der Zeile zu löschen. + +---> Jemand hat das Ende der Zeile doppelt eingegeben. doppelt eingegeben. + + + 5. Gehe weiter zur Lektion 2.3 , um zu verstehen, was hierbei passiert. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.3: ÜBER OPERATOREN UND BEWEGUNGSZÜGE + + + Viele Kommandos, die Text ändern, setzen sich aus einem Operator und einer + Bewegung zusammen. Das Format für ein Löschkommando mit dem Löschoperator d + lautet wie folgt: + + d Bewegung + + wobei: + d - der Löschoperator + Bewegung - worauf der Löschoperator angewandt wird (unten aufgelistet). + + Eine kleine Auflistung von Bewegungen: + w - bis zum Beginn des nächsten Wortes OHNE dessen erstes Zeichen. + e - zum Ende des aktuellen Wortes MIT dessen letztem Zeichen. + $ - zum Ende der Zeile MIT dem letzen Zeichen. + + Dementsprechend löscht die Eingabe von de vom Cursor an bis zum Wortende. + +Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den + Cursor entsprechend. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.4: ANWENDUNG EINES ZÄHLERS FÜR EINEN BEWEGUNGSSCHRITT + + + ** Die Eingabe einer Zahl vor einem Bewegungsschritt wiederholt diesen. ** + + 1. Bewege den Cursor zum Beginn der mit ---> markierten Zeile unten. + + 2. Tippe 2w , um den Cursor zwei Wörter vorwärts zu bewegen. + + 3. Tippe 3e , um den Cursor zum Ende des dritten Wortes zu bewegen. + + 4. Tippe 0 (Null) , um zum Anfang der Zeile zu gelangen. + + 5. Wiederhole Schritte 2 und 3 mit verschiedenen Zählern. + + ---> Dies ist nur eine Zeile aus Wörten um sich darin herumzubewegen. + + 6. Gehe weiter zu Lektion 2.5. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.5: ANWENDUNG EINES ZÄHLERS FÜR MEHRERE LÖSCHVORGÄNGE + + + ** Die Eingabe einer Zahl mit einem Operator wiederholt diesen mehrfach. ** + + Für die Kombination des Löschoperators und einem Bewegungsschritt (siehe + oben) stellt man dem Bewegungsschritt einen Zähler voran, um mehr zu löschen: + d Nummer Bewegungsschritt + + 1. Bewege den Cursor zum ersten Wort in GROSSBUCHSTABEN in der mit ---> + markieren Zeile. + + 2. Tippe d2w , um die zwei Wörter in GROSSBUCHSTABEN zu löschen. + + 3. Wiederhole Schritte 1 und 2 mit einem anderen Zähler, um die + darauffolgenden Wörter in GROSSBUCHSTABEN mit einem einzigen Kommando + zu löschen. + +---> Diese ABC DE Zeile FGHI JK LMN OP mit Wörtern ist Q RS TUV bereinigt. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.6: ARBEITEN AUF ZEILEN + + + ** Tippe dd , um eine ganze Zeile zu löschen. ** + + Wegen der Häufigkeit, dass man ganze Zeilen löscht, kamen die Entwickler von + Vi darauf, dass es leichter wäre, einfach zwei d's einzugeben, um eine Zeile + zu löschen. + + 1. Bewege den Cursor zur zweiten Zeile in der unten stehenden Redewendung. + 2. Tippe dd , um die Zeile zu löschen. + 3. Nun bewege Dich zur vierten Zeile. + 4. Tippe 2dd , um zwei Zeilen zu löschen. + +---> 1) Rosen sind rot, +---> 2) Matsch ist lustig, +---> 3) Veilchen sind blau, +---> 4) Ich habe ein Auto, +---> 5) Die Uhr sagt die Zeit, +---> 6) Zucker ist süß, +---> 7) So wie Du auch. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.7: RÜCKGÄNGIG MACHEN (UNDO) + + + ** Tippe u , um die letzten Kommandos rückgängig zu machen ** + ** oder U um eine ganze Zeile wiederherzustellen. ** + + 1. Bewege den Cursor zu der mit ---> markierten Zeile unten + und setze ihn auf den ersten Fehler. + 2. Tippe x , um das erste unerwünschte Zeichen zu löschen. + 3. Nun tippe u um das soeben ausgeführte Kommando rückgängig zu machen. + 4. Jetzt behebe alle Fehler auf der Zeile mit Hilfe des x Kommandos. + 5. Nun tippe ein großes U , um die Zeile in ihren Ursprungszustand + wiederherzustellen. + 6. Nun tippe u einige Male, um das U und die vorhergehenden Kommandos + rückgängig zu machen. + 7. Nun tippe CTRL-R (halte CTRL gedrückt und drücke R) mehrere Male, um die + Kommandos wiederherzustellen (die Rückgängigmachungen rückgängig machen). + +---> Beehebe die Fehller diesser Zeile und sttelle sie mitt 'undo' wieder her. + + 8. Dies sind sehr nützliche Kommandos. + Nun gehe weiter zur Zusammenfassung von Lektion 2. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZUSAMMENFASSUNG VON LEKTION 2 + + + 1. Um vom Cursor bis zum nächsten Wort zu löschen, tippe: dw + 2. Um vom Cursor bis zum Ende einer Zeile zu löschen, tippe: d$ + 3. Um eine ganze Zeile zu löschen, tippe: dd + + 4. Um eine Bewegung zu wiederholen, stelle eine Nummer voran: 2w + 5. Das Format für ein Änderungskommando ist: + Operator [Anzahl] Bewegungsschritt + wobei: + Operator - gibt an, was getan werden soll, zum Beispiel d für delete + [Anzahl] - ein optionaler Zähler, um den Bewegungsschritt zu wiederholen + Bewegungsschritt - Bewegung über den zu ändernden Text, so wie + w (Wort), $ (zum Ende der Zeile), etc. + + 6. Um Dich zum Anfang der Zeile zu begeben, benutze die Null: 0 + + 7. Um vorherige Aktionen rückgängig zu machen, tippe: u (kleines u) + Um alle Änderungen auf einer Zeile rückgängig zu machen: U (großes U) + Um die Rückgängigmachungen rückgängig zu machen, tippe: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 3.1: ANFÜGEN (PUT) + + + ** Tippe p , um vorher gelöschten Text nach dem Cursor anzufügen. ** + + 1. Bewege den Cursor zur ersten unten stehenden mit ---> markierten Zeile. + + 2. Tippe dd , um die Zeile zu löschen und sie in eimem Vim-Register zu + speichern. + + 3. Bewege den Cursor zur Zeile c), ÜBER derjenigen, wo die gelöschte Zeile + platziert werden soll. + + 4. Tippe p , um die Zeile unterhalb des Cursors zu platzieren. + + 5. Wiederhole die Schritte 2 bis 4, um alle Zeilen in die richtige + Reihenfolge zu bringen. + +---> d) Kannst Du das auch? +---> b) Veilchen sind blau, +---> c) Intelligenz ist erlernbar, +---> a) Rosen sind rot, +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 3.2: ERSETZEN (REPLACE) + + + ** Tippe rx , um das Zeichen unter dem Cursor durch x zu ersetzen. ** + + 1. Bewege den Cursor zur ersten unten stehenden mit ---> markierten Zeile. + + 2. Bewege den Cursor, bis er sich auf dem ersten Fehler befindet. + + 3. Tippe r und anschließend das Zeichen, welches dort stehen sollte. + + 4. Wiederhole Schritte 2 und 3, bis die erste Zeile gleich der zweiten ist. + +---> Als diese Zeite eingegoben wurde, wurden einike falsche Tasten gelippt! +---> Als diese Zeile eingegeben wurde, wurden einige falsche Tasten getippt! + + 5. Nun fahre fort mit Lektion 3.2. + +Bemerkung: Erinnere Dich, dass Du durch Anwenden lernen solltest, nicht durch + Auswendiglernen. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 3.3: ÄNDERN (CHANGE) + + + ** Um eine Änderung bis zum Wortende durchzuführen, tippe ce . ** + + 1. Bewege den Cursor zur ersten unten stehenden mit ---> markierten Zeile. + + 2. Platziere den Cursor auf das s von Wstwr. + + 3. Tippe ce und die Wortkorrektur ein (in diesem Fall tippe örter ). + + 4. Drücke und bewege den Cursor zum nächsten zu ändernden Zeichen. + + 5. Wiederhole Schritte 3 und 4 bis der erste Satz gleich dem zweiten ist. + +---> Einige Wstwr dieser Zlaww lasdjlaf mit dem Ändern-Operator gaaauu werden. +---> Einige Wörter dieser Zeile sollen mit dem Ändern-Operator geändert werden. + +Bemerke, dass ce das Wort löscht und Dich in den Eingabemodus versetzt. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 3.4: MEHR ÄNDERUNGEN MITTELS c + + + ** Das change-Kommando arbeitet mit denselben Bewegungen wie delete. ** + + 1. Der change Operator arbeitet in gleicher Weise wie delete. Das Format ist: + + c [Anzahl] Bewegungsschritt + + 2. Die Bewegungsschritte sind die gleichen , so wie w (Wort) und $ + (Zeilenende). + + 3. Bewege Dich zur ersten unten stehenden mit ---> markierten Zeile. + + 4. Bewege den Cursor zum ersten Fehler. + + 5. Tippe c$ , gib den Rest der Zeile wie in der zweiten ein, drücke . + +---> Das Ende dieser Zeile soll an die zweite Zeile angeglichen werden. +---> Das Ende dieser Zeile soll mit dem c$ Kommando korrigiert werden. + +Bemerkung: Du kannst die Rücktaste benutzen, um Tippfehler zu korrigieren. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZUSAMMENFASSUNG VON LEKTION 3 + + + 1. Um einen vorher gelöschten Text anzufügen, tippe p . Dies fügt den + gelöschten Text NACH dem Cursor an (wenn eine ganze Zeile gelöscht wurde, + wird diese in die Zeile unter dem Cursor eingefügt). + + 2. Um das Zeichen unter dem Cursor zu ersetzen, tippe r und das an dieser + Stelle gewünschte Zeichen. + + 3. Der Änderungs- (change) Operator erlaubt, vom Cursor bis zum Ende des + Bewegungsschrittes zu ändern. Tippe ce , um eine Änderung vom Cursor bis + zum Ende des Wortes vorzunehmen; c$ bis zum Ende einer Zeile. + + 4. Das Format für change ist: + + c [Anzahl] Bewegungsschritt + + Nun fahre mit der nächsten Lektion fort. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 4.1: CURSORPOSITION UND DATEISTATUS + + ** Tippe CTRL-G , um Deine Dateiposition sowie den Dateistatus anzuzeigen. ** + ** Tippe G , um Dich zu einer Zeile in der Datei zu begeben. ** + +Bemerkung: Lies diese gesamte Lektion, bevor Du irgendeinen Schritt ausführst!! + + 1. Halte die Ctrl Taste unten und drücke g . Dies nennen wir wir CTRL-G. + Eine Statusmeldung am Fuß der Seite erscheint mit dem Dateinamen und der + Position innerhalb der Datei. Merke Dir die Zeilennummer für Schritt 3. + +Bemerkung: Möglicherweise siehst Du die Cursorposition in der unteren rechten + Bildschirmecke. Dies ist Folge der 'ruler' Option (siehe :help 'ruler') + + 2. Drücke G , um Dich zum Ende der Datei zu begeben. + Tippe gg , um Dich zum Anfang der Datei zu begeben. + + 3. Gib die Nummer der Zeile ein, auf der Du vorher warst, gefolgt von G . + Dies bringt Dich zurück zu der Zeile, auf der Du gestanden hast, als Du + das erste Mal CTRL-G gedrückt hast. + + 4. Wenn Du Dich sicher genug fühlst, führe die Schritte 1 bis 3 aus. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 4.2: DAS SUCHEN - KOMMANDO + + + ** Tippe / gefolgt von einem Ausdruck, um nach dem Ausdruck zu suchen. ** + + 1. Im Normalmodus, tippe das / Zeichen. Bemerke, dass das / und der + Cursor am Fuß des Schirms erscheinen, so wie beim : Kommando. + + 2. Nun tippe 'Fehhler' . Dies ist das Wort, nach dem Du suchen willst. + + 3. Um nach demselben Ausdruck weiterzusuchen, tippe einfach n (für next). + Um nach demselben Ausdruck in der Gegenrichtung zu suchen, tippe N . + + 4. Um nach einem Ausdruck rückwärts zu suchen , benutze ? statt / . + + 5. Um dahin zurückzukehren, von wo Du gekommen bist, drücke CTRL-O (Halte + Ctrl unten und drücke den Buchstaben o). Wiederhole dies, um weiter + zurückzugehen. CTRL-I bringt dich vorwärts. + +---> Fehler schreibt sich nicht "Fehhler"; Fehhler ist ein Fehler +Bemerkung: Wenn die Suche das Dateiende erreicht hat, wird sie am Anfang + fortgesetzt, es sei denn, die 'wrapscan' Option wurde abgeschaltet. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 4.3: PASSENDE KLAMMERN FINDEN + + + ** Tippe % , um eine korrespondierende Klammer ),], oder } zu finden. ** + + 1. Platziere den Cursor auf irgendeines der Zeichen (, [, oder { in der unten + stehenden Zeile, die mit ---> markiert ist. + + 2. Nun tippe das % Zeichen. + + 3. Der Cursor bewegt sich zur passenden gegenüberliegenden Klammer. + + 4. Tippe % , um den Cursor zur anderen passenden Klammer zu bewegen. + + 5. Setze den Cursor auf ein anderes (,),[,],{ oder } und probiere % aus. + +---> Dies ( ist eine Testzeile ( mit [ verschiedenen ] { Klammern } darin. )) + +Bemerkung: Diese Funktionalität ist sehr nützlich bei der Fehlersuche in einem + Programmtext, in dem passende Klammern fehlen! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 4.4: DAS ERSETZUNGSKOMMANDO (SUBSTITUTE) + + + ** Tippe :s/alt/neu/g , um 'alt' durch 'neu' zu ersetzen. ** + + 1. Bewege den Cursor zu der unten stehenden mit ---> markierten Zeile. + + 2. Tippe :s/diee/die . Bemerke, dass der Befehl nur das erste + Vorkommen von "diee" ersetzt. + + 3. Nun tippe :s/diee/die/g . Das Zufügen des Flags g bedeutet, eine + globale Ersetzung über die Zeile durchzuführen, was alle Vorkommen von + "diee" auf der Zeile ersetzt. + +---> diee schönste Zeit, um diee Blumen anzuschauen, ist diee Frühlingszeit. + + 4. Um alle Vorkommen einer Zeichenkette innerhalb zweier Zeilen zu ändern, + tippe :#,#s/alt/neu/g wobei #,# die Zeilennummern des Zeilenbereiches + sind, in dem die Ersetzung durchgeführt werden soll. + Tippe :%s/alt/neu/g um alle Vorkommen in der gesamten Datei zu ändern. + Tippe :%s/alt/neu/gc um alle Vorkommen in der gesamten Datei zu finden + mit einem Fragedialog, ob ersetzt werden soll oder nicht. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZUSAMMENFASSUNG VON LEKTION 4 + + 1. CTRL-G zeigt die aktuelle Dateiposition sowie den Dateistatus. + G bringt Dich zum Ende der Datei. + Nummer G bringt Dich zur entsprechenden Zeilennummer. + gg bringt Dich zur ersten Zeile. + + 2. Die Eingabe von / plus einem Ausdruck sucht VORWÄRTS nach dem Ausdruck. + Die Eingabe von ? plus einem Ausdruck sucht RÜCKWÄRTS nach dem Ausdruck. + Tippe nach einer Suche n , um das nächste Vorkommen in der gleichen + Richtung zu finden; oder N , um in der Gegenrichtung zu suchen. + CTRL-O bringt Dich zurück zu älteren Positionen, CTRL-I zu neueren. + + 3. Die Eingabe von % , wenn der Cursor sich auf (,),[,],{, oder } + befindet, bringt Dich zur Gegenklammer. + + 4. Um das erste Vorkommen von "alt" in einer Zeile durch "neu" zu ersetzen, + tippe :s/alt/neu + Um alle Vorkommen von "alt" in der Zeile ersetzen, tippe :s/alt/neu/g + Um Ausdrücke innerhalb zweier Zeilennummern zu ersetzen, :#,#s/alt/neu/g + Um alle Vorkommen in der ganzen Datei zu ersetzen, tippe :%s/alt/neu/g + Für eine jedmalige Bestätigung, addiere 'c' (confirm) :%s/alt/neu/gc +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 5.1: AUSFÜHREN EINES EXTERNEN KOMMANDOS + + + ** Gib :! , gefolgt von einem externen Kommando ein, um es auszuführen. ** + + 1. Tippe das vertraute Kommando : , um den Cursor auf den Fuß des Schirms + zu setzen. Dies erlaubt Dir, ein Kommandozeilen-Kommando einzugeben. + + 2. Nun tippe ein ! (Ausrufezeichen). Dies ermöglicht Dir, ein beliebiges, + externes Shellkommando auszuführen. + + 3. Als Beispiel tippe ls nach dem ! und drücke . Dies zeigt + eine Auflistung Deines Verzeichnisses; genauso, als wenn Du auf der + Eingabeaufforderung wärst. Oder verwende :!dir , falls ls nicht geht. + +Bemerkung: Mit dieser Methode kann jedes beliebige externe Kommando + ausgeführt werden, auch mit Argumenten. + +Bemerkung: Alle : Kommandos müssen durch Eingabe von + abgeschlossen werden. Von jetzt an erwähnen wir dies nicht jedesmal. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 5.2: MEHR ÜBER DAS SCHREIBEN VON DATEIEN + + +** Um am Text durchgeführte Änderungen zu speichern, tippe :w DATEINAME. ** + + 1. Tippe :!dir oder :!ls , um eine Auflistung Deines Verzeichnisses zu + erhalten. Du weißt nun bereits, dass Du danach eingeben musst. + + 2. Wähle einen Dateinamen, der noch nicht existiert, z.B. TEST. + + 3. Nun tippe: :w TEST (wobei TEST der gewählte Dateiname ist). + + 4. Dies speichert die ganze Datei (den Vim Tutor) unter dem Namen TEST. + Um dies zu überprüfen, tippe nochmals :!ls bzw. !dir, um Deinen + Verzeichnisinhalt zu sehen. + +Bemerkung: Würdest Du Vim jetzt beenden und danach wieder mit vim TEST + starten, dann wäre diese Datei eine exakte Kopie des Tutors zu dem + Zeitpunkt, als Du ihn gespeichert hast. + + 5. Nun entferne die Datei durch Eingabe von (MS-DOS): :!del TEST + oder (Unix): :!rm TEST +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 5.3: AUSWÄHLEN VON TEXT ZUM SCHREIBEN + +** Um einen Abschnitt der Datei zu speichern, tippe v Bewegung :w DATEI ** + + 1. Bewege den Cursor zu dieser Zeile. + + 2. Tippe v und bewege den Cursor zum fünften Auflistungspunkt unten. + Bemerke, daß der Text hervorgehoben wird. + + 3. Drücke das Zeichen : . Am Fuß des Schirms erscheint :'<,'> . + + 4. Tippe w TEST , wobei TEST ein noch nicht vorhandener Dateiname ist. + Vergewissere Dich, daß Du :'<,'>w TEST siehst, bevor Du Enter drückst. + + 5. Vim schreibt die ausgewählten Zeilen in die Datei TEST. Benutze :!dir + oder :!ls , um sie zu sehen. Lösche sie noch nicht! Wir werden sie in + der nächsten Lektion benutzen. + +Bemerkung: Drücken von v startet die Visuelle Auswahl. Du kannst den Cursor + umherbewegen, um die Auswahl größer oder kleiner zu machen. Anschließend + kann man einen Operator anwenden, um mit dem Text etwas zu tun. Zum + Beispiel löscht d den Text. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 5.4: EINLESEN UND ZUSAMMENFÜHREN VON DATEIEN + + + ** Um den Inhalt einer Datei einzulesen, tippe :r DATEINAME ** + + 1. Platziere den Cursor überhalb dieser Zeile. + +BEACHTE: Nachdem Du Schritt 2 ausgeführt hast, wirst Du Text aus Lektion 5.3 + sehen. Dann bewege Dich wieder ABWÄRTS, um diese Lektion wiederzusehen. + + 2. Nun lies Deine Datei TEST ein indem Du das Kommando :r TEST ausführst, + wobei TEST der von Dir verwendete Dateiname ist. + Die eingelesene Datei wird unterhalb der Cursorzeile eingefügt. + + 3. Um zu überprüfen, dass die Datei eingelesen wurde, gehe zurück und siehe, + dass es jetzt zwei Kopien von Lektion 5.3 gibt, das Original und die + eingefügte Dateiversion. + +Bemerkung: Du kannst auch die Ausgabe eines externen Kommandos einlesen. Zum + Beispiel liest :r !ls die Ausgabe des Kommandos ls ein und platziert + sie unterhalb des Cursors. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZUSAMMENFASSUNG VON LEKTION 5 + + + 1. :!Kommando führt ein externes Kommando aus. + + Einige nützliche Beispiele sind + (MS-DOS) (Unix) + :!dir :!ls - zeigt eine Verzeichnisauflistung. + :!del DATEINAME :!rm DATEINAME - entfernt Datei DATEINAME. + + 2. :w DATEINAME speichert die aktuelle Vim-Datei unter dem Namen DATEINAME. + + 3. v Bewegung :w DATEINAME schreibt die Visuell ausgewählten Zeilen in + die Datei DATEINAME. + + 4. :r DATEINAME lädt die Datei DATEINAME und fügt sie unterhalb der + Cursorposition ein. + + 5. :r !dir liest die Ausgabe des Kommandos dir und fügt sie unterhalb der + Cursorposition ein. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 6.1: ZEILEN ÖFFNEN (OPEN) + + + ** Tippe o , um eine Zeile unterhalb des Cursors zu öffnen und Dich in ** + ** den Einfügemodus zu begeben. ** + + 1. Bewege den Cursor zu der ersten mit ---> markierten Zeile unten. + + 2. Tippe o (klein geschrieben), um eine Zeile UNTERHALB des Cursos zu öffnen + und Dich in den Einfügemodus zu begeben. + + 3. Nun tippe etwas Text und drücke , um den Einfügemodus zu verlassen. + +---> Mit o wird der Cursor auf der offenen Zeile im Einfügemodus platziert. + + 4. Um eine Zeile ÜBERHALB des Cursos aufzumachen, gib einfach ein großes O + statt einem kleinen o ein. Versuche dies auf der unten stehenden Zeile. + +---> Öffne eine Zeile über dieser mit O , wenn der Cursor auf dieser Zeile ist. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 6.2: TEXT ANFÜGEN (APPEND) + + + ** Tippe a , um Text NACH dem Cursor einzufügen. ** + + 1. Bewege den Cursor zum Anfang der ersten Übungszeile mit ---> unten. + + 2. Drücke e , bis der Cursor am Ende von Zei steht. + + 3. Tippe ein kleines a , um Text NACH dem Cursor anzufügen. + + 4. Vervollständige das Wort so wie in der Zeile darunter. Drücke , + um den Einfügemodus zu verlassen. + + 5. Bewege Dich mit e zum nächsten unvollständigen Wort und wiederhole + Schritte 3 und 4. + +---> Diese Zei bietet Gelegen , Text in einer Zeile anzufü. +---> Diese Zeile bietet Gelegenheit, Text in einer Zeile anzufügen. + +Bemerkung: a, i und A gehen alle gleichermaßen in den Einfügemodus; der + einzige Unterschied ist, wo die Zeichen eingefügt werden. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 6.3: EINE ANDERE ART DES ERSETZENS (REPLACE) + + + ** Tippe ein großes R , um mehr als ein Zeichen zu ersetzen. ** + + 1. Bewege den Cursor zur ersten unten stehenden, mit ---> markierten Zeile. + Bewege den Cursor zum Anfang des ersten xxx . + + 2. Nun drücke R und tippe die Nummer, die darunter in der zweiten Zeile + steht, so das diese das xxx ersetzt. + + 3. Drücke , um den Ersetzungsmodus zu verlassen. Bemerke, daß der Rest + der Zeile unverändert bleibt. + + 4. Wiederhole die Schritte, um das verbliebene xxx zu ersetzen. + +---> Das Addieren von 123 zu xxx ergibt xxx. +---> Das Addieren von 123 zu 456 ergibt 579. + +Bemerkung: Der Ersetzungsmodus ist wie der Einfügemodus, aber jedes eingetippte + Zeichen löscht ein vorhandenes Zeichen. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 6.4: TEXT KOPIEREN UND EINFÜGEN + + ** Benutze den y Operator, um Text zu kopieren; p , um ihn einzufügen ** + + 1. Gehe zu der mit ---> markierten Zeile unten, setze den Cursor hinter "a)". + + 2. Starte den Visuellen Modus mit v , bewege den Cursor genau vor "erste". + + 3. Tippe y , um den hervorgehoben Text zu kopieren. + + 4. Bewege den Cursor zum Ende der nächsten Zeile: j$ + + 5. Tippe p , um den Text einzufügen und anschließend: a zweite . + + 6. Benutze den Visuellen Modus, um " Eintrag." auszuwählen, kopiere mittels + y , bewege Dich zum Ende der nächsten Zeile mit j$ und füge den Text + dort mit p an. + +---> a) dies ist der erste Eintrag. + b) + +Bemerkung: Du kannst y auch als Operator verwenden; yw kopiert ein Wort. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 6.5: OPTIONEN SETZEN + + ** Setze eine Option so, dass eine Suche oder eine Ersetzung Groß- ** + ** und Kleinschreibung ignoriert ** + + 1. Suche nach 'ignoriere', indem Du /ignoriere eingibst. + Wiederhole die Suche einige Male, indem Du die n - Taste drückst. + + 2. Setze die 'ic' (Ignore case) - Option, indem Du :set ic eingibst. + + 3. Nun suche wieder nach 'ignoriere', indem Du n tippst. + Bemerke, daß jetzt Ignoriere und auch IGNORIERE gefunden wird. + + 4. Setze die 'hlsearch' und 'incsearch' - Optionen: :set hls is + + 5. Wiederhole die Suche und beobachte, was passiert: /ignoriere + + 6. Um das Ignorieren von Groß/Kleinschreibung abzuschalten, tippe: :set noic + +Bemerkung: Um die Hervorhebung der Treffer zu enfernen, gib ein: :nohlsearch +Bemerkung: Um die Schreibweise für eine einzige Suche zu ignorieren, benutze + \c im Suchausdruck: /ignoriere\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZUSAMMENFASSUNG VON LEKTION 6 + + 1. Tippe o , um eine Zeile UNTER dem Cursor zu öffnen und den Einfügemodus + zu starten. + Tippe O , um eine Zeile ÜBER dem Cursor zu öffnen. + + 2. Tippe a , um Text NACH dem Cursor anzufügen. + Tippe A , um Text nach dem Zeilenende anzufügen. + + 3. Das Kommando e bringt Dich zum Ende eines Wortes. + + 4. Der Operator y (yank) kopiert Text, p (put) fügt ihn ein. + + 5. Ein großes R geht in den Ersetzungsmodus bis zum Drücken von . + + 6. Die Eingabe von ":set xxx" setzt die Option "xxx". Einige Optionen sind: + 'ic' 'ignorecase' Ignoriere Groß/Kleinschreibung bei einer Suche + 'is' 'incsearch' Zeige Teilübereinstimmungen für einen Suchausdruck + 'hls' 'hlsearch' Hebe alle passenden Ausdrücke hervor + Der Optionsname kann in der Kurz- oder der Langform angegeben werden. + + 7. Stelle einer Option "no" voran, um sie abzuschalten: :set noic +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 7.1 : AUFRUFEN VON HILFE + + + ** Nutze das eingebaute Hilfesystem ** + + Vim besitzt ein umfassendes eingebautes Hilfesystem. Für den Anfang probiere + eins der drei folgenden Dinge aus: + - Drücke die - Taste (falls Du eine besitzt) + - Drücke die Taste (falls Du eine besitzt) + - Tippe :help + + Lies den Text im Hilfefenster, um zu verstehen wie die Hilfe funktioniert. + Tippe CTRL-W CTRL-W , um von einem Fenster zum anderen zu springen. + Tippe :q , um das Hilfefenster zu schließen. + + Du kannst Hilfe zu praktisch jedem Thema finden, indem Du dem ":help"- + Kommando ein Argument gibst. Probiere folgendes ( nicht vergessen): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 7.2: ERSTELLE EIN START-SKRIPT + + + ** Aktiviere die eingebauten Funktionalitäten von Vim ** + + Vim besitzt viele Funktionalitäten, die über Vi hinausgehen, aber die meisten + von ihnen sind standardmäßig deaktiviert. Um mehr Funktionalitäten zu nutzen, + musst Du eine "vimrc" - Datei erstellen. + + 1. Starte das Editieren der "vimrc"-Datei, abhängig von Deinem System: + :e ~/.vimrc für Unix + :e $VIM/_vimrc für MS-Windows + + 2. Nun lies den Inhalt der Beispiel-"vimrc"-Datei ein: + :r $VIMRUNTIME/vimrc_example.vim + + 3. Speichere die Datei mit: + :w + + Beim nächsten Start von Vim wird die Syntaxhervorhebung aktiviert sein. + Du kannst all Deine bevorzugten Optionen zu dieser "vimrc"-Datei zufügen. + Für mehr Informationen tippe :help vimrc-intro +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 7.3: VERVOLLSTÄNDIGEN + + + ** Kommandozeilenvervollständigung mit CTRL-D and ** + + 1. Stelle sicher, daß Vim nicht im vi-Kompatibilitätsmodus ist: :set nocp + + 2. Siehe nach, welche Dateien im Verzeichnis existieren: :!ls oder :dir + + 3. Tippe den Beginn eines Komandos: :e + + 4. Drücke CTRL-D und Vim zeigt eine Liste mit "e" beginnender Kommandos. + + 5. Drücke und Vim vervollständigt den Kommandonamen zu ":edit". + + 6. Nun füge ein Leerzeichen und den Beginn einer existierenden Datei an: + :edit DAT + + 7. Drücke . Vim vervollständigt den Namen (falls er eindeutig ist). + +Bemerkung: Vervollständigung funktioniert für viele Kommandos. Versuche + einfach CTRL-D und . Dies ist insbesondere nützlich für :help . +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZUSAMMENFASSUNG VON LEKTION 7 + + + 1. Tippe :help oder drücke oder , um ein Hilfefenster zu öffnen. + + 2. Tippe :help Kommando , um Hilfe über Kommando zu erhalten. + + 3. Tippe CTRL-W CTRL-W , um zum anderen Fenster zu springen. + + 4. Tippe :q , um das Hilfefenster zu schließen. + + 5. Erstelle ein vimrc - Startskript zur Sicherung bevorzugter Einstellungen. + + 6. Drücke CTRL-D nach dem Tippen eines Kommandos : , um mögliche + Vervollständigungen zu sehen. + Drücke für eine einzige Vervollständigung. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Damit ist der Vim Tutor beendet. Die Intention war, einen kurzen und + bündigen Überblick über den Vim Editor zu liefern; gerade genug, um relativ + leicht mit ihm umgehen zu können. Der Vim Tutor hat nicht den geringsten + Anspruch auf Vollständigkeit; Vim hat noch weitaus mehr Kommandos. Lies als + nächstes das User Manual: ":help user-manual". + + Für weiteres Lesen und Lernen ist folgendes Buch empfohlen : + Vim - Vi Improved - von Steve Oualline + Verlag: New Riders + Das erste Buch, welches durchgängig Vim gewidmet ist. Besonders nützlich + für Anfänger. Viele Beispiele und Bilder sind enthalten. + Siehe http://iccf-holland.org/click5.html + + Folgendes Buch ist älter und mehr über Vi als Vim, aber auch empfehlenswert: + Textbearbeitung mit dem vi-Editor - von Linda Lamb und Arnold Robbins + Verlag O'Reilly - ISBN: 3897211262 + In diesem Buch kann man fast alles finden, was man mit Vi tun möchte. + Die sechste Ausgabe enthält auch Informationen über Vim. + + Als aktuelle Referenz für Version 6.2 und knappe Einführung dient das + folgende Buch: + vim ge-packt von Reinhard Wobst + mitp-Verlag, ISBN 3-8266-1425-9 + Trotz der kompakten Darstellung ist es durch viele nützliche Beispiele auch + für Einsteiger empfehlenswert. Probekapitel und die Beispielskripte sind + online erhältlich. Siehe http://iccf-holland.org/click5.html + + Dieses Tutorial wurde geschrieben von Michael C. Pierce and Robert K. Ware, + Colorado School of Mines. Es benutzt Ideen, die Charles Smith, Colorado State + University, zur Verfügung stellte. E-mail: bware@mines.colorado.edu. + + Bearbeitet für Vim von Bram Moolenaar. + Deutsche Übersetzung von Joachim Hofmann 2007. E-mail: Joachim.Hof@gmx.de + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.de.utf-8 b/vim/bundle/ubuntu-vim72/tutor/tutor.de.utf-8 new file mode 100644 index 0000000..7b39abe --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.de.utf-8 @@ -0,0 +1,980 @@ +=============================================================================== += W i l l k o m m e n im V I M T u t o r - Version 1.7D = +=============================================================================== + + Vim ist ein sehr mächtiger Editor, der viele Befehle bereitstellt; zu viele, + um alle in einem Tutor wie diesem zu erklären. Dieser Tutor ist so + gestaltet, um genug Befehle vorzustellen, dass Du die Fähigkeit erlangst, + Vim mit Leichtigkeit als einen Allzweck-Editor zu benutzen. + Die Zeit für das Durcharbeiten dieses Tutors beträgt ca. 25-30 Minuten, + abhängig davon, wie viel Zeit Du mit Experimentieren verbringst. + + ACHTUNG: + Die in den Lektionen angewendeten Kommandos werden den Text modifizieren. + Erstelle eine Kopie dieser Datei, in der Du üben willst (falls Du "vimtutor" + aufgerufen hast, ist dies bereits eine Kopie). + + Es ist wichtig, sich zu vergegenwärtigen, dass dieser Tutor für das Anwenden + konzipiert ist. Das bedeutet, dass Du die Befehle ausführen musst, um sie + richtig zu lernen. Wenn Du nur den Text liest, vergisst Du die Befehle! + + Jetzt stelle sicher, dass Deine Umstelltaste NICHT gedrückt ist und betätige + die j Taste genügend Male, um den Cursor nach unten zu bewegen, so dass + Lektion 1.1 den Bildschirm vollkommen ausfüllt. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 1.1: BEWEGEN DES CURSORS + + ** Um den Cursor zu bewegen, drücke die h,j,k,l Tasten wie unten gezeigt. ** + ^ Hilfestellung: + k Die h Taste befindet sich links und bewegt nach links. + < h l > Die l Taste liegt rechts und bewegt nach rechts. + j Die j Taste ähnelt einem Pfeil nach unten. + v + 1. Bewege den Cursor auf dem Bildschirm umher, bis Du Dich sicher fühlst. + + 2. Halte die Nach-Unten-Taste (j) gedrückt, bis sie sich wiederholt. + Jetzt weißt Du, wie Du Dich zur nächsten Lektion bewegen kannst. + + 3. Benutze die Nach-Unten-Taste, um Dich zu Lektion 1.2 zu bewegen. + +Bemerkung: Immer, wenn Du Dir unsicher bist über das, was Du getippt hast, + drücke , um Dich in den Normalmodus zu begeben. + Dann gib das gewünschte Kommando noch einmal ein. + +Bemerkung: Die Cursor-Tasten sollten ebenfalls funktionieren. Aber wenn Du + hjkl benutzt, wirst Du in der Lage sein, Dich sehr viel schneller + umherzubewegen, wenn Du Dich einmal daran gewöhnt hast. Wirklich! +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 1.2: VIM BEENDEN + + + !! ACHTUNG: Bevor Du einen der unten aufgeführten Schritte ausführst, lies + diese gesamte Lektion!! + + 1. Drücke die Taste (um sicherzustellen, dass Du im Normalmodus bist). + + 2. Tippe: :q! . + Dies beendet den Editor und VERWIRFT alle Änderungen, die Du gemacht hast. + + 3. Wenn Du die Eingabeaufforderung siehst, gib das Kommando ein, das Dich zu + diesem Tutor geführt hat. Dies wäre: vimtutor + + 4. Wenn Du Dir diese Schritte eingeprägt hast und Du Dich sicher fühlst, + führe Schritte 1 bis 3 aus, um den Editor zu verlassen und wieder + hineinzugelangen. + +Bemerkung: :q! verwirft alle Änderungen, die Du gemacht hast. In + einigen Lektionen lernst Du , die Änderungen in einer Datei zu speichern. + + 5. Bewege den Cursor abwärts zu Lektion 1.3. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 1.3: TEXT EDITIEREN - LÖSCHEN + + + ** Drücke x um das Zeichen unter dem Cursor zu löschen. ** + + 1. Bewege den Cursor zu der mit ---> markierten Zeile unten. + + 2. Um die Fehler zu beheben, bewege den Cursor, bis er auf dem Zeichen steht, + das gelöscht werden soll. + + 3. Drücke die x Taste, um das überflüssige Zeichen zu löschen. + + 4. Wiederhole die Schritte 2 bis 4, bis der Satz korrekt ist. + +---> Die Kkuh sprangg übber deen Moond. + + 5. Wenn nun die Zeile korrekt ist, gehe weiter zur Lektion 1.4. + +Anmerkung: Während Du durch diesen Tutor gehst, versuche nicht, auswendig zu + lernen, lerne vielmehr durch Anwenden. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 1.4: TEXT EDITIEREN - EINFÜGEN + + + ** Drücke i , um Text einzufügen. ** + + 1. Bewege den Cursor zur ersten unten stehenden mit ---> markierten Zeile. + + 2. Um die erste Zeile mit der zweiten gleichzumachen, bewege den Cursor auf + das erste Zeichen NACH der Stelle, wo der Text eingefügt werden soll. + + 3. Drücke i und gib die notwendigen Ergänzungen ein. + + 4. Wenn jeweils ein Fehler beseitigt ist, drücke , um zum Normalmodus + zurückzukehren. + Wiederhole die Schritte 2 bis 4, um den Satz zu korrigieren. + +---> In dieser ft etwas . +---> In dieser Zeile fehlt etwas Text. + + 5. Wenn Du Dich mit dem Einfügen von Text sicher fühlst, gehe zu Lektion 1.5. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 1.5: TEXT EDITIEREN - ANFÜGEN + + + ** Drücke A , um Text anzufügen. ** + + 1. Bewege den Cursor zur ersten unten stehenden mit ---> markierten Zeile. + Es ist gleichgültig, auf welchem Zeichen der Zeile der Cursor steht. + + 2. Drücke A und gib die nötigen Ergänzungen ein. + + 3. Wenn das Anfügen abgeschlossen ist, drücke , um in den Normalmodus + zurückzukehren. + + 4. Bewege den Cursor zur zweiten mit ---> markierten Zeile und wiederhole + die Schritte 2 und 3, um den Satz zu korrigieren. + +---> In dieser Zeile feh + In dieser Zeile fehlt etwas Text. +---> Auch hier steh + Auch hier steht etwas Unvollständiges. + + 5. Wenn Du dich mit dem Anfügen von Text sicher fühlst, gehe zu Lektion 1.6. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 1.6: EINE DATEI EDITIEREN + + + ** Benutze :wq , um eine Datei zu speichern und Vim zu verlassen. ** + + !! ACHTUNG: Bevor Du einen der unten aufgeführten Schritte ausführst, lies + diese gesamte Lektion!! + + 1. Verlasse den Editor so wie in Lektion 1.2: :q! + + 2. Gib dieses Kommando in die Eingabeaufforderung ein: vim tutor + 'vim' ist der Aufruf des Editors, 'tutor' ist die zu editierende Datei. + Benutze eine Datei, die geändert werden kann. + + 3. Füge Text ein oder lösche ihn, wie Du in den vorigen Lektionen gelernt + hast. + + 4. Speichere die geänderte Datei und verlasse Vim mit: :wq + + 5. Starte den vimtutor neu und bewege Dich zu der folgenden Zusammenfassung. + + 6. Nachdem Du obige Schritte gelesen und verstanden hast, führe sie durch. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZUSAMMENFASSUNG VON LEKTION 1 + + + 1. Der Cursor wird mit den Pfeiltasten oder den Tasten hjkl bewegt. + h (links) j (unten) k (aufwärts) l (rechts) + + 2. Um Vim von der Eingabeaufforderung auszuführen, tippe: vim DATEI + + 3. Um Vim zu verlassen und alle Änderungen zu verwerfen, tippe: + :q! . + ODER tippe: :wq , um die Änderungen zu speichern. + + 4. Um das Zeichen unter dem Cursor zu löschen, tippe: x + + 5. Um Text einzufügen oder anzufügen, tippe: + i Einzufügenden Text eingeben Einfügen vor dem Cursor + A Anzufügenden Text eingeben Anfügen nach dem Zeilendene + +Bemerkung: Drücken von bringt Dich in den Normalmodus oder bricht ein + ungewolltes, erst teilweise eingegebenes Kommando ab. + + Nun fahre mit Lektion 2 fort. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.1: LÖSCHKOMMANDOS + + + ** Tippe dw , um ein Wort zu löschen. ** + + 1. Drücke um sicherzustellen, dass Du im Normalmodus bist. + + 2. Bewege den Cursor zu der mit ---> markierten Zeile unten. + + 3. Bewege den Cursor zum Anfang eines Wortes, das gelöscht werden soll. + + 4. Tippe dw , um das Wort zu entfernen. + + Bemerkung: Der Buchstabe d erscheint auf der letzten Zeile des Bildschirms, + wenn Du ihn eingibst. Vim wartet darauf, daß Du w eingibst. Wenn Du + ein anderes Zeichen als d siehst, hast Du etwas falsches getippt; + drücke und beginne neu. + +---> Einige Wörter lustig gehören nicht Papier in diesen Satz. + + 5. Wiederhole die Schritte 3 und 4, bis der Satz korrekt ist und gehe + danach zur Lektion 2.2. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.2: WEITERE LÖSCHKOMMANDOS + + + ** Tippe d$ , um bis zum Ende der Zeile zu löschen. ** + + 1. Drücke , um sicherzustellen, dass Du im Normalmodus bist. + + 2. Bewege den Cursor zu der mit ---> markierten Zeile unten. + + 3. Bewege den Cursor zum Ende der korrekten Zeile (NACH dem ersten . ). + + 4. Tippe d$ , um bis zum Ende der Zeile zu löschen. + +---> Jemand hat das Ende der Zeile doppelt eingegeben. doppelt eingegeben. + + + 5. Gehe weiter zur Lektion 2.3 , um zu verstehen, was hierbei passiert. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.3: ÜBER OPERATOREN UND BEWEGUNGSZÜGE + + + Viele Kommandos, die Text ändern, setzen sich aus einem Operator und einer + Bewegung zusammen. Das Format für ein Löschkommando mit dem Löschoperator d + lautet wie folgt: + + d Bewegung + + wobei: + d - der Löschoperator + Bewegung - worauf der Löschoperator angewandt wird (unten aufgelistet). + + Eine kleine Auflistung von Bewegungen: + w - bis zum Beginn des nächsten Wortes OHNE dessen erstes Zeichen. + e - zum Ende des aktuellen Wortes MIT dessen letztem Zeichen. + $ - zum Ende der Zeile MIT dem letzen Zeichen. + + Dementsprechend löscht die Eingabe von de vom Cursor an bis zum Wortende. + +Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den + Cursor entsprechend. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.4: ANWENDUNG EINES ZÄHLERS FÜR EINEN BEWEGUNGSSCHRITT + + + ** Die Eingabe einer Zahl vor einem Bewegungsschritt wiederholt diesen. ** + + 1. Bewege den Cursor zum Beginn der mit ---> markierten Zeile unten. + + 2. Tippe 2w , um den Cursor zwei Wörter vorwärts zu bewegen. + + 3. Tippe 3e , um den Cursor zum Ende des dritten Wortes zu bewegen. + + 4. Tippe 0 (Null) , um zum Anfang der Zeile zu gelangen. + + 5. Wiederhole Schritte 2 und 3 mit verschiedenen Zählern. + + ---> Dies ist nur eine Zeile aus Wörten um sich darin herumzubewegen. + + 6. Gehe weiter zu Lektion 2.5. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.5: ANWENDUNG EINES ZÄHLERS FÜR MEHRERE LÖSCHVORGÄNGE + + + ** Die Eingabe einer Zahl mit einem Operator wiederholt diesen mehrfach. ** + + Für die Kombination des Löschoperators und einem Bewegungsschritt (siehe + oben) stellt man dem Bewegungsschritt einen Zähler voran, um mehr zu löschen: + d Nummer Bewegungsschritt + + 1. Bewege den Cursor zum ersten Wort in GROSSBUCHSTABEN in der mit ---> + markieren Zeile. + + 2. Tippe d2w , um die zwei Wörter in GROSSBUCHSTABEN zu löschen. + + 3. Wiederhole Schritte 1 und 2 mit einem anderen Zähler, um die + darauffolgenden Wörter in GROSSBUCHSTABEN mit einem einzigen Kommando + zu löschen. + +---> Diese ABC DE Zeile FGHI JK LMN OP mit Wörtern ist Q RS TUV bereinigt. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.6: ARBEITEN AUF ZEILEN + + + ** Tippe dd , um eine ganze Zeile zu löschen. ** + + Wegen der Häufigkeit, dass man ganze Zeilen löscht, kamen die Entwickler von + Vi darauf, dass es leichter wäre, einfach zwei d's einzugeben, um eine Zeile + zu löschen. + + 1. Bewege den Cursor zur zweiten Zeile in der unten stehenden Redewendung. + 2. Tippe dd , um die Zeile zu löschen. + 3. Nun bewege Dich zur vierten Zeile. + 4. Tippe 2dd , um zwei Zeilen zu löschen. + +---> 1) Rosen sind rot, +---> 2) Matsch ist lustig, +---> 3) Veilchen sind blau, +---> 4) Ich habe ein Auto, +---> 5) Die Uhr sagt die Zeit, +---> 6) Zucker ist süß, +---> 7) So wie Du auch. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.7: RÜCKGÄNGIG MACHEN (UNDO) + + + ** Tippe u , um die letzten Kommandos rückgängig zu machen ** + ** oder U um eine ganze Zeile wiederherzustellen. ** + + 1. Bewege den Cursor zu der mit ---> markierten Zeile unten + und setze ihn auf den ersten Fehler. + 2. Tippe x , um das erste unerwünschte Zeichen zu löschen. + 3. Nun tippe u um das soeben ausgeführte Kommando rückgängig zu machen. + 4. Jetzt behebe alle Fehler auf der Zeile mit Hilfe des x Kommandos. + 5. Nun tippe ein großes U , um die Zeile in ihren Ursprungszustand + wiederherzustellen. + 6. Nun tippe u einige Male, um das U und die vorhergehenden Kommandos + rückgängig zu machen. + 7. Nun tippe CTRL-R (halte CTRL gedrückt und drücke R) mehrere Male, um die + Kommandos wiederherzustellen (die Rückgängigmachungen rückgängig machen). + +---> Beehebe die Fehller diesser Zeile und sttelle sie mitt 'undo' wieder her. + + 8. Dies sind sehr nützliche Kommandos. + Nun gehe weiter zur Zusammenfassung von Lektion 2. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZUSAMMENFASSUNG VON LEKTION 2 + + + 1. Um vom Cursor bis zum nächsten Wort zu löschen, tippe: dw + 2. Um vom Cursor bis zum Ende einer Zeile zu löschen, tippe: d$ + 3. Um eine ganze Zeile zu löschen, tippe: dd + + 4. Um eine Bewegung zu wiederholen, stelle eine Nummer voran: 2w + 5. Das Format für ein Änderungskommando ist: + Operator [Anzahl] Bewegungsschritt + wobei: + Operator - gibt an, was getan werden soll, zum Beispiel d für delete + [Anzahl] - ein optionaler Zähler, um den Bewegungsschritt zu wiederholen + Bewegungsschritt - Bewegung über den zu ändernden Text, so wie + w (Wort), $ (zum Ende der Zeile), etc. + + 6. Um Dich zum Anfang der Zeile zu begeben, benutze die Null: 0 + + 7. Um vorherige Aktionen rückgängig zu machen, tippe: u (kleines u) + Um alle Änderungen auf einer Zeile rückgängig zu machen: U (großes U) + Um die Rückgängigmachungen rückgängig zu machen, tippe: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 3.1: ANFÜGEN (PUT) + + + ** Tippe p , um vorher gelöschten Text nach dem Cursor anzufügen. ** + + 1. Bewege den Cursor zur ersten unten stehenden mit ---> markierten Zeile. + + 2. Tippe dd , um die Zeile zu löschen und sie in eimem Vim-Register zu + speichern. + + 3. Bewege den Cursor zur Zeile c), ÜBER derjenigen, wo die gelöschte Zeile + platziert werden soll. + + 4. Tippe p , um die Zeile unterhalb des Cursors zu platzieren. + + 5. Wiederhole die Schritte 2 bis 4, um alle Zeilen in die richtige + Reihenfolge zu bringen. + +---> d) Kannst Du das auch? +---> b) Veilchen sind blau, +---> c) Intelligenz ist erlernbar, +---> a) Rosen sind rot, +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 3.2: ERSETZEN (REPLACE) + + + ** Tippe rx , um das Zeichen unter dem Cursor durch x zu ersetzen. ** + + 1. Bewege den Cursor zur ersten unten stehenden mit ---> markierten Zeile. + + 2. Bewege den Cursor, bis er sich auf dem ersten Fehler befindet. + + 3. Tippe r und anschließend das Zeichen, welches dort stehen sollte. + + 4. Wiederhole Schritte 2 und 3, bis die erste Zeile gleich der zweiten ist. + +---> Als diese Zeite eingegoben wurde, wurden einike falsche Tasten gelippt! +---> Als diese Zeile eingegeben wurde, wurden einige falsche Tasten getippt! + + 5. Nun fahre fort mit Lektion 3.2. + +Bemerkung: Erinnere Dich, dass Du durch Anwenden lernen solltest, nicht durch + Auswendiglernen. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 3.3: ÄNDERN (CHANGE) + + + ** Um eine Änderung bis zum Wortende durchzuführen, tippe ce . ** + + 1. Bewege den Cursor zur ersten unten stehenden mit ---> markierten Zeile. + + 2. Platziere den Cursor auf das s von Wstwr. + + 3. Tippe ce und die Wortkorrektur ein (in diesem Fall tippe örter ). + + 4. Drücke und bewege den Cursor zum nächsten zu ändernden Zeichen. + + 5. Wiederhole Schritte 3 und 4 bis der erste Satz gleich dem zweiten ist. + +---> Einige Wstwr dieser Zlaww lasdjlaf mit dem Ändern-Operator gaaauu werden. +---> Einige Wörter dieser Zeile sollen mit dem Ändern-Operator geändert werden. + +Bemerke, dass ce das Wort löscht und Dich in den Eingabemodus versetzt. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 3.4: MEHR ÄNDERUNGEN MITTELS c + + + ** Das change-Kommando arbeitet mit denselben Bewegungen wie delete. ** + + 1. Der change Operator arbeitet in gleicher Weise wie delete. Das Format ist: + + c [Anzahl] Bewegungsschritt + + 2. Die Bewegungsschritte sind die gleichen , so wie w (Wort) und $ + (Zeilenende). + + 3. Bewege Dich zur ersten unten stehenden mit ---> markierten Zeile. + + 4. Bewege den Cursor zum ersten Fehler. + + 5. Tippe c$ , gib den Rest der Zeile wie in der zweiten ein, drücke . + +---> Das Ende dieser Zeile soll an die zweite Zeile angeglichen werden. +---> Das Ende dieser Zeile soll mit dem c$ Kommando korrigiert werden. + +Bemerkung: Du kannst die Rücktaste benutzen, um Tippfehler zu korrigieren. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZUSAMMENFASSUNG VON LEKTION 3 + + + 1. Um einen vorher gelöschten Text anzufügen, tippe p . Dies fügt den + gelöschten Text NACH dem Cursor an (wenn eine ganze Zeile gelöscht wurde, + wird diese in die Zeile unter dem Cursor eingefügt). + + 2. Um das Zeichen unter dem Cursor zu ersetzen, tippe r und das an dieser + Stelle gewünschte Zeichen. + + 3. Der Änderungs- (change) Operator erlaubt, vom Cursor bis zum Ende des + Bewegungsschrittes zu ändern. Tippe ce , um eine Änderung vom Cursor bis + zum Ende des Wortes vorzunehmen; c$ bis zum Ende einer Zeile. + + 4. Das Format für change ist: + + c [Anzahl] Bewegungsschritt + + Nun fahre mit der nächsten Lektion fort. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 4.1: CURSORPOSITION UND DATEISTATUS + + ** Tippe CTRL-G , um Deine Dateiposition sowie den Dateistatus anzuzeigen. ** + ** Tippe G , um Dich zu einer Zeile in der Datei zu begeben. ** + +Bemerkung: Lies diese gesamte Lektion, bevor Du irgendeinen Schritt ausführst!! + + 1. Halte die Ctrl Taste unten und drücke g . Dies nennen wir wir CTRL-G. + Eine Statusmeldung am Fuß der Seite erscheint mit dem Dateinamen und der + Position innerhalb der Datei. Merke Dir die Zeilennummer für Schritt 3. + +Bemerkung: Möglicherweise siehst Du die Cursorposition in der unteren rechten + Bildschirmecke. Dies ist Folge der 'ruler' Option (siehe :help 'ruler') + + 2. Drücke G , um Dich zum Ende der Datei zu begeben. + Tippe gg , um Dich zum Anfang der Datei zu begeben. + + 3. Gib die Nummer der Zeile ein, auf der Du vorher warst, gefolgt von G . + Dies bringt Dich zurück zu der Zeile, auf der Du gestanden hast, als Du + das erste Mal CTRL-G gedrückt hast. + + 4. Wenn Du Dich sicher genug fühlst, führe die Schritte 1 bis 3 aus. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 4.2: DAS SUCHEN - KOMMANDO + + + ** Tippe / gefolgt von einem Ausdruck, um nach dem Ausdruck zu suchen. ** + + 1. Im Normalmodus, tippe das / Zeichen. Bemerke, dass das / und der + Cursor am Fuß des Schirms erscheinen, so wie beim : Kommando. + + 2. Nun tippe 'Fehhler' . Dies ist das Wort, nach dem Du suchen willst. + + 3. Um nach demselben Ausdruck weiterzusuchen, tippe einfach n (für next). + Um nach demselben Ausdruck in der Gegenrichtung zu suchen, tippe N . + + 4. Um nach einem Ausdruck rückwärts zu suchen , benutze ? statt / . + + 5. Um dahin zurückzukehren, von wo Du gekommen bist, drücke CTRL-O (Halte + Ctrl unten und drücke den Buchstaben o). Wiederhole dies, um weiter + zurückzugehen. CTRL-I bringt dich vorwärts. + +---> Fehler schreibt sich nicht "Fehhler"; Fehhler ist ein Fehler +Bemerkung: Wenn die Suche das Dateiende erreicht hat, wird sie am Anfang + fortgesetzt, es sei denn, die 'wrapscan' Option wurde abgeschaltet. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 4.3: PASSENDE KLAMMERN FINDEN + + + ** Tippe % , um eine korrespondierende Klammer ),], oder } zu finden. ** + + 1. Platziere den Cursor auf irgendeines der Zeichen (, [, oder { in der unten + stehenden Zeile, die mit ---> markiert ist. + + 2. Nun tippe das % Zeichen. + + 3. Der Cursor bewegt sich zur passenden gegenüberliegenden Klammer. + + 4. Tippe % , um den Cursor zur anderen passenden Klammer zu bewegen. + + 5. Setze den Cursor auf ein anderes (,),[,],{ oder } und probiere % aus. + +---> Dies ( ist eine Testzeile ( mit [ verschiedenen ] { Klammern } darin. )) + +Bemerkung: Diese Funktionalität ist sehr nützlich bei der Fehlersuche in einem + Programmtext, in dem passende Klammern fehlen! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 4.4: DAS ERSETZUNGSKOMMANDO (SUBSTITUTE) + + + ** Tippe :s/alt/neu/g , um 'alt' durch 'neu' zu ersetzen. ** + + 1. Bewege den Cursor zu der unten stehenden mit ---> markierten Zeile. + + 2. Tippe :s/diee/die . Bemerke, dass der Befehl nur das erste + Vorkommen von "diee" ersetzt. + + 3. Nun tippe :s/diee/die/g . Das Zufügen des Flags g bedeutet, eine + globale Ersetzung über die Zeile durchzuführen, was alle Vorkommen von + "diee" auf der Zeile ersetzt. + +---> diee schönste Zeit, um diee Blumen anzuschauen, ist diee Frühlingszeit. + + 4. Um alle Vorkommen einer Zeichenkette innerhalb zweier Zeilen zu ändern, + tippe :#,#s/alt/neu/g wobei #,# die Zeilennummern des Zeilenbereiches + sind, in dem die Ersetzung durchgeführt werden soll. + Tippe :%s/alt/neu/g um alle Vorkommen in der gesamten Datei zu ändern. + Tippe :%s/alt/neu/gc um alle Vorkommen in der gesamten Datei zu finden + mit einem Fragedialog, ob ersetzt werden soll oder nicht. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZUSAMMENFASSUNG VON LEKTION 4 + + 1. CTRL-G zeigt die aktuelle Dateiposition sowie den Dateistatus. + G bringt Dich zum Ende der Datei. + Nummer G bringt Dich zur entsprechenden Zeilennummer. + gg bringt Dich zur ersten Zeile. + + 2. Die Eingabe von / plus einem Ausdruck sucht VORWÄRTS nach dem Ausdruck. + Die Eingabe von ? plus einem Ausdruck sucht RÜCKWÄRTS nach dem Ausdruck. + Tippe nach einer Suche n , um das nächste Vorkommen in der gleichen + Richtung zu finden; oder N , um in der Gegenrichtung zu suchen. + CTRL-O bringt Dich zurück zu älteren Positionen, CTRL-I zu neueren. + + 3. Die Eingabe von % , wenn der Cursor sich auf (,),[,],{, oder } + befindet, bringt Dich zur Gegenklammer. + + 4. Um das erste Vorkommen von "alt" in einer Zeile durch "neu" zu ersetzen, + tippe :s/alt/neu + Um alle Vorkommen von "alt" in der Zeile ersetzen, tippe :s/alt/neu/g + Um Ausdrücke innerhalb zweier Zeilennummern zu ersetzen, :#,#s/alt/neu/g + Um alle Vorkommen in der ganzen Datei zu ersetzen, tippe :%s/alt/neu/g + Für eine jedmalige Bestätigung, addiere 'c' (confirm) :%s/alt/neu/gc +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 5.1: AUSFÜHREN EINES EXTERNEN KOMMANDOS + + + ** Gib :! , gefolgt von einem externen Kommando ein, um es auszuführen. ** + + 1. Tippe das vertraute Kommando : , um den Cursor auf den Fuß des Schirms + zu setzen. Dies erlaubt Dir, ein Kommandozeilen-Kommando einzugeben. + + 2. Nun tippe ein ! (Ausrufezeichen). Dies ermöglicht Dir, ein beliebiges, + externes Shellkommando auszuführen. + + 3. Als Beispiel tippe ls nach dem ! und drücke . Dies zeigt + eine Auflistung Deines Verzeichnisses; genauso, als wenn Du auf der + Eingabeaufforderung wärst. Oder verwende :!dir , falls ls nicht geht. + +Bemerkung: Mit dieser Methode kann jedes beliebige externe Kommando + ausgeführt werden, auch mit Argumenten. + +Bemerkung: Alle : Kommandos müssen durch Eingabe von + abgeschlossen werden. Von jetzt an erwähnen wir dies nicht jedesmal. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 5.2: MEHR ÜBER DAS SCHREIBEN VON DATEIEN + + +** Um am Text durchgeführte Änderungen zu speichern, tippe :w DATEINAME. ** + + 1. Tippe :!dir oder :!ls , um eine Auflistung Deines Verzeichnisses zu + erhalten. Du weißt nun bereits, dass Du danach eingeben musst. + + 2. Wähle einen Dateinamen, der noch nicht existiert, z.B. TEST. + + 3. Nun tippe: :w TEST (wobei TEST der gewählte Dateiname ist). + + 4. Dies speichert die ganze Datei (den Vim Tutor) unter dem Namen TEST. + Um dies zu überprüfen, tippe nochmals :!ls bzw. !dir, um Deinen + Verzeichnisinhalt zu sehen. + +Bemerkung: Würdest Du Vim jetzt beenden und danach wieder mit vim TEST + starten, dann wäre diese Datei eine exakte Kopie des Tutors zu dem + Zeitpunkt, als Du ihn gespeichert hast. + + 5. Nun entferne die Datei durch Eingabe von (MS-DOS): :!del TEST + oder (Unix): :!rm TEST +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 5.3: AUSWÄHLEN VON TEXT ZUM SCHREIBEN + +** Um einen Abschnitt der Datei zu speichern, tippe v Bewegung :w DATEI ** + + 1. Bewege den Cursor zu dieser Zeile. + + 2. Tippe v und bewege den Cursor zum fünften Auflistungspunkt unten. + Bemerke, daß der Text hervorgehoben wird. + + 3. Drücke das Zeichen : . Am Fuß des Schirms erscheint :'<,'> . + + 4. Tippe w TEST , wobei TEST ein noch nicht vorhandener Dateiname ist. + Vergewissere Dich, daß Du :'<,'>w TEST siehst, bevor Du Enter drückst. + + 5. Vim schreibt die ausgewählten Zeilen in die Datei TEST. Benutze :!dir + oder :!ls , um sie zu sehen. Lösche sie noch nicht! Wir werden sie in + der nächsten Lektion benutzen. + +Bemerkung: Drücken von v startet die Visuelle Auswahl. Du kannst den Cursor + umherbewegen, um die Auswahl größer oder kleiner zu machen. Anschließend + kann man einen Operator anwenden, um mit dem Text etwas zu tun. Zum + Beispiel löscht d den Text. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 5.4: EINLESEN UND ZUSAMMENFÜHREN VON DATEIEN + + + ** Um den Inhalt einer Datei einzulesen, tippe :r DATEINAME ** + + 1. Platziere den Cursor überhalb dieser Zeile. + +BEACHTE: Nachdem Du Schritt 2 ausgeführt hast, wirst Du Text aus Lektion 5.3 + sehen. Dann bewege Dich wieder ABWÄRTS, um diese Lektion wiederzusehen. + + 2. Nun lies Deine Datei TEST ein indem Du das Kommando :r TEST ausführst, + wobei TEST der von Dir verwendete Dateiname ist. + Die eingelesene Datei wird unterhalb der Cursorzeile eingefügt. + + 3. Um zu überprüfen, dass die Datei eingelesen wurde, gehe zurück und siehe, + dass es jetzt zwei Kopien von Lektion 5.3 gibt, das Original und die + eingefügte Dateiversion. + +Bemerkung: Du kannst auch die Ausgabe eines externen Kommandos einlesen. Zum + Beispiel liest :r !ls die Ausgabe des Kommandos ls ein und platziert + sie unterhalb des Cursors. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZUSAMMENFASSUNG VON LEKTION 5 + + + 1. :!Kommando führt ein externes Kommando aus. + + Einige nützliche Beispiele sind + (MS-DOS) (Unix) + :!dir :!ls - zeigt eine Verzeichnisauflistung. + :!del DATEINAME :!rm DATEINAME - entfernt Datei DATEINAME. + + 2. :w DATEINAME speichert die aktuelle Vim-Datei unter dem Namen DATEINAME. + + 3. v Bewegung :w DATEINAME schreibt die Visuell ausgewählten Zeilen in + die Datei DATEINAME. + + 4. :r DATEINAME lädt die Datei DATEINAME und fügt sie unterhalb der + Cursorposition ein. + + 5. :r !dir liest die Ausgabe des Kommandos dir und fügt sie unterhalb der + Cursorposition ein. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 6.1: ZEILEN ÖFFNEN (OPEN) + + + ** Tippe o , um eine Zeile unterhalb des Cursors zu öffnen und Dich in ** + ** den Einfügemodus zu begeben. ** + + 1. Bewege den Cursor zu der ersten mit ---> markierten Zeile unten. + + 2. Tippe o (klein geschrieben), um eine Zeile UNTERHALB des Cursos zu öffnen + und Dich in den Einfügemodus zu begeben. + + 3. Nun tippe etwas Text und drücke , um den Einfügemodus zu verlassen. + +---> Mit o wird der Cursor auf der offenen Zeile im Einfügemodus platziert. + + 4. Um eine Zeile ÜBERHALB des Cursos aufzumachen, gib einfach ein großes O + statt einem kleinen o ein. Versuche dies auf der unten stehenden Zeile. + +---> Öffne eine Zeile über dieser mit O , wenn der Cursor auf dieser Zeile ist. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 6.2: TEXT ANFÜGEN (APPEND) + + + ** Tippe a , um Text NACH dem Cursor einzufügen. ** + + 1. Bewege den Cursor zum Anfang der ersten Übungszeile mit ---> unten. + + 2. Drücke e , bis der Cursor am Ende von Zei steht. + + 3. Tippe ein kleines a , um Text NACH dem Cursor anzufügen. + + 4. Vervollständige das Wort so wie in der Zeile darunter. Drücke , + um den Einfügemodus zu verlassen. + + 5. Bewege Dich mit e zum nächsten unvollständigen Wort und wiederhole + Schritte 3 und 4. + +---> Diese Zei bietet Gelegen , Text in einer Zeile anzufü. +---> Diese Zeile bietet Gelegenheit, Text in einer Zeile anzufügen. + +Bemerkung: a, i und A gehen alle gleichermaßen in den Einfügemodus; der + einzige Unterschied ist, wo die Zeichen eingefügt werden. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 6.3: EINE ANDERE ART DES ERSETZENS (REPLACE) + + + ** Tippe ein großes R , um mehr als ein Zeichen zu ersetzen. ** + + 1. Bewege den Cursor zur ersten unten stehenden, mit ---> markierten Zeile. + Bewege den Cursor zum Anfang des ersten xxx . + + 2. Nun drücke R und tippe die Nummer, die darunter in der zweiten Zeile + steht, so das diese das xxx ersetzt. + + 3. Drücke , um den Ersetzungsmodus zu verlassen. Bemerke, daß der Rest + der Zeile unverändert bleibt. + + 4. Wiederhole die Schritte, um das verbliebene xxx zu ersetzen. + +---> Das Addieren von 123 zu xxx ergibt xxx. +---> Das Addieren von 123 zu 456 ergibt 579. + +Bemerkung: Der Ersetzungsmodus ist wie der Einfügemodus, aber jedes eingetippte + Zeichen löscht ein vorhandenes Zeichen. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 6.4: TEXT KOPIEREN UND EINFÜGEN + + ** Benutze den y Operator, um Text zu kopieren; p , um ihn einzufügen ** + + 1. Gehe zu der mit ---> markierten Zeile unten, setze den Cursor hinter "a)". + + 2. Starte den Visuellen Modus mit v , bewege den Cursor genau vor "erste". + + 3. Tippe y , um den hervorgehoben Text zu kopieren. + + 4. Bewege den Cursor zum Ende der nächsten Zeile: j$ + + 5. Tippe p , um den Text einzufügen und anschließend: a zweite . + + 6. Benutze den Visuellen Modus, um " Eintrag." auszuwählen, kopiere mittels + y , bewege Dich zum Ende der nächsten Zeile mit j$ und füge den Text + dort mit p an. + +---> a) dies ist der erste Eintrag. + b) + +Bemerkung: Du kannst y auch als Operator verwenden; yw kopiert ein Wort. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 6.5: OPTIONEN SETZEN + + ** Setze eine Option so, dass eine Suche oder eine Ersetzung Groß- ** + ** und Kleinschreibung ignoriert ** + + 1. Suche nach 'ignoriere', indem Du /ignoriere eingibst. + Wiederhole die Suche einige Male, indem Du die n - Taste drückst. + + 2. Setze die 'ic' (Ignore case) - Option, indem Du :set ic eingibst. + + 3. Nun suche wieder nach 'ignoriere', indem Du n tippst. + Bemerke, daß jetzt Ignoriere und auch IGNORIERE gefunden wird. + + 4. Setze die 'hlsearch' und 'incsearch' - Optionen: :set hls is + + 5. Wiederhole die Suche und beobachte, was passiert: /ignoriere + + 6. Um das Ignorieren von Groß/Kleinschreibung abzuschalten, tippe: :set noic + +Bemerkung: Um die Hervorhebung der Treffer zu enfernen, gib ein: :nohlsearch +Bemerkung: Um die Schreibweise für eine einzige Suche zu ignorieren, benutze + \c im Suchausdruck: /ignoriere\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZUSAMMENFASSUNG VON LEKTION 6 + + 1. Tippe o , um eine Zeile UNTER dem Cursor zu öffnen und den Einfügemodus + zu starten. + Tippe O , um eine Zeile ÜBER dem Cursor zu öffnen. + + 2. Tippe a , um Text NACH dem Cursor anzufügen. + Tippe A , um Text nach dem Zeilenende anzufügen. + + 3. Das Kommando e bringt Dich zum Ende eines Wortes. + + 4. Der Operator y (yank) kopiert Text, p (put) fügt ihn ein. + + 5. Ein großes R geht in den Ersetzungsmodus bis zum Drücken von . + + 6. Die Eingabe von ":set xxx" setzt die Option "xxx". Einige Optionen sind: + 'ic' 'ignorecase' Ignoriere Groß/Kleinschreibung bei einer Suche + 'is' 'incsearch' Zeige Teilübereinstimmungen für einen Suchausdruck + 'hls' 'hlsearch' Hebe alle passenden Ausdrücke hervor + Der Optionsname kann in der Kurz- oder der Langform angegeben werden. + + 7. Stelle einer Option "no" voran, um sie abzuschalten: :set noic +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 7.1 : AUFRUFEN VON HILFE + + + ** Nutze das eingebaute Hilfesystem ** + + Vim besitzt ein umfassendes eingebautes Hilfesystem. Für den Anfang probiere + eins der drei folgenden Dinge aus: + - Drücke die - Taste (falls Du eine besitzt) + - Drücke die Taste (falls Du eine besitzt) + - Tippe :help + + Lies den Text im Hilfefenster, um zu verstehen wie die Hilfe funktioniert. + Tippe CTRL-W CTRL-W , um von einem Fenster zum anderen zu springen. + Tippe :q , um das Hilfefenster zu schließen. + + Du kannst Hilfe zu praktisch jedem Thema finden, indem Du dem ":help"- + Kommando ein Argument gibst. Probiere folgendes ( nicht vergessen): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 7.2: ERSTELLE EIN START-SKRIPT + + + ** Aktiviere die eingebauten Funktionalitäten von Vim ** + + Vim besitzt viele Funktionalitäten, die über Vi hinausgehen, aber die meisten + von ihnen sind standardmäßig deaktiviert. Um mehr Funktionalitäten zu nutzen, + musst Du eine "vimrc" - Datei erstellen. + + 1. Starte das Editieren der "vimrc"-Datei, abhängig von Deinem System: + :e ~/.vimrc für Unix + :e $VIM/_vimrc für MS-Windows + + 2. Nun lies den Inhalt der Beispiel-"vimrc"-Datei ein: + :r $VIMRUNTIME/vimrc_example.vim + + 3. Speichere die Datei mit: + :w + + Beim nächsten Start von Vim wird die Syntaxhervorhebung aktiviert sein. + Du kannst all Deine bevorzugten Optionen zu dieser "vimrc"-Datei zufügen. + Für mehr Informationen tippe :help vimrc-intro +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 7.3: VERVOLLSTÄNDIGEN + + + ** Kommandozeilenvervollständigung mit CTRL-D and ** + + 1. Stelle sicher, daß Vim nicht im vi-Kompatibilitätsmodus ist: :set nocp + + 2. Siehe nach, welche Dateien im Verzeichnis existieren: :!ls oder :dir + + 3. Tippe den Beginn eines Komandos: :e + + 4. Drücke CTRL-D und Vim zeigt eine Liste mit "e" beginnender Kommandos. + + 5. Drücke und Vim vervollständigt den Kommandonamen zu ":edit". + + 6. Nun füge ein Leerzeichen und den Beginn einer existierenden Datei an: + :edit DAT + + 7. Drücke . Vim vervollständigt den Namen (falls er eindeutig ist). + +Bemerkung: Vervollständigung funktioniert für viele Kommandos. Versuche + einfach CTRL-D und . Dies ist insbesondere nützlich für :help . +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZUSAMMENFASSUNG VON LEKTION 7 + + + 1. Tippe :help oder drücke oder , um ein Hilfefenster zu öffnen. + + 2. Tippe :help Kommando , um Hilfe über Kommando zu erhalten. + + 3. Tippe CTRL-W CTRL-W , um zum anderen Fenster zu springen. + + 4. Tippe :q , um das Hilfefenster zu schließen. + + 5. Erstelle ein vimrc - Startskript zur Sicherung bevorzugter Einstellungen. + + 6. Drücke CTRL-D nach dem Tippen eines Kommandos : , um mögliche + Vervollständigungen zu sehen. + Drücke für eine einzige Vervollständigung. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Damit ist der Vim Tutor beendet. Die Intention war, einen kurzen und + bündigen Überblick über den Vim Editor zu liefern; gerade genug, um relativ + leicht mit ihm umgehen zu können. Der Vim Tutor hat nicht den geringsten + Anspruch auf Vollständigkeit; Vim hat noch weitaus mehr Kommandos. Lies als + nächstes das User Manual: ":help user-manual". + + Für weiteres Lesen und Lernen ist folgendes Buch empfohlen : + Vim - Vi Improved - von Steve Oualline + Verlag: New Riders + Das erste Buch, welches durchgängig Vim gewidmet ist. Besonders nützlich + für Anfänger. Viele Beispiele und Bilder sind enthalten. + Siehe http://iccf-holland.org/click5.html + + Folgendes Buch ist älter und mehr über Vi als Vim, aber auch empfehlenswert: + Textbearbeitung mit dem vi-Editor - von Linda Lamb und Arnold Robbins + Verlag O'Reilly - ISBN: 3897211262 + In diesem Buch kann man fast alles finden, was man mit Vi tun möchte. + Die sechste Ausgabe enthält auch Informationen über Vim. + + Als aktuelle Referenz für Version 6.2 und knappe Einführung dient das + folgende Buch: + vim ge-packt von Reinhard Wobst + mitp-Verlag, ISBN 3-8266-1425-9 + Trotz der kompakten Darstellung ist es durch viele nützliche Beispiele auch + für Einsteiger empfehlenswert. Probekapitel und die Beispielskripte sind + online erhältlich. Siehe http://iccf-holland.org/click5.html + + Dieses Tutorial wurde geschrieben von Michael C. Pierce and Robert K. Ware, + Colorado School of Mines. Es benutzt Ideen, die Charles Smith, Colorado State + University, zur Verfügung stellte. E-mail: bware@mines.colorado.edu. + + Bearbeitet für Vim von Bram Moolenaar. + Deutsche Übersetzung von Joachim Hofmann 2007. E-mail: Joachim.Hof@gmx.de + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.el b/vim/bundle/ubuntu-vim72/tutor/tutor.el new file mode 100644 index 0000000..d402bc8 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.el @@ -0,0 +1,815 @@ +=============================================================================== += Ê áë ù ó Þ ñ è á ô å ó ô ï V I M T u t o r - ¸êäïóç 1.5 = +=============================================================================== + + Ï Vim åßíáé Ýíáò ðáíßó÷õñïò óõíôÜêôçò ðïõ Ý÷åé ðïëëÝò åíôïëÝò, ðÜñá + ðïëëÝò ãéá íá åîçãÞóïõìå óå ìßá ðåñéÞãçóç üðùò áõôÞ. ÁõôÞ ç ðåñéÞãçóç + ó÷åäéÜóôçêå ãéá íá ðåñéãñÜøåé éêáíïðïéçôéêÜ ôéò åíôïëÝò ðïõ èá óáò + êÜíïõí íá ÷ñçóéìïðïéåßôå åýêïëá ôïí Vim óáí Ýíáí ãåíéêÞò ÷ñÞóçò óõíôÜêôç. + + Ï êáôÜ ðñïóÝããéóç ÷ñüíïò ðïõ áðáéôåßôáé ãéá íá ïëïêëçñþóåôå ôçí ðåñéÞãçóç + åßíáé 25-30 ëåðôÜ, åîáñôþíôáò áðü ôï ðüóï ÷ñüíï èá îïäÝøåôå ãéá + ðåéñáìáôéóìïýò. + + Ïé åíôïëÝò óôá ìáèÞìáôá èá ôñïðïðïéÞóïõí ôï êåßìåíï. ÄçìéïõñãÞóôå Ýíá + áíôßãñáöï áõôïý ôïõ áñ÷åßïõ ãéá íá åîáóêçèåßôå (áí îåêéíÞóáôå ôï + "Vimtutor" áõôü åßíáé Þäç Ýíá áíôßãñáöï). + + Åßíáé óçìáíôéêü íá èõìÜóôå üôé áõôÞ ç ðåñéÞãçóç åßíáé ïñãáíùìÝíç Ýôóé + þóôå íá äéäÜóêåé ìÝóù ôçò ÷ñÞóçò. Áõôü óçìáßíåé üôé ÷ñåéÜæåôáé íá + åêôåëåßôå ôéò åíôïëÝò ãéá íá ôéò ìÜèåôå óùóôÜ. Áí äéáâÜæåôå ìüíï ôï + êåßìåíï, èá ôéò îå÷Üóåôå! + + Ôþñá, âåâáéùèåßôå üôé ôï ðëÞêôñï Shift-Lock ÄÅÍ åßíáé ðáôçìÝíï êáé + ðáôÞóôå ôï ðëÞêôñï j áñêåôÝò öïñÝò ãéá íá ìåôáêéíÞóåôå ôïí äñïìÝá Ýôóé + þóôå ôï ÌÜèçìá 1.1 íá ãåìßóåé ðëÞñùò ôçí ïèüíç. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 1.1: ÌÅÔÁÊÉÍÏÍÔÁÓ ÔÏÍ ÄÑÏÌÅÁ + + ** Ãéá íá êéíÞóåôå ôïí äñïìÝá, ðáôÞóôå ôá ðëÞêôñá h,j,k,l üðùò äåß÷íåôáé. ** + ^ + k Hint: Ôï ðëÞêôñï h åßíáé áñéóôåñÜ êáé êéíåß óô' áñéóôåñÜ. + < h l > Ôï ðëÞêôñï l åßíáé äåîéÜ êáé êéíåß óôá äåîéÜ. + j Ôï ðëÞêôñï j ìïéÜæåé ìå âåëÜêé ðñïò ôá êÜôù. + v + + 1. Ìåôáêéíåßóôå ôïí äñïìÝá ôñéãýñù óôçí ïèüíç ìÝ÷ñé íá íïéþèåôå Üíåôá. + + 2. ÊñáôÞóôå ðáôçìÝíï ôï êÜôù ðëÞêôñï (j) ìÝ÷ñé íá åðáíáëçöèåß. +---> Ôþñá îÝñåôå ðþò íá ìåôáêéíçèåßôå óôï åðüìåíï ìÜèçìá. + + 3. ×ñçóéìïðïéþíôáò ôï êÜôù ðëÞêôñï, ìåôáêéíçèåßôå óôï ÌÜèçìá 1.2. + +Óçìåßùóç: Áí áìöéâÜëëåôå ãéá êÜôé ðïõ ðáôÞóáôå, ðáôÞóôå ãéá íá âñåèåßôå + óôçí ÊáíïíéêÞ ÊáôÜóôáóç. ÌåôÜ ðáôÞóôå îáíÜ ôçí åíôïëÞ ðïõ èÝëáôå. + +Óçìåßùóç: Ôá ðëÞêôñá ôïõ äñïìÝá èá ðñÝðåé åðßóçò íá äïõëåýïõí. ÁëëÜ ìå ôá hjkl + èá ìðïñåßôå íá êéíçèåßôå ðïëý ãñçãïñüôåñá, ìüëéò ôá óõíçèßóåôå. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 1.2: ÌÐÁÉÍÏÍÔÁÓ ÊÁÉ ÂÃÁÉÍÏÍÔÁÓ ÓÔÏÍ VIM + + !! ÓÇÌÅÉÙÓÇ: Ðñéí åêôåëÝóåôå êÜðïéï áðü ôá âÞìáôá, äéáâÜóôå üëï ôï ìÜèçìá!! + + 1. ÐáôÞóôå ôï ðëÞêôñï (ãéá íá åßóôå óßãïõñá óôçí ÊáíïíéêÞ ÊáôÜóôáóç). + + 2. ÐëçêôñïëïãÞóôå: :q! . + +---> Áõôü åîÝñ÷åôáé áðü ôïí óõíôÜêôç ×ÙÑÉÓ íá óþóåé üðïéåò áëëáãÝò Ý÷åôå êÜíåé. + Áí èÝëåôå íá óþóåôå ôéò áëëáãÝò êáé íá åîÝñèåôå ðëçêôñïëïãÞóôå: + :wq + + 3. ¼ôáí äåßôå ôçí ðñïôñïðÞ ôïõ öëïéïý, ðëçêôñïëïãÞóôå ôçí åíôïëÞ ìå ôçí ïðïßá + ìðÞêáôå óå áõôÞí ôçí ðåñéÞãçóç. Ìðïñåß íá åßíáé: vimtutor + ÊáíïíéêÜ èá ÷ñçóéìïðïéïýóáôå: vim tutor + +---> 'vim' óçìáßíåé åéóáãùãÞ óôïí óõíôÜêôç vim, 'tutor' åßíáé ôï áñ÷åßï ðïõ + èÝëïõìå íá äéïñèþóïõìå. + + 4. Áí Ý÷åôå áðïìíçìïíåýóåé áõôÜ ôá âÞìáôá êáé Ý÷åôå áõôïðåðïßèçóç, åêôåëÝóôå + ôá âÞìáôá 1 Ýùò 3 ãéá íá âãåßôå êáé íá ìðåßôå îáíÜ óôïí óõíôÜêôç. ÌåôÜ + ìåôáêéíÞóôå ôïí äñïìÝá êÜôù óôï ÌÜèçìá 1.3. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 1.3: ÄÉÏÑÈÙÓÇ ÊÅÉÌÅÍÏÕ - ÄÉÁÃÑÁÖÇ + + ** ¼óï åßóôå óôçí ÊáíïíéêÞ ÊáôÜóôáóç ðáôÞóôå x ãéá íá äéáãñÜøåôå ôïí + ÷áñáêôÞñá êÜôù áðü ôïí äñïìÝá. ** + + 1. Ìåôáêéíåßóôå ôïí äñïìÝá óôçí ðáñáêÜôù ãñáììÞ óçìåéùìÝíç ìå --->. + + 2. Ãéá íá äéïñèþóåôå ôá ëÜèç, êéíåßóôå ôïí äñïìÝá ìÝ÷ñé íá åßíáé ðÜíù áðü + ôïí ÷áñáêôÞñá ðïõ èá äéáãñáöåß. + + 3. ÐáôÞóôå ôï ðëÞêôñï x ãéá íá äéáãñÜøåôå ôïí áíåðéèýìçôï ÷áñáêôÞñá. + + 4. ÅðáíáëÜâåôå ôá âÞìáôá 2 ìÝ÷ñé 4 ìÝ÷ñé ç ðñüôáóç íá åßíáé óùóôÞ. + +---> The ccow jumpedd ovverr thhe mooon. + + 5. Ôþñá ðïõ ç ãñáììÞ åßíáé óùóôÞ, ðçãáßíôå óôï ÌÜèçìá 1.4. + +ÓÇÌÅÉÙÓÇ: Êáèþò äéáôñÝ÷åôå áõôÞí ôçí ðåñéÞãçóç, ðñïóðáèÞóôå íá ìçí + áðïìíçìïíåýåôå, ìáèáßíåôå ìå ôç ÷ñÞóç. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 1.4: ÄÉÏÑÈÙÓÇ ÊÅÉÌÅÍÏÕ - ÐÁÑÅÌÂÏËÇ + + ** ¼óï åßóôå óå ÊáíïíéêÞ ÊáôÜóôáóç ðáôÞóôå i ãéá íá ðáñåìâÜëëåôå êåßìåíï. ** + + 1. Ìåôáêéíåßóôå ôïí äñïìÝá ìÝ÷ñé ôçí ðñþôç ãñáììÞ ðáñáêÜôù óçìåéùìÝíç ìå --->. + + 2. Ãéá íá êÜíåôå ôçí ðñþôç ãñáììÞ ßäéá ìå ôçí äåýôåñç, ìåôáêéíåßóôå ôïí + äñïìÝá ðÜíù óôïí ðñþôï ÷áñáêôÞñá ÌÅÔÁ áðü üðïõ èá ðáñåìâëçèåß ôï êåßìåíï. + + 3. ÐáôÞóôå ôï i êáé ðëçêôñïëïãÞóôå ôéò áðáñáßôçôåò ðñïóèÞêåò. + + 4. Êáèþò äéïñèþíåôå êÜèå ëÜèïò ðáôÞóôå ãéá íá åðéóôñÝøåôå óôçí + ÊáíïíéêÞ ÊáôÜóôáóç. ÅðáíáëÜâåôå ôá âÞìáôá 2 ìÝ÷ñé 4 ãéá íá äéïñèþóåôå + ôçí ðñüôáóç. + +---> There is text misng this . +---> There is some text missing from this line. + + 5. ¼ôáí åßóôå Üíåôïé ìå ôçí ðáñåìâïëÞ êåéìÝíïõ ìåôáêéíçèåßôå óôçí + ðáñáêÜôù ðåñßëçøç. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÁÈÇÌÁ 1 ÐÅÑÉËÇØÇ + + + 1. Ï äñïìÝáò êéíåßôáé ÷ñçóéìïðïéþíôáò åßôå ôá ðëÞêôñá äñïìÝá Þ ôá hjkl. + h (áñéóôÝñá) j (êÜôù) k (ðÜíù) l (äåîéÜ) + + 2. Ãéá íá ìðåßôå óôïí Vim (áðü ôçí ðñïôñïðÞ %) ãñÜøôå: vim ÁÑ×ÅÉÏ + + 3. Ãéá íá âãåßôå ãñÜøôå: :q! ãéá áðüññéøç ôùí áëëáãþí. + ¹ ãñÜøôå: :wq ãéá áðïèÞêåõóç ôùí áëëáãþí. + + 4. Ãéá íá äéáãñÜøåôå Ýíáí ÷áñáêôÞñá êÜôù áðü ôïí äñïìÝá óå + ÊáíïíéêÞ ÊáôÜóôáóç ðáôÞóôå: x + + 5. Ãéá íá åéóÜãåôå êåßìåíï óôïí äñïìÝá üóï åßóôå óå ÊáíïíéêÞ ÊáôÜóôáóç ãñÜøôå: + i ðëçêôñïëïãÞóôå ôï êåßìåíï + +ÓÇÌÅÉÙÓÇ: Ðáôþíôáò èá ôïðïèåôçèåßôå óôçí ÊáíïíéêÞ ÊáôÜóôáóç Þ èá + áêõñþóåôå ìßá áíåðéèýìçôç êáé ìåñéêþò ïëïêëçñùìÝíç åíôïëÞ. + +Ôþñá óõíå÷ßóôå ìå ôï ÌÜèçìá 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 2.1: ÅÍÔÏËÅÓ ÄÉÁÃÑÁÖÇÓ + + ** ÃñÜøôå dw ãéá íá äéáãñÜøåôå ìÝ÷ñé ôï ôÝëïò ìßáò ëÝîçò. ** + + 1. ÐáôÞóôå ãéá íá âåâáéùèåßôå üôé åßóôå óôçí ÊáíïíéêÞ ÊáôÜóôáóç. + + 2. Ìåôáêéíåßóôå ôïí äñïìÝá óôçí ðáñáêÜôù ãñáììÞ óçìåéùìÝíç ìå --->. + + 3. Ðçãáßíåôå ôïí äñïìÝá óôçí áñ÷Þ ôçò ëÝîçò ðïõ ðñÝðåé íá äéáãñáöåß. + + 4. ÃñÜøôå dw ãéá íá êÜíåôå ôçí ëÝîç íá åîáöáíéóôåß. + +ÓÇÌÅÉÙÓÇ: Ôá ãñÜììáôá dw èá åìöáíéóôïýí óôçí ôåëåõôáßá ãñáììÞ ôçò ïèüíçò üóï + ôá ðëçêôñïëïãåßôå. Áí ãñÜøáôå êÜôé ëÜèïò, ðáôÞóôå êáé + îåêéíÞóôå áðü ôçí áñ÷Þ. + +---> There are a some words fun that don't belong paper in this sentence. + + 5. ÅðáíáëÜâåôå ôá âÞìáôá 3 êáé 4 ìÝ÷ñé ç ðñüôáóç íá åßíáé óùóôÞ êáé + ðçãáßíåôå óôï ÌÜèçìá 2.2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 2.2: ÐÅÑÉÓÓÏÔÅÑÅÓ ÅÍÔÏËÅÓ ÄÉÁÃÑÁÖÇÓ + + ** ÐëçêôñïëïãÞóôå d$ ãéá íá äéáãñÜøåôå ìÝ÷ñé ôï ôÝëïò ôçò ãñáììÞò. ** + + 1. ÐáôÞóôå ãéá íá âåâáéùèåßôå üôé åßóôå óôçí ÊáíïíéêÞ ÊáôÜóôáóç. + + 2. Ìåôáêéíåßóôå ôïí äñïìÝá óôçí ðáñáêÜôù ãñáììÞ óçìåéùìÝíç ìå --->. + + 3. Ìåôáêéíåßóôå ôïí äñïìÝá óôï ôÝëïò ôçò óùóôÞò ãñáììÞò (ÌÅÔÁ ôçí ðñþôç . ). + + 4. ÐáôÞóôå d$ ãéá íá äéáãñÜøåôå ìÝ÷ñé ôï ôÝëïò ôçò ãñáììÞò. + +---> Somebody typed the end of this line twice. end of this line twice. + + 5. Ðçãáßíåôå óôï ÌÜèçìá 2.3 ãéá íá êáôáëÜâåôå ôé óõìâáßíåé. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 2.3: ÐÅÑÉ ÅÍÔÏËÙÍ ÊÁÉ ÁÍÔÉÊÅÉÌÅÍÙÍ + + +Ç ìïñöÞ ôçò åíôïëÞò äéáãñáöÞò d åßíáé ùò åîÞò: + + [áñéèìüò] d áíôéêåßìåíï ¹ d [áñéèìüò] áíôéêåßìåíï + ¼ðïõ: + áñéèìüò - ðüóåò öïñÝò èá åêôåëåóôåß ç åíôïëÞ (ðñïáéñåôéêü, åî' ïñéóìïý=1). + d - ç åíôïëÞ ôçò äéáãñáöÞò. + áíôéêåßìåíï - ðÜíù óå ôé èá ëåéôïõñãÞóåé ç åíôïëÞ (ðáñáêÜôù ëßóôá). + + Ìßá ìéêñÞ ëßóôá áðü áíôéêåßìåíá: + w - áðü ôïí äñïìÝá ìÝ÷ñé ôï ôÝëïò ôçò ëÝîçò, ðåñéëáìâÜíïíôáò ôï äéÜóôçìá. + e - áðü ôïí äñïìÝá ìÝ÷ñé ôï ôÝëïò ôçò ëÝîçò, ×ÙÑÉÓ ôï äéÜóôçìá. + $ - áðü ôïí äñïìÝá ìÝ÷ñé ôï ôÝëïò ôçò ãñáììÞò. + +ÓÇÌÅÉÙÓÇ: Ãéá ôïõò ôýðïõò ôçò ðåñéðÝôåéáò, ðáôþíôáò áðëþò ôï áíôéêåßìåíï üóï + åßóôå óôçí ÊáíïíéêÞ ÊáôÜóôáóç ÷ùñßò êÜðïéá åíôïëÞ èá ìåôáêéíÞóåôå + ôïí äñïìÝá üðùò êáèïñßæåôáé óôçí ëßóôá áíôéêåéìÝíùí. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 2.4: ÌÉÁ ÅÎÁÉÑÅÓÇ ÓÔÇÍ 'ÅÍÔÏËÇ-ÁÍÔÉÊÅÉÌÅÍÏ' + + ** ÐëçêôñïëïãÞóôå dd ãéá íá äéáãñÜøåôå üëç ôç ãñáììÞ. ** + + Åîáéôßáò ôçò óõ÷íüôçôáò ôçò äéáãñáöÞò ïëüêëçñçò ãñáììÞò, ïé ó÷åäéáóôÝò + ôïõ Vim áðïöÜóéóáí üôé èá Þôáí åõêïëüôåñï íá ãñÜöåôå áðëþò äýï d óôç + óåéñÜ ãéá íá äéáãñÜøåôå ìßá ãñáììÞ. + + 1. Ìåôáêéíåßóôå ôïí äñïìÝá óôç äåýôåñç ãñáììÞ ôçò ðáñáêÜôù öñÜóçò. + 2. ÃñÜøôå dd ãéá íá äéáãñÜøåôå ôç ãñáììÞ. + 3. Ôþñá ìåôáêéíçèåßôå óôçí ôÝôáñôç ãñáììÞ. + 4. ÃñÜøôå 2dd (èõìçèåßôå áñéèìüò-åíôïëÞ-áíôéêåßìåíï) ãéá íá + äéáãñÜøåôå äýï ãñáììÝò. + + 1) Roses are red, + 2) Mud is fun, + 3) Violets are blue, + 4) I have a car, + 5) Clocks tell time, + 6) Sugar is sweet + 7) And so are you. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 2.5: Ç ÅÍÔÏËÇ ÁÍÁÉÑÅÓÇÓ + + ** ÐáôÞóôå u ãéá íá áíáéñÝóåôå ôéò ôåëåõôáßåò åíôïëÝò, + U ãéá íá äéïñèþóåôå üëç ôç ãñáììÞ. ** + + 1. Ìåôáêéíåßóôå ôïí äñïìÝá óôçí ðáñáêÜôù ãñáììÞ óçìåéùìÝíç ìå ---> êáé + ôïðïèåôÞóôå ôïí ðÜíù óôï ðñþôï ëÜèïò. + 2. ÐáôÞóôå x ãéá íá äéáãñÜøåôå ôïí ðñþôï áíåðéèýìçôï ÷áñáêôÞñá. + 3. Ôþñá ðáôÞóôå u ãéá íá áíáéñÝóåôå ôçí ôåëåõôáßá åêôåëåóìÝíç åíôïëÞ. + 4. ÁõôÞ ôç öïñÜ äéïñèþóôå üëá ôá ëÜèç óôç ãñáììÞ ÷ñçóéìïðïéþíôáò ôçí åíôïëÞ x. + 5. Ôþñá ðáôÞóôå Ýíá êåöáëáßï U ãéá íá åðéóôñÝøåôå ôç ãñáììÞ óôçí áñ÷éêÞ + ôçò êáôÜóôáóç. + 6. Ôþñá ðáôÞóôå u ìåñéêÝò öïñÝò ãéá íá áíáéñÝóåôå ôçí U êáé + ðñïçãïýìåíåò åíôïëÝò. + 7. Ôþñá ðáôÞóôå CTRL-R (êñáôþíôáò ðáôçìÝíï ôï ðëÞêôñï CTRL êáèþò ðáôÜôå ôï R) + ìåñéêÝò öïñÝò ãéá íá åðáíáöÝñåôå ôéò åíôïëÝò (áíáßñåóç ôùí áíáéñÝóåùí). + +---> Fiix the errors oon thhis line and reeplace them witth undo. + + 8. ÁõôÝò åßíáé ðïëý ÷ñÞóéìåò åíôïëÝò. Ôþñá ðçãáßíåôå óôçí + Ðåñßëçøç ôïõ ÌáèÞìáôïò 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÁÈÇÌÁ 2 ÐÅÑÉËÇØÇ + + + 1. Ãéá íá äéáãñÜøåôå áðü ôïí äñïìÝá ìÝ÷ñé ôï ôÝëïò ëÝîçò ãñÜøôå: dw + + 2. Ãéá íá äéáãñÜøåôå áðü ôïí äñïìÝá ìÝ÷ñé ôï ôÝëïò ãñáììÞò ãñÜøôå: d$ + + 3. Ãéá íá äéáãñÜøåôå ïëüêëçñç ôç ãñáììÞ ãñÜøôå: dd + + 4. Ç ìïñöÞ ãéá ìßá åíôïëÞ óôçí ÊáíïíéêÞ ÊáôÜóôáóç åßíáé: + + [áñéèìüò] åíôïëÞ áíôéêåßìåíï ¹ åíôïëÞ [áñéèìüò] áíôéêåßìåíï + üðïõ: + áñéèìüò - ðüóåò öïñÝò íá åðáíáëçöèåß ç åíôïëÞ + åíôïëÞ - ôé íá ãßíåé, üðùò ç d ãéá äéáãñáöÞ + áíôéêåßìåíï - ðÜíù óå ôé íá åíåñãÞóåé ç åíôïëÞ, üðùò w (ëÝîç), + $ (ôÝëïò ôçò ãñáììÞò), êôë. + + 5. Ãéá íá áíáéñÝóåôå ðñïçãïýìåíåò åíÝñãåéåò, ðáôÞóôå: u (ðåæü u) + Ãéá íá áíáéñÝóåôå üëåò ôéò áëëáãÝò óôç ãñáììÞ, ðáôÞóôå: U (êåöáëáßï U) + Ãéá íá áíáéñÝóåôå ôéò áíáéñÝóåéò, ðáôÞóôå: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 3.1: Ç ÅÍÔÏËÇ ÔÏÐÏÈÅÔÇÓÇÓ + + + ** ÐáôÞóôå p ãéá íá ôïðïèåôÞóåôå ôçí ôåëåõôáßá äéáãñáöÞ ìåôÜ ôïí äñïìÝá. ** + + 1. Ìåôáêéíåßóôå ôïí äñïìÝá óôçí ðñþôç ãñáììÞ ôçò ðáñáêÜôù ïìÜäáò. + + 2. ÐáôÞóôå dd ãéá íá äéáãñÜøåôå ôç ãñáììÞ êáé íá ôçí áðïèçêåýóåôå óå + ðñïóùñéíÞ ìíÞìç ôïõ Vim. + + 3. Ìåôáêéíåßóôå ôïí äñïìÝá óôç ãñáììÞ ÐÁÍÙ áðü åêåß ðïõ èá ðñÝðåé íá ðÜåé + ç äéáãñáììÝíç ãñáììÞ. + + 4. ¼óï åßóôå óå ÊáíïíéêÞ ÊáôÜóôáóç, ðáôÞóôå p ãéá íá âÜëåôå ôç ãñáììÞ. + + 5. ÅðáíáëÜâåôå ôá âÞìáôá 2 Ýùò 4 ãéá íá âÜëåôå üëåò ôéò ãñáììÝò óôç + óùóôÞ óåéñÜ. + + d) Can you learn too? + b) Violets are blue, + c) Intelligence is learned, + a) Roses are red, + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 3.2: Ç ÅÍÔÏËÇ ÁÍÔÉÊÁÔÁÓÔÁÓÇÓ + + + ** ÐáôÞóôå r êáé ÷áñáêôÞñá ãéá íá áëëÜîåôå áõôüí ðïõ åßíáé + êÜôù áðü ôïí äñïìÝá. ** + + 1. Ìåôáêéíåßóôå ôïí äñïìÝá óôçí ðñþôç ãñáììÞ ðáñáêÜôù óçìåéùìÝíç ìå --->. + + 2. Ìåôáêéíåßóôå ôïí äñïìÝá Ýôóé þóôå íá åßíáé ðÜíù óôï ðñþôï ëÜèïò. + + 3. ÐáôÞóôå r êáé ìåôÜ ôïí ÷áñáêôÞñá ï ïðïßïò äéïñèþíåé ôï ëÜèïò. + + 4. ÅðáíáëÜâåôå ôá âÞìáôá 2 êáé 3 ìÝ÷ñé íá åßíáé óùóôÞ ç ðñþôç ãñáììÞ. + +---> Whan this lime was tuoed in, someone presswd some wrojg keys! +---> When this line was typed in, someone pressed some wrong keys! + + 5. Ôþñá ðçãáßíåôå óôï ÌÜèçìá 3.2. + +ÓÇÌÅÉÙÓÇ: Íá èõìÜóôå üôé ðñÝðåé íá ìáèáßíåôå ìå ôç ÷ñÞóç, êáé ü÷é ìå + ôçí áðïìíçìüíåõóç. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 3.3: Ç ÅÍÔÏËÇ ÁËËÁÃÇÓ + + ** Ãéá íá áëëÜîåôå ôìÞìá Þ üëç ôç ëÝîç, ðáôÞóôå cw . ** + + 1. Ìåôáêéíåßóôå ôïí äñïìÝá óôçí ðñþôç ãñáììÞ ðáñáêÜôù óçìåéùìÝíç ìå --->. + + 2. ÔïðïèåôÞóôå ôïí äñïìÝá ðÜíù óôï u ôçò ëÝîçò lubw. + + 3. ÐáôÞóôå cw êáé ôç óùóôÞ ëÝîç (óôçí ðåñßðôùóç áõôÞ, ãñÜøôå 'ine'.) + + 4. ÐáôÞóôå êáé ðçãáßíåôå óôï åðüìåíï ëÜèïò (óôïí ðñþôï + ÷áñáêôÞñá ðñïò áëëáãÞ). + + 5. ÅðáíáëÜâåôå ôá âÞìáôá 3 êáé 4 ìÝ÷ñéò üôïõ ç ðñþôç ðñüôáóç íá åßíáé + ßäéá ìå ôç äåýôåñç. + +---> This lubw has a few wptfd that mrrf changing usf the change command. +---> This line has a few words that need changing using the change command. + +Ðáñáôçñåßóôå üôé ç cw ü÷é ìüíï áíôéêáèéóôÜåé ôç ëÝîç, áëëÜ óáò åéóÜãåé +åðßóçò óå ðáñåìâïëÞ. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 3.4: ÐÅÑÉÓÓÏÔÅÑÅÓ ÁËËÁÃÅÓ ÌÅ c + + + ** Ç åíôïëÞ áëëáãÞò ÷ñçóéìïðïéåßôáé ìå ôá ßäéá áíôéêåßìåíá ôçò äéáãñáöÞò. ** + + + 1. Ç åíôïëÞ áëëáãÞò äïõëåýåé ìå ôïí ßäéï ôñüðï üðùò ç äéáãñáöÞ. Ç ìïñöÞ åßíáé: + + [áñéèìüò] c áíôéêåßìåíï ¹ c [áñéèìüò] áíôéêåßìåíï + + 2. Ôá áíôéêåßìåíá åßíáé ðÜëé ôá ßäéá, üðùò w (ëÝîç), $ (ôÝëïò ãñáììÞò), êôë. + + 3. Ìåôáêéíçèåßôå óôçí ðñþôç ãñáììÞ ðáñáêÜôù óçìåéùìÝíç ìå --->. + + 4. Ìåôáêéíåßóôå ôïí äñïìÝá óôï ðñþôï ëÜèïò. + + 5. ÃñÜøôå c$ ãéá íá êÜíåôå ôï õðüëïéðï ôçò ãñáììÞò ßäéï ìå ôç äåýôåñç + êáé ðáôÞóôå . + +---> The end of this line needs some help to make it like the second. +---> The end of this line needs to be corrected using the c$ command. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÁÈÇÌÁ 3 ÐÅÑÉËÇØÇ + + + 1. Ãéá íá ôïðïèåôÞóåôå êåßìåíï ðïõ ìüëéò Ý÷åé äéáãñáöåß, ðáôÞóôå p . + Áõôü ôïðïèåôåß ôï äéáãñáììÝíï êåßìåíï ÌÅÔÁ ôïí äñïìÝá (áí äéáãñÜöôçêå + ãñáììÞ èá ðÜåé ìåôÜ óôç ãñáììÞ êÜôù áðü ôïí äñïìÝá. + + 2. Ãéá íá áíôéêáôáóôÞóåôå ôïí ÷áñáêôÞñá êÜôù áðü ôïí äñïìÝá, ðáôÞóôå r + êáé ìåôÜ ôïí ÷áñáêôÞñá ðïõ èá áíôéêáôáóôÞóåé ôïí áñ÷éêü. + + 3. Ç åíôïëÞ áëëáãÞò óáò åðéôñÝðåé íá áëëÜîåôå ôï êáèïñéóìÝíï áíôéêåßìåíï + áðü ôïí äñïìÝá ìÝ÷ñé ôï ôÝëïò ôïõ áíôéêåßìåíï. Ð.÷. ãñÜøôå cw ãéá íá + áëëÜîåôå áðü ôïí äñïìÝá ìÝ÷ñé ôï ôÝëïò ôçò ëÝîçò, c$ ãéá íá áëëÜîåôå + ìÝ÷ñé ôï ôÝëïò ãñáììÞò. + + 4. Ç ìïñöÞ ãéá ôçí áëëáãÞ åßíáé: + + [áñéèìüò] c áíôéêåßìåíï ¹ c [áñéèìüò] áíôéêåßìåíï + +Ôþñá óõíå÷ßóôå ìå ôï åðüìåíï ìÜèçìá. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 4.1: ÈÅÓÇ ÊÁÉ ÊÁÔÁÓÔÁÓÇ ÁÑ×ÅÉÏÕ + + + ** ÐáôÞóôå CTRL-g ãéá íá åìöáíéóôåß ç èÝóç óáò óôï áñ÷åßï êáé ç êáôÜóôáóÞ ôïõ. + ÐáôÞóôå SHIFT-G ãéá íá ðÜôå óå ìßá ãñáììÞ óôï áñ÷åßï. ** + + Óçìåßùóç: ÄéáâÜóôå ïëüêëçñï ôï ìÜèçìá ðñéí åêôåëÝóåôå êÜðïéï áðü ôá âÞìáôá!! + + 1. ÊñáôÞóôå ðáôçìÝíï ôï ðëÞêôñï Ctrl êáé ðáôÞóôå g . Ìßá ãñáììÞ êáôÜóôáóçò + èá åìöáíéóôåß óôï êÜôù ìÝñïò ôçò óåëßäáò ìå ôï üíïìá áñ÷åßïõ êáé ôç + ãñáììÞ ðïõ åßóôå. Èõìçèåßôå ôïí áñéèìü ãñáììÞò ãéá ôï ÂÞìá 3. + + 2. ÐáôÞóôå shift-G ãéá íá ìåôáêéíçèåßôå óôï ôÝëïò ôïõ áñ÷åßïõ. + + 3. ÐáôÞóôå ôïí áñéèìü ôçò ãñáììÞò ðïõ Þóáóôáí êáé ìåôÜ shift-G. Áõôü èá + óáò åðéóôñÝøåé óôç ãñáììÞ ðïõ Þóáóôáí ðñéí ðáôÞóåôå ãéá ðñþôç öïñÜ Ctrl-g. + (¼ôáí ðëçêôñïëïãåßôå ôïõò áñéèìïýò, ÄÅÍ èá åìöáíßæïíôáé óôçí ïèüíç). + + 4. Áí íïéþèåôå óßãïõñïò ãéá áõôü, åêôåëÝóôå ôá âÞìáôá 1 Ýùò 3. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 4.2: Ç ÅÍÔÏËÇ ÁÍÁÆÇÔÇÓÇÓ + + + ** ÐáôÞóôå / áêïëïõèïýìåíï áðü ôç öñÜóç ðïõ øÜ÷íåôå. ** + + 1. Óå ÊáíïíéêÞ ÊáôÜóôáóç ðáôÞóôå ôïí ÷áñáêôÞñá / . ÐáñáôçñÞóôå üôé áõôüò êáé + ï äñïìÝáò åìöáíßæïíôáé óôï êÜôù ìÝñïò ôçò ïèüíçò üðùò ìå ôçí åíôïëÞ : . + + 2. Ôþñá ãñÜøôå 'errroor' . ÁõôÞ åßíáé ç ëÝîç ðïõ èÝëåôå íá øÜîåôå. + + 3. Ãéá íá øÜîåôå îáíÜ ãéá ôçí ßäéá öñÜóç, ðáôÞóôå áðëþò n . + Ãéá íá øÜîåôå ôçí ßäéá öñÜóç óôçí áíôßèåôç êáôåýèõíóç, ðáôÞóôå Shift-N . + + 4. Áí èÝëåôå íá øÜîåôå ãéá ìßá öñÜóç ðñïò ôá ðßóù, ÷ñçóéìïðïéÞóôå ôçí åíôïëÞ ? áíôß ôçò / . + +---> ¼ôáí ç áíáæÞôçóç öôÜóåé óôï ôÝëïò ôïõ áñ÷åßïõ èá óõíå÷ßóåé áðü ôçí áñ÷Þ. + + "errroor" is not the way to spell error; errroor is an error. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 4.3: ÅÕÑÅÓÇ ÔÁÉÑÉÁÓÔÙÍ ÐÁÑÅÍÈÅÓÅÙÍ + + + ** ÐáôÞóôå % ãéá íá âñåßôå ôçí áíôßóôïé÷ç ), ], Þ } . ** + + 1. ÔïðïèåôÞóôå ôïí äñïìÝá óå êÜðïéá (, [, Þ { óôçí ðáñáêÜôù ãñáììÞ + óçìåéùìÝíç ìå --->. + + 2. Ôþñá ðáôÞóôå ôïí ÷áñáêôÞñá % . + + 3. Ï äñïìÝáò èá ðñÝðåé íá åßíáé óôçí áíôßóôïé÷ç ðáñÝíèåóç Þ áãêýëç. + + 4. ÐáôÞóôå % ãéá íá ìåôáêéíÞóåôå ôïí äñïìÝá ðßóù óôçí ðñþôç áãêýëç + (ôïõ æåõãáñéïý). + +---> This ( is a test line with ('s, ['s ] and {'s } in it. )) + +ÓÇÌÅÉÙÓÇ: Áõôü åßíáé ðïëý ÷ñÞóéìï óôçí áðïóöáëìÜôùóç åíüò ðñïãñÜììáôïò + ìå ìç ôáéñéáóôÝò ðáñåíèÝóåéò! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 4.4: ÅÍÁÓ ÔÑÏÐÏÓ ÃÉÁ ÁËËÁÃÇ ËÁÈÙÍ + + + ** ÃñÜøôå :s/old/new/g ãéá íá áëëÜîåôå ôï 'new' ìå ôï 'old'. ** + + 1. Ìåôáêéíåßóôå ôïí äñïìÝá óôçí ðáñáêÜôù ãñáììÞ óçìåéùìÝíç ìå --->. + + 2. ÃñÜøôå :s/thee/the . Óçìåéþóôå üôé áõôÞ ç åíôïëÞ áëëÜæåé ìüíï + ôçí ðñþôç åìöÜíéóç óôç ãñáììÞ. + + 3. Ôþñá ãñÜøôå :s/thee/the/g åííïþíôáò ãåíéêÞ áíôéêáôÜóôáóç óôç + ãñáììÞ. Áõôü áëëÜæåé üëåò ôéò åìöáíßóåéò åðß ôçò ãñáììÞò. + +---> thee best time to see thee flowers is in thee spring. + + 4. Ãéá íá áëëÜîåôå êÜèå åìöÜíéóç ìßáò óõìâïëïóåéñÜò ìåôáîý äýï ãñáììþí, + ãñÜøôå :#,#s/old/new/g üðïõ #,# ïé áñéèìïß ôùí äýï ãñáììþí. + ÃñÜøôå :%s/old/new/g ãéá íá áëëÜîåôå êÜèå åìöÜíéóç óå üëï ôï áñ÷åßï. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÁÈÇÌÁ 4 ÐÅÑÉËÇØÇ + + + 1. Ôï Ctrl-g åìöáíßæåé ôç èÝóç óáò óôï áñ÷åßï êáé ôçí êáôÜóôáóÞ ôïõ. + Ôï Shift-G ðçãáßíåé óôï ôÝëïò ôïõ áñ÷åßïõ. ¸íáò áñéèìüò ãñáììÞò + áêïëïõèïýìåíïò áðü Shift-G ðçãáßíåé óå åêåßíç ôç ãñáììÞ. + + 2. ÃñÜöïíôáò / áêïëïõèïýìåíï áðü ìßá öñÜóç øÜ÷íåé ðñïò ôá ÌÐÑÏÓÔÁ ãéá + ôç öñÜóç. ÃñÜöïíôáò ? áêïëïõèïýìåíï áðü ìßá öñÜóç øÜ÷íåé ðñïò ôá ÐÉÓÙ + ãéá ôç öñÜóç. ÌåôÜ áðü ìßá áíáæÞôçóç ðáôÞóôå n ãéá íá âñåßôå ôçí + åðüìåíç åìöÜíéóç ðñïò ôçí ßäéá êáôåýèõíóç Þ Shift-N ãéá íá øÜîåôå + ðñïò ôçí áíôßèåôç êáôåýèõíóç. + + 3. Ðáôþíôáò % üóï ï äñïìÝáò åßíáé ðÜíù óå ìßá (,),[,],{, Þ } åíôïðßæåé + ôï áíôßóôïé÷ï ôáßñé ôïõ æåõãáñéïý. + + 4. Ãéá áíôéêáôÜóôáóç ìå new ôïõ ðñþôïõ old óôç ãñáììÞ ãñÜøôå :s/old/new + Ãéá áíôéêáôÜóôáóç ìå new üëùí ôùí 'old' óôç ãñáììÞ ãñÜøôå :s/old/new/g + Ãéá áíôéêáôÜóôáóç öñÜóåùí ìåôáîý äýï # ãñáììþí ãñÜøôå :#,#s/old/new/g + Ãéá áíôéêáôÜóôáóç üëùí ôùí åìöáíßóåùí óôï áñ÷åßï ãñÜøôå :%s/old/new/g + Ãéá åñþôçóç åðéâåâáßùóçò êÜèå öïñÜ ðñïóèÝóôå Ýíá 'c' "%s/old/new/gc + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 5.1: ÐÙÓ ÅÊÔÅËÙ ÌÉÁ ÅÎÙÔÅÑÉÊÇ ÅÍÔÏËÇ + + +** ÃñÜøôå :! áêïëïõèïýìåíï áðü ìßá åîùôåñéêÞ åíôïëÞ ãéá íá ôçí åêôåëÝóåôå. ** + + 1. ÐáôÞóôå ôçí ïéêåßá åíôïëÞ : ãéá íá èÝóåôå ôïí äñïìÝá óôï êÜôù ìÝñïò + ôçò ïèüíçò. Áõôü óáò åðéôñÝðåé íá äþóåôå ìßá åíôïëÞ. + + 2. Ôþñá ðáôÞóôå ôï ! (èáõìáóôéêü). Áõôü óáò åðéôñÝðåé íá åêôåëÝóåôå + ïðïéáäÞðïôå åîùôåñéêÞ åíôïëÞ ôïõ öëïéïý. + + 3. Óáí ðáñÜäåéãìá ãñÜøôå ls ìåôÜ áðü ôï ! êáé ðáôÞóôå . Áõôü èá + óáò åìöáíßóåé ìßá ëßóôá ôïõ êáôáëüãïõ óáò, áêñéâþò óáí íá Þóáóôáí óôçí + ðñïôñïðÞ ôïõ öëïéïý. ¹ ÷ñçóéìïðïéÞóôå :!dir áí ôï ls äåí äïõëåýåé. + +---> Óçìåßùóç: Åßíáé äõíáôüí íá åêôåëÝóåôå ïðïéáäÞðïôå åîùôåñéêÞ åíôïëÞ + ìå áõôüí ôïí ôñüðï. + +---> Óçìåßùóç: ¼ëåò ïé åíôïëÝò : ðñÝðåé íá ôåñìáôßæïíôáé ðáôþíôáò ôï . + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 5.2: ÐÅÑÉÓÓÏÔÅÑÁ ÐÅÑÉ ÅÃÃÑÁÖÇÓ ÁÑ×ÅÉÙÍ + + + ** Ãéá íá óþóåôå ôéò áëëÜãåò ðïõ êÜíáôå óôï áñ÷åßï, ãñÜøôå :w ÁÑ×ÅÉÏ. ** + + 1. ÃñÜøôå :!dir Þ :!ls ãéá íá ðÜñåôå ìßá ëßóôá ôïõ êáôáëüãïõ óáò. + ¹äç îÝñåôå üôé ðñÝðåé íá ðáôÞóåôå ìåôÜ áðü áõôü. + + 2. ÄéáëÝîôå Ýíá üíïìá áñ÷åßïõ ðïõ äåí õðÜñ÷åé áêüìá, üðùò ôï TEST. + + 3. Ôþñá ãñÜøôå: :w TEST (üðïõ TEST åßíáé ôï üíïìá áñ÷åßïõ ðïõ äéáëÝîáôå). + + 4. Áõôü óþæåé üëï ôï áñ÷åßï (vim Tutor) ìå ôï üíïìá TEST. Ãéá íá ôï + åðáëçèåýóåôå, ãñÜøôå îáíÜ :!dir ãéá íá äåßôå ôïí êáôÜëïãü óáò. + +---> Óçìåéþóôå üôé áí âãáßíáôå áðü ôïí Vim êáé ìðáßíáôå îáíÜ ìå ôï üíïìá + áñ÷åßïõ TEST, ôï áñ÷åßï èá Þôáí áêñéâÝò áíôßãñáöï ôïõ tutor üôáí ôï óþóáôå. + + 5. Ôþñá äéáãñÜøôå ôï áñ÷åßï ãñÜöïíôáò (MS-DOS): :!del TEST + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 5.3: ÅÐÉËÅÊÔÉÊÇ ÅÍÔÏËÇ ÅÃÃÑÁÖÇÓ + + + ** Ãéá íá óþóåôå ôìÞìá ôïõ áñ÷åßïõ, ãñÜøôå :#,# w ÁÑ×ÅÉÏ ** + + 1. ¶ëëç ìéá öïñÜ, ãñÜøôå :!dir Þ :!ls ãéá íá ðÜñåôå ìßá ëßóôá áðü ôïí + êáôÜëïãü óáò êáé äéáëÝîôå Ýíá êáôÜëëçëï üíïìá áñ÷åßïõ üðùò ôï TEST. + + 2. Ìåôáêéíåßóôå ôïí äñïìÝá óôï ðÜíù ìÝñïò áõôÞò ôçò óåëßäáò êáé ðáôÞóôå + Ctrl-g ãéá íá âñåßôå ôïí áñéèìü áõôÞò ôçò ãñáììÞò. + ÍÁ ÈÕÌÁÓÔÅ ÁÕÔÏÍ ÔÏÍ ÁÑÉÈÌÏ! + + 3. Ôþñá ðçãáßíåôå óôï êÜôù ìÝñïò ôçò óåëßäáò êáé ðáôÞóôå Ctrl-g îáíÜ. + ÍÁ ÈÕÌÁÓÔÅ ÊÁÉ ÁÕÔÏÍ ÔÏÍ ÁÑÉÈÌÏ! + + 4. Ãéá íá óþóåôå ÌÏÍÏ Ýíá ôìÞìá óå áñ÷åßï, ãñÜøôå :#,# w TEST + üðïõ #,# ïé äýï áñéèìïß ðïõ áðïìíçìïíåýóáôå (ðÜíù,êÜôù) êáé TEST ôï + üíïìá ôïõ áñ÷åßïõ óáò. + + 5. ÎáíÜ, äåßôå üôé ôï áñ÷åßï åßíáé åêåß ìå ôçí :!dir áëëÜ ÌÇÍ ôï äéáãñÜøåôå. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 5.4: ÁÍÁÊÔÙÍÔÁÓ ÊÁÉ ÅÍÙÍÏÍÔÁÓ ÁÑ×ÅÉÁ + + + ** Ãéá íá åéóÜãåôå ôá ðåñéå÷üìåíá åíüò áñ÷åßïõ, ãñÜøôå :r ÁÑ×ÅÉÏ ** + + 1. ÃñÜøôå :!dir ãéá íá âåâáéùèåßôå üôé ôï TEST õðÜñ÷åé áðü ðñéí. + + 2. ÔïðïèåôÞóôå ôïí äñïìÝá óôï ðÜíù ìÝñïò ôçò óåëßäáò. + +ÓÇÌÅÉÙÓÇ: Áöüôïõ åêôåëÝóåôå ôï ÂÞìá 3 èá äåßôå ôï ÌÜèçìá 5.3. + ÌåôÜ êéíçèåßôå ÊÁÔÙ îáíÜ ðñïò ôï ìÜèçìá áõôü. + + 3. Ôþñá áíáêôÞóôå ôï áñ÷åßï óáò TEST ÷ñçóéìïðïéþíôáò ôçí åíôïëÞ :r TEST + üðïõ TEST åßíáé ôï üíïìá ôïõ áñ÷åßïõ. + +ÓÇÌÅÉÙÓÇ: Ôï áñ÷åßï ðïõ áíáêôÜôå ôïðïèåôåßôáé îåêéíþíôáò åêåß ðïõ âñßóêåôáé + ï äñïìÝáò. + + 4. Ãéá íá åðáëçèåýóåôå üôé ôï áñ÷åßï áíáêôÞèçêå, ðßóù ôïí äñïìÝá êáé + ðáñáôçñÞóôå üôé õðÜñ÷ïõí ôþñá äýï áíôßãñáöá ôïõ ÌáèÞìáôïò 5.3, ôï + áñ÷éêü êáé ç Ýêäïóç ôïõ áñ÷åßïõ. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÁÈÇÌÁ 5 ÐÅÑÉËÇØÇ + + + 1. :!åíôïëÞ åêôåëåß ìßá åîùôåñéêÞ åíôïëÞ. + + ÌåñéêÜ ÷ñÞóéìá ðáñáäåßãìáôá åßíáé (MS-DOS): + :!dir - åìöÜíéóç ëßóôáò åíüò êáôáëüãïõ. + :!del ÁÑ×ÅÉÏ - äéáãñÜöåé ôï ÁÑ×ÅÉÏ. + + 2. :w ÁÑ×ÅÉÏ ãñÜöåé ôï ôñÝ÷ùí áñ÷åßï ôïõ Vim óôï äßóêï ìå üíïìá ÁÑ×ÅÉÏ. + + 3. :#,#w ÁÑ×ÅÉÏ óþæåé ôéò ãñáììÝò áðü # ìÝ÷ñé # óôï ÁÑ×ÅÉÏ. + + 4. :r ÁÑ×ÅÉÏ áíáêôåß ôï áñ÷åßï äßóêïõ ÁÑ×ÅÉÏ êáé ôï ðáñåìâÜëëåé ìÝóá + óôï ôñÝ÷ïí áñ÷åßï ìåôÜ áðü ôç èÝóç ôïõ äñïìÝá. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 6.1: Ç ÅÍÔÏËÇ ÁÍÏÉÃÌÁÔÏÓ + + + ** ÐáôÞóôå o ãéá íá áíïßîåôå ìßá ãñáììÞ êÜôù áðü ôïí äñïìÝá êáé íá + âñåèåßôå óå ÊáôÜóôáóç ÊåéìÝíïõ. ** + + 1. Ìåôáêéíåßóôå ôïí äñïìÝá óôçí ðáñáêÜôù ãñáììÞ óçìåéùìÝíç ìå --->. + + 2. ÐáôÞóôå o (ðåæü) ãéá íá áíïßîåôå ìßá ãñáììÞ ÊÁÔÙ áðü ôïí äñïìÝá êáé íá + âñåèåßôå óå ÊáôÜóôáóç ÊåéìÝíïõ. + + 3. Ôþñá áíôéãñÜøôå ôç óçìåéùìÝíç ìå ---> ãñáììÞ êáé ðáôÞóôå ãéá íá + âãåßôå áðü ôçí ÊáôÜóôáóç ÊåéìÝíïõ. + +---> After typing o the cursor is placed on the open line in Insert mode. + + 4. Ãéá íá áíïßîåôå ìßá ãñáììÞ ÐÁÍÙ áðü ôïí äñïìÝá, ðáôÞóôå áðëÜ Ýíá êåöáëáßï + O, áíôß ãéá Ýíá ðåæü o. ÄïêéìÜóôå ôï óôçí ðáñáêÜôù ãñáììÞ. +Áíïßãåôå ãñáììÞ ðÜíù áðü áõôÞí ðáôþíôáò Shift-O üóï ï äñïìÝáò åßíáé óôç ãñáììÞ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 6.2: Ç ÅÍÔÏËÇ ÐÑÏÓÈÇÊÇÓ + + ** ÐáôÞóôå a ãéá íá åéóÜãåôå êåßìåíï ÌÅÔÁ ôïí äñïìÝá. ** + + 1. Ìåôáêéíåßóôå ôïí äñïìÝá óôï ôÝëïò ôçò ðñþôçò ãñáììÞò ðáñáêÜôù + óçìåéùìÝíç ìå ---> ðáôþíôáò $ óôçí ÊáíïíéêÞ ÊáôÜóôáóç. + + 2. ÐáôÞóôå Ýíá a (ðåæü) ãéá íá ðñïóèÝóåôå êåßìåíï ÌÅÔÁ áðü ôïí ÷áñáêôÞñá + ðïõ åßíáé êÜôù áðü ôïí äñïìÝá. (Ôï êåöáëáßï A ðñïóèÝôåé óôï ôÝëïò + ôçò ãñáììÞò). + +Óçìåßùóç: Áõôü áðïöåýãåé ôï ðÜôçìá ôïõ i , ôïí ôåëåõôáßï ÷áñáêôÞñá, ôï + êåßìåíï ôçò åéóáãùãÞò, , äñïìÝá-äåîéÜ, êáé ôÝëïò, x, ìüíï êáé + ìüíï ãéá íá ðñïóèÝóåôå óôï ôÝëïò ôçò ãñáììÞò! + + 3. Óõìðëçñþóôå ôþñá ôçí ðñþôç ãñáììÞ. Óçìåéþóôå åðßóçò üôé ç ðñïóèÞêç åßíáé + áêñéâþò ßäéá óôçí ÊáôÜóôáóç ÊåéìÝíïõ ìå ôçí ÊáôÜóôáóç ÅéóáãùãÞò, åêôüò + áðü ôç èÝóç ðïõ åéóÜãåôáé ôï êåßìåíï. + +---> This line will allow you to practice +---> This line will allow you to practice appending text to the end of a line. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 6.3: ÁËËÇ ÅÊÄÏÓÇ ÔÇÓ ÁÍÔÉÊÁÔÁÓÔÁÓÇÓ + + + ** ÐáôÞóôå êåöáëáßï R ãéá íá áëëÜîåôå ðåñéóóüôåñïõò áðü Ýíáí ÷áñáêôÞñåò. ** + + 1. Ìåôáêéíåßóôå ôïí äñïìÝá óôçí ðñþôç ãñáììÞ ðáñáêÜôù óçìåéùìÝíç ìå --->. + + 2. ÔïðïèåôÞóôå ôïí äñïìÝá óôçí áñ÷Þ ôçò ðñþôçò ëÝîçò ðïõ åßíáé äéáöïñåôéêÞ + áðü ôç äåýôåñç ãñáììÞ óçìåéùìÝíç ìå ---> (ç ëÝîç 'last'). + + 3. ÐáôÞóôå ôþñá R êáé áëëÜîôå ôï õðüëïéðï ôïõ êåéìÝíïõ óôçí ðñþôç ãñáììÞ + ãñÜöïíôáò ðÜíù áðü ôï ðáëéü êåßìåíï þóôå íá êÜíåôå ôçí ðñþôç ãñáììÞ ßäéá + ìå ôç äåýôåñç. + +---> To make the first line the same as the last on this page use the keys. +---> To make the first line the same as the second, type R and the new text. + + 4. Óçìåéþóôå üôé üôáí ðáôÜôå ãéá íá âãåßôå, ðáñáìÝíåé ïðïéïäÞðïôå + áíáëëïßùôï êåßìåíï. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÜèçìá 6.4: ÑÕÈÌÉÓÇ ÅÐÉËÏÃÇÓ + + + ** Ñõèìßóôå ìßá åðéëïãÞ Ýôóé þóôå ç áíáæÞôçóç Þ ç áíôéêáôÜóôáóç íá áãíïåß + ôç äéáöïñÜ ðåæþí-êåöáëáßùí ** + + 1. ØÜîôå ãéá 'ignore' åéóÜãïíôáò: + /ignore + Óõíå÷ßóôå áñêåôÝò öïñÝò ðáôþíôáò ôï ðëÞêôñï n. + + 2. ÈÝóôå ôçí åðéëïãÞ 'ic' (Ignore case) ãñÜöïíôáò: + :set ic + + 3. ØÜîôå ôþñá îáíÜ ãéá 'ignore' ðáôþíôáò: n + Óõíå÷ßóôå ôçí áíáæÞôçóç ìåñéêÝò áêüìá öïñÝò ðáôþíôáò ôï ðëÞêôñï n + + 4. ÈÝóôå ôéò åðéëïãÝò 'hlsearch' êáé 'incsearch': + :set hls is + + 5. ÅéóÜãåôå ôþñá îáíÜ ôçí åíôïëÞ áíáæÞôçóçò, êáé äåßôå ôé óõìâáßíåé + /ignore + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÁÈÇÌÁ 6 ÐÅÑÉËÇØÇ + + + 1. Ðáôþíôáò o áíïßãåé ìßá ãñáììÞ ÊÁÔÙ áðü ôïí äñïìÝá êáé ôïðïèåôåß ôïí + äñïìÝá óôçí áíïé÷ôÞ ãñáììÞ óå ÊáôÜóôáóç ÊåéìÝíïõ. + + 2. ÐáôÞóôå a ãéá íá åéóÜãåôå êåßìåíï ÌÅÔÁ ôïí ÷áñáêôÞñá óôïí ïðïßï åßíáé + ï äñïìÝáò. Ðáôþíôáò êåöáëáßï A áõôüìáôá ðñïóèÝôåé êåßìåíï óôï ôÝëïò + ôçò ãñáììÞò. + + 3. Ðáôþíôáò êåöáëáßï R åéóÝñ÷åôáé óôçí ÊáôÜóôáç ÁíôéêáôÜóôáóçò ìÝ÷ñé íá + ðáôçèåß ôï êáé íá åîÝëèåé. + + 4. ÃñÜöïíôáò ":set xxx" ñõèìßæåé ôçí åðéëïãÞ "xxx". + + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÌÁÈÇÌÁ 7: ON-LINE ÅÍÔÏËÅÓ ÂÏÇÈÅÉÁÓ + + + ** ×ñçóéìïðïéÞóôå ôï on-line óýóôçìá âïÞèåéáò ** + + Ï Vim Ý÷åé Ýíá ðåñéåêôéêü on-line óýóôçìá âïÞèåéáò. Ãéá íá îåêéíÞóåé, + äïêéìÜóôå êÜðïéï áðü ôá ôñßá: + - ðáôÞóôå ôï ðëÞêôñï (áí Ý÷åôå êÜðïéï) + - ðáôÞóôå ôï ðëÞêôñï (áí Ý÷åôå êÜðïéï) + - ãñÜøôå :help + + ÃñÜøôå :q ãéá íá êëåßóåôå ôï ðáñÜèõñï ôçò âïÞèåéáò. + + Ìðïñåßôå íá âñåßôå âïÞèåéá ðÜíù óå êÜèå áíôéêåßìåíï, äßíïíôáò ìßá ðáñÜìåôñï + óôçí åíôïëÞ ":help". ÄïêéìÜóôå áõôÜ (ìçí îå÷íÜôå íá ðáôÜôå ): + + :help w + :help c_ ’¦ §¢ã¡«¨¦ l œå¤˜  ›œ¥ á ¡˜  ¡ ¤œå ©«˜ ›œ¥ á. + j ’¦ §¢ã¡«¨¦ j £¦ áœ  £œ ™œ¢á¡  §¨¦ª «˜ ¡á«à. + v + + 1. ‹œ«˜¡ ¤œå©«œ «¦¤ ›¨¦£â˜ «¨ šç¨à ©«ž¤ ¦Ÿæ¤ž £â®¨  ¤˜ ¤¦ éŸœ«œ ᤜ«˜. + + 2. ‰¨˜«ã©«œ §˜«ž£â¤¦ «¦ ¡á«à §¢ã¡«¨¦ (j) £â®¨  ¤˜ œ§˜¤˜¢ž­Ÿœå. +---> ’騘 ¥â¨œ«œ §éª ¤˜ £œ«˜¡ ¤žŸœå«œ ©«¦ œ§æ£œ¤¦ £áŸž£˜. + + 3. •¨ž© £¦§¦ é¤«˜ª «¦ ¡á«à §¢ã¡«¨¦, £œ«˜¡ ¤žŸœå«œ ©«¦ ‹áŸž£˜ 1.2. + +‘ž£œåਫ਼: €¤ ˜£­ ™á¢¢œ«œ š ˜ ¡á«  §¦¬ §˜«ã©˜«œ, §˜«ã©«œ š ˜ ¤˜ ™¨œŸœå«œ + ©«ž¤ ‰˜¤¦¤ ¡ã ‰˜«á©«˜©ž. ‹œ«á §˜«ã©«œ ¥˜¤á «ž¤ œ¤«¦¢ã §¦¬ Ÿâ¢˜«œ. + +‘ž£œåਫ਼: ’˜ §¢ã¡«¨˜ «¦¬ ›¨¦£â˜ Ÿ˜ §¨â§œ  œ§å©žª ¤˜ ›¦¬¢œç¦¬¤. €¢¢á £œ «˜ hjkl + Ÿ˜ £§¦¨œå«œ ¤˜ ¡ ¤žŸœå«œ §¦¢ç š¨žš¦¨æ«œ¨˜, £æ¢ ª «˜ ©¬¤žŸå©œ«œ. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 1.2: ‹€ˆŒŽŒ’€‘ ‰€ˆ ‚€ˆŒŽŒ’€‘ ‘’ŽŒ VIM + + !! ‘†‹„ˆ—‘†: ¨ ¤ œ¡«œ¢â©œ«œ ¡á§¦ ¦ ˜§æ «˜ ™ã£˜«˜, › ˜™á©«œ 梦 «¦ £áŸž£˜!! + + 1. ˜«ã©«œ «¦ §¢ã¡«¨¦ (š ˜ ¤˜ œå©«œ ©å𦬍˜ ©«ž¤ ‰˜¤¦¤ ¡ã ‰˜«á©«˜©ž). + + 2. ¢ž¡«¨¦¢¦šã©«œ: :q! . + +---> €¬«æ œ¥â¨®œ«˜  ˜§æ «¦¤ ©¬¤«á¡«ž •—ˆ‘ ¤˜ ©é©œ  槦 œª ˜¢¢˜šâª ⮜«œ ¡á¤œ . + €¤ Ÿâ¢œ«œ ¤˜ ©é©œ«œ « ª ˜¢¢˜šâª ¡˜  ¤˜ œ¥â¨Ÿœ«œ §¢ž¡«¨¦¢¦šã©«œ: + :wq + + 3. ¤ ›œå«œ «ž¤ §¨¦«¨¦§ã «¦¬ ­¢¦ ¦ç, §¢ž¡«¨¦¢¦šã©«œ «ž¤ œ¤«¦¢ã £œ «ž¤ ¦§¦å˜ + £§ã¡˜«œ ©œ ˜¬«ã¤ «ž¤ §œ¨ ãšž©ž. ‹§¦¨œå ¤˜ œå¤˜ : vimtutor + ‰˜¤¦¤ ¡á Ÿ˜ ®¨ž© £¦§¦ ¦ç©˜«œ: vim tutor + +---> 'vim' ©ž£˜å¤œ  œ ©˜šàšã ©«¦¤ ©¬¤«á¡«ž vim, 'tutor' œå¤˜  «¦ ˜¨®œå¦ §¦¬ + Ÿâ¢¦¬£œ ¤˜ › ¦¨Ÿé©¦¬£œ. + + 4. €¤ ⮜«œ ˜§¦£¤ž£¦¤œç©œ  ˜¬«á «˜ ™ã£˜«˜ ¡˜  ⮜«œ ˜¬«¦§œ§¦åŸž©ž, œ¡«œ¢â©«œ + «˜ ™ã£˜«˜ 1 âઠ3 š ˜ ¤˜ ™šœå«œ ¡˜  ¤˜ £§œå«œ ¥˜¤á ©«¦¤ ©¬¤«á¡«ž. ‹œ«á + £œ«˜¡ ¤ã©«œ «¦¤ ›¨¦£â˜ ¡á«à ©«¦ ‹áŸž£˜ 1.3. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 1.3: ƒˆŽ‡—‘† ‰„ˆ‹„ŒŽ“ - ƒˆ€‚€”† + + **  œå©«œ ©«ž¤ ‰˜¤¦¤ ¡ã ‰˜«á©«˜©ž §˜«ã©«œ x š ˜ ¤˜ › ˜š¨á¯œ«œ «¦¤ + ®˜¨˜¡«ã¨˜ ¡á«à ˜§æ «¦¤ ›¨¦£â˜. ** + + 1. ‹œ«˜¡ ¤œå©«œ «¦¤ ›¨¦£â˜ ©«ž¤ §˜¨˜¡á«à š¨˜££ã ©ž£œ à£â¤ž £œ --->. + + 2. ‚ ˜ ¤˜ › ¦¨Ÿé©œ«œ «˜ ¢áŸž, ¡ ¤œå©«œ «¦¤ ›¨¦£â˜ £â®¨  ¤˜ œå¤˜  §á¤à ˜§æ + «¦¤ ®˜¨˜¡«ã¨˜ §¦¬ Ÿ˜ › ˜š¨˜­œå. + + 3. ˜«ã©«œ «¦ §¢ã¡«¨¦ x š ˜ ¤˜ › ˜š¨á¯œ«œ «¦¤ ˜¤œ§ Ÿç£ž«¦ ®˜¨˜¡«ã¨˜. + + 4. „§˜¤˜¢á™œ«œ «˜ ™ã£˜«˜ 2 £â®¨  4 £â®¨  ž §¨æ«˜©ž ¤˜ œå¤˜  ©à©«ã. + +---> The ccow jumpedd ovverr thhe mooon. + + 5. ’騘 §¦¬ ž š¨˜££ã œå¤˜  ©à©«ã, §žš˜å¤«œ ©«¦ ‹áŸž£˜ 1.4. + +‘†‹„ˆ—‘†: ‰˜Ÿéª › ˜«¨â®œ«œ ˜¬«ã¤ «ž¤ §œ¨ ãšž©ž, §¨¦©§˜Ÿã©«œ ¤˜ £ž¤ + ˜§¦£¤ž£¦¤œçœ«œ, £˜Ÿ˜å¤œ«œ £œ «ž ®¨ã©ž. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 1.4: ƒˆŽ‡—‘† ‰„ˆ‹„ŒŽ“ - €„‹ŽŠ† + + **  œå©«œ ©œ ‰˜¤¦¤ ¡ã ‰˜«á©«˜©ž §˜«ã©«œ i š ˜ ¤˜ §˜¨œ£™á¢¢œ«œ ¡œå£œ¤¦. ** + + 1. ‹œ«˜¡ ¤œå©«œ «¦¤ ›¨¦£â˜ £â®¨  «ž¤ §¨é«ž š¨˜££ã §˜¨˜¡á«à ©ž£œ à£â¤ž £œ --->. + + 2. ‚ ˜ ¤˜ ¡á¤œ«œ «ž¤ §¨é«ž š¨˜££ã å› ˜ £œ «ž¤ ›œç«œ¨ž, £œ«˜¡ ¤œå©«œ «¦¤ + ›¨¦£â˜ §á¤à ©«¦¤ §¨é«¦ ®˜¨˜¡«ã¨˜ ‹„’€ ˜§æ 槦¬ Ÿ˜ §˜¨œ£™¢žŸœå «¦ ¡œå£œ¤¦. + + 3. ˜«ã©«œ «¦ i ¡˜  §¢ž¡«¨¦¢¦šã©«œ « ª ˜§˜¨˜å«ž«œª §¨¦©Ÿã¡œª. + + 4. ‰˜Ÿéª › ¦¨Ÿé¤œ«œ ¡áŸœ ¢áŸ¦ª §˜«ã©«œ š ˜ ¤˜ œ§ ©«¨â¯œ«œ ©«ž¤ + ‰˜¤¦¤ ¡ã ‰˜«á©«˜©ž. „§˜¤˜¢á™œ«œ «˜ ™ã£˜«˜ 2 £â®¨  4 š ˜ ¤˜ › ¦¨Ÿé©œ«œ + «ž¤ §¨æ«˜©ž. + +---> There is text misng this . +---> There is some text missing from this line. + + 5. ¤ œå©«œ ᤜ«¦  £œ «ž¤ §˜¨œ£™¦¢ã ¡œ £â¤¦¬ £œ«˜¡ ¤žŸœå«œ ©«ž¤ + §˜¨˜¡á«à §œ¨å¢ž¯ž. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹€‡†‹€ 1 „ˆŠ†–† + + + 1. Ž ›¨¦£â˜ª ¡ ¤œå«˜  ®¨ž© £¦§¦ é¤«˜ª œå«œ «˜ §¢ã¡«¨˜ ›¨¦£â˜ ã «˜ hjkl. + h (˜¨ ©«â¨˜) j (¡á«à) k (§á¤à) l (›œ¥ á) + + 2. ‚ ˜ ¤˜ £§œå«œ ©«¦¤ Vim (˜§æ «ž¤ §¨¦«¨¦§ã %) š¨á¯«œ: vim €•„ˆŽ + + 3. ‚ ˜ ¤˜ ™šœå«œ š¨á¯«œ: :q! š ˜ ˜§æ¨¨ ¯ž «à¤ ˜¢¢˜šé¤. + ì š¨á¯«œ: :wq š ˜ ˜§¦Ÿã¡œ¬©ž «à¤ ˜¢¢˜šé¤. + + 4. ‚ ˜ ¤˜ › ˜š¨á¯œ«œ ⤘¤ ®˜¨˜¡«ã¨˜ ¡á«à ˜§æ «¦¤ ›¨¦£â˜ ©œ + ‰˜¤¦¤ ¡ã ‰˜«á©«˜©ž §˜«ã©«œ: x + + 5. ‚ ˜ ¤˜ œ ©ášœ«œ ¡œå£œ¤¦ ©«¦¤ ›¨¦£â˜ 橦 œå©«œ ©œ ‰˜¤¦¤ ¡ã ‰˜«á©«˜©ž š¨á¯«œ: + i §¢ž¡«¨¦¢¦šã©«œ «¦ ¡œå£œ¤¦ + +‘†‹„ˆ—‘†: ˜«é¤«˜ª Ÿ˜ «¦§¦Ÿœ«žŸœå«œ ©«ž¤ ‰˜¤¦¤ ¡ã ‰˜«á©«˜©ž ã Ÿ˜ + ˜¡¬¨é©œ«œ £å˜ ˜¤œ§ Ÿç£ž«ž ¡˜  £œ¨ ¡éª ¦¢¦¡¢ž¨à£â¤ž œ¤«¦¢ã. + +’騘 ©¬¤œ®å©«œ £œ «¦ ‹áŸž£˜ 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 2.1: „Œ’ŽŠ„‘ ƒˆ€‚€”†‘ + + ** ‚¨á¯«œ dw š ˜ ¤˜ › ˜š¨á¯œ«œ £â®¨  «¦ «â¢¦ª £å˜ª ¢â¥žª. ** + + 1. ˜«ã©«œ š ˜ ¤˜ ™œ™˜ àŸœå«œ æ«  œå©«œ ©«ž¤ ‰˜¤¦¤ ¡ã ‰˜«á©«˜©ž. + + 2. ‹œ«˜¡ ¤œå©«œ «¦¤ ›¨¦£â˜ ©«ž¤ §˜¨˜¡á«à š¨˜££ã ©ž£œ à£â¤ž £œ --->. + + 3. žš˜å¤œ«œ «¦¤ ›¨¦£â˜ ©«ž¤ ˜¨®ã «žª ¢â¥žª §¦¬ §¨â§œ  ¤˜ › ˜š¨˜­œå. + + 4. ‚¨á¯«œ dw š ˜ ¤˜ ¡á¤œ«œ «ž¤ ¢â¥ž ¤˜ œ¥˜­˜¤ ©«œå. + +‘†‹„ˆ—‘†: ’˜ š¨á££˜«˜ dw Ÿ˜ œ£­˜¤ ©«¦ç¤ ©«ž¤ «œ¢œ¬«˜å˜ š¨˜££ã «žª ¦Ÿæ¤žª 橦 + «˜ §¢ž¡«¨¦¢¦šœå«œ. €¤ š¨á¯˜«œ ¡á«  ¢áŸ¦ª, §˜«ã©«œ ¡˜  + ¥œ¡ ¤ã©«œ ˜§æ «ž¤ ˜¨®ã. + +---> There are a some words fun that don't belong paper in this sentence. + + 5. „§˜¤˜¢á™œ«œ «˜ ™ã£˜«˜ 3 ¡˜  4 £â®¨  ž §¨æ«˜©ž ¤˜ œå¤˜  ©à©«ã ¡˜  + §žš˜å¤œ«œ ©«¦ ‹áŸž£˜ 2.2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 2.2: „ˆ‘‘Ž’„„‘ „Œ’ŽŠ„‘ ƒˆ€‚€”†‘ + + ** ¢ž¡«¨¦¢¦šã©«œ d$ š ˜ ¤˜ › ˜š¨á¯œ«œ £â®¨  «¦ «â¢¦ª «žª š¨˜££ãª. ** + + 1. ˜«ã©«œ š ˜ ¤˜ ™œ™˜ àŸœå«œ æ«  œå©«œ ©«ž¤ ‰˜¤¦¤ ¡ã ‰˜«á©«˜©ž. + + 2. ‹œ«˜¡ ¤œå©«œ «¦¤ ›¨¦£â˜ ©«ž¤ §˜¨˜¡á«à š¨˜££ã ©ž£œ à£â¤ž £œ --->. + + 3. ‹œ«˜¡ ¤œå©«œ «¦¤ ›¨¦£â˜ ©«¦ «â¢¦ª «žª ©à©«ãª š¨˜££ãª (‹„’€ «ž¤ §¨é«ž . ). + + 4. ˜«ã©«œ d$ š ˜ ¤˜ › ˜š¨á¯œ«œ £â®¨  «¦ «â¢¦ª «žª š¨˜££ãª. + +---> Somebody typed the end of this line twice. end of this line twice. + + 5. žš˜å¤œ«œ ©«¦ ‹áŸž£˜ 2.3 š ˜ ¤˜ ¡˜«˜¢á™œ«œ «  ©¬£™˜å¤œ . + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 2.3: „ˆ „Œ’ŽŠ—Œ ‰€ˆ €Œ’ˆ‰„ˆ‹„Œ—Œ + + +† £¦¨­ã «žª œ¤«¦¢ãª › ˜š¨˜­ãª d œå¤˜  ઠœ¥ãª: + + [˜¨ Ÿ£æª] d ˜¤« ¡œå£œ¤¦ ì d [˜¨ Ÿ£æª] ˜¤« ¡œå£œ¤¦ + ¬: + ˜¨ Ÿ£æª - §æ©œª ­¦¨âª Ÿ˜ œ¡«œ¢œ©«œå ž œ¤«¦¢ã (§¨¦˜ ¨œ« ¡æ, œ¥' ¦¨ ©£¦ç=1). + d - ž œ¤«¦¢ã «žª › ˜š¨˜­ãª. + ˜¤« ¡œå£œ¤¦ - §á¤à ©œ «  Ÿ˜ ¢œ «¦¬¨šã©œ  ž œ¤«¦¢ã (§˜¨˜¡á«à ¢å©«˜). + + ‹å˜ £ ¡¨ã ¢å©«˜ ˜§æ ˜¤« ¡œå£œ¤˜: + w - ˜§æ «¦¤ ›¨¦£â˜ £â®¨  «¦ «â¢¦ª «žª ¢â¥žª, §œ¨ ¢˜£™á¤¦¤«˜ª «¦ › á©«ž£˜. + e - ˜§æ «¦¤ ›¨¦£â˜ £â®¨  «¦ «â¢¦ª «žª ¢â¥žª, •—ˆ‘ «¦ › á©«ž£˜. + $ - ˜§æ «¦¤ ›¨¦£â˜ £â®¨  «¦ «â¢¦ª «žª š¨˜££ãª. + +‘†‹„ˆ—‘†: ‚ ˜ «¦¬ª «ç§¦¬ª «žª §œ¨ §â«œ ˜ª, §˜«é¤«˜ª ˜§¢éª «¦ ˜¤« ¡œå£œ¤¦ 橦 + œå©«œ ©«ž¤ ‰˜¤¦¤ ¡ã ‰˜«á©«˜©ž ®à¨åª ¡á§¦ ˜ œ¤«¦¢ã Ÿ˜ £œ«˜¡ ¤ã©œ«œ + «¦¤ ›¨¦£â˜ æ§àª ¡˜Ÿ¦¨åœ«˜  ©«ž¤ ¢å©«˜ ˜¤« ¡œ £â¤à¤. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 2.4: ‹ˆ€ „€ˆ„‘† ‘’†Œ '„Œ’ŽŠ†-€Œ’ˆ‰„ˆ‹„ŒŽ' + + ** ¢ž¡«¨¦¢¦šã©«œ dd š ˜ ¤˜ › ˜š¨á¯œ«œ 梞 «ž š¨˜££ã. ** + + „¥˜ «å˜ª «žª ©¬®¤æ«ž«˜ª «žª › ˜š¨˜­ãª ¦¢æ¡¢ž¨žª š¨˜££ãª, ¦  ©®œ› ˜©«âª + «¦¬ Vim ˜§¦­á© ©˜¤ æ«  Ÿ˜ 㫘¤ œ¬¡¦¢æ«œ¨¦ ¤˜ š¨á­œ«œ ˜§¢éª ›ç¦ d ©«ž + ©œ ¨á š ˜ ¤˜ › ˜š¨á¯œ«œ £å˜ š¨˜££ã. + + 1. ‹œ«˜¡ ¤œå©«œ «¦¤ ›¨¦£â˜ ©«ž ›œç«œ¨ž š¨˜££ã «žª §˜¨˜¡á«à ­¨á©žª. + 2. ‚¨á¯«œ dd š ˜ ¤˜ › ˜š¨á¯œ«œ «ž š¨˜££ã. + 3. ’騘 £œ«˜¡ ¤žŸœå«œ ©«ž¤ «â«˜¨«ž š¨˜££ã. + 4. ‚¨á¯«œ 2dd (Ÿ¬£žŸœå«œ ˜¨ Ÿ£æª-œ¤«¦¢ã-˜¤« ¡œå£œ¤¦) š ˜ ¤˜ + › ˜š¨á¯œ«œ ›ç¦ š¨˜££âª. + + 1) Roses are red, + 2) Mud is fun, + 3) Violets are blue, + 4) I have a car, + 5) Clocks tell time, + 6) Sugar is sweet + 7) And so are you. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 2.5: † „Œ’ŽŠ† €Œ€ˆ„‘†‘ + + ** ˜«ã©«œ u š ˜ ¤˜ ˜¤˜ ¨â©œ«œ « ª «œ¢œ¬«˜åœª œ¤«¦¢âª, + U š ˜ ¤˜ › ¦¨Ÿé©œ«œ 梞 «ž š¨˜££ã. ** + + 1. ‹œ«˜¡ ¤œå©«œ «¦¤ ›¨¦£â˜ ©«ž¤ §˜¨˜¡á«à š¨˜££ã ©ž£œ à£â¤ž £œ ---> ¡˜  + «¦§¦Ÿœ«ã©«œ «¦¤ §á¤à ©«¦ §¨é«¦ ¢áŸ¦ª. + 2. ˜«ã©«œ x š ˜ ¤˜ › ˜š¨á¯œ«œ «¦¤ §¨é«¦ ˜¤œ§ Ÿç£ž«¦ ®˜¨˜¡«ã¨˜. + 3. ’騘 §˜«ã©«œ u š ˜ ¤˜ ˜¤˜ ¨â©œ«œ «ž¤ «œ¢œ¬«˜å˜ œ¡«œ¢œ©£â¤ž œ¤«¦¢ã. + 4. €¬«ã «ž ­¦¨á › ¦¨Ÿé©«œ 梘 «˜ ¢áŸž ©«ž š¨˜££ã ®¨ž© £¦§¦ é¤«˜ª «ž¤ œ¤«¦¢ã x. + 5. ’騘 §˜«ã©«œ ⤘ ¡œ­˜¢˜å¦ U š ˜ ¤˜ œ§ ©«¨â¯œ«œ «ž š¨˜££ã ©«ž¤ ˜¨® ¡ã + «žª ¡˜«á©«˜©ž. + 6. ’騘 §˜«ã©«œ u £œ¨ ¡âª ­¦¨âª š ˜ ¤˜ ˜¤˜ ¨â©œ«œ «ž¤ U ¡˜  + §¨¦žš¦ç£œ¤œª œ¤«¦¢âª. + 7. ’騘 §˜«ã©«œ CTRL-R (¡¨˜«é¤«˜ª §˜«ž£â¤¦ «¦ §¢ã¡«¨¦ CTRL ¡˜Ÿéª §˜«á«œ «¦ R) + £œ¨ ¡âª ­¦¨âª š ˜ ¤˜ œ§˜¤˜­â¨œ«œ « ª œ¤«¦¢âª (˜¤˜å¨œ©ž «à¤ ˜¤˜ ¨â©œà¤). + +---> Fiix the errors oon thhis line and reeplace them witth undo. + + 8. €¬«âª œå¤˜  §¦¢ç ®¨ã© £œª œ¤«¦¢âª. ’騘 §žš˜å¤œ«œ ©«ž¤ + œ¨å¢ž¯ž «¦¬ ‹˜Ÿã£˜«¦ª 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹€‡†‹€ 2 „ˆŠ†–† + + + 1. ‚ ˜ ¤˜ › ˜š¨á¯œ«œ ˜§æ «¦¤ ›¨¦£â˜ £â®¨  «¦ «â¢¦ª ¢â¥žª š¨á¯«œ: dw + + 2. ‚ ˜ ¤˜ › ˜š¨á¯œ«œ ˜§æ «¦¤ ›¨¦£â˜ £â®¨  «¦ «â¢¦ª š¨˜££ãª š¨á¯«œ: d$ + + 3. ‚ ˜ ¤˜ › ˜š¨á¯œ«œ ¦¢æ¡¢ž¨ž «ž š¨˜££ã š¨á¯«œ: dd + + 4. † £¦¨­ã š ˜ £å˜ œ¤«¦¢ã ©«ž¤ ‰˜¤¦¤ ¡ã ‰˜«á©«˜©ž œå¤˜ : + + [˜¨ Ÿ£æª] œ¤«¦¢ã ˜¤« ¡œå£œ¤¦ ì œ¤«¦¢ã [˜¨ Ÿ£æª] ˜¤« ¡œå£œ¤¦ + 槦¬: + ˜¨ Ÿ£æª - §æ©œª ­¦¨âª ¤˜ œ§˜¤˜¢ž­Ÿœå ž œ¤«¦¢ã + œ¤«¦¢ã - «  ¤˜ šå¤œ , æ§àª ž d š ˜ › ˜š¨˜­ã + ˜¤« ¡œå£œ¤¦ - §á¤à ©œ «  ¤˜ œ¤œ¨šã©œ  ž œ¤«¦¢ã, æ§àª w (¢â¥ž), + $ («â¢¦ª «žª š¨˜££ãª), ¡«¢. + + 5. ‚ ˜ ¤˜ ˜¤˜ ¨â©œ«œ §¨¦žš¦ç£œ¤œª œ¤â¨šœ œª, §˜«ã©«œ: u (§œæ u) + ‚ ˜ ¤˜ ˜¤˜ ¨â©œ«œ 梜ª « ª ˜¢¢˜šâª ©«ž š¨˜££ã, §˜«ã©«œ: U (¡œ­˜¢˜å¦ U) + ‚ ˜ ¤˜ ˜¤˜ ¨â©œ«œ « ª ˜¤˜ ¨â©œ ª, §˜«ã©«œ: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 3.1: † „Œ’ŽŠ† ’ŽŽ‡„’†‘†‘ + + + ** ˜«ã©«œ p š ˜ ¤˜ «¦§¦Ÿœ«ã©œ«œ «ž¤ «œ¢œ¬«˜å˜ › ˜š¨˜­ã £œ«á «¦¤ ›¨¦£â˜. ** + + 1. ‹œ«˜¡ ¤œå©«œ «¦¤ ›¨¦£â˜ ©«ž¤ §¨é«ž š¨˜££ã «žª §˜¨˜¡á«à ¦£á›˜ª. + + 2. ˜«ã©«œ dd š ˜ ¤˜ › ˜š¨á¯œ«œ «ž š¨˜££ã ¡˜  ¤˜ «ž¤ ˜§¦Ÿž¡œç©œ«œ ©œ + §¨¦©à¨ ¤ã £¤ã£ž «¦¬ Vim. + + 3. ‹œ«˜¡ ¤œå©«œ «¦¤ ›¨¦£â˜ ©«ž š¨˜££ã €Œ— ˜§æ œ¡œå §¦¬ Ÿ˜ §¨â§œ  ¤˜ §áœ  + ž › ˜š¨˜££â¤ž š¨˜££ã. + + 4.  œå©«œ ©œ ‰˜¤¦¤ ¡ã ‰˜«á©«˜©ž, §˜«ã©«œ p š ˜ ¤˜ ™á¢œ«œ «ž š¨˜££ã. + + 5. „§˜¤˜¢á™œ«œ «˜ ™ã£˜«˜ 2 âઠ4 š ˜ ¤˜ ™á¢œ«œ 梜ª « ª š¨˜££âª ©«ž + ©à©«ã ©œ ¨á. + + d) Can you learn too? + b) Violets are blue, + c) Intelligence is learned, + a) Roses are red, + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 3.2: † „Œ’ŽŠ† €Œ’ˆ‰€’€‘’€‘†‘ + + + ** ˜«ã©«œ r ¡˜  ®˜¨˜¡«ã¨˜ š ˜ ¤˜ ˜¢¢á¥œ«œ ˜¬«æ¤ §¦¬ œå¤˜  + ¡á«à ˜§æ «¦¤ ›¨¦£â˜. ** + + 1. ‹œ«˜¡ ¤œå©«œ «¦¤ ›¨¦£â˜ ©«ž¤ §¨é«ž š¨˜££ã §˜¨˜¡á«à ©ž£œ à£â¤ž £œ --->. + + 2. ‹œ«˜¡ ¤œå©«œ «¦¤ ›¨¦£â˜ â«©  é©«œ ¤˜ œå¤˜  §á¤à ©«¦ §¨é«¦ ¢áŸ¦ª. + + 3. ˜«ã©«œ r ¡˜  £œ«á «¦¤ ®˜¨˜¡«ã¨˜ ¦ ¦§¦å¦ª › ¦¨Ÿé¤œ  «¦ ¢áŸ¦ª. + + 4. „§˜¤˜¢á™œ«œ «˜ ™ã£˜«˜ 2 ¡˜  3 £â®¨  ¤˜ œå¤˜  ©à©«ã ž §¨é«ž š¨˜££ã. + +---> Whan this lime was tuoed in, someone presswd some wrojg keys! +---> When this line was typed in, someone pressed some wrong keys! + + 5. ’騘 §žš˜å¤œ«œ ©«¦ ‹áŸž£˜ 3.2. + +‘†‹„ˆ—‘†: Œ˜ Ÿ¬£á©«œ æ«  §¨â§œ  ¤˜ £˜Ÿ˜å¤œ«œ £œ «ž ®¨ã©ž, ¡˜  æ®  £œ + «ž¤ ˜§¦£¤ž£æ¤œ¬©ž. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 3.3: † „Œ’ŽŠ† €ŠŠ€‚†‘ + + ** ‚ ˜ ¤˜ ˜¢¢á¥œ«œ «£ã£˜ ã æ¢ž «ž ¢â¥ž, §˜«ã©«œ cw . ** + + 1. ‹œ«˜¡ ¤œå©«œ «¦¤ ›¨¦£â˜ ©«ž¤ §¨é«ž š¨˜££ã §˜¨˜¡á«à ©ž£œ à£â¤ž £œ --->. + + 2. ’¦§¦Ÿœ«ã©«œ «¦¤ ›¨¦£â˜ §á¤à ©«¦ u «žª ¢â¥žª lubw. + + 3. ˜«ã©«œ cw ¡˜  «ž ©à©«ã ¢â¥ž (©«ž¤ §œ¨å§«à©ž ˜¬«ã, š¨á¯«œ 'ine'.) + + 4. ˜«ã©«œ ¡˜  §žš˜å¤œ«œ ©«¦ œ§æ£œ¤¦ ¢áŸ¦ª (©«¦¤ §¨é«¦ + ®˜¨˜¡«ã¨˜ §¨¦ª ˜¢¢˜šã). + + 5. „§˜¤˜¢á™œ«œ «˜ ™ã£˜«˜ 3 ¡˜  4 £â®¨ ª 櫦¬ ž §¨é«ž §¨æ«˜©ž ¤˜ œå¤˜  + å› ˜ £œ «ž ›œç«œ¨ž. + +---> This lubw has a few wptfd that mrrf changing usf the change command. +---> This line has a few words that need changing using the change command. + +˜¨˜«ž¨œå©«œ æ«  ž cw æ®  £æ¤¦ ˜¤« ¡˜Ÿ ©«áœ  «ž ¢â¥ž, ˜¢¢á ©˜ª œ ©ášœ  +œ§å©žª ©œ §˜¨œ£™¦¢ã. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 3.4: „ˆ‘‘Ž’„„‘ €ŠŠ€‚„‘ ‹„ c + + + ** † œ¤«¦¢ã ˜¢¢˜šãª ®¨ž© £¦§¦ œå«˜  £œ «˜ å› ˜ ˜¤« ¡œå£œ¤˜ «žª › ˜š¨˜­ãª. ** + + + 1. † œ¤«¦¢ã ˜¢¢˜šãª ›¦¬¢œçœ  £œ «¦¤ å› ¦ «¨æ§¦ æ§àª ž › ˜š¨˜­ã. † £¦¨­ã œå¤˜ : + + [˜¨ Ÿ£æª] c ˜¤« ¡œå£œ¤¦ ì c [˜¨ Ÿ£æª] ˜¤« ¡œå£œ¤¦ + + 2. ’˜ ˜¤« ¡œå£œ¤˜ œå¤˜  §á¢  «˜ å› ˜, æ§àª w (¢â¥ž), $ («â¢¦ª š¨˜££ãª), ¡«¢. + + 3. ‹œ«˜¡ ¤žŸœå«œ ©«ž¤ §¨é«ž š¨˜££ã §˜¨˜¡á«à ©ž£œ à£â¤ž £œ --->. + + 4. ‹œ«˜¡ ¤œå©«œ «¦¤ ›¨¦£â˜ ©«¦ §¨é«¦ ¢áŸ¦ª. + + 5. ‚¨á¯«œ c$ š ˜ ¤˜ ¡á¤œ«œ «¦ ¬§æ¢¦ §¦ «žª š¨˜££ãª å› ¦ £œ «ž ›œç«œ¨ž + ¡˜  §˜«ã©«œ . + +---> The end of this line needs some help to make it like the second. +---> The end of this line needs to be corrected using the c$ command. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹€‡†‹€ 3 „ˆŠ†–† + + + 1. ‚ ˜ ¤˜ «¦§¦Ÿœ«ã©œ«œ ¡œå£œ¤¦ §¦¬ £æ¢ ª ⮜  › ˜š¨˜­œå, §˜«ã©«œ p . + €¬«æ «¦§¦Ÿœ«œå «¦ › ˜š¨˜££â¤¦ ¡œå£œ¤¦ ‹„’€ «¦¤ ›¨¦£â˜ (˜¤ › ˜š¨á­«ž¡œ + š¨˜££ã Ÿ˜ §áœ  £œ«á ©«ž š¨˜££ã ¡á«à ˜§æ «¦¤ ›¨¦£â˜. + + 2. ‚ ˜ ¤˜ ˜¤« ¡˜«˜©«ã©œ«œ «¦¤ ®˜¨˜¡«ã¨˜ ¡á«à ˜§æ «¦¤ ›¨¦£â˜, §˜«ã©«œ r + ¡˜  £œ«á «¦¤ ®˜¨˜¡«ã¨˜ §¦¬ Ÿ˜ ˜¤« ¡˜«˜©«ã©œ  «¦¤ ˜¨® ¡æ. + + 3. † œ¤«¦¢ã ˜¢¢˜šãª ©˜ª œ§ «¨â§œ  ¤˜ ˜¢¢á¥œ«œ «¦ ¡˜Ÿ¦¨ ©£â¤¦ ˜¤« ¡œå£œ¤¦ + ˜§æ «¦¤ ›¨¦£â˜ £â®¨  «¦ «â¢¦ª «¦¬ ˜¤« ¡œå£œ¤¦. .®. š¨á¯«œ cw š ˜ ¤˜ + ˜¢¢á¥œ«œ ˜§æ «¦¤ ›¨¦£â˜ £â®¨  «¦ «â¢¦ª «žª ¢â¥žª, c$ š ˜ ¤˜ ˜¢¢á¥œ«œ + £â®¨  «¦ «â¢¦ª š¨˜££ãª. + + 4. † £¦¨­ã š ˜ «ž¤ ˜¢¢˜šã œå¤˜ : + + [˜¨ Ÿ£æª] c ˜¤« ¡œå£œ¤¦ ì c [˜¨ Ÿ£æª] ˜¤« ¡œå£œ¤¦ + +’騘 ©¬¤œ®å©«œ £œ «¦ œ§æ£œ¤¦ £áŸž£˜. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 4.1: ‡„‘† ‰€ˆ ‰€’€‘’€‘† €•„ˆŽ“ + + + ** ˜«ã©«œ CTRL-g š ˜ ¤˜ œ£­˜¤ ©«œå ž Ÿâ©ž ©˜ª ©«¦ ˜¨®œå¦ ¡˜  ž ¡˜«á©«˜©ã «¦¬. + ˜«ã©«œ SHIFT-G š ˜ ¤˜ §á«œ ©œ £å˜ š¨˜££ã ©«¦ ˜¨®œå¦. ** + + ‘ž£œåਫ਼: ƒ ˜™á©«œ ¦¢æ¡¢ž¨¦ «¦ £áŸž£˜ §¨ ¤ œ¡«œ¢â©œ«œ ¡á§¦ ¦ ˜§æ «˜ ™ã£˜«˜!! + + 1. ‰¨˜«ã©«œ §˜«ž£â¤¦ «¦ §¢ã¡«¨¦ Ctrl ¡˜  §˜«ã©«œ g . ‹å˜ š¨˜££ã ¡˜«á©«˜©žª + Ÿ˜ œ£­˜¤ ©«œå ©«¦ ¡á«à £â¨¦ª «žª ©œ¢å›˜ª £œ «¦ 椦£˜ ˜¨®œå¦¬ ¡˜  «ž + š¨˜££ã §¦¬ œå©«œ. ‡¬£žŸœå«œ «¦¤ ˜¨ Ÿ£æ š¨˜££ãª š ˜ «¦ 㣘 3. + + 2. ˜«ã©«œ shift-G š ˜ ¤˜ £œ«˜¡ ¤žŸœå«œ ©«¦ «â¢¦ª «¦¬ ˜¨®œå¦¬. + + 3. ˜«ã©«œ «¦¤ ˜¨ Ÿ£æ «žª š¨˜££ãª §¦¬ 㩘©«˜¤ ¡˜  £œ«á shift-G. €¬«æ Ÿ˜ + ©˜ª œ§ ©«¨â¯œ  ©«ž š¨˜££ã §¦¬ 㩘©«˜¤ §¨ ¤ §˜«ã©œ«œ š ˜ §¨é«ž ­¦¨á Ctrl-g. + (¤ §¢ž¡«¨¦¢¦šœå«œ «¦¬ª ˜¨ Ÿ£¦çª, ƒ„Œ Ÿ˜ œ£­˜¤å¦¤«˜  ©«ž¤ ¦Ÿæ¤ž). + + 4. €¤ ¤¦ éŸœ«œ ©å𦬍¦ª š ˜ ˜¬«æ, œ¡«œ¢â©«œ «˜ ™ã£˜«˜ 1 âઠ3. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 4.2: † „Œ’ŽŠ† €Œ€…†’†‘†‘ + + + ** ˜«ã©«œ / ˜¡¦¢¦¬Ÿ¦ç£œ¤¦ ˜§æ «ž ­¨á©ž §¦¬ ¯á®¤œ«œ. ** + + 1. ‘œ ‰˜¤¦¤ ¡ã ‰˜«á©«˜©ž §˜«ã©«œ «¦¤ ®˜¨˜¡«ã¨˜ / . ˜¨˜«ž¨ã©«œ æ«  ˜¬«æª ¡˜  + ¦ ›¨¦£â˜ª œ£­˜¤å¦¤«˜  ©«¦ ¡á«à £â¨¦ª «žª ¦Ÿæ¤žª æ§àª £œ «ž¤ œ¤«¦¢ã : . + + 2. ’騘 š¨á¯«œ 'errroor' . €¬«ã œå¤˜  ž ¢â¥ž §¦¬ Ÿâ¢œ«œ ¤˜ ¯á¥œ«œ. + + 3. ‚ ˜ ¤˜ ¯á¥œ«œ ¥˜¤á š ˜ «ž¤ å› ˜ ­¨á©ž, §˜«ã©«œ ˜§¢éª n . + ‚ ˜ ¤˜ ¯á¥œ«œ «ž¤ å› ˜ ­¨á©ž ©«ž¤ ˜¤«åŸœ«ž ¡˜«œçŸ¬¤©ž, §˜«ã©«œ Shift-N . + + 4. €¤ Ÿâ¢œ«œ ¤˜ ¯á¥œ«œ š ˜ £å˜ ­¨á©ž §¨¦ª «˜ §å©à, ®¨ž© £¦§¦ ã©«œ «ž¤ œ¤«¦¢ã ? ˜¤«å «žª / . + +---> ¤ ž ˜¤˜ã«ž©ž ­«á©œ  ©«¦ «â¢¦ª «¦¬ ˜¨®œå¦¬ Ÿ˜ ©¬¤œ®å©œ  ˜§æ «ž¤ ˜¨®ã. + + "errroor" is not the way to spell error; errroor is an error. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 4.3: „“„‘† ’€ˆˆ€‘’—Œ €„Œ‡„‘„—Œ + + + ** ˜«ã©«œ % š ˜ ¤˜ ™¨œå«œ «ž¤ ˜¤«å©«¦ ®ž ), ], ã } . ** + + 1. ’¦§¦Ÿœ«ã©«œ «¦¤ ›¨¦£â˜ ©œ ¡á§¦ ˜ (, [, ã { ©«ž¤ §˜¨˜¡á«à š¨˜££ã + ©ž£œ à£â¤ž £œ --->. + + 2. ’騘 §˜«ã©«œ «¦¤ ®˜¨˜¡«ã¨˜ % . + + 3. Ž ›¨¦£â˜ª Ÿ˜ §¨â§œ  ¤˜ œå¤˜  ©«ž¤ ˜¤«å©«¦ ®ž §˜¨â¤Ÿœ©ž ã ˜š¡ç¢ž. + + 4. ˜«ã©«œ % š ˜ ¤˜ £œ«˜¡ ¤ã©œ«œ «¦¤ ›¨¦£â˜ §å©à ©«ž¤ §¨é«ž ˜š¡ç¢ž + («¦¬ œ¬š˜¨ ¦ç). + +---> This ( is a test line with ('s, ['s ] and {'s } in it. )) + +‘†‹„ˆ—‘†: €¬«æ œå¤˜  §¦¢ç ®¨ã© £¦ ©«ž¤ ˜§¦©­˜¢£á«à©ž œ¤æª §¨¦š¨á££˜«¦ª + £œ £ž «˜ ¨ ˜©«âª §˜¨œ¤Ÿâ©œ ª! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 4.4: „Œ€‘ ’ŽŽ‘ ‚ˆ€ €ŠŠ€‚† Š€‡—Œ + + + ** ‚¨á¯«œ :s/old/new/g š ˜ ¤˜ ˜¢¢á¥œ«œ «¦ 'new' £œ «¦ 'old'. ** + + 1. ‹œ«˜¡ ¤œå©«œ «¦¤ ›¨¦£â˜ ©«ž¤ §˜¨˜¡á«à š¨˜££ã ©ž£œ à£â¤ž £œ --->. + + 2. ‚¨á¯«œ :s/thee/the . ‘ž£œ é©«œ æ«  ˜¬«ã ž œ¤«¦¢ã ˜¢¢áœ  £æ¤¦ + «ž¤ §¨é«ž œ£­á¤ ©ž ©«ž š¨˜££ã. + + 3. ’騘 š¨á¯«œ :s/thee/the/g œ¤¤¦é¤«˜ª šœ¤ ¡ã ˜¤« ¡˜«á©«˜©ž ©«ž + š¨˜££ã. €¬«æ ˜¢¢áœ  梜ª « ª œ£­˜¤å©œ ª œ§å «žª š¨˜££ãª. + +---> thee best time to see thee flowers is in thee spring. + + 4. ‚ ˜ ¤˜ ˜¢¢á¥œ«œ ¡áŸœ œ£­á¤ ©ž £å˜ª ©¬£™¦¢¦©œ ¨áª £œ«˜¥ç ›ç¦ š¨˜££é¤, + š¨á¯«œ :#,#s/old/new/g 槦¬ #,# ¦  ˜¨ Ÿ£¦å «à¤ ›ç¦ š¨˜££é¤. + ‚¨á¯«œ :%s/old/new/g š ˜ ¤˜ ˜¢¢á¥œ«œ ¡áŸœ œ£­á¤ ©ž ©œ 梦 «¦ ˜¨®œå¦. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹€‡†‹€ 4 „ˆŠ†–† + + + 1. ’¦ Ctrl-g œ£­˜¤åœ  «ž Ÿâ©ž ©˜ª ©«¦ ˜¨®œå¦ ¡˜  «ž¤ ¡˜«á©«˜©ã «¦¬. + ’¦ Shift-G §žš˜å¤œ  ©«¦ «â¢¦ª «¦¬ ˜¨®œå¦¬. 뤘ª ˜¨ Ÿ£æª š¨˜££ãª + ˜¡¦¢¦¬Ÿ¦ç£œ¤¦ª ˜§æ Shift-G §žš˜å¤œ  ©œ œ¡œå¤ž «ž š¨˜££ã. + + 2. ‚¨á­¦¤«˜ª / ˜¡¦¢¦¬Ÿ¦ç£œ¤¦ ˜§æ £å˜ ­¨á©ž ¯á®¤œ  §¨¦ª «˜ ‹Ž‘’€ š ˜ + «ž ­¨á©ž. ‚¨á­¦¤«˜ª ? ˜¡¦¢¦¬Ÿ¦ç£œ¤¦ ˜§æ £å˜ ­¨á©ž ¯á®¤œ  §¨¦ª «˜ ˆ‘— + š ˜ «ž ­¨á©ž. ‹œ«á ˜§æ £å˜ ˜¤˜ã«ž©ž §˜«ã©«œ n š ˜ ¤˜ ™¨œå«œ «ž¤ + œ§æ£œ¤ž œ£­á¤ ©ž §¨¦ª «ž¤ å› ˜ ¡˜«œçŸ¬¤©ž ã Shift-N š ˜ ¤˜ ¯á¥œ«œ + §¨¦ª «ž¤ ˜¤«åŸœ«ž ¡˜«œçŸ¬¤©ž. + + 3. ˜«é¤«˜ª % 橦 ¦ ›¨¦£â˜ª œå¤˜  §á¤à ©œ £å˜ (,),[,],{, ã } œ¤«¦§åœ  + «¦ ˜¤«å©«¦ ®¦ «˜å¨  «¦¬ œ¬š˜¨ ¦ç. + + 4. ‚ ˜ ˜¤« ¡˜«á©«˜©ž £œ new «¦¬ §¨é«¦¬ old ©«ž š¨˜££ã š¨á¯«œ :s/old/new + ‚ ˜ ˜¤« ¡˜«á©«˜©ž £œ new æ¢à¤ «à¤ 'old' ©«ž š¨˜££ã š¨á¯«œ :s/old/new/g + ‚ ˜ ˜¤« ¡˜«á©«˜©ž ­¨á©œà¤ £œ«˜¥ç ›ç¦ # š¨˜££é¤ š¨á¯«œ :#,#s/old/new/g + ‚ ˜ ˜¤« ¡˜«á©«˜©ž æ¢à¤ «à¤ œ£­˜¤å©œà¤ ©«¦ ˜¨®œå¦ š¨á¯«œ :%s/old/new/g + ‚ ˜ œ¨é«ž©ž œ§ ™œ™˜åਫ਼ª ¡áŸœ ­¦¨á §¨¦©Ÿâ©«œ ⤘ 'c' "%s/old/new/gc + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 5.1: —‘ „‰’„Š— ‹ˆ€ „—’„ˆ‰† „Œ’ŽŠ† + + +** ‚¨á¯«œ :! ˜¡¦¢¦¬Ÿ¦ç£œ¤¦ ˜§æ £å˜ œ¥à«œ¨ ¡ã œ¤«¦¢ã š ˜ ¤˜ «ž¤ œ¡«œ¢â©œ«œ. ** + + 1. ˜«ã©«œ «ž¤ ¦ ¡œå˜ œ¤«¦¢ã : š ˜ ¤˜ Ÿâ©œ«œ «¦¤ ›¨¦£â˜ ©«¦ ¡á«à £â¨¦ª + «žª ¦Ÿæ¤žª. €¬«æ ©˜ª œ§ «¨â§œ  ¤˜ ›é©œ«œ £å˜ œ¤«¦¢ã. + + 2. ’騘 §˜«ã©«œ «¦ ! (Ÿ˜¬£˜©« ¡æ). €¬«æ ©˜ª œ§ «¨â§œ  ¤˜ œ¡«œ¢â©œ«œ + ¦§¦ ˜›ã§¦«œ œ¥à«œ¨ ¡ã œ¤«¦¢ã «¦¬ ­¢¦ ¦ç. + + 3. ‘˜¤ §˜¨á›œ š£˜ š¨á¯«œ ls £œ«á ˜§æ «¦ ! ¡˜  §˜«ã©«œ . €¬«æ Ÿ˜ + ©˜ª œ£­˜¤å©œ  £å˜ ¢å©«˜ «¦¬ ¡˜«˜¢æš¦¬ ©˜ª, ˜¡¨ ™éª ©˜¤ ¤˜ 㩘©«˜¤ ©«ž¤ + §¨¦«¨¦§ã «¦¬ ­¢¦ ¦ç. ì ®¨ž© £¦§¦ ã©«œ :!dir ˜¤ «¦ ls ›œ¤ ›¦¬¢œçœ . + +---> ‘ž£œåਫ਼: „夘  ›¬¤˜«æ¤ ¤˜ œ¡«œ¢â©œ«œ ¦§¦ ˜›ã§¦«œ œ¥à«œ¨ ¡ã œ¤«¦¢ã + £œ ˜¬«æ¤ «¦¤ «¨æ§¦. + +---> ‘ž£œåਫ਼: ª ¦  œ¤«¦¢âª : §¨â§œ  ¤˜ «œ¨£˜«å¦¤«˜  §˜«é¤«˜ª «¦ . + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 5.2: „ˆ‘‘Ž’„€ „ˆ „‚‚€”†‘ €•„ˆ—Œ + + + ** ‚ ˜ ¤˜ ©é©œ«œ « ª ˜¢¢ášœª §¦¬ ¡á¤˜«œ ©«¦ ˜¨®œå¦, š¨á¯«œ :w €•„ˆŽ. ** + + 1. ‚¨á¯«œ :!dir ã :!ls š ˜ ¤˜ §á¨œ«œ £å˜ ¢å©«˜ «¦¬ ¡˜«˜¢æš¦¬ ©˜ª. + 웞 ¥â¨œ«œ æ«  §¨â§œ  ¤˜ §˜«ã©œ«œ £œ«á ˜§æ ˜¬«æ. + + 2. ƒ ˜¢â¥«œ ⤘ 椦£˜ ˜¨®œå¦¬ §¦¬ ›œ¤ ¬§á¨®œ  ˜¡æ£˜, æ§àª «¦ TEST. + + 3. ’騘 š¨á¯«œ: :w TEST (槦¬ TEST œå¤˜  «¦ 椦£˜ ˜¨®œå¦¬ §¦¬ › ˜¢â¥˜«œ). + + 4. €¬«æ ©éœ  梦 «¦ ˜¨®œå¦ (vim Tutor) £œ «¦ 椦£˜ TEST. ‚ ˜ ¤˜ «¦ + œ§˜¢žŸœç©œ«œ, š¨á¯«œ ¥˜¤á :!dir š ˜ ¤˜ ›œå«œ «¦¤ ¡˜«á¢¦šæ ©˜ª. + +---> ‘ž£œ é©«œ æ«  ˜¤ ™š˜å¤˜«œ ˜§æ «¦¤ Vim ¡˜  £§˜å¤˜«œ ¥˜¤á £œ «¦ 椦£˜ + ˜¨®œå¦¬ TEST, «¦ ˜¨®œå¦ Ÿ˜ 㫘¤ ˜¡¨ ™âª ˜¤«åš¨˜­¦ «¦¬ tutor 櫘¤ «¦ ©é©˜«œ. + + 5. ’騘 › ˜š¨á¯«œ «¦ ˜¨®œå¦ š¨á­¦¤«˜ª (MS-DOS): :!del TEST + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 5.3: „ˆŠ„‰’ˆ‰† „Œ’ŽŠ† „‚‚€”†‘ + + + ** ‚ ˜ ¤˜ ©é©œ«œ «£ã£˜ «¦¬ ˜¨®œå¦¬, š¨á¯«œ :#,# w €•„ˆŽ ** + + 1. ꢢž £ ˜ ­¦¨á, š¨á¯«œ :!dir ã :!ls š ˜ ¤˜ §á¨œ«œ £å˜ ¢å©«˜ ˜§æ «¦¤ + ¡˜«á¢¦šæ ©˜ª ¡˜  › ˜¢â¥«œ ⤘ ¡˜«á¢¢ž¢¦ 椦£˜ ˜¨®œå¦¬ æ§àª «¦ TEST. + + 2. ‹œ«˜¡ ¤œå©«œ «¦¤ ›¨¦£â˜ ©«¦ §á¤à £â¨¦ª ˜¬«ãª «žª ©œ¢å›˜ª ¡˜  §˜«ã©«œ + Ctrl-g š ˜ ¤˜ ™¨œå«œ «¦¤ ˜¨ Ÿ£æ ˜¬«ãª «žª š¨˜££ãª. + Œ€ ‡“‹€‘’„ €“’ŽŒ ’ŽŒ €ˆ‡‹Ž! + + 3. ’騘 §žš˜å¤œ«œ ©«¦ ¡á«à £â¨¦ª «žª ©œ¢å›˜ª ¡˜  §˜«ã©«œ Ctrl-g ¥˜¤á. + Œ€ ‡“‹€‘’„ ‰€ˆ €“’ŽŒ ’ŽŒ €ˆ‡‹Ž! + + 4. ‚ ˜ ¤˜ ©é©œ«œ ‹ŽŒŽ ⤘ «£ã£˜ ©œ ˜¨®œå¦, š¨á¯«œ :#,# w TEST + 槦¬ #,# ¦  ›ç¦ ˜¨ Ÿ£¦å §¦¬ ˜§¦£¤ž£¦¤œç©˜«œ (§á¤à,¡á«à) ¡˜  TEST «¦ + 椦£˜ «¦¬ ˜¨®œå¦¬ ©˜ª. + + 5. ˜¤á, ›œå«œ æ«  «¦ ˜¨®œå¦ œå¤˜  œ¡œå £œ «ž¤ :!dir ˜¢¢á ‹†Œ «¦ › ˜š¨á¯œ«œ. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 5.4: €Œ€‰’—Œ’€‘ ‰€ˆ „Œ—ŒŽŒ’€‘ €•„ˆ€ + + + ** ‚ ˜ ¤˜ œ ©ášœ«œ «˜ §œ¨ œ®æ£œ¤˜ œ¤æª ˜¨®œå¦¬, š¨á¯«œ :r €•„ˆŽ ** + + 1. ‚¨á¯«œ :!dir š ˜ ¤˜ ™œ™˜ àŸœå«œ æ«  «¦ TEST ¬§á¨®œ  ˜§æ §¨ ¤. + + 2. ’¦§¦Ÿœ«ã©«œ «¦¤ ›¨¦£â˜ ©«¦ §á¤à £â¨¦ª «žª ©œ¢å›˜ª. + +‘†‹„ˆ—‘†: €­æ«¦¬ œ¡«œ¢â©œ«œ «¦ 㣘 3 Ÿ˜ ›œå«œ «¦ ‹áŸž£˜ 5.3. + ‹œ«á ¡ ¤žŸœå«œ ‰€’— ¥˜¤á §¨¦ª «¦ £áŸž£˜ ˜¬«æ. + + 3. ’騘 ˜¤˜¡«ã©«œ «¦ ˜¨®œå¦ ©˜ª TEST ®¨ž© £¦§¦ é¤«˜ª «ž¤ œ¤«¦¢ã :r TEST + 槦¬ TEST œå¤˜  «¦ 椦£˜ «¦¬ ˜¨®œå¦¬. + +‘†‹„ˆ—‘†: ’¦ ˜¨®œå¦ §¦¬ ˜¤˜¡«á«œ «¦§¦Ÿœ«œå«˜  ¥œ¡ ¤é¤«˜ª œ¡œå §¦¬ ™¨å©¡œ«˜  + ¦ ›¨¦£â˜ª. + + 4. ‚ ˜ ¤˜ œ§˜¢žŸœç©œ«œ æ«  «¦ ˜¨®œå¦ ˜¤˜¡«ãŸž¡œ, §å©à «¦¤ ›¨¦£â˜ ¡˜  + §˜¨˜«ž¨ã©«œ æ«  ¬§á¨®¦¬¤ «é¨˜ ›ç¦ ˜¤«åš¨˜­˜ «¦¬ ‹˜Ÿã£˜«¦ª 5.3, «¦ + ˜¨® ¡æ ¡˜  ž â¡›¦©ž «¦¬ ˜¨®œå¦¬. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹€‡†‹€ 5 „ˆŠ†–† + + + 1. :!œ¤«¦¢ã œ¡«œ¢œå £å˜ œ¥à«œ¨ ¡ã œ¤«¦¢ã. + + ‹œ¨ ¡á ®¨ã© £˜ §˜¨˜›œåš£˜«˜ œå¤˜  (MS-DOS): + :!dir - œ£­á¤ ©ž ¢å©«˜ª œ¤æª ¡˜«˜¢æš¦¬. + :!del €•„ˆŽ - › ˜š¨á­œ  «¦ €•„ˆŽ. + + 2. :w €•„ˆŽ š¨á­œ  «¦ «¨â®à¤ ˜¨®œå¦ «¦¬ Vim ©«¦ ›å©¡¦ £œ 椦£˜ €•„ˆŽ. + + 3. :#,#w €•„ˆŽ ©éœ  « ª š¨˜££âª ˜§æ # £â®¨  # ©«¦ €•„ˆŽ. + + 4. :r €•„ˆŽ ˜¤˜¡«œå «¦ ˜¨®œå¦ ›å©¡¦¬ €•„ˆŽ ¡˜  «¦ §˜¨œ£™á¢¢œ  £â©˜ + ©«¦ «¨â®¦¤ ˜¨®œå¦ £œ«á ˜§æ «ž Ÿâ©ž «¦¬ ›¨¦£â˜. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 6.1: † „Œ’ŽŠ† €ŒŽˆ‚‹€’Ž‘ + + + ** ˜«ã©«œ o š ˜ ¤˜ ˜¤¦å¥œ«œ £å˜ š¨˜££ã ¡á«à ˜§æ «¦¤ ›¨¦£â˜ ¡˜  ¤˜ + ™¨œŸœå«œ ©œ ‰˜«á©«˜©ž ‰œ £â¤¦¬. ** + + 1. ‹œ«˜¡ ¤œå©«œ «¦¤ ›¨¦£â˜ ©«ž¤ §˜¨˜¡á«à š¨˜££ã ©ž£œ à£â¤ž £œ --->. + + 2. ˜«ã©«œ o (§œæ) š ˜ ¤˜ ˜¤¦å¥œ«œ £å˜ š¨˜££ã ‰€’— ˜§æ «¦¤ ›¨¦£â˜ ¡˜  ¤˜ + ™¨œŸœå«œ ©œ ‰˜«á©«˜©ž ‰œ £â¤¦¬. + + 3. ’騘 ˜¤« š¨á¯«œ «ž ©ž£œ à£â¤ž £œ ---> š¨˜££ã ¡˜  §˜«ã©«œ š ˜ ¤˜ + ™šœå«œ ˜§æ «ž¤ ‰˜«á©«˜©ž ‰œ £â¤¦¬. + +---> After typing o the cursor is placed on the open line in Insert mode. + + 4. ‚ ˜ ¤˜ ˜¤¦å¥œ«œ £å˜ š¨˜££ã €Œ— ˜§æ «¦¤ ›¨¦£â˜, §˜«ã©«œ ˜§¢á ⤘ ¡œ­˜¢˜å¦ + O, ˜¤«å š ˜ â¤˜ §œæ o. ƒ¦¡ £á©«œ «¦ ©«ž¤ §˜¨˜¡á«à š¨˜££ã. +€¤¦åšœ«œ š¨˜££ã §á¤à ˜§æ ˜¬«ã¤ §˜«é¤«˜ª Shift-O 橦 ¦ ›¨¦£â˜ª œå¤˜  ©«ž š¨˜££ã + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 6.2: † „Œ’ŽŠ† Ž‘‡†‰†‘ + + ** ˜«ã©«œ a š ˜ ¤˜ œ ©ášœ«œ ¡œå£œ¤¦ ‹„’€ «¦¤ ›¨¦£â˜. ** + + 1. ‹œ«˜¡ ¤œå©«œ «¦¤ ›¨¦£â˜ ©«¦ «â¢¦ª «žª §¨é«žª š¨˜££ãª §˜¨˜¡á«à + ©ž£œ à£â¤ž £œ ---> §˜«é¤«˜ª $ ©«ž¤ ‰˜¤¦¤ ¡ã ‰˜«á©«˜©ž. + + 2. ˜«ã©«œ ⤘ a (§œæ) š ˜ ¤˜ §¨¦©Ÿâ©œ«œ ¡œå£œ¤¦ ‹„’€ ˜§æ «¦¤ ®˜¨˜¡«ã¨˜ + §¦¬ œå¤˜  ¡á«à ˜§æ «¦¤ ›¨¦£â˜. (’¦ ¡œ­˜¢˜å¦ A §¨¦©Ÿâ«œ  ©«¦ «â¢¦ª + «žª š¨˜££ãª). + +‘ž£œåਫ਼: €¬«æ ˜§¦­œçšœ  «¦ §á«ž£˜ «¦¬ i , «¦¤ «œ¢œ¬«˜å¦ ®˜¨˜¡«ã¨˜, «¦ + ¡œå£œ¤¦ «žª œ ©˜šàšãª, , ›¨¦£â˜-›œ¥ á, ¡˜  «â¢¦ª, x, £æ¤¦ ¡˜  + £æ¤¦ š ˜ ¤˜ §¨¦©Ÿâ©œ«œ ©«¦ «â¢¦ª «žª š¨˜££ãª! + + 3. ‘¬£§¢ž¨é©«œ «é¨˜ «ž¤ §¨é«ž š¨˜££ã. ‘ž£œ é©«œ œ§å©žª æ«  ž §¨¦©Ÿã¡ž œå¤˜  + ˜¡¨ ™éª å› ˜ ©«ž¤ ‰˜«á©«˜©ž ‰œ £â¤¦¬ £œ «ž¤ ‰˜«á©«˜©ž „ ©˜šàšãª, œ¡«æª + ˜§æ «ž Ÿâ©ž §¦¬ œ ©ášœ«˜  «¦ ¡œå£œ¤¦. + +---> This line will allow you to practice +---> This line will allow you to practice appending text to the end of a line. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 6.3: €ŠŠ† „‰ƒŽ‘† ’†‘ €Œ’ˆ‰€’€‘’€‘†‘ + + + ** ˜«ã©«œ ¡œ­˜¢˜å¦ R š ˜ ¤˜ ˜¢¢á¥œ«œ §œ¨ ©©æ«œ¨¦¬ª ˜§æ ⤘¤ ®˜¨˜¡«ã¨œª. ** + + 1. ‹œ«˜¡ ¤œå©«œ «¦¤ ›¨¦£â˜ ©«ž¤ §¨é«ž š¨˜££ã §˜¨˜¡á«à ©ž£œ à£â¤ž £œ --->. + + 2. ’¦§¦Ÿœ«ã©«œ «¦¤ ›¨¦£â˜ ©«ž¤ ˜¨®ã «žª §¨é«žª ¢â¥žª §¦¬ œå¤˜  › ˜­¦¨œ« ¡ã + ˜§æ «ž ›œç«œ¨ž š¨˜££ã ©ž£œ à£â¤ž £œ ---> (ž ¢â¥ž 'last'). + + 3. ˜«ã©«œ «é¨˜ R ¡˜  ˜¢¢á¥«œ «¦ ¬§æ¢¦ §¦ «¦¬ ¡œ £â¤¦¬ ©«ž¤ §¨é«ž š¨˜££ã + š¨á­¦¤«˜ª §á¤à ˜§æ «¦ §˜¢ æ ¡œå£œ¤¦ é©«œ ¤˜ ¡á¤œ«œ «ž¤ §¨é«ž š¨˜££ã å› ˜ + £œ «ž ›œç«œ¨ž. + +---> To make the first line the same as the last on this page use the keys. +---> To make the first line the same as the second, type R and the new text. + + 4. ‘ž£œ é©«œ æ«  櫘¤ §˜«á«œ š ˜ ¤˜ ™šœå«œ, §˜¨˜£â¤œ  ¦§¦ ¦›ã§¦«œ + ˜¤˜¢¢¦å૦ ¡œå£œ¤¦. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹áŸž£˜ 6.4: “‡‹ˆ‘† „ˆŠŽ‚†‘ + + + ** ¬Ÿ£å©«œ £å˜ œ§ ¢¦šã â«©  é©«œ ž ˜¤˜ã«ž©ž ã ž ˜¤« ¡˜«á©«˜©ž ¤˜ ˜š¤¦œå + «ž › ˜­¦¨á §œé¤-¡œ­˜¢˜åठ** + + 1. –ᥫœ š ˜ 'ignore' œ ©á𦤫˜ª: + /ignore + ‘¬¤œ®å©«œ ˜¨¡œ«âª ­¦¨âª §˜«é¤«˜ª «¦ §¢ã¡«¨¦ n. + + 2. ‡â©«œ «ž¤ œ§ ¢¦šã 'ic' (Ignore case) š¨á­¦¤«˜ª: + :set ic + + 3. –ᥫœ «é¨˜ ¥˜¤á š ˜ 'ignore' §˜«é¤«˜ª: n + ‘¬¤œ®å©«œ «ž¤ ˜¤˜ã«ž©ž £œ¨ ¡âª ˜¡æ£˜ ­¦¨âª §˜«é¤«˜ª «¦ §¢ã¡«¨¦ n + + 4. ‡â©«œ « ª œ§ ¢¦šâª 'hlsearch' ¡˜  'incsearch': + :set hls is + + 5. „ ©ášœ«œ «é¨˜ ¥˜¤á «ž¤ œ¤«¦¢ã ˜¤˜ã«ž©žª, ¡˜  ›œå«œ «  ©¬£™˜å¤œ  + /ignore + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹€‡†‹€ 6 „ˆŠ†–† + + + 1. ˜«é¤«˜ª o ˜¤¦åšœ  £å˜ š¨˜££ã ‰€’— ˜§æ «¦¤ ›¨¦£â˜ ¡˜  «¦§¦Ÿœ«œå «¦¤ + ›¨¦£â˜ ©«ž¤ ˜¤¦ ®«ã š¨˜££ã ©œ ‰˜«á©«˜©ž ‰œ £â¤¦¬. + + 2. ˜«ã©«œ a š ˜ ¤˜ œ ©ášœ«œ ¡œå£œ¤¦ ‹„’€ «¦¤ ®˜¨˜¡«ã¨˜ ©«¦¤ ¦§¦å¦ œå¤˜  + ¦ ›¨¦£â˜ª. ˜«é¤«˜ª ¡œ­˜¢˜å¦ A ˜¬«æ£˜«˜ §¨¦©Ÿâ«œ  ¡œå£œ¤¦ ©«¦ «â¢¦ª + «žª š¨˜££ãª. + + 3. ˜«é¤«˜ª ¡œ­˜¢˜å¦ R œ ©â¨®œ«˜  ©«ž¤ ‰˜«á©«˜ž €¤« ¡˜«á©«˜©žª £â®¨  ¤˜ + §˜«žŸœå «¦ ¡˜  ¤˜ œ¥â¢Ÿœ . + + 4. ‚¨á­¦¤«˜ª ":set xxx" ¨¬Ÿ£åœ  «ž¤ œ§ ¢¦šã "xxx". + + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ‹€‡†‹€ 7: ON-LINE „Œ’ŽŠ„‘ ކ‡„ˆ€‘ + + + ** •¨ž© £¦§¦ ã©«œ «¦ on-line ©ç©«ž£˜ ™¦ãŸœ ˜ª ** + + Ž Vim ⮜  ⤘ §œ¨ œ¡« ¡æ on-line ©ç©«ž£˜ ™¦ãŸœ ˜ª. ‚ ˜ ¤˜ ¥œ¡ ¤ã©œ , + ›¦¡ £á©«œ ¡á§¦ ¦ ˜§æ «˜ «¨å˜: + - §˜«ã©«œ «¦ §¢ã¡«¨¦ (˜¤ ⮜«œ ¡á§¦ ¦) + - §˜«ã©«œ «¦ §¢ã¡«¨¦ (˜¤ ⮜«œ ¡á§¦ ¦) + - š¨á¯«œ :help + + ‚¨á¯«œ :q š ˜ ¤˜ ¡¢œå©œ«œ «¦ §˜¨áŸ¬¨¦ «žª ™¦ãŸœ ˜ª. + + ‹§¦¨œå«œ ¤˜ ™¨œå«œ ™¦ãŸœ ˜ §á¤à ©œ ¡áŸœ ˜¤« ¡œå£œ¤¦, ›å¤¦¤«˜ª £å˜ §˜¨á£œ«¨¦ + ©«ž¤ œ¤«¦¢ã ":help". ƒ¦¡ £á©«œ ˜¬«á (£ž¤ ¥œ®¤á«œ ¤˜ §˜«á«œ ): + + :help w + :help c_ Το πλήκτÏο l είναι δεξιά και κινεί στα δεξιά. + j Το πλήκτÏο j μοιάζει με βελάκι Ï€Ïος τα κάτω. + v + + 1. Μετακινείστε τον δÏομέα Ï„ÏιγÏÏω στην οθόνη μέχÏι να νοιώθετε άνετα. + + 2. ΚÏατήστε πατημένο το κάτω πλήκτÏο (j) μέχÏι να επαναληφθεί. +---> ΤώÏα ξέÏετε πώς να μετακινηθείτε στο επόμενο μάθημα. + + 3. ΧÏησιμοποιώντας το κάτω πλήκτÏο, μετακινηθείτε στο Μάθημα 1.2. + +Σημείωση: Αν αμφιβάλλετε για κάτι που πατήσατε, πατήστε για να βÏεθείτε + στην Κανονική Κατάσταση. Μετά πατήστε ξανά την εντολή που θέλατε. + +Σημείωση: Τα πλήκτÏα του δÏομέα θα Ï€Ïέπει επίσης να δουλεÏουν. Αλλά με τα hjkl + θα μποÏείτε να κινηθείτε Ï€Î¿Î»Ï Î³ÏηγοÏότεÏα, μόλις τα συνηθίσετε. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 1.2: ΜΠΑΙÎΟÎΤΑΣ ΚΑΙ ΒΓΑΙÎΟÎΤΑΣ ΣΤΟΠVIM + + !! ΣΗΜΕΙΩΣΗ: ΠÏιν εκτελέσετε κάποιο από τα βήματα, διαβάστε όλο το μάθημα!! + + 1. Πατήστε το πλήκτÏο (για να είστε σίγουÏα στην Κανονική Κατάσταση). + + 2. ΠληκτÏολογήστε: :q! . + +---> Αυτό εξέÏχεται από τον συντάκτη ΧΩΡΙΣ να σώσει όποιες αλλαγές έχετε κάνει. + Αν θέλετε να σώσετε τις αλλαγές και να εξέÏθετε πληκτÏολογήστε: + :wq + + 3. Όταν δείτε την Ï€ÏοτÏοπή του φλοιοÏ, πληκτÏολογήστε την εντολή με την οποία + μπήκατε σε αυτήν την πεÏιήγηση. ΜποÏεί να είναι: vimtutor + Κανονικά θα χÏησιμοποιοÏσατε: vim tutor + +---> 'vim' σημαίνει εισαγωγή στον συντάκτη vim, 'tutor' είναι το αÏχείο που + θέλουμε να διοÏθώσουμε. + + 4. Αν έχετε απομνημονεÏσει αυτά τα βήματα και έχετε αυτοπεποίθηση, εκτελέστε + τα βήματα 1 έως 3 για να βγείτε και να μπείτε ξανά στον συντάκτη. Μετά + μετακινήστε τον δÏομέα κάτω στο Μάθημα 1.3. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 1.3: ΔΙΟΡΘΩΣΗ ΚΕΙΜΕÎΟΥ - ΔΙΑΓΡΑΦΗ + + ** Όσο είστε στην Κανονική Κατάσταση πατήστε x για να διαγÏάψετε τον + χαÏακτήÏα κάτω από τον δÏομέα. ** + + 1. Μετακινείστε τον δÏομέα στην παÏακάτω γÏαμμή σημειωμένη με --->. + + 2. Για να διοÏθώσετε τα λάθη, κινείστε τον δÏομέα μέχÏι να είναι πάνω από + τον χαÏακτήÏα που θα διαγÏαφεί. + + 3. Πατήστε το πλήκτÏο x για να διαγÏάψετε τον ανεπιθÏμητο χαÏακτήÏα. + + 4. Επαναλάβετε τα βήματα 2 μέχÏι 4 μέχÏι η Ï€Ïόταση να είναι σωστή. + +---> The ccow jumpedd ovverr thhe mooon. + + 5. ΤώÏα που η γÏαμμή είναι σωστή, πηγαίντε στο Μάθημα 1.4. + +ΣΗΜΕΙΩΣΗ: Καθώς διατÏέχετε αυτήν την πεÏιήγηση, Ï€Ïοσπαθήστε να μην + απομνημονεÏετε, μαθαίνετε με τη χÏήση. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 1.4: ΔΙΟΡΘΩΣΗ ΚΕΙΜΕÎΟΥ - ΠΑΡΕΜΒΟΛΗ + + ** Όσο είστε σε Κανονική Κατάσταση πατήστε i για να παÏεμβάλλετε κείμενο. ** + + 1. Μετακινείστε τον δÏομέα μέχÏι την Ï€Ïώτη γÏαμμή παÏακάτω σημειωμένη με --->. + + 2. Για να κάνετε την Ï€Ïώτη γÏαμμή ίδια με την δεÏτεÏη, μετακινείστε τον + δÏομέα πάνω στον Ï€Ïώτο χαÏακτήÏα ΜΕΤΑ από όπου θα παÏεμβληθεί το κείμενο. + + 3. Πατήστε το i και πληκτÏολογήστε τις απαÏαίτητες Ï€Ïοσθήκες. + + 4. Καθώς διοÏθώνετε κάθε λάθος πατήστε για να επιστÏέψετε στην + Κανονική Κατάσταση. Επαναλάβετε τα βήματα 2 μέχÏι 4 για να διοÏθώσετε + την Ï€Ïόταση. + +---> There is text misng this . +---> There is some text missing from this line. + + 5. Όταν είστε άνετοι με την παÏεμβολή κειμένου μετακινηθείτε στην + παÏακάτω πεÏίληψη. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ΜΑΘΗΜΑ 1 ΠΕΡΙΛΗΨΗ + + + 1. Ο δÏομέας κινείται χÏησιμοποιώντας είτε τα πλήκτÏα δÏομέα ή τα hjkl. + h (αÏιστέÏα) j (κάτω) k (πάνω) l (δεξιά) + + 2. Για να μπείτε στον Vim (από την Ï€ÏοτÏοπή %) γÏάψτε: vim ΑΡΧΕΙΟ + + 3. Για να βγείτε γÏάψτε: :q! για απόÏÏιψη των αλλαγών. + Ή γÏάψτε: :wq για αποθήκευση των αλλαγών. + + 4. Για να διαγÏάψετε έναν χαÏακτήÏα κάτω από τον δÏομέα σε + Κανονική Κατάσταση πατήστε: x + + 5. Για να εισάγετε κείμενο στον δÏομέα όσο είστε σε Κανονική Κατάσταση γÏάψτε: + i πληκτÏολογήστε το κείμενο + +ΣΗΜΕΙΩΣΗ: Πατώντας θα τοποθετηθείτε στην Κανονική Κατάσταση ή θα + ακυÏώσετε μία ανεπιθÏμητη και μεÏικώς ολοκληÏωμένη εντολή. + +ΤώÏα συνεχίστε με το Μάθημα 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 2.1: ΕÎΤΟΛΕΣ ΔΙΑΓΡΑΦΗΣ + + ** ΓÏάψτε dw για να διαγÏάψετε μέχÏι το τέλος μίας λέξης. ** + + 1. Πατήστε για να βεβαιωθείτε ότι είστε στην Κανονική Κατάσταση. + + 2. Μετακινείστε τον δÏομέα στην παÏακάτω γÏαμμή σημειωμένη με --->. + + 3. Πηγαίνετε τον δÏομέα στην αÏχή της λέξης που Ï€Ïέπει να διαγÏαφεί. + + 4. ΓÏάψτε dw για να κάνετε την λέξη να εξαφανιστεί. + +ΣΗΜΕΙΩΣΗ: Τα γÏάμματα dw θα εμφανιστοÏν στην τελευταία γÏαμμή της οθόνης όσο + τα πληκτÏολογείτε. Αν γÏάψατε κάτι λάθος, πατήστε και + ξεκινήστε από την αÏχή. + +---> There are a some words fun that don't belong paper in this sentence. + + 5. Επαναλάβετε τα βήματα 3 και 4 μέχÏι η Ï€Ïόταση να είναι σωστή και + πηγαίνετε στο Μάθημα 2.2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 2.2: ΠΕΡΙΣΣΟΤΕΡΕΣ ΕÎΤΟΛΕΣ ΔΙΑΓΡΑΦΗΣ + + ** ΠληκτÏολογήστε d$ για να διαγÏάψετε μέχÏι το τέλος της γÏαμμής. ** + + 1. Πατήστε για να βεβαιωθείτε ότι είστε στην Κανονική Κατάσταση. + + 2. Μετακινείστε τον δÏομέα στην παÏακάτω γÏαμμή σημειωμένη με --->. + + 3. Μετακινείστε τον δÏομέα στο τέλος της σωστής γÏαμμής (ΜΕΤΑ την Ï€Ïώτη . ). + + 4. Πατήστε d$ για να διαγÏάψετε μέχÏι το τέλος της γÏαμμής. + +---> Somebody typed the end of this line twice. end of this line twice. + + 5. Πηγαίνετε στο Μάθημα 2.3 για να καταλάβετε τι συμβαίνει. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 2.3: ΠΕΡΙ ΕÎΤΟΛΩΠΚΑΙ ΑÎΤΙΚΕΙΜΕÎΩΠ+ + +Η μοÏφή της εντολής διαγÏαφής d είναι ως εξής: + + [αÏιθμός] d αντικείμενο Ή d [αÏιθμός] αντικείμενο + Όπου: + αÏιθμός - πόσες φοÏές θα εκτελεστεί η εντολή (Ï€ÏοαιÏετικό, εξ' οÏισμοÏ=1). + d - η εντολή της διαγÏαφής. + αντικείμενο - πάνω σε τι θα λειτουÏγήσει η εντολή (παÏακάτω λίστα). + + Μία μικÏή λίστα από αντικείμενα: + w - από τον δÏομέα μέχÏι το τέλος της λέξης, πεÏιλαμβάνοντας το διάστημα. + e - από τον δÏομέα μέχÏι το τέλος της λέξης, ΧΩΡΙΣ το διάστημα. + $ - από τον δÏομέα μέχÏι το τέλος της γÏαμμής. + +ΣΗΜΕΙΩΣΗ: Για τους Ï„Ïπους της πεÏιπέτειας, πατώντας απλώς το αντικείμενο όσο + είστε στην Κανονική Κατάσταση χωÏίς κάποια εντολή θα μετακινήσετε + τον δÏομέα όπως καθοÏίζεται στην λίστα αντικειμένων. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 2.4: ΜΙΑ ΕΞΑΙΡΕΣΗ ΣΤΗΠ'ΕÎΤΟΛΗ-ΑÎΤΙΚΕΙΜΕÎΟ' + + ** ΠληκτÏολογήστε dd για να διαγÏάψετε όλη τη γÏαμμή. ** + + Εξαιτίας της συχνότητας της διαγÏαφής ολόκληÏης γÏαμμής, οι σχεδιαστές + του Vim αποφάσισαν ότι θα ήταν ευκολότεÏο να γÏάφετε απλώς δÏο d στη + σειÏά για να διαγÏάψετε μία γÏαμμή. + + 1. Μετακινείστε τον δÏομέα στη δεÏτεÏη γÏαμμή της παÏακάτω φÏάσης. + 2. ΓÏάψτε dd για να διαγÏάψετε τη γÏαμμή. + 3. ΤώÏα μετακινηθείτε στην τέταÏτη γÏαμμή. + 4. ΓÏάψτε 2dd (θυμηθείτε αÏιθμός-εντολή-αντικείμενο) για να + διαγÏάψετε δÏο γÏαμμές. + + 1) Roses are red, + 2) Mud is fun, + 3) Violets are blue, + 4) I have a car, + 5) Clocks tell time, + 6) Sugar is sweet + 7) And so are you. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 2.5: Η ΕÎΤΟΛΗ ΑÎΑΙΡΕΣΗΣ + + ** Πατήστε u για να αναιÏέσετε τις τελευταίες εντολές, + U για να διοÏθώσετε όλη τη γÏαμμή. ** + + 1. Μετακινείστε τον δÏομέα στην παÏακάτω γÏαμμή σημειωμένη με ---> και + τοποθετήστε τον πάνω στο Ï€Ïώτο λάθος. + 2. Πατήστε x για να διαγÏάψετε τον Ï€Ïώτο ανεπιθÏμητο χαÏακτήÏα. + 3. ΤώÏα πατήστε u για να αναιÏέσετε την τελευταία εκτελεσμένη εντολή. + 4. Αυτή τη φοÏά διοÏθώστε όλα τα λάθη στη γÏαμμή χÏησιμοποιώντας την εντολή x. + 5. ΤώÏα πατήστε ένα κεφαλαίο U για να επιστÏέψετε τη γÏαμμή στην αÏχική + της κατάσταση. + 6. ΤώÏα πατήστε u μεÏικές φοÏές για να αναιÏέσετε την U και + Ï€ÏοηγοÏμενες εντολές. + 7. ΤώÏα πατήστε CTRL-R (κÏατώντας πατημένο το πλήκτÏο CTRL καθώς πατάτε το R) + μεÏικές φοÏές για να επαναφέÏετε τις εντολές (αναίÏεση των αναιÏέσεων). + +---> Fiix the errors oon thhis line and reeplace them witth undo. + + 8. Αυτές είναι Ï€Î¿Î»Ï Ï‡Ïήσιμες εντολές. ΤώÏα πηγαίνετε στην + ΠεÏίληψη του Μαθήματος 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ΜΑΘΗΜΑ 2 ΠΕΡΙΛΗΨΗ + + + 1. Για να διαγÏάψετε από τον δÏομέα μέχÏι το τέλος λέξης γÏάψτε: dw + + 2. Για να διαγÏάψετε από τον δÏομέα μέχÏι το τέλος γÏαμμής γÏάψτε: d$ + + 3. Για να διαγÏάψετε ολόκληÏη τη γÏαμμή γÏάψτε: dd + + 4. Η μοÏφή για μία εντολή στην Κανονική Κατάσταση είναι: + + [αÏιθμός] εντολή αντικείμενο Ή εντολή [αÏιθμός] αντικείμενο + όπου: + αÏιθμός - πόσες φοÏές να επαναληφθεί η εντολή + εντολή - τι να γίνει, όπως η d για διαγÏαφή + αντικείμενο - πάνω σε τι να ενεÏγήσει η εντολή, όπως w (λέξη), + $ (τέλος της γÏαμμής), κτλ. + + 5. Για να αναιÏέσετε Ï€ÏοηγοÏμενες ενέÏγειες, πατήστε: u (πεζό u) + Για να αναιÏέσετε όλες τις αλλαγές στη γÏαμμή, πατήστε: U (κεφαλαίο U) + Για να αναιÏέσετε τις αναιÏέσεις, πατήστε: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 3.1: Η ΕÎΤΟΛΗ ΤΟΠΟΘΕΤΗΣΗΣ + + + ** Πατήστε p για να τοποθετήσετε την τελευταία διαγÏαφή μετά τον δÏομέα. ** + + 1. Μετακινείστε τον δÏομέα στην Ï€Ïώτη γÏαμμή της παÏακάτω ομάδας. + + 2. Πατήστε dd για να διαγÏάψετε τη γÏαμμή και να την αποθηκεÏσετε σε + Ï€ÏοσωÏινή μνήμη του Vim. + + 3. Μετακινείστε τον δÏομέα στη γÏαμμή ΠΑÎΩ από εκεί που θα Ï€Ïέπει να πάει + η διαγÏαμμένη γÏαμμή. + + 4. Όσο είστε σε Κανονική Κατάσταση, πατήστε p για να βάλετε τη γÏαμμή. + + 5. Επαναλάβετε τα βήματα 2 έως 4 για να βάλετε όλες τις γÏαμμές στη + σωστή σειÏά. + + d) Can you learn too? + b) Violets are blue, + c) Intelligence is learned, + a) Roses are red, + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 3.2: Η ΕÎΤΟΛΗ ΑÎΤΙΚΑΤΑΣΤΑΣΗΣ + + + ** Πατήστε r και χαÏακτήÏα για να αλλάξετε αυτόν που είναι + κάτω από τον δÏομέα. ** + + 1. Μετακινείστε τον δÏομέα στην Ï€Ïώτη γÏαμμή παÏακάτω σημειωμένη με --->. + + 2. Μετακινείστε τον δÏομέα έτσι ώστε να είναι πάνω στο Ï€Ïώτο λάθος. + + 3. Πατήστε r και μετά τον χαÏακτήÏα ο οποίος διοÏθώνει το λάθος. + + 4. Επαναλάβετε τα βήματα 2 και 3 μέχÏι να είναι σωστή η Ï€Ïώτη γÏαμμή. + +---> Whan this lime was tuoed in, someone presswd some wrojg keys! +---> When this line was typed in, someone pressed some wrong keys! + + 5. ΤώÏα πηγαίνετε στο Μάθημα 3.2. + +ΣΗΜΕΙΩΣΗ: Îα θυμάστε ότι Ï€Ïέπει να μαθαίνετε με τη χÏήση, και όχι με + την απομνημόνευση. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 3.3: Η ΕÎΤΟΛΗ ΑΛΛΑΓΗΣ + + ** Για να αλλάξετε τμήμα ή όλη τη λέξη, πατήστε cw . ** + + 1. Μετακινείστε τον δÏομέα στην Ï€Ïώτη γÏαμμή παÏακάτω σημειωμένη με --->. + + 2. Τοποθετήστε τον δÏομέα πάνω στο u της λέξης lubw. + + 3. Πατήστε cw και τη σωστή λέξη (στην πεÏίπτωση αυτή, γÏάψτε 'ine'.) + + 4. Πατήστε και πηγαίνετε στο επόμενο λάθος (στον Ï€Ïώτο + χαÏακτήÏα Ï€Ïος αλλαγή). + + 5. Επαναλάβετε τα βήματα 3 και 4 μέχÏις ότου η Ï€Ïώτη Ï€Ïόταση να είναι + ίδια με τη δεÏτεÏη. + +---> This lubw has a few wptfd that mrrf changing usf the change command. +---> This line has a few words that need changing using the change command. + +ΠαÏατηÏείστε ότι η cw όχι μόνο αντικαθιστάει τη λέξη, αλλά σας εισάγει +επίσης σε παÏεμβολή. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 3.4: ΠΕΡΙΣΣΟΤΕΡΕΣ ΑΛΛΑΓΕΣ ΜΕ c + + + ** Η εντολή αλλαγής χÏησιμοποιείται με τα ίδια αντικείμενα της διαγÏαφής. ** + + + 1. Η εντολή αλλαγής δουλεÏει με τον ίδιο Ï„Ïόπο όπως η διαγÏαφή. Η μοÏφή είναι: + + [αÏιθμός] c αντικείμενο Ή c [αÏιθμός] αντικείμενο + + 2. Τα αντικείμενα είναι πάλι τα ίδια, όπως w (λέξη), $ (τέλος γÏαμμής), κτλ. + + 3. Μετακινηθείτε στην Ï€Ïώτη γÏαμμή παÏακάτω σημειωμένη με --->. + + 4. Μετακινείστε τον δÏομέα στο Ï€Ïώτο λάθος. + + 5. ΓÏάψτε c$ για να κάνετε το υπόλοιπο της γÏαμμής ίδιο με τη δεÏτεÏη + και πατήστε . + +---> The end of this line needs some help to make it like the second. +---> The end of this line needs to be corrected using the c$ command. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ΜΑΘΗΜΑ 3 ΠΕΡΙΛΗΨΗ + + + 1. Για να τοποθετήσετε κείμενο που μόλις έχει διαγÏαφεί, πατήστε p . + Αυτό τοποθετεί το διαγÏαμμένο κείμενο ΜΕΤΑ τον δÏομέα (αν διαγÏάφτηκε + γÏαμμή θα πάει μετά στη γÏαμμή κάτω από τον δÏομέα. + + 2. Για να αντικαταστήσετε τον χαÏακτήÏα κάτω από τον δÏομέα, πατήστε r + και μετά τον χαÏακτήÏα που θα αντικαταστήσει τον αÏχικό. + + 3. Η εντολή αλλαγής σας επιτÏέπει να αλλάξετε το καθοÏισμένο αντικείμενο + από τον δÏομέα μέχÏι το τέλος του αντικείμενο. Π.χ. γÏάψτε cw για να + αλλάξετε από τον δÏομέα μέχÏι το τέλος της λέξης, c$ για να αλλάξετε + μέχÏι το τέλος γÏαμμής. + + 4. Η μοÏφή για την αλλαγή είναι: + + [αÏιθμός] c αντικείμενο Ή c [αÏιθμός] αντικείμενο + +ΤώÏα συνεχίστε με το επόμενο μάθημα. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 4.1: ΘΕΣΗ ΚΑΙ ΚΑΤΑΣΤΑΣΗ ΑΡΧΕΙΟΥ + + + ** Πατήστε CTRL-g για να εμφανιστεί η θέση σας στο αÏχείο και η κατάστασή του. + Πατήστε SHIFT-G για να πάτε σε μία γÏαμμή στο αÏχείο. ** + + Σημείωση: Διαβάστε ολόκληÏο το μάθημα Ï€Ïιν εκτελέσετε κάποιο από τα βήματα!! + + 1. ΚÏατήστε πατημένο το πλήκτÏο Ctrl και πατήστε g . Μία γÏαμμή κατάστασης + θα εμφανιστεί στο κάτω μέÏος της σελίδας με το όνομα αÏχείου και τη + γÏαμμή που είστε. Θυμηθείτε τον αÏιθμό γÏαμμής για το Βήμα 3. + + 2. Πατήστε shift-G για να μετακινηθείτε στο τέλος του αÏχείου. + + 3. Πατήστε τον αÏιθμό της γÏαμμής που ήσασταν και μετά shift-G. Αυτό θα + σας επιστÏέψει στη γÏαμμή που ήσασταν Ï€Ïιν πατήσετε για Ï€Ïώτη φοÏά Ctrl-g. + (Όταν πληκτÏολογείτε τους αÏιθμοÏÏ‚, ΔΕΠθα εμφανίζονται στην οθόνη). + + 4. Αν νοιώθετε σίγουÏος για αυτό, εκτελέστε τα βήματα 1 έως 3. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 4.2: Η ΕÎΤΟΛΗ ΑÎΑΖΗΤΗΣΗΣ + + + ** Πατήστε / ακολουθοÏμενο από τη φÏάση που ψάχνετε. ** + + 1. Σε Κανονική Κατάσταση πατήστε τον χαÏακτήÏα / . ΠαÏατηÏήστε ότι αυτός και + ο δÏομέας εμφανίζονται στο κάτω μέÏος της οθόνης όπως με την εντολή : . + + 2. ΤώÏα γÏάψτε 'errroor' . Αυτή είναι η λέξη που θέλετε να ψάξετε. + + 3. Για να ψάξετε ξανά για την ίδια φÏάση, πατήστε απλώς n . + Για να ψάξετε την ίδια φÏάση στην αντίθετη κατεÏθυνση, πατήστε Shift-N . + + 4. Αν θέλετε να ψάξετε για μία φÏάση Ï€Ïος τα πίσω, χÏησιμοποιήστε την εντολή ? αντί της / . + +---> Όταν η αναζήτηση φτάσει στο τέλος του αÏχείου θα συνεχίσει από την αÏχή. + + "errroor" is not the way to spell error; errroor is an error. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 4.3: ΕΥΡΕΣΗ ΤΑΙΡΙΑΣΤΩΠΠΑΡΕÎΘΕΣΕΩΠ+ + + ** Πατήστε % για να βÏείτε την αντίστοιχη ), ], ή } . ** + + 1. Τοποθετήστε τον δÏομέα σε κάποια (, [, ή { στην παÏακάτω γÏαμμή + σημειωμένη με --->. + + 2. ΤώÏα πατήστε τον χαÏακτήÏα % . + + 3. Ο δÏομέας θα Ï€Ïέπει να είναι στην αντίστοιχη παÏένθεση ή αγκÏλη. + + 4. Πατήστε % για να μετακινήσετε τον δÏομέα πίσω στην Ï€Ïώτη αγκÏλη + (του ζευγαÏιοÏ). + +---> This ( is a test line with ('s, ['s ] and {'s } in it. )) + +ΣΗΜΕΙΩΣΗ: Αυτό είναι Ï€Î¿Î»Ï Ï‡Ïήσιμο στην αποσφαλμάτωση ενός Ï€ÏογÏάμματος + με μη ταιÏιαστές παÏενθέσεις! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 4.4: ΕÎΑΣ ΤΡΟΠΟΣ ΓΙΑ ΑΛΛΑΓΗ ΛΑΘΩΠ+ + + ** ΓÏάψτε :s/old/new/g για να αλλάξετε το 'new' με το 'old'. ** + + 1. Μετακινείστε τον δÏομέα στην παÏακάτω γÏαμμή σημειωμένη με --->. + + 2. ΓÏάψτε :s/thee/the . Σημειώστε ότι αυτή η εντολή αλλάζει μόνο + την Ï€Ïώτη εμφάνιση στη γÏαμμή. + + 3. ΤώÏα γÏάψτε :s/thee/the/g εννοώντας γενική αντικατάσταση στη + γÏαμμή. Αυτό αλλάζει όλες τις εμφανίσεις επί της γÏαμμής. + +---> thee best time to see thee flowers is in thee spring. + + 4. Για να αλλάξετε κάθε εμφάνιση μίας συμβολοσειÏάς Î¼ÎµÏ„Î±Î¾Ï Î´Ïο γÏαμμών, + γÏάψτε :#,#s/old/new/g όπου #,# οι αÏιθμοί των δÏο γÏαμμών. + ΓÏάψτε :%s/old/new/g για να αλλάξετε κάθε εμφάνιση σε όλο το αÏχείο. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ΜΑΘΗΜΑ 4 ΠΕΡΙΛΗΨΗ + + + 1. Το Ctrl-g εμφανίζει τη θέση σας στο αÏχείο και την κατάστασή του. + Το Shift-G πηγαίνει στο τέλος του αÏχείου. Ένας αÏιθμός γÏαμμής + ακολουθοÏμενος από Shift-G πηγαίνει σε εκείνη τη γÏαμμή. + + 2. ΓÏάφοντας / ακολουθοÏμενο από μία φÏάση ψάχνει Ï€Ïος τα ΜΠΡΟΣΤΑ για + τη φÏάση. ΓÏάφοντας ? ακολουθοÏμενο από μία φÏάση ψάχνει Ï€Ïος τα ΠΙΣΩ + για τη φÏάση. Μετά από μία αναζήτηση πατήστε n για να βÏείτε την + επόμενη εμφάνιση Ï€Ïος την ίδια κατεÏθυνση ή Shift-N για να ψάξετε + Ï€Ïος την αντίθετη κατεÏθυνση. + + 3. Πατώντας % όσο ο δÏομέας είναι πάνω σε μία (,),[,],{, ή } εντοπίζει + το αντίστοιχο ταίÏι του ζευγαÏιοÏ. + + 4. Για αντικατάσταση με new του Ï€Ïώτου old στη γÏαμμή γÏάψτε :s/old/new + Για αντικατάσταση με new όλων των 'old' στη γÏαμμή γÏάψτε :s/old/new/g + Για αντικατάσταση φÏάσεων Î¼ÎµÏ„Î±Î¾Ï Î´Ïο # γÏαμμών γÏάψτε :#,#s/old/new/g + Για αντικατάσταση όλων των εμφανίσεων στο αÏχείο γÏάψτε :%s/old/new/g + Για εÏώτηση επιβεβαίωσης κάθε φοÏά Ï€Ïοσθέστε ένα 'c' "%s/old/new/gc + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 5.1: ΠΩΣ ΕΚΤΕΛΩ ΜΙΑ ΕΞΩΤΕΡΙΚΗ ΕÎΤΟΛΗ + + +** ΓÏάψτε :! ακολουθοÏμενο από μία εξωτεÏική εντολή για να την εκτελέσετε. ** + + 1. Πατήστε την οικεία εντολή : για να θέσετε τον δÏομέα στο κάτω μέÏος + της οθόνης. Αυτό σας επιτÏέπει να δώσετε μία εντολή. + + 2. ΤώÏα πατήστε το ! (θαυμαστικό). Αυτό σας επιτÏέπει να εκτελέσετε + οποιαδήποτε εξωτεÏική εντολή του φλοιοÏ. + + 3. Σαν παÏάδειγμα γÏάψτε ls μετά από το ! και πατήστε . Αυτό θα + σας εμφανίσει μία λίστα του καταλόγου σας, ακÏιβώς σαν να ήσασταν στην + Ï€ÏοτÏοπή του φλοιοÏ. Ή χÏησιμοποιήστε :!dir αν το ls δεν δουλεÏει. + +---> Σημείωση: Είναι δυνατόν να εκτελέσετε οποιαδήποτε εξωτεÏική εντολή + με αυτόν τον Ï„Ïόπο. + +---> Σημείωση: Όλες οι εντολές : Ï€Ïέπει να τεÏματίζονται πατώντας το . + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 5.2: ΠΕΡΙΣΣΟΤΕΡΑ ΠΕΡΙ ΕΓΓΡΑΦΗΣ ΑΡΧΕΙΩΠ+ + + ** Για να σώσετε τις αλλάγες που κάνατε στο αÏχείο, γÏάψτε :w ΑΡΧΕΙΟ. ** + + 1. ΓÏάψτε :!dir ή :!ls για να πάÏετε μία λίστα του καταλόγου σας. + Ήδη ξέÏετε ότι Ï€Ïέπει να πατήσετε μετά από αυτό. + + 2. Διαλέξτε ένα όνομα αÏχείου που δεν υπάÏχει ακόμα, όπως το TEST. + + 3. ΤώÏα γÏάψτε: :w TEST (όπου TEST είναι το όνομα αÏχείου που διαλέξατε). + + 4. Αυτό σώζει όλο το αÏχείο (vim Tutor) με το όνομα TEST. Για να το + επαληθεÏσετε, γÏάψτε ξανά :!dir για να δείτε τον κατάλογό σας. + +---> Σημειώστε ότι αν βγαίνατε από τον Vim και μπαίνατε ξανά με το όνομα + αÏχείου TEST, το αÏχείο θα ήταν ακÏιβές αντίγÏαφο του tutor όταν το σώσατε. + + 5. ΤώÏα διαγÏάψτε το αÏχείο γÏάφοντας (MS-DOS): :!del TEST + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 5.3: ΕΠΙΛΕΚΤΙΚΗ ΕÎΤΟΛΗ ΕΓΓΡΑΦΗΣ + + + ** Για να σώσετε τμήμα του αÏχείου, γÏάψτε :#,# w ΑΡΧΕΙΟ ** + + 1. Άλλη μια φοÏά, γÏάψτε :!dir ή :!ls για να πάÏετε μία λίστα από τον + κατάλογό σας και διαλέξτε ένα κατάλληλο όνομα αÏχείου όπως το TEST. + + 2. Μετακινείστε τον δÏομέα στο πάνω μέÏος αυτής της σελίδας και πατήστε + Ctrl-g για να βÏείτε τον αÏιθμό αυτής της γÏαμμής. + ÎΑ ΘΥΜΑΣΤΕ ΑΥΤΟΠΤΟΠΑΡΙΘΜΟ! + + 3. ΤώÏα πηγαίνετε στο κάτω μέÏος της σελίδας και πατήστε Ctrl-g ξανά. + ÎΑ ΘΥΜΑΣΤΕ ΚΑΙ ΑΥΤΟΠΤΟΠΑΡΙΘΜΟ! + + 4. Για να σώσετε ΜΟÎΟ ένα τμήμα σε αÏχείο, γÏάψτε :#,# w TEST + όπου #,# οι δÏο αÏιθμοί που απομνημονεÏσατε (πάνω,κάτω) και TEST το + όνομα του αÏχείου σας. + + 5. Ξανά, δείτε ότι το αÏχείο είναι εκεί με την :!dir αλλά ΜΗΠτο διαγÏάψετε. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 5.4: ΑÎΑΚΤΩÎΤΑΣ ΚΑΙ ΕÎΩÎΟÎΤΑΣ ΑΡΧΕΙΑ + + + ** Για να εισάγετε τα πεÏιεχόμενα ενός αÏχείου, γÏάψτε :r ΑΡΧΕΙΟ ** + + 1. ΓÏάψτε :!dir για να βεβαιωθείτε ότι το TEST υπάÏχει από Ï€Ïιν. + + 2. Τοποθετήστε τον δÏομέα στο πάνω μέÏος της σελίδας. + +ΣΗΜΕΙΩΣΗ: Αφότου εκτελέσετε το Βήμα 3 θα δείτε το Μάθημα 5.3. + Μετά κινηθείτε ΚΑΤΩ ξανά Ï€Ïος το μάθημα αυτό. + + 3. ΤώÏα ανακτήστε το αÏχείο σας TEST χÏησιμοποιώντας την εντολή :r TEST + όπου TEST είναι το όνομα του αÏχείου. + +ΣΗΜΕΙΩΣΗ: Το αÏχείο που ανακτάτε τοποθετείται ξεκινώντας εκεί που βÏίσκεται + ο δÏομέας. + + 4. Για να επαληθεÏσετε ότι το αÏχείο ανακτήθηκε, πίσω τον δÏομέα και + παÏατηÏήστε ότι υπάÏχουν τώÏα δÏο αντίγÏαφα του Μαθήματος 5.3, το + αÏχικό και η έκδοση του αÏχείου. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ΜΑΘΗΜΑ 5 ΠΕΡΙΛΗΨΗ + + + 1. :!εντολή εκτελεί μία εξωτεÏική εντολή. + + ΜεÏικά χÏήσιμα παÏαδείγματα είναι (MS-DOS): + :!dir - εμφάνιση λίστας ενός καταλόγου. + :!del ΑΡΧΕΙΟ - διαγÏάφει το ΑΡΧΕΙΟ. + + 2. :w ΑΡΧΕΙΟ γÏάφει το Ï„Ïέχων αÏχείο του Vim στο δίσκο με όνομα ΑΡΧΕΙΟ. + + 3. :#,#w ΑΡΧΕΙΟ σώζει τις γÏαμμές από # μέχÏι # στο ΑΡΧΕΙΟ. + + 4. :r ΑΡΧΕΙΟ ανακτεί το αÏχείο δίσκου ΑΡΧΕΙΟ και το παÏεμβάλλει μέσα + στο Ï„Ïέχον αÏχείο μετά από τη θέση του δÏομέα. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 6.1: Η ΕÎΤΟΛΗ ΑÎΟΙΓΜΑΤΟΣ + + + ** Πατήστε o για να ανοίξετε μία γÏαμμή κάτω από τον δÏομέα και να + βÏεθείτε σε Κατάσταση Κειμένου. ** + + 1. Μετακινείστε τον δÏομέα στην παÏακάτω γÏαμμή σημειωμένη με --->. + + 2. Πατήστε o (πεζό) για να ανοίξετε μία γÏαμμή ΚΑΤΩ από τον δÏομέα και να + βÏεθείτε σε Κατάσταση Κειμένου. + + 3. ΤώÏα αντιγÏάψτε τη σημειωμένη με ---> γÏαμμή και πατήστε για να + βγείτε από την Κατάσταση Κειμένου. + +---> After typing o the cursor is placed on the open line in Insert mode. + + 4. Για να ανοίξετε μία γÏαμμή ΠΑÎΩ από τον δÏομέα, πατήστε απλά ένα κεφαλαίο + O, αντί για ένα πεζό o. Δοκιμάστε το στην παÏακάτω γÏαμμή. +Ανοίγετε γÏαμμή πάνω από αυτήν πατώντας Shift-O όσο ο δÏομέας είναι στη γÏαμμή + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 6.2: Η ΕÎΤΟΛΗ ΠΡΟΣΘΗΚΗΣ + + ** Πατήστε a για να εισάγετε κείμενο ΜΕΤΑ τον δÏομέα. ** + + 1. Μετακινείστε τον δÏομέα στο τέλος της Ï€Ïώτης γÏαμμής παÏακάτω + σημειωμένη με ---> πατώντας $ στην Κανονική Κατάσταση. + + 2. Πατήστε ένα a (πεζό) για να Ï€Ïοσθέσετε κείμενο ΜΕΤΑ από τον χαÏακτήÏα + που είναι κάτω από τον δÏομέα. (Το κεφαλαίο A Ï€Ïοσθέτει στο τέλος + της γÏαμμής). + +Σημείωση: Αυτό αποφεÏγει το πάτημα του i , τον τελευταίο χαÏακτήÏα, το + κείμενο της εισαγωγής, , δÏομέα-δεξιά, και τέλος, x, μόνο και + μόνο για να Ï€Ïοσθέσετε στο τέλος της γÏαμμής! + + 3. ΣυμπληÏώστε τώÏα την Ï€Ïώτη γÏαμμή. Σημειώστε επίσης ότι η Ï€Ïοσθήκη είναι + ακÏιβώς ίδια στην Κατάσταση Κειμένου με την Κατάσταση Εισαγωγής, εκτός + από τη θέση που εισάγεται το κείμενο. + +---> This line will allow you to practice +---> This line will allow you to practice appending text to the end of a line. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 6.3: ΑΛΛΗ ΕΚΔΟΣΗ ΤΗΣ ΑÎΤΙΚΑΤΑΣΤΑΣΗΣ + + + ** Πατήστε κεφαλαίο R για να αλλάξετε πεÏισσότεÏους από έναν χαÏακτήÏες. ** + + 1. Μετακινείστε τον δÏομέα στην Ï€Ïώτη γÏαμμή παÏακάτω σημειωμένη με --->. + + 2. Τοποθετήστε τον δÏομέα στην αÏχή της Ï€Ïώτης λέξης που είναι διαφοÏετική + από τη δεÏτεÏη γÏαμμή σημειωμένη με ---> (η λέξη 'last'). + + 3. Πατήστε τώÏα R και αλλάξτε το υπόλοιπο του κειμένου στην Ï€Ïώτη γÏαμμή + γÏάφοντας πάνω από το παλιό κείμενο ώστε να κάνετε την Ï€Ïώτη γÏαμμή ίδια + με τη δεÏτεÏη. + +---> To make the first line the same as the last on this page use the keys. +---> To make the first line the same as the second, type R and the new text. + + 4. Σημειώστε ότι όταν πατάτε για να βγείτε, παÏαμένει οποιοδήποτε + αναλλοίωτο κείμενο. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Μάθημα 6.4: ΡΥΘΜΙΣΗ ΕΠΙΛΟΓΗΣ + + + ** Ρυθμίστε μία επιλογή έτσι ώστε η αναζήτηση ή η αντικατάσταση να αγνοεί + τη διαφοÏά πεζών-κεφαλαίων ** + + 1. Ψάξτε για 'ignore' εισάγοντας: + /ignore + Συνεχίστε αÏκετές φοÏές πατώντας το πλήκτÏο n. + + 2. Θέστε την επιλογή 'ic' (Ignore case) γÏάφοντας: + :set ic + + 3. Ψάξτε τώÏα ξανά για 'ignore' πατώντας: n + Συνεχίστε την αναζήτηση μεÏικές ακόμα φοÏές πατώντας το πλήκτÏο n + + 4. Θέστε τις επιλογές 'hlsearch' και 'incsearch': + :set hls is + + 5. Εισάγετε τώÏα ξανά την εντολή αναζήτησης, και δείτε τι συμβαίνει + /ignore + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ΜΑΘΗΜΑ 6 ΠΕΡΙΛΗΨΗ + + + 1. Πατώντας o ανοίγει μία γÏαμμή ΚΑΤΩ από τον δÏομέα και τοποθετεί τον + δÏομέα στην ανοιχτή γÏαμμή σε Κατάσταση Κειμένου. + + 2. Πατήστε a για να εισάγετε κείμενο ΜΕΤΑ τον χαÏακτήÏα στον οποίο είναι + ο δÏομέας. Πατώντας κεφαλαίο A αυτόματα Ï€Ïοσθέτει κείμενο στο τέλος + της γÏαμμής. + + 3. Πατώντας κεφαλαίο R εισέÏχεται στην Κατάσταη Αντικατάστασης μέχÏι να + πατηθεί το και να εξέλθει. + + 4. ΓÏάφοντας ":set xxx" Ïυθμίζει την επιλογή "xxx". + + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ΜΑΘΗΜΑ 7: ON-LINE ΕÎΤΟΛΕΣ ΒΟΗΘΕΙΑΣ + + + ** ΧÏησιμοποιήστε το on-line σÏστημα βοήθειας ** + + Ο Vim έχει ένα πεÏιεκτικό on-line σÏστημα βοήθειας. Για να ξεκινήσει, + δοκιμάστε κάποιο από τα Ï„Ïία: + - πατήστε το πλήκτÏο (αν έχετε κάποιο) + - πατήστε το πλήκτÏο (αν έχετε κάποιο) + - γÏάψτε :help + + ΓÏάψτε :q για να κλείσετε το παÏάθυÏο της βοήθειας. + + ΜποÏείτε να βÏείτε βοήθεια πάνω σε κάθε αντικείμενο, δίνοντας μία παÏάμετÏο + στην εντολή ":help". Δοκιμάστε αυτά (μην ξεχνάτε να πατάτε ): + + :help w + :help c_ La klavo l estas la plej dekstra kaj movas dekstren. + j La klavo j aspektas kiel malsuprena sago. + v + 1. Movu la kursoron sur la ekrano øis kiam vi sentas vin komforta. + + 2. Premu la klavon (j) øis kiam øi ripetas. + Vi nun scias, kiel moviøi al la sekvanta leciono + + 3. Uzante la malsuprenan klavon, moviøu al la leciono 1.2. + +RIMARKO: Se vi dubas pri tio, kion vi premis, premu por reiri al + la normala reøimo. Tiam repremu la deziratan komandon. + +RIMARKO: La klavoj de la kursoro devus ankaý funkcii. Sed uzante hjkl, + vi kapablos moviøi pli rapide post kiam vi kutimiøos. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 1.2: ELIRI EL VIM + + + !! RIMARKO: Antaý ol plenumi iujn subajn paþojn ajn, legu la tutan lecionon!! + + 1. Premu la klavon (por certigi, ke vi estas en normala reøimo). + + 2. Tajpu: :q! . + Tio eliras el la rekdaktilo, SEN konservi la þanøojn, kiujn vi faris. + + 3. Kiam vi vidas la þelinviton, tajpu la komandon kiun vi uzis por eniri + en æi tiu instruilo. Tio estus: vimtutor + + 4. Se vi memoris tiujn paþojn kaj sentas vin memfida, plenumu la paþojn + 1 øis 3 por eliri kaj reeniri la redaktilon. + +RIMARKO: :q! eliras sen konservi la þanøojn, kiujn vi faris. + Post kelkaj lecionoj, vi lernos kiel konservi la þanøojn al dosiero. + + 5. Movu la kursoron suben øis la leciono 1.3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 1.3: REDAKTO DE TEKSTO - FORVIÞO + + + ** Premu x por forviþi la signon sub la kursoro. ** + + 1. Movu la kursoron al la suba linio markita per --->. + + 2. Por korekti la erarojn, movu la kursoron øis kiam øi estas sur la + forviþenda signo. + + 3. Premu la klavon x por forviþi la nedeziratan signon. + + 4. Ripetu paþojn 2 øis 4 øis kiam la frazo estas øusta. + + +---> La boovinno saaltiss ssur laa luuno. + + 5. Post kiam la linio estas øusta, iru al la leciono 1.4 + +RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 1.4: REDAKTO DE TEKSTO - ENMETO + + + ** Premu i por enmeti tekston. ** + + 1. Movu la kursoron al la unua suba linio markita per --->. + + 2. Por igi la unuan linion sama kiel la dua, movu la kursoron sur la unuan + signon post kie la teksto estas enmetenda. + + 3. Premu i kaj tajpu la bezonatajn aldonojn. + + 4. Premu kiam la eraroj estas korektitaj por reiri al la normala + reøimo. Ripetu la paþojn 2 øis 4 por korekti la frazon. + +---> Mank en æi linio. +---> Mankas tekston en æi tiu linio. + + 5. Kiam vi sentas vin komforta pri enmeto de teksto, moviøu al la + leciono 1.5. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 1.5: REDAKTO DE TEKSTO - POSTALDONO + + + ** Premu A por postaldoni tekston. ** + + 1. Movu la kursoron al la unua suba linio markita per --->. + Ne gravas sur kiu signo estas la kursoro. + + 2. Premu majusklan A kaj tajpu la bezonatajn aldonojn. + + 3. Post kiam la teksto estas aldonita, premu por reiri al la normala + reøimo. + + 4. Movu la kursoron al la dua linio markita per ---> kaj ripetu la + paþojn 2 kaj 3 por korekti la frazon. + +---> Mankas teksto el ti + Mankas teksto el tiu linio. +---> Mankas ankaý teks + Mankas ankaý teksto æi tie. + + 5 Kiam vi sentas vin komforta pri postaldono de teksto, moviøu al la + leciono 1.6 + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 1.6: REDAKTI DOSIERON + + ** Uzu :wq por konservi dosieron kaj eliri. ** + + !! RIMARKO: Antaý ol plenumi iun suban paþon ajn, legu la tutan lecionon!! + + 1. Eliru el la instruilo kiel vi faris en la leciono 1.2: :q! + + 2. Æe la þelinvito, tajpu æi tiun komandon: vim tutor + 'vim' estas la komando por lanæi la redaktilon Vim, 'tutor' estas la + dosiernomo de la dosiero, kiun vi volas redakti. Uzu dosieron, kiu + þanøeblas. + + 3. Enmetu kaj forviþu tekston, kiel vi lernis en la antaýaj lecionoj. + + 4. Konservu la dosieron kun þanøoj kaj eliru el Vim per: :wq + + 5. Relanæu la instruilon vimtutor kaj moviøu suben al la sekvanta resumo. + + 6. Post kiam vi legis la suprajn paþojn, kaj komprenis ilin: faru ilin. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 1 RESUMO + + + 1. La kursoro moviøas aý per la sagoklavoj, aý per la klavoj hjkl. + h (liven) j (suben) k (supren) l (dekstren) + + 2. Por lanæi Vim el la þelinvito, tajpu: vim DOSIERNOMO + + 3. Por eliri el Vim, tajpu: :q! por rezigni la þanøojn + + 4. Por forviþi la signojn æe la pozicio de la kursoro, tajpu: x + + 5. Por enmeti aý postaldoni tekston, tajpu: + i tajpu enmetendan tekston + enmetas tekston antaý la kursoro + + A tajpu la postaldonendan tekston + postaldonas post la kursoro + +RIMARKO: Premo de iras al la normala reøimo, aý rezignas la + nedeziratan aý parte plenumita komando. + +Nun daýrigu al la leciono 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2.1: KOMANDOJ DE FORVIÞO + + + ** Tajpu dw por forviþi vorton. ** + + 1. Premu por certigi, ke vi estas en normala reøimo. + + 2. Movu la kursoron al la linio markita per --->. + + 3. Movu la kursoron al la komenco de vorto, kiu forviþendas. + + 4. Tajpu dw por forviþi la vorton. + + RIMARKO: La litero d aperos en la lasta linio sur la ekrano kiam vi + tajpas øin. Vim atendas øis kiam vi tajpas w . Se vi vidas + alian signon ol d vi tajpis ion mise; premu kaj + rekomencu. + +---> Estas iuj vortoj kiuj Zamenhof ne devus esti akuzativo en æi tiu frazo. + + 5. Ripetu paþojn 3 kaj 4 øis kiam la frazo estas øusta kaj moviøu al la + leciono 2.2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2.2: PLIAJ KOMANDOJ DE FORVIÞO + + + ** Tajpu d$ por forviþi la finon de la linio. ** + + 1. Premu por certigi, ke vi estas en normala reøimo. + + 2. Movu la kursoron sur la suban linion markita per --->. + + 3. Movu la kursoron æe la fino de la øusta linio (POST la unua . ). + + 4. Tajpu d$ por forivþi øis la fino de la linio. + +---> Iu tajpis la finon de æi tiu linio dufoje. fino de æi tiu linio dufoje. + + + 5. Moviøu al la leciono 2.3 por kompreni kio okazas. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2.3: PRI OPERATOROJ KAJ MOVOJ + + + Multaj komandoj, kiuj þanøas la tekston, estas faritaj de operatoro kaj + movo. La formato de komando de forviþo per la operatoro de forviþo d + estas kiel sekvas: + + d movo + + Kie: + d - estas la operatoro de movo + movo - estas tio, pri kio la operatoro operacios (listigita sube) + + Mallonga listo de movoj: + w - øis la komenco de la sekvanta vorto, krom øia unua signo. + e - øis la fino de la nuna vorto, krom la lasta signo. + $ - øis la fino de la linio, krom la lasta signo. + + Do tajpo de 'de' forviþos ekde la kursoro øis la fino de la vorto. + +RIMARKO: Premo de nur la movo en Normala reøimo sen operatoro movos + la kursoron kiel specifite. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2.4: UZI NOMBRON POR MOVO + + ** Tajpo de nombro antaý movo ripetas øin laýfoje. ** + + 1. Movu la kursoron æe la komenco de la suba linio markita per --->. + + 2. Tajpu 2w por movi la kursoron je du vortoj antaýen. + + 3. Tajpu 3e por movi la kursoron æe la fino de la tria vorto antaýen. + + 4. Tajpu 0 (nul) por moviøi æe la komenco de la linio. + + + 5. Ripetu paþojn 2 øis 3 kun malsamaj nombroj. + +---> Tio estas nur linio kun vortoj, kie vi povas moviøi. + + 6. Moviøu al la leciono 2.5. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2.5: UZI NOMBRON POR FORVIÞI PLI + + + ** Tajpo de nombro kun operatoro ripetas øin laýfoje. ** + + En la kombina¼o de la operatoro de forviþo, kaj movo kiel menciita + æi-supre, eblas aldoni nombron antaý la movo por pli forviþi: + d nombro movo + + 1. Movu la kursoron æe la unua MAJUSKLA vorto en la linio markita per --->. + + 2. Tajpu d2w por forviþi la du MAJUSKLAJN vortojn + + 3. Ripetu paþojn 1 øis 2 per malsama nombro por forviþi la sinsekvajn + MAJUSKLAJN vortojn per unu komando + +---> Tiu AB CDE linio FGHI JK LMN OP de vortoj estas Q RS TUV purigita. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2.6: OPERACII SUR LINIOJ + + + ** Tajpu dd por forviþi tutan linion. ** + + Pro la ofteco de forviþo de tuta linio, la verkisto de Vi decidis, ke + estus pli facile simple tajpi du d-ojn por forviþi linion. + + 1. Movu la kursoron sur la duan linion en la suba frazo. + 2. Tajpu dd por forviþi la linion. + 3. Nun moviøu al la kvara linio. + 4. Tajpu 2dd por forviþi du liniojn. + +---> 1) Rozoj estas ruøaj, +---> 2) Þlimo estas amuza, +---> 3) Violoj estas bluaj, +---> 4) Mi havas aýton, +---> 5) Horloøoj diras kioma horo estas, +---> 6) Sukero estas dolæa, +---> 7) Kaj tiel vi estas. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2.7: LA KOMANDO DE MALFARO + + + ** Premu u por malfari la lastajn komandojn, U por ripari la tutan linion. ** + + 1. Movu la kursoron æe la suba linio markita per ---> kaj metu øin sur + la unuan eraron. + 2. Tajpu x por forviþi la unuan nedeziratan signon. + 3. Nun tajpu u por malfari la lastan plenumitan komandon. + 4. Æi-foje, riparu æiujn erarojn en la linio kaj øia originala stato. + 5. Nun tajpu majusklan U por igi la linion al øia antaýa stato. + 6. Nun tajpu u kelkfoje por malfari la U kaj antaýajn komandojn. + 7. Nun tajpu CTRL-R (premante la CTRL klavon dum vi premas R) kelkfoje + por refari la komandojn (malfari la malfarojn). + +---> Koorektii la erarojn sur tiuu æi liniio kaj remettu illlin per malfaro. + + 8. Tiuj estas tre utilaj komandoj. Nun moviøu al la leciono 2 RESUMO. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2 RESUMO + + + 1. Por forviþi ekde la kursoro øis la sekvanta vorto, tajpu: dw + 2. Por forviþi ekde la kursoro øis la fino de la linio, tajpu: d$ + 3. Por forviþi tutan linion, tajpu: dd + + 4. Por ripeti movon, antaýmetu nombron: 2w + 5. La formato de þanøa komando estas: + operatoro [nombro] movo + + kie: + operatoro - estas tio, kio farendas, kiel d por forviþi + [nombro] - estas opcia nombro por ripeti la movon + movo - movas sur la teksto por operacii, kiel ekzemple w (vorto), + $ (øis fino de linio), ktp. + + 6. Por moviøi al la komenco de la linio, uzu nul: 0 + + 7. Por malfari antaýajn agojn, tajpu: u (minuskla u) + Por malfari æiujn þanøojn sur la linio, tajpu: U (majuskla U) + Por refari la malfarojn, tajpu: CTRL-R + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 3.1 LA KOMANDO DE METO + + + ** Tajpu p por meti tekston forviþitan antaýe post la kursoro. ** + + 1. Movu la kursoron æe la unua ---> suba linio. + + 2. Tajpu dd por forviþi la linion kaj konservi øin ene de reøistro de Vim. + + 3. Movu la kursoron æe la linio c), SUPER kie la forviþita linio devus esti. + + 4. Tajpu p por meti la linion sub la kursoron. + + 5. Ripetu la paþojn 2 øis 4 por meti æiujn liniojn en la øusta ordo. + +---> d) Æu ankaý vi povas lerni? +---> b) Violoj estas bluaj, +---> c) Inteligenteco lerneblas, +---> a) Rozoj estas ruøaj, + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 3.2 LA KOMANDO DE ANSTATAÝIGO + + + ** Tajpu rx por anstataýigi la signon æe la kursoro per x . ** + + + 1. Movu la kursoron æe la unua suba linio markita per --->. + + 2. Movu la kursoron øis la unua eraro. + + 3. Tajpu r kaj la signon, kiu devus esti tie. + + 4. Ripetu paþojn 2 kaj 3 øis kiam la unua linio egalas la duan. + +---> Kiem tiu lanio estis tajpita, iu pramis la naøuftajn klovojn! +---> Kiam tiu linio estis tajpita, iu premis la neøustajn klavojn! + + 5. Nun moviøu al la leciono 3.3. + +Rimarko: Memoru, ke vi devus lerni per uzo, kaj ne per memorado. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 3.3 LA OPERATORO DE ÞANØO + + + ** Por þanøi øis la fino de la vorto, tajpu ce . ** + + 1. Movu la kursoron æe la unua suba linio markita per --->. + + 2. Metu la kursoron sur la d en lduzw + + 3. Tajpu ce kaj la øustan vorton (en tiu æi kazo, tajpu inio ). + + 4. Premu kaj moviøu al la sekvanta signo, kiu bezonas þanøon. + + 5. Ripetu la paþojn 3 kaj 4 øis kiam la unua frazo egalas la duan. + +---> Tiu lduzw havas kelkajn vortojn, kiii bezas þanøon per la þanøooto. +---> Tiu linio havas kelkajn vortojn, kiuj bezonas þanøon per la þanøoperatoro. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 3.4 PLIAJ ÞANØOJ PER c + + + ** La operatoro de þanøo uzeblas kun la sama movo kiel forviþo. ** + + 1. La operatoro de þanøo funkcias sammaniere kiel forviþo. La formato estas: + + c [nombro] movo + + 2. La movoj estas samaj, kiel ekzemple w (vorto) kaj $ (fino de linio). + + 3. Moviøu æe la unua suba linio markita per --->. + + 4. Movu la kursoron al la unua eraro. + + 5. Tajpu c$ kaj tajpu la reston de la linio kiel la dua kaj premu . + +---> La fino de æi tiu linio bezonas helpon por igi øin same kiel la dua. +---> La fino de æi tiu linio bezonas korektojn per uzo de la komando c$ + +RIMARKO: Vi povas uzi la klavon Retropaþo por korekti erarojn dum vi tajpas. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 3 RESUMO + + + 1. Por remeti tekston, kiun vi ¼us forviþis, tajpu p. Tio metas la + forviþitan tekston POST la kursoro (se linio estis forviþita, øi + iros en la linion sub la kursoro). + + 2. Por anstataýigi la signon sub la kursoro, tajpu r kaj tiam la signon + kion vi deziras havi tie. + + 3. La operatoro de þanøo ebligas al vi þanøi ekde la kursoro, øis kie + la movo iras. Ekz. tajpu ce por þanøi ekde la kursoro øis la fino + de la vorto, c$ por þanøi øis la fino de la linio. + + 4. La formato de þanøo estas: + + c [nombro] movo + +Nun daýrigu al la sekvanta leciono. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 4.1: POZICIO DE KURSORO KAJ STATO DE DOSIERO + + + ** Tajpu CTRL-G por montri vian pozicion en la dosiero kaj la dosierstaton. + Tajpu G por moviøi al linio en la dosiero. ** + + RIMARKO: Legu la tutan lecionon antaý ol plenumi iun paþon ajn!! + + 1. Premu la klavon Ctrl kaj premu g . Oni nomas tion CTRL-G. + Mesaøo aperos æe la suba parto de la paøo kun la dosiernomo kaj la + pozicio en la dosiero. Memoru la numeron de la linio por paþo 3. + + RIMARKO: Vi eble vidas la pozicion de la kursoro æe la suba dekstra + angulo de la ekrano. Tio okazas kiam la agordo 'ruler' estas + þaltita (vidu :help 'ruler') + + 2. Premu G por moviøi æe la subo de la dosiero. + Tajpu gg por moviøi æe la komenco de la dosiero. + + 3. Tajpu la numeron de la linio kie vi estis kaj poste G . Tio removos + vin al la linio, kie vi estis kiam vi unue premis CTRL-G. + + 4. Se vi sentas vin komforta, plenumu paþojn 1 øis 3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 4.2 LA KOMANDO DE SERÆO + + + ** Tajpu / kaj poste frazon por seræi la frazon. ** + + 1. En normala reøimo, tajpu la / signon. Rimarku, ke øi kaj la kursoro + aperas æe la suba parto de la ekrano kiel por la : komando. + + 2. Nun tajpu 'errarro' . + Tio estas la vorto, kion vi volas seræi. + + 3. Por seræi la saman frazon denove, simple tajpu n . + Por seræi la saman frazon denove en la retrodirekto, tajpu N . + + 4. Por seræi frazon en la retrodirekto, uzu ? anstataý / . + + 5. Por reiri tien, el kie vi venis, premu CTRL-O (Premu Ctrl kaj o + literon o). Ripetu por pli retroiri. CTRL-I iras antaýen. + +---> "errarro" ne estas maniero por literumi eraro; errarro estas eraro. + +RIMARKO: Kiam la seræo atingas la finon de la dosiero, øi daýras æe la + komenco, krom se la agordo 'wrapscan' estas malþaltita. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 4.3 SERÆO DE KONGRUAJ KRAMPOJ + + + ** Tajpu % por trovi kongruan ), ] aý } ** + + 1. Poziciu la kursoron sur iun (, [ aý { en la linio markita per --->. + + 2. Nun tajpu la % signon. + + 3. La kursoro moviøas al la kongrua krampo. + + 4. Tajpu % por movi la kursoron al la alia kongrua krampo. + + 5. Movu la kursoron al la alia (, ), [, ], {, } kaj observu tion, + kion % faras. + +---> Æi tiu ( estas testa linio kun (-oj, [-oj, ]-oj kaj {-oj, }-oj en øi. )) + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 4.4 LA KOMANDO DE ANSTATAýIGO + + + ** Tajpu :s/malnova/nova/g por anstataýigi 'nova' per 'malnova'. ** + + 1. Movu la kursoron al la suba linio markita per --->. + + 2. Tajpu :s/laa/la . Rimarku, ke la komando þanøas nur la + unuan okaza¼on de "laa" en la linio. + + 3. Nun tajpu :s/laa/la/g . Aldono de g opcio signifas mallokan + anstataýigon en la linio. Øi þanøas æiujn okaza¼ojn de "laa" en la + linio. + +---> laa plej bona tempo por vidi florojn estas en laa printempo. + + 4. Por þanøi æiujn okaza¼ojn de iu æena signo inter du linioj, + tajpu :#,#s/malnova/nova/g kie #,# estas la numeroj de linioj de la + intervalo de la linioj kie la anstataýigo + okazos. + Tajpu :%s/malnova/nova/g por þanøi æiujn okaza¼ojn en la tuta + dosiero. + Tajpu :s/malnova/nova/gc por trovi æiujn okaza¼ojn en la tuta + dosiero, kun invitilo æu anstataýigi + aý ne. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 4 RESUMO + + 1. CTRL-G vidigas vian pozicion en la dosiero kaj la staton de la dosiero. + G movas la kursoron al la fino de la dosiero. + numero G movas la kursoron al numero de tiu linio. + gg movas la kursoron al la unua linio. + + 2. Tajpo de / kaj frazon seræas la frazon antaýen. + Tajpo de ? kaj frazon seræas la frazon malantaýen. + Post seræo, tajpu n por trovi la sekvantan okaza¼on en la sama direkto aý + N por seræi en la mala direkto. + CTRL-O movas vin al la antaýaj pozicioj, CTRL-I al la novaj pozicioj. + + 3. Tajpo de % kiam la kursoro estas sur (,),[,],{ aý } moviøas al øia + kongruo. + + 4. Por anstataýigi 'nova' en la unua 'malnova' en linio :s/malnova/nova + Por anstataýigi 'nova' en æiuj 'malnova'-oj en linio :s/malnova/nova/g + Por anstataýigi frazon inter du #-aj linioj :#,#s/malnova/nova/g + Por anstataýigi æiujn okaza¼ojn en la dosiero :%s/malnova/nova/g + Por demandi konfirmon æiu-foje, aldonu 'c' :%s/malnova/nova/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 5.1 KIEL PLENUMI EKSTERAN KOMANDON + + + ** Tajpu :! sekvata de ekstera komando por plenumi la komandon. ** + + 1. Tajpu la konatan komandon : por pozicii la kursoron æe la suba parto + de la ekrano. Tio ebligas tajpadon de komando en komanda linio. + + 2. Nun tajpu la ! (krisigno) signon. Tio ebligas al vi plenumi iun + eksteran þelan komandon ajn. + + 3. Ekzemple, tajpu ls post ! kaj tajpu . Tio listigos la + enhavon de la dosierujo, same kiel se vi estis en þela invito. + Aý uzu :!dir se ls ne funkcias. + +RIMARKO: Eblas plenumi iun eksteran komandon ajn tiamaniere, ankaý kun + argumentoj. + +RIMARKO: Æiuj : komandoj devas finiøi per tajpo de + Ekde nun, ni ne plu mencios tion. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 5.2 PLI PRI KONSERVO DE DOSIERO + + + ** Por konservi la faritajn þanøojn en la teksto, tajpu :w DOSIERNOMO. ** + + 1. Tajpu !dir aý !ls por akiri liston de via dosierujo. + Vi jam scias, ke vi devas tajpi post tio. + + 2. Elektu dosieron, kiu ne jam ekzistas, kiel ekzemple TESTO. + + 3. Nun tajpu: :w TESTO (kie TESTO estas la elektita dosiernomo) + + 4. Tio konservas la tutan dosieron (instruilon de Vim) kun la nomo TESTO. + Por kontroli tion, tajpu :!dir aý !ls denove por vidigi vian + dosierujon. + +RIMARKO: Se vi volus eliri el Vim kaj restartigi øin denove per vim TESTO, + la dosiero estus precize same kiel kopio de la instruilo kiam vi + konservis øin. + + 5. Nun forviþu la dosieron tajpante (MS-DOS): :!del TESTO + aý (UNIKSO): :!rm TESTO + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 5.3 APARTIGI KONSERVENDAN TESTON + + + ** Por konservi parton de la dosiero, tajpu v movo :w DOSIERNOMO ** + + 1. Movu la kursoron al tiu linio. + + 2. Premu v kaj movu la kursoron al la kvina suba ero. Rimarku, ke la + teksto emfaziøas. + + 3. Premu la : signon. Æe la fino de la ekrano :'<,'> aperos. + + 4. Tajpu w TESTO , kie TESTO estas dosiernomo, kiu ne jam ekzistas. + Kontrolu, ke vi vidas :'<,'>w TESTO antaý premi . + + 5. Vim konservos la apartigitajn liniojn al la dosiero TESTO. Uzu :dir + aý :!ls por vidigi øin. Ne forviþu øin. Ni uzos øin en la sekvanta + leciono. + +RIMARKO: Premo de v komencas Viduman apartigon. Vi povas movi la kursoron + por pligrandigi aý malpligrandigi la apartigon. Tiam vi povas uzi + operatoron por plenumi ion kun la teksto. Ekzemple, d forviþas + la tekston. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 5.4 AKIRI KAJ KUNFANDI DOSIEROJN + + + ** Por enmeti la enhavon de dosiero, tajpu :r DOSIERNOMON ** + + 1. Movu la kursoron ¼us super æi tiu linio. + +RIMARKO: Post plenumo de paþo 2, vi vidos tekston el la leciono 5.3. Tiam + moviøu SUBEN por vidi tiun lecionon denove. + + 2. Nun akiru vian dosieron TESTO uzante la komandon :r TESTO kie TESTO + estas la nomo de la dosiero, kiun vi uzis. + La dosiero, kion vi akiras, estas metita sub la linio de la kursoro. + + 3. Por kontroli, æu la dosiero akiriøis, retromovu la kursoron kaj rimarku, + ke estas nun du kopioj de la leciono 5.3, la originala kaj la versio mem + de la dosiero. + +RIMARKO: Vi nun povas legi la eliron de ekstera komando. Ekzemple, + :r !ls legas la eliron de la komando ls kaj metas øin sub la + kursoron. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 5 RESUMO + + + 1. :!komando plenumas eksteran komandon. + + Iuj utilaj ekzemploj estas: + (MS-DOS) (UNIKSO) + :!dir :!ls - listigas dosierujon + :!del DOSIERNOMO :!rm DOSIERNOMO - forviþas la dosieron DOSIERNOMO + + 2. :w DOSIERNOMO konservas la nunan dosieron de Vim al disko kun la + nomo DOSIERNOMO. + + 3. v movo :w DOSIERNOMO konservas la Viduman apartigon de linioj en + dosiero DOSIERNOMO. + + 4. :r DOSIERNOMO akiras la dosieron DOSIERNOMO el la disko kaj metas + øin sub la pozicion de la kursoro. + + 5. :r !dir legas la eligon de la komando dir kaj metas øin sub la + pozicion de la kursoro. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 6.1 LA KOMANDO DE MALFERMO + + + ** Tajpu o por malfermi linion sub la kursoro kaj eniri Enmetan reøimon. ** + + 1. Movu la kursoron al la suba linio markita per --->. + + 2. Tajpu la minusklan literon o por malfermi linion SUB la kursoro kaj + eniri la Enmetan reøimon. + + 3. Nun tajpu tekston kaj premu por eliri la Enmetan reøimon. + +---> Post tajpo de o la kursoro moviøas al la malfermata linio en + Enmeta reøimo. + + 4. Por malfermi linion SUPER la kursoro, nur tajpu majusklan O , + anstataý minusklan o. Provu tion per la suba linio. + +---> Malfermu linion SUPER tiu tajpante O dum la kursoro estas sur tiu linio. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 6.2 LA KOMANDO DE POSTALDONO + + + ** Tajpu a por enmeti POST la kursoro. ** + + 1. Movu la kursoron æe la komenco de la linio markita per --->. + + 2. Premu e øis kiam la kursoro estas æe la fino de li. + + 3. Tajpu a (minuskle) por aldoni tekston POST la kursoro. + + 4. Kompletigu la vorton same kiel la linio sub øi. Premu por + eliri la Enmetan reøimon. + + 5. Uzu e por moviøi al la sekvanta nekompleta vorto kaj ripetu + paþojn 3 kaj 4. + +---> Æi tiu lin ebligos vin ekz vin postal tekston al linio. +---> Æi tiu linio ebligos vin ekzerci vin postaldoni tekston al linio. + +RIMARKO: Æiu a, i kaj A iras al la sama Enmeta reøimo, la nura malsamo + estas tie, kie la signoj estas enmetitaj. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 6.3 ALIA MANIERO POR ANSTATAÝIGI + + + ** Tajpu majusklan R por anstataýigi pli ol unu signo. ** + + 1. Movu la kursoron al la unua suba linio markita per --->. Movu la + kursoron al la komenco de la unua xxx . + + 2. Nun premu R kaj tajpu la nombron sub øi en la dua linio, por ke øi + anstataýigu la xxx . + + 3. Premu por foriri la Anstataýigan reøimon. Rimarku, ke la cetera + parto de la linio restas neþanøata. + + 4. Ripetu la paþojn por anstataýigi la restantajn xxx. + +---> Aldono de 123 al xxx donas al vi xxx. +---> Aldono de 123 al 456 donas al vi 579. + +RIMARKO: Anstataýiga reøimo estas same kiel Enmeta reøimo, sed æiu signo + tajpita forviþas ekzistan signon. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 6.4 KOPII KAJ ALGLUI TEKSTON + + + ** Uzu la y operatoron por kopii tekston, kaj p por alglui øin ** + + + 1. Iru al la linio markita per ---> sube kaj poziciu la kursoron post "a)". + + 2. Komencu la Viduman reøimon per v kaj movu la kursoron ¼us antaý "unua". + + 3. Tajpu y por kopii la emfazitan tekston. + + 4. Movu la kursoron æe la fino de la linio: j$ + + 5. Tajpu p por alglui la tekston. Tiam tajpu: a dua . + + 6. Uzu Viduman reøimon por apartigi " ero.", kopiu øin per y , moviøu + æe la fino de la sekvanta linio per j$ kaj algluu la tekston tie + per p . + +---> a) tio estas la unua ero. + b) + +RIMARKO: vi povas ankaý uzi y kiel operatoro; yw kopias unu vorton. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 6.5 AGORDI OPCION + + + ** Agordu opcion por ke seræo aý anstataýigo ignoru usklecon ** + + 1. Seræu 'ignori' per tajpo de /ignori + Ripetu plurfoje premante n . + + 2. Þaltu la opcion 'ic' (ignori usklecon) per: :set ic + + 3. Nun seræu 'ignori' denove premante n + Rimarku, ke Ignori kaj IGNORI estas nun troveblas. + + 4. Þaltu la opciojn 'hlsearch' kaj 'incsearch': :set hls is + + 5. Nun retajpu la seræan komandon kaj vidu kio okazas: /ignore + + 6. Por malþalti ignoron de uskleco: :set noic + +RIMARKO: Por forigi emfazon de kongruo, tajpu: :nohlsearch +RIMARKO: Se vi deziras ignori usklecon por nur unu seræa komando, uzu \c + en la frazo: /ignore\c + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 6 RESUMO + + 1. Tajpu o por malfermi linion SUB la kursoro kaj eki en Enmeta reøimo. + 1. Tajpu O por malfermi linion SUPER la kursoro. + + 2. Tajpu a por enmeti tekston POST la kursoro. + Tajpu A por enmeti tekston post la fino de la linio. + + 3. La e komando movas la kursoron al la fino de vorto. + + 4. la y operatoro kopias tekston, p algluas øin. + + 5. Tajpo de majuskla R eniras la Anstataýigan reøimon øis kiam + estas premita. + + 6. Tajpo de ":set xxx" þaltas la opcion "xxx". Iuj opcioj estas: + 'ic' 'ignorecase' ignori usklecon dum seræo + 'is' 'incsearch' montru partan kongruon dum seræo + 'hls' 'hlsearch' emfazas æiujn kongruajn frazojn + Vi povas uzi aý la longan, aý la mallongan nomon de opcio. + + 7. Antaýaldonu "no" por malþalti la opcion: :set noic + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 7.1 AKIRI HELPON + + + ** Uzu la helpan sistemon ** + + Vim havas ampleksan helpan sistemon. Por komenciøi, provu unu el la tiuj + tri: + - premu la klavon (se vi havas øin) + - premu la klavon (se vi havas øin) + - tajpu :help + + Legu la tekston en la helpfenestro por trovi kiel helpo funkcias. + Tajpu CTRL-W CTRL-W por salti de unu fenestro al la alia. + Tajpu :q por fermi la helpan fenestron. + + Vi povas trovi helpon pri io ajn aldonante argumenton al la komando + ":help". Provu tiujn (ne forgesu premi ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 7.2 KREI STARTAN SKRIPTON + + + ** Ebligu kapablojn de Vim ** + + Vim havas multe pli da kapabloj ol Vi, sed la plej multaj estas defaýlte + malþaltitaj. Por ekuzi la kapablojn, vi devas krei dosieron "vimrc. + + 1. Ekredaktu la dosieron "vimrc". Tio dependas de via sistemo: + :e ~/.vimrc por Unikso + :e $VIM/_vimrc por MS-Vindozo + + 2. Nun legu la enhavon de la ekzempla "vimrc" + :r $VIMRUNTIME/vimrc_example.vim + + 3. Konservu la dosieron per: + :w + + La sekvantan fojon, kiam vi lanæas Vim, øi uzos sintaksan emfazon. + Vi povas aldoni æiujn viajn preferatajn agordojn al tiu dosiero "vimrc". + Por pli da informoj, tajpu :help vimrc-intro + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 7.3 KOMPLETIGO + + + ** Kompletigo de komanda linio per CTRL-D kaj ** + + 1. Certigu ke Vim estas en kongrua reøimo: :set nocp + + 2. Rigardu tiujn dosierojn, kiuj ekzistas en la dosierujo: :!ls aý :!dir + + 3. Tajpu la komencon de komando: :e + + 4. Premu CTRL-D kaj Vim montros liston de komandoj, kiuj komencas per "e". + + 5. Premu kaj Vim kompletigos la nomon de la komando al ":edit". + + 6. Nun aldonu spaceton kaj la komencon de ekzistanta nomo: :edit DOSI + + 7. Premu . Vim kompletigos la nomon (se øi estas unika) + +RIMARKO: Kompletigo funkcias por multaj komandoj. Nur provu premi CTRL-D kaj + . Estas aparte utila por :help . + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 7 RESUMO + + + 1. Tajpu :help aý premu por malfermi helpan fenestron. + + 2. Tajpu :help kmd por trovi helpon pri kmd. + + 3. Tajpu CTRL-W CTRL-W por salti al alia fenestro. + + 4. Tajpu :q to fermi la helpan fenestron. + + 5. Kreu komencan skripton vimrc por konservi viajn agordojn. + + 6. Kiam vi tajpas : komandon, premu CTRL-D por vidi æiujn kompleteblojn. + Premu por uzi unu kompletigon. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Tio konkludas la instruilon de Vim. Øi celis doni mallongan superrigardon + de la redaktilo Vim, nur tio kio sufiæas por ebligi al vi facilan uzon de + la redaktilo. Estas nepre nekompleta, æar Vim havas multajn multajn pliajn + komandojn. Legu la manlibron: ":help user-manual". + + Tiu instruilo estis verkita de Michael C. Pierce kaj Robert K. Ware, + el la Koloradia Lernejo de Minejoj (Colorado School of Mines) uzante + ideojn provizitajn de Charles Smith el la Stata Universitato de Koloradio + (Colorado State University) + + Retpoþto: bware@mines.colorado.edu. + + Modifita por Vim de Bram Moolenaar. + + Tradukita en Esperanto de Dominique Pellé, 2008-04-01 + Retpoþto: dominique.pelle@gmail.com + Lasta þanøo: 2009-02-01 + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.eo.utf-8 b/vim/bundle/ubuntu-vim72/tutor/tutor.eo.utf-8 new file mode 100644 index 0000000..5adad39 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.eo.utf-8 @@ -0,0 +1,989 @@ +============================================================================== += B o n v e n o n al la I n s t r u i l o de V I M - Versio 1.7.eo.2 = +============================================================================== + + Vim estas tre potenca redaktilo, kiu havas multajn komandojn, tro da ili + por ĉion klarigi en instruilo kiel ĉi tiu. Ĉi tiu instruilo estas + fasonita por priskribi sufiĉajn komandojn, por ke vi kapablu uzi Vim + kun sufiĉa facileco. + + La tempo bezonata por plenumi la kurson estas 25-30 minutoj, kaj dependas + de kiom da tempo estas uzata por eksperimenti. + + ATENTU: + La komandoj en la lecionoj ÅanÄos la tekston. Kopiu tiun ĉi dosieron + por ekzerci vin (se vi lanĉis "vimtutor", tiam estas jam kopio). + + Gravas memori, ke ĉi tiu instruilo estas organizata por instrui per + la uzo. Tio signifas, ke vi devas plenumi la komandojn por bone lerni + ilin. Se vi nur legas la tekston, vi forgesos la komandojn! + + Nun, certigu, ke la majuskla baskulo NE estas en reÄimo majuskla, + kaj premu la klavon j sufiĉe da fojoj por movi la kursoron, kaj por + ke la leciono 1.1 plenigu la ekranon. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 1.1: MOVI LA KURSORON + + + ** Por movi la kursoron, premu la h,j,k,l klavojn kiel montrite. ** + ^ + k Konsilo: La klavo h estas la plej liva kaj movas liven. + < h l > La klavo l estas la plej dekstra kaj movas dekstren. + j La klavo j aspektas kiel malsuprena sago. + v + 1. Movu la kursoron sur la ekrano Äis kiam vi sentas vin komforta. + + 2. Premu la klavon (j) Äis kiam Äi ripetas. + Vi nun scias, kiel moviÄi al la sekvanta leciono + + 3. Uzante la malsuprenan klavon, moviÄu al la leciono 1.2. + +RIMARKO: Se vi dubas pri tio, kion vi premis, premu por reiri al + la normala reÄimo. Tiam repremu la deziratan komandon. + +RIMARKO: La klavoj de la kursoro devus ankaÅ­ funkcii. Sed uzante hjkl, + vi kapablos moviÄi pli rapide post kiam vi kutimiÄos. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 1.2: ELIRI EL VIM + + + !! RIMARKO: AntaÅ­ ol plenumi iujn subajn paÅojn ajn, legu la tutan lecionon!! + + 1. Premu la klavon (por certigi, ke vi estas en normala reÄimo). + + 2. Tajpu: :q! . + Tio eliras el la rekdaktilo, SEN konservi la ÅanÄojn, kiujn vi faris. + + 3. Kiam vi vidas la Åelinviton, tajpu la komandon kiun vi uzis por eniri + en ĉi tiu instruilo. Tio estus: vimtutor + + 4. Se vi memoris tiujn paÅojn kaj sentas vin memfida, plenumu la paÅojn + 1 Äis 3 por eliri kaj reeniri la redaktilon. + +RIMARKO: :q! eliras sen konservi la ÅanÄojn, kiujn vi faris. + Post kelkaj lecionoj, vi lernos kiel konservi la ÅanÄojn al dosiero. + + 5. Movu la kursoron suben Äis la leciono 1.3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 1.3: REDAKTO DE TEKSTO - FORVIÅœO + + + ** Premu x por forviÅi la signon sub la kursoro. ** + + 1. Movu la kursoron al la suba linio markita per --->. + + 2. Por korekti la erarojn, movu la kursoron Äis kiam Äi estas sur la + forviÅenda signo. + + 3. Premu la klavon x por forviÅi la nedeziratan signon. + + 4. Ripetu paÅojn 2 Äis 4 Äis kiam la frazo estas Äusta. + + +---> La boovinno saaltiss ssur laa luuno. + + 5. Post kiam la linio estas Äusta, iru al la leciono 1.4 + +RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 1.4: REDAKTO DE TEKSTO - ENMETO + + + ** Premu i por enmeti tekston. ** + + 1. Movu la kursoron al la unua suba linio markita per --->. + + 2. Por igi la unuan linion sama kiel la dua, movu la kursoron sur la unuan + signon post kie la teksto estas enmetenda. + + 3. Premu i kaj tajpu la bezonatajn aldonojn. + + 4. Premu kiam la eraroj estas korektitaj por reiri al la normala + reÄimo. Ripetu la paÅojn 2 Äis 4 por korekti la frazon. + +---> Mank en ĉi linio. +---> Mankas tekston en ĉi tiu linio. + + 5. Kiam vi sentas vin komforta pri enmeto de teksto, moviÄu al la + leciono 1.5. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 1.5: REDAKTO DE TEKSTO - POSTALDONO + + + ** Premu A por postaldoni tekston. ** + + 1. Movu la kursoron al la unua suba linio markita per --->. + Ne gravas sur kiu signo estas la kursoro. + + 2. Premu majusklan A kaj tajpu la bezonatajn aldonojn. + + 3. Post kiam la teksto estas aldonita, premu por reiri al la normala + reÄimo. + + 4. Movu la kursoron al la dua linio markita per ---> kaj ripetu la + paÅojn 2 kaj 3 por korekti la frazon. + +---> Mankas teksto el ti + Mankas teksto el tiu linio. +---> Mankas ankaÅ­ teks + Mankas ankaÅ­ teksto ĉi tie. + + 5 Kiam vi sentas vin komforta pri postaldono de teksto, moviÄu al la + leciono 1.6 + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 1.6: REDAKTI DOSIERON + + ** Uzu :wq por konservi dosieron kaj eliri. ** + + !! RIMARKO: AntaÅ­ ol plenumi iun suban paÅon ajn, legu la tutan lecionon!! + + 1. Eliru el la instruilo kiel vi faris en la leciono 1.2: :q! + + 2. Ĉe la Åelinvito, tajpu ĉi tiun komandon: vim tutor + 'vim' estas la komando por lanĉi la redaktilon Vim, 'tutor' estas la + dosiernomo de la dosiero, kiun vi volas redakti. Uzu dosieron, kiu + ÅanÄeblas. + + 3. Enmetu kaj forviÅu tekston, kiel vi lernis en la antaÅ­aj lecionoj. + + 4. Konservu la dosieron kun ÅanÄoj kaj eliru el Vim per: :wq + + 5. Relanĉu la instruilon vimtutor kaj moviÄu suben al la sekvanta resumo. + + 6. Post kiam vi legis la suprajn paÅojn, kaj komprenis ilin: faru ilin. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 1 RESUMO + + + 1. La kursoro moviÄas aÅ­ per la sagoklavoj, aÅ­ per la klavoj hjkl. + h (liven) j (suben) k (supren) l (dekstren) + + 2. Por lanĉi Vim el la Åelinvito, tajpu: vim DOSIERNOMO + + 3. Por eliri el Vim, tajpu: :q! por rezigni la ÅanÄojn + + 4. Por forviÅi la signojn ĉe la pozicio de la kursoro, tajpu: x + + 5. Por enmeti aÅ­ postaldoni tekston, tajpu: + i tajpu enmetendan tekston + enmetas tekston antaÅ­ la kursoro + + A tajpu la postaldonendan tekston + postaldonas post la kursoro + +RIMARKO: Premo de iras al la normala reÄimo, aÅ­ rezignas la + nedeziratan aÅ­ parte plenumita komando. + +Nun daÅ­rigu al la leciono 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2.1: KOMANDOJ DE FORVIÅœO + + + ** Tajpu dw por forviÅi vorton. ** + + 1. Premu por certigi, ke vi estas en normala reÄimo. + + 2. Movu la kursoron al la linio markita per --->. + + 3. Movu la kursoron al la komenco de vorto, kiu forviÅendas. + + 4. Tajpu dw por forviÅi la vorton. + + RIMARKO: La litero d aperos en la lasta linio sur la ekrano kiam vi + tajpas Äin. Vim atendas Äis kiam vi tajpas w . Se vi vidas + alian signon ol d vi tajpis ion mise; premu kaj + rekomencu. + +---> Estas iuj vortoj kiuj Zamenhof ne devus esti akuzativo en ĉi tiu frazo. + + 5. Ripetu paÅojn 3 kaj 4 Äis kiam la frazo estas Äusta kaj moviÄu al la + leciono 2.2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2.2: PLIAJ KOMANDOJ DE FORVIÅœO + + + ** Tajpu d$ por forviÅi la finon de la linio. ** + + 1. Premu por certigi, ke vi estas en normala reÄimo. + + 2. Movu la kursoron sur la suban linion markita per --->. + + 3. Movu la kursoron ĉe la fino de la Äusta linio (POST la unua . ). + + 4. Tajpu d$ por forivÅi Äis la fino de la linio. + +---> Iu tajpis la finon de ĉi tiu linio dufoje. fino de ĉi tiu linio dufoje. + + + 5. MoviÄu al la leciono 2.3 por kompreni kio okazas. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2.3: PRI OPERATOROJ KAJ MOVOJ + + + Multaj komandoj, kiuj ÅanÄas la tekston, estas faritaj de operatoro kaj + movo. La formato de komando de forviÅo per la operatoro de forviÅo d + estas kiel sekvas: + + d movo + + Kie: + d - estas la operatoro de movo + movo - estas tio, pri kio la operatoro operacios (listigita sube) + + Mallonga listo de movoj: + w - Äis la komenco de la sekvanta vorto, krom Äia unua signo. + e - Äis la fino de la nuna vorto, krom la lasta signo. + $ - Äis la fino de la linio, krom la lasta signo. + + Do tajpo de 'de' forviÅos ekde la kursoro Äis la fino de la vorto. + +RIMARKO: Premo de nur la movo en Normala reÄimo sen operatoro movos + la kursoron kiel specifite. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2.4: UZI NOMBRON POR MOVO + + ** Tajpo de nombro antaÅ­ movo ripetas Äin laÅ­foje. ** + + 1. Movu la kursoron ĉe la komenco de la suba linio markita per --->. + + 2. Tajpu 2w por movi la kursoron je du vortoj antaÅ­en. + + 3. Tajpu 3e por movi la kursoron ĉe la fino de la tria vorto antaÅ­en. + + 4. Tajpu 0 (nul) por moviÄi ĉe la komenco de la linio. + + + 5. Ripetu paÅojn 2 Äis 3 kun malsamaj nombroj. + +---> Tio estas nur linio kun vortoj, kie vi povas moviÄi. + + 6. MoviÄu al la leciono 2.5. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2.5: UZI NOMBRON POR FORVIÅœI PLI + + + ** Tajpo de nombro kun operatoro ripetas Äin laÅ­foje. ** + + En la kombinaĵo de la operatoro de forviÅo, kaj movo kiel menciita + ĉi-supre, eblas aldoni nombron antaÅ­ la movo por pli forviÅi: + d nombro movo + + 1. Movu la kursoron ĉe la unua MAJUSKLA vorto en la linio markita per --->. + + 2. Tajpu d2w por forviÅi la du MAJUSKLAJN vortojn + + 3. Ripetu paÅojn 1 Äis 2 per malsama nombro por forviÅi la sinsekvajn + MAJUSKLAJN vortojn per unu komando + +---> Tiu AB CDE linio FGHI JK LMN OP de vortoj estas Q RS TUV purigita. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2.6: OPERACII SUR LINIOJ + + + ** Tajpu dd por forviÅi tutan linion. ** + + Pro la ofteco de forviÅo de tuta linio, la verkisto de Vi decidis, ke + estus pli facile simple tajpi du d-ojn por forviÅi linion. + + 1. Movu la kursoron sur la duan linion en la suba frazo. + 2. Tajpu dd por forviÅi la linion. + 3. Nun moviÄu al la kvara linio. + 4. Tajpu 2dd por forviÅi du liniojn. + +---> 1) Rozoj estas ruÄaj, +---> 2) Åœlimo estas amuza, +---> 3) Violoj estas bluaj, +---> 4) Mi havas aÅ­ton, +---> 5) HorloÄoj diras kioma horo estas, +---> 6) Sukero estas dolĉa, +---> 7) Kaj tiel vi estas. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2.7: LA KOMANDO DE MALFARO + + + ** Premu u por malfari la lastajn komandojn, U por ripari la tutan linion. ** + + 1. Movu la kursoron ĉe la suba linio markita per ---> kaj metu Äin sur + la unuan eraron. + 2. Tajpu x por forviÅi la unuan nedeziratan signon. + 3. Nun tajpu u por malfari la lastan plenumitan komandon. + 4. Ĉi-foje, riparu ĉiujn erarojn en la linio kaj Äia originala stato. + 5. Nun tajpu majusklan U por igi la linion al Äia antaÅ­a stato. + 6. Nun tajpu u kelkfoje por malfari la U kaj antaÅ­ajn komandojn. + 7. Nun tajpu CTRL-R (premante la CTRL klavon dum vi premas R) kelkfoje + por refari la komandojn (malfari la malfarojn). + +---> Koorektii la erarojn sur tiuu ĉi liniio kaj remettu illlin per malfaro. + + 8. Tiuj estas tre utilaj komandoj. Nun moviÄu al la leciono 2 RESUMO. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2 RESUMO + + + 1. Por forviÅi ekde la kursoro Äis la sekvanta vorto, tajpu: dw + 2. Por forviÅi ekde la kursoro Äis la fino de la linio, tajpu: d$ + 3. Por forviÅi tutan linion, tajpu: dd + + 4. Por ripeti movon, antaÅ­metu nombron: 2w + 5. La formato de ÅanÄa komando estas: + operatoro [nombro] movo + + kie: + operatoro - estas tio, kio farendas, kiel d por forviÅi + [nombro] - estas opcia nombro por ripeti la movon + movo - movas sur la teksto por operacii, kiel ekzemple w (vorto), + $ (Äis fino de linio), ktp. + + 6. Por moviÄi al la komenco de la linio, uzu nul: 0 + + 7. Por malfari antaÅ­ajn agojn, tajpu: u (minuskla u) + Por malfari ĉiujn ÅanÄojn sur la linio, tajpu: U (majuskla U) + Por refari la malfarojn, tajpu: CTRL-R + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 3.1 LA KOMANDO DE METO + + + ** Tajpu p por meti tekston forviÅitan antaÅ­e post la kursoro. ** + + 1. Movu la kursoron ĉe la unua ---> suba linio. + + 2. Tajpu dd por forviÅi la linion kaj konservi Äin ene de reÄistro de Vim. + + 3. Movu la kursoron ĉe la linio c), SUPER kie la forviÅita linio devus esti. + + 4. Tajpu p por meti la linion sub la kursoron. + + 5. Ripetu la paÅojn 2 Äis 4 por meti ĉiujn liniojn en la Äusta ordo. + +---> d) Ĉu ankaÅ­ vi povas lerni? +---> b) Violoj estas bluaj, +---> c) Inteligenteco lerneblas, +---> a) Rozoj estas ruÄaj, + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 3.2 LA KOMANDO DE ANSTATAŬIGO + + + ** Tajpu rx por anstataÅ­igi la signon ĉe la kursoro per x . ** + + + 1. Movu la kursoron ĉe la unua suba linio markita per --->. + + 2. Movu la kursoron Äis la unua eraro. + + 3. Tajpu r kaj la signon, kiu devus esti tie. + + 4. Ripetu paÅojn 2 kaj 3 Äis kiam la unua linio egalas la duan. + +---> Kiem tiu lanio estis tajpita, iu pramis la naÄuftajn klovojn! +---> Kiam tiu linio estis tajpita, iu premis la neÄustajn klavojn! + + 5. Nun moviÄu al la leciono 3.3. + +Rimarko: Memoru, ke vi devus lerni per uzo, kaj ne per memorado. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 3.3 LA OPERATORO DE ÅœANÄœO + + + ** Por ÅanÄi Äis la fino de la vorto, tajpu ce . ** + + 1. Movu la kursoron ĉe la unua suba linio markita per --->. + + 2. Metu la kursoron sur la d en lduzw + + 3. Tajpu ce kaj la Äustan vorton (en tiu ĉi kazo, tajpu inio ). + + 4. Premu kaj moviÄu al la sekvanta signo, kiu bezonas ÅanÄon. + + 5. Ripetu la paÅojn 3 kaj 4 Äis kiam la unua frazo egalas la duan. + +---> Tiu lduzw havas kelkajn vortojn, kiii bezas ÅanÄon per la ÅanÄooto. +---> Tiu linio havas kelkajn vortojn, kiuj bezonas ÅanÄon per la ÅanÄoperatoro. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 3.4 PLIAJ ÅœANÄœOJ PER c + + + ** La operatoro de ÅanÄo uzeblas kun la sama movo kiel forviÅo. ** + + 1. La operatoro de ÅanÄo funkcias sammaniere kiel forviÅo. La formato estas: + + c [nombro] movo + + 2. La movoj estas samaj, kiel ekzemple w (vorto) kaj $ (fino de linio). + + 3. MoviÄu ĉe la unua suba linio markita per --->. + + 4. Movu la kursoron al la unua eraro. + + 5. Tajpu c$ kaj tajpu la reston de la linio kiel la dua kaj premu . + +---> La fino de ĉi tiu linio bezonas helpon por igi Äin same kiel la dua. +---> La fino de ĉi tiu linio bezonas korektojn per uzo de la komando c$ + +RIMARKO: Vi povas uzi la klavon RetropaÅo por korekti erarojn dum vi tajpas. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 3 RESUMO + + + 1. Por remeti tekston, kiun vi ĵus forviÅis, tajpu p. Tio metas la + forviÅitan tekston POST la kursoro (se linio estis forviÅita, Äi + iros en la linion sub la kursoro). + + 2. Por anstataÅ­igi la signon sub la kursoro, tajpu r kaj tiam la signon + kion vi deziras havi tie. + + 3. La operatoro de ÅanÄo ebligas al vi ÅanÄi ekde la kursoro, Äis kie + la movo iras. Ekz. tajpu ce por ÅanÄi ekde la kursoro Äis la fino + de la vorto, c$ por ÅanÄi Äis la fino de la linio. + + 4. La formato de ÅanÄo estas: + + c [nombro] movo + +Nun daÅ­rigu al la sekvanta leciono. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 4.1: POZICIO DE KURSORO KAJ STATO DE DOSIERO + + + ** Tajpu CTRL-G por montri vian pozicion en la dosiero kaj la dosierstaton. + Tajpu G por moviÄi al linio en la dosiero. ** + + RIMARKO: Legu la tutan lecionon antaÅ­ ol plenumi iun paÅon ajn!! + + 1. Premu la klavon Ctrl kaj premu g . Oni nomas tion CTRL-G. + MesaÄo aperos ĉe la suba parto de la paÄo kun la dosiernomo kaj la + pozicio en la dosiero. Memoru la numeron de la linio por paÅo 3. + + RIMARKO: Vi eble vidas la pozicion de la kursoro ĉe la suba dekstra + angulo de la ekrano. Tio okazas kiam la agordo 'ruler' estas + Åaltita (vidu :help 'ruler') + + 2. Premu G por moviÄi ĉe la subo de la dosiero. + Tajpu gg por moviÄi ĉe la komenco de la dosiero. + + 3. Tajpu la numeron de la linio kie vi estis kaj poste G . Tio removos + vin al la linio, kie vi estis kiam vi unue premis CTRL-G. + + 4. Se vi sentas vin komforta, plenumu paÅojn 1 Äis 3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 4.2 LA KOMANDO DE SERĈO + + + ** Tajpu / kaj poste frazon por serĉi la frazon. ** + + 1. En normala reÄimo, tajpu la / signon. Rimarku, ke Äi kaj la kursoro + aperas ĉe la suba parto de la ekrano kiel por la : komando. + + 2. Nun tajpu 'errarro' . + Tio estas la vorto, kion vi volas serĉi. + + 3. Por serĉi la saman frazon denove, simple tajpu n . + Por serĉi la saman frazon denove en la retrodirekto, tajpu N . + + 4. Por serĉi frazon en la retrodirekto, uzu ? anstataÅ­ / . + + 5. Por reiri tien, el kie vi venis, premu CTRL-O (Premu Ctrl kaj o + literon o). Ripetu por pli retroiri. CTRL-I iras antaÅ­en. + +---> "errarro" ne estas maniero por literumi eraro; errarro estas eraro. + +RIMARKO: Kiam la serĉo atingas la finon de la dosiero, Äi daÅ­ras ĉe la + komenco, krom se la agordo 'wrapscan' estas malÅaltita. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 4.3 SERĈO DE KONGRUAJ KRAMPOJ + + + ** Tajpu % por trovi kongruan ), ] aÅ­ } ** + + 1. Poziciu la kursoron sur iun (, [ aÅ­ { en la linio markita per --->. + + 2. Nun tajpu la % signon. + + 3. La kursoro moviÄas al la kongrua krampo. + + 4. Tajpu % por movi la kursoron al la alia kongrua krampo. + + 5. Movu la kursoron al la alia (, ), [, ], {, } kaj observu tion, + kion % faras. + +---> Ĉi tiu ( estas testa linio kun (-oj, [-oj, ]-oj kaj {-oj, }-oj en Äi. )) + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 4.4 LA KOMANDO DE ANSTATAÅ­IGO + + + ** Tajpu :s/malnova/nova/g por anstataÅ­igi 'nova' per 'malnova'. ** + + 1. Movu la kursoron al la suba linio markita per --->. + + 2. Tajpu :s/laa/la . Rimarku, ke la komando ÅanÄas nur la + unuan okazaĵon de "laa" en la linio. + + 3. Nun tajpu :s/laa/la/g . Aldono de g opcio signifas mallokan + anstataÅ­igon en la linio. Äœi ÅanÄas ĉiujn okazaĵojn de "laa" en la + linio. + +---> laa plej bona tempo por vidi florojn estas en laa printempo. + + 4. Por ÅanÄi ĉiujn okazaĵojn de iu ĉena signo inter du linioj, + tajpu :#,#s/malnova/nova/g kie #,# estas la numeroj de linioj de la + intervalo de la linioj kie la anstataÅ­igo + okazos. + Tajpu :%s/malnova/nova/g por ÅanÄi ĉiujn okazaĵojn en la tuta + dosiero. + Tajpu :s/malnova/nova/gc por trovi ĉiujn okazaĵojn en la tuta + dosiero, kun invitilo ĉu anstataÅ­igi + aÅ­ ne. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 4 RESUMO + + 1. CTRL-G vidigas vian pozicion en la dosiero kaj la staton de la dosiero. + G movas la kursoron al la fino de la dosiero. + numero G movas la kursoron al numero de tiu linio. + gg movas la kursoron al la unua linio. + + 2. Tajpo de / kaj frazon serĉas la frazon antaÅ­en. + Tajpo de ? kaj frazon serĉas la frazon malantaÅ­en. + Post serĉo, tajpu n por trovi la sekvantan okazaĵon en la sama direkto aÅ­ + N por serĉi en la mala direkto. + CTRL-O movas vin al la antaÅ­aj pozicioj, CTRL-I al la novaj pozicioj. + + 3. Tajpo de % kiam la kursoro estas sur (,),[,],{ aÅ­ } moviÄas al Äia + kongruo. + + 4. Por anstataÅ­igi 'nova' en la unua 'malnova' en linio :s/malnova/nova + Por anstataÅ­igi 'nova' en ĉiuj 'malnova'-oj en linio :s/malnova/nova/g + Por anstataÅ­igi frazon inter du #-aj linioj :#,#s/malnova/nova/g + Por anstataÅ­igi ĉiujn okazaĵojn en la dosiero :%s/malnova/nova/g + Por demandi konfirmon ĉiu-foje, aldonu 'c' :%s/malnova/nova/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 5.1 KIEL PLENUMI EKSTERAN KOMANDON + + + ** Tajpu :! sekvata de ekstera komando por plenumi la komandon. ** + + 1. Tajpu la konatan komandon : por pozicii la kursoron ĉe la suba parto + de la ekrano. Tio ebligas tajpadon de komando en komanda linio. + + 2. Nun tajpu la ! (krisigno) signon. Tio ebligas al vi plenumi iun + eksteran Åelan komandon ajn. + + 3. Ekzemple, tajpu ls post ! kaj tajpu . Tio listigos la + enhavon de la dosierujo, same kiel se vi estis en Åela invito. + AÅ­ uzu :!dir se ls ne funkcias. + +RIMARKO: Eblas plenumi iun eksteran komandon ajn tiamaniere, ankaÅ­ kun + argumentoj. + +RIMARKO: Ĉiuj : komandoj devas finiÄi per tajpo de + Ekde nun, ni ne plu mencios tion. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 5.2 PLI PRI KONSERVO DE DOSIERO + + + ** Por konservi la faritajn ÅanÄojn en la teksto, tajpu :w DOSIERNOMO. ** + + 1. Tajpu !dir aÅ­ !ls por akiri liston de via dosierujo. + Vi jam scias, ke vi devas tajpi post tio. + + 2. Elektu dosieron, kiu ne jam ekzistas, kiel ekzemple TESTO. + + 3. Nun tajpu: :w TESTO (kie TESTO estas la elektita dosiernomo) + + 4. Tio konservas la tutan dosieron (instruilon de Vim) kun la nomo TESTO. + Por kontroli tion, tajpu :!dir aÅ­ !ls denove por vidigi vian + dosierujon. + +RIMARKO: Se vi volus eliri el Vim kaj restartigi Äin denove per vim TESTO, + la dosiero estus precize same kiel kopio de la instruilo kiam vi + konservis Äin. + + 5. Nun forviÅu la dosieron tajpante (MS-DOS): :!del TESTO + aÅ­ (UNIKSO): :!rm TESTO + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 5.3 APARTIGI KONSERVENDAN TESTON + + + ** Por konservi parton de la dosiero, tajpu v movo :w DOSIERNOMO ** + + 1. Movu la kursoron al tiu linio. + + 2. Premu v kaj movu la kursoron al la kvina suba ero. Rimarku, ke la + teksto emfaziÄas. + + 3. Premu la : signon. Ĉe la fino de la ekrano :'<,'> aperos. + + 4. Tajpu w TESTO , kie TESTO estas dosiernomo, kiu ne jam ekzistas. + Kontrolu, ke vi vidas :'<,'>w TESTO antaÅ­ premi . + + 5. Vim konservos la apartigitajn liniojn al la dosiero TESTO. Uzu :dir + aÅ­ :!ls por vidigi Äin. Ne forviÅu Äin. Ni uzos Äin en la sekvanta + leciono. + +RIMARKO: Premo de v komencas Viduman apartigon. Vi povas movi la kursoron + por pligrandigi aÅ­ malpligrandigi la apartigon. Tiam vi povas uzi + operatoron por plenumi ion kun la teksto. Ekzemple, d forviÅas + la tekston. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 5.4 AKIRI KAJ KUNFANDI DOSIEROJN + + + ** Por enmeti la enhavon de dosiero, tajpu :r DOSIERNOMON ** + + 1. Movu la kursoron ĵus super ĉi tiu linio. + +RIMARKO: Post plenumo de paÅo 2, vi vidos tekston el la leciono 5.3. Tiam + moviÄu SUBEN por vidi tiun lecionon denove. + + 2. Nun akiru vian dosieron TESTO uzante la komandon :r TESTO kie TESTO + estas la nomo de la dosiero, kiun vi uzis. + La dosiero, kion vi akiras, estas metita sub la linio de la kursoro. + + 3. Por kontroli, ĉu la dosiero akiriÄis, retromovu la kursoron kaj rimarku, + ke estas nun du kopioj de la leciono 5.3, la originala kaj la versio mem + de la dosiero. + +RIMARKO: Vi nun povas legi la eliron de ekstera komando. Ekzemple, + :r !ls legas la eliron de la komando ls kaj metas Äin sub la + kursoron. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 5 RESUMO + + + 1. :!komando plenumas eksteran komandon. + + Iuj utilaj ekzemploj estas: + (MS-DOS) (UNIKSO) + :!dir :!ls - listigas dosierujon + :!del DOSIERNOMO :!rm DOSIERNOMO - forviÅas la dosieron DOSIERNOMO + + 2. :w DOSIERNOMO konservas la nunan dosieron de Vim al disko kun la + nomo DOSIERNOMO. + + 3. v movo :w DOSIERNOMO konservas la Viduman apartigon de linioj en + dosiero DOSIERNOMO. + + 4. :r DOSIERNOMO akiras la dosieron DOSIERNOMO el la disko kaj metas + Äin sub la pozicion de la kursoro. + + 5. :r !dir legas la eligon de la komando dir kaj metas Äin sub la + pozicion de la kursoro. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 6.1 LA KOMANDO DE MALFERMO + + + ** Tajpu o por malfermi linion sub la kursoro kaj eniri Enmetan reÄimon. ** + + 1. Movu la kursoron al la suba linio markita per --->. + + 2. Tajpu la minusklan literon o por malfermi linion SUB la kursoro kaj + eniri la Enmetan reÄimon. + + 3. Nun tajpu tekston kaj premu por eliri la Enmetan reÄimon. + +---> Post tajpo de o la kursoro moviÄas al la malfermata linio en + Enmeta reÄimo. + + 4. Por malfermi linion SUPER la kursoro, nur tajpu majusklan O , + anstataÅ­ minusklan o. Provu tion per la suba linio. + +---> Malfermu linion SUPER tiu tajpante O dum la kursoro estas sur tiu linio. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 6.2 LA KOMANDO DE POSTALDONO + + + ** Tajpu a por enmeti POST la kursoro. ** + + 1. Movu la kursoron ĉe la komenco de la linio markita per --->. + + 2. Premu e Äis kiam la kursoro estas ĉe la fino de li. + + 3. Tajpu a (minuskle) por aldoni tekston POST la kursoro. + + 4. Kompletigu la vorton same kiel la linio sub Äi. Premu por + eliri la Enmetan reÄimon. + + 5. Uzu e por moviÄi al la sekvanta nekompleta vorto kaj ripetu + paÅojn 3 kaj 4. + +---> Ĉi tiu lin ebligos vin ekz vin postal tekston al linio. +---> Ĉi tiu linio ebligos vin ekzerci vin postaldoni tekston al linio. + +RIMARKO: Ĉiu a, i kaj A iras al la sama Enmeta reÄimo, la nura malsamo + estas tie, kie la signoj estas enmetitaj. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 6.3 ALIA MANIERO POR ANSTATAŬIGI + + + ** Tajpu majusklan R por anstataÅ­igi pli ol unu signo. ** + + 1. Movu la kursoron al la unua suba linio markita per --->. Movu la + kursoron al la komenco de la unua xxx . + + 2. Nun premu R kaj tajpu la nombron sub Äi en la dua linio, por ke Äi + anstataÅ­igu la xxx . + + 3. Premu por foriri la AnstataÅ­igan reÄimon. Rimarku, ke la cetera + parto de la linio restas neÅanÄata. + + 4. Ripetu la paÅojn por anstataÅ­igi la restantajn xxx. + +---> Aldono de 123 al xxx donas al vi xxx. +---> Aldono de 123 al 456 donas al vi 579. + +RIMARKO: AnstataÅ­iga reÄimo estas same kiel Enmeta reÄimo, sed ĉiu signo + tajpita forviÅas ekzistan signon. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 6.4 KOPII KAJ ALGLUI TEKSTON + + + ** Uzu la y operatoron por kopii tekston, kaj p por alglui Äin ** + + + 1. Iru al la linio markita per ---> sube kaj poziciu la kursoron post "a)". + + 2. Komencu la Viduman reÄimon per v kaj movu la kursoron ĵus antaÅ­ "unua". + + 3. Tajpu y por kopii la emfazitan tekston. + + 4. Movu la kursoron ĉe la fino de la linio: j$ + + 5. Tajpu p por alglui la tekston. Tiam tajpu: a dua . + + 6. Uzu Viduman reÄimon por apartigi " ero.", kopiu Äin per y , moviÄu + ĉe la fino de la sekvanta linio per j$ kaj algluu la tekston tie + per p . + +---> a) tio estas la unua ero. + b) + +RIMARKO: vi povas ankaÅ­ uzi y kiel operatoro; yw kopias unu vorton. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 6.5 AGORDI OPCION + + + ** Agordu opcion por ke serĉo aÅ­ anstataÅ­igo ignoru usklecon ** + + 1. Serĉu 'ignori' per tajpo de /ignori + Ripetu plurfoje premante n . + + 2. Åœaltu la opcion 'ic' (ignori usklecon) per: :set ic + + 3. Nun serĉu 'ignori' denove premante n + Rimarku, ke Ignori kaj IGNORI estas nun troveblas. + + 4. Åœaltu la opciojn 'hlsearch' kaj 'incsearch': :set hls is + + 5. Nun retajpu la serĉan komandon kaj vidu kio okazas: /ignore + + 6. Por malÅalti ignoron de uskleco: :set noic + +RIMARKO: Por forigi emfazon de kongruo, tajpu: :nohlsearch +RIMARKO: Se vi deziras ignori usklecon por nur unu serĉa komando, uzu \c + en la frazo: /ignore\c + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 6 RESUMO + + 1. Tajpu o por malfermi linion SUB la kursoro kaj eki en Enmeta reÄimo. + 1. Tajpu O por malfermi linion SUPER la kursoro. + + 2. Tajpu a por enmeti tekston POST la kursoro. + Tajpu A por enmeti tekston post la fino de la linio. + + 3. La e komando movas la kursoron al la fino de vorto. + + 4. la y operatoro kopias tekston, p algluas Äin. + + 5. Tajpo de majuskla R eniras la AnstataÅ­igan reÄimon Äis kiam + estas premita. + + 6. Tajpo de ":set xxx" Åaltas la opcion "xxx". Iuj opcioj estas: + 'ic' 'ignorecase' ignori usklecon dum serĉo + 'is' 'incsearch' montru partan kongruon dum serĉo + 'hls' 'hlsearch' emfazas ĉiujn kongruajn frazojn + Vi povas uzi aÅ­ la longan, aÅ­ la mallongan nomon de opcio. + + 7. AntaÅ­aldonu "no" por malÅalti la opcion: :set noic + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 7.1 AKIRI HELPON + + + ** Uzu la helpan sistemon ** + + Vim havas ampleksan helpan sistemon. Por komenciÄi, provu unu el la tiuj + tri: + - premu la klavon (se vi havas Äin) + - premu la klavon (se vi havas Äin) + - tajpu :help + + Legu la tekston en la helpfenestro por trovi kiel helpo funkcias. + Tajpu CTRL-W CTRL-W por salti de unu fenestro al la alia. + Tajpu :q por fermi la helpan fenestron. + + Vi povas trovi helpon pri io ajn aldonante argumenton al la komando + ":help". Provu tiujn (ne forgesu premi ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 7.2 KREI STARTAN SKRIPTON + + + ** Ebligu kapablojn de Vim ** + + Vim havas multe pli da kapabloj ol Vi, sed la plej multaj estas defaÅ­lte + malÅaltitaj. Por ekuzi la kapablojn, vi devas krei dosieron "vimrc. + + 1. Ekredaktu la dosieron "vimrc". Tio dependas de via sistemo: + :e ~/.vimrc por Unikso + :e $VIM/_vimrc por MS-Vindozo + + 2. Nun legu la enhavon de la ekzempla "vimrc" + :r $VIMRUNTIME/vimrc_example.vim + + 3. Konservu la dosieron per: + :w + + La sekvantan fojon, kiam vi lanĉas Vim, Äi uzos sintaksan emfazon. + Vi povas aldoni ĉiujn viajn preferatajn agordojn al tiu dosiero "vimrc". + Por pli da informoj, tajpu :help vimrc-intro + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 7.3 KOMPLETIGO + + + ** Kompletigo de komanda linio per CTRL-D kaj ** + + 1. Certigu ke Vim estas en kongrua reÄimo: :set nocp + + 2. Rigardu tiujn dosierojn, kiuj ekzistas en la dosierujo: :!ls aÅ­ :!dir + + 3. Tajpu la komencon de komando: :e + + 4. Premu CTRL-D kaj Vim montros liston de komandoj, kiuj komencas per "e". + + 5. Premu kaj Vim kompletigos la nomon de la komando al ":edit". + + 6. Nun aldonu spaceton kaj la komencon de ekzistanta nomo: :edit DOSI + + 7. Premu . Vim kompletigos la nomon (se Äi estas unika) + +RIMARKO: Kompletigo funkcias por multaj komandoj. Nur provu premi CTRL-D kaj + . Estas aparte utila por :help . + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 7 RESUMO + + + 1. Tajpu :help aÅ­ premu aÅ­ por malfermi helpan fenestron. + + 2. Tajpu :help kmd por trovi helpon pri kmd. + + 3. Tajpu CTRL-W CTRL-W por salti al alia fenestro. + + 4. Tajpu :q to fermi la helpan fenestron. + + 5. Kreu komencan skripton vimrc por konservi viajn agordojn. + + 6. Kiam vi tajpas : komandon, premu CTRL-D por vidi ĉiujn kompleteblojn. + Premu por uzi unu kompletigon. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Tio konkludas la instruilon de Vim. Äœi celis doni mallongan superrigardon + de la redaktilo Vim, nur tio kio sufiĉas por ebligi al vi facilan uzon de + la redaktilo. Estas nepre nekompleta, ĉar Vim havas multajn multajn pliajn + komandojn. Legu la manlibron: ":help user-manual". + + Tiu instruilo estis verkita de Michael C. Pierce kaj Robert K. Ware, + el la Koloradia Lernejo de Minejoj (Colorado School of Mines) uzante + ideojn provizitajn de Charles Smith el la Stata Universitato de Koloradio + (Colorado State University) + + RetpoÅto: bware@mines.colorado.edu. + + Modifita por Vim de Bram Moolenaar. + + Tradukita en Esperanto de Dominique Pellé, 2008-04-01 + RetpoÅto: dominique.pelle@gmail.com + Lasta ÅanÄo: 2009-02-01 + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.es b/vim/bundle/ubuntu-vim72/tutor/tutor.es new file mode 100644 index 0000000..bfb42e4 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.es @@ -0,0 +1,769 @@ +=============================================================================== += B i e n v e n i d o a l t u t o r d e V I M - Versión 1.4 = +=============================================================================== + + Vim es un editor muy potente que dispone de muchos mandatos, demasiados + para ser explicados en un tutor como éste. Este tutor está diseñado + para describir suficientes mandatos para que usted sea capaz de + aprender fácilmente a usar Vim como un editor de propósito general. + + El tiempo necesario para completar el tutor es aproximadamente de 25-30 + minutos, dependiendo de cuanto tiempo se dedique a la experimentación. + + Los mandatos de estas lecciones modificarán el texto. Haga una copia de + este fichero para practicar (con «vimtutor» esto ya es una copia). + + Es importante recordar que este tutor está pensado para enseñar con + la práctica. Esto significa que es necesario ejecutar los mandatos + para aprenderlos adecuadamente. Si únicamente se lee el texto, se + olvidarán los mandatos. + + Ahora, asegúrese de que la tecla de bloqueo de mayúsculas no está + activada y pulse la tecla j lo suficiente para mover el cursor + de forma que la Lección 1.1 ocupe completamente la pantalla. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 1.1: MOVIMIENTOS DEL CURSOR + + ** Para mover el cursor, pulse las teclas h,j,k,l de la forma que se indica. ** + ^ + k Indicación: La tecla h está a la izquierda y mueve a la izquierda. + < h l > La tecla l está a la derecha y mueve a la derecha. + j La tecla j parece una flecha que apunta hacia abajo. + v + + 1. Mueva el cursor por la pantalla hasta que se sienta cómodo con ello. + + 2. Mantenga pulsada la tecla j hasta que se repita «automágicamente». +---> Ahora ya sabe como llegar a la lección siguiente. + + 3. Utilizando la tecla abajo, vaya a la Lección 1.2. + +Nota: Si alguna vez no está seguro sobre algo que ha tecleado, pulse + para situarse en modo Normal. Luego vuelva a teclear la orden que deseaba. + +Nota: Las teclas de movimiento del cursor también funcionan. Pero usando + hjkl podrá moverse mucho más rápido una vez que se acostumbre a ello. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 1.2: ENTRANDO Y SALIENDO DE VIM + + ¡¡ NOTA: Antes de ejecutar alguno de los pasos siguientes lea primero + la lección entera!! + + 1. Pulse la tecla (para asegurarse de que está en modo Normal). + + 2. Escriba: :q! + +---> Esto provoca la salida del editor SIN guardar ningún cambio que se haya + hecho. Si quiere guardar los cambios y salir escriba: + :wq + + 3. Cuando vea el símbolo del sistema, escriba el mandato que le trajo a este + tutor. Éste puede haber sido: vimtutor + Normalmente se usaría: vim tutor + +---> 'vim' significa entrar al editor, 'tutor' es el fichero a editar. + + 4. Si ha memorizado estos pasos y se se siente con confianza, ejecute los + pasos 1 a 3 para salir y volver a entrar al editor. Después mueva el + cursor hasta la Lección 1.3. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 1.3: EDICIÓN DE TEXTO - BORRADO + +** Estando en modo Normal pulse x para borrar el carácter sobre el cursor. **j + + + 1. Mueva el cursor a la línea de abajo señalada con --->. + + 2. Para corregir los errores, mueva el cursor hasta que esté bajo el + carácter que va aser borrado. + + 3. Pulse la tecla x para borrar el carácter sobrante. + + 4. Repita los pasos 2 a 4 hasta que la frase sea la correcta. + +---> La vvaca saltóó soobree laa luuuuna. + + 5. Ahora que la línea esta correcta, continúe con la Lección 1.4. + + +NOTA: A medida que vaya avanzando en este tutor no intente memorizar, + aprenda practicando. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 1.4: EDICIÓN DE TEXTO - INSERCIÓN + + ** Estando en modo Normal pulse i para insertar texto. ** + + + 1. Mueva el cursor a la primera línea de abajo señalada con --->. + + 2. Para que la primera línea se igual a la segunda mueva el cursor bajo el + primer carácter que sigue al texto que ha de ser insertado. + + 3. Pulse i y escriba los caracteres a añadir. + + 4. A medida que sea corregido cada error pulse para volver al modo + Normal. Repita los pasos 2 a 4 para corregir la frase. + +---> Flta texto en esta . +---> Falta algo de texto en esta línea. + + 5. Cuando se sienta cómodo insertando texto pase al resumen que esta más + abajo. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RESUMEN DE LA LECCIÓN 1 + + + 1. El cursor se mueve utilizando las teclas de las flechas o las teclas hjkl. + h (izquierda) j (abajo) k (arriba) l (derecha) + + 2. Para acceder a Vim (desde el símbolo del sistema %) escriba: + vin FILENAME + + 3. Para salir de Vim escriba: :q! para eliminar todos + los cambios. + + 4. Para borrar un carácter sobre el cursor en modo Normal pulse: x + + 5. Para insertar texto en la posición del cursor estando en modo Normal: + pulse i escriba el texto pulse + +NOTA: Pulsando se vuelve al modo Normal o cancela un mandato no deseado + o incompleto. + +Ahora continúe con la Lección 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 2.1: MANDATOS PARA BORRAR + + + ** Escriba dw para borrar hasta el final de una palabra ** + + + 1. Pulse para asegurarse de que está en el modo Normal. + + 2. Mueva el cursor a la línea de abajo señalada con --->. + + 3. Mueva el cursor al comienzo de una palabra que desee borrar. + + 4. Pulse dw para hacer que la palabra desaparezca. + + + NOTA: Las letras dw aparecerán en la última línea de la pantalla cuando + las escriba. Si escribe algo equivocado pulse y comience de nuevo. + + +---> Hay algunas palabras pásalo bien que no pertenecen papel a esta frase. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 2.2: MÁS MANDATOS PARA BORRAR + + + ** Escriba d$ para borrar hasta el final de la línea. ** + + + 1. Pulse para asegurarse de que está en el modo Normal. + + 2. Mueva el cursor a la línea de abajo señalada con --->. + + 3. Mueva el cursor al final de la línea correcta (DESPUÉS del primer . ). + + 4. Escriba d$ para borrar hasta el final de la línea. + +---> Alguien ha escrito el final de esta línea dos veces. esta línea dos veces. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 2.3: SOBRE MANDATOS Y OBJETOS + + + El formato del mandato de borrar d es como sigue: + + [número] d objeto O d [número] objeto + donde: + número - es cuántas veces se ha de ejecutar el mandato (opcional, defecto=1). + d - es el mandato para borrar. + objeto - es sobre lo que el mandato va a operar (lista, abajo). + + Una lista corta de objetos: + w - desde el cursor hasta el final de la palabra, incluyendo el espacio. + e - desde el cursor hasta el final de la palabra, SIN incluir el espacio. + $ - desde el cursor hasta el final de la línea. + +NOTE: Para los aventureros, pulsando sólo el objeto estando en modo Normal + sin un mandato moverá el cursor como se especifica en la lista de objetos. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 2.4: UNA EXCEPCIÓN AL 'MANDATO-OBJETO' + + ** Escriba dd para borrar una línea entera. ** + + Debido a la frecuencia con que se borran líneas enteras, los diseñadores + de Vim decidieron que sería más fácil el escribir simplemente dos des en + una fila para borrar una línea. + + 1. Mueva el cursor a la segunda línea de la lista de abajo. + 2. Escriba dd para borrar la línea. + 3. Muévase ahora a la cuarta línea. + 4. Escriba 2dd (recuerde número-mandato-objeto) para borrar las dos + líneas. + + 1) Las rosas son rojas, + 2) El barro es divertido, + 3) El cielo es azul, + 4) Yo tengo un coche, + 5) Los relojes marcan la hora, + 6) El azucar es dulce, + 7) Y así eres tu. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 2.5: EL MANDATO DESHACER + + + ** Pulse u para deshacer los últimos mandatos, + U para deshacer una línea entera. ** + + 1. Mueva el cursor a la línea de abajo señalada con ---> y sitúelo bajo el + primer error. + 2. Pulse x para borrar el primer caráter erróneo. + 3. Pulse ahora u para deshacer el último mandato ejecutado. + 4. Ahora corrija todos los errores de la línea usando el mandato x. + 5. Pulse ahora U mayúscula para devolver la línea a su estado original. + 6. Pulse ahora u unas pocas veces para deshacer lo hecho por U y los + mandatos previos. + 7. Ahora pulse CTRL-R (mantenga pulsada la tecla CTRL y pulse R) unas + pocas veces para volver a ejecutar los mandatos (deshacer lo deshecho). + +---> Corrrija los errores dee esttta línea y vuuelva a ponerlos coon deshacer. + + 8. Estos mandatos son muy útiles. Ahora pase al resumen de la Lección 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RESUMEN DE LA LECCIÓN 2 + + 1. Para borrar desde el cursor hasta el final de una palabra pulse: dw + + 2. Para borrar desde el cursor hasta el final de una línea pulse: d$ + + 3. Para borrar una línea enter pulse: dd + + 4. El formato de un mandato en modo Normal es: + + [número] mandato objeto O mandato [número] objeto + donde: + número - es cuántas veces se ha de ejecutar el mandato + mandato - es lo que hay que hacer, por ejemplo, d para borrar + objeto - es sobre lo que el mandato va a operar, por ejemplo + w (palabra), $ (hasta el final de la línea), etc. + + 5. Para deshacer acciones previas pulse: u (u minúscula) + Para deshacer todos los cambios de una línea pulse: U (U mayúscula) + Para deshacer lo deshecho pulse: CTRL-R + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 3.1: EL MANDATO «PUT» (poner) + + ** Pulse p para poner lo último que ha borrado después del cursor. ** + + 1. Mueva el cursor al final de la lista de abajo. + + 2. Escriba dd para borrar la línea y almacenarla en el buffer de Vim. + + 3. Mueva el cursor a la línea que debe quedar por debajo de la + línea a mover. + + 4. Estando en mod Normal, pulse p para restituir la línea borrada. + + 5. Repita los pasos 2 a 4 para poner todas las líneas en el orden correcto. + + d) ¿Puedes aprenderla tu? + b) Las violetas son azules, + c) La inteligencia se aprende, + a) Las rosas son rojas, + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 3.2: EL MANDATO «REPLACE» (remplazar) + + + ** Pulse r y un carácter para sustituir el carácter sobre el cursor. ** + + + 1. Mueva el cursor a la primera línea de abajo señalada con --->. + + 2. Mueva el cursor para situarlo bajo el primer error. + + 3. Pulse r y el carácter que debe sustituir al erróneo. + + 4. Repita los pasos 2 y 3 hasta que la primera línea esté corregida. + +---> ¡Cuendo esta línea fue rscrita alguien pulso algunas teclas equibocadas! +---> ¡Cuando esta línea fue escrita alguien pulsó algunas teclas equivocadas! + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 3.3: EL MANDATO «CHANGE» (cambiar) + + + ** Para cambiar parte de una palabra o toda ella escriba cw . ** + + + 1. Mueva el cursor a la primera línea de abajo señalada con --->. + + 2. Sitúe el cursor en la u de lubrs. + + 3. Escriba cw y corrija la palabra (en este caso, escriba 'ínea'). + + 4. Pulse y mueva el cursor al error siguiente (el primer carácter + que deba cambiarse). + + 5. Repita los pasos 3 y 4 hasta que la primera frase sea igual a la segunda. + +---> Esta lubrs tiene unas pocas pskavtad que corregir usem el mandato change. +---> Esta línea tiene unas pocas palabras que corregir usando el mandato change. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 3.4: MÁS CAMBIOS USANDO c + + ** El mandato change se utiliza con los mismos objetos que delete. ** + + 1. El mandato change funciona de la misma forma que delete. El formato es: + + [número] c objeto O c [número] objeto + + 2. Los objetos son tambiém los mismos, tales como w (palabra), $ (fin de + la línea), etc. + + 3. Mueva el cursor a la primera línea de abajo señalada con --->. + + 4. Mueva el cursor al primer error. + + 5. Escriba c$ para hacer que el resto de la línea sea como la segunda + y pulse . + +---> El final de esta línea necesita alguna ayuda para que sea como la segunda. +---> El final de esta línea necesita ser corregido usando el mandato c$. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RESUMEN DE LA LECCIÓN 3 + + + 1. Para sustituir texto que ha sido borrado, pulse p . Esto Pone el texto + borrado DESPUÉS del cursor (si lo que se ha borrado es una línea se + situará sobre la línea que está sobre el cursor). + + 2. Para sustituir el carácter bajo el cursor, pulse r y luego el + carácter que sustituirá al original. + + 3. El mandato change le permite cambiar el objeto especificado desde la + posición del cursor hasta el final del objeto; e.g. Pulse cw para + cambiar desde el cursor hasta el final de la palabra, c$ para cambiar + hasta el final de la línea. + + 4. El formato para change es: + + [número] c objeto O c [número] objeto + + Pase ahora a la lección siguiente. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 4.1: SITUACIÓN EN EL FICHERO Y SU ESTADO + + + ** Pulse CTRL-g para mostrar su situación en el fichero y su estado. + Pulse MAYU-G para moverse a una determinada línea del fichero. ** + + Nota: ¡¡Lea esta lección entera antes de ejecutar alguno de los pasos!! + + + 1. Mantenga pulsada la tecla Ctrl y pulse g . Aparece una línea de estado + al final de la pantalla con el nombre del fichero y la línea en la que + está situado. Recuerde el número de la línea para el Paso 3. + + 2. Pulse Mayu-G para ir al final del fichero. + + 3. Escriba el número de la línea en la que estaba y despúes Mayu-G. Esto + le volverá a la línea en la que estaba cuando pulsó Ctrl-g. + (Cuando escriba los números NO se mostrarán en la pantalla). + + 4. Si se siente confiado en poder hacer esto ejecute los pasos 1 a 3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 4.2: EL MANDATO «SEARCH» (buscar) + + ** Escriba / seguido de una frase para buscar la frase. ** + + 1. En modo Normal pulse el carácter / . Fíjese que tanto el carácter / + como el cursor aparecen en la última línea de la pantalla, lo mismo + que el mandato : . + + 2. Escriba ahora errroor . Esta es la palabra que quiere buscar. + + 3. Para repetir la búsqueda, simplemente pulse n . + Para busacar la misma frase en la dirección opuesta, pulse Mayu-N . + + 4. Si quiere buscar una frase en la dirección opuesta (hacia arriba), + utilice el mandato ? en lugar de / . + +---> Cuando la búsqueda alcanza el final del fichero continuará desde el + principio. + + «errroor» no es la forma de deletrear error; errroor es un error. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 4.3: BÚSQUEDA PARA COMPROBAR PARÉNTESIS + + ** Pulse % para encontrar el paréntesis correspondiente a ),] o } . ** + + + 1. Sitúe el cursor en cualquiera de los caracteres ), ] o } en la línea de + abajo señalada con --->. + + 2. Pulse ahora el carácter % . + + 3. El cursor debería situarse en el paréntesis (, corchete [ o llave { + correspondiente. + + 4. Pulse % para mover de nuevo el cursor al paréntesis, corchete o llave + correspondiente. + +---> Esto ( es una línea de prueba con (, [, ], {, y } en ella. )). + +Nota: ¡Esto es muy útil en la detección de errores en un programa con + paréntesis, corchetes o llaves disparejos. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 4.4: UNA FORMA DE CAMBIAR ERRORES + + + ** Escriba :s/viejo/nuevo/g para sustituir 'viejo' por 'nuevo'. ** + + + 1. Mueva el cursor a la línea de abajo señalada con --->. + + 2. Escriba :s/laas/las/ . Tenga en cuenta que este mandato cambia + sólo la primera aparición en la línea de la expresión a cambiar. + +---> Laas mejores épocas para ver laas flores son laas primaveras. + + 4. Para cambiar todas las apariciones de una expresión ente dos líneas + escriba :#,#s/viejo/nuevo/g donde #,# son los números de las dos + líneas. Escriba :%s/viejo/nuevo/g para hacer los cambios en todo + el fichero. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RESUMEN DE LA LECCIÓN 4 + + + 1. Ctrl-g muestra la posición del cursor en el fichero y su estado. + Mayu-G mueve el cursor al final del fichero. Un número de línea + sewguido de Mayu-G mueve el cursor a la línea con ese número. + + 2. Pulsando / seguido de una frase busca la frase hacia ADELANTE. + Pulsando ? seguido de una frase busca la frase hacia ATRÁS. + Después de una búsqueda pulse n para encontrar la aparición + siguiente en la misma dirección. + + 3. Pulsando % cuando el cursor esta sobre (,), [,], { o } localiza + la pareja correspondiente. + + 4. Para cambiar viejo por nuevo en una línea pulse :s/viejo/nuevo + Para cambiar todos los viejo por nuevo en una línea pulse :s/viejo/nuevo/g + Para cambiar frases entre dos números de líneas pulse :#,#s/viejo/nuevo/g + Para cambiar viejo por nuevo en todo el fichero pulse :%s/viejo/nuevo/g + Para pedir confirmación en cada caso añada 'c' :%s/viejo/nuevo/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 5.1: CÓMO EJECUTAR UN MANDATO EXTERNO + + + ** Escriba :! seguido de un mandato externo para ejecutar ese mandato. ** + + + 1. Escriba el conocido mandato : para situar el cursor al final de la + pantalla. Esto le permitirá introducir un mandato. + + 2. Ahora escriba el carácter ! (signo de admiración). Esto le permitirá + ejecutar cualquier mandato del sistema. + + 3. Como ejemplo escriba ls después del ! y luego pulse . Esto + le mostrará una lista de su directorio, igual que si estuviera en el + símbolo del sistema. Si ls no funciona utilice !:dir . + +--->Nota: De esta manera es posible ejecutar cualquier mandato externo. + +--->Nota: Todos los mandatos : deben finalizarse pulsando . + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 5.2: MÁS SOBRE GUARDAR FICHEROS + + + ** Para guardar los cambios hechos en un fichero, + escriba :w NOMBRE_DE_FICHERO. ** + + + 1. Escriba :!dir o :!ls para ver una lista de su directorio. + Ya sabe que debe pulsar después de ello. + + 2. Elija un nombre de fichero que todavía no exista, como TEST. + + 3. Ahora escriba :w TEST (donde TEST es el nombre de fichero elegido). + + 4. Esta acción guarda todo el fichero (Vim Tutor) bajo el nombre TEST. + Para comprobarlo escriba :!dir de nuevo y vea su directorio. + +---> Tenga en cuenta que si sale de Vim y entra de nuevo con el nombre de + fichero TEST, el fichero sería una copia exacta del tutor cuando lo + ha guardado. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 5.3: UN MANDATO DE ESCRITURA SELECTIVO + + ** Para guardar parte del fuchero escriba :#,# NOMBRE_DEL_FICHERO ** + + + 1. Escriba de nuevo, una vez más, :!dir o :!ls para obtener una lista + de su directorio y elija nombre de fichero adecuado, como TEST. + + 2. Mueva el cursor al principio de la pantalla y pulse Ctrl-g para saber + el número de la línea correspondiente. ¡RECUERDE ESTE NÚMERO! + + 3. Ahora mueva el cursor a la última línea de la pantalla y pulse Ctrl-g + de nuevo. ¡RECUERDE TAMBIÉN ESTE NÚMERO! + + 4. Para guardar SOLAMENTE una parte de un fichero, escriba :#,# w TEST + donde #,# son los números que usted ha recordado (primera línea, + última línea) y TEST es su nombre de dichero. + + 5. De nuevo, vea que el fichero esta ahí con :!dir pero NO lo borre. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 5.4: RECUPERANDO Y MEZCLANDO FICHEROS + + ** Para insertar el contenido de un fichero escriba :r NOMBRE_DEL_FICHERO ** + + 1. Escriba :!dir para asegurarse de que su fichero TEST del ejercicio + anterior está presente. + + 2. Situe el cursor al principio de esta pantalla. + +NOTA: Después de ejecutar el paso 3 se verá la Lección 5.3. Luego muévase + hacia ABAJO para ver esta lección de nuevo. + + 3. Ahora recupere el fichero TEST utilizando el mandato :r TEST donde + TEST es el nombre del fichero. + +NOTA: El fichero recuperado se sitúa a partir de la posición del cursor. + + 4. Para verificar que el fichero ha sido recuperado, mueva el cursor hacia + arriba y vea que hay dos copias de la Lección 5.3, la original y la + versión del fichero. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RESUMEN DE LA LECCIÓN 5 + + + 1. :!mandato ejecuta un mandato externo. + + Algunos ejemplos útiles son: + :!dir - muestra el contenido de un directorio. + :!del NOMBRE_DE_FICHERO - borra el fichero NOMBRE_DE FICHERO. + + 2. :#,#w NOMBRE_DE _FICHERO guarda desde las líneas # hasta la # en el + fichero NOMBRE_DE_FICHERO. + + 3. :r NOMBRE_DE _FICHERO recupera el fichero del disco NOMBRE_DE FICHERO + y lo inserta en el fichero en curso a partir de la posición del cursor. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 6.1: EL MANDATO «OPEN» (abrir) + + + ** Pulse o para abrir una línea debajo del cursor + y situarle en modo Insert ** + + + 1. Mueva el cursor a la línea de abajo señalada con --->. + + 2. Pulse o (minúscula) para abrir una línea por DEBAJO del cursor + y situarle en modo Insert. + + 3. Ahora copie la línea señalada con ---> y pulse para salir del + modo Insert. + +---> Luego de pulsar o el cursor se sitúa en la línea abierta en modo Insert. + + 4. Para abrir una línea por encima del cursor, simplemente pulse una O + mayúscula, en lugar de una o minúscula. Pruebe este en la línea siguiente. +Abra una línea sobre ésta pulsando Mayu-O cuando el curso está en esta línea. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 6.2: EL MANDATO «APPEND» (añadir) + + ** Pulse a para insertar texto DESPUÉS del cursor. ** + + + 1. Mueva el cursor al final de la primera línea de abajo señalada con ---> + pulsando $ en modo Normal. + + 2. Escriba una a (minúscula) para añadir texto DESPUÉS del carácter + que está sobre el cursor. (A mayúscula añade texto al final de la línea). + +Nota: ¡Esto evita el pulsar i , el último carácter, el texto a insertar, + , cursor a la derecha y, finalmente, x , sólo para añadir algo + al final de una línea! + + 3. Complete ahora la primera línea. Nótese que append es exactamente lo + mismo que modo Insert, excepto por el lugar donde se inserta el texto. + +---> Esta línea le permitirá praticar +---> Esta línea le permitirá praticar el añadido de texto al final de una línea. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 6.3: OTRA VERSIÓN DE «REPLACE» (remplazar) + + ** Pulse una R mayúscula para sustituir más de un carácter. ** + + + 1. Mueva el cursor a la primera línea de abajo señalada con --->. + + 2. Sitúe el cursor al comienzo de la primera palabra que sea diferente + de las de la segunda línea marcada con ---> (la palabra 'anterior'). + + 3. Ahora pulse R y sustituya el resto del texto de la primera línea + escribiendo sobre el viejo texto para que la primera línea sea igual + que la primera. + +---> Para hacer que esta línea sea igual que la anterior use las teclas. +---> Para hacer que esta línea sea igual que la siguiente escriba R y el texto. + + 4. Nótese que cuando pulse para salir, el texto no alterado permanece. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 6.4: FIJAR OPCIONES + + ** Fijar una opción de forma que una búsqueda o sustitución ignore la caja ** + (Para el concepto de caja de una letra, véase la nota al final del fichero) + + + 1. Busque 'ignorar' introduciendo: + /ignorar + Repita varias veces la búsque pulsando la tecla n + + 2. Fije la opción 'ic' (Ignorar la caja de la letra) escribiendo: + :set ic + + 3. Ahora busque 'ignorar' de nuevo pulsando n + Repita la búsqueda varias veces más pulsando la tecla n + + 4. Fije las opciones 'hlsearch' y 'insearch': + :set hls is + + 5. Ahora introduzca la orden de búsqueda otra vez, y vea qué pasa: + /ignore + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RESUMEN DE LA LECCIÓN 6 + + + 1. Pulsando o abre una línea por DEBAJO del cursor y sitúa el cursor en + la línea abierta en modo Insert. + Pulsando una O mayúscula se abre una línea SOBRE la que está el cursor. + + 2. Pulse una a para insertar texto DESPUÉS del carácter sobre el cursor. + Pulsando una A mayúscula añade automáticamente texto al final de la + línea. + + 3. Pulsando una R mayúscula se entra en modo Replace hasta que, para salir, + se pulse . + + 4. Escribiendo «:set xxx» fija la opción «xxx» + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 7: MANDATOS PARA LA AYUDA EN LÍNEA + + ** Utilice el sistema de ayuda en línea ** + + + Vim dispone de un sistema de ayuda en línea. Para activarlo, pruebe una + de estas tres formas: + - pulse la tecla (si dispone de ella) + - pulse la tecla (si dispone de ella) + - escriba :help + + Escriba :q para cerrar la ventana de ayuda. + + Puede encontrar ayuda en casi cualquier tema añadiendo un argumento al + mandato «:help» mandato. Pruebe éstos: + + :help w + :help c_ + :help insert-index + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Aquí concluye el tutor de Vim. Está pensado para dar una visión breve del + editor Vim, lo suficiente para permitirle usar el editor de forma bastante + sencilla. Está muy lejos de estar completo pues Vim tiene muchísimos más + mandatos. + + Para lecturas y estudios posteriores se recomienda el libro: + Learning the Vi Editor - por Linda Lamb + Editorial: O'Reilly & Associates Inc. + Es un buen libro para llegar a saber casi todo lo que desee hacer con Vi. + La sexta edición incluye también información sobre Vim. + + Este tutorial ha sido escrito por Michael C. Pierce y Robert K. Ware, + Colorado School of Mines utilizando ideas suministradas por Charles Smith, + Colorado State University. + E-mail: bware@mines.colorado.edu. + + Modificado para Vim por Bram Moolenaar. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Traducido del inglés por: + + Eduardo F. Amatria + Correo electrónico: eferna1@platea.pntic.mec.es + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.es.utf-8 b/vim/bundle/ubuntu-vim72/tutor/tutor.es.utf-8 new file mode 100644 index 0000000..84db8fd --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.es.utf-8 @@ -0,0 +1,769 @@ +=============================================================================== += B i e n v e n i d o a l t u t o r d e V I M - Versión 1.4 = +=============================================================================== + + Vim es un editor muy potente que dispone de muchos mandatos, demasiados + para ser explicados en un tutor como éste. Este tutor está diseñado + para describir suficientes mandatos para que usted sea capaz de + aprender fácilmente a usar Vim como un editor de propósito general. + + El tiempo necesario para completar el tutor es aproximadamente de 25-30 + minutos, dependiendo de cuanto tiempo se dedique a la experimentación. + + Los mandatos de estas lecciones modificarán el texto. Haga una copia de + este fichero para practicar (con «vimtutor» esto ya es una copia). + + Es importante recordar que este tutor está pensado para enseñar con + la práctica. Esto significa que es necesario ejecutar los mandatos + para aprenderlos adecuadamente. Si únicamente se lee el texto, se + olvidarán los mandatos. + + Ahora, asegúrese de que la tecla de bloqueo de mayúsculas no está + activada y pulse la tecla j lo suficiente para mover el cursor + de forma que la Lección 1.1 ocupe completamente la pantalla. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 1.1: MOVIMIENTOS DEL CURSOR + + ** Para mover el cursor, pulse las teclas h,j,k,l de la forma que se indica. ** + ^ + k Indicación: La tecla h está a la izquierda y mueve a la izquierda. + < h l > La tecla l está a la derecha y mueve a la derecha. + j La tecla j parece una flecha que apunta hacia abajo. + v + + 1. Mueva el cursor por la pantalla hasta que se sienta cómodo con ello. + + 2. Mantenga pulsada la tecla j hasta que se repita «automágicamente». +---> Ahora ya sabe como llegar a la lección siguiente. + + 3. Utilizando la tecla abajo, vaya a la Lección 1.2. + +Nota: Si alguna vez no está seguro sobre algo que ha tecleado, pulse + para situarse en modo Normal. Luego vuelva a teclear la orden que deseaba. + +Nota: Las teclas de movimiento del cursor también funcionan. Pero usando + hjkl podrá moverse mucho más rápido una vez que se acostumbre a ello. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 1.2: ENTRANDO Y SALIENDO DE VIM + + ¡¡ NOTA: Antes de ejecutar alguno de los pasos siguientes lea primero + la lección entera!! + + 1. Pulse la tecla (para asegurarse de que está en modo Normal). + + 2. Escriba: :q! + +---> Esto provoca la salida del editor SIN guardar ningún cambio que se haya + hecho. Si quiere guardar los cambios y salir escriba: + :wq + + 3. Cuando vea el símbolo del sistema, escriba el mandato que le trajo a este + tutor. Éste puede haber sido: vimtutor + Normalmente se usaría: vim tutor + +---> 'vim' significa entrar al editor, 'tutor' es el fichero a editar. + + 4. Si ha memorizado estos pasos y se se siente con confianza, ejecute los + pasos 1 a 3 para salir y volver a entrar al editor. Después mueva el + cursor hasta la Lección 1.3. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 1.3: EDICIÓN DE TEXTO - BORRADO + +** Estando en modo Normal pulse x para borrar el carácter sobre el cursor. **j + + + 1. Mueva el cursor a la línea de abajo señalada con --->. + + 2. Para corregir los errores, mueva el cursor hasta que esté bajo el + carácter que va aser borrado. + + 3. Pulse la tecla x para borrar el carácter sobrante. + + 4. Repita los pasos 2 a 4 hasta que la frase sea la correcta. + +---> La vvaca saltóó soobree laa luuuuna. + + 5. Ahora que la línea esta correcta, continúe con la Lección 1.4. + + +NOTA: A medida que vaya avanzando en este tutor no intente memorizar, + aprenda practicando. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 1.4: EDICIÓN DE TEXTO - INSERCIÓN + + ** Estando en modo Normal pulse i para insertar texto. ** + + + 1. Mueva el cursor a la primera línea de abajo señalada con --->. + + 2. Para que la primera línea se igual a la segunda mueva el cursor bajo el + primer carácter que sigue al texto que ha de ser insertado. + + 3. Pulse i y escriba los caracteres a añadir. + + 4. A medida que sea corregido cada error pulse para volver al modo + Normal. Repita los pasos 2 a 4 para corregir la frase. + +---> Flta texto en esta . +---> Falta algo de texto en esta línea. + + 5. Cuando se sienta cómodo insertando texto pase al resumen que esta más + abajo. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RESUMEN DE LA LECCIÓN 1 + + + 1. El cursor se mueve utilizando las teclas de las flechas o las teclas hjkl. + h (izquierda) j (abajo) k (arriba) l (derecha) + + 2. Para acceder a Vim (desde el símbolo del sistema %) escriba: + vin FILENAME + + 3. Para salir de Vim escriba: :q! para eliminar todos + los cambios. + + 4. Para borrar un carácter sobre el cursor en modo Normal pulse: x + + 5. Para insertar texto en la posición del cursor estando en modo Normal: + pulse i escriba el texto pulse + +NOTA: Pulsando se vuelve al modo Normal o cancela un mandato no deseado + o incompleto. + +Ahora continúe con la Lección 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 2.1: MANDATOS PARA BORRAR + + + ** Escriba dw para borrar hasta el final de una palabra ** + + + 1. Pulse para asegurarse de que está en el modo Normal. + + 2. Mueva el cursor a la línea de abajo señalada con --->. + + 3. Mueva el cursor al comienzo de una palabra que desee borrar. + + 4. Pulse dw para hacer que la palabra desaparezca. + + + NOTA: Las letras dw aparecerán en la última línea de la pantalla cuando + las escriba. Si escribe algo equivocado pulse y comience de nuevo. + + +---> Hay algunas palabras pásalo bien que no pertenecen papel a esta frase. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 2.2: MÃS MANDATOS PARA BORRAR + + + ** Escriba d$ para borrar hasta el final de la línea. ** + + + 1. Pulse para asegurarse de que está en el modo Normal. + + 2. Mueva el cursor a la línea de abajo señalada con --->. + + 3. Mueva el cursor al final de la línea correcta (DESPUÉS del primer . ). + + 4. Escriba d$ para borrar hasta el final de la línea. + +---> Alguien ha escrito el final de esta línea dos veces. esta línea dos veces. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 2.3: SOBRE MANDATOS Y OBJETOS + + + El formato del mandato de borrar d es como sigue: + + [número] d objeto O d [número] objeto + donde: + número - es cuántas veces se ha de ejecutar el mandato (opcional, defecto=1). + d - es el mandato para borrar. + objeto - es sobre lo que el mandato va a operar (lista, abajo). + + Una lista corta de objetos: + w - desde el cursor hasta el final de la palabra, incluyendo el espacio. + e - desde el cursor hasta el final de la palabra, SIN incluir el espacio. + $ - desde el cursor hasta el final de la línea. + +NOTE: Para los aventureros, pulsando sólo el objeto estando en modo Normal + sin un mandato moverá el cursor como se especifica en la lista de objetos. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 2.4: UNA EXCEPCIÓN AL 'MANDATO-OBJETO' + + ** Escriba dd para borrar una línea entera. ** + + Debido a la frecuencia con que se borran líneas enteras, los diseñadores + de Vim decidieron que sería más fácil el escribir simplemente dos des en + una fila para borrar una línea. + + 1. Mueva el cursor a la segunda línea de la lista de abajo. + 2. Escriba dd para borrar la línea. + 3. Muévase ahora a la cuarta línea. + 4. Escriba 2dd (recuerde número-mandato-objeto) para borrar las dos + líneas. + + 1) Las rosas son rojas, + 2) El barro es divertido, + 3) El cielo es azul, + 4) Yo tengo un coche, + 5) Los relojes marcan la hora, + 6) El azucar es dulce, + 7) Y así eres tu. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 2.5: EL MANDATO DESHACER + + + ** Pulse u para deshacer los últimos mandatos, + U para deshacer una línea entera. ** + + 1. Mueva el cursor a la línea de abajo señalada con ---> y sitúelo bajo el + primer error. + 2. Pulse x para borrar el primer caráter erróneo. + 3. Pulse ahora u para deshacer el último mandato ejecutado. + 4. Ahora corrija todos los errores de la línea usando el mandato x. + 5. Pulse ahora U mayúscula para devolver la línea a su estado original. + 6. Pulse ahora u unas pocas veces para deshacer lo hecho por U y los + mandatos previos. + 7. Ahora pulse CTRL-R (mantenga pulsada la tecla CTRL y pulse R) unas + pocas veces para volver a ejecutar los mandatos (deshacer lo deshecho). + +---> Corrrija los errores dee esttta línea y vuuelva a ponerlos coon deshacer. + + 8. Estos mandatos son muy útiles. Ahora pase al resumen de la Lección 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RESUMEN DE LA LECCIÓN 2 + + 1. Para borrar desde el cursor hasta el final de una palabra pulse: dw + + 2. Para borrar desde el cursor hasta el final de una línea pulse: d$ + + 3. Para borrar una línea enter pulse: dd + + 4. El formato de un mandato en modo Normal es: + + [número] mandato objeto O mandato [número] objeto + donde: + número - es cuántas veces se ha de ejecutar el mandato + mandato - es lo que hay que hacer, por ejemplo, d para borrar + objeto - es sobre lo que el mandato va a operar, por ejemplo + w (palabra), $ (hasta el final de la línea), etc. + + 5. Para deshacer acciones previas pulse: u (u minúscula) + Para deshacer todos los cambios de una línea pulse: U (U mayúscula) + Para deshacer lo deshecho pulse: CTRL-R + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 3.1: EL MANDATO «PUT» (poner) + + ** Pulse p para poner lo último que ha borrado después del cursor. ** + + 1. Mueva el cursor al final de la lista de abajo. + + 2. Escriba dd para borrar la línea y almacenarla en el buffer de Vim. + + 3. Mueva el cursor a la línea que debe quedar por debajo de la + línea a mover. + + 4. Estando en mod Normal, pulse p para restituir la línea borrada. + + 5. Repita los pasos 2 a 4 para poner todas las líneas en el orden correcto. + + d) ¿Puedes aprenderla tu? + b) Las violetas son azules, + c) La inteligencia se aprende, + a) Las rosas son rojas, + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 3.2: EL MANDATO «REPLACE» (remplazar) + + + ** Pulse r y un carácter para sustituir el carácter sobre el cursor. ** + + + 1. Mueva el cursor a la primera línea de abajo señalada con --->. + + 2. Mueva el cursor para situarlo bajo el primer error. + + 3. Pulse r y el carácter que debe sustituir al erróneo. + + 4. Repita los pasos 2 y 3 hasta que la primera línea esté corregida. + +---> ¡Cuendo esta línea fue rscrita alguien pulso algunas teclas equibocadas! +---> ¡Cuando esta línea fue escrita alguien pulsó algunas teclas equivocadas! + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 3.3: EL MANDATO «CHANGE» (cambiar) + + + ** Para cambiar parte de una palabra o toda ella escriba cw . ** + + + 1. Mueva el cursor a la primera línea de abajo señalada con --->. + + 2. Sitúe el cursor en la u de lubrs. + + 3. Escriba cw y corrija la palabra (en este caso, escriba 'ínea'). + + 4. Pulse y mueva el cursor al error siguiente (el primer carácter + que deba cambiarse). + + 5. Repita los pasos 3 y 4 hasta que la primera frase sea igual a la segunda. + +---> Esta lubrs tiene unas pocas pskavtad que corregir usem el mandato change. +---> Esta línea tiene unas pocas palabras que corregir usando el mandato change. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 3.4: MÃS CAMBIOS USANDO c + + ** El mandato change se utiliza con los mismos objetos que delete. ** + + 1. El mandato change funciona de la misma forma que delete. El formato es: + + [número] c objeto O c [número] objeto + + 2. Los objetos son tambiém los mismos, tales como w (palabra), $ (fin de + la línea), etc. + + 3. Mueva el cursor a la primera línea de abajo señalada con --->. + + 4. Mueva el cursor al primer error. + + 5. Escriba c$ para hacer que el resto de la línea sea como la segunda + y pulse . + +---> El final de esta línea necesita alguna ayuda para que sea como la segunda. +---> El final de esta línea necesita ser corregido usando el mandato c$. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RESUMEN DE LA LECCIÓN 3 + + + 1. Para sustituir texto que ha sido borrado, pulse p . Esto Pone el texto + borrado DESPUÉS del cursor (si lo que se ha borrado es una línea se + situará sobre la línea que está sobre el cursor). + + 2. Para sustituir el carácter bajo el cursor, pulse r y luego el + carácter que sustituirá al original. + + 3. El mandato change le permite cambiar el objeto especificado desde la + posición del cursor hasta el final del objeto; e.g. Pulse cw para + cambiar desde el cursor hasta el final de la palabra, c$ para cambiar + hasta el final de la línea. + + 4. El formato para change es: + + [número] c objeto O c [número] objeto + + Pase ahora a la lección siguiente. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 4.1: SITUACIÓN EN EL FICHERO Y SU ESTADO + + + ** Pulse CTRL-g para mostrar su situación en el fichero y su estado. + Pulse MAYU-G para moverse a una determinada línea del fichero. ** + + Nota: ¡¡Lea esta lección entera antes de ejecutar alguno de los pasos!! + + + 1. Mantenga pulsada la tecla Ctrl y pulse g . Aparece una línea de estado + al final de la pantalla con el nombre del fichero y la línea en la que + está situado. Recuerde el número de la línea para el Paso 3. + + 2. Pulse Mayu-G para ir al final del fichero. + + 3. Escriba el número de la línea en la que estaba y despúes Mayu-G. Esto + le volverá a la línea en la que estaba cuando pulsó Ctrl-g. + (Cuando escriba los números NO se mostrarán en la pantalla). + + 4. Si se siente confiado en poder hacer esto ejecute los pasos 1 a 3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 4.2: EL MANDATO «SEARCH» (buscar) + + ** Escriba / seguido de una frase para buscar la frase. ** + + 1. En modo Normal pulse el carácter / . Fíjese que tanto el carácter / + como el cursor aparecen en la última línea de la pantalla, lo mismo + que el mandato : . + + 2. Escriba ahora errroor . Esta es la palabra que quiere buscar. + + 3. Para repetir la búsqueda, simplemente pulse n . + Para busacar la misma frase en la dirección opuesta, pulse Mayu-N . + + 4. Si quiere buscar una frase en la dirección opuesta (hacia arriba), + utilice el mandato ? en lugar de / . + +---> Cuando la búsqueda alcanza el final del fichero continuará desde el + principio. + + «errroor» no es la forma de deletrear error; errroor es un error. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 4.3: BÚSQUEDA PARA COMPROBAR PARÉNTESIS + + ** Pulse % para encontrar el paréntesis correspondiente a ),] o } . ** + + + 1. Sitúe el cursor en cualquiera de los caracteres ), ] o } en la línea de + abajo señalada con --->. + + 2. Pulse ahora el carácter % . + + 3. El cursor debería situarse en el paréntesis (, corchete [ o llave { + correspondiente. + + 4. Pulse % para mover de nuevo el cursor al paréntesis, corchete o llave + correspondiente. + +---> Esto ( es una línea de prueba con (, [, ], {, y } en ella. )). + +Nota: ¡Esto es muy útil en la detección de errores en un programa con + paréntesis, corchetes o llaves disparejos. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 4.4: UNA FORMA DE CAMBIAR ERRORES + + + ** Escriba :s/viejo/nuevo/g para sustituir 'viejo' por 'nuevo'. ** + + + 1. Mueva el cursor a la línea de abajo señalada con --->. + + 2. Escriba :s/laas/las/ . Tenga en cuenta que este mandato cambia + sólo la primera aparición en la línea de la expresión a cambiar. + +---> Laas mejores épocas para ver laas flores son laas primaveras. + + 4. Para cambiar todas las apariciones de una expresión ente dos líneas + escriba :#,#s/viejo/nuevo/g donde #,# son los números de las dos + líneas. Escriba :%s/viejo/nuevo/g para hacer los cambios en todo + el fichero. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RESUMEN DE LA LECCIÓN 4 + + + 1. Ctrl-g muestra la posición del cursor en el fichero y su estado. + Mayu-G mueve el cursor al final del fichero. Un número de línea + sewguido de Mayu-G mueve el cursor a la línea con ese número. + + 2. Pulsando / seguido de una frase busca la frase hacia ADELANTE. + Pulsando ? seguido de una frase busca la frase hacia ATRÃS. + Después de una búsqueda pulse n para encontrar la aparición + siguiente en la misma dirección. + + 3. Pulsando % cuando el cursor esta sobre (,), [,], { o } localiza + la pareja correspondiente. + + 4. Para cambiar viejo por nuevo en una línea pulse :s/viejo/nuevo + Para cambiar todos los viejo por nuevo en una línea pulse :s/viejo/nuevo/g + Para cambiar frases entre dos números de líneas pulse :#,#s/viejo/nuevo/g + Para cambiar viejo por nuevo en todo el fichero pulse :%s/viejo/nuevo/g + Para pedir confirmación en cada caso añada 'c' :%s/viejo/nuevo/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 5.1: CÓMO EJECUTAR UN MANDATO EXTERNO + + + ** Escriba :! seguido de un mandato externo para ejecutar ese mandato. ** + + + 1. Escriba el conocido mandato : para situar el cursor al final de la + pantalla. Esto le permitirá introducir un mandato. + + 2. Ahora escriba el carácter ! (signo de admiración). Esto le permitirá + ejecutar cualquier mandato del sistema. + + 3. Como ejemplo escriba ls después del ! y luego pulse . Esto + le mostrará una lista de su directorio, igual que si estuviera en el + símbolo del sistema. Si ls no funciona utilice !:dir . + +--->Nota: De esta manera es posible ejecutar cualquier mandato externo. + +--->Nota: Todos los mandatos : deben finalizarse pulsando . + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 5.2: MÃS SOBRE GUARDAR FICHEROS + + + ** Para guardar los cambios hechos en un fichero, + escriba :w NOMBRE_DE_FICHERO. ** + + + 1. Escriba :!dir o :!ls para ver una lista de su directorio. + Ya sabe que debe pulsar después de ello. + + 2. Elija un nombre de fichero que todavía no exista, como TEST. + + 3. Ahora escriba :w TEST (donde TEST es el nombre de fichero elegido). + + 4. Esta acción guarda todo el fichero (Vim Tutor) bajo el nombre TEST. + Para comprobarlo escriba :!dir de nuevo y vea su directorio. + +---> Tenga en cuenta que si sale de Vim y entra de nuevo con el nombre de + fichero TEST, el fichero sería una copia exacta del tutor cuando lo + ha guardado. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 5.3: UN MANDATO DE ESCRITURA SELECTIVO + + ** Para guardar parte del fuchero escriba :#,# NOMBRE_DEL_FICHERO ** + + + 1. Escriba de nuevo, una vez más, :!dir o :!ls para obtener una lista + de su directorio y elija nombre de fichero adecuado, como TEST. + + 2. Mueva el cursor al principio de la pantalla y pulse Ctrl-g para saber + el número de la línea correspondiente. ¡RECUERDE ESTE NÚMERO! + + 3. Ahora mueva el cursor a la última línea de la pantalla y pulse Ctrl-g + de nuevo. ¡RECUERDE TAMBIÉN ESTE NÚMERO! + + 4. Para guardar SOLAMENTE una parte de un fichero, escriba :#,# w TEST + donde #,# son los números que usted ha recordado (primera línea, + última línea) y TEST es su nombre de dichero. + + 5. De nuevo, vea que el fichero esta ahí con :!dir pero NO lo borre. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 5.4: RECUPERANDO Y MEZCLANDO FICHEROS + + ** Para insertar el contenido de un fichero escriba :r NOMBRE_DEL_FICHERO ** + + 1. Escriba :!dir para asegurarse de que su fichero TEST del ejercicio + anterior está presente. + + 2. Situe el cursor al principio de esta pantalla. + +NOTA: Después de ejecutar el paso 3 se verá la Lección 5.3. Luego muévase + hacia ABAJO para ver esta lección de nuevo. + + 3. Ahora recupere el fichero TEST utilizando el mandato :r TEST donde + TEST es el nombre del fichero. + +NOTA: El fichero recuperado se sitúa a partir de la posición del cursor. + + 4. Para verificar que el fichero ha sido recuperado, mueva el cursor hacia + arriba y vea que hay dos copias de la Lección 5.3, la original y la + versión del fichero. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RESUMEN DE LA LECCIÓN 5 + + + 1. :!mandato ejecuta un mandato externo. + + Algunos ejemplos útiles son: + :!dir - muestra el contenido de un directorio. + :!del NOMBRE_DE_FICHERO - borra el fichero NOMBRE_DE FICHERO. + + 2. :#,#w NOMBRE_DE _FICHERO guarda desde las líneas # hasta la # en el + fichero NOMBRE_DE_FICHERO. + + 3. :r NOMBRE_DE _FICHERO recupera el fichero del disco NOMBRE_DE FICHERO + y lo inserta en el fichero en curso a partir de la posición del cursor. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 6.1: EL MANDATO «OPEN» (abrir) + + + ** Pulse o para abrir una línea debajo del cursor + y situarle en modo Insert ** + + + 1. Mueva el cursor a la línea de abajo señalada con --->. + + 2. Pulse o (minúscula) para abrir una línea por DEBAJO del cursor + y situarle en modo Insert. + + 3. Ahora copie la línea señalada con ---> y pulse para salir del + modo Insert. + +---> Luego de pulsar o el cursor se sitúa en la línea abierta en modo Insert. + + 4. Para abrir una línea por encima del cursor, simplemente pulse una O + mayúscula, en lugar de una o minúscula. Pruebe este en la línea siguiente. +Abra una línea sobre ésta pulsando Mayu-O cuando el curso está en esta línea. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 6.2: EL MANDATO «APPEND» (añadir) + + ** Pulse a para insertar texto DESPUÉS del cursor. ** + + + 1. Mueva el cursor al final de la primera línea de abajo señalada con ---> + pulsando $ en modo Normal. + + 2. Escriba una a (minúscula) para añadir texto DESPUÉS del carácter + que está sobre el cursor. (A mayúscula añade texto al final de la línea). + +Nota: ¡Esto evita el pulsar i , el último carácter, el texto a insertar, + , cursor a la derecha y, finalmente, x , sólo para añadir algo + al final de una línea! + + 3. Complete ahora la primera línea. Nótese que append es exactamente lo + mismo que modo Insert, excepto por el lugar donde se inserta el texto. + +---> Esta línea le permitirá praticar +---> Esta línea le permitirá praticar el añadido de texto al final de una línea. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 6.3: OTRA VERSIÓN DE «REPLACE» (remplazar) + + ** Pulse una R mayúscula para sustituir más de un carácter. ** + + + 1. Mueva el cursor a la primera línea de abajo señalada con --->. + + 2. Sitúe el cursor al comienzo de la primera palabra que sea diferente + de las de la segunda línea marcada con ---> (la palabra 'anterior'). + + 3. Ahora pulse R y sustituya el resto del texto de la primera línea + escribiendo sobre el viejo texto para que la primera línea sea igual + que la primera. + +---> Para hacer que esta línea sea igual que la anterior use las teclas. +---> Para hacer que esta línea sea igual que la siguiente escriba R y el texto. + + 4. Nótese que cuando pulse para salir, el texto no alterado permanece. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 6.4: FIJAR OPCIONES + + ** Fijar una opción de forma que una búsqueda o sustitución ignore la caja ** + (Para el concepto de caja de una letra, véase la nota al final del fichero) + + + 1. Busque 'ignorar' introduciendo: + /ignorar + Repita varias veces la búsque pulsando la tecla n + + 2. Fije la opción 'ic' (Ignorar la caja de la letra) escribiendo: + :set ic + + 3. Ahora busque 'ignorar' de nuevo pulsando n + Repita la búsqueda varias veces más pulsando la tecla n + + 4. Fije las opciones 'hlsearch' y 'insearch': + :set hls is + + 5. Ahora introduzca la orden de búsqueda otra vez, y vea qué pasa: + /ignore + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RESUMEN DE LA LECCIÓN 6 + + + 1. Pulsando o abre una línea por DEBAJO del cursor y sitúa el cursor en + la línea abierta en modo Insert. + Pulsando una O mayúscula se abre una línea SOBRE la que está el cursor. + + 2. Pulse una a para insertar texto DESPUÉS del carácter sobre el cursor. + Pulsando una A mayúscula añade automáticamente texto al final de la + línea. + + 3. Pulsando una R mayúscula se entra en modo Replace hasta que, para salir, + se pulse . + + 4. Escribiendo «:set xxx» fija la opción «xxx» + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lección 7: MANDATOS PARA LA AYUDA EN LÃNEA + + ** Utilice el sistema de ayuda en línea ** + + + Vim dispone de un sistema de ayuda en línea. Para activarlo, pruebe una + de estas tres formas: + - pulse la tecla (si dispone de ella) + - pulse la tecla (si dispone de ella) + - escriba :help + + Escriba :q para cerrar la ventana de ayuda. + + Puede encontrar ayuda en casi cualquier tema añadiendo un argumento al + mandato «:help» mandato. Pruebe éstos: + + :help w + :help c_ + :help insert-index + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Aquí concluye el tutor de Vim. Está pensado para dar una visión breve del + editor Vim, lo suficiente para permitirle usar el editor de forma bastante + sencilla. Está muy lejos de estar completo pues Vim tiene muchísimos más + mandatos. + + Para lecturas y estudios posteriores se recomienda el libro: + Learning the Vi Editor - por Linda Lamb + Editorial: O'Reilly & Associates Inc. + Es un buen libro para llegar a saber casi todo lo que desee hacer con Vi. + La sexta edición incluye también información sobre Vim. + + Este tutorial ha sido escrito por Michael C. Pierce y Robert K. Ware, + Colorado School of Mines utilizando ideas suministradas por Charles Smith, + Colorado State University. + E-mail: bware@mines.colorado.edu. + + Modificado para Vim por Bram Moolenaar. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Traducido del inglés por: + + Eduardo F. Amatria + Correo electrónico: eferna1@platea.pntic.mec.es + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.fr b/vim/bundle/ubuntu-vim72/tutor/tutor.fr new file mode 100644 index 0000000..e321754 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.fr @@ -0,0 +1,1038 @@ +=============================================================================== += B i e n v e n u e dans le T u t o r i e l de V I M - Version 1.7.fr.1 = +=============================================================================== + + Vim est un éditeur très puissant qui a trop de commandes pour pouvoir + toutes les expliquer dans un cours comme celui-ci, qui est conçu pour en + décrire suffisamment afin de vous permettre d'utiliser simplement Vim. + + Le temps requis pour suivre ce cours est d'environ 25 à 30 minutes, selon + le temps que vous passerez à expérimenter. + + ATTENTION : + Les commandes utilisées dans les leçons modifieront le texte. Faites une + copie de ce fichier afin de vous entraîner dessus (si vous avez lancé + "vimtutor" ceci est déjà une copie). + + Il est important de garder en tête que ce cours est conçu pour apprendre + par la pratique. Cela signifie que vous devez exécuter les commandes + pour les apprendre correctement. Si vous vous contentez de lire le texte, + vous oublierez les commandes ! + + Maintenant, vérifiez que votre clavier n'est PAS verrouillé en + majuscules, et appuyez la touche j le nombre de fois suffisant pour + que la Leçon 1.1 remplisse complètement l'écran. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 1.1 : DÉPLACEMENT DU CURSEUR + + + ** Pour déplacer le curseur, appuyez les touches h,j,k,l comme indiqué. ** + ^ + k Astuce : La touche h est à gauche et déplace à gauche. + < h l > La touche l est à droite et déplace à droite. + j La touche j ressemble à une flèche vers le bas. + v + 1. Déplacez le curseur sur l'écran jusqu'à vous sentir à l'aise. + + 2. Maintenez la touche Bas (j) enfoncée jusqu'à ce qu'elle se répète. + Maintenant vous êtes capable de vous déplacer jusqu'à la leçon suivante. + + 3. En utilisant la touche Bas, allez à la Leçon 1.2. + +NOTE : Si jamais vous doutez de ce que vous venez de taper, appuyez <Échap> + pour revenir en mode Normal. Puis retapez la commande que vous vouliez. + +NOTE : Les touches fléchées devraient également fonctionner. Mais en utilisant + hjkl vous pourrez vous déplacer beaucoup plus rapidement, une fois que + vous aurez pris l'habitude. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 1.2 : SORTIR DE VIM + + + !! NOTE : Avant d'effectuer les étapes ci-dessous, lisez toute cette leçon !! + + 1. Appuyez la touche <Échap> (pour être sûr d'être en mode Normal). + + 2. Tapez : :q! + Ceci quitte l'éditeur SANS enregistrer les changements que vous avez + faits. + + 3. Lorsque l'invite du shell vous sera présentée, tapez la commande qui + vous a mené dans ce tutoriel. Cela pourrait être : vimtutor + + 4. Si vous avez mémorisé ces étapes et êtes confiant, effectuez les étapes + 1 à 3 pour sortir puis rentrer dans l'éditeur. + +NOTE : :q! annule tous le changements que vous avez fait. Dans + quelques leçons, vous apprendrez à enregistrer les changements. + + 5. Déplacez le curseur à la Leçon 1.3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 1.3 : ÉDITION DE TEXTE - EFFACEMENT + + + ** Appuyez x pour effacer le caractère sous le curseur. ** + + 1. Déplacez le curseur sur la ligne marquée ---> ci-dessous. + + 2. Pour corriger les erreurs, déplacez le curseur jusqu'à ce qu'il soit + sur un caractère à effacer. + + 3. Appuyez la touche x pour effacer le caractère redondant. + + 4. Répétez les étapes 2 à 4 jusqu'à ce que la phrase soit correcte. + +---> La vvache à sautéé au-ddessus dde la luune. + + 5. Maintenant que la ligne est correcte, passez à la Leçon 1.4. + +NOTE : En avançant dans ce cours, n'essayez pas de mémoriser, apprenez par + la pratique. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 1.4 : ÉDITION DE TEXTE - INSERTION + + + ** Appuyez i pour insérer du texte. ** + + 1. Déplacez le curseur sur la première ligne marquée ---> ci-dessous. + + 2. Pour rendre la première ligne identique à la seconde, mettez le curseur + sur le premier caractère APRÈS l'endroit où insérer le texte. + + 3. Appuyez i et tapez les caractères qui manquent. + + 4. Une fois qu'une erreur est corrigée, appuyez <Échap> pour revenir en mode + Normal. Répétez les étapes 2 à 4 pour corriger la phrase. + +---> Il mnqe caractères cette . +---> Il manque des caractères dans cette ligne. + + 5. Une fois que vous êtes à l'aise avec l'insertion de texte, allez à la + Leçon 1.5. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 1.5 : ÉDITION DE TEXTE - AJOUTER + + + ** Appuyez A pour ajouter du text. ** + + 1. Déplacez le curseur sur la première ligne ci-dessous marquée --->. + Peu importe sur quel caractère se trouve le curseur sur cette ligne. + + 2. Appuyez A et tapez les ajouts nécessaires. + + 3. Quand le texte a été ajouté, appuyez <Échap> pour revenir en mode + Normal. + + 4. Déplacez le curseur sur la seconde ligne marquée ---> et répétez les + étapes 2 et 3 pour corriger la phrase. + +---> Il manque du texte à partir de cet + Il manque du texte à partir de cette ligne. +---> Il manque aussi du te + Il manque aussi du texte ici. + + 5. Quand vous vous sentez suffisamment à l'aise pour ajouter du texte, + allez à la Leçon 1.6. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 1.6 : ÉDITER UN FICHIER + + + ** Utilisez :wq pour enregistrer un fichier et sortir. ** + +!! NOTE : Lisez toute la leçon avant d'exécuter les instructions ci-dessous !! + + 1. Sortez de ce tutoriel comme vous l'avez fait dans la Leçon 1.2 : :q! + Ou, si vous avez accès à un autre terminal, exécutez y les actions + qui suivent. + + 2. À l'invite du shell, tapez cette commande : vim tutor + 'vim' est la commande pour démarrer l'éditeur Vim, 'tutor' est le + nom du fichier que vous souhaitez éditer. Utilisez un fichier qui peut + être modifié. + + 3. Insérez et effacez du texte comme vous l'avez appris dans les leçons + précédentes. + + 4. Enregistrez le fichier avec les changements et sortez de Vim avec : + :wq + + 5. Si vous avez quitté vimtutor à l'étape 1, recommencez vimtutor et + déplacez-vous en bas vers le résumé suivant. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RÉSUMÉ DE LA LEÇON 1 + + + 1. Le curseur se déplace avec les touches fléchées ou les touches hjkl. + h (gauche) j (bas) k (haut) l (droite) + + 2. Pour démarrer Vim à l'invite du shell tapez : vim FICHIER + + 3. Pour quitter Vim tapez : <Échap> :q! pour perdre tous les + changements. + OU tapez : <Échap> :wq pour enregistrer les + changements. + + 4. Pour effacer un caractère sous le curseur tapez : x + + 5. Pour insérer ou ajouter du texte tapez : + i tapez le texte à insérer avant le curseur <Échap> + A tapez le texte à ajouter après le curseur <Échap> + +NOTE : Appuyer <Échap> vous place en mode Normal ou annule une commande + partiellement tapée dont vous ne voulez plus. + +Passez maintenant à la leçon 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 2.1 : COMMANDES D'EFFACEMENT + + + ** Tapez dw pour effacer un mot. ** + + 1. Appuyez <Échap> pour être sûr d'être en mode Normal. + + 2. Déplacez le curseur sur la ligne marquée ---> ci-dessous. + + 3. Placez le curseur sur le début d'un mot qui a besoin d'être effacé. + + 4. Tapez dw pour faire disparaître ce mot. + +NOTE : La lettre d apparaîtra sur la dernière ligne de l'écran lors de + votre frappe. Vim attend que vous tapiez w . Si vous voyez un autre + caractère que d vous avez tapé autre chose ; appuyez <Échap> et + recommencez. + +---> Il y a quelques drôle mots qui n'ont rien à faire papier sur cette ligne. + + 5. Répétez les étapes 3 et 4 jusqu'à ce que la phrase soit correcte et allez + à la Leçon 2.2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 2.2 : PLUS DE COMMANDES D'EFFACEMENTS + + + ** Tapez d$ pour effacer jusqu'à la fin de la ligne. ** + + 1. Appuyez <Échap> pour être sûr d'être en mode Normal. + + 2. Déplacez le curseur sur la ligne marquée ---> ci-dessous. + + 3. Déplacez le curseur jusqu'à la fin de la ligne correcte (APRÈS le + premier . ). + + 4. Tapez d$ pour effacer jusqu'à la fin de la ligne. + +---> Quelqu'un a tapé la fin de cette ligne deux fois. cette ligne deux fois. + + 5. Allez à la Leçon 2.3 pour comprendre ce qui se passe. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 2.3 : À PROPOS DES OPÉRATEURS ET DES MOUVEMENTS + + + Plusieurs commandes qui changent le texte sont constituées d'un opérateur + et d'un mouvement. Le format pour une commande d'effacement avec l'opérateur + d d'effacement est le suivant : + + d mouvement + + Où : + d - est l'opérateur d'effacement + mouvement - est le mouvement sur lequel agit l'opérateur (listés + ci-dessous) + + Une courte liste de mouvements : + w - jusqu'au début du prochain mot, en EXCLUANT son premier caractère. + e - jusqu'à la fin du mot courant, en EXCLUANT son denier caractère. + $ - jusqu'à la fin de la ligne, en INCLUANT son dernier caractère. + + Ainsi, taper de va effacer depuis le curseur jusqu'à la fin du mot. + +NOTE : Le seul appui d'un mouvement en mode Normal, sans commande, déplace le + curseur comme indiqué. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 2.4 : UTILISER UN QUANTIFICATEUR AVEC UN MOUVEMENT + + + ** Taper un nombre avant un mouvement le répète autant de fois. ** + + 1. Déplacez le curseur au début de la ligne marquée ---> ci-dessous. + + 2. Tapez 2w pour déplacer le curseur de 2 mots vers l'avant. + + 3. Tapez 3e pour déplacer le curseur à la fin du troisième mot vers + l'avant. + + 4. Tapez 0 (zéro) pour déplacer au début de la ligne. + + 5. Répétez les étapes 2 et 3 avec des quantificateurs différents. + +---> Ceci est juste une ligne avec des mots où vous pouvez vous déplacer. + + 6. Déplacez-vous à la Leçon 2.5. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 2.5 : UTILISER UN QUANTIFICATEUR POUR EFFACER PLUS + + + ** Taper un nombre avec un opérateur le répète autant de fois. ** + + Outre la combinaison de l'opérateur d'effacement avec un déplacement + mentionné ci-dessus, vous pouvez insérer un nombre (quantificateur) + pour effacez encore plus : + d nombre déplacement + + 1. Déplacez le curseur vers le premier mot en MAJUSCULES dans la ligne + marquée --->. + + 2. Tapez d2w pour effacer les deux mots en MAJUSCULES. + + 3. Répétez les étapes 1 et 2 avec des quantificateurs différents pour + effacer les mots suivants en MAJUSCULES à l'aide d'une commande. + +---> Cette ABC DE ligne FGHI JK LMN OP de mots est Q RS TUV nettoyée. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 2.6 : OPÉREZ SUR DES LIGNES + + + ** Tapez dd pour effacer une ligne complète. ** + + Vu le nombre de fois où l'on efface des lignes complètes, les concepteurs + de Vi ont décidé qu'il serait plus facile de taper simplement deux d + pour effacer une ligne. + + 1. Placez le curseur sur la seconde ligne de la phrase ci-dessous. + 2. Tapez dd pour effacer la ligne. + 3. Maintenant allez à la quatrième ligne. + 4. Tapez 2dd pour effacer deux lignes. + +---> 1) Les roses sont rouges, +---> 2) La boue c'est drôle, +---> 3) Les violettes sont bleues, +---> 4) J'ai une voiture, +---> 5) Les horloges donnent l'heure, +---> 6) Le sucre est doux +---> 7) Tout comme vous. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 2.7 : L'ANNULATION + + + ** Tapez u pour annuler les dernières commandes. ** + ** Tapez U pour récupérer toute une ligne. ** + + 1. Déplacez le curseur sur la ligne marquée ---> ci-dessous et placez-le sur + la première erreur. + 2. Tapez x pour effacer le premier caractère redondant. + 3. Puis tapez u pour annuler la dernière commande exécutée. + 4. Cette fois, corrigez toutes les erreurs de la ligne avec la commande x . + 5. Puis tapez un U majuscule pour remettre la ligne dans son état initial. + 6. Puis tapez u deux-trois fois pour annuler le U et les commandes + précédentes. + 7. Maintenant tapez CTRL-R (maintenez la touche CTRL enfoncée pendant que + vous appuyez R) deux-trois fois pour refaire les commandes (annuler + les annulations). + +---> Coorrigez les erreurs suur ccette ligne et reemettez-les avvec 'annuler'. + + 8. Ce sont des commandes très utiles. Maintenant, allez au résumé de la + Leçon 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RÉSUMÉ DE LA LEÇON 2 + + + 1. Pour effacer du curseur jusqu'au mot suivant tapez : dw + + 2. Pour effacer du curseur jusqu'à la fin d'une ligne tapez : d$ + + 3. Pour effacer toute une ligne tapez : dd + + 4. Pour répéter un déplacement ajoutez un quantificateur : 2w + + 5. Le format d'une commande de changement est : + + opérateur [nombre] déplacement + + Où : + opérateur - est ce qu'il faut faire, comme d pour effacer. + [nombre] - un quantificateur optionnel pour répéter le déplacement. + déplacement - déplace le long du texte à opérer, tel que w (mot), + $ (jusqu'à la fin de ligne), etc. + + 6. Pour se déplacer au début de ligne, utilisez un zéro : 0 + + 5. Pour annuler des actions précédentes, tapez : u (u minuscule) + Pour annuler tous les changements sur une ligne tapez : U (U majuscule) + Pour annuler l'annulation tapez : CTRL-R + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 3.1 : LE COLLAGE + + + ** Tapez p pour placer après le curseur ce qui vient d'être effacé. ** + + 1. Placez le curseur sur la première ligne ci-dessous marquée --->. + + 2. Tapez dd pour effacer la ligne et la placer dans un registre de Vim. + + 3. Déplacez le curseur sur la ligne c) au dessus où vous voulez remettre la + ligne effacée. + + 4. En mode Normal, tapez p pour remettre la ligne en dessous du curseur. + + 5. Répétez les étapes 2 à 4 pour mettre toutes les lignes dans le bon ordre. + +---> d) Et vous, qu'apprenez-vous ? +---> b) Les violettes sont bleues, +---> c) L'intelligence s'apprend, +---> a) Les roses sont rouges, + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 3.2 : LA COMMANDE DE REMPLACEMENT + + + ** Tapez rx pour remplacer un caractère sous le curseur par x . ** + + 1. Déplacez le curseur sur la première ligne marquée ---> ci-dessous. + + 2. Placez le curseur de manière à ce qu'il surplombe la première erreur. + + 3. Tapez r suivi du caractère qui doit corriger l'erreur. + + 4. Répétez les étapes 2 et 3 jusqu'à ce que la première ligne soit égale + à la seconde. + +---> Quand cette ligne a été sauvie, quelqu'un a lait des faunes de frappe ! +---> Quand cette ligne a été saisie, quelqu'un a fait des fautes de frappe ! + + 5. Maintenant, allez à la Leçon 3.3. + +NOTE : N'oubliez pas que vous devriez apprendre par la pratique, pas par + mémorisation. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 3.3 : L'OPÉRATEUR DE CHANGEMENT + + + ** Pour changer jusqu'à la fin d'un mot, tapez ce .** + + 1. Déplacez le curseur sur la première ligne marquée ---> ci-dessous. + + 2. Placez le curseur sur le u de luhko. + + 3. Tapez ce et corrigez le mot (dans notre cas, tapez 'igne'.) + + 4. Appuyez <Échap> et placez-vous sur le prochain caractère qui doit + être changé). + + 5. Répétez les étapes 3 et 4 jusqu'à ce que la première phrase soit + identique à la seconde. + +---> Cette luhko contient quelques myqa qui ont ricne d'être chantufip. +---> Cette ligne contient quelques mots qui ont besoin d'être changés. + +Notez que ce efface le mot et vous place ensuite en mode Insertion. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 3.4 : PLUS DE CHANGEMENTS AVEC c + + + ** L'opérateur de changement fonctionne avec les mêmes déplacements + que l'effacement. ** + + 1. L'opérateur de changement fonctionne de la même manière que + l'effacement. Le format est : + + c [nombre] déplacement + + 2. Les déplacements sont identiques : w (mot) et $ (fin de ligne). + + 3. Déplacez-vous sur la première ligne marquée ---> ci-dessous. + + 4. Placez le curseur sur la première erreur. + + 5. Tapez c$ et tapez le reste de la ligne afin qu'elle soit identique + à la seconde ligne, puis tapez <Échap>. + +---> La fin de cette ligne doit être rendue identique à la seconde. +---> La fin de cette ligne doit être corrigée avec la commande c$ . + +NOTE : Vous pouvez utilisez la touche Retour Arrière pour corriger les + erreurs lorsque vous tapez. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RÉSUMÉ DE LA LEÇON 3 + + + 1. Pour remettre le texte qui a déjà été effacé, tapez p . Cela Place le + texte effacé APRÈS le curseur (si une ligne complète a été effacée, elle + sera placée sous la ligne du curseur). + + 2. Pour remplacer le caractère sous le curseur, tapez r suivi du caractère + qui remplacera l'original. + + 3. L'opérateur de changement vous permet de changer depuis la position du + curseur jusqu'où le déplacement vous amène. Par exemple, tapez ce + pour changer du curseur jusqu'à la fin du mot, c$ pour changer jusqu'à + la fin d'une ligne. + + 4. Le format pour le changement est : + + c [nombre] déplacement + +Passez maintenant à la leçon suivante. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 4.1 : POSITION DU CURSEUR ET ÉTAT DU FICHIER + + + ** Tapez CTRL-G pour afficher votre position dans le fichier et son état. + Tapez G pour vous rendre à une ligne donnée du fichier. ** + +NOTE : Lisez toute cette leçon avant d'effectuer l'une des étapes !! + + 1. Maintenez enfoncée la touche CTRL et appuyez sur g . On appelle cela + CTRL-G. Une ligne d'état va apparaître en bas de l'écran avec le nom + du fichier et le numéro de la ligne où vous êtes. Notez ce numéro, il + servira lors de l'étape 3. + +NOTE : Vous pouvez peut-être voir le curseur en bas à droite de l'écran. + Ceci arrive quand l'option 'ruler' est activée (voir :help 'ruler') + + 2. Tapez G pour vous déplacer à la fin du fichier. + Tapez gg pour vous déplacer au début du fichier. + + 3. Tapez le numéro de la ligne où vous étiez suivi de G . Cela vous + ramènera à la ligne où vous étiez au départ quand vous aviez appuyé + CTRL-G. + + 4. Si vous vous sentez prêt à faire ceci, effectuez les étapes 1 à 3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 4.2 : LA RECHERCHE + + + ** Tapez / suivi d'un texte pour rechercher ce texte. ** + + 1. Tapez le caractère / en mode Normal. Notez que celui-ci et le curseur + apparaissent en bas de l'écran, comme lorsque l'on utilise : . + + 2. Puis tapez 'errreuur' . C'est le mot que vous voulez rechercher. + + 3. Pour rechercher à nouveau le même texte, tapez simplement n . + Pour rechercher le même texte dans la direction opposée, tapez N . + + 4. Pour rechercher une phrase dans la direction opposée, utilisez ? + au lieu de / . + +---> erreur ne s'écrit pas "errreuur" ; errreuur est une erreur. + +NOTE : Quand la recherche atteint la fin du fichier, elle reprend au début + sauf si l'option 'wrapscan' est déactivée. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 4.3 : RECHERCHE DES PARENTHÈSES CORRESPONDANTES + + + ** Tapez % pour trouver des ), ] ou } correspondants. ** + + 1. Placez le curseur sur l'un des (, [ ou { de la ligne marquée ---> + ci-dessous. + + 2. Puis tapez le caractère % . + + 3. Le curseur se déplacera sur la parenthèse out crochet correspondant. + + 4. Tapez % pour replacer le curseur sur la parenthèse ou crochet + correspondant. + + 5. Déplacez le curseur sur un autre (,),[,],{ ou } et regardez ce que + fait % . + +---> Voici ( une ligne de test contenant des (, des [ ] et des { } )). + +NOTE : Cette fonctionnalité est très utile lors du débogage d'un programme qui + contient des parenthèses déséquilibrées ! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 4.4 : LA COMMANDE DE SUBSTITUTION + + + ** Tapez :s/ancien/nouveau/g pour remplacer 'ancien' par 'nouveau'. ** + + 1. Déplacez le curseur sur la ligne marquée ---> ci-dessous. + + 2. Tapez :s/lee/le . Notez que cette commande change seulement la + première occurrence de "lee" dans la ligne. + + 3. Puis tapez :s/lee/le/g . L'ajout du drapeau g ordonne de faire une + substitution globale sur la ligne, et change toutes les occurrences de + "lee" sur la ligne. + +---> lee meilleur moment pour regarder lees fleurs est pendant lee printemps. + + 4. Pour changer toutes les occurrences d'un texte, entre deux lignes, + tapez :#,#s/ancien/nouveau/g où #,# sont les numéros de lignes de la + plage où la substitution doit être faite. + Tapez :%s/ancien/nouveau/g pour changer toutes les occurrences dans + tout le fichier. + Tapez :%s/ancien/nouveau/gc pour trouver toutes les occurrences dans + tout le fichier avec une invite pour + confirmer ou infirmer chaque substitution. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RÉSUMÉ DE LA LEÇON 4 + + + 1. CTRL-G affiche la position dans le fichier et l'état de celui-ci. + G déplace à la fin du fichier. + nombre G déplace au numéro de ligne. + gg déplace à la première ligne. + + 2. Taper / suivi d'un texte recherche ce texte vers l'AVANT. + Taper ? suivi d'un texte recherche ce texte vers l'ARRIÈRE. + Après une recherche tapez n pour trouver l'occurrence suivante dans la + même direction ou Maj-N pour rechercher dans la direction opposée. + + 3. Taper % lorsque le curseur est sur (, ), [, ], { ou } déplace + celui-ci sur le caractère correspondant. + + 4. Pour remplacer le premier aa par bb sur une ligne tapez :s/aa/bb + Pour remplacer tous les aa par bb sur une ligne tapez :s/aa/bb/g + Pour remplacer du texte entre deux numéros de ligne tapez :#,#s/aa/bb/g + Pour remplacer toutes les occurrences dans le fichier tapez :%s/aa/bb/g + Pour demander une confirmation à chaque fois ajoutez 'c' :%s/aa/bb/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 5.1 : COMMENT EXÉCUTER UNE COMMANDE EXTERNE + + + ** Tapez :! suivi d'une commande externe pour exécuter cette commande. ** + + 1. Tapez le : familier pour mettre le curseur en bas de l'écran. Cela vous + permet de saisir une commande. + + 2. Puis tapez un ! (point d'exclamation). Cela vous permet d'exécuter + n'importe quelle commande valide pour votre interpréteur (shell). + + 3. Par exemple, tapez ls après le ! et appuyez . Ceci affichera + la liste des fichiers du répertoire courant, comme si vous aviez tapé la + commande à l'invite du shell. Utilisez :!dir si :!ls ne marche pas. + +NOTE : Il est possible d'exécuter n'importe quelle commande externe de cette + manière, avec ou sans argument. + +NOTE : Toutes les commandes : doivent finir par la frappe de . + À partir de maintenant, nous ne le mentionnerons plus. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 5.2 : PLUS DE DÉTAILS SUR L'ENREGISTREMENT DE FICHIERS + + + ** Pour enregistrer les changements faits au texte, tapez :w FICHIER . ** + + 1. Tapez :!dir ou :!ls pour avoir la liste des fichiers dans le + répertoire courant. Vous savez déjà qu'il faut appuyer après + cela. + + 2. Choisissez un nom de fichier qui n'existe pas encore, par exemple TEST. + + 3. Puis tapez :w TEST (où TEST est le nom que vous avez choisi). + + 4. Cela enregistre tout le fichier (Tutoriel Vim) sous le nom TEST. + Pour le vérifier, tapez :!dir ou :!ls de nouveau pour revisualiser + votre répertoire. + +NOTE : Si vous quittez Vim et le redémarrez de nouveau avec le fichier TEST, + celui-ci sera une copie exacte de ce cours au moment où vous l'avez + enregistré. + + 5. Maintenant, effacez le fichier en tapant (MS-DOS) : :!del TEST + ou (Unix) : :!rm TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 5.3 : SÉLECTION DU TEXTE À ENREGISTRER + + + ** Pour enregistrer une portion du fichier, + tapez : v déplacement :w FICHIER ** + + 1. Déplacez le curseur sur cette ligne. + + 2. Appuyez v et déplacez le curseur vers la cinquième ligne plus bas. + Remarquez que le texte est en surbrillance. + + 3. Appuyez : . En bas de l'écran :'<,'> va apparaître. + + 4. Tapez w TEST , où TEST est un nom de fichier qui n'existe pas. + Vérifiez que vous voyez :'<,'>w TEST avant de d'appuyer sur Entrée. + + 5. Vim va enregistrer les lignes sélectionnées dans le fichier TEST. + Utilisez :!dir ou !ls pour le voir. Ne l'effacez pas encore ! + Nous allons l'utiliser dans la leçon suivante. + +NOTE : L'appui de v démarre la sélection Visuelle. Vous pouvez déplacer le + curseur pour agrandir ou rétrécir la sélection. Puis vous pouvez + utiliser un opérateur pour faire quelque chose sur le texte. Par + exemple, d efface le texte. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 5.4 : RÉCUPÉRATION ET FUSION DE FICHIERS + + + ** Pour insérer le contenu d'un fichier, tapez :r FICHIER ** + + 1. Placez le curseur juste au dessus de cette ligne. + +NOTE : Après avoir exécuté l'étape 2 vous verrez du texte de la Leçon 5.3. + Puis déplacez vous vers le bas pour voir cette leçon à nouveau. + + 2. Maintenant récupérez votre fichier TEST en utilisant la commande :r TEST + où TEST est le nom de votre fichier. + Le fichier que vous récupérez est placé au dessous de la ligne du curseur. + + 4. Pour vérifier que le fichier a bien été inséré, remontez et vérifiez + qu'il y a maintenant deux copies de la Leçon 5.3, l'originale et celle + contenue dans le fichier. + +NOTE : Vous pouvez aussi lire la sortie d'une commande externe. Par exemple, + :r !ls lit la sortie de la commande ls et la place sous la ligne du + curseur. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RÉSUMÉ DE LA LEÇON 5 + + + 1. :!commande exécute une commande externe. + + Quelques exemples pratiques : + (MS-DOS) (Unix) + :!dir :!ls affiche le contenu du répertoire courant. + :!del FICHIER :!rm FICHIER efface FICHIER. + + 2. :w FICHIER enregistre le fichier Vim courant sur le disque avec pour + nom FICHIER. + + 3. v déplacement :w FICHIER sauvegarde les lignes de la sélection Visuelle + dans le fichier FICHIER. + + 4. :r FICHIER récupère le contenu du fichier FICHIER et l'insère sous la + position du curseur. + + 5. :r !dir lit la sortie de la commande dir et l'insère sous la position + du curseur. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 6.1 : LA COMMANDE D'OUVERTURE + + +** Tapez o pour ouvrir une ligne sous le curseur et y aller en Insertion. ** + + 1. Déplacez le curseur sur la ligne marquée ---> ci-dessous. + + 2. Tapez la lettre o minuscule pour ouvrir une ligne SOUS le curseur et + vous y placer en mode Insertion. + + 3. Puis tapez du texte et appuyez <Échap> pour sortir du mode Insertion. + +---> En tapant o le curseur se met sur la ligne ouverte, en mode Insertion. + + 4. Pour ouvrir une ligne au DESSUS du curseur, tapez simplement un O + majuscule, plutôt qu'un o minuscule. Faites un essai sur la ligne + ci-dessous. + +---> Ouvrez une ligne ci-dessus en tapant O lorsque le curseur est ici. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 6.2 : LA COMMANDE D'AJOUT + + + ** Tapez a pour insérer du texte APRÈS le curseur. ** + + 1. Placez le curseur au début de la ligne marquée ---> ci-dessous. + + 2. Appuyez e jusqu'à ce que le curseur soit sur la fin de li . + + 3. Appuyez a (minuscule) pour ajouter du texte APRÈS le curseur. + + 4. Complétez le mot comme dans la ligne dessous. Appuyez <Échap> pour + sortir du mode Insertion. + + 5. Utilisez e pour vous déplacer vers le mot incomplet suivant et + répétez les étapes 3 et 4. + +---> Cette li vous perm de pratiq l'ajout de t dans une ligne. +---> Cette ligne vous permet de pratiquer l'ajout de texte dans une ligne. + +NOTE : a, i, A vont tous dans le même mode Insertion, la seule différence + est l'endroit où les caractères sont insérés. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 6.3 : UNE AUTRE MANIÈRE DE REMPLACER + + + ** Tapez un R majuscule pour remplacer plus d'un caractère. ** + + 1. Déplacez le curseur sur la première ligne marquée ---> ci-dessous. + Déplacez le curseur sur le début du premier xxx . + + 2. Appuyez maintenant R et tapez le nombre dessous dans la deuxième ligne, + de manière à remplacer le xxx . + + 3. Appuyez <Échap> pour quitter le mode Remplacement. Notez que le reste de + la ligne demeure inchangé. + + 4. Répétez les étapes pour remplacer les xxx restants. + + +---> L'ajout de 123 à xxx donne xxx. +---> L'ajout de 123 à 456 donne 579. + +NOTE : Le mode Remplacement est comme le mode Insertion, mais tous les + caractères tapés effacent un caractère existant. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 6.4 : COPIER ET COLLER DU TEXTE + + + ** Utilisez l'opérateur y pour copier du texte et p pour le coller ** + + 1. Allez à la ligne marquée ---> ci-dessous et placez le curseur après "a)". + + 2. Démarrez le mode Visuel avec v et déplacez le curseur juste devant + "premier". + + 3. Tapez y pour copier le texte en surbrillance. + + 4. Déplacez la curseur à la fin de la ligne suivante : j$ + + 5. Tapez p pour coller le texte. Puis tapez : un second <Échap> . + + 6. Utilisez le mode Visuel pour sélectionner "élément", copiez le avec y , + déplacez vous à la fin de la ligne suivant avec j$ et collez le texte + à cet endroit avec p . + +---> a) ceci est le premier élément. + b) + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 6.4 : RÉGLAGE DES OPTIONS + + + ** Réglons une option afin que la recherche et la substitution ignore la + casse des caractères. ** + + 1. Recherchez 'ignore' en tapant : /ignore + Répétez ceci plusieurs fois en utilisant la touche n . + + 2. Activez l'option 'ic' (ignorer casse) en tapant :set ic . + + 3. Puis cherchez 'ignore' de nouveau en utilisant n . + Remarquez que Ignore et IGNORE sont maintenant aussi trouvés. + + 4. Activez les options 'hlsearch' et 'incsearch' avec :set hls is . + + 5. Puis recommencez une recherche, et faites bien attention à ce qui se + produit : /ignore + + 6. Pour désactiver 'ignorer casse', entrez : :set noic + +NOTE : Pour enlever la surbrillance des résultats, entrez : :nohlsearch + +NOTE : Si vous voulez ignorer la casse uniquement pour une recherche, utilisez + \c dans la phrase : /ignore\c + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RÉSUMÉ DE LA LEÇON 6 + + + 1. Taper o ouvre une ligne SOUS le curseur et démarre le mode Insertion. + Taper O ouvre une ligne au DESSUS du curseur. + + 2. Taper a pour insérer du texte APRÈS le curseur. + Taper A pour insérer du texte après la fin de ligne. + + 3. Taper e déplace à la fin du mot. + + 4. Taper y copie du texte, p le colle. + + 5. Taper R majuscule active le mode Remplacement jusqu'à ce qu' <Échap> + soit appuyé. + + 6. Taper ":set xxx" active l'option "xxx". Quelques options sont : + 'ic' 'ingnorecase' pour ignorer la casse lors des recherches. + 'is' 'incsearch' pour montrer les appariements partiels. + 'hls' 'hlsearch' pour mettre en surbrillance les appariements. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 7.1 : OBTENIR DE L'AIDE + + + ** Utiliser le système d'aide en ligne. ** + + Vim a un système complet d'aide en ligne. Pour y accéder, essayez l'une de + ces trois méthodes : + - appuyez la touche (si vous en avez une) + - appuyez la touche (si vous en avez une) + - tapez :help + + + Lisez le texte dans la fenêtre d'aide pour savoir comment fonctionne l'aide. + Tapez CTRL-W CTRL-W pour sauter d'une fenêtre à l'autre. + Tapez :q pour fermer la fenêtre d'aide. + + Vous pouvez accéder à l'aide sur à peu près n'importe quel sujet en donnant + des arguments à la commande :help . Essayez par exemple (n'oubliez pas + d'appuyer sur ) : + + :help w + :help c_CTRL-D + :help c_ ** + + 1. Mettez Vim soit en mode non compatible : set nocp + + 2. Regardez quels fichiers existent dans le répertoire : !ls ou !dir + + 3. Tapez le début d'une commande : :e + + 4. Appuyez CTRL-D et Vim affichera une liste de commandes qui commencent + par "e". + + 5. Appuyez et Vim complétera le nom de la commande : ":edit" + + 6. Ajoutez maintenant un espace et le début d'un fichier existant : + :edit FIC + + 7 Appuyez . Vim va compléter le nom (s'il est unique). + +NOTE : Le complètement fonctionne pour de nombreuse commandes. Essayez + d'appuyer CTRL-D et . C'est utile en particulier pour :help . + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RÉSUMÉ DE LA LEÇON 7 + + + 1. Tapez :help ou appuyez ou pour ouvrir la fenêtre d'aide. + + 2. Tapez :help cmd pour trouver l'aide sur cmd . + + 3. Tapez CTRL-W CTRL-W pour sauter à une autre fenêtre. + + 4. Tapez :q pour fermer la fenêtre d'aide. + + 5. Créez un script de démarrage vimrc pour conserver vos réglages préférés. + + 6. Quand vous tapez une commande : appuyez CTRL-D pour voir les + complètements possibles. Appuyez pour utiliser un complètement. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Ceci conclut le Tutoriel Vim. Le but était de vous donner un bref aperçu de + l'éditeur Vim, juste assez pour vous permettre d'utiliser l'éditeur + relativement facilement. Il est loin d'être complet, vu que Vim a beaucoup + beaucoup plus de commandes. Un Manuel de l'utilisateur est disponible en + anglais : :help user-manual . + + Pour continuer à découvrir et à apprendre Vim, il existe un livre traduit en + français. Il parle plus de Vi que de Vim, mais pourra vous être utile. + L'éditeur Vi - Collection Précis et concis - par Arnold Robbins + Éditeur : O'Reilly France + ISBN : 2-84177-102-4 + + Deux livres en anglais sont également mentionnés dans la version originale + de ce tutoriel, dont un qui traite spécifiquement de Vim. Merci de vous y + référer si vous êtes intéressés. + + Ce tutoriel a été écrit par Michael C. Pierce et Robert K. Ware de l'École + des Mines du Colorado et reprend des idées fournies par Charles Smith, + Université d'État du Colorado. E-mail : bware@mines.colorado.edu. + + Modifié pour Vim par Bram Moolenar. + Traduit en Français par Adrien Beau, en avril 2001. + Dernières mises à jour par Dominique Pellé. + + E-mail : dominique.pelle@gmail.com + Last Change : 2008 Nov 23 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.fr.utf-8 b/vim/bundle/ubuntu-vim72/tutor/tutor.fr.utf-8 new file mode 100644 index 0000000..1b01510 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.fr.utf-8 @@ -0,0 +1,1038 @@ +=============================================================================== += B i e n v e n u e dans le T u t o r i e l de V I M - Version 1.7.fr.1 = +=============================================================================== + + Vim est un éditeur très puissant qui a trop de commandes pour pouvoir + toutes les expliquer dans un cours comme celui-ci, qui est conçu pour en + décrire suffisamment afin de vous permettre d'utiliser simplement Vim. + + Le temps requis pour suivre ce cours est d'environ 25 à 30 minutes, selon + le temps que vous passerez à expérimenter. + + ATTENTION : + Les commandes utilisées dans les leçons modifieront le texte. Faites une + copie de ce fichier afin de vous entraîner dessus (si vous avez lancé + "vimtutor" ceci est déjà une copie). + + Il est important de garder en tête que ce cours est conçu pour apprendre + par la pratique. Cela signifie que vous devez exécuter les commandes + pour les apprendre correctement. Si vous vous contentez de lire le texte, + vous oublierez les commandes ! + + Maintenant, vérifiez que votre clavier n'est PAS verrouillé en + majuscules, et appuyez la touche j le nombre de fois suffisant pour + que la Leçon 1.1 remplisse complètement l'écran. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 1.1 : DÉPLACEMENT DU CURSEUR + + + ** Pour déplacer le curseur, appuyez les touches h,j,k,l comme indiqué. ** + ^ + k Astuce : La touche h est à gauche et déplace à gauche. + < h l > La touche l est à droite et déplace à droite. + j La touche j ressemble à une flèche vers le bas. + v + 1. Déplacez le curseur sur l'écran jusqu'à vous sentir à l'aise. + + 2. Maintenez la touche Bas (j) enfoncée jusqu'à ce qu'elle se répète. + Maintenant vous êtes capable de vous déplacer jusqu'à la leçon suivante. + + 3. En utilisant la touche Bas, allez à la Leçon 1.2. + +NOTE : Si jamais vous doutez de ce que vous venez de taper, appuyez <Échap> + pour revenir en mode Normal. Puis retapez la commande que vous vouliez. + +NOTE : Les touches fléchées devraient également fonctionner. Mais en utilisant + hjkl vous pourrez vous déplacer beaucoup plus rapidement, une fois que + vous aurez pris l'habitude. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 1.2 : SORTIR DE VIM + + + !! NOTE : Avant d'effectuer les étapes ci-dessous, lisez toute cette leçon !! + + 1. Appuyez la touche <Échap> (pour être sûr d'être en mode Normal). + + 2. Tapez : :q! + Ceci quitte l'éditeur SANS enregistrer les changements que vous avez + faits. + + 3. Lorsque l'invite du shell vous sera présentée, tapez la commande qui + vous a mené dans ce tutoriel. Cela pourrait être : vimtutor + + 4. Si vous avez mémorisé ces étapes et êtes confiant, effectuez les étapes + 1 à 3 pour sortir puis rentrer dans l'éditeur. + +NOTE : :q! annule tous le changements que vous avez fait. Dans + quelques leçons, vous apprendrez à enregistrer les changements. + + 5. Déplacez le curseur à la Leçon 1.3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 1.3 : ÉDITION DE TEXTE - EFFACEMENT + + + ** Appuyez x pour effacer le caractère sous le curseur. ** + + 1. Déplacez le curseur sur la ligne marquée ---> ci-dessous. + + 2. Pour corriger les erreurs, déplacez le curseur jusqu'à ce qu'il soit + sur un caractère à effacer. + + 3. Appuyez la touche x pour effacer le caractère redondant. + + 4. Répétez les étapes 2 à 4 jusqu'à ce que la phrase soit correcte. + +---> La vvache à sautéé au-ddessus dde la luune. + + 5. Maintenant que la ligne est correcte, passez à la Leçon 1.4. + +NOTE : En avançant dans ce cours, n'essayez pas de mémoriser, apprenez par + la pratique. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 1.4 : ÉDITION DE TEXTE - INSERTION + + + ** Appuyez i pour insérer du texte. ** + + 1. Déplacez le curseur sur la première ligne marquée ---> ci-dessous. + + 2. Pour rendre la première ligne identique à la seconde, mettez le curseur + sur le premier caractère APRÈS l'endroit où insérer le texte. + + 3. Appuyez i et tapez les caractères qui manquent. + + 4. Une fois qu'une erreur est corrigée, appuyez <Échap> pour revenir en mode + Normal. Répétez les étapes 2 à 4 pour corriger la phrase. + +---> Il mnqe caractères cette . +---> Il manque des caractères dans cette ligne. + + 5. Une fois que vous êtes à l'aise avec l'insertion de texte, allez à la + Leçon 1.5. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 1.5 : ÉDITION DE TEXTE - AJOUTER + + + ** Appuyez A pour ajouter du text. ** + + 1. Déplacez le curseur sur la première ligne ci-dessous marquée --->. + Peu importe sur quel caractère se trouve le curseur sur cette ligne. + + 2. Appuyez A et tapez les ajouts nécessaires. + + 3. Quand le texte a été ajouté, appuyez <Échap> pour revenir en mode + Normal. + + 4. Déplacez le curseur sur la seconde ligne marquée ---> et répétez les + étapes 2 et 3 pour corriger la phrase. + +---> Il manque du texte à partir de cet + Il manque du texte à partir de cette ligne. +---> Il manque aussi du te + Il manque aussi du texte ici. + + 5. Quand vous vous sentez suffisamment à l'aise pour ajouter du texte, + allez à la Leçon 1.6. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 1.6 : ÉDITER UN FICHIER + + + ** Utilisez :wq pour enregistrer un fichier et sortir. ** + +!! NOTE : Lisez toute la leçon avant d'exécuter les instructions ci-dessous !! + + 1. Sortez de ce tutoriel comme vous l'avez fait dans la Leçon 1.2 : :q! + Ou, si vous avez accès à un autre terminal, exécutez y les actions + qui suivent. + + 2. À l'invite du shell, tapez cette commande : vim tutor + 'vim' est la commande pour démarrer l'éditeur Vim, 'tutor' est le + nom du fichier que vous souhaitez éditer. Utilisez un fichier qui peut + être modifié. + + 3. Insérez et effacez du texte comme vous l'avez appris dans les leçons + précédentes. + + 4. Enregistrez le fichier avec les changements et sortez de Vim avec : + :wq + + 5. Si vous avez quitté vimtutor à l'étape 1, recommencez vimtutor et + déplacez-vous en bas vers le résumé suivant. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RÉSUMÉ DE LA LEÇON 1 + + + 1. Le curseur se déplace avec les touches fléchées ou les touches hjkl. + h (gauche) j (bas) k (haut) l (droite) + + 2. Pour démarrer Vim à l'invite du shell tapez : vim FICHIER + + 3. Pour quitter Vim tapez : <Échap> :q! pour perdre tous les + changements. + OU tapez : <Échap> :wq pour enregistrer les + changements. + + 4. Pour effacer un caractère sous le curseur tapez : x + + 5. Pour insérer ou ajouter du texte tapez : + i tapez le texte à insérer avant le curseur <Échap> + A tapez le texte à ajouter après le curseur <Échap> + +NOTE : Appuyer <Échap> vous place en mode Normal ou annule une commande + partiellement tapée dont vous ne voulez plus. + +Passez maintenant à la leçon 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 2.1 : COMMANDES D'EFFACEMENT + + + ** Tapez dw pour effacer un mot. ** + + 1. Appuyez <Échap> pour être sûr d'être en mode Normal. + + 2. Déplacez le curseur sur la ligne marquée ---> ci-dessous. + + 3. Placez le curseur sur le début d'un mot qui a besoin d'être effacé. + + 4. Tapez dw pour faire disparaître ce mot. + +NOTE : La lettre d apparaîtra sur la dernière ligne de l'écran lors de + votre frappe. Vim attend que vous tapiez w . Si vous voyez un autre + caractère que d vous avez tapé autre chose ; appuyez <Échap> et + recommencez. + +---> Il y a quelques drôle mots qui n'ont rien à faire papier sur cette ligne. + + 5. Répétez les étapes 3 et 4 jusqu'à ce que la phrase soit correcte et allez + à la Leçon 2.2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 2.2 : PLUS DE COMMANDES D'EFFACEMENTS + + + ** Tapez d$ pour effacer jusqu'à la fin de la ligne. ** + + 1. Appuyez <Échap> pour être sûr d'être en mode Normal. + + 2. Déplacez le curseur sur la ligne marquée ---> ci-dessous. + + 3. Déplacez le curseur jusqu'à la fin de la ligne correcte (APRÈS le + premier . ). + + 4. Tapez d$ pour effacer jusqu'à la fin de la ligne. + +---> Quelqu'un a tapé la fin de cette ligne deux fois. cette ligne deux fois. + + 5. Allez à la Leçon 2.3 pour comprendre ce qui se passe. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 2.3 : À PROPOS DES OPÉRATEURS ET DES MOUVEMENTS + + + Plusieurs commandes qui changent le texte sont constituées d'un opérateur + et d'un mouvement. Le format pour une commande d'effacement avec l'opérateur + d d'effacement est le suivant : + + d mouvement + + Où : + d - est l'opérateur d'effacement + mouvement - est le mouvement sur lequel agit l'opérateur (listés + ci-dessous) + + Une courte liste de mouvements : + w - jusqu'au début du prochain mot, en EXCLUANT son premier caractère. + e - jusqu'à la fin du mot courant, en EXCLUANT son denier caractère. + $ - jusqu'à la fin de la ligne, en INCLUANT son dernier caractère. + + Ainsi, taper de va effacer depuis le curseur jusqu'à la fin du mot. + +NOTE : Le seul appui d'un mouvement en mode Normal, sans commande, déplace le + curseur comme indiqué. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 2.4 : UTILISER UN QUANTIFICATEUR AVEC UN MOUVEMENT + + + ** Taper un nombre avant un mouvement le répète autant de fois. ** + + 1. Déplacez le curseur au début de la ligne marquée ---> ci-dessous. + + 2. Tapez 2w pour déplacer le curseur de 2 mots vers l'avant. + + 3. Tapez 3e pour déplacer le curseur à la fin du troisième mot vers + l'avant. + + 4. Tapez 0 (zéro) pour déplacer au début de la ligne. + + 5. Répétez les étapes 2 et 3 avec des quantificateurs différents. + +---> Ceci est juste une ligne avec des mots où vous pouvez vous déplacer. + + 6. Déplacez-vous à la Leçon 2.5. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 2.5 : UTILISER UN QUANTIFICATEUR POUR EFFACER PLUS + + + ** Taper un nombre avec un opérateur le répète autant de fois. ** + + Outre la combinaison de l'opérateur d'effacement avec un déplacement + mentionné ci-dessus, vous pouvez insérer un nombre (quantificateur) + pour effacez encore plus : + d nombre déplacement + + 1. Déplacez le curseur vers le premier mot en MAJUSCULES dans la ligne + marquée --->. + + 2. Tapez d2w pour effacer les deux mots en MAJUSCULES. + + 3. Répétez les étapes 1 et 2 avec des quantificateurs différents pour + effacer les mots suivants en MAJUSCULES à l'aide d'une commande. + +---> Cette ABC DE ligne FGHI JK LMN OP de mots est Q RS TUV nettoyée. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 2.6 : OPÉREZ SUR DES LIGNES + + + ** Tapez dd pour effacer une ligne complète. ** + + Vu le nombre de fois où l'on efface des lignes complètes, les concepteurs + de Vi ont décidé qu'il serait plus facile de taper simplement deux d + pour effacer une ligne. + + 1. Placez le curseur sur la seconde ligne de la phrase ci-dessous. + 2. Tapez dd pour effacer la ligne. + 3. Maintenant allez à la quatrième ligne. + 4. Tapez 2dd pour effacer deux lignes. + +---> 1) Les roses sont rouges, +---> 2) La boue c'est drôle, +---> 3) Les violettes sont bleues, +---> 4) J'ai une voiture, +---> 5) Les horloges donnent l'heure, +---> 6) Le sucre est doux +---> 7) Tout comme vous. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 2.7 : L'ANNULATION + + + ** Tapez u pour annuler les dernières commandes. ** + ** Tapez U pour récupérer toute une ligne. ** + + 1. Déplacez le curseur sur la ligne marquée ---> ci-dessous et placez-le sur + la première erreur. + 2. Tapez x pour effacer le premier caractère redondant. + 3. Puis tapez u pour annuler la dernière commande exécutée. + 4. Cette fois, corrigez toutes les erreurs de la ligne avec la commande x . + 5. Puis tapez un U majuscule pour remettre la ligne dans son état initial. + 6. Puis tapez u deux-trois fois pour annuler le U et les commandes + précédentes. + 7. Maintenant tapez CTRL-R (maintenez la touche CTRL enfoncée pendant que + vous appuyez R) deux-trois fois pour refaire les commandes (annuler + les annulations). + +---> Coorrigez les erreurs suur ccette ligne et reemettez-les avvec 'annuler'. + + 8. Ce sont des commandes très utiles. Maintenant, allez au résumé de la + Leçon 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RÉSUMÉ DE LA LEÇON 2 + + + 1. Pour effacer du curseur jusqu'au mot suivant tapez : dw + + 2. Pour effacer du curseur jusqu'à la fin d'une ligne tapez : d$ + + 3. Pour effacer toute une ligne tapez : dd + + 4. Pour répéter un déplacement ajoutez un quantificateur : 2w + + 5. Le format d'une commande de changement est : + + opérateur [nombre] déplacement + + Où : + opérateur - est ce qu'il faut faire, comme d pour effacer. + [nombre] - un quantificateur optionnel pour répéter le déplacement. + déplacement - déplace le long du texte à opérer, tel que w (mot), + $ (jusqu'à la fin de ligne), etc. + + 6. Pour se déplacer au début de ligne, utilisez un zéro : 0 + + 5. Pour annuler des actions précédentes, tapez : u (u minuscule) + Pour annuler tous les changements sur une ligne tapez : U (U majuscule) + Pour annuler l'annulation tapez : CTRL-R + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 3.1 : LE COLLAGE + + + ** Tapez p pour placer après le curseur ce qui vient d'être effacé. ** + + 1. Placez le curseur sur la première ligne ci-dessous marquée --->. + + 2. Tapez dd pour effacer la ligne et la placer dans un registre de Vim. + + 3. Déplacez le curseur sur la ligne c) au dessus où vous voulez remettre la + ligne effacée. + + 4. En mode Normal, tapez p pour remettre la ligne en dessous du curseur. + + 5. Répétez les étapes 2 à 4 pour mettre toutes les lignes dans le bon ordre. + +---> d) Et vous, qu'apprenez-vous ? +---> b) Les violettes sont bleues, +---> c) L'intelligence s'apprend, +---> a) Les roses sont rouges, + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 3.2 : LA COMMANDE DE REMPLACEMENT + + + ** Tapez rx pour remplacer un caractère sous le curseur par x . ** + + 1. Déplacez le curseur sur la première ligne marquée ---> ci-dessous. + + 2. Placez le curseur de manière à ce qu'il surplombe la première erreur. + + 3. Tapez r suivi du caractère qui doit corriger l'erreur. + + 4. Répétez les étapes 2 et 3 jusqu'à ce que la première ligne soit égale + à la seconde. + +---> Quand cette ligne a été sauvie, quelqu'un a lait des faunes de frappe ! +---> Quand cette ligne a été saisie, quelqu'un a fait des fautes de frappe ! + + 5. Maintenant, allez à la Leçon 3.3. + +NOTE : N'oubliez pas que vous devriez apprendre par la pratique, pas par + mémorisation. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 3.3 : L'OPÉRATEUR DE CHANGEMENT + + + ** Pour changer jusqu'à la fin d'un mot, tapez ce .** + + 1. Déplacez le curseur sur la première ligne marquée ---> ci-dessous. + + 2. Placez le curseur sur le u de luhko. + + 3. Tapez ce et corrigez le mot (dans notre cas, tapez 'igne'.) + + 4. Appuyez <Échap> et placez-vous sur le prochain caractère qui doit + être changé). + + 5. Répétez les étapes 3 et 4 jusqu'à ce que la première phrase soit + identique à la seconde. + +---> Cette luhko contient quelques myqa qui ont ricne d'être chantufip. +---> Cette ligne contient quelques mots qui ont besoin d'être changés. + +Notez que ce efface le mot et vous place ensuite en mode Insertion. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 3.4 : PLUS DE CHANGEMENTS AVEC c + + + ** L'opérateur de changement fonctionne avec les mêmes déplacements + que l'effacement. ** + + 1. L'opérateur de changement fonctionne de la même manière que + l'effacement. Le format est : + + c [nombre] déplacement + + 2. Les déplacements sont identiques : w (mot) et $ (fin de ligne). + + 3. Déplacez-vous sur la première ligne marquée ---> ci-dessous. + + 4. Placez le curseur sur la première erreur. + + 5. Tapez c$ et tapez le reste de la ligne afin qu'elle soit identique + à la seconde ligne, puis tapez <Échap>. + +---> La fin de cette ligne doit être rendue identique à la seconde. +---> La fin de cette ligne doit être corrigée avec la commande c$ . + +NOTE : Vous pouvez utilisez la touche Retour Arrière pour corriger les + erreurs lorsque vous tapez. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RÉSUMÉ DE LA LEÇON 3 + + + 1. Pour remettre le texte qui a déjà été effacé, tapez p . Cela Place le + texte effacé APRÈS le curseur (si une ligne complète a été effacée, elle + sera placée sous la ligne du curseur). + + 2. Pour remplacer le caractère sous le curseur, tapez r suivi du caractère + qui remplacera l'original. + + 3. L'opérateur de changement vous permet de changer depuis la position du + curseur jusqu'où le déplacement vous amène. Par exemple, tapez ce + pour changer du curseur jusqu'à la fin du mot, c$ pour changer jusqu'à + la fin d'une ligne. + + 4. Le format pour le changement est : + + c [nombre] déplacement + +Passez maintenant à la leçon suivante. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 4.1 : POSITION DU CURSEUR ET ÉTAT DU FICHIER + + + ** Tapez CTRL-G pour afficher votre position dans le fichier et son état. + Tapez G pour vous rendre à une ligne donnée du fichier. ** + +NOTE : Lisez toute cette leçon avant d'effectuer l'une des étapes !! + + 1. Maintenez enfoncée la touche CTRL et appuyez sur g . On appelle cela + CTRL-G. Une ligne d'état va apparaître en bas de l'écran avec le nom + du fichier et le numéro de la ligne où vous êtes. Notez ce numéro, il + servira lors de l'étape 3. + +NOTE : Vous pouvez peut-être voir le curseur en bas à droite de l'écran. + Ceci arrive quand l'option 'ruler' est activée (voir :help 'ruler') + + 2. Tapez G pour vous déplacer à la fin du fichier. + Tapez gg pour vous déplacer au début du fichier. + + 3. Tapez le numéro de la ligne où vous étiez suivi de G . Cela vous + ramènera à la ligne où vous étiez au départ quand vous aviez appuyé + CTRL-G. + + 4. Si vous vous sentez prêt à faire ceci, effectuez les étapes 1 à 3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 4.2 : LA RECHERCHE + + + ** Tapez / suivi d'un texte pour rechercher ce texte. ** + + 1. Tapez le caractère / en mode Normal. Notez que celui-ci et le curseur + apparaissent en bas de l'écran, comme lorsque l'on utilise : . + + 2. Puis tapez 'errreuur' . C'est le mot que vous voulez rechercher. + + 3. Pour rechercher à nouveau le même texte, tapez simplement n . + Pour rechercher le même texte dans la direction opposée, tapez N . + + 4. Pour rechercher une phrase dans la direction opposée, utilisez ? + au lieu de / . + +---> erreur ne s'écrit pas "errreuur" ; errreuur est une erreur. + +NOTE : Quand la recherche atteint la fin du fichier, elle reprend au début + sauf si l'option 'wrapscan' est déactivée. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 4.3 : RECHERCHE DES PARENTHÈSES CORRESPONDANTES + + + ** Tapez % pour trouver des ), ] ou } correspondants. ** + + 1. Placez le curseur sur l'un des (, [ ou { de la ligne marquée ---> + ci-dessous. + + 2. Puis tapez le caractère % . + + 3. Le curseur se déplacera sur la parenthèse out crochet correspondant. + + 4. Tapez % pour replacer le curseur sur la parenthèse ou crochet + correspondant. + + 5. Déplacez le curseur sur un autre (,),[,],{ ou } et regardez ce que + fait % . + +---> Voici ( une ligne de test contenant des (, des [ ] et des { } )). + +NOTE : Cette fonctionnalité est très utile lors du débogage d'un programme qui + contient des parenthèses déséquilibrées ! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 4.4 : LA COMMANDE DE SUBSTITUTION + + + ** Tapez :s/ancien/nouveau/g pour remplacer 'ancien' par 'nouveau'. ** + + 1. Déplacez le curseur sur la ligne marquée ---> ci-dessous. + + 2. Tapez :s/lee/le . Notez que cette commande change seulement la + première occurrence de "lee" dans la ligne. + + 3. Puis tapez :s/lee/le/g . L'ajout du drapeau g ordonne de faire une + substitution globale sur la ligne, et change toutes les occurrences de + "lee" sur la ligne. + +---> lee meilleur moment pour regarder lees fleurs est pendant lee printemps. + + 4. Pour changer toutes les occurrences d'un texte, entre deux lignes, + tapez :#,#s/ancien/nouveau/g où #,# sont les numéros de lignes de la + plage où la substitution doit être faite. + Tapez :%s/ancien/nouveau/g pour changer toutes les occurrences dans + tout le fichier. + Tapez :%s/ancien/nouveau/gc pour trouver toutes les occurrences dans + tout le fichier avec une invite pour + confirmer ou infirmer chaque substitution. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RÉSUMÉ DE LA LEÇON 4 + + + 1. CTRL-G affiche la position dans le fichier et l'état de celui-ci. + G déplace à la fin du fichier. + nombre G déplace au numéro de ligne. + gg déplace à la première ligne. + + 2. Taper / suivi d'un texte recherche ce texte vers l'AVANT. + Taper ? suivi d'un texte recherche ce texte vers l'ARRIÈRE. + Après une recherche tapez n pour trouver l'occurrence suivante dans la + même direction ou Maj-N pour rechercher dans la direction opposée. + + 3. Taper % lorsque le curseur est sur (, ), [, ], { ou } déplace + celui-ci sur le caractère correspondant. + + 4. Pour remplacer le premier aa par bb sur une ligne tapez :s/aa/bb + Pour remplacer tous les aa par bb sur une ligne tapez :s/aa/bb/g + Pour remplacer du texte entre deux numéros de ligne tapez :#,#s/aa/bb/g + Pour remplacer toutes les occurrences dans le fichier tapez :%s/aa/bb/g + Pour demander une confirmation à chaque fois ajoutez 'c' :%s/aa/bb/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 5.1 : COMMENT EXÉCUTER UNE COMMANDE EXTERNE + + + ** Tapez :! suivi d'une commande externe pour exécuter cette commande. ** + + 1. Tapez le : familier pour mettre le curseur en bas de l'écran. Cela vous + permet de saisir une commande. + + 2. Puis tapez un ! (point d'exclamation). Cela vous permet d'exécuter + n'importe quelle commande valide pour votre interpréteur (shell). + + 3. Par exemple, tapez ls après le ! et appuyez . Ceci affichera + la liste des fichiers du répertoire courant, comme si vous aviez tapé la + commande à l'invite du shell. Utilisez :!dir si :!ls ne marche pas. + +NOTE : Il est possible d'exécuter n'importe quelle commande externe de cette + manière, avec ou sans argument. + +NOTE : Toutes les commandes : doivent finir par la frappe de . + À partir de maintenant, nous ne le mentionnerons plus. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 5.2 : PLUS DE DÉTAILS SUR L'ENREGISTREMENT DE FICHIERS + + + ** Pour enregistrer les changements faits au texte, tapez :w FICHIER . ** + + 1. Tapez :!dir ou :!ls pour avoir la liste des fichiers dans le + répertoire courant. Vous savez déjà qu'il faut appuyer après + cela. + + 2. Choisissez un nom de fichier qui n'existe pas encore, par exemple TEST. + + 3. Puis tapez :w TEST (où TEST est le nom que vous avez choisi). + + 4. Cela enregistre tout le fichier (Tutoriel Vim) sous le nom TEST. + Pour le vérifier, tapez :!dir ou :!ls de nouveau pour revisualiser + votre répertoire. + +NOTE : Si vous quittez Vim et le redémarrez de nouveau avec le fichier TEST, + celui-ci sera une copie exacte de ce cours au moment où vous l'avez + enregistré. + + 5. Maintenant, effacez le fichier en tapant (MS-DOS) : :!del TEST + ou (Unix) : :!rm TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 5.3 : SÉLECTION DU TEXTE À ENREGISTRER + + + ** Pour enregistrer une portion du fichier, + tapez : v déplacement :w FICHIER ** + + 1. Déplacez le curseur sur cette ligne. + + 2. Appuyez v et déplacez le curseur vers la cinquième ligne plus bas. + Remarquez que le texte est en surbrillance. + + 3. Appuyez : . En bas de l'écran :'<,'> va apparaître. + + 4. Tapez w TEST , où TEST est un nom de fichier qui n'existe pas. + Vérifiez que vous voyez :'<,'>w TEST avant de d'appuyer sur Entrée. + + 5. Vim va enregistrer les lignes sélectionnées dans le fichier TEST. + Utilisez :!dir ou !ls pour le voir. Ne l'effacez pas encore ! + Nous allons l'utiliser dans la leçon suivante. + +NOTE : L'appui de v démarre la sélection Visuelle. Vous pouvez déplacer le + curseur pour agrandir ou rétrécir la sélection. Puis vous pouvez + utiliser un opérateur pour faire quelque chose sur le texte. Par + exemple, d efface le texte. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 5.4 : RÉCUPÉRATION ET FUSION DE FICHIERS + + + ** Pour insérer le contenu d'un fichier, tapez :r FICHIER ** + + 1. Placez le curseur juste au dessus de cette ligne. + +NOTE : Après avoir exécuté l'étape 2 vous verrez du texte de la Leçon 5.3. + Puis déplacez vous vers le bas pour voir cette leçon à nouveau. + + 2. Maintenant récupérez votre fichier TEST en utilisant la commande :r TEST + où TEST est le nom de votre fichier. + Le fichier que vous récupérez est placé au dessous de la ligne du curseur. + + 4. Pour vérifier que le fichier a bien été inséré, remontez et vérifiez + qu'il y a maintenant deux copies de la Leçon 5.3, l'originale et celle + contenue dans le fichier. + +NOTE : Vous pouvez aussi lire la sortie d'une commande externe. Par exemple, + :r !ls lit la sortie de la commande ls et la place sous la ligne du + curseur. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RÉSUMÉ DE LA LEÇON 5 + + + 1. :!commande exécute une commande externe. + + Quelques exemples pratiques : + (MS-DOS) (Unix) + :!dir :!ls affiche le contenu du répertoire courant. + :!del FICHIER :!rm FICHIER efface FICHIER. + + 2. :w FICHIER enregistre le fichier Vim courant sur le disque avec pour + nom FICHIER. + + 3. v déplacement :w FICHIER sauvegarde les lignes de la sélection Visuelle + dans le fichier FICHIER. + + 4. :r FICHIER récupère le contenu du fichier FICHIER et l'insère sous la + position du curseur. + + 5. :r !dir lit la sortie de la commande dir et l'insère sous la position + du curseur. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 6.1 : LA COMMANDE D'OUVERTURE + + +** Tapez o pour ouvrir une ligne sous le curseur et y aller en Insertion. ** + + 1. Déplacez le curseur sur la ligne marquée ---> ci-dessous. + + 2. Tapez la lettre o minuscule pour ouvrir une ligne SOUS le curseur et + vous y placer en mode Insertion. + + 3. Puis tapez du texte et appuyez <Échap> pour sortir du mode Insertion. + +---> En tapant o le curseur se met sur la ligne ouverte, en mode Insertion. + + 4. Pour ouvrir une ligne au DESSUS du curseur, tapez simplement un O + majuscule, plutôt qu'un o minuscule. Faites un essai sur la ligne + ci-dessous. + +---> Ouvrez une ligne ci-dessus en tapant O lorsque le curseur est ici. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 6.2 : LA COMMANDE D'AJOUT + + + ** Tapez a pour insérer du texte APRÈS le curseur. ** + + 1. Placez le curseur au début de la ligne marquée ---> ci-dessous. + + 2. Appuyez e jusqu'à ce que le curseur soit sur la fin de li . + + 3. Appuyez a (minuscule) pour ajouter du texte APRÈS le curseur. + + 4. Complétez le mot comme dans la ligne dessous. Appuyez <Échap> pour + sortir du mode Insertion. + + 5. Utilisez e pour vous déplacer vers le mot incomplet suivant et + répétez les étapes 3 et 4. + +---> Cette li vous perm de pratiq l'ajout de t dans une ligne. +---> Cette ligne vous permet de pratiquer l'ajout de texte dans une ligne. + +NOTE : a, i, A vont tous dans le même mode Insertion, la seule différence + est l'endroit où les caractères sont insérés. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 6.3 : UNE AUTRE MANIÈRE DE REMPLACER + + + ** Tapez un R majuscule pour remplacer plus d'un caractère. ** + + 1. Déplacez le curseur sur la première ligne marquée ---> ci-dessous. + Déplacez le curseur sur le début du premier xxx . + + 2. Appuyez maintenant R et tapez le nombre dessous dans la deuxième ligne, + de manière à remplacer le xxx . + + 3. Appuyez <Échap> pour quitter le mode Remplacement. Notez que le reste de + la ligne demeure inchangé. + + 4. Répétez les étapes pour remplacer les xxx restants. + + +---> L'ajout de 123 à xxx donne xxx. +---> L'ajout de 123 à 456 donne 579. + +NOTE : Le mode Remplacement est comme le mode Insertion, mais tous les + caractères tapés effacent un caractère existant. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 6.4 : COPIER ET COLLER DU TEXTE + + + ** Utilisez l'opérateur y pour copier du texte et p pour le coller ** + + 1. Allez à la ligne marquée ---> ci-dessous et placez le curseur après "a)". + + 2. Démarrez le mode Visuel avec v et déplacez le curseur juste devant + "premier". + + 3. Tapez y pour copier le texte en surbrillance. + + 4. Déplacez la curseur à la fin de la ligne suivante : j$ + + 5. Tapez p pour coller le texte. Puis tapez : un second <Échap> . + + 6. Utilisez le mode Visuel pour sélectionner "élément", copiez le avec y , + déplacez vous à la fin de la ligne suivant avec j$ et collez le texte + à cet endroit avec p . + +---> a) ceci est le premier élément. + b) + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 6.4 : RÉGLAGE DES OPTIONS + + + ** Réglons une option afin que la recherche et la substitution ignore la + casse des caractères. ** + + 1. Recherchez 'ignore' en tapant : /ignore + Répétez ceci plusieurs fois en utilisant la touche n . + + 2. Activez l'option 'ic' (ignorer casse) en tapant :set ic . + + 3. Puis cherchez 'ignore' de nouveau en utilisant n . + Remarquez que Ignore et IGNORE sont maintenant aussi trouvés. + + 4. Activez les options 'hlsearch' et 'incsearch' avec :set hls is . + + 5. Puis recommencez une recherche, et faites bien attention à ce qui se + produit : /ignore + + 6. Pour désactiver 'ignorer casse', entrez : :set noic + +NOTE : Pour enlever la surbrillance des résultats, entrez : :nohlsearch + +NOTE : Si vous voulez ignorer la casse uniquement pour une recherche, utilisez + \c dans la phrase : /ignore\c + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RÉSUMÉ DE LA LEÇON 6 + + + 1. Taper o ouvre une ligne SOUS le curseur et démarre le mode Insertion. + Taper O ouvre une ligne au DESSUS du curseur. + + 2. Taper a pour insérer du texte APRÈS le curseur. + Taper A pour insérer du texte après la fin de ligne. + + 3. Taper e déplace à la fin du mot. + + 4. Taper y copie du texte, p le colle. + + 5. Taper R majuscule active le mode Remplacement jusqu'à ce qu' <Échap> + soit appuyé. + + 6. Taper ":set xxx" active l'option "xxx". Quelques options sont : + 'ic' 'ingnorecase' pour ignorer la casse lors des recherches. + 'is' 'incsearch' pour montrer les appariements partiels. + 'hls' 'hlsearch' pour mettre en surbrillance les appariements. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leçon 7.1 : OBTENIR DE L'AIDE + + + ** Utiliser le système d'aide en ligne. ** + + Vim a un système complet d'aide en ligne. Pour y accéder, essayez l'une de + ces trois méthodes : + - appuyez la touche (si vous en avez une) + - appuyez la touche (si vous en avez une) + - tapez :help + + + Lisez le texte dans la fenêtre d'aide pour savoir comment fonctionne l'aide. + Tapez CTRL-W CTRL-W pour sauter d'une fenêtre à l'autre. + Tapez :q pour fermer la fenêtre d'aide. + + Vous pouvez accéder à l'aide sur à peu près n'importe quel sujet en donnant + des arguments à la commande :help . Essayez par exemple (n'oubliez pas + d'appuyer sur ) : + + :help w + :help c_CTRL-D + :help c_ ** + + 1. Mettez Vim soit en mode non compatible : set nocp + + 2. Regardez quels fichiers existent dans le répertoire : !ls ou !dir + + 3. Tapez le début d'une commande : :e + + 4. Appuyez CTRL-D et Vim affichera une liste de commandes qui commencent + par "e". + + 5. Appuyez et Vim complétera le nom de la commande : ":edit" + + 6. Ajoutez maintenant un espace et le début d'un fichier existant : + :edit FIC + + 7 Appuyez . Vim va compléter le nom (s'il est unique). + +NOTE : Le complètement fonctionne pour de nombreuse commandes. Essayez + d'appuyer CTRL-D et . C'est utile en particulier pour :help . + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RÉSUMÉ DE LA LEÇON 7 + + + 1. Tapez :help ou appuyez ou pour ouvrir la fenêtre d'aide. + + 2. Tapez :help cmd pour trouver l'aide sur cmd . + + 3. Tapez CTRL-W CTRL-W pour sauter à une autre fenêtre. + + 4. Tapez :q pour fermer la fenêtre d'aide. + + 5. Créez un script de démarrage vimrc pour conserver vos réglages préférés. + + 6. Quand vous tapez une commande : appuyez CTRL-D pour voir les + complètements possibles. Appuyez pour utiliser un complètement. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Ceci conclut le Tutoriel Vim. Le but était de vous donner un bref aperçu de + l'éditeur Vim, juste assez pour vous permettre d'utiliser l'éditeur + relativement facilement. Il est loin d'être complet, vu que Vim a beaucoup + beaucoup plus de commandes. Un Manuel de l'utilisateur est disponible en + anglais : :help user-manual . + + Pour continuer à découvrir et à apprendre Vim, il existe un livre traduit en + français. Il parle plus de Vi que de Vim, mais pourra vous être utile. + L'éditeur Vi - Collection Précis et concis - par Arnold Robbins + Éditeur : O'Reilly France + ISBN : 2-84177-102-4 + + Deux livres en anglais sont également mentionnés dans la version originale + de ce tutoriel, dont un qui traite spécifiquement de Vim. Merci de vous y + référer si vous êtes intéressés. + + Ce tutoriel a été écrit par Michael C. Pierce et Robert K. Ware de l'École + des Mines du Colorado et reprend des idées fournies par Charles Smith, + Université d'État du Colorado. E-mail : bware@mines.colorado.edu. + + Modifié pour Vim par Bram Moolenar. + Traduit en Français par Adrien Beau, en avril 2001. + Dernières mises à jour par Dominique Pellé. + + E-mail : dominique.pelle@gmail.com + Last Change : 2008 Nov 23 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.hr b/vim/bundle/ubuntu-vim72/tutor/tutor.hr new file mode 100644 index 0000000..f1d346c --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.hr @@ -0,0 +1,972 @@ +=============================================================================== += D o b r o d o ¹ l i u VIM p r i r u è n i k - Verzija 1.7 = +=============================================================================== + + Vim je vrlo moæan editor koji ima mnogo naredbi, previ¹e da bi ih + se svih ovdje spomenulo. Namjena priruènika je objasniti dovoljno + naredbi kako bi poèetnici znatno lak¹e koristili ovaj svestran editor. + + Pribli¾no vrijeme potrebno za uspje¹an zavr¹etak priruènika je oko + 30 minuta a ovisi o tome koliko æe te vremena odvojiti za vje¾banje. + + UPOZORENJE: + Naredbe u ovom priruèniku æe promijeniti ovaj tekst. + Napravite kopiju ove datoteke kako bi ste na istoj vje¾bali + (ako ste pokrenuli "vimtutor" ovo je veæ kopija). + + Vrlo je va¾no primijetiti da je ovaj priruènik namijenjen za vje¾banje. + Preciznije, morate izvr¹iti naredbe u Vim-u kako bi ste iste nauèili + pravilno koristiti. Ako samo èitate tekst, zaboraviti æe te naredbe! + + Ako je CapsLock ukljuèen ISKLJUÈITE ga. Pritiskajte tipku j kako + bi pomakli kursor sve dok Lekcija 1.1 ne ispuni ekran. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 1.1: POMICANJE KURSORA + + + ** Za pomicanje kursora, pritisnite h,j,k,l tipke kako je prikazano ** + ^ + k Savjet: h tipka je lijevo i pomièe kursor lijevo. + < h l > l tipka je desno i pomièe kursor desno. + j j izgleda kao strelica usmjerena dolje. + v + 1. Pomièite kursor po ekranu dok se ne naviknete na kori¹tenje. + + 2. Dr¾ite tipku (j) pritisnutom. + Sada znate kako doæi do sljedeæe lekcije. + + 3. Koristeæi tipku j prijeðite na sljedeæu lekciju 1.2. + +NAPOMENA: Ako niste sigurni ¹to ste zapravo pritisnuli uvijek koristite + tipku kako bi pre¹li u Normal mod i onda poku¹ajte ponovno. + +NAPOMENA: Kursorske tipke rade isto. Kori¹tenje hjkl tipaka je znatno + br¾e, nakon ¹to se jednom naviknete na njihovo kori¹tenje. Stvarno! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 1.2: IZLAZ IZ VIM-a + + + !! UPOZORENJE: Prije izvoðenja bilo kojeg koraka, + proèitajte cijelu lekciju!! + + 1. Pritisnite tipku (Vim je sada u Normal modu). + + 2. Otipkajte: :q! . + Izlaz iz editora, GUBE se sve napravljene promjene. + + 3. Kada se pojavi ljuska, utipkajte naredbu koja je pokrenula + ovaj priruènik: vimtutor + + 4. Ako ste upamtili ove korake, izvr¹ite ih redom od 1 do 3 + kako bi ponovno pokrenuli editor. + +NAPOMENA: :q! poni¹tava sve promjene koje ste napravili. + U sljedeæim lekcijama nauèit æe te kako promjene saèuvati. + + 5. Pomaknite kursor na Lekciju 1.3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 1.3: PROMJENA TEKSTA - BRISANJE + + + ** Pritisnite x za brisanje znaka pod kursorom. ** + + 1. Pomaknite kursor na liniju oznaèenu s --->. + + 2. Kako bi ste ispravili pogre¹ke, pomièite kursor dok se + ne bude nalazio na slovu kojeg trebate izbrisati. + + 3. Pritisnite tipku x kako bi uklonili ne¾eljeno slovo. + + 4. Ponovite korake od 2 do 4 dok ne ispravite sve pogre¹ke. + +---> KKKravaa jee presskoèila mmjeseccc. + + 5. Nakon ¹to ispravite liniju, prijeðite na lekciju 1.4. + +NAPOMENA: Koristeæi ovaj priruènik ne poku¹avajte pamtiti + veæ uèite primjenom. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 1.4: PROMJENA TEKSTA - UBACIVANJE + + + ** Pritisnite i za ubacivanje teksta ispred kursora. ** + + 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. + + 2. Kako bi napravili prvu liniju istovjetnoj drugoj, pomaknite + kursor na prvi znak POSLIJE kojeg æe te utipkati potreban tekst. + + 3. Pritisnite i te utipkajte potrebne nadopune. + + 4. Nakon ¹to ispravite pogre¹ku pritisnite kako bi vratili Vim + u Normal mod. Ponovite korake od 2 do 4 kako bi ispravili sve pogre¹ke. + +---> Nedje no teka od v lin. +---> Nedostaje ne¹to teksta od ove linije. + + 5. Prijeðite na sljedeæu lekciju. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 1.5: PROMJENA TEKSTA - DODAVANJE + + + ** Pritisnite A za dodavanje teksta. ** + + 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. + Nije va¾no na kojem se slovu nalazi kursor na toj liniji. + + 2. Pritisnite A i napravite potrebne promjene. + + 3. Nakon ¹to ste dodali tekst, pritisnite + za povratak u Normal mod. + + 4. Pomaknite kursor na drugu liniju oznaèenu s ---> + i ponovite korake 2 i 3 dok ne popravite tekst. + +---> Ima ne¹to teksta koji nedostaje n + Ima ne¹to teksta koji nedostaje na ovoj liniji. +---> Ima ne¹to teksta koji ne + Ima ne¹to teksta koji nedostaje ba¹ ovdje. + + 5. Prijeðite na lekciju 1.6. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 1.6: PROMJENA DATOTEKE + + + ** Koristite :wq za spremanje teksta i napu¹tanje Vim-a. ** + + !! UPOZORENJE: Prije izvr¹avanja bilo kojeg koraka, proèitajte lekciju!! + + 1. Izaðite iz programa kao sto ste napravili u lekciji 1.2: :q! + + 2. Iz ljuske utipkajte sljedeæu naredbu: vim tutor + 'vim' je naredba pokretanja Vim editora, 'tutor' je ime datoteke koju + ¾elite ureðivati. Koristite datoteku koju imate ovlasti mijenjati. + + 3. Ubacite i izbri¹ite tekst kao ¹to ste to napravili u lekcijama prije. + + 4. Saèuvajte promjenjeni tekst i izaðite iz Vim-a: :wq + + 5. Ponovno pokrenite vimtutor i nastavite èitati sa¾etak koji sljedi. + + 6. Nakon sto proèitate gornje korake i u potpunosti ih razumijete: + izvr¹ite ih. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 1 SA®ETAK + + + 1. Kursor se pomièe strelicama ili pomoæu hjkl tipaka. + h (lijevo) j (dolje) k (gore) l (desno) + + 2. Pokretanje Vim-a iz ljuske: vim IME_DATOTEKE + + 3. Izlaz: :q! sve promjene su izgubljene. + ILI: :wq promjene su saèuvane. + + 4. Brisanje znaka na kojem se nalazi kursor: x + + 5. Ubacivanja ili dodavanje teksta: + i utipkajte tekst unos ispred kursora + A utipkajte tekst dodavanje na kraju linije + +NAPOMENA: Tipkanjem tipke prebacuje Vim u Normal mod i + prekida ne¾eljenu ili djelomièno zavr¹enu naredbu. + +Nastavite èitati Lekciju 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2.1: NAREDBE BRISANJA + + + ** Tipkajte dw za brisanje rijeèi. ** + + 1. Pritisnite kako bi bili sigurni da je Vim u Normal modu. + + 2. Pomaknite kursor na liniju oznaèenu s --->. + + 3. Pomaknite kursor na poèetak rijeèi koju treba izbrisati. + + 4. Otipkajte dw kako bi uklonili rijeè. + +NAPOMENA: Vim æe prikazati slovo d na zadnjoj liniji kad ga otipkate. + Vim èeka da otipkate w . Ako je prikazano neko drugo slovo, + krivo ste otipkali; pritisnite i poku¹ajte ponovno. + +---> Neke rijeèi smije¹no ne pripadaju na papir ovoj reèenici. + + 5. Ponovite korake 3 i 4 dok ne ispravite reèenicu; + prijeðite na Lekciju 2.2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2.2: JO© BRISANJA + + + ** Otipkajte d$ za brisanje znakova do kraja linije. ** + + 1. Pritisnite kako bi bili + sigurni da je Vim u Normal modu. + + 2. Pomaknite kursor na liniju oznaèenu s --->. + + 3. Pomaknite kursor do kraja ispravne reèenice + (POSLJE prve . ). + + 4. Otipkajte d$ + kako bi izbrisali sve znakove do kraja linije. + +---> Netko je utipkao kraj ove linije dvaput. kraj ove linije dvaput. + + 5. Prijeðite na Lekciju 2.3 za bolje obja¹njenje. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2.3: UKRATKO O OPERATORIMA I POKRETIMA + + + Mnogo naredbi koje mijenjaju tekst se sastoje od operatora i pokreta. + Oblik naredbe brisanja sa d operatorom je sljedeæi: + + d pokret + + Pri èemu je: + d - operator brisanja. + pokret - ono na èemu æe se operacija izvr¹avati (navedeno u nastavku). + + Kratka lista pokreta: + w - sve do poèetka sljedeæe rijeèi, NE UKLJUÈUJUÆI prvo slovo. + e - sve do kraja trenutaène rijeèi, UKLJUÈUJUÆI zadnje slovo. + $ - sve do kraje linije, UKLJUÈUJUÆI zadnje slovo. + + Tipkanjem de æe se brisati od kursora do kraja rijeèi. + +NAPOMENA: Pritiskajuæi samo pokrete dok ste u Normal modu bez operatora æe + pomicati kursor kao ¹to je navedeno. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2.4: KORI©TENJE BROJANJA ZA POKRETE + + + ** Tipkanjem nekog broja prije pokreta, pokret se izvr¹ava toliko puta. ** + + 1. Pomaknite kursor na liniju oznaèenu s --->. + + 2. Otipkajte 2w da pomaknete kursor dvije rijeèi naprijed. + + 3. Otipkajte 3e da pomaknete kursor na kraj treæe rijeèi naprijed. + + 4. Otipkajte 0 (nulu) da pomaknete kursor na poèetak linije. + + 5. Ponovite korake 2 i 3 s nekim drugim brojevima. + +---> Reèenica sa rijeèima po kojoj mo¾ete pomicati kursor. + + 6. Prijeðite na Lekciju 2.5. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2.5: KORI©TENJE BROJANJA ZA VEÆE BRISANJE + + + ** Tipkanje broja N s operatorom ponavlja ga N-puta. ** + + U kombinaciji operatora brisanja i pokreta spomenutih iznad + ubacujete broj prije pokreta kako bi izbrisali vi¹e znakova: + + d broj pokret + + 1. Pomaknite kursor na prvo slovo u rijeèi sa VELIKIM SLOVIMA + oznaèenu s --->. + + 2. Otipkajte 2dw da izbri¹ete dvije rijeèi sa VELIKIM SLOVIMA + + 3. Ponovite korake 1 i 2 sa razlièitim brojevima da izbri¹ete + uzastopne rijeèi sa VELIKIM SLOVIMA sa samo jednom naredbom. + +---> ova ABCÈÆ DÐE linija FGHI JK LMN OP rijeèi je RS© TUVZ® popravljena. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2.6: OPERIRANJE NAD LINIJAMA + + + ** Otipkajte dd za brisanje cijele linije. ** + + Zbog uèestalosti brisanja cijelih linija, dizajneri Vi-a su odluèili da + je lak¹e brisati linije tipkanjem d dvaput. + + 1. Pomaknite kursor na drugu liniju u donjoj kitici. + 2. Otipkajte dd kako bi izbrisali liniju. + 3. Pomaknite kursor na èetvrtu liniju. + 4. Otipkajte 2dd kako bi izbrisali dvije linije. + +---> 1) Ru¾e su crvene, +---> 2) Pla¾a je super, +---> 3) Ljubice su plave, +---> 4) Imam auto, +---> 5) Satovi ukazuju vrijeme, +---> 6) ©eæer je sladak +---> 7) Kao i ti. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2.7: NAREDBA PONI©TENJA + + + ** Pritisnite u za poni¹tenje zadnje naredbe, U za cijelu liniju. ** + + 1. Pomaknite kursor na liniju oznaèenu s ---> i postavite kursor na prvu + pogre¹ku. + 2. Otipkajte x kako bi izbrisali prvi ne¾eljeni znak. + 3. Otipkajte u kako bi poni¹tili zadnju izvr¹enu naredbu. + 4. Ovaj put ispravite sve pogre¹ke na liniji koristeæi x naredbu. + 5. Sada utipkajte veliko U kako bi poni¹tili sve promjene + na liniji, vraæajuæi je u prija¹nje stanje. + 6. Sada utipkajte u nekoliko puta kako bi poni¹tili U + i prija¹nje naredbe. + 7. Sada utipkajte CTRL-R (dr¾eæi CTRL tipku pritisnutom dok + ne pritisnete R) nekoliko puta kako bi vratili promjene + (poni¹tili poni¹tenja). + +---> Poopravite pogre¹ke nna ovvoj liniji ii pooni¹titeee ih. + + 8. Vrlo korisne naredbe. Prijeðite na sa¾etak Lekcije 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2 SA®ETAK + + + 1. Brisanje od kursora do sljedeæe rijeèi: dw + 2. Brisanje od kursora do kraja linije: d$ + 3. Brisanje cijele linije: dd + + 4. Za ponavljanje pokreta prethodite mu broj: 2w + 5. Oblik naredbe mijenjanja: + operator [broj] pokret + gdje je: + operator - ¹to napraviti, npr. d za brisanje + [broj] - neobavezan broj ponavljanja pokreta + pokret - kretanje po tekstu po kojem se operira, + kao ¹to je: w (rijeè), $ (kraj linije), itd. + + 6. Postavljanje kursora na poèetak linije: 0 + + 7. Za poni¹tenje prethodnih promjena, pritisnite: u (malo u) + Za poni¹tenje svih promjena na liniji, pritisnite: U (veliko U) + Za vraæanja promjena, utipkajte: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 3.1: NAREDBA POSTAVI + + + ** p za unos prethodno izbrisanog teksta iza kursora. ** + + 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. + + 2. Otipkajte dd kako bi izbrisali liniju i spremili je u Vim registar. + + 3. Pomaknite kursor na liniju c), IZNAD linije koju trebate unijeti. + + 4. Otipkajte p kako bi postavili liniju ispod kursora. + + 5. Ponovite korake 2 do 4 kako bi postavili sve linije u pravilnom + rasporedu. + +---> d) Mo¾e¹ li i ti nauèiti? +---> b) Ljubice su plave, +---> c) Inteligencija je nauèena, +---> a) Ru¾e su crvene, + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 3.2: NAREDBA PROMJENE + + + ** Otipkajte rx za zamjenu slova ispod kursora sa slovom x . ** + + 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. + + 2. Pomaknite kursor tako da se nalazi na prvoj pogre¹ci. + + 3. Otipkajte r i nakon toga ispravan znak na tom mjestu. + + 4. Ponovite korake 2 i 3 sve dok prva + linije ne bude istovjetna drugoj. + +---> Kede ju ovu limija tupjana, natko je protuskao kruve tupke! +---> Kada je ova linija tipkana, netko je pritiskao krive tipke! + + 5. Prijeðite na Lekciju 3.2. + +NAPOMENA: Prisjetite da trebate uèiti vje¾banjem, ne pamæenjem. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 3.3: OPERATOR MIJENJANJA + + + ** Za mijenjanje do kraja rijeèi, istipkajte ce . ** + + 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. + + 2. Postavite kursor na a u lackmb. + + 3. Otipkajte ce i ispravite rijeè (u ovom sluèaju otipkajte inija ). + + 4. Pritisnite i pomaknite kursor na sljedeæi znak + kojeg je potrebno ispraviti. + + 5. Ponovite korake 3 i 4 sve dok prva reèenica ne postane istovjetna + drugoj. + +---> Ova lackmb ima nekoliko rjlcah koje trfcb mijdmlfsz. +---> Ova linija ima nekoliko rijeèi koje treba mijenjati. + +Primijetite da ce bri¹e rijeè i postavlja Vim u Insert mod. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 3.4: JO© MIJENJANJA KORI©TENJEM c + + + ** Naredba mijenjanja se koristi sa istim pokretima kao i brisanje. ** + + 1. Operator mijenjanja se koristi na isti naèin kao i operator brisanja: + + c [broj] pokret + + 2. Pokreti su isti, npr: w (rijeè) i $ (kraj linije). + + 3. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. + + 4. Pomaknite kursor na prvu pogre¹ku. + + 5. Otipkajte c$ i utipkajte ostatak linije tako da bude istovjetna + drugoj te pritisnite . + +---> Kraj ove linije treba pomoæ tako da izgleda kao linija ispod. +---> Kraj ove linije treba ispraviti kori¹tenjem c$ naredbe. + +NAPOMENA: Mo¾ete koristiti Backspace za ispravljanje gre¹aka. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 3 SA®ETAK + + + 1. Za postavljanje teksta koji je upravo izbrisan, pritisnite p . Ovo + postavlja tekst IZA kursora (ako je pak linija izbrisana tekst se + postavlja na liniju ispod kursora). + + 2. Za promjenu znaka na kojem se nalazi kursor, pritisnite r i nakon toga + ¾eljeni znak. + + 3. Operator mijenjanja dozvoljava promjenu teksta od kursora do pozicije do + koje dovede pokret. tj. Otipkajte ce za mijenjanje od kursora do kraja + rijeèi, c$ za mijenjanje od kursora do kraja linije. + + 4. Oblik naredbe mijenjanja: + + c [broj] pokret + +Prijeðite na sljedeæu lekciju. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 4.1: POZICIJA KURSORA I STATUS DATOTEKE + + ** CTRL-G za prikaz pozicije kursora u datoteci i status datoteke. + Pritisnite G za pomicanje kursora na neku liniju u datoteci. ** + +NAPOMENA: Proèitajte cijelu lekciju prije izvr¹enja bilo kojeg koraka!! + + 1. Dr¾ite Ctrl tipku pritisnutom i pritisnite g . Ukratko: CTRL-G. + Vim æe ispisati poruku na dnu ekrana sa imenom datoteke i pozicijom + kursora u datoteci. Zapamtite broj linije za 3. korak. + +NAPOMENA: Mo¾ete vidjeti poziciju kursora u donjem desnom kutu ako + je postavka 'ruler' aktivirana (obja¹njeno u 6. lekciji). + + 2. Pritisnite G za pomicanje kursora na kraj datoteke. + Otipkajte gg za pomicanje kursora na poèetak datoteke. + + 3. Otipkajte broj linije na kojoj ste bili maloprije i zatim G . Kursor + æe se vratiti na liniju na kojoj se nalazio kada ste otipkali CTRL-G. + + 4. Ako ste spremni, izvr¹ite korake od 1 do 3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 4.2: NAREDBE TRA®ENJA + + ** Otipkajte / i nakon toga izraz kojeg ¾elite tra¾iti. ** + + 1. U Normal modu otipkajte / znak. Primijetite da se znak + pojavio zajedno sa kursorom na dnu ekrana kao kod : naredbe. + + 2. Sada otipkajte 'grrrre¹ka' . To je rijeè koju zapravo tra¾ite. + + 3. Za ponovno tra¾enje istog izraza, otipkajte n . + Za tra¾enje istog izraza ali u suprotnom smjeru, otipkajte N . + + 4. Za tra¾enje izraza unatrag, koristite ? umjesto / . + + 5. Za povratak na prethodnu poziciju koristite CTRL-O (dr¾ite Ctrl + pritisnutim dok ne pritisnete tipku o). Ponavljajte sve dok se ne + vratite na poèetak. CTRL-I slièno kao CTRL-O ali u suprotnom smjeru. + +---> "pogrrrre¹ka" je pogre¹no; umjesto pogrrrre¹ka treba stajati pogre¹ka. + +NAPOMENA: Ako se tra¾enjem doðe do kraja datoteke nastavit æe se od njenog + poèetka osim ako je postavka 'wrapscan' deaktivirana. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 4.3: TRA®ENJE PRIPADAJUÆE ZAGRADE + + + ** Otipkajte % za pronalazak pripadajuæe ), ] ili } . ** + + 1. Postavite kursor na bilo koju od ( , [ ili { + otvorenih zagrada u liniji oznaèenoj s --->. + + 2. Otipkajte znak % . + + 3. Kursor æe se pomaknuti na pripadajuæu zatvorenu zagradu. + + 4. Otipkajte % kako bi pomakli kursor na drugu pripadajuæu zagradu. + + 5. Pomaknite kursor na neku od (,),[,],{ ili } i ponovite % naredbu. + +---> Linija ( testiranja obiènih ( [ uglatih ] i { vitièastih } zagrada.)) + + +NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadajuæim zagradama! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 4.4: NAREDBE ZAMIJENE + + + ** Otipkajte :s/staro/novo/g da zamijenite 'staro' za 'novo'. ** + + 1. Pomaknite kursor na liniju oznaèenu s --->. + + 2. Otipkajte :s/cvræè/cvrè . Primjetite da ova naredba zamjenjuje + samo prvi "cvræè" u liniji. + + 3. Otipkajte :s/cvræè/cvrè/g . Dodavanje g stavke znaèi da æe se naredba + izvr¹iti na cijeloj liniji, zamjenjivanjem svih "cvræè" u liniji. + +---> i cvræèi cvræèi cvræèak na èvoru crne smrèe. + + 4. Za zamjenu svih izraza u rasponu dviju linija, + otipkajte :#,#s/staro/novo/g #,# su brojevi linije datoteke na kojima + te izmeðu njih æe se izvr¹iti zamjena. + Otipkajte :%s/staro/novo/g za zamjenu svih izraza u cijeloj datoteci. + Otipkajte :%s/staro/novo/gc za pronalazak svakog izraza u datoteci i + potvrdu zamjene. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 4 SA®ETAK + + + 1. CTRL-G prikazuje poziciju kursora u datoteci i status datoteke. + G postavlja kursor na zadnju liniju datoteke. + broj G postavlja kursor na broj liniju. + gg postavlja kursor na prvu liniju. + + 2. Tipkanje / sa izrazom tra¾i UNAPRIJED taj izraz. + Tipkanje ? sa izrazom tra¾i UNATRAG taj izraz. + Nakon naredbe tra¾enja koristite n za pronalazak izraza u istom + smjeru, i N za pronalazak istog izraza ali u suprotnom smjeru. + CTRL-O vraæa kursor na prethodnu poziciju, CTRL-I na sljedeæu poziciju. + + 3. Tipkanje % dok je kursor na zagradi pomièe ga na pripadajuæu zagradu. + + 4. Za zamjenu prvog izraza staro za izraz novo :s/staro/novo + Za zamjenu svih izraza staro na cijeloj liniji :s/staro/novo/g + Za zamjenu svih izraza staro u rasponu linija #,# :#,#s/staro/novo/g + Za zamjenu u cijeloj datoteci :%s/staro/novo/g + Za potvrdu svake zamjene dodajte 'c' :%s/staro/novo/gc + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 5.1: IZVR©AVANJE VANJSKIH NAREDBI + + + ** Otipkajte :! sa vanjskom naredbom koju ¾elite izvr¹iti. ** + + 1. Otipkajte poznatu naredbu : kako bi kursor premjestili na dno + ekrana. Time omoguæavate unos naredbe u naredbenoj liniji. + + 2. Otipkajte znak ! (uskliènik). Tako omoguæavate + izvr¹avanje naredbe vanjske ljuske. + + 3. Kao primjer otipkajte ls nakon ! te pritisnite . + Ovo æe prikazati sadr¾aj direktorija, kao da ste u ljusci. + Koristite :!dir ako :!ls ne radi. + +NAPOMENA: Moguæe je izvr¹avati bilo koju vanjsku naredbu na ovaj naèin, + zajedno sa njenim argumentima. + +NAPOMENA: Sve : naredbe se izvr¹avaju nakon ¹to pritisnete + U daljnjem tekstu to neæe uvijek biti napomenuto. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 5.2: VI©E O SPREMANJU DATOTEKA + + ** Za spremanje promjena, otipkajte :w IME_DATOTEKE. ** + + 1. Otipkajte :!dir ili :!ls za pregled direktorija. + Veæ znate da morate pritisnuti na kraju tipkanja. + + 2. Izaberite ime datoteke koja jo¹ ne postoji, npr. TEST. + + 3. Otipkajte: :w TEST (gdje je TEST ime koje ste prethodno odabrali.) + + 4. Time æe te spremiti cijelu datoteku (Vim Tutor) pod imenom TEST. + Za provjeru, otipkajte ponovno :!dir ili :!ls + za pregled direktorija. + +NAPOMENA: Ako bi napustili Vim i ponovno ga pokrenuli sa vim TEST , + datoteka bi bila potpuna kopija ove datoteke u trenutku + kada ste je spremili. + + 5. Izbri¹ite datoteku tako da otipkate (MS-DOS): :!del TEST + ili (Unix): :!rm TEST + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 5.3: SPREMANJE OZNAÈENOG TEKSTA + + + ** Kako bi spremili dio datoteke, otipkajte v pokret :w IME_DATOTEKE ** + + 1. Pomaknite kursor na ovu liniju. + + 2. Pritisnite v i pomaknite kursor pet linija ispod ove. + Primijetite promjenu, oznaèeni tekst se razlikuje od obiènog. + + 3. Pritisnite : znak. Na dnu ekrana pojavit æe se :'<,'> . + + 4. Otipkajte w TEST , pritom je TEST ime datoteke koja jo¹ ne postoji. + Provjerite da zaista pi¹e :'<,'>w TEST + prije nego ¹to pritisnite . + + 5. Vim æe spremiti oznaèeni tekst u TEST. Provjerite sa :!dir ili !ls . + Nemojte je jo¹ brisati! Koristiti æe te je u sljedeæoj lekciji. + +NAPOMENA: Tipka v zapoèinje Vizualno oznaèavanje. Mo¾ete pomicati kursor + unaokolo kako bi mijenjali velièinu oznaèenog teksta. Mo¾ete + koristiti i operatore. Npr, d æe izbrisati oznaèeni tekst. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 5.4: UÈITAVANJE DATOTEKA + + + ** Za ubacivanje sadr¾aja datoteke, otipkajte :r IME_DATOTEKE ** + + 1. Postavite kursor iznad ove linije. + +NAPOMENA: Nakon ¹to izvr¹ite 2. korak vidjeti æe te tekst iz Lekcije 5.3. + Stoga pomaknite kursor DOLJE kako bi ponovno vidjeli ovu lekciju. + + 2. Uèitajte va¹u TEST datoteku koristeæi naredbu :r TEST + gdje je TEST ime datoteke koju ste koristili u prethodnoj lekciji. + Sadr¾aj uèitane datoteke je ubaèen liniju ispod kursora. + + 3. Kako bi provjerili da je datoteka uèitana, vratite kursor unatrag i + primijetite dvije kopije Lekcije 5.3, originalnu i onu iz datoteke. + +NAPOMENA: Mo¾ete takoðer uèitati ispis vanjske naredbe. Npr, :r !ls + æe uèitati ispis ls naredbe i postaviti ispis liniju ispod + kursora. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 5 SA®ETAK + + + 1. :!naredba izvr¹ava vanjsku naredbu. + + Korisni primjeri: + (MS-DOS) (Unix) + :!dir :!ls - pregled direktorija. + :!del DATOTEKA :!rm DATOTEKA - bri¹e datoteku DATOTEKA. + + 2. :w DATOTEKA zapisuje trenutaènu datoteku na disk sa imenom DATOTEKA. + + 3. v pokret :w IME_DATOTEKE sprema vizualno oznaèene linije u + datoteku IME_DATOTEKE. + + 4. :r IME_DATOTEKE uèitava datoteku IME_DATOTEKE sa diska i stavlja + njen sadr¾aj liniju ispod kursora. + + 5. :r !dir uèitava ispis naredbe dir i postavlja sadr¾aj ispisa liniju + ispod kursora. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 6.1: NAREDBA OTVORI + + + ** Pritisnite o kako bi otvorili liniju ispod kursora + i pre¹li u Insert mod. ** + + 1. Pomaknite kursor na sljedeæu liniju oznaèenu s --->. + + 2. Otipkajte malo o kako bi otvorili novu liniju ISPOD kursora + i pre¹li u Insert mod. + + 3. Otipkajte ne¹to teksta i nakon toga pritisnite + kako bi napustili Insert mod. + +---> Nakon ¹to pritisnete o kursor æe preæi u novu liniju u Insert mod. + + 4. Za otvaranje linije IZNAD kursora, otipkajte umjesto malog o veliko O , + Poku¹ajte na donjoj liniji oznaèenoj s --->. + +---> Otvorite liniju iznad ove - otipkajte O dok je kursor na ovoj liniji. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 6.2: NAREDBA DODAJ + + + ** Otipkajte a za dodavanje teksta IZA kursora. ** + + 1. Pomaknite kursor na poèetak sljedeæe linije oznaèene s --->. + + 2. Tipkajte e dok se kursor ne nalazi na kraju li . + + 3. Otipkajte a (malo) kako bi dodali tekst IZA kursora. + + 4. Dopunite rijeè kao ¹to je na liniji ispod. + Pritisnite za izlaz iz Insert moda. + + 5. Sa e prijeðite na sljedeæu nepotpunu rijeè i ponovite korake 3 i 4. + +---> Ova li omoguæava vje dodav teksta nekoj liniji. +---> Ova linija omoguæava vje¾banje dodavanja teksta nekoj liniji. + +NAPOMENA: Sa i, a, i A prelazite u isti Insert mod, jedina + razlika je u poziciji od koje æe se tekst ubacivati. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 6.3: DRUGI NAÈIN MIJENJANJA + + + ** Otipkajte veliko R kako bi zamijelili vi¹e od jednog znaka. ** + + 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. + Pomaknite kursor na poèetak prvog xxx . + + 2. Pritisnite R i otipkajte broj koji je liniju ispod, + tako da zamijeni xxx . + + 3. Pritisnite za izlaz iz Replace moda. + Primijetite da je ostatak linije ostao nepromjenjen. + + 5. Ponovite korake kako bi zamijenili preostali xxx. + +---> Zbrajanje: 123 plus xxx je xxx. +---> Zbrajanje: 123 plus 456 je 579. + +NAPOMENA: Replace mod je kao Insert mod, ali sa bitnom razlikom, + svaki otipkani znak bri¹e veæ postojeæi. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 6.4: KOPIRANJE I LIJEPLJENJE TEKSTA + + + ** Koristite y operator za kopiranje a p za lijepljenje teksta. ** + + 1. Pomaknite kursor na liniju s ---> i postavite kursor nakon "a)". + + 2. Pokrenite Visual mod sa v i pomaknite kursor sve do ispred "prva". + + 3. Pritisnite y kako bi kopirali oznaèeni tekst. + + 4. Pomaknite kursor do kraja sljedeæe linije: j$ + + 5. Pritisnite p kako bi zalijepili tekst. Onda utipkajte: druga . + + 6. Koristite Visual mod kako bi oznaèili " linija.", kopirajte: y , kursor + postavite na kraj sljedeæe linije: j$ i ondje zalijepite tekst: p . + +---> a) ovo je prva linija. + b) + +NAPOMENA: mo¾ete koristiti y kao operator; yw kopira jednu rijeè. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 6.5: MIJENJANJE POSTAVKI + + + ** Postavka: naredbe tra¾enja i zamijene ne razlikuju VELIKA i mala slova ** + + 1. Potra¾ite 'razlika' tipkanjem: /razlika + Nekoliko puta ponovite pritiskanjem n . + + 2. Aktivirajte 'ic' (Ignore case) postavku: :set ic + + 3. Ponovno potra¾ite 'razlika' tipkanjem n + Primijetite da su sada i RAZLIKA i Razlika pronaðeni. + + 4. Aktivirajte 'hlsearch' i 'incsearch' postavke: :set hls is + + 5. Otipkajte naredbu tra¾enja i primijetite razlike: /razlika + + 6. Za deaktiviranje ic postavke koristite: :set noic + +NAPOMENA: Za neoznaèavanje pronaðenih izraza otipkajte: :nohlsearch +NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi + koristite \c u izrazu: /razlika\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 6 SA®ETAK + + 1. Pritisnite o za otvaranje linije ISPOD kursora i prelazak u Insert mod. + Pritisnite O za otvaranje linije IZNAD kursora. + + 2. Pritisnite a za unos teksta IZA kursora. + Pritisnite A za unos teksta na kraju linije. + + 3. Naredba e pomièe kursor na kraj rijeèi. + + 4. Operator y kopira tekst, p ga lijepi. + + 5. Tipkanjem velikog R Vim prelazi u Replace mod dok ne pritisnete . + + 6. Tipkanjem ":set xxx" aktivira postavku "xxx". Neke postavke su: + 'ic' 'ignorecase' ne razlikuje velika/mala slova pri tra¾enju + 'is' 'incsearch' tra¾i nedovr¹ene izraze + 'hls' 'hlsearch' oznaèi sve pronaðene izraze + Mo¾ete koristite dugo ili kratko ime postavke. + + 7. Prethodite "no" imenu postavke za deaktiviranje iste: :set noic + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 7.1: DOBIVANJE POMOÆI + + + ** Koristite on-line sustav pomoæi ** + + Vim ima detaljan on-line sustav pomoæi. + Za poèetak, poku¹ajte jedno od sljedeæeg: + - pritisnite tipku (ako je va¹a tipkovnica ima) + - pritisnite tipku (ako je va¹a tipkovnica ima) + - utipkajte :help + + Proèitajte tekst u prozoru pomoæi kako bi ste se znali slu¾iti istom. + Tipkanjem CTRL-W CTRL-W prelazite iz jednog prozora u drugi. + Otipkajte :q kako bi zatvorili prozor pomoæi. + + Pronaæi æe te pomoæ o bilo kojoj temi, tako da dodate upit samoj + ":help" naredbi. Poku¹ajte (ne zaboravite pritisnuti ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 7.2: PRAVLJENJE SKRIPTE + + + ** Aktivirajte Vim moguænosti ** + + Vim ima mnogo vi¹e alata od Vi-ja, ali veæina njih nije aktivirana. + Kako bi mogli koristiti vi¹e moguænosti napravite "vimrc" datoteku. + + 1. Uredite "vimrc" datoteku. Ovo ovisi o va¹em sistemu: + :e ~/.vimrc za Unix + :e $VIM/_vimrc za MS-Windows + + 2. Sada uèitajte primjer sadr¾aja "vimrc" datoteke: + :r $VIMRUNTIME/vimrc_example.vim + + 3. Saèuvajte datoteku sa: + :w + + Sljedeæeg puta kada pokrenete Vim, bojanje sintakse teksta biti æe + aktivirano. Sve va¹e postavke mo¾ete dodati u "vimrc" datoteku. + Za vi¹e informacija otipkajte :help vimrc-intro + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 7.3: AUTOMATSKO DOVR©AVANJE + + + ** Dovr¹avanje iz naredbene linije pomoæu CTRL-D i ** + + 1. Provjerite da Vim nije u Vi modu: :set nocp + + 2. Pogledajte koje datoteke postoje u direktoriju: :!ls or :!dir + + 3. Otipkajte poèetak naredbe: :e + + 4. Tipkajte CTRL-D i prikazati æe se lista naredbi koje zapoèinju sa "e". + + 5. Pritisnite i Vim æe dopuniti unos u naredbu ":edit". + + 6. Dodajte razmak i poèetak datoteke: :edit FIL + + 7. Pritisnite . Vim æe nadopuniti ime datoteke (ako je jedinstveno). + +NAPOMENA: Moguæe je dopuniti mnoge naredbe. Koristite CTRL-D i . + Naroèito je korisno za :help naredbe. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 7 SA®ETAK + + + 1. Otipkajte :help ili pritisnite ili za pomoæ. + + 2. Otipkajte :help naredba kako bi dobili pomoæ za naredba . + + 3. Otipkajte CTRL-W CTRL-W za prelazak u drugi prozor + + 4. Otipkajte :q kako bi zatvorili prozor pomoæi + + 5. Napravite vimrc skriptu za podizanje kako bi u nju spremali + va¹e omiljene postavke. + + 6. Kada tipkate naredbu koja zapoèinje sa : + pritisnite CTRL-D kako bi vidjeli moguæe valjane vrijednosti. + Pritisnite kako bi odabrali jednu od njih. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Kraj. Cilj priruènika je da poka¾e kratak pregled Vim editora, tek toliko + da omoguæi njegovo kori¹tenje. Priruènik nije potpun jer Vim ima mnogo vi¹e + naredbi. Za vi¹e informacija: ":help user-manual". + + Za èitanje i kori¹tenje, preporuèamo: + Vim - Vi Improved - by Steve Oualline + Izdavaè: New Riders + Prva knjiga potpuno posveæena Vim-u. Vrlo korisna za poèetnike. + Sa mnogo primjera i slika. + Posjetite http://iccf-holland.org/click5.html + + Sljedeæa knjiga je ne¹to starija i vi¹e o Vi-u nego o Vim-u, preporuèamo: + Learning the Vi Editor - by Linda Lamb + Izdavaè: O'Reilly & Associates Inc. + Solidna knjiga, mo¾ete saznati skoro sve ¹to mo¾ete napraviti + u Vi-u. ©esto izdanje ima ne¹to informacija i o Vim-u. + + Ovaj priruènik su napisali: Michael C. Pierce i Robert K. Ware, + Colorado School of Mines koristeæi ideje Charles Smith, + Colorado State University. E-po¹ta: bware@mines.colorado.edu. + + Naknadne promjene napravio je Bram Moolenaar. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Preveo na hrvatski: Paul B. Mahol + Preinaka 1.42, Lipanj 2008 + + diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.hr.cp1250 b/vim/bundle/ubuntu-vim72/tutor/tutor.hr.cp1250 new file mode 100644 index 0000000..92771ab --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.hr.cp1250 @@ -0,0 +1,972 @@ +=============================================================================== += D o b r o d o š l i u VIM p r i r u è n i k - Verzija 1.7 = +=============================================================================== + + Vim je vrlo moæan editor koji ima mnogo naredbi, previše da bi ih + se svih ovdje spomenulo. Namjena priruènika je objasniti dovoljno + naredbi kako bi poèetnici znatno lakše koristili ovaj svestran editor. + + Približno vrijeme potrebno za uspješan završetak priruènika je oko + 30 minuta a ovisi o tome koliko æe te vremena odvojiti za vježbanje. + + UPOZORENJE: + Naredbe u ovom priruèniku æe promijeniti ovaj tekst. + Napravite kopiju ove datoteke kako bi ste na istoj vježbali + (ako ste pokrenuli "vimtutor" ovo je veæ kopija). + + Vrlo je važno primijetiti da je ovaj priruènik namijenjen za vježbanje. + Preciznije, morate izvršiti naredbe u Vim-u kako bi ste iste nauèili + pravilno koristiti. Ako samo èitate tekst, zaboraviti æe te naredbe! + + Ako je CapsLock ukljuèen ISKLJUÈITE ga. Pritiskajte tipku j kako + bi pomakli kursor sve dok Lekcija 1.1 ne ispuni ekran. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 1.1: POMICANJE KURSORA + + + ** Za pomicanje kursora, pritisnite h,j,k,l tipke kako je prikazano ** + ^ + k Savjet: h tipka je lijevo i pomièe kursor lijevo. + < h l > l tipka je desno i pomièe kursor desno. + j j izgleda kao strelica usmjerena dolje. + v + 1. Pomièite kursor po ekranu dok se ne naviknete na korištenje. + + 2. Držite tipku (j) pritisnutom. + Sada znate kako doæi do sljedeæe lekcije. + + 3. Koristeæi tipku j prijeðite na sljedeæu lekciju 1.2. + +NAPOMENA: Ako niste sigurni što ste zapravo pritisnuli uvijek koristite + tipku kako bi prešli u Normal mod i onda pokušajte ponovno. + +NAPOMENA: Kursorske tipke rade isto. Korištenje hjkl tipaka je znatno + brže, nakon što se jednom naviknete na njihovo korištenje. Stvarno! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 1.2: IZLAZ IZ VIM-a + + + !! UPOZORENJE: Prije izvoðenja bilo kojeg koraka, + proèitajte cijelu lekciju!! + + 1. Pritisnite tipku (Vim je sada u Normal modu). + + 2. Otipkajte: :q! . + Izlaz iz editora, GUBE se sve napravljene promjene. + + 3. Kada se pojavi ljuska, utipkajte naredbu koja je pokrenula + ovaj priruènik: vimtutor + + 4. Ako ste upamtili ove korake, izvršite ih redom od 1 do 3 + kako bi ponovno pokrenuli editor. + +NAPOMENA: :q! poništava sve promjene koje ste napravili. + U sljedeæim lekcijama nauèit æe te kako promjene saèuvati. + + 5. Pomaknite kursor na Lekciju 1.3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 1.3: PROMJENA TEKSTA - BRISANJE + + + ** Pritisnite x za brisanje znaka pod kursorom. ** + + 1. Pomaknite kursor na liniju oznaèenu s --->. + + 2. Kako bi ste ispravili pogreške, pomièite kursor dok se + ne bude nalazio na slovu kojeg trebate izbrisati. + + 3. Pritisnite tipku x kako bi uklonili neželjeno slovo. + + 4. Ponovite korake od 2 do 4 dok ne ispravite sve pogreške. + +---> KKKravaa jee presskoèila mmjeseccc. + + 5. Nakon što ispravite liniju, prijeðite na lekciju 1.4. + +NAPOMENA: Koristeæi ovaj priruènik ne pokušavajte pamtiti + veæ uèite primjenom. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 1.4: PROMJENA TEKSTA - UBACIVANJE + + + ** Pritisnite i za ubacivanje teksta ispred kursora. ** + + 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. + + 2. Kako bi napravili prvu liniju istovjetnoj drugoj, pomaknite + kursor na prvi znak POSLIJE kojeg æe te utipkati potreban tekst. + + 3. Pritisnite i te utipkajte potrebne nadopune. + + 4. Nakon što ispravite pogrešku pritisnite kako bi vratili Vim + u Normal mod. Ponovite korake od 2 do 4 kako bi ispravili sve pogreške. + +---> Nedje no teka od v lin. +---> Nedostaje nešto teksta od ove linije. + + 5. Prijeðite na sljedeæu lekciju. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 1.5: PROMJENA TEKSTA - DODAVANJE + + + ** Pritisnite A za dodavanje teksta. ** + + 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. + Nije važno na kojem se slovu nalazi kursor na toj liniji. + + 2. Pritisnite A i napravite potrebne promjene. + + 3. Nakon što ste dodali tekst, pritisnite + za povratak u Normal mod. + + 4. Pomaknite kursor na drugu liniju oznaèenu s ---> + i ponovite korake 2 i 3 dok ne popravite tekst. + +---> Ima nešto teksta koji nedostaje n + Ima nešto teksta koji nedostaje na ovoj liniji. +---> Ima nešto teksta koji ne + Ima nešto teksta koji nedostaje baš ovdje. + + 5. Prijeðite na lekciju 1.6. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 1.6: PROMJENA DATOTEKE + + + ** Koristite :wq za spremanje teksta i napuštanje Vim-a. ** + + !! UPOZORENJE: Prije izvršavanja bilo kojeg koraka, proèitajte lekciju!! + + 1. Izaðite iz programa kao sto ste napravili u lekciji 1.2: :q! + + 2. Iz ljuske utipkajte sljedeæu naredbu: vim tutor + 'vim' je naredba pokretanja Vim editora, 'tutor' je ime datoteke koju + želite ureðivati. Koristite datoteku koju imate ovlasti mijenjati. + + 3. Ubacite i izbrišite tekst kao što ste to napravili u lekcijama prije. + + 4. Saèuvajte promjenjeni tekst i izaðite iz Vim-a: :wq + + 5. Ponovno pokrenite vimtutor i nastavite èitati sažetak koji sljedi. + + 6. Nakon sto proèitate gornje korake i u potpunosti ih razumijete: + izvršite ih. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 1 SAŽETAK + + + 1. Kursor se pomièe strelicama ili pomoæu hjkl tipaka. + h (lijevo) j (dolje) k (gore) l (desno) + + 2. Pokretanje Vim-a iz ljuske: vim IME_DATOTEKE + + 3. Izlaz: :q! sve promjene su izgubljene. + ILI: :wq promjene su saèuvane. + + 4. Brisanje znaka na kojem se nalazi kursor: x + + 5. Ubacivanja ili dodavanje teksta: + i utipkajte tekst unos ispred kursora + A utipkajte tekst dodavanje na kraju linije + +NAPOMENA: Tipkanjem tipke prebacuje Vim u Normal mod i + prekida neželjenu ili djelomièno završenu naredbu. + +Nastavite èitati Lekciju 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2.1: NAREDBE BRISANJA + + + ** Tipkajte dw za brisanje rijeèi. ** + + 1. Pritisnite kako bi bili sigurni da je Vim u Normal modu. + + 2. Pomaknite kursor na liniju oznaèenu s --->. + + 3. Pomaknite kursor na poèetak rijeèi koju treba izbrisati. + + 4. Otipkajte dw kako bi uklonili rijeè. + +NAPOMENA: Vim æe prikazati slovo d na zadnjoj liniji kad ga otipkate. + Vim èeka da otipkate w . Ako je prikazano neko drugo slovo, + krivo ste otipkali; pritisnite i pokušajte ponovno. + +---> Neke rijeèi smiješno ne pripadaju na papir ovoj reèenici. + + 5. Ponovite korake 3 i 4 dok ne ispravite reèenicu; + prijeðite na Lekciju 2.2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2.2: JOŠ BRISANJA + + + ** Otipkajte d$ za brisanje znakova do kraja linije. ** + + 1. Pritisnite kako bi bili + sigurni da je Vim u Normal modu. + + 2. Pomaknite kursor na liniju oznaèenu s --->. + + 3. Pomaknite kursor do kraja ispravne reèenice + (POSLJE prve . ). + + 4. Otipkajte d$ + kako bi izbrisali sve znakove do kraja linije. + +---> Netko je utipkao kraj ove linije dvaput. kraj ove linije dvaput. + + 5. Prijeðite na Lekciju 2.3 za bolje objašnjenje. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2.3: UKRATKO O OPERATORIMA I POKRETIMA + + + Mnogo naredbi koje mijenjaju tekst se sastoje od operatora i pokreta. + Oblik naredbe brisanja sa d operatorom je sljedeæi: + + d pokret + + Pri èemu je: + d - operator brisanja. + pokret - ono na èemu æe se operacija izvršavati (navedeno u nastavku). + + Kratka lista pokreta: + w - sve do poèetka sljedeæe rijeèi, NE UKLJUÈUJUÆI prvo slovo. + e - sve do kraja trenutaène rijeèi, UKLJUÈUJUÆI zadnje slovo. + $ - sve do kraje linije, UKLJUÈUJUÆI zadnje slovo. + + Tipkanjem de æe se brisati od kursora do kraja rijeèi. + +NAPOMENA: Pritiskajuæi samo pokrete dok ste u Normal modu bez operatora æe + pomicati kursor kao što je navedeno. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2.4: KORIŠTENJE BROJANJA ZA POKRETE + + + ** Tipkanjem nekog broja prije pokreta, pokret se izvršava toliko puta. ** + + 1. Pomaknite kursor na liniju oznaèenu s --->. + + 2. Otipkajte 2w da pomaknete kursor dvije rijeèi naprijed. + + 3. Otipkajte 3e da pomaknete kursor na kraj treæe rijeèi naprijed. + + 4. Otipkajte 0 (nulu) da pomaknete kursor na poèetak linije. + + 5. Ponovite korake 2 i 3 s nekim drugim brojevima. + +---> Reèenica sa rijeèima po kojoj možete pomicati kursor. + + 6. Prijeðite na Lekciju 2.5. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2.5: KORIŠTENJE BROJANJA ZA VEÆE BRISANJE + + + ** Tipkanje broja N s operatorom ponavlja ga N-puta. ** + + U kombinaciji operatora brisanja i pokreta spomenutih iznad + ubacujete broj prije pokreta kako bi izbrisali više znakova: + + d broj pokret + + 1. Pomaknite kursor na prvo slovo u rijeèi sa VELIKIM SLOVIMA + oznaèenu s --->. + + 2. Otipkajte 2dw da izbrišete dvije rijeèi sa VELIKIM SLOVIMA + + 3. Ponovite korake 1 i 2 sa razlièitim brojevima da izbrišete + uzastopne rijeèi sa VELIKIM SLOVIMA sa samo jednom naredbom. + +---> ova ABCÈÆ DÐE linija FGHI JK LMN OP rijeèi je RSŠ TUVZŽ popravljena. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2.6: OPERIRANJE NAD LINIJAMA + + + ** Otipkajte dd za brisanje cijele linije. ** + + Zbog uèestalosti brisanja cijelih linija, dizajneri Vi-a su odluèili da + je lakše brisati linije tipkanjem d dvaput. + + 1. Pomaknite kursor na drugu liniju u donjoj kitici. + 2. Otipkajte dd kako bi izbrisali liniju. + 3. Pomaknite kursor na èetvrtu liniju. + 4. Otipkajte 2dd kako bi izbrisali dvije linije. + +---> 1) Ruže su crvene, +---> 2) Plaža je super, +---> 3) Ljubice su plave, +---> 4) Imam auto, +---> 5) Satovi ukazuju vrijeme, +---> 6) Šeæer je sladak +---> 7) Kao i ti. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2.7: NAREDBA PONIŠTENJA + + + ** Pritisnite u za poništenje zadnje naredbe, U za cijelu liniju. ** + + 1. Pomaknite kursor na liniju oznaèenu s ---> i postavite kursor na prvu + pogrešku. + 2. Otipkajte x kako bi izbrisali prvi neželjeni znak. + 3. Otipkajte u kako bi poništili zadnju izvršenu naredbu. + 4. Ovaj put ispravite sve pogreške na liniji koristeæi x naredbu. + 5. Sada utipkajte veliko U kako bi poništili sve promjene + na liniji, vraæajuæi je u prijašnje stanje. + 6. Sada utipkajte u nekoliko puta kako bi poništili U + i prijašnje naredbe. + 7. Sada utipkajte CTRL-R (držeæi CTRL tipku pritisnutom dok + ne pritisnete R) nekoliko puta kako bi vratili promjene + (poništili poništenja). + +---> Poopravite pogreške nna ovvoj liniji ii pooništiteee ih. + + 8. Vrlo korisne naredbe. Prijeðite na sažetak Lekcije 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2 SAŽETAK + + + 1. Brisanje od kursora do sljedeæe rijeèi: dw + 2. Brisanje od kursora do kraja linije: d$ + 3. Brisanje cijele linije: dd + + 4. Za ponavljanje pokreta prethodite mu broj: 2w + 5. Oblik naredbe mijenjanja: + operator [broj] pokret + gdje je: + operator - što napraviti, npr. d za brisanje + [broj] - neobavezan broj ponavljanja pokreta + pokret - kretanje po tekstu po kojem se operira, + kao što je: w (rijeè), $ (kraj linije), itd. + + 6. Postavljanje kursora na poèetak linije: 0 + + 7. Za poništenje prethodnih promjena, pritisnite: u (malo u) + Za poništenje svih promjena na liniji, pritisnite: U (veliko U) + Za vraæanja promjena, utipkajte: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 3.1: NAREDBA POSTAVI + + + ** p za unos prethodno izbrisanog teksta iza kursora. ** + + 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. + + 2. Otipkajte dd kako bi izbrisali liniju i spremili je u Vim registar. + + 3. Pomaknite kursor na liniju c), IZNAD linije koju trebate unijeti. + + 4. Otipkajte p kako bi postavili liniju ispod kursora. + + 5. Ponovite korake 2 do 4 kako bi postavili sve linije u pravilnom + rasporedu. + +---> d) Možeš li i ti nauèiti? +---> b) Ljubice su plave, +---> c) Inteligencija je nauèena, +---> a) Ruže su crvene, + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 3.2: NAREDBA PROMJENE + + + ** Otipkajte rx za zamjenu slova ispod kursora sa slovom x . ** + + 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. + + 2. Pomaknite kursor tako da se nalazi na prvoj pogrešci. + + 3. Otipkajte r i nakon toga ispravan znak na tom mjestu. + + 4. Ponovite korake 2 i 3 sve dok prva + linije ne bude istovjetna drugoj. + +---> Kede ju ovu limija tupjana, natko je protuskao kruve tupke! +---> Kada je ova linija tipkana, netko je pritiskao krive tipke! + + 5. Prijeðite na Lekciju 3.2. + +NAPOMENA: Prisjetite da trebate uèiti vježbanjem, ne pamæenjem. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 3.3: OPERATOR MIJENJANJA + + + ** Za mijenjanje do kraja rijeèi, istipkajte ce . ** + + 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. + + 2. Postavite kursor na a u lackmb. + + 3. Otipkajte ce i ispravite rijeè (u ovom sluèaju otipkajte inija ). + + 4. Pritisnite i pomaknite kursor na sljedeæi znak + kojeg je potrebno ispraviti. + + 5. Ponovite korake 3 i 4 sve dok prva reèenica ne postane istovjetna + drugoj. + +---> Ova lackmb ima nekoliko rjlcah koje trfcb mijdmlfsz. +---> Ova linija ima nekoliko rijeèi koje treba mijenjati. + +Primijetite da ce briše rijeè i postavlja Vim u Insert mod. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 3.4: JOŠ MIJENJANJA KORIŠTENJEM c + + + ** Naredba mijenjanja se koristi sa istim pokretima kao i brisanje. ** + + 1. Operator mijenjanja se koristi na isti naèin kao i operator brisanja: + + c [broj] pokret + + 2. Pokreti su isti, npr: w (rijeè) i $ (kraj linije). + + 3. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. + + 4. Pomaknite kursor na prvu pogrešku. + + 5. Otipkajte c$ i utipkajte ostatak linije tako da bude istovjetna + drugoj te pritisnite . + +---> Kraj ove linije treba pomoæ tako da izgleda kao linija ispod. +---> Kraj ove linije treba ispraviti korištenjem c$ naredbe. + +NAPOMENA: Možete koristiti Backspace za ispravljanje grešaka. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 3 SAŽETAK + + + 1. Za postavljanje teksta koji je upravo izbrisan, pritisnite p . Ovo + postavlja tekst IZA kursora (ako je pak linija izbrisana tekst se + postavlja na liniju ispod kursora). + + 2. Za promjenu znaka na kojem se nalazi kursor, pritisnite r i nakon toga + željeni znak. + + 3. Operator mijenjanja dozvoljava promjenu teksta od kursora do pozicije do + koje dovede pokret. tj. Otipkajte ce za mijenjanje od kursora do kraja + rijeèi, c$ za mijenjanje od kursora do kraja linije. + + 4. Oblik naredbe mijenjanja: + + c [broj] pokret + +Prijeðite na sljedeæu lekciju. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 4.1: POZICIJA KURSORA I STATUS DATOTEKE + + ** CTRL-G za prikaz pozicije kursora u datoteci i status datoteke. + Pritisnite G za pomicanje kursora na neku liniju u datoteci. ** + +NAPOMENA: Proèitajte cijelu lekciju prije izvršenja bilo kojeg koraka!! + + 1. Držite Ctrl tipku pritisnutom i pritisnite g . Ukratko: CTRL-G. + Vim æe ispisati poruku na dnu ekrana sa imenom datoteke i pozicijom + kursora u datoteci. Zapamtite broj linije za 3. korak. + +NAPOMENA: Možete vidjeti poziciju kursora u donjem desnom kutu ako + je postavka 'ruler' aktivirana (objašnjeno u 6. lekciji). + + 2. Pritisnite G za pomicanje kursora na kraj datoteke. + Otipkajte gg za pomicanje kursora na poèetak datoteke. + + 3. Otipkajte broj linije na kojoj ste bili maloprije i zatim G . Kursor + æe se vratiti na liniju na kojoj se nalazio kada ste otipkali CTRL-G. + + 4. Ako ste spremni, izvršite korake od 1 do 3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 4.2: NAREDBE TRAŽENJA + + ** Otipkajte / i nakon toga izraz kojeg želite tražiti. ** + + 1. U Normal modu otipkajte / znak. Primijetite da se znak + pojavio zajedno sa kursorom na dnu ekrana kao kod : naredbe. + + 2. Sada otipkajte 'grrrreška' . To je rijeè koju zapravo tražite. + + 3. Za ponovno traženje istog izraza, otipkajte n . + Za traženje istog izraza ali u suprotnom smjeru, otipkajte N . + + 4. Za traženje izraza unatrag, koristite ? umjesto / . + + 5. Za povratak na prethodnu poziciju koristite CTRL-O (držite Ctrl + pritisnutim dok ne pritisnete tipku o). Ponavljajte sve dok se ne + vratite na poèetak. CTRL-I slièno kao CTRL-O ali u suprotnom smjeru. + +---> "pogrrrreška" je pogrešno; umjesto pogrrrreška treba stajati pogreška. + +NAPOMENA: Ako se traženjem doðe do kraja datoteke nastavit æe se od njenog + poèetka osim ako je postavka 'wrapscan' deaktivirana. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 4.3: TRAŽENJE PRIPADAJUÆE ZAGRADE + + + ** Otipkajte % za pronalazak pripadajuæe ), ] ili } . ** + + 1. Postavite kursor na bilo koju od ( , [ ili { + otvorenih zagrada u liniji oznaèenoj s --->. + + 2. Otipkajte znak % . + + 3. Kursor æe se pomaknuti na pripadajuæu zatvorenu zagradu. + + 4. Otipkajte % kako bi pomakli kursor na drugu pripadajuæu zagradu. + + 5. Pomaknite kursor na neku od (,),[,],{ ili } i ponovite % naredbu. + +---> Linija ( testiranja obiènih ( [ uglatih ] i { vitièastih } zagrada.)) + + +NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadajuæim zagradama! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 4.4: NAREDBE ZAMIJENE + + + ** Otipkajte :s/staro/novo/g da zamijenite 'staro' za 'novo'. ** + + 1. Pomaknite kursor na liniju oznaèenu s --->. + + 2. Otipkajte :s/cvræè/cvrè . Primjetite da ova naredba zamjenjuje + samo prvi "cvræè" u liniji. + + 3. Otipkajte :s/cvræè/cvrè/g . Dodavanje g stavke znaèi da æe se naredba + izvršiti na cijeloj liniji, zamjenjivanjem svih "cvræè" u liniji. + +---> i cvræèi cvræèi cvræèak na èvoru crne smrèe. + + 4. Za zamjenu svih izraza u rasponu dviju linija, + otipkajte :#,#s/staro/novo/g #,# su brojevi linije datoteke na kojima + te izmeðu njih æe se izvršiti zamjena. + Otipkajte :%s/staro/novo/g za zamjenu svih izraza u cijeloj datoteci. + Otipkajte :%s/staro/novo/gc za pronalazak svakog izraza u datoteci i + potvrdu zamjene. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 4 SAŽETAK + + + 1. CTRL-G prikazuje poziciju kursora u datoteci i status datoteke. + G postavlja kursor na zadnju liniju datoteke. + broj G postavlja kursor na broj liniju. + gg postavlja kursor na prvu liniju. + + 2. Tipkanje / sa izrazom traži UNAPRIJED taj izraz. + Tipkanje ? sa izrazom traži UNATRAG taj izraz. + Nakon naredbe traženja koristite n za pronalazak izraza u istom + smjeru, i N za pronalazak istog izraza ali u suprotnom smjeru. + CTRL-O vraæa kursor na prethodnu poziciju, CTRL-I na sljedeæu poziciju. + + 3. Tipkanje % dok je kursor na zagradi pomièe ga na pripadajuæu zagradu. + + 4. Za zamjenu prvog izraza staro za izraz novo :s/staro/novo + Za zamjenu svih izraza staro na cijeloj liniji :s/staro/novo/g + Za zamjenu svih izraza staro u rasponu linija #,# :#,#s/staro/novo/g + Za zamjenu u cijeloj datoteci :%s/staro/novo/g + Za potvrdu svake zamjene dodajte 'c' :%s/staro/novo/gc + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 5.1: IZVRŠAVANJE VANJSKIH NAREDBI + + + ** Otipkajte :! sa vanjskom naredbom koju želite izvršiti. ** + + 1. Otipkajte poznatu naredbu : kako bi kursor premjestili na dno + ekrana. Time omoguæavate unos naredbe u naredbenoj liniji. + + 2. Otipkajte znak ! (uskliènik). Tako omoguæavate + izvršavanje naredbe vanjske ljuske. + + 3. Kao primjer otipkajte ls nakon ! te pritisnite . + Ovo æe prikazati sadržaj direktorija, kao da ste u ljusci. + Koristite :!dir ako :!ls ne radi. + +NAPOMENA: Moguæe je izvršavati bilo koju vanjsku naredbu na ovaj naèin, + zajedno sa njenim argumentima. + +NAPOMENA: Sve : naredbe se izvršavaju nakon što pritisnete + U daljnjem tekstu to neæe uvijek biti napomenuto. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 5.2: VIŠE O SPREMANJU DATOTEKA + + ** Za spremanje promjena, otipkajte :w IME_DATOTEKE. ** + + 1. Otipkajte :!dir ili :!ls za pregled direktorija. + Veæ znate da morate pritisnuti na kraju tipkanja. + + 2. Izaberite ime datoteke koja još ne postoji, npr. TEST. + + 3. Otipkajte: :w TEST (gdje je TEST ime koje ste prethodno odabrali.) + + 4. Time æe te spremiti cijelu datoteku (Vim Tutor) pod imenom TEST. + Za provjeru, otipkajte ponovno :!dir ili :!ls + za pregled direktorija. + +NAPOMENA: Ako bi napustili Vim i ponovno ga pokrenuli sa vim TEST , + datoteka bi bila potpuna kopija ove datoteke u trenutku + kada ste je spremili. + + 5. Izbrišite datoteku tako da otipkate (MS-DOS): :!del TEST + ili (Unix): :!rm TEST + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 5.3: SPREMANJE OZNAÈENOG TEKSTA + + + ** Kako bi spremili dio datoteke, otipkajte v pokret :w IME_DATOTEKE ** + + 1. Pomaknite kursor na ovu liniju. + + 2. Pritisnite v i pomaknite kursor pet linija ispod ove. + Primijetite promjenu, oznaèeni tekst se razlikuje od obiènog. + + 3. Pritisnite : znak. Na dnu ekrana pojavit æe se :'<,'> . + + 4. Otipkajte w TEST , pritom je TEST ime datoteke koja još ne postoji. + Provjerite da zaista piše :'<,'>w TEST + prije nego što pritisnite . + + 5. Vim æe spremiti oznaèeni tekst u TEST. Provjerite sa :!dir ili !ls . + Nemojte je još brisati! Koristiti æe te je u sljedeæoj lekciji. + +NAPOMENA: Tipka v zapoèinje Vizualno oznaèavanje. Možete pomicati kursor + unaokolo kako bi mijenjali velièinu oznaèenog teksta. Možete + koristiti i operatore. Npr, d æe izbrisati oznaèeni tekst. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 5.4: UÈITAVANJE DATOTEKA + + + ** Za ubacivanje sadržaja datoteke, otipkajte :r IME_DATOTEKE ** + + 1. Postavite kursor iznad ove linije. + +NAPOMENA: Nakon što izvršite 2. korak vidjeti æe te tekst iz Lekcije 5.3. + Stoga pomaknite kursor DOLJE kako bi ponovno vidjeli ovu lekciju. + + 2. Uèitajte vašu TEST datoteku koristeæi naredbu :r TEST + gdje je TEST ime datoteke koju ste koristili u prethodnoj lekciji. + Sadržaj uèitane datoteke je ubaèen liniju ispod kursora. + + 3. Kako bi provjerili da je datoteka uèitana, vratite kursor unatrag i + primijetite dvije kopije Lekcije 5.3, originalnu i onu iz datoteke. + +NAPOMENA: Možete takoðer uèitati ispis vanjske naredbe. Npr, :r !ls + æe uèitati ispis ls naredbe i postaviti ispis liniju ispod + kursora. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 5 SAŽETAK + + + 1. :!naredba izvršava vanjsku naredbu. + + Korisni primjeri: + (MS-DOS) (Unix) + :!dir :!ls - pregled direktorija. + :!del DATOTEKA :!rm DATOTEKA - briše datoteku DATOTEKA. + + 2. :w DATOTEKA zapisuje trenutaènu datoteku na disk sa imenom DATOTEKA. + + 3. v pokret :w IME_DATOTEKE sprema vizualno oznaèene linije u + datoteku IME_DATOTEKE. + + 4. :r IME_DATOTEKE uèitava datoteku IME_DATOTEKE sa diska i stavlja + njen sadržaj liniju ispod kursora. + + 5. :r !dir uèitava ispis naredbe dir i postavlja sadržaj ispisa liniju + ispod kursora. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 6.1: NAREDBA OTVORI + + + ** Pritisnite o kako bi otvorili liniju ispod kursora + i prešli u Insert mod. ** + + 1. Pomaknite kursor na sljedeæu liniju oznaèenu s --->. + + 2. Otipkajte malo o kako bi otvorili novu liniju ISPOD kursora + i prešli u Insert mod. + + 3. Otipkajte nešto teksta i nakon toga pritisnite + kako bi napustili Insert mod. + +---> Nakon što pritisnete o kursor æe preæi u novu liniju u Insert mod. + + 4. Za otvaranje linije IZNAD kursora, otipkajte umjesto malog o veliko O , + Pokušajte na donjoj liniji oznaèenoj s --->. + +---> Otvorite liniju iznad ove - otipkajte O dok je kursor na ovoj liniji. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 6.2: NAREDBA DODAJ + + + ** Otipkajte a za dodavanje teksta IZA kursora. ** + + 1. Pomaknite kursor na poèetak sljedeæe linije oznaèene s --->. + + 2. Tipkajte e dok se kursor ne nalazi na kraju li . + + 3. Otipkajte a (malo) kako bi dodali tekst IZA kursora. + + 4. Dopunite rijeè kao što je na liniji ispod. + Pritisnite za izlaz iz Insert moda. + + 5. Sa e prijeðite na sljedeæu nepotpunu rijeè i ponovite korake 3 i 4. + +---> Ova li omoguæava vje dodav teksta nekoj liniji. +---> Ova linija omoguæava vježbanje dodavanja teksta nekoj liniji. + +NAPOMENA: Sa i, a, i A prelazite u isti Insert mod, jedina + razlika je u poziciji od koje æe se tekst ubacivati. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 6.3: DRUGI NAÈIN MIJENJANJA + + + ** Otipkajte veliko R kako bi zamijelili više od jednog znaka. ** + + 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. + Pomaknite kursor na poèetak prvog xxx . + + 2. Pritisnite R i otipkajte broj koji je liniju ispod, + tako da zamijeni xxx . + + 3. Pritisnite za izlaz iz Replace moda. + Primijetite da je ostatak linije ostao nepromjenjen. + + 5. Ponovite korake kako bi zamijenili preostali xxx. + +---> Zbrajanje: 123 plus xxx je xxx. +---> Zbrajanje: 123 plus 456 je 579. + +NAPOMENA: Replace mod je kao Insert mod, ali sa bitnom razlikom, + svaki otipkani znak briše veæ postojeæi. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 6.4: KOPIRANJE I LIJEPLJENJE TEKSTA + + + ** Koristite y operator za kopiranje a p za lijepljenje teksta. ** + + 1. Pomaknite kursor na liniju s ---> i postavite kursor nakon "a)". + + 2. Pokrenite Visual mod sa v i pomaknite kursor sve do ispred "prva". + + 3. Pritisnite y kako bi kopirali oznaèeni tekst. + + 4. Pomaknite kursor do kraja sljedeæe linije: j$ + + 5. Pritisnite p kako bi zalijepili tekst. Onda utipkajte: druga . + + 6. Koristite Visual mod kako bi oznaèili " linija.", kopirajte: y , kursor + postavite na kraj sljedeæe linije: j$ i ondje zalijepite tekst: p . + +---> a) ovo je prva linija. + b) + +NAPOMENA: možete koristiti y kao operator; yw kopira jednu rijeè. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 6.5: MIJENJANJE POSTAVKI + + + ** Postavka: naredbe traženja i zamijene ne razlikuju VELIKA i mala slova ** + + 1. Potražite 'razlika' tipkanjem: /razlika + Nekoliko puta ponovite pritiskanjem n . + + 2. Aktivirajte 'ic' (Ignore case) postavku: :set ic + + 3. Ponovno potražite 'razlika' tipkanjem n + Primijetite da su sada i RAZLIKA i Razlika pronaðeni. + + 4. Aktivirajte 'hlsearch' i 'incsearch' postavke: :set hls is + + 5. Otipkajte naredbu traženja i primijetite razlike: /razlika + + 6. Za deaktiviranje ic postavke koristite: :set noic + +NAPOMENA: Za neoznaèavanje pronaðenih izraza otipkajte: :nohlsearch +NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi + koristite \c u izrazu: /razlika\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 6 SAŽETAK + + 1. Pritisnite o za otvaranje linije ISPOD kursora i prelazak u Insert mod. + Pritisnite O za otvaranje linije IZNAD kursora. + + 2. Pritisnite a za unos teksta IZA kursora. + Pritisnite A za unos teksta na kraju linije. + + 3. Naredba e pomièe kursor na kraj rijeèi. + + 4. Operator y kopira tekst, p ga lijepi. + + 5. Tipkanjem velikog R Vim prelazi u Replace mod dok ne pritisnete . + + 6. Tipkanjem ":set xxx" aktivira postavku "xxx". Neke postavke su: + 'ic' 'ignorecase' ne razlikuje velika/mala slova pri traženju + 'is' 'incsearch' traži nedovršene izraze + 'hls' 'hlsearch' oznaèi sve pronaðene izraze + Možete koristite dugo ili kratko ime postavke. + + 7. Prethodite "no" imenu postavke za deaktiviranje iste: :set noic + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 7.1: DOBIVANJE POMOÆI + + + ** Koristite on-line sustav pomoæi ** + + Vim ima detaljan on-line sustav pomoæi. + Za poèetak, pokušajte jedno od sljedeæeg: + - pritisnite tipku (ako je vaša tipkovnica ima) + - pritisnite tipku (ako je vaša tipkovnica ima) + - utipkajte :help + + Proèitajte tekst u prozoru pomoæi kako bi ste se znali služiti istom. + Tipkanjem CTRL-W CTRL-W prelazite iz jednog prozora u drugi. + Otipkajte :q kako bi zatvorili prozor pomoæi. + + Pronaæi æe te pomoæ o bilo kojoj temi, tako da dodate upit samoj + ":help" naredbi. Pokušajte (ne zaboravite pritisnuti ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 7.2: PRAVLJENJE SKRIPTE + + + ** Aktivirajte Vim moguænosti ** + + Vim ima mnogo više alata od Vi-ja, ali veæina njih nije aktivirana. + Kako bi mogli koristiti više moguænosti napravite "vimrc" datoteku. + + 1. Uredite "vimrc" datoteku. Ovo ovisi o vašem sistemu: + :e ~/.vimrc za Unix + :e $VIM/_vimrc za MS-Windows + + 2. Sada uèitajte primjer sadržaja "vimrc" datoteke: + :r $VIMRUNTIME/vimrc_example.vim + + 3. Saèuvajte datoteku sa: + :w + + Sljedeæeg puta kada pokrenete Vim, bojanje sintakse teksta biti æe + aktivirano. Sve vaše postavke možete dodati u "vimrc" datoteku. + Za više informacija otipkajte :help vimrc-intro + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 7.3: AUTOMATSKO DOVRŠAVANJE + + + ** Dovršavanje iz naredbene linije pomoæu CTRL-D i ** + + 1. Provjerite da Vim nije u Vi modu: :set nocp + + 2. Pogledajte koje datoteke postoje u direktoriju: :!ls or :!dir + + 3. Otipkajte poèetak naredbe: :e + + 4. Tipkajte CTRL-D i prikazati æe se lista naredbi koje zapoèinju sa "e". + + 5. Pritisnite i Vim æe dopuniti unos u naredbu ":edit". + + 6. Dodajte razmak i poèetak datoteke: :edit FIL + + 7. Pritisnite . Vim æe nadopuniti ime datoteke (ako je jedinstveno). + +NAPOMENA: Moguæe je dopuniti mnoge naredbe. Koristite CTRL-D i . + Naroèito je korisno za :help naredbe. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 7 SAŽETAK + + + 1. Otipkajte :help ili pritisnite ili za pomoæ. + + 2. Otipkajte :help naredba kako bi dobili pomoæ za naredba . + + 3. Otipkajte CTRL-W CTRL-W za prelazak u drugi prozor + + 4. Otipkajte :q kako bi zatvorili prozor pomoæi + + 5. Napravite vimrc skriptu za podizanje kako bi u nju spremali + vaše omiljene postavke. + + 6. Kada tipkate naredbu koja zapoèinje sa : + pritisnite CTRL-D kako bi vidjeli moguæe valjane vrijednosti. + Pritisnite kako bi odabrali jednu od njih. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Kraj. Cilj priruènika je da pokaže kratak pregled Vim editora, tek toliko + da omoguæi njegovo korištenje. Priruènik nije potpun jer Vim ima mnogo više + naredbi. Za više informacija: ":help user-manual". + + Za èitanje i korištenje, preporuèamo: + Vim - Vi Improved - by Steve Oualline + Izdavaè: New Riders + Prva knjiga potpuno posveæena Vim-u. Vrlo korisna za poèetnike. + Sa mnogo primjera i slika. + Posjetite http://iccf-holland.org/click5.html + + Sljedeæa knjiga je nešto starija i više o Vi-u nego o Vim-u, preporuèamo: + Learning the Vi Editor - by Linda Lamb + Izdavaè: O'Reilly & Associates Inc. + Solidna knjiga, možete saznati skoro sve što možete napraviti + u Vi-u. Šesto izdanje ima nešto informacija i o Vim-u. + + Ovaj priruènik su napisali: Michael C. Pierce i Robert K. Ware, + Colorado School of Mines koristeæi ideje Charles Smith, + Colorado State University. E-pošta: bware@mines.colorado.edu. + + Naknadne promjene napravio je Bram Moolenaar. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Preveo na hrvatski: Paul B. Mahol + Preinaka 1.42, Lipanj 2008 + + diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.hr.utf-8 b/vim/bundle/ubuntu-vim72/tutor/tutor.hr.utf-8 new file mode 100644 index 0000000..396bdfe --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.hr.utf-8 @@ -0,0 +1,972 @@ +=============================================================================== += D o b r o d o Å¡ l i u VIM p r i r u Ä n i k - Verzija 1.7 = +=============================================================================== + + Vim je vrlo moćan editor koji ima mnogo naredbi, previÅ¡e da bi ih + se svih ovdje spomenulo. Namjena priruÄnika je objasniti dovoljno + naredbi kako bi poÄetnici znatno lakÅ¡e koristili ovaj svestran editor. + + Približno vrijeme potrebno za uspjeÅ¡an zavrÅ¡etak priruÄnika je oko + 30 minuta a ovisi o tome koliko će te vremena odvojiti za vježbanje. + + UPOZORENJE: + Naredbe u ovom priruÄniku će promijeniti ovaj tekst. + Napravite kopiju ove datoteke kako bi ste na istoj vježbali + (ako ste pokrenuli "vimtutor" ovo je već kopija). + + Vrlo je važno primijetiti da je ovaj priruÄnik namijenjen za vježbanje. + Preciznije, morate izvrÅ¡iti naredbe u Vim-u kako bi ste iste nauÄili + pravilno koristiti. Ako samo Äitate tekst, zaboraviti će te naredbe! + + Ako je CapsLock ukljuÄen ISKLJUÄŒITE ga. Pritiskajte tipku j kako + bi pomakli kursor sve dok Lekcija 1.1 ne ispuni ekran. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 1.1: POMICANJE KURSORA + + + ** Za pomicanje kursora, pritisnite h,j,k,l tipke kako je prikazano ** + ^ + k Savjet: h tipka je lijevo i pomiÄe kursor lijevo. + < h l > l tipka je desno i pomiÄe kursor desno. + j j izgleda kao strelica usmjerena dolje. + v + 1. PomiÄite kursor po ekranu dok se ne naviknete na koriÅ¡tenje. + + 2. Držite tipku (j) pritisnutom. + Sada znate kako doći do sljedeće lekcije. + + 3. Koristeći tipku j prijeÄ‘ite na sljedeću lekciju 1.2. + +NAPOMENA: Ako niste sigurni Å¡to ste zapravo pritisnuli uvijek koristite + tipku kako bi preÅ¡li u Normal mod i onda pokuÅ¡ajte ponovno. + +NAPOMENA: Kursorske tipke rade isto. KoriÅ¡tenje hjkl tipaka je znatno + brže, nakon Å¡to se jednom naviknete na njihovo koriÅ¡tenje. Stvarno! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 1.2: IZLAZ IZ VIM-a + + + !! UPOZORENJE: Prije izvoÄ‘enja bilo kojeg koraka, + proÄitajte cijelu lekciju!! + + 1. Pritisnite tipku (Vim je sada u Normal modu). + + 2. Otipkajte: :q! . + Izlaz iz editora, GUBE se sve napravljene promjene. + + 3. Kada se pojavi ljuska, utipkajte naredbu koja je pokrenula + ovaj priruÄnik: vimtutor + + 4. Ako ste upamtili ove korake, izvrÅ¡ite ih redom od 1 do 3 + kako bi ponovno pokrenuli editor. + +NAPOMENA: :q! poniÅ¡tava sve promjene koje ste napravili. + U sljedećim lekcijama nauÄit će te kako promjene saÄuvati. + + 5. Pomaknite kursor na Lekciju 1.3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 1.3: PROMJENA TEKSTA - BRISANJE + + + ** Pritisnite x za brisanje znaka pod kursorom. ** + + 1. Pomaknite kursor na liniju oznaÄenu s --->. + + 2. Kako bi ste ispravili pogreÅ¡ke, pomiÄite kursor dok se + ne bude nalazio na slovu kojeg trebate izbrisati. + + 3. Pritisnite tipku x kako bi uklonili neželjeno slovo. + + 4. Ponovite korake od 2 do 4 dok ne ispravite sve pogreÅ¡ke. + +---> KKKravaa jee presskoÄila mmjeseccc. + + 5. Nakon Å¡to ispravite liniju, prijeÄ‘ite na lekciju 1.4. + +NAPOMENA: Koristeći ovaj priruÄnik ne pokuÅ¡avajte pamtiti + već uÄite primjenom. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 1.4: PROMJENA TEKSTA - UBACIVANJE + + + ** Pritisnite i za ubacivanje teksta ispred kursora. ** + + 1. Pomaknite kursor na prvu sljedeću liniju oznaÄenu s --->. + + 2. Kako bi napravili prvu liniju istovjetnoj drugoj, pomaknite + kursor na prvi znak POSLIJE kojeg će te utipkati potreban tekst. + + 3. Pritisnite i te utipkajte potrebne nadopune. + + 4. Nakon Å¡to ispravite pogreÅ¡ku pritisnite kako bi vratili Vim + u Normal mod. Ponovite korake od 2 do 4 kako bi ispravili sve pogreÅ¡ke. + +---> Nedje no teka od v lin. +---> Nedostaje neÅ¡to teksta od ove linije. + + 5. PrijeÄ‘ite na sljedeću lekciju. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 1.5: PROMJENA TEKSTA - DODAVANJE + + + ** Pritisnite A za dodavanje teksta. ** + + 1. Pomaknite kursor na prvu sljedeću liniju oznaÄenu s --->. + Nije važno na kojem se slovu nalazi kursor na toj liniji. + + 2. Pritisnite A i napravite potrebne promjene. + + 3. Nakon Å¡to ste dodali tekst, pritisnite + za povratak u Normal mod. + + 4. Pomaknite kursor na drugu liniju oznaÄenu s ---> + i ponovite korake 2 i 3 dok ne popravite tekst. + +---> Ima neÅ¡to teksta koji nedostaje n + Ima neÅ¡to teksta koji nedostaje na ovoj liniji. +---> Ima neÅ¡to teksta koji ne + Ima neÅ¡to teksta koji nedostaje baÅ¡ ovdje. + + 5. PrijeÄ‘ite na lekciju 1.6. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 1.6: PROMJENA DATOTEKE + + + ** Koristite :wq za spremanje teksta i napuÅ¡tanje Vim-a. ** + + !! UPOZORENJE: Prije izvrÅ¡avanja bilo kojeg koraka, proÄitajte lekciju!! + + 1. IzaÄ‘ite iz programa kao sto ste napravili u lekciji 1.2: :q! + + 2. Iz ljuske utipkajte sljedeću naredbu: vim tutor + 'vim' je naredba pokretanja Vim editora, 'tutor' je ime datoteke koju + želite ureÄ‘ivati. Koristite datoteku koju imate ovlasti mijenjati. + + 3. Ubacite i izbriÅ¡ite tekst kao Å¡to ste to napravili u lekcijama prije. + + 4. SaÄuvajte promjenjeni tekst i izaÄ‘ite iz Vim-a: :wq + + 5. Ponovno pokrenite vimtutor i nastavite Äitati sažetak koji sljedi. + + 6. Nakon sto proÄitate gornje korake i u potpunosti ih razumijete: + izvrÅ¡ite ih. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 1 SAŽETAK + + + 1. Kursor se pomiÄe strelicama ili pomoću hjkl tipaka. + h (lijevo) j (dolje) k (gore) l (desno) + + 2. Pokretanje Vim-a iz ljuske: vim IME_DATOTEKE + + 3. Izlaz: :q! sve promjene su izgubljene. + ILI: :wq promjene su saÄuvane. + + 4. Brisanje znaka na kojem se nalazi kursor: x + + 5. Ubacivanja ili dodavanje teksta: + i utipkajte tekst unos ispred kursora + A utipkajte tekst dodavanje na kraju linije + +NAPOMENA: Tipkanjem tipke prebacuje Vim u Normal mod i + prekida neželjenu ili djelomiÄno zavrÅ¡enu naredbu. + +Nastavite Äitati Lekciju 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2.1: NAREDBE BRISANJA + + + ** Tipkajte dw za brisanje rijeÄi. ** + + 1. Pritisnite kako bi bili sigurni da je Vim u Normal modu. + + 2. Pomaknite kursor na liniju oznaÄenu s --->. + + 3. Pomaknite kursor na poÄetak rijeÄi koju treba izbrisati. + + 4. Otipkajte dw kako bi uklonili rijeÄ. + +NAPOMENA: Vim će prikazati slovo d na zadnjoj liniji kad ga otipkate. + Vim Äeka da otipkate w . Ako je prikazano neko drugo slovo, + krivo ste otipkali; pritisnite i pokuÅ¡ajte ponovno. + +---> Neke rijeÄi smijeÅ¡no ne pripadaju na papir ovoj reÄenici. + + 5. Ponovite korake 3 i 4 dok ne ispravite reÄenicu; + prijeÄ‘ite na Lekciju 2.2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2.2: JOÅ  BRISANJA + + + ** Otipkajte d$ za brisanje znakova do kraja linije. ** + + 1. Pritisnite kako bi bili + sigurni da je Vim u Normal modu. + + 2. Pomaknite kursor na liniju oznaÄenu s --->. + + 3. Pomaknite kursor do kraja ispravne reÄenice + (POSLJE prve . ). + + 4. Otipkajte d$ + kako bi izbrisali sve znakove do kraja linije. + +---> Netko je utipkao kraj ove linije dvaput. kraj ove linije dvaput. + + 5. PrijeÄ‘ite na Lekciju 2.3 za bolje objaÅ¡njenje. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2.3: UKRATKO O OPERATORIMA I POKRETIMA + + + Mnogo naredbi koje mijenjaju tekst se sastoje od operatora i pokreta. + Oblik naredbe brisanja sa d operatorom je sljedeći: + + d pokret + + Pri Äemu je: + d - operator brisanja. + pokret - ono na Äemu će se operacija izvrÅ¡avati (navedeno u nastavku). + + Kratka lista pokreta: + w - sve do poÄetka sljedeće rijeÄi, NE UKLJUÄŒUJUĆI prvo slovo. + e - sve do kraja trenutaÄne rijeÄi, UKLJUÄŒUJUĆI zadnje slovo. + $ - sve do kraje linije, UKLJUÄŒUJUĆI zadnje slovo. + + Tipkanjem de će se brisati od kursora do kraja rijeÄi. + +NAPOMENA: Pritiskajući samo pokrete dok ste u Normal modu bez operatora će + pomicati kursor kao Å¡to je navedeno. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2.4: KORIÅ TENJE BROJANJA ZA POKRETE + + + ** Tipkanjem nekog broja prije pokreta, pokret se izvrÅ¡ava toliko puta. ** + + 1. Pomaknite kursor na liniju oznaÄenu s --->. + + 2. Otipkajte 2w da pomaknete kursor dvije rijeÄi naprijed. + + 3. Otipkajte 3e da pomaknete kursor na kraj treće rijeÄi naprijed. + + 4. Otipkajte 0 (nulu) da pomaknete kursor na poÄetak linije. + + 5. Ponovite korake 2 i 3 s nekim drugim brojevima. + +---> ReÄenica sa rijeÄima po kojoj možete pomicati kursor. + + 6. PrijeÄ‘ite na Lekciju 2.5. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2.5: KORIÅ TENJE BROJANJA ZA VEĆE BRISANJE + + + ** Tipkanje broja N s operatorom ponavlja ga N-puta. ** + + U kombinaciji operatora brisanja i pokreta spomenutih iznad + ubacujete broj prije pokreta kako bi izbrisali viÅ¡e znakova: + + d broj pokret + + 1. Pomaknite kursor na prvo slovo u rijeÄi sa VELIKIM SLOVIMA + oznaÄenu s --->. + + 2. Otipkajte 2dw da izbriÅ¡ete dvije rijeÄi sa VELIKIM SLOVIMA + + 3. Ponovite korake 1 i 2 sa razliÄitim brojevima da izbriÅ¡ete + uzastopne rijeÄi sa VELIKIM SLOVIMA sa samo jednom naredbom. + +---> ova ABCČĆ DÄE linija FGHI JK LMN OP rijeÄi je RSÅ  TUVZŽ popravljena. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2.6: OPERIRANJE NAD LINIJAMA + + + ** Otipkajte dd za brisanje cijele linije. ** + + Zbog uÄestalosti brisanja cijelih linija, dizajneri Vi-a su odluÄili da + je lakÅ¡e brisati linije tipkanjem d dvaput. + + 1. Pomaknite kursor na drugu liniju u donjoj kitici. + 2. Otipkajte dd kako bi izbrisali liniju. + 3. Pomaknite kursor na Äetvrtu liniju. + 4. Otipkajte 2dd kako bi izbrisali dvije linije. + +---> 1) Ruže su crvene, +---> 2) Plaža je super, +---> 3) Ljubice su plave, +---> 4) Imam auto, +---> 5) Satovi ukazuju vrijeme, +---> 6) Å ećer je sladak +---> 7) Kao i ti. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2.7: NAREDBA PONIÅ TENJA + + + ** Pritisnite u za poniÅ¡tenje zadnje naredbe, U za cijelu liniju. ** + + 1. Pomaknite kursor na liniju oznaÄenu s ---> i postavite kursor na prvu + pogreÅ¡ku. + 2. Otipkajte x kako bi izbrisali prvi neželjeni znak. + 3. Otipkajte u kako bi poniÅ¡tili zadnju izvrÅ¡enu naredbu. + 4. Ovaj put ispravite sve pogreÅ¡ke na liniji koristeći x naredbu. + 5. Sada utipkajte veliko U kako bi poniÅ¡tili sve promjene + na liniji, vraćajući je u prijaÅ¡nje stanje. + 6. Sada utipkajte u nekoliko puta kako bi poniÅ¡tili U + i prijaÅ¡nje naredbe. + 7. Sada utipkajte CTRL-R (držeći CTRL tipku pritisnutom dok + ne pritisnete R) nekoliko puta kako bi vratili promjene + (poniÅ¡tili poniÅ¡tenja). + +---> Poopravite pogreÅ¡ke nna ovvoj liniji ii pooniÅ¡titeee ih. + + 8. Vrlo korisne naredbe. PrijeÄ‘ite na sažetak Lekcije 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 2 SAŽETAK + + + 1. Brisanje od kursora do sljedeće rijeÄi: dw + 2. Brisanje od kursora do kraja linije: d$ + 3. Brisanje cijele linije: dd + + 4. Za ponavljanje pokreta prethodite mu broj: 2w + 5. Oblik naredbe mijenjanja: + operator [broj] pokret + gdje je: + operator - Å¡to napraviti, npr. d za brisanje + [broj] - neobavezan broj ponavljanja pokreta + pokret - kretanje po tekstu po kojem se operira, + kao Å¡to je: w (rijeÄ), $ (kraj linije), itd. + + 6. Postavljanje kursora na poÄetak linije: 0 + + 7. Za poniÅ¡tenje prethodnih promjena, pritisnite: u (malo u) + Za poniÅ¡tenje svih promjena na liniji, pritisnite: U (veliko U) + Za vraćanja promjena, utipkajte: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 3.1: NAREDBA POSTAVI + + + ** p za unos prethodno izbrisanog teksta iza kursora. ** + + 1. Pomaknite kursor na prvu sljedeću liniju oznaÄenu s --->. + + 2. Otipkajte dd kako bi izbrisali liniju i spremili je u Vim registar. + + 3. Pomaknite kursor na liniju c), IZNAD linije koju trebate unijeti. + + 4. Otipkajte p kako bi postavili liniju ispod kursora. + + 5. Ponovite korake 2 do 4 kako bi postavili sve linije u pravilnom + rasporedu. + +---> d) MožeÅ¡ li i ti nauÄiti? +---> b) Ljubice su plave, +---> c) Inteligencija je nauÄena, +---> a) Ruže su crvene, + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 3.2: NAREDBA PROMJENE + + + ** Otipkajte rx za zamjenu slova ispod kursora sa slovom x . ** + + 1. Pomaknite kursor na prvu sljedeću liniju oznaÄenu s --->. + + 2. Pomaknite kursor tako da se nalazi na prvoj pogreÅ¡ci. + + 3. Otipkajte r i nakon toga ispravan znak na tom mjestu. + + 4. Ponovite korake 2 i 3 sve dok prva + linije ne bude istovjetna drugoj. + +---> Kede ju ovu limija tupjana, natko je protuskao kruve tupke! +---> Kada je ova linija tipkana, netko je pritiskao krive tipke! + + 5. PrijeÄ‘ite na Lekciju 3.2. + +NAPOMENA: Prisjetite da trebate uÄiti vježbanjem, ne pamćenjem. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 3.3: OPERATOR MIJENJANJA + + + ** Za mijenjanje do kraja rijeÄi, istipkajte ce . ** + + 1. Pomaknite kursor na prvu sljedeću liniju oznaÄenu s --->. + + 2. Postavite kursor na a u lackmb. + + 3. Otipkajte ce i ispravite rijeÄ (u ovom sluÄaju otipkajte inija ). + + 4. Pritisnite i pomaknite kursor na sljedeći znak + kojeg je potrebno ispraviti. + + 5. Ponovite korake 3 i 4 sve dok prva reÄenica ne postane istovjetna + drugoj. + +---> Ova lackmb ima nekoliko rjlcah koje trfcb mijdmlfsz. +---> Ova linija ima nekoliko rijeÄi koje treba mijenjati. + +Primijetite da ce briÅ¡e rijeÄ i postavlja Vim u Insert mod. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 3.4: JOÅ  MIJENJANJA KORIÅ TENJEM c + + + ** Naredba mijenjanja se koristi sa istim pokretima kao i brisanje. ** + + 1. Operator mijenjanja se koristi na isti naÄin kao i operator brisanja: + + c [broj] pokret + + 2. Pokreti su isti, npr: w (rijeÄ) i $ (kraj linije). + + 3. Pomaknite kursor na prvu sljedeću liniju oznaÄenu s --->. + + 4. Pomaknite kursor na prvu pogreÅ¡ku. + + 5. Otipkajte c$ i utipkajte ostatak linije tako da bude istovjetna + drugoj te pritisnite . + +---> Kraj ove linije treba pomoć tako da izgleda kao linija ispod. +---> Kraj ove linije treba ispraviti koriÅ¡tenjem c$ naredbe. + +NAPOMENA: Možete koristiti Backspace za ispravljanje greÅ¡aka. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 3 SAŽETAK + + + 1. Za postavljanje teksta koji je upravo izbrisan, pritisnite p . Ovo + postavlja tekst IZA kursora (ako je pak linija izbrisana tekst se + postavlja na liniju ispod kursora). + + 2. Za promjenu znaka na kojem se nalazi kursor, pritisnite r i nakon toga + željeni znak. + + 3. Operator mijenjanja dozvoljava promjenu teksta od kursora do pozicije do + koje dovede pokret. tj. Otipkajte ce za mijenjanje od kursora do kraja + rijeÄi, c$ za mijenjanje od kursora do kraja linije. + + 4. Oblik naredbe mijenjanja: + + c [broj] pokret + +PrijeÄ‘ite na sljedeću lekciju. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 4.1: POZICIJA KURSORA I STATUS DATOTEKE + + ** CTRL-G za prikaz pozicije kursora u datoteci i status datoteke. + Pritisnite G za pomicanje kursora na neku liniju u datoteci. ** + +NAPOMENA: ProÄitajte cijelu lekciju prije izvrÅ¡enja bilo kojeg koraka!! + + 1. Držite Ctrl tipku pritisnutom i pritisnite g . Ukratko: CTRL-G. + Vim će ispisati poruku na dnu ekrana sa imenom datoteke i pozicijom + kursora u datoteci. Zapamtite broj linije za 3. korak. + +NAPOMENA: Možete vidjeti poziciju kursora u donjem desnom kutu ako + je postavka 'ruler' aktivirana (objaÅ¡njeno u 6. lekciji). + + 2. Pritisnite G za pomicanje kursora na kraj datoteke. + Otipkajte gg za pomicanje kursora na poÄetak datoteke. + + 3. Otipkajte broj linije na kojoj ste bili maloprije i zatim G . Kursor + će se vratiti na liniju na kojoj se nalazio kada ste otipkali CTRL-G. + + 4. Ako ste spremni, izvrÅ¡ite korake od 1 do 3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 4.2: NAREDBE TRAŽENJA + + ** Otipkajte / i nakon toga izraz kojeg želite tražiti. ** + + 1. U Normal modu otipkajte / znak. Primijetite da se znak + pojavio zajedno sa kursorom na dnu ekrana kao kod : naredbe. + + 2. Sada otipkajte 'grrrreÅ¡ka' . To je rijeÄ koju zapravo tražite. + + 3. Za ponovno traženje istog izraza, otipkajte n . + Za traženje istog izraza ali u suprotnom smjeru, otipkajte N . + + 4. Za traženje izraza unatrag, koristite ? umjesto / . + + 5. Za povratak na prethodnu poziciju koristite CTRL-O (držite Ctrl + pritisnutim dok ne pritisnete tipku o). Ponavljajte sve dok se ne + vratite na poÄetak. CTRL-I sliÄno kao CTRL-O ali u suprotnom smjeru. + +---> "pogrrrreÅ¡ka" je pogreÅ¡no; umjesto pogrrrreÅ¡ka treba stajati pogreÅ¡ka. + +NAPOMENA: Ako se traženjem doÄ‘e do kraja datoteke nastavit će se od njenog + poÄetka osim ako je postavka 'wrapscan' deaktivirana. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 4.3: TRAŽENJE PRIPADAJUĆE ZAGRADE + + + ** Otipkajte % za pronalazak pripadajuće ), ] ili } . ** + + 1. Postavite kursor na bilo koju od ( , [ ili { + otvorenih zagrada u liniji oznaÄenoj s --->. + + 2. Otipkajte znak % . + + 3. Kursor će se pomaknuti na pripadajuću zatvorenu zagradu. + + 4. Otipkajte % kako bi pomakli kursor na drugu pripadajuću zagradu. + + 5. Pomaknite kursor na neku od (,),[,],{ ili } i ponovite % naredbu. + +---> Linija ( testiranja obiÄnih ( [ uglatih ] i { vitiÄastih } zagrada.)) + + +NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadajućim zagradama! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 4.4: NAREDBE ZAMIJENE + + + ** Otipkajte :s/staro/novo/g da zamijenite 'staro' za 'novo'. ** + + 1. Pomaknite kursor na liniju oznaÄenu s --->. + + 2. Otipkajte :s/cvrćÄ/cvrÄ . Primjetite da ova naredba zamjenjuje + samo prvi "cvrćÄ" u liniji. + + 3. Otipkajte :s/cvrćÄ/cvrÄ/g . Dodavanje g stavke znaÄi da će se naredba + izvrÅ¡iti na cijeloj liniji, zamjenjivanjem svih "cvrćÄ" u liniji. + +---> i cvrćÄi cvrćÄi cvrćÄak na Ävoru crne smrÄe. + + 4. Za zamjenu svih izraza u rasponu dviju linija, + otipkajte :#,#s/staro/novo/g #,# su brojevi linije datoteke na kojima + te izmeÄ‘u njih će se izvrÅ¡iti zamjena. + Otipkajte :%s/staro/novo/g za zamjenu svih izraza u cijeloj datoteci. + Otipkajte :%s/staro/novo/gc za pronalazak svakog izraza u datoteci i + potvrdu zamjene. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 4 SAŽETAK + + + 1. CTRL-G prikazuje poziciju kursora u datoteci i status datoteke. + G postavlja kursor na zadnju liniju datoteke. + broj G postavlja kursor na broj liniju. + gg postavlja kursor na prvu liniju. + + 2. Tipkanje / sa izrazom traži UNAPRIJED taj izraz. + Tipkanje ? sa izrazom traži UNATRAG taj izraz. + Nakon naredbe traženja koristite n za pronalazak izraza u istom + smjeru, i N za pronalazak istog izraza ali u suprotnom smjeru. + CTRL-O vraća kursor na prethodnu poziciju, CTRL-I na sljedeću poziciju. + + 3. Tipkanje % dok je kursor na zagradi pomiÄe ga na pripadajuću zagradu. + + 4. Za zamjenu prvog izraza staro za izraz novo :s/staro/novo + Za zamjenu svih izraza staro na cijeloj liniji :s/staro/novo/g + Za zamjenu svih izraza staro u rasponu linija #,# :#,#s/staro/novo/g + Za zamjenu u cijeloj datoteci :%s/staro/novo/g + Za potvrdu svake zamjene dodajte 'c' :%s/staro/novo/gc + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 5.1: IZVRÅ AVANJE VANJSKIH NAREDBI + + + ** Otipkajte :! sa vanjskom naredbom koju želite izvrÅ¡iti. ** + + 1. Otipkajte poznatu naredbu : kako bi kursor premjestili na dno + ekrana. Time omogućavate unos naredbe u naredbenoj liniji. + + 2. Otipkajte znak ! (uskliÄnik). Tako omogućavate + izvrÅ¡avanje naredbe vanjske ljuske. + + 3. Kao primjer otipkajte ls nakon ! te pritisnite . + Ovo će prikazati sadržaj direktorija, kao da ste u ljusci. + Koristite :!dir ako :!ls ne radi. + +NAPOMENA: Moguće je izvrÅ¡avati bilo koju vanjsku naredbu na ovaj naÄin, + zajedno sa njenim argumentima. + +NAPOMENA: Sve : naredbe se izvrÅ¡avaju nakon Å¡to pritisnete + U daljnjem tekstu to neće uvijek biti napomenuto. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 5.2: VIÅ E O SPREMANJU DATOTEKA + + ** Za spremanje promjena, otipkajte :w IME_DATOTEKE. ** + + 1. Otipkajte :!dir ili :!ls za pregled direktorija. + Već znate da morate pritisnuti na kraju tipkanja. + + 2. Izaberite ime datoteke koja joÅ¡ ne postoji, npr. TEST. + + 3. Otipkajte: :w TEST (gdje je TEST ime koje ste prethodno odabrali.) + + 4. Time će te spremiti cijelu datoteku (Vim Tutor) pod imenom TEST. + Za provjeru, otipkajte ponovno :!dir ili :!ls + za pregled direktorija. + +NAPOMENA: Ako bi napustili Vim i ponovno ga pokrenuli sa vim TEST , + datoteka bi bila potpuna kopija ove datoteke u trenutku + kada ste je spremili. + + 5. IzbriÅ¡ite datoteku tako da otipkate (MS-DOS): :!del TEST + ili (Unix): :!rm TEST + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 5.3: SPREMANJE OZNAÄŒENOG TEKSTA + + + ** Kako bi spremili dio datoteke, otipkajte v pokret :w IME_DATOTEKE ** + + 1. Pomaknite kursor na ovu liniju. + + 2. Pritisnite v i pomaknite kursor pet linija ispod ove. + Primijetite promjenu, oznaÄeni tekst se razlikuje od obiÄnog. + + 3. Pritisnite : znak. Na dnu ekrana pojavit će se :'<,'> . + + 4. Otipkajte w TEST , pritom je TEST ime datoteke koja joÅ¡ ne postoji. + Provjerite da zaista piÅ¡e :'<,'>w TEST + prije nego Å¡to pritisnite . + + 5. Vim će spremiti oznaÄeni tekst u TEST. Provjerite sa :!dir ili !ls . + Nemojte je joÅ¡ brisati! Koristiti će te je u sljedećoj lekciji. + +NAPOMENA: Tipka v zapoÄinje Vizualno oznaÄavanje. Možete pomicati kursor + unaokolo kako bi mijenjali veliÄinu oznaÄenog teksta. Možete + koristiti i operatore. Npr, d će izbrisati oznaÄeni tekst. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 5.4: UÄŒITAVANJE DATOTEKA + + + ** Za ubacivanje sadržaja datoteke, otipkajte :r IME_DATOTEKE ** + + 1. Postavite kursor iznad ove linije. + +NAPOMENA: Nakon Å¡to izvrÅ¡ite 2. korak vidjeti će te tekst iz Lekcije 5.3. + Stoga pomaknite kursor DOLJE kako bi ponovno vidjeli ovu lekciju. + + 2. UÄitajte vaÅ¡u TEST datoteku koristeći naredbu :r TEST + gdje je TEST ime datoteke koju ste koristili u prethodnoj lekciji. + Sadržaj uÄitane datoteke je ubaÄen liniju ispod kursora. + + 3. Kako bi provjerili da je datoteka uÄitana, vratite kursor unatrag i + primijetite dvije kopije Lekcije 5.3, originalnu i onu iz datoteke. + +NAPOMENA: Možete takoÄ‘er uÄitati ispis vanjske naredbe. Npr, :r !ls + će uÄitati ispis ls naredbe i postaviti ispis liniju ispod + kursora. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 5 SAŽETAK + + + 1. :!naredba izvrÅ¡ava vanjsku naredbu. + + Korisni primjeri: + (MS-DOS) (Unix) + :!dir :!ls - pregled direktorija. + :!del DATOTEKA :!rm DATOTEKA - briÅ¡e datoteku DATOTEKA. + + 2. :w DATOTEKA zapisuje trenutaÄnu datoteku na disk sa imenom DATOTEKA. + + 3. v pokret :w IME_DATOTEKE sprema vizualno oznaÄene linije u + datoteku IME_DATOTEKE. + + 4. :r IME_DATOTEKE uÄitava datoteku IME_DATOTEKE sa diska i stavlja + njen sadržaj liniju ispod kursora. + + 5. :r !dir uÄitava ispis naredbe dir i postavlja sadržaj ispisa liniju + ispod kursora. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 6.1: NAREDBA OTVORI + + + ** Pritisnite o kako bi otvorili liniju ispod kursora + i preÅ¡li u Insert mod. ** + + 1. Pomaknite kursor na sljedeću liniju oznaÄenu s --->. + + 2. Otipkajte malo o kako bi otvorili novu liniju ISPOD kursora + i preÅ¡li u Insert mod. + + 3. Otipkajte neÅ¡to teksta i nakon toga pritisnite + kako bi napustili Insert mod. + +---> Nakon Å¡to pritisnete o kursor će preći u novu liniju u Insert mod. + + 4. Za otvaranje linije IZNAD kursora, otipkajte umjesto malog o veliko O , + PokuÅ¡ajte na donjoj liniji oznaÄenoj s --->. + +---> Otvorite liniju iznad ove - otipkajte O dok je kursor na ovoj liniji. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 6.2: NAREDBA DODAJ + + + ** Otipkajte a za dodavanje teksta IZA kursora. ** + + 1. Pomaknite kursor na poÄetak sljedeće linije oznaÄene s --->. + + 2. Tipkajte e dok se kursor ne nalazi na kraju li . + + 3. Otipkajte a (malo) kako bi dodali tekst IZA kursora. + + 4. Dopunite rijeÄ kao Å¡to je na liniji ispod. + Pritisnite za izlaz iz Insert moda. + + 5. Sa e prijeÄ‘ite na sljedeću nepotpunu rijeÄ i ponovite korake 3 i 4. + +---> Ova li omogućava vje dodav teksta nekoj liniji. +---> Ova linija omogućava vježbanje dodavanja teksta nekoj liniji. + +NAPOMENA: Sa i, a, i A prelazite u isti Insert mod, jedina + razlika je u poziciji od koje će se tekst ubacivati. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 6.3: DRUGI NAÄŒIN MIJENJANJA + + + ** Otipkajte veliko R kako bi zamijelili viÅ¡e od jednog znaka. ** + + 1. Pomaknite kursor na prvu sljedeću liniju oznaÄenu s --->. + Pomaknite kursor na poÄetak prvog xxx . + + 2. Pritisnite R i otipkajte broj koji je liniju ispod, + tako da zamijeni xxx . + + 3. Pritisnite za izlaz iz Replace moda. + Primijetite da je ostatak linije ostao nepromjenjen. + + 5. Ponovite korake kako bi zamijenili preostali xxx. + +---> Zbrajanje: 123 plus xxx je xxx. +---> Zbrajanje: 123 plus 456 je 579. + +NAPOMENA: Replace mod je kao Insert mod, ali sa bitnom razlikom, + svaki otipkani znak briÅ¡e već postojeći. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 6.4: KOPIRANJE I LIJEPLJENJE TEKSTA + + + ** Koristite y operator za kopiranje a p za lijepljenje teksta. ** + + 1. Pomaknite kursor na liniju s ---> i postavite kursor nakon "a)". + + 2. Pokrenite Visual mod sa v i pomaknite kursor sve do ispred "prva". + + 3. Pritisnite y kako bi kopirali oznaÄeni tekst. + + 4. Pomaknite kursor do kraja sljedeće linije: j$ + + 5. Pritisnite p kako bi zalijepili tekst. Onda utipkajte: druga . + + 6. Koristite Visual mod kako bi oznaÄili " linija.", kopirajte: y , kursor + postavite na kraj sljedeće linije: j$ i ondje zalijepite tekst: p . + +---> a) ovo je prva linija. + b) + +NAPOMENA: možete koristiti y kao operator; yw kopira jednu rijeÄ. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 6.5: MIJENJANJE POSTAVKI + + + ** Postavka: naredbe traženja i zamijene ne razlikuju VELIKA i mala slova ** + + 1. Potražite 'razlika' tipkanjem: /razlika + Nekoliko puta ponovite pritiskanjem n . + + 2. Aktivirajte 'ic' (Ignore case) postavku: :set ic + + 3. Ponovno potražite 'razlika' tipkanjem n + Primijetite da su sada i RAZLIKA i Razlika pronaÄ‘eni. + + 4. Aktivirajte 'hlsearch' i 'incsearch' postavke: :set hls is + + 5. Otipkajte naredbu traženja i primijetite razlike: /razlika + + 6. Za deaktiviranje ic postavke koristite: :set noic + +NAPOMENA: Za neoznaÄavanje pronaÄ‘enih izraza otipkajte: :nohlsearch +NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi + koristite \c u izrazu: /razlika\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 6 SAŽETAK + + 1. Pritisnite o za otvaranje linije ISPOD kursora i prelazak u Insert mod. + Pritisnite O za otvaranje linije IZNAD kursora. + + 2. Pritisnite a za unos teksta IZA kursora. + Pritisnite A za unos teksta na kraju linije. + + 3. Naredba e pomiÄe kursor na kraj rijeÄi. + + 4. Operator y kopira tekst, p ga lijepi. + + 5. Tipkanjem velikog R Vim prelazi u Replace mod dok ne pritisnete . + + 6. Tipkanjem ":set xxx" aktivira postavku "xxx". Neke postavke su: + 'ic' 'ignorecase' ne razlikuje velika/mala slova pri traženju + 'is' 'incsearch' traži nedovrÅ¡ene izraze + 'hls' 'hlsearch' oznaÄi sve pronaÄ‘ene izraze + Možete koristite dugo ili kratko ime postavke. + + 7. Prethodite "no" imenu postavke za deaktiviranje iste: :set noic + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 7.1: DOBIVANJE POMOĆI + + + ** Koristite on-line sustav pomoći ** + + Vim ima detaljan on-line sustav pomoći. + Za poÄetak, pokuÅ¡ajte jedno od sljedećeg: + - pritisnite tipku (ako je vaÅ¡a tipkovnica ima) + - pritisnite tipku (ako je vaÅ¡a tipkovnica ima) + - utipkajte :help + + ProÄitajte tekst u prozoru pomoći kako bi ste se znali služiti istom. + Tipkanjem CTRL-W CTRL-W prelazite iz jednog prozora u drugi. + Otipkajte :q kako bi zatvorili prozor pomoći. + + Pronaći će te pomoć o bilo kojoj temi, tako da dodate upit samoj + ":help" naredbi. PokuÅ¡ajte (ne zaboravite pritisnuti ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 7.2: PRAVLJENJE SKRIPTE + + + ** Aktivirajte Vim mogućnosti ** + + Vim ima mnogo viÅ¡e alata od Vi-ja, ali većina njih nije aktivirana. + Kako bi mogli koristiti viÅ¡e mogućnosti napravite "vimrc" datoteku. + + 1. Uredite "vimrc" datoteku. Ovo ovisi o vaÅ¡em sistemu: + :e ~/.vimrc za Unix + :e $VIM/_vimrc za MS-Windows + + 2. Sada uÄitajte primjer sadržaja "vimrc" datoteke: + :r $VIMRUNTIME/vimrc_example.vim + + 3. SaÄuvajte datoteku sa: + :w + + Sljedećeg puta kada pokrenete Vim, bojanje sintakse teksta biti će + aktivirano. Sve vaÅ¡e postavke možete dodati u "vimrc" datoteku. + Za viÅ¡e informacija otipkajte :help vimrc-intro + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 7.3: AUTOMATSKO DOVRÅ AVANJE + + + ** DovrÅ¡avanje iz naredbene linije pomoću CTRL-D i ** + + 1. Provjerite da Vim nije u Vi modu: :set nocp + + 2. Pogledajte koje datoteke postoje u direktoriju: :!ls or :!dir + + 3. Otipkajte poÄetak naredbe: :e + + 4. Tipkajte CTRL-D i prikazati će se lista naredbi koje zapoÄinju sa "e". + + 5. Pritisnite i Vim će dopuniti unos u naredbu ":edit". + + 6. Dodajte razmak i poÄetak datoteke: :edit FIL + + 7. Pritisnite . Vim će nadopuniti ime datoteke (ako je jedinstveno). + +NAPOMENA: Moguće je dopuniti mnoge naredbe. Koristite CTRL-D i . + NaroÄito je korisno za :help naredbe. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcija 7 SAŽETAK + + + 1. Otipkajte :help ili pritisnite ili za pomoć. + + 2. Otipkajte :help naredba kako bi dobili pomoć za naredba . + + 3. Otipkajte CTRL-W CTRL-W za prelazak u drugi prozor + + 4. Otipkajte :q kako bi zatvorili prozor pomoći + + 5. Napravite vimrc skriptu za podizanje kako bi u nju spremali + vaÅ¡e omiljene postavke. + + 6. Kada tipkate naredbu koja zapoÄinje sa : + pritisnite CTRL-D kako bi vidjeli moguće valjane vrijednosti. + Pritisnite kako bi odabrali jednu od njih. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Kraj. Cilj priruÄnika je da pokaže kratak pregled Vim editora, tek toliko + da omogući njegovo koriÅ¡tenje. PriruÄnik nije potpun jer Vim ima mnogo viÅ¡e + naredbi. Za viÅ¡e informacija: ":help user-manual". + + Za Äitanje i koriÅ¡tenje, preporuÄamo: + Vim - Vi Improved - by Steve Oualline + IzdavaÄ: New Riders + Prva knjiga potpuno posvećena Vim-u. Vrlo korisna za poÄetnike. + Sa mnogo primjera i slika. + Posjetite http://iccf-holland.org/click5.html + + Sljedeća knjiga je neÅ¡to starija i viÅ¡e o Vi-u nego o Vim-u, preporuÄamo: + Learning the Vi Editor - by Linda Lamb + IzdavaÄ: O'Reilly & Associates Inc. + Solidna knjiga, možete saznati skoro sve Å¡to možete napraviti + u Vi-u. Å esto izdanje ima neÅ¡to informacija i o Vim-u. + + Ovaj priruÄnik su napisali: Michael C. Pierce i Robert K. Ware, + Colorado School of Mines koristeći ideje Charles Smith, + Colorado State University. E-poÅ¡ta: bware@mines.colorado.edu. + + Naknadne promjene napravio je Bram Moolenaar. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Preveo na hrvatski: Paul B. Mahol + Preinaka 1.42, Lipanj 2008 + + diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.hu b/vim/bundle/ubuntu-vim72/tutor/tutor.hu new file mode 100644 index 0000000..6fb3270 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.hu @@ -0,0 +1,830 @@ +=============================================================================== +== Ü d v ö z ö l j ü k a V I M - o k t a t ó b a n - 1.5-ös verzió == +=============================================================================== + + A Vim egy nagyon hatékony szerkesztõ, amelnyek rengeteg utasítása + van, túl sok, hogy egy ilyen oktatóban (tutorban), mint az itteni + mindet elmagyarázzuk. Ez az oktató arra törekszik, hogy annyit + elmagyarázzon, amennyi elég, hogy könnyedén használjuk a Vim-et, az + általános célú szövegszerkesztõt. + + A feladatok megoldásához 25-30 perc szükséges attól függõen, + mennyit töltünk a kisérletezéssel. + + A leckében szereplõ utasítások módosítani fogják a szövegek. + Készítsen másolatot errõl a fájlról, ha gyakorolni akar. + (Ha "vimtutor"-ral indította, akkor ez már egy másolat.) + + Fontos megérteni, hogy ez az oktató cselekedve taníttat. + Ez azt jelenti, hogy Önnek ajánlott végrehajtania az utasításokat, + hogy megfelelõen megtanulja azokat. Ha csak olvassa, elfelejti! + + Most bizonyosodjon, meg, hogy a Caps-Lock gombja NINCS lenyomva, és + Nyomja meg megfelelõ számúszor a j gombot, hogy az 1.1-es + lecke teljesen a képernyõn legyen! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 1.1. lecke: A KURZOR MOZGATÁSA + + + ** A kurzor mozgatásához nyomja meg a h,j,k,l gombokat az alábbi szerint. ** + ^ + k Tipp: A h billentyû van balra, és balra mozgat + < h l > A l billentyû van jobbra, és jobbra mozgat + j A j billentyû olyan, mint egy lefele nyíl + v + 1. Mozgassa a kurzort körbe az ablakban, amíg hozzá nem szokik! + + 2. Tartsa lenyomva a lefelét (j), akkor ismétlõdik! +---> Most tudja, hogyan mehet a következõ leckére. + + 3. A lefelé gomb használatával menjen a 1.2. leckére! + +Megj: Ha nem biztos benne, mit nyomott meg, nyomja meg az -et, hogy + normál módba kerüljön, és ismételje meg a parancsot! + +Megj: A kurzor gomboknak is mûködniük kell, de a hjkl használatával + sokkal gyorsabban tud, mozogni, ha hozzászokik. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 1.2. lecke: BE ÉS KILÉPÉS A VIMBÕL + + + !! MEGJ: Mielõtt végrehajtja az alábbi lépéseket, olvassa végig a leckét !! + + 1. Nyomja meg az gombot (hogy biztosan normál módban legyen). + + 2. Írja: :q! . + +---> Ezzel kilép a szerkesztõbõl a változások MENTÉSE NÉLKÜL. + Ha menteni szeretné a változásokat és kilépni, írja: + :wq + + 3. Amikor a shell promptot látja, írja be a parancsot, amely ebbe az + oktatóba hozza: + Ez valószínûleg: vimtutor + Normális esetben ezt írná: vim tutor.hu + +---> 'vim' jelenti a vimbe belépést, 'tutor.hu' a fájl, amit szerkeszteni kíván. + + 4. Ha megjegyezte a lépéseket és biztos magában, hajtsa végre a lépéseket + 1-tõl 3-ig, hogy kilépjen és visszatérjen a szerkesztõbe. Azután + menjen az 1.3. leckére. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 1.3. lecke: SZÖVEG SZERKESZTÉSE - TÖRLÉS + + +** Normál módban nyomjon x-et, hogy a kurzor alatti karaktert törölje. ** + + 1. Mozgassa a kurzort a ---> kezdetû sorra! + + 2. A hibák kijavításához mozgassa a kurzort amíg a törlendõ karakter + fölé nem ér. + + 3. Nyomja meg az x gombot, hogy törölje a nemkívánt karaktert. + + 4. Ismételje a 2, 3, 4-es lépéseket, hogy kijavítsa a mondatot. + +---> ÕÕszi éjjjell izziik aa galaggonya rruuhája. + + 5. Ha a sor helyes, ugorjon a 1.4. leckére. + +MEGJ: A tanulás során ne memorizálni próbáljon, hanem használat során tanuljon. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 1.4. lecke: SZÖVEG SZERKESZTÉSE - BESZÚRÁS + + + ** Normál módban i megnyomásával lehet beilleszteni. ** + + 1. Az alábbi elsõ ---> kezdetû sorra menjen. + + 2. Ahhoz, hogy az elsõt azonossá tegye a másodikkal, mozgassa a kurzort + az elsõ karakterre, amely UTÁN szöveget kell beszúrni. + + 3. Nyomjon i-t és írja be a megfelelõ szöveget. + + 4. Amikor mindent beírt, nyomjon -et, hogy Normál módba visszatérjen. + Ismételje a 2 és 4 közötti lépéseket, hogy kijavítsa a mondatot. + +---> Az átható soól hizik pár ész. +---> Az itt látható sorból hiányzik pár rész. + + 5. Ha már begyakorolta a beszúrást, menjen az alábbi összefoglalóra. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 1. LECKE ÖSSZEFOGLALÓJA + + + 1. A kurzort vagy a nyilakkal vagy a hjkl gombokkal mozgathatja. + h (balra) j (le) k (fel) l (jobbra) + + 2. A Vimbe (a $ prompttól) így léphet be: vim FILENAME + + 3. A Vimbõl így léphet ki: :q! a változtatások eldobásával. + vagy így: :wq a változások mentésével. + + 4. A kurzor alatti karakter törlése normál módban: x + + 5. Szöveg beszúrása a kurzor után normál módban: + i gépelje be a szöveget + +MEGJ: Az megnyomása normál módba viszi, vagy megszakít egy nem befejezett + részben befejezett parancsot. + +Most folytassuk a 2. leckével! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2.1. lecke: TÖRLÕ UTASÍTÁSOK + + + ** dw töröl a szó végéig. ** + + 1. Nyomjon -et, hogy megbizonyosodjon, hogy normál módban van! + + 2. Mozgassa a kurzort a ---> kezdetû sorra! + + 3. Mozgassa a kurzort arra annak a szónak az elejére, amit törölni szeretne. + Törölje az állatokat a mondatból. + + 4. A szó törléséhez írja: dw + + MEGJ: Ha rosszul kezdte az utasítást csak nyomjon gombot + a megszakításához. + +---> Pár szó kutya nem uhu illik pingvin a mondatba tehén. + + 5. Ismételje a 3 és 4 közötti utasításokat amíg kell és ugorjon a 2.2 leckére! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2.2. lecke: MÉG TÖBB TÖRLÕ UTASÍTÁS + + + ** d$ beírásával a sor végéig törölhet. ** + + 1. Nyomjon -et, hogy megbizonyosodjon, hogy normál módban van! + + 2. Mozgassa a kurzort a ---> kezdetû sorra! + + 3. Mozgassa a kurzort a helyes sor végére (az elsõ . UTÁN)! + + 4. d$ begépeléséveltörölje a sor végét! + +---> Valaki a sor végét kétszer gépelte be. kétszer gépelte be. + + + 5. Menjen a 2.3. leckére, hogy megértse mi történt! + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2.3. lecke: UTASÍTÁSOKRÓL ÉS OBJEKTUMOKRÓL + + + A d (delete=törlés) utasítás formája a következõ: + + [szám] d objektum VAGY d [szám] objektum + Ahol: + szám - hányszor hajtódjon végre a parancs (elhagyható, alapérték=1). + d - a törlés (delete) utasítás. + objektum - amin a parancsnak teljesülnie kell (alább listázva). + + Objektumok rövid listája: + w - a kurzortól a szó végéig, beleértve a szóközt. + e - a kurzortól a szó végéig, NEM beleértve a szóközt. + $ - a kurzortól a sor végéig. + +MEGJ: Vállalkozóbbak kedvéért, csupán az objektum begépelésével parancs nélkül + a kurzor oda kerül, amit az objektumlista megad. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2.4. lecke: EGY KIVÉTEL A 'PARANCSOBJEKTUM' ALÓL + + + ** dd beírásával törölheti az egész sort. ** + + A teljes sor törlésének gyakorisága miatt a Vi tervezõi elhatározták, + hogy könnyebb lenne csupán a d-t kétszer megnyomni, hogy egy sort töröljünk. + + 1. Mozgassa a kurzort az alábbi kifejezések második sorára! + 2. dd begépelésével törölje a sort! + 3. Menjen a 4. (eredetileg 5.) sorra! + 4. 2dd (ugyebár szám-utasítás-objektum) begépelésével töröljön két sort! + + 1) Alvó szegek a jéghideg homokban, + 2) - kezdi a költõ - + 3) Plakátmagányban ázó éjjelek. + 4) Pingvinek ne féljetek, + 5) Távolról egy vaku villant, + 6) Égve hagytad a folyosón a villanyt. + 7) Ma ontják véremet. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2.5. lecke: A VISSZAVONÁS (UNDO) PARANCS + + +** u gépelésével visszavonható az utolsó parancs, U az egész sort helyreállítja. ** + + 1. Menjünk az alábbi ---> kezdetû sor elsõ hibájára! + 2. x lenyomásával törölje az elsõ felesleges karaktert! + 3. u megnyomásával vonja vissza az utolsónak végrehajtott utasítást! + 4. Másodjára javítson ki minden hibát a sorben az x utasítással! + 5. Most nagy U -val állítsa vissza a sor eredeti állapotát! + 6. Nyomja meg az u gombot párszor, hogy az U és sz elõzõ utasításokat + visszaállítsa! + 7. CTRL-R (CTRL gomb lenyomása mellett üssön R-t) párszor csinálja újra a + visszavont parancsokat (redo)! + +---> Javíítsa a hhibákaat ebbben a sooorban majd állítsa visszaaa az eredetit. + + 8. Ezek nagyon hasznos parancsok. Most ugorjon a 2. lecke összefoglalójára. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2. LECKE ÖSSZEFOGLALÓJA + + + 1. Törlés a kurzortól a szó végéig: dw + + 2. Törlés a kurzortól a sor végéig: d$ + + 3. Egész sor törlése: dd + + 4. Egy utasítás alakja normál módban: + + [szám] utasítás objektum VAGY utasítás [szám] objektum + ahol: + szám - hányszor ismételjük a parancsot + utasítás - mit tegyünk, pl. d a törléskor + objektum - mire hasson az utasítás, például w (szó=word), + $ (a sor végéig), stb. + + 5. Az elõzõ tett visszavonása (undo): u (kis u) + A sor összes változásának visszavonása: U (nagy U) + Visszavonások visszavonása: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 3.1. lecke: A BEILLESZTÉS (PUT) PARANCS + + + ** p leütésével az utolsónak töröltet a kurzor után illeszhetjük. ** + + 1. Mozgassuk a kurzort az alábbi sorok elsõ sorára. + + 2. dd leütésével töröljük a sort és eltérolódik a Vim pufferében. + + 3. Mozgassuk a kurzort azelõtt a sor ELÕTTI sorba, ahová mozgatni + szeretnénk a törölt sort. + + 4. Normál módban írjunk p betût a törölt sor beillesztéséhez. + + 5. Folytassuk a 2-4. utasításokkal hogy a helyes sorrendet kapjuk. + + d) Can you learn too? + b) Violets are blue, + c) Intelligence is learned, + a) Roses are red, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 3.2. lecke: AZ ÁTÍRÁS (REPLACE) PARANCS + + +** r és a karakterek leütésével a kurzor alatti karaktert megváltoztatjuk. ** + + 1. Mozgassuk a kurzort az elsõ ---> kezdetû sorra! + + 2. Mozgassuk a kurzort az elsõ hiba fölé! + + 3. r majd a kívánt karakter leütésével változtassuk meg a hibásat! + + 4. A 2. és 3. lépésekkel javítsuk az összes hibát! + +---> Whan this lime was tuoed in, someone presswd some wrojg keys! +---> When this line was typed in, someone pressed some wrong keys! + + 5. Menjünk a 3.2. leckére! + +MEGJ: Emlékezzen, hogy nem memorizálással, hanem gyakorlással tanuljon. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 3.3. lecke: A CSERE (CHANGE) PARANCS + + + ** A szó egy részének megváltoztatásához írjuk: cw . ** + + 1. Mozgassuk a kurzort az elsõ ---> kezdetû sorra! + + 2. Vigye a kurzort a Ezen szó z betûje fölé! + + 3. cw és a helyes szórész (itt 'bben') beírásával javítsa a szót! + + 4. lenyomása után a következõ hibára ugorjon (az elsõ cserélendõ + karakterre)! + + 5. A 3. és 4. lépések ismétlésével az elsõ mondatot tegye a másodikkal + azonossá! + +---> Ezen a sorrrrr pár szóra meg kell változzanak a change utaskírésõ. +---> Ebben a sorban pár szót meg kell változtatni a change utasítással. + +Vegyük észre, hogy a cw nem csak a szót írja át, hanem beszúró +(insert) módba vált. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 3.4. lecke: TÖBBFÉLE VÁLTOZTATÁS c-VEL + + + ** A c utasítás használható ugyanazokkal az objektumokkal mint a törlés ** + + 1. A change utasítás a törléssel azonosan viselkedik. A forma: + + [szám] c objektum OR c [szám] objektum + + 2. Az objektumok is azonosak, pl. w (szó), $ (sorvég), stb. + + 3. Mozgassuk a kurzort az elsõ ---> kezdetû sorra! + + 4. Menjünk az elsõ hibára! + + 5. c$ begépelésével a sorvégeket tegyük azonossá és nyomjunk -et! + +---> Ennek a sornak a vége kiigazításra szorul, hogy megegyezzen a másodikkal. +---> Ennek a sornak a vége a c$ paranccsal változtatható meg. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 3. LECKE ÖSSZEFOGLALÓJA + + + 1. A már törölt sort beillesztéséhez nyomjunk p-t. Ez a törölt szöveget + a kurzor UTÁN helyezi (ha sor került törlésre, a kurzor allatti sorba). + + 2. A kurzor alatti karakter átírásához az r-et és azt a karaktert + nyomjuk, amellyel az eredetit felül szeretnénk írni. + + 3. A változtatás (c) utasítás a karaktertõl az objektum végéig + változtatja meg az objektumot. Például a cw a kurzortól a szó végéig, + a c$ a sor végéig. + + 4. A változtatás formátuma: + + [szám] c objektum VAGY c [szám] objektum + +Ugorjunk a következõ leckére! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 4.1. lecke: HELY ÉS FÁJLÁLLAPOT + + + ** CTRL-g megnyomásával megnézhetjük a helyünket a fájlban és a fájl állapotát. + SHIFT-G leütésével a fájl adott sorára ugorhatunk. ** + + Megj: Olvassuk el az egész leckét a lépések végrehajtása elõtt!! + + 1. Tartsuk nyomva a Ctrl gombot és nyomjunk g-t. Az állapotsor + megjelenik a lap alján a fájlnévvel és az aktuális sor sorszámával. + Jegyezzük meg a sorszámot a 3. lépéshez! + + 2. Nyomjunk Shift-G-t a lap aljára ugráshoz! + + 3. Üssük be az eredeti sor számát, majd üssünk shift-G-t! Ezzel + visszajutunk az eredeti sorra ahol Ctrl-g-t nyomtunk. + (A beírt szám NEM fog megjelenni a képernyõn.) + + 4. Ha megjegyezte a feladatot, hajtsa végre az 1-3. lépéseket! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 4.2. lecke: A KERESÉS (SEARCH) PARANCS + + + ** / majd a kívánt kifejezés beírásával kereshetjük meg a kifejezést. ** + + 1. Normál módban üssünk / karaktert! Ez és a kurzor megjelenik + a képernyõ alján, ahogy a : utasítás is. + + 2. Írjuk be: 'hiibaa' ! Ez az a szó amit keresünk. + + 3. A kifejezés újabb kereséséhez üssük le egyszerûen: n . + A kifejezés ellenkezõ irányban történõ kereséséhez ezt üssük be: Shift-N . + + 4. Ha visszafelé szeretne keresni, akkor ? kell a ! helyett. + +---> "hiibaa" nem a helyes módja a hiba leírásának; a hiibaa egy hiba. + +Megj: Ha a keresés eléri a fájl végét, akkor az elején kezdi. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 4.3. lecke: ZÁRÓJELEK PÁRJÁNAK KERESÉSE + + + ** % leütésével megtaláljuk a ),], vagy } párját. ** + + 1. Helyezze a kurzort valamelyik (, [, vagy { zárójelre a ---> kezdetû + sorban! + + 2. Üssön % karaktert! + + 3. A kurzor a zárójel párjára fog ugrani. + + 4. % leütésével visszaugrik az eredeti zárójelre. + +---> Ez ( egy tesztsor (-ekkel, [-ekkel ] és {-ekkel } a sorban. )) + +Megj: Ez nagyon hasznos, ha olyan programot debugolunk, amelyben a + zárójelek nem párosak! + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 4.4. lecke: A HIBÁK KIJAVÍTÁSÁNAK EGY MÓDJA + + + ** :s/új/régi/g begépelésével az 'új'-ra cseréljük a 'régi'-t. ** + + 1. Menjünk a ---> kezdetû sorra! + + 2. Írjuk be: :s/eggy/egy . Ekkor csak az elsõ változik meg a + sorban. + + 3. Most ezt írjuk: :s/eggy/egg/g amely globálisan helyettesít + a sorban, azaz minden elõfordulást. + Ez a sorban minden elõfordulást helyettesít. + +---> eggy heggy meggy, szembe jön eggy másik heggy. + + 4. Két sor között a karaktersor minden elõfordulásának helyettesítése: + :#,#s/régi/új/g ahol #,# a két sor sorszáma. + :%s/régi/új/g a fájlbeli összes elõfordulás helyettesítése. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 4. LECKE ÖSSZEFOGLALÓJA + + + 1. Ctrl-g kiírja az kurzor helyét a fájlban és a fájl állapotát. + Shift-G a fájl végére megy, gg az elejére. Egy szám után + Shift-G az adott számú sorra ugrik. + + 2. / után egy kifejezés ELÕREFELE keresi a kifejezést. + 2. ? után egy kifejezés VISSZAFELE keresi a kifejezést. + Egy keresés után az n a következõ elõfordulást keresi azonos irányban + Shift-N az ellenkezõ irányban keres. + + 3. % begépelésével, ha (,),[,],{, vagy } karakteren vagyunk a zárójel + párjára ugrik. + + 4. az elsõ régi helyettesítése újjal a sorban :s/régi/új + az összes régi helyettesítése újjal a sorban :s/régi/új/g + két sor közötti kifejezésekre :#,#s/régi/új/g + # helyén az aktuális sor (.) és az utolsó ($) is állhat :.,$/régi/új/g + A fájlbeli összes elõfordulás helyettesítése :%s/régi/új/g + Mindenkori megerõsítésre vár 'c' hatására :%s/régi/új/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 5.1. lecke: KÜLSÕ PARANCS VÉGREHAJTÁSA + + + ** :! után külsõ parancsot írva végrehajtódik a parancs. ** + + 1. Írjuk be az ismerõs : parancsot, hogy a kurzort a képernyõ aljára + helyezzük. Ez lehetõvé teszi egy parancs beírását. + + 2. ! (felkiáltójel) beírásával tegyük lehetõvé külsõ héj (shell)-parancs + végrehajtását. + + 3. Írjunk például ls parancsot a ! után majd üssünk -t. Ez ki + fogja listázni a könyvtárunkat ugyanúgy, mintha a shell promptnál + lennénk. Vagy írja ezt :!dir ha az ls nem mûködik. + +Megj: Ilymódon bármely külsõ utasítás végrehajtható. + +Megj: Minden : parancs után -t kell ütni. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 5.2. lecke: BÕVEBBEN A FÁJLOK ÍRÁSÁRÓL + + + ** A fájlok változásait így írhatjuk ki :w FÁJLNÉV. ** + + 1. :!dir vagy :!ls beírásával listázzuk a könyvtárunkat! + Ön már tudja, hogy -t kell ütnie utána. + + 2. Válasszon egy fájlnevet, amely még nem létezik pl. TESZT! + + 3. Írja: :w TESZT (ahol TESZT a választott fájlnév)! + + 4. Ez elmenti a teljes fájlt (a Vim oktatóját) TESZT néven. + Ellenõrzésképp írjuk ismét :!dir hogy lássuk a könyvtárat! + (Felfelé gombbal : után az elõzõ utasítások visszahozhatóak.) + +Megj: Ha Ön kilépne a Vimbõl és és visszatérne a TESZT fájlnévvel, akkor a + fájl az oktató mentéskori pontos másolata lenne. + + 5. Távolítsa el a fájlt (MS-DOS): :!del TESZT + vagy (Unix): :!rm TESZT + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 5.3. lecke: EGY KIVÁLASZTOTT RÉSZ KIÍRÁSA + + + ** A fájl egy részének kiírásához írja :#,# w FÁJLNÉV ** + + 1. :!dir vagy :!ls beírásával listázza a könyvtárat, és válasszon egy + megfelelõ fájlnevet, pl. TESZT. + + 2. Mozgassa a kurzort ennek az oldalnak a tetejére, és nyomjon + Ctrl-g-t, hogy megtudja a sorszámot. JEGYEZZE MEG A SZÁMOT! + + 3. Most menjen a lap aljára, és üsse be ismét: Ctrl-g. EZT A SZÁMOT + IS JEGYEZZE MEG! + + 4. Ha csak ezt a részét szeretné menteni a fájlnak, írja :#,# w TESZT + ahol #,# a két sorszám, amit megjegyzett, TESZT az Ön fájlneve. + + 5. Ismét nézze meg, hogy a fájl ott van (:!dir) de NE törölje. + + 6. Vimben létezik egy másik lehetõség: nyomja meg a Shift-V gombpárt + az elsõ menteni kívánt soron, majd menjen le az utolsóra, ezután + írja :w TESZT2 Ekkor a TESZT2 fájlba kerül a kijelölt rész. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 5.4. lecke: RETRIEVING AND MERGING FILES + + + ** Egy fájl tartalmának beillesztéséhez írja :r FÁJLNÉV ** + + 1. :!dir beírásával nézze meg, hogy az Ön TESZT fájlja létezik még. + + 2. Helyezze a kurzort ennek az oldalnak a tetejére. + +MEGJ: A 3. lépés után az 5.3. leckét fogja látni. Azután LEFELÉ indulva + keresse meg ismét ezt a leckét. + + 3. Most szúrja be a TESZT nevû fájlt a :r TESZT paranccsal, ahol + TESZT az Ön fájljénak a neve. + +MEGJ: A fájl, amit beillesztett a kurzora alatt helyezkedik el. + + 4. Hogy ellenõrizzük, hogy a fájlt tényleg beillsztettük, menjen + vissza, és nézze meg, hogy kétszer szerepel az 5.3. lecke! Az eredeti + mellett a fájlból bemásolt is ott van. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 5. LECKE ÖSSZEFOGLALÓJA + + + 1. :!parancs végrehajt egy külsõ utasítást. + + Pár hasznos példa: + (MS-DOS) (Unix) + :!dir :!ls - könyvtárlista kiírása. + :!del FÁJLNÉV :!rm FÁJLNÉV - FÁJLNÉV nevû fájl törlése. + + 2. :w FÁJLNÉV kiírja a jelenlegi Vim-fájlt a lemezre FÁJNÉV néven. + + 3. :#,#w FÁJLNÉV kiírja a két sorszám (#) közötti sorokat FÁJLNÉV-be + Másik lehetõség, hogy a kezdõsornál Ctrl-v-t nyom lemegy az utolsó + sorra, majd ezt üti be :w FÁJLNÉV + + 4. :r FÁJLNÉV beolvassa a FÁJLNÉV fájlt és behelyezi a jelenlegi fájlba + a kurzorpozició utáni sorba. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 6.1. lecke: A MEGNYITÁS (OPEN) PARANCS + + +** o beírásával nyithat egy új sort a kurzor alatt és válthat beszúró módba ** + + 1. Mozgassuk a kurzort a ---> kezdetû sorra. + + 2. o (kicsi) beírásával nyisson egy sort a kurzor ALATT! Ekkor + automatikusan beszúró (insert) módba kerül. + + 3. Másolja le a ---> jelû sort és megnyomásával lépjen ki + a beszúró módból. + +---> Az o lenyomása után a kurzor a következõ sor elején áll beszúró módban. + + 4. A kurzor FELETTI for megnyitásához egyzserûen a nagy O betût írjon +kicsi helyett. Próbálja ki a következõ soron! +Nyisson egy új sort efelett Shift-O megnyomásával, mialatt a kurzor +ezen a soron áll. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 6.2. lecke: AZ APPEND PARANCS + + + ** a lenyomásával a kuror UTÁN szúrhatunk szöveget. ** + + 1. Mozgassuk a kurzort a következõ ---> kezdetû sor végére úgy, + hogy normál módban $ ír be. + + 2. a (kicsi) leütésével szöveget szúrhat be AMöGÉ a karakter mögé, + amelyen a kurzor áll. + (A nagy A az egész sor végére írja a szöveget.) + +Megj: A Vimben a sor legvégére is lehet állni, azonba ez elõdjében + a Vi-ban nem lehetséges, ezért abban az a nélkül elég körülményes + a sor végéhez szöveget írni. + + 3. Egészítse ki az elsõ sort. Vegye észre, hogy az a utasítás (append) + teljesen egyezik az i-vel (insert) csupán a beszúrt szöveg helye + különbözik. + +---> Ez a sor lehetõvé teszi Önnek, hogy gyakorolja +---> Ez a sor lehetõvé teszi Önnek, hogy gyakorolja a sor végére beillesztést. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 6.3. lecke: AZ ÁTÍRÁS MÁSIK VÁLTOZATA + + + ** Nagy R beírásával írhat felül több mint egy karaktert. ** + + 1. Mozgassuk a kurzort az elsõ ---> kezdetû sorra! + + 2. Helyezze a kurzort az elsõ szó elejére amely eltér a második + ---> kezdetû sor tartalmától (a 'az utolsóval' résztõl). + + 3. Nyomjon R karaktert és írja ét a szöveg maradékát az elsõ sorban + úgy, hogy a két sor egyezõ legyen. + +---> Az elsõ sort tegye azonossá az utolsóval: használja a gombokat. +---> Az elsõ sort tegye azonossá a másodikkal: írjon R-t és az új szöveget. + + 4. Jegyezzük meg, ha -et nyomok, akkor a változatlanuk hagyott + szövegek változatlanok maradnak. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 6.4. lecke: BEÁLLÍTÁSOK + +** Állítsuk be, hogy a keresés és a helyettesítés ne függjön kis/NAGYbetûktõl ** + + 1. Keressük meg az 'ignore'-t az beírva: + /ignore + Ezt ismételjük többször az n billentyûvel + + 2. Állítsuk be az 'ic' (Ignore case) lehetõséget így: + :set ic + + 3. Most keressünk ismét az 'ignore'-ra n-nel + Ismételjük meg többször a keresést: n + + 4. Állítsuk be a 'hlsearch' és 'incsearch' lehetõségeket: + :set hls is + + 5. Most ismét írjuk be a keresõparancsot, és lássuk mi történik: + /ignore + + 6. A kiemelést szüntessük meg alábbi utasítások egyikével: + :set nohls vagy :nohlsearch +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 6. LECKE ÖSSZEFOGLALÓJA + + + 1. o beírásával új sort nyitunk meg a sor ALATT és a kurzor az új + sorban lesz beszúrás-módban. + Nagy O a sor FELETT nyit új sort, és oda kerül a kurzor. + + 2. a beírásával az aktuális karaktertõl UTÁN (jobbra) szúrhatunk be szöveget. + Nagy A automatikusan a sor legvégéhez adja hozzá a szöveget. + + 3. A nagy R beütésével átíró (replace) módba kerülünk lenyomásáig. + + 4. ":set xxx" beírásával az "xxx" opció állítható be. + + + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 7. lecke: AZ ON-LINE SÚGÓ PARANCSAI + + + ** Az online súgórendszer használata ** + + A Vim részletes súgóval rendelkezik. Induláshoz a következõk egyikét + tegye: + - nyomja meg a gombot (ha van ilyen) + - nyomja meg az gombot (ha van ilyen) + - írja be: :help + + :q beírásával zárhatja be a súgóablakot. + + Majdnem minden témakörrõl találhat súgót, argumentum megadásával + ":help" utasítás . Próbálja az alábbiakat ki (-t ne felejtsük): + + :help w + :help c_, 2006-2008 + diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.hu.cp1250 b/vim/bundle/ubuntu-vim72/tutor/tutor.hu.cp1250 new file mode 100644 index 0000000..6fb3270 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.hu.cp1250 @@ -0,0 +1,830 @@ +=============================================================================== +== Ü d v ö z ö l j ü k a V I M - o k t a t ó b a n - 1.5-ös verzió == +=============================================================================== + + A Vim egy nagyon hatékony szerkesztõ, amelnyek rengeteg utasítása + van, túl sok, hogy egy ilyen oktatóban (tutorban), mint az itteni + mindet elmagyarázzuk. Ez az oktató arra törekszik, hogy annyit + elmagyarázzon, amennyi elég, hogy könnyedén használjuk a Vim-et, az + általános célú szövegszerkesztõt. + + A feladatok megoldásához 25-30 perc szükséges attól függõen, + mennyit töltünk a kisérletezéssel. + + A leckében szereplõ utasítások módosítani fogják a szövegek. + Készítsen másolatot errõl a fájlról, ha gyakorolni akar. + (Ha "vimtutor"-ral indította, akkor ez már egy másolat.) + + Fontos megérteni, hogy ez az oktató cselekedve taníttat. + Ez azt jelenti, hogy Önnek ajánlott végrehajtania az utasításokat, + hogy megfelelõen megtanulja azokat. Ha csak olvassa, elfelejti! + + Most bizonyosodjon, meg, hogy a Caps-Lock gombja NINCS lenyomva, és + Nyomja meg megfelelõ számúszor a j gombot, hogy az 1.1-es + lecke teljesen a képernyõn legyen! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 1.1. lecke: A KURZOR MOZGATÁSA + + + ** A kurzor mozgatásához nyomja meg a h,j,k,l gombokat az alábbi szerint. ** + ^ + k Tipp: A h billentyû van balra, és balra mozgat + < h l > A l billentyû van jobbra, és jobbra mozgat + j A j billentyû olyan, mint egy lefele nyíl + v + 1. Mozgassa a kurzort körbe az ablakban, amíg hozzá nem szokik! + + 2. Tartsa lenyomva a lefelét (j), akkor ismétlõdik! +---> Most tudja, hogyan mehet a következõ leckére. + + 3. A lefelé gomb használatával menjen a 1.2. leckére! + +Megj: Ha nem biztos benne, mit nyomott meg, nyomja meg az -et, hogy + normál módba kerüljön, és ismételje meg a parancsot! + +Megj: A kurzor gomboknak is mûködniük kell, de a hjkl használatával + sokkal gyorsabban tud, mozogni, ha hozzászokik. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 1.2. lecke: BE ÉS KILÉPÉS A VIMBÕL + + + !! MEGJ: Mielõtt végrehajtja az alábbi lépéseket, olvassa végig a leckét !! + + 1. Nyomja meg az gombot (hogy biztosan normál módban legyen). + + 2. Írja: :q! . + +---> Ezzel kilép a szerkesztõbõl a változások MENTÉSE NÉLKÜL. + Ha menteni szeretné a változásokat és kilépni, írja: + :wq + + 3. Amikor a shell promptot látja, írja be a parancsot, amely ebbe az + oktatóba hozza: + Ez valószínûleg: vimtutor + Normális esetben ezt írná: vim tutor.hu + +---> 'vim' jelenti a vimbe belépést, 'tutor.hu' a fájl, amit szerkeszteni kíván. + + 4. Ha megjegyezte a lépéseket és biztos magában, hajtsa végre a lépéseket + 1-tõl 3-ig, hogy kilépjen és visszatérjen a szerkesztõbe. Azután + menjen az 1.3. leckére. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 1.3. lecke: SZÖVEG SZERKESZTÉSE - TÖRLÉS + + +** Normál módban nyomjon x-et, hogy a kurzor alatti karaktert törölje. ** + + 1. Mozgassa a kurzort a ---> kezdetû sorra! + + 2. A hibák kijavításához mozgassa a kurzort amíg a törlendõ karakter + fölé nem ér. + + 3. Nyomja meg az x gombot, hogy törölje a nemkívánt karaktert. + + 4. Ismételje a 2, 3, 4-es lépéseket, hogy kijavítsa a mondatot. + +---> ÕÕszi éjjjell izziik aa galaggonya rruuhája. + + 5. Ha a sor helyes, ugorjon a 1.4. leckére. + +MEGJ: A tanulás során ne memorizálni próbáljon, hanem használat során tanuljon. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 1.4. lecke: SZÖVEG SZERKESZTÉSE - BESZÚRÁS + + + ** Normál módban i megnyomásával lehet beilleszteni. ** + + 1. Az alábbi elsõ ---> kezdetû sorra menjen. + + 2. Ahhoz, hogy az elsõt azonossá tegye a másodikkal, mozgassa a kurzort + az elsõ karakterre, amely UTÁN szöveget kell beszúrni. + + 3. Nyomjon i-t és írja be a megfelelõ szöveget. + + 4. Amikor mindent beírt, nyomjon -et, hogy Normál módba visszatérjen. + Ismételje a 2 és 4 közötti lépéseket, hogy kijavítsa a mondatot. + +---> Az átható soól hizik pár ész. +---> Az itt látható sorból hiányzik pár rész. + + 5. Ha már begyakorolta a beszúrást, menjen az alábbi összefoglalóra. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 1. LECKE ÖSSZEFOGLALÓJA + + + 1. A kurzort vagy a nyilakkal vagy a hjkl gombokkal mozgathatja. + h (balra) j (le) k (fel) l (jobbra) + + 2. A Vimbe (a $ prompttól) így léphet be: vim FILENAME + + 3. A Vimbõl így léphet ki: :q! a változtatások eldobásával. + vagy így: :wq a változások mentésével. + + 4. A kurzor alatti karakter törlése normál módban: x + + 5. Szöveg beszúrása a kurzor után normál módban: + i gépelje be a szöveget + +MEGJ: Az megnyomása normál módba viszi, vagy megszakít egy nem befejezett + részben befejezett parancsot. + +Most folytassuk a 2. leckével! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2.1. lecke: TÖRLÕ UTASÍTÁSOK + + + ** dw töröl a szó végéig. ** + + 1. Nyomjon -et, hogy megbizonyosodjon, hogy normál módban van! + + 2. Mozgassa a kurzort a ---> kezdetû sorra! + + 3. Mozgassa a kurzort arra annak a szónak az elejére, amit törölni szeretne. + Törölje az állatokat a mondatból. + + 4. A szó törléséhez írja: dw + + MEGJ: Ha rosszul kezdte az utasítást csak nyomjon gombot + a megszakításához. + +---> Pár szó kutya nem uhu illik pingvin a mondatba tehén. + + 5. Ismételje a 3 és 4 közötti utasításokat amíg kell és ugorjon a 2.2 leckére! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2.2. lecke: MÉG TÖBB TÖRLÕ UTASÍTÁS + + + ** d$ beírásával a sor végéig törölhet. ** + + 1. Nyomjon -et, hogy megbizonyosodjon, hogy normál módban van! + + 2. Mozgassa a kurzort a ---> kezdetû sorra! + + 3. Mozgassa a kurzort a helyes sor végére (az elsõ . UTÁN)! + + 4. d$ begépeléséveltörölje a sor végét! + +---> Valaki a sor végét kétszer gépelte be. kétszer gépelte be. + + + 5. Menjen a 2.3. leckére, hogy megértse mi történt! + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2.3. lecke: UTASÍTÁSOKRÓL ÉS OBJEKTUMOKRÓL + + + A d (delete=törlés) utasítás formája a következõ: + + [szám] d objektum VAGY d [szám] objektum + Ahol: + szám - hányszor hajtódjon végre a parancs (elhagyható, alapérték=1). + d - a törlés (delete) utasítás. + objektum - amin a parancsnak teljesülnie kell (alább listázva). + + Objektumok rövid listája: + w - a kurzortól a szó végéig, beleértve a szóközt. + e - a kurzortól a szó végéig, NEM beleértve a szóközt. + $ - a kurzortól a sor végéig. + +MEGJ: Vállalkozóbbak kedvéért, csupán az objektum begépelésével parancs nélkül + a kurzor oda kerül, amit az objektumlista megad. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2.4. lecke: EGY KIVÉTEL A 'PARANCSOBJEKTUM' ALÓL + + + ** dd beírásával törölheti az egész sort. ** + + A teljes sor törlésének gyakorisága miatt a Vi tervezõi elhatározták, + hogy könnyebb lenne csupán a d-t kétszer megnyomni, hogy egy sort töröljünk. + + 1. Mozgassa a kurzort az alábbi kifejezések második sorára! + 2. dd begépelésével törölje a sort! + 3. Menjen a 4. (eredetileg 5.) sorra! + 4. 2dd (ugyebár szám-utasítás-objektum) begépelésével töröljön két sort! + + 1) Alvó szegek a jéghideg homokban, + 2) - kezdi a költõ - + 3) Plakátmagányban ázó éjjelek. + 4) Pingvinek ne féljetek, + 5) Távolról egy vaku villant, + 6) Égve hagytad a folyosón a villanyt. + 7) Ma ontják véremet. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2.5. lecke: A VISSZAVONÁS (UNDO) PARANCS + + +** u gépelésével visszavonható az utolsó parancs, U az egész sort helyreállítja. ** + + 1. Menjünk az alábbi ---> kezdetû sor elsõ hibájára! + 2. x lenyomásával törölje az elsõ felesleges karaktert! + 3. u megnyomásával vonja vissza az utolsónak végrehajtott utasítást! + 4. Másodjára javítson ki minden hibát a sorben az x utasítással! + 5. Most nagy U -val állítsa vissza a sor eredeti állapotát! + 6. Nyomja meg az u gombot párszor, hogy az U és sz elõzõ utasításokat + visszaállítsa! + 7. CTRL-R (CTRL gomb lenyomása mellett üssön R-t) párszor csinálja újra a + visszavont parancsokat (redo)! + +---> Javíítsa a hhibákaat ebbben a sooorban majd állítsa visszaaa az eredetit. + + 8. Ezek nagyon hasznos parancsok. Most ugorjon a 2. lecke összefoglalójára. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2. LECKE ÖSSZEFOGLALÓJA + + + 1. Törlés a kurzortól a szó végéig: dw + + 2. Törlés a kurzortól a sor végéig: d$ + + 3. Egész sor törlése: dd + + 4. Egy utasítás alakja normál módban: + + [szám] utasítás objektum VAGY utasítás [szám] objektum + ahol: + szám - hányszor ismételjük a parancsot + utasítás - mit tegyünk, pl. d a törléskor + objektum - mire hasson az utasítás, például w (szó=word), + $ (a sor végéig), stb. + + 5. Az elõzõ tett visszavonása (undo): u (kis u) + A sor összes változásának visszavonása: U (nagy U) + Visszavonások visszavonása: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 3.1. lecke: A BEILLESZTÉS (PUT) PARANCS + + + ** p leütésével az utolsónak töröltet a kurzor után illeszhetjük. ** + + 1. Mozgassuk a kurzort az alábbi sorok elsõ sorára. + + 2. dd leütésével töröljük a sort és eltérolódik a Vim pufferében. + + 3. Mozgassuk a kurzort azelõtt a sor ELÕTTI sorba, ahová mozgatni + szeretnénk a törölt sort. + + 4. Normál módban írjunk p betût a törölt sor beillesztéséhez. + + 5. Folytassuk a 2-4. utasításokkal hogy a helyes sorrendet kapjuk. + + d) Can you learn too? + b) Violets are blue, + c) Intelligence is learned, + a) Roses are red, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 3.2. lecke: AZ ÁTÍRÁS (REPLACE) PARANCS + + +** r és a karakterek leütésével a kurzor alatti karaktert megváltoztatjuk. ** + + 1. Mozgassuk a kurzort az elsõ ---> kezdetû sorra! + + 2. Mozgassuk a kurzort az elsõ hiba fölé! + + 3. r majd a kívánt karakter leütésével változtassuk meg a hibásat! + + 4. A 2. és 3. lépésekkel javítsuk az összes hibát! + +---> Whan this lime was tuoed in, someone presswd some wrojg keys! +---> When this line was typed in, someone pressed some wrong keys! + + 5. Menjünk a 3.2. leckére! + +MEGJ: Emlékezzen, hogy nem memorizálással, hanem gyakorlással tanuljon. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 3.3. lecke: A CSERE (CHANGE) PARANCS + + + ** A szó egy részének megváltoztatásához írjuk: cw . ** + + 1. Mozgassuk a kurzort az elsõ ---> kezdetû sorra! + + 2. Vigye a kurzort a Ezen szó z betûje fölé! + + 3. cw és a helyes szórész (itt 'bben') beírásával javítsa a szót! + + 4. lenyomása után a következõ hibára ugorjon (az elsõ cserélendõ + karakterre)! + + 5. A 3. és 4. lépések ismétlésével az elsõ mondatot tegye a másodikkal + azonossá! + +---> Ezen a sorrrrr pár szóra meg kell változzanak a change utaskírésõ. +---> Ebben a sorban pár szót meg kell változtatni a change utasítással. + +Vegyük észre, hogy a cw nem csak a szót írja át, hanem beszúró +(insert) módba vált. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 3.4. lecke: TÖBBFÉLE VÁLTOZTATÁS c-VEL + + + ** A c utasítás használható ugyanazokkal az objektumokkal mint a törlés ** + + 1. A change utasítás a törléssel azonosan viselkedik. A forma: + + [szám] c objektum OR c [szám] objektum + + 2. Az objektumok is azonosak, pl. w (szó), $ (sorvég), stb. + + 3. Mozgassuk a kurzort az elsõ ---> kezdetû sorra! + + 4. Menjünk az elsõ hibára! + + 5. c$ begépelésével a sorvégeket tegyük azonossá és nyomjunk -et! + +---> Ennek a sornak a vége kiigazításra szorul, hogy megegyezzen a másodikkal. +---> Ennek a sornak a vége a c$ paranccsal változtatható meg. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 3. LECKE ÖSSZEFOGLALÓJA + + + 1. A már törölt sort beillesztéséhez nyomjunk p-t. Ez a törölt szöveget + a kurzor UTÁN helyezi (ha sor került törlésre, a kurzor allatti sorba). + + 2. A kurzor alatti karakter átírásához az r-et és azt a karaktert + nyomjuk, amellyel az eredetit felül szeretnénk írni. + + 3. A változtatás (c) utasítás a karaktertõl az objektum végéig + változtatja meg az objektumot. Például a cw a kurzortól a szó végéig, + a c$ a sor végéig. + + 4. A változtatás formátuma: + + [szám] c objektum VAGY c [szám] objektum + +Ugorjunk a következõ leckére! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 4.1. lecke: HELY ÉS FÁJLÁLLAPOT + + + ** CTRL-g megnyomásával megnézhetjük a helyünket a fájlban és a fájl állapotát. + SHIFT-G leütésével a fájl adott sorára ugorhatunk. ** + + Megj: Olvassuk el az egész leckét a lépések végrehajtása elõtt!! + + 1. Tartsuk nyomva a Ctrl gombot és nyomjunk g-t. Az állapotsor + megjelenik a lap alján a fájlnévvel és az aktuális sor sorszámával. + Jegyezzük meg a sorszámot a 3. lépéshez! + + 2. Nyomjunk Shift-G-t a lap aljára ugráshoz! + + 3. Üssük be az eredeti sor számát, majd üssünk shift-G-t! Ezzel + visszajutunk az eredeti sorra ahol Ctrl-g-t nyomtunk. + (A beírt szám NEM fog megjelenni a képernyõn.) + + 4. Ha megjegyezte a feladatot, hajtsa végre az 1-3. lépéseket! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 4.2. lecke: A KERESÉS (SEARCH) PARANCS + + + ** / majd a kívánt kifejezés beírásával kereshetjük meg a kifejezést. ** + + 1. Normál módban üssünk / karaktert! Ez és a kurzor megjelenik + a képernyõ alján, ahogy a : utasítás is. + + 2. Írjuk be: 'hiibaa' ! Ez az a szó amit keresünk. + + 3. A kifejezés újabb kereséséhez üssük le egyszerûen: n . + A kifejezés ellenkezõ irányban történõ kereséséhez ezt üssük be: Shift-N . + + 4. Ha visszafelé szeretne keresni, akkor ? kell a ! helyett. + +---> "hiibaa" nem a helyes módja a hiba leírásának; a hiibaa egy hiba. + +Megj: Ha a keresés eléri a fájl végét, akkor az elején kezdi. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 4.3. lecke: ZÁRÓJELEK PÁRJÁNAK KERESÉSE + + + ** % leütésével megtaláljuk a ),], vagy } párját. ** + + 1. Helyezze a kurzort valamelyik (, [, vagy { zárójelre a ---> kezdetû + sorban! + + 2. Üssön % karaktert! + + 3. A kurzor a zárójel párjára fog ugrani. + + 4. % leütésével visszaugrik az eredeti zárójelre. + +---> Ez ( egy tesztsor (-ekkel, [-ekkel ] és {-ekkel } a sorban. )) + +Megj: Ez nagyon hasznos, ha olyan programot debugolunk, amelyben a + zárójelek nem párosak! + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 4.4. lecke: A HIBÁK KIJAVÍTÁSÁNAK EGY MÓDJA + + + ** :s/új/régi/g begépelésével az 'új'-ra cseréljük a 'régi'-t. ** + + 1. Menjünk a ---> kezdetû sorra! + + 2. Írjuk be: :s/eggy/egy . Ekkor csak az elsõ változik meg a + sorban. + + 3. Most ezt írjuk: :s/eggy/egg/g amely globálisan helyettesít + a sorban, azaz minden elõfordulást. + Ez a sorban minden elõfordulást helyettesít. + +---> eggy heggy meggy, szembe jön eggy másik heggy. + + 4. Két sor között a karaktersor minden elõfordulásának helyettesítése: + :#,#s/régi/új/g ahol #,# a két sor sorszáma. + :%s/régi/új/g a fájlbeli összes elõfordulás helyettesítése. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 4. LECKE ÖSSZEFOGLALÓJA + + + 1. Ctrl-g kiírja az kurzor helyét a fájlban és a fájl állapotát. + Shift-G a fájl végére megy, gg az elejére. Egy szám után + Shift-G az adott számú sorra ugrik. + + 2. / után egy kifejezés ELÕREFELE keresi a kifejezést. + 2. ? után egy kifejezés VISSZAFELE keresi a kifejezést. + Egy keresés után az n a következõ elõfordulást keresi azonos irányban + Shift-N az ellenkezõ irányban keres. + + 3. % begépelésével, ha (,),[,],{, vagy } karakteren vagyunk a zárójel + párjára ugrik. + + 4. az elsõ régi helyettesítése újjal a sorban :s/régi/új + az összes régi helyettesítése újjal a sorban :s/régi/új/g + két sor közötti kifejezésekre :#,#s/régi/új/g + # helyén az aktuális sor (.) és az utolsó ($) is állhat :.,$/régi/új/g + A fájlbeli összes elõfordulás helyettesítése :%s/régi/új/g + Mindenkori megerõsítésre vár 'c' hatására :%s/régi/új/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 5.1. lecke: KÜLSÕ PARANCS VÉGREHAJTÁSA + + + ** :! után külsõ parancsot írva végrehajtódik a parancs. ** + + 1. Írjuk be az ismerõs : parancsot, hogy a kurzort a képernyõ aljára + helyezzük. Ez lehetõvé teszi egy parancs beírását. + + 2. ! (felkiáltójel) beírásával tegyük lehetõvé külsõ héj (shell)-parancs + végrehajtását. + + 3. Írjunk például ls parancsot a ! után majd üssünk -t. Ez ki + fogja listázni a könyvtárunkat ugyanúgy, mintha a shell promptnál + lennénk. Vagy írja ezt :!dir ha az ls nem mûködik. + +Megj: Ilymódon bármely külsõ utasítás végrehajtható. + +Megj: Minden : parancs után -t kell ütni. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 5.2. lecke: BÕVEBBEN A FÁJLOK ÍRÁSÁRÓL + + + ** A fájlok változásait így írhatjuk ki :w FÁJLNÉV. ** + + 1. :!dir vagy :!ls beírásával listázzuk a könyvtárunkat! + Ön már tudja, hogy -t kell ütnie utána. + + 2. Válasszon egy fájlnevet, amely még nem létezik pl. TESZT! + + 3. Írja: :w TESZT (ahol TESZT a választott fájlnév)! + + 4. Ez elmenti a teljes fájlt (a Vim oktatóját) TESZT néven. + Ellenõrzésképp írjuk ismét :!dir hogy lássuk a könyvtárat! + (Felfelé gombbal : után az elõzõ utasítások visszahozhatóak.) + +Megj: Ha Ön kilépne a Vimbõl és és visszatérne a TESZT fájlnévvel, akkor a + fájl az oktató mentéskori pontos másolata lenne. + + 5. Távolítsa el a fájlt (MS-DOS): :!del TESZT + vagy (Unix): :!rm TESZT + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 5.3. lecke: EGY KIVÁLASZTOTT RÉSZ KIÍRÁSA + + + ** A fájl egy részének kiírásához írja :#,# w FÁJLNÉV ** + + 1. :!dir vagy :!ls beírásával listázza a könyvtárat, és válasszon egy + megfelelõ fájlnevet, pl. TESZT. + + 2. Mozgassa a kurzort ennek az oldalnak a tetejére, és nyomjon + Ctrl-g-t, hogy megtudja a sorszámot. JEGYEZZE MEG A SZÁMOT! + + 3. Most menjen a lap aljára, és üsse be ismét: Ctrl-g. EZT A SZÁMOT + IS JEGYEZZE MEG! + + 4. Ha csak ezt a részét szeretné menteni a fájlnak, írja :#,# w TESZT + ahol #,# a két sorszám, amit megjegyzett, TESZT az Ön fájlneve. + + 5. Ismét nézze meg, hogy a fájl ott van (:!dir) de NE törölje. + + 6. Vimben létezik egy másik lehetõség: nyomja meg a Shift-V gombpárt + az elsõ menteni kívánt soron, majd menjen le az utolsóra, ezután + írja :w TESZT2 Ekkor a TESZT2 fájlba kerül a kijelölt rész. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 5.4. lecke: RETRIEVING AND MERGING FILES + + + ** Egy fájl tartalmának beillesztéséhez írja :r FÁJLNÉV ** + + 1. :!dir beírásával nézze meg, hogy az Ön TESZT fájlja létezik még. + + 2. Helyezze a kurzort ennek az oldalnak a tetejére. + +MEGJ: A 3. lépés után az 5.3. leckét fogja látni. Azután LEFELÉ indulva + keresse meg ismét ezt a leckét. + + 3. Most szúrja be a TESZT nevû fájlt a :r TESZT paranccsal, ahol + TESZT az Ön fájljénak a neve. + +MEGJ: A fájl, amit beillesztett a kurzora alatt helyezkedik el. + + 4. Hogy ellenõrizzük, hogy a fájlt tényleg beillsztettük, menjen + vissza, és nézze meg, hogy kétszer szerepel az 5.3. lecke! Az eredeti + mellett a fájlból bemásolt is ott van. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 5. LECKE ÖSSZEFOGLALÓJA + + + 1. :!parancs végrehajt egy külsõ utasítást. + + Pár hasznos példa: + (MS-DOS) (Unix) + :!dir :!ls - könyvtárlista kiírása. + :!del FÁJLNÉV :!rm FÁJLNÉV - FÁJLNÉV nevû fájl törlése. + + 2. :w FÁJLNÉV kiírja a jelenlegi Vim-fájlt a lemezre FÁJNÉV néven. + + 3. :#,#w FÁJLNÉV kiírja a két sorszám (#) közötti sorokat FÁJLNÉV-be + Másik lehetõség, hogy a kezdõsornál Ctrl-v-t nyom lemegy az utolsó + sorra, majd ezt üti be :w FÁJLNÉV + + 4. :r FÁJLNÉV beolvassa a FÁJLNÉV fájlt és behelyezi a jelenlegi fájlba + a kurzorpozició utáni sorba. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 6.1. lecke: A MEGNYITÁS (OPEN) PARANCS + + +** o beírásával nyithat egy új sort a kurzor alatt és válthat beszúró módba ** + + 1. Mozgassuk a kurzort a ---> kezdetû sorra. + + 2. o (kicsi) beírásával nyisson egy sort a kurzor ALATT! Ekkor + automatikusan beszúró (insert) módba kerül. + + 3. Másolja le a ---> jelû sort és megnyomásával lépjen ki + a beszúró módból. + +---> Az o lenyomása után a kurzor a következõ sor elején áll beszúró módban. + + 4. A kurzor FELETTI for megnyitásához egyzserûen a nagy O betût írjon +kicsi helyett. Próbálja ki a következõ soron! +Nyisson egy új sort efelett Shift-O megnyomásával, mialatt a kurzor +ezen a soron áll. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 6.2. lecke: AZ APPEND PARANCS + + + ** a lenyomásával a kuror UTÁN szúrhatunk szöveget. ** + + 1. Mozgassuk a kurzort a következõ ---> kezdetû sor végére úgy, + hogy normál módban $ ír be. + + 2. a (kicsi) leütésével szöveget szúrhat be AMöGÉ a karakter mögé, + amelyen a kurzor áll. + (A nagy A az egész sor végére írja a szöveget.) + +Megj: A Vimben a sor legvégére is lehet állni, azonba ez elõdjében + a Vi-ban nem lehetséges, ezért abban az a nélkül elég körülményes + a sor végéhez szöveget írni. + + 3. Egészítse ki az elsõ sort. Vegye észre, hogy az a utasítás (append) + teljesen egyezik az i-vel (insert) csupán a beszúrt szöveg helye + különbözik. + +---> Ez a sor lehetõvé teszi Önnek, hogy gyakorolja +---> Ez a sor lehetõvé teszi Önnek, hogy gyakorolja a sor végére beillesztést. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 6.3. lecke: AZ ÁTÍRÁS MÁSIK VÁLTOZATA + + + ** Nagy R beírásával írhat felül több mint egy karaktert. ** + + 1. Mozgassuk a kurzort az elsõ ---> kezdetû sorra! + + 2. Helyezze a kurzort az elsõ szó elejére amely eltér a második + ---> kezdetû sor tartalmától (a 'az utolsóval' résztõl). + + 3. Nyomjon R karaktert és írja ét a szöveg maradékát az elsõ sorban + úgy, hogy a két sor egyezõ legyen. + +---> Az elsõ sort tegye azonossá az utolsóval: használja a gombokat. +---> Az elsõ sort tegye azonossá a másodikkal: írjon R-t és az új szöveget. + + 4. Jegyezzük meg, ha -et nyomok, akkor a változatlanuk hagyott + szövegek változatlanok maradnak. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 6.4. lecke: BEÁLLÍTÁSOK + +** Állítsuk be, hogy a keresés és a helyettesítés ne függjön kis/NAGYbetûktõl ** + + 1. Keressük meg az 'ignore'-t az beírva: + /ignore + Ezt ismételjük többször az n billentyûvel + + 2. Állítsuk be az 'ic' (Ignore case) lehetõséget így: + :set ic + + 3. Most keressünk ismét az 'ignore'-ra n-nel + Ismételjük meg többször a keresést: n + + 4. Állítsuk be a 'hlsearch' és 'incsearch' lehetõségeket: + :set hls is + + 5. Most ismét írjuk be a keresõparancsot, és lássuk mi történik: + /ignore + + 6. A kiemelést szüntessük meg alábbi utasítások egyikével: + :set nohls vagy :nohlsearch +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 6. LECKE ÖSSZEFOGLALÓJA + + + 1. o beírásával új sort nyitunk meg a sor ALATT és a kurzor az új + sorban lesz beszúrás-módban. + Nagy O a sor FELETT nyit új sort, és oda kerül a kurzor. + + 2. a beírásával az aktuális karaktertõl UTÁN (jobbra) szúrhatunk be szöveget. + Nagy A automatikusan a sor legvégéhez adja hozzá a szöveget. + + 3. A nagy R beütésével átíró (replace) módba kerülünk lenyomásáig. + + 4. ":set xxx" beírásával az "xxx" opció állítható be. + + + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 7. lecke: AZ ON-LINE SÚGÓ PARANCSAI + + + ** Az online súgórendszer használata ** + + A Vim részletes súgóval rendelkezik. Induláshoz a következõk egyikét + tegye: + - nyomja meg a gombot (ha van ilyen) + - nyomja meg az gombot (ha van ilyen) + - írja be: :help + + :q beírásával zárhatja be a súgóablakot. + + Majdnem minden témakörrõl találhat súgót, argumentum megadásával + ":help" utasítás . Próbálja az alábbiakat ki (-t ne felejtsük): + + :help w + :help c_, 2006-2008 + diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.hu.utf-8 b/vim/bundle/ubuntu-vim72/tutor/tutor.hu.utf-8 new file mode 100644 index 0000000..ec486d9 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.hu.utf-8 @@ -0,0 +1,830 @@ +=============================================================================== +== Ü d v ö z ö l j ü k a V I M - o k t a t ó b a n - 1.5-ös verzió == +=============================================================================== + + A Vim egy nagyon hatékony szerkesztÅ‘, amelnyek rengeteg utasítása + van, túl sok, hogy egy ilyen oktatóban (tutorban), mint az itteni + mindet elmagyarázzuk. Ez az oktató arra törekszik, hogy annyit + elmagyarázzon, amennyi elég, hogy könnyedén használjuk a Vim-et, az + általános célú szövegszerkesztÅ‘t. + + A feladatok megoldásához 25-30 perc szükséges attól függÅ‘en, + mennyit töltünk a kisérletezéssel. + + A leckében szereplÅ‘ utasítások módosítani fogják a szövegek. + Készítsen másolatot errÅ‘l a fájlról, ha gyakorolni akar. + (Ha "vimtutor"-ral indította, akkor ez már egy másolat.) + + Fontos megérteni, hogy ez az oktató cselekedve taníttat. + Ez azt jelenti, hogy Önnek ajánlott végrehajtania az utasításokat, + hogy megfelelÅ‘en megtanulja azokat. Ha csak olvassa, elfelejti! + + Most bizonyosodjon, meg, hogy a Caps-Lock gombja NINCS lenyomva, és + Nyomja meg megfelelÅ‘ számúszor a j gombot, hogy az 1.1-es + lecke teljesen a képernyÅ‘n legyen! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 1.1. lecke: A KURZOR MOZGATÃSA + + + ** A kurzor mozgatásához nyomja meg a h,j,k,l gombokat az alábbi szerint. ** + ^ + k Tipp: A h billentyű van balra, és balra mozgat + < h l > A l billentyű van jobbra, és jobbra mozgat + j A j billentyű olyan, mint egy lefele nyíl + v + 1. Mozgassa a kurzort körbe az ablakban, amíg hozzá nem szokik! + + 2. Tartsa lenyomva a lefelét (j), akkor ismétlÅ‘dik! +---> Most tudja, hogyan mehet a következÅ‘ leckére. + + 3. A lefelé gomb használatával menjen a 1.2. leckére! + +Megj: Ha nem biztos benne, mit nyomott meg, nyomja meg az -et, hogy + normál módba kerüljön, és ismételje meg a parancsot! + +Megj: A kurzor gomboknak is működniük kell, de a hjkl használatával + sokkal gyorsabban tud, mozogni, ha hozzászokik. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 1.2. lecke: BE ÉS KILÉPÉS A VIMBÅL + + + !! MEGJ: MielÅ‘tt végrehajtja az alábbi lépéseket, olvassa végig a leckét !! + + 1. Nyomja meg az gombot (hogy biztosan normál módban legyen). + + 2. Ãrja: :q! . + +---> Ezzel kilép a szerkesztÅ‘bÅ‘l a változások MENTÉSE NÉLKÜL. + Ha menteni szeretné a változásokat és kilépni, írja: + :wq + + 3. Amikor a shell promptot látja, írja be a parancsot, amely ebbe az + oktatóba hozza: + Ez valószínűleg: vimtutor + Normális esetben ezt írná: vim tutor.hu + +---> 'vim' jelenti a vimbe belépést, 'tutor.hu' a fájl, amit szerkeszteni kíván. + + 4. Ha megjegyezte a lépéseket és biztos magában, hajtsa végre a lépéseket + 1-tÅ‘l 3-ig, hogy kilépjen és visszatérjen a szerkesztÅ‘be. Azután + menjen az 1.3. leckére. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 1.3. lecke: SZÖVEG SZERKESZTÉSE - TÖRLÉS + + +** Normál módban nyomjon x-et, hogy a kurzor alatti karaktert törölje. ** + + 1. Mozgassa a kurzort a ---> kezdetű sorra! + + 2. A hibák kijavításához mozgassa a kurzort amíg a törlendÅ‘ karakter + fölé nem ér. + + 3. Nyomja meg az x gombot, hogy törölje a nemkívánt karaktert. + + 4. Ismételje a 2, 3, 4-es lépéseket, hogy kijavítsa a mondatot. + +---> ÅÅszi éjjjell izziik aa galaggonya rruuhája. + + 5. Ha a sor helyes, ugorjon a 1.4. leckére. + +MEGJ: A tanulás során ne memorizálni próbáljon, hanem használat során tanuljon. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 1.4. lecke: SZÖVEG SZERKESZTÉSE - BESZÚRÃS + + + ** Normál módban i megnyomásával lehet beilleszteni. ** + + 1. Az alábbi elsÅ‘ ---> kezdetű sorra menjen. + + 2. Ahhoz, hogy az elsÅ‘t azonossá tegye a másodikkal, mozgassa a kurzort + az elsÅ‘ karakterre, amely UTÃN szöveget kell beszúrni. + + 3. Nyomjon i-t és írja be a megfelelÅ‘ szöveget. + + 4. Amikor mindent beírt, nyomjon -et, hogy Normál módba visszatérjen. + Ismételje a 2 és 4 közötti lépéseket, hogy kijavítsa a mondatot. + +---> Az átható soól hizik pár ész. +---> Az itt látható sorból hiányzik pár rész. + + 5. Ha már begyakorolta a beszúrást, menjen az alábbi összefoglalóra. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 1. LECKE ÖSSZEFOGLALÓJA + + + 1. A kurzort vagy a nyilakkal vagy a hjkl gombokkal mozgathatja. + h (balra) j (le) k (fel) l (jobbra) + + 2. A Vimbe (a $ prompttól) így léphet be: vim FILENAME + + 3. A VimbÅ‘l így léphet ki: :q! a változtatások eldobásával. + vagy így: :wq a változások mentésével. + + 4. A kurzor alatti karakter törlése normál módban: x + + 5. Szöveg beszúrása a kurzor után normál módban: + i gépelje be a szöveget + +MEGJ: Az megnyomása normál módba viszi, vagy megszakít egy nem befejezett + részben befejezett parancsot. + +Most folytassuk a 2. leckével! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2.1. lecke: TÖRLÅ UTASÃTÃSOK + + + ** dw töröl a szó végéig. ** + + 1. Nyomjon -et, hogy megbizonyosodjon, hogy normál módban van! + + 2. Mozgassa a kurzort a ---> kezdetű sorra! + + 3. Mozgassa a kurzort arra annak a szónak az elejére, amit törölni szeretne. + Törölje az állatokat a mondatból. + + 4. A szó törléséhez írja: dw + + MEGJ: Ha rosszul kezdte az utasítást csak nyomjon gombot + a megszakításához. + +---> Pár szó kutya nem uhu illik pingvin a mondatba tehén. + + 5. Ismételje a 3 és 4 közötti utasításokat amíg kell és ugorjon a 2.2 leckére! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2.2. lecke: MÉG TÖBB TÖRLÅ UTASÃTÃS + + + ** d$ beírásával a sor végéig törölhet. ** + + 1. Nyomjon -et, hogy megbizonyosodjon, hogy normál módban van! + + 2. Mozgassa a kurzort a ---> kezdetű sorra! + + 3. Mozgassa a kurzort a helyes sor végére (az elsÅ‘ . UTÃN)! + + 4. d$ begépeléséveltörölje a sor végét! + +---> Valaki a sor végét kétszer gépelte be. kétszer gépelte be. + + + 5. Menjen a 2.3. leckére, hogy megértse mi történt! + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2.3. lecke: UTASÃTÃSOKRÓL ÉS OBJEKTUMOKRÓL + + + A d (delete=törlés) utasítás formája a következÅ‘: + + [szám] d objektum VAGY d [szám] objektum + Ahol: + szám - hányszor hajtódjon végre a parancs (elhagyható, alapérték=1). + d - a törlés (delete) utasítás. + objektum - amin a parancsnak teljesülnie kell (alább listázva). + + Objektumok rövid listája: + w - a kurzortól a szó végéig, beleértve a szóközt. + e - a kurzortól a szó végéig, NEM beleértve a szóközt. + $ - a kurzortól a sor végéig. + +MEGJ: Vállalkozóbbak kedvéért, csupán az objektum begépelésével parancs nélkül + a kurzor oda kerül, amit az objektumlista megad. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2.4. lecke: EGY KIVÉTEL A 'PARANCSOBJEKTUM' ALÓL + + + ** dd beírásával törölheti az egész sort. ** + + A teljes sor törlésének gyakorisága miatt a Vi tervezÅ‘i elhatározták, + hogy könnyebb lenne csupán a d-t kétszer megnyomni, hogy egy sort töröljünk. + + 1. Mozgassa a kurzort az alábbi kifejezések második sorára! + 2. dd begépelésével törölje a sort! + 3. Menjen a 4. (eredetileg 5.) sorra! + 4. 2dd (ugyebár szám-utasítás-objektum) begépelésével töröljön két sort! + + 1) Alvó szegek a jéghideg homokban, + 2) - kezdi a költÅ‘ - + 3) Plakátmagányban ázó éjjelek. + 4) Pingvinek ne féljetek, + 5) Távolról egy vaku villant, + 6) Égve hagytad a folyosón a villanyt. + 7) Ma ontják véremet. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2.5. lecke: A VISSZAVONÃS (UNDO) PARANCS + + +** u gépelésével visszavonható az utolsó parancs, U az egész sort helyreállítja. ** + + 1. Menjünk az alábbi ---> kezdetű sor elsÅ‘ hibájára! + 2. x lenyomásával törölje az elsÅ‘ felesleges karaktert! + 3. u megnyomásával vonja vissza az utolsónak végrehajtott utasítást! + 4. Másodjára javítson ki minden hibát a sorben az x utasítással! + 5. Most nagy U -val állítsa vissza a sor eredeti állapotát! + 6. Nyomja meg az u gombot párszor, hogy az U és sz elÅ‘zÅ‘ utasításokat + visszaállítsa! + 7. CTRL-R (CTRL gomb lenyomása mellett üssön R-t) párszor csinálja újra a + visszavont parancsokat (redo)! + +---> Javíítsa a hhibákaat ebbben a sooorban majd állítsa visszaaa az eredetit. + + 8. Ezek nagyon hasznos parancsok. Most ugorjon a 2. lecke összefoglalójára. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2. LECKE ÖSSZEFOGLALÓJA + + + 1. Törlés a kurzortól a szó végéig: dw + + 2. Törlés a kurzortól a sor végéig: d$ + + 3. Egész sor törlése: dd + + 4. Egy utasítás alakja normál módban: + + [szám] utasítás objektum VAGY utasítás [szám] objektum + ahol: + szám - hányszor ismételjük a parancsot + utasítás - mit tegyünk, pl. d a törléskor + objektum - mire hasson az utasítás, például w (szó=word), + $ (a sor végéig), stb. + + 5. Az elÅ‘zÅ‘ tett visszavonása (undo): u (kis u) + A sor összes változásának visszavonása: U (nagy U) + Visszavonások visszavonása: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 3.1. lecke: A BEILLESZTÉS (PUT) PARANCS + + + ** p leütésével az utolsónak töröltet a kurzor után illeszhetjük. ** + + 1. Mozgassuk a kurzort az alábbi sorok elsÅ‘ sorára. + + 2. dd leütésével töröljük a sort és eltérolódik a Vim pufferében. + + 3. Mozgassuk a kurzort azelÅ‘tt a sor ELÅTTI sorba, ahová mozgatni + szeretnénk a törölt sort. + + 4. Normál módban írjunk p betűt a törölt sor beillesztéséhez. + + 5. Folytassuk a 2-4. utasításokkal hogy a helyes sorrendet kapjuk. + + d) Can you learn too? + b) Violets are blue, + c) Intelligence is learned, + a) Roses are red, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 3.2. lecke: AZ ÃTÃRÃS (REPLACE) PARANCS + + +** r és a karakterek leütésével a kurzor alatti karaktert megváltoztatjuk. ** + + 1. Mozgassuk a kurzort az elsÅ‘ ---> kezdetű sorra! + + 2. Mozgassuk a kurzort az elsÅ‘ hiba fölé! + + 3. r majd a kívánt karakter leütésével változtassuk meg a hibásat! + + 4. A 2. és 3. lépésekkel javítsuk az összes hibát! + +---> Whan this lime was tuoed in, someone presswd some wrojg keys! +---> When this line was typed in, someone pressed some wrong keys! + + 5. Menjünk a 3.2. leckére! + +MEGJ: Emlékezzen, hogy nem memorizálással, hanem gyakorlással tanuljon. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 3.3. lecke: A CSERE (CHANGE) PARANCS + + + ** A szó egy részének megváltoztatásához írjuk: cw . ** + + 1. Mozgassuk a kurzort az elsÅ‘ ---> kezdetű sorra! + + 2. Vigye a kurzort a Ezen szó z betűje fölé! + + 3. cw és a helyes szórész (itt 'bben') beírásával javítsa a szót! + + 4. lenyomása után a következÅ‘ hibára ugorjon (az elsÅ‘ cserélendÅ‘ + karakterre)! + + 5. A 3. és 4. lépések ismétlésével az elsÅ‘ mondatot tegye a másodikkal + azonossá! + +---> Ezen a sorrrrr pár szóra meg kell változzanak a change utaskírésÅ‘. +---> Ebben a sorban pár szót meg kell változtatni a change utasítással. + +Vegyük észre, hogy a cw nem csak a szót írja át, hanem beszúró +(insert) módba vált. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 3.4. lecke: TÖBBFÉLE VÃLTOZTATÃS c-VEL + + + ** A c utasítás használható ugyanazokkal az objektumokkal mint a törlés ** + + 1. A change utasítás a törléssel azonosan viselkedik. A forma: + + [szám] c objektum OR c [szám] objektum + + 2. Az objektumok is azonosak, pl. w (szó), $ (sorvég), stb. + + 3. Mozgassuk a kurzort az elsÅ‘ ---> kezdetű sorra! + + 4. Menjünk az elsÅ‘ hibára! + + 5. c$ begépelésével a sorvégeket tegyük azonossá és nyomjunk -et! + +---> Ennek a sornak a vége kiigazításra szorul, hogy megegyezzen a másodikkal. +---> Ennek a sornak a vége a c$ paranccsal változtatható meg. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 3. LECKE ÖSSZEFOGLALÓJA + + + 1. A már törölt sort beillesztéséhez nyomjunk p-t. Ez a törölt szöveget + a kurzor UTÃN helyezi (ha sor került törlésre, a kurzor allatti sorba). + + 2. A kurzor alatti karakter átírásához az r-et és azt a karaktert + nyomjuk, amellyel az eredetit felül szeretnénk írni. + + 3. A változtatás (c) utasítás a karaktertÅ‘l az objektum végéig + változtatja meg az objektumot. Például a cw a kurzortól a szó végéig, + a c$ a sor végéig. + + 4. A változtatás formátuma: + + [szám] c objektum VAGY c [szám] objektum + +Ugorjunk a következÅ‘ leckére! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 4.1. lecke: HELY ÉS FÃJLÃLLAPOT + + + ** CTRL-g megnyomásával megnézhetjük a helyünket a fájlban és a fájl állapotát. + SHIFT-G leütésével a fájl adott sorára ugorhatunk. ** + + Megj: Olvassuk el az egész leckét a lépések végrehajtása elÅ‘tt!! + + 1. Tartsuk nyomva a Ctrl gombot és nyomjunk g-t. Az állapotsor + megjelenik a lap alján a fájlnévvel és az aktuális sor sorszámával. + Jegyezzük meg a sorszámot a 3. lépéshez! + + 2. Nyomjunk Shift-G-t a lap aljára ugráshoz! + + 3. Üssük be az eredeti sor számát, majd üssünk shift-G-t! Ezzel + visszajutunk az eredeti sorra ahol Ctrl-g-t nyomtunk. + (A beírt szám NEM fog megjelenni a képernyÅ‘n.) + + 4. Ha megjegyezte a feladatot, hajtsa végre az 1-3. lépéseket! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 4.2. lecke: A KERESÉS (SEARCH) PARANCS + + + ** / majd a kívánt kifejezés beírásával kereshetjük meg a kifejezést. ** + + 1. Normál módban üssünk / karaktert! Ez és a kurzor megjelenik + a képernyÅ‘ alján, ahogy a : utasítás is. + + 2. Ãrjuk be: 'hiibaa' ! Ez az a szó amit keresünk. + + 3. A kifejezés újabb kereséséhez üssük le egyszerűen: n . + A kifejezés ellenkezÅ‘ irányban történÅ‘ kereséséhez ezt üssük be: Shift-N . + + 4. Ha visszafelé szeretne keresni, akkor ? kell a ! helyett. + +---> "hiibaa" nem a helyes módja a hiba leírásának; a hiibaa egy hiba. + +Megj: Ha a keresés eléri a fájl végét, akkor az elején kezdi. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 4.3. lecke: ZÃRÓJELEK PÃRJÃNAK KERESÉSE + + + ** % leütésével megtaláljuk a ),], vagy } párját. ** + + 1. Helyezze a kurzort valamelyik (, [, vagy { zárójelre a ---> kezdetű + sorban! + + 2. Üssön % karaktert! + + 3. A kurzor a zárójel párjára fog ugrani. + + 4. % leütésével visszaugrik az eredeti zárójelre. + +---> Ez ( egy tesztsor (-ekkel, [-ekkel ] és {-ekkel } a sorban. )) + +Megj: Ez nagyon hasznos, ha olyan programot debugolunk, amelyben a + zárójelek nem párosak! + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 4.4. lecke: A HIBÃK KIJAVÃTÃSÃNAK EGY MÓDJA + + + ** :s/új/régi/g begépelésével az 'új'-ra cseréljük a 'régi'-t. ** + + 1. Menjünk a ---> kezdetű sorra! + + 2. Ãrjuk be: :s/eggy/egy . Ekkor csak az elsÅ‘ változik meg a + sorban. + + 3. Most ezt írjuk: :s/eggy/egg/g amely globálisan helyettesít + a sorban, azaz minden elÅ‘fordulást. + Ez a sorban minden elÅ‘fordulást helyettesít. + +---> eggy heggy meggy, szembe jön eggy másik heggy. + + 4. Két sor között a karaktersor minden elÅ‘fordulásának helyettesítése: + :#,#s/régi/új/g ahol #,# a két sor sorszáma. + :%s/régi/új/g a fájlbeli összes elÅ‘fordulás helyettesítése. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 4. LECKE ÖSSZEFOGLALÓJA + + + 1. Ctrl-g kiírja az kurzor helyét a fájlban és a fájl állapotát. + Shift-G a fájl végére megy, gg az elejére. Egy szám után + Shift-G az adott számú sorra ugrik. + + 2. / után egy kifejezés ELÅREFELE keresi a kifejezést. + 2. ? után egy kifejezés VISSZAFELE keresi a kifejezést. + Egy keresés után az n a következÅ‘ elÅ‘fordulást keresi azonos irányban + Shift-N az ellenkezÅ‘ irányban keres. + + 3. % begépelésével, ha (,),[,],{, vagy } karakteren vagyunk a zárójel + párjára ugrik. + + 4. az elsÅ‘ régi helyettesítése újjal a sorban :s/régi/új + az összes régi helyettesítése újjal a sorban :s/régi/új/g + két sor közötti kifejezésekre :#,#s/régi/új/g + # helyén az aktuális sor (.) és az utolsó ($) is állhat :.,$/régi/új/g + A fájlbeli összes elÅ‘fordulás helyettesítése :%s/régi/új/g + Mindenkori megerÅ‘sítésre vár 'c' hatására :%s/régi/új/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 5.1. lecke: KÜLSÅ PARANCS VÉGREHAJTÃSA + + + ** :! után külsÅ‘ parancsot írva végrehajtódik a parancs. ** + + 1. Ãrjuk be az ismerÅ‘s : parancsot, hogy a kurzort a képernyÅ‘ aljára + helyezzük. Ez lehetÅ‘vé teszi egy parancs beírását. + + 2. ! (felkiáltójel) beírásával tegyük lehetÅ‘vé külsÅ‘ héj (shell)-parancs + végrehajtását. + + 3. Ãrjunk például ls parancsot a ! után majd üssünk -t. Ez ki + fogja listázni a könyvtárunkat ugyanúgy, mintha a shell promptnál + lennénk. Vagy írja ezt :!dir ha az ls nem működik. + +Megj: Ilymódon bármely külsÅ‘ utasítás végrehajtható. + +Megj: Minden : parancs után -t kell ütni. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 5.2. lecke: BÅVEBBEN A FÃJLOK ÃRÃSÃRÓL + + + ** A fájlok változásait így írhatjuk ki :w FÃJLNÉV. ** + + 1. :!dir vagy :!ls beírásával listázzuk a könyvtárunkat! + Ön már tudja, hogy -t kell ütnie utána. + + 2. Válasszon egy fájlnevet, amely még nem létezik pl. TESZT! + + 3. Ãrja: :w TESZT (ahol TESZT a választott fájlnév)! + + 4. Ez elmenti a teljes fájlt (a Vim oktatóját) TESZT néven. + EllenÅ‘rzésképp írjuk ismét :!dir hogy lássuk a könyvtárat! + (Felfelé gombbal : után az elÅ‘zÅ‘ utasítások visszahozhatóak.) + +Megj: Ha Ön kilépne a VimbÅ‘l és és visszatérne a TESZT fájlnévvel, akkor a + fájl az oktató mentéskori pontos másolata lenne. + + 5. Távolítsa el a fájlt (MS-DOS): :!del TESZT + vagy (Unix): :!rm TESZT + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 5.3. lecke: EGY KIVÃLASZTOTT RÉSZ KIÃRÃSA + + + ** A fájl egy részének kiírásához írja :#,# w FÃJLNÉV ** + + 1. :!dir vagy :!ls beírásával listázza a könyvtárat, és válasszon egy + megfelelÅ‘ fájlnevet, pl. TESZT. + + 2. Mozgassa a kurzort ennek az oldalnak a tetejére, és nyomjon + Ctrl-g-t, hogy megtudja a sorszámot. JEGYEZZE MEG A SZÃMOT! + + 3. Most menjen a lap aljára, és üsse be ismét: Ctrl-g. EZT A SZÃMOT + IS JEGYEZZE MEG! + + 4. Ha csak ezt a részét szeretné menteni a fájlnak, írja :#,# w TESZT + ahol #,# a két sorszám, amit megjegyzett, TESZT az Ön fájlneve. + + 5. Ismét nézze meg, hogy a fájl ott van (:!dir) de NE törölje. + + 6. Vimben létezik egy másik lehetÅ‘ség: nyomja meg a Shift-V gombpárt + az elsÅ‘ menteni kívánt soron, majd menjen le az utolsóra, ezután + írja :w TESZT2 Ekkor a TESZT2 fájlba kerül a kijelölt rész. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 5.4. lecke: RETRIEVING AND MERGING FILES + + + ** Egy fájl tartalmának beillesztéséhez írja :r FÃJLNÉV ** + + 1. :!dir beírásával nézze meg, hogy az Ön TESZT fájlja létezik még. + + 2. Helyezze a kurzort ennek az oldalnak a tetejére. + +MEGJ: A 3. lépés után az 5.3. leckét fogja látni. Azután LEFELÉ indulva + keresse meg ismét ezt a leckét. + + 3. Most szúrja be a TESZT nevű fájlt a :r TESZT paranccsal, ahol + TESZT az Ön fájljénak a neve. + +MEGJ: A fájl, amit beillesztett a kurzora alatt helyezkedik el. + + 4. Hogy ellenÅ‘rizzük, hogy a fájlt tényleg beillsztettük, menjen + vissza, és nézze meg, hogy kétszer szerepel az 5.3. lecke! Az eredeti + mellett a fájlból bemásolt is ott van. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 5. LECKE ÖSSZEFOGLALÓJA + + + 1. :!parancs végrehajt egy külsÅ‘ utasítást. + + Pár hasznos példa: + (MS-DOS) (Unix) + :!dir :!ls - könyvtárlista kiírása. + :!del FÃJLNÉV :!rm FÃJLNÉV - FÃJLNÉV nevű fájl törlése. + + 2. :w FÃJLNÉV kiírja a jelenlegi Vim-fájlt a lemezre FÃJNÉV néven. + + 3. :#,#w FÃJLNÉV kiírja a két sorszám (#) közötti sorokat FÃJLNÉV-be + Másik lehetÅ‘ség, hogy a kezdÅ‘sornál Ctrl-v-t nyom lemegy az utolsó + sorra, majd ezt üti be :w FÃJLNÉV + + 4. :r FÃJLNÉV beolvassa a FÃJLNÉV fájlt és behelyezi a jelenlegi fájlba + a kurzorpozició utáni sorba. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 6.1. lecke: A MEGNYITÃS (OPEN) PARANCS + + +** o beírásával nyithat egy új sort a kurzor alatt és válthat beszúró módba ** + + 1. Mozgassuk a kurzort a ---> kezdetű sorra. + + 2. o (kicsi) beírásával nyisson egy sort a kurzor ALATT! Ekkor + automatikusan beszúró (insert) módba kerül. + + 3. Másolja le a ---> jelű sort és megnyomásával lépjen ki + a beszúró módból. + +---> Az o lenyomása után a kurzor a következÅ‘ sor elején áll beszúró módban. + + 4. A kurzor FELETTI for megnyitásához egyzserűen a nagy O betűt írjon +kicsi helyett. Próbálja ki a következÅ‘ soron! +Nyisson egy új sort efelett Shift-O megnyomásával, mialatt a kurzor +ezen a soron áll. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 6.2. lecke: AZ APPEND PARANCS + + + ** a lenyomásával a kuror UTÃN szúrhatunk szöveget. ** + + 1. Mozgassuk a kurzort a következÅ‘ ---> kezdetű sor végére úgy, + hogy normál módban $ ír be. + + 2. a (kicsi) leütésével szöveget szúrhat be AMöGÉ a karakter mögé, + amelyen a kurzor áll. + (A nagy A az egész sor végére írja a szöveget.) + +Megj: A Vimben a sor legvégére is lehet állni, azonba ez elÅ‘djében + a Vi-ban nem lehetséges, ezért abban az a nélkül elég körülményes + a sor végéhez szöveget írni. + + 3. Egészítse ki az elsÅ‘ sort. Vegye észre, hogy az a utasítás (append) + teljesen egyezik az i-vel (insert) csupán a beszúrt szöveg helye + különbözik. + +---> Ez a sor lehetÅ‘vé teszi Önnek, hogy gyakorolja +---> Ez a sor lehetÅ‘vé teszi Önnek, hogy gyakorolja a sor végére beillesztést. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 6.3. lecke: AZ ÃTÃRÃS MÃSIK VÃLTOZATA + + + ** Nagy R beírásával írhat felül több mint egy karaktert. ** + + 1. Mozgassuk a kurzort az elsÅ‘ ---> kezdetű sorra! + + 2. Helyezze a kurzort az elsÅ‘ szó elejére amely eltér a második + ---> kezdetű sor tartalmától (a 'az utolsóval' résztÅ‘l). + + 3. Nyomjon R karaktert és írja ét a szöveg maradékát az elsÅ‘ sorban + úgy, hogy a két sor egyezÅ‘ legyen. + +---> Az elsÅ‘ sort tegye azonossá az utolsóval: használja a gombokat. +---> Az elsÅ‘ sort tegye azonossá a másodikkal: írjon R-t és az új szöveget. + + 4. Jegyezzük meg, ha -et nyomok, akkor a változatlanuk hagyott + szövegek változatlanok maradnak. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 6.4. lecke: BEÃLLÃTÃSOK + +** Ãllítsuk be, hogy a keresés és a helyettesítés ne függjön kis/NAGYbetűktÅ‘l ** + + 1. Keressük meg az 'ignore'-t az beírva: + /ignore + Ezt ismételjük többször az n billentyűvel + + 2. Ãllítsuk be az 'ic' (Ignore case) lehetÅ‘séget így: + :set ic + + 3. Most keressünk ismét az 'ignore'-ra n-nel + Ismételjük meg többször a keresést: n + + 4. Ãllítsuk be a 'hlsearch' és 'incsearch' lehetÅ‘ségeket: + :set hls is + + 5. Most ismét írjuk be a keresÅ‘parancsot, és lássuk mi történik: + /ignore + + 6. A kiemelést szüntessük meg alábbi utasítások egyikével: + :set nohls vagy :nohlsearch +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 6. LECKE ÖSSZEFOGLALÓJA + + + 1. o beírásával új sort nyitunk meg a sor ALATT és a kurzor az új + sorban lesz beszúrás-módban. + Nagy O a sor FELETT nyit új sort, és oda kerül a kurzor. + + 2. a beírásával az aktuális karaktertÅ‘l UTÃN (jobbra) szúrhatunk be szöveget. + Nagy A automatikusan a sor legvégéhez adja hozzá a szöveget. + + 3. A nagy R beütésével átíró (replace) módba kerülünk lenyomásáig. + + 4. ":set xxx" beírásával az "xxx" opció állítható be. + + + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 7. lecke: AZ ON-LINE SÚGÓ PARANCSAI + + + ** Az online súgórendszer használata ** + + A Vim részletes súgóval rendelkezik. Induláshoz a következÅ‘k egyikét + tegye: + - nyomja meg a gombot (ha van ilyen) + - nyomja meg az gombot (ha van ilyen) + - írja be: :help + + :q beírásával zárhatja be a súgóablakot. + + Majdnem minden témakörrÅ‘l találhat súgót, argumentum megadásával + ":help" utasítás . Próbálja az alábbiakat ki (-t ne felejtsük): + + :help w + :help c_, 2006-2008 + diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.it b/vim/bundle/ubuntu-vim72/tutor/tutor.it new file mode 100644 index 0000000..b1f6798 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.it @@ -0,0 +1,967 @@ +=============================================================================== += Benvenuto alla G u i d a all'Editor V I M - Versione 1.7 = +=============================================================================== + + Vim è un Editor molto potente ed ha parecchi comandi, troppi per + spiegarli tutti in una guida come questa. Questa guida serve a + descrivere quei comandi che ti permettono di usare facilmente + Vim come Editor di uso generale. + + Il tempo necessario per completare la guida è circa 25-30 minuti, + a seconda di quanto tempo dedichi alla sperimentazione. + + ATTENZIONE! + I comandi nelle lezioni modificano questo testo. Fai una copia di questo + file per esercitarti (se hai usato "vimtutor", stai già usando una copia). + + E' importante non scordare che questa guida vuole insegnare tramite + l'uso. Questo vuol dire che devi eseguire i comandi per impararli + davvero. Se leggi il testo e basta, dimenticherai presto i comandi! + + Adesso, assicurati che il tasto BLOCCA-MAIUSCOLO non sia schiacciato + e premi il tasto j tanto da muovere il cursore fino a che la + Lezione 1.1 riempia completamente lo schermo. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 1.1: MOVIMENTI DEL CURSORE + + + ** Per muovere il cursore, premi i tasti h,j,k,l come indicato. ** + ^ + k NOTA: Il tasto h è a sinistra e muove a sinistra. + < h l > Il tasto l è a destra e muove a destra. + j Il tasto j ricorda una freccia in giù. + v + 1. Muovi il cursore sullo schermo finché non ti senti a tuo agio. + + 2. Tieni schiacciato il tasto "giù" (j) finché non si ripete il movimento. + Adesso sai come arrivare fino alla lezione seguente. + + 3. Usando il tasto "giù" spostati alla Lezione 1.2. + +NOTA: Quando non sei sicuro del tasto che hai premuto, premi per andare + in Modalità Normale [Normal Mode]. Poi ri-immetti il comando che volevi. + +NOTA: I tasti con le frecce fanno lo stesso servizio. Ma usando hjkl riesci + a muoverti molto più rapidamente, dopo che ci si abitua. Davvero! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 1.2: USCIRE DA VIM + + + !! NOTA: Prima di eseguire quanto richiesto, leggi la Lezione per intero!! + + 1. Premi il tasto (per assicurarti di essere in Modalità Normale). + + 2. Batti: :q! . + Così esci dall'Editor SCARTANDO qualsiasi modifica fatta. + + 3. Quando vedi il PROMPT della Shell, batti il comando con cui sei arrivato + qui. Sarebbe: vimtutor + + 4. Se hai memorizzato questi comandi e ti senti pronto, esegui i passi + da 1 a 3 per uscire e rientrare nell'Editor. + +NOTA: :q! SCARTA qualsiasi modifica fatta. In una delle prossime + lezioni imparerai come salvare un file che hai modificato. + + 5. Muovi in giù il cursore per passare alla lezione 1.3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 1.3: MODIFICA DI TESTI - CANCELLAZIONE + + + ** Premere x per cancellare il carattere sotto al cursore ** + + 1. Muovi il cursore alla linea più sotto, indicata da --->. + + 2. Per correggere errori, muovi il cursore fino a posizionarlo sopra il + carattere da cancellare. + + 3. Premi il tasto x per cancellare il carattere sbagliato. + + 4. Ripeti i passi da 2 a 4 finché la frase è corretta. + +---> La mmucca saltòò finnoo allaa lunnna. + + 5. Ora che la linea è corretta, vai alla Lezione 1.4 + +NOTA: Mentre segui questa guida, non cercare di imparare a memoria, + ma impara facendo pratica. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 1.4: MODIFICA DI TESTI - INSERIMENTO + + + ** Premere i per inserire testo. ** + + 1. Muovi il cursore alla prima linea qui sotto, indicata da --->. + + 2. Per rendere la prima linea uguale alla seconda, muovi il cursore sopra + il primo carattere DOPO la posizione in cui il testo va inserito. + + 3. Premi i e batti le aggiunte opportune. + + 4. Quando un errore è corretto, premi per tornare in Modalità Normale. + Ripeti i passi da 2 a 4 fino a completare la correzione della frase. + +---> C'era del tsto mncnt questa . +---> C'era del testo mancante da questa linea. + + 5. Quando sei a tuo agio nell'inserimento di testo vai alla lezione 1.5. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 1.5: MODIFICA DI TESTI - AGGIUNTA + + + ** Premere A per aggiungere testo a fine linea. ** + + 1. Muovi il cursore alla prima linea qui sotto, indicata da --->. + Non importa dove è posizionato il cursore sulla linea stessa. + + 2. Batti A e inserisci le necessarie aggiunte. + + 3. Alla fine della aggiunta premi per tornare in modalità Normale. + + 4. Muovi il cursore alla seconda linea indicata ---> e ripeti + i passi 2 e 3 per correggere questa frase. + +---> C'è del testo che manca da qu + C'è del testo che manca da questa linea. +---> C'è anche del testo che ma + C'è anche del testo che manca qui. + + 5. Quando sei a tuo agio nell'aggiunta di testo vai alla lezione 1.6. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 1.6: MODIFICARE UN FILE + + + ** Usare :wq per salvare un file e uscire. ** + + !! NOTA: Prima di eseguire quanto richiesto, leggi la Lezione per intero!! + + 1. Esci da Vim come hai fatto nella lezione 1.2: :q! + + 2. Quando vedi il PROMPT della Shell, batti il comando: vim tutor + 'vim' è il comando per richiamare Vim, 'tutor' è il nome del file che + desideri modificare. Usa un file che possa essere modificato. + + 3. Inserisci e cancella testo come hai imparato nelle lezioni precedenti. + + 4. Salva il file ed esci da Vim con: :wq + + 5. Rientra in vimtutor e scendi al sommario che segue. + + 6. Dopo aver letto i passi qui sopra ed averli compresi: eseguili. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 1 SOMMARIO + + + 1. Il cursore si muove usando i tasti con le frecce o i tasti hjkl. + h (sinistra) j (giù) k (su) l (destra) + + 2. Per eseguire Vim dal PROMPT della Shell batti: vim NOMEFILE + + 3. Per uscire da Vim batti: :q! per uscire senza salvare. + oppure batti: :wq per uscire salvando modifiche. + + 4. Per cancellare il carattere sotto al cursore batti: x + + 5. Per inserire testo subito prima del cursore batti: + i batti testo inserito inserisci prima del cursore + A batti testo aggiunto aggiungi a fine linea + +NOTA: premendo ritornerai in Modalità Normale o annullerai + un comando errato che puoi aver inserito in parte. + +Ora continua con la Lezione 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 2.1: COMANDI DI CANCELLAZIONE + + + ** Batti dw per cancellare una parola. ** + + 1. Premi per accertarti di essere in Modalità Normale. + + 2. Muovi il cursore fino alla linea qui sotto, indicata da --->. + + 3. Muovi il cursore all'inizio di una parola che vuoi cancellare. + + 4. Batti dw per cancellare la parola. + +NOTA: La lettera d sarà visibile sull'ultima linea dello schermo mentre la + batti. Vim attende che tu batta w . Se vedi una lettera diversa + da d hai battuto qualcosa di sbagliato; premi e ricomincia. + +---> Ci sono le alcune parole gioia che non c'entrano carta in questa frase. + + 5. Ripeti i passi 3 e 4 finché la frase è corretta, poi vai alla Lezione 2.2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 2.2: ALTRI COMANDI DI CANCELLAZIONE + + + ** Batti d$ per cancellare fino a fine linea. ** + + 1. Premi per accertarti di essere in Modalità Normale. + + 2. Muovi il cursore fino alla linea qui sotto, indicata da --->. + + 3. Muovi il cursore alla fine della linea corretta (DOPO il primo . ). + + 4. Batti d$ per cancellare fino a fine linea. + +---> Qualcuno ha battuto la fine di questa linea due volte. linea due volte. + + + 5. Vai alla Lezione 2.3 per capire il funzionamento di questo comando. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 2.3: OPERATORI E MOVIMENTI + + + Molti comandi di modifica testi consistono in un operatore e un movimento. + Il formato del comando di cancellazione con l'operatore d è il seguente: + + d movimento + + Dove: + d - è l'operatore di cancellazione + movimento - indica dove l'operatore va applicato (lista qui sotto). + + Breve lista di movimenti: + w - fino a inizio della parola seguente, ESCLUSO il suo primo carattere. + e - alla fine della parola corrente, COMPRESO il suo ultimo carattere. + $ - dal cursore fino a fine linea, COMPRESO l'ultimo carattere della linea. + + Quindi se batti de cancelli dal cursore fino a fine parola. + +NOTA: Se batti solo il movimento mentre sei in Modalità Normale, senza + nessun operatore, il cursore si muoverà come specificato. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 2.4: USO DI UN CONTATORE PER UN MOVIMENTO + + + ** Se batti un numero prima di un movimento, lo ripeti altrettante volte. ** + + 1. Muovi il cursore fino all'inizio della linea qui sotto, indicata da --->. + + 2. Batti 2w per spostare il cursore due parole più avanti. + + 3. Batti 3e per spostare il cursore alla fine della terza parola seguente. + + 4. Batti 0 (zero) per posizionarti all'inizio della linea. + + 5. Ripeti i passi 2 e 3 usando numeri differenti. + +---> Questa è solo una linea con parole all'interno della quale puoi muoverti. + + 6. Vai alla Lezione 2.5. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 2.5: USO DI UN CONTATORE PER CANCELLARE DI PIU' + + + ** Se batti un numero prima di un movimento, lo ripeti altrettante volte. ** + + Nella combinazione dell'operatore cancella e di un movimento, descritto prima, + inserite un contatore prima del movimento per cancellare di più: + d numero movimento + + 1. Muovi il cursore alla prima parola MAIUSCOLA nella riga indicata da --->. + + 2. Batti d2w per cancellare le due parole MAIUSCOLE + + 3. Ripeti i passi 1 e 2 con un contatore diverso per cancellare la parole + MAIUSCOLE consecutive con un solo comando + +---> questa ABC DE linea FGHI JK LMN OP di parole è Q RS TUV ora ripulita. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 2.6: LAVORARE SU LINEE INTERE + + ** Batti dd per cancellare un'intera linea. ** + + Per la frequenza con cui capita di cancellare linee intere, chi ha + disegnato Vi ha deciso che sarebbe stato più semplice battere + due d consecutive per cancellare una linea. + + 1. Muovi il cursore alla linea 2) nella frase qui sotto. + 2. Batti dd per cancellare la linea. + 3. Ora spostati alla linea 4). + 4. Batti 2dd per cancellare due linee. + +---> 1) Le rose sono rosse, +---> 2) Il fango è divertente, +---> 3) Le viole sono blu, +---> 4) Io ho un'automobile, +---> 5) Gli orologi segnano il tempo, +---> 6) Lo zucchero è dolce, +---> 7) E così sei anche tu. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 2.7: IL COMANDO UNDO [ANNULLA] + + ** Premi u per annullare gli ultimi comandi eseguiti. ** + ** Premi U per annullare le modifiche all'ultima linea. ** + + 1. Muovi il cursore fino alla linea qui sotto, indicata da --->. + e posizionati sul primo errore. + 2. Batti x per cancellare il primo carattere sbagliato. + 3. Adesso batti u per annullare l'ultimo comando eseguito. + 4. Ora invece, correggi tutti gli errori sulla linea usando il comando x . + 5. Adesso batti una U Maiuscola per riportare la linea al suo stato originale. + 6. Adesso batti u più volte per annullare la U e i comandi precedenti. + 7. Adesso batti più volte CTRL-r (tieni il tasto CTRL schiacciato + mentre batti r) per rieseguire i comandi (annullare l'annullamento). + +---> Correeggi gli errori ssu quuesta linea e riimpiazzali coon "undo". + + 8. Questi comandi sono molto utili. Ora spostati al Sommario della Lezione 2. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 2 SOMMARIO + + + 1. Per cancellare dal cursore fino alla parola seguente batti: dw + 2. Per cancellare dal cursore fino alla fine della linea batti: d$ + 3. Per cancellare un'intera linea batti: dd + 4. Per eseguire più volte un movimento, mettici davanti un numero: 2w + 5. Il formato per un comando di modifica è: + + operatore [numero] movimento + dove: + operatore - indica il da farsi, ad es. d per [delete] cancellare + [numero] - contatore facoltativo di ripetizione del movimento + movimento - spostamento nel testo su cui operare, ad es. + w [word] parola, $ (fino a fine linea), etc. + + 6. Per andare a inizio linea usate uno zero: 0 + 7. Per annullare i comandi precedenti, batti: u (u minuscola) + Per annullare tutte le modifiche a una linea batti: U (U maiuscola) + Per annullare l'annullamento ["redo"] batti: CTRL-r + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 3.1: IL COMANDO PUT [METTI, PONI] + + + ** Batti p per porre [put] testo (cancellato prima) dopo il cursore. ** + + 1. Muovi il cursore alla prima linea indicata con ---> qui in basso. + + 2. Batti dd per cancellare la linea e depositarla in un registro di Vim. + + 3. Muovi il cursore fino alla linea c) SOPRA quella dove andrebbe messa + la linea appena cancellata. + + 4. Batti p per mettere la linea sotto il cursore. + + 5. Ripeti i passi da 2 a 4 per mettere tutte le linee nel giusto ordine. + +---> d) Puoi impararla tu? +---> b) Le viole sono blu, +---> c) La saggezza si impara, +---> a) Le rose sono rosse, + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 3.2: IL COMANDO REPLACE [RIMPIAZZARE] + + + ** Batti rx per rimpiazzare il carattere sotto al cursore con x . ** + + 1. Muovi il cursore alla prima linea qui sotto, indicata da --->. + + 2. Muovi il cursore fino a posizionarlo sopra il primo errore. + + 3. Batti r e poi il carattere che dovrebbe stare qui. + + 4. Ripeti i passi 2 e 3 finché la prima linea è uguale alla seconda. + +---> Ammattendo quetta lince, qualcuno ho predato alcuni tosti sballiati! +---> Immettendo questa linea, qualcuno ha premuto alcuni tasti sbagliati! + + 5. Ora passa alla Lezione 3.2. + +NOTA: Ricordati che dovresti imparare con la pratica, non solo leggendo. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 3.3: L'OPERATORE CHANGE [CAMBIA] + + + ** Per cambiare fino alla fine di una parola, batti ce . ** + + 1. Muovi il cursore alla prima linea qui sotto, indicata da --->. + + 2. Posiziona il cursore alla u in lubw. + + 3. Batti ce e la parola corretta (in questo caso, batti inea ). + + 4. Premi e vai sul prossimo carattere da modificare. + + 5. Ripeti i passi 3 e 4 finché la prima frase è uguale alla seconda. + +---> Questa lubw ha alcune pptfd da asdert usgfk l'operatore CHANGE. +---> Questa linea ha alcune parole da cambiare usando l'operatore CHANGE. + +Nota che ce cancella la parola, e ti mette anche in Modalità Inserimento + [Insert Mode] + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 3.4: ALTRI CAMBIAMENTI USANDO c + +** L'operatore c [CHANGE] agisce sugli stessi movimenti di d [DELETE] ** + + 1. L'operatore CHANGE si comporta come DELETE. Il formato è: + + c [numero] movimento + + 2. I movimenti sono gli stessi, + ad es. w (word, parola), $ (fine linea), etc. + + 3. Muovi il cursore alla prima linea qui sotto, indicata da --->. + + 4. Posiziona il cursore al primo errore. + + 5. Batti c$ e inserisci resto della linea utilizzando come modello la + linea seguente, e quando hai finito premi + +---> La fine di questa linea deve essere aiutata a divenire come la seguente. +---> La fine di questa linea deve essere corretta usando il comando c$ . + +NOTA: Puoi usare il tasto Backspace se devi correggere errori di battitura. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 3 SOMMARIO + + + 1. Per reinserire del testo appena cancellato, batti p . Questo + inserisce [pone] il testo cancellato DOPO il cursore (se era stata tolta + una linea intera, questa verrà messa nella linea SOTTO il cursore). + + 2. Per rimpiazzare il carattere sotto il cursore, batti r e poi il + carattere che vuoi sostituire. + + 3. L'operatore change ti permette di cambiare dal cursore fino a dove + arriva il movimento. Ad es. Batti ce per cambiare dal cursore + fino alla fine della parola, c$ per cambiare fino a fine linea. + + 4. Il formato di change è: + + c [numero] movimento + +Ora vai alla prossima Lezione. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 4.1: POSIZIONAMENTO E SITUAZIONE FILE + + ** Batti CTRL-G per vedere a che punto sei nel file e la situazione ** + ** del file. Batti G per raggiungere una linea nel file. ** + + NOTA: Leggi l'intera Lezione prima di eseguire un qualsiasi passo!! + + 1. Tieni premuto il tasto CTRL e batti g . Ossia batti CTRL-G. + Un messaggio apparirà in fondo alla pagina con il NOME FILE e la + posizione nel file. Ricordati il numero della linea per il Passo 3. + +NOTA: La posizione del cursore si vede nell'angolo in basso a destra dello + schermo, se è impostata l'opzione 'ruler' (righello, vedi :help ruler). + + 2. Premi G [G Maiuscolo] per posizionarti in fondo al file. + Batti gg per posizionarti in cima al file. + + 3. Batti il numero della linea in cui ti trovavi e poi G . Questo ti + riporterà fino alla linea in cui ti trovavi quando avevi battuto CTRL-g. + + 4. Se ti senti sicuro nel farlo, esegui i passi da 1 a 3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 4.2: IL COMANDO SEARCH [RICERCA] + + ** Batti / seguito da una frase per ricercare quella frase. ** + + 1. in Modalità Normale batti il carattere / . Nota che la "/" e il cursore + sono visibili in fondo dello schermo come quando si usa il comando : . + + 2. Adesso batti 'errroore' . Questa è la parola che vuoi ricercare. + + 3. Per ricercare ancora la stessa frase, batti soltanto n . + Per ricercare la stessa frase in direzione opposta, batti N . + + 4. Per ricercare una frase nella direzione opposta, usa ? al posto di / . + + 5. Per tornare dove eri prima nel file premi CTRL-O (tieni il tasto CTRL + schiacciato mentre premi la lettera o). Ripeti CTRL-O per andare ancora + indietro. Puoi usare CTRL-I per tornare in avanti. + +NOTA: "errroore" non è il modo giusto di digitare errore; errroore è un errore. +NOTA: Quando la ricerca arriva a fine file, ricomincia dall'inizio del file, + a meno che l'opzione 'wrapscan' sia stata disattivata. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 4.3: RICERCA DI PARENTESI CORRISPONDENTI + + + ** Batti % per trovare una ),], o } corrispondente. ** + + 1. Posiziona il cursore su una (, [, o { nella linea sotto, indicata da --->. + + 2. Adesso batti il carattere % . + + 3. Il cursore si sposterà sulla parentesi corrispondente. + + 4. Batti % per muovere il cursore all'altra parentesi corrispondente. + +---> Questa ( è una linea di test con (, [ ] e { } al suo interno. )) + + +NOTA: Questo è molto utile nel "debug" di un programma con parentesi errate! + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 4.4: L'OPERATORE SOSTITUZIONE (SUBSTITUTE) + + ** Batti :s/vecchio/nuovo/g per sostituire 'nuovo' a 'vecchio'. ** + + 1. Muovi il cursore fino alla linea qui sotto, indicata da --->. + + 2. Batti :s/lla/la . Nota che questo comando cambia solo + LA PRIMA occorrenza di "lla" sulla linea. + + 3. Adesso batti :s/lla/la/g . Aggiungendo la flag g si chiede di + sostituire "globalmente" sulla linea, ossia tutte le occorrenze + di "lla" sulla linea. + +---> lla stagione migliore per lla fioritura è lla primavera. + + 4. Per cambiare ogni ricorrenza di una stringa di caratteri tra due linee, + batti :#,#s/vecchio/nuovo/g dove #,# sono i numeri che delimitano + il gruppo di linee in cui si vuole sostituire. + Batti :%s/vecchio/nuovo/g per cambiare ogni occorrenza nell'intero file. + Batti :%s/vecchio/nuovo/gc per trovare ogni occorrenza nell'intero file + ricevendo per ognuna una richiesta se + effettuare o meno la sostituzione. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 4 SOMMARIO + + +1. CTRL-G visualizza a che punto sei nel file e la situazione del file. + G [G Maiuscolo] ti porta all'ultima linea del file. + numero G ti porta alla linea con quel numero. + gg ti porta alla prima linea del file. + +2. Battendo / seguito da una frase ricerca IN AVANTI quella frase. + Battendo ? seguito da una frase ricerca ALL'INDIETRO quella frase. + DOPO una ricerca batti n per trovare la prossima occorrenza nella + stessa direzione, oppure N per cercare in direzione opposta. + CTRL-O ti porta alla posizione precedente, CTRL-I a quella più nuova. + +3. Battendo % mentre il cursore si trova su (,),[,],{, oppure } + ti posizioni sulla corrispondente parentesi. + +4. Per sostituire "nuovo" al primo "vecchio" in 1 linea batti :s/vecchio/nuovo + Per sostituire "nuovo" ad ogni "vecchio" in 1 linea batti :s/vecchio/nuovo/g + Per sostituire frasi tra 2 numeri di linea [#] batti :#,#s/vecchio/nuovo/g + Per sostituire tutte le occorrenze nel file batti :%s/vecchio/nuovo/g + Per chiedere conferma ogni volta aggiungi 'c' :%s/vecchio/nuovo/gc +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 5.1: COME ESEGUIRE UN COMANDO ESTERNO + + + ** Batti :! seguito da un comando esterno per eseguire quel comando. ** + + 1. Batti il comando : per posizionare il cursore in fondo allo schermo. + Ciò ti permette di immettere un comando dalla linea comandi. + + 2. Adesso batti il carattere ! (punto esclamativo). Ciò ti permette di + eseguire qualsiasi comando esterno si possa eseguire nella "shell". + + 3. Ad esempio batti ls dopo il ! e poi premi . Questo + visualizza una lista della tua directory, proprio come se fossi in una + "shell". Usa :!dir se ls non funziona. [Unix: ls MS-DOS: dir] + +NOTA: E' possibile in questo modo eseguire un comando a piacere, specificando + anche dei parametri per i comandi stessi. + +NOTA: Tutti i comandi : devono essere terminati premendo + Da qui in avanti non lo ripeteremo ogni volta. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 5.2: ANCORA SULLA SCRITTURA DEI FILE + + + ** Per salvare le modifiche apportate a un testo batti :w NOMEFILE. ** + + 1. Batti :!dir or :!ls per procurarti una lista della tua directory. + Già sai che devi premere dopo aver scritto il comando. + + 2. Scegli un NOMEFILE che ancora non esista, ad es. TEST . + + 3. Adesso batti: :w TEST (dove TEST è il NOMEFILE che hai scelto). + + 4. Questo salva l'intero file ("tutor.it") con il nome di TEST. + Per verifica batti ancora :!dir o :!ls per listare la tua directory. + +NOTA: Se esci da Vim e riesegui Vim battendo vim TEST , il file aperto + sarà una copia esatta di "tutor.it" al momento del salvataggio. + + 5. Ora cancella il file battendo (MR-DOS): :!del TEST + o (Unix): :!rm TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 5.3: SELEZIONARE IL TESTO DA SCRIVERE + + ** Per salvare una porzione di file, batti v movimento :w NOMEFILE ** + + 1. Muovi il cursore su questa linea. + + 2. Premi v e muovi il cursore fino alla linea numerata 5., qui sotto. + Nota che il testo viene evidenziato. + + 3. Batti il carattere : . In fondo allo schermo apparirà :'<,'> . + + 4. Batti w TEST , dove TEST è il nome di un file non ancora esistente. + Verifica che si veda :'<,'>w TEST prima di dare . + + 5. Vim scriverà nel file TEST le linee che hai selezionato. Usa :!dir + o :!ls per controllare che esiste. Non cancellarlo ora! Ti servirà + nella prossima lezione. + +NOTA: Battere v inizia una selezione visuale. Puoi muovere il cursore + come vuoi, e rendere la selezione più piccola o più grande. Poi + puoi usare un operatore per agire sul testo selezionato. + Ad es., d cancella il testo. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 5.4: INSERIRE E RIUNIRE FILE + + + ** Per inserire il contenuto di un file, batti :r NOMEFILE ** + + 1. Posiziona il cursore appena sopra questa riga. + +NOTA: Dopo aver eseguito il Passo 2 vedrai il testo della Lezione 5.3. + Quindi spostati IN GIU' per tornare ancora a questa Lezione. + + 2. Ora inserisci il tuo file TEST con il comando :r TEST dove TEST è + il nome che hai usato per creare il file. + Il file richiesto è inserito sotto la linea in cui si trova il cursore. + + 3. Per verificare che un file è stato inserito, torna indietro col cursore + e nota che ci sono ora 2 copie della Lezione 5.3, quella originale e + quella che viene dal file. + +NOTA: Puoi anche leggere l'output prodotto da un comando esterno. Ad es. + :r !ls legge l'output del comando ls e lo inserisce sotto la linea + in cui si trova il cursore. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 5 SOMMARIO + + + 1. :!comando esegue un comando esterno. + + Alcuni esempi utili sono [in MSDOS]: + :!dir - visualizza lista directory + :!del NOMEFILE - cancella file NOMEFILE. + + 2. :w NOMEFILE scrive su disco il file che stai editando con nome NOMEFILE. + + 3. v movimento :w NOMEFILE salva le linee selezionate in maniera + visuale nel file NOMEFILE. + + 4. :r NOMEFILE legge il file NOMEFILE da disco e lo inserisce nel file + che stai modificando, dopo la linea in cui è posizionato il cursore. + + 5. :r !dir legge l'output del comando dir e lo inserisce dopo la + linea in cui è posizionato il cursore. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 6.1: IL COMANDO OPEN [APRIRE] + + + ** Batti o per aprire una linea sotto il cursore ** + ** e passare in Modalità Inserimento. ** + + 1. Muovi il cursore fino alla linea qui sotto, indicata da --->. + + 2. Batti la lettera minuscola o per aprire una linea sotto il cursore e + passare in Modalità Inserimento. + + 3. Poi inserisci del testo e premi per uscire dalla + Modalità Inserimento. + +---> Dopo battuto o il cursore è sulla linea aperta (in Modalità Inserimento). + + 4. Per aprire una linea SOPRA il cursore, batti una O maiuscola, invece + che una o minuscola. Prova sulla linea qui sotto. +Apri una linea SOPRA questa battendo O mentre il cursore è su questa linea. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 6.2: IL COMANDO APPEND [AGGIUNGERE] + + ** Batti a per inserire testo DOPO il cursore. ** + + 1. Muovi il cursore all'inizio della linea qui sotto, indicata da --->. + + 2. Batti e finché il cursore arriva alla fine di li . + + 3. Batti una a (minuscola) per aggiungere testo DOPO il cursore. + + 4. Completa la parola come mostrato nella linea successiva. Premi + per uscire dalla Modalità Inserimento. + + 5. Usa e per passare alla successiva parola incompleta e ripeti i passi + 3 e 4. + +---> Questa li ti permetterà di esercit ad aggiungere testo a una linea. +---> Questa linea ti permetterà di esercitarti ad aggiungere testo a una linea. + +NOTA: a, i ed A entrano sempre in Modalità Inserimento, la sola differenza + è dove verranno inseriti i caratteri. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 6.3: UN ALTRO MODO DI RIMPIAZZARE [REPLACE] + + + ** Batti una R maiuscola per rimpiazzare più di un carattere. ** + + 1. Muovi il cursore alla prima linea qui sotto, indicata da --->. Muovi il + cursore all'inizio del primo xxx . + + 2. Ora batti R e batti il numero che vedi nella linea seguente, in modo + che rimpiazzi l' xxx . + + 3. Premi per uscire dalla Modalità Replace. Nota che il resto della + linea resta invariato. + + 4. Ripeti i passi in modo da rimpiazzare l'altro xxx . + +---> Aggiungendo 123 a xxx si ottiene xxx. +---> Aggiungendo 123 a 456 si ottiene 579. + +NOTA: La Modalità Replace è come la Modalità Inserimento, ma ogni carattere + che viene battuto ricopre un carattere esistente. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 6.4: COPIA E INCOLLA DEL TESTO + + + ** usa l'operatore y per copiare del testo e p per incollarlo ** + + 1. Vai alla linea indicata da ---> qui sotto, e metti il cursore dopo "a)". + + 2. Entra in Modalità Visuale con v e metti il cursore davanti a "primo". + + 3. Batti y per copiare [yank] il testo evidenziato. + + 4. Muovi il cursore alla fine della linea successiva: j$ + + 5. Batti p per incollare [paste] il testo. Poi batti: a secondo . + + 6. Usa la Modalità Visuale per selezionare " elemento.", copialo con y , + Vai alla fine della linea successiva con j$ e incolla il testo con p . + +---> a) questo è il primo elemento. + b) + +NOTA: Puoi usare y come operatore; yw copia una parola [word]. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 6.5: SET [IMPOSTA] UN'OPZIONE + + ** Imposta un'opzione per ignorare maiuscole/minuscole ** + ** durante la ricerca/sostituzione ** + + 1. Ricerca 'nota' battendo: /nota + Ripeti la ricerca più volte usando il tasto n + + 2. Imposta l'opzione 'ic' (Ignore Case, [Ignora maiuscolo/minuscolo]) + battendo: :set ic + + 3. Ora ricerca ancora 'nota' premendo il tasto n + Troverai adesso anche Nota e NOTA . + + 4. Imposta le opzioni 'hlsearch' e 'incsearch' :set hls is + + 5. Ora batti ancora il comando di ricerca, e guarda cosa succede: /nota + + 6. Per disabilitare il riconoscimento di maiuscole/minuscole batti: :set noic +NOTA: Per non evidenziare le occorrenze trovate batti: :nohlsearch +NOTA: Per ignorare maiuscole/minuscole solo per una ricerca, usa \c + nel comando di ricerca: /nota\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 6 SOMMARIO + + 1. Batti o per aggiungere una linea SOTTO il cursore ed entrare in + Modalità Inserimento. + Batti O per aggiungere una linea SOPRA il cursore. + + 2. Batti a per inserire testo DOPO il cursore. + Batti A per inserire testo alla fine della linea. + + 3. Il comando e sposta il cursore alla fine di una parola. + + 4. L'operatore y copia del testo, p incolla del testo. + + 5. Batti R per entrare in Modalità Replace, e ne esci premendo . + + 6. Batti ":set xxx" per impostare l'opzione "xxx". Alcun opzioni sono: + 'ic' 'ignorecase' ignorare maiuscole/minuscole nella ricerca + 'is' 'incsearch' mostra occorrenze parziali durante una ricerca + 'hls' 'hlsearch' evidenzia tutte le occorrenze di una ricerca + Puoi usare sia il nome completo di un'opzione che quello abbreviato. + + 7. Usa il prefisso "no" per annullare una opzione: :set noic +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 7.1: OTTENERE AIUTO + + ** Usa il sistema di aiuto on-line ** + + Vim ha un esauriente sistema di aiuto on-line. Per cominciare, prova una di + queste alternative: + - premi il tasto (se ce n'è uno) + - premi il tasto (se ce n'è uno) + - batti :help OPPURE :h + + Leggi il testo nella finestra di aiuto per vedere come funziona l'aiuto. + Batti CTRL-W CTRL-W per passare da una finestra all'altra. + Batti :q per chiudere la finestra di aiuto. + + Puoi trovare aiuto su quasi tutto, dando un argomento al comando ":help" + Prova questi (non dimenticare di premere ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 7.2: PREPARARE UNO SCRIPT INIZIALE + + ** Attiva le opzioni Vim ** + + Vim ha molte più opzioni di Vi, ma molte di esse sono predefinite inattive. + Per cominciare a usare più opzioni, devi creare un file "vimrc". + + 1. Comincia a editare il file "vimrc". Questo dipende dal tuo sistema: + :e ~/.vimrc per Unix + :e $VIM/_vimrc per MS-Windows + + 2. Ora leggi i contenuti del file "vimrc" distribuito come esempio: + + :r $VIMRUNTIME/vimrc_example.vim + + 3. Scrivi il file con: + :w + + La prossima volta che apri Vim, sarà abilitata la colorazione sintattica. + Puoi aggiungere a questo file "vimrc" tutte le tue impostazioni preferite. + Per maggiori informazioni batti: :help vimrc-intro + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 7.3: COMPLETAMENTO + + + ** Completamento linea comandi con CTRL-D e ** + + 1. Imposta Vim in modalità compatibile: :set nocp + + 2. Guarda i file esistenti nella directory: :!ls o :!dir + + 3. Batti l'inizio di un comando: :e + + 4. Premi CTRL-D e Vim ti mostra una lista di comandi che iniziano per "e". + + 5. Premi e Vim completa per te il nome comando come ":edit". + + 6. Ora batti uno spazio e l'inizio del nome di un file esistente: :edit FIL + + 7. Premi . Vim completerà il nome del file (se è il solo possibile). + +NOTA: Il completamento è disponibile per molti comandi. Prova a battere + CTRL-D e . Particolarmente utile per :help . + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 7 Sommario + + + 1. Batti :help o premi o per aprire una finestra di aiuto. + + 2. Batti :help comando per avere aiuto su comando . + + 3. Batti CTRL-W CTRL-W per saltare alla prossima finestra. + + 4. Batti :q per chiudere la finestra di aiuto. + + 5. Crea uno script iniziale vimrc contenente le tue impostazioni preferite. + + 6. Mentre batti un comando : , premi CTRL-D per vedere i possibili + completamenti. Premi per usare il completamento desiderato. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Qui finisce la Guida a Vim. Il suo intento è di fornire una breve panoramica + dell'Editor Vim, che ti consenta di usare l'Editor abbastanza facilmente. + Questa guida è largamente incompleta poiché Vim ha moltissimi altri comandi. + Puoi anche leggere il manuale utente (anche in italiano): ":help user-manual". + + Per ulteriore lettura e studio, raccomandiamo: + Vim - Vi Improved - di Steve Oualline Editore: New Riders + Il primo libro completamente dedicato a Vim. Utile specie per principianti. + Contiene molti esempi e figure. + Vedi http://iccf-holland.org/click5.html + + Quest'altro libro è più su Vi che su Vim, ma è pure consigliato: + Learning the Vi Editor - di Linda Lamb e Arnold Robbins + Editore: O'Reilly & Associates Inc. + E' un buon libro per imparare quasi tutto ciò che puoi voler fare con Vi. + Ne esiste una traduzione italiana, basata su una vecchia edizione. + + Questa guida è stata scritta da Michael C. Pierce e Robert K. Ware, + Colorado School of Mines, usando idee fornite da Charles Smith, + Colorado State University - E-mail: bware@mines.colorado.edu + Modificato per Vim da Bram Moolenaar. + Segnalare refusi ad Antonio Colombo - E-mail: azc100@gmail.com +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.it.utf-8 b/vim/bundle/ubuntu-vim72/tutor/tutor.it.utf-8 new file mode 100644 index 0000000..051b51b --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.it.utf-8 @@ -0,0 +1,967 @@ +=============================================================================== += Benvenuto alla G u i d a all'Editor V I M - Versione 1.7 = +=============================================================================== + + Vim è un Editor molto potente ed ha parecchi comandi, troppi per + spiegarli tutti in una guida come questa. Questa guida serve a + descrivere quei comandi che ti permettono di usare facilmente + Vim come Editor di uso generale. + + Il tempo necessario per completare la guida è circa 25-30 minuti, + a seconda di quanto tempo dedichi alla sperimentazione. + + ATTENZIONE! + I comandi nelle lezioni modificano questo testo. Fai una copia di questo + file per esercitarti (se hai usato "vimtutor", stai già usando una copia). + + E' importante non scordare che questa guida vuole insegnare tramite + l'uso. Questo vuol dire che devi eseguire i comandi per impararli + davvero. Se leggi il testo e basta, dimenticherai presto i comandi! + + Adesso, assicurati che il tasto BLOCCA-MAIUSCOLO non sia schiacciato + e premi il tasto j tanto da muovere il cursore fino a che la + Lezione 1.1 riempia completamente lo schermo. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 1.1: MOVIMENTI DEL CURSORE + + + ** Per muovere il cursore, premi i tasti h,j,k,l come indicato. ** + ^ + k NOTA: Il tasto h è a sinistra e muove a sinistra. + < h l > Il tasto l è a destra e muove a destra. + j Il tasto j ricorda una freccia in giù. + v + 1. Muovi il cursore sullo schermo finché non ti senti a tuo agio. + + 2. Tieni schiacciato il tasto "giù" (j) finché non si ripete il movimento. + Adesso sai come arrivare fino alla lezione seguente. + + 3. Usando il tasto "giù" spostati alla Lezione 1.2. + +NOTA: Quando non sei sicuro del tasto che hai premuto, premi per andare + in Modalità Normale [Normal Mode]. Poi ri-immetti il comando che volevi. + +NOTA: I tasti con le frecce fanno lo stesso servizio. Ma usando hjkl riesci + a muoverti molto più rapidamente, dopo che ci si abitua. Davvero! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 1.2: USCIRE DA VIM + + + !! NOTA: Prima di eseguire quanto richiesto, leggi la Lezione per intero!! + + 1. Premi il tasto (per assicurarti di essere in Modalità Normale). + + 2. Batti: :q! . + Così esci dall'Editor SCARTANDO qualsiasi modifica fatta. + + 3. Quando vedi il PROMPT della Shell, batti il comando con cui sei arrivato + qui. Sarebbe: vimtutor + + 4. Se hai memorizzato questi comandi e ti senti pronto, esegui i passi + da 1 a 3 per uscire e rientrare nell'Editor. + +NOTA: :q! SCARTA qualsiasi modifica fatta. In una delle prossime + lezioni imparerai come salvare un file che hai modificato. + + 5. Muovi in giù il cursore per passare alla lezione 1.3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 1.3: MODIFICA DI TESTI - CANCELLAZIONE + + + ** Premere x per cancellare il carattere sotto al cursore ** + + 1. Muovi il cursore alla linea più sotto, indicata da --->. + + 2. Per correggere errori, muovi il cursore fino a posizionarlo sopra il + carattere da cancellare. + + 3. Premi il tasto x per cancellare il carattere sbagliato. + + 4. Ripeti i passi da 2 a 4 finché la frase è corretta. + +---> La mmucca saltòò finnoo allaa lunnna. + + 5. Ora che la linea è corretta, vai alla Lezione 1.4 + +NOTA: Mentre segui questa guida, non cercare di imparare a memoria, + ma impara facendo pratica. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 1.4: MODIFICA DI TESTI - INSERIMENTO + + + ** Premere i per inserire testo. ** + + 1. Muovi il cursore alla prima linea qui sotto, indicata da --->. + + 2. Per rendere la prima linea uguale alla seconda, muovi il cursore sopra + il primo carattere DOPO la posizione in cui il testo va inserito. + + 3. Premi i e batti le aggiunte opportune. + + 4. Quando un errore è corretto, premi per tornare in Modalità Normale. + Ripeti i passi da 2 a 4 fino a completare la correzione della frase. + +---> C'era del tsto mncnt questa . +---> C'era del testo mancante da questa linea. + + 5. Quando sei a tuo agio nell'inserimento di testo vai alla lezione 1.5. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 1.5: MODIFICA DI TESTI - AGGIUNTA + + + ** Premere A per aggiungere testo a fine linea. ** + + 1. Muovi il cursore alla prima linea qui sotto, indicata da --->. + Non importa dove è posizionato il cursore sulla linea stessa. + + 2. Batti A e inserisci le necessarie aggiunte. + + 3. Alla fine della aggiunta premi per tornare in modalità Normale. + + 4. Muovi il cursore alla seconda linea indicata ---> e ripeti + i passi 2 e 3 per correggere questa frase. + +---> C'è del testo che manca da qu + C'è del testo che manca da questa linea. +---> C'è anche del testo che ma + C'è anche del testo che manca qui. + + 5. Quando sei a tuo agio nell'aggiunta di testo vai alla lezione 1.6. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 1.6: MODIFICARE UN FILE + + + ** Usare :wq per salvare un file e uscire. ** + + !! NOTA: Prima di eseguire quanto richiesto, leggi la Lezione per intero!! + + 1. Esci da Vim come hai fatto nella lezione 1.2: :q! + + 2. Quando vedi il PROMPT della Shell, batti il comando: vim tutor + 'vim' è il comando per richiamare Vim, 'tutor' è il nome del file che + desideri modificare. Usa un file che possa essere modificato. + + 3. Inserisci e cancella testo come hai imparato nelle lezioni precedenti. + + 4. Salva il file ed esci da Vim con: :wq + + 5. Rientra in vimtutor e scendi al sommario che segue. + + 6. Dopo aver letto i passi qui sopra ed averli compresi: eseguili. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 1 SOMMARIO + + + 1. Il cursore si muove usando i tasti con le frecce o i tasti hjkl. + h (sinistra) j (giù) k (su) l (destra) + + 2. Per eseguire Vim dal PROMPT della Shell batti: vim NOMEFILE + + 3. Per uscire da Vim batti: :q! per uscire senza salvare. + oppure batti: :wq per uscire salvando modifiche. + + 4. Per cancellare il carattere sotto al cursore batti: x + + 5. Per inserire testo subito prima del cursore batti: + i batti testo inserito inserisci prima del cursore + A batti testo aggiunto aggiungi a fine linea + +NOTA: premendo ritornerai in Modalità Normale o annullerai + un comando errato che puoi aver inserito in parte. + +Ora continua con la Lezione 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 2.1: COMANDI DI CANCELLAZIONE + + + ** Batti dw per cancellare una parola. ** + + 1. Premi per accertarti di essere in Modalità Normale. + + 2. Muovi il cursore fino alla linea qui sotto, indicata da --->. + + 3. Muovi il cursore all'inizio di una parola che vuoi cancellare. + + 4. Batti dw per cancellare la parola. + +NOTA: La lettera d sarà visibile sull'ultima linea dello schermo mentre la + batti. Vim attende che tu batta w . Se vedi una lettera diversa + da d hai battuto qualcosa di sbagliato; premi e ricomincia. + +---> Ci sono le alcune parole gioia che non c'entrano carta in questa frase. + + 5. Ripeti i passi 3 e 4 finché la frase è corretta, poi vai alla Lezione 2.2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 2.2: ALTRI COMANDI DI CANCELLAZIONE + + + ** Batti d$ per cancellare fino a fine linea. ** + + 1. Premi per accertarti di essere in Modalità Normale. + + 2. Muovi il cursore fino alla linea qui sotto, indicata da --->. + + 3. Muovi il cursore alla fine della linea corretta (DOPO il primo . ). + + 4. Batti d$ per cancellare fino a fine linea. + +---> Qualcuno ha battuto la fine di questa linea due volte. linea due volte. + + + 5. Vai alla Lezione 2.3 per capire il funzionamento di questo comando. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 2.3: OPERATORI E MOVIMENTI + + + Molti comandi di modifica testi consistono in un operatore e un movimento. + Il formato del comando di cancellazione con l'operatore d è il seguente: + + d movimento + + Dove: + d - è l'operatore di cancellazione + movimento - indica dove l'operatore va applicato (lista qui sotto). + + Breve lista di movimenti: + w - fino a inizio della parola seguente, ESCLUSO il suo primo carattere. + e - alla fine della parola corrente, COMPRESO il suo ultimo carattere. + $ - dal cursore fino a fine linea, COMPRESO l'ultimo carattere della linea. + + Quindi se batti de cancelli dal cursore fino a fine parola. + +NOTA: Se batti solo il movimento mentre sei in Modalità Normale, senza + nessun operatore, il cursore si muoverà come specificato. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 2.4: USO DI UN CONTATORE PER UN MOVIMENTO + + + ** Se batti un numero prima di un movimento, lo ripeti altrettante volte. ** + + 1. Muovi il cursore fino all'inizio della linea qui sotto, indicata da --->. + + 2. Batti 2w per spostare il cursore due parole più avanti. + + 3. Batti 3e per spostare il cursore alla fine della terza parola seguente. + + 4. Batti 0 (zero) per posizionarti all'inizio della linea. + + 5. Ripeti i passi 2 e 3 usando numeri differenti. + +---> Questa è solo una linea con parole all'interno della quale puoi muoverti. + + 6. Vai alla Lezione 2.5. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 2.5: USO DI UN CONTATORE PER CANCELLARE DI PIU' + + + ** Se batti un numero prima di un movimento, lo ripeti altrettante volte. ** + + Nella combinazione dell'operatore cancella e di un movimento, descritto prima, + inserite un contatore prima del movimento per cancellare di più: + d numero movimento + + 1. Muovi il cursore alla prima parola MAIUSCOLA nella riga indicata da --->. + + 2. Batti d2w per cancellare le due parole MAIUSCOLE + + 3. Ripeti i passi 1 e 2 con un contatore diverso per cancellare la parole + MAIUSCOLE consecutive con un solo comando + +---> questa ABC DE linea FGHI JK LMN OP di parole è Q RS TUV ora ripulita. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 2.6: LAVORARE SU LINEE INTERE + + ** Batti dd per cancellare un'intera linea. ** + + Per la frequenza con cui capita di cancellare linee intere, chi ha + disegnato Vi ha deciso che sarebbe stato più semplice battere + due d consecutive per cancellare una linea. + + 1. Muovi il cursore alla linea 2) nella frase qui sotto. + 2. Batti dd per cancellare la linea. + 3. Ora spostati alla linea 4). + 4. Batti 2dd per cancellare due linee. + +---> 1) Le rose sono rosse, +---> 2) Il fango è divertente, +---> 3) Le viole sono blu, +---> 4) Io ho un'automobile, +---> 5) Gli orologi segnano il tempo, +---> 6) Lo zucchero è dolce, +---> 7) E così sei anche tu. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 2.7: IL COMANDO UNDO [ANNULLA] + + ** Premi u per annullare gli ultimi comandi eseguiti. ** + ** Premi U per annullare le modifiche all'ultima linea. ** + + 1. Muovi il cursore fino alla linea qui sotto, indicata da --->. + e posizionati sul primo errore. + 2. Batti x per cancellare il primo carattere sbagliato. + 3. Adesso batti u per annullare l'ultimo comando eseguito. + 4. Ora invece, correggi tutti gli errori sulla linea usando il comando x . + 5. Adesso batti una U Maiuscola per riportare la linea al suo stato originale. + 6. Adesso batti u più volte per annullare la U e i comandi precedenti. + 7. Adesso batti più volte CTRL-r (tieni il tasto CTRL schiacciato + mentre batti r) per rieseguire i comandi (annullare l'annullamento). + +---> Correeggi gli errori ssu quuesta linea e riimpiazzali coon "undo". + + 8. Questi comandi sono molto utili. Ora spostati al Sommario della Lezione 2. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 2 SOMMARIO + + + 1. Per cancellare dal cursore fino alla parola seguente batti: dw + 2. Per cancellare dal cursore fino alla fine della linea batti: d$ + 3. Per cancellare un'intera linea batti: dd + 4. Per eseguire più volte un movimento, mettici davanti un numero: 2w + 5. Il formato per un comando di modifica è: + + operatore [numero] movimento + dove: + operatore - indica il da farsi, ad es. d per [delete] cancellare + [numero] - contatore facoltativo di ripetizione del movimento + movimento - spostamento nel testo su cui operare, ad es. + w [word] parola, $ (fino a fine linea), etc. + + 6. Per andare a inizio linea usate uno zero: 0 + 7. Per annullare i comandi precedenti, batti: u (u minuscola) + Per annullare tutte le modifiche a una linea batti: U (U maiuscola) + Per annullare l'annullamento ["redo"] batti: CTRL-r + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 3.1: IL COMANDO PUT [METTI, PONI] + + + ** Batti p per porre [put] testo (cancellato prima) dopo il cursore. ** + + 1. Muovi il cursore alla prima linea indicata con ---> qui in basso. + + 2. Batti dd per cancellare la linea e depositarla in un registro di Vim. + + 3. Muovi il cursore fino alla linea c) SOPRA quella dove andrebbe messa + la linea appena cancellata. + + 4. Batti p per mettere la linea sotto il cursore. + + 5. Ripeti i passi da 2 a 4 per mettere tutte le linee nel giusto ordine. + +---> d) Puoi impararla tu? +---> b) Le viole sono blu, +---> c) La saggezza si impara, +---> a) Le rose sono rosse, + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 3.2: IL COMANDO REPLACE [RIMPIAZZARE] + + + ** Batti rx per rimpiazzare il carattere sotto al cursore con x . ** + + 1. Muovi il cursore alla prima linea qui sotto, indicata da --->. + + 2. Muovi il cursore fino a posizionarlo sopra il primo errore. + + 3. Batti r e poi il carattere che dovrebbe stare qui. + + 4. Ripeti i passi 2 e 3 finché la prima linea è uguale alla seconda. + +---> Ammattendo quetta lince, qualcuno ho predato alcuni tosti sballiati! +---> Immettendo questa linea, qualcuno ha premuto alcuni tasti sbagliati! + + 5. Ora passa alla Lezione 3.2. + +NOTA: Ricordati che dovresti imparare con la pratica, non solo leggendo. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 3.3: L'OPERATORE CHANGE [CAMBIA] + + + ** Per cambiare fino alla fine di una parola, batti ce . ** + + 1. Muovi il cursore alla prima linea qui sotto, indicata da --->. + + 2. Posiziona il cursore alla u in lubw. + + 3. Batti ce e la parola corretta (in questo caso, batti inea ). + + 4. Premi e vai sul prossimo carattere da modificare. + + 5. Ripeti i passi 3 e 4 finché la prima frase è uguale alla seconda. + +---> Questa lubw ha alcune pptfd da asdert usgfk l'operatore CHANGE. +---> Questa linea ha alcune parole da cambiare usando l'operatore CHANGE. + +Nota che ce cancella la parola, e ti mette anche in Modalità Inserimento + [Insert Mode] + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 3.4: ALTRI CAMBIAMENTI USANDO c + +** L'operatore c [CHANGE] agisce sugli stessi movimenti di d [DELETE] ** + + 1. L'operatore CHANGE si comporta come DELETE. Il formato è: + + c [numero] movimento + + 2. I movimenti sono gli stessi, + ad es. w (word, parola), $ (fine linea), etc. + + 3. Muovi il cursore alla prima linea qui sotto, indicata da --->. + + 4. Posiziona il cursore al primo errore. + + 5. Batti c$ e inserisci resto della linea utilizzando come modello la + linea seguente, e quando hai finito premi + +---> La fine di questa linea deve essere aiutata a divenire come la seguente. +---> La fine di questa linea deve essere corretta usando il comando c$ . + +NOTA: Puoi usare il tasto Backspace se devi correggere errori di battitura. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 3 SOMMARIO + + + 1. Per reinserire del testo appena cancellato, batti p . Questo + inserisce [pone] il testo cancellato DOPO il cursore (se era stata tolta + una linea intera, questa verrà messa nella linea SOTTO il cursore). + + 2. Per rimpiazzare il carattere sotto il cursore, batti r e poi il + carattere che vuoi sostituire. + + 3. L'operatore change ti permette di cambiare dal cursore fino a dove + arriva il movimento. Ad es. Batti ce per cambiare dal cursore + fino alla fine della parola, c$ per cambiare fino a fine linea. + + 4. Il formato di change è: + + c [numero] movimento + +Ora vai alla prossima Lezione. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 4.1: POSIZIONAMENTO E SITUAZIONE FILE + + ** Batti CTRL-G per vedere a che punto sei nel file e la situazione ** + ** del file. Batti G per raggiungere una linea nel file. ** + + NOTA: Leggi l'intera Lezione prima di eseguire un qualsiasi passo!! + + 1. Tieni premuto il tasto CTRL e batti g . Ossia batti CTRL-G. + Un messaggio apparirà in fondo alla pagina con il NOME FILE e la + posizione nel file. Ricordati il numero della linea per il Passo 3. + +NOTA: La posizione del cursore si vede nell'angolo in basso a destra dello + schermo, se è impostata l'opzione 'ruler' (righello, vedi :help ruler). + + 2. Premi G [G Maiuscolo] per posizionarti in fondo al file. + Batti gg per posizionarti in cima al file. + + 3. Batti il numero della linea in cui ti trovavi e poi G . Questo ti + riporterà fino alla linea in cui ti trovavi quando avevi battuto CTRL-g. + + 4. Se ti senti sicuro nel farlo, esegui i passi da 1 a 3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 4.2: IL COMANDO SEARCH [RICERCA] + + ** Batti / seguito da una frase per ricercare quella frase. ** + + 1. in Modalità Normale batti il carattere / . Nota che la "/" e il cursore + sono visibili in fondo dello schermo come quando si usa il comando : . + + 2. Adesso batti 'errroore' . Questa è la parola che vuoi ricercare. + + 3. Per ricercare ancora la stessa frase, batti soltanto n . + Per ricercare la stessa frase in direzione opposta, batti N . + + 4. Per ricercare una frase nella direzione opposta, usa ? al posto di / . + + 5. Per tornare dove eri prima nel file premi CTRL-O (tieni il tasto CTRL + schiacciato mentre premi la lettera o). Ripeti CTRL-O per andare ancora + indietro. Puoi usare CTRL-I per tornare in avanti. + +NOTA: "errroore" non è il modo giusto di digitare errore; errroore è un errore. +NOTA: Quando la ricerca arriva a fine file, ricomincia dall'inizio del file, + a meno che l'opzione 'wrapscan' sia stata disattivata. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 4.3: RICERCA DI PARENTESI CORRISPONDENTI + + + ** Batti % per trovare una ),], o } corrispondente. ** + + 1. Posiziona il cursore su una (, [, o { nella linea sotto, indicata da --->. + + 2. Adesso batti il carattere % . + + 3. Il cursore si sposterà sulla parentesi corrispondente. + + 4. Batti % per muovere il cursore all'altra parentesi corrispondente. + +---> Questa ( è una linea di test con (, [ ] e { } al suo interno. )) + + +NOTA: Questo è molto utile nel "debug" di un programma con parentesi errate! + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 4.4: L'OPERATORE SOSTITUZIONE (SUBSTITUTE) + + ** Batti :s/vecchio/nuovo/g per sostituire 'nuovo' a 'vecchio'. ** + + 1. Muovi il cursore fino alla linea qui sotto, indicata da --->. + + 2. Batti :s/lla/la . Nota che questo comando cambia solo + LA PRIMA occorrenza di "lla" sulla linea. + + 3. Adesso batti :s/lla/la/g . Aggiungendo la flag g si chiede di + sostituire "globalmente" sulla linea, ossia tutte le occorrenze + di "lla" sulla linea. + +---> lla stagione migliore per lla fioritura è lla primavera. + + 4. Per cambiare ogni ricorrenza di una stringa di caratteri tra due linee, + batti :#,#s/vecchio/nuovo/g dove #,# sono i numeri che delimitano + il gruppo di linee in cui si vuole sostituire. + Batti :%s/vecchio/nuovo/g per cambiare ogni occorrenza nell'intero file. + Batti :%s/vecchio/nuovo/gc per trovare ogni occorrenza nell'intero file + ricevendo per ognuna una richiesta se + effettuare o meno la sostituzione. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 4 SOMMARIO + + +1. CTRL-G visualizza a che punto sei nel file e la situazione del file. + G [G Maiuscolo] ti porta all'ultima linea del file. + numero G ti porta alla linea con quel numero. + gg ti porta alla prima linea del file. + +2. Battendo / seguito da una frase ricerca IN AVANTI quella frase. + Battendo ? seguito da una frase ricerca ALL'INDIETRO quella frase. + DOPO una ricerca batti n per trovare la prossima occorrenza nella + stessa direzione, oppure N per cercare in direzione opposta. + CTRL-O ti porta alla posizione precedente, CTRL-I a quella più nuova. + +3. Battendo % mentre il cursore si trova su (,),[,],{, oppure } + ti posizioni sulla corrispondente parentesi. + +4. Per sostituire "nuovo" al primo "vecchio" in 1 linea batti :s/vecchio/nuovo + Per sostituire "nuovo" ad ogni "vecchio" in 1 linea batti :s/vecchio/nuovo/g + Per sostituire frasi tra 2 numeri di linea [#] batti :#,#s/vecchio/nuovo/g + Per sostituire tutte le occorrenze nel file batti :%s/vecchio/nuovo/g + Per chiedere conferma ogni volta aggiungi 'c' :%s/vecchio/nuovo/gc +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 5.1: COME ESEGUIRE UN COMANDO ESTERNO + + + ** Batti :! seguito da un comando esterno per eseguire quel comando. ** + + 1. Batti il comando : per posizionare il cursore in fondo allo schermo. + Ciò ti permette di immettere un comando dalla linea comandi. + + 2. Adesso batti il carattere ! (punto esclamativo). Ciò ti permette di + eseguire qualsiasi comando esterno si possa eseguire nella "shell". + + 3. Ad esempio batti ls dopo il ! e poi premi . Questo + visualizza una lista della tua directory, proprio come se fossi in una + "shell". Usa :!dir se ls non funziona. [Unix: ls MS-DOS: dir] + +NOTA: E' possibile in questo modo eseguire un comando a piacere, specificando + anche dei parametri per i comandi stessi. + +NOTA: Tutti i comandi : devono essere terminati premendo + Da qui in avanti non lo ripeteremo ogni volta. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 5.2: ANCORA SULLA SCRITTURA DEI FILE + + + ** Per salvare le modifiche apportate a un testo batti :w NOMEFILE. ** + + 1. Batti :!dir or :!ls per procurarti una lista della tua directory. + Già sai che devi premere dopo aver scritto il comando. + + 2. Scegli un NOMEFILE che ancora non esista, ad es. TEST . + + 3. Adesso batti: :w TEST (dove TEST è il NOMEFILE che hai scelto). + + 4. Questo salva l'intero file ("tutor.it") con il nome di TEST. + Per verifica batti ancora :!dir o :!ls per listare la tua directory. + +NOTA: Se esci da Vim e riesegui Vim battendo vim TEST , il file aperto + sarà una copia esatta di "tutor.it" al momento del salvataggio. + + 5. Ora cancella il file battendo (MR-DOS): :!del TEST + o (Unix): :!rm TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 5.3: SELEZIONARE IL TESTO DA SCRIVERE + + ** Per salvare una porzione di file, batti v movimento :w NOMEFILE ** + + 1. Muovi il cursore su questa linea. + + 2. Premi v e muovi il cursore fino alla linea numerata 5., qui sotto. + Nota che il testo viene evidenziato. + + 3. Batti il carattere : . In fondo allo schermo apparirà :'<,'> . + + 4. Batti w TEST , dove TEST è il nome di un file non ancora esistente. + Verifica che si veda :'<,'>w TEST prima di dare . + + 5. Vim scriverà nel file TEST le linee che hai selezionato. Usa :!dir + o :!ls per controllare che esiste. Non cancellarlo ora! Ti servirà + nella prossima lezione. + +NOTA: Battere v inizia una selezione visuale. Puoi muovere il cursore + come vuoi, e rendere la selezione più piccola o più grande. Poi + puoi usare un operatore per agire sul testo selezionato. + Ad es., d cancella il testo. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 5.4: INSERIRE E RIUNIRE FILE + + + ** Per inserire il contenuto di un file, batti :r NOMEFILE ** + + 1. Posiziona il cursore appena sopra questa riga. + +NOTA: Dopo aver eseguito il Passo 2 vedrai il testo della Lezione 5.3. + Quindi spostati IN GIU' per tornare ancora a questa Lezione. + + 2. Ora inserisci il tuo file TEST con il comando :r TEST dove TEST è + il nome che hai usato per creare il file. + Il file richiesto è inserito sotto la linea in cui si trova il cursore. + + 3. Per verificare che un file è stato inserito, torna indietro col cursore + e nota che ci sono ora 2 copie della Lezione 5.3, quella originale e + quella che viene dal file. + +NOTA: Puoi anche leggere l'output prodotto da un comando esterno. Ad es. + :r !ls legge l'output del comando ls e lo inserisce sotto la linea + in cui si trova il cursore. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 5 SOMMARIO + + + 1. :!comando esegue un comando esterno. + + Alcuni esempi utili sono [in MSDOS]: + :!dir - visualizza lista directory + :!del NOMEFILE - cancella file NOMEFILE. + + 2. :w NOMEFILE scrive su disco il file che stai editando con nome NOMEFILE. + + 3. v movimento :w NOMEFILE salva le linee selezionate in maniera + visuale nel file NOMEFILE. + + 4. :r NOMEFILE legge il file NOMEFILE da disco e lo inserisce nel file + che stai modificando, dopo la linea in cui è posizionato il cursore. + + 5. :r !dir legge l'output del comando dir e lo inserisce dopo la + linea in cui è posizionato il cursore. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 6.1: IL COMANDO OPEN [APRIRE] + + + ** Batti o per aprire una linea sotto il cursore ** + ** e passare in Modalità Inserimento. ** + + 1. Muovi il cursore fino alla linea qui sotto, indicata da --->. + + 2. Batti la lettera minuscola o per aprire una linea sotto il cursore e + passare in Modalità Inserimento. + + 3. Poi inserisci del testo e premi per uscire dalla + Modalità Inserimento. + +---> Dopo battuto o il cursore è sulla linea aperta (in Modalità Inserimento). + + 4. Per aprire una linea SOPRA il cursore, batti una O maiuscola, invece + che una o minuscola. Prova sulla linea qui sotto. +Apri una linea SOPRA questa battendo O mentre il cursore è su questa linea. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 6.2: IL COMANDO APPEND [AGGIUNGERE] + + ** Batti a per inserire testo DOPO il cursore. ** + + 1. Muovi il cursore all'inizio della linea qui sotto, indicata da --->. + + 2. Batti e finché il cursore arriva alla fine di li . + + 3. Batti una a (minuscola) per aggiungere testo DOPO il cursore. + + 4. Completa la parola come mostrato nella linea successiva. Premi + per uscire dalla Modalità Inserimento. + + 5. Usa e per passare alla successiva parola incompleta e ripeti i passi + 3 e 4. + +---> Questa li ti permetterà di esercit ad aggiungere testo a una linea. +---> Questa linea ti permetterà di esercitarti ad aggiungere testo a una linea. + +NOTA: a, i ed A entrano sempre in Modalità Inserimento, la sola differenza + è dove verranno inseriti i caratteri. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 6.3: UN ALTRO MODO DI RIMPIAZZARE [REPLACE] + + + ** Batti una R maiuscola per rimpiazzare più di un carattere. ** + + 1. Muovi il cursore alla prima linea qui sotto, indicata da --->. Muovi il + cursore all'inizio del primo xxx . + + 2. Ora batti R e batti il numero che vedi nella linea seguente, in modo + che rimpiazzi l' xxx . + + 3. Premi per uscire dalla Modalità Replace. Nota che il resto della + linea resta invariato. + + 4. Ripeti i passi in modo da rimpiazzare l'altro xxx . + +---> Aggiungendo 123 a xxx si ottiene xxx. +---> Aggiungendo 123 a 456 si ottiene 579. + +NOTA: La Modalità Replace è come la Modalità Inserimento, ma ogni carattere + che viene battuto ricopre un carattere esistente. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 6.4: COPIA E INCOLLA DEL TESTO + + + ** usa l'operatore y per copiare del testo e p per incollarlo ** + + 1. Vai alla linea indicata da ---> qui sotto, e metti il cursore dopo "a)". + + 2. Entra in Modalità Visuale con v e metti il cursore davanti a "primo". + + 3. Batti y per copiare [yank] il testo evidenziato. + + 4. Muovi il cursore alla fine della linea successiva: j$ + + 5. Batti p per incollare [paste] il testo. Poi batti: a secondo . + + 6. Usa la Modalità Visuale per selezionare " elemento.", copialo con y , + Vai alla fine della linea successiva con j$ e incolla il testo con p . + +---> a) questo è il primo elemento. + b) + +NOTA: Puoi usare y come operatore; yw copia una parola [word]. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 6.5: SET [IMPOSTA] UN'OPZIONE + + ** Imposta un'opzione per ignorare maiuscole/minuscole ** + ** durante la ricerca/sostituzione ** + + 1. Ricerca 'nota' battendo: /nota + Ripeti la ricerca più volte usando il tasto n + + 2. Imposta l'opzione 'ic' (Ignore Case, [Ignora maiuscolo/minuscolo]) + battendo: :set ic + + 3. Ora ricerca ancora 'nota' premendo il tasto n + Troverai adesso anche Nota e NOTA . + + 4. Imposta le opzioni 'hlsearch' e 'incsearch' :set hls is + + 5. Ora batti ancora il comando di ricerca, e guarda cosa succede: /nota + + 6. Per disabilitare il riconoscimento di maiuscole/minuscole batti: :set noic +NOTA: Per non evidenziare le occorrenze trovate batti: :nohlsearch +NOTA: Per ignorare maiuscole/minuscole solo per una ricerca, usa \c + nel comando di ricerca: /nota\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 6 SOMMARIO + + 1. Batti o per aggiungere una linea SOTTO il cursore ed entrare in + Modalità Inserimento. + Batti O per aggiungere una linea SOPRA il cursore. + + 2. Batti a per inserire testo DOPO il cursore. + Batti A per inserire testo alla fine della linea. + + 3. Il comando e sposta il cursore alla fine di una parola. + + 4. L'operatore y copia del testo, p incolla del testo. + + 5. Batti R per entrare in Modalità Replace, e ne esci premendo . + + 6. Batti ":set xxx" per impostare l'opzione "xxx". Alcun opzioni sono: + 'ic' 'ignorecase' ignorare maiuscole/minuscole nella ricerca + 'is' 'incsearch' mostra occorrenze parziali durante una ricerca + 'hls' 'hlsearch' evidenzia tutte le occorrenze di una ricerca + Puoi usare sia il nome completo di un'opzione che quello abbreviato. + + 7. Usa il prefisso "no" per annullare una opzione: :set noic +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 7.1: OTTENERE AIUTO + + ** Usa il sistema di aiuto on-line ** + + Vim ha un esauriente sistema di aiuto on-line. Per cominciare, prova una di + queste alternative: + - premi il tasto (se ce n'è uno) + - premi il tasto (se ce n'è uno) + - batti :help OPPURE :h + + Leggi il testo nella finestra di aiuto per vedere come funziona l'aiuto. + Batti CTRL-W CTRL-W per passare da una finestra all'altra. + Batti :q per chiudere la finestra di aiuto. + + Puoi trovare aiuto su quasi tutto, dando un argomento al comando ":help" + Prova questi (non dimenticare di premere ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 7.2: PREPARARE UNO SCRIPT INIZIALE + + ** Attiva le opzioni Vim ** + + Vim ha molte più opzioni di Vi, ma molte di esse sono predefinite inattive. + Per cominciare a usare più opzioni, devi creare un file "vimrc". + + 1. Comincia a editare il file "vimrc". Questo dipende dal tuo sistema: + :e ~/.vimrc per Unix + :e $VIM/_vimrc per MS-Windows + + 2. Ora leggi i contenuti del file "vimrc" distribuito come esempio: + + :r $VIMRUNTIME/vimrc_example.vim + + 3. Scrivi il file con: + :w + + La prossima volta che apri Vim, sarà abilitata la colorazione sintattica. + Puoi aggiungere a questo file "vimrc" tutte le tue impostazioni preferite. + Per maggiori informazioni batti: :help vimrc-intro + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 7.3: COMPLETAMENTO + + + ** Completamento linea comandi con CTRL-D e ** + + 1. Imposta Vim in modalità compatibile: :set nocp + + 2. Guarda i file esistenti nella directory: :!ls o :!dir + + 3. Batti l'inizio di un comando: :e + + 4. Premi CTRL-D e Vim ti mostra una lista di comandi che iniziano per "e". + + 5. Premi e Vim completa per te il nome comando come ":edit". + + 6. Ora batti uno spazio e l'inizio del nome di un file esistente: :edit FIL + + 7. Premi . Vim completerà il nome del file (se è il solo possibile). + +NOTA: Il completamento è disponibile per molti comandi. Prova a battere + CTRL-D e . Particolarmente utile per :help . + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 7 Sommario + + + 1. Batti :help o premi o per aprire una finestra di aiuto. + + 2. Batti :help comando per avere aiuto su comando . + + 3. Batti CTRL-W CTRL-W per saltare alla prossima finestra. + + 4. Batti :q per chiudere la finestra di aiuto. + + 5. Crea uno script iniziale vimrc contenente le tue impostazioni preferite. + + 6. Mentre batti un comando : , premi CTRL-D per vedere i possibili + completamenti. Premi per usare il completamento desiderato. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Qui finisce la Guida a Vim. Il suo intento è di fornire una breve panoramica + dell'Editor Vim, che ti consenta di usare l'Editor abbastanza facilmente. + Questa guida è largamente incompleta poiché Vim ha moltissimi altri comandi. + Puoi anche leggere il manuale utente (anche in italiano): ":help user-manual". + + Per ulteriore lettura e studio, raccomandiamo: + Vim - Vi Improved - di Steve Oualline Editore: New Riders + Il primo libro completamente dedicato a Vim. Utile specie per principianti. + Contiene molti esempi e figure. + Vedi http://iccf-holland.org/click5.html + + Quest'altro libro è più su Vi che su Vim, ma è pure consigliato: + Learning the Vi Editor - di Linda Lamb e Arnold Robbins + Editore: O'Reilly & Associates Inc. + E' un buon libro per imparare quasi tutto ciò che puoi voler fare con Vi. + Ne esiste una traduzione italiana, basata su una vecchia edizione. + + Questa guida è stata scritta da Michael C. Pierce e Robert K. Ware, + Colorado School of Mines, usando idee fornite da Charles Smith, + Colorado State University - E-mail: bware@mines.colorado.edu + Modificato per Vim da Bram Moolenaar. + Segnalare refusi ad Antonio Colombo - E-mail: azc100@gmail.com +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.ja.euc b/vim/bundle/ubuntu-vim72/tutor/tutor.ja.euc new file mode 100644 index 0000000..5134393 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.ja.euc @@ -0,0 +1,975 @@ +=============================================================================== += V I M ¶µ ËÜ (¥Á¥å¡¼¥È¥ê¥¢¥ë) ¤Ø ¤è ¤¦ ¤³ ¤½ - Version 1.7 = +=============================================================================== + + Vim ¤Ï¡¢¤³¤Î¥Á¥å¡¼¥È¥ê¥¢¥ë¤ÇÀâÌÀ¤¹¤ë¤Ë¤Ï¿¤¹¤®¤ëÄø¤Î¥³¥Þ¥ó¥É¤òÈ÷¤¨¤¿Èó¾ï + ¤Ë¶¯ÎϤʥ¨¥Ç¥£¥¿¡¼¤Ç¤¹¡£¤³¤Î¥Á¥å¡¼¥È¥ê¥¢¥ë¤Ï¡¢¤¢¤Ê¤¿¤¬ Vim ¤òËüǽ¥¨¥Ç¥£ + ¥¿¡¼¤È¤·¤Æ»È¤¤¤³¤Ê¤»¤ë¤è¤¦¤Ë¤Ê¤ë¤Î¤Ë½½Ê¬¤Ê¥³¥Þ¥ó¥É¤Ë¤Ä¤¤¤ÆÀâÌÀ¤ò¤¹¤ë¤è¤¦ + ¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£ + + ¥Á¥å¡¼¥È¥ê¥¢¥ë¤ò´°Î»¤¹¤ë¤Î¤ËɬÍפʻþ´Ö¤Ï¡¢³Ð¤¨¤¿¥³¥Þ¥ó¥É¤ò»î¤¹¤Î¤Ë¤É¤ì¤À + ¤±»þ´Ö¤ò»È¤¦¤Î¤«¤Ë¤â¤è¤ê¤Þ¤¹¤¬¡¢¤ª¤è¤½25¤«¤é30ʬ¤Ç¤¹¡£ + + ATTENTION: + °Ê²¼¤ÎÎý½¬ÍÑ¥³¥Þ¥ó¥É¤Ë¤Ï¤³¤Îʸ¾Ï¤òÊѹ¹¤¹¤ë¤â¤Î¤â¤¢¤ê¤Þ¤¹¡£Îý½¬¤ò»Ï¤á¤ëÁ° + ¤Ë¥³¥Ô¡¼¤òºîÀ®¤·¤Þ¤·¤ç¤¦("vimtutor"¤·¤¿¤Ê¤é¤Ð¡¢´û¤Ë¥³¥Ô¡¼¤µ¤ì¤Æ¤¤¤Þ¤¹)¡£ + + ¤³¤Î¥Á¥å¡¼¥È¥ê¥¢¥ë¤¬¡¢»È¤¦¤³¤È¤Ç³Ð¤¨¤é¤ì¤ë»ÅÁȤߤˤʤäƤ¤¤ë¤³¤È¤ò¡¢¿´¤· + ¤Æ¤ª¤«¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£Àµ¤·¤¯³Ø½¬¤¹¤ë¤Ë¤Ï¥³¥Þ¥ó¥É¤ò¼ÂºÝ¤Ë»î¤µ¤Ê¤±¤ì¤Ð + ¤Ê¤é¤Ê¤¤¤Î¤Ç¤¹¡£Ê¸¾Ï¤òÆÉ¤ó¤À¤À¤±¤Ê¤é¤Ð¡¢¤­¤Ã¤È˺¤ì¤Æ¤·¤Þ¤¤¤Þ¤¹!¡£ + + ¤µ¤¡¡¢Caps¥í¥Ã¥¯(Shift-Lock)¥­¡¼¤¬²¡¤µ¤ì¤Æ¤¤¤Ê¤¤¤³¤È¤ò³Îǧ¤·¤¿¸å¡¢²èÌÌ¤Ë + ¥ì¥Ã¥¹¥ó1.1 ¤¬Á´Éôɽ¼¨¤µ¤ì¤ë¤È¤³¤í¤Þ¤Ç¡¢j ¥­¡¼¤ò²¡¤·¤Æ¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ + ¤·¤ç¤¦¡£ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 1.1: ¥«¡¼¥½¥ë¤Î°Üư + + + ** ¥«¡¼¥½¥ë¤ò°Üư¤¹¤ë¤Ë¤Ï¡¢¼¨¤µ¤ì¤ëÍÍ¤Ë h,j,k,l ¤ò²¡¤·¤Þ¤¹ ** + ^ + k ¥Ò¥ó¥È: h ¥­¡¼¤Ïº¸Êý¸þ¤Ë°Üư¤·¤Þ¤¹¡£ + < h l > l ¥­¡¼¤Ï±¦Êý¸þ¤Ë°Üư¤·¤Þ¤¹¡£ + j j ¥­¡¼¤Ï²¼Ìð°õ¥­¡¼¤Î¤è¤¦¤Ê¥­¡¼¤Ç¤¹¡£ + v + 1. °Üư¤Ë´·¤ì¤ë¤Þ¤Ç¡¢¥¹¥¯¥ê¡¼¥ó¤Ç¥«¡¼¥½¥ë°Üư¤µ¤»¤Þ¤·¤ç¤¦¡£ + + 2. ²¼¤Ø¤Î¥­¡¼(j)¤ò²¡¤·¤Ä¤Å¤±¤ë¤È¡¢Ï¢Â³¤·¤Æ°Üư¤Ç¤­¤Þ¤¹¡£ + ¤³¤ì¤Ç¼¡¤Î¥ì¥Ã¥¹¥ó¤Ë°Üư¤¹¤ëÊýË¡¤¬¤ï¤«¤ê¤Þ¤·¤¿¤Í¡£ + + 3. ²¼¤Ø¤Î¥­¡¼¤ò»È¤Ã¤Æ¡¢¥ì¥Ã¥¹¥ó1.2 ¤Ë°Üư¤·¤Þ¤·¤ç¤¦¡£ + +Note: ²¿¤ò¥¿¥¤¥×¤·¤Æ¤¤¤ë¤«È½¤é¤Ê¤¯¤Ê¤Ã¤¿¤é¡¢¤ò²¡¤·¤Æ¥Î¡¼¥Þ¥ë¥â¡¼¥É¤Ë¤· + ¤Þ¤¹¡£¤½¤ì¤«¤éÆþÎϤ·¤è¤¦¤È¤·¤Æ¤¤¤¿¥³¥Þ¥ó¥É¤òºÆÆþÎϤ·¤Þ¤·¤ç¤¦¡£ + +Note: ¥«¡¼¥½¥ë¥­¡¼¤Ç¤â°Üư¤Ç¤­¤Þ¤¹¡£¤·¤«¤· hjkl ¤Ë°ìÅÙ´·¤ì¤Æ¤·¤Þ¤¨¤Ð¡¢¤Ï¤ë¤« + ¤Ë®¤¯°Üư¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¤Ç¤·¤ç¤¦¡£¤¤¤ä¥Þ¥¸¤Ç! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 1.2: VIM ¤Îµ¯Æ°¤È½ªÎ» + + + !! NOTE: °Ê²¼¤Î¤¢¤é¤æ¤ë¥¹¥Æ¥Ã¥×¤ò¹Ô¤¦Á°¤Ë¡¢¤³¤Î¥ì¥Ã¥¹¥ó¤òÆÉ¤ß¤Þ¤·¤ç¤¦!! + + 1. ¥­¡¼¤ò²¡¤·¤Þ¤·¤ç¤¦¡£(³Î¼Â¤Ë¥Î¡¼¥Þ¥ë¥â¡¼¥É¤Ë¤¹¤ë¤¿¤á) + + 2. ¼¡¤Î¤è¤¦¤Ë¥¿¥¤¥×: :q! + ¤³¤ì¤Ë¤è¤êÊÔ½¸¤·¤¿ÆâÍÆ¤òÊݸ¤»¤º¤Ë¥¨¥Ç¥£¥¿¤¬½ªÎ»¤·¤Þ¤¹¡£ + + 3. ¥·¥§¥ë¥×¥í¥ó¥×¥È¤¬½Ð¤Æ¤­¤¿¤é¡¢¤³¤Î¥Á¥å¡¼¥È¥ê¥¢¥ë¤ò»Ï¤á¤ë°Ù¤Ë¤Ë¥³¥Þ¥ó¥É + ¤ò¥¿¥¤¥×¤·¤Þ¤¹¡£ + ¤½¤Î¥³¥Þ¥ó¥É¤Ï: vimtutor + + 4. ¤³¤ì¤Þ¤Ç¤Î¥¹¥Æ¥Ã¥×¤ò³Ð¤¨¼«¿®¤¬¤Ä¤¤¤¿¤Ê¤é¤Ð¡¢¥¹¥Æ¥Ã¥× 1 ¤«¤é 3 ¤Þ¤Ç¤ò¼Â + ºÝ¤Ë»î¤·¤Æ¡¢Vim ¤ò1ÅÙ½ªÎ»¤·¤Æ¤«¤éºÆ¤Óµ¯Æ°¤·¤Þ¤·¤ç¤¦¡£ + +NOTE: :q! ¤ÏÁ´¤Æ¤ÎÊѹ¹¤òÇË´þ¤·¤Þ¤¹¡£¥ì¥Ã¥¹¥ó¤Ë¤ÆÊѹ¹¤ò¥Õ¥¡¥¤¥ë¤ËÊÝ + ¸¤¹¤ëÊýË¡¤Ë¤Ä¤¤¤Æ¤âÊÙ¶¯¤·¤Æ¤¤¤­¤Þ¤·¤ç¤¦¡£ + + 5. 1.3¤Þ¤Ç¥«¡¼¥½¥ë¤ò°Üư¤µ¤»¤Þ¤·¤ç¤¦¡£ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 1.3: ¥Æ¥­¥¹¥ÈÊÔ½¸ - ºï½ü + + + ** ¥Î¡¼¥Þ¥ë¥â¡¼¥É¤Ë¤Æ¥«¡¼¥½¥ë¤Î²¼¤Îʸ»ú¤òºï½ü¤¹¤ë¤Ë¤Ï x ¤ò²¡¤·¤Þ¤¹ ** + + 1. °Ê²¼¤Î ---> ¤È¼¨¤µ¤ì¤¿¹Ô¤Ë¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤·¤ç¤¦¡£ + + 2. ´Ö°ã¤¤¤ò½¤Àµ¤¹¤ë¤¿¤á¤Ë¡¢ºï½ü¤¹¤ëºÇ½é¤Îʸ»ú¤Þ¤Ç¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤¹¡£ + + 3. ÉÔɬÍפÊʸ»ú¤ò x ¤ò²¡¤·¤Æºï½ü¤·¤Þ¤·¤ç¤¦¡£ + + 4. ʸ¤¬Àµ¤·¤¯¤Ê¤ë¤Þ¤Ç ¥¹¥Æ¥Ã¥× 2 ¤«¤é 4 ¤ò·«¤êÊÖ¤·¤Þ¤·¤ç¤¦¡£ + +---> ¤½¤Î ¤¦¤¦¤µ¤® ¤Ï ¤Ä¤Ä¤­¤­ ¤ò ¤³¤¨¤¨¤Æ¤Æ ¤È¤Ó¤Ï¤Í¤¿¤¿ + + 5. ¹Ô¤¬Àµ¤·¤¯¤Ê¤Ã¤¿¤é¡¢¥ì¥Ã¥¹¥ó 1.4 ¤Ø¿Ê¤ß¤Þ¤·¤ç¤¦¡£ + +NOTE: Á´¤Æ¤Î¥ì¥Ã¥¹¥ó¤òÄ̤¸¤Æ¡¢³Ð¤¨¤è¤¦¤È¤¹¤ë¤Î¤Ç¤Ï¤Ê¤¯¼ÂºÝ¤Ë¤ä¤Ã¤Æ¤ß¤Þ¤·¤ç¤¦¡£ + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 1.4: ¥Æ¥­¥¹¥ÈÊÔ½¸ - ÁÞÆþ + + + ** ¥Î¡¼¥Þ¥ë¥â¡¼¥É¤Ë¤Æ¥Æ¥­¥¹¥È¤òÁÞÆþ¤¹¤ë¤Ë¤Ï i ¤ò²¡¤·¤Þ¤¹ ** + + 1. °Ê²¼¤Î ---> ¤È¼¨¤µ¤ì¤¿ºÇ½é¤Î¹Ô¤Ë¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤·¤ç¤¦¡£ + + 2. 1¹ÔÌܤò2¹ÔÌÜ¤ÈÆ±¤¸Íͤˤ¹¤ë¤¿¤á¤Ë¡¢¥Æ¥­¥¹¥È¤òÁÞÆþ¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤°ÌÃÖ + ¤Î¼¡¤Îʸ»ú¤Ë¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤¹¡£ + + 3. i ¥­¡¼¤ò²¡¤·¤Æ¤«¤é¡¢Äɲä¬É¬ÍפÊʸ»ú¤ò¥¿¥¤¥×¤·¤Þ¤·¤ç¤¦¡£ + + 4. ´Ö°ã¤¤¤ò½¤Àµ¤·¤¿¤é ¤ò²¡¤·¤Æ¥³¥Þ¥ó¥É¥â¡¼¥É¤ËÌá¤ê¡¢Àµ¤·¤¤Ê¸¤Ë¤Ê¤ëÍÍ + ¤Ë¥¹¥Æ¥Ã¥× 2 ¤«¤é 4 ¤ò·«¤êÊÖ¤·¤Þ¤·¤ç¤¦¡£ + +---> ¤³¤Î ¤Ë¤Ï ­¤ê¤Ê¤¤ ¥Æ¥­¥¹¥È ¤¢¤ë¡£ +---> ¤³¤Î ¹Ô ¤Ë¤Ï ´ö¤Ä¤« ­¤ê¤Ê¤¤ ¥Æ¥­¥¹¥È ¤¬ ¤¢¤ë¡£ + + 5. ÁÞÆþ¤ÎÊýË¡¤¬¤ï¤«¤Ã¤¿¤é²¼¤Î¥ì¥Ã¥¹¥ó1¤ÎÍ×Ìó¤ò¸«¤Þ¤·¤ç¤¦¡£ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 1.5: ¥Æ¥­¥¹¥ÈÊÔ½¸ - Äɲà + + + ** ¥Æ¥­¥¹¥ÈÄɲ乤ë¤Ë¤Ï A ¤ò²¡¤·¤Þ¤·¤ç¤¦ ** + + 1. °Ê²¼¤Î ---> ¤È¼¨¤µ¤ì¤¿ºÇ½é¤Î¹Ô¤Ë¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤·¤ç¤¦¡£ + ¥«¡¼¥½¥ë¤¬¤½¤Îʸ»ú¾å¤Ë¤¢¤Ã¤Æ¤â¤«¤Þ¤¤¤Þ¤»¤ó¡£ + + 2. Äɲä¬É¬Íפʾì½ê¤Ç A ¤ò¥¿¥¤¥×¤·¤Þ¤·¤ç¤¦¡£ + + 3. ¥Æ¥­¥¹¥È¤òÄɲä·½ª¤¨¤¿¤é¡¢ ¤ò²¡¤·¤Æ¥Î¡¼¥Þ¥ë¥â¡¼¥É¤ËÌá¤ê¤Þ¤·¤ç¤¦¡£ + + 4. 2¹ÔÌܤΠ---> ¤È¼¨¤µ¤ì¤¿¾ì½ê¤Ø°Üư¤·¡¢¥¹¥Æ¥Ã¥× 2 ¤«¤é 3 ·«¤êÊÖ¤·¤ÆÊ¸Ë¡¤ò + ½¤Àµ¤·¤Þ¤·¤ç¤¦¡£ + +---> ¤³¤³¤Ë¤Ï´Ö°ã¤Ã¤¿¥Æ¥­¥¹¥È¤¬¤¢¤ê + ¤³¤³¤Ë¤Ï´Ö°ã¤Ã¤¿¥Æ¥­¥¹¥È¤¬¤¢¤ê¤Þ¤¹¡£ +---> ¤³¤³¤Ë¤â´Ö°ã¤Ã¤¿¥Æ¥­¥¹ + ¤³¤³¤Ë¤â´Ö°ã¤Ã¤¿¥Æ¥­¥¹¥È¤¬¤¢¤ê¤Þ¤¹¡£ + + 5. ¥Æ¥­¥¹¥È¤ÎÄɲ䬷ڲ÷¤Ë¤Ê¤Ã¤Æ¤­¤¿¤é¥ì¥Ã¥¹¥ó 1.6 ¤Ø¿Ê¤ß¤Þ¤·¤ç¤¦¡£ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 1.6: ¥Õ¥¡¥¤¥ë¤ÎÊÔ½¸ + + + ** ¥Õ¥¡¥¤¥ë¤òÊݸ¤·¤Æ½ªÎ»¤¹¤ë¤Ë¤Ï :wq ¤È¥¿¥¤¥×¤·¤Þ¤¹ ** + + !! NOTE: °Ê²¼¤Î¥¹¥Æ¥Ã¥×¤ò¼Â¹Ô¤¹¤ëÁ°¤Ë¡¢¤Þ¤ºÁ´ÂΤòÆÉ¤ó¤Ç¤¯¤À¤µ¤¤!! + + 1. ¥ì¥Ã¥¹¥ó 1.2 ¤Ç¤ä¤Ã¤¿¤è¤¦¤Ë :q! ¤ò¥¿¥¤¥×¤·¤Æ¡¢¤³¤Î¥Á¥å¡¼¥È¥ê¥¢¥ë¤ò½ªÎ» + ¤·¤Þ¤¹¡£ + + 2. ¥·¥§¥ë¥×¥í¥ó¥×¥È¤Ç¤³¤Î¥³¥Þ¥ó¥É¤ò¥¿¥¤¥×¤·¤Þ¤¹: vim tutor + 'vim'¤¬ Vim ¥¨¥Ç¥£¥¿¤òµ¯Æ°¤¹¤ë¥³¥Þ¥ó¥É¡¢'tutor' ¤ÏÊÔ½¸¤·¤¿¤¤¥Õ¥¡¥¤¥ë¤Î + ̾Á°¤Ç¤¹¡£Êѹ¹¤·¤Æ¤â¤è¤¤¥Õ¥¡¥¤¥ë¤ò»È¤¤¤Þ¤·¤ç¤¦¡£ + + 3. Á°¤Î¥ì¥Ã¥¹¥ó¤Ç³Ø¤ó¤À¤è¤¦¤Ë¡¢¥Æ¥­¥¹¥È¤òÁÞÆþ¡¢ºï½ü¤·¤Þ¤¹¡£ + + 4. Êѹ¹¤ò¥Õ¥¡¥¤¥ë¤ËÊݸ¤·¤Þ¤¹: :wq + + 5. vimtutor ¤òºÆÅÙµ¯Æ°¤·¡¢°Ê²¼¤ÎÍ×Ìó¤Ø¿Ê¤ß¤Þ¤·¤ç¤¦¡£ + + 6. °Ê¾å¤Î¥¹¥Æ¥Ã¥×¤òÆÉ¤ó¤ÇÍý²ò¤·¤¿¾å¤Ç¤³¤ì¤ò¼Â¹Ô¤·¤Þ¤·¤ç¤¦¡£ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 1 Í×Ìó + + + 1. ¥«¡¼¥½¥ë¤ÏÌð°õ¥­¡¼¤â¤·¤¯¤Ï hjkl ¥­¡¼¤Ç°Üư¤·¤Þ¤¹¡£ + h (º¸) j (²¼) k (¾å) l (±¦) + + 2. Vim ¤òµ¯Æ°¤¹¤ë¤Ë¤Ï¥×¥í¥ó¥×¥È¤«¤é vim ¥Õ¥¡¥¤¥ë̾ ¤È¥¿¥¤¥×¤·¤Þ¤¹¡£ + + 3. Vim ¤ò½ªÎ»¤¹¤ë¤Ë¤Ï :q! ¤È¥¿¥¤¥×¤·¤Þ¤¹(Êѹ¹¤òÇË´þ)¡£ + ¤â¤·¤¯¤Ï :wq ¤È¥¿¥¤¥×¤·¤Þ¤¹(Êѹ¹¤òÊݸ)¡£ + + 4. ¥«¡¼¥½¥ë¤Î²¼¤Îʸ»ú¤òºï½ü¤¹¤ë¤Ë¤Ï¡¢¥Î¡¼¥Þ¥ë¥â¡¼¥É¤Ç x ¤È¥¿¥¤¥×¤·¤Þ¤¹¡£ + + 5. ¥«¡¼¥½¥ë¤Î°ÌÃÖ¤Ëʸ»ú¤òÁÞÆþ¤¹¤ë¤Ë¤Ï¡¢¥Î¡¼¥Þ¥ë¥â¡¼¥É¤Ç i ¤È¥¿¥¤¥×¤·¤Þ¤¹¡£ + i ¥Æ¥­¥¹¥È¤Î¥¿¥¤¥× ¥«¡¼¥½¥ë°ÌÃÖ¤ËÄɲà + A ¥Æ¥­¥¹¥È¤ÎÄɲà ¹ÔËö¤ËÄɲà + +NOTE: ¥­¡¼¤ò²¡¤¹¤È¥Î¡¼¥Þ¥ë¥â¡¼¥É¤Ë°Ü¹Ô¤·¤Þ¤¹¡£¤½¤ÎºÝ¡¢´Ö°ã¤Ã¤¿¤êÆþÎÏÅÓ + Ãæ¤Î¥³¥Þ¥ó¥É¤ò¼è¤ê¾Ã¤¹¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ + +¤µ¤Æ¡¢Â³¤±¤Æ¥ì¥Ã¥¹¥ó 2 ¤ò»Ï¤á¤Þ¤·¤ç¤¦¡£ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 2.1: ºï½ü¥³¥Þ¥ó¥É + + + ** ñ¸ì¤ÎËöÈø¤Þ¤Ç¤òºï½ü¤¹¤ë¤Ë¤Ï dw ¤È¥¿¥¤¥×¤·¤Þ¤·¤ç¤¦ ** + + 1. ¥Î¡¼¥Þ¥ë¥â¡¼¥É¤Ç¤¢¤ë¤³¤È¤ò³Îǧ¤¹¤ë¤¿¤á¤Ë ¤ò²¡¤·¤Þ¤·¤ç¤¦¡£ + + 2. °Ê²¼¤Î ---> ¤È¼¨¤µ¤ì¤¿¹Ô¤Ë¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤·¤ç¤¦¡£ + + 3. ¾Ã¤·¤¿¤¤Ã±¸ì¤ÎÀèÆ¬¤Ë¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤·¤ç¤¦¡£ + + 4. ñ¸ì¤òºï½ü¤¹¤ë¤¿¤á¤Ë dw ¤È¥¿¥¤¥×¤·¤Þ¤·¤ç¤¦¡£ + + NOTE: ¥¿¥¤¥×¤¹¤ë¤È¡¢dw ¤È¤¤¤¦Ê¸»ú¤¬¥¹¥¯¥ê¡¼¥ó¤ÎºÇ²¼¹Ô¤Ë¸½¤ï¤ì¤Þ¤¹¡£ + ¥¿¥¤¥×¤ò´Ö°ã¤Ã¤Æ¤·¤Þ¤Ã¤¿»þ¤Ë¤Ï ¤ò²¡¤·¤Æ¤ä¤êľ¤·¤Þ¤·¤ç¤¦¡£ + +---> ¤³¤Î ʸ »æ ¤Ë¤Ï ¤¤¤¯¤Ä¤«¤Î ¤¿¤Î¤·¤¤ ɬÍפΤʤ¤ ñ¸ì ¤¬ ´Þ¤Þ¤ì¤Æ ¤¤¤Þ¤¹¡£ + + 5. 3 ¤«¤é 4 ¤Þ¤Ç¤òʸ¤¬Àµ¤·¤¯¤Ê¤ë¤Þ¤Ç·«¤êÊÖ¤·¡¢¥ì¥Ã¥¹¥ó 2.2 ¤Ø¿Ê¤ß¤Þ¤·¤ç¤¦¡£ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 2.2: ¤½¤Î¾¤Îºï½ü¥³¥Þ¥ó¥É + + + ** ¹Ô¤ÎËöÈø¤Þ¤Ç¤òºï½ü¤¹¤ë¤Ë¤Ï d$ ¤È¥¿¥¤¥×¤·¤Þ¤·¤ç¤¦ ** + + 1. ¥Î¡¼¥Þ¥ë¥â¡¼¥É¤Ç¤¢¤ë¤³¤È¤ò³Îǧ¤¹¤ë¤Î¤Ë ¤ò²¡¤·¤Þ¤·¤ç¤¦¡£ + + 2. °Ê²¼¤Î ---> ¤È¼¨¤µ¤ì¤¿¹Ô¤Ë¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤·¤ç¤¦¡£ + + 3. Àµ¤·¤¤Ê¸¤ÎËöÈø¤Ø¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤·¤ç¤¦(ºÇ½é¤Î . ¤Î¸å¤Ç¤¹)¡£ + + 4. ¹ÔËö¤Þ¤Çºï½ü¤¹¤ë¤Î¤Ë d$ ¤È¥¿¥¤¥×¤·¤Þ¤·¤ç¤¦¡£ + +---> 狼¤¬¤³¤Î¹Ô¤ÎºÇ¸å¤ò2ÅÙ¥¿¥¤¥×¤·¤Þ¤·¤¿¡£ 2ÅÙ¥¿¥¤¥×¤·¤Þ¤·¤¿¡£ + + + 5. ¤É¤¦¤¤¤¦¤³¤È¤«Íý²ò¤¹¤ë¤¿¤á¤Ë¡¢¥ì¥Ã¥¹¥ó 2.3 ¤Ø¿Ê¤ß¤Þ¤·¤ç¤¦¡£ + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 2.3: ¥ª¥Ú¥ì¡¼¥¿¤È¥â¡¼¥·¥ç¥ó + + + ¿¤¯¤Î¥³¥Þ¥ó¥É¤Ï¥ª¥Ú¥ì¡¼¥¿¤È¥â¡¼¥·¥ç¥ó¤«¤é¥Æ¥­¥¹¥È¤ËÊѹ¹¤ò²Ã¤Þ¤¹¡£ + ºï½ü¥³¥Þ¥ó¥É d ¤Î¥ª¥Ú¥ì¡¼¥¿¤Ï¼¡¤ÎÍͤˤʤäƤ¤¤Þ¤¹: + + d ¥â¡¼¥·¥ç¥ó + + ¤½¤ì¤¾¤ì: + d - ºï½ü¥³¥Þ¥ó¥É¡£ + ¥â¡¼¥·¥ç¥ó - ²¿¤ËÂФ·¤ÆÆ¯¤­¤«¤±¤ë¤«(°Ê²¼¤Ëµó¤²¤Þ¤¹)¡£ + + ¥ª¥Ú¥ì¡¼¥¿¤Î°ìÉô°ìÍ÷: + w - ¥«¡¼¥½¥ë°ÌÃÖ¤«¤é¶õÇò¤ò´Þ¤àñ¸ì¤ÎËöÈø¤Þ¤Ç¡£ + e - ¥«¡¼¥½¥ë°ÌÃÖ¤«¤é¶õÇò¤ò´Þ¤Þ¤Ê¤¤Ã±¸ì¤ÎËöÈø¤Þ¤Ç¡£ + $ - ¥«¡¼¥½¥ë°ÌÃÖ¤«¤é¹ÔËö¤Þ¤Ç¡£ + + ¤Ä¤Þ¤ê de ¤È¥¿¥¤¥×¤¹¤ë¤È¡¢¥«¡¼¥½¥ë°ÌÃÖ¤«¤éñ¸ì¤Î½ª¤ï¤ê¤Þ¤Ç¤òºï½ü¤·¤Þ¤¹¡£ + +NOTE: ËÁ¸±¤·¤¿¤¤¿Í¤Ï¡¢¥Î¡¼¥Þ¥ë¥â¡¼¥É¤Ë¤Æ¥³¥Þ¥ó¥É¤Ê¤·¤Ë¥â¡¼¥·¥ç¥ó¤ò²¡¤·¤Æ + ¤ß¤Þ¤·¤ç¤¦¡£¥«¡¼¥½¥ë¤¬ÌÜŪ¸ì°ìÍ÷¤Ç¼¨¤µ¤ì¤ë°ÌÃÖ¤Ë°ÜÆ°¤¹¤ë¤Ï¤º¤Ç¤¹¡£ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 2.4: ¥â¡¼¥·¥ç¥ó¤Ë¥«¥¦¥ó¥È¤ò»ÈÍѤ¹¤ë + + + ** ²¿²ó¤â¹Ô¤¤¤¿¤¤·«¤êÊÖ¤·¤Î¥â¡¼¥·¥ç¥ó¤ÎÁ°¤Ë¿ôÃͤò¥¿¥¤¥×¤·¤Þ¤¹¡£ ** + + 1. °Ê²¼¤Î ---> ¤È¼¨¤µ¤ì¤¿¹Ô¤ÎÀèÆ¬¤Ë¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤¹¡£ + + 2. 2dw ¤ò¥¿¥¤¥×¤·¤ÆÃ±¸ì2¤Äʬ°Üư¤·¤Þ¤¹¡£ + + 3. 3e ¤ò¥¿¥¤¥×¤·¤Æ3¤ÄÌܤÎñ¸ì¤Î½ªÃ¼¤Ë°Üư¤·¤Þ¤¹¡£ + + 4. 0 (¥¼¥í)¤ò¥¿¥¤¥×¤·¤Æ¹ÔƬ¤Ë°Üư¤·¤Þ¤¹¡£ + + 5. ¥¹¥Æ¥Ã¥× 2 ¤È 3 ¤ò°ã¤¦¿ôÃͤȻȤäƷ«¤êÊÖ¤·¤Þ¤¹¡£ + +---> This is just a line with words you can move around in. + + 6. ¥ì¥Ã¥¹¥ó 2.5 ¤Ë¿Ê¤ß¤Þ¤·¤ç¤¦¡£ + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 2.5: ¤è¤ê¿¤¯¤òºï½ü¤¹¤ë¤¿¤á¤Ë¥«¥¦¥ó¥È¤ò»ÈÍѤ¹¤ë + + + ** ¥ª¥Ú¥ì¡¼¥¿¤È¥«¥¦¥ó¥È¤ò¥¿¥¤¥×¤¹¤ë¤È¡¢¤½¤ÎÁàºî¤¬Ê£¿ô²ó·«¤êÊÖ¤µ¤ì¤Þ¤¹¡£ ** + + ´û½Ò¤Îºï½ü¤Î¥ª¥Ú¥ì¡¼¥¿¤È¥â¡¼¥·¥ç¥ó¤ÎÁȤ߹ç¤ï¤»¤Ë¥«¥¦¥ó¥È¤òÄɲ乤뤳¤È¤Ç¡¢ + ¤è¤ê¿¤¯¤Îºï½ü¤¬¹Ô¤¨¤Þ¤¹: + d ¿ôÃÍ ¥â¡¼¥·¥ç¥ó + + 1. ---> ¤È¼¨¤µ¤ì¤¿¹Ô¤Î¹ÔƬÉôʬ¤Ë¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤·¤ç¤¦¡£ + + 2. UPPER CASE ¤Îñ¸ì2¤Ä¤ò 2dw ¤È¥¿¥¤¥×¤·¤Æºï½ü¤·¤Þ¤¹¡£ + + 3. UPPER CASE ¤È¤¤¤¦Ï¢Â³¤·¤¿Ã±¸ì¤ò¡¢1¤Ä¤Î¥³¥Þ¥ó¥É¤È°Û¤Ê¤ë¥«¥¦¥ó¥È¤ò»ØÄꤷ¡¢ + ¥¹¥Æ¥Ã¥× 1 ¤È 2 ¤ò·«¤êÊÖ¤·¤Þ¤¹¡£ + +---> ¤³¤ÎABC DE¹Ô¤ÎFGHI JK LMN OPñ¸ì¤ÏQ RS TUVåºÎï¤Ë¤Ê¤Ã¤¿¡£ + +NOTE: ¥ª¥Ú¥ì¡¼¥¿ d ¤È¥â¡¼¥·¥ç¥ó¤Î´Ö¤Ë¥«¥¦¥ó¥È¤ò»È¤Ã¤¿¾ì¹ç¡¢¥ª¥Ú¥ì¡¼¥¿¤Î¤Ê¤¤ + ¾ì¹ç¤Î¥â¡¼¥·¥ç¥ó¤Î¤è¤¦¤Ëưºî¤·¤Þ¤¹¡£ + Îã: 3dw ¤È d3w ¤ÏƱÅù¤Ç¡¢3w ¤òºï½ü¤·¤Þ¤¹¡£ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 2.6: ¹Ô¤ÎÁàºî + + + ** ¹ÔÁ´ÂΤòºï½ü¤¹¤ë¤Ë¤Ï dd ¤È¥¿¥¤¥×¤·¤Þ¤¹ ** + + ¹ÔÁ´ÂΤòºï½ü¤¹¤ëÉÑÅÙ¤¬Â¿¤¤¤Î¤Ç¡¢Vi¤Î¥Ç¥¶¥¤¥Ê¡¼¤Ï¹Ô¤Îºï½ü¤ò d ¤Î2²ó¥¿¥¤¥×¤È + ¤¤¤¦´Êñ¤Ê¤â¤Î¤Ë·è¤á¤Þ¤·¤¿¡£ + + 1. °Ê²¼¤Î¶ç¤Î2¹ÔÌܤ˥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤¹¡£ + 2. dd ¤È¥¿¥¤¥×¤·¤Æ¹Ô¤òºï½ü¤·¤Þ¤¹¡£ + 3. ¤µ¤é¤Ë4¹ÔÌÜ¤Ë°ÜÆ°¤·¤Þ¤¹¡£ + 4. 2dd ¤È¥¿¥¤¥×¤·¤Æ2¹Ô¤òºï½ü¤·¤Þ¤¹¡£ + +---> 1) ¥Ð¥é¤ÏÀÖ¤¤¡¢ +---> 2) ¤Ä¤Þ¤é¤Ê¤¤¤â¤Î¤Ï³Ú¤·¤¤¡¢ +---> 3) ¥¹¥ß¥ì¤ÏÀĤ¤¡¢ +---> 4) »ä¤Ï¼Ö¤ò¤â¤Ã¤Æ¤¤¤ë¡¢ +---> 5) »þ·×¤¬»þ¹ï¤ò¹ð¤²¤ë¡¢ +---> 6) º½Åü¤Ï´Å¤¤ +---> 7) ¥ª¥Þ¥¨¥â¥Ê¡¼ + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 2.7: ¤ä¤êľ¤·¥³¥Þ¥ó¥É + + + ** ºÇ¸å¤Î¥³¥Þ¥ó¥É¤ò¼è¤ê¾Ã¤¹¤Ë¤Ï u ¤ò²¡¤·¤Þ¤¹¡£U ¤Ï¹ÔÁ´ÂΤμè¾Ã¤Ç¤¹¡£ ** + + 1. °Ê²¼¤Î ---> ¤È¼¨¤µ¤ì¤¿¹Ô¤Ë¥«¡¼¥½¥ë¤ò°Üư¤·¡¢ºÇ½é¤Î´Ö°ã¤¤¤Ë¥«¡¼¥½ + ¥ë¤ò°Üư¤·¤Þ¤·¤ç¤¦¡£ + 2. x ¤ò¥¿¥¤¥×¤·¤Æ¤¤¤é¤Ê¤¤ÀèÆ¬¤Îʸ»ú¤òºï½ü¤·¤Þ¤·¤ç¤¦¡£ + 3. ¤µ¤¡¡¢u ¤ò¥¿¥¤¥×¤·¤ÆºÇ¸å¤Ë¼Â¹Ô¤·¤¿¥³¥Þ¥ó¥É¤ò¼è¤ê¾Ã¤·¤Þ¤·¤ç¤¦¡£ + 4. º£Å٤ϡ¢x ¤ò»ÈÍѤ·¤Æ¸í¤ê¤òÁ´¤Æ½¤Àµ¤·¤Þ¤·¤ç¤¦¡£ + 5. Âçʸ»ú¤Î U ¤ò¥¿¥¤¥×¤·¤Æ¡¢¹Ô¤ò¸µ¤Î¾õÂÖ¤ËÌᤷ¤Þ¤·¤ç¤¦¡£ + 6. u ¤ò¥¿¥¤¥×¤·¤ÆÄ¾Á°¤Î U ¥³¥Þ¥ó¥É¤ò¼è¾Ã¤·¤Þ¤·¤ç¤¦¡£ + 7. ¤Ç¤Ï¥³¥Þ¥ó¥É¤òºÆ¼Â¹Ô¤¹¤ë¤Î¤Ë CTRL-R (CTRL ¤ò²¡¤·¤¿¤Þ¤Þ R ¤òÂǤÄ)¤ò¿ô²ó + ¥¿¥¤¥×¤·¤Æ¤ß¤Þ¤·¤ç¤¦(¼è¾Ã¤Î¼è¾Ã)¡£ + +---> ¤³¤Î¤Î¹Ô¤Î¤Î´Ö°ã¤¤¤ò½¤Àµ¡¹¤·¡¢¸å¤Ç¤½¤ì¤é¤Î½¤Àµ¤ò¤ò¼è¾Ã¤·¤Þ¤Þ¤¹¤¹¡£ + + 8. ¤³¤ì¤Ï¤È¤Æ¤âÊØÍø¤Ê¥³¥Þ¥ó¥É¤Ç¤¹¡£¤µ¤¡¥ì¥Ã¥¹¥ó 2 Í×Ìó¤Ø¿Ê¤ß¤Þ¤·¤ç¤¦¡£ + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 2 Í×Ìó + + + 1. ¥«¡¼¥½¥ë°ÌÃÖ¤«¤éñ¸ì¤ÎËöÈø¤Þ¤Ç¤òºï½ü¤¹¤ë¤Ë¤Ï dw ¤È¥¿¥¤¥×¤·¤Þ¤¹¡£ + 2. ¥«¡¼¥½¥ë°ÌÃÖ¤«¤é¹Ô¤ÎËöÈø¤Þ¤Ç¤òºï½ü¤¹¤ë¤Ë¤Ï d$ ¤È¥¿¥¤¥×¤·¤Þ¤¹¡£ + 3. ¹ÔÁ´ÂΤòºï½ü¤¹¤ë¤Ë¤Ï dd ¤È¥¿¥¤¥×¤·¤Þ¤¹¡£ + + 4. ¥â¡¼¥·¥ç¥ó¤ò·«¤êÊÖ¤¹¤Ë¤Ï¿ôÃͤòÉÕÍ¿¤·¤Þ¤¹: 2w + 5. Êѹ¹¤ËÍѤ¤¤ë¥³¥Þ¥ó¥É¤Î·Á¼°¤Ï + ¥ª¥Ú¥ì¡¼¥¿ [¿ôÃÍ] ¥â¡¼¥·¥ç¥ó + + ¤½¤ì¤¾¤ì: + ¥ª¥Ú¥ì¡¼¥¿ - ºï½ü d ¤ÎÎà¤Ç²¿¤ò¤¹¤ë¤«¡£ + ¿ôÃÍ - ¤½¤Î¥³¥Þ¥ó¥É¤ò²¿²ó·«¤êÊÖ¤¹¤«¡£ + ¥â¡¼¥·¥ç¥ó - w (ñ¸ì)¤ä $ (¹ÔËö)¤Ê¤É¤ÎÎà¤Ç¡¢¥Æ¥­¥¹¥È¤Î²¿¤ËÂФ·¤ÆÆ¯¤­¤« + ¤±¤ë¤«¡£ + + 6. ¹Ô¤ÎÀèÆ¬¤Ë°Üư¤¹¤ë¤Ë¤Ï¥¼¥í¤ò»ÈÍѤ·¤Þ¤¹: 0 + + 7. Á°²ó¤Îưºî¤ò¼è¾Ã¤¹: u (¾®Ê¸»ú u) + ¹ÔÁ´ÂΤÎÊѹ¹¤ò¼è¾Ã¤¹: U (Âçʸ»ú U) + ¼è¾Ã¤·¤Î¼è¾Ã¤·: CTRL-R +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 3.1: ޤêÉÕ¤±¥³¥Þ¥ó¥É + + + ** ºÇ¸å¤Ëºï½ü¤µ¤ì¤¿¹Ô¤ò¥«¡¼¥½¥ë¤Î¸å¤ËޤêÉÕ¤±¤ë¤Ë¤Ï p ¤ò¥¿¥¤¥×¤·¤Þ¤¹ ** + + 1. °Ê²¼¤ÎÃÊÍî¤ÎºÇ½é¤Î¹Ô¤Ë¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤·¤ç¤¦¡£ + + 2. dd ¤È¥¿¥¤¥×¤·¤Æ¹Ô¤òºï½ü¤·¡¢Vim ¤Î¥Ð¥Ã¥Õ¥¡¤Ë³ÊǼ¤·¤Þ¤·¤ç¤¦¡£ + + 3. ºï½ü¤·¤¿¹Ô¤¬ËÜÍ褢¤ë¤Ù¤­°ÌÃ֤ξå¤Î¹Ô¤Þ¤Ç¡¢¥«¡¼¥½¥ë¤ò°Üư¤µ¤»¤Þ¤·¤ç¤¦¡£ + + 4. ¥Î¡¼¥Þ¥ë¥â¡¼¥É¤Ç p ¤ò¥¿¥¤¥×¤·¤Æ³ÊǼ¤·¤¿¹Ô¤ò²èÌ̤ËÌᤷ¤Þ¤¹¡£ + + 5. ½çÈÖ¤¬Àµ¤·¤¯¤Ê¤ëÍͤ˥¹¥Æ¥Ã¥× 2 ¤«¤é 4 ¤ò·«¤êÊÖ¤·¤Þ¤·¤ç¤¦¡£ + + d) µ®Êý¤â³Ø¤Ö¤³¤È¤¬¤Ç¤­¤ë? + b) ¥¹¥ß¥ì¤ÏÀĤ¤¡¢ + c) ÃηäȤϳؤ֤â¤Î¡¢ + a) ¥Ð¥é¤ÏÀÖ¤¤¡¢ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 3.2: ÃÖ¤­´¹¤¨¥³¥Þ¥ó¥É + + + ** ¥«¡¼¥½¥ë¤Î²¼¤Îʸ»ú¤òÃÖ¤­´¹¤¨¤ë¤Ë¤Ï r ¤ò¥¿¥¤¥×¤·¤Þ¤¹ ** + + 1. °Ê²¼¤Î ---> ¤È¼¨¤µ¤ì¤¿ºÇ½é¤Î¹Ô¤Ë¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤·¤ç¤¦¡£ + + 2. ºÇ½é¤Î´Ö°ã¤¤¤ÎÀèÆ¬¤Ë¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤·¤ç¤¦¡£ + + 3. r ¤È¥¿¥¤¥×¤·¡¢´Ö°ã¤Ã¤Æ¤¤¤ëʸ»ú¤òÃÖ¤­´¹¤¨¤ë¡¢Àµ¤·¤¤Ê¸»ú¤ò¥¿¥¤¥×¤·¤Þ¤·¤ç¤¦¡£ + + 4. ºÇ½é¤Î¹Ô¤¬Àµ¤·¤¯¤Ê¤ë¤Þ¤Ç¥¹¥Æ¥Ã¥× 2 ¤«¤é 3 ¤ò·«¤êÊÖ¤·¤Þ¤·¤ç¤¦¡£ + +---> ¤³¤Î¹ç¤ò¿ÍÎϤ·¤¿»þ¤Í¡¢¤½¤Î¿Í¤Ï´ö¤Ä¤«Ìä°ã¤Ã¤¿¥­¡¼¤ò²¡¤·¤â¤·¤¿! +---> ¤³¤Î¹Ô¤òÆþÎϤ·¤¿»þ¤Ë¡¢¤½¤Î¿Í¤Ï´ö¤Ä¤«´Ö°ã¤Ã¤¿¥­¡¼¤ò²¡¤·¤Þ¤·¤¿! + + 5. ¤µ¤¡¡¢¥ì¥Ã¥¹¥ó 3.2 ¤Ø¿Ê¤ß¤Þ¤·¤ç¤¦¡£ + +NOTE: ¼ÂºÝ¤Ë»î¤·¤Þ¤·¤ç¤¦¡£·è¤·¤Æ³Ð¤¨¤ë¤À¤±¤Ë¤Ï¤·¤Ê¤¤¤³¤È¡£ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 3.3: Êѹ¹¥³¥Þ¥ó¥É + + + ** ñ¸ì¤Î°ìÉô¡¢¤â¤·¤¯¤ÏÁ´ÂΤòÊѹ¹¤¹¤ë¤Ë¤Ï cw ¤È¥¿¥¤¥×¤·¤Þ¤¹ ** + + 1. °Ê²¼¤Î ---> ¤È¼¨¤µ¤ì¤¿ºÇ½é¤Î¹Ô¤Ë¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤·¤ç¤¦¡£ + + 2. lubw ¤Î u ¤Î°ÌÃ֤˥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤·¤ç¤¦¡£ + + 3. cw ¤È¥¿¥¤¥×¤·¡¢Àµ¤·¤¤Ã±¸ì¤ò¥¿¥¤¥×¤·¤Þ¤·¤ç¤¦(¤³¤Î¾ì¹ç 'ine' ¤È¥¿¥¤¥×)¡£ + + 4. ¼¡¤Î´Ö°ã¤¤(Êѹ¹¤¹¤Ù¤­Ê¸»ú¤ÎÀèÆ¬)¤Ë°Üư¤¹¤ë¤¿¤á¤Ë ¤ò¥¿¥¤¥×¤·¤Þ¤¹¡£ + + 5. ºÇ½é¤Î¹Ô¤¬¼¡¤Î¹Ô¤ÎÍͤˤʤë¤Þ¤Ç¥¹¥Æ¥Ã¥× 3 ¤È 4 ¤ò·«¤êÊÖ¤·¤Þ¤¹¡£ + +---> This lubw has a few wptfd that mrrf changing usf the change command. +---> This line has a few words that need changing using the change command. + +cw ¤Ïñ¸ì¤òÊѹ¹¤¹¤ë¤À¤±¤Ç¤Ê¤¯¡¢ÁÞÆþ¤â¹Ô¤¨¤ë¤³¤È¤ËÃí°Õ¤·¤Þ¤·¤ç¤¦¡£ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 3.4: c ¤ò»ÈÍѤ·¤¿¤½¤Î¾¤ÎÊѹ¹ + + + ** Êѹ¹¥³¥Þ¥ó¥É¤Ï¡¢ºï½ü¥³¥Þ¥ó¥É¤ÈƱ¤¸Íͤ˥ª¥Ö¥¸¥§¥¯¥È¤ò»ÈÍѤ·¤Þ¤¹ ** + + 1. Êѹ¹¥³¥Þ¥ó¥É¤Ï¡¢ºï½ü¥³¥Þ¥ó¥É¤ÈƱ¤¸¤è¤¦¤Êưºî¤ò¤·¤Þ¤¹¡£¤½¤Î·Á¼°¤Ï + + c [¿ôÃÍ] ¥â¡¼¥·¥ç¥ó + + 2. ¥ª¥Ö¥¸¥§¥¯¥È¤âƱ¤¸¤Ç¡¢w ¤Ïñ¸ì¡¢ $ ¤Ï¹ÔËö¤Ê¤É¤È¤¤¤Ã¤¿¤â¤Î¤Ç¤¹¡£ + + 3. °Ê²¼¤Î ---> ¤È¼¨¤µ¤ì¤¿¹Ô¤Ë¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤·¤ç¤¦¡£ + + 4. ºÇ½é¤Î´Ö°ã¤¤¤Ø¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤·¤ç¤¦¡£ + + 5. c$ ¤È¥¿¥¤¥×¤·¤Æ¹Ô¤Î»Ä¤ê¤ò£²¹ÔÌܤÎÍͤˤ·¡¢ ¤ò²¡¤·¤Þ¤·¤ç¤¦¡£ + +---> The end of this line needs some help to make it like the second. +---> The end of this line needs to be corrected using the c$ command. + +NOTE: ¥¿¥¤¥×Ãæ¤Î´Ö°ã¤¤¤Ï¥Ð¥Ã¥¯¥¹¥Ú¡¼¥¹¥­¡¼¤ò»È¤Ã¤ÆÄ¾¤¹¤³¤È¤â¤Ç¤­¤Þ¤¹¡£ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 3 Í×Ìó + + + 1. ´û¤Ëºï½ü¤µ¤ì¤¿¥Æ¥­¥¹¥È¤òºÆÇÛÃÖ¤¹¤ë¤Ë¤Ï¡¢p ¤ò¥¿¥¤¥×¤·¤Þ¤¹¡£¤³¤ì¤Ïºï½ü¤µ + ¤ì¤¿¥Æ¥­¥¹¥È¤ò¥«¡¼¥½¥ë¤Î¸å¤ËÁÞÆþ¤·¤Þ¤¹(¹Ôñ°Ì¤Çºï½ü¤µ¤ì¤¿¤Î¤Ê¤é¤Ð¡¢¥«¡¼ + ¥½¥ë¤Î¤¢¤ë¼¡¤Î¹Ô¤ËÁÞÆþ¤µ¤ì¤Þ¤¹)¡£ + + 2. ¥«¡¼¥½¥ë¤Î²¼¤Îʸ»ú¤òÃÖ¤­´¹¤¨¤ë¤Ë¤Ï¡¢r ¤ò¥¿¥¤¥×¤·¤¿¸å¡¢¤½¤ì¤òÃÖ¤­´¹¤¨¤ë + ʸ»ú¤ò¥¿¥¤¥×¤·¤Þ¤¹¡£ + + 3. Êѹ¹¥³¥Þ¥ó¥É¤Ç¤Ï¥«¡¼¥½¥ë°ÌÃÖ¤«¤éÆÃÄê¤Î¥â¡¼¥·¥ç¥ó¤Ç»ØÄꤵ¤ì¤ë½ªÃ¼¤Þ¤Ç¤òÊÑ + ¹¹¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡£Î㤨¤Ð cw ¤Ê¤é¤Ð¥«¡¼¥½¥ë°ÌÃÖ¤«¤éñ¸ì¤Î½ª¤ï¤ê¤Þ¤Ç¡¢ + c$ ¤Ê¤é¤Ð¹Ô¤Î½ª¤ï¤ê¤Þ¤Ç¤òÊѹ¹¤·¤Þ¤¹¡£ + + 4. Êѹ¹¥³¥Þ¥ó¥É¤Î·Á¼°¤Ï + + c [¿ôÃÍ] ¥â¡¼¥·¥ç¥ó + +¤µ¤¡¡¢¼¡¤Î¥ì¥Ã¥¹¥ó¤Ø¿Ê¤ß¤Þ¤·¤ç¤¦¡£ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 4.1: °ÌÃ֤ȥե¡¥¤¥ë¤Î¾ðÊó + + ** ¥Õ¥¡¥¤¥ëÆâ¤Ç¤Î°ÌÃ֤ȥե¡¥¤¥ë¤Î¾õÂÖ¤òɽ¼¨¤¹¤ë¤Ë¤Ï CTRL-G ¤ò¥¿¥¤¥×¤·¤Þ¤¹¡£ + ¥Õ¥¡¥¤¥ëÆâ¤Î¤¢¤ë¹Ô¤Ë°Üư¤¹¤ë¤Ë¤Ï G ¤ò¥¿¥¤¥×¤·¤Þ¤¹ ** + + NOTE: ¥¹¥Æ¥Ã¥×¤ò¼Â¹Ô¤¹¤ëÁ°¤Ë¡¢¤³¤Î¥ì¥Ã¥¹¥óÁ´¤Æ¤ËÌܤòÄ̤·¤Þ¤·¤ç¤¦!! + + 1. CTRL ¤ò²¡¤·¤¿¤Þ¤Þ g ¤ò²¡¤·¤Þ¤·¤ç¤¦¡£¤³¤ÎÁàºî¤ò CTRL-G ¤È¸Æ¤ó¤Ç¤¤¤Þ¤¹¡£ + ¥Ú¡¼¥¸¤Î°ìÈÖ²¼¤Ë¥Õ¥¡¥¤¥ë̾¤È¹ÔÈֹ椬ɽ¼¨¤µ¤ì¤ë¤Ï¤º¤Ç¤¹¡£ ¥¹¥Æ¥Ã¥× 3¤Î¤¿¤á + ¤Ë¹ÔÈÖ¹æ¤ò³Ð¤¨¤Æ¤ª¤­¤Þ¤·¤ç¤¦¡£ + +NOTE: ²èÌ̤ᦲ¼¶ù¤Ë¥«¡¼¥½¥ë¤Î°ÌÃÖ¤¬É½¼¨¤µ¤ì¤Æ¤¤¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£¤³¤ì¤Ï + 'ruler' ¥ª¥×¥·¥ç¥ó(¥ì¥Ã¥¹¥ó6¤ÇÀâÌÀ)¤òÀßÄꤹ¤ë¤³¤È¤Çɽ¼¨¤µ¤ì¤Þ¤¹¡£ + + 2. ºÇ²¼¹Ô¤Ë°Üư¤¹¤ë¤¿¤á¤Ë G ¤ò¥¿¥¤¥×¤·¤Þ¤·¤ç¤¦¡£ + ¥Õ¥¡¥¤¥ë¤ÎÀèÆ¬¤Ë°Üư¤¹¤ë¤Ë¤Ï gg ¤È¥¿¥¤¥×¤·¤Þ¤·¤ç¤¦¡£ + + 3. Àè¤Û¤É¤Î¹Ô¤ÎÈÖ¹æ¤ò¥¿¥¤¥×¤· G ¤ò¥¿¥¤¥×¤·¤Þ¤·¤ç¤¦¡£ºÇ½é¤Ë CTRL-G ¤ò²¡¤·¤¿¹Ô + ¤ËÌá¤Ã¤ÆÍè¤ë¤Ï¤º¤Ç¤¹¡£ + + 4. ¼«¿®¤¬»ý¤Æ¤¿¤é¥¹¥Æ¥Ã¥× 1 ¤«¤é 3 ¤ò¼Â¹Ô¤·¤Þ¤·¤ç¤¦¡£ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 4.2: ¸¡º÷¥³¥Þ¥ó¥É + + + ** ¸ì¶ç¤ò¸¡º÷¤¹¤ë¤Ë¤Ï / ¤È¡¢Á°Êý¸¡º÷¤¹¤ë¸ì¶ç¤ò¥¿¥¤¥×¤·¤Þ¤¹¡£** + + 1. ¥Î¡¼¥Þ¥ë¥â¡¼¥É¤Ç / ¤È¤¤¤¦Ê¸»ú¤ò¥¿¥¤¥×¤·¤Þ¤¹¡£²èḬ̀ìÈÖ²¼¤Ë : ¥³¥Þ¥ó¥É¤È + Ʊ¤¸ÍÍ¤Ë / ¤¬¸½¤ì¤ë¤³¤È¤Ëµ¤¤Å¤¯¤Ç¤·¤ç¤¦¡£ + + 2. ¤Ç¤Ï¡¢'errroor' ¤È¥¿¥¤¥×¤·¤Þ¤·¤ç¤¦¡£¤³¤ì¤¬¸¡º÷¤·¤¿¤¤Ã±¸ì¤Ç¤¹¡£ + + 3. Ʊ¤¸¸ì¤ò¤â¤¦°ìÅÙ¸¡º÷¤¹¤ë¤È¤­¤Ï ñ¤Ë n ¤ò¥¿¥¤¥×¤·¤Þ¤¹¡£ + µÕÊý¸þ¤Ë¸ì¶ç¤ò¸¡º÷¤¹¤ë¤È¤­¤Ï N ¤ò¥¿¥¤¥×¤·¤Þ¤¹¡£ + + 4. µÕÊý¸þ¤Ë¸ì¶ç¤ò¸¡º÷¤¹¤ë¾ì¹ç¤Ï¡¢/ ¤ÎÂå¤ï¤ê¤Ë ? ¥³¥Þ¥ó¥É¤ò»ÈÍѤ·¤Þ¤¹¡£ + + 5. ¸µ¤Î¾ì½ê¤ËÌá¤ë¤Ë¤Ï CTRL-O (Ctrl ¤ò²¡¤·Â³¤±¤Ê¤¬¤é o ʸ»ú¥¿¥¤¥×)¤ò¥¿¥¤¥×¤· + ¤Þ¤¹¡£¤µ¤é¤ËÌá¤ë¤Ë¤Ï¤³¤ì¤ò·«¤êÊÖ¤·¤Þ¤¹¡£CTRL-I ¤ÏÁ°Êý¸þ¤Ç¤¹¡£ + +Note: "errroor" ¤Ï error ¤È¥¹¥Ú¥ë¤¬°ã¤¤¤Þ¤¹; errroor ¤Ï¤¤¤ï¤æ¤ë error ¤Ç¤¹¡£ +Note: ¸¡º÷¤¬¥Õ¥¡¥¤¥ë¤Î½ª¤ï¤ê¤Ë㤹¤ë¤È¡¢¥ª¥×¥·¥ç¥ó 'wrapscan' ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë + ¾ì¹ç¤Ï¡¢¥Õ¥¡¥¤¥ë¤ÎÀèÆ¬¤«¤é¸¡º÷¤ò³¹Ô¤·¤Þ¤¹¡£ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 4.3: Âбþ¤¹¤ë³ç¸Ì¤ò¸¡º÷ + + + ** Âбþ¤¹¤ë ),] ¤ä } ¤ò¸¡º÷¤¹¤ë¤Ë¤Ï % ¤ò¥¿¥¤¥×¤·¤Þ¤¹ ** + + 1. ²¼¤Î ---> ¤Ç¼¨¤µ¤ì¤¿¹Ô¤Ç (,[ ¤« { ¤Î¤É¤ì¤«¤Ë¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤·¤ç¤¦¡£ + + 2. ¤½¤³¤Ç % ¤È¥¿¥¤¥×¤·¤Þ¤·¤ç¤¦¡£ + + 3. ¥«¡¼¥½¥ë¤ÏÂбþ¤¹¤ë³ç¸Ì¤Ë°Üư¤¹¤ë¤Ï¤º¤Ç¤¹¡£ + + 4. ºÇ½é¤Î³ç¸Ì¤Ë°Üư¤¹¤ë¤Ë¤Ï % ¤È¥¿¥¤¥×¤·¤Þ¤·¤ç¤¦¡£ + + 5. ¾¤Î (,),[,],{ or } ¤Ç¥«¡¼¥½¥ë¤ò°Üư¤·¡¢% ¤¬²¿¤ò¤·¤Æ¤¤¤ë¤«³Îǧ¤·¤Þ¤·¤ç¤¦¡£ + +---> This ( is a test line with ('s, ['s ] and {'s } in it. )) + + +NOTE: ¤³¤Îµ¡Ç½¤Ï³ç¸Ì¤¬°ìÃפ·¤Æ¤¤¤Ê¤¤¥×¥í¥°¥é¥à¤ò¥Ç¥Ð¥Ã¥°¤¹¤ë¤Î¤Ë¤È¤Æ¤âÌòΩ¤Á + ¤Þ¤¹¡£ + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 4.4: ´Ö°ã¤¤¤òÊѹ¹¤¹¤ëÊýË¡ + + + ** 'old' ¤ò 'new' ¤ËÃÖ´¹¤¹¤ë¤Ë¤Ï :s/old/new/g ¤È¥¿¥¤¥×¤·¤Þ¤¹ ** + + 1. °Ê²¼¤Î ---> ¤È¼¨¤µ¤ì¤¿¹Ô¤Ë¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤·¤ç¤¦¡£ + + 2. :s/thee/the ¤È¥¿¥¤¥×¤·¤Þ¤·¤ç¤¦¡£¤³¤Î¥³¥Þ¥ó¥É¤Ï¤½¤Î¹Ô¤ÇºÇ½é¤Ë¸« + ¤Ä¤«¤Ã¤¿¤â¤Î¤Ë¤À¤±¹Ô¤Ê¤ï¤ì¤ë¤³¤È¤Ëµ¤¤ò¤Ä¤±¤Þ¤·¤ç¤¦¡£ + + 3. ¤Ç¤Ï :s/thee/the/g ¤È¥¿¥¤¥×¤·¤Þ¤·¤ç¤¦¡£¹ÔÁ´ÂΤòÃÖ´¹¤¹¤ë¤³¤È¤ò°ÕÌ£¤·¤Þ¤¹¡£ + ¤³¤ÎÊѹ¹¤Ï¤½¤Î¹Ô¤Ç¸«¤Ä¤«¤Ã¤¿Á´¤Æ¤Î²Õ½ê¤ËÂФ·¤Æ¹Ô¤Ê¤ï¤ì¤Þ¤¹¡£ + +---> thee best time to see thee flowers is in thee spring. + + 4. Ê£¿ô¹Ô¤«¤é¸«¤Ä¤«¤ëʸ»ú¤òÊѹ¹¤¹¤ë¤Ë¤Ï + :#,#s/old/new/g #,# ¤Ë¤ÏÃÖ¤­´¹¤¨¤ëÈϰϤγ«»Ï¤È½ªÎ»¤Î¹ÔÈÖ¹æ¤ò»ØÄꤷ¤Þ + ¤¹¡£ + :%s/old/new/g ¥Õ¥¡¥¤¥ëÁ´ÂΤǸ«¤Ä¤«¤ë¤â¤Î¤ËÂФ·¤ÆÊѹ¹¤¹¤ë¡£ + :%s/old/new/gc ¥Õ¥¡¥¤¥ëÁ´ÂΤǸ«¤Ä¤«¤ë¤â¤Î¤ËÂФ·¤Æ¡¢1¤Ä1¤Ä³Îǧ¤ò¤È¤ê¤Ê + ¤¬¤éÊѹ¹¤¹¤ë¡£ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 4 Í×Ìó + + + 1. CTRL-G ¤Ï¥Õ¥¡¥¤¥ë¤Ç¤Î°ÌÃ֤ȥե¡¥¤¥ë¤Î¾ÜºÙ¤òɽ¼¨¤·¤Þ¤¹¡£ + G ¤Ï¥Õ¥¡¥¤¥ë¤ÎºÇ²¼¹Ô¤Ë°Üư¤·¤Þ¤¹¡£ + ¿ôÃÍ G ¤Ï¤½¤Î¹Ô¤Ë°Üư¤·¤Þ¤¹¡£ + gg ¤ÏÀèÆ¬¹Ô¤Ë°Üư¤·¤Þ¤¹¡£ + + 2. / ¤Î¸å¤Ë¸ì¶ç¤ò¥¿¥¤¥×¤¹¤ë¤ÈÁ°Êý¤Ë¸ì¶ç¤ò¸¡º÷¤·¤Þ¤¹¡£ + ? ¤Î¸å¤Ë¸ì¶ç¤ò¥¿¥¤¥×¤¹¤ë¤È¸åÊý¤Ë¸ì¶ç¤ò¸¡º÷¤·¤Þ¤¹¡£ + ¸¡º÷¤Î¸å¤Î n ¤ÏƱ¤¸Êý¸þ¤Î¼¡¤Î¸¡º÷¤ò¡¢N ¤ÏµÕÊý¸þ¤Î¸¡º÷¤ò¤·¤Þ¤¹¡£ + CTRL-O ¤Ï¾ì½ê¤òÁ°¤Ë°Ü¤·¡¢CTRL-I ¤Ï¾ì½ê¤ò¼¡¤Ë°Üư¤·¤Þ¤¹¡£ + + 3. (,),[,],{, ¤â¤·¤¯¤Ï } ¾å¤Ë¥«¡¼¥½¥ë¤¬¤¢¤ë¾õÂÖ¤Ç % ¤ò¥¿¥¤¥×¤¹¤ë¤ÈÂФˤʤëʸ + »ú¤Ø°Üư¤·¤Þ¤¹¡£ + + 4. ¸½ºß¹Ô¤ÎºÇ½é¤Î old ¤ò new ¤ËÃÖ´¹¤¹¤ë¡£ :s/old/new + ¸½ºß¹Ô¤ÎÁ´¤Æ¤Î old ¤ò new ¤ËÃÖ´¹¤¹¤ë¡£ :s/old/new/g + 2¤Ä¤Î # ´Ö¤Ç¸ì¶ç¤òÃÖ´¹¤¹¤ë¡£ :#,#s/old/new/g + ¥Õ¥¡¥¤¥ë¤ÎÃæ¤ÎÁ´¤Æ¤Î¸¡º÷¸ì¶ç¤òÃÖ´¹¤¹¤ë¡£ :%s/old/new/g + 'c' ¤ò²Ã¤¨¤ë¤ÈÃÖ´¹¤ÎÅ٤˳Îǧ¤òµá¤á¤ë¡£ :%s/old/new/gc + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 5.1: ³°Éô¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤¹¤ëÊýË¡ + + + ** :! ¤Î¸å¤Ë¼Â¹Ô¤¹¤ë³°Éô¥³¥Þ¥ó¥É¤ò¥¿¥¤¥×¤·¤Þ¤¹ ** + + 1. ²èÌ̤κDz¼Éô¤Ë¥«¡¼¥½¥ë¤¬°Üư¤¹¤ë¤è¤¦¡¢´·¤ì¿Æ¤·¤ó¤À : ¤ò¥¿¥¤¥×¤·¤Þ¤·¤ç¤¦¡£ + ¤³¤ì¤Ç¥³¥Þ¥ó¥É¤¬¥¿¥¤¥×¤Ç¤­¤ëÍͤˤʤê¤Þ¤¹¡£ + + 2. ¤³¤³¤Ç ! ¤È¤¤¤¦Ê¸»ú(´¶Ã²Éä)¤ò¥¿¥¤¥×¤·¤Þ¤·¤ç¤¦¡£ + ¤³¤ì¤Ç³°Éô¥·¥§¥ë¥³¥Þ¥ó¥É¤¬¼Â¹Ô¤Ç¤­¤ëÍͤˤʤê¤Þ¤¹¡£ + + 3. Îã¤È¤·¤Æ ! ¤Ë³¤±¤Æ ls ¤È¥¿¥¤¥×¤· ¤ò²¡¤·¤Þ¤·¤ç¤¦¡£ + ¥·¥§¥ë¥×¥í¥ó¥×¥È¤Î¤è¤¦¤Ë¥Ç¥£¥ì¥¯¥È¥ê¤Î°ìÍ÷¤¬É½¼¨¤µ¤ì¤ë¤Ï¤º¤Ç¤¹¡£ + ¤â¤·¤¯¤Ï ls ¤¬Æ°¤«¤Ê¤¤¤Ê¤é¤Ð :!dir ¤ò»ÈÍѤ·¤Þ¤·¤ç¤¦¡£ + +Note: ¤³¤ÎÊýË¡¤Ë¤è¤Ã¤Æ¤¢¤é¤æ¤ë¥³¥Þ¥ó¥É¤¬¼Â¹Ô¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤â¤Á¤í¤ó°ú¿ô + ¤âÍ¿¤¨¤é¤ì¤Þ¤¹¡£ + +Note: Á´¤Æ¤Î : ¥³¥Þ¥ó¥É¤Ï ¤ò²¡¤·¤Æ½ªÎ»¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ + °Ê¹ß¤Ç¤Ï¤³¤Î¤³¤È¤Ë¸ÀµÚ¤·¤Þ¤»¤ó¡£ + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 5.2: ¤½¤Î¾¤Î¥Õ¥¡¥¤¥ë¤Ø½ñ¤­¹þ¤ß + + + ** ¥Õ¥¡¥¤¥ë¤ØÊѹ¹¤òÊݸ¤¹¤ë¤Ë¤Ï :w ¥Õ¥¡¥¤¥ë̾ ¤È¥¿¥¤¥×¤·¤Þ¤¹ ** + + 1. ¥Ç¥£¥ì¥¯¥È¥ê¤Î°ìÍ÷¤òÆÀ¤ë¤¿¤á¤Ë :!dir ¤â¤·¤¯¤Ï :!ls ¤È¥¿¥¤¥×¤·¤Þ¤·¤ç¤¦¡£ + ¤³¤Î¤¢¤È ¤ò²¡¤¹¤Î¤Ï´û¤Ë¤´Â¸ÃΤǤ¹¤Í¡£ + + 2. TEST ¤Î¤è¤¦¤Ë¡¢¤½¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ë̵¤¤¥Õ¥¡¥¤¥ë̾¤ò°ì¤ÄÁª¤Ó¤Þ¤¹¡£ + + 3. ¤Ç¤Ï :w TEST ¤È¥¿¥¤¥×¤·¤Þ¤·¤ç¤¦ (TEST ¤Ï¡¢Áª¤ó¤À¥Õ¥¡¥¤¥ë̾¤Ç¤¹)¡£ + + 4. ¤³¤ì¤Ë¤è¤ê¥Õ¥¡¥¤¥ëÁ´ÂΤ¬ TEST ¤È¤¤¤¦Ì¾Á°¤ÇÊݸ¤µ¤ì¤Þ¤¹¡£ + ¤â¤¦°ìÅÙ :!dir ¤â¤·¤¯¤Ï !ls ¤È¥¿¥¤¥×¤·¤Æ³Îǧ¤·¤Æ¤ß¤Þ¤·¤ç¤¦¡£ + +Note: ¤³¤³¤Ç Vim ¤ò½ªÎ»¤·¡¢¥Õ¥¡¥¤¥ë̾ TEST ¤È¶¦¤Ëµ¯Æ°¤¹¤ë¤È¡¢Êݸ¤·¤¿»þ¤Î + ¥Á¥å¡¼¥È¥ê¥¢¥ë¤ÎÊ£À½¤¬¤Ç¤­¾å¤¬¤ë¤Ï¤º¤Ç¤¹¡£ + + 5. ¤µ¤é¤Ë¡¢¼¡¤Î¤è¤¦¤Ë¥¿¥¤¥×¤·¤Æ¥Õ¥¡¥¤¥ë¤ò¾Ã¤·¤Þ¤·¤ç¤¦(MS-DOS): :!del TEST + ¤â¤·¤¯¤Ï(Unix): :!rm TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 5.3: ÁªÂò¤·¤¿½ñ¤­¹þ¤ß + + +** ¥Õ¥¡¥¤¥ë¤Î°ÌÃÖ¤òÊݸ¤¹¤ë¤Ë¤Ï¡¢v ¥â¡¼¥·¥ç¥ó¤È :w FILENAME ¤ò¥¿¥¤¥×¤·¤Þ¤¹¡£ ** + + 1. ¤³¤Î¹Ô¤Ë¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤¹¡£ + + 2. v ¤ò²¡¤·¡¢°Ê²¼¤ÎÂè5¹àÌܤ˥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤¹¡£¥Æ¥­¥¹¥È¤¬¶¯Ä´É½¼¨¤µ¤ì¤ë¤Î + ¤ËÃíÌܤ·¤Æ²¼¤µ¤¤¡£ + + 3. ʸ»ú : ¤ò²¡¤¹¤È¡¢²èÌ̤κDz¼Éô¤Ë :'<,'> ¤¬¸½¤ì¤Þ¤¹¡£ + + 4. w TEST (TESET ¤Ï¸ºß¤·¤Ê¤¤¥Õ¥¡¥¤¥ë̾)¤ò¥¿¥¤¥×¤·¤Þ¤¹¡£ + Enter ¤ò²¡¤¹Á°¤Ë :'<,'>w TEST ¤È¤Ê¤Ã¤Æ¤¤¤ë¤³¤È¤ò³Îǧ¤·¤Æ²¼¤µ¤¤¡£ + + 5. Vim ¤Ï TEST ¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤ËÁªÂò¤µ¤ì¤¿¹Ô¤ò½ñ¤­¹þ¤à¤Ç¤·¤ç¤¦¡£ + !dir ¤â¤·¤¯¤Ï !ls ¤Ç¤½¤ì¤ò³Îǧ¤·¤Þ¤¹¡£ + ¤½¤ì¤Ïºï½ü¤·¤Ê¤¤¤Ç¤ª¤¤¤Æ²¼¤µ¤¤¡£¼¡¤Î¥ì¥Ã¥¹¥ó¤Ç»ÈÍѤ·¤Þ¤¹¡£ + +NOTE: v ¤ò²¡¤¹¤È¡¢Visual ÁªÂò¤¬»Ï¤Þ¤ê¤Þ¤¹¡£¥«¡¼¥½¥ë¤òư¤«¤¹¤³¤È¤Ç¡¢ÁªÂòÈϰϤò + Â礭¤¯¤â¾®¤µ¤¯¤â¤Ç¤­¤Þ¤¹¡£¤µ¤é¤Ë¡¢¤½¤ÎÁªÂòÈϰϤËÂФ·¤Æ¥ª¥Ú¥ì¡¼¥¿¤òŬÍÑ + ¤­¤Þ¤¹¡£Î㤨¤Ð d ¤Ï¥Æ¥­¥¹¥È¤òºï½ü¤·¤Þ¤¹¡£ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 5.4: ¥Õ¥¡¥¤¥ë¤Î¼è¹þ¤È¹çÊ» + + + ** ¥Õ¥¡¥¤¥ë¤ÎÃæ¿È¤òÁÞÆþ¤¹¤ë¤Ë¤Ï :r ¥Õ¥¡¥¤¥ë̾ ¤È¥¿¥¤¥×¤·¤Þ¤¹ ** + + 1. ¥«¡¼¥½¥ë¤ò°Ê²¼¤Î¹Ô¤Ë¹ç¤ï¤»¤Þ¤¹¡£ + +NOTE: ¥¹¥Æ¥Ã¥× 2 ¤Î¼Â¹Ô¸å¡¢¥ì¥Ã¥¹¥ó 5.3 ¤Î¥Æ¥­¥¹¥È¤¬¸½¤ì¤Þ¤¹¡£²¼¤Ë²¼¤¬¤Ã¤Æ¤³ + ¤Î¥ì¥Ã¥¹¥ó¤Ë°Üư¤·¤Þ¤·¤ç¤¦¡£ + + 2. ¤Ç¤Ï TEST ¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤ò :r TEST ¤È¤¤¤¦¥³¥Þ¥ó¥É¤ÇÆÉ¤ß¹þ¤ß¤Þ¤·¤ç¤¦¡£ + ¤³¤³¤Ç¤¤¤¦ TEST ¤Ï»È¤¦¥Õ¥¡¥¤¥ë¤Î̾Á°¤Î¤³¤È¤Ç¤¹¡£ + ÆÉ¤ß¹þ¤Þ¤ì¤¿¥Õ¥¡¥¤¥ë¤Ï¡¢¥«¡¼¥½¥ë¹Ô¤Î²¼¤Ë¤¢¤ê¤Þ¤¹¡£ + + 3. ¼è¹þ¤ó¤À¥Õ¥¡¥¤¥ë¤ò³Îǧ¤·¤Æ¤ß¤Þ¤·¤ç¤¦¡£¥«¡¼¥½¥ë¤òÌ᤹¤È¡¢¥ì¥Ã¥¹¥ó5.3 ¤Î + ¥ª¥ê¥¸¥Ê¥ë¤È¥Õ¥¡¥¤¥ë¤Ë¤è¤ë¤â¤Î¤Î2¤Ä¤¬¤¢¤ë¤³¤È¤¬¤ï¤«¤ê¤Þ¤¹¡£ + +NOTE: ³°Éô¥³¥Þ¥ó¥É¤Î½ÐÎϤòÆÉ¤ß¹þ¤à¤³¤È¤â½ÐÍè¤Þ¤¹¡£Î㤨¤Ð¡¢ + :r !ls ¤Ï ls ¥³¥Þ¥ó¥É¤Î½ÐÎϤò¥«¡¼¥½¥ë°Ê²¼¤ËÆÉ¤ß¹þ¤ß¤Þ¤¹¡£ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 5 Í×Ìó + + + 1. :!command ¤Ë¤è¤Ã¤Æ ³°Éô¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤·¤Þ¤¹¡£ + + ¤è¤¯»È¤¦Îã: + (MS-DOS) (Unix) + :!dir :!ls - ¥Ç¥£¥ì¥¯¥È¥êÆâ¤Î°ìÍ÷¤ò¸«¤ë¡£ + :!del FILENAME :!rm FILENAME - ¥Õ¥¡¥¤¥ë¤òºï½ü¤¹¤ë¡£ + + 2. :w ¥Õ¥¡¥¤¥ë̾ ¤Ë¤è¤Ã¤Æ¥Õ¥¡¥¤¥ë̾¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤¬¥Ç¥£¥¹¥¯¤Ë½ñ¤­¹þ¤Þ¤ì¤ë¡£ + + 3. v ¥â¡¼¥·¥ç¥ó¤Ç :w FILENAME ¤È¤¹¤ë¤È¡¢¥Ó¥¸¥å¥¢¥ëÁªÂò¹Ô¤¬¥Õ¥¡¥¤¥ë¤ËÊݸ¤µ + ¤ì¤ë¡£ + + 4. :r ¥Õ¥¡¥¤¥ë̾ ¤Ë¤è¤ê¥Õ¥¡¥¤¥ë̾¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤¬¥Ç¥£¥¹¥¯¤è¤ê¼è¹þ¤Þ¤ì¡¢ + ¥«¡¼¥½¥ë°ÌÃ֤β¼¤ËÁÞÆþ¤µ¤ì¤ë¡£ + + 5. :r !dir ¤Ï dir ¥³¥Þ¥ó¥É¤Î½ÐÎϤò¥«¡¼¥½¥ë°ÌÃְʲ¼¤ËÆÉ¤ß¹þ¤à¡£ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 6.1: ¥ª¡¼¥×¥ó¥³¥Þ¥ó¥É + + + ** o ¤ò¥¿¥¤¥×¤¹¤ë¤È¡¢¥«¡¼¥½¥ë¤Î²¼¤Î¹Ô¤¬³«¤­¡¢ÁÞÆþ¥â¡¼¥É¤ËÆþ¤ê¤Þ¤¹ ** + + 1. °Ê²¼¤Î ---> ¤È¼¨¤µ¤ì¤¿¹Ô¤Ë¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤·¤ç¤¦¡£ + + 2. o (¾®Ê¸»ú) ¤ò¥¿¥¤¥×¤·¤Æ¡¢¥«¡¼¥½¥ë¤Î²¼¤Î¹Ô¤ò³«¤­¡¢ÁÞÆþ¥â¡¼¥É¤ËÆþ¤ê¤Þ¤¹¡£ + + 3. ¤µ¤é¤ËÁÞÆþ¥â¡¼¥É¤ò½ªÎ»¤¹¤ë°Ù¤Ë ¤ò¥¿¥¤¥×¤·¤Þ¤¹¡£ + +---> o ¤ò¥¿¥¤¥×¤¹¤ë¤È¥«¡¼¥½¥ë¤Ï³«¤¤¤¿¹Ô¤Ø°Üư¤·ÁÞÆþ¥â¡¼¥É¤ËÆþ¤ê¤Þ¤¹¡£ + + 4. ¥«¡¼¥½¥ë¤Î¾å¤Î¹Ô¤ËÁÞÆþ¤¹¤ë¤Ë¤Ï¡¢¾®Ê¸»ú¤Î o ¤Ç¤Ï¤Ê¤¯¡¢Ã±½ã¤ËÂçʸ»ú¤Î O + ¤ò¥¿¥¤¥×¤·¤Þ¤¹¡£¼¡¤Î¹Ô¤Ç»î¤·¤Æ¤ß¤Þ¤·¤ç¤¦¡£ + +---> ¤³¤Î¹Ô¤Î¾å¤ØÁÞÆþ¤¹¤ë¤Ë¤Ï¡¢¤³¤Î¹Ô¤Ø¥«¡¼¥½¥ë¤òÃÖ¤¤¤Æ O ¤ò¥¿¥¤¥×¤·¤Þ¤¹¡£ + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 6.2: Äɲå³¥Þ¥ó¥É + + + ** ¥«¡¼¥½¥ë¤Î¼¡¤Î°ÌÃÖ¤«¤é¥Æ¥­¥¹¥È¤òÄɲ乤ë¤Ë¤Ï a ¤È¥¿¥¤¥×¤·¤Þ¤¹ ** + + 1. ¥«¡¼¥½¥ë¤ò ---> ¤Ç¼¨¤µ¤ì¤¿¹Ô¤Ø°Üư¤·¤Þ¤·¤ç¤¦¡£ + + 2. e ¤ò²¡¤·¤Æ li ¤Î½ªÃ¼Éô¤Þ¤Ç¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤¹¡£ + + 3. ¥«¡¼¥½¥ë¤Î¸å¤í¤Ë¥Æ¥­¥¹¥È¤òÄɲ乤뤿¤á¤Ë a (¾®Ê¸»ú) ¤ò¥¿¥¤¥×¤·¤Þ¤¹¡£ + + 4. ¤½¤Î²¼¤Î¹Ô¤Î¤Î¤è¤¦¤Êñ¸ì¤Ë´°À®¤µ¤»¤Þ¤¹¡£ÁÞÆþ¥â¡¼¥É¤òÈ´¤±¤ë°Ù¤Ë ¤Ë²¡ + ¤·¤Þ¤¹¡£ + + 5. e ¤ò»È¤Ã¤Æ¼¡¤ÎÉÔ´°Á´¤Êñ¸ì¤Ø°Üư¤·¡¢¥¹¥Æ¥Ã¥× 3 ¤È 4 ¤ò·«¤êÊÖ¤·¤Þ¤¹¡£ + +---> This li will allow you to pract appendi text to a line. +---> This line will allow you to practice appending text to a line. + +Note: a, i ¤È A ¤ÏƱ¤¸ÁÞÆþ¥â¡¼¥É¤Ø°Ü¤ê¤Þ¤¹¤¬¡¢Ê¸»ú¤¬ÁÞÆþ¤µ¤ì¤ë°ÌÃÖ¤À¤±¤¬°Û¤Ê¤ê + ¤Þ¤¹¡£ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 6.3: ¤½¤Î¾¤ÎÃÖ´¹ÊýË¡ + + + ** 1ʸ»ú°Ê¾å¤òÃÖ¤­´¹¤¨¤ë¤Ë¤ÏÂçʸ»ú¤Î R ¤È¥¿¥¤¥×¤·¤Þ¤·¤ç¤¦ ** + + 1. °Ê²¼¤Î ---> ¤È¼¨¤µ¤ì¤¿¹Ô¤Ë¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤¹¡£ºÇ½é¤Î xxx ¤ÎÀèÆ¬¤Ë°Üư¤· + ¤Þ¤¹¡£ + + 2. R ¤ò²¡¤·¤Æ¡¢2¹ÔÌܤοôÃͤò¥¿¥¤¥×¤¹¤ë¤³¤È¤Ç¡¢xxx ¤¬ÃÖ´¹¤µ¤ì¤Þ¤¹¡£ + + 3. ÃÖ´¹¥â¡¼¥É¤òÈ´¤±¤ë¤Ë¤Ï ¤ò²¡¤·¤Þ¤¹¡£¹Ô¤Î»Ä¤ê¤¬Êѹ¹¤µ¤ì¤Æ¤¤¤Ê¤¤¤Þ¤Þ¤Ë + ¤Ê¤ë¤³¤È¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£ + + 5. »Ä¤Ã¤¿ xxx ¤ò¥¹¥Æ¥Ã¥×¤ò·«¤êÊÖ¤·¤ÆÃÖ´¹¤·¤Þ¤·¤ç¤¦¡£ + +---> Adding 123 to xxx gives you xxx. +---> Adding 123 to 456 gives you 579. + +NOTE: ÃÖ´¹¥â¡¼¥É¤ÏÁÞÆþ¥â¡¼¥É¤Ë»÷¤Æ¤¤¤Þ¤¹¤¬¡¢Á´¤Æ¤Î¥¿¥¤¥×¤µ¤ì¤¿Ê¸»ú¤Ï´û¸¤Îʸ»ú + ¤òºï½ü¤·¤Þ¤¹¡£ + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 6.4: ¥Æ¥­¥¹¥È¤Î¥³¥Ô¡¼¤È¥Ú¡¼¥¹¥È + + + ** ¥Æ¥­¥¹¥È¤Î¥³¥Ô¡¼¤Ë¤Ï¥ª¥Ú¥ì¡¼¥¿ y ¤ò¡¢¥Ú¡¼¥¹¥È¤Ë¤Ï p ¤ò»È¤¤¤Þ¤¹ ** + + 1. ---> ¤È¼¨¤µ¤ì¤¿¹Ô¤Ø°Üư¤·¡¢¥«¡¼¥½¥ë¤ò "a)" ¤Î¸å¤ËÃÖ¤¤¤Æ¤ª¤­¤Þ¤¹¡£ + + 2. v ¤Ç¥Ó¥¸¥å¥¢¥ë¥â¡¼¥É¤ò³«»Ï¤·¡¢"first"¤Î¼êÁ°¤Þ¤Ç¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤¹¡£ + + 3. y ¤ò¥¿¥¤¥×¤·¤Æ¶¯Ä´É½¼¨¤µ¤ì¤¿¥Æ¥­¥¹¥È¤ò yank (¥³¥Ô¡¼)¤·¤Þ¤¹¡£ + + 4. ¼¡¤Î¹Ô¤Î¹ÔËö¤Þ¤Ç¥«¡¼¥½¥ë¤ò°Üư¤·¤Þ¤¹: j$ + + 5. p ¤ò²¡¤·¤ÆÅ½¤êÉÕ¤±(put)¤Æ¤«¤é¡¢¼¡¤ò¥¿¥¤¥×¤·¤Þ¤¹: a second + + 6. ¥Ó¥¸¥å¥¢¥ë¥â¡¼¥É¤Ç " item." ¤òÁªÂò¤·¡¢y ¤Ç¥ä¥ó¥¯¡¢¼¡¤Î¹Ô¤Î¹ÔËö¤Þ¤Ç j$ ¤Ç + °Üư¤·¡¢ p ¤Ç¥Æ¥­¥¹¥È¤ò¤½¤³¤Ë put ¤·¤Þ¤¹¡£ + +---> a) this is the first item. + b) + + Note: ñ¸ì¤ò1¤Ä yank ¤¹¤ë¤Î¤Ë y ¤ò¥ª¥Ú¥ì¡¼¥¿¤È¤·¤Æ yw ¤È¤¹¤ë¤³¤È¤â½ÐÍè¤Þ¤¹¡£ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 6.5: ¥ª¥×¥·¥ç¥ó¤ÎÀßÄê + + + ** ¸¡º÷¤äÃÖ´¹¤ÎºÝ¤ËÂçʸ»ú/¾®Ê¸»ú¤ò̵»ë¤¹¤ë¤Ë¤Ï¡¢¥ª¥×¥·¥ç¥ó¤òÀßÄꤷ¤Þ¤¹ ** + + 1. ¼¡¤ÎÍÍ¤ËÆþÎϤ·¤Æ 'ignore' ¤ò¸¡º÷¤·¤Þ¤·¤ç¤¦: /ignore + n ¤ò²¡¤·¤Æ²¿ÅÙ¤«¸¡º÷¤ò·«¤êÊÖ¤·¤Þ¤¹¡£ + + 2. ¼¡¤ÎÍÍ¤ËÆþÎϤ·¤Æ 'ic' (Ignore Case ¤Îά) ¥ª¥×¥·¥ç¥ó¤òÀßÄꤷ¤Þ¤¹: :set ic + + 3. ¤Ç¤Ï n ¤Ë¤è¤Ã¤Æ¤â¤¦1ÅÙ 'ignore' ¤ò¸¡º÷¤·¤Þ¤¹¡£ + n ¤ò²¡¤·¤Æ¤µ¤é¤Ë¿ô²ó¸¡º÷¤ò·«¤êÊÖ¤·¤Þ¤·¤ç¤¦¡£ + + 4. 'hlsearch' ¤È 'incsearch' ¥ª¥×¥·¥ç¥ó¤òÀßÄꤷ¤Þ¤·¤ç¤¦: :set hls is + + 5. ¸¡º÷¥³¥Þ¥ó¥É¤òºÆÆþÎϤ·¤Æ¡¢²¿¤¬µ¯¤³¤ë¤«¸«¤Æ¤ß¤Þ¤·¤ç¤¦: /ignore + + 6. Âçʸ»ú¾®Ê¸»ú¤Î¶èÊ̤ò̵¸ú¤Ë¤¹¤ë¤Ë¤Ï¼¡¤ÎÍÍ¤ËÆþÎϤ·¤Þ¤¹: :set noic + +Note: ¥Þ¥Ã¥Á¤Î¶¯Ä´É½¼¨¤ò¤ä¤á¤ë¤Ë¤Ï¼¡¤ÎÍÍ¤ËÆþÎϤ·¤Þ¤¹: :nohlsearch +Note: 1¤Ä¤Î¸¡º÷¥³¥Þ¥ó¥É¤À¤±Âçʸ»ú¾®Ê¸»ú¤Î¶èÊ̤ò¤ä¤á¤¿¤¤¤Ê¤é¤Ð¡¢¥Õ¥ì¡¼¥º¤Ë \c + ¤ò»ÈÍѤ·¤Þ¤¹: /ignore\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 6 Í×Ìó + + 1. o ¤ò¥¿¥¤¥×¤¹¤ë¤È¥«¡¼¥½¥ë¤Î²¼¤Î¹Ô¤ò³«¤±¤Æ¡¢¤½¤³¤ÇÁÞÆþ¥â¡¼¥É¤Ë¤Ê¤ë¡£ + O (Âçʸ»ú) ¤ò¥¿¥¤¥×¤¹¤ë¤È¥«¡¼¥½¥ë¤Î¾å¤Î¹Ô¤ÇÁÞÆþ¥â¡¼¥É¤Ë¤Ê¤ë¡£ + + 2. ¥«¡¼¥½¥ë¾å¤Îʸ»ú¤Î¼¡¤«¤é¥Æ¥­¥¹¥È¤òÄɲ乤ë¤Ë¤Ï a ¤È¥¿¥¤¥×¤¹¤ë¡£ + ¹ÔËö¤Ë¼«Æ°¤Ç¥Æ¥­¥¹¥È¤òÁÞÆþ¤¹¤ë¤Ë¤ÏÂçʸ»ú A ¤ò¥¿¥¤¥×¤¹¤ë¡£ + + 3. e ¥³¥Þ¥ó¥É¤Ïñ¸ì¤Î½ªÃ¼Éô¥«¡¼¥½¥ë¤ò°Üư¤¹¤ë¡£ + + 4. y ¥ª¥Ú¥ì¡¼¥¿¤Ï¥Æ¥­¥¹¥È¤ò yank (¥³¥Ô¡¼)¤·¡¢p ¤Ï¤½¤ì¤ò put (¥Ú¡¼¥¹¥È)¤¹¤ë¡£ + + 5. Âçʸ»ú¤Î R ¤ò¥¿¥¤¥×¤¹¤ë¤ÈÃÖ´¹¥â¡¼¥É¤ËÆþ¤ê¡¢¤ò²¡¤¹¤ÈÈ´¤±¤ë¡£ + + 6. ":set xxx" ¤È¥¿¥¤¥×¤¹¤ë¤È¥ª¥×¥·¥ç¥ó "xxx" ¤¬ÀßÄꤵ¤ì¤ë¡£ + 'ic' 'ignorecase' ¸¡º÷»þ¤ËÂçʸ»ú¾®Ê¸»ú¤Î¶èÊ̤·¤Ê¤¤ + 'is' 'incsearch' ¸¡º÷¥Õ¥ì¡¼¥º¤ËÉôʬ¥Þ¥Ã¥Á¤·¤Æ¤¤¤ëÉôʬ¤òɽ¼¨¤¹¤ë + 'hls' 'hlsearch' ¥Þ¥Ã¥Á¤¹¤ë¤¹¤Ù¤ò¶¯Ä´É½¼¨¤¹¤ë + Ť¤Êý¡¢Ã»¤¤Êý¡¢¤É¤Á¤é¤Î¥ª¥×¥·¥ç¥ó̾¤Ç¤â»ÈÍѤǤ­¤Þ¤¹¡£ + + 7. "no" ¤òÉÕÍ¿¤·¡¢¥ª¥×¥·¥ç¥ó¤ò̵¸ú¤Ë¤·¤Þ¤¹: :set noic + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 7.1: ¥ª¥ó¥é¥¤¥ó¥Ø¥ë¥×¥³¥Þ¥ó¥É + + + ** ¥ª¥ó¥é¥¤¥ó¥Ø¥ë¥×¤ò»ÈÍѤ·¤Þ¤·¤ç¤¦ ** + + Vim ¤Ë¤Ï¹­ÈϤˤ錄¤ë¥ª¥ó¥é¥¤¥ó¥Ø¥ë¥×¥·¥¹¥Æ¥à¤¬¤¢¤ê¤Þ¤¹¡£ + ¥Ø¥ë¥×¤ò³«»Ï¤¹¤ë¤Ë¤Ï¡¢¤³¤ì¤é3¤Ä¤Î¤É¤ì¤«1¤Ä¤ò»î¤·¤Æ¤ß¤Þ¤·¤ç¤¦: + - ¥Ø¥ë¥×¥­¡¼ ¤ò²¡¤¹(¤â¤·¤¢¤ë¤Ê¤é¤Ð)¡£ + - ¥­¡¼¤ò²¡¤¹(¤â¤·¤¢¤ë¤Ê¤é¤Ð)¡£ + - :help ¤È¥¿¥¤¥×¤¹¤ë¡£ + + ¥Ø¥ë¥×¥¦¥£¥ó¥É¥¦¤Î¥Æ¥­¥¹¥È¤òÆÉ¤à¤È¡¢¥Ø¥ë¥×¤Îưºî¤¬Íý²ò¤Ç¤­¤Þ¤¹¡£ + CTRL-W CTRL-W ¤È¥¿¥¤¥×¤¹¤ë¤È ¥Ø¥ë¥×¥¦¥£¥ó¥É¥¦¤Ø¥¸¥ã¥ó¥×¤·¤Þ¤¹¡£ + :q ¤È¥¿¥¤¥×¤¹¤ë¤È ¥Ø¥ë¥×¥¦¥£¥ó¥É¥¦¤¬ÊĤ¸¤é¤ì¤Þ¤¹¡£ + + ":help" ¥³¥Þ¥ó¥É¤Ë°ú¿ô¤òÍ¿¤¨¤ë¤³¤È¤Ë¤è¤ê¡¢¤¢¤é¤æ¤ëÂê̾¤Î¥Ø¥ë¥×¤ò¸«¤Ä¤±¤ë¤³¤È + ¤¬¤Ç¤­¤Þ¤¹¡£¤³¤ì¤é¤ò»î¤·¤Æ¤ß¤Þ¤·¤ç¤¦( ¤ò¥¿¥¤¥×¤·Ëº¤ì¤Ê¤¤¤è¤¦¤Ë): + + :help w + :help c_ ¤Ç¥³¥Þ¥ó¥É¥é¥¤¥ó¤òÊä´°¤¹¤ë ** + + 1. ¥³¥ó¥Ñ¥Á¥â¡¼¥É¤Ç¤Ê¤¤¤³¤È¤ò³Îǧ¤·¤Þ¤¹: :set nocp + + 2. ¸½ºß¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ëºß¤ë¥Õ¥¡¥¤¥ë¤ò :!ls ¤« :!dir ¤Ç³Îǧ¤·¤Þ¤¹¡£ + + 3. ¥³¥Þ¥ó¥É¤Î³«»Ï¤ò¥¿¥¤¥×¤·¤Þ¤¹: :e + + 4. CTRL-D ¤ò²¡¤¹¤È Vim ¤Ï "e" ¤«¤é»Ï¤Þ¤ë¥³¥Þ¥ó¥É¤Î°ìÍ÷¤òɽ¼¨¤·¤Þ¤¹¡£ + + 5. ¤ò²¡¤¹¤È Vim ¤Ï ":edit" ¤È¤¤¤¦¥³¥Þ¥ó¥É̾¤òÊä´°¤·¤Þ¤¹¡£ + + 6. ¤µ¤é¤Ë¶õÇò¤È¡¢´û¸¤Î¥Õ¥¡¥¤¥ë̾¤Î»Ï¤Þ¤ê¤ò²Ã¤¨¤Þ¤¹: :edit FIL + + 7. ¤ò²¡¤¹¤È Vim ¤Ï̾Á°¤òÊä´°¤·¤Þ¤¹¡£(¤â¤·°ì¤Ä¤·¤«Ìµ¤«¤Ã¤¿¾ì¹ç) + +NOTE: Êä´°¤Ï¿¤¯¤Î¥³¥Þ¥ó¥É¤Çưºî¤·¤Þ¤¹¡£¤½¤·¤Æ CTRL-D ¤È ²¡¤·¤Æ¤ß¤Æ¤¯¤À + ¤µ¤¤¡£ÆÃ¤Ë :help ¤ÎºÝ¤ËÌòΩ¤Á¤Þ¤¹¡£ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ¥ì¥Ã¥¹¥ó 7 Í×Ìó + + + 1. ¥Ø¥ë¥×¥¦¥£¥ó¥É¥¦¤ò³«¤¯¤Ë¤Ï :help ¤È¤¹¤ë¤« ¤â¤·¤¯¤Ï ¤ò²¡¤¹¡£ + + 2. ¥³¥Þ¥ó¥É(cmd)¤Î¥Ø¥ë¥×¤ò¸¡º÷¤¹¤ë¤Ë¤Ï :help cmd ¤È¥¿¥¤¥×¤¹¤ë¡£ + + 3. Ê̤Υ¦¥£¥ó¥É¥¦¤Ø¥¸¥ã¥ó¥×¤¹¤ë¤Ë¤Ï CTRL-W CTRL-W ¤È¥¿¥¤¥×¤¹¤ë¡£ + + 4. ¥Ø¥ë¥×¥¦¥£¥ó¥É¥¦¤òÊĤ¸¤ë¤Ë¤Ï :q ¤È¥¿¥¤¥×¤¹¤ë¡£ + + 5. ¤ª¹¥¤ß¤ÎÀßÄê¤òÊÝ¤Ä¤Ë¤Ï vimrc µ¯Æ°¥¹¥¯¥ê¥×¥È¤òºîÀ®¤¹¤ë¡£ + + 6. : command ¤Ç²Äǽ¤ÊÊä´°¤ò¸«¤ë¤Ë¤Ï CTRL-D ¤ò¥¿¥¤¥×¤¹¤ë¡£ + Êä´°¤ò»ÈÍѤ¹¤ë¤Ë¤Ï ¤ò²¡¤¹¡£ + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + ¤³¤ì¤Ë¤Æ Vim ¤Î¥Á¥å¡¼¥È¥ê¥¢¥ë¤ò½ª¤ï¤ê¤Þ¤¹¡£¥¨¥Ç¥£¥¿¤ò´Êñ¤Ë¡¢¤·¤«¤â½¼Ê¬¤Ë + »È¤¦¤³¤È¤¬¤Ç¤­¤ë¤è¤¦¤Ë¤È¡¢Vim ¤Î»ý¤Ä³µÇ°¤ÎÍ×ÅÀ¤Î¤ß¤òÅÁ¤¨¤è¤¦¤È¤·¤Þ¤·¤¿¡£ + Vim ¤Ë¤Ï¤µ¤é¤Ë¿¤¯¤Î¥³¥Þ¥ó¥É¤¬¤¢¤ê¡¢¤³¤³¤ÇÁ´¤Æ¤òÀâÌÀ¤¹¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¡£ + °Ê¹ß¤Ï¥æ¡¼¥¶¥Þ¥Ë¥å¥¢¥ë¤ò»²¾È¤¯¤À¤µ¤¤: "help :user-manual" + + ¤³¤ì°Ê¸å¤Î³Ø½¬¤Î¤¿¤á¤Ë¡¢¼¡¤ÎËܤò¿äÁ¦¤·¤Þ¤¹¡£ + Vim - Vi Improved - by Steve Oualline + ½ÐÈǼÒ: New Riders + ºÇ½é¤ÎËܤϴ°Á´¤Ë Vim ¤Î¤¿¤á¤Ë½ñ¤«¤ì¤Þ¤·¤¿¡£¤È¤ê¤ï¤±½é¿´¼Ô¤Ë¤Ï¤ª¾©¤á¤Ç¤¹¡£ + ¿¤¯¤ÎÎãÂê¤ä¿ÞÈǤ¬·ÇºÜ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ + ¼¡¤ÎURL¤ò»²¾È¤·¤Æ²¼¤µ¤¤ http://iccf-holland.org/click5.html + + ¼¡¤Ï Vim ¤è¤ê¤â Vi ¤Ë¤Ä¤¤¤Æ½ñ¤«¤ì¤¿¸Å¤¤ËܤǤ¹¤¬¿äÁ¦¤·¤Þ¤¹: + Learning the Vi Editor - by Linda Lamb + ½ÐÈǼÒ: O'Reilly & Associates Inc. + Vi ¤Ç¤ä¤ê¤¿¤¤¤È»×¤¦¤³¤È¤Û¤ÜÁ´¤Æ¤òÃΤ뤳¤È¤¬¤Ç¤­¤ëÎɽñ¤Ç¤¹¡£ + Âè6ÈǤǤϡ¢Vim ¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤â´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£ + + ¤³¤Î¥Á¥å¡¼¥È¥ê¥¢¥ë¤Ï Colorado State University ¤Î Charles Smith ¤Î¥¢¥¤¥Ç¥¢ + ¤ò´ð¤Ë¡¢Colorado School of Mines ¤Î Michael C. Pierce ¤È Robert K. Ware ¤Î + ξ̾¤Ë¤è¤Ã¤Æ½ñ¤«¤ì¤Þ¤·¤¿¡£ E-mail: bware@mines.colorado.edu. + + Modified for Vim by Bram Moolenaar. + + ÆüËܸìÌõ ¾¾ËÜ ÂÙ¹° + ´Æ½¤ ¼²¬ ÂÀϺ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + vi:set ts=8 sts=4 sw=4 tw=78: diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.ja.sjis b/vim/bundle/ubuntu-vim72/tutor/tutor.ja.sjis new file mode 100644 index 0000000..7be2120 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.ja.sjis @@ -0,0 +1,975 @@ +=============================================================================== += V I M ‹³ –{ (ƒ`ƒ…[ƒgƒŠƒAƒ‹) ‚Ö ‚æ ‚¤ ‚± ‚» - Version 1.7 = +=============================================================================== + + Vim ‚ÍA‚±‚̃`ƒ…[ƒgƒŠƒAƒ‹‚Åà–¾‚·‚é‚ɂ͑½‚·‚¬‚é’ö‚̃Rƒ}ƒ“ƒh‚ð”õ‚¦‚½”ñí + ‚É‹­—͂ȃGƒfƒBƒ^[‚Å‚·B‚±‚̃`ƒ…[ƒgƒŠƒAƒ‹‚ÍA‚ ‚È‚½‚ª Vim ‚𖜔\ƒGƒfƒB + ƒ^[‚Æ‚µ‚ÄŽg‚¢‚±‚È‚¹‚邿‚¤‚ɂȂé‚Ì‚É\•ª‚ȃRƒ}ƒ“ƒh‚ɂ‚¢‚Äà–¾‚ð‚·‚é‚æ‚¤ + ‚È‚Á‚Ä‚¢‚Ü‚·B + + ƒ`ƒ…[ƒgƒŠƒAƒ‹‚ðŠ®—¹‚·‚é‚̂ɕK—v‚ÈŽžŠÔ‚ÍAŠo‚¦‚½ƒRƒ}ƒ“ƒh‚ðŽŽ‚·‚̂ɂǂꂾ + ‚¯ŽžŠÔ‚ðŽg‚¤‚Ì‚©‚É‚à‚æ‚è‚Ü‚·‚ªA‚¨‚æ‚»25‚©‚ç30•ª‚Å‚·B + + ATTENTION: + ˆÈ‰º‚Ì—ûK—pƒRƒ}ƒ“ƒh‚ɂ͂±‚Ì•¶Í‚ð•ÏX‚·‚é‚à‚Ì‚à‚ ‚è‚Ü‚·B—ûK‚ðŽn‚ß‚é‘O + ‚ɃRƒs[‚ð쬂µ‚Ü‚µ‚傤("vimtutor"‚µ‚½‚È‚ç‚ÎAŠù‚ɃRƒs[‚³‚ê‚Ä‚¢‚Ü‚·)B + + ‚±‚̃`ƒ…[ƒgƒŠƒAƒ‹‚ªAŽg‚¤‚±‚ƂŊo‚¦‚ç‚ê‚éŽd‘g‚݂ɂȂÁ‚Ä‚¢‚邱‚Æ‚ðAS‚µ + ‚Ä‚¨‚©‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB³‚µ‚­ŠwK‚·‚é‚ɂ̓Rƒ}ƒ“ƒh‚ðŽÀÛ‚ÉŽŽ‚³‚È‚¯‚ê‚Î + ‚È‚ç‚È‚¢‚̂ł·B•¶Í‚ð“Ç‚ñ‚¾‚¾‚¯‚È‚ç‚ÎA‚«‚Á‚Æ–Y‚ê‚Ä‚µ‚Ü‚¢‚Ü‚·!B + + ‚³‚ŸACapsƒƒbƒN(Shift-Lock)ƒL[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚È‚¢‚±‚Æ‚ðŠm”F‚µ‚½ŒãA‰æ–Ê‚É + ƒŒƒbƒXƒ“1.1 ‚ª‘S•”•\ަ‚³‚ê‚邯‚±‚ë‚Ü‚ÅAj ƒL[‚ð‰Ÿ‚µ‚ăJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü + ‚µ‚傤B +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 1.1: ƒJ[ƒ\ƒ‹‚̈ړ® + + + ** ƒJ[ƒ\ƒ‹‚ðˆÚ“®‚·‚é‚É‚ÍAަ‚³‚ê‚é—l‚É h,j,k,l ‚ð‰Ÿ‚µ‚Ü‚· ** + ^ + k ƒqƒ“ƒg: h ƒL[‚Ͷ•ûŒü‚Ɉړ®‚µ‚Ü‚·B + < h l > l ƒL[‚͉E•ûŒü‚Ɉړ®‚µ‚Ü‚·B + j j ƒL[‚͉º–îˆóƒL[‚̂悤‚ȃL[‚Å‚·B + v + 1. ˆÚ“®‚ÉŠµ‚ê‚é‚Ü‚ÅAƒXƒNƒŠ[ƒ“‚ŃJ[ƒ\ƒ‹ˆÚ“®‚³‚¹‚Ü‚µ‚傤B + + 2. ‰º‚ւ̃L[(j)‚ð‰Ÿ‚µ‚‚¯‚邯A˜A‘±‚µ‚Ĉړ®‚Å‚«‚Ü‚·B + ‚±‚ê‚ÅŽŸ‚̃ŒƒbƒXƒ“‚Ɉړ®‚·‚é•û–@‚ª‚í‚©‚è‚Ü‚µ‚½‚ËB + + 3. ‰º‚ւ̃L[‚ðŽg‚Á‚ÄAƒŒƒbƒXƒ“1.2 ‚Ɉړ®‚µ‚Ü‚µ‚傤B + +Note: ‰½‚ðƒ^ƒCƒv‚µ‚Ä‚¢‚é‚©”»‚ç‚È‚­‚È‚Á‚½‚çA‚ð‰Ÿ‚µ‚ăm[ƒ}ƒ‹ƒ‚[ƒh‚É‚µ + ‚Ü‚·B‚»‚ê‚©‚ç“ü—Í‚µ‚悤‚Æ‚µ‚Ä‚¢‚½ƒRƒ}ƒ“ƒh‚ðÄ“ü—Í‚µ‚Ü‚µ‚傤B + +Note: ƒJ[ƒ\ƒ‹ƒL[‚Å‚àˆÚ“®‚Å‚«‚Ü‚·B‚µ‚©‚µ hjkl ‚Ɉê“xе‚ê‚Ä‚µ‚Ü‚¦‚ÎA‚͂邩 + ‚É‘¬‚­ˆÚ“®‚·‚邱‚Æ‚ª‚Å‚«‚é‚Å‚µ‚傤B‚¢‚âƒ}ƒW‚Å! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 1.2: VIM ‚Ì‹N“®‚ÆI—¹ + + + !! NOTE: ˆÈ‰º‚Ì‚ ‚ç‚ä‚éƒXƒeƒbƒv‚ðs‚¤‘O‚ÉA‚±‚̃ŒƒbƒXƒ“‚ð“ǂ݂܂µ‚傤!! + + 1. ƒL[‚ð‰Ÿ‚µ‚Ü‚µ‚傤B(ŠmŽÀ‚Ƀm[ƒ}ƒ‹ƒ‚[ƒh‚É‚·‚邽‚ß) + + 2. ŽŸ‚̂悤‚Ƀ^ƒCƒv: :q! + ‚±‚ê‚É‚æ‚è•ÒW‚µ‚½“à—e‚ð•Û‘¶‚¹‚¸‚ɃGƒfƒBƒ^‚ªI—¹‚µ‚Ü‚·B + + 3. ƒVƒFƒ‹ƒvƒƒ“ƒvƒg‚ªo‚Ä‚«‚½‚çA‚±‚̃`ƒ…[ƒgƒŠƒAƒ‹‚ðŽn‚ß‚éˆ×‚ɂɃRƒ}ƒ“ƒh + ‚ðƒ^ƒCƒv‚µ‚Ü‚·B + ‚»‚̃Rƒ}ƒ“ƒh‚Í: vimtutor + + 4. ‚±‚ê‚܂ł̃Xƒeƒbƒv‚ðŠo‚¦Ž©M‚ª‚‚¢‚½‚È‚ç‚ÎAƒXƒeƒbƒv 1 ‚©‚ç 3 ‚܂łðŽÀ + Û‚ÉŽŽ‚µ‚ÄAVim ‚ð1“xI—¹‚µ‚Ä‚©‚çĂыN“®‚µ‚Ü‚µ‚傤B + +NOTE: :q! ‚Í‘S‚Ă̕ÏX‚ð”jŠü‚µ‚Ü‚·BƒŒƒbƒXƒ“‚ɂĕÏX‚ðƒtƒ@ƒCƒ‹‚É•Û + ‘¶‚·‚é•û–@‚ɂ‚¢‚Ä‚à•׋­‚µ‚Ä‚¢‚«‚Ü‚µ‚傤B + + 5. 1.3‚܂ŃJ[ƒ\ƒ‹‚ðˆÚ“®‚³‚¹‚Ü‚µ‚傤B + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 1.3: ƒeƒLƒXƒg•ÒW - íœ + + + ** ƒm[ƒ}ƒ‹ƒ‚[ƒh‚ɂăJ[ƒ\ƒ‹‚̉º‚Ì•¶Žš‚ð휂·‚é‚É‚Í x ‚ð‰Ÿ‚µ‚Ü‚· ** + + 1. ˆÈ‰º‚Ì ---> ‚ÆŽ¦‚³‚ꂽs‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚µ‚傤B + + 2. ŠÔˆá‚¢‚ðC³‚·‚邽‚ß‚ÉA휂·‚éʼn‚Ì•¶Žš‚܂ŃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚·B + + 3. •s•K—v‚È•¶Žš‚ð x ‚ð‰Ÿ‚µ‚Ä휂µ‚Ü‚µ‚傤B + + 4. •¶‚ª³‚µ‚­‚È‚é‚܂ŠƒXƒeƒbƒv 2 ‚©‚ç 4 ‚ðŒJ‚è•Ô‚µ‚Ü‚µ‚傤B + +---> ‚»‚Ì ‚¤‚¤‚³‚¬ ‚Í ‚‚‚«‚« ‚ð ‚±‚¦‚¦‚Ä‚Ä ‚Ƃт͂˂½‚½ + + 5. s‚ª³‚µ‚­‚È‚Á‚½‚çAƒŒƒbƒXƒ“ 1.4 ‚Öi‚݂܂µ‚傤B + +NOTE: ‘S‚ẴŒƒbƒXƒ“‚ð’Ê‚¶‚ÄAŠo‚¦‚悤‚Æ‚·‚é‚̂ł͂Ȃ­ŽÀÛ‚É‚â‚Á‚Ă݂܂µ‚傤B + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 1.4: ƒeƒLƒXƒg•ÒW - ‘}“ü + + + ** ƒm[ƒ}ƒ‹ƒ‚[ƒh‚ɂăeƒLƒXƒg‚ð‘}“ü‚·‚é‚É‚Í i ‚ð‰Ÿ‚µ‚Ü‚· ** + + 1. ˆÈ‰º‚Ì ---> ‚ÆŽ¦‚³‚ꂽʼn‚Ìs‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚µ‚傤B + + 2. 1s–Ú‚ð2s–Ú‚Æ“¯‚¶—l‚É‚·‚邽‚ß‚ÉAƒeƒLƒXƒg‚ð‘}“ü‚µ‚È‚¯‚ê‚΂Ȃç‚È‚¢ˆÊ’u + ‚ÌŽŸ‚Ì•¶Žš‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚·B + + 3. i ƒL[‚ð‰Ÿ‚µ‚Ä‚©‚çA’ljÁ‚ª•K—v‚È•¶Žš‚ðƒ^ƒCƒv‚µ‚Ü‚µ‚傤B + + 4. ŠÔˆá‚¢‚ðC³‚µ‚½‚ç ‚ð‰Ÿ‚µ‚ăRƒ}ƒ“ƒhƒ‚[ƒh‚É–ß‚èA³‚µ‚¢•¶‚ɂȂé—l + ‚ɃXƒeƒbƒv 2 ‚©‚ç 4 ‚ðŒJ‚è•Ô‚µ‚Ü‚µ‚傤B + +---> ‚±‚Ì ‚É‚Í ‘«‚è‚È‚¢ ƒeƒLƒXƒg ‚ ‚éB +---> ‚±‚Ì s ‚É‚Í Šô‚‚© ‘«‚è‚È‚¢ ƒeƒLƒXƒg ‚ª ‚ ‚éB + + 5. ‘}“ü‚Ì•û–@‚ª‚í‚©‚Á‚½‚牺‚̃ŒƒbƒXƒ“1‚Ì—v–ñ‚ðŒ©‚Ü‚µ‚傤B + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 1.5: ƒeƒLƒXƒg•ÒW - ’ljÁ + + + ** ƒeƒLƒXƒg’ljÁ‚·‚é‚É‚Í A ‚ð‰Ÿ‚µ‚Ü‚µ‚傤 ** + + 1. ˆÈ‰º‚Ì ---> ‚ÆŽ¦‚³‚ꂽʼn‚Ìs‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚µ‚傤B + ƒJ[ƒ\ƒ‹‚ª‚»‚Ì•¶Žšã‚É‚ ‚Á‚Ä‚à‚©‚Ü‚¢‚Ü‚¹‚ñB + + 2. ’ljÁ‚ª•K—v‚ÈꊂŠA ‚ðƒ^ƒCƒv‚µ‚Ü‚µ‚傤B + + 3. ƒeƒLƒXƒg‚ð’ljÁ‚µI‚¦‚½‚çA ‚ð‰Ÿ‚µ‚ăm[ƒ}ƒ‹ƒ‚[ƒh‚É–ß‚è‚Ü‚µ‚傤B + + 4. 2s–Ú‚Ì ---> ‚ÆŽ¦‚³‚ꂽꊂֈړ®‚µAƒXƒeƒbƒv 2 ‚©‚ç 3 ŒJ‚è•Ô‚µ‚Ä•¶–@‚ð + C³‚µ‚Ü‚µ‚傤B + +---> ‚±‚±‚ɂ͊Ԉá‚Á‚½ƒeƒLƒXƒg‚ª‚ ‚è + ‚±‚±‚ɂ͊Ԉá‚Á‚½ƒeƒLƒXƒg‚ª‚ ‚è‚Ü‚·B +---> ‚±‚±‚É‚àŠÔˆá‚Á‚½ƒeƒLƒX + ‚±‚±‚É‚àŠÔˆá‚Á‚½ƒeƒLƒXƒg‚ª‚ ‚è‚Ü‚·B + + 5. ƒeƒLƒXƒg‚̒ljÁ‚ªŒy‰õ‚ɂȂÁ‚Ä‚«‚½‚烌ƒbƒXƒ“ 1.6 ‚Öi‚݂܂µ‚傤B + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 1.6: ƒtƒ@ƒCƒ‹‚Ì•ÒW + + + ** ƒtƒ@ƒCƒ‹‚ð•Û‘¶‚µ‚ÄI—¹‚·‚é‚É‚Í :wq ‚ƃ^ƒCƒv‚µ‚Ü‚· ** + + !! NOTE: ˆÈ‰º‚̃Xƒeƒbƒv‚ðŽÀs‚·‚é‘O‚ÉA‚Ü‚¸‘S‘Ì‚ð“Ç‚ñ‚Å‚­‚¾‚³‚¢!! + + 1. ƒŒƒbƒXƒ“ 1.2 ‚Å‚â‚Á‚½‚悤‚É :q! ‚ðƒ^ƒCƒv‚µ‚ÄA‚±‚̃`ƒ…[ƒgƒŠƒAƒ‹‚ðI—¹ + ‚µ‚Ü‚·B + + 2. ƒVƒFƒ‹ƒvƒƒ“ƒvƒg‚Å‚±‚̃Rƒ}ƒ“ƒh‚ðƒ^ƒCƒv‚µ‚Ü‚·: vim tutor + 'vim'‚ª Vim ƒGƒfƒBƒ^‚ð‹N“®‚·‚éƒRƒ}ƒ“ƒhA'tutor' ‚Í•ÒW‚µ‚½‚¢ƒtƒ@ƒCƒ‹‚Ì + –¼‘O‚Å‚·B•ÏX‚µ‚Ä‚à‚æ‚¢ƒtƒ@ƒCƒ‹‚ðŽg‚¢‚Ü‚µ‚傤B + + 3. ‘O‚̃ŒƒbƒXƒ“‚ÅŠw‚ñ‚¾‚悤‚ÉAƒeƒLƒXƒg‚ð‘}“üA휂µ‚Ü‚·B + + 4. •ÏX‚ðƒtƒ@ƒCƒ‹‚ɕۑ¶‚µ‚Ü‚·: :wq + + 5. vimtutor ‚ðÄ“x‹N“®‚µAˆÈ‰º‚Ì—v–ñ‚Öi‚݂܂µ‚傤B + + 6. ˆÈã‚̃Xƒeƒbƒv‚ð“Ç‚ñ‚Å—‰ð‚µ‚½ã‚Å‚±‚ê‚ðŽÀs‚µ‚Ü‚µ‚傤B + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 1 —v–ñ + + + 1. ƒJ[ƒ\ƒ‹‚Í–îˆóƒL[‚à‚µ‚­‚Í hjkl ƒL[‚ňړ®‚µ‚Ü‚·B + h (¶) j (‰º) k (ã) l (‰E) + + 2. Vim ‚ð‹N“®‚·‚é‚ɂ̓vƒƒ“ƒvƒg‚©‚ç vim ƒtƒ@ƒCƒ‹–¼ ‚ƃ^ƒCƒv‚µ‚Ü‚·B + + 3. Vim ‚ðI—¹‚·‚é‚É‚Í :q! ‚ƃ^ƒCƒv‚µ‚Ü‚·(•ÏX‚ð”jŠü)B + ‚à‚µ‚­‚Í :wq ‚ƃ^ƒCƒv‚µ‚Ü‚·(•ÏX‚ð•Û‘¶)B + + 4. ƒJ[ƒ\ƒ‹‚̉º‚Ì•¶Žš‚ð휂·‚é‚É‚ÍAƒm[ƒ}ƒ‹ƒ‚[ƒh‚Å x ‚ƃ^ƒCƒv‚µ‚Ü‚·B + + 5. ƒJ[ƒ\ƒ‹‚̈ʒu‚É•¶Žš‚ð‘}“ü‚·‚é‚É‚ÍAƒm[ƒ}ƒ‹ƒ‚[ƒh‚Å i ‚ƃ^ƒCƒv‚µ‚Ü‚·B + i ƒeƒLƒXƒg‚̃^ƒCƒv ƒJ[ƒ\ƒ‹ˆÊ’u‚ɒljÁ + A ƒeƒLƒXƒg‚̒ljÁ s––‚ɒljÁ + +NOTE: ƒL[‚ð‰Ÿ‚·‚ƃm[ƒ}ƒ‹ƒ‚[ƒh‚ɈÚs‚µ‚Ü‚·B‚»‚ÌÛAŠÔˆá‚Á‚½‚è“ü—Í“r + ’†‚̃Rƒ}ƒ“ƒh‚ðŽæ‚èÁ‚·‚±‚Æ‚ª‚Å‚«‚Ü‚·B + +‚³‚ÄA‘±‚¯‚ăŒƒbƒXƒ“ 2 ‚ðŽn‚߂܂µ‚傤B + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 2.1: 휃Rƒ}ƒ“ƒh + + + ** ’PŒê‚Ì––”ö‚܂łð휂·‚é‚É‚Í dw ‚ƃ^ƒCƒv‚µ‚Ü‚µ‚傤 ** + + 1. ƒm[ƒ}ƒ‹ƒ‚[ƒh‚Å‚ ‚邱‚Æ‚ðŠm”F‚·‚邽‚ß‚É ‚ð‰Ÿ‚µ‚Ü‚µ‚傤B + + 2. ˆÈ‰º‚Ì ---> ‚ÆŽ¦‚³‚ꂽs‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚µ‚傤B + + 3. Á‚µ‚½‚¢’PŒê‚Ìæ“ª‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚µ‚傤B + + 4. ’PŒê‚ð휂·‚邽‚ß‚É dw ‚ƃ^ƒCƒv‚µ‚Ü‚µ‚傤B + + NOTE: ƒ^ƒCƒv‚·‚邯Adw ‚Æ‚¢‚¤•¶Žš‚ªƒXƒNƒŠ[ƒ“‚Ìʼnºs‚ÉŒ»‚í‚ê‚Ü‚·B + ƒ^ƒCƒv‚ðŠÔˆá‚Á‚Ä‚µ‚Ü‚Á‚½Žž‚É‚Í ‚ð‰Ÿ‚µ‚Ä‚â‚è’¼‚µ‚Ü‚µ‚傤B + +---> ‚±‚Ì •¶ ކ ‚É‚Í ‚¢‚­‚‚©‚Ì ‚½‚Ì‚µ‚¢ •K—v‚̂Ȃ¢ ’PŒê ‚ª ŠÜ‚Ü‚ê‚Ä ‚¢‚Ü‚·B + + 5. 3 ‚©‚ç 4 ‚܂ł𕶂ª³‚µ‚­‚È‚é‚܂ŌJ‚è•Ô‚µAƒŒƒbƒXƒ“ 2.2 ‚Öi‚݂܂µ‚傤B + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 2.2: ‚»‚Ì‘¼‚Ì휃Rƒ}ƒ“ƒh + + + ** s‚Ì––”ö‚܂łð휂·‚é‚É‚Í d$ ‚ƃ^ƒCƒv‚µ‚Ü‚µ‚傤 ** + + 1. ƒm[ƒ}ƒ‹ƒ‚[ƒh‚Å‚ ‚邱‚Æ‚ðŠm”F‚·‚é‚Ì‚É ‚ð‰Ÿ‚µ‚Ü‚µ‚傤B + + 2. ˆÈ‰º‚Ì ---> ‚ÆŽ¦‚³‚ꂽs‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚µ‚傤B + + 3. ³‚µ‚¢•¶‚Ì––”ö‚ÖƒJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚µ‚傤(ʼn‚Ì . ‚ÌŒã‚Å‚·)B + + 4. s––‚Ü‚Å휂·‚é‚Ì‚É d$ ‚ƃ^ƒCƒv‚µ‚Ü‚µ‚傤B + +---> ’N‚©‚ª‚±‚Ìs‚ÌÅŒã‚ð2“xƒ^ƒCƒv‚µ‚Ü‚µ‚½B 2“xƒ^ƒCƒv‚µ‚Ü‚µ‚½B + + + 5. ‚Ç‚¤‚¢‚¤‚±‚Æ‚©—‰ð‚·‚邽‚ß‚ÉAƒŒƒbƒXƒ“ 2.3 ‚Öi‚݂܂µ‚傤B + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 2.3: ƒIƒyƒŒ[ƒ^‚ƃ‚[ƒVƒ‡ƒ“ + + + ‘½‚­‚̃Rƒ}ƒ“ƒh‚̓IƒyƒŒ[ƒ^‚ƃ‚[ƒVƒ‡ƒ“‚©‚çƒeƒLƒXƒg‚É•ÏX‚ð‰Á‚Ü‚·B + 휃Rƒ}ƒ“ƒh d ‚̃IƒyƒŒ[ƒ^‚ÍŽŸ‚Ì—l‚ɂȂÁ‚Ä‚¢‚Ü‚·: + + d ƒ‚[ƒVƒ‡ƒ“ + + ‚»‚ꂼ‚ê: + d - 휃Rƒ}ƒ“ƒhB + ƒ‚[ƒVƒ‡ƒ“ - ‰½‚ɑ΂µ‚Ä“­‚«‚©‚¯‚é‚©(ˆÈ‰º‚É‹“‚°‚Ü‚·)B + + ƒIƒyƒŒ[ƒ^‚̈ꕔˆê——: + w - ƒJ[ƒ\ƒ‹ˆÊ’u‚©‚ç‹ó”’‚ðŠÜ‚Þ’PŒê‚Ì––”ö‚Ü‚ÅB + e - ƒJ[ƒ\ƒ‹ˆÊ’u‚©‚ç‹ó”’‚ðŠÜ‚܂Ȃ¢’PŒê‚Ì––”ö‚Ü‚ÅB + $ - ƒJ[ƒ\ƒ‹ˆÊ’u‚©‚çs––‚Ü‚ÅB + + ‚‚܂è de ‚ƃ^ƒCƒv‚·‚邯AƒJ[ƒ\ƒ‹ˆÊ’u‚©‚ç’PŒê‚ÌI‚í‚è‚܂łð휂µ‚Ü‚·B + +NOTE: –`Œ¯‚µ‚½‚¢l‚ÍAƒm[ƒ}ƒ‹ƒ‚[ƒh‚ɂăRƒ}ƒ“ƒh‚È‚µ‚Ƀ‚[ƒVƒ‡ƒ“‚ð‰Ÿ‚µ‚Ä + ‚݂܂µ‚傤BƒJ[ƒ\ƒ‹‚ª–Ú“IŒêˆê——‚ÅŽ¦‚³‚ê‚éˆÊ’u‚Ɉړ®‚·‚é‚Í‚¸‚Å‚·B + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 2.4: ƒ‚[ƒVƒ‡ƒ“‚ɃJƒEƒ“ƒg‚ðŽg—p‚·‚é + + + ** ‰½‰ñ‚às‚¢‚½‚¢ŒJ‚è•Ô‚µ‚̃‚[ƒVƒ‡ƒ“‚Ì‘O‚É”’l‚ðƒ^ƒCƒv‚µ‚Ü‚·B ** + + 1. ˆÈ‰º‚Ì ---> ‚ÆŽ¦‚³‚ꂽs‚Ìæ“ª‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚·B + + 2. 2dw ‚ðƒ^ƒCƒv‚µ‚Ä’PŒê2‚•ªˆÚ“®‚µ‚Ü‚·B + + 3. 3e ‚ðƒ^ƒCƒv‚µ‚Ä3‚–ڂ̒PŒê‚ÌI’[‚Ɉړ®‚µ‚Ü‚·B + + 4. 0 (ƒ[ƒ)‚ðƒ^ƒCƒv‚µ‚Äs“ª‚Ɉړ®‚µ‚Ü‚·B + + 5. ƒXƒeƒbƒv 2 ‚Æ 3 ‚ðˆá‚¤”’l‚ÆŽg‚Á‚ÄŒJ‚è•Ô‚µ‚Ü‚·B + +---> This is just a line with words you can move around in. + + 6. ƒŒƒbƒXƒ“ 2.5 ‚Éi‚݂܂µ‚傤B + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 2.5: ‚æ‚葽‚­‚ð휂·‚邽‚߂ɃJƒEƒ“ƒg‚ðŽg—p‚·‚é + + + ** ƒIƒyƒŒ[ƒ^‚ƃJƒEƒ“ƒg‚ðƒ^ƒCƒv‚·‚邯A‚»‚Ì‘€ì‚ª•¡”‰ñŒJ‚è•Ô‚³‚ê‚Ü‚·B ** + + Šùq‚Ì휂̃IƒyƒŒ[ƒ^‚ƃ‚[ƒVƒ‡ƒ“‚Ì‘g‚݇‚킹‚ɃJƒEƒ“ƒg‚ð’ljÁ‚·‚邱‚Æ‚ÅA + ‚æ‚葽‚­‚Ì휂ªs‚¦‚Ü‚·: + d ”’l ƒ‚[ƒVƒ‡ƒ“ + + 1. ---> ‚ÆŽ¦‚³‚ꂽs‚Ìs“ª•”•ª‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚µ‚傤B + + 2. UPPER CASE ‚Ì’PŒê2‚‚ð 2dw ‚ƃ^ƒCƒv‚µ‚Ä휂µ‚Ü‚·B + + 3. UPPER CASE ‚Æ‚¢‚¤˜A‘±‚µ‚½’PŒê‚ðA1‚‚̃Rƒ}ƒ“ƒh‚ƈقȂéƒJƒEƒ“ƒg‚ðŽw’肵A + ƒXƒeƒbƒv 1 ‚Æ 2 ‚ðŒJ‚è•Ô‚µ‚Ü‚·B + +---> ‚±‚ÌABC DEs‚ÌFGHI JK LMN OP’PŒê‚ÍQ RS TUVãY—í‚ɂȂÁ‚½B + +NOTE: ƒIƒyƒŒ[ƒ^ d ‚ƃ‚[ƒVƒ‡ƒ“‚̊ԂɃJƒEƒ“ƒg‚ðŽg‚Á‚½ê‡AƒIƒyƒŒ[ƒ^‚̂Ȃ¢ + ꇂ̃‚[ƒVƒ‡ƒ“‚̂悤‚É“®ì‚µ‚Ü‚·B + —á: 3dw ‚Æ d3w ‚Í“¯“™‚ÅA3w ‚ð휂µ‚Ü‚·B + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 2.6: s‚Ì‘€ì + + + ** s‘S‘Ì‚ð휂·‚é‚É‚Í dd ‚ƃ^ƒCƒv‚µ‚Ü‚· ** + + s‘S‘Ì‚ð휂·‚é•p“x‚ª‘½‚¢‚Ì‚ÅAVi‚̃fƒUƒCƒi[‚Ís‚Ì휂ð d ‚Ì2‰ñƒ^ƒCƒv‚Æ + ‚¢‚¤ŠÈ’P‚È‚à‚̂Ɍˆ‚߂܂µ‚½B + + 1. ˆÈ‰º‚Ì‹å‚Ì2s–ڂɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚·B + 2. dd ‚ƃ^ƒCƒv‚µ‚Äs‚ð휂µ‚Ü‚·B + 3. ‚³‚ç‚É4s–ڂɈړ®‚µ‚Ü‚·B + 4. 2dd ‚ƃ^ƒCƒv‚µ‚Ä2s‚ð휂µ‚Ü‚·B + +---> 1) ƒoƒ‰‚ÍÔ‚¢A +---> 2) ‚‚܂ç‚È‚¢‚à‚̂͊y‚µ‚¢A +---> 3) ƒXƒ~ƒŒ‚Í‚¢A +---> 4) Ž„‚ÍŽÔ‚ð‚à‚Á‚Ä‚¢‚éA +---> 5) ŽžŒv‚ªŽž‚ð‚°‚éA +---> 6) »“œ‚͊¢ +---> 7) ƒIƒ}ƒGƒ‚ƒi[ + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 2.7: ‚â‚è’¼‚µƒRƒ}ƒ“ƒh + + + ** ÅŒã‚̃Rƒ}ƒ“ƒh‚ðŽæ‚èÁ‚·‚É‚Í u ‚ð‰Ÿ‚µ‚Ü‚·BU ‚Ís‘S‘̂̎æÁ‚Å‚·B ** + + 1. ˆÈ‰º‚Ì ---> ‚ÆŽ¦‚³‚ꂽs‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µAʼn‚̊ԈႢ‚ɃJ[ƒ\ + ƒ‹‚ðˆÚ“®‚µ‚Ü‚µ‚傤B + 2. x ‚ðƒ^ƒCƒv‚µ‚Ä‚¢‚ç‚È‚¢æ“ª‚Ì•¶Žš‚ð휂µ‚Ü‚µ‚傤B + 3. ‚³‚ŸAu ‚ðƒ^ƒCƒv‚µ‚ÄÅŒã‚ÉŽÀs‚µ‚½ƒRƒ}ƒ“ƒh‚ðŽæ‚èÁ‚µ‚Ü‚µ‚傤B + 4. ¡“x‚ÍAx ‚ðŽg—p‚µ‚ÄŒë‚è‚ð‘S‚ÄC³‚µ‚Ü‚µ‚傤B + 5. ‘å•¶Žš‚Ì U ‚ðƒ^ƒCƒv‚µ‚ÄAs‚ðŒ³‚Ìó‘Ô‚É–ß‚µ‚Ü‚µ‚傤B + 6. u ‚ðƒ^ƒCƒv‚µ‚Ä’¼‘O‚Ì U ƒRƒ}ƒ“ƒh‚ðŽæÁ‚µ‚Ü‚µ‚傤B + 7. ‚ł̓Rƒ}ƒ“ƒh‚ðÄŽÀs‚·‚é‚Ì‚É CTRL-R (CTRL ‚ð‰Ÿ‚µ‚½‚Ü‚Ü R ‚ð‘Å‚Â)‚ð”‰ñ + ƒ^ƒCƒv‚µ‚Ă݂܂µ‚傤(ŽæÁ‚ÌŽæÁ)B + +---> ‚±‚Ì‚Ìs‚̂̊ԈႢ‚ðC³X‚µAŒã‚Å‚»‚ê‚ç‚ÌC³‚ð‚ðŽæÁ‚µ‚܂܂·‚·B + + 8. ‚±‚ê‚͂ƂĂà•Ö—˜‚ȃRƒ}ƒ“ƒh‚Å‚·B‚³‚ŸƒŒƒbƒXƒ“ 2 —v–ñ‚Öi‚݂܂µ‚傤B + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 2 —v–ñ + + + 1. ƒJ[ƒ\ƒ‹ˆÊ’u‚©‚ç’PŒê‚Ì––”ö‚܂łð휂·‚é‚É‚Í dw ‚ƃ^ƒCƒv‚µ‚Ü‚·B + 2. ƒJ[ƒ\ƒ‹ˆÊ’u‚©‚çs‚Ì––”ö‚܂łð휂·‚é‚É‚Í d$ ‚ƃ^ƒCƒv‚µ‚Ü‚·B + 3. s‘S‘Ì‚ð휂·‚é‚É‚Í dd ‚ƃ^ƒCƒv‚µ‚Ü‚·B + + 4. ƒ‚[ƒVƒ‡ƒ“‚ðŒJ‚è•Ô‚·‚ɂ͔’l‚ð•t—^‚µ‚Ü‚·: 2w + 5. •ÏX‚É—p‚¢‚éƒRƒ}ƒ“ƒh‚ÌŒ`Ž®‚Í + ƒIƒyƒŒ[ƒ^ [”’l] ƒ‚[ƒVƒ‡ƒ“ + + ‚»‚ꂼ‚ê: + ƒIƒyƒŒ[ƒ^ - íœ d ‚̗ނʼn½‚ð‚·‚é‚©B + ”’l - ‚»‚̃Rƒ}ƒ“ƒh‚ð‰½‰ñŒJ‚è•Ô‚·‚©B + ƒ‚[ƒVƒ‡ƒ“ - w (’PŒê)‚â $ (s––)‚Ȃǂ̗ނÅAƒeƒLƒXƒg‚̉½‚ɑ΂µ‚Ä“­‚«‚© + ‚¯‚é‚©B + + 6. s‚Ìæ“ª‚Ɉړ®‚·‚é‚ɂ̓[ƒ‚ðŽg—p‚µ‚Ü‚·: 0 + + 7. ‘O‰ñ‚Ì“®ì‚ðŽæÁ‚·: u (¬•¶Žš u) + s‘S‘̂̕ÏX‚ðŽæÁ‚·: U (‘å•¶Žš U) + ŽæÁ‚µ‚ÌŽæÁ‚µ: CTRL-R +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 3.1: “\‚è•t‚¯ƒRƒ}ƒ“ƒh + + + ** ÅŒã‚É휂³‚ꂽs‚ðƒJ[ƒ\ƒ‹‚ÌŒã‚É“\‚è•t‚¯‚é‚É‚Í p ‚ðƒ^ƒCƒv‚µ‚Ü‚· ** + + 1. ˆÈ‰º‚Ì’i—Ž‚Ìʼn‚Ìs‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚µ‚傤B + + 2. dd ‚ƃ^ƒCƒv‚µ‚Äs‚ð휂µAVim ‚̃oƒbƒtƒ@‚ÉŠi”[‚µ‚Ü‚µ‚傤B + + 3. 휂µ‚½s‚ª–{—ˆ‚ ‚é‚ׂ«ˆÊ’u‚Ìã‚Ìs‚Ü‚ÅAƒJ[ƒ\ƒ‹‚ðˆÚ“®‚³‚¹‚Ü‚µ‚傤B + + 4. ƒm[ƒ}ƒ‹ƒ‚[ƒh‚Å p ‚ðƒ^ƒCƒv‚µ‚ÄŠi”[‚µ‚½s‚ð‰æ–Ê‚É–ß‚µ‚Ü‚·B + + 5. ‡”Ô‚ª³‚µ‚­‚È‚é—l‚ɃXƒeƒbƒv 2 ‚©‚ç 4 ‚ðŒJ‚è•Ô‚µ‚Ü‚µ‚傤B + + d) ‹M•û‚àŠw‚Ô‚±‚Æ‚ª‚Å‚«‚é? + b) ƒXƒ~ƒŒ‚Í‚¢A + c) ’mŒb‚Ƃ͊w‚Ô‚à‚ÌA + a) ƒoƒ‰‚ÍÔ‚¢A + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 3.2: ’u‚«Š·‚¦ƒRƒ}ƒ“ƒh + + + ** ƒJ[ƒ\ƒ‹‚̉º‚Ì•¶Žš‚ð’u‚«Š·‚¦‚é‚É‚Í r ‚ðƒ^ƒCƒv‚µ‚Ü‚· ** + + 1. ˆÈ‰º‚Ì ---> ‚ÆŽ¦‚³‚ꂽʼn‚Ìs‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚µ‚傤B + + 2. ʼn‚̊ԈႢ‚Ìæ“ª‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚µ‚傤B + + 3. r ‚ƃ^ƒCƒv‚µAŠÔˆá‚Á‚Ä‚¢‚é•¶Žš‚ð’u‚«Š·‚¦‚éA³‚µ‚¢•¶Žš‚ðƒ^ƒCƒv‚µ‚Ü‚µ‚傤B + + 4. ʼn‚Ìs‚ª³‚µ‚­‚È‚é‚܂ŃXƒeƒbƒv 2 ‚©‚ç 3 ‚ðŒJ‚è•Ô‚µ‚Ü‚µ‚傤B + +---> ‚±‚̇‚ðl—Í‚µ‚½Žž‚ËA‚»‚Ìl‚ÍŠô‚‚©–âˆá‚Á‚½ƒL[‚ð‰Ÿ‚µ‚à‚µ‚½! +---> ‚±‚Ìs‚ð“ü—Í‚µ‚½Žž‚ÉA‚»‚Ìl‚ÍŠô‚‚©ŠÔˆá‚Á‚½ƒL[‚ð‰Ÿ‚µ‚Ü‚µ‚½! + + 5. ‚³‚ŸAƒŒƒbƒXƒ“ 3.2 ‚Öi‚݂܂µ‚傤B + +NOTE: ŽÀÛ‚ÉŽŽ‚µ‚Ü‚µ‚傤BŒˆ‚µ‚ÄŠo‚¦‚邾‚¯‚ɂ͂µ‚È‚¢‚±‚ÆB + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 3.3: •ÏXƒRƒ}ƒ“ƒh + + + ** ’PŒê‚̈ꕔA‚à‚µ‚­‚Í‘S‘Ì‚ð•ÏX‚·‚é‚É‚Í cw ‚ƃ^ƒCƒv‚µ‚Ü‚· ** + + 1. ˆÈ‰º‚Ì ---> ‚ÆŽ¦‚³‚ꂽʼn‚Ìs‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚µ‚傤B + + 2. lubw ‚Ì u ‚̈ʒu‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚µ‚傤B + + 3. cw ‚ƃ^ƒCƒv‚µA³‚µ‚¢’PŒê‚ðƒ^ƒCƒv‚µ‚Ü‚µ‚傤(‚±‚Ìê‡ 'ine' ‚ƃ^ƒCƒv)B + + 4. ŽŸ‚̊ԈႢ(•ÏX‚·‚ׂ«•¶Žš‚Ìæ“ª)‚Ɉړ®‚·‚邽‚ß‚É ‚ðƒ^ƒCƒv‚µ‚Ü‚·B + + 5. ʼn‚Ìs‚ªŽŸ‚Ìs‚Ì—l‚ɂȂé‚܂ŃXƒeƒbƒv 3 ‚Æ 4 ‚ðŒJ‚è•Ô‚µ‚Ü‚·B + +---> This lubw has a few wptfd that mrrf changing usf the change command. +---> This line has a few words that need changing using the change command. + +cw ‚Í’PŒê‚ð•ÏX‚·‚邾‚¯‚łȂ­A‘}“ü‚às‚¦‚邱‚ƂɒˆÓ‚µ‚Ü‚µ‚傤B + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 3.4: c ‚ðŽg—p‚µ‚½‚»‚Ì‘¼‚Ì•ÏX + + + ** •ÏXƒRƒ}ƒ“ƒh‚ÍA휃Rƒ}ƒ“ƒh‚Æ“¯‚¶—l‚ɃIƒuƒWƒFƒNƒg‚ðŽg—p‚µ‚Ü‚· ** + + 1. •ÏXƒRƒ}ƒ“ƒh‚ÍA휃Rƒ}ƒ“ƒh‚Æ“¯‚¶‚悤‚È“®ì‚ð‚µ‚Ü‚·B‚»‚ÌŒ`Ž®‚Í + + c [”’l] ƒ‚[ƒVƒ‡ƒ“ + + 2. ƒIƒuƒWƒFƒNƒg‚à“¯‚¶‚ÅAw ‚Í’PŒêA $ ‚Ís––‚ȂǂƂ¢‚Á‚½‚à‚̂ł·B + + 3. ˆÈ‰º‚Ì ---> ‚ÆŽ¦‚³‚ꂽs‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚µ‚傤B + + 4. ʼn‚̊ԈႢ‚ÖƒJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚µ‚傤B + + 5. c$ ‚ƃ^ƒCƒv‚µ‚Äs‚ÌŽc‚è‚ð‚Qs–Ú‚Ì—l‚É‚µA ‚ð‰Ÿ‚µ‚Ü‚µ‚傤B + +---> The end of this line needs some help to make it like the second. +---> The end of this line needs to be corrected using the c$ command. + +NOTE: ƒ^ƒCƒv’†‚̊ԈႢ‚̓oƒbƒNƒXƒy[ƒXƒL[‚ðŽg‚Á‚Ä’¼‚·‚±‚Æ‚à‚Å‚«‚Ü‚·B + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 3 —v–ñ + + + 1. Šù‚É휂³‚ꂽƒeƒLƒXƒg‚ðÄ”z’u‚·‚é‚É‚ÍAp ‚ðƒ^ƒCƒv‚µ‚Ü‚·B‚±‚ê‚Í휂³ + ‚ꂽƒeƒLƒXƒg‚ðƒJ[ƒ\ƒ‹‚ÌŒã‚É‘}“ü‚µ‚Ü‚·(s’PˆÊ‚Å휂³‚ꂽ‚̂Ȃç‚ÎAƒJ[ + ƒ\ƒ‹‚Ì‚ ‚鎟‚Ìs‚É‘}“ü‚³‚ê‚Ü‚·)B + + 2. ƒJ[ƒ\ƒ‹‚̉º‚Ì•¶Žš‚ð’u‚«Š·‚¦‚é‚É‚ÍAr ‚ðƒ^ƒCƒv‚µ‚½ŒãA‚»‚ê‚ð’u‚«Š·‚¦‚é + •¶Žš‚ðƒ^ƒCƒv‚µ‚Ü‚·B + + 3. •ÏXƒRƒ}ƒ“ƒh‚ł̓J[ƒ\ƒ‹ˆÊ’u‚©‚ç“Á’è‚̃‚[ƒVƒ‡ƒ“‚ÅŽw’肳‚ê‚éI’[‚܂łð•Ï + X‚·‚邱‚Æ‚ª‰Â”\‚Å‚·B—Ⴆ‚Î cw ‚È‚ç‚΃J[ƒ\ƒ‹ˆÊ’u‚©‚ç’PŒê‚ÌI‚í‚è‚Ü‚ÅA + c$ ‚È‚ç‚Îs‚ÌI‚í‚è‚܂łð•ÏX‚µ‚Ü‚·B + + 4. •ÏXƒRƒ}ƒ“ƒh‚ÌŒ`Ž®‚Í + + c [”’l] ƒ‚[ƒVƒ‡ƒ“ + +‚³‚ŸAŽŸ‚̃ŒƒbƒXƒ“‚Öi‚݂܂µ‚傤B + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 4.1: ˆÊ’u‚ƃtƒ@ƒCƒ‹‚Ìî•ñ + + ** ƒtƒ@ƒCƒ‹“à‚ł̈ʒu‚ƃtƒ@ƒCƒ‹‚Ìó‘Ô‚ð•\ަ‚·‚é‚É‚Í CTRL-G ‚ðƒ^ƒCƒv‚µ‚Ü‚·B + ƒtƒ@ƒCƒ‹“à‚Ì‚ ‚és‚Ɉړ®‚·‚é‚É‚Í G ‚ðƒ^ƒCƒv‚µ‚Ü‚· ** + + NOTE: ƒXƒeƒbƒv‚ðŽÀs‚·‚é‘O‚ÉA‚±‚̃ŒƒbƒXƒ“‘S‚Ăɖڂð’Ê‚µ‚Ü‚µ‚傤!! + + 1. CTRL ‚ð‰Ÿ‚µ‚½‚Ü‚Ü g ‚ð‰Ÿ‚µ‚Ü‚µ‚傤B‚±‚Ì‘€ì‚ð CTRL-G ‚ƌĂñ‚Å‚¢‚Ü‚·B + ƒy[ƒW‚̈ê”Ô‰º‚Ƀtƒ@ƒCƒ‹–¼‚Æs”Ô†‚ª•\ަ‚³‚ê‚é‚Í‚¸‚Å‚·B ƒXƒeƒbƒv 3‚Ì‚½‚ß + ‚És”Ô†‚ðŠo‚¦‚Ä‚¨‚«‚Ü‚µ‚傤B + +NOTE: ‰æ–ʂ̉E‰º‹÷‚ɃJ[ƒ\ƒ‹‚̈ʒu‚ª•\ަ‚³‚ê‚Ä‚¢‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñB‚±‚ê‚Í + 'ruler' ƒIƒvƒVƒ‡ƒ“(ƒŒƒbƒXƒ“6‚Åà–¾)‚ðÝ’è‚·‚邱‚Ƃŕ\ަ‚³‚ê‚Ü‚·B + + 2. ʼnºs‚Ɉړ®‚·‚邽‚ß‚É G ‚ðƒ^ƒCƒv‚µ‚Ü‚µ‚傤B + ƒtƒ@ƒCƒ‹‚Ìæ“ª‚Ɉړ®‚·‚é‚É‚Í gg ‚ƃ^ƒCƒv‚µ‚Ü‚µ‚傤B + + 3. æ‚Ù‚Ç‚Ìs‚̔Ԇ‚ðƒ^ƒCƒv‚µ G ‚ðƒ^ƒCƒv‚µ‚Ü‚µ‚傤Bʼn‚É CTRL-G ‚ð‰Ÿ‚µ‚½s + ‚É–ß‚Á‚Ä—ˆ‚é‚Í‚¸‚Å‚·B + + 4. Ž©M‚ªŽ‚Ä‚½‚çƒXƒeƒbƒv 1 ‚©‚ç 3 ‚ðŽÀs‚µ‚Ü‚µ‚傤B + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 4.2: ŒŸõƒRƒ}ƒ“ƒh + + + ** Œê‹å‚ðŒŸõ‚·‚é‚É‚Í / ‚ÆA‘O•ûŒŸõ‚·‚éŒê‹å‚ðƒ^ƒCƒv‚µ‚Ü‚·B** + + 1. ƒm[ƒ}ƒ‹ƒ‚[ƒh‚Å / ‚Æ‚¢‚¤•¶Žš‚ðƒ^ƒCƒv‚µ‚Ü‚·B‰æ–ʈê”Ô‰º‚É : ƒRƒ}ƒ“ƒh‚Æ + “¯‚¶—l‚É / ‚ªŒ»‚ê‚邱‚ƂɋC‚­‚Å‚µ‚傤B + + 2. ‚Å‚ÍA'errroor' ‚ƃ^ƒCƒv‚µ‚Ü‚µ‚傤B‚±‚ꂪŒŸõ‚µ‚½‚¢’PŒê‚Å‚·B + + 3. “¯‚¶Œê‚ð‚à‚¤ˆê“xŒŸõ‚·‚邯‚«‚Í ’P‚É n ‚ðƒ^ƒCƒv‚µ‚Ü‚·B + ‹t•ûŒü‚ÉŒê‹å‚ðŒŸõ‚·‚邯‚«‚Í N ‚ðƒ^ƒCƒv‚µ‚Ü‚·B + + 4. ‹t•ûŒü‚ÉŒê‹å‚ðŒŸõ‚·‚éꇂÍA/ ‚Ì‘ã‚í‚è‚É ? ƒRƒ}ƒ“ƒh‚ðŽg—p‚µ‚Ü‚·B + + 5. Œ³‚Ìꊂɖ߂é‚É‚Í CTRL-O (Ctrl ‚ð‰Ÿ‚µ‘±‚¯‚È‚ª‚ç o •¶Žšƒ^ƒCƒv)‚ðƒ^ƒCƒv‚µ + ‚Ü‚·B‚³‚ç‚É–ß‚é‚ɂ͂±‚ê‚ðŒJ‚è•Ô‚µ‚Ü‚·BCTRL-I ‚Í‘O•ûŒü‚Å‚·B + +Note: "errroor" ‚Í error ‚ƃXƒyƒ‹‚ªˆá‚¢‚Ü‚·; errroor ‚Í‚¢‚í‚ä‚é error ‚Å‚·B +Note: ŒŸõ‚ªƒtƒ@ƒCƒ‹‚ÌI‚í‚è‚É’B‚·‚邯AƒIƒvƒVƒ‡ƒ“ 'wrapscan' ‚ªÝ’肳‚ê‚Ä‚¢‚é + ꇂÍAƒtƒ@ƒCƒ‹‚Ìæ“ª‚©‚猟õ‚ð‘±s‚µ‚Ü‚·B + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 4.3: ‘Ήž‚·‚銇ŒÊ‚ðŒŸõ + + + ** ‘Ήž‚·‚é ),] ‚â } ‚ðŒŸõ‚·‚é‚É‚Í % ‚ðƒ^ƒCƒv‚µ‚Ü‚· ** + + 1. ‰º‚Ì ---> ‚ÅŽ¦‚³‚ꂽs‚Å (,[ ‚© { ‚̂ǂꂩ‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚µ‚傤B + + 2. ‚»‚±‚Å % ‚ƃ^ƒCƒv‚µ‚Ü‚µ‚傤B + + 3. ƒJ[ƒ\ƒ‹‚͑Ήž‚·‚銇ŒÊ‚Ɉړ®‚·‚é‚Í‚¸‚Å‚·B + + 4. ʼn‚ÌŠ‡ŒÊ‚Ɉړ®‚·‚é‚É‚Í % ‚ƃ^ƒCƒv‚µ‚Ü‚µ‚傤B + + 5. ‘¼‚Ì (,),[,],{ or } ‚ŃJ[ƒ\ƒ‹‚ðˆÚ“®‚µA% ‚ª‰½‚ð‚µ‚Ä‚¢‚é‚©Šm”F‚µ‚Ü‚µ‚傤B + +---> This ( is a test line with ('s, ['s ] and {'s } in it. )) + + +NOTE: ‚±‚Ì‹@”\‚ÍŠ‡ŒÊ‚ªˆê’v‚µ‚Ä‚¢‚È‚¢ƒvƒƒOƒ‰ƒ€‚ðƒfƒoƒbƒO‚·‚é‚̂ɂƂĂà–ð—§‚¿ + ‚Ü‚·B + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 4.4: ŠÔˆá‚¢‚ð•ÏX‚·‚é•û–@ + + + ** 'old' ‚ð 'new' ‚É’uŠ·‚·‚é‚É‚Í :s/old/new/g ‚ƃ^ƒCƒv‚µ‚Ü‚· ** + + 1. ˆÈ‰º‚Ì ---> ‚ÆŽ¦‚³‚ꂽs‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚µ‚傤B + + 2. :s/thee/the ‚ƃ^ƒCƒv‚µ‚Ü‚µ‚傤B‚±‚̃Rƒ}ƒ“ƒh‚Í‚»‚Ìs‚Åʼn‚ÉŒ© + ‚‚©‚Á‚½‚à‚̂ɂ¾‚¯s‚È‚í‚ê‚邱‚ƂɋC‚ð‚‚¯‚Ü‚µ‚傤B + + 3. ‚Å‚Í :s/thee/the/g ‚ƃ^ƒCƒv‚µ‚Ü‚µ‚傤Bs‘S‘Ì‚ð’uŠ·‚·‚邱‚Æ‚ðˆÓ–¡‚µ‚Ü‚·B + ‚±‚Ì•ÏX‚Í‚»‚Ìs‚ÅŒ©‚‚©‚Á‚½‘S‚Ẳӊ‚ɑ΂µ‚Äs‚È‚í‚ê‚Ü‚·B + +---> thee best time to see thee flowers is in thee spring. + + 4. •¡”s‚©‚猩‚‚©‚é•¶Žš‚ð•ÏX‚·‚é‚É‚Í + :#,#s/old/new/g #,# ‚ɂ͒u‚«Š·‚¦‚é”͈͂̊JŽn‚ÆI—¹‚Ìs”Ô†‚ðŽw’肵‚Ü + ‚·B + :%s/old/new/g ƒtƒ@ƒCƒ‹‘S‘̂Ō©‚‚©‚é‚à‚̂ɑ΂µ‚Ä•ÏX‚·‚éB + :%s/old/new/gc ƒtƒ@ƒCƒ‹‘S‘̂Ō©‚‚©‚é‚à‚̂ɑ΂µ‚ÄA1‚Â1‚Šm”F‚ð‚Æ‚è‚È + ‚ª‚ç•ÏX‚·‚éB + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 4 —v–ñ + + + 1. CTRL-G ‚̓tƒ@ƒCƒ‹‚ł̈ʒu‚ƃtƒ@ƒCƒ‹‚ÌÚׂð•\ަ‚µ‚Ü‚·B + G ‚̓tƒ@ƒCƒ‹‚Ìʼnºs‚Ɉړ®‚µ‚Ü‚·B + ”’l G ‚Í‚»‚Ìs‚Ɉړ®‚µ‚Ü‚·B + gg ‚Íæ“ªs‚Ɉړ®‚µ‚Ü‚·B + + 2. / ‚ÌŒã‚ÉŒê‹å‚ðƒ^ƒCƒv‚·‚邯‘O•û‚ÉŒê‹å‚ðŒŸõ‚µ‚Ü‚·B + ? ‚ÌŒã‚ÉŒê‹å‚ðƒ^ƒCƒv‚·‚邯Œã•û‚ÉŒê‹å‚ðŒŸõ‚µ‚Ü‚·B + ŒŸõ‚ÌŒã‚Ì n ‚Í“¯‚¶•ûŒü‚ÌŽŸ‚ÌŒŸõ‚ðAN ‚Í‹t•ûŒü‚ÌŒŸõ‚ð‚µ‚Ü‚·B + CTRL-O ‚Íꊂð‘O‚ɈڂµACTRL-I ‚ÍêŠ‚ðŽŸ‚ÉˆÚ“®‚µ‚Ü‚·B + + 3. (,),[,],{, ‚à‚µ‚­‚Í } ã‚ɃJ[ƒ\ƒ‹‚ª‚ ‚éó‘Ô‚Å % ‚ðƒ^ƒCƒv‚·‚邯‘΂ɂȂ镶 + Žš‚ÖˆÚ“®‚µ‚Ü‚·B + + 4. Œ»Ýs‚Ìʼn‚Ì old ‚ð new ‚É’uŠ·‚·‚éB :s/old/new + Œ»Ýs‚Ì‘S‚Ä‚Ì old ‚ð new ‚É’uŠ·‚·‚éB :s/old/new/g + 2‚Â‚Ì # ŠÔ‚ÅŒê‹å‚ð’uŠ·‚·‚éB :#,#s/old/new/g + ƒtƒ@ƒCƒ‹‚Ì’†‚Ì‘S‚Ă̌ŸõŒê‹å‚ð’uŠ·‚·‚éB :%s/old/new/g + 'c' ‚ð‰Á‚¦‚邯’uŠ·‚Ì“x‚ÉŠm”F‚ð‹‚ß‚éB :%s/old/new/gc + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 5.1: ŠO•”ƒRƒ}ƒ“ƒh‚ðŽÀs‚·‚é•û–@ + + + ** :! ‚ÌŒã‚ÉŽÀs‚·‚éŠO•”ƒRƒ}ƒ“ƒh‚ðƒ^ƒCƒv‚µ‚Ü‚· ** + + 1. ‰æ–Ê‚Ìʼnº•”‚ɃJ[ƒ\ƒ‹‚ªˆÚ“®‚·‚邿‚¤Aе‚êe‚µ‚ñ‚¾ : ‚ðƒ^ƒCƒv‚µ‚Ü‚µ‚傤B + ‚±‚ê‚ŃRƒ}ƒ“ƒh‚ªƒ^ƒCƒv‚Å‚«‚é—l‚ɂȂè‚Ü‚·B + + 2. ‚±‚±‚Å ! ‚Æ‚¢‚¤•¶Žš(Š´’Q•„)‚ðƒ^ƒCƒv‚µ‚Ü‚µ‚傤B + ‚±‚ê‚ÅŠO•”ƒVƒFƒ‹ƒRƒ}ƒ“ƒh‚ªŽÀs‚Å‚«‚é—l‚ɂȂè‚Ü‚·B + + 3. —á‚Æ‚µ‚Ä ! ‚É‘±‚¯‚Ä ls ‚ƃ^ƒCƒv‚µ ‚ð‰Ÿ‚µ‚Ü‚µ‚傤B + ƒVƒFƒ‹ƒvƒƒ“ƒvƒg‚̂悤‚ɃfƒBƒŒƒNƒgƒŠ‚̈ꗗ‚ª•\ަ‚³‚ê‚é‚Í‚¸‚Å‚·B + ‚à‚µ‚­‚Í ls ‚ª“®‚©‚È‚¢‚È‚ç‚Î :!dir ‚ðŽg—p‚µ‚Ü‚µ‚傤B + +Note: ‚±‚Ì•û–@‚É‚æ‚Á‚Ä‚ ‚ç‚ä‚éƒRƒ}ƒ“ƒh‚ªŽÀs‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B‚à‚¿‚ë‚ñˆø” + ‚à—^‚¦‚ç‚ê‚Ü‚·B + +Note: ‘S‚Ä‚Ì : ƒRƒ}ƒ“ƒh‚Í ‚ð‰Ÿ‚µ‚ÄI—¹‚µ‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB + ˆÈ~‚ł͂±‚Ì‚±‚ƂɌ¾‹y‚µ‚Ü‚¹‚ñB + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 5.2: ‚»‚Ì‘¼‚̃tƒ@ƒCƒ‹‚Ö‘‚«ž‚Ý + + + ** ƒtƒ@ƒCƒ‹‚Ö•ÏX‚ð•Û‘¶‚·‚é‚É‚Í :w ƒtƒ@ƒCƒ‹–¼ ‚ƃ^ƒCƒv‚µ‚Ü‚· ** + + 1. ƒfƒBƒŒƒNƒgƒŠ‚̈ꗗ‚𓾂邽‚ß‚É :!dir ‚à‚µ‚­‚Í :!ls ‚ƃ^ƒCƒv‚µ‚Ü‚µ‚傤B + ‚±‚Ì‚ ‚Æ ‚ð‰Ÿ‚·‚̂͊ù‚É‚²‘¶’m‚Å‚·‚ËB + + 2. TEST ‚̂悤‚ÉA‚»‚̃fƒBƒŒƒNƒgƒŠ‚É–³‚¢ƒtƒ@ƒCƒ‹–¼‚ðˆê‚‘I‚т܂·B + + 3. ‚Å‚Í :w TEST ‚ƃ^ƒCƒv‚µ‚Ü‚µ‚傤 (TEST ‚ÍA‘I‚ñ‚¾ƒtƒ@ƒCƒ‹–¼‚Å‚·)B + + 4. ‚±‚ê‚É‚æ‚èƒtƒ@ƒCƒ‹‘S‘Ì‚ª TEST ‚Æ‚¢‚¤–¼‘O‚ŕۑ¶‚³‚ê‚Ü‚·B + ‚à‚¤ˆê“x :!dir ‚à‚µ‚­‚Í !ls ‚ƃ^ƒCƒv‚µ‚ÄŠm”F‚µ‚Ă݂܂µ‚傤B + +Note: ‚±‚±‚Å Vim ‚ðI—¹‚µAƒtƒ@ƒCƒ‹–¼ TEST ‚Æ‹¤‚É‹N“®‚·‚邯A•Û‘¶‚µ‚½Žž‚Ì + ƒ`ƒ…[ƒgƒŠƒAƒ‹‚Ì•¡»‚ª‚Å‚«ã‚ª‚é‚Í‚¸‚Å‚·B + + 5. ‚³‚ç‚ÉAŽŸ‚̂悤‚Ƀ^ƒCƒv‚µ‚ătƒ@ƒCƒ‹‚ðÁ‚µ‚Ü‚µ‚傤(MS-DOS): :!del TEST + ‚à‚µ‚­‚Í(Unix): :!rm TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 5.3: ‘I‘ð‚µ‚½‘‚«ž‚Ý + + +** ƒtƒ@ƒCƒ‹‚̈ʒu‚ð•Û‘¶‚·‚é‚É‚ÍAv ƒ‚[ƒVƒ‡ƒ“‚Æ :w FILENAME ‚ðƒ^ƒCƒv‚µ‚Ü‚·B ** + + 1. ‚±‚Ìs‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚·B + + 2. v ‚ð‰Ÿ‚µAˆÈ‰º‚Ì‘æ5€–ڂɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚·BƒeƒLƒXƒg‚ª‹­’²•\ަ‚³‚ê‚é‚Ì + ‚É’–Ú‚µ‚ĉº‚³‚¢B + + 3. •¶Žš : ‚ð‰Ÿ‚·‚ÆA‰æ–Ê‚Ìʼnº•”‚É :'<,'> ‚ªŒ»‚ê‚Ü‚·B + + 4. w TEST (TESET ‚Í‘¶Ý‚µ‚È‚¢ƒtƒ@ƒCƒ‹–¼)‚ðƒ^ƒCƒv‚µ‚Ü‚·B + Enter ‚ð‰Ÿ‚·‘O‚É :'<,'>w TEST ‚ƂȂÁ‚Ä‚¢‚邱‚Æ‚ðŠm”F‚µ‚ĉº‚³‚¢B + + 5. Vim ‚Í TEST ‚Æ‚¢‚¤ƒtƒ@ƒCƒ‹‚É‘I‘ð‚³‚ê‚½s‚ð‘‚«ž‚Þ‚Å‚µ‚傤B + !dir ‚à‚µ‚­‚Í !ls ‚Å‚»‚ê‚ðŠm”F‚µ‚Ü‚·B + ‚»‚ê‚Í휂µ‚È‚¢‚Å‚¨‚¢‚ĉº‚³‚¢BŽŸ‚̃ŒƒbƒXƒ“‚ÅŽg—p‚µ‚Ü‚·B + +NOTE: v ‚ð‰Ÿ‚·‚ÆAVisual ‘I‘ð‚ªŽn‚Ü‚è‚Ü‚·BƒJ[ƒ\ƒ‹‚ð“®‚©‚·‚±‚Æ‚ÅA‘I‘ð”͈͂ð + ‘å‚«‚­‚ଂ³‚­‚à‚Å‚«‚Ü‚·B‚³‚ç‚ÉA‚»‚Ì‘I‘ð”͈͂ɑ΂µ‚ăIƒyƒŒ[ƒ^‚ð“K—p + ‚«‚Ü‚·B—Ⴆ‚Î d ‚̓eƒLƒXƒg‚ð휂µ‚Ü‚·B + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 5.4: ƒtƒ@ƒCƒ‹‚̎枂Ƈ•¹ + + + ** ƒtƒ@ƒCƒ‹‚Ì’†g‚ð‘}“ü‚·‚é‚É‚Í :r ƒtƒ@ƒCƒ‹–¼ ‚ƃ^ƒCƒv‚µ‚Ü‚· ** + + 1. ƒJ[ƒ\ƒ‹‚ðˆÈ‰º‚Ìs‚ɇ‚킹‚Ü‚·B + +NOTE: ƒXƒeƒbƒv 2 ‚ÌŽÀsŒãAƒŒƒbƒXƒ“ 5.3 ‚̃eƒLƒXƒg‚ªŒ»‚ê‚Ü‚·B‰º‚ɉº‚ª‚Á‚Ä‚± + ‚̃ŒƒbƒXƒ“‚Ɉړ®‚µ‚Ü‚µ‚傤B + + 2. ‚Å‚Í TEST ‚Æ‚¢‚¤ƒtƒ@ƒCƒ‹‚ð :r TEST ‚Æ‚¢‚¤ƒRƒ}ƒ“ƒh‚œǂݞ‚݂܂µ‚傤B + ‚±‚±‚Å‚¢‚¤ TEST ‚ÍŽg‚¤ƒtƒ@ƒCƒ‹‚Ì–¼‘O‚Ì‚±‚Ƃł·B + “ǂݞ‚܂ꂽƒtƒ@ƒCƒ‹‚ÍAƒJ[ƒ\ƒ‹s‚̉º‚É‚ ‚è‚Ü‚·B + + 3. Žæž‚ñ‚¾ƒtƒ@ƒCƒ‹‚ðŠm”F‚µ‚Ă݂܂µ‚傤BƒJ[ƒ\ƒ‹‚ð–ß‚·‚ÆAƒŒƒbƒXƒ“5.3 ‚Ì + ƒIƒŠƒWƒiƒ‹‚ƃtƒ@ƒCƒ‹‚É‚æ‚é‚à‚Ì‚Ì2‚‚ª‚ ‚邱‚Æ‚ª‚í‚©‚è‚Ü‚·B + +NOTE: ŠO•”ƒRƒ}ƒ“ƒh‚Ìo—Í‚ð“ǂݞ‚Þ‚±‚Æ‚ào—ˆ‚Ü‚·B—Ⴆ‚ÎA + :r !ls ‚Í ls ƒRƒ}ƒ“ƒh‚Ìo—Í‚ðƒJ[ƒ\ƒ‹ˆÈ‰º‚ɓǂݞ‚݂܂·B + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 5 —v–ñ + + + 1. :!command ‚É‚æ‚Á‚Ä ŠO•”ƒRƒ}ƒ“ƒh‚ðŽÀs‚µ‚Ü‚·B + + ‚æ‚­Žg‚¤—á: + (MS-DOS) (Unix) + :!dir :!ls - ƒfƒBƒŒƒNƒgƒŠ“à‚̈ꗗ‚ðŒ©‚éB + :!del FILENAME :!rm FILENAME - ƒtƒ@ƒCƒ‹‚ð휂·‚éB + + 2. :w ƒtƒ@ƒCƒ‹–¼ ‚É‚æ‚Á‚ătƒ@ƒCƒ‹–¼‚Æ‚¢‚¤ƒtƒ@ƒCƒ‹‚ªƒfƒBƒXƒN‚É‘‚«ž‚Ü‚ê‚éB + + 3. v ƒ‚[ƒVƒ‡ƒ“‚Å :w FILENAME ‚Æ‚·‚邯AƒrƒWƒ…ƒAƒ‹‘I‘ðs‚ªƒtƒ@ƒCƒ‹‚ɕۑ¶‚³ + ‚ê‚éB + + 4. :r ƒtƒ@ƒCƒ‹–¼ ‚É‚æ‚èƒtƒ@ƒCƒ‹–¼‚Æ‚¢‚¤ƒtƒ@ƒCƒ‹‚ªƒfƒBƒXƒN‚æ‚èŽæž‚Ü‚êA + ƒJ[ƒ\ƒ‹ˆÊ’u‚̉º‚É‘}“ü‚³‚ê‚éB + + 5. :r !dir ‚Í dir ƒRƒ}ƒ“ƒh‚Ìo—Í‚ðƒJ[ƒ\ƒ‹ˆÊ’uˆÈ‰º‚ɓǂݞ‚ÞB + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 6.1: ƒI[ƒvƒ“ƒRƒ}ƒ“ƒh + + + ** o ‚ðƒ^ƒCƒv‚·‚邯AƒJ[ƒ\ƒ‹‚̉º‚Ìs‚ªŠJ‚«A‘}“üƒ‚[ƒh‚É“ü‚è‚Ü‚· ** + + 1. ˆÈ‰º‚Ì ---> ‚ÆŽ¦‚³‚ꂽs‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚µ‚傤B + + 2. o (¬•¶Žš) ‚ðƒ^ƒCƒv‚µ‚ÄAƒJ[ƒ\ƒ‹‚̉º‚Ìs‚ðŠJ‚«A‘}“üƒ‚[ƒh‚É“ü‚è‚Ü‚·B + + 3. ‚³‚ç‚É‘}“üƒ‚[ƒh‚ðI—¹‚·‚éˆ×‚É ‚ðƒ^ƒCƒv‚µ‚Ü‚·B + +---> o ‚ðƒ^ƒCƒv‚·‚邯ƒJ[ƒ\ƒ‹‚ÍŠJ‚¢‚½s‚ÖˆÚ“®‚µ‘}“üƒ‚[ƒh‚É“ü‚è‚Ü‚·B + + 4. ƒJ[ƒ\ƒ‹‚Ìã‚Ìs‚É‘}“ü‚·‚é‚É‚ÍA¬•¶Žš‚Ì o ‚ł͂Ȃ­A’Pƒ‚É‘å•¶Žš‚Ì O + ‚ðƒ^ƒCƒv‚µ‚Ü‚·BŽŸ‚Ìs‚ÅŽŽ‚µ‚Ă݂܂µ‚傤B + +---> ‚±‚Ìs‚Ìã‚Ö‘}“ü‚·‚é‚É‚ÍA‚±‚Ìs‚ÖƒJ[ƒ\ƒ‹‚ð’u‚¢‚Ä O ‚ðƒ^ƒCƒv‚µ‚Ü‚·B + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 6.2: ’ljÁƒRƒ}ƒ“ƒh + + + ** ƒJ[ƒ\ƒ‹‚ÌŽŸ‚̈ʒu‚©‚çƒeƒLƒXƒg‚ð’ljÁ‚·‚é‚É‚Í a ‚ƃ^ƒCƒv‚µ‚Ü‚· ** + + 1. ƒJ[ƒ\ƒ‹‚ð ---> ‚ÅŽ¦‚³‚ꂽs‚ÖˆÚ“®‚µ‚Ü‚µ‚傤B + + 2. e ‚ð‰Ÿ‚µ‚Ä li ‚ÌI’[•”‚܂ŃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚·B + + 3. ƒJ[ƒ\ƒ‹‚ÌŒã‚ë‚ɃeƒLƒXƒg‚ð’ljÁ‚·‚邽‚ß‚É a (¬•¶Žš) ‚ðƒ^ƒCƒv‚µ‚Ü‚·B + + 4. ‚»‚̉º‚Ìs‚̂̂悤‚È’PŒê‚ÉŠ®¬‚³‚¹‚Ü‚·B‘}“üƒ‚[ƒh‚𔲂¯‚éˆ×‚É ‚ɉŸ + ‚µ‚Ü‚·B + + 5. e ‚ðŽg‚Á‚ÄŽŸ‚Ì•sŠ®‘S‚È’PŒê‚ÖˆÚ“®‚µAƒXƒeƒbƒv 3 ‚Æ 4 ‚ðŒJ‚è•Ô‚µ‚Ü‚·B + +---> This li will allow you to pract appendi text to a line. +---> This line will allow you to practice appending text to a line. + +Note: a, i ‚Æ A ‚Í“¯‚¶‘}“üƒ‚[ƒh‚ÖˆÚ‚è‚Ü‚·‚ªA•¶Žš‚ª‘}“ü‚³‚ê‚éˆÊ’u‚¾‚¯‚ªˆÙ‚È‚è + ‚Ü‚·B + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 6.3: ‚»‚Ì‘¼‚Ì’uŠ·•û–@ + + + ** 1•¶ŽšˆÈã‚ð’u‚«Š·‚¦‚é‚É‚Í‘å•¶Žš‚Ì R ‚ƃ^ƒCƒv‚µ‚Ü‚µ‚傤 ** + + 1. ˆÈ‰º‚Ì ---> ‚ÆŽ¦‚³‚ꂽs‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚·Bʼn‚Ì xxx ‚Ìæ“ª‚Ɉړ®‚µ + ‚Ü‚·B + + 2. R ‚ð‰Ÿ‚µ‚ÄA2s–Ú‚Ì”’l‚ðƒ^ƒCƒv‚·‚邱‚Æ‚ÅAxxx ‚ª’uŠ·‚³‚ê‚Ü‚·B + + 3. ’uŠ·ƒ‚[ƒh‚𔲂¯‚é‚É‚Í ‚ð‰Ÿ‚µ‚Ü‚·Bs‚ÌŽc‚肪•ÏX‚³‚ê‚Ä‚¢‚È‚¢‚Ü‚Ü‚É + ‚Ȃ邱‚ƂɒˆÓ‚µ‚Ä‚­‚¾‚³‚¢B + + 5. Žc‚Á‚½ xxx ‚ðƒXƒeƒbƒv‚ðŒJ‚è•Ô‚µ‚Ä’uŠ·‚µ‚Ü‚µ‚傤B + +---> Adding 123 to xxx gives you xxx. +---> Adding 123 to 456 gives you 579. + +NOTE: ’uŠ·ƒ‚[ƒh‚Í‘}“üƒ‚[ƒh‚ÉŽ—‚Ä‚¢‚Ü‚·‚ªA‘S‚Ẵ^ƒCƒv‚³‚ꂽ•¶Žš‚ÍŠù‘¶‚Ì•¶Žš + ‚ð휂µ‚Ü‚·B + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 6.4: ƒeƒLƒXƒg‚̃Rƒs[‚ƃy[ƒXƒg + + + ** ƒeƒLƒXƒg‚̃Rƒs[‚ɂ̓IƒyƒŒ[ƒ^ y ‚ðAƒy[ƒXƒg‚É‚Í p ‚ðŽg‚¢‚Ü‚· ** + + 1. ---> ‚ÆŽ¦‚³‚ꂽs‚ÖˆÚ“®‚µAƒJ[ƒ\ƒ‹‚ð "a)" ‚ÌŒã‚É’u‚¢‚Ä‚¨‚«‚Ü‚·B + + 2. v ‚ŃrƒWƒ…ƒAƒ‹ƒ‚[ƒh‚ðŠJŽn‚µA"first"‚ÌŽè‘O‚܂ŃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚·B + + 3. y ‚ðƒ^ƒCƒv‚µ‚Ä‹­’²•\ަ‚³‚ꂽƒeƒLƒXƒg‚ð yank (ƒRƒs[)‚µ‚Ü‚·B + + 4. ŽŸ‚Ìs‚Ìs––‚܂ŃJ[ƒ\ƒ‹‚ðˆÚ“®‚µ‚Ü‚·: j$ + + 5. p ‚ð‰Ÿ‚µ‚Ä“\‚è•t‚¯(put)‚Ä‚©‚çAŽŸ‚ðƒ^ƒCƒv‚µ‚Ü‚·: a second + + 6. ƒrƒWƒ…ƒAƒ‹ƒ‚[ƒh‚Å " item." ‚ð‘I‘ð‚µAy ‚Ń„ƒ“ƒNAŽŸ‚Ìs‚Ìs––‚܂Šj$ ‚Å + ˆÚ“®‚µA p ‚ŃeƒLƒXƒg‚ð‚»‚±‚É put ‚µ‚Ü‚·B + +---> a) this is the first item. + b) + + Note: ’PŒê‚ð1‚ yank ‚·‚é‚Ì‚É y ‚ðƒIƒyƒŒ[ƒ^‚Æ‚µ‚Ä yw ‚Æ‚·‚邱‚Æ‚ào—ˆ‚Ü‚·B +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 6.5: ƒIƒvƒVƒ‡ƒ“‚ÌÝ’è + + + ** ŒŸõ‚â’uŠ·‚ÌÛ‚É‘å•¶Žš/¬•¶Žš‚𖳎‹‚·‚é‚É‚ÍAƒIƒvƒVƒ‡ƒ“‚ðݒ肵‚Ü‚· ** + + 1. ŽŸ‚Ì—l‚É“ü—Í‚µ‚Ä 'ignore' ‚ðŒŸõ‚µ‚Ü‚µ‚傤: /ignore + n ‚ð‰Ÿ‚µ‚ĉ½“x‚©ŒŸõ‚ðŒJ‚è•Ô‚µ‚Ü‚·B + + 2. ŽŸ‚Ì—l‚É“ü—Í‚µ‚Ä 'ic' (Ignore Case ‚Ì—ª) ƒIƒvƒVƒ‡ƒ“‚ðݒ肵‚Ü‚·: :set ic + + 3. ‚Å‚Í n ‚É‚æ‚Á‚Ä‚à‚¤1“x 'ignore' ‚ðŒŸõ‚µ‚Ü‚·B + n ‚ð‰Ÿ‚µ‚Ä‚³‚ç‚É”‰ñŒŸõ‚ðŒJ‚è•Ô‚µ‚Ü‚µ‚傤B + + 4. 'hlsearch' ‚Æ 'incsearch' ƒIƒvƒVƒ‡ƒ“‚ðݒ肵‚Ü‚µ‚傤: :set hls is + + 5. ŒŸõƒRƒ}ƒ“ƒh‚ðÄ“ü—Í‚µ‚ÄA‰½‚ª‹N‚±‚é‚©Œ©‚Ă݂܂µ‚傤: /ignore + + 6. ‘å•¶Žš¬•¶Žš‚Ì‹æ•ʂ𖳌ø‚É‚·‚é‚ɂ͎Ÿ‚Ì—l‚É“ü—Í‚µ‚Ü‚·: :set noic + +Note: ƒ}ƒbƒ`‚Ì‹­’²•\ަ‚ð‚â‚ß‚é‚ɂ͎Ÿ‚Ì—l‚É“ü—Í‚µ‚Ü‚·: :nohlsearch +Note: 1‚‚̌ŸõƒRƒ}ƒ“ƒh‚¾‚¯‘å•¶Žš¬•¶Žš‚Ì‹æ•Ê‚ð‚â‚ß‚½‚¢‚È‚ç‚ÎAƒtƒŒ[ƒY‚É \c + ‚ðŽg—p‚µ‚Ü‚·: /ignore\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 6 —v–ñ + + 1. o ‚ðƒ^ƒCƒv‚·‚邯ƒJ[ƒ\ƒ‹‚̉º‚Ìs‚ðŠJ‚¯‚ÄA‚»‚±‚Å‘}“üƒ‚[ƒh‚ɂȂéB + O (‘å•¶Žš) ‚ðƒ^ƒCƒv‚·‚邯ƒJ[ƒ\ƒ‹‚Ìã‚Ìs‚Å‘}“üƒ‚[ƒh‚ɂȂéB + + 2. ƒJ[ƒ\ƒ‹ã‚Ì•¶Žš‚ÌŽŸ‚©‚çƒeƒLƒXƒg‚ð’ljÁ‚·‚é‚É‚Í a ‚ƃ^ƒCƒv‚·‚éB + s––‚ÉŽ©“®‚ŃeƒLƒXƒg‚ð‘}“ü‚·‚é‚É‚Í‘å•¶Žš A ‚ðƒ^ƒCƒv‚·‚éB + + 3. e ƒRƒ}ƒ“ƒh‚Í’PŒê‚ÌI’[•”ƒJ[ƒ\ƒ‹‚ðˆÚ“®‚·‚éB + + 4. y ƒIƒyƒŒ[ƒ^‚̓eƒLƒXƒg‚ð yank (ƒRƒs[)‚µAp ‚Í‚»‚ê‚ð put (ƒy[ƒXƒg)‚·‚éB + + 5. ‘å•¶Žš‚Ì R ‚ðƒ^ƒCƒv‚·‚邯’uŠ·ƒ‚[ƒh‚É“ü‚èA‚ð‰Ÿ‚·‚Æ”²‚¯‚éB + + 6. ":set xxx" ‚ƃ^ƒCƒv‚·‚邯ƒIƒvƒVƒ‡ƒ“ "xxx" ‚ªÝ’肳‚ê‚éB + 'ic' 'ignorecase' ŒŸõŽž‚É‘å•¶Žš¬•¶Žš‚Ì‹æ•Ê‚µ‚È‚¢ + 'is' 'incsearch' ŒŸõƒtƒŒ[ƒY‚É•”•ªƒ}ƒbƒ`‚µ‚Ä‚¢‚é•”•ª‚ð•\ަ‚·‚é + 'hls' 'hlsearch' ƒ}ƒbƒ`‚·‚é‚·‚×‚ð‹­’²•\ަ‚·‚é + ’·‚¢•ûA’Z‚¢•ûA‚Ç‚¿‚ç‚̃IƒvƒVƒ‡ƒ“–¼‚Å‚àŽg—p‚Å‚«‚Ü‚·B + + 7. "no" ‚ð•t—^‚µAƒIƒvƒVƒ‡ƒ“‚𖳌ø‚É‚µ‚Ü‚·: :set noic + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 7.1: ƒIƒ“ƒ‰ƒCƒ“ƒwƒ‹ƒvƒRƒ}ƒ“ƒh + + + ** ƒIƒ“ƒ‰ƒCƒ“ƒwƒ‹ƒv‚ðŽg—p‚µ‚Ü‚µ‚傤 ** + + Vim ‚É‚ÍL”͂ɂ킽‚éƒIƒ“ƒ‰ƒCƒ“ƒwƒ‹ƒvƒVƒXƒeƒ€‚ª‚ ‚è‚Ü‚·B + ƒwƒ‹ƒv‚ðŠJŽn‚·‚é‚É‚ÍA‚±‚ê‚ç3‚‚̂ǂꂩ1‚Â‚ðŽŽ‚µ‚Ă݂܂µ‚傤: + - ƒwƒ‹ƒvƒL[ ‚ð‰Ÿ‚·(‚à‚µ‚ ‚é‚È‚ç‚Î)B + - ƒL[‚ð‰Ÿ‚·(‚à‚µ‚ ‚é‚È‚ç‚Î)B + - :help ‚ƃ^ƒCƒv‚·‚éB + + ƒwƒ‹ƒvƒEƒBƒ“ƒhƒE‚̃eƒLƒXƒg‚ð“ǂނÆAƒwƒ‹ƒv‚Ì“®ì‚ª—‰ð‚Å‚«‚Ü‚·B + CTRL-W CTRL-W ‚ƃ^ƒCƒv‚·‚邯 ƒwƒ‹ƒvƒEƒBƒ“ƒhƒE‚ÖƒWƒƒƒ“ƒv‚µ‚Ü‚·B + :q ‚ƃ^ƒCƒv‚·‚邯 ƒwƒ‹ƒvƒEƒBƒ“ƒhƒE‚ª•‚¶‚ç‚ê‚Ü‚·B + + ":help" ƒRƒ}ƒ“ƒh‚Ɉø”‚ð—^‚¦‚邱‚Ƃɂæ‚èA‚ ‚ç‚ä‚é‘è–¼‚̃wƒ‹ƒv‚ðŒ©‚Â‚¯‚邱‚Æ + ‚ª‚Å‚«‚Ü‚·B‚±‚ê‚ç‚ðŽŽ‚µ‚Ă݂܂µ‚傤( ‚ðƒ^ƒCƒv‚µ–Y‚ê‚È‚¢‚悤‚É): + + :help w + :help c_ ‚ŃRƒ}ƒ“ƒhƒ‰ƒCƒ“‚ð•⊮‚·‚é ** + + 1. ƒRƒ“ƒpƒ`ƒ‚[ƒh‚łȂ¢‚±‚Æ‚ðŠm”F‚µ‚Ü‚·: :set nocp + + 2. Œ»Ý‚̃fƒBƒŒƒNƒgƒŠ‚ÉÝ‚éƒtƒ@ƒCƒ‹‚ð :!ls ‚© :!dir ‚ÅŠm”F‚µ‚Ü‚·B + + 3. ƒRƒ}ƒ“ƒh‚ÌŠJŽn‚ðƒ^ƒCƒv‚µ‚Ü‚·: :e + + 4. CTRL-D ‚ð‰Ÿ‚·‚Æ Vim ‚Í "e" ‚©‚çŽn‚Ü‚éƒRƒ}ƒ“ƒh‚̈ꗗ‚ð•\ަ‚µ‚Ü‚·B + + 5. ‚ð‰Ÿ‚·‚Æ Vim ‚Í ":edit" ‚Æ‚¢‚¤ƒRƒ}ƒ“ƒh–¼‚ð•⊮‚µ‚Ü‚·B + + 6. ‚³‚ç‚ɋ󔒂ÆAŠù‘¶‚̃tƒ@ƒCƒ‹–¼‚ÌŽn‚Ü‚è‚ð‰Á‚¦‚Ü‚·: :edit FIL + + 7. ‚ð‰Ÿ‚·‚Æ Vim ‚Í–¼‘O‚ð•⊮‚µ‚Ü‚·B(‚à‚µˆê‚‚µ‚©–³‚©‚Á‚½ê‡) + +NOTE: •⊮‚Í‘½‚­‚̃Rƒ}ƒ“ƒh‚Å“®ì‚µ‚Ü‚·B‚»‚µ‚Ä CTRL-D ‚Æ ‰Ÿ‚µ‚Ă݂Ă­‚¾ + ‚³‚¢B“Á‚É :help ‚ÌÛ‚É–ð—§‚¿‚Ü‚·B + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ƒŒƒbƒXƒ“ 7 —v–ñ + + + 1. ƒwƒ‹ƒvƒEƒBƒ“ƒhƒE‚ðŠJ‚­‚É‚Í :help ‚Æ‚·‚é‚© ‚à‚µ‚­‚Í ‚ð‰Ÿ‚·B + + 2. ƒRƒ}ƒ“ƒh(cmd)‚̃wƒ‹ƒv‚ðŒŸõ‚·‚é‚É‚Í :help cmd ‚ƃ^ƒCƒv‚·‚éB + + 3. •ʂ̃EƒBƒ“ƒhƒE‚ÖƒWƒƒƒ“ƒv‚·‚é‚É‚Í CTRL-W CTRL-W ‚ƃ^ƒCƒv‚·‚éB + + 4. ƒwƒ‹ƒvƒEƒBƒ“ƒhƒE‚ð•‚¶‚é‚É‚Í :q ‚ƃ^ƒCƒv‚·‚éB + + 5. ‚¨D‚Ý‚ÌÝ’è‚ð•Û‚Â‚É‚Í vimrc ‹N“®ƒXƒNƒŠƒvƒg‚ð쬂·‚éB + + 6. : command ‚ʼn”\‚ȕ⊮‚ðŒ©‚é‚É‚Í CTRL-D ‚ðƒ^ƒCƒv‚·‚éB + •⊮‚ðŽg—p‚·‚é‚É‚Í ‚ð‰Ÿ‚·B + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + ‚±‚ê‚É‚Ä Vim ‚̃`ƒ…[ƒgƒŠƒAƒ‹‚ðI‚í‚è‚Ü‚·BƒGƒfƒBƒ^‚ðŠÈ’P‚ÉA‚µ‚©‚à[•ª‚É + Žg‚¤‚±‚Æ‚ª‚Å‚«‚邿‚¤‚É‚ÆAVim ‚ÌŽ‚ŠT”O‚Ì—v“_‚݂̂ð“`‚¦‚悤‚Æ‚µ‚Ü‚µ‚½B + Vim ‚ɂ͂³‚ç‚É‘½‚­‚̃Rƒ}ƒ“ƒh‚ª‚ ‚èA‚±‚±‚Å‘S‚Ä‚ðà–¾‚·‚邱‚Ƃ͂ł«‚Ü‚¹‚ñB + ˆÈ~‚̓†[ƒUƒ}ƒjƒ…ƒAƒ‹‚ðŽQÆ‚­‚¾‚³‚¢: "help :user-manual" + + ‚±‚êˆÈŒã‚ÌŠwK‚Ì‚½‚ß‚ÉAŽŸ‚Ì–{‚ð„‘E‚µ‚Ü‚·B + Vim - Vi Improved - by Steve Oualline + o”ÅŽÐ: New Riders + ʼn‚Ì–{‚ÍŠ®‘S‚É Vim ‚Ì‚½‚߂ɑ‚©‚ê‚Ü‚µ‚½B‚Æ‚è‚킯‰SŽÒ‚ɂ͂¨§‚߂ł·B + ‘½‚­‚Ì—á‘è‚â}”Å‚ªŒfÚ‚³‚ê‚Ä‚¢‚Ü‚·B + ŽŸ‚ÌURL‚ðŽQÆ‚µ‚ĉº‚³‚¢ http://iccf-holland.org/click5.html + + ŽŸ‚Í Vim ‚æ‚è‚à Vi ‚ɂ‚¢‚Ä‘‚©‚ꂽŒÃ‚¢–{‚Å‚·‚ª„‘E‚µ‚Ü‚·: + Learning the Vi Editor - by Linda Lamb + o”ÅŽÐ: O'Reilly & Associates Inc. + Vi ‚Å‚â‚肽‚¢‚ÆŽv‚¤‚±‚ƂقڑS‚Ä‚ð’m‚邱‚Æ‚ª‚Å‚«‚é—Ç‘‚Å‚·B + ‘æ6”łłÍAVim ‚ɂ‚¢‚Ä‚Ìî•ñ‚àŠÜ‚Ü‚ê‚Ä‚¢‚Ü‚·B + + ‚±‚̃`ƒ…[ƒgƒŠƒAƒ‹‚Í Colorado State University ‚Ì Charles Smith ‚̃AƒCƒfƒA + ‚ðŠî‚ÉAColorado School of Mines ‚Ì Michael C. Pierce ‚Æ Robert K. Ware ‚Ì + —¼–¼‚É‚æ‚Á‚Ä‘‚©‚ê‚Ü‚µ‚½B E-mail: bware@mines.colorado.edu. + + Modified for Vim by Bram Moolenaar. + + “ú–{Œê–ó ¼–{ ‘×O + ŠÄC ‘º‰ª ‘¾˜Y + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + vi:set ts=8 sts=4 sw=4 tw=78: diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.ja.utf-8 b/vim/bundle/ubuntu-vim72/tutor/tutor.ja.utf-8 new file mode 100644 index 0000000..95e108e --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.ja.utf-8 @@ -0,0 +1,975 @@ +=============================================================================== += V I M æ•™ 本 (ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«) 㸠よ ㆠ㓠ã - Version 1.7 = +=============================================================================== + + Vim ã¯ã€ã“ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã§èª¬æ˜Žã™ã‚‹ã«ã¯å¤šã™ãŽã‚‹ç¨‹ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’å‚™ãˆãŸéžå¸¸ + ã«å¼·åŠ›ãªã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§ã™ã€‚ã“ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã¯ã€ã‚ãªãŸãŒ Vim を万能エディ + ターã¨ã—ã¦ä½¿ã„ã“ãªã›ã‚‹ã‚ˆã†ã«ãªã‚‹ã®ã«å分ãªã‚³ãƒžãƒ³ãƒ‰ã«ã¤ã„ã¦èª¬æ˜Žã‚’ã™ã‚‹ã‚ˆã† + ãªã£ã¦ã„ã¾ã™ã€‚ + + ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã‚’完了ã™ã‚‹ã®ã«å¿…è¦ãªæ™‚é–“ã¯ã€è¦šãˆãŸã‚³ãƒžãƒ³ãƒ‰ã‚’試ã™ã®ã«ã©ã‚Œã  + ã‘æ™‚間を使ã†ã®ã‹ã«ã‚‚よりã¾ã™ãŒã€ãŠã‚ˆã25ã‹ã‚‰30分ã§ã™ã€‚ + + ATTENTION: + 以下ã®ç·´ç¿’用コマンドã«ã¯ã“ã®æ–‡ç« ã‚’変更ã™ã‚‹ã‚‚ã®ã‚‚ã‚りã¾ã™ã€‚ç·´ç¿’ã‚’å§‹ã‚ã‚‹å‰ + ã«ã‚³ãƒ”ーを作æˆã—ã¾ã—ょã†("vimtutor"ã—ãŸãªã‚‰ã°ã€æ—¢ã«ã‚³ãƒ”ーã•れã¦ã„ã¾ã™)。 + + ã“ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ãŒã€ä½¿ã†ã“ã¨ã§è¦šãˆã‚‰ã‚Œã‚‹ä»•組ã¿ã«ãªã£ã¦ã„ã‚‹ã“ã¨ã‚’ã€å¿ƒã— + ã¦ãŠã‹ãªã‘れã°ãªã‚Šã¾ã›ã‚“。正ã—ã学習ã™ã‚‹ã«ã¯ã‚³ãƒžãƒ³ãƒ‰ã‚’実際ã«è©¦ã•ãªã‘れ㰠+ ãªã‚‰ãªã„ã®ã§ã™ã€‚文章を読んã ã ã‘ãªã‚‰ã°ã€ãã£ã¨å¿˜ã‚Œã¦ã—ã¾ã„ã¾ã™!。 + + ã•ãã€Capsロック(Shift-Lock)ã‚­ãƒ¼ãŒæŠ¼ã•れã¦ã„ãªã„ã“ã¨ã‚’確èªã—ãŸå¾Œã€ç”»é¢ã« + レッスン1.1 ãŒå…¨éƒ¨è¡¨ç¤ºã•れるã¨ã“ã‚ã¾ã§ã€j キーを押ã—ã¦ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ + ã—ょã†ã€‚ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 1.1: カーソルã®ç§»å‹• + + + ** カーソルを移動ã™ã‚‹ã«ã¯ã€ç¤ºã•れる様㫠h,j,k,l を押ã—ã¾ã™ ** + ^ + k ヒント: h キーã¯å·¦æ–¹å‘ã«ç§»å‹•ã—ã¾ã™ã€‚ + < h l > l キーã¯å³æ–¹å‘ã«ç§»å‹•ã—ã¾ã™ã€‚ + j j キーã¯ä¸‹çŸ¢å°ã‚­ãƒ¼ã®ã‚ˆã†ãªã‚­ãƒ¼ã§ã™ã€‚ + v + 1. ç§»å‹•ã«æ…£ã‚Œã‚‹ã¾ã§ã€ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ã§ã‚«ãƒ¼ã‚½ãƒ«ç§»å‹•ã•ã›ã¾ã—ょã†ã€‚ + + 2. 下ã¸ã®ã‚­ãƒ¼(j)を押ã—ã¤ã¥ã‘ã‚‹ã¨ã€é€£ç¶šã—ã¦ç§»å‹•ã§ãã¾ã™ã€‚ + ã“ã‚Œã§æ¬¡ã®ãƒ¬ãƒƒã‚¹ãƒ³ã«ç§»å‹•ã™ã‚‹æ–¹æ³•ãŒã‚ã‹ã‚Šã¾ã—ãŸã­ã€‚ + + 3. 下ã¸ã®ã‚­ãƒ¼ã‚’使ã£ã¦ã€ãƒ¬ãƒƒã‚¹ãƒ³1.2 ã«ç§»å‹•ã—ã¾ã—ょã†ã€‚ + +Note: 何をタイプã—ã¦ã„ã‚‹ã‹åˆ¤ã‚‰ãªããªã£ãŸã‚‰ã€ã‚’押ã—ã¦ãƒŽãƒ¼ãƒžãƒ«ãƒ¢ãƒ¼ãƒ‰ã«ã— + ã¾ã™ã€‚ãれã‹ã‚‰å…¥åŠ›ã—よã†ã¨ã—ã¦ã„ãŸã‚³ãƒžãƒ³ãƒ‰ã‚’å†å…¥åŠ›ã—ã¾ã—ょã†ã€‚ + +Note: カーソルキーã§ã‚‚移動ã§ãã¾ã™ã€‚ã—ã‹ã— hjkl ã«ä¸€åº¦æ…£ã‚Œã¦ã—ã¾ãˆã°ã€ã¯ã‚‹ã‹ + ã«é€Ÿã移動ã™ã‚‹ã“ã¨ãŒã§ãã‚‹ã§ã—ょã†ã€‚ã„やマジã§! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 1.2: VIM ã®èµ·å‹•ã¨çµ‚了 + + + !! NOTE: 以下ã®ã‚らゆるステップを行ã†å‰ã«ã€ã“ã®ãƒ¬ãƒƒã‚¹ãƒ³ã‚’読ã¿ã¾ã—ょã†!! + + 1. キーを押ã—ã¾ã—ょã†ã€‚(確実ã«ãƒŽãƒ¼ãƒžãƒ«ãƒ¢ãƒ¼ãƒ‰ã«ã™ã‚‹ãŸã‚) + + 2. 次ã®ã‚ˆã†ã«ã‚¿ã‚¤ãƒ—: :q! + ã“れã«ã‚ˆã‚Šç·¨é›†ã—ãŸå†…容をä¿å­˜ã›ãšã«ã‚¨ãƒ‡ã‚£ã‚¿ãŒçµ‚了ã—ã¾ã™ã€‚ + + 3. シェルプロンプトãŒå‡ºã¦ããŸã‚‰ã€ã“ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã‚’å§‹ã‚る為ã«ã«ã‚³ãƒžãƒ³ãƒ‰ + をタイプã—ã¾ã™ã€‚ + ãã®ã‚³ãƒžãƒ³ãƒ‰ã¯: vimtutor + + 4. ã“れã¾ã§ã®ã‚¹ãƒ†ãƒƒãƒ—を覚ãˆè‡ªä¿¡ãŒã¤ã„ãŸãªã‚‰ã°ã€ã‚¹ãƒ†ãƒƒãƒ— 1 ã‹ã‚‰ 3 ã¾ã§ã‚’実 + éš›ã«è©¦ã—ã¦ã€Vim ã‚’1度終了ã—ã¦ã‹ã‚‰å†ã³èµ·å‹•ã—ã¾ã—ょã†ã€‚ + +NOTE: :q! ã¯å…¨ã¦ã®å¤‰æ›´ã‚’破棄ã—ã¾ã™ã€‚レッスンã«ã¦å¤‰æ›´ã‚’ファイルã«ä¿ + å­˜ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã‚‚勉強ã—ã¦ã„ãã¾ã—ょã†ã€‚ + + 5. 1.3ã¾ã§ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã•ã›ã¾ã—ょã†ã€‚ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 1.3: テキスト編集 - 削除 + + + ** ノーマルモードã«ã¦ã‚«ãƒ¼ã‚½ãƒ«ã®ä¸‹ã®æ–‡å­—を削除ã™ã‚‹ã«ã¯ x を押ã—ã¾ã™ ** + + 1. 以下㮠---> ã¨ç¤ºã•れãŸè¡Œã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã—ょã†ã€‚ + + 2. é–“é•ã„を修正ã™ã‚‹ãŸã‚ã«ã€å‰Šé™¤ã™ã‚‹æœ€åˆã®æ–‡å­—ã¾ã§ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã™ã€‚ + + 3. ä¸å¿…è¦ãªæ–‡å­—ã‚’ x を押ã—ã¦å‰Šé™¤ã—ã¾ã—ょã†ã€‚ + + 4. æ–‡ãŒæ­£ã—ããªã‚‹ã¾ã§ ステップ 2 ã‹ã‚‰ 4 を繰り返ã—ã¾ã—ょã†ã€‚ + +---> ãã® ã†ã†ã•㎠㯠ã¤ã¤ãã ã‚’ ã“ãˆãˆã¦ã¦ ã¨ã³ã¯ã­ãŸãŸ + + 5. è¡ŒãŒæ­£ã—ããªã£ãŸã‚‰ã€ãƒ¬ãƒƒã‚¹ãƒ³ 1.4 ã¸é€²ã¿ã¾ã—ょã†ã€‚ + +NOTE: å…¨ã¦ã®ãƒ¬ãƒƒã‚¹ãƒ³ã‚’通ã˜ã¦ã€è¦šãˆã‚ˆã†ã¨ã™ã‚‹ã®ã§ã¯ãªã実際ã«ã‚„ã£ã¦ã¿ã¾ã—ょã†ã€‚ + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 1.4: テキスト編集 - 挿入 + + + ** ノーマルモードã«ã¦ãƒ†ã‚­ã‚¹ãƒˆã‚’挿入ã™ã‚‹ã«ã¯ i を押ã—ã¾ã™ ** + + 1. 以下㮠---> ã¨ç¤ºã•ã‚ŒãŸæœ€åˆã®è¡Œã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã—ょã†ã€‚ + + 2. 1行目を2行目ã¨åŒã˜æ§˜ã«ã™ã‚‹ãŸã‚ã«ã€ãƒ†ã‚­ã‚¹ãƒˆã‚’挿入ã—ãªã‘れã°ãªã‚‰ãªã„ä½ç½® + ã®æ¬¡ã®æ–‡å­—ã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã™ã€‚ + + 3. i キーを押ã—ã¦ã‹ã‚‰ã€è¿½åŠ ãŒå¿…è¦ãªæ–‡å­—をタイプã—ã¾ã—ょã†ã€‚ + + 4. é–“é•ã„を修正ã—ãŸã‚‰ を押ã—ã¦ã‚³ãƒžãƒ³ãƒ‰ãƒ¢ãƒ¼ãƒ‰ã«æˆ»ã‚Šã€æ­£ã—ã„æ–‡ã«ãªã‚‹æ§˜ + ã«ã‚¹ãƒ†ãƒƒãƒ— 2 ã‹ã‚‰ 4 を繰り返ã—ã¾ã—ょã†ã€‚ + +---> ã“ã® ã«ã¯ 足りãªã„ テキスト ã‚る。 +---> ã“㮠行 ã«ã¯ å¹¾ã¤ã‹ 足りãªã„ テキスト ㌠ã‚る。 + + 5. æŒ¿å…¥ã®æ–¹æ³•ãŒã‚ã‹ã£ãŸã‚‰ä¸‹ã®ãƒ¬ãƒƒã‚¹ãƒ³1ã®è¦ç´„を見ã¾ã—ょã†ã€‚ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 1.5: テキスト編集 - 追加 + + + ** テキスト追加ã™ã‚‹ã«ã¯ A を押ã—ã¾ã—ょㆠ** + + 1. 以下㮠---> ã¨ç¤ºã•ã‚ŒãŸæœ€åˆã®è¡Œã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã—ょã†ã€‚ + カーソルãŒãã®æ–‡å­—上ã«ã‚ã£ã¦ã‚‚ã‹ã¾ã„ã¾ã›ã‚“。 + + 2. 追加ãŒå¿…è¦ãªå ´æ‰€ã§ A をタイプã—ã¾ã—ょã†ã€‚ + + 3. テキストを追加ã—終ãˆãŸã‚‰ã€ を押ã—ã¦ãƒŽãƒ¼ãƒžãƒ«ãƒ¢ãƒ¼ãƒ‰ã«æˆ»ã‚Šã¾ã—ょã†ã€‚ + + 4. 2行目㮠---> ã¨ç¤ºã•れãŸå ´æ‰€ã¸ç§»å‹•ã—ã€ã‚¹ãƒ†ãƒƒãƒ— 2 ã‹ã‚‰ 3 繰り返ã—ã¦æ–‡æ³•ã‚’ + 修正ã—ã¾ã—ょã†ã€‚ + +---> ã“ã“ã«ã¯é–“é•ã£ãŸãƒ†ã‚­ã‚¹ãƒˆãŒã‚り + ã“ã“ã«ã¯é–“é•ã£ãŸãƒ†ã‚­ã‚¹ãƒˆãŒã‚りã¾ã™ã€‚ +---> ã“ã“ã«ã‚‚é–“é•ã£ãŸãƒ†ã‚­ã‚¹ + ã“ã“ã«ã‚‚é–“é•ã£ãŸãƒ†ã‚­ã‚¹ãƒˆãŒã‚りã¾ã™ã€‚ + + 5. テキストã®è¿½åŠ ãŒè»½å¿«ã«ãªã£ã¦ããŸã‚‰ãƒ¬ãƒƒã‚¹ãƒ³ 1.6 ã¸é€²ã¿ã¾ã—ょã†ã€‚ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 1.6: ファイルã®ç·¨é›† + + + ** ファイルをä¿å­˜ã—ã¦çµ‚了ã™ã‚‹ã«ã¯ :wq ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã™ ** + + !! NOTE: 以下ã®ã‚¹ãƒ†ãƒƒãƒ—を実行ã™ã‚‹å‰ã«ã€ã¾ãšå…¨ä½“を読んã§ãã ã•ã„!! + + 1. レッスン 1.2 ã§ã‚„ã£ãŸã‚ˆã†ã« :q! をタイプã—ã¦ã€ã“ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã‚’終了 + ã—ã¾ã™ã€‚ + + 2. シェルプロンプトã§ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’タイプã—ã¾ã™: vim tutor + 'vim'㌠Vim エディタを起動ã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã€'tutor' ã¯ç·¨é›†ã—ãŸã„ファイル㮠+ åå‰ã§ã™ã€‚変更ã—ã¦ã‚‚よã„ファイルを使ã„ã¾ã—ょã†ã€‚ + + 3. å‰ã®ãƒ¬ãƒƒã‚¹ãƒ³ã§å­¦ã‚“ã ã‚ˆã†ã«ã€ãƒ†ã‚­ã‚¹ãƒˆã‚’挿入ã€å‰Šé™¤ã—ã¾ã™ã€‚ + + 4. 変更をファイルã«ä¿å­˜ã—ã¾ã™: :wq + + 5. vimtutor ã‚’å†åº¦èµ·å‹•ã—ã€ä»¥ä¸‹ã®è¦ç´„ã¸é€²ã¿ã¾ã—ょã†ã€‚ + + 6. 以上ã®ã‚¹ãƒ†ãƒƒãƒ—を読んã§ç†è§£ã—ãŸä¸Šã§ã“れを実行ã—ã¾ã—ょã†ã€‚ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 1 è¦ç´„ + + + 1. カーソルã¯çŸ¢å°ã‚­ãƒ¼ã‚‚ã—ã㯠hjkl キーã§ç§»å‹•ã—ã¾ã™ã€‚ + h (å·¦) j (下) k (上) l (å³) + + 2. Vim ã‚’èµ·å‹•ã™ã‚‹ã«ã¯ãƒ—ロンプトã‹ã‚‰ vim ファイルå ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã™ã€‚ + + 3. Vim を終了ã™ã‚‹ã«ã¯ :q! ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã™(変更を破棄)。 + ã‚‚ã—ã㯠:wq ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã™(変更をä¿å­˜)。 + + 4. カーソルã®ä¸‹ã®æ–‡å­—を削除ã™ã‚‹ã«ã¯ã€ãƒŽãƒ¼ãƒžãƒ«ãƒ¢ãƒ¼ãƒ‰ã§ x ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã™ã€‚ + + 5. カーソルã®ä½ç½®ã«æ–‡å­—を挿入ã™ã‚‹ã«ã¯ã€ãƒŽãƒ¼ãƒžãƒ«ãƒ¢ãƒ¼ãƒ‰ã§ i ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã™ã€‚ + i テキストã®ã‚¿ã‚¤ãƒ— カーソルä½ç½®ã«è¿½åŠ  + A テキストã®è¿½åŠ  行末ã«è¿½åŠ  + +NOTE: キーを押ã™ã¨ãƒŽãƒ¼ãƒžãƒ«ãƒ¢ãƒ¼ãƒ‰ã«ç§»è¡Œã—ã¾ã™ã€‚ãã®éš›ã€é–“é•ã£ãŸã‚Šå…¥åЛ途 + 中ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’å–り消ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã•ã¦ã€ç¶šã‘ã¦ãƒ¬ãƒƒã‚¹ãƒ³ 2 ã‚’å§‹ã‚ã¾ã—ょã†ã€‚ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 2.1: 削除コマンド + + + ** å˜èªžã®æœ«å°¾ã¾ã§ã‚’削除ã™ã‚‹ã«ã¯ dw ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã—ょㆠ** + + 1. ノーマルモードã§ã‚ã‚‹ã“ã¨ã‚’確èªã™ã‚‹ãŸã‚㫠を押ã—ã¾ã—ょã†ã€‚ + + 2. 以下㮠---> ã¨ç¤ºã•れãŸè¡Œã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã—ょã†ã€‚ + + 3. 消ã—ãŸã„å˜èªžã®å…ˆé ­ã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã—ょã†ã€‚ + + 4. å˜èªžã‚’削除ã™ã‚‹ãŸã‚ã« dw ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã—ょã†ã€‚ + + NOTE: タイプã™ã‚‹ã¨ã€dw ã¨ã„ã†æ–‡å­—ãŒã‚¹ã‚¯ãƒªãƒ¼ãƒ³ã®æœ€ä¸‹è¡Œã«ç¾ã‚れã¾ã™ã€‚ + タイプを間é•ã£ã¦ã—ã¾ã£ãŸæ™‚ã«ã¯ を押ã—ã¦ã‚„り直ã—ã¾ã—ょã†ã€‚ + +---> ã“ã® æ–‡ ç´™ ã«ã¯ ã„ãã¤ã‹ã® ãŸã®ã—ã„ å¿…è¦ã®ãªã„ å˜èªž ㌠å«ã¾ã‚Œã¦ ã„ã¾ã™ã€‚ + + 5. 3 ã‹ã‚‰ 4 ã¾ã§ã‚’æ–‡ãŒæ­£ã—ããªã‚‹ã¾ã§ç¹°ã‚Šè¿”ã—ã€ãƒ¬ãƒƒã‚¹ãƒ³ 2.2 ã¸é€²ã¿ã¾ã—ょã†ã€‚ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 2.2: ãã®ä»–ã®å‰Šé™¤ã‚³ãƒžãƒ³ãƒ‰ + + + ** è¡Œã®æœ«å°¾ã¾ã§ã‚’削除ã™ã‚‹ã«ã¯ d$ ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã—ょㆠ** + + 1. ノーマルモードã§ã‚ã‚‹ã“ã¨ã‚’確èªã™ã‚‹ã®ã« を押ã—ã¾ã—ょã†ã€‚ + + 2. 以下㮠---> ã¨ç¤ºã•れãŸè¡Œã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã—ょã†ã€‚ + + 3. æ­£ã—ã„æ–‡ã®æœ«å°¾ã¸ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã—ょã†(最åˆã® . ã®å¾Œã§ã™)。 + + 4. 行末ã¾ã§å‰Šé™¤ã™ã‚‹ã®ã« d$ ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã—ょã†ã€‚ + +---> 誰ã‹ãŒã“ã®è¡Œã®æœ€å¾Œã‚’2度タイプã—ã¾ã—ãŸã€‚ 2度タイプã—ã¾ã—ãŸã€‚ + + + 5. ã©ã†ã„ã†ã“ã¨ã‹ç†è§£ã™ã‚‹ãŸã‚ã«ã€ãƒ¬ãƒƒã‚¹ãƒ³ 2.3 ã¸é€²ã¿ã¾ã—ょã†ã€‚ + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 2.3: オペレータã¨ãƒ¢ãƒ¼ã‚·ãƒ§ãƒ³ + + + 多ãã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã‚ªãƒšãƒ¬ãƒ¼ã‚¿ã¨ãƒ¢ãƒ¼ã‚·ãƒ§ãƒ³ã‹ã‚‰ãƒ†ã‚­ã‚¹ãƒˆã«å¤‰æ›´ã‚’加ã¾ã™ã€‚ + 削除コマンド d ã®ã‚ªãƒšãƒ¬ãƒ¼ã‚¿ã¯æ¬¡ã®æ§˜ã«ãªã£ã¦ã„ã¾ã™: + + d モーション + + ãれãžã‚Œ: + d - 削除コマンド。 + モーション - 何ã«å¯¾ã—ã¦åƒãã‹ã‘ã‚‹ã‹(ä»¥ä¸‹ã«æŒ™ã’ã¾ã™)。 + + オペレータã®ä¸€éƒ¨ä¸€è¦§: + w - カーソルä½ç½®ã‹ã‚‰ç©ºç™½ã‚’å«ã‚€å˜èªžã®æœ«å°¾ã¾ã§ã€‚ + e - カーソルä½ç½®ã‹ã‚‰ç©ºç™½ã‚’å«ã¾ãªã„å˜èªžã®æœ«å°¾ã¾ã§ã€‚ + $ - カーソルä½ç½®ã‹ã‚‰è¡Œæœ«ã¾ã§ã€‚ + + ã¤ã¾ã‚Š de ã¨ã‚¿ã‚¤ãƒ—ã™ã‚‹ã¨ã€ã‚«ãƒ¼ã‚½ãƒ«ä½ç½®ã‹ã‚‰å˜èªžã®çµ‚ã‚りã¾ã§ã‚’削除ã—ã¾ã™ã€‚ + +NOTE: 冒険ã—ãŸã„人ã¯ã€ãƒŽãƒ¼ãƒžãƒ«ãƒ¢ãƒ¼ãƒ‰ã«ã¦ã‚³ãƒžãƒ³ãƒ‰ãªã—ã«ãƒ¢ãƒ¼ã‚·ãƒ§ãƒ³ã‚’押ã—㦠+ ã¿ã¾ã—ょã†ã€‚カーソルãŒç›®çš„語一覧ã§ç¤ºã•れるä½ç½®ã«ç§»å‹•ã™ã‚‹ã¯ãšã§ã™ã€‚ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 2.4: モーションã«ã‚«ã‚¦ãƒ³ãƒˆã‚’使用ã™ã‚‹ + + + ** 何回も行ã„ãŸã„繰り返ã—ã®ãƒ¢ãƒ¼ã‚·ãƒ§ãƒ³ã®å‰ã«æ•°å€¤ã‚’タイプã—ã¾ã™ã€‚ ** + + 1. 以下㮠---> ã¨ç¤ºã•れãŸè¡Œã®å…ˆé ­ã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã™ã€‚ + + 2. 2dw をタイプã—ã¦å˜èªž2ã¤åˆ†ç§»å‹•ã—ã¾ã™ã€‚ + + 3. 3e をタイプã—ã¦3ã¤ç›®ã®å˜èªžã®çµ‚端ã«ç§»å‹•ã—ã¾ã™ã€‚ + + 4. 0 (ゼロ)をタイプã—ã¦è¡Œé ­ã«ç§»å‹•ã—ã¾ã™ã€‚ + + 5. ステップ 2 㨠3 ã‚’é•ã†æ•°å€¤ã¨ä½¿ã£ã¦ç¹°ã‚Šè¿”ã—ã¾ã™ã€‚ + +---> This is just a line with words you can move around in. + + 6. レッスン 2.5 ã«é€²ã¿ã¾ã—ょã†ã€‚ + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 2.5: より多ãを削除ã™ã‚‹ãŸã‚ã«ã‚«ã‚¦ãƒ³ãƒˆã‚’使用ã™ã‚‹ + + + ** オペレータã¨ã‚«ã‚¦ãƒ³ãƒˆã‚’タイプã™ã‚‹ã¨ã€ãã®æ“作ãŒè¤‡æ•°å›žç¹°ã‚Šè¿”ã•れã¾ã™ã€‚ ** + + 既述ã®å‰Šé™¤ã®ã‚ªãƒšãƒ¬ãƒ¼ã‚¿ã¨ãƒ¢ãƒ¼ã‚·ãƒ§ãƒ³ã®çµ„ã¿åˆã‚ã›ã«ã‚«ã‚¦ãƒ³ãƒˆã‚’追加ã™ã‚‹ã“ã¨ã§ã€ + より多ãã®å‰Šé™¤ãŒè¡Œãˆã¾ã™: + d 数値 モーション + + 1. ---> ã¨ç¤ºã•れãŸè¡Œã®è¡Œé ­éƒ¨åˆ†ã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã—ょã†ã€‚ + + 2. UPPER CASE ã®å˜èªž2ã¤ã‚’ 2dw ã¨ã‚¿ã‚¤ãƒ—ã—ã¦å‰Šé™¤ã—ã¾ã™ã€‚ + + 3. UPPER CASE ã¨ã„ã†é€£ç¶šã—ãŸå˜èªžã‚’ã€1ã¤ã®ã‚³ãƒžãƒ³ãƒ‰ã¨ç•°ãªã‚‹ã‚«ã‚¦ãƒ³ãƒˆã‚’指定ã—〠+ ステップ 1 㨠2 を繰り返ã—ã¾ã™ã€‚ + +---> ã“ã®ABC DE行ã®FGHI JK LMN OPå˜èªžã¯Q RS TUV綺麗ã«ãªã£ãŸã€‚ + +NOTE: オペレータ d ã¨ãƒ¢ãƒ¼ã‚·ãƒ§ãƒ³ã®é–“ã«ã‚«ã‚¦ãƒ³ãƒˆã‚’使ã£ãŸå ´åˆã€ã‚ªãƒšãƒ¬ãƒ¼ã‚¿ã®ãªã„ + å ´åˆã®ãƒ¢ãƒ¼ã‚·ãƒ§ãƒ³ã®ã‚ˆã†ã«å‹•作ã—ã¾ã™ã€‚ + 例: 3dw 㨠d3w ã¯åŒç­‰ã§ã€3w を削除ã—ã¾ã™ã€‚ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 2.6: è¡Œã®æ“作 + + + ** 行全体を削除ã™ã‚‹ã«ã¯ dd ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã™ ** + + 行全体を削除ã™ã‚‹é »åº¦ãŒå¤šã„ã®ã§ã€Viã®ãƒ‡ã‚¶ã‚¤ãƒŠãƒ¼ã¯è¡Œã®å‰Šé™¤ã‚’ d ã®2回タイプ㨠+ ã„ã†ç°¡å˜ãªã‚‚ã®ã«æ±ºã‚ã¾ã—ãŸã€‚ + + 1. 以下ã®å¥ã®2行目ã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã™ã€‚ + 2. dd ã¨ã‚¿ã‚¤ãƒ—ã—ã¦è¡Œã‚’削除ã—ã¾ã™ã€‚ + 3. ã•らã«4行目ã«ç§»å‹•ã—ã¾ã™ã€‚ + 4. 2dd ã¨ã‚¿ã‚¤ãƒ—ã—ã¦2行を削除ã—ã¾ã™ã€‚ + +---> 1) ãƒãƒ©ã¯èµ¤ã„〠+---> 2) ã¤ã¾ã‚‰ãªã„ã‚‚ã®ã¯æ¥½ã—ã„〠+---> 3) スミレã¯é’ã„〠+---> 4) ç§ã¯è»Šã‚’ã‚‚ã£ã¦ã„る〠+---> 5) æ™‚è¨ˆãŒæ™‚刻を告ã’る〠+---> 6) ç ‚ç³–ã¯ç”˜ã„ +---> 7) オマエモナー + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 2.7: やり直ã—コマンド + + + ** 最後ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’å–り消ã™ã«ã¯ u を押ã—ã¾ã™ã€‚U ã¯è¡Œå…¨ä½“ã®å–消ã§ã™ã€‚ ** + + 1. 以下㮠---> ã¨ç¤ºã•れãŸè¡Œã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã€æœ€åˆã®é–“é•ã„ã«ã‚«ãƒ¼ã‚½ + ルを移動ã—ã¾ã—ょã†ã€‚ + 2. x をタイプã—ã¦ã„らãªã„å…ˆé ­ã®æ–‡å­—を削除ã—ã¾ã—ょã†ã€‚ + 3. ã•ãã€u をタイプã—ã¦æœ€å¾Œã«å®Ÿè¡Œã—ãŸã‚³ãƒžãƒ³ãƒ‰ã‚’å–り消ã—ã¾ã—ょã†ã€‚ + 4. 今度ã¯ã€x を使用ã—ã¦èª¤ã‚Šã‚’å…¨ã¦ä¿®æ­£ã—ã¾ã—ょã†ã€‚ + 5. 大文字㮠U をタイプã—ã¦ã€è¡Œã‚’å…ƒã®çŠ¶æ…‹ã«æˆ»ã—ã¾ã—ょã†ã€‚ + 6. u をタイプã—ã¦ç›´å‰ã® U ã‚³ãƒžãƒ³ãƒ‰ã‚’å–æ¶ˆã—ã¾ã—ょã†ã€‚ + 7. ã§ã¯ã‚³ãƒžãƒ³ãƒ‰ã‚’å†å®Ÿè¡Œã™ã‚‹ã®ã« CTRL-R (CTRL を押ã—ãŸã¾ã¾ R を打ã¤)を数回 + タイプã—ã¦ã¿ã¾ã—ょã†(å–æ¶ˆã®å–消)。 + +---> ã“ã®ã®è¡Œã®ã®é–“é•ã„を修正々ã—ã€å¾Œã§ãれらã®ä¿®æ­£ã‚’ã‚’å–æ¶ˆã—ã¾ã¾ã™ã™ã€‚ + + 8. ã“れã¯ã¨ã¦ã‚‚便利ãªã‚³ãƒžãƒ³ãƒ‰ã§ã™ã€‚ã•ãレッスン 2 è¦ç´„ã¸é€²ã¿ã¾ã—ょã†ã€‚ + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 2 è¦ç´„ + + + 1. カーソルä½ç½®ã‹ã‚‰å˜èªžã®æœ«å°¾ã¾ã§ã‚’削除ã™ã‚‹ã«ã¯ dw ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã™ã€‚ + 2. カーソルä½ç½®ã‹ã‚‰è¡Œã®æœ«å°¾ã¾ã§ã‚’削除ã™ã‚‹ã«ã¯ d$ ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã™ã€‚ + 3. 行全体を削除ã™ã‚‹ã«ã¯ dd ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã™ã€‚ + + 4. モーションを繰り返ã™ã«ã¯æ•°å€¤ã‚’付与ã—ã¾ã™: 2w + 5. 変更ã«ç”¨ã„るコマンドã®å½¢å¼ã¯ + オペレータ [数値] モーション + + ãれãžã‚Œ: + オペレータ - 削除 d ã®é¡žã§ä½•ã‚’ã™ã‚‹ã‹ã€‚ + 数値 - ãã®ã‚³ãƒžãƒ³ãƒ‰ã‚’何回繰り返ã™ã‹ã€‚ + モーション - w (å˜èªž)ã‚„ $ (行末)ãªã©ã®é¡žã§ã€ãƒ†ã‚­ã‚¹ãƒˆã®ä½•ã«å¯¾ã—ã¦åƒãã‹ + ã‘ã‚‹ã‹ã€‚ + + 6. 行ã®å…ˆé ­ã«ç§»å‹•ã™ã‚‹ã«ã¯ã‚¼ãƒ­ã‚’使用ã—ã¾ã™: 0 + + 7. å‰å›žã®å‹•ä½œã‚’å–æ¶ˆã™: u (å°æ–‡å­— u) + 行全体ã®å¤‰æ›´ã‚’å–æ¶ˆã™: U (大文字 U) + å–æ¶ˆã—ã®å–消ã—: CTRL-R +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 3.1: 貼り付ã‘コマンド + + + ** 最後ã«å‰Šé™¤ã•れãŸè¡Œã‚’カーソルã®å¾Œã«è²¼ã‚Šä»˜ã‘ã‚‹ã«ã¯ p をタイプã—ã¾ã™ ** + + 1. ä»¥ä¸‹ã®æ®µè½ã®æœ€åˆã®è¡Œã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã—ょã†ã€‚ + + 2. dd ã¨ã‚¿ã‚¤ãƒ—ã—ã¦è¡Œã‚’削除ã—ã€Vim ã®ãƒãƒƒãƒ•ã‚¡ã«æ ¼ç´ã—ã¾ã—ょã†ã€‚ + + 3. 削除ã—ãŸè¡ŒãŒæœ¬æ¥ã‚ã‚‹ã¹ãä½ç½®ã®ä¸Šã®è¡Œã¾ã§ã€ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã•ã›ã¾ã—ょã†ã€‚ + + 4. ノーマルモード㧠p をタイプã—ã¦æ ¼ç´ã—ãŸè¡Œã‚’ç”»é¢ã«æˆ»ã—ã¾ã™ã€‚ + + 5. é †ç•ªãŒæ­£ã—ããªã‚‹æ§˜ã«ã‚¹ãƒ†ãƒƒãƒ— 2 ã‹ã‚‰ 4 を繰り返ã—ã¾ã—ょã†ã€‚ + + d) 貴方も学ã¶ã“ã¨ãŒã§ãã‚‹? + b) スミレã¯é’ã„〠+ c) 知æµã¨ã¯å­¦ã¶ã‚‚ã®ã€ + a) ãƒãƒ©ã¯èµ¤ã„〠+ + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 3.2: ç½®ãæ›ãˆã‚³ãƒžãƒ³ãƒ‰ + + + ** カーソルã®ä¸‹ã®æ–‡å­—ã‚’ç½®ãæ›ãˆã‚‹ã«ã¯ r をタイプã—ã¾ã™ ** + + 1. 以下㮠---> ã¨ç¤ºã•ã‚ŒãŸæœ€åˆã®è¡Œã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã—ょã†ã€‚ + + 2. 最åˆã®é–“é•ã„ã®å…ˆé ­ã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã—ょã†ã€‚ + + 3. r ã¨ã‚¿ã‚¤ãƒ—ã—ã€é–“é•ã£ã¦ã„ã‚‹æ–‡å­—ã‚’ç½®ãæ›ãˆã‚‹ã€æ­£ã—ã„æ–‡å­—をタイプã—ã¾ã—ょã†ã€‚ + + 4. 最åˆã®è¡ŒãŒæ­£ã—ããªã‚‹ã¾ã§ã‚¹ãƒ†ãƒƒãƒ— 2 ã‹ã‚‰ 3 を繰り返ã—ã¾ã—ょã†ã€‚ + +---> ã“ã®åˆã‚’人力ã—ãŸæ™‚ã­ã€ãã®äººã¯å¹¾ã¤ã‹å•é•ã£ãŸã‚­ãƒ¼ã‚’押ã—ã‚‚ã—ãŸ! +---> ã“ã®è¡Œã‚’入力ã—ãŸæ™‚ã«ã€ãã®äººã¯å¹¾ã¤ã‹é–“é•ã£ãŸã‚­ãƒ¼ã‚’押ã—ã¾ã—ãŸ! + + 5. ã•ãã€ãƒ¬ãƒƒã‚¹ãƒ³ 3.2 ã¸é€²ã¿ã¾ã—ょã†ã€‚ + +NOTE: 実際ã«è©¦ã—ã¾ã—ょã†ã€‚決ã—ã¦è¦šãˆã‚‹ã ã‘ã«ã¯ã—ãªã„ã“ã¨ã€‚ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 3.3: 変更コマンド + + + ** å˜èªžã®ä¸€éƒ¨ã€ã‚‚ã—ãã¯å…¨ä½“を変更ã™ã‚‹ã«ã¯ cw ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã™ ** + + 1. 以下㮠---> ã¨ç¤ºã•ã‚ŒãŸæœ€åˆã®è¡Œã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã—ょã†ã€‚ + + 2. lubw ã® u ã®ä½ç½®ã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã—ょã†ã€‚ + + 3. cw ã¨ã‚¿ã‚¤ãƒ—ã—ã€æ­£ã—ã„å˜èªžã‚’タイプã—ã¾ã—ょã†(ã“ã®å ´åˆ 'ine' ã¨ã‚¿ã‚¤ãƒ—)。 + + 4. 次ã®é–“é•ã„(変更ã™ã¹ã文字ã®å…ˆé ­)ã«ç§»å‹•ã™ã‚‹ãŸã‚㫠をタイプã—ã¾ã™ã€‚ + + 5. 最åˆã®è¡ŒãŒæ¬¡ã®è¡Œã®æ§˜ã«ãªã‚‹ã¾ã§ã‚¹ãƒ†ãƒƒãƒ— 3 㨠4 を繰り返ã—ã¾ã™ã€‚ + +---> This lubw has a few wptfd that mrrf changing usf the change command. +---> This line has a few words that need changing using the change command. + +cw ã¯å˜èªžã‚’変更ã™ã‚‹ã ã‘ã§ãªãã€æŒ¿å…¥ã‚‚行ãˆã‚‹ã“ã¨ã«æ³¨æ„ã—ã¾ã—ょã†ã€‚ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 3.4: c を使用ã—ãŸãã®ä»–ã®å¤‰æ›´ + + + ** 変更コマンドã¯ã€å‰Šé™¤ã‚³ãƒžãƒ³ãƒ‰ã¨åŒã˜æ§˜ã«ã‚ªãƒ–ジェクトを使用ã—ã¾ã™ ** + + 1. 変更コマンドã¯ã€å‰Šé™¤ã‚³ãƒžãƒ³ãƒ‰ã¨åŒã˜ã‚ˆã†ãªå‹•作をã—ã¾ã™ã€‚ãã®å½¢å¼ã¯ + + c [数値] モーション + + 2. オブジェクトもåŒã˜ã§ã€w ã¯å˜èªžã€ $ ã¯è¡Œæœ«ãªã©ã¨ã„ã£ãŸã‚‚ã®ã§ã™ã€‚ + + 3. 以下㮠---> ã¨ç¤ºã•れãŸè¡Œã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã—ょã†ã€‚ + + 4. 最åˆã®é–“é•ã„ã¸ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã—ょã†ã€‚ + + 5. c$ ã¨ã‚¿ã‚¤ãƒ—ã—ã¦è¡Œã®æ®‹ã‚Šã‚’ï¼’è¡Œç›®ã®æ§˜ã«ã—〠を押ã—ã¾ã—ょã†ã€‚ + +---> The end of this line needs some help to make it like the second. +---> The end of this line needs to be corrected using the c$ command. + +NOTE: タイプ中ã®é–“é•ã„ã¯ãƒãƒƒã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã‚­ãƒ¼ã‚’使ã£ã¦ç›´ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 3 è¦ç´„ + + + 1. æ—¢ã«å‰Šé™¤ã•れãŸãƒ†ã‚­ã‚¹ãƒˆã‚’å†é…ç½®ã™ã‚‹ã«ã¯ã€p をタイプã—ã¾ã™ã€‚ã“れã¯å‰Šé™¤ã• + れãŸãƒ†ã‚­ã‚¹ãƒˆã‚’カーソルã®å¾Œã«æŒ¿å…¥ã—ã¾ã™(行å˜ä½ã§å‰Šé™¤ã•れãŸã®ãªã‚‰ã°ã€ã‚«ãƒ¼ + ソルã®ã‚る次ã®è¡Œã«æŒ¿å…¥ã•れã¾ã™)。 + + 2. カーソルã®ä¸‹ã®æ–‡å­—ã‚’ç½®ãæ›ãˆã‚‹ã«ã¯ã€r をタイプã—ãŸå¾Œã€ãã‚Œã‚’ç½®ãæ›ãˆã‚‹ + 文字をタイプã—ã¾ã™ã€‚ + + 3. 変更コマンドã§ã¯ã‚«ãƒ¼ã‚½ãƒ«ä½ç½®ã‹ã‚‰ç‰¹å®šã®ãƒ¢ãƒ¼ã‚·ãƒ§ãƒ³ã§æŒ‡å®šã•れる終端ã¾ã§ã‚’変 + æ›´ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚例ãˆã° cw ãªã‚‰ã°ã‚«ãƒ¼ã‚½ãƒ«ä½ç½®ã‹ã‚‰å˜èªžã®çµ‚ã‚りã¾ã§ã€ + c$ ãªã‚‰ã°è¡Œã®çµ‚ã‚りã¾ã§ã‚’変更ã—ã¾ã™ã€‚ + + 4. 変更コマンドã®å½¢å¼ã¯ + + c [数値] モーション + +ã•ãã€æ¬¡ã®ãƒ¬ãƒƒã‚¹ãƒ³ã¸é€²ã¿ã¾ã—ょã†ã€‚ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 4.1: ä½ç½®ã¨ãƒ•ã‚¡ã‚¤ãƒ«ã®æƒ…å ± + + ** ファイル内ã§ã®ä½ç½®ã¨ãƒ•ァイルã®çŠ¶æ…‹ã‚’è¡¨ç¤ºã™ã‚‹ã«ã¯ CTRL-G をタイプã—ã¾ã™ã€‚ + ファイル内ã®ã‚る行ã«ç§»å‹•ã™ã‚‹ã«ã¯ G をタイプã—ã¾ã™ ** + + NOTE: ステップを実行ã™ã‚‹å‰ã«ã€ã“ã®ãƒ¬ãƒƒã‚¹ãƒ³å…¨ã¦ã«ç›®ã‚’通ã—ã¾ã—ょã†!! + + 1. CTRL を押ã—ãŸã¾ã¾ g を押ã—ã¾ã—ょã†ã€‚ã“ã®æ“作を CTRL-G ã¨å‘¼ã‚“ã§ã„ã¾ã™ã€‚ + ページã®ä¸€ç•ªä¸‹ã«ãƒ•ァイルåã¨è¡Œç•ªå·ãŒè¡¨ç¤ºã•れるã¯ãšã§ã™ã€‚ ステップ 3ã®ãŸã‚ + ã«è¡Œç•ªå·ã‚’覚ãˆã¦ãŠãã¾ã—ょã†ã€‚ + +NOTE: ç”»é¢ã®å³ä¸‹éš…ã«ã‚«ãƒ¼ã‚½ãƒ«ã®ä½ç½®ãŒè¡¨ç¤ºã•れã¦ã„ã‚‹ã‹ã‚‚ã—れã¾ã›ã‚“。ã“れ㯠+ 'ruler' オプション(レッスン6ã§èª¬æ˜Ž)を設定ã™ã‚‹ã“ã¨ã§è¡¨ç¤ºã•れã¾ã™ã€‚ + + 2. 最下行ã«ç§»å‹•ã™ã‚‹ãŸã‚ã« G をタイプã—ã¾ã—ょã†ã€‚ + ファイルã®å…ˆé ­ã«ç§»å‹•ã™ã‚‹ã«ã¯ gg ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã—ょã†ã€‚ + + 3. å…ˆã»ã©ã®è¡Œã®ç•ªå·ã‚’タイプ㗠G をタイプã—ã¾ã—ょã†ã€‚最åˆã« CTRL-G を押ã—ãŸè¡Œ + ã«æˆ»ã£ã¦æ¥ã‚‹ã¯ãšã§ã™ã€‚ + + 4. è‡ªä¿¡ãŒæŒã¦ãŸã‚‰ã‚¹ãƒ†ãƒƒãƒ— 1 ã‹ã‚‰ 3 を実行ã—ã¾ã—ょã†ã€‚ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 4.2: 検索コマンド + + + ** 語å¥ã‚’検索ã™ã‚‹ã«ã¯ / ã¨ã€å‰æ–¹æ¤œç´¢ã™ã‚‹èªžå¥ã‚’タイプã—ã¾ã™ã€‚** + + 1. ノーマルモード㧠/ ã¨ã„ã†æ–‡å­—をタイプã—ã¾ã™ã€‚ç”»é¢ä¸€ç•ªä¸‹ã« : コマンド㨠+ åŒã˜æ§˜ã« / ãŒç¾ã‚Œã‚‹ã“ã¨ã«æ°—ã¥ãã§ã—ょã†ã€‚ + + 2. ã§ã¯ã€'errroor' ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã—ょã†ã€‚ã“ã‚ŒãŒæ¤œç´¢ã—ãŸã„å˜èªžã§ã™ã€‚ + + 3. åŒã˜èªžã‚’ã‚‚ã†ä¸€åº¦æ¤œç´¢ã™ã‚‹ã¨ã㯠å˜ã« n をタイプã—ã¾ã™ã€‚ + 逆方å‘ã«èªžå¥ã‚’検索ã™ã‚‹ã¨ã㯠N をタイプã—ã¾ã™ã€‚ + + 4. 逆方å‘ã«èªžå¥ã‚’検索ã™ã‚‹å ´åˆã¯ã€/ ã®ä»£ã‚り㫠? コマンドを使用ã—ã¾ã™ã€‚ + + 5. å…ƒã®å ´æ‰€ã«æˆ»ã‚‹ã«ã¯ CTRL-O (Ctrl を押ã—ç¶šã‘ãªãŒã‚‰ o 文字タイプ)をタイプ㗠+ ã¾ã™ã€‚ã•ã‚‰ã«æˆ»ã‚‹ã«ã¯ã“れを繰り返ã—ã¾ã™ã€‚CTRL-I ã¯å‰æ–¹å‘ã§ã™ã€‚ + +Note: "errroor" 㯠error ã¨ã‚¹ãƒšãƒ«ãŒé•ã„ã¾ã™; errroor ã¯ã„ã‚ゆる error ã§ã™ã€‚ +Note: 検索ãŒãƒ•ァイルã®çµ‚ã‚りã«é”ã™ã‚‹ã¨ã€ã‚ªãƒ—ション 'wrapscan' ãŒè¨­å®šã•れã¦ã„ã‚‹ + å ´åˆã¯ã€ãƒ•ァイルã®å…ˆé ­ã‹ã‚‰æ¤œç´¢ã‚’続行ã—ã¾ã™ã€‚ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 4.3: 対応ã™ã‚‹æ‹¬å¼§ã‚’検索 + + + ** 対応ã™ã‚‹ ),] ã‚„ } を検索ã™ã‚‹ã«ã¯ % をタイプã—ã¾ã™ ** + + 1. 下㮠---> ã§ç¤ºã•れãŸè¡Œã§ (,[ ã‹ { ã®ã©ã‚Œã‹ã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã—ょã†ã€‚ + + 2. ãã“ã§ % ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã—ょã†ã€‚ + + 3. カーソルã¯å¯¾å¿œã™ã‚‹æ‹¬å¼§ã«ç§»å‹•ã™ã‚‹ã¯ãšã§ã™ã€‚ + + 4. 最åˆã®æ‹¬å¼§ã«ç§»å‹•ã™ã‚‹ã«ã¯ % ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã—ょã†ã€‚ + + 5. ä»–ã® (,),[,],{ or } ã§ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã€% ãŒä½•ã‚’ã—ã¦ã„ã‚‹ã‹ç¢ºèªã—ã¾ã—ょã†ã€‚ + +---> This ( is a test line with ('s, ['s ] and {'s } in it. )) + + +NOTE: ã“ã®æ©Ÿèƒ½ã¯æ‹¬å¼§ãŒä¸€è‡´ã—ã¦ã„ãªã„プログラムをデãƒãƒƒã‚°ã™ã‚‹ã®ã«ã¨ã¦ã‚‚役立㡠+ ã¾ã™ã€‚ + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 4.4: é–“é•ã„を変更ã™ã‚‹æ–¹æ³• + + + ** 'old' ã‚’ 'new' ã«ç½®æ›ã™ã‚‹ã«ã¯ :s/old/new/g ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã™ ** + + 1. 以下㮠---> ã¨ç¤ºã•れãŸè¡Œã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã—ょã†ã€‚ + + 2. :s/thee/the ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã—ょã†ã€‚ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ãã®è¡Œã§æœ€åˆã«è¦‹ + ã¤ã‹ã£ãŸã‚‚ã®ã«ã ã‘行ãªã‚れるã“ã¨ã«æ°—ã‚’ã¤ã‘ã¾ã—ょã†ã€‚ + + 3. ã§ã¯ :s/thee/the/g ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã—ょã†ã€‚行全体を置æ›ã™ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + ã“ã®å¤‰æ›´ã¯ãã®è¡Œã§è¦‹ã¤ã‹ã£ãŸå…¨ã¦ã®ç®‡æ‰€ã«å¯¾ã—ã¦è¡Œãªã‚れã¾ã™ã€‚ + +---> thee best time to see thee flowers is in thee spring. + + 4. 複数行ã‹ã‚‰è¦‹ã¤ã‹ã‚‹æ–‡å­—を変更ã™ã‚‹ã«ã¯ + :#,#s/old/new/g #,# ã«ã¯ç½®ãæ›ãˆã‚‹ç¯„囲ã®é–‹å§‹ã¨çµ‚了ã®è¡Œç•ªå·ã‚’指定ã—ã¾ + ã™ã€‚ + :%s/old/new/g ファイル全体ã§è¦‹ã¤ã‹ã‚‹ã‚‚ã®ã«å¯¾ã—ã¦å¤‰æ›´ã™ã‚‹ã€‚ + :%s/old/new/gc ファイル全体ã§è¦‹ã¤ã‹ã‚‹ã‚‚ã®ã«å¯¾ã—ã¦ã€1ã¤1ã¤ç¢ºèªã‚’ã¨ã‚Šãª + ãŒã‚‰å¤‰æ›´ã™ã‚‹ã€‚ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 4 è¦ç´„ + + + 1. CTRL-G ã¯ãƒ•ァイルã§ã®ä½ç½®ã¨ãƒ•ァイルã®è©³ç´°ã‚’表示ã—ã¾ã™ã€‚ + G ã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ€ä¸‹è¡Œã«ç§»å‹•ã—ã¾ã™ã€‚ + 数値 G ã¯ãã®è¡Œã«ç§»å‹•ã—ã¾ã™ã€‚ + gg ã¯å…ˆé ­è¡Œã«ç§»å‹•ã—ã¾ã™ã€‚ + + 2. / ã®å¾Œã«èªžå¥ã‚’タイプã™ã‚‹ã¨å‰æ–¹ã«èªžå¥ã‚’検索ã—ã¾ã™ã€‚ + ? ã®å¾Œã«èªžå¥ã‚’タイプã™ã‚‹ã¨å¾Œæ–¹ã«èªžå¥ã‚’検索ã—ã¾ã™ã€‚ + 検索ã®å¾Œã® n ã¯åŒã˜æ–¹å‘ã®æ¬¡ã®æ¤œç´¢ã‚’ã€N ã¯é€†æ–¹å‘ã®æ¤œç´¢ã‚’ã—ã¾ã™ã€‚ + CTRL-O ã¯å ´æ‰€ã‚’å‰ã«ç§»ã—ã€CTRL-I ã¯å ´æ‰€ã‚’次ã«ç§»å‹•ã—ã¾ã™ã€‚ + + 3. (,),[,],{, ã‚‚ã—ã㯠} 上ã«ã‚«ãƒ¼ã‚½ãƒ«ãŒã‚る状態㧠% をタイプã™ã‚‹ã¨å¯¾ã«ãªã‚‹æ–‡ + å­—ã¸ç§»å‹•ã—ã¾ã™ã€‚ + + 4. ç¾åœ¨è¡Œã®æœ€åˆã® old ã‚’ new ã«ç½®æ›ã™ã‚‹ã€‚ :s/old/new + ç¾åœ¨è¡Œã®å…¨ã¦ã® old ã‚’ new ã«ç½®æ›ã™ã‚‹ã€‚ :s/old/new/g + 2ã¤ã® # é–“ã§èªžå¥ã‚’ç½®æ›ã™ã‚‹ã€‚ :#,#s/old/new/g + ファイルã®ä¸­ã®å…¨ã¦ã®æ¤œç´¢èªžå¥ã‚’ç½®æ›ã™ã‚‹ã€‚ :%s/old/new/g + 'c' を加ãˆã‚‹ã¨ç½®æ›ã®åº¦ã«ç¢ºèªã‚’求ã‚る。 :%s/old/new/gc + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 5.1: 外部コマンドを実行ã™ã‚‹æ–¹æ³• + + + ** :! ã®å¾Œã«å®Ÿè¡Œã™ã‚‹å¤–部コマンドをタイプã—ã¾ã™ ** + + 1. ç”»é¢ã®æœ€ä¸‹éƒ¨ã«ã‚«ãƒ¼ã‚½ãƒ«ãŒç§»å‹•ã™ã‚‹ã‚ˆã†ã€æ…£ã‚Œè¦ªã—ã‚“ã  : をタイプã—ã¾ã—ょã†ã€‚ + ã“れã§ã‚³ãƒžãƒ³ãƒ‰ãŒã‚¿ã‚¤ãƒ—ã§ãる様ã«ãªã‚Šã¾ã™ã€‚ + + 2. ã“ã“ã§ ! ã¨ã„ã†æ–‡å­—(感嘆符)をタイプã—ã¾ã—ょã†ã€‚ + ã“れã§å¤–部シェルコマンドãŒå®Ÿè¡Œã§ãる様ã«ãªã‚Šã¾ã™ã€‚ + + 3. 例ã¨ã—㦠! ã«ç¶šã‘㦠ls ã¨ã‚¿ã‚¤ãƒ—㗠を押ã—ã¾ã—ょã†ã€‚ + シェルプロンプトã®ã‚ˆã†ã«ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã®ä¸€è¦§ãŒè¡¨ç¤ºã•れるã¯ãšã§ã™ã€‚ + ã‚‚ã—ã㯠ls ãŒå‹•ã‹ãªã„ãªã‚‰ã° :!dir を使用ã—ã¾ã—ょã†ã€‚ + +Note: ã“ã®æ–¹æ³•ã«ã‚ˆã£ã¦ã‚らゆるコマンドãŒå®Ÿè¡Œã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã‚‚ã¡ã‚ん引数 + も与ãˆã‚‰ã‚Œã¾ã™ã€‚ + +Note: å…¨ã¦ã® : コマンド㯠を押ã—ã¦çµ‚了ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + 以é™ã§ã¯ã“ã®ã“ã¨ã«è¨€åŠã—ã¾ã›ã‚“。 + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 5.2: ãã®ä»–ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¸æ›¸ã込㿠+ + + ** ファイルã¸å¤‰æ›´ã‚’ä¿å­˜ã™ã‚‹ã«ã¯ :w ファイルå ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã™ ** + + 1. ディレクトリã®ä¸€è¦§ã‚’å¾—ã‚‹ãŸã‚ã« :!dir ã‚‚ã—ã㯠:!ls ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã—ょã†ã€‚ + ã“ã®ã‚㨠を押ã™ã®ã¯æ—¢ã«ã”存知ã§ã™ã­ã€‚ + + 2. TEST ã®ã‚ˆã†ã«ã€ãã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ç„¡ã„ファイルåを一ã¤é¸ã³ã¾ã™ã€‚ + + 3. ã§ã¯ :w TEST ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã—ょㆠ(TEST ã¯ã€é¸ã‚“ã ãƒ•ァイルåã§ã™)。 + + 4. ã“れã«ã‚ˆã‚Šãƒ•ァイル全体㌠TEST ã¨ã„ã†åå‰ã§ä¿å­˜ã•れã¾ã™ã€‚ + ã‚‚ã†ä¸€åº¦ :!dir ã‚‚ã—ã㯠!ls ã¨ã‚¿ã‚¤ãƒ—ã—ã¦ç¢ºèªã—ã¦ã¿ã¾ã—ょã†ã€‚ + +Note: ã“ã“ã§ Vim を終了ã—ã€ãƒ•ァイルå TEST ã¨å…±ã«èµ·å‹•ã™ã‚‹ã¨ã€ä¿å­˜ã—ãŸæ™‚ã® + ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã®è¤‡è£½ãŒã§ã上ãŒã‚‹ã¯ãšã§ã™ã€‚ + + 5. ã•らã«ã€æ¬¡ã®ã‚ˆã†ã«ã‚¿ã‚¤ãƒ—ã—ã¦ãƒ•ァイルを消ã—ã¾ã—ょã†(MS-DOS): :!del TEST + ã‚‚ã—ãã¯(Unix): :!rm TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 5.3: é¸æŠžã—ãŸæ›¸ã込㿠+ + +** ファイルã®ä½ç½®ã‚’ä¿å­˜ã™ã‚‹ã«ã¯ã€v モーション㨠:w FILENAME をタイプã—ã¾ã™ã€‚ ** + + 1. ã“ã®è¡Œã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã™ã€‚ + + 2. v を押ã—ã€ä»¥ä¸‹ã®ç¬¬5é …ç›®ã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã™ã€‚テキストãŒå¼·èª¿è¡¨ç¤ºã•れる㮠+ ã«æ³¨ç›®ã—ã¦ä¸‹ã•ã„。 + + 3. 文字 : を押ã™ã¨ã€ç”»é¢ã®æœ€ä¸‹éƒ¨ã« :'<,'> ãŒç¾ã‚Œã¾ã™ã€‚ + + 4. w TEST (TESET ã¯å­˜åœ¨ã—ãªã„ファイルå)をタイプã—ã¾ã™ã€‚ + Enter を押ã™å‰ã« :'<,'>w TEST ã¨ãªã£ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ä¸‹ã•ã„。 + + 5. Vim 㯠TEST ã¨ã„ã†ãƒ•ァイルã«é¸æŠžã•れãŸè¡Œã‚’書ã込むã§ã—ょã†ã€‚ + !dir ã‚‚ã—ã㯠!ls ã§ãれを確èªã—ã¾ã™ã€‚ + ãれã¯å‰Šé™¤ã—ãªã„ã§ãŠã„ã¦ä¸‹ã•ã„。次ã®ãƒ¬ãƒƒã‚¹ãƒ³ã§ä½¿ç”¨ã—ã¾ã™ã€‚ + +NOTE: v を押ã™ã¨ã€Visual é¸æŠžãŒå§‹ã¾ã‚Šã¾ã™ã€‚カーソルを動ã‹ã™ã“ã¨ã§ã€é¸æŠžç¯„囲を + 大ããã‚‚å°ã•ãã‚‚ã§ãã¾ã™ã€‚ã•らã«ã€ãã®é¸æŠžç¯„囲ã«å¯¾ã—ã¦ã‚ªãƒšãƒ¬ãƒ¼ã‚¿ã‚’é©ç”¨ + ãã¾ã™ã€‚例ãˆã° d ã¯ãƒ†ã‚­ã‚¹ãƒˆã‚’削除ã—ã¾ã™ã€‚ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 5.4: ファイルã®å–è¾¼ã¨åˆä½µ + + + ** ファイルã®ä¸­èº«ã‚’挿入ã™ã‚‹ã«ã¯ :r ファイルå ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã™ ** + + 1. カーソルを以下ã®è¡Œã«åˆã‚ã›ã¾ã™ã€‚ + +NOTE: ステップ 2 ã®å®Ÿè¡Œå¾Œã€ãƒ¬ãƒƒã‚¹ãƒ³ 5.3 ã®ãƒ†ã‚­ã‚¹ãƒˆãŒç¾ã‚Œã¾ã™ã€‚下ã«ä¸‹ãŒã£ã¦ã“ + ã®ãƒ¬ãƒƒã‚¹ãƒ³ã«ç§»å‹•ã—ã¾ã—ょã†ã€‚ + + 2. ã§ã¯ TEST ã¨ã„ã†ãƒ•ァイルを :r TEST ã¨ã„ã†ã‚³ãƒžãƒ³ãƒ‰ã§èª­ã¿è¾¼ã¿ã¾ã—ょã†ã€‚ + ã“ã“ã§ã„ㆠTEST ã¯ä½¿ã†ãƒ•ァイルã®åå‰ã®ã“ã¨ã§ã™ã€‚ + 読ã¿è¾¼ã¾ã‚ŒãŸãƒ•ァイルã¯ã€ã‚«ãƒ¼ã‚½ãƒ«è¡Œã®ä¸‹ã«ã‚りã¾ã™ã€‚ + + 3. å–込んã ãƒ•ァイルを確èªã—ã¦ã¿ã¾ã—ょã†ã€‚カーソルを戻ã™ã¨ã€ãƒ¬ãƒƒã‚¹ãƒ³5.3 ã® + オリジナルã¨ãƒ•ァイルã«ã‚ˆã‚‹ã‚‚ã®ã®2ã¤ãŒã‚ã‚‹ã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ã€‚ + +NOTE: 外部コマンドã®å‡ºåŠ›ã‚’èª­ã¿è¾¼ã‚€ã“ã¨ã‚‚出æ¥ã¾ã™ã€‚例ãˆã°ã€ + :r !ls 㯠ls コマンドã®å‡ºåŠ›ã‚’ã‚«ãƒ¼ã‚½ãƒ«ä»¥ä¸‹ã«èª­ã¿è¾¼ã¿ã¾ã™ã€‚ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 5 è¦ç´„ + + + 1. :!command ã«ã‚ˆã£ã¦ 外部コマンドを実行ã—ã¾ã™ã€‚ + + よã使ã†ä¾‹: + (MS-DOS) (Unix) + :!dir :!ls - ディレクトリ内ã®ä¸€è¦§ã‚’見る。 + :!del FILENAME :!rm FILENAME - ファイルを削除ã™ã‚‹ã€‚ + + 2. :w ファイルå ã«ã‚ˆã£ã¦ãƒ•ァイルåã¨ã„ã†ãƒ•ァイルãŒãƒ‡ã‚£ã‚¹ã‚¯ã«æ›¸ãè¾¼ã¾ã‚Œã‚‹ã€‚ + + 3. v モーション㧠:w FILENAME ã¨ã™ã‚‹ã¨ã€ãƒ“ã‚¸ãƒ¥ã‚¢ãƒ«é¸æŠžè¡ŒãŒãƒ•ァイルã«ä¿å­˜ã• + れる。 + + 4. :r ファイルå ã«ã‚ˆã‚Šãƒ•ァイルåã¨ã„ã†ãƒ•ァイルãŒãƒ‡ã‚£ã‚¹ã‚¯ã‚ˆã‚Šå–è¾¼ã¾ã‚Œã€ + カーソルä½ç½®ã®ä¸‹ã«æŒ¿å…¥ã•れる。 + + 5. :r !dir 㯠dir コマンドã®å‡ºåŠ›ã‚’ã‚«ãƒ¼ã‚½ãƒ«ä½ç½®ä»¥ä¸‹ã«èª­ã¿è¾¼ã‚€ã€‚ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 6.1: オープンコマンド + + + ** o をタイプã™ã‚‹ã¨ã€ã‚«ãƒ¼ã‚½ãƒ«ã®ä¸‹ã®è¡ŒãŒé–‹ãã€æŒ¿å…¥ãƒ¢ãƒ¼ãƒ‰ã«å…¥ã‚Šã¾ã™ ** + + 1. 以下㮠---> ã¨ç¤ºã•れãŸè¡Œã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã—ょã†ã€‚ + + 2. o (å°æ–‡å­—) をタイプã—ã¦ã€ã‚«ãƒ¼ã‚½ãƒ«ã®ä¸‹ã®è¡Œã‚’é–‹ãã€æŒ¿å…¥ãƒ¢ãƒ¼ãƒ‰ã«å…¥ã‚Šã¾ã™ã€‚ + + 3. ã•ã‚‰ã«æŒ¿å…¥ãƒ¢ãƒ¼ãƒ‰ã‚’終了ã™ã‚‹ç‚ºã« をタイプã—ã¾ã™ã€‚ + +---> o をタイプã™ã‚‹ã¨ã‚«ãƒ¼ã‚½ãƒ«ã¯é–‹ã„ãŸè¡Œã¸ç§»å‹•ã—æŒ¿å…¥ãƒ¢ãƒ¼ãƒ‰ã«å…¥ã‚Šã¾ã™ã€‚ + + 4. カーソルã®ä¸Šã®è¡Œã«æŒ¿å…¥ã™ã‚‹ã«ã¯ã€å°æ–‡å­—ã® o ã§ã¯ãªãã€å˜ç´”ã«å¤§æ–‡å­—ã® O + をタイプã—ã¾ã™ã€‚次ã®è¡Œã§è©¦ã—ã¦ã¿ã¾ã—ょã†ã€‚ + +---> ã“ã®è¡Œã®ä¸Šã¸æŒ¿å…¥ã™ã‚‹ã«ã¯ã€ã“ã®è¡Œã¸ã‚«ãƒ¼ã‚½ãƒ«ã‚’ç½®ã„㦠O をタイプã—ã¾ã™ã€‚ + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 6.2: 追加コマンド + + + ** ã‚«ãƒ¼ã‚½ãƒ«ã®æ¬¡ã®ä½ç½®ã‹ã‚‰ãƒ†ã‚­ã‚¹ãƒˆã‚’追加ã™ã‚‹ã«ã¯ a ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã™ ** + + 1. カーソルを ---> ã§ç¤ºã•れãŸè¡Œã¸ç§»å‹•ã—ã¾ã—ょã†ã€‚ + + 2. e を押ã—㦠li ã®çµ‚端部ã¾ã§ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã™ã€‚ + + 3. カーソルã®å¾Œã‚ã«ãƒ†ã‚­ã‚¹ãƒˆã‚’追加ã™ã‚‹ãŸã‚ã« a (å°æ–‡å­—) をタイプã—ã¾ã™ã€‚ + + 4. ãã®ä¸‹ã®è¡Œã®ã®ã‚ˆã†ãªå˜èªžã«å®Œæˆã•ã›ã¾ã™ã€‚挿入モードを抜ã‘ã‚‹ç‚ºã« ã«æŠ¼ + ã—ã¾ã™ã€‚ + + 5. e を使ã£ã¦æ¬¡ã®ä¸å®Œå…¨ãªå˜èªžã¸ç§»å‹•ã—ã€ã‚¹ãƒ†ãƒƒãƒ— 3 㨠4 を繰り返ã—ã¾ã™ã€‚ + +---> This li will allow you to pract appendi text to a line. +---> This line will allow you to practice appending text to a line. + +Note: a, i 㨠A ã¯åŒã˜æŒ¿å…¥ãƒ¢ãƒ¼ãƒ‰ã¸ç§»ã‚Šã¾ã™ãŒã€æ–‡å­—ãŒæŒ¿å…¥ã•れるä½ç½®ã ã‘ãŒç•°ãªã‚Š + ã¾ã™ã€‚ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 6.3: ãã®ä»–ã®ç½®æ›æ–¹æ³• + + + ** 1æ–‡å­—ä»¥ä¸Šã‚’ç½®ãæ›ãˆã‚‹ã«ã¯å¤§æ–‡å­—ã® R ã¨ã‚¿ã‚¤ãƒ—ã—ã¾ã—ょㆠ** + + 1. 以下㮠---> ã¨ç¤ºã•れãŸè¡Œã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã™ã€‚最åˆã® xxx ã®å…ˆé ­ã«ç§»å‹•ã— + ã¾ã™ã€‚ + + 2. R を押ã—ã¦ã€2è¡Œç›®ã®æ•°å€¤ã‚’タイプã™ã‚‹ã“ã¨ã§ã€xxx ãŒç½®æ›ã•れã¾ã™ã€‚ + + 3. ç½®æ›ãƒ¢ãƒ¼ãƒ‰ã‚’抜ã‘ã‚‹ã«ã¯ を押ã—ã¾ã™ã€‚è¡Œã®æ®‹ã‚ŠãŒå¤‰æ›´ã•れã¦ã„ãªã„ã¾ã¾ã« + ãªã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + + 5. 残ã£ãŸ xxx をステップを繰り返ã—ã¦ç½®æ›ã—ã¾ã—ょã†ã€‚ + +---> Adding 123 to xxx gives you xxx. +---> Adding 123 to 456 gives you 579. + +NOTE: ç½®æ›ãƒ¢ãƒ¼ãƒ‰ã¯æŒ¿å…¥ãƒ¢ãƒ¼ãƒ‰ã«ä¼¼ã¦ã„ã¾ã™ãŒã€å…¨ã¦ã®ã‚¿ã‚¤ãƒ—ã•ã‚ŒãŸæ–‡å­—ã¯æ—¢å­˜ã®æ–‡å­— + を削除ã—ã¾ã™ã€‚ + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 6.4: テキストã®ã‚³ãƒ”ーã¨ãƒšãƒ¼ã‚¹ãƒˆ + + + ** テキストã®ã‚³ãƒ”ーã«ã¯ã‚ªãƒšãƒ¬ãƒ¼ã‚¿ y ã‚’ã€ãƒšãƒ¼ã‚¹ãƒˆã«ã¯ p を使ã„ã¾ã™ ** + + 1. ---> ã¨ç¤ºã•れãŸè¡Œã¸ç§»å‹•ã—ã€ã‚«ãƒ¼ã‚½ãƒ«ã‚’ "a)" ã®å¾Œã«ç½®ã„ã¦ãŠãã¾ã™ã€‚ + + 2. v ã§ãƒ“ジュアルモードを開始ã—ã€"first"ã®æ‰‹å‰ã¾ã§ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã™ã€‚ + + 3. y をタイプã—ã¦å¼·èª¿è¡¨ç¤ºã•れãŸãƒ†ã‚­ã‚¹ãƒˆã‚’ yank (コピー)ã—ã¾ã™ã€‚ + + 4. 次ã®è¡Œã®è¡Œæœ«ã¾ã§ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã™: j$ + + 5. p を押ã—ã¦è²¼ã‚Šä»˜ã‘(put)ã¦ã‹ã‚‰ã€æ¬¡ã‚’タイプã—ã¾ã™: a second + + 6. ビジュアルモード㧠" item." ã‚’é¸æŠžã—ã€y ã§ãƒ¤ãƒ³ã‚¯ã€æ¬¡ã®è¡Œã®è¡Œæœ«ã¾ã§ j$ ã§ + 移動ã—〠p ã§ãƒ†ã‚­ã‚¹ãƒˆã‚’ãã“ã« put ã—ã¾ã™ã€‚ + +---> a) this is the first item. + b) + + Note: å˜èªžã‚’1㤠yank ã™ã‚‹ã®ã« y をオペレータã¨ã—㦠yw ã¨ã™ã‚‹ã“ã¨ã‚‚出æ¥ã¾ã™ã€‚ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 6.5: オプションã®è¨­å®š + + + ** 検索や置æ›ã®éš›ã«å¤§æ–‡å­—/å°æ–‡å­—を無視ã™ã‚‹ã«ã¯ã€ã‚ªãƒ—ションを設定ã—ã¾ã™ ** + + 1. æ¬¡ã®æ§˜ã«å…¥åŠ›ã—㦠'ignore' を検索ã—ã¾ã—ょã†: /ignore + n を押ã—ã¦ä½•åº¦ã‹æ¤œç´¢ã‚’繰り返ã—ã¾ã™ã€‚ + + 2. æ¬¡ã®æ§˜ã«å…¥åŠ›ã—㦠'ic' (Ignore Case ã®ç•¥) オプションを設定ã—ã¾ã™: :set ic + + 3. ã§ã¯ n ã«ã‚ˆã£ã¦ã‚‚ã†1度 'ignore' を検索ã—ã¾ã™ã€‚ + n を押ã—ã¦ã•ã‚‰ã«æ•°å›žæ¤œç´¢ã‚’繰り返ã—ã¾ã—ょã†ã€‚ + + 4. 'hlsearch' 㨠'incsearch' オプションを設定ã—ã¾ã—ょã†: :set hls is + + 5. 検索コマンドをå†å…¥åŠ›ã—ã¦ã€ä½•ãŒèµ·ã“ã‚‹ã‹è¦‹ã¦ã¿ã¾ã—ょã†: /ignore + + 6. å¤§æ–‡å­—å°æ–‡å­—ã®åŒºåˆ¥ã‚’無効ã«ã™ã‚‹ã«ã¯æ¬¡ã®æ§˜ã«å…¥åŠ›ã—ã¾ã™: :set noic + +Note: マッãƒã®å¼·èª¿è¡¨ç¤ºã‚’ã‚„ã‚ã‚‹ã«ã¯æ¬¡ã®æ§˜ã«å…¥åŠ›ã—ã¾ã™: :nohlsearch +Note: 1ã¤ã®æ¤œç´¢ã‚³ãƒžãƒ³ãƒ‰ã ã‘å¤§æ–‡å­—å°æ–‡å­—ã®åŒºåˆ¥ã‚’ã‚„ã‚ãŸã„ãªã‚‰ã°ã€ãƒ•レーズ㫠\c + を使用ã—ã¾ã™: /ignore\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 6 è¦ç´„ + + 1. o をタイプã™ã‚‹ã¨ã‚«ãƒ¼ã‚½ãƒ«ã®ä¸‹ã®è¡Œã‚’é–‹ã‘ã¦ã€ãã“ã§æŒ¿å…¥ãƒ¢ãƒ¼ãƒ‰ã«ãªã‚‹ã€‚ + O (大文字) をタイプã™ã‚‹ã¨ã‚«ãƒ¼ã‚½ãƒ«ã®ä¸Šã®è¡Œã§æŒ¿å…¥ãƒ¢ãƒ¼ãƒ‰ã«ãªã‚‹ã€‚ + + 2. ã‚«ãƒ¼ã‚½ãƒ«ä¸Šã®æ–‡å­—ã®æ¬¡ã‹ã‚‰ãƒ†ã‚­ã‚¹ãƒˆã‚’追加ã™ã‚‹ã«ã¯ a ã¨ã‚¿ã‚¤ãƒ—ã™ã‚‹ã€‚ + 行末ã«è‡ªå‹•ã§ãƒ†ã‚­ã‚¹ãƒˆã‚’挿入ã™ã‚‹ã«ã¯å¤§æ–‡å­— A をタイプã™ã‚‹ã€‚ + + 3. e コマンドã¯å˜èªžã®çµ‚端部カーソルを移動ã™ã‚‹ã€‚ + + 4. y オペレータã¯ãƒ†ã‚­ã‚¹ãƒˆã‚’ yank (コピー)ã—ã€p ã¯ãれを put (ペースト)ã™ã‚‹ã€‚ + + 5. 大文字㮠R をタイプã™ã‚‹ã¨ç½®æ›ãƒ¢ãƒ¼ãƒ‰ã«å…¥ã‚Šã€ã‚’押ã™ã¨æŠœã‘る。 + + 6. ":set xxx" ã¨ã‚¿ã‚¤ãƒ—ã™ã‚‹ã¨ã‚ªãƒ—ション "xxx" ãŒè¨­å®šã•れる。 + 'ic' 'ignorecase' 検索時ã«å¤§æ–‡å­—å°æ–‡å­—ã®åŒºåˆ¥ã—ãªã„ + 'is' 'incsearch' 検索フレーズã«éƒ¨åˆ†ãƒžãƒƒãƒã—ã¦ã„る部分を表示ã™ã‚‹ + 'hls' 'hlsearch' マッãƒã™ã‚‹ã™ã¹ã‚’強調表示ã™ã‚‹ + é•·ã„æ–¹ã€çŸ­ã„æ–¹ã€ã©ã¡ã‚‰ã®ã‚ªãƒ—ションåã§ã‚‚使用ã§ãã¾ã™ã€‚ + + 7. "no" を付与ã—ã€ã‚ªãƒ—ションを無効ã«ã—ã¾ã™: :set noic + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 7.1: オンラインヘルプコマンド + + + ** オンラインヘルプを使用ã—ã¾ã—ょㆠ** + + Vim ã«ã¯åºƒç¯„ã«ã‚ãŸã‚‹ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ãƒ˜ãƒ«ãƒ—システムãŒã‚りã¾ã™ã€‚ + ヘルプを開始ã™ã‚‹ã«ã¯ã€ã“れら3ã¤ã®ã©ã‚Œã‹1ã¤ã‚’試ã—ã¦ã¿ã¾ã—ょã†: + - ヘルプキー を押ã™(ã‚‚ã—ã‚ã‚‹ãªã‚‰ã°)。 + - キーを押ã™(ã‚‚ã—ã‚ã‚‹ãªã‚‰ã°)。 + - :help ã¨ã‚¿ã‚¤ãƒ—ã™ã‚‹ã€‚ + + ヘルプウィンドウã®ãƒ†ã‚­ã‚¹ãƒˆã‚’読むã¨ã€ãƒ˜ãƒ«ãƒ—ã®å‹•作ãŒç†è§£ã§ãã¾ã™ã€‚ + CTRL-W CTRL-W ã¨ã‚¿ã‚¤ãƒ—ã™ã‚‹ã¨ ヘルプウィンドウã¸ã‚¸ãƒ£ãƒ³ãƒ—ã—ã¾ã™ã€‚ + :q ã¨ã‚¿ã‚¤ãƒ—ã™ã‚‹ã¨ ヘルプウィンドウãŒé–‰ã˜ã‚‰ã‚Œã¾ã™ã€‚ + + ":help" コマンドã«å¼•数を与ãˆã‚‹ã“ã¨ã«ã‚ˆã‚Šã€ã‚らゆる題åã®ãƒ˜ãƒ«ãƒ—を見ã¤ã‘ã‚‹ã“㨠+ ãŒã§ãã¾ã™ã€‚ã“れらを試ã—ã¦ã¿ã¾ã—ょã†( をタイプã—忘れãªã„よã†ã«): + + :help w + :help c_ ã§ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‚’補完ã™ã‚‹ ** + + 1. コンパãƒãƒ¢ãƒ¼ãƒ‰ã§ãªã„ã“ã¨ã‚’確èªã—ã¾ã™: :set nocp + + 2. ç¾åœ¨ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«åœ¨ã‚‹ãƒ•ァイルを :!ls ã‹ :!dir ã§ç¢ºèªã—ã¾ã™ã€‚ + + 3. コマンドã®é–‹å§‹ã‚’タイプã—ã¾ã™: :e + + 4. CTRL-D を押ã™ã¨ Vim 㯠"e" ã‹ã‚‰å§‹ã¾ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã®ä¸€è¦§ã‚’表示ã—ã¾ã™ã€‚ + + 5. を押ã™ã¨ Vim 㯠":edit" ã¨ã„ã†ã‚³ãƒžãƒ³ãƒ‰åを補完ã—ã¾ã™ã€‚ + + 6. ã•らã«ç©ºç™½ã¨ã€æ—¢å­˜ã®ãƒ•ァイルåã®å§‹ã¾ã‚Šã‚’加ãˆã¾ã™: :edit FIL + + 7. を押ã™ã¨ Vim ã¯åå‰ã‚’補完ã—ã¾ã™ã€‚(ã‚‚ã—一ã¤ã—ã‹ç„¡ã‹ã£ãŸå ´åˆ) + +NOTE: 補完ã¯å¤šãã®ã‚³ãƒžãƒ³ãƒ‰ã§å‹•作ã—ã¾ã™ã€‚ãã—㦠CTRL-D 㨠押ã—ã¦ã¿ã¦ãã  + ã•ã„。特㫠:help ã®éš›ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + レッスン 7 è¦ç´„ + + + 1. ヘルプウィンドウを開ãã«ã¯ :help ã¨ã™ã‚‹ã‹ ã‚‚ã—ã㯠を押ã™ã€‚ + + 2. コマンド(cmd)ã®ãƒ˜ãƒ«ãƒ—を検索ã™ã‚‹ã«ã¯ :help cmd ã¨ã‚¿ã‚¤ãƒ—ã™ã‚‹ã€‚ + + 3. 別ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¸ã‚¸ãƒ£ãƒ³ãƒ—ã™ã‚‹ã«ã¯ CTRL-W CTRL-W ã¨ã‚¿ã‚¤ãƒ—ã™ã‚‹ã€‚ + + 4. ヘルプウィンドウを閉ã˜ã‚‹ã«ã¯ :q ã¨ã‚¿ã‚¤ãƒ—ã™ã‚‹ã€‚ + + 5. ãŠå¥½ã¿ã®è¨­å®šã‚’ä¿ã¤ã«ã¯ vimrc 起動スクリプトを作æˆã™ã‚‹ã€‚ + + 6. : command ã§å¯èƒ½ãªè£œå®Œã‚’見るã«ã¯ CTRL-D をタイプã™ã‚‹ã€‚ + 補完を使用ã™ã‚‹ã«ã¯ を押ã™ã€‚ + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + ã“れã«ã¦ Vim ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã‚’終ã‚りã¾ã™ã€‚エディタを簡å˜ã«ã€ã—ã‹ã‚‚充分㫠+ 使ã†ã“ã¨ãŒã§ãるよã†ã«ã¨ã€Vim ã®æŒã¤æ¦‚念ã®è¦ç‚¹ã®ã¿ã‚’ä¼ãˆã‚ˆã†ã¨ã—ã¾ã—ãŸã€‚ + Vim ã«ã¯ã•らã«å¤šãã®ã‚³ãƒžãƒ³ãƒ‰ãŒã‚りã€ã“ã“ã§å…¨ã¦ã‚’説明ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + 以é™ã¯ãƒ¦ãƒ¼ã‚¶ãƒžãƒ‹ãƒ¥ã‚¢ãƒ«ã‚’å‚ç…§ãã ã•ã„: "help :user-manual" + + ã“れ以後ã®å­¦ç¿’ã®ãŸã‚ã«ã€æ¬¡ã®æœ¬ã‚’推薦ã—ã¾ã™ã€‚ + Vim - Vi Improved - by Steve Oualline + 出版社: New Riders + 最åˆã®æœ¬ã¯å®Œå…¨ã« Vim ã®ãŸã‚ã«æ›¸ã‹ã‚Œã¾ã—ãŸã€‚ã¨ã‚Šã‚ã‘åˆå¿ƒè€…ã«ã¯ãŠå¥¨ã‚ã§ã™ã€‚ + 多ãã®ä¾‹é¡Œã‚„å›³ç‰ˆãŒæŽ²è¼‰ã•れã¦ã„ã¾ã™ã€‚ + 次ã®URLã‚’å‚ç…§ã—ã¦ä¸‹ã•ã„ http://iccf-holland.org/click5.html + + 次㯠Vim よりも Vi ã«ã¤ã„ã¦æ›¸ã‹ã‚ŒãŸå¤ã„本ã§ã™ãŒæŽ¨è–¦ã—ã¾ã™: + Learning the Vi Editor - by Linda Lamb + 出版社: O'Reilly & Associates Inc. + Vi ã§ã‚„りãŸã„ã¨æ€ã†ã“ã¨ã»ã¼å…¨ã¦ã‚’知るã“ã¨ãŒã§ãる良書ã§ã™ã€‚ + 第6版ã§ã¯ã€Vim ã«ã¤ã„ã¦ã®æƒ…報もå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + + ã“ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã¯ Colorado State University ã® Charles Smith ã®ã‚¢ã‚¤ãƒ‡ã‚¢ + を基ã«ã€Colorado School of Mines ã® Michael C. Pierce 㨠Robert K. Ware ã® + 両åã«ã‚ˆã£ã¦æ›¸ã‹ã‚Œã¾ã—ãŸã€‚ E-mail: bware@mines.colorado.edu. + + Modified for Vim by Bram Moolenaar. + + 日本語訳 æ¾æœ¬ 泰弘 + 監修 æ‘岡 太郎 + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + vi:set ts=8 sts=4 sw=4 tw=78: diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.ko.euc b/vim/bundle/ubuntu-vim72/tutor/tutor.ko.euc new file mode 100644 index 0000000..ddfc5ac --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.ko.euc @@ -0,0 +1,812 @@ +=============================================================================== += ºö ±æÀâÀÌ (VIM Tutor) ¿¡ ¿À½Å °ÍÀ» ȯ¿µÇÕ´Ï´Ù - Version 1.5 = +=============================================================================== + + ºö(Vim)Àº ÀÌ ±æÀâÀÌ¿¡¼­ ´Ù ¼³¸íÇÒ ¼ö ¾øÀ» ¸¸Å­ ¸¹Àº ¸í·ÉÀ» °¡Áø + ¸Å¿ì °­·ÂÇÑ ÆíÁý±âÀÔ´Ï´Ù. ÀÌ ±æÀâÀÌ´Â ºöÀ» ½±°Ô ÀüõÈÄ ÆíÁý±â·Î »ç¿ëÇÒ + ¼ö ÀÖµµ·Ï ÃæºÐÇÑ ¸í·É¿¡ ´ëÇØ ¼³¸íÇϰí ÀÖ½À´Ï´Ù. + + ÀÌ ±æÀâÀ̸¦ ¶¼´Â µ¥¿¡´Â ½Ç½ÀÇÏ´Â µ¥¿¡ ¾ó¸¶³ª ½Ã°£À» ¾²´Â °¡¿¡ µû¶ó¼­ + 25-30 ºÐ Á¤µµ°¡ °É¸³´Ï´Ù. + + ÀÌ ¿¬½À¿¡ Æ÷ÇÔµÈ ¸í·ÉÀº ³»¿ëÀ» °íĨ´Ï´Ù. ÀÌ ÆÄÀÏÀÇ º¹»çº»À» ¸¸µé¾î¼­ + ¿¬½ÀÇϼ¼¿ä. (vimtutor ¸¦ ÅëÇØ ½ÃÀÛÇß´Ù¸é, ÀÌ¹Ì º¹»çº»À» »ç¿ëÇÏ´Â + ÁßÀÔ´Ï´Ù.) + + Áß¿äÇÑ °ÍÀº, ÀÌ ±æÀâÀ̰¡ Á÷Á¢ ½áº¸¸é¼­ ¹è¿ìµµ·Ï °í·ÁµÇ¾î ÀÖ´Ù´Â °ÍÀÔ´Ï´Ù. + ¸í·ÉÀ» Á¦´ë·Î ÀÍÈ÷·Á¸é, Á÷Á¢ ½ÇÇàÇØº¸´Â °ÍÀÌ ÇÊ¿äÇÕ´Ï´Ù. ³»¿ëÀ» Àд + °Í¸¸À¸·Î´Â, ¸í·ÉÀ» Àؾî¹ö¸®°Ô µÉ °ÍÀÔ´Ï´Ù. + + ÀÚ ÀÌÁ¦, Caps Lock(Shift-Lock) ۰¡ ´­·ÁÀÖÁö ¾ÊÀºÁö È®ÀÎÇØº¸½Ã°í, j ۸¦ + ÃæºÐÈ÷ ´­·¯¼­ Lesson 1.1ÀÌ È­¸é¿¡ °¡µæ Â÷µµ·Ï ¿òÁ÷¿©º¾½Ã´Ù. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 1.1: Ä¿¼­ ¿òÁ÷À̱â + + ** Ä¿¼­¸¦ ¿òÁ÷ÀÌ·Á¸é, Ç¥½ÃµÈ ´ë·Î h,j,k,l ۸¦ ´©¸£½Ê½Ã¿À. ** + ^ + k ÈùÆ®: h Ű´Â ¿ÞÂÊ¿¡ ÀÖÀ¸¸ç, ¿ÞÂÊÀ¸·Î ¿òÁ÷ÀÔ´Ï´Ù. + < h l > l Ű´Â ¿À¸¥ÂÊ¿¡ ÀÖÀ¸¸ç, ¿À¸¥ÂÊÀ¸·Î + j ¿òÁ÷ÀÔ´Ï´Ù. + v j Ű´Â ¾Æ·¡¹æÇâ È­»ìǥó·³ »ý°å½À´Ï´Ù. + + 1. Àͼ÷ÇØÁú ¶§±îÁö Ä¿¼­¸¦ ½ºÅ©¸° »ó¿¡¼­ ¿òÁ÷¿© º¸½Ê½Ã¿À. + + 2. ¾Æ·¡ ¹æÇâŰ (j)¸¦ ¹Ýº¹ÀÔ·ÂÀÌ µÉ ¶§±îÁö ´©¸£°í °è½Ê½Ã¿À. +---> ÀÌÁ¦ ´ÙÀ½ lessonÀ¸·Î °¡´Â ¹æ¹ýÀ» ¾Ë°Ô µÇ¾ú½À´Ï´Ù. + + 3. ¾Æ·¡ ¹æÇâ۸¦ ÀÌ¿ëÇÏ¿©, Lesson 1.2 ·Î °¡½Ê½Ã¿À. + +Âü°í: ¿øÇÏÁö ¾Ê´Â ¹«¾ð°¡°¡ ÀÔ·ÂÀÌ µÇ¾ú´Ù¸é, ¸¦ ´­·¯¼­, ¸í·É ¸ðµå·Î + µ¹¾Æ°¡½Ê½Ã¿À. ±× ÈÄ¿¡ ¿øÇÏ´Â ¸í·ÉÀ» ´Ù½Ã ÀÔ·ÂÇϽʽÿÀ. + +Âü°í: Ä¿¼­Å° ¶ÇÇÑ ÀÛµ¿ÇÒ °ÍÀÔ´Ï´Ù. ÇÏÁö¸¸ hjkl¿¡ Àͼ÷ÇØÁö¸é, Ä¿¼­Å°º¸´Ù + ÈξÀ ºü¸£°Ô À̵¿ÇÒ ¼ö ÀÖÀ» °ÍÀÔ´Ï´Ù. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 1.2: ºöÀ» ½ÃÀÛÇÏ°í ³¡³»±â + + + !! ÁÖÀÇ: ¾Æ·¡ ÀÖ´Â ´Ü°è¸¦ ½ÇÇàÇϱâ Àü¿¡, ÀÌ lesson Àüü¸¦ ÀÐÀ¸½Ê½Ã¿À!! + + 1. ۸¦ ´­·¯¼­ È®½ÇÇÏ°Ô ¸í·É ¸ðµå·Î ºüÁ® ³ª¿É´Ï´Ù. + + 2. ´ÙÀ½°ú °°ÀÌ ÀÔ·ÂÇÕ´Ï´Ù: :q! + +---> ÀÌ·¸°Ô Çϸé, ¹Ù²ï ³»¿ëÀ» *ÀúÀåÇÏÁö ¾Ê°í* ÆíÁý±â¸¦ ºüÁ®³ª°©´Ï´Ù. + ÀúÀåÇÑ ÈÄ ºüÁ®³ª°¡·Á¸é ´ÙÀ½°ú °°ÀÌ ÀÔ·ÂÇÕ´Ï´Ù: + :wq + + 3. ½© ÇÁ·ÒÇÁÆ®°¡ º¸Àδٸé, ´Ù½Ã ±æÀâÀÌ·Î µ¹¾Æ¿À±â À§ÇØ ´ÙÀ½°ú °°ÀÌ + ÀÔ·ÂÇÕ´Ï´Ù. + vimtutor + ¶Ç´Â ´ÙÀ½°ú °°À» ¼öµµ ÀÖ½À´Ï´Ù. + vim tutor.ko + +---> 'vim' Àº ºö ÆíÁý±â·Î µé¾î°¡´Â °ÍÀ» ¶æÇϸç, 'tutor.ko'´Â ÆíÁýÇÏ·Á´Â + ÆÄÀÏÀ» ¶æÇÕ´Ï´Ù. + + 4. À§¿¡¼­ À̾߱âÇÑ ´Ü°è¸¦ ±â¾ïÇÏ¿´À¸¸ç, È®½ÅÀÌ ¼­¸é, 1¿¡¼­ 3±îÁö¸¦ + ¼öÇàÇÏ¿© ÆíÁý±â¸¦ ³ª°¬´Ù°¡ ´Ù½Ã µé¾î¿Íº¸½Ê½Ã¿À. ±× ÈÄ Ä¿¼­¸¦ ¾Æ·¡·Î + ¿òÁ÷¿© Lesson 1.3 À¸·Î °¡½Ê½Ã¿À. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 1.3: ÅØ½ºÆ® ÆíÁý - Áö¿ì±â + + +** ¸í·É ¸ðµå¿¡¼­ x ¸¦ ´©¸£¸é Ä¿¼­°¡ À§Ä¡ÇÑ °÷ÀÇ ±ÛÀÚ¸¦ Áö¿ï ¼ö ÀÖ½À´Ï´Ù. ** + + 1. ----> ·Î Ç¥½ÃµÈ °÷À¸·Î Ä¿¼­¸¦ ¿Å°Üº¸½Ê½Ã¿À. + + 2. ¿ÀŸ¸¦ ¼öÁ¤Çϱâ À§ÇØ, Ä¿¼­¸¦ Áö¿ï ±ÛÀÚ À§·Î ¿òÁ÷¿© º¸½Ê½Ã¿À. + + 3. x ۸¦ ´­·¯¼­ Áö¿ö¾ßÇÒ ±ÛÀÚ¸¦ Áö¿ì½Ê½Ã¿À. + + 4. 2¿¡¼­ 4±îÁö¸¦ ¹Ýº¹ÇÏ¿© ¹®ÀåÀÌ ¿Ã¹Ù¸£°Ô µÇµµ·Ï ÇÏ¿© º¸½Ê½Ã¿À. + +---> The ccow jumpedd ovverr thhe mooon. + + 5. ¹®ÀåÀÌ Á¤È®ÇØÁ³´Ù¸é, Lesson 1.4·Î °¡½Ê½Ã¿À. + +ÁÖÀÇ: ÀÌ ±æÀâÀ̸¦ º¸¸é¼­ ¿Ü¿ì·Á°í ÇÏÁö¸»°í, Á÷Á¢ »ç¿ëÇØº¸¸é¼­ ÀÍÈ÷±æ + ¹Ù¶ø´Ï´Ù. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 1.4: ÅØ½ºÆ® ÆíÁý - »ðÀÔ (INSERTION) + + + ** ¸í·É ¸ðµå¿¡¼­ i ¸¦ ´©¸£¸é ÅØ½ºÆ®¸¦ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù. ** + + 1. Ä¿¼­¸¦ ù¹øÂ° ---> ·Î Ç¥½ÃµÈ ÁÙ·Î ¿òÁ÷ÀÔ´Ï´Ù. + + 2. ù¹øÂ° ÁÙÀ» µÎ¹øÂ° ÁÙ°ú ¶È°°ÀÌ ¸¸µé°ÍÀÔ´Ï´Ù. ÅØ½ºÆ®°¡ µé¾î°¡¾ßÇÒ + °÷ ´ÙÀ½ºÎÅÍ Ã¹¹øÂ° ±ÛÀÚ À§¿¡ Ä¿¼­¸¦ ¿Å°Ü ³õ½À´Ï´Ù. + + 3. i ۸¦ ´©¸¥ ÈÄ, ÇÊ¿äÇÑ ³»¿ëÀ» ÀÔ·ÂÇÕ´Ï´Ù. + + 4. ¼öÁ¤ÇÑ ÈÄ¿¡´Â ¸¦ ´­·¯¼­ ¸í·É ¸ðµå·Î µ¹¾Æ°©´Ï´Ù. + ¹®ÀåÀ» ¿Ã¹Ù¸£°Ô ¸¸µé±â À§ÇØ 2¿¡¼­ 4ÀÇ °úÁ¤À» ¹Ýº¹ÇÕ´Ï´Ù. + +---> There is text misng this . +---> There is some text missing from this line. + + 5. ÅØ½ºÆ®¸¦ »ðÀÔÇÏ´Â µ¥¿¡ Àͼ÷ÇØÁ³´Ù¸é, ¿ä¾àÀ» ºÁÁֽʽÿÀ. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LESSON 1 ¿ä¾à + + + 1. Ä¿¼­¸¦ ¿òÁ÷ÀÏ ¶§¿¡´Â È­»ìÇ¥ Ű³ª hjkl ۸¦ ÀÌ¿ëÇÕ´Ï´Ù. + h (¿ÞÂÊ) j (¾Æ·¡) k (À§) l (¿À¸¥ÂÊ) + + 2. ½© ÇÁ·ÒÇÁÆ®¿¡¼­ ºöÀ» ½ÃÀÛÇÏ·Á¸é vim FILENAME + + 3. ¼öÁ¤ÇÑ ³»¿ëÀ» ¹«½ÃÇÑ Ã¤·Î ºö¿¡¼­ ºüÁ®³ª°¡·Á¸é :q! + ÀúÀåÇÑ ÈÄ ºö¿¡¼­ ºüÁ®³ª°¡·Á¸é :wq + + 4. ¸í·É ¸ðµå¿¡¼­ Ä¿¼­°¡ À§Ä¡ÇÑ °÷ÀÇ ±ÛÀÚ¸¦ Áö¿ì·Á¸é x ¸¦ ÀÔ·ÂÇÕ´Ï´Ù. + + 5. ¸í·É ¸ðµå¿¡¼­ Ä¿¼­°¡ À§Ä¡ÇÑ °÷¿¡ ÅØ½ºÆ®¸¦ »ðÀÔÇÏ·Á¸é + i ¸¦ ´©¸¥ ÈÄ ÅØ½ºÆ®¸¦ ÀÔ·ÂÇÏ°í ¸¦ ´©¸¨´Ï´Ù. + +Âü°í: ´Â ¸í·É ¸ðµå·Î µ¹¾Æ°¡´Â µ¥ ¾²¸ç, ¿øÄ¡ ¾Ê´Â ¸í·ÉÀ̳ª ¿ÏÀüÈ÷ ÀԷµÇÁö + ¾ÊÀº ¸í·ÉÀ» Ãë¼ÒÇÏ´Â µ¥¿¡µµ ¾¹´Ï´Ù. + +±×·³ Lesson 2¸¦ ½ÃÀÛÇսôÙ. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.1: »èÁ¦(DELETION) ¸í·É + + + ** ÇÑ ´Ü¾î¸¦ ³¡±îÁö Áö¿ì·Á¸é dw ¶ó°í Ä¡¸é µË´Ï´Ù. ** + + 1. ۸¦ ´­·¯¼­ È®½ÇÇÏ°Ô ¸í·É ¸ðµå·Î ºüÁ® ³ª¿É´Ï´Ù. + + 2. ¾Æ·¡¿¡ ---> ·Î Ç¥½ÃµÈ ÁÙ ±îÁö Ä¿¼­¸¦ ¿Å±é´Ï´Ù. + + 3. Áö¿ö¾ßÇÒ ´Ü¾îÀÇ Ã³À½À¸·Î Ä¿¼­¸¦ ¿Å±é´Ï´Ù. + + 4. dw ¶ó°í Ãļ­ ±× ´Ü¾î¸¦ Áö¿ó´Ï´Ù. + + ÁÖÀÇ: À§¿¡¼­ ¸»ÇÑ´ë·Î Çϸé È­¸éÀÇ ¸¶Áö¸· ÁÙ¿¡ dw ¶ó´Â ±ÛÀÚ°¡ Ç¥½ÃµË´Ï´Ù. + À߸ø ÃÆ´Ù¸é, ¸¦ ´­·¯¼­ ´Ù½Ã ½ÃÀÛÇϽʽÿÀ. + +---> There are a some words fun that don't belong paper in this sentence. + + 5. 3, 4¹ø °úÁ¤À» ´Ù½Ã ÇÏ¿© ¹®ÀåÀ» Á¤È®ÇÏ°Ô ¸¸µç µÚ Lesson 2.2·Î °¡½Ê½Ã¿À. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.2: ´Ù¸¥ »èÁ¦ ¸í·É + + ** d$ ¶ó°í Ä¡¸é ±× ÁÙ ³¡±îÁö Áö¿öÁý´Ï´Ù. ** + + 1. ۸¦ ´­·¯¼­ È®½ÇÇÏ°Ô ¸í·É ¸ðµå·Î ºüÁ® ³ª¿É´Ï´Ù. + + 2. ¾Æ·¡¿¡ ---> ·Î Ç¥½ÃµÈ ÁÙ ±îÁö Ä¿¼­¸¦ ¿Å±é´Ï´Ù. + + 3. ¿Ã¹Ù¸¥ ÁÙÀÇ ³¡À¸·Î Ä¿¼­¸¦ ¿Å±é´Ï´Ù. (ù¹øÂ°·Î ³ª¿À´Â . ´ÙÀ½ÀÔ´Ï´Ù.) + + 4. d$ ¶ó°í Ãļ­ ÁÙ ³¡±îÁö Áö¿ó´Ï´Ù. + +---> Somebody typed the end of this line twice. end of this line twice. + + + 5. ¾î¶² ÀÏÀÌ ÀϾ´ÂÁö ÀÌÇØÇϱâ À§ÇØ Lesson 2.3 À¸·Î °¡½Ê½Ã¿À. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.3: ¸í·É°ú Àû¿ë ´ë»ó¿¡ ´ëÇØ + + + »èÁ¦ ¸í·É dÀÇ Çü½ÄÀº ´ÙÀ½°ú °°½À´Ï´Ù. + + [Ƚ¼ö] d ´ë»ó ¶Ç´Â d [Ƚ¼ö] ´ë»ó + ¿©±â¼­ + Ƚ¼ö - ¸í·ÉÀ» ¸î ¹ø ¼öÇàÇÒ Áö (¿É¼Ç, ±âº»°ª=1). + d - Áö¿ì´Â ¸í·É + ´ë»ó - ¾Æ·¡¿¡ Á¦½ÃµÈ ´ë»ó¿¡ ´ëÇØ ¸í·ÉÀ» ¼öÇà + + Àû¿ë °¡´ÉÇÑ ´ë»óÀÇ Á¾·ù: + w - Ä¿¼­¿¡¼­ ±× ´Ü¾îÀÇ ³¡±îÁö (°ø¹é Æ÷ÇÔ.) + e - Ä¿¼­¿¡¼­ ±× ´Ü¾îÀÇ ³¡±îÁö (°ø¹éÀ» Æ÷ÇÔÇÏÁö ¾ÊÀ½.) + $ - Ä¿¼­¿¡¼­ ±× ÁÙÀÇ ³¡±îÁö + +Âü°í: È£±â½ÉÀÌ ÀÖ´Ù¸é, ¸í·É ¸ðµå¿¡¼­ ¸í·É ¾øÀÌ ´ë»óÀ» ÀÔ·ÂÇØº¸½Ê½Ã¿À. + À§¿¡¼­ À̾߱âÇÑ ´ë»óÀÇ ¸ñ·Ï¿¡ µû¶ó Ä¿¼­°¡ ¿òÁ÷ÀÌ°Ô µË´Ï´Ù. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.4: '¸í·É-´ë»ó' ¿¡ ´ëÇÑ ¿¹¿Ü + + + ** dd ¶ó°í Ä¡¸é ÁÙ Àüü¸¦ Áö¿ó´Ï´Ù. ** + + ÁÙ Àüü¸¦ Áö¿ì´Â ÀÏÀÌ Àæ±â ¶§¹®¿¡, Vi¸¦ µðÀÚÀÎ ÇÑ »ç¶÷µéÀº, °£´ÜÈ÷ d¸¦ + µÎ¹ø ¿¬´Þ¾Æ Ä¡¸é ÇÑ ÁÙÀ» Áö¿ï ¼ö ÀÖµµ·Ï ÇÏ¿´½À´Ï´Ù. + + 1. Ä¿¼­¸¦ ¾Æ·¡ ³ª¿Â ´Ü¶ôÀÇ µÎ¹øÂ° ÁÙ·Î °¡Á®°¡½Ê½Ã¿À. + 2. dd ¸¦ ÀÔ·ÂÇÏ¿© ±× ÁÙÀ» Áö¿ì½Ê½Ã¿À. + 3. ±×·± ´ÙÀ½ ³×¹øÂ° ÁÙ·Î °¡½Ê½Ã¿À. + 4. 2dd ¶ó°í ÀÔ·ÂÇÏ¿© µÎÁÙÀ» Áö¿ó´Ï´Ù. ( Ƚ¼ö-¸í·É-´ë»óÀ» ±â¾ïÇϼ¼¿ä. ) + + 1) Roses are red, + 2) Mud is fun, + 3) Violets are blue, + 4) I have a car, + 5) Clocks tell time, + 6) Sugar is sweet + 7) And so are you. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.5: Ãë¼Ò(UNDO) ¸í·É + + + ** u ¸¦ ´©¸£¸é ¸¶Áö¸· ¸í·ÉÀÌ Ãë¼ÒµÇ¸ç, U ´Â ÁÙ Àüü¸¦ ¼öÁ¤ÇÕ´Ï´Ù. ** + + 1. Ä¿¼­¸¦ ---> ·Î Ç¥½ÃµÈ ÁÙ·Î À̵¿ÇÑ ÈÄ Ã¹¹øÂ° À߸øµÈ ºÎºÐ À§·Î ¿Å±é´Ï´Ù. + 2. x ¸¦ ÀÔ·ÂÇÏ¿© ù¹øÂ° À߸øµÈ ±ÛÀÚ¸¦ Áö¿ó´Ï´Ù. + 3. ±×·³ ÀÌÁ¦ u ¸¦ ÀÔ·ÂÇÏ¿© ¸¶Áö¸·À¸·Î ¼öÇàµÈ ¸í·ÉÀ» Ãë¼ÒÇÕ´Ï´Ù. + 4. À̹ø¿¡´Â x ¸í·ÉÀ» ÀÌ¿ëÇÏ¿© ±× ÁÙÀÇ ¸ðµç ¿¡·¯¸¦ ¼öÁ¤Çغ¾½Ã´Ù. + 5. ´ë¹®ÀÚ U ¸¦ ´­·¯¼­ ±× ÁÙÀ» ¿ø·¡ »óÅ·Πµ¹·Á³õ¾Æ º¸½Ê½Ã¿À. + 6. À̹ø¿¡´Â u ¸¦ ¸î ¹ø ´­·¯¼­ U ¿Í ÀÌÀü ¸í·ÉÀ» Ãë¼ÒÇØº¾½Ã´Ù. + 7. CTRL-R (CTRL ۸¦ ´©¸¥ »óÅ¿¡¼­ RÀ» ´©¸£´Â °Í) À» ¸î ¹ø ´­·¯¼­ + ¸í·ÉÀ» ´Ù½Ã ½ÇÇàÇØº¾½Ã´Ù. (Ãë¼ÒÇÑ °ÍÀ» Ãë¼ÒÇÔ.) + +---> Fiix the errors oon thhis line and reeplace them witth undo. + + 8. ÀÌ ¸í·ÉÀº ¸Å¿ì À¯¿ëÇÕ´Ï´Ù. ±×·³ Lesson 2 ¿ä¾àÀ¸·Î ³Ñ¾î°¡µµ·Ï ÇսôÙ. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LESSON 2 ¿ä¾à + + + 1. Ä¿¼­°¡ À§Ä¡ÇÑ °÷ºÎÅÍ ´Ü¾îÀÇ ³¡±îÁö Áö¿ì·Á¸é: dw + + 2. Ä¿¼­°¡ À§Ä¡ÇÑ °÷ºÎÅÍ ÁÙ ³¡±îÁö Áö¿ì·Á¸é: d$ + + 3. ÁÙ Àüü¸¦ Áö¿ì·Á¸é: dd + + 4. ¸í·É ¸ðµå¿¡¼­ ³»¸®´Â ¸í·ÉÀÇ Çü½ÄÀº ´ÙÀ½°ú °°½À´Ï´Ù: + + [Ƚ¼ö] ¸í·É ´ë»ó ¶Ç´Â ¸í·É [Ƚ¼ö] ´ë»ó + ¿©±â¼­: + Ƚ¼ö - ±× ¸í·ÉÀ» ¸î ¹ø ¹Ýº¹ÇÒ °ÍÀΰ¡ + ¸í·É - ¾î¶² ¸í·ÉÀ» ³»¸± °ÍÀΰ¡ ( ¿¹¸¦ µé¾î, »èÁ¦ÀÎ °æ¿ì´Â d ) + ´ë»ó - ¸í·ÉÀÌ µ¿ÀÛÇÒ ´ë»ó, ¿¹¸¦ µé¾î w (´Ü¾î), $ (ÁÙÀÇ ³¡) µî. + + 5. ÀÌÀü ÇൿÀ» Ãë¼ÒÇÏ·Á¸é: u (¼Ò¹®ÀÚ u) + ÇÑ ÁÙ¿¡¼­ ¼öÁ¤ÇÑ °ÍÀ» ¸ðµÎ Ãë¼ÒÇÏ·Á¸é: U (´ë¹®ÀÚ U) + Ãë¼ÒÇÑ °ÍÀ» ´Ù½Ã ½ÇÇàÇÏ·Á¸é: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 3.1: ºÙÀ̱â(PUT) ¸í·É + + + ** p ¸¦ ÀÔ·ÂÇÏ¿© ¸¶Áö¸·À¸·Î Áö¿î ³»¿ëÀ» Ä¿¼­ µÚ¿¡ ºÙÀÔ´Ï´Ù. ** + + 1. ¾Æ·¡¿¡ ÀÖ´Â ¹®´ÜÀÇ Ã¹ ÁÙ·Î Ä¿¼­¸¦ ¿òÁ÷À̽ʽÿÀ. + + 2. dd ¸¦ ÀÔ·ÂÇÏ¿© ±× ÁÙÀ» Áö¿ö¼­ ºöÀÇ ¹öÆÛ¿¡ ÀúÀåÇÕ´Ï´Ù. + + 3. ¾Æ±î Áö¿î ÁÙÀÌ °¡¾ßÇÒ À§Ä¡ÀÇ *À­ÁÙ·Î* Ä¿¼­¸¦ ¿Å±é´Ï´Ù. + + 4. ¸í·É ¸ðµå¿¡¼­, p ¸¦ ÀÔ·ÂÇÏ¿© ±× ÁÙÀ» Á¦´ë·Î µÈ ÀÚ¸®·Î ¿Å±é´Ï´Ù. + + 5. 2¿¡¼­ 4¸¦ ¹Ýº¹ÇÏ¿© ¸ðµç ÁÙÀÇ ¼ø¼­¸¦ ¹Ù·Î ÀâÀ¸½Ê½Ã¿À. + + d) Can you learn too? + b) Violets are blue, + c) Intelligence is learned, + a) Roses are red, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 3.2: ġȯ(REPLACE) ¸í·É + + + ** Ä¿¼­ ¾Æ·¡ÀÇ ±ÛÀÚ Çϳª¸¦ ¹Ù²Ù·Á¸é, r À» ´©¸¥ ÈÄ ¹Ù²Ü ±ÛÀÚ¸¦ ÀÔ·ÂÇÕ´Ï´Ù. ** + + 1. Ä¿¼­¸¦ ---> ·Î Ç¥½ÃµÈ ù ÁÙ·Î ¿Å±é´Ï´Ù. + + 2. Ä¿¼­¸¦ À߸øµÈ ù ºÎºÐÀ¸·Î ¿Å±é´Ï´Ù. + + 3. r À» ´©¸¥ ÈÄ, À߸øµÈ ºÎºÐÀ» °íÃÄ ¾µ ±ÛÀÚ¸¦ ÀÔ·ÂÇÕ´Ï´Ù. + + 4. 2¿¡¼­ 3ÀÇ °úÁ¤À» ¹Ýº¹ÇÏ¿©, ù ÁÙÀÇ ¿À·ù¸¦ ¼öÁ¤ÇϽʽÿÀ. + +---> Whan this lime was tuoed in, someone presswd some wrojg keys! +---> When this line was typed in, someone pressed some wrong keys! + + 5. Lesson 3.2 ·Î À̵¿ÇսôÙ. + +ÁÖÀÇ: ¿Ü¿ìÁö ¸»°í, Á÷Á¢ ÇØº¸¸é¼­ ÀÍÇô¾ß ÇÑ´Ù´Â °ÍÀ» ÀØÁö ¸¶½Ê½Ã¿À. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 3.3: º¯È¯(CHANGE) ¸í·É + + + ** ÇÑ ´Ü¾îÀÇ ÀϺγª Àüü¸¦ ¹Ù²Ù·Á¸é, cw ¸¦ Ä¡½Ê½Ã¿À. ** + + 1. Ä¿¼­¸¦ ---> ·Î Ç¥½ÃµÈ ùÁÙ·Î ¿Å±é´Ï´Ù. + + 2. Ä¿¼­¸¦ lubw ¿¡¼­ u À§¿¡ ¿Ã·Á³õ½À´Ï´Ù. + + 3. cw ¶ó°í ¸í·ÉÇÑ ÈÄ ´Ü¾î¸¦ Á¤È®ÇÏ°Ô ¼öÁ¤ÇÕ´Ï´Ù. (ÀÌ °æ¿ì, 'ine' ¸¦ Ĩ´Ï´Ù.) + + 4. ¸¦ ´©¸¥ ÈÄ ´ÙÀ½ ¿¡·¯·Î °©´Ï´Ù (¼öÁ¤µÇ¾î¾ßÇÒ Ã¹ ±ÛÀÚ·Î °©´Ï´Ù.) + + 5. 3¿¡¼­ 4ÀÇ °úÁ¤À» ¹Ýº¹ÇÏ¿© ù¹øÂ° ¹®ÀåÀ» µÎ¹øÂ° ¹®Àå°ú °°µµ·Ï ¸¸µì´Ï´Ù. + +---> This lubw has a few wptfd that mrrf changing usf the change command. +---> This line has a few words that need changing using the change command. + +cw ´Â ´Ü¾î¸¦ ġȯÇÏ´Â °Í »Ó¸¸ ¾Æ´Ï¶ó, ³»¿ëÀ» »ðÀÔÇÒ ¼ö ÀÖµµ·Ï ÇÑ´Ù´Â °Í¿¡ +ÁÖÀÇÇսôÙ. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 3.4: c ¸¦ ÀÌ¿ëÇÑ ´Ù¸¥ º¯È¯ ¸í·É + + + ** º¯È¯ ¸í·ÉÀº »èÁ¦ÇÒ ¶§ ÀÌ¿ëÇÑ ´ë»ó¿¡ ´ëÇØ Àû¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ** + + 1. º¯È¯ ¸í·ÉÀº »èÁ¦¿Í µ¿ÀÏÇÑ ¹æ½ÄÀ¸·Î µ¿ÀÛÇÕ´Ï´Ù. Çü½ÄÀº ´ÙÀ½°ú °°½À´Ï´Ù: + + [Ƚ¼ö] c ´ë»ó ¶Ç´Â c [Ƚ¼ö] ´ë»ó + + 2. Àû¿ë °¡´ÉÇÑ ´ë»ó ¿ª½Ã °°½À´Ï´Ù. w (´Ü¾î), $ (ÁÙÀÇ ³¡) µîÀÌ ÀÖ½À´Ï´Ù. + + 3. ---> ·Î Ç¥½ÃµÈ ùÁÙ·Î À̵¿ÇÕ´Ï´Ù. + + 4. ù ¿¡·¯ À§·Î Ä¿¼­¸¦ ¿Å±é´Ï´Ù. + + 5. c$ ¸¦ ÀÔ·ÂÇÏ¿©, ±× ÁÙÀÇ ³ª¸ÓÁö°¡ µÎ¹øÂ° ÁÙó·³ µÇµµ·Ï ¼öÁ¤ÇÑ ÈÄ ¸¦ + ´©¸£½Ê½Ã¿À. + +---> The end of this line needs some help to make it like the second. +---> The end of this line needs to be corrected using the c$ command. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LESSON 3 ¿ä¾à + + + 1. ÀÌ¹Ì Áö¿î ³»¿ëÀ» µÇµ¹¸®·Á¸é, p ¸¦ ´©¸£½Ê½Ã¿À. ÀÌ ¸í·ÉÀº Ä¿¼­ *´ÙÀ½¿¡* + Áö¿öÁø ³»¿ëÀ» ºÙÀÔ´Ï´Ù(PUT). (ÇÑ ÁÙÀ» Áö¿î °æ¿ì¿¡´Â Ä¿¼­ ´ÙÀ½ ÁÙ¿¡ + Áö¿öÁø ³»¿ëÀÌ ºÙ½À´Ï´Ù.) + + 2. Ä¿¼­ ¾Æ·¡ÀÇ ±ÛÀÚ¸¦ ġȯÇÏ·Á¸é(REPLACE), r À» ´©¸¥ ÈÄ ¿ø·¡ ±ÛÀÚ ´ë½Å + ¹Ù²Ù¾î ³ÖÀ» ±ÛÀÚ¸¦ ÀÔ·ÂÇÕ´Ï´Ù. + + 3. º¯È¯ ¸í·É(CHANGE)Àº Ä¿¼­¿¡¼­ ºÎÅÍ ÁöÁ¤ÇÑ ´ë»óÀÇ ³¡±îÁö ¹Ù²Ü ¼ö ÀÖ´Â + ¸í·ÉÀÔ´Ï´Ù. ¿¹¸¦ µé¾î, Ä¿¼­ À§Ä¡¿¡¼­ ´Ü¾îÀÇ ³¡±îÁö ¹Ù²Ù·Á¸é, cw ¸¦ + ÀÔ·ÂÇÏ¸é µÇ¸ç, c$ ´Â ÁÙ ³¡±îÁö ¹Ù²Ù´Â µ¥ ¾²ÀÔ´Ï´Ù. + + 4. º¯È¯ ¸í·ÉÀÇ Çü½ÄÀº ´ÙÀ½°ú °°½À´Ï´Ù: + + [Ƚ¼ö] c ´ë»ó ¶Ç´Â c [Ƚ¼ö] ´ë»ó + +°è¼ÓÇØ¼­ ´ÙÀ½ Lesson À» ÁøÇàÇսôÙ. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 4.1: À§Ä¡¿Í ÆÄÀÏÀÇ »óÅ + + + ** CTRL-g ¸¦ ´©¸£¸é ÆÄÀÏ ³»¿¡¼­ÀÇ ÇöÀç À§Ä¡¿Í ÆÄÀÏÀÇ »óŸ¦ º¼ ¼ö ÀÖ½À´Ï´Ù. + SHIFT-G ¸¦ ´©¸£¸é ÆÄÀÏ ³»ÀÇ ÁÙ·Î À̵¿ÇÕ´Ï´Ù. ** + + ÁÖÀÇ: ¾Æ·¡ÀÇ ´Ü°è¸¦ µû¶óÇϱâ Àü¿¡, ÀÌ Lesson Àüü¸¦ ¸ÕÀú ÀÐÀ¸½Ê½Ã¿À. + + 1. CTRL ۸¦ ´©¸¥ »óÅ¿¡¼­ g ¸¦ ´©¸¨´Ï´Ù. ÆÄÀÏ À̸§°ú ÇöÀç À§Ä¡ÇÑ ÁÙÀÌ + Ç¥½ÃµÈ »óÅÂÁÙÀÌ È­¸é ¾Æ·¡¿¡ Ç¥½ÃµÉ °ÍÀÔ´Ï´Ù. 3¹øÂ° ´Ü°è¸¦ À§ÇØ ±× + ÁÙ ¹øÈ£¸¦ ±â¾ïÇÏ°í °è½Ê½Ã¿À. + + 2. SHIFT-G ¸¦ ´©¸£¸é ÆÄÀÏÀÇ ¸¶Áö¸·À¸·Î À̵¿ÇÕ´Ï´Ù. + + 3. ¾Æ±î ±â¾ïÇß´ø ÁÙ ¹øÈ£¸¦ ÀÔ·ÂÇÑ ÈÄ SHIFT-G ¸¦ ´©¸£½Ê½Ã¿À. ÀÌ·¸°Ô Çϸé + óÀ½¿¡ CTRL-g ¸¦ ´­·¶´ø Àå¼Ò·Î µÇµ¹¾Æ°¡°Ô µÉ °ÍÀÔ´Ï´Ù. + (¹øÈ£¸¦ ÀÔ·ÂÇÒ ¶§, À̰ÍÀº È­¸é¿¡ Ç¥½ÃµÇÁö ¾Ê½À´Ï´Ù.) + + 4. ÀÚ½ÅÀÌ »ý°å´Ù¸é, 1¿¡¼­ 3±îÁö¸¦ ½ÇÇàÇØº¸½Ê½Ã¿À. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 4.2: ã±â ¸í·É + + + ** / ¸¦ ´©¸¥ ÈÄ °Ë»öÇÒ ¹®±¸¸¦ ÀÔ·ÂÇϽʽÿÀ. ** + + 1. ¸í·É ¸ðµå¿¡¼­ / ¸¦ ÀÔ·ÂÇϽʽÿÀ. : ¸í·É¿¡¼­¿Í ¸¶Âù°¡Áö·Î, È­¸é ¾Æ·¡¿¡ + / ¿Í Ä¿¼­°¡ Ç¥½ÃµÉ °ÍÀÔ´Ï´Ù. + + 2. 'errroor' ¶ó°í Ä£ ÈÄ ¸¦ Ä¡½Ê½Ã¿À. ÀÌ ´Ü¾î¸¦ ãÀ¸·Á°í ÇÕ´Ï´Ù. + + 3. °°Àº ¹®±¸¸¦ ´Ù½Ã ãÀ¸·Á¸é, °£´ÜÈ÷ n À» ÀÔ·ÂÇϽʽÿÀ. + °°Àº ¹®±¸¸¦ ¹Ý´ë ¹æÇâÀ¸·Î ãÀ¸·Á¸é, Shift-N À» ÀÔ·ÂÇϽʽÿÀ. + + 4. ¹®±¸¸¦ ¿ª¹æÇâÀ¸·Î ãÀ¸·Á¸é, / ´ë½Å ? ¸¦ ÀÌ¿ëÇÏ¸é µË´Ï´Ù. + +---> "errroor" is not the way to spell error; errroor is an error. + +Âü°í: ã´Â Áß¿¡ ÆÄÀÏÀÇ ³¡¿¡ ´Ù´Ù¸£°Ô µÇ¸é, ÆÄÀÏÀÇ Ã³À½ºÎÅÍ ´Ù½Ã ã°Ô µË´Ï´Ù. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 4.3: °ýÈ£ÀÇ Â¦ ã±â + + + ** % ¸¦ ´­·¯¼­ ), ], } ÀÇ Â¦À» ã½À´Ï´Ù. ** + + 1. Ä¿¼­¸¦ ---> ·Î Ç¥½ÃµÈ ÁÙÀÇ (, [, { Áß Çϳª¿¡ °¡Á®´Ù ³õ½À´Ï´Ù. + + 2. % ¸¦ ÀÔ·ÂÇØ º¾½Ã´Ù. + + 3. Ä¿¼­°¡ ¦ÀÌ ¸Â´Â °ýÈ£·Î À̵¿ÇÒ °ÍÀÔ´Ï´Ù. + + 4. % ¸¦ ÀÔ·ÂÇÏ¿©, ÀÌÀü °ýÈ£·Î µÇµ¹¾Æ ¿É½Ã´Ù. + +---> This ( is a test line with ('s, ['s ] and {'s } in it. )) + +Âü°í: ¦ÀÌ ¸ÂÁö ¾Ê´Â °ýÈ£°¡ ÀÖ´Â ÇÁ·Î±×·¥À» µð¹ö±ëÇÒ ¶§¿¡ ¸Å¿ì À¯¿ëÇÕ´Ï´Ù! + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 4.4: ¿¡·¯¸¦ ¼öÁ¤ÇÏ´Â ¹æ¹ý + + + ** :s/old/new/g Çϸé 'old' ¸¦ 'new' ·Î ġȯ(SUBTITUTE)ÇÕ´Ï´Ù. ** + + 1. Ä¿¼­¸¦ ---> ·Î Ç¥½ÃµÈ ÁÙ¿¡ °¡Á®´Ù ³õ½À´Ï´Ù. + + 2. :s/thee/the ¸¦ ÀÔ·ÂÇÑ ÈÄ ¸¦ Ĩ´Ï´Ù. ÀÌ ¸í·ÉÀº ±× ÁÙ¿¡¼­ + óÀ½À¸·Î ¹ß°ßµÈ °Í¸¸ ¹Ù²Û´Ù´Â °Í¿¡ ÁÖÀÇÇϽʽÿÀ. + + 3. À̹ø¿¡´Â :s/thee/the/g ¸¦ ÀÔ·ÂÇÕ´Ï´Ù. ÀÌ´Â ±× ÁÙ Àüü(globally)¸¦ + ġȯÇÑ´Ù´Â °ÍÀ» ÀǹÌÇÕ´Ï´Ù. + +---> thee best time to see thee flowers is in thee spring. + + 4. µÎ ÁÙ »çÀÌÀÇ ¸ðµç ¹®ÀÚ¿­¿¡ ´ëÇØ ġȯÇÏ·Á¸é ´ÙÀ½°ú °°ÀÌ ÇÕ´Ï´Ù, + :#,#s/old/new/g #,# ´Â µÎ ÁÙÀÇ ÁÙ¹øÈ£¸¦ ¶æÇÕ´Ï´Ù. + :%s/old/new/g ÆÄÀÏ Àüü¿¡¼­ ¹ß°ßµÈ ¸ðµç °ÍÀ» ġȯÇÏ´Â °æ¿ìÀÔ´Ï´Ù. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LESSON 4 ¿ä¾à + + + 1. CTRL-g ´Â ÆÄÀÏÀÇ »óÅÂ¿Í ÆÄÀÏ ³»¿¡¼­ÀÇ ÇöÀç À§Ä¡¸¦ Ç¥½ÃÇÕ´Ï´Ù. + SHIFT-G ´Â ÆÄÀÏÀÇ ³¡À¸·Î À̵¿ÇÕ´Ï´Ù. ÁÙ¹øÈ£¸¦ ÀÔ·ÂÇÑ ÈÄ SHIFT-G¸¦ + ÀÔ·ÂÇϸé, ±× ÁÙ·Î À̵¿ÇÕ´Ï´Ù. + + 2. / ¸¦ ÀÔ·ÂÇÑ ÈÄ ¹®±¸¸¦ ÀÔ·ÂÇÏ¸é ±× ¹®±¸¸¦ ¾Æ·§¹æÇâÀ¸·Î ã½À´Ï´Ù. + ? ¸¦ ÀÔ·ÂÇÑ ÈÄ ¹®±¸¸¦ ÀÔ·ÂÇϸé À­¹æÇâÀ¸·Î ã½À´Ï´Ù. + °Ë»ö ÈÄ, n À» ÀÔ·ÂÇÏ¸é °°Àº ¹æÇâÀ¸·Î ´ÙÀ½ ¹®±¸¸¦ ãÀ¸¸ç, + Shift-N À» ÀÔ·ÂÇÏ¸é ¹Ý´ë ¹æÇâÀ¸·Î ã½À´Ï´Ù. + + 3. Ä¿¼­°¡ (,),[,],{,} À§¿¡ ÀÖÀ» ¶§¿¡ % ¸¦ ÀÔ·ÂÇÏ¸é »óÀÀÇϴ ¦À» + ã¾Æ°©´Ï´Ù. + + 4. ¾î¶² ÁÙ¿¡ óÀ½ µîÀåÇÏ´Â old¸¦ new·Î ¹Ù²Ù·Á¸é :s/old/new + ÇÑ ÁÙ¿¡ µîÀåÇÏ´Â ¸ðµç old¸¦ new·Î ¹Ù²Ù·Á¸é :s/old/new/g + µÎ ÁÙ #,# »çÀÌ¿¡¼­ ġȯÀ» ÇÏ·Á¸é :#,#s/old/new/g + ÆÄÀÏ ³»ÀÇ ¸ðµç ¹®±¸¸¦ ġȯÇÏ·Á¸é :%s/old/new/g + ¹Ù²Ü ¶§¸¶´Ù È®ÀÎÀ» °ÅÄ¡·Á¸é 'c'¸¦ ºÙ¿©¼­ :%s/old/new/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 5.1: ¿ÜºÎ ¸í·É ½ÇÇàÇÏ´Â ¹æ¹ý + + + ** :! À» ÀÔ·ÂÇÑ ÈÄ ½ÇÇàÇÏ·Á´Â ¸í·ÉÀ» ÀÔ·ÂÇϽʽÿÀ. ** + + 1. Ä£¼÷ÇÑ ¸í·ÉÀÎ : ¸¦ ÀÔ·ÂÇϸé Ä¿¼­°¡ È­¸é ¾Æ·¡·Î À̵¿ÇÕ´Ï´Ù. ¸í·ÉÀ» + ÀÔ·ÂÇÒ ¼ö ÀÖ°Ô µË´Ï´Ù. + + 2. ÀÌÁ¦ ! (´À³¦Ç¥) ¸¦ ÀÔ·ÂÇϽʽÿÀ. ÀÌ·¸°Ô ÇÏ¸é ¿ÜºÎ ½© ¸í·ÉÀ» ½ÇÇàÇÒ + ¼ö ÀÖ½À´Ï´Ù. + + 3. ½ÃÇè»ï¾Æ ! ´ÙÀ½¿¡ ls ¸¦ ÀÔ·ÂÇÑ ÈÄ ¸¦ Ãĺ¸½Ê½Ã¿À. ½© ÇÁ·ÒÇÁÆ® + ¿¡¼­Ã³·³ µð·ºÅ丮ÀÇ ¸ñ·ÏÀÌ Ãâ·ÂµÉ °ÍÀÔ´Ï´Ù. ls °¡ µ¿ÀÛÇÏÁö ¾Ê´Â´Ù¸é + :!dir À» ½ÃµµÇØ º¸½Ê½Ã¿À. + +Âü°í: ¾î¶² ¿ÜºÎ ¸í·Éµµ ÀÌ ¹æ¹ýÀ¸·Î ½ÇÇàÇÒ ¼ö ÀÖ½À´Ï´Ù. + +Âü°í: ¸ðµç : ¸í·ÉÀº ¸¦ ÃÄ¾ß ¸¶¹«¸® µË´Ï´Ù. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 5.2: º¸´Ù ÀÚ¼¼ÇÑ ÆÄÀÏ ÀúÀå + + + ** ¼öÁ¤µÈ ³»¿ëÀ» ÆÄÀÏ·Î ÀúÀåÇÏ·Á¸é, :w FILENAME ÇϽʽÿÀ. ** + + 1. :!dir ¶Ç´Â :!ls ¸¦ ÀÔ·ÂÇÏ¿© µð·ºÅ丮ÀÇ ¸®½ºÆ®¸¦ ¾ò¾î¿É´Ï´Ù. + À§ÀÇ ¸í·É ÈÄ ¸¦ ÃľßÇÑ´Ù´Â °ÍÀº ÀÌ¹Ì ¾Ë°í ÀÖÀ» °ÍÀÔ´Ï´Ù. + + 2. TEST ó·³ Á¸ÀçÇÏÁö ¾Ê´Â ÆÄÀÏ À̸§À» Çϳª °í¸£½Ê½Ã¿À. + + 3. ÀÌÁ¦ :w TEST ¶ó°í ÀÔ·ÂÇϽʽÿÀ. (TEST´Â ´ç½ÅÀÌ ¼±ÅÃÇÑ ÆÄÀÏ À̸§ÀÔ´Ï´Ù.) + + 4. ÀÌ·¸°Ô ÇÏ¸é ºö ±æÀâÀÌ ÆÄÀÏ Àüü¸¦ TEST¶ó´Â À̸§À¸·Î ÀúÀåÇÕ´Ï´Ù. + È®ÀÎÇÏ·Á¸é, :!dir À» ´Ù½Ã ÀÔ·ÂÇÏ¿©, µð·ºÅ丮¸¦ »ìÆìº¸½Ê½Ã¿À. + +Âü°í: ºöÀ» Á¾·áÇÑ ÈÄ, ºöÀ» ´Ù½Ã ½ÇÇàÇÏ¿© TEST¶ó´Â ÆÄÀÏÀ» ¿­¸é, ±× ÆÄÀÏÀº + ÀúÀåÇßÀ» ¶§¿Í ¿Ïº®È÷ °°Àº º¹»çº»ÀÏ °ÍÀÔ´Ï´Ù. + + 5. ÀÌÁ¦ ±× ÆÄÀÏÀ» Áö¿ó½Ã´Ù. + (MS-DOS¿¡¼­): !del TEST + (Unix¿¡¼­): !rm TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 5.3: ¼±ÅÃÀûÀ¸·Î ÀúÀåÇÏ´Â ¸í·É + + + ** ÆÄÀÏÀÇ ÀϺθ¦ ÀúÀåÇÏ·Á¸é, :#,# w FILENAME ÇϽʽÿÀ. ** + + 1. ´Ù½Ã Çѹø, :!dir À̳ª !ls ¸¦ ÀÔ·ÂÇÏ¿© µð·ºÅ丮ÀÇ ¸ñ·ÏÀ» ¹Þ¾Æ¿Â ÈÄ + TEST °°Àº ÀûÇÕÇÑ À̸§À» ¼±ÅÃÇÕ´Ï´Ù. + + 2. Ä¿¼­¸¦ ÀÌ ÆäÀÌÁöÀÇ Ã³À½À¸·Î ¿Å±ä ÈÄ, Ctrl-g ¸¦ ÀÔ·ÂÇÏ¿© ±× ÁÙÀÇ ÁÙ¹øÈ£¸¦ + ¾Ë¾Æ³À´Ï´Ù. ÀÌ ¹øÈ£¸¦ ±â¾ïÇϽʽÿÀ! + + 3. ÀÌÁ¦ ÀÌ ÆäÀÌÁöÀÇ ¸¶Áö¸·À¸·Î °¡¼­ Ctrl-g ¸¦ ´Ù½Ã ÀÔ·ÂÇϽʽÿÀ. ÀÌ ÁÙÀÇ + ÁÙ¹øÈ£ ¶ÇÇÑ ±â¾ïÇϽʽÿÀ! + + 4. ¾î¶² ¼½¼Ç¸¸ ÆÄÀÏ·Î ÀúÀåÇÏ·Á¸é, :#,# w TEST ¸¦ ÀÔ·ÂÇÏ¸é µË´Ï´Ù. ÀÌ ¶§ + #,# ´Â ¾Æ±î ±â¾ïÇß´ø ½ÃÀÛ°ú ³¡ ÁÙ¹øÈ£ ÀÔ´Ï´Ù. TEST´Â ÆÄÀÏ À̸§ÀÔ´Ï´Ù. + + 5. :!dir À» ÀÌ¿ëÇÏ¿© ÆÄÀÏÀÌ ¸¸µé¾îÁ³´ÂÁö È®ÀÎÇϽʽÿÀ. Áö¿ìÁö´Â ¸¶½Ê½Ã¿À. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 5.4: ÆÄÀÏ ÀоîµéÀ̱â, ÇÕÄ¡±â + + + ** ¾î¶² ÆÄÀÏÀÇ ³»¿ëÀ» »ðÀÔÇÏ·Á¸é, :r FILENAME ÇϽʽÿÀ ** + + 1. :!dir À» ÀÔ·ÂÇÏ¿© ¾Æ±î ¸¸µç TEST ÆÄÀÏÀÌ ±×´ë·Î ÀÖ´ÂÁö È®ÀÎÇϽʽÿÀ. + + 2. Ä¿¼­¸¦ ÀÌ ÆäÀÌÁöÀÇ Ã³À½À¸·Î ¿òÁ÷À̽ʽÿÀ. + +ÁÖÀÇ: 3¹øÂ° ´Ü°è¸¦ ½ÇÇàÇϸé, Lesson 5.3 À» º¸°Ô µÉ °ÍÀÔ´Ï´Ù. ±×·¸°Ô µÇ¸é + ÀÌ lessonÀ¸·Î ´Ù½Ã ³»·Á¿À½Ê½Ã¿À. + + 3. ÀÌÁ¦ TEST ÆÄÀÏÀ» ÀоîµéÀԽôÙ. :r TEST ¸í·ÉÀ» »ç¿ëÇϽʽÿÀ. TEST ´Â + ÆÄÀÏÀÇ À̸§ÀÔ´Ï´Ù. + +Âü°í: ÀоîµéÀÎ ÆÄÀÏÀº Ä¿¼­°¡ À§Ä¡ÇÑ ÁöÁ¡¿¡¼­ºÎÅÍ ³õÀÌ°Ô µË´Ï´Ù. + + 4. ÆÄÀÏÀÌ Àоîµé¿©Áø °ÍÀ» È®ÀÎÇϱâ À§ÇØ, µÚ·Î À̵¿Çؼ­ ±âÁ¸ ¹öÀü°ú ÆÄÀÏ¿¡¼­ + ÀоîµéÀÎ ¹öÀü, ÀÌ·¸°Ô Lesson 5.3 ÀÌ µÎ¹ø ¹Ýº¹µÇ¾úÀ½À» È®ÀÎÇϽʽÿÀ. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LESSON 5 ¿ä¾à + + + 1. :!command ¸¦ ÀÌ¿ëÇÏ¿© ¿ÜºÎ ¸í·ÉÀ» ½ÇÇàÇÕ´Ï´Ù. + + À¯¿ëÇÑ ¿¹: + (MS-DOS) (Unix) + :!dir :!ls - µð·ºÅ丮ÀÇ ¸ñ·ÏÀ» º¸¿©ÁØ´Ù. + :!del FILENAME :!rm FILENAME - FILENAMEÀ̶ó´Â ÆÄÀÏÀ» Áö¿î´Ù. + + 2. :w FILENAME Çϸé ÇöÀç ºö¿¡¼­ »ç¿ëÇÏ´Â ÆÄÀÏÀ» FILENAMEÀ̶ó´Â À̸§À¸·Î + µð½ºÅ©¿¡ ÀúÀåÇÕ´Ï´Ù. + + 3. :#,#w FILENAME Çϸé #ºÎÅÍ #±îÁöÀÇ ÁÙÀ» FILENAMEÀ̶ó´Â ÆÄÀÏ·Î ÀúÀåÇÕ´Ï´Ù. + + 4. :r FILENAME Àº µð½ºÅ©¿¡¼­ FILENAMEÀ̶ó´Â ÆÄÀÏÀ» ºÒ·¯µé¿©¼­ Ä¿¼­ À§Ä¡ + µÚ¿¡ ÇöÀç ÆÄÀÏÀ» Áý¾î³Ö½À´Ï´Ù. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 6.1: »õ ÁÙ ¿­±â(OPEN) ¸í·É + + + ** o ¸¦ ´©¸£¸é Ä¿¼­ ¾Æ·¡¿¡ ÁÙÀ» ¸¸µé°í ÆíÁý ¸ðµå°¡ µË´Ï´Ù. ** + + 1. ¾Æ·¡¿¡ ---> ·Î Ç¥½ÃµÈ ÁÙ·Î Ä¿¼­¸¦ ¿Å±â½Ê½Ã¿À. + + 2. o (¼Ò¹®ÀÚ)¸¦ Ãļ­ Ä¿¼­ *¾Æ·¡¿¡* ÁÙÀ» Çϳª ¿©½Ê½Ã¿À. ÆíÁý ¸ðµå°¡ µË´Ï´Ù. + Insert mode. + + 3. ---> ·Î Ç¥½ÃµÈ ÁÙÀ» º¹»çÇÑ ÈÄ ¸¦ ´­·¯¼­ ÆíÁý ¸ðµå¿¡¼­ ³ª¿À½Ê½Ã¿À. + +---> After typing o the cursor is placed on the open line in Insert mode. + + 4. Ä¿¼­ *À§¿¡* ÁÙÀ» Çϳª ¸¸µå·Á¸é, ¼Ò¹®ÀÚ o ´ë½Å ´ë¹®ÀÚ O ¸¦ Ä¡¸é µË´Ï´Ù. + ¾Æ·¡ ÀÖ´Â ÁÙ¿¡ ´ëÇØ ÀÌ ¸í·ÉÀ» ³»·Áº¸½Ê½Ã¿À. +Open up a line above this by typing Shift-O while the cursor is on this line. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 6.2: Ãß°¡(APPEND) ¸í·É + + + ** a ¸¦ ´©¸£¸é Ä¿¼­ *´ÙÀ½¿¡* ±ÛÀ» ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù. ** + + 1. Ä¿¼­¸¦ ---> ·Î Ç¥½ÃµÈ ù¹øÂ° ÁÙÀÇ ³¡À¸·Î ¿Å±é´Ï´Ù. ¸í·É ¸ðµå¿¡¼­ + $ ¸¦ ÀÌ¿ëÇϽʽÿÀ. + + 2. ¼Ò¹®ÀÚ a ¸¦ Ä¿¼­ ¾Æ·¡ ±ÛÀÚ *´ÙÀ½*¿¡ ±ÛÀ» Ãß°¡ÇÒ ¼ö ÀÖ½À´Ï´Ù. + (´ë¹®ÀÚ A´Â ±× ÁÙÀÇ ³¡¿¡ Ãß°¡ÇÕ´Ï´Ù.) + +Âü°í: ±×·¸°Ô ÇÏ½Ã¸é °íÀÛ ÁÙÀÇ ³¡¿¡ Ãß°¡¸¦ Çϱâ À§ÇØ i¸¦ ´©¸£°í, Ä¿¼­ ¾Æ·¡¿¡ + ÀÖ´ø ±ÛÀÚ¸¦ ¹Ýº¹Çϰí, ±ÛÀ» ³¢¿ö³Ö°í, ¸¦ ´­·¯ ¸í·É ¸ðµå·Î µ¹¾Æ¿Í¼­, + Ä¿¼­¸¦ ¿À¸¥ÂÊÀ¸·Î ¿Å±â°í ¸¶Áö¸·À¸·Î x±îÁö ´­·¯¾ß ÇÏ´Â ¹ø°Å·Î¿òÀ» ÇÇÇÏ½Ç + ¼ö ÀÖ½À´Ï´Ù. + + 3. ÀÌÁ¦ ù ÁÙÀ» ¿Ï¼ºÇϽʽÿÀ. Ãß°¡ ¸í·ÉÀº ÅØ½ºÆ®°¡ ÀԷµǴ À§Ä¡ ¿Ü¿¡´Â + ÆíÁý ¸ðµå¿Í ¿ÏÀüÈ÷ °°´Ù´Â °ÍÀ» À¯³äÇϽʽÿÀ. + +---> This line will allow you to practice +---> This line will allow you to practice appending text to the end of a line. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 6.3: ġȯ(REPLACE) ÀÇ ´Ù¸¥ ¹öÀü + + + ** ´ë¹®ÀÚ R À» ÀÔ·ÂÇϸé Çϳª ÀÌ»óÀÇ ±ÛÀÚ¸¦ ¹Ù²Ü ¼ö ÀÖ½À´Ï´Ù. ** + + 1. Ä¿¼­¸¦ ---> ·Î Ç¥½ÃµÈ ù¹øÂ° ÁÙ·Î ¿Å±â½Ê½Ã¿À. + + 2. Ä¿¼­¸¦ ---> ·Î Ç¥½ÃµÈ µÎ¹øÂ° ÁÙ°ú ´Ù¸¥ ù¹øÂ° ´Ü¾î À§·Î ¿Å±â½Ê½Ã¿À. + ('last' ÀÔ´Ï´Ù.) + + 3. R À» ÀÔ·ÂÇÑ ÈÄ Ã¹¹øÂ° ÁÙÀÇ ¿¹Àü ÅØ½ºÆ® À§¿¡ »õ·Î¿î ±ÛÀ» ÀÔ·ÂÇÏ¿© + ³ª¸ÓÁö ³»¿ëÀÌ µÎ¹øÂ° ÁÙ°ú °°¾ÆÁöµµ·Ï ¹Ù²ß½Ã´Ù. + +---> To make the first line the same as the last on this page use the keys. +---> To make the first line the same as the second, type R and the new text. + + 4. ¸¦ ´­·¯¼­ ³ª°¡¸é, ¹Ù²îÁö ¾ÊÀº ÅØ½ºÆ®´Â ±×´ë·Î ³²°Ô µË´Ï´Ù. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 6.4: ¿É¼Ç ¼³Á¤(SET) + + ** ã±â³ª ¹Ù²Ù±â¿¡¼­ ´ë¼Ò¹®ÀÚ ±¸ºÐÀ» ¾ø¾Ö±â À§ÇØ ¿É¼ÇÀ» ¼³Á¤ÇÕ´Ï´Ù ** + + 1. ´ÙÀ½À» ÀÔ·ÂÇÏ¿© 'ignore' ¸¦ ãÀ¸½Ê½Ã¿À: + /ignore + n ۸¦ ÀÌ¿ëÇÏ¿© ¿©·¯¹ø ¹Ýº¹ÇϽʽÿÀ. + + 2. 'ic' (´ë¼Ò¹®ÀÚ ±¸º° ¾ÈÇÔ, Ignore case) ¿É¼ÇÀ» ¼³Á¤ÇϽʽÿÀ: + :set ic + + 3. n ۸¦ ´­·¯¼­ 'ignore' ¸¦ ´Ù½Ã ã¾Æº¸½Ê½Ã¿À. + n ۸¦ °è¼Ó ´­·¯¼­ ¿©·¯¹ø ãÀ¸½Ê½Ã¿À. + + 4. 'hlsearch' ¿Í 'incsearch' ¿É¼ÇÀ» ¼³Á¤ÇսôÙ. + :set hls is + + 5. ã±â ¸í·ÉÀ» ´Ù½Ã ÀÔ·ÂÇÏ¿©, ¾î¶² ÀÏÀÌ ÀϾ´ÂÁö È®ÀÎÇØ º¸½Ê½Ã¿À: + /ignore + + 6. ãÀº ³»¿ëÀÌ °­Á¶(HIGHLIGHT)µÈ °ÍÀ» ¾ø¾Ö·Á¸é, ´ÙÀ½°ú °°ÀÌ ÀÔ·ÂÇÕ´Ï´Ù: + :nohlsearch +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LESSON 6 ¿ä¾à + + + 1. o ¸¦ ÀÔ·ÂÇϸé Ä¿¼­ *¾Æ·¡¿¡* ÇÑ ÁÙÀÌ ¿­¸®¸ç, Ä¿¼­´Â ÆíÁý ¸ðµå·Î + ¿­¸° ÁÙ À§¿¡ À§Ä¡ÇÏ°Ô µË´Ï´Ù. + ´ë¹®ÀÚ O ¸¦ ÀÔ·ÂÇϸé Ä¿¼­°¡ ÀÖ´Â ÁÙÀÇ *À§·Î* »õ ÁÙÀ» ¿­°Ô µË´Ï´Ù. + + 2. a ¸¦ ÀÔ·ÂÇϸé Ä¿¼­ *´ÙÀ½¿¡* ±ÛÀ» ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù. + ´ë¹®ÀÚ A ¸¦ ÀÔ·ÂÇϸé ÀÚµ¿À¸·Î ±× ÁÙÀÇ ³¡¿¡ ±ÛÀÚ¸¦ Ãß°¡ÇÏ°Ô µË´Ï´Ù. + + 3. ´ë¹®ÀÚ R À» ÀÔ·ÂÇÏ¸é ¸¦ ´­·¯¼­ ³ª°¡±â Àü±îÁö ¹Ù²Ù±â ¸ðµå°¡ µË´Ï´Ù. + + 4. ":set xxx" ¸¦ Çϸé "xxx" ¿É¼ÇÀÌ ¼³Á¤µË´Ï´Ù. + + + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LESSON 7: ¿Â¶óÀÎ µµ¿ò¸» ¸í·É + + + ** ¿Â¶óÀÎ µµ¿ò¸» ½Ã½ºÅÛ »ç¿ëÇϱâ ** + + ºöÀº Æø ³ÐÀº ¿Â¶óÀÎ µµ¿ò¸» ½Ã½ºÅÛÀ» Á¦°øÇÕ´Ï´Ù. µµ¿ò¸»À» º¸·Á¸é, + ´ÙÀ½ ¼¼°¡Áö Áß Çϳª¸¦ ½ÃµµÇغ¸½Ê½Ã¿À: + - ۸¦ ´©¸¥´Ù. (۰¡ ÀÖ´Â °æ¿ì) + - ۸¦ ´©¸¥´Ù. (۰¡ ÀÖ´Â °æ¿ì) + - :help ¶ó°í ÀÔ·ÂÇÑ´Ù. + + µµ¿ò¸» âÀ» ´ÝÀ¸·Á¸é :q ¶ó°í ÀÔ·ÂÇϽʽÿÀ. + + ":help" ¶ó´Â ¸í·É¿¡ ÀÎÀÚ¸¦ ÁÖ¸é ¾î¶² ÁÖÁ¦¿¡ °üÇÑ µµ¿ò¸»À» ãÀ» ¼ö ÀÖ½À´Ï´Ù. + ´ÙÀ½ ¸í·ÉÀ» ³»·Á º¸½Ê½Ã¿À. ( ۸¦ ´©¸£´Â °ÍÀ» ÀØÁö ¸¶½Ê½Ã¿À.) + + :help w + :help c_ l 키는 ì˜¤ë¥¸ìª½ì— ìžˆìœ¼ë©°, 오른쪽으로 + j 움ì§ìž…니다. + v j 키는 아래방향 화살표처럼 ìƒê²¼ìŠµë‹ˆë‹¤. + + 1. ìµìˆ™í•´ì§ˆ 때까지 커서를 스í¬ë¦° ìƒì—서 움ì§ì—¬ 보십시오. + + 2. 아래 방향키 (j)를 ë°˜ë³µìž…ë ¥ì´ ë  ë•Œê¹Œì§€ 누르고 계십시오. +---> ì´ì œ ë‹¤ìŒ lesson으로 가는 ë°©ë²•ì„ ì•Œê²Œ ë˜ì—ˆìŠµë‹ˆë‹¤. + + 3. 아래 방향키를 ì´ìš©í•˜ì—¬, Lesson 1.2 로 가십시오. + +참고: ì›í•˜ì§€ 않는 무언가가 ìž…ë ¥ì´ ë˜ì—ˆë‹¤ë©´, 를 눌러서, 명령 모드로 + ëŒì•„가십시오. ê·¸ í›„ì— ì›í•˜ëŠ” ëª…ë ¹ì„ ë‹¤ì‹œ 입력하십시오. + +참고: 커서키 ë˜í•œ ìž‘ë™í•  것입니다. 하지만 hjklì— ìµìˆ™í•´ì§€ë©´, 커서키보다 + 훨씬 빠르게 ì´ë™í•  수 ìžˆì„ ê²ƒìž…ë‹ˆë‹¤. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 1.2: ë¹”ì„ ì‹œìž‘í•˜ê³  ë내기 + + + !! 주ì˜: 아래 있는 단계를 실행하기 ì „ì—, ì´ lesson 전체를 ì½ìœ¼ì‹­ì‹œì˜¤!! + + 1. 키를 눌러서 확실하게 명령 모드로 ë¹ ì ¸ 나옵니다. + + 2. 다ìŒê³¼ ê°™ì´ ìž…ë ¥í•©ë‹ˆë‹¤: :q! + +---> ì´ë ‡ê²Œ 하면, ë°”ë€ ë‚´ìš©ì„ *저장하지 않고* 편집기를 빠져나갑니다. + 저장한 후 빠져나가려면 다ìŒê³¼ ê°™ì´ ìž…ë ¥í•©ë‹ˆë‹¤: + :wq + + 3. 쉘 프롬프트가 ë³´ì¸ë‹¤ë©´, 다시 길잡ì´ë¡œ ëŒì•„오기 위해 다ìŒê³¼ ê°™ì´ + 입력합니다. + vimtutor + ë˜ëŠ” 다ìŒê³¼ ê°™ì„ ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤. + vim tutor.ko + +---> 'vim' ì€ ë¹” 편집기로 들어가는 ê²ƒì„ ëœ»í•˜ë©°, 'tutor.ko'는 편집하려는 + 파ì¼ì„ 뜻합니다. + + 4. 위ì—서 ì´ì•¼ê¸°í•œ 단계를 기억하였으며, í™•ì‹ ì´ ì„œë©´, 1ì—서 3까지를 + 수행하여 편집기를 나갔다가 다시 들어와보십시오. ê·¸ 후 커서를 아래로 + 움ì§ì—¬ Lesson 1.3 으로 가십시오. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 1.3: í…스트 편집 - 지우기 + + +** 명령 모드ì—서 x 를 누르면 커서가 위치한 ê³³ì˜ ê¸€ìžë¥¼ 지울 수 있습니다. ** + + 1. ----> 로 í‘œì‹œëœ ê³³ìœ¼ë¡œ 커서를 옮겨보십시오. + + 2. 오타를 수정하기 위해, 커서를 지울 ê¸€ìž ìœ„로 움ì§ì—¬ 보십시오. + + 3. x 키를 눌러서 지워야할 글ìžë¥¼ 지우십시오. + + 4. 2ì—서 4까지를 반복하여 ë¬¸ìž¥ì´ ì˜¬ë°”ë¥´ê²Œ ë˜ë„ë¡ í•˜ì—¬ 보십시오. + +---> The ccow jumpedd ovverr thhe mooon. + + 5. ë¬¸ìž¥ì´ ì •í™•í•´ì¡Œë‹¤ë©´, Lesson 1.4로 가십시오. + +주ì˜: ì´ ê¸¸ìž¡ì´ë¥¼ 보면서 외우려고 하지ë§ê³ , ì§ì ‘ 사용해보면서 ìµížˆê¸¸ + ë°”ëžë‹ˆë‹¤. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 1.4: í…스트 편집 - 삽입 (INSERTION) + + + ** 명령 모드ì—서 i 를 누르면 í…스트를 입력할 수 있습니다. ** + + 1. 커서를 첫번째 ---> 로 í‘œì‹œëœ ì¤„ë¡œ 움ì§ìž…니다. + + 2. 첫번째 ì¤„ì„ ë‘번째 줄과 ë˜‘ê°™ì´ ë§Œë“¤ê²ƒìž…ë‹ˆë‹¤. í…스트가 들어가야할 + ê³³ 다ìŒë¶€í„° 첫번째 ê¸€ìž ìœ„ì— ì»¤ì„œë¥¼ 옮겨 놓습니다. + + 3. i 키를 누른 후, 필요한 ë‚´ìš©ì„ ìž…ë ¥í•©ë‹ˆë‹¤. + + 4. 수정한 후ì—는 를 눌러서 명령 모드로 ëŒì•„갑니다. + ë¬¸ìž¥ì„ ì˜¬ë°”ë¥´ê²Œ 만들기 위해 2ì—서 4ì˜ ê³¼ì •ì„ ë°˜ë³µí•©ë‹ˆë‹¤. + +---> There is text misng this . +---> There is some text missing from this line. + + 5. í…스트를 삽입하는 ë°ì— ìµìˆ™í•´ì¡Œë‹¤ë©´, ìš”ì•½ì„ ë´ì£¼ì‹­ì‹œì˜¤. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LESSON 1 요약 + + + 1. 커서를 움ì§ì¼ 때ì—는 화살표 키나 hjkl 키를 ì´ìš©í•©ë‹ˆë‹¤. + h (왼쪽) j (아래) k (위) l (오른쪽) + + 2. 쉘 프롬프트ì—서 ë¹”ì„ ì‹œìž‘í•˜ë ¤ë©´ vim FILENAME + + 3. 수정한 ë‚´ìš©ì„ ë¬´ì‹œí•œ 채로 ë¹”ì—서 빠져나가려면 :q! + 저장한 후 ë¹”ì—서 빠져나가려면 :wq + + 4. 명령 모드ì—서 커서가 위치한 ê³³ì˜ ê¸€ìžë¥¼ 지우려면 x 를 입력합니다. + + 5. 명령 모드ì—서 커서가 위치한 ê³³ì— í…스트를 삽입하려면 + i 를 누른 후 í…스트를 입력하고 를 누릅니다. + +참고: 는 명령 모드로 ëŒì•„가는 ë° ì“°ë©°, ì›ì¹˜ 않는 명령ì´ë‚˜ 완전히 ìž…ë ¥ë˜ì§€ + ì•Šì€ ëª…ë ¹ì„ ì·¨ì†Œí•˜ëŠ” ë°ì—ë„ ì”니다. + +그럼 Lesson 2를 시작합시다. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.1: ì‚­ì œ(DELETION) 명령 + + + ** 한 단어를 ë까지 지우려면 dw ë¼ê³  치면 ë©ë‹ˆë‹¤. ** + + 1. 키를 눌러서 확실하게 명령 모드로 ë¹ ì ¸ 나옵니다. + + 2. ì•„ëž˜ì— ---> 로 í‘œì‹œëœ ì¤„ 까지 커서를 옮ê¹ë‹ˆë‹¤. + + 3. 지워야할 ë‹¨ì–´ì˜ ì²˜ìŒìœ¼ë¡œ 커서를 옮ê¹ë‹ˆë‹¤. + + 4. dw ë¼ê³  ì³ì„œ ê·¸ 단어를 ì§€ì›ë‹ˆë‹¤. + + 주ì˜: 위ì—서 ë§í•œëŒ€ë¡œ 하면 í™”ë©´ì˜ ë§ˆì§€ë§‰ ì¤„ì— dw ë¼ëŠ” 글ìžê°€ 표시ë©ë‹ˆë‹¤. + 잘못 쳤다면, 를 눌러서 다시 시작하십시오. + +---> There are a some words fun that don't belong paper in this sentence. + + 5. 3, 4번 ê³¼ì •ì„ ë‹¤ì‹œ 하여 ë¬¸ìž¥ì„ ì •í™•í•˜ê²Œ 만든 ë’¤ Lesson 2.2로 가십시오. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.2: 다른 ì‚­ì œ 명령 + + ** d$ ë¼ê³  치면 ê·¸ 줄 ë까지 지워집니다. ** + + 1. 키를 눌러서 확실하게 명령 모드로 ë¹ ì ¸ 나옵니다. + + 2. ì•„ëž˜ì— ---> 로 í‘œì‹œëœ ì¤„ 까지 커서를 옮ê¹ë‹ˆë‹¤. + + 3. 올바른 ì¤„ì˜ ë으로 커서를 옮ê¹ë‹ˆë‹¤. (첫번째로 나오는 . 다ìŒìž…니다.) + + 4. d$ ë¼ê³  ì³ì„œ 줄 ë까지 ì§€ì›ë‹ˆë‹¤. + +---> Somebody typed the end of this line twice. end of this line twice. + + + 5. ì–´ë–¤ ì¼ì´ ì¼ì–´ë‚¬ëŠ”ì§€ ì´í•´í•˜ê¸° 위해 Lesson 2.3 으로 가십시오. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.3: 명령과 ì ìš© 대ìƒì— 대해 + + + ì‚­ì œ 명령 dì˜ í˜•ì‹ì€ 다ìŒê³¼ 같습니다. + + [횟수] d ëŒ€ìƒ ë˜ëŠ” d [횟수] ëŒ€ìƒ + 여기서 + 횟수 - ëª…ë ¹ì„ ëª‡ 번 수행할 ì§€ (옵션, 기본값=1). + d - 지우는 명령 + ëŒ€ìƒ - ì•„ëž˜ì— ì œì‹œëœ ëŒ€ìƒì— 대해 ëª…ë ¹ì„ ìˆ˜í–‰ + + ì ìš© 가능한 대ìƒì˜ 종류: + w - 커서ì—서 ê·¸ ë‹¨ì–´ì˜ ë까지 (공백 í¬í•¨.) + e - 커서ì—서 ê·¸ ë‹¨ì–´ì˜ ë까지 (ê³µë°±ì„ í¬í•¨í•˜ì§€ 않ìŒ.) + $ - 커서ì—서 ê·¸ ì¤„ì˜ ë까지 + +참고: í˜¸ê¸°ì‹¬ì´ ìžˆë‹¤ë©´, 명령 모드ì—서 명령 ì—†ì´ ëŒ€ìƒì„ 입력해보십시오. + 위ì—서 ì´ì•¼ê¸°í•œ 대ìƒì˜ 목ë¡ì— ë”°ë¼ ì»¤ì„œê°€ 움ì§ì´ê²Œ ë©ë‹ˆë‹¤. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.4: '명령-대ìƒ' ì— ëŒ€í•œ 예외 + + + ** dd ë¼ê³  치면 줄 전체를 ì§€ì›ë‹ˆë‹¤. ** + + 줄 전체를 지우는 ì¼ì´ 잦기 때문ì—, Vi를 ë””ìžì¸ 한 사람들ì€, 간단히 d를 + ë‘번 연달아 치면 한 ì¤„ì„ ì§€ìš¸ 수 있ë„ë¡ í•˜ì˜€ìŠµë‹ˆë‹¤. + + 1. 커서를 아래 나온 단ë½ì˜ ë‘번째 줄로 가져가십시오. + 2. dd 를 입력하여 ê·¸ ì¤„ì„ ì§€ìš°ì‹­ì‹œì˜¤. + 3. 그런 ë‹¤ìŒ ë„¤ë²ˆì§¸ 줄로 가십시오. + 4. 2dd ë¼ê³  입력하여 ë‘ì¤„ì„ ì§€ì›ë‹ˆë‹¤. ( 횟수-명령-대ìƒì„ 기억하세요. ) + + 1) Roses are red, + 2) Mud is fun, + 3) Violets are blue, + 4) I have a car, + 5) Clocks tell time, + 6) Sugar is sweet + 7) And so are you. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.5: 취소(UNDO) 명령 + + + ** u 를 누르면 마지막 ëª…ë ¹ì´ ì·¨ì†Œë˜ë©°, U 는 줄 전체를 수정합니다. ** + + 1. 커서를 ---> 로 í‘œì‹œëœ ì¤„ë¡œ ì´ë™í•œ 후 첫번째 ìž˜ëª»ëœ ë¶€ë¶„ 위로 옮ê¹ë‹ˆë‹¤. + 2. x 를 입력하여 첫번째 ìž˜ëª»ëœ ê¸€ìžë¥¼ ì§€ì›ë‹ˆë‹¤. + 3. 그럼 ì´ì œ u 를 입력하여 마지막으로 ìˆ˜í–‰ëœ ëª…ë ¹ì„ ì·¨ì†Œí•©ë‹ˆë‹¤. + 4. ì´ë²ˆì—는 x ëª…ë ¹ì„ ì´ìš©í•˜ì—¬ ê·¸ ì¤„ì˜ ëª¨ë“  ì—러를 수정해봅시다. + 5. ëŒ€ë¬¸ìž U 를 눌러서 ê·¸ ì¤„ì„ ì›ëž˜ ìƒíƒœë¡œ ëŒë ¤ë†“ì•„ 보십시오. + 6. ì´ë²ˆì—는 u 를 몇 번 눌러서 U 와 ì´ì „ ëª…ë ¹ì„ ì·¨ì†Œí•´ë´…ì‹œë‹¤. + 7. CTRL-R (CTRL 키를 누른 ìƒíƒœì—서 Rì„ ëˆ„ë¥´ëŠ” 것) ì„ ëª‡ 번 눌러서 + ëª…ë ¹ì„ ë‹¤ì‹œ 실행해봅시다. (취소한 ê²ƒì„ ì·¨ì†Œí•¨.) + +---> Fiix the errors oon thhis line and reeplace them witth undo. + + 8. ì´ ëª…ë ¹ì€ ë§¤ìš° 유용합니다. 그럼 Lesson 2 요약으로 넘어가ë„ë¡ í•©ì‹œë‹¤. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LESSON 2 요약 + + + 1. 커서가 위치한 곳부터 ë‹¨ì–´ì˜ ë까지 지우려면: dw + + 2. 커서가 위치한 곳부터 줄 ë까지 지우려면: d$ + + 3. 줄 전체를 지우려면: dd + + 4. 명령 모드ì—서 내리는 ëª…ë ¹ì˜ í˜•ì‹ì€ 다ìŒê³¼ 같습니다: + + [횟수] 명령 ëŒ€ìƒ ë˜ëŠ” 명령 [횟수] ëŒ€ìƒ + 여기서: + 횟수 - ê·¸ ëª…ë ¹ì„ ëª‡ 번 반복할 것ì¸ê°€ + 명령 - ì–´ë–¤ ëª…ë ¹ì„ ë‚´ë¦´ 것ì¸ê°€ ( 예를 들어, ì‚­ì œì¸ ê²½ìš°ëŠ” d ) + ëŒ€ìƒ - ëª…ë ¹ì´ ë™ìž‘í•  대ìƒ, 예를 들어 w (단어), $ (ì¤„ì˜ ë) 등. + + 5. ì´ì „ í–‰ë™ì„ 취소하려면: u (ì†Œë¬¸ìž u) + 한 줄ì—서 수정한 ê²ƒì„ ëª¨ë‘ ì·¨ì†Œí•˜ë ¤ë©´: U (ëŒ€ë¬¸ìž U) + 취소한 ê²ƒì„ ë‹¤ì‹œ 실행하려면: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 3.1: ë¶™ì´ê¸°(PUT) 명령 + + + ** p 를 입력하여 마지막으로 지운 ë‚´ìš©ì„ ì»¤ì„œ ë’¤ì— ë¶™ìž…ë‹ˆë‹¤. ** + + 1. ì•„ëž˜ì— ìžˆëŠ” ë¬¸ë‹¨ì˜ ì²« 줄로 커서를 움ì§ì´ì‹­ì‹œì˜¤. + + 2. dd 를 입력하여 ê·¸ ì¤„ì„ ì§€ì›Œì„œ ë¹”ì˜ ë²„í¼ì— 저장합니다. + + 3. 아까 지운 ì¤„ì´ ê°€ì•¼í•  ìœ„ì¹˜ì˜ *윗줄로* 커서를 옮ê¹ë‹ˆë‹¤. + + 4. 명령 모드ì—서, p 를 입력하여 ê·¸ ì¤„ì„ ì œëŒ€ë¡œ ëœ ìžë¦¬ë¡œ 옮ê¹ë‹ˆë‹¤. + + 5. 2ì—서 4를 반복하여 모든 ì¤„ì˜ ìˆœì„œë¥¼ 바로 잡으십시오. + + d) Can you learn too? + b) Violets are blue, + c) Intelligence is learned, + a) Roses are red, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 3.2: 치환(REPLACE) 명령 + + + ** 커서 ì•„ëž˜ì˜ ê¸€ìž í•˜ë‚˜ë¥¼ 바꾸려면, r ì„ ëˆ„ë¥¸ 후 바꿀 글ìžë¥¼ 입력합니다. ** + + 1. 커서를 ---> 로 í‘œì‹œëœ ì²« 줄로 옮ê¹ë‹ˆë‹¤. + + 2. 커서를 ìž˜ëª»ëœ ì²« 부분으로 옮ê¹ë‹ˆë‹¤. + + 3. r ì„ ëˆ„ë¥¸ 후, ìž˜ëª»ëœ ë¶€ë¶„ì„ ê³ ì³ ì“¸ 글ìžë¥¼ 입력합니다. + + 4. 2ì—서 3ì˜ ê³¼ì •ì„ ë°˜ë³µí•˜ì—¬, 첫 ì¤„ì˜ ì˜¤ë¥˜ë¥¼ 수정하십시오. + +---> Whan this lime was tuoed in, someone presswd some wrojg keys! +---> When this line was typed in, someone pressed some wrong keys! + + 5. Lesson 3.2 로 ì´ë™í•©ì‹œë‹¤. + +주ì˜: 외우지 ë§ê³ , ì§ì ‘ 해보면서 ìµí˜€ì•¼ 한다는 ê²ƒì„ ìžŠì§€ 마십시오. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 3.3: 변환(CHANGE) 명령 + + + ** 한 ë‹¨ì–´ì˜ ì¼ë¶€ë‚˜ 전체를 바꾸려면, cw 를 치십시오. ** + + 1. 커서를 ---> 로 í‘œì‹œëœ ì²«ì¤„ë¡œ 옮ê¹ë‹ˆë‹¤. + + 2. 커서를 lubw ì—서 u ìœ„ì— ì˜¬ë ¤ë†“ìŠµë‹ˆë‹¤. + + 3. cw ë¼ê³  명령한 후 단어를 정확하게 수정합니다. (ì´ ê²½ìš°, 'ine' 를 칩니다.) + + 4. 를 누른 후 ë‹¤ìŒ ì—러로 갑니다 (수정ë˜ì–´ì•¼í•  첫 글ìžë¡œ 갑니다.) + + 5. 3ì—서 4ì˜ ê³¼ì •ì„ ë°˜ë³µí•˜ì—¬ 첫번째 ë¬¸ìž¥ì„ ë‘번째 문장과 ê°™ë„ë¡ ë§Œë“­ë‹ˆë‹¤. + +---> This lubw has a few wptfd that mrrf changing usf the change command. +---> This line has a few words that need changing using the change command. + +cw 는 단어를 치환하는 것 ë¿ë§Œ 아니ë¼, ë‚´ìš©ì„ ì‚½ìž…í•  수 있ë„ë¡ í•œë‹¤ëŠ” ê²ƒì— +주ì˜í•©ì‹œë‹¤. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 3.4: c 를 ì´ìš©í•œ 다른 변환 명령 + + + ** 변환 ëª…ë ¹ì€ ì‚­ì œí•  때 ì´ìš©í•œ 대ìƒì— 대해 ì ìš©í•  수 있습니다. ** + + 1. 변환 ëª…ë ¹ì€ ì‚­ì œì™€ ë™ì¼í•œ ë°©ì‹ìœ¼ë¡œ ë™ìž‘합니다. 형ì‹ì€ 다ìŒê³¼ 같습니다: + + [횟수] c ëŒ€ìƒ ë˜ëŠ” c [횟수] ëŒ€ìƒ + + 2. ì ìš© 가능한 ëŒ€ìƒ ì—­ì‹œ 같습니다. w (단어), $ (ì¤„ì˜ ë) ë“±ì´ ìžˆìŠµë‹ˆë‹¤. + + 3. ---> 로 í‘œì‹œëœ ì²«ì¤„ë¡œ ì´ë™í•©ë‹ˆë‹¤. + + 4. 첫 ì—러 위로 커서를 옮ê¹ë‹ˆë‹¤. + + 5. c$ 를 입력하여, ê·¸ ì¤„ì˜ ë‚˜ë¨¸ì§€ê°€ ë‘번째 줄처럼 ë˜ë„ë¡ ìˆ˜ì •í•œ 후 를 + 누르십시오. + +---> The end of this line needs some help to make it like the second. +---> The end of this line needs to be corrected using the c$ command. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LESSON 3 요약 + + + 1. ì´ë¯¸ 지운 ë‚´ìš©ì„ ë˜ëŒë¦¬ë ¤ë©´, p 를 누르십시오. ì´ ëª…ë ¹ì€ ì»¤ì„œ *다ìŒì—* + 지워진 ë‚´ìš©ì„ ë¶™ìž…ë‹ˆë‹¤(PUT). (한 ì¤„ì„ ì§€ìš´ 경우ì—는 커서 ë‹¤ìŒ ì¤„ì— + 지워진 ë‚´ìš©ì´ ë¶™ìŠµë‹ˆë‹¤.) + + 2. 커서 ì•„ëž˜ì˜ ê¸€ìžë¥¼ 치환하려면(REPLACE), r ì„ ëˆ„ë¥¸ 후 ì›ëž˜ ê¸€ìž ëŒ€ì‹  + 바꾸어 ë„£ì„ ê¸€ìžë¥¼ 입력합니다. + + 3. 변환 명령(CHANGE)ì€ ì»¤ì„œì—서 부터 지정한 대ìƒì˜ ë까지 바꿀 수 있는 + 명령입니다. 예를 들어, 커서 위치ì—서 ë‹¨ì–´ì˜ ë까지 바꾸려면, cw 를 + 입력하면 ë˜ë©°, c$ 는 줄 ë까지 바꾸는 ë° ì“°ìž…ë‹ˆë‹¤. + + 4. 변환 ëª…ë ¹ì˜ í˜•ì‹ì€ 다ìŒê³¼ 같습니다: + + [횟수] c ëŒ€ìƒ ë˜ëŠ” c [횟수] ëŒ€ìƒ + +계ì†í•´ì„œ ë‹¤ìŒ Lesson ì„ ì§„í–‰í•©ì‹œë‹¤. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 4.1: 위치와 파ì¼ì˜ ìƒíƒœ + + + ** CTRL-g 를 누르면 íŒŒì¼ ë‚´ì—ì„œì˜ í˜„ìž¬ 위치와 파ì¼ì˜ ìƒíƒœë¥¼ ë³¼ 수 있습니다. + SHIFT-G 를 누르면 íŒŒì¼ ë‚´ì˜ ì¤„ë¡œ ì´ë™í•©ë‹ˆë‹¤. ** + + 주ì˜: ì•„ëž˜ì˜ ë‹¨ê³„ë¥¼ ë”°ë¼í•˜ê¸° ì „ì—, ì´ Lesson 전체를 먼저 ì½ìœ¼ì‹­ì‹œì˜¤. + + 1. CTRL 키를 누른 ìƒíƒœì—서 g 를 누릅니다. íŒŒì¼ ì´ë¦„ê³¼ 현재 위치한 ì¤„ì´ + í‘œì‹œëœ ìƒíƒœì¤„ì´ í™”ë©´ ì•„ëž˜ì— í‘œì‹œë  ê²ƒìž…ë‹ˆë‹¤. 3번째 단계를 위해 ê·¸ + 줄 번호를 기억하고 계십시오. + + 2. SHIFT-G 를 누르면 파ì¼ì˜ 마지막으로 ì´ë™í•©ë‹ˆë‹¤. + + 3. 아까 ê¸°ì–µí–ˆë˜ ì¤„ 번호를 입력한 후 SHIFT-G 를 누르십시오. ì´ë ‡ê²Œ 하면 + 처ìŒì— CTRL-g 를 ëˆŒë €ë˜ ìž¥ì†Œë¡œ ë˜ëŒì•„가게 ë  ê²ƒìž…ë‹ˆë‹¤. + (번호를 입력할 때, ì´ê²ƒì€ í™”ë©´ì— í‘œì‹œë˜ì§€ 않습니다.) + + 4. ìžì‹ ì´ ìƒê²¼ë‹¤ë©´, 1ì—서 3까지를 실행해보십시오. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 4.2: 찾기 명령 + + + ** / 를 누른 후 검색할 문구를 입력하십시오. ** + + 1. 명령 모드ì—서 / 를 입력하십시오. : 명령ì—서와 마찬가지로, 화면 ì•„ëž˜ì— + / 와 커서가 í‘œì‹œë  ê²ƒìž…ë‹ˆë‹¤. + + 2. 'errroor' ë¼ê³  친 후 를 치십시오. ì´ ë‹¨ì–´ë¥¼ 찾으려고 합니다. + + 3. ê°™ì€ ë¬¸êµ¬ë¥¼ 다시 찾으려면, 간단히 n ì„ ìž…ë ¥í•˜ì‹­ì‹œì˜¤. + ê°™ì€ ë¬¸êµ¬ë¥¼ 반대 방향으로 찾으려면, Shift-N ì„ ìž…ë ¥í•˜ì‹­ì‹œì˜¤. + + 4. 문구를 역방향으로 찾으려면, / 대신 ? 를 ì´ìš©í•˜ë©´ ë©ë‹ˆë‹¤. + +---> "errroor" is not the way to spell error; errroor is an error. + +참고: 찾는 ì¤‘ì— íŒŒì¼ì˜ ëì— ë‹¤ë‹¤ë¥´ê²Œ ë˜ë©´, 파ì¼ì˜ 처ìŒë¶€í„° 다시 찾게 ë©ë‹ˆë‹¤. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 4.3: ê´„í˜¸ì˜ ì§ ì°¾ê¸° + + + ** % 를 눌러서 ), ], } ì˜ ì§ì„ 찾습니다. ** + + 1. 커서를 ---> 로 í‘œì‹œëœ ì¤„ì˜ (, [, { 중 í•˜ë‚˜ì— ê°€ì ¸ë‹¤ 놓습니다. + + 2. % 를 입력해 봅시다. + + 3. 커서가 ì§ì´ 맞는 괄호로 ì´ë™í•  것입니다. + + 4. % 를 입력하여, ì´ì „ 괄호로 ë˜ëŒì•„ 옵시다. + +---> This ( is a test line with ('s, ['s ] and {'s } in it. )) + +참고: ì§ì´ ë§žì§€ 않는 괄호가 있는 í”„ë¡œê·¸ëž¨ì„ ë””ë²„ê¹…í•  ë•Œì— ë§¤ìš° 유용합니다! + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 4.4: ì—러를 수정하는 방법 + + + ** :s/old/new/g 하면 'old' 를 'new' 로 치환(SUBTITUTE)합니다. ** + + 1. 커서를 ---> 로 í‘œì‹œëœ ì¤„ì— ê°€ì ¸ë‹¤ 놓습니다. + + 2. :s/thee/the 를 입력한 후 를 칩니다. ì´ ëª…ë ¹ì€ ê·¸ 줄ì—서 + 처ìŒìœ¼ë¡œ ë°œê²¬ëœ ê²ƒë§Œ 바꾼다는 ê²ƒì— ì£¼ì˜í•˜ì‹­ì‹œì˜¤. + + 3. ì´ë²ˆì—는 :s/thee/the/g 를 입력합니다. ì´ëŠ” ê·¸ 줄 ì „ì²´(globally)를 + 치환한다는 ê²ƒì„ ì˜ë¯¸í•©ë‹ˆë‹¤. + +---> thee best time to see thee flowers is in thee spring. + + 4. ë‘ ì¤„ 사ì´ì˜ 모든 문ìžì—´ì— 대해 치환하려면 다ìŒê³¼ ê°™ì´ í•©ë‹ˆë‹¤, + :#,#s/old/new/g #,# 는 ë‘ ì¤„ì˜ ì¤„ë²ˆí˜¸ë¥¼ 뜻합니다. + :%s/old/new/g íŒŒì¼ ì „ì²´ì—서 ë°œê²¬ëœ ëª¨ë“  ê²ƒì„ ì¹˜í™˜í•˜ëŠ” 경우입니다. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LESSON 4 요약 + + + 1. CTRL-g 는 파ì¼ì˜ ìƒíƒœì™€ íŒŒì¼ ë‚´ì—ì„œì˜ í˜„ìž¬ 위치를 표시합니다. + SHIFT-G 는 파ì¼ì˜ ë으로 ì´ë™í•©ë‹ˆë‹¤. 줄번호를 입력한 후 SHIFT-G를 + 입력하면, ê·¸ 줄로 ì´ë™í•©ë‹ˆë‹¤. + + 2. / 를 입력한 후 문구를 입력하면 ê·¸ 문구를 아랫방향으로 찾습니다. + ? 를 입력한 후 문구를 입력하면 윗방향으로 찾습니다. + 검색 후, n ì„ ìž…ë ¥í•˜ë©´ ê°™ì€ ë°©í–¥ìœ¼ë¡œ ë‹¤ìŒ ë¬¸êµ¬ë¥¼ 찾으며, + Shift-N ì„ ìž…ë ¥í•˜ë©´ 반대 방향으로 찾습니다. + + 3. 커서가 (,),[,],{,} ìœ„ì— ìžˆì„ ë•Œì— % 를 입력하면 ìƒì‘하는 ì§ì„ + 찾아갑니다. + + 4. ì–´ë–¤ ì¤„ì— ì²˜ìŒ ë“±ìž¥í•˜ëŠ” old를 new로 바꾸려면 :s/old/new + 한 ì¤„ì— ë“±ìž¥í•˜ëŠ” 모든 old를 new로 바꾸려면 :s/old/new/g + ë‘ ì¤„ #,# 사ì´ì—서 ì¹˜í™˜ì„ í•˜ë ¤ë©´ :#,#s/old/new/g + íŒŒì¼ ë‚´ì˜ ëª¨ë“  문구를 치환하려면 :%s/old/new/g + 바꿀 때마다 확ì¸ì„ 거치려면 'c'를 붙여서 :%s/old/new/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 5.1: 외부 명령 실행하는 방법 + + + ** :! ì„ ìž…ë ¥í•œ 후 실행하려는 ëª…ë ¹ì„ ìž…ë ¥í•˜ì‹­ì‹œì˜¤. ** + + 1. 친숙한 ëª…ë ¹ì¸ : 를 입력하면 커서가 화면 아래로 ì´ë™í•©ë‹ˆë‹¤. ëª…ë ¹ì„ + 입력할 수 있게 ë©ë‹ˆë‹¤. + + 2. ì´ì œ ! (ëŠë‚Œí‘œ) 를 입력하십시오. ì´ë ‡ê²Œ 하면 외부 쉘 ëª…ë ¹ì„ ì‹¤í–‰í•  + 수 있습니다. + + 3. 시험삼아 ! 다ìŒì— ls 를 입력한 후 를 ì³ë³´ì‹­ì‹œì˜¤. 쉘 프롬프트 + ì—서처럼 ë””ë ‰í† ë¦¬ì˜ ëª©ë¡ì´ ì¶œë ¥ë  ê²ƒìž…ë‹ˆë‹¤. ls ê°€ ë™ìž‘하지 않는다면 + :!dir ì„ ì‹œë„í•´ 보십시오. + +참고: ì–´ë–¤ 외부 ëª…ë ¹ë„ ì´ ë°©ë²•ìœ¼ë¡œ 실행할 수 있습니다. + +참고: 모든 : ëª…ë ¹ì€ ë¥¼ ì³ì•¼ 마무리 ë©ë‹ˆë‹¤. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 5.2: 보다 ìžì„¸í•œ íŒŒì¼ ì €ìž¥ + + + ** ìˆ˜ì •ëœ ë‚´ìš©ì„ íŒŒì¼ë¡œ 저장하려면, :w FILENAME 하십시오. ** + + 1. :!dir ë˜ëŠ” :!ls 를 입력하여 ë””ë ‰í† ë¦¬ì˜ ë¦¬ìŠ¤íŠ¸ë¥¼ 얻어옵니다. + ìœ„ì˜ ëª…ë ¹ 후 를 ì³ì•¼í•œë‹¤ëŠ” ê²ƒì€ ì´ë¯¸ 알고 ìžˆì„ ê²ƒìž…ë‹ˆë‹¤. + + 2. TEST 처럼 존재하지 않는 íŒŒì¼ ì´ë¦„ì„ í•˜ë‚˜ 고르십시오. + + 3. ì´ì œ :w TEST ë¼ê³  입력하십시오. (TEST는 ë‹¹ì‹ ì´ ì„ íƒí•œ íŒŒì¼ ì´ë¦„입니다.) + + 4. ì´ë ‡ê²Œ 하면 ë¹” ê¸¸ìž¡ì´ íŒŒì¼ ì „ì²´ë¥¼ TESTë¼ëŠ” ì´ë¦„으로 저장합니다. + 확ì¸í•˜ë ¤ë©´, :!dir ì„ ë‹¤ì‹œ 입력하여, 디렉토리를 살펴보십시오. + +참고: ë¹”ì„ ì¢…ë£Œí•œ 후, ë¹”ì„ ë‹¤ì‹œ 실행하여 TESTë¼ëŠ” 파ì¼ì„ ì—´ë©´, ê·¸ 파ì¼ì€ + ì €ìž¥í–ˆì„ ë•Œì™€ 완벽히 ê°™ì€ ë³µì‚¬ë³¸ì¼ ê²ƒìž…ë‹ˆë‹¤. + + 5. ì´ì œ ê·¸ 파ì¼ì„ ì§€ì›ì‹œë‹¤. + (MS-DOSì—서): !del TEST + (Unixì—서): !rm TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 5.3: ì„ íƒì ìœ¼ë¡œ 저장하는 명령 + + + ** 파ì¼ì˜ ì¼ë¶€ë¥¼ 저장하려면, :#,# w FILENAME 하십시오. ** + + 1. 다시 한번, :!dir ì´ë‚˜ !ls 를 입력하여 ë””ë ‰í† ë¦¬ì˜ ëª©ë¡ì„ 받아온 후 + TEST ê°™ì€ ì í•©í•œ ì´ë¦„ì„ ì„ íƒí•©ë‹ˆë‹¤. + + 2. 커서를 ì´ íŽ˜ì´ì§€ì˜ 처ìŒìœ¼ë¡œ 옮긴 후, Ctrl-g 를 입력하여 ê·¸ ì¤„ì˜ ì¤„ë²ˆí˜¸ë¥¼ + 알아냅니다. ì´ ë²ˆí˜¸ë¥¼ 기억하십시오! + + 3. ì´ì œ ì´ íŽ˜ì´ì§€ì˜ 마지막으로 가서 Ctrl-g 를 다시 입력하십시오. ì´ ì¤„ì˜ + 줄번호 ë˜í•œ 기억하십시오! + + 4. ì–´ë–¤ 섹션만 파ì¼ë¡œ 저장하려면, :#,# w TEST 를 입력하면 ë©ë‹ˆë‹¤. ì´ ë•Œ + #,# 는 아까 ê¸°ì–µí–ˆë˜ ì‹œìž‘ê³¼ ë 줄번호 입니다. TEST는 íŒŒì¼ ì´ë¦„입니다. + + 5. :!dir ì„ ì´ìš©í•˜ì—¬ 파ì¼ì´ 만들어졌는지 확ì¸í•˜ì‹­ì‹œì˜¤. 지우지는 마십시오. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 5.4: íŒŒì¼ ì½ì–´ë“¤ì´ê¸°, 합치기 + + + ** ì–´ë–¤ 파ì¼ì˜ ë‚´ìš©ì„ ì‚½ìž…í•˜ë ¤ë©´, :r FILENAME 하십시오 ** + + 1. :!dir ì„ ìž…ë ¥í•˜ì—¬ 아까 만든 TEST 파ì¼ì´ 그대로 있는지 확ì¸í•˜ì‹­ì‹œì˜¤. + + 2. 커서를 ì´ íŽ˜ì´ì§€ì˜ 처ìŒìœ¼ë¡œ 움ì§ì´ì‹­ì‹œì˜¤. + +주ì˜: 3번째 단계를 실행하면, Lesson 5.3 ì„ ë³´ê²Œ ë  ê²ƒìž…ë‹ˆë‹¤. 그렇게 ë˜ë©´ + ì´ lesson으로 다시 내려오십시오. + + 3. ì´ì œ TEST 파ì¼ì„ ì½ì–´ë“¤ìž…시다. :r TEST ëª…ë ¹ì„ ì‚¬ìš©í•˜ì‹­ì‹œì˜¤. TEST 는 + 파ì¼ì˜ ì´ë¦„입니다. + +참고: ì½ì–´ë“¤ì¸ 파ì¼ì€ 커서가 위치한 ì§€ì ì—서부터 놓ì´ê²Œ ë©ë‹ˆë‹¤. + + 4. 파ì¼ì´ ì½ì–´ë“¤ì—¬ì§„ ê²ƒì„ í™•ì¸í•˜ê¸° 위해, 뒤로 ì´ë™í•´ì„œ 기존 버전과 파ì¼ì—서 + ì½ì–´ë“¤ì¸ 버전, ì´ë ‡ê²Œ Lesson 5.3 ì´ ë‘번 반복ë˜ì—ˆìŒì„ 확ì¸í•˜ì‹­ì‹œì˜¤. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LESSON 5 요약 + + + 1. :!command 를 ì´ìš©í•˜ì—¬ 외부 ëª…ë ¹ì„ ì‹¤í–‰í•©ë‹ˆë‹¤. + + 유용한 예: + (MS-DOS) (Unix) + :!dir :!ls - ë””ë ‰í† ë¦¬ì˜ ëª©ë¡ì„ 보여준다. + :!del FILENAME :!rm FILENAME - FILENAMEì´ë¼ëŠ” 파ì¼ì„ 지운다. + + 2. :w FILENAME 하면 현재 ë¹”ì—서 사용하는 파ì¼ì„ FILENAMEì´ë¼ëŠ” ì´ë¦„으로 + 디스í¬ì— 저장합니다. + + 3. :#,#w FILENAME 하면 #부터 #ê¹Œì§€ì˜ ì¤„ì„ FILENAMEì´ë¼ëŠ” 파ì¼ë¡œ 저장합니다. + + 4. :r FILENAME ì€ ë””ìŠ¤í¬ì—서 FILENAMEì´ë¼ëŠ” 파ì¼ì„ 불러들여서 커서 위치 + ë’¤ì— í˜„ìž¬ 파ì¼ì„ 집어넣습니다. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 6.1: 새 줄 열기(OPEN) 명령 + + + ** o 를 누르면 커서 ì•„ëž˜ì— ì¤„ì„ ë§Œë“¤ê³  편집 모드가 ë©ë‹ˆë‹¤. ** + + 1. ì•„ëž˜ì— ---> 로 í‘œì‹œëœ ì¤„ë¡œ 커서를 옮기십시오. + + 2. o (소문ìž)를 ì³ì„œ 커서 *아래ì—* ì¤„ì„ í•˜ë‚˜ 여십시오. 편집 모드가 ë©ë‹ˆë‹¤. + Insert mode. + + 3. ---> 로 í‘œì‹œëœ ì¤„ì„ ë³µì‚¬í•œ 후 를 눌러서 편집 모드ì—서 나오십시오. + +---> After typing o the cursor is placed on the open line in Insert mode. + + 4. 커서 *위ì—* ì¤„ì„ í•˜ë‚˜ 만드려면, ì†Œë¬¸ìž o 대신 ëŒ€ë¬¸ìž O 를 치면 ë©ë‹ˆë‹¤. + 아래 있는 ì¤„ì— ëŒ€í•´ ì´ ëª…ë ¹ì„ ë‚´ë ¤ë³´ì‹­ì‹œì˜¤. +Open up a line above this by typing Shift-O while the cursor is on this line. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 6.2: 추가(APPEND) 명령 + + + ** a 를 누르면 커서 *다ìŒì—* ê¸€ì„ ìž…ë ¥í•  수 있습니다. ** + + 1. 커서를 ---> 로 í‘œì‹œëœ ì²«ë²ˆì§¸ ì¤„ì˜ ë으로 옮ê¹ë‹ˆë‹¤. 명령 모드ì—서 + $ 를 ì´ìš©í•˜ì‹­ì‹œì˜¤. + + 2. ì†Œë¬¸ìž a 를 커서 아래 ê¸€ìž *다ìŒ*ì— ê¸€ì„ ì¶”ê°€í•  수 있습니다. + (ëŒ€ë¬¸ìž A는 ê·¸ ì¤„ì˜ ëì— ì¶”ê°€í•©ë‹ˆë‹¤.) + +참고: 그렇게 하시면 ê³ ìž‘ ì¤„ì˜ ëì— ì¶”ê°€ë¥¼ 하기 위해 i를 누르고, 커서 ì•„ëž˜ì— + ìžˆë˜ ê¸€ìžë¥¼ 반복하고, ê¸€ì„ ë¼ì›Œë„£ê³ , 를 눌러 명령 모드로 ëŒì•„와서, + 커서를 오른쪽으로 옮기고 마지막으로 x까지 눌러야 하는 ë²ˆê±°ë¡œì›€ì„ í”¼í•˜ì‹¤ + 수 있습니다. + + 3. ì´ì œ 첫 ì¤„ì„ ì™„ì„±í•˜ì‹­ì‹œì˜¤. 추가 ëª…ë ¹ì€ í…스트가 ìž…ë ¥ë˜ëŠ” 위치 외ì—는 + 편집 모드와 완전히 같다는 ê²ƒì„ ìœ ë…하십시오. + +---> This line will allow you to practice +---> This line will allow you to practice appending text to the end of a line. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 6.3: 치환(REPLACE) ì˜ ë‹¤ë¥¸ 버전 + + + ** ëŒ€ë¬¸ìž R ì„ ìž…ë ¥í•˜ë©´ 하나 ì´ìƒì˜ 글ìžë¥¼ 바꿀 수 있습니다. ** + + 1. 커서를 ---> 로 í‘œì‹œëœ ì²«ë²ˆì§¸ 줄로 옮기십시오. + + 2. 커서를 ---> 로 í‘œì‹œëœ ë‘번째 줄과 다른 첫번째 단어 위로 옮기십시오. + ('last' 입니다.) + + 3. R ì„ ìž…ë ¥í•œ 후 첫번째 ì¤„ì˜ ì˜ˆì „ í…스트 ìœ„ì— ìƒˆë¡œìš´ ê¸€ì„ ìž…ë ¥í•˜ì—¬ + 나머지 ë‚´ìš©ì´ ë‘번째 줄과 같아지ë„ë¡ ë°”ê¿‰ì‹œë‹¤. + +---> To make the first line the same as the last on this page use the keys. +---> To make the first line the same as the second, type R and the new text. + + 4. 를 눌러서 나가면, 바뀌지 ì•Šì€ í…스트는 그대로 남게 ë©ë‹ˆë‹¤. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 6.4: 옵션 설정(SET) + + ** 찾기나 바꾸기ì—서 ëŒ€ì†Œë¬¸ìž êµ¬ë¶„ì„ ì—†ì• ê¸° 위해 ì˜µì…˜ì„ ì„¤ì •í•©ë‹ˆë‹¤ ** + + 1. 다ìŒì„ 입력하여 'ignore' 를 찾으십시오: + /ignore + n 키를 ì´ìš©í•˜ì—¬ 여러번 반복하십시오. + + 2. 'ic' (ëŒ€ì†Œë¬¸ìž êµ¬ë³„ 안함, Ignore case) ì˜µì…˜ì„ ì„¤ì •í•˜ì‹­ì‹œì˜¤: + :set ic + + 3. n 키를 눌러서 'ignore' 를 다시 찾아보십시오. + n 키를 ê³„ì† ëˆŒëŸ¬ì„œ 여러번 찾으십시오. + + 4. 'hlsearch' 와 'incsearch' ì˜µì…˜ì„ ì„¤ì •í•©ì‹œë‹¤. + :set hls is + + 5. 찾기 ëª…ë ¹ì„ ë‹¤ì‹œ 입력하여, ì–´ë–¤ ì¼ì´ ì¼ì–´ë‚˜ëŠ”ì§€ 확ì¸í•´ 보십시오: + /ignore + + 6. ì°¾ì€ ë‚´ìš©ì´ ê°•ì¡°(HIGHLIGHT)ëœ ê²ƒì„ ì—†ì• ë ¤ë©´, 다ìŒê³¼ ê°™ì´ ìž…ë ¥í•©ë‹ˆë‹¤: + :nohlsearch +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LESSON 6 요약 + + + 1. o 를 입력하면 커서 *아래ì—* 한 ì¤„ì´ ì—´ë¦¬ë©°, 커서는 편집 모드로 + 열린 줄 ìœ„ì— ìœ„ì¹˜í•˜ê²Œ ë©ë‹ˆë‹¤. + ëŒ€ë¬¸ìž O 를 입력하면 커서가 있는 ì¤„ì˜ *위로* 새 ì¤„ì„ ì—´ê²Œ ë©ë‹ˆë‹¤. + + 2. a 를 입력하면 커서 *다ìŒì—* ê¸€ì„ ìž…ë ¥í•  수 있습니다. + ëŒ€ë¬¸ìž A 를 입력하면 ìžë™ìœ¼ë¡œ ê·¸ ì¤„ì˜ ëì— ê¸€ìžë¥¼ 추가하게 ë©ë‹ˆë‹¤. + + 3. ëŒ€ë¬¸ìž R ì„ ìž…ë ¥í•˜ë©´ 를 눌러서 나가기 전까지 바꾸기 모드가 ë©ë‹ˆë‹¤. + + 4. ":set xxx" 를 하면 "xxx" ì˜µì…˜ì´ ì„¤ì •ë©ë‹ˆë‹¤. + + + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LESSON 7: 온ë¼ì¸ ë„ì›€ë§ ëª…ë ¹ + + + ** 온ë¼ì¸ ë„ì›€ë§ ì‹œìŠ¤í…œ 사용하기 ** + + ë¹”ì€ í­ ë„“ì€ ì˜¨ë¼ì¸ ë„ì›€ë§ ì‹œìŠ¤í…œì„ ì œê³µí•©ë‹ˆë‹¤. ë„움ë§ì„ 보려면, + ë‹¤ìŒ ì„¸ê°€ì§€ 중 하나를 시ë„해보십시오: + - 키를 누른다. (키가 있는 경우) + - 키를 누른다. (키가 있는 경우) + - :help ë¼ê³  입력한다. + + ë„ì›€ë§ ì°½ì„ ë‹«ìœ¼ë ¤ë©´ :q ë¼ê³  입력하십시오. + + ":help" ë¼ëŠ” ëª…ë ¹ì— ì¸ìžë¥¼ 주면 ì–´ë–¤ ì£¼ì œì— ê´€í•œ ë„움ë§ì„ ì°¾ì„ ìˆ˜ 있습니다. + ë‹¤ìŒ ëª…ë ¹ì„ ë‚´ë ¤ 보십시오. ( 키를 누르는 ê²ƒì„ ìžŠì§€ 마십시오.) + + :help w + :help c_ l-tasten er til høyre og flytter til høyre. + j j-tasten ser ut som en pil som peker nedover. + v + 1. Flytt markøren rundt på skjermen til du har fått det inn i fingrene. + + 2. Hold inne nedovertasten (j) til den repeterer. + Nå vet du hvordan du beveger deg til neste leksjon. + + 3. Gå til leksjon 1.2 ved hjelp av nedovertasten. + +Merk: Hvis du blir usikker på noe du har skrevet, trykk for å gå til + normalmodus. Skriv deretter kommandoen du ønsket på nytt. + +Merk: Piltastene skal også virke. Men ved å bruke hjkl vil du være i stand til + å bevege markøren mye raskere når du er blitt vant til det. Helt sant! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.2: AVSLUTTE VIM + + + !! MERK: Før du utfører noen av punktene nedenfor, les hele leksjonen!! + + 1. Trykk -tasten (for å forsikre deg om at du er i normalmodus). + + 2. Skriv: :q! . + Dette avslutter editoren og FORKASTER alle forandringer som du har gjort. + + 3. Når du ser kommandolinjen i skallet, skriv kommandoen som startet denne + innføringen. Den er: vimtutor + + 4. Hvis du er sikker på at du husker dette, utfør punktene 1 til 3 for å + avslutte og starte editoren på nytt. + +MERK: :q! forkaster alle forandringer som du gjorde. I løpet av noen + få leksjoner vil du lære hvordan du lagrer forandringene til en fil. + + 5. Flytt markøren ned til leksjon 1.3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.3: REDIGERING AV TEKST -- SLETTING + + + ** Trykk x for å slette tegnet under markøren. ** + + 1. Flytt markøren til den første linjen merket med --->. + + 2. For å ordne feilene på linjen, flytt markøren til den er oppå tegnet som + skal slettes. + + 3. Trykk tasten x for å slette det uønskede tegnet. + + 4. Repeter punkt 2 til 4 til setningen er lik den som er under. + +---> Hessstennnn brrråsnudddde ii gaaata. +---> Hesten bråsnudde i gata. + + 5. Nå som linjen er korrekt, gå til leksjon 1.4. + +MERK: Når du går gjennom innføringen, ikke bare prøv å huske kommandoene, men + bruk dem helt til de sitter. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.4: REDIGERING AV TEKST -- INNSETTING + + + ** Trykk i for å sette inn tekst. ** + + 1. Flytt markøren til den første linjen som er merket med --->. + + 2. For å gjøre den første linjen lik den andre, flytt markøren til den står + på tegnet ETTER posisjonen der teksten skal settes inn. + + 3. Trykk i og skriv inn teksten som mangler. + + 4. Etterhvert som hver feil er fikset, trykk for å returnere til + normalmodus. Repeter punkt 2 til 4 til setningen er korrekt. + +---> Det er tkst som mnglr . +---> Det er ganske mye tekst som mangler her. + + 5. Når du føler deg komfortabel med å sette inn tekst, gå til oppsummeringen + nedenfor. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.5: REDIGERING AV TEKST -- LEGGE TIL + + + ** Trykk A for å legge til tekst. ** + + 1. Flytt markøren til den første linjen nedenfor merket --->. + Det har ikke noe å si hvor markøren er plassert på den linjen. + + 2. Trykk A og skriv inn det som skal legges til. + + 3. Når teksten er lagt til, trykk for å returnere til normalmodusen. + + 4. Flytt markøren til den andre linjen markert med ---> og repeter steg 2 og + 3 for å reparere denne setningen. + +---> Det mangler noe tekst p + Det mangler noe tekst på denne linjen. +---> Det mangler også litt tek + Det mangler også litt tekst på denne linjen. + + 5. Når du føler at du behersker å legge til tekst, gå til leksjon 1.6. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.6: REDIGERE EN FIL + + + ** Bruk :wq for å lagre en fil og avslutte. ** + + !! MERK: Før du utfører noen av stegene nedenfor, les hele denne leksjonen!! + + 1. Avslutt denne innføringen som du gjorde i leksjon 1.2: :q! + + 2. Skriv denne kommandoen på kommandolinja: vim tutor + «vim» er kommandoen for å starte Vim-editoren, «tutor» er navnet på fila + som du vil redigere. Bruk en fil som kan forandres. + + 3. Sett inn og slett tekst som du lærte i de foregående leksjonene. + + 4. Lagre filen med forandringene og avslutt Vim med: :wq + + 5. Start innføringen på nytt og flytt ned til oppsummeringen som følger. + + 6. Etter å ha lest og forstått stegene ovenfor: Sett i gang. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 1 + + + 1. Markøren beveges ved hjelp av piltastene eller hjkl-tastene. + h (venstre) j (ned) k (opp) l (høyre) + + 2. For å starte Vim fra skall-kommandolinjen, skriv: vim FILNAVN + + 3. For å avslutte Vim, skriv: :q! for å forkaste endringer. + ELLER skriv: :wq for å lagre forandringene. + + 4. For å slette tegnet under markøren, trykk: x + + 5. For å sette inn eller legge til tekst, trykk: + i skriv innsatt tekst sett inn før markøren + A skriv tillagt tekst legg til på slutten av linjen + +MERK: Når du trykker går du til normalmodus eller du avbryter en uønsket + og delvis fullført kommando. + + Nå kan du gå videre til leksjon 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.1: SLETTEKOMMANDOER + + + ** Trykk dw for å slette et ord. ** + + 1. Trykk for å være sikker på at du er i normalmodus. + + 2. Flytt markøren til den første linjen nedenfor merket --->. + + 3. Flytt markøren til begynnelsen av ordet som skal slettes. + + 4. Trykk dw og ordet vil forsvinne. + +MERK: Bokstaven d vil komme til syne på den nederste linjen på skjermen når + du skriver den. Vim venter på at du skal skrive w . Hvis du ser et annet + tegn enn d har du skrevet noe feil; trykk og start på nytt. + +---> Det er agurk tre ord eple som ikke hører pære hjemme i denne setningen. +---> Det er tre ord som ikke hører hjemme i denne setningen. + + 5. Repeter punkt 3 og 4 til den første setningen er lik den andre. Gå + deretter til leksjon 2.2. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.2: FLERE SLETTEKOMMANDOER + + + ** Trykk d$ for å slette til slutten av linjen. ** + + 1. Trykk for å være sikker på at du er i normalmodus. + + 2. Flytt markøren til linjen nedenfor merket --->. + + 3. Flytt markøren til punktet der linjen skal kuttes (ETTER første punktum). + + 4. Trykk d$ for å slette alt til slutten av linjen. + +---> Noen skrev slutten på linjen en gang for mye. linjen en gang for mye. + + 5. Gå til leksjon 2.3 for å forstå hva som skjer. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.3: OM OPERATORER OG BEVEGELSER + + + Mange kommandoer som forandrer teksten er laget ut i fra en operator og en + bevegelse. Formatet for en slettekommando med sletteoperatoren d er: + + d bevegelse + + Der: + d - er sletteoperatoren. + bevegelse - er hva operatoren vil opere på (listet nedenfor). + + En kort liste med bevegelser: + w - til starten av det neste ordet, UNNTATT det første tegnet. + e - til slutten av det nåværende ordet, INKLUDERT det siste tegnet. + $ - til slutten av linjen, INKLUDERT det siste tegnet. + + Ved å skrive de vil altså alt fra markøren til slutten av ordet bli + slettet. + +MERK: Ved å skrive kun bevegelsen i normalmodusen uten en operator vil + markøren flyttes som spesifisert. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKSJON 2.4: BRUK AV TELLER FOR EN BEVEGELSE + + + ** Ved å skrive et tall foran en bevegelse repeterer den så mange ganger. ** + + 1. Flytt markøren til starten av linjen markert ---> nedenfor. + + 2. Skriv 2w for å flytte markøren to ord framover. + + 3. Skriv 3e for å flytte markøren framover til slutten av det tredje + ordet. + + 4. Skriv 0 (null) for å flytte til starten av linjen. + + 5. Repeter steg 2 og 3 med forskjellige tall. + +---> Dette er en linje med noen ord som du kan bevege deg rundt på. + + 6. Gå videre til leksjon 2.5. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.5: BRUK AV ANTALL FOR Å SLETTE MER + + + ** Et tall sammen med en operator repeterer den så mange ganger. ** + + I kombinasjonen med sletteoperatoren og en bevegelse nevnt ovenfor setter du + inn antall før bevegelsen for å slette mer: + d nummer bevegelse + + 1. Flytt markøren til det første ordet med STORE BOKSTAVER på linjen markert + med --->. + + 2. Skriv 2dw for å slette de to ordene med store bokstaver. + + 3. Repeter steg 1 og 2 med forskjelling antall for å slette de etterfølgende + ordene som har store bokstaver. + +---> Denne ABC DE linjen FGHI JK LMN OP er nå Q RS TUV litt mer lesbar. + +MERK: Et antall mellom operatoren d og bevegelsen virker på samme måte som å + bruke bevegelsen uten en operator. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.6: OPERERE PÅ LINJER + + + ** Trykk dd for å slette en hel linje. ** + + På grunn av at sletting av linjer er mye brukt, fant utviklerne av Vi ut at + det vil være lettere å rett og slett trykke to d-er for å slette en linje. + + 1. Flytt markøren til den andre linjen i verset nedenfor. + 2. Trykk dd å slette linjen. + 3. Flytt deretter til den fjerde linjen. + 4. Trykk 2dd for å slette to linjer. + +---> 1) Roser er røde, +---> 2) Gjørme er gøy, +---> 3) Fioler er blå, +---> 4) Jeg har en bil, +---> 5) Klokker viser tiden, +---> 6) Druer er søte +---> 7) Og du er likeså. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.7: ANGRE-KOMMANDOEN + + + ** Trykk u for å angre siste kommando, U for å fikse en hel linje. ** + + 1. Flytt markøren til linjen nedenfor merket ---> og plasser den på den + første feilen. + 2. Trykk x for å slette det første uønskede tegnet. + 3. Trykk så u for å angre den siste utførte kommandoen. + 4. Deretter ordner du alle feilene på linjene ved å bruke kommandoen x . + 5. Trykk nå en stor U for å sette linjen tilbake til det den var + originalt. + 6. Trykk u noen ganger for å angre U og foregående kommandoer. + 7. Deretter trykker du CTRL-R (hold CTRL nede mens du trykker R) noen + ganger for å gjenopprette kommandoene (omgjøre angrekommandoene). + +---> RReparer feiilene påå denne linnnjen oog erssstatt dem meed angre. + + 8. Dette er meget nyttige kommandoer. Nå kan du gå til oppsummeringen av + leksjon 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 2 + + + 1. For å slette fra markøren fram til det neste ordet, trykk: dw + 2. For å slette fra markøren til slutten av en linje, trykk: d$ + 3. For å slette en hel linje, trykk: dd + + 4. For å repetere en bevegelse, sett et nummer foran: 2w + 5. Formatet for en forandringskommando er: + operator [nummer] bevegelse + der: + operator - hva som skal gjøres, f.eks. d for å slette + [nummer] - et valgfritt antall for å repetere bevegelsen + bevegelse - hva kommandoen skal operere på, eksempelvis w (ord), + $ (til slutten av linjen) og så videre. + + 6. For å gå til starten av en linje, bruk en null: 0 + + 7. For å angre tidligere endringer, skriv: u (liten u) + For å angre alle forandringer på en linje, skriv: U (stor U) + For å omgjøre angringen, trykk: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.1: «LIM INN»-KOMMANDOEN + + + ** Trykk p for å lime inn tidligere slettet tekst etter markøren ** + + 1. Flytt markøren til den første linjen med ---> nedenfor. + + 2. Trykk dd for å slette linjen og lagre den i et Vim-register. + + 3. Flytt markøren til c)-linjen, OVER posisjonen linjen skal settes inn. + + 4. Trykk p for å legge linjen under markøren. + + 5. Repeter punkt 2 til 4 helt til linjene er i riktig rekkefølge. + +---> d) Kan du også lære? +---> b) Fioler er blå, +---> c) Intelligens må læres, +---> a) Roser er røde, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.2: «ERSTATT»-KOMMANDOEN + + + ** Trykk rx for å erstatte tegnet under markøren med x. ** + + 1. Flytt markøren til den første linjen nedenfor merket --->. + + 2. Flytt markøren så den står oppå den første feilen. + + 3. Trykk r og deretter tegnet som skal være der. + + 4. Repeter punkt 2 og 3 til den første linjen er lik den andre. + +---> Da dfnne lynjxn ble zkrevet, var det nøen som tjykket feite taster! +---> Da denne linjen ble skrevet, var det noen som trykket feile taster! + + 5. Gå videre til leksjon 3.2. + +MERK: Husk at du bør lære ved å BRUKE, ikke pugge. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.3: «FORANDRE»-OPERATOREN + + + ** For å forandre til slutten av et ord, trykk ce . ** + + 1. Flytt markøren til den første linjen nedenfor som er merket --->. + + 2. Plasser markøren på u i «lubjwr». + + 3. Trykk ce og det korrekte ordet (i dette tilfellet, skriv «injen»). + + 4. Trykk og gå til det neste tegnet som skal forandres. + + 5. Repeter punkt 3 og 4 helt til den første setningen er lik den andre. + +---> Denne lubjwr har noen wgh som må forkwåp med «forækzryas»-kommandoen. +---> Denne linjen har noen ord som må forandres med «forandre»-kommandoen. + +Vær oppmerksom på at ce sletter ordet og går inn i innsettingsmodus. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.4: FLERE FORANDRINGER VED BRUK AV c + + + ** Forandringskommandoen blir brukt med de samme bevegelser som «slett». ** + + 1. Forandringsoperatoren fungerer på samme måte som «slett». Formatet er: + + c [nummer] bevegelse + + 2. Bevegelsene er de samme, som for eksempel w (ord) og $ (slutten av en + linje). + + 3. Gå til den første linjen nedenfor som er merket --->. + + 4. Flytt markøren til den første feilen. + + 5. Skriv c$ og skriv resten av linjen lik den andre og trykk . + +---> Slutten på denne linjen trenger litt hjelp for å gjøre den lik den neste. +---> Slutten på denne linjen trenger å bli rettet ved bruk av c$-kommandoen. + +MERK: Du kan bruke slettetasten for å rette feil mens du skriver. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 3 + + + 1. For å legge tilbake tekst som nettopp er blitt slettet, trykk p . Dette + limer inn den slettede teksten ETTER markøren (hvis en linje ble slettet + vil den bli limt inn på linjen under markøren). + + 2. For å erstatte et tegn under markøren, trykk r og deretter tegnet som + du vil ha der. + + 3. Forandringsoperatoren lar deg forandre fra markøren til dit bevegelsen + tar deg. Det vil si, skriv ce for å forandre fra markøren til slutten + av ordet, c$ for å forandre til slutten av linjen. + + 4. Formatet for «forandre» er: + + c [nummer] bevegelse + +Nå kan du gå til neste leksjon. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.1: POSISJONERING AV MARKØREN OG FILSTATUS + + ** Trykk CTRL-G for å vise posisjonen i filen og filstatusen. + Trykk G for å gå til en spesifikk linje i filen. ** + + Merk: Les hele leksjonen før du utfører noen av punktene! + + 1. Hold nede Ctrl-tasten og trykk g . Vi kaller dette CTRL-G. En melding + vil komme til syne på bunnen av skjermen med filnavnet og posisjonen i + filen. Husk linjenummeret for bruk i steg 3. + +Merk: Du kan se markørposisjonen i nederste høyre hjørne av skjermen. Dette + skjer når «ruler»-valget er satt (forklart i leksjon 6). + + 2. Trykk G for å gå til bunnen av filen. + Skriv gg for å gå til begynnelsen av filen. + + 3. Skriv inn linjenummeret du var på og deretter G . Dette vil føre deg + tilbake til linjen du var på da du først trykket CTRL-G. + + 4. Utfør steg 1 til 3 hvis du føler deg sikker på prosedyren. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.2: SØKEKOMMANDOEN + + ** Skriv / etterfulgt av en søkestreng som du vil lete etter. ** + + 1. Trykk / når du er i normalmodusen. Legg merke til at skråstreken og + markøren kommer til syne på bunnen av skjermen i likhet med + «:»-kommandoene. + + 2. Skriv «feeeiil» og trykk . Dette er teksten du vil lete etter. + + 3. For å finne neste forekomst av søkestrengen, trykk n . + For å lete etter samme søketeksten i motsatt retning, trykk N . + + 4. For å lete etter en tekst bakover i filen, bruk ? istedenfor / . + + 5. For å gå tilbake til der du kom fra, trykk CTRL-O (Hold Ctrl nede mens + du trykker bokstaven o ). Repeter for å gå enda lengre tilbake. CTRL-I + går framover. + +---> «feeeiil» er ikke måten å skrive «feil» på, feeeiil er helt feil. +Merk: Når søkingen når slutten av filen, vil den fortsette fra starten unntatt + hvis «wrapscan»-valget er resatt. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.3: FINN SAMSVARENDE PARENTESER + + + ** Trykk % for å finne en samsvarende ), ] eller } . ** + + 1. Plasser markøren på en (, [ eller { på linjen nedenfor merket --->. + + 2. Trykk % . + + 3. Markøren vil gå til den samsvarende parentesen eller hakeparentesen. + + 4. Trykk % for å flytte markøren til den andre samsvarende parentesen. + + 5. Flytt markøren til en annen (, ), [, ], { eller } og se hva % gjør. + +---> Dette ( er en testlinje med (, [ ] og { } i den )). + +Merk: Dette er veldig nyttig til feilsøking i programmer som har ubalansert + antall parenteser! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.4: ERSTATT-KOMMANDOEN + + + ** Skriv :s/gammel/ny/g for å erstatte «gammel» med «ny». ** + + 1. Flytt markøren til linjen nedenfor som er merket med --->. + + 2. Skriv :s/deen/den/ . Legg merke til at denne kommandoen bare + forandrer den første forekomsten av «deen» på linjen. + + 3. Skriv :s/deen/den/g . Når g-flagget legges til, betyr dette global + erstatning på linjen og erstatter alle forekomster av «deen» på linjen. + +---> deen som kan kaste deen tyngste steinen lengst er deen beste + + 4. For å erstatte alle forekomster av en tekststreng mellom to linjer, + skriv :#,#s/gammel/ny/g der #,# er linjenumrene på de to linjene for + linjeområdet erstatningen skal gjøres. + Skriv :%s/gammel/ny/g for å erstatte tekst i hele filen. + Skriv :%s/gammel/ny/gc for å finne alle forekomster i hele filen, og + deretter spørre om teksten skal erstattes eller + ikke. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 4 + + + 1. Ctrl-G viser nåværende posisjon i filen og filstatusen. + G går til slutten av filen. + nummer G går til det linjenummeret. + gg går til den første linjen. + + 2. Skriv / etterfulgt av en søketekst for å lete FRAMOVER etter teksten. + Skriv ? etterfulgt av en søketekst for å lete BAKOVER etter teksten. + Etter et søk kan du trykke n for å finne neste forekomst i den samme + retningen eller N for å lete i motsatt retning. + CTRL-O tar deg tilbake til gamle posisjoner, CTRL-I til nyere posisjoner. + + 3. Skriv % når markøren står på en (, ), [, ], { eller } for å finne den + som samsvarer. + + 4. Erstatte «gammel» med første «ny» på en linje: :s/gammel/ny + Erstatte alle «gammel» med «ny» på en linje: :s/gammel/ny/g + Erstatte tekst mellom to linjenumre: :#,#s/gammel/ny/g + Erstatte alle forekomster i en fil: :%s/gammel/ny/g + For å godkjenne hver erstatning, legg til «c»: :%s/gammel/ny/gc +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.1: HVORDAN UTFØRE EN EKSTERN KOMMANDO + + + ** Skriv :! etterfulgt av en ekstern kommando for å utføre denne. ** + + 1. Skriv den velkjente kommandoen : for å plassere markøren på bunnen av + skjermen. Dette lar deg skrive en kommandolinjekommando. + + 2. Nå kan du skrive tegnet ! . Dette lar deg utføre en hvilken som helst + ekstern kommando. + + 3. Som et eksempel, skriv ls etter utropstegnet og trykk . Du vil + nå få en liste over filene i katalogen, akkurat som om du hadde kjørt + kommandoen direkte fra kommandolinjen i skallet. Eller bruk :!dir hvis + «ls» ikke virker. + +MERK: Det er mulig å kjøre alle eksterne kommandoer på denne måten, også med + parametere. + +MERK: Alle «:»-kommandoer må avsluttes med . Fra dette punktet er det + ikke alltid vi nevner det. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.2: MER OM LAGRING AV FILER + + + ** For å lagre endringene gjort i en tekst, skriv :w FILNAVN. ** + + 1. Skriv :!dir eller :!ls for å få en liste over filene i katalogen. Du + vet allerede at du må trykke etter dette. + + 2. Velg et filnavn på en fil som ikke finnes, som for eksempel TEST . + + 3. Skriv :w TEST (der TEST er filnavnet du velger). + + 4. Dette lagrer hele filen (denne innføringen) under navnet TEST . For å + sjekke dette, skriv :!dir eller :!ls igjen for å se innholdet av + katalogen. + +Merk: Hvis du nå hadde avsluttet Vim og startet på nytt igjen med «vim TEST», + ville filen vært en eksakt kopi av innføringen da du lagret den. + + 5. Fjern filen ved å skrive :!rm TEST hvis du er på et Unix-lignende + operativsystem, eller :!del TEST hvis du bruker MS-DOS. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.3: VELGE TEKST SOM SKAL LAGRES + + + ** For å lagre en del av en fil, skriv v bevegelse :w FILNAVN ** + + 1. Flytt markøren til denne linjen. + + 2. Trykk v og flytt markøren til det femte elementet nedenfor. Legg merke + til at teksten blir markert. + + 3. Trykk : (kolon). På bunnen av skjermen vil :'<,'> komme til syne. + + 4. Trykk w TEST , der TEST er et filnavn som ikke finnes enda. Kontroller + at du ser :'<,'>w TEST før du trykker Enter. + + 5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller !ls + for å se den. Ikke slett den enda! Vi vil bruke den i neste leksjon. + +MERK: Ved å trykke v startes visuelt valg. Du kan flytte markøren rundt for + å gjøre det valgte området større eller mindre. Deretter kan du bruke en + operator for å gjøre noe med teksten. For eksempel sletter d teksten. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.4: HENTING OG SAMMENSLÅING AV FILER + + + ** For å lese inn en annen fil inn i nåværende buffer, skriv :r FILNAVN ** + + 1. Plasser markøren like over denne linjen. + +MERK: Etter å ha utført steg 2 vil du se teksten fra leksjon 5.3. Gå deretter + NED for å se denne leksjonen igjen. + + 2. Hent TEST-filen ved å bruke kommandoen :r TEST der TEST er navnet på + filen du brukte. Filen du henter blir plassert nedenfor markørlinjen. + + 3. For å sjekke at filen ble hentet, gå tilbake og se at det er to kopier av + leksjon 5.3, originalen og denne versjonen. + +MERK: Du kan også lese utdataene av en ekstern kommando. For eksempel, :r !ls + leser utdataene av ls-kommandoen og legger dem nedenfor markøren. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 5 + + + 1. :!kommando utfører en ekstern kommandio. + + Noen nyttige eksempler er: + (MS-DOS) (Unix) + :!dir :!ls - List filene i katalogen. + :!del FILNAVN :!rm FILNAVN - Slett filen FILNAVN. + + 2. :w FILNAVN skriver den nåværende Vim-filen disken med navnet FILNAVN . + + 3. v bevegelse :w FILNAVN lagrer de visuelt valgte linjene til filen + FILNAVN. + + 4. :r FILNAVN henter filen FILNAVN og legger den inn nedenfor markøren. + + 5. :r !dir leser utdataene fra «dir»-kommandoen og legger dem nedenfor + markørposisjonen. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.1: «ÅPNE LINJE»-KOMMANDOEN + + + ** Skriv o for å «åpne opp» for en ny linje etter markøren og gå til + innsettingsmodus ** + + 1. Flytt markøren til linjen nedenfor merket --->. + + 2. Skriv o (liten o) for å åpne opp en linje NEDENFOR markøren og gå inn i + innsettingsmodus. + + 3. Skriv litt tekst og trykk for å gå ut av innsettingsmodusen. + +---> Etter at o er skrevet blir markøren plassert på den tomme linjen. + + 4. For å åpne en ny linje OVER markøren, trykk rett og slett en stor O + istedenfor en liten o . Prøv dette på linjen nedenfor. + +---> Lag ny linje over denne ved å trykke O mens markøren er på denne linjen. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.2: «LEGG TIL»-KOMMANDOEN + + + ** Skriv a for å legge til tekst ETTER markøren. ** + + 1. Flytt markøren til starten av linjen merket ---> nedenfor. + + 2. Trykk e til markøren er på slutten av «li». + + 3. Trykk a (liten a) for å legge til tekst ETTER markøren. + + 4. Fullfør ordet sånn som på linjen nedenfor. Trykk for å gå ut av + innsettingsmodusen. + + 5. Bruk e for å gå til det neste ufullstendige ordet og repeter steg 3 og + 4. + +---> Denne li lar deg øve på å leg til tek på en linje. +---> Denne linjen lar deg øve på å legge til tekst på en linje. + +Merk: a, i og A går alle til den samme innsettingsmodusen, den eneste + forskjellen er hvor tegnene blir satt inn. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.3: EN ANNEN MÅTE Å ERSTATTE PÅ + + + ** Skriv en stor R for å erstatte mer enn ett tegn. ** + + 1. Flytt markøren til den første linjen nedenfor merket --->. Flytt markøren + til begynnelsen av den første «xxx»-en. + + 2. Trykk R og skriv inn tallet som står nedenfor på den andre linjen så + det erstatter xxx. + + 3. Trykk for å gå ut av erstatningsmodusen. Legg merke til at resten + av linjen forblir uforandret. + + 4. Repeter stegene for å erstatte den gjenværende xxx. + +---> Ved å legge 123 til xxx får vi xxx. +---> Ved å legge 123 til 456 får vi 579. + +MERK: Erstatningsmodus er lik insettingsmodus, men hvert tegn som skrives + erstatter et eksisterende tegn. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.4: KOPIERE OG LIME INN TEKST + + + ** Bruk y-operatoren for å kopiere tekst og p for å lime den inn ** + + 1. Gå til linjen merket ---> nedenfor og plasser markøren etter «a)». + + 2. Gå inn i visuell modus med v og flytt markøren til like før «første». + + 3. Trykk y for å kopiere (engelsk: «yank») den uthevede teksten. + + 4. Flytt markøren til slutten av den neste linjen: j$ + + 5. Trykk p for å lime inn teksten. Trykk deretter: a andre . + + 6. Bruk visuell modus for å velge « valget.», kopier det med y , gå til + slutten av den neste linjen med j$ og legg inn teksten der med p . + +---> a) Dette er det første valget. + b) + +Merk: Du kan også bruke y som en operator; yw kopierer ett ord. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.5: SETT VALG + + + ** Sett et valg så søk eller erstatning ignorerer store/små bokstaver. ** + + 1. Let etter «ignore» ved å skrive: /ignore + Repeter flere ganger ved å trykke n . + + 2. Sett «ic»-valget (Ignore Case) ved å skrive: :set ic + + 3. Søk etter «ignore» igjen ved å trykke n . + Legg merke til at både «Ignore» og «IGNORE» blir funnet. + + 4. Sett «hlsearch»- og «incsearch»-valgene: :set hls is + + 5. Skriv søkekommandoen igjen og se hva som skjer: /ignore + + 6. For å slå av ignorering av store/små bokstaver, skriv: :set noic + +Merk: For å fjerne uthevingen av treff, skriv: :nohlsearch +Merk: Hvis du vil ignorere store/små bokstaver for kun en søkekommando, bruk + \c i uttrykket: /ignore\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 6 + + 1. Trykk o for å legge til en linje NEDENFOR markøren og gå inn i + innsettingsmodus. + Trykk O for å åpne en linje OVER markøren. + + 2. Skriv a for å sette inn tekst ETTER markøren. + Skriv A for å sette inn tekst etter slutten av linjen. + + 3. Kommandoen e går til slutten av et ord. + + 4. Operatoren y («yank») kopierer tekst, p («paste») limer den inn. + + 5. Ved å trykke R går du inn i erstatningsmodus helt til trykkes. + + 6. Skriv «:set xxx» for å sette valget «xxx». Noen valg er: + «ic» «ignorecase» ignorer store/små bokstaver under søk + «is» «incsearch» vis delvise treff for en søketekst + «hls» «hlsearch» uthev alle søketreff + + 7. Legg til «no» foran valget for å slå det av: :set noic + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 7.1: FÅ HJELP + + + ** Bruk det innebygde hjelpesystemet. ** + + Vim har et omfattende innebygget hjelpesystem. For å starte det, prøv en av + disse måtene: + - Trykk Hjelp-tasten (hvis du har en) + - Trykk F1-tasten (hvis du har en) + - Skriv :help + + Les teksten i hjelpevinduet for å finne ut hvordan hjelpen virker. + Skriv CTRL-W CTRL-W for å hoppe fra et vindu til et annet + Skriv :q for å lukke hjelpevinduet. + + Du kan få hjelp for omtrent alle temaer om Vim ved å skrive et parameter til + «:help»-kommandoen. Prøv disse (ikke glem å trykke ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 7.2: LAG ET OPPSTARTSSKRIPT + + + ** Slå på funksjoner i Vim ** + + Vim har mange flere funksjoner enn Vi, men flesteparten av dem er slått av + som standard. For å begynne å bruke flere funksjoner må du lage en + «vimrc»-fil. + + 1. Start redigeringen av «vimrc»-filen. Dette avhenger av systemet ditt: + :e ~/.vimrc for Unix + :e $VIM/_vimrc for MS Windows + + 2. Les inn eksempelfilen for «vimrc»: + :r $VIMRUNTIME/vimrc_example.vim + + 3. Lagre filen med: + :w + + Neste gang du starter Vim vil den bruke syntaks-utheving. Du kan legge til + alle dine foretrukne oppsett i denne «vimrc»-filen. + For mer informasjon, skriv :help vimrc-intro +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 7.3: FULLFØRING + + + ** Kommandolinjefullføring med CTRL-D og ** + + 1. Vær sikker på at Vim ikke er i Vi-kompatibel modus: :set nocp + + 2. Se hvilke filer som er i katalogen: :!ls eller :!dir + + 3. Skriv starten på en kommando: :e + + 4. Trykk CTRL-D og Vim vil vise en liste over kommandoer som starter med + «e». + + 5. Trykk og Vim vil fullføre kommandonavnet til «:edit». + + 6. Legg til et mellomrom og starten på et eksisterende filnavn: :edit FIL + + 7. Trykk . Vim vil fullføre navnet (hvis det er unikt). + +MERK: Fullføring fungerer for mange kommandoer. Prøv ved å trykke CTRL-D og + . Det er spesielt nyttig for bruk sammen med :help . +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 7 + + + 1. Skriv :help eller trykk eller for å åpne et hjelpevindu. + + 2. Skriv :help kommando for å få hjelp om kommando . + + 3. Trykk CTRL-W CTRL-W for å hoppe til et annet vindu. + + 4. Trykk :q for å lukke hjelpevinduet. + + 5. Opprett et vimrc-oppstartsskript for å lagre favorittvalgene dine. + + 6. Når du skriver en «:»-kommando, trykk CTRL-D for å se mulige + fullføringer. Trykk for å bruke en fullføring. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Her slutter innføringen i Vim. Den var ment som en rask oversikt over + editoren, akkurat nok til å la deg sette i gang med enkel bruk. Den er på + langt nær komplett, da Vim har mange flere kommandoer. Les bruksanvisningen + ved å skrive :help user-manual . + + For videre lesing og studier, kan denne boken anbefales: + «Vim - Vi Improved» av Steve Oualline + Utgiver: New Riders + Den første boken som er fullt og helt dedisert til Vim. Spesielt nyttig for + nybegynnere. Inneholder mange eksempler og illustrasjoner. + Se http://iccf-holland.org/click5.html + + Denne boken er eldre og handler mer om Vi enn Vim, men anbefales også: + «Learning the Vi Editor» av Linda Lamb + Utgiver: O'Reilly & Associates Inc. + Det er en god bok for å få vite omtrent hva som helst om Vi. + Den sjette utgaven inneholder også informasjon om Vim. + + Denne innføringen er skrevet av Michael C. Pierce og Robert K. Ware, + Colorado School of Mines med idéer av Charles Smith, Colorado State + University. E-mail: bware@mines.colorado.edu . + + Modifisert for Vim av Bram Moolenaar. + Oversatt av Øyvind A. Holm. E-mail: vimtutor _AT_ sunbase.org + Id: tutor.no 406 2007-03-18 22:48:36Z sunny + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +vim: set ts=8 : diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.nb.utf-8 b/vim/bundle/ubuntu-vim72/tutor/tutor.nb.utf-8 new file mode 100644 index 0000000..a7826b7 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.nb.utf-8 @@ -0,0 +1,973 @@ +=============================================================================== += V e l k o m m e n t i l i n n f ø r i n g e n i V i m -- Ver. 1.7 = +=============================================================================== + + Vim er en meget kraftig editor med mange kommandoer, alt for mange til Ã¥ + kunne gÃ¥ gjennom alle i en innføring som denne. Den er beregnet pÃ¥ Ã¥ + sette deg inn i bruken av nok kommandoer sÃ¥ du vil være i stand til lett + Ã¥ kunne bruke Vim som en editor til alle formÃ¥l. + + Tiden som kreves for Ã¥ gÃ¥ gjennom denne innføringen tar ca. 25-30 + minutter, avhengig av hvor mye tid du bruker til eksperimentering. + + MERK: + Kommandoene i leksjonene vil modifisere teksten. Lag en kopi av denne + filen som du kan øve deg pÃ¥ (hvis du kjørte «vimtutor»-kommandoen, er + dette allerede en kopi). + + Det er viktig Ã¥ huske at denne innføringen er beregnet pÃ¥ læring gjennom + bruk. Det betyr at du mÃ¥ utføre kommandoene for Ã¥ lære dem skikkelig. + Hvis du bare leser teksten, vil du glemme kommandoene! + + Først av alt, sjekk at «Caps Lock» IKKE er aktiv og trykk «j»-tasten for + Ã¥ flytte markøren helt til leksjon 1.1 fyller skjermen. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.1: FLYTTING AV MARKØREN + + + ** For Ã¥ flytte markøren, trykk tastene h, j, k, l som vist. ** + ^ + k Tips: h-tasten er til venstre og flytter til venstre. + < h l > l-tasten er til høyre og flytter til høyre. + j j-tasten ser ut som en pil som peker nedover. + v + 1. Flytt markøren rundt pÃ¥ skjermen til du har fÃ¥tt det inn i fingrene. + + 2. Hold inne nedovertasten (j) til den repeterer. + NÃ¥ vet du hvordan du beveger deg til neste leksjon. + + 3. GÃ¥ til leksjon 1.2 ved hjelp av nedovertasten. + +Merk: Hvis du blir usikker pÃ¥ noe du har skrevet, trykk for Ã¥ gÃ¥ til + normalmodus. Skriv deretter kommandoen du ønsket pÃ¥ nytt. + +Merk: Piltastene skal ogsÃ¥ virke. Men ved Ã¥ bruke hjkl vil du være i stand til + Ã¥ bevege markøren mye raskere nÃ¥r du er blitt vant til det. Helt sant! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.2: AVSLUTTE VIM + + + !! MERK: Før du utfører noen av punktene nedenfor, les hele leksjonen!! + + 1. Trykk -tasten (for Ã¥ forsikre deg om at du er i normalmodus). + + 2. Skriv: :q! . + Dette avslutter editoren og FORKASTER alle forandringer som du har gjort. + + 3. NÃ¥r du ser kommandolinjen i skallet, skriv kommandoen som startet denne + innføringen. Den er: vimtutor + + 4. Hvis du er sikker pÃ¥ at du husker dette, utfør punktene 1 til 3 for Ã¥ + avslutte og starte editoren pÃ¥ nytt. + +MERK: :q! forkaster alle forandringer som du gjorde. I løpet av noen + fÃ¥ leksjoner vil du lære hvordan du lagrer forandringene til en fil. + + 5. Flytt markøren ned til leksjon 1.3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.3: REDIGERING AV TEKST -- SLETTING + + + ** Trykk x for Ã¥ slette tegnet under markøren. ** + + 1. Flytt markøren til den første linjen merket med --->. + + 2. For Ã¥ ordne feilene pÃ¥ linjen, flytt markøren til den er oppÃ¥ tegnet som + skal slettes. + + 3. Trykk tasten x for Ã¥ slette det uønskede tegnet. + + 4. Repeter punkt 2 til 4 til setningen er lik den som er under. + +---> Hessstennnn brrrÃ¥snudddde ii gaaata. +---> Hesten brÃ¥snudde i gata. + + 5. NÃ¥ som linjen er korrekt, gÃ¥ til leksjon 1.4. + +MERK: NÃ¥r du gÃ¥r gjennom innføringen, ikke bare prøv Ã¥ huske kommandoene, men + bruk dem helt til de sitter. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.4: REDIGERING AV TEKST -- INNSETTING + + + ** Trykk i for Ã¥ sette inn tekst. ** + + 1. Flytt markøren til den første linjen som er merket med --->. + + 2. For Ã¥ gjøre den første linjen lik den andre, flytt markøren til den stÃ¥r + pÃ¥ tegnet ETTER posisjonen der teksten skal settes inn. + + 3. Trykk i og skriv inn teksten som mangler. + + 4. Etterhvert som hver feil er fikset, trykk for Ã¥ returnere til + normalmodus. Repeter punkt 2 til 4 til setningen er korrekt. + +---> Det er tkst som mnglr . +---> Det er ganske mye tekst som mangler her. + + 5. NÃ¥r du føler deg komfortabel med Ã¥ sette inn tekst, gÃ¥ til oppsummeringen + nedenfor. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.5: REDIGERING AV TEKST -- LEGGE TIL + + + ** Trykk A for Ã¥ legge til tekst. ** + + 1. Flytt markøren til den første linjen nedenfor merket --->. + Det har ikke noe Ã¥ si hvor markøren er plassert pÃ¥ den linjen. + + 2. Trykk A og skriv inn det som skal legges til. + + 3. NÃ¥r teksten er lagt til, trykk for Ã¥ returnere til normalmodusen. + + 4. Flytt markøren til den andre linjen markert med ---> og repeter steg 2 og + 3 for Ã¥ reparere denne setningen. + +---> Det mangler noe tekst p + Det mangler noe tekst pÃ¥ denne linjen. +---> Det mangler ogsÃ¥ litt tek + Det mangler ogsÃ¥ litt tekst pÃ¥ denne linjen. + + 5. NÃ¥r du føler at du behersker Ã¥ legge til tekst, gÃ¥ til leksjon 1.6. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.6: REDIGERE EN FIL + + + ** Bruk :wq for Ã¥ lagre en fil og avslutte. ** + + !! MERK: Før du utfører noen av stegene nedenfor, les hele denne leksjonen!! + + 1. Avslutt denne innføringen som du gjorde i leksjon 1.2: :q! + + 2. Skriv denne kommandoen pÃ¥ kommandolinja: vim tutor + «vim» er kommandoen for Ã¥ starte Vim-editoren, «tutor» er navnet pÃ¥ fila + som du vil redigere. Bruk en fil som kan forandres. + + 3. Sett inn og slett tekst som du lærte i de foregÃ¥ende leksjonene. + + 4. Lagre filen med forandringene og avslutt Vim med: :wq + + 5. Start innføringen pÃ¥ nytt og flytt ned til oppsummeringen som følger. + + 6. Etter Ã¥ ha lest og forstÃ¥tt stegene ovenfor: Sett i gang. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 1 + + + 1. Markøren beveges ved hjelp av piltastene eller hjkl-tastene. + h (venstre) j (ned) k (opp) l (høyre) + + 2. For Ã¥ starte Vim fra skall-kommandolinjen, skriv: vim FILNAVN + + 3. For Ã¥ avslutte Vim, skriv: :q! for Ã¥ forkaste endringer. + ELLER skriv: :wq for Ã¥ lagre forandringene. + + 4. For Ã¥ slette tegnet under markøren, trykk: x + + 5. For Ã¥ sette inn eller legge til tekst, trykk: + i skriv innsatt tekst sett inn før markøren + A skriv tillagt tekst legg til pÃ¥ slutten av linjen + +MERK: NÃ¥r du trykker gÃ¥r du til normalmodus eller du avbryter en uønsket + og delvis fullført kommando. + + NÃ¥ kan du gÃ¥ videre til leksjon 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.1: SLETTEKOMMANDOER + + + ** Trykk dw for Ã¥ slette et ord. ** + + 1. Trykk for Ã¥ være sikker pÃ¥ at du er i normalmodus. + + 2. Flytt markøren til den første linjen nedenfor merket --->. + + 3. Flytt markøren til begynnelsen av ordet som skal slettes. + + 4. Trykk dw og ordet vil forsvinne. + +MERK: Bokstaven d vil komme til syne pÃ¥ den nederste linjen pÃ¥ skjermen nÃ¥r + du skriver den. Vim venter pÃ¥ at du skal skrive w . Hvis du ser et annet + tegn enn d har du skrevet noe feil; trykk og start pÃ¥ nytt. + +---> Det er agurk tre ord eple som ikke hører pære hjemme i denne setningen. +---> Det er tre ord som ikke hører hjemme i denne setningen. + + 5. Repeter punkt 3 og 4 til den første setningen er lik den andre. GÃ¥ + deretter til leksjon 2.2. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.2: FLERE SLETTEKOMMANDOER + + + ** Trykk d$ for Ã¥ slette til slutten av linjen. ** + + 1. Trykk for Ã¥ være sikker pÃ¥ at du er i normalmodus. + + 2. Flytt markøren til linjen nedenfor merket --->. + + 3. Flytt markøren til punktet der linjen skal kuttes (ETTER første punktum). + + 4. Trykk d$ for Ã¥ slette alt til slutten av linjen. + +---> Noen skrev slutten pÃ¥ linjen en gang for mye. linjen en gang for mye. + + 5. GÃ¥ til leksjon 2.3 for Ã¥ forstÃ¥ hva som skjer. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.3: OM OPERATORER OG BEVEGELSER + + + Mange kommandoer som forandrer teksten er laget ut i fra en operator og en + bevegelse. Formatet for en slettekommando med sletteoperatoren d er: + + d bevegelse + + Der: + d - er sletteoperatoren. + bevegelse - er hva operatoren vil opere pÃ¥ (listet nedenfor). + + En kort liste med bevegelser: + w - til starten av det neste ordet, UNNTATT det første tegnet. + e - til slutten av det nÃ¥værende ordet, INKLUDERT det siste tegnet. + $ - til slutten av linjen, INKLUDERT det siste tegnet. + + Ved Ã¥ skrive de vil altsÃ¥ alt fra markøren til slutten av ordet bli + slettet. + +MERK: Ved Ã¥ skrive kun bevegelsen i normalmodusen uten en operator vil + markøren flyttes som spesifisert. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKSJON 2.4: BRUK AV TELLER FOR EN BEVEGELSE + + + ** Ved Ã¥ skrive et tall foran en bevegelse repeterer den sÃ¥ mange ganger. ** + + 1. Flytt markøren til starten av linjen markert ---> nedenfor. + + 2. Skriv 2w for Ã¥ flytte markøren to ord framover. + + 3. Skriv 3e for Ã¥ flytte markøren framover til slutten av det tredje + ordet. + + 4. Skriv 0 (null) for Ã¥ flytte til starten av linjen. + + 5. Repeter steg 2 og 3 med forskjellige tall. + +---> Dette er en linje med noen ord som du kan bevege deg rundt pÃ¥. + + 6. GÃ¥ videre til leksjon 2.5. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.5: BRUK AV ANTALL FOR Ã… SLETTE MER + + + ** Et tall sammen med en operator repeterer den sÃ¥ mange ganger. ** + + I kombinasjonen med sletteoperatoren og en bevegelse nevnt ovenfor setter du + inn antall før bevegelsen for Ã¥ slette mer: + d nummer bevegelse + + 1. Flytt markøren til det første ordet med STORE BOKSTAVER pÃ¥ linjen markert + med --->. + + 2. Skriv 2dw for Ã¥ slette de to ordene med store bokstaver. + + 3. Repeter steg 1 og 2 med forskjelling antall for Ã¥ slette de etterfølgende + ordene som har store bokstaver. + +---> Denne ABC DE linjen FGHI JK LMN OP er nÃ¥ Q RS TUV litt mer lesbar. + +MERK: Et antall mellom operatoren d og bevegelsen virker pÃ¥ samme mÃ¥te som Ã¥ + bruke bevegelsen uten en operator. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.6: OPERERE PÃ… LINJER + + + ** Trykk dd for Ã¥ slette en hel linje. ** + + PÃ¥ grunn av at sletting av linjer er mye brukt, fant utviklerne av Vi ut at + det vil være lettere Ã¥ rett og slett trykke to d-er for Ã¥ slette en linje. + + 1. Flytt markøren til den andre linjen i verset nedenfor. + 2. Trykk dd Ã¥ slette linjen. + 3. Flytt deretter til den fjerde linjen. + 4. Trykk 2dd for Ã¥ slette to linjer. + +---> 1) Roser er røde, +---> 2) Gjørme er gøy, +---> 3) Fioler er blÃ¥, +---> 4) Jeg har en bil, +---> 5) Klokker viser tiden, +---> 6) Druer er søte +---> 7) Og du er likesÃ¥. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.7: ANGRE-KOMMANDOEN + + + ** Trykk u for Ã¥ angre siste kommando, U for Ã¥ fikse en hel linje. ** + + 1. Flytt markøren til linjen nedenfor merket ---> og plasser den pÃ¥ den + første feilen. + 2. Trykk x for Ã¥ slette det første uønskede tegnet. + 3. Trykk sÃ¥ u for Ã¥ angre den siste utførte kommandoen. + 4. Deretter ordner du alle feilene pÃ¥ linjene ved Ã¥ bruke kommandoen x . + 5. Trykk nÃ¥ en stor U for Ã¥ sette linjen tilbake til det den var + originalt. + 6. Trykk u noen ganger for Ã¥ angre U og foregÃ¥ende kommandoer. + 7. Deretter trykker du CTRL-R (hold CTRL nede mens du trykker R) noen + ganger for Ã¥ gjenopprette kommandoene (omgjøre angrekommandoene). + +---> RReparer feiilene påå denne linnnjen oog erssstatt dem meed angre. + + 8. Dette er meget nyttige kommandoer. NÃ¥ kan du gÃ¥ til oppsummeringen av + leksjon 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 2 + + + 1. For Ã¥ slette fra markøren fram til det neste ordet, trykk: dw + 2. For Ã¥ slette fra markøren til slutten av en linje, trykk: d$ + 3. For Ã¥ slette en hel linje, trykk: dd + + 4. For Ã¥ repetere en bevegelse, sett et nummer foran: 2w + 5. Formatet for en forandringskommando er: + operator [nummer] bevegelse + der: + operator - hva som skal gjøres, f.eks. d for Ã¥ slette + [nummer] - et valgfritt antall for Ã¥ repetere bevegelsen + bevegelse - hva kommandoen skal operere pÃ¥, eksempelvis w (ord), + $ (til slutten av linjen) og sÃ¥ videre. + + 6. For Ã¥ gÃ¥ til starten av en linje, bruk en null: 0 + + 7. For Ã¥ angre tidligere endringer, skriv: u (liten u) + For Ã¥ angre alle forandringer pÃ¥ en linje, skriv: U (stor U) + For Ã¥ omgjøre angringen, trykk: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.1: «LIM INN»-KOMMANDOEN + + + ** Trykk p for Ã¥ lime inn tidligere slettet tekst etter markøren ** + + 1. Flytt markøren til den første linjen med ---> nedenfor. + + 2. Trykk dd for Ã¥ slette linjen og lagre den i et Vim-register. + + 3. Flytt markøren til c)-linjen, OVER posisjonen linjen skal settes inn. + + 4. Trykk p for Ã¥ legge linjen under markøren. + + 5. Repeter punkt 2 til 4 helt til linjene er i riktig rekkefølge. + +---> d) Kan du ogsÃ¥ lære? +---> b) Fioler er blÃ¥, +---> c) Intelligens mÃ¥ læres, +---> a) Roser er røde, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.2: «ERSTATT»-KOMMANDOEN + + + ** Trykk rx for Ã¥ erstatte tegnet under markøren med x. ** + + 1. Flytt markøren til den første linjen nedenfor merket --->. + + 2. Flytt markøren sÃ¥ den stÃ¥r oppÃ¥ den første feilen. + + 3. Trykk r og deretter tegnet som skal være der. + + 4. Repeter punkt 2 og 3 til den første linjen er lik den andre. + +---> Da dfnne lynjxn ble zkrevet, var det nøen som tjykket feite taster! +---> Da denne linjen ble skrevet, var det noen som trykket feile taster! + + 5. GÃ¥ videre til leksjon 3.2. + +MERK: Husk at du bør lære ved Ã¥ BRUKE, ikke pugge. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.3: «FORANDRE»-OPERATOREN + + + ** For Ã¥ forandre til slutten av et ord, trykk ce . ** + + 1. Flytt markøren til den første linjen nedenfor som er merket --->. + + 2. Plasser markøren pÃ¥ u i «lubjwr». + + 3. Trykk ce og det korrekte ordet (i dette tilfellet, skriv «injen»). + + 4. Trykk og gÃ¥ til det neste tegnet som skal forandres. + + 5. Repeter punkt 3 og 4 helt til den første setningen er lik den andre. + +---> Denne lubjwr har noen wgh som mÃ¥ forkwÃ¥p med «forækzryas»-kommandoen. +---> Denne linjen har noen ord som mÃ¥ forandres med «forandre»-kommandoen. + +Vær oppmerksom pÃ¥ at ce sletter ordet og gÃ¥r inn i innsettingsmodus. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.4: FLERE FORANDRINGER VED BRUK AV c + + + ** Forandringskommandoen blir brukt med de samme bevegelser som «slett». ** + + 1. Forandringsoperatoren fungerer pÃ¥ samme mÃ¥te som «slett». Formatet er: + + c [nummer] bevegelse + + 2. Bevegelsene er de samme, som for eksempel w (ord) og $ (slutten av en + linje). + + 3. GÃ¥ til den første linjen nedenfor som er merket --->. + + 4. Flytt markøren til den første feilen. + + 5. Skriv c$ og skriv resten av linjen lik den andre og trykk . + +---> Slutten pÃ¥ denne linjen trenger litt hjelp for Ã¥ gjøre den lik den neste. +---> Slutten pÃ¥ denne linjen trenger Ã¥ bli rettet ved bruk av c$-kommandoen. + +MERK: Du kan bruke slettetasten for Ã¥ rette feil mens du skriver. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 3 + + + 1. For Ã¥ legge tilbake tekst som nettopp er blitt slettet, trykk p . Dette + limer inn den slettede teksten ETTER markøren (hvis en linje ble slettet + vil den bli limt inn pÃ¥ linjen under markøren). + + 2. For Ã¥ erstatte et tegn under markøren, trykk r og deretter tegnet som + du vil ha der. + + 3. Forandringsoperatoren lar deg forandre fra markøren til dit bevegelsen + tar deg. Det vil si, skriv ce for Ã¥ forandre fra markøren til slutten + av ordet, c$ for Ã¥ forandre til slutten av linjen. + + 4. Formatet for «forandre» er: + + c [nummer] bevegelse + +NÃ¥ kan du gÃ¥ til neste leksjon. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.1: POSISJONERING AV MARKØREN OG FILSTATUS + + ** Trykk CTRL-G for Ã¥ vise posisjonen i filen og filstatusen. + Trykk G for Ã¥ gÃ¥ til en spesifikk linje i filen. ** + + Merk: Les hele leksjonen før du utfører noen av punktene! + + 1. Hold nede Ctrl-tasten og trykk g . Vi kaller dette CTRL-G. En melding + vil komme til syne pÃ¥ bunnen av skjermen med filnavnet og posisjonen i + filen. Husk linjenummeret for bruk i steg 3. + +Merk: Du kan se markørposisjonen i nederste høyre hjørne av skjermen. Dette + skjer nÃ¥r «ruler»-valget er satt (forklart i leksjon 6). + + 2. Trykk G for Ã¥ gÃ¥ til bunnen av filen. + Skriv gg for Ã¥ gÃ¥ til begynnelsen av filen. + + 3. Skriv inn linjenummeret du var pÃ¥ og deretter G . Dette vil føre deg + tilbake til linjen du var pÃ¥ da du først trykket CTRL-G. + + 4. Utfør steg 1 til 3 hvis du føler deg sikker pÃ¥ prosedyren. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.2: SØKEKOMMANDOEN + + ** Skriv / etterfulgt av en søkestreng som du vil lete etter. ** + + 1. Trykk / nÃ¥r du er i normalmodusen. Legg merke til at skrÃ¥streken og + markøren kommer til syne pÃ¥ bunnen av skjermen i likhet med + «:»-kommandoene. + + 2. Skriv «feeeiil» og trykk . Dette er teksten du vil lete etter. + + 3. For Ã¥ finne neste forekomst av søkestrengen, trykk n . + For Ã¥ lete etter samme søketeksten i motsatt retning, trykk N . + + 4. For Ã¥ lete etter en tekst bakover i filen, bruk ? istedenfor / . + + 5. For Ã¥ gÃ¥ tilbake til der du kom fra, trykk CTRL-O (Hold Ctrl nede mens + du trykker bokstaven o ). Repeter for Ã¥ gÃ¥ enda lengre tilbake. CTRL-I + gÃ¥r framover. + +---> «feeeiil» er ikke mÃ¥ten Ã¥ skrive «feil» pÃ¥, feeeiil er helt feil. +Merk: NÃ¥r søkingen nÃ¥r slutten av filen, vil den fortsette fra starten unntatt + hvis «wrapscan»-valget er resatt. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.3: FINN SAMSVARENDE PARENTESER + + + ** Trykk % for Ã¥ finne en samsvarende ), ] eller } . ** + + 1. Plasser markøren pÃ¥ en (, [ eller { pÃ¥ linjen nedenfor merket --->. + + 2. Trykk % . + + 3. Markøren vil gÃ¥ til den samsvarende parentesen eller hakeparentesen. + + 4. Trykk % for Ã¥ flytte markøren til den andre samsvarende parentesen. + + 5. Flytt markøren til en annen (, ), [, ], { eller } og se hva % gjør. + +---> Dette ( er en testlinje med (, [ ] og { } i den )). + +Merk: Dette er veldig nyttig til feilsøking i programmer som har ubalansert + antall parenteser! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.4: ERSTATT-KOMMANDOEN + + + ** Skriv :s/gammel/ny/g for Ã¥ erstatte «gammel» med «ny». ** + + 1. Flytt markøren til linjen nedenfor som er merket med --->. + + 2. Skriv :s/deen/den/ . Legg merke til at denne kommandoen bare + forandrer den første forekomsten av «deen» pÃ¥ linjen. + + 3. Skriv :s/deen/den/g . NÃ¥r g-flagget legges til, betyr dette global + erstatning pÃ¥ linjen og erstatter alle forekomster av «deen» pÃ¥ linjen. + +---> deen som kan kaste deen tyngste steinen lengst er deen beste + + 4. For Ã¥ erstatte alle forekomster av en tekststreng mellom to linjer, + skriv :#,#s/gammel/ny/g der #,# er linjenumrene pÃ¥ de to linjene for + linjeomrÃ¥det erstatningen skal gjøres. + Skriv :%s/gammel/ny/g for Ã¥ erstatte tekst i hele filen. + Skriv :%s/gammel/ny/gc for Ã¥ finne alle forekomster i hele filen, og + deretter spørre om teksten skal erstattes eller + ikke. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 4 + + + 1. Ctrl-G viser nÃ¥værende posisjon i filen og filstatusen. + G gÃ¥r til slutten av filen. + nummer G gÃ¥r til det linjenummeret. + gg gÃ¥r til den første linjen. + + 2. Skriv / etterfulgt av en søketekst for Ã¥ lete FRAMOVER etter teksten. + Skriv ? etterfulgt av en søketekst for Ã¥ lete BAKOVER etter teksten. + Etter et søk kan du trykke n for Ã¥ finne neste forekomst i den samme + retningen eller N for Ã¥ lete i motsatt retning. + CTRL-O tar deg tilbake til gamle posisjoner, CTRL-I til nyere posisjoner. + + 3. Skriv % nÃ¥r markøren stÃ¥r pÃ¥ en (, ), [, ], { eller } for Ã¥ finne den + som samsvarer. + + 4. Erstatte «gammel» med første «ny» pÃ¥ en linje: :s/gammel/ny + Erstatte alle «gammel» med «ny» pÃ¥ en linje: :s/gammel/ny/g + Erstatte tekst mellom to linjenumre: :#,#s/gammel/ny/g + Erstatte alle forekomster i en fil: :%s/gammel/ny/g + For Ã¥ godkjenne hver erstatning, legg til «c»: :%s/gammel/ny/gc +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.1: HVORDAN UTFØRE EN EKSTERN KOMMANDO + + + ** Skriv :! etterfulgt av en ekstern kommando for Ã¥ utføre denne. ** + + 1. Skriv den velkjente kommandoen : for Ã¥ plassere markøren pÃ¥ bunnen av + skjermen. Dette lar deg skrive en kommandolinjekommando. + + 2. NÃ¥ kan du skrive tegnet ! . Dette lar deg utføre en hvilken som helst + ekstern kommando. + + 3. Som et eksempel, skriv ls etter utropstegnet og trykk . Du vil + nÃ¥ fÃ¥ en liste over filene i katalogen, akkurat som om du hadde kjørt + kommandoen direkte fra kommandolinjen i skallet. Eller bruk :!dir hvis + «ls» ikke virker. + +MERK: Det er mulig Ã¥ kjøre alle eksterne kommandoer pÃ¥ denne mÃ¥ten, ogsÃ¥ med + parametere. + +MERK: Alle «:»-kommandoer mÃ¥ avsluttes med . Fra dette punktet er det + ikke alltid vi nevner det. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.2: MER OM LAGRING AV FILER + + + ** For Ã¥ lagre endringene gjort i en tekst, skriv :w FILNAVN. ** + + 1. Skriv :!dir eller :!ls for Ã¥ fÃ¥ en liste over filene i katalogen. Du + vet allerede at du mÃ¥ trykke etter dette. + + 2. Velg et filnavn pÃ¥ en fil som ikke finnes, som for eksempel TEST . + + 3. Skriv :w TEST (der TEST er filnavnet du velger). + + 4. Dette lagrer hele filen (denne innføringen) under navnet TEST . For Ã¥ + sjekke dette, skriv :!dir eller :!ls igjen for Ã¥ se innholdet av + katalogen. + +Merk: Hvis du nÃ¥ hadde avsluttet Vim og startet pÃ¥ nytt igjen med «vim TEST», + ville filen vært en eksakt kopi av innføringen da du lagret den. + + 5. Fjern filen ved Ã¥ skrive :!rm TEST hvis du er pÃ¥ et Unix-lignende + operativsystem, eller :!del TEST hvis du bruker MS-DOS. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.3: VELGE TEKST SOM SKAL LAGRES + + + ** For Ã¥ lagre en del av en fil, skriv v bevegelse :w FILNAVN ** + + 1. Flytt markøren til denne linjen. + + 2. Trykk v og flytt markøren til det femte elementet nedenfor. Legg merke + til at teksten blir markert. + + 3. Trykk : (kolon). PÃ¥ bunnen av skjermen vil :'<,'> komme til syne. + + 4. Trykk w TEST , der TEST er et filnavn som ikke finnes enda. Kontroller + at du ser :'<,'>w TEST før du trykker Enter. + + 5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller !ls + for Ã¥ se den. Ikke slett den enda! Vi vil bruke den i neste leksjon. + +MERK: Ved Ã¥ trykke v startes visuelt valg. Du kan flytte markøren rundt for + Ã¥ gjøre det valgte omrÃ¥det større eller mindre. Deretter kan du bruke en + operator for Ã¥ gjøre noe med teksten. For eksempel sletter d teksten. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.4: HENTING OG SAMMENSLÃ…ING AV FILER + + + ** For Ã¥ lese inn en annen fil inn i nÃ¥værende buffer, skriv :r FILNAVN ** + + 1. Plasser markøren like over denne linjen. + +MERK: Etter Ã¥ ha utført steg 2 vil du se teksten fra leksjon 5.3. GÃ¥ deretter + NED for Ã¥ se denne leksjonen igjen. + + 2. Hent TEST-filen ved Ã¥ bruke kommandoen :r TEST der TEST er navnet pÃ¥ + filen du brukte. Filen du henter blir plassert nedenfor markørlinjen. + + 3. For Ã¥ sjekke at filen ble hentet, gÃ¥ tilbake og se at det er to kopier av + leksjon 5.3, originalen og denne versjonen. + +MERK: Du kan ogsÃ¥ lese utdataene av en ekstern kommando. For eksempel, :r !ls + leser utdataene av ls-kommandoen og legger dem nedenfor markøren. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 5 + + + 1. :!kommando utfører en ekstern kommandio. + + Noen nyttige eksempler er: + (MS-DOS) (Unix) + :!dir :!ls - List filene i katalogen. + :!del FILNAVN :!rm FILNAVN - Slett filen FILNAVN. + + 2. :w FILNAVN skriver den nÃ¥værende Vim-filen disken med navnet FILNAVN . + + 3. v bevegelse :w FILNAVN lagrer de visuelt valgte linjene til filen + FILNAVN. + + 4. :r FILNAVN henter filen FILNAVN og legger den inn nedenfor markøren. + + 5. :r !dir leser utdataene fra «dir»-kommandoen og legger dem nedenfor + markørposisjonen. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.1: «ÅPNE LINJE»-KOMMANDOEN + + + ** Skriv o for Ã¥ «åpne opp» for en ny linje etter markøren og gÃ¥ til + innsettingsmodus ** + + 1. Flytt markøren til linjen nedenfor merket --->. + + 2. Skriv o (liten o) for Ã¥ Ã¥pne opp en linje NEDENFOR markøren og gÃ¥ inn i + innsettingsmodus. + + 3. Skriv litt tekst og trykk for Ã¥ gÃ¥ ut av innsettingsmodusen. + +---> Etter at o er skrevet blir markøren plassert pÃ¥ den tomme linjen. + + 4. For Ã¥ Ã¥pne en ny linje OVER markøren, trykk rett og slett en stor O + istedenfor en liten o . Prøv dette pÃ¥ linjen nedenfor. + +---> Lag ny linje over denne ved Ã¥ trykke O mens markøren er pÃ¥ denne linjen. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.2: «LEGG TIL»-KOMMANDOEN + + + ** Skriv a for Ã¥ legge til tekst ETTER markøren. ** + + 1. Flytt markøren til starten av linjen merket ---> nedenfor. + + 2. Trykk e til markøren er pÃ¥ slutten av «li». + + 3. Trykk a (liten a) for Ã¥ legge til tekst ETTER markøren. + + 4. Fullfør ordet sÃ¥nn som pÃ¥ linjen nedenfor. Trykk for Ã¥ gÃ¥ ut av + innsettingsmodusen. + + 5. Bruk e for Ã¥ gÃ¥ til det neste ufullstendige ordet og repeter steg 3 og + 4. + +---> Denne li lar deg øve pÃ¥ Ã¥ leg til tek pÃ¥ en linje. +---> Denne linjen lar deg øve pÃ¥ Ã¥ legge til tekst pÃ¥ en linje. + +Merk: a, i og A gÃ¥r alle til den samme innsettingsmodusen, den eneste + forskjellen er hvor tegnene blir satt inn. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.3: EN ANNEN MÃ…TE Ã… ERSTATTE PÃ… + + + ** Skriv en stor R for Ã¥ erstatte mer enn ett tegn. ** + + 1. Flytt markøren til den første linjen nedenfor merket --->. Flytt markøren + til begynnelsen av den første «xxx»-en. + + 2. Trykk R og skriv inn tallet som stÃ¥r nedenfor pÃ¥ den andre linjen sÃ¥ + det erstatter xxx. + + 3. Trykk for Ã¥ gÃ¥ ut av erstatningsmodusen. Legg merke til at resten + av linjen forblir uforandret. + + 4. Repeter stegene for Ã¥ erstatte den gjenværende xxx. + +---> Ved Ã¥ legge 123 til xxx fÃ¥r vi xxx. +---> Ved Ã¥ legge 123 til 456 fÃ¥r vi 579. + +MERK: Erstatningsmodus er lik insettingsmodus, men hvert tegn som skrives + erstatter et eksisterende tegn. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.4: KOPIERE OG LIME INN TEKST + + + ** Bruk y-operatoren for Ã¥ kopiere tekst og p for Ã¥ lime den inn ** + + 1. GÃ¥ til linjen merket ---> nedenfor og plasser markøren etter «a)». + + 2. GÃ¥ inn i visuell modus med v og flytt markøren til like før «første». + + 3. Trykk y for Ã¥ kopiere (engelsk: «yank») den uthevede teksten. + + 4. Flytt markøren til slutten av den neste linjen: j$ + + 5. Trykk p for Ã¥ lime inn teksten. Trykk deretter: a andre . + + 6. Bruk visuell modus for Ã¥ velge « valget.», kopier det med y , gÃ¥ til + slutten av den neste linjen med j$ og legg inn teksten der med p . + +---> a) Dette er det første valget. + b) + +Merk: Du kan ogsÃ¥ bruke y som en operator; yw kopierer ett ord. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.5: SETT VALG + + + ** Sett et valg sÃ¥ søk eller erstatning ignorerer store/smÃ¥ bokstaver. ** + + 1. Let etter «ignore» ved Ã¥ skrive: /ignore + Repeter flere ganger ved Ã¥ trykke n . + + 2. Sett «ic»-valget (Ignore Case) ved Ã¥ skrive: :set ic + + 3. Søk etter «ignore» igjen ved Ã¥ trykke n . + Legg merke til at bÃ¥de «Ignore» og «IGNORE» blir funnet. + + 4. Sett «hlsearch»- og «incsearch»-valgene: :set hls is + + 5. Skriv søkekommandoen igjen og se hva som skjer: /ignore + + 6. For Ã¥ slÃ¥ av ignorering av store/smÃ¥ bokstaver, skriv: :set noic + +Merk: For Ã¥ fjerne uthevingen av treff, skriv: :nohlsearch +Merk: Hvis du vil ignorere store/smÃ¥ bokstaver for kun en søkekommando, bruk + \c i uttrykket: /ignore\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 6 + + 1. Trykk o for Ã¥ legge til en linje NEDENFOR markøren og gÃ¥ inn i + innsettingsmodus. + Trykk O for Ã¥ Ã¥pne en linje OVER markøren. + + 2. Skriv a for Ã¥ sette inn tekst ETTER markøren. + Skriv A for Ã¥ sette inn tekst etter slutten av linjen. + + 3. Kommandoen e gÃ¥r til slutten av et ord. + + 4. Operatoren y («yank») kopierer tekst, p («paste») limer den inn. + + 5. Ved Ã¥ trykke R gÃ¥r du inn i erstatningsmodus helt til trykkes. + + 6. Skriv «:set xxx» for Ã¥ sette valget «xxx». Noen valg er: + «ic» «ignorecase» ignorer store/smÃ¥ bokstaver under søk + «is» «incsearch» vis delvise treff for en søketekst + «hls» «hlsearch» uthev alle søketreff + + 7. Legg til «no» foran valget for Ã¥ slÃ¥ det av: :set noic + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 7.1: FÃ… HJELP + + + ** Bruk det innebygde hjelpesystemet. ** + + Vim har et omfattende innebygget hjelpesystem. For Ã¥ starte det, prøv en av + disse mÃ¥tene: + - Trykk Hjelp-tasten (hvis du har en) + - Trykk F1-tasten (hvis du har en) + - Skriv :help + + Les teksten i hjelpevinduet for Ã¥ finne ut hvordan hjelpen virker. + Skriv CTRL-W CTRL-W for Ã¥ hoppe fra et vindu til et annet + Skriv :q for Ã¥ lukke hjelpevinduet. + + Du kan fÃ¥ hjelp for omtrent alle temaer om Vim ved Ã¥ skrive et parameter til + «:help»-kommandoen. Prøv disse (ikke glem Ã¥ trykke ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 7.2: LAG ET OPPSTARTSSKRIPT + + + ** SlÃ¥ pÃ¥ funksjoner i Vim ** + + Vim har mange flere funksjoner enn Vi, men flesteparten av dem er slÃ¥tt av + som standard. For Ã¥ begynne Ã¥ bruke flere funksjoner mÃ¥ du lage en + «vimrc»-fil. + + 1. Start redigeringen av «vimrc»-filen. Dette avhenger av systemet ditt: + :e ~/.vimrc for Unix + :e $VIM/_vimrc for MS Windows + + 2. Les inn eksempelfilen for «vimrc»: + :r $VIMRUNTIME/vimrc_example.vim + + 3. Lagre filen med: + :w + + Neste gang du starter Vim vil den bruke syntaks-utheving. Du kan legge til + alle dine foretrukne oppsett i denne «vimrc»-filen. + For mer informasjon, skriv :help vimrc-intro +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 7.3: FULLFØRING + + + ** Kommandolinjefullføring med CTRL-D og ** + + 1. Vær sikker pÃ¥ at Vim ikke er i Vi-kompatibel modus: :set nocp + + 2. Se hvilke filer som er i katalogen: :!ls eller :!dir + + 3. Skriv starten pÃ¥ en kommando: :e + + 4. Trykk CTRL-D og Vim vil vise en liste over kommandoer som starter med + «e». + + 5. Trykk og Vim vil fullføre kommandonavnet til «:edit». + + 6. Legg til et mellomrom og starten pÃ¥ et eksisterende filnavn: :edit FIL + + 7. Trykk . Vim vil fullføre navnet (hvis det er unikt). + +MERK: Fullføring fungerer for mange kommandoer. Prøv ved Ã¥ trykke CTRL-D og + . Det er spesielt nyttig for bruk sammen med :help . +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 7 + + + 1. Skriv :help eller trykk eller for Ã¥ Ã¥pne et hjelpevindu. + + 2. Skriv :help kommando for Ã¥ fÃ¥ hjelp om kommando . + + 3. Trykk CTRL-W CTRL-W for Ã¥ hoppe til et annet vindu. + + 4. Trykk :q for Ã¥ lukke hjelpevinduet. + + 5. Opprett et vimrc-oppstartsskript for Ã¥ lagre favorittvalgene dine. + + 6. NÃ¥r du skriver en «:»-kommando, trykk CTRL-D for Ã¥ se mulige + fullføringer. Trykk for Ã¥ bruke en fullføring. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Her slutter innføringen i Vim. Den var ment som en rask oversikt over + editoren, akkurat nok til Ã¥ la deg sette i gang med enkel bruk. Den er pÃ¥ + langt nær komplett, da Vim har mange flere kommandoer. Les bruksanvisningen + ved Ã¥ skrive :help user-manual . + + For videre lesing og studier, kan denne boken anbefales: + «Vim - Vi Improved» av Steve Oualline + Utgiver: New Riders + Den første boken som er fullt og helt dedisert til Vim. Spesielt nyttig for + nybegynnere. Inneholder mange eksempler og illustrasjoner. + Se http://iccf-holland.org/click5.html + + Denne boken er eldre og handler mer om Vi enn Vim, men anbefales ogsÃ¥: + «Learning the Vi Editor» av Linda Lamb + Utgiver: O'Reilly & Associates Inc. + Det er en god bok for Ã¥ fÃ¥ vite omtrent hva som helst om Vi. + Den sjette utgaven inneholder ogsÃ¥ informasjon om Vim. + + Denne innføringen er skrevet av Michael C. Pierce og Robert K. Ware, + Colorado School of Mines med idéer av Charles Smith, Colorado State + University. E-mail: bware@mines.colorado.edu . + + Modifisert for Vim av Bram Moolenaar. + Oversatt av Øyvind A. Holm. E-mail: vimtutor _AT_ sunbase.org + Id: tutor.no 406 2007-03-18 22:48:36Z sunny + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +vim: set ts=8 : diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.no b/vim/bundle/ubuntu-vim72/tutor/tutor.no new file mode 100644 index 0000000..17178df --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.no @@ -0,0 +1,973 @@ +=============================================================================== += V e l k o m m e n t i l i n n f ø r i n g e n i V i m -- Ver. 1.7 = +=============================================================================== + + Vim er en meget kraftig editor med mange kommandoer, alt for mange til å + kunne gå gjennom alle i en innføring som denne. Den er beregnet på å + sette deg inn i bruken av nok kommandoer så du vil være i stand til lett + å kunne bruke Vim som en editor til alle formål. + + Tiden som kreves for å gå gjennom denne innføringen tar ca. 25-30 + minutter, avhengig av hvor mye tid du bruker til eksperimentering. + + MERK: + Kommandoene i leksjonene vil modifisere teksten. Lag en kopi av denne + filen som du kan øve deg på (hvis du kjørte «vimtutor»-kommandoen, er + dette allerede en kopi). + + Det er viktig å huske at denne innføringen er beregnet på læring gjennom + bruk. Det betyr at du må utføre kommandoene for å lære dem skikkelig. + Hvis du bare leser teksten, vil du glemme kommandoene! + + Først av alt, sjekk at «Caps Lock» IKKE er aktiv og trykk «j»-tasten for + å flytte markøren helt til leksjon 1.1 fyller skjermen. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.1: FLYTTING AV MARKØREN + + + ** For å flytte markøren, trykk tastene h, j, k, l som vist. ** + ^ + k Tips: h-tasten er til venstre og flytter til venstre. + < h l > l-tasten er til høyre og flytter til høyre. + j j-tasten ser ut som en pil som peker nedover. + v + 1. Flytt markøren rundt på skjermen til du har fått det inn i fingrene. + + 2. Hold inne nedovertasten (j) til den repeterer. + Nå vet du hvordan du beveger deg til neste leksjon. + + 3. Gå til leksjon 1.2 ved hjelp av nedovertasten. + +Merk: Hvis du blir usikker på noe du har skrevet, trykk for å gå til + normalmodus. Skriv deretter kommandoen du ønsket på nytt. + +Merk: Piltastene skal også virke. Men ved å bruke hjkl vil du være i stand til + å bevege markøren mye raskere når du er blitt vant til det. Helt sant! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.2: AVSLUTTE VIM + + + !! MERK: Før du utfører noen av punktene nedenfor, les hele leksjonen!! + + 1. Trykk -tasten (for å forsikre deg om at du er i normalmodus). + + 2. Skriv: :q! . + Dette avslutter editoren og FORKASTER alle forandringer som du har gjort. + + 3. Når du ser kommandolinjen i skallet, skriv kommandoen som startet denne + innføringen. Den er: vimtutor + + 4. Hvis du er sikker på at du husker dette, utfør punktene 1 til 3 for å + avslutte og starte editoren på nytt. + +MERK: :q! forkaster alle forandringer som du gjorde. I løpet av noen + få leksjoner vil du lære hvordan du lagrer forandringene til en fil. + + 5. Flytt markøren ned til leksjon 1.3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.3: REDIGERING AV TEKST -- SLETTING + + + ** Trykk x for å slette tegnet under markøren. ** + + 1. Flytt markøren til den første linjen merket med --->. + + 2. For å ordne feilene på linjen, flytt markøren til den er oppå tegnet som + skal slettes. + + 3. Trykk tasten x for å slette det uønskede tegnet. + + 4. Repeter punkt 2 til 4 til setningen er lik den som er under. + +---> Hessstennnn brrråsnudddde ii gaaata. +---> Hesten bråsnudde i gata. + + 5. Nå som linjen er korrekt, gå til leksjon 1.4. + +MERK: Når du går gjennom innføringen, ikke bare prøv å huske kommandoene, men + bruk dem helt til de sitter. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.4: REDIGERING AV TEKST -- INNSETTING + + + ** Trykk i for å sette inn tekst. ** + + 1. Flytt markøren til den første linjen som er merket med --->. + + 2. For å gjøre den første linjen lik den andre, flytt markøren til den står + på tegnet ETTER posisjonen der teksten skal settes inn. + + 3. Trykk i og skriv inn teksten som mangler. + + 4. Etterhvert som hver feil er fikset, trykk for å returnere til + normalmodus. Repeter punkt 2 til 4 til setningen er korrekt. + +---> Det er tkst som mnglr . +---> Det er ganske mye tekst som mangler her. + + 5. Når du føler deg komfortabel med å sette inn tekst, gå til oppsummeringen + nedenfor. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.5: REDIGERING AV TEKST -- LEGGE TIL + + + ** Trykk A for å legge til tekst. ** + + 1. Flytt markøren til den første linjen nedenfor merket --->. + Det har ikke noe å si hvor markøren er plassert på den linjen. + + 2. Trykk A og skriv inn det som skal legges til. + + 3. Når teksten er lagt til, trykk for å returnere til normalmodusen. + + 4. Flytt markøren til den andre linjen markert med ---> og repeter steg 2 og + 3 for å reparere denne setningen. + +---> Det mangler noe tekst p + Det mangler noe tekst på denne linjen. +---> Det mangler også litt tek + Det mangler også litt tekst på denne linjen. + + 5. Når du føler at du behersker å legge til tekst, gå til leksjon 1.6. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.6: REDIGERE EN FIL + + + ** Bruk :wq for å lagre en fil og avslutte. ** + + !! MERK: Før du utfører noen av stegene nedenfor, les hele denne leksjonen!! + + 1. Avslutt denne innføringen som du gjorde i leksjon 1.2: :q! + + 2. Skriv denne kommandoen på kommandolinja: vim tutor + «vim» er kommandoen for å starte Vim-editoren, «tutor» er navnet på fila + som du vil redigere. Bruk en fil som kan forandres. + + 3. Sett inn og slett tekst som du lærte i de foregående leksjonene. + + 4. Lagre filen med forandringene og avslutt Vim med: :wq + + 5. Start innføringen på nytt og flytt ned til oppsummeringen som følger. + + 6. Etter å ha lest og forstått stegene ovenfor: Sett i gang. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 1 + + + 1. Markøren beveges ved hjelp av piltastene eller hjkl-tastene. + h (venstre) j (ned) k (opp) l (høyre) + + 2. For å starte Vim fra skall-kommandolinjen, skriv: vim FILNAVN + + 3. For å avslutte Vim, skriv: :q! for å forkaste endringer. + ELLER skriv: :wq for å lagre forandringene. + + 4. For å slette tegnet under markøren, trykk: x + + 5. For å sette inn eller legge til tekst, trykk: + i skriv innsatt tekst sett inn før markøren + A skriv tillagt tekst legg til på slutten av linjen + +MERK: Når du trykker går du til normalmodus eller du avbryter en uønsket + og delvis fullført kommando. + + Nå kan du gå videre til leksjon 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.1: SLETTEKOMMANDOER + + + ** Trykk dw for å slette et ord. ** + + 1. Trykk for å være sikker på at du er i normalmodus. + + 2. Flytt markøren til den første linjen nedenfor merket --->. + + 3. Flytt markøren til begynnelsen av ordet som skal slettes. + + 4. Trykk dw og ordet vil forsvinne. + +MERK: Bokstaven d vil komme til syne på den nederste linjen på skjermen når + du skriver den. Vim venter på at du skal skrive w . Hvis du ser et annet + tegn enn d har du skrevet noe feil; trykk og start på nytt. + +---> Det er agurk tre ord eple som ikke hører pære hjemme i denne setningen. +---> Det er tre ord som ikke hører hjemme i denne setningen. + + 5. Repeter punkt 3 og 4 til den første setningen er lik den andre. Gå + deretter til leksjon 2.2. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.2: FLERE SLETTEKOMMANDOER + + + ** Trykk d$ for å slette til slutten av linjen. ** + + 1. Trykk for å være sikker på at du er i normalmodus. + + 2. Flytt markøren til linjen nedenfor merket --->. + + 3. Flytt markøren til punktet der linjen skal kuttes (ETTER første punktum). + + 4. Trykk d$ for å slette alt til slutten av linjen. + +---> Noen skrev slutten på linjen en gang for mye. linjen en gang for mye. + + 5. Gå til leksjon 2.3 for å forstå hva som skjer. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.3: OM OPERATORER OG BEVEGELSER + + + Mange kommandoer som forandrer teksten er laget ut i fra en operator og en + bevegelse. Formatet for en slettekommando med sletteoperatoren d er: + + d bevegelse + + Der: + d - er sletteoperatoren. + bevegelse - er hva operatoren vil opere på (listet nedenfor). + + En kort liste med bevegelser: + w - til starten av det neste ordet, UNNTATT det første tegnet. + e - til slutten av det nåværende ordet, INKLUDERT det siste tegnet. + $ - til slutten av linjen, INKLUDERT det siste tegnet. + + Ved å skrive de vil altså alt fra markøren til slutten av ordet bli + slettet. + +MERK: Ved å skrive kun bevegelsen i normalmodusen uten en operator vil + markøren flyttes som spesifisert. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKSJON 2.4: BRUK AV TELLER FOR EN BEVEGELSE + + + ** Ved å skrive et tall foran en bevegelse repeterer den så mange ganger. ** + + 1. Flytt markøren til starten av linjen markert ---> nedenfor. + + 2. Skriv 2w for å flytte markøren to ord framover. + + 3. Skriv 3e for å flytte markøren framover til slutten av det tredje + ordet. + + 4. Skriv 0 (null) for å flytte til starten av linjen. + + 5. Repeter steg 2 og 3 med forskjellige tall. + +---> Dette er en linje med noen ord som du kan bevege deg rundt på. + + 6. Gå videre til leksjon 2.5. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.5: BRUK AV ANTALL FOR Å SLETTE MER + + + ** Et tall sammen med en operator repeterer den så mange ganger. ** + + I kombinasjonen med sletteoperatoren og en bevegelse nevnt ovenfor setter du + inn antall før bevegelsen for å slette mer: + d nummer bevegelse + + 1. Flytt markøren til det første ordet med STORE BOKSTAVER på linjen markert + med --->. + + 2. Skriv 2dw for å slette de to ordene med store bokstaver. + + 3. Repeter steg 1 og 2 med forskjelling antall for å slette de etterfølgende + ordene som har store bokstaver. + +---> Denne ABC DE linjen FGHI JK LMN OP er nå Q RS TUV litt mer lesbar. + +MERK: Et antall mellom operatoren d og bevegelsen virker på samme måte som å + bruke bevegelsen uten en operator. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.6: OPERERE PÅ LINJER + + + ** Trykk dd for å slette en hel linje. ** + + På grunn av at sletting av linjer er mye brukt, fant utviklerne av Vi ut at + det vil være lettere å rett og slett trykke to d-er for å slette en linje. + + 1. Flytt markøren til den andre linjen i verset nedenfor. + 2. Trykk dd å slette linjen. + 3. Flytt deretter til den fjerde linjen. + 4. Trykk 2dd for å slette to linjer. + +---> 1) Roser er røde, +---> 2) Gjørme er gøy, +---> 3) Fioler er blå, +---> 4) Jeg har en bil, +---> 5) Klokker viser tiden, +---> 6) Druer er søte +---> 7) Og du er likeså. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.7: ANGRE-KOMMANDOEN + + + ** Trykk u for å angre siste kommando, U for å fikse en hel linje. ** + + 1. Flytt markøren til linjen nedenfor merket ---> og plasser den på den + første feilen. + 2. Trykk x for å slette det første uønskede tegnet. + 3. Trykk så u for å angre den siste utførte kommandoen. + 4. Deretter ordner du alle feilene på linjene ved å bruke kommandoen x . + 5. Trykk nå en stor U for å sette linjen tilbake til det den var + originalt. + 6. Trykk u noen ganger for å angre U og foregående kommandoer. + 7. Deretter trykker du CTRL-R (hold CTRL nede mens du trykker R) noen + ganger for å gjenopprette kommandoene (omgjøre angrekommandoene). + +---> RReparer feiilene påå denne linnnjen oog erssstatt dem meed angre. + + 8. Dette er meget nyttige kommandoer. Nå kan du gå til oppsummeringen av + leksjon 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 2 + + + 1. For å slette fra markøren fram til det neste ordet, trykk: dw + 2. For å slette fra markøren til slutten av en linje, trykk: d$ + 3. For å slette en hel linje, trykk: dd + + 4. For å repetere en bevegelse, sett et nummer foran: 2w + 5. Formatet for en forandringskommando er: + operator [nummer] bevegelse + der: + operator - hva som skal gjøres, f.eks. d for å slette + [nummer] - et valgfritt antall for å repetere bevegelsen + bevegelse - hva kommandoen skal operere på, eksempelvis w (ord), + $ (til slutten av linjen) og så videre. + + 6. For å gå til starten av en linje, bruk en null: 0 + + 7. For å angre tidligere endringer, skriv: u (liten u) + For å angre alle forandringer på en linje, skriv: U (stor U) + For å omgjøre angringen, trykk: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.1: «LIM INN»-KOMMANDOEN + + + ** Trykk p for å lime inn tidligere slettet tekst etter markøren ** + + 1. Flytt markøren til den første linjen med ---> nedenfor. + + 2. Trykk dd for å slette linjen og lagre den i et Vim-register. + + 3. Flytt markøren til c)-linjen, OVER posisjonen linjen skal settes inn. + + 4. Trykk p for å legge linjen under markøren. + + 5. Repeter punkt 2 til 4 helt til linjene er i riktig rekkefølge. + +---> d) Kan du også lære? +---> b) Fioler er blå, +---> c) Intelligens må læres, +---> a) Roser er røde, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.2: «ERSTATT»-KOMMANDOEN + + + ** Trykk rx for å erstatte tegnet under markøren med x. ** + + 1. Flytt markøren til den første linjen nedenfor merket --->. + + 2. Flytt markøren så den står oppå den første feilen. + + 3. Trykk r og deretter tegnet som skal være der. + + 4. Repeter punkt 2 og 3 til den første linjen er lik den andre. + +---> Da dfnne lynjxn ble zkrevet, var det nøen som tjykket feite taster! +---> Da denne linjen ble skrevet, var det noen som trykket feile taster! + + 5. Gå videre til leksjon 3.2. + +MERK: Husk at du bør lære ved å BRUKE, ikke pugge. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.3: «FORANDRE»-OPERATOREN + + + ** For å forandre til slutten av et ord, trykk ce . ** + + 1. Flytt markøren til den første linjen nedenfor som er merket --->. + + 2. Plasser markøren på u i «lubjwr». + + 3. Trykk ce og det korrekte ordet (i dette tilfellet, skriv «injen»). + + 4. Trykk og gå til det neste tegnet som skal forandres. + + 5. Repeter punkt 3 og 4 helt til den første setningen er lik den andre. + +---> Denne lubjwr har noen wgh som må forkwåp med «forækzryas»-kommandoen. +---> Denne linjen har noen ord som må forandres med «forandre»-kommandoen. + +Vær oppmerksom på at ce sletter ordet og går inn i innsettingsmodus. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.4: FLERE FORANDRINGER VED BRUK AV c + + + ** Forandringskommandoen blir brukt med de samme bevegelser som «slett». ** + + 1. Forandringsoperatoren fungerer på samme måte som «slett». Formatet er: + + c [nummer] bevegelse + + 2. Bevegelsene er de samme, som for eksempel w (ord) og $ (slutten av en + linje). + + 3. Gå til den første linjen nedenfor som er merket --->. + + 4. Flytt markøren til den første feilen. + + 5. Skriv c$ og skriv resten av linjen lik den andre og trykk . + +---> Slutten på denne linjen trenger litt hjelp for å gjøre den lik den neste. +---> Slutten på denne linjen trenger å bli rettet ved bruk av c$-kommandoen. + +MERK: Du kan bruke slettetasten for å rette feil mens du skriver. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 3 + + + 1. For å legge tilbake tekst som nettopp er blitt slettet, trykk p . Dette + limer inn den slettede teksten ETTER markøren (hvis en linje ble slettet + vil den bli limt inn på linjen under markøren). + + 2. For å erstatte et tegn under markøren, trykk r og deretter tegnet som + du vil ha der. + + 3. Forandringsoperatoren lar deg forandre fra markøren til dit bevegelsen + tar deg. Det vil si, skriv ce for å forandre fra markøren til slutten + av ordet, c$ for å forandre til slutten av linjen. + + 4. Formatet for «forandre» er: + + c [nummer] bevegelse + +Nå kan du gå til neste leksjon. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.1: POSISJONERING AV MARKØREN OG FILSTATUS + + ** Trykk CTRL-G for å vise posisjonen i filen og filstatusen. + Trykk G for å gå til en spesifikk linje i filen. ** + + Merk: Les hele leksjonen før du utfører noen av punktene! + + 1. Hold nede Ctrl-tasten og trykk g . Vi kaller dette CTRL-G. En melding + vil komme til syne på bunnen av skjermen med filnavnet og posisjonen i + filen. Husk linjenummeret for bruk i steg 3. + +Merk: Du kan se markørposisjonen i nederste høyre hjørne av skjermen. Dette + skjer når «ruler»-valget er satt (forklart i leksjon 6). + + 2. Trykk G for å gå til bunnen av filen. + Skriv gg for å gå til begynnelsen av filen. + + 3. Skriv inn linjenummeret du var på og deretter G . Dette vil føre deg + tilbake til linjen du var på da du først trykket CTRL-G. + + 4. Utfør steg 1 til 3 hvis du føler deg sikker på prosedyren. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.2: SØKEKOMMANDOEN + + ** Skriv / etterfulgt av en søkestreng som du vil lete etter. ** + + 1. Trykk / når du er i normalmodusen. Legg merke til at skråstreken og + markøren kommer til syne på bunnen av skjermen i likhet med + «:»-kommandoene. + + 2. Skriv «feeeiil» og trykk . Dette er teksten du vil lete etter. + + 3. For å finne neste forekomst av søkestrengen, trykk n . + For å lete etter samme søketeksten i motsatt retning, trykk N . + + 4. For å lete etter en tekst bakover i filen, bruk ? istedenfor / . + + 5. For å gå tilbake til der du kom fra, trykk CTRL-O (Hold Ctrl nede mens + du trykker bokstaven o ). Repeter for å gå enda lengre tilbake. CTRL-I + går framover. + +---> «feeeiil» er ikke måten å skrive «feil» på, feeeiil er helt feil. +Merk: Når søkingen når slutten av filen, vil den fortsette fra starten unntatt + hvis «wrapscan»-valget er resatt. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.3: FINN SAMSVARENDE PARENTESER + + + ** Trykk % for å finne en samsvarende ), ] eller } . ** + + 1. Plasser markøren på en (, [ eller { på linjen nedenfor merket --->. + + 2. Trykk % . + + 3. Markøren vil gå til den samsvarende parentesen eller hakeparentesen. + + 4. Trykk % for å flytte markøren til den andre samsvarende parentesen. + + 5. Flytt markøren til en annen (, ), [, ], { eller } og se hva % gjør. + +---> Dette ( er en testlinje med (, [ ] og { } i den )). + +Merk: Dette er veldig nyttig til feilsøking i programmer som har ubalansert + antall parenteser! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.4: ERSTATT-KOMMANDOEN + + + ** Skriv :s/gammel/ny/g for å erstatte «gammel» med «ny». ** + + 1. Flytt markøren til linjen nedenfor som er merket med --->. + + 2. Skriv :s/deen/den/ . Legg merke til at denne kommandoen bare + forandrer den første forekomsten av «deen» på linjen. + + 3. Skriv :s/deen/den/g . Når g-flagget legges til, betyr dette global + erstatning på linjen og erstatter alle forekomster av «deen» på linjen. + +---> deen som kan kaste deen tyngste steinen lengst er deen beste + + 4. For å erstatte alle forekomster av en tekststreng mellom to linjer, + skriv :#,#s/gammel/ny/g der #,# er linjenumrene på de to linjene for + linjeområdet erstatningen skal gjøres. + Skriv :%s/gammel/ny/g for å erstatte tekst i hele filen. + Skriv :%s/gammel/ny/gc for å finne alle forekomster i hele filen, og + deretter spørre om teksten skal erstattes eller + ikke. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 4 + + + 1. Ctrl-G viser nåværende posisjon i filen og filstatusen. + G går til slutten av filen. + nummer G går til det linjenummeret. + gg går til den første linjen. + + 2. Skriv / etterfulgt av en søketekst for å lete FRAMOVER etter teksten. + Skriv ? etterfulgt av en søketekst for å lete BAKOVER etter teksten. + Etter et søk kan du trykke n for å finne neste forekomst i den samme + retningen eller N for å lete i motsatt retning. + CTRL-O tar deg tilbake til gamle posisjoner, CTRL-I til nyere posisjoner. + + 3. Skriv % når markøren står på en (, ), [, ], { eller } for å finne den + som samsvarer. + + 4. Erstatte «gammel» med første «ny» på en linje: :s/gammel/ny + Erstatte alle «gammel» med «ny» på en linje: :s/gammel/ny/g + Erstatte tekst mellom to linjenumre: :#,#s/gammel/ny/g + Erstatte alle forekomster i en fil: :%s/gammel/ny/g + For å godkjenne hver erstatning, legg til «c»: :%s/gammel/ny/gc +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.1: HVORDAN UTFØRE EN EKSTERN KOMMANDO + + + ** Skriv :! etterfulgt av en ekstern kommando for å utføre denne. ** + + 1. Skriv den velkjente kommandoen : for å plassere markøren på bunnen av + skjermen. Dette lar deg skrive en kommandolinjekommando. + + 2. Nå kan du skrive tegnet ! . Dette lar deg utføre en hvilken som helst + ekstern kommando. + + 3. Som et eksempel, skriv ls etter utropstegnet og trykk . Du vil + nå få en liste over filene i katalogen, akkurat som om du hadde kjørt + kommandoen direkte fra kommandolinjen i skallet. Eller bruk :!dir hvis + «ls» ikke virker. + +MERK: Det er mulig å kjøre alle eksterne kommandoer på denne måten, også med + parametere. + +MERK: Alle «:»-kommandoer må avsluttes med . Fra dette punktet er det + ikke alltid vi nevner det. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.2: MER OM LAGRING AV FILER + + + ** For å lagre endringene gjort i en tekst, skriv :w FILNAVN. ** + + 1. Skriv :!dir eller :!ls for å få en liste over filene i katalogen. Du + vet allerede at du må trykke etter dette. + + 2. Velg et filnavn på en fil som ikke finnes, som for eksempel TEST . + + 3. Skriv :w TEST (der TEST er filnavnet du velger). + + 4. Dette lagrer hele filen (denne innføringen) under navnet TEST . For å + sjekke dette, skriv :!dir eller :!ls igjen for å se innholdet av + katalogen. + +Merk: Hvis du nå hadde avsluttet Vim og startet på nytt igjen med «vim TEST», + ville filen vært en eksakt kopi av innføringen da du lagret den. + + 5. Fjern filen ved å skrive :!rm TEST hvis du er på et Unix-lignende + operativsystem, eller :!del TEST hvis du bruker MS-DOS. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.3: VELGE TEKST SOM SKAL LAGRES + + + ** For å lagre en del av en fil, skriv v bevegelse :w FILNAVN ** + + 1. Flytt markøren til denne linjen. + + 2. Trykk v og flytt markøren til det femte elementet nedenfor. Legg merke + til at teksten blir markert. + + 3. Trykk : (kolon). På bunnen av skjermen vil :'<,'> komme til syne. + + 4. Trykk w TEST , der TEST er et filnavn som ikke finnes enda. Kontroller + at du ser :'<,'>w TEST før du trykker Enter. + + 5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller !ls + for å se den. Ikke slett den enda! Vi vil bruke den i neste leksjon. + +MERK: Ved å trykke v startes visuelt valg. Du kan flytte markøren rundt for + å gjøre det valgte området større eller mindre. Deretter kan du bruke en + operator for å gjøre noe med teksten. For eksempel sletter d teksten. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.4: HENTING OG SAMMENSLÅING AV FILER + + + ** For å lese inn en annen fil inn i nåværende buffer, skriv :r FILNAVN ** + + 1. Plasser markøren like over denne linjen. + +MERK: Etter å ha utført steg 2 vil du se teksten fra leksjon 5.3. Gå deretter + NED for å se denne leksjonen igjen. + + 2. Hent TEST-filen ved å bruke kommandoen :r TEST der TEST er navnet på + filen du brukte. Filen du henter blir plassert nedenfor markørlinjen. + + 3. For å sjekke at filen ble hentet, gå tilbake og se at det er to kopier av + leksjon 5.3, originalen og denne versjonen. + +MERK: Du kan også lese utdataene av en ekstern kommando. For eksempel, :r !ls + leser utdataene av ls-kommandoen og legger dem nedenfor markøren. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 5 + + + 1. :!kommando utfører en ekstern kommandio. + + Noen nyttige eksempler er: + (MS-DOS) (Unix) + :!dir :!ls - List filene i katalogen. + :!del FILNAVN :!rm FILNAVN - Slett filen FILNAVN. + + 2. :w FILNAVN skriver den nåværende Vim-filen disken med navnet FILNAVN . + + 3. v bevegelse :w FILNAVN lagrer de visuelt valgte linjene til filen + FILNAVN. + + 4. :r FILNAVN henter filen FILNAVN og legger den inn nedenfor markøren. + + 5. :r !dir leser utdataene fra «dir»-kommandoen og legger dem nedenfor + markørposisjonen. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.1: «ÅPNE LINJE»-KOMMANDOEN + + + ** Skriv o for å «åpne opp» for en ny linje etter markøren og gå til + innsettingsmodus ** + + 1. Flytt markøren til linjen nedenfor merket --->. + + 2. Skriv o (liten o) for å åpne opp en linje NEDENFOR markøren og gå inn i + innsettingsmodus. + + 3. Skriv litt tekst og trykk for å gå ut av innsettingsmodusen. + +---> Etter at o er skrevet blir markøren plassert på den tomme linjen. + + 4. For å åpne en ny linje OVER markøren, trykk rett og slett en stor O + istedenfor en liten o . Prøv dette på linjen nedenfor. + +---> Lag ny linje over denne ved å trykke O mens markøren er på denne linjen. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.2: «LEGG TIL»-KOMMANDOEN + + + ** Skriv a for å legge til tekst ETTER markøren. ** + + 1. Flytt markøren til starten av linjen merket ---> nedenfor. + + 2. Trykk e til markøren er på slutten av «li». + + 3. Trykk a (liten a) for å legge til tekst ETTER markøren. + + 4. Fullfør ordet sånn som på linjen nedenfor. Trykk for å gå ut av + innsettingsmodusen. + + 5. Bruk e for å gå til det neste ufullstendige ordet og repeter steg 3 og + 4. + +---> Denne li lar deg øve på å leg til tek på en linje. +---> Denne linjen lar deg øve på å legge til tekst på en linje. + +Merk: a, i og A går alle til den samme innsettingsmodusen, den eneste + forskjellen er hvor tegnene blir satt inn. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.3: EN ANNEN MÅTE Å ERSTATTE PÅ + + + ** Skriv en stor R for å erstatte mer enn ett tegn. ** + + 1. Flytt markøren til den første linjen nedenfor merket --->. Flytt markøren + til begynnelsen av den første «xxx»-en. + + 2. Trykk R og skriv inn tallet som står nedenfor på den andre linjen så + det erstatter xxx. + + 3. Trykk for å gå ut av erstatningsmodusen. Legg merke til at resten + av linjen forblir uforandret. + + 4. Repeter stegene for å erstatte den gjenværende xxx. + +---> Ved å legge 123 til xxx får vi xxx. +---> Ved å legge 123 til 456 får vi 579. + +MERK: Erstatningsmodus er lik insettingsmodus, men hvert tegn som skrives + erstatter et eksisterende tegn. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.4: KOPIERE OG LIME INN TEKST + + + ** Bruk y-operatoren for å kopiere tekst og p for å lime den inn ** + + 1. Gå til linjen merket ---> nedenfor og plasser markøren etter «a)». + + 2. Gå inn i visuell modus med v og flytt markøren til like før «første». + + 3. Trykk y for å kopiere (engelsk: «yank») den uthevede teksten. + + 4. Flytt markøren til slutten av den neste linjen: j$ + + 5. Trykk p for å lime inn teksten. Trykk deretter: a andre . + + 6. Bruk visuell modus for å velge « valget.», kopier det med y , gå til + slutten av den neste linjen med j$ og legg inn teksten der med p . + +---> a) Dette er det første valget. + b) + +Merk: Du kan også bruke y som en operator; yw kopierer ett ord. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.5: SETT VALG + + + ** Sett et valg så søk eller erstatning ignorerer store/små bokstaver. ** + + 1. Let etter «ignore» ved å skrive: /ignore + Repeter flere ganger ved å trykke n . + + 2. Sett «ic»-valget (Ignore Case) ved å skrive: :set ic + + 3. Søk etter «ignore» igjen ved å trykke n . + Legg merke til at både «Ignore» og «IGNORE» blir funnet. + + 4. Sett «hlsearch»- og «incsearch»-valgene: :set hls is + + 5. Skriv søkekommandoen igjen og se hva som skjer: /ignore + + 6. For å slå av ignorering av store/små bokstaver, skriv: :set noic + +Merk: For å fjerne uthevingen av treff, skriv: :nohlsearch +Merk: Hvis du vil ignorere store/små bokstaver for kun en søkekommando, bruk + \c i uttrykket: /ignore\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 6 + + 1. Trykk o for å legge til en linje NEDENFOR markøren og gå inn i + innsettingsmodus. + Trykk O for å åpne en linje OVER markøren. + + 2. Skriv a for å sette inn tekst ETTER markøren. + Skriv A for å sette inn tekst etter slutten av linjen. + + 3. Kommandoen e går til slutten av et ord. + + 4. Operatoren y («yank») kopierer tekst, p («paste») limer den inn. + + 5. Ved å trykke R går du inn i erstatningsmodus helt til trykkes. + + 6. Skriv «:set xxx» for å sette valget «xxx». Noen valg er: + «ic» «ignorecase» ignorer store/små bokstaver under søk + «is» «incsearch» vis delvise treff for en søketekst + «hls» «hlsearch» uthev alle søketreff + + 7. Legg til «no» foran valget for å slå det av: :set noic + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 7.1: FÅ HJELP + + + ** Bruk det innebygde hjelpesystemet. ** + + Vim har et omfattende innebygget hjelpesystem. For å starte det, prøv en av + disse måtene: + - Trykk Hjelp-tasten (hvis du har en) + - Trykk F1-tasten (hvis du har en) + - Skriv :help + + Les teksten i hjelpevinduet for å finne ut hvordan hjelpen virker. + Skriv CTRL-W CTRL-W for å hoppe fra et vindu til et annet + Skriv :q for å lukke hjelpevinduet. + + Du kan få hjelp for omtrent alle temaer om Vim ved å skrive et parameter til + «:help»-kommandoen. Prøv disse (ikke glem å trykke ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 7.2: LAG ET OPPSTARTSSKRIPT + + + ** Slå på funksjoner i Vim ** + + Vim har mange flere funksjoner enn Vi, men flesteparten av dem er slått av + som standard. For å begynne å bruke flere funksjoner må du lage en + «vimrc»-fil. + + 1. Start redigeringen av «vimrc»-filen. Dette avhenger av systemet ditt: + :e ~/.vimrc for Unix + :e $VIM/_vimrc for MS Windows + + 2. Les inn eksempelfilen for «vimrc»: + :r $VIMRUNTIME/vimrc_example.vim + + 3. Lagre filen med: + :w + + Neste gang du starter Vim vil den bruke syntaks-utheving. Du kan legge til + alle dine foretrukne oppsett i denne «vimrc»-filen. + For mer informasjon, skriv :help vimrc-intro +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 7.3: FULLFØRING + + + ** Kommandolinjefullføring med CTRL-D og ** + + 1. Vær sikker på at Vim ikke er i Vi-kompatibel modus: :set nocp + + 2. Se hvilke filer som er i katalogen: :!ls eller :!dir + + 3. Skriv starten på en kommando: :e + + 4. Trykk CTRL-D og Vim vil vise en liste over kommandoer som starter med + «e». + + 5. Trykk og Vim vil fullføre kommandonavnet til «:edit». + + 6. Legg til et mellomrom og starten på et eksisterende filnavn: :edit FIL + + 7. Trykk . Vim vil fullføre navnet (hvis det er unikt). + +MERK: Fullføring fungerer for mange kommandoer. Prøv ved å trykke CTRL-D og + . Det er spesielt nyttig for bruk sammen med :help . +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 7 + + + 1. Skriv :help eller trykk eller for å åpne et hjelpevindu. + + 2. Skriv :help kommando for å få hjelp om kommando . + + 3. Trykk CTRL-W CTRL-W for å hoppe til et annet vindu. + + 4. Trykk :q for å lukke hjelpevinduet. + + 5. Opprett et vimrc-oppstartsskript for å lagre favorittvalgene dine. + + 6. Når du skriver en «:»-kommando, trykk CTRL-D for å se mulige + fullføringer. Trykk for å bruke en fullføring. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Her slutter innføringen i Vim. Den var ment som en rask oversikt over + editoren, akkurat nok til å la deg sette i gang med enkel bruk. Den er på + langt nær komplett, da Vim har mange flere kommandoer. Les bruksanvisningen + ved å skrive :help user-manual . + + For videre lesing og studier, kan denne boken anbefales: + «Vim - Vi Improved» av Steve Oualline + Utgiver: New Riders + Den første boken som er fullt og helt dedisert til Vim. Spesielt nyttig for + nybegynnere. Inneholder mange eksempler og illustrasjoner. + Se http://iccf-holland.org/click5.html + + Denne boken er eldre og handler mer om Vi enn Vim, men anbefales også: + «Learning the Vi Editor» av Linda Lamb + Utgiver: O'Reilly & Associates Inc. + Det er en god bok for å få vite omtrent hva som helst om Vi. + Den sjette utgaven inneholder også informasjon om Vim. + + Denne innføringen er skrevet av Michael C. Pierce og Robert K. Ware, + Colorado School of Mines med idéer av Charles Smith, Colorado State + University. E-mail: bware@mines.colorado.edu . + + Modifisert for Vim av Bram Moolenaar. + Oversatt av Øyvind A. Holm. E-mail: vimtutor _AT_ sunbase.org + Id: tutor.no 406 2007-03-18 22:48:36Z sunny + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +vim: set ts=8 : diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.no.utf-8 b/vim/bundle/ubuntu-vim72/tutor/tutor.no.utf-8 new file mode 100644 index 0000000..a7826b7 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.no.utf-8 @@ -0,0 +1,973 @@ +=============================================================================== += V e l k o m m e n t i l i n n f ø r i n g e n i V i m -- Ver. 1.7 = +=============================================================================== + + Vim er en meget kraftig editor med mange kommandoer, alt for mange til Ã¥ + kunne gÃ¥ gjennom alle i en innføring som denne. Den er beregnet pÃ¥ Ã¥ + sette deg inn i bruken av nok kommandoer sÃ¥ du vil være i stand til lett + Ã¥ kunne bruke Vim som en editor til alle formÃ¥l. + + Tiden som kreves for Ã¥ gÃ¥ gjennom denne innføringen tar ca. 25-30 + minutter, avhengig av hvor mye tid du bruker til eksperimentering. + + MERK: + Kommandoene i leksjonene vil modifisere teksten. Lag en kopi av denne + filen som du kan øve deg pÃ¥ (hvis du kjørte «vimtutor»-kommandoen, er + dette allerede en kopi). + + Det er viktig Ã¥ huske at denne innføringen er beregnet pÃ¥ læring gjennom + bruk. Det betyr at du mÃ¥ utføre kommandoene for Ã¥ lære dem skikkelig. + Hvis du bare leser teksten, vil du glemme kommandoene! + + Først av alt, sjekk at «Caps Lock» IKKE er aktiv og trykk «j»-tasten for + Ã¥ flytte markøren helt til leksjon 1.1 fyller skjermen. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.1: FLYTTING AV MARKØREN + + + ** For Ã¥ flytte markøren, trykk tastene h, j, k, l som vist. ** + ^ + k Tips: h-tasten er til venstre og flytter til venstre. + < h l > l-tasten er til høyre og flytter til høyre. + j j-tasten ser ut som en pil som peker nedover. + v + 1. Flytt markøren rundt pÃ¥ skjermen til du har fÃ¥tt det inn i fingrene. + + 2. Hold inne nedovertasten (j) til den repeterer. + NÃ¥ vet du hvordan du beveger deg til neste leksjon. + + 3. GÃ¥ til leksjon 1.2 ved hjelp av nedovertasten. + +Merk: Hvis du blir usikker pÃ¥ noe du har skrevet, trykk for Ã¥ gÃ¥ til + normalmodus. Skriv deretter kommandoen du ønsket pÃ¥ nytt. + +Merk: Piltastene skal ogsÃ¥ virke. Men ved Ã¥ bruke hjkl vil du være i stand til + Ã¥ bevege markøren mye raskere nÃ¥r du er blitt vant til det. Helt sant! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.2: AVSLUTTE VIM + + + !! MERK: Før du utfører noen av punktene nedenfor, les hele leksjonen!! + + 1. Trykk -tasten (for Ã¥ forsikre deg om at du er i normalmodus). + + 2. Skriv: :q! . + Dette avslutter editoren og FORKASTER alle forandringer som du har gjort. + + 3. NÃ¥r du ser kommandolinjen i skallet, skriv kommandoen som startet denne + innføringen. Den er: vimtutor + + 4. Hvis du er sikker pÃ¥ at du husker dette, utfør punktene 1 til 3 for Ã¥ + avslutte og starte editoren pÃ¥ nytt. + +MERK: :q! forkaster alle forandringer som du gjorde. I løpet av noen + fÃ¥ leksjoner vil du lære hvordan du lagrer forandringene til en fil. + + 5. Flytt markøren ned til leksjon 1.3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.3: REDIGERING AV TEKST -- SLETTING + + + ** Trykk x for Ã¥ slette tegnet under markøren. ** + + 1. Flytt markøren til den første linjen merket med --->. + + 2. For Ã¥ ordne feilene pÃ¥ linjen, flytt markøren til den er oppÃ¥ tegnet som + skal slettes. + + 3. Trykk tasten x for Ã¥ slette det uønskede tegnet. + + 4. Repeter punkt 2 til 4 til setningen er lik den som er under. + +---> Hessstennnn brrrÃ¥snudddde ii gaaata. +---> Hesten brÃ¥snudde i gata. + + 5. NÃ¥ som linjen er korrekt, gÃ¥ til leksjon 1.4. + +MERK: NÃ¥r du gÃ¥r gjennom innføringen, ikke bare prøv Ã¥ huske kommandoene, men + bruk dem helt til de sitter. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.4: REDIGERING AV TEKST -- INNSETTING + + + ** Trykk i for Ã¥ sette inn tekst. ** + + 1. Flytt markøren til den første linjen som er merket med --->. + + 2. For Ã¥ gjøre den første linjen lik den andre, flytt markøren til den stÃ¥r + pÃ¥ tegnet ETTER posisjonen der teksten skal settes inn. + + 3. Trykk i og skriv inn teksten som mangler. + + 4. Etterhvert som hver feil er fikset, trykk for Ã¥ returnere til + normalmodus. Repeter punkt 2 til 4 til setningen er korrekt. + +---> Det er tkst som mnglr . +---> Det er ganske mye tekst som mangler her. + + 5. NÃ¥r du føler deg komfortabel med Ã¥ sette inn tekst, gÃ¥ til oppsummeringen + nedenfor. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.5: REDIGERING AV TEKST -- LEGGE TIL + + + ** Trykk A for Ã¥ legge til tekst. ** + + 1. Flytt markøren til den første linjen nedenfor merket --->. + Det har ikke noe Ã¥ si hvor markøren er plassert pÃ¥ den linjen. + + 2. Trykk A og skriv inn det som skal legges til. + + 3. NÃ¥r teksten er lagt til, trykk for Ã¥ returnere til normalmodusen. + + 4. Flytt markøren til den andre linjen markert med ---> og repeter steg 2 og + 3 for Ã¥ reparere denne setningen. + +---> Det mangler noe tekst p + Det mangler noe tekst pÃ¥ denne linjen. +---> Det mangler ogsÃ¥ litt tek + Det mangler ogsÃ¥ litt tekst pÃ¥ denne linjen. + + 5. NÃ¥r du føler at du behersker Ã¥ legge til tekst, gÃ¥ til leksjon 1.6. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.6: REDIGERE EN FIL + + + ** Bruk :wq for Ã¥ lagre en fil og avslutte. ** + + !! MERK: Før du utfører noen av stegene nedenfor, les hele denne leksjonen!! + + 1. Avslutt denne innføringen som du gjorde i leksjon 1.2: :q! + + 2. Skriv denne kommandoen pÃ¥ kommandolinja: vim tutor + «vim» er kommandoen for Ã¥ starte Vim-editoren, «tutor» er navnet pÃ¥ fila + som du vil redigere. Bruk en fil som kan forandres. + + 3. Sett inn og slett tekst som du lærte i de foregÃ¥ende leksjonene. + + 4. Lagre filen med forandringene og avslutt Vim med: :wq + + 5. Start innføringen pÃ¥ nytt og flytt ned til oppsummeringen som følger. + + 6. Etter Ã¥ ha lest og forstÃ¥tt stegene ovenfor: Sett i gang. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 1 + + + 1. Markøren beveges ved hjelp av piltastene eller hjkl-tastene. + h (venstre) j (ned) k (opp) l (høyre) + + 2. For Ã¥ starte Vim fra skall-kommandolinjen, skriv: vim FILNAVN + + 3. For Ã¥ avslutte Vim, skriv: :q! for Ã¥ forkaste endringer. + ELLER skriv: :wq for Ã¥ lagre forandringene. + + 4. For Ã¥ slette tegnet under markøren, trykk: x + + 5. For Ã¥ sette inn eller legge til tekst, trykk: + i skriv innsatt tekst sett inn før markøren + A skriv tillagt tekst legg til pÃ¥ slutten av linjen + +MERK: NÃ¥r du trykker gÃ¥r du til normalmodus eller du avbryter en uønsket + og delvis fullført kommando. + + NÃ¥ kan du gÃ¥ videre til leksjon 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.1: SLETTEKOMMANDOER + + + ** Trykk dw for Ã¥ slette et ord. ** + + 1. Trykk for Ã¥ være sikker pÃ¥ at du er i normalmodus. + + 2. Flytt markøren til den første linjen nedenfor merket --->. + + 3. Flytt markøren til begynnelsen av ordet som skal slettes. + + 4. Trykk dw og ordet vil forsvinne. + +MERK: Bokstaven d vil komme til syne pÃ¥ den nederste linjen pÃ¥ skjermen nÃ¥r + du skriver den. Vim venter pÃ¥ at du skal skrive w . Hvis du ser et annet + tegn enn d har du skrevet noe feil; trykk og start pÃ¥ nytt. + +---> Det er agurk tre ord eple som ikke hører pære hjemme i denne setningen. +---> Det er tre ord som ikke hører hjemme i denne setningen. + + 5. Repeter punkt 3 og 4 til den første setningen er lik den andre. GÃ¥ + deretter til leksjon 2.2. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.2: FLERE SLETTEKOMMANDOER + + + ** Trykk d$ for Ã¥ slette til slutten av linjen. ** + + 1. Trykk for Ã¥ være sikker pÃ¥ at du er i normalmodus. + + 2. Flytt markøren til linjen nedenfor merket --->. + + 3. Flytt markøren til punktet der linjen skal kuttes (ETTER første punktum). + + 4. Trykk d$ for Ã¥ slette alt til slutten av linjen. + +---> Noen skrev slutten pÃ¥ linjen en gang for mye. linjen en gang for mye. + + 5. GÃ¥ til leksjon 2.3 for Ã¥ forstÃ¥ hva som skjer. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.3: OM OPERATORER OG BEVEGELSER + + + Mange kommandoer som forandrer teksten er laget ut i fra en operator og en + bevegelse. Formatet for en slettekommando med sletteoperatoren d er: + + d bevegelse + + Der: + d - er sletteoperatoren. + bevegelse - er hva operatoren vil opere pÃ¥ (listet nedenfor). + + En kort liste med bevegelser: + w - til starten av det neste ordet, UNNTATT det første tegnet. + e - til slutten av det nÃ¥værende ordet, INKLUDERT det siste tegnet. + $ - til slutten av linjen, INKLUDERT det siste tegnet. + + Ved Ã¥ skrive de vil altsÃ¥ alt fra markøren til slutten av ordet bli + slettet. + +MERK: Ved Ã¥ skrive kun bevegelsen i normalmodusen uten en operator vil + markøren flyttes som spesifisert. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKSJON 2.4: BRUK AV TELLER FOR EN BEVEGELSE + + + ** Ved Ã¥ skrive et tall foran en bevegelse repeterer den sÃ¥ mange ganger. ** + + 1. Flytt markøren til starten av linjen markert ---> nedenfor. + + 2. Skriv 2w for Ã¥ flytte markøren to ord framover. + + 3. Skriv 3e for Ã¥ flytte markøren framover til slutten av det tredje + ordet. + + 4. Skriv 0 (null) for Ã¥ flytte til starten av linjen. + + 5. Repeter steg 2 og 3 med forskjellige tall. + +---> Dette er en linje med noen ord som du kan bevege deg rundt pÃ¥. + + 6. GÃ¥ videre til leksjon 2.5. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.5: BRUK AV ANTALL FOR Ã… SLETTE MER + + + ** Et tall sammen med en operator repeterer den sÃ¥ mange ganger. ** + + I kombinasjonen med sletteoperatoren og en bevegelse nevnt ovenfor setter du + inn antall før bevegelsen for Ã¥ slette mer: + d nummer bevegelse + + 1. Flytt markøren til det første ordet med STORE BOKSTAVER pÃ¥ linjen markert + med --->. + + 2. Skriv 2dw for Ã¥ slette de to ordene med store bokstaver. + + 3. Repeter steg 1 og 2 med forskjelling antall for Ã¥ slette de etterfølgende + ordene som har store bokstaver. + +---> Denne ABC DE linjen FGHI JK LMN OP er nÃ¥ Q RS TUV litt mer lesbar. + +MERK: Et antall mellom operatoren d og bevegelsen virker pÃ¥ samme mÃ¥te som Ã¥ + bruke bevegelsen uten en operator. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.6: OPERERE PÃ… LINJER + + + ** Trykk dd for Ã¥ slette en hel linje. ** + + PÃ¥ grunn av at sletting av linjer er mye brukt, fant utviklerne av Vi ut at + det vil være lettere Ã¥ rett og slett trykke to d-er for Ã¥ slette en linje. + + 1. Flytt markøren til den andre linjen i verset nedenfor. + 2. Trykk dd Ã¥ slette linjen. + 3. Flytt deretter til den fjerde linjen. + 4. Trykk 2dd for Ã¥ slette to linjer. + +---> 1) Roser er røde, +---> 2) Gjørme er gøy, +---> 3) Fioler er blÃ¥, +---> 4) Jeg har en bil, +---> 5) Klokker viser tiden, +---> 6) Druer er søte +---> 7) Og du er likesÃ¥. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.7: ANGRE-KOMMANDOEN + + + ** Trykk u for Ã¥ angre siste kommando, U for Ã¥ fikse en hel linje. ** + + 1. Flytt markøren til linjen nedenfor merket ---> og plasser den pÃ¥ den + første feilen. + 2. Trykk x for Ã¥ slette det første uønskede tegnet. + 3. Trykk sÃ¥ u for Ã¥ angre den siste utførte kommandoen. + 4. Deretter ordner du alle feilene pÃ¥ linjene ved Ã¥ bruke kommandoen x . + 5. Trykk nÃ¥ en stor U for Ã¥ sette linjen tilbake til det den var + originalt. + 6. Trykk u noen ganger for Ã¥ angre U og foregÃ¥ende kommandoer. + 7. Deretter trykker du CTRL-R (hold CTRL nede mens du trykker R) noen + ganger for Ã¥ gjenopprette kommandoene (omgjøre angrekommandoene). + +---> RReparer feiilene påå denne linnnjen oog erssstatt dem meed angre. + + 8. Dette er meget nyttige kommandoer. NÃ¥ kan du gÃ¥ til oppsummeringen av + leksjon 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 2 + + + 1. For Ã¥ slette fra markøren fram til det neste ordet, trykk: dw + 2. For Ã¥ slette fra markøren til slutten av en linje, trykk: d$ + 3. For Ã¥ slette en hel linje, trykk: dd + + 4. For Ã¥ repetere en bevegelse, sett et nummer foran: 2w + 5. Formatet for en forandringskommando er: + operator [nummer] bevegelse + der: + operator - hva som skal gjøres, f.eks. d for Ã¥ slette + [nummer] - et valgfritt antall for Ã¥ repetere bevegelsen + bevegelse - hva kommandoen skal operere pÃ¥, eksempelvis w (ord), + $ (til slutten av linjen) og sÃ¥ videre. + + 6. For Ã¥ gÃ¥ til starten av en linje, bruk en null: 0 + + 7. For Ã¥ angre tidligere endringer, skriv: u (liten u) + For Ã¥ angre alle forandringer pÃ¥ en linje, skriv: U (stor U) + For Ã¥ omgjøre angringen, trykk: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.1: «LIM INN»-KOMMANDOEN + + + ** Trykk p for Ã¥ lime inn tidligere slettet tekst etter markøren ** + + 1. Flytt markøren til den første linjen med ---> nedenfor. + + 2. Trykk dd for Ã¥ slette linjen og lagre den i et Vim-register. + + 3. Flytt markøren til c)-linjen, OVER posisjonen linjen skal settes inn. + + 4. Trykk p for Ã¥ legge linjen under markøren. + + 5. Repeter punkt 2 til 4 helt til linjene er i riktig rekkefølge. + +---> d) Kan du ogsÃ¥ lære? +---> b) Fioler er blÃ¥, +---> c) Intelligens mÃ¥ læres, +---> a) Roser er røde, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.2: «ERSTATT»-KOMMANDOEN + + + ** Trykk rx for Ã¥ erstatte tegnet under markøren med x. ** + + 1. Flytt markøren til den første linjen nedenfor merket --->. + + 2. Flytt markøren sÃ¥ den stÃ¥r oppÃ¥ den første feilen. + + 3. Trykk r og deretter tegnet som skal være der. + + 4. Repeter punkt 2 og 3 til den første linjen er lik den andre. + +---> Da dfnne lynjxn ble zkrevet, var det nøen som tjykket feite taster! +---> Da denne linjen ble skrevet, var det noen som trykket feile taster! + + 5. GÃ¥ videre til leksjon 3.2. + +MERK: Husk at du bør lære ved Ã¥ BRUKE, ikke pugge. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.3: «FORANDRE»-OPERATOREN + + + ** For Ã¥ forandre til slutten av et ord, trykk ce . ** + + 1. Flytt markøren til den første linjen nedenfor som er merket --->. + + 2. Plasser markøren pÃ¥ u i «lubjwr». + + 3. Trykk ce og det korrekte ordet (i dette tilfellet, skriv «injen»). + + 4. Trykk og gÃ¥ til det neste tegnet som skal forandres. + + 5. Repeter punkt 3 og 4 helt til den første setningen er lik den andre. + +---> Denne lubjwr har noen wgh som mÃ¥ forkwÃ¥p med «forækzryas»-kommandoen. +---> Denne linjen har noen ord som mÃ¥ forandres med «forandre»-kommandoen. + +Vær oppmerksom pÃ¥ at ce sletter ordet og gÃ¥r inn i innsettingsmodus. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.4: FLERE FORANDRINGER VED BRUK AV c + + + ** Forandringskommandoen blir brukt med de samme bevegelser som «slett». ** + + 1. Forandringsoperatoren fungerer pÃ¥ samme mÃ¥te som «slett». Formatet er: + + c [nummer] bevegelse + + 2. Bevegelsene er de samme, som for eksempel w (ord) og $ (slutten av en + linje). + + 3. GÃ¥ til den første linjen nedenfor som er merket --->. + + 4. Flytt markøren til den første feilen. + + 5. Skriv c$ og skriv resten av linjen lik den andre og trykk . + +---> Slutten pÃ¥ denne linjen trenger litt hjelp for Ã¥ gjøre den lik den neste. +---> Slutten pÃ¥ denne linjen trenger Ã¥ bli rettet ved bruk av c$-kommandoen. + +MERK: Du kan bruke slettetasten for Ã¥ rette feil mens du skriver. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 3 + + + 1. For Ã¥ legge tilbake tekst som nettopp er blitt slettet, trykk p . Dette + limer inn den slettede teksten ETTER markøren (hvis en linje ble slettet + vil den bli limt inn pÃ¥ linjen under markøren). + + 2. For Ã¥ erstatte et tegn under markøren, trykk r og deretter tegnet som + du vil ha der. + + 3. Forandringsoperatoren lar deg forandre fra markøren til dit bevegelsen + tar deg. Det vil si, skriv ce for Ã¥ forandre fra markøren til slutten + av ordet, c$ for Ã¥ forandre til slutten av linjen. + + 4. Formatet for «forandre» er: + + c [nummer] bevegelse + +NÃ¥ kan du gÃ¥ til neste leksjon. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.1: POSISJONERING AV MARKØREN OG FILSTATUS + + ** Trykk CTRL-G for Ã¥ vise posisjonen i filen og filstatusen. + Trykk G for Ã¥ gÃ¥ til en spesifikk linje i filen. ** + + Merk: Les hele leksjonen før du utfører noen av punktene! + + 1. Hold nede Ctrl-tasten og trykk g . Vi kaller dette CTRL-G. En melding + vil komme til syne pÃ¥ bunnen av skjermen med filnavnet og posisjonen i + filen. Husk linjenummeret for bruk i steg 3. + +Merk: Du kan se markørposisjonen i nederste høyre hjørne av skjermen. Dette + skjer nÃ¥r «ruler»-valget er satt (forklart i leksjon 6). + + 2. Trykk G for Ã¥ gÃ¥ til bunnen av filen. + Skriv gg for Ã¥ gÃ¥ til begynnelsen av filen. + + 3. Skriv inn linjenummeret du var pÃ¥ og deretter G . Dette vil føre deg + tilbake til linjen du var pÃ¥ da du først trykket CTRL-G. + + 4. Utfør steg 1 til 3 hvis du føler deg sikker pÃ¥ prosedyren. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.2: SØKEKOMMANDOEN + + ** Skriv / etterfulgt av en søkestreng som du vil lete etter. ** + + 1. Trykk / nÃ¥r du er i normalmodusen. Legg merke til at skrÃ¥streken og + markøren kommer til syne pÃ¥ bunnen av skjermen i likhet med + «:»-kommandoene. + + 2. Skriv «feeeiil» og trykk . Dette er teksten du vil lete etter. + + 3. For Ã¥ finne neste forekomst av søkestrengen, trykk n . + For Ã¥ lete etter samme søketeksten i motsatt retning, trykk N . + + 4. For Ã¥ lete etter en tekst bakover i filen, bruk ? istedenfor / . + + 5. For Ã¥ gÃ¥ tilbake til der du kom fra, trykk CTRL-O (Hold Ctrl nede mens + du trykker bokstaven o ). Repeter for Ã¥ gÃ¥ enda lengre tilbake. CTRL-I + gÃ¥r framover. + +---> «feeeiil» er ikke mÃ¥ten Ã¥ skrive «feil» pÃ¥, feeeiil er helt feil. +Merk: NÃ¥r søkingen nÃ¥r slutten av filen, vil den fortsette fra starten unntatt + hvis «wrapscan»-valget er resatt. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.3: FINN SAMSVARENDE PARENTESER + + + ** Trykk % for Ã¥ finne en samsvarende ), ] eller } . ** + + 1. Plasser markøren pÃ¥ en (, [ eller { pÃ¥ linjen nedenfor merket --->. + + 2. Trykk % . + + 3. Markøren vil gÃ¥ til den samsvarende parentesen eller hakeparentesen. + + 4. Trykk % for Ã¥ flytte markøren til den andre samsvarende parentesen. + + 5. Flytt markøren til en annen (, ), [, ], { eller } og se hva % gjør. + +---> Dette ( er en testlinje med (, [ ] og { } i den )). + +Merk: Dette er veldig nyttig til feilsøking i programmer som har ubalansert + antall parenteser! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.4: ERSTATT-KOMMANDOEN + + + ** Skriv :s/gammel/ny/g for Ã¥ erstatte «gammel» med «ny». ** + + 1. Flytt markøren til linjen nedenfor som er merket med --->. + + 2. Skriv :s/deen/den/ . Legg merke til at denne kommandoen bare + forandrer den første forekomsten av «deen» pÃ¥ linjen. + + 3. Skriv :s/deen/den/g . NÃ¥r g-flagget legges til, betyr dette global + erstatning pÃ¥ linjen og erstatter alle forekomster av «deen» pÃ¥ linjen. + +---> deen som kan kaste deen tyngste steinen lengst er deen beste + + 4. For Ã¥ erstatte alle forekomster av en tekststreng mellom to linjer, + skriv :#,#s/gammel/ny/g der #,# er linjenumrene pÃ¥ de to linjene for + linjeomrÃ¥det erstatningen skal gjøres. + Skriv :%s/gammel/ny/g for Ã¥ erstatte tekst i hele filen. + Skriv :%s/gammel/ny/gc for Ã¥ finne alle forekomster i hele filen, og + deretter spørre om teksten skal erstattes eller + ikke. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 4 + + + 1. Ctrl-G viser nÃ¥værende posisjon i filen og filstatusen. + G gÃ¥r til slutten av filen. + nummer G gÃ¥r til det linjenummeret. + gg gÃ¥r til den første linjen. + + 2. Skriv / etterfulgt av en søketekst for Ã¥ lete FRAMOVER etter teksten. + Skriv ? etterfulgt av en søketekst for Ã¥ lete BAKOVER etter teksten. + Etter et søk kan du trykke n for Ã¥ finne neste forekomst i den samme + retningen eller N for Ã¥ lete i motsatt retning. + CTRL-O tar deg tilbake til gamle posisjoner, CTRL-I til nyere posisjoner. + + 3. Skriv % nÃ¥r markøren stÃ¥r pÃ¥ en (, ), [, ], { eller } for Ã¥ finne den + som samsvarer. + + 4. Erstatte «gammel» med første «ny» pÃ¥ en linje: :s/gammel/ny + Erstatte alle «gammel» med «ny» pÃ¥ en linje: :s/gammel/ny/g + Erstatte tekst mellom to linjenumre: :#,#s/gammel/ny/g + Erstatte alle forekomster i en fil: :%s/gammel/ny/g + For Ã¥ godkjenne hver erstatning, legg til «c»: :%s/gammel/ny/gc +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.1: HVORDAN UTFØRE EN EKSTERN KOMMANDO + + + ** Skriv :! etterfulgt av en ekstern kommando for Ã¥ utføre denne. ** + + 1. Skriv den velkjente kommandoen : for Ã¥ plassere markøren pÃ¥ bunnen av + skjermen. Dette lar deg skrive en kommandolinjekommando. + + 2. NÃ¥ kan du skrive tegnet ! . Dette lar deg utføre en hvilken som helst + ekstern kommando. + + 3. Som et eksempel, skriv ls etter utropstegnet og trykk . Du vil + nÃ¥ fÃ¥ en liste over filene i katalogen, akkurat som om du hadde kjørt + kommandoen direkte fra kommandolinjen i skallet. Eller bruk :!dir hvis + «ls» ikke virker. + +MERK: Det er mulig Ã¥ kjøre alle eksterne kommandoer pÃ¥ denne mÃ¥ten, ogsÃ¥ med + parametere. + +MERK: Alle «:»-kommandoer mÃ¥ avsluttes med . Fra dette punktet er det + ikke alltid vi nevner det. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.2: MER OM LAGRING AV FILER + + + ** For Ã¥ lagre endringene gjort i en tekst, skriv :w FILNAVN. ** + + 1. Skriv :!dir eller :!ls for Ã¥ fÃ¥ en liste over filene i katalogen. Du + vet allerede at du mÃ¥ trykke etter dette. + + 2. Velg et filnavn pÃ¥ en fil som ikke finnes, som for eksempel TEST . + + 3. Skriv :w TEST (der TEST er filnavnet du velger). + + 4. Dette lagrer hele filen (denne innføringen) under navnet TEST . For Ã¥ + sjekke dette, skriv :!dir eller :!ls igjen for Ã¥ se innholdet av + katalogen. + +Merk: Hvis du nÃ¥ hadde avsluttet Vim og startet pÃ¥ nytt igjen med «vim TEST», + ville filen vært en eksakt kopi av innføringen da du lagret den. + + 5. Fjern filen ved Ã¥ skrive :!rm TEST hvis du er pÃ¥ et Unix-lignende + operativsystem, eller :!del TEST hvis du bruker MS-DOS. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.3: VELGE TEKST SOM SKAL LAGRES + + + ** For Ã¥ lagre en del av en fil, skriv v bevegelse :w FILNAVN ** + + 1. Flytt markøren til denne linjen. + + 2. Trykk v og flytt markøren til det femte elementet nedenfor. Legg merke + til at teksten blir markert. + + 3. Trykk : (kolon). PÃ¥ bunnen av skjermen vil :'<,'> komme til syne. + + 4. Trykk w TEST , der TEST er et filnavn som ikke finnes enda. Kontroller + at du ser :'<,'>w TEST før du trykker Enter. + + 5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller !ls + for Ã¥ se den. Ikke slett den enda! Vi vil bruke den i neste leksjon. + +MERK: Ved Ã¥ trykke v startes visuelt valg. Du kan flytte markøren rundt for + Ã¥ gjøre det valgte omrÃ¥det større eller mindre. Deretter kan du bruke en + operator for Ã¥ gjøre noe med teksten. For eksempel sletter d teksten. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.4: HENTING OG SAMMENSLÃ…ING AV FILER + + + ** For Ã¥ lese inn en annen fil inn i nÃ¥værende buffer, skriv :r FILNAVN ** + + 1. Plasser markøren like over denne linjen. + +MERK: Etter Ã¥ ha utført steg 2 vil du se teksten fra leksjon 5.3. GÃ¥ deretter + NED for Ã¥ se denne leksjonen igjen. + + 2. Hent TEST-filen ved Ã¥ bruke kommandoen :r TEST der TEST er navnet pÃ¥ + filen du brukte. Filen du henter blir plassert nedenfor markørlinjen. + + 3. For Ã¥ sjekke at filen ble hentet, gÃ¥ tilbake og se at det er to kopier av + leksjon 5.3, originalen og denne versjonen. + +MERK: Du kan ogsÃ¥ lese utdataene av en ekstern kommando. For eksempel, :r !ls + leser utdataene av ls-kommandoen og legger dem nedenfor markøren. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 5 + + + 1. :!kommando utfører en ekstern kommandio. + + Noen nyttige eksempler er: + (MS-DOS) (Unix) + :!dir :!ls - List filene i katalogen. + :!del FILNAVN :!rm FILNAVN - Slett filen FILNAVN. + + 2. :w FILNAVN skriver den nÃ¥værende Vim-filen disken med navnet FILNAVN . + + 3. v bevegelse :w FILNAVN lagrer de visuelt valgte linjene til filen + FILNAVN. + + 4. :r FILNAVN henter filen FILNAVN og legger den inn nedenfor markøren. + + 5. :r !dir leser utdataene fra «dir»-kommandoen og legger dem nedenfor + markørposisjonen. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.1: «ÅPNE LINJE»-KOMMANDOEN + + + ** Skriv o for Ã¥ «åpne opp» for en ny linje etter markøren og gÃ¥ til + innsettingsmodus ** + + 1. Flytt markøren til linjen nedenfor merket --->. + + 2. Skriv o (liten o) for Ã¥ Ã¥pne opp en linje NEDENFOR markøren og gÃ¥ inn i + innsettingsmodus. + + 3. Skriv litt tekst og trykk for Ã¥ gÃ¥ ut av innsettingsmodusen. + +---> Etter at o er skrevet blir markøren plassert pÃ¥ den tomme linjen. + + 4. For Ã¥ Ã¥pne en ny linje OVER markøren, trykk rett og slett en stor O + istedenfor en liten o . Prøv dette pÃ¥ linjen nedenfor. + +---> Lag ny linje over denne ved Ã¥ trykke O mens markøren er pÃ¥ denne linjen. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.2: «LEGG TIL»-KOMMANDOEN + + + ** Skriv a for Ã¥ legge til tekst ETTER markøren. ** + + 1. Flytt markøren til starten av linjen merket ---> nedenfor. + + 2. Trykk e til markøren er pÃ¥ slutten av «li». + + 3. Trykk a (liten a) for Ã¥ legge til tekst ETTER markøren. + + 4. Fullfør ordet sÃ¥nn som pÃ¥ linjen nedenfor. Trykk for Ã¥ gÃ¥ ut av + innsettingsmodusen. + + 5. Bruk e for Ã¥ gÃ¥ til det neste ufullstendige ordet og repeter steg 3 og + 4. + +---> Denne li lar deg øve pÃ¥ Ã¥ leg til tek pÃ¥ en linje. +---> Denne linjen lar deg øve pÃ¥ Ã¥ legge til tekst pÃ¥ en linje. + +Merk: a, i og A gÃ¥r alle til den samme innsettingsmodusen, den eneste + forskjellen er hvor tegnene blir satt inn. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.3: EN ANNEN MÃ…TE Ã… ERSTATTE PÃ… + + + ** Skriv en stor R for Ã¥ erstatte mer enn ett tegn. ** + + 1. Flytt markøren til den første linjen nedenfor merket --->. Flytt markøren + til begynnelsen av den første «xxx»-en. + + 2. Trykk R og skriv inn tallet som stÃ¥r nedenfor pÃ¥ den andre linjen sÃ¥ + det erstatter xxx. + + 3. Trykk for Ã¥ gÃ¥ ut av erstatningsmodusen. Legg merke til at resten + av linjen forblir uforandret. + + 4. Repeter stegene for Ã¥ erstatte den gjenværende xxx. + +---> Ved Ã¥ legge 123 til xxx fÃ¥r vi xxx. +---> Ved Ã¥ legge 123 til 456 fÃ¥r vi 579. + +MERK: Erstatningsmodus er lik insettingsmodus, men hvert tegn som skrives + erstatter et eksisterende tegn. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.4: KOPIERE OG LIME INN TEKST + + + ** Bruk y-operatoren for Ã¥ kopiere tekst og p for Ã¥ lime den inn ** + + 1. GÃ¥ til linjen merket ---> nedenfor og plasser markøren etter «a)». + + 2. GÃ¥ inn i visuell modus med v og flytt markøren til like før «første». + + 3. Trykk y for Ã¥ kopiere (engelsk: «yank») den uthevede teksten. + + 4. Flytt markøren til slutten av den neste linjen: j$ + + 5. Trykk p for Ã¥ lime inn teksten. Trykk deretter: a andre . + + 6. Bruk visuell modus for Ã¥ velge « valget.», kopier det med y , gÃ¥ til + slutten av den neste linjen med j$ og legg inn teksten der med p . + +---> a) Dette er det første valget. + b) + +Merk: Du kan ogsÃ¥ bruke y som en operator; yw kopierer ett ord. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.5: SETT VALG + + + ** Sett et valg sÃ¥ søk eller erstatning ignorerer store/smÃ¥ bokstaver. ** + + 1. Let etter «ignore» ved Ã¥ skrive: /ignore + Repeter flere ganger ved Ã¥ trykke n . + + 2. Sett «ic»-valget (Ignore Case) ved Ã¥ skrive: :set ic + + 3. Søk etter «ignore» igjen ved Ã¥ trykke n . + Legg merke til at bÃ¥de «Ignore» og «IGNORE» blir funnet. + + 4. Sett «hlsearch»- og «incsearch»-valgene: :set hls is + + 5. Skriv søkekommandoen igjen og se hva som skjer: /ignore + + 6. For Ã¥ slÃ¥ av ignorering av store/smÃ¥ bokstaver, skriv: :set noic + +Merk: For Ã¥ fjerne uthevingen av treff, skriv: :nohlsearch +Merk: Hvis du vil ignorere store/smÃ¥ bokstaver for kun en søkekommando, bruk + \c i uttrykket: /ignore\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 6 + + 1. Trykk o for Ã¥ legge til en linje NEDENFOR markøren og gÃ¥ inn i + innsettingsmodus. + Trykk O for Ã¥ Ã¥pne en linje OVER markøren. + + 2. Skriv a for Ã¥ sette inn tekst ETTER markøren. + Skriv A for Ã¥ sette inn tekst etter slutten av linjen. + + 3. Kommandoen e gÃ¥r til slutten av et ord. + + 4. Operatoren y («yank») kopierer tekst, p («paste») limer den inn. + + 5. Ved Ã¥ trykke R gÃ¥r du inn i erstatningsmodus helt til trykkes. + + 6. Skriv «:set xxx» for Ã¥ sette valget «xxx». Noen valg er: + «ic» «ignorecase» ignorer store/smÃ¥ bokstaver under søk + «is» «incsearch» vis delvise treff for en søketekst + «hls» «hlsearch» uthev alle søketreff + + 7. Legg til «no» foran valget for Ã¥ slÃ¥ det av: :set noic + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 7.1: FÃ… HJELP + + + ** Bruk det innebygde hjelpesystemet. ** + + Vim har et omfattende innebygget hjelpesystem. For Ã¥ starte det, prøv en av + disse mÃ¥tene: + - Trykk Hjelp-tasten (hvis du har en) + - Trykk F1-tasten (hvis du har en) + - Skriv :help + + Les teksten i hjelpevinduet for Ã¥ finne ut hvordan hjelpen virker. + Skriv CTRL-W CTRL-W for Ã¥ hoppe fra et vindu til et annet + Skriv :q for Ã¥ lukke hjelpevinduet. + + Du kan fÃ¥ hjelp for omtrent alle temaer om Vim ved Ã¥ skrive et parameter til + «:help»-kommandoen. Prøv disse (ikke glem Ã¥ trykke ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 7.2: LAG ET OPPSTARTSSKRIPT + + + ** SlÃ¥ pÃ¥ funksjoner i Vim ** + + Vim har mange flere funksjoner enn Vi, men flesteparten av dem er slÃ¥tt av + som standard. For Ã¥ begynne Ã¥ bruke flere funksjoner mÃ¥ du lage en + «vimrc»-fil. + + 1. Start redigeringen av «vimrc»-filen. Dette avhenger av systemet ditt: + :e ~/.vimrc for Unix + :e $VIM/_vimrc for MS Windows + + 2. Les inn eksempelfilen for «vimrc»: + :r $VIMRUNTIME/vimrc_example.vim + + 3. Lagre filen med: + :w + + Neste gang du starter Vim vil den bruke syntaks-utheving. Du kan legge til + alle dine foretrukne oppsett i denne «vimrc»-filen. + For mer informasjon, skriv :help vimrc-intro +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 7.3: FULLFØRING + + + ** Kommandolinjefullføring med CTRL-D og ** + + 1. Vær sikker pÃ¥ at Vim ikke er i Vi-kompatibel modus: :set nocp + + 2. Se hvilke filer som er i katalogen: :!ls eller :!dir + + 3. Skriv starten pÃ¥ en kommando: :e + + 4. Trykk CTRL-D og Vim vil vise en liste over kommandoer som starter med + «e». + + 5. Trykk og Vim vil fullføre kommandonavnet til «:edit». + + 6. Legg til et mellomrom og starten pÃ¥ et eksisterende filnavn: :edit FIL + + 7. Trykk . Vim vil fullføre navnet (hvis det er unikt). + +MERK: Fullføring fungerer for mange kommandoer. Prøv ved Ã¥ trykke CTRL-D og + . Det er spesielt nyttig for bruk sammen med :help . +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 7 + + + 1. Skriv :help eller trykk eller for Ã¥ Ã¥pne et hjelpevindu. + + 2. Skriv :help kommando for Ã¥ fÃ¥ hjelp om kommando . + + 3. Trykk CTRL-W CTRL-W for Ã¥ hoppe til et annet vindu. + + 4. Trykk :q for Ã¥ lukke hjelpevinduet. + + 5. Opprett et vimrc-oppstartsskript for Ã¥ lagre favorittvalgene dine. + + 6. NÃ¥r du skriver en «:»-kommando, trykk CTRL-D for Ã¥ se mulige + fullføringer. Trykk for Ã¥ bruke en fullføring. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Her slutter innføringen i Vim. Den var ment som en rask oversikt over + editoren, akkurat nok til Ã¥ la deg sette i gang med enkel bruk. Den er pÃ¥ + langt nær komplett, da Vim har mange flere kommandoer. Les bruksanvisningen + ved Ã¥ skrive :help user-manual . + + For videre lesing og studier, kan denne boken anbefales: + «Vim - Vi Improved» av Steve Oualline + Utgiver: New Riders + Den første boken som er fullt og helt dedisert til Vim. Spesielt nyttig for + nybegynnere. Inneholder mange eksempler og illustrasjoner. + Se http://iccf-holland.org/click5.html + + Denne boken er eldre og handler mer om Vi enn Vim, men anbefales ogsÃ¥: + «Learning the Vi Editor» av Linda Lamb + Utgiver: O'Reilly & Associates Inc. + Det er en god bok for Ã¥ fÃ¥ vite omtrent hva som helst om Vi. + Den sjette utgaven inneholder ogsÃ¥ informasjon om Vim. + + Denne innføringen er skrevet av Michael C. Pierce og Robert K. Ware, + Colorado School of Mines med idéer av Charles Smith, Colorado State + University. E-mail: bware@mines.colorado.edu . + + Modifisert for Vim av Bram Moolenaar. + Oversatt av Øyvind A. Holm. E-mail: vimtutor _AT_ sunbase.org + Id: tutor.no 406 2007-03-18 22:48:36Z sunny + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +vim: set ts=8 : diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.pl b/vim/bundle/ubuntu-vim72/tutor/tutor.pl new file mode 100644 index 0000000..96aa45c --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.pl @@ -0,0 +1,995 @@ +=============================================================================== += W i t a j w t u t o r i a l u V I M - a - Wersja 1.7. = +=============================================================================== + + Vim to potê¿ny edytor, który posiada wiele poleceñ, zbyt du¿o, by + wyja¶niæ je wszystkie w tym tutorialu. Ten przewodnik ma nauczyæ + Ciê pos³ugiwaæ siê wystarczaj±co wieloma komendami, by¶ móg³ ³atwo + u¿ywaæ Vima jako edytora ogólnego przeznaczenia. + + Czas potrzebny na ukoñczenie tutoriala to 25 do 30 minut i zale¿y + od tego jak wiele czasu spêdzisz na eksperymentowaniu. + + UWAGA: + Polecenia wykonywane w czasie lekcji zmodyfikuj± tekst. Zrób + wcze¶niej kopiê tego pliku do æwiczeñ (je¶li zacz±³e¶ komend± + "vimtutor", to ju¿ pracujesz na kopii). + + Pamiêtaj, ¿e przewodnik ten zosta³ zaprojektowany do nauki poprzez + æwiczenia. Oznacza to, ¿e musisz wykonywaæ polecenia, by nauczyæ siê ich + prawid³owo. Je¶li bêdziesz jedynie czyta³ tekst, szybko zapomnisz wiele + poleceñ! + + Teraz upewnij siê, ¿e nie masz wci¶niêtego Caps Locka i wciskaj j + tak d³ugo dopóki Lekcja 1.1. nie wype³ni ca³kowicie ekranu. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 1.1.: PORUSZANIE SIÊ KURSOREM + + ** By wykonaæ ruch kursorem, wci¶nij h, j, k, l jak pokazano. ** + + ^ + k Wskazówka: h jest po lewej + < h l > l jest po prawej + j j wygl±da jak strza³ka w dó³ + v + 1. Poruszaj kursorem dopóki nie bêdziesz pewien, ¿e pamiêtasz polecenia. + + 2. Trzymaj j tak d³ugo a¿ bêdzie siê powtarza³. + Teraz wiesz jak doj¶æ do nastêpnej lekcji. + + 3. U¿ywaj±c strza³ki w dó³ przejd¼ do nastêpnej lekcji. + +Uwaga: Je¶li nie jeste¶ pewien czego¶ co wpisa³e¶, wci¶nij , by wróciæ do + trybu Normal. Wtedy powtórz polecenie. + +Uwaga: Klawisze kursora tak¿e powinny dzia³aæ, ale u¿ywaj±c hjkl bêdziesz + w stanie poruszaæ siê o wiele szybciej, jak siê tylko przyzwyczaisz. + Naprawdê! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 1.2.: WYCHODZENIE Z VIM-a + + !! UWAGA: Przed wykonaniem jakiegokolwiek polecenia przeczytaj ca³± lekcjê !! + + 1. Wci¶nij (aby upewniæ siê, ¿e jeste¶ w trybie Normal). + 2. Wpisz: :q!. + To spowoduje wyj¶cie z edytora PORZUCAJ¡C wszelkie zmiany, jakie + zd±¿y³e¶ zrobiæ. Je¶li chcesz zapamiêtaæ zmiany i wyj¶æ, + wpisz: :wq + + 3. Kiedy widzisz znak zachêty pow³oki wpisz komendê, ¿eby wróciæ + do tutoriala. Czyli: vimtutor + + 4. Je¶li chcesz zapamiêtaæ polecenia, wykonaj kroki 1. do 3., aby + wyj¶æ i wróciæ do edytora. + +UWAGA: :q! porzuca wszelkie zmiany jakie zrobi³e¶. W nastêpnych + lekcjach dowiesz siê jak je zapamiêtywaæ. + + 5. Przenie¶ kursor do lekcji 1.3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 1.3.: EDYCJA TEKSTU - KASOWANIE + + ** Wci¶nij x aby usun±æ znak pod kursorem. ** + + 1. Przenie¶ kursor do linii poni¿ej oznaczonej --->. + + 2. By poprawiæ b³êdy, naprowad¼ kursor na znak do usuniêcia. + + 3. Wci¶nij x aby usun±æ niechciany znak. + + 4. Powtarzaj kroki 2. do 4. dopóki zdanie nie jest poprawne. + +---> Kkrowa prrzeskoczy³a prrzez ksiiê¿ycc. + + 5. Teraz, kiedy zdanie jest poprawione, przejd¼ do Lekcji 1.4. + +UWAGA: Ucz siê przez æwiczenie, nie wkuwanie. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 1.4.: EDYCJA TEKSTU - INSERT (wprowadzanie) + + + ** Wci¶nij i aby wstawiæ tekst. ** + + 1. Przenie¶ kursor do pierwszej linii poni¿ej oznaczonej --->. + + 2. Aby poprawiæ pierwszy wiersz, ustaw kursor na pierwszym znaku PO tym, + gdzie tekst ma byæ wstawiony. + + 3. Wci¶nij i a nastêpnie wpisz konieczne poprawki. + + 4. Po poprawieniu b³êdu wci¶nij , by wróciæ do trybu Normal. + Powtarzaj kroki 2. do 4., aby poprawiæ ca³e zdanie. + +---> W tej brkje trochê . +---> W tej linii brakuje trochê tekstu. + + 5. Kiedy czujesz siê swobodnie wstawiaj±c tekst, przejd¼ do + podsumowania poni¿ej. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 1.5.: EDYCJA TEKSTU - APPENDING (dodawanie) + + + ** Wci¶nij A by dodaæ tekst. ** + + 1. Przenie¶ kursor do pierwszej linii poni¿ej oznaczonej --->. + Nie ma znaczenia, który to bêdzie znak. + + 2. Wci¶nij A i wpisz odpowiednie dodatki. + + 3. Kiedy tekst zosta³ dodany, wci¶nij i wróæ do trybu Normalnego. + + 4. Przenie¶ kursor do drugiej linii oznaczonej ---> i powtórz kroki 2. i 3., + aby poprawiæ zdanie. + +---> Brakuje tu tro + Brakuje tu trochê tekstu. +---> Tu te¿ trochê bra + Tu te¿ trochê brakuje. + + 5. Kiedy ju¿ utrwali³e¶ æwiczenie, przejd¼ do lekcji 1.6. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 1.6.: EDYCJA PLIKU + + ** U¿yj :wq aby zapisaæ plik i wyj¶æ. ** + + !! UWAGA: zanim wykonasz jakiekolwiek polecenia przeczytaj ca³± lekcjê !! + + 1. Zakoñcz tutorial tak jak w lekcji 1.2.: :q! + lub, je¶li masz dostêp do innego terminala, wykonaj kolejne kroki tam. + + 2. W pow³oce wydaj polecenie: vim tutor + "vim" jest poleceniem uruchamiaj±cym edytor Vim. 'tutor' to nazwa pliku, + jaki chcesz edytowaæ. U¿yj pliku, który mo¿e zostaæ zmieniony. + + 3. Dodaj i usuñ tekst tak, jak siê nauczy³e¶ w poprzednich lekcjach. + + 4. Zapisz plik ze zmianami i opu¶æ Vima: :wq + + 5. Je¶li zakoñczy³e¶ vimtutor w kroku 1., uruchom go ponownie i przejd¼ + do podsumowania poni¿ej. + + 6. Po przeczytaniu wszystkich kroków i ich zrozumieniu: wykonaj je. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 1. PODSUMOWANIE + + 1. Poruszasz kursorem u¿ywaj±c "strza³ek" i klawiszy hjkl . + h (w lewo) j (w dó³) k (do góry) l (w prawo) + + 2. By wej¶æ do Vima, (z pow³oki) wpisz: + vim NAZWA_PLIKU + + 3. By wyj¶æ z Vima, wpisz: + :q! by usun±æ wszystkie zmiany. + LUB: :wq by zmiany zachowaæ. + + 4. By usun±æ znak pod kursorem, wci¶nij: x + + 5. By wstawiæ tekst przed kursorem lub dodaæ: + i wpisz tekst wstawi przed kursorem + A wpisz tekst doda na koñcu linii + +UWAGA: Wci¶niêcie przeniesie Ciê z powrotem do trybu Normal + lub odwo³a niechciane lub czê¶ciowo wprowadzone polecenia. + +Teraz mo¿emy kontynuowaæ i przej¶æ do Lekcji 2. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 2.1.: POLECENIE DELETE (usuwanie) + + + ** Wpisz dw by usun±æ wyraz. ** + + 1. Wci¶nij , by upewniæ siê, ¿e jeste¶ w trybie Normal. + + 2. Przenie¶ kursor do linii poni¿ej oznaczonej --->. + + 3. Przesuñ kursor na pocz±tek wyrazu, który chcesz usun±æ. + + 4. Wpisz dw by usun±æ wyraz. + + UWAGA: Litera d pojawi siê na dole ekranu. Vim czeka na wpisanie w . + Je¶li zobaczysz inny znak, oznacza to, ¿e wpisa³e¶ co¶ ¼le; wci¶nij + i zacznij od pocz±tku. + +---> Jest tu parê papier wyrazów, które kamieñ nie nale¿± do no¿yce tego zdania. + + 5. Powtarzaj kroki 3. i 4. dopóki zdanie nie bêdzie poprawne, potem + przejd¼ do Lekcji 2.2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 2.2.: WIÊCEJ POLECEÑ USUWAJ¡CYCH + + + ** Wpisz d$ aby usun±æ tekst do koñca linii. ** + + 1. Wci¶nij aby siê upewniæ, ¿e jeste¶ w trybie Normal. + + 2. Przenie¶ kursor do linii poni¿ej oznaczonej --->. + + 3. Przenie¶ kursor do koñca poprawnego zdania (PO pierwszej . ). + + 4. Wpisz d$ aby usun±æ resztê linii. + +---> Kto¶ wpisa³ koniec tego zdania dwukrotnie. zdania dwukrotnie. + + + 5. Przejd¼ do Lekcji 2.3., by zrozumieæ co siê sta³o. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 2.3.: O OPERATORACH I RUCHACH + + + Wiele poleceñ zmieniaj±cych tekst jest z³o¿onych z operatora i ruchu. + Format dla polecenia usuwaj±cego z operatorem d jest nastêpuj±cy: + + d ruch + + gdzie: + d - operator usuwania. + ruch - na czym polecenie bêdzie wykonywane (lista poni¿ej). + + Krótka lista ruchów: + w - do pocz±tku nastêpnego wyrazu WY£¡CZAJ¡C pierwszy znak. + e - do koñca bie¿±cego wyrazu, W£¡CZAJ¡C ostatni znak. + $ - do koñca linii, W£¡CZAJ¡C ostatni znak. + +W ten sposób wpisanie de usunie znaki od kursora do koñca wyrazu. + +UWAGA: Wpisanie tylko ruchu w trybie Normal bez operatora przeniesie kursor + tak, jak to okre¶lono. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 2.4.: U¯YCIE MNO¯NIKA DLA RUCHU + + + ** Wpisanie liczby przed ruchem powtarza ruch odpowiedni± ilo¶æ razy. ** + + 1. Przenie¶ kursor na pocz±tek linii poni¿ej zaznaczonej --->. + + 2. Wpisz 2w aby przenie¶æ kursor o dwa wyrazy do przodu. + + 3. Wpisz 3e aby przenie¶æ kursor do koñca trzeciego wyrazu w przód. + + 4. Wpisz 0 (zero), aby przenie¶æ kursor na pocz±tek linii. + + 5. Powtórz kroki 2. i 3. z innymi liczbami. + + + ---> To jest zwyk³y wiersz z wyrazami, po których mo¿esz siê poruszaæ. + + 6. Przejd¼ do lekcji 2.5. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 2.5.: U¯YCIE MNO¯NIKA, BY WIÊCEJ USUN¡Æ + + + ** Wpisanie liczby z operatorem powtarza go odpowiedni± ilo¶æ razy. ** + + W wy¿ej wspomnianej kombinacji operatora usuwania i ruchu podaj mno¿nik + przed ruchem, by wiêcej usun±æ: + d liczba ruch + + 1. Przenie¶ kursor do pierwszego wyrazu KAPITALIKAMI w linii zaznaczonej --->. + + 2. Wpisz 2dw aby usun±æ dwa wyrazy KAPITALIKAMI. + + 3. Powtarzaj kroki 1. i 2. z innymi mno¿nikami, aby usun±æ kolejne wyrazy + KAPITALIKAMI jednym poleceniem + +---> ta ASD WE linia QWE ASDF ZXCV FG wyrazów zosta³a ERT FGH CF oczyszczona. + +UWAGA: Mno¿nik pomiêdzy operatorem d i ruchem dzia³a podobnie do ruchu bez + operatora. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 2.6.: OPEROWANIE NA LINIACH + + + ** Wpisz dd aby usun±æ ca³± liniê. ** + + Z powodu czêsto¶ci usuwania ca³ych linii, projektanci Vi zdecydowali, ¿e + bêdzie ³atwiej wpisaæ dwa razy d aby usun±æ liniê. + + 1. Przenie¶ kursor do drugiego zdania z wierszyka poni¿ej. + 2. Wpisz dd aby usun±æ wiersz. + 3. Teraz przenie¶ siê do czwartego wiersza. + 4. Wpisz 2dd aby usun±æ dwa wiersze. + +---> 1) Ró¿e s± czerwone, +---> 2) B³oto jest fajne, +---> 3) Fio³ki s± niebieskie, +---> 4) Mam samochód, +---> 5) Zegar podaje czas, +---> 6) Cukier jest s³odki, +---> 7) I ty te¿. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 2.7.: POLECENIE UNDO (cofnij) + + + ** Wci¶nij u aby cofn±æ skutki ostatniego polecenia. + U za¶, by cofn±æ skutki dla ca³ej linii. ** + + 1. Przenie¶ kursor do zdania poni¿ej oznaczonego ---> i umie¶æ go na + pierwszym b³êdzie. + 2. Wpisz x aby usun±æ pierwszy niechciany znak. + 3. Teraz wci¶nij u aby cofn±æ skutki ostatniego polecenia. + 4. Tym razem popraw wszystkie b³êdy w linii u¿ywaj±c polecenia x . + 5. Teraz wci¶nij wielkie U aby przywróciæ liniê do oryginalnego stanu. + 6. Teraz wci¶nij u kilka razy, by cofn±æ U i poprzednie polecenia. + 7. Teraz wpisz CTRL-R (trzymaj równocze¶nie wci¶niête klawisze CTRL i R) + kilka razy, by cofn±æ cofniêcia. + +---> Poopraw b³êdyyy w teej liniii i zaamiieñ je prrzez coofnij. + + 8. To s± bardzo po¿yteczne polecenia. + + Przejd¼ teraz do podsumowania Lekcji 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 2. PODSUMOWANIE + + + 1. By usun±æ znaki od kursora do nastêpnego wyrazu, wpisz: dw + 2. By usun±æ znaki od kursora do koñca linii, wpisz: d$ + 3. By usun±æ ca³± liniê: dd + 4. By powtórzyæ ruch, poprzed¼ go liczb±: 2w + 5. Format polecenia zmiany to: + operator [liczba] ruch + gdzie: + operator - to, co trzeba zrobiæ (np. d dla usuwania) + [liczba] - opcjonalne, ile razy powtórzyæ ruch + ruch - przenosi nad tekstem do operowania, takim jak w (wyraz), + $ (do koñca linii) etc. + + 6. By przej¶æ do pocz±tku linii, u¿yj zera: 0 + 7. By cofn±æ poprzednie polecenie, wpisz: u (ma³e u) + By cofn±æ wszystkie zmiany w linii, wpisz: U (wielkie U) + By cofn±æ cofniêcie, wpisz: CTRL-R + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 3.1.: POLECENIE PUT (wstaw) + + + ** Wpisz p by wstawiæ ostatnie usuniêcia za kursorem. ** + + 1. Przenie¶ kursor do pierwszej linii ---> poni¿ej. + + 2. Wpisz dd aby usun±æ liniê i przechowaæ j± w rejestrze Vima. + + 3. Przenie¶ kursor do linii c), POWY¯EJ tej, gdzie usuniêta linia powinna + siê znajdowaæ. + + 4. Wci¶nij p by wstawiæ liniê poni¿ej kursora. + + 5. Powtarzaj kroki 2. do 4. a¿ znajd± siê w odpowiednim porz±dku. + +---> d) Jak dwa anio³ki. +---> b) Na dole fio³ki, +---> c) A my siê kochamy, +---> a) Na górze ró¿e, + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 3.2.: POLECENIE REPLACE (zast±p) + + + ** Wpisz rx aby zast±piæ znak pod kursorem na x . ** + + 1. Przenie¶ kursor do pierwszej linii poni¿ej oznaczonej ---> + + 2. Ustaw kursor na pierwszym b³êdzie. + + 3. Wpisz r a potem znak jaki powinien go zast±piæ. + + 4. Powtarzaj kroki 2. i 3. dopóki pierwsza linia nie bêdzie taka, jak druga. + +---> Kjedy ten wiersz bi³ wstókiwany, kto¶ wcizn±³ perê z³ych klawirzy! +---> Kiedy ten wiersz by³ wstukiwany, kto¶ wcisn±³ parê z³ych klawiszy! + + 5. Teraz czas na Lekcjê 3.3. + + +UWAGA: Pamiêtaj, by uczyæ siê æwicz±c, a nie pamiêciowo. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 3.3.: OPERATOR CHANGE (zmieñ) + + ** By zmieniæ do koñca wyrazu, wpisz ce . ** + + 1. Przenie¶ kursor do pierwszej linii poni¿ej oznaczonej --->. + + 2. Umie¶æ kursor na u w lunos. + + 3. Wpisz ce i popraw wyraz (w tym wypadku wstaw inia ). + + 4. Wci¶nij i przejd¼ do nastêpnej planowanej zmiany. + + 5. Powtarzaj kroki 3. i 4. dopóki pierwsze zdanie nie bêdzie takie same, + jak drugie. + +---> Ta lunos ma pire s³ów, które t¿ina zbnic u¿ifajonc pcmazu zmieñ. +---> Ta linia ma parê s³ów, które trzeba zmieniæ u¿ywaj±c polecenia zmieñ. + + Zauwa¿, ¿e ce nie tylko zamienia wyraz, ale tak¿e zmienia tryb na + Insert (wprowadzanie). + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 3.4.: WIÊCEJ ZMIAN U¯YWAJ¡C c + + + ** Polecenie change u¿ywa takich samych ruchów, jak delete. ** + + 1. Operator change dzia³a tak samo, jak delete. Format wygl±da tak: + + c [liczba] ruch + + 2. Ruchy s± tak¿e takie same, np.: w (wyraz), $ (koniec linii) etc. + + 3. Przenie¶ siê do pierwszej linii poni¿ej oznaczonej ---> + + 4. Ustaw kursor na pierwszym b³êdzie. + + 5. Wpisz c$ , popraw koniec wiersza i wci¶nij . + +---> Koniec tego wiersza musi byæ poprawiony, aby wygl±da³ tak, jak drugi. +---> Koniec tego wiersza musi byæ poprawiony u¿ywaj±c polecenia c$ . + +UWAGA: Mo¿esz u¿ywaæ aby poprawiaæ b³êdy w czasie pisania. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 3. PODSUMOWANIE + + + 1. Aby wstawiæ tekst, który zosta³ wcze¶niej usuniêty wci¶nij p . To + polecenie wstawia skasowany tekst PO kursorze (je¶li ca³a linia + zosta³a usuniêta, zostanie ona umieszczona w linii poni¿ej kursora). + + 2. By zamieniæ znak pod kursorem, wci¶nij r a potem znak, który ma zast±piæ + oryginalny. + + 3. Operator change pozwala Ci na zast±pienie od kursora do miejsca, gdzie + zabra³by Ciê ruch. Np. wpisz ce aby zamieniæ tekst od kursora do koñca + wyrazu, c$ aby zmieniæ tekst do koñca linii. + + 4. Format do polecenia change (zmieñ): + + c [liczba] obiekt + + Teraz przejd¼ do nastêpnej lekcji. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 4.1.: PO£O¯ENIE KURSORA ORAZ STATUS PLIKU + + ** Naci¶nij CTRL-G aby zobaczyæ swoje po³o¿enie w pliku i status + pliku. Naci¶nij G aby przej¶æ do linii w pliku. ** + + UWAGA: Przeczytaj ca³± lekcjê zanim wykonasz jakie¶ polecenia!!! + + 1. Przytrzymaj klawisz CTRL i wci¶nij g . U¿ywamy notacji CTRL-G. + Na dole strony pojawi siê pasek statusu z nazw± pliku i pozycj± w pliku. + Zapamiêtaj numer linii dla potrzeb kroku 3. + +UWAGA: Mo¿esz te¿ zobaczyæ pozycjê kursora w prawym, dolnym rogu ekranu. + Dzieje siê tak kiedy ustawiona jest opcja 'ruler' (wiêcej w lekcji 6.). + + 2. Wci¶nij G aby przej¶æ na koniec pliku. + Wci¶nij gg aby przej¶æ do pocz±tku pliku. + + 3. Wpisz numer linii, w której by³e¶ a potem G . To przeniesie Ciê + z powrotem do linii, w której by³e¶ kiedy wcisn±³e¶ CTRL-G. + + 4. Je¶li czujesz siê wystarczaj±co pewnie, wykonaj kroki 1-3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 4.2.: POLECENIE SZUKAJ + + + ** Wpisz / a nastêpnie wyra¿enie, aby je znale¼æ. ** + + 1. W trybie Normal wpisz / . Zauwa¿, ¿e znak ten oraz kursor pojawi± + siê na dole ekranu tak samo, jak polecenie : . + + 2. Teraz wpisz b³ond . To jest s³owo, którego chcesz szukaæ. + + 3. By szukaæ tej samej frazy ponownie, po prostu wci¶nij n . + Aby szukaæ tej frazy w przeciwnym, kierunku wci¶nij N . + + 4. Je¶li chcesz szukaæ frazy do ty³u, u¿yj polecenia ? zamiast / . + + 5. Aby wróciæ gdzie by³e¶, wci¶nij CTRL-O. Powtarzaj, by wróciæ dalej. CTRL-I + idzie do przodu. + +Uwaga: 'b³ond' to nie jest metoda, by przeliterowaæ b³±d; 'b³ond' to b³±d. +Uwaga: Kiedy szukanie osi±gnie koniec pliku, bêdzie kontynuowane od pocz±tku + o ile opcja 'wrapscan' nie zosta³a przestawiona. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 4.3.: W POSZUKIWANIU PARUJ¡CYCH NAWIASÓW + + + ** Wpisz % by znale¼æ paruj±cy ), ], lub } . ** + + 1. Umie¶æ kursor na którym¶ z (, [, lub { w linii poni¿ej oznaczonej --->. + + 2. Teraz wpisz znak % . + + 3. Kursor powinien siê znale¼æ na paruj±cym nawiasie. + + 4. Wci¶nij % aby przenie¶æ kursor z powrotem do paruj±cego nawiasu. + + 5. Przenie¶ kursor do innego (,),[,],{ lub } i zobacz co robi % . + +---> To ( jest linia testowa z (, [, ] i {, } . )) + +Uwaga: Ta funkcja jest bardzo u¿yteczna w debuggowaniu programu + z niesparowanymi nawiasami! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 4.4.: POLECENIE SUBSTITUTE (zamiana) + + + ** Wpisz :s/stary/nowy/g aby zamieniæ 'stary' na 'nowy'. ** + + 1. Przenie¶ kursor do linii poni¿ej oznaczonej --->. + + 2. Wpisz :s/czaas/czas . Zauwa¿, ¿e to polecenie zmienia + tylko pierwsze wyst±pienie 'czaas' w linii. + + 3. Teraz wpisz :s/czaas/czas/g . Dodane g oznacza zamianê (substytucjê) + globalnie w ca³ej linii. Zmienia wszystkie wyst±pienia 'czaas' w linii. + +---> Najlepszy czaas na zobaczenie naj³adniejszych kwiatów to czaas wiosny. + + 4. Aby zmieniæ wszystkie wyst±pienia ³añcucha znaków pomiêdzy dwoma liniami, + wpisz: :#,#s/stare/nowe/g gdzie #,# s± numerami linii ograniczaj±cych + region, gdzie ma nast±piæ zamiana. + wpisz :%s/stare/nowe/g by zmieniæ wszystkie wyst±pienia w ca³ym pliku. + wpisz :%s/stare/nowe/gc by zmieniæ wszystkie wyst±pienia w ca³ym + pliku, prosz±c o potwierdzenie za ka¿dym razem. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 4. PODSUMOWANIE + + 1. CTRL-G poka¿e Twoj± pozycjê w pliku i status pliku. SHIFT-G przenosi + Ciê do koñca pliku. + G przenosi do koñca pliku. + liczba G przenosi do linii [liczba]. + gg przenosi do pierwszej linii. + + 2. Wpisanie / a nastêpnie ³añcucha znaków szuka ³añcucha DO PRZODU. + Wpisanie ? a nastêpnie ³añcucha znaków szuka ³añcucha DO TY£U. + Po wyszukiwaniu wci¶nij n by znale¼æ nastêpne wyst±pienie szukanej + frazy w tym samym kierunku lub N by szukaæ w kierunku przeciwnym. + CTRL-O przenosi do starszych pozycji, CTRL-I do nowszych. + + 3. Wpisanie % gdy kursor znajduje siê na (,),[,],{, lub } lokalizuje + paruj±cy znak. + + 4. By zamieniæ pierwszy stary na nowy w linii, wpisz :s/stary/nowy + By zamieniæ wszystkie stary na nowy w linii, wpisz :s/stary/nowy/g + By zamieniæ frazy pomiêdzy dwoma liniami # wpisz :#,#s/stary/nowy/g + By zamieniæ wszystkie wyst±pienia w pliku, wpisz :%s/stary/nowy/g + By Vim prosi³ Ciê o potwierdzenie, dodaj 'c' :%s/stary/nowy/gc +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 5.1.: JAK WYKONAÆ POLECENIA ZEWNÊTRZNE? + + + ** Wpisz :! a nastêpnie zewnêtrzne polecenie, by je wykonaæ. ** + + 1. Wpisz znajome polecenie : by ustawiæ kursor na dole ekranu. To pozwala + na wprowadzenie komendy linii poleceñ. + + 2. Teraz wstaw ! (wykrzyknik). To umo¿liwi Ci wykonanie dowolnego + zewnêtrznego polecenia pow³oki. + + 3. Jako przyk³ad wpisz ls za ! a nastêpnie wci¶nij . To polecenie + poka¿e spis plików w Twoim katalogu, tak jakby¶ by³ przy znaku zachêty + pow³oki. Mo¿esz te¿ u¿yæ :!dir je¶li ls nie dzia³a. + +Uwaga: W ten sposób mo¿na wykonaæ wszystkie polecenia pow³oki. +Uwaga: Wszystkie polecenia : musz± byæ zakoñczone . + Od tego momentu nie zawsze bêdziemy o tym wspominaæ. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 5.2.: WIÊCEJ O ZAPISYWANIU PLIKÓW + + + ** By zachowaæ zmiany w tek¶cie, wpisz :w NAZWA_PLIKU . ** + + 1. Wpisz :!dir lub :!ls by zobaczyæ spis plików w katalogu. + Ju¿ wiesz, ¿e musisz po tym wcisn±æ . + + 2. Wybierz nazwê pliku, jaka jeszcze nie istnieje, np. TEST. + + 3. Teraz wpisz: :w TEST (gdzie TEST jest nazw± pliku jak± wybra³e¶.) + + 4. To polecenie zapamiêta ca³y plik (Vim Tutor) pod nazw± TEST. + By to sprawdziæ, wpisz :!dir lub :!ls ¿eby znowu zobaczyæ listê plików. + +Uwaga: Zauwa¿, ¿e gdyby¶ teraz wyszed³ z Vima, a nastêpnie wszed³ ponownie + poleceniem vim TEST , plik by³by dok³adn± kopi± tutoriala, kiedy go + zapisywa³e¶. + + 5. Teraz usuñ plik wpisuj±c (MS-DOS): :!del TEST + lub (Unix): :!rm TEST + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 5.3.: WYBRANIE TEKSTU DO ZAPISU + + + ** By zachowaæ czê¶æ pliku, wpisz v ruch :w NAZWA_PLIKU ** + + 1. Przenie¶ kursor do tego wiersza. + + 2. Wci¶nij v i przenie¶ kursor do punktu 5. Zauwa¿, ¿e tekst zosta³ + pod¶wietlony. + + 3. Wci¶nij znak : . Na dole ekranu pojawi siê :'<,'> . + + 4. Wpisz w TEST , gdzie TEST to nazwa pliku, który jeszcze nie istnieje. + Upewnij siê, ¿e widzisz :'<,'>w TEST zanim wci¶niesz Enter. + + 5. Vim zapisze wybrane linie do pliku TEST. U¿yj :!dir lub :!ls , ¿eby to + zobaczyæ. Jeszcze go nie usuwaj! U¿yjemy go w nastêpnej lekcji. + +UWAGA: Wci¶niêcie v zaczyna tryb Wizualny. Mo¿esz poruszaæ kursorem, by + zmieniæ rozmiary zaznaczenia. Mo¿esz te¿ u¿yæ operatora, by zrobiæ co¶ + z tekstem. Na przyk³ad d usuwa tekst. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 5.4.: WSTAWIANIE I £¡CZENIE PLIKÓW + + + ** By wstawiæ zawarto¶æ pliku, wpisz :r NAZWA_PLIKU ** + + 1. Umie¶æ kursor tu¿ powy¿ej tej linii. + +UWAGA: Po wykonaniu kroku 2. zobaczysz tekst z Lekcji 5.3. Potem przejd¼ + do DO£U, by zobaczyæ ponownie tê lekcjê. + + 2. Teraz wczytaj plik TEST u¿ywaj±c polecenia :r TEST , gdzie TEST + jest nazw± pliku. + Wczytany plik jest umieszczony poni¿ej linii z kursorem. + + 3. By sprawdziæ czy plik zosta³ wczytany, cofnij kursor i zobacz, ¿e + teraz s± dwie kopie Lekcji 5.3., orygina³ i kopia z pliku. + +UWAGA: Mo¿esz te¿ wczytaæ wyj¶cie zewnêtrznego polecenia. Na przyk³ad + :r !ls wczytuje wyj¶cie polecenia ls i umieszcza je pod poni¿ej + kursora. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 5. PODSUMOWANIE + + + 1. :!polecenie wykonuje polecenie zewnêtrzne. + + U¿ytecznymi przyk³adami s±: + + :!dir - pokazuje spis plików w katalogu. + + :!rm NAZWA_PLIKU - usuwa plik NAZWA_PLIKU. + + 2. :w NAZWA_PLIKU zapisuje obecny plik Vima na dysk z nazw± NAZWA_PLIKU. + + 3. v ruch :w NAZWA_PLIKU zapisuje Wizualnie wybrane linie do NAZWA_PLIKU. + + 4. :r NAZWA_PLIKU wczytuje z dysku plik NAZWA_PLIKU i wstawia go do + bie¿±cego pliku poni¿ej kursora. + + 5. :r !dir wczytuje wyj¶cie polecenia dir i umieszcza je poni¿ej kursora. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 6.1.: POLECENIE OPEN (otwórz) + + + ** Wpisz o by otworzyæ liniê poni¿ej kursora i przenie¶æ siê do + trybu Insert (wprowadzanie). ** + + 1. Przenie¶ kursor do linii poni¿ej oznaczonej --->. + + 2. Wpisz o (ma³e), by otworzyæ liniê PONI¯EJ kursora i przenie¶æ siê + do trybu Insert (wprowadzanie). + + 3. Wpisz trochê tekstu i wci¶nij by wyj¶æ z trybu Insert (wprowadzanie). + +---> Po wci¶niêciu o kursor znajdzie siê w otwartej linii w trybie Insert. + + 4. By otworzyæ liniê POWY¯EJ kursora, wci¶nij wielkie O zamiast ma³ego + o . Wypróbuj to na linii poni¿ej. + +---> Otwórz liniê powy¿ej wciskaj±c SHIFT-O gdy kursor bêdzie na tej linii. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 6.2.: POLECENIE APPEND (dodaj) + + + ** Wpisz a by dodaæ tekst ZA kursorem. ** + + 1. Przenie¶ kursor do pocz±tku pierwszej linii poni¿ej oznaczonej ---> + + 2. Wciskaj e dopóki kursor nie bêdzie na koñcu li . + + 3. Wpisz a (ma³e), aby dodaæ tekst ZA znakiem pod kursorem. + + 4. Dokoñcz wyraz tak, jak w linii poni¿ej. Wci¶nij aby opu¶ciæ tryb + Insert. + + 5. U¿yj e by przej¶æ do kolejnego niedokoñczonego wyrazu i powtarzaj kroki + 3. i 4. + +---> Ta li poz Ci æwi dodaw teks do koñ lin +---> Ta linia pozwoli Ci æwiczyæ dodawanie tekstu do koñca linii. + +Uwaga: a , i oraz A prowadz± do trybu Insert, jedyn± ró¿nic± jest miejsce, + gdzie nowe znaki bêd± dodawane. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 6.3.: INNA WERSJA REPLACE (zamiana) + + + ** Wpisz wielkie R by zamieniæ wiêcej ni¿ jeden znak. ** + + 1. Przenie¶ kursor do pierwszej linii poni¿ej oznaczonej --->. Przenie¶ + kursor do pierwszego xxx . + + 2. Wci¶nij R i wpisz numer poni¿ej w drugiej linii, tak, ¿e zast±pi on + xxx. + + 3. Wci¶nij by opu¶ciæ tryb Replace. Zauwa¿, ¿e reszta linii pozostaje + niezmieniona. + + 5. Powtarzaj kroki by wymieniæ wszystkie xxx. + +---> Dodanie 123 do xxx daje xxx. +---> Dodanie 123 do 456 daje 579. + +UWAGA: Tryb Replace jest jak tryb Insert, ale ka¿dy znak usuwa istniej±cy + znak. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 6.4.: KOPIOWANIE I WKLEJANIE TEKSTU + + + ** u¿yj operatora y aby skopiowaæ tekst i p aby go wkleiæ ** + + 1. Przejd¼ do linii oznaczonej ---> i umie¶æ kursor za "a)". + + 2. Wejd¼ w tryb Wizualny v i przenie¶ kursor na pocz±tek "pierwszy". + + 3. Wci¶nij y aby kopiowaæ (yankowaæ) pod¶wietlony tekst. + + 4. Przenie¶ kursor do koñca nastêpnej linii: j$ + + 5. Wci¶nij p aby wkleiæ (wpakowaæ) tekst. Dodaj: a drugi . + + 6. U¿yj trybu Wizualnego, aby wybraæ " element.", yankuj go y , przejd¼ do + koñca nastêpnej linii j$ i upakuj tam tekst z p . + +---> a) to jest pierwszy element. + b) +Uwaga: mo¿esz u¿yæ y jako operatora; yw kopiuje jeden wyraz. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 6.5.: USTAWIANIE OPCJI + + +** Ustawianie opcji tak, by szukaj lub substytucja ignorowa³y wielko¶æ liter ** + + 1. Szukaj 'ignore' wpisuj±c: /ignore + Powtórz szukanie kilka razy naciskaj±c klawisz n . + + 2. Ustaw opcjê 'ic' (Ignore case -- ignoruj wielko¶æ liter) poprzez + wpisanie: :set ic + + 3. Teraz szukaj 'ignore' ponownie wciskaj±c: n + Zauwa¿, ¿e Ignore i IGNORE tak¿e s± teraz znalezione. + + 4. Ustaw opcje 'hlsearch' i 'incsearch': :set hls is + + 5. Teraz wprowad¼ polecenie szukaj ponownie i zobacz co siê zdarzy: + /ignore + + 6. Aby wy³±czyæ ignorowanie wielko¶ci liter: :set noic + +Uwaga: Aby usun±æ pod¶wietlanie dopasowañ, wpisz: :nohlsearch +Uwaga: Aby ignorowaæ wielko¶æ liter dla jednego wyszukiwania: /ignore\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 6. PODSUMOWANIE + + + 1. Wpisanie o otwiera liniê PONI¯EJ kursora. + Wpisanie O otwiera liniê POWY¯EJ kursora. + + 2. Wpisanie a wstawia tekst ZA znakiem, na którym jest kursor. + Wpisanie A dodaje tekst na koñcu linii. + + 3. Polecenie e przenosi do koñca wyrazu. + 4. Operator y yankuje (kopiuje) tekst, p pakuje (wkleja) go. + 5. Wpisanie wielkiego R wprowadza w tryb Replace (zamiana) dopóki + nie zostanie wci¶niêty . + 6. Wpisanie ":set xxx" ustawia opcjê "xxx". Niektóre opcje: + 'ic' 'ignorecase' ignoruj wielko¶æ znaków + 'is' 'incsearch' poka¿ czê¶ciowe dopasowania + 'hls' 'hlsearch' pod¶wietl wszystkie dopasowania + Mo¿esz u¿yæ zarówno d³ugiej, jak i krótkiej formy. + 7. Dodaj "no", aby wy³±czyæ opcjê: :set noic + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 7.1. JAK UZYSKAÆ POMOC? + + ** U¿ycie systemu pomocy on-line ** + + Vim posiada bardzo dobry system pomocy on-line. By zacz±æ, spróbuj jednej + z trzech mo¿liwo¶ci: + - wci¶nij klawisz (je¶li taki masz) + - wci¶nij klawisz (je¶li taki masz) + - wpisz :help + + Przeczytaj tekst w oknie pomocy, aby dowiedzieæ siê jak dzia³a pomoc. + wpisz CTRL-W CTRL-W aby przeskoczyæ z jednego okna do innego + wpisz :q aby zamkn±æ okno pomocy. + + Mo¿esz te¿ znale¼æ pomoc na ka¿dy temat podaj±c argument polecenia ":help". + Spróbuj tych (nie zapomnij wcisn±æ ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 7.2. TWORZENIE SKRYPTU STARTOWEGO + + ** W³±cz mo¿liwo¶ci Vima ** + + Vim ma o wiele wiêcej mo¿liwo¶ci ni¿ Vi, ale wiêkszo¶æ z nich jest domy¶lnie + wy³±czona. Je¶li chcesz w³±czyæ te mo¿liwo¶ci na starcie musisz utworzyæ + plik "vimrc". + + 1. Pocz±tek edycji pliku "vimrc" zale¿y od Twojego systemu: + :edit ~/.vimrc dla Uniksa + :edit $VIM/_vimrc dla MS-Windows + 2. Teraz wczytaj przyk³adowy plik "vimrc": + :read $VIMRUNTIME/vimrc_example.vim + 3. Zapisz plik: + :w + + Nastêpnym razem, gdy zaczniesz pracê w Vimie bêdzie on u¿ywaæ pod¶wietlania + sk³adni. Mo¿esz dodaæ wszystkie swoje ulubione ustawienia do tego pliku + "vimrc". + Aby uzyskaæ wiêcej informacji, wpisz :help vimrc-intro + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 7.3.: UZUPE£NIANIE + + + ** Uzupe³nianie linii poleceñ z CTRL-D i ** + + 1. Upewnij siê, ¿e Vim nie jest w trybie kompatybilno¶ci: :set nocp + + 2. Zerknij, jakie pliki s± w bie¿±cym katalogu: :!ls lub :!dir + + 3. Wpisz pocz±tek polecenia: :e + + 4. Wci¶nij CTRL-D i Vim poka¿e listê poleceñ, jakie zaczynaj± siê na "e". + + 5. Wci¶nij i Vim uzupe³ni polecenie do ":edit". + + 6. Dodaj spacjê i zacznij wpisywaæ nazwê istniej±cego pliku: :edit FIL + + 7. Wci¶nij . Vim uzupe³ni nazwê (je¶li jest niepowtarzalna). + +UWAGA: Uzupe³nianie dzia³a dla wielu poleceñ. Spróbuj wcisn±æ CTRL-D i . + U¿yteczne zw³aszcza przy :help . +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 7. PODSUMOWANIE + + + 1. Wpisz :help albo wci¶nij lub aby otworzyæ okno pomocy. + + 2. Wpisz :help cmd aby uzyskaæ pomoc o cmd . + + 3. Wpisz CTRL-W CTRL-W aby przeskoczyæ do innego okna. + + 4. Wpisz :q aby zamkn±æ okno pomocy. + + 5. Utwórz plik startowy vimrc aby zachowaæ wybrane ustawienia. + + 6. Po poleceniu : , wci¶nij CTRL-D aby zobaczyæ mo¿liwe uzupe³nienia. + Wci¶nij aby u¿yæ jednego z nich. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Tutaj siê koñczy tutorial Vima. Zosta³ on pomy¶lany tak, aby daæ krótki + przegl±d jego mo¿liwo¶ci, wystarczaj±cy by¶ móg³ go u¿ywaæ. Jest on + daleki od kompletno¶ci, poniewa¿ Vim ma o wiele, wiele wiêcej poleceñ. + + Dla dalszej nauki rekomendujemy ksi±¿kê: + Vim - Vi Improved - autor Steve Oualline + Wydawca: New Riders + Pierwsza ksi±¿ka ca³kowicie po¶wiêcona Vimowi. U¿yteczna zw³aszcza dla + pocz±tkuj±cych. Zawiera wiele przyk³adów i ilustracji. + Zobacz http://iccf-holland.org./click5.html + + Starsza pozycja i bardziej o Vi ni¿ o Vimie, ale tak¿e warta + polecenia: + Learning the Vi Editor - autor Linda Lamb + Wydawca: O'Reilly & Associates Inc. + To dobra ksi±¿ka, by dowiedzieæ siê niemal wszystkiego, co chcia³by¶ zrobiæ + z Vi. Szósta edycja zawiera te¿ informacje o Vimie. + + Po polsku wydano: + Edytor vi. Leksykon kieszonkowy - autor Arnold Robbins + Wydawca: Helion 2001 (O'Reilly). + ISBN: 83-7197-472-8 + http://helion.pl/ksiazki/vilek.htm + Jest to ksi±¿eczka zawieraj±ca spis poleceñ vi i jego najwa¿niejszych + klonów (miêdzy innymi Vima). + + Edytor vi - autorzy Linda Lamb i Arnold Robbins + Wydawca: Helion 2001 (O'Reilly) - wg 6. ang. wydania + ISBN: 83-7197-539-2 + http://helion.pl/ksiazki/viedyt.htm + Rozszerzona wersja Learning the Vi Editor w polskim t³umaczeniu. + + Ten tutorial zosta³ napisany przez Michaela C. Pierce'a i Roberta K. Ware'a, + Colorado School of Mines korzystaj±c z pomocy Charlesa Smitha, + Colorado State University. + E-mail: bware@mines.colorado.edu. + + Zmodyfikowane dla Vima przez Brama Moolenaara. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Przet³umaczone przez Miko³aja Machowskiego, + Sierpieñ 2001, + rev. Marzec 2002 + 2nd rev. Wrzesieñ 2004 + 3rd rev. Marzec 2006 + 4th rev. Grudzieñ 2008 + Wszelkie uwagi proszê kierowaæ na: mikmach@wp.pl diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.pl.cp1250 b/vim/bundle/ubuntu-vim72/tutor/tutor.pl.cp1250 new file mode 100644 index 0000000..8c647e1 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.pl.cp1250 @@ -0,0 +1,995 @@ +=============================================================================== += W i t a j w t u t o r i a l u V I M - a - Wersja 1.7. = +=============================================================================== + + Vim to potê¿ny edytor, który posiada wiele poleceñ, zbyt du¿o, by + wyjaœniæ je wszystkie w tym tutorialu. Ten przewodnik ma nauczyæ + Ciê pos³ugiwaæ siê wystarczaj¹co wieloma komendami, byœ móg³ ³atwo + u¿ywaæ Vima jako edytora ogólnego przeznaczenia. + + Czas potrzebny na ukoñczenie tutoriala to 25 do 30 minut i zale¿y + od tego jak wiele czasu spêdzisz na eksperymentowaniu. + + UWAGA: + Polecenia wykonywane w czasie lekcji zmodyfikuj¹ tekst. Zrób + wczeœniej kopiê tego pliku do æwiczeñ (jeœli zacz¹³eœ komend¹ + "vimtutor", to ju¿ pracujesz na kopii). + + Pamiêtaj, ¿e przewodnik ten zosta³ zaprojektowany do nauki poprzez + æwiczenia. Oznacza to, ¿e musisz wykonywaæ polecenia, by nauczyæ siê ich + prawid³owo. Jeœli bêdziesz jedynie czyta³ tekst, szybko zapomnisz wiele + poleceñ! + + Teraz upewnij siê, ¿e nie masz wciœniêtego Caps Locka i wciskaj j + tak d³ugo dopóki Lekcja 1.1. nie wype³ni ca³kowicie ekranu. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 1.1.: PORUSZANIE SIÊ KURSOREM + + ** By wykonaæ ruch kursorem, wciœnij h, j, k, l jak pokazano. ** + + ^ + k Wskazówka: h jest po lewej + < h l > l jest po prawej + j j wygl¹da jak strza³ka w dó³ + v + 1. Poruszaj kursorem dopóki nie bêdziesz pewien, ¿e pamiêtasz polecenia. + + 2. Trzymaj j tak d³ugo a¿ bêdzie siê powtarza³. + Teraz wiesz jak dojœæ do nastêpnej lekcji. + + 3. U¿ywaj¹c strza³ki w dó³ przejdŸ do nastêpnej lekcji. + +Uwaga: Jeœli nie jesteœ pewien czegoœ co wpisa³eœ, wciœnij , by wróciæ do + trybu Normal. Wtedy powtórz polecenie. + +Uwaga: Klawisze kursora tak¿e powinny dzia³aæ, ale u¿ywaj¹c hjkl bêdziesz + w stanie poruszaæ siê o wiele szybciej, jak siê tylko przyzwyczaisz. + Naprawdê! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 1.2.: WYCHODZENIE Z VIM-a + + !! UWAGA: Przed wykonaniem jakiegokolwiek polecenia przeczytaj ca³¹ lekcjê !! + + 1. Wciœnij (aby upewniæ siê, ¿e jesteœ w trybie Normal). + 2. Wpisz: :q!. + To spowoduje wyjœcie z edytora PORZUCAJ¥C wszelkie zmiany, jakie + zd¹¿y³eœ zrobiæ. Jeœli chcesz zapamiêtaæ zmiany i wyjœæ, + wpisz: :wq + + 3. Kiedy widzisz znak zachêty pow³oki wpisz komendê, ¿eby wróciæ + do tutoriala. Czyli: vimtutor + + 4. Jeœli chcesz zapamiêtaæ polecenia, wykonaj kroki 1. do 3., aby + wyjœæ i wróciæ do edytora. + +UWAGA: :q! porzuca wszelkie zmiany jakie zrobi³eœ. W nastêpnych + lekcjach dowiesz siê jak je zapamiêtywaæ. + + 5. Przenieœ kursor do lekcji 1.3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 1.3.: EDYCJA TEKSTU - KASOWANIE + + ** Wciœnij x aby usun¹æ znak pod kursorem. ** + + 1. Przenieœ kursor do linii poni¿ej oznaczonej --->. + + 2. By poprawiæ b³êdy, naprowadŸ kursor na znak do usuniêcia. + + 3. Wciœnij x aby usun¹æ niechciany znak. + + 4. Powtarzaj kroki 2. do 4. dopóki zdanie nie jest poprawne. + +---> Kkrowa prrzeskoczy³a prrzez ksiiê¿ycc. + + 5. Teraz, kiedy zdanie jest poprawione, przejdŸ do Lekcji 1.4. + +UWAGA: Ucz siê przez æwiczenie, nie wkuwanie. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 1.4.: EDYCJA TEKSTU - INSERT (wprowadzanie) + + + ** Wciœnij i aby wstawiæ tekst. ** + + 1. Przenieœ kursor do pierwszej linii poni¿ej oznaczonej --->. + + 2. Aby poprawiæ pierwszy wiersz, ustaw kursor na pierwszym znaku PO tym, + gdzie tekst ma byæ wstawiony. + + 3. Wciœnij i a nastêpnie wpisz konieczne poprawki. + + 4. Po poprawieniu b³êdu wciœnij , by wróciæ do trybu Normal. + Powtarzaj kroki 2. do 4., aby poprawiæ ca³e zdanie. + +---> W tej brkje trochê . +---> W tej linii brakuje trochê tekstu. + + 5. Kiedy czujesz siê swobodnie wstawiaj¹c tekst, przejdŸ do + podsumowania poni¿ej. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 1.5.: EDYCJA TEKSTU - APPENDING (dodawanie) + + + ** Wciœnij A by dodaæ tekst. ** + + 1. Przenieœ kursor do pierwszej linii poni¿ej oznaczonej --->. + Nie ma znaczenia, który to bêdzie znak. + + 2. Wciœnij A i wpisz odpowiednie dodatki. + + 3. Kiedy tekst zosta³ dodany, wciœnij i wróæ do trybu Normalnego. + + 4. Przenieœ kursor do drugiej linii oznaczonej ---> i powtórz kroki 2. i 3., + aby poprawiæ zdanie. + +---> Brakuje tu tro + Brakuje tu trochê tekstu. +---> Tu te¿ trochê bra + Tu te¿ trochê brakuje. + + 5. Kiedy ju¿ utrwali³eœ æwiczenie, przejdŸ do lekcji 1.6. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 1.6.: EDYCJA PLIKU + + ** U¿yj :wq aby zapisaæ plik i wyjœæ. ** + + !! UWAGA: zanim wykonasz jakiekolwiek polecenia przeczytaj ca³¹ lekcjê !! + + 1. Zakoñcz tutorial tak jak w lekcji 1.2.: :q! + lub, jeœli masz dostêp do innego terminala, wykonaj kolejne kroki tam. + + 2. W pow³oce wydaj polecenie: vim tutor + "vim" jest poleceniem uruchamiaj¹cym edytor Vim. 'tutor' to nazwa pliku, + jaki chcesz edytowaæ. U¿yj pliku, który mo¿e zostaæ zmieniony. + + 3. Dodaj i usuñ tekst tak, jak siê nauczy³eœ w poprzednich lekcjach. + + 4. Zapisz plik ze zmianami i opuœæ Vima: :wq + + 5. Jeœli zakoñczy³eœ vimtutor w kroku 1., uruchom go ponownie i przejdŸ + do podsumowania poni¿ej. + + 6. Po przeczytaniu wszystkich kroków i ich zrozumieniu: wykonaj je. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 1. PODSUMOWANIE + + 1. Poruszasz kursorem u¿ywaj¹c "strza³ek" i klawiszy hjkl . + h (w lewo) j (w dó³) k (do góry) l (w prawo) + + 2. By wejœæ do Vima, (z pow³oki) wpisz: + vim NAZWA_PLIKU + + 3. By wyjœæ z Vima, wpisz: + :q! by usun¹æ wszystkie zmiany. + LUB: :wq by zmiany zachowaæ. + + 4. By usun¹æ znak pod kursorem, wciœnij: x + + 5. By wstawiæ tekst przed kursorem lub dodaæ: + i wpisz tekst wstawi przed kursorem + A wpisz tekst doda na koñcu linii + +UWAGA: Wciœniêcie przeniesie Ciê z powrotem do trybu Normal + lub odwo³a niechciane lub czêœciowo wprowadzone polecenia. + +Teraz mo¿emy kontynuowaæ i przejœæ do Lekcji 2. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 2.1.: POLECENIE DELETE (usuwanie) + + + ** Wpisz dw by usun¹æ wyraz. ** + + 1. Wciœnij , by upewniæ siê, ¿e jesteœ w trybie Normal. + + 2. Przenieœ kursor do linii poni¿ej oznaczonej --->. + + 3. Przesuñ kursor na pocz¹tek wyrazu, który chcesz usun¹æ. + + 4. Wpisz dw by usun¹æ wyraz. + + UWAGA: Litera d pojawi siê na dole ekranu. Vim czeka na wpisanie w . + Jeœli zobaczysz inny znak, oznacza to, ¿e wpisa³eœ coœ Ÿle; wciœnij + i zacznij od pocz¹tku. + +---> Jest tu parê papier wyrazów, które kamieñ nie nale¿¹ do no¿yce tego zdania. + + 5. Powtarzaj kroki 3. i 4. dopóki zdanie nie bêdzie poprawne, potem + przejdŸ do Lekcji 2.2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 2.2.: WIÊCEJ POLECEÑ USUWAJ¥CYCH + + + ** Wpisz d$ aby usun¹æ tekst do koñca linii. ** + + 1. Wciœnij aby siê upewniæ, ¿e jesteœ w trybie Normal. + + 2. Przenieœ kursor do linii poni¿ej oznaczonej --->. + + 3. Przenieœ kursor do koñca poprawnego zdania (PO pierwszej . ). + + 4. Wpisz d$ aby usun¹æ resztê linii. + +---> Ktoœ wpisa³ koniec tego zdania dwukrotnie. zdania dwukrotnie. + + + 5. PrzejdŸ do Lekcji 2.3., by zrozumieæ co siê sta³o. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 2.3.: O OPERATORACH I RUCHACH + + + Wiele poleceñ zmieniaj¹cych tekst jest z³o¿onych z operatora i ruchu. + Format dla polecenia usuwaj¹cego z operatorem d jest nastêpuj¹cy: + + d ruch + + gdzie: + d - operator usuwania. + ruch - na czym polecenie bêdzie wykonywane (lista poni¿ej). + + Krótka lista ruchów: + w - do pocz¹tku nastêpnego wyrazu WY£¥CZAJ¥C pierwszy znak. + e - do koñca bie¿¹cego wyrazu, W£¥CZAJ¥C ostatni znak. + $ - do koñca linii, W£¥CZAJ¥C ostatni znak. + +W ten sposób wpisanie de usunie znaki od kursora do koñca wyrazu. + +UWAGA: Wpisanie tylko ruchu w trybie Normal bez operatora przeniesie kursor + tak, jak to okreœlono. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 2.4.: U¯YCIE MNO¯NIKA DLA RUCHU + + + ** Wpisanie liczby przed ruchem powtarza ruch odpowiedni¹ iloœæ razy. ** + + 1. Przenieœ kursor na pocz¹tek linii poni¿ej zaznaczonej --->. + + 2. Wpisz 2w aby przenieœæ kursor o dwa wyrazy do przodu. + + 3. Wpisz 3e aby przenieœæ kursor do koñca trzeciego wyrazu w przód. + + 4. Wpisz 0 (zero), aby przenieœæ kursor na pocz¹tek linii. + + 5. Powtórz kroki 2. i 3. z innymi liczbami. + + + ---> To jest zwyk³y wiersz z wyrazami, po których mo¿esz siê poruszaæ. + + 6. PrzejdŸ do lekcji 2.5. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 2.5.: U¯YCIE MNO¯NIKA, BY WIÊCEJ USUN¥Æ + + + ** Wpisanie liczby z operatorem powtarza go odpowiedni¹ iloœæ razy. ** + + W wy¿ej wspomnianej kombinacji operatora usuwania i ruchu podaj mno¿nik + przed ruchem, by wiêcej usun¹æ: + d liczba ruch + + 1. Przenieœ kursor do pierwszego wyrazu KAPITALIKAMI w linii zaznaczonej --->. + + 2. Wpisz 2dw aby usun¹æ dwa wyrazy KAPITALIKAMI. + + 3. Powtarzaj kroki 1. i 2. z innymi mno¿nikami, aby usun¹æ kolejne wyrazy + KAPITALIKAMI jednym poleceniem + +---> ta ASD WE linia QWE ASDF ZXCV FG wyrazów zosta³a ERT FGH CF oczyszczona. + +UWAGA: Mno¿nik pomiêdzy operatorem d i ruchem dzia³a podobnie do ruchu bez + operatora. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 2.6.: OPEROWANIE NA LINIACH + + + ** Wpisz dd aby usun¹æ ca³¹ liniê. ** + + Z powodu czêstoœci usuwania ca³ych linii, projektanci Vi zdecydowali, ¿e + bêdzie ³atwiej wpisaæ dwa razy d aby usun¹æ liniê. + + 1. Przenieœ kursor do drugiego zdania z wierszyka poni¿ej. + 2. Wpisz dd aby usun¹æ wiersz. + 3. Teraz przenieœ siê do czwartego wiersza. + 4. Wpisz 2dd aby usun¹æ dwa wiersze. + +---> 1) Ró¿e s¹ czerwone, +---> 2) B³oto jest fajne, +---> 3) Fio³ki s¹ niebieskie, +---> 4) Mam samochód, +---> 5) Zegar podaje czas, +---> 6) Cukier jest s³odki, +---> 7) I ty te¿. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 2.7.: POLECENIE UNDO (cofnij) + + + ** Wciœnij u aby cofn¹æ skutki ostatniego polecenia. + U zaœ, by cofn¹æ skutki dla ca³ej linii. ** + + 1. Przenieœ kursor do zdania poni¿ej oznaczonego ---> i umieœæ go na + pierwszym b³êdzie. + 2. Wpisz x aby usun¹æ pierwszy niechciany znak. + 3. Teraz wciœnij u aby cofn¹æ skutki ostatniego polecenia. + 4. Tym razem popraw wszystkie b³êdy w linii u¿ywaj¹c polecenia x . + 5. Teraz wciœnij wielkie U aby przywróciæ liniê do oryginalnego stanu. + 6. Teraz wciœnij u kilka razy, by cofn¹æ U i poprzednie polecenia. + 7. Teraz wpisz CTRL-R (trzymaj równoczeœnie wciœniête klawisze CTRL i R) + kilka razy, by cofn¹æ cofniêcia. + +---> Poopraw b³êdyyy w teej liniii i zaamiieñ je prrzez coofnij. + + 8. To s¹ bardzo po¿yteczne polecenia. + + PrzejdŸ teraz do podsumowania Lekcji 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 2. PODSUMOWANIE + + + 1. By usun¹æ znaki od kursora do nastêpnego wyrazu, wpisz: dw + 2. By usun¹æ znaki od kursora do koñca linii, wpisz: d$ + 3. By usun¹æ ca³¹ liniê: dd + 4. By powtórzyæ ruch, poprzedŸ go liczb¹: 2w + 5. Format polecenia zmiany to: + operator [liczba] ruch + gdzie: + operator - to, co trzeba zrobiæ (np. d dla usuwania) + [liczba] - opcjonalne, ile razy powtórzyæ ruch + ruch - przenosi nad tekstem do operowania, takim jak w (wyraz), + $ (do koñca linii) etc. + + 6. By przejœæ do pocz¹tku linii, u¿yj zera: 0 + 7. By cofn¹æ poprzednie polecenie, wpisz: u (ma³e u) + By cofn¹æ wszystkie zmiany w linii, wpisz: U (wielkie U) + By cofn¹æ cofniêcie, wpisz: CTRL-R + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 3.1.: POLECENIE PUT (wstaw) + + + ** Wpisz p by wstawiæ ostatnie usuniêcia za kursorem. ** + + 1. Przenieœ kursor do pierwszej linii ---> poni¿ej. + + 2. Wpisz dd aby usun¹æ liniê i przechowaæ j¹ w rejestrze Vima. + + 3. Przenieœ kursor do linii c), POWY¯EJ tej, gdzie usuniêta linia powinna + siê znajdowaæ. + + 4. Wciœnij p by wstawiæ liniê poni¿ej kursora. + + 5. Powtarzaj kroki 2. do 4. a¿ znajd¹ siê w odpowiednim porz¹dku. + +---> d) Jak dwa anio³ki. +---> b) Na dole fio³ki, +---> c) A my siê kochamy, +---> a) Na górze ró¿e, + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 3.2.: POLECENIE REPLACE (zast¹p) + + + ** Wpisz rx aby zast¹piæ znak pod kursorem na x . ** + + 1. Przenieœ kursor do pierwszej linii poni¿ej oznaczonej ---> + + 2. Ustaw kursor na pierwszym b³êdzie. + + 3. Wpisz r a potem znak jaki powinien go zast¹piæ. + + 4. Powtarzaj kroki 2. i 3. dopóki pierwsza linia nie bêdzie taka, jak druga. + +---> Kjedy ten wiersz bi³ wstókiwany, ktoœ wcizn¹³ perê z³ych klawirzy! +---> Kiedy ten wiersz by³ wstukiwany, ktoœ wcisn¹³ parê z³ych klawiszy! + + 5. Teraz czas na Lekcjê 3.3. + + +UWAGA: Pamiêtaj, by uczyæ siê æwicz¹c, a nie pamiêciowo. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 3.3.: OPERATOR CHANGE (zmieñ) + + ** By zmieniæ do koñca wyrazu, wpisz ce . ** + + 1. Przenieœ kursor do pierwszej linii poni¿ej oznaczonej --->. + + 2. Umieœæ kursor na u w lunos. + + 3. Wpisz ce i popraw wyraz (w tym wypadku wstaw inia ). + + 4. Wciœnij i przejdŸ do nastêpnej planowanej zmiany. + + 5. Powtarzaj kroki 3. i 4. dopóki pierwsze zdanie nie bêdzie takie same, + jak drugie. + +---> Ta lunos ma pire s³ów, które t¿ina zbnic u¿ifajonc pcmazu zmieñ. +---> Ta linia ma parê s³ów, które trzeba zmieniæ u¿ywaj¹c polecenia zmieñ. + + Zauwa¿, ¿e ce nie tylko zamienia wyraz, ale tak¿e zmienia tryb na + Insert (wprowadzanie). + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 3.4.: WIÊCEJ ZMIAN U¯YWAJ¥C c + + + ** Polecenie change u¿ywa takich samych ruchów, jak delete. ** + + 1. Operator change dzia³a tak samo, jak delete. Format wygl¹da tak: + + c [liczba] ruch + + 2. Ruchy s¹ tak¿e takie same, np.: w (wyraz), $ (koniec linii) etc. + + 3. Przenieœ siê do pierwszej linii poni¿ej oznaczonej ---> + + 4. Ustaw kursor na pierwszym b³êdzie. + + 5. Wpisz c$ , popraw koniec wiersza i wciœnij . + +---> Koniec tego wiersza musi byæ poprawiony, aby wygl¹da³ tak, jak drugi. +---> Koniec tego wiersza musi byæ poprawiony u¿ywaj¹c polecenia c$ . + +UWAGA: Mo¿esz u¿ywaæ aby poprawiaæ b³êdy w czasie pisania. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 3. PODSUMOWANIE + + + 1. Aby wstawiæ tekst, który zosta³ wczeœniej usuniêty wciœnij p . To + polecenie wstawia skasowany tekst PO kursorze (jeœli ca³a linia + zosta³a usuniêta, zostanie ona umieszczona w linii poni¿ej kursora). + + 2. By zamieniæ znak pod kursorem, wciœnij r a potem znak, który ma zast¹piæ + oryginalny. + + 3. Operator change pozwala Ci na zast¹pienie od kursora do miejsca, gdzie + zabra³by Ciê ruch. Np. wpisz ce aby zamieniæ tekst od kursora do koñca + wyrazu, c$ aby zmieniæ tekst do koñca linii. + + 4. Format do polecenia change (zmieñ): + + c [liczba] obiekt + + Teraz przejdŸ do nastêpnej lekcji. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 4.1.: PO£O¯ENIE KURSORA ORAZ STATUS PLIKU + + ** Naciœnij CTRL-G aby zobaczyæ swoje po³o¿enie w pliku i status + pliku. Naciœnij G aby przejœæ do linii w pliku. ** + + UWAGA: Przeczytaj ca³¹ lekcjê zanim wykonasz jakieœ polecenia!!! + + 1. Przytrzymaj klawisz CTRL i wciœnij g . U¿ywamy notacji CTRL-G. + Na dole strony pojawi siê pasek statusu z nazw¹ pliku i pozycj¹ w pliku. + Zapamiêtaj numer linii dla potrzeb kroku 3. + +UWAGA: Mo¿esz te¿ zobaczyæ pozycjê kursora w prawym, dolnym rogu ekranu. + Dzieje siê tak kiedy ustawiona jest opcja 'ruler' (wiêcej w lekcji 6.). + + 2. Wciœnij G aby przejœæ na koniec pliku. + Wciœnij gg aby przejœæ do pocz¹tku pliku. + + 3. Wpisz numer linii, w której by³eœ a potem G . To przeniesie Ciê + z powrotem do linii, w której by³eœ kiedy wcisn¹³eœ CTRL-G. + + 4. Jeœli czujesz siê wystarczaj¹co pewnie, wykonaj kroki 1-3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 4.2.: POLECENIE SZUKAJ + + + ** Wpisz / a nastêpnie wyra¿enie, aby je znaleŸæ. ** + + 1. W trybie Normal wpisz / . Zauwa¿, ¿e znak ten oraz kursor pojawi¹ + siê na dole ekranu tak samo, jak polecenie : . + + 2. Teraz wpisz b³ond . To jest s³owo, którego chcesz szukaæ. + + 3. By szukaæ tej samej frazy ponownie, po prostu wciœnij n . + Aby szukaæ tej frazy w przeciwnym, kierunku wciœnij N . + + 4. Jeœli chcesz szukaæ frazy do ty³u, u¿yj polecenia ? zamiast / . + + 5. Aby wróciæ gdzie by³eœ, wciœnij CTRL-O. Powtarzaj, by wróciæ dalej. CTRL-I + idzie do przodu. + +Uwaga: 'b³ond' to nie jest metoda, by przeliterowaæ b³¹d; 'b³ond' to b³¹d. +Uwaga: Kiedy szukanie osi¹gnie koniec pliku, bêdzie kontynuowane od pocz¹tku + o ile opcja 'wrapscan' nie zosta³a przestawiona. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 4.3.: W POSZUKIWANIU PARUJ¥CYCH NAWIASÓW + + + ** Wpisz % by znaleŸæ paruj¹cy ), ], lub } . ** + + 1. Umieœæ kursor na którymœ z (, [, lub { w linii poni¿ej oznaczonej --->. + + 2. Teraz wpisz znak % . + + 3. Kursor powinien siê znaleŸæ na paruj¹cym nawiasie. + + 4. Wciœnij % aby przenieœæ kursor z powrotem do paruj¹cego nawiasu. + + 5. Przenieœ kursor do innego (,),[,],{ lub } i zobacz co robi % . + +---> To ( jest linia testowa z (, [, ] i {, } . )) + +Uwaga: Ta funkcja jest bardzo u¿yteczna w debuggowaniu programu + z niesparowanymi nawiasami! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 4.4.: POLECENIE SUBSTITUTE (zamiana) + + + ** Wpisz :s/stary/nowy/g aby zamieniæ 'stary' na 'nowy'. ** + + 1. Przenieœ kursor do linii poni¿ej oznaczonej --->. + + 2. Wpisz :s/czaas/czas . Zauwa¿, ¿e to polecenie zmienia + tylko pierwsze wyst¹pienie 'czaas' w linii. + + 3. Teraz wpisz :s/czaas/czas/g . Dodane g oznacza zamianê (substytucjê) + globalnie w ca³ej linii. Zmienia wszystkie wyst¹pienia 'czaas' w linii. + +---> Najlepszy czaas na zobaczenie naj³adniejszych kwiatów to czaas wiosny. + + 4. Aby zmieniæ wszystkie wyst¹pienia ³añcucha znaków pomiêdzy dwoma liniami, + wpisz: :#,#s/stare/nowe/g gdzie #,# s¹ numerami linii ograniczaj¹cych + region, gdzie ma nast¹piæ zamiana. + wpisz :%s/stare/nowe/g by zmieniæ wszystkie wyst¹pienia w ca³ym pliku. + wpisz :%s/stare/nowe/gc by zmieniæ wszystkie wyst¹pienia w ca³ym + pliku, prosz¹c o potwierdzenie za ka¿dym razem. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 4. PODSUMOWANIE + + 1. CTRL-G poka¿e Twoj¹ pozycjê w pliku i status pliku. SHIFT-G przenosi + Ciê do koñca pliku. + G przenosi do koñca pliku. + liczba G przenosi do linii [liczba]. + gg przenosi do pierwszej linii. + + 2. Wpisanie / a nastêpnie ³añcucha znaków szuka ³añcucha DO PRZODU. + Wpisanie ? a nastêpnie ³añcucha znaków szuka ³añcucha DO TY£U. + Po wyszukiwaniu wciœnij n by znaleŸæ nastêpne wyst¹pienie szukanej + frazy w tym samym kierunku lub N by szukaæ w kierunku przeciwnym. + CTRL-O przenosi do starszych pozycji, CTRL-I do nowszych. + + 3. Wpisanie % gdy kursor znajduje siê na (,),[,],{, lub } lokalizuje + paruj¹cy znak. + + 4. By zamieniæ pierwszy stary na nowy w linii, wpisz :s/stary/nowy + By zamieniæ wszystkie stary na nowy w linii, wpisz :s/stary/nowy/g + By zamieniæ frazy pomiêdzy dwoma liniami # wpisz :#,#s/stary/nowy/g + By zamieniæ wszystkie wyst¹pienia w pliku, wpisz :%s/stary/nowy/g + By Vim prosi³ Ciê o potwierdzenie, dodaj 'c' :%s/stary/nowy/gc +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 5.1.: JAK WYKONAÆ POLECENIA ZEWNÊTRZNE? + + + ** Wpisz :! a nastêpnie zewnêtrzne polecenie, by je wykonaæ. ** + + 1. Wpisz znajome polecenie : by ustawiæ kursor na dole ekranu. To pozwala + na wprowadzenie komendy linii poleceñ. + + 2. Teraz wstaw ! (wykrzyknik). To umo¿liwi Ci wykonanie dowolnego + zewnêtrznego polecenia pow³oki. + + 3. Jako przyk³ad wpisz ls za ! a nastêpnie wciœnij . To polecenie + poka¿e spis plików w Twoim katalogu, tak jakbyœ by³ przy znaku zachêty + pow³oki. Mo¿esz te¿ u¿yæ :!dir jeœli ls nie dzia³a. + +Uwaga: W ten sposób mo¿na wykonaæ wszystkie polecenia pow³oki. +Uwaga: Wszystkie polecenia : musz¹ byæ zakoñczone . + Od tego momentu nie zawsze bêdziemy o tym wspominaæ. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 5.2.: WIÊCEJ O ZAPISYWANIU PLIKÓW + + + ** By zachowaæ zmiany w tekœcie, wpisz :w NAZWA_PLIKU . ** + + 1. Wpisz :!dir lub :!ls by zobaczyæ spis plików w katalogu. + Ju¿ wiesz, ¿e musisz po tym wcisn¹æ . + + 2. Wybierz nazwê pliku, jaka jeszcze nie istnieje, np. TEST. + + 3. Teraz wpisz: :w TEST (gdzie TEST jest nazw¹ pliku jak¹ wybra³eœ.) + + 4. To polecenie zapamiêta ca³y plik (Vim Tutor) pod nazw¹ TEST. + By to sprawdziæ, wpisz :!dir lub :!ls ¿eby znowu zobaczyæ listê plików. + +Uwaga: Zauwa¿, ¿e gdybyœ teraz wyszed³ z Vima, a nastêpnie wszed³ ponownie + poleceniem vim TEST , plik by³by dok³adn¹ kopi¹ tutoriala, kiedy go + zapisywa³eœ. + + 5. Teraz usuñ plik wpisuj¹c (MS-DOS): :!del TEST + lub (Unix): :!rm TEST + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 5.3.: WYBRANIE TEKSTU DO ZAPISU + + + ** By zachowaæ czêœæ pliku, wpisz v ruch :w NAZWA_PLIKU ** + + 1. Przenieœ kursor do tego wiersza. + + 2. Wciœnij v i przenieœ kursor do punktu 5. Zauwa¿, ¿e tekst zosta³ + podœwietlony. + + 3. Wciœnij znak : . Na dole ekranu pojawi siê :'<,'> . + + 4. Wpisz w TEST , gdzie TEST to nazwa pliku, który jeszcze nie istnieje. + Upewnij siê, ¿e widzisz :'<,'>w TEST zanim wciœniesz Enter. + + 5. Vim zapisze wybrane linie do pliku TEST. U¿yj :!dir lub :!ls , ¿eby to + zobaczyæ. Jeszcze go nie usuwaj! U¿yjemy go w nastêpnej lekcji. + +UWAGA: Wciœniêcie v zaczyna tryb Wizualny. Mo¿esz poruszaæ kursorem, by + zmieniæ rozmiary zaznaczenia. Mo¿esz te¿ u¿yæ operatora, by zrobiæ coœ + z tekstem. Na przyk³ad d usuwa tekst. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 5.4.: WSTAWIANIE I £¥CZENIE PLIKÓW + + + ** By wstawiæ zawartoœæ pliku, wpisz :r NAZWA_PLIKU ** + + 1. Umieœæ kursor tu¿ powy¿ej tej linii. + +UWAGA: Po wykonaniu kroku 2. zobaczysz tekst z Lekcji 5.3. Potem przejdŸ + do DO£U, by zobaczyæ ponownie tê lekcjê. + + 2. Teraz wczytaj plik TEST u¿ywaj¹c polecenia :r TEST , gdzie TEST + jest nazw¹ pliku. + Wczytany plik jest umieszczony poni¿ej linii z kursorem. + + 3. By sprawdziæ czy plik zosta³ wczytany, cofnij kursor i zobacz, ¿e + teraz s¹ dwie kopie Lekcji 5.3., orygina³ i kopia z pliku. + +UWAGA: Mo¿esz te¿ wczytaæ wyjœcie zewnêtrznego polecenia. Na przyk³ad + :r !ls wczytuje wyjœcie polecenia ls i umieszcza je pod poni¿ej + kursora. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 5. PODSUMOWANIE + + + 1. :!polecenie wykonuje polecenie zewnêtrzne. + + U¿ytecznymi przyk³adami s¹: + + :!dir - pokazuje spis plików w katalogu. + + :!rm NAZWA_PLIKU - usuwa plik NAZWA_PLIKU. + + 2. :w NAZWA_PLIKU zapisuje obecny plik Vima na dysk z nazw¹ NAZWA_PLIKU. + + 3. v ruch :w NAZWA_PLIKU zapisuje Wizualnie wybrane linie do NAZWA_PLIKU. + + 4. :r NAZWA_PLIKU wczytuje z dysku plik NAZWA_PLIKU i wstawia go do + bie¿¹cego pliku poni¿ej kursora. + + 5. :r !dir wczytuje wyjœcie polecenia dir i umieszcza je poni¿ej kursora. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 6.1.: POLECENIE OPEN (otwórz) + + + ** Wpisz o by otworzyæ liniê poni¿ej kursora i przenieœæ siê do + trybu Insert (wprowadzanie). ** + + 1. Przenieœ kursor do linii poni¿ej oznaczonej --->. + + 2. Wpisz o (ma³e), by otworzyæ liniê PONI¯EJ kursora i przenieœæ siê + do trybu Insert (wprowadzanie). + + 3. Wpisz trochê tekstu i wciœnij by wyjœæ z trybu Insert (wprowadzanie). + +---> Po wciœniêciu o kursor znajdzie siê w otwartej linii w trybie Insert. + + 4. By otworzyæ liniê POWY¯EJ kursora, wciœnij wielkie O zamiast ma³ego + o . Wypróbuj to na linii poni¿ej. + +---> Otwórz liniê powy¿ej wciskaj¹c SHIFT-O gdy kursor bêdzie na tej linii. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 6.2.: POLECENIE APPEND (dodaj) + + + ** Wpisz a by dodaæ tekst ZA kursorem. ** + + 1. Przenieœ kursor do pocz¹tku pierwszej linii poni¿ej oznaczonej ---> + + 2. Wciskaj e dopóki kursor nie bêdzie na koñcu li . + + 3. Wpisz a (ma³e), aby dodaæ tekst ZA znakiem pod kursorem. + + 4. Dokoñcz wyraz tak, jak w linii poni¿ej. Wciœnij aby opuœciæ tryb + Insert. + + 5. U¿yj e by przejœæ do kolejnego niedokoñczonego wyrazu i powtarzaj kroki + 3. i 4. + +---> Ta li poz Ci æwi dodaw teks do koñ lin +---> Ta linia pozwoli Ci æwiczyæ dodawanie tekstu do koñca linii. + +Uwaga: a , i oraz A prowadz¹ do trybu Insert, jedyn¹ ró¿nic¹ jest miejsce, + gdzie nowe znaki bêd¹ dodawane. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 6.3.: INNA WERSJA REPLACE (zamiana) + + + ** Wpisz wielkie R by zamieniæ wiêcej ni¿ jeden znak. ** + + 1. Przenieœ kursor do pierwszej linii poni¿ej oznaczonej --->. Przenieœ + kursor do pierwszego xxx . + + 2. Wciœnij R i wpisz numer poni¿ej w drugiej linii, tak, ¿e zast¹pi on + xxx. + + 3. Wciœnij by opuœciæ tryb Replace. Zauwa¿, ¿e reszta linii pozostaje + niezmieniona. + + 5. Powtarzaj kroki by wymieniæ wszystkie xxx. + +---> Dodanie 123 do xxx daje xxx. +---> Dodanie 123 do 456 daje 579. + +UWAGA: Tryb Replace jest jak tryb Insert, ale ka¿dy znak usuwa istniej¹cy + znak. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 6.4.: KOPIOWANIE I WKLEJANIE TEKSTU + + + ** u¿yj operatora y aby skopiowaæ tekst i p aby go wkleiæ ** + + 1. PrzejdŸ do linii oznaczonej ---> i umieœæ kursor za "a)". + + 2. WejdŸ w tryb Wizualny v i przenieœ kursor na pocz¹tek "pierwszy". + + 3. Wciœnij y aby kopiowaæ (yankowaæ) podœwietlony tekst. + + 4. Przenieœ kursor do koñca nastêpnej linii: j$ + + 5. Wciœnij p aby wkleiæ (wpakowaæ) tekst. Dodaj: a drugi . + + 6. U¿yj trybu Wizualnego, aby wybraæ " element.", yankuj go y , przejdŸ do + koñca nastêpnej linii j$ i upakuj tam tekst z p . + +---> a) to jest pierwszy element. + b) +Uwaga: mo¿esz u¿yæ y jako operatora; yw kopiuje jeden wyraz. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 6.5.: USTAWIANIE OPCJI + + +** Ustawianie opcji tak, by szukaj lub substytucja ignorowa³y wielkoœæ liter ** + + 1. Szukaj 'ignore' wpisuj¹c: /ignore + Powtórz szukanie kilka razy naciskaj¹c klawisz n . + + 2. Ustaw opcjê 'ic' (Ignore case -- ignoruj wielkoœæ liter) poprzez + wpisanie: :set ic + + 3. Teraz szukaj 'ignore' ponownie wciskaj¹c: n + Zauwa¿, ¿e Ignore i IGNORE tak¿e s¹ teraz znalezione. + + 4. Ustaw opcje 'hlsearch' i 'incsearch': :set hls is + + 5. Teraz wprowadŸ polecenie szukaj ponownie i zobacz co siê zdarzy: + /ignore + + 6. Aby wy³¹czyæ ignorowanie wielkoœci liter: :set noic + +Uwaga: Aby usun¹æ podœwietlanie dopasowañ, wpisz: :nohlsearch +Uwaga: Aby ignorowaæ wielkoœæ liter dla jednego wyszukiwania: /ignore\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 6. PODSUMOWANIE + + + 1. Wpisanie o otwiera liniê PONI¯EJ kursora. + Wpisanie O otwiera liniê POWY¯EJ kursora. + + 2. Wpisanie a wstawia tekst ZA znakiem, na którym jest kursor. + Wpisanie A dodaje tekst na koñcu linii. + + 3. Polecenie e przenosi do koñca wyrazu. + 4. Operator y yankuje (kopiuje) tekst, p pakuje (wkleja) go. + 5. Wpisanie wielkiego R wprowadza w tryb Replace (zamiana) dopóki + nie zostanie wciœniêty . + 6. Wpisanie ":set xxx" ustawia opcjê "xxx". Niektóre opcje: + 'ic' 'ignorecase' ignoruj wielkoœæ znaków + 'is' 'incsearch' poka¿ czêœciowe dopasowania + 'hls' 'hlsearch' podœwietl wszystkie dopasowania + Mo¿esz u¿yæ zarówno d³ugiej, jak i krótkiej formy. + 7. Dodaj "no", aby wy³¹czyæ opcjê: :set noic + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 7.1. JAK UZYSKAÆ POMOC? + + ** U¿ycie systemu pomocy on-line ** + + Vim posiada bardzo dobry system pomocy on-line. By zacz¹æ, spróbuj jednej + z trzech mo¿liwoœci: + - wciœnij klawisz (jeœli taki masz) + - wciœnij klawisz (jeœli taki masz) + - wpisz :help + + Przeczytaj tekst w oknie pomocy, aby dowiedzieæ siê jak dzia³a pomoc. + wpisz CTRL-W CTRL-W aby przeskoczyæ z jednego okna do innego + wpisz :q aby zamkn¹æ okno pomocy. + + Mo¿esz te¿ znaleŸæ pomoc na ka¿dy temat podaj¹c argument polecenia ":help". + Spróbuj tych (nie zapomnij wcisn¹æ ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 7.2. TWORZENIE SKRYPTU STARTOWEGO + + ** W³¹cz mo¿liwoœci Vima ** + + Vim ma o wiele wiêcej mo¿liwoœci ni¿ Vi, ale wiêkszoœæ z nich jest domyœlnie + wy³¹czona. Jeœli chcesz w³¹czyæ te mo¿liwoœci na starcie musisz utworzyæ + plik "vimrc". + + 1. Pocz¹tek edycji pliku "vimrc" zale¿y od Twojego systemu: + :edit ~/.vimrc dla Uniksa + :edit $VIM/_vimrc dla MS-Windows + 2. Teraz wczytaj przyk³adowy plik "vimrc": + :read $VIMRUNTIME/vimrc_example.vim + 3. Zapisz plik: + :w + + Nastêpnym razem, gdy zaczniesz pracê w Vimie bêdzie on u¿ywaæ podœwietlania + sk³adni. Mo¿esz dodaæ wszystkie swoje ulubione ustawienia do tego pliku + "vimrc". + Aby uzyskaæ wiêcej informacji, wpisz :help vimrc-intro + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 7.3.: UZUPE£NIANIE + + + ** Uzupe³nianie linii poleceñ z CTRL-D i ** + + 1. Upewnij siê, ¿e Vim nie jest w trybie kompatybilnoœci: :set nocp + + 2. Zerknij, jakie pliki s¹ w bie¿¹cym katalogu: :!ls lub :!dir + + 3. Wpisz pocz¹tek polecenia: :e + + 4. Wciœnij CTRL-D i Vim poka¿e listê poleceñ, jakie zaczynaj¹ siê na "e". + + 5. Wciœnij i Vim uzupe³ni polecenie do ":edit". + + 6. Dodaj spacjê i zacznij wpisywaæ nazwê istniej¹cego pliku: :edit FIL + + 7. Wciœnij . Vim uzupe³ni nazwê (jeœli jest niepowtarzalna). + +UWAGA: Uzupe³nianie dzia³a dla wielu poleceñ. Spróbuj wcisn¹æ CTRL-D i . + U¿yteczne zw³aszcza przy :help . +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 7. PODSUMOWANIE + + + 1. Wpisz :help albo wciœnij lub aby otworzyæ okno pomocy. + + 2. Wpisz :help cmd aby uzyskaæ pomoc o cmd . + + 3. Wpisz CTRL-W CTRL-W aby przeskoczyæ do innego okna. + + 4. Wpisz :q aby zamkn¹æ okno pomocy. + + 5. Utwórz plik startowy vimrc aby zachowaæ wybrane ustawienia. + + 6. Po poleceniu : , wciœnij CTRL-D aby zobaczyæ mo¿liwe uzupe³nienia. + Wciœnij aby u¿yæ jednego z nich. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Tutaj siê koñczy tutorial Vima. Zosta³ on pomyœlany tak, aby daæ krótki + przegl¹d jego mo¿liwoœci, wystarczaj¹cy byœ móg³ go u¿ywaæ. Jest on + daleki od kompletnoœci, poniewa¿ Vim ma o wiele, wiele wiêcej poleceñ. + + Dla dalszej nauki rekomendujemy ksi¹¿kê: + Vim - Vi Improved - autor Steve Oualline + Wydawca: New Riders + Pierwsza ksi¹¿ka ca³kowicie poœwiêcona Vimowi. U¿yteczna zw³aszcza dla + pocz¹tkuj¹cych. Zawiera wiele przyk³adów i ilustracji. + Zobacz http://iccf-holland.org./click5.html + + Starsza pozycja i bardziej o Vi ni¿ o Vimie, ale tak¿e warta + polecenia: + Learning the Vi Editor - autor Linda Lamb + Wydawca: O'Reilly & Associates Inc. + To dobra ksi¹¿ka, by dowiedzieæ siê niemal wszystkiego, co chcia³byœ zrobiæ + z Vi. Szósta edycja zawiera te¿ informacje o Vimie. + + Po polsku wydano: + Edytor vi. Leksykon kieszonkowy - autor Arnold Robbins + Wydawca: Helion 2001 (O'Reilly). + ISBN: 83-7197-472-8 + http://helion.pl/ksiazki/vilek.htm + Jest to ksi¹¿eczka zawieraj¹ca spis poleceñ vi i jego najwa¿niejszych + klonów (miêdzy innymi Vima). + + Edytor vi - autorzy Linda Lamb i Arnold Robbins + Wydawca: Helion 2001 (O'Reilly) - wg 6. ang. wydania + ISBN: 83-7197-539-2 + http://helion.pl/ksiazki/viedyt.htm + Rozszerzona wersja Learning the Vi Editor w polskim t³umaczeniu. + + Ten tutorial zosta³ napisany przez Michaela C. Pierce'a i Roberta K. Ware'a, + Colorado School of Mines korzystaj¹c z pomocy Charlesa Smitha, + Colorado State University. + E-mail: bware@mines.colorado.edu. + + Zmodyfikowane dla Vima przez Brama Moolenaara. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Przet³umaczone przez Miko³aja Machowskiego, + Sierpieñ 2001, + rev. Marzec 2002 + 2nd rev. Wrzesieñ 2004 + 3rd rev. Marzec 2006 + 4th rev. Grudzieñ 2008 + Wszelkie uwagi proszê kierowaæ na: mikmach@wp.pl diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.pl.utf-8 b/vim/bundle/ubuntu-vim72/tutor/tutor.pl.utf-8 new file mode 100644 index 0000000..3faaaa8 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.pl.utf-8 @@ -0,0 +1,995 @@ +=============================================================================== += W i t a j w t u t o r i a l u V I M - a - Wersja 1.7. = +=============================================================================== + + Vim to potężny edytor, który posiada wiele poleceÅ„, zbyt dużo, by + wyjaÅ›nić je wszystkie w tym tutorialu. Ten przewodnik ma nauczyć + CiÄ™ posÅ‚ugiwać siÄ™ wystarczajÄ…co wieloma komendami, byÅ› mógÅ‚ Å‚atwo + używać Vima jako edytora ogólnego przeznaczenia. + + Czas potrzebny na ukoÅ„czenie tutoriala to 25 do 30 minut i zależy + od tego jak wiele czasu spÄ™dzisz na eksperymentowaniu. + + UWAGA: + Polecenia wykonywane w czasie lekcji zmodyfikujÄ… tekst. Zrób + wczeÅ›niej kopiÄ™ tego pliku do ćwiczeÅ„ (jeÅ›li zaczÄ…Å‚eÅ› komendÄ… + "vimtutor", to już pracujesz na kopii). + + PamiÄ™taj, że przewodnik ten zostaÅ‚ zaprojektowany do nauki poprzez + ćwiczenia. Oznacza to, że musisz wykonywać polecenia, by nauczyć siÄ™ ich + prawidÅ‚owo. JeÅ›li bÄ™dziesz jedynie czytaÅ‚ tekst, szybko zapomnisz wiele + poleceÅ„! + + Teraz upewnij siÄ™, że nie masz wciÅ›niÄ™tego Caps Locka i wciskaj j + tak dÅ‚ugo dopóki Lekcja 1.1. nie wypeÅ‚ni caÅ‚kowicie ekranu. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 1.1.: PORUSZANIE SIĘ KURSOREM + + ** By wykonać ruch kursorem, wciÅ›nij h, j, k, l jak pokazano. ** + + ^ + k Wskazówka: h jest po lewej + < h l > l jest po prawej + j j wyglÄ…da jak strzaÅ‚ka w dół + v + 1. Poruszaj kursorem dopóki nie bÄ™dziesz pewien, że pamiÄ™tasz polecenia. + + 2. Trzymaj j tak dÅ‚ugo aż bÄ™dzie siÄ™ powtarzaÅ‚. + Teraz wiesz jak dojść do nastÄ™pnej lekcji. + + 3. UżywajÄ…c strzaÅ‚ki w dół przejdź do nastÄ™pnej lekcji. + +Uwaga: JeÅ›li nie jesteÅ› pewien czegoÅ› co wpisaÅ‚eÅ›, wciÅ›nij , by wrócić do + trybu Normal. Wtedy powtórz polecenie. + +Uwaga: Klawisze kursora także powinny dziaÅ‚ać, ale używajÄ…c hjkl bÄ™dziesz + w stanie poruszać siÄ™ o wiele szybciej, jak siÄ™ tylko przyzwyczaisz. + NaprawdÄ™! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 1.2.: WYCHODZENIE Z VIM-a + + !! UWAGA: Przed wykonaniem jakiegokolwiek polecenia przeczytaj całą lekcjÄ™ !! + + 1. WciÅ›nij (aby upewnić siÄ™, że jesteÅ› w trybie Normal). + 2. Wpisz: :q!. + To spowoduje wyjÅ›cie z edytora PORZUCAJÄ„C wszelkie zmiany, jakie + zdążyÅ‚eÅ› zrobić. JeÅ›li chcesz zapamiÄ™tać zmiany i wyjść, + wpisz: :wq + + 3. Kiedy widzisz znak zachÄ™ty powÅ‚oki wpisz komendÄ™, żeby wrócić + do tutoriala. Czyli: vimtutor + + 4. JeÅ›li chcesz zapamiÄ™tać polecenia, wykonaj kroki 1. do 3., aby + wyjść i wrócić do edytora. + +UWAGA: :q! porzuca wszelkie zmiany jakie zrobiÅ‚eÅ›. W nastÄ™pnych + lekcjach dowiesz siÄ™ jak je zapamiÄ™tywać. + + 5. PrzenieÅ› kursor do lekcji 1.3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 1.3.: EDYCJA TEKSTU - KASOWANIE + + ** WciÅ›nij x aby usunąć znak pod kursorem. ** + + 1. PrzenieÅ› kursor do linii poniżej oznaczonej --->. + + 2. By poprawić błędy, naprowadź kursor na znak do usuniÄ™cia. + + 3. WciÅ›nij x aby usunąć niechciany znak. + + 4. Powtarzaj kroki 2. do 4. dopóki zdanie nie jest poprawne. + +---> Kkrowa prrzeskoczyÅ‚a prrzez ksiiężycc. + + 5. Teraz, kiedy zdanie jest poprawione, przejdź do Lekcji 1.4. + +UWAGA: Ucz siÄ™ przez ćwiczenie, nie wkuwanie. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 1.4.: EDYCJA TEKSTU - INSERT (wprowadzanie) + + + ** WciÅ›nij i aby wstawić tekst. ** + + 1. PrzenieÅ› kursor do pierwszej linii poniżej oznaczonej --->. + + 2. Aby poprawić pierwszy wiersz, ustaw kursor na pierwszym znaku PO tym, + gdzie tekst ma być wstawiony. + + 3. WciÅ›nij i a nastÄ™pnie wpisz konieczne poprawki. + + 4. Po poprawieniu błędu wciÅ›nij , by wrócić do trybu Normal. + Powtarzaj kroki 2. do 4., aby poprawić caÅ‚e zdanie. + +---> W tej brkje trochÄ™ . +---> W tej linii brakuje trochÄ™ tekstu. + + 5. Kiedy czujesz siÄ™ swobodnie wstawiajÄ…c tekst, przejdź do + podsumowania poniżej. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 1.5.: EDYCJA TEKSTU - APPENDING (dodawanie) + + + ** WciÅ›nij A by dodać tekst. ** + + 1. PrzenieÅ› kursor do pierwszej linii poniżej oznaczonej --->. + Nie ma znaczenia, który to bÄ™dzie znak. + + 2. WciÅ›nij A i wpisz odpowiednie dodatki. + + 3. Kiedy tekst zostaÅ‚ dodany, wciÅ›nij i wróć do trybu Normalnego. + + 4. PrzenieÅ› kursor do drugiej linii oznaczonej ---> i powtórz kroki 2. i 3., + aby poprawić zdanie. + +---> Brakuje tu tro + Brakuje tu trochÄ™ tekstu. +---> Tu też trochÄ™ bra + Tu też trochÄ™ brakuje. + + 5. Kiedy już utrwaliÅ‚eÅ› ćwiczenie, przejdź do lekcji 1.6. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 1.6.: EDYCJA PLIKU + + ** Użyj :wq aby zapisać plik i wyjść. ** + + !! UWAGA: zanim wykonasz jakiekolwiek polecenia przeczytaj całą lekcjÄ™ !! + + 1. ZakoÅ„cz tutorial tak jak w lekcji 1.2.: :q! + lub, jeÅ›li masz dostÄ™p do innego terminala, wykonaj kolejne kroki tam. + + 2. W powÅ‚oce wydaj polecenie: vim tutor + "vim" jest poleceniem uruchamiajÄ…cym edytor Vim. 'tutor' to nazwa pliku, + jaki chcesz edytować. Użyj pliku, który może zostać zmieniony. + + 3. Dodaj i usuÅ„ tekst tak, jak siÄ™ nauczyÅ‚eÅ› w poprzednich lekcjach. + + 4. Zapisz plik ze zmianami i opuść Vima: :wq + + 5. JeÅ›li zakoÅ„czyÅ‚eÅ› vimtutor w kroku 1., uruchom go ponownie i przejdź + do podsumowania poniżej. + + 6. Po przeczytaniu wszystkich kroków i ich zrozumieniu: wykonaj je. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 1. PODSUMOWANIE + + 1. Poruszasz kursorem używajÄ…c "strzaÅ‚ek" i klawiszy hjkl . + h (w lewo) j (w dół) k (do góry) l (w prawo) + + 2. By wejść do Vima, (z powÅ‚oki) wpisz: + vim NAZWA_PLIKU + + 3. By wyjść z Vima, wpisz: + :q! by usunąć wszystkie zmiany. + LUB: :wq by zmiany zachować. + + 4. By usunąć znak pod kursorem, wciÅ›nij: x + + 5. By wstawić tekst przed kursorem lub dodać: + i wpisz tekst wstawi przed kursorem + A wpisz tekst doda na koÅ„cu linii + +UWAGA: WciÅ›niÄ™cie przeniesie CiÄ™ z powrotem do trybu Normal + lub odwoÅ‚a niechciane lub częściowo wprowadzone polecenia. + +Teraz możemy kontynuować i przejść do Lekcji 2. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 2.1.: POLECENIE DELETE (usuwanie) + + + ** Wpisz dw by usunąć wyraz. ** + + 1. WciÅ›nij , by upewnić siÄ™, że jesteÅ› w trybie Normal. + + 2. PrzenieÅ› kursor do linii poniżej oznaczonej --->. + + 3. PrzesuÅ„ kursor na poczÄ…tek wyrazu, który chcesz usunąć. + + 4. Wpisz dw by usunąć wyraz. + + UWAGA: Litera d pojawi siÄ™ na dole ekranu. Vim czeka na wpisanie w . + JeÅ›li zobaczysz inny znak, oznacza to, że wpisaÅ‚eÅ› coÅ› źle; wciÅ›nij + i zacznij od poczÄ…tku. + +---> Jest tu parÄ™ papier wyrazów, które kamieÅ„ nie należą do nożyce tego zdania. + + 5. Powtarzaj kroki 3. i 4. dopóki zdanie nie bÄ™dzie poprawne, potem + przejdź do Lekcji 2.2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 2.2.: WIĘCEJ POLECEŃ USUWAJÄ„CYCH + + + ** Wpisz d$ aby usunąć tekst do koÅ„ca linii. ** + + 1. WciÅ›nij aby siÄ™ upewnić, że jesteÅ› w trybie Normal. + + 2. PrzenieÅ› kursor do linii poniżej oznaczonej --->. + + 3. PrzenieÅ› kursor do koÅ„ca poprawnego zdania (PO pierwszej . ). + + 4. Wpisz d$ aby usunąć resztÄ™ linii. + +---> KtoÅ› wpisaÅ‚ koniec tego zdania dwukrotnie. zdania dwukrotnie. + + + 5. Przejdź do Lekcji 2.3., by zrozumieć co siÄ™ staÅ‚o. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 2.3.: O OPERATORACH I RUCHACH + + + Wiele poleceÅ„ zmieniajÄ…cych tekst jest zÅ‚ożonych z operatora i ruchu. + Format dla polecenia usuwajÄ…cego z operatorem d jest nastÄ™pujÄ…cy: + + d ruch + + gdzie: + d - operator usuwania. + ruch - na czym polecenie bÄ™dzie wykonywane (lista poniżej). + + Krótka lista ruchów: + w - do poczÄ…tku nastÄ™pnego wyrazu WYÅÄ„CZAJÄ„C pierwszy znak. + e - do koÅ„ca bieżącego wyrazu, WÅÄ„CZAJÄ„C ostatni znak. + $ - do koÅ„ca linii, WÅÄ„CZAJÄ„C ostatni znak. + +W ten sposób wpisanie de usunie znaki od kursora do koÅ„ca wyrazu. + +UWAGA: Wpisanie tylko ruchu w trybie Normal bez operatora przeniesie kursor + tak, jak to okreÅ›lono. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 2.4.: UÅ»YCIE MNOÅ»NIKA DLA RUCHU + + + ** Wpisanie liczby przed ruchem powtarza ruch odpowiedniÄ… ilość razy. ** + + 1. PrzenieÅ› kursor na poczÄ…tek linii poniżej zaznaczonej --->. + + 2. Wpisz 2w aby przenieść kursor o dwa wyrazy do przodu. + + 3. Wpisz 3e aby przenieść kursor do koÅ„ca trzeciego wyrazu w przód. + + 4. Wpisz 0 (zero), aby przenieść kursor na poczÄ…tek linii. + + 5. Powtórz kroki 2. i 3. z innymi liczbami. + + + ---> To jest zwykÅ‚y wiersz z wyrazami, po których możesz siÄ™ poruszać. + + 6. Przejdź do lekcji 2.5. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 2.5.: UÅ»YCIE MNOÅ»NIKA, BY WIĘCEJ USUNĄĆ + + + ** Wpisanie liczby z operatorem powtarza go odpowiedniÄ… ilość razy. ** + + W wyżej wspomnianej kombinacji operatora usuwania i ruchu podaj mnożnik + przed ruchem, by wiÄ™cej usunąć: + d liczba ruch + + 1. PrzenieÅ› kursor do pierwszego wyrazu KAPITALIKAMI w linii zaznaczonej --->. + + 2. Wpisz 2dw aby usunąć dwa wyrazy KAPITALIKAMI. + + 3. Powtarzaj kroki 1. i 2. z innymi mnożnikami, aby usunąć kolejne wyrazy + KAPITALIKAMI jednym poleceniem + +---> ta ASD WE linia QWE ASDF ZXCV FG wyrazów zostaÅ‚a ERT FGH CF oczyszczona. + +UWAGA: Mnożnik pomiÄ™dzy operatorem d i ruchem dziaÅ‚a podobnie do ruchu bez + operatora. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 2.6.: OPEROWANIE NA LINIACH + + + ** Wpisz dd aby usunąć całą liniÄ™. ** + + Z powodu czÄ™stoÅ›ci usuwania caÅ‚ych linii, projektanci Vi zdecydowali, że + bÄ™dzie Å‚atwiej wpisać dwa razy d aby usunąć liniÄ™. + + 1. PrzenieÅ› kursor do drugiego zdania z wierszyka poniżej. + 2. Wpisz dd aby usunąć wiersz. + 3. Teraz przenieÅ› siÄ™ do czwartego wiersza. + 4. Wpisz 2dd aby usunąć dwa wiersze. + +---> 1) Róże sÄ… czerwone, +---> 2) BÅ‚oto jest fajne, +---> 3) FioÅ‚ki sÄ… niebieskie, +---> 4) Mam samochód, +---> 5) Zegar podaje czas, +---> 6) Cukier jest sÅ‚odki, +---> 7) I ty też. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 2.7.: POLECENIE UNDO (cofnij) + + + ** WciÅ›nij u aby cofnąć skutki ostatniego polecenia. + U zaÅ›, by cofnąć skutki dla caÅ‚ej linii. ** + + 1. PrzenieÅ› kursor do zdania poniżej oznaczonego ---> i umieść go na + pierwszym błędzie. + 2. Wpisz x aby usunąć pierwszy niechciany znak. + 3. Teraz wciÅ›nij u aby cofnąć skutki ostatniego polecenia. + 4. Tym razem popraw wszystkie błędy w linii używajÄ…c polecenia x . + 5. Teraz wciÅ›nij wielkie U aby przywrócić liniÄ™ do oryginalnego stanu. + 6. Teraz wciÅ›nij u kilka razy, by cofnąć U i poprzednie polecenia. + 7. Teraz wpisz CTRL-R (trzymaj równoczeÅ›nie wciÅ›niÄ™te klawisze CTRL i R) + kilka razy, by cofnąć cofniÄ™cia. + +---> Poopraw błędyyy w teej liniii i zaamiieÅ„ je prrzez coofnij. + + 8. To sÄ… bardzo pożyteczne polecenia. + + Przejdź teraz do podsumowania Lekcji 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 2. PODSUMOWANIE + + + 1. By usunąć znaki od kursora do nastÄ™pnego wyrazu, wpisz: dw + 2. By usunąć znaki od kursora do koÅ„ca linii, wpisz: d$ + 3. By usunąć całą liniÄ™: dd + 4. By powtórzyć ruch, poprzedź go liczbÄ…: 2w + 5. Format polecenia zmiany to: + operator [liczba] ruch + gdzie: + operator - to, co trzeba zrobić (np. d dla usuwania) + [liczba] - opcjonalne, ile razy powtórzyć ruch + ruch - przenosi nad tekstem do operowania, takim jak w (wyraz), + $ (do koÅ„ca linii) etc. + + 6. By przejść do poczÄ…tku linii, użyj zera: 0 + 7. By cofnąć poprzednie polecenie, wpisz: u (maÅ‚e u) + By cofnąć wszystkie zmiany w linii, wpisz: U (wielkie U) + By cofnąć cofniÄ™cie, wpisz: CTRL-R + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 3.1.: POLECENIE PUT (wstaw) + + + ** Wpisz p by wstawić ostatnie usuniÄ™cia za kursorem. ** + + 1. PrzenieÅ› kursor do pierwszej linii ---> poniżej. + + 2. Wpisz dd aby usunąć liniÄ™ i przechować jÄ… w rejestrze Vima. + + 3. PrzenieÅ› kursor do linii c), POWYÅ»EJ tej, gdzie usuniÄ™ta linia powinna + siÄ™ znajdować. + + 4. WciÅ›nij p by wstawić liniÄ™ poniżej kursora. + + 5. Powtarzaj kroki 2. do 4. aż znajdÄ… siÄ™ w odpowiednim porzÄ…dku. + +---> d) Jak dwa anioÅ‚ki. +---> b) Na dole fioÅ‚ki, +---> c) A my siÄ™ kochamy, +---> a) Na górze róże, + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 3.2.: POLECENIE REPLACE (zastÄ…p) + + + ** Wpisz rx aby zastÄ…pić znak pod kursorem na x . ** + + 1. PrzenieÅ› kursor do pierwszej linii poniżej oznaczonej ---> + + 2. Ustaw kursor na pierwszym błędzie. + + 3. Wpisz r a potem znak jaki powinien go zastÄ…pić. + + 4. Powtarzaj kroki 2. i 3. dopóki pierwsza linia nie bÄ™dzie taka, jak druga. + +---> Kjedy ten wiersz biÅ‚ wstókiwany, ktoÅ› wciznÄ…Å‚ perÄ™ zÅ‚ych klawirzy! +---> Kiedy ten wiersz byÅ‚ wstukiwany, ktoÅ› wcisnÄ…Å‚ parÄ™ zÅ‚ych klawiszy! + + 5. Teraz czas na LekcjÄ™ 3.3. + + +UWAGA: PamiÄ™taj, by uczyć siÄ™ ćwiczÄ…c, a nie pamiÄ™ciowo. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 3.3.: OPERATOR CHANGE (zmieÅ„) + + ** By zmienić do koÅ„ca wyrazu, wpisz ce . ** + + 1. PrzenieÅ› kursor do pierwszej linii poniżej oznaczonej --->. + + 2. Umieść kursor na u w lunos. + + 3. Wpisz ce i popraw wyraz (w tym wypadku wstaw inia ). + + 4. WciÅ›nij i przejdź do nastÄ™pnej planowanej zmiany. + + 5. Powtarzaj kroki 3. i 4. dopóki pierwsze zdanie nie bÄ™dzie takie same, + jak drugie. + +---> Ta lunos ma pire słów, które tżina zbnic użifajonc pcmazu zmieÅ„. +---> Ta linia ma parÄ™ słów, które trzeba zmienić używajÄ…c polecenia zmieÅ„. + + Zauważ, że ce nie tylko zamienia wyraz, ale także zmienia tryb na + Insert (wprowadzanie). + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 3.4.: WIĘCEJ ZMIAN UÅ»YWAJÄ„C c + + + ** Polecenie change używa takich samych ruchów, jak delete. ** + + 1. Operator change dziaÅ‚a tak samo, jak delete. Format wyglÄ…da tak: + + c [liczba] ruch + + 2. Ruchy sÄ… także takie same, np.: w (wyraz), $ (koniec linii) etc. + + 3. PrzenieÅ› siÄ™ do pierwszej linii poniżej oznaczonej ---> + + 4. Ustaw kursor na pierwszym błędzie. + + 5. Wpisz c$ , popraw koniec wiersza i wciÅ›nij . + +---> Koniec tego wiersza musi być poprawiony, aby wyglÄ…daÅ‚ tak, jak drugi. +---> Koniec tego wiersza musi być poprawiony używajÄ…c polecenia c$ . + +UWAGA: Możesz używać aby poprawiać błędy w czasie pisania. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 3. PODSUMOWANIE + + + 1. Aby wstawić tekst, który zostaÅ‚ wczeÅ›niej usuniÄ™ty wciÅ›nij p . To + polecenie wstawia skasowany tekst PO kursorze (jeÅ›li caÅ‚a linia + zostaÅ‚a usuniÄ™ta, zostanie ona umieszczona w linii poniżej kursora). + + 2. By zamienić znak pod kursorem, wciÅ›nij r a potem znak, który ma zastÄ…pić + oryginalny. + + 3. Operator change pozwala Ci na zastÄ…pienie od kursora do miejsca, gdzie + zabraÅ‚by CiÄ™ ruch. Np. wpisz ce aby zamienić tekst od kursora do koÅ„ca + wyrazu, c$ aby zmienić tekst do koÅ„ca linii. + + 4. Format do polecenia change (zmieÅ„): + + c [liczba] obiekt + + Teraz przejdź do nastÄ™pnej lekcji. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 4.1.: POÅOÅ»ENIE KURSORA ORAZ STATUS PLIKU + + ** NaciÅ›nij CTRL-G aby zobaczyć swoje poÅ‚ożenie w pliku i status + pliku. NaciÅ›nij G aby przejść do linii w pliku. ** + + UWAGA: Przeczytaj całą lekcjÄ™ zanim wykonasz jakieÅ› polecenia!!! + + 1. Przytrzymaj klawisz CTRL i wciÅ›nij g . Używamy notacji CTRL-G. + Na dole strony pojawi siÄ™ pasek statusu z nazwÄ… pliku i pozycjÄ… w pliku. + ZapamiÄ™taj numer linii dla potrzeb kroku 3. + +UWAGA: Możesz też zobaczyć pozycjÄ™ kursora w prawym, dolnym rogu ekranu. + Dzieje siÄ™ tak kiedy ustawiona jest opcja 'ruler' (wiÄ™cej w lekcji 6.). + + 2. WciÅ›nij G aby przejść na koniec pliku. + WciÅ›nij gg aby przejść do poczÄ…tku pliku. + + 3. Wpisz numer linii, w której byÅ‚eÅ› a potem G . To przeniesie CiÄ™ + z powrotem do linii, w której byÅ‚eÅ› kiedy wcisnÄ…Å‚eÅ› CTRL-G. + + 4. JeÅ›li czujesz siÄ™ wystarczajÄ…co pewnie, wykonaj kroki 1-3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 4.2.: POLECENIE SZUKAJ + + + ** Wpisz / a nastÄ™pnie wyrażenie, aby je znaleźć. ** + + 1. W trybie Normal wpisz / . Zauważ, że znak ten oraz kursor pojawiÄ… + siÄ™ na dole ekranu tak samo, jak polecenie : . + + 2. Teraz wpisz bÅ‚ond . To jest sÅ‚owo, którego chcesz szukać. + + 3. By szukać tej samej frazy ponownie, po prostu wciÅ›nij n . + Aby szukać tej frazy w przeciwnym, kierunku wciÅ›nij N . + + 4. JeÅ›li chcesz szukać frazy do tyÅ‚u, użyj polecenia ? zamiast / . + + 5. Aby wrócić gdzie byÅ‚eÅ›, wciÅ›nij CTRL-O. Powtarzaj, by wrócić dalej. CTRL-I + idzie do przodu. + +Uwaga: 'bÅ‚ond' to nie jest metoda, by przeliterować błąd; 'bÅ‚ond' to błąd. +Uwaga: Kiedy szukanie osiÄ…gnie koniec pliku, bÄ™dzie kontynuowane od poczÄ…tku + o ile opcja 'wrapscan' nie zostaÅ‚a przestawiona. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 4.3.: W POSZUKIWANIU PARUJÄ„CYCH NAWIASÓW + + + ** Wpisz % by znaleźć parujÄ…cy ), ], lub } . ** + + 1. Umieść kursor na którymÅ› z (, [, lub { w linii poniżej oznaczonej --->. + + 2. Teraz wpisz znak % . + + 3. Kursor powinien siÄ™ znaleźć na parujÄ…cym nawiasie. + + 4. WciÅ›nij % aby przenieść kursor z powrotem do parujÄ…cego nawiasu. + + 5. PrzenieÅ› kursor do innego (,),[,],{ lub } i zobacz co robi % . + +---> To ( jest linia testowa z (, [, ] i {, } . )) + +Uwaga: Ta funkcja jest bardzo użyteczna w debuggowaniu programu + z niesparowanymi nawiasami! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 4.4.: POLECENIE SUBSTITUTE (zamiana) + + + ** Wpisz :s/stary/nowy/g aby zamienić 'stary' na 'nowy'. ** + + 1. PrzenieÅ› kursor do linii poniżej oznaczonej --->. + + 2. Wpisz :s/czaas/czas . Zauważ, że to polecenie zmienia + tylko pierwsze wystÄ…pienie 'czaas' w linii. + + 3. Teraz wpisz :s/czaas/czas/g . Dodane g oznacza zamianÄ™ (substytucjÄ™) + globalnie w caÅ‚ej linii. Zmienia wszystkie wystÄ…pienia 'czaas' w linii. + +---> Najlepszy czaas na zobaczenie najÅ‚adniejszych kwiatów to czaas wiosny. + + 4. Aby zmienić wszystkie wystÄ…pienia Å‚aÅ„cucha znaków pomiÄ™dzy dwoma liniami, + wpisz: :#,#s/stare/nowe/g gdzie #,# sÄ… numerami linii ograniczajÄ…cych + region, gdzie ma nastÄ…pić zamiana. + wpisz :%s/stare/nowe/g by zmienić wszystkie wystÄ…pienia w caÅ‚ym pliku. + wpisz :%s/stare/nowe/gc by zmienić wszystkie wystÄ…pienia w caÅ‚ym + pliku, proszÄ…c o potwierdzenie za każdym razem. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 4. PODSUMOWANIE + + 1. CTRL-G pokaże TwojÄ… pozycjÄ™ w pliku i status pliku. SHIFT-G przenosi + CiÄ™ do koÅ„ca pliku. + G przenosi do koÅ„ca pliku. + liczba G przenosi do linii [liczba]. + gg przenosi do pierwszej linii. + + 2. Wpisanie / a nastÄ™pnie Å‚aÅ„cucha znaków szuka Å‚aÅ„cucha DO PRZODU. + Wpisanie ? a nastÄ™pnie Å‚aÅ„cucha znaków szuka Å‚aÅ„cucha DO TYÅU. + Po wyszukiwaniu wciÅ›nij n by znaleźć nastÄ™pne wystÄ…pienie szukanej + frazy w tym samym kierunku lub N by szukać w kierunku przeciwnym. + CTRL-O przenosi do starszych pozycji, CTRL-I do nowszych. + + 3. Wpisanie % gdy kursor znajduje siÄ™ na (,),[,],{, lub } lokalizuje + parujÄ…cy znak. + + 4. By zamienić pierwszy stary na nowy w linii, wpisz :s/stary/nowy + By zamienić wszystkie stary na nowy w linii, wpisz :s/stary/nowy/g + By zamienić frazy pomiÄ™dzy dwoma liniami # wpisz :#,#s/stary/nowy/g + By zamienić wszystkie wystÄ…pienia w pliku, wpisz :%s/stary/nowy/g + By Vim prosiÅ‚ CiÄ™ o potwierdzenie, dodaj 'c' :%s/stary/nowy/gc +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 5.1.: JAK WYKONAĆ POLECENIA ZEWNĘTRZNE? + + + ** Wpisz :! a nastÄ™pnie zewnÄ™trzne polecenie, by je wykonać. ** + + 1. Wpisz znajome polecenie : by ustawić kursor na dole ekranu. To pozwala + na wprowadzenie komendy linii poleceÅ„. + + 2. Teraz wstaw ! (wykrzyknik). To umożliwi Ci wykonanie dowolnego + zewnÄ™trznego polecenia powÅ‚oki. + + 3. Jako przykÅ‚ad wpisz ls za ! a nastÄ™pnie wciÅ›nij . To polecenie + pokaże spis plików w Twoim katalogu, tak jakbyÅ› byÅ‚ przy znaku zachÄ™ty + powÅ‚oki. Możesz też użyć :!dir jeÅ›li ls nie dziaÅ‚a. + +Uwaga: W ten sposób można wykonać wszystkie polecenia powÅ‚oki. +Uwaga: Wszystkie polecenia : muszÄ… być zakoÅ„czone . + Od tego momentu nie zawsze bÄ™dziemy o tym wspominać. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 5.2.: WIĘCEJ O ZAPISYWANIU PLIKÓW + + + ** By zachować zmiany w tekÅ›cie, wpisz :w NAZWA_PLIKU . ** + + 1. Wpisz :!dir lub :!ls by zobaczyć spis plików w katalogu. + Już wiesz, że musisz po tym wcisnąć . + + 2. Wybierz nazwÄ™ pliku, jaka jeszcze nie istnieje, np. TEST. + + 3. Teraz wpisz: :w TEST (gdzie TEST jest nazwÄ… pliku jakÄ… wybraÅ‚eÅ›.) + + 4. To polecenie zapamiÄ™ta caÅ‚y plik (Vim Tutor) pod nazwÄ… TEST. + By to sprawdzić, wpisz :!dir lub :!ls żeby znowu zobaczyć listÄ™ plików. + +Uwaga: Zauważ, że gdybyÅ› teraz wyszedÅ‚ z Vima, a nastÄ™pnie wszedÅ‚ ponownie + poleceniem vim TEST , plik byÅ‚by dokÅ‚adnÄ… kopiÄ… tutoriala, kiedy go + zapisywaÅ‚eÅ›. + + 5. Teraz usuÅ„ plik wpisujÄ…c (MS-DOS): :!del TEST + lub (Unix): :!rm TEST + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 5.3.: WYBRANIE TEKSTU DO ZAPISU + + + ** By zachować część pliku, wpisz v ruch :w NAZWA_PLIKU ** + + 1. PrzenieÅ› kursor do tego wiersza. + + 2. WciÅ›nij v i przenieÅ› kursor do punktu 5. Zauważ, że tekst zostaÅ‚ + podÅ›wietlony. + + 3. WciÅ›nij znak : . Na dole ekranu pojawi siÄ™ :'<,'> . + + 4. Wpisz w TEST , gdzie TEST to nazwa pliku, który jeszcze nie istnieje. + Upewnij siÄ™, że widzisz :'<,'>w TEST zanim wciÅ›niesz Enter. + + 5. Vim zapisze wybrane linie do pliku TEST. Użyj :!dir lub :!ls , żeby to + zobaczyć. Jeszcze go nie usuwaj! Użyjemy go w nastÄ™pnej lekcji. + +UWAGA: WciÅ›niÄ™cie v zaczyna tryb Wizualny. Możesz poruszać kursorem, by + zmienić rozmiary zaznaczenia. Możesz też użyć operatora, by zrobić coÅ› + z tekstem. Na przykÅ‚ad d usuwa tekst. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 5.4.: WSTAWIANIE I ÅÄ„CZENIE PLIKÓW + + + ** By wstawić zawartość pliku, wpisz :r NAZWA_PLIKU ** + + 1. Umieść kursor tuż powyżej tej linii. + +UWAGA: Po wykonaniu kroku 2. zobaczysz tekst z Lekcji 5.3. Potem przejdź + do DOÅU, by zobaczyć ponownie tÄ™ lekcjÄ™. + + 2. Teraz wczytaj plik TEST używajÄ…c polecenia :r TEST , gdzie TEST + jest nazwÄ… pliku. + Wczytany plik jest umieszczony poniżej linii z kursorem. + + 3. By sprawdzić czy plik zostaÅ‚ wczytany, cofnij kursor i zobacz, że + teraz sÄ… dwie kopie Lekcji 5.3., oryginaÅ‚ i kopia z pliku. + +UWAGA: Możesz też wczytać wyjÅ›cie zewnÄ™trznego polecenia. Na przykÅ‚ad + :r !ls wczytuje wyjÅ›cie polecenia ls i umieszcza je pod poniżej + kursora. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 5. PODSUMOWANIE + + + 1. :!polecenie wykonuje polecenie zewnÄ™trzne. + + Użytecznymi przykÅ‚adami sÄ…: + + :!dir - pokazuje spis plików w katalogu. + + :!rm NAZWA_PLIKU - usuwa plik NAZWA_PLIKU. + + 2. :w NAZWA_PLIKU zapisuje obecny plik Vima na dysk z nazwÄ… NAZWA_PLIKU. + + 3. v ruch :w NAZWA_PLIKU zapisuje Wizualnie wybrane linie do NAZWA_PLIKU. + + 4. :r NAZWA_PLIKU wczytuje z dysku plik NAZWA_PLIKU i wstawia go do + bieżącego pliku poniżej kursora. + + 5. :r !dir wczytuje wyjÅ›cie polecenia dir i umieszcza je poniżej kursora. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 6.1.: POLECENIE OPEN (otwórz) + + + ** Wpisz o by otworzyć liniÄ™ poniżej kursora i przenieść siÄ™ do + trybu Insert (wprowadzanie). ** + + 1. PrzenieÅ› kursor do linii poniżej oznaczonej --->. + + 2. Wpisz o (maÅ‚e), by otworzyć liniÄ™ PONIÅ»EJ kursora i przenieść siÄ™ + do trybu Insert (wprowadzanie). + + 3. Wpisz trochÄ™ tekstu i wciÅ›nij by wyjść z trybu Insert (wprowadzanie). + +---> Po wciÅ›niÄ™ciu o kursor znajdzie siÄ™ w otwartej linii w trybie Insert. + + 4. By otworzyć liniÄ™ POWYÅ»EJ kursora, wciÅ›nij wielkie O zamiast maÅ‚ego + o . Wypróbuj to na linii poniżej. + +---> Otwórz liniÄ™ powyżej wciskajÄ…c SHIFT-O gdy kursor bÄ™dzie na tej linii. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 6.2.: POLECENIE APPEND (dodaj) + + + ** Wpisz a by dodać tekst ZA kursorem. ** + + 1. PrzenieÅ› kursor do poczÄ…tku pierwszej linii poniżej oznaczonej ---> + + 2. Wciskaj e dopóki kursor nie bÄ™dzie na koÅ„cu li . + + 3. Wpisz a (maÅ‚e), aby dodać tekst ZA znakiem pod kursorem. + + 4. DokoÅ„cz wyraz tak, jak w linii poniżej. WciÅ›nij aby opuÅ›cić tryb + Insert. + + 5. Użyj e by przejść do kolejnego niedokoÅ„czonego wyrazu i powtarzaj kroki + 3. i 4. + +---> Ta li poz Ci ćwi dodaw teks do koÅ„ lin +---> Ta linia pozwoli Ci ćwiczyć dodawanie tekstu do koÅ„ca linii. + +Uwaga: a , i oraz A prowadzÄ… do trybu Insert, jedynÄ… różnicÄ… jest miejsce, + gdzie nowe znaki bÄ™dÄ… dodawane. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 6.3.: INNA WERSJA REPLACE (zamiana) + + + ** Wpisz wielkie R by zamienić wiÄ™cej niż jeden znak. ** + + 1. PrzenieÅ› kursor do pierwszej linii poniżej oznaczonej --->. PrzenieÅ› + kursor do pierwszego xxx . + + 2. WciÅ›nij R i wpisz numer poniżej w drugiej linii, tak, że zastÄ…pi on + xxx. + + 3. WciÅ›nij by opuÅ›cić tryb Replace. Zauważ, że reszta linii pozostaje + niezmieniona. + + 5. Powtarzaj kroki by wymienić wszystkie xxx. + +---> Dodanie 123 do xxx daje xxx. +---> Dodanie 123 do 456 daje 579. + +UWAGA: Tryb Replace jest jak tryb Insert, ale każdy znak usuwa istniejÄ…cy + znak. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 6.4.: KOPIOWANIE I WKLEJANIE TEKSTU + + + ** użyj operatora y aby skopiować tekst i p aby go wkleić ** + + 1. Przejdź do linii oznaczonej ---> i umieść kursor za "a)". + + 2. Wejdź w tryb Wizualny v i przenieÅ› kursor na poczÄ…tek "pierwszy". + + 3. WciÅ›nij y aby kopiować (yankować) podÅ›wietlony tekst. + + 4. PrzenieÅ› kursor do koÅ„ca nastÄ™pnej linii: j$ + + 5. WciÅ›nij p aby wkleić (wpakować) tekst. Dodaj: a drugi . + + 6. Użyj trybu Wizualnego, aby wybrać " element.", yankuj go y , przejdź do + koÅ„ca nastÄ™pnej linii j$ i upakuj tam tekst z p . + +---> a) to jest pierwszy element. + b) +Uwaga: możesz użyć y jako operatora; yw kopiuje jeden wyraz. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 6.5.: USTAWIANIE OPCJI + + +** Ustawianie opcji tak, by szukaj lub substytucja ignorowaÅ‚y wielkość liter ** + + 1. Szukaj 'ignore' wpisujÄ…c: /ignore + Powtórz szukanie kilka razy naciskajÄ…c klawisz n . + + 2. Ustaw opcjÄ™ 'ic' (Ignore case -- ignoruj wielkość liter) poprzez + wpisanie: :set ic + + 3. Teraz szukaj 'ignore' ponownie wciskajÄ…c: n + Zauważ, że Ignore i IGNORE także sÄ… teraz znalezione. + + 4. Ustaw opcje 'hlsearch' i 'incsearch': :set hls is + + 5. Teraz wprowadź polecenie szukaj ponownie i zobacz co siÄ™ zdarzy: + /ignore + + 6. Aby wyłączyć ignorowanie wielkoÅ›ci liter: :set noic + +Uwaga: Aby usunąć podÅ›wietlanie dopasowaÅ„, wpisz: :nohlsearch +Uwaga: Aby ignorować wielkość liter dla jednego wyszukiwania: /ignore\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 6. PODSUMOWANIE + + + 1. Wpisanie o otwiera liniÄ™ PONIÅ»EJ kursora. + Wpisanie O otwiera liniÄ™ POWYÅ»EJ kursora. + + 2. Wpisanie a wstawia tekst ZA znakiem, na którym jest kursor. + Wpisanie A dodaje tekst na koÅ„cu linii. + + 3. Polecenie e przenosi do koÅ„ca wyrazu. + 4. Operator y yankuje (kopiuje) tekst, p pakuje (wkleja) go. + 5. Wpisanie wielkiego R wprowadza w tryb Replace (zamiana) dopóki + nie zostanie wciÅ›niÄ™ty . + 6. Wpisanie ":set xxx" ustawia opcjÄ™ "xxx". Niektóre opcje: + 'ic' 'ignorecase' ignoruj wielkość znaków + 'is' 'incsearch' pokaż częściowe dopasowania + 'hls' 'hlsearch' podÅ›wietl wszystkie dopasowania + Możesz użyć zarówno dÅ‚ugiej, jak i krótkiej formy. + 7. Dodaj "no", aby wyłączyć opcjÄ™: :set noic + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 7.1. JAK UZYSKAĆ POMOC? + + ** Użycie systemu pomocy on-line ** + + Vim posiada bardzo dobry system pomocy on-line. By zacząć, spróbuj jednej + z trzech możliwoÅ›ci: + - wciÅ›nij klawisz (jeÅ›li taki masz) + - wciÅ›nij klawisz (jeÅ›li taki masz) + - wpisz :help + + Przeczytaj tekst w oknie pomocy, aby dowiedzieć siÄ™ jak dziaÅ‚a pomoc. + wpisz CTRL-W CTRL-W aby przeskoczyć z jednego okna do innego + wpisz :q aby zamknąć okno pomocy. + + Możesz też znaleźć pomoc na każdy temat podajÄ…c argument polecenia ":help". + Spróbuj tych (nie zapomnij wcisnąć ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCJA 7.2. TWORZENIE SKRYPTU STARTOWEGO + + ** Włącz możliwoÅ›ci Vima ** + + Vim ma o wiele wiÄ™cej możliwoÅ›ci niż Vi, ale wiÄ™kszość z nich jest domyÅ›lnie + wyłączona. JeÅ›li chcesz włączyć te możliwoÅ›ci na starcie musisz utworzyć + plik "vimrc". + + 1. PoczÄ…tek edycji pliku "vimrc" zależy od Twojego systemu: + :edit ~/.vimrc dla Uniksa + :edit $VIM/_vimrc dla MS-Windows + 2. Teraz wczytaj przykÅ‚adowy plik "vimrc": + :read $VIMRUNTIME/vimrc_example.vim + 3. Zapisz plik: + :w + + NastÄ™pnym razem, gdy zaczniesz pracÄ™ w Vimie bÄ™dzie on używać podÅ›wietlania + skÅ‚adni. Możesz dodać wszystkie swoje ulubione ustawienia do tego pliku + "vimrc". + Aby uzyskać wiÄ™cej informacji, wpisz :help vimrc-intro + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 7.3.: UZUPEÅNIANIE + + + ** UzupeÅ‚nianie linii poleceÅ„ z CTRL-D i ** + + 1. Upewnij siÄ™, że Vim nie jest w trybie kompatybilnoÅ›ci: :set nocp + + 2. Zerknij, jakie pliki sÄ… w bieżącym katalogu: :!ls lub :!dir + + 3. Wpisz poczÄ…tek polecenia: :e + + 4. WciÅ›nij CTRL-D i Vim pokaże listÄ™ poleceÅ„, jakie zaczynajÄ… siÄ™ na "e". + + 5. WciÅ›nij i Vim uzupeÅ‚ni polecenie do ":edit". + + 6. Dodaj spacjÄ™ i zacznij wpisywać nazwÄ™ istniejÄ…cego pliku: :edit FIL + + 7. WciÅ›nij . Vim uzupeÅ‚ni nazwÄ™ (jeÅ›li jest niepowtarzalna). + +UWAGA: UzupeÅ‚nianie dziaÅ‚a dla wielu poleceÅ„. Spróbuj wcisnąć CTRL-D i . + Użyteczne zwÅ‚aszcza przy :help . +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcja 7. PODSUMOWANIE + + + 1. Wpisz :help albo wciÅ›nij lub aby otworzyć okno pomocy. + + 2. Wpisz :help cmd aby uzyskać pomoc o cmd . + + 3. Wpisz CTRL-W CTRL-W aby przeskoczyć do innego okna. + + 4. Wpisz :q aby zamknąć okno pomocy. + + 5. Utwórz plik startowy vimrc aby zachować wybrane ustawienia. + + 6. Po poleceniu : , wciÅ›nij CTRL-D aby zobaczyć możliwe uzupeÅ‚nienia. + WciÅ›nij aby użyć jednego z nich. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Tutaj siÄ™ koÅ„czy tutorial Vima. ZostaÅ‚ on pomyÅ›lany tak, aby dać krótki + przeglÄ…d jego możliwoÅ›ci, wystarczajÄ…cy byÅ› mógÅ‚ go używać. Jest on + daleki od kompletnoÅ›ci, ponieważ Vim ma o wiele, wiele wiÄ™cej poleceÅ„. + + Dla dalszej nauki rekomendujemy książkÄ™: + Vim - Vi Improved - autor Steve Oualline + Wydawca: New Riders + Pierwsza książka caÅ‚kowicie poÅ›wiÄ™cona Vimowi. Użyteczna zwÅ‚aszcza dla + poczÄ…tkujÄ…cych. Zawiera wiele przykÅ‚adów i ilustracji. + Zobacz http://iccf-holland.org./click5.html + + Starsza pozycja i bardziej o Vi niż o Vimie, ale także warta + polecenia: + Learning the Vi Editor - autor Linda Lamb + Wydawca: O'Reilly & Associates Inc. + To dobra książka, by dowiedzieć siÄ™ niemal wszystkiego, co chciaÅ‚byÅ› zrobić + z Vi. Szósta edycja zawiera też informacje o Vimie. + + Po polsku wydano: + Edytor vi. Leksykon kieszonkowy - autor Arnold Robbins + Wydawca: Helion 2001 (O'Reilly). + ISBN: 83-7197-472-8 + http://helion.pl/ksiazki/vilek.htm + Jest to książeczka zawierajÄ…ca spis poleceÅ„ vi i jego najważniejszych + klonów (miÄ™dzy innymi Vima). + + Edytor vi - autorzy Linda Lamb i Arnold Robbins + Wydawca: Helion 2001 (O'Reilly) - wg 6. ang. wydania + ISBN: 83-7197-539-2 + http://helion.pl/ksiazki/viedyt.htm + Rozszerzona wersja Learning the Vi Editor w polskim tÅ‚umaczeniu. + + Ten tutorial zostaÅ‚ napisany przez Michaela C. Pierce'a i Roberta K. Ware'a, + Colorado School of Mines korzystajÄ…c z pomocy Charlesa Smitha, + Colorado State University. + E-mail: bware@mines.colorado.edu. + + Zmodyfikowane dla Vima przez Brama Moolenaara. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + PrzetÅ‚umaczone przez MikoÅ‚aja Machowskiego, + SierpieÅ„ 2001, + rev. Marzec 2002 + 2nd rev. WrzesieÅ„ 2004 + 3rd rev. Marzec 2006 + 4th rev. GrudzieÅ„ 2008 + Wszelkie uwagi proszÄ™ kierować na: mikmach@wp.pl diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.ru b/vim/bundle/ubuntu-vim72/tutor/tutor.ru new file mode 100644 index 0000000..6fd74cf --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.ru @@ -0,0 +1,834 @@ +=============================================================================== += ä Ï Â Ò Ï Ð Ï Ö Á Ì Ï × Á Ô Ø × Õ Þ Å Â Î É Ë VIM - ÷ÅÒÓÉÑ 1.5 = +=============================================================================== + Vim --- ÜÔÏ ÏÞÅÎØ ÍÏÝÎÙÊ ÒÅÄÁËÔÏÒ, ÉÍÅÀÝÉÊ ÍÎÏÖÅÓÔ×Ï ËÏÍÁÎÄ, ÓÌÉÛËÏÍ + ÍÎÏÇÏ ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÉÈ ×ÓÅ ÍÏÖÎÏ ÂÙÌÏ ÏÐÉÓÁÔØ × ÔÁËÏÍ ÕÞÅÂÎÉËÅ, ËÁË + ÜÔÏÔ. üÔÏÔ ÕÞÅÂÎÉË ÐÒÉÚ×ÁÎ ÏÂßÑÓÎÉÔØ ÄÏÓÔÁÔÏÞÎÏÅ ÞÉÓÌÏ ËÏÍÁÎÄ ÄÌÑ ÔÏÇÏ, + ÞÔÏÂÙ ÷Ù ÍÏÇÌÉ Ó ÌÅÇËÏÓÔØÀ ÉÓÐÏÌØÚÏ×ÁÔØ Vim × ËÁÞÅÓÔ×Å ÒÅÄÁËÔÏÒÁ ÏÂÝÅÇÏ + ÎÁÚÎÁÞÅÎÉÑ. + + ÷ÁÍ ÐÏÔÒÅÂÕÅÔÓÑ ÐÒÉÂÌÉÚÉÔÅÌØÎÏ 25-30 ÍÉÎÕÔ ÎÁ ÏÓ×ÏÅÎÉÅ ÄÁÎÎÏÇÏ ÕÞÅÂÎÉËÁ × + ÚÁ×ÉÓÉÍÏÓÔÉ ÏÔ ÔÏÇÏ, ÓËÏÌØËÏ ×ÒÅÍÅÎÉ ÷Ù ÐÏÔÒÁÔÉÔÅ ÎÁ ÜËÓÐÅÒÉÍÅÎÔÙ. + + ëÏÍÁÎÄÙ × ÕÒÏËÁÈ ÂÕÄÕÔ ÍÏÄÉÆÉÃÉÒÏ×ÁÔØ ÔÅËÓÔ. óÏÚÄÁÊÔÅ ËÏÐÉÀ ÜÔÏÇÏ ÆÁÊÌÁ, + ÞÔÏÂÙ ÐÏÐÒÁËÔÉËÏ×ÁÔØÓÑ ÎÁ ÎÅÊ (ÅÓÌÉ ÷Ù ÚÁÐÕÓÔÉÌÉ "vimtutor", ÔÏ ÜÔÏ ÕÖÅ + ËÏÐÉÑ). + + ÷ÁÖÎÏ ÐÏÍÎÉÔØ, ÞÔÏ ÜÔÏÔ ÕÞÅÂÎÉË ÐÒÅÄÎÁÚÎÁÞÅÎ ÄÌÑ ÏÂÕÞÅÎÉÑ × ÐÒÏÃÅÓÓÅ + ÉÓÐÏÌØÚÏ×ÁÎÉÑ. üÔÏ ÏÚÎÁÞÁÅÔ, ÞÔÏ ÷Ù ÄÏÌÖÎÙ ÚÁÐÕÓËÁÔØ ËÏÍÁÎÄÙ ÄÌÑ ÔÏÇÏ, + ÞÔÏÂÙ ËÁË ÓÌÅÄÕÅÔ ÉÈ ÉÚÕÞÉÔØ. åÓÌÉ ÷Ù ÐÒÏÓÔÏ ÐÒÏÞÉÔÁÅÔÅ ÔÅËÓÔ, ÔÏ + ÚÁÂÕÄÅÔÅ ËÏÍÁÎÄÙ! + + ôÅÐÅÒØ ÕÂÅÄÉÔÅÓØ × ÔÏÍ, ÞÔÏ ËÌÁ×ÉÛÁ CapsLock ÎÅ ×ËÌÀÞÅÎÁ É ÎÁÖÍÉÔÅ + ËÌÁ×ÉÛÕ j ÎÅÓËÏÌØËÏ ÒÁÚ, ÔÁË, ÞÔÏÂÙ õÒÏË 1.1 ÐÏÌÎÏÓÔØÀ ÐÏÍÅÓÔÉÌÓÑ ÎÁ + ÜËÒÁÎÅ. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 1.1: ðåòåíåýåîéå ëõòóïòá + +** äÌÑ ÐÅÒÅÍÅÝÅÎÉÑ ËÕÒÓÏÒÁ ÎÁÖÍÉÔÅ ËÌÁ×ÉÛÉ h,j,k,l ÔÁË, ËÁË ÐÏËÁÚÁÎÏ ÎÉÖÅ. ** + ^ + k óÏ×ÅÔÙ: ëÌÁ×ÉÛÁ h ÎÁÈÏÄÉÔÓÑ ÓÌÅ×Á É ÐÅÒÅÍÅÝÁÅÔ ×ÌÅ×Ï. + < h l > ëÌÁ×ÉÛÁ l ÎÁÈÏÄÉÔÓÑ ÓÐÒÁ×Á É ÐÅÒÅÍÅÝÁÅÔ ×ÐÒÁ×Ï. + j ëÌÁ×ÉÛÁ j ÐÏÈÏÖÁ ÎÁ ÓÔÒÅÌËÕ `×ÎÉÚ'. + v + 1. ðÏÄ×ÉÇÁÊÔÅ ËÕÒÓÏÒ ÐÏ ÜËÒÁÎÕ, ÐÏËÁ ÎÅ ÐÏÞÕ×ÓÔ×ÕÅÔÅ ÓÅÂÑ Õ×ÅÒÅÎÎÏ. + + 2. îÁÄÁ×ÉÔÅ ËÌÁ×ÉÛÕ `×ÎÉÚ' (j) ÐÏËÁ ÏÎÁ ÎÅ ÎÁÞÎÅÔ ÐÏ×ÔÏÒÑÔØÓÑ. +---> ôÅÐÅÒØ ÷Ù ÚÎÁÅÔÅ, ËÁË ÐÅÒÅÊÔÉ Ë ÓÌÅÄÕÀÝÅÍÕ ÕÒÏËÕ. + + 3. éÓÐÏÌØÚÕÑ ËÌÁ×ÉÛÕ `×ÎÉÚ' ÐÅÒÅÊÄÉÔÅ Ë õÒÏËÕ 1.2. + +úÁÍÅÞÁÎÉÅ: åÓÌÉ ×Ù ÐÏËÁ ÎÅ Õ×ÅÒÅÎÙ × ÔÏÍ, ÞÔÏ ÎÁÂÉÒÁÅÔÅ, ÎÁÖÍÉÔÅ ÄÌÑ + ÐÅÒÅÈÏÄÁ × ÏÂÙÞÎÙÊ ÒÅÖÉÍ (Normal mode). ðÏÓÌÅ ÜÔÏÇÏ ÐÅÒÅÎÁÂÅÒÉÔÅ + ÔÒÅÂÕÅÍÕÀ ËÏÍÁÎÄÕ. + +úÁÍÅÞÁÎÉÅ: ïÂÙÞÎÙÅ ËÌÁ×ÉÛÉ ÕÐÒÁ×ÌÅÎÉÑ ËÕÒÓÏÒÏÍ (ÓÔÒÅÌËÉ) ÔÁËÖÅ ÄÏÌÖÎÙ + ÒÁÂÏÔÁÔØ. ïÄÎÁËÏ, ËÌÁ×ÉÛÉ hjkl ÐÏÚ×ÏÌÑÔ ÷ÁÍ ÐÅÒÅÍÅÝÁÔØÓÑ + ÚÎÁÞÉÔÅÌØÎÏ ÂÙÓÔÒÅÅ, ËÁË ÔÏÌØËÏ ÷Ù ÎÁÕÞÉÔÅÓØ ÉÍÉ ÐÏÌØÚÏ×ÁÔØÓÑ. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 1.2: úáðõóë é úá÷åòûåîéå òáâïôù ó VIM + +!! ÷îéíáîéå! ðÒÅÖÄÅ, ÞÅÍ ×ÙÐÏÌÎÑÔØ ÌÀÂÏÊ ÉÚ ÏÐÉÓÁÎÎÙÈ ÎÉÖÅ ÛÁÇÏ×, ÐÒÏÞÔÉÔÅ + ÕÒÏË ÃÅÌÉËÏÍ !! + + 1. îÁÖÍÉÔÅ ËÌÁ×ÉÛÕ (ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÕÄÏÓÔÏ×ÅÒÉÔØÓÑ, ÞÔÏ ÷Ù × ÏÂÙÞÎÏÍ + ÒÅÖÉÍÅ (Normal mode)). + + 2. îÁÂÅÒÉÔÅ: :q! . + +---> üÔÏ ÐÏÚ×ÏÌÉÔ ÷ÁÍ ×ÙÊÔÉ ÉÚ ÒÅÄÁËÔÏÒÁ âåú óïèòáîåîéñ ÌÀÂÙÈ ÓÄÅÌÁÎÎÙÈ + ÉÚÍÅÎÅÎÉÊ. åÓÌÉ ÷Ù ÈÏÔÉÔÅ ÓÏÈÒÁÎÉÔØ ÉÚÍÅÎÅÎÉÑ É ×ÙÊÔÉ: + :wq + + 3. ëÏÇÄÁ ÷Ù Õ×ÉÄÉÔÅ ÐÒÉÇÌÁÛÅÎÉÅ ËÏÍÁÎÄÎÏÊ ÏÂÏÌÏÞËÉ, ÎÁÂÅÒÉÔÅ ËÏÍÁÎÄÕ, + ËÏÔÏÒÁÑ ÐÒÉ×ÅÌÁ ÷ÁÓ × ÜÔÏÔ ÕÞÅÂÎÉË. üÔÏ ÍÏÖÅÔ ÂÙÔØ + vimtutor ru + ïÂÙÞÎÏ ÍÏÖÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ: vim tutor.ru + +---> 'vim' ÐÏÚ×ÏÌÑÅÔ ÚÁÐÕÓÔÉÔØ ÒÅÄÁËÔÏÒ vim, 'tutor.ru' --- ÜÔÏ ÆÁÊÌ, ËÏÔÏÒÙÊ + ÷Ù ÂÕÄÅÔÅ ÒÅÄÁËÔÉÒÏ×ÁÔØ. + + 4. åÓÌÉ ÷Ù Õ×ÅÒÅÎÙ × ÔÏÍ, ÞÔÏ ÚÁÐÏÍÎÉÌÉ ÜÔÉ ÛÁÇÉ, ×ÙÐÏÌÎÉÔÅ ÛÁÇÉ ÏÔ 1 ÄÏ 3 + ÞÔÏÂÙ ×ÙÊÔÉ ÓÎÏ×Á ÚÁÐÕÓÔÉÔØ ÒÅÄÁËÔÏÒ. úÁÔÅÍ ÐÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ×ÎÉÚ Ë + õÒÏËÕ 1.3. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 1.3: òåäáëôéòï÷áîéå ôåëóôá - õäáìåîéå + + +** îÁÈÏÄÑÓØ × ÏÂÙÞÎÏÍ ÒÅÖÉÍÅ ÎÁÖÍÉÔÅ x, ÞÔÏÂÙ ÕÄÁÌÉÔØ ÓÉÍ×ÏÌ ÐÏÄ ËÕÒÓÏÒÏÍ. ** + + 1. ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ Ë ÓÔÒÏËÅ ×ÎÉÚÕ, ÐÏÍÅÞÅÎÎÏÊ --->. + + 2. äÌÑ ÉÓÐÒÁ×ÌÅÎÉÑ ÏÛÉÂÏË, ÐÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ, ÐÏËÁ ÏÎ ÎÅ ÏËÁÖÅÔÓÑ ÎÁÄ + ÕÄÁÌÑÅÍÙÍ ÓÉÍ×ÏÌÏÍ. + + 3. îÁÖÍÉÔÅ ËÌÁ×ÉÛÕ x ÄÌÑ ÕÄÁÌÅÎÉÑ ÔÒÅÂÕÅÍÏÇÏ ÓÉÍ×ÏÌÁ. + + 4. ðÏ×ÔÏÒÉÔÅ ÛÁÇÉ 2--4 ÐÏËÁ ÓÔÒÏËÁ ÎÅ ÂÕÄÅÔ ÉÓÐÒÁ×ÌÅÎÁ. + +---> ïÔ ÔÔÔÏÐÏÔÁ ËÏÐÙÔÔ ÐÐÐÙÌØ ÐÐÏ ÐÐÐÏÌÀ ÌÅÔÔÉÔÔ. + + 5. ôÅÐÅÒØ, ËÏÇÄÁ ÓÔÒÏËÁ ÏÔËÏÒÒÅËÔÉÒÏ×ÁÎÁ, ÐÅÒÅÈÏÄÉÔÅ Ë ÕÒÏËÕ 1.4. + +úáíåþáîéå: ÷ ÈÏÄÅ ÏÓ×ÏÅÎÉÑ ÜÔÏÇÏ ÕÞÅÂÎÉËÁ ÎÅ ÐÙÔÁÊÔÅÓØ ÚÁÐÏÍÉÎÁÔØ, ÕÞÉÔÅ + × ÐÒÏÃÅÓÓÅ ÉÓÐÏÌØÚÏ×ÁÎÉÑ. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 1.4: òåäáëôéòï÷áîéå ôåëóôá - ÷óôá÷ëá + + + ** îÁÈÏÄÑÓØ × ÏÂÙÞÎÏÍ ÒÅÖÉÍÅ (Normal mode), ÎÁÖÍÉÔÅ i ÄÌÑ ×ÓÔÁ×ËÉ ÔÅËÓÔÁ. ** + + 1. ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ Ë ÐÅÒ×ÏÊ ÓÔÒÏËÅ ×ÎÉÚÕ, ÐÏÍÅÞÅÎÎÏÊ --->. + + 2. äÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÓÄÅÌÁÔØ ÐÅÒ×ÕÀ ÓÔÒÏËÕ ÉÄÅÎÔÉÞÎÏÊ ×ÔÏÒÏÊ, ÐÏÍÅÓÔÉÔÅ + ËÕÒÓÏÒ ÎÁ ÓÉÍ×ÏÌ ðåòåä ËÏÔÏÒÙÍ ÓÌÅÄÕÅÔ ×ÓÔÁ×ÉÔØ ÔÅËÓÔ. + + 3. îÁÖÍÉÔÅ i É ÎÁÂÅÒÉÔÅ ÔÒÅÂÕÅÍÙÅ ÄÏÂÁ×ÌÅÎÉÑ. + + 4. ðÏÓÌÅ ÉÓÐÒÁ×ÌÅÎÉÑ ×ÓÅÈ ÏÛÉÂÏË ÎÁÖÍÉÔÅ ÄÌÑ ×ÏÚ×ÒÁÔÁ × ÏÂÙÞÎÙÊ ÒÅÖÉÍ. + ðÏ×ÔÏÒÉÔÅ ÛÁÇÉ 2--4, ÐÏËÁ ÆÒÁÚÁ ÎÅ ÂÕÄÅÔ ÉÓÐÒÁ×ÌÅÎÁ ÐÏÌÎÏÓÔØÀ. + +---> þÁÓÔØ ÔÅËÓÔÁ × ÓÔÒÏËÅ ÂÅÓÌÅÄÎÏ . +---> þÁÓÔØ ÔÅËÓÔÁ × ÜÔÏÊ ÓÔÒÏËÅ ÂÅÓÓÌÅÄÎÏ ÐÒÏÐÁÌÁ. + + 5. ëÏÇÄÁ ÏÓ×ÏÉÔÅ ×ÓÔÁ×ËÕ ÔÅËÓÔÁ, ÐÅÒÅÈÏÄÉÔÅ ÄÁÌØÛÅ Ë òÅÚÀÍÅ. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + òåúàíå õòïëá 1 + + 1. ëÕÒÓÏÒ ÐÅÒÅÍÅÝÁÅÔÓÑ ÌÉÂÏ ËÌÁ×ÉÛÁÍÉ ÓÏ ÓÔÒÅÌËÁÍÉ, ÌÉÂÏ ËÌÁ×ÉÛÁÍÉ hjkl. + h (×ÌÅ×Ï) j (×ÎÉÚ) k (××ÅÒÈ) l (×ÐÒÁ×Ï) + + 2. äÌÑ ÚÁÐÕÓËÁ Vim (ÉÚ ÐÒÉÇÌÁÛÅÎÉÑ % ËÏÍÁÎÄÎÏÊ ÏÂÏÌÏÞËÉ) ÎÁÂÅÒÉÔÅ: + vim éíñ_æáêìá + + 3. äÌÑ ÚÁ×ÅÒÛÅÎÉÑ ÒÁÂÏÔÙ Ó Vim ÎÁÂÅÒÉÔÅ: + :q! ÞÔÏÂÙ ÏÔËÁÚÁÔØÓÑ ÏÔ ÓÏÈÒÁÎÅÎÉÑ ÉÚÍÅÎÅÎÉÊ. + éÌÉ ÎÁÂÅÒÉÔÅ: + :wq ÞÔÏÂÙ ÓÏÈÒÁÎÉÔØ ÉÚÍÅÎÅÎÉÑ. + + 4. äÌÑ ÕÄÁÌÅÎÉÑ ÓÉÍ×ÏÌÁ ÐÏÄ ËÕÒÓÏÒÏÍ × ÏÂÙÞÎÏÍ ÒÅÖÉÍÅ, ÎÁÂÅÒÉÔÅ: x + + 5. þÔÏÂÙ ×ÓÔÁ×ÉÔØ ÔÅËÓÔ ÐÅÒÅÄ ËÕÒÓÏÒÏÍ × ÏÂÙÞÎÏÍ ÒÅÖÉÍÅ, ÎÁÂÅÒÉÔÅ: + i ××ÏÄÉÔÅ ÔÅËÓÔ + +úáíåþáîéå: îÁÖÁÔÉÅ ÐÅÒÅÍÅÓÔÉÔ ÷ÁÓ × ÏÂÙÞÎÙÊ ÒÅÖÉÍ (Normal mode) ÌÉÂÏ + ÐÒÅÒ×ÅÔ ÎÅÖÅÌÁÔÅÌØÎÕÀ É ÞÁÓÔÉÞÎÏ ÚÁ×ÅÒÛÅÎÎÕÀ ËÏÍÁÎÄÕ. + +ôÅÐÅÒØ ÐÅÒÅÈÏÄÉÍ Ë õÒÏËÕ 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 2.1: ëïíáîäù õäáìåîéñ + + + ** îÁÂÅÒÉÔÅ dw ÄÌÑ ÕÄÁÌÅÎÉÑ ÕÞÁÓÔËÁ ÔÅËÓÔÁ ÄÏ ËÏÎÃÁ ÓÌÏ×Á. ** + + 1. îÁÖÍÉÔÅ , ÞÔÏÂÙ ÐÅÒÅÊÔÉ × ÏÂÙÞÎÙÊ ÒÅÖÉÍ. + + 2. ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ×ÎÉÚ, Ë ÓÔÒÏËÅ, ÐÏÍÅÞÅÎÎÏÊ --->. + + 3. ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ × ÎÁÞÁÌÏ ÓÌÏ×Á, ËÏÔÏÒÏÅ ÓÌÅÄÕÅÔ ÕÄÁÌÉÔØ. + + 4. îÁÂÅÒÉÔÅ dw , ÞÔÏÂÙ ÕÄÁÌÉÔØ ÜÔÏ ÓÌÏ×Ï. + +úáíåþáîéå: ÷Ï ×ÒÅÍÑ ÎÁÂÏÒÁ ÂÕË×Ù dw ÐÏÑ×ÑÔÓÑ × ÐÏÓÌÅÄÎÅÊ ÓÔÒÏËÅ ÜËÒÁÎÁ. åÓÌÉ + ÷Ù ÞÔÏ-ÔÏ ÎÁÂÅÒÅÔÅ ÎÅÐÒÁ×ÉÌØÎÏ, ÎÁÖÍÉÔÅ É ÎÁÞÎÉÔÅ ÓÎÁÞÁÌÁ. + +---> îÅÓËÏÌØËÏ ÓÌÏ× ÒÁÆÉÎÁÄ × ÜÔÏÍ ÐÒÅÄÌÏÖÅÎÉÉ Á×ÔÏËÒÁÎ ÉÚÌÉÛÎÉ. + + 5. ðÏ×ÔÏÒÉÔÅ ÛÁÇÉ 3 É 4, ÐÏËÁ ÎÅ ÉÓÐÒÁ×ÉÔÅ ×ÓÅ ÏÛÉÂËÉ É ÐÅÒÅÈÏÄÉÔÅ Ë + õÒÏËÕ 2.2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 2.2: äïðïìîéôåìøîùå ëïíáîäù õäáìåîéñ + + + ** îÁÂÅÒÉÔÅ d$ ÄÌÑ ÕÄÁÌÅÎÉÑ ÔÅËÓÔÁ ÄÏ ËÏÎÃÁ ÓÔÒÏËÉ. ** + + 1. îÁÖÍÉÔÅ , ÞÔÏÂÙ ÐÅÒÅÊÔÉ × ÏÂÙÞÎÙÊ ÒÅÖÉÍ. + + 2. ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ×ÎÉÚ, Ë ÓÔÒÏËÅ, ÐÏÍÅÞÅÎÎÏÊ --->. + + 3. ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ Ë ËÏÎÃÕ ÐÒÁ×ÉÌØÎÏÊ ÓÔÒÏËÉ (ðïóìå ÐÅÒ×ÏÊ . ). + + 4. þÔÏÂÙ ÕÄÁÌÉÔØ ÏÓÔÁÔÏË ÓÔÒÏËÉ, ÎÁÂÅÒÉÔÅ d$ . + +---> ëÔÏ-ÔÏ ÎÁÂÒÁÌ ÏËÏÎÞÁÎÉÅ ÜÔÏÊ ÓÔÒÏËÉ Ä×ÁÖÄÙ. ÏËÏÎÞÁÎÉÅ ÜÔÏÊ ÓÔÒÏËÉ Ä×ÁÖÄÙ. + + + 5.þÔÏÂÙ ÌÕÞÛÅ ÒÁÚÏÂÒÁÔØÓÑ × ÜÔÏÍ, ÐÅÒÅÈÏÄÉÔÅ Ë õÒÏËÕ 2.3. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 2.3: ëïíáîäù é ïâÿåëôù + + + æÏÒÍÁÔ ËÏÍÁÎÄÙ `ÕÄÁÌÅÎÉÅ' d ÔÁËÏ×: + + [ÞÉÓÌÏ] d ÏÂßÅËÔ éìé d [ÞÉÓÌÏ] ÏÂßÅËÔ + úÄÅÓØ: + ÞÉÓÌÏ - ÓËÏÌØËÏ ÒÁÚ ÉÓÐÏÌÎÉÔØ ËÏÍÁÎÄÕ (ÎÅÏÂÑÚÁÔÅÌØÎÏ, ÐÏ ÕÍÏÌÞÁÎÉÀ=1). + d - ËÏÍÁÎÄÁ ÕÄÁÌÅÎÉÑ. + ÏÂßÅËÔ - Ó ÞÅÍ ËÏÍÁÎÄÁ ÄÏÌÖÎÁ ÂÙÔØ ×ÙÐÏÌÎÅÎÁ (ÐÅÒÅÞÉÓÌÅÎÏ ÎÉÖÅ). + + ëÒÁÔËÉÊ ÓÐÉÓÏË ÏÂßÅËÔÏ×: + w - ÏÔ ËÕÒÓÏÒÁ ÄÏ ËÏÎÃÁ ÓÌÏ×Á, ×ËÌÀÞÁÑ ÚÁ×ÅÒÛÁÀÝÉÊ ÐÒÏÂÅÌ. + e - ÏÔ ËÕÒÓÏÒÁ ÄÏ ËÏÎÃÁ ÓÌÏ×Á, îå ×ËÌÀÞÁÑ ÚÁ×ÅÒÛÁÀÝÉÊ ÐÒÏÂÅÌ. + $ - ÏÔ ËÕÒÓÏÒÁ ÄÏ ËÏÎÃÁ ÓÔÒÏËÉ. + ^ - ÏÔ ËÕÒÓÏÒÁ ÄÏ ÎÁÞÁÌÁ ÓÔÒÏËÉ. + +úáíåþáîéå: ðÒÏÓÔÏÅ ÎÁÖÁÔÉÅ ÎÁ ÓÉÍ×ÏÌ ÏÂßÅËÔÁ × ÏÂÙÞÎÏÍ ÒÅÖÉÍÅ (Normal mode) + ÂÅÚ ÄÏÐÏÌÎÉÔÅÌØÎÙÈ ËÏÍÁÎÄ ÐÅÒÅÄ×ÉÎÅÔ ËÕÒÓÏÒ ÔÁË, ËÁË ÕËÁÚÁÎÏ × + ÓÐÉÓËÅ ÏÂßÅËÔÏ×. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 2.4: éóëìàþåîéå éú ðòá÷éìá `ëïíáîäá-ïâÿåëô' + + + ** îÁÂÅÒÉÔÅ dd ÄÌÑ ÕÄÁÌÅÎÉÑ ×ÓÅÊ ÓÔÒÏËÉ. ** + + ÷ÓÌÅÄÓÔ×ÉÅ ÞÁÓÔÏÇÏ ÐÒÉÍÅÎÅÎÉÑ ÏÐÅÒÁÃÉÉ ÕÄÁÌÅÎÉÑ ×ÓÅÊ ÓÔÒÏËÉ, ÒÁÚÒÁÂÏÔÞÉËÉ + Vim ÒÅÛÉÌÉ, ÞÔÏ ÄÌÑ ÜÔÏÇÏ ÐÒÏÝÅ ×ÓÅÇÏ ÐÒÏÓÔÏ ÎÁÂÒÁÔØ d Ä×ÁÖÄÙ. + + 1. ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ×ÎÉÚ, ËÏ ×ÔÏÒÏÊ ÓÔÒÏËÅ ÆÒÁÚÙ. + 2. îÁÂÅÒÉÔÅ dd ÄÌÑ ÕÄÁÌÅÎÉÑ ÓÔÒÏËÉ. + 3. ôÅÐÅÒØ ÐÅÒÅÍÅÓÔÉÔÅÓØ Ë ÞÅÔ×ÅÒÔÏÊ ÓÔÒÏËÅ. + 4. îÁÂÅÒÉÔÅ 2dd (×ÓÐÏÍÎÉÔÅ ÐÒÁ×ÉÌÏ `ÞÉÓÌÏ-ËÏÍÁÎÄÁ-ÏÂßÅËÔ'), ÞÔÏÂÙ ÕÄÁÌÉÔØ + Ä×Å ÓÔÒÏËÉ. + + 1) ìÅÔÏÍ Ñ ÈÏÖÕ ÎÁ ÓÔÁÄÉÏÎ, + 2) ï, ËÁË ×ÎÅÚÁÐÎÏ ËÏÎÞÉÌÓÑ ÄÉ×ÁÎ! + 3) ñ ÂÏÌÅÀ ÚÁ ``úÅÎÉÔ'', ``úÅÎÉÔ'' --- ÞÅÍÐÉÏÎ! + 4) ðÅÞÁÌØÎÏ Ñ ÇÌÑÖÕ ÎÁ ÎÁÛÅ ÐÏËÏÌÅÎÉÅ! + 5) åÇÏ ÇÒÑÄÕÝÅÅ ÉÌØ ÐÕÓÔÏ ÉÌØ ÔÅÍÎÏ... + 6) ñ ÓÉÖÕ ÎÁ ÓËÁÍÅÊËÅ × ÌÏÖÅ `â' + 7) é ÉÇÒÁÀ ÎÁ ÂÏÌØÛÏÊ ÖÅÓÔÑÎÏÊ ÔÒÕÂÅ. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 2.5: ëïíáîäá `ïôëáô' + + + ** îÁÖÍÉÔÅ u ÄÌÑ ÏÔÍÅÎÙ ÒÅÚÕÌØÔÁÔÁ ÒÁÂÏÔÙ ÐÒÅÄÙÄÕÝÅÊ ËÏÍÁÎÄÙ, U ÄÌÑ ÏÔÍÅÎÙ + ÉÓÐÒÁ×ÌÅÎÉÊ ×Ï ×ÓÅÊ ÓÔÒÏËÅ. ** + + 1. ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ×ÎÉÚ, Ë ÓÔÒÏËÅ, ÐÏÍÅÞÅÎÎÏÊ ---> É ÕÓÔÁÎÏ×ÉÔÅ ÅÇÏ ÎÁ + ÐÅÒ×ÕÀ ÏÛÉÂËÕ. + 2. îÁÖÍÉÔÅ x ÄÌÑ ÕÄÁÌÅÎÉÑ ÐÅÒ×ÏÇÏ ÎÅÐÒÁ×ÉÌØÎÏÇÏ ÓÉÍ×ÏÌÁ. + 3. ôÅÐÅÒØ ÎÁÖÍÉÔÅ u ÄÌÑ ÏÔÍÅÎÙ (ÏÔËÁÔÁ) ÐÏÓÌÅÄÎÅÊ ×ÙÐÏÌÎÅÎÎÏÊ ËÏÍÁÎÄÙ. + 4. éÓÐÒÁרÔÅ ×ÓÅ ÏÛÉÂËÉ × ÓÔÒÏËÅ, ÉÓÐÏÌØÚÕÑ ËÏÍÁÎÄÕ x . + 5. ôÅÐÅÒØ ÎÁÖÍÉÔÅ ÚÁÇÌÁ×ÎÕÀ U ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ×ÅÒÎÕÔØ ×ÓÀ ÓÔÒÏËÕ × ÉÓÈÏÄÎÏÅ + ÓÏÓÔÏÑÎÉÅ. + 6. îÁÖÍÉÔÅ u ÎÅÓËÏÌØËÏ ÒÁÚ ÄÌÑ ÏÔÍÅÎÙ ËÏÍÁÎÄÙ U É ÐÒÅÄÙÄÕÝÉÈ ËÏÍÁÎÄ. + 7. îÁÖÍÉÔÅ ÔÅÐÅÒØ CTRL-R (ÕÄÅÒÖÉ×ÁÊÔÅ ËÌÁ×ÉÛÕ CTRL ÎÁÖÁÔÏÊ × ÍÏÍÅÎÔ ÎÁÖÁÔÉÑ + R) ÎÅÓËÏÌØËÏ ÒÁÚ ÄÌÑ ×ÏÚ×ÒÁÔÁ ËÏÍÁÎÄ (ÏÔËÁÔ ÏÔËÁÔÁ). + +---> éÓÐÒÒÁרÔÅ ÏÏÛÉÂËÉ × ÜÔÏÊÊ ÓÔÒÏËÅ É ×ÅÒÎÉÔÔÅ ÉÈ ÓÓ ÐÏÍÏÝØØÀ `ÏÔËÁÔÁ'. + + 8. üÔÏ ÂÙÌÉ ÏÞÅÎØ ÐÏÌÅÚÎÙÅ ËÏÍÁÎÄÙ. äÁÌÅÅ ÐÅÒÅÈÏÄÉÔÅ Ë òÅÚÀÍÅ õÒÏËÁ 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + òåúàíå õòïëá 2 + + + 1. äÌÑ ÕÄÁÌÅÎÉÑ ÔÅËÓÔÁ ÏÔ ËÕÒÓÏÒÁ ÄÏ ËÏÎÃÁ ÓÌÏ×Á ÎÁÂÅÒÉÔÅ: dw + + 2. äÌÑ ÕÄÁÌÅÎÉÑ ÔÅËÓÔÁ ÏÔ ËÕÒÓÏÒÁ ÄÏ ËÏÎÃÁ ÓÔÒÏËÉ ÎÁÂÅÒÉÔÅ: d$ + + 3. äÌÑ ÕÄÁÌÅÎÉÑ ×ÓÅÊ ÓÔÒÏËÉ ÎÁÂÅÒÉÔÅ: dd + + 4. æÏÒÍÁÔ ËÏÍÁÎÄÙ × ÏÂÙÞÎÏÍ ÒÅÖÉÍÅ ÉÍÅÅÔ ×ÉÄ: + + [ÞÉÓÌÏ] ËÏÍÁÎÄÁ ÏÂßÅËÔ éìé ËÏÍÁÎÄÁ [ÞÉÓÌÏ] ÏÂßÅËÔ + ÇÄÅ: + ÞÉÓÌÏ - ÓËÏÌØËÏ ÒÁÚ ÐÏ×ÔÏÒÉÔØ ×ÙÐÏÌÎÅÎÉÅ ËÏÍÁÎÄÙ + ËÏÍÁÎÄÁ - ÞÔÏ ×ÙÐÏÌÎÉÔØ, ÎÁÐÒÉÍÅÒ d ÄÌÑ ÕÄÁÌÅÎÉÑ + ÏÂßÅËÔ - ÎÁ ÞÔÏ ÄÏÌÖÎÁ ×ÏÚÄÅÊÓÔ×Ï×ÁÔØ ËÏÍÁÎÄÁ, ÎÁÐÒÉÍÅÒ w (ÓÌÏ×Ï), + $ (ÄÏ ËÏÎÃÁ ÓÔÒÏËÉ), É Ô.Ä. + + 5. äÌÑ ÏÔÍÅÎÙ (ÏÔËÁÔÁ) ÐÒÅÄÛÅÓÔ×ÕÀÝÉÈ ÄÅÊÓÔ×ÉÊ ÎÁÂÅÒÉÔÅ: u (ÓÔÒÏÞÎÁÑ u) + äÌÑ ÏÔÍÅÎÙ (ÏÔËÁÔÁ) ×ÓÅÈ ÉÚÍÅÎÅÎÉÊ × ÓÔÒÏËÅ ÎÁÂÅÒÉÔÅ: U (ÐÒÏÐÉÓÎÁÑ U) + äÌÑ ÏÔÍÅÎÙ ÏÔËÁÔÁ ÎÁÂÅÒÉÔÅ: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 3.1: ëïíáîäá ÷óôá÷ëé + + + ** îÁÂÅÒÉÔÅ p ÄÌÑ ×ÓÔÁ×ËÉ ÐÏÓÌÅÄÎÅÇÏ ÕÄÁÌÅÎÎÏÇÏ ÔÅËÓÔÁ ÐÏÓÌÅ ËÕÒÓÏÒÁ. ** + + 1. ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ×ÎÉÚ Ë ÐÏÓÌÅÄÎÅÊ ÓÔÒÏËÅ ÉÚ ÎÁÂÏÒÁ. + + 2. îÁÂÅÒÉÔÅ dd ÄÌÑ ÕÄÁÌÅÎÉÑ ÓÔÒÏËÉ É ÅÅ ÓÏÈÒÁÎÅÎÉÑ × ÂÕÆÅÒÅ Vim'Á. + + 3. ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ Ë ÓÔÒÏËÅ îáä ÔÅÍ ÍÅÓÔÏÍ, ËÕÄÁ ÓÌÅÄÕÅÔ ×ÓÔÁ×ÉÔØ + ÕÄÁÌÅÎÎÕÀ ÓÔÒÏËÕ. + + 4. îÁÈÏÄÑÓØ × ÏÂÙÞÎÏÍ ÒÅÖÉÍÅ ÎÁÂÅÒÉÔÅ p ÄÌÑ ÚÁÍÅÎÙ ÓÔÒÏËÉ. + + 5. ðÏ×ÔÏÒÉÔÅ ÛÁÇÉ 2--4, ÐÏËÁ ÎÅ ÒÁÓÓÔÁ×ÉÔÅ ×ÓÅ ÓÔÒÏËÉ × ÎÕÖÎÏÍ ÐÏÒÑÄËÅ. + + Ç) é ÌÕÞÛÅ ×ÙÄÕÍÁÔØ ÎÅ ÍÏÇ. + Â) ëÏÇÄÁ ÎÅ × ÛÕÔËÕ ÚÁÎÅÍÏÇ, + ×) ïÎ Õ×ÁÖÁÔØ ÓÅÂÑ ÚÁÓÔÁ×ÉÌ + Á) íÏÊ ÄÑÄÑ ÓÁÍÙÈ ÞÅÓÔÎÙÈ ÐÒÁ×ÉÌ + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 3.2: ëïíáîäá úáíåîù + + + ** îÁÂÅÒÉÔÅ r É ÓÉÍ×ÏÌ, ÚÁÍÅÎÑÀÝÉÊ ÓÉÍ×ÏÌ ÐÏÄ ËÕÒÓÏÒÏÍ. ** + + 1. ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ×ÎÉÚ, Ë ÓÔÒÏËÅ, ÐÏÍÅÞÅÎÎÏÊ --->. + + 2. õÓÔÁÎÏ×ÉÔÅ ËÕÒÓÏÒ ÔÁË, ÞÔÏÂÙ ÏÎ ÎÁÈÏÄÉÌÓÑ ÎÁÄ ÐÅÒ×ÏÊ ÏÛÉÂËÏÊ. + + 3. îÁÂÅÒÉÔÅ r É ÚÁÔÅÍ ÓÉÍ×ÏÌ, ÉÓÐÒÁ×ÌÑÀÝÉÊ ÏÛÉÂËÕ. + + 4. ðÏ×ÔÏÒÉÔÅ ÛÁÇÉ 2 É 3, ÐÏËÁ ÐÅÒ×ÁÑ ÓÔÒÏËÁ ÎÅ ÂÕÄÅÔ ÉÓÐÒÁ×ÌÅÎÁ. + +---> ÷ ÍÏÍÅÇÔ ÎÁÂÔÒÁ ÜÔÏÊ ÞÔÒÏËÉ ËÏÅ0ËÔÏ Ó ÔÒÕÄÏÍ ÐÏÐ×ÄÁÌ ÐÏ ËÌ×ÁÉÛÁÍ! +---> ÷ ÍÏÍÅÎÔ ÎÁÂÏÒÁ ÜÔÏÊ ÓÔÒÏËÉ ËÏÅ-ËÔÏ Ó ÔÒÕÄÏÍ ÐÏÐÁÄÁÌ ÐÏ ËÌÁ×ÉÛÁÍ! + + 5. ôÅÐÅÒØ ÐÅÒÅÈÏÄÉÔÅ Ë õÒÏËÕ 3.2. + +úáíåþáîéå: ðÏÍÎÉÔÅ, ÞÔÏ ×Ù ÄÏÌÖÎÙ ÕÞÉÔØÓÑ × ÐÒÏÃÅÓÓÅ ÒÁÂÏÔÙ, Á ÎÅ ÐÒÏÓÔÏ + ÚÁÐÏÍÉÎÁÑ. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 3.3: ëïíáîäá éúíåîåîéñ + + + ** äÌÑ ÉÚÍÅÎÅÎÉÑ ÞÁÓÔÉ ÓÌÏ×Á ÎÁÂÅÒÉÔÅ cw . ** + + 1. ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ×ÎÉÚ, Ë ÓÔÒÏËÅ, ÐÏÍÅÞÅÎÎÏÊ --->. + + 2. òÁÓÐÏÌÏÖÉÔÅ ËÕÒÓÏÒ ÎÁÄ ÂÕË×ÏÊ `o' × ÓÌÏ×Å `ÓÏÌÁ'. + + 3. îÁÂÅÒÉÔÅ cw É ÉÓÐÒÁרÔÅ ÓÌÏ×Ï (× ÄÁÎÎÏÍ ÓÌÕÞÁÅ, ÎÁÂÅÒÉÔÅ `ÌÏ×'.) + + 4. îÁÖÍÉÔÅ É ÐÅÒÅÈÏÄÉÔÅ Ë ÓÌÅÄÕÀÝÅÊ ÏÛÉÂËÅ (Ë ÐÅÒ×ÏÍÕ ÓÉÍ×ÏÌÕ, ËÏÔÏÒÙÊ + ÎÁÄÏ ÉÚÍÅÎÉÔØ.) + + 5. ðÏ×ÔÏÒÉÔÅ ÛÁÇÉ 3--4 ÐÏËÁ ÐÅÒ×ÏÅ ÐÒÅÄÌÏÖÅÎÉÅ ÎÅ ÓÔÁÎÅÔ ÉÄÅÎÔÉÞÎÙÍ ×ÔÏÒÏÍÕ. + +---> îÅÓËÏÌØËÏ ÓÏÌÁ × ÜØÇà ÓÔÒÏËÅ ÔÐÇÛÃÂØ ÒÅÄÁÌÚËÕÀÉÅÓ×È. +---> îÅÓËÏÌØËÏ ÓÌÏ× × ÜÔÏÊ ÓÔÒÏËÅ ÔÒÅÂÕÀÔ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ. + +ïÂÒÁÔÉÔÅ ×ÎÉÍÁÎÉÅ, ÞÔÏ cw ÎÅ ÔÏÌØËÏ ÚÁÍÅÎÑÅÔ ÓÌÏ×Ï, ÎÏ É ÐÅÒÅ×ÏÄÉÔ ×ÁÓ × ÒÅÖÉÍ +×ÓÔÁ×ËÉ. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 3.4: ðòïäïìöáåí éúíåîñôø ó ëïíáîäïê c + + +** ëÏÍÁÎÄÁ ÚÁÍÅÎÙ ÉÓÐÏÌØÚÕÅÔÓÑ Ó ÔÅÍÉ ÖÅ ÏÂßÅËÔÁÍÉ, ÞÔÏ É ËÏÍÁÎÄÁ ÕÄÁÌÅÎÉÑ. ** + + 1. ëÏÍÁÎÄÁ ÉÚÍÅÎÅÎÉÑ ÐÒÉÍÅÎÑÅÔÓÑ ÔÁËÉÍ ÖÅ ÏÂÒÁÚÏÍ, ËÁË É ËÏÍÁÎÄÁ ÕÄÁÌÅÎÉÑ. + åÅ ÆÏÒÍÁÔ ÔÁËÏ×: + + [ÞÉÓÌÏ] c ÏÂßÅËÔ éìé c [ÞÉÓÌÏ] ÏÂßÅËÔ + + 2. ïÂßÅËÔÙ ÔÁËÖÅ ÓÏ×ÐÁÄÁÀÔ: w (ÓÌÏ×Ï), $ (ËÏÎÅà ÓÔÒÏËÉ) É Ô.Ð. + + 3. ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ×ÎÉÚ, Ë ÓÔÒÏËÅ, ÐÏÍÅÞÅÎÎÏÊ --->. + + 4. ðÅÒÅÊÄÉÔÅ Ë ÐÅÒ×ÏÊ ÏÛÉÂËÅ. + + 5. îÁÂÅÒÉÔÅ c$ É ÏÔÒÅÄÁËÔÉÒÕÊÔÅ ÐÅÒ×ÕÀ ÓÔÒÏËÕ ÔÁË, ÞÔÏÂÙ ÏÎÁ ÓÏ×ÐÁÄÁÌÁ ÓÏ + ×ÔÏÒÏÊ, ÐÏÓÌÅ ÞÅÇÏ ÎÁÖÍÉÔÅ . + +---> ëÏÎÅà ÜÔÏÊ ÓÔÒÏËÉ ÎÕÖÄÁÅÔÓÑ × ÐÏÍÏÝÉ, ÞÔÏÂÙ ÓÔÁÔØ ÐÏÈÏÖÉÍ ÎÁ ×ÔÏÒÏÊ. +---> ëÏÎÅà ÜÔÏÊ ÓÔÒÏËÉ ÎÕÖÄÁÅÔÓÑ × ÐÏÍÏÝÉ ËÏÍÁÎÄÙ c$ . + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + òåúàíå õòïëá 3 + + + 1. äÌÑ ×ÓÔÁ×ËÉ ÔÅËÓÔÁ, ËÏÔÏÒÙÊ ÔÏÌØËÏ ÞÔÏ ÂÙÌ ÕÄÁÌÅÎ, ÎÁÂÅÒÉÔÅ p . üÔÁ + ËÏÍÁÎÄÁ ×ÓÔÁ×ÉÔ ÕÄÁÌÅÎÎÙÊ ÔÅËÓÔ ðïóìå ËÕÒÓÏÒÁ (ÅÓÌÉ ÂÙÌÁ ÕÄÁÌÅÎÁ ÓÔÒÏËÁ, + ÔÏ ÏÎÁ ÂÕÄÅÔ ÐÏÍÅÝÅÎÁ × ÓÔÒÏËÅ ÐÏÄ ËÕÒÓÏÒÏÍ). + + 2. äÌÑ ÚÁÍÅÎÙ ÓÉÍ×ÏÌÁ ÐÏÄ ËÕÒÓÏÒÏÍ ÎÁÂÅÒÉÔÅ r É ÚÁÔÅÍ ÚÁÍÅÎÑÀÝÉÊ ÓÉÍ×ÏÌ. + + 3. ëÏÍÁÎÄÁ ÉÚÍÅÎÅÎÉÑ ÐÏÚ×ÏÌÑÅÔ ÷ÁÍ ÉÚÍÅÎÉÔØ ÕËÁÚÁÎÎÙÊ ÏÂßÅËÔ ÏÔ ËÕÒÓÏÒÁ ÄÏ + ËÏÎÃÁ ÜÔÏÇÏ ÏÂßÅËÔÁ. îÁÐÒÉÍÅÒ, ÎÁÂÅÒÉÔÅ cw ÄÌÑ ÚÁÍÅÎÙ ÏÔ ËÕÒÓÏÒÁ ÄÏ + ËÏÎÃÁ ÓÌÏ×Á, c$ ÄÌÑ ÉÚÍÅÎÅÎÉÑ ÄÏ ËÏÎÃÁ ÓÔÒÏËÉ. + + 4. æÏÒÍÁÔ ËÏÍÁÎÄÙ ÉÚÍÅÎÅÎÉÑ ÔÁËÏ×: + + [ÞÉÓÌÏ] c ÏÂßÅËÔ éìé c [ÞÉÓÌÏ] ÏÂßÅËÔ + +ôÅÐÅÒØ ÏÔÐÒÁ×ÌÑÊÔÅÓØ Ë ÓÌÅÄÕÀÝÅÍÕ ÕÒÏËÕ. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 4.1: éîæïòíáãéñ ï æáêìå é òáóðïìïöåîéå ÷ îåí + + + ** îÁÂÅÒÉÔÅ CTRL-g ÞÔÏÂÙ Õ×ÉÄÅÔØ ÷ÁÛÅ ÍÅÓÔÏÒÁÓÐÏÌÏÖÅÎÉÅ × ÆÁÊÌÅ É ÉÎÆÏÒÍÁÃÉÀ + Ï ÎÅÍ. + îÁÂÅÒÉÔÅ SHIFT-G ÄÌÑ ÐÅÒÅÍÅÝÅÎÉÑ Ë ÚÁÄÁÎÎÏÊ ÓÔÒÏËÅ × ÆÁÊÌÅ. ** + + úÁÍÅÞÁÎÉÅ: ðÒÏÞÉÔÁÊÔÅ ×ÅÓØ ÕÒÏË ÐÒÅÖÄÅ ÞÅÍ ×ÙÐÏÌÎÑÔØ ÌÀÂÙÅ ËÏÍÁÎÄÙ!! + + 1. õÄÅÒÖÉ×ÁÑ ËÌÁ×ÉÛÕ Ctrl ÎÁÖÍÉÔÅ g . ÷ÎÉÚÕ ÜËÒÁÎÁ ÐÏÑ×ÉÔÓÑ ÓÔÒÏËÁ ÓÔÁÔÕÓÁ Ó + ÉÍÅÎÅÍ ÆÁÊÌÁ É ÎÏÍÅÒÏÍ ÓÔÒÏËÉ, × ËÏÔÏÒÏÊ ÷Ù ÎÁÈÏÄÉÔÅÓØ. úÁÐÏÍÎÉÔÅ ÎÏÍÅÒ + ÓÔÒÏËÉ, ÏÎ ÐÏÔÒÅÂÕÅÔÓÑ ÎÁ ûÁÇÅ 3. + + 2. îÁÖÍÉÔÅ shift-G ÄÌÑ ÐÅÒÅÍÅÝÅÎÉÑ Ë ËÏÎÃÕ ÆÁÊÌÁ. + + 3. îÁÂÅÒÉÔÅ ÎÏÍÅÒ ÓÔÒÏËÉ, × ËÏÔÏÒÏÊ ×Ù ÎÁÈÏÄÉÌÉÓØ É ÚÁÔÅÍ shift-G. üÔÏ + ×ÅÒÎÅÔ ÷ÁÓ Ë ÓÔÒÏËÅ, × ËÏÔÏÒÏÊ ÷Ù ÂÙÌÉ, ËÏÇÄÁ × ÐÅÒ×ÙÊ ÒÁÚ ÎÁÖÁÌÉ Ctrl-g. + (ëÏÇÄÁ ÷Ù ÂÕÄÅÔÅ ÎÁÂÉÒÁÔØ ÃÉÆÒÙ, ÏÎÉ îå ÏÔÏÂÒÁÚÑÔÓÑ ÎÁ ÜËÒÁÎÅ.) + + 4. åÓÌÉ ÷Ù ÚÁÐÏÍÎÉÌÉ ×ÓÅ ×ÙÛÅÓËÁÚÁÎÎÏÅ, ×ÙÐÏÌÎÉÔÅ ÛÁÇÉ 1--3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 4.2: ëïíáîäá ðïéóëá + + ** îÁÂÅÒÉÔÅ / É ÚÁÔÅÍ ××ÅÄÉÔÅ ÉÓËÏÍÕÀ ÆÒÁÚÕ. ** + + 1. ÷ ÏÂÙÞÎÏÍ ÒÅÖÉÍÅ (Normal mode) ÎÁÂÅÒÉÔÅ ÓÉÍ×ÏÌ / . ïÂÒÁÔÉÔÅ ×ÎÉÍÁÎÉÅ, + ÞÔÏ ÏÎ ×ÍÅÓÔÅ Ó ËÕÒÓÏÒÏÍ ÐÏÑ×ÉÔÓÑ ×ÎÉÚÕ ÜËÒÁÎÁ, ËÁË ÜÔÏ ÐÒÏÉÓÈÏÄÉÔ Ó + ËÏÍÁÎÄÏÊ : . + + 2. ôÅÐÅÒØ ÎÁÂÅÒÉÔÅ 'ÏÛÛÛÉÂËÁ' . üÔÏ ÔÏ ÓÌÏ×Ï, ËÏÔÏÒÏÅ ÷Ù ÂÕÄÅÔÅ + ÉÓËÁÔØ. + + 3. äÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÐÏ×ÔÏÒÉÔØ ÐÏÉÓË, ÐÒÏÓÔÏ ÎÁÖÍÉÔÅ n . + äÌÑ ÐÏÉÓËÁ ÜÔÏÊ ÆÒÁÚÙ × ÏÂÒÁÔÎÏÍ ÎÁÐÒÁ×ÌÅÎÉÉ, ÎÁÖÍÉÔÅ Shift-N . + + 4. åÓÌÉ ÷Ù ÖÅÌÁÅÔÅ ÓÒÁÚÕ ÉÓËÁÔØ × ÏÂÒÁÔÎÏÍ ÎÁÐÒÁ×ÌÅÎÉÉ, ÉÓÐÏÌØÚÕÊÔÅ + ËÏÍÁÎÄÕ ? ×ÍÅÓÔÏ / . + +---> ëÏÇÄÁ ÷Ù ÐÒÉ ÐÏÉÓËÅ ÄÏÓÔÉÇÎÅÔÅ ËÏÎÃÁ ÆÁÊÌÁ, ÐÏÉÓË ÂÕÄÅÔ ÐÒÏÄÏÌÖÅÎ Ó + ÎÁÞÁÌÁ. + + "ÏÛÛÛÉÂËÁ" ÜÔÏ ÎÅ ÓÐÏÓÏ ÐÒÏÉÚÎÅÓÅÎÉÑ ÓÌÏ×Á `ÏÛÉÂËÁ'; ÏÛÛÛÉÂËÁ ÜÔÏ ÏÛÉÂËÁ. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 4.3: ðïéóë ðáòîùè óëïâïë + + + ** îÁÂÅÒÉÔÅ % ÄÌÑ ÐÏÉÓËÁ ÐÁÒÎÙÈ ),] ÉÌÉ } . ** + + 1. ðÏÍÅÓÔÉÔÅ ËÕÒÓÏÒ ÎÁÄ ÌÀÂÏÊ ÉÚ (, [ ÉÌÉ { × ÓÔÒÏËÅ ×ÎÉÚÕ, ÐÏÍÅÞÅÎÎÏÊ --->. + + 2. ôÅÐÅÒØ ÎÁÂÅÒÉÔÅ ÓÉÍ×ÏÌ % . + + 3. ëÕÒÓÏÒ ÄÏÌÖÅÎ ÐÅÒÅÓËÏÞÉÔØ ÎÁ ÐÁÒÎÕÀ ÓËÏÂËÕ. + + 4. îÁÂÅÒÉÔÅ % ÄÌÑ ×ÏÚ×ÒÁÔÁ ËÕÒÓÏÒÁ ÎÁÚÁÄ Ë ÐÅÒ×ÏÊ ÓËÏÂËÅ. + +---> üÔÏ ( ÓÔÒÏËÁ, ÓÏÄÅÒÖÁÝÁÑ ÔÁËÉÅ (, ÔÁËÉÅ [ ] É ÔÁËÉÅ { } ÓËÏÂËÉ. )) + +úÁÍÅÞÁÎÉÅ: üÔÏ ÏÞÅÎØ ÕÄÏÂÎÏ ÐÒÉ ÏÔÌÁÄËÅ ÐÒÏÇÒÁÍÍ Ó ÐÒÏÐÕÝÅÎÎÙÍÉ ÓËÏÂËÁÍÉ! + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 4.4: óðïóïâ éóðòá÷ìåîéñ ïûéâïë + + + ** îÁÂÅÒÉÔÅ :s/ÂÙÌÏ/ÓÔÁÌÏ/g ÄÌÑ ÚÁÍÅÎÙ 'ÂÙÌÏ' ÎÁ 'ÓÔÁÌÏ'. ** + + 1. ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ×ÎÉÚ, Ë ÓÔÒÏËÅ, ÐÏÍÅÞÅÎÎÏÊ --->. + + 2. îÁÂÅÒÉÔÅ :s/Õ×ÏÄÀ/Õ×ÏÖÕ . ïÂÒÁÔÉÔÅ ×ÎÉÍÁÎÉÅ ÎÁ ÔÏ, ÞÔÏ ÜÔÁ ËÏÍÁÎÄÁ + ÚÁÍÅÎÉÔ ÔÏÌØËÏ ÐÅÒ×ÏÅ ÎÁÊÄÅÎÎÏÅ ×ÈÏÖÄÅÎÉÅ × ÓÔÒÏËÅ. + + 3. ôÅÐÅÒØ ÎÁÂÅÒÉÔÅ :s/Õ×ÏÄÀ/Õ×ÏÖÕ/g , ÏÚÎÁÞÁÀÝÅÅ ÐÏÄÓÔÁÎÏ×ËÕ ÇÌÏÂÁÌØÎÏ ×Ï + ×ÓÅÊ ÓÔÒÏËÅ. üÔÏ ÚÁÍÅÎÉÔ ×ÓÅ ÎÁÊÄÅÎÎÙÅ × ÓÔÒÏËÅ ×ÈÏÖÄÅÎÉÑ. + +---> ñ Õ×ÏÄÀ Ë ÏÔ×ÅÒÖÅÎÎÙÍ ÓÅÌÅÎØÑÍ, Ñ Õ×ÏÄÀ ÓË×ÏÚØ ×ÅËÏ×ÅÞÎÙÊ ÓÔÏÎ, Ñ Õ×ÏÄÀ Ë + ÚÁÂÙÔÙÍ ÐÏËÏÌÅÎØÑÍ. + + 4. äÌÑ ÚÁÍÅÎÙ ×ÓÅÈ ×ÈÏÖÄÅÎÉÊ ÐÏÓÌÅÄÏ×ÁÔÅÌØÎÏÓÔÉ ÓÉÍ×ÏÌÏ× ÍÅÖÄÕ Ä×ÕÍÑ + ÓÔÒÏËÁÍÉ, + ÎÁÂÅÒÉÔÅ :#,#s/ÂÙÌÏ/ÓÔÁÌÏ/g ÇÄÅ #,# --- ÎÏÍÅÒÁ ÜÔÉÈ ÓÔÒÏË. + îÁÂÅÒÉÔÅ :%s/ÂÙÌÏ/ÓÔÁÌÏ/g ÄÌÑ ÚÁÍÅÎÙ ×ÓÅÈ ×ÈÏÖÄÅÎÉÊ ×Ï ×ÓÅÍ ÆÁÊÌÅ. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + òåúàíå õòïëá 4 + 1. Ctrl-g ÐÏËÁÚÙ×ÁÅÔ ×ÁÛÅ ÐÏÌÏÖÅÎÉÅ × ÆÁÊÌÅ É ÉÎÆÏÒÍÁÃÉÀ Ï ÎÅÍ. + Shift-G ÐÅÒÅÍÅÝÁÅÔ ÷ÁÓ × ËÏÎÅà ÆÁÊÌÁ. îÏÍÅÒ, ÚÁ ËÏÔÏÒÙÍ ÓÌÅÄÕÅÔ Shift-G + ÐÏÚ×ÏÌÑÅÔ ÐÅÒÅÊÔÉ Ë ÓÔÒÏËÅ Ó ÜÔÉÍ ÎÏÍÅÒÏÍ. + + 2. îÁÖÁÔÉÅ / É ÚÁÔÅÍ ××ÏÄ ÓÔÒÏËÉ ÐÏÚ×ÏÌÑÅÔ ÐÒÏÉÚ×ÅÓÔÉ ÐÏÉÓË ÜÔÏÊ ÓÔÒÏËÉ + ÷ðåòåä ÐÏ ÔÅËÓÔÕ. + îÁÖÁÔÉÅ ? É ÚÁÔÅÍ ××ÏÄ ÓÔÒÏËÉ ÐÏÚ×ÏÌÑÅÔ ÐÒÏÉÚ×ÅÓÔÉ ÐÏÉÓË ÜÔÏÊ ÓÔÒÏËÉ + îáúáä ÐÏ ÔÅËÓÔÕ. + ðÏÓÌÅ ÐÏÉÓËÁ ÎÁÂÅÒÉÔÅ n ÄÌÑ ÐÅÒÅÈÏÄÁ Ë ÓÌÅÄÕÀÝÅÍÕ ×ÈÏÖÄÅÎÉÀ ÉÓËÏÍÏÊ + ÓÔÒÏËÉ × ÔÏÍ ÖÅ ÎÁÐÒÁ×ÌÅÎÉÉ ÉÌÉ Shift-N ÄÌÑ ÐÅÒÅÈÏÄÁ × ÐÒÏÔÉ×ÏÐÏÌÏÖÎÏÍ + ÎÁÐÒÁ×ÌÅÎÉÉ. + + 3. îÁÖÁÔÉÅ % , ËÏÇÄÁ ËÕÒÓÏÒ ÎÁÈÏÄÉÔÓÑ ÎÁ (,),[,],{, ÉÌÉ } ÐÏÚ×ÏÌÑÅÔ ÎÁÊÔÉ + ÐÁÒÎÕÀ ÓËÏÂËÕ. + + 4. äÌÑ ÐÏÄÓÔÁÎÏ×ËÉ `ÓÔÁÌÏ' ×ÍÅÓÔÏ ÐÅÒ×ÏÇÏ `ÂÙÌÏ' × ÓÔÒÏËÅ, ÎÁÂÅÒÉÔÅ + :s/old/new + äÌÑ ÐÏÄÓÔÁÎÏ×ËÉ `ÓÔÁÌÏ' ×ÍÅÓÔÏ ×ÓÅÈ `ÂÙÌÏ' × ÓÔÒÏËÅ, ÎÁÂÅÒÉÔÅ + :s/old/new/g + äÌÑ ÚÁÍÅÎÙ × ÉÎÔÅÒ×ÁÌÅ ÍÅÖÄÕ Ä×ÕÍÑ ÓÔÒÏËÁÍÉ, ÎÁÂÅÒÉÔÅ + :#,#s/old/new/g + äÌÑ ÚÁÍÅÎÙ ×ÓÅÈ ×ÈÏÖÄÅÎÉÊ `ÂÙÌÏ' ÎÁ `ÓÔÁÌÏ' × ÆÁÊÌÅ, ÎÁÂÅÒÉÔÅ + :%s/old/new/g + þÔÏÂÙ ÒÅÄÁËÔÏÒ ËÁÖÄÙÊ ÒÁÚ ÚÁÐÒÁÛÉ×ÁÌ ÐÏÄÔ×ÅÒÖÄÅÎÉÅ, ÄÏÂÁרÔÅ 'c' + :%s/old/new/gc +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 5.1: ëáë ÷ùðïìîéôø ÷îåûîàà ëïíáîäõ + + + ** îÁÂÅÒÉÔÅ :! É ÚÁÔÅÍ ×ÎÅÛÎÀÀ ËÏÍÁÎÄÕ, ËÏÔÏÒÕÀ ÓÌÅÄÕÅÔ ×ÙÐÏÌÎÉÔØ. ** + + 1. îÁÂÅÒÉÔÅ ÕÖÅ ÚÎÁËÏÍÕÀ ÷ÁÍ ËÏÍÁÎÄÕ : ÄÌÑ ÕÓÔÁÎÏ×ËÉ ËÕÒÓÏÒÁ × ËÏÍÁÎÄÎÕÀ + ÓÔÒÏËÕ ÒÅÄÁËÔÏÒÁ. üÔÏ ÐÏÚ×ÏÌÉÔ ÷ÁÍ ××ÅÓÔÉ ËÏÍÁÎÄÕ. + + 2. ôÅÐÅÒØ ÎÁÂÅÒÉÔÅ ÓÉÍ×ÏÌ ! (×ÏÓËÌÉÃÁÔÅÌØÎÙÊ ÚÎÁË). ôÅÐÅÒØ ÍÏÖÎÏ ÉÓÐÏÌÎÉÔØ + ×ÎÅÛÎÀÀ ËÏÍÁÎÄÕ, ÉÓÐÏÌØÚÕÑ ËÏÍÁÎÄÎÕÀ ÏÂÏÌÏÞËÕ. + + 3. äÌÑ ÐÒÉÍÅÒÁ ÎÁÂÅÒÉÔÅ ls ÐÏÓÌÅ ! É ÎÁÖÍÉÔÅ . üÔÁ ËÏÍÁÎÄÁ ×Ù×ÅÄÅÔ + ÓÐÉÓÏË ÆÁÊÌÏ× × ÔÅËÕÝÅÍ ËÁÔÁÌÏÇÅ, ÔÏÞÎÏ ÔÁËÖÅ, ËÁË ÅÓÌÉ ÂÙ ÷Ù ××ÅÌÉ ÜÔÕ + ËÏÍÁÎÄÕ × ÐÒÉÇÌÁÛÅÎÉÉ ÏÂÏÌÏÞËÉ. éÌÉ ÐÏÐÒÏÂÕÊÔÅ :!dir , ÅÓÌÉ ÐÒÅÄÙÄÕÝÁÑ + ËÏÍÁÎÄÁ ÎÅ ÓÒÁÂÏÔÁÌÁ. + +---> úÁÍÅÞÁÎÉÅ: ôÁËÉÍ ÓÐÏÓÏÂÏÍ ÍÏÖÎÏ ×ÙÐÏÌÎÉÔØ ÌÀÂÕÀ ×ÎÅÛÎÀÀ ËÏÍÁÎÄÕ. + +---> úÁÍÅÞÁÎÉÅ: ÷ÓÅ ËÏÍÁÎÄÙ, ÎÁÞÉÎÁÀÝÉÅÓÑ Ó : , ÄÏÌÖÎÙ ÚÁ×ÅÒÛÁÔØÓÑ ÎÁÖÁÔÉÅÍ + . + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 5.2: ëáë úáðéóáôø æáêì + + +** äÌÑ ÓÏÈÒÁÎÅÎÉÑ ÉÚÍÅÎÅÎÉÊ, ÐÒÏÉÚ×ÅÄÅÎÎÙÈ × ÆÁÊÌÅ, ÎÁÂÅÒÉÔÅ :w éíñ_æáêìá. ** + + 1. îÁÂÅÒÉÔÅ :!dir ÉÌÉ :!ls ÄÌÑ ÐÏÌÕÞÅÎÉÑ ÓÐÉÓËÁ ÆÁÊÌÏ× × ÔÅËÕÝÅÍ ËÁÔÁÌÏÇÅ. + ëÁË ÷ÁÍ ÕÖÅ ÉÚ×ÅÓÔÎÏ, ÷Ù ÄÏÌÖÎÙ ÎÁÖÁÔØ ÐÏÓÌÅ ××ÏÄÁ ÜÔÉÈ ËÏÍÁÎÄ. + + 2. ðÒÉÄÕÍÁÊÔÅ ÎÁÚ×ÁÎÉÅ ÄÌÑ ÆÁÊÌÁ, ËÏÔÏÒÏÅ ÅÝÅ ÎÅ ÓÕÝÅÓÔ×ÕÅÔ, ÎÁÐÒÉÍÅÒ TEST. + + 3. ôÅÐÅÒØ ÎÁÂÅÒÉÔÅ :w TEST (ÇÄÅ TEST --- ÜÔÏ ÉÍÑ ÆÁÊÌÁ, ÐÒÉÄÕÍÁÎÎÏÅ ÷ÁÍÉ.) + + 4. üÔÁ ËÏÍÁÎÄÁ ÓÏÈÒÁÎÉÔ ×ÅÓØ ÆÁÊÌ (õÞÅÂÎÉË ÐÏ Vim) ÐÏÄ ÉÍÅÎÅÍ TEST. þÔÏÂÙ + ÕÄÏÓÔÏ×ÅÒÉÔØÓÑ × ÜÔÏÍ, ÓÎÏ×Á ÎÁÂÅÒÉÔÅ :!dir É ÐÒÏÓÍÏÔÒÉÔÅ ËÁÔÁÌÏÇ. + +---> úÁÍÅÔØÔÅ, ÞÔÏ ÅÓÌÉ ÷Ù ×ÙÊÄÅÔÅ ÉÚ Vim É ÚÁÔÅÍ ÚÁÐÕÓÔÉÔÅ ÅÇÏ ÓÎÏ×Á Ó + ÆÁÊÌÏÍ TEST, ÜÔÏÔ ÆÁÊÌ ÂÕÄÅÔ ÔÏÞÎÏÊ ËÏÐÉÅÊ ÕÞÅÂÎÉËÁ × ÔÏÔ ÍÏÍÅÎÔ, ËÏÇÄÁ + ÷Ù ÅÇÏ ÓÏÈÒÁÎÉÌÉ. + + 5. ôÅÐÅÒØ ÕÄÁÌÉÔÅ ÜÔÏÔ ÆÁÊÌ, ÎÁÂÒÁ× :!del TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 5.3: ÷ùâïòïþîïå óïèòáîåîéå + + + ** äÌÑ ÓÏÈÒÁÎÅÎÉÑ ÞÁÓÔÉ ÆÁÊÌÁ, ÎÁÂÅÒÉÔÅ :#,# w éíñ_æáêìá ** + + 1. åÝÅ ÒÁÚ ÎÁÂÅÒÉÔÅ :!dir ÉÌÉ :!ls ÄÌÑ ÐÏÌÕÞÅÎÉÑ ÓÐÉÓËÁ ÆÁÊÌÏ× × ÔÅËÕÝÅÍ + ËÁÔÁÌÏÇÅ É ×ÙÂÅÒÉÔÅ ÐÏÄÈÏÄÑÝÅÅ ÉÍÑ, ÎÁÐÒÉÍÅÒ TEST. + + 2. ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ Ë ÎÁÞÁÌÕ ÜÔÏÊ ÓÔÒÁÎÉÃÙ É ÎÁÖÍÉÔÅ Ctrl-g ÄÌÑ ÎÁÈÏÖÄÅÎÉÑ + ÎÏÍÅÒÁ ÓÔÒÏËÉto. úáðïíîéôå üôïô îïíåò! + + 3. ôÅÐÅÒØ ÐÅÒÅÍÅÓÔÉÔÅÓØ × ËÏÎÅà ÓÔÒÁÎÉÃÙ É ×ÎÏר ÎÁÂÅÒÉÔÅ Ctrl-g. úáðïíîéôå + é üôïô îïíåò ôïöå! + + 4. äÌÑ ÓÏÈÒÁÎÅÎÉÑ ôïìøëï þáóôé ÆÁÊÌÁ ÎÁÂÅÒÉÔÅ :#,# w TEST , ÇÄÅ #,# --- ÜÔÏ + ÎÏÍÅÒÁ, ËÏÔÏÒÙÅ ÷Ù ÚÁÐÏÍÎÉÌÉ (ÎÁÞÁÌÏ, ËÏÎÅÃ), Á TEST --- ÉÍÑ ×ÁÛÅÇÏ ÆÁÊÌÁ. + + 5. ëÁË É ÐÒÅÖÄÅ, ÕÂÅÄÉÔÅÓØ × ÎÁÌÉÞÉÉ ÜÔÏÇÏ ÆÁÊÌÁ ËÏÍÁÎÄÏÊ :!dir , ÎÏ îå + õäáìñêôå ÅÇÏ. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 5.4: þôåîéå é ïâÿåäéîåîéå æáêìï÷ + + ** äÌÑ ×ÓÔÁ×ËÉ ÓÏÄÅÒÖÉÍÏÇÏ ÆÁÊÌÁ, ÎÁÂÅÒÉÔÅ :r FILENAME ** + + 1. îÁÂÅÒÉÔÅ :!dir ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÕÂÅÄÉÔØÓÑ × ÔÏÍ, ÞÔÏ ÆÁÊÌ TEST ×ÓÅ ÅÝÅ + ÓÕÝÅÓÔ×ÕÅÔ. + + 2. õÓÔÁÎÏ×ÉÔÅ ËÕÒÓÏÒ × ×ÅÒÈÎÅÊ ÞÁÓÔÉ ÜÔÏÊ ÓÔÒÁÎÉÃÙ. + +úÁÍÅÞÁÎÉÅ: ðÏÓÌÅ ×ÙÐÏÌÎÅÎÉÑ ÛÁÇÁ 3 ÷Ù Õ×ÉÄÉÔÅ õÒÏË 5.3. ðÏÓÌÅ ÜÔÏÇÏ + ÐÅÒÅÍÅÝÁÊÔÅÓØ ÷îéú, ÓÎÏ×Á Ë ÜÔÏÍÕ ÕÒÏËÕ. + + 3. ôÅÐÅÒØ ÐÒÏÞÉÔÁÊÔÅ ÷ÁÛ ÆÁÊÌ TEST, ÉÓÐÏÌØÚÕÑ ËÏÍÁÎÄÕ :r TEST , ÇÄÅ + TEST --- ÜÔÏ ÉÍÑ ÆÁÊÌÁ. + +úÁÍÅÞÁÎÉÅ: ðÒÏÞÉÔÁÎÎÙÊ ÷ÁÍÉ ÆÁÊÌ ÂÕÄÅÔ ×ÓÔÁ×ÌÅÎ × ÔÏÍ ÍÅÓÔÅ, ÇÄÅ ÎÁÈÏÄÉÔÓÑ + ËÕÒÓÏÒ. + + 4. þÔÏÂÙ ÕÂÅÄÉÔØÓÑ × ÔÏÍ, ÞÔÏ ÆÁÊÌ ÐÒÏÞÉÔÁÎ, ÐÅÒÅÍÅÓÔÉÔÅÓØ ÎÅÍÎÏÇÏ ÎÁÚÁÄ ÐÏ + ÔÅËÓÔÕ É ÚÁÍÅÔØÔÅ, ÞÔÏ ÔÅÐÅÒØ ÓÕÝÅÓÔ×ÕÀÔ Ä×Å ËÏÐÉÉ õÒÏËÁ 5.3, ÉÓÈÏÄÎÁÑ + É ÐÏÌÕÞÅÎÎÁÑ ÉÚ ÆÁÊÌÁ. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + òåúàíå õòïëá 5 + + + 1. :!ËÏÍÁÎÄÁ ÉÓÐÏÌÎÑÅÔ ×ÎÅÛÎÀÀ ËÏÍÁÎÄÕ. + + îÅËÏÔÏÒÙÅ ÐÏÌÅÚÎÙÅ ÐÒÉÍÅÒÙ: + :!dir --- ×Ù×ÏÄÉÔ ÓÐÉÓÏË ÆÁÊÌÏ× × ËÁÔÁÌÏÇÅ. + :!del FILENAME --- ÕÄÁÌÑÅÔ ÆÁÊÌ FILENAME. + + 2. :w FILENAME ÚÁÐÉÓÙ×ÁÅÔ ÔÅËÕÝÉÊ ÒÅÄÁËÔÉÒÕÅÍÙÊ ÆÁÊÌ ÎÁ ÄÉÓË + ÐÏÄ ÉÍÅÎÅÍ FILENAME. + + 3. :#,#w FILENAME ÓÏÈÒÁÎÑÅÔ ÓÔÒÏËÉ ÏÔ # ÄÏ # × ÆÁÊÌ FILENAME. + + 4. :r FILENAME ÓÞÉÔÙ×ÁÅÔ Ó ÄÉÓËÁ ÆÁÊÌ FILENAME É ÐÏÍÅÝÁÅÔ ÅÇÏ × ÔÅËÕÝÉÊ + ÆÁÊÌ ÓÌÅÄÏÍ ÚÁ ÐÏÚÉÃÉÅÊ ËÕÒÓÏÒÁ. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 6.1: ëïíáîäá óïúäáîéñ + + + ** îÁÂÅÒÉÔÅ o ÞÔÏÂÙ ÓÏÚÄÁÔØ ÐÕÓÔÕÀ ÓÔÒÏËÕ ÐÏÄ ËÕÒÓÏÒÏÍ É ÐÅÒÅÊÔÉ × ÒÅÖÉÍ + ×ÓÔÁ×ËÉ (Insert mode) ** + + 1. ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ×ÎÉÚ, Ë ÓÔÒÏËÅ, ÐÏÍÅÞÅÎÎÏÊ --->. + + 2. îÁÂÅÒÉÔÅ o (× ÎÉÖÎÅÍ ÒÅÇÉÓÔÒÅ) ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÓÏÚÄÁÔØ ÐÕÓÔÕÀ ÓÔÒÏËÕ + îéöå ËÕÒÓÏÒÁ É ÐÅÒÅÊÔÉ × ÒÅÖÉÍ ×ÓÔÁ×ËÉ (Insert mode). + + 3. ôÅÐÅÒØ ÓËÏÐÉÒÕÊÔÅ ÐÏÍÅÞÅÎÎÕÀ ---> ÓÔÒÏËÕ É ÎÁÖÍÉÔÅ ÄÌÑ ×ÙÈÏÄÁ ÉÚ + ÒÅÖÉÍÁ ×ÓÔÁ×ËÉ. + +---> ðÏÓÌÅ ÎÁÖÁÔÉÑ o ËÕÒÓÏÒ ÐÅÒÅÊÄÅÔ ÎÁ ÎÏ×ÕÀ ÐÕÓÔÕÀ ÓÔÒÏËÕ × ÒÅÖÉÍÅ ×ÓÔÁ×ËÉ. + + 4. äÌÑ ÓÏÚÄÁÎÉÑ ÓÔÒÏËÉ ÷ùûå ËÕÒÓÏÒÁ, ÐÒÏÓÔÏ ÎÁÂÅÒÉÔÅ ÚÁÇÌÁ×ÎÕÀ O, ×ÍÅÓÔÏ + ÓÔÒÏÞÎÏÊ o. ðÏÐÒÏÂÕÊÔÅ ÐÒÏÄÅÌÁÔØ ÜÔÏ Ó ÎÉÖÅÓÌÅÄÕÀÝÅÊ ÓÔÒÏËÏÊ. +óÏÚÄÁÊÔÅ ÎÏ×ÕÀ ÓÔÒÏËÕ ÎÁÄ ÜÔÏÊ, ÎÁÖÁ× Shift-O, ÐÏÍÅÓÔÉ× ËÕÒÓÏÒ ÎÁ ÜÔÕ ÓÔÒÏËÕ. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 6.2: ëïíáîäá äïâá÷ìåîéñ + + ** îÁÂÅÒÉÔÅ a , ÞÔÏÂÙ ×ÓÔÁ×ÉÔØ ÔÅËÓÔ ðïóìå ËÕÒÓÏÒÁ. ** + + 1. ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ×ÎÉÚ, × ËÏÎÅà ÐÅÒ×ÏÊ ÓÔÒÏËÉ, ÐÏÍÅÞÅÎÎÏÊ ---> , + ÎÁÂÒÁ× $ × ÏÂÙÞÎÏÍ ÒÅÖÉÍÅ (Normal mode). + + 2. îÁÂÅÒÉÔÅ a (× ÎÉÖÎÅÍ ÒÅÇÉÓÔÒÅ) ÄÌÑ ÄÏÂÁ×ÌÅÎÉÑ ÔÅËÓÔÁ ðïóìå ÓÉÍ×ÏÌÁ, + ÎÁÈÏÄÑÝÅÇÏÓÑ ÐÏÄ ËÕÒÓÏÒÏÍ. (úÁÇÌÁ×ÎÁÑ A ÐÏÚ×ÏÌÑÅÔ ÄÏÂÁ×ÉÔØ × ËÏÎÅà + ÓÔÒÏËÉ.) + +úÁÍÅÞÁÎÉÅ: üÔÏ ÐÏÚ×ÏÌÑÅÔ ÉÚÂÅÖÁÔØ ÎÁÖÁÔÉÑ i , ÐÏÓÌÅÄÎÅÇÏ ÓÉÍ×ÏÌÁ, ÔÅËÓÔÁ ÄÌÑ + ×ÓÔÁ×ËÉ, , ËÕÒÓÏÒ-×ÐÒÁ×Ï, É, ÎÁËÏÎÅÃ, x , ÐÒÏÓÔÏ ÄÌÑ ÔÏÇÏ, + ÞÔÏÂÙ ÄÏÂÁ×ÉÔØ ÔÅÓÔ × ËÏÎÅà ÓÔÒÏËÉ! + + 3. ôÅÐÅÒØ ÚÁ×ÅÒÛÉÔÅ ÐÅÒ×ÕÀ ÓÔÒÏËÕ. úÁÍÅÔØÔÅ ÔÁËÖÅ, ÞÔÏ ÄÏÂÁ×ÌÅÎÉÅ ÜÔÏ × + ÔÏÞÎÏÓÔÉ ÔÏ ÖÅ ÓÁÍÏÅ, ÞÔÏ É ÒÅÖÉÍ ×ÓÔÁ×ËÉ, ÚÁ ÉÓËÌÀÞÅÎÉÅÍ ÐÏÚÉÃÉÉ, × + ËÏÔÏÒÕÀ ÂÕÄÅÔ ×ÓÔÁ×ÌÅÎ ÔÅËÓÔ. + +---> üÔÁ ÓÔÒÏÞËÁ ÐÏÚ×ÏÌÉÔ ÷ÁÍ ÐÏÐÒÁËÔÉËÏ×ÁÔØÓÑ +---> üÔÁ ÓÔÒÏÞËÁ ÐÏÚ×ÏÌÉÔ ÷ÁÍ ÐÏÐÒÁËÔÉËÏ×ÁÔØÓÑ × ÄÏÂÁ×ÌÅÎÉÉ ÔÅËÓÔÁ × ËÏÎÅà + ÓÔÒÏËÉ. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 6.3: åýå ïäéî óðïóïâ úáíåîù + + + ** îÁÂÅÒÉÔÅ ÚÁÇÌÁ×ÎÕÀ R ÄÌÑ ÚÁÍÅÎÙ ÂÏÌÅÅ, ÞÅÍ ÏÄÎÏÇÏ ÓÉÍ×ÏÌÁ. ** + + 1. ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ×ÎÉÚ, Ë ÓÔÒÏËÅ, ÐÏÍÅÞÅÎÎÏÊ --->. + + 2. òÁÓÐÏÌÏÖÉÔÅ ËÕÒÓÏÒ × ÎÁÞÁÌÅ ÐÅÒ×ÏÇÏ ÓÌÏ×Á, ÏÔÌÉÞÁÀÝÅÇÏÓÑ ÏÔ + ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÇÏ × ÓÌÅÄÕÀÝÅÊ ÓÔÒÏËÅ, ÐÏÍÅÞÅÎÎÏÊ ---> (ÓÌÏ×Ï 'ÐÏÓÌÅÄÎÅÊ'). + + 3. ôÅÐÅÒØ ÎÁÂÅÒÉÔÅ R É ÚÁÍÅÎÉÔÅ ÏÓÔÁÔÏË ÔÅËÓÔÁ × ÐÅÒ×ÏÊ ÓÔÒÏËÅ, ÎÁÂÒÁ× + ÐÏ×ÅÒÈ ÓÔÁÒÏÇÏ ÔÅËÓÔÁ ÔÁË, ÞÔÏÂÙ ÏÂÅ ÓÔÒÏËÉ ÓÔÁÌÉ ÏÄÉÎÁËÏ×ÙÍÉ. + +---> ðÅÒ×ÕÀ ÓÔÒÏËÕ ÍÏÖÎÏ ÓÒÁ×ÎÑÔØ Ó ÐÏÓÌÅÄÎÅÊ, ÉÓÐÏÌØÚÕÑ ËÌÁ×ÉÛÉ. +---> ðÅÒ×ÕÀ ÓÔÒÏËÕ ÍÏÖÎÏ ÓÒÁ×ÎÑÔØ Ó ×ÔÏÒÏÊ, ÉÓÐÏÌØÚÕÑ R É ÎÁÂÒÁ× ÎÏ×ÙÊ ÔÅËÓÔ. + + 4. ïÂÒÁÔÉÔÅ ×ÎÉÍÁÎÉÅ, ÞÔÏ ÐÒÉ ÎÁÖÁÔÉÉ ÄÌÑ ÚÁ×ÅÒÛÅÎÉÑ, ÌÀÂÏÊ + ÎÅ ÉÚÍÅÎÅÎÎÙÊ ÔÅËÓÔ ÓÏÈÒÁÎÉÔÓÑ. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 6.4: õóôáîï÷ëá ðáòáíåôòï÷ + + +** õÓÔÁÎÏ×ÉÍ ÐÁÒÁÍÅÔÒÙ ÔÁË, ÞÔÏÂÙ ÉÇÎÏÒÉÒÏ×ÁÔØ ÒÅÇÉÓÔÒ ÐÒÉ ÐÏÉÓËÅ ÉÌÉ ÚÁÍÅÎÅ ** + + + 1. ðÏÉÝÉÔÅ ÓÌÏ×Ï 'ÉÇÎÏÒÉÒÏ×ÁÔØ', ÎÁÂÒÁ×: + /ÉÇÎÏÒÉÒÏ×ÁÔØ + ðÏ×ÔÏÒÉÔÅ ÐÏÉÓË ÎÅÓËÏÌØËÏ ÒÁÚ, ÎÁÖÉÍÁÑ ËÌÁ×ÉÛÕ n + + 2. ÷ËÌÀÞÉÔÅ ÐÁÒÁÍÅÔÒ 'ic' (éÇÎÏÒÉÒÏ×ÁÔØ ÒÅÇÉÓÔÒ), ÎÁÂÒÁ×: + :set ic + + 3. ôÅÐÅÒØ ÓÎÏ×Á ÓÄÅÌÁÊÔÅ ÐÏÉÓË ÓÌÏ×Á 'ÉÇÎÏÒÉÒÏ×ÁÔØ', ÎÁÖÁ×: n + ðÏ×ÔÏÒÉÔÅ ÐÏÉÓË ÎÅÓËÏÌØËÏ ÒÁÚ, ÎÁÖÉÍÁÑ ËÌÁ×ÉÛÕ n + + 4. ÷ËÌÀÞÉÔÅ ÐÁÒÁÍÅÔÒÙ 'hlsearch' É 'incsearch': + :set hls is + + 5. ôÅÐÅÒØ ÏÐÑÔØ ××ÅÄÉÔÅ ËÏÍÁÎÄÕ ÐÏÉÓËÁ É ÐÏÓÍÏÔÒÉÔÅ, ÞÔÏ ÐÏÌÕÞÉÔÓÑ: + /ÉÇÎÏÒÉÒÏ×ÁÔØ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + òåúàíå õòïëá 6 + + + 1. îÁÖÁÔÉÅ o ÓÏÚÄÁÅÔ ÓÔÒÏËÕ îéöå ËÕÒÓÏÒÁ É ÐÅÒÅÍÅÝÁÅÔ ËÕÒÓÏÒ × ÎÅÅ × ÒÅÖÉÍÅ + ×ÓÔÁ×ËÉ. + îÁÖÁÔÉÅ ÚÁÇÌÁ×ÎÏÊ O ÓÏÚÄÁÅÔ ÓÔÒÏËÕ ÷ùûå ÓÔÒÏËÉ, × ËÏÔÏÒÏÊ ÎÁÈÏÄÉÔÓÑ + ËÕÒÓÏÒ. + + 2. îÁÂÅÒÉÔÅ a ÄÌÑ ×ÓÔÁ×ËÉ ÔÅËÓÔÁ ðïóìå ÓÉÍ×ÏÌÁ, ÎÁ ËÏÔÏÒÏÍ ÎÁÈÏÄÉÔÓÑ ËÕÒÓÏÒ. + îÁÖÁÔÉÅ ÚÁÇÌÁ×ÎÏÊ A Á×ÔÏÍÁÔÉÞÅÓËÉ ÐÅÒÅÍÅÝÁÅÔ ÷ÁÓ ÄÌÑ ÄÏÂÁ×ÌÅÎÉÑ ÔÅËÓÔÁ + × ËÏÎÅà ÓÔÒÏËÉ. + + 3. îÁÖÁÔÉÅ ÚÁÇÌÁ×ÎÏÊ R ÐÅÒÅ×ÏÄÉÔ ÷ÁÓ × ÒÅÖÉÍ ÚÁÍÅÎÙ ÄÏ ÔÅÈ ÐÏÒ, ÐÏËÁ ÎÅ + ÂÕÄÅÔ ÎÁÖÁÔÁ ËÌÁ×ÉÛÁ ÄÌÑ ÚÁ×ÅÒÛÅÎÉÑ. + + 4. îÁÂÒÁ× ":set xxx" ×Ù ÓÍÏÖÅÔÅ ×ËÌÀÞÉÔØ ÐÁÒÁÍÅÔÒ "xxx" + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + õÒÏË 7: ëïíáîäù ðïìõþåîéñ ÷óôòïåîîïê óðòá÷ëé + + ** éÓÐÏÌØÚÕÊÔÅ ×ÓÔÒÏÅÎÎÕÀ ÓÐÒÁ×ÏÞÎÕÀ ÓÉÓÔÅÍÕ ** + + Vim ÏÂÌÁÄÁÅÔ ÍÏÝÎÏÊ ×ÓÔÒÏÅÎÎÏÊ ÓÐÒÁ×ÏÞÎÏÊ ÓÉÓÔÅÍÏÊ. äÌÑ ÎÁÞÁÌÁ ÐÏÐÒÏÂÕÊÔÅ + ÏÄÉÎ ÉÚ ÔÒÅÈ ×ÁÒÉÁÎÔÏ×: + - ÎÁÖÍÉÔÅ ËÌÁ×ÉÛÕ (ÅÓÌÉ ÔÁËÏ×ÁÑ ÉÍÅÅÔÓÑ ÎÁ ËÌÁ×ÉÁÔÕÒÅ) + - ÎÁÖÍÉÔÅ ËÌÁ×ÉÛÕ (ÅÓÌÉ ÔÁËÏ×ÁÑ ÉÍÅÅÔÓÑ ÎÁ ËÌÁ×ÉÁÔÕÒÅ) + - ÎÁÂÅÒÉÔÅ :help + + îÁÂÅÒÉÔÅ :q ÞÔÏÂÙ ÚÁËÒÙÔØ ÏËÎÏ ÓÐÒÁ×ËÉ. + + ÷Ù ÍÏÖÅÔÅ ÎÁÊÔÉ ÓÐÒÁ×ËÕ ÄÌÑ ÌÀÂÏÇÏ ÐÏÎÑÔÉÑ ÉÌÉ ËÏÍÁÎÄÙ, ÐÒÏÓÔÏ ÚÁÄÁ× + ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÊ ÁÒÇÕÍÅÎÔ ËÏÍÁÎÄÅ ":help". ðÏÐÒÏÂÕÊÔÅ ÓÌÅÄÕÀÝÅÅ (ÎÅ ÚÁÂÕÄØÔÅ + ÎÁÖÁÔØ ): + + :help w + :help c_, 2002. + Translator: Andrey Kiselev , 2002. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.ru.cp1251 b/vim/bundle/ubuntu-vim72/tutor/tutor.ru.cp1251 new file mode 100644 index 0000000..024ca52 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.ru.cp1251 @@ -0,0 +1,834 @@ +=============================================================================== += Ä î á ð î ï î æ à ë î â à ò ü â ó ÷ å á í è ê VIM - Âåðñèÿ 1.5 = +=============================================================================== + Vim --- ýòî î÷åíü ìîùíûé ðåäàêòîð, èìåþùèé ìíîæåñòâî êîìàíä, ñëèøêîì + ìíîãî äëÿ òîãî, ÷òîáû èõ âñå ìîæíî áûëî îïèñàòü â òàêîì ó÷åáíèêå, êàê + ýòîò. Ýòîò ó÷åáíèê ïðèçâàí îáúÿñíèòü äîñòàòî÷íîå ÷èñëî êîìàíä äëÿ òîãî, + ÷òîáû Âû ìîãëè ñ ëåãêîñòüþ èñïîëüçîâàòü Vim â êà÷åñòâå ðåäàêòîðà îáùåãî + íàçíà÷åíèÿ. + + Âàì ïîòðåáóåòñÿ ïðèáëèçèòåëüíî 25-30 ìèíóò íà îñâîåíèå äàííîãî ó÷åáíèêà â + çàâèñèìîñòè îò òîãî, ñêîëüêî âðåìåíè Âû ïîòðàòèòå íà ýêñïåðèìåíòû. + + Êîìàíäû â óðîêàõ áóäóò ìîäèôèöèðîâàòü òåêñò. Ñîçäàéòå êîïèþ ýòîãî ôàéëà, + ÷òîáû ïîïðàêòèêîâàòüñÿ íà íåé (åñëè Âû çàïóñòèëè "vimtutor", òî ýòî óæå + êîïèÿ). + + Âàæíî ïîìíèòü, ÷òî ýòîò ó÷åáíèê ïðåäíàçíà÷åí äëÿ îáó÷åíèÿ â ïðîöåññå + èñïîëüçîâàíèÿ. Ýòî îçíà÷àåò, ÷òî Âû äîëæíû çàïóñêàòü êîìàíäû äëÿ òîãî, + ÷òîáû êàê ñëåäóåò èõ èçó÷èòü. Åñëè Âû ïðîñòî ïðî÷èòàåòå òåêñò, òî + çàáóäåòå êîìàíäû! + + Òåïåðü óáåäèòåñü â òîì, ÷òî êëàâèøà CapsLock íå âêëþ÷åíà è íàæìèòå + êëàâèøó j íåñêîëüêî ðàç, òàê, ÷òîáû Óðîê 1.1 ïîëíîñòüþ ïîìåñòèëñÿ íà + ýêðàíå. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 1.1: ÏÅÐÅÌÅÙÅÍÈÅ ÊÓÐÑÎÐÀ + +** Äëÿ ïåðåìåùåíèÿ êóðñîðà íàæìèòå êëàâèøè h,j,k,l òàê, êàê ïîêàçàíî íèæå. ** + ^ + k Ñîâåòû: Êëàâèøà h íàõîäèòñÿ ñëåâà è ïåðåìåùàåò âëåâî. + < h l > Êëàâèøà l íàõîäèòñÿ ñïðàâà è ïåðåìåùàåò âïðàâî. + j Êëàâèøà j ïîõîæà íà ñòðåëêó `âíèç'. + v + 1. Ïîäâèãàéòå êóðñîð ïî ýêðàíó, ïîêà íå ïî÷óâñòâóåòå ñåáÿ óâåðåííî. + + 2. Íàäàâèòå êëàâèøó `âíèç' (j) ïîêà îíà íå íà÷íåò ïîâòîðÿòüñÿ. +---> Òåïåðü Âû çíàåòå, êàê ïåðåéòè ê ñëåäóþùåìó óðîêó. + + 3. Èñïîëüçóÿ êëàâèøó `âíèç' ïåðåéäèòå ê Óðîêó 1.2. + +Çàìå÷àíèå: Åñëè âû ïîêà íå óâåðåíû â òîì, ÷òî íàáèðàåòå, íàæìèòå äëÿ + ïåðåõîäà â îáû÷íûé ðåæèì (Normal mode). Ïîñëå ýòîãî ïåðåíàáåðèòå + òðåáóåìóþ êîìàíäó. + +Çàìå÷àíèå: Îáû÷íûå êëàâèøè óïðàâëåíèÿ êóðñîðîì (ñòðåëêè) òàêæå äîëæíû + ðàáîòàòü. Îäíàêî, êëàâèøè hjkl ïîçâîëÿò Âàì ïåðåìåùàòüñÿ + çíà÷èòåëüíî áûñòðåå, êàê òîëüêî Âû íàó÷èòåñü èìè ïîëüçîâàòüñÿ. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 1.2: ÇÀÏÓÑÊ È ÇÀÂÅÐØÅÍÈÅ ÐÀÁÎÒÛ Ñ VIM + +!! ÂÍÈÌÀÍÈÅ! Ïðåæäå, ÷åì âûïîëíÿòü ëþáîé èç îïèñàííûõ íèæå øàãîâ, ïðî÷òèòå + óðîê öåëèêîì !! + + 1. Íàæìèòå êëàâèøó (äëÿ òîãî, ÷òîáû óäîñòîâåðèòüñÿ, ÷òî Âû â îáû÷íîì + ðåæèìå (Normal mode)). + + 2. Íàáåðèòå: :q! . + +---> Ýòî ïîçâîëèò Âàì âûéòè èç ðåäàêòîðà ÁÅÇ ÑÎÕÐÀÍÅÍÈß ëþáûõ ñäåëàííûõ + èçìåíåíèé. Åñëè Âû õîòèòå ñîõðàíèòü èçìåíåíèÿ è âûéòè: + :wq + + 3. Êîãäà Âû óâèäèòå ïðèãëàøåíèå êîìàíäíîé îáîëî÷êè, íàáåðèòå êîìàíäó, + êîòîðàÿ ïðèâåëà Âàñ â ýòîò ó÷åáíèê. Ýòî ìîæåò áûòü + vimtutor ru + Îáû÷íî ìîæíî èñïîëüçîâàòü: vim tutor.ru + +---> 'vim' ïîçâîëÿåò çàïóñòèòü ðåäàêòîð vim, 'tutor.ru' --- ýòî ôàéë, êîòîðûé + Âû áóäåòå ðåäàêòèðîâàòü. + + 4. Åñëè Âû óâåðåíû â òîì, ÷òî çàïîìíèëè ýòè øàãè, âûïîëíèòå øàãè îò 1 äî 3 + ÷òîáû âûéòè ñíîâà çàïóñòèòü ðåäàêòîð. Çàòåì ïåðåìåñòèòå êóðñîð âíèç ê + Óðîêó 1.3. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 1.3: ÐÅÄÀÊÒÈÐÎÂÀÍÈÅ ÒÅÊÑÒÀ - ÓÄÀËÅÍÈÅ + + +** Íàõîäÿñü â îáû÷íîì ðåæèìå íàæìèòå x, ÷òîáû óäàëèòü ñèìâîë ïîä êóðñîðîì. ** + + 1. Ïåðåìåñòèòå êóðñîð ê ñòðîêå âíèçó, ïîìå÷åííîé --->. + + 2. Äëÿ èñïðàâëåíèÿ îøèáîê, ïåðåìåñòèòå êóðñîð, ïîêà îí íå îêàæåòñÿ íàä + óäàëÿåìûì ñèìâîëîì. + + 3. Íàæìèòå êëàâèøó x äëÿ óäàëåíèÿ òðåáóåìîãî ñèìâîëà. + + 4. Ïîâòîðèòå øàãè 2--4 ïîêà ñòðîêà íå áóäåò èñïðàâëåíà. + +---> Îò òòòîïîòà êîïûòò ïïïûëü ïïî ïïïîëþ ëåòòèòò. + + 5. Òåïåðü, êîãäà ñòðîêà îòêîððåêòèðîâàíà, ïåðåõîäèòå ê óðîêó 1.4. + +ÇÀÌÅ×ÀÍÈÅ:  õîäå îñâîåíèÿ ýòîãî ó÷åáíèêà íå ïûòàéòåñü çàïîìèíàòü, ó÷èòå + â ïðîöåññå èñïîëüçîâàíèÿ. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 1.4: ÐÅÄÀÊÒÈÐÎÂÀÍÈÅ ÒÅÊÑÒÀ - ÂÑÒÀÂÊÀ + + + ** Íàõîäÿñü â îáû÷íîì ðåæèìå (Normal mode), íàæìèòå i äëÿ âñòàâêè òåêñòà. ** + + 1. Ïåðåìåñòèòå êóðñîð ê ïåðâîé ñòðîêå âíèçó, ïîìå÷åííîé --->. + + 2. Äëÿ òîãî, ÷òîáû ñäåëàòü ïåðâóþ ñòðîêó èäåíòè÷íîé âòîðîé, ïîìåñòèòå + êóðñîð íà ñèìâîë ÏÅÐÅÄ êîòîðûì ñëåäóåò âñòàâèòü òåêñò. + + 3. Íàæìèòå i è íàáåðèòå òðåáóåìûå äîáàâëåíèÿ. + + 4. Ïîñëå èñïðàâëåíèÿ âñåõ îøèáîê íàæìèòå äëÿ âîçâðàòà â îáû÷íûé ðåæèì. + Ïîâòîðèòå øàãè 2--4, ïîêà ôðàçà íå áóäåò èñïðàâëåíà ïîëíîñòüþ. + +---> ×àñòü òåêñòà â ñòðîêå áåñëåäíî . +---> ×àñòü òåêñòà â ýòîé ñòðîêå áåññëåäíî ïðîïàëà. + + 5. Êîãäà îñâîèòå âñòàâêó òåêñòà, ïåðåõîäèòå äàëüøå ê Ðåçþìå. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÐÅÇÞÌÅ ÓÐÎÊÀ 1 + + 1. Êóðñîð ïåðåìåùàåòñÿ ëèáî êëàâèøàìè ñî ñòðåëêàìè, ëèáî êëàâèøàìè hjkl. + h (âëåâî) j (âíèç) k (ââåðõ) l (âïðàâî) + + 2. Äëÿ çàïóñêà Vim (èç ïðèãëàøåíèÿ % êîìàíäíîé îáîëî÷êè) íàáåðèòå: + vim ÈÌß_ÔÀÉËÀ + + 3. Äëÿ çàâåðøåíèÿ ðàáîòû ñ Vim íàáåðèòå: + :q! ÷òîáû îòêàçàòüñÿ îò ñîõðàíåíèÿ èçìåíåíèé. + Èëè íàáåðèòå: + :wq ÷òîáû ñîõðàíèòü èçìåíåíèÿ. + + 4. Äëÿ óäàëåíèÿ ñèìâîëà ïîä êóðñîðîì â îáû÷íîì ðåæèìå, íàáåðèòå: x + + 5. ×òîáû âñòàâèòü òåêñò ïåðåä êóðñîðîì â îáû÷íîì ðåæèìå, íàáåðèòå: + i ââîäèòå òåêñò + +ÇÀÌÅ×ÀÍÈÅ: Íàæàòèå ïåðåìåñòèò Âàñ â îáû÷íûé ðåæèì (Normal mode) ëèáî + ïðåðâåò íåæåëàòåëüíóþ è ÷àñòè÷íî çàâåðøåííóþ êîìàíäó. + +Òåïåðü ïåðåõîäèì ê Óðîêó 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 2.1: ÊÎÌÀÍÄÛ ÓÄÀËÅÍÈß + + + ** Íàáåðèòå dw äëÿ óäàëåíèÿ ó÷àñòêà òåêñòà äî êîíöà ñëîâà. ** + + 1. Íàæìèòå , ÷òîáû ïåðåéòè â îáû÷íûé ðåæèì. + + 2. Ïåðåìåñòèòå êóðñîð âíèç, ê ñòðîêå, ïîìå÷åííîé --->. + + 3. Ïåðåìåñòèòå êóðñîð â íà÷àëî ñëîâà, êîòîðîå ñëåäóåò óäàëèòü. + + 4. Íàáåðèòå dw , ÷òîáû óäàëèòü ýòî ñëîâî. + +ÇÀÌÅ×ÀÍÈÅ: Âî âðåìÿ íàáîðà áóêâû dw ïîÿâÿòñÿ â ïîñëåäíåé ñòðîêå ýêðàíà. Åñëè + Âû ÷òî-òî íàáåðåòå íåïðàâèëüíî, íàæìèòå è íà÷íèòå ñíà÷àëà. + +---> Íåñêîëüêî ñëîâ ðàôèíàä â ýòîì ïðåäëîæåíèè àâòîêðàí èçëèøíè. + + 5. Ïîâòîðèòå øàãè 3 è 4, ïîêà íå èñïðàâèòå âñå îøèáêè è ïåðåõîäèòå ê + Óðîêó 2.2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 2.2: ÄÎÏÎËÍÈÒÅËÜÍÛÅ ÊÎÌÀÍÄÛ ÓÄÀËÅÍÈß + + + ** Íàáåðèòå d$ äëÿ óäàëåíèÿ òåêñòà äî êîíöà ñòðîêè. ** + + 1. Íàæìèòå , ÷òîáû ïåðåéòè â îáû÷íûé ðåæèì. + + 2. Ïåðåìåñòèòå êóðñîð âíèç, ê ñòðîêå, ïîìå÷åííîé --->. + + 3. Ïåðåìåñòèòå êóðñîð ê êîíöó ïðàâèëüíîé ñòðîêè (ÏÎÑËÅ ïåðâîé . ). + + 4. ×òîáû óäàëèòü îñòàòîê ñòðîêè, íàáåðèòå d$ . + +---> Êòî-òî íàáðàë îêîí÷àíèå ýòîé ñòðîêè äâàæäû. îêîí÷àíèå ýòîé ñòðîêè äâàæäû. + + + 5.×òîáû ëó÷øå ðàçîáðàòüñÿ â ýòîì, ïåðåõîäèòå ê Óðîêó 2.3. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 2.3: ÊÎÌÀÍÄÛ È ÎÁÚÅÊÒÛ + + + Ôîðìàò êîìàíäû `óäàëåíèå' d òàêîâ: + + [÷èñëî] d îáúåêò ÈËÈ d [÷èñëî] îáúåêò + Çäåñü: + ÷èñëî - ñêîëüêî ðàç èñïîëíèòü êîìàíäó (íåîáÿçàòåëüíî, ïî óìîë÷àíèþ=1). + d - êîìàíäà óäàëåíèÿ. + îáúåêò - ñ ÷åì êîìàíäà äîëæíà áûòü âûïîëíåíà (ïåðå÷èñëåíî íèæå). + + Êðàòêèé ñïèñîê îáúåêòîâ: + w - îò êóðñîðà äî êîíöà ñëîâà, âêëþ÷àÿ çàâåðøàþùèé ïðîáåë. + e - îò êóðñîðà äî êîíöà ñëîâà, ÍÅ âêëþ÷àÿ çàâåðøàþùèé ïðîáåë. + $ - îò êóðñîðà äî êîíöà ñòðîêè. + ^ - îò êóðñîðà äî íà÷àëà ñòðîêè. + +ÇÀÌÅ×ÀÍÈÅ: Ïðîñòîå íàæàòèå íà ñèìâîë îáúåêòà â îáû÷íîì ðåæèìå (Normal mode) + áåç äîïîëíèòåëüíûõ êîìàíä ïåðåäâèíåò êóðñîð òàê, êàê óêàçàíî â + ñïèñêå îáúåêòîâ. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 2.4: ÈÑÊËÞ×ÅÍÈÅ ÈÇ ÏÐÀÂÈËÀ `ÊÎÌÀÍÄÀ-ÎÁÚÅÊÒ' + + + ** Íàáåðèòå dd äëÿ óäàëåíèÿ âñåé ñòðîêè. ** + + Âñëåäñòâèå ÷àñòîãî ïðèìåíåíèÿ îïåðàöèè óäàëåíèÿ âñåé ñòðîêè, ðàçðàáîò÷èêè + Vim ðåøèëè, ÷òî äëÿ ýòîãî ïðîùå âñåãî ïðîñòî íàáðàòü d äâàæäû. + + 1. Ïåðåìåñòèòå êóðñîð âíèç, êî âòîðîé ñòðîêå ôðàçû. + 2. Íàáåðèòå dd äëÿ óäàëåíèÿ ñòðîêè. + 3. Òåïåðü ïåðåìåñòèòåñü ê ÷åòâåðòîé ñòðîêå. + 4. Íàáåðèòå 2dd (âñïîìíèòå ïðàâèëî `÷èñëî-êîìàíäà-îáúåêò'), ÷òîáû óäàëèòü + äâå ñòðîêè. + + 1) Ëåòîì ÿ õîæó íà ñòàäèîí, + 2) Î, êàê âíåçàïíî êîí÷èëñÿ äèâàí! + 3) ß áîëåþ çà ``Çåíèò'', ``Çåíèò'' --- ÷åìïèîí! + 4) Ïå÷àëüíî ÿ ãëÿæó íà íàøå ïîêîëåíèå! + 5) Åãî ãðÿäóùåå èëü ïóñòî èëü òåìíî... + 6) ß ñèæó íà ñêàìåéêå â ëîæå `Á' + 7) È èãðàþ íà áîëüøîé æåñòÿíîé òðóáå. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 2.5: ÊÎÌÀÍÄÀ `ÎÒÊÀÒ' + + + ** Íàæìèòå u äëÿ îòìåíû ðåçóëüòàòà ðàáîòû ïðåäûäóùåé êîìàíäû, U äëÿ îòìåíû + èñïðàâëåíèé âî âñåé ñòðîêå. ** + + 1. Ïåðåìåñòèòå êóðñîð âíèç, ê ñòðîêå, ïîìå÷åííîé ---> è óñòàíîâèòå åãî íà + ïåðâóþ îøèáêó. + 2. Íàæìèòå x äëÿ óäàëåíèÿ ïåðâîãî íåïðàâèëüíîãî ñèìâîëà. + 3. Òåïåðü íàæìèòå u äëÿ îòìåíû (îòêàòà) ïîñëåäíåé âûïîëíåííîé êîìàíäû. + 4. Èñïðàâüòå âñå îøèáêè â ñòðîêå, èñïîëüçóÿ êîìàíäó x . + 5. Òåïåðü íàæìèòå çàãëàâíóþ U äëÿ òîãî, ÷òîáû âåðíóòü âñþ ñòðîêó â èñõîäíîå + ñîñòîÿíèå. + 6. Íàæìèòå u íåñêîëüêî ðàç äëÿ îòìåíû êîìàíäû U è ïðåäûäóùèõ êîìàíä. + 7. Íàæìèòå òåïåðü CTRL-R (óäåðæèâàéòå êëàâèøó CTRL íàæàòîé â ìîìåíò íàæàòèÿ + R) íåñêîëüêî ðàç äëÿ âîçâðàòà êîìàíä (îòêàò îòêàòà). + +---> Èñïððàâüòå îîøèáêè â ýòîéé ñòðîêå è âåðíèòòå èõ ññ ïîìîùüüþ `îòêàòà'. + + 8. Ýòî áûëè î÷åíü ïîëåçíûå êîìàíäû. Äàëåå ïåðåõîäèòå ê Ðåçþìå Óðîêà 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÐÅÇÞÌÅ ÓÐÎÊÀ 2 + + + 1. Äëÿ óäàëåíèÿ òåêñòà îò êóðñîðà äî êîíöà ñëîâà íàáåðèòå: dw + + 2. Äëÿ óäàëåíèÿ òåêñòà îò êóðñîðà äî êîíöà ñòðîêè íàáåðèòå: d$ + + 3. Äëÿ óäàëåíèÿ âñåé ñòðîêè íàáåðèòå: dd + + 4. Ôîðìàò êîìàíäû â îáû÷íîì ðåæèìå èìååò âèä: + + [÷èñëî] êîìàíäà îáúåêò ÈËÈ êîìàíäà [÷èñëî] îáúåêò + ãäå: + ÷èñëî - ñêîëüêî ðàç ïîâòîðèòü âûïîëíåíèå êîìàíäû + êîìàíäà - ÷òî âûïîëíèòü, íàïðèìåð d äëÿ óäàëåíèÿ + îáúåêò - íà ÷òî äîëæíà âîçäåéñòâîâàòü êîìàíäà, íàïðèìåð w (ñëîâî), + $ (äî êîíöà ñòðîêè), è ò.ä. + + 5. Äëÿ îòìåíû (îòêàòà) ïðåäøåñòâóþùèõ äåéñòâèé íàáåðèòå: u (ñòðî÷íàÿ u) + Äëÿ îòìåíû (îòêàòà) âñåõ èçìåíåíèé â ñòðîêå íàáåðèòå: U (ïðîïèñíàÿ U) + Äëÿ îòìåíû îòêàòà íàáåðèòå: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 3.1: ÊÎÌÀÍÄÀ ÂÑÒÀÂÊÈ + + + ** Íàáåðèòå p äëÿ âñòàâêè ïîñëåäíåãî óäàëåííîãî òåêñòà ïîñëå êóðñîðà. ** + + 1. Ïåðåìåñòèòå êóðñîð âíèç ê ïîñëåäíåé ñòðîêå èç íàáîðà. + + 2. Íàáåðèòå dd äëÿ óäàëåíèÿ ñòðîêè è åå ñîõðàíåíèÿ â áóôåðå Vim'à. + + 3. Ïåðåìåñòèòå êóðñîð ê ñòðîêå ÍÀÄ òåì ìåñòîì, êóäà ñëåäóåò âñòàâèòü + óäàëåííóþ ñòðîêó. + + 4. Íàõîäÿñü â îáû÷íîì ðåæèìå íàáåðèòå p äëÿ çàìåíû ñòðîêè. + + 5. Ïîâòîðèòå øàãè 2--4, ïîêà íå ðàññòàâèòå âñå ñòðîêè â íóæíîì ïîðÿäêå. + + ã) È ëó÷øå âûäóìàòü íå ìîã. + á) Êîãäà íå â øóòêó çàíåìîã, + â) Îí óâàæàòü ñåáÿ çàñòàâèë + à) Ìîé äÿäÿ ñàìûõ ÷åñòíûõ ïðàâèë + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 3.2: ÊÎÌÀÍÄÀ ÇÀÌÅÍÛ + + + ** Íàáåðèòå r è ñèìâîë, çàìåíÿþùèé ñèìâîë ïîä êóðñîðîì. ** + + 1. Ïåðåìåñòèòå êóðñîð âíèç, ê ñòðîêå, ïîìå÷åííîé --->. + + 2. Óñòàíîâèòå êóðñîð òàê, ÷òîáû îí íàõîäèëñÿ íàä ïåðâîé îøèáêîé. + + 3. Íàáåðèòå r è çàòåì ñèìâîë, èñïðàâëÿþùèé îøèáêó. + + 4. Ïîâòîðèòå øàãè 2 è 3, ïîêà ïåðâàÿ ñòðîêà íå áóäåò èñïðàâëåíà. + +--->  ìîìåãò íàáòðà ýòîé ÷òðîêè êîå0êòî ñ òðóäîì ïîïâäàë ïî êëâàèøàì! +--->  ìîìåíò íàáîðà ýòîé ñòðîêè êîå-êòî ñ òðóäîì ïîïàäàë ïî êëàâèøàì! + + 5. Òåïåðü ïåðåõîäèòå ê Óðîêó 3.2. + +ÇÀÌÅ×ÀÍÈÅ: Ïîìíèòå, ÷òî âû äîëæíû ó÷èòüñÿ â ïðîöåññå ðàáîòû, à íå ïðîñòî + çàïîìèíàÿ. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 3.3: ÊÎÌÀÍÄÀ ÈÇÌÅÍÅÍÈß + + + ** Äëÿ èçìåíåíèÿ ÷àñòè ñëîâà íàáåðèòå cw . ** + + 1. Ïåðåìåñòèòå êóðñîð âíèç, ê ñòðîêå, ïîìå÷åííîé --->. + + 2. Ðàñïîëîæèòå êóðñîð íàä áóêâîé `o' â ñëîâå `ñîëà'. + + 3. Íàáåðèòå cw è èñïðàâüòå ñëîâî (â äàííîì ñëó÷àå, íàáåðèòå `ëîâ'.) + + 4. Íàæìèòå è ïåðåõîäèòå ê ñëåäóþùåé îøèáêå (ê ïåðâîìó ñèìâîëó, êîòîðûé + íàäî èçìåíèòü.) + + 5. Ïîâòîðèòå øàãè 3--4 ïîêà ïåðâîå ïðåäëîæåíèå íå ñòàíåò èäåíòè÷íûì âòîðîìó. + +---> Íåñêîëüêî ñîëà â ýüãö ñòðîêå òïãøöáü ðåäàëçêóþèåñâõ. +---> Íåñêîëüêî ñëîâ â ýòîé ñòðîêå òðåáóþò ðåäàêòèðîâàíèÿ. + +Îáðàòèòå âíèìàíèå, ÷òî cw íå òîëüêî çàìåíÿåò ñëîâî, íî è ïåðåâîäèò âàñ â ðåæèì +âñòàâêè. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 3.4: ÏÐÎÄÎËÆÀÅÌ ÈÇÌÅÍßÒÜ Ñ ÊÎÌÀÍÄÎÉ c + + +** Êîìàíäà çàìåíû èñïîëüçóåòñÿ ñ òåìè æå îáúåêòàìè, ÷òî è êîìàíäà óäàëåíèÿ. ** + + 1. Êîìàíäà èçìåíåíèÿ ïðèìåíÿåòñÿ òàêèì æå îáðàçîì, êàê è êîìàíäà óäàëåíèÿ. + Åå ôîðìàò òàêîâ: + + [÷èñëî] c îáúåêò ÈËÈ c [÷èñëî] îáúåêò + + 2. Îáúåêòû òàêæå ñîâïàäàþò: w (ñëîâî), $ (êîíåö ñòðîêè) è ò.ï. + + 3. Ïåðåìåñòèòå êóðñîð âíèç, ê ñòðîêå, ïîìå÷åííîé --->. + + 4. Ïåðåéäèòå ê ïåðâîé îøèáêå. + + 5. Íàáåðèòå c$ è îòðåäàêòèðóéòå ïåðâóþ ñòðîêó òàê, ÷òîáû îíà ñîâïàäàëà ñî + âòîðîé, ïîñëå ÷åãî íàæìèòå . + +---> Êîíåö ýòîé ñòðîêè íóæäàåòñÿ â ïîìîùè, ÷òîáû ñòàòü ïîõîæèì íà âòîðîé. +---> Êîíåö ýòîé ñòðîêè íóæäàåòñÿ â ïîìîùè êîìàíäû c$ . + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÐÅÇÞÌÅ ÓÐÎÊÀ 3 + + + 1. Äëÿ âñòàâêè òåêñòà, êîòîðûé òîëüêî ÷òî áûë óäàëåí, íàáåðèòå p . Ýòà + êîìàíäà âñòàâèò óäàëåííûé òåêñò ÏÎÑËÅ êóðñîðà (åñëè áûëà óäàëåíà ñòðîêà, + òî îíà áóäåò ïîìåùåíà â ñòðîêå ïîä êóðñîðîì). + + 2. Äëÿ çàìåíû ñèìâîëà ïîä êóðñîðîì íàáåðèòå r è çàòåì çàìåíÿþùèé ñèìâîë. + + 3. Êîìàíäà èçìåíåíèÿ ïîçâîëÿåò Âàì èçìåíèòü óêàçàííûé îáúåêò îò êóðñîðà äî + êîíöà ýòîãî îáúåêòà. Íàïðèìåð, íàáåðèòå cw äëÿ çàìåíû îò êóðñîðà äî + êîíöà ñëîâà, c$ äëÿ èçìåíåíèÿ äî êîíöà ñòðîêè. + + 4. Ôîðìàò êîìàíäû èçìåíåíèÿ òàêîâ: + + [÷èñëî] c îáúåêò ÈËÈ c [÷èñëî] îáúåêò + +Òåïåðü îòïðàâëÿéòåñü ê ñëåäóþùåìó óðîêó. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 4.1: ÈÍÔÎÐÌÀÖÈß Î ÔÀÉËÅ È ÐÀÑÏÎËÎÆÅÍÈÅ Â ÍÅÌ + + + ** Íàáåðèòå CTRL-g ÷òîáû óâèäåòü Âàøå ìåñòîðàñïîëîæåíèå â ôàéëå è èíôîðìàöèþ + î íåì. + Íàáåðèòå SHIFT-G äëÿ ïåðåìåùåíèÿ ê çàäàííîé ñòðîêå â ôàéëå. ** + + Çàìå÷àíèå: Ïðî÷èòàéòå âåñü óðîê ïðåæäå ÷åì âûïîëíÿòü ëþáûå êîìàíäû!! + + 1. Óäåðæèâàÿ êëàâèøó Ctrl íàæìèòå g . Âíèçó ýêðàíà ïîÿâèòñÿ ñòðîêà ñòàòóñà ñ + èìåíåì ôàéëà è íîìåðîì ñòðîêè, â êîòîðîé Âû íàõîäèòåñü. Çàïîìíèòå íîìåð + ñòðîêè, îí ïîòðåáóåòñÿ íà Øàãå 3. + + 2. Íàæìèòå shift-G äëÿ ïåðåìåùåíèÿ ê êîíöó ôàéëà. + + 3. Íàáåðèòå íîìåð ñòðîêè, â êîòîðîé âû íàõîäèëèñü è çàòåì shift-G. Ýòî + âåðíåò Âàñ ê ñòðîêå, â êîòîðîé Âû áûëè, êîãäà â ïåðâûé ðàç íàæàëè Ctrl-g. + (Êîãäà Âû áóäåòå íàáèðàòü öèôðû, îíè ÍÅ îòîáðàçÿòñÿ íà ýêðàíå.) + + 4. Åñëè Âû çàïîìíèëè âñå âûøåñêàçàííîå, âûïîëíèòå øàãè 1--3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 4.2: ÊÎÌÀÍÄÀ ÏÎÈÑÊÀ + + ** Íàáåðèòå / è çàòåì ââåäèòå èñêîìóþ ôðàçó. ** + + 1.  îáû÷íîì ðåæèìå (Normal mode) íàáåðèòå ñèìâîë / . Îáðàòèòå âíèìàíèå, + ÷òî îí âìåñòå ñ êóðñîðîì ïîÿâèòñÿ âíèçó ýêðàíà, êàê ýòî ïðîèñõîäèò ñ + êîìàíäîé : . + + 2. Òåïåðü íàáåðèòå 'îøøøèáêà' . Ýòî òî ñëîâî, êîòîðîå Âû áóäåòå + èñêàòü. + + 3. Äëÿ òîãî, ÷òîáû ïîâòîðèòü ïîèñê, ïðîñòî íàæìèòå n . + Äëÿ ïîèñêà ýòîé ôðàçû â îáðàòíîì íàïðàâëåíèè, íàæìèòå Shift-N . + + 4. Åñëè Âû æåëàåòå ñðàçó èñêàòü â îáðàòíîì íàïðàâëåíèè, èñïîëüçóéòå + êîìàíäó ? âìåñòî / . + +---> Êîãäà Âû ïðè ïîèñêå äîñòèãíåòå êîíöà ôàéëà, ïîèñê áóäåò ïðîäîëæåí ñ + íà÷àëà. + + "îøøøèáêà" ýòî íå ñïîñîá ïðîèçíåñåíèÿ ñëîâà `îøèáêà'; îøøøèáêà ýòî îøèáêà. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 4.3: ÏÎÈÑÊ ÏÀÐÍÛÕ ÑÊÎÁÎÊ + + + ** Íàáåðèòå % äëÿ ïîèñêà ïàðíûõ ),] èëè } . ** + + 1. Ïîìåñòèòå êóðñîð íàä ëþáîé èç (, [ èëè { â ñòðîêå âíèçó, ïîìå÷åííîé --->. + + 2. Òåïåðü íàáåðèòå ñèìâîë % . + + 3. Êóðñîð äîëæåí ïåðåñêî÷èòü íà ïàðíóþ ñêîáêó. + + 4. Íàáåðèòå % äëÿ âîçâðàòà êóðñîðà íàçàä ê ïåðâîé ñêîáêå. + +---> Ýòî ( ñòðîêà, ñîäåðæàùàÿ òàêèå (, òàêèå [ ] è òàêèå { } ñêîáêè. )) + +Çàìå÷àíèå: Ýòî î÷åíü óäîáíî ïðè îòëàäêå ïðîãðàìì ñ ïðîïóùåííûìè ñêîáêàìè! + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 4.4: ÑÏÎÑÎÁ ÈÑÏÐÀÂËÅÍÈß ÎØÈÁÎÊ + + + ** Íàáåðèòå :s/áûëî/ñòàëî/g äëÿ çàìåíû 'áûëî' íà 'ñòàëî'. ** + + 1. Ïåðåìåñòèòå êóðñîð âíèç, ê ñòðîêå, ïîìå÷åííîé --->. + + 2. Íàáåðèòå :s/óâîäþ/óâîæó . Îáðàòèòå âíèìàíèå íà òî, ÷òî ýòà êîìàíäà + çàìåíèò òîëüêî ïåðâîå íàéäåííîå âõîæäåíèå â ñòðîêå. + + 3. Òåïåðü íàáåðèòå :s/óâîäþ/óâîæó/g , îçíà÷àþùåå ïîäñòàíîâêó ãëîáàëüíî âî + âñåé ñòðîêå. Ýòî çàìåíèò âñå íàéäåííûå â ñòðîêå âõîæäåíèÿ. + +---> ß óâîäþ ê îòâåðæåííûì ñåëåíüÿì, ÿ óâîäþ ñêâîçü âåêîâå÷íûé ñòîí, ÿ óâîäþ ê + çàáûòûì ïîêîëåíüÿì. + + 4. Äëÿ çàìåíû âñåõ âõîæäåíèé ïîñëåäîâàòåëüíîñòè ñèìâîëîâ ìåæäó äâóìÿ + ñòðîêàìè, + íàáåðèòå :#,#s/áûëî/ñòàëî/g ãäå #,# --- íîìåðà ýòèõ ñòðîê. + Íàáåðèòå :%s/áûëî/ñòàëî/g äëÿ çàìåíû âñåõ âõîæäåíèé âî âñåì ôàéëå. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÐÅÇÞÌÅ ÓÐÎÊÀ 4 + 1. Ctrl-g ïîêàçûâàåò âàøå ïîëîæåíèå â ôàéëå è èíôîðìàöèþ î íåì. + Shift-G ïåðåìåùàåò Âàñ â êîíåö ôàéëà. Íîìåð, çà êîòîðûì ñëåäóåò Shift-G + ïîçâîëÿåò ïåðåéòè ê ñòðîêå ñ ýòèì íîìåðîì. + + 2. Íàæàòèå / è çàòåì ââîä ñòðîêè ïîçâîëÿåò ïðîèçâåñòè ïîèñê ýòîé ñòðîêè + ÂÏÅÐÅÄ ïî òåêñòó. + Íàæàòèå ? è çàòåì ââîä ñòðîêè ïîçâîëÿåò ïðîèçâåñòè ïîèñê ýòîé ñòðîêè + ÍÀÇÀÄ ïî òåêñòó. + Ïîñëå ïîèñêà íàáåðèòå n äëÿ ïåðåõîäà ê ñëåäóþùåìó âõîæäåíèþ èñêîìîé + ñòðîêè â òîì æå íàïðàâëåíèè èëè Shift-N äëÿ ïåðåõîäà â ïðîòèâîïîëîæíîì + íàïðàâëåíèè. + + 3. Íàæàòèå % , êîãäà êóðñîð íàõîäèòñÿ íà (,),[,],{, èëè } ïîçâîëÿåò íàéòè + ïàðíóþ ñêîáêó. + + 4. Äëÿ ïîäñòàíîâêè `ñòàëî' âìåñòî ïåðâîãî `áûëî' â ñòðîêå, íàáåðèòå + :s/old/new + Äëÿ ïîäñòàíîâêè `ñòàëî' âìåñòî âñåõ `áûëî' â ñòðîêå, íàáåðèòå + :s/old/new/g + Äëÿ çàìåíû â èíòåðâàëå ìåæäó äâóìÿ ñòðîêàìè, íàáåðèòå + :#,#s/old/new/g + Äëÿ çàìåíû âñåõ âõîæäåíèé `áûëî' íà `ñòàëî' â ôàéëå, íàáåðèòå + :%s/old/new/g + ×òîáû ðåäàêòîð êàæäûé ðàç çàïðàøèâàë ïîäòâåðæäåíèå, äîáàâüòå 'c' + :%s/old/new/gc +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 5.1: ÊÀÊ ÂÛÏÎËÍÈÒÜ ÂÍÅØÍÞÞ ÊÎÌÀÍÄÓ + + + ** Íàáåðèòå :! è çàòåì âíåøíþþ êîìàíäó, êîòîðóþ ñëåäóåò âûïîëíèòü. ** + + 1. Íàáåðèòå óæå çíàêîìóþ Âàì êîìàíäó : äëÿ óñòàíîâêè êóðñîðà â êîìàíäíóþ + ñòðîêó ðåäàêòîðà. Ýòî ïîçâîëèò Âàì ââåñòè êîìàíäó. + + 2. Òåïåðü íàáåðèòå ñèìâîë ! (âîñêëèöàòåëüíûé çíàê). Òåïåðü ìîæíî èñïîëíèòü + âíåøíþþ êîìàíäó, èñïîëüçóÿ êîìàíäíóþ îáîëî÷êó. + + 3. Äëÿ ïðèìåðà íàáåðèòå ls ïîñëå ! è íàæìèòå . Ýòà êîìàíäà âûâåäåò + ñïèñîê ôàéëîâ â òåêóùåì êàòàëîãå, òî÷íî òàêæå, êàê åñëè áû Âû ââåëè ýòó + êîìàíäó â ïðèãëàøåíèè îáîëî÷êè. Èëè ïîïðîáóéòå :!dir , åñëè ïðåäûäóùàÿ + êîìàíäà íå ñðàáîòàëà. + +---> Çàìå÷àíèå: Òàêèì ñïîñîáîì ìîæíî âûïîëíèòü ëþáóþ âíåøíþþ êîìàíäó. + +---> Çàìå÷àíèå: Âñå êîìàíäû, íà÷èíàþùèåñÿ ñ : , äîëæíû çàâåðøàòüñÿ íàæàòèåì + . + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 5.2: ÊÀÊ ÇÀÏÈÑÀÒÜ ÔÀÉË + + +** Äëÿ ñîõðàíåíèÿ èçìåíåíèé, ïðîèçâåäåííûõ â ôàéëå, íàáåðèòå :w ÈÌß_ÔÀÉËÀ. ** + + 1. Íàáåðèòå :!dir èëè :!ls äëÿ ïîëó÷åíèÿ ñïèñêà ôàéëîâ â òåêóùåì êàòàëîãå. + Êàê Âàì óæå èçâåñòíî, Âû äîëæíû íàæàòü ïîñëå ââîäà ýòèõ êîìàíä. + + 2. Ïðèäóìàéòå íàçâàíèå äëÿ ôàéëà, êîòîðîå åùå íå ñóùåñòâóåò, íàïðèìåð TEST. + + 3. Òåïåðü íàáåðèòå :w TEST (ãäå TEST --- ýòî èìÿ ôàéëà, ïðèäóìàííîå Âàìè.) + + 4. Ýòà êîìàíäà ñîõðàíèò âåñü ôàéë (Ó÷åáíèê ïî Vim) ïîä èìåíåì TEST. ×òîáû + óäîñòîâåðèòüñÿ â ýòîì, ñíîâà íàáåðèòå :!dir è ïðîñìîòðèòå êàòàëîã. + +---> Çàìåòüòå, ÷òî åñëè Âû âûéäåòå èç Vim è çàòåì çàïóñòèòå åãî ñíîâà ñ + ôàéëîì TEST, ýòîò ôàéë áóäåò òî÷íîé êîïèåé ó÷åáíèêà â òîò ìîìåíò, êîãäà + Âû åãî ñîõðàíèëè. + + 5. Òåïåðü óäàëèòå ýòîò ôàéë, íàáðàâ :!del TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 5.3: ÂÛÁÎÐÎ×ÍÎÅ ÑÎÕÐÀÍÅÍÈÅ + + + ** Äëÿ ñîõðàíåíèÿ ÷àñòè ôàéëà, íàáåðèòå :#,# w ÈÌß_ÔÀÉËÀ ** + + 1. Åùå ðàç íàáåðèòå :!dir èëè :!ls äëÿ ïîëó÷åíèÿ ñïèñêà ôàéëîâ â òåêóùåì + êàòàëîãå è âûáåðèòå ïîäõîäÿùåå èìÿ, íàïðèìåð TEST. + + 2. Ïåðåìåñòèòå êóðñîð ê íà÷àëó ýòîé ñòðàíèöû è íàæìèòå Ctrl-g äëÿ íàõîæäåíèÿ + íîìåðà ñòðîêèto. ÇÀÏÎÌÍÈÒÅ ÝÒÎÒ ÍÎÌÅÐ! + + 3. Òåïåðü ïåðåìåñòèòåñü â êîíåö ñòðàíèöû è âíîâü íàáåðèòå Ctrl-g. ÇÀÏÎÌÍÈÒÅ + È ÝÒÎÒ ÍÎÌÅÐ ÒÎÆÅ! + + 4. Äëÿ ñîõðàíåíèÿ ÒÎËÜÊÎ ×ÀÑÒÈ ôàéëà íàáåðèòå :#,# w TEST , ãäå #,# --- ýòî + íîìåðà, êîòîðûå Âû çàïîìíèëè (íà÷àëî, êîíåö), à TEST --- èìÿ âàøåãî ôàéëà. + + 5. Êàê è ïðåæäå, óáåäèòåñü â íàëè÷èè ýòîãî ôàéëà êîìàíäîé :!dir , íî ÍÅ + ÓÄÀËßÉÒÅ åãî. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 5.4: ×ÒÅÍÈÅ È ÎÁÚÅÄÈÍÅÍÈÅ ÔÀÉËΠ+ + ** Äëÿ âñòàâêè ñîäåðæèìîãî ôàéëà, íàáåðèòå :r FILENAME ** + + 1. Íàáåðèòå :!dir äëÿ òîãî, ÷òîáû óáåäèòüñÿ â òîì, ÷òî ôàéë TEST âñå åùå + ñóùåñòâóåò. + + 2. Óñòàíîâèòå êóðñîð â âåðõíåé ÷àñòè ýòîé ñòðàíèöû. + +Çàìå÷àíèå: Ïîñëå âûïîëíåíèÿ øàãà 3 Âû óâèäèòå Óðîê 5.3. Ïîñëå ýòîãî + ïåðåìåùàéòåñü ÂÍÈÇ, ñíîâà ê ýòîìó óðîêó. + + 3. Òåïåðü ïðî÷èòàéòå Âàø ôàéë TEST, èñïîëüçóÿ êîìàíäó :r TEST , ãäå + TEST --- ýòî èìÿ ôàéëà. + +Çàìå÷àíèå: Ïðî÷èòàííûé Âàìè ôàéë áóäåò âñòàâëåí â òîì ìåñòå, ãäå íàõîäèòñÿ + êóðñîð. + + 4. ×òîáû óáåäèòüñÿ â òîì, ÷òî ôàéë ïðî÷èòàí, ïåðåìåñòèòåñü íåìíîãî íàçàä ïî + òåêñòó è çàìåòüòå, ÷òî òåïåðü ñóùåñòâóþò äâå êîïèè Óðîêà 5.3, èñõîäíàÿ + è ïîëó÷åííàÿ èç ôàéëà. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÐÅÇÞÌÅ ÓÐÎÊÀ 5 + + + 1. :!êîìàíäà èñïîëíÿåò âíåøíþþ êîìàíäó. + + Íåêîòîðûå ïîëåçíûå ïðèìåðû: + :!dir --- âûâîäèò ñïèñîê ôàéëîâ â êàòàëîãå. + :!del FILENAME --- óäàëÿåò ôàéë FILENAME. + + 2. :w FILENAME çàïèñûâàåò òåêóùèé ðåäàêòèðóåìûé ôàéë íà äèñê + ïîä èìåíåì FILENAME. + + 3. :#,#w FILENAME ñîõðàíÿåò ñòðîêè îò # äî # â ôàéë FILENAME. + + 4. :r FILENAME ñ÷èòûâàåò ñ äèñêà ôàéë FILENAME è ïîìåùàåò åãî â òåêóùèé + ôàéë ñëåäîì çà ïîçèöèåé êóðñîðà. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 6.1: ÊÎÌÀÍÄÀ ÑÎÇÄÀÍÈß + + + ** Íàáåðèòå o ÷òîáû ñîçäàòü ïóñòóþ ñòðîêó ïîä êóðñîðîì è ïåðåéòè â ðåæèì + âñòàâêè (Insert mode) ** + + 1. Ïåðåìåñòèòå êóðñîð âíèç, ê ñòðîêå, ïîìå÷åííîé --->. + + 2. Íàáåðèòå o (â íèæíåì ðåãèñòðå) äëÿ òîãî, ÷òîáû ñîçäàòü ïóñòóþ ñòðîêó + ÍÈÆÅ êóðñîðà è ïåðåéòè â ðåæèì âñòàâêè (Insert mode). + + 3. Òåïåðü ñêîïèðóéòå ïîìå÷åííóþ ---> ñòðîêó è íàæìèòå äëÿ âûõîäà èç + ðåæèìà âñòàâêè. + +---> Ïîñëå íàæàòèÿ o êóðñîð ïåðåéäåò íà íîâóþ ïóñòóþ ñòðîêó â ðåæèìå âñòàâêè. + + 4. Äëÿ ñîçäàíèÿ ñòðîêè ÂÛØÅ êóðñîðà, ïðîñòî íàáåðèòå çàãëàâíóþ O, âìåñòî + ñòðî÷íîé o. Ïîïðîáóéòå ïðîäåëàòü ýòî ñ íèæåñëåäóþùåé ñòðîêîé. +Ñîçäàéòå íîâóþ ñòðîêó íàä ýòîé, íàæàâ Shift-O, ïîìåñòèâ êóðñîð íà ýòó ñòðîêó. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 6.2: ÊÎÌÀÍÄÀ ÄÎÁÀÂËÅÍÈß + + ** Íàáåðèòå a , ÷òîáû âñòàâèòü òåêñò ÏÎÑËÅ êóðñîðà. ** + + 1. Ïåðåìåñòèòå êóðñîð âíèç, â êîíåö ïåðâîé ñòðîêè, ïîìå÷åííîé ---> , + íàáðàâ $ â îáû÷íîì ðåæèìå (Normal mode). + + 2. Íàáåðèòå a (â íèæíåì ðåãèñòðå) äëÿ äîáàâëåíèÿ òåêñòà ÏÎÑËÅ ñèìâîëà, + íàõîäÿùåãîñÿ ïîä êóðñîðîì. (Çàãëàâíàÿ A ïîçâîëÿåò äîáàâèòü â êîíåö + ñòðîêè.) + +Çàìå÷àíèå: Ýòî ïîçâîëÿåò èçáåæàòü íàæàòèÿ i , ïîñëåäíåãî ñèìâîëà, òåêñòà äëÿ + âñòàâêè, , êóðñîð-âïðàâî, è, íàêîíåö, x , ïðîñòî äëÿ òîãî, + ÷òîáû äîáàâèòü òåñò â êîíåö ñòðîêè! + + 3. Òåïåðü çàâåðøèòå ïåðâóþ ñòðîêó. Çàìåòüòå òàêæå, ÷òî äîáàâëåíèå ýòî â + òî÷íîñòè òî æå ñàìîå, ÷òî è ðåæèì âñòàâêè, çà èñêëþ÷åíèåì ïîçèöèè, â + êîòîðóþ áóäåò âñòàâëåí òåêñò. + +---> Ýòà ñòðî÷êà ïîçâîëèò Âàì ïîïðàêòèêîâàòüñÿ +---> Ýòà ñòðî÷êà ïîçâîëèò Âàì ïîïðàêòèêîâàòüñÿ â äîáàâëåíèè òåêñòà â êîíåö + ñòðîêè. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 6.3: ÅÙÅ ÎÄÈÍ ÑÏÎÑÎÁ ÇÀÌÅÍÛ + + + ** Íàáåðèòå çàãëàâíóþ R äëÿ çàìåíû áîëåå, ÷åì îäíîãî ñèìâîëà. ** + + 1. Ïåðåìåñòèòå êóðñîð âíèç, ê ñòðîêå, ïîìå÷åííîé --->. + + 2. Ðàñïîëîæèòå êóðñîð â íà÷àëå ïåðâîãî ñëîâà, îòëè÷àþùåãîñÿ îò + ñîîòâåòñòâóþùåãî â ñëåäóþùåé ñòðîêå, ïîìå÷åííîé ---> (ñëîâî 'ïîñëåäíåé'). + + 3. Òåïåðü íàáåðèòå R è çàìåíèòå îñòàòîê òåêñòà â ïåðâîé ñòðîêå, íàáðàâ + ïîâåðõ ñòàðîãî òåêñòà òàê, ÷òîáû îáå ñòðîêè ñòàëè îäèíàêîâûìè. + +---> Ïåðâóþ ñòðîêó ìîæíî ñðàâíÿòü ñ ïîñëåäíåé, èñïîëüçóÿ êëàâèøè. +---> Ïåðâóþ ñòðîêó ìîæíî ñðàâíÿòü ñ âòîðîé, èñïîëüçóÿ R è íàáðàâ íîâûé òåêñò. + + 4. Îáðàòèòå âíèìàíèå, ÷òî ïðè íàæàòèè äëÿ çàâåðøåíèÿ, ëþáîé + íå èçìåíåííûé òåêñò ñîõðàíèòñÿ. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 6.4: ÓÑÒÀÍÎÂÊÀ ÏÀÐÀÌÅÒÐΠ+ + +** Óñòàíîâèì ïàðàìåòðû òàê, ÷òîáû èãíîðèðîâàòü ðåãèñòð ïðè ïîèñêå èëè çàìåíå ** + + + 1. Ïîèùèòå ñëîâî 'èãíîðèðîâàòü', íàáðàâ: + /èãíîðèðîâàòü + Ïîâòîðèòå ïîèñê íåñêîëüêî ðàç, íàæèìàÿ êëàâèøó n + + 2. Âêëþ÷èòå ïàðàìåòð 'ic' (Èãíîðèðîâàòü ðåãèñòð), íàáðàâ: + :set ic + + 3. Òåïåðü ñíîâà ñäåëàéòå ïîèñê ñëîâà 'èãíîðèðîâàòü', íàæàâ: n + Ïîâòîðèòå ïîèñê íåñêîëüêî ðàç, íàæèìàÿ êëàâèøó n + + 4. Âêëþ÷èòå ïàðàìåòðû 'hlsearch' è 'incsearch': + :set hls is + + 5. Òåïåðü îïÿòü ââåäèòå êîìàíäó ïîèñêà è ïîñìîòðèòå, ÷òî ïîëó÷èòñÿ: + /èãíîðèðîâàòü + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ÐÅÇÞÌÅ ÓÐÎÊÀ 6 + + + 1. Íàæàòèå o ñîçäàåò ñòðîêó ÍÈÆÅ êóðñîðà è ïåðåìåùàåò êóðñîð â íåå â ðåæèìå + âñòàâêè. + Íàæàòèå çàãëàâíîé O ñîçäàåò ñòðîêó ÂÛØÅ ñòðîêè, â êîòîðîé íàõîäèòñÿ + êóðñîð. + + 2. Íàáåðèòå a äëÿ âñòàâêè òåêñòà ÏÎÑËÅ ñèìâîëà, íà êîòîðîì íàõîäèòñÿ êóðñîð. + Íàæàòèå çàãëàâíîé A àâòîìàòè÷åñêè ïåðåìåùàåò Âàñ äëÿ äîáàâëåíèÿ òåêñòà + â êîíåö ñòðîêè. + + 3. Íàæàòèå çàãëàâíîé R ïåðåâîäèò Âàñ â ðåæèì çàìåíû äî òåõ ïîð, ïîêà íå + áóäåò íàæàòà êëàâèøà äëÿ çàâåðøåíèÿ. + + 4. Íàáðàâ ":set xxx" âû ñìîæåòå âêëþ÷èòü ïàðàìåòð "xxx" + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Óðîê 7: ÊÎÌÀÍÄÛ ÏÎËÓ×ÅÍÈß ÂÑÒÐÎÅÍÍÎÉ ÑÏÐÀÂÊÈ + + ** Èñïîëüçóéòå âñòðîåííóþ ñïðàâî÷íóþ ñèñòåìó ** + + Vim îáëàäàåò ìîùíîé âñòðîåííîé ñïðàâî÷íîé ñèñòåìîé. Äëÿ íà÷àëà ïîïðîáóéòå + îäèí èç òðåõ âàðèàíòîâ: + - íàæìèòå êëàâèøó (åñëè òàêîâàÿ èìååòñÿ íà êëàâèàòóðå) + - íàæìèòå êëàâèøó (åñëè òàêîâàÿ èìååòñÿ íà êëàâèàòóðå) + - íàáåðèòå :help + + Íàáåðèòå :q ÷òîáû çàêðûòü îêíî ñïðàâêè. + + Âû ìîæåòå íàéòè ñïðàâêó äëÿ ëþáîãî ïîíÿòèÿ èëè êîìàíäû, ïðîñòî çàäàâ + ñîîòâåòñòâóþùèé àðãóìåíò êîìàíäå ":help". Ïîïðîáóéòå ñëåäóþùåå (íå çàáóäüòå + íàæàòü ): + + :help w + :help c_, 2002. + Translator: Andrey Kiselev , 2002. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.ru.utf-8 b/vim/bundle/ubuntu-vim72/tutor/tutor.ru.utf-8 new file mode 100644 index 0000000..c12de27 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.ru.utf-8 @@ -0,0 +1,834 @@ +=============================================================================== += Д о б Ñ€ о п о ж а л о в а Ñ‚ ÑŒ в у ч е б н и к VIM - ВерÑÐ¸Ñ 1.5 = +=============================================================================== + Vim --- Ñто очень мощный редактор, имеющий множеÑтво команд, Ñлишком + много Ð´Ð»Ñ Ñ‚Ð¾Ð³Ð¾, чтобы их вÑе можно было опиÑать в таком учебнике, как + Ñтот. Этот учебник призван объÑÑнить доÑтаточное чиÑло команд Ð´Ð»Ñ Ñ‚Ð¾Ð³Ð¾, + чтобы Ð’Ñ‹ могли Ñ Ð»ÐµÐ³ÐºÐ¾Ñтью иÑпользовать Vim в качеÑтве редактора общего + назначениÑ. + + Вам потребуетÑÑ Ð¿Ñ€Ð¸Ð±Ð»Ð¸Ð·Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð¾ 25-30 минут на оÑвоение данного учебника в + завиÑимоÑти от того, Ñколько времени Ð’Ñ‹ потратите на ÑкÑперименты. + + Команды в уроках будут модифицировать текÑÑ‚. Создайте копию Ñтого файла, + чтобы попрактиковатьÑÑ Ð½Ð° ней (еÑли Ð’Ñ‹ запуÑтили "vimtutor", то Ñто уже + копиÑ). + + Важно помнить, что Ñтот учебник предназначен Ð´Ð»Ñ Ð¾Ð±ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð² процеÑÑе + иÑпользованиÑ. Это означает, что Ð’Ñ‹ должны запуÑкать команды Ð´Ð»Ñ Ñ‚Ð¾Ð³Ð¾, + чтобы как Ñледует их изучить. ЕÑли Ð’Ñ‹ проÑто прочитаете текÑÑ‚, то + забудете команды! + + Теперь убедитеÑÑŒ в том, что клавиша CapsLock не включена и нажмите + клавишу j неÑколько раз, так, чтобы Урок 1.1 полноÑтью помеÑтилÑÑ Ð½Ð° + Ñкране. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 1.1: ПЕРЕМЕЩЕÐИЕ КУРСОРР+ +** Ð”Ð»Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ ÐºÑƒÑ€Ñора нажмите клавиши h,j,k,l так, как показано ниже. ** + ^ + k Советы: Клавиша h находитÑÑ Ñлева и перемещает влево. + < h l > Клавиша l находитÑÑ Ñправа и перемещает вправо. + j Клавиша j похожа на Ñтрелку `вниз'. + v + 1. Подвигайте курÑор по Ñкрану, пока не почувÑтвуете ÑÐµÐ±Ñ ÑƒÐ²ÐµÑ€ÐµÐ½Ð½Ð¾. + + 2. Ðадавите клавишу `вниз' (j) пока она не начнет повторÑтьÑÑ. +---> Теперь Ð’Ñ‹ знаете, как перейти к Ñледующему уроку. + + 3. ИÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ ÐºÐ»Ð°Ð²Ð¸ÑˆÑƒ `вниз' перейдите к Уроку 1.2. + +Замечание: ЕÑли вы пока не уверены в том, что набираете, нажмите Ð´Ð»Ñ + перехода в обычный режим (Normal mode). ПоÑле Ñтого перенаберите + требуемую команду. + +Замечание: Обычные клавиши ÑƒÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ ÐºÑƒÑ€Ñором (Ñтрелки) также должны + работать. Однако, клавиши hjkl позволÑÑ‚ Вам перемещатьÑÑ + значительно быÑтрее, как только Ð’Ñ‹ научитеÑÑŒ ими пользоватьÑÑ. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 1.2: ЗÐПУСК И ЗÐВЕРШЕÐИЕ РÐБОТЫ С VIM + +!! Ð’ÐИМÐÐИЕ! Прежде, чем выполнÑть любой из опиÑанных ниже шагов, прочтите + урок целиком !! + + 1. Ðажмите клавишу (Ð´Ð»Ñ Ñ‚Ð¾Ð³Ð¾, чтобы удоÑтоверитьÑÑ, что Ð’Ñ‹ в обычном + режиме (Normal mode)). + + 2. Ðаберите: :q! . + +---> Это позволит Вам выйти из редактора БЕЗ СОХРÐÐЕÐИЯ любых Ñделанных + изменений. ЕÑли Ð’Ñ‹ хотите Ñохранить Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¸ выйти: + :wq + + 3. Когда Ð’Ñ‹ увидите приглашение командной оболочки, наберите команду, + ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ð¿Ñ€Ð¸Ð²ÐµÐ»Ð° Ð’Ð°Ñ Ð² Ñтот учебник. Это может быть + vimtutor ru + Обычно можно иÑпользовать: vim tutor.ru + +---> 'vim' позволÑет запуÑтить редактор vim, 'tutor.ru' --- Ñто файл, который + Ð’Ñ‹ будете редактировать. + + 4. ЕÑли Ð’Ñ‹ уверены в том, что запомнили Ñти шаги, выполните шаги от 1 до 3 + чтобы выйти Ñнова запуÑтить редактор. Затем перемеÑтите курÑор вниз к + Уроку 1.3. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 1.3: РЕДÐКТИРОВÐÐИЕ ТЕКСТР- УДÐЛЕÐИЕ + + +** ÐаходÑÑÑŒ в обычном режиме нажмите x, чтобы удалить Ñимвол под курÑором. ** + + 1. ПеремеÑтите курÑор к Ñтроке внизу, помеченной --->. + + 2. Ð”Ð»Ñ Ð¸ÑÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð¾ÑˆÐ¸Ð±Ð¾Ðº, перемеÑтите курÑор, пока он не окажетÑÑ Ð½Ð°Ð´ + удалÑемым Ñимволом. + + 3. Ðажмите клавишу x Ð´Ð»Ñ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ñ‚Ñ€ÐµÐ±ÑƒÐµÐ¼Ð¾Ð³Ð¾ Ñимвола. + + 4. Повторите шаги 2--4 пока Ñтрока не будет иÑправлена. + +---> От тттопота копытт пппыль ппо ппполю леттитт. + + 5. Теперь, когда Ñтрока откорректирована, переходите к уроку 1.4. + +ЗÐМЕЧÐÐИЕ: Ð’ ходе оÑÐ²Ð¾ÐµÐ½Ð¸Ñ Ñтого учебника не пытайтеÑÑŒ запоминать, учите + в процеÑÑе иÑпользованиÑ. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 1.4: РЕДÐКТИРОВÐÐИЕ ТЕКСТР- ВСТÐВКР+ + + ** ÐаходÑÑÑŒ в обычном режиме (Normal mode), нажмите i Ð´Ð»Ñ Ð²Ñтавки текÑта. ** + + 1. ПеремеÑтите курÑор к первой Ñтроке внизу, помеченной --->. + + 2. Ð”Ð»Ñ Ñ‚Ð¾Ð³Ð¾, чтобы Ñделать первую Ñтроку идентичной второй, помеÑтите + курÑор на Ñимвол ПЕРЕД которым Ñледует вÑтавить текÑÑ‚. + + 3. Ðажмите i и наберите требуемые добавлениÑ. + + 4. ПоÑле иÑÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð²Ñех ошибок нажмите Ð´Ð»Ñ Ð²Ð¾Ð·Ð²Ñ€Ð°Ñ‚Ð° в обычный режим. + Повторите шаги 2--4, пока фраза не будет иÑправлена полноÑтью. + +---> ЧаÑть текÑта в Ñтроке беÑледно . +---> ЧаÑть текÑта в Ñтой Ñтроке беÑÑледно пропала. + + 5. Когда оÑвоите вÑтавку текÑта, переходите дальше к Резюме. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + РЕЗЮМЕ УРОКР1 + + 1. КурÑор перемещаетÑÑ Ð»Ð¸Ð±Ð¾ клавишами Ñо Ñтрелками, либо клавишами hjkl. + h (влево) j (вниз) k (вверх) l (вправо) + + 2. Ð”Ð»Ñ Ð·Ð°Ð¿ÑƒÑка Vim (из Ð¿Ñ€Ð¸Ð³Ð»Ð°ÑˆÐµÐ½Ð¸Ñ % командной оболочки) наберите: + vim ИМЯ_ФÐЙЛР+ + 3. Ð”Ð»Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð¸Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ Ñ Vim наберите: + :q! чтобы отказатьÑÑ Ð¾Ñ‚ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ð¹. + Или наберите: + :wq чтобы Ñохранить изменениÑ. + + 4. Ð”Ð»Ñ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ñимвола под курÑором в обычном режиме, наберите: x + + 5. Чтобы вÑтавить текÑÑ‚ перед курÑором в обычном режиме, наберите: + i вводите текÑÑ‚ + +ЗÐМЕЧÐÐИЕ: Ðажатие перемеÑтит Ð’Ð°Ñ Ð² обычный режим (Normal mode) либо + прервет нежелательную и чаÑтично завершенную команду. + +Теперь переходим к Уроку 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 2.1: КОМÐÐДЫ УДÐЛЕÐИЯ + + + ** Ðаберите dw Ð´Ð»Ñ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ ÑƒÑ‡Ð°Ñтка текÑта до конца Ñлова. ** + + 1. Ðажмите , чтобы перейти в обычный режим. + + 2. ПеремеÑтите курÑор вниз, к Ñтроке, помеченной --->. + + 3. ПеремеÑтите курÑор в начало Ñлова, которое Ñледует удалить. + + 4. Ðаберите dw , чтобы удалить Ñто Ñлово. + +ЗÐМЕЧÐÐИЕ: Во Ð²Ñ€ÐµÐ¼Ñ Ð½Ð°Ð±Ð¾Ñ€Ð° буквы dw поÑвÑÑ‚ÑÑ Ð² поÑледней Ñтроке Ñкрана. ЕÑли + Ð’Ñ‹ что-то наберете неправильно, нажмите и начните Ñначала. + +---> ÐеÑколько Ñлов рафинад в Ñтом предложении автокран излишни. + + 5. Повторите шаги 3 и 4, пока не иÑправите вÑе ошибки и переходите к + Уроку 2.2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 2.2: ДОПОЛÐИТЕЛЬÐЫЕ КОМÐÐДЫ УДÐЛЕÐИЯ + + + ** Ðаберите d$ Ð´Ð»Ñ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ñ‚ÐµÐºÑта до конца Ñтроки. ** + + 1. Ðажмите , чтобы перейти в обычный режим. + + 2. ПеремеÑтите курÑор вниз, к Ñтроке, помеченной --->. + + 3. ПеремеÑтите курÑор к концу правильной Ñтроки (ПОСЛЕ первой . ). + + 4. Чтобы удалить оÑтаток Ñтроки, наберите d$ . + +---> Кто-то набрал окончание Ñтой Ñтроки дважды. окончание Ñтой Ñтроки дважды. + + + 5.Чтобы лучше разобратьÑÑ Ð² Ñтом, переходите к Уроку 2.3. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 2.3: КОМÐÐДЫ И ОБЪЕКТЫ + + + Формат команды `удаление' d таков: + + [чиÑло] d объект ИЛИ d [чиÑло] объект + ЗдеÑÑŒ: + чиÑло - Ñколько раз иÑполнить команду (необÑзательно, по умолчанию=1). + d - команда удалениÑ. + объект - Ñ Ñ‡ÐµÐ¼ команда должна быть выполнена (перечиÑлено ниже). + + Краткий ÑпиÑок объектов: + w - от курÑора до конца Ñлова, Ð²ÐºÐ»ÑŽÑ‡Ð°Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐ°ÑŽÑ‰Ð¸Ð¹ пробел. + e - от курÑора до конца Ñлова, ÐЕ Ð²ÐºÐ»ÑŽÑ‡Ð°Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐ°ÑŽÑ‰Ð¸Ð¹ пробел. + $ - от курÑора до конца Ñтроки. + ^ - от курÑора до начала Ñтроки. + +ЗÐМЕЧÐÐИЕ: ПроÑтое нажатие на Ñимвол объекта в обычном режиме (Normal mode) + без дополнительных команд передвинет курÑор так, как указано в + ÑпиÑке объектов. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 2.4: ИСКЛЮЧЕÐИЕ ИЗ ПРÐВИЛР`КОМÐÐДÐ-ОБЪЕКТ' + + + ** Ðаберите dd Ð´Ð»Ñ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ð²Ñей Ñтроки. ** + + Ð’ÑледÑтвие чаÑтого Ð¿Ñ€Ð¸Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ð¸ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ð²Ñей Ñтроки, разработчики + Vim решили, что Ð´Ð»Ñ Ñтого проще вÑего проÑто набрать d дважды. + + 1. ПеремеÑтите курÑор вниз, ко второй Ñтроке фразы. + 2. Ðаберите dd Ð´Ð»Ñ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ñтроки. + 3. Теперь перемеÑтитеÑÑŒ к четвертой Ñтроке. + 4. Ðаберите 2dd (вÑпомните правило `чиÑло-команда-объект'), чтобы удалить + две Ñтроки. + + 1) Летом Ñ Ñ…Ð¾Ð¶Ñƒ на Ñтадион, + 2) О, как внезапно кончилÑÑ Ð´Ð¸Ð²Ð°Ð½! + 3) Я болею за ``Зенит'', ``Зенит'' --- чемпион! + 4) Печально Ñ Ð³Ð»Ñжу на наше поколение! + 5) Его грÑдущее иль пуÑто иль темно... + 6) Я Ñижу на Ñкамейке в ложе `Б' + 7) И играю на большой жеÑÑ‚Ñной трубе. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 2.5: КОМÐÐДР`ОТКÐТ' + + + ** Ðажмите u Ð´Ð»Ñ Ð¾Ñ‚Ð¼ÐµÐ½Ñ‹ результата работы предыдущей команды, U Ð´Ð»Ñ Ð¾Ñ‚Ð¼ÐµÐ½Ñ‹ + иÑправлений во вÑей Ñтроке. ** + + 1. ПеремеÑтите курÑор вниз, к Ñтроке, помеченной ---> и уÑтановите его на + первую ошибку. + 2. Ðажмите x Ð´Ð»Ñ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ð¿ÐµÑ€Ð²Ð¾Ð³Ð¾ неправильного Ñимвола. + 3. Теперь нажмите u Ð´Ð»Ñ Ð¾Ñ‚Ð¼ÐµÐ½Ñ‹ (отката) поÑледней выполненной команды. + 4. ИÑправьте вÑе ошибки в Ñтроке, иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñƒ x . + 5. Теперь нажмите заглавную U Ð´Ð»Ñ Ñ‚Ð¾Ð³Ð¾, чтобы вернуть вÑÑŽ Ñтроку в иÑходное + ÑоÑтоÑние. + 6. Ðажмите u неÑколько раз Ð´Ð»Ñ Ð¾Ñ‚Ð¼ÐµÐ½Ñ‹ команды U и предыдущих команд. + 7. Ðажмите теперь CTRL-R (удерживайте клавишу CTRL нажатой в момент Ð½Ð°Ð¶Ð°Ñ‚Ð¸Ñ + R) неÑколько раз Ð´Ð»Ñ Ð²Ð¾Ð·Ð²Ñ€Ð°Ñ‚Ð° команд (откат отката). + +---> ИÑпрравьте оошибки в Ñтойй Ñтроке и вернитте их ÑÑ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŒÑŽ `отката'. + + 8. Это были очень полезные команды. Далее переходите к Резюме Урока 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + РЕЗЮМЕ УРОКР2 + + + 1. Ð”Ð»Ñ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ñ‚ÐµÐºÑта от курÑора до конца Ñлова наберите: dw + + 2. Ð”Ð»Ñ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ñ‚ÐµÐºÑта от курÑора до конца Ñтроки наберите: d$ + + 3. Ð”Ð»Ñ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ð²Ñей Ñтроки наберите: dd + + 4. Формат команды в обычном режиме имеет вид: + + [чиÑло] команда объект ИЛИ команда [чиÑло] объект + где: + чиÑло - Ñколько раз повторить выполнение команды + команда - что выполнить, например d Ð´Ð»Ñ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ + объект - на что должна воздейÑтвовать команда, например w (Ñлово), + $ (до конца Ñтроки), и Ñ‚.д. + + 5. Ð”Ð»Ñ Ð¾Ñ‚Ð¼ÐµÐ½Ñ‹ (отката) предшеÑтвующих дейÑтвий наберите: u (ÑÑ‚Ñ€Ð¾Ñ‡Ð½Ð°Ñ u) + Ð”Ð»Ñ Ð¾Ñ‚Ð¼ÐµÐ½Ñ‹ (отката) вÑех изменений в Ñтроке наберите: U (пропиÑÐ½Ð°Ñ U) + Ð”Ð»Ñ Ð¾Ñ‚Ð¼ÐµÐ½Ñ‹ отката наберите: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 3.1: КОМÐÐДРВСТÐВКИ + + + ** Ðаберите p Ð´Ð»Ñ Ð²Ñтавки поÑледнего удаленного текÑта поÑле курÑора. ** + + 1. ПеремеÑтите курÑор вниз к поÑледней Ñтроке из набора. + + 2. Ðаберите dd Ð´Ð»Ñ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ñтроки и ее ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð² буфере Vim'а. + + 3. ПеремеÑтите курÑор к Ñтроке ÐÐД тем меÑтом, куда Ñледует вÑтавить + удаленную Ñтроку. + + 4. ÐаходÑÑÑŒ в обычном режиме наберите p Ð´Ð»Ñ Ð·Ð°Ð¼ÐµÐ½Ñ‹ Ñтроки. + + 5. Повторите шаги 2--4, пока не раÑÑтавите вÑе Ñтроки в нужном порÑдке. + + г) И лучше выдумать не мог. + б) Когда не в шутку занемог, + в) Он уважать ÑÐµÐ±Ñ Ð·Ð°Ñтавил + а) Мой дÑÐ´Ñ Ñамых чеÑтных правил + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 3.2: КОМÐÐДРЗÐМЕÐЫ + + + ** Ðаберите r и Ñимвол, заменÑющий Ñимвол под курÑором. ** + + 1. ПеремеÑтите курÑор вниз, к Ñтроке, помеченной --->. + + 2. УÑтановите курÑор так, чтобы он находилÑÑ Ð½Ð°Ð´ первой ошибкой. + + 3. Ðаберите r и затем Ñимвол, иÑправлÑющий ошибку. + + 4. Повторите шаги 2 и 3, пока Ð¿ÐµÑ€Ð²Ð°Ñ Ñтрока не будет иÑправлена. + +---> Ð’ момегт набтра Ñтой чтроки кое0кто Ñ Ñ‚Ñ€ÑƒÐ´Ð¾Ð¼ попвдал по клваишам! +---> Ð’ момент набора Ñтой Ñтроки кое-кто Ñ Ñ‚Ñ€ÑƒÐ´Ð¾Ð¼ попадал по клавишам! + + 5. Теперь переходите к Уроку 3.2. + +ЗÐМЕЧÐÐИЕ: Помните, что вы должны учитьÑÑ Ð² процеÑÑе работы, а не проÑто + запоминаÑ. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 3.3: КОМÐÐДРИЗМЕÐЕÐИЯ + + + ** Ð”Ð»Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ñ‡Ð°Ñти Ñлова наберите cw . ** + + 1. ПеремеÑтите курÑор вниз, к Ñтроке, помеченной --->. + + 2. РаÑположите курÑор над буквой `o' в Ñлове `Ñола'. + + 3. Ðаберите cw и иÑправьте Ñлово (в данном Ñлучае, наберите `лов'.) + + 4. Ðажмите и переходите к Ñледующей ошибке (к первому Ñимволу, который + надо изменить.) + + 5. Повторите шаги 3--4 пока первое предложение не Ñтанет идентичным второму. + +---> ÐеÑколько Ñола в Ñьгц Ñтроке тпгшцбь редалзкуюиеÑвх. +---> ÐеÑколько Ñлов в Ñтой Ñтроке требуют редактированиÑ. + +Обратите внимание, что cw не только заменÑет Ñлово, но и переводит Ð²Ð°Ñ Ð² режим +вÑтавки. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 3.4: ПРОДОЛЖÐЕМ ИЗМЕÐЯТЬ С КОМÐÐДОЙ c + + +** Команда замены иÑпользуетÑÑ Ñ Ñ‚ÐµÐ¼Ð¸ же объектами, что и команда удалениÑ. ** + + 1. Команда Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¸Ð¼ÐµÐ½ÑетÑÑ Ñ‚Ð°ÐºÐ¸Ð¼ же образом, как и команда удалениÑ. + Ее формат таков: + + [чиÑло] c объект ИЛИ c [чиÑло] объект + + 2. Объекты также Ñовпадают: w (Ñлово), $ (конец Ñтроки) и Ñ‚.п. + + 3. ПеремеÑтите курÑор вниз, к Ñтроке, помеченной --->. + + 4. Перейдите к первой ошибке. + + 5. Ðаберите c$ и отредактируйте первую Ñтроку так, чтобы она Ñовпадала Ñо + второй, поÑле чего нажмите . + +---> Конец Ñтой Ñтроки нуждаетÑÑ Ð² помощи, чтобы Ñтать похожим на второй. +---> Конец Ñтой Ñтроки нуждаетÑÑ Ð² помощи команды c$ . + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + РЕЗЮМЕ УРОКР3 + + + 1. Ð”Ð»Ñ Ð²Ñтавки текÑта, который только что был удален, наберите p . Эта + команда вÑтавит удаленный текÑÑ‚ ПОСЛЕ курÑора (еÑли была удалена Ñтрока, + то она будет помещена в Ñтроке под курÑором). + + 2. Ð”Ð»Ñ Ð·Ð°Ð¼ÐµÐ½Ñ‹ Ñимвола под курÑором наберите r и затем заменÑющий Ñимвол. + + 3. Команда Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð·Ð²Ð¾Ð»Ñет Вам изменить указанный объект от курÑора до + конца Ñтого объекта. Ðапример, наберите cw Ð´Ð»Ñ Ð·Ð°Ð¼ÐµÐ½Ñ‹ от курÑора до + конца Ñлова, c$ Ð´Ð»Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð´Ð¾ конца Ñтроки. + + 4. Формат команды Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ñ‚Ð°ÐºÐ¾Ð²: + + [чиÑло] c объект ИЛИ c [чиÑло] объект + +Теперь отправлÑйтеÑÑŒ к Ñледующему уроку. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 4.1: ИÐФОРМÐЦИЯ О ФÐЙЛЕ И РÐСПОЛОЖЕÐИЕ Ð’ ÐЕМ + + + ** Ðаберите CTRL-g чтобы увидеть Ваше меÑтораÑположение в файле и информацию + о нем. + Ðаберите SHIFT-G Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ðº заданной Ñтроке в файле. ** + + Замечание: Прочитайте веÑÑŒ урок прежде чем выполнÑть любые команды!! + + 1. Ð£Ð´ÐµÑ€Ð¶Ð¸Ð²Ð°Ñ ÐºÐ»Ð°Ð²Ð¸ÑˆÑƒ Ctrl нажмите g . Внизу Ñкрана поÑвитÑÑ Ñтрока ÑтатуÑа Ñ + именем файла и номером Ñтроки, в которой Ð’Ñ‹ находитеÑÑŒ. Запомните номер + Ñтроки, он потребуетÑÑ Ð½Ð° Шаге 3. + + 2. Ðажмите shift-G Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ðº концу файла. + + 3. Ðаберите номер Ñтроки, в которой вы находилиÑÑŒ и затем shift-G. Это + вернет Ð’Ð°Ñ Ðº Ñтроке, в которой Ð’Ñ‹ были, когда в первый раз нажали Ctrl-g. + (Когда Ð’Ñ‹ будете набирать цифры, они ÐЕ отобразÑÑ‚ÑÑ Ð½Ð° Ñкране.) + + 4. ЕÑли Ð’Ñ‹ запомнили вÑе вышеÑказанное, выполните шаги 1--3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 4.2: КОМÐÐДРПОИСКР+ + ** Ðаберите / и затем введите иÑкомую фразу. ** + + 1. Ð’ обычном режиме (Normal mode) наберите Ñимвол / . Обратите внимание, + что он вмеÑте Ñ ÐºÑƒÑ€Ñором поÑвитÑÑ Ð²Ð½Ð¸Ð·Ñƒ Ñкрана, как Ñто проиÑходит Ñ + командой : . + + 2. Теперь наберите 'ошшшибка' . Это то Ñлово, которое Ð’Ñ‹ будете + иÑкать. + + 3. Ð”Ð»Ñ Ñ‚Ð¾Ð³Ð¾, чтобы повторить поиÑк, проÑто нажмите n . + Ð”Ð»Ñ Ð¿Ð¾Ð¸Ñка Ñтой фразы в обратном направлении, нажмите Shift-N . + + 4. ЕÑли Ð’Ñ‹ желаете Ñразу иÑкать в обратном направлении, иÑпользуйте + команду ? вмеÑто / . + +---> Когда Ð’Ñ‹ при поиÑке доÑтигнете конца файла, поиÑк будет продолжен Ñ + начала. + + "ошшшибка" Ñто не ÑпоÑоб произнеÑÐµÐ½Ð¸Ñ Ñлова `ошибка'; ошшшибка Ñто ошибка. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 4.3: ПОИСК ПÐРÐЫХ СКОБОК + + + ** Ðаберите % Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка парных ),] или } . ** + + 1. ПомеÑтите курÑор над любой из (, [ или { в Ñтроке внизу, помеченной --->. + + 2. Теперь наберите Ñимвол % . + + 3. КурÑор должен переÑкочить на парную Ñкобку. + + 4. Ðаберите % Ð´Ð»Ñ Ð²Ð¾Ð·Ð²Ñ€Ð°Ñ‚Ð° курÑора назад к первой Ñкобке. + +---> Это ( Ñтрока, ÑÐ¾Ð´ÐµÑ€Ð¶Ð°Ñ‰Ð°Ñ Ñ‚Ð°ÐºÐ¸Ðµ (, такие [ ] и такие { } Ñкобки. )) + +Замечание: Это очень удобно при отладке программ Ñ Ð¿Ñ€Ð¾Ð¿ÑƒÑ‰ÐµÐ½Ð½Ñ‹Ð¼Ð¸ Ñкобками! + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 4.4: СПОСОБ ИСПРÐВЛЕÐИЯ ОШИБОК + + + ** Ðаберите :s/было/Ñтало/g Ð´Ð»Ñ Ð·Ð°Ð¼ÐµÐ½Ñ‹ 'было' на 'Ñтало'. ** + + 1. ПеремеÑтите курÑор вниз, к Ñтроке, помеченной --->. + + 2. Ðаберите :s/уводю/увожу . Обратите внимание на то, что Ñта команда + заменит только первое найденное вхождение в Ñтроке. + + 3. Теперь наберите :s/уводю/увожу/g , означающее подÑтановку глобально во + вÑей Ñтроке. Это заменит вÑе найденные в Ñтроке вхождениÑ. + +---> Я уводю к отверженным ÑеленьÑм, Ñ ÑƒÐ²Ð¾Ð´ÑŽ Ñквозь вековечный Ñтон, Ñ ÑƒÐ²Ð¾Ð´ÑŽ к + забытым поколеньÑм. + + 4. Ð”Ð»Ñ Ð·Ð°Ð¼ÐµÐ½Ñ‹ вÑех вхождений поÑледовательноÑти Ñимволов между Ð´Ð²ÑƒÐ¼Ñ + Ñтроками, + наберите :#,#s/было/Ñтало/g где #,# --- номера Ñтих Ñтрок. + Ðаберите :%s/было/Ñтало/g Ð´Ð»Ñ Ð·Ð°Ð¼ÐµÐ½Ñ‹ вÑех вхождений во вÑем файле. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + РЕЗЮМЕ УРОКР4 + 1. Ctrl-g показывает ваше положение в файле и информацию о нем. + Shift-G перемещает Ð’Ð°Ñ Ð² конец файла. Ðомер, за которым Ñледует Shift-G + позволÑет перейти к Ñтроке Ñ Ñтим номером. + + 2. Ðажатие / и затем ввод Ñтроки позволÑет произвеÑти поиÑк Ñтой Ñтроки + ВПЕРЕД по текÑту. + Ðажатие ? и затем ввод Ñтроки позволÑет произвеÑти поиÑк Ñтой Ñтроки + ÐÐЗÐД по текÑту. + ПоÑле поиÑка наберите n Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÑ…Ð¾Ð´Ð° к Ñледующему вхождению иÑкомой + Ñтроки в том же направлении или Shift-N Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÑ…Ð¾Ð´Ð° в противоположном + направлении. + + 3. Ðажатие % , когда курÑор находитÑÑ Ð½Ð° (,),[,],{, или } позволÑет найти + парную Ñкобку. + + 4. Ð”Ð»Ñ Ð¿Ð¾Ð´Ñтановки `Ñтало' вмеÑто первого `было' в Ñтроке, наберите + :s/old/new + Ð”Ð»Ñ Ð¿Ð¾Ð´Ñтановки `Ñтало' вмеÑто вÑех `было' в Ñтроке, наберите + :s/old/new/g + Ð”Ð»Ñ Ð·Ð°Ð¼ÐµÐ½Ñ‹ в интервале между Ð´Ð²ÑƒÐ¼Ñ Ñтроками, наберите + :#,#s/old/new/g + Ð”Ð»Ñ Ð·Ð°Ð¼ÐµÐ½Ñ‹ вÑех вхождений `было' на `Ñтало' в файле, наберите + :%s/old/new/g + Чтобы редактор каждый раз запрашивал подтверждение, добавьте 'c' + :%s/old/new/gc +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 5.1: КÐК ВЫПОЛÐИТЬ Ð’ÐЕШÐЮЮ КОМÐÐДУ + + + ** Ðаберите :! и затем внешнюю команду, которую Ñледует выполнить. ** + + 1. Ðаберите уже знакомую Вам команду : Ð´Ð»Ñ ÑƒÑтановки курÑора в командную + Ñтроку редактора. Это позволит Вам ввеÑти команду. + + 2. Теперь наберите Ñимвол ! (воÑклицательный знак). Теперь можно иÑполнить + внешнюю команду, иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð½ÑƒÑŽ оболочку. + + 3. Ð”Ð»Ñ Ð¿Ñ€Ð¸Ð¼ÐµÑ€Ð° наберите ls поÑле ! и нажмите . Эта команда выведет + ÑпиÑок файлов в текущем каталоге, точно также, как еÑли бы Ð’Ñ‹ ввели Ñту + команду в приглашении оболочки. Или попробуйте :!dir , еÑли Ð¿Ñ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰Ð°Ñ + команда не Ñработала. + +---> Замечание: Таким ÑпоÑобом можно выполнить любую внешнюю команду. + +---> Замечание: Ð’Ñе команды, начинающиеÑÑ Ñ : , должны завершатьÑÑ Ð½Ð°Ð¶Ð°Ñ‚Ð¸ÐµÐ¼ + . + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 5.2: КÐК ЗÐПИСÐТЬ ФÐЙЛ + + +** Ð”Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ð¹, произведенных в файле, наберите :w ИМЯ_ФÐЙЛÐ. ** + + 1. Ðаберите :!dir или :!ls Ð´Ð»Ñ Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ ÑпиÑка файлов в текущем каталоге. + Как Вам уже извеÑтно, Ð’Ñ‹ должны нажать поÑле ввода Ñтих команд. + + 2. Придумайте название Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ð°, которое еще не ÑущеÑтвует, например TEST. + + 3. Теперь наберите :w TEST (где TEST --- Ñто Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°, придуманное Вами.) + + 4. Эта команда Ñохранит веÑÑŒ файл (Учебник по Vim) под именем TEST. Чтобы + удоÑтоверитьÑÑ Ð² Ñтом, Ñнова наберите :!dir и проÑмотрите каталог. + +---> Заметьте, что еÑли Ð’Ñ‹ выйдете из Vim и затем запуÑтите его Ñнова Ñ + файлом TEST, Ñтот файл будет точной копией учебника в тот момент, когда + Ð’Ñ‹ его Ñохранили. + + 5. Теперь удалите Ñтот файл, набрав :!del TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 5.3: ВЫБОРОЧÐОЕ СОХРÐÐЕÐИЕ + + + ** Ð”Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ñ‡Ð°Ñти файла, наберите :#,# w ИМЯ_ФÐЙЛР** + + 1. Еще раз наберите :!dir или :!ls Ð´Ð»Ñ Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ ÑпиÑка файлов в текущем + каталоге и выберите подходÑщее имÑ, например TEST. + + 2. ПеремеÑтите курÑор к началу Ñтой Ñтраницы и нажмите Ctrl-g Ð´Ð»Ñ Ð½Ð°Ñ…Ð¾Ð¶Ð´ÐµÐ½Ð¸Ñ + номера Ñтрокиto. ЗÐПОМÐИТЕ ЭТОТ ÐОМЕР! + + 3. Теперь перемеÑтитеÑÑŒ в конец Ñтраницы и вновь наберите Ctrl-g. ЗÐПОМÐИТЕ + И ЭТОТ ÐОМЕР ТОЖЕ! + + 4. Ð”Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð¢ÐžÐ›Ð¬ÐšÐž ЧÐСТИ файла наберите :#,# w TEST , где #,# --- Ñто + номера, которые Ð’Ñ‹ запомнили (начало, конец), а TEST --- Ð¸Ð¼Ñ Ð²Ð°ÑˆÐµÐ³Ð¾ файла. + + 5. Как и прежде, убедитеÑÑŒ в наличии Ñтого файла командой :!dir , но ÐЕ + УДÐЛЯЙТЕ его. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 5.4: ЧТЕÐИЕ И ОБЪЕДИÐЕÐИЕ ФÐЙЛОВ + + ** Ð”Ð»Ñ Ð²Ñтавки Ñодержимого файла, наберите :r FILENAME ** + + 1. Ðаберите :!dir Ð´Ð»Ñ Ñ‚Ð¾Ð³Ð¾, чтобы убедитьÑÑ Ð² том, что файл TEST вÑе еще + ÑущеÑтвует. + + 2. УÑтановите курÑор в верхней чаÑти Ñтой Ñтраницы. + +Замечание: ПоÑле Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ ÑˆÐ°Ð³Ð° 3 Ð’Ñ‹ увидите Урок 5.3. ПоÑле Ñтого + перемещайтеÑÑŒ Ð’ÐИЗ, Ñнова к Ñтому уроку. + + 3. Теперь прочитайте Ваш файл TEST, иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñƒ :r TEST , где + TEST --- Ñто Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°. + +Замечание: Прочитанный Вами файл будет вÑтавлен в том меÑте, где находитÑÑ + курÑор. + + 4. Чтобы убедитьÑÑ Ð² том, что файл прочитан, перемеÑтитеÑÑŒ немного назад по + текÑту и заметьте, что теперь ÑущеÑтвуют две копии Урока 5.3, иÑÑ…Ð¾Ð´Ð½Ð°Ñ + и Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð½Ð°Ñ Ð¸Ð· файла. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + РЕЗЮМЕ УРОКР5 + + + 1. :!команда иÑполнÑет внешнюю команду. + + Ðекоторые полезные примеры: + :!dir --- выводит ÑпиÑок файлов в каталоге. + :!del FILENAME --- удалÑет файл FILENAME. + + 2. :w FILENAME запиÑывает текущий редактируемый файл на диÑк + под именем FILENAME. + + 3. :#,#w FILENAME ÑохранÑет Ñтроки от # до # в файл FILENAME. + + 4. :r FILENAME Ñчитывает Ñ Ð´Ð¸Ñка файл FILENAME и помещает его в текущий + файл Ñледом за позицией курÑора. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 6.1: КОМÐÐДРСОЗДÐÐИЯ + + + ** Ðаберите o чтобы Ñоздать пуÑтую Ñтроку под курÑором и перейти в режим + вÑтавки (Insert mode) ** + + 1. ПеремеÑтите курÑор вниз, к Ñтроке, помеченной --->. + + 2. Ðаберите o (в нижнем региÑтре) Ð´Ð»Ñ Ñ‚Ð¾Ð³Ð¾, чтобы Ñоздать пуÑтую Ñтроку + ÐИЖЕ курÑора и перейти в режим вÑтавки (Insert mode). + + 3. Теперь Ñкопируйте помеченную ---> Ñтроку и нажмите Ð´Ð»Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð° из + режима вÑтавки. + +---> ПоÑле Ð½Ð°Ð¶Ð°Ñ‚Ð¸Ñ o курÑор перейдет на новую пуÑтую Ñтроку в режиме вÑтавки. + + 4. Ð”Ð»Ñ ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ñтроки ВЫШЕ курÑора, проÑто наберите заглавную O, вмеÑто + Ñтрочной o. Попробуйте проделать Ñто Ñ Ð½Ð¸Ð¶ÐµÑледующей Ñтрокой. +Создайте новую Ñтроку над Ñтой, нажав Shift-O, помеÑтив курÑор на Ñту Ñтроку. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 6.2: КОМÐÐДРДОБÐВЛЕÐИЯ + + ** Ðаберите a , чтобы вÑтавить текÑÑ‚ ПОСЛЕ курÑора. ** + + 1. ПеремеÑтите курÑор вниз, в конец первой Ñтроки, помеченной ---> , + набрав $ в обычном режиме (Normal mode). + + 2. Ðаберите a (в нижнем региÑтре) Ð´Ð»Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ñ‚ÐµÐºÑта ПОСЛЕ Ñимвола, + находÑщегоÑÑ Ð¿Ð¾Ð´ курÑором. (Ð—Ð°Ð³Ð»Ð°Ð²Ð½Ð°Ñ A позволÑет добавить в конец + Ñтроки.) + +Замечание: Это позволÑет избежать Ð½Ð°Ð¶Ð°Ñ‚Ð¸Ñ i , поÑледнего Ñимвола, текÑта Ð´Ð»Ñ + вÑтавки, , курÑор-вправо, и, наконец, x , проÑто Ð´Ð»Ñ Ñ‚Ð¾Ð³Ð¾, + чтобы добавить теÑÑ‚ в конец Ñтроки! + + 3. Теперь завершите первую Ñтроку. Заметьте также, что добавление Ñто в + точноÑти то же Ñамое, что и режим вÑтавки, за иÑключением позиции, в + которую будет вÑтавлен текÑÑ‚. + +---> Эта Ñтрочка позволит Вам попрактиковатьÑÑ +---> Эта Ñтрочка позволит Вам попрактиковатьÑÑ Ð² добавлении текÑта в конец + Ñтроки. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 6.3: ЕЩЕ ОДИРСПОСОБ ЗÐМЕÐЫ + + + ** Ðаберите заглавную R Ð´Ð»Ñ Ð·Ð°Ð¼ÐµÐ½Ñ‹ более, чем одного Ñимвола. ** + + 1. ПеремеÑтите курÑор вниз, к Ñтроке, помеченной --->. + + 2. РаÑположите курÑор в начале первого Ñлова, отличающегоÑÑ Ð¾Ñ‚ + ÑоответÑтвующего в Ñледующей Ñтроке, помеченной ---> (Ñлово 'поÑледней'). + + 3. Теперь наберите R и замените оÑтаток текÑта в первой Ñтроке, набрав + поверх Ñтарого текÑта так, чтобы обе Ñтроки Ñтали одинаковыми. + +---> Первую Ñтроку можно ÑравнÑть Ñ Ð¿Ð¾Ñледней, иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ ÐºÐ»Ð°Ð²Ð¸ÑˆÐ¸. +---> Первую Ñтроку можно ÑравнÑть Ñ Ð²Ñ‚Ð¾Ñ€Ð¾Ð¹, иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ R и набрав новый текÑÑ‚. + + 4. Обратите внимание, что при нажатии Ð´Ð»Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð¸Ñ, любой + не измененный текÑÑ‚ ÑохранитÑÑ. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 6.4: УСТÐÐОВКРПÐРÐМЕТРОВ + + +** УÑтановим параметры так, чтобы игнорировать региÑтр при поиÑке или замене ** + + + 1. Поищите Ñлово 'игнорировать', набрав: + /игнорировать + Повторите поиÑк неÑколько раз, Ð½Ð°Ð¶Ð¸Ð¼Ð°Ñ ÐºÐ»Ð°Ð²Ð¸ÑˆÑƒ n + + 2. Включите параметр 'ic' (Игнорировать региÑтр), набрав: + :set ic + + 3. Теперь Ñнова Ñделайте поиÑк Ñлова 'игнорировать', нажав: n + Повторите поиÑк неÑколько раз, Ð½Ð°Ð¶Ð¸Ð¼Ð°Ñ ÐºÐ»Ð°Ð²Ð¸ÑˆÑƒ n + + 4. Включите параметры 'hlsearch' и 'incsearch': + :set hls is + + 5. Теперь опÑть введите команду поиÑка и поÑмотрите, что получитÑÑ: + /игнорировать + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + РЕЗЮМЕ УРОКР6 + + + 1. Ðажатие o Ñоздает Ñтроку ÐИЖЕ курÑора и перемещает курÑор в нее в режиме + вÑтавки. + Ðажатие заглавной O Ñоздает Ñтроку ВЫШЕ Ñтроки, в которой находитÑÑ + курÑор. + + 2. Ðаберите a Ð´Ð»Ñ Ð²Ñтавки текÑта ПОСЛЕ Ñимвола, на котором находитÑÑ ÐºÑƒÑ€Ñор. + Ðажатие заглавной A автоматичеÑки перемещает Ð’Ð°Ñ Ð´Ð»Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ñ‚ÐµÐºÑта + в конец Ñтроки. + + 3. Ðажатие заглавной R переводит Ð’Ð°Ñ Ð² режим замены до тех пор, пока не + будет нажата клавиша Ð´Ð»Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð¸Ñ. + + 4. Ðабрав ":set xxx" вы Ñможете включить параметр "xxx" + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Урок 7: КОМÐÐДЫ ПОЛУЧЕÐИЯ ВСТРОЕÐÐОЙ СПРÐВКИ + + ** ИÑпользуйте вÑтроенную Ñправочную ÑиÑтему ** + + Vim обладает мощной вÑтроенной Ñправочной ÑиÑтемой. Ð”Ð»Ñ Ð½Ð°Ñ‡Ð°Ð»Ð° попробуйте + один из трех вариантов: + - нажмите клавишу (еÑли Ñ‚Ð°ÐºÐ¾Ð²Ð°Ñ Ð¸Ð¼ÐµÐµÑ‚ÑÑ Ð½Ð° клавиатуре) + - нажмите клавишу (еÑли Ñ‚Ð°ÐºÐ¾Ð²Ð°Ñ Ð¸Ð¼ÐµÐµÑ‚ÑÑ Ð½Ð° клавиатуре) + - наберите :help + + Ðаберите :q чтобы закрыть окно Ñправки. + + Ð’Ñ‹ можете найти Ñправку Ð´Ð»Ñ Ð»ÑŽÐ±Ð¾Ð³Ð¾ понÑÑ‚Ð¸Ñ Ð¸Ð»Ð¸ команды, проÑто задав + ÑоответÑтвующий аргумент команде ":help". Попробуйте Ñледующее (не забудьте + нажать ): + + :help w + :help c_, 2002. + Translator: Andrey Kiselev , 2002. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.sk b/vim/bundle/ubuntu-vim72/tutor/tutor.sk new file mode 100644 index 0000000..2291aad --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.sk @@ -0,0 +1,1008 @@ +=============================================================================== += 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µmi výkonný editor, ktorý má príli¾ veµa príkazov na to aby + mohli byt v¹etky popísané vo výuke akou je táto. Táto výuka + popisuje dostatoèné mno¾stvo príkazov nato aby bolo mo¾né pou¾íva» + Vim ako viacúèelový editor. + + Pribli¾ný èas potrebný na prebratie tejto výuky je 25-30 minút, + závisí na tom, koµko je stráveného èasu s preskú¹avaním. + + UPOZORNENIE: + Príkazy v lekciách modifikujú text. Vytvor kópiu tohto súboru aby + sa mohlo precvièova» na òom (pri ¹tarte "vimtutor" je toto kópia). + + Je dôle¾ité zapamäta» si, ¾e táto výuka je vytvorená pre výuku + pou¾ívaním. To znamená, ¾e je potrebné si príkazy vyskú¹a», aby bolo + uèenie správne. Ak len èitas text, príkazy zabudne¹! + + Presvedè sa, ¾e Shift-Lock NIEJE stlaèený a stlaèt klávesu + j niekoµko krát, aby sa kurzor posunul natoµko, ¾e lekcia 1.1 + celkom zaplní obrazovku. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 1.1: POHYB KURZOROM + + + ** Pre pohyb kurzorum stlaè klávesy h,j,k,l ako je znázornené. ** + ^ + k Funkcia: Klávesa h je naµavo a vykoná pohyb doµava. + < h l > Klávesa l je napravo a vykoná pohyb doprava. + j Klávesa j vyzerá ako ¹ípka dole + v + 1. Pohybuj kurzorom po obrazovke, kým si na to nezvykne¹. + + 2. Dr¾ stlaèenú klávesu pre pohyb dole (j), kým sa jej funkcia nezopakuje. +---> Teraz sa u¾ vie¹ pohybova» na nasledujúcu lekciu. + + 3. Pou¾itím klávesy pre pohyb dole prejdi na Lekciu 1.2. + +Poznámka: Ak si niesi istý tým èo si napísal, stlaè + na prechod do normálneho módu. + +Poznámka: Kurzorové klávesy sú tie¾ funkèné. Ale pou¾ívaním hjkl sa bude¹ + schopný pohybova» rýchlej¹ie, keï si zvykne¹ ich pou¾íva». Naozaj! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 1.2: ZATVÁRANIE VIMU + + + !! POZNÁMKA: Pred vykonaním týchto krokov si preèítaj celú túto lekciu !! + + 1. Stlaè klávesu (aby si sa uèite nachádzal v normálnom móde) + + 2. Napí¹: :q! . + Tým ukonèí¹ prácu s editorom BEZ ulo¾enia zmien, ktoré si vykonal. + + 3. Keï sa dostane¹ na príkazový riadok, napí¹ príkaz, ktorým sa dostane¹ + spe» do tejto výuky. To mô¾e by»: vimtutor + + 4. Ak si si tieto kroky spoµahlivo zapamätal, vykonaj kroky 1 a¾ 3, pre + ukonèenie a znovu spustenie editora. + +POZNÁMKA: :q! neulo¾í zmeny, ktoré si vykonal. O niekoµko lekcií + sa nauèí¹ ako ulo¾i» zmeny do súboru + + 5. presuò kurzor dole na lekciu 1.3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 1.3: EDITÁCIA TEXTU - MAZANIE + + +** Stlaèenie klávesy x v normálnom móde zma¾e znak na mieste kurzora. ** + + 1. Presuò kurzor ni¾¹ie na riadok oznaèený znaèkou --->. + + 2. Aby si mohol odstráni» chyby, pohybuj kurzorom kým neprejde na znak, + ktorý chce¹ zmaza». + + 3. Stlaè klávesu x aby sa zmazal nechcený znak. + + 4. Zopakuj kroky 2 a¾ 4 a¾ kým veta nieje správna. + +---> Kraava skooèilla ccezz mesiiac. + + 5. Ak je veta správna, prejdi na lekciu 1.4. + +POZNÁMKA: Neskú¹aj si zapamäta» obsah tejto výuky, ale sa uè pou¾ívaním. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 1.4: EDITÁCIA TEXTU - VKLADANIE + + + ** Stlaèenie klávesy i umo¾òuje vkladanie textu. ** + + 1. Presuò kurzor ni¾¹ie na prvý riadok za znaèku --->. + + 2. Pre upravenie prvého riadku do rovnakého tvaru ako je druhý riadok, + presuò kurzor na prvý znak za misto, kde má by» text vlo¾ený. + + 3. Stlaè klávesu i a napí¹ potrebný text. + + 4. Po opravení ka¾dej chyby, stlaè pre návrat do normálneho módu. + Zopakuj kroky 2 a¾ 4 kým nieje veta správna. + +---> Tu je text chýbajúci tejto. +---> Tu je nejaký text chýbajúci od tejto èiary. + + 5. Keï sa dostatoène nauèí¹ vklada» text, prejdi na nasledujúce zhrnutie. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 1.5: EDITÁCIA TEXTU - PRIDÁVANIE + + + ** Stlaèenie klávesy A umo¾òuje pridáva» text. ** + + 1. Presuò kurozr ni¾¹ie na prvý riadok za znaèkou --->. + Nezále¾í na tom, na ktorom znaku sa kurzor v tom riadku nachádza. + + 2. Stlaè klávesu A a napí¹ potrebný text. + + 3. Po pridaní textu stlaè klávesu pre návrat do Normálneho módu. + + 4. Presuò kurozr na druhý riadok oznaèený ---> a zopakuj + kroky 2 a 3 kým nieje veta správna. + +---> Tu je nejaký text chýbajúci o + Tu je nejaký text chýbajúci od tiaµto. +---> Tu tie¾ chýba nej + Tu tie¾ chýba nejaký text. + + 5. Keï sa dostatoène nauèí¹ pridáva» text, prejdi na lekciu 1.6. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 1.6: EDITÁCIA SÚBORU + + + ** Napísaním :wq sa súbor ulo¾í a zavrie ** + +!! POZNÁMKA: Pred vykonaním týchto krokov si preèítaj celú lekciu!! + +1. Opusti túto výuku, ako si to urobil v lekcii 1.2: :q! + +2. Do príkazového riadku napí¹ príkaz: vim tutor + 'vim' je príkaz, ktorý spustí editor Vim, 'tutor' je meno súboru, + ktorý chce¹ editova». Pou¾i taký súbor, ktorý mô¾e¹ meni». + +3. Vlo¾ a zma¾ text tak, ako si sa nauèil v predo¹lých lekciach. + +4. Ulo¾ súbor so zmenami a opusti Vim príkazom: :wq + +5. Re¹tartuj vimtutor a presuò sa dole na nasledujúce zhrnutie. + +6. Urob tak po preèítaní predo¹lých krokov a porozumeniu im. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZHRNUTIE LEKCIE 1 + + + 1. Kurzor sa pohybuje pou¾itím kláves so ¹ípkami alebo klávesmi hjkl. + h (do lava) j (dole) k (hore) l (doprava) + + 2. Pre spustenie Vimu (z príkazového riadku) napí¹: vim FILENAME + + 3. Na ukonèenie Vimu napí¹: :q! pre zru¹enie v¹etkých zmien + alebo napí¹: :wq pre ulo¾enie zmien. + + 4. Na zmazanie znaku na mieste kurzora napí¹: x + + 5. Pre vlo¾enie textu na mieste kurzora v normálnom móde napí¹: + i napí¹ vkladaný text vkladanie pred kurzor + A napí¹ pridávaný text vkladanie za riadok + +POZNÁMKA: Stlaèenie »a premiestní do normálneho módu alebo zru¹í + nejaký nechcený a èiastoène dokonèený príkaz. + +Teraz pokraèuj lekciou 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.1: Mazacie príkazy + + + ** Napísanie príkazu dw zma¾e znaky do konca slova. ** + +1. Stlaè aby si bol bezpeène v normálnom móde. + +2. Presuò kurzor ni¾¹ie na riadok oznaèený znaèkou --->. + +3. Presuò kurzor na zaèiatok slova, ktoré je potrebné zmaza». + +4. Napí¹ dw aby slovo zmizlo. + +POZNÁMKA: Písmeno d sa zobrazí na poslednom riadku obrazovky keï ho + napí¹e¹. Vim na teba poèká, aby si mohol napísa» + písmeno w. Ak vidí¹ nieèo iné ako d , tak si napísal + nesprávny znak; stlaè a zaèni znova. + +---> Tu je niekoµko slov zábava, ktoré nie patria list do tejto vety. + +5. Zopakuj kroky 3 a¾ 4 kým veta nieje správna a prejdi na lekciu 2.2. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.2: VIAC MAZACÍCH PRÍKAZOV + + + ** Napísanie príkazu d$ zma¾e znaky do konca riadku ** + +1. Stlaè aby si bol bezpeène v normálnom móde. + +2. Presuò kurzor ni¾¹ie na riadok oznaèený znaèkou --->. + +3. Presuò kurzor na koniec správnej vety (ZA prvú bodku). + +4. Napí¹ d$ aby sa zmazali znaky do konca riadku. + +---> Niekto napísal koniec tohto riadku dvakrát. koniec tohot riadku dvakrát. + + +5. Prejdi na lekciu 2.3 pre pochopenie toho èo sa stalo. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.3: OPERÁTORY A POHYBY + + Veµa príkazov, ktoré menia text sú odvodené od operátorov a pohybov. + Formát pre príkaz mazania klávesou d je nasledovný: + + d pohyb + + kde: + d - je mazací operátor + pohyb - je to èo operátor vykonáva (vypísané ni¾¹ie) + + Krátky list pohybov: + w - do zaèiatku ïal¹ieho slova, okrem jeho prvého písmena. + e - do konca teraj¹ieho slova, vrátane posledného znaku. + $ - do konca riadku, vrátane posledného znaku + + Tak¾e napísaním de sa zma¾e v¹etko od kurzora do konca slova. + +POZNÁMKA: Stlaèením iba pohybu v normálnom móde bez operátora + sa presunie kurzor tak ako je to ¹pecivikované. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.4: Pou¾itie viacnásobného pohybu + + + ** Napísaním èísla pred pohyb ho zopakuje zadný poèet krát ** + + 1. Presuò kurozr ni¾¹ie na zaèiatok riadku oznaèeného --->. + + 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èiatok riadku. + + 5. Zopakuj kroky 2 a 3 s rôznymi èíslami. + +---> Toto je riadok so slovami po kotrých sa mô¾ete pohybova». + + 6. Prejdi na lekciu 2.5. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.5: POU®ITIE VIACNÁSOBNÉHO MAZANIA PRE HROMADNÉ MAZANIE + + + ** Napísanie èísla spolu s operátorom ho zopakuje zadaný poèet krát ** + + V kombinácii operátorov mazania a pohybu spomínaného vy¹¹ie vlo¾ poèet + pred pohyb pre docielenie hromadného mazania: + d èíslo pohyb + + 1. Presuò kurzor na prvé slovo písané VE¥KÝMI PÍSMENAMI + v riadku oznaèenom --->. + + 2. Napí¹ 2dw a zma¾e¹ dve slová písané VE¥KÝMI PÍSMENAMI + + 3. Zopakuj kroky 1 a 2 s pou¾itím rôzneho èísla tak aby si zmazal slová + písané veµkými písmenami jedným príkazom. + +---> Tento ABC DE riadok FGHI JK LMN OP so slovamI je Q RS TUV vycisteny. + +POZNÁMKA: Èíslo medzi operátorom d a pohybom funguje podobne ako pri + pou¾ití s pohybom bez operátora. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.6: OPERÁCIE S RIADKAMI + + + ** Napísanie príkazu dd zma¾e celý riadok. ** + +Vzhµadom na frekvenciu mazania celého riadku, sa autori Vimu rozhodli, +¾e bude jednoduch¹ie maza» celý riadok napísaním dvoch písmen d. + +1. Presuò kurzor na druhý riadok v texte na spodu. +2. Napí¹ dd aby si zmazal riadok. +3. Prejdi na ¹tvrtý riadok. +4. Napí¹ 2dd aby si zmazal dva riadky. + + 1) Ru¾e sú èervené, + 2) Blato je zábavné, + 3) Fialky sú modré, + 4) Mám auto, + 5) Hodinky ukazujú èas, + 6) Cukor je sladký, + 7) A to si ty. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.7: PRÍKAZ UNDO + + +** Stlaè u pre vrátenie posledného príkazu, U pre úpravu celého riadku. ** + +1. Presuò kurzor ni¾¹ie na riadok oznaèený znaèkou ---> a premiestni ho na + prvú chybu. +2. Napí¹ x pre zmazanie prvého nechceného riadku. +3. Teraz napí¹ u èím vrátí¹ spä» posledne vykonaný príkaz. +4. Teraz oprav v¹etky chyby na riadku pou¾itím príkazu x . +5. Teraz napí¹ veµké U èím vrátí¹ riadok do pôvodného stavu. +6. Teraz napí¹ u niekoµko krát, èím vrátí¹ spä» príkaz U. +7. Teraz napí¹ CTRL-R (dr¾ klávesu CTRL stlaèenú kým stláèa¹ R) niekoµko + krát, èím vrátí¹ spä» predtým vrátené príkazy (undo z undo). + +---> Opprav chybby nna toomto riadku a zmeeò ich pommocou undo. + + 8. Tieto príkazy sú èasto pou¾ívané. Teraz prejdi na zhrnutie lekcie 2. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 2 ZHRNUTIE + + + 1. Pre zmazanie znakov od kurzora do konca slova napí¹: dw + + 2. Pre zmazanie znakov od kurzora do konca riadku napí¹: d$ + + 3. Pre zmazanie celého riadku napí¹: dd + + 4. Pre zopakovanie pohybu, napí¹ pred neho èíslo: 2w + + 5. Formát pre píkaz: + + operátor [èíslo] pohyb + kde: + operátor - èo treba robi», napríklad d pre zmazanie + [èíslo] - je voliteµný poèet pre opakovanie pohybu + pohyb - pohyb po texte vzhµadom na operátor, napríklad w (slovo), + $ (do konca riadku), atï. + + 6. Pre pohyb na zaèiatok riadku pou¾i nulu: 0 + + 7. Pre vrátenie spä» predo¹lej operácie napí¹: u (malé u) + Pre vrátenie v¹etkých úprav na riadku napí¹: U (veµké U) + Pre vrátenie vrátených úprav napí¹: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 3.1: PRÍKAZ VLO®I« + + + ** Napísanie príkazu p vlo¾í psledný výmaz za kurzor. ** + + 1. Presuò kurzor ni¾¹ie na prvý riadok textu. + + 2. Napí¹ dd èím zma¾e¹ riadok a ulo¾í¹ ho do buffera editora Vim. + + 3. Presuò kurzor vy¹¹ie tam, kam zmazaný riadok patrí. + + 4. Ak napí¹e¹ v normálnom móde p zmazaný riadk sa vlo¾í. + + 5. Zopakuj kroky 2 a¾ 4, kým riadky niesú v správnom poradí. + +---> d) Tie¾ sa doká¾e¹ vzdeláva»? +---> b) Fialky sú modré, +---> c) Inteligencia sa vzdeláva, +---> a) Ru¾e sú èervené, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 3.2: PRÍKAZ NAHRADENIA + + + ** Napísaním rx sa nahradí znak na mieste kurzora znakom x . ** + + 1. Presuò kurzor ni¾¹ie na prví riadok textu oznaèeného znaèkou --->. + + 2. Presuò kurzor na zaèiatok prvej chyby. + + 3. napí¹ r a potom znak, ktorý tam má by». + + 4. Zopakuj kroky 2 a 3, kým prvý riadok nieje zhodný s druhým. + +---> Kaï bol tento riasok píaaný, niekro stla¹il nesprábne klávesy! +---> Keï bol tento riadok písaný, niekto stlaèil nesprávne klávesy! + + 5. Teraz prejdi na lekciu 3.2. + +POZNÁMKA: Pamätaj si, ¾e nauèi» sa mô¾e¹ len pou¾ívanim, nie pamätaním. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 3.3. PRÍKAZ ÚPRAVY + + + ** Ak chce¹ zmeni» èas» slova do konca slova, napí¹ ce . ** + + 1. Presuò kurzor ni¾¹ie na prvý riadok oznaèený znaèkou --->. + + 2. Umiestni kurzor na písmeno o v slove rosfpl. + + 3. Napí¹ ce a oprav slovo (v tomto prípade napí¹ 'iadok'.) + + 4. Stlaè a prejdi na ïal¹í znak, ktorý treba zmeni». + + 5. Zopakuj kroky 3 a 4, kým prvá veta nieje rovnaká ako druhá. + +---> Tento rosfpl má niekoµko skic, ktoré je pirewvbí zmeni» piy»uèán príkazu. +---> Tento riadok má niekoµko slov, ktoré je potrebné zmeni» pou¾itím príkazu. + +Poznámka, ¾e ce zma¾e slovo a nastaví vkladací mód. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 3.4: VIAC ZMIEN POU®ITÍM c + + + ** Príkaz pre úpravy sa pou¾íva s rovnakými pohybmi ako pre mazanie ** + + 1. Príkaz pre úpravy pracuje rovnako ako pre mazanie. Formát je: + + c [èíslo] pohyb + + 2. Pohyby sú rovnaké, ako napríklad w (slovo) a $ (koniec riadku). + + 3. Presuò kurzor ni¾¹ie na prvý riadok oznaèený znaèkou --->. + + 4. Presuò kurzor na prvú chybu. + + 5. napí¹ c$ aby si mohol upravi» zvy¹ok riadku podµa druhého + a stlaè . + +---> Koniec tohto riadku potrebuje pomoc, aby bol ako druhy. +---> Koniec tohto riadku potrebuje opravi» pou¾itím príkazu c$ . + +POZNÁMKA: Mô¾e¹ pou¾i» klávesu backspace na úpravu zmien poèas písania. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 3 ZHRNUTIE + + + 1. Na vlo¾enie textu, ktorý u¾ bol zmazaný, napí¹ p . To vlo¾í zmazaný + text ZA kurzor (ak bol riadok zmazaný prejde na riadok pod kurzorom). + + 2. Pre naradenie znaku na mieste kurzora, napí¹ r a potom znak, ktorý + nahradí pôvodný znak. + + 3. Príkaz na upravenie umo¾òuje zmeni» od kurzora a¾ po miesto, ktoré + urèuje pohyb. napr. Napí¹ ce èím zmní¹ text od pozície + kurzora do konca slova, c$ zmení text do konca riadku. + + 4. Formát pre nahradenie je: + + c [èíslo] pohyb + + +Teraz prejdi na nalsedujúcu lekciu. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 4.1: POZÍCIA A STATUS SÚBORU + + + ** Stlaè CTRL-g pre zobrazenie svojej pozície v súbore a statusu súboru. + Napí¹ G pre presun na riadok v súbore. ** + + Poznámka: Preèítaj si celú túto lekciu skôr ako zaène¹ vykonáva» kroky!! + + 1. Dr¾ stlaèenú klávesu Ctrl a stlaè g . Toto nazývame CTRL-G. + Na spodu obrazovky sa zobrazí správa s názvom súboru a pozíciou + v súbore. Zapamätajsi si èíslo riadku pre pou¾itie v kroku 3. + + 2. Stlaè G èím sa dostane¹ na spodok súboru. + Napí¹ gg èím sa dostane¹ na zaèiatok súboru. + + 3. Napí¹ èíslo riadku na ktorom si sa nachádzal a stlaè G. To »a + vráti na riadok, na ktorom si prvý krát stlaèil CTRL-G. + + 4. Ak sa cítí¹ schopný vykona» teto kroky, vykonaj kroky 1 a¾ 3. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 4.2: PRÍKAZ VYH¥ADÁVANIA + + + ** Napí¹ / nasledované re»azcom pre vyhµadanie príslu¹ného re»azca. ** + + 1. Napí¹ znak / v normálnom móde. Poznámka, ¾e tento znak sa spolu + s kurzorom zobrazí v dolnej èasti obrazovky s : príkazom. + + 2. Teraz napí¹ 'errroor' . To je slovo, ktoré chce¹ vyhµada». + + 3. Pre vyhµadanie ïal¹ieho výskytu rovnakého re»azca, stlaè jednoducho n. + Pre vyhµadanie ïal¹ieho výskytu rovnakého re»azca opaèným smerom, + N. + + 4. Ak chce¹ vyhµada» re»azec v spätnom smere, pou¾í príkaz ? miesto + príkazu /. + + 5. Pre návrat na miesto z ktorého si pri¹iel stlaè CTRL-O (dr¾ stlaèenú + klávesu Ctrl poèas stlaèenia klávesy o). Zopakuj pre ïal¹í návrat + spä». CTRL-I ide vpred. + +POZNÁMKA: "errroor" nieje spôsob hláskovania error; errroor je error. +POZNÁMKA: Keï vyhµadávanie dosiahne koniec tohto súboru, bude pokraèova» na + zaèiatku, dokiaµ nieje resetované nastavenie 'wrapscan' . + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 4.3: VYH¥ADÁVANIE ZODPOVEDAJÚCICH ZÁTAVORIEK + + + ** Napí¹ % pre vyhµadanie príslu¹ného znaku ),], alebo } . ** + + 1. Premiestni kurzor na hocaký zo znakov (, [, alebo { v riadku ni¾¹ie + oznaèeného znaèkou --->. + + 2. Teraz napí¹ znak % . + + 3. Kurzor sa premiestni na zodpovedajúcu zátvorku. + + 4. Napí¹ % pre presun kurzoru spä» na otvárajúcu zátvorku. + + 5. Presuò kurzor na iný zo znakov (,),[,],{ alebo } a v¹imni si + èo % vykonáva. + +---> Toto ( je testovací riadok s ('s, ['s ] a {'s } v riadku. )) + +Poznámka: Toto je veµmi výhodné pou¾í» pri ladení programu s chýbajúcimi + uzatvárajúcimi zátvorkami! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 4.4: PRÍKAZ NAHRADENIA + + + ** Napí¹ :s/starý/nový/g pre nahradenie slova 'starý' za slovo 'nový'. ** + + 1. Presuò kurzor ni¾¹ie na riadok oznaèený znaèkou --->. + + 2. Napí¹ :s/thee/the . Poznamka, ¾e tento príkaz zmení len prvý + výskyt "thee" v riadku. + + 3. Teraz napí¹ :s/thee/the/g èo znamená celkové nahradenie v riadku. + Toto nahradí v¹etky výskyty v riadku. + +---> Thee best time to see thee flowers in thee spring. + + 4. Pre zmenu v¹etkých výskytov daného re»azca medzi dvomi ridakami, + napí¹ :#,#s/starý/nový/g kde #,# sú èísla dvoch riadkov, v rozsahu + ktorých sa nahradenie vykoná. + napí¹ :%s/starý/nový/g pre zmenu v¹etkých výskytov v celom riadku + napí¹ :%s/starý/nový/gc nájde v¹etky výskyty v celom súbore, + s otázkou èi nahradi» alebo nie + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 4 ZHRNUTIE + + + 1. CTRL-g vypí¹e tvoju pozíciu v súbore a status súboru. + G »a premiestni na koniec riadku. + èíslo G »a premiestni na riadok s èíslom. + gg »a presunie na prvý riadok + + 2. Napísanie / nasledované re»azcom vyhµadá re»azec smerom DOPREDU. + Napísanie ? nasledované re»azcom vyhµada re»azec smerom DOZADU. + Napísanie n po vyhµadávaní, vyhµadá nasledujúci výskyt re»azca + v rovnakom smere, prièom N vyhµadá v opaènom smere. + CTRL-O »a vráti spä» na star¹iu pozíciu, CTRL-I na nov¹iu pozíciu. + + 3. Napísanie % keï kurzor je na (,),[,],{, alebo } nájde zodpovdajúcu + párnu zátvorku. + + 4. Pre nahradenie nového za prvý starý v riadku napí¹ :s/starý/nový + Pre nahradenie nového za v¹etky staré v riadku napí¹ :s/starý/nový/g + Pre nahradenie re»azcov medzi dvoma riadkami 3 napí¹ :#,#/starý/nový/g + Pre nahradenie v¹etkých výskytov v súbore napí¹ :%s/starý/nový/g + Pre potvrdenie ka¾dého nahradenia pridaj 'c' :%s/starý/nový/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 5.1 AKO SPUSTI« VONKAJ©Í PRÍKAZ + + + ** Napí¹ príkaz :! nasledovaný vonkaj¹ím príkazom pre spustenie príkazu ** + + 1. Napí¹ obvyklý píkaz : ktorý nastaví kurzor na spodok obrazovky. + To umo¾ní napísa» príkaz. + + 2. Teraz napí¹ ! (výkrièník). To umo¾ní spusti» hociaký vonkaj¹í príkaz + z príkazového riadku. + + 3. Ako príklad napí¹ ls za ! a stlaè . Tento príkaz + zobrazí obsah tvojho adresára rovnako ako na príkazovom riadku. + Alebo pou¾i :!dir ak ls nefunguje. + +Poznámka: Takto je mo¾né spusti» hociaký vonkaj¹í príkaz s argumentami. +Poznámka: V¹etky príkazy : musia by» dokonèené stlaèením + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 5.2: VIAC O UKLADANÍ SÚBOROV + + + ** Pre ulo¾enie zmien v súbore, napí¹ :w FILENAME. ** + + 1. Napí¹ :!dir alebo :!ls pre výpis aktuálneho adresára. + U¾ vie¹, ¾e musí¹ za týmto stlaèi» . + + 2. Vyber názov súboru, ktorý e¹te neexistuje, ako napr. TEST. + + 3. Teraz napí¹: :w TEST (kde TEST je názov vybratého súboru.) + + 4. To ulo¾í celý súbor (Vim Tutor) pod názovm TEST. + Pre overenie napí¹ :!dir , èím zobrazí¹ obsah adresára. + +Poznámka: ¾e ak ukonèí¹ prácu s editorom Vim a znovu ho spustí¹ príkazom + vim TEST, súbor bude kópia výuky, keï si ho ulo¾il. + + 5. Teraz odstráò súbor napísaním (MS-DOS): :!del TEST + alebo (Unix): :!rm TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 5.3 VÝBER TEXTU PRE ULO®ENIE + + + ** Pre ulo¾enie èasti súboru, napí¹ v pohyb :w FILENAME ** + + 1. Presuò kurozr na tento riadok. + + 2. Stlaè v a presuò kurozr na piatu polo¾ku dole. Poznámka, ¾e + tento text je vyznaèený (highlighted). + + 3. Stlaè klávesu : . V spodnej èasti okna sa objaví :'<,'>. + + 4. Napí¹ w TEST , kde TEST je meno súboru, ktorý zatial neexistuje. + Skontroluj, e vidí¹ :'<,'>w TEST predtým ne¾ stlaèí¹ Enter. + + 5. Vim zapí¹e oznaèené riadky do súboru TEST. Pou¾i :!dir alebo !ls + pre overenie. Zatial ho e¹te nema¾! Pou¾ijeme ho v ïal¹ej lekcii. + +POZNÁMKA: Stlaèením klávesy v sa spustí vizuálne oznaèovanie. + Mô¾e¹ pohybova» kurzorom pre upresnenie vyznaèeného textu. + Potom mô¾e¹ pou¾i» operátor pre vykonanie nejakej akcie + s textom. Napríklad d zma¾e vyznaèený text. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 5.4: VÝBER A ZLUÈOVANIE SÚBOROV + + + ** Pre vlo¾enie obsahu súboru, napí¹ :r FILENAME ** + + 1. Premiestni kurzor nad tento riadok. + +POZNÁMKA: Po vykonaní kroku 2 uvidí¹ text z lekcie 5.3. Potom sa presuò + dole, aby si videl túto lekciu. + + 3. Teraz vlo¾ súbor TEST pou¾itím príkazu :r TEST kde TEST je názov + súboru. Súbor, ktorý si pou¾il je umiestnený pod riadkom s kurzorom. + +POZNÁMKA: Mô¾e¹ tie¾ naèíta» výstup vonkaj¹ieho príkazu. Napríklad :r !ls + naèíta výstup príkazu ls a umiestni ho za pozíciu kurzora. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 5 ZHRNUTIE + + + 1. :!príkaz spustí vonkaj¹í príkaz. + + Niektoré vyu¾iteµné príklady sú: + (MS_DOS) (UNIX) + :!dir :!ls - zobrazí obsah adresára + :!del FILENAME :!rm FILENAME - odstráni súbor FILENAME + + 2. :w FILENAME ulo¾í aktuálny súbor na disk pod menom FILENAME. + + 3. v pohyb :w FILENAME ulo¾í vizuálne oznaèené riadky do + súboru FILENAME. + + 4. :r FILENAME vyberie z disku súbor FILENAME a vlo¾í ho do aktuálneho + súboru za pozíciou kurzora. + + 5. :r !dir naèíta výstup z príkazu dir a vlo¾í ho za pozíciu kurzora. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 6.1: PRÍKAZ OTVORI« + + +** Napí¹ o pre vlo¾enie riadku pod kurzor a prepnutie do vkladacieho módu ** + + 1. Presuò kurzor ni¾¹ie na riadok oznaèený znaèkou --->. + + 2. Napí¹ o (malé písmeno) pre vlo¾enie èistého riadku pod kurzorm + a prepnutie do vkladacieho módu. + + 3. Teraz skopíruj riadok oznaèený ---> a stlaè pre ukonèenie + vkladacieho módu. + +---> Po napísaní o sa kurzor premiestní na vlo¾ený riadok do vkladacieho + módu. + + 4. Pre otvorenie riadku nad kurzorom, jednotucho napí¹ veµké O , + namiesto malého o. Vyskú¹aj si to na riadku dole. + +---> Vlo¾ riadok nad týmto napísaním O, keï kurzor je na tomto riadku. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 6.2: PRÍKAZ PRIDA« + + + ** Napí¹ a pre vlo¾enie textu ZA kurzor. ** + + 1. Presuò kurzor ni¾¹ie na koniec prvého riadku oznaèeného znaèkou ---> + + 2. Stlaè klávesu e dokiaµ kurozr nieje na konci riadku. + + 3. Napí¹ a (malé písmeno) pre pridanie textu ZA kurzorom. + + 4. Dokonèí slovo tak ako je to v druhom riadku. Stla¹ pre + opustenie vkladacieho módu. + + 5. Pou¾i e na presun na ïal¹ie nedokonèené slovo a zopakuj kroky 3 a 4. + +---> Tento ri ti dovoµuje nácv priávan testu na koniec riadku. +---> Tento riadok ti dovoµuje nácvik pridávania textu na koniec riadku. + +POZNÁMKA: a, i, A ¹tartujú rovnaký vkladací mód, jediný rozidel je, kde + sa znaky vkladajú. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 6.3: INÝ SPOSOB NAHRADZOVANIA + + + ** Napí¹ veµké R pre nahradenie viac ako jedného znaku. ** + + 1. Presuò kurzor ni¾¹ie na prvý riadok oznaèený znaèkou --->. Premiestni + kurzor na zaèiatok prvého výskytu xxx. + + 2. Teraz napí¹ R a napí¹ èíslo uvedené v druhom riadku, tak¾e + sa ním nahradí pôvodné xxx. + + 3. Stlaè pre opustenie nahradzovacieho módu. Poznámka, ¾e zvy¹ok + riadku zostane nezmenený. + + 4. Zopakuj tieto kroky pre nahradenie zvy¹ných xxx. + +---> Pridaním 123 ku xxx dostane¹ xxx. +---> Pridaním 123 ku 456 dostane¹ 579. + +POZNÁMKA: Nahradzovací mód je ako vkladací mód, ale ka¾dý napísaný znak + zma¾e existujúci znak. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lekcia 6.4: Copy Paste textu + + ** pou¾í operátor y pre copy textku a p pre jeho paste ** + + 1. Choï ni¾¹ie na riadok oznaèený ---> a umiestni kurozr za "a)". + + 2. Na¹tartuj vizuálny mód pou¾itím v a presuò kurozr pred "first". + + 3. Napí¹ y pre vystrihnutie (copy) oznaèeného textu. + + 4. Presuò kurozr na koniec ïal¹ieho riadku: j$ + + 5. Napí¹ p pre vlo¾nie (paste) textu. Potom napí¹: a druha . + + 6. Pou¾i vizuálny mód pre oznaèenie "polo¾ka.", vystrihni to + pou¾itím y, presuò sa na koniec nasledujúceho riadku pou¾itím j$ + a vlo¾ sem text pou¾itím p. + +---> a) toto je prvá polo¾ka +---> b) + +POZNÁMKA: Mô¾e¹ pou¾i» tie¾ y ako operátor; yw vystrihne jedno slovo. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 6.5: NASTAVENIE MO®NOSTÍ + + +** Nastav mo¾nosti, tak¾e vyhµadávanie alebo nahradzovanie ignoruje + rozli¹ovanie ** + + + 1. Vyhµadaj re»azec 'ignore' napísaním: + /ignore + Zopakuj vyhµadávanie niekoµko krát stlaèením klávesy n . + + 2. Nastav mo¾nos» 'ic' (Ignore case) napísaním príkazu: + :set ic + + 3. Teraz vyhµadaj re»azec 'ingore' znova stlaèením klávesy n + Poznámka, ¾e teraz sú vyhµadané aj Ignore a IGNORE. + + 4. Nastav mo¾nos»i 'hlsearch' a 'incsearch': + :set hls is + + 5. Teraz spusti vyhµadávací príkaz znovu, a pozri èo sa stalo: + /ignore + + 6. Pre opetovné zapnutie rozly¹ovania veµkých a malých písmen + napí¹: :set noic + +POZNÁMKA: Na odstránenie zvýraznenia výrazov napí¹: :nohlsearch +POZNÁMKA: Ak chce¹ nerozly¹ova» veµkos» písmen len pre jedno + pou¾itie vyhµadávacieho príkazu, pou¾i \c: /ignore\c + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 6 ZHRNUTIE + + + 1. Napí¹ o pre otvorenie riadku pod kurzorom a ¹tart vkladacieho módu. + 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íkaz e presunie kurozr na koniec slova + + 4. Operátor y vystrihne (skopíruje) text, p ho vlo¾í. + + 5. Napísanie veµkého R prepne do nahradzovacieho módu, kým nieje + stlaèené . + + 6. Napísanie ":set xxx" nastaví mo¾nos» "xxx". Niektoré nastavenia sú: + 'ic' 'ignorecase' ignoruje veµké a malé písmená poèas vyhµadávania. + 'is' 'incsearch' zobrazuje èiastoèné re»azce vyhµadávaného re»azca. + 'hls' 'hlsearch' vyznaèí v¹etky vyhµadávané re»azce. + Mô¾e¹ pou¾i» hociktorý z dlhých a krátkych názvov mo¾ností. + + 7. Vlo¾ "no" pred nastavenie pre jeho vypnutie: :set noic + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 7.1: ZÍSKANIE NÁPOVEDY + + + ** Pou¾ívaj on-line systém nápovedy ** + + Vim má obsiahly on-line systém nápovedy. Pre od¹tartovanie, vyskú¹aj jeden + z týchto troch: + - stlaè klávesu (ak nejakú má¹) + - stlaè klávesu (ak nejakú má¹) + - napí¹ :help + + Èítaj text v okne nápovedy pre získanie predstavy ako nápoveda funguje. + Napí¹ CTRL-W CTRL-W pre skok z jedného okna do druhého. + Napí¹ :q èím zatvorí¹ okno nápovedy. + + Mô¾e¹ nájs» help ku hociakej téme pridaním argumentu ku príkazu ":help". + Vyskú¹aj tieto (nezabudni stlaèi» ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 7.2: VYTVORENIE ©TARTOVACIEHO SKRIPTU + + ** Zapni funkcie editora Vim ** + + Vim má omnoho viac funkcii ne¾ Vi, ale veè¹ina z nich je implicitne + vypnutá. Pre pou¾ívanie viac Vim funkcii vytvor "vimrc" súbor. + + 1. Zaèni editova» "vimrc" súbor, to závisí na pou¾itom systéme: + :e ~/.vimrc pre Unix + :e $VIM/_vimrc pre MS-Windows + + 2. Teraz si preèítaj text príkladu "vimrc" súboru: + + :r $VIMRUNTIME/vimrc_example.vim + + 3. Ulo¾ súbor: + :w + + Pri nasledujúcom ¹tarte editora Vim sa pou¾ije zvýrazòovanie syntaxe. + Do "vimrc" súboru mô¾e¹ prida» v¹etky svoje uprednostòované nastavenia. + Pre viac informácii napí¹ :help vimrc-intro + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + LEKCIA 7.3 DOKONÈENIE + + ** Dokonèi príkaz na príkazovom riadku pou¾itím CTRL-D a ** + + 1. Uisti sa, ¾e Vim nieje v kompatibilnom móde: :set nocp + + 2. Pozri sa aké súbory sa nachádzajú v adresári: :!ls alebo :!dir + + 3. Napí¹ zaèiatok príkazu: :e + + 4. Stlaè CTRL-D a Vim zobrazí zoznam príkazov zaèínajúcich "e". + + 5. Stlaè a Vim dokonèí meno príkazu na ":edit". + + 6. Teraz pridaj medzerník a zaèiatok mena existujúceho súboru: + :edit FIL + + 7. Stlaè . Vim dokonèí meno (ak je jedineèné). + +POZNÁMKA: Dokonèovanie funguje pre veµa príkazov. Vyskú¹aj stlaèenie + CTRL-D a . ©peciálne je to u¾itoèné pre príkaz :help. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + LEKCIA 7 ZHRNUTIE + + 1. Napí¹ :help alebo stlaè alebo pre otvorenie okna nápovedy. + + 2. Napí¹ :help príkaz pre vyhµadanie nápovedy ku príkazu príkaz. + + 3. Napí¹ CTRL-W CTRL-W na preskoèenie do iného okna. + + 4. Napí¹ :q pre zatvorenie okna nápovedy + + 5. Vytvor ¹tartovací skript vimrc pre udr¾anie uprednostòovaných nastavení. + + 6. Poèas písania príkazu : stlaè CTRL-D pre zobrazenie dokonèení. + Stlaè pre pou¾itie jedného z dokonèení. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + + Toto vymedzuje výuku Vimu. Toto je urèené pre strucný prehµad o editore + Vim, úplne postaèujúce pre µahké a obstojné pou¾ívanie tohto editora. + Táto výuka je ïaleko od kompletnosti, preto¾e Vim má omnoho viacej príkazov. + Ako ïal¹ie si preèítaj u¾ívatµský manuál: ":help user-manual". + + Pre ïal¹ie èítanie a ¹túdium je odporúèaná kniha: + Vim - Vi Improved - od Steve Oualline + Vydavateµ: New Riders + Prvá kniha urèená pre Vim. ©peciálne vhodná pre zaèiatoèníkov. + Obsahuje mno¾stvo príkladov a obrázkov. + Pozri na http://iccf-holland.org/click5.html + + Táto kniha je star¹ia a je viac o Vi ako o Vim, ale je tie¾ odporúèaná: + Learning the Vi Editor - od Linda Lamb + Vydavateµ: O'Reilly & Associates Inc. + Je to dobrá kniha pre získanie vedomostí o práci s editorom Vi. + ©ieste vydanie obsahuje tie¾ informácie o editore Vim. + + Táto výuka bola napísaná autormi Michael C. Pierce a Robert K. Ware, + Colorado School of Mines s pou¾itím my¹lienok dodanými od Charles Smith, + Colorado State University. E-mail: bware@mines.colorado.edu. + + Modifikované pre Vim od Bram Moolenaar. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Preklad do Slovenèiny: ¥ubo¹ Èelko + e-mail: celbos@inmail.sk + Last Change: 2006 Apr 18 + encoding: iso8859-2 diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.sk.cp1250 b/vim/bundle/ubuntu-vim72/tutor/tutor.sk.cp1250 new file mode 100644 index 0000000..f32c9b1 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.sk.cp1250 @@ -0,0 +1,1008 @@ +=============================================================================== += 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¾mi výkonný editor, ktorý má príliž ve¾a príkazov na to aby + mohli byt všetky popísané vo výuke akou je táto. Táto výuka + popisuje dostatoèné množstvo príkazov nato aby bolo možné používa + Vim ako viacúèelový editor. + + Približný èas potrebný na prebratie tejto výuky je 25-30 minút, + závisí na tom, ko¾ko je stráveného èasu s preskúšavaním. + + UPOZORNENIE: + Príkazy v lekciách modifikujú text. Vytvor kópiu tohto súboru aby + sa mohlo precvièova na òom (pri štarte "vimtutor" je toto kópia). + + Je dôležité zapamäta si, že táto výuka je vytvorená pre výuku + používaním. To znamená, že je potrebné si príkazy vyskúša, aby bolo + uèenie správne. Ak len èitas text, príkazy zabudneš! + + Presvedè sa, že Shift-Lock NIEJE stlaèený a stlaèt klávesu + j nieko¾ko krát, aby sa kurzor posunul nato¾ko, že lekcia 1.1 + celkom zaplní obrazovku. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 1.1: POHYB KURZOROM + + + ** Pre pohyb kurzorum stlaè klávesy h,j,k,l ako je znázornené. ** + ^ + k Funkcia: Klávesa h je na¾avo a vykoná pohyb do¾ava. + < h l > Klávesa l je napravo a vykoná pohyb doprava. + j Klávesa j vyzerá ako šípka dole + v + 1. Pohybuj kurzorom po obrazovke, kým si na to nezvykneš. + + 2. Drž stlaèenú klávesu pre pohyb dole (j), kým sa jej funkcia nezopakuje. +---> Teraz sa už vieš pohybova na nasledujúcu lekciu. + + 3. Použitím klávesy pre pohyb dole prejdi na Lekciu 1.2. + +Poznámka: Ak si niesi istý tým èo si napísal, stlaè + na prechod do normálneho módu. + +Poznámka: Kurzorové klávesy sú tiež funkèné. Ale používaním hjkl sa budeš + schopný pohybova rýchlejšie, keï si zvykneš ich používa. Naozaj! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 1.2: ZATVÁRANIE VIMU + + + !! POZNÁMKA: Pred vykonaním týchto krokov si preèítaj celú túto lekciu !! + + 1. Stlaè klávesu (aby si sa uèite nachádzal v normálnom móde) + + 2. Napíš: :q! . + Tým ukonèíš prácu s editorom BEZ uloženia zmien, ktoré si vykonal. + + 3. Keï sa dostaneš na príkazový riadok, napíš príkaz, ktorým sa dostaneš + spe do tejto výuky. To môže by: vimtutor + + 4. Ak si si tieto kroky spo¾ahlivo zapamätal, vykonaj kroky 1 až 3, pre + ukonèenie a znovu spustenie editora. + +POZNÁMKA: :q! neuloží zmeny, ktoré si vykonal. O nieko¾ko lekcií + sa nauèíš ako uloži zmeny do súboru + + 5. presuò kurzor dole na lekciu 1.3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 1.3: EDITÁCIA TEXTU - MAZANIE + + +** Stlaèenie klávesy x v normálnom móde zmaže znak na mieste kurzora. ** + + 1. Presuò kurzor nižšie na riadok oznaèený znaèkou --->. + + 2. Aby si mohol odstráni chyby, pohybuj kurzorom kým neprejde na znak, + ktorý chceš zmaza. + + 3. Stlaè klávesu x aby sa zmazal nechcený znak. + + 4. Zopakuj kroky 2 až 4 až kým veta nieje správna. + +---> Kraava skooèilla ccezz mesiiac. + + 5. Ak je veta správna, prejdi na lekciu 1.4. + +POZNÁMKA: Neskúšaj si zapamäta obsah tejto výuky, ale sa uè používaním. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 1.4: EDITÁCIA TEXTU - VKLADANIE + + + ** Stlaèenie klávesy i umožòuje vkladanie textu. ** + + 1. Presuò kurzor nižšie na prvý riadok za znaèku --->. + + 2. Pre upravenie prvého riadku do rovnakého tvaru ako je druhý riadok, + presuò kurzor na prvý znak za misto, kde má by text vložený. + + 3. Stlaè klávesu i a napíš potrebný text. + + 4. Po opravení každej chyby, stlaè pre návrat do normálneho módu. + Zopakuj kroky 2 až 4 kým nieje veta správna. + +---> Tu je text chýbajúci tejto. +---> Tu je nejaký text chýbajúci od tejto èiary. + + 5. Keï sa dostatoène nauèíš vklada text, prejdi na nasledujúce zhrnutie. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 1.5: EDITÁCIA TEXTU - PRIDÁVANIE + + + ** Stlaèenie klávesy A umožòuje pridáva text. ** + + 1. Presuò kurozr nižšie na prvý riadok za znaèkou --->. + Nezáleží na tom, na ktorom znaku sa kurzor v tom riadku nachádza. + + 2. Stlaè klávesu A a napíš potrebný text. + + 3. Po pridaní textu stlaè klávesu pre návrat do Normálneho módu. + + 4. Presuò kurozr na druhý riadok oznaèený ---> a zopakuj + kroky 2 a 3 kým nieje veta správna. + +---> Tu je nejaký text chýbajúci o + Tu je nejaký text chýbajúci od tia¾to. +---> Tu tiež chýba nej + Tu tiež chýba nejaký text. + + 5. Keï sa dostatoène nauèíš pridáva text, prejdi na lekciu 1.6. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 1.6: EDITÁCIA SÚBORU + + + ** Napísaním :wq sa súbor uloží a zavrie ** + +!! POZNÁMKA: Pred vykonaním týchto krokov si preèítaj celú lekciu!! + +1. Opusti túto výuku, ako si to urobil v lekcii 1.2: :q! + +2. Do príkazového riadku napíš príkaz: vim tutor + 'vim' je príkaz, ktorý spustí editor Vim, 'tutor' je meno súboru, + ktorý chceš editova. Použi taký súbor, ktorý môžeš meni. + +3. Vlož a zmaž text tak, ako si sa nauèil v predošlých lekciach. + +4. Ulož súbor so zmenami a opusti Vim príkazom: :wq + +5. Reštartuj vimtutor a presuò sa dole na nasledujúce zhrnutie. + +6. Urob tak po preèítaní predošlých krokov a porozumeniu im. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZHRNUTIE LEKCIE 1 + + + 1. Kurzor sa pohybuje použitím kláves so šípkami alebo klávesmi hjkl. + h (do lava) j (dole) k (hore) l (doprava) + + 2. Pre spustenie Vimu (z príkazového riadku) napíš: vim FILENAME + + 3. Na ukonèenie Vimu napíš: :q! pre zrušenie všetkých zmien + alebo napíš: :wq pre uloženie zmien. + + 4. Na zmazanie znaku na mieste kurzora napíš: x + + 5. Pre vloženie textu na mieste kurzora v normálnom móde napíš: + i napíš vkladaný text vkladanie pred kurzor + A napíš pridávaný text vkladanie za riadok + +POZNÁMKA: Stlaèenie a premiestní do normálneho módu alebo zruší + nejaký nechcený a èiastoène dokonèený príkaz. + +Teraz pokraèuj lekciou 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.1: Mazacie príkazy + + + ** Napísanie príkazu dw zmaže znaky do konca slova. ** + +1. Stlaè aby si bol bezpeène v normálnom móde. + +2. Presuò kurzor nižšie na riadok oznaèený znaèkou --->. + +3. Presuò kurzor na zaèiatok slova, ktoré je potrebné zmaza. + +4. Napíš dw aby slovo zmizlo. + +POZNÁMKA: Písmeno d sa zobrazí na poslednom riadku obrazovky keï ho + napíšeš. Vim na teba poèká, aby si mohol napísa + písmeno w. Ak vidíš nieèo iné ako d , tak si napísal + nesprávny znak; stlaè a zaèni znova. + +---> Tu je nieko¾ko slov zábava, ktoré nie patria list do tejto vety. + +5. Zopakuj kroky 3 až 4 kým veta nieje správna a prejdi na lekciu 2.2. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.2: VIAC MAZACÍCH PRÍKAZOV + + + ** Napísanie príkazu d$ zmaže znaky do konca riadku ** + +1. Stlaè aby si bol bezpeène v normálnom móde. + +2. Presuò kurzor nižšie na riadok oznaèený znaèkou --->. + +3. Presuò kurzor na koniec správnej vety (ZA prvú bodku). + +4. Napíš d$ aby sa zmazali znaky do konca riadku. + +---> Niekto napísal koniec tohto riadku dvakrát. koniec tohot riadku dvakrát. + + +5. Prejdi na lekciu 2.3 pre pochopenie toho èo sa stalo. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.3: OPERÁTORY A POHYBY + + Ve¾a príkazov, ktoré menia text sú odvodené od operátorov a pohybov. + Formát pre príkaz mazania klávesou d je nasledovný: + + d pohyb + + kde: + d - je mazací operátor + pohyb - je to èo operátor vykonáva (vypísané nižšie) + + Krátky list pohybov: + w - do zaèiatku ïalšieho slova, okrem jeho prvého písmena. + e - do konca terajšieho slova, vrátane posledného znaku. + $ - do konca riadku, vrátane posledného znaku + + Takže napísaním de sa zmaže všetko od kurzora do konca slova. + +POZNÁMKA: Stlaèením iba pohybu v normálnom móde bez operátora + sa presunie kurzor tak ako je to špecivikované. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.4: Použitie viacnásobného pohybu + + + ** Napísaním èísla pred pohyb ho zopakuje zadný poèet krát ** + + 1. Presuò kurozr nižšie na zaèiatok riadku oznaèeného --->. + + 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èiatok riadku. + + 5. Zopakuj kroky 2 a 3 s rôznymi èíslami. + +---> Toto je riadok so slovami po kotrých sa môžete pohybova. + + 6. Prejdi na lekciu 2.5. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.5: POUŽITIE VIACNÁSOBNÉHO MAZANIA PRE HROMADNÉ MAZANIE + + + ** Napísanie èísla spolu s operátorom ho zopakuje zadaný poèet krát ** + + V kombinácii operátorov mazania a pohybu spomínaného vyššie vlož poèet + pred pohyb pre docielenie hromadného mazania: + d èíslo pohyb + + 1. Presuò kurzor na prvé slovo písané VE¼KÝMI PÍSMENAMI + v riadku oznaèenom --->. + + 2. Napíš 2dw a zmažeš dve slová písané VE¼KÝMI PÍSMENAMI + + 3. Zopakuj kroky 1 a 2 s použitím rôzneho èísla tak aby si zmazal slová + písané ve¾kými písmenami jedným príkazom. + +---> Tento ABC DE riadok FGHI JK LMN OP so slovamI je Q RS TUV vycisteny. + +POZNÁMKA: Èíslo medzi operátorom d a pohybom funguje podobne ako pri + použití s pohybom bez operátora. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.6: OPERÁCIE S RIADKAMI + + + ** Napísanie príkazu dd zmaže celý riadok. ** + +Vzh¾adom na frekvenciu mazania celého riadku, sa autori Vimu rozhodli, +že bude jednoduchšie maza celý riadok napísaním dvoch písmen d. + +1. Presuò kurzor na druhý riadok v texte na spodu. +2. Napíš dd aby si zmazal riadok. +3. Prejdi na štvrtý riadok. +4. Napíš 2dd aby si zmazal dva riadky. + + 1) Ruže sú èervené, + 2) Blato je zábavné, + 3) Fialky sú modré, + 4) Mám auto, + 5) Hodinky ukazujú èas, + 6) Cukor je sladký, + 7) A to si ty. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.7: PRÍKAZ UNDO + + +** Stlaè u pre vrátenie posledného príkazu, U pre úpravu celého riadku. ** + +1. Presuò kurzor nižšie na riadok oznaèený znaèkou ---> a premiestni ho na + prvú chybu. +2. Napíš x pre zmazanie prvého nechceného riadku. +3. Teraz napíš u èím vrátíš spä posledne vykonaný príkaz. +4. Teraz oprav všetky chyby na riadku použitím príkazu x . +5. Teraz napíš ve¾ké U èím vrátíš riadok do pôvodného stavu. +6. Teraz napíš u nieko¾ko krát, èím vrátíš spä príkaz U. +7. Teraz napíš CTRL-R (drž klávesu CTRL stlaèenú kým stláèaš R) nieko¾ko + krát, èím vrátíš spä predtým vrátené príkazy (undo z undo). + +---> Opprav chybby nna toomto riadku a zmeeò ich pommocou undo. + + 8. Tieto príkazy sú èasto používané. Teraz prejdi na zhrnutie lekcie 2. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 2 ZHRNUTIE + + + 1. Pre zmazanie znakov od kurzora do konca slova napíš: dw + + 2. Pre zmazanie znakov od kurzora do konca riadku napíš: d$ + + 3. Pre zmazanie celého riadku napíš: dd + + 4. Pre zopakovanie pohybu, napíš pred neho èíslo: 2w + + 5. Formát pre píkaz: + + operátor [èíslo] pohyb + kde: + operátor - èo treba robi, napríklad d pre zmazanie + [èíslo] - je volite¾ný poèet pre opakovanie pohybu + pohyb - pohyb po texte vzh¾adom na operátor, napríklad w (slovo), + $ (do konca riadku), atï. + + 6. Pre pohyb na zaèiatok riadku použi nulu: 0 + + 7. Pre vrátenie spä predošlej operácie napíš: u (malé u) + Pre vrátenie všetkých úprav na riadku napíš: U (ve¾ké U) + Pre vrátenie vrátených úprav napíš: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 3.1: PRÍKAZ VLOŽI + + + ** Napísanie príkazu p vloží psledný výmaz za kurzor. ** + + 1. Presuò kurzor nižšie na prvý riadok textu. + + 2. Napíš dd èím zmažeš riadok a uložíš ho do buffera editora Vim. + + 3. Presuò kurzor vyššie tam, kam zmazaný riadok patrí. + + 4. Ak napíšeš v normálnom móde p zmazaný riadk sa vloží. + + 5. Zopakuj kroky 2 až 4, kým riadky niesú v správnom poradí. + +---> d) Tiež sa dokážeš vzdeláva? +---> b) Fialky sú modré, +---> c) Inteligencia sa vzdeláva, +---> a) Ruže sú èervené, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 3.2: PRÍKAZ NAHRADENIA + + + ** Napísaním rx sa nahradí znak na mieste kurzora znakom x . ** + + 1. Presuò kurzor nižšie na prví riadok textu oznaèeného znaèkou --->. + + 2. Presuò kurzor na zaèiatok prvej chyby. + + 3. napíš r a potom znak, ktorý tam má by. + + 4. Zopakuj kroky 2 a 3, kým prvý riadok nieje zhodný s druhým. + +---> Kaï bol tento riasok píaaný, niekro stlašil nesprábne klávesy! +---> Keï bol tento riadok písaný, niekto stlaèil nesprávne klávesy! + + 5. Teraz prejdi na lekciu 3.2. + +POZNÁMKA: Pamätaj si, že nauèi sa môžeš len používanim, nie pamätaním. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 3.3. PRÍKAZ ÚPRAVY + + + ** Ak chceš zmeni èas slova do konca slova, napíš ce . ** + + 1. Presuò kurzor nižšie na prvý riadok oznaèený znaèkou --->. + + 2. Umiestni kurzor na písmeno o v slove rosfpl. + + 3. Napíš ce a oprav slovo (v tomto prípade napíš 'iadok'.) + + 4. Stlaè a prejdi na ïalší znak, ktorý treba zmeni. + + 5. Zopakuj kroky 3 a 4, kým prvá veta nieje rovnaká ako druhá. + +---> Tento rosfpl má nieko¾ko skic, ktoré je pirewvbí zmeni piyuèán príkazu. +---> Tento riadok má nieko¾ko slov, ktoré je potrebné zmeni použitím príkazu. + +Poznámka, že ce zmaže slovo a nastaví vkladací mód. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 3.4: VIAC ZMIEN POUŽITÍM c + + + ** Príkaz pre úpravy sa používa s rovnakými pohybmi ako pre mazanie ** + + 1. Príkaz pre úpravy pracuje rovnako ako pre mazanie. Formát je: + + c [èíslo] pohyb + + 2. Pohyby sú rovnaké, ako napríklad w (slovo) a $ (koniec riadku). + + 3. Presuò kurzor nižšie na prvý riadok oznaèený znaèkou --->. + + 4. Presuò kurzor na prvú chybu. + + 5. napíš c$ aby si mohol upravi zvyšok riadku pod¾a druhého + a stlaè . + +---> Koniec tohto riadku potrebuje pomoc, aby bol ako druhy. +---> Koniec tohto riadku potrebuje opravi použitím príkazu c$ . + +POZNÁMKA: Môžeš použi klávesu backspace na úpravu zmien poèas písania. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 3 ZHRNUTIE + + + 1. Na vloženie textu, ktorý už bol zmazaný, napíš p . To vloží zmazaný + text ZA kurzor (ak bol riadok zmazaný prejde na riadok pod kurzorom). + + 2. Pre naradenie znaku na mieste kurzora, napíš r a potom znak, ktorý + nahradí pôvodný znak. + + 3. Príkaz na upravenie umožòuje zmeni od kurzora až po miesto, ktoré + urèuje pohyb. napr. Napíš ce èím zmníš text od pozície + kurzora do konca slova, c$ zmení text do konca riadku. + + 4. Formát pre nahradenie je: + + c [èíslo] pohyb + + +Teraz prejdi na nalsedujúcu lekciu. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 4.1: POZÍCIA A STATUS SÚBORU + + + ** Stlaè CTRL-g pre zobrazenie svojej pozície v súbore a statusu súboru. + Napíš G pre presun na riadok v súbore. ** + + Poznámka: Preèítaj si celú túto lekciu skôr ako zaèneš vykonáva kroky!! + + 1. Drž stlaèenú klávesu Ctrl a stlaè g . Toto nazývame CTRL-G. + Na spodu obrazovky sa zobrazí správa s názvom súboru a pozíciou + v súbore. Zapamätajsi si èíslo riadku pre použitie v kroku 3. + + 2. Stlaè G èím sa dostaneš na spodok súboru. + Napíš gg èím sa dostaneš na zaèiatok súboru. + + 3. Napíš èíslo riadku na ktorom si sa nachádzal a stlaè G. To a + vráti na riadok, na ktorom si prvý krát stlaèil CTRL-G. + + 4. Ak sa cítíš schopný vykona teto kroky, vykonaj kroky 1 až 3. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 4.2: PRÍKAZ VYH¼ADÁVANIA + + + ** Napíš / nasledované reazcom pre vyh¾adanie príslušného reazca. ** + + 1. Napíš znak / v normálnom móde. Poznámka, že tento znak sa spolu + s kurzorom zobrazí v dolnej èasti obrazovky s : príkazom. + + 2. Teraz napíš 'errroor' . To je slovo, ktoré chceš vyh¾ada. + + 3. Pre vyh¾adanie ïalšieho výskytu rovnakého reazca, stlaè jednoducho n. + Pre vyh¾adanie ïalšieho výskytu rovnakého reazca opaèným smerom, + N. + + 4. Ak chceš vyh¾ada reazec v spätnom smere, použí príkaz ? miesto + príkazu /. + + 5. Pre návrat na miesto z ktorého si prišiel stlaè CTRL-O (drž stlaèenú + klávesu Ctrl poèas stlaèenia klávesy o). Zopakuj pre ïalší návrat + spä. CTRL-I ide vpred. + +POZNÁMKA: "errroor" nieje spôsob hláskovania error; errroor je error. +POZNÁMKA: Keï vyh¾adávanie dosiahne koniec tohto súboru, bude pokraèova na + zaèiatku, dokia¾ nieje resetované nastavenie 'wrapscan' . + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 4.3: VYH¼ADÁVANIE ZODPOVEDAJÚCICH ZÁTAVORIEK + + + ** Napíš % pre vyh¾adanie príslušného znaku ),], alebo } . ** + + 1. Premiestni kurzor na hocaký zo znakov (, [, alebo { v riadku nižšie + oznaèeného znaèkou --->. + + 2. Teraz napíš znak % . + + 3. Kurzor sa premiestni na zodpovedajúcu zátvorku. + + 4. Napíš % pre presun kurzoru spä na otvárajúcu zátvorku. + + 5. Presuò kurzor na iný zo znakov (,),[,],{ alebo } a všimni si + èo % vykonáva. + +---> Toto ( je testovací riadok s ('s, ['s ] a {'s } v riadku. )) + +Poznámka: Toto je ve¾mi výhodné použí pri ladení programu s chýbajúcimi + uzatvárajúcimi zátvorkami! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 4.4: PRÍKAZ NAHRADENIA + + + ** Napíš :s/starý/nový/g pre nahradenie slova 'starý' za slovo 'nový'. ** + + 1. Presuò kurzor nižšie na riadok oznaèený znaèkou --->. + + 2. Napíš :s/thee/the . Poznamka, že tento príkaz zmení len prvý + výskyt "thee" v riadku. + + 3. Teraz napíš :s/thee/the/g èo znamená celkové nahradenie v riadku. + Toto nahradí všetky výskyty v riadku. + +---> Thee best time to see thee flowers in thee spring. + + 4. Pre zmenu všetkých výskytov daného reazca medzi dvomi ridakami, + napíš :#,#s/starý/nový/g kde #,# sú èísla dvoch riadkov, v rozsahu + ktorých sa nahradenie vykoná. + napíš :%s/starý/nový/g pre zmenu všetkých výskytov v celom riadku + napíš :%s/starý/nový/gc nájde všetky výskyty v celom súbore, + s otázkou èi nahradi alebo nie + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 4 ZHRNUTIE + + + 1. CTRL-g vypíše tvoju pozíciu v súbore a status súboru. + G a premiestni na koniec riadku. + èíslo G a premiestni na riadok s èíslom. + gg a presunie na prvý riadok + + 2. Napísanie / nasledované reazcom vyh¾adá reazec smerom DOPREDU. + Napísanie ? nasledované reazcom vyh¾ada reazec smerom DOZADU. + Napísanie n po vyh¾adávaní, vyh¾adá nasledujúci výskyt reazca + v rovnakom smere, prièom N vyh¾adá v opaènom smere. + CTRL-O a vráti spä na staršiu pozíciu, CTRL-I na novšiu pozíciu. + + 3. Napísanie % keï kurzor je na (,),[,],{, alebo } nájde zodpovdajúcu + párnu zátvorku. + + 4. Pre nahradenie nového za prvý starý v riadku napíš :s/starý/nový + Pre nahradenie nového za všetky staré v riadku napíš :s/starý/nový/g + Pre nahradenie reazcov medzi dvoma riadkami 3 napíš :#,#/starý/nový/g + Pre nahradenie všetkých výskytov v súbore napíš :%s/starý/nový/g + Pre potvrdenie každého nahradenia pridaj 'c' :%s/starý/nový/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 5.1 AKO SPUSTI VONKAJŠÍ PRÍKAZ + + + ** Napíš príkaz :! nasledovaný vonkajším príkazom pre spustenie príkazu ** + + 1. Napíš obvyklý píkaz : ktorý nastaví kurzor na spodok obrazovky. + To umožní napísa príkaz. + + 2. Teraz napíš ! (výkrièník). To umožní spusti hociaký vonkajší príkaz + z príkazového riadku. + + 3. Ako príklad napíš ls za ! a stlaè . Tento príkaz + zobrazí obsah tvojho adresára rovnako ako na príkazovom riadku. + Alebo použi :!dir ak ls nefunguje. + +Poznámka: Takto je možné spusti hociaký vonkajší príkaz s argumentami. +Poznámka: Všetky príkazy : musia by dokonèené stlaèením + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 5.2: VIAC O UKLADANÍ SÚBOROV + + + ** Pre uloženie zmien v súbore, napíš :w FILENAME. ** + + 1. Napíš :!dir alebo :!ls pre výpis aktuálneho adresára. + Už vieš, že musíš za týmto stlaèi . + + 2. Vyber názov súboru, ktorý ešte neexistuje, ako napr. TEST. + + 3. Teraz napíš: :w TEST (kde TEST je názov vybratého súboru.) + + 4. To uloží celý súbor (Vim Tutor) pod názovm TEST. + Pre overenie napíš :!dir , èím zobrazíš obsah adresára. + +Poznámka: že ak ukonèíš prácu s editorom Vim a znovu ho spustíš príkazom + vim TEST, súbor bude kópia výuky, keï si ho uložil. + + 5. Teraz odstráò súbor napísaním (MS-DOS): :!del TEST + alebo (Unix): :!rm TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 5.3 VÝBER TEXTU PRE ULOŽENIE + + + ** Pre uloženie èasti súboru, napíš v pohyb :w FILENAME ** + + 1. Presuò kurozr na tento riadok. + + 2. Stlaè v a presuò kurozr na piatu položku dole. Poznámka, že + tento text je vyznaèený (highlighted). + + 3. Stlaè klávesu : . V spodnej èasti okna sa objaví :'<,'>. + + 4. Napíš w TEST , kde TEST je meno súboru, ktorý zatial neexistuje. + Skontroluj, e vidíš :'<,'>w TEST predtým než stlaèíš Enter. + + 5. Vim zapíše oznaèené riadky do súboru TEST. Použi :!dir alebo !ls + pre overenie. Zatial ho ešte nemaž! Použijeme ho v ïalšej lekcii. + +POZNÁMKA: Stlaèením klávesy v sa spustí vizuálne oznaèovanie. + Môžeš pohybova kurzorom pre upresnenie vyznaèeného textu. + Potom môžeš použi operátor pre vykonanie nejakej akcie + s textom. Napríklad d zmaže vyznaèený text. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 5.4: VÝBER A ZLUÈOVANIE SÚBOROV + + + ** Pre vloženie obsahu súboru, napíš :r FILENAME ** + + 1. Premiestni kurzor nad tento riadok. + +POZNÁMKA: Po vykonaní kroku 2 uvidíš text z lekcie 5.3. Potom sa presuò + dole, aby si videl túto lekciu. + + 3. Teraz vlož súbor TEST použitím príkazu :r TEST kde TEST je názov + súboru. Súbor, ktorý si použil je umiestnený pod riadkom s kurzorom. + +POZNÁMKA: Môžeš tiež naèíta výstup vonkajšieho príkazu. Napríklad :r !ls + naèíta výstup príkazu ls a umiestni ho za pozíciu kurzora. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 5 ZHRNUTIE + + + 1. :!príkaz spustí vonkajší príkaz. + + Niektoré využite¾né príklady sú: + (MS_DOS) (UNIX) + :!dir :!ls - zobrazí obsah adresára + :!del FILENAME :!rm FILENAME - odstráni súbor FILENAME + + 2. :w FILENAME uloží aktuálny súbor na disk pod menom FILENAME. + + 3. v pohyb :w FILENAME uloží vizuálne oznaèené riadky do + súboru FILENAME. + + 4. :r FILENAME vyberie z disku súbor FILENAME a vloží ho do aktuálneho + súboru za pozíciou kurzora. + + 5. :r !dir naèíta výstup z príkazu dir a vloží ho za pozíciu kurzora. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 6.1: PRÍKAZ OTVORI + + +** Napíš o pre vloženie riadku pod kurzor a prepnutie do vkladacieho módu ** + + 1. Presuò kurzor nižšie na riadok oznaèený znaèkou --->. + + 2. Napíš o (malé písmeno) pre vloženie èistého riadku pod kurzorm + a prepnutie do vkladacieho módu. + + 3. Teraz skopíruj riadok oznaèený ---> a stlaè pre ukonèenie + vkladacieho módu. + +---> Po napísaní o sa kurzor premiestní na vložený riadok do vkladacieho + módu. + + 4. Pre otvorenie riadku nad kurzorom, jednotucho napíš ve¾ké O , + namiesto malého o. Vyskúšaj si to na riadku dole. + +---> Vlož riadok nad týmto napísaním O, keï kurzor je na tomto riadku. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 6.2: PRÍKAZ PRIDA + + + ** Napíš a pre vloženie textu ZA kurzor. ** + + 1. Presuò kurzor nižšie na koniec prvého riadku oznaèeného znaèkou ---> + + 2. Stlaè klávesu e dokia¾ kurozr nieje na konci riadku. + + 3. Napíš a (malé písmeno) pre pridanie textu ZA kurzorom. + + 4. Dokonèí slovo tak ako je to v druhom riadku. Stlaš pre + opustenie vkladacieho módu. + + 5. Použi e na presun na ïalšie nedokonèené slovo a zopakuj kroky 3 a 4. + +---> Tento ri ti dovo¾uje nácv priávan testu na koniec riadku. +---> Tento riadok ti dovo¾uje nácvik pridávania textu na koniec riadku. + +POZNÁMKA: a, i, A štartujú rovnaký vkladací mód, jediný rozidel je, kde + sa znaky vkladajú. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 6.3: INÝ SPOSOB NAHRADZOVANIA + + + ** Napíš ve¾ké R pre nahradenie viac ako jedného znaku. ** + + 1. Presuò kurzor nižšie na prvý riadok oznaèený znaèkou --->. Premiestni + kurzor na zaèiatok prvého výskytu xxx. + + 2. Teraz napíš R a napíš èíslo uvedené v druhom riadku, takže + sa ním nahradí pôvodné xxx. + + 3. Stlaè pre opustenie nahradzovacieho módu. Poznámka, že zvyšok + riadku zostane nezmenený. + + 4. Zopakuj tieto kroky pre nahradenie zvyšných xxx. + +---> Pridaním 123 ku xxx dostaneš xxx. +---> Pridaním 123 ku 456 dostaneš 579. + +POZNÁMKA: Nahradzovací mód je ako vkladací mód, ale každý napísaný znak + zmaže existujúci znak. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lekcia 6.4: Copy Paste textu + + ** použí operátor y pre copy textku a p pre jeho paste ** + + 1. Choï nižšie na riadok oznaèený ---> a umiestni kurozr za "a)". + + 2. Naštartuj vizuálny mód použitím v a presuò kurozr pred "first". + + 3. Napíš y pre vystrihnutie (copy) oznaèeného textu. + + 4. Presuò kurozr na koniec ïalšieho riadku: j$ + + 5. Napíš p pre vložnie (paste) textu. Potom napíš: a druha . + + 6. Použi vizuálny mód pre oznaèenie "položka.", vystrihni to + použitím y, presuò sa na koniec nasledujúceho riadku použitím j$ + a vlož sem text použitím p. + +---> a) toto je prvá položka +---> b) + +POZNÁMKA: Môžeš použi tiež y ako operátor; yw vystrihne jedno slovo. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 6.5: NASTAVENIE MOŽNOSTÍ + + +** Nastav možnosti, takže vyh¾adávanie alebo nahradzovanie ignoruje + rozlišovanie ** + + + 1. Vyh¾adaj reazec 'ignore' napísaním: + /ignore + Zopakuj vyh¾adávanie nieko¾ko krát stlaèením klávesy n . + + 2. Nastav možnos 'ic' (Ignore case) napísaním príkazu: + :set ic + + 3. Teraz vyh¾adaj reazec 'ingore' znova stlaèením klávesy n + Poznámka, že teraz sú vyh¾adané aj Ignore a IGNORE. + + 4. Nastav možnosi 'hlsearch' a 'incsearch': + :set hls is + + 5. Teraz spusti vyh¾adávací príkaz znovu, a pozri èo sa stalo: + /ignore + + 6. Pre opetovné zapnutie rozlyšovania ve¾kých a malých písmen + napíš: :set noic + +POZNÁMKA: Na odstránenie zvýraznenia výrazov napíš: :nohlsearch +POZNÁMKA: Ak chceš nerozlyšova ve¾kos písmen len pre jedno + použitie vyh¾adávacieho príkazu, použi \c: /ignore\c + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 6 ZHRNUTIE + + + 1. Napíš o pre otvorenie riadku pod kurzorom a štart vkladacieho módu. + 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íkaz e presunie kurozr na koniec slova + + 4. Operátor y vystrihne (skopíruje) text, p ho vloží. + + 5. Napísanie ve¾kého R prepne do nahradzovacieho módu, kým nieje + stlaèené . + + 6. Napísanie ":set xxx" nastaví možnos "xxx". Niektoré nastavenia sú: + 'ic' 'ignorecase' ignoruje ve¾ké a malé písmená poèas vyh¾adávania. + 'is' 'incsearch' zobrazuje èiastoèné reazce vyh¾adávaného reazca. + 'hls' 'hlsearch' vyznaèí všetky vyh¾adávané reazce. + Môžeš použi hociktorý z dlhých a krátkych názvov možností. + + 7. Vlož "no" pred nastavenie pre jeho vypnutie: :set noic + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 7.1: ZÍSKANIE NÁPOVEDY + + + ** Používaj on-line systém nápovedy ** + + Vim má obsiahly on-line systém nápovedy. Pre odštartovanie, vyskúšaj jeden + z týchto troch: + - stlaè klávesu (ak nejakú máš) + - stlaè klávesu (ak nejakú máš) + - napíš :help + + Èítaj text v okne nápovedy pre získanie predstavy ako nápoveda funguje. + Napíš CTRL-W CTRL-W pre skok z jedného okna do druhého. + Napíš :q èím zatvoríš okno nápovedy. + + Môžeš nájs help ku hociakej téme pridaním argumentu ku príkazu ":help". + Vyskúšaj tieto (nezabudni stlaèi ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 7.2: VYTVORENIE ŠTARTOVACIEHO SKRIPTU + + ** Zapni funkcie editora Vim ** + + Vim má omnoho viac funkcii než Vi, ale veèšina z nich je implicitne + vypnutá. Pre používanie viac Vim funkcii vytvor "vimrc" súbor. + + 1. Zaèni editova "vimrc" súbor, to závisí na použitom systéme: + :e ~/.vimrc pre Unix + :e $VIM/_vimrc pre MS-Windows + + 2. Teraz si preèítaj text príkladu "vimrc" súboru: + + :r $VIMRUNTIME/vimrc_example.vim + + 3. Ulož súbor: + :w + + Pri nasledujúcom štarte editora Vim sa použije zvýrazòovanie syntaxe. + Do "vimrc" súboru môžeš prida všetky svoje uprednostòované nastavenia. + Pre viac informácii napíš :help vimrc-intro + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + LEKCIA 7.3 DOKONÈENIE + + ** Dokonèi príkaz na príkazovom riadku použitím CTRL-D a ** + + 1. Uisti sa, že Vim nieje v kompatibilnom móde: :set nocp + + 2. Pozri sa aké súbory sa nachádzajú v adresári: :!ls alebo :!dir + + 3. Napíš zaèiatok príkazu: :e + + 4. Stlaè CTRL-D a Vim zobrazí zoznam príkazov zaèínajúcich "e". + + 5. Stlaè a Vim dokonèí meno príkazu na ":edit". + + 6. Teraz pridaj medzerník a zaèiatok mena existujúceho súboru: + :edit FIL + + 7. Stlaè . Vim dokonèí meno (ak je jedineèné). + +POZNÁMKA: Dokonèovanie funguje pre ve¾a príkazov. Vyskúšaj stlaèenie + CTRL-D a . Špeciálne je to užitoèné pre príkaz :help. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + LEKCIA 7 ZHRNUTIE + + 1. Napíš :help alebo stlaè alebo pre otvorenie okna nápovedy. + + 2. Napíš :help príkaz pre vyh¾adanie nápovedy ku príkazu príkaz. + + 3. Napíš CTRL-W CTRL-W na preskoèenie do iného okna. + + 4. Napíš :q pre zatvorenie okna nápovedy + + 5. Vytvor štartovací skript vimrc pre udržanie uprednostòovaných nastavení. + + 6. Poèas písania príkazu : stlaè CTRL-D pre zobrazenie dokonèení. + Stlaè pre použitie jedného z dokonèení. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + + Toto vymedzuje výuku Vimu. Toto je urèené pre strucný preh¾ad o editore + Vim, úplne postaèujúce pre ¾ahké a obstojné používanie tohto editora. + Táto výuka je ïaleko od kompletnosti, pretože Vim má omnoho viacej príkazov. + Ako ïalšie si preèítaj užívat¾ský manuál: ":help user-manual". + + Pre ïalšie èítanie a štúdium je odporúèaná kniha: + Vim - Vi Improved - od Steve Oualline + Vydavate¾: New Riders + Prvá kniha urèená pre Vim. Špeciálne vhodná pre zaèiatoèníkov. + Obsahuje množstvo príkladov a obrázkov. + Pozri na http://iccf-holland.org/click5.html + + Táto kniha je staršia a je viac o Vi ako o Vim, ale je tiež odporúèaná: + Learning the Vi Editor - od Linda Lamb + Vydavate¾: O'Reilly & Associates Inc. + Je to dobrá kniha pre získanie vedomostí o práci s editorom Vi. + Šieste vydanie obsahuje tiež informácie o editore Vim. + + Táto výuka bola napísaná autormi Michael C. Pierce a Robert K. Ware, + Colorado School of Mines s použitím myšlienok dodanými od Charles Smith, + Colorado State University. E-mail: bware@mines.colorado.edu. + + Modifikované pre Vim od Bram Moolenaar. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Preklad do Slovenèiny: ¼uboš Èelko + e-mail: celbos@inmail.sk + Last Change: 2006 Apr 18 + encoding: cp1250 diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.sk.utf-8 b/vim/bundle/ubuntu-vim72/tutor/tutor.sk.utf-8 new file mode 100644 index 0000000..c4e0c4f --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.sk.utf-8 @@ -0,0 +1,1008 @@ +=============================================================================== += 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ľmi výkonný editor, ktorý má príliž veľa príkazov na to aby + mohli byt vÅ¡etky popísané vo výuke akou je táto. Táto výuka + popisuje dostatoÄné množstvo príkazov nato aby bolo možné používaÅ¥ + Vim ako viacúÄelový editor. + + Približný Äas potrebný na prebratie tejto výuky je 25-30 minút, + závisí na tom, koľko je stráveného Äasu s preskúšavaním. + + UPOZORNENIE: + Príkazy v lekciách modifikujú text. Vytvor kópiu tohto súboru aby + sa mohlo precviÄovaÅ¥ na ňom (pri Å¡tarte "vimtutor" je toto kópia). + + Je dôležité zapamätaÅ¥ si, že táto výuka je vytvorená pre výuku + používaním. To znamená, že je potrebné si príkazy vyskúšaÅ¥, aby bolo + uÄenie správne. Ak len Äitas text, príkazy zabudneÅ¡! + + PresvedÄ sa, že Shift-Lock NIEJE stlaÄený a stlaÄt klávesu + j niekoľko krát, aby sa kurzor posunul natoľko, že lekcia 1.1 + celkom zaplní obrazovku. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 1.1: POHYB KURZOROM + + + ** Pre pohyb kurzorum stlaÄ klávesy h,j,k,l ako je znázornené. ** + ^ + k Funkcia: Klávesa h je naľavo a vykoná pohyb doľava. + < h l > Klávesa l je napravo a vykoná pohyb doprava. + j Klávesa j vyzerá ako šípka dole + v + 1. Pohybuj kurzorom po obrazovke, kým si na to nezvykneÅ¡. + + 2. Drž stlaÄenú klávesu pre pohyb dole (j), kým sa jej funkcia nezopakuje. +---> Teraz sa už vieÅ¡ pohybovaÅ¥ na nasledujúcu lekciu. + + 3. Použitím klávesy pre pohyb dole prejdi na Lekciu 1.2. + +Poznámka: Ak si niesi istý tým Äo si napísal, stlaÄ + na prechod do normálneho módu. + +Poznámka: Kurzorové klávesy sú tiež funkÄné. Ale používaním hjkl sa budeÅ¡ + schopný pohybovaÅ¥ rýchlejÅ¡ie, keÄ si zvykneÅ¡ ich používaÅ¥. Naozaj! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 1.2: ZATVÃRANIE VIMU + + + !! POZNÃMKA: Pred vykonaním týchto krokov si preÄítaj celú túto lekciu !! + + 1. StlaÄ klávesu (aby si sa uÄite nachádzal v normálnom móde) + + 2. Napíš: :q! . + Tým ukonÄíš prácu s editorom BEZ uloženia zmien, ktoré si vykonal. + + 3. KeÄ sa dostaneÅ¡ na príkazový riadok, napíš príkaz, ktorým sa dostaneÅ¡ + speÅ¥ do tejto výuky. To môže byÅ¥: vimtutor + + 4. Ak si si tieto kroky spoľahlivo zapamätal, vykonaj kroky 1 až 3, pre + ukonÄenie a znovu spustenie editora. + +POZNÃMKA: :q! neuloží zmeny, ktoré si vykonal. O niekoľko lekcií + sa nauÄíš ako uložiÅ¥ zmeny do súboru + + 5. presuň kurzor dole na lekciu 1.3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 1.3: EDITÃCIA TEXTU - MAZANIE + + +** StlaÄenie klávesy x v normálnom móde zmaže znak na mieste kurzora. ** + + 1. Presuň kurzor nižšie na riadok oznaÄený znaÄkou --->. + + 2. Aby si mohol odstrániÅ¥ chyby, pohybuj kurzorom kým neprejde na znak, + ktorý chceÅ¡ zmazaÅ¥. + + 3. StlaÄ klávesu x aby sa zmazal nechcený znak. + + 4. Zopakuj kroky 2 až 4 až kým veta nieje správna. + +---> Kraava skooÄilla ccezz mesiiac. + + 5. Ak je veta správna, prejdi na lekciu 1.4. + +POZNÃMKA: Neskúšaj si zapamätaÅ¥ obsah tejto výuky, ale sa uÄ používaním. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 1.4: EDITÃCIA TEXTU - VKLADANIE + + + ** StlaÄenie klávesy i umožňuje vkladanie textu. ** + + 1. Presuň kurzor nižšie na prvý riadok za znaÄku --->. + + 2. Pre upravenie prvého riadku do rovnakého tvaru ako je druhý riadok, + presuň kurzor na prvý znak za misto, kde má byÅ¥ text vložený. + + 3. StlaÄ klávesu i a napíš potrebný text. + + 4. Po opravení každej chyby, stlaÄ pre návrat do normálneho módu. + Zopakuj kroky 2 až 4 kým nieje veta správna. + +---> Tu je text chýbajúci tejto. +---> Tu je nejaký text chýbajúci od tejto Äiary. + + 5. KeÄ sa dostatoÄne nauÄíš vkladaÅ¥ text, prejdi na nasledujúce zhrnutie. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 1.5: EDITÃCIA TEXTU - PRIDÃVANIE + + + ** StlaÄenie klávesy A umožňuje pridávaÅ¥ text. ** + + 1. Presuň kurozr nižšie na prvý riadok za znaÄkou --->. + Nezáleží na tom, na ktorom znaku sa kurzor v tom riadku nachádza. + + 2. StlaÄ klávesu A a napíš potrebný text. + + 3. Po pridaní textu stlaÄ klávesu pre návrat do Normálneho módu. + + 4. Presuň kurozr na druhý riadok oznaÄený ---> a zopakuj + kroky 2 a 3 kým nieje veta správna. + +---> Tu je nejaký text chýbajúci o + Tu je nejaký text chýbajúci od tiaľto. +---> Tu tiež chýba nej + Tu tiež chýba nejaký text. + + 5. KeÄ sa dostatoÄne nauÄíš pridávaÅ¥ text, prejdi na lekciu 1.6. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 1.6: EDITÃCIA SÚBORU + + + ** Napísaním :wq sa súbor uloží a zavrie ** + +!! POZNÃMKA: Pred vykonaním týchto krokov si preÄítaj celú lekciu!! + +1. Opusti túto výuku, ako si to urobil v lekcii 1.2: :q! + +2. Do príkazového riadku napíš príkaz: vim tutor + 'vim' je príkaz, ktorý spustí editor Vim, 'tutor' je meno súboru, + ktorý chceÅ¡ editovaÅ¥. Použi taký súbor, ktorý môžeÅ¡ meniÅ¥. + +3. Vlož a zmaž text tak, ako si sa nauÄil v predoÅ¡lých lekciach. + +4. Ulož súbor so zmenami a opusti Vim príkazom: :wq + +5. ReÅ¡tartuj vimtutor a presuň sa dole na nasledujúce zhrnutie. + +6. Urob tak po preÄítaní predoÅ¡lých krokov a porozumeniu im. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZHRNUTIE LEKCIE 1 + + + 1. Kurzor sa pohybuje použitím kláves so šípkami alebo klávesmi hjkl. + h (do lava) j (dole) k (hore) l (doprava) + + 2. Pre spustenie Vimu (z príkazového riadku) napíš: vim FILENAME + + 3. Na ukonÄenie Vimu napíš: :q! pre zruÅ¡enie vÅ¡etkých zmien + alebo napíš: :wq pre uloženie zmien. + + 4. Na zmazanie znaku na mieste kurzora napíš: x + + 5. Pre vloženie textu na mieste kurzora v normálnom móde napíš: + i napíš vkladaný text vkladanie pred kurzor + A napíš pridávaný text vkladanie za riadok + +POZNÃMKA: StlaÄenie Å¥a premiestní do normálneho módu alebo zruší + nejaký nechcený a ÄiastoÄne dokonÄený príkaz. + +Teraz pokraÄuj lekciou 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.1: Mazacie príkazy + + + ** Napísanie príkazu dw zmaže znaky do konca slova. ** + +1. StlaÄ aby si bol bezpeÄne v normálnom móde. + +2. Presuň kurzor nižšie na riadok oznaÄený znaÄkou --->. + +3. Presuň kurzor na zaÄiatok slova, ktoré je potrebné zmazaÅ¥. + +4. Napíš dw aby slovo zmizlo. + +POZNÃMKA: Písmeno d sa zobrazí na poslednom riadku obrazovky keÄ ho + napíšeÅ¡. Vim na teba poÄká, aby si mohol napísaÅ¥ + písmeno w. Ak vidíš nieÄo iné ako d , tak si napísal + nesprávny znak; stlaÄ a zaÄni znova. + +---> Tu je niekoľko slov zábava, ktoré nie patria list do tejto vety. + +5. Zopakuj kroky 3 až 4 kým veta nieje správna a prejdi na lekciu 2.2. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.2: VIAC MAZACÃCH PRÃKAZOV + + + ** Napísanie príkazu d$ zmaže znaky do konca riadku ** + +1. StlaÄ aby si bol bezpeÄne v normálnom móde. + +2. Presuň kurzor nižšie na riadok oznaÄený znaÄkou --->. + +3. Presuň kurzor na koniec správnej vety (ZA prvú bodku). + +4. Napíš d$ aby sa zmazali znaky do konca riadku. + +---> Niekto napísal koniec tohto riadku dvakrát. koniec tohot riadku dvakrát. + + +5. Prejdi na lekciu 2.3 pre pochopenie toho Äo sa stalo. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.3: OPERÃTORY A POHYBY + + Veľa príkazov, ktoré menia text sú odvodené od operátorov a pohybov. + Formát pre príkaz mazania klávesou d je nasledovný: + + d pohyb + + kde: + d - je mazací operátor + pohyb - je to Äo operátor vykonáva (vypísané nižšie) + + Krátky list pohybov: + w - do zaÄiatku ÄalÅ¡ieho slova, okrem jeho prvého písmena. + e - do konca terajÅ¡ieho slova, vrátane posledného znaku. + $ - do konca riadku, vrátane posledného znaku + + Takže napísaním de sa zmaže vÅ¡etko od kurzora do konca slova. + +POZNÃMKA: StlaÄením iba pohybu v normálnom móde bez operátora + sa presunie kurzor tak ako je to Å¡pecivikované. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.4: Použitie viacnásobného pohybu + + + ** Napísaním Äísla pred pohyb ho zopakuje zadný poÄet krát ** + + 1. Presuň kurozr nižšie na zaÄiatok riadku oznaÄeného --->. + + 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Äiatok riadku. + + 5. Zopakuj kroky 2 a 3 s rôznymi Äíslami. + +---> Toto je riadok so slovami po kotrých sa môžete pohybovaÅ¥. + + 6. Prejdi na lekciu 2.5. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.5: POUŽITIE VIACNÃSOBNÉHO MAZANIA PRE HROMADNÉ MAZANIE + + + ** Napísanie Äísla spolu s operátorom ho zopakuje zadaný poÄet krát ** + + V kombinácii operátorov mazania a pohybu spomínaného vyššie vlož poÄet + pred pohyb pre docielenie hromadného mazania: + d Äíslo pohyb + + 1. Presuň kurzor na prvé slovo písané VEĽKÃMI PÃSMENAMI + v riadku oznaÄenom --->. + + 2. Napíš 2dw a zmažeÅ¡ dve slová písané VEĽKÃMI PÃSMENAMI + + 3. Zopakuj kroky 1 a 2 s použitím rôzneho Äísla tak aby si zmazal slová + písané veľkými písmenami jedným príkazom. + +---> Tento ABC DE riadok FGHI JK LMN OP so slovamI je Q RS TUV vycisteny. + +POZNÃMKA: Číslo medzi operátorom d a pohybom funguje podobne ako pri + použití s pohybom bez operátora. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.6: OPERÃCIE S RIADKAMI + + + ** Napísanie príkazu dd zmaže celý riadok. ** + +Vzhľadom na frekvenciu mazania celého riadku, sa autori Vimu rozhodli, +že bude jednoduchÅ¡ie mazaÅ¥ celý riadok napísaním dvoch písmen d. + +1. Presuň kurzor na druhý riadok v texte na spodu. +2. Napíš dd aby si zmazal riadok. +3. Prejdi na Å¡tvrtý riadok. +4. Napíš 2dd aby si zmazal dva riadky. + + 1) Ruže sú Äervené, + 2) Blato je zábavné, + 3) Fialky sú modré, + 4) Mám auto, + 5) Hodinky ukazujú Äas, + 6) Cukor je sladký, + 7) A to si ty. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 2.7: PRÃKAZ UNDO + + +** StlaÄ u pre vrátenie posledného príkazu, U pre úpravu celého riadku. ** + +1. Presuň kurzor nižšie na riadok oznaÄený znaÄkou ---> a premiestni ho na + prvú chybu. +2. Napíš x pre zmazanie prvého nechceného riadku. +3. Teraz napíš u Äím vrátíš späť posledne vykonaný príkaz. +4. Teraz oprav vÅ¡etky chyby na riadku použitím príkazu x . +5. Teraz napíš veľké U Äím vrátíš riadok do pôvodného stavu. +6. Teraz napíš u niekoľko krát, Äím vrátíš späť príkaz U. +7. Teraz napíš CTRL-R (drž klávesu CTRL stlaÄenú kým stláÄaÅ¡ R) niekoľko + krát, Äím vrátíš späť predtým vrátené príkazy (undo z undo). + +---> Opprav chybby nna toomto riadku a zmeeň ich pommocou undo. + + 8. Tieto príkazy sú Äasto používané. Teraz prejdi na zhrnutie lekcie 2. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 2 ZHRNUTIE + + + 1. Pre zmazanie znakov od kurzora do konca slova napíš: dw + + 2. Pre zmazanie znakov od kurzora do konca riadku napíš: d$ + + 3. Pre zmazanie celého riadku napíš: dd + + 4. Pre zopakovanie pohybu, napíš pred neho Äíslo: 2w + + 5. Formát pre píkaz: + + operátor [Äíslo] pohyb + kde: + operátor - Äo treba robiÅ¥, napríklad d pre zmazanie + [Äíslo] - je voliteľný poÄet pre opakovanie pohybu + pohyb - pohyb po texte vzhľadom na operátor, napríklad w (slovo), + $ (do konca riadku), atÄ. + + 6. Pre pohyb na zaÄiatok riadku použi nulu: 0 + + 7. Pre vrátenie späť predoÅ¡lej operácie napíš: u (malé u) + Pre vrátenie vÅ¡etkých úprav na riadku napíš: U (veľké U) + Pre vrátenie vrátených úprav napíš: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 3.1: PRÃKAZ VLOŽIŤ + + + ** Napísanie príkazu p vloží psledný výmaz za kurzor. ** + + 1. Presuň kurzor nižšie na prvý riadok textu. + + 2. Napíš dd Äím zmažeÅ¡ riadok a uložíš ho do buffera editora Vim. + + 3. Presuň kurzor vyššie tam, kam zmazaný riadok patrí. + + 4. Ak napíšeÅ¡ v normálnom móde p zmazaný riadk sa vloží. + + 5. Zopakuj kroky 2 až 4, kým riadky niesú v správnom poradí. + +---> d) Tiež sa dokážeÅ¡ vzdelávaÅ¥? +---> b) Fialky sú modré, +---> c) Inteligencia sa vzdeláva, +---> a) Ruže sú Äervené, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 3.2: PRÃKAZ NAHRADENIA + + + ** Napísaním rx sa nahradí znak na mieste kurzora znakom x . ** + + 1. Presuň kurzor nižšie na prví riadok textu oznaÄeného znaÄkou --->. + + 2. Presuň kurzor na zaÄiatok prvej chyby. + + 3. napíš r a potom znak, ktorý tam má byÅ¥. + + 4. Zopakuj kroky 2 a 3, kým prvý riadok nieje zhodný s druhým. + +---> KaÄ bol tento riasok píaaný, niekro stlaÅ¡il nesprábne klávesy! +---> KeÄ bol tento riadok písaný, niekto stlaÄil nesprávne klávesy! + + 5. Teraz prejdi na lekciu 3.2. + +POZNÃMKA: Pamätaj si, že nauÄiÅ¥ sa môžeÅ¡ len používanim, nie pamätaním. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 3.3. PRÃKAZ ÚPRAVY + + + ** Ak chceÅ¡ zmeniÅ¥ ÄasÅ¥ slova do konca slova, napíš ce . ** + + 1. Presuň kurzor nižšie na prvý riadok oznaÄený znaÄkou --->. + + 2. Umiestni kurzor na písmeno o v slove rosfpl. + + 3. Napíš ce a oprav slovo (v tomto prípade napíš 'iadok'.) + + 4. StlaÄ a prejdi na Äalší znak, ktorý treba zmeniÅ¥. + + 5. Zopakuj kroky 3 a 4, kým prvá veta nieje rovnaká ako druhá. + +---> Tento rosfpl má niekoľko skic, ktoré je pirewvbí zmeniÅ¥ piyÅ¥uÄán príkazu. +---> Tento riadok má niekoľko slov, ktoré je potrebné zmeniÅ¥ použitím príkazu. + +Poznámka, že ce zmaže slovo a nastaví vkladací mód. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 3.4: VIAC ZMIEN POUŽITÃM c + + + ** Príkaz pre úpravy sa používa s rovnakými pohybmi ako pre mazanie ** + + 1. Príkaz pre úpravy pracuje rovnako ako pre mazanie. Formát je: + + c [Äíslo] pohyb + + 2. Pohyby sú rovnaké, ako napríklad w (slovo) a $ (koniec riadku). + + 3. Presuň kurzor nižšie na prvý riadok oznaÄený znaÄkou --->. + + 4. Presuň kurzor na prvú chybu. + + 5. napíš c$ aby si mohol upraviÅ¥ zvyÅ¡ok riadku podľa druhého + a stlaÄ . + +---> Koniec tohto riadku potrebuje pomoc, aby bol ako druhy. +---> Koniec tohto riadku potrebuje opraviÅ¥ použitím príkazu c$ . + +POZNÃMKA: MôžeÅ¡ použiÅ¥ klávesu backspace na úpravu zmien poÄas písania. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 3 ZHRNUTIE + + + 1. Na vloženie textu, ktorý už bol zmazaný, napíš p . To vloží zmazaný + text ZA kurzor (ak bol riadok zmazaný prejde na riadok pod kurzorom). + + 2. Pre naradenie znaku na mieste kurzora, napíš r a potom znak, ktorý + nahradí pôvodný znak. + + 3. Príkaz na upravenie umožňuje zmeniÅ¥ od kurzora až po miesto, ktoré + urÄuje pohyb. napr. Napíš ce Äím zmníš text od pozície + kurzora do konca slova, c$ zmení text do konca riadku. + + 4. Formát pre nahradenie je: + + c [Äíslo] pohyb + + +Teraz prejdi na nalsedujúcu lekciu. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 4.1: POZÃCIA A STATUS SÚBORU + + + ** StlaÄ CTRL-g pre zobrazenie svojej pozície v súbore a statusu súboru. + Napíš G pre presun na riadok v súbore. ** + + Poznámka: PreÄítaj si celú túto lekciu skôr ako zaÄneÅ¡ vykonávaÅ¥ kroky!! + + 1. Drž stlaÄenú klávesu Ctrl a stlaÄ g . Toto nazývame CTRL-G. + Na spodu obrazovky sa zobrazí správa s názvom súboru a pozíciou + v súbore. Zapamätajsi si Äíslo riadku pre použitie v kroku 3. + + 2. StlaÄ G Äím sa dostaneÅ¡ na spodok súboru. + Napíš gg Äím sa dostaneÅ¡ na zaÄiatok súboru. + + 3. Napíš Äíslo riadku na ktorom si sa nachádzal a stlaÄ G. To Å¥a + vráti na riadok, na ktorom si prvý krát stlaÄil CTRL-G. + + 4. Ak sa cítíš schopný vykonaÅ¥ teto kroky, vykonaj kroky 1 až 3. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 4.2: PRÃKAZ VYHĽADÃVANIA + + + ** Napíš / nasledované reÅ¥azcom pre vyhľadanie prísluÅ¡ného reÅ¥azca. ** + + 1. Napíš znak / v normálnom móde. Poznámka, že tento znak sa spolu + s kurzorom zobrazí v dolnej Äasti obrazovky s : príkazom. + + 2. Teraz napíš 'errroor' . To je slovo, ktoré chceÅ¡ vyhľadaÅ¥. + + 3. Pre vyhľadanie ÄalÅ¡ieho výskytu rovnakého reÅ¥azca, stlaÄ jednoducho n. + Pre vyhľadanie ÄalÅ¡ieho výskytu rovnakého reÅ¥azca opaÄným smerom, + N. + + 4. Ak chceÅ¡ vyhľadaÅ¥ reÅ¥azec v spätnom smere, použí príkaz ? miesto + príkazu /. + + 5. Pre návrat na miesto z ktorého si priÅ¡iel stlaÄ CTRL-O (drž stlaÄenú + klávesu Ctrl poÄas stlaÄenia klávesy o). Zopakuj pre Äalší návrat + späť. CTRL-I ide vpred. + +POZNÃMKA: "errroor" nieje spôsob hláskovania error; errroor je error. +POZNÃMKA: KeÄ vyhľadávanie dosiahne koniec tohto súboru, bude pokraÄovaÅ¥ na + zaÄiatku, dokiaľ nieje resetované nastavenie 'wrapscan' . + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 4.3: VYHĽADÃVANIE ZODPOVEDAJÚCICH ZÃTAVORIEK + + + ** Napíš % pre vyhľadanie prísluÅ¡ného znaku ),], alebo } . ** + + 1. Premiestni kurzor na hocaký zo znakov (, [, alebo { v riadku nižšie + oznaÄeného znaÄkou --->. + + 2. Teraz napíš znak % . + + 3. Kurzor sa premiestni na zodpovedajúcu zátvorku. + + 4. Napíš % pre presun kurzoru späť na otvárajúcu zátvorku. + + 5. Presuň kurzor na iný zo znakov (,),[,],{ alebo } a vÅ¡imni si + Äo % vykonáva. + +---> Toto ( je testovací riadok s ('s, ['s ] a {'s } v riadku. )) + +Poznámka: Toto je veľmi výhodné použíť pri ladení programu s chýbajúcimi + uzatvárajúcimi zátvorkami! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 4.4: PRÃKAZ NAHRADENIA + + + ** Napíš :s/starý/nový/g pre nahradenie slova 'starý' za slovo 'nový'. ** + + 1. Presuň kurzor nižšie na riadok oznaÄený znaÄkou --->. + + 2. Napíš :s/thee/the . Poznamka, že tento príkaz zmení len prvý + výskyt "thee" v riadku. + + 3. Teraz napíš :s/thee/the/g Äo znamená celkové nahradenie v riadku. + Toto nahradí vÅ¡etky výskyty v riadku. + +---> Thee best time to see thee flowers in thee spring. + + 4. Pre zmenu vÅ¡etkých výskytov daného reÅ¥azca medzi dvomi ridakami, + napíš :#,#s/starý/nový/g kde #,# sú Äísla dvoch riadkov, v rozsahu + ktorých sa nahradenie vykoná. + napíš :%s/starý/nový/g pre zmenu vÅ¡etkých výskytov v celom riadku + napíš :%s/starý/nový/gc nájde vÅ¡etky výskyty v celom súbore, + s otázkou Äi nahradiÅ¥ alebo nie + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 4 ZHRNUTIE + + + 1. CTRL-g vypíše tvoju pozíciu v súbore a status súboru. + G Å¥a premiestni na koniec riadku. + Äíslo G Å¥a premiestni na riadok s Äíslom. + gg Å¥a presunie na prvý riadok + + 2. Napísanie / nasledované reÅ¥azcom vyhľadá reÅ¥azec smerom DOPREDU. + Napísanie ? nasledované reÅ¥azcom vyhľada reÅ¥azec smerom DOZADU. + Napísanie n po vyhľadávaní, vyhľadá nasledujúci výskyt reÅ¥azca + v rovnakom smere, priÄom N vyhľadá v opaÄnom smere. + CTRL-O Å¥a vráti späť na starÅ¡iu pozíciu, CTRL-I na novÅ¡iu pozíciu. + + 3. Napísanie % keÄ kurzor je na (,),[,],{, alebo } nájde zodpovdajúcu + párnu zátvorku. + + 4. Pre nahradenie nového za prvý starý v riadku napíš :s/starý/nový + Pre nahradenie nového za vÅ¡etky staré v riadku napíš :s/starý/nový/g + Pre nahradenie reÅ¥azcov medzi dvoma riadkami 3 napíš :#,#/starý/nový/g + Pre nahradenie vÅ¡etkých výskytov v súbore napíš :%s/starý/nový/g + Pre potvrdenie každého nahradenia pridaj 'c' :%s/starý/nový/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 5.1 AKO SPUSTIŤ VONKAJÅ Ã PRÃKAZ + + + ** Napíš príkaz :! nasledovaný vonkajším príkazom pre spustenie príkazu ** + + 1. Napíš obvyklý píkaz : ktorý nastaví kurzor na spodok obrazovky. + To umožní napísaÅ¥ príkaz. + + 2. Teraz napíš ! (výkriÄník). To umožní spustiÅ¥ hociaký vonkajší príkaz + z príkazového riadku. + + 3. Ako príklad napíš ls za ! a stlaÄ . Tento príkaz + zobrazí obsah tvojho adresára rovnako ako na príkazovom riadku. + Alebo použi :!dir ak ls nefunguje. + +Poznámka: Takto je možné spustiÅ¥ hociaký vonkajší príkaz s argumentami. +Poznámka: VÅ¡etky príkazy : musia byÅ¥ dokonÄené stlaÄením + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 5.2: VIAC O UKLADANà SÚBOROV + + + ** Pre uloženie zmien v súbore, napíš :w FILENAME. ** + + 1. Napíš :!dir alebo :!ls pre výpis aktuálneho adresára. + Už vieÅ¡, že musíš za týmto stlaÄiÅ¥ . + + 2. Vyber názov súboru, ktorý eÅ¡te neexistuje, ako napr. TEST. + + 3. Teraz napíš: :w TEST (kde TEST je názov vybratého súboru.) + + 4. To uloží celý súbor (Vim Tutor) pod názovm TEST. + Pre overenie napíš :!dir , Äím zobrazíš obsah adresára. + +Poznámka: že ak ukonÄíš prácu s editorom Vim a znovu ho spustíš príkazom + vim TEST, súbor bude kópia výuky, keÄ si ho uložil. + + 5. Teraz odstráň súbor napísaním (MS-DOS): :!del TEST + alebo (Unix): :!rm TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 5.3 VÃBER TEXTU PRE ULOŽENIE + + + ** Pre uloženie Äasti súboru, napíš v pohyb :w FILENAME ** + + 1. Presuň kurozr na tento riadok. + + 2. StlaÄ v a presuň kurozr na piatu položku dole. Poznámka, že + tento text je vyznaÄený (highlighted). + + 3. StlaÄ klávesu : . V spodnej Äasti okna sa objaví :'<,'>. + + 4. Napíš w TEST , kde TEST je meno súboru, ktorý zatial neexistuje. + Skontroluj, e vidíš :'<,'>w TEST predtým než stlaÄíš Enter. + + 5. Vim zapíše oznaÄené riadky do súboru TEST. Použi :!dir alebo !ls + pre overenie. Zatial ho eÅ¡te nemaž! Použijeme ho v ÄalÅ¡ej lekcii. + +POZNÃMKA: StlaÄením klávesy v sa spustí vizuálne oznaÄovanie. + MôžeÅ¡ pohybovaÅ¥ kurzorom pre upresnenie vyznaÄeného textu. + Potom môžeÅ¡ použiÅ¥ operátor pre vykonanie nejakej akcie + s textom. Napríklad d zmaže vyznaÄený text. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 5.4: VÃBER A ZLUÄŒOVANIE SÚBOROV + + + ** Pre vloženie obsahu súboru, napíš :r FILENAME ** + + 1. Premiestni kurzor nad tento riadok. + +POZNÃMKA: Po vykonaní kroku 2 uvidíš text z lekcie 5.3. Potom sa presuň + dole, aby si videl túto lekciu. + + 3. Teraz vlož súbor TEST použitím príkazu :r TEST kde TEST je názov + súboru. Súbor, ktorý si použil je umiestnený pod riadkom s kurzorom. + +POZNÃMKA: MôžeÅ¡ tiež naÄítaÅ¥ výstup vonkajÅ¡ieho príkazu. Napríklad :r !ls + naÄíta výstup príkazu ls a umiestni ho za pozíciu kurzora. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 5 ZHRNUTIE + + + 1. :!príkaz spustí vonkajší príkaz. + + Niektoré využiteľné príklady sú: + (MS_DOS) (UNIX) + :!dir :!ls - zobrazí obsah adresára + :!del FILENAME :!rm FILENAME - odstráni súbor FILENAME + + 2. :w FILENAME uloží aktuálny súbor na disk pod menom FILENAME. + + 3. v pohyb :w FILENAME uloží vizuálne oznaÄené riadky do + súboru FILENAME. + + 4. :r FILENAME vyberie z disku súbor FILENAME a vloží ho do aktuálneho + súboru za pozíciou kurzora. + + 5. :r !dir naÄíta výstup z príkazu dir a vloží ho za pozíciu kurzora. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 6.1: PRÃKAZ OTVORIŤ + + +** Napíš o pre vloženie riadku pod kurzor a prepnutie do vkladacieho módu ** + + 1. Presuň kurzor nižšie na riadok oznaÄený znaÄkou --->. + + 2. Napíš o (malé písmeno) pre vloženie Äistého riadku pod kurzorm + a prepnutie do vkladacieho módu. + + 3. Teraz skopíruj riadok oznaÄený ---> a stlaÄ pre ukonÄenie + vkladacieho módu. + +---> Po napísaní o sa kurzor premiestní na vložený riadok do vkladacieho + módu. + + 4. Pre otvorenie riadku nad kurzorom, jednotucho napíš veľké O , + namiesto malého o. Vyskúšaj si to na riadku dole. + +---> Vlož riadok nad týmto napísaním O, keÄ kurzor je na tomto riadku. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 6.2: PRÃKAZ PRIDAŤ + + + ** Napíš a pre vloženie textu ZA kurzor. ** + + 1. Presuň kurzor nižšie na koniec prvého riadku oznaÄeného znaÄkou ---> + + 2. StlaÄ klávesu e dokiaľ kurozr nieje na konci riadku. + + 3. Napíš a (malé písmeno) pre pridanie textu ZA kurzorom. + + 4. DokonÄí slovo tak ako je to v druhom riadku. StlaÅ¡ pre + opustenie vkladacieho módu. + + 5. Použi e na presun na ÄalÅ¡ie nedokonÄené slovo a zopakuj kroky 3 a 4. + +---> Tento ri ti dovoľuje nácv priávan testu na koniec riadku. +---> Tento riadok ti dovoľuje nácvik pridávania textu na koniec riadku. + +POZNÃMKA: a, i, A Å¡tartujú rovnaký vkladací mód, jediný rozidel je, kde + sa znaky vkladajú. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 6.3: INà SPOSOB NAHRADZOVANIA + + + ** Napíš veľké R pre nahradenie viac ako jedného znaku. ** + + 1. Presuň kurzor nižšie na prvý riadok oznaÄený znaÄkou --->. Premiestni + kurzor na zaÄiatok prvého výskytu xxx. + + 2. Teraz napíš R a napíš Äíslo uvedené v druhom riadku, takže + sa ním nahradí pôvodné xxx. + + 3. StlaÄ pre opustenie nahradzovacieho módu. Poznámka, že zvyÅ¡ok + riadku zostane nezmenený. + + 4. Zopakuj tieto kroky pre nahradenie zvyÅ¡ných xxx. + +---> Pridaním 123 ku xxx dostaneÅ¡ xxx. +---> Pridaním 123 ku 456 dostaneÅ¡ 579. + +POZNÃMKA: Nahradzovací mód je ako vkladací mód, ale každý napísaný znak + zmaže existujúci znak. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lekcia 6.4: Copy Paste textu + + ** použí operátor y pre copy textku a p pre jeho paste ** + + 1. ChoÄ nižšie na riadok oznaÄený ---> a umiestni kurozr za "a)". + + 2. NaÅ¡tartuj vizuálny mód použitím v a presuň kurozr pred "first". + + 3. Napíš y pre vystrihnutie (copy) oznaÄeného textu. + + 4. Presuň kurozr na koniec ÄalÅ¡ieho riadku: j$ + + 5. Napíš p pre vložnie (paste) textu. Potom napíš: a druha . + + 6. Použi vizuálny mód pre oznaÄenie "položka.", vystrihni to + použitím y, presuň sa na koniec nasledujúceho riadku použitím j$ + a vlož sem text použitím p. + +---> a) toto je prvá položka +---> b) + +POZNÃMKA: MôžeÅ¡ použiÅ¥ tiež y ako operátor; yw vystrihne jedno slovo. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lekcia 6.5: NASTAVENIE MOŽNOSTà + + +** Nastav možnosti, takže vyhľadávanie alebo nahradzovanie ignoruje + rozliÅ¡ovanie ** + + + 1. Vyhľadaj reÅ¥azec 'ignore' napísaním: + /ignore + Zopakuj vyhľadávanie niekoľko krát stlaÄením klávesy n . + + 2. Nastav možnosÅ¥ 'ic' (Ignore case) napísaním príkazu: + :set ic + + 3. Teraz vyhľadaj reÅ¥azec 'ingore' znova stlaÄením klávesy n + Poznámka, že teraz sú vyhľadané aj Ignore a IGNORE. + + 4. Nastav možnosÅ¥i 'hlsearch' a 'incsearch': + :set hls is + + 5. Teraz spusti vyhľadávací príkaz znovu, a pozri Äo sa stalo: + /ignore + + 6. Pre opetovné zapnutie rozlyÅ¡ovania veľkých a malých písmen + napíš: :set noic + +POZNÃMKA: Na odstránenie zvýraznenia výrazov napíš: :nohlsearch +POZNÃMKA: Ak chceÅ¡ nerozlyÅ¡ovaÅ¥ veľkosÅ¥ písmen len pre jedno + použitie vyhľadávacieho príkazu, použi \c: /ignore\c + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 6 ZHRNUTIE + + + 1. Napíš o pre otvorenie riadku pod kurzorom a Å¡tart vkladacieho módu. + 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íkaz e presunie kurozr na koniec slova + + 4. Operátor y vystrihne (skopíruje) text, p ho vloží. + + 5. Napísanie veľkého R prepne do nahradzovacieho módu, kým nieje + stlaÄené . + + 6. Napísanie ":set xxx" nastaví možnosÅ¥ "xxx". Niektoré nastavenia sú: + 'ic' 'ignorecase' ignoruje veľké a malé písmená poÄas vyhľadávania. + 'is' 'incsearch' zobrazuje ÄiastoÄné reÅ¥azce vyhľadávaného reÅ¥azca. + 'hls' 'hlsearch' vyznaÄí vÅ¡etky vyhľadávané reÅ¥azce. + MôžeÅ¡ použiÅ¥ hociktorý z dlhých a krátkych názvov možností. + + 7. Vlož "no" pred nastavenie pre jeho vypnutie: :set noic + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 7.1: ZÃSKANIE NÃPOVEDY + + + ** Používaj on-line systém nápovedy ** + + Vim má obsiahly on-line systém nápovedy. Pre odÅ¡tartovanie, vyskúšaj jeden + z týchto troch: + - stlaÄ klávesu (ak nejakú máš) + - stlaÄ klávesu (ak nejakú máš) + - napíš :help + + Čítaj text v okne nápovedy pre získanie predstavy ako nápoveda funguje. + Napíš CTRL-W CTRL-W pre skok z jedného okna do druhého. + Napíš :q Äím zatvoríš okno nápovedy. + + MôžeÅ¡ nájsÅ¥ help ku hociakej téme pridaním argumentu ku príkazu ":help". + Vyskúšaj tieto (nezabudni stlaÄiÅ¥ ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKCIA 7.2: VYTVORENIE Å TARTOVACIEHO SKRIPTU + + ** Zapni funkcie editora Vim ** + + Vim má omnoho viac funkcii než Vi, ale veÄÅ¡ina z nich je implicitne + vypnutá. Pre používanie viac Vim funkcii vytvor "vimrc" súbor. + + 1. ZaÄni editovaÅ¥ "vimrc" súbor, to závisí na použitom systéme: + :e ~/.vimrc pre Unix + :e $VIM/_vimrc pre MS-Windows + + 2. Teraz si preÄítaj text príkladu "vimrc" súboru: + + :r $VIMRUNTIME/vimrc_example.vim + + 3. Ulož súbor: + :w + + Pri nasledujúcom Å¡tarte editora Vim sa použije zvýrazňovanie syntaxe. + Do "vimrc" súboru môžeÅ¡ pridaÅ¥ vÅ¡etky svoje uprednostňované nastavenia. + Pre viac informácii napíš :help vimrc-intro + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + LEKCIA 7.3 DOKONÄŒENIE + + ** DokonÄi príkaz na príkazovom riadku použitím CTRL-D a ** + + 1. Uisti sa, že Vim nieje v kompatibilnom móde: :set nocp + + 2. Pozri sa aké súbory sa nachádzajú v adresári: :!ls alebo :!dir + + 3. Napíš zaÄiatok príkazu: :e + + 4. StlaÄ CTRL-D a Vim zobrazí zoznam príkazov zaÄínajúcich "e". + + 5. StlaÄ a Vim dokonÄí meno príkazu na ":edit". + + 6. Teraz pridaj medzerník a zaÄiatok mena existujúceho súboru: + :edit FIL + + 7. StlaÄ . Vim dokonÄí meno (ak je jedineÄné). + +POZNÃMKA: DokonÄovanie funguje pre veľa príkazov. Vyskúšaj stlaÄenie + CTRL-D a . Å peciálne je to užitoÄné pre príkaz :help. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + LEKCIA 7 ZHRNUTIE + + 1. Napíš :help alebo stlaÄ alebo pre otvorenie okna nápovedy. + + 2. Napíš :help príkaz pre vyhľadanie nápovedy ku príkazu príkaz. + + 3. Napíš CTRL-W CTRL-W na preskoÄenie do iného okna. + + 4. Napíš :q pre zatvorenie okna nápovedy + + 5. Vytvor Å¡tartovací skript vimrc pre udržanie uprednostňovaných nastavení. + + 6. PoÄas písania príkazu : stlaÄ CTRL-D pre zobrazenie dokonÄení. + StlaÄ pre použitie jedného z dokonÄení. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + + Toto vymedzuje výuku Vimu. Toto je urÄené pre strucný prehľad o editore + Vim, úplne postaÄujúce pre ľahké a obstojné používanie tohto editora. + Táto výuka je Äaleko od kompletnosti, pretože Vim má omnoho viacej príkazov. + Ako ÄalÅ¡ie si preÄítaj užívatľský manuál: ":help user-manual". + + Pre ÄalÅ¡ie Äítanie a Å¡túdium je odporúÄaná kniha: + Vim - Vi Improved - od Steve Oualline + Vydavateľ: New Riders + Prvá kniha urÄená pre Vim. Å peciálne vhodná pre zaÄiatoÄníkov. + Obsahuje množstvo príkladov a obrázkov. + Pozri na http://iccf-holland.org/click5.html + + Táto kniha je starÅ¡ia a je viac o Vi ako o Vim, ale je tiež odporúÄaná: + Learning the Vi Editor - od Linda Lamb + Vydavateľ: O'Reilly & Associates Inc. + Je to dobrá kniha pre získanie vedomostí o práci s editorom Vi. + Å ieste vydanie obsahuje tiež informácie o editore Vim. + + Táto výuka bola napísaná autormi Michael C. Pierce a Robert K. Ware, + Colorado School of Mines s použitím myÅ¡lienok dodanými od Charles Smith, + Colorado State University. E-mail: bware@mines.colorado.edu. + + Modifikované pre Vim od Bram Moolenaar. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Preklad do SlovenÄiny: ĽuboÅ¡ ÄŒelko + e-mail: celbos@inmail.sk + Last Change: 2006 Apr 18 + encoding: iso8859-2 diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.sv b/vim/bundle/ubuntu-vim72/tutor/tutor.sv new file mode 100644 index 0000000..59f0f65 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.sv @@ -0,0 +1,830 @@ +=============================================================================== += V ä l k o m m e n t i l l h a n d l e d n i n g e n i V i m - Ver. 1.5 = +=============================================================================== + + Vim är en väldigt kraftfull redigerare som har många kommandon, alltför + många att förklara i en handledning som denna. Den här handledningen är + gjord för att förklara tillräckligt många kommandon så att du enkelt ska + kunna använda Vim som en redigerare för alla ändamål. + + Den beräknade tiden för att slutföra denna handledning är 25-30 minuter, + beroende på hur mycket tid som läggs ned på experimentering. + + Kommandona i lektionerna kommer att modifiera texten. Gör en kopia av den + här filen att öva på (om du startade "vimtutor är det här redan en kopia). + + Det är viktigt att komma ihåg att den här handledningen är konstruerad + att lära vid användning. Det betyder att du måste köra kommandona för att + lära dig dem ordentligt. Om du bara läser texten så kommer du att glömma + kommandona! + + Försäkra dig nu om att din Caps-Lock tangent INTE är aktiv och tryck på + j-tangenten tillräckligt många gånger för att förflytta markören så att + Lektion 1.1 fyller skärmen helt. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 1.1: FLYTTA MARKÖREN + + + ** För att flytta markören, tryck på tangenterna h,j,k,l som indikerat. ** + ^ + k Tips: + < h l > h-tangenten är till vänster och flyttar till vänster. + j l-tangenten är till höger och flyttar till höger. + v j-tangenten ser ut som en pil ned. + 1. Flytta runt markören på skärmen tills du känner dig bekväm. + + 2. Håll ned tangenten pil ned (j) tills att den repeterar. +---> Nu vet du hur du tar dig till nästa lektion. + + 3. Flytta till Lektion 1.2, med hjälp av ned tangenten. + +Notera: Om du är osäker på någonting du skrev, tryck för att placera dig + dig i Normal-läge. Skriv sedan om kommandot. + +Notera: Piltangenterna borde också fungera. Men om du använder hjkl så kommer + du att kunna flytta omkring mycket snabbare, när du väl vant dig vid + det. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 1.2: STARTA OCH AVSLUTA VIM + + + !! NOTERA: Innan du utför någon av punkterna nedan, läs hela lektionen!! + + 1. Tryck -tangenten (för att se till att du är i Normal-läge). + + 2. Skriv: :q! . + +---> Detta avslutar redigeraren UTAN att spara några ändringar du gjort. + Om du vill spara ändringarna och avsluta skriv: + :wq + + 3. När du ser skal-prompten, skriv kommandot som tog dig in i den här + handledningen. Det kan vara: vimtutor + Normalt vill du använda: vim tutor + +---> 'vim' betyder öppna redigeraren vim, 'tutor' är filen du vill redigera. + + 4. Om du har memorerat dessa steg och känner dig självsäker, kör då stegen + 1 till 3 för att avsluta och starta om redigeraren. Flytta sedan ned + markören till Lektion 1.3. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 1.3: TEXT REDIGERING - BORTTAGNING + + +** När du är i Normal-läge tryck x för att ta bort tecknet under markören. ** + + 1. Flytta markören till raden nedan med markeringen --->. + + 2. För att rätta felen, flytta markören tills den står på tecknet som ska + tas bort. fix the errors, move the cursor until it is on top of the + + 3. Tryck på x-tangenten för att ta bort det felaktiga tecknet. + + 4. Upprepa steg 2 till 4 tills meningen är korrekt. + +---> Kkon hoppadee övverr måånen. + + 5. Nu när raden är korrekt, gå till Lektion 1.4. + +NOTERA: När du går igenom den här handledningen, försök inte att memorera, lär + genom användning. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 1.4: TEXT REDIGERING - INFOGNING + + + ** När du är i Normal-läge tryck i för att infoga text. ** + + 1. Flytta markören till den första raden nedan med markeringen --->. + + 2. För att göra den första raden likadan som den andra, flytta markören till + det första tecknet EFTER där text ska infogas. + + 3. Tryck i och skriv in det som saknas. + + 4. När du rättat ett fel tryck för att återgå till Normal-läge. + Upprepa steg 2 till 4 för att rätta meningen. + +---> Det sakns här . +---> Det saknas lite text från den här raden. + + 5. När du känner dig bekväm med att infoga text, gå till sammanfattningen + nedan. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKTION 1 SAMMANFATTNING + + + 1. Markören flyttas genom att använda piltangenterna eller hjkl-tangenterna. + h (vänster) j (ned) k (upp) l (höger) + + 2. För att starta Vim (från %-prompten) skriv: vim FILNAMN + + 3. För att avsluta Vim skriv: :q! för att kasta ändringar. + ELLER skriv: :wq för att spara ändringar. + + 4. För att ta bort tecknet under markören i Normal-läge skriv: x + + 5. För att infoga text vid markören i Normal-läge skriv: + i skriv in text + +NOTERA: Genom att trycka kommer du att placeras i Normal-läge eller + avbryta ett delvis färdigskrivet kommando. + +Fortsätt nu med Lektion 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.1: BORTTAGNINGSKOMMANDON + + + ** Skriv dw för att radera till slutet av ett ord. ** + + 1. Tryck för att försäkra dig om att du är i Normal-läge. + + 2. Flytta markören till raden nedan markerad --->. + + 3. Flytta markören till början av ett ord som måste raderas. + + 4. Skriv dw för att radera ordet. + + NOTERA: Bokstäverna dw kommer att synas på den sista raden på skärmen när + du skriver dem. Om du skrev något fel, tryck och börja om. + +---> Det är ett några ord roliga att som inte hör hemma i den här meningen. + + 5. Upprepa stegen 3 och 4 tills meningen är korrekt och gå till Lektion 2.2. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.2: FLER BORTTAGNINGSKOMMANDON + + + ** Skriv d$ för att radera till slutet på raden. ** + + 1. Tryck för att försäkra dig om att du är i Normal-läge. + + 2. Flytta markören till raden nedan markerad --->. + + 3. Flytta markören till slutet på den rätta raden (EFTER den första . ). + + 4. Skriv d$ för att radera till slutet på raden. + +---> Någon skrev slutet på den här raden två gånger. den här raden två gånger. + + + 5. Gå vidare till Lektion 2.3 för att förstå vad det är som händer. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.3: KOMMANDON OCH OBJEKT + + + Syntaxen för d raderingskommandot är följande: + + [nummer] d objekt ELLER d [nummer] objekt + Var: + nummer - är antalet upprepningar av kommandot (valfritt, standard=1). + d - är kommandot för att radera. + objekt - är vad kommandot kommer att operera på (listade nedan). + + En kort lista över objekt: + w - från markören till slutet av ordet, inklusive blanksteget. + e - från markören till slutet av ordet, EJ inklusive blanksteget. + $ - från markören till slutet på raden. + +NOTERA: För den äventyrslystne, genom att bara trycka på objektet i + Normal-läge (utan kommando) så kommer markören att flyttas som + angivet i objektlistan. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.4: ETT UNDANTAG TILL 'KOMMANDO-OBJEKT' + + + ** Skriv dd för att radera hela raden. ** + + På grund av hur vanligt det är att ta bort hela rader, valde upphovsmannen + till Vi att det skulle vara enklare att bara trycka d två gånger i rad för + att ta bort en rad. + + 1. Flytta markören till den andra raden i frasen nedan. + 2. Skriv dd för att radera raden. + 3. Flytta nu till den fjärde raden. + 4. Skriv 2dd (kom ihåg: nummer-kommando-objekt) för att radera de två + raderna. + + 1) Roses are red, + 2) Mud is fun, + 3) Violets are blue, + 4) I have a car, + 5) Clocks tell time, + 6) Sugar is sweet + 7) And so are you. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.5: ÅNGRA-KOMMANDOT + + +** Skriv u för att ångra det senaste kommandona, U för att fixa en hel rad. ** + + 1. Flytta markören till slutet av raden nedan markerad ---> och placera den + på det första felet. + 2. Skriv x för att radera den första felaktiga tecknet. + 3. Skriv nu u för att ångra det senaste körda kommandot. + 4. Rätta den här gången alla felen på raden med x-kommandot. + 5. Skriv nu U för att återställa raden till dess ursprungliga utseende. + 6. Skriv nu u några gånger för att ångra U och tidigare kommandon. + 7. Tryck nu CTRL-R (håll inne CTRL samtidigt som du trycker R) några gånger + för att upprepa kommandona (ångra ångringarna). + +---> Fiixa felen ppå deen häär meningen och återskapa dem med ångra. + + 8. Det här är väldigt användbara kommandon. Gå nu vidare till + Lektion 2 Sammanfattning. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKTION 2 SAMMANFATTNING + + + 1. För att radera från markören till slutet av ett ord skriv: dw + + 2. För att radera från markören till slutet av en rad skriv: d$ + + 3. För att radera en hel rad skriv: dd + + 4. Syntaxen för ett kommando i Normal-läge är: + + [nummer] kommando objekt ELLER kommando [nummer] objekt + där: + nummer - är hur många gånger kommandot kommandot ska repeteras + kommando - är vad som ska göras, t.ex. d för att radera + objekt - är vad kommandot ska operera på, som t.ex. w (ord), + $ (till slutet av raden), etc. + + 5. För att ångra tidigare kommandon, skriv: u (litet u) + För att ångra alla tidigare ändringar på en rad skriv: U (stort U) + För att ångra ångringar tryck: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 3.1: KLISTRA IN-KOMMANDOT + + + ** Skriv p för att klistra in den senaste raderingen efter markören. ** + + 1. Flytta markören till den första raden i listan nedan. + + 2. Skriv dd för att radera raden och lagra den i Vims buffert. + + 3. Flytta markören till raden OVANFÖR där den raderade raden borde vara. + + 4. När du är i Normal-läge, skriv p för att byta ut raden. + + 5. Repetera stegen 2 till 4 för att klistra in alla rader i rätt ordning. + + d) Kan du lära dig också? + b) Violetter är blå, + c) Intelligens fås genom lärdom, + a) Rosor är röda, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 3.2: ERSÄTT-KOMMANDOT + + + ** Skriv r och ett tecken för att ersätta tecknet under markören. ** + + 1. Flytta markören till den första raden nedan markerad --->. + + 2. Flytta markören så att den står på det första felet. + + 3. Skriv r och sedan det tecken som borde ersätta felet. + + 4. Repetera steg 2 och 3 tills den första raden är korrekt. + +---> När drn här ruden skrevs, trickte någon på fil knappar! +---> När den här raden skrevs, tryckte någon på fel knappar! + + 5. Gå nu vidare till Lektion 3.2. + +NOTERA: Kom ihåg att du skall lära dig genom användning, inte genom memorering. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 3.3: ÄNDRA-KOMMANDOT + + + ** För att ändra en del eller ett helt ord, skriv cw . ** + + 1. Flytta markören till den första redan nedan markerad --->. + + 2. Placera markören på d i rdrtn. + + 3. Skriv cw och det rätta ordet (i det här fallet, skriv "aden".) + + 4. Tryck och flytta markören till nästa fel (det första tecknet som + ska ändras.) + + 5. Repetera steg 3 och 4 tills den första raden är likadan som den andra. + +---> Den här rdrtn har några otf som brhotrt ändras mrf ändra-komjendit. +---> Den här raden har några ord som behöver ändras med ändra-kommandot. + +Notera att cw inte bara ändrar ordet, utan även placerar dig i infogningsläge. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 3.4: FLER ÄNDRINGAR MED c + + + ** Ändra-kommandot används på samma objekt som radera. ** + + 1. Ändra-kommandot fungerar på samma sätt som radera. Syntaxen är: + + [nummer] c objekt ELLER c [nummer] objekt + + 2. Objekten är också de samma, som t.ex. w (ord), $ (slutet av raden), etc. + + 3. Flytta till den första raden nedan markerad -->. + + 4. Flytta markören till det första felet. + + 5. Skriv c$ för att göra resten av raden likadan som den andra och tryck + . + +---> Slutet på den här raden behöver hjälp med att få den att likna den andra. +---> Slutet på den här raden behöver rättas till med c$-kommandot. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKTION 3 SAMMANFATTNING + + + 1. För att ersätta text som redan har blivit raderad, skriv p . + Detta klistrar in den raderade texten EFTER markören (om en rad raderades + kommer den att hamna på raden under markören. + + 2. För att ersätta tecknet under markören, skriv r och sedan tecknet som + kommer att ersätta orginalet. + + 3. Ändra-kommandot låter dig ändra det angivna objektet från markören till + slutet på objektet. eg. Skriv cw för att ändra från markören till slutet + på ordet, c$ för att ändra till slutet på en rad. + + 4. Syntaxen för ändra-kommandot är: + + [nummer] c objekt ELLER c [nummer] objekt + +Gå nu till nästa lektion. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 4.1: POSITION OCH FILSTATUS + + + ** Tryck CTRL-g för att visa din position i filen och filstatusen. + Tryck SHIFT-G för att flytta till en rad i filen. ** + + Notera: Läsa hela den lektion innan du utför något av stegen!! + + 1. Håll ned Ctrl-tangenten och tryck g . En statusrad med filnamn och raden + du befinner dig på kommer att synas. Kom ihåg radnummret till Steg 3. + + 2. Tryck shift-G för att flytta markören till slutet på filen. + + 3. Skriv in nummret på raden du var på och tryck sedan shift-G. Detta kommer + att ta dig tillbaka till raden du var på när du först tryckte Ctrl-g. + (När du skriver in nummren, kommer de INTE att visas på skärmen.) + + 4. Om du känner dig säker på det här, utför steg 1 till 3. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 4.2: SÖK-KOMMANDOT + + + ** Skriv / följt av en fras för att söka efter frasen. ** + + 1. I Normal-läge skriv /-tecknet. Notera att det och markören blir synlig + längst ned på skärmen precis som med :-kommandot. + + 2. Skriv nu "feeel" . Det här är ordet du vill söka efter. + + 3. För att söka efter samma fras igen, tryck helt enkelt n . + För att söka efter samma fras igen i motsatt riktning, tryck Shift-N . + + 4. Om du vill söka efter en fras bakåt i filen, använd kommandot ? istället + för /. + +---> "feeel" är inte rätt sätt att stava fel: feeel är ett fel. + +Notera: När sökningen når slutet på filen kommer den att fortsätta vid början. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 4.3: SÖKNING EFTER MATCHANDE PARENTESER + + + ** Skriv % för att hitta en matchande ),], or } . ** + + 1. Placera markören på någon av (, [, or { på raden nedan markerad --->. + + 2. Skriv nu %-tecknet. + + 3. Markören borde vara på den matchande parentesen eller hakparentesen. + + 4. Skriv % för att flytta markören tillbaka till den första hakparentesen + (med matchning). + +---> Det ( här är en testrad med (, [ ] och { } i den. )) + +Notera: Det här är väldigt användbart vid avlusning av ett program med icke + matchande parenteser! + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 4.4: ETT SÄTT ATT ÄNDRA FEL + + + ** Skriv :s/gammalt/nytt/g för att ersätta "gammalt" med "nytt". ** + + 1. Flytta markören till raden nedan markerad --->. + + 2. Skriv :s/denn/den . Notera att det här kommandot bara ändrar den + första förekomsten på raden. + + 3. Skriv nu :s/denn/den/g vilket betyder ersätt globalt på raden. + Det ändrar alla förekomster på raden. + +---> denn bästa tiden att se blommor blomma är denn på våren. + + 4. För att ändra alla förekomster av en teckensträng mellan två rader, + skriv :#,#s/gammalt/nytt/g där #,# är de två radernas radnummer. + Skriv :%s/gammtl/nytt/g för att ändra varje förekomst i hela filen. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKTION 4 SAMMANFATTNING + + + 1. Ctrl-g visar din position i filen och filstatusen. + Shift-G flyttar till slutet av filen. Ett radnummer följt Shift-G + flyttar till det radnummret. + + 2. Skriver man / följt av en fras söks det FRAMMÅT efter frasen. + Skriver man ? följt av en fras söks det BAKÅT efter frasen. + Efter en sökning skriv n för att hitta nästa förekomst i samma riktning + eller Shift-N för att söka i den motsatta riktningen. + + 3. Skriver man % när markören är på ett (,),[,],{, eller } hittas dess + matchande par. + + 4. För att ersätta den första gammalt med nytt på en rad skriv :s/gammlt/nytt + För att ersätta alla gammlt med nytt på en rad skriv :s/gammlt/nytt/g + För att ersätta fraser mellan rad # och rad # skriv :#,#s/gammlt/nytt/g + För att ersätta alla förekomster i filen skriv :%s/gammlt/nytt/g + För att bekräfta varje gång lägg till "c" :%s/gammlt/nytt/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 5.1: HUR MAN KÖR ETT EXTERNT KOMMANDO + + + ** Skriv :! följt av ett externt kommando för att köra det kommandot. ** + + 1. Skriv det välbekanta kommandot : för att placera markören längst ned + på skärmen på skärmen. Detta låter dig skriva in ett kommando. + + 2. Skriv nu ! (utropstecken). Detta låter dig köra ett godtyckligt externt + skalkommando. + + 3. Som ett exempel skriv ls efter ! och tryck sedan . Detta kommer + att visa dig en listning av din katalog, precis som om du kört det vid + skalprompten. Använd :!dir om ls inte fungerar. + +Notera: Det är möjligt att köra vilket externt kommando som helst på det här + sättet. + +Notera: Alla :-kommandon måste avslutas med att trycka på + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 5.2: MER OM ATT SPARA FILER + + + ** För att spara ändringar gjorda i en fil, skriv :w FILNAMN. ** + + 1. Skriv :!dir eller :!ls för att få en listning av din katalog. + Du vet redan att du måste trycka efter det här. + + 2. Välj ett filnamn som inte redan existerar, som t.ex. TEST. + + 3. Skriv nu: :w TEST (där TEST är filnamnet du valt.) + + 4. Det här sparar hela filen (Vim handledningen) under namnet TEST. + För att verifiera detta, skriv :!dir igen för att se din katalog + +Notera: Om du skulle avsluta Vim och sedan öppna igen med filnamnet TEST så + skulle filen vara en exakt kopia av handledningen när du sparade den. + + 5. Ta nu bort filen genom att skriva (MS-DOS): :!del TEST + eller (Unix): :!rm TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 5.3: ETT SELEKTIVT SPARA-KOMMANDO + + + ** För att spara en del av en fil, skriv :#,# w FILNAMN ** + + 1. Ännu en gång, skriv :!dir eller :!ls för att få en listning av din + katalog och välj ett passande filnamn som t.ex. TEST. + + 2. Flytta markören högst upp på den här sidan och tryck Ctrl-g för att få + reda på radnumret på den raden. KOM IHÅG DET NUMMRET! + + 3. Flytta nu längst ned på sidan och skriv Ctrl-g igen. + KOM IHÅG DET RADNUMMRET OCKSÅ! + + 4. För att BARA spara en sektion till en fil, skriv :#,# w TEST + där #,# är de två nummren du kom ihåg (toppen, botten) och TEST är + ditt filnamn. + + 5. Ännu en gång, kolla så att filen är där med :!dir men radera den INTE. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 5.4: TA EMOT OCH FÖRENA FILER + + + ** För att infoga innehållet av en fil, skriv :r FILNAMN ** + + 1. Skriv :!dir för att försäkra dig om att TEST-filen från tidigare + fortfarande är kvar. + + 2. Placera markören högst upp på den här sidan. + +NOTERA: Efter att du kört Steg 3 kommer du att se Lektion 5.3. + Flytta då NED till den här lektionen igen. + + 3. Ta nu emot din TEST-fil med kommandot :r TEST där TEST är namnet på + filen. + +NOTERA: Filen du tar emot placeras där markören är placerad. + + 4. För att verifiera att filen togs emot, gå tillbaka och notera att det nu + finns två kopior av Lektion 5.3, orginalet och filversionen. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKTION 5 SAMMANFATTNING + + + 1. :!kommando kör ett externt kommando. + + Några användbara exempel är: + (MS-DOS) (Unix) + :!dir :!ls - visar en kataloglistning. + :!del FILNAMN :!rm FILNAMN - tar bort filen FILNAMN. + + 2. :w FILNAMN sparar den aktuella Vim-filen med namnet FILNAMN. + + 3. :#,#w FILNAMN sparar raderna # till # i filen FILNAMN. + + 4. :r FILNAMN tar emot filen FILNAMN och infogar den i den aktuella filen + efter markören. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 6.1: ÖPPNA-KOMMANDOT + + + ** Skriv o för att öppna en rad under markören och placera dig i + Infoga-läge. ** + + 1. Flytta markören till raden nedan markerad --->. + + 2. Skriv o (litet o) för att öppna upp en rad NEDANFÖR markören och placera + dig i Infoga-mode. + + 3. Kopiera nu raden markerad ---> och tryck för att avsluta + Infoga-läget. + +---> Efter du skrivit o placerad markören på en öppen rad i Infoga-läge. + + 4. För att öppna upp en rad OVANFÖR markören, skriv ett stort O , istället + för ett litet o. Pröva detta på raden nedan. +Öppna upp en rad ovanför denna genom att trycka Shift-O när markören står här. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 6.2: LÄGG TILL-KOMMANDOT + + + ** Skriv a för att infoga text EFTER markören. ** + + 1. Flytta markören till slutet av den första raden nedan markerad ---> genom + att skriv $ i Normal-läge. + + 2. Skriv ett a (litet a) för att lägga till text EFTER tecknet under + markören. (Stort A lägger till i slutet av raden.) + +Notera: Detta undviker att behöva skriva i , det sista tecknet, texten att + infoga, , högerpil, och slutligen, x, bara för att lägga till i + slutet på en rad! + + 3. Gör nu färdigt den första raden. Notera också att lägga till är likadant + som Infoga-läge, enda skillnaden är positionen där texten blir infogad. + +---> Här kan du träna +---> Här kan du träna på att lägga till text i slutet på en rad. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 6.3: EN ANNAN VERSION AV ERSÄTT + + + ** Skriv ett stort R för att ersätta fler än ett tecken. ** + + 1. Flytta markören till den första raden nedan markerad --->. + + 2. Placera markören vid början av det första ordet som är annorlunda jämfört + med den andra raden markerad ---> (ordet "sista"). + + 3. Skriv nu R och ersätt resten av texten på den första raden genom att + skriva över den gamla texten så att den första raden blir likadan som + den andra. + +---> För att få den första raden lika som den sista, använd tangenterna. +---> För att få den första raden lika som den andra, skriv R och den nya texten. + + 4. Notera att när du trycker för att avsluta, så blir eventuell + oförändrad text kvar. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 6.4: SÄTT FLAGGOR + + ** Sätt en flagga så att en sökning eller ersättning ignorerar storlek ** + + 1. Sök efter "ignore" genom att skriva: + /ignore + Repetera flera gånger genom att trycka på n-tangenten + + 2. Sätt 'ic' (Ignore Case) flaggan genom att skriva: + :set ic + + 3. Sök nu efter "ignore" igen genom att trycka: n + Repeat search several more times by hitting the n key + + 4. Sätt 'hlsearch' and 'incsearch' flaggorna: + :set hls is + + 5. Skriv nu in sök-kommandot igen, och se vad som händer: + /ignore + + 6. För att ta bort framhävningen av träffar, skriv + :nohlsearch +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKTION 6 SAMMANFATTNING + + + 1. Genom att skriva o öpnnas en rad NEDANFÖR markören och markören placeras + på den öppna raden i Infoga-läge. + Genom att skriva ett stort O öppnas raden OVANFÖR raden som markören är + på. + + 2. Skriv ett a för att infoga text EFTER tecknet som markören står på. + Genom att skriva ett stort A läggs text automatiskt till i slutet på + raden. + + 3. Genom att skriva ett stort R hamnar du i Ersätt-läge till trycks + för att avsluta. + + 4. Genom att skriva ":set xxx" sätts flaggan "xxx" + + + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKTION 7: ON-LINE HJÄLP-KOMMANDON + + + ** Använd on-line hjälpsystemet ** + + Vim har ett omfattande on-line hjälpsystem. För att komma igång pröva ett av + dessa tre: + - tryck tangenten (om du har någon) + - tryck tangenten (om du har någon) + - skriv :help + + Skriv :q för att stränga hjälpfönstret. + + Du kan hitta hjälp om nästan allting, genom att ge ett argument till + ":help" kommandot. Pröva dessa (glöm inte att trycka ): + + :help w + :help c_ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.sv.utf-8 b/vim/bundle/ubuntu-vim72/tutor/tutor.sv.utf-8 new file mode 100644 index 0000000..967fc82 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.sv.utf-8 @@ -0,0 +1,830 @@ +=============================================================================== += V ä l k o m m e n t i l l h a n d l e d n i n g e n i V i m - Ver. 1.5 = +=============================================================================== + + Vim är en väldigt kraftfull redigerare som har mÃ¥nga kommandon, alltför + mÃ¥nga att förklara i en handledning som denna. Den här handledningen är + gjord för att förklara tillräckligt mÃ¥nga kommandon sÃ¥ att du enkelt ska + kunna använda Vim som en redigerare för alla ändamÃ¥l. + + Den beräknade tiden för att slutföra denna handledning är 25-30 minuter, + beroende pÃ¥ hur mycket tid som läggs ned pÃ¥ experimentering. + + Kommandona i lektionerna kommer att modifiera texten. Gör en kopia av den + här filen att öva pÃ¥ (om du startade "vimtutor är det här redan en kopia). + + Det är viktigt att komma ihÃ¥g att den här handledningen är konstruerad + att lära vid användning. Det betyder att du mÃ¥ste köra kommandona för att + lära dig dem ordentligt. Om du bara läser texten sÃ¥ kommer du att glömma + kommandona! + + Försäkra dig nu om att din Caps-Lock tangent INTE är aktiv och tryck pÃ¥ + j-tangenten tillräckligt mÃ¥nga gÃ¥nger för att förflytta markören sÃ¥ att + Lektion 1.1 fyller skärmen helt. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 1.1: FLYTTA MARKÖREN + + + ** För att flytta markören, tryck pÃ¥ tangenterna h,j,k,l som indikerat. ** + ^ + k Tips: + < h l > h-tangenten är till vänster och flyttar till vänster. + j l-tangenten är till höger och flyttar till höger. + v j-tangenten ser ut som en pil ned. + 1. Flytta runt markören pÃ¥ skärmen tills du känner dig bekväm. + + 2. HÃ¥ll ned tangenten pil ned (j) tills att den repeterar. +---> Nu vet du hur du tar dig till nästa lektion. + + 3. Flytta till Lektion 1.2, med hjälp av ned tangenten. + +Notera: Om du är osäker pÃ¥ nÃ¥gonting du skrev, tryck för att placera dig + dig i Normal-läge. Skriv sedan om kommandot. + +Notera: Piltangenterna borde ocksÃ¥ fungera. Men om du använder hjkl sÃ¥ kommer + du att kunna flytta omkring mycket snabbare, när du väl vant dig vid + det. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 1.2: STARTA OCH AVSLUTA VIM + + + !! NOTERA: Innan du utför nÃ¥gon av punkterna nedan, läs hela lektionen!! + + 1. Tryck -tangenten (för att se till att du är i Normal-läge). + + 2. Skriv: :q! . + +---> Detta avslutar redigeraren UTAN att spara nÃ¥gra ändringar du gjort. + Om du vill spara ändringarna och avsluta skriv: + :wq + + 3. När du ser skal-prompten, skriv kommandot som tog dig in i den här + handledningen. Det kan vara: vimtutor + Normalt vill du använda: vim tutor + +---> 'vim' betyder öppna redigeraren vim, 'tutor' är filen du vill redigera. + + 4. Om du har memorerat dessa steg och känner dig självsäker, kör dÃ¥ stegen + 1 till 3 för att avsluta och starta om redigeraren. Flytta sedan ned + markören till Lektion 1.3. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 1.3: TEXT REDIGERING - BORTTAGNING + + +** När du är i Normal-läge tryck x för att ta bort tecknet under markören. ** + + 1. Flytta markören till raden nedan med markeringen --->. + + 2. För att rätta felen, flytta markören tills den stÃ¥r pÃ¥ tecknet som ska + tas bort. fix the errors, move the cursor until it is on top of the + + 3. Tryck pÃ¥ x-tangenten för att ta bort det felaktiga tecknet. + + 4. Upprepa steg 2 till 4 tills meningen är korrekt. + +---> Kkon hoppadee övverr måånen. + + 5. Nu när raden är korrekt, gÃ¥ till Lektion 1.4. + +NOTERA: När du gÃ¥r igenom den här handledningen, försök inte att memorera, lär + genom användning. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 1.4: TEXT REDIGERING - INFOGNING + + + ** När du är i Normal-läge tryck i för att infoga text. ** + + 1. Flytta markören till den första raden nedan med markeringen --->. + + 2. För att göra den första raden likadan som den andra, flytta markören till + det första tecknet EFTER där text ska infogas. + + 3. Tryck i och skriv in det som saknas. + + 4. När du rättat ett fel tryck för att Ã¥tergÃ¥ till Normal-läge. + Upprepa steg 2 till 4 för att rätta meningen. + +---> Det sakns här . +---> Det saknas lite text frÃ¥n den här raden. + + 5. När du känner dig bekväm med att infoga text, gÃ¥ till sammanfattningen + nedan. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKTION 1 SAMMANFATTNING + + + 1. Markören flyttas genom att använda piltangenterna eller hjkl-tangenterna. + h (vänster) j (ned) k (upp) l (höger) + + 2. För att starta Vim (frÃ¥n %-prompten) skriv: vim FILNAMN + + 3. För att avsluta Vim skriv: :q! för att kasta ändringar. + ELLER skriv: :wq för att spara ändringar. + + 4. För att ta bort tecknet under markören i Normal-läge skriv: x + + 5. För att infoga text vid markören i Normal-läge skriv: + i skriv in text + +NOTERA: Genom att trycka kommer du att placeras i Normal-läge eller + avbryta ett delvis färdigskrivet kommando. + +Fortsätt nu med Lektion 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.1: BORTTAGNINGSKOMMANDON + + + ** Skriv dw för att radera till slutet av ett ord. ** + + 1. Tryck för att försäkra dig om att du är i Normal-läge. + + 2. Flytta markören till raden nedan markerad --->. + + 3. Flytta markören till början av ett ord som mÃ¥ste raderas. + + 4. Skriv dw för att radera ordet. + + NOTERA: Bokstäverna dw kommer att synas pÃ¥ den sista raden pÃ¥ skärmen när + du skriver dem. Om du skrev nÃ¥got fel, tryck och börja om. + +---> Det är ett nÃ¥gra ord roliga att som inte hör hemma i den här meningen. + + 5. Upprepa stegen 3 och 4 tills meningen är korrekt och gÃ¥ till Lektion 2.2. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.2: FLER BORTTAGNINGSKOMMANDON + + + ** Skriv d$ för att radera till slutet pÃ¥ raden. ** + + 1. Tryck för att försäkra dig om att du är i Normal-läge. + + 2. Flytta markören till raden nedan markerad --->. + + 3. Flytta markören till slutet pÃ¥ den rätta raden (EFTER den första . ). + + 4. Skriv d$ för att radera till slutet pÃ¥ raden. + +---> NÃ¥gon skrev slutet pÃ¥ den här raden tvÃ¥ gÃ¥nger. den här raden tvÃ¥ gÃ¥nger. + + + 5. GÃ¥ vidare till Lektion 2.3 för att förstÃ¥ vad det är som händer. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.3: KOMMANDON OCH OBJEKT + + + Syntaxen för d raderingskommandot är följande: + + [nummer] d objekt ELLER d [nummer] objekt + Var: + nummer - är antalet upprepningar av kommandot (valfritt, standard=1). + d - är kommandot för att radera. + objekt - är vad kommandot kommer att operera pÃ¥ (listade nedan). + + En kort lista över objekt: + w - frÃ¥n markören till slutet av ordet, inklusive blanksteget. + e - frÃ¥n markören till slutet av ordet, EJ inklusive blanksteget. + $ - frÃ¥n markören till slutet pÃ¥ raden. + +NOTERA: För den äventyrslystne, genom att bara trycka pÃ¥ objektet i + Normal-läge (utan kommando) sÃ¥ kommer markören att flyttas som + angivet i objektlistan. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.4: ETT UNDANTAG TILL 'KOMMANDO-OBJEKT' + + + ** Skriv dd för att radera hela raden. ** + + PÃ¥ grund av hur vanligt det är att ta bort hela rader, valde upphovsmannen + till Vi att det skulle vara enklare att bara trycka d tvÃ¥ gÃ¥nger i rad för + att ta bort en rad. + + 1. Flytta markören till den andra raden i frasen nedan. + 2. Skriv dd för att radera raden. + 3. Flytta nu till den fjärde raden. + 4. Skriv 2dd (kom ihÃ¥g: nummer-kommando-objekt) för att radera de tvÃ¥ + raderna. + + 1) Roses are red, + 2) Mud is fun, + 3) Violets are blue, + 4) I have a car, + 5) Clocks tell time, + 6) Sugar is sweet + 7) And so are you. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 2.5: Ã…NGRA-KOMMANDOT + + +** Skriv u för att Ã¥ngra det senaste kommandona, U för att fixa en hel rad. ** + + 1. Flytta markören till slutet av raden nedan markerad ---> och placera den + pÃ¥ det första felet. + 2. Skriv x för att radera den första felaktiga tecknet. + 3. Skriv nu u för att Ã¥ngra det senaste körda kommandot. + 4. Rätta den här gÃ¥ngen alla felen pÃ¥ raden med x-kommandot. + 5. Skriv nu U för att Ã¥terställa raden till dess ursprungliga utseende. + 6. Skriv nu u nÃ¥gra gÃ¥nger för att Ã¥ngra U och tidigare kommandon. + 7. Tryck nu CTRL-R (hÃ¥ll inne CTRL samtidigt som du trycker R) nÃ¥gra gÃ¥nger + för att upprepa kommandona (Ã¥ngra Ã¥ngringarna). + +---> Fiixa felen ppÃ¥ deen häär meningen och Ã¥terskapa dem med Ã¥ngra. + + 8. Det här är väldigt användbara kommandon. GÃ¥ nu vidare till + Lektion 2 Sammanfattning. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKTION 2 SAMMANFATTNING + + + 1. För att radera frÃ¥n markören till slutet av ett ord skriv: dw + + 2. För att radera frÃ¥n markören till slutet av en rad skriv: d$ + + 3. För att radera en hel rad skriv: dd + + 4. Syntaxen för ett kommando i Normal-läge är: + + [nummer] kommando objekt ELLER kommando [nummer] objekt + där: + nummer - är hur mÃ¥nga gÃ¥nger kommandot kommandot ska repeteras + kommando - är vad som ska göras, t.ex. d för att radera + objekt - är vad kommandot ska operera pÃ¥, som t.ex. w (ord), + $ (till slutet av raden), etc. + + 5. För att Ã¥ngra tidigare kommandon, skriv: u (litet u) + För att Ã¥ngra alla tidigare ändringar pÃ¥ en rad skriv: U (stort U) + För att Ã¥ngra Ã¥ngringar tryck: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 3.1: KLISTRA IN-KOMMANDOT + + + ** Skriv p för att klistra in den senaste raderingen efter markören. ** + + 1. Flytta markören till den första raden i listan nedan. + + 2. Skriv dd för att radera raden och lagra den i Vims buffert. + + 3. Flytta markören till raden OVANFÖR där den raderade raden borde vara. + + 4. När du är i Normal-läge, skriv p för att byta ut raden. + + 5. Repetera stegen 2 till 4 för att klistra in alla rader i rätt ordning. + + d) Kan du lära dig ocksÃ¥? + b) Violetter är blÃ¥, + c) Intelligens fÃ¥s genom lärdom, + a) Rosor är röda, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 3.2: ERSÄTT-KOMMANDOT + + + ** Skriv r och ett tecken för att ersätta tecknet under markören. ** + + 1. Flytta markören till den första raden nedan markerad --->. + + 2. Flytta markören sÃ¥ att den stÃ¥r pÃ¥ det första felet. + + 3. Skriv r och sedan det tecken som borde ersätta felet. + + 4. Repetera steg 2 och 3 tills den första raden är korrekt. + +---> När drn här ruden skrevs, trickte nÃ¥gon pÃ¥ fil knappar! +---> När den här raden skrevs, tryckte nÃ¥gon pÃ¥ fel knappar! + + 5. GÃ¥ nu vidare till Lektion 3.2. + +NOTERA: Kom ihÃ¥g att du skall lära dig genom användning, inte genom memorering. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 3.3: ÄNDRA-KOMMANDOT + + + ** För att ändra en del eller ett helt ord, skriv cw . ** + + 1. Flytta markören till den första redan nedan markerad --->. + + 2. Placera markören pÃ¥ d i rdrtn. + + 3. Skriv cw och det rätta ordet (i det här fallet, skriv "aden".) + + 4. Tryck och flytta markören till nästa fel (det första tecknet som + ska ändras.) + + 5. Repetera steg 3 och 4 tills den första raden är likadan som den andra. + +---> Den här rdrtn har nÃ¥gra otf som brhotrt ändras mrf ändra-komjendit. +---> Den här raden har nÃ¥gra ord som behöver ändras med ändra-kommandot. + +Notera att cw inte bara ändrar ordet, utan även placerar dig i infogningsläge. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 3.4: FLER ÄNDRINGAR MED c + + + ** Ändra-kommandot används pÃ¥ samma objekt som radera. ** + + 1. Ändra-kommandot fungerar pÃ¥ samma sätt som radera. Syntaxen är: + + [nummer] c objekt ELLER c [nummer] objekt + + 2. Objekten är ocksÃ¥ de samma, som t.ex. w (ord), $ (slutet av raden), etc. + + 3. Flytta till den första raden nedan markerad -->. + + 4. Flytta markören till det första felet. + + 5. Skriv c$ för att göra resten av raden likadan som den andra och tryck + . + +---> Slutet pÃ¥ den här raden behöver hjälp med att fÃ¥ den att likna den andra. +---> Slutet pÃ¥ den här raden behöver rättas till med c$-kommandot. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKTION 3 SAMMANFATTNING + + + 1. För att ersätta text som redan har blivit raderad, skriv p . + Detta klistrar in den raderade texten EFTER markören (om en rad raderades + kommer den att hamna pÃ¥ raden under markören. + + 2. För att ersätta tecknet under markören, skriv r och sedan tecknet som + kommer att ersätta orginalet. + + 3. Ändra-kommandot lÃ¥ter dig ändra det angivna objektet frÃ¥n markören till + slutet pÃ¥ objektet. eg. Skriv cw för att ändra frÃ¥n markören till slutet + pÃ¥ ordet, c$ för att ändra till slutet pÃ¥ en rad. + + 4. Syntaxen för ändra-kommandot är: + + [nummer] c objekt ELLER c [nummer] objekt + +GÃ¥ nu till nästa lektion. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 4.1: POSITION OCH FILSTATUS + + + ** Tryck CTRL-g för att visa din position i filen och filstatusen. + Tryck SHIFT-G för att flytta till en rad i filen. ** + + Notera: Läsa hela den lektion innan du utför nÃ¥got av stegen!! + + 1. HÃ¥ll ned Ctrl-tangenten och tryck g . En statusrad med filnamn och raden + du befinner dig pÃ¥ kommer att synas. Kom ihÃ¥g radnummret till Steg 3. + + 2. Tryck shift-G för att flytta markören till slutet pÃ¥ filen. + + 3. Skriv in nummret pÃ¥ raden du var pÃ¥ och tryck sedan shift-G. Detta kommer + att ta dig tillbaka till raden du var pÃ¥ när du först tryckte Ctrl-g. + (När du skriver in nummren, kommer de INTE att visas pÃ¥ skärmen.) + + 4. Om du känner dig säker pÃ¥ det här, utför steg 1 till 3. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 4.2: SÖK-KOMMANDOT + + + ** Skriv / följt av en fras för att söka efter frasen. ** + + 1. I Normal-läge skriv /-tecknet. Notera att det och markören blir synlig + längst ned pÃ¥ skärmen precis som med :-kommandot. + + 2. Skriv nu "feeel" . Det här är ordet du vill söka efter. + + 3. För att söka efter samma fras igen, tryck helt enkelt n . + För att söka efter samma fras igen i motsatt riktning, tryck Shift-N . + + 4. Om du vill söka efter en fras bakÃ¥t i filen, använd kommandot ? istället + för /. + +---> "feeel" är inte rätt sätt att stava fel: feeel är ett fel. + +Notera: När sökningen nÃ¥r slutet pÃ¥ filen kommer den att fortsätta vid början. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 4.3: SÖKNING EFTER MATCHANDE PARENTESER + + + ** Skriv % för att hitta en matchande ),], or } . ** + + 1. Placera markören pÃ¥ nÃ¥gon av (, [, or { pÃ¥ raden nedan markerad --->. + + 2. Skriv nu %-tecknet. + + 3. Markören borde vara pÃ¥ den matchande parentesen eller hakparentesen. + + 4. Skriv % för att flytta markören tillbaka till den första hakparentesen + (med matchning). + +---> Det ( här är en testrad med (, [ ] och { } i den. )) + +Notera: Det här är väldigt användbart vid avlusning av ett program med icke + matchande parenteser! + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 4.4: ETT SÄTT ATT ÄNDRA FEL + + + ** Skriv :s/gammalt/nytt/g för att ersätta "gammalt" med "nytt". ** + + 1. Flytta markören till raden nedan markerad --->. + + 2. Skriv :s/denn/den . Notera att det här kommandot bara ändrar den + första förekomsten pÃ¥ raden. + + 3. Skriv nu :s/denn/den/g vilket betyder ersätt globalt pÃ¥ raden. + Det ändrar alla förekomster pÃ¥ raden. + +---> denn bästa tiden att se blommor blomma är denn pÃ¥ vÃ¥ren. + + 4. För att ändra alla förekomster av en teckensträng mellan tvÃ¥ rader, + skriv :#,#s/gammalt/nytt/g där #,# är de tvÃ¥ radernas radnummer. + Skriv :%s/gammtl/nytt/g för att ändra varje förekomst i hela filen. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKTION 4 SAMMANFATTNING + + + 1. Ctrl-g visar din position i filen och filstatusen. + Shift-G flyttar till slutet av filen. Ett radnummer följt Shift-G + flyttar till det radnummret. + + 2. Skriver man / följt av en fras söks det FRAMMÃ…T efter frasen. + Skriver man ? följt av en fras söks det BAKÃ…T efter frasen. + Efter en sökning skriv n för att hitta nästa förekomst i samma riktning + eller Shift-N för att söka i den motsatta riktningen. + + 3. Skriver man % när markören är pÃ¥ ett (,),[,],{, eller } hittas dess + matchande par. + + 4. För att ersätta den första gammalt med nytt pÃ¥ en rad skriv :s/gammlt/nytt + För att ersätta alla gammlt med nytt pÃ¥ en rad skriv :s/gammlt/nytt/g + För att ersätta fraser mellan rad # och rad # skriv :#,#s/gammlt/nytt/g + För att ersätta alla förekomster i filen skriv :%s/gammlt/nytt/g + För att bekräfta varje gÃ¥ng lägg till "c" :%s/gammlt/nytt/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 5.1: HUR MAN KÖR ETT EXTERNT KOMMANDO + + + ** Skriv :! följt av ett externt kommando för att köra det kommandot. ** + + 1. Skriv det välbekanta kommandot : för att placera markören längst ned + pÃ¥ skärmen pÃ¥ skärmen. Detta lÃ¥ter dig skriva in ett kommando. + + 2. Skriv nu ! (utropstecken). Detta lÃ¥ter dig köra ett godtyckligt externt + skalkommando. + + 3. Som ett exempel skriv ls efter ! och tryck sedan . Detta kommer + att visa dig en listning av din katalog, precis som om du kört det vid + skalprompten. Använd :!dir om ls inte fungerar. + +Notera: Det är möjligt att köra vilket externt kommando som helst pÃ¥ det här + sättet. + +Notera: Alla :-kommandon mÃ¥ste avslutas med att trycka pÃ¥ + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 5.2: MER OM ATT SPARA FILER + + + ** För att spara ändringar gjorda i en fil, skriv :w FILNAMN. ** + + 1. Skriv :!dir eller :!ls för att fÃ¥ en listning av din katalog. + Du vet redan att du mÃ¥ste trycka efter det här. + + 2. Välj ett filnamn som inte redan existerar, som t.ex. TEST. + + 3. Skriv nu: :w TEST (där TEST är filnamnet du valt.) + + 4. Det här sparar hela filen (Vim handledningen) under namnet TEST. + För att verifiera detta, skriv :!dir igen för att se din katalog + +Notera: Om du skulle avsluta Vim och sedan öppna igen med filnamnet TEST sÃ¥ + skulle filen vara en exakt kopia av handledningen när du sparade den. + + 5. Ta nu bort filen genom att skriva (MS-DOS): :!del TEST + eller (Unix): :!rm TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 5.3: ETT SELEKTIVT SPARA-KOMMANDO + + + ** För att spara en del av en fil, skriv :#,# w FILNAMN ** + + 1. Ännu en gÃ¥ng, skriv :!dir eller :!ls för att fÃ¥ en listning av din + katalog och välj ett passande filnamn som t.ex. TEST. + + 2. Flytta markören högst upp pÃ¥ den här sidan och tryck Ctrl-g för att fÃ¥ + reda pÃ¥ radnumret pÃ¥ den raden. KOM IHÃ…G DET NUMMRET! + + 3. Flytta nu längst ned pÃ¥ sidan och skriv Ctrl-g igen. + KOM IHÃ…G DET RADNUMMRET OCKSÃ…! + + 4. För att BARA spara en sektion till en fil, skriv :#,# w TEST + där #,# är de tvÃ¥ nummren du kom ihÃ¥g (toppen, botten) och TEST är + ditt filnamn. + + 5. Ännu en gÃ¥ng, kolla sÃ¥ att filen är där med :!dir men radera den INTE. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 5.4: TA EMOT OCH FÖRENA FILER + + + ** För att infoga innehÃ¥llet av en fil, skriv :r FILNAMN ** + + 1. Skriv :!dir för att försäkra dig om att TEST-filen frÃ¥n tidigare + fortfarande är kvar. + + 2. Placera markören högst upp pÃ¥ den här sidan. + +NOTERA: Efter att du kört Steg 3 kommer du att se Lektion 5.3. + Flytta dÃ¥ NED till den här lektionen igen. + + 3. Ta nu emot din TEST-fil med kommandot :r TEST där TEST är namnet pÃ¥ + filen. + +NOTERA: Filen du tar emot placeras där markören är placerad. + + 4. För att verifiera att filen togs emot, gÃ¥ tillbaka och notera att det nu + finns tvÃ¥ kopior av Lektion 5.3, orginalet och filversionen. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKTION 5 SAMMANFATTNING + + + 1. :!kommando kör ett externt kommando. + + NÃ¥gra användbara exempel är: + (MS-DOS) (Unix) + :!dir :!ls - visar en kataloglistning. + :!del FILNAMN :!rm FILNAMN - tar bort filen FILNAMN. + + 2. :w FILNAMN sparar den aktuella Vim-filen med namnet FILNAMN. + + 3. :#,#w FILNAMN sparar raderna # till # i filen FILNAMN. + + 4. :r FILNAMN tar emot filen FILNAMN och infogar den i den aktuella filen + efter markören. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 6.1: ÖPPNA-KOMMANDOT + + + ** Skriv o för att öppna en rad under markören och placera dig i + Infoga-läge. ** + + 1. Flytta markören till raden nedan markerad --->. + + 2. Skriv o (litet o) för att öppna upp en rad NEDANFÖR markören och placera + dig i Infoga-mode. + + 3. Kopiera nu raden markerad ---> och tryck för att avsluta + Infoga-läget. + +---> Efter du skrivit o placerad markören pÃ¥ en öppen rad i Infoga-läge. + + 4. För att öppna upp en rad OVANFÖR markören, skriv ett stort O , istället + för ett litet o. Pröva detta pÃ¥ raden nedan. +Öppna upp en rad ovanför denna genom att trycka Shift-O när markören stÃ¥r här. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 6.2: LÄGG TILL-KOMMANDOT + + + ** Skriv a för att infoga text EFTER markören. ** + + 1. Flytta markören till slutet av den första raden nedan markerad ---> genom + att skriv $ i Normal-läge. + + 2. Skriv ett a (litet a) för att lägga till text EFTER tecknet under + markören. (Stort A lägger till i slutet av raden.) + +Notera: Detta undviker att behöva skriva i , det sista tecknet, texten att + infoga, , högerpil, och slutligen, x, bara för att lägga till i + slutet pÃ¥ en rad! + + 3. Gör nu färdigt den första raden. Notera ocksÃ¥ att lägga till är likadant + som Infoga-läge, enda skillnaden är positionen där texten blir infogad. + +---> Här kan du träna +---> Här kan du träna pÃ¥ att lägga till text i slutet pÃ¥ en rad. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 6.3: EN ANNAN VERSION AV ERSÄTT + + + ** Skriv ett stort R för att ersätta fler än ett tecken. ** + + 1. Flytta markören till den första raden nedan markerad --->. + + 2. Placera markören vid början av det första ordet som är annorlunda jämfört + med den andra raden markerad ---> (ordet "sista"). + + 3. Skriv nu R och ersätt resten av texten pÃ¥ den första raden genom att + skriva över den gamla texten sÃ¥ att den första raden blir likadan som + den andra. + +---> För att fÃ¥ den första raden lika som den sista, använd tangenterna. +---> För att fÃ¥ den första raden lika som den andra, skriv R och den nya texten. + + 4. Notera att när du trycker för att avsluta, sÃ¥ blir eventuell + oförändrad text kvar. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lektion 6.4: SÄTT FLAGGOR + + ** Sätt en flagga sÃ¥ att en sökning eller ersättning ignorerar storlek ** + + 1. Sök efter "ignore" genom att skriva: + /ignore + Repetera flera gÃ¥nger genom att trycka pÃ¥ n-tangenten + + 2. Sätt 'ic' (Ignore Case) flaggan genom att skriva: + :set ic + + 3. Sök nu efter "ignore" igen genom att trycka: n + Repeat search several more times by hitting the n key + + 4. Sätt 'hlsearch' and 'incsearch' flaggorna: + :set hls is + + 5. Skriv nu in sök-kommandot igen, och se vad som händer: + /ignore + + 6. För att ta bort framhävningen av träffar, skriv + :nohlsearch +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKTION 6 SAMMANFATTNING + + + 1. Genom att skriva o öpnnas en rad NEDANFÖR markören och markören placeras + pÃ¥ den öppna raden i Infoga-läge. + Genom att skriva ett stort O öppnas raden OVANFÖR raden som markören är + pÃ¥. + + 2. Skriv ett a för att infoga text EFTER tecknet som markören stÃ¥r pÃ¥. + Genom att skriva ett stort A läggs text automatiskt till i slutet pÃ¥ + raden. + + 3. Genom att skriva ett stort R hamnar du i Ersätt-läge till trycks + för att avsluta. + + 4. Genom att skriva ":set xxx" sätts flaggan "xxx" + + + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKTION 7: ON-LINE HJÄLP-KOMMANDON + + + ** Använd on-line hjälpsystemet ** + + Vim har ett omfattande on-line hjälpsystem. För att komma igÃ¥ng pröva ett av + dessa tre: + - tryck tangenten (om du har nÃ¥gon) + - tryck tangenten (om du har nÃ¥gon) + - skriv :help + + Skriv :q för att stränga hjälpfönstret. + + Du kan hitta hjälp om nästan allting, genom att ge ett argument till + ":help" kommandot. Pröva dessa (glöm inte att trycka ): + + :help w + :help c_ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.tr.iso9 b/vim/bundle/ubuntu-vim72/tutor/tutor.tr.iso9 new file mode 100644 index 0000000..759e57d --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.tr.iso9 @@ -0,0 +1,813 @@ +=============================================================================== += V I M T u t o r'a Hoþ Geldiniz - Sürüm 1.5 = +=============================================================================== + + Vim, bu gibi bir eðitmen ile açýklanmasý gereken çok fazla komut barýndýran, + oldukça kuvvetli bir metin düzenleyicidir. Bu eðitmen Vim'i çok amaçlý bir + düzenleyici olarak kolaylýkla kullanabileceðiniz yeterli sayýda komutu açýklamak + için tasarlanmýþtýr. + + Eðitmeni tamamlama süresi yapacaðýnýz denemelere baðlý olarak 25-30 + dakikadýr. + + Derslerdeki komutlar bu metini deðiþtirecektir. Üzerinde çalýþmak için + bu dosyanýn bir kopyasýný alýn (eðer "vimtutor" uygulamasýný çalýþtýrdýysanýz + zaten bir kopyasýný almýþ oldunuz). + + Bu eðitmenin, kullanarak öðretmeye ayarlandýðýný unutmamak önemlidir. Bu þu + anlama gelir; komutlarý öðrenmek için doðru bir þekilde çalýþtýrmanýz gerekir. + Eðer sadece yazýlanlarý okursanýz komutlarý unutursunuz. + + Þimdi Shift-Lock tuþlarýnýzýn basýlý olmadýðýna emin olun ve Ders 1.1'in + ekraný tamamen doldurmasý için j tuþuna yeterli miktarda basýn. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 1.1: ÝMLECÝ HAREKET ETTÝRMEK + + Ç.N: Tüm derslerde gördüðünüz yerde bu tuþa basmanýz gerekir. + + ** Ýmleci hareket ettirmek için, h,j,k,l tuþlarýna gösterildiði gibi basýn. ** + ^ + k Ýpucu: h tuþu soldadýr ve sola hareket eder. + < h l > l tuþu saðdadýr ve saða hareket eder. + j j tuþu aþaðý yönlü bir ok gibidir. + v + 1. Yeterli hissedinceye kadar imleci ekranda hareket ettirin. + + 2. Aþaðý tuþunu (j) tekrar edene kadar basýlý tutun. +---> Þimdi, bir sonraki derse nasýl geçeceðinizi biliyorsunuz. + + 3. Aþaðý tuþunu kullanarak, Ders 1.2'ye geçin. + Not: Eðer yazdýðýnýz bir þeyden emin deðilseniz, Normal kipe geçmek için tuþuna basýn. + Daha sonra istediðiniz komutu yeniden yazýn. + Not: Ýmleç tuþlarý da ayný zamanda iþe yararlar ancak hjkl tuþlarýný kullanmaya alýþtýðýnýzda etrafta daha hýzlý + hareket edersiniz. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 1.2: VIM'E GÝRÝÞ VE VIM'DEN ÇIKIÞ + + + !! NOT: Aþaðýdaki adýmlarý yapmadan önce, bu dersi tamamen okuyun. + + 1. tuþuna basýn (Normal kipte olmayý garantilemek için). + + 2. Yazýn: :q! . + +---> Bu düzenleyicinin yaptýðýnýz deðiþiklikleri KAYDETMEDEN kapanmasýný saðlar. + Eðer yaptýklarýnýzýn kaydedilmesini istiyorsanýz þunu yazýn: + :wq + + 3. Kabuk istemcisini (shell prompt) gördüðünüzde, sizi bu eðitmene getiren + komutu yazýn. Bu: vimtutor komutudur. + Normalde: vim tutor komutu kullanýlýr. +---> 'vim' vim düzenleyicisine gir anlamýna gelir, 'tutor' ise açmak istediðiniz dosyadýr. + + 4. Eðer bu adýmlarý ezberlediyseniz ve kendinizden eminseniz, 1'den 3'e kadar olan adýmlarý, + düzenleyiciden çýkmak ve yeniden girmek için uygulayýn. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 1.3: METÝN DÜZENLEME - SÝLME + + +** Normal kipteyken imlecin altýndaki karakteri silmek için x 'e basýn.** + + 1. Ýmleci aþaðýda iþaretlenmiþ (-->) satýra götürün. + + 2. Hatalarý düzeltmek için, imleci silinmesi gereken karakterin üzerine getirin + + 3. Ýstenmeyen karakteri silmek için x tuþuna basýn. + + 4. Cümle düzelene kadar 2'den 4'e kadar olan adýmlarý tekrar edin. + +---> Ýinek ayyýn üzzerinden attladý. + + 5. Þimdi satýr düzeldi, Ders 1.4'e geçin. + +NOT: Bu eðitmende ilerledikçe ezberlemeye çalýþmayýn, kullanarak öðrenin. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 1.4: METÝN DÜZENLEME - EKLEME + + + ** Normal kipteyken metin eklemek için i 'ye basýn. ** + + 1. Ýmleci aþaðýdaki iþaretlenmiþ (-->) ilk satýra götürün. + + 2. Ýlk satýrý ikincisinin aynýsý gibi yapmak için, imleci eklenmesi gereken + metinden sonraki ilk karakterin üzerine götürün. + + 3. i 'ye basýn ve gerekli eklemeleri yapýn. + + 4. Her hata düzeltildiðinde tuþuna basarak Normal kipe dönün. + Cümleyi düzeltmek için 2'den 4'e kadar olan adýmlarý tekrar edin. + +---> Bu metinde eksk. +---> Bu metinde birþey eksik. + + 5. Metin ekleme çalýþmalarýný yeterli görüyorsanýz aþaðýdaki özete geçin. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + DERS 1 ÖZET + + + 1. Ýmleç hem ok tuþlarý hem de hjkl tuþlarý ile hareket ettirilir. + h (sol) j (aþaðý) k (yukarý) l (sað) + + 2. (Konsoldan) Vim'e girmek içn yazýn: vim DOSYAÝSMÝ + + 3. Tüm deðiþiklikleri göz ardý edip vimden çýkmak için yazýn: + :q! + veya tüm deðiþiklikleri kaydetmek için yazýn: + :wq + + 4. Ýmlecin altýndaki bir karakteri silmek için Normal kipte x yazýn. + + 5. Ýmlecin altýnda metin eklemek için Normal kipte yazýn: + i yazýlacak metin + +NOT: tuþuna basmak sizi Normal kipe götürür ya da istenmeyen tamamlanmamýþ bir komutu + iptal eder. + +Þimdi Ders 2 ile devam edin. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 2.1: SÝLME KOMUTLARI + + ** Bir kelimeyi silmek için dw yazýn.** + + 1. Normal kipte olmakten emin olmak için tuþuna basýn. + + 2. Ýmleci aþaðýdaki iþaretlenmiþ (-->) satýra götürün. + + 3. Ýmleci silinmesi gereken kelimenin baþýna götürün. + + 4. Kelimeyi silmek için dw yazýn. + + NOT: dw harfleri siz yazdýkça ekranýn son satýrýnda görülecektir. + Eðer yanlýþ bir þeyler yazarsanýz, yeniden baþlamak için tuþuna basýn. + +---> Bu satýrda çerez cümleye ait olmayan leblebi kelimeler var. + + + 5. Cümle düzelene kadar adým 3 ve 4'ü tekrar edin, daha sonra Ders 2.2'ye gidin. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 2.2: DAHA FAZLA SÝLME KOMUTU + + + ** Satýrý sonuna kadar silmek için d$ yazýn.** + + 1. Normal kipte olmaktan emin olmak için tuþuna basýn. + + 2. Ýmleci aþaðýdaki iþaretlenmiþ (-->) satýra götürün. + + 3. Ýmleci doðru olan satýrýn sonuna götürün. (Birinciden SONRA. ) + + 4. Satýrý sonuna kadar silmek için d$ yazýn. + ( d$ yazarken d'den sonra ile beraber $ tuþuna basýn) + +---> Birileri bu satýrýn sonunu iki defa yazmýþ. Birileri bu satýrýn sonunu iki defa yazmýþ. + + 5. Neler olduðunu anlamak için Ders 2.3'e gidin. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 2.3: KOMUTLAR VE NESNELER + + + d silme komutu için biçim aþaðýdaki gibidir: + + [sayý] d nesne VEYA d [sayý] nesne + Burada: + sayý - komutun kaç defa çalýþtýrlacaðý (isteðe baðlý, varsayýlan=1). + d - silme komutu + nesne - komutun ne þekilde çalýþacaðý (aþaðýda listlendi). + + Nesnelerin kýsa bir listesi. + w - Boþluðu da içererek, imleçten itibaren kelimenin sonuna kadar. + e - Boþluðu ÝÇERMEDEN, imleçten itibaren kelimenin sonuna kadar. + $ - imleçten satýrýn sonuna kadar. + +NOT: Serüven sevenler için, Normal kipte iken, komut olmadan sadece nesnenin kendisine basmak + imleci yukardaki listede olduðu gibi hareket ettirecektir. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 2.4: 'KOMUT-NESNE'ye BÝR ÝSTÝSNA + + + ** Bütün bir satýrý silmek için dd yazýn. ** + + Bütün bir satýr silme sýklýðýndan dolayý, Vi tasarýmcýlarý bir satýrý + tamamen silmek için iki d yazmanýn daha kolay olacaðýna karar verdiler. + + 1. Ýmleci aþaðýdaki tümceciðin ikinci satýrýna götürün. + 2. Satýrý silmek için dd yazýn. + 3. Þimdi de dördüncü satýra gidin. + 4. Ýki satýrý birden silmek için 2dd (sayý-komut-nesne'yi hatýrlayýn) yazýn. + + 1) Güller kýrmýzýdýr, + 2) Çamur eðlenceli, + 3) Menekþeler mavi, + 4) Bir arabam var, + 5) Saat bana söyler, + 6) Þeker tatlýdýr + 7) Ve sen de öylesin + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 2.5: GERÝ AL KOMUTU + + + ** Son komutu geri almak için u , bütün bir satýrý düzeltmek için U yazýn.** + + 1. Ýmleci aþaðýdaki iþaretlenmiþ (-->) satýrdaki ilk hatanýn üzerine götürün. + 2. Ýlk istenmeyen karakteri silmek için x yazýn. + 3. Þimdi son çalýþtýrýlan komutu geri almak için u yazýn. + 4. Bu sefer x komutunu kullanarak satýrdaki tüm hatalarý düzeltin. + 5. Þimdi satýrý ilk haline çevirmek için büyük U yazýn. + 6. Þimdi U ve daha önceki komutlarý geri almak için birkaç defa u yazýn. + 7. Þimdi birkaç defa CTRL-R (CTRL'yi basýlý tutarken R ye basýn) yazarak geri almalarý da geri alýn. + +---> Buu satýýrdaki hatalarý düüzeltinn ve sonra koomutu geri alllýn. + + 8. Bunlar son derece kullanýþlý komutlardýr. Þimdi Ders 2 Özete geçin. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + DERS 2 ÖZET + + + 1. Ýmleçten itibaren bir kelimeyi silmek için yazýn: dw + + 2. Ýmleçten itibaren bir satýrý silmek için yazýn: d$ + + 3. Bütün bir satýrý silmek için yazýn: dd + + 4. Normal kipte bir komut biçimi þöyledir: + + [sayý] komut nesne VEYA komut [sayý] nesne + burada: + sayý - komutun kaç kere tekrar edeceði + komut - ne yapýlacaðý, silmek için d olduðu gibi + nesne - komutun nasýl davranacaðý, w (kelime), $ (satýr sonu), vb gibi. + + 5. Önceki hareketleri geri almak için yazýn: u (küçük u) + Bir satýrdaki tüm deðiþiklikleri geri almak için yazýn: U (büyük u) + Geri almalarý geri almak için yazýn: CTRL-R + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 3.1: KOY KOMUTU + + + ** Son yaptýðýnýz silme iþlemini imleçten sona geri yerleþtirmek için p yazýn.** + + 1. Ýmleci aþaðýdaki tümceciðin ilk satýrýna götürün. + + 2. Satýrý silip Vim'in tamponuna yerleþtirmek için dd yazýn. + + 3. Ýmleci, silinmiþ satýrý nereye yerleþtirmek istiyorsanýz, o satýrýn ÜZERÝNE götürün. + + 4. Normal kipteyken, satýrý yerleþtirmek için p yazýn. + + 5. Tüm satýrlarý doðru sýraya koymak için 2'den 4'e kadar olan adýmlarý tekrar edin. + + d) Sen de öðrendin mi? + b) Menekþeler mavidir, + c) Akýl öðrenilir, + a) Güller kýrmýzýdýr, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 3.2: YERLEÞTÝR KOMUTU + + + ** Ýmlecin altýnda bir karakter yerleþtirmek için r yazýn.** + + 1. Ýmleci aþaðýdaki iþaretlenmiþ(--->) ilk satýra götürün. + + 2. Ýmleci satýrdaki ilk hatanýn üzerine götürün. + + 3. Hatayý düzeltmek için önce r ardýndan da doðru karakteri yazýn. + + 4. Ýlk satýr düzelene kadar adým 2 ve 3'ü tekrar edin. + +---> Bu satýv yazýlývken, bivileri yamlýþ tuþtara basmýþ. +---> Bu satýr yazýlýrken, birileri yanlýþ tuþlara basmýþ. + + 5. Ders 3.2'ye geçin. + +NOT: Unutmayýn, ezberleyerek deðil kullanarak öðrenin. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 3.3: DEÐÝÞTÝR KOMUTU + + + ** Bir kelimenin tamamýný veya parçasýný deðiþtirmek için cw yazýn. + + 1. Ýmleci aþaðýdaki iþaretlenmiþ(--->) satýra götürün. + + 2. Ýmleci "sutar" daki u'nun üzerine yerleþtirin. + + 3. Önce cw ardýndan doðru kelimeyi girin (bu durumda 'atýr'.) + + 4. tuþuna basýn ve bir sonraki hataya gidin (deðiþmesi gereken ilk karakter.) + + 5. Ýlk cümle ikincisiyle ayný olana kadar adým 3 ve 4'ü tekrar edin. + +---> Bu sutar deðiþtir komutu ile deðiþneli gereken birkaç petime içeriyor. +---> Bu satýr deðiþtir komutu ile deðiþmesi gereken birkaç kelime içeriyor. + +cw'nin sadece kelimeyi deðiþtirmediðini, ayný zamanda sizi insert kipine götürdüðüne de dikkat edin. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 3.4: c'YÝ KULLANARAK DAHA FAZLA DEÐÝÞTÝRME + + + ** Deðiþtir komutu sil komutu ile ayný nesnelerle kullanýlýr.** + + 1. Deðiþtir komutu sil ile ayný yolla çalýþýr. Biçim þöyledir: + + [sayý] c nesne VEYA c [sayý] nesne + + 2. Nesneler de ayný zamanda aynýdýr. Örneðin w (word), $ (satýr sonu), vb. gibi. + + 3. Aþaðýdaki iþaretlenmiþ(--->) ilk satýra gidin. + + 4. Ýmleci ilk hataya götürün. + + 5. Satýrýn geri kalan kýsmýný ikincisi gibi yapmak için c$ yazýn ve daha sonra tuþuna basýn. + +---> Bu satýrýn sonu düzeltilmek için biraz yardýma ihtiyaç duyuyor. +---> Bu satýrýn sonu düzeltilmek için c$ komutu kullanýlarak yardýma ihtiyaç duyuyor. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + DERS 3 ÖZET + + + 1. Silinmiþ olan bir metini geri yerleþtirmek için p yazýn. Bu silinmiþ metini + imleçten hemen SONRA geri yerleþtirir (eðer bir satýr silinmiþse hemen imleçten sonra, alta + yerleþtirilecektir) + + 2. Ýmlecin altýndaki karakteri deðiþtirmek için önce r ardýndan da + asýl karakteri yazýn. + + 3. Deðiþtir komutu belirlenen nesneyi, imleçten nesnenin sonuna kadar deðiþtirme imkaný verir. + Örneðin, bir kelimeyi imleçten sonuna kadar deðiþtirmek için cw , bir satýrýn tamamýný + deðiþtirmek içinse c$ yazýn. + + 4. Deðiþtir için biçim þöyledir: + + [sayý] c nesne VEYA c [sayý] nesne + +Þimdi bir sonraki derse geçin. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 4.1: KONUM VE DOSYA DURUMU + + + ** Dosya içerisindeki konumunuzu ve dosyanýn durumunu görmek için CTRL-g yazýn. ** + ** Dosya içerisindeki bir satýra gitmek için SHIFT-g yazýn. ** + + Not: Adýmlardan herhangi birini yapmadan önce dersin tamamýný okuyun!! + + 1. Ctrl tuþunu basýlý tutun ve g'ye basýn. Dosyanýn sonunda dosya ismini ve bulunduðunuz konumu + gösteren bir durum satýrý görünecektir. Adým 3 için satýr numarasýný + unutmayýn. + + 2. Dosyanýn sonuna gitmek için shift-G 'ye basýn. + + 3. Daha önce bulunduðunuz satýr numarasýný yazýn ve daha sonra shift-G 'ye basýn. + Bu sizi daha önce bulunduðunuz ve Ctrl-g 'ye bastýðýnýz satýra geri götürecektir. + (Sayýlar yazýlýrken ekranda GÖRÜNMEYECEKLERDÝR.) + + 4. Yapabileceðinizi düþündüðünüzde, adým 1'den 3'e kadar yapýn. + + Ç.N: Bu kýsým orijinal metinde de biraz eksik anlatýlmýþ gibi. Bir satýr hakkýnda bilgi almak için + Ctrl-g'yi kullanýn. Herhangi bir satýra gitmek içinse, önce satýr numarasýný yazýn ve ardýnan + shift-g'ye basýn. Satýr numarasý girmeden basýlan shift-g sizi satýr sonuna götürür. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 4.2: ARAMA KOMUTU + + + ** Bir kelime öbeðini aramak için / ile beraber kelime öbeðini girin. ** + + 1. Normal kipteyken / karakterini yazýn. Komut bölümü yerine / karakterinin ve + imlecin ekranýn sonunda göründüðüne dikkat edin. + + 2. Þimdi, 'hatttaa' yazýp 'a basýn. Bu sizin aramak istediðiniz kelime. + + 3. Ayný kelime öbeðini tekrar aramak için, basitçe n yazýn. + Ayný kelime öbeðini zýt yönde aramak için, Shift-N yazýn. + + 4. Eðer zýt yöne doðru bir arama yapmak istiyorsanýz, / komutu yerine + ? komutunu kullanýn. + +---> "hatttaa" hatayý yazmanýn doðru yolu deðil; hatttaa bir hata. + +Not: Arama dosyanýn sonuna ulaþtýðýnda, tekrar baþtan baþlayacaktýr. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 4.3: UYAN PARANTEZ ARAMASI + + + ** Uyan bir ),] veya } bulmak için % yazýn. ** + + 1. Ýmleci iþaretli (--->) satýrdaki herhangi bir (, [ veya { karakterinin + üzerine götürün. + + 2. Þimdi % karakterini yazýn. + + 3. Ýmleç uyan parantez veya ayracýn üzerine gider. + + 4. Uyan ilk parantezin üzerine geri dönmek için yine % yazýn. + +---> Bu ( içerisinde ('ler, ['ler ] ve {'ler } bulunan bir satýrdýr. )) + +Not: Bu içerisinde uymayan parantezler bulunan bir programýn yanlýþýný ayýklamak için + son derece yararlýdýr. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 4.4: HATALARI DÜZELTMEK ÝÇÝN BÝR YOL + + + ** 'eski' yerine 'yeni' yerleþtirmek için :s/eski/yeni/g yazýn. ** + + 1. Ýmleci aþaðýdaki iþaretli (--->) satýra götürün. + + 2. :s/buu/bu yazýp 'a basýn. Bu komutun sadece satýrdaki ilk karþýlaþmayý + düzelttiðine dikkat edin. + + 3. Þimdi genel olarak satýrdaki tüm deðiþikliði yapmak için :s/buu/bu/g yazýn. + +---> Buu birinci, buu ikinci, buu üçüncü bölüm. + + 4. Ýki satýr arasýndaki bir karakter katarýnýn tümünü deðiþtirmek için, + :#,#s/eski/yeni/g yazýn, burada #,# iki satýrýn sayýlarýdýr. + Tüm dosyadaki karþýlaþýlan kelimeleri deðiþtirmek için :%s/eski/yeni/g yazýn. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + DERS 4 ÖZET + + + 1. Ctrl-g sizin dosyadaki konumunuzu ve dosya durumunu gösterir. + Shift-G dosyanýn sonuna gider. Shift-G 'den önce bir sayý yazýlýrsa, o satýra + gidilir. + + 2. Bir sözcük öbeðinden önce / yazmak, ÝLERÝ yönde o öbeði aratýr. + Bir sözcük öbeðinden önce ? yazmak, GERÝ yönde o öbeði aratýr. + Bir aramadan sonra, ayný yöndeki bir sonraki karþýlaþmayý bulmak için n , + veya zýt yöndekini bulmak için Shift-N yazýn. + + 3. Ýmleç bir (,),[,],{,} parantezi üzerindeyken % yazmak, uyan diðer eþ parantezi bulur. + + 4. Bir satýrdaki ilk 'eski'yi 'yeni' ile deðiþtirmek için :s/eski/yeni yazýn. + Bir satýrdaki tüm 'eski'leri 'yeni' ile deðiþtirmek için :s/eski/yeni/g yazýn. + Ýki satýr arasýndaki öbekleri deðiþtirmek için :#,#s/eski/yeni/g yazýn. + (#'lar satýr numaralarý) + Bir dosyadaki tüm karþýlaþmalarý deðiþtirmek için :%s/eski/yeni/g yazýn. + Her seferinde onay sormasý için 'c' ekleyin. :%s/eski/yeni/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 5.1: BIR DIÞ KOMUT ÇALIÞTIRMAK + + + ** Bir dýþ komutu çalýþtýrmak için :! ve ardýndan istediðiniz dýþ komutu yazýn. ** + + 1. Ýmleci ekranýn altýna götürmek için alýþýk olduðunuz : komutunu yazýn. Bu size + bir komut yazma imkaný verir. + + 2. Þimdi ! (ünlem) karakterini yazýn. Bu size bir dýþ komut çalýþtýrma + imkaný verir. + + 3. Örnek olarak ! karakterini takiben ls yazýn ve 'a basýn. Bu size + o anda bulunduðunuz dizindeki dosyalarý gösterecektir. Veya ls çalýþmazsa :!dir + komutunu kullanýn. + +Not: Herhangi bir dýþ komutu bu yolla çalýþtýrmak mümkündür. + +Not: Tüm : komutlarýndan sonra tuþuna basýlmalýdýr. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 5.2: DOSYA YAZMAYA DEVAM + + + ** Dosyaya yapýlan deðiþikliði kaydetmek için, :w DOSYAÝSMÝ yazýn. ** + + 1. Bulunduðunuz dizini listelemek için :!dir veya :!ls yazýn. + Komuttan sonra tuþuna basýcaðýnýzý zaten biliyorsunuz. + + 2. Mevcut olmayan bir dosya ismi seçin, örneðin DENEME. + + 3. Þimdi :w DENEME yazýn (DENEME sizin seçtiðiniz dosya ismi). + + 4. Bu tüm dosyayý (Vim Tutor) DENEME isminde baþka bir dosyaya yazar. + Bunu doðrulamak için, :!dir yazýn ve yeniden bulunduðunuz dizini listeleyin. + +Not: Eðer Vim'den çýkýp kaydettiðiniz DENEME dosyasýný açarsanýz, bunun kaydettiðiniz + vimtutor'un gerçek bir kopyasý olduðunu görürsünüz. + + 5. Þimdi dosyayý þu komutlarý vererek silin (MS-DOS) :!del DENEME + (veya UNIX) :!rm DENEME + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 5.3: SEÇMELÝ YAZ KOMUTU + + + ** Dosyanýn bir bölümünü kaydetmek için, :#,# w DOSYAÝSMÝ yazýn. ** + + 1. Bir kez daha bulunduðunuz dizini görmek için :!dir veya :!ls yazýn, + ardýndan DENEME gibi uygun bir dosya ismi seçin. + + 2. Ýmleci bu sayfanýn baþýna götürün ve ardýndan CTRL-g'ye basarak satýr numarasýný + öðrenin. BU NUMARAYI UNUTMAYIN! + + 3. Þimdi sayfanýn sonuna gidib ve yine CTRL-g'ye basarak satýr numarasýný + öðrenin. BU NUMARAYI DA UNUTMAYIN! + + 4. Bir dosyaya sadece bir bölümü kaydetmek için, :#,# w DENEME yazýn. #,# sizin + baktýðýnýz sayýlar (üst,alt) ve DENEME dosyanýzýn ismidir. + + + 5. Yine, :!dir yazarak dosyanýn orada olduðuna bakýn ama SÝLMEYÝN. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 5.4: DOSYALARI BÝRLEÞTÝRMEK-BÖLÜM EKLEMEK + + + ** Bir dosyanýn içeriðini eklemek için :r DOSYAÝSMÝ yazýn. ** + + 1. DENEME dosyanýzýn önceden bulunduðundan emin olmak için :!dir yazýn. + + 2. Ýmleci bu sayfanýn baþýna yerleþtirin. + +NOT: Adým 3'ü uyguladýktan sonra Ders 5.3'ü görüyor olacaksýnýz. Daha sonra bu + derse sayfasýna dönün. + + 3. Þimdi DENEME sayfasýný :r DENEME yazarak aktarýn. + +NOT: Aktardýðýnýz dosya imlecinizin hemen altýna eklenecektir. + + 4. Dosyanýn eklendiðini görmek için, geriye gidin. Ders 5.3'ten iki kopya + olduðunu göreceksiniz; asýl ve kopya olaný. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + DERS 5 ÖZET + + + 1. :!komut bir dýþ komut çalýþtýrýr. + + Bazý yararlý örnekler: + (MS-DOS) (Unix) + :!dir :!ls - bir dizini listeler. + :!del DOSYA :!rm DOSYA - DOSYA'yý siler. + + 2. :w DOSYAÝSMÝ o anki Vim dosyasýný diske DOSYAÝSMÝ ile kaydeder. + + 3. :#,#w DOSYAÝSMÝ # ile # satýr arasýný DOSYAÝSMÝ ile kaydeder. + + 4. :r DOSYAÝSMÝ imlecin altýndan baþlayarak DOSYAÝSMÝ isimli dosyanýn içeriðini ekler. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 6.1: AÇ KOMUTU + + + ** Ýmlecin aþaðýsýna bir satýr açmak ve Insert kipine geçmek için o yazýn. ** + + 1. Ýmleci aþaðýdaki iþaretlenmiþ (--->) satýra götürün. + + 2. Ýmlecin aþaðýsýna bir satýr açmak ve Insert kipine geçmek için + o (küçük harfle) yazýn. + + 3. Þimdi iþaretlenmiþ satýrý kopyalayýn ve Insert kipinden çýkmak için + tuþuna basýn. + +---> o yazdýktan sonra imlec açýlan satýra gidicek ve Insert kipine geçilecek. + + 4. Ýmlecin üzerinde bir satýr açmak için, basitçe büyük O yazýn. Bunu aþaðýdaki + satýrda deneyin. +Bu satýrýn üzerine bir satýr açmak için imleç bu satýrdayken Shift-o yazýn. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 6.2: EKLE KOMUTU + + + ** Ýmleçten sonra metin eklemek için a yazýn. ** + + 1. Ýmleci aþaðýdaki iþaretlenmiþ (--->) satýrýn sonuna götürmek için + Normal Kipteyken $ yazýn. + + 2. Ýmlecin altýndaki karakterden sonra metin eklemek için a (küçük harfle) yazýn. + (Büyük A satýrýn sonuna ekler). + + 3. Þimdi ilk satýrý tamamlayýn. Ekle komutunun Insert kipiyle ayný iþi yaptýðýna + dikkat edin. Tek fark metinin eklendiði yer. +Ç.N: Eðer a yazarsanýz imlecin altýndaki karakterden hemen sonra ekleme yapabilirsiniz. + Eðer Shift-a yazarsanýz imleç satýr sonuna gidecek ve hemen ardýna ekleme yapabileceksiniz. + Doðal olarak bizim örneðimizde Shift-A'yý kullanmak daha güzel olacaktýr. Önce $ ardýnan a + yazmamýza gerek kalmaz. + +---> Bu satýrda çalýþabilirsiniz +---> Bu satýrda çalýþabilirsiniz. Çalýþýrken metin eklemeyi kullanýn. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 6.3: BÝR BAÞKA DEÐÝÞTÝR KOMUTU + + + ** Birden fazla karakter deðiþtirmek için büyük R yazýn. ** + + 1. Ýmleci aþaðýdaki iþaretli (--->) satýrlarýn ilkine götürün. + + 2. Ýmleci iþaretli olan ikinci satýrdakinden farklý olan ilk kelimenin + baþýna götürün. ( "tuþlarý" kelimesi ) + + 3. Þimdi büyük R yazýn ve ilk satýrý ikincisinin aynýsý yapmak için + eski metinin üzerinden yenisini yazýn. Siz yazdýkça metin deðiþecektir. + +---> Bu satýrý ikincisinin aynýsý yapmak için tuþlarý kullanýn. +---> Bu satýrý ikincisinin aynýsý yapmak için R yazýn ve metini girin. + + 4. Çýkmak için tuþuna bastýðýnýzda, deðiþmemiþ metinin aynen + kaldýðýna dikkat edin. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 6.4: SET SEÇENEÐÝ + + ** Bir seçenek ayarlayýn , böylece bir arama veya deðiþtirme ** + ** durumu görmezden gelsin. ** + + 1. 'ignore' kelimesini aramak için: + /ignore + yazýn. + Bunu n tuþuna basarak birkaç kez tekrar edin + + 2. :set ic yazarak 'ic' (Ignore case) ayarýný seçin. + + 3. Tekrar n tuþuna basarak 'ignore' kelimseini arayýn. + n tuþuna basarak bu aramayý birden çok defa tekrar edin. + + 4. :set hls is yazarak 'hlsearch' ve 'incsearch' ayarlarýný seçin. + + 5. /ignore yazarak arama komutunu tekrar verin ve ne olacaðýný görün. + + 6. Karþýlaþma vurgularýný iptal etmek için, + :nohlsearch yazýn. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + DERS 6 ÖZET + + + 1. o yazmak imlecin altýnda bir satýr açar ve imleci bu açýlmýþ satýra + Insert kipinde yerleþtirir. + Büyük O yazmak imlecin üzerinde bir satýr açar. + + 2. Ýmlecin üzerindeki karakterden hemen sonra metin eklemek için a yazýn. + Büyük A yazmak hemen satýr sonuna giderek metin eklemeye hazýr hale getirir. + + 3. Büyük R yazmak Deðiþtir kipine girer ve çýkmak için tuþuna + basýlana kadar sizi bu kipte býrakýr. + + 4. ":set xxx" yazmak "xxx" seçeneðini ayarlar. + + + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 7: ÇEVÝRÝMÝÇÝ (ON-LINE) YARDIM KOMUTLARI + + + ** Çevirimiçi yardým sistemini kullanýn ** + + Vim geniþ bir çevirimiçi yardým sistemine sahiptir. Baþlamak için þu üçünü + deneyebilirsiniz. + - (eðer sahipseniz) tuþuna basýn + - (eðer sahipseniz) tuþuna basýn + - :help yazýn ve tuþuna basýn + + Yardým penceresini kapatmak için :q yazýp tuþuna basýn. + + ":help" komutuna deðiþken (argüman) vererek herhangi bir konu hakkýnda + yardým alabilirsini. Þunlarý deneyin ( tuþuna basmayý unutmayýn) : + + :help w + :help c_ gördüğünüz yerde bu tuÅŸa basmanız gerekir. + + ** İmleci hareket ettirmek için, h,j,k,l tuÅŸlarına gösterildiÄŸi gibi basın. ** + ^ + k İpucu: h tuÅŸu soldadır ve sola hareket eder. + < h l > l tuÅŸu saÄŸdadır ve saÄŸa hareket eder. + j j tuÅŸu aÅŸağı yönlü bir ok gibidir. + v + 1. Yeterli hissedinceye kadar imleci ekranda hareket ettirin. + + 2. AÅŸağı tuÅŸunu (j) tekrar edene kadar basılı tutun. +---> Åžimdi, bir sonraki derse nasıl geçeceÄŸinizi biliyorsunuz. + + 3. AÅŸağı tuÅŸunu kullanarak, Ders 1.2'ye geçin. + Not: EÄŸer yazdığınız bir ÅŸeyden emin deÄŸilseniz, Normal kipe geçmek için tuÅŸuna basın. + Daha sonra istediÄŸiniz komutu yeniden yazın. + Not: İmleç tuÅŸları da aynı zamanda iÅŸe yararlar ancak hjkl tuÅŸlarını kullanmaya alıştığınızda etrafta daha hızlı + hareket edersiniz. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 1.2: VIM'E GİRİŞ VE VIM'DEN ÇIKIÅž + + + !! NOT: AÅŸağıdaki adımları yapmadan önce, bu dersi tamamen okuyun. + + 1. tuÅŸuna basın (Normal kipte olmayı garantilemek için). + + 2. Yazın: :q! . + +---> Bu düzenleyicinin yaptığınız deÄŸiÅŸiklikleri KAYDETMEDEN kapanmasını saÄŸlar. + EÄŸer yaptıklarınızın kaydedilmesini istiyorsanız ÅŸunu yazın: + :wq + + 3. Kabuk istemcisini (shell prompt) gördüğünüzde, sizi bu eÄŸitmene getiren + komutu yazın. Bu: vimtutor komutudur. + Normalde: vim tutor komutu kullanılır. +---> 'vim' vim düzenleyicisine gir anlamına gelir, 'tutor' ise açmak istediÄŸiniz dosyadır. + + 4. EÄŸer bu adımları ezberlediyseniz ve kendinizden eminseniz, 1'den 3'e kadar olan adımları, + düzenleyiciden çıkmak ve yeniden girmek için uygulayın. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 1.3: METİN DÜZENLEME - SİLME + + +** Normal kipteyken imlecin altındaki karakteri silmek için x 'e basın.** + + 1. İmleci aÅŸağıda iÅŸaretlenmiÅŸ (-->) satıra götürün. + + 2. Hataları düzeltmek için, imleci silinmesi gereken karakterin üzerine getirin + + 3. İstenmeyen karakteri silmek için x tuÅŸuna basın. + + 4. Cümle düzelene kadar 2'den 4'e kadar olan adımları tekrar edin. + +---> İinek ayyın üzzerinden attladı. + + 5. Åžimdi satır düzeldi, Ders 1.4'e geçin. + +NOT: Bu eÄŸitmende ilerledikçe ezberlemeye çalışmayın, kullanarak öğrenin. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 1.4: METİN DÜZENLEME - EKLEME + + + ** Normal kipteyken metin eklemek için i 'ye basın. ** + + 1. İmleci aÅŸağıdaki iÅŸaretlenmiÅŸ (-->) ilk satıra götürün. + + 2. İlk satırı ikincisinin aynısı gibi yapmak için, imleci eklenmesi gereken + metinden sonraki ilk karakterin üzerine götürün. + + 3. i 'ye basın ve gerekli eklemeleri yapın. + + 4. Her hata düzeltildiÄŸinde tuÅŸuna basarak Normal kipe dönün. + Cümleyi düzeltmek için 2'den 4'e kadar olan adımları tekrar edin. + +---> Bu metinde eksk. +---> Bu metinde birÅŸey eksik. + + 5. Metin ekleme çalışmalarını yeterli görüyorsanız aÅŸağıdaki özete geçin. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + DERS 1 ÖZET + + + 1. İmleç hem ok tuÅŸları hem de hjkl tuÅŸları ile hareket ettirilir. + h (sol) j (aÅŸağı) k (yukarı) l (saÄŸ) + + 2. (Konsoldan) Vim'e girmek içn yazın: vim DOSYAİSMİ + + 3. Tüm deÄŸiÅŸiklikleri göz ardı edip vimden çıkmak için yazın: + :q! + veya tüm deÄŸiÅŸiklikleri kaydetmek için yazın: + :wq + + 4. İmlecin altındaki bir karakteri silmek için Normal kipte x yazın. + + 5. İmlecin altında metin eklemek için Normal kipte yazın: + i yazılacak metin + +NOT: tuÅŸuna basmak sizi Normal kipe götürür ya da istenmeyen tamamlanmamış bir komutu + iptal eder. + +Åžimdi Ders 2 ile devam edin. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 2.1: SİLME KOMUTLARI + + ** Bir kelimeyi silmek için dw yazın.** + + 1. Normal kipte olmakten emin olmak için tuÅŸuna basın. + + 2. İmleci aÅŸağıdaki iÅŸaretlenmiÅŸ (-->) satıra götürün. + + 3. İmleci silinmesi gereken kelimenin başına götürün. + + 4. Kelimeyi silmek için dw yazın. + + NOT: dw harfleri siz yazdıkça ekranın son satırında görülecektir. + EÄŸer yanlış bir ÅŸeyler yazarsanız, yeniden baÅŸlamak için tuÅŸuna basın. + +---> Bu satırda çerez cümleye ait olmayan leblebi kelimeler var. + + + 5. Cümle düzelene kadar adım 3 ve 4'ü tekrar edin, daha sonra Ders 2.2'ye gidin. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 2.2: DAHA FAZLA SİLME KOMUTU + + + ** Satırı sonuna kadar silmek için d$ yazın.** + + 1. Normal kipte olmaktan emin olmak için tuÅŸuna basın. + + 2. İmleci aÅŸağıdaki iÅŸaretlenmiÅŸ (-->) satıra götürün. + + 3. İmleci doÄŸru olan satırın sonuna götürün. (Birinciden SONRA. ) + + 4. Satırı sonuna kadar silmek için d$ yazın. + ( d$ yazarken d'den sonra ile beraber $ tuÅŸuna basın) + +---> Birileri bu satırın sonunu iki defa yazmış. Birileri bu satırın sonunu iki defa yazmış. + + 5. Neler olduÄŸunu anlamak için Ders 2.3'e gidin. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 2.3: KOMUTLAR VE NESNELER + + + d silme komutu için biçim aÅŸağıdaki gibidir: + + [sayı] d nesne VEYA d [sayı] nesne + Burada: + sayı - komutun kaç defa çalıştırlacağı (isteÄŸe baÄŸlı, varsayılan=1). + d - silme komutu + nesne - komutun ne ÅŸekilde çalışacağı (aÅŸağıda listlendi). + + Nesnelerin kısa bir listesi. + w - BoÅŸluÄŸu da içererek, imleçten itibaren kelimenin sonuna kadar. + e - BoÅŸluÄŸu İÇERMEDEN, imleçten itibaren kelimenin sonuna kadar. + $ - imleçten satırın sonuna kadar. + +NOT: Serüven sevenler için, Normal kipte iken, komut olmadan sadece nesnenin kendisine basmak + imleci yukardaki listede olduÄŸu gibi hareket ettirecektir. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 2.4: 'KOMUT-NESNE'ye BİR İSTİSNA + + + ** Bütün bir satırı silmek için dd yazın. ** + + Bütün bir satır silme sıklığından dolayı, Vi tasarımcıları bir satırı + tamamen silmek için iki d yazmanın daha kolay olacağına karar verdiler. + + 1. İmleci aÅŸağıdaki tümceciÄŸin ikinci satırına götürün. + 2. Satırı silmek için dd yazın. + 3. Åžimdi de dördüncü satıra gidin. + 4. İki satırı birden silmek için 2dd (sayı-komut-nesne'yi hatırlayın) yazın. + + 1) Güller kırmızıdır, + 2) Çamur eÄŸlenceli, + 3) MenekÅŸeler mavi, + 4) Bir arabam var, + 5) Saat bana söyler, + 6) Åžeker tatlıdır + 7) Ve sen de öylesin + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 2.5: GERİ AL KOMUTU + + + ** Son komutu geri almak için u , bütün bir satırı düzeltmek için U yazın.** + + 1. İmleci aÅŸağıdaki iÅŸaretlenmiÅŸ (-->) satırdaki ilk hatanın üzerine götürün. + 2. İlk istenmeyen karakteri silmek için x yazın. + 3. Åžimdi son çalıştırılan komutu geri almak için u yazın. + 4. Bu sefer x komutunu kullanarak satırdaki tüm hataları düzeltin. + 5. Åžimdi satırı ilk haline çevirmek için büyük U yazın. + 6. Åžimdi U ve daha önceki komutları geri almak için birkaç defa u yazın. + 7. Åžimdi birkaç defa CTRL-R (CTRL'yi basılı tutarken R ye basın) yazarak geri almaları da geri alın. + +---> Buu satıırdaki hataları düüzeltinn ve sonra koomutu geri alllın. + + 8. Bunlar son derece kullanışlı komutlardır. Åžimdi Ders 2 Özete geçin. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + DERS 2 ÖZET + + + 1. İmleçten itibaren bir kelimeyi silmek için yazın: dw + + 2. İmleçten itibaren bir satırı silmek için yazın: d$ + + 3. Bütün bir satırı silmek için yazın: dd + + 4. Normal kipte bir komut biçimi şöyledir: + + [sayı] komut nesne VEYA komut [sayı] nesne + burada: + sayı - komutun kaç kere tekrar edeceÄŸi + komut - ne yapılacağı, silmek için d olduÄŸu gibi + nesne - komutun nasıl davranacağı, w (kelime), $ (satır sonu), vb gibi. + + 5. Önceki hareketleri geri almak için yazın: u (küçük u) + Bir satırdaki tüm deÄŸiÅŸiklikleri geri almak için yazın: U (büyük u) + Geri almaları geri almak için yazın: CTRL-R + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 3.1: KOY KOMUTU + + + ** Son yaptığınız silme iÅŸlemini imleçten sona geri yerleÅŸtirmek için p yazın.** + + 1. İmleci aÅŸağıdaki tümceciÄŸin ilk satırına götürün. + + 2. Satırı silip Vim'in tamponuna yerleÅŸtirmek için dd yazın. + + 3. İmleci, silinmiÅŸ satırı nereye yerleÅŸtirmek istiyorsanız, o satırın ÜZERİNE götürün. + + 4. Normal kipteyken, satırı yerleÅŸtirmek için p yazın. + + 5. Tüm satırları doÄŸru sıraya koymak için 2'den 4'e kadar olan adımları tekrar edin. + + d) Sen de öğrendin mi? + b) MenekÅŸeler mavidir, + c) Akıl öğrenilir, + a) Güller kırmızıdır, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 3.2: YERLEÅžTİR KOMUTU + + + ** İmlecin altında bir karakter yerleÅŸtirmek için r yazın.** + + 1. İmleci aÅŸağıdaki iÅŸaretlenmiÅŸ(--->) ilk satıra götürün. + + 2. İmleci satırdaki ilk hatanın üzerine götürün. + + 3. Hatayı düzeltmek için önce r ardından da doÄŸru karakteri yazın. + + 4. İlk satır düzelene kadar adım 2 ve 3'ü tekrar edin. + +---> Bu satıv yazılıvken, bivileri yamlış tuÅŸtara basmış. +---> Bu satır yazılırken, birileri yanlış tuÅŸlara basmış. + + 5. Ders 3.2'ye geçin. + +NOT: Unutmayın, ezberleyerek deÄŸil kullanarak öğrenin. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 3.3: DEĞİŞTİR KOMUTU + + + ** Bir kelimenin tamamını veya parçasını deÄŸiÅŸtirmek için cw yazın. + + 1. İmleci aÅŸağıdaki iÅŸaretlenmiÅŸ(--->) satıra götürün. + + 2. İmleci "sutar" daki u'nun üzerine yerleÅŸtirin. + + 3. Önce cw ardından doÄŸru kelimeyi girin (bu durumda 'atır'.) + + 4. tuÅŸuna basın ve bir sonraki hataya gidin (deÄŸiÅŸmesi gereken ilk karakter.) + + 5. İlk cümle ikincisiyle aynı olana kadar adım 3 ve 4'ü tekrar edin. + +---> Bu sutar deÄŸiÅŸtir komutu ile deÄŸiÅŸneli gereken birkaç petime içeriyor. +---> Bu satır deÄŸiÅŸtir komutu ile deÄŸiÅŸmesi gereken birkaç kelime içeriyor. + +cw'nin sadece kelimeyi deÄŸiÅŸtirmediÄŸini, aynı zamanda sizi insert kipine götürdüğüne de dikkat edin. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 3.4: c'Yİ KULLANARAK DAHA FAZLA DEĞİŞTİRME + + + ** DeÄŸiÅŸtir komutu sil komutu ile aynı nesnelerle kullanılır.** + + 1. DeÄŸiÅŸtir komutu sil ile aynı yolla çalışır. Biçim şöyledir: + + [sayı] c nesne VEYA c [sayı] nesne + + 2. Nesneler de aynı zamanda aynıdır. ÖrneÄŸin w (word), $ (satır sonu), vb. gibi. + + 3. AÅŸağıdaki iÅŸaretlenmiÅŸ(--->) ilk satıra gidin. + + 4. İmleci ilk hataya götürün. + + 5. Satırın geri kalan kısmını ikincisi gibi yapmak için c$ yazın ve daha sonra tuÅŸuna basın. + +---> Bu satırın sonu düzeltilmek için biraz yardıma ihtiyaç duyuyor. +---> Bu satırın sonu düzeltilmek için c$ komutu kullanılarak yardıma ihtiyaç duyuyor. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + DERS 3 ÖZET + + + 1. SilinmiÅŸ olan bir metini geri yerleÅŸtirmek için p yazın. Bu silinmiÅŸ metini + imleçten hemen SONRA geri yerleÅŸtirir (eÄŸer bir satır silinmiÅŸse hemen imleçten sonra, alta + yerleÅŸtirilecektir) + + 2. İmlecin altındaki karakteri deÄŸiÅŸtirmek için önce r ardından da + asıl karakteri yazın. + + 3. DeÄŸiÅŸtir komutu belirlenen nesneyi, imleçten nesnenin sonuna kadar deÄŸiÅŸtirme imkanı verir. + ÖrneÄŸin, bir kelimeyi imleçten sonuna kadar deÄŸiÅŸtirmek için cw , bir satırın tamamını + deÄŸiÅŸtirmek içinse c$ yazın. + + 4. DeÄŸiÅŸtir için biçim şöyledir: + + [sayı] c nesne VEYA c [sayı] nesne + +Åžimdi bir sonraki derse geçin. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 4.1: KONUM VE DOSYA DURUMU + + + ** Dosya içerisindeki konumunuzu ve dosyanın durumunu görmek için CTRL-g yazın. ** + ** Dosya içerisindeki bir satıra gitmek için SHIFT-g yazın. ** + + Not: Adımlardan herhangi birini yapmadan önce dersin tamamını okuyun!! + + 1. Ctrl tuÅŸunu basılı tutun ve g'ye basın. Dosyanın sonunda dosya ismini ve bulunduÄŸunuz konumu + gösteren bir durum satırı görünecektir. Adım 3 için satır numarasını + unutmayın. + + 2. Dosyanın sonuna gitmek için shift-G 'ye basın. + + 3. Daha önce bulunduÄŸunuz satır numarasını yazın ve daha sonra shift-G 'ye basın. + Bu sizi daha önce bulunduÄŸunuz ve Ctrl-g 'ye bastığınız satıra geri götürecektir. + (Sayılar yazılırken ekranda GÖRÜNMEYECEKLERDİR.) + + 4. YapabileceÄŸinizi düşündüğünüzde, adım 1'den 3'e kadar yapın. + + Ç.N: Bu kısım orijinal metinde de biraz eksik anlatılmış gibi. Bir satır hakkında bilgi almak için + Ctrl-g'yi kullanın. Herhangi bir satıra gitmek içinse, önce satır numarasını yazın ve ardınan + shift-g'ye basın. Satır numarası girmeden basılan shift-g sizi satır sonuna götürür. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 4.2: ARAMA KOMUTU + + + ** Bir kelime öbeÄŸini aramak için / ile beraber kelime öbeÄŸini girin. ** + + 1. Normal kipteyken / karakterini yazın. Komut bölümü yerine / karakterinin ve + imlecin ekranın sonunda göründüğüne dikkat edin. + + 2. Åžimdi, 'hatttaa' yazıp 'a basın. Bu sizin aramak istediÄŸiniz kelime. + + 3. Aynı kelime öbeÄŸini tekrar aramak için, basitçe n yazın. + Aynı kelime öbeÄŸini zıt yönde aramak için, Shift-N yazın. + + 4. EÄŸer zıt yöne doÄŸru bir arama yapmak istiyorsanız, / komutu yerine + ? komutunu kullanın. + +---> "hatttaa" hatayı yazmanın doÄŸru yolu deÄŸil; hatttaa bir hata. + +Not: Arama dosyanın sonuna ulaÅŸtığında, tekrar baÅŸtan baÅŸlayacaktır. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 4.3: UYAN PARANTEZ ARAMASI + + + ** Uyan bir ),] veya } bulmak için % yazın. ** + + 1. İmleci iÅŸaretli (--->) satırdaki herhangi bir (, [ veya { karakterinin + üzerine götürün. + + 2. Åžimdi % karakterini yazın. + + 3. İmleç uyan parantez veya ayracın üzerine gider. + + 4. Uyan ilk parantezin üzerine geri dönmek için yine % yazın. + +---> Bu ( içerisinde ('ler, ['ler ] ve {'ler } bulunan bir satırdır. )) + +Not: Bu içerisinde uymayan parantezler bulunan bir programın yanlışını ayıklamak için + son derece yararlıdır. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 4.4: HATALARI DÜZELTMEK İÇİN BİR YOL + + + ** 'eski' yerine 'yeni' yerleÅŸtirmek için :s/eski/yeni/g yazın. ** + + 1. İmleci aÅŸağıdaki iÅŸaretli (--->) satıra götürün. + + 2. :s/buu/bu yazıp 'a basın. Bu komutun sadece satırdaki ilk karşılaÅŸmayı + düzelttiÄŸine dikkat edin. + + 3. Åžimdi genel olarak satırdaki tüm deÄŸiÅŸikliÄŸi yapmak için :s/buu/bu/g yazın. + +---> Buu birinci, buu ikinci, buu üçüncü bölüm. + + 4. İki satır arasındaki bir karakter katarının tümünü deÄŸiÅŸtirmek için, + :#,#s/eski/yeni/g yazın, burada #,# iki satırın sayılarıdır. + Tüm dosyadaki karşılaşılan kelimeleri deÄŸiÅŸtirmek için :%s/eski/yeni/g yazın. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + DERS 4 ÖZET + + + 1. Ctrl-g sizin dosyadaki konumunuzu ve dosya durumunu gösterir. + Shift-G dosyanın sonuna gider. Shift-G 'den önce bir sayı yazılırsa, o satıra + gidilir. + + 2. Bir sözcük öbeÄŸinden önce / yazmak, İLERİ yönde o öbeÄŸi aratır. + Bir sözcük öbeÄŸinden önce ? yazmak, GERİ yönde o öbeÄŸi aratır. + Bir aramadan sonra, aynı yöndeki bir sonraki karşılaÅŸmayı bulmak için n , + veya zıt yöndekini bulmak için Shift-N yazın. + + 3. İmleç bir (,),[,],{,} parantezi üzerindeyken % yazmak, uyan diÄŸer eÅŸ parantezi bulur. + + 4. Bir satırdaki ilk 'eski'yi 'yeni' ile deÄŸiÅŸtirmek için :s/eski/yeni yazın. + Bir satırdaki tüm 'eski'leri 'yeni' ile deÄŸiÅŸtirmek için :s/eski/yeni/g yazın. + İki satır arasındaki öbekleri deÄŸiÅŸtirmek için :#,#s/eski/yeni/g yazın. + (#'lar satır numaraları) + Bir dosyadaki tüm karşılaÅŸmaları deÄŸiÅŸtirmek için :%s/eski/yeni/g yazın. + Her seferinde onay sorması için 'c' ekleyin. :%s/eski/yeni/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 5.1: BIR DIÅž KOMUT ÇALIÅžTIRMAK + + + ** Bir dış komutu çalıştırmak için :! ve ardından istediÄŸiniz dış komutu yazın. ** + + 1. İmleci ekranın altına götürmek için alışık olduÄŸunuz : komutunu yazın. Bu size + bir komut yazma imkanı verir. + + 2. Åžimdi ! (ünlem) karakterini yazın. Bu size bir dış komut çalıştırma + imkanı verir. + + 3. Örnek olarak ! karakterini takiben ls yazın ve 'a basın. Bu size + o anda bulunduÄŸunuz dizindeki dosyaları gösterecektir. Veya ls çalışmazsa :!dir + komutunu kullanın. + +Not: Herhangi bir dış komutu bu yolla çalıştırmak mümkündür. + +Not: Tüm : komutlarından sonra tuÅŸuna basılmalıdır. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 5.2: DOSYA YAZMAYA DEVAM + + + ** Dosyaya yapılan deÄŸiÅŸikliÄŸi kaydetmek için, :w DOSYAİSMİ yazın. ** + + 1. BulunduÄŸunuz dizini listelemek için :!dir veya :!ls yazın. + Komuttan sonra tuÅŸuna basıcağınızı zaten biliyorsunuz. + + 2. Mevcut olmayan bir dosya ismi seçin, örneÄŸin DENEME. + + 3. Åžimdi :w DENEME yazın (DENEME sizin seçtiÄŸiniz dosya ismi). + + 4. Bu tüm dosyayı (Vim Tutor) DENEME isminde baÅŸka bir dosyaya yazar. + Bunu doÄŸrulamak için, :!dir yazın ve yeniden bulunduÄŸunuz dizini listeleyin. + +Not: EÄŸer Vim'den çıkıp kaydettiÄŸiniz DENEME dosyasını açarsanız, bunun kaydettiÄŸiniz + vimtutor'un gerçek bir kopyası olduÄŸunu görürsünüz. + + 5. Åžimdi dosyayı ÅŸu komutları vererek silin (MS-DOS) :!del DENEME + (veya UNIX) :!rm DENEME + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 5.3: SEÇMELİ YAZ KOMUTU + + + ** Dosyanın bir bölümünü kaydetmek için, :#,# w DOSYAİSMİ yazın. ** + + 1. Bir kez daha bulunduÄŸunuz dizini görmek için :!dir veya :!ls yazın, + ardından DENEME gibi uygun bir dosya ismi seçin. + + 2. İmleci bu sayfanın başına götürün ve ardından CTRL-g'ye basarak satır numarasını + öğrenin. BU NUMARAYI UNUTMAYIN! + + 3. Åžimdi sayfanın sonuna gidib ve yine CTRL-g'ye basarak satır numarasını + öğrenin. BU NUMARAYI DA UNUTMAYIN! + + 4. Bir dosyaya sadece bir bölümü kaydetmek için, :#,# w DENEME yazın. #,# sizin + baktığınız sayılar (üst,alt) ve DENEME dosyanızın ismidir. + + + 5. Yine, :!dir yazarak dosyanın orada olduÄŸuna bakın ama SİLMEYİN. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 5.4: DOSYALARI BİRLEÅžTİRMEK-BÖLÜM EKLEMEK + + + ** Bir dosyanın içeriÄŸini eklemek için :r DOSYAİSMİ yazın. ** + + 1. DENEME dosyanızın önceden bulunduÄŸundan emin olmak için :!dir yazın. + + 2. İmleci bu sayfanın başına yerleÅŸtirin. + +NOT: Adım 3'ü uyguladıktan sonra Ders 5.3'ü görüyor olacaksınız. Daha sonra bu + derse sayfasına dönün. + + 3. Åžimdi DENEME sayfasını :r DENEME yazarak aktarın. + +NOT: Aktardığınız dosya imlecinizin hemen altına eklenecektir. + + 4. Dosyanın eklendiÄŸini görmek için, geriye gidin. Ders 5.3'ten iki kopya + olduÄŸunu göreceksiniz; asıl ve kopya olanı. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + DERS 5 ÖZET + + + 1. :!komut bir dış komut çalıştırır. + + Bazı yararlı örnekler: + (MS-DOS) (Unix) + :!dir :!ls - bir dizini listeler. + :!del DOSYA :!rm DOSYA - DOSYA'yı siler. + + 2. :w DOSYAİSMİ o anki Vim dosyasını diske DOSYAİSMİ ile kaydeder. + + 3. :#,#w DOSYAİSMİ # ile # satır arasını DOSYAİSMİ ile kaydeder. + + 4. :r DOSYAİSMİ imlecin altından baÅŸlayarak DOSYAİSMİ isimli dosyanın içeriÄŸini ekler. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 6.1: AÇ KOMUTU + + + ** İmlecin aÅŸağısına bir satır açmak ve Insert kipine geçmek için o yazın. ** + + 1. İmleci aÅŸağıdaki iÅŸaretlenmiÅŸ (--->) satıra götürün. + + 2. İmlecin aÅŸağısına bir satır açmak ve Insert kipine geçmek için + o (küçük harfle) yazın. + + 3. Åžimdi iÅŸaretlenmiÅŸ satırı kopyalayın ve Insert kipinden çıkmak için + tuÅŸuna basın. + +---> o yazdıktan sonra imlec açılan satıra gidicek ve Insert kipine geçilecek. + + 4. İmlecin üzerinde bir satır açmak için, basitçe büyük O yazın. Bunu aÅŸağıdaki + satırda deneyin. +Bu satırın üzerine bir satır açmak için imleç bu satırdayken Shift-o yazın. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 6.2: EKLE KOMUTU + + + ** İmleçten sonra metin eklemek için a yazın. ** + + 1. İmleci aÅŸağıdaki iÅŸaretlenmiÅŸ (--->) satırın sonuna götürmek için + Normal Kipteyken $ yazın. + + 2. İmlecin altındaki karakterden sonra metin eklemek için a (küçük harfle) yazın. + (Büyük A satırın sonuna ekler). + + 3. Åžimdi ilk satırı tamamlayın. Ekle komutunun Insert kipiyle aynı iÅŸi yaptığına + dikkat edin. Tek fark metinin eklendiÄŸi yer. +Ç.N: EÄŸer a yazarsanız imlecin altındaki karakterden hemen sonra ekleme yapabilirsiniz. + EÄŸer Shift-a yazarsanız imleç satır sonuna gidecek ve hemen ardına ekleme yapabileceksiniz. + DoÄŸal olarak bizim örneÄŸimizde Shift-A'yı kullanmak daha güzel olacaktır. Önce $ ardınan a + yazmamıza gerek kalmaz. + +---> Bu satırda çalışabilirsiniz +---> Bu satırda çalışabilirsiniz. Çalışırken metin eklemeyi kullanın. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 6.3: BİR BAÅžKA DEĞİŞTİR KOMUTU + + + ** Birden fazla karakter deÄŸiÅŸtirmek için büyük R yazın. ** + + 1. İmleci aÅŸağıdaki iÅŸaretli (--->) satırların ilkine götürün. + + 2. İmleci iÅŸaretli olan ikinci satırdakinden farklı olan ilk kelimenin + başına götürün. ( "tuÅŸları" kelimesi ) + + 3. Åžimdi büyük R yazın ve ilk satırı ikincisinin aynısı yapmak için + eski metinin üzerinden yenisini yazın. Siz yazdıkça metin deÄŸiÅŸecektir. + +---> Bu satırı ikincisinin aynısı yapmak için tuÅŸları kullanın. +---> Bu satırı ikincisinin aynısı yapmak için R yazın ve metini girin. + + 4. Çıkmak için tuÅŸuna bastığınızda, deÄŸiÅŸmemiÅŸ metinin aynen + kaldığına dikkat edin. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 6.4: SET SEÇENEĞİ + + ** Bir seçenek ayarlayın , böylece bir arama veya deÄŸiÅŸtirme ** + ** durumu görmezden gelsin. ** + + 1. 'ignore' kelimesini aramak için: + /ignore + yazın. + Bunu n tuÅŸuna basarak birkaç kez tekrar edin + + 2. :set ic yazarak 'ic' (Ignore case) ayarını seçin. + + 3. Tekrar n tuÅŸuna basarak 'ignore' kelimseini arayın. + n tuÅŸuna basarak bu aramayı birden çok defa tekrar edin. + + 4. :set hls is yazarak 'hlsearch' ve 'incsearch' ayarlarını seçin. + + 5. /ignore yazarak arama komutunu tekrar verin ve ne olacağını görün. + + 6. KarşılaÅŸma vurgularını iptal etmek için, + :nohlsearch yazın. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + DERS 6 ÖZET + + + 1. o yazmak imlecin altında bir satır açar ve imleci bu açılmış satıra + Insert kipinde yerleÅŸtirir. + Büyük O yazmak imlecin üzerinde bir satır açar. + + 2. İmlecin üzerindeki karakterden hemen sonra metin eklemek için a yazın. + Büyük A yazmak hemen satır sonuna giderek metin eklemeye hazır hale getirir. + + 3. Büyük R yazmak DeÄŸiÅŸtir kipine girer ve çıkmak için tuÅŸuna + basılana kadar sizi bu kipte bırakır. + + 4. ":set xxx" yazmak "xxx" seçeneÄŸini ayarlar. + + + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Ders 7: ÇEVİRİMİÇİ (ON-LINE) YARDIM KOMUTLARI + + + ** Çevirimiçi yardım sistemini kullanın ** + + Vim geniÅŸ bir çevirimiçi yardım sistemine sahiptir. BaÅŸlamak için ÅŸu üçünü + deneyebilirsiniz. + - (eÄŸer sahipseniz) tuÅŸuna basın + - (eÄŸer sahipseniz) tuÅŸuna basın + - :help yazın ve tuÅŸuna basın + + Yardım penceresini kapatmak için :q yazıp tuÅŸuna basın. + + ":help" komutuna deÄŸiÅŸken (argüman) vererek herhangi bir konu hakkında + yardım alabilirsini. Åžunları deneyin ( tuÅŸuna basmayı unutmayın) : + + :help w + :help c_ The l key is at the right and moves right. + j The j key looks like a down arrow. + v + 1. Move the cursor around the screen until you are comfortable. + + 2. Hold down the down key (j) until it repeats. + Now you know how to move to the next lesson. + + 3. Using the down key, move to Lesson 1.2. + +NOTE: If you are ever unsure about something you typed, press to place + you in Normal mode. Then retype the command you wanted. + +NOTE: The cursor keys should also work. But using hjkl you will be able to + move around much faster, once you get used to it. Really! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 1.2: EXITING VIM + + + !! NOTE: Before executing any of the steps below, read this entire lesson!! + + 1. Press the key (to make sure you are in Normal mode). + + 2. Type: :q! . + This exits the editor, DISCARDING any changes you have made. + + 3. When you see the shell prompt, type the command that got you into this + tutor. That would be: vimtutor + + 4. If you have these steps memorized and are confident, execute steps + 1 through 3 to exit and re-enter the editor. + +NOTE: :q! discards any changes you made. In a few lessons you + will learn how to save the changes to a file. + + 5. Move the cursor down to Lesson 1.3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 1.3: TEXT EDITING - DELETION + + + ** Press x to delete the character under the cursor. ** + + 1. Move the cursor to the line below marked --->. + + 2. To fix the errors, move the cursor until it is on top of the + character to be deleted. + + 3. Press the x key to delete the unwanted character. + + 4. Repeat steps 2 through 4 until the sentence is correct. + +---> The ccow jumpedd ovverr thhe mooon. + + 5. Now that the line is correct, go on to Lesson 1.4. + +NOTE: As you go through this tutor, do not try to memorize, learn by usage. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 1.4: TEXT EDITING - INSERTION + + + ** Press i to insert text. ** + + 1. Move the cursor to the first line below marked --->. + + 2. To make the first line the same as the second, move the cursor on top + of the first character AFTER where the text is to be inserted. + + 3. Press i and type in the necessary additions. + + 4. As each error is fixed press to return to Normal mode. + Repeat steps 2 through 4 to correct the sentence. + +---> There is text misng this . +---> There is some text missing from this line. + + 5. When you are comfortable inserting text move to lesson 1.5. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 1.5: TEXT EDITING - APPENDING + + + ** Press A to append text. ** + + 1. Move the cursor to the first line below marked --->. + It does not matter on what character the cursor is in that line. + + 2. Press A and type in the necessary additions. + + 3. As the text has been appended press to return to Normal mode. + + 4. Move the cursor to the second line marked ---> and repeat + steps 2 and 3 to correct this sentence. + +---> There is some text missing from th + There is some text missing from this line. +---> There is also some text miss + There is also some text missing here. + + 5. When you are comfortable appending text move to lesson 1.6. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 1.6: EDITING A FILE + + ** Use :wq to save a file and exit. ** + + !! NOTE: Before executing any of the steps below, read this entire lesson!! + + 1. Exit this tutor as you did in lesson 1.2: :q! + Or, if you have access to another terminal, do the following there. + + 2. At the shell prompt type this command: vim tutor + 'vim' is the command to start the Vim editor, 'tutor' is the name of the + file you wish to edit. Use a file that may be changed. + + 3. Insert and delete text as you learned in the previous lessons. + + 4. Save the file with changes and exit Vim with: :wq + + 5. If you have quit vimtutor in step 1 restart the vimtutor and move down to + the following summary. + + 6. After reading the above steps and understanding them: do it. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 1 SUMMARY + + + 1. The cursor is moved using either the arrow keys or the hjkl keys. + h (left) j (down) k (up) l (right) + + 2. To start Vim from the shell prompt type: vim FILENAME + + 3. To exit Vim type: :q! to trash all changes. + OR type: :wq to save the changes. + + 4. To delete the character at the cursor type: x + + 5. To insert or append text type: + i type inserted text insert before the cursor + A type appended text append after the line + +NOTE: Pressing will place you in Normal mode or will cancel + an unwanted and partially completed command. + +Now continue with Lesson 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.1: DELETION COMMANDS + + + ** Type dw to delete a word. ** + + 1. Press to make sure you are in Normal mode. + + 2. Move the cursor to the line below marked --->. + + 3. Move the cursor to the beginning of a word that needs to be deleted. + + 4. Type dw to make the word disappear. + + NOTE: The letter d will appear on the last line of the screen as you type + it. Vim is waiting for you to type w . If you see another character + than d you typed something wrong; press and start over. + +---> There are a some words fun that don't belong paper in this sentence. + + 5. Repeat steps 3 and 4 until the sentence is correct and go to Lesson 2.2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.2: MORE DELETION COMMANDS + + + ** Type d$ to delete to the end of the line. ** + + 1. Press to make sure you are in Normal mode. + + 2. Move the cursor to the line below marked --->. + + 3. Move the cursor to the end of the correct line (AFTER the first . ). + + 4. Type d$ to delete to the end of the line. + +---> Somebody typed the end of this line twice. end of this line twice. + + + 5. Move on to Lesson 2.3 to understand what is happening. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.3: ON OPERATORS AND MOTIONS + + + Many commands that change text are made from an operator and a motion. + The format for a delete command with the d delete operator is as follows: + + d motion + + Where: + d - is the delete operator. + motion - is what the operator will operate on (listed below). + + A short list of motions: + w - until the start of the next word, EXCLUDING its first character. + e - to the end of the current word, INCLUDING the last character. + $ - to the end of the line, INCLUDING the last character. + + Thus typing de will delete from the cursor to the end of the word. + +NOTE: Pressing just the motion while in Normal mode without an operator will + move the cursor as specified. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.4: USING A COUNT FOR A MOTION + + + ** Typing a number before a motion repeats it that many times. ** + + 1. Move the cursor to the start of the line marked ---> below. + + 2. Type 2w to move the cursor two words forward. + + 3. Type 3e to move the cursor to the end of the third word forward. + + 4. Type 0 (zero) to move to the start of the line. + + 5. Repeat steps 2 and 3 with different numbers. + +---> This is just a line with words you can move around in. + + 6. Move on to Lesson 2.5. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.5: USING A COUNT TO DELETE MORE + + + ** Typing a number with an operator repeats it that many times. ** + + In the combination of the delete operator and a motion mentioned above you + insert a count before the motion to delete more: + d number motion + + 1. Move the cursor to the first UPPER CASE word in the line marked --->. + + 2. Type d2w to delete the two UPPER CASE words + + 3. Repeat steps 1 and 2 with a different count to delete the consecutive + UPPER CASE words with one command + +---> this ABC DE line FGHI JK LMN OP of words is Q RS TUV cleaned up. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.6: OPERATING ON LINES + + + ** Type dd to delete a whole line. ** + + Due to the frequency of whole line deletion, the designers of Vi decided + it would be easier to simply type two d's to delete a line. + + 1. Move the cursor to the second line in the phrase below. + 2. Type dd to delete the line. + 3. Now move to the fourth line. + 4. Type 2dd to delete two lines. + +---> 1) Roses are red, +---> 2) Mud is fun, +---> 3) Violets are blue, +---> 4) I have a car, +---> 5) Clocks tell time, +---> 6) Sugar is sweet +---> 7) And so are you. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2.7: THE UNDO COMMAND + + + ** Press u to undo the last commands, U to fix a whole line. ** + + 1. Move the cursor to the line below marked ---> and place it on the + first error. + 2. Type x to delete the first unwanted character. + 3. Now type u to undo the last command executed. + 4. This time fix all the errors on the line using the x command. + 5. Now type a capital U to return the line to its original state. + 6. Now type u a few times to undo the U and preceding commands. + 7. Now type CTRL-R (keeping CTRL key pressed while hitting R) a few times + to redo the commands (undo the undo's). + +---> Fiix the errors oon thhis line and reeplace them witth undo. + + 8. These are very useful commands. Now move on to the Lesson 2 Summary. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 2 SUMMARY + + + 1. To delete from the cursor up to the next word type: dw + 2. To delete from the cursor to the end of a line type: d$ + 3. To delete a whole line type: dd + + 4. To repeat a motion prepend it with a number: 2w + 5. The format for a change command is: + operator [number] motion + where: + operator - is what to do, such as d for delete + [number] - is an optional count to repeat the motion + motion - moves over the text to operate on, such as w (word), + $ (to the end of line), etc. + + 6. To move to the start of the line use a zero: 0 + + 7. To undo previous actions, type: u (lowercase u) + To undo all the changes on a line, type: U (capital U) + To undo the undo's, type: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 3.1: THE PUT COMMAND + + + ** Type p to put previously deleted text after the cursor. ** + + 1. Move the cursor to the first ---> line below. + + 2. Type dd to delete the line and store it in a Vim register. + + 3. Move the cursor to the c) line, ABOVE where the deleted line should go. + + 4. Type p to put the line below the cursor. + + 5. Repeat steps 2 through 4 to put all the lines in correct order. + +---> d) Can you learn too? +---> b) Violets are blue, +---> c) Intelligence is learned, +---> a) Roses are red, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 3.2: THE REPLACE COMMAND + + + ** Type rx to replace the character at the cursor with x . ** + + 1. Move the cursor to the first line below marked --->. + + 2. Move the cursor so that it is on top of the first error. + + 3. Type r and then the character which should be there. + + 4. Repeat steps 2 and 3 until the first line is equal to the second one. + +---> Whan this lime was tuoed in, someone presswd some wrojg keys! +---> When this line was typed in, someone pressed some wrong keys! + + 5. Now move on to Lesson 3.3. + +NOTE: Remember that you should be learning by doing, not memorization. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 3.3: THE CHANGE OPERATOR + + + ** To change until the end of a word, type ce . ** + + 1. Move the cursor to the first line below marked --->. + + 2. Place the cursor on the u in lubw. + + 3. Type ce and the correct word (in this case, type ine ). + + 4. Press and move to the next character that needs to be changed. + + 5. Repeat steps 3 and 4 until the first sentence is the same as the second. + +---> This lubw has a few wptfd that mrrf changing usf the change operator. +---> This line has a few words that need changing using the change operator. + +Notice that ce deletes the word and places you in Insert mode. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 3.4: MORE CHANGES USING c + + + ** The change operator is used with the same motions as delete. ** + + 1. The change operator works in the same way as delete. The format is: + + c [number] motion + + 2. The motions are the same, such as w (word) and $ (end of line). + + 3. Move to the first line below marked --->. + + 4. Move the cursor to the first error. + + 5. Type c$ and type the rest of the line like the second and press . + +---> The end of this line needs some help to make it like the second. +---> The end of this line needs to be corrected using the c$ command. + +NOTE: You can use the Backspace key to correct mistakes while typing. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 3 SUMMARY + + + 1. To put back text that has just been deleted, type p . This puts the + deleted text AFTER the cursor (if a line was deleted it will go on the + line below the cursor). + + 2. To replace the character under the cursor, type r and then the + character you want to have there. + + 3. The change operator allows you to change from the cursor to where the + motion takes you. eg. Type ce to change from the cursor to the end of + the word, c$ to change to the end of a line. + + 4. The format for change is: + + c [number] motion + +Now go on to the next lesson. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 4.1: CURSOR LOCATION AND FILE STATUS + + ** Type CTRL-G to show your location in the file and the file status. + Type G to move to a line in the file. ** + + NOTE: Read this entire lesson before executing any of the steps!! + + 1. Hold down the Ctrl key and press g . We call this CTRL-G. + A message will appear at the bottom of the page with the filename and the + position in the file. Remember the line number for Step 3. + +NOTE: You may see the cursor position in the lower right corner of the screen + This happens when the 'ruler' option is set (see :help 'ruler' ) + + 2. Press G to move you to the bottom of the file. + Type gg to move you to the start of the file. + + 3. Type the number of the line you were on and then G . This will + return you to the line you were on when you first pressed CTRL-G. + + 4. If you feel confident to do this, execute steps 1 through 3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 4.2: THE SEARCH COMMAND + + + ** Type / followed by a phrase to search for the phrase. ** + + 1. In Normal mode type the / character. Notice that it and the cursor + appear at the bottom of the screen as with the : command. + + 2. Now type 'errroor' . This is the word you want to search for. + + 3. To search for the same phrase again, simply type n . + To search for the same phrase in the opposite direction, type N . + + 4. To search for a phrase in the backward direction, use ? instead of / . + + 5. To go back to where you came from press CTRL-O (Keep Ctrl down while + pressing the letter o). Repeat to go back further. CTRL-I goes forward. + +---> "errroor" is not the way to spell error; errroor is an error. +NOTE: When the search reaches the end of the file it will continue at the + start, unless the 'wrapscan' option has been reset. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 4.3: MATCHING PARENTHESES SEARCH + + + ** Type % to find a matching ),], or } . ** + + 1. Place the cursor on any (, [, or { in the line below marked --->. + + 2. Now type the % character. + + 3. The cursor will move to the matching parenthesis or bracket. + + 4. Type % to move the cursor to the other matching bracket. + + 5. Move the cursor to another (,),[,],{ or } and see what % does. + +---> This ( is a test line with ('s, ['s ] and {'s } in it. )) + + +NOTE: This is very useful in debugging a program with unmatched parentheses! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 4.4: THE SUBSTITUTE COMMAND + + + ** Type :s/old/new/g to substitute 'new' for 'old'. ** + + 1. Move the cursor to the line below marked --->. + + 2. Type :s/thee/the . Note that this command only changes the + first occurrence of "thee" in the line. + + 3. Now type :s/thee/the/g . Adding the g flag means to substitute + globally in the line, change all occurrences of "thee" in the line. + +---> thee best time to see thee flowers is in thee spring. + + 4. To change every occurrence of a character string between two lines, + type :#,#s/old/new/g where #,# are the line numbers of the range + of lines where the substitution is to be done. + Type :%s/old/new/g to change every occurrence in the whole file. + Type :%s/old/new/gc to find every occurrence in the whole file, + with a prompt whether to substitute or not. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 4 SUMMARY + + + 1. CTRL-G displays your location in the file and the file status. + G moves to the end of the file. + number G moves to that line number. + gg moves to the first line. + + 2. Typing / followed by a phrase searches FORWARD for the phrase. + Typing ? followed by a phrase searches BACKWARD for the phrase. + After a search type n to find the next occurrence in the same direction + or N to search in the opposite direction. + CTRL-O takes you back to older positions, CTRL-I to newer positions. + + 3. Typing % while the cursor is on a (,),[,],{, or } goes to its match. + + 4. To substitute new for the first old in a line type :s/old/new + To substitute new for all 'old's on a line type :s/old/new/g + To substitute phrases between two line #'s type :#,#s/old/new/g + To substitute all occurrences in the file type :%s/old/new/g + To ask for confirmation each time add 'c' :%s/old/new/gc + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 5.1: HOW TO EXECUTE AN EXTERNAL COMMAND + + + ** Type :! followed by an external command to execute that command. ** + + 1. Type the familiar command : to set the cursor at the bottom of the + screen. This allows you to enter a command-line command. + + 2. Now type the ! (exclamation point) character. This allows you to + execute any external shell command. + + 3. As an example type ls following the ! and then hit . This + will show you a listing of your directory, just as if you were at the + shell prompt. Or use :!dir if ls doesn't work. + +NOTE: It is possible to execute any external command this way, also with + arguments. + +NOTE: All : commands must be finished by hitting + From here on we will not always mention it. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 5.2: MORE ON WRITING FILES + + + ** To save the changes made to the text, type :w FILENAME. ** + + 1. Type :!dir or :!ls to get a listing of your directory. + You already know you must hit after this. + + 2. Choose a filename that does not exist yet, such as TEST. + + 3. Now type: :w TEST (where TEST is the filename you chose.) + + 4. This saves the whole file (the Vim Tutor) under the name TEST. + To verify this, type :!dir or :!ls again to see your directory. + +NOTE: If you were to exit Vim and start it again with vim TEST , the file + would be an exact copy of the tutor when you saved it. + + 5. Now remove the file by typing (MS-DOS): :!del TEST + or (Unix): :!rm TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 5.3: SELECTING TEXT TO WRITE + + + ** To save part of the file, type v motion :w FILENAME ** + + 1. Move the cursor to this line. + + 2. Press v and move the cursor to the fifth item below. Notice that the + text is highlighted. + + 3. Press the : character. At the bottom of the screen :'<,'> will appear. + + 4. Type w TEST , where TEST is a filename that does not exist yet. Verify + that you see :'<,'>w TEST before you press Enter. + + 5. Vim will write the selected lines to the file TEST. Use :!dir or !ls + to see it. Do not remove it yet! We will use it in the next lesson. + +NOTE: Pressing v starts Visual selection. You can move the cursor around + to make the selection bigger or smaller. Then you can use an operator + to do something with the text. For example, d deletes the text. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 5.4: RETRIEVING AND MERGING FILES + + + ** To insert the contents of a file, type :r FILENAME ** + + 1. Place the cursor just above this line. + +NOTE: After executing Step 2 you will see text from Lesson 5.3. Then move + DOWN to see this lesson again. + + 2. Now retrieve your TEST file using the command :r TEST where TEST is + the name of the file you used. + The file you retrieve is placed below the cursor line. + + 3. To verify that a file was retrieved, cursor back and notice that there + are now two copies of Lesson 5.3, the original and the file version. + +NOTE: You can also read the output of an external command. For example, + :r !ls reads the output of the ls command and puts it below the + cursor. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 5 SUMMARY + + + 1. :!command executes an external command. + + Some useful examples are: + (MS-DOS) (Unix) + :!dir :!ls - shows a directory listing. + :!del FILENAME :!rm FILENAME - removes file FILENAME. + + 2. :w FILENAME writes the current Vim file to disk with name FILENAME. + + 3. v motion :w FILENAME saves the Visually selected lines in file + FILENAME. + + 4. :r FILENAME retrieves disk file FILENAME and puts it below the + cursor position. + + 5. :r !dir reads the output of the dir command and puts it below the + cursor position. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 6.1: THE OPEN COMMAND + + + ** Type o to open a line below the cursor and place you in Insert mode. ** + + 1. Move the cursor to the line below marked --->. + + 2. Type the lowercase letter o to open up a line BELOW the cursor and place + you in Insert mode. + + 3. Now type some text and press to exit Insert mode. + +---> After typing o the cursor is placed on the open line in Insert mode. + + 4. To open up a line ABOVE the cursor, simply type a capital O , rather + than a lowercase o. Try this on the line below. + +---> Open up a line above this by typing O while the cursor is on this line. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 6.2: THE APPEND COMMAND + + + ** Type a to insert text AFTER the cursor. ** + + 1. Move the cursor to the start of the line below marked --->. + + 2. Press e until the cursor is on the end of li . + + 3. Type an a (lowercase) to append text AFTER the cursor. + + 4. Complete the word like the line below it. Press to exit Insert + mode. + + 5. Use e to move to the next incomplete word and repeat steps 3 and 4. + +---> This li will allow you to pract appendi text to a line. +---> This line will allow you to practice appending text to a line. + +NOTE: a, i and A all go to the same Insert mode, the only difference is where + the characters are inserted. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 6.3: ANOTHER WAY TO REPLACE + + + ** Type a capital R to replace more than one character. ** + + 1. Move the cursor to the first line below marked --->. Move the cursor to + the beginning of the first xxx . + + 2. Now press R and type the number below it in the second line, so that it + replaces the xxx . + + 3. Press to leave Replace mode. Notice that the rest of the line + remains unmodified. + + 4. Repeat the steps to replace the remaining xxx. + +---> Adding 123 to xxx gives you xxx. +---> Adding 123 to 456 gives you 579. + +NOTE: Replace mode is like Insert mode, but every typed character deletes an + existing character. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 6.4: COPY AND PASTE TEXT + + + ** Use the y operator to copy text and p to paste it ** + + 1. Go to the line marked with ---> below and place the cursor after "a)". + + 2. Start Visual mode with v and move the cursor to just before "first". + + 3. Type y to yank (copy) the highlighted text. + + 4. Move the cursor to the end of the next line: j$ + + 5. Type p to put (paste) the text. Then type: a second . + + 6. Use Visual mode to select " item.", yank it with y , move to the end of + the next line with j$ and put the text there with p . + +---> a) this is the first item. + b) + + NOTE: you can also use y as an operator; yw yanks one word. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 6.5: SET OPTION + + + ** Set an option so a search or substitute ignores case ** + + 1. Search for 'ignore' by entering: /ignore + Repeat several times by pressing n . + + 2. Set the 'ic' (Ignore case) option by entering: :set ic + + 3. Now search for 'ignore' again by pressing n + Notice that Ignore and IGNORE are now also found. + + 4. Set the 'hlsearch' and 'incsearch' options: :set hls is + + 5. Now type the search command again and see what happens: /ignore + + 6. To disable ignoring case enter: :set noic + +NOTE: To remove the highlighting of matches enter: :nohlsearch +NOTE: If you want to ignore case for just one search command, use \c + in the phrase: /ignore\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 6 SUMMARY + + 1. Type o to open a line BELOW the cursor and start Insert mode. + Type O to open a line ABOVE the cursor. + + 2. Type a to insert text AFTER the cursor. + Type A to insert text after the end of the line. + + 3. The e command moves to the end of a word. + + 4. The y operator yanks (copies) text, p puts (pastes) it. + + 5. Typing a capital R enters Replace mode until is pressed. + + 6. Typing ":set xxx" sets the option "xxx". Some options are: + 'ic' 'ignorecase' ignore upper/lower case when searching + 'is' 'incsearch' show partial matches for a search phrase + 'hls' 'hlsearch' highlight all matching phrases + You can either use the long or the short option name. + + 7. Prepend "no" to switch an option off: :set noic + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 7.1: GETTING HELP + + + ** Use the on-line help system ** + + Vim has a comprehensive on-line help system. To get started, try one of + these three: + - press the key (if you have one) + - press the key (if you have one) + - type :help + + Read the text in the help window to find out how the help works. + Type CTRL-W CTRL-W to jump from one window to another. + Type :q to close the help window. + + You can find help on just about any subject, by giving an argument to the + ":help" command. Try these (don't forget pressing ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 7.2: CREATE A STARTUP SCRIPT + + + ** Enable Vim features ** + + Vim has many more features than Vi, but most of them are disabled by + default. To start using more features you have to create a "vimrc" file. + + 1. Start editing the "vimrc" file. This depends on your system: + :e ~/.vimrc for Unix + :e $VIM/_vimrc for MS-Windows + + 2. Now read the example "vimrc" file contents: + :r $VIMRUNTIME/vimrc_example.vim + + 3. Write the file with: + :w + + The next time you start Vim it will use syntax highlighting. + You can add all your preferred settings to this "vimrc" file. + For more information type :help vimrc-intro + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 7.3: COMPLETION + + + ** Command line completion with CTRL-D and ** + + 1. Make sure Vim is not in compatible mode: :set nocp + + 2. Look what files exist in the directory: :!ls or :!dir + + 3. Type the start of a command: :e + + 4. Press CTRL-D and Vim will show a list of commands that start with "e". + + 5. Press and Vim will complete the command name to ":edit". + + 6. Now add a space and the start of an existing file name: :edit FIL + + 7. Press . Vim will complete the name (if it is unique). + +NOTE: Completion works for many commands. Just try pressing CTRL-D and + . It is especially useful for :help . + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 7 SUMMARY + + + 1. Type :help or press or to open a help window. + + 2. Type :help cmd to find help on cmd . + + 3. Type CTRL-W CTRL-W to jump to another window + + 4. Type :q to close the help window + + 5. Create a vimrc startup script to keep your preferred settings. + + 6. When typing a : command, press CTRL-D to see possible completions. + Press to use one completion. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + This concludes the Vim Tutor. It was intended to give a brief overview of + the Vim editor, just enough to allow you to use the editor fairly easily. + It is far from complete as Vim has many many more commands. Read the user + manual next: ":help user-manual". + + For further reading and studying, this book is recommended: + Vim - Vi Improved - by Steve Oualline + Publisher: New Riders + The first book completely dedicated to Vim. Especially useful for beginners. + There are many examples and pictures. + See http://iccf-holland.org/click5.html + + This book is older and more about Vi than Vim, but also recommended: + Learning the Vi Editor - by Linda Lamb + Publisher: O'Reilly & Associates Inc. + It is a good book to get to know almost anything you want to do with Vi. + The sixth edition also includes information on Vim. + + This tutorial was written by Michael C. Pierce and Robert K. Ware, + Colorado School of Mines using ideas supplied by Charles Smith, + Colorado State University. E-mail: bware@mines.colorado.edu. + + Modified for Vim by Bram Moolenaar. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.vi.utf-8 b/vim/bundle/ubuntu-vim72/tutor/tutor.vi.utf-8 new file mode 100644 index 0000000..ea7142a --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.vi.utf-8 @@ -0,0 +1,812 @@ +=============================================================================== += Xin chào mừng bạn đến vá»›i Hướng dẫn dùng Vim - Phiên bản 1.5 = +=============================================================================== + Vim là má»™t trình soạn thảo rất mạnh. Vim có rất nhiá»u câu lệnh, + chính vì thế không thể trình bày hết được trong cuốn hướng dẫn này. + Cuốn hướng dẫn chỉ đưa ra những câu lệnh để giúp bạn sá»­ dụng Vim + được dá»… dàng hÆ¡n. Äây cÅ©ng chính là mục Ä‘ich cá»§a sách + + Cần khoảng 25-30 phút để hoàn thành bài há»c, phụ thuá»™c vào thá»i + gian thá»±c hành. + + Các câu lệnh trong bài há»c sẽ thay đổi văn bản này. Vì thế hãy tạo + má»™t bản sao cá»§a tập tin này để thá»±c hành (nếu bạn dùng "vimtutor" + thì đây đã là bản sao). + + Hãy nhá»› rằng hướng dẫn này viết vá»›i nguyên tắc "há»c Ä‘i đôi vá»›i hành". + Có nghÄ©a là bạn cần chạy các câu lệnh để há»c chúng. Nếu chỉ Ä‘á»c, bạn + sẽ quên các câu lệnh! + + Bây giá», cần chắc chắn là phím Shift KHÔNG bị nhấn và hãy nhấn phím + j đủ số lần cần thiết (di chuyển con trá») để Bài 1.1 hiện ra đầy đủ + trên màn hình. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 1.1: DI CHUYỂN CON TRỎ + + + ** Äể di chuyển con trá», nhấn các phím h,j,k,l như đã chỉ ra. ** + ^ + k Gợi ý: phím h ở phía trái và di chuyển sang trái. + < h l > phím l ở bên phải và di chuyển sang phải. + j phím j trong như má»™t mÅ©i tên chỉ xuống + v + 1. Di chuyển con trá» quanh màn hình cho đến khi bạn quen dùng. + + 2. Nhấn và giữ phím (j) cho đến khi nó lặp lại. +---> Bây giá» bạn biết cách chuyển tá»›i bài há»c thứ hai. + + 3. Sá»­ dụng phím di chuyển xuống bài 1.2. + +Chú ý: Nếu bạn không chắc chắn vá» những gì đã gõ, hãy nhấn để chuyển vào + chế độ Câu lệnh, rồi gõ lại những câu lệnh mình muốn. + +Chú ý: Các phím mÅ©i tên cÅ©ng làm việc. Nhưng má»™t khi sá»­ dụng thành thạo hjkl, + bạn sẽ di chuyển con trá» nhanh hÆ¡n so vá»›i các phím mÅ©i tên. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 1.2: VÀO VÀ THOÃT VIM + + + !! CHÚ Ã: Trước khi thá»±c hiện bất kỳ lệnh nào, xin hãy Ä‘á»c cả bài há»c này!! + + 1. Nhấn phím (để chắc chắn là bạn Ä‘ang ở chế độ Câu lệnh). + + 2. Gõ: :q! . + +---> Lệnh này sẽ thoát trình soạn thảo mà KHÔNG ghi nhá»› bất kỳ thay đổi nào mà bạn đã làm. + Nếu bạn muốn ghi nhá»› những thay đổi đó và thoát thì hãy gõ: + :wq + + 3. Khi thấy dấu nhắc shell, hãy gõ câu lệnh đã đưa bạn tá»›i hướng dẫn này. Có + thể là lệnh: vimtutor vi + Thông thưá»ng bạn dùng: vim tutor.vi + +---> 'vim' là trình soạn thảo vim, 'tutor.vi' là tập tin bạn muốn soạn thảo. + + 4. Nếu bạn đã nhá»› và nắm chắc những câu lệnh trên, hãy thá»±c hiện các bước từ + 1 tá»›i 3 để thoát và quay vào trình soạn thảo. Sau đó di chuyển con trá» + tá»›i Bài 1.3. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 1.3: SOẠN THẢO VÄ‚N BẢN - XÓA + + +** Trong chế độ Câu lệnh nhấn x để xóa ký tá»± nằm dưới con trá». ** + + 1. Di chuyển con trá» tá»›i dòng có dấu --->. + + 2. Äể sá»­a lá»—i, di chuyển con trỠđể nó nằm trên ký tá»± sẽ bị + xóa. + + 3. Nhấn phím x để xóa ký tá»± không mong muốn. + + 4. Lặp lại các bước từ 2 tá»›i 4 để sá»­a lại câu. + +---> Emm xiinh em đứnng chá»— nào cÅ©nkg xinh. + + 5. Câu trên đã sá»­a xong, hãy chuyển tá»›i Bài 1.4. + +Chú ý: Khi há»c theo cuốn hướng dẫn này đừng cố nhá»›, mà há»c từ thá»±c hành. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 1.4: SOẠN THẢO VÄ‚N BẢN - CHÈN + + + ** Trong chế độ Câu lệnh nhấn i để chèn văn bản. ** + + 1. Di chuyển con trá» tá»›i dòng có dấu ---> đầu tiên. + + 2. Äể dòng thứ nhất giống hệt vá»›i dòng thứ hai, di chuyển con trá» lên ký tá»± + đầu tiên NGAY SAU chá»— muốn chèn văn bản. + + 3. Nhấn i và gõ văn bản cần thêm. + + 4. Sau má»—i lần chèn từ còn thiếu nhấn để trở lại chế dá»™ Câu lệnh. + Lặp lại các bước từ 2 tá»›i 4 để sá»­a câu này. + +---> Mot lam chang nen , ba cay chum lai hon cao. +---> Mot cay lam chang nen non, ba cay chum lai nen hon nui cao. + + 5. Sau khi thấy quen vá»›i việc chèn văn bản hãy chuyển tá»›i phần tổng kết + ở dưới. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Tá»”NG KẾT BÀI 1 + + + 1. Con trỠđược di chuyển bởi các phím mÅ©i tên hoặc các phím hjkl. + h (trái) j (xuống) k (lên) l (phải) + + 2. Äể vào Vim (từ dấu nhắc %) gõ: vim TÊNTẬPTIN + + 3. Muốn thoát Vim gõ: :q! để vứt bá» má»i thay đổi. + HOẶC gõ: :wq để ghi nhá»› thay đổi. + + 4. Äể xóa bá» ký tá»± nằm dưới con trá» trong chế độ Câu lệnh gõ: x + + 5. Äể chèn văn bản tại vị trí con trá» trong chế độ Câu lệnh gõ: + i văn bản sẽ nhập + +CHÚ Ã: Nhấn sẽ đưa bạn vào chế độ Câu lệnh hoặc sẽ há»§y bá» má»™t câu lệnh + hay Ä‘oạn câu lệnh không mong muốn. + +Bây giá» chúng ta tiếp tục vá»›i Bài 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 2.1: CÃC LỆNH XÓA + + + ** Gõ dw để xóa tá»›i cuối má»™t từ. ** + + 1. Nhấn để chắc chắn là bạn Ä‘ang trong chế độ Câu lệnh. + + 2. Di chuyển con trá» tá»›i dòng có dấu --->. + + 3. Di chuyển con trá» tá»›i ký tá»± đầu cá»§a từ cần xóa. + + 4. Gõ dw để làm từ đó biến mất. + + CHÚ Ã: các ký tá»± dw sẽ xuất hiện trên dòng cuối cùng cá»§a màn hình khi bạn gõ + chúng. Nếu bạn gõ nhầm, hãy nhấn và làm lại từ đầu. + +---> Khi trái tỉm tìm tim ai như mùa đông giá lạnh lanh + Anh đâu thành cánh én nhá» trùng khÆ¡i. + + 5. Lặp lại các bước cho đến khi sá»­a xong câu thÆ¡ rồi chuyển tá»›i Bài 2.2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 2.2: CÃC CÂU LỆNH XÓA KHÃC + + + ** gõ d$ để xóa tá»›i cuối má»™t dòng. ** + + 1. Nhấn để chắc chắn là bạn Ä‘ang trong chế độ Câu lệnh. + + 2. Di chuyển con trá» tá»›i dòng có dấu --->. + + 3. Di chuyển con trá» tá»›i cuối câu đúng (SAU dấu . đầu tiên). + + 4. Gõ d$ để xóa tá»›i cuối dòng. + +---> Äã qua Ä‘i những tháng năm khá» dại. thừa thãi. + + + 5. Chuyển tá»›i Bài 2.3 để hiểu cái gì Ä‘ang xảy ra. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 2.3: CÂU LỆNH VÀ Äá»I TƯỢNG + + + Câu lệnh xóa d có dạng như sau: + + [số] d đối_tượng HOẶC d [số] đối_tượng + Trong đó: + số - là số lần thá»±c hiện câu lệnh (không bắt buá»™c, mặc định=1). + d - là câu lệnh xóa. + đối_tượng - câu lệnh sẽ thá»±c hiện trên chúng (liệt kê phía dưới). + + Danh sách ngắn cá»§a đối tượng: + w - từ con trá» tá»›i cuối má»™t từ, bao gồm cả khoảng trắng. + e - từ con trá» tá»›i cuối má»™t từ, KHÔNG bao gồm khoảng trắng. + $ - từ con trá» tá»›i cuối má»™t dòng. + +CHÚ Ã: Dành cho những ngưá»i ham tìm hiểu, chỉ nhấn đối tượng trong chế độ Câu + lệnh mà không có câu lệnh sẽ di chuyển con trá» như trong danh sách trên. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 2.4: TRƯỜNG HỢP NGOẠI LỆ CỦA QUY LUẬT 'CÂU LỆNH-Äá»I TƯỢNG' + + + ** Gõ dd để xóa cả má»™t dòng. ** + + Ngưá»i dùng thưá»ng xuyên xóa cả má»™t dòng, vì thế các nhà phát triển Vi đã + quyết định dùng hai chữ d để đơn giản hóa thao tác này. + + 1. Di chuyển con trá» tá»›i dòng thứ hai trong cụm phía dưới. + 2. Gõ dd để xóa dòng này. + 3. Bây giá» di chuyển tá»›i dòng thứ tư. + 4. Gõ 2dd (hãy nhá»› lại bá»™ ba số-câu lệnh-đối tượng) để xóa hai dòng. + + 1) Trong tim em khắc sâu bao kỉ niệm + 2) Tình yêu chân thành em dành cả cho anh + 3) Dẫu cuá»™c Ä‘á»i như bể dâu thay đổi + 4) Anh mãi là ngá»n lá»­a ấm trong đêm + 5) Äã qua Ä‘i những tháng năm khá» dại + 7) Hãy để tá»± em lau nước mắt cá»§a mình + 8) Lặng lẽ sống những đêm dài bất tận + 9) Bao khổ Ä‘au chá» tia nắng bình minh + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 2.5: CÂU LỆNH "HỦY THAO TÃC" + + + ** Nhấn u để há»§y bá» những câu lệnh cuối cùng, U để sá»­a cả má»™t dòng. ** + + 1. Di chuyển con trá» tá»›i dòng có dấu ---> và đặt con trá» trên từ có lá»—i + đầu tiên + 2. Gõ x để xóa chữ cái gây ra lá»—i đầu tiên. + 3. Bây giá» gõ u để há»§y bá» câu lệnh vừa thá»± hiện (xóa chữ cái). + 4. Dùng câu lệnh x để sá»­a lá»—i cả dòng này. + 5. Bây giá» gõ chữ U hoa để phục hồi trạng thái ban đầu cá»§a dòng. + 6. Bây giá» gõ u vài lần để há»§y bá» câu lệnh U và các câu lệnh trước. + 7. Bây giá» gõ CTRL-R (giữ phím CTRL và gõ R) và lầu để thá»±c hiện + lại các câu lệnh (há»§y bá» các câu lệnh há»§y bá»). + +---> Câyy ccó cá»™ii, nuước csó nguuồn. + + 8. Äây là những câu lệnh rất hữu ích. Bây giá» chuyển tá»›i Tổng kết Bài 2. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Tá»”NG KẾT BÀI 2 + + + 1. Äể xóa từ con trá» tá»›i cuối má»™t từ gõ: dw + + 2. Äể xóa từ con trá» tá»›i cuối má»™t dòng gõ: d$ + + 3. Äể xóa cả má»™t dòng gõ: dd + + 4. Má»™t câu lệnh trong chế độ Câu lệnh có dạng: + + [số] câu_lệnh đối_tượng HOẶC câu_lệnh [số] đối_tượng + trong đó: + số - là số lần thá»±c hiện câu lệnh (không bắt buá»™c, mặc định=1). + câu_lệnh - là những gì thá»±c hiện, ví dụ d dùng để xóa. + đối_tượng - câu lệnh sẽ thá»±c hiện trên chúng, ví dụ w (từ), + $ (tá»›i cuối má»™t dòng), v.v... + + 5. Äể há»§y bá» thao tác trước, gõ: u (chữ u thưá»ng) + Äể há»§y bá» tất cả các thao tác trên má»™t dòng, gõ: U (chữ U hoa) + Äể há»§y bá» các câu lệnh há»§y bá», gõ: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 3.1: CÂU LỆNH DÃN + + + ** Gõ p để dán những gì vừa xóa tá»›i sau con trá». ** + + 1. Di chuyển con trá» tá»›i dòng đầu tiên trong cụm ở dưới. + + 2. Gõ dd để xóa và ghi lại má»™t dòng trong bá»™ nhá»› đệm cá»§a Vim. + + 3. Di chuyển con trá» tá»›i dòng Ở TRÊN chá»— cần dán. + + 4. Trong chế độ Câu lệnh, gõ p để thay thế dòng. + + 5. Lặp lại các bước từ 2 tá»›i 4 để đặt các dòng theo đúng thứ tá»± cá»§a chúng. + + d) Niá»m vui như gió xưa bay nhè nhẹ + b) Em vẫn mong anh sẽ đến vá»›i em + c) Äừng để em mất Ä‘i niá»m hy vá»ng đó + a) Ai sẽ giúp em vượt qua sóng gió + e) Dá»… ra Ä‘i khó giữ lại bên mình + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 3.2: CÂU LỆNH THAY THẾ + + + ** Gõ r và má»™t ký tá»± để thay thế ký tá»± nằm dưới con trá». ** + + 1. Di chuyển con trá» tá»›i dòng có dấu --->. + + 2. Di chuyển con trá» tá»›i ký tá»± gõ sai đầu tiên. + + 3. Gõ r và ký tá»± đúng. + + 4. Lặp lại các bước từ 2 đến 4 để sá»­a cả dòng. + +---> "Trên Ä‘á»i nài làm gì có đưá»mg, ngưá»i to Ä‘i mãi rồi thànk đưá»ng là tHôi" +---> "Trên Ä‘á»i này làm gì có đưá»ng, ngưá»i ta Ä‘i mãi rồi thành đưá»ng mà thôi" + + 5. Bây giá» chuyển sang Bài 3.3. + +CHÚ Ã: Hãy nhá»› rằng bạn cần thá»±c hành, không nên "há»c vẹt". + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 3.3: CÂU LỆNH THAY Äá»”I + + + ** Äể thay đổi má»™t phần hay cả má»™t từ, gõ cw . ** + + 1. Di chuyển con trá» tá»›i dòng có dấu --->. + + 2. Äặt con trá» trên chữ trong. + + 3. Gõ cw và sá»­a lại từ (trong trưá»ng hợp này, gõ 'ine'.) + + 4. Gõ và chuyển tá»›i lá»—i tiếp theo (chữ cái đầu tiên trong số cần thay.) + + 5. Lặp lại các bước 3 và 4 cho tá»›i khi thu được dòng như dòng thứ hai. + +---> Trên dùgn này có má»™t dầy từ cần tyays đổi, sá»­ dunk câu lệnh thay đổi. +---> Trên dong này có má»™t vai từ cần thay đổi, sá»­ dung câu lệnh thay đổi. + +Chú ý rằng cw không chỉ thay đổi từ, nhưng còn đưa bạn vào chế độ chèn. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 3.4: TIẾP TỤC THAY Äá»”I VỚI c + + + ** Câu lệnh thay đổi được sá»­ dụng vá»›i cùng đối tượng như câu lệnh xóa. ** + + 1. Câu lệnh thay đổi làm việc tương tá»± như câu lệnh xóa. Äịnh dạng như sau: + + [số] c đối_tượng HOẶC c [số] đối_tượng + + 2. Äối tượng cÅ©ng giống như ở trên, ví dụ w (từ), $ (cuối dòng), v.v... + + 3. Di chuyển con trá» tá»›i dòng có dấu --->. + + 4. Di chuyển con trá» tá»›i dòng có lá»—i đầu tiên. + + 5. Gõ c$ để sá»­a cho giống vá»›i dòng thứ hai và gõ . + +---> Doan cuoi dong nay can sua de cho giong voi dong thu hai. +---> Doan cuoi dong nay can su dung cau lenh c$ de sua. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Tá»”NG KẾT BÀI 3 + + + 1. Äể dán Ä‘oạn văn bản vừa xóa, gõ p. Câu lệnh này sẽ đặt Ä‘oạn văn bản này + PHÃA SAU con trá» (nếu má»™t dòng vừa bị xóa, dòng này sẽ được đặt vào dòng + nằm dưới con trá»). + + 2. Äể thay thế ký tá»± dưới con trá», gõ r và sau đó gõ + ký tá»± muốn thay vào. + + 3. Câu lệnh thay đổi cho phép bạn thay đổi đối tượng chỉ ra từ con + trá» tá»›i cuối đối tượng. vd. Gõ cw để thay đổi từ + con trá» tá»›i cuối má»™t từ, c$ để thay đổi tá»›i cuối má»™t dòng. + + 4. Äịnh dạng để thay đổi: + + [số] c đối_tượng HOẶC c [số] đối_tượng + +Bây giá» chúng ta tiếp tục bài há»c má»›i. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 4.1: THÔNG TIN VỀ TẬP TIN VÀ VỊ TRà TRONG TẬP TIN + + + ** Gõ CTRL-g để hiển thị vị trí cá»§a bạn trong tập tin và thông tin vá» tập tin. + Gõ SHIFT-G để chuyển tá»›i má»™t dòng trong tập tin. ** + + Chú ý: Äá»c toàn bá»™ bài há»c này trước khi thá»±c hiện bất kỳ bước nào!! + + 1. Giữ phím Ctrl và nhấn g . Má»™t dòng thông tin xuất hiện tại cuối trang + vá»›i tên tập tin và dòng mà bạn Ä‘ang nằm trên. Hãy nhá»› số dòng này + Cho bước số 3. + + 2. Nhấn shift-G để chuyển tá»›i cuối tập tin. + + 3. Gõ số dòng mà bạn đã nằm trên và sau đó shift-G. Thao tác này sẽ đưa bạn + trở lại dòng mà con trỠđã ở trước khi nhấn tổ hợp Ctrl-g. + (Khi bạn gõ số, chúng sẽ KHÔNG hiển thị trên màn hình.) + + 4. Nếu bạn cảm thấy đã hiểu rõ, hãy thá»±c hiện các bước từ 1 tá»›i 3. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 4.2: CÂU LỆNH TÃŒM KIẾM + + + ** Gõ / và theo sau là cụm từ muốn tìm kiếm. ** + + 1. Trong chế độ Câu lệnh gõ ký tá»± / .Chú ý rằng ký tá»± này và con trá» sẽ + xuất hiện tại cuối màn hình giống như câu lệnh : . + + 2. Bây giá» gõ 'loiiiii' . Äây là từ bạn muốn tìm. + + 3. Äể tìm kiếm cụm từ đó lần nữa, đơn giản gõ n . + Äể tìm kiếm cụm từ theo hướng ngược lại, gõ Shift-N . + + 4. Nếu bạn muối tìm kiếm cụm từ theo hướng ngược lại đầu tập tin, sá»­ dụng + câu lệnh ? thay cho /. + +---> "loiiiii" là những gì không đúng lắm; loiiiii thưá»ng xuyên xảy ra. + +Chú ý: Khi tìm kiếm đến cuối tập tin, việc tìm kiếm sẽ tiếp tục từ đầu + tập tin này. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 4.3: TÃŒM KIẾM CÃC DẤU NGOẶC SÃNH ÄÔI + + + ** Gõ % để tìm kiếm ),], hay } . ** + + 1. Äặt con trá» trên bất kỳ má»™t (, [, hay { nào trong dòng có dấu --->. + + 2. Bây giá» gõ ký tá»± % . + + 3. Con trá» sẽ di chuyển đến dấu ngoặc tạo cặp (dấu đóng ngoặc). + + 4. Gõ % để chuyển con trá» trở lại dấu ngoặc đầu tiên (dấu mở ngoặc). + +---> Äây là ( má»™t dòng thá»­ nghiệm vá»›i các dấu ngoặc (, [ ] và { } . )) + +Chú ý: Rất có ích khi sá»­a lá»—i chương trình, khi có các lá»—i thừa thiếu dấu ngoặc! + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 4.4: MỘT CÃCH SỬA Lá»–I + + + ** Gõ :s/cÅ©/má»›i/g để thay thế 'má»›i' vào 'cÅ©'. ** + + 1. Di chuyển con trá» tá»›i dòng có dấu --->. + + 2. Gõ :s/duou/ruou . Chú ý rằng câu lệnh này chỉ thay đổi từ tìm + thấy đầu tiên trên dòng (từ 'duou' đầu dòng). + + 3. Bây giá» gõ :s/duou/ruou/g để thá»±c hiện thay thế trên toàn bá»™ dòng. + Lệnh này sẽ thay thế tất cả những từ ('duou') tìm thấy trên dòng. + +---> duou ngon phai co ban hie. Khong duou cung khong hoa. + + 4. Äể thay thế thá»±c hiện trong Ä‘oạn văn bản giữa hai dòng, + gõ :#,#s/cÅ©/má»›i/g trong đó #,# là số thứ tá»± cá»§a hai dòng. + Gõ :%s/cÅ©/má»›i/g để thá»±c hiện thay thế trong toàn bá»™ tập tin. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Tá»”NG KẾT BÀI 4 + + + 1. Ctrl-g vị trí cá»§a con trá» trong tập tin và thông tin vá» tập tin. + Shift-G di chuyển con trá» tá»›i cuối tập tin. Số dòng và theo sau + là Shift-G di chuyển con trá» tá»›i dòng đó. + + 2. Gõ / và cụm từ theo sau để tìm kiếm cụm từ VỀ PHÃA TRƯỚC. + Gõ ? và cụm từ theo sau để tìm kiếm cụm từ NGƯỢC TRỞ LẠI. + Sau má»™t lần tìm kiếm gõ n để tìm kiếm cụm từ lại má»™t lần nữa theo hướng + đã tìm hoặc Shift-N để tìm kiếm theo hướng ngược lại. + + 3. Gõ % khi con trá» nằm trên má»™t (,),[,],{, hay } sẽ chỉ ra vị trí cá»§a + dấu ngoặc còn lại trong cặp. + + 4. Äể thay thế 'má»›i' cho 'cÅ©' đầu tiên trên dòng, gõ :s/cÅ©/má»›i + Äể thay thế 'má»›i' cho tất cả 'cÅ©' trên dòng, gõ :s/cÅ©/má»›i/g + Äể thay thế giữa hai dòng, gõ :#,#s/cÅ©/má»›i/g + Äể thay thế trong toàn bá»™ tập tin, gõ :%s/cÅ©/má»›i/g + Äể chương trình há»i lại trước khi thay thế, thêm 'c' :%s/cÅ©/má»›i/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lesson 5.1: CÃCH THá»°C HIỆN MỘT CÂU LỆNH NGOẠI TRÚ + + + ** Gõ :! theo sau là má»™t câu lệnh ngoại trú để thá»±c hiện câu lệnh đó. ** + + 1. Gõ câu lệnh quen thuá»™c : để đặt con trá» tại cuối màn hình. + Thao tác này cho phép bạn nhập má»™t câu lệnh. + + 2. Bây giá» gõ ký tá»± ! (chấm than). Ký tá»± này cho phép bạn + thá»±c hiện bất kỳ má»™t câu lệnh shell nào. + + 3. Ví dụ gõ ls theo sau dấu ! và gõ . Lệnh này + sẽ hiển thị ná»™i dung cá»§a thư mục hiện thá»i, hoặc sá»­ dụng + lệnh :!dir nếu ls không làm việc. + +Chú ý: Có thể thá»±c hiện bất kỳ câu lệnh ngoại trú nào theo cách này. + +Chú ý: Tất cả các câu lệnh : cần kết thúc bởi phím + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 5.2: GHI LẠI CÃC TẬP TIN + + + ** Äể ghi lại các thay đổi, gõ :w TÊNTỆPTIN. ** + + 1. Gõ :!dir hoặc :!ls để lấy bảng liệt kê thư mục hiện thá»i. + Như bạn đã biết, bạn cần gõ để thá»±c hiện. + + 2. Chá»n má»™t tên tập tin chưa có, ví dụ TEST. + + 3. Bây giá» gõ: :w TEST (trong đó TEST là tên tập tin bạn đã chá»n.) + + 4. Thao tác này ghi toàn bá»™ tập tin (Hướng dẫn dùng Vim) dưới tên TEST. + Äể kiểm tra lại, gõ :!dir má»™t lần nữa để liệt kê thư mục. + +Chú ý: Nếu bạn thoát khá»i Vim và quay trở lại vá»›i tên tập tin TEST, thì tập + tin sẽ là bản sao cá»§a hướng dẫn tại thá»i Ä‘iểm bạn ghi lại. + + 5. Bây giá» xóa bá» tập tin (MS-DOS): :!del TEST + hay (Unix): :!rm TEST + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 5.3: CÂU LỆNH GHI CHỌN LỌC + + + ** Äể ghi má»™t phần cá»§a tập tin, gõ :#,# w TÊNTẬPTIN ** + + 1. Gõ lại má»™t lần nữa :!dir hoặc :!ls để liệt kê ná»™i dung thư mục + rồi chá»n má»™t tên tập tin thích hợp, ví dụ TEST. + + 2. Di chuyển con trá» tá»›i đầu trang này, rồi gõ Ctrl-g để tìm ra số thứ + tá»± cá»§a dòng đó. HÃY NHỚ Sá» THỨ Tá»° NÀY! + + 3. Bây giá» di chuyển con trá» tá»›i dòng cuối trang và gõ lại Ctrl-g lần nữa. + HÃY NHỚ CẢ Sá» THỨ Tá»° NÀY! + + 4. Äể CHỈ ghi lại má»™t phần vào má»™t tập tin, gõ :#,# w TEST trong đó #,# + là hai số thứ tá»± bạn đã nhá»› (đầu,cuối) và TEST là tên tập tin. + + 5. Nhắc lại, xem tập tin cá»§a bạn có ở đó không vá»›i :!dir nhưng ÄỪNG xóa. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 5.4: ÄỌC VÀ KẾT HỢP CÃC TẬP TIN + + + ** Äể chèn ná»™i dung cá»§a má»™t tập tin, gõ :r TÊNTẬPTIN ** + + 1. Gõ :!dir để chắc chắn là có tệp tin TEST. + + 2. Äặt con trá» tại đầu trang này. + +CHÚ Ã: Sau khi thá»±c hiện Bước 3 bạn sẽ thấy Bài 5.3. Sau đó cần di chuyển + XUá»NG bài há»c này lần nữa. + + 3. Bây giá» dùng câu lệnh :r TEST để Ä‘á»c tập tin TEST, trong đó TEST là + tên cá»§a tập tin. + +CHÚ Ã: Tập tin được Ä‘á»c sẽ đặt bắt đầu từ vị trí cá»§a con trá». + + 4. Äể kiểm tra lại, di chuyển con trá» ngược trở lại và thấy rằng bây giá» + có hai Bài 5.3, bản gốc và bản vừa chèn. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Tá»”NG KẾT BÀI 5 + + + 1. :!câulệnh thá»±c hiện má»™t câu lệnh ngoại trú + + Má»™t vài ví dụ hữu ích: + (MS-DOS) (Unix) + :!dir :!ls - liệt kê ná»™i dung má»™t thư mục. + :!del TÊNTẬPTIN :!rm TÊNTẬPTIN - xóa bá» tập tin TÊNTẬPTIN. + + 2. :w TÊNTẬPTIN ghi tập tin hiện thá»i cá»§a Vim lên đĩa vá»›i tên TÊNTẬPTIN. + + 3. :#,#w TÊNTẬPTIN ghi các dòng từ # tá»›i # vào tập tin TÊNTẬPTIN. + + 4. :r TÊNTẬPTIN Ä‘á»c tập tin trên đĩa TÊNTẬPTIN và chèn ná»™i dung cá»§a nó vào + tập tin hiện thá»i sau vị trí cá»§a con trá». + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 6.1: CÂU LỆNH TẠO DÃ’NG + + + ** Gõ o để mở má»™t dòng phía dưới con trá» và chuyển vào chế độ Soạn thảo. ** + + 1. Di chuyển con trá» tá»›i dòng có dấu --->. + + 2. Gõ o (chữ thưá»ng) để mở má»™t dòng BÊN DƯỚI con trá» và chuyển vào chế độ + Soạn thảo. + + 3. Bây giá» sao chép dòng có dấu ---> và nhấn để thoát khá»i chế độ Soạn + thảo. + +---> Sau khi gõ o con trá» sẽ đặt trên dòng vừa mở trong chế độ Soạn thảo. + + 4. Äể mở má»™t dòng Ở TRÊN con trá», đơn giản gõ má»™t chữ O hoa, thay cho + chữ o thưá»ng. Hãy thá»­ thá»±c hiện trên dòng dưới đây. +Di chuyển con trá» tá»›i dòng này, rồi gõ Shift-O sẽ mở má»™t dòng trên nó. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 6.2: CÂU LỆNH THÊM VÀO + + + ** Gõ a để chèn văn bản vào SAU con trá». ** + + 1. Di chuyển con trá» tá»›i cuối dòng đầu tiên có ký hiệu ---> + bằng cách gõ $ trong chế độ câu lệnh. + + 2. Gõ a (chữ thưá»ng) để thêm văn bản vào SAU ký tá»± dưới con trá». + (Chữ A hoa thêm văn bản vào cuối má»™t dòng.) + +Chú ý: Lệnh này thay cho việc gõ i , ký tá»± cuối cùng, văn bản muốn chèn, + , mÅ©i tên sang phải, và cuối cùng, x , chỉ để thêm vào cuối dòng! + + 3. Bây giá» thêm cho đủ dòng thứ nhất. Chú ý rằng việc thêm giống hệt vá»›i + việc chèn, trừ vị trí chèn văn bản. + +---> Dong nay cho phep ban thuc hanh +---> Dong nay cho phep ban thuc hanh viec them van ban vao cuoi dong. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 6.3: MỘT CÃCH THAY THẾ KHÃC + + + ** Gõ chữ cái R hoa để thay thế nhiá»u ký tá»±. ** + + 1. Di chuyển con trá» tá»›i cuối dòng đầu tiên có ký hiệu --->. + + 2. Äặt con trá» tại chữ cái đầu cá»§a từ đầu tiên khác vá»›i dòng có dấu + ---> tiếp theo (từ 'tren'). + + 3. Bây giá» gõ R và thay thế phần còn lại cá»§a dòng thứ nhất bằng cách gõ + đè lên văn bản cÅ© để cho hai dòng giống nhau. + +---> De cho dong thu nhat giong voi dong thu hai tren trang nay. +---> De cho dong thu nhat giong voi dong thu hai, go R va van ban moi. + + 4. Chú ý rằng khi bạn nhấn để thoát, Ä‘oạn văn bản không sá»­a đổi sẽ + được giữ nguyên. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 6.4: THIẾT LẬP CÃC THAM Sá» + + ** Thiết lập má»™t tùy chá»n để việc tìm kiếm hay thay thế lá» Ä‘i kiểu chữ ** + + 1. Tìm kiếm từ 'lodi' bằng cách gõ: + /lodi + Lặp lại vài lần bằng phím n. + + 2. Äặt tham số 'ic' (Lodi - ignore case) bằng cách gõ: + :set ic + + 3. Bây giá» thá»­ lại tìm kiếm 'lodi' bằng cách gõ: n + Lặp lại vài lần bằng phím n. + + 4. Äặt các tham số 'hlsearch' và 'incsearch': + :set hls is + + 5. Bây giá» nhập lại câu lệnh tìm kiếm má»™t lần nữa và xem cái gì xảy ra: + /lodi + + 6. Äể xóa bá» việc hiện sáng từ tìm thấy, gõ: + :nohlsearch +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Tá»”NG KẾT BÀI 6 + + + 1. Gõ o mở má»™t dòng phía DƯỚI con trá» và đặt con trá» trên dòng vừa mở + trong chế độ Soạn thảo. + Gõ má»™t chữ O hoa để mở dòng phía TRÊN dòng cá»§a con trá». + + 2. Gõ a để chèn văn bản vào SAU ký tá»± nằm dưới con trá». + Gõ má»™t chữ A hoa tá»± động thêm văn bản vào cuối má»™t dòng. + + 3. Gõ má»™t chữ R hoa chuyển vào chế độ Thay thế cho đến khi nhấn . + + 4. Gõ ":set xxx" sẽ đặt tham số "xxx" + + + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Bài 7: CÂU LỆNH TRỢ GIÚP + + + ** Sá»­ dụng hệ thống trợ giúp có sẵn ** + + Vim có má»™t hệ thống trợ giúp đầy đủ. Äể bắt đầu, thá»­ má»™t trong ba + lệnh sau: + - nhấn phím (nếu bàn phím có) + - nhấn phím (nếu bàn phím có) + - gõ :help + + Gõ :q để đóng cá»­a sổ trợ giúp. + + Bạn có thể tìm thấy trợ giúp theo má»™t đỠtài, bằng cách đưa tham số tá»›i + câu lệnh ":help". Hãy thá»­ (đừng quên gõ ): + + :help w + :help c_, 2005 + Translator: Phan Vinh Thịnh , 2005 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.vim b/vim/bundle/ubuntu-vim72/tutor/tutor.vim new file mode 100644 index 0000000..11584d5 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.vim @@ -0,0 +1,183 @@ +" Vim tutor support file +" Author: Eduardo F. Amatria +" Maintainer: Bram Moolenaar +" Last Change: 2008 Jul 21 + +" This Vim script is used for detecting if a translation of the +" tutor file exist, i.e., a tutor.xx file, where xx is the language. +" If the translation does not exist, or no extension is given, +" it defaults to the english version. + +" It is invoked by the vimtutor shell script. + +" 1. Build the extension of the file, if any: +let s:ext = "" +if strlen($xx) > 1 + let s:ext = "." . $xx +else + let s:lang = "" + " Check that a potential value has at least two letters. + " Ignore "1043" and "C". + if exists("v:lang") && v:lang =~ '\a\a' + let s:lang = v:lang + elseif $LC_ALL =~ '\a\a' + let s:lang = $LC_ALL + elseif $LANG =~ '\a\a' + let s:lang = $LANG + endif + if s:lang != "" + " Remove "@euro" (ignoring case), it may be at the end + let s:lang = substitute(s:lang, '\c@euro', '', '') + " On MS-Windows it may be German_Germany.1252 or Polish_Poland.1250. How + " about other languages? + if s:lang =~ "German" + let s:ext = ".de" + elseif s:lang =~ "Polish" + let s:ext = ".pl" + elseif s:lang =~ "Slovak" + let s:ext = ".sk" + elseif s:lang =~ "Czech" + let s:ext = ".cs" + elseif s:lang =~ "Dutch" + let s:ext = ".nl" + else + let s:ext = "." . strpart(s:lang, 0, 2) + endif + endif +endif + +" Somehow ".ge" (Germany) is sometimes used for ".de" (Deutsch). +if s:ext =~? '\.ge' + let s:ext = ".de" +endif + +if s:ext =~? '\.en' + let s:ext = "" +endif + +" The japanese tutor is available in two encodings, guess which one to use +" The "sjis" one is actually "cp932", it doesn't matter for this text. +if s:ext =~? '\.ja' + if &enc =~ "euc" + let s:ext = ".ja.euc" + elseif &enc != "utf-8" + let s:ext = ".ja.sjis" + endif +endif + +" The korean tutor is available in two encodings, guess which one to use +if s:ext =~? '\.ko' + if &enc != "utf-8" + let s:ext = ".ko.euc" + endif +endif + +" The Chinese tutor is available in two encodings, guess which one to use +" This segment is from the above lines and modified by +" Mendel L Chan for Chinese vim tutorial +if s:ext =~? '\.zh' + if &enc =~ 'big5\|cp950' + let s:ext = ".zh.big5" + elseif &enc != 'utf-8' + let s:ext = ".zh.euc" + endif +endif + +" The Polish tutor is available in two encodings, guess which one to use. +if s:ext =~? '\.pl' + if &enc =~ 1250 + let s:ext = ".pl.cp1250" + endif +endif + +" The Turkish tutor is available in two encodings, guess which one to use +if s:ext =~? '\.tr' + if &enc == "iso-8859-9" + let s:ext = ".tr.iso9" + endif +endif + +" The Greek tutor is available in three encodings, guess what to use. +" We used ".gr" (Greece) instead of ".el" (Greek); accept both. +if s:ext =~? '\.gr\|\.el' + if &enc == "iso-8859-7" + let s:ext = ".el" + elseif &enc == "utf-8" + let s:ext = ".el.utf-8" + elseif &enc =~ 737 + let s:ext = ".el.cp737" + endif +endif + +" The Slovak tutor is available in three encodings, guess which one to use +if s:ext =~? '\.sk' + if &enc =~ 1250 + let s:ext = ".sk.cp1250" + endif +endif + +" The Czech tutor is available in three encodings, guess which one to use +if s:ext =~? '\.cs' + if &enc =~ 1250 + let s:ext = ".cs.cp1250" + endif +endif + +" The Russian tutor is available in three encodings, guess which one to use. +if s:ext =~? '\.ru' + if &enc =~ '1251' + let s:ext = '.ru.cp1251' + elseif &enc =~ 'koi8' + let s:ext = '.ru' + endif +endif + +" The Hungarian tutor is available in three encodings, guess which one to use. +if s:ext =~? '\.hu' + if &enc =~ 1250 + let s:ext = ".hu.cp1250" + elseif &enc =~ 'iso-8859-2' + let s:ext = '.hu' + endif +endif + +" The Croatian tutor is available in three encodings, guess which one to use. +if s:ext =~? '\.hr' + if &enc =~ 1250 + let s:ext = ".hr.cp1250" + elseif &enc =~ 'iso-8859-2' + let s:ext = '.hr' + endif +endif + +" Esperanto is only available in utf-8 +if s:ext =~? '\.eo' + let s:ext = ".eo.utf-8" +endif +" Vietnamese is only available in utf-8 +if s:ext =~? '\.vi' + let s:ext = ".vi.utf-8" +endif + +" If 'encoding' is utf-8 s:ext must end in utf-8. +if &enc == 'utf-8' && s:ext !~ '\.utf-8' + let s:ext .= '.utf-8' +endif + +" 2. Build the name of the file: +let s:tutorfile = "/tutor/tutor" +let s:tutorxx = $VIMRUNTIME . s:tutorfile . s:ext + +" 3. Finding the file: +if filereadable(s:tutorxx) + let $TUTOR = s:tutorxx +else + let $TUTOR = $VIMRUNTIME . s:tutorfile + echo "The file " . s:tutorxx . " does not exist.\n" + echo "Copying English version: " . $TUTOR + 4sleep +endif + +" 4. Making the copy and exiting Vim: +e $TUTOR +wq! $TUTORCOPY diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.zh.big5 b/vim/bundle/ubuntu-vim72/tutor/tutor.zh.big5 new file mode 100644 index 0000000..4daad64 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.zh.big5 @@ -0,0 +1,852 @@ +=============================================================================== += Åw ªï ¾\ Ū ¡m V I M ±Ð µ{ ¡n ¢w¢w ª©¥» 1.5 = +=============================================================================== + vim ¬O¤@­Ó¨ã¦³«Ü¦h©R¥Oªº¥\¯à«D±`±j¤jªº½s¿è¾¹¡C­­¤_½g´T¡A¦b¥»±Ðµ{·í¤¤ + ¤£´N¸Ô²Ó¤¶²Ð¤F¡C¥»±Ðµ{ªº³]­p¥Ø¼Ð¬OÁ¿­z¤@¨Ç¥²­nªº°ò¥»©R¥O¡A¦Ó´x´¤¦n³o + ¨Ç©R¥O¡A±z´N¯à°÷«Ü®e©ö±Nvim·í§@¤@­Ó³q¥Îªº¸U¯à½s¿è¾¹¨Ó¨Ï¥Î¤F¡C + + §¹¦¨¥»±Ðµ{ªº¤º®e¤j¬ù»Ý­n25-30¤ÀÄÁ¡A¨ú¨M¤_±z°V½mªº®É¶¡¡C + + ¨C¤@¸`ªº©R¥O¾Þ§@±N·|§ó§ï¥»¤å¡C±ÀÂ˱z´_¨î¥»¤åªº¤@­Ó°Æ¥»¡AµM«á¦b°Æ¥»¤W + ¶i¦æ°V½m(¦pªG±z¬O³q¹L"vimtutor"¨Ó±Ò°Ê±Ðµ{ªº¡A¨º»ò¥»¤å´N¤w¸g¬O°Æ¥»¤F)¡C + + ¤Á°O¤@ÂI¡J¥»±Ðµ{ªº³]­p«ä¸ô¬O¦b¨Ï¥Î¤¤¶i¦æ¾Ç²ßªº¡C¤]´N¬O»¡¡A±z»Ý­n³q¹L + °õ¦æ©R¥O¨Ó¾Ç²ß¥¦­Ì¥»¨­ªº¥¿½T¥Îªk¡C¦pªG±z¥u¬O¾\Ū¦Ó¤£¾Þ§@¡A¨º»ò±z¥i¯à + ·|«Ü§Ö¿ò§Ñ³o¨Ç©R¥Oªº¡I + + ¦n¤F¡A²{¦b½Ð½T©w±zªºShift-Lock(¤j¤p¼gÂê©wÁä)ÁÙ¨S¦³«ö¤U¡AµM«á«öÁä½L¤W + ªº¦r¥ÀÁä j ¨¬°÷¦hªº¦¸¼Æ¨Ó²¾°Ê¥ú¼Ð¡Aª½¨ì²Ä¤@¸`ªº¤º®e¯à°÷§¹¥þ¥Rº¡«Ì¹õ¡C + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤@Á¿²Ä¤@¸`¡J²¾°Ê¥ú¼Ð + + + ¡°¡° ­n²¾°Ê¥ú¼Ð¡A½Ð¨Ì·Ó»¡©ú¤À§O«ö¤U h¡Bj¡Bk¡Bl Áä¡C ¡°¡° + + ^ + k ´£¥Ü¡J h ªºÁä¦ì¤_¥ªÃä¡A¨C¦¸«ö¤U´N·|¦V¥ª²¾°Ê¡C + < h l > l ªºÁä¦ì¤_¥kÃä¡A¨C¦¸«ö¤U´N·|¦V¥k²¾°Ê¡C + j j Áä¬Ý°_¨Ó«Ü¶H¤@¤ä¦yºÝ¤è¦V´Â¤Uªº½bÀY¡C + v + + 1. ½ÐÀH·N¦b«Ì¹õ¤º²¾°Ê¥ú¼Ð¡Aª½¦Ü±zı±oµÎªA¬°¤î¡C + + 2. «ö¤U¤U¦æÁä(j)¡Aª½¨ì¥X²{¥ú¼Ð­«´_¤U¦æ¡C + +---> ²{¦b±zÀ³¸Ó¤w¸g¾Ç·|¦p¦ó²¾°Ê¨ì¤U¤@Á¿§a¡C + + 3. ²{¦b½Ð¨Ï¥Î¤U¦æÁä¡A±N¥ú¼Ð²¾°Ê¨ì²Ä¤GÁ¿¡C + +´£¥Ü¡J¦pªG±z¤£´±½T©w±z©Ò«ö¤Uªº¦r¥À¡A½Ð«ö¤UÁä¦^¨ì¥¿±`(Normal)¼Ò¦¡¡C + µM«á¦A¦¸±qÁä½L¿é¤J±z·Q­nªº©R¥O¡C + +´£¥Ü¡J¥ú¼ÐÁäÀ³·í¤]¯à¥¿±`¤u§@ªº¡C¦ý¬O¨Ï¥ÎhjklÁä¡A¦b²ßºD¤§«á±z´N¯à°÷§Ö³t + ¦a¦b«Ì¹õ¤º¥|³B²¾°Ê¥ú¼Ð¤F¡C + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤@Á¿²Ä¤G¸`¡JVIMªº¶i¤J©M°h¥X + + + !! ¯S§O´£¥Ü¡J·q½Ð¾\Ū§¹¾ã¥»¤@¸`ªº¤º®e¡AµM«á¤~¯à°õ¦æ¥H¤U©ÒÁ¿¸Ñªº©R¥O¡C + + 1. ½Ð«öÁä(³o¬O¬°¤F½T«O±z³B¦b¥¿±`¼Ò¦¡)¡C + + 2. µM«á¿é¤J¡J :q! <¦^¨®> + +---> ³oºØ¤è¦¡ªº°h¥X½s¿è¾¹µ´¤£·|«O¦s±z¶i¤J½s¿è¾¹¥H¨Ó©Ò°µªº§ï°Ê¡C + ¦pªG±z·Q«O¦s§ó§ï¦A°h¥X¡A½Ð¿é¤J¡J + :wq <¦^¨®> + + 3. ¦pªG±z¬Ý¨ì¤F©R¥O¦æ´£¥Ü²Å¡A½Ð¿é¤J¯à°÷±a±z¦^¨ì¥»±Ðµ{ªº©R¥O¡A¨º´N¬O¡J + + vimtutor <¦^¨®> + + ³q±`±¡ªp¤U±z¤]¥i¥H¥Î³oºØ¤è¦¡¡J + + vim tutor <¦^¨®> + +---> ³o¸Ìªº 'vim' ªí¥Ü¶i¤Jvim½s¿è¾¹¡A¦Ó 'tutor'«h¬O±z·Ç³Æ­n½s¿èªº¤å¥ó¡C + + 4. ¦pªG±z¦Û«H¤w¸g¨c¨c°O¦í¤F³o¨Ç¨BÆJªº¸Ü¡A½Ð±q¨BÆJ1°õ¦æ¨ì¨BÆJ3°h¥X¡AµM + «á¦A¦¸¶i¤J½s¿è¾¹¡C±µµÛ±N¥ú¼Ð²¾°Ê¨ì²Ä¤@Á¿²Ä¤T¸`¨ÓÄ~Äò§Ú­Ìªº±Ðµ{Á¿¸Ñ¡C + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤@Á¿²Ä¤T¸`¡J¤å¥»½s¿è¤§§R°£ + + + ** ¦b¥¿±`(Normal)¼Ò¦¡¤U¡A¥i¥H«ö¤U x Áä¨Ó§R°£¥ú¼Ð©Ò¦b¦ì¸mªº¦r²Å¡C** + + 1. ½Ð±N¥ú¼Ð²¾°Ê¨ì¥»¸`¤¤¤U­±¼Ð°O¦³ ---> ªº¨º¤@¦æ¡C + + 2. ¬°¤F­×¥¿¿é¤J¿ù»~¡A½Ð±N¥ú¼Ð²¾¦Ü·Ç³Æ§R°£ªº¦r²Åªº¦ì¸m³B¡C + + 3. µM«á«ö¤U x Áä±N¿ù»~¦r²Å§R°£±¼¡C + + 4. ­«´_¨BÆJ2¨ì¨BÆJ4¡Aª½¨ì¥y¤l­×¥¿¬°¤î¡C + +---> The ccow jumpedd ovverr thhe mooon. + + 5. ¦n¤F¡A¸Ó¦æ¤w¸g­×¥¿¤F¡A¤U¤@¸`¤º®e¬O²Ä¤@Á¿²Ä¥|¸`¡C + +¯S§O´£¥Ü¡J¦b±zÂsÄý¥»±Ðµ{®É¡A¤£­n±j¦æ°O¾Ð¡C°O¦í¤@ÂI¡J¦b¨Ï¥Î¤¤¾Ç²ß¡C + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤@Á¿²Ä¥|¸`¡J¤å¥»½s¿è¤§´¡¤J + + + ** ¦b¥¿±`¼Ò¦¡¤U¡A¥i¥H«ö¤U i Áä¨Ó´¡¤J¤å¥»¡C** + + 1. ½Ð±N¥ú¼Ð²¾°Ê¨ì¥»¸`¤¤¤U­±¼Ð°O¦³ ---> ªº²Ä¤@¦æ¡C + + 2. ¬°¤F¨Ï±o²Ä¤@¦æ¤º®e¹p¦P¤_²Ä¤G¦æ¡A½Ð±N¥ú¼Ð²¾¦Ü¤å¥»²Ä¤@­Ó¦r²Å·Ç³Æ´¡¤J + ªº¦ì¸m¡C + + 3. µM«á«ö¤U i Áä¡A±µµÛ¿é¤J¥²­nªº¤å¥»¦r²Å¡C + + 4. ©Ò¦³¤å¥»³£­×¥¿§¹²¦¡A½Ð«ö¤U Áäªð¦^¥¿±`¼Ò¦¡¡C + ­«´_¨BÆJ2¦Ü¨BÆJ4¥H«K­×¥¿¥y¤l¡C + +---> There is text misng this . +---> There is some text missing from this line. + + 5. ¦pªG±z¹ï¤å¥»´¡¤J¾Þ§@¤w¸g«Üº¡·N¡A½Ð±µµÛ¾\Ū¤U­±ªº¤pµ²¡C + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤@Á¿¤pµ² + + + 1. ¥ú¼Ð¦b«Ì¹õ¤å¥»¤¤ªº²¾°Ê¬J¥i¥H¥Î½bÀYÁä¡A¤]¥i¥H¨Ï¥Î hjkl ¦r¥ÀÁä¡C + h (¥ª²¾) j (¤U¦æ) k (¤W¦æ) l (¥k²¾) + + 2. ±ý¶i¤Jvim½s¿è¾¹(±q©R¥O¦æ´£¥Ü²Å)¡A½Ð¿é¤J¡Jvim ¤å¥ó¦W <¦^¨®> + + 3. ±ý°h¥Xvim½s¿è¾¹¡A½Ð¿é¤J¥H¤U©R¥O©ñ±ó©Ò¦³­×§ï¡J + + :q! <¦^¨®> + + ©ÎªÌ¿é¤J¥H¤U©R¥O«O¦s©Ò¦³­×§ï¡J + + :wq <¦^¨®> + + 4. ¦b¥¿±`¼Ò¦¡¤U§R°£¥ú¼Ð©Ò¦b¦ì¸mªº¦r²Å¡A½Ð«ö¡J x + + 5. ¦b¥¿±`¼Ò¦¡¤U­n¦b¥ú¼Ð©Ò¦b¦ì¸m¶}©l´¡¤J¤å¥»¡A½Ð«ö¡J + + i ¿é¤J¥²­n¤å¥» + +¯S§O´£¥Ü¡J«ö¤U Áä·|±a±z¦^¨ì¥¿±`¼Ò¦¡©ÎªÌ¨ú®ø¤@­Ó¤£´Á±æ©ÎªÌ³¡¤À§¹¦¨ +ªº©R¥O¡C + +¦n¤F¡A²Ä¤@Á¿¨ì¦¹µ²§ô¡C¤U­±±µ¤U¨ÓÄ~Äò²Ä¤GÁ¿ªº¤º®e¡C + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤GÁ¿²Ä¤@¸`¡J§R°£Ãþ©R¥O + + + ** ¿é¤J dw ¥i¥H±q¥ú¼Ð³B§R°£¦Ü¤@­Ó³æ¦r/³æµüªº¥½§À¡C** + + 1. ½Ð«ö¤U Áä½T«O±z³B¤_¥¿±`¼Ò¦¡¡C + + 2. ½Ð±N¥ú¼Ð²¾°Ê¨ì¥»¸`¤¤¤U­±¼Ð°O¦³ ---> ªº¨º¤@¦æ¡C + + 3. ½Ð±N¥ú¼Ð²¾¦Ü·Ç³Æ­n§R°£ªº³æµüªº¶}©l¡C + + 4. ±µµÛ¿é¤J dw §R°£±¼¸Ó³æµü¡C + + ¯S§O´£¥Ü¡J±z©Ò¿é¤Jªº dw ·|¦b±z¿é¤Jªº¦P®É¥X²{¦b«Ì¹õªº³Ì«á¤@¦æ¡C¦pªG±z¿é + ¤J¦³»~¡A½Ð«ö¤U Áä¨ú®ø¡AµM«á­«·s¦A¨Ó¡C + +---> There are a some words fun that don't belong paper in this sentence. + + 5. ­«´_¨BÆJ3¦Ü¨BÆJ4¡Aª½¦Ü¥y¤l­×¥¿§¹²¦¡C±µµÛÄ~Äò²Ä¤GÁ¿²Ä¤G¸`¤º®e¡C + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤GÁ¿²Ä¤G¸`¡J¨ä¥L§R°£Ãþ©R¥O + + + ** ¿é¤J d$ ±q·í«e¥ú¼Ð§R°£¨ì¦æ¥½¡C** + + 1. ½Ð«ö¤U Áä½T«O±z³B¤_¥¿±`¼Ò¦¡¡C + + 2. ½Ð±N¥ú¼Ð²¾°Ê¨ì¥»¸`¤¤¤U­±¼Ð°O¦³ ---> ªº¨º¤@¦æ¡C + + 3. ½Ð±N¥ú¼Ð²¾°Ê¨ì¸Ó¦æªº§À³¡(¤]´N¬O¦b²Ä¤@­ÓÂI¸¹¡¥.¡¦«á­±)¡C + + 4. µM«á¿é¤J d$ ±q¥ú¼Ð³B§R¦Ü·í«e¦æ§À³¡¡C + +---> Somebody typed the end of this line twice. end of this line twice. + + + 5. ½ÐÄ~Äò¾Ç²ß²Ä¤GÁ¿²Ä¤T¸`´Nª¾¹D¬O«ç»ò¦^¨Æ¤F¡C + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤GÁ¿²Ä¤T¸`¡JÃö¤_©R¥O©M¹ï¶H + + + §R°£©R¥O d ªº®æ¦¡¦p¤U¡J + + [number] d object ©ÎªÌ d [number] object + + ¨ä·N¦p¤U¡J + number - ¥Nªí°õ¦æ©R¥Oªº¦¸¼Æ(¥i¿ï¶µ¡A¯Ê¬Ù³]¸m¬° 1 )¡C + d - ¥Nªí§R°£¡C + object - ¥Nªí©R¥O©Ò­n¾Þ§@ªº¹ï¶H(¤U­±¦³¬ÛÃö¤¶²Ð)¡C + + ¤@­Ó²µuªº¹ï¶H¦Cªí¡J + w - ±q·í«e¥ú¼Ð·í«e¦ì¸mª½¨ì³æ¦r/³æµü¥½§À¡A¥]¬AªÅ®æ¡C + e - ±q·í«e¥ú¼Ð·í«e¦ì¸mª½¨ì³æ¦r/³æµü¥½§À¡A¦ý¬O *¤£* ¥]¬AªÅ®æ¡C + $ - ±q·í«e¥ú¼Ð·í«e¦ì¸mª½¨ì·í«e¦æ¥½¡C + +¯S§O´£¥Ü¡J + ¹ï¤_«i¤_±´¯ÁªÌ¡A½Ð¦b¥¿±`¼Ò¦¡¤U­±¶È«ö¥Nªí¬ÛÀ³¹ï¶HªºÁä¦Ó¤£¨Ï¥Î©R¥O¡A«h + ±N¬Ý¨ì¥ú¼Ðªº²¾°Ê¥¿¦p¤W­±ªº¹ï¶H¦Cªí©Ò¥Nªíªº¤@¼Ë¡C + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤GÁ¿²Ä¥|¸`¡J¹ï¶H©R¥Oªº¯S®í±¡ªp + + + ** ¿é¤J dd ¥i¥H§R°£¾ã¤@­Ó·í«e¦æ¡C ** + + ų¤_¾ã¦æ§R°£ªº°ªÀW«×¡AVIM ªº³]­pªÌ¨M©w­n²¤Æ¾ã¦æ§R°£¡A¶È»Ý­n¦b¦P¤@¦æ¤W + À»¥´¨â¦¸ d ´N¥i¥H§R°£±¼¥ú¼Ð©Ò¦bªº¾ã¦æ¤F¡C + + 1. ½Ð±N¥ú¼Ð²¾°Ê¨ì¥»¸`¤¤¤U­±ªºµu¥y¬q¸¨¤¤ªº²Ä¤G¦æ¡C + 2. ¿é¤J dd §R°£¸Ó¦æ¡C + 3. µM«á²¾°Ê¨ì²Ä¥|¦æ¡C + 4. ±µµÛ¿é¤J 2dd (ÁÙ°O±o«e­±Á¿¹Lªº number-command-object ¶Ü¡H) §R°£¨â¦æ¡C + + 1) Roses are red, + 2) Mud is fun, + 3) Violets are blue, + 4) I have a car, + 5) Clocks tell time, + 6) Sugar is sweet + 7) And so are you. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤GÁ¿²Ä¤­¸`¡JºM®øÃþ©R¥O + + + ** ¿é¤J u ¨ÓºM®ø³Ì«á°õ¦æªº©R¥O¡A¿é¤J U ¨Ó­×¥¿¾ã¦æ¡C** + + 1. ½Ð±N¥ú¼Ð²¾°Ê¨ì¥»¸`¤¤¤U­±¼Ð°O¦³ ---> ªº¨º¤@¦æ¡A¨Ã±N¨ä¸m¤_²Ä¤@­Ó¿ù»~ + ³B¡C + 2. ¿é¤J x §R°£²Ä¤@­Ó¤£·Q«O¯dªº¦r¥À¡C + 3. µM«á¿é¤J u ºM®ø³Ì«á°õ¦æªº(¤@¦¸)©R¥O¡C + 4. ³o¦¸­n¨Ï¥Î x ­×¥¿¥»¦æªº©Ò¦³¿ù»~¡C + 5. ²{¦b¿é¤J¤@­Ó¤j¼gªº U ¡A«ì´_¨ì¸Ó¦æªº­ì©lª¬ºA¡C + 6. ±µµÛ¦h¦¸¿é¤J u ¥HºM®ø U ¥H¤Î§ó«eªº©R¥O¡C + 7. µM«á¦h¦¸¿é¤J CTRL-R (¥ý«ö¤U CTRL Á䤣©ñ¶}¡A±µµÛ¿é¤J R Áä) ¡A³o¼Ë´N + ¥i¥H°õ¦æ«ì´_©R¥O¡A¤]´N¬OºM®ø±¼ºM®ø©R¥O¡C + +---> Fiix the errors oon thhis line and reeplace them witth undo. + + 8. ³o¨Ç³£¬O«D±`¦³¥Îªº©R¥O¡C¤U­±¬O²Ä¤GÁ¿ªº¤pµ²¤F¡C + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤GÁ¿¤pµ² + + + 1. ±ý±q·í«e¥ú¼Ð§R°£¦Ü³æ¦r/³æµü¥½§À¡A½Ð¿é¤J¡Jdw + + 2. ±ý±q·í«e¥ú¼Ð§R°£¦Ü·í«e¦æ¥½§À¡A½Ð¿é¤J¡Jd$ + + 3. ±ý§R°£¾ã¦æ¡A½Ð¿é¤J¡Jdd + + 4. ¦b¥¿±`¼Ò¦¡¤U¤@­Ó©R¥Oªº®æ¦¡¬O¡J + + [number] command object ©ÎªÌ command [number] object + ¨ä·N¬O¡J + number - ¥Nªíªº¬O©R¥O°õ¦æªº¦¸¼Æ + command - ¥Nªí­n°µªº¨Æ±¡¡A¤ñ¦p d ¥Nªí§R°£ + object - ¥Nªí­n¾Þ§@ªº¹ï¶H¡A¤ñ¦p w ¥Nªí³æ¦r/³æµü¡A$ ¥Nªí¨ì¦æ¥½µ¥µ¥¡C + $ (to the end of line), etc. + + 5. ±ýºM®ø¥H«eªº¾Þ§@¡A½Ð¿é¤J¡Ju (¤p¼gªºu) + ±ýºM®ø¦b¤@¦æ¤¤©Ò°µªº§ï°Ê¡A½Ð¿é¤J¡JU (¤j¼gªºU) + ±ýºM®ø¥H«eªººM®ø©R¥O¡A«ì´_¥H«eªº¾Þ§@µ²ªG¡A½Ð¿é¤J¡JCTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤TÁ¿²Ä¤@¸`¡J¸m¤JÃþ©R¥O + + + ** ¿é¤J p ±N³Ì«á¤@¦¸§R°£ªº¤º®e¸m¤J¥ú¼Ð¤§«á ** + + 1. ½Ð±N¥ú¼Ð²¾°Ê¨ì¥»¸`¤¤¤U­±¥Ü­S¬q¸¨ªº­º¦æ¡C + + 2. ¿é¤J dd ±N¸Ó¦æ§R°£¡A³o¼Ë·|±N¸Ó¦æ«O¦s¨ìvimªº½w¨R°Ï¤¤¡C + + 3. ±µµÛ±N¥ú¼Ð²¾°Ê¨ì·Ç³Æ¸m¤Jªº¦ì¸mªº¤W¤è¡C°O¦í¡J¬O¤W¤è®@¡C + + 4. µM«á¦b¥¿±`¼Ò¦¡¤U(Áä¶i¤J)¡A¿é¤J p ±N¸Ó¦æÖß¶K¸m¤J¡C + + 5. ­«´_¨BÆJ2¦Ü¨BÆJ4¡A±N©Ò¦³ªº¦æ¨Ì§Ç©ñ¸m¨ì¥¿½Tªº¦ì¸m¤W¡C + + d) Can you learn too? + b) Violets are blue, + c) Intelligence is learned, + a) Roses are red, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤TÁ¿²Ä¤G¸`¡J´À´«Ãþ©R¥O + + + ** ¿é¤J r ©M¤@­Ó¦r²Å´À´«¥ú¼Ð©Ò¦b¦ì¸mªº¦r²Å¡C** + + 1. ½Ð±N¥ú¼Ð²¾°Ê¨ì¥»¸`¤¤¤U­±¼Ð°O¦³ ---> ªº²Ä¤@¦æ¡C + + 2. ½Ð²¾°Ê¥ú¼Ð¨ì²Ä¤@­Ó¿ù»~ªº¾A·í¦ì¸m¡C + + 3. ±µµÛ¿é¤J r ¡A³o¼Ë´N¯à±N¿ù»~´À´«±¼¤F¡C + + 4. ­«´_¨BÆJ2©M¨BÆJ3¡Aª½¨ì²Ä¤@¦æ¤w¸g­×§ï§¹²¦¡C + +---> Whan this lime was tuoed in, someone presswd some wrojg keys! +---> When this line was typed in, someone pressed some wrong keys! + + 5. µM«á§Ú­ÌÄ~Äò¾Ç®Õ²Ä¤TÁ¿²Ä¤T¸`¡C + +¯S§O´£¥Ü¡J¤Á°O±z­n¦b¨Ï¥Î¤¤¾Ç²ß¡A¦Ó¤£¬O¦b°O¾Ð¤¤¾Ç²ß¡C + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤TÁ¿²Ä¤T¸`¡J§ó§ïÃþ©R¥O + + + ** ­n§ïÅܤ@­Ó³æ¦r/³æµüªº³¡¤À©ÎªÌ¥þ³¡¡A½Ð¿é¤J cw ** + + 1. ½Ð±N¥ú¼Ð²¾°Ê¨ì¥»¸`¤¤¤U­±¼Ð°O¦³ ---> ªº²Ä¤@¦æ¡C + + 2. ±µµÛ§â¥ú¼Ð©ñ¦b³æµü lubw ªº¦r¥À u ªº¦ì¸m¨º¸Ì¡C + + 3. µM«á¿é¤J cw ´N¥i¥H­×¥¿¸Ó³æµü¤F(¦b¥»¨Ò³o¸Ì¬O¿é¤J ine ¡C) + + 4. ³Ì«á«ö Áä¡AµM«á¥ú¼Ð©w¦ì¨ì¤U¤@­Ó¿ù»~²Ä¤@­Ó·Ç³Æ§ó§ïªº¦r¥À³B¡C + + 5. ­«´_¨BÆJ3©M¨BÆJ4¡Aª½¨ì²Ä¤@­Ó¥y¤l§¹¥þ¹p¦P²Ä¤G­Ó¥y¤l¡C + +---> This lubw has a few wptfd that mrrf changing usf the change command. +---> This line has a few words that need changing using the change command. + +´£¥Ü¡J½Ðª`·N cw ©R¥O¤£¶È¶È¬O´À´«¤F¤@­Ó³æµü¡A¤]Åý±z¶i¤J¤å¥»´¡¤Jª¬ºA¤F¡C + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤TÁ¿²Ä¥|¸`¡J¨Ï¥Îc«ü¥Oªº¨ä¥L§ó§ïÃþ©R¥O + + + ** §ó§ïÃþ«ü¥O¥i¥H¨Ï¥Î¦P§R°£Ãþ©R¥O©Ò¨Ï¥Îªº¹ï¶H°Ñ¼Æ¡C** + + 1. §ó§ïÃþ«ü¥Oªº¤u§@¤è¦¡¸ò§R°£Ãþ©R¥O¬O¤@­Pªº¡C¾Þ§@®æ¦¡¬O¡J + + [number] c object ©ÎªÌ c [number] object + + 2. ¹ï¶H°Ñ¼Æ¤]¬O¤@¼Ëªº¡A¤ñ¦p w ¥Nªí³æ¦r/³æµü¡A$¥Nªí¦æ¥½µ¥µ¥¡C + + 3. ½Ð±N¥ú¼Ð²¾°Ê¨ì¥»¸`¤¤¤U­±¼Ð°O¦³ ---> ªº²Ä¤@¦æ¡C + + 4. ±µµÛ±N¥ú¼Ð²¾°Ê¨ì²Ä¤@­Ó¿ù»~³B¡C + + 5. µM«á¿é¤J c$ ¨Ï±o¸Ó¦æ³Ñ¤Uªº³¡¤À§ó¥¿±o¦P²Ä¤G¦æ¤@¼Ë¡C³Ì«á«ö Áä¡C + +---> The end of this line needs some help to make it like the second. +---> The end of this line needs to be corrected using the c$ command. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤TÁ¿¤pµ² + + + 1. ­n­«·s¸m¤J¤w¸g§R°£ªº¤å¥»¤º®e¡A½Ð¿é¤J¤p¼g¦r¥À p¡C¸Ó¾Þ§@¥i¥H±N¤w§R°£ + ªº¤å¥»¤º®e¸m¤_¥ú¼Ð¤§«á¡C¦pªG³Ì«á¤@¦¸§R°£ªº¬O¤@­Ó¾ã¦æ¡A¨º»ò¸Ó¦æ±N¸m + ¤_·í«e¥ú¼Ð©Ò¦b¦æªº¤U¤@¦æ¡C + + 2. ­n´À´«¥ú¼Ð©Ò¦b¦ì¸mªº¦r²Å¡A½Ð¿é¤J¤p¼gªº r ©M­n´À´«±¼­ì¦ì¸m¦r²Åªº·s¦r + ²Å§Y¥i¡C + + 3. §ó§ïÃþ©R¥O¤¹³\±z§ïÅÜ«ü©wªº¹ï¶H¡A±q·í«e¥ú¼Ð©Ò¦b¦ì¸mª½¨ì¹ï¶Hªº¥½§À¡C + ¤ñ¦p¿é¤J cw ¥i¥H´À´«·í«e¥ú¼Ð¨ì³æµüªº¥½§Àªº¤º®e¡F¿é¤J c$ ¥i¥H´À´«·í + «e¥ú¼Ð¨ì¦æ¥½ªº¤º®e¡C + + 4. §ó§ïÃþ©R¥Oªº®æ¦¡¬O¡J + + [number] c object ©ÎªÌ c [number] object + +¤U­±§Ú­ÌÄ~Äò¾Ç²ß¤U¤@Á¿¡C + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¥|Á¿²Ä¤@¸`¡J©w¦ì¤Î¤å¥óª¬ºA + + + ** ¿é¤J CTRL-g Åã¥Ü·í«e½s¿è¤å¥ó¤¤·í«e¥ú¼Ð©Ò¦b¦æ¦ì¸m¥H¤Î¤å¥óª¬ºA«H®§¡C + ¿é¤J SHIFT-G «hª½±µ¸õÂà¨ì¤å¥ó¤¤ªº¬Y¤@«ü©w¦æ¡C** + + ´£¥Ü¡J¤Á°O­n¥ý³qŪ¥»¸`¤º®e¡A¤§«á¤~¥i¥H°õ¦æ¥H¤U¨BÆJ!!! + + 1. «ö¤U CTRL Á䤣©ñ¶}µM«á«ö g Áä¡CµM«á´N·|¬Ý¨ì­¶­±³Ì©³³¡¥X²{¤@­Óª¬ºA«H + ®§¦æ¡AÅã¥Üªº¤º®e¬O·í«e½s¿èªº¤å¥ó¦W©M¤å¥óªºÁ`¦æ¼Æ¡C½Ð°O¦í¨BÆJ3ªº¦æ¸¹¡C + + 2. «ö¤U SHIFT-G Áä¥i¥H¨Ï±o·í«e¥ú¼Ðª½±µ¸õÂà¨ì¤å¥ó³Ì«á¤@¦æ¡C + + 3. ¿é¤J±z´¿°±¯dªº¦æ¸¹¡AµM«á«ö¤U SHIFT-G¡C³o¼Ë´N¥i¥Hªð¦^¨ì±z²Ä¤@¦¸«ö¤U + CTRL-g ®É©Ò¦bªº¦æ¦n¤F¡Cª`·N¡J¿é¤J¦æ¸¹®É¡A¦æ¸¹¬O¤£·|¦b«Ì¹õ¤WÅã¥Ü¥X¨Ó + ªº¡C + + 4. ¦pªGÄ@·N¡A±z¥i¥HÄ~Äò°õ¦æ¨BÆJ1¦Ü¨BÆJ¤T¡C + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¥|Á¿²Ä¤G¸`¡J·j¯ÁÃþ©R¥O + + + ** ¿é¤J / ¥H¤Î§ÀÀHªº¦r²Å¦ê¥i¥H¥Î¥H¦b·í«e¤å¥ó¤¤¬d§ä¸Ó¦r²Å¦ê¡C** + + 1. ¦b¥¿±`¼Ò¦¡¤U¿é¤J / ¦r²Å¡C±z¦¹®É·|ª`·N¨ì¸Ó¦r²Å©M¥ú¼Ð³£·|¥X²{¦b«Ì¹õ©³ + ³¡¡A³o¸ò : ©R¥O¬O¤@¼Ëªº¡C + + 2. ±µµÛ¿é¤J errroor <¦^¨®>¡C¨º­Óerrroor´N¬O±z­n¬d§äªº¦r²Å¦ê¡C + + 3. ­n¬d§ä¦P¤W¤@¦¸ªº¦r²Å¦ê¡A¥u»Ý­n«ö n Áä¡C­n¦V¬Û¤Ï¤è¦V¬d§ä¦P¤W¤@¦¸ªº¦r + ²Å¦ê¡A½Ð¿é¤J Shift-N §Y¥i¡C + + 4. ¦pªG±z·Q°f¦V¬d§ä¦r²Å¦ê¡A½Ð¨Ï¥Î ? ¥N´À / ¶i¦æ¡C + +---> When the search reaches the end of the file it will continue at the start. + + "errroor" is not the way to spell error; errroor is an error. + + ´£¥Ü¡J¦pªG¬d§ä¤w¸g¨ì¹F¤å¥ó¥½§À¡A¬d§ä·|¦Û°Ê±q¤å¥óÀY³¡Ä~Äò¬d§ä¡C + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¥|Á¿²Ä¤T¸`¡J°t¹ï¬A¸¹ªº¬d§ä + + + ** «ö % ¥i¥H¬d§ä°t¹ïªº¬A¸¹ )¡B]¡B}¡C** + + 1. §â¥ú¼Ð©ñ¦b¥»¸`¤U­±¼Ð°O¦³ --> ¨º¤@¦æ¤¤ªº¥ô¦ó¤@­Ó (¡B[ ©Î { ³B¡C + + 2. ±µµÛ«ö % ¦r²Å¡C + + 3. ¦¹®É¥ú¼Ðªº¦ì¸mÀ³·í¬O¦b°t¹ïªº¬A¸¹³B¡C + + 4. ¦A¦¸«ö % ´N¥i¥H¸õ¦^°t¹ïªº²Ä¤@­Ó¬A¸¹³B¡C + +---> This ( is a test line with ('s, ['s ] and {'s } in it. )) + +´£¥Ü¡J¦bµ{§Ç½Õ¸Õ®É¡A³o­Ó¥\¯à¥Î¨Ó¬d§ä¤£°t¹ïªº¬A¸¹¬O«Ü¦³¥Îªº¡C + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¥|Á¿²Ä¥|¸`¡J­×¥¿¿ù»~ªº¤èªk¤§¤@ + + + ** ¿é¤J :s/old/new/g ¥i¥H´À´« old ¬° new¡C** + + 1. ½Ð±N¥ú¼Ð²¾°Ê¨ì¥»¸`¤¤¤U­±¼Ð°O¦³ ---> ªº¨º¤@¦æ¡C + + 2. ¿é¤J :s/thee/the <¦^¨®> ¡C½Ðª`·N¸Ó©R¥O¥u§ïÅÜ¥ú¼Ð©Ò¦b¦æªº²Ä¤@­Ó¤Ç°t + ¦ê¡C + + 3. ¿é¤J :s/thee/the/g «h¬O´À´«¥þ¦æªº¤Ç°t¦ê¡C + +---> the best time to see thee flowers is in thee spring. + + 4. ­n´À´«¨â¦æ¤§¶¡¥X²{ªº¨C­Ó¤Ç°t¦ê¡A½Ð¿é¤J :#,#s/old/new/g (#,#¥Nªíªº¬O + ¨â¦æªº¦æ¸¹)¡C¿é¤J :%s/old/new/g «h¬O´À´«¾ã­Ó¤å¥ó¤¤ªº¨C­Ó¤Ç°t¦ê¡C + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¥|Á¿¤pµ² + + + 1. Ctrl-g ¥Î¤_Åã¥Ü·í«e¥ú¼Ð©Ò¦b¦ì¸m©M¤å¥óª¬ºA«H®§¡CShift-G ¥Î¤_±N¥ú¼Ð¸õ + Âà¦Ü¤å¥ó³Ì«á¤@¦æ¡C¥ýºV¤J¤@­Ó¦æ¸¹µM«á«ö Shift-G «h¬O±N¥ú¼Ð²¾°Ê¦Ü¸Ó¦æ + ¸¹¥Nªíªº¦æ¡C + + 2. ¿é¤J / µM«áºòÀH¤@­Ó¦r²Å¦ê¬O«h¬O¦b·í«e©Ò½s¿èªº¤åÀɤ¤¦V«á¬d§ä¸Ó¦r²Å¦ê¡C + ¿é¤J°Ý¸¹ ? µM«áºòÀH¤@­Ó¦r²Å¦ê¬O«h¬O¦b·í«e©Ò½s¿èªº¤åÀɤ¤¦V«e¬d§ä¸Ó¦r + ²Å¦ê¡C§¹¦¨¤@¦¸¬d§ä¤§«á«ö n Áä«h¬O­«´_¤W¤@¦¸ªº©R¥O¡A¥i¦b¦P¤@¤è¦V¤W¬d + §ä¤U¤@­Ó¦r²Å¦ê©Ò¦b¡F©ÎªÌ«ö Shift-N ¦V¬Û¤Ï¤è¦V¬d§ä¤U¸Ó¦r²Å¦ê©Ò¦b¡C + + 3. ¦pªG¥ú¼Ð·í«e¦ì¸m¬O¬A¸¹(¡B)¡B[¡B]¡B{¡B}¡A«ö % ¥i¥H±N¥ú¼Ð²¾°Ê¨ì°t¹ïªº + ¬A¸¹¤W¡C + + 4. ¦b¤@¦æ¤º´À´«ÀY¤@­Ó¦r²Å¦ê old ¬°·sªº¦r²Å¦ê new¡A½Ð¿é¤J :s/old/new + ¦b¤@¦æ¤º´À´«©Ò¦³ªº¦r²Å¦ê old ¬°·sªº¦r²Å¦ê new¡A½Ð¿é¤J :s/old/new/g + ¦b¨â¦æ¤º´À´«©Ò¦³ªº¦r²Å¦ê old ¬°·sªº¦r²Å¦ê new¡A½Ð¿é¤J :#,#s/old/new/g + ¦b¤å¥ó¤º´À´«©Ò¦³ªº¦r²Å¦ê old ¬°·sªº¦r²Å¦ê new¡A½Ð¿é¤J :%s/old/new/g + ¶i¦æ¥þ¤å´À´«®É¸ß°Ý¥Î¤á½T»{¨C­Ó´À´«»Ý²K¥[ c ¿ï¶µ¡A½Ð¿é¤J :%s/old/new/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤­Á¿²Ä¤@¸`¡J¦b VIM ¤º°õ¦æ¥~³¡©R¥Oªº¤èªk + + + ** ¿é¤J :! µM«áºòÀHµÛ¿é¤J¤@­Ó¥~³¡©R¥O¥i¥H°õ¦æ¸Ó¥~³¡©R¥O¡C** + + 1. «ö¤U§Ú­Ì©Ò¼ô±xªº : ©R¥O³]¸m¥ú¼Ð¨ì«Ì¹õ©³³¡¡C³o¼Ë´N¥i¥HÅý±z¿é¤J©R¥O¤F¡C + + 2. ±µµÛ¿é¤J·P¹Ä¸¹ ! ³o­Ó¦r²Å¡A³o¼Ë´N¤¹³\±z°õ¦æ¥~³¡ªº shell ©R¥O¤F¡C + + 3. §Ú­Ì¥H ls ©R¥O¬°¨Ò¡C¿é¤J !ls <¦^¨®> ¡C¸Ó©R¥O´N·|¦CÁ|¥X±z·í«e¥Ø¿ýªº + ¤º®e¡A´N¦p¦P±z¦b©R¥O¦æ´£¥Ü²Å¤U¿é¤J ls ©R¥Oªºµ²ªG¤@¼Ë¡C¦pªG !ls ¨S°_ + §@¥Î¡A±z¥i¥H¸Õ¸Õ :!dir ¬Ý¬Ý¡C + +---> ´£¥Ü¡J ©Ò¦³ªº¥~³¡©R¥O³£¥i¥H¥H³oºØ¤è¦¡°õ¦æ¡C + +---> ´£¥Ü¡J ©Ò¦³ªº : ©R¥O³£¥²¶·¥H <¦^¨®> §i²×¡C + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤­Á¿²Ä¤G¸`¡JÃö¤_«O¦s¤å¥óªº§ó¦h«H®§ + + + ** ­n±N¹ï¤å¥óªº§ï°Ê«O¦s¨ì¤å¥ó¤¤¡A½Ð¿é¤J :w FILENAME ** + + 1. ¿é¤J :!dir ©ÎªÌ :!ls Àòª¾·í«e¥Ø¿ýªº¤º®e¡C±zÀ³·í¤wª¾¹D³Ì«áÁÙ±oºV + <¦^¨®> §a¡C + + 2. ¿ï¾Ü¤@­Ó©|¥¼¦s¦b¤å¥ó¦W¡A¤ñ¦p TEST ¡C + + 3. ±µµÛ¿é¤J :w TEST (¦¹³B TEST ¬O±z©Ò¿ï¾Üªº¤å¥ó¦W¡C) + + 4. ¸Ó©R¥O·|¥H TEST ¬°¤å¥ó¦W«O¦s¾ã­Ó¤å¥ó (VIM ±Ðµ{)¡C¬°¤F½T«O¥¿½T«O¦s¡A + ½Ð¦A¦¸¿é¤J :!dir ¬d¬Ý±zªº¥Ø¿ý¦Cªí¤º®e¡C + +---> ½Ðª`·N¡J¦pªG±z°h¥X VIM µM«á¦b¥H¤å¥ó¦W TEST ¬°°Ñ¼Æ¶i¤J¡A¨º»ò¸Ó¤å¥ó¤º + ®eÀ³¸Ó¦P±z«O¦s®Éªº¤å¥ó¤º®e¬O§¹¥þ¤@¼Ëªº¡C + + 5. ²{¦b±z¥i¥H³q¹L¿é¤J :!rm TEST ¨Ó§R°£ TEST ¤å¥ó¤F¡C + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤­Á¿²Ä¤T¸`¡J¤@­Ó¨ã¦³¿ï¾Ü©Êªº«O¦s©R¥O + + + ** ­n«O¦s¤å¥óªº³¡¤À¤º®e¡A½Ð¿é¤J :#,# w FILENAME ** + + 1. ¦A¨Ó°õ¦æ¤@¦¸ :!dir ©ÎªÌ :!ls Àòª¾·í«e¥Ø¿ýªº¤º®e¡AµM«á¿ï¾Ü¤@­Ó¦X¾Aªº + ¤£­«¦Wªº¤å¥ó¦W¡A¤ñ¦p TEST ¡C + + 2. ±µµÛ±N¥ú¼Ð²¾°Ê¦Ü¥»­¶ªº³Ì³»ºÝ¡AµM«á«ö CTRL-g §ä¨ì¸Ó¦æªº¦æ¸¹¡C§O§Ñ¤F + ¦æ¸¹®@¡C + + 3. ±µµÛ§â¥ú¼Ð²¾°Ê¦Ü¥»­¶ªº³Ì©³ºÝ¡A¦A«ö¤@¦¸ CTRL-g ¡C¤]§O§Ñ¤F³o­Ó¦æ¦n®@¡C + + 4. ¬°¤F¥u«O¦s¤å³¹ªº¬Y­Ó³¡¤À¡A½Ð¿é¤J :#,# w TEST ¡C³o¸Ìªº #,# ´N¬O¤W­± + ­n¨D±z°O¦íªº¦æ¸¹(³»ºÝ¦æ¸¹,©³ºÝ¦æ¸¹)¡A¦Ó TEST ´N¬O¿ï©wªº¤å¥ó¦W¡C + + 5. ³Ì«á¡A¥Î :!dir ½T»{¤å¥ó¬O§_¥¿½T«O¦s¡C¦ý¬O³o¦¸¥ý§O§R°£±¼¡C + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤­Á¿²Ä¥|¸`¡J´£¨ú©M¦X¨Ã¤å¥ó + + + ** ­n¦V·í«e¤å¥ó¤¤´¡¤J¥t¥~ªº¤å¥óªº¤º®e¡A½Ð¿é¤J :r FILENAME ** + + 1. ½ÐÁä¤J :!dir ½T»{±z«e­±³Ð«Øªº TEST ¤å¥óÁÙ¦b¡C + + 2. µM«á±N¥ú¼Ð²¾°Ê¦Ü·í«e­¶­±ªº³»ºÝ¡C + +¯S§O´£¥Ü¡J °õ¦æ¨BÆJ3¤§«á±z±N¬Ý¨ì²Ä¤­Á¿²Ä¤T¸`¡A½Ð©¡®É¦A©¹¤U²¾°Ê¦^¨ì³o¸Ì¨Ó¡C + + 3. ±µµÛ³q¹L :r TEST ±N«e­±³Ð«Øªº¦W¬° TEST ªº¤å¥ó´£¨ú¶i¨Ó¡C + +¯S§O´£¥Ü¡J±z©Ò´£¨ú¶i¨Óªº¤å¥ó±N±q¥ú¼Ð©Ò¦b¦ì¸m³B¶}©l¸m¤J¡C + + 4. ¬°¤F½T»{¤å¥ó¤w¸g´£¨ú¦¨¥\¡A²¾°Ê¥ú¼Ð¦^¨ì­ì¨Óªº¦ì¸m´N¥i¥Hª`·N¦³¨â¥÷²Ä + ¤­Á¿²Ä¤T¸`¡A¤@¥÷¬O­ì¥»¡A¥t¥~¤@¥÷¬O¨Ó¦Û¤å¥óªº°Æ¥»¡C + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤­Á¿¤pµ² + + + 1. :!command ¥Î¤_°õ¦æ¤@­Ó¥~³¡©R¥O command¡C + + ½Ð¬Ý¤@¨Ç¹ê»Ú¨Ò¤l¡J + :!dir - ¥Î¤_Åã¥Ü·í«e¥Ø¿ýªº¤º®e¡C + :!rm FILENAME - ¥Î¤_§R°£¦W¬° FILENAME ªº¤å¥ó¡C + + 2. :w FILENAME ¥i±N·í«e VIM ¤¤¥¿¦b½s¿èªº¤å¥ó«O¦s¨ì¦W¬° FILENAME + ªº¤å¥ó¤¤¡C + + 3. :#,#w FILENAME ¥i±N·í«e½s¿è¤å¥ó²Ä # ¦æ¦Ü²Ä # ¦æªº¤º®e«O¦s¨ì¤å¥ó + FILENAME ¤¤¡C + + 4. :r FILENAME ¥i´£¨úºÏ½L¤å¥ó FILENAME ¨Ã±N¨ä´¡¤J¨ì·í«e¤å¥óªº¥ú¼Ð¦ì¸m + «á­±¡C + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤»Á¿²Ä¤@¸`¡J¥´¶}Ãþ©R¥O + + + ** ¿é¤J o ±N¦b¥ú¼Ðªº¤U¤è¥´¶}·sªº¤@¦æ¨Ã¶i¤J´¡¤J¼Ò¦¡¡C** + + 1. ½Ð±N¥ú¼Ð²¾°Ê¨ì¥»¸`¤¤¤U­±¼Ð°O¦³ ---> ªº¨º¤@¦æ¡C + + 2. ±µµÛ¿é¤J¤p¼gªº o ¦b¥ú¼Ð *¤U¤è* ¥´¶}·sªº¤@¦æ¨Ã¶i¤J´¡¤J¼Ò¦¡¡C + + 3. µM«á´_¨î¼Ð°O¦³ ---> ªº¦æ¨Ã«ö Áä°h¥X´¡¤J¼Ò¦¡¦Ó¶i¤J¥¿±`¼Ò¦¡¡C + +---> After typing o the cursor is placed on the open line in Insert mode. + + 4. ¬°¤F¦b¥ú¼Ð *¤W¤è* ¥´¶}·sªº¤@¦æ¡A¥u»Ý­n¿é¤J¤j¼gªº O ¦Ó¤£¬O¤p¼gªº o + ´N¥i¥H¤F¡C½Ð¦b¤U¦æ´ú¸Õ¤@¤U§a¡C·í¥ú¼Ð³B¦b¦b¸Ó¦æ¤W®É¡A«ö Shift-O¥i¥H + ¦b¸Ó¦æ¤W¤è·s¶}¤@¦æ¡C + +Open up a line above this by typing Shift-O while the cursor is on this line. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤»Á¿²Ä¤G¸`¡J¥ú¼Ð«á´¡¤JÃþ©R¥O + + + ** ¿é¤J a ±N¥i¦b¥ú¼Ð¤§«á´¡¤J¤å¥»¡C ** + + 1. ½Ð¦b¥¿±`¼Ò¦¡¤U³q¹L¿é¤J $ ±N¥ú¼Ð²¾°Ê¨ì¥»¸`¤¤¤U­±¼Ð°O¦³ ---> ªº²Ä¤@¦æ + ªº¥½§À¡C + + 2. ±µµÛ¿é¤J¤p¼gªº a «h¥i¦b¥ú¼Ð¤§«á´¡¤J¤å¥»¤F¡C¤j¼gªº A «h¥i¥Hª½±µ¦b¦æ + ¥½´¡¤J¤å¥»¡C + +´£¥Ü¡J¿é¤J¤j¼g A ªº¾Þ§@¤èªk¥i¥H¦b¦æ¥½´¡¤J¤å¥»¡AÁ×§K¤F¿é¤J i¡A¥ú¼Ð©w¦ì¨ì + ³Ì«á¤@­Ó¦r²Å¡A¿é¤Jªº¤å¥»¡A ¦^´_¥¿±`¼Ò¦¡¡A½bÀY¥kÁä²¾°Ê¥ú¼Ð¥H¤Î + x §R°£·í«e¥ú¼Ð©Ò¦b¦ì¸m¦r²Åµ¥µ¥½Ñ¦hÁcÂøªº¾Þ§@¡C + + 3. ¾Þ§@¤§«á²Ä¤@¦æ´N¥i¥H¸É¥R§¹¾ã¤F¡C½Ðª`·N¥ú¼Ð«á´¡¤J¤å¥»»P´¡¤J¼Ò¦¡¬O°ò + ¥»§¹¥þ¤@­Pªº¡A¥u¬O¤å¥»´¡¤Jªº¦ì¸m©w¦ìµy¦³¤£¦P½}¤F¡C + +---> This line will allow you to practice +---> This line will allow you to practice appending text to the end of a line. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤»Á¿²Ä¤T¸`¡J¥t¥~¤@­Ó¸m´«Ãþ©R¥Oªºª©¥» + + + ** ¿é¤J¤j¼gªº R ¥i³sÄò´À´«¦h­Ó¦r²Å¡C** + + 1. ½Ð±N¥ú¼Ð²¾°Ê¨ì¥»¸`¤¤¤U­±¼Ð°O¦³ ---> ªº²Ä¤@¦æ¡C + + 2. ²¾°Ê¥ú¼Ð¨ì²Ä¤@¦æ¤¤¤£¦P¤_¼Ð¦³ ---> ªº²Ä¤G¦æªº²Ä¤@­Ó³æµüªº¶}©l¡A§Y³æ + µü last ³B¡C + + 3. µM«á¿é¤J¤j¼gªº R ¶}©l§â²Ä¤@¦æ¤¤ªº¤£¦P¤_²Ä¤G¦æªº³Ñ§E¦r²Å³v¤@¿é¤J¡A´N + ¥i¥H¥þ³¡´À´«±¼­ì¦³ªº¦r²Å¦Ó¨Ï±o²Ä¤@¦æ§¹¥þ¹p¦P²Ä¤G¦æ¤F¡C + +---> To make the first line the same as the last on this page use the keys. +---> To make the first line the same as the second, type R and the new text. + + 4. ½Ðª`·N¡J¦pªG±z«ö °h¥X¸m´«¼Ò¦¡¦^´_¥¿±`¼Ò¦¡¡A©|¥¼´À´«ªº¤å¥»±N¤´ + µM«O«ù­ìª¬¡C + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤»Á¿²Ä¥|¸`¡J³]¸mÃþ©R¥Oªº¿ï¶µ + + + ** ³]¸m¥i¨Ï¬d§ä©ÎªÌ´À´«¥i©¿²¤¤j¤p¼gªº¿ï¶µ ** + + + 1. ­n¬d§ä³æµü ignore ¥i¦b¥¿±`¼Ò¦¡¤U¿é¤J /ignore ¡C­n­«´_¬d§ä¸Óµü¡A¥i¥H + ­«´_«ö n Áä¡C + + 2. µM«á³]¸m ic ¿ï¶µ(ic´N¬O­^¤å©¿²¤¤j¤p¼gIgnore Caseªº­º¦r¥ÀÁY¼gµü)¡A§Y + ¿é¤J¡J + :set ic + + 3. ²{¦b¥i¥H³q¹LÁä¤J n Áä¦A¦¸¬d§ä³æµü ignore¡C­«´_¬d§ä¥i¥H­«´_Áä¤J n Áä¡C + + 4. µM«á³]¸m hlsearch ©M incsearch ³o¨â­Ó¿ï¶µ¡A¿é¤J¥H¤U¤º®e¡J + :set hls is + + 5. ²{¦b¥i¥H¦A¦¸¿é¤J¬d§ä©R¥O¡A¬Ý¬Ý·|¦³¤°»ò®ÄªG¡J + /ignore + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤»Á¿¤pµ² + + + 1. ¿é¤J¤p¼gªº o ¥i¥H¦b¥ú¼Ð¤U¤è¥´¶}·sªº¤@¦æ¨Ã±N¥ú¼Ð¸m¤_·s¶}ªº¦æ­º¡A¶i¤J + ´¡¤J¼Ò¦¡¡C + ¿é¤J¤j¼gªº O ¥i¥H¦b¥ú¼Ð¤W¤è¥´¶}·sªº¤@¦æ¨Ã±N¥ú¼Ð¸m¤_·s¶}ªº¦æ­º¡A¶i¤J + ´¡¤J¼Ò¦¡¡C + + 2. ¿é¤J¤p¼gªº a ¥i¥H¦b¥ú¼Ð©Ò¦b¦ì¸m¤§«á´¡¤J¤å¥»¡C + ¿é¤J¤j¼gªº A ¥i¥H¦b¥ú¼Ð©Ò¦b¦æªº¦æ¥½¤§«á´¡¤J¤å¥»¡C + + 3. ¿é¤J¤j¼gªº R ±N¶i¤J´À´«¼Ò¦¡¡Aª½¦Ü«ö Áä°h¥X´À´«¼Ò¦¡¦Ó¶i¤J¥¿±` + ¼Ò¦¡¡C + + 4. ¿é¤J :set xxx ¥i¥H³]¸m xxx ¿ï¶µ¡C + + + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤CÁ¿¡J¦b½uÀ°§U©R¥O + + ** ¨Ï¥Î¦b½uÀ°§U¨t²Î ** + + Vim ¾Ö¦³¤@­Ó²Ó­P¥þ­±ªº¦b½uÀ°§U¨t²Î¡C­n±Ò°Ê¸ÓÀ°§U¨t²Î¡A½Ð¿ï¾Ü¦p¤U¤TºØ¤è + ªk¤§¤@¡J + - «ö¤U Áä (¦pªGÁä½L¤W¦³ªº¸Ü) + - «ö¤U Áä (¦pªGÁä½L¤W¦³ªº¸Ü) + - ¿é¤J :help <¦^¨®> + + ¿é¤J :q <¦^¨®> ¥i¥HÃö³¬À°§Uµ¡¤f¡C + + ´£¨Ñ¤@­Ó¥¿½Tªº°Ñ¼Æµ¹":help"©R¥O¡A±z¥i¥H§ä¨ìÃö¤_¸Ó¥DÃDªºÀ°§U¡C½Ð¸ÕÅç¥H + ¤U°Ñ¼Æ(¥i§O§Ñ¤F«ö¦^¨®Áä®@¡C:)¡J + + :help w <¦^¨®> + :help c_ + :help insert-index <¦^¨®> + :help user-manual <¦^¨®> + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ²Ä¤KÁ¿¡J³Ð«Ø¤@­Ó±Ò°Ê¸}¥» + + ** ±Ò¥Îvimªº¥\¯à ** + + Vimªº¥\¯à¯S©Ê­n¤ñvi¦h±o¦h¡A¦ý¤j³¡¤À¥\¯à³£¨S¦³¯Ê¬Ù¿E¬¡¡C¬°¤F±Ò°Ê§ó¦hªº + ¥\¯à¡A±z±o³Ð«Ø¤@­Óvimrc¤å¥ó¡C + + 1. ¶}©l½s¿èvimrc¤å¥ó¡A³o¨ú¨M¤_±z©Ò¨Ï¥Îªº¾Þ§@¨t²Î¡J + + :edit ~/.vimrc ³o¬OUnix¨t²Î©Ò¨Ï¥Îªº©R¥O + :edit $VIM/_vimrc ³o¬OWindows¨t²Î©Ò¨Ï¥Îªº©R¥O + + 2. ±µµÛ¾É¤Jvimrc­S¨Ò¤å¥ó¡J + + :read $VIMRUNTIME/vimrc_example.vim + + 3. «O¦s¤å¥ó¡A©R¥O¬°¡J + + :write + + ¦b¤U¦¸±z±Ò°Êvimªº®É­Ô¡A½s¿è¾¹´N·|¦³¤F»yªk°ª«Gªº¥\¯à¡C±z¥i¥HÄ~Äò§â±z³ß + Åwªº¨ä¥¦¥\¯à³]¸m²K¥[¨ì³o­Óvimrc¤å¥ó¤¤¡C + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + vim ±Ðµ{¨ì¦¹µ²§ô¡C¥»±Ðµ{¥u¬O¬°¤F²©ú¦a¤¶²Ð¤@¤Uvim½s¿è¾¹¡A¦ý¤w¨¬¥HÅý±z + «Ü®e©ö¾Ç·|¨Ï¥Î¥»½s¿è¾¹¤F¡C¤ð±e½èºÃ¡AvimÁÙ¦³«Ü¦h«Ü¦hªº©R¥O¡A¥»±Ðµ{©Ò¤¶ + ²ÐªºÁÙ®t±o»·µÛ©O¡C©Ò¥H±z­nºë³qªº¸Ü¡AÁÙ±æÄ~Äò§V¤O®@¡C¤U¤@¨B±z¥i¥H¾\Ū + vim¤â¥U¡A¨Ï¥Îªº©R¥O¬O¡J + :help user-manual + + ¬°¤F§ó¶i¤@¨Bªº°Ñ¦Ò©M¾Ç²ß¡A¥H¤U³o¥»®Ñ­È±o±ÀÂË¡J + + Vim - Vi Improved - §@ªÌ¡JSteve Oualline + ¥Xª©ªÀ¡JNew Riders + + ³o¬O²Ä¤@¥»§¹¥þÁ¿¸Ñvimªº®ÑÄy¡C¹ï¤_ªì¾ÇªÌ¯S§O¦³¥Î¡C¨ä¤¤ÁÙ¥]§t¦³¤j¶q¹ê¨Ò + ©M¹Ï¥Ü¡C±ýª¾¸Ô±¡¡A½Ð³X°Ý http://iccf-holland.org/click5.html + + ¥H¤U³o¥»®Ñ¤ñ¸û¦Ñ¤F¦Ó¥B¤º®e¥D­n¬Ovi¦Ó¤£¬Ovim¡A¦ý¬O¤]­È±o±ÀÂË¡J + + Learning the Vi Editor - §@ªÌ¡JLinda Lamb + ¥Xª©ªÀ¡JO'Reilly & Associates Inc. + + ³o¬O¤@¥»¤£¿ùªº®Ñ¡A³q¹L¥¦±z´X¥G¯à°÷¤F¸Ñ¨ì¥þ³¡vi¯à°÷°µ¨ìªº¨Æ±¡¡C¦¹®Ñªº²Ä + ¤»­Óª©¥»¤]¥]§t¤F¤@¨ÇÃö¤_vimªº«H®§¡C + + ¥»±Ðµ{¬O¥Ñ¨Ó¦ÛCalorado School of MineseªºMichael C. Pierce¡BRobert K. + Ware ©Ò½s¼gªº¡A¨ä¤¤¨Ó¦ÛColorado State UniversityªºCharles Smith´£¨Ñ¤F + «Ü¦h³Ð·N¡C½sªÌ³q«H¦a§}¬O¡J + + bware@mines.colorado.edu + + ¥»±Ðµ{¤w¥ÑBram Moolenaar±M¬°vim¶i¦æ­×­q¡C + + + + ͍îªÌªþ¨¥¡J + =========== + ²Å餤¤å±Ðµ{½Ķª©¤§Ä¶¨îªÌ¬°±ç©÷®õ ¡AÁÙ¦³ + ¥t¥~¤@­ÓÁp¨t¦a§}¡Jlinuxrat@gnuchina.org¡C + + ÁcÅ餤¤å±Ðµ{¬O±q²Å餤¤å±Ðµ{½Ķª©¨Ï¥Î Debian GNU/Linux ¤¤¤å¶µ¥Ø¤p + ²Õªº¤_¼s½÷¥ý¥Í½s¼gªº¤¤¤åº~¦rÂà½X¾¹ autoconvert Âà´«¦Ó¦¨ªº¡A¨Ã¹ïÂà + ´«ªºµ²ªG°µ¤F¤@¨Ç²Ó¸`ªº§ï°Ê¡C + + Åܧó°O¿ý¡J + ========= + 2002¦~08¤ë30¤é ±ç©÷®õ + ·PÁ RMS@SMTH ªº«ü¥¿¡A±N¦h³B¿ù»~­×¥¿¡C + + 2002¦~04¤ë22¤é ±ç©÷®õ + ·PÁ xuandong@sh163.net ªº«ü¥¿¡A±N¨â³B¿ù§O¦r­×¥¿¡C + + 2002¦~03¤ë18¤é ±ç©÷®õ + ®Ú¾ÚBram Molenaar¥ý¥Í¦b2002¦~03¤ë16¤éªº¨Ó«H­n¨D¡A±Nvimtutor1.4¤¤Ä¶ + ª©¤É¯Å¨ìvimtutor1.5¡C + + 2001¦~11¤ë15¤é ±ç©÷®õ + ±Nvimtutor1.4¤¤Ä¶ª©´£¥æµ¹Bram Molenaar©MSven Guckes¡C + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.zh.euc b/vim/bundle/ubuntu-vim72/tutor/tutor.zh.euc new file mode 100644 index 0000000..7f80f69 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.zh.euc @@ -0,0 +1,851 @@ +=============================================================================== += »¶ Ó­ ÔÄ ¶Á ¡¶ V I M ½Ì ³Ì ¡· ¡ª¡ª °æ±¾ 1.5 = +=============================================================================== + vim ÊÇÒ»¸ö¾ßÓкܶàÃüÁîµÄ¹¦Äܷdz£Ç¿´óµÄ±à¼­Æ÷¡£ÏÞÓÚÆª·ù£¬ÔÚ±¾½Ì³Ìµ±ÖÐ + ¾Í²»Ïêϸ½éÉÜÁË¡£±¾½Ì³ÌµÄÉè¼ÆÄ¿±êÊǽ²ÊöһЩ±ØÒªµÄ»ù±¾ÃüÁ¶øÕÆÎÕºÃÕâ + ЩÃüÁÄú¾ÍÄܹ»ºÜÈÝÒ×½«vimµ±×÷Ò»¸öͨÓõÄÍòÄܱ༭Æ÷À´Ê¹ÓÃÁË¡£ + + Íê³É±¾½Ì³ÌµÄÄÚÈÝ´óÔ¼ÐèÒª25-30·ÖÖÓ£¬È¡¾öÓÚÄúѵÁ·µÄʱ¼ä¡£ + + ÿһ½ÚµÄÃüÁî²Ù×÷½«»á¸ü¸Ä±¾ÎÄ¡£ÍƼöÄú¸´ÖƱ¾ÎĵÄÒ»¸ö¸±±¾£¬È»ºóÔÚ¸±±¾ÉÏ + ½øÐÐѵÁ·(Èç¹ûÄúÊÇͨ¹ý"vimtutor"À´Æô¶¯½Ì³ÌµÄ£¬ÄÇô±¾ÎľÍÒѾ­ÊǸ±±¾ÁË)¡£ + + ÇмÇÒ»µã¡Ã±¾½Ì³ÌµÄÉè¼ÆË¼Â·ÊÇÔÚʹÓÃÖнøÐÐѧϰµÄ¡£Ò²¾ÍÊÇ˵£¬ÄúÐèҪͨ¹ý + Ö´ÐÐÃüÁîÀ´Ñ§Ï°ËüÃDZ¾ÉíµÄÕýÈ·Ó÷¨¡£Èç¹ûÄúÖ»ÊÇÔĶÁ¶ø²»²Ù×÷£¬ÄÇôÄú¿ÉÄÜ + »áºÜ¿ìÒÅÍüÕâЩÃüÁîµÄ£¡ + + ºÃÁË£¬ÏÖÔÚÇëÈ·¶¨ÄúµÄShift-Lock(´óÐ¡Ð´Ëø¶¨¼ü)»¹Ã»Óа´Ï£¬È»ºó°´¼üÅÌÉÏ + µÄ×Öĸ¼ü j ×ã¹»¶àµÄ´ÎÊýÀ´Òƶ¯¹â±ê£¬Ö±µ½µÚÒ»½ÚµÄÄÚÈÝÄܹ»ÍêÈ«³äÂúÆÁÄ»¡£ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚÒ»½²µÚÒ»½Ú¡ÃÒÆ¶¯¹â±ê + + + ¡ù¡ù ÒªÒÆ¶¯¹â±ê£¬ÇëÒÀÕÕ˵Ã÷·Ö±ð°´Ï h¡¢j¡¢k¡¢l ¼ü¡£ ¡ù¡ù + + ^ + k Ìáʾ¡Ã h µÄ¼üλÓÚ×ó±ß£¬Ã¿´Î°´Ï¾ͻáÏò×óÒÆ¶¯¡£ + < h l > l µÄ¼üλÓÚÓұߣ¬Ã¿´Î°´Ï¾ͻáÏòÓÒÒÆ¶¯¡£ + j j ¼ü¿´ÆðÀ´ºÜÏóÒ»Ö§¼â¶Ë·½Ïò³¯ÏµļýÍ·¡£ + v + + 1. ÇëËæÒâÔÚÆÁÄ»ÄÚÒÆ¶¯¹â±ê£¬Ö±ÖÁÄú¾õµÃÊæ·þΪֹ¡£ + + 2. °´ÏÂÏÂÐмü(j)£¬Ö±µ½³öÏÖ¹â±êÖØ¸´ÏÂÐС£ + +---> ÏÖÔÚÄúÓ¦¸ÃÒѾ­Ñ§»áÈçºÎÒÆ¶¯µ½ÏÂÒ»½²°É¡£ + + 3. ÏÖÔÚÇëʹÓÃÏÂÐмü£¬½«¹â±êÒÆ¶¯µ½µÚ¶þ½²¡£ + +Ìáʾ¡ÃÈç¹ûÄú²»¸ÒÈ·¶¨ÄúËù°´ÏµÄ×Öĸ£¬Ç밴ϼü»Øµ½Õý³£(Normal)ģʽ¡£ + È»ºóÔٴδӼüÅÌÊäÈëÄúÏëÒªµÄÃüÁî¡£ + +Ìáʾ¡Ã¹â±ê¼üÓ¦µ±Ò²ÄÜÕý³£¹¤×÷µÄ¡£µ«ÊÇʹÓÃhjkl¼ü£¬ÔÚϰ¹ßÖ®ºóÄú¾ÍÄܹ»¿ìËÙ + µØÔÚÆÁÄ»ÄÚËÄ´¦Òƶ¯¹â±êÁË¡£ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚÒ»½²µÚ¶þ½Ú¡ÃVIMµÄ½øÈëºÍÍ˳ö + + + !! ÌØ±ðÌáʾ¡Ã¾´ÇëÔĶÁÍêÕû±¾Ò»½ÚµÄÄÚÈÝ£¬È»ºó²ÅÄÜÖ´ÐÐÒÔÏÂËù½²½âµÄÃüÁî¡£ + + 1. Çë°´¼ü(ÕâÊÇΪÁËÈ·±£Äú´¦ÔÚÕý³£Ä£Ê½)¡£ + + 2. È»ºóÊäÈë¡Ã :q! <»Ø³µ> + +---> ÕâÖÖ·½Ê½µÄÍ˳ö±à¼­Æ÷¾ø²»»á±£´æÄú½øÈë±à¼­Æ÷ÒÔÀ´Ëù×öµÄ¸Ä¶¯¡£ + Èç¹ûÄúÏë±£´æ¸ü¸ÄÔÙÍ˳ö£¬ÇëÊäÈë¡Ã + :wq <»Ø³µ> + + 3. Èç¹ûÄú¿´µ½ÁËÃüÁîÐÐÌáʾ·û£¬ÇëÊäÈëÄܹ»´øÄú»Øµ½±¾½Ì³ÌµÄÃüÁÄǾÍÊǡà + + vimtutor <»Ø³µ> + + ͨ³£Çé¿öÏÂÄúÒ²¿ÉÒÔÓÃÕâÖÖ·½Ê½¡Ã + + vim tutor <»Ø³µ> + +---> ÕâÀïµÄ 'vim' ±íʾ½øÈëvim±à¼­Æ÷£¬¶ø 'tutor'ÔòÊÇÄú×¼±¸Òª±à¼­µÄÎļþ¡£ + + 4. Èç¹ûÄú×ÔÐÅÒѾ­ÀÎÀμÇסÁËÕâЩ²½ÖèµÄ»°£¬Çë´Ó²½Öè1Ö´Ðе½²½Öè3Í˳ö£¬È» + ºóÔٴνøÈë±à¼­Æ÷¡£½Ó׎«¹â±êÒÆ¶¯µ½µÚÒ»½²µÚÈý½ÚÀ´¼ÌÐøÎÒÃǵĽ̳̽²½â¡£ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚÒ»½²µÚÈý½Ú¡ÃÎı¾±à¼­Ö®É¾³ý + + + ** ÔÚÕý³£(Normal)ģʽÏ£¬¿ÉÒÔ°´Ï x ¼üÀ´É¾³ý¹â±êËùÔÚλÖõÄ×Ö·û¡£** + + 1. Ç뽫¹â±êÒÆ¶¯µ½±¾½ÚÖÐÏÂÃæ±ê¼ÇÓÐ ---> µÄÄÇÒ»ÐС£ + + 2. ΪÁËÐÞÕýÊäÈë´íÎó£¬Ç뽫¹â±êÒÆÖÁ×¼±¸É¾³ýµÄ×Ö·ûµÄλÖô¦¡£ + + 3. È»ºó°´Ï x ¼ü½«´íÎó×Ö·ûɾ³ýµô¡£ + + 4. ÖØ¸´²½Öè2µ½²½Öè4£¬Ö±µ½¾ä×ÓÐÞÕýΪֹ¡£ + +---> The ccow jumpedd ovverr thhe mooon. + + 5. ºÃÁË£¬¸ÃÐÐÒѾ­ÐÞÕýÁË£¬ÏÂÒ»½ÚÄÚÈÝÊǵÚÒ»½²µÚËĽڡ£ + +ÌØ±ðÌáʾ¡ÃÔÚÄúä¯ÀÀ±¾½Ì³Ìʱ£¬²»ÒªÇ¿ÐмÇÒä¡£¼Çסһµã¡ÃÔÚʹÓÃÖÐѧϰ¡£ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚÒ»½²µÚËĽڡÃÎı¾±à¼­Ö®²åÈë + + + ** ÔÚÕý³£Ä£Ê½Ï£¬¿ÉÒÔ°´Ï i ¼üÀ´²åÈëÎı¾¡£** + + 1. Ç뽫¹â±êÒÆ¶¯µ½±¾½ÚÖÐÏÂÃæ±ê¼ÇÓÐ ---> µÄµÚÒ»ÐС£ + + 2. ΪÁËʹµÃµÚÒ»ÐÐÄÚÈÝÀ×ͬÓÚµÚ¶þÐУ¬Ç뽫¹â±êÒÆÖÁÎı¾µÚÒ»¸ö×Ö·û×¼±¸²åÈë + µÄλÖᣠ+ + 3. È»ºó°´Ï i ¼ü£¬½Ó×ÅÊäÈë±ØÒªµÄÎı¾×Ö·û¡£ + + 4. ËùÓÐÎı¾¶¼ÐÞÕýÍê±Ï£¬Çë°´Ï ¼ü·µ»ØÕý³£Ä£Ê½¡£ + ÖØ¸´²½Öè2ÖÁ²½Öè4ÒÔ±ãÐÞÕý¾ä×Ó¡£ + +---> There is text misng this . +---> There is some text missing from this line. + + 5. Èç¹ûÄú¶ÔÎı¾²åÈë²Ù×÷ÒѾ­ºÜÂúÒ⣬Çë½Ó×ÅÔĶÁÏÂÃæµÄС½á¡£ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚÒ»½²Ð¡½á + + + 1. ¹â±êÔÚÆÁÄ»Îı¾ÖеÄÒÆ¶¯¼È¿ÉÒÔÓüýÍ·¼ü£¬Ò²¿ÉÒÔʹÓà hjkl ×Öĸ¼ü¡£ + h (×óÒÆ) j (ÏÂÐÐ) k (ÉÏÐÐ) l (ÓÒÒÆ) + + 2. Óû½øÈëvim±à¼­Æ÷(´ÓÃüÁîÐÐÌáʾ·û)£¬ÇëÊäÈë¡Ãvim ÎļþÃû <»Ø³µ> + + 3. ÓûÍ˳övim±à¼­Æ÷£¬ÇëÊäÈëÒÔÏÂÃüÁî·ÅÆúËùÓÐÐ޸ġà + + :q! <»Ø³µ> + + »òÕßÊäÈëÒÔÏÂÃüÁî±£´æËùÓÐÐ޸ġà + + :wq <»Ø³µ> + + 4. ÔÚÕý³£Ä£Ê½ÏÂɾ³ý¹â±êËùÔÚλÖõÄ×Ö·û£¬Çë°´¡Ã x + + 5. ÔÚÕý³£Ä£Ê½ÏÂÒªÔÚ¹â±êËùÔÚλÖÿªÊ¼²åÈëÎı¾£¬Çë°´¡Ã + + i ÊäÈë±ØÒªÎı¾ + +ÌØ±ðÌáʾ¡Ã°´Ï ¼ü»á´øÄú»Øµ½Õý³£Ä£Ê½»òÕßÈ¡ÏûÒ»¸ö²»ÆÚÍû»òÕß²¿·ÖÍê³É +µÄÃüÁî¡£ + +ºÃÁË£¬µÚÒ»½²µ½´Ë½áÊø¡£ÏÂÃæ½ÓÏÂÀ´¼ÌÐøµÚ¶þ½²µÄÄÚÈÝ¡£ + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚ¶þ½²µÚÒ»½Ú¡Ãɾ³ýÀàÃüÁî + + + ** ÊäÈë dw ¿ÉÒÔ´Ó¹â±ê´¦É¾³ýÖÁÒ»¸öµ¥×Ö/µ¥´ÊµÄĩβ¡£** + + 1. Çë°´Ï ¼üÈ·±£Äú´¦ÓÚÕý³£Ä£Ê½¡£ + + 2. Ç뽫¹â±êÒÆ¶¯µ½±¾½ÚÖÐÏÂÃæ±ê¼ÇÓÐ ---> µÄÄÇÒ»ÐС£ + + 3. Ç뽫¹â±êÒÆÖÁ×¼±¸ÒªÉ¾³ýµÄµ¥´ÊµÄ¿ªÊ¼¡£ + + 4. ½Ó×ÅÊäÈë dw ɾ³ýµô¸Ãµ¥´Ê¡£ + + ÌØ±ðÌáʾ¡ÃÄúËùÊäÈëµÄ dw »áÔÚÄúÊäÈëµÄͬʱ³öÏÖÔÚÆÁÄ»µÄ×îºóÒ»ÐС£Èç¹ûÄúÊä + ÈëÓÐÎó£¬Çë°´Ï ¼üÈ¡Ïû£¬È»ºóÖØÐÂÔÙÀ´¡£ + +---> There are a some words fun that don't belong paper in this sentence. + + 5. ÖØ¸´²½Öè3ÖÁ²½Öè4£¬Ö±ÖÁ¾ä×ÓÐÞÕýÍê±Ï¡£½Ó׿ÌÐøµÚ¶þ½²µÚ¶þ½ÚÄÚÈÝ¡£ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚ¶þ½²µÚ¶þ½Ú¡ÃÆäËûɾ³ýÀàÃüÁî + + + ** ÊäÈë d$ ´Óµ±Ç°¹â±êɾ³ýµ½ÐÐÄ©¡£** + + 1. Çë°´Ï ¼üÈ·±£Äú´¦ÓÚÕý³£Ä£Ê½¡£ + + 2. Ç뽫¹â±êÒÆ¶¯µ½±¾½ÚÖÐÏÂÃæ±ê¼ÇÓÐ ---> µÄÄÇÒ»ÐС£ + + 3. Ç뽫¹â±êÒÆ¶¯µ½¸ÃÐеÄβ²¿(Ò²¾ÍÊÇÔÚµÚÒ»¸öµãºÅ¡®.¡¯ºóÃæ)¡£ + + 4. È»ºóÊäÈë d$ ´Ó¹â±ê´¦É¾ÖÁµ±Ç°ÐÐβ²¿¡£ + +---> Somebody typed the end of this line twice. end of this line twice. + + + 5. Çë¼ÌÐøÑ§Ï°µÚ¶þ½²µÚÈý½Ú¾ÍÖªµÀÊÇÔõô»ØÊÂÁË¡£ + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚ¶þ½²µÚÈý½Ú¡Ã¹ØÓÚÃüÁîºÍ¶ÔÏó + + + ɾ³ýÃüÁî d µÄ¸ñʽÈçÏ¡à + + [number] d object »òÕß d [number] object + + ÆäÒâÈçÏ¡à + number - ´ú±íÖ´ÐÐÃüÁîµÄ´ÎÊý(¿ÉÑ¡ÏȱʡÉèÖÃΪ 1 )¡£ + d - ´ú±íɾ³ý¡£ + object - ´ú±íÃüÁîËùÒª²Ù×÷µÄ¶ÔÏó(ÏÂÃæÓÐÏà¹Ø½éÉÜ)¡£ + + Ò»¸ö¼ò¶ÌµÄ¶ÔÏóÁбí¡Ã + w - ´Óµ±Ç°¹â±êµ±Ç°Î»ÖÃÖ±µ½µ¥×Ö/µ¥´Êĩ⣬°üÀ¨¿Õ¸ñ¡£ + e - ´Óµ±Ç°¹â±êµ±Ç°Î»ÖÃÖ±µ½µ¥×Ö/µ¥´Êĩ⣬µ«ÊÇ *²»* °üÀ¨¿Õ¸ñ¡£ + $ - ´Óµ±Ç°¹â±êµ±Ç°Î»ÖÃÖ±µ½µ±Ç°ÐÐÄ©¡£ + +ÌØ±ðÌáʾ¡Ã + ¶ÔÓÚÓÂÓÚ̽Ë÷Õߣ¬ÇëÔÚÕý³£Ä£Ê½ÏÂÃæ½ö°´´ú±íÏàÓ¦¶ÔÏóµÄ¼ü¶ø²»Ê¹ÓÃÃüÁÔò + ½«¿´µ½¹â±êµÄÒÆ¶¯ÕýÈçÉÏÃæµÄ¶ÔÏóÁбíËù´ú±íµÄÒ»Ñù¡£ + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚ¶þ½²µÚËĽڡöÔÏóÃüÁîµÄÌØÊâÇé¿ö + + + ** ÊäÈë dd ¿ÉÒÔɾ³ýÕûÒ»¸öµ±Ç°ÐС£ ** + + ¼øÓÚÕûÐÐɾ³ýµÄ¸ßƵ¶È£¬VIM µÄÉè¼ÆÕß¾ö¶¨Òª¼ò»¯ÕûÐÐɾ³ý£¬½öÐèÒªÔÚͬһÐÐÉÏ + »÷´òÁ½´Î d ¾Í¿ÉÒÔɾ³ýµô¹â±êËùÔÚµÄÕûÐÐÁË¡£ + + 1. Ç뽫¹â±êÒÆ¶¯µ½±¾½ÚÖÐÏÂÃæµÄ¶Ì¾ä¶ÎÂäÖеĵڶþÐС£ + 2. ÊäÈë dd ɾ³ý¸ÃÐС£ + 3. È»ºóÒÆ¶¯µ½µÚËÄÐС£ + 4. ½Ó×ÅÊäÈë 2dd (»¹¼ÇµÃÇ°Ãæ½²¹ýµÄ number-command-object Âð£¿) ɾ³ýÁ½ÐС£ + + 1) Roses are red, + 2) Mud is fun, + 3) Violets are blue, + 4) I have a car, + 5) Clocks tell time, + 6) Sugar is sweet + 7) And so are you. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚ¶þ½²µÚÎå½Ú¡Ã³·ÏûÀàÃüÁî + + + ** ÊäÈë u À´³·Ïû×îºóÖ´ÐеÄÃüÁÊäÈë U À´ÐÞÕýÕûÐС£** + + 1. Ç뽫¹â±êÒÆ¶¯µ½±¾½ÚÖÐÏÂÃæ±ê¼ÇÓÐ ---> µÄÄÇÒ»ÐУ¬²¢½«ÆäÖÃÓÚµÚÒ»¸ö´íÎó + ´¦¡£ + 2. ÊäÈë x ɾ³ýµÚÒ»¸ö²»Ïë±£ÁôµÄ×Öĸ¡£ + 3. È»ºóÊäÈë u ³·Ïû×îºóÖ´ÐеÄ(Ò»´Î)ÃüÁî¡£ + 4. Õâ´ÎҪʹÓà x ÐÞÕý±¾ÐеÄËùÓдíÎó¡£ + 5. ÏÖÔÚÊäÈëÒ»¸ö´óдµÄ U £¬»Ö¸´µ½¸ÃÐеÄԭʼ״̬¡£ + 6. ½Ó×Ŷà´ÎÊäÈë u ÒÔ³·Ïû U ÒÔ¼°¸üǰµÄÃüÁî¡£ + 7. È»ºó¶à´ÎÊäÈë CTRL-R (ÏȰ´Ï CTRL ¼ü²»·Å¿ª£¬½Ó×ÅÊäÈë R ¼ü) £¬ÕâÑù¾Í + ¿ÉÒÔÖ´Ðлָ´ÃüÁҲ¾ÍÊdz·Ïûµô³·ÏûÃüÁî¡£ + +---> Fiix the errors oon thhis line and reeplace them witth undo. + + 8. ÕâЩ¶¼ÊǷdz£ÓÐÓõÄÃüÁî¡£ÏÂÃæÊǵڶþ½²µÄС½áÁË¡£ + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚ¶þ½²Ð¡½á + + + 1. Óû´Óµ±Ç°¹â±êɾ³ýÖÁµ¥×Ö/µ¥´Êĩ⣬ÇëÊäÈë¡Ãdw + + 2. Óû´Óµ±Ç°¹â±êɾ³ýÖÁµ±Ç°ÐÐĩ⣬ÇëÊäÈë¡Ãd$ + + 3. Óûɾ³ýÕûÐУ¬ÇëÊäÈë¡Ãdd + + 4. ÔÚÕý³£Ä£Ê½ÏÂÒ»¸öÃüÁîµÄ¸ñʽÊǡà + + [number] command object »òÕß command [number] object + ÆäÒâÊǡà + number - ´ú±íµÄÊÇÃüÁîÖ´ÐеĴÎÊý + command - ´ú±íÒª×öµÄÊÂÇ飬±ÈÈç d ´ú±íɾ³ý + object - ´ú±íÒª²Ù×÷µÄ¶ÔÏ󣬱ÈÈç w ´ú±íµ¥×Ö/µ¥´Ê£¬$ ´ú±íµ½ÐÐÄ©µÈµÈ¡£ + $ (to the end of line), etc. + + 5. Óû³·ÏûÒÔǰµÄ²Ù×÷£¬ÇëÊäÈë¡Ãu (СдµÄu) + Óû³·ÏûÔÚÒ»ÐÐÖÐËù×öµÄ¸Ä¶¯£¬ÇëÊäÈë¡ÃU (´óдµÄU) + Óû³·ÏûÒÔǰµÄ³·ÏûÃüÁ»Ö¸´ÒÔǰµÄ²Ù×÷½á¹û£¬ÇëÊäÈë¡ÃCTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚÈý½²µÚÒ»½Ú¡ÃÖÃÈëÀàÃüÁî + + + ** ÊäÈë p ½«×îºóÒ»´Îɾ³ýµÄÄÚÈÝÖÃÈë¹â±êÖ®ºó ** + + 1. Ç뽫¹â±êÒÆ¶¯µ½±¾½ÚÖÐÏÂÃæÊ¾·¶¶ÎÂäµÄÊ×ÐС£ + + 2. ÊäÈë dd ½«¸ÃÐÐɾ³ý£¬ÕâÑù»á½«¸ÃÐб£´æµ½vimµÄ»º³åÇøÖС£ + + 3. ½Ó׎«¹â±êÒÆ¶¯µ½×¼±¸ÖÃÈëµÄλÖõÄÉÏ·½¡£¼Çס¡ÃÊÇÉÏ·½Å¶¡£ + + 4. È»ºóÔÚÕý³£Ä£Ê½ÏÂ(¼ü½øÈë)£¬ÊäÈë p ½«¸ÃÐÐÕ³ÌùÖÃÈë¡£ + + 5. ÖØ¸´²½Öè2ÖÁ²½Öè4£¬½«ËùÓеÄÐÐÒÀÐò·ÅÖõ½ÕýÈ·µÄλÖÃÉÏ¡£ + + d) Can you learn too? + b) Violets are blue, + c) Intelligence is learned, + a) Roses are red, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚÈý½²µÚ¶þ½Ú¡ÃÌæ»»ÀàÃüÁî + + + ** ÊäÈë r ºÍÒ»¸ö×Ö·ûÌæ»»¹â±êËùÔÚλÖõÄ×Ö·û¡£** + + 1. Ç뽫¹â±êÒÆ¶¯µ½±¾½ÚÖÐÏÂÃæ±ê¼ÇÓÐ ---> µÄµÚÒ»ÐС£ + + 2. ÇëÒÆ¶¯¹â±êµ½µÚÒ»¸ö´íÎóµÄÊʵ±Î»Öᣠ+ + 3. ½Ó×ÅÊäÈë r £¬ÕâÑù¾ÍÄܽ«´íÎóÌæ»»µôÁË¡£ + + 4. ÖØ¸´²½Öè2ºÍ²½Öè3£¬Ö±µ½µÚÒ»ÐÐÒѾ­ÐÞ¸ÄÍê±Ï¡£ + +---> Whan this lime was tuoed in, someone presswd some wrojg keys! +---> When this line was typed in, someone pressed some wrong keys! + + 5. È»ºóÎÒÃǼÌÐøÑ§Ð£µÚÈý½²µÚÈý½Ú¡£ + +ÌØ±ðÌáʾ¡ÃÇмÇÄúÒªÔÚʹÓÃÖÐѧϰ£¬¶ø²»ÊÇÔÚ¼ÇÒäÖÐѧϰ¡£ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚÈý½²µÚÈý½Ú¡Ã¸ü¸ÄÀàÃüÁî + + + ** Òª¸Ä±äÒ»¸öµ¥×Ö/µ¥´ÊµÄ²¿·Ö»òÕßÈ«²¿£¬ÇëÊäÈë cw ** + + 1. Ç뽫¹â±êÒÆ¶¯µ½±¾½ÚÖÐÏÂÃæ±ê¼ÇÓÐ ---> µÄµÚÒ»ÐС£ + + 2. ½Ó×Űѹâ±ê·ÅÔÚµ¥´Ê lubw µÄ×Öĸ u µÄλÖÃÄÇÀï¡£ + + 3. È»ºóÊäÈë cw ¾Í¿ÉÒÔÐÞÕý¸Ãµ¥´ÊÁË(ÔÚ±¾ÀýÕâÀïÊÇÊäÈë ine ¡£) + + 4. ×îºó°´ ¼ü£¬È»ºó¹â±ê¶¨Î»µ½ÏÂÒ»¸ö´íÎóµÚÒ»¸ö×¼±¸¸ü¸ÄµÄ×Öĸ´¦¡£ + + 5. ÖØ¸´²½Öè3ºÍ²½Öè4£¬Ö±µ½µÚÒ»¸ö¾ä×ÓÍêÈ«À×ͬµÚ¶þ¸ö¾ä×Ó¡£ + +---> This lubw has a few wptfd that mrrf changing usf the change command. +---> This line has a few words that need changing using the change command. + +Ìáʾ¡ÃÇë×¢Òâ cw ÃüÁî²»½ö½öÊÇÌæ»»ÁËÒ»¸öµ¥´Ê£¬Ò²ÈÃÄú½øÈëÎı¾²åÈë״̬ÁË¡£ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚÈý½²µÚËĽڡÃʹÓÃcÖ¸ÁîµÄÆäËû¸ü¸ÄÀàÃüÁî + + + ** ¸ü¸ÄÀàÖ¸Áî¿ÉÒÔʹÓÃͬɾ³ýÀàÃüÁîËùʹÓõĶÔÏó²ÎÊý¡£** + + 1. ¸ü¸ÄÀàÖ¸ÁîµÄ¹¤×÷·½Ê½¸úɾ³ýÀàÃüÁîÊÇÒ»Öµġ£²Ù×÷¸ñʽÊǡà + + [number] c object »òÕß c [number] object + + 2. ¶ÔÏó²ÎÊýÒ²ÊÇÒ»ÑùµÄ£¬±ÈÈç w ´ú±íµ¥×Ö/µ¥´Ê£¬$´ú±íÐÐÄ©µÈµÈ¡£ + + 3. Ç뽫¹â±êÒÆ¶¯µ½±¾½ÚÖÐÏÂÃæ±ê¼ÇÓÐ ---> µÄµÚÒ»ÐС£ + + 4. ½Ó׎«¹â±êÒÆ¶¯µ½µÚÒ»¸ö´íÎ󴦡£ + + 5. È»ºóÊäÈë c$ ʹµÃ¸ÃÐÐʣϵIJ¿·Ö¸üÕýµÃͬµÚ¶þÐÐÒ»Ñù¡£×îºó°´ ¼ü¡£ + +---> The end of this line needs some help to make it like the second. +---> The end of this line needs to be corrected using the c$ command. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚÈý½²Ð¡½á + + + 1. ÒªÖØÐÂÖÃÈëÒѾ­É¾³ýµÄÎı¾ÄÚÈÝ£¬ÇëÊäÈëСд×Öĸ p¡£¸Ã²Ù×÷¿ÉÒÔ½«ÒÑɾ³ý + µÄÎı¾ÄÚÈÝÖÃÓÚ¹â±êÖ®ºó¡£Èç¹û×îºóÒ»´Îɾ³ýµÄÊÇÒ»¸öÕûÐУ¬ÄÇô¸ÃÐн«Öà + ÓÚµ±Ç°¹â±êËùÔÚÐеÄÏÂÒ»ÐС£ + + 2. ÒªÌæ»»¹â±êËùÔÚλÖõÄ×Ö·û£¬ÇëÊäÈëСдµÄ r ºÍÒªÌæ»»µôԭλÖÃ×Ö·ûµÄÐÂ×Ö + ·û¼´¿É¡£ + + 3. ¸ü¸ÄÀàÃüÁîÔÊÐíÄú¸Ä±äÖ¸¶¨µÄ¶ÔÏ󣬴ӵ±Ç°¹â±êËùÔÚλÖÃÖ±µ½¶ÔÏóµÄĩβ¡£ + ±ÈÈçÊäÈë cw ¿ÉÒÔÌæ»»µ±Ç°¹â±êµ½µ¥´ÊµÄĩβµÄÄÚÈÝ£»ÊäÈë c$ ¿ÉÒÔÌæ»»µ± + ǰ¹â±êµ½ÐÐÄ©µÄÄÚÈÝ¡£ + + 4. ¸ü¸ÄÀàÃüÁîµÄ¸ñʽÊǡà + + [number] c object »òÕß c [number] object + +ÏÂÃæÎÒÃǼÌÐøÑ§Ï°ÏÂÒ»½²¡£ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚËĽ²µÚÒ»½Ú¡Ã¶¨Î»¼°Îļþ״̬ + + + ** ÊäÈë CTRL-g ÏÔʾµ±Ç°±à¼­ÎļþÖе±Ç°¹â±êËùÔÚÐÐλÖÃÒÔ¼°Îļþ״̬ÐÅÏ¢¡£ + ÊäÈë SHIFT-G ÔòÖ±½ÓÌø×ªµ½ÎļþÖеÄijһָ¶¨ÐС£** + + Ìáʾ¡ÃÇмÇÒªÏÈͨ¶Á±¾½ÚÄÚÈÝ£¬Ö®ºó²Å¿ÉÒÔÖ´ÐÐÒÔϲ½Öè!!! + + 1. °´Ï CTRL ¼ü²»·Å¿ªÈ»ºó°´ g ¼ü¡£È»ºó¾Í»á¿´µ½Ò³Ãæ×îµ×²¿³öÏÖÒ»¸ö״̬ÐÅ + Ï¢ÐУ¬ÏÔʾµÄÄÚÈÝÊǵ±Ç°±à¼­µÄÎļþÃûºÍÎļþµÄ×ÜÐÐÊý¡£Çë¼Çס²½Öè3µÄÐкš£ + + 2. °´Ï SHIFT-G ¼ü¿ÉÒÔʹµÃµ±Ç°¹â±êÖ±½ÓÌø×ªµ½Îļþ×îºóÒ»ÐС£ + + 3. ÊäÈëÄúÔøÍ£ÁôµÄÐкţ¬È»ºó°´Ï SHIFT-G¡£ÕâÑù¾Í¿ÉÒÔ·µ»Øµ½ÄúµÚÒ»´Î°´Ï + CTRL-g ʱËùÔÚµÄÐкÃÁË¡£×¢Òâ¡ÃÊäÈëÐкÅʱ£¬ÐкÅÊDz»»áÔÚÆÁÄ»ÉÏÏÔʾ³öÀ´ + µÄ¡£ + + 4. Èç¹ûÔ¸Ò⣬Äú¿ÉÒÔ¼ÌÐøÖ´Ðв½Öè1ÖÁ²½ÖèÈý¡£ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚËĽ²µÚ¶þ½Ú¡ÃËÑË÷ÀàÃüÁî + + + ** ÊäÈë / ÒÔ¼°Î²ËæµÄ×Ö·û´®¿ÉÒÔÓÃÒÔÔÚµ±Ç°ÎļþÖвéÕÒ¸Ã×Ö·û´®¡£** + + 1. ÔÚÕý³£Ä£Ê½ÏÂÊäÈë / ×Ö·û¡£Äú´Ëʱ»á×¢Òâµ½¸Ã×Ö·ûºÍ¹â±ê¶¼»á³öÏÖÔÚÆÁÄ»µ× + ²¿£¬Õâ¸ú : ÃüÁîÊÇÒ»ÑùµÄ¡£ + + 2. ½Ó×ÅÊäÈë errroor <»Ø³µ>¡£ÄǸöerrroor¾ÍÊÇÄúÒª²éÕÒµÄ×Ö·û´®¡£ + + 3. Òª²éÕÒͬÉÏÒ»´ÎµÄ×Ö·û´®£¬Ö»ÐèÒª°´ n ¼ü¡£ÒªÏòÏà·´·½Ïò²éÕÒͬÉÏÒ»´ÎµÄ×Ö + ·û´®£¬ÇëÊäÈë Shift-N ¼´¿É¡£ + + 4. Èç¹ûÄúÏëÄæÏò²éÕÒ×Ö·û´®£¬ÇëʹÓà ? ´úÌæ / ½øÐС£ + +---> When the search reaches the end of the file it will continue at the start. + + "errroor" is not the way to spell error; errroor is an error. + + Ìáʾ¡ÃÈç¹û²éÕÒÒѾ­µ½´ïÎļþĩ⣬²éÕÒ»á×Ô¶¯´ÓÎļþÍ·²¿¼ÌÐø²éÕÒ¡£ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚËĽ²µÚÈý½Ú¡ÃÅä¶ÔÀ¨ºÅµÄ²éÕÒ + + + ** °´ % ¿ÉÒÔ²éÕÒÅä¶ÔµÄÀ¨ºÅ )¡¢]¡¢}¡£** + + 1. °Ñ¹â±ê·ÅÔÚ±¾½ÚÏÂÃæ±ê¼ÇÓÐ --> ÄÇÒ»ÐÐÖеÄÈκÎÒ»¸ö (¡¢[ »ò { ´¦¡£ + + 2. ½Ó×Ű´ % ×Ö·û¡£ + + 3. ´Ëʱ¹â±êµÄλÖÃÓ¦µ±ÊÇÔÚÅä¶ÔµÄÀ¨ºÅ´¦¡£ + + 4. Ôٴΰ´ % ¾Í¿ÉÒÔÌø»ØÅä¶ÔµÄµÚÒ»¸öÀ¨ºÅ´¦¡£ + +---> This ( is a test line with ('s, ['s ] and {'s } in it. )) + +Ìáʾ¡ÃÔÚ³ÌÐòµ÷ÊÔʱ£¬Õâ¸ö¹¦ÄÜÓÃÀ´²éÕÒ²»Åä¶ÔµÄÀ¨ºÅÊǺÜÓÐÓõġ£ + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚËĽ²µÚËĽڡÃÐÞÕý´íÎóµÄ·½·¨Ö®Ò» + + + ** ÊäÈë :s/old/new/g ¿ÉÒÔÌæ»» old Ϊ new¡£** + + 1. Ç뽫¹â±êÒÆ¶¯µ½±¾½ÚÖÐÏÂÃæ±ê¼ÇÓÐ ---> µÄÄÇÒ»ÐС£ + + 2. ÊäÈë :s/thee/the <»Ø³µ> ¡£Çë×¢Òâ¸ÃÃüÁîÖ»¸Ä±ä¹â±êËùÔÚÐеĵÚÒ»¸öÆ¥Åä + ´®¡£ + + 3. ÊäÈë :s/thee/the/g ÔòÊÇÌæ»»È«ÐÐµÄÆ¥Åä´®¡£ + +---> the best time to see thee flowers is in thee spring. + + 4. ÒªÌæ»»Á½ÐÐÖ®¼ä³öÏÖµÄÿ¸öÆ¥Åä´®£¬ÇëÊäÈë :#,#s/old/new/g (#,#´ú±íµÄÊÇ + Á½ÐеÄÐкÅ)¡£ÊäÈë :%s/old/new/g ÔòÊÇÌæ»»Õû¸öÎļþÖеÄÿ¸öÆ¥Åä´®¡£ + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚËĽ²Ð¡½á + + + 1. Ctrl-g ÓÃÓÚÏÔʾµ±Ç°¹â±êËùÔÚλÖúÍÎļþ״̬ÐÅÏ¢¡£Shift-G ÓÃÓÚ½«¹â±êÌø + תÖÁÎļþ×îºóÒ»ÐС£ÏÈÇÃÈëÒ»¸öÐкÅÈ»ºó°´ Shift-G ÔòÊǽ«¹â±êÒÆ¶¯ÖÁ¸ÃÐÐ + ºÅ´ú±íµÄÐС£ + + 2. ÊäÈë / È»ºó½ôËæÒ»¸ö×Ö·û´®ÊÇÔòÊÇÔÚµ±Ç°Ëù±à¼­µÄÎĵµÖÐÏòºó²éÕÒ¸Ã×Ö·û´®¡£ + ÊäÈëÎʺŠ? È»ºó½ôËæÒ»¸ö×Ö·û´®ÊÇÔòÊÇÔÚµ±Ç°Ëù±à¼­µÄÎĵµÖÐÏòǰ²éÕÒ¸Ã×Ö + ·û´®¡£Íê³ÉÒ»´Î²éÕÒÖ®ºó°´ n ¼üÔòÊÇÖØ¸´ÉÏÒ»´ÎµÄÃüÁ¿ÉÔÚͬһ·½ÏòÉϲé + ÕÒÏÂÒ»¸ö×Ö·û´®ËùÔÚ£»»òÕß°´ Shift-N ÏòÏà·´·½Ïò²éÕÒϸÃ×Ö·û´®ËùÔÚ¡£ + + 3. Èç¹û¹â±êµ±Ç°Î»ÖÃÊÇÀ¨ºÅ(¡¢)¡¢[¡¢]¡¢{¡¢}£¬°´ % ¿ÉÒÔ½«¹â±êÒÆ¶¯µ½Åä¶ÔµÄ + À¨ºÅÉÏ¡£ + + 4. ÔÚÒ»ÐÐÄÚÌæ»»Í·Ò»¸ö×Ö·û´® old ΪеÄ×Ö·û´® new£¬ÇëÊäÈë :s/old/new + ÔÚÒ»ÐÐÄÚÌæ»»ËùÓеÄ×Ö·û´® old ΪеÄ×Ö·û´® new£¬ÇëÊäÈë :s/old/new/g + ÔÚÁ½ÐÐÄÚÌæ»»ËùÓеÄ×Ö·û´® old ΪеÄ×Ö·û´® new£¬ÇëÊäÈë :#,#s/old/new/g + ÔÚÎļþÄÚÌæ»»ËùÓеÄ×Ö·û´® old ΪеÄ×Ö·û´® new£¬ÇëÊäÈë :%s/old/new/g + ½øÐÐÈ«ÎÄÌæ»»Ê±Ñ¯ÎÊÓû§È·ÈÏÿ¸öÌæ»»ÐèÌí¼Ó c Ñ¡ÏÇëÊäÈë :%s/old/new/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚÎå½²µÚÒ»½Ú¡ÃÔÚ VIM ÄÚÖ´ÐÐÍⲿÃüÁîµÄ·½·¨ + + + ** ÊäÈë :! È»ºó½ôËæÖøÊäÈëÒ»¸öÍⲿÃüÁî¿ÉÒÔÖ´ÐиÃÍⲿÃüÁî¡£** + + 1. °´ÏÂÎÒÃÇËùÊìϤµÄ : ÃüÁîÉèÖùâ±êµ½ÆÁÄ»µ×²¿¡£ÕâÑù¾Í¿ÉÒÔÈÃÄúÊäÈëÃüÁîÁË¡£ + + 2. ½Ó×ÅÊäÈë¸Ð̾ºÅ ! Õâ¸ö×Ö·û£¬ÕâÑù¾ÍÔÊÐíÄúÖ´ÐÐÍⲿµÄ shell ÃüÁîÁË¡£ + + 3. ÎÒÃÇÒÔ ls ÃüÁîΪÀý¡£ÊäÈë !ls <»Ø³µ> ¡£¸ÃÃüÁî¾Í»áÁоٳöÄúµ±Ç°Ä¿Â¼µÄ + ÄÚÈÝ£¬¾ÍÈçͬÄúÔÚÃüÁîÐÐÌáʾ·ûÏÂÊäÈë ls ÃüÁîµÄ½á¹ûÒ»Ñù¡£Èç¹û !ls ûÆð + ×÷Óã¬Äú¿ÉÒÔÊÔÊÔ :!dir ¿´¿´¡£ + +---> Ìáʾ¡Ã ËùÓеÄÍⲿÃüÁî¶¼¿ÉÒÔÒÔÕâÖÖ·½Ê½Ö´ÐС£ + +---> Ìáʾ¡Ã ËùÓÐµÄ : ÃüÁî¶¼±ØÐëÒÔ <»Ø³µ> ¸æÖÕ¡£ + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚÎå½²µÚ¶þ½Ú¡Ã¹ØÓÚ±£´æÎļþµÄ¸ü¶àÐÅÏ¢ + + + ** Òª½«¶ÔÎļþµÄ¸Ä¶¯±£´æµ½ÎļþÖУ¬ÇëÊäÈë :w FILENAME ¡£** + + 1. ÊäÈë :!dir »òÕß :!ls »ñÖªµ±Ç°Ä¿Â¼µÄÄÚÈÝ¡£ÄúÓ¦µ±ÒÑÖªµÀ×îºó»¹µÃÇà + <»Ø³µ> °É¡£ + + 2. Ñ¡ÔñÒ»¸öÉÐδ´æÔÚÎļþÃû£¬±ÈÈç TEST ¡£ + + 3. ½Ó×ÅÊäÈë :w TEST (´Ë´¦ TEST ÊÇÄúËùÑ¡ÔñµÄÎļþÃû¡£) + + 4. ¸ÃÃüÁî»áÒÔ TEST ΪÎļþÃû±£´æÕû¸öÎļþ (VIM ½Ì³Ì)¡£ÎªÁËÈ·±£ÕýÈ·±£´æ£¬ + ÇëÔÙ´ÎÊäÈë :!dir ²é¿´ÄúµÄĿ¼ÁбíÄÚÈÝ¡£ + +---> Çë×¢Òâ¡ÃÈç¹ûÄúÍ˳ö VIM È»ºóÔÚÒÔÎļþÃû TEST Ϊ²ÎÊý½øÈ룬ÄÇô¸ÃÎļþÄÚ + ÈÝÓ¦¸ÃͬÄú±£´æÊ±µÄÎļþÄÚÈÝÊÇÍêȫһÑùµÄ¡£ + + 5. ÏÖÔÚÄú¿ÉÒÔͨ¹ýÊäÈë :!rm TEST À´É¾³ý TEST ÎļþÁË¡£ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚÎå½²µÚÈý½Ú¡ÃÒ»¸ö¾ßÓÐÑ¡ÔñÐԵı£´æÃüÁî + + + ** Òª±£´æÎļþµÄ²¿·ÖÄÚÈÝ£¬ÇëÊäÈë :#,# w FILENAME ** + + 1. ÔÙÀ´Ö´ÐÐÒ»´Î :!dir »òÕß :!ls »ñÖªµ±Ç°Ä¿Â¼µÄÄÚÈÝ£¬È»ºóÑ¡ÔñÒ»¸öºÏÊ浀 + ²»ÖØÃûµÄÎļþÃû£¬±ÈÈç TEST ¡£ + + 2. ½Ó׎«¹â±êÒÆ¶¯ÖÁ±¾Ò³µÄ×î¶¥¶Ë£¬È»ºó°´ CTRL-g ÕÒµ½¸ÃÐеÄÐкš£±ðÍüÁË + ÐкÅŶ¡£ + + 3. ½Ó×Űѹâ±êÒÆ¶¯ÖÁ±¾Ò³µÄ×îµ×¶Ë£¬ÔÙ°´Ò»´Î CTRL-g ¡£Ò²±ðÍüÁËÕâ¸öÐкÃŶ¡£ + + 4. ΪÁËÖ»±£´æÎÄÕµÄij¸ö²¿·Ö£¬ÇëÊäÈë :#,# w TEST ¡£ÕâÀïµÄ #,# ¾ÍÊÇÉÏÃæ + ÒªÇóÄú¼ÇסµÄÐкÅ(¶¥¶ËÐкÅ,µ×¶ËÐкÅ)£¬¶ø TEST ¾ÍÊÇÑ¡¶¨µÄÎļþÃû¡£ + + 5. ×îºó£¬Óà :!dir È·ÈÏÎļþÊÇ·ñÕýÈ·±£´æ¡£µ«ÊÇÕâ´ÎÏȱðɾ³ýµô¡£ + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚÎå½²µÚËĽڡÃÌáÈ¡ºÍºÏ²¢Îļþ + + + ** ÒªÏòµ±Ç°ÎļþÖвåÈëÁíÍâµÄÎļþµÄÄÚÈÝ£¬ÇëÊäÈë :r FILENAME ** + + 1. Çë¼üÈë :!dir È·ÈÏÄúÇ°Ãæ´´½¨µÄ TEST Îļþ»¹ÔÚ¡£ + + 2. È»ºó½«¹â±êÒÆ¶¯ÖÁµ±Ç°Ò³ÃæµÄ¶¥¶Ë¡£ + +ÌØ±ðÌáʾ¡Ã Ö´Ðв½Öè3Ö®ºóÄú½«¿´µ½µÚÎå½²µÚÈý½Ú£¬Çë½ìʱÔÙÍùÏÂÒÆ¶¯»Øµ½ÕâÀïÀ´¡£ + + 3. ½Ó×Åͨ¹ý :r TEST ½«Ç°Ãæ´´½¨µÄÃûΪ TEST µÄÎļþÌáÈ¡½øÀ´¡£ + +ÌØ±ðÌáʾ¡ÃÄúËùÌáÈ¡½øÀ´µÄÎļþ½«´Ó¹â±êËùÔÚλÖô¦¿ªÊ¼ÖÃÈë¡£ + + 4. ΪÁËÈ·ÈÏÎļþÒѾ­ÌáÈ¡³É¹¦£¬Òƶ¯¹â±ê»Øµ½Ô­À´µÄλÖþͿÉÒÔ×¢ÒâÓÐÁ½·ÝµÚ + Îå½²µÚÈý½Ú£¬Ò»·ÝÊÇÔ­±¾£¬ÁíÍâÒ»·ÝÊÇÀ´×ÔÎļþµÄ¸±±¾¡£ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚÎ彲С½á + + + 1. :!command ÓÃÓÚÖ´ÐÐÒ»¸öÍⲿÃüÁî command¡£ + + Ç뿴һЩʵ¼ÊÀý×Ó¡Ã + :!dir - ÓÃÓÚÏÔʾµ±Ç°Ä¿Â¼µÄÄÚÈÝ¡£ + :!rm FILENAME - ÓÃÓÚɾ³ýÃûΪ FILENAME µÄÎļþ¡£ + + 2. :w FILENAME ¿É½«µ±Ç° VIM ÖÐÕýÔڱ༭µÄÎļþ±£´æµ½ÃûΪ FILENAME µÄÎÄ + ¼þÖС£ + + 3. :#,#w FILENAME ¿É½«µ±Ç°±à¼­ÎļþµÚ # ÐÐÖÁµÚ # ÐеÄÄÚÈݱ£´æµ½Îļþ + FILENAME ÖС£ + + 4. :r FILENAME ¿ÉÌáÈ¡´ÅÅÌÎļþ FILENAME ²¢½«Æä²åÈëµ½µ±Ç°ÎļþµÄ¹â±êλÖà + ºóÃæ¡£ + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚÁù½²µÚÒ»½Ú¡Ã´ò¿ªÀàÃüÁî + + + ** ÊäÈë o ½«ÔÚ¹â±êµÄÏ·½´ò¿ªÐµÄÒ»Ðв¢½øÈë²åÈëģʽ¡£** + + 1. Ç뽫¹â±êÒÆ¶¯µ½±¾½ÚÖÐÏÂÃæ±ê¼ÇÓÐ ---> µÄÄÇÒ»ÐС£ + + 2. ½Ó×ÅÊäÈëСдµÄ o ÔÚ¹â±ê *Ï·½* ´ò¿ªÐµÄÒ»Ðв¢½øÈë²åÈëģʽ¡£ + + 3. È»ºó¸´ÖƱê¼ÇÓÐ ---> µÄÐв¢°´ ¼üÍ˳ö²åÈëģʽ¶ø½øÈëÕý³£Ä£Ê½¡£ + +---> After typing o the cursor is placed on the open line in Insert mode. + + 4. ΪÁËÔÚ¹â±ê *ÉÏ·½* ´ò¿ªÐµÄÒ»ÐУ¬Ö»ÐèÒªÊäÈë´óдµÄ O ¶ø²»ÊÇСдµÄ o + ¾Í¿ÉÒÔÁË¡£ÇëÔÚÏÂÐвâÊÔһϰɡ£µ±¹â±ê´¦ÔÚÔÚ¸ÃÐÐÉÏʱ£¬°´ Shift-O¿ÉÒÔ + ÔÚ¸ÃÐÐÉÏ·½Ð¿ªÒ»ÐС£ + +Open up a line above this by typing Shift-O while the cursor is on this line. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚÁù½²µÚ¶þ½Ú¡Ã¹â±êºó²åÈëÀàÃüÁî + + + ** ÊäÈë a ½«¿ÉÔÚ¹â±êÖ®ºó²åÈëÎı¾¡£ ** + + 1. ÇëÔÚÕý³£Ä£Ê½ÏÂͨ¹ýÊäÈë $ ½«¹â±êÒÆ¶¯µ½±¾½ÚÖÐÏÂÃæ±ê¼ÇÓÐ ---> µÄµÚÒ»ÐÐ + µÄĩβ¡£ + + 2. ½Ó×ÅÊäÈëСдµÄ a Ôò¿ÉÔÚ¹â±êÖ®ºó²åÈëÎı¾ÁË¡£´óдµÄ A Ôò¿ÉÒÔÖ±½ÓÔÚÐÐ + Ä©²åÈëÎı¾¡£ + +Ìáʾ¡ÃÊäÈë´óд A µÄ²Ù×÷·½·¨¿ÉÒÔÔÚÐÐÄ©²åÈëÎı¾£¬±ÜÃâÁËÊäÈë i£¬¹â±ê¶¨Î»µ½ + ×îºóÒ»¸ö×Ö·û£¬ÊäÈëµÄÎı¾£¬ »Ø¸´Õý³£Ä£Ê½£¬¼ýÍ·ÓÒ¼üÒÆ¶¯¹â±êÒÔ¼° + x ɾ³ýµ±Ç°¹â±êËùÔÚλÖÃ×Ö·ûµÈµÈÖî¶à·±ÔӵIJÙ×÷¡£ + + 3. ²Ù×÷Ö®ºóµÚÒ»ÐоͿÉÒÔ²¹³äÍêÕûÁË¡£Çë×¢Òâ¹â±êºó²åÈëÎı¾Óë²åÈëģʽÊÇ»ù + ±¾ÍêȫһÖµģ¬Ö»ÊÇÎı¾²åÈëµÄλÖö¨Î»ÉÔÓв»Í¬°ÕÁË¡£ + +---> This line will allow you to practice +---> This line will allow you to practice appending text to the end of a line. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚÁù½²µÚÈý½Ú¡ÃÁíÍâÒ»¸öÖû»ÀàÃüÁîµÄ°æ±¾ + + + ** ÊäÈë´óдµÄ R ¿ÉÁ¬ÐøÌæ»»¶à¸ö×Ö·û¡£** + + 1. Ç뽫¹â±êÒÆ¶¯µ½±¾½ÚÖÐÏÂÃæ±ê¼ÇÓÐ ---> µÄµÚÒ»ÐС£ + + 2. ÒÆ¶¯¹â±êµ½µÚÒ»ÐÐÖв»Í¬ÓÚ±êÓÐ ---> µÄµÚ¶þÐеĵÚÒ»¸öµ¥´ÊµÄ¿ªÊ¼£¬¼´µ¥ + ´Ê last ´¦¡£ + + 3. È»ºóÊäÈë´óдµÄ R ¿ªÊ¼°ÑµÚÒ»ÐÐÖеIJ»Í¬ÓÚµÚ¶þÐеÄÊ£Óà×Ö·ûÖðÒ»ÊäÈ룬¾Í + ¿ÉÒÔÈ«²¿Ìæ»»µôÔ­ÓеÄ×Ö·û¶øÊ¹µÃµÚÒ»ÐÐÍêÈ«À×ͬµÚ¶þÐÐÁË¡£ + +---> To make the first line the same as the last on this page use the keys. +---> To make the first line the same as the second, type R and the new text. + + 4. Çë×¢Òâ¡ÃÈç¹ûÄú°´ Í˳öÖû»Ä£Ê½»Ø¸´Õý³£Ä£Ê½£¬ÉÐÎ´Ìæ»»µÄÎı¾½«ÈÔ + È»±£³ÖÔ­×´¡£ + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚÁù½²µÚËĽڡÃÉèÖÃÀàÃüÁîµÄÑ¡Ïî + + + ** ÉèÖÿÉʹ²éÕÒ»òÕßÌæ»»¿ÉºöÂÔ´óСдµÄÑ¡Ïî ** + + + 1. Òª²éÕÒµ¥´Ê ignore ¿ÉÔÚÕý³£Ä£Ê½ÏÂÊäÈë /ignore ¡£ÒªÖظ´²éÕҸôʣ¬¿ÉÒÔ + ÖØ¸´°´ n ¼ü¡£ + + 2. È»ºóÉèÖà ic Ñ¡Ïî(ic¾ÍÊÇÓ¢ÎĺöÂÔ´óСдIgnore CaseµÄÊ××ÖĸËõд´Ê)£¬¼´ + ÊäÈë¡Ã + :set ic + + 3. ÏÖÔÚ¿ÉÒÔͨ¹ý¼üÈë n ¼üÔٴβéÕÒµ¥´Ê ignore¡£Öظ´²éÕÒ¿ÉÒÔÖØ¸´¼üÈë n ¼ü¡£ + + 4. È»ºóÉèÖà hlsearch ºÍ incsearch ÕâÁ½¸öÑ¡ÏÊäÈëÒÔÏÂÄÚÈݡà + :set hls is + + 5. ÏÖÔÚ¿ÉÒÔÔÙ´ÎÊäÈë²éÕÒÃüÁ¿´¿´»áÓÐʲôЧ¹û¡Ã + /ignore + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚÁù½²Ð¡½á + + + 1. ÊäÈëСдµÄ o ¿ÉÒÔÔÚ¹â±êÏ·½´ò¿ªÐµÄÒ»Ðв¢½«¹â±êÖÃÓÚпªµÄÐÐÊ×£¬½øÈë + ²åÈëģʽ¡£ + ÊäÈë´óдµÄ O ¿ÉÒÔÔÚ¹â±êÉÏ·½´ò¿ªÐµÄÒ»Ðв¢½«¹â±êÖÃÓÚпªµÄÐÐÊ×£¬½øÈë + ²åÈëģʽ¡£ + + 2. ÊäÈëСдµÄ a ¿ÉÒÔÔÚ¹â±êËùÔÚλÖÃÖ®ºó²åÈëÎı¾¡£ + ÊäÈë´óдµÄ A ¿ÉÒÔÔÚ¹â±êËùÔÚÐеÄÐÐĩ֮ºó²åÈëÎı¾¡£ + + 3. ÊäÈë´óдµÄ R ½«½øÈëÌæ»»Ä£Ê½£¬Ö±ÖÁ°´ ¼üÍ˳öÌæ»»Ä£Ê½¶ø½øÈëÕý³£ + ģʽ¡£ + + 4. ÊäÈë :set xxx ¿ÉÒÔÉèÖà xxx Ñ¡Ïî¡£ + + + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚÆß½²¡ÃÔÚÏß°ïÖúÃüÁî + + ** ʹÓÃÔÚÏß°ïÖúϵͳ ** + + Vim ÓµÓÐÒ»¸öϸÖÂÈ«ÃæµÄÔÚÏß°ïÖúϵͳ¡£ÒªÆô¶¯¸Ã°ïÖúϵͳ£¬ÇëÑ¡ÔñÈçÏÂÈýÖÖ·½ + ·¨Ö®Ò»¡Ã + - °´Ï ¼ü (Èç¹û¼üÅÌÉÏÓеϰ) + - °´Ï ¼ü (Èç¹û¼üÅÌÉÏÓеϰ) + - ÊäÈë :help <»Ø³µ> + + ÊäÈë :q <»Ø³µ> ¿ÉÒԹرհïÖú´°¿Ú¡£ + + Ìṩһ¸öÕýÈ·µÄ²ÎÊý¸ø":help"ÃüÁÄú¿ÉÒÔÕÒµ½¹ØÓÚ¸ÃÖ÷ÌâµÄ°ïÖú¡£ÇëÊÔÑéÒÔ + ϲÎÊý(¿É±ðÍüÁ˰´»Ø³µ¼üŶ¡£:)¡Ã + + :help w <»Ø³µ> + :help c_ + :help insert-index <»Ø³µ> + :help user-manual <»Ø³µ> + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + µÚ°Ë½²¡Ã´´½¨Ò»¸öÆô¶¯½Å±¾ + + ** ÆôÓÃvimµÄ¹¦ÄÜ ** + + VimµÄ¹¦ÄÜÌØÐÔÒª±Èvi¶àµÃ¶à£¬µ«´ó²¿·Ö¹¦Äܶ¼Ã»ÓÐȱʡ¼¤»î¡£ÎªÁËÆô¶¯¸ü¶àµÄ + ¹¦ÄÜ£¬ÄúµÃ´´½¨Ò»¸övimrcÎļþ¡£ + + 1. ¿ªÊ¼±à¼­vimrcÎļþ£¬ÕâÈ¡¾öÓÚÄúËùʹÓõIJÙ×÷ϵͳ¡Ã + + :edit ~/.vimrc ÕâÊÇUnixϵͳËùʹÓõÄÃüÁî + :edit $VIM/_vimrc ÕâÊÇWindowsϵͳËùʹÓõÄÃüÁî + + 2. ½Ó×ŵ¼Èëvimrc·¶ÀýÎļþ¡Ã + + :read $VIMRUNTIME/vimrc_example.vim + + 3. ±£´æÎļþ£¬ÃüÁîΪ¡Ã + + :write + + ÔÚÏ´ÎÄúÆô¶¯vimµÄʱºò£¬±à¼­Æ÷¾Í»áÓÐÁËÓï·¨¸ßÁÁµÄ¹¦ÄÜ¡£Äú¿ÉÒÔ¼ÌÐø°ÑÄúϲ + »¶µÄÆäËü¹¦ÄÜÉèÖÃÌí¼Óµ½Õâ¸övimrcÎļþÖС£ + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + vim ½Ì³Ìµ½´Ë½áÊø¡£±¾½Ì³ÌÖ»ÊÇΪÁ˼òÃ÷µØ½éÉÜÒ»ÏÂvim±à¼­Æ÷£¬µ«ÒÑ×ãÒÔÈÃÄú + ºÜÈÝÒ×ѧ»áʹÓñ¾±à¼­Æ÷ÁË¡£ÎãÓ¹ÖÊÒÉ£¬vim»¹ÓкܶàºÜ¶àµÄÃüÁ±¾½Ì³ÌËù½é + ÉܵϹ²îµÃÔ¶ÖøÄØ¡£ËùÒÔÄúÒª¾«Í¨µÄ»°£¬»¹Íû¼ÌÐøÅ¬Á¦Å¶¡£ÏÂÒ»²½Äú¿ÉÒÔÔĶÁ + vimÊֲᣬʹÓõÄÃüÁîÊǡà + :help user-manual + + ΪÁ˸ü½øÒ»²½µÄ²Î¿¼ºÍѧϰ£¬ÒÔÏÂÕâ±¾ÊéÖµµÃÍÆ¼ö¡Ã + + Vim - Vi Improved - ×÷Õß¡ÃSteve Oualline + ³ö°æÉç¡ÃNew Riders + + ÕâÊǵÚÒ»±¾ÍêÈ«½²½âvimµÄÊé¼®¡£¶ÔÓÚ³õѧÕßÌØ±ðÓÐÓá£ÆäÖл¹°üº¬ÓдóÁ¿ÊµÀý + ºÍͼʾ¡£ÓûÖªÏêÇ飬Çë·ÃÎÊ http://iccf-holland.org/click5.html + + ÒÔÏÂÕâ±¾Êé±È½ÏÀÏÁ˶øÇÒÄÚÈÝÖ÷ÒªÊÇvi¶ø²»ÊÇvim£¬µ«ÊÇÒ²ÖµµÃÍÆ¼ö¡Ã + + Learning the Vi Editor - ×÷Õß¡ÃLinda Lamb + ³ö°æÉç¡ÃO'Reilly & Associates Inc. + + ÕâÊÇÒ»±¾²»´íµÄÊ飬ͨ¹ýËüÄú¼¸ºõÄܹ»Á˽⵽ȫ²¿viÄܹ»×öµ½µÄÊÂÇé¡£´ËÊéµÄµÚ + Áù¸ö°æ±¾Ò²°üº¬ÁËһЩ¹ØÓÚvimµÄÐÅÏ¢¡£ + + ±¾½Ì³ÌÊÇÓÉÀ´×ÔCalorado School of MineseµÄMichael C. Pierce¡¢Robert K. + Ware Ëù±àдµÄ£¬ÆäÖÐÀ´×ÔColorado State UniversityµÄCharles SmithÌṩÁË + ºÜ¶à´´Òâ¡£±àÕßͨÐŵØÖ·Êǡà + + bware@mines.colorado.edu + + ±¾½Ì³ÌÒÑÓÉBram MoolenaarרΪvim½øÐÐÐÞ¶©¡£ + + + + ÒëÖÆÕ߸½ÑÔ¡Ã + =========== + ¼òÌåÖÐÎĽ̷̳­Òë°æÖ®ÒëÖÆÕßΪÁº²ýÌ© £¬»¹ÓÐ + ÁíÍâÒ»¸öÁªÏµµØÖ·¡Ãlinuxrat@gnuchina.org¡£ + + ·±ÌåÖÐÎĽ̳ÌÊÇ´Ó¼òÌåÖÐÎĽ̷̳­Òë°æÊ¹Óà Debian GNU/Linux ÖÐÎÄÏîĿС + ×éµÄÓÚ¹ã»ÔÏÈÉú±àдµÄÖÐÎĺº×ÖתÂëÆ÷ autoconvert ת»»¶ø³ÉµÄ£¬²¢¶Ôת + »»µÄ½á¹û×öÁËһЩϸ½ÚµÄ¸Ä¶¯¡£ + + ±ä¸ü¼Ç¼¡Ã + ========= + 2002Äê08ÔÂ30ÈÕ Áº²ýÌ© + ¸Ðл RMS@SMTH µÄÖ¸Õý£¬½«¶à´¦´íÎóÐÞÕý¡£ + + 2002Äê04ÔÂ22ÈÕ Áº²ýÌ© + ¸Ðл xuandong@sh163.net µÄÖ¸Õý£¬½«Á½´¦´í±ð×ÖÐÞÕý¡£ + + 2002Äê03ÔÂ18ÈÕ Áº²ýÌ© + ¸ù¾ÝBram MolenaarÏÈÉúÔÚ2002Äê03ÔÂ16ÈÕµÄÀ´ÐÅÒªÇ󣬽«vimtutor1.4ÖÐÒë + °æÉý¼¶µ½vimtutor1.5¡£ + + 2001Äê11ÔÂ15ÈÕ Áº²ýÌ© + ½«vimtutor1.4ÖÐÒë°æÌá½»¸øBram MolenaarºÍSven Guckes¡£ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/bundle/ubuntu-vim72/tutor/tutor.zh.utf-8 b/vim/bundle/ubuntu-vim72/tutor/tutor.zh.utf-8 new file mode 100644 index 0000000..21d7020 --- /dev/null +++ b/vim/bundle/ubuntu-vim72/tutor/tutor.zh.utf-8 @@ -0,0 +1,852 @@ +=============================================================================== += æ­¡ 迎 é–± 讀 《 V I M æ•™ 程 》 ── 版本 1.5 = +=============================================================================== + vim 是一個具有很多命令的功能éžå¸¸å¼·å¤§çš„編輯器。é™äºŽç¯‡å¹…,在本教程當中 + ä¸å°±è©³ç´°ä»‹ç´¹äº†ã€‚本教程的設計目標是講述一些必è¦çš„基本命令,而掌æ¡å¥½é€™ + 些命令,您就能夠很容易將vim當作一個通用的è¬èƒ½ç·¨è¼¯å™¨ä¾†ä½¿ç”¨äº†ã€‚ + + å®Œæˆæœ¬æ•™ç¨‹çš„內容大約需è¦25-30分é˜ï¼Œå–決于您訓練的時間。 + + æ¯ä¸€ç¯€çš„命令æ“作將會更改本文。推薦您復制本文的一個副本,然後在副本上 + 進行訓練(如果您是通éŽ"vimtutor"來啟動教程的,那麼本文就已經是副本了)。 + + 切記一點︰本教程的設計æ€è·¯æ˜¯åœ¨ä½¿ç”¨ä¸­é€²è¡Œå­¸ç¿’的。也就是說,您需è¦é€šéŽ + åŸ·è¡Œå‘½ä»¤ä¾†å­¸ç¿’å®ƒå€‘æœ¬èº«çš„æ­£ç¢ºç”¨æ³•ã€‚å¦‚æžœæ‚¨åªæ˜¯é–±è®€è€Œä¸æ“作,那麼您å¯èƒ½ + 會很快éºå¿˜é€™äº›å‘½ä»¤çš„ï¼ + + 好了,ç¾åœ¨è«‹ç¢ºå®šæ‚¨çš„Shift-Lock(大å°å¯«éŽ–å®šéµ)還沒有按下,然後按éµç›¤ä¸Š + 的字æ¯éµ j 足夠多的次數來移動光標,直到第一節的內容能夠完全充滿å±å¹•。 + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第一講第一節︰移動光標 + + + ※※ è¦ç§»å‹•光標,請ä¾ç…§èªªæ˜Žåˆ†åˆ¥æŒ‰ä¸‹ hã€jã€kã€l éµã€‚ ※※ + + ^ + k æç¤ºï¸° h çš„éµä½äºŽå·¦é‚Šï¼Œæ¯æ¬¡æŒ‰ä¸‹å°±æœƒå‘左移動。 + < h l > l çš„éµä½äºŽå³é‚Šï¼Œæ¯æ¬¡æŒ‰ä¸‹å°±æœƒå‘å³ç§»å‹•。 + j j éµçœ‹èµ·ä¾†å¾ˆè±¡ä¸€æ”¯å°–ç«¯æ–¹å‘æœä¸‹çš„箭頭。 + v + + 1. 請隨æ„在å±å¹•內移動光標,直至您覺得舒æœç‚ºæ­¢ã€‚ + + 2. 按下下行éµ(j),直到出ç¾å…‰æ¨™é‡å¾©ä¸‹è¡Œã€‚ + +---> ç¾åœ¨æ‚¨æ‡‰è©²å·²ç¶“學會如何移動到下一講å§ã€‚ + + 3. ç¾åœ¨è«‹ä½¿ç”¨ä¸‹è¡Œéµï¼Œå°‡å…‰æ¨™ç§»å‹•到第二講。 + +æç¤ºï¸°å¦‚æžœæ‚¨ä¸æ•¢ç¢ºå®šæ‚¨æ‰€æŒ‰ä¸‹çš„å­—æ¯ï¼Œè«‹æŒ‰ä¸‹éµå›žåˆ°æ­£å¸¸(Normal)模å¼ã€‚ + ç„¶å¾Œå†æ¬¡å¾žéµç›¤è¼¸å…¥æ‚¨æƒ³è¦çš„命令。 + +æç¤ºï¸°å…‰æ¨™éµæ‡‰ç•¶ä¹Ÿèƒ½æ­£å¸¸å·¥ä½œçš„。但是使用hjkléµï¼Œåœ¨ç¿’慣之後您就能夠快速 + 地在å±å¹•內四處移動光標了。 + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第一講第二節︰VIM的進入和退出 + + + !! 特別æç¤ºï¸°æ•¬è«‹é–±è®€å®Œæ•´æœ¬ä¸€ç¯€çš„內容,然後æ‰èƒ½åŸ·è¡Œä»¥ä¸‹æ‰€è¬›è§£çš„命令。 + + 1. 請按éµ(é€™æ˜¯ç‚ºäº†ç¢ºä¿æ‚¨è™•在正常模å¼)。 + + 2. 然後輸入︰ :q! <回車> + +---> 這種方å¼çš„é€€å‡ºç·¨è¼¯å™¨çµ•ä¸æœƒä¿å­˜æ‚¨é€²å…¥ç·¨è¼¯å™¨ä»¥ä¾†æ‰€åšçš„æ”¹å‹•。 + 如果您想ä¿å­˜æ›´æ”¹å†é€€å‡ºï¼Œè«‹è¼¸å…¥ï¸° + :wq <回車> + + 3. 如果您看到了命令行æç¤ºç¬¦ï¼Œè«‹è¼¸å…¥èƒ½å¤ å¸¶æ‚¨å›žåˆ°æœ¬æ•™ç¨‹çš„命令,那就是︰ + + vimtutor <回車> + + 通常情æ³ä¸‹æ‚¨ä¹Ÿå¯ä»¥ç”¨é€™ç¨®æ–¹å¼ï¸° + + vim tutor <回車> + +---> 這裡的 'vim' 表示進入vim編輯器,而 'tutor'則是您準備è¦ç·¨è¼¯çš„æ–‡ä»¶ã€‚ + + 4. 如果您自信已經牢牢記ä½äº†é€™äº›æ­¥é©Ÿçš„話,請從步驟1執行到步驟3退出,然 + å¾Œå†æ¬¡é€²å…¥ç·¨è¼¯å™¨ã€‚接著將光標移動到第一講第三節來繼續我們的教程講解。 + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第一講第三節︰文本編輯之刪除 + + + ** 在正常(Normal)模å¼ä¸‹ï¼Œå¯ä»¥æŒ‰ä¸‹ x éµä¾†åˆªé™¤å…‰æ¨™æ‰€åœ¨ä½ç½®çš„字符。** + + 1. è«‹å°‡å…‰æ¨™ç§»å‹•åˆ°æœ¬ç¯€ä¸­ä¸‹é¢æ¨™è¨˜æœ‰ ---> 的那一行。 + + 2. 為了修正輸入錯誤,請將光標移至準備刪除的字符的ä½ç½®è™•。 + + 3. 然後按下 x éµå°‡éŒ¯èª¤å­—符刪除掉。 + + 4. é‡å¾©æ­¥é©Ÿ2到步驟4,直到å¥å­ä¿®æ­£ç‚ºæ­¢ã€‚ + +---> The ccow jumpedd ovverr thhe mooon. + + 5. 好了,該行已經修正了,下一節內容是第一講第四節。 + +特別æç¤ºï¸°åœ¨æ‚¨ç€è¦½æœ¬æ•™ç¨‹æ™‚,ä¸è¦å¼·è¡Œè¨˜æ†¶ã€‚記ä½ä¸€é»žï¸°åœ¨ä½¿ç”¨ä¸­å­¸ç¿’。 + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第一講第四節︰文本編輯之æ’å…¥ + + + ** 在正常模å¼ä¸‹ï¼Œå¯ä»¥æŒ‰ä¸‹ i éµä¾†æ’入文本。** + + 1. è«‹å°‡å…‰æ¨™ç§»å‹•åˆ°æœ¬ç¯€ä¸­ä¸‹é¢æ¨™è¨˜æœ‰ ---> 的第一行。 + + 2. 為了使得第一行內容雷åŒäºŽç¬¬äºŒè¡Œï¼Œè«‹å°‡å…‰æ¨™ç§»è‡³æ–‡æœ¬ç¬¬ä¸€å€‹å­—符準備æ’å…¥ + çš„ä½ç½®ã€‚ + + 3. 然後按下 i éµï¼ŒæŽ¥è‘—輸入必è¦çš„æ–‡æœ¬å­—符。 + + 4. 所有文本都修正完畢,請按下 éµè¿”回正常模å¼ã€‚ + é‡å¾©æ­¥é©Ÿ2至步驟4以便修正å¥å­ã€‚ + +---> There is text misng this . +---> There is some text missing from this line. + + 5. å¦‚æžœæ‚¨å°æ–‡æœ¬æ’å…¥æ“作已經很滿æ„,請接著閱讀下é¢çš„å°çµã€‚ + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第一講å°çµ + + + 1. 光標在å±å¹•文本中的移動既å¯ä»¥ç”¨ç®­é ­éµï¼Œä¹Ÿå¯ä»¥ä½¿ç”¨ hjkl å­—æ¯éµã€‚ + h (左移) j (下行) k (上行) l (å³ç§») + + 2. 欲進入vim編輯器(從命令行æç¤ºç¬¦),請輸入︰vim 文件å <回車> + + 3. 欲退出vim編輯器,請輸入以下命令放棄所有修改︰ + + :q! <回車> + + 或者輸入以下命令ä¿å­˜æ‰€æœ‰ä¿®æ”¹ï¸° + + :wq <回車> + + 4. 在正常模å¼ä¸‹åˆªé™¤å…‰æ¨™æ‰€åœ¨ä½ç½®çš„字符,請按︰ x + + 5. 在正常模å¼ä¸‹è¦åœ¨å…‰æ¨™æ‰€åœ¨ä½ç½®é–‹å§‹æ’入文本,請按︰ + + i è¼¸å…¥å¿…è¦æ–‡æœ¬ + +特別æç¤ºï¸°æŒ‰ä¸‹ 鵿œƒå¸¶æ‚¨å›žåˆ°æ­£å¸¸æ¨¡å¼æˆ–è€…å–æ¶ˆä¸€å€‹ä¸æœŸæœ›æˆ–è€…éƒ¨åˆ†å®Œæˆ +的命令。 + +å¥½äº†ï¼Œç¬¬ä¸€è¬›åˆ°æ­¤çµæŸã€‚ä¸‹é¢æŽ¥ä¸‹ä¾†ç¹¼çºŒç¬¬äºŒè¬›çš„å…§å®¹ã€‚ + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第二講第一節︰刪除類命令 + + + ** 輸入 dw å¯ä»¥å¾žå…‰æ¨™è™•刪除至一個單字/單詞的末尾。** + + 1. 請按下 éµç¢ºä¿æ‚¨è™•于正常模å¼ã€‚ + + 2. è«‹å°‡å…‰æ¨™ç§»å‹•åˆ°æœ¬ç¯€ä¸­ä¸‹é¢æ¨™è¨˜æœ‰ ---> 的那一行。 + + 3. 請將光標移至準備è¦åˆªé™¤çš„單詞的開始。 + + 4. 接著輸入 dw 刪除掉該單詞。 + + 特別æç¤ºï¸°æ‚¨æ‰€è¼¸å…¥çš„ dw æœƒåœ¨æ‚¨è¼¸å…¥çš„åŒæ™‚出ç¾åœ¨å±å¹•的最後一行。如果您輸 + 入有誤,請按下 éµå–æ¶ˆï¼Œç„¶å¾Œé‡æ–°å†ä¾†ã€‚ + +---> There are a some words fun that don't belong paper in this sentence. + + 5. é‡å¾©æ­¥é©Ÿ3至步驟4,直至å¥å­ä¿®æ­£å®Œç•¢ã€‚接著繼續第二講第二節內容。 + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第二講第二節︰其他刪除類命令 + + + ** 輸入 d$ 從當å‰å…‰æ¨™åˆªé™¤åˆ°è¡Œæœ«ã€‚** + + 1. 請按下 éµç¢ºä¿æ‚¨è™•于正常模å¼ã€‚ + + 2. è«‹å°‡å…‰æ¨™ç§»å‹•åˆ°æœ¬ç¯€ä¸­ä¸‹é¢æ¨™è¨˜æœ‰ ---> 的那一行。 + + 3. 請將光標移動到該行的尾部(也就是在第一個點號‘.’後é¢)。 + + 4. 然後輸入 d$ 從光標處刪至當å‰è¡Œå°¾éƒ¨ã€‚ + +---> Somebody typed the end of this line twice. end of this line twice. + + + 5. è«‹ç¹¼çºŒå­¸ç¿’ç¬¬äºŒè¬›ç¬¬ä¸‰ç¯€å°±çŸ¥é“æ˜¯æ€Žéº¼å›žäº‹äº†ã€‚ + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第二講第三節︰關于命令和å°è±¡ + + + 刪除命令 d 的格å¼å¦‚下︰ + + [number] d object 或者 d [number] object + + å…¶æ„如下︰ + number - 代表執行命令的次數(å¯é¸é …,缺çœè¨­ç½®ç‚º 1 )。 + d - 代表刪除。 + object - ä»£è¡¨å‘½ä»¤æ‰€è¦æ“作的å°è±¡(䏋颿œ‰ç›¸é—œä»‹ç´¹)。 + + 一個簡短的å°è±¡åˆ—表︰ + w - 從當å‰å…‰æ¨™ç•¶å‰ä½ç½®ç›´åˆ°å–®å­—/單詞末尾,包括空格。 + e - 從當å‰å…‰æ¨™ç•¶å‰ä½ç½®ç›´åˆ°å–®å­—/單詞末尾,但是 *ä¸* 包括空格。 + $ - 從當å‰å…‰æ¨™ç•¶å‰ä½ç½®ç›´åˆ°ç•¶å‰è¡Œæœ«ã€‚ + +特別æç¤ºï¸° + å°äºŽå‹‡äºŽæŽ¢ç´¢è€…,請在正常模å¼ä¸‹é¢åƒ…按代表相應å°è±¡çš„éµè€Œä¸ä½¿ç”¨å‘½ä»¤ï¼Œå‰‡ + 將看到光標的移動正如上é¢çš„å°è±¡åˆ—表所代表的一樣。 + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第二講第四節︰å°è±¡å‘½ä»¤çš„ç‰¹æ®Šæƒ…æ³ + + + ** 輸入 dd å¯ä»¥åˆªé™¤æ•´ä¸€å€‹ç•¶å‰è¡Œã€‚ ** + + 鑒于整行刪除的高頻度,VIM 的設計者決定è¦ç°¡åŒ–整行刪除,僅需è¦åœ¨åŒä¸€è¡Œä¸Š + 擊打兩次 d å°±å¯ä»¥åˆªé™¤æŽ‰å…‰æ¨™æ‰€åœ¨çš„æ•´è¡Œäº†ã€‚ + + 1. 請將光標移動到本節中下é¢çš„çŸ­å¥æ®µè½ä¸­çš„第二行。 + 2. 輸入 dd 刪除該行。 + 3. 然後移動到第四行。 + 4. 接著輸入 2dd (還記得å‰é¢è¬›éŽçš„ number-command-object 嗎?) 刪除兩行。 + + 1) Roses are red, + 2) Mud is fun, + 3) Violets are blue, + 4) I have a car, + 5) Clocks tell time, + 6) Sugar is sweet + 7) And so are you. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第二講第五節︰撤消類命令 + + + ** 輸入 u 來撤消最後執行的命令,輸入 U 來修正整行。** + + 1. è«‹å°‡å…‰æ¨™ç§»å‹•åˆ°æœ¬ç¯€ä¸­ä¸‹é¢æ¨™è¨˜æœ‰ ---> 的那一行,並將其置于第一個錯誤 + 處。 + 2. 輸入 x åˆªé™¤ç¬¬ä¸€å€‹ä¸æƒ³ä¿ç•™çš„å­—æ¯ã€‚ + 3. 然後輸入 u 撤消最後執行的(一次)命令。 + 4. 這次è¦ä½¿ç”¨ x 修正本行的所有錯誤。 + 5. ç¾åœ¨è¼¸å…¥ä¸€å€‹å¤§å¯«çš„ U ,æ¢å¾©åˆ°è©²è¡Œçš„原始狀態。 + 6. 接著多次輸入 u 以撤消 U ä»¥åŠæ›´å‰çš„命令。 + 7. 然後多次輸入 CTRL-R (先按下 CTRL éµä¸æ”¾é–‹ï¼ŒæŽ¥è‘—輸入 R éµ) ,這樣就 + å¯ä»¥åŸ·è¡Œæ¢å¾©å‘½ä»¤ï¼Œä¹Ÿå°±æ˜¯æ’¤æ¶ˆæŽ‰æ’¤æ¶ˆå‘½ä»¤ã€‚ + +---> Fiix the errors oon thhis line and reeplace them witth undo. + + 8. 這些都是éžå¸¸æœ‰ç”¨çš„å‘½ä»¤ã€‚ä¸‹é¢æ˜¯ç¬¬äºŒè¬›çš„å°çµäº†ã€‚ + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第二講å°çµ + + + 1. 欲從當å‰å…‰æ¨™åˆªé™¤è‡³å–®å­—/單詞末尾,請輸入︰dw + + 2. 欲從當å‰å…‰æ¨™åˆªé™¤è‡³ç•¶å‰è¡Œæœ«å°¾ï¼Œè«‹è¼¸å…¥ï¸°d$ + + 3. 欲刪除整行,請輸入︰dd + + 4. 在正常模å¼ä¸‹ä¸€å€‹å‘½ä»¤çš„æ ¼å¼æ˜¯ï¸° + + [number] command object 或者 command [number] object + å…¶æ„æ˜¯ï¸° + number - 代表的是命令執行的次數 + command - 代表è¦åšçš„事情,比如 d 代表刪除 + object - ä»£è¡¨è¦æ“作的å°è±¡ï¼Œæ¯”如 w 代表單字/單詞,$ 代表到行末等等。 + $ (to the end of line), etc. + + 5. 欲撤消以å‰çš„æ“ä½œï¼Œè«‹è¼¸å…¥ï¸°u (å°å¯«çš„u) + 欲撤消在一行中所åšçš„æ”¹å‹•,請輸入︰U (大寫的U) + 欲撤消以å‰çš„æ’¤æ¶ˆå‘½ä»¤ï¼Œæ¢å¾©ä»¥å‰çš„æ“ä½œçµæžœï¼Œè«‹è¼¸å…¥ï¸°CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第三講第一節︰置入類命令 + + + ** 輸入 p 將最後一次刪除的內容置入光標之後 ** + + 1. 請將光標移動到本節中下é¢ç¤ºèŒƒæ®µè½çš„首行。 + + 2. 輸入 dd 將該行刪除,這樣會將該行ä¿å­˜åˆ°vim的緩沖å€ä¸­ã€‚ + + 3. 接著將光標移動到準備置入的ä½ç½®çš„上方。記ä½ï¸°æ˜¯ä¸Šæ–¹å“¦ã€‚ + + 4. 然後在正常模å¼ä¸‹(éµé€²å…¥),輸入 p 將該行粘貼置入。 + + 5. é‡å¾©æ­¥é©Ÿ2至步驟4,將所有的行ä¾åºæ”¾ç½®åˆ°æ­£ç¢ºçš„ä½ç½®ä¸Šã€‚ + + d) Can you learn too? + b) Violets are blue, + c) Intelligence is learned, + a) Roses are red, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第三講第二節︰替æ›é¡žå‘½ä»¤ + + + ** 輸入 r 和一個字符替æ›å…‰æ¨™æ‰€åœ¨ä½ç½®çš„字符。** + + 1. è«‹å°‡å…‰æ¨™ç§»å‹•åˆ°æœ¬ç¯€ä¸­ä¸‹é¢æ¨™è¨˜æœ‰ ---> 的第一行。 + + 2. 請移動光標到第一個錯誤的é©ç•¶ä½ç½®ã€‚ + + 3. 接著輸入 r ï¼Œé€™æ¨£å°±èƒ½å°‡éŒ¯èª¤æ›¿æ›æŽ‰äº†ã€‚ + + 4. é‡å¾©æ­¥é©Ÿ2和步驟3,直到第一行已經修改完畢。 + +---> Whan this lime was tuoed in, someone presswd some wrojg keys! +---> When this line was typed in, someone pressed some wrong keys! + + 5. 然後我們繼續學校第三講第三節。 + +特別æç¤ºï¸°åˆ‡è¨˜æ‚¨è¦åœ¨ä½¿ç”¨ä¸­å­¸ç¿’ï¼Œè€Œä¸æ˜¯åœ¨è¨˜æ†¶ä¸­å­¸ç¿’。 + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第三講第三節︰更改類命令 + + + ** è¦æ”¹è®Šä¸€å€‹å–®å­—/單詞的部分或者全部,請輸入 cw ** + + 1. è«‹å°‡å…‰æ¨™ç§»å‹•åˆ°æœ¬ç¯€ä¸­ä¸‹é¢æ¨™è¨˜æœ‰ ---> 的第一行。 + + 2. 接著把光標放在單詞 lubw çš„å­—æ¯ u çš„ä½ç½®é‚£è£¡ã€‚ + + 3. 然後輸入 cw å°±å¯ä»¥ä¿®æ­£è©²å–®è©žäº†(在本例這裡是輸入 ine 。) + + 4. 最後按 éµï¼Œç„¶å¾Œå…‰æ¨™å®šä½åˆ°ä¸‹ä¸€å€‹éŒ¯èª¤ç¬¬ä¸€å€‹æº–備更改的字æ¯è™•。 + + 5. é‡å¾©æ­¥é©Ÿ3和步驟4,直到第一個å¥å­å®Œå…¨é›·åŒç¬¬äºŒå€‹å¥å­ã€‚ + +---> This lubw has a few wptfd that mrrf changing usf the change command. +---> This line has a few words that need changing using the change command. + +æç¤ºï¸°è«‹æ³¨æ„ cw 命令ä¸åƒ…僅是替æ›äº†ä¸€å€‹å–®è©žï¼Œä¹Ÿè®“您進入文本æ’入狀態了。 + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第三講第四節︰使用c指令的其他更改類命令 + + + ** 更改類指令å¯ä»¥ä½¿ç”¨åŒåˆªé™¤é¡žå‘½ä»¤æ‰€ä½¿ç”¨çš„å°è±¡åƒæ•¸ã€‚** + + 1. 更改類指令的工作方å¼è·Ÿåˆªé™¤é¡žå‘½ä»¤æ˜¯ä¸€è‡´çš„。æ“ä½œæ ¼å¼æ˜¯ï¸° + + [number] c object 或者 c [number] object + + 2. å°è±¡åƒæ•¸ä¹Ÿæ˜¯ä¸€æ¨£çš„,比如 w 代表單字/單詞,$代表行末等等。 + + 3. è«‹å°‡å…‰æ¨™ç§»å‹•åˆ°æœ¬ç¯€ä¸­ä¸‹é¢æ¨™è¨˜æœ‰ ---> 的第一行。 + + 4. 接著將光標移動到第一個錯誤處。 + + 5. 然後輸入 c$ 使得該行剩下的部分更正得åŒç¬¬äºŒè¡Œä¸€æ¨£ã€‚最後按 éµã€‚ + +---> The end of this line needs some help to make it like the second. +---> The end of this line needs to be corrected using the c$ command. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第三講å°çµ + + + 1. è¦é‡æ–°ç½®å…¥å·²ç¶“刪除的文本內容,請輸入å°å¯«å­—æ¯ p。該æ“作å¯ä»¥å°‡å·²åˆªé™¤ + 的文本內容置于光標之後。如果最後一次刪除的是一個整行,那麼該行將置 + 于當å‰å…‰æ¨™æ‰€åœ¨è¡Œçš„下一行。 + + 2. è¦æ›¿æ›å…‰æ¨™æ‰€åœ¨ä½ç½®çš„字符,請輸入å°å¯«çš„ r å’Œè¦æ›¿æ›æŽ‰åŽŸä½ç½®å­—符的新字 + 符å³å¯ã€‚ + + 3. 更改類命令å…許您改變指定的å°è±¡ï¼Œå¾žç•¶å‰å…‰æ¨™æ‰€åœ¨ä½ç½®ç›´åˆ°å°è±¡çš„æœ«å°¾ã€‚ + 比如輸入 cw å¯ä»¥æ›¿æ›ç•¶å‰å…‰æ¨™åˆ°å–®è©žçš„æœ«å°¾çš„內容;輸入 c$ å¯ä»¥æ›¿æ›ç•¶ + å‰å…‰æ¨™åˆ°è¡Œæœ«çš„內容。 + + 4. æ›´æ”¹é¡žå‘½ä»¤çš„æ ¼å¼æ˜¯ï¸° + + [number] c object 或者 c [number] object + +䏋颿ˆ‘們繼續學習下一講。 + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第四講第一節︰定ä½åŠæ–‡ä»¶ç‹€æ…‹ + + + ** 輸入 CTRL-g 顯示當å‰ç·¨è¼¯æ–‡ä»¶ä¸­ç•¶å‰å…‰æ¨™æ‰€åœ¨è¡Œä½ç½®ä»¥åŠæ–‡ä»¶ç‹€æ…‹ä¿¡æ¯ã€‚ + 輸入 SHIFT-G 則直接跳轉到文件中的æŸä¸€æŒ‡å®šè¡Œã€‚** + + æç¤ºï¸°åˆ‡è¨˜è¦å…ˆé€šè®€æœ¬ç¯€å…§å®¹ï¼Œä¹‹å¾Œæ‰å¯ä»¥åŸ·è¡Œä»¥ä¸‹æ­¥é©Ÿ!!! + + 1. 按下 CTRL éµä¸æ”¾é–‹ç„¶å¾ŒæŒ‰ g éµã€‚然後就會看到é é¢æœ€åº•部出ç¾ä¸€å€‹ç‹€æ…‹ä¿¡ + æ¯è¡Œï¼Œé¡¯ç¤ºçš„內容是當å‰ç·¨è¼¯çš„æ–‡ä»¶åå’Œæ–‡ä»¶çš„ç¸½è¡Œæ•¸ã€‚è«‹è¨˜ä½æ­¥é©Ÿ3的行號。 + + 2. 按下 SHIFT-G éµå¯ä»¥ä½¿å¾—ç•¶å‰å…‰æ¨™ç›´æŽ¥è·³è½‰åˆ°æ–‡ä»¶æœ€å¾Œä¸€è¡Œã€‚ + + 3. 輸入您曾åœç•™çš„行號,然後按下 SHIFT-G。這樣就å¯ä»¥è¿”回到您第一次按下 + CTRL-g 時所在的行好了。注æ„ï¸°è¼¸å…¥è¡Œè™Ÿæ™‚ï¼Œè¡Œè™Ÿæ˜¯ä¸æœƒåœ¨å±å¹•上顯示出來 + 的。 + + 4. 如果願æ„,您å¯ä»¥ç¹¼çºŒåŸ·è¡Œæ­¥é©Ÿ1至步驟三。 + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第四講第二節︰æœç´¢é¡žå‘½ä»¤ + + + ** 輸入 / 以åŠå°¾éš¨çš„字符串å¯ä»¥ç”¨ä»¥åœ¨ç•¶å‰æ–‡ä»¶ä¸­æŸ¥æ‰¾è©²å­—符串。** + + 1. 在正常模å¼ä¸‹è¼¸å…¥ / 字符。您此時會注æ„到該字符和光標都會出ç¾åœ¨å±å¹•底 + 部,這跟 : 命令是一樣的。 + + 2. 接著輸入 errroor <回車>。那個errroorå°±æ˜¯æ‚¨è¦æŸ¥æ‰¾çš„字符串。 + + 3. è¦æŸ¥æ‰¾åŒä¸Šä¸€æ¬¡çš„字符串,åªéœ€è¦æŒ‰ n éµã€‚è¦å‘ç›¸åæ–¹å‘查找åŒä¸Šä¸€æ¬¡çš„å­— + 符串,請輸入 Shift-N å³å¯ã€‚ + + 4. å¦‚æžœæ‚¨æƒ³é€†å‘æŸ¥æ‰¾å­—符串,請使用 ? 代替 / 進行。 + +---> When the search reaches the end of the file it will continue at the start. + + "errroor" is not the way to spell error; errroor is an error. + + æç¤ºï¸°å¦‚æžœæŸ¥æ‰¾å·²ç¶“åˆ°é”æ–‡ä»¶æœ«å°¾ï¼ŒæŸ¥æ‰¾æœƒè‡ªå‹•從文件頭部繼續查找。 + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第四講第三節︰é…å°æ‹¬è™Ÿçš„æŸ¥æ‰¾ + + + ** 按 % å¯ä»¥æŸ¥æ‰¾é…å°çš„æ‹¬è™Ÿ )ã€]ã€}。** + + 1. æŠŠå…‰æ¨™æ”¾åœ¨æœ¬ç¯€ä¸‹é¢æ¨™è¨˜æœ‰ --> 那一行中的任何一個 (ã€[ 或 { 處。 + + 2. 接著按 % 字符。 + + 3. 此時光標的ä½ç½®æ‡‰ç•¶æ˜¯åœ¨é…å°çš„æ‹¬è™Ÿè™•。 + + 4. 冿¬¡æŒ‰ % å°±å¯ä»¥è·³å›žé…å°çš„第一個括號處。 + +---> This ( is a test line with ('s, ['s ] and {'s } in it. )) + +æç¤ºï¸°åœ¨ç¨‹åºèª¿è©¦æ™‚,這個功能用來查找ä¸é…å°çš„æ‹¬è™Ÿæ˜¯å¾ˆæœ‰ç”¨çš„。 + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第四講第四節︰修正錯誤的方法之一 + + + ** 輸入 :s/old/new/g å¯ä»¥æ›¿æ› old 為 new。** + + 1. è«‹å°‡å…‰æ¨™ç§»å‹•åˆ°æœ¬ç¯€ä¸­ä¸‹é¢æ¨™è¨˜æœ‰ ---> 的那一行。 + + 2. 輸入 :s/thee/the <回車> 。請注æ„è©²å‘½ä»¤åªæ”¹è®Šå…‰æ¨™æ‰€åœ¨è¡Œçš„ç¬¬ä¸€å€‹åŒ¹é… + 串。 + + 3. 輸入 :s/thee/the/g 則是替æ›å…¨è¡Œçš„匹é…串。 + +---> the best time to see thee flowers is in thee spring. + + 4. è¦æ›¿æ›å…©è¡Œä¹‹é–“出ç¾çš„æ¯å€‹åŒ¹é…串,請輸入 :#,#s/old/new/g (#,#代表的是 + 兩行的行號)。輸入 :%s/old/new/g å‰‡æ˜¯æ›¿æ›æ•´å€‹æ–‡ä»¶ä¸­çš„æ¯å€‹åŒ¹é…串。 + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第四講å°çµ + + + 1. Ctrl-g 用于顯示當å‰å…‰æ¨™æ‰€åœ¨ä½ç½®å’Œæ–‡ä»¶ç‹€æ…‹ä¿¡æ¯ã€‚Shift-G 用于將光標跳 + 轉至文件最後一行。先敲入一個行號然後按 Shift-G 則是將光標移動至該行 + 號代表的行。 + + 2. 輸入 / ç„¶å¾Œç·Šéš¨ä¸€å€‹å­—ç¬¦ä¸²æ˜¯å‰‡æ˜¯åœ¨ç•¶å‰æ‰€ç·¨è¼¯çš„æ–‡æª”中å‘後查找該字符串。 + 輸入å•號 ? ç„¶å¾Œç·Šéš¨ä¸€å€‹å­—ç¬¦ä¸²æ˜¯å‰‡æ˜¯åœ¨ç•¶å‰æ‰€ç·¨è¼¯çš„æ–‡æª”中å‘剿Ÿ¥æ‰¾è©²å­— + 符串。完æˆä¸€æ¬¡æŸ¥æ‰¾ä¹‹å¾ŒæŒ‰ n éµå‰‡æ˜¯é‡å¾©ä¸Šä¸€æ¬¡çš„命令,å¯åœ¨åŒä¸€æ–¹å‘上查 + 找下一個字符串所在;或者按 Shift-N å‘ç›¸åæ–¹å‘查找下該字符串所在。 + + 3. 如果光標當å‰ä½ç½®æ˜¯æ‹¬è™Ÿ(ã€)ã€[ã€]ã€{ã€},按 % å¯ä»¥å°‡å…‰æ¨™ç§»å‹•到é…å°çš„ + 括號上。 + + 4. 在一行內替æ›é ­ä¸€å€‹å­—符串 old 為新的字符串 new,請輸入 :s/old/new + åœ¨ä¸€è¡Œå…§æ›¿æ›æ‰€æœ‰çš„字符串 old 為新的字符串 new,請輸入 :s/old/new/g + åœ¨å…©è¡Œå…§æ›¿æ›æ‰€æœ‰çš„字符串 old 為新的字符串 new,請輸入 :#,#s/old/new/g + åœ¨æ–‡ä»¶å…§æ›¿æ›æ‰€æœ‰çš„字符串 old 為新的字符串 new,請輸入 :%s/old/new/g + é€²è¡Œå…¨æ–‡æ›¿æ›æ™‚è©¢å•ç”¨æˆ¶ç¢ºèªæ¯å€‹æ›¿æ›éœ€æ·»åŠ  c é¸é …,請輸入 :%s/old/new/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第五講第一節︰在 VIM 內執行外部命令的方法 + + + ** 輸入 :! 然後緊隨著輸入一個外部命令å¯ä»¥åŸ·è¡Œè©²å¤–部命令。** + + 1. 按下我們所熟悉的 : 命令設置光標到å±å¹•底部。這樣就å¯ä»¥è®“您輸入命令了。 + + 2. 接著輸入感嘆號 ! 這個字符,這樣就å…許您執行外部的 shell 命令了。 + + 3. 我們以 ls 命令為例。輸入 !ls <回車> 。該命令就會列舉出您當å‰ç›®éŒ„çš„ + å…§å®¹ï¼Œå°±å¦‚åŒæ‚¨åœ¨å‘½ä»¤è¡Œæç¤ºç¬¦ä¸‹è¼¸å…¥ ls å‘½ä»¤çš„çµæžœä¸€æ¨£ã€‚如果 !ls æ²’èµ· + 作用,您å¯ä»¥è©¦è©¦ :!dir 看看。 + +---> æç¤ºï¸° 所有的外部命令都å¯ä»¥ä»¥é€™ç¨®æ–¹å¼åŸ·è¡Œã€‚ + +---> æç¤ºï¸° 所有的 : 命令都必須以 <回車> 告終。 + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第五講第二節︰關于ä¿å­˜æ–‡ä»¶çš„æ›´å¤šä¿¡æ¯ + + + ** è¦å°‡å°æ–‡ä»¶çš„æ”¹å‹•ä¿å­˜åˆ°æ–‡ä»¶ä¸­ï¼Œè«‹è¼¸å…¥ :w FILENAME ** + + 1. 輸入 :!dir 或者 :!ls ç²çŸ¥ç•¶å‰ç›®éŒ„çš„å…§å®¹ã€‚æ‚¨æ‡‰ç•¶å·²çŸ¥é“æœ€å¾Œé‚„得敲 + <回車> å§ã€‚ + + 2. 鏿“‡ä¸€å€‹å°šæœªå­˜åœ¨æ–‡ä»¶å,比如 TEST 。 + + 3. 接著輸入 :w TEST (此處 TEST æ˜¯æ‚¨æ‰€é¸æ“‡çš„æ–‡ä»¶å。) + + 4. 該命令會以 TEST 為文件åä¿å­˜æ•´å€‹æ–‡ä»¶ (VIM 教程)ã€‚ç‚ºäº†ç¢ºä¿æ­£ç¢ºä¿å­˜ï¼Œ + è«‹å†æ¬¡è¼¸å…¥ :!dir 查看您的目錄列表內容。 + +---> 請注æ„︰如果您退出 VIM 然後在以文件å TEST ç‚ºåƒæ•¸é€²å…¥ï¼Œé‚£éº¼è©²æ–‡ä»¶å…§ + å®¹æ‡‰è©²åŒæ‚¨ä¿å­˜æ™‚的文件內容是完全一樣的。 + + 5. ç¾åœ¨æ‚¨å¯ä»¥é€šéŽè¼¸å…¥ :!rm TEST 來刪除 TEST 文件了。 + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ç¬¬äº”è¬›ç¬¬ä¸‰ç¯€ï¸°ä¸€å€‹å…·æœ‰é¸æ“‡æ€§çš„ä¿å­˜å‘½ä»¤ + + + ** è¦ä¿å­˜æ–‡ä»¶çš„部分內容,請輸入 :#,# w FILENAME ** + + 1. å†ä¾†åŸ·è¡Œä¸€æ¬¡ :!dir 或者 :!ls ç²çŸ¥ç•¶å‰ç›®éŒ„çš„å…§å®¹ï¼Œç„¶å¾Œé¸æ“‡ä¸€å€‹åˆé©çš„ + ä¸é‡å的文件å,比如 TEST 。 + + 2. 接著將光標移動至本é çš„æœ€é ‚端,然後按 CTRL-g 找到該行的行號。別忘了 + 行號哦。 + + 3. 接著把光標移動至本é çš„æœ€åº•ç«¯ï¼Œå†æŒ‰ä¸€æ¬¡ CTRL-g 。也別忘了這個行好哦。 + + 4. 為了åªä¿å­˜æ–‡ç« çš„æŸå€‹éƒ¨åˆ†ï¼Œè«‹è¼¸å…¥ :#,# w TEST 。這裡的 #,# å°±æ˜¯ä¸Šé¢ + è¦æ±‚您記ä½çš„行號(頂端行號,底端行號),而 TEST 就是é¸å®šçš„æ–‡ä»¶å。 + + 5. 最後,用 :!dir ç¢ºèªæ–‡ä»¶æ˜¯å¦æ­£ç¢ºä¿å­˜ã€‚但是這次先別刪除掉。 + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第五講第四節︰æå–å’Œåˆä¸¦æ–‡ä»¶ + + + ** è¦å‘ç•¶å‰æ–‡ä»¶ä¸­æ’å…¥å¦å¤–的文件的內容,請輸入 :r FILENAME ** + + 1. è«‹éµå…¥ :!dir ç¢ºèªæ‚¨å‰é¢å‰µå»ºçš„ TEST 文件還在。 + + 2. 然後將光標移動至當å‰é é¢çš„頂端。 + +特別æç¤ºï¸° 執行步驟3之後您將看到第五講第三節,請屆時å†å¾€ä¸‹ç§»å‹•回到這裡來。 + + 3. æŽ¥è‘—é€šéŽ :r TEST å°‡å‰é¢å‰µå»ºçš„å為 TEST 的文件æå–進來。 + +特別æç¤ºï¸°æ‚¨æ‰€æå–進來的文件將從光標所在ä½ç½®è™•開始置入。 + + 4. ç‚ºäº†ç¢ºèªæ–‡ä»¶å·²ç¶“æå–æˆåŠŸï¼Œç§»å‹•å…‰æ¨™å›žåˆ°åŽŸä¾†çš„ä½ç½®å°±å¯ä»¥æ³¨æ„有兩份第 + 五講第三節,一份是原本,å¦å¤–一份是來自文件的副本。 + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第五講å°çµ + + + 1. :!command 用于執行一個外部命令 command。 + + 請看一些實際例å­ï¸° + :!dir - 用于顯示當å‰ç›®éŒ„的內容。 + :!rm FILENAME - 用于刪除å為 FILENAME 的文件。 + + 2. :w FILENAME å¯å°‡ç•¶å‰ VIM 中正在編輯的文件ä¿å­˜åˆ°å為 FILENAME + 的文件中。 + + 3. :#,#w FILENAME å¯å°‡ç•¶å‰ç·¨è¼¯æ–‡ä»¶ç¬¬ # 行至第 # 行的內容ä¿å­˜åˆ°æ–‡ä»¶ + FILENAME 中。 + + 4. :r FILENAME 坿å–ç£ç›¤æ–‡ä»¶ FILENAME 並將其æ’å…¥åˆ°ç•¶å‰æ–‡ä»¶çš„光標ä½ç½® + 後é¢ã€‚ + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第六講第一節︰打開類命令 + + + ** 輸入 o 將在光標的下方打開新的一行並進入æ’入模å¼ã€‚** + + 1. è«‹å°‡å…‰æ¨™ç§»å‹•åˆ°æœ¬ç¯€ä¸­ä¸‹é¢æ¨™è¨˜æœ‰ ---> 的那一行。 + + 2. 接著輸入å°å¯«çš„ o 在光標 *下方* 打開新的一行並進入æ’入模å¼ã€‚ + + 3. 然後復制標記有 ---> 的行並按 éµé€€å‡ºæ’入模å¼è€Œé€²å…¥æ­£å¸¸æ¨¡å¼ã€‚ + +---> After typing o the cursor is placed on the open line in Insert mode. + + 4. 為了在光標 *上方* 打開新的一行,åªéœ€è¦è¼¸å…¥å¤§å¯«çš„ O è€Œä¸æ˜¯å°å¯«çš„ o + å°±å¯ä»¥äº†ã€‚請在下行測試一下å§ã€‚當光標處在在該行上時,按 Shift-Oå¯ä»¥ + 在該行上方新開一行。 + +Open up a line above this by typing Shift-O while the cursor is on this line. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第六講第二節︰光標後æ’入類命令 + + + ** 輸入 a å°‡å¯åœ¨å…‰æ¨™ä¹‹å¾Œæ’入文本。 ** + + 1. 請在正常模å¼ä¸‹é€šéŽè¼¸å…¥ $ å°‡å…‰æ¨™ç§»å‹•åˆ°æœ¬ç¯€ä¸­ä¸‹é¢æ¨™è¨˜æœ‰ ---> 的第一行 + 的末尾。 + + 2. 接著輸入å°å¯«çš„ a 則å¯åœ¨å…‰æ¨™ä¹‹å¾Œæ’入文本了。大寫的 A 則å¯ä»¥ç›´æŽ¥åœ¨è¡Œ + 末æ’入文本。 + +æç¤ºï¸°è¼¸å…¥å¤§å¯« A çš„æ“作方法å¯ä»¥åœ¨è¡Œæœ«æ’入文本,é¿å…了輸入 i,光標定ä½åˆ° + 最後一個字符,輸入的文本, 回復正常模å¼ï¼Œç®­é ­å³éµç§»å‹•å…‰æ¨™ä»¥åŠ + x 刪除當å‰å…‰æ¨™æ‰€åœ¨ä½ç½®å­—符等等諸多ç¹é›œçš„æ“ä½œã€‚ + + 3. æ“作之後第一行就å¯ä»¥è£œå……完整了。請注æ„光標後æ’入文本與æ’å…¥æ¨¡å¼æ˜¯åŸº + æœ¬å®Œå…¨ä¸€è‡´çš„ï¼Œåªæ˜¯æ–‡æœ¬æ’入的ä½ç½®å®šä½ç¨æœ‰ä¸åŒç½·äº†ã€‚ + +---> This line will allow you to practice +---> This line will allow you to practice appending text to the end of a line. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第六講第三節︰å¦å¤–一個置æ›é¡žå‘½ä»¤çš„版本 + + + ** 輸入大寫的 R å¯é€£çºŒæ›¿æ›å¤šå€‹å­—符。** + + 1. è«‹å°‡å…‰æ¨™ç§»å‹•åˆ°æœ¬ç¯€ä¸­ä¸‹é¢æ¨™è¨˜æœ‰ ---> 的第一行。 + + 2. 移動光標到第一行中ä¸åŒäºŽæ¨™æœ‰ ---> 的第二行的第一個單詞的開始,å³å–® + 詞 last 處。 + + 3. 然後輸入大寫的 R 開始把第一行中的ä¸åŒäºŽç¬¬äºŒè¡Œçš„剩余字符é€ä¸€è¼¸å…¥ï¼Œå°± + å¯ä»¥å…¨éƒ¨æ›¿æ›æŽ‰åŽŸæœ‰çš„å­—ç¬¦è€Œä½¿å¾—ç¬¬ä¸€è¡Œå®Œå…¨é›·åŒç¬¬äºŒè¡Œäº†ã€‚ + +---> To make the first line the same as the last on this page use the keys. +---> To make the first line the same as the second, type R and the new text. + + 4. 請注æ„︰如果您按 é€€å‡ºç½®æ›æ¨¡å¼å›žå¾©æ­£å¸¸æ¨¡å¼ï¼Œå°šæœªæ›¿æ›çš„æ–‡æœ¬å°‡ä» + ç„¶ä¿æŒåŽŸç‹€ã€‚ + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第六講第四節︰設置類命令的é¸é … + + + ** 設置å¯ä½¿æŸ¥æ‰¾æˆ–者替æ›å¯å¿½ç•¥å¤§å°å¯«çš„é¸é … ** + + + 1. è¦æŸ¥æ‰¾å–®è©ž ignore å¯åœ¨æ­£å¸¸æ¨¡å¼ä¸‹è¼¸å…¥ /ignore 。è¦é‡å¾©æŸ¥æ‰¾è©²è©žï¼Œå¯ä»¥ + é‡å¾©æŒ‰ n éµã€‚ + + 2. 然後設置 ic é¸é …(ic就是英文忽略大å°å¯«Ignore Case的首字æ¯ç¸®å¯«è©ž)ï¼Œå³ + 輸入︰ + :set ic + + 3. ç¾åœ¨å¯ä»¥é€šéŽéµå…¥ n éµå†æ¬¡æŸ¥æ‰¾å–®è©ž ignore。é‡å¾©æŸ¥æ‰¾å¯ä»¥é‡å¾©éµå…¥ n éµã€‚ + + 4. 然後設置 hlsearch å’Œ incsearch 這兩個é¸é …,輸入以下內容︰ + :set hls is + + 5. ç¾åœ¨å¯ä»¥å†æ¬¡è¼¸å…¥æŸ¥æ‰¾å‘½ä»¤ï¼Œçœ‹çœ‹æœƒæœ‰ä»€éº¼æ•ˆæžœï¸° + /ignore + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第六講å°çµ + + + 1. 輸入å°å¯«çš„ o å¯ä»¥åœ¨å…‰æ¨™ä¸‹æ–¹æ‰“開新的一行並將光標置于新開的行首,進入 + æ’入模å¼ã€‚ + 輸入大寫的 O å¯ä»¥åœ¨å…‰æ¨™ä¸Šæ–¹æ‰“開新的一行並將光標置于新開的行首,進入 + æ’入模å¼ã€‚ + + 2. 輸入å°å¯«çš„ a å¯ä»¥åœ¨å…‰æ¨™æ‰€åœ¨ä½ç½®ä¹‹å¾Œæ’入文本。 + 輸入大寫的 A å¯ä»¥åœ¨å…‰æ¨™æ‰€åœ¨è¡Œçš„行末之後æ’入文本。 + + 3. 輸入大寫的 R å°‡é€²å…¥æ›¿æ›æ¨¡å¼ï¼Œç›´è‡³æŒ‰ éµé€€å‡ºæ›¿æ›æ¨¡å¼è€Œé€²å…¥æ­£å¸¸ + 模å¼ã€‚ + + 4. 輸入 :set xxx å¯ä»¥è¨­ç½® xxx é¸é …。 + + + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第七講︰在線幫助命令 + + ** 使用在線幫助系統 ** + + Vim æ“æœ‰ä¸€å€‹ç´°è‡´å…¨é¢çš„在線幫助系統。è¦å•Ÿå‹•è©²å¹«åŠ©ç³»çµ±ï¼Œè«‹é¸æ“‡å¦‚下三種方 + 法之一︰ + - 按下 éµ (如果éµç›¤ä¸Šæœ‰çš„話) + - 按下 éµ (如果éµç›¤ä¸Šæœ‰çš„話) + - 輸入 :help <回車> + + 輸入 :q <回車> å¯ä»¥é—œé–‰å¹«åŠ©çª—å£ã€‚ + + æä¾›ä¸€å€‹æ­£ç¢ºçš„åƒæ•¸çµ¦":help"命令,您å¯ä»¥æ‰¾åˆ°é—œäºŽè©²ä¸»é¡Œçš„幫助。請試驗以 + ä¸‹åƒæ•¸(å¯åˆ¥å¿˜äº†æŒ‰å›žè»Šéµå“¦ã€‚:)︰ + + :help w <回車> + :help c_ + :help insert-index <回車> + :help user-manual <回車> + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 第八講︰創建一個啟動腳本 + + ** 啟用vim的功能 ** + + Vimçš„åŠŸèƒ½ç‰¹æ€§è¦æ¯”viå¤šå¾—å¤šï¼Œä½†å¤§éƒ¨åˆ†åŠŸèƒ½éƒ½æ²’æœ‰ç¼ºçœæ¿€æ´»ã€‚為了啟動更多的 + 功能,您得創建一個vimrc文件。 + + 1. 開始編輯vimrcæ–‡ä»¶ï¼Œé€™å–æ±ºäºŽæ‚¨æ‰€ä½¿ç”¨çš„æ“ä½œç³»çµ±ï¸° + + :edit ~/.vimrc 這是Unix系統所使用的命令 + :edit $VIM/_vimrc 這是Windows系統所使用的命令 + + 2. 接著導入vimrc范例文件︰ + + :read $VIMRUNTIME/vimrc_example.vim + + 3. ä¿å­˜æ–‡ä»¶ï¼Œå‘½ä»¤ç‚ºï¸° + + :write + + 在下次您啟動vim的時候,編輯器就會有了語法高亮的功能。您å¯ä»¥ç¹¼çºŒæŠŠæ‚¨å–œ + 歡的其它功能設置添加到這個vimrc文件中。 + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + vim æ•™ç¨‹åˆ°æ­¤çµæŸã€‚æœ¬æ•™ç¨‹åªæ˜¯ç‚ºäº†ç°¡æ˜Žåœ°ä»‹ç´¹ä¸€ä¸‹vim編輯器,但已足以讓您 + 很容易學會使用本編輯器了。毋庸質疑,vim還有很多很多的命令,本教程所介 + 紹的還差得é è‘—呢。所以您è¦ç²¾é€šçš„話,還望繼續努力哦。下一步您å¯ä»¥é–±è®€ + vim手冊,使用的命令是︰ + :help user-manual + + 為了更進一步的åƒè€ƒå’Œå­¸ç¿’,以下這本書值得推薦︰ + + Vim - Vi Improved - 作者︰Steve Oualline + 出版社︰New Riders + + 這是第一本完全講解vim的書ç±ã€‚å°äºŽåˆå­¸è€…ç‰¹åˆ¥æœ‰ç”¨ã€‚å…¶ä¸­é‚„åŒ…å«æœ‰å¤§é‡å¯¦ä¾‹ + å’Œåœ–ç¤ºã€‚æ¬²çŸ¥è©³æƒ…ï¼Œè«‹è¨ªå• http://iccf-holland.org/click5.html + + 以下這本書比較è€äº†è€Œä¸”å…§å®¹ä¸»è¦æ˜¯viè€Œä¸æ˜¯vim,但是也值得推薦︰ + + Learning the Vi Editor - 作者︰Linda Lamb + 出版社︰O'Reilly & Associates Inc. + + 這是一本ä¸éŒ¯çš„æ›¸ï¼Œé€šéŽå®ƒæ‚¨å¹¾ä¹Žèƒ½å¤ äº†è§£åˆ°å…¨éƒ¨vi能夠åšåˆ°çš„事情。此書的第 + 六個版本也包å«äº†ä¸€äº›é—œäºŽvim的信æ¯ã€‚ + + 本教程是由來自Calorado School of Mineseçš„Michael C. Pierceã€Robert K. + Ware 所編寫的,其中來自Colorado State Universityçš„Charles Smithæä¾›äº† + 很多創æ„ã€‚ç·¨è€…é€šä¿¡åœ°å€æ˜¯ï¸° + + bware@mines.colorado.edu + + 本教程已由Bram Moolenaar專為vim進行修訂。 + + + + 譯制者附言︰ + =========== + ç°¡é«”ä¸­æ–‡æ•™ç¨‹ç¿»è­¯ç‰ˆä¹‹è­¯åˆ¶è€…ç‚ºæ¢æ˜Œæ³° ,還有 + å¦å¤–一個è¯ç³»åœ°å€ï¸°linuxrat@gnuchina.org。 + + ç¹é«”中文教程是從簡體中文教程翻譯版使用 Debian GNU/Linux ä¸­æ–‡é …ç›®å° + 組的于廣è¼å…ˆç”Ÿç·¨å¯«çš„中文漢字轉碼器 autoconvert 轉æ›è€Œæˆçš„,並å°è½‰ + æ›çš„çµæžœåšäº†ä¸€äº›ç´°ç¯€çš„æ”¹å‹•。 + + 變更記錄︰ + ========= + 2002å¹´08月30æ—¥ æ¢æ˜Œæ³° + æ„Ÿè¬ RMS@SMTH 的指正,將多處錯誤修正。 + + 2002å¹´04月22æ—¥ æ¢æ˜Œæ³° + æ„Ÿè¬ xuandong@sh163.net 的指正,將兩處錯別字修正。 + + 2002å¹´03月18æ—¥ æ¢æ˜Œæ³° + 根據Bram Molenaar先生在2002å¹´03月16æ—¥çš„ä¾†ä¿¡è¦æ±‚,將vimtutor1.4中譯 + 版å‡ç´šåˆ°vimtutor1.5。 + + 2001å¹´11月15æ—¥ æ¢æ˜Œæ³° + å°‡vimtutor1.4中譯版æäº¤çµ¦Bram Molenaarå’ŒSven Guckes。 + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/bundle/ubuntu-vim72/vimrc_example.vim b/vim/bundle/ubuntu-vim72/vimrc_example.vim new file mode 100644 index 0000000..b35100c --- /dev/null +++ b/vim/bundle/ubuntu-vim72/vimrc_example.vim @@ -0,0 +1,96 @@ +" An example for a vimrc file. +" +" Maintainer: Bram Moolenaar +" Last change: 2008 Dec 17 +" +" To use it, copy it to +" for Unix and OS/2: ~/.vimrc +" for Amiga: s:.vimrc +" for MS-DOS and Win32: $VIM\_vimrc +" for OpenVMS: sys$login:.vimrc + +" When started as "evim", evim.vim will already have done these settings. +if v:progname =~? "evim" + finish +endif + +" Use Vim settings, rather than Vi settings (much better!). +" This must be first, because it changes other options as a side effect. +set nocompatible + +" allow backspacing over everything in insert mode +set backspace=indent,eol,start + +if has("vms") + set nobackup " do not keep a backup file, use versions instead +else + set backup " keep a backup file +endif +set history=50 " keep 50 lines of command line history +set ruler " show the cursor position all the time +set showcmd " display incomplete commands +set incsearch " do incremental searching + +" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries +" let &guioptions = substitute(&guioptions, "t", "", "g") + +" Don't use Ex mode, use Q for formatting +map Q gq + +" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo, +" so that you can undo CTRL-U after inserting a line break. +inoremap u + +" In many terminal emulators the mouse works just fine, thus enable it. +if has('mouse') + set mouse=a +endif + +" Switch syntax highlighting on, when the terminal has colors +" Also switch on highlighting the last used search pattern. +if &t_Co > 2 || has("gui_running") + syntax on + set hlsearch +endif + +" Only do this part when compiled with support for autocommands. +if has("autocmd") + + " Enable file type detection. + " Use the default filetype settings, so that mail gets 'tw' set to 72, + " 'cindent' is on in C files, etc. + " Also load indent files, to automatically do language-dependent indenting. + filetype plugin indent on + + " Put these in an autocmd group, so that we can delete them easily. + augroup vimrcEx + au! + + " For all text files set 'textwidth' to 78 characters. + autocmd FileType text setlocal textwidth=78 + + " When editing a file, always jump to the last known cursor position. + " Don't do it when the position is invalid or when inside an event handler + " (happens when dropping a file on gvim). + " Also don't do it when the mark is in the first line, that is the default + " position when opening a file. + autocmd BufReadPost * + \ if line("'\"") > 1 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif + + augroup END + +else + + set autoindent " always set autoindenting on + +endif " has("autocmd") + +" Convenient command to see the difference between the current buffer and the +" file it was loaded from, thus the changes you made. +" Only define it when not defined already. +if !exists(":DiffOrig") + command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis + \ | wincmd p | diffthis +endif diff --git a/vim/bundle/vim-coffee-script/.gitignore b/vim/bundle/vim-coffee-script/.gitignore new file mode 100644 index 0000000..1ff7b05 --- /dev/null +++ b/vim/bundle/vim-coffee-script/.gitignore @@ -0,0 +1,4 @@ +.*.sw[a-z] +.*.un~ +doc/tags + diff --git a/vim/bundle/vim-coffee-script/Copying.md b/vim/bundle/vim-coffee-script/Copying.md new file mode 100644 index 0000000..8fc6954 --- /dev/null +++ b/vim/bundle/vim-coffee-script/Copying.md @@ -0,0 +1,15 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2010 to 2011 Mick Koch + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. + + diff --git a/vim/bundle/vim-coffee-script/Makefile b/vim/bundle/vim-coffee-script/Makefile new file mode 100644 index 0000000..9ad9adc --- /dev/null +++ b/vim/bundle/vim-coffee-script/Makefile @@ -0,0 +1,25 @@ +REF = HEAD +VERSION = $(shell git describe --always $(REF)) + +ARCHIVE = vim-coffee-script-$(VERSION).zip +ARCHIVE_DIRS = after compiler ftdetect ftplugin indent syntax + +# Don't do anything by default. +all: + +# Make vim.org zipball. +archive: + git archive $(REF) -o $(ARCHIVE) -- $(ARCHIVE_DIRS) + +# Remove zipball. +clean: + -rm -f $(ARCHIVE) + +# Build the list of syntaxes for @coffeeAll. +coffeeAll: + @grep -E 'syn (match|region)' syntax/coffee.vim |\ + grep -v 'contained' |\ + awk '{print $$3}' |\ + uniq + +.PHONY: all archive clean hash coffeeAll diff --git a/vim/bundle/vim-coffee-script/News.md b/vim/bundle/vim-coffee-script/News.md new file mode 100644 index 0000000..652cce6 --- /dev/null +++ b/vim/bundle/vim-coffee-script/News.md @@ -0,0 +1,14 @@ +### Version 001 (October 18, 2011) + +Removed deprecated `coffee_folding` option, added `coffee_compile_vert` option, +split out compiler, fixed indentation and syntax bugs, and added Haml support +and omnicompletion. + + - The coffee compiler is now a proper vim compiler that can be loaded with + `:compiler coffee`. + - The `coffee_compile_vert` option can now be set to split the CoffeeCompile + buffer vertically by default. + - CoffeeScript is now highlighted inside the `:coffeescript` filter in Haml. + - Omnicompletion (`:help compl-omni`) now uses JavaScript's dictionary to + complete words. + - We now have a fancy version number. diff --git a/vim/bundle/vim-coffee-script/Readme.md b/vim/bundle/vim-coffee-script/Readme.md new file mode 100644 index 0000000..fc16c74 --- /dev/null +++ b/vim/bundle/vim-coffee-script/Readme.md @@ -0,0 +1,241 @@ +This project adds [CoffeeScript] support to the vim editor. It handles syntax, +indenting, and compiling. Also included is an [eco] syntax and support for +CoffeeScript in Haml and HTML. + +![Screenshot](http://i.imgur.com/BV29H.png) + +[CoffeeScript]: http://jashkenas.github.com/coffee-script/ +[eco]: https://github.com/sstephenson/eco + +### Install from a Zipball + +This is the quickest way to get things running. + +1. Download the latest zipball from [vim.org][zipball-vim] or + [github][zipball-github]. The latest version on github is under Download + Packages (don't use the Download buttons.) + +2. Extract the archive into `~/.vim/`: + + unzip -od ~/.vim vim-coffee-script-HASH.zip + +These steps are also used to update the plugin. + +[zipball-vim]: http://www.vim.org/scripts/script.php?script_id=3590 +[zipball-github]: https://github.com/kchmck/vim-coffee-script/downloads + +### Install with Pathogen + +Since this plugin has rolling versions based on git commits, using pathogen and +git is the preferred way to install. The plugin ends up contained in its own +directory and updates are just a `git pull` away. + +1. Install tpope's [pathogen] into `~/.vim/autoload/` and add this line to your + `vimrc`: + + call pathogen#infect() + + To get the all the features of this plugin, make sure you also have a + `filetype plugin indent on` line in there. + +[pathogen]: http://www.vim.org/scripts/script.php?script_id=2332 + +2. Create and change into `~/.vim/bundle/`: + + $ mkdir ~/.vim/bundle + $ cd ~/.vim/bundle + +3. Make a clone of the `vim-coffee-script` repository: + + $ git clone https://github.com/kchmck/vim-coffee-script.git + +#### Updating + +1. Change into `~/.vim/bundle/vim-coffee-script/`: + + $ cd ~/.vim/bundle/vim-coffee-script + +2. Pull in the latest changes: + + $ git pull + +### CoffeeMake: Compile the Current File + +The `CoffeeMake` command compiles the current file and parses any errors: + + ![CoffeeMake](http://i.imgur.com/OKRKE.png) + + ![CoffeeMake](http://i.imgur.com/PQ6ed.png) + + ![CoffeeMake](http://i.imgur.com/Jp6NI.png) + +The full signature of the command is: + + :[silent] CoffeeMake[!] [COFFEE-OPTIONS]... + +By default, `CoffeeMake` shows all compiler output and jumps to the first line +reported as an error by `coffee`: + + :CoffeeMake + +Compiler output can be hidden with `silent`: + + :silent CoffeeMake + +Line-jumping can be turned off by adding a bang: + + :CoffeeMake! + +Options given to `CoffeeMake` are passed along to `coffee`: + + :CoffeeMake --bare + +`CoffeeMake` can be manually loaded for a file with: + + :compiler coffee + +#### Recompile on write + +To recompile a file when it's written, add an `autocmd` like this to your +`vimrc`: + + au BufWritePost *.coffee silent CoffeeMake! + +All of the customizations above can be used, too. This one compiles silently +and with the `-b` option, but shows any errors: + + au BufWritePost *.coffee silent CoffeeMake! -b | cwindow | redraw! + +The `redraw!` command is needed to fix a redrawing quirk in terminal vim, but +can removed for gVim. + +#### Default compiler options + +The `CoffeeMake` command passes any options in the `coffee_make_options` +variable along to the compiler. You can use this to set default options: + + let coffee_make_options = "--bare" + +### CoffeeCompile: Compile Snippets of CoffeeScript + +The `CoffeeCompile` command shows how the current file or a snippet of +CoffeeScript is compiled to JavaScript. The full signature of the command is: + + :[RANGE] CoffeeCompile [watch|unwatch] [vert[ical]] [WINDOW-SIZE] + +Calling `CoffeeCompile` without a range compiles the whole file: + + ![CoffeeCompile](http://i.imgur.com/pTesp.png) + + ![Compiled](http://i.imgur.com/81QMf.png) + +Calling `CoffeeCompile` with a range, like in visual mode, compiles the selected +snippet of CoffeeScript: + + ![CoffeeCompile Snippet](http://i.imgur.com/Rm7iu.png) + + ![Compiled Snippet](http://i.imgur.com/KmrG8.png) + +This scratch buffer can be quickly closed by hitting the `q` key. + +Using `vert` splits the CoffeeCompile buffer vertically instead of horizontally: + + :CoffeeCompile vert + +Set the `coffee_compile_vert` variable to split the buffer vertically by +default: + + let coffee_compile_vert = 1 + +The initial size of the CoffeeCompile buffer can be given as a number: + + :CoffeeCompile 4 + +#### Watch (live preview) mode + +Watch mode is like the Try CoffeeScript preview box on the CoffeeScript +homepage: + + ![Watch Mode](http://i.imgur.com/wIN6h.png) + ![Watch Mode](http://i.imgur.com/GgdCo.png) + ![Watch Mode](http://i.imgur.com/QdpAP.png) + +Writing some code and then exiting insert mode automatically updates the +compiled JavaScript buffer. + +Use `watch` to start watching a buffer (`vert` is also recommended): + + :CoffeeCompile watch vert + +After making some changes in insert mode, hit escape and the CoffeeScript will +be recompiled. Changes made outside of insert mode don't trigger this recompile, +but calling `CoffeeCompile` will compile these changes without any bad effects. + +To get synchronized scrolling of a CoffeeScript and CoffeeCompile buffer, set +`scrollbind` on each: + + :setl scrollbind + +Use `unwatch` to stop watching a buffer: + + :CoffeeCompile unwatch + +### CoffeeRun: Run some CoffeeScript + +The `CoffeeRun` command compiles the current file or selected snippet and runs +the resulting JavaScript. Output is shown at the bottom of the screen: + + ![CoffeeRun](http://i.imgur.com/d4yXC.png) + + ![CoffeeRun Output](http://i.imgur.com/m6UID.png) + +### Configure Syntax Highlighting + +Add these lines to your `vimrc` to disable the relevant syntax group. + +#### Disable trailing whitespace error + +Trailing whitespace is highlighted as an error by default. This can be disabled +with: + + hi link coffeeSpaceError NONE + +#### Disable trailing semicolon error + +Trailing semicolons are also considered an error (for help transitioning from +JavaScript.) This can be disabled with: + + hi link coffeeSemicolonError NONE + +#### Disable reserved words error + +Reserved words like `function` and `var` are highlighted as an error where +they're not allowed in CoffeeScript. This can be disabled with: + + hi link coffeeReservedError NONE + +### Tune Vim for CoffeeScript + +Changing these core settings can make vim more CoffeeScript friendly. + +#### Fold by indentation + +Folding by indentation works well for CoffeeScript functions and classes: + + ![Folding](http://i.imgur.com/lpDWo.png) + +To fold by indentation in CoffeeScript files, add this line to your `vimrc`: + + au BufNewFile,BufReadPost *.coffee setl foldmethod=indent nofoldenable + +With this, folding is disabled by default but can be quickly toggled per-file +by hitting `zi`. To enable folding by default, remove `nofoldenable`: + + au BufNewFile,BufReadPost *.coffee setl foldmethod=indent + +#### Two-space indentation + +To get standard two-space indentation in CoffeeScript files, add this line to +your `vimrc`: + + au BufNewFile,BufReadPost *.coffee setl shiftwidth=2 expandtab diff --git a/vim/bundle/vim-coffee-script/Thanks.md b/vim/bundle/vim-coffee-script/Thanks.md new file mode 100644 index 0000000..8ddcf23 --- /dev/null +++ b/vim/bundle/vim-coffee-script/Thanks.md @@ -0,0 +1,44 @@ +Thanks to all bug reporters, and special thanks to those who have contributed +code: + + Brian Egan (brianegan): + Initial compiling support + + Ches Martin (ches): + Initial vim docs + + Chris Hoffman (cehoffman): + Add new keywoards from, to, and do + Highlight the - in negative integers + Add here regex highlighting, increase fold level for here docs + + David Wilhelm (bigfish): + CoffeeRun command + + Jay Adkisson (jayferd): + Support for eco templates + + Karl Guertin (grayrest) + Cakefiles are coffeescript + + Maciej Konieczny (narfdotpl): + Fix funny typo + + Matt Sacks (mattsa): + Javascript omni-completion + coffee_compile_vert option + + Nick Stenning (nickstenning): + Fold by indentation for coffeescript + + Simon Lipp (sloonz): + Trailing spaces are not error on lines containing only spaces + + Stéphan Kochen (stephank): + Initial HTML CoffeeScript highlighting + + Sven Felix Oberquelle (Svelix): + Haml CoffeeScript highlighting + + Wei Dai (clvv): + Fix the use of Vim built-in make command. diff --git a/vim/bundle/vim-coffee-script/Todo.md b/vim/bundle/vim-coffee-script/Todo.md new file mode 100644 index 0000000..3d4ffaa --- /dev/null +++ b/vim/bundle/vim-coffee-script/Todo.md @@ -0,0 +1 @@ +- Don't highlight bad operator combinations diff --git a/vim/bundle/vim-coffee-script/after/syntax/haml.vim b/vim/bundle/vim-coffee-script/after/syntax/haml.vim new file mode 100644 index 0000000..d82fbea --- /dev/null +++ b/vim/bundle/vim-coffee-script/after/syntax/haml.vim @@ -0,0 +1,9 @@ +" Language: CoffeeScript +" Maintainer: Sven Felix Oberquelle +" URL: http://github.com/kchmck/vim-coffee-script +" License: WTFPL + +" Inherit coffee from html so coffeeComment isn't redefined and given higher +" priority than hamlInterpolation. +syn cluster hamlCoffeescript contains=@htmlCoffeeScript +syn region hamlCoffeescriptFilter matchgroup=hamlFilter start="^\z(\s*\):coffeescript\s*$" end="^\%(\z1 \| *$\)\@!" contains=@hamlCoffeeScript,hamlInterpolation keepend diff --git a/vim/bundle/vim-coffee-script/after/syntax/html.vim b/vim/bundle/vim-coffee-script/after/syntax/html.vim new file mode 100644 index 0000000..63ebaec --- /dev/null +++ b/vim/bundle/vim-coffee-script/after/syntax/html.vim @@ -0,0 +1,10 @@ +" Language: CoffeeScript +" Maintainer: Mick Koch +" URL: http://github.com/kchmck/vim-coffee-script +" License: WTFPL + +" Syntax highlighting for text/coffeescript script tags +syn include @htmlCoffeeScript syntax/coffee.vim +syn region coffeeScript start=++me=s-1 keepend +\ contains=@htmlCoffeeScript,htmlScriptTag,@htmlPreproc diff --git a/vim/bundle/vim-coffee-script/compiler/coffee.vim b/vim/bundle/vim-coffee-script/compiler/coffee.vim new file mode 100644 index 0000000..6d97cd8 --- /dev/null +++ b/vim/bundle/vim-coffee-script/compiler/coffee.vim @@ -0,0 +1,68 @@ +" Language: CoffeeScript +" Maintainer: Mick Koch +" URL: http://github.com/kchmck/vim-coffee-script +" License: WTFPL + +if exists('current_compiler') + finish +endif + +let current_compiler = 'coffee' +" Pattern to check if coffee is the compiler +let s:pat = '^' . current_compiler + +" Extra options passed to CoffeeMake +if !exists("coffee_make_options") + let coffee_make_options = "" +endif + +" Get a `makeprg` for the current filename. This is needed to support filenames +" with spaces and quotes, but also not break generic `make`. +function! s:GetMakePrg() + return 'coffee -c ' . g:coffee_make_options . ' $* ' . fnameescape(expand('%')) +endfunction + +" Set `makeprg` and return 1 if coffee is still the compiler, else return 0. +function! s:SetMakePrg() + if &l:makeprg =~ s:pat + let &l:makeprg = s:GetMakePrg() + elseif &g:makeprg =~ s:pat + let &g:makeprg = s:GetMakePrg() + else + return 0 + endif + + return 1 +endfunction + +" Set a dummy compiler so we can check whether to set locally or globally. +CompilerSet makeprg=coffee +call s:SetMakePrg() + +CompilerSet errorformat=Error:\ In\ %f\\,\ %m\ on\ line\ %l, + \Error:\ In\ %f\\,\ Parse\ error\ on\ line\ %l:\ %m, + \SyntaxError:\ In\ %f\\,\ %m, + \%-G%.%# + +" Compile the current file. +command! -bang -bar -nargs=* CoffeeMake make + +" Set `makeprg` on rename since we embed the filename in the setting. +augroup CoffeeUpdateMakePrg + autocmd! + + " Update `makeprg` if coffee is still the compiler, else stop running this + " function. + function! s:UpdateMakePrg() + if !s:SetMakePrg() + autocmd! CoffeeUpdateMakePrg + endif + endfunction + + " Set autocmd locally if compiler was set locally. + if &l:makeprg =~ s:pat + autocmd BufFilePost,BufWritePost call s:UpdateMakePrg() + else + autocmd BufFilePost,BufWritePost call s:UpdateMakePrg() + endif +augroup END diff --git a/vim/bundle/vim-coffee-script/doc/coffee-script.txt b/vim/bundle/vim-coffee-script/doc/coffee-script.txt new file mode 100644 index 0000000..84a537c --- /dev/null +++ b/vim/bundle/vim-coffee-script/doc/coffee-script.txt @@ -0,0 +1,116 @@ +*coffee-script.txt* For Vim version 7.3 + +============================================================================= +Author: Mick Koch *coffee-script-author* +License: WTFPL (see |coffee-script-license|) +============================================================================= + +CONTENTS *coffee-script-contents* + +|coffee-script-introduction| Introduction and Feature Summary +|coffee-script-commands| Commands +|coffee-script-settings| Settings + +{Vi does not have any of this} + +============================================================================= + +INTRODUCTION *coffee-script* + *coffee-script-introduction* + +This plugin adds support for CoffeeScript syntax, indenting, and compiling. +Also included is an eco syntax and support for CoffeeScript in Haml and HTML. + +COMMANDS *coffee-script-commands* + + *:CoffeeMake* +:CoffeeMake[!] {opts} Wrapper around |:make| that also passes options in + |g:coffee_make_options| to the compiler. Use |:silent| + to hide compiler output. See |:make| for more + information about the bang and other helpful commands. + + *:CoffeeCompile* +:[range]CoffeeCompile [vertical] [{win-size}] + Shows how the current file or [range] is compiled + to JavaScript. [vertical] (or vert) splits the + compile buffer vertically instead of horizontally, and + {win-size} sets the initial size of the buffer. It can + be closed quickly with the "q" key. + +:CoffeeCompile {watch} [vertical] [{win-size}] + The watch mode of :CoffeeCompile emulates the "Try + CoffeeScript" live preview on the CoffeeScript web + site. After making changes to the source file, + exiting insert mode will cause the preview buffer to + update automatically. {watch} should be given as + "watch" or "unwatch," where the latter will stop the + automatic updating. [vertical] is recommended, and + 'scrollbind' is useful. + + *:CoffeeRun* +:[range]CoffeeRun Compiles the file or [range] and runs the resulting + JavaScript, displaying the output. + +SETTINGS *coffee-script-settings* + +You can configure plugin behavior using global variables and syntax commands +in your |vimrc|. + +Global Settings~ + + *g:coffee_make_options* +Set default options |CoffeeMake| should pass to the compiler. +> + let coffee_make_options = '--bare' +< + *g:coffee_compile_vert* +Split the CoffeeCompile buffer vertically by default. +> + let coffee_compile_vert = 1 + +Syntax Highlighting~ + *ft-coffee-script-syntax* +Trailing whitespace is highlighted as an error by default. This can be +disabled with: +> + hi link coffeeSpaceError NONE + +Trailing semicolons are also considered an error (for help transitioning from +JavaScript.) This can be disabled with: +> + hi link coffeeSemicolonError NONE + +Reserved words like {function} and {var} are highlighted where they're not +allowed in CoffeeScript. This can be disabled with: +> + hi link coffeeReservedError NONE + +COMPILER *compiler-coffee-script* + +A CoffeeScript compiler is provided as a wrapper around {coffee} and can be +loaded with; +> + compiler coffee + +This is done automatically when a CoffeeScript file is opened if no other +compiler is loaded. + +============================================================================= + +LICENSE *coffee-script-license* + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2010 to 2011 Mick Koch + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. + + vim:tw=78:ts=8:ft=help:norl: diff --git a/vim/bundle/vim-coffee-script/ftdetect/coffee.vim b/vim/bundle/vim-coffee-script/ftdetect/coffee.vim new file mode 100644 index 0000000..25daf12 --- /dev/null +++ b/vim/bundle/vim-coffee-script/ftdetect/coffee.vim @@ -0,0 +1,8 @@ +" Language: CoffeeScript +" Maintainer: Mick Koch +" URL: http://github.com/kchmck/vim-coffee-script +" License: WTFPL + +autocmd BufNewFile,BufRead *.coffee set filetype=coffee +autocmd BufNewFile,BufRead *Cakefile set filetype=coffee +autocmd BufNewFile,BufRead *.coffeekup set filetype=coffee diff --git a/vim/bundle/vim-coffee-script/ftdetect/eco.vim b/vim/bundle/vim-coffee-script/ftdetect/eco.vim new file mode 100644 index 0000000..b420649 --- /dev/null +++ b/vim/bundle/vim-coffee-script/ftdetect/eco.vim @@ -0,0 +1 @@ +autocmd BufNewFile,BufRead *.eco set filetype=eco diff --git a/vim/bundle/vim-coffee-script/ftplugin/coffee.vim b/vim/bundle/vim-coffee-script/ftplugin/coffee.vim new file mode 100644 index 0000000..12ae3f0 --- /dev/null +++ b/vim/bundle/vim-coffee-script/ftplugin/coffee.vim @@ -0,0 +1,221 @@ +" Language: CoffeeScript +" Maintainer: Mick Koch +" URL: http://github.com/kchmck/vim-coffee-script +" License: WTFPL + +if exists("b:did_ftplugin") + finish +endif + +let b:did_ftplugin = 1 + +setlocal formatoptions-=t formatoptions+=croql +setlocal comments=:# +setlocal commentstring=#\ %s +setlocal omnifunc=javascriptcomplete#CompleteJS + +" Enable CoffeeMake if it won't overwrite any settings. +if !len(&l:makeprg) + compiler coffee +endif + +" Reset the global variables used by CoffeeCompile. +function! s:CoffeeCompileResetVars() + " Position in the source buffer + let s:coffee_compile_src_buf = -1 + let s:coffee_compile_src_pos = [] + + " Position in the CoffeeCompile buffer + let s:coffee_compile_buf = -1 + let s:coffee_compile_win = -1 + let s:coffee_compile_pos = [] + + " If CoffeeCompile is watching a buffer + let s:coffee_compile_watch = 0 +endfunction + +" Save the cursor position when moving to and from the CoffeeCompile buffer. +function! s:CoffeeCompileSavePos() + let buf = bufnr('%') + let pos = getpos('.') + + if buf == s:coffee_compile_buf + let s:coffee_compile_pos = pos + else + let s:coffee_compile_src_buf = buf + let s:coffee_compile_src_pos = pos + endif +endfunction + +" Restore the cursor to the source buffer. +function! s:CoffeeCompileRestorePos() + let win = bufwinnr(s:coffee_compile_src_buf) + + if win != -1 + exec win 'wincmd w' + call setpos('.', s:coffee_compile_src_pos) + endif +endfunction + +" Close the CoffeeCompile buffer and clean things up. +function! s:CoffeeCompileClose() + silent! autocmd! CoffeeCompileAuPos + silent! autocmd! CoffeeCompileAuWatch + + call s:CoffeeCompileRestorePos() + call s:CoffeeCompileResetVars() +endfunction + +" Update the CoffeeCompile buffer given some input lines. +function! s:CoffeeCompileUpdate(startline, endline) + let input = join(getline(a:startline, a:endline), "\n") + + " Coffee doesn't like empty input. + if !len(input) + return + endif + + " Compile input. + let output = system('coffee -scb 2>&1', input) + + " Move to the CoffeeCompile buffer. + exec s:coffee_compile_win 'wincmd w' + + " Replace buffer contents with new output and delete the last empty line. + setlocal modifiable + exec '% delete _' + put! =output + exec '$ delete _' + setlocal nomodifiable + + " Highlight as JavaScript if there is no compile error. + if v:shell_error + setlocal filetype= + else + setlocal filetype=javascript + endif + + " Restore the cursor in the compiled output. + call setpos('.', s:coffee_compile_pos) +endfunction + +" Update the CoffeeCompile buffer with the whole source buffer and restore the +" cursor. +function! s:CoffeeCompileWatchUpdate() + call s:CoffeeCompileSavePos() + call s:CoffeeCompileUpdate(1, '$') + call s:CoffeeCompileRestorePos() +endfunction + +" Peek at compiled CoffeeScript in a scratch buffer. We handle ranges like this +" to prevent the cursor from being moved (and its position saved) before the +" function is called. +function! s:CoffeeCompile(startline, endline, args) + " Don't compile the CoffeeCompile buffer. + if bufnr('%') == s:coffee_compile_buf + return + endif + + " Parse arguments. + let watch = a:args =~ '\' + let unwatch = a:args =~ '\' + let size = str2nr(matchstr(a:args, '\<\d\+\>')) + + " Determine default split direction. + if exists("g:coffee_compile_vert") + let vert = 1 + else + let vert = a:args =~ '\' + endif + + " Remove any watch listeners. + silent! autocmd! CoffeeCompileAuWatch + + " If just unwatching, don't compile. + if unwatch + let s:coffee_compile_watch = 0 + return + endif + + if watch + let s:coffee_compile_watch = 1 + endif + + call s:CoffeeCompileSavePos() + + " Build the CoffeeCompile buffer if it doesn't exist. + if s:coffee_compile_buf == -1 + let src_win = bufwinnr(s:coffee_compile_src_buf) + + " Create the new window and resize it. + if vert + let width = size ? size : winwidth(src_win) / 2 + + vertical new + exec 'vertical resize' width + else + " Try to guess the compiled output's height. + let height = size ? size : min([winheight(src_win) / 2, + \ a:endline - a:startline + 2]) + + botright new + exec 'resize' height + endif + + " Set up scratch buffer. + setlocal bufhidden=wipe buftype=nofile + setlocal nobuflisted nomodifiable noswapfile nowrap + + autocmd BufWipeout call s:CoffeeCompileClose() + nnoremap q :hide + + " Save the cursor position on each buffer switch. + augroup CoffeeCompileAuPos + autocmd BufEnter,BufLeave * call s:CoffeeCompileSavePos() + augroup END + + let s:coffee_compile_buf = bufnr('%') + let s:coffee_compile_win = bufwinnr(s:coffee_compile_buf) + endif + + " Go back to the source buffer and do the initial compile. + call s:CoffeeCompileRestorePos() + + if s:coffee_compile_watch + call s:CoffeeCompileWatchUpdate() + + augroup CoffeeCompileAuWatch + autocmd InsertLeave call s:CoffeeCompileWatchUpdate() + augroup END + else + call s:CoffeeCompileUpdate(a:startline, a:endline) + endif +endfunction + +" Complete arguments for the CoffeeCompile command. +function! s:CoffeeCompileComplete(arg, cmdline, cursor) + let args = ['unwatch', 'vertical', 'watch'] + + if !len(a:arg) + return args + endif + + let match = '^' . a:arg + + for arg in args + if arg =~ match + return [arg] + endif + endfor +endfunction + +" Don't let new windows overwrite the CoffeeCompile variables. +if !exists("s:coffee_compile_buf") + call s:CoffeeCompileResetVars() +endif + +" Peek at compiled CoffeeScript. +command! -range=% -bar -nargs=* -complete=customlist,s:CoffeeCompileComplete +\ CoffeeCompile call s:CoffeeCompile(, , ) +" Run some CoffeeScript. +command! -range=% -bar CoffeeRun ,:w !coffee -s diff --git a/vim/bundle/vim-coffee-script/indent/coffee.vim b/vim/bundle/vim-coffee-script/indent/coffee.vim new file mode 100644 index 0000000..f570918 --- /dev/null +++ b/vim/bundle/vim-coffee-script/indent/coffee.vim @@ -0,0 +1,338 @@ +" Language: CoffeeScript +" Maintainer: Mick Koch +" URL: http://github.com/kchmck/vim-coffee-script +" License: WTFPL + +if exists("b:did_indent") + finish +endif + +let b:did_indent = 1 + +setlocal autoindent +setlocal indentexpr=GetCoffeeIndent(v:lnum) +" Make sure GetCoffeeIndent is run when these are typed so they can be +" indented or outdented. +setlocal indentkeys+=0],0),0.,=else,=when,=catch,=finally + +" Only define the function once. +if exists("*GetCoffeeIndent") + finish +endif + +" Keywords to indent after +let s:INDENT_AFTER_KEYWORD = '^\%(if\|unless\|else\|for\|while\|until\|' +\ . 'loop\|switch\|when\|try\|catch\|finally\|' +\ . 'class\)\>' + +" Operators to indent after +let s:INDENT_AFTER_OPERATOR = '\%([([{:=]\|[-=]>\)$' + +" Keywords and operators that continue a line +let s:CONTINUATION = '\<\%(is\|isnt\|and\|or\)\>$' +\ . '\|' +\ . '\%(-\@\|\*\|/\@' + +" A compound assignment like `... = if ...` +let s:COMPOUND_ASSIGNMENT = '[:=]\s*\%(if\|unless\|for\|while\|until\|' +\ . 'switch\|try\|class\)\>' + +" A postfix condition like `return ... if ...`. +let s:POSTFIX_CONDITION = '\S\s\+\zs\<\%(if\|unless\)\>' + +" A single-line else statement like `else ...` but not `else if ... +let s:SINGLE_LINE_ELSE = '^else\s\+\%(\<\%(if\|unless\)\>\)\@!' + +" Max lines to look back for a match +let s:MAX_LOOKBACK = 50 + +" Syntax names for strings +let s:SYNTAX_STRING = 'coffee\%(String\|AssignString\|Embed\|Regex\|Heregex\|' +\ . 'Heredoc\)' + +" Syntax names for comments +let s:SYNTAX_COMMENT = 'coffee\%(Comment\|BlockComment\|HeregexComment\)' + +" Syntax names for strings and comments +let s:SYNTAX_STRING_COMMENT = s:SYNTAX_STRING . '\|' . s:SYNTAX_COMMENT + +" Get the linked syntax name of a character. +function! s:SyntaxName(linenum, col) + return synIDattr(synID(a:linenum, a:col, 1), 'name') +endfunction + +" Check if a character is in a comment. +function! s:IsComment(linenum, col) + return s:SyntaxName(a:linenum, a:col) =~ s:SYNTAX_COMMENT +endfunction + +" Check if a character is in a string. +function! s:IsString(linenum, col) + return s:SyntaxName(a:linenum, a:col) =~ s:SYNTAX_STRING +endfunction + +" Check if a character is in a comment or string. +function! s:IsCommentOrString(linenum, col) + return s:SyntaxName(a:linenum, a:col) =~ s:SYNTAX_STRING_COMMENT +endfunction + +" Check if a whole line is a comment. +function! s:IsCommentLine(linenum) + " Check the first non-whitespace character. + return s:IsComment(a:linenum, indent(a:linenum) + 1) +endfunction + +" Repeatedly search a line for a regex until one is found outside a string or +" comment. +function! s:SmartSearch(linenum, regex) + " Start at the first column. + let col = 0 + + " Search until there are no more matches, unless a good match is found. + while 1 + call cursor(a:linenum, col + 1) + let [_, col] = searchpos(a:regex, 'cn', a:linenum) + + " No more matches. + if !col + break + endif + + if !s:IsCommentOrString(a:linenum, col) + return 1 + endif + endwhile + + " No good match found. + return 0 +endfunction + +" Skip a match if it's in a comment or string, is a single-line statement that +" isn't adjacent, or is a postfix condition. +function! s:ShouldSkip(startlinenum, linenum, col) + if s:IsCommentOrString(a:linenum, a:col) + return 1 + endif + + " Check for a single-line statement that isn't adjacent. + if s:SmartSearch(a:linenum, '\') && a:startlinenum - a:linenum > 1 + return 1 + endif + + if s:SmartSearch(a:linenum, s:POSTFIX_CONDITION) && + \ !s:SmartSearch(a:linenum, s:COMPOUND_ASSIGNMENT) + return 1 + endif + + return 0 +endfunction + +" Find the farthest line to look back to, capped to line 1 (zero and negative +" numbers cause bad things). +function! s:MaxLookback(startlinenum) + return max([1, a:startlinenum - s:MAX_LOOKBACK]) +endfunction + +" Get the skip expression for searchpair(). +function! s:SkipExpr(startlinenum) + return "s:ShouldSkip(" . a:startlinenum . ", line('.'), col('.'))" +endfunction + +" Search for pairs of text. +function! s:SearchPair(start, end) + " The cursor must be in the first column for regexes to match. + call cursor(0, 1) + + let startlinenum = line('.') + + " Don't need the W flag since MaxLookback caps the search to line 1. + return searchpair(a:start, '', a:end, 'bcn', + \ s:SkipExpr(startlinenum), + \ s:MaxLookback(startlinenum)) +endfunction + +" Try to find a previous matching line. +function! s:GetMatch(curline) + let firstchar = a:curline[0] + + if firstchar == '}' + return s:SearchPair('{', '}') + elseif firstchar == ')' + return s:SearchPair('(', ')') + elseif firstchar == ']' + return s:SearchPair('\[', '\]') + elseif a:curline =~ '^else\>' + return s:SearchPair('\<\%(if\|unless\|when\)\>', '\') + elseif a:curline =~ '^catch\>' + return s:SearchPair('\', '\') + elseif a:curline =~ '^finally\>' + return s:SearchPair('\', '\') + endif + + return 0 +endfunction + +" Get the nearest previous line that isn't a comment. +function! s:GetPrevNormalLine(startlinenum) + let curlinenum = a:startlinenum + + while curlinenum > 0 + let curlinenum = prevnonblank(curlinenum - 1) + + if !s:IsCommentLine(curlinenum) + return curlinenum + endif + endwhile + + return 0 +endfunction + +" Try to find a comment in a line. +function! s:FindComment(linenum) + let col = 0 + + while 1 + call cursor(a:linenum, col + 1) + let [_, col] = searchpos('#', 'cn', a:linenum) + + if !col + break + endif + + if s:IsComment(a:linenum, col) + return col + endif + endwhile + + return 0 +endfunction + +" Get a line without comments or surrounding whitespace. +function! s:GetTrimmedLine(linenum) + let comment = s:FindComment(a:linenum) + let line = getline(a:linenum) + + if comment + " Subtract 1 to get to the column before the comment and another 1 for + " zero-based indexing. + let line = line[:comment - 2] + endif + + return substitute(substitute(line, '^\s\+', '', ''), + \ '\s\+$', '', '') +endfunction + +function! s:GetCoffeeIndent(curlinenum) + let prevlinenum = s:GetPrevNormalLine(a:curlinenum) + + " Don't do anything if there's no previous line. + if !prevlinenum + return -1 + endif + + let curline = s:GetTrimmedLine(a:curlinenum) + + " Try to find a previous matching statement. This handles outdenting. + let matchlinenum = s:GetMatch(curline) + + if matchlinenum + return indent(matchlinenum) + endif + + " Try to find a matching `when`. + if curline =~ '^when\>' && !s:SmartSearch(prevlinenum, '\') + let linenum = a:curlinenum + + while linenum > 0 + let linenum = s:GetPrevNormalLine(linenum) + + if getline(linenum) =~ '^\s*when\>' + return indent(linenum) + endif + endwhile + + return -1 + endif + + let prevline = s:GetTrimmedLine(prevlinenum) + let previndent = indent(prevlinenum) + + " Always indent after these operators. + if prevline =~ s:INDENT_AFTER_OPERATOR + return previndent + &shiftwidth + endif + + " Indent after a continuation if it's the first. + if prevline =~ s:CONTINUATION + " If the line ends in a slash, make sure it isn't a regex. + if prevline =~ '/$' + " Move to the line so we can get the last column. + call cursor(prevlinenum) + + if s:IsString(prevlinenum, col('$') - 1) + return -1 + endif + endif + + let prevprevlinenum = s:GetPrevNormalLine(prevlinenum) + + " If the continuation is the first in the file, don't run the other checks. + if !prevprevlinenum + return previndent + &shiftwidth + endif + + let prevprevline = s:GetTrimmedLine(prevprevlinenum) + + if prevprevline !~ s:CONTINUATION && prevprevline !~ s:CONTINUATION_BLOCK + return previndent + &shiftwidth + endif + + return -1 + endif + + " Indent after these keywords and compound assignments if they aren't a + " single-line statement. + if prevline =~ s:INDENT_AFTER_KEYWORD || prevline =~ s:COMPOUND_ASSIGNMENT + if !s:SmartSearch(prevlinenum, '\') && prevline !~ s:SINGLE_LINE_ELSE + return previndent + &shiftwidth + endif + + return -1 + endif + + " Indent a dot access if it's the first. + if curline =~ s:DOT_ACCESS && prevline !~ s:DOT_ACCESS + return previndent + &shiftwidth + endif + + " Outdent after these keywords if they don't have a postfix condition or are + " a single-line statement. + if prevline =~ s:OUTDENT_AFTER + if !s:SmartSearch(prevlinenum, s:POSTFIX_CONDITION) || + \ s:SmartSearch(prevlinenum, '\') + return previndent - &shiftwidth + endif + endif + + " No indenting or outdenting is needed. + return -1 +endfunction + +" Wrap s:GetCoffeeIndent to keep the cursor position. +function! GetCoffeeIndent(curlinenum) + let oldcursor = getpos('.') + let indent = s:GetCoffeeIndent(a:curlinenum) + call setpos('.', oldcursor) + + return indent +endfunction diff --git a/vim/bundle/vim-coffee-script/syntax/coffee.vim b/vim/bundle/vim-coffee-script/syntax/coffee.vim new file mode 100755 index 0000000..e31e7f0 --- /dev/null +++ b/vim/bundle/vim-coffee-script/syntax/coffee.vim @@ -0,0 +1,217 @@ +" Language: CoffeeScript +" Maintainer: Mick Koch +" URL: http://github.com/kchmck/vim-coffee-script +" License: WTFPL + +" Bail if our syntax is already loaded. +if exists('b:current_syntax') && b:current_syntax == 'coffee' + finish +endif + +" Include JavaScript for coffeeEmbed. +syn include @coffeeJS syntax/javascript.vim + +" Highlight long strings. +syn sync minlines=100 + +" CoffeeScript identifiers can have dollar signs. +setlocal isident+=$ + +" These are `matches` instead of `keywords` because vim's highlighting +" priority for keywords is higher than matches. This causes keywords to be +" highlighted inside matches, even if a match says it shouldn't contain them -- +" like with coffeeAssign and coffeeDot. +syn match coffeeStatement /\<\%(return\|break\|continue\|throw\)\>/ display +hi def link coffeeStatement Statement + +syn match coffeeRepeat /\<\%(for\|while\|until\|loop\)\>/ display +hi def link coffeeRepeat Repeat + +syn match coffeeConditional /\<\%(if\|else\|unless\|switch\|when\|then\)\>/ +\ display +hi def link coffeeConditional Conditional + +syn match coffeeException /\<\%(try\|catch\|finally\)\>/ display +hi def link coffeeException Exception + +syn match coffeeKeyword /\<\%(new\|in\|of\|by\|and\|or\|not\|is\|isnt\|class\|extends\|super\|do\)\>/ +\ display +" The `own` keyword is only a keyword after `for`. +syn match coffeeKeyword /\/ contained containedin=coffeeRepeat +\ display +hi def link coffeeKeyword Keyword + +syn match coffeeOperator /\<\%(instanceof\|typeof\|delete\)\>/ display +hi def link coffeeOperator Operator + +" The first case matches symbol operators only if they have an operand before. +syn match coffeeExtendedOp /\%(\S\s*\)\@<=[+\-*/%&|\^=!<>?.]\+\|[-=]>\|--\|++\|:/ +\ display +syn match coffeeExtendedOp /\<\%(and\|or\)=/ display +hi def link coffeeExtendedOp coffeeOperator + +" This is separate from `coffeeExtendedOp` to help differentiate commas from +" dots. +syn match coffeeSpecialOp /[,;]/ display +hi def link coffeeSpecialOp SpecialChar + +syn match coffeeBoolean /\<\%(true\|on\|yes\|false\|off\|no\)\>/ display +hi def link coffeeBoolean Boolean + +syn match coffeeGlobal /\<\%(null\|undefined\)\>/ display +hi def link coffeeGlobal Type + +" A special variable +syn match coffeeSpecialVar /\<\%(this\|prototype\|arguments\)\>/ display +" An @-variable +syn match coffeeSpecialVar /@\%(\I\i*\)\?/ display +hi def link coffeeSpecialVar Special + +" A class-like name that starts with a capital letter +syn match coffeeObject /\<\u\w*\>/ display +hi def link coffeeObject Structure + +" A constant-like name in SCREAMING_CAPS +syn match coffeeConstant /\<\u[A-Z0-9_]\+\>/ display +hi def link coffeeConstant Constant + +" A variable name +syn cluster coffeeIdentifier contains=coffeeSpecialVar,coffeeObject, +\ coffeeConstant + +" A non-interpolated string +syn cluster coffeeBasicString contains=@Spell,coffeeEscape +" An interpolated string +syn cluster coffeeInterpString contains=@coffeeBasicString,coffeeInterp + +" Regular strings +syn region coffeeString start=/"/ skip=/\\\\\|\\"/ end=/"/ +\ contains=@coffeeInterpString +syn region coffeeString start=/'/ skip=/\\\\\|\\'/ end=/'/ +\ contains=@coffeeBasicString +hi def link coffeeString String + +" A integer, including a leading plus or minus +syn match coffeeNumber /\i\@/ display +syn match coffeeNumber /\<0b[01]\+\>/ display +hi def link coffeeNumber Number + +" A floating-point number, including a leading plus or minus +syn match coffeeFloat /\i\@/ + \ display + hi def link coffeeReservedError Error +endif + +" A normal object assignment +syn match coffeeObjAssign /@\?\I\i*\s*\ze::\@!/ contains=@coffeeIdentifier display +hi def link coffeeObjAssign Identifier + +syn keyword coffeeTodo TODO FIXME XXX contained +hi def link coffeeTodo Todo + +syn match coffeeComment /#.*/ contains=@Spell,coffeeTodo +hi def link coffeeComment Comment + +syn region coffeeBlockComment start=/####\@!/ end=/###/ +\ contains=@Spell,coffeeTodo +hi def link coffeeBlockComment coffeeComment + +" A comment in a heregex +syn region coffeeHeregexComment start=/#/ end=/\ze\/\/\/\|$/ contained +\ contains=@Spell,coffeeTodo +hi def link coffeeHeregexComment coffeeComment + +" Embedded JavaScript +syn region coffeeEmbed matchgroup=coffeeEmbedDelim +\ start=/`/ skip=/\\\\\|\\`/ end=/`/ +\ contains=@coffeeJS +hi def link coffeeEmbedDelim Delimiter + +syn region coffeeInterp matchgroup=coffeeInterpDelim start=/#{/ end=/}/ contained +\ contains=@coffeeAll +hi def link coffeeInterpDelim PreProc + +" A string escape sequence +syn match coffeeEscape /\\\d\d\d\|\\x\x\{2\}\|\\u\x\{4\}\|\\./ contained display +hi def link coffeeEscape SpecialChar + +" A regex -- must not follow a parenthesis, number, or identifier, and must not +" be followed by a number +syn region coffeeRegex start=/\%(\%()\|\i\@/ contains=@coffeeTop containedin=ALLBUT,@ecoRegions keepend +syn region ecoExpression matchgroup=ecoDelimiter start=/<%[=\-]/ end=/%>/ contains=@coffeeTop containedin=ALLBUT,@ecoRegions keepend +syn region ecoComment matchgroup=ecoComment start=/<%#/ end=/%>/ contains=@coffeeTodo,@Spell containedin=ALLBUT,@ecoRegions keepend + +" eco features not in coffeescript proper +syn keyword ecoEnd end containedin=@ecoRegions +syn match ecoIndentColon /\s+\w+:/ containedin=@ecoRegions + +" Define the default highlighting. + +hi def link ecoDelimiter Delimiter +hi def link ecoComment Comment +hi def link ecoEnd coffeeConditional +hi def link ecoIndentColon None + +let b:current_syntax = 'eco' + +" vim: nowrap sw=2 sts=2 ts=8: diff --git a/vim/bundle/vim-coffee-script/test/test-eco.html.eco b/vim/bundle/vim-coffee-script/test/test-eco.html.eco new file mode 100644 index 0000000..d8c5ed4 --- /dev/null +++ b/vim/bundle/vim-coffee-script/test/test-eco.html.eco @@ -0,0 +1,12 @@ + + <%# comment %> + + <%# basic %> + <%- foo = "1" %> + + <%# interpolation %> + <%= " == #{ ( -> "LOL" )() } == " %> + + <%# interpolation with nested curlies %> + <%= " == #{ { a: 1, b: { c: 3, d: 4 } } } == " %> + diff --git a/vim/bundle/vim-coffee-script/test/test-interp.coffee b/vim/bundle/vim-coffee-script/test/test-interp.coffee new file mode 100644 index 0000000..399ea0d --- /dev/null +++ b/vim/bundle/vim-coffee-script/test/test-interp.coffee @@ -0,0 +1,3 @@ +# Nested curlies +" >> #{ == { { { } } } == } << " +" >> #{ == { abc: { def: 42 } } == } << " diff --git a/vim/bundle/vim-coffee-script/test/test-ops.coffee b/vim/bundle/vim-coffee-script/test/test-ops.coffee new file mode 100644 index 0000000..54be8db --- /dev/null +++ b/vim/bundle/vim-coffee-script/test/test-ops.coffee @@ -0,0 +1,90 @@ +# Various operators +abc instanceof def +typeof abc +delete abc +abc::def + +abc + def +abc - def +abc * def +abc / def +abc % def +abc & def +abc | def +abc ^ def +abc >> def +abc << def +abc >>> def +abc ? def +abc && def +abc and def +abc || def +abc or def + +abc += def +abc -= def +abc *= def +abc /= def +abc %= def +abc &= def +abc |= def +abc ^= def +abc >>= def +abc <<= def +abc >>>= def +abc ?= def +abc &&= def +abc ||= def + +abc and= def +abc or= def + +abc.def.ghi +abc?.def?.ghi + +abc < def +abc > def +abc = def +abc == def +abc != def +abc <= def +abc >= def + +abc++ +abc-- +++abc +--abc + +# Nested operators +abc[def] = ghi +abc[def[ghi: jkl]] = 42 +@abc[def] = ghi + +abc["#{def = 42}"] = 42 +abc["#{def.ghi = 42}"] = 42 +abc["#{def[ghi] = 42}"] = 42 +abc["#{def['ghi']}"] = 42 + +# Object assignments +abc = + def: 123 + DEF: 123 + @def: 123 + Def: 123 + 'def': 123 + 42: 123 + +# Operators shouldn't be highlighted +vector= +wand= + +abc+++ +abc--- +abc ** def +abc &&& def +abc ^^ def +abc ===== def +abc <==== def +abc >==== def +abc +== def +abc =^= def diff --git a/vim/bundle/vim-coffee-script/test/test-reserved.coffee b/vim/bundle/vim-coffee-script/test/test-reserved.coffee new file mode 100644 index 0000000..b841760 --- /dev/null +++ b/vim/bundle/vim-coffee-script/test/test-reserved.coffee @@ -0,0 +1,27 @@ +# Should be an error +function = 42 +var = 42 + +# Shouldn't be an error +abc.with = 42 +function: 42 +var: 42 + +# Keywords shouldn't be highlighted +abc.function +abc.do +abc.break +abc.true + +abc::function +abc::do +abc::break +abc::true + +abc:: function +abc. function + +# Numbers should be highlighted +def.42 +def .42 +def::42 diff --git a/vim/bundle/vim-coffee-script/test/test.html b/vim/bundle/vim-coffee-script/test/test.html new file mode 100644 index 0000000..fac772f --- /dev/null +++ b/vim/bundle/vim-coffee-script/test/test.html @@ -0,0 +1,5 @@ + diff --git a/vim/bundle/vim-colors-solarized/README.mkd b/vim/bundle/vim-colors-solarized/README.mkd new file mode 100644 index 0000000..a163b02 --- /dev/null +++ b/vim/bundle/vim-colors-solarized/README.mkd @@ -0,0 +1,267 @@ +--- +Title: Solarized Colorscheme for Vim +Description: Precision colors for machines and people +Author: Ethan Schoonover +Colors: light yellow +Created: 2011 Mar 15 +Modified: 2011 Apr 16 + +--- + +Solarized Colorscheme for Vim +============================= + +Developed by Ethan Schoonover + +Visit the [Solarized homepage] +------------------------------ + +See the [Solarized homepage] for screenshots, +details and colorscheme versions for Vim, Mutt, popular terminal emulators and +other applications. + +Screenshots +----------- + +![solarized dark](https://github.com/altercation/solarized/raw/master/img/solarized-vim.png) + +Downloads +--------- + +If you have come across this colorscheme via the [Vim-only repository] on +github, or the [vim.org script] page see the link above to the Solarized +homepage or visit the main [Solarized repository]. + +The [Vim-only repository] is kept in sync with the main [Solarized repository] +and is for installation convenience only (with [Pathogen] or [Vundle], for +instance). Issues, bug reports, changelogs are centralized at the main +[Solarized repository]. + +[Solarized homepage]: http://ethanschoonover.com/solarized +[Solarized repository]: https://github.com/altercation/solarized +[Vim-only repository]: https://github.com/altercation/vim-colors-solarized +[vimorg-script]: http://vim.org/script +[Pathogen]: https://github.com/tpope/vim-pathogen +[Vundle]: https://github.com/gmarik/vundle + +Installation +------------ + +### Option 1: Manual installation + +1. Move `solarized.vim` to your `.vim/colors` directory. After downloading the + vim script or package: + + $ cd vim-colors-solarized/colors + $ mv solarized.vim ~/.vim/colors/ + +### Option 2: Pathogen installation ***(recommended)*** + +1. Download and install Tim Pope's [Pathogen]. + +2. Next, move or clone the `vim-colors-solarized` directory so that it is + a subdirectory of the `.vim/bundle` directory. + + a. **Clone:** + + $ cd ~/.vim/bundle + $ git clone git://github.com/altercation/vim-colors-solarized.git + + b. **Move:** + + In the parent directory of vim-colors-solarized: + + $ mv vim-colors-solarized ~/.vim/bundle/ + +### Modify .vimrc + +After either Option 1 or Option 2 above, put the following two lines in your +.vimrc: + + syntax enable + set background=dark + colorscheme solarized + +or, for the light background mode of Solarized: + + syntax enable + set background=light + colorscheme solarized + +I like to have a different background in GUI and terminal modes, so I can use +the following if-then. However, I find vim's background autodetection to be +pretty good and, at least with MacVim, I can leave this background value +assignment out entirely and get the same results. + + if has('gui_running') + set background=light + else + set background=dark + endif + +See the [Solarized homepage] for screenshots which will help you +select either the light or dark background. + +### IMPORTANT NOTE FOR TERMINAL USERS: + +If you are going to use Solarized in Terminal mode (i.e. not in a GUI version +like gvim or macvim), **please please please** consider setting your terminal +emulator's colorscheme to used the Solarized palette. I've included palettes +for some popular terminal emulator as well as Xdefaults in the official +Solarized download available from [Solarized homepage]. If you use +Solarized *without* these colors, Solarized will need to be told to degrade its +colorscheme to a set compatible with the limited 256 terminal palette (whereas +by using the terminal's 16 ansi color values, you can set the correct, specific +values for the Solarized palette). + +If you do use the custom terminal colors, solarized.vim should work out of the +box for you. If you are using a terminal emulator that supports 256 colors and +don't want to use the custom Solarized terminal colors, you will need to use +the degraded 256 colorscheme. To do so, simply add the following line *before* +the `colorschem solarized` line: + + let g:solarized_termcolors=256 + +Again, I recommend just changing your terminal colors to Solarized values +either manually or via one of the many terminal schemes available for import. + +Advanced Configuration +---------------------- + +Solarized will work out of the box with just the two lines specified above but +does include several other options that can be set in your .vimrc file. + +Set these in your vimrc file prior to calling the colorscheme. +" + option name default optional + ------------------------------------------------ + g:solarized_termcolors= 16 | 256 + g:solarized_termtrans = 0 | 1 + g:solarized_degrade = 0 | 1 + g:solarized_bold = 1 | 0 + g:solarized_underline = 1 | 0 + g:solarized_italic = 1 | 0 + g:solarized_contrast = "normal"| "high" or "low" + g:solarized_visibility= "normal"| "high" or "low" + ------------------------------------------------ + +### Option Details + +* g:solarized_termcolors + + This is set to *16* by default, meaning that Solarized will attempt to use + the standard 16 colors of your terminal emulator. You will need to set + those colors to the correct Solarized values either manually or by + importing one of the many colorscheme available for popular terminal + emulators and Xdefaults. + +* g:solarized_termtrans + + If you use a terminal emulator with a transparent background and Solarized + isn't displaying the background color transparently, set this to 1 and + Solarized will use the default (transparent) background of the terminal + emulator. *urxvt* required this in my testing; iTerm2 did not. + + Note that on Mac OS X Terminal.app, solarized_termtrans is set to 1 by + default as this is almost always the best option. The only exception to + this is if the working terminfo file supports 256 colors (xterm-256color). + +* g:solarized_degrade + + For test purposes only; forces Solarized to use the 256 degraded color mode + to test the approximate color values for accuracy. + +* g:solarized_bold | g:solarized_underline | g:solarized_italic + + If you wish to stop Solarized from displaying bold, underlined or + italicized typefaces, simply assign a zero value to the appropriate + variable, for example: `let g:solarized_italic=0` + +* g:solarized_contrast + + Stick with normal! It's been carefully tested. Setting this option to high + or low does use the same Solarized palette but simply shifts some values up + or down in order to expand or compress the tonal range displayed. + +* g:solarized_visibility + + Special characters such as trailing whitespace, tabs, newlines, when + displayed using `:set list` can be set to one of three levels depending on + your needs. Default value is `normal` with `high` and `low` options. + +Toggle Background Function +-------------------------- + +Solarized comes with a Toggle Background plugin that by default will map to + if that mapping is available. If it is not available you will need to +either map the function manually or change your current mapping to +something else. + +To set your own mapping in your .vimrc file, simply add the following line to +support normal, insert and visual mode usage, changing the "" value to the +key or key combination you wish to use: + + call togglebg#map("") + +Note that you'll want to use a single function key or equivalent if you want +the plugin to work in all modes (normal, insert, visual). + +Code Notes +---------- + +Use folding to view the `solarized.vim` script with `foldmethod=marker` turned +on. + +I have attempted to modularize the creation of Vim colorschemes in this script +and, while it could be refactored further, it should be a good foundation for +the creation of any color scheme. By simply changing the sixteen values in the +GUI section and testing in gvim (or mvim) you can rapidly prototype new +colorschemes without diving into the weeds of line-item editing each syntax +highlight declaration. + +The Values +---------- + +L\*a\*b values are canonical (White D65, Reference D50), other values are +matched in sRGB space. + + SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B sRGB HSB + --------- ------- ---- ------- ----------- ---------- ----------- ----------- + base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21 + base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26 + base01 #586e75 10/7 brgreen 240 #4e4e4e 45 -07 -07 88 110 117 194 25 46 + base00 #657b83 11/7 bryellow 241 #585858 50 -07 -07 101 123 131 195 23 51 + base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59 + base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63 + base2 #eee8d5 7/7 white 254 #d7d7af 92 -00 10 238 232 213 44 11 93 + base3 #fdf6e3 15/7 brwhite 230 #ffffd7 97 00 10 253 246 227 44 10 99 + yellow #b58900 3/3 yellow 136 #af8700 60 10 65 181 137 0 45 100 71 + orange #cb4b16 9/3 brred 166 #d75f00 50 50 55 203 75 22 18 89 80 + red #dc322f 1/1 red 160 #d70000 50 65 45 220 50 47 1 79 86 + magenta #d33682 5/5 magenta 125 #af005f 50 65 -05 211 54 130 331 74 83 + violet #6c71c4 13/5 brmagenta 61 #5f5faf 50 15 -45 108 113 196 237 45 77 + blue #268bd2 4/4 blue 33 #0087ff 55 -10 -45 38 139 210 205 82 82 + cyan #2aa198 6/6 cyan 37 #00afaf 60 -35 -05 42 161 152 175 74 63 + green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60 + +License +------- +Copyright (c) 2011 Ethan Schoonover + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vim/bundle/vim-colors-solarized/autoload/togglebg.vim b/vim/bundle/vim-colors-solarized/autoload/togglebg.vim new file mode 100644 index 0000000..108511f --- /dev/null +++ b/vim/bundle/vim-colors-solarized/autoload/togglebg.vim @@ -0,0 +1,55 @@ +" Toggle Background +" Modified: 2011 Apr 29 +" Maintainer: Ethan Schoonover +" License: OSI approved MIT license + +if exists("g:loaded_togglebg") + finish +endif +let g:loaded_togglebg = 1 + +" noremap is a bit misleading here if you are unused to vim mapping. +" in fact, there is remapping, but only of script locally defined remaps, in +" this case TogBG. The