diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-03-28 21:08:56 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-03-28 21:08:56 +0000 |
commit | d2cec5b043361ee798a0522244135f4ea87838f6 (patch) | |
tree | 3ad43aed8a8c373f85a2a3adf286b045c14f6cfe /runtime | |
parent | 607a95ed81973faab2e1c3d9c91822082694fdc3 (diff) | |
download | vim-git-d2cec5b043361ee798a0522244135f4ea87838f6.tar.gz |
updated for version 7.0c02v7.0c02
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/insert.txt | 17 | ||||
-rw-r--r-- | runtime/doc/syntax.txt | 15 | ||||
-rw-r--r-- | runtime/doc/tags | 4 | ||||
-rw-r--r-- | runtime/doc/todo.txt | 31 | ||||
-rw-r--r-- | runtime/doc/version7.txt | 19 | ||||
-rw-r--r-- | runtime/filetype.vim | 8 | ||||
-rw-r--r-- | runtime/ftplugin/man.vim | 8 | ||||
-rw-r--r-- | runtime/lang/menu_ja_jp.euc-jp.vim | 7 | ||||
-rw-r--r-- | runtime/lang/menu_ja_jp.utf-8.vim | 7 | ||||
-rw-r--r-- | runtime/lang/menu_japanese_japan.932.vim | 7 | ||||
-rw-r--r-- | runtime/mswin.vim | 5 | ||||
-rw-r--r-- | runtime/scripts.vim | 7 | ||||
-rw-r--r-- | runtime/synmenu.vim | 69 | ||||
-rw-r--r-- | runtime/syntax/coretex.vim | 377 | ||||
-rw-r--r-- | runtime/syntax/debsources.vim | 40 | ||||
-rw-r--r-- | runtime/syntax/plaintex.vim | 166 |
16 files changed, 713 insertions, 74 deletions
diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index a38af97f1..6138af6d6 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1,4 +1,4 @@ -*insert.txt* For Vim version 7.0c. Last change: 2006 Mar 21 +*insert.txt* For Vim version 7.0c. Last change: 2006 Mar 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -304,9 +304,11 @@ insert mode: *i_CTRL-X_CTRL-E* CTRL-X CTRL-E scroll window one line up. + When doing completion look here: |complete_CTRL-E| *i_CTRL-X_CTRL-Y* CTRL-X CTRL-Y scroll window one line down. + When doing completion look here: |complete_CTRL-Y| After CTRL-X is pressed, each CTRL-E (CTRL-Y) scrolls the window up (down) by one line unless that would cause the cursor to move from its current position @@ -590,6 +592,16 @@ and CTRL-P (previous). Also see the 'infercase' option if you want to adjust the case of the match. + *complete_CTRL-E* +When completion is active you can use CTRL-E to stop it and go back to the +orignally typed text. The CTRL-E will not be inserted. + + *complete_CTRL-Y* +When the popup menu is displayed you can use CTRL-Y to stop completion and +accept the currently selected entry. The CTRL-Y is not inserted. Typing a +space, Enter, or some other unprintable character will leave completion mode +and insert that typed character. + Note: The keys that are valid in CTRL-X mode are not mapped. This allows for ":map ^F ^X^F" to work (where ^F is CTRL-F and ^X is CTRL-X). The key that ends CTRL-X mode (any key that is not a valid CTRL-X mode command) is mapped. @@ -1121,7 +1133,8 @@ any printable, non-white character: Add this character and reduce the number of matches. In both states these can be used: -<CR> and <Enter> Accept the currently selected match and stop completion. +CTRL-Y Yes: Accept the currently selected match and stop completion. +CTRL-E End completion, go back to what was typed. <PageUp> Select a match several entries back, but don't insert it. <PageDown> Select a match several entries further, but don't insert it. <Up> Select the previous match, as if CTRL-P was used, but don't diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 0d5263b3d..0d037d6dc 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 7.0c. Last change: 2006 Mar 12 +*syntax.txt* For Vim version 7.0c. Last change: 2006 Mar 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1945,6 +1945,19 @@ x > 0 to sync at least x lines backwards, x = 0 to sync from start. +PLAINTEX *plaintex.vim* *ft-plaintex-syntax* + +TeX is a typesetting language, and plaintex is the file type for the "plain" +variant of TeX. If you never want your *.tex files recognized as plain TeX, +see |ft-tex-plugin|. + +This syntax file has the option > + + let g:plaintex_delimiters = 1 + +if you want to highlight brackets "[]" and braces "{}". + + PPWIZARD *ppwiz.vim* *ft-ppwiz-syntax* PPWizard is a preprocessor for HTML and OS/2 INF files diff --git a/runtime/doc/tags b/runtime/doc/tags index 03dd1cd30..3f8b2e1d8 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -4720,6 +4720,8 @@ compl-whole-line insert.txt /*compl-whole-line* complete() eval.txt /*complete()* complete-functions insert.txt /*complete-functions* complete-items insert.txt /*complete-items* +complete_CTRL-E insert.txt /*complete_CTRL-E* +complete_CTRL-Y insert.txt /*complete_CTRL-Y* complete_add() eval.txt /*complete_add()* complete_check() eval.txt /*complete_check()* complex-change change.txt /*complex-change* @@ -5285,6 +5287,7 @@ ft-php-omni insert.txt /*ft-php-omni* ft-php-syntax syntax.txt /*ft-php-syntax* ft-php3-syntax syntax.txt /*ft-php3-syntax* ft-phtml-syntax syntax.txt /*ft-phtml-syntax* +ft-plaintex-syntax syntax.txt /*ft-plaintex-syntax* ft-postscr-syntax syntax.txt /*ft-postscr-syntax* ft-ppwiz-syntax syntax.txt /*ft-ppwiz-syntax* ft-printcap-syntax syntax.txt /*ft-printcap-syntax* @@ -6465,6 +6468,7 @@ pi_gzip.txt pi_gzip.txt /*pi_gzip.txt* pi_netrw.txt pi_netrw.txt /*pi_netrw.txt* pi_paren.txt pi_paren.txt /*pi_paren.txt* pi_spec.txt pi_spec.txt /*pi_spec.txt* +plaintex.vim syntax.txt /*plaintex.vim* plsql sql.txt /*plsql* plugin usr_05.txt /*plugin* plugin-details filetype.txt /*plugin-details* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 82eed6145..98e3b82a9 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.0c. Last change: 2006 Mar 27 +*todo.txt* For Vim version 7.0c. Last change: 2006 Mar 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -30,12 +30,11 @@ be worked on, but only if you sponsor Vim development. See |sponsor|. *known-bugs* -------------------- Known bugs and current work ----------------------- -In completion using Enter to accept the current match causes trouble. -Leave it out? Typing a space already works - The 16 bit DOS version compiles now, but it's still too low on memory, writing a file fails when 'writebackup' is set. +Have argv() return the arguments in a List. + New Hungarian dictionary. (Laci Nemeth) test COMPOUNDFORBIDFLAG implement use of COMPOUNDPERMITFLAG @@ -43,10 +42,16 @@ New Hungarian dictionary. (Laci Nemeth) implement using CHECKCOMPOUNDPATTERN: match words with sl_comppat[]. explain the use of affix flags, replace |spell-affix-rare| -Mac: When started from finder path isn't set and curdir is /. -Benji Fisher suggests using system() (2006 Mar 26) - -Mac: reported default for $VIM is /Applications/share/vim +- Set user variables to the names of the actually used user vimrc file, + the first directory looked for user plugins/syntax files. + $MYVIMRC for .vimrc, $MYGVIMRC for .gvimrc, $MYRUNTIME/plugin for + runtime files? + Also: when the environment variable exists, use it. If it doesn't + exist, set it. Requires good names: $VIM_USER_VIMRC $VIM_USER_DIR + Add a menu item "Preferences" that does "sp $MYVIMRC". +- The Replace dialog takes "\r" literal, unless "replace all" is used. + Need to escape backslashes. + Win32: the text to replace with isn't remembered. Add more tests for all new functionality in Vim 7. Especially new functions. @@ -132,16 +137,6 @@ Awaiting updated patches: - findmatch() should be adjusted for Lisp. See remark at get_lisp_indent(). Esp. \( and \) should be skipped. (Dorai Sitaram, incomplete patch Mar 18) -- Set user variables to the names of the actually used user vimrc file, - the first directory looked for user plugins/syntax files. - $MYVIMRC for .vimrc, $MYGVIMRC for .gvimrc, $MYRUNTIME/plugin for - runtime files? - Also: when the environment variable exists, use it. If it doesn't - exist, set it. Requires good names: $VIM_USER_VIMRC $VIM_USER_DIR - Add a menu item "Preferences" that does "sp $MYVIMRC". -- The Replace dialog takes "\r" literal, unless "replace all" is used. - Need to escape backslashes. - Win32: the text to replace with isn't remembered. - For GUI Find/Replace dialog support using a regexp. Patch for Motif and GTK by degreneir (nov 10 and nov 18). - Patch for "paranoid mode" by Kevin Collins, March 7. Needs much more work. diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt index 607b90a0a..2a3cd9572 100644 --- a/runtime/doc/version7.txt +++ b/runtime/doc/version7.txt @@ -1,4 +1,4 @@ -*version7.txt* For Vim version 7.0c. Last change: 2006 Mar 27 +*version7.txt* For Vim version 7.0c. Last change: 2006 Mar 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -77,6 +77,9 @@ was being edited by another Vim. Vim now gives an error message |E768|. The support for Mac OS 9 has been removed. +Files ending in .tex now have 'filetype' set to "context", "plaintex", or +"tex". |ft-tex-plugin| + Minor incompatibilities: @@ -876,6 +879,7 @@ context syntax and ftplugin file. (Nikolai Weibull) CRM114 ftplugin file. (Nikolai Weibull) cvs RC ftplugin file. (Nikolai Weibull) D indent file. (Jason Mills) +Debian Sources.list syntax file. (Matthijs Mohlmann) dictconf and dictdconf syntax, indent and ftplugin files. (Nikolai Weibull) diff ftplugin file. (Bram Moolenaar) dircolors ftplugin file. (Nikolai Weibull) @@ -917,7 +921,7 @@ Pascal indent file. (Neil Carter) passwd syntax and ftplugin file. (Nikolai Weibull) PHP compiler plugin. (Doug Kearns) pinfo ftplugin file. (Nikolai Weibull) -plaintex ftplugin file. (Benji Fisher) +plaintex syntax and ftplugin files. (Nikolai Weibull, Benji Fisher) procmail ftplugin file. (Nikolai Weibull) prolog ftplugin file. (Nikolai Weibull) protocols syntax and ftplugin file. (Nikolai Weibull) @@ -997,6 +1001,9 @@ Mac: better integration with Xcode. Post a fake mouse-up event after the odoc event and the drag receive handler to work around a stall after Vim loads a file. Fixed an off-by-one line number error. (Da Woon Jung) +Mac: When started from Finder change directory to the file being edited or the +user home directory. + Added the t_SI and t_EI escape sequences for starting and ending Insert mode. GUI font selector for Motif. (Marcin Dalecki) @@ -2223,5 +2230,13 @@ change. Win32: added menu to GUI tab pages line. (Yegappan Lakshmanan) +Mac: Added document icons. (Benji Fisher) + +Insert mode completion: Using Enter to accept the current match causes +confusion. Use CTRL-Y instead. Also, use CTRL-E to go back to the typed +text. + +GUI: When there are left and righ scrollbars, ":tabedit" kept them instead of +using the one that isn't needed. vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 23b1690a0..cad2cc140 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2006 Mar 26 +" Last Change: 2006 Mar 28 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -475,6 +475,9 @@ au BufNewFile,BufRead *.si setf cuplsim " Debian Control au BufNewFile,BufRead */debian/control setf debcontrol +" Debian Sources.list +au BufNewFile,BufRead /etc/apt/sources.list setf debsources + " ROCKLinux package description au BufNewFile,BufRead *.desc setf desc @@ -2005,6 +2008,9 @@ au BufNewFile,BufRead [cC]hange[lL]og* " Crontab au BufNewFile,BufRead crontab,crontab.* call s:StarSetf('crontab') +" Debian Sources.list +au BufNewFile,BufRead /etc/apt/sources.list.d/* call s:StarSetf('debsources') + " Dracula au BufNewFile,BufRead drac.* call s:StarSetf('dracula') diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim index 869ae9ab7..04964a549 100644 --- a/runtime/ftplugin/man.vim +++ b/runtime/ftplugin/man.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: man " Maintainer: Nam SungHyun <namsh@kldp.org> -" Last Change: 2003 Dec 24 +" Last Change: 2006 Mar 28 " To make the ":Man" command available before editing a manual page, source " this script from your startup vimrc file. @@ -23,7 +23,7 @@ if &filetype == "man" if !hasmapto('<Plug>ManBS') nmap <buffer> <LocalLeader>h <Plug>ManBS endif - nnoremap <buffer> <Plug>ManBS :%s/.\b//g<CR>:set nomod<CR>'' + nnoremap <buffer> <Plug>ManBS :%s/.\b//g<CR>:setl nomod<CR>'' nnoremap <buffer> <c-]> :call <SID>PreGetPage(v:count)<CR> nnoremap <buffer> <c-t> :call <SID>PopPage()<CR> @@ -137,9 +137,9 @@ func <SID>GetPage(...) endif silent exec "edit $HOME/".page.".".sect."~" " Avoid warning for editing the dummy file twice - set buftype=nofile noswapfile + setl buftype=nofile noswapfile - set ma + setl ma silent exec "norm 1GdG" let $MANWIDTH = winwidth(0) silent exec "r!/usr/bin/man ".s:GetCmdArg(sect, page)." | col -b" diff --git a/runtime/lang/menu_ja_jp.euc-jp.vim b/runtime/lang/menu_ja_jp.euc-jp.vim index 38a65bfb1..4dcfd6e1f 100644 --- a/runtime/lang/menu_ja_jp.euc-jp.vim +++ b/runtime/lang/menu_ja_jp.euc-jp.vim @@ -2,7 +2,7 @@ " " Menu Translations: Japanese (EUC-JP) " Translated By: MURAOKA Taro <koron@tka.att.ne.jp> -" Last Change: 04-Feb-2006. +" Last Change: 28-Mar-2006. " Quit when menu translations have already been done. if exists("did_menu_trans") @@ -30,6 +30,7 @@ let g:menutrans_help_dialog = "ヘルプを検索したいコマンドもしくは単語を入力して menutrans &File ファイル(&F) menutrans &Open\.\.\.<Tab>:e 開く(&O)\.\.\.<Tab>:e menutrans Sp&lit-Open\.\.\.<Tab>:sp 分割して開く(&L)\.\.\.<Tab>:sp +menutrans Open\ Tab\.\.\.<Tab>:tabnew タブページで開く<Tab>:tabnew menutrans &New<Tab>:enew 新規作成(&N)<Tab>:enew menutrans &Close<Tab>:close 閉じる(&C)<Tab>:close menutrans &Save<Tab>:w 保存(&S)<Tab>:w @@ -51,7 +52,7 @@ menutrans &Paste<Tab>"+gP 貼り付け(&P)<Tab>"+gP menutrans Put\ &Before<Tab>[p 前に貼る(&B)<Tab>[p menutrans Put\ &After<Tab>]p 後に貼る(&A)<Tab>]p menutrans &Delete<Tab>x 消す(&D)<Tab>x -menutrans &Select\ All<Tab>ggVG 全て選択(&S)<Tab>ggvG +menutrans &Select\ All<Tab>ggVG 全て選択(&S)<Tab>ggVG menutrans &Find\.\.\. 検索(&F)\.\.\. menutrans &Find<Tab>/ 検索(&F)<Tab>/ menutrans Find\ and\ Rep&lace\.\.\. 置換(&L)\.\.\. @@ -150,7 +151,7 @@ menutrans &Spell\ Check\ On スペルチェック有効(&S) menutrans Spell\ Check\ &Off スペルチェック有効(&O) menutrans To\ &Next\ error<Tab>]s 次のエラー(&N)<Tab>]s menutrans To\ &Previous\ error<Tab>[s 前のエラー(&P)<Tab>[s -menutrans Suggest\ &Corrections<Tab>z? 修正候補(&C)<Tab>z? +menutrans Suggest\ &Corrections<Tab>z= 修正候補(&C)<Tab>z= menutrans &Repeat\ correction<Tab>:spellrepall 修正を繰り返す(&R)<Tab>:spellrepall menutrans Set\ language\ to\ "en" 言語を\ "en"\ に設定する menutrans Set\ language\ to\ "en_au" 言語を\ "en_au"\ に設定する diff --git a/runtime/lang/menu_ja_jp.utf-8.vim b/runtime/lang/menu_ja_jp.utf-8.vim index 2aafe8032..8c2f2a68e 100644 --- a/runtime/lang/menu_ja_jp.utf-8.vim +++ b/runtime/lang/menu_ja_jp.utf-8.vim @@ -2,7 +2,7 @@ " " Menu Translations: Japanese (UTF-8) " Translated By: MURAOKA Taro <koron@tka.att.ne.jp> -" Last Change: 04-Feb-2006. +" Last Change: 06-Feb-2006. " Quit when menu translations have already been done. if exists("did_menu_trans") @@ -30,6 +30,7 @@ let g:menutrans_help_dialog = "罎膣≪潟潟 menutrans &File <ゃ(&F) menutrans &Open\.\.\.<Tab>:e (&O)\.\.\.<Tab>:e menutrans Sp&lit-Open\.\.\.<Tab>:sp 蚊(&L)\.\.\.<Tab>:sp +menutrans Open\ Tab\.\.\.<Tab>:tabnew 帥若吾ч<Tab>:tabnew menutrans &New<Tab>:enew 域鋎(&N)<Tab>:enew menutrans &Close<Tab>:close (&C)<Tab>:close menutrans &Save<Tab>:w 篆絖(&S)<Tab>:w @@ -51,7 +52,7 @@ menutrans &Paste<Tab>"+gP 莢若篁(&P)<Tab>"+gP menutrans Put\ &Before<Tab>[p 莢若(&B)<Tab>[p menutrans Put\ &After<Tab>]p 緇莢若(&A)<Tab>]p menutrans &Delete<Tab>x 羔(&D)<Tab>x -menutrans &Select\ All<Tab>ggVG 御(&S)<Tab>ggvG +menutrans &Select\ All<Tab>ggVG 御(&S)<Tab>ggVG menutrans &Find\.\.\. 罎膣(&F)\.\.\. menutrans &Find<Tab>/ 罎膣(&F)<Tab>/ menutrans Find\ and\ Rep&lace\.\.\. 臀(&L)\.\.\. @@ -150,7 +151,7 @@ menutrans &Spell\ Check\ On 鴻с(&S) menutrans Spell\ Check\ &Off 鴻с(&O) menutrans To\ &Next\ error<Tab>]s 罨<(&N)<Tab>]s menutrans To\ &Previous\ error<Tab>[s (&P)<Tab>[s -menutrans Suggest\ &Corrections<Tab>z? 篆罩e茖(&C)<Tab>z? +menutrans Suggest\ &Corrections<Tab>z= 篆罩e茖(&C)<Tab>z= menutrans &Repeat\ correction<Tab>:spellrepall 篆罩c膵違菴(&R)<Tab>:spellrepall menutrans Set\ language\ to\ "en" 荐茯\ "en"\ 荐絎 menutrans Set\ language\ to\ "en_au" 荐茯\ "en_au"\ 荐絎 diff --git a/runtime/lang/menu_japanese_japan.932.vim b/runtime/lang/menu_japanese_japan.932.vim index 7041f29b6..90273abcf 100644 --- a/runtime/lang/menu_japanese_japan.932.vim +++ b/runtime/lang/menu_japanese_japan.932.vim @@ -2,7 +2,7 @@ " " Menu Translations: Japanese (CP932) " Translated By: MURAOKA Taro <koron@tka.att.ne.jp> -" Last Change: 04-Feb-2006. +" Last Change: 28-Mar-2006. " Quit when menu translations have already been done. if exists("did_menu_trans") @@ -30,6 +30,7 @@ let g:menutrans_help_dialog = "wvR}hP menutrans &File t@C(&F) menutrans &Open\.\.\.<Tab>:e J(&O)\.\.\.<Tab>:e menutrans Sp&lit-Open\.\.\.<Tab>:sp J(&L)\.\.\.<Tab>:sp +menutrans Open\ Tab\.\.\.<Tab>:tabnew ^uy[WJ<Tab>:tabnew menutrans &New<Tab>:enew VK(&N)<Tab>:enew menutrans &Close<Tab>:close (&C)<Tab>:close menutrans &Save<Tab>:w (&S)<Tab>:w @@ -51,7 +52,7 @@ menutrans &Paste<Tab>"+gP \t(&P)<Tab>"+gP menutrans Put\ &Before<Tab>[p O\(&B)<Tab>[p menutrans Put\ &After<Tab>]p \(&A)<Tab>]p menutrans &Delete<Tab>x (&D)<Tab>x -menutrans &Select\ All<Tab>ggVG SI(&S)<Tab>ggvG +menutrans &Select\ All<Tab>ggVG SI(&S)<Tab>ggVG menutrans &Find\.\.\. (&F)\.\.\. menutrans &Find<Tab>/ (&F)<Tab>/ menutrans Find\ and\ Rep&lace\.\.\. u(&L)\.\.\. @@ -150,7 +151,7 @@ menutrans &Spell\ Check\ On Xy`FbNL(&S) menutrans Spell\ Check\ &Off Xy`FbNL(&O) menutrans To\ &Next\ error<Tab>]s G[(&N)<Tab>]s menutrans To\ &Previous\ error<Tab>[s OG[(&P)<Tab>[s -menutrans Suggest\ &Corrections<Tab>z? C(&C)<Tab>z? +menutrans Suggest\ &Corrections<Tab>z= C(&C)<Tab>z= menutrans &Repeat\ correction<Tab>:spellrepall CJ(&R)<Tab>:spellrepall menutrans Set\ language\ to\ "en" \ "en"\ menutrans Set\ language\ to\ "en_au" \ "en_au"\ diff --git a/runtime/mswin.vim b/runtime/mswin.vim index ebc27f00e..fb29237e9 100644 --- a/runtime/mswin.vim +++ b/runtime/mswin.vim @@ -1,7 +1,7 @@ " Set options and add mapping such that Vim behaves a lot like MS-Windows " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last change: 2006 Mar 09 +" Last change: 2006 Mar 28 " bail out if this isn't wanted (mrsvim.vim uses this). if exists("g:skip_loading_mswin") && g:skip_loading_mswin @@ -82,16 +82,19 @@ endif noremap <C-A> gggH<C-O>G inoremap <C-A> <C-O>gg<C-O>gH<C-O>G cnoremap <C-A> <C-C>gggH<C-O>G +onoremap <C-A> <C-C>gggH<C-O>G " CTRL-Tab is Next window noremap <C-Tab> <C-W>w inoremap <C-Tab> <C-O><C-W>w cnoremap <C-Tab> <C-C><C-W>w +onoremap <C-Tab> <C-C><C-W>w " CTRL-F4 is Close window noremap <C-F4> <C-W>c inoremap <C-F4> <C-O><C-W>c cnoremap <C-F4> <C-C><C-W>c +onoremap <C-F4> <C-C><C-W>c " restore 'cpoptions' set cpo& diff --git a/runtime/scripts.vim b/runtime/scripts.vim index 9388481db..e709d9544 100644 --- a/runtime/scripts.vim +++ b/runtime/scripts.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types in scripts " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last change: 2006 Mar 25 +" Last change: 2006 Mar 28 " This file is called by an autocommand for every file that has just been " loaded into a buffer. It checks if the type of file can be recognized by @@ -185,11 +185,14 @@ else " - "# It was generated by makepatch " in the second line (makepatch diff). " - "Index: <filename>" in the first line (CVS file) " - "=== ", line of "=", "---", "+++ " (SVK diff) + " - "=== ", "--- ", "+++ " (bzr diff, common case) + " - "=== (removed|added|renamed|modified)" (bzr diff, alternative) elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\)' \ || (s:line1 =~ '^--- ' && s:line2 =~ '^+++ ') \ || (s:line1 =~ '^\* looking for ' && s:line2 =~ '^\* comparing to ') \ || (s:line1 =~ '^\*\*\* ' && s:line2 =~ '^--- ') - \ || (s:line1 =~ '^=== ' && s:line2 =~ '^=\{66\}' && s:line3 =~ '^--- ' && s:line4 =~ '^+++') + \ || (s:line1 =~ '^=== ' && ((s:line2 =~ '^=\{66\}' && s:line3 =~ '^--- ' && s:line4 =~ '^+++') || (s:line2 =~ '^--- ' && s:line3 =~ '^+++ '))) + \ || (s:line1 =~ '^=== \(removed\|added\|renamed\|modified\)') set ft=diff " PostScript Files (must have %!PS as the first line, like a2ps output) diff --git a/runtime/synmenu.vim b/runtime/synmenu.vim index 7386426e9..3e5165235 100644 --- a/runtime/synmenu.vim +++ b/runtime/synmenu.vim @@ -116,40 +116,41 @@ an 50.20.390 &Syntax.C.CVS.cvsrc :cal SetSyn("cvsrc")<CR> an 50.30.100 &Syntax.DE.D :cal SetSyn("d")<CR> an 50.30.110 &Syntax.DE.Debian.Debian\ ChangeLog :cal SetSyn("debchangelog")<CR> an 50.30.120 &Syntax.DE.Debian.Debian\ Control :cal SetSyn("debcontrol")<CR> -an 50.30.130 &Syntax.DE.Desktop :cal SetSyn("desktop")<CR> -an 50.30.140 &Syntax.DE.Dict\ config :cal SetSyn("dictconf")<CR> -an 50.30.150 &Syntax.DE.Dictd\ config :cal SetSyn("dictdconf")<CR> -an 50.30.160 &Syntax.DE.Diff :cal SetSyn("diff")<CR> -an 50.30.170 &Syntax.DE.Digital\ Command\ Lang :cal SetSyn("dcl")<CR> -an 50.30.180 &Syntax.DE.Dircolors :cal SetSyn("dircolors")<CR> -an 50.30.190 &Syntax.DE.Django\ template :cal SetSyn("django")<CR> -an 50.30.200 &Syntax.DE.DNS/BIND\ zone :cal SetSyn("bindzone")<CR> -an 50.30.210 &Syntax.DE.DocBook.auto-detect :cal SetSyn("docbk")<CR> -an 50.30.220 &Syntax.DE.DocBook.SGML :cal SetSyn("docbksgml")<CR> -an 50.30.230 &Syntax.DE.DocBook.XML :cal SetSyn("docbkxml")<CR> -an 50.30.240 &Syntax.DE.Dot :cal SetSyn("dot")<CR> -an 50.30.250 &Syntax.DE.Dracula :cal SetSyn("dracula")<CR> -an 50.30.260 &Syntax.DE.DSSSL :cal SetSyn("dsl")<CR> -an 50.30.270 &Syntax.DE.DTD :cal SetSyn("dtd")<CR> -an 50.30.280 &Syntax.DE.DTML\ (Zope) :cal SetSyn("dtml")<CR> -an 50.30.290 &Syntax.DE.Dylan.Dylan :cal SetSyn("dylan")<CR> -an 50.30.300 &Syntax.DE.Dylan.Dylan\ interface :cal SetSyn("dylanintr")<CR> -an 50.30.310 &Syntax.DE.Dylan.Dylan\ lid :cal SetSyn("dylanlid")<CR> -an 50.30.330 &Syntax.DE.EDIF :cal SetSyn("edif")<CR> -an 50.30.340 &Syntax.DE.Eiffel :cal SetSyn("eiffel")<CR> -an 50.30.350 &Syntax.DE.Elinks\ config :cal SetSyn("elinks")<CR> -an 50.30.360 &Syntax.DE.Elm\ filter\ rules :cal SetSyn("elmfilt")<CR> -an 50.30.370 &Syntax.DE.Embedix\ Component\ Description :cal SetSyn("ecd")<CR> -an 50.30.380 &Syntax.DE.ERicsson\ LANGuage :cal SetSyn("erlang")<CR> -an 50.30.390 &Syntax.DE.ESMTP\ rc :cal SetSyn("esmtprc")<CR> -an 50.30.400 &Syntax.DE.ESQL-C :cal SetSyn("esqlc")<CR> -an 50.30.410 &Syntax.DE.Essbase\ script :cal SetSyn("csc")<CR> -an 50.30.420 &Syntax.DE.Esterel :cal SetSyn("esterel")<CR> -an 50.30.430 &Syntax.DE.Eterm\ config :cal SetSyn("eterm")<CR> -an 50.30.440 &Syntax.DE.Eviews :cal SetSyn("eviews")<CR> -an 50.30.450 &Syntax.DE.Exim\ conf :cal SetSyn("exim")<CR> -an 50.30.460 &Syntax.DE.Expect :cal SetSyn("expect")<CR> -an 50.30.470 &Syntax.DE.Exports :cal SetSyn("exports")<CR> +an 50.30.130 &Syntax.DE.Debian.Debian\ Sources\.list :cal SetSyn("debsources")<CR> +an 50.30.140 &Syntax.DE.Desktop :cal SetSyn("desktop")<CR> +an 50.30.150 &Syntax.DE.Dict\ config :cal SetSyn("dictconf")<CR> +an 50.30.160 &Syntax.DE.Dictd\ config :cal SetSyn("dictdconf")<CR> +an 50.30.170 &Syntax.DE.Diff :cal SetSyn("diff")<CR> +an 50.30.180 &Syntax.DE.Digital\ Command\ Lang :cal SetSyn("dcl")<CR> +an 50.30.190 &Syntax.DE.Dircolors :cal SetSyn("dircolors")<CR> +an 50.30.200 &Syntax.DE.Django\ template :cal SetSyn("django")<CR> +an 50.30.210 &Syntax.DE.DNS/BIND\ zone :cal SetSyn("bindzone")<CR> +an 50.30.220 &Syntax.DE.DocBook.auto-detect :cal SetSyn("docbk")<CR> +an 50.30.230 &Syntax.DE.DocBook.SGML :cal SetSyn("docbksgml")<CR> +an 50.30.240 &Syntax.DE.DocBook.XML :cal SetSyn("docbkxml")<CR> +an 50.30.250 &Syntax.DE.Dot :cal SetSyn("dot")<CR> +an 50.30.260 &Syntax.DE.Dracula :cal SetSyn("dracula")<CR> +an 50.30.270 &Syntax.DE.DSSSL :cal SetSyn("dsl")<CR> +an 50.30.280 &Syntax.DE.DTD :cal SetSyn("dtd")<CR> +an 50.30.290 &Syntax.DE.DTML\ (Zope) :cal SetSyn("dtml")<CR> +an 50.30.300 &Syntax.DE.Dylan.Dylan :cal SetSyn("dylan")<CR> +an 50.30.310 &Syntax.DE.Dylan.Dylan\ interface :cal SetSyn("dylanintr")<CR> +an 50.30.320 &Syntax.DE.Dylan.Dylan\ lid :cal SetSyn("dylanlid")<CR> +an 50.30.340 &Syntax.DE.EDIF :cal SetSyn("edif")<CR> +an 50.30.350 &Syntax.DE.Eiffel :cal SetSyn("eiffel")<CR> +an 50.30.360 &Syntax.DE.Elinks\ config :cal SetSyn("elinks")<CR> +an 50.30.370 &Syntax.DE.Elm\ filter\ rules :cal SetSyn("elmfilt")<CR> +an 50.30.380 &Syntax.DE.Embedix\ Component\ Description :cal SetSyn("ecd")<CR> +an 50.30.390 &Syntax.DE.ERicsson\ LANGuage :cal SetSyn("erlang")<CR> +an 50.30.400 &Syntax.DE.ESMTP\ rc :cal SetSyn("esmtprc")<CR> +an 50.30.410 &Syntax.DE.ESQL-C :cal SetSyn("esqlc")<CR> +an 50.30.420 &Syntax.DE.Essbase\ script :cal SetSyn("csc")<CR> +an 50.30.430 &Syntax.DE.Esterel :cal SetSyn("esterel")<CR> +an 50.30.440 &Syntax.DE.Eterm\ config :cal SetSyn("eterm")<CR> +an 50.30.450 &Syntax.DE.Eviews :cal SetSyn("eviews")<CR> +an 50.30.460 &Syntax.DE.Exim\ conf :cal SetSyn("exim")<CR> +an 50.30.470 &Syntax.DE.Expect :cal SetSyn("expect")<CR> +an 50.30.480 &Syntax.DE.Exports :cal SetSyn("exports")<CR> an 50.40.100 &Syntax.FG.Fetchmail :cal SetSyn("fetchmail")<CR> an 50.40.110 &Syntax.FG.Focus\ Executable :cal SetSyn("focexec")<CR> an 50.40.120 &Syntax.FG.Focus\ Master :cal SetSyn("master")<CR> diff --git a/runtime/syntax/coretex.vim b/runtime/syntax/coretex.vim new file mode 100644 index 000000000..adb77bbc1 --- /dev/null +++ b/runtime/syntax/coretex.vim @@ -0,0 +1,377 @@ +" Vim syntax file +" Language: TeX (core definition) +" Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2006-03-26 + +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 coretexTodo TODO FIXME XXX NOTE + +syn match coretexComment display contains=coretexTodo + \ '\\\@<!\%(\\\\\)*\zs%.*$' + +syn match coretexDimension display contains=@NoSpell + \ '[+-]\=\s*\%(\d\+\%([.,]\d*\)\=\|[.,]\d\+\)\s*\%(true\)\=\s*\%(p[tc]\|in\|bp\|c[mc]\|m[mu]\|dd\|sp\|e[mx]\)\>' + +syn cluster coretexBox + \ contains=coretexBoxCommand,coretexBoxInternalQuantity, + \ coretexBoxParameterDimen,coretexBoxParameterInteger, + \ coretexBoxParameterToken + +syn cluster coretexCharacter + \ contains=coretexCharacterCommand,coretexCharacterInternalQuantity, + \ coretexCharacterParameterInteger + +syn cluster coretexDebugging + \ contains=coretexDebuggingCommand,coretexDebuggingParameterInteger, + \ coretexDebuggingParameterToken + +syn cluster coretexFileIO + \ contains=coretexFileIOCommand,coretexFileIOInternalQuantity, + \ coretexFileIOParameterToken + +syn cluster coretexFonts + \ contains=coretexFontsCommand,coretexFontsInternalQuantity + +syn cluster coretexGlue + \ contains=coretexGlueCommand,coretexGlueDerivedCommand + +syn cluster coretexHyphenation + \ contains=coretexHyphenationCommand,coretexHyphenationDerivedCommand, + \ coretexHyphenationInternalQuantity,coretexHyphenationParameterInteger + +syn cluster coretexInserts + \ contains=coretexInsertsCommand,coretexInsertsParameterDimen, + \ coretexInsertsParameterGlue,coretexInsertsParameterInteger + +syn cluster coretexJob + \ contains=coretexJobCommand,coretexJobInternalQuantity, + \ coretexJobParameterInteger + +syn cluster coretexKern + \ contains=coretexKernCommand,coretexKernInternalQuantity + +syn cluster coretexLogic + \ contains=coretexLogicCommand + +syn cluster coretexMacro + \ contains=coretexMacroCommand,coretexMacroDerivedCommand, + \ coretexMacroParameterInteger + +syn cluster coretexMarks + \ contains=coretexMarksCommand + +syn cluster coretexMath + \ contains=coretexMathCommand,coretexMathDerivedCommand, + \ coretexMathInternalQuantity,coretexMathParameterDimen, + \ coretexMathParameterGlue,coretexMathParameterInteger, + \ coretexMathParameterMuglue,coretexMathParameterToken + +syn cluster coretexPage + \ contains=coretexPageInternalQuantity,coretexPageParameterDimen, + \ coretexPageParameterGlue + +syn cluster coretexParagraph + \ contains=coretexParagraphCommand,coretexParagraphInternalQuantity, + \ coretexParagraphParameterDimen,coretexParagraphParameterGlue, + \ coretexParagraphParameterInteger,coretexParagraphParameterToken + +syn cluster coretexPenalties + \ contains=coretexPenaltiesCommand,coretexPenaltiesInternalQuantity, + \ coretexPenaltiesParameterInteger + +syn cluster coretexRegisters + \ contains=coretexRegistersCommand,coretexRegistersInternalQuantity + +syn cluster coretexTables + \ contains=coretexTablesCommand,coretexTablesParameterGlue, + \ coretexTablesParameterToken + +syn cluster coretexCommand + \ contains=coretexBoxCommand,coretexCharacterCommand, + \ coretexDebuggingCommand,coretexFileIOCommand, + \ coretexFontsCommand,coretexGlueCommand, + \ coretexHyphenationCommand,coretexInsertsCommand, + \ coretexJobCommand,coretexKernCommand,coretexLogicCommand, + \ coretexMacroCommand,coretexMarksCommand,coretexMathCommand, + \ coretexParagraphCommand,coretexPenaltiesCommand,coretexRegistersCommand, + \ coretexTablesCommand + +syn match coretexBoxCommand display contains=@NoSpell + \ '\\\%([hv]\=box\|[cx]\=leaders\|copy\|[hv]rule\|lastbox\|setbox\|un[hv]\%(box\|copy\)\|vtop\)\>' +syn match coretexCharacterCommand display contains=@NoSpell + \ '\\\%([] ]\|\%(^^M\|accent\|char\|\%(lower\|upper\)case\|number\|romannumeral\|string\)\>\)' +syn match coretexDebuggingCommand display contains=@NoSpell + \ '\\\%(\%(batch\|\%(non\|error\)stop\|scroll\)mode\|\%(err\)\=message\|meaning\|show\%(box\%(breadth\|depth\)\=\|lists\|the\)\)\>' +syn match coretexFileIOCommand display contains=@NoSpell + \ '\\\%(\%(close\|open\)\%(in\|out\)\|endinput\|immediate\|input\|read\|shipout\|special\|write\)\>' +syn match coretexFontsCommand display contains=@NoSpell + \ '\\\%(/\|fontname\)\>' +syn match coretexGlueCommand display contains=@NoSpell + \ '\\\%([hv]\|un\)skip\>' +syn match coretexHyphenationCommand display contains=@NoSpell + \ '\\\%(discretionary\|hyphenation\|patterns\|setlanguage\)\>' +syn match coretexInsertsCommand display contains=@NoSpell + \ '\\\%(insert\|split\%(bot\|first\)mark\|vsplit\)\>' +syn match coretexJobCommand display contains=@NoSpell + \ '\\\%(dump\|end\|jobname\)\>' +syn match coretexKernCommand display contains=@NoSpell + \ '\\\%(kern\|lower\|move\%(left\|right\)\|raise\|unkern\)\>' +syn match coretexLogicCommand 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 coretexMacroCommand display contains=@NoSpell + \ '\\\%(after\%(assignment\|group\)\|\%(begin\|end\)group\|\%(end\)\=csname\|e\=def\|expandafter\|futurelet\|global\|let\|long\|noexpand\|outer\|relax\|the\)\>' +syn match coretexMarksCommand display contains=@NoSpell + \ '\\\%(bot\|first\|top\)\=mark\>' +syn match coretexMathCommand 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 coretexParagraphCommand display contains=@NoSpell + \ '\\\%(ignorespaces\|indent\|no\%(boundary\|indent\)\|par\|vadjust\)\>' +syn match coretexPenaltiesCommand display contains=@NoSpell + \ '\\\%(un\)\=penalty\>' +syn match coretexRegistersCommand display contains=@NoSpell + \ '\\\%(advance\|\%(count\|dimen\|skip\|toks\)def\|divide\|multiply\)\>' +syn match coretexTablesCommand display contains=@NoSpell + \ '\\\%(cr\|crcr\|[hv]align\|noalign\|omit\|span\)\>' + +syn cluster coretexDerivedCommand + \ contains=coretexGlueDerivedCommand,coretexHyphenationDerivedCommand, + \ coretexMacroDerivedCommand,coretexMathDerivedCommand + +syn match coretexGlueDerivedCommand display contains=@NoSpell + \ '\\\%([hv]fil\%(l\|neg\)\=\|[hv]ss\)\>' +syn match coretexHyphenationDerivedCommand display contains=@NoSpell + \ '\\-' +syn match coretexMacroDerivedCommand display contains=@NoSpell + \ '\\[gx]def\>' +syn match coretexMathDerivedCommand display contains=@NoSpell + \ '\\\%(above\|atop\%(withdelims\)\=\|mathchardef\|over\|overwithdelims\)\>' + +syn cluster coretexInternalQuantity + \ contains=coretexBoxInternalQuantity,coretexCharacterInternalQuantity, + \ coretexFileIOInternalQuantity,coretexFontsInternalQuantity, + \ coretexHyphenationInternalQuantity,coretexJobInternalQuantity, + \ coretexKernInternalQuantity,coretexMathInternalQuantity, + \ coretexPageInternalQuantity,coretexParagraphInternalQuantity, + \ coretexPenaltiesInternalQuantity,coretexRegistersInternalQuantity + +syn match coretexBoxInternalQuantity display contains=@NoSpell + \ '\\\%(badness\|dp\|ht\|prevdepth\|wd\)\>' +syn match coretexCharacterInternalQuantity display contains=@NoSpell + \ '\\\%(catcode\|chardef\|\%([ul]c\|sf\)code\)\>' +syn match coretexFileIOInternalQuantity display contains=@NoSpell + \ '\\inputlineno\>' +syn match coretexFontsInternalQuantity display contains=@NoSpell + \ '\\\%(font\%(dimen\)\=\|nullfont\)\>' +syn match coretexHyphenationInternalQuantity display contains=@NoSpell + \ '\\hyphenchar\>' +syn match coretexJobInternalQuantity display contains=@NoSpell + \ '\\deadcycles\>' +syn match coretexKernInternalQuantity display contains=@NoSpell + \ '\\lastkern\>' +syn match coretexMathInternalQuantity display contains=@NoSpell + \ '\\\%(delcode\|mathcode\|muskip\|\%(\%(script\)\{1,2}\|text\)font\|skewchar\)\>' +syn match coretexPageInternalQuantity display contains=@NoSpell + \ '\\page\%(depth\|fil\{1,3}stretch\|goal\|shrink\|stretch\|total\)\>' +syn match coretexParagraphInternalQuantity display contains=@NoSpell + \ '\\\%(prevgraf\|spacefactor\)\>' +syn match coretexPenaltiesInternalQuantity display contains=@NoSpell + \ '\\lastpenalty\>' +syn match coretexRegistersInternalQuantity display contains=@NoSpell + \ '\\\%(count\|dimen\|skip\|toks\)\d\+\>' + +syn cluster coretexParameterDimen + \ contains=coretexBoxParameterDimen,coretexInsertsParameterDimen, + \ coretexMathParameterDimen,coretexPageParameterDimen, + \ coretexParagraphParameterDimen + +syn match coretexBoxParameterDimen display contains=@NoSpell + \ '\\\%(boxmaxdepth\|[hv]fuzz\|overfullrule\)\>' +syn match coretexInsertsParameterDimen display contains=@NoSpell + \ '\\splitmaxdepth\>' +syn match coretexMathParameterDimen display contains=@NoSpell + \ '\\\%(delimitershortfall\|display\%(indent\|width\)\|mathsurround\|nulldelimiterspace\|predisplaysize\|scriptspace\)\>' +syn match coretexPageParameterDimen display contains=@NoSpell + \ '\\\%([hv]offset\|maxdepth\|vsize\)\>' +syn match coretexParagraphParameterDimen display contains=@NoSpell + \ '\\\%(emergencystretch\|\%(hang\|par\)indent\|hsize\|lineskiplimit\)\>' + +syn cluster coretexParameterGlue + \ contains=coretexInsertsParameterGlue,coretexMathParameterGlue, + \ coretexPageParameterGlue,coretexParagraphParameterGlue, + \ coretexTablesParameterGlue + +syn match coretexInsertsParameterGlue display contains=@NoSpell + \ '\\splittopskip\>' +syn match coretexMathParameterGlue display contains=@NoSpell + \ '\\\%(above\|below\)display\%(short\)\=skip\>' +syn match coretexPageParameterGlue display contains=@NoSpell + \ '\\topskip\>' +syn match coretexParagraphParameterGlue display contains=@NoSpell + \ '\\\%(baseline\|left\|line\|par\%(fill\)\=\|right\|x\=space\)skip\>' +syn match coretexTablesParameterGlue display contains=@NoSpell + \ '\\tabskip\>' + +syn cluster coretexParameterInteger + \ contains=coretexBoxParameterInteger,coretexCharacterParameterInteger, + \ coretexDebuggingParameterInteger,coretexHyphenationParameterInteger, + \ coretexInsertsParameterInteger,coretexJobParameterInteger, + \ coretexMacroParameterInteger,coretexMathParameterInteger, + \ coretexParagraphParameterInteger,coretexPenaltiesParameterInteger, + +syn match coretexBoxParameterInteger display contains=@NoSpell + \ '\\[hv]badness\>' +syn match coretexCharacterParameterInteger display contains=@NoSpell + \ '\\\%(\%(endline\|escape\|newline\)char\)\>' +syn match coretexDebuggingParameterInteger display contains=@NoSpell + \ '\\\%(errorcontextlines\|pausing\|tracing\%(commands\|lostchars\|macros\|online\|output\|pages\|paragraphs\|restores|stats\)\)\>' +syn match coretexHyphenationParameterInteger display contains=@NoSpell + \ '\\\%(defaulthyphenchar\|language\|\%(left\|right\)hyphenmin\|uchyph\)\>' +syn match coretexInsertsParameterInteger display contains=@NoSpell + \ '\\\%(holdinginserts\)\>' +syn match coretexJobParameterInteger display contains=@NoSpell + \ '\\\%(day\|mag\|maxdeadcycles\|month\|time\|year\)\>' +syn match coretexMacroParameterInteger display contains=@NoSpell + \ '\\globaldefs\>' +syn match coretexMathParameterInteger display contains=@NoSpell + \ '\\\%(binoppenalty\|defaultskewchar\|delimiterfactor\|displaywidowpenalty\|fam\|\%(post\|pre\)displaypenalty\|relpenalty\)\>' +syn match coretexParagraphParameterInteger display contains=@NoSpell + \ '\\\%(\%(adj\|\%(double\|final\)hyphen\)demerits\|looseness\|\%(pre\)\=tolerance\)\>' +syn match coretexPenaltiesParameterInteger display contains=@NoSpell + \ '\\\%(broken\|club\|exhyphen\|floating\|hyphen\|interline\|line\|output\|widow\)penalty\>' + +syn cluster coretexParameterMuglue + \ contains=coretexMathParameterMuglue + +syn match coretexMathParameterMuglue display contains=@NoSpell + \ '\\\%(med\|thick\|thin\)muskip\>' + +syn cluster coretexParameterDimen + \ contains=coretexBoxParameterToken,coretexDebuggingParameterToken, + \ coretexFileIOParameterToken,coretexMathParameterToken, + \ coretexParagraphParameterToken,coretexTablesParameterToken + +syn match coretexBoxParameterToken display contains=@NoSpell + \ '\\every[hv]box\>' +syn match coretexDebuggingParameterToken display contains=@NoSpell + \ '\\errhelp\>' +syn match coretexFileIOParameterToken display contains=@NoSpell + \ '\\output\>' +syn match coretexMathParameterToken display contains=@NoSpell + \ '\\every\%(display\|math\)\>' +syn match coretexParagraphParameterToken display contains=@NoSpell + \ '\\everypar\>' +syn match coretexTablesParameterToken display contains=@NoSpell + \ '\\everycr\>' + + +hi def link coretexCharacter Character +hi def link coretexNumber Number + +hi def link coretexIdentifier Identifier + +hi def link coretexStatement Statement +hi def link coretexConditional Conditional + +hi def link coretexPreProc PreProc +hi def link coretexMacro Macro + +hi def link coretexType Type + +hi def link coretexDebug Debug + +hi def link coretexTodo Todo +hi def link coretexComment Comment +hi def link coretexDimension coretexNumber + +hi def link coretexCommand coretexStatement +hi def link coretexBoxCommand coretexCommand +hi def link coretexCharacterCommand coretexCharacter +hi def link coretexDebuggingCommand coretexDebug +hi def link coretexFileIOCommand coretexCommand +hi def link coretexFontsCommand coretexType +hi def link coretexGlueCommand coretexCommand +hi def link coretexHyphenationCommand coretexCommand +hi def link coretexInsertsCommand coretexCommand +hi def link coretexJobCommand coretexPreProc +hi def link coretexKernCommand coretexCommand +hi def link coretexLogicCommand coretexConditional +hi def link coretexMacroCommand coretexMacro +hi def link coretexMarksCommand coretexCommand +hi def link coretexMathCommand coretexCommand +hi def link coretexParagraphCommand coretexCommand +hi def link coretexPenaltiesCommand coretexCommand +hi def link coretexRegistersCommand coretexCommand +hi def link coretexTablesCommand coretexCommand + +hi def link coretexDerivedCommand coretexStatement +hi def link coretexGlueDerivedCommand coretexDerivedCommand +hi def link coretexHyphenationDerivedCommand coretexDerivedCommand +hi def link coretexMacroDerivedCommand coretexDerivedCommand +hi def link coretexMathDerivedCommand coretexDerivedCommand + +hi def link coretexInternalQuantity coretexIdentifier +hi def link coretexBoxInternalQuantity coretexInternalQuantity +hi def link coretexCharacterInternalQuantity coretexInternalQuantity +hi def link coretexFileIOInternalQuantity coretexInternalQuantity +hi def link coretexFontsInternalQuantity coretexInternalQuantity +hi def link coretexHyphenationInternalQuantity coretexInternalQuantity +hi def link coretexJobInternalQuantity coretexInternalQuantity +hi def link coretexKernInternalQuantity coretexInternalQuantity +hi def link coretexMathInternalQuantity coretexInternalQuantity +hi def link coretexPageInternalQuantity coretexInternalQuantity +hi def link coretexParagraphInternalQuantity coretexInternalQuantity +hi def link coretexPenaltiesInternalQuantity coretexInternalQuantity +hi def link coretexRegistersInternalQuantity coretexInternalQuantity + +hi def link coretexParameterDimen coretexNumber +hi def link coretexBoxParameterDimen coretexParameterDimen +hi def link coretexInsertsParameterDimen coretexParameterDimen +hi def link coretexMathParameterDimen coretexParameterDimen +hi def link coretexPageParameterDimen coretexParameterDimen +hi def link coretexParagraphParameterDimen coretexParameterDimen + +hi def link coretexParameterGlue coretexNumber +hi def link coretexInsertsParameterGlue coretexParameterGlue +hi def link coretexMathParameterGlue coretexParameterGlue +hi def link coretexPageParameterGlue coretexParameterGlue +hi def link coretexParagraphParameterGlue coretexParameterGlue +hi def link coretexTablesParameterGlue coretexParameterGlue + +hi def link coretexParameterInteger coretexNumber +hi def link coretexBoxParameterInteger coretexParameterInteger +hi def link coretexCharacterParameterInteger coretexParameterInteger +hi def link coretexDebuggingParameterInteger coretexParameterInteger +hi def link coretexHyphenationParameterInteger coretexParameterInteger +hi def link coretexInsertsParameterInteger coretexParameterInteger +hi def link coretexJobParameterInteger coretexParameterInteger +hi def link coretexMacroParameterInteger coretexParameterInteger +hi def link coretexMathParameterInteger coretexParameterInteger +hi def link coretexParagraphParameterInteger coretexParameterInteger +hi def link coretexPenaltiesParameterInteger coretexParameterInteger + +hi def link coretexParameterMuglue coretexNumber +hi def link coretexMathParameterMuglue coretexParameterMuglue + +hi def link coretexParameterToken coretexIdentifier +hi def link coretexBoxParameterToken coretexParameterToken +hi def link coretexDebuggingParameterToken coretexParameterToken +hi def link coretexFileIOParameterToken coretexParameterToken +hi def link coretexMathParameterToken coretexParameterToken +hi def link coretexParagraphParameterToken coretexParameterToken +hi def link coretexTablesParameterToken coretexParameterToken + +let b:current_syntax = "coretex" + +let &cpo = s:cpo_save +unlet s:cpo_save + diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim new file mode 100644 index 000000000..c952ed82c --- /dev/null +++ b/runtime/syntax/debsources.vim @@ -0,0 +1,40 @@ +" Vim syntax file +" Language: Debian sources.list +" Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl> +" Last Change: $Date$ +" URL: http://www.cacholong.nl/~matthijs/vim/syntax/debsources.vim +" $Revision$ + +" this is a very simple syntax file - I will be improving it +" add entire DEFINE syntax + +" Standard syntax initialization +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" case sensitive +syn case match + +" A bunch of useful keywords +syn match debsourcesKeyword /\(deb-src\|deb\|main\|contrib\|non-free\)/ + +" Match comments +syn match debsourcesComment /#.*/ + +" Match uri's +syn match debsourcesUri +\(http://\|ftp://\|file:///\)[^' <>"]\++ +syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(woody\|sarge\|etch\|old-stable\|stable\|testing\|unstable\|sid\|experimental\|warty\|hoary\|breezy\)\([[:alnum:]_./]*\)+ + +" Associate our matches and regions with pretty colours +hi def link debsourcesLine Error +hi def link debsourcesKeyword Statement +hi def link debsourcesDistrKeyword Type +hi def link debsourcesComment Comment +hi def link debsourcesUri Constant + +let b:current_syntax = "debsources" + +" vim: ts=8 diff --git a/runtime/syntax/plaintex.vim b/runtime/syntax/plaintex.vim new file mode 100644 index 000000000..a930712a7 --- /dev/null +++ b/runtime/syntax/plaintex.vim @@ -0,0 +1,166 @@ +" Vim syntax file +" Language: TeX (plain.tex format) +" Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2006-03-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/coretex.vim + +syn match plaintexComment display + \ contains=ALLBUT,coretexComment,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 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 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\)\>' + +syn region plaintexMath matchgroup=plaintexMath + \ contains=@plaintexMath + \ start='\$' skip='\\\\\|\\\$' end='\$' +syn region plaintexMath matchgroup=plaintexMath + \ contains=@plaintexMath keepend + \ start='\$\$' skip='\\\\\|\\\$' end='\$\$' + +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 coretexCommand +hi def link plaintexBoxCommand plaintexCommand +hi def link plaintexCharacterCommand coretexCharacterCommand +hi def link plaintexDebuggingCommand coretexDebuggingCommand +hi def link plaintexFontsCommand coretexFontsCommand +hi def link plaintexGlueCommand plaintexCommand +hi def link plaintexInsertsCommand plaintexCommand +hi def link plaintexJobCommand coretexJobCommand +hi def link plaintexKernCommand plaintexCommand +hi def link plaintexMacroCommand coretexMacroCommand +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 coretexParameterDimen +hi def link plaintexMathParameterDimen coretexMathParameterDimen +hi def link plaintexParagraphParameterGlue coretexParagraphParameterGlue +hi def link plaintexFontParameterInteger coretexFontParameterInteger +hi def link plaintexJobParameterInteger coretexJobParameterInteger +hi def link plaintexPageParameterInteger coretexPageParameterInteger +hi def link plaintexPageParameterToken coretexParameterToken + +let b:current_syntax = "plaintex" + +let &cpo = s:cpo_save +unlet s:cpo_save + |