From a98a6996c291b3e300d27b791eded9eed333d677 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 11 Jul 2014 04:05:51 +0000 Subject: [PATCH] re-integrate runtime/ vim-patch:0 #938 Vim runtime files based on 7.4.384 / hg changeset 7090d7f160f7 Excluding: Amiga icons (*.info, icons/) doc/hangulin.txt tutor/ spell/ lang/ (only used for menu translations) macros/maze/, macros/hanoi/, macros/life/, macros/urm/ These were used to test vi compatibility. termcap "Demonstration of a termcap file (for the Amiga and Archimedes)" Helped-by: Rich Wareham Helped-by: John Helped-by: Yann Helped-by: Christophe Badoit Helped-by: drasill Helped-by: Tae Sandoval Murgan Helped-by: Lowe Thiderman --- runtime/autoload/README.txt | 22 + runtime/autoload/ada.vim | 635 + runtime/autoload/adacomplete.vim | 109 + runtime/autoload/ccomplete.vim | 610 + runtime/autoload/clojurecomplete.vim | 22 + runtime/autoload/csscomplete.vim | 429 + runtime/autoload/decada.vim | 75 + runtime/autoload/getscript.vim | 667 + runtime/autoload/gnat.vim | 147 + runtime/autoload/gzip.vim | 212 + runtime/autoload/htmlcomplete.vim | 808 + runtime/autoload/javascriptcomplete.vim | 625 + runtime/autoload/netrw.vim | 10706 +++++++++++ runtime/autoload/netrwFileHandlers.vim | 362 + runtime/autoload/netrwSettings.vim | 244 + runtime/autoload/netrw_gitignore.vim | 71 + runtime/autoload/paste.vim | 35 + runtime/autoload/phpcomplete.vim | 2572 +++ runtime/autoload/python3complete.vim | 606 + runtime/autoload/pythoncomplete.vim | 625 + runtime/autoload/rubycomplete.vim | 805 + runtime/autoload/spellfile.vim | 209 + runtime/autoload/sqlcomplete.vim | 967 + runtime/autoload/syntaxcomplete.vim | 755 + runtime/autoload/tar.vim | 626 + runtime/autoload/tohtml.vim | 923 + runtime/autoload/vimball.vim | 775 + runtime/autoload/xml/html32.vim | 383 + runtime/autoload/xml/html401f.vim | 468 + runtime/autoload/xml/html401s.vim | 410 + runtime/autoload/xml/html401t.vim | 460 + runtime/autoload/xml/html40f.vim | 468 + runtime/autoload/xml/html40s.vim | 410 + runtime/autoload/xml/html40t.vim | 460 + runtime/autoload/xml/xhtml10f.vim | 469 + runtime/autoload/xml/xhtml10s.vim | 410 + runtime/autoload/xml/xhtml10t.vim | 460 + runtime/autoload/xml/xhtml11.vim | 434 + runtime/autoload/xml/xsd.vim | 130 + runtime/autoload/xml/xsl.vim | 38 + runtime/autoload/xmlcomplete.vim | 539 + runtime/autoload/zip.vim | 405 + runtime/bugreport.vim | 88 + runtime/colors/README.txt | 72 + runtime/colors/blue.vim | 55 + runtime/colors/darkblue.vim | 66 + runtime/colors/default.vim | 23 + runtime/colors/delek.vim | 55 + runtime/colors/desert.vim | 108 + runtime/colors/elflord.vim | 50 + runtime/colors/evening.vim | 56 + runtime/colors/industry.vim | 40 + runtime/colors/koehler.vim | 72 + runtime/colors/morning.vim | 56 + runtime/colors/murphy.vim | 41 + runtime/colors/pablo.vim | 26 + runtime/colors/peachpuff.vim | 60 + runtime/colors/ron.vim | 45 + runtime/colors/shine.vim | 60 + runtime/colors/slate.vim | 56 + runtime/colors/torte.vim | 50 + runtime/colors/zellner.vim | 54 + runtime/compiler/README.txt | 11 + runtime/compiler/ant.vim | 38 + runtime/compiler/bcc.vim | 19 + runtime/compiler/bdf.vim | 22 + runtime/compiler/checkstyle.vim | 19 + runtime/compiler/cs.vim | 26 + runtime/compiler/cucumber.vim | 29 + runtime/compiler/decada.vim | 58 + runtime/compiler/dot.vim | 15 + runtime/compiler/erlang.vim | 13 + runtime/compiler/eruby.vim | 39 + runtime/compiler/fortran_F.vim | 27 + runtime/compiler/fortran_cv.vim | 30 + runtime/compiler/fortran_elf90.vim | 33 + runtime/compiler/fortran_g77.vim | 48 + runtime/compiler/fortran_lf95.vim | 27 + runtime/compiler/fpc.vim | 17 + runtime/compiler/g95.vim | 28 + runtime/compiler/gcc.vim | 39 + runtime/compiler/gfortran.vim | 27 + runtime/compiler/gnat.vim | 76 + runtime/compiler/haml.vim | 28 + runtime/compiler/hp_acc.vim | 38 + runtime/compiler/icc.vim | 18 + runtime/compiler/ifort.vim | 27 + runtime/compiler/intel.vim | 26 + runtime/compiler/irix5_c.vim | 26 + runtime/compiler/irix5_cpp.vim | 26 + runtime/compiler/javac.vim | 17 + runtime/compiler/jikes.vim | 18 + runtime/compiler/mcs.vim | 30 + runtime/compiler/mips_c.vim | 26 + runtime/compiler/mipspro_c89.vim | 27 + runtime/compiler/mipspro_cpp.vim | 26 + runtime/compiler/modelsim_vcom.vim | 20 + runtime/compiler/msbuild.vim | 21 + runtime/compiler/msvc.vim | 13 + runtime/compiler/neato.vim | 15 + runtime/compiler/ocaml.vim | 44 + runtime/compiler/onsgmls.vim | 24 + runtime/compiler/pbx.vim | 20 + runtime/compiler/perl.vim | 47 + runtime/compiler/php.vim | 26 + runtime/compiler/pyunit.vim | 16 + runtime/compiler/rake.vim | 35 + runtime/compiler/rspec.vim | 33 + runtime/compiler/rst.vim | 25 + runtime/compiler/ruby.vim | 45 + runtime/compiler/rubyunit.vim | 33 + runtime/compiler/sass.vim | 30 + runtime/compiler/se.vim | 30 + runtime/compiler/splint.vim | 71 + runtime/compiler/tcl.vim | 17 + runtime/compiler/tex.vim | 67 + runtime/compiler/tidy.vim | 19 + runtime/compiler/xbuild.vim | 22 + runtime/compiler/xmllint.vim | 26 + runtime/compiler/xmlwf.vim | 23 + runtime/delmenu.vim | 25 + runtime/doc/Makefile | 490 + runtime/doc/arabic.txt | 322 + runtime/doc/autocmd.txt | 1386 ++ runtime/doc/change.txt | 1727 ++ runtime/doc/cmdline.txt | 1113 ++ runtime/doc/debug.txt | 175 + runtime/doc/debugger.txt | 140 + runtime/doc/develop.txt | 501 + runtime/doc/diff.txt | 423 + runtime/doc/digraph.txt | 1490 ++ runtime/doc/doctags.c | 83 + runtime/doc/editing.txt | 1665 ++ runtime/doc/eval.txt | 8878 +++++++++ runtime/doc/evim-fr.1 | 57 + runtime/doc/evim-fr.UTF-8.1 | 57 + runtime/doc/evim-it.1 | 54 + runtime/doc/evim-it.UTF-8.1 | 54 + runtime/doc/evim-ja.UTF-8.1 | 51 + runtime/doc/evim-pl.1 | 53 + runtime/doc/evim-pl.UTF-8.1 | 53 + runtime/doc/evim-ru.1 | 59 + runtime/doc/evim-ru.UTF-8.1 | 59 + runtime/doc/evim.1 | 49 + runtime/doc/farsi.txt | 269 + runtime/doc/filetype.txt | 623 + runtime/doc/fold.txt | 591 + runtime/doc/ft_ada.txt | 515 + runtime/doc/ft_sql.txt | 780 + runtime/doc/gui.txt | 1020 ++ runtime/doc/gui_w16.txt | 186 + runtime/doc/gui_w32.txt | 504 + runtime/doc/gui_x11.txt | 585 + runtime/doc/hebrew.txt | 142 + runtime/doc/help.txt | 221 + runtime/doc/helphelp.txt | 351 + runtime/doc/howto.txt | 96 + runtime/doc/if_cscop.txt | 499 + runtime/doc/if_lua.txt | 403 + runtime/doc/if_mzsch.txt | 286 + runtime/doc/if_ole.txt | 205 + runtime/doc/if_perl.txt | 294 + runtime/doc/if_pyth.txt | 763 + runtime/doc/if_ruby.txt | 216 + runtime/doc/if_sniff.txt | 95 + runtime/doc/if_tcl.txt | 533 + runtime/doc/indent.txt | 1124 ++ runtime/doc/index.txt | 1622 ++ runtime/doc/insert.txt | 1980 ++ runtime/doc/intro.txt | 886 + runtime/doc/makehtml.awk | 787 + runtime/doc/maketags.awk | 42 + runtime/doc/map.txt | 1487 ++ runtime/doc/mbyte.txt | 1437 ++ runtime/doc/message.txt | 848 + runtime/doc/mlang.txt | 210 + runtime/doc/motion.txt | 1327 ++ runtime/doc/netbeans.txt | 1001 + runtime/doc/options.txt | 8349 +++++++++ runtime/doc/os_390.txt | 135 + runtime/doc/os_amiga.txt | 147 + runtime/doc/os_beos.txt | 319 + runtime/doc/os_dos.txt | 296 + runtime/doc/os_mac.txt | 118 + runtime/doc/os_mint.txt | 39 + runtime/doc/os_msdos.txt | 276 + runtime/doc/os_os2.txt | 221 + runtime/doc/os_qnx.txt | 138 + runtime/doc/os_risc.txt | 12 + runtime/doc/os_unix.txt | 60 + runtime/doc/os_vms.txt | 955 + runtime/doc/os_win32.txt | 370 + runtime/doc/pattern.txt | 1369 ++ runtime/doc/pi_getscript.txt | 482 + runtime/doc/pi_gzip.txt | 41 + runtime/doc/pi_netrw.txt | 3522 ++++ runtime/doc/pi_paren.txt | 60 + runtime/doc/pi_spec.txt | 111 + runtime/doc/pi_tar.txt | 151 + runtime/doc/pi_vimball.txt | 273 + runtime/doc/pi_zip.txt | 126 + runtime/doc/print.txt | 755 + runtime/doc/quickfix.txt | 1467 ++ runtime/doc/quickref.txt | 1410 ++ runtime/doc/quotes.txt | 275 + runtime/doc/recover.txt | 237 + runtime/doc/remote.txt | 204 + runtime/doc/repeat.txt | 695 + runtime/doc/rileft.txt | 124 + runtime/doc/russian.txt | 74 + runtime/doc/scroll.txt | 332 + runtime/doc/sign.txt | 201 + runtime/doc/spell.txt | 1630 ++ runtime/doc/sponsor.txt | 216 + runtime/doc/starting.txt | 1539 ++ runtime/doc/syntax.txt | 5256 ++++++ runtime/doc/tabpage.txt | 392 + runtime/doc/tagsrch.txt | 837 + runtime/doc/term.txt | 879 + runtime/doc/tips.txt | 534 + runtime/doc/todo.txt | 5436 ++++++ runtime/doc/uganda.txt | 288 + runtime/doc/undo.txt | 406 + runtime/doc/usr_01.txt | 192 + runtime/doc/usr_02.txt | 564 + runtime/doc/usr_03.txt | 654 + runtime/doc/usr_04.txt | 514 + runtime/doc/usr_05.txt | 624 + runtime/doc/usr_06.txt | 280 + runtime/doc/usr_07.txt | 479 + runtime/doc/usr_08.txt | 601 + runtime/doc/usr_09.txt | 289 + runtime/doc/usr_10.txt | 824 + runtime/doc/usr_11.txt | 307 + runtime/doc/usr_12.txt | 358 + runtime/doc/usr_20.txt | 384 + runtime/doc/usr_21.txt | 499 + runtime/doc/usr_22.txt | 400 + runtime/doc/usr_23.txt | 343 + runtime/doc/usr_24.txt | 606 + runtime/doc/usr_25.txt | 578 + runtime/doc/usr_26.txt | 221 + runtime/doc/usr_27.txt | 563 + runtime/doc/usr_28.txt | 426 + runtime/doc/usr_29.txt | 613 + runtime/doc/usr_30.txt | 643 + runtime/doc/usr_31.txt | 272 + runtime/doc/usr_32.txt | 180 + runtime/doc/usr_40.txt | 657 + runtime/doc/usr_41.txt | 2475 +++ runtime/doc/usr_42.txt | 365 + runtime/doc/usr_43.txt | 173 + runtime/doc/usr_44.txt | 719 + runtime/doc/usr_45.txt | 419 + runtime/doc/usr_90.txt | 498 + runtime/doc/usr_toc.txt | 354 + runtime/doc/various.txt | 667 + runtime/doc/version4.txt | 355 + runtime/doc/version5.txt | 7813 ++++++++ runtime/doc/version6.txt | 14530 +++++++++++++++ runtime/doc/version7.txt | 18311 +++++++++++++++++++ runtime/doc/vi_diff.txt | 1012 + runtime/doc/vim-de.1 | 478 + runtime/doc/vim-de.UTF-8.1 | 478 + runtime/doc/vim-fr.1 | 589 + runtime/doc/vim-fr.UTF-8.1 | 589 + runtime/doc/vim-it.1 | 566 + runtime/doc/vim-it.UTF-8.1 | 566 + runtime/doc/vim-ja.UTF-8.1 | 501 + runtime/doc/vim-pl.1 | 558 + runtime/doc/vim-pl.UTF-8.1 | 558 + runtime/doc/vim-ru.1 | 489 + runtime/doc/vim-ru.UTF-8.1 | 489 + runtime/doc/vim.1 | 553 + runtime/doc/vim.man | 428 + runtime/doc/vim2html.pl | 228 + runtime/doc/vimdiff-fr.1 | 54 + runtime/doc/vimdiff-fr.UTF-8.1 | 54 + runtime/doc/vimdiff-it.1 | 48 + runtime/doc/vimdiff-it.UTF-8.1 | 48 + runtime/doc/vimdiff-ja.UTF-8.1 | 44 + runtime/doc/vimdiff-pl.1 | 46 + runtime/doc/vimdiff-pl.UTF-8.1 | 46 + runtime/doc/vimdiff-ru.1 | 50 + runtime/doc/vimdiff-ru.UTF-8.1 | 50 + runtime/doc/vimdiff.1 | 46 + runtime/doc/vimdiff.man | 46 + runtime/doc/vimtutor-fr.1 | 60 + runtime/doc/vimtutor-fr.UTF-8.1 | 60 + runtime/doc/vimtutor-it.1 | 58 + runtime/doc/vimtutor-it.UTF-8.1 | 58 + runtime/doc/vimtutor-ja.UTF-8.1 | 45 + runtime/doc/vimtutor-pl.1 | 51 + runtime/doc/vimtutor-pl.UTF-8.1 | 51 + runtime/doc/vimtutor-ru.1 | 51 + runtime/doc/vimtutor-ru.UTF-8.1 | 51 + runtime/doc/vimtutor.1 | 57 + runtime/doc/vimtutor.man | 50 + runtime/doc/visual.txt | 540 + runtime/doc/windows.txt | 1203 ++ runtime/doc/workshop.txt | 98 + runtime/doc/xxd-fr.1 | 396 + runtime/doc/xxd-fr.UTF-8.1 | 396 + runtime/doc/xxd-it.1 | 402 + runtime/doc/xxd-it.UTF-8.1 | 402 + runtime/doc/xxd-ja.UTF-8.1 | 366 + runtime/doc/xxd-pl.1 | 389 + runtime/doc/xxd-pl.UTF-8.1 | 389 + runtime/doc/xxd-ru.1 | 408 + runtime/doc/xxd-ru.UTF-8.1 | 408 + runtime/doc/xxd.1 | 370 + runtime/doc/xxd.man | 262 + runtime/evim.vim | 66 + runtime/filetype.vim | 2732 +++ runtime/ftoff.vim | 11 + runtime/ftplugin.vim | 35 + runtime/ftplugin/README.txt | 24 + runtime/ftplugin/a2ps.vim | 20 + runtime/ftplugin/aap.vim | 25 + runtime/ftplugin/abap.vim | 29 + runtime/ftplugin/abaqus.vim | 97 + runtime/ftplugin/ada.vim | 210 + runtime/ftplugin/alsaconf.vim | 19 + runtime/ftplugin/ant.vim | 44 + runtime/ftplugin/arch.vim | 19 + runtime/ftplugin/art.vim | 15 + runtime/ftplugin/aspvbs.vim | 60 + runtime/ftplugin/automake.vim | 16 + runtime/ftplugin/bdf.vim | 20 + runtime/ftplugin/bst.vim | 15 + runtime/ftplugin/btm.vim | 12 + runtime/ftplugin/c.vim | 64 + runtime/ftplugin/calendar.vim | 20 + runtime/ftplugin/cdrdaoconf.vim | 18 + runtime/ftplugin/ch.vim | 17 + runtime/ftplugin/changelog.vim | 299 + runtime/ftplugin/clojure.vim | 95 + runtime/ftplugin/cobol.vim | 267 + runtime/ftplugin/conf.vim | 19 + runtime/ftplugin/config.vim | 42 + runtime/ftplugin/context.vim | 35 + runtime/ftplugin/cpp.vim | 12 + runtime/ftplugin/crm.vim | 19 + runtime/ftplugin/cs.vim | 29 + runtime/ftplugin/csc.vim | 27 + runtime/ftplugin/csh.vim | 48 + runtime/ftplugin/css.vim | 23 + runtime/ftplugin/cucumber.vim | 154 + runtime/ftplugin/cvsrc.vim | 19 + runtime/ftplugin/debchangelog.vim | 383 + runtime/ftplugin/debcontrol.vim | 70 + runtime/ftplugin/denyhosts.vim | 18 + runtime/ftplugin/dictconf.vim | 19 + runtime/ftplugin/dictdconf.vim | 19 + runtime/ftplugin/diff.vim | 15 + runtime/ftplugin/dircolors.vim | 19 + runtime/ftplugin/docbk.vim | 24 + runtime/ftplugin/dosbatch.vim | 30 + runtime/ftplugin/dosini.vim | 19 + runtime/ftplugin/dtd.vim | 40 + runtime/ftplugin/dtrace.vim | 40 + runtime/ftplugin/elinks.vim | 19 + runtime/ftplugin/erlang.vim | 87 + runtime/ftplugin/eruby.vim | 102 + runtime/ftplugin/eterm.vim | 20 + runtime/ftplugin/falcon.vim | 48 + runtime/ftplugin/fetchmail.vim | 19 + runtime/ftplugin/flexwiki.vim | 59 + runtime/ftplugin/fortran.vim | 123 + runtime/ftplugin/framescript.vim | 30 + runtime/ftplugin/fvwm.vim | 14 + runtime/ftplugin/git.vim | 39 + runtime/ftplugin/gitcommit.vim | 67 + runtime/ftplugin/gitconfig.vim | 15 + runtime/ftplugin/gitrebase.vim | 43 + runtime/ftplugin/gitsendemail.vim | 6 + runtime/ftplugin/gpg.vim | 19 + runtime/ftplugin/gprof.vim | 32 + runtime/ftplugin/group.vim | 19 + runtime/ftplugin/grub.vim | 19 + runtime/ftplugin/haml.vim | 69 + runtime/ftplugin/hamster.vim | 62 + runtime/ftplugin/haskell.vim | 20 + runtime/ftplugin/help.vim | 22 + runtime/ftplugin/hostconf.vim | 18 + runtime/ftplugin/hostsaccess.vim | 19 + runtime/ftplugin/html.vim | 51 + runtime/ftplugin/htmldjango.vim | 13 + runtime/ftplugin/indent.vim | 20 + runtime/ftplugin/initex.vim | 39 + runtime/ftplugin/ishd.vim | 33 + runtime/ftplugin/j.vim | 75 + runtime/ftplugin/java.vim | 51 + runtime/ftplugin/javascript.vim | 38 + runtime/ftplugin/jproperties.vim | 15 + runtime/ftplugin/json.vim | 17 + runtime/ftplugin/jsp.vim | 67 + runtime/ftplugin/kconfig.vim | 18 + runtime/ftplugin/kwt.vim | 32 + runtime/ftplugin/ld.vim | 20 + runtime/ftplugin/lftp.vim | 19 + runtime/ftplugin/libao.vim | 19 + runtime/ftplugin/limits.vim | 19 + runtime/ftplugin/liquid.vim | 61 + runtime/ftplugin/lisp.vim | 26 + runtime/ftplugin/logcheck.vim | 17 + runtime/ftplugin/loginaccess.vim | 19 + runtime/ftplugin/logindefs.vim | 19 + runtime/ftplugin/logtalk.dict | 164 + runtime/ftplugin/logtalk.vim | 18 + runtime/ftplugin/lprolog.vim | 37 + runtime/ftplugin/lua.vim | 42 + runtime/ftplugin/m4.vim | 20 + runtime/ftplugin/mail.vim | 38 + runtime/ftplugin/mailaliases.vim | 18 + runtime/ftplugin/mailcap.vim | 19 + runtime/ftplugin/make.vim | 33 + runtime/ftplugin/man.vim | 189 + runtime/ftplugin/manconf.vim | 19 + runtime/ftplugin/markdown.vim | 22 + runtime/ftplugin/matlab.vim | 28 + runtime/ftplugin/mf.vim | 19 + runtime/ftplugin/modconf.vim | 20 + runtime/ftplugin/mp.vim | 28 + runtime/ftplugin/mplayerconf.vim | 20 + runtime/ftplugin/mrxvtrc.vim | 22 + runtime/ftplugin/msmessages.vim | 40 + runtime/ftplugin/muttrc.vim | 22 + runtime/ftplugin/nanorc.vim | 19 + runtime/ftplugin/netrc.vim | 19 + runtime/ftplugin/nsis.vim | 22 + runtime/ftplugin/objc.vim | 12 + runtime/ftplugin/ocaml.vim | 620 + runtime/ftplugin/occam.vim | 49 + runtime/ftplugin/pamconf.vim | 19 + runtime/ftplugin/pascal.vim | 20 + runtime/ftplugin/passwd.vim | 19 + runtime/ftplugin/pdf.vim | 89 + runtime/ftplugin/perl.vim | 88 + runtime/ftplugin/perl6.vim | 77 + runtime/ftplugin/php.vim | 83 + runtime/ftplugin/pinfo.vim | 19 + runtime/ftplugin/plaintex.vim | 37 + runtime/ftplugin/postscr.vim | 38 + runtime/ftplugin/procmail.vim | 21 + runtime/ftplugin/prolog.vim | 20 + runtime/ftplugin/protocols.vim | 19 + runtime/ftplugin/pyrex.vim | 27 + runtime/ftplugin/python.vim | 65 + runtime/ftplugin/qf.vim | 16 + runtime/ftplugin/quake.vim | 19 + runtime/ftplugin/r.vim | 31 + runtime/ftplugin/racc.vim | 20 + runtime/ftplugin/readline.vim | 19 + runtime/ftplugin/registry.vim | 36 + runtime/ftplugin/reva.vim | 25 + runtime/ftplugin/rhelp.vim | 29 + runtime/ftplugin/rmd.vim | 43 + runtime/ftplugin/rnc.vim | 19 + runtime/ftplugin/rnoweb.vim | 40 + runtime/ftplugin/rpl.vim | 22 + runtime/ftplugin/rrst.vim | 37 + runtime/ftplugin/rst.vim | 20 + runtime/ftplugin/ruby.vim | 395 + runtime/ftplugin/sass.vim | 22 + runtime/ftplugin/scheme.vim | 45 + runtime/ftplugin/screen.vim | 19 + runtime/ftplugin/scss.vim | 12 + runtime/ftplugin/sensors.vim | 19 + runtime/ftplugin/services.vim | 19 + runtime/ftplugin/setserial.vim | 19 + runtime/ftplugin/sgml.vim | 40 + runtime/ftplugin/sh.vim | 39 + runtime/ftplugin/sieve.vim | 20 + runtime/ftplugin/slpconf.vim | 20 + runtime/ftplugin/slpreg.vim | 20 + runtime/ftplugin/slpspi.vim | 20 + runtime/ftplugin/spec.vim | 180 + runtime/ftplugin/sql.vim | 524 + runtime/ftplugin/sshconfig.vim | 19 + runtime/ftplugin/sudoers.vim | 19 + runtime/ftplugin/svg.vim | 40 + runtime/ftplugin/sysctl.vim | 20 + runtime/ftplugin/systemverilog.vim | 11 + runtime/ftplugin/tcl.vim | 37 + runtime/ftplugin/tcsh.vim | 40 + runtime/ftplugin/terminfo.vim | 19 + runtime/ftplugin/tex.vim | 46 + runtime/ftplugin/text.vim | 17 + runtime/ftplugin/treetop.vim | 19 + runtime/ftplugin/tt2html.vim | 13 + runtime/ftplugin/udevconf.vim | 19 + runtime/ftplugin/udevperm.vim | 19 + runtime/ftplugin/udevrules.vim | 19 + runtime/ftplugin/updatedb.vim | 19 + runtime/ftplugin/vb.vim | 45 + runtime/ftplugin/verilog.vim | 57 + runtime/ftplugin/vhdl.vim | 88 + runtime/ftplugin/vim.vim | 74 + runtime/ftplugin/vroom.vim | 35 + runtime/ftplugin/xdefaults.vim | 20 + runtime/ftplugin/xf86conf.vim | 19 + runtime/ftplugin/xhtml.vim | 67 + runtime/ftplugin/xinetd.vim | 20 + runtime/ftplugin/xml.vim | 64 + runtime/ftplugin/xmodmap.vim | 19 + runtime/ftplugin/xs.vim | 14 + runtime/ftplugin/xsd.vim | 39 + runtime/ftplugin/xslt.vim | 16 + runtime/ftplugin/yaml.vim | 20 + runtime/ftplugin/zimbu.vim | 151 + runtime/ftplugin/zsh.vim | 26 + runtime/ftplugof.vim | 13 + runtime/gvimrc_example.vim | 59 + runtime/indent.vim | 31 + runtime/indent/README.txt | 45 + runtime/indent/aap.vim | 12 + runtime/indent/ada.vim | 308 + runtime/indent/ant.vim | 12 + runtime/indent/automake.vim | 11 + runtime/indent/awk.vim | 232 + runtime/indent/bib.vim | 15 + runtime/indent/bst.vim | 75 + runtime/indent/c.vim | 15 + runtime/indent/cdl.vim | 129 + runtime/indent/ch.vim | 18 + runtime/indent/chaiscript.vim | 50 + runtime/indent/changelog.vim | 14 + runtime/indent/clojure.vim | 318 + runtime/indent/cmake.vim | 90 + runtime/indent/cobol.vim | 216 + runtime/indent/config.vim | 82 + runtime/indent/cpp.vim | 15 + runtime/indent/cs.vim | 15 + runtime/indent/css.vim | 83 + runtime/indent/cucumber.vim | 74 + runtime/indent/cuda.vim | 15 + runtime/indent/d.vim | 22 + runtime/indent/dictconf.vim | 13 + runtime/indent/dictdconf.vim | 13 + runtime/indent/docbk.vim | 15 + runtime/indent/dtd.vim | 325 + runtime/indent/dtrace.vim | 17 + runtime/indent/dylan.vim | 90 + runtime/indent/eiffel.vim | 114 + runtime/indent/erlang.vim | 1390 ++ runtime/indent/eruby.vim | 82 + runtime/indent/eterm.vim | 36 + runtime/indent/falcon.vim | 451 + runtime/indent/fortran.vim | 205 + runtime/indent/framescript.vim | 41 + runtime/indent/gitconfig.vim | 37 + runtime/indent/gitolite.vim | 45 + runtime/indent/haml.vim | 73 + runtime/indent/hamster.vim | 55 + runtime/indent/html.vim | 1003 + runtime/indent/htmldjango.vim | 12 + runtime/indent/idlang.vim | 62 + runtime/indent/ishd.vim | 68 + runtime/indent/j.vim | 50 + runtime/indent/java.vim | 147 + runtime/indent/javascript.vim | 16 + runtime/indent/json.vim | 13 + runtime/indent/jsp.vim | 17 + runtime/indent/ld.vim | 84 + runtime/indent/lifelines.vim | 24 + runtime/indent/liquid.vim | 62 + runtime/indent/lisp.vim | 15 + runtime/indent/logtalk.vim | 61 + runtime/indent/lua.vim | 63 + runtime/indent/mail.vim | 13 + runtime/indent/make.vim | 116 + runtime/indent/matlab.vim | 74 + runtime/indent/mma.vim | 75 + runtime/indent/mp.vim | 211 + runtime/indent/objc.vim | 79 + runtime/indent/ocaml.vim | 273 + runtime/indent/occam.vim | 187 + runtime/indent/pascal.vim | 228 + runtime/indent/perl.vim | 183 + runtime/indent/perl6.vim | 132 + runtime/indent/php.vim | 799 + runtime/indent/postscr.vim | 68 + runtime/indent/pov.vim | 84 + runtime/indent/prolog.vim | 58 + runtime/indent/pyrex.vim | 13 + runtime/indent/python.vim | 198 + runtime/indent/r.vim | 492 + runtime/indent/readline.vim | 36 + runtime/indent/rhelp.vim | 111 + runtime/indent/rmd.vim | 46 + runtime/indent/rnoweb.vim | 35 + runtime/indent/rpl.vim | 63 + runtime/indent/rrst.vim | 46 + runtime/indent/rst.vim | 59 + runtime/indent/ruby.vim | 537 + runtime/indent/sass.vim | 40 + runtime/indent/scheme.vim | 11 + runtime/indent/scss.vim | 12 + runtime/indent/sdl.vim | 93 + runtime/indent/sh.vim | 169 + runtime/indent/sml.vim | 217 + runtime/indent/sql.vim | 39 + runtime/indent/sqlanywhere.vim | 393 + runtime/indent/systemverilog.vim | 230 + runtime/indent/tcl.vim | 75 + runtime/indent/tcsh.vim | 49 + runtime/indent/tex.vim | 295 + runtime/indent/tf.vim | 72 + runtime/indent/tilde.vim | 36 + runtime/indent/treetop.vim | 38 + runtime/indent/vb.vim | 78 + runtime/indent/verilog.vim | 223 + runtime/indent/vhdl.vim | 423 + runtime/indent/vim.vim | 99 + runtime/indent/vroom.vim | 21 + runtime/indent/xf86conf.vim | 37 + runtime/indent/xhtml.vim | 12 + runtime/indent/xinetd.vim | 55 + runtime/indent/xml.vim | 107 + runtime/indent/xsd.vim | 13 + runtime/indent/xslt.vim | 13 + runtime/indent/yacc.vim | 41 + runtime/indent/yaml.vim | 132 + runtime/indent/zimbu.vim | 128 + runtime/indent/zsh.vim | 11 + runtime/indoff.vim | 11 + runtime/keymap/README.txt | 26 + runtime/keymap/accents.vim | 78 + runtime/keymap/arabic.vim | 2 + runtime/keymap/arabic_utf-8.vim | 86 + runtime/keymap/belarusian-jcuken.vim | 87 + runtime/keymap/bulgarian-bds.vim | 155 + runtime/keymap/bulgarian-phonetic.vim | 135 + runtime/keymap/canfr-win.vim | 91 + runtime/keymap/croatian.vim | 16 + runtime/keymap/croatian_cp1250.vim | 65 + runtime/keymap/croatian_iso-8859-2.vim | 84 + runtime/keymap/croatian_utf-8.vim | 68 + runtime/keymap/czech.vim | 1 + runtime/keymap/czech_utf-8.vim | 86 + runtime/keymap/dvorak.vim | 82 + runtime/keymap/esperanto.vim | 1 + runtime/keymap/esperanto_utf-8.vim | 58 + runtime/keymap/greek.vim | 7 + runtime/keymap/greek_cp1253.vim | 119 + runtime/keymap/greek_cp737.vim | 104 + runtime/keymap/greek_iso-8859-7.vim | 118 + runtime/keymap/greek_utf-8.vim | 622 + runtime/keymap/hebrew.vim | 16 + runtime/keymap/hebrew_cp1255.vim | 62 + runtime/keymap/hebrew_iso-8859-8.vim | 41 + runtime/keymap/hebrew_utf-8.vim | 128 + runtime/keymap/hebrewp.vim | 16 + runtime/keymap/hebrewp_cp1255.vim | 58 + runtime/keymap/hebrewp_iso-8859-8.vim | 36 + runtime/keymap/hebrewp_utf-8.vim | 122 + runtime/keymap/kana.vim | 727 + runtime/keymap/lithuanian-baltic.vim | 31 + runtime/keymap/magyar_utf-8.vim | 37 + runtime/keymap/mongolian_utf-8.vim | 101 + runtime/keymap/persian-iranian_utf-8.vim | 113 + runtime/keymap/persian.vim | 8 + runtime/keymap/pinyin.vim | 54 + runtime/keymap/polish-slash.vim | 27 + runtime/keymap/polish-slash_cp1250.vim | 40 + runtime/keymap/polish-slash_cp852.vim | 40 + runtime/keymap/polish-slash_iso-8859-2.vim | 40 + runtime/keymap/polish-slash_utf-8.vim | 40 + runtime/keymap/russian-dvorak.vim | 89 + runtime/keymap/russian-jcuken.vim | 87 + runtime/keymap/russian-jcukenwin.vim | 87 + runtime/keymap/russian-yawerty.vim | 79 + runtime/keymap/serbian-latin.vim | 1 + runtime/keymap/serbian-latin_utf-8.vim | 44 + runtime/keymap/serbian.vim | 20 + runtime/keymap/serbian_cp1250.vim | 40 + runtime/keymap/serbian_cp1251.vim | 90 + runtime/keymap/serbian_iso-8859-2.vim | 40 + runtime/keymap/serbian_iso-8859-5.vim | 89 + runtime/keymap/serbian_utf-8.vim | 93 + runtime/keymap/sinhala-phonetic_utf-8.vim | 107 + runtime/keymap/sinhala.vim | 3 + runtime/keymap/slovak.vim | 16 + runtime/keymap/slovak_cp1250.vim | 100 + runtime/keymap/slovak_iso-8859-2.vim | 100 + runtime/keymap/slovak_utf-8.vim | 100 + runtime/keymap/tamil_tscii.vim | 572 + runtime/keymap/thaana-phonetic_utf-8.vim | 86 + runtime/keymap/thaana.vim | 3 + runtime/keymap/ukrainian-dvorak.vim | 92 + runtime/keymap/ukrainian-jcuken.vim | 92 + runtime/keymap/vietnamese-viqr_utf-8.vim | 160 + runtime/macmap.vim | 75 + runtime/macros/dvorak | 164 + runtime/macros/editexisting.vim | 119 + runtime/macros/justify.vim | 316 + runtime/macros/less.bat | 10 + runtime/macros/less.sh | 26 + runtime/macros/less.vim | 270 + runtime/macros/matchit.txt | 406 + runtime/macros/matchit.vim | 813 + runtime/macros/shellmenu.vim | 94 + runtime/macros/swapmous.vim | 22 + runtime/makemenu.vim | 633 + runtime/menu.vim | 1114 ++ runtime/mswin.vim | 107 + runtime/optwin.vim | 1355 ++ runtime/plugin/README.txt | 19 + runtime/plugin/getscriptPlugin.vim | 41 + runtime/plugin/gzip.vim | 44 + runtime/plugin/matchparen.vim | 182 + runtime/plugin/netrwPlugin.vim | 207 + runtime/plugin/rrhelper.vim | 48 + runtime/plugin/spellfile.vim | 15 + runtime/plugin/tarPlugin.vim | 53 + runtime/plugin/tohtml.vim | 179 + runtime/plugin/vimballPlugin.vim | 40 + runtime/plugin/zipPlugin.vim | 56 + runtime/print/ascii.ps | 22 + runtime/print/cidfont.ps | 26 + runtime/print/cns_roman.ps | 23 + runtime/print/cp1250.ps | 40 + runtime/print/cp1251.ps | 40 + runtime/print/cp1252.ps | 40 + runtime/print/cp1253.ps | 40 + runtime/print/cp1254.ps | 40 + runtime/print/cp1255.ps | 40 + runtime/print/cp1257.ps | 40 + runtime/print/dec-mcs.ps | 40 + runtime/print/ebcdic-uk.ps | 40 + runtime/print/gb_roman.ps | 23 + runtime/print/hp-roman8.ps | 40 + runtime/print/iso-8859-10.ps | 40 + runtime/print/iso-8859-11.ps | 40 + runtime/print/iso-8859-13.ps | 40 + runtime/print/iso-8859-14.ps | 40 + runtime/print/iso-8859-15.ps | 40 + runtime/print/iso-8859-2.ps | 40 + runtime/print/iso-8859-3.ps | 40 + runtime/print/iso-8859-4.ps | 40 + runtime/print/iso-8859-5.ps | 40 + runtime/print/iso-8859-7.ps | 40 + runtime/print/iso-8859-8.ps | 40 + runtime/print/iso-8859-9.ps | 40 + runtime/print/jis_roman.ps | 23 + runtime/print/koi8-r.ps | 40 + runtime/print/koi8-u.ps | 40 + runtime/print/ks_roman.ps | 23 + runtime/print/latin1.ps | 40 + runtime/print/mac-roman.ps | 40 + runtime/print/prolog.ps | 44 + runtime/rgb.txt | 753 + runtime/scripts.vim | 377 + runtime/synmenu.vim | 619 + runtime/syntax/2html.vim | 1804 ++ runtime/syntax/README.txt | 38 + runtime/syntax/a2ps.vim | 71 + runtime/syntax/a65.vim | 166 + runtime/syntax/aap.vim | 158 + runtime/syntax/abap.vim | 214 + runtime/syntax/abaqus.vim | 48 + runtime/syntax/abc.vim | 64 + runtime/syntax/abel.vim | 174 + runtime/syntax/acedb.vim | 123 + runtime/syntax/ada.vim | 368 + runtime/syntax/aflex.vim | 100 + runtime/syntax/ahdl.vim | 94 + runtime/syntax/alsaconf.vim | 49 + runtime/syntax/amiga.vim | 101 + runtime/syntax/aml.vim | 157 + runtime/syntax/ampl.vim | 150 + runtime/syntax/ant.vim | 97 + runtime/syntax/antlr.vim | 70 + runtime/syntax/apache.vim | 214 + runtime/syntax/apachestyle.vim | 65 + runtime/syntax/aptconf.vim | 512 + runtime/syntax/arch.vim | 41 + runtime/syntax/arduino.vim | 61 + runtime/syntax/art.vim | 50 + runtime/syntax/asciidoc.vim | 183 + runtime/syntax/asm.vim | 143 + runtime/syntax/asm68k.vim | 391 + runtime/syntax/asmh8300.vim | 85 + runtime/syntax/asn.vim | 86 + runtime/syntax/aspperl.vim | 33 + runtime/syntax/aspvbs.vim | 198 + runtime/syntax/asterisk.vim | 96 + runtime/syntax/asteriskvm.vim | 62 + runtime/syntax/atlas.vim | 98 + runtime/syntax/autohotkey.vim | 292 + runtime/syntax/autoit.vim | 1124 ++ runtime/syntax/automake.vim | 93 + runtime/syntax/ave.vim | 92 + runtime/syntax/awk.vim | 222 + runtime/syntax/ayacc.vim | 91 + runtime/syntax/b.vim | 127 + runtime/syntax/baan.vim | 1934 ++ runtime/syntax/basic.vim | 179 + runtime/syntax/bc.vim | 79 + runtime/syntax/bdf.vim | 97 + runtime/syntax/bib.vim | 101 + runtime/syntax/bindzone.vim | 110 + runtime/syntax/blank.vim | 52 + runtime/syntax/bst.vim | 89 + runtime/syntax/btm.vim | 229 + runtime/syntax/bzr.vim | 63 + runtime/syntax/c.vim | 469 + runtime/syntax/cabal.vim | 132 + runtime/syntax/calendar.vim | 110 + runtime/syntax/catalog.vim | 30 + runtime/syntax/cdl.vim | Bin 0 -> 3345 bytes runtime/syntax/cdrdaoconf.vim | 139 + runtime/syntax/cdrtoc.vim | 537 + runtime/syntax/cf.vim | 440 + runtime/syntax/cfg.vim | 60 + runtime/syntax/ch.vim | 53 + runtime/syntax/chaiscript.vim | 94 + runtime/syntax/change.vim | 42 + runtime/syntax/changelog.vim | 78 + runtime/syntax/chaskell.vim | 18 + runtime/syntax/cheetah.vim | 60 + runtime/syntax/chill.vim | 191 + runtime/syntax/chordpro.vim | 67 + runtime/syntax/cl.vim | 115 + runtime/syntax/clean.vim | 103 + runtime/syntax/clipper.vim | 148 + runtime/syntax/clojure.vim | 188 + runtime/syntax/cmake.vim | 87 + runtime/syntax/cmusrc.vim | 309 + runtime/syntax/cobol.vim | 209 + runtime/syntax/coco.vim | 33 + runtime/syntax/colortest.vim | 81 + runtime/syntax/conaryrecipe.vim | 137 + runtime/syntax/conf.vim | 26 + runtime/syntax/config.vim | 57 + runtime/syntax/context.vim | 108 + runtime/syntax/cpp.vim | 73 + runtime/syntax/crm.vim | 41 + runtime/syntax/crontab.vim | 78 + runtime/syntax/cs.vim | 154 + runtime/syntax/csc.vim | 204 + runtime/syntax/csdl.vim | 536 + runtime/syntax/csh.vim | 160 + runtime/syntax/csp.vim | 195 + runtime/syntax/css.vim | 651 + runtime/syntax/cterm.vim | 190 + runtime/syntax/ctrlh.vim | 23 + runtime/syntax/cucumber.vim | 142 + runtime/syntax/cuda.vim | 72 + runtime/syntax/cupl.vim | 137 + runtime/syntax/cuplsim.vim | 80 + runtime/syntax/cvs.vim | 43 + runtime/syntax/cvsrc.vim | 39 + runtime/syntax/cweb.vim | 85 + runtime/syntax/cynlib.vim | 91 + runtime/syntax/cynpp.vim | 68 + runtime/syntax/d.vim | 565 + runtime/syntax/datascript.vim | 97 + runtime/syntax/dcd.vim | 64 + runtime/syntax/dcl.vim | 164 + runtime/syntax/debchangelog.vim | 59 + runtime/syntax/debcontrol.vim | 126 + runtime/syntax/debsources.vim | 35 + runtime/syntax/def.vim | 57 + runtime/syntax/denyhosts.vim | 289 + runtime/syntax/desc.vim | 102 + runtime/syntax/desktop.vim | 119 + runtime/syntax/dictconf.vim | 80 + runtime/syntax/dictdconf.vim | 146 + runtime/syntax/diff.vim | 369 + runtime/syntax/dircolors.vim | 216 + runtime/syntax/dirpager.vim | 56 + runtime/syntax/diva.vim | 110 + runtime/syntax/django.vim | 96 + runtime/syntax/dns.vim | 5 + runtime/syntax/dnsmasq.vim | 239 + runtime/syntax/docbk.vim | 200 + runtime/syntax/docbksgml.vim | 7 + runtime/syntax/docbkxml.vim | 7 + runtime/syntax/dosbatch.vim | 160 + runtime/syntax/dosini.vim | 51 + runtime/syntax/dot.vim | 110 + runtime/syntax/doxygen.vim | 594 + runtime/syntax/dracula.vim | 85 + runtime/syntax/dsl.vim | 38 + runtime/syntax/dtd.vim | 170 + runtime/syntax/dtml.vim | 225 + runtime/syntax/dtrace.vim | 150 + runtime/syntax/dts.vim | 30 + runtime/syntax/dylan.vim | 109 + runtime/syntax/dylanintr.vim | 52 + runtime/syntax/dylanlid.vim | 42 + runtime/syntax/ecd.vim | 56 + runtime/syntax/edif.vim | 64 + runtime/syntax/eiffel.vim | 212 + runtime/syntax/elf.vim | 95 + runtime/syntax/elinks.vim | 188 + runtime/syntax/elmfilt.vim | 70 + runtime/syntax/erlang.vim | 265 + runtime/syntax/eruby.vim | 74 + runtime/syntax/esmtprc.vim | 34 + runtime/syntax/esqlc.vim | 75 + runtime/syntax/esterel.vim | 90 + runtime/syntax/eterm.vim | 429 + runtime/syntax/euphoria3.vim | 135 + runtime/syntax/euphoria4.vim | 247 + runtime/syntax/eviews.vim | 104 + runtime/syntax/exim.vim | 117 + runtime/syntax/expect.vim | 116 + runtime/syntax/exports.vim | 70 + runtime/syntax/falcon.vim | 199 + runtime/syntax/fan.vim | 132 + runtime/syntax/fasm.vim | 152 + runtime/syntax/fdcc.vim | 114 + runtime/syntax/fetchmail.vim | 75 + runtime/syntax/fgl.vim | 147 + runtime/syntax/flexwiki.vim | 135 + runtime/syntax/focexec.vim | 101 + runtime/syntax/form.vim | 158 + runtime/syntax/forth.vim | 347 + runtime/syntax/fortran.vim | 475 + runtime/syntax/foxpro.vim | 727 + runtime/syntax/framescript.vim | 491 + runtime/syntax/freebasic.vim | 252 + runtime/syntax/fstab.vim | 297 + runtime/syntax/fvwm.vim | 642 + runtime/syntax/fvwm2m4.vim | 43 + runtime/syntax/gdb.vim | 116 + runtime/syntax/gdmo.vim | 96 + runtime/syntax/gedcom.vim | 66 + runtime/syntax/git.vim | 78 + runtime/syntax/gitcommit.vim | 83 + runtime/syntax/gitconfig.vim | 38 + runtime/syntax/gitolite.vim | 86 + runtime/syntax/gitrebase.vim | 38 + runtime/syntax/gitsendemail.vim | 19 + runtime/syntax/gkrellmrc.vim | 91 + runtime/syntax/gnash.vim | 99 + runtime/syntax/gnuplot.vim | 198 + runtime/syntax/gp.vim | 93 + runtime/syntax/gpg.vim | 105 + runtime/syntax/gprof.vim | 69 + runtime/syntax/grads.vim | 86 + runtime/syntax/gretl.vim | 102 + runtime/syntax/groff.vim | 10 + runtime/syntax/groovy.vim | 466 + runtime/syntax/group.vim | 52 + runtime/syntax/grub.vim | 93 + runtime/syntax/gsp.vim | 65 + runtime/syntax/gtkrc.vim | 142 + runtime/syntax/haml.vim | 109 + runtime/syntax/hamster.vim | 382 + runtime/syntax/haskell.vim | 194 + runtime/syntax/haste.vim | 145 + runtime/syntax/hastepreproc.vim | 49 + runtime/syntax/hb.vim | 102 + runtime/syntax/help.vim | 211 + runtime/syntax/hercules.vim | 133 + runtime/syntax/hex.vim | 57 + runtime/syntax/hgcommit.vim | 27 + runtime/syntax/hitest.vim | 149 + runtime/syntax/hog.vim | 350 + runtime/syntax/hostconf.vim | 147 + runtime/syntax/hostsaccess.vim | 27 + runtime/syntax/html.vim | 299 + runtime/syntax/htmlcheetah.vim | 32 + runtime/syntax/htmldjango.vim | 34 + runtime/syntax/htmlm4.vim | 41 + runtime/syntax/htmlos.vim | 166 + runtime/syntax/ia64.vim | 311 + runtime/syntax/ibasic.vim | 176 + runtime/syntax/icemenu.vim | 36 + runtime/syntax/icon.vim | 212 + runtime/syntax/idl.vim | 326 + runtime/syntax/idlang.vim | 253 + runtime/syntax/indent.vim | 152 + runtime/syntax/inform.vim | 408 + runtime/syntax/initex.vim | 376 + runtime/syntax/initng.vim | 91 + runtime/syntax/inittab.vim | 75 + runtime/syntax/ipfilter.vim | 57 + runtime/syntax/ishd.vim | 422 + runtime/syntax/iss.vim | 149 + runtime/syntax/ist.vim | 75 + runtime/syntax/j.vim | 140 + runtime/syntax/jal.vim | 249 + runtime/syntax/jam.vim | 257 + runtime/syntax/jargon.vim | 36 + runtime/syntax/java.vim | 352 + runtime/syntax/javacc.vim | 82 + runtime/syntax/javascript.vim | 143 + runtime/syntax/jess.vim | 161 + runtime/syntax/jgraph.vim | 58 + runtime/syntax/jovial.vim | 110 + runtime/syntax/jproperties.vim | 148 + runtime/syntax/json.vim | 16 + runtime/syntax/jsp.vim | 85 + runtime/syntax/kconfig.vim | 736 + runtime/syntax/kivy.vim | 36 + runtime/syntax/kix.vim | 182 + runtime/syntax/kscript.vim | 70 + runtime/syntax/kwt.vim | 87 + runtime/syntax/lace.vim | 135 + runtime/syntax/latte.vim | 98 + runtime/syntax/ld.vim | 81 + runtime/syntax/ldapconf.vim | 338 + runtime/syntax/ldif.vim | 43 + runtime/syntax/lex.vim | 144 + runtime/syntax/lftp.vim | 152 + runtime/syntax/lhaskell.vim | 145 + runtime/syntax/libao.vim | 27 + runtime/syntax/lifelines.vim | 167 + runtime/syntax/lilo.vim | 192 + runtime/syntax/limits.vim | 44 + runtime/syntax/liquid.vim | 138 + runtime/syntax/lisp.vim | 625 + runtime/syntax/lite.vim | 181 + runtime/syntax/litestep.vim | 269 + runtime/syntax/loginaccess.vim | 96 + runtime/syntax/logindefs.vim | 174 + runtime/syntax/logtalk.vim | 450 + runtime/syntax/lotos.vim | 82 + runtime/syntax/lout.vim | 153 + runtime/syntax/lpc.vim | 460 + runtime/syntax/lprolog.vim | 137 + runtime/syntax/lscript.vim | 213 + runtime/syntax/lsl.vim | 277 + runtime/syntax/lss.vim | 133 + runtime/syntax/lua.vim | 367 + runtime/syntax/lynx.vim | 140 + runtime/syntax/m4.vim | 73 + runtime/syntax/mail.vim | 112 + runtime/syntax/mailaliases.vim | 71 + runtime/syntax/mailcap.vim | 35 + runtime/syntax/make.vim | 143 + runtime/syntax/mallard.vim | 37 + runtime/syntax/man.vim | 67 + runtime/syntax/manconf.vim | 117 + runtime/syntax/manual.vim | 28 + runtime/syntax/maple.vim | 633 + runtime/syntax/markdown.vim | 134 + runtime/syntax/masm.vim | 375 + runtime/syntax/mason.vim | 99 + runtime/syntax/master.vim | 50 + runtime/syntax/matlab.vim | 125 + runtime/syntax/maxima.vim | 274 + runtime/syntax/mel.vim | 121 + runtime/syntax/messages.vim | 72 + runtime/syntax/mf.vim | 197 + runtime/syntax/mgl.vim | 128 + runtime/syntax/mgp.vim | 83 + runtime/syntax/mib.vim | 57 + runtime/syntax/mix.vim | 83 + runtime/syntax/mma.vim | 331 + runtime/syntax/mmix.vim | 163 + runtime/syntax/mmp.vim | 53 + runtime/syntax/modconf.vim | 44 + runtime/syntax/model.vim | 44 + runtime/syntax/modsim3.vim | 109 + runtime/syntax/modula2.vim | 86 + runtime/syntax/modula3.vim | 72 + runtime/syntax/monk.vim | 234 + runtime/syntax/moo.vim | 173 + runtime/syntax/mp.vim | 132 + runtime/syntax/mplayerconf.vim | 83 + runtime/syntax/mrxvtrc.vim | 282 + runtime/syntax/msidl.vim | 97 + runtime/syntax/msmessages.vim | 135 + runtime/syntax/msql.vim | 100 + runtime/syntax/mupad.vim | 295 + runtime/syntax/mush.vim | 227 + runtime/syntax/muttrc.vim | 796 + runtime/syntax/mysql.vim | 297 + runtime/syntax/named.vim | 248 + runtime/syntax/nanorc.vim | 243 + runtime/syntax/nasm.vim | 527 + runtime/syntax/nastran.vim | 193 + runtime/syntax/natural.vim | 215 + runtime/syntax/ncf.vim | 258 + runtime/syntax/netrc.vim | 52 + runtime/syntax/netrw.vim | 118 + runtime/syntax/ninja.vim | 83 + runtime/syntax/nosyntax.vim | 30 + runtime/syntax/nqc.vim | 378 + runtime/syntax/nroff.vim | 264 + runtime/syntax/nsis.vim | 271 + runtime/syntax/obj.vim | 96 + runtime/syntax/objc.vim | 437 + runtime/syntax/objcpp.vim | 28 + runtime/syntax/ocaml.vim | 331 + runtime/syntax/occam.vim | 126 + runtime/syntax/omnimark.vim | 123 + runtime/syntax/openroad.vim | 266 + runtime/syntax/opl.vim | 102 + runtime/syntax/ora.vim | 478 + runtime/syntax/pamconf.vim | 120 + runtime/syntax/papp.vim | 93 + runtime/syntax/pascal.vim | 373 + runtime/syntax/passwd.vim | 71 + runtime/syntax/pcap.vim | 65 + runtime/syntax/pccts.vim | 106 + runtime/syntax/pdf.vim | 73 + runtime/syntax/perl.vim | 589 + runtime/syntax/perl6.vim | 2255 +++ runtime/syntax/pf.vim | 76 + runtime/syntax/pfmain.vim | 1644 ++ runtime/syntax/php.vim | 711 + runtime/syntax/phtml.vim | 6 + runtime/syntax/pic.vim | 127 + runtime/syntax/pike.vim | 155 + runtime/syntax/pilrc.vim | 148 + runtime/syntax/pine.vim | 372 + runtime/syntax/pinfo.vim | 110 + runtime/syntax/plaintex.vim | 170 + runtime/syntax/pli.vim | 278 + runtime/syntax/plm.vim | 147 + runtime/syntax/plp.vim | 45 + runtime/syntax/plsql.vim | 277 + runtime/syntax/po.vim | 140 + runtime/syntax/pod.vim | 189 + runtime/syntax/postscr.vim | 797 + runtime/syntax/pov.vim | 150 + runtime/syntax/povini.vim | 62 + runtime/syntax/ppd.vim | 48 + runtime/syntax/ppwiz.vim | 97 + runtime/syntax/prescribe.vim | 69 + runtime/syntax/privoxy.vim | 71 + runtime/syntax/procmail.vim | 67 + runtime/syntax/progress.vim | 329 + runtime/syntax/prolog.vim | 123 + runtime/syntax/promela.vim | 56 + runtime/syntax/proto.vim | 74 + runtime/syntax/protocols.vim | 44 + runtime/syntax/psf.vim | 103 + runtime/syntax/ptcap.vim | 107 + runtime/syntax/purifylog.vim | 119 + runtime/syntax/pyrex.vim | 67 + runtime/syntax/python.vim | 303 + runtime/syntax/qf.vim | 24 + runtime/syntax/quake.vim | 170 + runtime/syntax/r.vim | 224 + runtime/syntax/racc.vim | 142 + runtime/syntax/radiance.vim | 159 + runtime/syntax/ratpoison.vim | 280 + runtime/syntax/rc.vim | 200 + runtime/syntax/rcs.vim | 76 + runtime/syntax/rcslog.vim | 38 + runtime/syntax/readline.vim | 395 + runtime/syntax/rebol.vim | 216 + runtime/syntax/redif.vim | 972 + runtime/syntax/registry.vim | 114 + runtime/syntax/remind.vim | 79 + runtime/syntax/resolv.vim | 88 + runtime/syntax/reva.vim | 196 + runtime/syntax/rexx.vim | 331 + runtime/syntax/rhelp.vim | 249 + runtime/syntax/rib.vim | 73 + runtime/syntax/rmd.vim | 87 + runtime/syntax/rnc.vim | 68 + runtime/syntax/rng.vim | 25 + runtime/syntax/rnoweb.vim | 57 + runtime/syntax/robots.vim | 69 + runtime/syntax/rpcgen.vim | 63 + runtime/syntax/rpl.vim | 496 + runtime/syntax/rrst.vim | 47 + runtime/syntax/rst.vim | 196 + runtime/syntax/rtf.vim | 88 + runtime/syntax/ruby.vim | 371 + runtime/syntax/samba.vim | 131 + runtime/syntax/sas.vim | 284 + runtime/syntax/sass.vim | 98 + runtime/syntax/sather.vim | 105 + runtime/syntax/scheme.vim | 330 + runtime/syntax/scilab.vim | 115 + runtime/syntax/screen.vim | 246 + runtime/syntax/scss.vim | 20 + runtime/syntax/sd.vim | 81 + runtime/syntax/sdc.vim | 41 + runtime/syntax/sdl.vim | 167 + runtime/syntax/sed.vim | 122 + runtime/syntax/sendpr.vim | 38 + runtime/syntax/sensors.vim | 52 + runtime/syntax/services.vim | 54 + runtime/syntax/setserial.vim | 120 + runtime/syntax/sgml.vim | 337 + runtime/syntax/sgmldecl.vim | 85 + runtime/syntax/sgmllnx.vim | 67 + runtime/syntax/sh.vim | 706 + runtime/syntax/sicad.vim | 413 + runtime/syntax/sieve.vim | 55 + runtime/syntax/simula.vim | 99 + runtime/syntax/sinda.vim | 146 + runtime/syntax/sindacmp.vim | 74 + runtime/syntax/sindaout.vim | 100 + runtime/syntax/sisu.vim | 265 + runtime/syntax/skill.vim | 562 + runtime/syntax/sl.vim | 120 + runtime/syntax/slang.vim | 102 + runtime/syntax/slice.vim | 91 + runtime/syntax/slpconf.vim | 273 + runtime/syntax/slpreg.vim | 122 + runtime/syntax/slpspi.vim | 39 + runtime/syntax/slrnrc.vim | 194 + runtime/syntax/slrnsc.vim | 85 + runtime/syntax/sm.vim | 96 + runtime/syntax/smarty.vim | 86 + runtime/syntax/smcl.vim | 308 + runtime/syntax/smil.vim | 159 + runtime/syntax/smith.vim | 52 + runtime/syntax/sml.vim | 230 + runtime/syntax/snnsnet.vim | 77 + runtime/syntax/snnspat.vim | 72 + runtime/syntax/snnsres.vim | 60 + runtime/syntax/snobol4.vim | 125 + runtime/syntax/spec.vim | 236 + runtime/syntax/specman.vim | 182 + runtime/syntax/spice.vim | 88 + runtime/syntax/splint.vim | 260 + runtime/syntax/spup.vim | 282 + runtime/syntax/spyce.vim | 111 + runtime/syntax/sql.vim | 39 + runtime/syntax/sqlanywhere.vim | 908 + runtime/syntax/sqlforms.vim | 168 + runtime/syntax/sqlhana.vim | 293 + runtime/syntax/sqlinformix.vim | 196 + runtime/syntax/sqlj.vim | 102 + runtime/syntax/sqloracle.vim | 89 + runtime/syntax/sqr.vim | 295 + runtime/syntax/squid.vim | 153 + runtime/syntax/sshconfig.vim | 219 + runtime/syntax/sshdconfig.vim | 215 + runtime/syntax/st.vim | 108 + runtime/syntax/stata.vim | 451 + runtime/syntax/stp.vim | 167 + runtime/syntax/strace.vim | 66 + runtime/syntax/sudoers.vim | 342 + runtime/syntax/svg.vim | 15 + runtime/syntax/svn.vim | 69 + runtime/syntax/syncolor.vim | 85 + runtime/syntax/synload.vim | 78 + runtime/syntax/syntax.vim | 43 + runtime/syntax/sysctl.vim | 39 + runtime/syntax/systemverilog.vim | 101 + runtime/syntax/tads.vim | 184 + runtime/syntax/tags.vim | 47 + runtime/syntax/tak.vim | 136 + runtime/syntax/takcmp.vim | 82 + runtime/syntax/takout.vim | 102 + runtime/syntax/tar.vim | 17 + runtime/syntax/taskdata.vim | 48 + runtime/syntax/taskedit.vim | 40 + runtime/syntax/tasm.vim | 128 + runtime/syntax/tcl.vim | 287 + runtime/syntax/tcsh.vim | 248 + runtime/syntax/terminfo.vim | 93 + runtime/syntax/tex.vim | 1339 ++ runtime/syntax/texinfo.vim | 409 + runtime/syntax/texmf.vim | 86 + runtime/syntax/tf.vim | 209 + runtime/syntax/tidy.vim | 145 + runtime/syntax/tilde.vim | 41 + runtime/syntax/tli.vim | 71 + runtime/syntax/tpp.vim | 100 + runtime/syntax/trasys.vim | 177 + runtime/syntax/treetop.vim | 110 + runtime/syntax/trustees.vim | 43 + runtime/syntax/tsalt.vim | 219 + runtime/syntax/tsscl.vim | 217 + runtime/syntax/tssgm.vim | 111 + runtime/syntax/tssop.vim | 87 + runtime/syntax/tt2.vim | 210 + runtime/syntax/tt2html.vim | 20 + runtime/syntax/tt2js.vim | 20 + runtime/syntax/uc.vim | 178 + runtime/syntax/udevconf.vim | 39 + runtime/syntax/udevperm.vim | 69 + runtime/syntax/udevrules.vim | 171 + runtime/syntax/uil.vim | 85 + runtime/syntax/updatedb.vim | 41 + runtime/syntax/upstart.vim | 112 + runtime/syntax/upstreamdat.vim | 296 + runtime/syntax/upstreaminstalllog.vim | 27 + runtime/syntax/upstreamlog.vim | 54 + runtime/syntax/usserverlog.vim | 60 + runtime/syntax/usw2kagtlog.vim | 50 + runtime/syntax/valgrind.vim | 104 + runtime/syntax/vb.vim | 378 + runtime/syntax/vera.vim | 361 + runtime/syntax/verilog.vim | 136 + runtime/syntax/verilogams.vim | 149 + runtime/syntax/vgrindefs.vim | 45 + runtime/syntax/vhdl.vim | 206 + runtime/syntax/vim.vim | 922 + runtime/syntax/viminfo.vim | 44 + runtime/syntax/virata.vim | 219 + runtime/syntax/vmasm.vim | 251 + runtime/syntax/voscm.vim | 94 + runtime/syntax/vrml.vim | 239 + runtime/syntax/vroom.vim | 113 + runtime/syntax/vsejcl.vim | 49 + runtime/syntax/wdiff.vim | 43 + runtime/syntax/web.vim | 39 + runtime/syntax/webmacro.vim | 82 + runtime/syntax/wget.vim | 189 + runtime/syntax/whitespace.vim | 13 + runtime/syntax/winbatch.vim | 187 + runtime/syntax/wml.vim | 172 + runtime/syntax/wsh.vim | 45 + runtime/syntax/wsml.vim | 125 + runtime/syntax/wvdial.vim | 28 + runtime/syntax/xbl.vim | 29 + runtime/syntax/xdefaults.vim | 145 + runtime/syntax/xf86conf.vim | 209 + runtime/syntax/xhtml.vim | 11 + runtime/syntax/xinetd.vim | 347 + runtime/syntax/xkb.vim | 91 + runtime/syntax/xmath.vim | 236 + runtime/syntax/xml.vim | 346 + runtime/syntax/xmodmap.vim | 677 + runtime/syntax/xpm.vim | 150 + runtime/syntax/xpm2.vim | 168 + runtime/syntax/xquery.vim | 82 + runtime/syntax/xs.vim | 3278 ++++ runtime/syntax/xsd.vim | 61 + runtime/syntax/xslt.vim | 62 + runtime/syntax/xxd.vim | 42 + runtime/syntax/yacc.vim | 122 + runtime/syntax/yaml.vim | 187 + runtime/syntax/z8a.vim | 114 + runtime/syntax/zimbu.vim | 130 + runtime/syntax/zsh.vim | 213 + runtime/tools/README.txt | 37 + runtime/tools/blink.c | 21 + runtime/tools/ccfilter.1 | 93 + runtime/tools/ccfilter.c | 326 + runtime/tools/ccfilter_README.txt | 91 + runtime/tools/efm_filter.pl | 39 + runtime/tools/efm_filter.txt | 31 + runtime/tools/efm_perl.pl | 153 + runtime/tools/mve.awk | 23 + runtime/tools/mve.txt | 20 + runtime/tools/pltags.pl | 300 + runtime/tools/ref | 11 + runtime/tools/shtags.1 | 61 + runtime/tools/shtags.pl | 144 + runtime/tools/unicode.vim | 290 + runtime/tools/vim132 | 13 + runtime/tools/vim_vs_net.cmd | 24 + runtime/tools/vimm | 6 + runtime/tools/vimspell.sh | 55 + runtime/tools/vimspell.txt | 22 + runtime/tools/xcmdsrv_client.c | 584 + runtime/vimrc_example.vim | 97 + 1354 files changed, 338179 insertions(+) create mode 100644 runtime/autoload/README.txt create mode 100644 runtime/autoload/ada.vim create mode 100644 runtime/autoload/adacomplete.vim create mode 100644 runtime/autoload/ccomplete.vim create mode 100644 runtime/autoload/clojurecomplete.vim create mode 100644 runtime/autoload/csscomplete.vim create mode 100644 runtime/autoload/decada.vim create mode 100644 runtime/autoload/getscript.vim create mode 100644 runtime/autoload/gnat.vim create mode 100644 runtime/autoload/gzip.vim create mode 100644 runtime/autoload/htmlcomplete.vim create mode 100644 runtime/autoload/javascriptcomplete.vim create mode 100644 runtime/autoload/netrw.vim create mode 100644 runtime/autoload/netrwFileHandlers.vim create mode 100644 runtime/autoload/netrwSettings.vim create mode 100644 runtime/autoload/netrw_gitignore.vim create mode 100644 runtime/autoload/paste.vim create mode 100644 runtime/autoload/phpcomplete.vim create mode 100644 runtime/autoload/python3complete.vim create mode 100644 runtime/autoload/pythoncomplete.vim create mode 100644 runtime/autoload/rubycomplete.vim create mode 100644 runtime/autoload/spellfile.vim create mode 100644 runtime/autoload/sqlcomplete.vim create mode 100644 runtime/autoload/syntaxcomplete.vim create mode 100644 runtime/autoload/tar.vim create mode 100644 runtime/autoload/tohtml.vim create mode 100644 runtime/autoload/vimball.vim create mode 100644 runtime/autoload/xml/html32.vim create mode 100644 runtime/autoload/xml/html401f.vim create mode 100644 runtime/autoload/xml/html401s.vim create mode 100644 runtime/autoload/xml/html401t.vim create mode 100644 runtime/autoload/xml/html40f.vim create mode 100644 runtime/autoload/xml/html40s.vim create mode 100644 runtime/autoload/xml/html40t.vim create mode 100644 runtime/autoload/xml/xhtml10f.vim create mode 100644 runtime/autoload/xml/xhtml10s.vim create mode 100644 runtime/autoload/xml/xhtml10t.vim create mode 100644 runtime/autoload/xml/xhtml11.vim create mode 100644 runtime/autoload/xml/xsd.vim create mode 100644 runtime/autoload/xml/xsl.vim create mode 100644 runtime/autoload/xmlcomplete.vim create mode 100644 runtime/autoload/zip.vim create mode 100644 runtime/bugreport.vim create mode 100644 runtime/colors/README.txt create mode 100644 runtime/colors/blue.vim create mode 100644 runtime/colors/darkblue.vim create mode 100644 runtime/colors/default.vim create mode 100644 runtime/colors/delek.vim create mode 100644 runtime/colors/desert.vim create mode 100644 runtime/colors/elflord.vim create mode 100644 runtime/colors/evening.vim create mode 100644 runtime/colors/industry.vim create mode 100644 runtime/colors/koehler.vim create mode 100644 runtime/colors/morning.vim create mode 100644 runtime/colors/murphy.vim create mode 100644 runtime/colors/pablo.vim create mode 100644 runtime/colors/peachpuff.vim create mode 100644 runtime/colors/ron.vim create mode 100644 runtime/colors/shine.vim create mode 100644 runtime/colors/slate.vim create mode 100644 runtime/colors/torte.vim create mode 100644 runtime/colors/zellner.vim create mode 100644 runtime/compiler/README.txt create mode 100644 runtime/compiler/ant.vim create mode 100644 runtime/compiler/bcc.vim create mode 100644 runtime/compiler/bdf.vim create mode 100644 runtime/compiler/checkstyle.vim create mode 100644 runtime/compiler/cs.vim create mode 100644 runtime/compiler/cucumber.vim create mode 100644 runtime/compiler/decada.vim create mode 100644 runtime/compiler/dot.vim create mode 100644 runtime/compiler/erlang.vim create mode 100644 runtime/compiler/eruby.vim create mode 100644 runtime/compiler/fortran_F.vim create mode 100644 runtime/compiler/fortran_cv.vim create mode 100644 runtime/compiler/fortran_elf90.vim create mode 100644 runtime/compiler/fortran_g77.vim create mode 100644 runtime/compiler/fortran_lf95.vim create mode 100644 runtime/compiler/fpc.vim create mode 100644 runtime/compiler/g95.vim create mode 100644 runtime/compiler/gcc.vim create mode 100644 runtime/compiler/gfortran.vim create mode 100644 runtime/compiler/gnat.vim create mode 100644 runtime/compiler/haml.vim create mode 100644 runtime/compiler/hp_acc.vim create mode 100644 runtime/compiler/icc.vim create mode 100644 runtime/compiler/ifort.vim create mode 100644 runtime/compiler/intel.vim create mode 100644 runtime/compiler/irix5_c.vim create mode 100644 runtime/compiler/irix5_cpp.vim create mode 100644 runtime/compiler/javac.vim create mode 100644 runtime/compiler/jikes.vim create mode 100644 runtime/compiler/mcs.vim create mode 100644 runtime/compiler/mips_c.vim create mode 100644 runtime/compiler/mipspro_c89.vim create mode 100644 runtime/compiler/mipspro_cpp.vim create mode 100644 runtime/compiler/modelsim_vcom.vim create mode 100644 runtime/compiler/msbuild.vim create mode 100644 runtime/compiler/msvc.vim create mode 100644 runtime/compiler/neato.vim create mode 100644 runtime/compiler/ocaml.vim create mode 100644 runtime/compiler/onsgmls.vim create mode 100644 runtime/compiler/pbx.vim create mode 100644 runtime/compiler/perl.vim create mode 100644 runtime/compiler/php.vim create mode 100644 runtime/compiler/pyunit.vim create mode 100644 runtime/compiler/rake.vim create mode 100644 runtime/compiler/rspec.vim create mode 100644 runtime/compiler/rst.vim create mode 100644 runtime/compiler/ruby.vim create mode 100644 runtime/compiler/rubyunit.vim create mode 100644 runtime/compiler/sass.vim create mode 100644 runtime/compiler/se.vim create mode 100644 runtime/compiler/splint.vim create mode 100644 runtime/compiler/tcl.vim create mode 100644 runtime/compiler/tex.vim create mode 100644 runtime/compiler/tidy.vim create mode 100644 runtime/compiler/xbuild.vim create mode 100644 runtime/compiler/xmllint.vim create mode 100644 runtime/compiler/xmlwf.vim create mode 100644 runtime/delmenu.vim create mode 100644 runtime/doc/Makefile create mode 100644 runtime/doc/arabic.txt create mode 100644 runtime/doc/autocmd.txt create mode 100644 runtime/doc/change.txt create mode 100644 runtime/doc/cmdline.txt create mode 100644 runtime/doc/debug.txt create mode 100644 runtime/doc/debugger.txt create mode 100644 runtime/doc/develop.txt create mode 100644 runtime/doc/diff.txt create mode 100644 runtime/doc/digraph.txt create mode 100644 runtime/doc/doctags.c create mode 100644 runtime/doc/editing.txt create mode 100644 runtime/doc/eval.txt create mode 100644 runtime/doc/evim-fr.1 create mode 100644 runtime/doc/evim-fr.UTF-8.1 create mode 100755 runtime/doc/evim-it.1 create mode 100644 runtime/doc/evim-it.UTF-8.1 create mode 100644 runtime/doc/evim-ja.UTF-8.1 create mode 100644 runtime/doc/evim-pl.1 create mode 100644 runtime/doc/evim-pl.UTF-8.1 create mode 100644 runtime/doc/evim-ru.1 create mode 100644 runtime/doc/evim-ru.UTF-8.1 create mode 100644 runtime/doc/evim.1 create mode 100644 runtime/doc/farsi.txt create mode 100644 runtime/doc/filetype.txt create mode 100644 runtime/doc/fold.txt create mode 100644 runtime/doc/ft_ada.txt create mode 100644 runtime/doc/ft_sql.txt create mode 100644 runtime/doc/gui.txt create mode 100644 runtime/doc/gui_w16.txt create mode 100644 runtime/doc/gui_w32.txt create mode 100644 runtime/doc/gui_x11.txt create mode 100644 runtime/doc/hebrew.txt create mode 100644 runtime/doc/help.txt create mode 100644 runtime/doc/helphelp.txt create mode 100644 runtime/doc/howto.txt create mode 100644 runtime/doc/if_cscop.txt create mode 100644 runtime/doc/if_lua.txt create mode 100644 runtime/doc/if_mzsch.txt create mode 100644 runtime/doc/if_ole.txt create mode 100644 runtime/doc/if_perl.txt create mode 100644 runtime/doc/if_pyth.txt create mode 100644 runtime/doc/if_ruby.txt create mode 100644 runtime/doc/if_sniff.txt create mode 100644 runtime/doc/if_tcl.txt create mode 100644 runtime/doc/indent.txt create mode 100644 runtime/doc/index.txt create mode 100644 runtime/doc/insert.txt create mode 100644 runtime/doc/intro.txt create mode 100644 runtime/doc/makehtml.awk create mode 100644 runtime/doc/maketags.awk create mode 100644 runtime/doc/map.txt create mode 100644 runtime/doc/mbyte.txt create mode 100644 runtime/doc/message.txt create mode 100644 runtime/doc/mlang.txt create mode 100644 runtime/doc/motion.txt create mode 100644 runtime/doc/netbeans.txt create mode 100644 runtime/doc/options.txt create mode 100644 runtime/doc/os_390.txt create mode 100644 runtime/doc/os_amiga.txt create mode 100644 runtime/doc/os_beos.txt create mode 100644 runtime/doc/os_dos.txt create mode 100644 runtime/doc/os_mac.txt create mode 100644 runtime/doc/os_mint.txt create mode 100644 runtime/doc/os_msdos.txt create mode 100644 runtime/doc/os_os2.txt create mode 100644 runtime/doc/os_qnx.txt create mode 100644 runtime/doc/os_risc.txt create mode 100644 runtime/doc/os_unix.txt create mode 100644 runtime/doc/os_vms.txt create mode 100644 runtime/doc/os_win32.txt create mode 100644 runtime/doc/pattern.txt create mode 100644 runtime/doc/pi_getscript.txt create mode 100644 runtime/doc/pi_gzip.txt create mode 100644 runtime/doc/pi_netrw.txt create mode 100644 runtime/doc/pi_paren.txt create mode 100644 runtime/doc/pi_spec.txt create mode 100644 runtime/doc/pi_tar.txt create mode 100644 runtime/doc/pi_vimball.txt create mode 100644 runtime/doc/pi_zip.txt create mode 100644 runtime/doc/print.txt create mode 100644 runtime/doc/quickfix.txt create mode 100644 runtime/doc/quickref.txt create mode 100644 runtime/doc/quotes.txt create mode 100644 runtime/doc/recover.txt create mode 100644 runtime/doc/remote.txt create mode 100644 runtime/doc/repeat.txt create mode 100644 runtime/doc/rileft.txt create mode 100644 runtime/doc/russian.txt create mode 100644 runtime/doc/scroll.txt create mode 100644 runtime/doc/sign.txt create mode 100644 runtime/doc/spell.txt create mode 100644 runtime/doc/sponsor.txt create mode 100644 runtime/doc/starting.txt create mode 100644 runtime/doc/syntax.txt create mode 100644 runtime/doc/tabpage.txt create mode 100644 runtime/doc/tagsrch.txt create mode 100644 runtime/doc/term.txt create mode 100644 runtime/doc/tips.txt create mode 100644 runtime/doc/todo.txt create mode 100644 runtime/doc/uganda.txt create mode 100644 runtime/doc/undo.txt create mode 100644 runtime/doc/usr_01.txt create mode 100644 runtime/doc/usr_02.txt create mode 100644 runtime/doc/usr_03.txt create mode 100644 runtime/doc/usr_04.txt create mode 100644 runtime/doc/usr_05.txt create mode 100644 runtime/doc/usr_06.txt create mode 100644 runtime/doc/usr_07.txt create mode 100644 runtime/doc/usr_08.txt create mode 100644 runtime/doc/usr_09.txt create mode 100644 runtime/doc/usr_10.txt create mode 100644 runtime/doc/usr_11.txt create mode 100644 runtime/doc/usr_12.txt create mode 100644 runtime/doc/usr_20.txt create mode 100644 runtime/doc/usr_21.txt create mode 100644 runtime/doc/usr_22.txt create mode 100644 runtime/doc/usr_23.txt create mode 100644 runtime/doc/usr_24.txt create mode 100644 runtime/doc/usr_25.txt create mode 100644 runtime/doc/usr_26.txt create mode 100644 runtime/doc/usr_27.txt create mode 100644 runtime/doc/usr_28.txt create mode 100644 runtime/doc/usr_29.txt create mode 100644 runtime/doc/usr_30.txt create mode 100644 runtime/doc/usr_31.txt create mode 100644 runtime/doc/usr_32.txt create mode 100644 runtime/doc/usr_40.txt create mode 100644 runtime/doc/usr_41.txt create mode 100644 runtime/doc/usr_42.txt create mode 100644 runtime/doc/usr_43.txt create mode 100644 runtime/doc/usr_44.txt create mode 100644 runtime/doc/usr_45.txt create mode 100644 runtime/doc/usr_90.txt create mode 100644 runtime/doc/usr_toc.txt create mode 100644 runtime/doc/various.txt create mode 100644 runtime/doc/version4.txt create mode 100644 runtime/doc/version5.txt create mode 100644 runtime/doc/version6.txt create mode 100644 runtime/doc/version7.txt create mode 100644 runtime/doc/vi_diff.txt create mode 100644 runtime/doc/vim-de.1 create mode 100644 runtime/doc/vim-de.UTF-8.1 create mode 100644 runtime/doc/vim-fr.1 create mode 100644 runtime/doc/vim-fr.UTF-8.1 create mode 100755 runtime/doc/vim-it.1 create mode 100644 runtime/doc/vim-it.UTF-8.1 create mode 100644 runtime/doc/vim-ja.UTF-8.1 create mode 100644 runtime/doc/vim-pl.1 create mode 100644 runtime/doc/vim-pl.UTF-8.1 create mode 100644 runtime/doc/vim-ru.1 create mode 100644 runtime/doc/vim-ru.UTF-8.1 create mode 100644 runtime/doc/vim.1 create mode 100644 runtime/doc/vim.man create mode 100644 runtime/doc/vim2html.pl create mode 100644 runtime/doc/vimdiff-fr.1 create mode 100644 runtime/doc/vimdiff-fr.UTF-8.1 create mode 100755 runtime/doc/vimdiff-it.1 create mode 100644 runtime/doc/vimdiff-it.UTF-8.1 create mode 100644 runtime/doc/vimdiff-ja.UTF-8.1 create mode 100644 runtime/doc/vimdiff-pl.1 create mode 100644 runtime/doc/vimdiff-pl.UTF-8.1 create mode 100644 runtime/doc/vimdiff-ru.1 create mode 100644 runtime/doc/vimdiff-ru.UTF-8.1 create mode 100644 runtime/doc/vimdiff.1 create mode 100644 runtime/doc/vimdiff.man create mode 100644 runtime/doc/vimtutor-fr.1 create mode 100644 runtime/doc/vimtutor-fr.UTF-8.1 create mode 100755 runtime/doc/vimtutor-it.1 create mode 100644 runtime/doc/vimtutor-it.UTF-8.1 create mode 100644 runtime/doc/vimtutor-ja.UTF-8.1 create mode 100644 runtime/doc/vimtutor-pl.1 create mode 100644 runtime/doc/vimtutor-pl.UTF-8.1 create mode 100644 runtime/doc/vimtutor-ru.1 create mode 100644 runtime/doc/vimtutor-ru.UTF-8.1 create mode 100644 runtime/doc/vimtutor.1 create mode 100644 runtime/doc/vimtutor.man create mode 100644 runtime/doc/visual.txt create mode 100644 runtime/doc/windows.txt create mode 100644 runtime/doc/workshop.txt create mode 100644 runtime/doc/xxd-fr.1 create mode 100644 runtime/doc/xxd-fr.UTF-8.1 create mode 100755 runtime/doc/xxd-it.1 create mode 100644 runtime/doc/xxd-it.UTF-8.1 create mode 100644 runtime/doc/xxd-ja.UTF-8.1 create mode 100644 runtime/doc/xxd-pl.1 create mode 100644 runtime/doc/xxd-pl.UTF-8.1 create mode 100644 runtime/doc/xxd-ru.1 create mode 100644 runtime/doc/xxd-ru.UTF-8.1 create mode 100644 runtime/doc/xxd.1 create mode 100644 runtime/doc/xxd.man create mode 100644 runtime/evim.vim create mode 100644 runtime/filetype.vim create mode 100644 runtime/ftoff.vim create mode 100644 runtime/ftplugin.vim create mode 100644 runtime/ftplugin/README.txt create mode 100644 runtime/ftplugin/a2ps.vim create mode 100644 runtime/ftplugin/aap.vim create mode 100644 runtime/ftplugin/abap.vim create mode 100644 runtime/ftplugin/abaqus.vim create mode 100644 runtime/ftplugin/ada.vim create mode 100644 runtime/ftplugin/alsaconf.vim create mode 100644 runtime/ftplugin/ant.vim create mode 100644 runtime/ftplugin/arch.vim create mode 100644 runtime/ftplugin/art.vim create mode 100644 runtime/ftplugin/aspvbs.vim create mode 100644 runtime/ftplugin/automake.vim create mode 100644 runtime/ftplugin/bdf.vim create mode 100644 runtime/ftplugin/bst.vim create mode 100644 runtime/ftplugin/btm.vim create mode 100644 runtime/ftplugin/c.vim create mode 100644 runtime/ftplugin/calendar.vim create mode 100644 runtime/ftplugin/cdrdaoconf.vim create mode 100644 runtime/ftplugin/ch.vim create mode 100644 runtime/ftplugin/changelog.vim create mode 100644 runtime/ftplugin/clojure.vim create mode 100644 runtime/ftplugin/cobol.vim create mode 100644 runtime/ftplugin/conf.vim create mode 100644 runtime/ftplugin/config.vim create mode 100644 runtime/ftplugin/context.vim create mode 100644 runtime/ftplugin/cpp.vim create mode 100644 runtime/ftplugin/crm.vim create mode 100644 runtime/ftplugin/cs.vim create mode 100644 runtime/ftplugin/csc.vim create mode 100644 runtime/ftplugin/csh.vim create mode 100644 runtime/ftplugin/css.vim create mode 100644 runtime/ftplugin/cucumber.vim create mode 100644 runtime/ftplugin/cvsrc.vim create mode 100644 runtime/ftplugin/debchangelog.vim create mode 100644 runtime/ftplugin/debcontrol.vim create mode 100644 runtime/ftplugin/denyhosts.vim create mode 100644 runtime/ftplugin/dictconf.vim create mode 100644 runtime/ftplugin/dictdconf.vim create mode 100644 runtime/ftplugin/diff.vim create mode 100644 runtime/ftplugin/dircolors.vim create mode 100644 runtime/ftplugin/docbk.vim create mode 100644 runtime/ftplugin/dosbatch.vim create mode 100644 runtime/ftplugin/dosini.vim create mode 100644 runtime/ftplugin/dtd.vim create mode 100644 runtime/ftplugin/dtrace.vim create mode 100644 runtime/ftplugin/elinks.vim create mode 100644 runtime/ftplugin/erlang.vim create mode 100644 runtime/ftplugin/eruby.vim create mode 100644 runtime/ftplugin/eterm.vim create mode 100644 runtime/ftplugin/falcon.vim create mode 100644 runtime/ftplugin/fetchmail.vim create mode 100644 runtime/ftplugin/flexwiki.vim create mode 100644 runtime/ftplugin/fortran.vim create mode 100644 runtime/ftplugin/framescript.vim create mode 100644 runtime/ftplugin/fvwm.vim create mode 100644 runtime/ftplugin/git.vim create mode 100644 runtime/ftplugin/gitcommit.vim create mode 100644 runtime/ftplugin/gitconfig.vim create mode 100644 runtime/ftplugin/gitrebase.vim create mode 100644 runtime/ftplugin/gitsendemail.vim create mode 100644 runtime/ftplugin/gpg.vim create mode 100644 runtime/ftplugin/gprof.vim create mode 100644 runtime/ftplugin/group.vim create mode 100644 runtime/ftplugin/grub.vim create mode 100644 runtime/ftplugin/haml.vim create mode 100644 runtime/ftplugin/hamster.vim create mode 100644 runtime/ftplugin/haskell.vim create mode 100644 runtime/ftplugin/help.vim create mode 100644 runtime/ftplugin/hostconf.vim create mode 100644 runtime/ftplugin/hostsaccess.vim create mode 100644 runtime/ftplugin/html.vim create mode 100644 runtime/ftplugin/htmldjango.vim create mode 100644 runtime/ftplugin/indent.vim create mode 100644 runtime/ftplugin/initex.vim create mode 100644 runtime/ftplugin/ishd.vim create mode 100644 runtime/ftplugin/j.vim create mode 100644 runtime/ftplugin/java.vim create mode 100644 runtime/ftplugin/javascript.vim create mode 100644 runtime/ftplugin/jproperties.vim create mode 100644 runtime/ftplugin/json.vim create mode 100644 runtime/ftplugin/jsp.vim create mode 100644 runtime/ftplugin/kconfig.vim create mode 100644 runtime/ftplugin/kwt.vim create mode 100644 runtime/ftplugin/ld.vim create mode 100644 runtime/ftplugin/lftp.vim create mode 100644 runtime/ftplugin/libao.vim create mode 100644 runtime/ftplugin/limits.vim create mode 100644 runtime/ftplugin/liquid.vim create mode 100644 runtime/ftplugin/lisp.vim create mode 100644 runtime/ftplugin/logcheck.vim create mode 100644 runtime/ftplugin/loginaccess.vim create mode 100644 runtime/ftplugin/logindefs.vim create mode 100644 runtime/ftplugin/logtalk.dict create mode 100644 runtime/ftplugin/logtalk.vim create mode 100644 runtime/ftplugin/lprolog.vim create mode 100644 runtime/ftplugin/lua.vim create mode 100644 runtime/ftplugin/m4.vim create mode 100644 runtime/ftplugin/mail.vim create mode 100644 runtime/ftplugin/mailaliases.vim create mode 100644 runtime/ftplugin/mailcap.vim create mode 100644 runtime/ftplugin/make.vim create mode 100644 runtime/ftplugin/man.vim create mode 100644 runtime/ftplugin/manconf.vim create mode 100644 runtime/ftplugin/markdown.vim create mode 100644 runtime/ftplugin/matlab.vim create mode 100644 runtime/ftplugin/mf.vim create mode 100644 runtime/ftplugin/modconf.vim create mode 100644 runtime/ftplugin/mp.vim create mode 100644 runtime/ftplugin/mplayerconf.vim create mode 100644 runtime/ftplugin/mrxvtrc.vim create mode 100644 runtime/ftplugin/msmessages.vim create mode 100644 runtime/ftplugin/muttrc.vim create mode 100644 runtime/ftplugin/nanorc.vim create mode 100644 runtime/ftplugin/netrc.vim create mode 100644 runtime/ftplugin/nsis.vim create mode 100644 runtime/ftplugin/objc.vim create mode 100644 runtime/ftplugin/ocaml.vim create mode 100644 runtime/ftplugin/occam.vim create mode 100644 runtime/ftplugin/pamconf.vim create mode 100644 runtime/ftplugin/pascal.vim create mode 100644 runtime/ftplugin/passwd.vim create mode 100644 runtime/ftplugin/pdf.vim create mode 100644 runtime/ftplugin/perl.vim create mode 100644 runtime/ftplugin/perl6.vim create mode 100644 runtime/ftplugin/php.vim create mode 100644 runtime/ftplugin/pinfo.vim create mode 100644 runtime/ftplugin/plaintex.vim create mode 100644 runtime/ftplugin/postscr.vim create mode 100644 runtime/ftplugin/procmail.vim create mode 100644 runtime/ftplugin/prolog.vim create mode 100644 runtime/ftplugin/protocols.vim create mode 100644 runtime/ftplugin/pyrex.vim create mode 100644 runtime/ftplugin/python.vim create mode 100644 runtime/ftplugin/qf.vim create mode 100644 runtime/ftplugin/quake.vim create mode 100644 runtime/ftplugin/r.vim create mode 100644 runtime/ftplugin/racc.vim create mode 100644 runtime/ftplugin/readline.vim create mode 100644 runtime/ftplugin/registry.vim create mode 100644 runtime/ftplugin/reva.vim create mode 100644 runtime/ftplugin/rhelp.vim create mode 100644 runtime/ftplugin/rmd.vim create mode 100644 runtime/ftplugin/rnc.vim create mode 100644 runtime/ftplugin/rnoweb.vim create mode 100644 runtime/ftplugin/rpl.vim create mode 100644 runtime/ftplugin/rrst.vim create mode 100644 runtime/ftplugin/rst.vim create mode 100644 runtime/ftplugin/ruby.vim create mode 100644 runtime/ftplugin/sass.vim create mode 100644 runtime/ftplugin/scheme.vim create mode 100644 runtime/ftplugin/screen.vim create mode 100644 runtime/ftplugin/scss.vim create mode 100644 runtime/ftplugin/sensors.vim create mode 100644 runtime/ftplugin/services.vim create mode 100644 runtime/ftplugin/setserial.vim create mode 100644 runtime/ftplugin/sgml.vim create mode 100644 runtime/ftplugin/sh.vim create mode 100644 runtime/ftplugin/sieve.vim create mode 100644 runtime/ftplugin/slpconf.vim create mode 100644 runtime/ftplugin/slpreg.vim create mode 100644 runtime/ftplugin/slpspi.vim create mode 100644 runtime/ftplugin/spec.vim create mode 100644 runtime/ftplugin/sql.vim create mode 100644 runtime/ftplugin/sshconfig.vim create mode 100644 runtime/ftplugin/sudoers.vim create mode 100644 runtime/ftplugin/svg.vim create mode 100644 runtime/ftplugin/sysctl.vim create mode 100644 runtime/ftplugin/systemverilog.vim create mode 100644 runtime/ftplugin/tcl.vim create mode 100644 runtime/ftplugin/tcsh.vim create mode 100644 runtime/ftplugin/terminfo.vim create mode 100644 runtime/ftplugin/tex.vim create mode 100644 runtime/ftplugin/text.vim create mode 100644 runtime/ftplugin/treetop.vim create mode 100644 runtime/ftplugin/tt2html.vim create mode 100644 runtime/ftplugin/udevconf.vim create mode 100644 runtime/ftplugin/udevperm.vim create mode 100644 runtime/ftplugin/udevrules.vim create mode 100644 runtime/ftplugin/updatedb.vim create mode 100644 runtime/ftplugin/vb.vim create mode 100644 runtime/ftplugin/verilog.vim create mode 100644 runtime/ftplugin/vhdl.vim create mode 100644 runtime/ftplugin/vim.vim create mode 100644 runtime/ftplugin/vroom.vim create mode 100644 runtime/ftplugin/xdefaults.vim create mode 100644 runtime/ftplugin/xf86conf.vim create mode 100644 runtime/ftplugin/xhtml.vim create mode 100644 runtime/ftplugin/xinetd.vim create mode 100644 runtime/ftplugin/xml.vim create mode 100644 runtime/ftplugin/xmodmap.vim create mode 100644 runtime/ftplugin/xs.vim create mode 100644 runtime/ftplugin/xsd.vim create mode 100644 runtime/ftplugin/xslt.vim create mode 100644 runtime/ftplugin/yaml.vim create mode 100644 runtime/ftplugin/zimbu.vim create mode 100644 runtime/ftplugin/zsh.vim create mode 100644 runtime/ftplugof.vim create mode 100644 runtime/gvimrc_example.vim create mode 100644 runtime/indent.vim create mode 100644 runtime/indent/README.txt create mode 100644 runtime/indent/aap.vim create mode 100644 runtime/indent/ada.vim create mode 100644 runtime/indent/ant.vim create mode 100644 runtime/indent/automake.vim create mode 100644 runtime/indent/awk.vim create mode 100644 runtime/indent/bib.vim create mode 100644 runtime/indent/bst.vim create mode 100644 runtime/indent/c.vim create mode 100644 runtime/indent/cdl.vim create mode 100644 runtime/indent/ch.vim create mode 100644 runtime/indent/chaiscript.vim create mode 100644 runtime/indent/changelog.vim create mode 100644 runtime/indent/clojure.vim create mode 100644 runtime/indent/cmake.vim create mode 100644 runtime/indent/cobol.vim create mode 100644 runtime/indent/config.vim create mode 100644 runtime/indent/cpp.vim create mode 100644 runtime/indent/cs.vim create mode 100644 runtime/indent/css.vim create mode 100644 runtime/indent/cucumber.vim create mode 100644 runtime/indent/cuda.vim create mode 100644 runtime/indent/d.vim create mode 100644 runtime/indent/dictconf.vim create mode 100644 runtime/indent/dictdconf.vim create mode 100644 runtime/indent/docbk.vim create mode 100644 runtime/indent/dtd.vim create mode 100644 runtime/indent/dtrace.vim create mode 100644 runtime/indent/dylan.vim create mode 100644 runtime/indent/eiffel.vim create mode 100644 runtime/indent/erlang.vim create mode 100644 runtime/indent/eruby.vim create mode 100644 runtime/indent/eterm.vim create mode 100644 runtime/indent/falcon.vim create mode 100644 runtime/indent/fortran.vim create mode 100644 runtime/indent/framescript.vim create mode 100644 runtime/indent/gitconfig.vim create mode 100644 runtime/indent/gitolite.vim create mode 100644 runtime/indent/haml.vim create mode 100644 runtime/indent/hamster.vim create mode 100644 runtime/indent/html.vim create mode 100644 runtime/indent/htmldjango.vim create mode 100644 runtime/indent/idlang.vim create mode 100644 runtime/indent/ishd.vim create mode 100644 runtime/indent/j.vim create mode 100644 runtime/indent/java.vim create mode 100644 runtime/indent/javascript.vim create mode 100644 runtime/indent/json.vim create mode 100644 runtime/indent/jsp.vim create mode 100644 runtime/indent/ld.vim create mode 100755 runtime/indent/lifelines.vim create mode 100644 runtime/indent/liquid.vim create mode 100644 runtime/indent/lisp.vim create mode 100644 runtime/indent/logtalk.vim create mode 100644 runtime/indent/lua.vim create mode 100644 runtime/indent/mail.vim create mode 100644 runtime/indent/make.vim create mode 100644 runtime/indent/matlab.vim create mode 100644 runtime/indent/mma.vim create mode 100644 runtime/indent/mp.vim create mode 100644 runtime/indent/objc.vim create mode 100644 runtime/indent/ocaml.vim create mode 100644 runtime/indent/occam.vim create mode 100644 runtime/indent/pascal.vim create mode 100644 runtime/indent/perl.vim create mode 100644 runtime/indent/perl6.vim create mode 100644 runtime/indent/php.vim create mode 100644 runtime/indent/postscr.vim create mode 100644 runtime/indent/pov.vim create mode 100644 runtime/indent/prolog.vim create mode 100644 runtime/indent/pyrex.vim create mode 100644 runtime/indent/python.vim create mode 100644 runtime/indent/r.vim create mode 100644 runtime/indent/readline.vim create mode 100644 runtime/indent/rhelp.vim create mode 100644 runtime/indent/rmd.vim create mode 100644 runtime/indent/rnoweb.vim create mode 100644 runtime/indent/rpl.vim create mode 100644 runtime/indent/rrst.vim create mode 100644 runtime/indent/rst.vim create mode 100644 runtime/indent/ruby.vim create mode 100644 runtime/indent/sass.vim create mode 100644 runtime/indent/scheme.vim create mode 100644 runtime/indent/scss.vim create mode 100644 runtime/indent/sdl.vim create mode 100644 runtime/indent/sh.vim create mode 100644 runtime/indent/sml.vim create mode 100644 runtime/indent/sql.vim create mode 100644 runtime/indent/sqlanywhere.vim create mode 100644 runtime/indent/systemverilog.vim create mode 100644 runtime/indent/tcl.vim create mode 100644 runtime/indent/tcsh.vim create mode 100644 runtime/indent/tex.vim create mode 100644 runtime/indent/tf.vim create mode 100644 runtime/indent/tilde.vim create mode 100644 runtime/indent/treetop.vim create mode 100644 runtime/indent/vb.vim create mode 100644 runtime/indent/verilog.vim create mode 100644 runtime/indent/vhdl.vim create mode 100644 runtime/indent/vim.vim create mode 100644 runtime/indent/vroom.vim create mode 100644 runtime/indent/xf86conf.vim create mode 100644 runtime/indent/xhtml.vim create mode 100644 runtime/indent/xinetd.vim create mode 100644 runtime/indent/xml.vim create mode 100644 runtime/indent/xsd.vim create mode 100644 runtime/indent/xslt.vim create mode 100644 runtime/indent/yacc.vim create mode 100644 runtime/indent/yaml.vim create mode 100644 runtime/indent/zimbu.vim create mode 100644 runtime/indent/zsh.vim create mode 100644 runtime/indoff.vim create mode 100644 runtime/keymap/README.txt create mode 100644 runtime/keymap/accents.vim create mode 100644 runtime/keymap/arabic.vim create mode 100644 runtime/keymap/arabic_utf-8.vim create mode 100644 runtime/keymap/belarusian-jcuken.vim create mode 100644 runtime/keymap/bulgarian-bds.vim create mode 100644 runtime/keymap/bulgarian-phonetic.vim create mode 100644 runtime/keymap/canfr-win.vim create mode 100644 runtime/keymap/croatian.vim create mode 100644 runtime/keymap/croatian_cp1250.vim create mode 100644 runtime/keymap/croatian_iso-8859-2.vim create mode 100644 runtime/keymap/croatian_utf-8.vim create mode 100644 runtime/keymap/czech.vim create mode 100644 runtime/keymap/czech_utf-8.vim create mode 100644 runtime/keymap/dvorak.vim create mode 100644 runtime/keymap/esperanto.vim create mode 100644 runtime/keymap/esperanto_utf-8.vim create mode 100644 runtime/keymap/greek.vim create mode 100644 runtime/keymap/greek_cp1253.vim create mode 100644 runtime/keymap/greek_cp737.vim create mode 100644 runtime/keymap/greek_iso-8859-7.vim create mode 100644 runtime/keymap/greek_utf-8.vim create mode 100644 runtime/keymap/hebrew.vim create mode 100644 runtime/keymap/hebrew_cp1255.vim create mode 100644 runtime/keymap/hebrew_iso-8859-8.vim create mode 100644 runtime/keymap/hebrew_utf-8.vim create mode 100644 runtime/keymap/hebrewp.vim create mode 100644 runtime/keymap/hebrewp_cp1255.vim create mode 100644 runtime/keymap/hebrewp_iso-8859-8.vim create mode 100644 runtime/keymap/hebrewp_utf-8.vim create mode 100644 runtime/keymap/kana.vim create mode 100644 runtime/keymap/lithuanian-baltic.vim create mode 100644 runtime/keymap/magyar_utf-8.vim create mode 100644 runtime/keymap/mongolian_utf-8.vim create mode 100644 runtime/keymap/persian-iranian_utf-8.vim create mode 100644 runtime/keymap/persian.vim create mode 100644 runtime/keymap/pinyin.vim create mode 100644 runtime/keymap/polish-slash.vim create mode 100644 runtime/keymap/polish-slash_cp1250.vim create mode 100644 runtime/keymap/polish-slash_cp852.vim create mode 100644 runtime/keymap/polish-slash_iso-8859-2.vim create mode 100644 runtime/keymap/polish-slash_utf-8.vim create mode 100644 runtime/keymap/russian-dvorak.vim create mode 100644 runtime/keymap/russian-jcuken.vim create mode 100644 runtime/keymap/russian-jcukenwin.vim create mode 100644 runtime/keymap/russian-yawerty.vim create mode 100644 runtime/keymap/serbian-latin.vim create mode 100644 runtime/keymap/serbian-latin_utf-8.vim create mode 100644 runtime/keymap/serbian.vim create mode 100644 runtime/keymap/serbian_cp1250.vim create mode 100644 runtime/keymap/serbian_cp1251.vim create mode 100644 runtime/keymap/serbian_iso-8859-2.vim create mode 100644 runtime/keymap/serbian_iso-8859-5.vim create mode 100644 runtime/keymap/serbian_utf-8.vim create mode 100644 runtime/keymap/sinhala-phonetic_utf-8.vim create mode 100644 runtime/keymap/sinhala.vim create mode 100644 runtime/keymap/slovak.vim create mode 100644 runtime/keymap/slovak_cp1250.vim create mode 100644 runtime/keymap/slovak_iso-8859-2.vim create mode 100644 runtime/keymap/slovak_utf-8.vim create mode 100644 runtime/keymap/tamil_tscii.vim create mode 100644 runtime/keymap/thaana-phonetic_utf-8.vim create mode 100644 runtime/keymap/thaana.vim create mode 100644 runtime/keymap/ukrainian-dvorak.vim create mode 100644 runtime/keymap/ukrainian-jcuken.vim create mode 100644 runtime/keymap/vietnamese-viqr_utf-8.vim create mode 100644 runtime/macmap.vim create mode 100644 runtime/macros/dvorak create mode 100644 runtime/macros/editexisting.vim create mode 100644 runtime/macros/justify.vim create mode 100644 runtime/macros/less.bat create mode 100755 runtime/macros/less.sh create mode 100644 runtime/macros/less.vim create mode 100644 runtime/macros/matchit.txt create mode 100644 runtime/macros/matchit.vim create mode 100644 runtime/macros/shellmenu.vim create mode 100644 runtime/macros/swapmous.vim create mode 100644 runtime/makemenu.vim create mode 100644 runtime/menu.vim create mode 100644 runtime/mswin.vim create mode 100644 runtime/optwin.vim create mode 100644 runtime/plugin/README.txt create mode 100644 runtime/plugin/getscriptPlugin.vim create mode 100644 runtime/plugin/gzip.vim create mode 100644 runtime/plugin/matchparen.vim create mode 100644 runtime/plugin/netrwPlugin.vim create mode 100644 runtime/plugin/rrhelper.vim create mode 100644 runtime/plugin/spellfile.vim create mode 100644 runtime/plugin/tarPlugin.vim create mode 100644 runtime/plugin/tohtml.vim create mode 100644 runtime/plugin/vimballPlugin.vim create mode 100644 runtime/plugin/zipPlugin.vim create mode 100644 runtime/print/ascii.ps create mode 100644 runtime/print/cidfont.ps create mode 100644 runtime/print/cns_roman.ps create mode 100644 runtime/print/cp1250.ps create mode 100644 runtime/print/cp1251.ps create mode 100644 runtime/print/cp1252.ps create mode 100644 runtime/print/cp1253.ps create mode 100644 runtime/print/cp1254.ps create mode 100644 runtime/print/cp1255.ps create mode 100644 runtime/print/cp1257.ps create mode 100644 runtime/print/dec-mcs.ps create mode 100644 runtime/print/ebcdic-uk.ps create mode 100644 runtime/print/gb_roman.ps create mode 100644 runtime/print/hp-roman8.ps create mode 100644 runtime/print/iso-8859-10.ps create mode 100644 runtime/print/iso-8859-11.ps create mode 100644 runtime/print/iso-8859-13.ps create mode 100644 runtime/print/iso-8859-14.ps create mode 100644 runtime/print/iso-8859-15.ps create mode 100644 runtime/print/iso-8859-2.ps create mode 100644 runtime/print/iso-8859-3.ps create mode 100644 runtime/print/iso-8859-4.ps create mode 100644 runtime/print/iso-8859-5.ps create mode 100644 runtime/print/iso-8859-7.ps create mode 100644 runtime/print/iso-8859-8.ps create mode 100644 runtime/print/iso-8859-9.ps create mode 100644 runtime/print/jis_roman.ps create mode 100644 runtime/print/koi8-r.ps create mode 100644 runtime/print/koi8-u.ps create mode 100644 runtime/print/ks_roman.ps create mode 100644 runtime/print/latin1.ps create mode 100644 runtime/print/mac-roman.ps create mode 100644 runtime/print/prolog.ps create mode 100644 runtime/rgb.txt create mode 100644 runtime/scripts.vim create mode 100644 runtime/synmenu.vim create mode 100644 runtime/syntax/2html.vim create mode 100644 runtime/syntax/README.txt create mode 100644 runtime/syntax/a2ps.vim create mode 100644 runtime/syntax/a65.vim create mode 100644 runtime/syntax/aap.vim create mode 100644 runtime/syntax/abap.vim create mode 100644 runtime/syntax/abaqus.vim create mode 100644 runtime/syntax/abc.vim create mode 100644 runtime/syntax/abel.vim create mode 100644 runtime/syntax/acedb.vim create mode 100644 runtime/syntax/ada.vim create mode 100644 runtime/syntax/aflex.vim create mode 100644 runtime/syntax/ahdl.vim create mode 100644 runtime/syntax/alsaconf.vim create mode 100644 runtime/syntax/amiga.vim create mode 100644 runtime/syntax/aml.vim create mode 100644 runtime/syntax/ampl.vim create mode 100644 runtime/syntax/ant.vim create mode 100644 runtime/syntax/antlr.vim create mode 100644 runtime/syntax/apache.vim create mode 100644 runtime/syntax/apachestyle.vim create mode 100644 runtime/syntax/aptconf.vim create mode 100644 runtime/syntax/arch.vim create mode 100644 runtime/syntax/arduino.vim create mode 100644 runtime/syntax/art.vim create mode 100644 runtime/syntax/asciidoc.vim create mode 100644 runtime/syntax/asm.vim create mode 100644 runtime/syntax/asm68k.vim create mode 100644 runtime/syntax/asmh8300.vim create mode 100644 runtime/syntax/asn.vim create mode 100644 runtime/syntax/aspperl.vim create mode 100644 runtime/syntax/aspvbs.vim create mode 100644 runtime/syntax/asterisk.vim create mode 100644 runtime/syntax/asteriskvm.vim create mode 100644 runtime/syntax/atlas.vim create mode 100644 runtime/syntax/autohotkey.vim create mode 100644 runtime/syntax/autoit.vim create mode 100644 runtime/syntax/automake.vim create mode 100644 runtime/syntax/ave.vim create mode 100644 runtime/syntax/awk.vim create mode 100644 runtime/syntax/ayacc.vim create mode 100644 runtime/syntax/b.vim create mode 100644 runtime/syntax/baan.vim create mode 100644 runtime/syntax/basic.vim create mode 100644 runtime/syntax/bc.vim create mode 100644 runtime/syntax/bdf.vim create mode 100644 runtime/syntax/bib.vim create mode 100644 runtime/syntax/bindzone.vim create mode 100644 runtime/syntax/blank.vim create mode 100644 runtime/syntax/bst.vim create mode 100644 runtime/syntax/btm.vim create mode 100644 runtime/syntax/bzr.vim create mode 100644 runtime/syntax/c.vim create mode 100644 runtime/syntax/cabal.vim create mode 100644 runtime/syntax/calendar.vim create mode 100644 runtime/syntax/catalog.vim create mode 100644 runtime/syntax/cdl.vim create mode 100644 runtime/syntax/cdrdaoconf.vim create mode 100644 runtime/syntax/cdrtoc.vim create mode 100644 runtime/syntax/cf.vim create mode 100644 runtime/syntax/cfg.vim create mode 100644 runtime/syntax/ch.vim create mode 100644 runtime/syntax/chaiscript.vim create mode 100644 runtime/syntax/change.vim create mode 100644 runtime/syntax/changelog.vim create mode 100644 runtime/syntax/chaskell.vim create mode 100644 runtime/syntax/cheetah.vim create mode 100644 runtime/syntax/chill.vim create mode 100644 runtime/syntax/chordpro.vim create mode 100644 runtime/syntax/cl.vim create mode 100644 runtime/syntax/clean.vim create mode 100644 runtime/syntax/clipper.vim create mode 100644 runtime/syntax/clojure.vim create mode 100644 runtime/syntax/cmake.vim create mode 100644 runtime/syntax/cmusrc.vim create mode 100644 runtime/syntax/cobol.vim create mode 100644 runtime/syntax/coco.vim create mode 100644 runtime/syntax/colortest.vim create mode 100644 runtime/syntax/conaryrecipe.vim create mode 100644 runtime/syntax/conf.vim create mode 100644 runtime/syntax/config.vim create mode 100644 runtime/syntax/context.vim create mode 100644 runtime/syntax/cpp.vim create mode 100644 runtime/syntax/crm.vim create mode 100644 runtime/syntax/crontab.vim create mode 100644 runtime/syntax/cs.vim create mode 100644 runtime/syntax/csc.vim create mode 100644 runtime/syntax/csdl.vim create mode 100644 runtime/syntax/csh.vim create mode 100644 runtime/syntax/csp.vim create mode 100644 runtime/syntax/css.vim create mode 100644 runtime/syntax/cterm.vim create mode 100644 runtime/syntax/ctrlh.vim create mode 100644 runtime/syntax/cucumber.vim create mode 100644 runtime/syntax/cuda.vim create mode 100644 runtime/syntax/cupl.vim create mode 100644 runtime/syntax/cuplsim.vim create mode 100644 runtime/syntax/cvs.vim create mode 100644 runtime/syntax/cvsrc.vim create mode 100644 runtime/syntax/cweb.vim create mode 100644 runtime/syntax/cynlib.vim create mode 100644 runtime/syntax/cynpp.vim create mode 100644 runtime/syntax/d.vim create mode 100644 runtime/syntax/datascript.vim create mode 100644 runtime/syntax/dcd.vim create mode 100644 runtime/syntax/dcl.vim create mode 100644 runtime/syntax/debchangelog.vim create mode 100644 runtime/syntax/debcontrol.vim create mode 100644 runtime/syntax/debsources.vim create mode 100644 runtime/syntax/def.vim create mode 100644 runtime/syntax/denyhosts.vim create mode 100644 runtime/syntax/desc.vim create mode 100644 runtime/syntax/desktop.vim create mode 100644 runtime/syntax/dictconf.vim create mode 100644 runtime/syntax/dictdconf.vim create mode 100644 runtime/syntax/diff.vim create mode 100644 runtime/syntax/dircolors.vim create mode 100644 runtime/syntax/dirpager.vim create mode 100644 runtime/syntax/diva.vim create mode 100644 runtime/syntax/django.vim create mode 100644 runtime/syntax/dns.vim create mode 100644 runtime/syntax/dnsmasq.vim create mode 100644 runtime/syntax/docbk.vim create mode 100644 runtime/syntax/docbksgml.vim create mode 100644 runtime/syntax/docbkxml.vim create mode 100644 runtime/syntax/dosbatch.vim create mode 100644 runtime/syntax/dosini.vim create mode 100644 runtime/syntax/dot.vim create mode 100644 runtime/syntax/doxygen.vim create mode 100644 runtime/syntax/dracula.vim create mode 100644 runtime/syntax/dsl.vim create mode 100644 runtime/syntax/dtd.vim create mode 100644 runtime/syntax/dtml.vim create mode 100644 runtime/syntax/dtrace.vim create mode 100644 runtime/syntax/dts.vim create mode 100644 runtime/syntax/dylan.vim create mode 100644 runtime/syntax/dylanintr.vim create mode 100644 runtime/syntax/dylanlid.vim create mode 100644 runtime/syntax/ecd.vim create mode 100644 runtime/syntax/edif.vim create mode 100644 runtime/syntax/eiffel.vim create mode 100644 runtime/syntax/elf.vim create mode 100644 runtime/syntax/elinks.vim create mode 100644 runtime/syntax/elmfilt.vim create mode 100644 runtime/syntax/erlang.vim create mode 100644 runtime/syntax/eruby.vim create mode 100644 runtime/syntax/esmtprc.vim create mode 100644 runtime/syntax/esqlc.vim create mode 100644 runtime/syntax/esterel.vim create mode 100644 runtime/syntax/eterm.vim create mode 100644 runtime/syntax/euphoria3.vim create mode 100644 runtime/syntax/euphoria4.vim create mode 100644 runtime/syntax/eviews.vim create mode 100644 runtime/syntax/exim.vim create mode 100644 runtime/syntax/expect.vim create mode 100644 runtime/syntax/exports.vim create mode 100644 runtime/syntax/falcon.vim create mode 100644 runtime/syntax/fan.vim create mode 100644 runtime/syntax/fasm.vim create mode 100644 runtime/syntax/fdcc.vim create mode 100644 runtime/syntax/fetchmail.vim create mode 100644 runtime/syntax/fgl.vim create mode 100644 runtime/syntax/flexwiki.vim create mode 100644 runtime/syntax/focexec.vim create mode 100644 runtime/syntax/form.vim create mode 100644 runtime/syntax/forth.vim create mode 100644 runtime/syntax/fortran.vim create mode 100644 runtime/syntax/foxpro.vim create mode 100644 runtime/syntax/framescript.vim create mode 100644 runtime/syntax/freebasic.vim create mode 100644 runtime/syntax/fstab.vim create mode 100644 runtime/syntax/fvwm.vim create mode 100644 runtime/syntax/fvwm2m4.vim create mode 100644 runtime/syntax/gdb.vim create mode 100644 runtime/syntax/gdmo.vim create mode 100644 runtime/syntax/gedcom.vim create mode 100644 runtime/syntax/git.vim create mode 100644 runtime/syntax/gitcommit.vim create mode 100644 runtime/syntax/gitconfig.vim create mode 100644 runtime/syntax/gitolite.vim create mode 100644 runtime/syntax/gitrebase.vim create mode 100644 runtime/syntax/gitsendemail.vim create mode 100644 runtime/syntax/gkrellmrc.vim create mode 100644 runtime/syntax/gnash.vim create mode 100644 runtime/syntax/gnuplot.vim create mode 100644 runtime/syntax/gp.vim create mode 100644 runtime/syntax/gpg.vim create mode 100644 runtime/syntax/gprof.vim create mode 100644 runtime/syntax/grads.vim create mode 100644 runtime/syntax/gretl.vim create mode 100644 runtime/syntax/groff.vim create mode 100644 runtime/syntax/groovy.vim create mode 100644 runtime/syntax/group.vim create mode 100644 runtime/syntax/grub.vim create mode 100644 runtime/syntax/gsp.vim create mode 100644 runtime/syntax/gtkrc.vim create mode 100644 runtime/syntax/haml.vim create mode 100644 runtime/syntax/hamster.vim create mode 100644 runtime/syntax/haskell.vim create mode 100644 runtime/syntax/haste.vim create mode 100644 runtime/syntax/hastepreproc.vim create mode 100644 runtime/syntax/hb.vim create mode 100644 runtime/syntax/help.vim create mode 100644 runtime/syntax/hercules.vim create mode 100644 runtime/syntax/hex.vim create mode 100644 runtime/syntax/hgcommit.vim create mode 100644 runtime/syntax/hitest.vim create mode 100644 runtime/syntax/hog.vim create mode 100644 runtime/syntax/hostconf.vim create mode 100644 runtime/syntax/hostsaccess.vim create mode 100644 runtime/syntax/html.vim create mode 100644 runtime/syntax/htmlcheetah.vim create mode 100644 runtime/syntax/htmldjango.vim create mode 100644 runtime/syntax/htmlm4.vim create mode 100644 runtime/syntax/htmlos.vim create mode 100644 runtime/syntax/ia64.vim create mode 100644 runtime/syntax/ibasic.vim create mode 100644 runtime/syntax/icemenu.vim create mode 100644 runtime/syntax/icon.vim create mode 100644 runtime/syntax/idl.vim create mode 100644 runtime/syntax/idlang.vim create mode 100644 runtime/syntax/indent.vim create mode 100644 runtime/syntax/inform.vim create mode 100644 runtime/syntax/initex.vim create mode 100644 runtime/syntax/initng.vim create mode 100644 runtime/syntax/inittab.vim create mode 100644 runtime/syntax/ipfilter.vim create mode 100644 runtime/syntax/ishd.vim create mode 100644 runtime/syntax/iss.vim create mode 100644 runtime/syntax/ist.vim create mode 100644 runtime/syntax/j.vim create mode 100644 runtime/syntax/jal.vim create mode 100644 runtime/syntax/jam.vim create mode 100644 runtime/syntax/jargon.vim create mode 100644 runtime/syntax/java.vim create mode 100644 runtime/syntax/javacc.vim create mode 100644 runtime/syntax/javascript.vim create mode 100644 runtime/syntax/jess.vim create mode 100644 runtime/syntax/jgraph.vim create mode 100644 runtime/syntax/jovial.vim create mode 100644 runtime/syntax/jproperties.vim create mode 100644 runtime/syntax/json.vim create mode 100644 runtime/syntax/jsp.vim create mode 100644 runtime/syntax/kconfig.vim create mode 100644 runtime/syntax/kivy.vim create mode 100644 runtime/syntax/kix.vim create mode 100644 runtime/syntax/kscript.vim create mode 100644 runtime/syntax/kwt.vim create mode 100644 runtime/syntax/lace.vim create mode 100644 runtime/syntax/latte.vim create mode 100644 runtime/syntax/ld.vim create mode 100644 runtime/syntax/ldapconf.vim create mode 100644 runtime/syntax/ldif.vim create mode 100644 runtime/syntax/lex.vim create mode 100644 runtime/syntax/lftp.vim create mode 100644 runtime/syntax/lhaskell.vim create mode 100644 runtime/syntax/libao.vim create mode 100644 runtime/syntax/lifelines.vim create mode 100644 runtime/syntax/lilo.vim create mode 100644 runtime/syntax/limits.vim create mode 100644 runtime/syntax/liquid.vim create mode 100644 runtime/syntax/lisp.vim create mode 100644 runtime/syntax/lite.vim create mode 100644 runtime/syntax/litestep.vim create mode 100644 runtime/syntax/loginaccess.vim create mode 100644 runtime/syntax/logindefs.vim create mode 100644 runtime/syntax/logtalk.vim create mode 100644 runtime/syntax/lotos.vim create mode 100644 runtime/syntax/lout.vim create mode 100644 runtime/syntax/lpc.vim create mode 100644 runtime/syntax/lprolog.vim create mode 100644 runtime/syntax/lscript.vim create mode 100644 runtime/syntax/lsl.vim create mode 100644 runtime/syntax/lss.vim create mode 100644 runtime/syntax/lua.vim create mode 100644 runtime/syntax/lynx.vim create mode 100644 runtime/syntax/m4.vim create mode 100644 runtime/syntax/mail.vim create mode 100644 runtime/syntax/mailaliases.vim create mode 100644 runtime/syntax/mailcap.vim create mode 100644 runtime/syntax/make.vim create mode 100644 runtime/syntax/mallard.vim create mode 100644 runtime/syntax/man.vim create mode 100644 runtime/syntax/manconf.vim create mode 100644 runtime/syntax/manual.vim create mode 100644 runtime/syntax/maple.vim create mode 100644 runtime/syntax/markdown.vim create mode 100644 runtime/syntax/masm.vim create mode 100644 runtime/syntax/mason.vim create mode 100644 runtime/syntax/master.vim create mode 100644 runtime/syntax/matlab.vim create mode 100644 runtime/syntax/maxima.vim create mode 100644 runtime/syntax/mel.vim create mode 100644 runtime/syntax/messages.vim create mode 100644 runtime/syntax/mf.vim create mode 100644 runtime/syntax/mgl.vim create mode 100644 runtime/syntax/mgp.vim create mode 100644 runtime/syntax/mib.vim create mode 100644 runtime/syntax/mix.vim create mode 100644 runtime/syntax/mma.vim create mode 100644 runtime/syntax/mmix.vim create mode 100644 runtime/syntax/mmp.vim create mode 100644 runtime/syntax/modconf.vim create mode 100644 runtime/syntax/model.vim create mode 100644 runtime/syntax/modsim3.vim create mode 100644 runtime/syntax/modula2.vim create mode 100644 runtime/syntax/modula3.vim create mode 100644 runtime/syntax/monk.vim create mode 100644 runtime/syntax/moo.vim create mode 100644 runtime/syntax/mp.vim create mode 100644 runtime/syntax/mplayerconf.vim create mode 100644 runtime/syntax/mrxvtrc.vim create mode 100644 runtime/syntax/msidl.vim create mode 100644 runtime/syntax/msmessages.vim create mode 100644 runtime/syntax/msql.vim create mode 100644 runtime/syntax/mupad.vim create mode 100644 runtime/syntax/mush.vim create mode 100644 runtime/syntax/muttrc.vim create mode 100644 runtime/syntax/mysql.vim create mode 100644 runtime/syntax/named.vim create mode 100644 runtime/syntax/nanorc.vim create mode 100644 runtime/syntax/nasm.vim create mode 100644 runtime/syntax/nastran.vim create mode 100644 runtime/syntax/natural.vim create mode 100644 runtime/syntax/ncf.vim create mode 100644 runtime/syntax/netrc.vim create mode 100644 runtime/syntax/netrw.vim create mode 100644 runtime/syntax/ninja.vim create mode 100644 runtime/syntax/nosyntax.vim create mode 100644 runtime/syntax/nqc.vim create mode 100644 runtime/syntax/nroff.vim create mode 100644 runtime/syntax/nsis.vim create mode 100644 runtime/syntax/obj.vim create mode 100644 runtime/syntax/objc.vim create mode 100644 runtime/syntax/objcpp.vim create mode 100644 runtime/syntax/ocaml.vim create mode 100644 runtime/syntax/occam.vim create mode 100644 runtime/syntax/omnimark.vim create mode 100644 runtime/syntax/openroad.vim create mode 100644 runtime/syntax/opl.vim create mode 100644 runtime/syntax/ora.vim create mode 100644 runtime/syntax/pamconf.vim create mode 100644 runtime/syntax/papp.vim create mode 100644 runtime/syntax/pascal.vim create mode 100644 runtime/syntax/passwd.vim create mode 100644 runtime/syntax/pcap.vim create mode 100644 runtime/syntax/pccts.vim create mode 100644 runtime/syntax/pdf.vim create mode 100644 runtime/syntax/perl.vim create mode 100644 runtime/syntax/perl6.vim create mode 100644 runtime/syntax/pf.vim create mode 100644 runtime/syntax/pfmain.vim create mode 100644 runtime/syntax/php.vim create mode 100644 runtime/syntax/phtml.vim create mode 100644 runtime/syntax/pic.vim create mode 100644 runtime/syntax/pike.vim create mode 100644 runtime/syntax/pilrc.vim create mode 100644 runtime/syntax/pine.vim create mode 100644 runtime/syntax/pinfo.vim create mode 100644 runtime/syntax/plaintex.vim create mode 100644 runtime/syntax/pli.vim create mode 100644 runtime/syntax/plm.vim create mode 100644 runtime/syntax/plp.vim create mode 100644 runtime/syntax/plsql.vim create mode 100644 runtime/syntax/po.vim create mode 100644 runtime/syntax/pod.vim create mode 100644 runtime/syntax/postscr.vim create mode 100644 runtime/syntax/pov.vim create mode 100644 runtime/syntax/povini.vim create mode 100644 runtime/syntax/ppd.vim create mode 100644 runtime/syntax/ppwiz.vim create mode 100644 runtime/syntax/prescribe.vim create mode 100644 runtime/syntax/privoxy.vim create mode 100644 runtime/syntax/procmail.vim create mode 100644 runtime/syntax/progress.vim create mode 100644 runtime/syntax/prolog.vim create mode 100644 runtime/syntax/promela.vim create mode 100644 runtime/syntax/proto.vim create mode 100644 runtime/syntax/protocols.vim create mode 100644 runtime/syntax/psf.vim create mode 100644 runtime/syntax/ptcap.vim create mode 100644 runtime/syntax/purifylog.vim create mode 100644 runtime/syntax/pyrex.vim create mode 100644 runtime/syntax/python.vim create mode 100644 runtime/syntax/qf.vim create mode 100644 runtime/syntax/quake.vim create mode 100644 runtime/syntax/r.vim create mode 100644 runtime/syntax/racc.vim create mode 100644 runtime/syntax/radiance.vim create mode 100644 runtime/syntax/ratpoison.vim create mode 100644 runtime/syntax/rc.vim create mode 100644 runtime/syntax/rcs.vim create mode 100644 runtime/syntax/rcslog.vim create mode 100644 runtime/syntax/readline.vim create mode 100644 runtime/syntax/rebol.vim create mode 100644 runtime/syntax/redif.vim create mode 100644 runtime/syntax/registry.vim create mode 100644 runtime/syntax/remind.vim create mode 100644 runtime/syntax/resolv.vim create mode 100644 runtime/syntax/reva.vim create mode 100644 runtime/syntax/rexx.vim create mode 100644 runtime/syntax/rhelp.vim create mode 100644 runtime/syntax/rib.vim create mode 100644 runtime/syntax/rmd.vim create mode 100644 runtime/syntax/rnc.vim create mode 100644 runtime/syntax/rng.vim create mode 100644 runtime/syntax/rnoweb.vim create mode 100644 runtime/syntax/robots.vim create mode 100644 runtime/syntax/rpcgen.vim create mode 100644 runtime/syntax/rpl.vim create mode 100644 runtime/syntax/rrst.vim create mode 100644 runtime/syntax/rst.vim create mode 100644 runtime/syntax/rtf.vim create mode 100644 runtime/syntax/ruby.vim create mode 100644 runtime/syntax/samba.vim create mode 100644 runtime/syntax/sas.vim create mode 100644 runtime/syntax/sass.vim create mode 100644 runtime/syntax/sather.vim create mode 100644 runtime/syntax/scheme.vim create mode 100644 runtime/syntax/scilab.vim create mode 100644 runtime/syntax/screen.vim create mode 100644 runtime/syntax/scss.vim create mode 100644 runtime/syntax/sd.vim create mode 100644 runtime/syntax/sdc.vim create mode 100644 runtime/syntax/sdl.vim create mode 100644 runtime/syntax/sed.vim create mode 100644 runtime/syntax/sendpr.vim create mode 100644 runtime/syntax/sensors.vim create mode 100644 runtime/syntax/services.vim create mode 100644 runtime/syntax/setserial.vim create mode 100644 runtime/syntax/sgml.vim create mode 100644 runtime/syntax/sgmldecl.vim create mode 100644 runtime/syntax/sgmllnx.vim create mode 100644 runtime/syntax/sh.vim create mode 100644 runtime/syntax/sicad.vim create mode 100644 runtime/syntax/sieve.vim create mode 100644 runtime/syntax/simula.vim create mode 100644 runtime/syntax/sinda.vim create mode 100644 runtime/syntax/sindacmp.vim create mode 100644 runtime/syntax/sindaout.vim create mode 100644 runtime/syntax/sisu.vim create mode 100644 runtime/syntax/skill.vim create mode 100644 runtime/syntax/sl.vim create mode 100644 runtime/syntax/slang.vim create mode 100644 runtime/syntax/slice.vim create mode 100644 runtime/syntax/slpconf.vim create mode 100644 runtime/syntax/slpreg.vim create mode 100644 runtime/syntax/slpspi.vim create mode 100644 runtime/syntax/slrnrc.vim create mode 100644 runtime/syntax/slrnsc.vim create mode 100644 runtime/syntax/sm.vim create mode 100644 runtime/syntax/smarty.vim create mode 100644 runtime/syntax/smcl.vim create mode 100644 runtime/syntax/smil.vim create mode 100644 runtime/syntax/smith.vim create mode 100644 runtime/syntax/sml.vim create mode 100644 runtime/syntax/snnsnet.vim create mode 100644 runtime/syntax/snnspat.vim create mode 100644 runtime/syntax/snnsres.vim create mode 100644 runtime/syntax/snobol4.vim create mode 100644 runtime/syntax/spec.vim create mode 100644 runtime/syntax/specman.vim create mode 100644 runtime/syntax/spice.vim create mode 100644 runtime/syntax/splint.vim create mode 100644 runtime/syntax/spup.vim create mode 100644 runtime/syntax/spyce.vim create mode 100644 runtime/syntax/sql.vim create mode 100644 runtime/syntax/sqlanywhere.vim create mode 100644 runtime/syntax/sqlforms.vim create mode 100644 runtime/syntax/sqlhana.vim create mode 100644 runtime/syntax/sqlinformix.vim create mode 100644 runtime/syntax/sqlj.vim create mode 100644 runtime/syntax/sqloracle.vim create mode 100644 runtime/syntax/sqr.vim create mode 100644 runtime/syntax/squid.vim create mode 100644 runtime/syntax/sshconfig.vim create mode 100644 runtime/syntax/sshdconfig.vim create mode 100644 runtime/syntax/st.vim create mode 100644 runtime/syntax/stata.vim create mode 100644 runtime/syntax/stp.vim create mode 100644 runtime/syntax/strace.vim create mode 100644 runtime/syntax/sudoers.vim create mode 100644 runtime/syntax/svg.vim create mode 100644 runtime/syntax/svn.vim create mode 100644 runtime/syntax/syncolor.vim create mode 100644 runtime/syntax/synload.vim create mode 100644 runtime/syntax/syntax.vim create mode 100644 runtime/syntax/sysctl.vim create mode 100644 runtime/syntax/systemverilog.vim create mode 100644 runtime/syntax/tads.vim create mode 100644 runtime/syntax/tags.vim create mode 100644 runtime/syntax/tak.vim create mode 100644 runtime/syntax/takcmp.vim create mode 100644 runtime/syntax/takout.vim create mode 100644 runtime/syntax/tar.vim create mode 100644 runtime/syntax/taskdata.vim create mode 100644 runtime/syntax/taskedit.vim create mode 100644 runtime/syntax/tasm.vim create mode 100644 runtime/syntax/tcl.vim create mode 100644 runtime/syntax/tcsh.vim create mode 100644 runtime/syntax/terminfo.vim create mode 100644 runtime/syntax/tex.vim create mode 100644 runtime/syntax/texinfo.vim create mode 100644 runtime/syntax/texmf.vim create mode 100644 runtime/syntax/tf.vim create mode 100644 runtime/syntax/tidy.vim create mode 100644 runtime/syntax/tilde.vim create mode 100644 runtime/syntax/tli.vim create mode 100644 runtime/syntax/tpp.vim create mode 100644 runtime/syntax/trasys.vim create mode 100644 runtime/syntax/treetop.vim create mode 100644 runtime/syntax/trustees.vim create mode 100644 runtime/syntax/tsalt.vim create mode 100644 runtime/syntax/tsscl.vim create mode 100644 runtime/syntax/tssgm.vim create mode 100644 runtime/syntax/tssop.vim create mode 100644 runtime/syntax/tt2.vim create mode 100644 runtime/syntax/tt2html.vim create mode 100644 runtime/syntax/tt2js.vim create mode 100644 runtime/syntax/uc.vim create mode 100644 runtime/syntax/udevconf.vim create mode 100644 runtime/syntax/udevperm.vim create mode 100644 runtime/syntax/udevrules.vim create mode 100644 runtime/syntax/uil.vim create mode 100644 runtime/syntax/updatedb.vim create mode 100644 runtime/syntax/upstart.vim create mode 100644 runtime/syntax/upstreamdat.vim create mode 100644 runtime/syntax/upstreaminstalllog.vim create mode 100644 runtime/syntax/upstreamlog.vim create mode 100644 runtime/syntax/usserverlog.vim create mode 100644 runtime/syntax/usw2kagtlog.vim create mode 100644 runtime/syntax/valgrind.vim create mode 100644 runtime/syntax/vb.vim create mode 100644 runtime/syntax/vera.vim create mode 100644 runtime/syntax/verilog.vim create mode 100644 runtime/syntax/verilogams.vim create mode 100644 runtime/syntax/vgrindefs.vim create mode 100644 runtime/syntax/vhdl.vim create mode 100644 runtime/syntax/vim.vim create mode 100644 runtime/syntax/viminfo.vim create mode 100644 runtime/syntax/virata.vim create mode 100644 runtime/syntax/vmasm.vim create mode 100644 runtime/syntax/voscm.vim create mode 100644 runtime/syntax/vrml.vim create mode 100644 runtime/syntax/vroom.vim create mode 100644 runtime/syntax/vsejcl.vim create mode 100644 runtime/syntax/wdiff.vim create mode 100644 runtime/syntax/web.vim create mode 100644 runtime/syntax/webmacro.vim create mode 100644 runtime/syntax/wget.vim create mode 100644 runtime/syntax/whitespace.vim create mode 100644 runtime/syntax/winbatch.vim create mode 100644 runtime/syntax/wml.vim create mode 100644 runtime/syntax/wsh.vim create mode 100644 runtime/syntax/wsml.vim create mode 100644 runtime/syntax/wvdial.vim create mode 100644 runtime/syntax/xbl.vim create mode 100644 runtime/syntax/xdefaults.vim create mode 100644 runtime/syntax/xf86conf.vim create mode 100644 runtime/syntax/xhtml.vim create mode 100644 runtime/syntax/xinetd.vim create mode 100644 runtime/syntax/xkb.vim create mode 100644 runtime/syntax/xmath.vim create mode 100644 runtime/syntax/xml.vim create mode 100644 runtime/syntax/xmodmap.vim create mode 100644 runtime/syntax/xpm.vim create mode 100644 runtime/syntax/xpm2.vim create mode 100644 runtime/syntax/xquery.vim create mode 100644 runtime/syntax/xs.vim create mode 100644 runtime/syntax/xsd.vim create mode 100644 runtime/syntax/xslt.vim create mode 100644 runtime/syntax/xxd.vim create mode 100644 runtime/syntax/yacc.vim create mode 100644 runtime/syntax/yaml.vim create mode 100644 runtime/syntax/z8a.vim create mode 100644 runtime/syntax/zimbu.vim create mode 100644 runtime/syntax/zsh.vim create mode 100644 runtime/tools/README.txt create mode 100644 runtime/tools/blink.c create mode 100644 runtime/tools/ccfilter.1 create mode 100644 runtime/tools/ccfilter.c create mode 100644 runtime/tools/ccfilter_README.txt create mode 100755 runtime/tools/efm_filter.pl create mode 100644 runtime/tools/efm_filter.txt create mode 100755 runtime/tools/efm_perl.pl create mode 100755 runtime/tools/mve.awk create mode 100644 runtime/tools/mve.txt create mode 100755 runtime/tools/pltags.pl create mode 100755 runtime/tools/ref create mode 100644 runtime/tools/shtags.1 create mode 100755 runtime/tools/shtags.pl create mode 100644 runtime/tools/unicode.vim create mode 100755 runtime/tools/vim132 create mode 100644 runtime/tools/vim_vs_net.cmd create mode 100755 runtime/tools/vimm create mode 100755 runtime/tools/vimspell.sh create mode 100644 runtime/tools/vimspell.txt create mode 100644 runtime/tools/xcmdsrv_client.c create mode 100644 runtime/vimrc_example.vim diff --git a/runtime/autoload/README.txt b/runtime/autoload/README.txt new file mode 100644 index 0000000000..3b18d3dde5 --- /dev/null +++ b/runtime/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/runtime/autoload/ada.vim b/runtime/autoload/ada.vim new file mode 100644 index 0000000000..1f8234a575 --- /dev/null +++ b/runtime/autoload/ada.vim @@ -0,0 +1,635 @@ +"------------------------------------------------------------------------------ +" 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 +let s:keepcpo= &cpo +set cpo&vim + +" 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 + +let &cpo = s:keepcpo +unlet s:keepcpo + +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/runtime/autoload/adacomplete.vim b/runtime/autoload/adacomplete.vim new file mode 100644 index 0000000000..2659f51d5c --- /dev/null +++ b/runtime/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/runtime/autoload/ccomplete.vim b/runtime/autoload/ccomplete.vim new file mode 100644 index 0000000000..d5bfa076a9 --- /dev/null +++ b/runtime/autoload/ccomplete.vim @@ -0,0 +1,610 @@ +" Vim completion script +" Language: C +" Maintainer: Bram Moolenaar +" Last Change: 2012 Jun 20 + +let s:cpo_save = &cpo +set cpo&vim + +" 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! keepj noautocmd ' . 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 + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/autoload/clojurecomplete.vim b/runtime/autoload/clojurecomplete.vim new file mode 100644 index 0000000000..708bb31104 --- /dev/null +++ b/runtime/autoload/clojurecomplete.vim @@ -0,0 +1,22 @@ +" Vim completion script +" Language: Clojure +" Maintainer: Sung Pae +" URL: https://github.com/guns/vim-clojure-static +" License: Same as Vim +" Last Change: 27 March 2014 + +" -*- COMPLETION WORDS -*- +" Generated from https://github.com/guns/vim-clojure-static/blob/vim-release-010/clj/src/vim_clojure_static/generate.clj +" Clojure version 1.6.0 +let s:words = ["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-readably*","*read-eval*","*source-path*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods",".","..","/","<","<=","=","==",">",">=","EMPTY-NODE","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc!","assoc","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","booleans","bound-fn","bound-fn*","bound?","butlast","byte","byte-array","bytes","case","cast","catch","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","concat","cond","cond->","cond->>","condp","conj!","conj","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","def","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj!","disj","dissoc!","dissoc","distinct","distinct?","do","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","doubles","drop","drop-last","drop-while","empty","empty?","ensure","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","finally","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","identical?","identity","if","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","init-proxy","instance?","int","int-array","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","monitor-enter","monitor-exit","munge","name","namespace","namespace-munge","neg?","new","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop!","pop","pop-thread-bindings","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","quot","quote","rand","rand-int","rand-nth","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","realized?","record?","recur","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seque","sequence","sequential?","set!","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","slurp","some","some->","some->>","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","symbol","symbol?","sync","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","throw","time","to-array","to-array-2d","trampoline","transient","tree-seq","true?","try","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","unsigned-bit-shift-right","update-in","update-proxy","use","val","vals","var","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"] + +" Simple word completion for special forms and public vars in clojure.core +function! clojurecomplete#Complete(findstart, base) + if a:findstart + return searchpos('\<', 'bnW', line('.'))[1] - 1 + else + return { 'words': filter(copy(s:words), 'v:val =~# "\\V\\^' . a:base . '"') } + endif +endfunction + +" vim:sts=8:sw=8:ts=8:noet diff --git a/runtime/autoload/csscomplete.vim b/runtime/autoload/csscomplete.vim new file mode 100644 index 0000000000..9eebb87d5b --- /dev/null +++ b/runtime/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/runtime/autoload/decada.vim b/runtime/autoload/decada.vim new file mode 100644 index 0000000000..7741ff0572 --- /dev/null +++ b/runtime/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/runtime/autoload/getscript.vim b/runtime/autoload/getscript.vim new file mode 100644 index 0000000000..d50bc2edc0 --- /dev/null +++ b/runtime/autoload/getscript.vim @@ -0,0 +1,667 @@ +" --------------------------------------------------------------------- +" getscript.vim +" Author: Charles E. Campbell +" Date: Jan 21, 2014 +" Version: 36 +" 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= "v36" +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 + +" set up default scriptaddr address +if !exists("g:GetLatestVimScripts_scriptaddr") + let g:GetLatestVimScripts_scriptaddr = 'http://vim.sourceforge.net/script.php?script_id=' +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 = g:GetLatestVimScripts_scriptaddr.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 + " -------------------------------------------------------------------------- +" call Decho("checking if plugin requested autoinstall: doautoinstall=".doautoinstall) + 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 = fnameescape(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 "sil !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 "sil !gunzip ".shellescape(sname) + let sname= substitute(sname,'\.gz$','','') +" call Decho("decompress: new sname<".sname."> after gunzip") + elseif sname =~ '\.xz$' +" call Decho("decompress: attempt to unxz ".sname) + exe "sil !unxz ".shellescape(sname) + let sname= substitute(sname,'\.xz$','','') +" call Decho("decompress: new sname<".sname."> after unxz") + 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 =~ '\.tgz$' +" call Decho("dearchive: attempt to untar+gunzip ".sname) + exe "silent !tar -zxvf ".shellescape(sname) + elseif sname =~ '\.taz$' +" call Decho("dearchive: attempt to untar+uncompress ".sname) + exe "silent !tar -Zxvf ".shellescape(sname) + elseif sname =~ '\.tbz$' +" call Decho("dearchive: attempt to untar+bunzip2 ".sname) + exe "silent !tar -jxvf ".shellescape(sname) + elseif sname =~ '\.txz$' +" call Decho("dearchive: attempt to untar+xz ".sname) + exe "silent !tar -Jxvf ".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/runtime/autoload/gnat.vim b/runtime/autoload/gnat.vim new file mode 100644 index 0000000000..0def6723b2 --- /dev/null +++ b/runtime/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/runtime/autoload/gzip.vim b/runtime/autoload/gzip.vim new file mode 100644 index 0000000000..1245fdddc9 --- /dev/null +++ b/runtime/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/runtime/autoload/htmlcomplete.vim b/runtime/autoload/htmlcomplete.vim new file mode 100644 index 0000000000..984ba8b58e --- /dev/null +++ b/runtime/autoload/htmlcomplete.vim @@ -0,0 +1,808 @@ +" Vim completion script +" Language: HTML and XHTML +" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) +" Last Change: 2014 Jun 20 + +" Distinguish between HTML versions. +" To use with other HTML versions add another "elseif" condition to match +" proper DOCTYPE. +function! htmlcomplete#DetectOmniFlavor() + if &filetype == 'xhtml' + let b:html_omni_flavor = 'xhtml10s' + else + let b:html_omni_flavor = 'html401t' + endif + let i = 1 + let line = "" + while i < 10 && i < line("$") + let line = getline(i) + if line =~ '' + let b:html_omni_flavor = 'html40' + endif + if line =~ '\' + let b:html_omni_flavor .= 't' + elseif line =~ '\' + let b:html_omni_flavor .= 'f' + else + let b:html_omni_flavor .= 's' + endif + endif + endif +endfunction + +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 ') + if style_start > 0 && style_end > 0 + let buf_styles = getline(style_start + 1, style_end - 1) + for a_style in buf_styles + if index(style, a_style) == -1 + if diff_style_start == 0 + if a_style =~ '\\_s\+.*id='oneCharWidth'.*\_s\+.*id='oneInputWidth'.*\_s\+.*id='oneEmWidth'\)\?\zs/d_ + $ + ??,$d_ + let temp = getline(1,'$') + " clean out id on the main content container because we already set it on + " the table + let temp[0] = substitute(temp[0], " id='vimCodeElement[^']*'", "", "") + " undo deletion of start and end part + " so we can later save the file as valid html + " TODO: restore using grabbed lines if undolevel is 1? + normal! 2u + if s:settings.use_css + call add(html, '
') + elseif s:settings.use_xhtml + call add(html, '
') + else + call add(html, '
') + endif + let html += temp + call add(html, '
') + + " Close this buffer + " TODO: the comment above says we're going to allow saving the file + " later...but here we discard it? + quit! + endfor + + let html[body_line_num] = body_line + + call add(html, '') + call add(html, '') + call add(html, s:body_end_line) + call add(html, '') + + " The generated HTML is admittedly ugly and takes a LONG time to fold. + " Make sure the user doesn't do syntax folding when loading a generated file, + " using a modeline. + call add(html, '') + + let i = 1 + let name = "Diff" . (s:settings.use_xhtml ? ".xhtml" : ".html") + " Find an unused file name if current file name is already in use + while filereadable(name) + let name = substitute(name, '\d*\.x\?html$', '', '') . i . '.' . fnamemodify(copy(name), ":t:e") + let i += 1 + endwhile + exe "topleft new " . name + setlocal modifiable + + " just in case some user autocmd creates content in the new buffer, make sure + " it is empty before proceeding + %d + + " set the fileencoding to match the charset we'll be using + let &l:fileencoding=s:settings.vim_encoding + + " According to http://www.w3.org/TR/html4/charset.html#doc-char-set, the byte + " order mark is highly recommend on the web when using multibyte encodings. But, + " it is not a good idea to include it on UTF-8 files. Otherwise, let Vim + " determine when it is actually inserted. + if s:settings.vim_encoding == 'utf-8' + setlocal nobomb + else + setlocal bomb + endif + + call append(0, html) + + if len(style) > 0 + 1 + let style_start = search('^')-1 + + " add required javascript in reverse order so we can just call append again + " and again without adjusting {{{ + + " insert script closing tag + call append(style_start, [ + \ '', + \ s:settings.use_xhtml ? '//]]>' : '-->', + \ "" + \ ]) + + " insert script which corrects the size of small input elements in + " prevent_copy mode. See 2html.vim for details on why this is needed and how + " it works. + if !empty(s:settings.prevent_copy) + call append(style_start, [ + \ '', + \ '/* simulate a "ch" unit by asking the browser how big a zero character is */', + \ 'function FixCharWidth() {', + \ ' /* get the hidden element which gives the width of a single character */', + \ ' var goodWidth = document.getElementById("oneCharWidth").clientWidth;', + \ ' /* get all input elements, we''ll filter on class later */', + \ ' var inputTags = document.getElementsByTagName("input");', + \ ' var ratio = 5;', + \ ' var inputWidth = document.getElementById("oneInputWidth").clientWidth;', + \ ' var emWidth = document.getElementById("oneEmWidth").clientWidth;', + \ ' if (inputWidth > goodWidth) {', + \ ' while (ratio < 100*goodWidth/emWidth && ratio < 100) {', + \ ' ratio += 5;', + \ ' }', + \ ' document.getElementById("vimCodeElement'.s:settings.id_suffix.'").className = "em"+ratio;', + \ ' }', + \ '}' + \ ]) + endif + " + " insert javascript to get IDs from line numbers, and to open a fold before + " jumping to any lines contained therein + call append(style_start, [ + \ " /* Always jump to new location even if the line was hidden inside a fold, or", + \ " * we corrected the raw number to a line ID.", + \ " */", + \ " if (lineElem) {", + \ " lineElem.scrollIntoView(true);", + \ " }", + \ " return true;", + \ "}", + \ "if ('onhashchange' in window) {", + \ " window.onhashchange = JumpToLine;", + \ "}" + \ ]) + if s:settings.dynamic_folds + call append(style_start, [ + \ "", + \ " /* navigate upwards in the DOM tree to open all folds containing the line */", + \ " var node = lineElem;", + \ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')", + \ " {", + \ " if (node.className == 'closed-fold')", + \ " {", + \ " /* toggle open the fold ID (remove window ID) */", + \ " toggleFold(node.id.substr(4));", + \ " }", + \ " node = node.parentNode;", + \ " }", + \ ]) + endif + call append(style_start, [ + \ "", + \ "/* function to open any folds containing a jumped-to line before jumping to it */", + \ "function JumpToLine()", + \ "{", + \ " var lineNum;", + \ " lineNum = window.location.hash;", + \ " lineNum = lineNum.substr(1); /* strip off '#' */", + \ "", + \ " if (lineNum.indexOf('L') == -1) {", + \ " lineNum = 'L'+lineNum;", + \ " }", + \ " if (lineNum.indexOf('W') == -1) {", + \ " lineNum = 'W1'+lineNum;", + \ " }", + \ " lineElem = document.getElementById(lineNum);" + \ ]) + + " Insert javascript to toggle matching folds open and closed in all windows, + " if dynamic folding is active. + if s:settings.dynamic_folds + call append(style_start, [ + \ " function toggleFold(objID)", + \ " {", + \ " for (win_num = 1; win_num <= ".len(a:buf_list)."; win_num++)", + \ " {", + \ " var fold;", + \ ' fold = document.getElementById("win"+win_num+objID);', + \ " if(fold.className == 'closed-fold')", + \ " {", + \ " fold.className = 'open-fold';", + \ " }", + \ " else if (fold.className == 'open-fold')", + \ " {", + \ " fold.className = 'closed-fold';", + \ " }", + \ " }", + \ " }", + \ ]) + endif + + " insert script tag; javascript is always needed for the line number + " normalization for URL hashes + call append(style_start, [ + \ " + +See |mysyntaxfile-add| for installing script languages permanently. + + +APACHE *apache.vim* *ft-apache-syntax* + +The apache syntax file provides syntax highlighting depending on Apache HTTP +server version, by default for 1.3.x. Set "apache_version" to Apache version +(as a string) to get highlighting for another version. Example: > + + :let apache_version = "2.0" +< + + *asm.vim* *asmh8300.vim* *nasm.vim* *masm.vim* *asm68k* +ASSEMBLY *ft-asm-syntax* *ft-asmh8300-syntax* *ft-nasm-syntax* + *ft-masm-syntax* *ft-asm68k-syntax* *fasm.vim* + +Files matching "*.i" could be Progress or Assembly. If the automatic detection +doesn't work for you, or you don't edit Progress at all, use this in your +startup vimrc: > + :let filetype_i = "asm" +Replace "asm" with the type of assembly you use. + +There are many types of assembly languages that all use the same file name +extensions. Therefore you will have to select the type yourself, or add a +line in the assembly file that Vim will recognize. Currently these syntax +files are included: + asm GNU assembly (the default) + asm68k Motorola 680x0 assembly + asmh8300 Hitachi H-8300 version of GNU assembly + ia64 Intel Itanium 64 + fasm Flat assembly (http://flatassembler.net) + masm Microsoft assembly (probably works for any 80x86) + nasm Netwide assembly + tasm Turbo Assembly (with opcodes 80x86 up to Pentium, and + MMX) + pic PIC assembly (currently for PIC16F84) + +The most flexible is to add a line in your assembly file containing: > + asmsyntax=nasm +Replace "nasm" with the name of the real assembly syntax. This line must be +one of the first five lines in the file. No non-white text must be +immediately before or after this text. Note that specifying asmsyntax=foo is +equivalent to setting ft=foo in a |modeline|, and that in case of a conflict +between the two settings the one from the modeline will take precedence (in +particular, if you have ft=asm in the modeline, you will get the GNU syntax +highlighting regardless of what is specified as asmsyntax). + +The syntax type can always be overruled for a specific buffer by setting the +b:asmsyntax variable: > + :let b:asmsyntax = "nasm" + +If b:asmsyntax is not set, either automatically or by hand, then the value of +the global variable asmsyntax is used. This can be seen as a default assembly +language: > + :let asmsyntax = "nasm" + +As a last resort, if nothing is defined, the "asm" syntax is used. + + +Netwide assembler (nasm.vim) optional highlighting ~ + +To enable a feature: > + :let {variable}=1|set syntax=nasm +To disable a feature: > + :unlet {variable} |set syntax=nasm + +Variable Highlight ~ +nasm_loose_syntax unofficial parser allowed syntax not as Error + (parser dependent; not recommended) +nasm_ctx_outside_macro contexts outside macro not as Error +nasm_no_warn potentially risky syntax not as ToDo + + +ASPPERL and ASPVBS *ft-aspperl-syntax* *ft-aspvbs-syntax* + +*.asp and *.asa files could be either Perl or Visual Basic script. Since it's +hard to detect this you can set two global variables to tell Vim what you are +using. For Perl script use: > + :let g:filetype_asa = "aspperl" + :let g:filetype_asp = "aspperl" +For Visual Basic use: > + :let g:filetype_asa = "aspvbs" + :let g:filetype_asp = "aspvbs" + + +BAAN *baan.vim* *baan-syntax* + +The baan.vim gives syntax support for BaanC of release BaanIV upto SSA ERP LN +for both 3 GL and 4 GL programming. Large number of standard defines/constants +are supported. + +Some special violation of coding standards will be signalled when one specify +in ones |.vimrc|: > + let baan_code_stds=1 + +*baan-folding* + +Syntax folding can be enabled at various levels through the variables +mentioned below (Set those in your |.vimrc|). The more complex folding on +source blocks and SQL can be CPU intensive. + +To allow any folding and enable folding at function level use: > + let baan_fold=1 +Folding can be enabled at source block level as if, while, for ,... The +indentation preceding the begin/end keywords has to match (spaces are not +considered equal to a tab). > + let baan_fold_block=1 +Folding can be enabled for embedded SQL blocks as SELECT, SELECTDO, +SELECTEMPTY, ... The indentation preceding the begin/end keywords has to +match (spaces are not considered equal to a tab). > + let baan_fold_sql=1 +Note: Block folding can result in many small folds. It is suggested to |:set| +the options 'foldminlines' and 'foldnestmax' in |.vimrc| or use |:setlocal| in +.../after/syntax/baan.vim (see |after-directory|). Eg: > + set foldminlines=5 + set foldnestmax=6 + + +BASIC *basic.vim* *vb.vim* *ft-basic-syntax* *ft-vb-syntax* + +Both Visual Basic and "normal" basic use the extension ".bas". To detect +which one should be used, Vim checks for the string "VB_Name" in the first +five lines of the file. If it is not found, filetype will be "basic", +otherwise "vb". Files with the ".frm" extension will always be seen as Visual +Basic. + + +C *c.vim* *ft-c-syntax* + +A few things in C highlighting are optional. To enable them assign any value +to the respective variable. Example: > + :let c_comment_strings = 1 +To disable them use ":unlet". Example: > + :unlet c_comment_strings + +Variable Highlight ~ +c_gnu GNU gcc specific items +c_comment_strings strings and numbers inside a comment +c_space_errors trailing white space and spaces before a +c_no_trail_space_error ... but no trailing spaces +c_no_tab_space_error ... but no spaces before a +c_no_bracket_error don't highlight {}; inside [] as errors +c_no_curly_error don't highlight {}; inside [] and () as errors; + except { and } in first column +c_curly_error highlight a missing }; this forces syncing from the + start of the file, can be slow +c_no_ansi don't do standard ANSI types and constants +c_ansi_typedefs ... but do standard ANSI types +c_ansi_constants ... but do standard ANSI constants +c_no_utf don't highlight \u and \U in strings +c_syntax_for_h for *.h files use C syntax instead of C++ and use objc + syntax instead of objcpp +c_no_if0 don't highlight "#if 0" blocks as comments +c_no_cformat don't highlight %-formats in strings +c_no_c99 don't highlight C99 standard items +c_no_c11 don't highlight C11 standard items + +When 'foldmethod' is set to "syntax" then /* */ comments and { } blocks will +become a fold. If you don't want comments to become a fold use: > + :let c_no_comment_fold = 1 +"#if 0" blocks are also folded, unless: > + :let c_no_if0_fold = 1 + +If you notice highlighting errors while scrolling backwards, which are fixed +when redrawing with CTRL-L, try setting the "c_minlines" internal variable +to a larger number: > + :let c_minlines = 100 +This will make the syntax synchronization start 100 lines before the first +displayed line. The default value is 50 (15 when c_no_if0 is set). The +disadvantage of using a larger number is that redrawing can become slow. + +When using the "#if 0" / "#endif" comment highlighting, notice that this only +works when the "#if 0" is within "c_minlines" from the top of the window. If +you have a long "#if 0" construct it will not be highlighted correctly. + +To match extra items in comments, use the cCommentGroup cluster. +Example: > + :au Syntax c call MyCadd() + :function MyCadd() + : syn keyword cMyItem contained Ni + : syn cluster cCommentGroup add=cMyItem + : hi link cMyItem Title + :endfun + +ANSI constants will be highlighted with the "cConstant" group. This includes +"NULL", "SIG_IGN" and others. But not "TRUE", for example, because this is +not in the ANSI standard. If you find this confusing, remove the cConstant +highlighting: > + :hi link cConstant NONE + +If you see '{' and '}' highlighted as an error where they are OK, reset the +highlighting for cErrInParen and cErrInBracket. + +If you want to use folding in your C files, you can add these lines in a file +in the "after" directory in 'runtimepath'. For Unix this would be +~/.vim/after/syntax/c.vim. > + syn sync fromstart + set foldmethod=syntax + +CH *ch.vim* *ft-ch-syntax* + +C/C++ interpreter. Ch has similar syntax highlighting to C and builds upon +the C syntax file. See |c.vim| for all the settings that are available for C. + +By setting a variable you can tell Vim to use Ch syntax for *.h files, instead +of C or C++: > + :let ch_syntax_for_h = 1 + + +CHILL *chill.vim* *ft-chill-syntax* + +Chill syntax highlighting is similar to C. See |c.vim| for all the settings +that are available. Additionally there is: + +chill_space_errors like c_space_errors +chill_comment_string like c_comment_strings +chill_minlines like c_minlines + + +CHANGELOG *changelog.vim* *ft-changelog-syntax* + +ChangeLog supports highlighting spaces at the start of a line. +If you do not like this, add following line to your .vimrc: > + let g:changelog_spacing_errors = 0 +This works the next time you edit a changelog file. You can also use +"b:changelog_spacing_errors" to set this per buffer (before loading the syntax +file). + +You can change the highlighting used, e.g., to flag the spaces as an error: > + :hi link ChangelogError Error +Or to avoid the highlighting: > + :hi link ChangelogError NONE +This works immediately. + + +CLOJURE *ft-clojure-syntax* + +Setting *g:clojure_fold* enables folding Clojure code via the syntax engine. +Any list, vector, or map that extends over more than one line can be folded +using the standard Vim |fold-commands|. + +Please note that this option does not work with scripts that redefine the +bracket syntax regions, such as rainbow-parentheses plugins. + +This option is off by default. +> + " Default + let g:clojure_fold = 0 +< + +COBOL *cobol.vim* *ft-cobol-syntax* + +COBOL highlighting has different needs for legacy code than it does for fresh +development. This is due to differences in what is being done (maintenance +versus development) and other factors. To enable legacy code highlighting, +add this line to your .vimrc: > + :let cobol_legacy_code = 1 +To disable it again, use this: > + :unlet cobol_legacy_code + + +COLD FUSION *coldfusion.vim* *ft-coldfusion-syntax* + +The ColdFusion has its own version of HTML comments. To turn on ColdFusion +comment highlighting, add the following line to your startup file: > + + :let html_wrong_comments = 1 + +The ColdFusion syntax file is based on the HTML syntax file. + + +CPP *cpp.vim* *ft-cpp-syntax* + +Most of things are same as |ft-c-syntax|. + +Variable Highlight ~ +cpp_no_c11 don't highlight C++11 standard items + + +CSH *csh.vim* *ft-csh-syntax* + +This covers the shell named "csh". Note that on some systems tcsh is actually +used. + +Detecting whether a file is csh or tcsh is notoriously hard. Some systems +symlink /bin/csh to /bin/tcsh, making it almost impossible to distinguish +between csh and tcsh. In case VIM guesses wrong you can set the +"filetype_csh" variable. For using csh: *g:filetype_csh* +> + :let g:filetype_csh = "csh" + +For using tcsh: > + + :let g:filetype_csh = "tcsh" + +Any script with a tcsh extension or a standard tcsh filename (.tcshrc, +tcsh.tcshrc, tcsh.login) will have filetype tcsh. All other tcsh/csh scripts +will be classified as tcsh, UNLESS the "filetype_csh" variable exists. If the +"filetype_csh" variable exists, the filetype will be set to the value of the +variable. + + +CYNLIB *cynlib.vim* *ft-cynlib-syntax* + +Cynlib files are C++ files that use the Cynlib class library to enable +hardware modelling and simulation using C++. Typically Cynlib files have a .cc +or a .cpp extension, which makes it very difficult to distinguish them from a +normal C++ file. Thus, to enable Cynlib highlighting for .cc files, add this +line to your .vimrc file: > + + :let cynlib_cyntax_for_cc=1 + +Similarly for cpp files (this extension is only usually used in Windows) > + + :let cynlib_cyntax_for_cpp=1 + +To disable these again, use this: > + + :unlet cynlib_cyntax_for_cc + :unlet cynlib_cyntax_for_cpp +< + +CWEB *cweb.vim* *ft-cweb-syntax* + +Files matching "*.w" could be Progress or cweb. If the automatic detection +doesn't work for you, or you don't edit Progress at all, use this in your +startup vimrc: > + :let filetype_w = "cweb" + + +DESKTOP *desktop.vim* *ft-desktop-syntax* + +Primary goal of this syntax file is to highlight .desktop and .directory files +according to freedesktop.org standard: +http://standards.freedesktop.org/desktop-entry-spec/latest/ +But actually almost none implements this standard fully. Thus it will +highlight all Unix ini files. But you can force strict highlighting according +to standard by placing this in your vimrc file: > + :let enforce_freedesktop_standard = 1 + + +DIRCOLORS *dircolors.vim* *ft-dircolors-syntax* + +The dircolors utility highlighting definition has one option. It exists to +provide compatibility with the Slackware GNU/Linux distributions version of +the command. It adds a few keywords that are generally ignored by most +versions. On Slackware systems, however, the utility accepts the keywords and +uses them for processing. To enable the Slackware keywords add the following +line to your startup file: > + let dircolors_is_slackware = 1 + + +DOCBOOK *docbk.vim* *ft-docbk-syntax* *docbook* +DOCBOOK XML *docbkxml.vim* *ft-docbkxml-syntax* +DOCBOOK SGML *docbksgml.vim* *ft-docbksgml-syntax* + +There are two types of DocBook files: SGML and XML. To specify what type you +are using the "b:docbk_type" variable should be set. Vim does this for you +automatically if it can recognize the type. When Vim can't guess it the type +defaults to XML. +You can set the type manually: > + :let docbk_type = "sgml" +or: > + :let docbk_type = "xml" +You need to do this before loading the syntax file, which is complicated. +Simpler is setting the filetype to "docbkxml" or "docbksgml": > + :set filetype=docbksgml +or: > + :set filetype=docbkxml + +You can specify the DocBook version: > + :let docbk_ver = 3 +When not set 4 is used. + + +DOSBATCH *dosbatch.vim* *ft-dosbatch-syntax* + +There is one option with highlighting DOS batch files. This covers new +extensions to the Command Interpreter introduced with Windows 2000 and +is controlled by the variable dosbatch_cmdextversion. For Windows NT +this should have the value 1, and for Windows 2000 it should be 2. +Select the version you want with the following line: > + + :let dosbatch_cmdextversion = 1 + +If this variable is not defined it defaults to a value of 2 to support +Windows 2000. + +A second option covers whether *.btm files should be detected as type +"dosbatch" (MS-DOS batch files) or type "btm" (4DOS batch files). The latter +is used by default. You may select the former with the following line: > + + :let g:dosbatch_syntax_for_btm = 1 + +If this variable is undefined or zero, btm syntax is selected. + + +DOXYGEN *doxygen.vim* *doxygen-syntax* + +Doxygen generates code documentation using a special documentation format +(similar to Javadoc). This syntax script adds doxygen highlighting to c, cpp, +idl and php files, and should also work with java. + +There are a few of ways to turn on doxygen formatting. It can be done +explicitly or in a modeline by appending '.doxygen' to the syntax of the file. +Example: > + :set syntax=c.doxygen +or > + // vim:syntax=c.doxygen + +It can also be done automatically for C, C++, C#, IDL and PHP files by setting +the global or buffer-local variable load_doxygen_syntax. This is done by +adding the following to your .vimrc. > + :let g:load_doxygen_syntax=1 + +There are a couple of variables that have an effect on syntax highlighting, and +are to do with non-standard highlighting options. + +Variable Default Effect ~ +g:doxygen_enhanced_color +g:doxygen_enhanced_colour 0 Use non-standard highlighting for + doxygen comments. + +doxygen_my_rendering 0 Disable rendering of HTML bold, italic + and html_my_rendering underline. + +doxygen_javadoc_autobrief 1 Set to 0 to disable javadoc autobrief + colour highlighting. + +doxygen_end_punctuation '[.]' Set to regexp match for the ending + punctuation of brief + +There are also some hilight groups worth mentioning as they can be useful in +configuration. + +Highlight Effect ~ +doxygenErrorComment The colour of an end-comment when missing + punctuation in a code, verbatim or dot section +doxygenLinkError The colour of an end-comment when missing the + \endlink from a \link section. + + +DTD *dtd.vim* *ft-dtd-syntax* + +The DTD syntax highlighting is case sensitive by default. To disable +case-sensitive highlighting, add the following line to your startup file: > + + :let dtd_ignore_case=1 + +The DTD syntax file will highlight unknown tags as errors. If +this is annoying, it can be turned off by setting: > + + :let dtd_no_tag_errors=1 + +before sourcing the dtd.vim syntax file. +Parameter entity names are highlighted in the definition using the +'Type' highlighting group and 'Comment' for punctuation and '%'. +Parameter entity instances are highlighted using the 'Constant' +highlighting group and the 'Type' highlighting group for the +delimiters % and ;. This can be turned off by setting: > + + :let dtd_no_param_entities=1 + +The DTD syntax file is also included by xml.vim to highlight included dtd's. + + +EIFFEL *eiffel.vim* *ft-eiffel-syntax* + +While Eiffel is not case-sensitive, its style guidelines are, and the +syntax highlighting file encourages their use. This also allows to +highlight class names differently. If you want to disable case-sensitive +highlighting, add the following line to your startup file: > + + :let eiffel_ignore_case=1 + +Case still matters for class names and TODO marks in comments. + +Conversely, for even stricter checks, add one of the following lines: > + + :let eiffel_strict=1 + :let eiffel_pedantic=1 + +Setting eiffel_strict will only catch improper capitalization for the +five predefined words "Current", "Void", "Result", "Precursor", and +"NONE", to warn against their accidental use as feature or class names. + +Setting eiffel_pedantic will enforce adherence to the Eiffel style +guidelines fairly rigorously (like arbitrary mixes of upper- and +lowercase letters as well as outdated ways to capitalize keywords). + +If you want to use the lower-case version of "Current", "Void", +"Result", and "Precursor", you can use > + + :let eiffel_lower_case_predef=1 + +instead of completely turning case-sensitive highlighting off. + +Support for ISE's proposed new creation syntax that is already +experimentally handled by some compilers can be enabled by: > + + :let eiffel_ise=1 + +Finally, some vendors support hexadecimal constants. To handle them, add > + + :let eiffel_hex_constants=1 + +to your startup file. + + +EUPHORIA *euphoria3.vim* *euphoria4.vim* *ft-euphoria-syntax* + +Two syntax highlighting files exists for Euphoria. One for Euphoria +version 3.1.1, which is the default syntax highlighting file, and one for +Euphoria version 4.0.5 or later. + +Euphoria version 3.1.1 (http://www.rapideuphoria.com/) is still necessary +for developing applications for the DOS platform, which Euphoria version 4 +(http://www.openeuphoria.org/) does not support. + +The following file extensions are auto-detected as Euphoria file type: + + *.e, *.eu, *.ew, *.ex, *.exu, *.exw + *.E, *.EU, *.EW, *.EX, *.EXU, *.EXW + +To select syntax highlighting file for Euphoria, as well as for +auto-detecting the *.e and *.E file extensions as Euphoria file type, +add the following line to your startup file: > + + :let filetype_euphoria="euphoria3" + + or + + :let filetype_euphoria="euphoria4" + + +ERLANG *erlang.vim* *ft-erlang-syntax* + +Erlang is a functional programming language developed by Ericsson. Files with +the following extensions are recognized as Erlang files: erl, hrl, yaws. + +The BIFs (built-in functions) are highlighted by default. To disable this, +put the following line in your vimrc: > + + :let g:erlang_highlight_bifs = 0 + +To enable highlighting some special atoms, put this in your vimrc: > + + :let g:erlang_highlight_special_atoms = 1 + + +FLEXWIKI *flexwiki.vim* *ft-flexwiki-syntax* + +FlexWiki is an ASP.NET-based wiki package available at http://www.flexwiki.com +NOTE: this site currently doesn't work, on Wikipedia is mentioned that +development stopped in 2009. + +Syntax highlighting is available for the most common elements of FlexWiki +syntax. The associated ftplugin script sets some buffer-local options to make +editing FlexWiki pages more convenient. FlexWiki considers a newline as the +start of a new paragraph, so the ftplugin sets 'tw'=0 (unlimited line length), +'wrap' (wrap long lines instead of using horizontal scrolling), 'linebreak' +(to wrap at a character in 'breakat' instead of at the last char on screen), +and so on. It also includes some keymaps that are disabled by default. + +If you want to enable the keymaps that make "j" and "k" and the cursor keys +move up and down by display lines, add this to your .vimrc: > + :let flexwiki_maps = 1 + + +FORM *form.vim* *ft-form-syntax* + +The coloring scheme for syntax elements in the FORM file uses the default +modes Conditional, Number, Statement, Comment, PreProc, Type, and String, +following the language specifications in 'Symbolic Manipulation with FORM' by +J.A.M. Vermaseren, CAN, Netherlands, 1991. + +If you want include your own changes to the default colors, you have to +redefine the following syntax groups: + + - formConditional + - formNumber + - formStatement + - formHeaderStatement + - formComment + - formPreProc + - formDirective + - formType + - formString + +Note that the form.vim syntax file implements FORM preprocessor commands and +directives per default in the same syntax group. + +A predefined enhanced color mode for FORM is available to distinguish between +header statements and statements in the body of a FORM program. To activate +this mode define the following variable in your vimrc file > + + :let form_enhanced_color=1 + +The enhanced mode also takes advantage of additional color features for a dark +gvim display. Here, statements are colored LightYellow instead of Yellow, and +conditionals are LightBlue for better distinction. + + +FORTRAN *fortran.vim* *ft-fortran-syntax* + +Default highlighting and dialect ~ +Highlighting appropriate for Fortran 2008 is used by default. This choice +should be appropriate for most users most of the time because Fortran 2008 is +almost a superset of previous versions (Fortran 2003, 95, 90, and 77). + +Fortran source code form ~ +Fortran code can be in either fixed or free source form. Note that the +syntax highlighting will not be correct if the form is incorrectly set. + +When you create a new fortran file, the syntax script assumes fixed source +form. If you always use free source form, then > + :let fortran_free_source=1 +in your .vimrc prior to the :syntax on command. If you always use fixed source +form, then > + :let fortran_fixed_source=1 +in your .vimrc prior to the :syntax on command. + +If the form of the source code depends upon the file extension, then it is +most convenient to set fortran_free_source in a ftplugin file. For more +information on ftplugin files, see |ftplugin|. For example, if all your +fortran files with an .f90 extension are written in free source form and the +rest in fixed source form, add the following code to your ftplugin file > + let s:extfname = expand("%:e") + if s:extfname ==? "f90" + let fortran_free_source=1 + unlet! fortran_fixed_source + else + let fortran_fixed_source=1 + unlet! fortran_free_source + endif +Note that this will work only if the "filetype plugin indent on" command +precedes the "syntax on" command in your .vimrc file. + +When you edit an existing fortran file, the syntax script will assume free +source form if the fortran_free_source variable has been set, and assumes +fixed source form if the fortran_fixed_source variable has been set. If +neither of these variables have been set, the syntax script attempts to +determine which source form has been used by examining the first five columns +of the first 250 lines of your file. If no signs of free source form are +detected, then the file is assumed to be in fixed source form. The algorithm +should work in the vast majority of cases. In some cases, such as a file that +begins with 250 or more full-line comments, the script may incorrectly decide +that the fortran code is in fixed form. If that happens, just add a +non-comment statement beginning anywhere in the first five columns of the +first twenty five lines, save (:w) and then reload (:e!) the file. + +Tabs in fortran files ~ +Tabs are not recognized by the Fortran standards. Tabs are not a good idea in +fixed format fortran source code which requires fixed column boundaries. +Therefore, tabs are marked as errors. Nevertheless, some programmers like +using tabs. If your fortran files contain tabs, then you should set the +variable fortran_have_tabs in your .vimrc with a command such as > + :let fortran_have_tabs=1 +placed prior to the :syntax on command. Unfortunately, the use of tabs will +mean that the syntax file will not be able to detect incorrect margins. + +Syntax folding of fortran files ~ +If you wish to use foldmethod=syntax, then you must first set the variable +fortran_fold with a command such as > + :let fortran_fold=1 +to instruct the syntax script to define fold regions for program units, that +is main programs starting with a program statement, subroutines, function +subprograms, block data subprograms, interface blocks, and modules. If you +also set the variable fortran_fold_conditionals with a command such as > + :let fortran_fold_conditionals=1 +then fold regions will also be defined for do loops, if blocks, and select +case constructs. If you also set the variable +fortran_fold_multilinecomments with a command such as > + :let fortran_fold_multilinecomments=1 +then fold regions will also be defined for three or more consecutive comment +lines. Note that defining fold regions can be slow for large files. + +If fortran_fold, and possibly fortran_fold_conditionals and/or +fortran_fold_multilinecomments, have been set, then vim will fold your file if +you set foldmethod=syntax. Comments or blank lines placed between two program +units are not folded because they are seen as not belonging to any program +unit. + +More precise fortran syntax ~ +If you set the variable fortran_more_precise with a command such as > + :let fortran_more_precise=1 +then the syntax coloring will be more precise but slower. In particular, +statement labels used in do, goto and arithmetic if statements will be +recognized, as will construct names at the end of a do, if, select or forall +construct. + +Non-default fortran dialects ~ +The syntax script supports two Fortran dialects: f08 and F. You will probably +find the default highlighting (f08) satisfactory. A few legacy constructs +deleted or declared obsolescent in the 2008 standard are highlighted as todo +items. + +If you use F, the advantage of setting the dialect appropriately is that +other legacy features excluded from F will be highlighted as todo items and +that free source form will be assumed. + +The dialect can be selected in various ways. If all your fortran files use +the same dialect, set the global variable fortran_dialect in your .vimrc prior +to your syntax on statement. The case-sensitive, permissible values of +fortran_dialect are "f08" or "F". Invalid values of fortran_dialect are +ignored. + +If the dialect depends upon the file extension, then it is most convenient to +set a buffer-local variable in a ftplugin file. For more information on +ftplugin files, see |ftplugin|. For example, if all your fortran files with +an .f90 extension are written in the F subset, your ftplugin file should +contain the code > + let s:extfname = expand("%:e") + if s:extfname ==? "f90" + let b:fortran_dialect="F" + else + unlet! b:fortran_dialect + endif +Note that this will work only if the "filetype plugin indent on" command +precedes the "syntax on" command in your .vimrc file. + +Finer control is necessary if the file extension does not uniquely identify +the dialect. You can override the default dialect, on a file-by-file basis, +by including a comment with the directive "fortran_dialect=xx" (where xx=F or +f08) in one of the first three lines in your file. For example, your older .f +files may be legacy code but your newer ones may be F codes, and you would +identify the latter by including in the first three lines of those files a +Fortran comment of the form > + ! fortran_dialect=F + +For previous versions of the syntax, you may have set fortran_dialect to the +now-obsolete values "f77", "f90", "f95", or "elf". Such settings will be +silently handled as "f08". Users of "elf" may wish to experiment with "F" +instead. + +The syntax/fortran.vim script contains embedded comments that tell you how to +comment and/or uncomment some lines to (a) activate recognition of some +non-standard, vendor-supplied intrinsics and (b) to prevent features deleted +or declared obsolescent in the 2008 standard from being highlighted as todo +items. + +Limitations ~ +Parenthesis checking does not catch too few closing parentheses. Hollerith +strings are not recognized. Some keywords may be highlighted incorrectly +because Fortran90 has no reserved words. + +For further information related to fortran, see |ft-fortran-indent| and +|ft-fortran-plugin|. + + +FVWM CONFIGURATION FILES *fvwm.vim* *ft-fvwm-syntax* + +In order for Vim to recognize Fvwm configuration files that do not match +the patterns *fvwmrc* or *fvwm2rc* , you must put additional patterns +appropriate to your system in your myfiletypes.vim file. For these +patterns, you must set the variable "b:fvwm_version" to the major version +number of Fvwm, and the 'filetype' option to fvwm. + +For example, to make Vim identify all files in /etc/X11/fvwm2/ +as Fvwm2 configuration files, add the following: > + + :au! BufNewFile,BufRead /etc/X11/fvwm2/* let b:fvwm_version = 2 | + \ set filetype=fvwm + +If you'd like Vim to highlight all valid color names, tell it where to +find the color database (rgb.txt) on your system. Do this by setting +"rgb_file" to its location. Assuming your color database is located +in /usr/X11/lib/X11/, you should add the line > + + :let rgb_file = "/usr/X11/lib/X11/rgb.txt" + +to your .vimrc file. + + +GSP *gsp.vim* *ft-gsp-syntax* + +The default coloring style for GSP pages is defined by |html.vim|, and +the coloring for java code (within java tags or inline between backticks) +is defined by |java.vim|. The following HTML groups defined in |html.vim| +are redefined to incorporate and highlight inline java code: + + htmlString + htmlValue + htmlEndTag + htmlTag + htmlTagN + +Highlighting should look fine most of the places where you'd see inline +java code, but in some special cases it may not. To add another HTML +group where you will have inline java code where it does not highlight +correctly, just copy the line you want from |html.vim| and add gspJava +to the contains clause. + +The backticks for inline java are highlighted according to the htmlError +group to make them easier to see. + + +GROFF *groff.vim* *ft-groff-syntax* + +The groff syntax file is a wrapper for |nroff.vim|, see the notes +under that heading for examples of use and configuration. The purpose +of this wrapper is to set up groff syntax extensions by setting the +filetype from a |modeline| or in a personal filetype definitions file +(see |filetype.txt|). + + +HASKELL *haskell.vim* *lhaskell.vim* *ft-haskell-syntax* + +The Haskell syntax files support plain Haskell code as well as literate +Haskell code, the latter in both Bird style and TeX style. The Haskell +syntax highlighting will also highlight C preprocessor directives. + +If you want to highlight delimiter characters (useful if you have a +light-coloured background), add to your .vimrc: > + :let hs_highlight_delimiters = 1 +To treat True and False as keywords as opposed to ordinary identifiers, +add: > + :let hs_highlight_boolean = 1 +To also treat the names of primitive types as keywords: > + :let hs_highlight_types = 1 +And to treat the names of even more relatively common types as keywords: > + :let hs_highlight_more_types = 1 +If you want to highlight the names of debugging functions, put in +your .vimrc: > + :let hs_highlight_debug = 1 + +The Haskell syntax highlighting also highlights C preprocessor +directives, and flags lines that start with # but are not valid +directives as erroneous. This interferes with Haskell's syntax for +operators, as they may start with #. If you want to highlight those +as operators as opposed to errors, put in your .vimrc: > + :let hs_allow_hash_operator = 1 + +The syntax highlighting for literate Haskell code will try to +automatically guess whether your literate Haskell code contains +TeX markup or not, and correspondingly highlight TeX constructs +or nothing at all. You can override this globally by putting +in your .vimrc > + :let lhs_markup = none +for no highlighting at all, or > + :let lhs_markup = tex +to force the highlighting to always try to highlight TeX markup. +For more flexibility, you may also use buffer local versions of +this variable, so e.g. > + :let b:lhs_markup = tex +will force TeX highlighting for a particular buffer. It has to be +set before turning syntax highlighting on for the buffer or +loading a file. + + +HTML *html.vim* *ft-html-syntax* + +The coloring scheme for tags in the HTML file works as follows. + +The <> of opening tags are colored differently than the of a closing tag. +This is on purpose! For opening tags the 'Function' color is used, while for +closing tags the 'Type' color is used (See syntax.vim to check how those are +defined for you) + +Known tag names are colored the same way as statements in C. Unknown tag +names are colored with the same color as the <> or respectively which +makes it easy to spot errors + +Note that the same is true for argument (or attribute) names. Known attribute +names are colored differently than unknown ones. + +Some HTML tags are used to change the rendering of text. The following tags +are recognized by the html.vim syntax coloring file and change the way normal +text is shown: ( is used as an alias for , +while as an alias for ),

-

, , and <A>, but +only if used as a link (that is, it must include a href as in +<A href="somefile.html">). + +If you want to change how such text is rendered, you must redefine the +following syntax groups: + + - htmlBold + - htmlBoldUnderline + - htmlBoldUnderlineItalic + - htmlUnderline + - htmlUnderlineItalic + - htmlItalic + - htmlTitle for titles + - htmlH1 - htmlH6 for headings + +To make this redefinition work you must redefine them all with the exception +of the last two (htmlTitle and htmlH[1-6], which are optional) and define the +following variable in your vimrc (this is due to the order in which the files +are read during initialization) > + :let html_my_rendering=1 + +If you'd like to see an example download mysyntax.vim at +http://www.fleiner.com/vim/download.html + +You can also disable this rendering by adding the following line to your +vimrc file: > + :let html_no_rendering=1 + +HTML comments are rather special (see an HTML reference document for the +details), and the syntax coloring scheme will highlight all errors. +However, if you prefer to use the wrong style (starts with <!-- and +ends with -->) you can define > + :let html_wrong_comments=1 + +JavaScript and Visual Basic embedded inside HTML documents are highlighted as +'Special' with statements, comments, strings and so on colored as in standard +programming languages. Note that only JavaScript and Visual Basic are currently +supported, no other scripting language has been added yet. + +Embedded and inlined cascading style sheets (CSS) are highlighted too. + +There are several html preprocessor languages out there. html.vim has been +written such that it should be trivial to include it. To do so add the +following two lines to the syntax coloring file for that language +(the example comes from the asp.vim file): + + runtime! syntax/html.vim + syn cluster htmlPreproc add=asp + +Now you just need to make sure that you add all regions that contain +the preprocessor language to the cluster htmlPreproc. + + +HTML/OS (by Aestiva) *htmlos.vim* *ft-htmlos-syntax* + +The coloring scheme for HTML/OS works as follows: + +Functions and variable names are the same color by default, because VIM +doesn't specify different colors for Functions and Identifiers. To change +this (which is recommended if you want function names to be recognizable in a +different color) you need to add the following line to either your ~/.vimrc: > + :hi Function term=underline cterm=bold ctermfg=LightGray + +Of course, the ctermfg can be a different color if you choose. + +Another issues that HTML/OS runs into is that there is no special filetype to +signify that it is a file with HTML/OS coding. You can change this by opening +a file and turning on HTML/OS syntax by doing the following: > + :set syntax=htmlos + +Lastly, it should be noted that the opening and closing characters to begin a +block of HTML/OS code can either be << or [[ and >> or ]], respectively. + + +IA64 *ia64.vim* *intel-itanium* *ft-ia64-syntax* + +Highlighting for the Intel Itanium 64 assembly language. See |asm.vim| for +how to recognize this filetype. + +To have *.inc files be recognized as IA64, add this to your .vimrc file: > + :let g:filetype_inc = "ia64" + + +INFORM *inform.vim* *ft-inform-syntax* + +Inform highlighting includes symbols provided by the Inform Library, as +most programs make extensive use of it. If do not wish Library symbols +to be highlighted add this to your vim startup: > + :let inform_highlight_simple=1 + +By default it is assumed that Inform programs are Z-machine targeted, +and highlights Z-machine assembly language symbols appropriately. If +you intend your program to be targeted to a Glulx/Glk environment you +need to add this to your startup sequence: > + :let inform_highlight_glulx=1 + +This will highlight Glulx opcodes instead, and also adds glk() to the +set of highlighted system functions. + +The Inform compiler will flag certain obsolete keywords as errors when +it encounters them. These keywords are normally highlighted as errors +by Vim. To prevent such error highlighting, you must add this to your +startup sequence: > + :let inform_suppress_obsolete=1 + +By default, the language features highlighted conform to Compiler +version 6.30 and Library version 6.11. If you are using an older +Inform development environment, you may with to add this to your +startup sequence: > + :let inform_highlight_old=1 + +IDL *idl.vim* *idl-syntax* + +IDL (Interface Definition Language) files are used to define RPC calls. In +Microsoft land, this is also used for defining COM interfaces and calls. + +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 +repetitive 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. + +Variable Effect ~ + +idl_no_ms_extensions Disable some of the Microsoft specific + extensions +idl_no_extensions Disable complex extensions +idlsyntax_showerror Show IDL errors (can be rather intrusive, but + quite helpful) +idlsyntax_showerror_soft Use softer colours by default for errors + + +JAVA *java.vim* *ft-java-syntax* + +The java.vim syntax highlighting file offers several options: + +In Java 1.0.2 it was never possible to have braces inside parens, so this was +flagged as an error. Since Java 1.1 this is possible (with anonymous +classes), and therefore is no longer marked as an error. If you prefer the old +way, put the following line into your vim startup file: > + :let java_mark_braces_in_parens_as_errors=1 + +All identifiers in java.lang.* are always visible in all classes. To +highlight them use: > + :let java_highlight_java_lang_ids=1 + +You can also highlight identifiers of most standard Java packages if you +download the javaid.vim script at http://www.fleiner.com/vim/download.html. +If you prefer to only highlight identifiers of a certain package, say java.io +use the following: > + :let java_highlight_java_io=1 +Check the javaid.vim file for a list of all the packages that are supported. + +Function names are not highlighted, as the way to find functions depends on +how you write Java code. The syntax file knows two possible ways to highlight +functions: + +If you write function declarations that are always indented by either +a tab, 8 spaces or 2 spaces you may want to set > + :let java_highlight_functions="indent" +However, if you follow the Java guidelines about how functions and classes are +supposed to be named (with respect to upper and lowercase), use > + :let java_highlight_functions="style" +If both options do not work for you, but you would still want function +declarations to be highlighted create your own definitions by changing the +definitions in java.vim or by creating your own java.vim which includes the +original one and then adds the code to highlight functions. + +In Java 1.1 the functions System.out.println() and System.err.println() should +only be used for debugging. Therefore it is possible to highlight debugging +statements differently. To do this you must add the following definition in +your startup file: > + :let java_highlight_debug=1 +The result will be that those statements are highlighted as 'Special' +characters. If you prefer to have them highlighted differently you must define +new highlightings for the following groups.: + Debug, DebugSpecial, DebugString, DebugBoolean, DebugType +which are used for the statement itself, special characters used in debug +strings, strings, boolean constants and types (this, super) respectively. I +have opted to chose another background for those statements. + +Javadoc is a program that takes special comments out of Java program files and +creates HTML pages. The standard configuration will highlight this HTML code +similarly to HTML files (see |html.vim|). You can even add Javascript +and CSS inside this code (see below). There are four differences however: + 1. The title (all characters up to the first '.' which is followed by + some white space or up to the first '@') is colored differently (to change + the color change the group CommentTitle). + 2. The text is colored as 'Comment'. + 3. HTML comments are colored as 'Special' + 4. The special Javadoc tags (@see, @param, ...) are highlighted as specials + and the argument (for @see, @param, @exception) as Function. +To turn this feature off add the following line to your startup file: > + :let java_ignore_javadoc=1 + +If you use the special Javadoc comment highlighting described above you +can also turn on special highlighting for Javascript, visual basic +scripts and embedded CSS (stylesheets). This makes only sense if you +actually have Javadoc comments that include either Javascript or embedded +CSS. The options to use are > + :let java_javascript=1 + :let java_css=1 + :let java_vb=1 + +In order to highlight nested parens with different colors define colors +for javaParen, javaParen1 and javaParen2, for example with > + :hi link javaParen Comment +or > + :hi javaParen ctermfg=blue guifg=#0000ff + +If you notice highlighting errors while scrolling backwards, which are fixed +when redrawing with CTRL-L, try setting the "java_minlines" internal variable +to a larger number: > + :let java_minlines = 50 +This will make the syntax synchronization start 50 lines before the first +displayed line. The default value is 10. The disadvantage of using a larger +number is that redrawing can become slow. + + +LACE *lace.vim* *ft-lace-syntax* + +Lace (Language for Assembly of Classes in Eiffel) is case insensitive, but the +style guide lines are not. If you prefer case insensitive highlighting, just +define the vim variable 'lace_case_insensitive' in your startup file: > + :let lace_case_insensitive=1 + + +LEX *lex.vim* *ft-lex-syntax* + +Lex uses brute-force synchronizing as the "^%%$" section delimiter +gives no clue as to what section follows. Consequently, the value for > + :syn sync minlines=300 +may be changed by the user if s/he is experiencing synchronization +difficulties (such as may happen with large lex files). + + +LIFELINES *lifelines.vim* *ft-lifelines-syntax* + +To highlight deprecated functions as errors, add in your .vimrc: > + + :let g:lifelines_deprecated = 1 +< + +LISP *lisp.vim* *ft-lisp-syntax* + +The lisp syntax highlighting provides two options: > + + g:lisp_instring : if it exists, then "(...)" strings are highlighted + as if the contents of the string were lisp. + Useful for AutoLisp. + g:lisp_rainbow : if it exists and is nonzero, then differing levels + of parenthesization will receive different + highlighting. +< +The g:lisp_rainbow option provides 10 levels of individual colorization for +the parentheses and backquoted parentheses. Because of the quantity of +colorization levels, unlike non-rainbow highlighting, the rainbow mode +specifies its highlighting using ctermfg and guifg, thereby bypassing the +usual colorscheme control using standard highlighting groups. The actual +highlighting used depends on the dark/bright setting (see |'bg'|). + + +LITE *lite.vim* *ft-lite-syntax* + +There are two options for the lite syntax highlighting. + +If you like SQL syntax highlighting inside Strings, use this: > + + :let lite_sql_query = 1 + +For syncing, minlines defaults to 100. If you prefer another value, you can +set "lite_minlines" to the value you desire. Example: > + + :let lite_minlines = 200 + + +LPC *lpc.vim* *ft-lpc-syntax* + +LPC stands for a simple, memory-efficient language: Lars Pensj| C. The +file name of LPC is usually *.c. Recognizing these files as LPC would bother +users writing only C programs. If you want to use LPC syntax in Vim, you +should set a variable in your .vimrc file: > + + :let lpc_syntax_for_c = 1 + +If it doesn't work properly for some particular C or LPC files, use a +modeline. For a LPC file: + + // vim:set ft=lpc: + +For a C file that is recognized as LPC: + + // vim:set ft=c: + +If you don't want to set the variable, use the modeline in EVERY LPC file. + +There are several implementations for LPC, we intend to support most widely +used ones. Here the default LPC syntax is for MudOS series, for MudOS v22 +and before, you should turn off the sensible modifiers, and this will also +assert the new efuns after v22 to be invalid, don't set this variable when +you are using the latest version of MudOS: > + + :let lpc_pre_v22 = 1 + +For LpMud 3.2 series of LPC: > + + :let lpc_compat_32 = 1 + +For LPC4 series of LPC: > + + :let lpc_use_lpc4_syntax = 1 + +For uLPC series of LPC: +uLPC has been developed to Pike, so you should use Pike syntax +instead, and the name of your source file should be *.pike + + +LUA *lua.vim* *ft-lua-syntax* + +The Lua syntax file can be used for versions 4.0, 5.0, 5.1 and 5.2 (5.2 is +the default). You can select one of these versions using the global variables +lua_version and lua_subversion. For example, to activate Lua +5.1 syntax highlighting, set the variables like this: + + :let lua_version = 5 + :let lua_subversion = 1 + + +MAIL *mail.vim* *ft-mail.vim* + +Vim highlights all the standard elements of an email (headers, signatures, +quoted text and URLs / email addresses). In keeping with standard conventions, +signatures begin in a line containing only "--" followed optionally by +whitespaces and end with a newline. + +Vim treats lines beginning with ']', '}', '|', '>' or a word followed by '>' +as quoted text. However Vim highlights headers and signatures in quoted text +only if the text is quoted with '>' (optionally followed by one space). + +By default mail.vim synchronises syntax to 100 lines before the first +displayed line. If you have a slow machine, and generally deal with emails +with short headers, you can change this to a smaller value: > + + :let mail_minlines = 30 + + +MAKE *make.vim* *ft-make-syntax* + +In makefiles, commands are usually highlighted to make it easy for you to spot +errors. However, this may be too much coloring for you. You can turn this +feature off by using: > + + :let make_no_commands = 1 + + +MAPLE *maple.vim* *ft-maple-syntax* + +Maple V, by Waterloo Maple Inc, supports symbolic algebra. The language +supports many packages of functions which are selectively loaded by the user. +The standard set of packages' functions as supplied in Maple V release 4 may be +highlighted at the user's discretion. Users may place in their .vimrc file: > + + :let mvpkg_all= 1 + +to get all package functions highlighted, or users may select any subset by +choosing a variable/package from the table below and setting that variable to +1, also in their .vimrc file (prior to sourcing +$VIMRUNTIME/syntax/syntax.vim). + + Table of Maple V Package Function Selectors > + mv_DEtools mv_genfunc mv_networks mv_process + mv_Galois mv_geometry mv_numapprox mv_simplex + mv_GaussInt mv_grobner mv_numtheory mv_stats + mv_LREtools mv_group mv_orthopoly mv_student + mv_combinat mv_inttrans mv_padic mv_sumtools + mv_combstruct mv_liesymm mv_plots mv_tensor + mv_difforms mv_linalg mv_plottools mv_totorder + mv_finance mv_logic mv_powseries + + +MATHEMATICA *mma.vim* *ft-mma-syntax* *ft-mathematica-syntax* + +Empty *.m files will automatically be presumed to be Matlab files unless you +have the following in your .vimrc: > + + let filetype_m = "mma" + + +MOO *moo.vim* *ft-moo-syntax* + +If you use C-style comments inside expressions and find it mangles your +highlighting, you may want to use extended (slow!) matches for C-style +comments: > + + :let moo_extended_cstyle_comments = 1 + +To disable highlighting of pronoun substitution patterns inside strings: > + + :let moo_no_pronoun_sub = 1 + +To disable highlighting of the regular expression operator '%|', and matching +'%(' and '%)' inside strings: > + + :let moo_no_regexp = 1 + +Unmatched double quotes can be recognized and highlighted as errors: > + + :let moo_unmatched_quotes = 1 + +To highlight builtin properties (.name, .location, .programmer etc.): > + + :let moo_builtin_properties = 1 + +Unknown builtin functions can be recognized and highlighted as errors. If you +use this option, add your own extensions to the mooKnownBuiltinFunction group. +To enable this option: > + + :let moo_unknown_builtin_functions = 1 + +An example of adding sprintf() to the list of known builtin functions: > + + :syn keyword mooKnownBuiltinFunction sprintf contained + + +MSQL *msql.vim* *ft-msql-syntax* + +There are two options for the msql syntax highlighting. + +If you like SQL syntax highlighting inside Strings, use this: > + + :let msql_sql_query = 1 + +For syncing, minlines defaults to 100. If you prefer another value, you can +set "msql_minlines" to the value you desire. Example: > + + :let msql_minlines = 200 + + +NCF *ncf.vim* *ft-ncf-syntax* + +There is one option for NCF syntax highlighting. + +If you want to have unrecognized (by ncf.vim) statements highlighted as +errors, use this: > + + :let ncf_highlight_unknowns = 1 + +If you don't want to highlight these errors, leave it unset. + + +NROFF *nroff.vim* *ft-nroff-syntax* + +The nroff syntax file works with AT&T n/troff out of the box. You need to +activate the GNU groff extra features included in the syntax file before you +can use them. + +For example, Linux and BSD distributions use groff as their default text +processing package. In order to activate the extra syntax highlighting +features for groff, add the following option to your start-up files: > + + :let b:nroff_is_groff = 1 + +Groff is different from the old AT&T n/troff that you may still find in +Solaris. Groff macro and request names can be longer than 2 characters and +there are extensions to the language primitives. For example, in AT&T troff +you access the year as a 2-digit number with the request \(yr. In groff you +can use the same request, recognized for compatibility, or you can use groff's +native syntax, \[yr]. Furthermore, you can use a 4-digit year directly: +\[year]. Macro requests can be longer than 2 characters, for example, GNU mm +accepts the requests ".VERBON" and ".VERBOFF" for creating verbatim +environments. + +In order to obtain the best formatted output g/troff can give you, you should +follow a few simple rules about spacing and punctuation. + +1. Do not leave empty spaces at the end of lines. + +2. Leave one space and one space only after an end-of-sentence period, + exclamation mark, etc. + +3. For reasons stated below, it is best to follow all period marks with a + carriage return. + +The reason behind these unusual tips is that g/n/troff have a line breaking +algorithm that can be easily upset if you don't follow the rules given above. + +Unlike TeX, troff fills text line-by-line, not paragraph-by-paragraph and, +furthermore, it does not have a concept of glue or stretch, all horizontal and +vertical space input will be output as is. + +Therefore, you should be careful about not using more space between sentences +than you intend to have in your final document. For this reason, the common +practice is to insert a carriage return immediately after all punctuation +marks. If you want to have "even" text in your final processed output, you +need to maintain regular spacing in the input text. To mark both trailing +spaces and two or more spaces after a punctuation as an error, use: > + + :let nroff_space_errors = 1 + +Another technique to detect extra spacing and other errors that will interfere +with the correct typesetting of your file, is to define an eye-catching +highlighting definition for the syntax groups "nroffDefinition" and +"nroffDefSpecial" in your configuration files. For example: > + + hi def nroffDefinition term=italic cterm=italic gui=reverse + hi def nroffDefSpecial term=italic,bold cterm=italic,bold + \ gui=reverse,bold + +If you want to navigate preprocessor entries in your source file as easily as +with section markers, you can activate the following option in your .vimrc +file: > + + let b:preprocs_as_sections = 1 + +As well, the syntax file adds an extra paragraph marker for the extended +paragraph macro (.XP) in the ms package. + +Finally, there is a |groff.vim| syntax file that can be used for enabling +groff syntax highlighting either on a file basis or globally by default. + + +OCAML *ocaml.vim* *ft-ocaml-syntax* + +The OCaml syntax file handles files having the following prefixes: .ml, +.mli, .mll and .mly. By setting the following variable > + + :let ocaml_revised = 1 + +you can switch from standard OCaml-syntax to revised syntax as supported +by the camlp4 preprocessor. Setting the variable > + + :let ocaml_noend_error = 1 + +prevents highlighting of "end" as error, which is useful when sources +contain very long structures that Vim does not synchronize anymore. + + +PAPP *papp.vim* *ft-papp-syntax* + +The PApp syntax file handles .papp files and, to a lesser extend, .pxml +and .pxsl files which are all a mixture of perl/xml/html/other using xml +as the top-level file format. By default everything inside phtml or pxml +sections is treated as a string with embedded preprocessor commands. If +you set the variable: > + + :let papp_include_html=1 + +in your startup file it will try to syntax-hilight html code inside phtml +sections, but this is relatively slow and much too colourful to be able to +edit sensibly. ;) + +The newest version of the papp.vim syntax file can usually be found at +http://papp.plan9.de. + + +PASCAL *pascal.vim* *ft-pascal-syntax* + +Files matching "*.p" could be Progress or Pascal. If the automatic detection +doesn't work for you, or you don't edit Progress at all, use this in your +startup vimrc: > + + :let filetype_p = "pascal" + +The Pascal syntax file has been extended to take into account some extensions +provided by Turbo Pascal, Free Pascal Compiler and GNU Pascal Compiler. +Delphi keywords are also supported. By default, Turbo Pascal 7.0 features are +enabled. If you prefer to stick with the standard Pascal keywords, add the +following line to your startup file: > + + :let pascal_traditional=1 + +To switch on Delphi specific constructions (such as one-line comments, +keywords, etc): > + + :let pascal_delphi=1 + + +The option pascal_symbol_operator controls whether symbol operators such as +, +*, .., etc. are displayed using the Operator color or not. To colorize symbol +operators, add the following line to your startup file: > + + :let pascal_symbol_operator=1 + +Some functions are highlighted by default. To switch it off: > + + :let pascal_no_functions=1 + +Furthermore, there are specific variables for some compilers. Besides +pascal_delphi, there are pascal_gpc and pascal_fpc. Default extensions try to +match Turbo Pascal. > + + :let pascal_gpc=1 + +or > + + :let pascal_fpc=1 + +To ensure that strings are defined on a single line, you can define the +pascal_one_line_string variable. > + + :let pascal_one_line_string=1 + +If you dislike <Tab> chars, you can set the pascal_no_tabs variable. Tabs +will be highlighted as Error. > + + :let pascal_no_tabs=1 + + + +PERL *perl.vim* *ft-perl-syntax* + +There are a number of possible options to the perl syntax highlighting. + +Inline POD highlighting is now turned on by default. If you don't wish +to have the added complexity of highlighting POD embedded within Perl +files, you may set the 'perl_include_pod' option to 0: > + + :let perl_include_pod = 0 + +To reduce the complexity of parsing (and increase performance) you can switch +off two elements in the parsing of variable names and contents. > + +To handle package references in variable and function names not differently +from the rest of the name (like 'PkgName::' in '$PkgName::VarName'): > + + :let perl_no_scope_in_variables = 1 + +(In Vim 6.x it was the other way around: "perl_want_scope_in_variables" +enabled it.) + +If you do not want complex things like '@{${"foo"}}' to be parsed: > + + :let perl_no_extended_vars = 1 + +(In Vim 6.x it was the other way around: "perl_extended_vars" enabled it.) + +The coloring strings can be changed. By default strings and qq friends will be +highlighted like the first line. If you set the variable +perl_string_as_statement, it will be highlighted as in the second line. + + "hello world!"; qq|hello world|; + ^^^^^^^^^^^^^^NN^^^^^^^^^^^^^^^N (unlet perl_string_as_statement) + S^^^^^^^^^^^^SNNSSS^^^^^^^^^^^SN (let perl_string_as_statement) + +(^ = perlString, S = perlStatement, N = None at all) + +The syncing has 3 options. The first two switch off some triggering of +synchronization and should only be needed in case it fails to work properly. +If while scrolling all of a sudden the whole screen changes color completely +then you should try and switch off one of those. Let me know if you can figure +out the line that causes the mistake. + +One triggers on "^\s*sub\s*" and the other on "^[$@%]" more or less. > + + :let perl_no_sync_on_sub + :let perl_no_sync_on_global_var + +Below you can set the maximum distance VIM should look for starting points for +its attempts in syntax highlighting. > + + :let perl_sync_dist = 100 + +If you want to use folding with perl, set perl_fold: > + + :let perl_fold = 1 + +If you want to fold blocks in if statements, etc. as well set the following: > + + :let perl_fold_blocks = 1 + +Subroutines are folded by default if 'perl_fold' is set. If you do not want +this, you can set 'perl_nofold_subs': > + + :let perl_nofold_subs = 1 + +Anonymous subroutines are not folded by default; you may enable their folding +via 'perl_fold_anonymous_subs': > + + :let perl_fold_anonymous_subs = 1 + +Packages are also folded by default if 'perl_fold' is set. To disable this +behavior, set 'perl_nofold_packages': > + + :let perl_nofold_packages = 1 + +PHP3 and PHP4 *php.vim* *php3.vim* *ft-php-syntax* *ft-php3-syntax* + +[note: previously this was called "php3", but since it now also supports php4 +it has been renamed to "php"] + +There are the following options for the php syntax highlighting. + +If you like SQL syntax highlighting inside Strings: > + + let php_sql_query = 1 + +For highlighting the Baselib methods: > + + let php_baselib = 1 + +Enable HTML syntax highlighting inside strings: > + + let php_htmlInStrings = 1 + +Using the old colorstyle: > + + let php_oldStyle = 1 + +Enable highlighting ASP-style short tags: > + + let php_asp_tags = 1 + +Disable short tags: > + + let php_noShortTags = 1 + +For highlighting parent error ] or ): > + + let php_parent_error_close = 1 + +For skipping a php end tag, if there exists an open ( or [ without a closing +one: > + + let php_parent_error_open = 1 + +Enable folding for classes and functions: > + + let php_folding = 1 + +Selecting syncing method: > + + let 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. + + +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 + +This syntax file has the options: + +- ppwiz_highlight_defs : determines highlighting mode for PPWizard's + definitions. Possible values are + + ppwiz_highlight_defs = 1 : PPWizard #define statements retain the + colors of their contents (e.g. PPWizard macros and variables) + + ppwiz_highlight_defs = 2 : preprocessor #define and #evaluate + statements are shown in a single color with the exception of line + continuation symbols + + The default setting for ppwiz_highlight_defs is 1. + +- ppwiz_with_html : If the value is 1 (the default), highlight literal + HTML code; if 0, treat HTML code like ordinary text. + + +PHTML *phtml.vim* *ft-phtml-syntax* + +There are two options for the phtml syntax highlighting. + +If you like SQL syntax highlighting inside Strings, use this: > + + :let phtml_sql_query = 1 + +For syncing, minlines defaults to 100. If you prefer another value, you can +set "phtml_minlines" to the value you desire. Example: > + + :let phtml_minlines = 200 + + +POSTSCRIPT *postscr.vim* *ft-postscr-syntax* + +There are several options when it comes to highlighting PostScript. + +First which version of the PostScript language to highlight. There are +currently three defined language versions, or levels. Level 1 is the original +and base version, and includes all extensions prior to the release of level 2. +Level 2 is the most common version around, and includes its own set of +extensions prior to the release of level 3. Level 3 is currently the highest +level supported. You select which level of the PostScript language you want +highlighted by defining the postscr_level variable as follows: > + + :let postscr_level=2 + +If this variable is not defined it defaults to 2 (level 2) since this is +the most prevalent version currently. + +Note, not all PS interpreters will support all language features for a +particular language level. In particular the %!PS-Adobe-3.0 at the start of +PS files does NOT mean the PostScript present is level 3 PostScript! + +If you are working with Display PostScript, you can include highlighting of +Display PS language features by defining the postscr_display variable as +follows: > + + :let postscr_display=1 + +If you are working with Ghostscript, you can include highlighting of +Ghostscript specific language features by defining the variable +postscr_ghostscript as follows: > + + :let postscr_ghostscript=1 + +PostScript is a large language, with many predefined elements. While it +useful to have all these elements highlighted, on slower machines this can +cause Vim to slow down. In an attempt to be machine friendly font names and +character encodings are not highlighted by default. Unless you are working +explicitly with either of these this should be ok. If you want them to be +highlighted you should set one or both of the following variables: > + + :let postscr_fonts=1 + :let postscr_encodings=1 + +There is a stylistic option to the highlighting of and, or, and not. In +PostScript the function of these operators depends on the types of their +operands - if the operands are booleans then they are the logical operators, +if they are integers then they are binary operators. As binary and logical +operators can be highlighted differently they have to be highlighted one way +or the other. By default they are treated as logical operators. They can be +highlighted as binary operators by defining the variable +postscr_andornot_binary as follows: > + + :let postscr_andornot_binary=1 +< + + *ptcap.vim* *ft-printcap-syntax* +PRINTCAP + TERMCAP *ft-ptcap-syntax* *ft-termcap-syntax* + +This syntax file applies to the printcap and termcap databases. + +In order for Vim to recognize printcap/termcap files that do not match +the patterns *printcap*, or *termcap*, you must put additional patterns +appropriate to your system in your |myfiletypefile| file. For these +patterns, you must set the variable "b:ptcap_type" to either "print" or +"term", and then the 'filetype' option to ptcap. + +For example, to make Vim identify all files in /etc/termcaps/ as termcap +files, add the following: > + + :au BufNewFile,BufRead /etc/termcaps/* let b:ptcap_type = "term" | + \ set filetype=ptcap + +If you notice highlighting errors while scrolling backwards, which +are fixed when redrawing with CTRL-L, try setting the "ptcap_minlines" +internal variable to a larger number: > + + :let ptcap_minlines = 50 + +(The default is 20 lines.) + + +PROGRESS *progress.vim* *ft-progress-syntax* + +Files matching "*.w" could be Progress or cweb. If the automatic detection +doesn't work for you, or you don't edit cweb at all, use this in your +startup vimrc: > + :let filetype_w = "progress" +The same happens for "*.i", which could be assembly, and "*.p", which could be +Pascal. Use this if you don't use assembly and Pascal: > + :let filetype_i = "progress" + :let filetype_p = "progress" + + +PYTHON *python.vim* *ft-python-syntax* + +There are six options to control Python syntax highlighting. + +For highlighted numbers: > + :let python_no_number_highlight = 1 + +For highlighted builtin functions: > + :let python_no_builtin_highlight = 1 + +For highlighted standard exceptions: > + :let python_no_exception_highlight = 1 + +For highlighted doctests and code inside: > + :let python_no_doctest_highlight = 1 +or > + :let python_no_doctest_code_highlight = 1 +(first option implies second one). + +For highlighted trailing whitespace and mix of spaces and tabs: > + :let python_space_error_highlight = 1 + +If you want all possible Python highlighting (the same as setting the +preceding last option and unsetting all other ones): > + :let python_highlight_all = 1 + +Note: only existence of these options matter, not their value. You can replace + 1 above with anything. + + +QUAKE *quake.vim* *ft-quake-syntax* + +The Quake syntax definition should work for most any FPS (First Person +Shooter) based on one of the Quake engines. However, the command names vary +a bit between the three games (Quake, Quake 2, and Quake 3 Arena) so the +syntax definition checks for the existence of three global variables to allow +users to specify what commands are legal in their files. The three variables +can be set for the following effects: + +set to highlight commands only available in Quake: > + :let quake_is_quake1 = 1 + +set to highlight commands only available in Quake 2: > + :let quake_is_quake2 = 1 + +set to highlight commands only available in Quake 3 Arena: > + :let quake_is_quake3 = 1 + +Any combination of these three variables is legal, but might highlight more +commands than are actually available to you by the game. + + +READLINE *readline.vim* *ft-readline-syntax* + +The readline library is primarily used by the BASH shell, which adds quite a +few commands and options to the ones already available. To highlight these +items as well you can add the following to your |vimrc| or just type it in the +command line before loading a file with the readline syntax: > + let readline_has_bash = 1 + +This will add highlighting for the commands that BASH (version 2.05a and +later, and part earlier) adds. + + +RESTRUCTURED TEXT *rst.vim* *ft-rst-syntax* + +You may set what syntax definitions should be used for code blocks via + let rst_syntax_code_list = ['vim', 'lisp', ...] + + +REXX *rexx.vim* *ft-rexx-syntax* + +If you notice highlighting errors while scrolling backwards, which are fixed +when redrawing with CTRL-L, try setting the "rexx_minlines" internal variable +to a larger number: > + :let rexx_minlines = 50 +This will make the syntax synchronization start 50 lines before the first +displayed line. The default value is 10. The disadvantage of using a larger +number is that redrawing can become slow. + +Vim tries to guess what type a ".r" file is. If it can't be detected (from +comment lines), the default is "r". To make the default rexx add this line to +your .vimrc: *g:filetype_r* +> + :let g:filetype_r = "r" + + +RUBY *ruby.vim* *ft-ruby-syntax* + +There are a number of options to the Ruby syntax highlighting. + +By default, the "end" keyword is colorized according to the opening statement +of the block it closes. While useful, this feature can be expensive; if you +experience slow redrawing (or you are on a terminal with poor color support) +you may want to turn it off by defining the "ruby_no_expensive" variable: > + + :let ruby_no_expensive = 1 +< +In this case the same color will be used for all control keywords. + +If you do want this feature enabled, but notice highlighting errors while +scrolling backwards, which are fixed when redrawing with CTRL-L, try setting +the "ruby_minlines" variable to a value larger than 50: > + + :let ruby_minlines = 100 +< +Ideally, this value should be a number of lines large enough to embrace your +largest class or module. + +Highlighting of special identifiers can be disabled by removing the +rubyIdentifier highlighting: > + + :hi link rubyIdentifier NONE +< +This will prevent highlighting of special identifiers like "ConstantName", +"$global_var", "@@class_var", "@instance_var", "| block_param |", and +":symbol". + +Significant methods of Kernel, Module and Object are highlighted by default. +This can be disabled by defining "ruby_no_special_methods": > + + :let ruby_no_special_methods = 1 +< +This will prevent highlighting of important methods such as "require", "attr", +"private", "raise" and "proc". + +Ruby operators can be highlighted. This is enabled by defining +"ruby_operators": > + + :let ruby_operators = 1 +< +Whitespace errors can be highlighted by defining "ruby_space_errors": > + + :let ruby_space_errors = 1 +< +This will highlight trailing whitespace and tabs preceded by a space character +as errors. This can be refined by defining "ruby_no_trail_space_error" and +"ruby_no_tab_space_error" which will ignore trailing whitespace and tabs after +spaces respectively. + +Folding can be enabled by defining "ruby_fold": > + + :let ruby_fold = 1 +< +This will set the 'foldmethod' option to "syntax" and allow folding of +classes, modules, methods, code blocks, heredocs and comments. + +Folding of multiline comments can be disabled by defining +"ruby_no_comment_fold": > + + :let ruby_no_comment_fold = 1 +< + +SCHEME *scheme.vim* *ft-scheme-syntax* + +By default only R5RS keywords are highlighted and properly indented. + +MzScheme-specific stuff will be used if b:is_mzscheme or g:is_mzscheme +variables are defined. + +Also scheme.vim supports keywords of the Chicken Scheme->C compiler. Define +b:is_chicken or g:is_chicken, if you need them. + + +SDL *sdl.vim* *ft-sdl-syntax* + +The SDL highlighting probably misses a few keywords, but SDL has so many +of them it's almost impossibly to cope. + +The new standard, SDL-2000, specifies that all identifiers are +case-sensitive (which was not so before), and that all keywords can be +used either completely lowercase or completely uppercase. To have the +highlighting reflect this, you can set the following variable: > + :let sdl_2000=1 + +This also sets many new keywords. If you want to disable the old +keywords, which is probably a good idea, use: > + :let SDL_no_96=1 + + +The indentation is probably also incomplete, but right now I am very +satisfied with it for my own projects. + + +SED *sed.vim* *ft-sed-syntax* + +To make tabs stand out from regular blanks (accomplished by using Todo +highlighting on the tabs), define "highlight_sedtabs" by putting > + + :let highlight_sedtabs = 1 + +in the vimrc file. (This special highlighting only applies for tabs +inside search patterns, replacement texts, addresses or text included +by an Append/Change/Insert command.) If you enable this option, it is +also a good idea to set the tab width to one character; by doing that, +you can easily count the number of tabs in a string. + +Bugs: + + The transform command (y) is treated exactly like the substitute + command. This means that, as far as this syntax file is concerned, + transform accepts the same flags as substitute, which is wrong. + (Transform accepts no flags.) I tolerate this bug because the + involved commands need very complex treatment (95 patterns, one for + each plausible pattern delimiter). + + +SGML *sgml.vim* *ft-sgml-syntax* + +The coloring scheme for tags in the SGML file works as follows. + +The <> of opening tags are colored differently than the </> of a closing tag. +This is on purpose! For opening tags the 'Function' color is used, while for +closing tags the 'Type' color is used (See syntax.vim to check how those are +defined for you) + +Known tag names are colored the same way as statements in C. Unknown tag +names are not colored which makes it easy to spot errors. + +Note that the same is true for argument (or attribute) names. Known attribute +names are colored differently than unknown ones. + +Some SGML tags are used to change the rendering of text. The following tags +are recognized by the sgml.vim syntax coloring file and change the way normal +text is shown: <varname> <emphasis> <command> <function> <literal> +<replaceable> <ulink> and <link>. + +If you want to change how such text is rendered, you must redefine the +following syntax groups: + + - sgmlBold + - sgmlBoldItalic + - sgmlUnderline + - sgmlItalic + - sgmlLink for links + +To make this redefinition work you must redefine them all and define the +following variable in your vimrc (this is due to the order in which the files +are read during initialization) > + let sgml_my_rendering=1 + +You can also disable this rendering by adding the following line to your +vimrc file: > + let sgml_no_rendering=1 + +(Adapted from the html.vim help text by Claudio Fleiner <claudio@fleiner.com>) + + +SH *sh.vim* *ft-sh-syntax* *ft-bash-syntax* *ft-ksh-syntax* + +This covers the "normal" Unix (Bourne) sh, bash and the Korn shell. + +Vim attempts to determine which shell type is in use by specifying that +various filenames are of specific types: > + + ksh : .kshrc* *.ksh + bash: .bashrc* bashrc bash.bashrc .bash_profile* *.bash +< +If none of these cases pertain, then the first line of the file is examined +(ex. /bin/sh /bin/ksh /bin/bash). If the first line specifies a shelltype, +then that shelltype is used. However some files (ex. .profile) are known to +be shell files but the type is not apparent. Furthermore, on many systems +sh is symbolically linked to "bash" (Linux, Windows+cygwin) or "ksh" (Posix). + +One may specify a global default by instantiating one of the following three +variables in your <.vimrc>: + + ksh: > + let g:is_kornshell = 1 +< posix: (using this is the same as setting is_kornshell to 1) > + let g:is_posix = 1 +< bash: > + let g:is_bash = 1 +< sh: (default) Bourne shell > + let g:is_sh = 1 + +If there's no "#! ..." line, and the user hasn't availed himself/herself of a +default sh.vim syntax setting as just shown, then syntax/sh.vim will assume +the Bourne shell syntax. No need to quote RFCs or market penetration +statistics in error reports, please -- just select the default version of the +sh your system uses in your <.vimrc>. + +The syntax/sh.vim file provides several levels of syntax-based folding: > + + let g:sh_fold_enabled= 0 (default, no syntax folding) + let g:sh_fold_enabled= 1 (enable function folding) + let g:sh_fold_enabled= 2 (enable heredoc folding) + let g:sh_fold_enabled= 4 (enable if/do/for folding) +> +then various syntax items (HereDocuments and function bodies) become +syntax-foldable (see |:syn-fold|). You also may add these together +to get multiple types of folding: > + + let g:sh_fold_enabled= 3 (enables function and heredoc folding) + +If you notice highlighting errors while scrolling backwards which are fixed +when one redraws with CTRL-L, try setting the "sh_minlines" internal variable +to a larger number. Example: > + + let sh_minlines = 500 + +This will make syntax synchronization start 500 lines before the first +displayed line. The default value is 200. The disadvantage of using a larger +number is that redrawing can become slow. + +If you don't have much to synchronize on, displaying can be very slow. To +reduce this, the "sh_maxlines" internal variable can be set. Example: > + + let sh_maxlines = 100 +< +The default is to use the twice sh_minlines. Set it to a smaller number to +speed up displaying. The disadvantage is that highlight errors may appear. + + *g:sh_isk* *g:sh_noisk* +The shell languages appear to let "." be part of words, commands, etc; +consequently it should be in the isk for sh.vim. As of v116 of syntax/sh.vim, +syntax/sh.vim will append the "." to |'iskeyword'| by default; you may control +this behavior with: > + let g:sh_isk = '..whatever characters you want as part of iskeyword' + let g:sh_noisk= 1 " otherwise, if this exists, the isk will NOT chg +< + *sh-embed* *sh-awk* + Sh: EMBEDDING LANGUAGES~ + +You may wish to embed languages into sh. I'll give an example courtesy of +Lorance Stinson on how to do this with awk as an example. Put the following +file into $HOME/.vim/after/syntax/sh/awkembed.vim: > + + " AWK Embedding: {{{1 + " ============== + " Shamelessly ripped from aspperl.vim by Aaron Hope. + if exists("b:current_syntax") + unlet b:current_syntax + endif + syn include @AWKScript syntax/awk.vim + syn region AWKScriptCode matchgroup=AWKCommand start=+[=\\]\@<!'+ skip=+\\'+ end=+'+ contains=@AWKScript contained + syn region AWKScriptEmbedded matchgroup=AWKCommand start=+\<awk\>+ skip=+\\$+ end=+[=\\]\@<!'+me=e-1 contains=@shIdList,@shExprList2 nextgroup=AWKScriptCode + syn cluster shCommandSubList add=AWKScriptEmbedded + hi def link AWKCommand Type +< +This code will then let the awk code in the single quotes: > + awk '...awk code here...' +be highlighted using the awk highlighting syntax. Clearly this may be +extended to other languages. + + +SPEEDUP *spup.vim* *ft-spup-syntax* +(AspenTech plant simulator) + +The Speedup syntax file has some options: + +- strict_subsections : If this variable is defined, only keywords for + sections and subsections will be highlighted as statements but not + other keywords (like WITHIN in the OPERATION section). + +- highlight_types : Definition of this variable causes stream types + like temperature or pressure to be highlighted as Type, not as a + plain Identifier. Included are the types that are usually found in + the DECLARE section; if you defined own types, you have to include + them in the syntax file. + +- oneline_comments : this value ranges from 1 to 3 and determines the + highlighting of # style comments. + + oneline_comments = 1 : allow normal Speedup code after an even + number of #s. + + oneline_comments = 2 : show code starting with the second # as + error. This is the default setting. + + oneline_comments = 3 : show the whole line as error if it contains + more than one #. + +Since especially OPERATION sections tend to become very large due to +PRESETting variables, syncing may be critical. If your computer is +fast enough, you can increase minlines and/or maxlines near the end of +the syntax file. + + +SQL *sql.vim* *ft-sql-syntax* + *sqlinformix.vim* *ft-sqlinformix-syntax* + *sqlanywhere.vim* *ft-sqlanywhere-syntax* + +While there is an ANSI standard for SQL, most database engines add their own +custom extensions. Vim currently supports the Oracle and Informix dialects of +SQL. Vim assumes "*.sql" files are Oracle SQL by default. + +Vim currently has SQL support for a variety of different vendors via syntax +scripts. You can change Vim's default from Oracle to any of the current SQL +supported types. You can also easily alter the SQL dialect being used on a +buffer by buffer basis. + +For more detailed instructions see |ft_sql.txt|. + + +TCSH *tcsh.vim* *ft-tcsh-syntax* + +This covers the shell named "tcsh". It is a superset of csh. See |csh.vim| +for how the filetype is detected. + +Tcsh does not allow \" in strings unless the "backslash_quote" shell variable +is set. If you want VIM to assume that no backslash quote constructs exist add +this line to your .vimrc: > + + :let tcsh_backslash_quote = 0 + +If you notice highlighting errors while scrolling backwards, which are fixed +when redrawing with CTRL-L, try setting the "tcsh_minlines" internal variable +to a larger number: > + + :let tcsh_minlines = 1000 + +This will make the syntax synchronization start 1000 lines before the first +displayed line. If you set "tcsh_minlines" to "fromstart", then +synchronization is done from the start of the file. The default value for +tcsh_minlines is 100. The disadvantage of using a larger number is that +redrawing can become slow. + + +TEX *tex.vim* *ft-tex-syntax* *latex-syntax* + + Tex Contents~ + Tex: Want Syntax Folding? |tex-folding| + Tex: No Spell Checking Wanted |g:tex_nospell| + Tex: Don't Want Spell Checking In Comments? |tex-nospell| + Tex: Want Spell Checking in Verbatim Zones? |tex-verb| + Tex: Run-on Comments or MathZones |tex-runon| + Tex: Slow Syntax Highlighting? |tex-slow| + Tex: Want To Highlight More Commands? |tex-morecommands| + Tex: Excessive Error Highlighting? |tex-error| + Tex: Need a new Math Group? |tex-math| + Tex: Starting a New Style? |tex-style| + Tex: Taking Advantage of Conceal Mode |tex-conceal| + Tex: Selective Conceal Mode |g:tex_conceal| + Tex: Controlling iskeyword |g:tex_isk| + + *tex-folding* *g:tex_fold_enabled* + Tex: Want Syntax Folding? ~ + +As of version 28 of <syntax/tex.vim>, syntax-based folding of parts, chapters, +sections, subsections, etc are supported. Put > + let g:tex_fold_enabled=1 +in your <.vimrc>, and :set fdm=syntax. I suggest doing the latter via a +modeline at the end of your LaTeX file: > + % vim: fdm=syntax +If your system becomes too slow, then you might wish to look into > + https://vimhelp.appspot.com/vim_faq.txt.html#faq-29.7 +< + *g:tex_nospell* + Tex: No Spell Checking Wanted~ + +If you don't want spell checking anywhere in your LaTeX document, put > + let g:tex_nospell=1 +into your .vimrc. If you merely wish to suppress spell checking inside +comments only, see |g:tex_comment_nospell|. + + *tex-nospell* *g:tex_comment_nospell* + Tex: Don't Want Spell Checking In Comments? ~ + +Some folks like to include things like source code in comments and so would +prefer that spell checking be disabled in comments in LaTeX files. To do +this, put the following in your <.vimrc>: > + let g:tex_comment_nospell= 1 +If you want to suppress spell checking everywhere inside your LaTeX document, +see |g:tex_nospell|. + + *tex-verb* *g:tex_verbspell* + Tex: Want Spell Checking in Verbatim Zones?~ + +Often verbatim regions are used for things like source code; seldom does +one want source code spell-checked. However, for those of you who do +want your verbatim zones spell-checked, put the following in your <.vimrc>: > + let g:tex_verbspell= 1 +< + *tex-runon* *tex-stopzone* + Tex: Run-on Comments or MathZones ~ + +The <syntax/tex.vim> highlighting supports TeX, LaTeX, and some AmsTeX. The +highlighting supports three primary zones/regions: normal, texZone, and +texMathZone. Although considerable effort has been made to have these zones +terminate properly, zones delineated by $..$ and $$..$$ cannot be synchronized +as there's no difference between start and end patterns. Consequently, a +special "TeX comment" has been provided > + %stopzone +which will forcibly terminate the highlighting of either a texZone or a +texMathZone. + + *tex-slow* *tex-sync* + Tex: Slow Syntax Highlighting? ~ + +If you have a slow computer, you may wish to reduce the values for > + :syn sync maxlines=200 + :syn sync minlines=50 +(especially the latter). If your computer is fast, you may wish to +increase them. This primarily affects synchronizing (i.e. just what group, +if any, is the text at the top of the screen supposed to be in?). + +Another cause of slow highlighting is due to syntax-driven folding; see +|tex-folding| for a way around this. + + *g:tex_fast* + +Finally, if syntax highlighting is still too slow, you may set > + + :let g:tex_fast= "" + +in your .vimrc. Used this way, the g:tex_fast variable causes the syntax +highlighting script to avoid defining any regions and associated +synchronization. The result will be much faster syntax highlighting; the +price: you will no longer have as much highlighting or any syntax-based +folding, and you will be missing syntax-based error checking. + +You may decide that some syntax is acceptable; you may use the following table +selectively to enable just some syntax highlighting: > + + b : allow bold and italic syntax + c : allow texComment syntax + m : allow texMatcher syntax (ie. {...} and [...]) + M : allow texMath syntax + p : allow parts, chapter, section, etc syntax + r : allow texRefZone syntax (nocite, bibliography, label, pageref, eqref) + s : allow superscript/subscript regions + S : allow texStyle syntax + v : allow verbatim syntax + V : allow texNewEnv and texNewCmd syntax +< +As an example, let g:tex_fast= "M" will allow math-associated highlighting +but suppress all the other region-based syntax highlighting. + + *tex-morecommands* *tex-package* + Tex: Want To Highlight More Commands? ~ + +LaTeX is a programmable language, and so there are thousands of packages full +of specialized LaTeX commands, syntax, and fonts. If you're using such a +package you'll often wish that the distributed syntax/tex.vim would support +it. However, clearly this is impractical. So please consider using the +techniques in |mysyntaxfile-add| to extend or modify the highlighting provided +by syntax/tex.vim. Please consider uploading any extensions that you write, +which typically would go in $HOME/after/syntax/tex/[pkgname].vim, to +http://vim.sf.net/. + + *tex-error* *g:tex_no_error* + Tex: Excessive Error Highlighting? ~ + +The <tex.vim> supports lexical error checking of various sorts. Thus, +although the error checking is ofttimes very useful, it can indicate +errors where none actually are. If this proves to be a problem for you, +you may put in your <.vimrc> the following statement: > + let g:tex_no_error=1 +and all error checking by <syntax/tex.vim> will be suppressed. + + *tex-math* + Tex: Need a new Math Group? ~ + +If you want to include a new math group in your LaTeX, the following +code shows you an example as to how you might do so: > + call TexNewMathZone(sfx,mathzone,starform) +You'll want to provide the new math group with a unique suffix +(currently, A-L and V-Z are taken by <syntax/tex.vim> itself). +As an example, consider how eqnarray is set up by <syntax/tex.vim>: > + call TexNewMathZone("D","eqnarray",1) +You'll need to change "mathzone" to the name of your new math group, +and then to the call to it in .vim/after/syntax/tex.vim. +The "starform" variable, if true, implies that your new math group +has a starred form (ie. eqnarray*). + + *tex-style* *b:tex_stylish* + Tex: Starting a New Style? ~ + +One may use "\makeatletter" in *.tex files, thereby making the use of "@" in +commands available. However, since the *.tex file doesn't have one of the +following suffices: sty cls clo dtx ltx, the syntax highlighting will flag +such use of @ as an error. To solve this: > + + :let b:tex_stylish = 1 + :set ft=tex + +Putting "let g:tex_stylish=1" into your <.vimrc> will make <syntax/tex.vim> +always accept such use of @. + + *tex-cchar* *tex-cole* *tex-conceal* + Tex: Taking Advantage of Conceal Mode~ + +If you have |'conceallevel'| set to 2 and if your encoding is utf-8, then a +number of character sequences can be translated into appropriate utf-8 glyphs, +including various accented characters, Greek characters in MathZones, and +superscripts and subscripts in MathZones. Not all characters can be made into +superscripts or subscripts; the constraint is due to what utf-8 supports. +In fact, only a few characters are supported as subscripts. + +One way to use this is to have vertically split windows (see |CTRL-W_v|); one +with |'conceallevel'| at 0 and the other at 2; and both using |'scrollbind'|. + + *g:tex_conceal* + Tex: Selective Conceal Mode~ + +You may selectively use conceal mode by setting g:tex_conceal in your +<.vimrc>. By default, g:tex_conceal is set to "admgs" to enable concealment +for the following sets of characters: > + + a = accents/ligatures + b = bold and italic + d = delimiters + m = math symbols + g = Greek + s = superscripts/subscripts +< +By leaving one or more of these out, the associated conceal-character +substitution will not be made. + + *g:tex_isk* *g:tex_stylish* + Tex: Controlling iskeyword~ + +Normally, LaTeX keywords support 0-9, a-z, A-z, and 192-255 only. Latex +keywords don't support the underscore - except when in *.sty files. The +syntax highlighting script handles this with the following logic: + + * If g:tex_stylish exists and is 1 + then the file will be treated as a "sty" file, so the "_" + will be allowed as part of keywords + (irregardless of g:tex_isk) + * Else if the file's suffix is sty, cls, clo, dtx, or ltx, + then the file will be treated as a "sty" file, so the "_" + will be allowed as part of keywords + (irregardless of g:tex_isk) + + * If g:tex_isk exists, then it will be used for the local 'iskeyword' + * Else the local 'iskeyword' will be set to 48-57,a-z,A-Z,192-255 + + +TF *tf.vim* *ft-tf-syntax* + +There is one option for the tf syntax highlighting. + +For syncing, minlines defaults to 100. If you prefer another value, you can +set "tf_minlines" to the value you desire. Example: > + + :let tf_minlines = your choice +< +VIM *vim.vim* *ft-vim-syntax* + *g:vimsyn_minlines* *g:vimsyn_maxlines* +There is a trade-off between more accurate syntax highlighting versus screen +updating speed. To improve accuracy, you may wish to increase the +g:vimsyn_minlines variable. The g:vimsyn_maxlines variable may be used to +improve screen updating rates (see |:syn-sync| for more on this). > + + g:vimsyn_minlines : used to set synchronization minlines + g:vimsyn_maxlines : used to set synchronization maxlines +< + (g:vim_minlines and g:vim_maxlines are deprecated variants of + these two options) + + *g:vimsyn_embed* +The g:vimsyn_embed option allows users to select what, if any, types of +embedded script highlighting they wish to have. > + + g:vimsyn_embed == 0 : don't embed any scripts + g:vimsyn_embed =~ 'm' : support embedded mzscheme + g:vimsyn_embed =~ 'p' : support embedded perl + g:vimsyn_embed =~ 'P' : support embedded python + g:vimsyn_embed =~ 'r' : support embedded ruby + g:vimsyn_embed =~ 't' : support embedded tcl +< +By default, g:vimsyn_embed is a string supporting interpreters that your vim +itself supports. Concatenate multiple characters to support multiple types +of embedded interpreters; ie. g:vimsyn_embed= "mp" supports embedded mzscheme +and embedded perl. + *g:vimsyn_folding* + +Some folding is now supported with syntax/vim.vim: > + + g:vimsyn_folding == 0 or doesn't exist: no syntax-based folding + g:vimsyn_folding =~ 'a' : augroups + g:vimsyn_folding =~ 'f' : fold functions + g:vimsyn_folding =~ 'm' : fold mzscheme script + g:vimsyn_folding =~ 'p' : fold perl script + g:vimsyn_folding =~ 'P' : fold python script + g:vimsyn_folding =~ 'r' : fold ruby script + g:vimsyn_folding =~ 't' : fold tcl script +< + *g:vimsyn_noerror* +Not all error highlighting that syntax/vim.vim does may be correct; VimL is a +difficult language to highlight correctly. A way to suppress error +highlighting is to put the following line in your |vimrc|: > + + let g:vimsyn_noerror = 1 +< + + +XF86CONFIG *xf86conf.vim* *ft-xf86conf-syntax* + +The syntax of XF86Config file differs in XFree86 v3.x and v4.x. Both +variants are supported. Automatic detection is used, but is far from perfect. +You may need to specify the version manually. Set the variable +xf86conf_xfree86_version to 3 or 4 according to your XFree86 version in +your .vimrc. Example: > + :let xf86conf_xfree86_version=3 +When using a mix of versions, set the b:xf86conf_xfree86_version variable. + +Note that spaces and underscores in option names are not supported. Use +"SyncOnGreen" instead of "__s yn con gr_e_e_n" if you want the option name +highlighted. + + +XML *xml.vim* *ft-xml-syntax* + +Xml namespaces are highlighted by default. This can be inhibited by +setting a global variable: > + + :let g:xml_namespace_transparent=1 +< + *xml-folding* +The xml syntax file provides syntax |folding| (see |:syn-fold|) between +start and end tags. This can be turned on by > + + :let g:xml_syntax_folding = 1 + :set foldmethod=syntax + +Note: syntax folding might slow down syntax highlighting significantly, +especially for large files. + + +X Pixmaps (XPM) *xpm.vim* *ft-xpm-syntax* + +xpm.vim creates its syntax items dynamically based upon the contents of the +XPM file. Thus if you make changes e.g. in the color specification strings, +you have to source it again e.g. with ":set syn=xpm". + +To copy a pixel with one of the colors, yank a "pixel" with "yl" and insert it +somewhere else with "P". + +Do you want to draw with the mouse? Try the following: > + :function! GetPixel() + : let c = getline(".")[col(".") - 1] + : echo c + : exe "noremap <LeftMouse> <LeftMouse>r".c + : exe "noremap <LeftDrag> <LeftMouse>r".c + :endfunction + :noremap <RightMouse> <LeftMouse>:call GetPixel()<CR> + :set guicursor=n:hor20 " to see the color beneath the cursor +This turns the right button into a pipette and the left button into a pen. +It will work with XPM files that have one character per pixel only and you +must not click outside of the pixel strings, but feel free to improve it. + +It will look much better with a font in a quadratic cell size, e.g. for X: > + :set guifont=-*-clean-medium-r-*-*-8-*-*-*-*-80-* + +============================================================================== +5. Defining a syntax *:syn-define* *E410* + +Vim understands three types of syntax items: + +1. Keyword + It can only contain keyword characters, according to the 'iskeyword' + option. It cannot contain other syntax items. It will only match with a + complete word (there are no keyword characters before or after the match). + The keyword "if" would match in "if(a=b)", but not in "ifdef x", because + "(" is not a keyword character and "d" is. + +2. Match + This is a match with a single regexp pattern. + +3. Region + This starts at a match of the "start" regexp pattern and ends with a match + with the "end" regexp pattern. Any other text can appear in between. A + "skip" regexp pattern can be used to avoid matching the "end" pattern. + +Several syntax ITEMs can be put into one syntax GROUP. For a syntax group +you can give highlighting attributes. For example, you could have an item +to define a "/* .. */" comment and another one that defines a "// .." comment, +and put them both in the "Comment" group. You can then specify that a +"Comment" will be in bold font and have a blue color. You are free to make +one highlight group for one syntax item, or put all items into one group. +This depends on how you want to specify your highlighting attributes. Putting +each item in its own group results in having to specify the highlighting +for a lot of groups. + +Note that a syntax group and a highlight group are similar. For a highlight +group you will have given highlight attributes. These attributes will be used +for the syntax group with the same name. + +In case more than one item matches at the same position, the one that was +defined LAST wins. Thus you can override previously defined syntax items by +using an item that matches the same text. But a keyword always goes before a +match or region. And a keyword with matching case always goes before a +keyword with ignoring case. + + +PRIORITY *:syn-priority* + +When several syntax items may match, these rules are used: + +1. When multiple Match or Region items start in the same position, the item + defined last has priority. +2. A Keyword has priority over Match and Region items. +3. An item that starts in an earlier position has priority over items that + start in later positions. + + +DEFINING CASE *:syn-case* *E390* + +:sy[ntax] case [match | ignore] + This defines if the following ":syntax" commands will work with + matching case, when using "match", or with ignoring case, when using + "ignore". Note that any items before this are not affected, and all + items until the next ":syntax case" command are affected. + + +SPELL CHECKING *:syn-spell* + +:sy[ntax] spell [toplevel | notoplevel | default] + This defines where spell checking is to be done for text that is not + in a syntax item: + + toplevel: Text is spell checked. + notoplevel: Text is not spell checked. + default: When there is a @Spell cluster no spell checking. + + For text in syntax items use the @Spell and @NoSpell clusters + |spell-syntax|. When there is no @Spell and no @NoSpell cluster then + spell checking is done for "default" and "toplevel". + + To activate spell checking the 'spell' option must be set. + + +DEFINING KEYWORDS *:syn-keyword* + +:sy[ntax] keyword {group-name} [{options}] {keyword} .. [{options}] + + This defines a number of keywords. + + {group-name} Is a syntax group name such as "Comment". + [{options}] See |:syn-arguments| below. + {keyword} .. Is a list of keywords which are part of this group. + + Example: > + :syntax keyword Type int long char +< + The {options} can be given anywhere in the line. They will apply to + all keywords given, also for options that come after a keyword. + These examples do exactly the same: > + :syntax keyword Type contained int long char + :syntax keyword Type int long contained char + :syntax keyword Type int long char contained +< *E789* + When you have a keyword with an optional tail, like Ex commands in + Vim, you can put the optional characters inside [], to define all the + variations at once: > + :syntax keyword vimCommand ab[breviate] n[ext] +< + Don't forget that a keyword can only be recognized if all the + characters are included in the 'iskeyword' option. If one character + isn't, the keyword will never be recognized. + Multi-byte characters can also be used. These do not have to be in + 'iskeyword'. + + A keyword always has higher priority than a match or region, the + keyword is used if more than one item matches. Keywords do not nest + and a keyword can't contain anything else. + + Note that when you have a keyword that is the same as an option (even + one that isn't allowed here), you can not use it. Use a match + instead. + + The maximum length of a keyword is 80 characters. + + The same keyword can be defined multiple times, when its containment + differs. For example, you can define the keyword once not contained + and use one highlight group, and once contained, and use a different + highlight group. Example: > + :syn keyword vimCommand tag + :syn keyword vimSetting contained tag +< When finding "tag" outside of any syntax item, the "vimCommand" + highlight group is used. When finding "tag" in a syntax item that + contains "vimSetting", the "vimSetting" group is used. + + +DEFINING MATCHES *:syn-match* + +:sy[ntax] match {group-name} [{options}] [excludenl] {pattern} [{options}] + + This defines one match. + + {group-name} A syntax group name such as "Comment". + [{options}] See |:syn-arguments| below. + [excludenl] Don't make a pattern with the end-of-line "$" + extend a containing match or region. Must be + given before the pattern. |:syn-excludenl| + {pattern} The search pattern that defines the match. + See |:syn-pattern| below. + Note that the pattern may match more than one + line, which makes the match depend on where + Vim starts searching for the pattern. You + need to make sure syncing takes care of this. + + Example (match a character constant): > + :syntax match Character /'.'/hs=s+1,he=e-1 +< + +DEFINING REGIONS *:syn-region* *:syn-start* *:syn-skip* *:syn-end* + *E398* *E399* +:sy[ntax] region {group-name} [{options}] + [matchgroup={group-name}] + [keepend] + [extend] + [excludenl] + start={start_pattern} .. + [skip={skip_pattern}] + end={end_pattern} .. + [{options}] + + This defines one region. It may span several lines. + + {group-name} A syntax group name such as "Comment". + [{options}] See |:syn-arguments| below. + [matchgroup={group-name}] The syntax group to use for the following + start or end pattern matches only. Not used + for the text in between the matched start and + end patterns. Use NONE to reset to not using + a different group for the start or end match. + See |:syn-matchgroup|. + keepend Don't allow contained matches to go past a + match with the end pattern. See + |:syn-keepend|. + extend Override a "keepend" for an item this region + is contained in. See |:syn-extend|. + excludenl Don't make a pattern with the end-of-line "$" + extend a containing match or item. Only + useful for end patterns. Must be given before + the patterns it applies to. |:syn-excludenl| + start={start_pattern} The search pattern that defines the start of + the region. See |:syn-pattern| below. + skip={skip_pattern} The search pattern that defines text inside + the region where not to look for the end + pattern. See |:syn-pattern| below. + end={end_pattern} The search pattern that defines the end of + the region. See |:syn-pattern| below. + + Example: > + :syntax region String start=+"+ skip=+\\"+ end=+"+ +< + The start/skip/end patterns and the options can be given in any order. + There can be zero or one skip pattern. There must be one or more + start and end patterns. This means that you can omit the skip + pattern, but you must give at least one start and one end pattern. It + is allowed to have white space before and after the equal sign + (although it mostly looks better without white space). + + When more than one start pattern is given, a match with one of these + is sufficient. This means there is an OR relation between the start + patterns. The last one that matches is used. The same is true for + the end patterns. + + The search for the end pattern starts right after the start pattern. + Offsets are not used for this. This implies that the match for the + end pattern will never overlap with the start pattern. + + The skip and end pattern can match across line breaks, but since the + search for the pattern can start in any line it often does not do what + you want. The skip pattern doesn't avoid a match of an end pattern in + the next line. Use single-line patterns to avoid trouble. + + Note: The decision to start a region is only based on a matching start + pattern. There is no check for a matching end pattern. This does NOT + work: > + :syn region First start="(" end=":" + :syn region Second start="(" end=";" +< The Second always matches before the First (last defined pattern has + higher priority). The Second region then continues until the next + ';', no matter if there is a ':' before it. Using a match does work: > + :syn match First "(\_.\{-}:" + :syn match Second "(\_.\{-};" +< This pattern matches any character or line break with "\_." and + repeats that with "\{-}" (repeat as few as possible). + + *:syn-keepend* + By default, a contained match can obscure a match for the end pattern. + This is useful for nesting. For example, a region that starts with + "{" and ends with "}", can contain another region. An encountered "}" + will then end the contained region, but not the outer region: + { starts outer "{}" region + { starts contained "{}" region + } ends contained "{}" region + } ends outer "{} region + If you don't want this, the "keepend" argument will make the matching + of an end pattern of the outer region also end any contained item. + This makes it impossible to nest the same region, but allows for + contained items to highlight parts of the end pattern, without causing + that to skip the match with the end pattern. Example: > + :syn match vimComment +"[^"]\+$+ + :syn region vimCommand start="set" end="$" contains=vimComment keepend +< The "keepend" makes the vimCommand always end at the end of the line, + even though the contained vimComment includes a match with the <EOL>. + + When "keepend" is not used, a match with an end pattern is retried + after each contained match. When "keepend" is included, the first + encountered match with an end pattern is used, truncating any + contained matches. + *:syn-extend* + The "keepend" behavior can be changed by using the "extend" argument. + When an item with "extend" is contained in an item that uses + "keepend", the "keepend" is ignored and the containing region will be + extended. + This can be used to have some contained items extend a region while + others don't. Example: > + + :syn region htmlRef start=+<a>+ end=+</a>+ keepend contains=htmlItem,htmlScript + :syn match htmlItem +<[^>]*>+ contained + :syn region htmlScript start=+<script+ end=+</script[^>]*>+ contained extend + +< Here the htmlItem item does not make the htmlRef item continue + further, it is only used to highlight the <> items. The htmlScript + item does extend the htmlRef item. + + Another example: > + :syn region xmlFold start="<a>" end="</a>" fold transparent keepend extend +< This defines a region with "keepend", so that its end cannot be + changed by contained items, like when the "</a>" is matched to + highlight it differently. But when the xmlFold region is nested (it + includes itself), the "extend" applies, so that the "</a>" of a nested + region only ends that region, and not the one it is contained in. + + *:syn-excludenl* + When a pattern for a match or end pattern of a region includes a '$' + to match the end-of-line, it will make a region item that it is + contained in continue on the next line. For example, a match with + "\\$" (backslash at the end of the line) can make a region continue + that would normally stop at the end of the line. This is the default + behavior. If this is not wanted, there are two ways to avoid it: + 1. Use "keepend" for the containing item. This will keep all + contained matches from extending the match or region. It can be + used when all contained items must not extend the containing item. + 2. Use "excludenl" in the contained item. This will keep that match + from extending the containing match or region. It can be used if + only some contained items must not extend the containing item. + "excludenl" must be given before the pattern it applies to. + + *:syn-matchgroup* + "matchgroup" can be used to highlight the start and/or end pattern + differently than the body of the region. Example: > + :syntax region String matchgroup=Quote start=+"+ skip=+\\"+ end=+"+ +< This will highlight the quotes with the "Quote" group, and the text in + between with the "String" group. + The "matchgroup" is used for all start and end patterns that follow, + until the next "matchgroup". Use "matchgroup=NONE" to go back to not + using a matchgroup. + + In a start or end pattern that is highlighted with "matchgroup" the + contained items of the region are not used. This can be used to avoid + that a contained item matches in the start or end pattern match. When + using "transparent", this does not apply to a start or end pattern + match that is highlighted with "matchgroup". + + Here is an example, which highlights three levels of parentheses in + different colors: > + :sy region par1 matchgroup=par1 start=/(/ end=/)/ contains=par2 + :sy region par2 matchgroup=par2 start=/(/ end=/)/ contains=par3 contained + :sy region par3 matchgroup=par3 start=/(/ end=/)/ contains=par1 contained + :hi par1 ctermfg=red guifg=red + :hi par2 ctermfg=blue guifg=blue + :hi par3 ctermfg=darkgreen guifg=darkgreen +< + *E849* +The maximum number of syntax groups is 19999. + +============================================================================== +6. :syntax arguments *:syn-arguments* + +The :syntax commands that define syntax items take a number of arguments. +The common ones are explained here. The arguments may be given in any order +and may be mixed with patterns. + +Not all commands accept all arguments. This table shows which arguments +can not be used for all commands: + *E395* + contains oneline fold display extend concealends~ +:syntax keyword - - - - - - +:syntax match yes - yes yes yes - +:syntax region yes yes yes yes yes yes + +These arguments can be used for all three commands: + conceal + cchar + contained + containedin + nextgroup + transparent + skipwhite + skipnl + skipempty + +conceal *conceal* *:syn-conceal* + +When the "conceal" argument is given, the item is marked as concealable. +Whether or not it is actually concealed depends on the value of the +'conceallevel' option. The 'concealcursor' option is used to decide whether +concealable items in the current line are displayed unconcealed to be able to +edit the line. + +concealends *:syn-concealends* + +When the "concealends" argument is given, the start and end matches of +the region, but not the contents of the region, are marked as concealable. +Whether or not they are actually concealed depends on the setting on the +'conceallevel' option. The ends of a region can only be concealed separately +in this way when they have their own highlighting via "matchgroup" + +cchar *:syn-cchar* + *E844* +The "cchar" argument defines the character shown in place of the item +when it is concealed (setting "cchar" only makes sense when the conceal +argument is given.) If "cchar" is not set then the default conceal +character defined in the 'listchars' option is used. The character cannot be +a control character such as Tab. Example: > + :syntax match Entity "&" conceal cchar=& +See |hl-Conceal| for highlighting. + +contained *:syn-contained* + +When the "contained" argument is given, this item will not be recognized at +the top level, but only when it is mentioned in the "contains" field of +another match. Example: > + :syntax keyword Todo TODO contained + :syntax match Comment "//.*" contains=Todo + + +display *:syn-display* + +If the "display" argument is given, this item will be skipped when the +detected highlighting will not be displayed. This will speed up highlighting, +by skipping this item when only finding the syntax state for the text that is +to be displayed. + +Generally, you can use "display" for match and region items that meet these +conditions: +- The item does not continue past the end of a line. Example for C: A region + for a "/*" comment can't contain "display", because it continues on the next + line. +- The item does not contain items that continue past the end of the line or + make it continue on the next line. +- The item does not change the size of any item it is contained in. Example + for C: A match with "\\$" in a preprocessor match can't have "display", + because it may make that preprocessor match shorter. +- The item does not allow other items to match that didn't match otherwise, + and that item may extend the match too far. Example for C: A match for a + "//" comment can't use "display", because a "/*" inside that comment would + match then and start a comment which extends past the end of the line. + +Examples, for the C language, where "display" can be used: +- match with a number +- match with a label + + +transparent *:syn-transparent* + +If the "transparent" argument is given, this item will not be highlighted +itself, but will take the highlighting of the item it is contained in. This +is useful for syntax items that don't need any highlighting but are used +only to skip over a part of the text. + +The "contains=" argument is also inherited from the item it is contained in, +unless a "contains" argument is given for the transparent item itself. To +avoid that unwanted items are contained, use "contains=NONE". Example, which +highlights words in strings, but makes an exception for "vim": > + :syn match myString /'[^']*'/ contains=myWord,myVim + :syn match myWord /\<[a-z]*\>/ contained + :syn match myVim /\<vim\>/ transparent contained contains=NONE + :hi link myString String + :hi link myWord Comment +Since the "myVim" match comes after "myWord" it is the preferred match (last +match in the same position overrules an earlier one). The "transparent" +argument makes the "myVim" match use the same highlighting as "myString". But +it does not contain anything. If the "contains=NONE" argument would be left +out, then "myVim" would use the contains argument from myString and allow +"myWord" to be contained, which will be highlighted as a Constant. This +happens because a contained match doesn't match inside itself in the same +position, thus the "myVim" match doesn't overrule the "myWord" match here. + +When you look at the colored text, it is like looking at layers of contained +items. The contained item is on top of the item it is contained in, thus you +see the contained item. When a contained item is transparent, you can look +through, thus you see the item it is contained in. In a picture: + + look from here + + | | | | | | + V V V V V V + + xxxx yyy more contained items + .................... contained item (transparent) + ============================= first item + +The 'x', 'y' and '=' represent a highlighted syntax item. The '.' represent a +transparent group. + +What you see is: + + =======xxxx=======yyy======== + +Thus you look through the transparent "....". + + +oneline *:syn-oneline* + +The "oneline" argument indicates that the region does not cross a line +boundary. It must match completely in the current line. However, when the +region has a contained item that does cross a line boundary, it continues on +the next line anyway. A contained item can be used to recognize a line +continuation pattern. But the "end" pattern must still match in the first +line, otherwise the region doesn't even start. + +When the start pattern includes a "\n" to match an end-of-line, the end +pattern must be found in the same line as where the start pattern ends. The +end pattern may also include an end-of-line. Thus the "oneline" argument +means that the end of the start pattern and the start of the end pattern must +be within one line. This can't be changed by a skip pattern that matches a +line break. + + +fold *:syn-fold* + +The "fold" argument makes the fold level increase by one for this item. +Example: > + :syn region myFold start="{" end="}" transparent fold + :syn sync fromstart + :set foldmethod=syntax +This will make each {} block form one fold. + +The fold will start on the line where the item starts, and end where the item +ends. If the start and end are within the same line, there is no fold. +The 'foldnestmax' option limits the nesting of syntax folds. +{not available when Vim was compiled without |+folding| feature} + + + *:syn-contains* *E405* *E406* *E407* *E408* *E409* +contains={groupname},.. + +The "contains" argument is followed by a list of syntax group names. These +groups will be allowed to begin inside the item (they may extend past the +containing group's end). This allows for recursive nesting of matches and +regions. If there is no "contains" argument, no groups will be contained in +this item. The group names do not need to be defined before they can be used +here. + +contains=ALL + If the only item in the contains list is "ALL", then all + groups will be accepted inside the item. + +contains=ALLBUT,{group-name},.. + If the first item in the contains list is "ALLBUT", then all + groups will be accepted inside the item, except the ones that + are listed. Example: > + :syntax region Block start="{" end="}" ... contains=ALLBUT,Function + +contains=TOP + If the first item in the contains list is "TOP", then all + groups will be accepted that don't have the "contained" + argument. +contains=TOP,{group-name},.. + Like "TOP", but excluding the groups that are listed. + +contains=CONTAINED + If the first item in the contains list is "CONTAINED", then + all groups will be accepted that have the "contained" + argument. +contains=CONTAINED,{group-name},.. + Like "CONTAINED", but excluding the groups that are + listed. + + +The {group-name} in the "contains" list can be a pattern. All group names +that match the pattern will be included (or excluded, if "ALLBUT" is used). +The pattern cannot contain white space or a ','. Example: > + ... contains=Comment.*,Keyw[0-3] +The matching will be done at moment the syntax command is executed. Groups +that are defined later will not be matched. Also, if the current syntax +command defines a new group, it is not matched. Be careful: When putting +syntax commands in a file you can't rely on groups NOT being defined, because +the file may have been sourced before, and ":syn clear" doesn't remove the +group names. + +The contained groups will also match in the start and end patterns of a +region. If this is not wanted, the "matchgroup" argument can be used +|:syn-matchgroup|. The "ms=" and "me=" offsets can be used to change the +region where contained items do match. Note that this may also limit the +area that is highlighted + + +containedin={groupname}... *:syn-containedin* + +The "containedin" argument is followed by a list of syntax group names. The +item will be allowed to begin inside these groups. This works as if the +containing item has a "contains=" argument that includes this item. + +The {groupname}... can be used just like for "contains", as explained above. + +This is useful when adding a syntax item afterwards. An item can be told to +be included inside an already existing item, without changing the definition +of that item. For example, to highlight a word in a C comment after loading +the C syntax: > + :syn keyword myword HELP containedin=cComment contained +Note that "contained" is also used, to avoid that the item matches at the top +level. + +Matches for "containedin" are added to the other places where the item can +appear. A "contains" argument may also be added as usual. Don't forget that +keywords never contain another item, thus adding them to "containedin" won't +work. + + +nextgroup={groupname},.. *:syn-nextgroup* + +The "nextgroup" argument is followed by a list of syntax group names, +separated by commas (just like with "contains", so you can also use patterns). + +If the "nextgroup" argument is given, the mentioned syntax groups will be +tried for a match, after the match or region ends. If none of the groups have +a match, highlighting continues normally. If there is a match, this group +will be used, even when it is not mentioned in the "contains" field of the +current group. This is like giving the mentioned group priority over all +other groups. Example: > + :syntax match ccFoobar "Foo.\{-}Bar" contains=ccFoo + :syntax match ccFoo "Foo" contained nextgroup=ccFiller + :syntax region ccFiller start="." matchgroup=ccBar end="Bar" contained + +This will highlight "Foo" and "Bar" differently, and only when there is a +"Bar" after "Foo". In the text line below, "f" shows where ccFoo is used for +highlighting, and "bbb" where ccBar is used. > + + Foo asdfasd Bar asdf Foo asdf Bar asdf + fff bbb fff bbb + +Note the use of ".\{-}" to skip as little as possible until the next Bar. +when ".*" would be used, the "asdf" in between "Bar" and "Foo" would be +highlighted according to the "ccFoobar" group, because the ccFooBar match +would include the first "Foo" and the last "Bar" in the line (see |pattern|). + + +skipwhite *:syn-skipwhite* +skipnl *:syn-skipnl* +skipempty *:syn-skipempty* + +These arguments are only used in combination with "nextgroup". They can be +used to allow the next group to match after skipping some text: + skipwhite skip over space and tab characters + skipnl skip over the end of a line + skipempty skip over empty lines (implies a "skipnl") + +When "skipwhite" is present, the white space is only skipped if there is no +next group that matches the white space. + +When "skipnl" is present, the match with nextgroup may be found in the next +line. This only happens when the current item ends at the end of the current +line! When "skipnl" is not present, the nextgroup will only be found after +the current item in the same line. + +When skipping text while looking for a next group, the matches for other +groups are ignored. Only when no next group matches, other items are tried +for a match again. This means that matching a next group and skipping white +space and <EOL>s has a higher priority than other items. + +Example: > + :syn match ifstart "\<if.*" nextgroup=ifline skipwhite skipempty + :syn match ifline "[^ \t].*" nextgroup=ifline skipwhite skipempty contained + :syn match ifline "endif" contained +Note that the "[^ \t].*" match matches all non-white text. Thus it would also +match "endif". Therefore the "endif" match is put last, so that it takes +precedence. +Note that this example doesn't work for nested "if"s. You need to add +"contains" arguments to make that work (omitted for simplicity of the +example). + +IMPLICIT CONCEAL *:syn-conceal-implicit* + +:sy[ntax] conceal [on|off] + This defines if the following ":syntax" commands will define keywords, + matches or regions with the "conceal" flag set. After ":syn conceal + on", all subsequent ":syn keyword", ":syn match" or ":syn region" + defined will have the "conceal" flag set implicitly. ":syn conceal + off" returns to the normal state where the "conceal" flag must be + given explicitly. + +============================================================================== +7. Syntax patterns *:syn-pattern* *E401* *E402* + +In the syntax commands, a pattern must be surrounded by two identical +characters. This is like it works for the ":s" command. The most common to +use is the double quote. But if the pattern contains a double quote, you can +use another character that is not used in the pattern. Examples: > + :syntax region Comment start="/\*" end="\*/" + :syntax region String start=+"+ end=+"+ skip=+\\"+ + +See |pattern| for the explanation of what a pattern is. Syntax patterns are +always interpreted like the 'magic' option is set, no matter what the actual +value of 'magic' is. And the patterns are interpreted like the 'l' flag is +not included in 'cpoptions'. This was done to make syntax files portable and +independent of 'compatible' and 'magic' settings. + +Try to avoid patterns that can match an empty string, such as "[a-z]*". +This slows down the highlighting a lot, because it matches everywhere. + + *:syn-pattern-offset* +The pattern can be followed by a character offset. This can be used to +change the highlighted part, and to change the text area included in the +match or region (which only matters when trying to match other items). Both +are relative to the matched pattern. The character offset for a skip +pattern can be used to tell where to continue looking for an end pattern. + +The offset takes the form of "{what}={offset}" +The {what} can be one of seven strings: + +ms Match Start offset for the start of the matched text +me Match End offset for the end of the matched text +hs Highlight Start offset for where the highlighting starts +he Highlight End offset for where the highlighting ends +rs Region Start offset for where the body of a region starts +re Region End offset for where the body of a region ends +lc Leading Context offset past "leading context" of pattern + +The {offset} can be: + +s start of the matched pattern +s+{nr} start of the matched pattern plus {nr} chars to the right +s-{nr} start of the matched pattern plus {nr} chars to the left +e end of the matched pattern +e+{nr} end of the matched pattern plus {nr} chars to the right +e-{nr} end of the matched pattern plus {nr} chars to the left +{nr} (for "lc" only): start matching {nr} chars right of the start + +Examples: "ms=s+1", "hs=e-2", "lc=3". + +Although all offsets are accepted after any pattern, they are not always +meaningful. This table shows which offsets are actually used: + + ms me hs he rs re lc ~ +match item yes yes yes yes - - yes +region item start yes - yes - yes - yes +region item skip - yes - - - - yes +region item end - yes - yes - yes yes + +Offsets can be concatenated, with a ',' in between. Example: > + :syn match String /"[^"]*"/hs=s+1,he=e-1 +< + some "string" text + ^^^^^^ highlighted + +Notes: +- There must be no white space between the pattern and the character + offset(s). +- The highlighted area will never be outside of the matched text. +- A negative offset for an end pattern may not always work, because the end + pattern may be detected when the highlighting should already have stopped. +- Before Vim 7.2 the offsets were counted in bytes instead of characters. + This didn't work well for multi-byte characters, so it was changed with the + Vim 7.2 release. +- The start of a match cannot be in a line other than where the pattern + matched. This doesn't work: "a\nb"ms=e. You can make the highlighting + start in another line, this does work: "a\nb"hs=e. + +Example (match a comment but don't highlight the /* and */): > + :syntax region Comment start="/\*"hs=e+1 end="\*/"he=s-1 +< + /* this is a comment */ + ^^^^^^^^^^^^^^^^^^^ highlighted + +A more complicated Example: > + :syn region Exa matchgroup=Foo start="foo"hs=s+2,rs=e+2 matchgroup=Bar end="bar"me=e-1,he=e-1,re=s-1 +< + abcfoostringbarabc + mmmmmmmmmmm match + sssrrreee highlight start/region/end ("Foo", "Exa" and "Bar") + +Leading context *:syn-lc* *:syn-leading* *:syn-context* + +Note: This is an obsolete feature, only included for backwards compatibility +with previous Vim versions. It's now recommended to use the |/\@<=| construct +in the pattern. + +The "lc" offset specifies leading context -- a part of the pattern that must +be present, but is not considered part of the match. An offset of "lc=n" will +cause Vim to step back n columns before attempting the pattern match, allowing +characters which have already been matched in previous patterns to also be +used as leading context for this match. This can be used, for instance, to +specify that an "escaping" character must not precede the match: > + + :syn match ZNoBackslash "[^\\]z"ms=s+1 + :syn match WNoBackslash "[^\\]w"lc=1 + :syn match Underline "_\+" +< + ___zzzz ___wwww + ^^^ ^^^ matches Underline + ^ ^ matches ZNoBackslash + ^^^^ matches WNoBackslash + +The "ms" offset is automatically set to the same value as the "lc" offset, +unless you set "ms" explicitly. + + +Multi-line patterns *:syn-multi-line* + +The patterns can include "\n" to match an end-of-line. Mostly this works as +expected, but there are a few exceptions. + +When using a start pattern with an offset, the start of the match is not +allowed to start in a following line. The highlighting can start in a +following line though. Using the "\zs" item also requires that the start of +the match doesn't move to another line. + +The skip pattern can include the "\n", but the search for an end pattern will +continue in the first character of the next line, also when that character is +matched by the skip pattern. This is because redrawing may start in any line +halfway a region and there is no check if the skip pattern started in a +previous line. For example, if the skip pattern is "a\nb" and an end pattern +is "b", the end pattern does match in the second line of this: > + x x a + b x x +Generally this means that the skip pattern should not match any characters +after the "\n". + + +External matches *:syn-ext-match* + +These extra regular expression items are available in region patterns: + + */\z(* */\z(\)* *E50* *E52* *E879* + \z(\) Marks the sub-expression as "external", meaning that it can be + accessed from another pattern match. Currently only usable in + defining a syntax region start pattern. + + */\z1* */\z2* */\z3* */\z4* */\z5* + \z1 ... \z9 */\z6* */\z7* */\z8* */\z9* *E66* *E67* + Matches the same string that was matched by the corresponding + sub-expression in a previous start pattern match. + +Sometimes the start and end patterns of a region need to share a common +sub-expression. A common example is the "here" document in Perl and many Unix +shells. This effect can be achieved with the "\z" special regular expression +items, which marks a sub-expression as "external", in the sense that it can be +referenced from outside the pattern in which it is defined. The here-document +example, for instance, can be done like this: > + :syn region hereDoc start="<<\z(\I\i*\)" end="^\z1$" + +As can be seen here, the \z actually does double duty. In the start pattern, +it marks the "\(\I\i*\)" sub-expression as external; in the end pattern, it +changes the \1 back-reference into an external reference referring to the +first external sub-expression in the start pattern. External references can +also be used in skip patterns: > + :syn region foo start="start \(\I\i*\)" skip="not end \z1" end="end \z1" + +Note that normal and external sub-expressions are completely orthogonal and +indexed separately; for instance, if the pattern "\z(..\)\(..\)" is applied +to the string "aabb", then \1 will refer to "bb" and \z1 will refer to "aa". +Note also that external sub-expressions cannot be accessed as back-references +within the same pattern like normal sub-expressions. If you want to use one +sub-expression as both a normal and an external sub-expression, you can nest +the two, as in "\(\z(...\)\)". + +Note that only matches within a single line can be used. Multi-line matches +cannot be referred to. + +============================================================================== +8. Syntax clusters *:syn-cluster* *E400* + +:sy[ntax] cluster {cluster-name} [contains={group-name}..] + [add={group-name}..] + [remove={group-name}..] + +This command allows you to cluster a list of syntax groups together under a +single name. + + contains={group-name}.. + The cluster is set to the specified list of groups. + add={group-name}.. + The specified groups are added to the cluster. + remove={group-name}.. + The specified groups are removed from the cluster. + +A cluster so defined may be referred to in a contains=.., containedin=.., +nextgroup=.., add=.. or remove=.. list with a "@" prefix. You can also use +this notation to implicitly declare a cluster before specifying its contents. + +Example: > + :syntax match Thing "# [^#]\+ #" contains=@ThingMembers + :syntax cluster ThingMembers contains=ThingMember1,ThingMember2 + +As the previous example suggests, modifications to a cluster are effectively +retroactive; the membership of the cluster is checked at the last minute, so +to speak: > + :syntax keyword A aaa + :syntax keyword B bbb + :syntax cluster AandB contains=A + :syntax match Stuff "( aaa bbb )" contains=@AandB + :syntax cluster AandB add=B " now both keywords are matched in Stuff + +This also has implications for nested clusters: > + :syntax keyword A aaa + :syntax keyword B bbb + :syntax cluster SmallGroup contains=B + :syntax cluster BigGroup contains=A,@SmallGroup + :syntax match Stuff "( aaa bbb )" contains=@BigGroup + :syntax cluster BigGroup remove=B " no effect, since B isn't in BigGroup + :syntax cluster SmallGroup remove=B " now bbb isn't matched within Stuff +< + *E848* +The maximum number of clusters is 9767. + +============================================================================== +9. Including syntax files *:syn-include* *E397* + +It is often useful for one language's syntax file to include a syntax file for +a related language. Depending on the exact relationship, this can be done in +two different ways: + + - If top-level syntax items in the included syntax file are to be + allowed at the top level in the including syntax, you can simply use + the |:runtime| command: > + + " In cpp.vim: + :runtime! syntax/c.vim + :unlet b:current_syntax + +< - If top-level syntax items in the included syntax file are to be + contained within a region in the including syntax, you can use the + ":syntax include" command: + +:sy[ntax] include [@{grouplist-name}] {file-name} + + All syntax items declared in the included file will have the + "contained" flag added. In addition, if a group list is specified, + all top-level syntax items in the included file will be added to + that list. > + + " In perl.vim: + :syntax include @Pod <sfile>:p:h/pod.vim + :syntax region perlPOD start="^=head" end="^=cut" contains=@Pod +< + When {file-name} is an absolute path (starts with "/", "c:", "$VAR" + or "<sfile>") that file is sourced. When it is a relative path + (e.g., "syntax/pod.vim") the file is searched for in 'runtimepath'. + All matching files are loaded. Using a relative path is + recommended, because it allows a user to replace the included file + with his own version, without replacing the file that does the ":syn + include". + + *E847* +The maximum number of includes is 999. + +============================================================================== +10. Synchronizing *:syn-sync* *E403* *E404* + +Vim wants to be able to start redrawing in any position in the document. To +make this possible it needs to know the syntax state at the position where +redrawing starts. + +:sy[ntax] sync [ccomment [group-name] | minlines={N} | ...] + +There are four ways to synchronize: +1. Always parse from the start of the file. + |:syn-sync-first| +2. Based on C-style comments. Vim understands how C-comments work and can + figure out if the current line starts inside or outside a comment. + |:syn-sync-second| +3. Jumping back a certain number of lines and start parsing there. + |:syn-sync-third| +4. Searching backwards in the text for a pattern to sync on. + |:syn-sync-fourth| + + *:syn-sync-maxlines* *:syn-sync-minlines* +For the last three methods, the line range where the parsing can start is +limited by "minlines" and "maxlines". + +If the "minlines={N}" argument is given, the parsing always starts at least +that many lines backwards. This can be used if the parsing may take a few +lines before it's correct, or when it's not possible to use syncing. + +If the "maxlines={N}" argument is given, the number of lines that are searched +for a comment or syncing pattern is restricted to N lines backwards (after +adding "minlines"). This is useful if you have few things to sync on and a +slow machine. Example: > + :syntax sync ccomment maxlines=500 +< + *:syn-sync-linebreaks* +When using a pattern that matches multiple lines, a change in one line may +cause a pattern to no longer match in a previous line. This means has to +start above where the change was made. How many lines can be specified with +the "linebreaks" argument. For example, when a pattern may include one line +break use this: > + :syntax sync linebreaks=1 +The result is that redrawing always starts at least one line before where a +change was made. The default value for "linebreaks" is zero. Usually the +value for "minlines" is bigger than "linebreaks". + + +First syncing method: *:syn-sync-first* +> + :syntax sync fromstart + +The file will be parsed from the start. This makes syntax highlighting +accurate, but can be slow for long files. Vim caches previously parsed text, +so that it's only slow when parsing the text for the first time. However, +when making changes some part of the text needs to be parsed again (worst +case: to the end of the file). + +Using "fromstart" is equivalent to using "minlines" with a very large number. + + +Second syncing method: *:syn-sync-second* *:syn-sync-ccomment* + +For the second method, only the "ccomment" argument needs to be given. +Example: > + :syntax sync ccomment + +When Vim finds that the line where displaying starts is inside a C-style +comment, the last region syntax item with the group-name "Comment" will be +used. This requires that there is a region with the group-name "Comment"! +An alternate group name can be specified, for example: > + :syntax sync ccomment javaComment +This means that the last item specified with "syn region javaComment" will be +used for the detected C comment region. This only works properly if that +region does have a start pattern "\/*" and an end pattern "*\/". + +The "maxlines" argument can be used to restrict the search to a number of +lines. The "minlines" argument can be used to at least start a number of +lines back (e.g., for when there is some construct that only takes a few +lines, but it hard to sync on). + +Note: Syncing on a C comment doesn't work properly when strings are used +that cross a line and contain a "*/". Since letting strings cross a line +is a bad programming habit (many compilers give a warning message), and the +chance of a "*/" appearing inside a comment is very small, this restriction +is hardly ever noticed. + + +Third syncing method: *:syn-sync-third* + +For the third method, only the "minlines={N}" argument needs to be given. +Vim will subtract {N} from the line number and start parsing there. This +means {N} extra lines need to be parsed, which makes this method a bit slower. +Example: > + :syntax sync minlines=50 + +"lines" is equivalent to "minlines" (used by older versions). + + +Fourth syncing method: *:syn-sync-fourth* + +The idea is to synchronize on the end of a few specific regions, called a +sync pattern. Only regions can cross lines, so when we find the end of some +region, we might be able to know in which syntax item we are. The search +starts in the line just above the one where redrawing starts. From there +the search continues backwards in the file. + +This works just like the non-syncing syntax items. You can use contained +matches, nextgroup, etc. But there are a few differences: +- Keywords cannot be used. +- The syntax items with the "sync" keyword form a completely separated group + of syntax items. You can't mix syncing groups and non-syncing groups. +- The matching works backwards in the buffer (line by line), instead of + forwards. +- A line continuation pattern can be given. It is used to decide which group + of lines need to be searched like they were one line. This means that the + search for a match with the specified items starts in the first of the + consecutive that contain the continuation pattern. +- When using "nextgroup" or "contains", this only works within one line (or + group of continued lines). +- When using a region, it must start and end in the same line (or group of + continued lines). Otherwise the end is assumed to be at the end of the + line (or group of continued lines). +- When a match with a sync pattern is found, the rest of the line (or group of + continued lines) is searched for another match. The last match is used. + This is used when a line can contain both the start end the end of a region + (e.g., in a C-comment like /* this */, the last "*/" is used). + +There are two ways how a match with a sync pattern can be used: +1. Parsing for highlighting starts where redrawing starts (and where the + search for the sync pattern started). The syntax group that is expected + to be valid there must be specified. This works well when the regions + that cross lines cannot contain other regions. +2. Parsing for highlighting continues just after the match. The syntax group + that is expected to be present just after the match must be specified. + This can be used when the previous method doesn't work well. It's much + slower, because more text needs to be parsed. +Both types of sync patterns can be used at the same time. + +Besides the sync patterns, other matches and regions can be specified, to +avoid finding unwanted matches. + +[The reason that the sync patterns are given separately, is that mostly the +search for the sync point can be much simpler than figuring out the +highlighting. The reduced number of patterns means it will go (much) +faster.] + + *syn-sync-grouphere* *E393* *E394* + :syntax sync match {sync-group-name} grouphere {group-name} "pattern" .. + + Define a match that is used for syncing. {group-name} is the + name of a syntax group that follows just after the match. Parsing + of the text for highlighting starts just after the match. A region + must exist for this {group-name}. The first one defined will be used. + "NONE" can be used for when there is no syntax group after the match. + + *syn-sync-groupthere* + :syntax sync match {sync-group-name} groupthere {group-name} "pattern" .. + + Like "grouphere", but {group-name} is the name of a syntax group that + is to be used at the start of the line where searching for the sync + point started. The text between the match and the start of the sync + pattern searching is assumed not to change the syntax highlighting. + For example, in C you could search backwards for "/*" and "*/". If + "/*" is found first, you know that you are inside a comment, so the + "groupthere" is "cComment". If "*/" is found first, you know that you + are not in a comment, so the "groupthere" is "NONE". (in practice + it's a bit more complicated, because the "/*" and "*/" could appear + inside a string. That's left as an exercise to the reader...). + + :syntax sync match .. + :syntax sync region .. + + Without a "groupthere" argument. Define a region or match that is + skipped while searching for a sync point. + + *syn-sync-linecont* + :syntax sync linecont {pattern} + + When {pattern} matches in a line, it is considered to continue in + the next line. This means that the search for a sync point will + consider the lines to be concatenated. + +If the "maxlines={N}" argument is given too, the number of lines that are +searched for a match is restricted to N. This is useful if you have very +few things to sync on and a slow machine. Example: > + :syntax sync maxlines=100 + +You can clear all sync settings with: > + :syntax sync clear + +You can clear specific sync patterns with: > + :syntax sync clear {sync-group-name} .. + +============================================================================== +11. Listing syntax items *:syntax* *:sy* *:syn* *:syn-list* + +This command lists all the syntax items: > + + :sy[ntax] [list] + +To show the syntax items for one syntax group: > + + :sy[ntax] list {group-name} + +To list the syntax groups in one cluster: *E392* > + + :sy[ntax] list @{cluster-name} + +See above for other arguments for the ":syntax" command. + +Note that the ":syntax" command can be abbreviated to ":sy", although ":syn" +is mostly used, because it looks better. + +============================================================================== +12. Highlight command *:highlight* *:hi* *E28* *E411* *E415* + +There are three types of highlight groups: +- The ones used for specific languages. For these the name starts with the + name of the language. Many of these don't have any attributes, but are + linked to a group of the second type. +- The ones used for all syntax languages. +- The ones used for the 'highlight' option. + *hitest.vim* +You can see all the groups currently active with this command: > + :so $VIMRUNTIME/syntax/hitest.vim +This will open a new window containing all highlight group names, displayed +in their own color. + + *:colo* *:colorscheme* *E185* +:colo[rscheme] Output the name of the currently active color scheme. + This is basically the same as > + :echo g:colors_name +< In case g:colors_name has not been defined :colo will + output "default". When compiled without the |+eval| + feature it will output "unknown". + +:colo[rscheme] {name} Load color scheme {name}. This searches 'runtimepath' + for the file "colors/{name}.vim". The first one that + is found is loaded. + To see the name of the currently active color scheme: > + :colo +< The name is also stored in the g:colors_name variable. + Doesn't work recursively, thus you can't use + ":colorscheme" in a color scheme script. + After the color scheme has been loaded the + |ColorScheme| autocommand event is triggered. + For info about writing a colorscheme file: > + :edit $VIMRUNTIME/colors/README.txt + +:hi[ghlight] List all the current highlight groups that have + attributes set. + +:hi[ghlight] {group-name} + List one highlight group. + +:hi[ghlight] clear Reset all highlighting to the defaults. Removes all + highlighting for groups added by the user! + Uses the current value of 'background' to decide which + default colors to use. + +:hi[ghlight] clear {group-name} +:hi[ghlight] {group-name} NONE + Disable the highlighting for one highlight group. It + is _not_ set back to the default colors. + +:hi[ghlight] [default] {group-name} {key}={arg} .. + Add a highlight group, or change the highlighting for + an existing group. + See |highlight-args| for the {key}={arg} arguments. + See |:highlight-default| for the optional [default] + argument. + +Normally a highlight group is added once when starting up. This sets the +default values for the highlighting. After that, you can use additional +highlight commands to change the arguments that you want to set to non-default +values. The value "NONE" can be used to switch the value off or go back to +the default value. + +A simple way to change colors is with the |:colorscheme| command. This loads +a file with ":highlight" commands such as this: > + + :hi Comment gui=bold + +Note that all settings that are not included remain the same, only the +specified field is used, and settings are merged with previous ones. So, the +result is like this single command has been used: > + :hi Comment term=bold ctermfg=Cyan guifg=#80a0ff gui=bold +< + *:highlight-verbose* +When listing a highlight group and 'verbose' is non-zero, the listing will +also tell where it was last set. Example: > + :verbose hi Comment +< Comment xxx term=bold ctermfg=4 guifg=Blue ~ + Last set from /home/mool/vim/vim7/runtime/syntax/syncolor.vim ~ + +When ":hi clear" is used then the script where this command is used will be +mentioned for the default values. See |:verbose-cmd| for more information. + + *highlight-args* *E416* *E417* *E423* +There are three types of terminals for highlighting: +term a normal terminal (vt100, xterm) +cterm a color terminal (MS-DOS console, color-xterm, these have the "Co" + termcap entry) +gui the GUI + +For each type the highlighting can be given. This makes it possible to use +the same syntax file on all terminals, and use the optimal highlighting. + +1. highlight arguments for normal terminals + + *bold* *underline* *undercurl* + *inverse* *italic* *standout* +term={attr-list} *attr-list* *highlight-term* *E418* + attr-list is a comma separated list (without spaces) of the + following items (in any order): + bold + underline + undercurl not always available + reverse + inverse same as reverse + italic + standout + NONE no attributes used (used to reset it) + + Note that "bold" can be used here and by using a bold font. They + have the same effect. + "undercurl" is a curly underline. When "undercurl" is not possible + then "underline" is used. In general "undercurl" is only available in + the GUI. The color is set with |highlight-guisp|. + +start={term-list} *highlight-start* *E422* +stop={term-list} *term-list* *highlight-stop* + These lists of terminal codes can be used to get + non-standard attributes on a terminal. + + The escape sequence specified with the "start" argument + is written before the characters in the highlighted + area. It can be anything that you want to send to the + terminal to highlight this area. The escape sequence + specified with the "stop" argument is written after the + highlighted area. This should undo the "start" argument. + Otherwise the screen will look messed up. + + The {term-list} can have two forms: + + 1. A string with escape sequences. + This is any string of characters, except that it can't start with + "t_" and blanks are not allowed. The <> notation is recognized + here, so you can use things like "<Esc>" and "<Space>". Example: + start=<Esc>[27h;<Esc>[<Space>r; + + 2. A list of terminal codes. + Each terminal code has the form "t_xx", where "xx" is the name of + the termcap entry. The codes have to be separated with commas. + White space is not allowed. Example: + start=t_C1,t_BL + The terminal codes must exist for this to work. + + +2. highlight arguments for color terminals + +cterm={attr-list} *highlight-cterm* + See above for the description of {attr-list} |attr-list|. + The "cterm" argument is likely to be different from "term", when + colors are used. For example, in a normal terminal comments could + be underlined, in a color terminal they can be made Blue. + Note: Many terminals (e.g., DOS console) can't mix these attributes + with coloring. Use only one of "cterm=" OR "ctermfg=" OR "ctermbg=". + +ctermfg={color-nr} *highlight-ctermfg* *E421* +ctermbg={color-nr} *highlight-ctermbg* + The {color-nr} argument is a color number. Its range is zero to + (not including) the number given by the termcap entry "Co". + The actual color with this number depends on the type of terminal + and its settings. Sometimes the color also depends on the settings of + "cterm". For example, on some systems "cterm=bold ctermfg=3" gives + another color, on others you just get color 3. + + For an xterm this depends on your resources, and is a bit + unpredictable. See your xterm documentation for the defaults. The + colors for a color-xterm can be changed from the .Xdefaults file. + Unfortunately this means that it's not possible to get the same colors + for each user. See |xterm-color| for info about color xterms. + + The MSDOS standard colors are fixed (in a console window), so these + have been used for the names. But the meaning of color names in X11 + are fixed, so these color settings have been used, to make the + highlighting settings portable (complicated, isn't it?). The + following names are recognized, with the color number used: + + *cterm-colors* + NR-16 NR-8 COLOR NAME ~ + 0 0 Black + 1 4 DarkBlue + 2 2 DarkGreen + 3 6 DarkCyan + 4 1 DarkRed + 5 5 DarkMagenta + 6 3 Brown, DarkYellow + 7 7 LightGray, LightGrey, Gray, Grey + 8 0* DarkGray, DarkGrey + 9 4* Blue, LightBlue + 10 2* Green, LightGreen + 11 6* Cyan, LightCyan + 12 1* Red, LightRed + 13 5* Magenta, LightMagenta + 14 3* Yellow, LightYellow + 15 7* White + + The number under "NR-16" is used for 16-color terminals ('t_Co' + greater than or equal to 16). The number under "NR-8" is used for + 8-color terminals ('t_Co' less than 16). The '*' indicates that the + bold attribute is set for ctermfg. In many 8-color terminals (e.g., + "linux"), this causes the bright colors to appear. This doesn't work + for background colors! Without the '*' the bold attribute is removed. + If you want to set the bold attribute in a different way, put a + "cterm=" argument AFTER the "ctermfg=" or "ctermbg=" argument. Or use + a number instead of a color name. + + The case of the color names is ignored. + Note that for 16 color ansi style terminals (including xterms), the + numbers in the NR-8 column is used. Here '*' means 'add 8' so that Blue + is 12, DarkGray is 8 etc. + + Note that for some color terminals these names may result in the wrong + colors! + + *:hi-normal-cterm* + When setting the "ctermfg" or "ctermbg" colors for the Normal group, + these will become the colors used for the non-highlighted text. + Example: > + :highlight Normal ctermfg=grey ctermbg=darkblue +< When setting the "ctermbg" color for the Normal group, the + 'background' option will be adjusted automatically. This causes the + highlight groups that depend on 'background' to change! This means + you should set the colors for Normal first, before setting other + colors. + When a colorscheme is being used, changing 'background' causes it to + be reloaded, which may reset all colors (including Normal). First + delete the "g:colors_name" variable when you don't want this. + + When you have set "ctermfg" or "ctermbg" for the Normal group, Vim + needs to reset the color when exiting. This is done with the "op" + termcap entry |t_op|. If this doesn't work correctly, try setting the + 't_op' option in your .vimrc. + *E419* *E420* + When Vim knows the normal foreground and background colors, "fg" and + "bg" can be used as color names. This only works after setting the + colors for the Normal group and for the MS-DOS console. Example, for + reverse video: > + :highlight Visual ctermfg=bg ctermbg=fg +< Note that the colors are used that are valid at the moment this + command are given. If the Normal group colors are changed later, the + "fg" and "bg" colors will not be adjusted. + + +3. highlight arguments for the GUI + +gui={attr-list} *highlight-gui* + These give the attributes to use in the GUI mode. + See |attr-list| for a description. + Note that "bold" can be used here and by using a bold font. They + have the same effect. + Note that the attributes are ignored for the "Normal" group. + +font={font-name} *highlight-font* + font-name is the name of a font, as it is used on the system Vim + runs on. For X11 this is a complicated name, for example: > + font=-misc-fixed-bold-r-normal--14-130-75-75-c-70-iso8859-1 +< + The font-name "NONE" can be used to revert to the default font. + When setting the font for the "Normal" group, this becomes the default + font (until the 'guifont' option is changed; the last one set is + used). + The following only works with Motif and Athena, not with other GUIs: + When setting the font for the "Menu" group, the menus will be changed. + When setting the font for the "Tooltip" group, the tooltips will be + changed. + All fonts used, except for Menu and Tooltip, should be of the same + character size as the default font! Otherwise redrawing problems will + occur. + +guifg={color-name} *highlight-guifg* +guibg={color-name} *highlight-guibg* +guisp={color-name} *highlight-guisp* + These give the foreground (guifg), background (guibg) and special + (guisp) color to use in the GUI. "guisp" is used for undercurl. + There are a few special names: + NONE no color (transparent) + bg use normal background color + background use normal background color + fg use normal foreground color + foreground use normal foreground color + To use a color name with an embedded space or other special character, + put it in single quotes. The single quote cannot be used then. + Example: > + :hi comment guifg='salmon pink' +< + *gui-colors* + Suggested color names (these are available on most systems): + Red LightRed DarkRed + Green LightGreen DarkGreen SeaGreen + Blue LightBlue DarkBlue SlateBlue + Cyan LightCyan DarkCyan + Magenta LightMagenta DarkMagenta + Yellow LightYellow Brown DarkYellow + Gray LightGray DarkGray + Black White + Orange Purple Violet + + In the Win32 GUI version, additional system colors are available. See + |win32-colors|. + + You can also specify a color by its Red, Green and Blue values. + The format is "#rrggbb", where + "rr" is the Red value + "gg" is the Green value + "bb" is the Blue value + All values are hexadecimal, range from "00" to "ff". Examples: > + :highlight Comment guifg=#11f0c3 guibg=#ff00ff +< + *highlight-groups* *highlight-default* +These are the default highlighting groups. These groups are used by the +'highlight' option default. Note that the highlighting depends on the value +of 'background'. You can see the current settings with the ":highlight" +command. + *hl-ColorColumn* +ColorColumn used for the columns set with 'colorcolumn' + *hl-Conceal* +Conceal placeholder characters substituted for concealed + text (see 'conceallevel') + *hl-Cursor* +Cursor the character under the cursor + *hl-CursorIM* +CursorIM like Cursor, but used when in IME mode |CursorIM| + *hl-CursorColumn* +CursorColumn the screen column that the cursor is in when 'cursorcolumn' is + set + *hl-CursorLine* +CursorLine the screen line that the cursor is in when 'cursorline' is + set + *hl-Directory* +Directory directory names (and other special names in listings) + *hl-DiffAdd* +DiffAdd diff mode: Added line |diff.txt| + *hl-DiffChange* +DiffChange diff mode: Changed line |diff.txt| + *hl-DiffDelete* +DiffDelete diff mode: Deleted line |diff.txt| + *hl-DiffText* +DiffText diff mode: Changed text within a changed line |diff.txt| + *hl-ErrorMsg* +ErrorMsg error messages on the command line + *hl-VertSplit* +VertSplit the column separating vertically split windows + *hl-Folded* +Folded line used for closed folds + *hl-FoldColumn* +FoldColumn 'foldcolumn' + *hl-SignColumn* +SignColumn column where |signs| are displayed + *hl-IncSearch* +IncSearch 'incsearch' highlighting; also used for the text replaced with + ":s///c" + *hl-LineNr* +LineNr Line number for ":number" and ":#" commands, and when 'number' + or 'relativenumber' option is set. + *hl-CursorLineNr* +CursorLineNr Like LineNr when 'cursorline' or 'relativenumber' is set for + the cursor line. + *hl-MatchParen* +MatchParen The character under the cursor or just before it, if it + is a paired bracket, and its match. |pi_paren.txt| + + *hl-ModeMsg* +ModeMsg 'showmode' message (e.g., "-- INSERT --") + *hl-MoreMsg* +MoreMsg |more-prompt| + *hl-NonText* +NonText '~' and '@' at the end of the window, characters from + 'showbreak' and other characters that do not really exist in + the text (e.g., ">" displayed when a double-wide character + doesn't fit at the end of the line). + *hl-Normal* +Normal normal text + *hl-Pmenu* +Pmenu Popup menu: normal item. + *hl-PmenuSel* +PmenuSel Popup menu: selected item. + *hl-PmenuSbar* +PmenuSbar Popup menu: scrollbar. + *hl-PmenuThumb* +PmenuThumb Popup menu: Thumb of the scrollbar. + *hl-Question* +Question |hit-enter| prompt and yes/no questions + *hl-Search* +Search Last search pattern highlighting (see 'hlsearch'). + Also used for highlighting the current line in the quickfix + window and similar items that need to stand out. + *hl-SpecialKey* +SpecialKey Meta and special keys listed with ":map", also for text used + to show unprintable characters in the text, 'listchars'. + Generally: text that is displayed differently from what it + really is. + *hl-SpellBad* +SpellBad Word that is not recognized by the spellchecker. |spell| + This will be combined with the highlighting used otherwise. + *hl-SpellCap* +SpellCap Word that should start with a capital. |spell| + This will be combined with the highlighting used otherwise. + *hl-SpellLocal* +SpellLocal Word that is recognized by the spellchecker as one that is + used in another region. |spell| + This will be combined with the highlighting used otherwise. + *hl-SpellRare* +SpellRare Word that is recognized by the spellchecker as one that is + hardly ever used. |spell| + This will be combined with the highlighting used otherwise. + *hl-StatusLine* +StatusLine status line of current window + *hl-StatusLineNC* +StatusLineNC status lines of not-current windows + Note: if this is equal to "StatusLine" Vim will use "^^^" in + the status line of the current window. + *hl-TabLine* +TabLine tab pages line, not active tab page label + *hl-TabLineFill* +TabLineFill tab pages line, where there are no labels + *hl-TabLineSel* +TabLineSel tab pages line, active tab page label + *hl-Title* +Title titles for output from ":set all", ":autocmd" etc. + *hl-Visual* +Visual Visual mode selection + *hl-VisualNOS* +VisualNOS Visual mode selection when vim is "Not Owning the Selection". + Only X11 Gui's |gui-x11| and |xterm-clipboard| supports this. + *hl-WarningMsg* +WarningMsg warning messages + *hl-WildMenu* +WildMenu current match in 'wildmenu' completion + + *hl-User1* *hl-User1..9* *hl-User9* +The 'statusline' syntax allows the use of 9 different highlights in the +statusline and ruler (via 'rulerformat'). The names are User1 to User9. + +For the GUI you can use the following groups to set the colors for the menu, +scrollbars and tooltips. They don't have defaults. This doesn't work for the +Win32 GUI. Only three highlight arguments have any effect here: font, guibg, +and guifg. + + *hl-Menu* +Menu Current font, background and foreground colors of the menus. + Also used for the toolbar. + Applicable highlight arguments: font, guibg, guifg. + + NOTE: For Motif and Athena the font argument actually + specifies a fontset at all times, no matter if 'guifontset' is + empty, and as such it is tied to the current |:language| when + set. + + *hl-Scrollbar* +Scrollbar Current background and foreground of the main window's + scrollbars. + Applicable highlight arguments: guibg, guifg. + + *hl-Tooltip* +Tooltip Current font, background and foreground of the tooltips. + Applicable highlight arguments: font, guibg, guifg. + + NOTE: For Motif and Athena the font argument actually + specifies a fontset at all times, no matter if 'guifontset' is + empty, and as such it is tied to the current |:language| when + set. + +============================================================================== +13. Linking groups *:hi-link* *:highlight-link* *E412* *E413* + +When you want to use the same highlighting for several syntax groups, you +can do this more easily by linking the groups into one common highlight +group, and give the color attributes only for that group. + +To set a link: + + :hi[ghlight][!] [default] link {from-group} {to-group} + +To remove a link: + + :hi[ghlight][!] [default] link {from-group} NONE + +Notes: *E414* +- If the {from-group} and/or {to-group} doesn't exist, it is created. You + don't get an error message for a non-existing group. +- As soon as you use a ":highlight" command for a linked group, the link is + removed. +- If there are already highlight settings for the {from-group}, the link is + not made, unless the '!' is given. For a ":highlight link" command in a + sourced file, you don't get an error message. This can be used to skip + links for groups that already have settings. + + *:hi-default* *:highlight-default* +The [default] argument is used for setting the default highlighting for a +group. If highlighting has already been specified for the group the command +will be ignored. Also when there is an existing link. + +Using [default] is especially useful to overrule the highlighting of a +specific syntax file. For example, the C syntax file contains: > + :highlight default link cComment Comment +If you like Question highlighting for C comments, put this in your vimrc file: > + :highlight link cComment Question +Without the "default" in the C syntax file, the highlighting would be +overruled when the syntax file is loaded. + +============================================================================== +14. Cleaning up *:syn-clear* *E391* + +If you want to clear the syntax stuff for the current buffer, you can use this +command: > + :syntax clear + +This command should be used when you want to switch off syntax highlighting, +or when you want to switch to using another syntax. It's normally not needed +in a syntax file itself, because syntax is cleared by the autocommands that +load the syntax file. +The command also deletes the "b:current_syntax" variable, since no syntax is +loaded after this command. + +If you want to disable syntax highlighting for all buffers, you need to remove +the autocommands that load the syntax files: > + :syntax off + +What this command actually does, is executing the command > + :source $VIMRUNTIME/syntax/nosyntax.vim +See the "nosyntax.vim" file for details. Note that for this to work +$VIMRUNTIME must be valid. See |$VIMRUNTIME|. + +To clean up specific syntax groups for the current buffer: > + :syntax clear {group-name} .. +This removes all patterns and keywords for {group-name}. + +To clean up specific syntax group lists for the current buffer: > + :syntax clear @{grouplist-name} .. +This sets {grouplist-name}'s contents to an empty list. + + *:syntax-reset* *:syn-reset* +If you have changed the colors and messed them up, use this command to get the +defaults back: > + + :syntax reset + +This doesn't change the colors for the 'highlight' option. + +Note that the syntax colors that you set in your vimrc file will also be reset +back to their Vim default. +Note that if you are using a color scheme, the colors defined by the color +scheme for syntax highlighting will be lost. + +What this actually does is: > + + let g:syntax_cmd = "reset" + runtime! syntax/syncolor.vim + +Note that this uses the 'runtimepath' option. + + *syncolor* +If you want to use different colors for syntax highlighting, you can add a Vim +script file to set these colors. Put this file in a directory in +'runtimepath' which comes after $VIMRUNTIME, so that your settings overrule +the default colors. This way these colors will be used after the ":syntax +reset" command. + +For Unix you can use the file ~/.vim/after/syntax/syncolor.vim. Example: > + + if &background == "light" + highlight comment ctermfg=darkgreen guifg=darkgreen + else + highlight comment ctermfg=green guifg=green + endif + + *E679* +Do make sure this syncolor.vim script does not use a "syntax on", set the +'background' option or uses a "colorscheme" command, because it results in an +endless loop. + +Note that when a color scheme is used, there might be some confusion whether +your defined colors are to be used or the colors from the scheme. This +depends on the color scheme file. See |:colorscheme|. + + *syntax_cmd* +The "syntax_cmd" variable is set to one of these values when the +syntax/syncolor.vim files are loaded: + "on" ":syntax on" command. Highlight colors are overruled but + links are kept + "enable" ":syntax enable" command. Only define colors for groups that + don't have highlighting yet. Use ":syntax default". + "reset" ":syntax reset" command or loading a color scheme. Define all + the colors. + "skip" Don't define colors. Used to skip the default settings when a + syncolor.vim file earlier in 'runtimepath' has already set + them. + +============================================================================== +15. Highlighting tags *tag-highlight* + +If you want to highlight all the tags in your file, you can use the following +mappings. + + <F11> -- Generate tags.vim file, and highlight tags. + <F12> -- Just highlight tags based on existing tags.vim file. +> + :map <F11> :sp tags<CR>:%s/^\([^ :]*:\)\=\([^ ]*\).*/syntax keyword Tag \2/<CR>:wq! tags.vim<CR>/^<CR><F12> + :map <F12> :so tags.vim<CR> + +WARNING: The longer the tags file, the slower this will be, and the more +memory Vim will consume. + +Only highlighting typedefs, unions and structs can be done too. For this you +must use Exuberant ctags (found at http://ctags.sf.net). + +Put these lines in your Makefile: + +# Make a highlight file for types. Requires Exuberant ctags and awk +types: types.vim +types.vim: *.[ch] + ctags --c-kinds=gstu -o- *.[ch] |\ + awk 'BEGIN{printf("syntax keyword Type\t")}\ + {printf("%s ", $$1)}END{print ""}' > $@ + +And put these lines in your .vimrc: > + + " load the types.vim highlighting file, if it exists + autocmd BufRead,BufNewFile *.[ch] let fname = expand('<afile>:p:h') . '/types.vim' + autocmd BufRead,BufNewFile *.[ch] if filereadable(fname) + autocmd BufRead,BufNewFile *.[ch] exe 'so ' . fname + autocmd BufRead,BufNewFile *.[ch] endif + +============================================================================== +16. Window-local syntax *:ownsyntax* + +Normally all windows on a buffer share the same syntax settings. It is +possible, however, to set a particular window on a file to have its own +private syntax setting. A possible example would be to edit LaTeX source +with conventional highlighting in one window, while seeing the same source +highlighted differently (so as to hide control sequences and indicate bold, +italic etc regions) in another. The 'scrollbind' option is useful here. + +To set the current window to have the syntax "foo", separately from all other +windows on the buffer: > + :ownsyntax foo +< *w:current_syntax* +This will set the "w:current_syntax" variable to "foo". The value of +"b:current_syntax" does not change. This is implemented by saving and +restoring "b:current_syntax", since the syntax files do set +"b:current_syntax". The value set by the syntax file is assigned to +"w:current_syntax". + +Once a window has its own syntax, syntax commands executed from other windows +on the same buffer (including :syntax clear) have no effect. Conversely, +syntax commands executed from that window do not affect other windows on the +same buffer. + +A window with its own syntax reverts to normal behavior when another buffer +is loaded into that window or the file is reloaded. +When splitting the window, the new window will use the original syntax. + +============================================================================== +17. Color xterms *xterm-color* *color-xterm* + +Most color xterms have only eight colors. If you don't get colors with the +default setup, it should work with these lines in your .vimrc: > + :if &term =~ "xterm" + : if has("terminfo") + : set t_Co=8 + : set t_Sf=<Esc>[3%p1%dm + : set t_Sb=<Esc>[4%p1%dm + : else + : set t_Co=8 + : set t_Sf=<Esc>[3%dm + : set t_Sb=<Esc>[4%dm + : endif + :endif +< [<Esc> is a real escape, type CTRL-V <Esc>] + +You might want to change the first "if" to match the name of your terminal, +e.g. "dtterm" instead of "xterm". + +Note: Do these settings BEFORE doing ":syntax on". Otherwise the colors may +be wrong. + *xiterm* *rxvt* +The above settings have been mentioned to work for xiterm and rxvt too. +But for using 16 colors in an rxvt these should work with terminfo: > + :set t_AB=<Esc>[%?%p1%{8}%<%t25;%p1%{40}%+%e5;%p1%{32}%+%;%dm + :set t_AF=<Esc>[%?%p1%{8}%<%t22;%p1%{30}%+%e1;%p1%{22}%+%;%dm +< + *colortest.vim* +To test your color setup, a file has been included in the Vim distribution. +To use it, execute this command: > + :runtime syntax/colortest.vim + +Some versions of xterm (and other terminals, like the Linux console) can +output lighter foreground colors, even though the number of colors is defined +at 8. Therefore Vim sets the "cterm=bold" attribute for light foreground +colors, when 't_Co' is 8. + + *xfree-xterm* +To get 16 colors or more, get the newest xterm version (which should be +included with XFree86 3.3 and later). You can also find the latest version +at: > + http://invisible-island.net/xterm/xterm.html +Here is a good way to configure it. This uses 88 colors and enables the +termcap-query feature, which allows Vim to ask the xterm how many colors it +supports. > + ./configure --disable-bold-color --enable-88-color --enable-tcap-query +If you only get 8 colors, check the xterm compilation settings. +(Also see |UTF8-xterm| for using this xterm with UTF-8 character encoding). + +This xterm should work with these lines in your .vimrc (for 16 colors): > + :if has("terminfo") + : set t_Co=16 + : set t_AB=<Esc>[%?%p1%{8}%<%t%p1%{40}%+%e%p1%{92}%+%;%dm + : set t_AF=<Esc>[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{82}%+%;%dm + :else + : set t_Co=16 + : set t_Sf=<Esc>[3%dm + : set t_Sb=<Esc>[4%dm + :endif +< [<Esc> is a real escape, type CTRL-V <Esc>] + +Without |+terminfo|, Vim will recognize these settings, and automatically +translate cterm colors of 8 and above to "<Esc>[9%dm" and "<Esc>[10%dm". +Colors above 16 are also translated automatically. + +For 256 colors this has been reported to work: > + + :set t_AB=<Esc>[48;5;%dm + :set t_AF=<Esc>[38;5;%dm + +Or just set the TERM environment variable to "xterm-color" or "xterm-16color" +and try if that works. + +You probably want to use these X resources (in your ~/.Xdefaults file): + XTerm*color0: #000000 + XTerm*color1: #c00000 + XTerm*color2: #008000 + XTerm*color3: #808000 + XTerm*color4: #0000c0 + XTerm*color5: #c000c0 + XTerm*color6: #008080 + XTerm*color7: #c0c0c0 + XTerm*color8: #808080 + XTerm*color9: #ff6060 + XTerm*color10: #00ff00 + XTerm*color11: #ffff00 + XTerm*color12: #8080ff + XTerm*color13: #ff40ff + XTerm*color14: #00ffff + XTerm*color15: #ffffff + Xterm*cursorColor: Black + +[Note: The cursorColor is required to work around a bug, which changes the +cursor color to the color of the last drawn text. This has been fixed by a +newer version of xterm, but not everybody is using it yet.] + +To get these right away, reload the .Xdefaults file to the X Option database +Manager (you only need to do this when you just changed the .Xdefaults file): > + xrdb -merge ~/.Xdefaults +< + *xterm-blink* *xterm-blinking-cursor* +To make the cursor blink in an xterm, see tools/blink.c. Or use Thomas +Dickey's xterm above patchlevel 107 (see above for where to get it), with +these resources: + XTerm*cursorBlink: on + XTerm*cursorOnTime: 400 + XTerm*cursorOffTime: 250 + XTerm*cursorColor: White + + *hpterm-color* +These settings work (more or less) for an hpterm, which only supports 8 +foreground colors: > + :if has("terminfo") + : set t_Co=8 + : set t_Sf=<Esc>[&v%p1%dS + : set t_Sb=<Esc>[&v7S + :else + : set t_Co=8 + : set t_Sf=<Esc>[&v%dS + : set t_Sb=<Esc>[&v7S + :endif +< [<Esc> is a real escape, type CTRL-V <Esc>] + + *Eterm* *enlightened-terminal* +These settings have been reported to work for the Enlightened terminal +emulator, or Eterm. They might work for all xterm-like terminals that use the +bold attribute to get bright colors. Add an ":if" like above when needed. > + :set t_Co=16 + :set t_AF=^[[%?%p1%{8}%<%t3%p1%d%e%p1%{22}%+%d;1%;m + :set t_AB=^[[%?%p1%{8}%<%t4%p1%d%e%p1%{32}%+%d;1%;m +< + *TTpro-telnet* +These settings should work for TTpro telnet. Tera Term Pro is a freeware / +open-source program for MS-Windows. > + set t_Co=16 + set t_AB=^[[%?%p1%{8}%<%t%p1%{40}%+%e%p1%{32}%+5;%;%dm + set t_AF=^[[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{22}%+1;%;%dm +Also make sure TTpro's Setup / Window / Full Color is enabled, and make sure +that Setup / Font / Enable Bold is NOT enabled. +(info provided by John Love-Jensen <eljay@Adobe.COM>) + + +============================================================================== +18. When syntax is slow *:syntime* + +This is aimed at authors of a syntax file. + +If your syntax causes redrawing to be slow, here are a few hints on making it +faster. To see slowness switch on some features that usually interfere, such +as 'relativenumber' and |folding|. + +Note: this is only available when compiled with the |+profile| feature. +You many need to build Vim with "huge" features. + +To find out what patterns are consuming most time, get an overview with this +sequence: > + :syntime on + [ redraw the text at least once with CTRL-L ] + :syntime report + +This will display a list of syntax patterns that were used, sorted by the time +it took to match them against the text. + +:syntime on Start measuring syntax times. This will add some + overhead to compute the time spent on syntax pattern + matching. + +:syntime off Stop measuring syntax times. + +:syntime clear Set all the counters to zero, restart measuring. + +:syntime report Show the syntax items used since ":syntime on" in the + current window. Use a wider display to see more of + the output. + + The list is sorted by total time. The columns are: + TOTAL Total time in seconds spent on + matching this pattern. + COUNT Number of times the pattern was used. + MATCH Number of times the pattern actually + matched + SLOWEST The longest time for one try. + AVERAGE The average time for one try. + NAME Name of the syntax item. Note that + this is not unique. + PATTERN The pattern being used. + +Pattern matching gets slow when it has to try many alternatives. Try to +include as much literal text as possible to reduce the number of ways a +pattern does NOT match. + +When using the "\@<=" and "\@<!" items, add a maximum size to avoid trying at +all positions in the current and previous line. For example, if the item is +literal text specify the size of that text (in bytes): + +"<\@<=span" Matches "span" in "<span". This tries matching with "<" in + many places. +"<\@1<=span" Matches the same, but only tries one byte before "span". + + + vim:tw=78:sw=4:ts=8:ft=help:norl: diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt new file mode 100644 index 0000000000..3c7ad9fe28 --- /dev/null +++ b/runtime/doc/tabpage.txt @@ -0,0 +1,392 @@ +*tabpage.txt* For Vim version 7.4. Last change: 2012 Aug 08 + + + VIM REFERENCE MANUAL by Bram Moolenaar + + +Editing with windows in multiple tab pages. *tab-page* *tabpage* + +The commands which have been added to use multiple tab pages are explained +here. Additionally, there are explanations for commands that work differently +when used in combination with more than one tab page. + +1. Introduction |tab-page-intro| +2. Commands |tab-page-commands| +3. Other items |tab-page-other| +4. Setting 'tabline' |setting-tabline| +5. Setting 'guitablabel' |setting-guitablabel| + +{Vi does not have any of these commands} +{not able to use multiple tab pages when the |+windows| feature was disabled +at compile time} + +============================================================================== +1. Introduction *tab-page-intro* + +A tab page holds one or more windows. You can easily switch between tab +pages, so that you have several collections of windows to work on different +things. + +Usually you will see a list of labels at the top of the Vim window, one for +each tab page. With the mouse you can click on the label to jump to that tab +page. There are other ways to move between tab pages, see below. + +Most commands work only in the current tab page. That includes the |CTRL-W| +commands, |:windo|, |:all| and |:ball| (when not using the |:tab| modifier). +The commands that are aware of other tab pages than the current one are +mentioned below. + +Tabs are also a nice way to edit a buffer temporarily without changing the +current window layout. Open a new tab page, do whatever you want to do and +close the tab page. + +============================================================================== +2. Commands *tab-page-commands* + +OPENING A NEW TAB PAGE: + +When starting Vim "vim -p filename ..." opens each file argument in a separate +tab page (up to 'tabpagemax'). See |-p| + +A double click with the mouse in the non-GUI tab pages line opens a new, empty +tab page. It is placed left of the position of the click. The first click +may select another tab page first, causing an extra screen update. + +This also works in a few GUI versions, esp. Win32 and Motif. But only when +clicking right of the labels. + +In the GUI tab pages line you can use the right mouse button to open menu. +|tabline-menu|. + +:[count]tabe[dit] *:tabe* *:tabedit* *:tabnew* +:[count]tabnew + Open a new tab page with an empty window, after the current + tab page. For [count] see |:tab| below. + +:[count]tabe[dit] [++opt] [+cmd] {file} +:[count]tabnew [++opt] [+cmd] {file} + Open a new tab page and edit {file}, like with |:edit|. + For [count] see |:tab| below. + +:[count]tabf[ind] [++opt] [+cmd] {file} *:tabf* *:tabfind* + Open a new tab page and edit {file} in 'path', like with + |:find|. For [count] see |:tab| below. + {not available when the |+file_in_path| feature was disabled + at compile time} + +:[count]tab {cmd} *:tab* + Execute {cmd} and when it opens a new window open a new tab + page instead. Doesn't work for |:diffsplit|, |:diffpatch|, + |:execute| and |:normal|. + When [count] is omitted the tab page appears after the current + one. + When [count] is specified the new tab page comes after tab + page [count]. Use ":0tab cmd" to get the new tab page as the + first one. + Examples: > + :tab split " opens current buffer in new tab page + :tab help gt " opens tab page with help for "gt" + +CTRL-W gf Open a new tab page and edit the file name under the cursor. + See |CTRL-W_gf|. + +CTRL-W gF Open a new tab page and edit the file name under the cursor + and jump to the line number following the file name. + See |CTRL-W_gF|. + +CLOSING A TAB PAGE: + +Closing the last window of a tab page closes the tab page too, unless there is +only one tab page. + +Using the mouse: If the tab page line is displayed you can click in the "X" at +the top right to close the current tab page. A custom |'tabline'| may show +something else. + + *:tabc* *:tabclose* +:tabc[lose][!] Close current tab page. + This command fails when: + - There is only one tab page on the screen. *E784* + - When 'hidden' is not set, [!] is not used, a buffer has + changes, and there is no other window on this buffer. + Changes to the buffer are not written and won't get lost, so + this is a "safe" command. + +:tabc[lose][!] {count} + Close tab page {count}. Fails in the same way as `:tabclose` + above. + + *:tabo* *:tabonly* +:tabo[nly][!] Close all other tab pages. + When the 'hidden' option is set, all buffers in closed windows + become hidden. + When 'hidden' is not set, and the 'autowrite' option is set, + modified buffers are written. Otherwise, windows that have + buffers that are modified are not removed, unless the [!] is + given, then they become hidden. But modified buffers are + never abandoned, so changes cannot get lost. + + +SWITCHING TO ANOTHER TAB PAGE: + +Using the mouse: If the tab page line is displayed you can click in a tab page +label to switch to that tab page. Click where there is no label to go to the +next tab page. |'tabline'| + +:tabn[ext] *:tabn* *:tabnext* *gt* +<C-PageDown> *CTRL-<PageDown>* *<C-PageDown>* +gt *i_CTRL-<PageDown>* *i_<C-PageDown>* + Go to the next tab page. Wraps around from the last to the + first one. + +:tabn[ext] {count} +{count}<C-PageDown> +{count}gt Go to tab page {count}. The first tab page has number one. + + +:tabp[revious] *:tabp* *:tabprevious* *gT* *:tabN* +:tabN[ext] *:tabNext* *CTRL-<PageUp>* +<C-PageUp> *<C-PageUp>* *i_CTRL-<PageUp>* *i_<C-PageUp>* +gT Go to the previous tab page. Wraps around from the first one + to the last one. + +:tabp[revious] {count} +:tabN[ext] {count} +{count}<C-PageUp> +{count}gT Go {count} tab pages back. Wraps around from the first one + to the last one. + +:tabr[ewind] *:tabfir* *:tabfirst* *:tabr* *:tabrewind* +:tabfir[st] Go to the first tab page. + + *:tabl* *:tablast* +:tabl[ast] Go to the last tab page. + + +Other commands: + *:tabs* +:tabs List the tab pages and the windows they contain. + Shows a ">" for the current window. + Shows a "+" for modified buffers. + + +REORDERING TAB PAGES: + +:tabm[ove] [N] *:tabm* *:tabmove* +:[N]tabm[ove] + Move the current tab page to after tab page N. Use zero to + make the current tab page the first one. Without N the tab + page is made the last one. + +:tabm[ove] +[N] +:tabm[ove] -[N] + Move the current tab page N places to the right (with +) or to + the left (with -). + +Note that although it is possible to move a tab behind the N-th one by using +:Ntabmove, it is impossible to move it by N places by using :+Ntabmove. For +clarification what +N means in this context see |[range]|. + + +LOOPING OVER TAB PAGES: + + *:tabd* *:tabdo* +:tabd[o] {cmd} Execute {cmd} in each tab page. + It works like doing this: > + :tabfirst + :{cmd} + :tabnext + :{cmd} + etc. +< This only operates in the current window of each tab page. + When an error is detected on one tab page, further tab pages + will not be visited. + The last tab page (or where an error occurred) becomes the + current tab page. + {cmd} can contain '|' to concatenate several commands. + {cmd} must not open or close tab pages or reorder them. + {not in Vi} {not available when compiled without the + |+listcmds| feature} + Also see |:windo|, |:argdo| and |:bufdo|. + +============================================================================== +3. Other items *tab-page-other* + + *tabline-menu* +The GUI tab pages line has a popup menu. It is accessed with a right click. +The entries are: + Close Close the tab page under the mouse pointer. The + current one if there is no label under the mouse + pointer. + New Tab Open a tab page, editing an empty buffer. It appears + to the left of the mouse pointer. + Open Tab... Like "New Tab" and additionally use a file selector to + select a file to edit. + +Diff mode works per tab page. You can see the diffs between several files +within one tab page. Other tab pages can show differences between other +files. + +Variables local to a tab page start with "t:". |tabpage-variable| + +Currently there is only one option local to a tab page: 'cmdheight'. + +The TabLeave and TabEnter autocommand events can be used to do something when +switching from one tab page to another. The exact order depends on what you +are doing. When creating a new tab page this works as if you create a new +window on the same buffer and then edit another buffer. Thus ":tabnew" +triggers: + WinLeave leave current window + TabLeave leave current tab page + TabEnter enter new tab page + WinEnter enter window in new tab page + BufLeave leave current buffer + BufEnter enter new empty buffer + +When switching to another tab page the order is: + BufLeave + WinLeave + TabLeave + TabEnter + WinEnter + BufEnter + +============================================================================== +4. Setting 'tabline' *setting-tabline* + +The 'tabline' option specifies what the line with tab pages labels looks like. +It is only used when there is no GUI tab line. + +You can use the 'showtabline' option to specify when you want the line with +tab page labels to appear: never, when there is more than one tab page or +always. + +The highlighting of the tab pages line is set with the groups TabLine +TabLineSel and TabLineFill. |hl-TabLine| |hl-TabLineSel| |hl-TabLineFill| + +A "+" will be shown for a tab page that has a modified window. The number of +windows in a tabpage is also shown. Thus "3+" means three windows and one of +them has a modified buffer. + +The 'tabline' option allows you to define your preferred way to tab pages +labels. This isn't easy, thus an example will be given here. + +For basics see the 'statusline' option. The same items can be used in the +'tabline' option. Additionally, the |tabpagebuflist()|, |tabpagenr()| and +|tabpagewinnr()| functions are useful. + +Since the number of tab labels will vary, you need to use an expression for +the whole option. Something like: > + :set tabline=%!MyTabLine() + +Then define the MyTabLine() function to list all the tab pages labels. A +convenient method is to split it in two parts: First go over all the tab +pages and define labels for them. Then get the label for each tab page. > + + function MyTabLine() + let s = '' + for i in range(tabpagenr('$')) + " select the highlighting + if i + 1 == tabpagenr() + let s .= '%#TabLineSel#' + else + let s .= '%#TabLine#' + endif + + " set the tab page number (for mouse clicks) + let s .= '%' . (i + 1) . 'T' + + " the label is made by MyTabLabel() + let s .= ' %{MyTabLabel(' . (i + 1) . ')} ' + endfor + + " after the last tab fill with TabLineFill and reset tab page nr + let s .= '%#TabLineFill#%T' + + " right-align the label to close the current tab page + if tabpagenr('$') > 1 + let s .= '%=%#TabLine#%999Xclose' + endif + + return s + endfunction + +Now the MyTabLabel() function is called for each tab page to get its label. > + + function MyTabLabel(n) + let buflist = tabpagebuflist(a:n) + let winnr = tabpagewinnr(a:n) + return bufname(buflist[winnr - 1]) + endfunction + +This is just a simplistic example that results in a tab pages line that +resembles the default, but without adding a + for a modified buffer or +truncating the names. You will want to reduce the width of labels in a +clever way when there is not enough room. Check the 'columns' option for the +space available. + +============================================================================== +5. Setting 'guitablabel' *setting-guitablabel* + +When the GUI tab pages line is displayed, 'guitablabel' can be used to +specify the label to display for each tab page. Unlike 'tabline', which +specifies the whole tab pages line at once, 'guitablabel' is used for each +label separately. + +'guitabtooltip' is very similar and is used for the tooltip of the same label. +This only appears when the mouse pointer hovers over the label, thus it +usually is longer. Only supported on some systems though. + +See the 'statusline' option for the format of the value. + +The "%N" item can be used for the current tab page number. The |v:lnum| +variable is also set to this number when the option is evaluated. +The items that use a file name refer to the current window of the tab page. + +Note that syntax highlighting is not used for the option. The %T and %X +items are also ignored. + +A simple example that puts the tab page number and the buffer name in the +label: > + :set guitablabel=%N\ %f + +An example that resembles the default 'guitablabel': Show the number of +windows in the tab page and a '+' if there is a modified buffer: > + + function GuiTabLabel() + let label = '' + let bufnrlist = tabpagebuflist(v:lnum) + + " Add '+' if one of the buffers in the tab page is modified + for bufnr in bufnrlist + if getbufvar(bufnr, "&modified") + let label = '+' + break + endif + endfor + + " Append the number of windows in the tab page if more than one + let wincount = tabpagewinnr(v:lnum, '$') + if wincount > 1 + let label .= wincount + endif + if label != '' + let label .= ' ' + endif + + " Append the buffer name + return label . bufname(bufnrlist[tabpagewinnr(v:lnum) - 1]) + endfunction + + set guitablabel=%{GuiTabLabel()} + +Note that the function must be defined before setting the option, otherwise +you get an error message for the function not being known. + +If you want to fall back to the default label, return an empty string. + +If you want to show something specific for a tab page, you might want to use a +tab page local variable. |t:var| + + + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt new file mode 100644 index 0000000000..06c9838603 --- /dev/null +++ b/runtime/doc/tagsrch.txt @@ -0,0 +1,837 @@ +*tagsrch.txt* For Vim version 7.4. Last change: 2013 Oct 01 + + + VIM REFERENCE MANUAL by Bram Moolenaar + + +Tags and special searches *tags-and-searches* + +See section |29.1| of the user manual for an introduction. + +1. Jump to a tag |tag-commands| +2. Tag stack |tag-stack| +3. Tag match list |tag-matchlist| +4. Tags details |tag-details| +5. Tags file format |tags-file-format| +6. Include file searches |include-search| + +============================================================================== +1. Jump to a tag *tag-commands* + + *tag* *tags* +A tag is an identifier that appears in a "tags" file. It is a sort of label +that can be jumped to. For example: In C programs each function name can be +used as a tag. The "tags" file has to be generated by a program like ctags, +before the tag commands can be used. + +With the ":tag" command the cursor will be positioned on the tag. With the +CTRL-] command, the keyword on which the cursor is standing is used as the +tag. If the cursor is not on a keyword, the first keyword to the right of the +cursor is used. + +The ":tag" command works very well for C programs. If you see a call to a +function and wonder what that function does, position the cursor inside of the +function name and hit CTRL-]. This will bring you to the function definition. +An easy way back is with the CTRL-T command. Also read about the tag stack +below. + + *:ta* *:tag* *E426* *E429* +:[count]ta[g][!] {ident} + Jump to the definition of {ident}, using the + information in the tags file(s). Put {ident} in the + tag stack. See |tag-!| for [!]. + {ident} can be a regexp pattern, see |tag-regexp|. + When there are several matching tags for {ident}, jump + to the [count] one. When [count] is omitted the + first one is jumped to. See |tag-matchlist| for + jumping to other matching tags. + +g<LeftMouse> *g<LeftMouse>* +<C-LeftMouse> *<C-LeftMouse>* *CTRL-]* +CTRL-] Jump to the definition of the keyword under the + cursor. Same as ":tag {ident}", where {ident} is the + keyword under or after cursor. + When there are several matching tags for {ident}, jump + to the [count] one. When no [count] is given the + first one is jumped to. See |tag-matchlist| for + jumping to other matching tags. + {Vi: identifier after the cursor} + + *v_CTRL-]* +{Visual}CTRL-] Same as ":tag {ident}", where {ident} is the text that + is highlighted. {not in Vi} + + *telnet-CTRL-]* +CTRL-] is the default telnet escape key. When you type CTRL-] to jump to a +tag, you will get the telnet prompt instead. Most versions of telnet allow +changing or disabling the default escape key. See the telnet man page. You +can 'telnet -E {Hostname}' to disable the escape character, or 'telnet -e +{EscapeCharacter} {Hostname}' to specify another escape character. If +possible, try to use "ssh" instead of "telnet" to avoid this problem. + + *tag-priority* +When there are multiple matches for a tag, this priority is used: +1. "FSC" A full matching static tag for the current file. +2. "F C" A full matching global tag for the current file. +3. "F " A full matching global tag for another file. +4. "FS " A full matching static tag for another file. +5. " SC" An ignore-case matching static tag for the current file. +6. " C" An ignore-case matching global tag for the current file. +7. " " An ignore-case matching global tag for another file. +8. " S " An ignore-case matching static tag for another file. + +Note that when the current file changes, the priority list is mostly not +changed, to avoid confusion when using ":tnext". It is changed when using +":tag {ident}". + +The ignore-case matches are not found for a ":tag" command when the +'ignorecase' option is off. They are found when a pattern is used (starting +with a "/") and for ":tselect", also when 'ignorecase' is off. Note that +using ignore-case tag searching disables binary searching in the tags file, +which causes a slowdown. This can be avoided by fold-case sorting the tag +file. See the 'tagbsearch' option for an explanation. + +============================================================================== +2. Tag stack *tag-stack* *tagstack* *E425* + +On the tag stack is remembered which tags you jumped to, and from where. +Tags are only pushed onto the stack when the 'tagstack' option is set. + +g<RightMouse> *g<RightMouse>* +<C-RightMouse> *<C-RightMouse>* *CTRL-T* +CTRL-T Jump to [count] older entry in the tag stack + (default 1). {not in Vi} + + *:po* *:pop* *E555* *E556* +:[count]po[p][!] Jump to [count] older entry in tag stack (default 1). + See |tag-!| for [!]. {not in Vi} + +:[count]ta[g][!] Jump to [count] newer entry in tag stack (default 1). + See |tag-!| for [!]. {not in Vi} + + *:tags* +:tags Show the contents of the tag stack. The active + entry is marked with a '>'. {not in Vi} + +The output of ":tags" looks like this: + + # TO tag FROM line in file/text + 1 1 main 1 harddisk2:text/vim/test + > 2 2 FuncA 58 i = FuncA(10); + 3 1 FuncC 357 harddisk2:text/vim/src/amiga.c + +This list shows the tags that you jumped to and the cursor position before +that jump. The older tags are at the top, the newer at the bottom. + +The '>' points to the active entry. This is the tag that will be used by the +next ":tag" command. The CTRL-T and ":pop" command will use the position +above the active entry. + +Below the "TO" is the number of the current match in the match list. Note +that this doesn't change when using ":pop" or ":tag". + +The line number and file name are remembered to be able to get back to where +you were before the tag command. The line number will be correct, also when +deleting/inserting lines, unless this was done by another program (e.g. +another instance of Vim). + +For the current file, the "file/text" column shows the text at the position. +An indent is removed and a long line is truncated to fit in the window. + +You can jump to previously used tags with several commands. Some examples: + + ":pop" or CTRL-T to position before previous tag + {count}CTRL-T to position before {count} older tag + ":tag" to newer tag + ":0tag" to last used tag + +The most obvious way to use this is while browsing through the call graph of +a program. Consider the following call graph: + + main ---> FuncA ---> FuncC + ---> FuncB + +(Explanation: main calls FuncA and FuncB; FuncA calls FuncC). +You can get from main to FuncA by using CTRL-] on the call to FuncA. Then +you can CTRL-] to get to FuncC. If you now want to go back to main you can +use CTRL-T twice. Then you can CTRL-] to FuncB. + +If you issue a ":ta {ident}" or CTRL-] command, this tag is inserted at the +current position in the stack. If the stack was full (it can hold up to 20 +entries), the oldest entry is deleted and the older entries shift one +position up (their index number is decremented by one). If the last used +entry was not at the bottom, the entries below the last used one are +deleted. This means that an old branch in the call graph is lost. After the +commands explained above the tag stack will look like this: + + # TO tag FROM line in file/text + 1 1 main 1 harddisk2:text/vim/test + 2 1 FuncB 59 harddisk2:text/vim/src/main.c + + *E73* +When you try to use the tag stack while it doesn't contain anything you will +get an error message. + +============================================================================== +3. Tag match list *tag-matchlist* *E427* *E428* + +When there are several matching tags, these commands can be used to jump +between them. Note that these commands don't change the tag stack, they keep +the same entry. + + *:ts* *:tselect* +:ts[elect][!] [ident] List the tags that match [ident], using the + information in the tags file(s). + When [ident] is not given, the last tag name from the + tag stack is used. + With a '>' in the first column is indicated which is + the current position in the list (if there is one). + [ident] can be a regexp pattern, see |tag-regexp|. + See |tag-priority| for the priorities used in the + listing. {not in Vi} + Example output: + +> + nr pri kind tag file + 1 F f mch_delay os_amiga.c + mch_delay(msec, ignoreinput) + > 2 F f mch_delay os_msdos.c + mch_delay(msec, ignoreinput) + 3 F f mch_delay os_unix.c + mch_delay(msec, ignoreinput) + Enter nr of choice (<CR> to abort): +< + See |tag-priority| for the "pri" column. Note that + this depends on the current file, thus using + ":tselect xxx" can produce different results. + The "kind" column gives the kind of tag, if this was + included in the tags file. + The "info" column shows information that could be + found in the tags file. It depends on the program + that produced the tags file. + When the list is long, you may get the |more-prompt|. + If you already see the tag you want to use, you can + type 'q' and enter the number. + + *:sts* *:stselect* +:sts[elect][!] [ident] Does ":tselect[!] [ident]" and splits the window for + the selected tag. {not in Vi} + + *g]* +g] Like CTRL-], but use ":tselect" instead of ":tag". + {not in Vi} + + *v_g]* +{Visual}g] Same as "g]", but use the highlighted text as the + identifier. {not in Vi} + + *:tj* *:tjump* +:tj[ump][!] [ident] Like ":tselect", but jump to the tag directly when + there is only one match. {not in Vi} + + *:stj* *:stjump* +:stj[ump][!] [ident] Does ":tjump[!] [ident]" and splits the window for the + selected tag. {not in Vi} + + *g_CTRL-]* +g CTRL-] Like CTRL-], but use ":tjump" instead of ":tag". + {not in Vi} + + *v_g_CTRL-]* +{Visual}g CTRL-] Same as "g CTRL-]", but use the highlighted text as + the identifier. {not in Vi} + + *:tn* *:tnext* +:[count]tn[ext][!] Jump to [count] next matching tag (default 1). See + |tag-!| for [!]. {not in Vi} + + *:tp* *:tprevious* +:[count]tp[revious][!] Jump to [count] previous matching tag (default 1). + See |tag-!| for [!]. {not in Vi} + + *:tN* *:tNext* +:[count]tN[ext][!] Same as ":tprevious". {not in Vi} + + *:tr* *:trewind* +:[count]tr[ewind][!] Jump to first matching tag. If [count] is given, jump + to [count]th matching tag. See |tag-!| for [!]. {not + in Vi} + + *:tf* *:tfirst* +:[count]tf[irst][!] Same as ":trewind". {not in Vi} + + *:tl* *:tlast* +:tl[ast][!] Jump to last matching tag. See |tag-!| for [!]. {not + in Vi} + + *:lt* *:ltag* +:lt[ag][!] [ident] Jump to tag [ident] and add the matching tags to a new + location list for the current window. [ident] can be + a regexp pattern, see |tag-regexp|. When [ident] is + not given, the last tag name from the tag stack is + used. The search pattern to locate the tag line is + prefixed with "\V" to escape all the special + characters (very nomagic). The location list showing + the matching tags is independent of the tag stack. + See |tag-!| for [!]. + {not in Vi} + +When there is no other message, Vim shows which matching tag has been jumped +to, and the number of matching tags: > + tag 1 of 3 or more +The " or more" is used to indicate that Vim didn't try all the tags files yet. +When using ":tnext" a few times, or with ":tlast", more matches may be found. + +When you didn't see this message because of some other message, or you just +want to know where you are, this command will show it again (and jump to the +same tag as last time): > + :0tn +< + *tag-skip-file* +When a matching tag is found for which the file doesn't exist, this match is +skipped and the next matching tag is used. Vim reports this, to notify you of +missing files. When the end of the list of matches has been reached, an error +message is given. + + *tag-preview* +The tag match list can also be used in the preview window. The commands are +the same as above, with a "p" prepended. +{not available when compiled without the |+quickfix| feature} + + *:pts* *:ptselect* +:pts[elect][!] [ident] Does ":tselect[!] [ident]" and shows the new tag in a + "Preview" window. See |:ptag| for more info. + {not in Vi} + + *:ptj* *:ptjump* +:ptj[ump][!] [ident] Does ":tjump[!] [ident]" and shows the new tag in a + "Preview" window. See |:ptag| for more info. + {not in Vi} + + *:ptn* *:ptnext* +:[count]ptn[ext][!] ":tnext" in the preview window. See |:ptag|. + {not in Vi} + + *:ptp* *:ptprevious* +:[count]ptp[revious][!] ":tprevious" in the preview window. See |:ptag|. + {not in Vi} + + *:ptN* *:ptNext* +:[count]ptN[ext][!] Same as ":ptprevious". {not in Vi} + + *:ptr* *:ptrewind* +:[count]ptr[ewind][!] ":trewind" in the preview window. See |:ptag|. + {not in Vi} + + *:ptf* *:ptfirst* +:[count]ptf[irst][!] Same as ":ptrewind". {not in Vi} + + *:ptl* *:ptlast* +:ptl[ast][!] ":tlast" in the preview window. See |:ptag|. + {not in Vi} + +============================================================================== +4. Tags details *tag-details* + + *static-tag* +A static tag is a tag that is defined for a specific file. In a C program +this could be a static function. + +In Vi jumping to a tag sets the current search pattern. This means that +the "n" command after jumping to a tag does not search for the same pattern +that it did before jumping to the tag. Vim does not do this as we consider it +to be a bug. You can still find the tag search pattern in the search history. +If you really want the old Vi behavior, set the 't' flag in 'cpoptions'. + + *tag-binary-search* +Vim uses binary searching in the tags file to find the desired tag quickly +(when enabled at compile time |+tag_binary|). But this only works if the +tags file was sorted on ASCII byte value. Therefore, if no match was found, +another try is done with a linear search. If you only want the linear search, +reset the 'tagbsearch' option. Or better: Sort the tags file! + +Note that the binary searching is disabled when not looking for a tag with a +specific name. This happens when ignoring case and when a regular expression +is used that doesn't start with a fixed string. Tag searching can be a lot +slower then. The former can be avoided by case-fold sorting the tags file. +See 'tagbsearch' for details. + + *tag-regexp* +The ":tag" and ":tselect" commands accept a regular expression argument. See +|pattern| for the special characters that can be used. +When the argument starts with '/', it is used as a pattern. If the argument +does not start with '/', it is taken literally, as a full tag name. +Examples: > + :tag main +< jumps to the tag "main" that has the highest priority. > + :tag /^get +< jumps to the tag that starts with "get" and has the highest priority. > + :tag /norm +< lists all the tags that contain "norm", including "id_norm". +When the argument both exists literally, and match when used as a regexp, a +literal match has a higher priority. For example, ":tag /open" matches "open" +before "open_file" and "file_open". +When using a pattern case is ignored. If you want to match case use "\C" in +the pattern. + + *tag-!* +If the tag is in the current file this will always work. Otherwise the +performed actions depend on whether the current file was changed, whether a ! +is added to the command and on the 'autowrite' option: + + tag in file autowrite ~ +current file changed ! option action ~ +----------------------------------------------------------------------------- + yes x x x goto tag + no no x x read other file, goto tag + no yes yes x abandon current file, read other file, goto + tag + no yes no on write current file, read other file, goto + tag + no yes no off fail +----------------------------------------------------------------------------- + +- If the tag is in the current file, the command will always work. +- If the tag is in another file and the current file was not changed, the + other file will be made the current file and read into the buffer. +- If the tag is in another file, the current file was changed and a ! is + added to the command, the changes to the current file are lost, the other + file will be made the current file and read into the buffer. +- If the tag is in another file, the current file was changed and the + 'autowrite' option is on, the current file will be written, the other + file will be made the current file and read into the buffer. +- If the tag is in another file, the current file was changed and the + 'autowrite' option is off, the command will fail. If you want to save + the changes, use the ":w" command and then use ":tag" without an argument. + This works because the tag is put on the stack anyway. If you want to lose + the changes you can use the ":tag!" command. + + *tag-security* +Note that Vim forbids some commands, for security reasons. This works like +using the 'secure' option for exrc/vimrc files in the current directory. See +|trojan-horse| and |sandbox|. +When the {tagaddress} changes a buffer, you will get a warning message: + "WARNING: tag command changed a buffer!!!" +In a future version changing the buffer will be impossible. All this for +security reasons: Somebody might hide a nasty command in the tags file, which +would otherwise go unnoticed. Example: > + :$d|/tag-function-name/ +{this security prevention is not present in Vi} + +In Vi the ":tag" command sets the last search pattern when the tag is searched +for. In Vim this is not done, the previous search pattern is still remembered, +unless the 't' flag is present in 'cpoptions'. The search pattern is always +put in the search history, so you can modify it if searching fails. + + *emacs-tags* *emacs_tags* *E430* +Emacs style tag files are only supported if Vim was compiled with the +|+emacs_tags| feature enabled. Sorry, there is no explanation about Emacs tag +files here, it is only supported for backwards compatibility :-). + +Lines in Emacs tags files can be very long. Vim only deals with lines of up +to about 510 bytes. To see whether lines are ignored set 'verbose' to 5 or +higher. + + *tags-option* +The 'tags' option is a list of file names. Each of these files is searched +for the tag. This can be used to use a different tags file than the default +file "tags". It can also be used to access a common tags file. + +The next file in the list is not used when: +- A matching static tag for the current buffer has been found. +- A matching global tag has been found. +This also depends on the 'ignorecase' option. If it is off, and the tags file +only has a match without matching case, the next tags file is searched for a +match with matching case. If no tag with matching case is found, the first +match without matching case is used. If 'ignorecase' is on, and a matching +global tag with or without matching case is found, this one is used, no +further tags files are searched. + +When a tag file name starts with "./", the '.' is replaced with the path of +the current file. This makes it possible to use a tags file in the directory +where the current file is (no matter what the current directory is). The idea +of using "./" is that you can define which tag file is searched first: In the +current directory ("tags,./tags") or in the directory of the current file +("./tags,tags"). + +For example: > + :set tags=./tags,tags,/home/user/commontags + +In this example the tag will first be searched for in the file "tags" in the +directory where the current file is. Next the "tags" file in the current +directory. If it is not found there, then the file "/home/user/commontags" +will be searched for the tag. + +This can be switched off by including the 'd' flag in 'cpoptions', to make +it Vi compatible. "./tags" will then be the tags file in the current +directory, instead of the tags file in the directory where the current file +is. + +Instead of the comma a space may be used. Then a backslash is required for +the space to be included in the string option: > + :set tags=tags\ /home/user/commontags + +To include a space in a file name use three backslashes. To include a comma +in a file name use two backslashes. For example, use: > + :set tags=tag\\\ file,/home/user/common\\,tags + +for the files "tag file" and "/home/user/common,tags". The 'tags' option will +have the value "tag\ file,/home/user/common\,tags". + +If the 'tagrelative' option is on (which is the default) and using a tag file +in another directory, file names in that tag file are relative to the +directory where the tag file is. + +============================================================================== +5. Tags file format *tags-file-format* *E431* + + *ctags* *jtags* +A tags file can be created with an external command, for example "ctags". It +will contain a tag for each function. Some versions of "ctags" will also make +a tag for each "#defined" macro, typedefs, enums, etc. + +Some programs that generate tags files: +ctags As found on most Unix systems. Only supports C. Only + does the basic work. + *Exuberant_ctags* +exuberant ctags This a very good one. It works for C, C++, Java, + Fortran, Eiffel and others. It can generate tags for + many items. See http://ctags.sourceforge.net. +etags Connected to Emacs. Supports many languages. +JTags For Java, in Java. It can be found at + http://www.fleiner.com/jtags/. +ptags.py For Python, in Python. Found in your Python source + directory at Tools/scripts/ptags.py. +ptags For Perl, in Perl. It can be found at + http://www.eleves.ens.fr:8080/home/nthiery/Tags/. +gnatxref For Ada. See http://www.gnuada.org/. gnatxref is + part of the gnat package. + + +The lines in the tags file must have one of these three formats: + +1. {tagname} {TAB} {tagfile} {TAB} {tagaddress} +2. {tagfile}:{tagname} {TAB} {tagfile} {TAB} {tagaddress} +3. {tagname} {TAB} {tagfile} {TAB} {tagaddress} {term} {field} .. + +The first is a normal tag, which is completely compatible with Vi. It is the +only format produced by traditional ctags implementations. This is often used +for functions that are global, also referenced in other files. + +The lines in the tags file can end in <LF> or <CR><LF>. On the Macintosh <CR> +also works. The <CR> and <NL> characters can never appear inside a line. + + *tag-old-static* +The second format is for a static tag only. It is obsolete now, replaced by +the third format. It is only supported by Elvis 1.x and Vim and a few +versions of ctags. A static tag is often used for functions that are local, +only referenced in the file {tagfile}. Note that for the static tag, the two +occurrences of {tagfile} must be exactly the same. Also see |tags-option| +below, for how static tags are used. + +The third format is new. It includes additional information in optional +fields at the end of each line. It is backwards compatible with Vi. It is +only supported by new versions of ctags (such as Exuberant ctags). + +{tagname} The identifier. Normally the name of a function, but it can + be any identifier. It cannot contain a <Tab>. +{TAB} One <Tab> character. Note: previous versions allowed any + white space here. This has been abandoned to allow spaces in + {tagfile}. It can be re-enabled by including the + |+tag_any_white| feature at compile time. *tag-any-white* +{tagfile} The file that contains the definition of {tagname}. It can + have an absolute or relative path. It may contain environment + variables and wildcards (although the use of wildcards is + doubtful). It cannot contain a <Tab>. +{tagaddress} The Ex command that positions the cursor on the tag. It can + be any Ex command, although restrictions apply (see + |tag-security|). Posix only allows line numbers and search + commands, which are mostly used. +{term} ;" The two characters semicolon and double quote. This is + interpreted by Vi as the start of a comment, which makes the + following be ignored. This is for backwards compatibility + with Vi, it ignores the following fields. +{field} .. A list of optional fields. Each field has the form: + + <Tab>{fieldname}:{value} + + The {fieldname} identifies the field, and can only contain + alphabetical characters [a-zA-Z]. + The {value} is any string, but cannot contain a <Tab>. + These characters are special: + "\t" stands for a <Tab> + "\r" stands for a <CR> + "\n" stands for a <NL> + "\\" stands for a single '\' character + + There is one field that doesn't have a ':'. This is the kind + of the tag. It is handled like it was preceded with "kind:". + See the documentation of ctags for the kinds it produces. + + The only other field currently recognized by Vim is "file:" + (with an empty value). It is used for a static tag. + +The first lines in the tags file can contain lines that start with + !_TAG_ +These are sorted to the first lines, only rare tags that start with "!" can +sort to before them. Vim recognizes two items. The first one is the line +that indicates if the file was sorted. When this line is found, Vim uses +binary searching for the tags file: + !_TAG_FILE_SORTED<Tab>1<Tab>{anything} ~ + +A tag file may be case-fold sorted to avoid a linear search when 'ignorecase' +is on. See 'tagbsearch' for details. The value '2' should be used then: + !_TAG_FILE_SORTED<Tab>2<Tab>{anything} ~ + +The other tag that Vim recognizes, but only when compiled with the +|+multi_byte| feature, is the encoding of the tags file: + !_TAG_FILE_ENCODING<Tab>utf-8<Tab>{anything} ~ +Here "utf-8" is the encoding used for the tags. Vim will then convert the tag +being searched for from 'encoding' to the encoding of the tags file. And when +listing tags the reverse happens. When the conversion fails the unconverted +tag is used. + + *tag-search* +The command can be any Ex command, but often it is a search command. +Examples: + tag1 file1 /^main(argc, argv)/ ~ + tag2 file2 108 ~ + +The command is always executed with 'magic' not set. The only special +characters in a search pattern are "^" (begin-of-line) and "$" (<EOL>). +See |pattern|. Note that you must put a backslash before each backslash in +the search text. This is for backwards compatibility with Vi. + + *E434* *E435* +If the command is a normal search command (it starts and ends with "/" or +"?"), some special handling is done: +- Searching starts on line 1 of the file. + The direction of the search is forward for "/", backward for "?". + Note that 'wrapscan' does not matter, the whole file is always searched. (Vi + does use 'wrapscan', which caused tags sometimes not be found.) {Vi starts + searching in line 2 of another file. It does not find a tag in line 1 of + another file when 'wrapscan' is not set} +- If the search fails, another try is done ignoring case. If that fails too, + a search is done for: + "^tagname[ \t]*(" + (the tag with '^' prepended and "[ \t]*(" appended). When using function + names, this will find the function name when it is in column 0. This will + help when the arguments to the function have changed since the tags file was + made. If this search also fails another search is done with: + "^[#a-zA-Z_].*\<tagname[ \t]*(" + This means: A line starting with '#' or an identifier and containing the tag + followed by white space and a '('. This will find macro names and function + names with a type prepended. {the extra searches are not in Vi} + +============================================================================== +6. Include file searches *include-search* *definition-search* + *E387* *E388* *E389* + +These commands look for a string in the current file and in all encountered +included files (recursively). This can be used to find the definition of a +variable, function or macro. If you only want to search in the current +buffer, use the commands listed at |pattern-searches|. + +These commands are not available when the |+find_in_path| feature was disabled +at compile time. + +When a line is encountered that includes another file, that file is searched +before continuing in the current buffer. Files included by included files are +also searched. When an include file could not be found it is silently +ignored. Use the |:checkpath| command to discover which files could not be +found, possibly your 'path' option is not set up correctly. Note: the +included file is searched, not a buffer that may be editing that file. Only +for the current file the lines in the buffer are used. + +The string can be any keyword or a defined macro. For the keyword any match +will be found. For defined macros only lines that match with the 'define' +option will be found. The default is "^#\s*define", which is for C programs. +For other languages you probably want to change this. See 'define' for an +example for C++. The string cannot contain an end-of-line, only matches +within a line are found. + +When a match is found for a defined macro, the displaying of lines continues +with the next line when a line ends in a backslash. + +The commands that start with "[" start searching from the start of the current +file. The commands that start with "]" start at the current cursor position. + +The 'include' option is used to define a line that includes another file. The +default is "\^#\s*include", which is for C programs. Note: Vim does not +recognize C syntax, if the 'include' option matches a line inside +"#ifdef/#endif" or inside a comment, it is searched anyway. The 'isfname' +option is used to recognize the file name that comes after the matched +pattern. + +The 'path' option is used to find the directory for the include files that +do not have an absolute path. + +The 'comments' option is used for the commands that display a single line or +jump to a line. It defines patterns that may start a comment. Those lines +are ignored for the search, unless [!] is used. One exception: When the line +matches the pattern "^# *define" it is not considered to be a comment. + +If you want to list matches, and then select one to jump to, you could use a +mapping to do that for you. Here is an example: > + + :map <F4> [I:let nr = input("Which one: ")<Bar>exe "normal " . nr ."[\t"<CR> +< + *[i* +[i Display the first line that contains the keyword + under the cursor. The search starts at the beginning + of the file. Lines that look like a comment are + ignored (see 'comments' option). If a count is given, + the count'th matching line is displayed, and comment + lines are not ignored. {not in Vi} + + *]i* +]i like "[i", but start at the current cursor position. + {not in Vi} + + *:is* *:isearch* +:[range]is[earch][!] [count] [/]pattern[/] + Like "[i" and "]i", but search in [range] lines + (default: whole file). + See |:search-args| for [/] and [!]. {not in Vi} + + *[I* +[I Display all lines that contain the keyword under the + cursor. Filenames and line numbers are displayed + for the found lines. The search starts at the + beginning of the file. {not in Vi} + + *]I* +]I like "[I", but start at the current cursor position. + {not in Vi} + + *:il* *:ilist* +:[range]il[ist][!] [/]pattern[/] + Like "[I" and "]I", but search in [range] lines + (default: whole file). + See |:search-args| for [/] and [!]. {not in Vi} + + *[_CTRL-I* +[ CTRL-I Jump to the first line that contains the keyword + under the cursor. The search starts at the beginning + of the file. Lines that look like a comment are + ignored (see 'comments' option). If a count is given, + the count'th matching line is jumped to, and comment + lines are not ignored. {not in Vi} + + *]_CTRL-I* +] CTRL-I like "[ CTRL-I", but start at the current cursor + position. {not in Vi} + + *:ij* *:ijump* +:[range]ij[ump][!] [count] [/]pattern[/] + Like "[ CTRL-I" and "] CTRL-I", but search in + [range] lines (default: whole file). + See |:search-args| for [/] and [!]. {not in Vi} + +CTRL-W CTRL-I *CTRL-W_CTRL-I* *CTRL-W_i* +CTRL-W i Open a new window, with the cursor on the first line + that contains the keyword under the cursor. The + search starts at the beginning of the file. Lines + that look like a comment line are ignored (see + 'comments' option). If a count is given, the count'th + matching line is jumped to, and comment lines are not + ignored. {not in Vi} + + *:isp* *:isplit* +:[range]isp[lit][!] [count] [/]pattern[/] + Like "CTRL-W i" and "CTRL-W i", but search in + [range] lines (default: whole file). + See |:search-args| for [/] and [!]. {not in Vi} + + *[d* +[d Display the first macro definition that contains the + macro under the cursor. The search starts from the + beginning of the file. If a count is given, the + count'th matching line is displayed. {not in Vi} + + *]d* +]d like "[d", but start at the current cursor position. + {not in Vi} + + *:ds* *:dsearch* +:[range]ds[earch][!] [count] [/]string[/] + Like "[d" and "]d", but search in [range] lines + (default: whole file). + See |:search-args| for [/] and [!]. {not in Vi} + + *[D* +[D Display all macro definitions that contain the macro + under the cursor. Filenames and line numbers are + displayed for the found lines. The search starts + from the beginning of the file. {not in Vi} + + *]D* +]D like "[D", but start at the current cursor position. + {not in Vi} + + *:dli* *:dlist* +:[range]dli[st][!] [/]string[/] + Like `[D` and `]D`, but search in [range] lines + (default: whole file). + See |:search-args| for [/] and [!]. {not in Vi} + Note that `:dl` works like `:delete` with the "l" + flag, not `:dlist`. + + *[_CTRL-D* +[ CTRL-D Jump to the first macro definition that contains the + keyword under the cursor. The search starts from + the beginning of the file. If a count is given, the + count'th matching line is jumped to. {not in Vi} + + *]_CTRL-D* +] CTRL-D like "[ CTRL-D", but start at the current cursor + position. {not in Vi} + + *:dj* *:djump* +:[range]dj[ump][!] [count] [/]string[/] + Like "[ CTRL-D" and "] CTRL-D", but search in + [range] lines (default: whole file). + See |:search-args| for [/] and [!]. {not in Vi} + +CTRL-W CTRL-D *CTRL-W_CTRL-D* *CTRL-W_d* +CTRL-W d Open a new window, with the cursor on the first + macro definition line that contains the keyword + under the cursor. The search starts from the + beginning of the file. If a count is given, the + count'th matching line is jumped to. {not in Vi} + + *:dsp* *:dsplit* +:[range]dsp[lit][!] [count] [/]string[/] + Like "CTRL-W d", but search in [range] lines + (default: whole file). + See |:search-args| for [/] and [!]. {not in Vi} + + *:che* *:checkpath* +:che[ckpath] List all the included files that could not be found. + {not in Vi} + +:che[ckpath]! List all the included files. {not in Vi} + + *:search-args* +Common arguments for the commands above: +[!] When included, find matches in lines that are recognized as comments. + When excluded, a match is ignored when the line is recognized as a + comment (according to 'comments'), or the match is in a C comment (after + "//" or inside /* */). Note that a match may be missed if a line is + recognized as a comment, but the comment ends halfway the line. + And if the line is a comment, but it is not recognized (according to + 'comments') a match may be found in it anyway. Example: > + /* comment + foobar */ +< A match for "foobar" is found, because this line is not recognized as a + comment (even though syntax highlighting does recognize it). + Note: Since a macro definition mostly doesn't look like a comment, the + [!] makes no difference for ":dlist", ":dsearch" and ":djump". +[/] A pattern can be surrounded by '/'. Without '/' only whole words are + matched, using the pattern "\<pattern\>". Only after the second '/' a + next command can be appended with '|'. Example: > + :isearch /string/ | echo "the last one" +< For a ":djump", ":dsplit", ":dlist" and ":dsearch" command the pattern + is used as a literal string, not as a search pattern. + + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt new file mode 100644 index 0000000000..d2dd547061 --- /dev/null +++ b/runtime/doc/term.txt @@ -0,0 +1,879 @@ +*term.txt* For Vim version 7.4. Last change: 2014 May 13 + + + VIM REFERENCE MANUAL by Bram Moolenaar + + +Terminal information *terminal-info* + +Vim uses information about the terminal you are using to fill the screen and +recognize what keys you hit. If this information is not correct, the screen +may be messed up or keys may not be recognized. The actions which have to be +performed on the screen are accomplished by outputting a string of +characters. Special keys produce a string of characters. These strings are +stored in the terminal options, see |terminal-options|. + +NOTE: Most of this is not used when running the |GUI|. + +1. Startup |startup-terminal| +2. Terminal options |terminal-options| +3. Window size |window-size| +4. Slow and fast terminals |slow-fast-terminal| +5. Using the mouse |mouse-using| + +============================================================================== +1. Startup *startup-terminal* + +When Vim is started a default terminal type is assumed. For the Amiga this is +a standard CLI window, for MS-DOS the pc terminal, for Unix an ansi terminal. +A few other terminal types are always available, see below |builtin-terms|. + +You can give the terminal name with the '-T' Vim argument. If it is not given +Vim will try to get the name from the TERM environment variable. + + *termcap* *terminfo* *E557* *E558* *E559* +On Unix the terminfo database or termcap file is used. This is referred to as +"termcap" in all the documentation. At compile time, when running configure, +the choice whether to use terminfo or termcap is done automatically. When +running Vim the output of ":version" will show |+terminfo| if terminfo is +used. Also see |xterm-screens|. + +On non-Unix systems a termcap is only available if Vim was compiled with +TERMCAP defined. + + *builtin-terms* *builtin_terms* +Which builtin terminals are available depends on a few defines in feature.h, +which need to be set at compile time: + define output of ":version" terminals builtin ~ +NO_BUILTIN_TCAPS -builtin_terms none +SOME_BUILTIN_TCAPS +builtin_terms most common ones (default) +ALL_BUILTIN_TCAPS ++builtin_terms all available + +You can see a list of available builtin terminals with ":set term=xxx" (when +not running the GUI). Also see |+builtin_terms|. + +If the termcap code is included Vim will try to get the strings for the +terminal you are using from the termcap file and the builtin termcaps. Both +are always used, if an entry for the terminal you are using is present. Which +one is used first depends on the 'ttybuiltin' option: + +'ttybuiltin' on 1: builtin termcap 2: external termcap +'ttybuiltin' off 1: external termcap 2: builtin termcap + +If an option is missing in one of them, it will be obtained from the other +one. If an option is present in both, the one first encountered is used. + +Which external termcap file is used varies from system to system and may +depend on the environment variables "TERMCAP" and "TERMPATH". See "man +tgetent". + +Settings depending on terminal *term-dependent-settings* + +If you want to set options or mappings, depending on the terminal name, you +can do this best in your .vimrc. Example: > + + if &term == "xterm" + ... xterm maps and settings ... + elseif &term =~ "vt10." + ... vt100, vt102 maps and settings ... + endif +< + *raw-terminal-mode* +For normal editing the terminal will be put into "raw" mode. The strings +defined with 't_ti' and 't_ks' will be sent to the terminal. Normally this +puts the terminal in a state where the termcap codes are valid and activates +the cursor and function keys. When Vim exits the terminal will be put back +into the mode it was before Vim started. The strings defined with 't_te' and +'t_ke' will be sent to the terminal. On the Amiga, with commands that execute +an external command (e.g., "!!"), the terminal will be put into Normal mode +for a moment. This means that you can stop the output to the screen by +hitting a printing key. Output resumes when you hit <BS>. + + *cs7-problem* +Note: If the terminal settings are changed after running Vim, you might have +an illegal combination of settings. This has been reported on Solaris 2.5 +with "stty cs8 parenb", which is restored as "stty cs7 parenb". Use +"stty cs8 -parenb -istrip" instead, this is restored correctly. + +Some termcap entries are wrong in the sense that after sending 't_ks' the +cursor keys send codes different from the codes defined in the termcap. To +avoid this you can set 't_ks' (and 't_ke') to empty strings. This must be +done during initialization (see |initialization|), otherwise it's too late. + +Some termcap entries assume that the highest bit is always reset. For +example: The cursor-up entry for the Amiga could be ":ku=\E[A:". But the +Amiga really sends "\233A". This works fine if the highest bit is reset, +e.g., when using an Amiga over a serial line. If the cursor keys don't work, +try the entry ":ku=\233A:". + +Some termcap entries have the entry ":ku=\E[A:". But the Amiga really sends +"\233A". On output "\E[" and "\233" are often equivalent, on input they +aren't. You will have to change the termcap entry, or change the key code with +the :set command to fix this. + +Many cursor key codes start with an <Esc>. Vim must find out if this is a +single hit of the <Esc> key or the start of a cursor key sequence. It waits +for a next character to arrive. If it does not arrive within one second a +single <Esc> is assumed. On very slow systems this may fail, causing cursor +keys not to work sometimes. If you discover this problem reset the 'timeout' +option. Vim will wait for the next character to arrive after an <Esc>. If +you want to enter a single <Esc> you must type it twice. Resetting the +'esckeys' option avoids this problem in Insert mode, but you lose the +possibility to use cursor and function keys in Insert mode. + +On the Amiga the recognition of window resizing is activated only when the +terminal name is "amiga" or "builtin_amiga". + +Some terminals have confusing codes for the cursor keys. The televideo 925 is +such a terminal. It sends a CTRL-H for cursor-left. This would make it +impossible to distinguish a backspace and cursor-left. To avoid this problem +CTRL-H is never recognized as cursor-left. + + *vt100-cursor-keys* *xterm-cursor-keys* +Other terminals (e.g., vt100 and xterm) have cursor keys that send <Esc>OA, +<Esc>OB, etc. Unfortunately these are valid commands in insert mode: Stop +insert, Open a new line above the new one, start inserting 'A', 'B', etc. +Instead of performing these commands Vim will erroneously recognize this typed +key sequence as a cursor key movement. To avoid this and make Vim do what you +want in either case you could use these settings: > + :set notimeout " don't timeout on mappings + :set ttimeout " do timeout on terminal key codes + :set timeoutlen=100 " timeout after 100 msec +This requires the key-codes to be sent within 100 msec in order to recognize +them as a cursor key. When you type you normally are not that fast, so they +are recognized as individual typed commands, even though Vim receives the same +sequence of bytes. + + *vt100-function-keys* *xterm-function-keys* +An xterm can send function keys F1 to F4 in two modes: vt100 compatible or +not. Because Vim may not know what the xterm is sending, both types of keys +are recognized. The same happens for the <Home> and <End> keys. + normal vt100 ~ + <F1> t_k1 <Esc>[11~ <xF1> <Esc>OP *<xF1>-xterm* + <F2> t_k2 <Esc>[12~ <xF2> <Esc>OQ *<xF2>-xterm* + <F3> t_k3 <Esc>[13~ <xF3> <Esc>OR *<xF3>-xterm* + <F4> t_k4 <Esc>[14~ <xF4> <Esc>OS *<xF4>-xterm* + <Home> t_kh <Esc>[7~ <xHome> <Esc>OH *<xHome>-xterm* + <End> t_@7 <Esc>[4~ <xEnd> <Esc>OF *<xEnd>-xterm* + +When Vim starts, <xF1> is mapped to <F1>, <xF2> to <F2> etc. This means that +by default both codes do the same thing. If you make a mapping for <xF2>, +because your terminal does have two keys, the default mapping is overwritten, +thus you can use the <F2> and <xF2> keys for something different. + + *xterm-shifted-keys* +Newer versions of xterm support shifted function keys and special keys. Vim +recognizes most of them. Use ":set termcap" to check which are supported and +what the codes are. Mostly these are not in a termcap, they are only +supported by the builtin_xterm termcap. + + *xterm-modifier-keys* +Newer versions of xterm support Alt and Ctrl for most function keys. To avoid +having to add all combinations of Alt, Ctrl and Shift for every key a special +sequence is recognized at the end of a termcap entry: ";*X". The "X" can be +any character, often '~' is used. The ";*" stands for an optional modifier +argument. ";2" is Shift, ";3" is Alt, ";5" is Ctrl and ";9" is Meta (when +it's different from Alt). They can be combined. Examples: > + :set <F8>=^[[19;*~ + :set <Home>=^[[1;*H +Another speciality about these codes is that they are not overwritten by +another code. That is to avoid that the codes obtained from xterm directly +|t_RV| overwrite them. + *xterm-scroll-region* +The default termcap entry for xterm on Sun and other platforms does not +contain the entry for scroll regions. Add ":cs=\E[%i%d;%dr:" to the xterm +entry in /etc/termcap and everything should work. + + *xterm-end-home-keys* +On some systems (at least on FreeBSD with XFree86 3.1.2) the codes that the +<End> and <Home> keys send contain a <Nul> character. To make these keys send +the proper key code, add these lines to your ~/.Xdefaults file: + +*VT100.Translations: #override \n\ + <Key>Home: string("0x1b") string("[7~") \n\ + <Key>End: string("0x1b") string("[8~") + + *xterm-8bit* *xterm-8-bit* +Xterm can be run in a mode where it uses 8-bit escape sequences. The CSI code +is used instead of <Esc>[. The advantage is that an <Esc> can quickly be +recognized in Insert mode, because it can't be confused with the start of a +special key. +For the builtin termcap entries, Vim checks if the 'term' option contains +"8bit" anywhere. It then uses 8-bit characters for the termcap entries, the +mouse and a few other things. You would normally set $TERM in your shell to +"xterm-8bit" and Vim picks this up and adjusts to the 8-bit setting +automatically. +When Vim receives a response to the |t_RV| (request version) sequence and it +starts with CSI, it assumes that the terminal is in 8-bit mode and will +convert all key sequences to their 8-bit variants. + +============================================================================== +2. Terminal options *terminal-options* *termcap-options* *E436* + +The terminal options can be set just like normal options. But they are not +shown with the ":set all" command. Instead use ":set termcap". + +It is always possible to change individual strings by setting the +appropriate option. For example: > + :set t_ce=^V^[[K (CTRL-V, <Esc>, [, K) + +{Vi: no terminal options. You have to exit Vi, edit the termcap entry and +try again} + +The options are listed below. The associated termcap code is always equal to +the last two characters of the option name. Only one termcap code is +required: Cursor motion, 't_cm'. + +The options 't_da', 't_db', 't_ms', 't_xs' represent flags in the termcap. +When the termcap flag is present, the option will be set to "y". But any +non-empty string means that the flag is set. An empty string means that the +flag is not set. 't_CS' works like this too, but it isn't a termcap flag. + +OUTPUT CODES + option meaning ~ + + t_AB set background color (ANSI) *t_AB* *'t_AB'* + t_AF set foreground color (ANSI) *t_AF* *'t_AF'* + t_AL add number of blank lines *t_AL* *'t_AL'* + t_al add new blank line *t_al* *'t_al'* + t_bc backspace character *t_bc* *'t_bc'* + t_cd clear to end of screen *t_cd* *'t_cd'* + t_ce clear to end of line *t_ce* *'t_ce'* + t_cl clear screen *t_cl* *'t_cl'* + t_cm cursor motion (required!) *E437* *t_cm* *'t_cm'* + t_Co number of colors *t_Co* *'t_Co'* + t_CS if non-empty, cursor relative to scroll region *t_CS* *'t_CS'* + t_cs define scrolling region *t_cs* *'t_cs'* + t_CV define vertical scrolling region *t_CV* *'t_CV'* + t_da if non-empty, lines from above scroll down *t_da* *'t_da'* + t_db if non-empty, lines from below scroll up *t_db* *'t_db'* + t_DL delete number of lines *t_DL* *'t_DL'* + t_dl delete line *t_dl* *'t_dl'* + t_fs set window title end (from status line) *t_fs* *'t_fs'* + t_ke exit "keypad transmit" mode *t_ke* *'t_ke'* + t_ks start "keypad transmit" mode *t_ks* *'t_ks'* + t_le move cursor one char left *t_le* *'t_le'* + t_mb blinking mode *t_mb* *'t_mb'* + t_md bold mode *t_md* *'t_md'* + t_me Normal mode (undoes t_mr, t_mb, t_md and color) *t_me* *'t_me'* + t_mr reverse (invert) mode *t_mr* *'t_mr'* + *t_ms* *'t_ms'* + t_ms if non-empty, cursor can be moved in standout/inverse mode + t_nd non destructive space character *t_nd* *'t_nd'* + t_op reset to original color pair *t_op* *'t_op'* + t_RI cursor number of chars right *t_RI* *'t_RI'* + t_Sb set background color *t_Sb* *'t_Sb'* + t_Sf set foreground color *t_Sf* *'t_Sf'* + t_se standout end *t_se* *'t_se'* + t_so standout mode *t_so* *'t_so'* + t_sr scroll reverse (backward) *t_sr* *'t_sr'* + t_te out of "termcap" mode *t_te* *'t_te'* + t_ti put terminal in "termcap" mode *t_ti* *'t_ti'* + t_ts set window title start (to status line) *t_ts* *'t_ts'* + t_ue underline end *t_ue* *'t_ue'* + t_us underline mode *t_us* *'t_us'* + t_Ce undercurl end *t_Ce* *'t_Ce'* + t_Cs undercurl mode *t_Cs* *'t_Cs'* + t_ut clearing uses the current background color *t_ut* *'t_ut'* + t_vb visual bell *t_vb* *'t_vb'* + t_ve cursor visible *t_ve* *'t_ve'* + t_vi cursor invisible *t_vi* *'t_vi'* + t_vs cursor very visible *t_vs* *'t_vs'* + *t_xs* *'t_xs'* + t_xs if non-empty, standout not erased by overwriting (hpterm) + t_ZH italics mode *t_ZH* *'t_ZH'* + t_ZR italics end *t_ZR* *'t_ZR'* + +Added by Vim (there are no standard codes for these): + t_IS set icon text start *t_IS* *'t_IS'* + t_IE set icon text end *t_IE* *'t_IE'* + t_WP set window position (Y, X) in pixels *t_WP* *'t_WP'* + t_WS set window size (height, width) in characters *t_WS* *'t_WS'* + t_SI start insert mode (bar cursor shape) *t_SI* *'t_SI'* + t_EI end insert mode (block cursor shape) *t_EI* *'t_EI'* + |termcap-cursor-shape| + t_RV request terminal version string (for xterm) *t_RV* *'t_RV'* + |xterm-8bit| |v:termresponse| |'ttymouse'| |xterm-codes| + t_u7 request cursor position (for xterm) *t_u7* *'t_u7'* + see |'ambiwidth'| + +KEY CODES +Note: Use the <> form if possible + + option name meaning ~ + + t_ku <Up> arrow up *t_ku* *'t_ku'* + t_kd <Down> arrow down *t_kd* *'t_kd'* + t_kr <Right> arrow right *t_kr* *'t_kr'* + t_kl <Left> arrow left *t_kl* *'t_kl'* + <xUp> alternate arrow up *<xUp>* + <xDown> alternate arrow down *<xDown>* + <xRight> alternate arrow right *<xRight>* + <xLeft> alternate arrow left *<xLeft>* + <S-Up> shift arrow up + <S-Down> shift arrow down + t_%i <S-Right> shift arrow right *t_%i* *'t_%i'* + t_#4 <S-Left> shift arrow left *t_#4* *'t_#4'* + t_k1 <F1> function key 1 *t_k1* *'t_k1'* + <xF1> alternate F1 *<xF1>* + t_k2 <F2> function key 2 *<F2>* *t_k2* *'t_k2'* + <xF2> alternate F2 *<xF2>* + t_k3 <F3> function key 3 *<F3>* *t_k3* *'t_k3'* + <xF3> alternate F3 *<xF3>* + t_k4 <F4> function key 4 *<F4>* *t_k4* *'t_k4'* + <xF4> alternate F4 *<xF4>* + t_k5 <F5> function key 5 *<F5>* *t_k5* *'t_k5'* + t_k6 <F6> function key 6 *<F6>* *t_k6* *'t_k6'* + t_k7 <F7> function key 7 *<F7>* *t_k7* *'t_k7'* + t_k8 <F8> function key 8 *<F8>* *t_k8* *'t_k8'* + t_k9 <F9> function key 9 *<F9>* *t_k9* *'t_k9'* + t_k; <F10> function key 10 *<F10>* *t_k;* *'t_k;'* + t_F1 <F11> function key 11 *<F11>* *t_F1* *'t_F1'* + t_F2 <F12> function key 12 *<F12>* *t_F2* *'t_F2'* + t_F3 <F13> function key 13 *<F13>* *t_F3* *'t_F3'* + t_F4 <F14> function key 14 *<F14>* *t_F4* *'t_F4'* + t_F5 <F15> function key 15 *<F15>* *t_F5* *'t_F5'* + t_F6 <F16> function key 16 *<F16>* *t_F6* *'t_F6'* + t_F7 <F17> function key 17 *<F17>* *t_F7* *'t_F7'* + t_F8 <F18> function key 18 *<F18>* *t_F8* *'t_F8'* + t_F9 <F19> function key 19 *<F19>* *t_F9* *'t_F9'* + <S-F1> shifted function key 1 + <S-xF1> alternate <S-F1> *<S-xF1>* + <S-F2> shifted function key 2 *<S-F2>* + <S-xF2> alternate <S-F2> *<S-xF2>* + <S-F3> shifted function key 3 *<S-F3>* + <S-xF3> alternate <S-F3> *<S-xF3>* + <S-F4> shifted function key 4 *<S-F4>* + <S-xF4> alternate <S-F4> *<S-xF4>* + <S-F5> shifted function key 5 *<S-F5>* + <S-F6> shifted function key 6 *<S-F6>* + <S-F7> shifted function key 7 *<S-F7>* + <S-F8> shifted function key 8 *<S-F8>* + <S-F9> shifted function key 9 *<S-F9>* + <S-F10> shifted function key 10 *<S-F10>* + <S-F11> shifted function key 11 *<S-F11>* + <S-F12> shifted function key 12 *<S-F12>* + t_%1 <Help> help key *t_%1* *'t_%1'* + t_&8 <Undo> undo key *t_&8* *'t_&8'* + t_kI <Insert> insert key *t_kI* *'t_kI'* + t_kD <Del> delete key *t_kD* *'t_kD'* + t_kb <BS> backspace key *t_kb* *'t_kb'* + t_kB <S-Tab> back-tab (shift-tab) *<S-Tab>* *t_kB* *'t_kB'* + t_kh <Home> home key *t_kh* *'t_kh'* + t_#2 <S-Home> shifted home key *<S-Home>* *t_#2* *'t_#2'* + <xHome> alternate home key *<xHome>* + t_@7 <End> end key *t_@7* *'t_@7'* + t_*7 <S-End> shifted end key *<S-End>* *t_star7* *'t_star7'* + <xEnd> alternate end key *<xEnd>* + t_kP <PageUp> page-up key *t_kP* *'t_kP'* + t_kN <PageDown> page-down key *t_kN* *'t_kN'* + t_K1 <kHome> keypad home key *t_K1* *'t_K1'* + t_K4 <kEnd> keypad end key *t_K4* *'t_K4'* + t_K3 <kPageUp> keypad page-up key *t_K3* *'t_K3'* + t_K5 <kPageDown> keypad page-down key *t_K5* *'t_K5'* + t_K6 <kPlus> keypad plus key *<kPlus>* *t_K6* *'t_K6'* + t_K7 <kMinus> keypad minus key *<kMinus>* *t_K7* *'t_K7'* + t_K8 <kDivide> keypad divide *<kDivide>* *t_K8* *'t_K8'* + t_K9 <kMultiply> keypad multiply *<kMultiply>* *t_K9* *'t_K9'* + t_KA <kEnter> keypad enter key *<kEnter>* *t_KA* *'t_KA'* + t_KB <kPoint> keypad decimal point *<kPoint>* *t_KB* *'t_KB'* + t_KC <k0> keypad 0 *<k0>* *t_KC* *'t_KC'* + t_KD <k1> keypad 1 *<k1>* *t_KD* *'t_KD'* + t_KE <k2> keypad 2 *<k2>* *t_KE* *'t_KE'* + t_KF <k3> keypad 3 *<k3>* *t_KF* *'t_KF'* + t_KG <k4> keypad 4 *<k4>* *t_KG* *'t_KG'* + t_KH <k5> keypad 5 *<k5>* *t_KH* *'t_KH'* + t_KI <k6> keypad 6 *<k6>* *t_KI* *'t_KI'* + t_KJ <k7> keypad 7 *<k7>* *t_KJ* *'t_KJ'* + t_KK <k8> keypad 8 *<k8>* *t_KK* *'t_KK'* + t_KL <k9> keypad 9 *<k9>* *t_KL* *'t_KL'* + <Mouse> leader of mouse code *<Mouse>* + +Note about t_so and t_mr: When the termcap entry "so" is not present the +entry for "mr" is used. And vice versa. The same is done for "se" and "me". +If your terminal supports both inversion and standout mode, you can see two +different modes. If your terminal supports only one of the modes, both will +look the same. + + *keypad-comma* +The keypad keys, when they are not mapped, behave like the equivalent normal +key. There is one exception: if you have a comma on the keypad instead of a +decimal point, Vim will use a dot anyway. Use these mappings to fix that: > + :noremap <kPoint> , + :noremap! <kPoint> , +< *xterm-codes* +There is a special trick to obtain the key codes which currently only works +for xterm. When |t_RV| is defined and a response is received which indicates +an xterm with patchlevel 141 or higher, Vim uses special escape sequences to +request the key codes directly from the xterm. The responses are used to +adjust the various t_ codes. This avoids the problem that the xterm can +produce different codes, depending on the mode it is in (8-bit, VT102, +VT220, etc.). The result is that codes like <xF1> are no longer needed. +Note: This is only done on startup. If the xterm options are changed after +Vim has started, the escape sequences may not be recognized any more. + + *xterm-resize* +Window resizing with xterm only works if the allowWindowOps resource is +enabled. On some systems and versions of xterm it's disabled by default +because someone thought it would be a security issue. It's not clear if this +is actually the case. + +To overrule the default, put this line in your ~/.Xdefaults or +~/.Xresources: +> + XTerm*allowWindowOps: true + +And run "xrdb -merge .Xresources" to make it effective. You can check the +value with the context menu (right mouse button while CTRL key is pressed), +there should be a tick at allow-window-ops. + + *termcap-colors* +Note about colors: The 't_Co' option tells Vim the number of colors available. +When it is non-zero, the 't_AB' and 't_AF' options are used to set the color. +If one of these is not available, 't_Sb' and 't_Sf' are used. 't_me' is used +to reset to the default colors. + + *termcap-cursor-shape* *termcap-cursor-color* +When Vim enters Insert mode the 't_SI' escape sequence is sent. When leaving +Insert mode 't_EI' is used. But only if both are defined. This can be used +to change the shape or color of the cursor in Insert mode. These are not +standard termcap/terminfo entries, you need to set them yourself. +Example for an xterm, this changes the color of the cursor: > + if &term =~ "xterm" + let &t_SI = "\<Esc>]12;purple\x7" + let &t_EI = "\<Esc>]12;blue\x7" + endif +NOTE: When Vim exits the shape for Normal mode will remain. The shape from +before Vim started will not be restored. +{not available when compiled without the |+cursorshape| feature} + + *termcap-title* +The 't_ts' and 't_fs' options are used to set the window title if the terminal +allows title setting via sending strings. They are sent before and after the +title string, respectively. Similar 't_IS' and 't_IE' are used to set the +icon text. These are Vim-internal extensions of the Unix termcap, so they +cannot be obtained from an external termcap. However, the builtin termcap +contains suitable entries for xterm and iris-ansi, so you don't need to set +them here. + *hpterm* +If inversion or other highlighting does not work correctly, try setting the +'t_xs' option to a non-empty string. This makes the 't_ce' code be used to +remove highlighting from a line. This is required for "hpterm". Setting the +'weirdinvert' option has the same effect as making 't_xs' non-empty, and vice +versa. + + *scroll-region* +Some termcaps do not include an entry for 'cs' (scroll region), although the +terminal does support it. For example: xterm on a Sun. You can use the +builtin_xterm or define t_cs yourself. For example: > + :set t_cs=^V^[[%i%d;%dr +Where ^V is CTRL-V and ^[ is <Esc>. + +The vertical scroll region t_CV is not a standard termcap code. Vim uses it +internally in the GUI. But it can also be defined for a terminal, if you can +find one that supports it. The two arguments are the left and right column of +the region which to restrict the scrolling to. Just like t_cs defines the top +and bottom lines. Defining t_CV will make scrolling in vertically split +windows a lot faster. Don't set t_CV when t_da or t_db is set (text isn't +cleared when scrolling). + +Unfortunately it is not possible to deduce from the termcap how cursor +positioning should be done when using a scrolling region: Relative to the +beginning of the screen or relative to the beginning of the scrolling region. +Most terminals use the first method. A known exception is the MS-DOS console +(pcterm). The 't_CS' option should be set to any string when cursor +positioning is relative to the start of the scrolling region. It should be +set to an empty string otherwise. It defaults to "yes" when 'term' is +"pcterm". + +Note for xterm users: The shifted cursor keys normally don't work. You can + make them work with the xmodmap command and some mappings in Vim. + + Give these commands in the xterm: + xmodmap -e "keysym Up = Up F13" + xmodmap -e "keysym Down = Down F16" + xmodmap -e "keysym Left = Left F18" + xmodmap -e "keysym Right = Right F19" + + And use these mappings in Vim: + :map <t_F3> <S-Up> + :map! <t_F3> <S-Up> + :map <t_F6> <S-Down> + :map! <t_F6> <S-Down> + :map <t_F8> <S-Left> + :map! <t_F8> <S-Left> + :map <t_F9> <S-Right> + :map! <t_F9> <S-Right> + +Instead of, say, <S-Up> you can use any other command that you want to use the +shift-cursor-up key for. (Note: To help people that have a Sun keyboard with +left side keys F14 is not used because it is confused with the undo key; F15 +is not used, because it does a window-to-front; F17 is not used, because it +closes the window. On other systems you can probably use them.) + +============================================================================== +3. Window size *window-size* + +[This is about the size of the whole window Vim is using, not a window that is +created with the ":split" command.] + +If you are running Vim on an Amiga and the terminal name is "amiga" or +"builtin_amiga", the amiga-specific window resizing will be enabled. On Unix +systems three methods are tried to get the window size: + +- an ioctl call (TIOCGSIZE or TIOCGWINSZ, depends on your system) +- the environment variables "LINES" and "COLUMNS" +- from the termcap entries "li" and "co" + +If everything fails a default size of 24 lines and 80 columns is assumed. If +a window-resize signal is received the size will be set again. If the window +size is wrong you can use the 'lines' and 'columns' options to set the +correct values. + +One command can be used to set the screen size: + + *:mod* *:mode* *E359* *E362* +:mod[e] [mode] + +Without argument this only detects the screen size and redraws the screen. +With MS-DOS it is possible to switch screen mode. [mode] can be one of these +values: + "bw40" 40 columns black&white + "c40" 40 columns color + "bw80" 80 columns black&white + "c80" 80 columns color (most people use this) + "mono" 80 columns monochrome + "c4350" 43 or 50 lines EGA/VGA mode + number mode number to use, depends on your video card + +============================================================================== +4. Slow and fast terminals *slow-fast-terminal* + *slow-terminal* + +If you have a fast terminal you may like to set the 'ruler' option. The +cursor position is shown in the status line. If you are using horizontal +scrolling ('wrap' option off) consider setting 'sidescroll' to a small +number. + +If you have a slow terminal you may want to reset the 'showcmd' option. +The command characters will not be shown in the status line. If the terminal +scrolls very slowly, set the 'scrolljump' to 5 or so. If the cursor is moved +off the screen (e.g., with "j") Vim will scroll 5 lines at a time. Another +possibility is to reduce the number of lines that Vim uses with the command +"z{height}<CR>". + +If the characters from the terminal are arriving with more than 1 second +between them you might want to set the 'timeout' and/or 'ttimeout' option. +See the "Options" chapter |options|. + +If your terminal does not support a scrolling region, but it does support +insert/delete line commands, scrolling with multiple windows may make the +lines jump up and down. If you don't want this set the 'ttyfast' option. +This will redraw the window instead of scroll it. + +If your terminal scrolls very slowly, but redrawing is not slow, set the +'ttyscroll' option to a small number, e.g., 3. This will make Vim redraw the +screen instead of scrolling, when there are more than 3 lines to be scrolled. + +If you are using a color terminal that is slow, use this command: > + hi NonText cterm=NONE ctermfg=NONE +This avoids that spaces are sent when they have different attributes. On most +terminals you can't see this anyway. + +If you are using Vim over a slow serial line, you might want to try running +Vim inside the "screen" program. Screen will optimize the terminal I/O quite +a bit. + +If you are testing termcap options, but you cannot see what is happening, +you might want to set the 'writedelay' option. When non-zero, one character +is sent to the terminal at a time (does not work for MS-DOS). This makes the +screen updating a lot slower, making it possible to see what is happening. + +============================================================================== +5. Using the mouse *mouse-using* + +This section is about using the mouse on a terminal or a terminal window. How +to use the mouse in a GUI window is explained in |gui-mouse|. For scrolling +with a mouse wheel see |scroll-mouse-wheel|. + +Don't forget to enable the mouse with this command: > + :set mouse=a +Otherwise Vim won't recognize the mouse in all modes (See 'mouse'). + +Currently the mouse is supported for Unix in an xterm window, in a *BSD +console with |sysmouse|, in a Linux console (with GPM |gpm-mouse|), for +MS-DOS and in a Windows console. +Mouse clicks can be used to position the cursor, select an area and paste. + +These characters in the 'mouse' option tell in which situations the mouse will +be used by Vim: + n Normal mode + v Visual mode + i Insert mode + c Command-line mode + h all previous modes when in a help file + a all previous modes + r for |hit-enter| prompt + +The default for 'mouse' is empty, the mouse is not used. Normally you would +do: > + :set mouse=a +to start using the mouse (this is equivalent to setting 'mouse' to "nvich"). +If you only want to use the mouse in a few modes or also want to use it for +the two questions you will have to concatenate the letters for those modes. +For example: > + :set mouse=nv +Will make the mouse work in Normal mode and Visual mode. > + :set mouse=h +Will make the mouse work in help files only (so you can use "g<LeftMouse>" to +jump to tags). + +Whether the selection that is started with the mouse is in Visual mode or +Select mode depends on whether "mouse" is included in the 'selectmode' +option. + +In an xterm, with the currently active mode included in the 'mouse' option, +normal mouse clicks are used by Vim, mouse clicks with the shift or ctrl key +pressed go to the xterm. With the currently active mode not included in +'mouse' all mouse clicks go to the xterm. + + *xterm-clipboard* +In the Athena and Motif GUI versions, when running in a terminal and there is +access to the X-server (DISPLAY is set), the copy and paste will behave like +in the GUI. If not, the middle mouse button will insert the unnamed register. +In that case, here is how you copy and paste a piece of text: + +Copy/paste with the mouse and Visual mode ('mouse' option must be set, see +above): +1. Press left mouse button on first letter of text, move mouse pointer to last + letter of the text and release the button. This will start Visual mode and + highlight the selected area. +2. Press "y" to yank the Visual text in the unnamed register. +3. Click the left mouse button at the insert position. +4. Click the middle mouse button. + +Shortcut: If the insert position is on the screen at the same time as the +Visual text, you can do 2, 3 and 4 all in one: Click the middle mouse button +at the insert position. + +Note: When the |-X| command line argument is used, Vim will not connect to the +X server and copy/paste to the X clipboard (selection) will not work. Use the +shift key with the mouse buttons to let the xterm do the selection. + + *xterm-command-server* +When the X-server clipboard is available, the command server described in +|x11-clientserver| can be enabled with the --servername command line argument. + + *xterm-copy-paste* +NOTE: In some (older) xterms, it's not possible to move the cursor past column +95 or 223. This is an xterm problem, not Vim's. Get a newer xterm +|color-xterm|. Also see |'ttymouse'|. + +Copy/paste in xterm with (current mode NOT included in 'mouse'): +1. Press left mouse button on first letter of text, move mouse pointer to last + letter of the text and release the button. +2. Use normal Vim commands to put the cursor at the insert position. +3. Press "a" to start Insert mode. +4. Click the middle mouse button. +5. Press ESC to end Insert mode. +(The same can be done with anything in 'mouse' if you keep the shift key +pressed while using the mouse.) + +Note: if you lose the 8th bit when pasting (special characters are translated +into other characters), you may have to do "stty cs8 -istrip -parenb" in your +shell before starting Vim. + +Thus in an xterm the shift and ctrl keys cannot be used with the mouse. Mouse +commands requiring the CTRL modifier can be simulated by typing the "g" key +before using the mouse: + "g<LeftMouse>" is "<C-LeftMouse> (jump to tag under mouse click) + "g<RightMouse>" is "<C-RightMouse> ("CTRL-T") + + *mouse-mode-table* *mouse-overview* +A short overview of what the mouse buttons do, when 'mousemodel' is "extend": + +Normal Mode: +event position selection change action ~ + cursor window ~ +<LeftMouse> yes end yes +<C-LeftMouse> yes end yes "CTRL-]" (2) +<S-LeftMouse> yes no change yes "*" (2) *<S-LeftMouse>* +<LeftDrag> yes start or extend (1) no *<LeftDrag>* +<LeftRelease> yes start or extend (1) no +<MiddleMouse> yes if not active no put +<MiddleMouse> yes if active no yank and put +<RightMouse> yes start or extend yes +<A-RightMouse> yes start or extend blockw. yes *<A-RightMouse>* +<S-RightMouse> yes no change yes "#" (2) *<S-RightMouse>* +<C-RightMouse> no no change no "CTRL-T" +<RightDrag> yes extend no *<RightDrag>* +<RightRelease> yes extend no *<RightRelease>* + +Insert or Replace Mode: +event position selection change action ~ + cursor window ~ +<LeftMouse> yes (cannot be active) yes +<C-LeftMouse> yes (cannot be active) yes "CTRL-O^]" (2) +<S-LeftMouse> yes (cannot be active) yes "CTRL-O*" (2) +<LeftDrag> yes start or extend (1) no like CTRL-O (1) +<LeftRelease> yes start or extend (1) no like CTRL-O (1) +<MiddleMouse> no (cannot be active) no put register +<RightMouse> yes start or extend yes like CTRL-O +<A-RightMouse> yes start or extend blockw. yes +<S-RightMouse> yes (cannot be active) yes "CTRL-O#" (2) +<C-RightMouse> no (cannot be active) no "CTRL-O CTRL-T" + +In a help window: +event position selection change action ~ + cursor window ~ +<2-LeftMouse> yes (cannot be active) no "^]" (jump to help tag) + +When 'mousemodel' is "popup", these are different: + +Normal Mode: +event position selection change action ~ + cursor window ~ +<S-LeftMouse> yes start or extend (1) no +<A-LeftMouse> yes start or extend blockw. no *<A-LeftMouse>* +<RightMouse> no popup menu no + +Insert or Replace Mode: +event position selection change action ~ + cursor window ~ +<S-LeftMouse> yes start or extend (1) no like CTRL-O (1) +<A-LeftMouse> yes start or extend blockw. no +<RightMouse> no popup menu no + +(1) only if mouse pointer moved since press +(2) only if click is in same buffer + +Clicking the left mouse button causes the cursor to be positioned. If the +click is in another window that window is made the active window. When +editing the command-line the cursor can only be positioned on the +command-line. When in Insert mode Vim remains in Insert mode. If 'scrolloff' +is set, and the cursor is positioned within 'scrolloff' lines from the window +border, the text is scrolled. + +A selection can be started by pressing the left mouse button on the first +character, moving the mouse to the last character, then releasing the mouse +button. You will not always see the selection until you release the button, +only in some versions (GUI, MS-DOS, WIN32) will the dragging be shown +immediately. Note that you can make the text scroll by moving the mouse at +least one character in the first/last line in the window when 'scrolloff' is +non-zero. + +In Normal, Visual and Select mode clicking the right mouse button causes the +Visual area to be extended. When 'mousemodel' is "popup", the left button has +to be used while keeping the shift key pressed. When clicking in a window +which is editing another buffer, the Visual or Select mode is stopped. + +In Normal, Visual and Select mode clicking the right mouse button with the alt +key pressed causes the Visual area to become blockwise. When 'mousemodel' is +"popup" the left button has to be used with the alt key. Note that this won't +work on systems where the window manager consumes the mouse events when the +alt key is pressed (it may move the window). + + *double-click* +Double, triple and quadruple clicks are supported when the GUI is active, +for MS-DOS and Win32, and for an xterm (if the gettimeofday() function is +available). For selecting text, extra clicks extend the selection: + click select ~ + double word or % match *<2-LeftMouse>* + triple line *<3-LeftMouse>* + quadruple rectangular block *<4-LeftMouse>* +Exception: In a Help window a double click jumps to help for the word that is +clicked on. +A double click on a word selects that word. 'iskeyword' is used to specify +which characters are included in a word. A double click on a character +that has a match selects until that match (like using "v%"). If the match is +an #if/#else/#endif block, the selection becomes linewise. +For MS-DOS and xterm the time for double clicking can be set with the +'mousetime' option. For the other systems this time is defined outside of +Vim. +An example, for using a double click to jump to the tag under the cursor: > + :map <2-LeftMouse> :exe "tag ". expand("<cword>")<CR> + +Dragging the mouse with a double click (button-down, button-up, button-down +and then drag) will result in whole words to be selected. This continues +until the button is released, at which point the selection is per character +again. + + *gpm-mouse* +The GPM mouse is only supported when the |+mouse_gpm| feature was enabled at +compile time. The GPM mouse driver (Linux console) does not support quadruple +clicks. + +In Insert mode, when a selection is started, Vim goes into Normal mode +temporarily. When Visual or Select mode ends, it returns to Insert mode. +This is like using CTRL-O in Insert mode. Select mode is used when the +'selectmode' option contains "mouse". + *sysmouse* +The sysmouse is only supported when the |+mouse_sysmouse| feature was enabled +at compile time. The sysmouse driver (*BSD console) does not support keyboard +modifiers. + + *drag-status-line* +When working with several windows, the size of the windows can be changed by +dragging the status line with the mouse. Point the mouse at a status line, +press the left button, move the mouse to the new position of the status line, +release the button. Just clicking the mouse in a status line makes that window +the current window, without moving the cursor. If by selecting a window it +will change position or size, the dragging of the status line will look +confusing, but it will work (just try it). + + *<MiddleRelease>* *<MiddleDrag>* +Mouse clicks can be mapped. The codes for mouse clicks are: + code mouse button normal action ~ + <LeftMouse> left pressed set cursor position + <LeftDrag> left moved while pressed extend selection + <LeftRelease> left released set selection end + <MiddleMouse> middle pressed paste text at cursor position + <MiddleDrag> middle moved while pressed - + <MiddleRelease> middle released - + <RightMouse> right pressed extend selection + <RightDrag> right moved while pressed extend selection + <RightRelease> right released set selection end + <X1Mouse> X1 button pressed - *X1Mouse* + <X1Drag> X1 moved while pressed - *X1Drag* + <X1Release> X1 button release - *X1Release* + <X2Mouse> X2 button pressed - *X2Mouse* + <X2Drag> X2 moved while pressed - *X2Drag* + <X2Release> X2 button release - *X2Release* + +The X1 and X2 buttons refer to the extra buttons found on some mice. The +'Microsoft Explorer' mouse has these buttons available to the right thumb. +Currently X1 and X2 only work on Win32 environments. + +Examples: > + :noremap <MiddleMouse> <LeftMouse><MiddleMouse> +Paste at the position of the middle mouse button click (otherwise the paste +would be done at the cursor position). > + + :noremap <LeftRelease> <LeftRelease>y +Immediately yank the selection, when using Visual mode. + +Note the use of ":noremap" instead of "map" to avoid a recursive mapping. +> + :map <X1Mouse> <C-O> + :map <X2Mouse> <C-I> +Map the X1 and X2 buttons to go forwards and backwards in the jump list, see +|CTRL-O| and |CTRL-I|. + + *mouse-swap-buttons* +To swap the meaning of the left and right mouse buttons: > + :noremap <LeftMouse> <RightMouse> + :noremap <LeftDrag> <RightDrag> + :noremap <LeftRelease> <RightRelease> + :noremap <RightMouse> <LeftMouse> + :noremap <RightDrag> <LeftDrag> + :noremap <RightRelease> <LeftRelease> + :noremap g<LeftMouse> <C-RightMouse> + :noremap g<RightMouse> <C-LeftMouse> + :noremap! <LeftMouse> <RightMouse> + :noremap! <LeftDrag> <RightDrag> + :noremap! <LeftRelease> <RightRelease> + :noremap! <RightMouse> <LeftMouse> + :noremap! <RightDrag> <LeftDrag> + :noremap! <RightRelease> <LeftRelease> +< + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/tips.txt b/runtime/doc/tips.txt new file mode 100644 index 0000000000..90aa20e8b4 --- /dev/null +++ b/runtime/doc/tips.txt @@ -0,0 +1,534 @@ +*tips.txt* For Vim version 7.4. Last change: 2009 Nov 07 + + + VIM REFERENCE MANUAL by Bram Moolenaar + + +Tips and ideas for using Vim *tips* + +These are just a few that we thought would be helpful for many users. +You can find many more tips on the wiki. The URL can be found on +http://www.vim.org + +Don't forget to browse the user manual, it also contains lots of useful tips +|usr_toc.txt|. + +Editing C programs |C-editing| +Finding where identifiers are used |ident-search| +Switching screens in an xterm |xterm-screens| +Scrolling in Insert mode |scroll-insert| +Smooth scrolling |scroll-smooth| +Correcting common typing mistakes |type-mistakes| +Counting words, lines, etc. |count-items| +Restoring the cursor position |restore-position| +Renaming files |rename-files| +Change a name in multiple files |change-name| +Speeding up external commands |speed-up| +Useful mappings |useful-mappings| +Compressing the help files |gzip-helpfile| +Executing shell commands in a window |shell-window| +Hex editing |hex-editing| +Using <> notation in autocommands |autocmd-<>| +Highlighting matching parens |match-parens| + +============================================================================== +Editing C programs *C-editing* + +There are quite a few features in Vim to help you edit C program files. Here +is an overview with tags to jump to: + +|usr_29.txt| Moving through programs chapter in the user manual. +|usr_30.txt| Editing programs chapter in the user manual. +|C-indenting| Automatically set the indent of a line while typing + text. +|=| Re-indent a few lines. +|format-comments| Format comments. + +|:checkpath| Show all recursively included files. +|[i| Search for identifier under cursor in current and + included files. +|[_CTRL-I| Jump to match for "[i" +|[I| List all lines in current and included files where + identifier under the cursor matches. +|[d| Search for define under cursor in current and included + files. + +|CTRL-]| Jump to tag under cursor (e.g., definition of a + function). +|CTRL-T| Jump back to before a CTRL-] command. +|:tselect| Select one tag out of a list of matching tags. + +|gd| Go to Declaration of local variable under cursor. +|gD| Go to Declaration of global variable under cursor. + +|gf| Go to file name under the cursor. + +|%| Go to matching (), {}, [], /* */, #if, #else, #endif. +|[/| Go to previous start of comment. +|]/| Go to next end of comment. +|[#| Go back to unclosed #if, #ifdef, or #else. +|]#| Go forward to unclosed #else or #endif. +|[(| Go back to unclosed '(' +|])| Go forward to unclosed ')' +|[{| Go back to unclosed '{' +|]}| Go forward to unclosed '}' + +|v_ab| Select "a block" from "[(" to "])", including braces +|v_ib| Select "inner block" from "[(" to "])" +|v_aB| Select "a block" from "[{" to "]}", including brackets +|v_iB| Select "inner block" from "[{" to "]}" + +============================================================================== +Finding where identifiers are used *ident-search* + +You probably already know that |tags| can be used to jump to the place where a +function or variable is defined. But sometimes you wish you could jump to all +the places where a function or variable is being used. This is possible in +two ways: +1. Using the |:grep| command. This should work on most Unix systems, + but can be slow (it reads all files) and only searches in one directory. +2. Using ID utils. This is fast and works in multiple directories. It uses a + database to store locations. You will need some additional programs for + this to work. And you need to keep the database up to date. + +Using the GNU id-tools: + +What you need: +- The GNU id-tools installed (mkid is needed to create ID and lid is needed to + use the macros). +- An identifier database file called "ID" in the current directory. You can + create it with the shell command "mkid file1 file2 ..". + +Put this in your .vimrc: > + map _u :call ID_search()<Bar>execute "/\\<" . g:word . "\\>"<CR> + map _n :n<Bar>execute "/\\<" . g:word . "\\>"<CR> + + function! ID_search() + let g:word = expand("<cword>") + let x = system("lid --key=none ". g:word) + let x = substitute(x, "\n", " ", "g") + execute "next " . x + endfun + +To use it, place the cursor on a word, type "_u" and vim will load the file +that contains the word. Search for the next occurrence of the word in the +same file with "n". Go to the next file with "_n". + +This has been tested with id-utils-3.2 (which is the name of the id-tools +archive file on your closest gnu-ftp-mirror). + +[the idea for this comes from Andreas Kutschera] + +============================================================================== +Switching screens in an xterm *xterm-screens* *xterm-save-screen* + +(From comp.editors, by Juergen Weigert, in reply to a question) + +:> Another question is that after exiting vim, the screen is left as it +:> was, i.e. the contents of the file I was viewing (editing) was left on +:> the screen. The output from my previous like "ls" were lost, +:> ie. no longer in the scrolling buffer. I know that there is a way to +:> restore the screen after exiting vim or other vi like editors, +:> I just don't know how. Helps are appreciated. Thanks. +: +:I imagine someone else can answer this. I assume though that vim and vi do +:the same thing as each other for a given xterm setup. + +They not necessarily do the same thing, as this may be a termcap vs. +terminfo problem. You should be aware that there are two databases for +describing attributes of a particular type of terminal: termcap and +terminfo. This can cause differences when the entries differ AND when of +the programs in question one uses terminfo and the other uses termcap +(also see |+terminfo|). + +In your particular problem, you are looking for the control sequences +^[[?47h and ^[[?47l. These switch between xterms alternate and main screen +buffer. As a quick workaround a command sequence like > + echo -n "^[[?47h"; vim ... ; echo -n "^[[?47l" +may do what you want. (My notation ^[ means the ESC character, further down +you'll see that the databases use \E instead). + +On startup, vim echoes the value of the termcap variable ti (terminfo: +smcup) to the terminal. When exiting, it echoes te (terminfo: rmcup). Thus +these two variables are the correct place where the above mentioned control +sequences should go. + +Compare your xterm termcap entry (found in /etc/termcap) with your xterm +terminfo entry (retrieved with "infocmp -C xterm"). Both should contain +entries similar to: > + :te=\E[2J\E[?47l\E8:ti=\E7\E[?47h: + +PS: If you find any difference, someone (your sysadmin?) should better check + the complete termcap and terminfo database for consistency. + +NOTE 1: If you recompile Vim with FEAT_XTERM_SAVE defined in feature.h, the +builtin xterm will include the mentioned "te" and "ti" entries. + +NOTE 2: If you want to disable the screen switching, and you don't want to +change your termcap, you can add these lines to your .vimrc: > + :set t_ti= t_te= + +============================================================================== +Scrolling in Insert mode *scroll-insert* + +If you are in insert mode and you want to see something that is just off the +screen, you can use CTRL-X CTRL-E and CTRL-X CTRL-Y to scroll the screen. + |i_CTRL-X_CTRL-E| + +To make this easier, you could use these mappings: > + :inoremap <C-E> <C-X><C-E> + :inoremap <C-Y> <C-X><C-Y> +(Type this literally, make sure the '<' flag is not in 'cpoptions'). +You then lose the ability to copy text from the line above/below the cursor +|i_CTRL-E|. + +Also consider setting 'scrolloff' to a larger value, so that you can always see +some context around the cursor. If 'scrolloff' is bigger than half the window +height, the cursor will always be in the middle and the text is scrolled when +the cursor is moved up/down. + +============================================================================== +Smooth scrolling *scroll-smooth* + +If you like the scrolling to go a bit smoother, you can use these mappings: > + :map <C-U> <C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y> + :map <C-D> <C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E> + +(Type this literally, make sure the '<' flag is not in 'cpoptions'). + +============================================================================== +Correcting common typing mistakes *type-mistakes* + +When there are a few words that you keep on typing in the wrong way, make +abbreviations that correct them. For example: > + :ab teh the + :ab fro for + +============================================================================== +Counting words, lines, etc. *count-items* + +To count how often any pattern occurs in the current buffer use the substitute +command and add the 'n' flag to avoid the substitution. The reported number +of substitutions is the number of items. Examples: > + + :%s/./&/gn characters + :%s/\i\+/&/gn words + :%s/^//n lines + :%s/the/&/gn "the" anywhere + :%s/\<the\>/&/gn "the" as a word + +You might want to reset 'hlsearch' or do ":nohlsearch". +Add the 'e' flag if you don't want an error when there are no matches. + +An alternative is using |v_g_CTRL-G| in Visual mode. + +If you want to find matches in multiple files use |:vimgrep|. + + *count-bytes* +If you want to count bytes, you can use this: + + Visually select the characters (block is also possible) + Use "y" to yank the characters + Use the strlen() function: > + :echo strlen(@") +A line break is counted for one byte. + +============================================================================== +Restoring the cursor position *restore-position* + +Sometimes you want to write a mapping that makes a change somewhere in the +file and restores the cursor position, without scrolling the text. For +example, to change the date mark in a file: > + :map <F2> msHmtgg/Last [cC]hange:\s*/e+1<CR>"_D"=strftime("%Y %b %d")<CR>p'tzt`s + +Breaking up saving the position: + ms store cursor position in the 's' mark + H go to the first line in the window + mt store this position in the 't' mark + +Breaking up restoring the position: + 't go to the line previously at the top of the window + zt scroll to move this line to the top of the window + `s jump to the original position of the cursor + +For something more advanced see |winsaveview()| and |winrestview()|. + +============================================================================== +Renaming files *rename-files* + +Say I have a directory with the following files in them (directory picked at +random :-): + +buffer.c +charset.c +digraph.c +... + +and I want to rename *.c *.bla. I'd do it like this: > + + $ vim + :r !ls *.c + :%s/\(.*\).c/mv & \1.bla + :w !sh + :q! + +============================================================================== +Change a name in multiple files *change-name* + +Example for using a script file to change a name in several files: + + Create a file "subs.vim" containing substitute commands and a :update + command: > + :%s/Jones/Smith/g + :%s/Allen/Peter/g + :update +< + Execute Vim on all files you want to change, and source the script for + each argument: > + + vim *.let + argdo source subs.vim + +See |:argdo|. + +============================================================================== +Speeding up external commands *speed-up* + +In some situations, execution of an external command can be very slow. This +can also slow down wildcard expansion on Unix. Here are a few suggestions to +increase the speed. + +If your .cshrc (or other file, depending on the shell used) is very long, you +should separate it into a section for interactive use and a section for +non-interactive use (often called secondary shells). When you execute a +command from Vim like ":!ls", you do not need the interactive things (for +example, setting the prompt). Put the stuff that is not needed after these +lines: > + + if ($?prompt == 0) then + exit 0 + endif + +Another way is to include the "-f" flag in the 'shell' option, e.g.: > + + :set shell=csh\ -f + +(the backslash is needed to include the space in the option). +This will make csh completely skip the use of the .cshrc file. This may cause +some things to stop working though. + +============================================================================== +Useful mappings *useful-mappings* + +Here are a few mappings that some people like to use. + + *map-backtick* > + :map ' ` +Make the single quote work like a backtick. Puts the cursor on the column of +a mark, instead of going to the first non-blank character in the line. + + *emacs-keys* +For Emacs-style editing on the command-line: > + " start of line + :cnoremap <C-A> <Home> + " back one character + :cnoremap <C-B> <Left> + " delete character under cursor + :cnoremap <C-D> <Del> + " end of line + :cnoremap <C-E> <End> + " forward one character + :cnoremap <C-F> <Right> + " recall newer command-line + :cnoremap <C-N> <Down> + " recall previous (older) command-line + :cnoremap <C-P> <Up> + " back one word + :cnoremap <Esc><C-B> <S-Left> + " forward one word + :cnoremap <Esc><C-F> <S-Right> + +NOTE: This requires that the '<' flag is excluded from 'cpoptions'. |<>| + + *format-bullet-list* +This mapping will format any bullet list. It requires that there is an empty +line above and below each list entry. The expression commands are used to +be able to give comments to the parts of the mapping. > + + :let m = ":map _f :set ai<CR>" " need 'autoindent' set + :let m = m . "{O<Esc>" " add empty line above item + :let m = m . "}{)^W" " move to text after bullet + :let m = m . "i <CR> <Esc>" " add space for indent + :let m = m . "gq}" " format text after the bullet + :let m = m . "{dd" " remove the empty line + :let m = m . "5lDJ" " put text after bullet + :execute m |" define the mapping + +(<> notation |<>|. Note that this is all typed literally. ^W is "^" "W", not +CTRL-W. You can copy/paste this into Vim if '<' is not included in +'cpoptions'.) + +Note that the last comment starts with |", because the ":execute" command +doesn't accept a comment directly. + +You also need to set 'textwidth' to a non-zero value, e.g., > + :set tw=70 + +A mapping that does about the same, but takes the indent for the list from the +first line (Note: this mapping is a single long line with a lot of spaces): > + :map _f :set ai<CR>}{a <Esc>WWmmkD`mi<CR><Esc>kkddpJgq}'mJO<Esc>j +< + *collapse* +These two mappings reduce a sequence of empty (;b) or blank (;n) lines into a +single line > + :map ;b GoZ<Esc>:g/^$/.,/./-j<CR>Gdd + :map ;n GoZ<Esc>:g/^[ <Tab>]*$/.,/[^ <Tab>]/-j<CR>Gdd + +============================================================================== +Compressing the help files *gzip-helpfile* + +For those of you who are really short on disk space, you can compress the help +files and still be able to view them with Vim. This makes accessing the help +files a bit slower and requires the "gzip" program. + +(1) Compress all the help files: "gzip doc/*.txt". + +(2) Edit "doc/tags" and change the ".txt" to ".txt.gz": > + :%s=\(\t.*\.txt\)\t=\1.gz\t= + +(3) Add this line to your vimrc: > + set helpfile={dirname}/help.txt.gz + +Where {dirname} is the directory where the help files are. The |gzip| plugin +will take care of decompressing the files. +You must make sure that $VIMRUNTIME is set to where the other Vim files are, +when they are not in the same location as the compressed "doc" directory. See +|$VIMRUNTIME|. + +============================================================================== +Executing shell commands in a window *shell-window* + +There have been questions for the possibility to execute a shell in a window +inside Vim. The answer: you can't! Including this would add a lot of code to +Vim, which is a good reason not to do this. After all, Vim is an editor, it +is not supposed to do non-editing tasks. However, to get something like this, +you might try splitting your terminal screen or display window with the +"splitvt" program. You can probably find it on some ftp server. The person +that knows more about this is Sam Lantinga <slouken@cs.ucdavis.edu>. +An alternative is the "window" command, found on BSD Unix systems, which +supports multiple overlapped windows. Or the "screen" program, found at +www.uni-erlangen.de, which supports a stack of windows. + +============================================================================== +Hex editing *hex-editing* *using-xxd* + +See section |23.4| of the user manual. + +If one has a particular extension that one uses for binary files (such as exe, +bin, etc), you may find it helpful to automate the process with the following +bit of autocmds for your <.vimrc>. Change that "*.bin" to whatever +comma-separated list of extension(s) you find yourself wanting to edit: > + + " vim -b : edit binary using xxd-format! + augroup Binary + au! + au BufReadPre *.bin let &bin=1 + au BufReadPost *.bin if &bin | %!xxd + au BufReadPost *.bin set ft=xxd | endif + au BufWritePre *.bin if &bin | %!xxd -r + au BufWritePre *.bin endif + au BufWritePost *.bin if &bin | %!xxd + au BufWritePost *.bin set nomod | endif + augroup END + +============================================================================== +Using <> notation in autocommands *autocmd-<>* + +The <> notation is not recognized in the argument of an :autocmd. To avoid +having to use special characters, you could use a self-destroying mapping to +get the <> notation and then call the mapping from the autocmd. Example: + + *map-self-destroy* > + " This is for automatically adding the name of the file to the menu list. + " It uses a self-destroying mapping! + " 1. use a line in the buffer to convert the 'dots' in the file name to \. + " 2. store that in register '"' + " 3. add that name to the Buffers menu list + " WARNING: this does have some side effects, like overwriting the + " current register contents and removing any mapping for the "i" command. + " + autocmd BufNewFile,BufReadPre * nmap i :nunmap i<CR>O<C-R>%<Esc>:.g/\./s/\./\\./g<CR>0"9y$u:menu Buffers.<C-R>9 :buffer <C-R>%<C-V><CR><CR> + autocmd BufNewFile,BufReadPre * normal i + +Another method, perhaps better, is to use the ":execute" command. In the +string you can use the <> notation by preceding it with a backslash. Don't +forget to double the number of existing backslashes and put a backslash before +'"'. +> + autocmd BufNewFile,BufReadPre * exe "normal O\<C-R>%\<Esc>:.g/\\./s/\\./\\\\./g\<CR>0\"9y$u:menu Buffers.\<C-R>9 :buffer \<C-R>%\<C-V>\<CR>\<CR>" + +For a real buffer menu, user functions should be used (see |:function|), but +then the <> notation isn't used, which defeats using it as an example here. + +============================================================================== +Highlighting matching parens *match-parens* + +This example shows the use of a few advanced tricks: +- using the |CursorMoved| autocommand event +- using |searchpairpos()| to find a matching paren +- using |synID()| to detect whether the cursor is in a string or comment +- using |:match| to highlight something +- using a |pattern| to match a specific position in the file. + +This should be put in a Vim script file, since it uses script-local variables. +It skips matches in strings or comments, unless the cursor started in string +or comment. This requires syntax highlighting. + +A slightly more advanced version is used in the |matchparen| plugin. +> + let s:paren_hl_on = 0 + function s:Highlight_Matching_Paren() + if s:paren_hl_on + match none + let s:paren_hl_on = 0 + endif + + let c_lnum = line('.') + let c_col = col('.') + + let c = getline(c_lnum)[c_col - 1] + let plist = split(&matchpairs, ':\|,') + let i = index(plist, c) + if i < 0 + return + endif + if i % 2 == 0 + let s_flags = 'nW' + let c2 = plist[i + 1] + else + let s_flags = 'nbW' + let c2 = c + let c = plist[i - 1] + endif + if c == '[' + let c = '\[' + let c2 = '\]' + endif + let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' . + \ '=~? "string\\|comment"' + execute 'if' s_skip '| let s_skip = 0 | endif' + + let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip) + + if m_lnum > 0 && m_lnum >= line('w0') && m_lnum <= line('w$') + exe 'match Search /\(\%' . c_lnum . 'l\%' . c_col . + \ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' + let s:paren_hl_on = 1 + endif + endfunction + + autocmd CursorMoved,CursorMovedI * call s:Highlight_Matching_Paren() + autocmd InsertEnter * match none +< + + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt new file mode 100644 index 0000000000..21f24a7d33 --- /dev/null +++ b/runtime/doc/todo.txt @@ -0,0 +1,5436 @@ +*todo.txt* For Vim version 7.4. Last change: 2014 Jul 26 + + + VIM REFERENCE MANUAL by Bram Moolenaar + + + TODO list for Vim *todo* + +This is a veeeery long list of known bugs, current work and desired +improvements. To make it a little bit accessible, the items are grouped by +subject. In the first column of the line a classification is used to be able +to look for "the next thing to do": + +Priority classification: +9 next point release +8 next release +7 as soon as possible +6 soon +5 should be included +4 nice to have +3 consider including +2 maybe not +1 probably not +- unclassified + + *votes-for-changes* +See |develop.txt| for development plans. You can vote for which items should +be worked on, but only if you sponsor Vim development. See |sponsor|. + +Issues can also be entered online: http://code.google.com/p/vim/issues/list +Updates will be forwarded to the vim_dev maillist. Issues entered there will +not be repeated below, unless there is extra information. + + *known-bugs* +-------------------- Known bugs and current work ----------------------- + +Regexp problems: +- Bug with pattern: '\vblock (\d+)\.\n.*\d+%(\1)@<!\.$' + (Lech Lorens, 2014 Feb 3) +- Issue 164: freeze on regexp search. +- Ignorecase not handled properly for multi-byte characters. (Axel Bender, + 2013 Dec 11) +- Using \@> and \?. (Brett Stahlman, 2013 Dec 21) Remark from Marcin Szamotulski + Remark from Brett 2014 Jan 6 and 7. +- Bug when using \>. (Ramel, 2014 Feb 2) (Aaron Bohannon, 2014 Feb 13) +- NFA regexp doesn't handle \%<v correctly. (Ingo Karkat, 2014 May 12) +- Does not work with NFA regexp engine: + \%u, \%x, \%o, \%d followed by a composing character +- Bug relating to back references. (Ingo Karkat, 2014 Jul 24) + +Still using freed memory after using setloclist(). (lcd, 2014 Jul 23) + +Patch to make getregtype() return the right size for non-linux systems. +(Yasuhiro Matsumoto, 2014 Jul 8) +Breaks test_eval. Inefficient, can we only compute y_width when needed? + +Problem that a previous silent ":throw" causes a following try/catch not to +work. (ZyX, 2013 Sep 28) + +DiffChange highlighting doesn't combine with 'cursurline'. (Benjamin Fritz) +Patch by Christian (2014 Jul 12) + +BufWinLeave autocommand executed in the wrong buffer? (Davit Samvelyan, 2014 +Jul 14) + +When 'clipboard' is "unnamed", :g/pat/d is very slow. Only set the clipboard +after the last delete? (Praful, 2014 May 28) +Patch by Christian Brabandt, 2014 Jun 18. Update Jun 25. + +Completion for :buf does not use 'wildignorecase'. (Akshay H, 2014 May 31) + +":cd C:\Windows\System32\drivers\etc*" does not work, even though the +directory exists. (Sergio Gallelli, 2013 Dec 29) + +The entries added by matchaddpos() are returned by getmatches() but can't be +set with setmatches(). (lcd47, 2014 Jun 29) + +Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15) + +Python: ":py raw_input('prompt')" doesn't work. (Manu Hack) + +When using an undo file, also restore the changelist, so that "g;" works. + +Value returned by virtcol() changes depending on how lines wrap. This is +inconsistant with the documentation. + +MS-Windows: Crash opening very long file name starting with "\\". +(Christian Brock, 2012 Jun 29) + +Syntax highlighting slow (hangs) in SASS file. (Niek Bosch, 2013 Aug 21) + +Adding "~" to 'cdpath' doesn't work for completion? (Davido, 2013 Aug 19) + +"hi link" does not respect groups with GUI settings only. (Mark Lodato, 2014 +Jun 8) + +Syntax file for gnuplot. Existing one is very old. (Andrew Rasmussen, 2014 +Feb 24) + +Issue 174: Detect Mason files. + +No error for missing endwhile. (ZyX, 2014 Mar 20) + +Phpcomplete.vim update. (Complex, 2014 Jan 15) + +PHP syntax is extremely slow. (Anhad Jai Singh, 2014 Jan 19) + +Patch for matchparen. (James McCoy, 2014 Jul 11) + +Spell files use a latin single quote. Unicode also has another single quote: +0x2019. (Ron Aaron, 2014 Apr 4) +New OpenOffice spell files support this with ICONV. But they are not +compatible with Vim spell files. The old files can no longer be downloaded. + +Win32: use different args for SearchPath()? (Yasuhiro Matsumoto, 2009 Jan 30) +Also fixes wrong result from executable(). +Update from Ken Takata, 2014 Jan 10. Newer 2014 Apr 3. + +Win32: use 64 bit stat() if possible. (Ken Takata, 2014 May 12) +More tests May 14. Update May 29. + +The garbage collector may use too much stack. Make set_ref_in_item() +iterative instead of recursive. Test program by Marc Weber (2013 Dec 10) +Patch by Ben Fritz, 2014 Jun 22. + +Idea: For a window in the middle (has window above and below it), use +right-mouse-drag on the status line to move a window up/down without changing +it's height? It's like dragging the status bar above it at the same time. + +Can we make ":unlet $VAR" use unsetenv() to delete the env var? +What for systems that don't have unsetenv()? + +This does not give an error: (Andre Sihera, 2014 Mar 21) + vim -u NONE 1 2 3 -c 'bufdo if 1 | echo 1' +This neither: (ZyX) + vim -u NONE 1 2 3 -c 'bufdo while 1 | echo 1' + +'viewdir' default on MS-Windows is not a good choice, it's a system directory. +Change 'viewdir' to "$HOME/vimfiles/view" and use 'viewdiralt' to also read +from? + +Problem with upwards search on Windows (works OK on Linux). (Brett Stahlman, +2014 Jun 8) + +Include a plugin manager with Vim? Neobundle seems to be the best currently. +Long message about this from ZyX, 2014 Mar 23. And following replies. +Also see http://vim-wiki.mawercer.de/wiki/topic/vim%20plugin%20managment.html +User view: +- Support multiple sources, basically any http:// URL. Be able to look into + the files before deciding to install. +- Be able to try out a plugin and remove it again with (almost) no traces. +- Each plugin needs a "manifest" file that has the version, dependencies + (including Vim version and features), conflicts, list of files, etc. + Updater uses that to decide what/how to update. + Dependencies can use a URL for specific versions, or short name for scripts + on vim.org. +- Once a plugin is installed it remembers where it came from, updater checks + there. Can manually update when really needed. +- Must be possible to install for one user. Also system wide? +- Can edit plugin config with Vim. Can temporarily disable a plugin. +- Run the update manually, find latest version and install. +- Be able to download without special tools, must work for 95% of users. +Implementation: +- Avoid the 'runtimepath' getting long. Need some other way to keep each + plugin separate. +- When installing or updating, first figure out what needs to be done. This + may involve recursively fetching manifest files for dependencies. Then show + the user what's going to change and ask for OK. +- Scripts on Vim.org must be able to consist of several files. Is zip format + sufficient? Upload the manifest? Or refer to a site that has the manifest? +- Best is to fetch individual files or use a Vimball. Reduces dependency on + tools that might be missing and allows inspection of the files before + installing. +Out of scope: +- Overview of plugins, ratings, comments, etc. That's another world. +- Development work on plugins (although diff with distributed version would be + useful). + +Setting the spell file in a session only reads the local additions, not the +normal spell file. (Enno Nagel, 2014 Mar 29) + +CTRL-] in Visual mode uses the selected text as a tag. This does not work +when preceded with CTRL-W. (Patrick Hemmer, 2014 Jun 28) + +When typing the first character of a command, e.g. "f", then using a menu, the +menu item doesn't work. Clear typeahead when using a menu? + +Editing an ascii file as ucs-2 or ucs-4 causes display errors. +(ZyX, 2014 Mar 30) + +":Next 1 some-arg" does not complain about trailing argument. Also for +various other commands. (ZyX, 2014 Mar 30) + +patch to skip sort if no line matches the expression. +(Christian Brabandt, 2014 Jun 25) + +Patch to add sortuniq(). (Cade Forester, 2014 Mar 19) +Or add uniq() instead? Patch by lcd47, but it has problems. + +Patch to support sorting on floating point number. (Alex Jakushev, 2010 Oct +30) + +Patch to support expression argument to sort() instead of a function name. +Yasuhiro Matsumoto, 2013 May 31. +Or should we add a more general mechanism, like lambda functions? + +VMS: Select() doesn't work properly, typing ESC may hang Vim. Use sys$qiow +instead. (Samuel Ferencik, 2013 Sep 28) + +Patch for XDG base directory support. (Jean François Bignolles, 2014 Mar 4) +Remark on the docs. Should not be a compile time feature. But then what? + +Completion of ":e" is ":earlier", whould be ":edit". Complete to the matching +command instead of doing this alphabetically. (Mikel Jorgensen) + +Patch to add v:completed_item. (Shougo Matsu, 2013 Nov 29). + +Patch to make test 100 work on MS-Windows. (Taro Muraoka, 2013 Dec 12) + +Patch to define macros for hardcoded values. (Elias Diem, 2013 Dec 14) + +Perl: support for Activestate perl 5.18: Issue 170. + +Several syntax file match "^\s*" which may get underlined if that's in the +highlight group. Add a "\zs" after it? + +Patch to fix temp directories for Windows, so that it works without tweaking. +Issue 28. + +Go through more coverity reports. + +Patch to add ":undorecover", get as much text out of the undo file as +possible. (Christian Brabandt, 2014 Mar 12) + +Include Haiku port? (Adrien Destugues, Siarzhuk Zharski, 2013 Oct 24) + +Updated spec ftplugin. (MatÄ›j Cepl, 2013 Oct 16) + +Some quickfix messages appear twice. (Gary Johnson, 2014 Feb 16) +Patch by Christian Brabandt, 2014 Feb 17. + +Patch to right-align signs. (James Kolb (email james), 2013 Sep 23) + +Patch to handle integer overflow. (Aaron Burrow, 2013 Dec 12) + +With "$" in 'cpoptions' the popup menu isn't fully drawn. (Matti Niemenmaa, +2013 Sep 5) + +Patch to add "ntab" item in 'listchars' to repeat first character. (Nathaniel +Braun, pragm, 2013 Oct 13) A better solution 2014 Mar 5. + +Undo message is not always properly displayed. Patch by Ken Takata, 2013 oct +3. Doesn't work properly according to Yukihiro Nakadaira. + +/[b-a] gives error E16, should probably be E769. + +7 Windows XP: When using "ClearType" for text smoothing, a column of yellow + pixels remains when typing spaces in front of a "D" ('guifont' set to + "lucida_console:h8"). +Patch by Thomas Tuegel, also for GTK, 2013 Nov 24 + +:help gives example for z?, but it does not work. m? and t? do work. + +Python: Extended funcrefs: use func_T* structure in place of char_u* function +names. +(ZyX, 2013 Jul 15, update Sep 22, 24, 28; Update 2013 Dec 15, 2014 Jan 6) +Also fixes Bug: E685 error for func_unref(). (ZyX, 2010 Aug 5) + +Patch to add funcref to Lua. (Luis Carvalho, 2013 Sep 4) +With tests: Sep 5. + +Patch to fix that on suckless Terminal mousewheel up does not work. +(Ralph Eastwood, 2013 Nov 25) + +Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10) + +Checking runtime scripts: Thilo Six, 2012 Jun 6. + +When evaluating expression in backticks, autoload doesn't work. +(Andy Wokula, 2013 Dec 14) + +Using <nr>ifoobar<esc> can slow down Vim. Patch by Christian Brabandt, 2013 +Dec 13. + +Fold can't be opened after ":move". (Ein Brown) +Patch from Christian Brabandt doesn't fix it completely. + +Patch from Christian Brabandt to preserve upper case marks when wiping out a +buffer. (2013 Dec 9) + +Patch for drag&drop reordering of GUI tab pages reordering. +(Ken Takata, 2013 Nov 22, second one, also by Masamichi Abe) + +":sign-jump" uses first window in buffer instead of current window. +Patch by James McCoy, 2013 Nov 22. + +GTK: problem with 'L' in 'guioptions' changing the window width. +(Aaron Cornelius, 2012 Feb 6) + +Patch to add option that tells whether small deletes go into the numbered +registers. (Aryeh Leib Taurog, 2013 Nov 18) + +Javascript file where indent gets stuck on: GalaxyMaster, 2012 May 3. + +The BufUnload event is triggered when re-using the empty buffer. +(Pokey Rule, 2013 Jul 22) +Patch by Marcin Szamotulski, 2013 Jul 22. + +The CompleteDone autocommand needs some info passed to it: +- The word that was selected (empty if abandoned complete) +- Type of completion: tag, omnifunc, user func. + +Patch to allow more types in remote_expr(). (Lech Lorens, 2014 Jan 5) +Doesn't work for string in list. Other way to pass all types of variables +reliably? + +Using ":call foo#d.f()" doesn't autoload the "foo.vim" file. +That is, calling a dictionary function on an autoloaded dict. +Works OK for echo, just not for ":call" and ":call call()". (Ted, 2011 Mar +17) +Patch by Christian Brabandt, 2013 Mar 23. +Not 100% sure this is the right solution. + +Problem caused by patch 7.3.638: window->open does not update window +correctly. Issue 91. + +Patch to add {lhs} to :mapclear: clear all maps starting with {lhs}. +(Christian Brabandt, 2013 Dec 9) + +Exception caused by argument of return is not caught by try/catch. +(David Barnett, 2013 Nov 19) + +8 'backupdir' and 'directory' should use $TMPDIR, $TMP and/or $TEMP when + defined. +Issue 28. + +Patch to fix that 'cedit' is recognized after :normal. (Christian Brabandt, +2013 Mar 19, later message) + +Patch to view coverage of the tests. (Nazri Ramliy, 2013 Feb 15) + +Patch to invert characters differently in GTK. (Yukihiro Nakadaira, 2013 May +5) + +Patch to add "Q" and "A" responses to interactive :substitute. They are +carried over when using :global. (Christian Brabandt, 2013 Jun 19) + +Bug with 'cursorline' in diff mode. Line being scrolled into view gets +highlighted as the cursor line. (Alessandro Ivaldi, 2013 Jun 4) + +Two highlighting bugs. (ZyX, 2013 Aug 18) + +Patch to add the bufferlist() function. (Yegappan Lakshmanan, 2013 May 5) +May 17: with winlist() and tabpagelist(). +May 19: with local variables. +May 28: with options + +Patch to support 'u' in interactive substitute. (Christian Brabandt, 2012 Sep +28) With tests: Oct 9. + +Patch from Christian Brabandt to make the "buffer" argument for ":sign place" +optional. (2013 Jul 12) + +Dialog is too big on Linux too. (David Fishburn, 2013 Sep 2) + +Patch to allow setting w:quickfix_title via setqflist() and setloclist() +functions. (Christian Brabandt, 2013 May 8, update May 21) +Patch to add getlocstack() / setlocstack(). (Christian Brabandt, 2013 May 14) +Second one. Update May 22. +Update by Daniel Hahler, 2014 Jul 4. + +Patch to make fold updates much faster. (Christian Brabandt, 2012 Dec) + +MS-Windows: Patch to make tests copy files to avoid changing the fileformat of +the files under version control. (Taro Muraoka, 2013 Jul 5) + +Issue 54: document behavior of -complete, also expands arg. + +- Add regex for 'paragraphs' and 'sections': 'parare' and 'sectre'. Combine + the two into a regex for searching. (Ned Konz) +Patch by Christian Brabandt, 2013 Apr 20, unfinished. + +Bug: findfile("any", "file:///tmp;") does not work. + +'ff' is wrong for one-line file without EOL. (Issue 77) + +Patch to set antialiasing style on Windows. (Ondrej Balaz, 2013 Mar 14) +Needs a different check for CLEARTYPE_QUALITY. + +In the ATTENTION message about an existing swap file, mention the name of the +process that is running. It might actually be some other program, e.g. after +a reboot. + +Patch to have text objects defined by arbitrary single characters. (Daniel +Thau, 2013 Nov 20, 2014 Jan 29, 2014 Jan 31) +Ben Fritz: problem with 'selection' set to "exclusive". +Updated to current Vim, not quite right yet. (Ben Fritz, 2014 Mar 27) + +Patch to select the next or previous text object if there isn't one under the +cursor. (Daniel Thau, 2013 Nov 20) + +patch to add "combine" flag to syntax commands. (so8res, 2012 Dec 6) + +Bug caused by patch 7.3.1288? Issue 183. +I can't reproduce it. + +Syntax update problem in one buffer opened in two windows, bottom window is +not correctly updated. (Paul Harris, 2012 Feb 27) + +Patch to add assignments in cscope. (Uli Meis, Estabrooks, 2012 Sep 1) +Alternate patch by Gary Johnson, Sep 4. + +Patch to add getsid(). (Tyru, 2011 Oct 2) Do we want this? Update Oct 4. +Or use expand('<sid>')? + +Patch to make confirm() display colors. (Christian Brabandt, 2012 Nov 9) + +Patch to add functions for signs. (Christian Brabandt, 2013 Jan 27) + +Do we need some way (option) to show the sign column even when there are no +signs? Patch by Christian Brabandt, 2013 Aug 22. + +Patch to remove flicker from popup menu. (Yasuhiro Matsumoto, 2013 Aug 15) + +Patch to use directX to draw text on Windows. Adds the 'renderoptions' +option. (Taro Muraoka, 2013 Jan 25, update 2013 Apr 3, May 14) +Fixes this problem: +8 Win32: Multi-byte characters are not displayed, even though the same font + in Notepad can display them. (Srinath Avadhanula) Try with the + UTF-8-demo.txt page with Andale Mono. + +Patch to add 'completeselect' option. Specifies how to select a candidate in +insert completion. (Shougo, 2013 May 29) +Update to add to existing 'completeopt'. 2013 May 30 + +Problem with refresh:always in completion. (Tyler Wade, 2013 Mar 17) + +b:undo_ftplugin cannot call a script-local function. (Boris Danilov, 2013 Jan +7) + +Win32: The Python interface only works with one version of Python, selected at +compile time. Can this be made to work with version 2.1 and 2.2 dynamically? + +Python: Be able to define a Python function that can be called directly from +Vim script. Requires converting the arguments and return value, like with +vim.bindeval(). + +Patch for :tabcloseleft, after closing a tab go to left tab. (William Bowers, +2012 Aug 4) + +Patch to improve equivalence classes in regexp patterns. +(Christian Brabandt, 2013 Jan 16, update Jan 17) + +Patch with suggestions for starting.txt. (Tony Mechelynck, 2012 Oct 24) +But use Gnome instead of GTK? + +Patch to make FocusGained and FocusLost work in modern terminals. (Hayaki +Saito, 2013 Apr 24) + +Should be possible to enable/disable matchparen per window or buffer. +Add a check for b:no_match_paren in Highlight_matching_Pair() (Marcin +Szamotulski, 2012 Nov 8) + +Issue 72: 'autochdir' causes problems for :vimgrep. + +Session file creation: 'autochdir' causes trouble. Keep it off until after +loading all files. + +Win32: When 'autochdir' is on and 'encoding' is changed, files on the command +line are opened again, but from the wrong directory. Apply 'autochdir' only +after starting up? + +Patch to add ":ldo" and ":cdo", execute commands over quickfix list and +location list. (Yegappan Lakshmanan, 2013 Jun 2) + +8 "stl" and "stlnc" in 'fillchars' don't work for multi-byte characters. + Patch by Christian Wellenbrock, 2013 Jul 5. + +MS-Windows resizing problems: +- Windows window on screen positioning: Patch by Yukihiro Nakadaira, 2012 Jun + 20. Uses getWindowRect() instead of GetWindowPlacement() +- Win32: When the taskbar is at the top of the screen creating the tabbar + causes the window to move unnecessarily. (William E. Skeith III, 2012 Jan + 12) Patch: 2012 Jan 13 Needs more work (2012 Feb 2) + +'iminsert' global value set when using ":setlocal iminsert"? (Wu, 2012 Jun 23) + +Patch to append regexp to tag commands to make it possible to select one out +of many matches. (Cody Cutler, 2013 Mar 28) + +Patch to add tagfunc(). Cleaned up by Christian Brabandt, 2013 Jun 22. + +Help for 'b:undo_indent'. (Thilo Six, 2012 May 28) +Also question if examples are correct. + +The input map for CTRL-O in mswin.vim causes problems after CTRL-X CTRL-O. +Suggestion for another map. (Philip Mat, 2012 Jun 18) +But use "gi" instead of "a". Or use CTRL-\ CTRL-O. + +Patch to support user name completion on MS-Windows. (Yasuhiro Matsumoto, 2012 +Aug 16) + +When there are no command line arguments ":next" and ":argu" give E163, which +is confusing. Should say "the argument list is empty". + +xterm supports escape sequences to mark a paste operation. Need to be +enabled. (Bruno Sutic, 2014 Jul 11) How to know the terminal supports this? + +URXVT: +- will get stuck if byte sequence does not contain the expected semicolon. +- Use urxvt mouse support also in xterm. Explanations: + http://www.midnight-commander.org/ticket/2662 + +Patch to add tests for if_xcmdsrv.c., Jul 8, need some more work. (Brian Burns) +New tests Jul 13. Update Jul 17. Discussion Jul 18. + +When running Vim in silent ex mode, an existing swapfile causes Vim to wait +for a user action without a prompt. (Maarten Billemont, 2012 Feb 3) +Do give the prompt? Quit with an error? + +Patch to list user digraphs. (Christian Brabandt, 2012 Apr 14) + +Patch to add digraph() function. (Christian Brabandt, 2013 Aug 22, update Aug +24) + +Patch for input method status. (Hirohito Higashi, 2012 Apr 18) + +Update Vim app icon (for Gnome). (Jakub Steiner, 2013 Dec 6) + +Patch to use .png icons for the toolbar on MS-Windows. (Martin Gieseking, 2013 +Apr 18) + +Patch for has('unnamedplus') docs. (Tony Mechelynck, 2011 Sep 27) +And one for gui_x11.txt. + +":cd" doesn't work when current directory path contains "**". +finddir() has the same problem. (Yukihiro Nakadaira, 2012 Jan 10) +Requires a rewrite of the file_file_in_path code. + +Should use has("browsefilter") in ftplugins. Requires patch 7.3.593. + +Update for vim2html.pl. (Tyru, 2013 Feb 22) + +Patch to sort functions starting with '<' after others. Omit dict functions, +they can't be called. (Yasuhiro Matsumoto, 2011 Oct 11) + +Patch to pass list to or(), and() and xor(). (Yasuhiro Matsumoto, 2012 Feb 8) + +Patch to improve "it" and "at" text object matching. (Christian Brabandt, 2011 +Nov 20) + +Patch to improve GUI find/replace dialog. (Christian Brabandt, 2012 May 26) +Update Jun 2. + +`] moves to character after insert, instead of the last inserted character. +(Yukihiro Nakadaira, 2011 Dec 9) + +Plugin for Modeleasy. (Massimiliano Tripoli, 2011 Nov 29) + +BufWinLeave triggers too late when quitting last window in a tab page. (Lech +Lorens, 2012 Feb 21) + +Patch for 'transparency' option. (Sergiu Dotenco, 2011 Sep 17) +Only for MS-Windows. No documentation. Do we want this? + +Patch to support cursor shape in Cygwin console. (Ben bgold, 2011 Dec 27) + +Patch to support UTF-8 for Hangul. (Shawn Y.H. Kim, 2011 May 1) +Needs more work. Pinged 2012 Jan 4. + +Issue 64: when 'incsearch' is on can't paste LF on command line. + +On MS-Windows a temp dir with a & init causes system() to fail. (Ben Fritz, +2012 Jun 19) + +'cursorline' is displayed too short when there are concealed characters and +'list' is set. (Dennis Preiser) +Patch 7.3.116 was the wrong solution. +Christian Brabandt has another incomplete patch. (2011 Jul 13) + +With concealed text mouse click doesn't put the cursor in the right position. +(Herb Sitz) Fix by Christian Brabandt, 2011 Jun 16. Doesn't work properly, +need to make the change in where RET_WIN_BUF_CHARTABSIZE() is called. + +Syntax region with 'concealends' and a 'cchar' value, 'conceallevel' set to 2, +only one of the two ends gets the cchar displayed. (Brett Stahlman, 2010 Aug +21, Ben Fritz, 2010 Sep 14) + +'cursorline' works on a text line only. Add 'cursorscreenline' for +highlighting the screen line. (Christian Brabandt, 2012 Mar 31) + +Win32: Patch to use task dialogs when available. (Sergiu Dotenco, 2011 Sep 17) +New feature, requires testing. Made some remarks. + +Win32: Patch for alpha-blended icons and toolbar height. (Sergiu Dotenco, 2011 +Sep 17) Asked for feedback from others. + +Win32: Cannot cd into a directory that starts with a space. (Andy Wokula, 2012 +Jan 19) + +Need to escape $HOME on Windows? (ZyX, 2011 Jul 21, discussion 2013 Jul 4) +Can't simply use a backslash, \$HOME has a different meaning already. +Would be possible to use $$HOME where $HOME is to be used. + +"2" in 'formatoptions' not working in comments. (Christian Corneliussen, 2011 +Oct 26) + +Bug in repeating Visual "u". (Lawrence Kesteloot, 2010 Dec 20) + +With "unamedplus" in 'clipboard' pasting in Visual mode causes error for empty +register. (Michael Seiwald, 2011 Jun 28) I can't reproduce it. + +Windows keys not set properly on Windows 7? (cncyber, 2010 Aug 26) + +When using a Vim server, a # in the path causes an error message. +(Jeff Lanzarotta, 2011 Feb 17) + +Setting $HOME on MS-Windows is not very well documented. Suggestion by Ben +Fritz (2011 Oct 27). + +Bug: Windows 7 64 bit system freezes when 'clipboard' set to "unnamed" and +doing ":g/test/d". Putting every delete on the clipboard? (Robert Chan, 2011 +Jun 17) + +When there is a ">" in a line that "gq" wraps to the start of the next line, +then the following line will pick it up as a leader. Should get the leader +from the first line, not a wrapped line. (Matt Ackeret, 2012 Feb 27) + +Using ":break" or something else that stops executing commands inside a +":finally" does not rethrow a previously uncaught exception. (ZyX, 2010 Oct +15) + +Vim using lots of memory when joining lines. (John Little, 2010 Dec 3) + +BT regexp engine: After trying a \@> match and failing, submatches are not +cleared. See test64. + +Changes to manpage plugin. (Elias Toivanen, 2011 Jul 25) + +Patch to make "z=" work when 'spell' is off. Does this have nasty side +effects? (Christian Brabandt, 2012 Aug 5, Update 2013 Aug 12) +Would also need to do this for spellbadword() and spellsuggest(). + +Patch for variable tabstops. On github (Christian Brabandt, 2014 May 15) + +On 64 bit MS-Windows "long" is only 32 bits, but we sometimes need to store a +64 bits value. Change all number options to use nropt_T and define it to the +right type. + +string() can't parse back "inf" and "nan". Fix documentation or fix code? +(ZyX, 2010 Aug 23) + +Make 'formatprg' global-local. (Sung Pae) + +When doing "redir => s:foo" in a script and then "redir END" somewhere else +(e.g. in a function) it can't find s:foo. +When a script contains "redir => s:foo" but doesn't end redirection, a +following "redir" command gives an error for not being able to access s:foo. +(ZyX, 2011 Mar 27) + +When setqflist() uses a filename that triggers a BufReadCmd autocommand Vim +doesn't jump to the correct line with :cfirst. (ZyX, 2011 Sep 18) + +Behavior of i" and a" text objects isn't logical. (Ben Fritz, 2013 Nov 19) + +7 Make "ga" show the digraph for a character, if it exists. +Patch from Christian Brabandt, 2011 Aug 19. + +maparg() does not show the <script> flag. When temporarily changing a +mapping, how to restore the script ID? + +Bug in try/catch: return with invalid compare throws error that isn't caught. +(ZyX, 2011 Jan 26) + +When setting a local option value from the global value, add a script ID that +indicates this, so that ":verbose set" can give a hint. Check with options in +the help file. + +After patch 7.3.097 still get E15. (Yukihiro Nakadaira, 2011 Jan 18) +Also for another example (ZyX, 2011 Jan 24) + +Build problem with small features on Mac OS X 10.6. (Rainer, 2011 Jan 24) + +"0g@$" puts '] on last byte of multi-byte. (ZyX, 2011 Jan 22) + +Patch to addd TextDeletePost and TextYankPost events. (Philippe Vaucher, 2011 +May 24) Update May 26. + +Patch for :tabrecently. (Hirokazu Yoshida, 2012 Jan 30) + +Problem with "syn sync grouphere". (Gustavo Niemeyer, 2011 Jan 27) + +Loading autoload script even when usage is inside "if 0". (Christian Brabandt, +2010 Dec 18) + +With a filler line in diff mode, it isn't displayed in the column with line +number, but it is in the sign column. Doesn't look right. (ZyX 2011 Jun 5) +Patch by Christian Brabandt, 2011 Jun 5. Introduces new problems. + +Add jump() function. (Marcin Szamotulski, 2013 Aug 29) +Is this needed? CTRL-O and CTRL-I do the same, just more difficult to use. + +8 Add a command to jump to the next character highlighted with "Error". +Patch by Christian Brabandt, uses ]e [e ]t and [t. 2011 Aug 9. + +8 Add an event like CursorHold that is triggered repeatedly, not just once + after typing something. +Need for CursorHold that retriggers. Use a key that doesn't do anything, or a +function that resets did_cursorhold. +Patch by Christian Brabandt, 2011 May 6. + +7 Use "++--", "+++--" for different levels instead of "+---" "+----". +Patch by Christian Brabandt, 2011 Jul 27. +Update by Ben Fritz, with fix for TOhtml. (2011 Jul 30) + +9 Add %F to 'errorformat': file name without spaces. Useful on Unix to + avoid matching something up to a time 11:22:33. +Patch by Christian Brabandt, 2011 Jul 27. + +Patch to add up to 99 match groups. (Christian Brabandt, 2010 Dec 22) +Also add named groups: \%{name}(re) and \%{name}g + +In the sandbox it's not allowed to do many things, but it's possible to change +or set variables. Add a way to prevent variables from being changed in the +sandbox? E.g.: ":protect g:restore_settings". + +GTK: drawing a double-width combining character over single-width characters +doesn't look right. (Dominique Pelle, 2010 Aug 8) + +GTK: tear-off menu does not work. (Kurt Sonnenmoser, 2010 Oct 25) + +Win32: tear-off menu does not work when menu language is German. (Markus +Bossler, 2011 Mar 2) Fixed by 7.3.095? + +Version of netbeans.c for use with MacVim. (Kazuki Sakamoto, 2010 Nov 18) + +7.3.014 changed how backslash at end of line works, but still get a NUL when +there is one backslash. (Ray Frush, 2010 Nov 18) What does the original ex +do? + +Searching mixed with Visual mode doesn't redraw properly. (James Vega, 2010 Nov +22) + +New esperanto spell file can't be processed. (Dominique Pelle, 2011 Jan 30) +- move compflags to separate growarray? +- instead of a regexp use a hashtable. Expand '?', '*', '+'. What would be + the maximum repeat for * and +? + +"L'Italie" noted as a spell error at start of the sentence. (Dominique Pelle, +2011 Feb 27) + +Editing a file with a ^M with 'ff' set to "mac", opening a help file, then the +^M is displayed as ^J sometimes. Getting 'ff' value from wrong window/buffer? + +'colorcolumn' has higher priority than hlsearch. Should probably be the other +way around. (Nazri Ramliy, 2013 Feb 19) + +When Vim is put in the background (SIGTSTP) and then gets a SIGHUP it doesn't +exit. It exists as soon as back in the foreground. (Stephen Liang, 2011 Jan +9) Caused by vim_handle_signal(SIGNAL_BLOCK); in ui.c. + +g` not working correctly when using :edit. It works OK when editing a file on +the command line. (Ingo Karkat, 2011 Jan 25) + +Since patch 7.2.46 Yankring plugin has become very slow, eventually make Vim +crash? (Raiwil, 2010 Nov 17) + +Patch to add FoldedLineNr highlighting: different highlighting for the line +number of a closed fold. (eXerigumo Clanjor, 2013 Jul 15) + +Regexp engine performance: +- Profiling: + ./vim -u NONE -s ~/vim/test/ruby.vim + ./vim -u NONE -s ~/vim/test/loop.vim + ./vim -u NONE -s ~/vim/test/alsa.vim + ./vim -s ~/vim/test/todo.vim + ./vim -s ~/vim/test/xml.vim + Dominique Pelle: xmlSyncDT is particularly slow (Jun 7) +- More test files from the src/pkg/regexp/testdata directory in the Go repo. +- Performance tests: + - Using asciidoc syntax. (Marek Schimara, 2013 Jun 6) + - ~/vim/text/FeiqCfg.xml (file from Netjune) + - ~/vim/text/edl.svg (also XML) + - glts has five tests. (May 25) + - ~/vim/test/slowsearch + - ~/vim/test/rgb.vim + - search for a.*e*exn in the vim executable. Go to last line to use + 'hlsearch'. + - Slow combination of folding and PHP syntax highlighting. Script to + reproduce it. Caused by "syntax sync fromstart" in combination with patch + 7.2.274. (Christian Brabandt, 2010 May 27) Generally, folding with + 'foldmethod' set to "syntax" is slow. Do profiling to find out why. + +Patch to add 'systemencoding', convert between 'encoding' and this for file +names, shell commands and the like. (Kikuchan, 2010 Oct 14) +Assume the system converts between the actual encoding of the filesystem to +the system encoding (usually utf-8). + +Patch to add GUI colors to the terminal, when it supports it. (ZyX, 2013 Jan +26, update 2013 Dec 14) + +Problem producing tags file when hebrew.frx is present. It has a BOM. +Results in E670. (Tony Mechelynck, 2010 May 2) + +'beval' option should be global-local. + +Ruby: ":ruby print $buffer.number" returns zero. + +setpos() does not restore cursor position after :normal. (Tyru, 2010 Aug 11) + +7 The 'directory' option supports changing path separators to "%" to make + file names unique, also support this for 'backupdir'. (Mikolaj Machowski) + Patch by Christian Brabandt, 2010 Oct 21. + +With "tw=55 fo+=a" typing space before ) doesn't work well. (Scott Mcdermott, +2010 Oct 24) + +Patch to add random number generator. (Hong Xu, 2010 Nov 8, update Nov 10) +Alternative from Christian Brabandt. (2010 Sep 19) + +Messages in message.txt are highlighted as examples. + +When using cp850 the NBSP (0xff) is not drawn correctly. (Brett Stahlman, 2010 +Oct 22) 'isprint' is set to "@,161-255". + +":echo "\x85" =~# '[\u0085]'" returns 1 instead of 0. (ZyX, 2010 Oct 3) + +'cindent' not correct when 'list' is set. (Zdravi Korusef, 2010 Apr 15) + +C-indenting: A matching { in a comment is ignored, but intermediate { are not +checked to be in a comment. Implement FM_SKIPCOMM flag of findmatchlimit(). +Issue 46. + +Mac with X11: clipboard doesn't work properly. (Raf, 2010 Aug 16) + +Using CompilerSet doesn't record where an option was set from. E.g., in the +gcc compiler plugin. (Gary Johnson, 2010 Dec 13) + +":helpgrep" does not put the cursor in the correct column when preceded by +accented character. (Tony Mechelynck, 2010 Apr 15) + +Don't call check_restricted() for histadd(), setbufvar(), settabvar(), +setwinvar(). + +Patch for GVimExt to show an icon. (Dominik Riebeling, 2010 Nov 7) + +When writing a file > 2Gbyte, the reported number of bytes is negative. +(Antonio Colombo, 2010 Dec 18) + +Patch: Let rare word highlighting overrule good word highlighting. +(Jakson A. Aquino, 2010 Jul 30, again 2011 Jul 2) + +When 'lines' is 25 and 'scrolloff' is 12, "j" scrolls zero or two lines +instead of one. (Constantin Pan, 2010 Sep 10) + +Gui menu edit/paste in block mode insert only inserts in one line (Bjorn +Winckler, 2011 May 11) +Requires a map mode for Insert mode started from blockwise Visual mode. + +Writing nested List and Dict in viminfo gives error message and can't be read +back. (Yukihiro Nakadaira, 2010 Nov 13) + +Problem with cursor in the wrong column. (SungHyun Nam, 2010 Mar 11) +Additional info by Dominique Pelle. (also on 2010 Apr 10) + +CreateFile and CreateFileW are used without sharing, filewritable() fails when +the file was already open (e.g. script is being sourced). Add FILE_SHARE_READ| +FILE_SHARE_WRITE in mch_access()? (Phillippe Vaucher, 2010 Nov 2) + +Is ~/bin (literally) in $PATH supposed to work? (Paul, 2010 March 29) +Looks like only bash can do it. (Yakov Lerner) + +Cscope "cs add" stopped working somewhat before 7.2.438. (Gary Johnson, 2010 +Jun 29) Caused by 7.2.433? + +I often see pasted text (from Firefox, to Vim in xterm) appear twice. +Also, Vim in xterm sometimes loses copy/paste ability (probably after running +an external command). + +Jumplist doesn't work properly in Insert mode? (Jean Johner, 2010 Mar 20) + +Problem with transparent cmdline. Also: Terminal title is wrong with +non-ASCII character. (Lily White, 2010 Mar 7) + +iconv() doesn't fail on an illegal character, as documented. (Yongwei Wu, 2009 +Nov 15, example Nov 26) Add argument to specify whether iconv() should fail +or replace with a character and continue? + +Add local time at start of --startuptime output. +Requires configure check for localtime(). +Use format year-month-day hr:min:sec. + +Patch to add "combine" to :syntax, combines highlight attributes. (Nate +Soares, 2012 Dec 3) + +Patch to make ":hi link" also take arguments. (Nate Soares, 2012 Dec 4) + +Shell not recognized properly if it ends in "csh -f". (James Vega, 2009 Nov 3) +Find tail? Might have a / in argument. Find space? Might have space in +path. + +Test 51 fails when language set to German. (Marco, 2011 Jan 9) +Dominique can't reproduce it. + +'ambiwidth' should be global-local. + +":function f(x) keepjumps" creates a function where every command is executed +like it has ":keepjumps" before it. + +Coverity: ask someone to create new user: Dominique. +Check if there are new reported defects: http://scan.coverity.com/rung2.html + +Patch to support :undo absolute jump to file save number. (Christian Brabandt, +2010 Nov 5) + +Patch to use 'foldnextmax' also for "marker" foldmethod. (Arnaud Lacombe, 2011 +Jan 7) + +Bug with 'incsearch' going to wrong line. (Wolfram Kresse, 2009 Aug 17) +Only with "vim -u NONE". + +Problem with editing file in binary mode. (Ingo Krabbe, 2009 Oct 8) + +With 'wildmode' set to "longest:full,full" and pressing Tab once the first +entry in wildmenu is highlighted, that shouldn't happen. (Yuki Watanabe, 2011 +Feb 12) + +Display error when 'tabline' that includes a file name with double-width +characters. (2010 Aug 14, bootleq) + +Problem with stop directory in findfile(). (Adam Simpkins, 2009 Aug 26) + +Using ']' as the end of a range in a pattern requires double escaping: + /[@-\\]] (Andy Wokula, 2011 Jun 28) + +Syntax priority problem. (Charles Campbell, 2011 Sep 15) + +When completion inserts the first match, it may trigger the line to be folded. +Disable updating folds while completion is active? (Peter Odding, 2010 Jun 9) + +When a:base in 'completefunc' starts with a number it's passed as a number, +not a string. (Sean Ma) Need to add flag to call_func_retlist() to force a +string value. + +Invalid read error in Farsi mode. (Dominique Pelle, 2009 Aug 2) + +For running gvim on an USB stick: avoid the OLE registration. Use a command +line argument -noregister. + +When using an expression in 'statusline' leading white space sometimes goes +missing (but not always). (ZyX, 2010 Nov 1) + +When a mapping exists both for insert mode and lang-insert mode, the last one +doesn't work. (Tyru, 2010 May 6) Or is this intended? + +Still a problem with ":make" in the wrong directory. Caused by ":bufdo". +(Ajit Thakkar, 2009 Jul 1) More information Jul 9, Jul 15. +Caused by "doautoall syntaxset BufEnter *" in syntax/nosyntax.vim ? +There also is a BufLeave/BufEnter aucmd to save/restore view. +Does the patch to save/restore globaldir work? + +":bufdo normal gg" while 'hidden' is set leaves buffers without syntax +highlighting. Don't disable Syntax autocommands then? Or add a flag/modifier +to avoid changing 'eventignore'? + +Patch for displaying 0x200c and 0x200d. (Ali Gholami Rudi, 2009 May 6) +Probably needs a bit of work. + +List of encoding aliases. (Takao Fujiwara, 2009 Jul 18) +Are they all OK? Update Jul 22. + +Win32: Improved Makefile for MSVC. (Leonardo Valeri Manera, 2010 Aug 18) + +Win32: Expanding 'path' runs into a maximum size limit. (bgold12, 2009 Nov 15) + +Win32: Patch for enabling quick edit mode in console. (Craig Barkhouse, 2010 +Sep 1) + +Win32: Patch for using .png files for icons. (Charles Peacech, 2012 Feb 5) + +Putting a Visual block while 'visualedit' is "all" does not leave the cursor +on the first character. (John Beckett, 2010 Aug 7) + +Setting 'tags' to "tagsdir/*" does not find "tagsdir/tags". (Steven K. Wong, +2009 Jul 18) + +Patch to add farsi handling to arabic.c (Ali Gholami Rudi, 2009 May 2) +Added test, updates, June 23. +Updated for 7.4: http://litcave.rudi.ir/farsi_vim.diff + +Patch to add "focusonly" to 'scrollopt', so that scrollbind also applies in +window that doesn't have focus. (Jonathon Mah, 2009 Jan 12) +Needs more work. + +Problem with <script> mappings (Andy Wokula, 2009 Mar 8) + +When starting Vim with "gvim -f -u non_existent_file > foo.txt" there are a +few control characters in the output. (Dale Wiles, 2009 May 28) + +'cmdwinheight' is only used in last window when 'winheight' is a large value. +(Tony Mechelynck, 2009 Apr 15) + +Status line containing winnr() isn't updated when splitting the window (Clark +J. Wang, 2009 Mar 31) + +When $VIMRUNTIME is set in .vimrc, need to reload lang files. Already done +for GTK, how about others? (Ron Aaron, 2010 Apr 10) + +Patch for GTK buttons X1Mouse and X2Mouse. (Christian J. Robinson, 2010 Aug 9) + +Motif: Build on Ubuntu can't enter any text in dialog text fields. + +When 'ft' changes redraw custom status line. + +":tab split fname" doesn't set the alternate file in the original window, +because win_valid() always returns FALSE. Below win_new_tabpage() in +ex_docmd.c. + +Space before comma in function definition not allowed: "function x(a , b)" +Give a more appropriate error message. Add a remark to the docs. + +string_convert() should be able to convert between utf-8 and utf-16le. Used +for GTK clipboard. Avoid requirement for iconv. + +Now that colnr_T is int instead of unsigned, more type casts can be removed. + +'delcombine' does not work for the command line. (Tony Mechelynck, 2009 Jul +20) + +Don't load macmap.vim on startup, turn it into a plugin. (Ron Aaron, +2009 Apr 7) Reminder Apr 14. + +Add "no_hlsearch" to winsaveview(). + +Cursorline highlighting combines with Search ('hlsearch') but not with +SpellBad. (Jim Karsten, 2009 Mar 18) + +When 'foldmethod' is "indent", adding an empty line below a fold and then +indented text, creates a new fold instead of joining it with the previous one. +(Evan Laforge, 2009 Oct 17) + +Bug: When reloading a buffer changed outside of Vim, BufRead autocommands +are applied to the wrong buffer/window. (Ben Fritz, 2009 Apr 2, May 11) +Ignore window options when not in the right window? +Perhaps we need to use a hidden window for applying autocommands to a buffer +that doesn't have a window. + +When using "ab foo bar" and mapping <Tab> to <Esc>, pressing <Tab> after foo +doesn't trigger the abbreviation like <Esc> would. (Ramana Kumar, 2009 Sep 6) + +getbufvar() to get a window-local option value for a buffer that's not +displayed in a window should return the value that's stored for that buffer. + +":he ctrl_u" can be auto-corrected to ":he ctrl-u". + +There should be a way after an abbreviation has expanded to go back to what +was typed. CTRL-G h ? Would also undo last word or line break inserted +perhaps. And undo CTRL-W. CTRL-G l would redo. + +Diff mode out of sync. (Gary Johnson, 2010 Aug 4) + +Support a 'systemencoding' option (for Unix). It specifies the encoding of +file names. (Kikuchan, 2010 Oct 5). Useful on a latin1 or double-byte Asian +system when 'encoding' is "utf-8". + +Win32 GUI: last message from startup doesn't show up when there is an echoerr +command. (Cyril Slobin, 2009 Mar 13) + +Win32: completion of file name ":e c:\!test" results in ":e c:\\!test", which +does not work. (Nieko Maatjes, 2009 Jan 8, Ingo Karkat, 2009 Jan 22) + +opening/closing window causes other window with 'winfixheight' to change +height. Also happens when there is another window in the frame, if it's not +very high. (Yegappan Lakshmanan, 2010 Jul 22, Michael Peeters, 2010 Jul 22) + +Directory wrong in session file, caused by ":lcd" in BufEnter autocommand. +(Felix Kater, 2009 Mar 3) + +Session file generates error upon loading, cause by --remote-silent-tab. +(7tommm (ytommm) 2010 Nov 24) + +Using ~ works OK on 'a' with composing char, but not on 0x0418 with composing +char 0x0301. (Tony Mechelynck, 2009 Mar 4) + +Searching for composing char works, but not when inside []. (ZyX, Benjamin R. +Haskell, 2010 Aug 24) + +This does not work yet: "a\(%C\)" (get composing characters into a submatch). + +A function on a dictionary is not profiled. (ZyX, 2010 Dec 25) + +Inconsistent: starting with $LANG set to es_ES.utf-8 gives Spanish +messages, even though locale is not supported. But ":lang messages +es_ES.utf-8" gives an error and doesn't switch messages. (Dominique Pelle, +2009 Jan 26) + +When $HOME contains special characters, such as a comma, escape them when used +in an option. (Michael Hordijk, 2009 May 5) +Turn "esc" argument of expand_env_esc() into string of chars to be escaped. + +Should make 'ignorecase' global-local, so that it makes sense setting it from +a modeline. + +Add cscope target to Makefile. (Tony Mechelynck, 2009 Jun 18, replies by +Sergey Khorev) + +Consider making YankRing or something else that keeps a list of yanked text +part of standard Vim. The "1 to "9 registers are not sufficient. + +netrw: dragging status line causes selection of entry. Should check row +number to be below last visible line. + +After doing "su" $HOME can be the old user's home, thus ~root/file is not +correct. Don't use it in the swap file. + +Completion for ":buf" doesn't work properly on Win32 when 'shellslash' is off. +(Henrik Ohman, 2009, Jan 29) + +shellescape() depends on 'shellslash' for quoting. That doesn't work when +'shellslash' is set but using cmd.exe. (Ben Fritz) +Use a different option or let it depend on whether 'shell' looks like a +unix-like shell? + +Bug: in Ex mode (after "Q") backslash before line break, when yanked into a +register and executed, results in <Nul>: instead of line break. +(Konrad Schwarz, 2010 Apr 16) + +Have a look at patch for utf-8 line breaking. (Yongwei Wu, 2008 Mar 1, Mar 23) +Now at: http://vimgadgets.sourceforge.net/liblinebreak/ + +Greek sigma character should be lower cased depending on the context. Can we +make this work? (Dominique Pelle, 2009 Sep 24) + +When changing 'encoding' convert all the swap file names, so that we can +still delete them. Also convert all buffer file names? + +"gqip" in Insert mode has an off-by-one error, causing it to reflow text. +(Raul Coronado, 2009 Nov 2) + +Update src/testdir/main.aap. + +"vim -c 'sniff connect'" hangs Vim. (Dominique Pelle, 2008 Dec 7) + +Something wrong with session that has "cd" commands and "badd", in such a way +that Vim doesn't find the edited file in the buffer list, causing the +ATTENTION message? (Tony Mechelynck, 2008 Dec 1) +Also: swap files are in ~/tmp/ One has relative file name ".mozilla/...". + +Add v:motion_force. (Kana Natsuno, 2008 Dec 6) +Maybe call it v:motiontype. + +MS-Windows: editing the first, empty buffer, 'ffs' set to "unix,dos", ":enew" +doesn't set 'ff' to "unix". (Ben Fritz, 2008 Dec 5) Reusing the old buffer +probably causes this. + +'scrollbind' is not respected when deleting lines or undo. (Milan Vancura, +2009 Jan 16) + +Patch to support strikethrough next to bold and italic. (Christian Brabandt, +2013 Jul 30) Update from Ken Takata, 2013 Oct 12. + +Document that default font in Athena can be set with resources: + XtDefaultFont: "9x15" + XtDefaultFontSet: "9x15" +(Richard Sherman, 2009 Apr 12) + +Having "Syntax" in 'eventignore' for :bufdo may cause problems, e.g. for +":bufdo e" when buffers are open in windows. ex_listdo(eap) could set the +option only for when jumping to another buffer, not when the command argument +is executed. + +":pedit %" with a BufReadPre autocommand causes the cursor to move to the +first line. (Ingo Karkat, 2008 Jul 1) Ian Kelling is working on this. +Similar problem with ":e". (Marc Montu, 2014 Apr 22) + +Wildmenu not deleted: "gvim -u NONE", ":set nocp wildmenu cmdheight=3 +laststatus=2", CTRL-D CTRL-H CTRL-H CTRL-H. (A.Politz, 2008 April 1) +Works OK with Vim in an xterm. + +Cursor line moves in other window when using CTRL-W J that doesn't change +anything. (Dasn, 2009 Apr 7) + +On Unix "glob('does not exist~')" returns the string. Without the "~" it +doesn't. (John Little, 2008 Nov 9) +Shell expansion returns unexpanded string? +Don't use shell when "~" is not at the start? + +":unlet $VAR" doesn't work. + +When using ":e ++enc=foo file" and the file is already loaded with +'fileencoding' set to "bar", then do_ecmd() uses that buffer, even though the +fileencoding differs. Reload the buffer in this situation? Need to check for +the buffer to be unmodified. +Unfinished patch by Ian Kelling, 2008 Jul 11. Followup Jul 14, need to have +another look at it. + +c.vim: XXX in a comment is colored yellow, but not when it's after "#if 0". +(Ilya Dogolazky, 2009 Aug 7) + +You can type ":w ++bad=x fname", but the ++bad argument is ignored. Give an +error message? Or is this easy to implement? (Nathan Stratton Treadway, 2008 +Aug 20) This is in ucs2bytes(), search for 0xBF. Using the ++bad argument is +at the other match for 0xBF. + +When adding "-complete=file" to a user command this also changes how the +argument is processed for <f-args>. (Ivan Tishchenko, 2008 Aug 19) + +Win32: associating a type with Vim doesn't take care of space after a +backslash? (Robert Vibrant, 2008 Jun 5) + +When 'rightleft' is set, cursorcolumn isn't highlighted after the end of a +line. It's also wrong in folds. (Dominique Pelle, 2010 Aug 21) + +Using an insert mode expression mapping, cursor is not in the expected +position. (ZyX, 2010 Aug 29) + +After using <Tab> for command line completion after ":ta blah" and getting E33 +(no tags file), further editing the command to e.g., ":echo 'blah'", the +command is not executed. Fix by Ian Kelling? + +":help s/~" jumps to *s/\~*, while ":help s/\~" doesn't find anything. (Tim +Chase) Fix by Ian Kelling, 2008 Jul 14. + +Use "\U12345678" for 32 bit Unicode characters? (Tony Mechelynck, 2009 +Apr 6) Or use "\u(123456)", similar to Perl. + +When mapping : to ; and ; to :, @; doesn't work like @: and @: doesn't work +either. Matt Wozniski: nv_at() calls do_execreg() which uses +put_in_typebuf(). Char mapped twice? + +Despite adding save_subexpr() this still doesn't work properly: +Regexp: matchlist('12a4aaa', '^\(.\{-}\)\(\%5c\@<=a\+\)\(.\+\)\?') +Returns ['12a4', 'aaa', '4aaa'], should be ['12a4', 'aaa', ''] +Backreference not cleared when retrying after \@<= fails? +(Brett Stahlman, 2008 March 8) + +Problem with remote_send(). (Charles Campbell, 2008 Aug 12) + +ftplugin for help file should set 'isk' to help file value. + +Win32: remote editing fails when the current directory name contains "[". +(Ivan Tishchenko, Liu Yubao) Suggested patch by Chris Lubinski: Avoid +escaping characters where the backslash is not removed later. Asked Chris for +an alternate solution, also for src/ex_getln.c. +This also fails when the file or directory name contains "%". (Thoml, 2008 +July 7) +Using --remote-silent while the current directory has a # in the name does not +work, the # needs to be escaped. (Tramblay Bruno, 2012 Sep 15) + +When using remote-silent the -R flag is not passed on. (Axel Bender, 2012 May +31) + +Win32: A --remote command that has a directory name starting with a ( doesn't +work, the backslash is removed, assuming that it escapes the (. (Valery +Kondakoff, 2009 May 13) + +Problem with 'langmap' being used on the rhs of a mapping. (Nikolai Weibull, +2008 May 14) + +Problem with CTRL-F. (Charles Campbell, 2008 March 21) +Only happens with "gvim -geometry "160x26+4+27" -u NONE -U NONE prop.c". +'lines' is 54. (2008 March 27) + +Problem with pointer wrapping around in getvcol(). (Wolfgang Kroworsch, 2008 +Oct 19) Check for "col" being "MAXCOL" separately? + +Unexpectedly inserting a double quote. (Anton Woellert, 2008 Mar 23) +Works OK when 'cmdheight' is 2. + +8 Use a mechanism similar to omni completion to figure out the kind of tab + for CTRL-] and jump to the appropriate matching tag (if there are + several). + Alternative: be able to define a function that takes the tag name and uses + taglist() to find the right location. With indication of using CTRL-] so + that the context can be taken into account. (Robert Webb) +Patch by Christian Brabandt, 2013 May 31. + +Test54 should not use shell commands. Make it portable. + +The utf class table is missing some entries: + 0x2212, minus sign + 0x2217, star + 0x2500, bar + 0x26ab, circle + +Visual line mode doesn't highlight properly when 'showbreak' is used and the +line doesn't fit. (Dasn, 2008 May 1) + +GUI: In Normal mode can't yank the modeless selection. Make "gy" do this? +Works like CTRL-Y in Command line mode. + +Mac: Move Carbon todo items to os_mac.txt. Note that this version is frozen, +try the Cocoa version. + +Mac: After a ":vsplit" the left scrollbar doesn't appear until 'columns' is +changed or the window is resized. + +GTK: when setting 'columns' in a startup script and doing ":vertical diffsplit" +the window isn't redrawn properly, see two vertical bars. + +Mac: Patch for configure: remove arch from ruby link args. (Knezevic, 2008 +Mar 5) Alternative: Kazuki Sakamoto, Mar 7. + +Mac: trouble compiling with Motif, requires --disable-darwin. (Raf, 2008 Aug +1) Reply by Ben Schmidt. + +C't: On utf-8 system, editing file with umlaut through Gnome results in URL +with %nn%nn, which is taken as two characters instead of one. +Try to reproduce at work. + +Patch for default choice in file changed dialog. (Bjorn Winckler, 2008 Oct 19) +Is there a way to list all the files first? + +When 'smartcase' is set and using CTRL-L to add to the search pattern it may +result in no matches. Convert chars to lower case? (Erik Wognsen, 2009 Apr +16) + +Fail to edit file after failed register access. Error flag remains set? +(Lech Lorens, 2010 Aug 30) + +Patch for redo register. (Ben Schmidt, 2007 Oct 19) +Await response to question to make the register writable. + +src/testdir/Make_dos.mak: not all tests are included, e.g., test49, without a +remark why. + +Problem with 'ts' set to 9 and 'showbreak' to ">>>". (Matthew Winn, 2007 Oct +1) + +In the swapfile dialog, add a H(elp) option that gives more info about what +each choice does. Similar to ":help swap-exists-choices" + +try/catch not working for argument of return. (Matt Wozniski, 2008 Sep 15) + +try/catch not working when inside a for loop. (ZyX, 2011 Jan 25) + +":tab help" always opens a new tab, while ":help" re-uses an existing window. +Would be more consistent when an existing tab is re-used. (Tony Mechelynck) + +Add ":nofold". Range will apply without expanding to closed fold. + +Using Aap to build Vim: add remarks about how to set personal preferences. +Example on http://www.calmar.ws/tmp/aap.html + +Syntax highlighting wrong for transparent region. (Doug Kearns, 2007 Feb 26) +Bug in using a transparent syntax region. (Hanlen in vim-dev maillist, 2007 +Jul 31) + +C syntax: {} inside () causes following {} to be highlighted as error. +(Michalis Giannakidis, 2006 Jun 1) + +Can't easily close the help window, like ":pc" closes the preview window and +":ccl" closes the quickfix window. Add ":hclose". (Chris Gaal) +Patch for :helpclose, Christian Brabandt, 2010 Sep 6. + +When 'diffopt' has "context:0" a single deleted line causes two folds to merge +and mess up syncing. (Austin Jennings, 2008 Jan 31) + +Gnome improvements: Edward Catmur, 2007 Jan 7 + Also use Save/Discard for other GUIs + +New PHP syntax file, use it? (Peter Hodge) + +":echoe" in catch block stops processing, while this doesn't happen outside of +a catch block. (ZyX, 2011 Jun 2) + +'foldcolumn' in modeline applied to wrong window when using a session. (Teemu +Likonen, March 19) + +Test 54 uses shell commands, that doesn't work on non-Unix systems. Use some +other way to test buffer-local autocommands. + +The documentation mentions the priority for ":2match" and ":3match", but it +appears the last one wins. (John Beckett, 2008 Jul 22) Caused by adding +matchadd()? Suggested patch by John, 2008 Jul 24. + +When 'encoding' is utf-8 the command line is redrawn as a whole on every +character typed. (Tyler Spivey, 2008 Sep 3) Only redraw cmdline for +'arabicshape' when there is a character on the command line for which +(ARABIC_CHAR(u8c)) is TRUE. + +Cheng Fang made javacomplete. (2007 Aug 11) +Asked about latest version: 0.77.1 is on www.vim.org. + +More AmigaOS4 patches. (Peter Bengtsson, Nov 9) + +Amiga patches with vbcc. (Adrien Destugues, 2010 Aug 30) +http://pulkomandy.ath.cx/drop/vim73_vbcc_amiga.diff + +Insert mode completion: When editing the text and pressing CTRL-N again goes +back to originally completed text, edited text is gone. (Peng Yu, 2008 Jul 24) +Suggestion by Ben Schmidt, 2008 Aug 6. + +Problem with compound words? (Bert, 2008 May 6) +No warning for when flags are defined after they are used in an affix. + +Screen redrawing when continuously updating the buffer and resizing the +terminal. (Yakov Lerner, 2006 Sept 7) + +Add option settings to help ftplugin. (David Eggum, 2006 Dec 18) + +Autoconf problem: when checking for iconv library we may add -L/usr/local/lib, +but when compiling further tests -liconv is added without the -L argument, +that may fail (e.g., sizeof(int)). (Blaine, 2007 Aug 21) + +When opening quickfix window, disable spell checking? + +Problem with ".add" files when using two languages and restarting Vim. (Raul +Coronado, 2008 Oct 30) + +Popup menu redraw: Instead of first redrawing the text and then drawing the +popup menu over it, first draw the new popup menu, remember its position and +size and then redraw the text, skipping the characters under the popup menu. +This should avoid flicker. Other solution by A.Politz, 2007 Aug 22. + +Windows 98: pasting from the clipboard with text from another application has +a trailing NUL. (Joachim Hofmann) Perhaps the length specified for CF_TEXT +isn't right? + +When a register contains illegal bytes, writing viminfo in utf-8 and reading +it back doesn't result in utf-8. (Devin Bayer) + +Command line completion: Scanning for tags doesn't check for typed key now and +then? Hangs for about 5 seconds. Appears to be caused by finding include +files with "foo/**" in 'path'. (Kalisiak, 2006 July 15) +Additional info: When using the |wildcards| ** globing, vim hangs +indefinitely on lots of directories. The |file-searching| globing, like in +":set path=/**" does not hang as often as with globing with |wildcards|, like +in ":1find /**/file". This is for a files that unix "find" can find very +quick. Merging the 2 kinds of globing might make this an easier fix. (Ian +Kelling, 2008 July 4) + +When the file name has parenthesis, e.g., "foo (bar).txt", ":!ls '%'" has the +parenthesis escaped but not the space. That's inconsistent. Either escape +neither or both. No escaping might be best, because it doesn't depend on +particularities of the shell. (Zvi Har'El, 2007 Nov 10) (Teemu Likonen, 2008 +Jun 3) +However, for backwards compatibility escaping might be necessary. Check if +the user put quotes around the expanded item? + +A throw in a function causes missing an endif below the call. (Spiros +Bousbouras, 2011 May 16) + +Error E324 can be given when a cron script has wiped out our temp directory. +Give a clear error message about this (and tell them not to wipe out /tmp). + +Color for cUserLabel should differ from case label, so that a mistake in a +switch list is noticed: + switch (i) + { + case 1: + foobar: + } + +Look at http://www.gtk-server.org/ . It has a Vim script implementation. + +Netbeans problem. Use "nc -l 127.0.0.1 55555" for the server, then run gvim +with "gvim -nb:localhost:55555:foo". From nc do: '1:editFile!0 "foo"'. Then +go to Insert mode and add a few lines. Then backspacing every other time +moves the cursor instead of deleting. (Chris Kaiser, 2007 Sep 25) + +Patch to use Modern UI 2.0 for the Nsis installer. (Guopeng Wen, 2010 Jul 30) +Latest version: 2011 May 18 +8 Windows install with NSIS: make it possible to do a silent install, see + http://nsis.sourceforge.net/Docs/Chapter4.html#4.12 + Version from Guopeng Wen that does this (2010 Dec 27) +Alternative: MSI installer: https://github.com/petrkle/vim-msi/ + +Windows installer should install 32-bit version of right-click handler also on +64-bit systems. (Brian Cunningham, 2011 Dec 28) + +Windows installer could add a "open in new tab of existing Vim" menu entry. +Gvimext: patch to add "Edit with single Vim &tabbed" menu entry. +Just have two choices, always using one Vim and selecting between using an +argument list or opening each file in a separate tab. +(Erik Falor, 2008 May 21, 2008 Jun 26) + +Windows installer: licence text should not use indent, causes bad word wrap. +(Benjamin Fritz, 2010 Aug 16) + +Dos uninstal may delete vim.bat from the wrong directory (e.g., when someone +makes his own wrapper). Add a magic string with the version number to the +.bat file and check for it in the uninstaller. E.g. + # uninstall key: vim7.3* + +Changes for Win32 makefile. (Mike Williams, 2007 Jan 22, Alexei Alexandrov, +2007 Feb 8) + +Win32: Can't complete shell command names. Why is setting xp_context in +set_one_cmd_context() inside #ifndef BACKSLASH_IN_FILENAME? + +Win32: Patch for convert_filterW(). (Taro Muraoka, 2007 Mar 2) + +Win32: Patch for cscope external command. (Mike Williams, 2007 Aug 7) + +Win32: XPM support only works with path without spaces. Patch by Mathias +Michaelis, 2006 Jun 9. Another patch for more path names, 2006 May 31. +New version: http://members.tcnet.ch/michaelis/vim/patches.zip (also for other +patches by Mathias, see mail Feb 22) + +Win32: compiling with normal features and OLE fails. Patch by Mathias +Michaelis, 2006 Jun 4. + +Win16: include patches to make Win16 version work. (Vince Negri, 2006 May 22) + +Win32: after "[I" showing matches, scroll wheel messes up screen. (Tsakiridis, +2007 Feb 18) +Patch by Alex Dobrynin, 2007 Jun 3. Also fixes other scroll wheel problems. + +Win32: using CTRL-S in Insert mode doesn't remove the "+" from the tab pages +label. (Tsakiridis, 2007 Feb 18) Patch from Ian Kelling, 2008 Aug 6. + +Win32: using "gvim --remote-tab-silent fname" sometimes gives an empty screen +with the more prompt. Caused by setting the guitablabel? (Thomas Michael +Engelke, 2007 Dec 20 - 2008 Jan 17) + +Win64: Seek error in swap file for a very big file (3 Gbyte). Check storing +pointer in long and seek offset in 64 bit var. +Patches from Ken Takata might help (2014 Apr 17) + +Win32: patch for fullscreen mode. (Liushaolin, 2008 April 17) + +Win32: When 'shell' is bash shellescape() doesn't always do the right thing. +Depends on 'shellslash', 'shellquote' and 'shellxquote', but shellescape() +only takes 'shellslash' into account. + +Menu item that does "xxd -r" doesn't work when 'fileencoding' is utf-16. +Check for this and use iconv? (Edward L. Fox, 2007 Sep 12) +Does the conversion in the other direction work when 'fileencodings' is set +properly? + +Add a few features to xxd. (Vadim Vygonets, 2013 Nov 11) +Patches: 2013 Nov 19 +1: Add -e: little endian hexdump +2: Add -o: add offset to displayed position +3: Change displayed file position width to 8 chars + +Cursor displayed in the wrong position when using 'numberwidth'. (James Vega, +2007 Jun 21) + +When $VAR contains a backslash expand('$VAR') removes it. (Teemu Likonen, 2008 +Jun 18) + +If the variable "g:x#y#z" exists completion after ":echo g:x#" doesn't work. + +Feature request: Command to go to previous tab, like what CTRL-W p does for +windows. (Adam George) + +F1 - F4 in an xterm produce a different escape sequence when used with a +modifier key. Need to catch three different sequences. Use K_ZF1, like +K_ZHOME? (Dickey, 2007 Dec 2) + +UTF-8: mapping a multi-byte key where the second byte is 0x80 doesn't appear +to work. (Tony Mechelynck, 2007 March 2) + +In debug mode, using CTRL-R = to evaluate a function causes stepping through +the function. (Hari Krishna Dara, 2006 Jun 28) + +C++ indenting wrong with "=". (James Kanze, 2007 Jan 26) + +":lockvar" should use copyID to avoid endless loop. + +When using --remote-silent and the file name matches 'wildignore' get an E479 +error. without --remote-silent it works fine. (Ben Fritz, 2008 Jun 20) + +Gvim: dialog for closing Vim should check if Vim is busy writing a file. Then +use a different dialog: "busy saving, really quit? yes / no". + +Check other interfaces for changing curbuf in a wrong way. Patch like for +if_ruby.c. + +":helpgrep" should use the directory from 'helpfile'. + +The need_fileinfo flag is messy. Instead make the message right away and put +it in keep_msg? + +Editing a file remotely that matches 'wildignore' results in a "no match" +error. Should only happen when there are wildcards, not when giving the file +name literally, and esp. if there is only one name. + +Test 61 fails sometimes. This is a timing problem: "sleep 2" sometimes takes +longer than 2 seconds. + +Using ":au CursorMoved * cmd" invokes mch_FullName(), which can be slow. +Can this be avoided? (Thomas Waba, 2008 Aug 24) +Also for ":w" without a file name. +The buffer has the full path in ffname, should pass this to the autocommand. + +"vim -C" often has 'nocompatible', because it's set in some startup script. +Set 'compatible' after startup is done? Patch by James Vega, 2008 Feb 7. + +VMS: while editing a file found in complex, Vim will save file into the first +directory of the path and not to the original location of the file. +(Zoltan Arpadffy) + +VMS: VFC files are in some cases truncated during reading (Zoltan Arpadffy) + +input() completion should not insert a backslash to escape a space in a file +name? + +Ruby completion is insecure. Can this be fixed? + +When 'backupskip' is set from $TEMP special characters need to be escaped. +(patch by Grembowietz, 2007 Feb 26, not quite right) +Another problem is that file_pat_to_reg_pat() doesn't recognize "\\", so "\\(" +will be seen as a path separator plus "\(". + +gvim d:\path\path\(FILE).xml should not remove the \ before the (. +This also fails with --remote. + +When doing ":quit" the Netbeans "killed" event isn't sent. (Xavier de Gaye, +2008 Nov 10) call netbeans_file_closed() at the end of buf_freeall(), or in +all places where buf_freeall() is called? + +aucmd_prepbuf() should also use a window in another tab page. + +When unloading a buffer in a BufHidden autocommand the hidden flag is reset? +(Bob Hiestand, 2008 Aug 26, Aug 27) + +Substituting an area with a line break with almost the same area does change +the Visual area. Can this be fixed? (James Vega, 2006 Sept 15) + +GUI: When combining fg en bg make sure they are not equal. + +Spell checking: Add a way to specify punctuation characters. Add the +superscript numbers by default: 0x2070, 0xb9, 0xb2, 0xb3, 0x2074 - 0x2079. + +Spell checking in popup menu: If the only problem is the case of the first +character, don't offer "ignore" and "add to word list". + +Use different pt_br dictionary for spell checking. (Jackson A. Aquino, 2006 +Jun 5) + +Use different romanian dictionary for spell checking. (Andrei Popescu, Nov +2008) Use http://downloads.sourceforge.net/rospell/ro_RO.3.2.zip +Or the hunspell-ro.3.2.tar.gz file, it also has a iso-8859-2 list. + +In a C file with spell checking, in "% integer" "nteger" is seen as an error, +but "]s" doesn't find it. "nteger" by itself is found. (Ralf Wildenhues, 2008 +Jul 22) + +There should be something about spell checking in the user manual. + +Spell menu: When using the Popup menu to select a replacement word, +":spellrepeat" doesn't work. SpellReplace() uses setline(). Can it use "z=" +somehow? Or use a new function. + +Mac: Using gvim: netrw window disappears. (Nick Lo, 2006 Jun 21) + +Add an option to specify the character to use when a double-width character is +moved to the next line. Default '>', set to a space to blank it out. Check +that char is single width when it's set (compare with 'listchars'). + +The generated vim.bat can avoid the loop for NT. (Carl Zmola, 2006 Sep 3) + +When showing a diff between a non-existent file and an existing one, with the +cursor in the empty buffer, the other buffer only shows the last line. Change +the "insert" into a change from one line to many? (Yakov Lerner, 2008 May 27) + +Add autocommand for when a tabpage is being closed. Also for when a tab page +has been created. + +Using ":make" blocks Vim. Allow running one make in the background (if the +shell supports it), catch errors in a file and update the error list on the +fly. A bit like "!make > file&" and repeating ":cf file". ":bgmake", +background make. ":bgcancel" interrupts it. +A.Politz may work on this. + +These two abbreviations don't give the same result: + let asdfasdf = "xyz\<Left>" + cabbr XXX <C-R>=asdfasdf<CR> + cabbr YYY xyz<Left> + +Michael Dietrich: maximized gvim sometimes displays output of external command +partly. (2006 Dec 7) + +In FileChangedShell command it's no longer allowed to switch to another +buffer. But the changed buffer may differ from the current buffer, how to +reload it then? + +New syntax files for fstab and resolv from Radu Dineiu, David Necas did +previous version. + +For Aap: include a config.arg.example file with hints how to use config.arg. + +Command line completion when 'cmdheight' is maximum and 'wildmenu' is set, +only one buffer line displayed, causes display errors. + +Completing with 'wildmenu' and using <Up> and <Down> to move through directory +tree stops unexpectedly when using ":cd " and entering a directory that +doesn't contain other directories. + +Default for 'background' is wrong when using xterm with 256 colors. +Table with estimates from Matteo Cavalleri, 2014 Jan 10. + +Setting 'background' resets the Normal background color: + highlight Normal ctermbg=DarkGray + set background=dark +This is undesired, 'background' is supposed to tell Vim what the background +color is, not reset it. + +Linux distributions: +- Suggest compiling xterm with --enable-tcap-query, so that nr of colors is + known to Vim. 88 colors instead of 16 works better. See ":help + xfree-xterm". +- Suggest including bare "vi" and "vim" with X11, syntax, etc. + +Completion menu: For a wrapping line, completing a long file name, only the +start of the path is shown in the menu. Should move the menu to the right to +show more text of the completions. Shorten the items that don't fit in the +middle? + +When running inside screen it's possible to kill the X server and restart it +(using pty's the program can keep on running). Vim dies because it loses the +connection to the X server. Can Vim simply quit using the X server instead of +dying? Also relevant when running in a console. + +Accessing file#var in a function should not need the g: prepended. + +When exiting detects a modified buffer, instead of opening the buffer in the +current tab, use an existing tab, if possible. Like finding a window where +the buffer is displayed. (Antonios Tsakiridis) + +When ":cn" moves to an error in the same line the message isn't shortened. +Only skip shortening for ":cc"? + +Write "making vim work better" for the docs (mostly pointers): *nice* + - sourcing $VIMRUNTIME/vimrc_example.vim + - setting 'mouse' to "a" + - getting colors in xterm + - compiling Vim with X11, GUI, etc. + +Problem with ":call" and dictionary function. Hari Krishna Dara, Charles +Campbell 2006 Jul 06. + +Syntax HL error caused by "containedin". (Peter Hodge, 2006 Oct 6) + +A custom completion function in a ":command" cannot be a Funcref. (Andy +Wokula, 2007 Aug 25) + +Problem with using :redir in user command completion function? (Hari Krishna +Dara, 2006 June 21) + +Another resizing problem when setting 'columns' and 'lines' to a very large +number. (Tony Mechelynck, 2007 Feb 6) + +After starting Vim, using '0 to jump somewhere in a file, ":sp" doesn't center +the cursor line. It works OK after some other commands. + +Win32: Is it possible to have both postscript and Win32 printing? + +Check: Running Vim in a console and still having connect to the X server for +copy/paste: is stopping the X server handled gracefully? Should catch the X +error and stop using the connection to the server. + +Problem with 'cdpath' on MS-Windows when a directory is equal to $HOME. (2006 +Jul 26, Gary Johnson) + +Using UTF-8 character with ":command" does not work properly. (Matt Wozniski, +2008 Sep 29) + +In the Netbeans interface add a "vimeval" function, so that the other side can +check the result of has("patch13"). + +Cursor line at bottom of window instead of halfway after saving view and +restoring. Only with 'nowrap'. (Robert Webb, 2008 Aug 25) + +Netrw has trouble executing autocommands only for a directory. Add <isdir> +and <notisdir> to autocommand patterns? Also <isfile>? + +Add command modifier that skips wildcard expansion, so that you don't need to +put backslashes before special chars, only for white space. + +Syntax HL: open two windows on the same C code, delete a ")" in one window, +resulting in highlighted "{" in that window, not in the other. + +In mswin.vim: Instead of mapping <C-V> for Insert mode in a complicated way, +can it be done like ":imap <C-V> <MiddleMouse>" without negative side effects? + +GTK: when the Tab pages bar appears or disappears while the window is +maximized the window is no longer maximized. Patch that has some idea but +doesn't work from Geoffrey Antos, 2008 May 5. +Also: the window may no longer fit on the screen, thus the command line is not +visible. + +When right after "vim file", "M" then CTRL-W v the windows are scrolled +differently and unexpectedly. Caused by patch 7.2.398? + +The magic clipboard format "VimClipboard2" appears in several places. Should +be only one. + +"vim -C" often has 'nocompatible', because it's set somewhere in a startup +script. Do "set compatible" after startup? + +It's difficult to debug numbered functions (function in a Dictionary). Print +the function name before resolving it to a number? + let d = {} + fun! d.foo() + echo "here" + endfun + call d.foo(9) + +Add a mark for the other end of the Visual area (VIsual pos). '< and '> are +only set after Visual moded is ended. +Also add a variable for the Visual mode. So that this mode and '< '> can be +used to set what "gv" selects. (Ben Schmidt) + +Win32: When running ":make" and 'encoding' differs from the system locale, the +output should be converted. Esp. when 'encoding' is "utf-8". (Yongwei Wu) +Should we use 'termencoding' for this? + +Win32, NTFS: When editing a specific infostream directly and 'backupcopy' is +"auto" should detect this situation and work like 'backupcopy' is "yes". File +name is something like "c:\path\foo.txt:bar", includes a colon. (Alex +Jakushev, 2008 Feb 1) + +printf() uses the field width in bytes. Can it be made character width, +perhaps with a modifier? What does Posix say? + +Small problem displaying diff filler line when opening windows with a script. +(David Luyer, 2007 Mar 1 ~/Mail/oldmail/mool/in.15872 ) + +Is it allowed that 'backupext' is empty? Problems when backup is in same dir +as original file? If it's OK don't compare with 'patchmode'. (Thierry Closen) + +Patch for supporting count before CR in quickfix window. (AOYAMA Shotaro, 2007 +Jan 1) + +Patch for adding ":lscscope". (Navdeep Parhar, 2007 Apr 26; update 2008 Apr +23) + +":mkview" isn't called with the right buffer argument. Happens when using +tabs and the autocommand "autocmd BufWinLeave * mkview". (James Vega, 2007 +Jun 18) + +xterm should be able to pass focus changes to Vim, so that Vim can check for +buffers that changed. Perhaps in misc.c, function selectwindow(). +Xterm 224 supports it! + +When completing from another file that uses a different encoding completion +text has the wrong encoding. E.g., when 'encoding' is utf-8 and file is +latin1. Example from Gombault Damien, 2007 Mar 24. + +Is it possible to use "foo#var" instead of "g:foo#var" inside a function? + +Syntax HL: When using "nextgroup" and the group has an empty match, there is +no search at that position for another match. (Lukas Mai, 2008 April 11) + +In gvim the backspace key produces a backspace character, but on Linux the +VERASE key is Delete. Set VERASE to Backspace? (patch by Stephane Chazelas, +2007 Oct 16) + +TermResponse autocommand isn't always triggered when using vimdiff. (Aron +Griffis, 2007 Sep 19) + +Create a gvimtutor.1 file and change Makefiles to install it. + +When 'encoding' is utf-8 typing text at the end of the line causes previously +typed characters to be redrawn. Caused by patch 7.1.329. (Tyler Spivey, 2008 +Sep 3, 11) + +When Vim in an xterm owns the selection and the user does ":shell" Vim doesn't +respond to selection requests. Invoking XtDisownSelection() before executing +the shell doesn't help. Would require forking and doing a message loop, like +what happens for the GUI. + +X11: Putting more than about 262040 characters of text on the clipboard and +pasting it in another Vim doesn't work. (Dominique Pelle, 2008 Aug 21-23) +clip_x11_request_selection_cb() is called with zero value and length. +Also: Get an error message from free() in the process that owns the selection. +Seems to happen when the selection is requested the second time, but before +clip_x11_convert_selection_cb() is invoked, thus in X library code. + +":vimgrep" does not recognize a recursive symlink. Is it possible to detect +this, at least for Unix (using device/inode)? + +When switching between windows the cursor is often put in the middle. +Remember the relative position and restore that, just like lnum and col are +restored. (Luc St-Louis) + +Patch to support horizontal scroll wheel in GTK. Untested. (Bjorn Winckler, +2010 Jun 30) + + +At next release: +- Build a huge version by default. +- Improve plugin handling: Automatic updates, handle dependencies? + E.g. Vundle: https://github.com/gmarik/vundle + + +More patches: +- Another patch for Javascript indenting. (Hari Kumar, 2010 Jul 11) + Needs a few tests. +- Add 'cscopeignorecase' option. (Liang Wenzhi, 2006 Sept 3) +- Argument for feedkeys() to prepend to typeahead (Yakov Lerner, 2006 Oct + 21) +- Load intl.dll too, not only libintl.dll. (Mike Williams, 2006 May 9, docs + patch May 10) +- Extra argument to strtrans() to translate special keys to their name (Eric + Arnold, 2006 May 22) +- 'threglookexp' option: only match with first word in thesaurus file. + (Jakson A. Aquino, 2006 Jun 14) +- Mac: indicate whether a buffer was modified. (Nicolas Weber, 2006 Jun 30) +- Allow negative 'nrwidth' for left aligning. (Nathan Laredo, 2006 Aug 16) +- ml_append_string(): efficiently append to an existing line. (Brad + Beveridge, 2006 Aug 26) Use in some situations, e.g., when pasting a + character at a time? +- recognize hex numbers better. (Mark Manning, 2006 Sep 13) +- Add <AbbrExpand> key, to expand an abbreviation in a mapping. (Kana + Natsuno, 2008 Jul 17) +- Add 'wspara' option, also accept blank lines like empty lines for "{" and + "}". (Mark Lundquist, 2008 Jul 18) +- Patch to add CTRL-T to delete part of a path on cmdline. (Adek, 2008 Jul + 21) +- Instead of creating a copy of the tutor in all the shell scripts, do it in + vimtutor.vim. (Jan Minar, 2008 Jul 20) +- When fsync() fails there is no hint about what went wrong. Patch by Ben + Schmidt, 2008 Jul 22. +- testdir/Make_dos_sh.mak for running tests with MingW. (Bill Mccarthy, 2008 + Sep 13) +- Patch for adding "space" item in 'listchars'. (Jérémie Roquet, 2009 Oct 29, + Docs patch Oct 30, update David Burgin (glts) 2013 Aug 24) +- Replace ccomplete.vim by cppcomplete.vim from www.vim.org? script 1520 by + Vissale Neang. (Martin Stubenschrott) Asked Vissale to make the scripts + more friendly for the Vim distribution. + New version received 2008 Jan 6. + No maintenance in two years... +- Patch to open dropped files in new tabs. (Michael Trim, 2010 Aug 3) + +Awaiting updated patches: +9 Mac unicode patch (Da Woon Jung, Eckehard Berns): + 8 Add patch from Muraoka Taro (Mar 16) to support input method on Mac? + New patch 2004 Jun 16 + - selecting proportional font breaks display + - UTF-8 text causes display problems. Font replacement causes this. + - Command-key mappings do not work. (Alan Schmitt) + - With 'nopaste' pasting is wrong, with 'paste' Command-V doesn't work. + (Alan Schmitt) + - remove 'macatsui' option when this has been fixed. + - when 'macatsui' is off should we always convert to "macroman" and ignore + 'termencoding'? +9 HTML indenting can be slow. Caused by using searchpair(). Can search() + be used instead? A.Politz is looking into a solution. +8 Win32: Add minidump generation. (George Reilly, 2006 Apr 24) +8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible. + Aric Blumer has a patch for this. He will update the patch for 6.3. +7 Completion of network shares, patch by Yasuhiro Matsumoto. + Update 2004 Sep 6. + How does this work? Missing comments. +8 Add a few more command names to the menus. Patch from Jiri Brezina + (28 feb 2002). Will mess the translations... +7 ATTENTION dialog choices are more logical when "Delete it" appears + before "Quit". Patch by Robert Webb, 2004 May 3. +- Include flipcase patch: ~/vim/patches/wall.flipcase2 ? Make it work + for multi-byte characters. +- Win32: add options to print dialog. Patch from Vipin Aravind. +- Patch to add highlighting for whitespace. (Tom Schumm, 2003 Jul 5) + use the patch that keeps using HLF_8 if HLF_WS has not + been given values. + Add section in help files for these highlight groups? +8 "fg" and "bg" don't work in an xterm. Get default colors from xterm + with an ESC sequence. + xterm can send colors for many things. E.g. for the cursor: + <Esc>]12;?<Bel> + Can use this to get the background color and restore the colors on exit. +7 Add "DefaultFG" and "DefaultBG" for the colors of the menu. (Marcin + Dalecki has a patch for Motif and Carbon) +- Add possibility to highlight specific columns (for Fortran). Or put a + line in between columns (e.g., for 'textwidth'). + Patch to add 'hlcolumn' from Vit Stradal, 2004 May 20. +8 Add functions: + gettext() Translate a message. (Patch from Yasuhiro Matsumoto) + Update 2004 Sep 10 + Another patch from Edward L. Fox (2005 Nov 24) + Search in 'runtimepath'? + More docs needed about how to use this. + How to get the messages into the .po files? + strchars() Like strlen() and strwidth() but counting characters + instead of bytes. + confirm() add "flags" argument, with 'v' for vertical + layout and 'c' for console dialog. (Haegg) + Flemming Madsen has a patch for the 'c' flag + (2003 May 13) + raisewin() raise gvim window (see HierAssist patch for + Tcl implementation ~/vim/HierAssist/ ) + taglist() add argument to specify maximum number of matches. + useful for interactive things or completion. + col('^') column of first non-white character. + Can use "len(substitute(getline('.'), '\S.*', '', '')) + + 1", but that's ugly. +7 Add patch from Benoit Cerrina to integrate Vim and Perl functions + better. Now also works for Ruby (2001 Nov 10) +- Patch from Herculano de Lima Einloft Neto for better formatting of the + quickfix window (2004 dec 2) +7 When 'rightleft' is set, the search pattern should be displayed right + to left as well? See patch of Dec 26. (Nadim Shaikli) +8 Option to lock all used memory so that it doesn't get swapped to disk + (uncrypted). Patch by Jason Holt, 2003 May 23. Uses mlock. +7 Add ! register, for shell commands. (patch from Grenie) +8 In the gzip plugin, also recognize *.gz.orig, *.gz.bak, etc. Like it's + done for filetype detection. Patch from Walter Briscoe, 2003 Jul 1. +7 Add a "-@ filelist" argument: read file names from a file. (David + Kotchan has a patch for it) +8 Include a connection to an external program through a pipe? See + patches from Felbinger for a mathematica interface. + Or use emacs server kind of thing? +7 Add ":justify" command. Patch from Vit Stradal 2002 Nov 25. +- findmatch() should be adjusted for Lisp. See remark at + get_lisp_indent(). Esp. \( and \) should be skipped. (Dorai Sitaram, + incomplete patch Mar 18) +- 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. + + +Vi incompatibility: +- Try new POSIX tests, made after my comments. (Geoff Clare, 2005 April 7) + Version 1.5 is in ~/src/posix/1.5. (Lynne Canal) +8 With undo/redo only marks in the changed lines should be changed. Other + marks should be kept. Vi keeps each mark at the same text, even when it + is deleted or restored. (Webb) + Also: A mark is lost after: make change, undo, redo and undo. + Example: "{d''" then "u" then "d''": deletes an extra line, because the '' + position is one line down. (Veselinovic) +8 When stdin is not a tty, and Vim reads commands from it, an error should + make Vim exit. +7 Unix Vim (not gvim): Typing CTRL-C in Ex mode should finish the line + (currently you can continue typing, but it's truncated later anyway). + Requires a way to make CTRL-C interrupt select() when in cooked input. +8 When loading a file in the .exrc, Vi loads the argument anyway. Vim skips + loading the argument if there is a file already. When no file argument + given, Vi starts with an empty buffer, Vim keeps the loaded file. (Bearded) +6 In Insert mode, when using <BS> or <Del>, don't wipe out the text, but + only move back the cursor. Behaves like '$' in 'cpoptions'. Use a flag + in 'cpoptions' to switch this on/off. +8 When editing a file which is a symbolic link, and then opening another + symbolic link on the same file, Vim uses the name of the first one. + Adjust the file name in the buffer to the last one used? Use several file + names in one buffer??? + Also: When first editing file "test", which is symlink to "test2", and + then editing "test2", you end up editing buffer "test" again. It's not + logical that the name that was first used sticks with the buffer. +7 The ":undo" command works differently in Ex mode. Edit a file, make some + changes, "Q", "undo" and _all_ changes are undone, like the ":visual" + command was one command. + On the other hand, an ":undo" command in an Ex script only undoes the last + change (e.g., use two :append commands, then :undo). +7 The ":map" command output overwrites the command. Perhaps it should keep + the ":map" when it's used without arguments? +7 CTRL-L is not the end of a section? It is for Posix! Make it an option. +7 Implement 'prompt' option. Init to off when stdin is not a tty. +7 CTRL-T in Insert mode inserts 'shiftwidth' of spaces at the cursor. Add a + flag in 'cpoptions' for this. +7 Add a way to send an email for a crashed edit session. Create a file when + making changes (containing name of the swap file), delete it when writing + the file. Supply a program that can check for crashed sessions (either + all, for a system startup, or for one user, for in a .login file). +7 Vi doesn't do autoindenting when input is not from a tty (in Ex mode). +7 "z3<CR>" should still use the whole window, but only redisplay 3 lines. +7 ":tag xx" should move the cursor to the first non-blank. Or should it go + to the match with the tag? Option? +7 Implement 'autoprint'/'ap' option. +7 Add flag in 'cpoptions' that makes <BS> after a count work like <Del> + (Sayre). +7 Add flag in 'cpoptions' that makes operator (yank, filter) not move the + cursor, at least when cancelled. (default Vi compatible). +7 This Vi-trick doesn't work: "Q" to go to Ex mode, then "g/pattern/visual". + In Vi you can edit in visual mode, and when doing "Q" you jump to the next + match. Nvi can do it too. +7 Support '\' for line continuation in Ex mode for these commands: (Luebking) + g/./a\ g/pattern1/ s/pattern2/rep1\\ + line 1\ line 2\\ + line 2\ line 3\\ + . line4/ +6 ":e /tmp/$tty" doesn't work. ":e $uid" does. Is $tty not set because of + the way the shell is started? +6 Vi compatibility (optional): make "ia<CR><ESC>10." do the same strange + thing. (only repeat insert for the first line). + + +GTK+ GUI known bugs: +9 Crash with X command server over ssh. (Ciaran McCreesh, 2006 Feb 6) +8 GTK 2: Combining UTF-8 characters not displayed properly in menus (Mikolaj + Machowski) They are displayed as separate characters. Problem in + creating a label? +8 GTK 2: Combining UTF-8 characters are sometimes not drawn properly. + Depends on the font size, "monospace 13" has the problem. Vim seems to do + everything right, must be a GTK bug. Is there a way to work around it? +9 Can't paste a Visual selection from GTK-gvim to vim in xterm or Motif gvim + when it is longer than 4000 characters. Works OK from gvim to gvim and + vim to vim. Pasting through xterm (using the shift key) also works. + It starts working after GTK gvim loses the selection and gains it again. +- Gnome2: When moving the toolbar out of the dock, so that it becomes + floating, it can no longer be moved. Therefore making it float has been + blocked for now. + + +Win32 GUI known bugs: +- Win32: tearoff menu window should have a scrollbar when it's taller than + the screen. +8 On Windows 98 the unicows library is needed to support functions with UCS2 + file names. Can we load unicows.dll dynamically? +8 The -P argument doesn't work very well with many MDI applications. + The last argument of CreateWindowEx() should be used, see MSDN docs. + Tutorial: http://win32assembly.online.fr/tut32.html +8 In eval.c, io.h is included when MSWIN32 is defined. Shouldn't this be + WIN32? Or can including io.h be moved to vim.h? (Dan Sharp) +6 Win32 GUI: With "-u NONE -U NONE" and doing "CTRL-W v" "CTRL-W o", the ":" + of ":only" is highlighted like the cursor. (Lipelis) +8 When 'encoding' is "utf-8", should use 'guifont' for both normal and wide + characters to make Asian languages work. Win32 fonts contain both + type of characters. +7 When font smoothing is enabled, redrawing can become very slow. The reason + appears to be drawing with a transparent background. Would it be possible + to use an opaque background in most places? +8 Use another default for 'termencoding': the active codepage. Means that + when 'encoding' is changed typing characters still works properly. + Alternative: use the Unicode functions to obtain typed characters. +7 The cursor color indicating IME mode doesn't work properly. (Shizhu Pan, + 2004 May 9) +8 Win32: When clicking on the gvim title bar, which gives it focus, produces + a file-changed dialog, after clicking on a button in that dialog the gvim + window follows the mouse. The button-up event is lost. Only with + MS-Windows 98? + Try this: ":set sw ts", get enter-prompt, then change the file in a + console, go back to Vim and click "reload" in the dialog for the changed + file: Window moves with the cursor! + Put focus event in input buffer and let generic Vim code handle it? +8 Win32 GUI: With maximized window, ":set go-=r" doesn't use the space that + comes available. (Poucet) It works OK on Win 98 but doesn't work on Win + NT 4.0. Leaves a grey area where the scrollbar was. ":set go+=r" also + doesn't work properly. +8 When Vim is minimized and when maximizing it a file-changed dialog pops + up, Vim isn't maximized. It should be done before the dialog, so that it + appears in the right position. (Webb) +9 When selecting at the more-prompt or hit-enter-prompt, the right mouse + button doesn't give popup menu. + At the hit-enter prompt CTRL-Y doesn't work to copy the modeless + selection. + On the command line, don't get a popup menu for the right mouse button. + Let the middle button paste selected text (not the clipboard but the + non-Visual selection)? Otherwise CTRL-Y has to be used to copy the text. +8 When 'grepprg' doesn't execute, the error only flashes by, the + user can hardly see what is wrong. (Moore) + Could use vimrun with an "-nowait" argument to only wait when an error + occurs, but "command.com" doesn't return an error code. +8 When the 'shell' cannot be executed, should give an appropriate error msg. + Esp. for a filter command, currently it only complains the file could not + be read. +7 Add an option to add one pixel column to the character width? Lucida + Console italic is wider than the normal font ("d" overlaps with next char). + Opposite of 'linespace': 'columnspace'. +7 At the hit-enter prompt scrolling now no longer works. Need to use the + keyboard to get around this. Pretend <CR> was hit when the user tries to + scroll? +7 Scrollbar width doesn't change when selecting other windows appearance. + Also background color of Toolbar and rectangle below vert. scrollbar. +6 Drawing text transparently doesn't seem to work (when drawing part cursor). +8 CTRL key doesn't always work in combination with ALT key. It does work + for function keys, not for alphabetic characters. Perhaps this is because + CTRL-ALT is used by Windows as AltGr? +8 CTRL-- doesn't work for AZERTY, because it's CTRL-[ for QWERTY. How do we + know which keyboard is being used? +7 When scrolling, and a background color is dithered, the dither pattern + doesn't always join correctly between the scrolled area and the new drawn + area (Koloseike). +8 When gui_init_font() is called with "*", p_guifont is freed while it might + still be used somewhere. This is too tricky, do the font selection first, + then set the new font by name (requires putting all logfont parameters in + the font name). + + +Athena and Motif: +6 New Motif toolbar button from Marcin Dalecki: + - When the mouse pointer is over an Agide button the red becomes black. + Something with the way colors are specified in the .xpm file. + - The pixmap is two pixels smaller than it should be. The gap is filled + with grey instead of the current toolbar background color. +9 Can configure be changed to disable netbeans if the Xpm library is + required and it's missing? +8 When using the resource "Vim*borderwidth 2" the widgets are positioned + wrong. +9 XIM is disabled by default for SGI/IRIX. Fix XIM so that 'imdisable' can + be off by default. +9 XIM doesn't work properly for Athena/Motif. (Yasuhiro Matsumoto) For now, + keep XIM active at all times when the input method has the preediting + flag. +8 X11: A menu that contains an umlaut is truncated at that character. + Happens when the locale is "C", which uses ASCII instead of IS0-8859-1. + Is there a way to use latin1 by default? Gnome_init() seems to do this. +8 Perhaps use fontsets for everything? +6 When starting in English and switching the language to Japanese, setting + the locale with ":lang", 'guifontset' and "hi menu font=", deleting all + menus and setting them again, the menus don't use the new font. Most of + the tooltips work though... +7 Motif: when using a file selection dialog, the specified file name is not + always used (when specifying a filter or another directory). +8 When 'encoding' is different from the current locale (e.g., utf-8) the + menu strings don't work. Requires conversion from 'encoding' to the + current locale. Workaround: set 'langmenu'. + + +Athena GUI: +9 The first event for any button in the menu or toolbar appears to get lost. + The second click on a menu does work. +9 When dragging the scrollbar thumb very fast, focus is only obtained in + the scrollbar itself. And the thumb is no longer updated when moving + through files. +7 The file selector is not resizable. With a big font it is difficult to + read long file names. (Schroeder) +4 Re-write the widget attachments and code so that we will not have to go + through and calculate the absolute position of every widget every time the + window is refreshed/changes size. This will help the "flashing-widgets" + problem during a refresh. +5 When starting gvim with all the default colors and then typing + ":hi Menu guibg=cyan", the menus change color but the background of the + pullright pixmap doesn't change colors. + If you type ":hi Menu guibg=cyan font=anyfont", then the pixmap changes + colors as it should. + Allocating a new pixmap and setting the resource doesn't change the + pullright pixmap's colors. Why? Possible Athena bug? + + +Motif GUI: +- gui_mch_browsedir() is missing, browsedir() doesn't work nicely. +7 Use XmStringCreateLocalized() instead of XmStringCreateSimple()? + David Harrison says it's OK (it exists in Motif 1.2). +8 Lesstif: When deleting a menu that's torn off, the torn off menu becomes + very small instead of disappearing. When closing it, Vim crashes. + (Phillipps) + + +GUI: +9 On Solaris, creating the popup menu causes the right mouse button no + longer to work for extending the selection. (Halevy) +9 When running an external program, it can't always be killed with CTRL-C. + e.g., on Solaris 5.5, when using "K" (Keech). Other 'guipty' problems on + Solaris 2.6. (Marley) +9 On Solaris: Using a "-geometry" argument, bigger than the window where Vim + is started from, causes empty lines below the cmdline. (raf) +8 X11 GUI: When menu is disabled by excluding 'm' from 'guioptions', ALT key + should not be used to trigger a menu (like the Win32 version). +8 When setting 'langmenu', it should be effective immediately. Store both + the English and the translated text in the menu structure. Re-generate + the translation when 'langmenu' has changed. +8 Basic flaw in the GUI code: NextScreen is updated before calling + gui_write(), but the GUI code relies on NextScreen to represent the state + of where it is processing the output. + Need better separation of Vim core and GUI code. +8 When fontset support is enabled, setting 'guifont' to a single font + doesn't work. +8 Menu priority for sub-menus for: Amiga, BeOS. +8 When translating menus ignore the part after the Tab, the shortcut. So + that the same menu item with a different shortcut (e.g., for the Mac) are + still translated. +8 Add menu separators for Amiga. +8 Add way to specify the file filter for the browse dialog. At least for + browse(). +8 Add dialog for search/replace to other GUIs? Tk has something for this, + use that code? Or use console dialog. +8 When selecting a font with the font dialog and the font is invalid, the + error message disappears too quick. +7 More features in the find/replace dialog: + - regexp on/off + - search in selection/buffer/all buffers/directory + when all buffers/directory is used: + - filter for file name + when directory is used: + - subdirectory on/off + - top directory browser +8 gui_check_colors() is not called at the right moment. Do it much later, + to avoid problems. +8 gui_update_cursor() is called for a cursor shape change, even when there + are mappings to be processed. Only do something when going to wait for + input. Or maybe every 100 ms? +8 X11: When the window size is reduced to fit on screen, there are blank + lines below the text and bottom scrollbar. "gvim -geometry 80x78+0+0". + When the "+0+0" is omitted it works. +8 When starting an external command, and 'guipty' set, BS and DEL are mixed + up. Set erase character somehow? +8 A dead circumflex followed by a space should give the '^' character + (Rommel). Look how xterm does this. + Also: Bednar has some code for dead key handling. + Also: Nedit 5.0.2 with USE_XMIM does it right. (Gaya) +8 The compose key doesn't work properly (Cepas). Both for Win32 and X11. +7 The cursor in an inactive window should be hollow. Currently it's not + visible. +7 GUI on Solaris 2.5.1, using /usr/dt/..: When gvim starts, cursor is + hollow, after window lowered/raised it's OK. (Godfrey) +7 When starting GUI with ":gui", and window is made smaller because it + doesn't fit on the screen, there is an extra redraw. +8 When setting font with .Xdefaults, there is an extra empty line at the + bottom, which disappears when using ":set guifont=<Tab>". (Chadzelek) +8 When font shape changes, but not the size, doing ":set font=" does not + redraw the screen with the new font. Also for Win32. + When the size changes, on Solaris 2.5 there isn't a redraw for the + remaining part of the window (Phillipps). +- Flashes really badly in certain cases when running remotely from a Sun. +4 Re-write the code so that the highlighting isn't changed multiple times + when doing a ":hi clear". The color changes happen three or more times + currently. This is very obvious on a 66Mhz 486. + + +MSDOS/DJGPP: +9 Pressing CTRL-C often crashes the console Vim runs in. (Ken Liao) + When 'bioskey' isn't set it doesn't happen. Could be a problem with the + BIOS emulation of the console. Version 5.6 already had this problem. +8 DJGPP: "cd c:" can take us to a directory that no longer exists. + change_drive() doesn't check this. How to check for this error? +9 The 16 bit version runs out of memory very quickly. Should find unused + code and reduce static data. Resetting 'writebackup' helps to be able to + write a file. +9 Crash when running on Windows 98 in a console window and pressing CTRL-C. + Happens now and then. When debugging Vim in gdb this also happens. Since + the console crashes, might be a bug in the DOS console. Resetting + 'bioskey' avoids it, but then CTRL-C doesn't work. +9 DOS: Make CTRL-Fx and ALT-Fx work. + CTRL-F1 = CE-5E, CTRL-F2 = CE-5F, .., CTRL-F10 = CE-67 + ALT-F1 = CE-68, ALT-F2 = CE-69, .., ALT-F10 = CE-71 + Shifted cursor keys produce same codes as unshifted keys. Use bioskey(2) + to get modifier mask for <S-C-M-Fx>. + Use K_SPECIAL/KS_MODIFIER codes to insert modifier mask in input stream? + Make this work like in Win32 console. + Mapping things like <M-A> doesn't work, because it generates an extended + key code. Use a translation table? +9 Can't read an opened swap file when the "share" command has not been used. + At least ignore the swap files that Vim has opened itself. +8 Use DJGPP 2.03. +8 The Dos32 version (DJGPP) can't use long file names on Windows NT. + Check if new package can be used (v2misc/ntlfn08[bs].zip). +8 setlocale() is bogus. +8 Vim busy waits for new characters or mouse clicks. Should put in some + sort of sleep, to avoid eating 50% of the CPU time. Test on an unpatched + Windows 95 system! +8 DJGPP: when shell is bash, make fails. (Donahoe) +7 Hitting CTRL-P twice quickly (e.g., in keyword completion) on a 8088 + machine, starts printer echo! (John Mullin). +7 MSDOS 16 bit version can't work with COMSPEC that has an argument, e.g.: + COMSPEC=C:\WINDOWS\COMMAND.COM /E:4096 (Bradley) + Caused by BCC system() function (Borland "make" has the same problem). +8 Mouse: handle left&right button pressed as middle button pressed. Add + modifier keys shift, ctrl and alt. +7 When too many files are open (depends on FILES), strange things happen. + The Dos16 version runs out of memory, in the Dos32 version "!ls" causes a + crash. Another symptom: .swp files are not deleted, existing files are + "[New file]". +7 DJGPP version doesn't work with graphics display mode. Switch to a mode + that is supported? +8 DJGPP: ":mode" doesn't work for many modes. Disable them. +8 DJGPP: When starting in Ex mode, shouldn't clear the screen. (Walter + Briscoe) + + +MSDOS, OS/2 and Win32: +8 OS/2: Add backtick expansion. Undefine NO_EXPANDPATH and use + gen_expand_wildcards(). +8 OS/2: Add clipboard support? See example clipbrd.exe from Alexander + Wagner. +8 OS/2: Add Extended Attributes support and define HAVE_ACL. +8 OS/2: When editing a file name "foo.txt" that is actually called FOO.txt, + writing uses "foo.txt". Should obtain the real file name. +8 Should $USERPROFILE be preferred above $HOMEDRIVE/$HOMEPATH? No, but it's + a good fallback, thus use: + $HOME + $HOMEDRIVE$HOMEPATH + SHGetSpecialFolderPath(NULL, lpzsPath, CSIDL_APPDATA, FALSE); + $USERPROFILE + SHGetSpecialFolderPath(NULL, lpzsPath, CSIDL_COMMON_APPDATA, FALSE); + $ALLUSERSPROFILE + $SYSTEMDRIVE\ + C:\ +8 Win32 console: <M-Up> and <M-Down> don't work. (Geddes) We don't have + special keys for these. Should use modifier + key. +8 Win32 console: caps-lock makes non-alpha keys work like with shift. + Should work like in the GUI version. +8 Environment variables in DOS are not case sensitive. Make a define for + STRCMP_ENV(), and use it when comparing environment var names. +8 Setting 'shellslash' has no immediate effect. Change all file names when + it is set/reset? Or only use it when actually executing a shell command? +8 When editing a file on a Samba server, case might matter. ":e file" + followed by ":e FILE" will edit "file" again, even though "FILE" might be + another one. Set last used name in buflist_new()? Fix do_ecmd(), etc. +8 When a buffer is editing a file like "ftp://mach/file", which is not going + to be used like a normal file name, don't change the slashes to + backslashes. (Ronald Hoellwarth) + + +Windows 95: +8 Editing a file by its short file name and writing it, makes the long file + name disappear. Setting 'backupcopy' helps. + Use FindFirstFile()->cAlternateFileName in fname_case() (George Reilly). +8 Doing wildcard expansion, will match the short filename, but result in the + long filename (both DJGPP and Win32). + + +Win32 console: +9 When editing a file by its short file name, it should be expanded into its + long file name, to avoid problems like these: (Mccollister) + 1) Create a file called ".bashrc" using some other editor. + 2) Drag that file onto a shortcut or the actual executable. + 3) Note that the file name is something like BASHRC~1 + 4) Go to File->Save As menu item and type ".bashrc" as the file name. + 5) Press "Yes" to indicate that I want to overwrite the file. + 6) Note that the message "File exists (add ! to override)" is displayed + and the file is not saved. + Use FindFirstFile() to expand a file name and directory in the path to its + long name. +8 Also implement 'conskey' option for the Win32 console version? Look at + how Xvi does console I/O under Windows NT. +7 Re-install the use of $TERM and support the use of different terminals, + besides the console. +8 Use of <altgr> modifier doesn't work? 5.3 was OK. (Garcia-Suarez/Guckes) +9 Mapping <C-S-Tab> doesn't work correctly. How to see the difference with + <C-S-i>? +9 tmpnam() uses file in root of file system: "\asdf". That doesn't work on + a Netware network drive. Use same function as for Win32 GUI? +8 In os_win32.h, HAVE_STRICMP and HAVE_STRNICMP are defined only if __GNUC__ + is not defined. Shouldn't that be the other way around? +7 Use SetConsoleCP() and SetConsoleOutputCP() to implement 'termencoding'? + Avoids that input and output work differently. Need to be restored when + exiting. + + +Amiga: +8 In mch_inchar() should use convert_input_safe() to handle incomplete byte + sequences. +9 In mch_expandpath() a "*" is to be expanded, but "\*" isn't. Remove + backslashes in result. +8 Executing a shell, only one option for 'shell' is separated. Should do + all options, using white space separation. + + +Macintosh: +- GUI: gui_mch_browsedir() is missing. +7 Loading the Perl library only works on OS/X 10.2 or 10.3, never on both. + Load the Perl library dynamically see Python sources file dynload_mac + (Jack) + dynamic linking: http://developer.apple.com/technotes/tn2002/tn2064.html +8 inputdialog() doesn't resize when giving more text lines. (David Fishburn, + 2006 Sept 28) +8 Define vim_mkdir() for Macintosh. +8 Define mch_writable() for Macintosh. +9 When DiskLock is running, using a swap file causes a crash. Appears to be + a problem with writing a file that starts with a dot. (Giacalone) +9 In mac_expandpath() check that handling of backslashes is done properly. + + +"Small" problems: +- Can't disable terminal flow control, to enable the use of CTRL-S and + CTRL-Q. Add an option for it? +- When using e_secure in do_one_cmd() mention the command being executed, + otherwise it's not clear where it comes from. +- When the quickfix window is open and executing ":echo 'hello'" using the + Command-line window, the text is immediately removed by the redrawing. + (Michael Henry, 2008 Nov 1) + Generic solution: When redrawing while there is a message on the + cmdline, don't erase the display but draw over the existing text. + Other solution, redraw after closing the cmdline window, before executing + the command. +9 For Turkish vim_tolower() and vim_toupper() also need to use utf_ + functions for characters below 0x80. (Sertacyildiz) +9 When the last edited file is a help file, using '0 in a new Vim doesn't + edit the file as a help file. 'filetype' is OK, but 'iskeyword' isn't, + file isn't readonly, etc. +8 When an ":edit" is inside a try command and the ATTENTION prompt is used, + the :catch commands are always executed, also when the file is edited + normally. Should reset did_emsg and undo side effects. Also make sure + the ATTENTION message shows up. Servatius Brandt works on this. +7 Vimtutor leaves escape sequence in terminal. This is the xterm response to + requesting the version number. (Yasuhiro Matsumoto) +8 When redirecting and using ":silent" the current column for displaying and + redirection can be different. Use a separate variable to hold the column + for redirection. +7 The messages for "vim --help" and "vim --version" don't use + 'termencoding'. +- Could the hit-enter prompt be avoided when a message only overlaps the + 'showcmd' area? Clear that area when the next cmd is typed. +8 When 'scrollbind' is set, a window won't scroll horizontally if the cursor + line is too short. Add a word in 'scrollopt' to allow moving the cursor + to longer line that is visible. A similar thing is done for the GUI when + using the horizontal scrollbar. +7 VisVim can only open one file. Hard to solve: each opened file is passed + with a separate invocation, would need to use timestamps to know the + invocations belong together. +8 When giving a ":bwipeout" command a file-changed dialog may popup for this + buffer, which is pointless. (Mike Williams) +8 On MS-Windows ":make" doesn't show output while it is working. Use the + tee.exe from http://unxutils.sourceforge.net/ ? About 16 Kbyte in the + UnxUtils.zip archive. + Alternate one: http://www.pramodx.20m.com/tee_for_win32.htm, but Walter + Briscoe says it's not as good. +8 When doing Insert mode completion a mapping cannot recursively call + edit(), because the completion information is global. Put everything in + an allocated structure? +8 Command line completion: buffers "foo.txt" and "../b/foo.txt", completing + ":buf foo<Tab>" doesn't find the second one. (George V. Reilly) +7 mb_off2cells() doesn't work correctly on the tail byte of a double-byte + character. (Yasuhiro Matsumoto) It should return 1 when used on a tail + byte, like for utf-8. Store second byte of double-byte in ScreenLines2[] + (like for DBCS_JPNU) and put a zero in the second byte (like for UTF-8). +7 Inside a function with "perl <<EOF" a line with "$i++" is recognized as an + ":insert" command, causing the following "endfunction" not to be found. + Add skipping this perl construction inside function definitions. +7 When 'ttimeoutlen' is 10 and 'timeoutlen' is 1000, there is a keycode + "<Esc>a" and a mapping <Esc>x", when typing "<Esc>a" with half a second + delay should not be interpreted as a keycode. (Hans Ginzel) +7 ":botright 1 new" twice causes all window heights to be changed. Make the + bottom window only bigger as much as needed. +7 The Cygwin and MingW makefiles define "PC", but it's not used anywhere. + Remove? (Dan Sharp) +9 User commands use the context of the script they were defined in. This + causes a "s:var" argument to unexpectedly use a variable in the defining + script, not the calling script. Add an argument to ":command": + "-keepcontext". Do replace <SID>, so that a function in the defining + script can be called. +8 The Japanese message translations for MS-Windows are called ja.sjis.po, + but they use encoding cp932. Rename the file and check that it still + works. +8 A very long message in confirm() can't be quit. Make this possible with + CTRL-C. +8 "gf" always excludes trailing punctuation characters. file_name_in_line() + is currently fixed to use ".,:;!". Add an option to make this + configurable? +8 'hkmap' should probably be global-local. +9 When "$" is in 'cpoptions' and folding is active, a "C" command changes + the folds and resets w_lines_valid. The display updating doesn't work + then. (Pritesh Mistry) +8 Using ":s" in a function changes the previous replacement string. Save + "old_sub" in save_search_patterns()? +8 Should allow multi-byte characters for the delimiter: ":s+a+b+" where "+" + is a multi-byte character. +8 When appending to a file and 'patchmode' isn't empty, a backup file is + always written, even when the original file already exists. +9 When getting focus while writing a large file, could warn for this file + being changed outside of Vim. Avoid checking this while the file is being + written. +7 The message in bt_dontwrite_msg() could be clearer. +8 The script ID that is stored with an option and displayed with ":verbose + set" isn't reset when the option is set internally. For example when + 'foldlevel' is set from 'foldlevelstart'. +8 Also store the line number with the script ID and use it for ":verbose", + so that "set nocompatible" is found when it changes other option values. + When an option is set indirectly mention the command? E.g. when + ":diffsplit" sets 'foldmethod'. +8 In the fileformat dialog, "Cancel" isn't translated. Add a global + variable for this. (Eduardo Fernandez) +9 When editing a file with 'readonly' set, there is no check for an existing + swap file. Then using ":write" (without making any changes) doesn't give + a warning either. Should check for an existing swap file without creating + one. Unfinished patch by Ian Kelling, 2008 July 14. +7 When 'showbreak' is set, the amount of space a Tab occupies changes. + Should work like 'showbreak' is inserted without changing the Tabs. +7 When 'mousefocus' is set and switching to another window with a typed + command, the mouse pointer may be moved to a part of the window that's + covered by another window and we lose focus. Only move in the y + direction, not horizontally? +8 ":hardcopy": + - Using the cterm_color[] table is wrong when t_colors is > 16. + - Need to handle unprintable characters. + - Win32: On a B&W printer syntax highlighting isn't visible. Perform + dithering to make grey text? + - Add a flag in 'printoptions' to add an empty page to make the total + number even. "addempty"? (Mike Williams) + - Respect 'linebreak'. Perhaps also 'showbreak'? + - Should interpret CTRL-L as a page break. + - Grey line numbers are not always readable. Add field in 'printoptions'. + Default to black when no syntax highlighting. + - Be able to print a window in diff mode. + - Be able to specify a colorscheme to use for printing. And a separate + one for B&W printing (if that can be detected). +8 In Visual block mode with 'lbr' set, a change command doesn't insert the + text in following lines where the linebreak changes. +9 dosinst.c: The DJGPP version can't uninstall the Uninstall registry key on + Windows NT. How to install a .inf file on Windows NT and how to detect + that Windows NT is being used? +8 When 'virtualedit' is "block,insert" and encoding is "utf-8", selecting a + block of one double-wide character, then "d" deletes only half of it. +8 When 'virtualedit' is set, should "I" in blockwise visual mode also insert + in lines that don't extend into the block? +8 With 'virtualedit' set, in Insert mode just after the end of line, CTRL-O + yh does not yank the last character of the line. (Pavel Papushev) + Doing "hl" first appears to make it work. +8 With 'virtualedit' set it's possible to move into the blank area from + 'linebreak'. +8 With 'virtualedit' set and 'selection' "exclusive", a Visual selection + that ends in or after a tab, "d" doesn't delete (part of) the tab. + (Helmut Stiegler) +9 When jumping to a tag, the search pattern is put in the history. When + 'magic' is on, the pattern may not work. Translate the pattern depending + on p_magic when putting it in the history? Alternative: Store value of + 'magic' in history. (Margo) +9 optwin.vim: Restoring a mapping for <Space> or <CR> is not correct for + ":noremap". Add "mapcmd({string}, {mode})? Use code from ":mkexrc". +9 incsearch is incorrect for "/that/<Return>/this/;//" (last search pattern + isn't updated). +9 term_console is used before it is set (msdos, Amiga). +9 Get out-of-memory for ":g/^/,$s//@/" on 1000 lines, this is not handled + correctly. Get many error messages while redrawing the screen, which + cause another redraw, etc. +8 [<C-I> doesn't work when '*' is in 'iskeyword'. find_pattern_in_path() + must escape special characters in the pattern. +8 Vim can overwrite a read-only file with ":w!". ":w" can't overwrite an + existing file, "w!" can, but perhaps not a read-only file? Then use + ":w!!" for that. + Or ask for permission to overwrite it (if file can be made writable) and + restore file to readonly afterwards. + Overwriting a file for which a swap file exists is similar issue. +7 When compiled with "xterm_clipboard", startup can be slower and might get + error message for invalid $DISPLAY. Try connecting to the X server in the + background (forked), so that Vim starts up quicker? Connect as soon as + the clipboard is to be used (Visual select mode starts, paste from + clipboard) +7 X11: Some people prefer to use CLIPBOARD instead of PRIMARY for the normal + selection. Add an "xclipboard" argument to the 'clipboard' option? (Mark + Waggoner) +8 For xterm need to open a connection to the X server to get the window + title, which can be slow. Can also get the title with "<Esc>[21t", no + need to use X11 calls. This returns "<Esc>]l{title}<Esc>\". +6 When the xterm reports the number of colors, a redraw occurs. This is + annoying on a slow connection. Wait for the xterm to report the number of + colors before drawing the screen. With a timeout. +8 When the builtin xterm termcap contains codes that are not wanted, need a + way to avoid using the builtin termcap. +8 Xterm sends ^[[H for <Home> and ^[[F for <End> in some mode. Also + recognize these keys? Mostly useful for xterm simulators, like gnometerm. + See http://dickey.his.com/xterm/xterm.faq.html#xterm_pc_style. +8 For xterm also recognize keypad up/down/left/right and insert. +8 '[ and '] should be set to start/end of line when using a linewise operator + (e.g., ":w"). +8 CTRL-A can't handle big "long" numbers, they become negative. Check for + "-" character, if not present, use unsigned long. +8 Make it possible to disable the special meaning of "#" in the first column + for ">>". +8 Add suspending with CTRL-Z at the "more" prompt, and when executing a long + script in do_cmdline(). +8 When using 'hidden', many swap files will be open. When Vim runs into the + maximum number of open files, error messages will appear. Detect that + this problem is present, and close any hidden files that don't have + changes. +8 With 'viminfo' set such that the ".viminfo" file is written on a FAT + filesystem, an illegal file name may be created: ".vim". +8 For each buffer that is opened, the viminfo file is opened and read to + check for file marks. This can be slow. +7 In xterm, recognize both vt100 and vt220 cursor keys. Change + add_termcode() to not remove an existing entry for a name, when it's + needed. + Need a generic solution to recognize different codes for the same key. +8 Core dump within signal function: gdb doesn't show stack backtrace! Option + to skip catch_signals()? +9 Repeating a "cw" with "." doesn't work if the text was pasted from the + clipboard. (Thomas Jones) It's because the menu/toolbar item exits Insert + mode and uses "gP". How to fix this without breaking inserting a block of + text? +8 In Replace mode pasting from the clipboard (using menu or toolbar) inserts + all the text. Add ":rmenu"? +8 Pasting with the mouse in Replace mode inserts the text, instead of + overwriting, when it is more than one line. Same for using <C-R>. +9 CTRL-E and CTRL-Y don't work in small window when 'so' is 4 and lines are + wrapping (Acevedo/in.226). E.g., when using CTRL-E, window height 7, + window might actually scroll down when last line of buffer is displayed. + --> Remember if the previous command was "cursor follows screen" or + "screen follow cursor" and use this in cursupdate(). +7 tilde_replace() can only handle "~/", should also do "~user/". + Get the list of home directories (from /etc/passwd? Use getpwent()) and + use some clever algorithm to match a path with that. Find common strings + in the list? +8 When dragging status line with mouse, sometimes a jump when first clicking + on the status line (caused by 'winheight'). Select window on button up, + instead of on button down. +8 Dragging the status line doesn't scroll but redraw. +9 Evaluating 'statusline' in build_stl_str_hl() does not properly check for + reaching the end of the available buffer. + Patch to dynamically allocate the buffer for % items. (Eric Arnold, 2006 + May 14) +8 When performing incremental search, should abort searching as soon as a + character is typed. +8 When the value of $MAKE contains a path, configure can't handle this. + It's an autoconf bug. Remove the path from $MAKE to work around it. +8 How to set VIMRC_FILE to \"something\" for configure? Why does this not + work: CFLAGS='-DVIMRC_FILE=\"/mydir/myfile\"' ./configure +8 The temporary file is sometimes not writable. Check for this, and use an + alternate name when it isn't. Or add the 'temptemplate' option: template + for the temp file name ":set temptemplate=/usr/tmp/?????.tmp". + Also: Win32 version uses Windows temp directory, which might not work for + cygwin bash. +7 Get error "*, \+ or \( operand could be empty" for pattern "\(.\)\1\{3}". + Remember flags for backreferences. +7 When switching to Daylight Saving Time, Vim complains that a file has been + changed since last read. Can we use a function that uses GMT? +7 When completing an environment variable after a '$', check for file names + that contain a '$' after all have been found. +8 When "cm" termcap entry is missing, starting gvim shouldn't complain about + it. (Lohner) Try out with "vt100" entry, cm replaced with cX. +7 When an include file starts with "../", the check for already visiting + this file doesn't work. Need to simplify the file name. +7 The names and comments for the arguments of do_browse() are confusing. + "dflt" isn't the default file name when "initdir" is not NULL and + "initdir" is the default path to be used. +7 When 'scrolloff' is exactly half the window height, "j" causes a scroll of + two lines at a time. "k" doesn't do this. (Cory T. Echols) +8 When write_viminfo() is used while there are many orphaned viminfo + tempfiles writing the viminfo file fails. Give a clear error message so + that the user knows he has to delete the files. +7 It's possible to redefine a script-local function with ":func + <SNR>123_Test()". (Krishna) Disallow this. + + +I can't reproduce these (if you can, let me know how!): +9 NT 4.0 on NTFS file system: Editing ".bashrc" (drag and drop), file + disappears. Editing ".xyz" is OK. Also, drag&drop only works for three + files. (McCollister) + + +Problems that will (probably) not be solved: +- GTK: when using the popup menu with spelling suggestions and releasing the + right mouse button before the menu appears selecting an item with the + right mouse button has no effect. GTK does not produce an event for this. +- GTK 2: Cannot use the file selector. When using it many things become + slow. This is caused by some code in GTK that writes + ~/.recently-used.xbel every time an event is handled. It assumes the main + loop is never quit, which is a wrong assumption. Also, it overwrites the + file with different file permissions, which is a privacy issue. This + needs to be fixed in GTK. A solution in Vim would be really complicated. + (2008 Jul 31) This appears to be fixed in Vim 7.3. +- xterm title: The following scenario may occur (esp. when running the Vim + test script): Vim 1 sets the title to "file1", then restores the title to + "xterm" with an ESC sequence when exiting. Vim 2 obtains the old title + with an X library call, this may result in "file1", because the window + manager hasn't processed the "xterm" title yet. Can apparently only be + worked around with a delay. +- In a terminal with 'mouse' set such that the mouse is active when entering + a command line, after executing a shell command that scrolls up the + display and then pressing ":": Selecting text with the mouse works like + the display wasn't scrolled. Vim doesn't know how much the external + command scrolled up the display. Use Shift to select text. +- X windows: When $DISPLAY points to a X server where there is no access + permission, trying to connect to the X server causes an error message. + XtOpenDisplay() prints this directly, there is no way to avoid it. +- X windows: Setting 'guifontset' to an illegal value sometimes crashes Vim. + This is caused by a fault in a X library function, can't be solved in Vim. +- Win32 tcl: has("tcl") hangs when the tcl84.dll is from cygwin. +- Motif: When adding a menu item "Find this &Symbol", the "s" in "this" will + be underlined, instead of in "Symbol". Motif doesn't let us specify which + character gets the highlighting. +- Moving the cursor removes color in color-xterm. This is a color-xterm + problem! color-xterm ver. 6.1 beta 3 and later work properly. +- In zsh, "gvim&" changes the terminal settings. This is a zsh problem. + (Jennings) +- Problem with HPterm under X: old contents of window is lost (Cosentino). +- Amiga: When using quickfix with the Manx compiler we only get the first 25 + errors. How do we get the rest? +- Amiga: The ":cq" command does not always abort the Manx compiler. Why? +- Linux: A file with protection r--rw-rw- is seen readonly for others. The + access() function in GNU libc is probably wrong. +- MSDOS: When using smartdrive with write-back buffering, writing to a + readonly floppy will cause problems. How to test for a writable floppy + first? +- MSDOS: Both 16 and 32 bit versions: File name expansion doesn't work for + names that start with a dot. These used to be illegal file names. +- When doing a CTRL-Z and typing a command for the shell, while Vim is busy + (e.g. writing a file), the command for the shell is sometimes eaten by Vim, + because the terminal mode is changed from RAW to CBREAK. +- An old version of GNU tgoto can't handle the terminfo code for "AF". The + "%p1" is interpreted as "%p" and "1", causing color not to be working. + Fix: Change the "%p1" in the "AF" and "AB" terminfo entries to "%p". + (Benzinger). +- When running an external command from the GUI, typeahead is going to that + program, not to Vim. It looks like the shell eats the characters, Vim + can't get back what the external command didn't use. +- Win32 GUI: Error code from external command not returned in shell_error. + It appears that cmd.exe and command.com don't return an error code. +- Win32 GUI: The Toolbar is a bit too high when the flat style is being + used. We don't have control over the height of the Toolbar. +- Win32: All files created on the day of switching from winter to summer + time cause "changed since editing started" messages. It goes away when + the file is written again the next day, or the timezone is adjusted. + DJGPP version is OK. (Zaimi) Looks like a problem with the Win32 library. + Rebooting doesn't help. Time stamps look OK in directory. (Penn) + Is this on FAT (stores wall clock time) or NTFS (stores UTS)? +- Win32, MS-Windows XP: $HOME uses the wrong drive when the user profiles + are not on the boot disk. This is caused by a wrong value of $HOMEDRIVE. + This is a bug in XP, see MSKB article 818134. +- Win32, MS-Windows: expanding plugin/**/*.vim also picks up + dir/ctags.vim,v. This is because the short file name is something like + "ctags~1.vim" and that matches the pattern. +- SunOS 5.5.1 with Motif: The file open dialog does not have a horizontal + scroll bar for the "files" selection. This is a problem in the Motif + libraries, get a patch from Sun. +- Solaris 2.6 with GTK and Perl: gvim crashes when started. Problem with X + input method called from GDK code. Without Perl it doesn't crash. +- VMS: Vimdiff doesn't work with the VMS diff, because the output looks + different. This makes test 47 fail. Install a Unix-compatible diff. +- Win32 GUI: mouse wheel always scrolls rightmost window. The events arrive + in Vim as if the rightmost scrollbar was used. +- GTK with Gnome: Produces an error message when starting up: + Gdk-WARNING **: locale not supported by C library + This is caused by the gnome library gnome_init() setting $LC_CTYPE to + "en_US". Not all systems support this locale name, thus causing the + error. Hopefully a newer version of GTK/Gnome fixes this problem. +- GTK 2: With this mapping the hit-enter prompt is _sometimes_ below the + screen, at other times there is a grey area below the command line: + :nmap <F11> :if &guioptions=~'m' \| set guioptions-=m \| else \| set guioptions+=m \| endif<cr> +- GTK: When pasting a selection from Vim to xclipboard gvim crashes with a + ABRT signal. Probably an error in the file gdkselection.c, the assert + always fails when XmbTextListToTextProperty() fails. (Tom Allard) +- GTK 2: gives an assertion error for every non-builtin icon in the toolbar. + This is a GTK 2.4.x bug, fixed in GTK 2.4.2. (Thomas de Grenier de Latour) +- When using an xterm that supports the termresponse feature, and the 't_Co' + termcap option was wrong when Vim started, it will be corrected when the + termresponse is received. Since the number of colors changes, the + highlighting needs to be initialized again. This may cause colors defined + in the vimrc file to be lost. +- On Windows NT 4.0 the number of files passed to Vim with drag&drop and + "Edit with Vim" is limited. The maximum command line length is 255 chars. + +--------------------- extensions and improvements ---------------------- + *extensions-improvements* + +Most interesting new features to be added when all bugs have been fixed: +- Using ":exe edit fname" has escaping problems. Use ":edit ++(fname)". + Thus use "++=" to give arguments as expressions, comma separated as if + calling a function. + With options: ":edit ++(['!', '++enc=abc'], ['+/pat'], fname)". + Alternative: Make a function for Ex commands: cmd_edit(). +- Add COLUMN NUMBERS to ":" commands ":line1,line2[col1,col2]cmd". Block + can be selected with CTRL-V. Allow '$' (end of line) for col2. +- Add DEBUGGER INTERFACE. Implementation for gdb by Xavier de Gaye. + Should work like an IDE. Try to keep it generic. Now found here: + http://clewn.sf.net. + And the idevim plugin/script. + To be able to start the debugger from inside Vim: For GUI run a program + with a netbeans connection; for console: start a program that splits the + terminal, runs the debugger in one window and reconnect Vim I/O to the + other window. + Wishes for NetBeans commands: + - make it possible to have 'defineAnnoType' also handle terminal colors. + - send 'balloonText' events for the cursor position (using CursorHold ?) + in terminal mode. +- ECLIPSE plugin. Problem is: the interface is very complicated. Need to + implement part in Java and then connect to Vim. Some hints from Alexandru + Roman, 2004 Dec 15. Should then also work with Oracle Jdeveloper, see JSR + 198 standard http://www.jcp.org/en/jsr/detail?id=198. + Eclim does it: http://eclim.sourceforge.net/ (Eric Van Dewoestine) + Plugin that uses a terminal emulator: http://vimplugin.sf.net + And another one: http://www.satokar.com/viplugin/index.php +- STICKY CURSOR: Add a way of scrolling that leaves the cursor where it is. + Especially when using the scrollbar. Typing a cursor-movement command + scrolls back to where the cursor is. +- Scroll commands by screen line. g CTRL-E and g CTRL-Y ? Requires the + first line to be able to start halfway. +- Running a shell command from the GUI still has limitations. Look into how + the terminal emulator of the Vim shell project can help: + http://vimshell.wana.at +8 Add a command to jump to a certain kind of tag. Allow the user to specify + values for the optional fields. E.g., ":tag size type=m". + Also allow specifying the file and command, so that the result of + taglist() can be used. +- X11: Make it possible to run Vim inside a window of another program. + This can be done with XReparentWindow(). But how exactly? + + +Documentation: +8 List of Vim runtime directories. dotvim.txt from Charles Campbell, 2007 + Feb 20. +8 The GUI help should explain the Find and Find/Replace dialogs. Add a link + to it from ":promptrepl" and ":promptfind". +8 List of options should mention whether environment variables are expanded + or not. +8 Extend usr_27.txt a bit. (Adam Seyfarth) +7 Add a section on debugging scripts in the user manual. +9 Make the Reference Manual more precise. For each command mention: + - change to cursor position and curswant + - if it can be undone (u/CTRL-R) and redone (.) + - how it works for folded lines + - how it works with multi-byte characters +9 In change.txt, remark about Javadoc isn't right. Right alignment would + work too. +8 Spread the windows commands over the other files. For example, ":stag" + should be with ":tag". Cross-link with tags to avoid too much double + text. +8 Add tags for all features, e.g. "gui_running". +7 MS-Windows: When a wrong command is typed with an ALT key, give a hint to + look at the help for 'winaltkeys'. +7 Add a help.vim plugin that maps <Tab> to jump to the next tag in || and + <C-Tab> (and <S-Tab>) to the previous tag. + Patch by Balazs Kezes, 2007 Dec 30. Remark from A. Politz. +- Check text editor compendium for vi and Vim remarks. + + +Help: +- First try using the ":help" argument literally, before using it as a + pattern. And then match it as part of a tag. +- When a help item has multiple matches make it possible to use ":tn" to go + to the other matches. +- Support a way to view (and edit) .info files. +- Default mapping for help files: <Tab> to position cursor on next |:tag|. +- Implement a "sticky" help window, some help text lines that are always + displayed in a window with fixed height. (Guckes) Use "~/.vimhelp" file, + user can edit it to insert his favorite commands, new account can contain a + default contents. +- Make 'winminheight' a local option, so that the user can set a minimal + height for the help window (and other windows). +- ":help :s^I" should expand to ":help :substitute". +- Make the help key (<F1>) context sensitive? +- Learn mode: show short help while typing commands. + + +User Friendlier: +8 Windows install with install.exe: Use .exe instead of .bat files for + links, so that command line arguments are passed on unmodified? (Walter + Briscoe) +8 Windows install: Be able to associate Vim with a selection of file types? +8 Windows uninstall: Have uninstal.c delete the vimfiles directories that + dosinst.c creates. List the contents of the directory (recursively) if + the user asks for it. Requires an implementation of "rm -rf". +8 Remember the name of the vimrc file that was used (~/.vimrc, $VIM/_vimrc, + $HOME/_vimrc, etc.) and add "edit vimrc" to the File menu. +- Add a way to save local settings and mappings into a new plugin file. + ":mkplugin <file>"? +8 Add ":plugininstall" command. Can be used to install a plugin file that + includes documentation. Let the user select a directory from + 'runtimepath'. + " Vim plugin + <main plugin code> + " >>> plugin help start <<< + <plugin docs> +- Add mappings local to a window: ":map <window> ..."? +9 Add buffer-local menu. Should offer a choice between removing the menu or + disabling it. Be careful that tear-offs don't disappear (keep one empty + item?). + Alternative: use BufEnter and BufLeave autocommands. +8 make a vimtutor script for Amiga and other systems. +7 Add the arguments for configure to the ":version" output? +7 When Vim detects a file is being edited elsewhere and it's a gvim session + of the same user it should offer a "Raise" button, so that the other gvim + window can be displayed. (Eduard) +8 Support saving and restoring session for X windows? It should work to do + ":mksession" and use "-S fname" for the restart command. The + gui_x11_wm_protocol_handler() already takes care of the rest. + global_event_filter() for GTK. + + +Tab pages: +9 GUI implementation for the tab pages line for other systems. +7 GUI: Control over the appearance of the text in the labels (bold, color, + font, etc.) +8 Make GUI menu in tab pages line configurable. Like the popup menu. +8 balloons for the tab page labels that are shortened to show the full path. +7 :tabdup duplicate the tab with all its windows. +7 Option to put tab line at the left or right? Need an option to specify + its width. It's like a separate window with ":tabs" output. +7 Add local variables for each tab page? +8 Add local options for each tab page? E.g., 'diffopt' could differ between + tab pages. +7 Add local highlighting for each tab page? +7 Add local directory for tab pages? How would this interfere with + window-local directories? + + +Spell checking: +- Support more regions? Caolan McNamara argues it's needed for es_XX. + https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=219777 +- Unicode defines another quote character: 0x2019. Use it as an equivalent + of a single quote, thus use it as a word character like a quote and match + with words, replacing the curly quote with a single quote. +- Could filter é things for HTML before doing spell checking. + Similarly for TeX. +- The Hungarian spell file uses four extra characters in the FOL/UPP/LOW + items than other spell files with the ISO-8859-2 encoding, that causes + problem when changing 'spelllang'. There is no obvious way to fix this. +- Considering Hunspell 1.1.4: + What does MAXNGRAMSUGS do? + Is COMPLEXPREFIXES necessary when we have flags for affixes? +- Support spelling words in CamelCase as if they were two separate words. + Requires some option to enable it. (Timothy Knox) +- There is no Finnish spell checking file. For openoffice Voikko is now + used, which is based on Malaga: http://home.arcor.de/bjoern-beutel/malaga/ + (Teemu Likonen) +8 ":mkspell" still takes much too long in Hungarian dictionary from + hunspell. Only solution appears to be to postpone secondary suffixes. +8 Handle postponed prefix with COMPOUNDPERMITFLAG or COMPOUNDFORBIDFLAG. + WFP_COMPPERMIT and WFP_COMPFORBID +8 implement use of <compoptions> in .spl file: + implement CHECKCOMPOUNDREP: when a compound word seems to be OK apply REP + items and check if the result is a valid word. + implement CHECKCOMPOUNDDUP + implement CHECKCOMPOUNDTRIPLE + Add CHECKCOMPOUNDCASE: when compounding make leading capital lower case. + How is it supposed to work? +- Add a command the repeats ]s and z=, showing the misspelled word in its + context. Thus to spell-check a whole file. +- suggestion for "KG" to "kg" when it's keepcase. +- For flags on affixes: Use a "AFFCOMPSET" flag; means the compound flags of + the word are not used. +- Support breakpoint character ? 0xb7 and ignore it? Makes it possible to + use same wordlist for hyphenation. +- Compound word is accepted if nr of words is <= COMPOUNDWORDMAX OR nr of + syllables <= COMPOUNDSYLMAX. Specify using AND in the affix file? +- NEEDCOMPOUND also used for affix? Or is this called ONLYINCOMPOUND now? + Or is ONLYINCOMPOUND only for inside a compound, not at start or end? +- Do we need a flag for the rule that when compounding is done the following + word doesn't have a capital after a word character, even for Onecap words? +- New hunspell home page: http://hunspell.sourceforge.net/ + - Version 1.1.0 is out now, look into that. + - Lots of code depends on LANG, that isn't right. Enable each mechanism + in the affix file separately. + - Example with compounding dash is bad, gets in the way of setting + COMPOUNDMIN and COMPOUNDWORDMAX to a reasonable value. + - PSEUDOROOT == NEEDAFFIX + - COMPOUNDROOT -> COMPOUNDED? For a word that already is a compound word + Or use COMPOUNDED2, COMPOUNDED3, etc. +- CIRCUMFIX: when a word uses a prefix marked with the CIRCUMFIX flag, then + the word must also have a suffix marked with the CIRCUMFIX flag. It's a + bit primitive, since only one flag is used, which doesn't allow matching + specific prefixes with suffixes. + Alternative: + PSFX {flag} {pchop} {padd} {pcond} {schop} {sadd}[/flags] {scond} + We might not need this at all, you can use the NEEDAFFIX flag and the + affix which is required. +- When a suffix has more than one syllable, it may count as a word for + COMPOUNDWORDMAX. +- Add flags to count extra syllables in a word. SYLLABLEADD1 SYLLABLEADD2, + etc.? Or make it possible to specify the syllable count of a word + directly, e.g., after another slash: /abc/3 +- MORPHO item in affix file: ignore TAB and morphological field after + word/flags and affix. +- Implement multiple flags for compound words and CMP item? + Await comments from other spell checking authors. +- Also see tklspell: http://tkltrans.sourceforge.net/ +8 Charles Campbell asks for method to add "contained" groups to existing + syntax items (to add @Spell). + Add ":syntax contains {pattern} add=@Spell" command? A bit like ":syn + cluster" but change the contains list directly for matching syntax items. +- References: MySpell library (in OpenOffice.org). + http://spellchecker.mozdev.org/source.html + http://whiteboard.openoffice.org/source/browse/whiteboard/lingucomponent/source/spellcheck/myspell/ + author: Kevin Hendricks <kevin.hendricks@sympatico.ca> +8 It is currently not possible to mark "can not" as rare, because "can" and + "not" are good words. Find a way to let "rare" overrule "good"? +8 Make "en-rare" spell file? Ask Charles Campbell. +8 The English dictionaries for different regions are not consistent in their + use of words with a dash. +7 Insert mode completion mechanism that uses the spell word lists. +8 Add hl groups to 'spelllang'? + :set spelllang=en_us,en-rare/SpellRare,en-math/SpellMath + More complicated: Regions with different languages? E.g., comments + in English, strings in German (po file). + + +Diff mode: +9 Instead invoking an external diff program, use builtin code. One can be + found here: http://www.ioplex.com/~miallen/libmba/dl/src/diff.c + It's quite big and badly documented though. +8 Use diff mode to show the changes made in a buffer (compared to the file). + Use an unnamed buffer, like doing: + new | set bt=nofile | r # | 0d_ | diffthis | wincmd p | diffthis + Also show difference with the file when editing started? Should show what + can be undone. (Tom Popovich) +7 Add cursor-binding: when moving the cursor in one diff'ed buffer, also + move it in other diff'ed buffers, so that CTRL-W commands go to the same + location. + + +Folding: + (commands still available: zI zJ zK zp zP zq zQ zV zy zY; + secondary: zB zS zT zZ, z=) +8 Vertical folds: looks like vertically split windows, but the cursor moves + through the vertical separator, separator moves when scrolling. +8 Add "z/" and "z?" for searching in not folded text only. +9 Add search pattern item to only match in closed or open fold and/or fold + with certain level. Allows doing ":g/pat/cmd" to work on closed folds. +8 When a closed fold is displayed open because of 'foldminlines', the + behavior of commands is still like the fold is closed. How to make the + user aware of this? +8 Add an option 'foldskip' with values like 'foldopen' that specifies which + commands skip over a closed fold. +8 "H" and "L" count buffer lines instead of window lines. (Servatius Brandt) +8 Add a way to add fold-plugins. Johannes Zellner has one for VB. +7 When using manual folding, the undo command should also restore folds. +- Allow completely hiding a closed fold. E.g., by setting 'foldtext' to an + empty string. Require showing a character in 'foldcolumn' to avoid the + missing line goes unnoticed. + How to implement this? +- When pressing the down arrow of a scrollbar, a closed fold doesn't scroll + until after a long time. How to make scrolling with closed folds + smoother? +- When creating a session, also store folds for buffers in the buffer list, + using the wininfo in wi_folds. +- When currently editing the first file in the argument list the session + file can contain: + args version.c main.c + edit version.c + Can editing version.c twice be avoided? +- 'foldmethod' "textobject": fold on sections and paragraph text objects. +- "zuf": undo change in manual fold. "zUf" redo change in manual fold. How + to implement this? +- "zJ" command: add the line or fold below the fold in the fold under the + cursor. +- 'foldmethod' "syntax": "fold=3" argument: set fold level for a region or + match. +- Apply a new foldlevel to a range of lines. (Steve Litt) +8 Have some way to restrict commands to not folded text. Also commands like + searches. + + +Multi-byte characters: +- When editing a file with both utf-8 and latin1 text Vim always falls back + to latin1. Add a command to convert the latin1 characters to utf-8? + :unmix utf-8,latin1 filename + Would only work when 'encoding' is utf-8. +9 When the tail byte of a double-byte character is illegal (e.g., a CR), the + display is messed up (Yasuhiro Matsumoto). Should check for illegal + double-byte characters and display them differently (display each single + byte). +9 'fenc' in modeline problem: add option to reload the file when 'fenc' is + set to a different value in a modeline? Option can be default on. Could + it be done with an autocommand? +8 Add an item in 'fileencodings' to check the first lines of a file for + the encoding. See Python PEP: http://www.python.org/peps/pep-0263.html. + To avoid getting a wrong encoding only accept something Emacs-like: + "-*- coding: enc-na_me.foo -*-" and "-*- coding= enc-na_me.foo -*-" + Match with "-\*-\s*coding[:=]\s*\([::word::-_.]\+\)\s*-\*-" and use first + item. +8 Add an item in 'fileencodings' to check the first line of an XML file for + the encoding. <?xml version="1.0" encoding="UTF-8"?> Or "charset=UTF-8"? + For HTML look for "charset=utf-8". +8 The quickfix file is read without conversion, thus in 'encoding'. Add an + option to specify the encoding of the errorfile and convert it. Also for + ":grep" and ":helpgrep". + More generic solution: support a filter (e.g., by calling a function). +8 When a file was converted from 'fileencoding' to 'encoding', a tag search + should also do this on the search pattern. (Andrzej M. Ostruszka) +8 When filtering changes the encoding 'fileencoding' may not work. E.g., + when using xxd and 'fileencoding' is "utf-16". Add an option to set a + different fileencoding for filter output? +7 When converting a file fails, mention which byte could not be converted, + so that the user can fix the problem. +8 Add configure option to be able to disable using the iconv library. (Udo + Schweigert) +9 'aleph' should be set to 1488 for Unicode. (Zvi Har'El) +8 Should add test for using various commands with multi-byte characters. +8 'infercase' doesn't work with multi-byte characters. +8 toupper() function doesn't handle byte count changes. +7 Searching and composing characters: + When searching, should order of composing characters be ignored? + Add a special item to match with a composing character, so that composing + characters can be manipulated. +8 Should implement 'delcombine' for command line editing. +8 Detect overlong UTF-8 sequences and handle them like illegal bytes. +8 ":s/x/\u\1/" doesn't work, making uppercase isn't done for multi-byte + characters. +8 UTF-8: "r" in Visual mode doesn't take composing characters. +8 UTF-8: When there is a precomposed character in the font, use it instead + of a character and a composing character. See xterm for an example. +7 When a character can't be displayed, display its digraph instead. + 'display' option to specify this. +7 Use ideas for nl_langinfo() from Markus Kuhn in enc_default(): + (www.cl.cam.ac.uk/~mgk25/ucs/langinfo.c) +- GTK and Win32: Allow selecting fonts for 'guifontset' with the + fontselector somehow. +- GTK and Win32: make it possible to set the font for the menu to make it + possible to have 'encoding' different from the current locale. +- dbcs_class() only works for Japanese and Korean. Implement this for + other encodings. The "euc-jp" and "euc-kr" choices might be wrong. +- Find some way to automatically select the right GUI font or fontset, + depending on the default value of 'encoding'. + Irrelevant in the GTK+ 2 GUI so long as UTF-8 is used. + For Windows, the charset_pairs[] table could be used. But how do we know + if a font exists? +- Do keyboard conversion from 'termencoding' to 'encoding' with + convert_input() for Mac GUI. +- Add mnemonics from RFC1345 longer than two characters. + Support CTRL-K _{mnemonic}_ +7 In "-- INSERT (lang) --" show the name of the keymap used instead of + "lang". (Ilya Dogolazky) +- Make 'breakat' accept multi-byte characters. Problem: can't use a lookup + table anymore (breakat_flags[]). + Simplistic solution: when 'formatoptions' contains "m" also break a line + at a multi-byte character >= 0x100. +- Add the possibility to enter mappings which are used whenever normal text + could be entered. E.g., for "f" command. But not in Normal mode. Sort + of opposite of 'langmap'. Use ":tmap" command? +- When breaking a line, take properties of multi-byte characters into + account. The "linebreak" program from Bruno Haible can do it: + ftp://ftp.ilog.fr/pub/Users/haible/gnu/linebreak-0.1.tar.gz + But it's very complicated... + + +Printing: +7 Implement "undercurl" for printing. +- Add "page width" to wrap long lines. +- Win32: use a font dialog for setting 'printfont'. Can reuse the code for + the 'guifont' dialog, put the common code in a separate function. +- Add the file timestamp to the page header (with an option). (George + Reilly) +- Win32: when 'printfont' is empty use 'guifont'. +- Unix: Use some dialog box to do the obvious settings (paper size, printer + name, portrait/landscape, etc). +- PostScript: Only works for text that can be converted to an 8-bit + character set. How to support Unicode fully? +- Allow specifying the paper size, instead of using a standard size. Same + units as for the margins. +- Support right-to-left text? +8 Make the foreground color darkening function preserve the hue of the + color. + + +Syntax highlighting: +8 Make ":syn off" use 'runtimepath' instead of $VIMRUNTIME. (Gary Johnson) + Should do the same for ":syn on" and ":syn manual". +8 Support "containedin" argument for ":syn include", so that the defined + cluster can be added to existing syntax items. +8 C syntax: Don't highlight {} as errors inside () when used like this: + "({ something })", often used in GCC code. +7 Add a "startgroup" to a region. Used like "nextgroup" inside the region, + preferred item at the start of the region. (Charles Campbell) +8 When editing a new file without a name and giving it a name (by writing + it) and 'filetype' is not set, detect the filetype. Avoid doing it for + ":wq file". +7 For "nextgroup" we have skipwhite, skipnl and skipempty. It would be + really nice to be able to skip with a pattern. Or skip with a syntax + group. (Nikolai Weibull, 2007 Feb 27) +8 Make conversion to HTML faster (Write it in C or pre-compile the script). +9 There is still a redraw bug somewhere. Probably because a cached state is + used in a wrong way. I can't reproduce it... +7 Be able to change only the background highlighting. Useful for Diff* and + Search highlighting. +7 When 'number' is set highlight the number of the current line. + Must be enabled with an option, because it slows down display updating. +8 Allow the user to add items to the Syntax menu sorted, without having to + change this for each release. +8 Add a "matchcontains" for regions: items contained in the start or end + pattern, but not in the body. +8 Add a "keepend-contained" argument: Don't change the end of an item this + one is contained in. Like "keepend" but specified on the contained item, + instead of the containing item. +8 cpp.vim: In C++ it's allowed to use {} inside (). +8 Some syntax files set 'iskeyword'. When switching to another filetype + this isn't reset. Add a special keyword definition for the syntax rules? + When this is done, use vim.vim syntax highlighting for help file examples, + but without ":" in 'iskeyword' for syntax. + Also need a separate 'iskeyword' for the command line, e.g., in a help + window ":e /asdf/asdf/" CTRL-W works different. +8 Add specific syntax item to match with parens/braces that don't have a + "%" match. :syntax nomatch cMatchError (,{,[,),},] [contained] +8 Highlight the text between two matching parens (e.g., with a grey + background) when on one of the parens or in between them. + Option for the matchparen plugin? +8 When using a cterm, and no ctermfg or ctermbg are defined, use start/stop + sequences. Add remark in docs that :if 'term' == "term-name" should be + used. +8 Add @spell cluster to String and Comment groups for many languages. Will + allow spell checking. (Fleiner) +8 When listing syntax items, try to sort the keywords alphabetically. And + re-insert the [] if possible. +8 Make it possible to use color of text for Visual highlight group (like for + the Cursor). +8 It would be useful to make the highlight group name an expression. Then + when there is a match, the expression would be evaluated to find out what + highlight group to use. Could be used to check if the shell used in a + password file appears in /etc/shells. (Nikolai Weibull) + syn match =s:checkShell(v:match) contained 'pattern' +8 Make it possible to only highlight a sub-expression of a match. Like + using "\1" in a ":s" command. +8 Support for deleting syntax items: + :syn keyword cTodo remove this + :syn match cTodo remove "pattern" + :syn region cString remove start="this" end="that" +8 Add possibility to sync on something else, when the syncing in one way + doesn't find match. For HTML: When no {script} is found, try looking for + a '<'. (Fleiner) +7 Replace the synchronizing method with a state machine specification? + Should be able to start at any line in the file, search forwards or + backwards, and use the result of matching a pattern. +7 Use parsing like awk, so that e.g., a ( without a matching ) can be + detected. +8 Make it possible to use "inverted" highlighting, invert the original + character. For Visual mode. (xterm-selection already does this). +8 Highlight non-printable characters with "SpecialChar", linked to + "Special". Display them with the digraph characters, if possible. +8 Highlight the clipboard-selection with a highlight group. +8 Be able to reset highlighting to its original (default) values. +7 Be able to write current highlighting to a file as commands, similar to + ":mkvimrc". +8 Improve c.vim: + - Add check for unterminated strings, with a variable to switch it on: + "c_strict_ansi". + - Detect unbalanced "#endif". Requires looking back a long way... +8 Add an option to restrict the updating of syntax highlighting to the + current line while in Insert mode. +8 When guessing value of 'background', the syntax file has already been + loaded (from the .gvimrc). After changing 'background', load it again? +8 Add ":syn resync" command, to re-parse the whole file until the current + display position. +8 Should support "me" offset for a region start pattern. To be used to + allow searching for the end pattern inside the match of the end pattern. + Example: syn region pikeXX start="([^{]" end=")" should work on "()". +8 When using a regexp for "contains=", should delay matching with it until + redrawing happens. Set a flag when a group is added, check this flag when + highlighting starts. +8 Some terminals can display colors like the GUI. Add some setting to use + GUI colors for the terminal? With something to define the escape + sequence. +7 It's possible for an item to be transparent, so that the colors of an item + lower on the stack is used. Also do this with highlighting, so that the + user can set transparent highlighting? E.g. a number in a C comment would + get the color of a comment, a number in an assignment Normal. (Nikolai + Weibull) +7 Add "semitrans": Add highlighting. E.g., make the text bold, but keep the + colors. And add colors, so that Green+Red becomes Yellow. + E.g. for this html: + <B> bold text <I> italic+bold text </B> italic text </I> +7 CTRL-] checks the highlight group for finding out what the tag is. +7 Add an explanation how a list of words can be used to highlight misspelled + words. +8 Add more command line completion for :syntax. +8 Add more command line completion for :highlight. +7 Should find a better way to parse the :syntax and :highlight commands. + Use tables or lists that can be shared by parsing for execution and + completion? +8 Add ColorSchemePost autocommand event, so that scripts can set up their + highlighting. (Salman Halim) +7 Add a few sets of colors (e.g. Borland Turbo C one). With a menu to + select one of the sets. +8 Add offsets to sub-matches: "\(a*\) *"he=e1-1 + 'e' is end of match 'e1' is end of sub-match 1, 's2' is start of submatch + 2, etc. +8 In Insert mode, when there are typeahead characters, postpone the + highlighting (for "." command). +8 Syncing on comments isn't 100% correct when / / lines mix with / * and * /. + For example: What about a line that starts with / / and contains * /? +8 Ignore / * and * / inside strings, when syncing. +7 Build a few more syntax files from the file "/usr/share/misc/vgrindefs": + ISP, LDL, Icon, ratfor. And check "nedit/source/highlight.c". +6 Add possibility to have background color continue until the right edge of + the window. Useful for comment blocks and function headings. (Rogall) +- Make it possible to add "contains" items for all items in a group. Useful + when extending an already existing syntax file. +- Add line-continuation pattern for non-syncing items too? +- Add possibility to highlight the whole line, including the right margin + (for comment blocks). +- Add 'hlmatch' option: List of flags: + 'c': highlight match for character under the cursor. + 'b': highlight the previous (, and its match. + 'a': highlight all text from the previous ( until its match. + Also for {}, <>, etc.? + 'e': highlight all braces without a match (slow?) + OR: add an argument "cursor" to the syntax command, which means that the + region/match/keyword is only highlighted when the cursor is on it. + (Campbell) + Or do it like Elvis: define text objects and how to highlight them around + the cursor. (Iain Truskett) +7 Make it possible to use all words in the tags files as Keyword. + Can also be done with a script (but it's slow). +7 Make it possible to call a ":" command when a match is found. Should + allow for adding keywords from the text (e.g. variables that are set). + And allows for sections with different highlighting. +7 Add highlight group for commandline: "Commandline". Make sure it + highlights the command line while typing a command, and any output from + messages. And external commands? +8 Make a version that works like less, but with highlighting: read stdin for + text, exit at end of file, don't allow editing, etc. moreim? lessim? +7 SpecialKey highlighting overrules syntax highlighting. Can't give an + unprintable char another color. Would be useful for ^M at end of line. + + +Built-in script language: +8 Make the filename and line number available to script functions, so that + they can give useful debugging info. The whole call stack would be ideal. + At least use this for error messages. +7 Execute a function with standard option values. No need to save and + restore option values. Especially useful for new options. Problem: how + to avoid a performance penalty (esp. for string options)? +8 Add referring to key options with "&t_xx". Both for "echo &t_xx" and + ":let &t_xx =". Useful for making portable mappings. +- Add ":let var ?= value", conditional assignment. Patch by Dave Eggum, + 2006 Dec 11. +- range for ":exec", pass it on to the executed command. (Webb) +8 ":{range}source": source the lines from the current file. + You can already yank lines and use :@" to execute them. + Most of do_source() would not be used, need a new function. + It's easy when not doing breakpoints or profiling. + Requires copying the lines into a list and then creating a function to + execute lines from the list. Similar to getnextac(). +7 ":include" command: just like ":source" but doesn't start a new scriptID? + Will be tricky for the list of script names. +8 Have a look at VSEL. Would it be useful to include? (Bigham) +8 Add ":fungroup" command, to group function definitions together. When + encountered, all functions in the group are removed. Suggest using an + obscure name to avoid name clashes. Require a ":fungroup END" in the same + sourced file? Assume the group ends at the end of the file. Handle + nested packages? + Alternative: Support packages. {package-name}:{function-name}(). + Packages are loaded automatically when first used, from + $VIMRUNTIME/packages (or use a search path). +7 Pre-parse or compile Vim scripts into a bytecode. + 1. Put the bytecode with the original script, with an ":if + has('bytecode')" around it, so that it's only used with a Vim that + supports it. Update the code with a command, can be used in an + autocommand. + 2. Use a ".vic" file (like Python use .pyc). Create it when writing a + .vim file. Problem: distribution. + 3. Use a cache directory for each user. How to recognize which cached + file belongs to a sourced script? +7 Add argument to winwidth() to subtract the space taken by 'foldcolumn', + signs and/or 'number'. +6 Add ++ and -- operators? They only work on variables (lvals), how to + implement this? +8 Add functions: + has(":command") Check if ":command" works. compare function + with "ex_ni". E.g. for ":simalt". + system() With a List argument. Bypasses the shell, use + exec() directly. (Bob Hiestand) + escape() Add argument to specify what to escape with. + modestack() Instead of just the current mode return the + stack of Insert / CTRL-O / :normal things. + realname() Get user name (first, last, full) + user_fullname() patch by Nikolai Weibull, Nov + 3 2002 + Only add this when also implemented for + non-Unix systems, otherwise a shell cmd could + be used. + get_user_name() gets login name. + menuprop({name}, {idx}, {what}) + Get menu property of menu {name} item {idx}. + menuprop("", 1, "name") returns "File". + menuprop("File", 1, "n") returns "nmenu + File.Open..." argument. + Patch by Ilya Sher, 2004 Apr 22 + Return a list of menus and/or a dictionary + with properties instead. + mapname({idx}, mode) return the name of the idx'th mapping. + Patch by Ilya Sher, 2004 Mar 4. + Return a list instead. + char2hex() convert char string to hex string. + crypt() encrypt string + decrypt() decrypt string + base64enc() base 64 encoding + base64dec() base 64 decoding + attributes() return file protection flags "drwxrwxrwx" + filecopy(from, to) Copy a file + shorten(fname) shorten a file name, like home_replace() + perl(cmd) call Perl and return string + inputrl() like input() but right-to-left + typed() return the characters typed and consumed (to + find out what happened) + virtualmode() add argument to obtain whether "$" was used in + Visual block mode. + getacp() Win32: get codepage (Glenn Maynard) + deletebufline() delete line in any buffer + appendbufline() append line in any buffer + libcall() Allow more than one argument. + libcallext() Like libcall(), but using a callback function + to allow the library to execute a command or + evaluate an expression. +7 Make bufname("'0") return the buffer name from mark '0. How to get the + column and line number? col("'0") currently returns zero. +8 argc() returns 0 when using "vim -t tag". How to detect that no file was + specified in any way? To be able to jump to the last edited file. +8 Pass the command line arguments to Vim scripts in some way. As v:args + List? Or extra parameter to argv()? +8 Add command arguments with three dashes, passed on to Vim scripts. +7 Add optional arguments to user functions: + :func myFunc(arg1, arg2, arg3 = "blah", arg4 = 17) +6 User functions: Functions local to buffer "b:func()"? +8 For Strings add ":let var[{expr}] = {expr}". When past the end of "var" + just ignore. +8 The "= register should be writable, if followed by the name of a variable, + option or environment variable. +8 ":let &option" should list the value of the option. +8 ":let Func().foo = value" should work, also when "foo" doesn't exist. + Also: ":let Func()[foo] = value" should work. Same for a List. +7 Add synIDlist(), making the whole list of syntax items on the syntax stack + available as a List. +8 Add autocommand-event for when a variable is changed: + :au VarChanged {varname} {commands} +8 Add "has("gui_capable")", to check if the GUI can be started. +8 Add possibility to use variables like registers: characterwise (default), + linewise (when ending in '\n'), blockwise (when ending in '\001'). reg0, + rega, reg%, etc. Add functions linewise({expr}), blockwise({expr}) and + charwise({expr}). +7 Make it possible to do any command on a string variable (make a buffer + with one line, containing the string). Maybe add an (invisible) scratch + buffer for this? + result = scratch(string, command) + result = apply(string, command) + result = execute(string, command) + "command" would use <> notation. + Does scratch buffer have a number? Or re-use same number? +7 Add function to generate unique number (date in milliseconds). + + +Robustness: +6 Add file locking. Lock a file when starting to edit it with flock() or + fcntl(). This patch has advisory file locking while reading/writing + the file for Vim 5.4: ~/vim/patches/kahn_file_locking . + The patch is incomplete (needs support for more systems, autoconf). + Andy doesn't have time to work on it. + Disadvantage: Need to find ways to gracefully handle failure to obtain a + lock. When to release a lock: When buffer is unloaded? + + +Performance: +7 For string variables up to 3 bytes don't allocate memory, use v_list + itself as a character array. Use VAR_SSTRING (short string). +7 Add 'lazysize' option: Above this size Vim doesn't load everything before + starting to edit a file. Things like 'fileencodings' only work up to this + size, modelines only work at the top. Useful for large log files where + you only want to look at the first few pages. Use zero to disable it. +8 move_lines() copies every line into allocated memory, making reloading a + buffer a lot slower than re-editing the file. Can the memline be locked + so that we don't need to make a copy? Or avoid invoking ml_updatechunk(), + that is taking a lot of time. (Ralf Wildenhues, 2008 Jul 7) + With a patch, but does it work? +8 Instead of loading rgb.txt every time a color wasn't recognized load it + once and keep it in memory. Move the code to a common place to avoid + repeating it in various system files. +8 Turn b_syn_ic and b_syn_containedin into b_syn_flags. +9 Loading menu.vim still takes quite a bit of time. How to make it faster? +8 in_id_list() takes much time for syntax highlighting. Cache the result? +7 setpcmark() shifts the jumplist, this takes quite a bit of time when + jumping around. Instead use an index for the start? +8 When displaying a space with only foreground highlighting, it's the same + as a space without attributes. Avoid displaying spaces for the "~" lines + when starting up in a color terminal. +8 Avoid alloc() for scratch buffer use, esp. in syntax.c. It's very slow on + Win16. +8 Profiling shows that in_id_list() is used very often for C code. Can this + function be improved? +8 For an existing file, the page size of the swap file is always the + default, instead of using the block size of the device, because the swap + file is created only after setting the block size in mf_open(). How can + this be improved? +8 Set default for 'ttyscroll' to half a screen height? Should speed up + MS-DOS version. (Negri) +7 C syntax highlighting gets a lot slower after ":set foldmethod=syntax". + (Charles Campbell) Inserting a "{" is very slow. (dman) +7 HTML syntax highlighting is slow for long lines. Try displaying + http://www.theregister.co.uk/content/4/22908.html. (Andre Pang) +7 Check how performance of loading the wordlist can be improved (adding a + lot of abbreviations). +7 MS-DOS console: Add t_DL support, to make scrolling faster. +7 Compile Ex commands to byte codes. Store byte codes in a vim script file + at the end, after "compiled:. Make it look like a single comment line + for old Vim versions. Insert first line "Vim script compiled <timestamp>. + Only used compiled code when timestamp matches the file stat. + Add command to compile a vim script and add it to the file in-place. + Split Ex command executing into a parsing and executing phase. + Use compiled code for functions, while loops, etc. +8 When defining autocommands (e.g., from $VIMRUNTIME/filetype.vim), need to + compare each pattern with all existing patterns. Use a hash code to avoid + using strcmp() too often? +7 Include turbo_loader patches, speeding up reading a file? + Speed up reading a file by reading it into a fixed-size buffer, creating + the list of indexes in another buffer, and then copying the result into a + memfile block with two copies. Then read the next block into another + fixed-size buffer, create the second list of indexes and copy text from + the two blocks to the memfile block. +7 do_cmdline(): Avoid that the command line is copied to allocated memory + and freed again later all the time. For while loops, and for when called + with an argument that can be messed with. + Generic solution: Make a struct that contains a pointer and a flag that + indicates if the pointer should be freed when replaced. +7 Check that the file size is not more than "sizeof(long)". +- Further improve finding mappings in maphash[] in vgetorpeek() +8 Syntax highlighting is slow when deleting lines. Try in + $VIMRUNTIME/filetype.vim. +- "out of memory" after deleting (1,$d) and changing (:%s/^/> /) a lot of + lines (27000) a few times. Memory fragmentation? +- Have a look at how pdksh does memory allocation (alloc.c). (Dalecki) +- Do profiling on: + - :g/pat/normal cmd + - 1000ii<Esc> + - deleting 10Mbyte worth of lines (netscape binary) + - "[i" and "[d" (Yegappan Lakshmanan) + - ":g/^/m0" on a 450Kbyte file. And the "u". + - highlighting "~/vim/test/longline.tex", "~/vim/test/scwoop.tcl" and + "~/vim/test/lockup.pl". + - loading a syntax file to highlight all words not from a dictionary. + - editing a Vim script with syntax highlighting on (loading vim.vim). +7 Screen updating can be further improved by only redrawing lines that were + changed (and lines after them, when syntax highlighting was used, and it + changed). + - On each change, remember start and end of the change. + - When inserting/deleting lines, remember begin, end, and line count. +- Use macros/duarte/capicua for profiling. Nvi 1.71 is the fastest! +- When using a file with one long line (1Mbyte), then do "$hhhh", is still + very slow. Avoid calling getvcol() for each "h"? +- Executing a register, e.g. "10000@@" is slow, because ins_typebuf has to + move the previous commands forward each time. Pass count from + normal_cmd() down to do_execreg(). +- Repeating insert "1000i-<Esc>" displays --INSERT-- all the time, because of + the <Esc> at the end. Make this work faster (disable redrawing). +- Avoid calls to plines() for cursor line, use w_cline_height. +- After ":set nowrap" remove superfluous redraw with wrong hor. offset if + cursor is right of the screen. +8 Make CTRL-C on Unix generate a signal, avoid using select() to check for a + CTRL-C (it's slow). + + +Code size: +8 GUI: When NO_CONSOLE is defined, more code can be excluded. +- Put getline() and cookie in a struct, so only one argument has to be + passed to do_cmdline() and other functions. +8 Make a GUI-only version for Unix? +8 In buf_write _() isn't needed when setting errmsg, do it once when using + it. +7 When compiling with a GUI-only version, the code for cterm colors can be + left out. +8 When compiled with a GUI-only version, the termcap entries for terminals + can be removed. +8 Can the check for libelf in configure.in be removed? + + +Messages: +8 When using ":q" in a changed file, the error says to "add !". Add the + command so that beginners understand it: "use :q!". +8 For 'verbose' level 12 prints commands from source'ed files. How to skip + lines that aren't executed? Perhaps move the echoing to do_cmdline()? +8 Use 'report' for ":bdel"? (Krishna) To avoid these messages when using a + script. +- Delete message after new command has been entered and have waited for key. + Perhaps after ten seconds? +- Make message history available in "msg" variables: msg1, msg2, .. msg9. +8 When reading from stdin allow suppressing the "reading from stdin" + message. +9 Check handling of overwriting of messages and delays: + Very wrong: errors while redrawing cause endless loop. + When switching to another file and screen scrolls because of the long + message and return must be typed, don't scroll the screen back before + redrawing. +8 When address range is wrong you only get "Invalid range". Be a bit more + specific: Negative, beyond last line, reverse range? Include the text. +8 Make it possible to ignore errors for a moment ('errorignore'?). Another + option to switch off giving error messages ('errorquiet'?). Also an option + not to give any messages ('quiet')? Or ":quiet on", ":quiet off". + Careful: For a severe error (out of memory), and when the user starts + typing, error messages must be switched back on. + Also a flag to ignore error messages for shell commands (for mappings). +- Option to set time for emsg() sleep. Interrupt sleep when key is typed? + Sleep before second message? +8 In Ex silent mode or when reading commands from a file, what exactly is + not printed and what is? Check ":print", ":set all", ":args", ":vers", + etc. At least there should be no prompt. (Smulders) And don't clear the + screen when reading commands from stdin. (Kendall) + --> Make a difference between informative messages, prompts, etc. and + error messages, printing text, etc. +8 Window should be redrawn when resizing at the hit-enter prompt. + Also at the ":tselect" prompt. Find a generic solution for redrawing when + a prompt is present (with a callback function?). + + +Screen updating: +7 Add a string to the 'display' option to make CTRL-E and CTRL-Y scroll one + screen line, also if this means the first line doesn't start with the + first character (like what happens with a single line that doesn't fit). +- screen_line(): + - insert/delete character stuff. + - improve delete rest of line (spaces at end of line). +- When moving or resizing window, try to avoid a complete redraw (esp. when + dragging the status line with the mouse). +- When 'lazyredraw' set, don't echo :ex commands? Need a flag to redraw when + waiting for a character. +8 Add a ":refresh [winnr]" command, to force updating a window. Useful from + an event handler where ":normal" can't be used. Also useful when + 'lazyredraw' is set in a mapping. +7 Make 'list' and 'linebreak' work together. + + +Scrolling: +8 Add "zy" command: scroll horizontally to put the cursor in the middle. +6 Add option to set the overlap for CTRL-F and CTRL-B. (Garhi) +- extend 'scrollbind' option: 'scrollopt' words "search", "relative", etc.. + Also 'e'xecute some commands (search, vertical movements) in all bound + windows. +7 Add 'scrollbind' feature to make the offset of one window with the next + one equal to the window height. When editing one file in both windows it + looks like each window displays a page of the buffer. +- Allow scrolling by dragging with the mouse (grab a character and move it + up/down). Like the "hand" in Acrobat reader. Use Alt-LeftMouse for this? + (Goldfarb) +- Add command to execute some commands (search, vertical movements) in all + bound windows. +- Add 'search' option to 'scrollopt' to allow 'scrollbind' windows to + be bound by regexp searches +- Add "z>" and "z<": scroll sideways one screenful. (Campbell) +- Add option to set the number of lines when not to scroll, instead of the + fixed number used now (for terminals that scroll slow with a large number + of lines but not with a single line). + + +Autoconf: +8 Should use acconfig.h to define prototypes that are used by autoheader. +8 Some compilers don't give an error for "-OPT:Olimit" but a warning. (Webb) + Add a check for the warning, so that "Olimit" can be added automatically? +- Autoconf: Use @datadir@ for the system independent files. Make sure the + system dependent and system independent files are separated. (Leitner). +- Add autoconf check for waitpid()/wait4(). +- Remove fcntl() from autoconf, all systems have it? +- Set default for 'dictionary', add search for dictionary to autoconf. + + +Perl interface: +8 Rename typemap file to something else? +7 Make buffers accessed as Perl arrays. (Clark) +7 Make it possible to compile with non-ANSI C? +6 Tcl/Tk has the "load" command: load a shared library (.so or .dll). + + +Shared libraries: +6 Add support for loading shared libraries, and calling functions in it. + :libload internal-name libname + :libunload internal-name + :liblist + :libcall internal-name function(arg1, arg2, ...) + :libcall function(arg1, arg2, ...) + libcall() can have only one integer or String argument at the moment. +6 Have a look on how Perl handles loading dynamic libraries. + + +Tags: +9 With ":set tags=./tags,../tags" and a tag appears in both tags files it is + added twice. Requires figuring out the actual file name for each found + match. Remove tag_fname from the match and combine it with the fname in + the match (without expanding or other things that take time). When + 'tagrelative' is off tag_fname isn't needed at all. +8 For 'tags' wildcard in the file name is not supported, only in the path. + This is due to it using |file-searching|. Suboptimal solution would be to + make the filename or the whole option use |wildcards| globing, better + would be to merge the 2 kinds of globing. originally (Erik Falor, 2008 + April 18), updated (Ian Kelling, 2008 July 4) +7 Can CTRL-] (jump to tag) include a following "." and "->" to restrict the + number of possible matches? Check tags file for an item that has members. + (Flemming Madsen) +8 Scope arguments for ":tag", e.g.: ":tag class:cPage open", like Elvis. +8 When output of ":tselect" is long, getting the more-prompt, should be able + to type the tag number directly. +7 Add the possibility to use the "-t {tag}" argument multiple times. Open a + window for each tag. +7 Make output of ":tselect" a bit nicer. Use highlighting? +7 Highlight the "tag 1 of >2" message. New highlight group, or same as "hit + bottom" search message. +7 When using ":tag" at the top of the tag stack, should add another entry, + so CTRL-T can bring you back to where you are now AND to where you were + before the previous ":tag" command. (Webb) +- When doing "[^I" or "[^D" add position to tag stack. +- Add command to put current position to tag stack: ":tpush". +- Add functions to save and restore the tag stack? Or a command to switch + to another tag stack? So that you can do something else and come back to + what you were working on. +7 When using CTRL-] on someClass::someMethod, separate class from method and + use ":ta class:someClass someMethod". + Include C++ tags changes (Bertin). Change "class::func" tag into "func" + with "class=class"? Docs in oldmail/bertin/in.xxx. +7 Add ":tagargs", to set values for fields: + :tagargs class:someclass file:version.c + :tagargs clear + These are then the default values (changes the order of priority in tag + matching). +7 Support for "gtags" and "global"? With ":rtag" command? + There is an example for how to do this in Nvi. + Or do it like Elvis: 'tagprg' and 'tagprgonce' options. (Yamaguchi) + The Elvis method is far more flexible, do it that way. +7 Support "col:99" extra field, to position the cursor in that column. With + a flag in 'cpoptions' to switch it off again. +7 Better support for jumping to where a function or variable is used. Use + the id-utils, with a connection to "gid" (Emacs can do it too). Add + ":idselect", which uses an "ID" database (made by "mkid") like "tselect". + + +Win32 GUI: +8 Make debug mode work while starting up (vim -D). Open console window for + the message and input? +7 GvimExt: when there are several existing Vims, move the list to a submenu. + (Mike McCollister) +8 When using "Edit with Vim" for one file it changes directory, when several + files are selected and using "Edit with single Vim" the directory isn't + changed. At least change directory when the path is the same for all + files. Perhaps just use the path of the first file or use the longest + common part of the path. +8 Add font argument to set the lfCharSet. (Bobcik) +8 Somehow automatically detect the system language and set $LANG, so that + gettext and menus work. +8 Could keep console open to run multiple commands, to avoid the need to hit + return in every console. + Also: Look at how Emacs does run external commands: + http://www.cs.washington.edu/homes/voelker/ntemacs.html. +8 Need a separate PopUp menu for modeless selection. Need two new commands: + Copy selection to clipboard, Paste selection (as typed text). +8 Support copy/paste for other file formats. At least HTML, perhaps RTF. + Add "copy special" and "paste special" commands? +7 Use different default colors, to match the current Windows color scheme. + Sys_WindowText, Sys_Window, etc. (Lionel Schaffhauser) +7 Use <C-Tab> to cycle through open windows (e.g., the find dialog). +7 <Esc> should close a dialog. +7 Keep the console for external commands open. Don't wait for a key to be + hit. Re-open it when the user has closed it anyway. Or use a prepended + command: ":nowait {cmd}", or ":quiet", which executes {cmd} without any + prompts. +7 Should be able to set an option so that when you double click a file that + is associated with Vim, you can either get a new instance of Vim, or have + the file added into an already running Vim. +7 The "-P" argument only works for the current codepage. Use wide + functions to find the window title. + + +GUI: +8 Make inputdialog() work for Photon, Amiga. +- <C--> cannot be mapped. Should be possible to recognize this as a + normal "-" with the Ctrl modifier. +7 Implement ":popup" for other systems than Windows. +8 Implement ":tearoff" for other systems than Win32 GUI. +6 Implement ":untearoff": hide a torn-off menu. +8 When using the scrollbar to scroll, don't move the cursor position. When + moving the cursor: scroll to the cursor position. +9 Make <S-Insert> paste from the clipboard by default. (Kunze) +7 Menu local to a buffer, like mappings. Or local to a filetype? +8 In Buffers menu, add a choice whether selecting a buffer opens it in the + current window, splits the window or uses ":hide". +8 Dragging the mouse pointer outside of a Vim Window should make the text + scroll. Return a value from gui_send_mouse_event() to the machine + specific code to indicate the time in which the event should be repeated. +8 Make it possible to ignore a mouse click when it's used to give Vim (gvim) + window focus. Also when a mouse click is used to bring a window to front. +8 Make the split into system independent code and system specific code more + explicit. There are too many #ifdefs in gui.c. + If possible, separate the Vim code completely from the GUI code, to allow + running them in separate processes. +7 X11: Support cursorColor resource and "-cr" argument. +8 X11 (and others): CTRL-; is not different from ';'. Set the modifier mask + to include CTRL for keys where CTRL produces the same ASCII code. +7 Add some code to handle proportional fonts on more systems? Need to draw + each character separately (like xterm). Also for when a double-width font + is not exactly double-width. (Maeda) +8 Should take font from xterm where gvim was started (if no other default). +8 Selecting font names in X11 is difficult, make a script or something to + select one. +8 Visual highlighting should keep the same font (bold, italic, etc.). +8 Add flag to 'guioptions' to not put anything in the clipboard at all? +8 Should support a way to use keys that we don't recognize yet. Add a + command that adds entries to special_keys somehow. How do we make this + portable (X11, Win32, ..)? +7 Add a flag to 'guioptions' that tells not to remove inactive menu items. + For systems where greying-out or removing menu items is very slow. The + menu items would remain visibly normally, but not do anything. +7 Add ":minimize" and ":maximize", which iconize the window and back. + Useful when using gvim to run a script (e.g. 2html.vim). +7 X11: Is it possible to free allocated colors, so that other programs can + use them again? Otherwise, allow disabling allocating the default colors. + Or allocate an own colormap (check UAE). With an option to use it. For + the commandline, "-install" is mostly used for X11 programs. +7 Add command line argument for "gvim" not to start the GUI. Sort of the + inverse of "vim -g". (Vikas) +7 Should support multi-column menus. +- Should add option for where to put the "Help" menu: like Motif at the far + right, or with the other menus (but still at the right). +- Add menu item to "Keep Insert mode". +8 ":mkgvimrc" command, that includes menus. +6 Big change: Move GUI to separate program "vimgui", to make startup of vim a + lot faster, but still be able to do "vim -g" or ":gui". +7 More explicit mouse button binding instead of 'mousemodel'? +7 Add option to set the position of the window on the screen. 'windowpos', + which has a value of "123,456": <x>,<y>. + Or add a command, like ":winsize"? +7 Add toolbar for more GUIs. +8 Make it possible to use "amenu icon=BuiltIn##", so that the toolbar item + name can be chosen free. +7 Make it possible to put the toolbar on top, left, right and/or bottom of + the window? Allows for softkey-like use. +6 Separate the part of Vim that does the editing from the part that runs the + GUI. Communicate through a pseudo-tty. Vim starts up, creates a + pty that is connected to the terminal. When the GUI starts, the pty is + reconnected to the GUI process. When the GUI stops, it is connected to + the terminal again. Also use the pty for external processes, it looks + like a vt100 terminal to them. Vim uses extra commands to communicate GUI + things. +7 Motif: For a confirm() dialog <Enter> should be ignored when no default + button selected, <Esc> should close the dialog. +7 When using a pseudo-tty Vim should behave like some terminal (vt52 looks + simple enough). Terminal codes to/from shell should be translated. +- Would it be useful to be able to quit the GUI and go back to the terminal + where it was started from? +7 Support "-visual <type>" command line argument. + + +Autocommands: +9 Rework the code from FEAT_OSFILETYPE for autocmd-osfiletypes to use + 'filetype'. Only for when the current buffer is known. +- Put autocommand event names in a hashtable for faster lookup? +8 When the SwapExists event is triggered, provide information about the + swap file, e.g., whether the process is running, file was modified, etc. + Must be possible to check the situation that it's probably OK to delete + the swap file. (Marc Merlin) +8 When all the patterns for an event are "*" there is no need to expand + buffer names to a full path. This can be slow for NFS. +7 For autocommand events that trigger multiple times per buffer (e.g., + CursorHold), go through the list once and cache the result for a specific + buffer. Invalidate the cache when adding/deleting autocommands or + changing the buffer name. +7 Add TagJump event: do something after jumping to a tag. +8 Add "TagJumpFile" autocommand: When jumping to another file for a tag. + Can be used to open "main.c.gz" when "main.c" isn't found. +8 Use another option than 'updatetime' for the CursorHold event. The two + things are unrelated for the user (but the implementation is more + difficult). +7 Add autocommand event for when a buffer cannot be abandoned. So that the + user can define the action taking (autowrite, dialog, fail) based on the + kind of file. (Yakov Lerner) Or is BufLeave sufficient? +8 Autocommand for when modified files have been found, when getting input + focus again (e.g., FileChangedFocus). + Check when: getting focus, jumping to another buffer, ... +7 Autocommand for when an option is changed. Match buffer name or option + name? +8 Autocommands should not change registers. And marks? And the jumplist? + And anything else? Add a command to save and restore these things. +8 Add autocommands, user functions and user commands to ":mkvimrc". +6 Add KeymapChanged event, so that the effects of a different keymap can be + handled (e.g., other font) (Ron Aaron) +7 When trying to open a directory, trigger an OpenDirectory event. +7 Add file type in front of file pattern: <d> for directory, <l> for link, + <x> for executable, etc. With commas to separate alternatives. The + autocommand is only executed when both the file type AND the file pattern + match. (Leonard) +5 Add option that specifies extensions which are to be discarded from the + file name. E.g. 'ausuffix', with ".gz,.orig". Such that file.c.gz will + trigger the "*.c" autocommands. (Belabas) +7 Add something to break the autocommands for the current event, and for + what follows. Useful for a "BufWritePre" that wants to avoid writing the + file. +8 When editing "tt.gz", which is in DOS format, 'fileformat' stays at + "unix", thus writing the file changes it. Somehow detect that the read + command used dos fileformat. Same for 'fileencoding'. +- Add events to autocommands: + Error - When an error happens + NormalEnter - Entering Normal mode + ReplaceEnter - Entering Replace mode + CmdEnter - Entering Cmdline mode (with type of cmdline to allow + different mapping) + VisualEnter - Entering Visual mode + *Leave - Leaving a mode (in pair with the above *Enter) + VimLeaveCheck - Before Vim decides to exit, so that it can be cancelled + when exiting isn't a good idea. + CursorHoldC - CursorHold while command-line editing + WinMoved - when windows have been moved around, e.g, ":wincmd J" + CmdUndefined - Like FuncUndefined but for user commands. + SearchPost - After doing a search command (e.g. to do "M") + PreDirChanged/PostDirChanged + - Before/after ":cd" has been used (for changing the + window title) + ShutDown - when the system is about to shut down + InsertCharPost - user typed a character in Insert mode, after inserting + the char. + BufModified - When a buffer becomes modified, or unmodified (for + putting a [+] in the window title or checking out the + file from CVS). + BufFirstChange - When making a change, when 'modified' is set. Can be + used to do a :preserve for remote files. + BufChange - after a change was made. Set some variables to indicate + the position and number of inserted/deleted lines, so + that marks can be updated. HierAssist has patch to add + BufChangePre, BufChangePost and RevertBuf. (Shah) + ViewChanged - triggered when the text scrolls and when the window size + changes. + WinResized - After a window has been resized + WinClose - Just before closing a window +- Write the file now and then ('autosave'): + *'autosave'* *'as'* *'noautosave'* *'noas'* + 'autosave' 'as' number (default 0) + Automatically write the current buffer to file N seconds after the + last change has been made and when |'modified'| is still set. + Default: 0 = do not autosave the buffer. + Alternative: have 'autosave' use 'updatetime' and 'updatecount' but make + them save the file itself besides the swapfile. + + +Omni completion: +- Add a flag to 'complete' to be able to do omni completion with CTRL-N (and + mix it with other kinds of completion). +- Ideas from the Vim 7 BOF at SANE: + - For interpreted languages, use the interpreter to obtain information. + Should work for Java (Eclipse does this), Python, Tcl, etc. + Richard Emberson mentioned working on an interface to Java. + - Check Readline for its completion interface. +- Ideas from others: + http://www.wholetomato.com/ + http://www.vim.org/scripts/script.php?script_id=747 + http://sourceforge.net/projects/insenvim + or http://insenvim.sourceforge.net + Java, XML, HTML, C++, JSP, SQL, C# + MS-Windows only, lots of dependencies (e.g. Perl, Internet + explorer), uses .dll shared libraries. + For C++ uses $INCLUDE environment var. + Uses Perl for C++. + Uses ctags to find the info: + ctags -f $allTagsFile --fields=+aiKmnsSz --language-force=C++ --C++-kinds=+cefgmnpsut-dlux -u $files + www.vim.org script 1213 (Java Development Environment) (Fuchuan Wang) + IComplete: http://www.vim.org/scripts/script.php?script_id=1265 + and http://stud4.tuwien.ac.at/~e0125672/icomplete/ + http://cedet.sourceforge.net/intellisense.shtml (for Emacs) + Ivan Villanueva has something for Java. + Emacs: http://www.xref-tech.com/xrefactory/more_c_completion.html + Completion in .NET framework SharpDevelop: http://www.icsharpcode.net +- Pre-expand abbreviations, show which abbrevs would match? + + +Insert mode completion/expansion: +- GUI implementation of the popup menu. +7 When searching in other files the name flash by, too fast to read. Only + display a name every second or so, like with ":vimgrep". +7 When expanding file names with an environment variable, add the match with + the unexpanded var. So $HOME/tm expands to "/home/guy/tmp" and + "$HOME/tmp" +8 When there is no word before the cursor but something like "sys." complete + with "sys.". Works well for C and similar languages. +9 ^X^L completion doesn't repeat correctly. It uses the first match with + the last added line, instead of continuing where the last match ended. + (Webb) +8 Add option to set different behavior for Insert mode completion: + - ignore/match case + - different characters than 'iskeyword' +8 Add option 'isexpand', containing characters when doing expansion (so that + "." and "\" can be included, without changing 'iskeyword'). (Goldfarb) + Also: 'istagword': characters used for CTRL-]. + When 'isexpand' or 'istagword' are empty, use 'iskeyword'. + Alternative: Use a pattern so that start and end of a keyword can be + defined, only allow dash in the middle, etc. +8 Add a command to undo the completion, go back to the original text. +7 Completion of an abbreviation: Can leave letters out, like what Instant + text does: www.textware.com +8 Use the class information in the tags file to do context-sensitive + completion. After "foo." complete all member functions/variables of + "foo". Need to search backwards for the class definition of foo. + Should work for C++ and Java. + Even more context would be nice: "import java.^N" -> "io", "lang", etc. +7 When expanding $HOME/dir with ^X^F keep the $HOME (with an option?). +7 Add CTRL-X command in Insert mode like CTRL-X CTRL-N, that completes WORDS + instead of words. +8 Add CTRL-X CTRL-R: complete words from register contents. +8 Add completion of previously inserted texts (like what CTRL-A does). + Requires remembering a number of insertions. +8 Add 'f' flag to 'complete': Expand file names. + Also apply 'complete' to whole line completion. +- Add a flag to 'complete' to only scan local header files, not system + header files. (Andri Moell) +- Make it possible to search include files in several places. Use the + 'path' option? Can this be done with the dictionary completion (use + wildcards in the file name)? +- Make CTRL-X CTRL-K do a binary search in the dictionary (if it's sorted). +- Speed up CTRL-X CTRL-K dictionary searching (don't use a regexp?). +- Set a mark at the position where the match was found (file mark, could + be in another file). +- Add CTRL-A command in CTRL-X mode: show all matches. +- Make CTRL-X CTRL-L use the 'complete' option? +- Add command in CTRL-X mode to add following words to the completed string + (e.g. to complete "Pointer->element" with CTRL-X CTRL-P CTRL-W CTRL-W) +- CTRL-X CTRL-F: Use 'path' to find completions. +- CTRL-X CTRL-F: Option to use forward slashes on MS-Windows? +- CTRL-X CTRL-F: Don't replace "$VIM" with the actual value. (Kelly) +- Allow listing all matches in some way (and picking one from the list). + + +Command line editing: +7 Add commands (keys) to delete from the cursor to the end of the command + line. +8 Custom completion of user commands can't use the standard completion + functions. Add a hook to invoke a user function that returns the type of + completion to be done: "file", "tag", "custom", etc. +- Add flags to 'whichwrap' for command line editing (cursor right at end of + lines wraps to start of line). +- Make editing the command line work like Insert mode in a single-line view + on a buffer that contains the command line history. But this has many + disadvantages, only implement it when these can be solved. Elvis has run + into these, see remarks from Steve (~/Mail/oldmail/kirkendall/in.00012). + - Going back in history and editing a line there would change the history. + Would still need to keep a copy of the history elsewhere. Like the + cmdwin does now already. + - Use CTRL-O to execute one Normal mode command. How to switch to normal + mode for more commands? <Esc> should cancel the command line. CTRL-T? + - To allow "/" and "= need to recursively call getcmdline(), overwrite the + cmdline. But then we are editing a command-line again. How to avoid + that the user gets confused by the stack of command lines? + - Use edit() for normal cmdline editing? Would have to integrate + getcmdline() into edit(). Need to solve conflicts between Insert mode + and Command-line mode commands. Make it work like Korn shell and tcsh. + Problems: + - Insert: completion with 'wildchar' + - Insert: use cmdline abbreviations + - Insert: CTRL-D deletes indent instead of listing matches + - Normal: no CTRL-W commands + - Normal: no ":" commands? + - Normal: allow Visual mode only within one line. + - where to show insert/normal mode message? Change highlighting of + character in first column? + - Implementation ideas: + - Set "curwin" and "curbuf" to the command line window and buffer. + - curwin->w_topline is always equal to curwin->w_cursor.lnum. + - never set 'number', no folding, etc. No status line. + - sync undo after entering a command line? + - use NV_NOCL flag for commands that are not allowed in Command-line + Mode. + + +Command line completion: +8 Change expand_interactively into a flag that is passed as an argument. +8 With command line completion after '%' and '#', expand current/alternate + file name, so it can be edited. Also with modifiers, such as "%:h". +8 When completing command names, either sort them on the long name, or list + them with the optional part inside []. +8 Add an option to ignore case when doing interactive completion. So that + ":e file<Tab>" also lists "Filelist" (sorted after matching case matches). +7 Completion of ":map x ": fill in the current mapping, so that it can be + edited. (Sven Guckes) +- For 'wildmenu': Simplify "../bar" when possible. +- When using <Up> in wildmenu mode for a submenu, should go back to the + current menu, not the first one. E.g., ":emenu File.Save<Up>". +8 When using backtick expansion, the external command may write a greeting + message. Add an option or commands to remove lines that match a regexp? +7 When listing matches of files, display the common path separately from the + file names, if this makes the listing shorter. (Webb) +- Add command line completion for ":ilist" and friends, show matching + identifiers (Webb). +8 Add command line completion for "old value" of a command. ":args <key>" + would result in the current list of arguments, which you can then edit. +7 Add command line completion with CTRL-X, just like Insert mode completion. + Useful for ":s/word/xx/". +- Add command to go back to the text as it was before completion started. + Also to be used for <Up> in the command line. +- Add 'wildlongest' option: Key to use to find longest common match for + command line completion (default CTRL-L), like 'wildchar'. (Cregut) + Also: when there are several matches, show them line a CTRL-D. + + +Command line history: +- Add "KeyWasTyped" flag: It's reset before each command and set when a + character from the keyboard is consumed. Value is used to decide to put a + command line in history or not. Put line in history if it didn't + completely resulted from one mapping. +- When using ":browse", also put the resulting edit command in the history, + so that it can be repeated. (Demirel) + + +Insert mode: +9 When 'autoindent' is set, hitting <CR> twice, while there is text after + the cursor, doesn't delete the autoindent in the resulting blank line. + (Rich Wales) This is Vi compatible, but it looks like a bug. +8 When using CTRL-O in Insert mode, then executing an insert command + "a" or "i", should we return to Insert mode after <Esc>? (Eggink) + Perhaps it can be allowed a single time, to be able to do + "<C-O>10axyz<Esc>". Nesting this further is confusing. + ":map <F2> 5aabc<Esc>" works only once from Insert mode. +8 When using CTRL-G CTRL-O do like CTRL-\ CTRL-O, but when returning with + the cursor in the same position and the text didn't change continue the + same change, so that "." repeats the whole insert. +7 Use CTRL-G <count> to repeat what follows. Useful for inserting a + character multiple times or repeating CTRL-Y. +- Make 'revins' work in Replace mode. +9 Can't use multi-byte characters for 'matchpairs'. +7 Use 'matchpairs' for 'showmatch': When inserting a character check if it + appears in the rhs of 'matchpairs'. +- In Insert mode (and command line editing?): Allow undo of the last typed + character. This is useful for CTRL-U, CTRL-W, delete and backspace, and + also for characters that wrap to the next line. + Also: be able to undo CTRL-R (insert register). + Possibly use 'backspace'="whole" for a mode where at least a <CR> that + inserts autoindent is undone by a single <BS>. +- Use CTRL-G in Insert mode for an extra range of commands, like "g" in + Normal mode. +- Make 'paste' work without resetting other options, but override their + value. Avoids problems when changing files and modelines or autocommands + are used. +- When typing CTRL-V and a digit higher than 2, only expect two digits. +- Insert binary numbers with CTRL-V b. +- Make it possible to undo <BS>, <C-W> and <C-U>. Bash uses CTRL-Y. + + +'cindent', 'smartindent': +9 Wrapping a variable initialization should have extra indent: + char * veryLongName = + "very long string" + Also check if "cino=+10" is used correctly. +8 Lisp indenting: "\\" confuses the indenter. (Dorai Sitaram, 2006 May 17) +8 Why are continuation lines outside of a {} block not indented? E.g.: + long_type foo = + value; +8 Java: Inside an anonymous class, after an "else" or "try" the indent is + too small. (Vincent Bergbauer) + Problem of using {} inside (), 'cindent' doesn't work then. +8 In C++ it's possible to have {} inside (): (Kirshna) + func( + new String[] { + "asdf", + "asdf" + } + ); +8 In C++ a function isn't recognized inside a namespace: + (Chow Loong Jin) + namespace { + int + func(int arg) { + } + } +6 Add 'cino' flag for this function argument layout: (Spencer Collyer) + func( arg1 + , arg2 + , arg3 + ); +7 Add separate "(0" option into inside/outside a function (Zellner): + func( + int x) // indent like "(4" + { + if (a + && b) // indent like "(0" +9 Using "{" in a comment: (Helmut Stiegler) + if (a) + { + if (b) + { + // { + } + } <-- this is indented incorrect + Problem is that find_start_brace() checks for the matching brace to be in + a comment, but not braces in between. Requires adding a comment check to + findmatchlimit(). +- Make smartindenting configurable. Add 'sioptions', e.g. '#' setting the + indent to 0 should be switched on/off. +7 Support ANSI style function header, with each argument on its own line. +- "[p" and "]p" should use 'cindent' code if it's on (only for the first + line). +- Add option to 'cindent' to set indent for comments outside of {}? +- Make a command to line up a comment after a code line with a previous + comment after a code line. Can 'cindent' do this automatically? +- When 'cindent'ing a '}', showmatch is done before fixing the indent. It + looks better when the indent is fixed before the showmatch. (Webb) +- Add option to make indenting work in comments too (for commented-out + code), unless the line starts with "*". +- Don't use 'cindent' when doing formatting with "gq"? +- When formatting a comment after some text, insert the '*' for the new line + (indent is correct if 'cindent' is set, but '*' doesn't get inserted). +8 When 'comments' has both "s1:/*,mb:*,ex:*/" and "s1:(*,mb:*,ex:*)", the + 'x' flag always uses the first match. Need to continue looking for more + matches of "*" and remember all characters that could end the comment. +- For smartindent: When typing 'else' line it up with matching 'if'. +- 'smartindent': allow patterns in 'cinwords', for e.g. TeX files, where + lines start with "\item". +- Support this style of comments (with an option): (Brown) + /* here is a comment that + is just autoindented, and + nothing else */ +- Add words to 'cinwords' to reduce the indent, e.g., "end" or "fi". +7 Use Tabs for the indent of starting lines, pad with spaces for + continuation lines. Allows changing 'tabstop' without messing up the + indents. + Patch by Lech Lorens, 2010 Mar. Update by James McCoy, 2014 Mar 15. + + +Java: +8 Can have {} constructs inside parens. Include changes from Steve + Odendahl? +8 Recognize "import java.util.Vector" and use $CLASSPATH to find files for + "[i" commands and friends. +- For files found with 'include': handle "*" in included name, for Java. + (Jason) +- How to make a "package java.util" cause all classes in the package to be + searched? Also for "import java.util.*". (Mark Brophy) + + +'comments': +8 When formatting C comments that are after code, the "*" isn't repeated + like it's done when there is no code. And there is no automatic wrapping. + Recognize comments that come after code. Should insert the comment leader + when it's "#" or "//". + Other way around: when a C command starts with "* 4" the "*" is repeated + while it should not. Use syntax HL comment recognition? +7 When using "comments=fg:--", Vim inserts three spaces for a new line. + When hitting a TAB, these spaces could be removed. +7 The 'n'esting flag doesn't do the indenting of the last (rightmost) item. +6 Make strings in 'comments' option a RE, to be able to match more + complicated things. (Phillipps) Use a special flag to indicate that a + regexp is used. +8 Make the 'comments' option with "/* * */" lines only repeat the "*" line + when there is a "/*" before it? Or include this in 'cindent'? + + +Virtual edit: +8 Make the horizontal scrollbar work to move the text further left. +7 Allow specifying it separately for Tabs and beyond end-of-line? + + +Text objects: +8 Add text object for fold, so that it can be yanked when it's open. +8 Add test script for text object commands "aw", "iW", etc. +8 Add text object for part of a CamelHumpedWord and under_scored_word. + (Scott Graham) "ac" and "au"? +8 Add a text object for any kind of quoting, also with multi-byte + characters. Option to specify what quotes are recognized (default: all) + use "aq" and "iq". Use 'quotepairs' to define pairs of quotes, like + 'matchpairs'? +8 Add text object for any kind of parens, also multi-byte ones. +7 Add text object for current search pattern: "a/" and "i/". Makes it + possible to turn text highlighted for 'hlsearch' into a Visual area. +8 Add a way to make an ":omap" for a user-defined text object. Requires + changing the starting position in oap->start. +8 Add "gp" and "gP" commands: insert text and make sure there is a single + space before it, unless at the start of the line, and after it, unless at + the end of the line or before a ".". +7 Add objects with backwards extension? Use "I" and "A". Thus "2dAs" + deletes the current and previous sentence. (Jens Paulus) +7 Add "g{" and "g}" to move to the first/last character of a paragraph + (instead of the line just before/after a paragraph as with "{" and "}"). +6 Ignore comment leaders for objects. Make "das" work in reply-email. +5 Make it possible to use syntax group matches as a text object. For + example, define a "ccItem" group, then do "da<ccItem>" to delete one. + Or, maybe just define "dai", delete-an-item, to delete the syntax item the + cursor is on. + + +Select mode: +8 In blockwise mode, typed characters are inserted in front of the block, + backspace deletes a column before the block. (Steve Hall) +7 Alt-leftmouse starts block mode selection in MS Word. + See http://vim.wikia.com/wiki/Use_Alt-Mouse_to_select_blockwise. +7 Add Cmdline-select mode. Like Select mode, but used on the command line. + - Change gui_send_mouse_event() to pass on mouse events when 'mouse' + contains 'C' or 'A'. + - Catch mouse events in ex_getln.c. Also shift-cursor, etc., like in + normal_cmd(). + - remember start and end of selection in cmdline_info. + - Typing text replaces the selection. + + +Visual mode: +8 Support using "." in Visual mode. Use the operator applied to the Visual + selection, if possible. +- When dragging the Visual selection with the mouse and 'scrolloff' is zero, + behave like 'scrolloff' is one, so that the text scrolls when the pointer + is in the top line. +- Displaying size of Visual area: use 24-33 column display. + When selecting multiple lines, up to about a screenful, also count the + characters. +8 When using "I" or "A" in Visual block mode, short lines do not get the new + text. Make it possible to add the text to short lines too, with padding + where needed. +7 With a Visual block selected, "2x" deletes a block of double the width, + "3y" yanks a block of triple width, etc. +7 When selecting linewise, using "itext" should insert "text" at the start + of each selected line. +8 What is "R" supposed to do in Visual mode? +8 Make Visual mode local to the buffer. Allow changing to another buffer. + When starting a new Visual selection, remove the Visual selection in any + other buffer. (Ron Aaron) +8 Support dragging the Visual area to drop it somewhere else. (Ron Aaron, + Ben Godfrey) +7 Support dragging the Visual area to drop it in another program, and + receive dropped text from another program. (Ben Godfrey) +7 With blockwise Visual mode and "c", "C", "I", "A", etc., allow the use of + a <CR>. The entered lines are repeated over the Visual area. +7 CTRL-V :s should substitute only in the block, not to whole lines. (David + Young is working on this) +7 Filtering a block should only apply to the block, not to the whole lines. + When the number of lines is increased, add lines. When decreased, pad with + spaces or delete? Use ":`<,`>" on the command line. +8 After filtering the Visual area, make "gv" select the filtered text? + Currently "gv" only selects a single line, not useful. +7 Don't move the cursor when scrolling? Needed when the selection should + stay the same. Scroll to the cursor at any movement command. With an + option! +7 In Visual block mode, need to be able to define a corner on a position + that doesn't have text? Also: when using the mouse, be able to select + part of a TAB. Even more: Add a mode where the cursor can be on a screen + position where there is no text. When typing, add spaces to fill the gap. + Other solution: Always use curswant, so that you can move the cursor to + the right column, and then use up/down movements to select the line, + without changing the column. +6 ":left" and ":right" should work in Visual block mode. +7 CTRL-I and CTRL-O should work in Visual mode, but only jump to marks in the + current buffer. +7 CTRL-A and CTRL-X should increase/decrease all numbers in the Visual area. +6 In non-Block mode, "I" should insert the same text in front of each line, + before the first non-blank, "gI" in column 1. +6 In non-Block mode, "A" should append the same text after each line. +6 When in blockwise visual selection (CTRL-V), allow cursor to be placed + right of the line. Could also allow cursor to be placed anywhere on a TAB + or other special character. +6 Add commands to move selected text, without deselecting. + + +More advanced repeating commands: +- Add "." command for visual mode: redo last visual command (e.g. ":fmt"). +7 Repeating "d:{cmd}" with "." doesn't work. (Benji Fisher) Somehow remember + the command line so that it can be repeated? +- Add command to repeat last movement. Including count. +- Add "." command after operator: repeat last command of same operator. E.g. + "c." will repeat last change, also when "x" used since then (Webb). + "y." will repeat last yank. + "c2." will repeat the last but one change? + Also: keep history of Normal mode commands, add command to list the history + and/or pick an older command. +- History stack for . command? Use "g." command. + + +Mappings and Abbreviations: +8 When "0" is mapped (it is a movement command) this mapping should not be + used after typing another number, e.g. "20l". (Charles Campbell) + Is this possible without disabling the mapping of the following command? +8 Should mapping <C-A> and <C-S-A> both work? +7 ":abbr b byte", append "b " to an existing word still expands to "byte". + This is Vi compatible, but can we avoid it anyway? +8 To make a mapping work with a prepended "x to select a register, store the + last _typed_ register name and access it with "&. +8 Add ":amap", like ":amenu". +7 Add a mapping that works always, for remapping the keyboard. +8 Add ":cab!", abbreviations that only apply to Command-line mode and not to + entering search strings. +8 Add a flag to ":abbrev" to eat the character that triggers the + abbreviation. Thus "abb ab xxx" and typing "ab<Space>" inserts "xxx" and + not the <Space>. +8 Give a warning when using CTRL-C in the lhs of a mapping. It will never + (?) work. +8 Add a way to save a current mapping and restore it later. Use a function + that returns the mapping command to restore it: mapcmd()? mapcheck() is + not fool proof. How to handle ambiguous mappings? +7 Add <0x8f> (hex), <033> (octal) and <123> (decimal) to <> notation? +7 When someone tries to unmap with a trailing space, and it fails, try + unmapping without the trailing space. Helps for ":unmap xx | unmap yy". +6 Context-sensitive abbreviations: Specify syntax group(s) in which the + abbreviations are to be used. +- Add mappings that take arguments. Could work like the ":s" command. For + example, for a mouse escape sequence: + :mapexp <Esc>{\([0-9]*\),\([0-9]*\); H\1j\2l +- Add optional <Number> argument for mappings: + :map <Number>q ^W^W<Number>G + :map <Number>q<Number>t ^W^W<Number1-1>G<Number2>l + :map q<Char> :s/<Char>/\u\0/g + Or implicit: + :map q <Register>d<Number>$ +- Add command to repeat a whole mapping ("." only repeats the last change in + a mapping). Also: Repeat a whole insert command, including any mappings + that it included. Sort-of automatic recording? +- Include an option (or flag to 'cpoptions') that makes errors in mappings + not flush the rest of the mapping (like nvi does). +- Use context sensitiveness of completion to switch abbreviations and + mappings off for :unab and :unmap. +6 When using mappings in Insert mode, insert characters for incomplete + mappings first, then remove them again when a mapping matches. Avoids + that characters that are the start of some mapping are not shown until you + hit another character. +- Add mappings for replace mode: ":rmap". How do we then enter mappings for + non-replace Insert mode? +- Add separate mappings for Visual-character/block/line mode? +- Add 'mapstop' command, to stop recursive mappings. +- List mappings that have a raw escape sequence both with the name of the key + for that escape sequence (if there is one) and the sequence itself. +- List mappings: Once with special keys listed as <>, once with meta chars as + <M-a>, once with the byte values (octal?). Sort of "spell mapping" command? +- When entering mappings: Add the possibility to enter meta keys like they + are displayed, within <>: <M-a>, <~@> or <|a>. +- Allow multiple arguments to :unmap. +- Command to show keys that are not used and available for mapping + ":freekeys". +- Allow any character except white space in abbreviations lhs (Riehm). + + +Incsearch: +- Add a limit to the number of lines that are searched for 'incsearch'? +- When no match is found and the user types more, the screen is redrawn + anyway. Could skip that. Esp. if the line wraps and the text is scrolled + up every time. +- Temporarily open folds to show where the search ends up. Restore the + folds when going to another line. +- When incsearch used and hitting return, no need to search again in many + cases, saves a lot of time in big files. (Slootman wants to work on this?) + When not using special characters, can continue search from the last match + (or not at all, when there was no match). See oldmail/webb/in.872. +- With incsearch, use CTRL-N/CTRL-P to go to next/previous match, some other + key to copy matched word to search pattern (Alexander Schmid). + + +Searching: +9 Should have an option for :vimgrep to find lines without a match. +8 Add "g/" and "gb" to search for a pattern in the Visually selected text? + "g?" is already used for rot13. + The vis.vim script has a ":S" command that does something like this. + Can use "g/" in Normal mode, uses the '< to '> area. + Use "&/" for searching the text in the Visual area? +9 Add "v" offset: "/pat/v": search for pattern and start Visual mode on the + matching text. +8 Add a modifier to interpret a space like "\_s\+" to make it much easier to + search for a phrase. +8 Add a mechanism for recursiveness: "\@(([^()]*\@g[^()]*)\)". \@g stands + for "go recursive here" and \@( \) marks the recursive part. + Perl does it this way: + $paren = qr/ \(( [^()] | (??{ $paren }) )* \) /x; + Here $paren is evaluated when it's encountered. This is like a regexp + inside a regexp. In the above terms it would be: + \@((\([^()]\|\@g\)*)\) +8 Show the progress every second. Could use the code that checks for CTRL-C + to find out how much time has passed. Or use SIGALRM. Where to show the + number? +8 When using an expression for ":s", set the match position in a v: + variable. So that you can do ":%s/^/\=v:lnum/" to put a line number + before each line. +7 Support for approximate-regexps to find similar words (agrep + http://www.tgries.de/agrep/ tre: http://laurikari.net/tre/index.html). +8 Add an item for a big character range, so that one can search for a + chinese character: \z[234-1234] or \z[XX-YY] or \z[0x23-0x234]. +7 Add an item stack to allow matching (). One side is "push X on + the stack if previous atom matched". Other side is "match with top of + stack, pop it when it matches". Use "\@pX" and "\@m"? + Example: \((\@p).\{-}\@m\)* +7 Add an option to accept a match at the cursor position. Also for + search(). (Brett) +7 Add a flag to "/pat/" to discard an error. Useful to continue a mapping + when a search fails. Could be "/pat/E" (e is already used for end offset). +7 Add pattern item to use properties of Unicode characters. In Perl it's + "\p{L}" for a letter. See Regular Expression Pocket Reference. +8 Would it be possible to allow ":23,45/pat/flags" to search for "pat" in + lines 23 to 45? Or does this conflict with Ex range syntax? +8 Allow identical pairs in 'matchpairs'. Restrict the search to the current + line. +7 Allow longer pairs in 'matchpairs'. Use ~/vim/macros/matchit.vim as an + example. +8 Make it possible to define the character that "%" checks for in + #if/#endif. For nmake it's !if/!endif. +- For "%" command: set hierarchy for which things include other things that + should be ignored (like "*/" or "#endif" inside /* */). + Also: use "%" to jump from start to end of syntax region and back. + Alternative: use matchit.vim +8 "/:/e+1" gets stuck on a match at the end of the line. Do we care? +8 A pattern like "\([^a]\+\)\+" takes an awful long time. Recognize that + the recursive "\+" is meaningless and optimize for it. + This one is also very slow on "/* some comment */": "^\/\*\(.*[^/]\)*$". +7 Recognize "[a-z]", "[0-9]", etc. and replace them with the faster "\l" and + "\d". +7 Add a way to specify characters in <C-M> or <Key> form. Could be + \%<C-M>. +8 Add an argument after ":s/pat/str/" for a range of matches. For example, + ":s/pat/str/#3-4" to replace only the third and fourth "pat" in a line. +8 When 'iskeyword' is changed the matches from 'hlsearch' may change. (Benji + Fisher) redraw if some options are set while 'hlsearch' is set? +8 Add an option not to use 'hlsearch' highlighting for ":s" and ":g" + commands. (Kahn) It would work like ":noh" is used after that command. + Also: An extra flag to do this once, and a flag to keep the existing + search pattern. +- Make 'hlsearch' a local/global option, so that it can be disabled in some + of the windows. +- Add \%h{group-name}; to search for a specific highlight group. + Add \%s{syntax-group}; to search for a specific syntax group. +- Support Perl regexp. Use PCRE (Perl Compatible RE) package. (Shade) + Or translate the pattern to a Vim one. + Don't switch on with an option for typed commands/mappings/functions, it's + too confusing. Use "\@@" in the pattern, to avoid incompatibilities. +8 Add a way to access the last substitute text, what is used for ":s//~/". + Can't use the ~ register, it's already used for drag & drop. +- Remember flags for backreferenced items, so that "*" can be used after it. + Check with "\(\S\)\1\{3}". (Hemmerling) +8 Flags that apply to the whole pattern. + This works for all places where a regexp is used. + Add "\q" to not store this pattern as the last search pattern? +- Add flags to search command (also for ":s"?): + i ignore case + I use case + p use Perl regexp syntax (or POSIX?) + v use Vi regexp syntax + f forget pattern, don't keep it for "n" command + F remember pattern, keep it for "n" command + Perl uses these too: + e evaluate the right side as an expression (Perl only) + m multiple line expression (we don't need it) + o compile only once (Perl only) + s single line expression (we don't need it) + x extended regexp (we don't need it) + When used after ":g" command, backslash needed to avoid confusion with the + following command. + Add 'searchflags' for default flags (replaces 'gdefault'). +- Add command to display the last used substitute pattern and last used + pattern. (Margo) Maybe make it accessible through a register (like "/ + for search string)? +7 Use T-search algorithm, to speed up searching for strings without special + characters. See C't article, August 1997. +- Add 'fuzzycase' option, so that case doesn't matter, and '-' and '_' are + equivalent (for Unix filenames). +- Add 'v' flag to search command: enter Visual mode, with the matching text + as Visual area. (variation on idea from Bertin) +- Searching: "/this//that/" should find "that" after "this". +- Add global search commands: Instead of wrapping at the end of the buffer, + they continue in another buffer. Use flag after search pattern: + a for the next file in the argument list + f for file in the buffer list + w for file edited in a window. + e.g. "/pat/f". Then "n" and "N" work through files too. "f" flag also for + ":s/pat/foo/f"??? Then when 'autowrite' and 'hidden' are both not set, ask + before saving files: "Save modified buffer "/path/file"? (Yes/Hide/No + Save-all/hide-All/Quit) ". +- ":s/pat/foo/3": find 3rd match of "pat", like sed. (Thomas Koehler) +7 When searching with 'n' give message when getting back where the search + first started. Remember start of search in '/ mark. +7 Add option that scrolls screen to put cursor in middle of screen after + search always/when off-screen/never. And after a ":tag" command. Maybe + specify how many lines below the screen causes a redraw with the cursor in + the middle (default would be half a screen, zero means always). +6 Support multiple search buffers, so macros can be made without side + effects. +7 From xvim: Allow a newline in search patterns (also for :s, can delete + newline). Add BOW, EOW, NEWL, NLORANY, NLBUTANY, magic 'n' and 'r', etc. + [not in xvim:] Add option to switch on matches crossing ONE line boundary. +7 Add ":iselect", a combination of ":ilist" and ":tselect". (Aaron) (Zellner) + Also ":dselect". + + +Undo: +9 ":gundo" command: global undo. Undoes changes spread over multiple files + in the order they were made. Also ":gredo". Both with a count. Useful + when tests fail after making changes and you forgot in which files. +9 After undo/redo, in the message show whether the buffer is modified or + not. +8 Use timestamps for undo, so that a version a certain time ago can be found + and info before some time/date can be flushed. 'undopersist' gives maximum + time to keep undo: "3h", "1d", "2w", "1y", etc. +8 Search for pattern in undo tree, showing when it happened and the text + state, so that you can jump to it. +8 Undo tree: visually show the tree somehow (Damian Conway) + Show only the leaves, indicating how many changed from the branch and the + timestamp? + Put branch with most recent change on the left, older changes get more + indent? +8 See ":e" as a change operation, find the changes and add them to the + undo info. Also be able to undo the "Reload file" choice for when a file + was changed outside of Vim. + Would require doing a diff between the buffer text and the file and + storing the differences. + Alternative: before reloading a buffer, store it somewhere. Keep a list + of about 10 last reloaded buffers. +- Make it possible to undo all the commands from a mapping, including a + trailing unfinished command, e.g. for ":map K iX^[r". +- When accidentally hitting "R" instead of Ctrl-R, further Ctrl-R is not + possible, even when typing <Esc> immediately. (Grahn) Also for "i", "a", + etc. Postpone saving for undo until something is really inserted? +8 When Inserting a lot of text, it can only be undone as a whole. Make undo + sync points at every line or word. Could recognize the start of a new + word (white space and then non-white space) and backspacing. + Can already use CTRL-G u, but that requires remapping a lot of things. +8 Make undo more memory-efficient: Compare text before and after change, + only remember the lines that really changed. +7 Add undo for a range of lines. Can change these back to a previous + version without changing the rest of the file. Stop doing this when a + change includes only some of these lines and changes the line count. Need + to store these undo actions as a separate change that can be undone. +- For u_save() include the column number. This can be used to set '[ and ']. + And in the future the undo can be made more efficient (Webb). +- In out-of-memory situations: Free allocated space in undo, and reduce the + number of undo levels (with confirmation). +- Instead of [+], give the number of changes since the last write: [+123]. + When undoing to before the last write, change this to a negative number: + [-99]. +- With undo with simple line delete/insert: optimize screen updating. +- When executing macro's: Save each line for undo only once. +- When doing a global substitute, causing almost all lines to be changed, + undo info becomes very big. Put undo info in swap file?? + + +Buffer list: +7 Command to execute a command in another buffer: ":inbuf {bufname} {cmd}". + Also for other windows: ":inwin {winnr} {cmd}". How to make sure that + this works properly for all commands, and still be able to return to the + current buffer/window? E.g.: ":inbuf xxx only". +8 Add File.{recent_files} menu entries: Recently edited files. + Ron Aaron has a plugin for this: mru.vim. +8 Unix: Check all uses of fnamecmp() and fnamencmp() if they should check + inode too. +7 Add another number for a buffer, which is visible for the user. When + creating a new buffer, use the lowest number not in use (or the highest + number in use plus one?). +7 Offer some buffer selection from the command line? Like using ":ls" and + asking for a buffer number. (Zachmann) +- When starting to edit a file that is already in the buffer list, use the + file name argument for the new short file name. (Webb) +- Add an option to make ":bnext" and ":bprev" wrap around the end of the + buffer list. Also for ":next" and ":prev"? +7 Add argument to ":ls" which is a pattern for buffers to list. + E.g. ":ls *.c". (Thompson) +7 Add expansion of buffer names, so that "*.c" is expanded to all buffer + names. Needed for ":bdel *.c", ":bunload *.c", etc. +8 Support for <afile> where a buffer name is expected. +8 Some commands don't use line numbers, but buffer numbers. '$' + should then mean the number of the last buffer. E.g.: "4,$bdel". +7 Add an option to mostly use slashes in file names. Separately for + internal use and for when executing an external program? +8 Some file systems are case-sensitive, some are not. Besides + 'wildignorecase' there might be more parts inside + CASE_INSENSITIVE_FILENAME that are useful on Unix. + + +Swap (.swp) files: +8 If writing to the swap file fails, should try to open one in another + directory from 'dir'. Useful in case the file system is full and when + there are short file name problems. +8 Also use the code to try using a short file name for the backup and swap + file for the Win32 and Dos 32 bit versions. +8 When a file is edited by root, add $LOGNAME to know who did su. +8 When the edited file is a symlink, try to put the swap file in the same + dir as the actual file. Adjust FullName(). Avoids editing the same file + twice (e.g. when using quickfix). Also try to make the name of the backup + file the same as the actual file? + Use the code for resolve()? +7 When using 64 bit inode numbers, also store the top 32 bits. Add another + field for this, using part of bo_fname[], to keep it compatible. +7 When editing a file on removable media, should put swap file somewhere + else. Use something like 'r' flag in 'viminfo'. 'diravoid'? + Also: Be able to specify minimum disk space, skip directory when not + enough room. +7 Add a configure check for which directory should be used: /tmp, /var/tmp + or /var/preserve. +- Add an option to create a swap file only when making the first change to + the buffer. (Liang) Or only when the buffer is not read-only. +- Add option to set "umask" for backup files and swap files (Antwerpen). + 'backupumask' and 'swapumask'? Or 'umaskback' and 'umaskswap'? +- When editing a readonly file, don't use a swap file but read parts from the + original file. Also do this when the file is huge (>'maxmem'). We do + need to load the file once to count the number of lines? Perhaps keep a + cached list of which line is where. + + +Viminfo: +7 Can probably remove the code that checks for a writable viminfo file, + because we now do the chown() for root, and others can't overwrite someone + else's viminfo file. +8 When there is no .viminfo file and someone does "su", runs Vim, a + root-owned .viminfo file is created. Is there a good way to avoid this? + Perhaps check the owner of the directory. Only when root? +8 Add argument to keep the list of buffers when Vim is started with a file + name. (Schild) +8 Keep the last used directory of the file browser (File/Open menu). +8 Remember the last used register for "@@". +8 Remember the redo buffer, so that "." works after restarting. +8 Remember a list of last accessed files. To be used in the + "File.Open Recent" menu. Default is to remember 10 files or so. + Also remember which files have been read and written. How to display + this? +7 Also store the ". register (last inserted text). +7 Make it possible to store buffer names in viminfo file relative to some + directory, to make them portable over a network. (Aaron) +6 Store a snapshot of the currently opened windows. So that when quitting + Vim, and then starting again (without a file name argument), you see the + same files in the windows. Use ":mksession" code? +- Make marks present in .viminfo usable as file marks: Display a list of + "last visited files" and select one to jump to. + + +Modelines: +8 Before trying to execute a modeline, check that it looks like one (valid + option names). If it's very wrong, silently ignore it. + Ignore a line that starts with "Subject: ". +- Add an option to whitelist options that are allowed in a modeline. This + would allow careful users to use modelines, e.g., only allowing + 'shiftwidth'. +- Add an option to let modelines only set local options, not global ones + such as 'encoding'. +- When an option value is coming from a modeline, do not carry it over to + another edited file? Would need to remember the value from before the + modeline setting. +- Allow setting a variable from a modeline? Only allow using fixed strings, + no function calls, to avoid a security problem. +- Allow ":doauto BufRead x.cpp" in modelines, to execute autocommands for + .cpp files. +- Support the "abbreviate" command in modelines (Kearns). Careful for + characters after <Esc>, that is a security leak. +- Add option setting to ask user if he wants to have the modelines executed + or not. Same for .exrc in local dir. + + +Sessions: +8 DOS/Windows: ":mksession" generates a "cd" command where "aa\#bb" means + directory "#bb" in "aa", but it's used as "aa#bb". (Ronald Hoellwarth) +7 When there is a "help.txt" window in a session file, restoring that + session will not get the "LOCAL ADDITIONS" back. +8 With ":mksession" always store the 'sessionoptions' option, even when + "options" isn't in it. (St-Amant) +8 When using ":mksession", also store a command to reset all options to + their default value, before setting the options that are not at their + default value. +7 With ":mksession" also store the tag stack and jump history. (Michal + Malecki) +7 Persistent variables: "p:var"; stored in viminfo file and sessions files. + + +Options: +7 ":with option=value | command": temporarily set an option value and + restore it after the command has executed. +8 Make "old" number options that really give a number of effects into string + options that are a comma separated list. The old number values should + also be supported. +8 Add commands to save and restore an option, which also preserves the flag + that marks if the option was set. Useful to keep the effect of setting + 'compatible' after ":syntax on" has been used. +7 There is 'titleold', why is there no 'iconold'? (Chazelas) +7 Make 'scrolloff' a global-local option, so that it can be different in the + quickfix window, for example. (Gary Holloway) + Also do 'sidescrolloff'. + + +External commands: +8 When filtering text, redirect stderr so that it can't mess up the screen + and Vim doesn't need to redraw it. Also for ":r !cmd". +4 Set separate shell for ":sh", piping "range!filter", reading text "r !ls" + and writing text "w !wc". (Deutsche) Allow arguments for fast start (e.g. + -f). +4 Allow direct execution, without using a shell. +4 Run an external command in the background. But how about I/O in the GUI? + Careful: don't turn Vim into a shell! +4 Add feature to disable using a shell or external commands. + + +Multiple Windows: +7 "vim -oO file ..." use both horizontal and vertical splits. +8 Add CTRL-W T: go to the top window in the column of the current window. + And CTRL-W B: go to bottom window. +7 Use CTRL-W <Tab>, like alt-tab, to switch between buffers. Repeat <Tab> + to select another buffer (only loaded ones?), <BS> to go back, <Enter> to + select buffer, <Esc> to go back to original buffer. +7 Make it possible to edit a new buffer in the preview window. A script can + then fill it with something. ":popen"? +7 Add a 'tool' window: behaves like a preview window but there can be + several. Don't count it in only_one_window(). (Alexei Alexandrov) +6 Add an option to resize the shell when splitting and/or closing a window. + ":vsp" would make the shell wider by as many columns as needed for the new + window. Specify a maximum size (or use the screen size). ":close" would + shrink the shell by as many columns as come available. (Demirel) +7 When starting Vim several times, instantiate a Vim server, that allows + communication between the different Vims. Feels like one Vim running with + multiple top-level windows. Esp. useful when Vim is started from an IDE + too. Requires some form of inter process communication. +- Support a connection to an external viewer. Could call the viewer + automatically after some seconds of non-activity, or with a command. + Allow some way of reporting scrolling and cursor positioning in the viewer + to Vim, so that the link between the viewed and edited text can be made. + + +Marks: +8 Add ten marks for last changed files: ':0, ':1, etc. One mark per file. +8 When cursor is first moved because of scrolling, set a mark at this + position. (Rimon Barr) Use '-. +8 Add a command to jump to a mark and make the motion inclusive. g'm and g`m? +8 The '" mark is set to the first line, even when doing ":next" a few times. + Only set the '" mark when the cursor was really moved in a file. +8 Make `` and '', which would position the new cursor position in the middle + of the window, restore the old topline (or relative position) from when + the mark was set. +7 Make a list of file marks in a separate window. For listing all buffers, + matching tags, errors, etc. Normal commands to move around. Add commands + to jump to the mark (in current window or new window). Start it with + ":browse marks"? +6 Add a menu that lists the Marks like ":marks". (Amerige) +7 For ":jumps", ":tags" and ":marks", for not loaded buffers, remember the + text at the mark. Highlight the column with the mark. +7 Highlight each mark in some way (With "Mark" highlight group). + Or display marks in a separate column, like 'number' does. +7 Use d"m to delete rectangular area from cursor to mark m (like Vile's \m + command). +7 Try to keep marks in the same position when: + - replacing with a line break, like in ":s/pat/^M/", move marks after the + line break column to the next line. (Acevedo) + - inserting/deleting characters in a line. +5 Include marks for start/end of the current word and section. Useful in + mappings. +6 Add "unnamed mark" feature: Like marks for the ":g" command, but place and + unplace them with commands before doing something with the lines. + Highlight the marked lines somehow. + + +Digraphs: +7 Make "ga" show the keymap for a character, if it exists. + Also show the code of the character after conversion to 'fileencoding'. +- Use digraph table to tell Vim about the collating sequence of special + characters? +8 Add command to remove one or more (all) digraphs. (Brown) +7 Support different sets of digraphs (depending on the character set?). At + least Latin1/Unicode, Latin-2, MS-DOS (esp. for Win32). + + +Writing files: +- In vim_rename(), should lock "from" file when deleting "to" file for + systems other than Amiga. Avoids problems with unexpected longname to + shortname conversion. +8 write mch_isdevice() for Amiga, Mac, VMS, etc. +8 When appending to a file, Vim should also make a backup and a 'patchmode' + file. +8 'backupskip' doesn't write a backup file at all, a bit dangerous for some + applications. Add 'backupelsewhere' to write a backup file in another + directory? Or add a flag to 'backupdir'? +6 Add an option to write a new, numbered, backup file each time. Like + 'patchmode', e.g., 'backupmode'. +6 Make it possible to write 'patchmode' files to a different directory. + E.g., ":set patchmode=~/backups/*.orig". (Thomas) +6 Add an option to prepend something to the backup file name. E.g., "#". + Or maybe allow a function to modify the backup file name? +8 Only make a backup when overwriting a file for the first time. Avoids + losing the original when writing twice. (Slootman) +7 On non-Unix machines, also overwrite the original file in some situations + (file system full, it's a link on an NFS partition). +7 When editing a file, check that it has been change outside of Vim more + often, not only when writing over it. E.g., at the time the swap file is + flushed. Or every ten seconds or so (use the time of day, check it before + waiting for a character to be typed). +8 When a file was changed since editing started, show this in the status + line of the window, like "[time]". + Make it easier to reload all outdated files that don't have changes. + Automatic and/or with a command. + + +Substitute: +8 Substitute with hex/unicode number "\%xff" and "\%uabcd". Just like + "\%uabcd" in search pattern. +8 Make it easier to replace in all files in the argument list. E.g.: + ":argsub/oldword/newword/". Works like ":argdo %s/oldword/newword/g|w". +- :s///p prints the line after a substitution. +- With :s///c replace \&, ~, etc. when showing the replacement pattern. +8 With :s///c allow scrolling horizontally when 'nowrap' is effective. + Also allow a count before the scrolling keys. +- Add number option to ":s//2": replace second occurrence of string? Or: + :s///N substitutes N times. +- Add answers to ":substitute" with 'c' flag, used in a ":global", e.g.: + ":g/pat1/s/pat2/pat3/cg": 'A' do all remaining replacements, 'Q' don't do + any replacements, 'u' undo last substitution. +7 Substitute in a block of text. Use {line}.{column} notation in an Ex + range, e.g.: ":1.3,$.5s" means to substitute from line 1 column 3 to the + last line column 5. +5 Add commands to bookmark lines, display bookmarks, remove bookmarks, + operate on lines with bookmarks, etc. Like ":global" but with the + possibility to keep the bookmarks and use them with several commands. + (Stanislav Sitar) + + +Mouse support: +8 Add 'o' flag to 'mouse'? +7 Be able to set a 'mouseshape' for the popup menu. +8 Add 'mouse' flag, which sets a behavior like Visual mode, but automatic + yanking at the button-up event. Or like Select mode, but typing gets you + out of Select mode, instead of replacing the text. (Bhaskar) +- Implement mouse support for the Amiga console. +- Using right mouse button to extend a blockwise selection should attach to + the nearest corner of the rectangle (four possible corners). +- Precede mouse click by a number to simulate double clicks?!? +- When mouse click after 'r' command, get character that was pointed to. + + +Argument list: +6 Add command to put all filenames from the tag files in the argument list. + When given an argument, only use the files where that argument matches + (like `grep -l ident`) and jump to the first match. +6 Add command to form an args list from all the buffers? + + +Registers: +8 Don't display empty registers with ":display". (Etienne) +8 Make the # register writable, so that it can be restored after jumping + around in windows. +8 Add put command that overwrites existing text. Should also work for + blocks. Useful to move text around in a table. Works like using "R ^R r" + for every line. +6 When yanking into the unnamed registers several times, somehow make the + previous contents also available (like it's done for deleting). What + register names to use? g"1, g"2, etc.? +- When appending to a register, also report the total resulting number of + lines. Or just say "99 more lines yanked", add the "more". +- When inserting a register in Insert mode with CTRL-R, don't insert comment + leader when line wraps? +- The ":@r" commands should take a range and execute the register for each + line in the range. +- Add "P" command to insert contents of unnamed register, move selected text + to position of previous deleted (to swap foo and bar in " + foo") +8 Should be able to yank and delete into the "/ register. + How to take care of the flags (offset, magic)? + + +Debug mode: +7 Add something to enable debugging when a remote message is received. +8 Add breakpoints for setting an option +8 Add breakpoints for assigning to a variable. +7 Add a watchpoint in the debug mode: An expression that breaks execution + when evaluating to non-zero. Add the "watchadd expr" command, stop when + the value of the expression changes. ":watchdel" deletes an item, + ":watchlist" lists the items. (Charles Campbell) +7 Store the history from debug mode in viminfo. +7 Make the debug mode history available with histget() et al. + + +Various improvements: +7 Add plugins for formatting? Should be able to make a choice depending on + the language of a file (English/Korean/Japanese/etc.). + Setting the 'langformat' option to "chinese" would load the + "format/chinese.vim" plugin. + The plugin would set 'formatexpr' and define the function being called. + Edward L. Fox explains how it should be done for most Asian languages. + (2005 Nov 24) + Alternative: patch for utf-8 line breaking. (Yongwei Wu, 2008 Feb 23) +7 [t to move to previous xml/html tag (like "vatov"), ]t to move to next + ("vatv"). +7 [< to move to previous xml/html tag, e.g., previous <li>. ]< to move to + next <li>, ]< to next </li>, [< to previous </li>. +8 Add ":rename" command: rename the file of the current buffer and rename + the buffer. Buffer may be modified. +7 Instead of filtering errors with a shell script it should be possible to + do this with Vim script. A function that filters the raw text that comes + from the 'makeprg'? +- Add %b to 'errorformat': buffer number. (Yegappan Lakshmanan / Suresh + Govindachar) +7 Add a command that goes back to the position from before jumping to the + first quickfix location. ":cbefore"? +7 Allow a window not to have a statusline. Makes it possible to use a + window as a buffer-tab selection. +8 Allow non-active windows to have a different statusline. (Yakov Lerner) +7 Support using ":vert" with User commands. Add expandable items <vert>. + Do the same for ":browse" and ":confirm"? + For ":silent" and ":debug" apply to the whole user command. + More general: need a way to access command modifiers in a user command. + Assign them to a v: variable? +7 Add an invisible buffer which can be edited. For use in scripts that want + to manipulate text without changing the window layout. +8 Add a command to revert to the saved version of file; undo or redo until + all changes are gone. +6 "vim -q -" should read the list of errors from stdin. (Gautam Mudunuri) +8 Add "--remote-fail": When contacting the server fails, exit Vim. + Add "--remote-self": When contacting the server fails, do it in this Vim. + Overrules the default of "--remote-send" to fail and "--remote" to do it + in this Vim. +8 When Vim was started without a server, make it possible to start one, as + if the "--servername" argument was given. ":startserver <name>"? +8 No address range can be used before the command modifiers. This makes + them difficult to use in a menu for Visual mode. Accept the range and + have it apply to the following command. +8 Add the possibility to set 'fileformats' to force a format and strip other + CR characters. For example, for "dos" files remove CR characters at the + end of the line, so that a file with mixed line endings is cleaned up. + To just not display the CR characters: Add a flag to 'display'? +7 Some compilers give error messages in which the file name does not have a + path. Be able to specify that 'path' is used for these files. +7 Xterm sends <Esc>O3F for <M-End>. Similarly for other <M-Home>, <M-Left>, + etc. Combinations of Alt, Ctrl and Shift are also possible. Recognize + these to avoid inserting the raw byte sequence, handle like the key + without modifier (unless mapped). +6 Add "gG": like what "gj" is to "j": go to the N'th window line. +8 Add command like ":normal" that accepts <Key> notation like ":map". +9 Support ACLs on more systems. +7 Add ModeMsgVisual, ModeMsgInsert, etc. so that each mode message can be + highlighted differently. +7 Add a message area for the user. Set some option to reserve space (above + the command line?). Use an ":echouser" command to display the message + (truncated to fit in the space). +7 Add %s to 'keywordprg': replace with word under the cursor. (Zellner) +8 Support printing on Unix. Can use "lpansi.c" as an example. (Bookout) +8 Add put command that replaces the text under it. Esp. for blockwise + Visual mode. +7 Enhance termresponse stuff: Add t_CV(?): pattern of term response, use + regexp: "\e\[[>?][0-9;]*c", but only check just after sending t_RV. +7 Add "g|" command: move to N'th column from the left margin (after wrapping + and applying 'leftcol'). Works as "|" like what "g0" is to "0". +7 Support setting 'equalprg' to a user function name. +7 Highlight the characters after the end-of-line differently. +7 When 'whichwrap' contains "l", "$dl" should join lines? +8 Add an argument to configure to use $CFLAGS and not modify it? (Mooney) +8 Enabling features is a mix of configure arguments and defines in + feature.h. How to make this consistent? Feature.h is required for + non-unix systems. Perhaps let configure define CONF_XXX, and use #ifdef + CONF_XXX in feature.h? Then what should min-features and max-features do? +8 Add "g^E" and "g^Y", to scroll a screen-full line up and down. +6 Add ":timer" command, to set a command to be executed at a certain + interval, or once after some time has elapsed. (Aaron) + Perhaps an autocommand event like CursorHold is better? + Patch to add async functionality. (Geoff Greer, 2013 Sep 1 and later) +8 Add ":confirm" handling in open_exfile(), for when file already exists. +8 When quitting with changed files, make the dialog list the changed file + and allow "write all", "discard all", "write some". The last one would + then ask "write" or "discard" for each changed file. Patch in HierAssist + does something like this. (Shah) +7 Use growarray for replace stack. +7 Have a look at viH (Hellenic or Greek version of Vim). But a solution + outside of Vim might be satisfactory (Haritsis). +3 Make "2d%" work like "d%d%" instead of "d2%"? +7 "g CTRL-O" jumps back to last used buffer. Skip CTRL-O jumps in the same + buffer. Make jumplist remember the last ten accessed buffers? +7 Make it possible to set the size of the jumplist (also to a smaller number + than the default). (Nikolai Weibull) +- Add code to disable the CAPS key when going from Insert to Normal mode. +- Set date/protection/etc. of the patchfile the same as the original file. +- Use growarray for termcodes[] in term.c +- Add <window-99>, like <cword> but use filename of 99'th window. +7 Add a way to change an operator to always work characterwise-inclusive + (like "v" makes the operator characterwise-exclusive). "x" could be used. +- Make a set of operations on list of names: expand wildcards, replace home + dir, append a string, delete a string, etc. +- Remove using mktemp() and use tmpname() only? Ctags does this. +- When replacing environment variables, and there is one that is not set, + turn it into an empty string? Only when expanding options? (Hiebert) +- Option to set command to be executed instead of producing a beep (e.g. to + call "play newbeep.au"). +- Add option to show the current function name in the status line. More or + less what you find with "[[k", like how 'cindent' recognizes a function. + (Bhatt). +- "[r" and "]r": like "p" and "P", but replace instead of insert (esp. for + blockwise registers). +- Add 'timecheck' option, on by default. Makes it possible to switch off the + timestamp warning and question. (Dodt). +- Add an option to set the time after which Vim should check the timestamps + of the files. Only check when an event occurs (e.g., character typed, + mouse moved). Useful for non-GUI versions where keyboard focus isn't + noticeable. +- Make 'smartcase' work even though 'ic' isn't set (Webb). +7 When formatting text, allow to break the line at a number of characters. + Use an option for this: 'breakchars'? Useful for formatting Fortran code. +- Add flag to 'formatoptions' to be able to format book-style paragraphs + (first line of paragraph has larger indent, no empty lines between + paragraphs). Complements the '2' flag. Use '>' flag when larger indent + starts a new paragraph, use '<' flag when smaller indent starts a new + paragraph. Both start a new paragraph on any indent change. +8 The 'a' flag in 'formatoptions' is too dangerous. In some way only do + auto-formatting in specific regions, e.g. defined by syntax highlighting. +8 Allow using a trailing space to signal a paragraph that continues on the + next line (MIME text/plain; format=flowed, RFC 2646). Can be used for + continuous formatting. Could use 'autoformat' option, which specifies a + regexp which triggers auto-formatting (for one line). + ":set autoformat=\\s$". +- Be able to redefine where a sentence stops. Use a regexp pattern? +- Support multi-byte characters for sentences. Example from Ben Peterson. +7 Add command "g)" to go to the end of a sentence, "g(" to go back to the + end of a sentence. (Servatius Brandt) +- Be able to redefine where a paragraph starts. For "[[" where the '{' is + not in column 1. +6 Add ":cdprev": go back to the previous directory. Need to remember a + stack of previous directories. We also need ":cdnext". +7 Should ":cd" for MS-DOS go to $HOME, when it's defined? +- Make "gq<CR>" work on the last line in the file. Maybe for every operator? +- Add more redirecting of Ex commands: + :redir #> bufname + :redir #>> bufname (append) +- Give error message when starting :redir: twice or using END when no + redirection was active. +- Setting of options, specifically for a buffer or window, with + ":set window.option" or ":set buffer.option=val". Or use ":buffer.set". + Also: "buffer.map <F1> quit". +6 Would it be possible to change the color of the cursor in the Win32 + console? (Klaus Hast) +- Add :delcr command: + *:delcr* + :[range]delcr[!] Check [range] lines (default: whole buffer) for lines + ending in <CR>. If all lines end in <CR>, or [!] is + used, remove the <CR> at the end of lines in [range]. + A CTRL-Z at the end of the file is removed. If + [range] is omitted, or it is the whole file, and all + lines end in <CR> 'textmode' is set. {not in Vi} +- Should integrate addstar() and file_pat_to_reg_pat(). +- When working over a serial line with 7 bit characters, remove meta + characters from 'isprint'. +- Use fchdir() in init_homedir(), like in FullName(). +- In win_update(), when the GUI is active, always use the scrolling area. + Avoid that the last status line is deleted and needs to be redrawn. +- That "cTx" fails when the cursor is just after 'x' is Vi compatible, but + may not be what you expect. Add a flag in 'cpoptions' for this? More + general: Add an option to allow "c" to work with a null motion. +- Give better error messages by using errno (strerror()). +- Give "Usage:" error message when command used with wrong arguments (like + Nvi). +- Make 'restorescreen' option also work for xterm (and others), replaces the + SAVE_XTERM_SCREEN define. +7 Support for ":winpos" In xterm: report the current window position. +- Give warning message when using ":set t_xx=asdf" for a termcap code that + Vim doesn't know about. Add flag in 'shortmess'? +6 Add ":che <file>", list all the include paths which lead to this file. +- For a commandline that has several commands (:s, :d, etc.) summarize the + changes all together instead of for each command (e.g. for the rot13 + macro). +- Add command like "[I" that also shows the tree of included files. +- ":set sm^L" results in ":set s", because short names of options are also + expanded. Is there a better way to do this? +- Add ":@!" command, to ":@" like what ":source!" is to ":source". +8 Add ":@:!": repeat last command with forceit set. +- Add 't_normal': Used whenever t_me, t_se, t_ue or t_Zr is empty. +- ":cab map test ^V| je", ":cunab map" doesn't work. This is vi compatible! +- CTRL-W CTRL-E and CTRL-W CTRL-Y should move the current window up or down + if it is not the first or last window. +- Include-file-search commands should look in the loaded buffer of a file (if + there is one) instead of the file itself. +7 Change 'nrformats' to include the leader for each format. Example: + nrformats=hex:$,binary:b,octal:0 + Add setting of 'nrformats' to syntax files. +- 'path' can become very long, don't use NameBuff for expansion. +- When unhiding a hidden buffer, put the same line at top of the window as + the one before hiding it. Or: keep the same relative cursor position (so + many percent down the windows). +- Make it possible for the 'showbreak' to be displayed at the end of the + line. Use a comma to separate the part at the end and the start of the + line? Highlight the linebreak characters, add flag in 'highlight'. + Make 'showbreak' local to a window. +- Some string options should be expanded if they have wildcards, e.g. + 'dictionary' when it is "*.h". +- Use a specific type for number and boolean options, making it possible to + change it for specific machines (e.g. when a long is 64 bit). +- Add option for <Insert> in replace mode going to normal mode. (Nugent) +- Add a next/previous possibility to "[^I" and friends. +- Add possibility to change the HOME directory. Use the directory from the + passwd file? (Antwerpen) +8 Add commands to push and pop all or individual options. ":setpush tw", + ":setpop tw", ":setpush all". Maybe pushing/popping all options is + sufficient. ":setflush" resets the option stack? + How to handle an aborted mapping? Remember position in tag stack when + mapping starts, restore it when an error aborts the mapping? +- Change ":fixdel" into option 'fixdel', t_del will be adjusted each time + t_bs is set? (Webb) +- "gc": goto character, move absolute character positions forward, also + counting newlines. "gC" goes backwards (Weigert). +- When doing CTRL-^, redraw buffer with the same topline. (Demirel) Store + cursor row and window height to redraw cursor at same percentage of window + (Webb). +- Besides remembering the last used line number of a file, also remember the + column. Use it with CTRL-^ et. al. +- Check for non-digits when setting a number option (careful when entering + hex codes like 0xff). +- Add option to make "." redo the "@r" command, instead of the last command + executed by it. Also to make "." redo the whole mapping. Basically: redo + the last TYPED command. +- Support URL links for ^X^F in Insert mode, like for "gf". +- Support %name% expansion for "gf" on Windows. +- Make "gf" work on "file://c:/path/name". "file:/c:/" and "file:///c:/" + should also work? +- Add 'urlpath', used like 'path' for when "gf" used on an URL? +8 When using "gf" on an absolute file name, while editing a remote file + (starts with scp:// or http://) should prepend the method and machine + name. +- When finding an URL or file name, and it doesn't exist, try removing a + trailing '.'. +- Add ":path" command modifier. Should work for every command that takes a + file name argument, to search for the file name in 'path'. Use + find_file_in_path(). +- Highlight control characters on the screen: Shows the difference between + CTRL-X and "^" followed by "X" (Colon). +- Integrate parsing of cmdline command and parsing for expansion. +- Create a program that can translate a .swp file from any machine into a + form usable by Vim on the current machine. +- Add ":noro" command: Reset 'ro' flag for all buffers, except ones that have + a readonly file. ":noro!" will reset all 'ro' flags. +- Add a variant of CTRL-V that stops interpretation of more than one + character. For entering mappings on the command line where a key contains + several special characters, e.g. a trailing newline. +- Make '2' option in 'formatoptions' also work inside comments. +- Add 's' flag to 'formatoptions': Do not break when inside a string. (Dodt) +- When window size changed (with the mouse) and made too small, set it back + to the minimal size. +- Add "]>" and "[<", shift comment at end of line (command; /* comment */). +- Should not call cursorcmd() for each vgetc() in getcmdline(). +- ":split file1 file2" adds two more windows (Webb). +- Don't give message "Incomplete last line" when editing binary file. +- Add ":a", ":i" for preloading of named buffers. +- When entering text, keep other windows on same buffer updated (when a line + entered)? +- Check out how screen does output optimizing. Apparently this is possible + as an output filter. +- In dosub() regexec is called twice for the same line. Try to avoid this. +- Window updating from memline.c: insert/delete/replace line. +- Optimize ml_append() for speed, esp. for reading a file. +- V..c should keep indent when 'ai' is set, just like [count]cc. +- Updatescript() can be done faster with a string instead of a char. +- Screen updating is inefficient with CTRL-F and CTRL-B when there are long + lines. +- Uppercase characters in Ex commands can be made lowercase? +8 Add option to show characters in text not as "|A" but as decimal ("^129"), + hex ("\x81") or octal ("\201") or meta (M-x). Nvi has the 'octal' option + to switch from hex to octal. Vile can show unprintable characters in hex + or in octal. +7 Tighter integration with xxd to edit binary files. Make it more + easy/obvious to use. Command line argument? +- How does vi detect whether a filter has messed up the screen? Check source. + After ":w !command" a wait_return? +- Improve screen updating code for doput() (use s_ins()). +- With 'p' command on last line: scroll screen up (also for terminals without + insert line command). +- Use insert/delete char when terminal supports it. +- Optimize screen redraw for slow terminals. +- Optimize "dw" for long row of spaces (say, 30000). +- Add "-d null" for editing from a script file without displaying. +- In Insert mode: Remember the characters that were removed with backspace + and re-insert them one at a time with <key1>, all together with <key2>. +- Amiga: Add possibility to set a keymap. The code in amiga.c does not work + yet. +- Implement 'redraw' option. +- Add special code to 'sections' option to define something else but '{' or + '}' as the start of a section (e.g. one shiftwidth to the right). +7 Allow using Vim in a pipe: "ls | vim -u xxx.vim - | yyy". Only needs + implementing ":w" to stdout in the buffer that was read from stdin. + Perhaps writing to stdout will work, since stderr is used for the terminal + I/O. +8 Allow opening an unnamed buffer with ":e !cmd" and ":sp !cmd". Vile can + do it. +- Add commands like ]] and [[ that do not include the line jumped to. +- When :unab without matching "from" part and several matching "to" parts, + delete the entry that was used last, instead of the first in the list. +- Add text justification option. +- Set boolean options on/off with ":set paste=off", ":set paste=on". +- After "inv"ing an option show the value: ":set invpaste" gives "paste is + off". +- Check handling of CTRL-V and '\' for ":" commands that do not have TRLBAR. +- When a file cannot be opened but does exist, give error message. +- Amiga: When 'r' protection bit is not set, file can still be opened but + gives read errors. Check protection before opening. +- When writing check for file exists but no permission, "Permission denied". +- If file does not exist, check if directory exists. +- MSDOS: although t_cv and t_ci are not set, do invert char under cursor. +- Settings edit mode: make file with ":set opt=xx", edit it, parse it as ex + commands. +- ":set -w all": list one option per line. +- Amiga: test for 'w' flag when reading a file. +- :table command (Webb) +- Add new operator: clear, make area white (replace with spaces): "g ". +- Add command to ":read" a file at a certain column (blockwise read?). +- Add sort of replace mode where case is taken from the old text (Goldfarb). +- Allow multiple arguments for ":read", read all the files. +- Support for tabs in specific columns: ":set tabcol=8,20,34,56" (Demirel). +- Add 'searchdir' option: Directories to search for file name being edited + (Demirel). +- Modifier for the put command: Change to linewise, charwise, blockwise, etc. +- Add commands for saving and restoring options ":set save" "set restore", + for use in macro's and the like. +- Keep output from listings in a window, so you can have a look at it while + working in another window. Put cmdline in a separate window? +- Add possibility to put output of Ex commands in a buffer or file, e.g. for + ":set all". ":r :set all"? +- When the 'equalalways' option is set, creating a new window should not + result in windows to become bigger. Deleting a window should not result in + a window to become smaller (Webb). +- When resizing the whole Vim window, the windows inside should be resized + proportionally (Webb). +- Include options directly in option table, no indirect pointers. Use + mkopttab to make option table? +- When doing ":w dir", where "dir" is a directory name, write the current + file into that directory, with the current file name (without the path)? +- Support for 'dictionary's that are sorted, makes access a lot faster + (Haritsis). +- Add "^Vrx" on the command line, replace with contents of register x. Used + instead of CTRL-R to make repeating possible. (Marinichev) +- Add "^Vb" on the command line, replace with word before or under the + cursor? +- Option to make a .swp file only when a change is made (Templeton). +- Support mapping for replace mode and "r" command (Vi doesn't do this)? +5 Add 'ignorefilecase' option: Ignore case when expanding file names. + ":e ma<Tab>" would also find "Makefile" on Unix. +8 Sorting of filenames for completion is wrong on systems that ignore + case of filenames. Add 'ignorefncase' option. When set, case in + filenames is ignored for sorting them. Patch by Mike Williams: + ~/vim/patches/ignorefncase. Also change what matches? Or use another + option name. +8 Should be able to compile Vim in another directory, with $(srcdir) set to + where the sources are. Add $(srcdir) in the Makefile in a lot of places. + (Netherton) +6 Make it configurable when "J" inserts a space or not. Should not add a + space after "(", for example. +5 When inserting spaces after the end-of-line for 'virtualedit', use tabs + when the user wants this (e.g., add a "tab" field to 'virtualedit'). + (Servatius Brandt) + + +From Elvis: +- Use "instman.sh" to install manpages? +- Add ":alias" command. +- Search patterns: + \@ match word under cursor. + but do: + \@w match the word under the cursor? + \@W match the WORD under the cursor? +8 ":window" command: + :win + next window (up) + :win ++ idem, wrapping + :win - previous window (down) + :win -- idem, wrapping + :win nr to window number "nr" + :win name to window editing buffer "name" +7 ":cc" compiles a single file (default: current one). 'ccprg' option is + program to use with ":cc". Use ":compile" instead of ":cc"? + + +From xvi: +- CTRL-_ : swap 8th bit of character. +- Add egrep-like regex type, like xvi (Ned Konz) or Perl (Emmanuel Mogenet) + + +From vile: +- When horizontal scrolling, use '>' for lines continuing right of a window. +- Support putting .swp files in /tmp: Command in rc.local to move .swp files + from /tmp to some directory before deleting files. + + +Far future and "big" extensions: +- Instead of using a Makefile and autoconf, use a simple shell script to + find the C compiler and do everything with C code. Translate something + like an Aap recipe and configure.in to C. Avoids depending on Python, + thus will work everywhere. With batch file to find the C compiler it + would also work on MS-Windows. +- Make it easy to setup Vim for groups of users: novice vi users, novice + Vim users, C programmers, xterm users, GUI users,... +- Change layout of blocks in swap file: Text at the start, with '\n' in + between lines (just load the file without changes, except for Mac). + Indexes for lines are from the end of the block backwards. It's the + current layout mirrored. +- Make it possible to edit a register, in a window, like a buffer. +- Add stuff to syntax highlighting to change the text (upper-case keywords, + set indent, define other highlighting, etc.). +- Mode to keep C-code formatted all the time (sort of on-line indent). +- Several top-level windows in one Vim session. Be able to use a different + font in each top-level window. +- Allow editing above start and below end of buffer (flag in 'virtualedit'). +- Smart cut/paste: recognize words and adjust spaces before/after them. +- Add open mode, use it when terminal has no cursor positioning. +- Special "drawing mode": a line is drawn where the cursor is moved to. + Backspace deletes along the line (from jvim). +- Implement ":Bset", set option in all buffers. Also ":Wset", set in all + windows, ":Aset, set in all arguments and ":Tset", set in all files + mentioned in the tags file. + Add buffer/arg range, like in ":2,5B%s/..." (do we really need this???) + Add search string: "B/*.c/%s/.."? Or ":F/*.c/%s/.."? +- Support for underlining (underscore-BS-char), bold (char-BS-char) and other + standout modes switched on/off with , 'overstrike' option (Reiter). +- Add vertical mode (Paul Jury, Demirel): "5vdw" deletes a word in five + lines, "3vitextESC" will insert "text" in three lines, etc.. +4 Recognize l, #, p as 'flags' to EX commands: + :g/RE/#l shall print lines with line numbers and in list format. + :g/RE/dp shall print lines that are deleted. + POSIX: Commands where flags shall apply to all lines written: list, + number, open, print, substitute, visual, &, z. For other commands, flags + shall apply to the current line after the command completes. Examples: + :7,10j #l Join the lines 7-10 and print the result in list +- Allow two or more users to edit the same file at the same time. Changes + are reflected in each Vim immediately. Could work with local files but + also over the internet. See http://www.codingmonkeys.de/subethaedit/. + +When using "do" or ":diffget" in a buffer with changes in every line an extra +empty line would appear. + +vim:tw=78:sw=4:sts=4:ts=8:ft=help:norl: +vim: set fo+=n : diff --git a/runtime/doc/uganda.txt b/runtime/doc/uganda.txt new file mode 100644 index 0000000000..113df4f64f --- /dev/null +++ b/runtime/doc/uganda.txt @@ -0,0 +1,288 @@ +*uganda.txt* For Vim version 7.4. Last change: 2013 Jul 06 + + + VIM REFERENCE MANUAL by Bram Moolenaar + + + *uganda* *Uganda* *copying* *copyright* *license* +SUMMARY + *iccf* *ICCF* +Vim is Charityware. You can use and copy it as much as you like, but you are +encouraged to make a donation for needy children in Uganda. Please see |kcc| +below or visit the ICCF web site, available at these URLs: + + http://iccf-holland.org/ + http://www.vim.org/iccf/ + http://www.iccf.nl/ + +You can also sponsor the development of Vim. Vim sponsors can vote for +features. See |sponsor|. The money goes to Uganda anyway. + +The Open Publication License applies to the Vim documentation, see +|manual-copyright|. + +=== begin of license === + +VIM LICENSE + +I) There are no restrictions on distributing unmodified copies of Vim except + that they must include this license text. You can also distribute + unmodified parts of Vim, likewise unrestricted except that they must + include this license text. You are also allowed to include executables + that you made from the unmodified Vim sources, plus your own usage + examples and Vim scripts. + +II) It is allowed to distribute a modified (or extended) version of Vim, + including executables and/or source code, when the following four + conditions are met: + 1) This license text must be included unmodified. + 2) The modified Vim must be distributed in one of the following five ways: + a) If you make changes to Vim yourself, you must clearly describe in + the distribution how to contact you. When the maintainer asks you + (in any way) for a copy of the modified Vim you distributed, you + must make your changes, including source code, available to the + maintainer without fee. The maintainer reserves the right to + include your changes in the official version of Vim. What the + maintainer will do with your changes and under what license they + will be distributed is negotiable. If there has been no negotiation + then this license, or a later version, also applies to your changes. + The current maintainer is Bram Moolenaar <Bram@vim.org>. If this + changes it will be announced in appropriate places (most likely + vim.sf.net, www.vim.org and/or comp.editors). When it is completely + impossible to contact the maintainer, the obligation to send him + your changes ceases. Once the maintainer has confirmed that he has + received your changes they will not have to be sent again. + b) If you have received a modified Vim that was distributed as + mentioned under a) you are allowed to further distribute it + unmodified, as mentioned at I). If you make additional changes the + text under a) applies to those changes. + c) Provide all the changes, including source code, with every copy of + the modified Vim you distribute. This may be done in the form of a + context diff. You can choose what license to use for new code you + add. The changes and their license must not restrict others from + making their own changes to the official version of Vim. + d) When you have a modified Vim which includes changes as mentioned + under c), you can distribute it without the source code for the + changes if the following three conditions are met: + - The license that applies to the changes permits you to distribute + the changes to the Vim maintainer without fee or restriction, and + permits the Vim maintainer to include the changes in the official + version of Vim without fee or restriction. + - You keep the changes for at least three years after last + distributing the corresponding modified Vim. When the maintainer + or someone who you distributed the modified Vim to asks you (in + any way) for the changes within this period, you must make them + available to him. + - You clearly describe in the distribution how to contact you. This + contact information must remain valid for at least three years + after last distributing the corresponding modified Vim, or as long + as possible. + e) When the GNU General Public License (GPL) applies to the changes, + you can distribute the modified Vim under the GNU GPL version 2 or + any later version. + 3) A message must be added, at least in the output of the ":version" + command and in the intro screen, such that the user of the modified Vim + is able to see that it was modified. When distributing as mentioned + under 2)e) adding the message is only required for as far as this does + not conflict with the license used for the changes. + 4) The contact information as required under 2)a) and 2)d) must not be + removed or changed, except that the person himself can make + corrections. + +III) If you distribute a modified version of Vim, you are encouraged to use + the Vim license for your changes and make them available to the + maintainer, including the source code. The preferred way to do this is + by e-mail or by uploading the files to a server and e-mailing the URL. + If the number of changes is small (e.g., a modified Makefile) e-mailing a + context diff will do. The e-mail address to be used is + <maintainer@vim.org> + +IV) It is not allowed to remove this license from the distribution of the Vim + sources, parts of it or from a modified version. You may use this + license for previous Vim releases instead of the license that they came + with, at your option. + +=== end of license === + +Note: + +- If you are happy with Vim, please express that by reading the rest of this + file and consider helping needy children in Uganda. + +- If you want to support further Vim development consider becoming a + |sponsor|. The money goes to Uganda anyway. + +- According to Richard Stallman the Vim license is GNU GPL compatible. + A few minor changes have been made since he checked it, but that should not + make a difference. + +- If you link Vim with a library that goes under the GNU GPL, this limits + further distribution to the GNU GPL. Also when you didn't actually change + anything in Vim. + +- Once a change is included that goes under the GNU GPL, this forces all + further changes to also be made under the GNU GPL or a compatible license. + +- If you distribute a modified version of Vim, you can include your name and + contact information with the "--with-modified-by" configure argument or the + MODIFIED_BY define. + +============================================================================== +Kibaale Children's Centre *kcc* *Kibaale* *charity* + +Kibaale Children's Centre (KCC) is located in Kibaale, a small town in the +south of Uganda, near Tanzania, in East Africa. The area is known as Rakai +District. The population is mostly farmers. Although people are poor, there +is enough food. But this district is suffering from AIDS more than any other +part of the world. Some say that it started there. Estimations are that 10 +to 30% of the Ugandans are infected with HIV. Because parents die, there are +many orphans. In this district about 60,000 children have lost one or both +parents, out of a population of 350,000. And this is still continuing. + +The children need a lot of help. The KCC is working hard to provide the needy +with food, medical care and education. Food and medical care to keep them +healthy now, and education so that they can take care of themselves in the +future. KCC works on a Christian base, but help is given to children of any +religion. + +The key to solving the problems in this area is education. This has been +neglected in the past years with president Idi Amin and the following civil +wars. Now that the government is stable again, the children and parents have +to learn how to take care of themselves and how to avoid infections. There is +also help for people who are ill and hungry, but the primary goal is to +prevent people from getting ill and to teach them how to grow healthy food. + +Most of the orphans are living in an extended family. An uncle or older +sister is taking care of them. Because these families are big and the income +(if any) is low, a child is lucky if it gets healthy food. Clothes, medical +care and schooling is beyond its reach. To help these needy children, a +sponsorship program was put into place. A child can be financially adopted. +For a few dollars a month KCC sees to it that the child gets indispensable +items, is healthy, goes to school and KCC takes care of anything else that +needs to be done for the child and the family that supports it. + +Besides helping the child directly, the environment where the child grows up +needs to be improved. KCC helps schools to improve their teaching methods. +There is a demonstration school at the centre and teacher trainings are given. +Health workers are being trained, hygiene education is carried out and +households are stimulated to build a proper latrine. I helped setting up a +production site for cement slabs. These are used to build a good latrine. +They are sold below cost price. + +There is a small clinic at the project, which provides children and their +family with medical help. When needed, transport to a hospital is offered. +Immunization programs are carried out and help is provided when an epidemic is +breaking out (measles and cholera have been a problem). + *donate* +Summer 1994 to summer 1995 I spent a whole year at the centre, working as a +volunteer. I have helped to expand the centre and worked in the area of water +and sanitation. I learned that the help that the KCC provides really helps. +When I came back to Holland, I wanted to continue supporting KCC. To do this +I'm raising funds and organizing the sponsorship program. Please consider one +of these possibilities: + +1. Sponsor a child in primary school: 17 euro a month (or more). +2. Sponsor a child in secondary school: 25 euro a month (or more). +3. Sponsor the clinic: Any amount a month or quarter +4. A one-time donation + +Compared with other organizations that do child sponsorship the amounts are +very low. This is because the money goes directly to the centre. Less than +5% is used for administration. This is possible because this is a small +organization that works with volunteers. If you would like to sponsor a +child, you should have the intention to do this for at least one year. + +How do you know that the money will be spent right? First of all you have my +personal guarantee as the author of Vim. I trust the people that are working +at the centre, I know them personally. Further more, the centre has been +co-sponsored and inspected by World Vision, Save the Children Fund and is now +under the supervision of Pacific Academy Outreach Society. The centre is +visited about once a year to check the progress (at our own cost). I have +visited the centre myself many times, starting in 1993. The visit reports are +on the ICCF web site. + +If you have any further questions, send me e-mail: <Bram@vim.org>. + +The address of the centre is: + Kibaale Children's Centre + p.o. box 1658 + Masaka, Uganda, East Africa + +Sending money: *iccf-donations* + +Check the ICCF web site for the latest information! See |iccf| for the URL. + + +USA: The methods mentioned below can be used. + Sending a check to the Nehemiah Group Outreach Society (NGOS) + is no longer possible, unfortunately. We are looking for + another way to get you an IRS tax receipt. + For sponsoring a child contact KCF in Canada (see below). US + checks can be sent to them to lower banking costs. + +Canada: Contact Kibaale Children's Fund (KCF) in Surrey, Canada. They + take care of the Canadian sponsors for the children in + Kibaale. KCF forwards 100% of the money to the project in + Uganda. You can send them a one time donation directly. + Please send me a note so that I know what has been donated + because of Vim. Ask KCF for information about sponsorship. + Kibaale Children's Fund c/o Pacific Academy + 10238-168 Street + Surrey, B.C. V4N 1Z4 + Canada + Phone: 604-581-5353 + If you make a donation to Kibaale Children's Fund (KCF) you + will receive a tax receipt which can be submitted with your + tax return. + +Holland: Transfer to the account of "Stichting ICCF Holland" in Lisse. + This will allow for tax deduction if you live in Holland. + Postbank, nr. 4548774 + IBAN: NL95 INGB 0004 5487 74 + +Germany: It is possible to make donations that allow for a tax return. + Check the ICCF web site for the latest information: + http://iccf-holland.org/germany.html + +World: Use a postal money order. That should be possible from any + country, mostly from the post office. Use this name (which is + in my passport): "Abraham Moolenaar". Use Euro for the + currency if possible. + +Europe: Use a bank transfer if possible. Your bank should have a form + that you can use for this. See "Others" below for the swift + code and IBAN number. + Any other method should work. Ask for information about + sponsorship. + +Credit Card: You can use PayPal to send money with a Credit card. This is + the most widely used Internet based payment system. It's + really simple to use. Use this link to find more info: + https://www.paypal.com/en_US/mrb/pal=XAC62PML3GF8Q + The e-mail address for sending the money to is: + Bram@iccf-holland.org + For amounts above 400 Euro ($500) sending a check is + preferred. + +Others: Transfer to one of these accounts if possible: + Postbank, account 4548774 + Swift code: INGB NL 2A + IBAN: NL95 INGB 0004 5487 74 + under the name "stichting ICCF Holland", Lisse + If that doesn't work: + Rabobank Lisse, account 3765.05.117 + Swift code: RABO NL 2U + under the name "Bram Moolenaar", Lisse + Otherwise, send a check in euro or US dollars to the address + below. Minimal amount: $70 (my bank does not accept smaller + amounts for foreign check, sorry) + +Address to send checks to: + Bram Moolenaar + Finsterruetihof 1 + 8134 Adliswil + Switzerland + +This address is expected to be valid for a long time. + + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/undo.txt b/runtime/doc/undo.txt new file mode 100644 index 0000000000..46469b3533 --- /dev/null +++ b/runtime/doc/undo.txt @@ -0,0 +1,406 @@ +*undo.txt* For Vim version 7.4. Last change: 2014 May 24 + + + VIM REFERENCE MANUAL by Bram Moolenaar + + +Undo and redo *undo-redo* + +The basics are explained in section |02.5| of the user manual. + +1. Undo and redo commands |undo-commands| +2. Two ways of undo |undo-two-ways| +3. Undo blocks |undo-blocks| +4. Undo branches |undo-branches| +5. Undo persistence |undo-persistence| +6. Remarks about undo |undo-remarks| + +============================================================================== +1. Undo and redo commands *undo-commands* + +<Undo> or *undo* *<Undo>* *u* +u Undo [count] changes. {Vi: only one level} + + *:u* *:un* *:undo* +:u[ndo] Undo one change. {Vi: only one level} + *E830* +:u[ndo] {N} Jump to after change number {N}. See |undo-branches| + for the meaning of {N}. {not in Vi} + + *CTRL-R* +CTRL-R Redo [count] changes which were undone. {Vi: redraw + screen} + + *:red* *:redo* *redo* +:red[o] Redo one change which was undone. {Vi: no redo} + + *U* +U Undo all latest changes on one line, the line where + the latest change was made. |U| itself also counts as + a change, and thus |U| undoes a previous |U|. + {Vi: while not moved off of the last modified line} + +The last changes are remembered. You can use the undo and redo commands above +to revert the text to how it was before each change. You can also apply the +changes again, getting back the text before the undo. + +The "U" command is treated by undo/redo just like any other command. Thus a +"u" command undoes a "U" command and a 'CTRL-R' command redoes it again. When +mixing "U", "u" and 'CTRL-R' you will notice that the "U" command will +restore the situation of a line to before the previous "U" command. This may +be confusing. Try it out to get used to it. +The "U" command will always mark the buffer as changed. When "U" changes the +buffer back to how it was without changes, it is still considered changed. +Use "u" to undo changes until the buffer becomes unchanged. + +============================================================================== +2. Two ways of undo *undo-two-ways* + +How undo and redo commands work depends on the 'u' flag in 'cpoptions'. +There is the Vim way ('u' excluded) and the Vi-compatible way ('u' included). +In the Vim way, "uu" undoes two changes. In the Vi-compatible way, "uu" does +nothing (undoes an undo). + +'u' excluded, the Vim way: +You can go back in time with the undo command. You can then go forward again +with the redo command. If you make a new change after the undo command, +the redo will not be possible anymore. + +'u' included, the Vi-compatible way: +The undo command undoes the previous change, and also the previous undo command. +The redo command repeats the previous undo command. It does NOT repeat a +change command, use "." for that. + +Examples Vim way Vi-compatible way ~ +"uu" two times undo no-op +"u CTRL-R" no-op two times undo + +Rationale: Nvi uses the "." command instead of CTRL-R. Unfortunately, this + is not Vi compatible. For example "dwdwu." in Vi deletes two + words, in Nvi it does nothing. + +============================================================================== +3. Undo blocks *undo-blocks* + +One undo command normally undoes a typed command, no matter how many changes +that command makes. This sequence of undo-able changes forms an undo block. +Thus if the typed key(s) call a function, all the commands in the function are +undone together. + +If you want to write a function or script that doesn't create a new undoable +change but joins in with the previous change use this command: + + *:undoj* *:undojoin* *E790* +:undoj[oin] Join further changes with the previous undo block. + Warning: Use with care, it may prevent the user from + properly undoing changes. Don't use this after undo + or redo. + {not in Vi} + +This is most useful when you need to prompt the user halfway through a change. +For example in a function that calls |getchar()|. Do make sure that there was +a related change before this that you must join with. + +This doesn't work by itself, because the next key press will start a new +change again. But you can do something like this: > + + :undojoin | delete + +After this an "u" command will undo the delete command and the previous +change. + +To do the opposite, break a change into two undo blocks, in Insert mode use +CTRL-G u. This is useful if you want an insert command to be undoable in +parts. E.g., for each sentence. |i_CTRL-G_u| +Setting the value of 'undolevels' also breaks undo. Even when the new value +is equal to the old value. + +============================================================================== +4. Undo branches *undo-branches* *undo-tree* + +Above we only discussed one line of undo/redo. But it is also possible to +branch off. This happens when you undo a few changes and then make a new +change. The undone changes become a branch. You can go to that branch with +the following commands. + +This is explained in the user manual: |usr_32.txt|. + + *:undol* *:undolist* +:undol[ist] List the leafs in the tree of changes. Example: + number changes when saved ~ + 88 88 2010/01/04 14:25:53 + 108 107 08/07 12:47:51 + 136 46 13:33:01 7 + 166 164 3 seconds ago + + The "number" column is the change number. This number + continuously increases and can be used to identify a + specific undo-able change, see |:undo|. + The "changes" column is the number of changes to this + leaf from the root of the tree. + The "when" column is the date and time when this + change was made. The four possible formats are: + N seconds ago + HH:MM:SS hour, minute, seconds + MM/DD HH:MM:SS idem, with month and day + YYYY/MM/DD HH:MM:SS idem, with year + The "saved" column specifies, if this change was + written to disk and which file write it was. This can + be used with the |:later| and |:earlier| commands. + For more details use the |undotree()| function. + + *g-* +g- Go to older text state. With a count repeat that many + times. {not in Vi} + *:ea* *:earlier* +:earlier {count} Go to older text state {count} times. +:earlier {N}s Go to older text state about {N} seconds before. +:earlier {N}m Go to older text state about {N} minutes before. +:earlier {N}h Go to older text state about {N} hours before. +:earlier {N}d Go to older text state about {N} days before. + +:earlier {N}f Go to older text state {N} file writes before. + When changes were made since the last write + ":earlier 1f" will revert the text to the state when + it was written. Otherwise it will go to the write + before that. + When at the state of the first file write, or when + the file was not written, ":earlier 1f" will go to + before the first change. + + *g+* +g+ Go to newer text state. With a count repeat that many + times. {not in Vi} + *:lat* *:later* +:later {count} Go to newer text state {count} times. +:later {N}s Go to newer text state about {N} seconds later. +:later {N}m Go to newer text state about {N} minutes later. +:later {N}h Go to newer text state about {N} hours later. +:later {N}d Go to newer text state about {N} days later. + +:later {N}f Go to newer text state {N} file writes later. + When at the state of the last file write, ":later 1f" + will go to the newest text state. + + +Note that text states will become unreachable when undo information is cleared +for 'undolevels'. + +Don't be surprised when moving through time shows multiple changes to take +place at a time. This happens when moving through the undo tree and then +making a new change. + +EXAMPLE + +Start with this text: + one two three ~ + +Delete the first word by pressing "x" three times: + ne two three ~ + e two three ~ + two three ~ + +Now undo that by pressing "u" three times: + e two three ~ + ne two three ~ + one two three ~ + +Delete the second word by pressing "x" three times: + one wo three ~ + one o three ~ + one three ~ + +Now undo that by using "g-" three times: + one o three ~ + one wo three ~ + two three ~ + +You are now back in the first undo branch, after deleting "one". Repeating +"g-" will now bring you back to the original text: + e two three ~ + ne two three ~ + one two three ~ + +Jump to the last change with ":later 1h": + one three ~ + +And back to the start again with ":earlier 1h": + one two three ~ + + +Note that using "u" and CTRL-R will not get you to all possible text states +while repeating "g-" and "g+" does. + +============================================================================== +5. Undo persistence *undo-persistence* *persistent-undo* + +When unloading a buffer Vim normally destroys the tree of undos created for +that buffer. By setting the 'undofile' option, Vim will automatically save +your undo history when you write a file and restore undo history when you edit +the file again. + +The 'undofile' option is checked after writing a file, before the BufWritePost +autocommands. If you want to control what files to write undo information +for, you can use a BufWritePre autocommand: > + au BufWritePre /tmp/* setlocal noundofile + +Vim saves undo trees in a separate undo file, one for each edited file, using +a simple scheme that maps filesystem paths directly to undo files. Vim will +detect if an undo file is no longer synchronized with the file it was written +for (with a hash of the file contents) and ignore it when the file was changed +after the undo file was written, to prevent corruption. An undo file is also +ignored if its owner differs from the owner of the edited file, except when +the owner of the undo file is the current user. Set 'verbose' to get a +message about that when opening a file. + +Undo files are normally saved in the same directory as the file. This can be +changed with the 'undodir' option. + +When the file is encrypted, the text in the undo file is also crypted. The +same key and method is used. |encryption| + +You can also save and restore undo histories by using ":wundo" and ":rundo" +respectively: + *:wundo* *:rundo* +:wundo[!] {file} + Write undo history to {file}. + When {file} exists and it does not look like an undo file + (the magic number at the start of the file is wrong), then + this fails, unless the ! was added. + If it exists and does look like an undo file it is + overwritten. If there is no undo-history, nothing will be + written. + Implementation detail: Overwriting happens by first deleting + the existing file and then creating a new file with the same + name. So it is not possible to overwrite an existing undofile + in a write-protected directory. + {not in Vi} + +:rundo {file} Read undo history from {file}. + {not in Vi} + +You can use these in autocommands to explicitly specify the name of the +history file. E.g.: > + + au BufReadPost * call ReadUndo() + au BufWritePost * call WriteUndo() + func ReadUndo() + if filereadable(expand('%:h'). '/UNDO/' . expand('%:t')) + rundo %:h/UNDO/%:t + endif + endfunc + func WriteUndo() + let dirname = expand('%:h') . '/UNDO' + if !isdirectory(dirname) + call mkdir(dirname) + endif + wundo %:h/UNDO/%:t + endfunc + +You should keep 'undofile' off, otherwise you end up with two undo files for +every write. + +You can use the |undofile()| function to find out the file name that Vim would +use. + +Note that while reading/writing files and 'undofile' is set most errors will +be silent, unless 'verbose' is set. With :wundo and :rundo you will get more +error messages, e.g., when the file cannot be read or written. + +NOTE: undo files are never deleted by Vim. You need to delete them yourself. + +Reading an existing undo file may fail for several reasons: +*E822* It cannot be opened, because the file permissions don't allow it. +*E823* The magic number at the start of the file doesn't match. This usually + means it is not an undo file. +*E824* The version number of the undo file indicates that it's written by a + newer version of Vim. You need that newer version to open it. Don't + write the buffer if you want to keep the undo info in the file. +"File contents changed, cannot use undo info" + The file text differs from when the undo file was written. This means + the undo file cannot be used, it would corrupt the text. This also + happens when 'encoding' differs from when the undo file was written. +*E825* The undo file does not contain valid contents and cannot be used. +*E826* The undo file is encrypted but decryption failed. +*E827* The undo file is encrypted but this version of Vim does not support + encryption. Open the file with another Vim. +*E832* The undo file is encrypted but 'key' is not set, the text file is not + encrypted. This would happen if the text file was written by Vim + encrypted at first, and later overwritten by not encrypted text. + You probably want to delete this undo file. +"Not reading undo file, owner differs" + The undo file is owned by someone else than the owner of the text + file. For safety the undo file is not used. + +Writing an undo file may fail for these reasons: +*E828* The file to be written cannot be created. Perhaps you do not have + write permissions in the directory. +"Cannot write undo file in any directory in 'undodir'" + None of the directories in 'undodir' can be used. +"Will not overwrite with undo file, cannot read" + A file exists with the name of the undo file to be written, but it + cannot be read. You may want to delete this file or rename it. +"Will not overwrite, this is not an undo file" + A file exists with the name of the undo file to be written, but it + does not start with the right magic number. You may want to delete + this file or rename it. +"Skipping undo file write, nothing to undo" + There is no undo information to be written, nothing has been changed + or 'undolevels' is negative. +*E829* An error occurred while writing the undo file. You may want to try + again. + +============================================================================== +6. Remarks about undo *undo-remarks* + +The number of changes that are remembered is set with the 'undolevels' option. +If it is zero, the Vi-compatible way is always used. If it is negative no +undo is possible. Use this if you are running out of memory. + + *clear-undo* +When you set 'undolevels' to -1 the undo information is not immediately +cleared, this happens at the next change. To force clearing the undo +information you can use these commands: > + :let old_undolevels = &undolevels + :set undolevels=-1 + :exe "normal a \<BS>\<Esc>" + :let &undolevels = old_undolevels + :unlet old_undolevels + +Marks for the buffer ('a to 'z) are also saved and restored, together with the +text. {Vi does this a little bit different} + +When all changes have been undone, the buffer is not considered to be changed. +It is then possible to exit Vim with ":q" instead of ":q!" {not in Vi}. Note +that this is relative to the last write of the file. Typing "u" after ":w" +actually changes the buffer, compared to what was written, so the buffer is +considered changed then. + +When manual |folding| is being used, the folds are not saved and restored. +Only changes completely within a fold will keep the fold as it was, because +the first and last line of the fold don't change. + +The numbered registers can also be used for undoing deletes. Each time you +delete text, it is put into register "1. The contents of register "1 are +shifted to "2, etc. The contents of register "9 are lost. You can now get +back the most recent deleted text with the put command: '"1P'. (also, if the +deleted text was the result of the last delete or copy operation, 'P' or 'p' +also works as this puts the contents of the unnamed register). You can get +back the text of three deletes ago with '"3P'. + + *redo-register* +If you want to get back more than one part of deleted text, you can use a +special feature of the repeat command ".". It will increase the number of the +register used. So if you first do ""1P", the following "." will result in a +'"2P'. Repeating this will result in all numbered registers being inserted. + +Example: If you deleted text with 'dd....' it can be restored with + '"1P....'. + +If you don't know in which register the deleted text is, you can use the +:display command. An alternative is to try the first register with '"1P', and +if it is not what you want do 'u.'. This will remove the contents of the +first put, and repeat the put command for the second register. Repeat the +'u.' until you got what you want. + + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_01.txt b/runtime/doc/usr_01.txt new file mode 100644 index 0000000000..11fa2173d6 --- /dev/null +++ b/runtime/doc/usr_01.txt @@ -0,0 +1,192 @@ +*usr_01.txt* For Vim version 7.4. Last change: 2010 Nov 03 + + VIM USER MANUAL - by Bram Moolenaar + + About the manuals + + +This chapter introduces the manuals available with Vim. Read this to know the +conditions under which the commands are explained. + +|01.1| Two manuals +|01.2| Vim installed +|01.3| Using the Vim tutor +|01.4| Copyright + + Next chapter: |usr_02.txt| The first steps in Vim +Table of contents: |usr_toc.txt| + +============================================================================== +*01.1* Two manuals + +The Vim documentation consists of two parts: + +1. The User manual + Task oriented explanations, from simple to complex. Reads from start to + end like a book. + +2. The Reference manual + Precise description of how everything in Vim works. + +The notation used in these manuals is explained here: |notation| + + +JUMPING AROUND + +The text contains hyperlinks between the two parts, allowing you to quickly +jump between the description of an editing task and a precise explanation of +the commands and options used for it. Use these two commands: + + Press CTRL-] to jump to a subject under the cursor. + Press CTRL-O to jump back (repeat to go further back). + +Many links are in vertical bars, like this: |bars|. The bars themselves may +be hidden or invisible, see below. An option name, like 'number', a command +in double quotes like ":write" and any other word can also be used as a link. +Try it out: Move the cursor to CTRL-] and press CTRL-] on it. + +Other subjects can be found with the ":help" command, see |help.txt|. + +The bars and stars are usually hidden with the |conceal| feature. They also +use |hl-Ignore|, using the same color for the text as the background. You can +make them visible with: > + :set conceallevel=0 + :hi link HelpBar Normal + :hi link HelpStar Normal + +============================================================================== +*01.2* Vim installed + +Most of the manuals assume that Vim has been properly installed. If you +didn't do that yet, or if Vim doesn't run properly (e.g., files can't be found +or in the GUI the menus do not show up) first read the chapter on +installation: |usr_90.txt|. + *not-compatible* +The manuals often assume you are using Vim with Vi-compatibility switched +off. For most commands this doesn't matter, but sometimes it is important, +e.g., for multi-level undo. An easy way to make sure you are using a nice +setup is to copy the example vimrc file. By doing this inside Vim you don't +have to check out where it is located. How to do this depends on the system +you are using: + +Unix: > + :!cp -i $VIMRUNTIME/vimrc_example.vim ~/.vimrc +MS-DOS, MS-Windows, OS/2: > + :!copy $VIMRUNTIME/vimrc_example.vim $VIM/_vimrc +Amiga: > + :!copy $VIMRUNTIME/vimrc_example.vim $VIM/.vimrc + +If the file already exists you probably want to keep it. + +If you start Vim now, the 'compatible' option should be off. You can check it +with this command: > + + :set compatible? + +If it responds with "nocompatible" you are doing well. If the response is +"compatible" you are in trouble. You will have to find out why the option is +still set. Perhaps the file you wrote above is not found. Use this command +to find out: > + + :scriptnames + +If your file is not in the list, check its location and name. If it is in the +list, there must be some other place where the 'compatible' option is switched +back on. + +For more info see |vimrc| and |compatible-default|. + + Note: + This manual is about using Vim in the normal way. There is an + alternative called "evim" (easy Vim). This is still Vim, but used in + a way that resembles a click-and-type editor like Notepad. It always + stays in Insert mode, thus it feels very different. It is not + explained in the user manual, since it should be mostly self + explanatory. See |evim-keys| for details. + +============================================================================== +*01.3* Using the Vim tutor *tutor* *vimtutor* + +Instead of reading the text (boring!) you can use the vimtutor to learn your +first Vim commands. This is a 30 minute tutorial that teaches the most basic +Vim functionality hands-on. + +On Unix, if Vim has been properly installed, you can start it from the shell: +> + vimtutor + +On MS-Windows you can find it in the Program/Vim menu. Or execute +vimtutor.bat in the $VIMRUNTIME directory. + +This will make a copy of the tutor file, so that you can edit it without +the risk of damaging the original. + There are a few translated versions of the tutor. To find out if yours is +available, use the two-letter language code. For French: > + + vimtutor fr + +On Unix, if you prefer using the GUI version of Vim, use "gvimtutor" or +"vimtutor -g" instead of "vimtutor". + +For OpenVMS, if Vim has been properly installed, you can start vimtutor from a +VMS prompt with: > + + @VIM:vimtutor + +Optionally add the two-letter language code as above. + + +On other systems, you have to do a little work: + +1. Copy the tutor file. You can do this with Vim (it knows where to find it): +> + vim -u NONE -c 'e $VIMRUNTIME/tutor/tutor' -c 'w! TUTORCOPY' -c 'q' +< + This will write the file "TUTORCOPY" in the current directory. To use a +translated version of the tutor, append the two-letter language code to the +filename. For French: +> + vim -u NONE -c 'e $VIMRUNTIME/tutor/tutor.fr' -c 'w! TUTORCOPY' -c 'q' +< +2. Edit the copied file with Vim: +> + vim -u NONE -c "set nocp" TUTORCOPY +< + The extra arguments make sure Vim is started in a good mood. + +3. Delete the copied file when you are finished with it: +> + del TUTORCOPY +< +============================================================================== +*01.4* Copyright *manual-copyright* + +The Vim user manual and reference manual are Copyright (c) 1988-2003 by Bram +Moolenaar. This material may be distributed only subject to the terms and +conditions set forth in the Open Publication License, v1.0 or later. The +latest version is presently available at: + http://www.opencontent.org/openpub/ + +People who contribute to the manuals must agree with the above copyright +notice. + *frombook* +Parts of the user manual come from the book "Vi IMproved - Vim" by Steve +Oualline (published by New Riders Publishing, ISBN: 0735710015). The Open +Publication License applies to this book. Only selected parts are included +and these have been modified (e.g., by removing the pictures, updating the +text for Vim 6.0 and later, fixing mistakes). The omission of the |frombook| +tag does not mean that the text does not come from the book. + +Many thanks to Steve Oualline and New Riders for creating this book and +publishing it under the OPL! It has been a great help while writing the user +manual. Not only by providing literal text, but also by setting the tone and +style. + +If you make money through selling the manuals, you are strongly encouraged to +donate part of the profit to help AIDS victims in Uganda. See |iccf|. + +============================================================================== + +Next chapter: |usr_02.txt| The first steps in Vim + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_02.txt b/runtime/doc/usr_02.txt new file mode 100644 index 0000000000..8bfa9ba05d --- /dev/null +++ b/runtime/doc/usr_02.txt @@ -0,0 +1,564 @@ +*usr_02.txt* For Vim version 7.4. Last change: 2010 Jul 20 + + VIM USER MANUAL - by Bram Moolenaar + + The first steps in Vim + + +This chapter provides just enough information to edit a file with Vim. Not +well or fast, but you can edit. Take some time to practice with these +commands, they form the base for what follows. + +|02.1| Running Vim for the First Time +|02.2| Inserting text +|02.3| Moving around +|02.4| Deleting characters +|02.5| Undo and Redo +|02.6| Other editing commands +|02.7| Getting out +|02.8| Finding help + + Next chapter: |usr_03.txt| Moving around + Previous chapter: |usr_01.txt| About the manuals +Table of contents: |usr_toc.txt| + +============================================================================== +*02.1* Running Vim for the First Time + +To start Vim, enter this command: > + + gvim file.txt + +In UNIX you can type this at any command prompt. If you are running Microsoft +Windows, open an MS-DOS prompt window and enter the command. + In either case, Vim starts editing a file called file.txt. Because this +is a new file, you get a blank window. This is what your screen will look +like: + + +---------------------------------------+ + |# | + |~ | + |~ | + |~ | + |~ | + |"file.txt" [New file] | + +---------------------------------------+ + ('#" is the cursor position.) + +The tilde (~) lines indicate lines not in the file. In other words, when Vim +runs out of file to display, it displays tilde lines. At the bottom of the +screen, a message line indicates the file is named file.txt and shows that you +are creating a new file. The message information is temporary and other +information overwrites it. + + +THE VIM COMMAND + +The gvim command causes the editor to create a new window for editing. If you +use this command: > + + vim file.txt + +the editing occurs inside your command window. In other words, if you are +running inside an xterm, the editor uses your xterm window. If you are using +an MS-DOS command prompt window under Microsoft Windows, the editing occurs +inside this window. The text in the window will look the same for both +versions, but with gvim you have extra features, like a menu bar. More about +that later. + +============================================================================== +*02.2* Inserting text + +The Vim editor is a modal editor. That means that the editor behaves +differently, depending on which mode you are in. The two basic modes are +called Normal mode and Insert mode. In Normal mode the characters you type +are commands. In Insert mode the characters are inserted as text. + Since you have just started Vim it will be in Normal mode. To start Insert +mode you type the "i" command (i for Insert). Then you can enter +the text. It will be inserted into the file. Do not worry if you make +mistakes; you can correct them later. To enter the following programmer's +limerick, this is what you type: > + + iA very intelligent turtle + Found programming UNIX a hurdle + +After typing "turtle" you press the <Enter> key to start a new line. Finally +you press the <Esc> key to stop Insert mode and go back to Normal mode. You +now have two lines of text in your Vim window: + + +---------------------------------------+ + |A very intelligent turtle | + |Found programming UNIX a hurdle | + |~ | + |~ | + | | + +---------------------------------------+ + + +WHAT IS THE MODE? + +To be able to see what mode you are in, type this command: > + + :set showmode + +You will notice that when typing the colon Vim moves the cursor to the last +line of the window. That's where you type colon commands (commands that start +with a colon). Finish this command by pressing the <Enter> key (all commands +that start with a colon are finished this way). + Now, if you type the "i" command Vim will display --INSERT-- at the bottom +of the window. This indicates you are in Insert mode. + + +---------------------------------------+ + |A very intelligent turtle | + |Found programming UNIX a hurdle | + |~ | + |~ | + |-- INSERT -- | + +---------------------------------------+ + +If you press <Esc> to go back to Normal mode the last line will be made blank. + + +GETTING OUT OF TROUBLE + +One of the problems for Vim novices is mode confusion, which is caused by +forgetting which mode you are in or by accidentally typing a command that +switches modes. To get back to Normal mode, no matter what mode you are in, +press the <Esc> key. Sometimes you have to press it twice. If Vim beeps back +at you, you already are in Normal mode. + +============================================================================== +*02.3* Moving around + +After you return to Normal mode, you can move around by using these keys: + + h left *hjkl* + j down + k up + l right + +At first, it may appear that these commands were chosen at random. After all, +who ever heard of using l for right? But actually, there is a very good +reason for these choices: Moving the cursor is the most common thing you do in +an editor, and these keys are on the home row of your right hand. In other +words, these commands are placed where you can type them the fastest +(especially when you type with ten fingers). + + Note: + You can also move the cursor by using the arrow keys. If you do, + however, you greatly slow down your editing because to press the arrow + keys, you must move your hand from the text keys to the arrow keys. + Considering that you might be doing it hundreds of times an hour, this + can take a significant amount of time. + Also, there are keyboards which do not have arrow keys, or which + locate them in unusual places; therefore, knowing the use of the hjkl + keys helps in those situations. + +One way to remember these commands is that h is on the left, l is on the +right and j points down. In a picture: > + + k + h l + j + +The best way to learn these commands is by using them. Use the "i" command to +insert some more lines of text. Then use the hjkl keys to move around and +insert a word somewhere. Don't forget to press <Esc> to go back to Normal +mode. The |vimtutor| is also a nice way to learn by doing. + +For Japanese users, Hiroshi Iwatani suggested using this: + + Komsomolsk + ^ + | + Huan Ho <--- ---> Los Angeles + (Yellow river) | + v + Java (the island, not the programming language) + +============================================================================== +*02.4* Deleting characters + +To delete a character, move the cursor over it and type "x". (This is a +throwback to the old days of the typewriter, when you deleted things by typing +xxxx over them.) Move the cursor to the beginning of the first line, for +example, and type xxxxxxx (seven x's) to delete "A very ". The result should +look like this: + + +---------------------------------------+ + |intelligent turtle | + |Found programming UNIX a hurdle | + |~ | + |~ | + | | + +---------------------------------------+ + +Now you can insert new text, for example by typing: > + + iA young <Esc> + +This begins an insert (the i), inserts the words "A young", and then exits +insert mode (the final <Esc>). The result: + + +---------------------------------------+ + |A young intelligent turtle | + |Found programming UNIX a hurdle | + |~ | + |~ | + | | + +---------------------------------------+ + + +DELETING A LINE + +To delete a whole line use the "dd" command. The following line will +then move up to fill the gap: + + +---------------------------------------+ + |Found programming UNIX a hurdle | + |~ | + |~ | + |~ | + | | + +---------------------------------------+ + + +DELETING A LINE BREAK + +In Vim you can join two lines together, which means that the line break +between them is deleted. The "J" command does this. + Take these two lines: + + A young intelligent ~ + turtle ~ + +Move the cursor to the first line and press "J": + + A young intelligent turtle ~ + +============================================================================== +*02.5* Undo and Redo + +Suppose you delete too much. Well, you can type it in again, but an easier +way exists. The "u" command undoes the last edit. Take a look at this in +action: After using "dd" to delete the first line, "u" brings it back. + Another one: Move the cursor to the A in the first line: + + A young intelligent turtle ~ + +Now type xxxxxxx to delete "A young". The result is as follows: + + intelligent turtle ~ + +Type "u" to undo the last delete. That delete removed the g, so the undo +restores the character. + + g intelligent turtle ~ + +The next u command restores the next-to-last character deleted: + + ng intelligent turtle ~ + +The next u command gives you the u, and so on: + + ung intelligent turtle ~ + oung intelligent turtle ~ + young intelligent turtle ~ + young intelligent turtle ~ + A young intelligent turtle ~ + + Note: + If you type "u" twice, and the result is that you get the same text + back, you have Vim configured to work Vi compatible. Look here to fix + this: |not-compatible|. + This text assumes you work "The Vim Way". You might prefer to use + the good old Vi way, but you will have to watch out for small + differences in the text then. + + +REDO + +If you undo too many times, you can press CTRL-R (redo) to reverse the +preceding command. In other words, it undoes the undo. To see this in +action, press CTRL-R twice. The character A and the space after it disappear: + + young intelligent turtle ~ + +There's a special version of the undo command, the "U" (undo line) command. +The undo line command undoes all the changes made on the last line that was +edited. Typing this command twice cancels the preceding "U". + + A very intelligent turtle ~ + xxxx Delete very + + A intelligent turtle ~ + xxxxxx Delete turtle + + A intelligent ~ + Restore line with "U" + A very intelligent turtle ~ + Undo "U" with "u" + A intelligent ~ + +The "U" command is a change by itself, which the "u" command undoes and CTRL-R +redoes. This might be a bit confusing. Don't worry, with "u" and CTRL-R you +can go to any of the situations you had. More about that in section |32.2|. + +============================================================================== +*02.6* Other editing commands + +Vim has a large number of commands to change the text. See |Q_in| and below. +Here are a few often used ones. + + +APPENDING + +The "i" command inserts a character before the character under the cursor. +That works fine; but what happens if you want to add stuff to the end of the +line? For that you need to insert text after the cursor. This is done with +the "a" (append) command. + For example, to change the line + + and that's not saying much for the turtle. ~ +to + and that's not saying much for the turtle!!! ~ + +move the cursor over to the dot at the end of the line. Then type "x" to +delete the period. The cursor is now positioned at the end of the line on the +e in turtle. Now type > + + a!!!<Esc> + +to append three exclamation points after the e in turtle: + + and that's not saying much for the turtle!!! ~ + + +OPENING UP A NEW LINE + +The "o" command creates a new, empty line below the cursor and puts Vim in +Insert mode. Then you can type the text for the new line. + Suppose the cursor is somewhere in the first of these two lines: + + A very intelligent turtle ~ + Found programming UNIX a hurdle ~ + +If you now use the "o" command and type new text: > + + oThat liked using Vim<Esc> + +The result is: + + A very intelligent turtle ~ + That liked using Vim ~ + Found programming UNIX a hurdle ~ + +The "O" command (uppercase) opens a line above the cursor. + + +USING A COUNT + +Suppose you want to move up nine lines. You can type "kkkkkkkkk" or you can +enter the command "9k". In fact, you can precede many commands with a number. +Earlier in this chapter, for instance, you added three exclamation points to +the end of a line by typing "a!!!<Esc>". Another way to do this is to use the +command "3a!<Esc>". The count of 3 tells the command that follows to triple +its effect. Similarly, to delete three characters, use the command "3x". The +count always comes before the command it applies to. + +============================================================================== +*02.7* Getting out + +To exit, use the "ZZ" command. This command writes the file and exits. + + Note: + Unlike many other editors, Vim does not automatically make a backup + file. If you type "ZZ", your changes are committed and there's no + turning back. You can configure the Vim editor to produce backup + files, see |07.4|. + + +DISCARDING CHANGES + +Sometimes you will make a sequence of changes and suddenly realize you were +better off before you started. Not to worry; Vim has a +quit-and-throw-things-away command. It is: > + + :q! + +Don't forget to press <Enter> to finish the command. + +For those of you interested in the details, the three parts of this command +are the colon (:), which enters Command-line mode; the q command, which tells +the editor to quit; and the override command modifier (!). + The override command modifier is needed because Vim is reluctant to throw +away changes. If you were to just type ":q", Vim would display an error +message and refuse to exit: + + E37: No write since last change (use ! to override) ~ + +By specifying the override, you are in effect telling Vim, "I know that what +I'm doing looks stupid, but I'm a big boy and really want to do this." + +If you want to continue editing with Vim: The ":e!" command reloads the +original version of the file. + +============================================================================== +*02.8* Finding help + +Everything you always wanted to know can be found in the Vim help files. +Don't be afraid to ask! + To get generic help use this command: > + + :help + +You could also use the first function key <F1>. If your keyboard has a <Help> +key it might work as well. + If you don't supply a subject, ":help" displays the general help window. +The creators of Vim did something very clever (or very lazy) with the help +system: They made the help window a normal editing window. You can use all +the normal Vim commands to move through the help information. Therefore h, j, +k, and l move left, down, up and right. + To get out of the help window, use the same command you use to get out of +the editor: "ZZ". This will only close the help window, not exit Vim. + +As you read the help text, you will notice some text enclosed in vertical bars +(for example, |help|). This indicates a hyperlink. If you position the +cursor anywhere between the bars and press CTRL-] (jump to tag), the help +system takes you to the indicated subject. (For reasons not discussed here, +the Vim terminology for a hyperlink is tag. So CTRL-] jumps to the location +of the tag given by the word under the cursor.) + After a few jumps, you might want to go back. CTRL-T (pop tag) takes you +back to the preceding position. CTRL-O (jump to older position) also works +nicely here. + At the top of the help screen, there is the notation *help.txt*. This name +between "*" characters is used by the help system to define a tag (hyperlink +destination). + See |29.1| for details about using tags. + +To get help on a given subject, use the following command: > + + :help {subject} + +To get help on the "x" command, for example, enter the following: > + + :help x + +To find out how to delete text, use this command: > + + :help deleting + +To get a complete index of all Vim commands, use the following command: > + + :help index + +When you need to get help for a control character command (for example, +CTRL-A), you need to spell it with the prefix "CTRL-". > + + :help CTRL-A + +The Vim editor has many different modes. By default, the help system displays +the normal-mode commands. For example, the following command displays help +for the normal-mode CTRL-H command: > + + :help CTRL-H + +To identify other modes, use a mode prefix. If you want the help for the +insert-mode version of a command, use "i_". For CTRL-H this gives you the +following command: > + + :help i_CTRL-H + +When you start the Vim editor, you can use several command-line arguments. +These all begin with a dash (-). To find what the -t argument does, for +example, use the command: > + + :help -t + +The Vim editor has a number of options that enable you to configure and +customize the editor. If you want help for an option, you need to enclose it +in single quotation marks. To find out what the 'number' option does, for +example, use the following command: > + + :help 'number' + +The table with all mode prefixes can be found here: |help-context|. + +Special keys are enclosed in angle brackets. To find help on the up-arrow key +in Insert mode, for instance, use this command: > + + :help i_<Up> + +If you see an error message that you don't understand, for example: + + E37: No write since last change (use ! to override) ~ + +You can use the error ID at the start to find help about it: > + + :help E37 + + +Summary: *help-summary* > + :help +< Gives you very general help. Scroll down to see a list of all + helpfiles, including those added locally (i.e. not distributed + with Vim). > + :help user-toc.txt +< Table of contents of the User Manual. > + :help :subject +< Ex-command "subject", for instance the following: > + :help :help +< Help on getting help. > + :help abc +< normal-mode command "abc". > + :help CTRL-B +< Control key <C-B> in Normal mode. > + :help i_abc + :help i_CTRL-B +< The same in Insert mode. > + :help v_abc + :help v_CTRL-B +< The same in Visual mode. > + :help c_abc + :help c_CTRL-B +< The same in Command-line mode. > + :help 'subject' +< Option 'subject'. > + :help subject() +< Function "subject". > + :help -subject +< Command-line option "-subject". > + :help +subject +< Compile-time feature "+subject". > + :help EventName +< Autocommand event "EventName". > + :help digraphs.txt +< The top of the helpfile "digraph.txt". + Similarly for any other helpfile. > + :help pattern<Tab> +< Find a help tag starting with "pattern". Repeat <Tab> for + others. > + :help pattern<Ctrl-D> +< See all possible help tag matches "pattern" at once. > + :helpgrep pattern +< Search the whole text of all help files for pattern "pattern". + Jumps to the first match. Jump to other matches with: > + :cn +< next match > + :cprev + :cN +< previous match > + :cfirst + :clast +< first or last match > + :copen + :cclose +< open/close the quickfix window; press <Enter> to jump + to the item under the cursor + + +============================================================================== + +Next chapter: |usr_03.txt| Moving around + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_03.txt b/runtime/doc/usr_03.txt new file mode 100644 index 0000000000..6173260895 --- /dev/null +++ b/runtime/doc/usr_03.txt @@ -0,0 +1,654 @@ +*usr_03.txt* For Vim version 7.4. Last change: 2006 Jun 21 + + VIM USER MANUAL - by Bram Moolenaar + + Moving around + + +Before you can insert or delete text the cursor has to be moved to the right +place. Vim has a large number of commands to position the cursor. This +chapter shows you how to use the most important ones. You can find a list of +these commands below |Q_lr|. + +|03.1| Word movement +|03.2| Moving to the start or end of a line +|03.3| Moving to a character +|03.4| Matching a parenthesis +|03.5| Moving to a specific line +|03.6| Telling where you are +|03.7| Scrolling around +|03.8| Simple searches +|03.9| Simple search patterns +|03.10| Using marks + + Next chapter: |usr_04.txt| Making small changes + Previous chapter: |usr_02.txt| The first steps in Vim +Table of contents: |usr_toc.txt| + +============================================================================== +*03.1* Word movement + +To move the cursor forward one word, use the "w" command. Like most Vim +commands, you can use a numeric prefix to move past multiple words. For +example, "3w" moves three words. This figure shows how it works: + + This is a line with example text ~ + --->-->->-----------------> + w w w 3w + +Notice that "w" moves to the start of the next word if it already is at the +start of a word. + The "b" command moves backward to the start of the previous word: + + This is a line with example text ~ + <----<--<-<---------<--- + b b b 2b b + +There is also the "e" command that moves to the next end of a word and "ge", +which moves to the previous end of a word: + + This is a line with example text ~ + <- <--- -----> ----> + ge ge e e + +If you are at the last word of a line, the "w" command will take you to the +first word in the next line. Thus you can use this to move through a +paragraph, much faster than using "l". "b" does the same in the other +direction. + +A word ends at a non-word character, such as a ".", "-" or ")". To change +what Vim considers to be a word, see the 'iskeyword' option. + It is also possible to move by white-space separated WORDs. This is not a +word in the normal sense, that's why the uppercase is used. The commands for +moving by WORDs are also uppercase, as this figure shows: + + ge b w e + <- <- ---> ---> + This is-a line, with special/separated/words (and some more). ~ + <----- <----- --------------------> -----> + gE B W E + +With this mix of lowercase and uppercase commands, you can quickly move +forward and backward through a paragraph. + +============================================================================== +*03.2* Moving to the start or end of a line + +The "$" command moves the cursor to the end of a line. If your keyboard has +an <End> key it will do the same thing. + +The "^" command moves to the first non-blank character of the line. The "0" +command (zero) moves to the very first character of the line. The <Home> key +does the same thing. In a picture: + + ^ + <------------ + .....This is a line with example text ~ + <----------------- ---------------> + 0 $ + +(the "....." indicates blanks here) + + The "$" command takes a count, like most movement commands. But moving to +the end of the line several times doesn't make sense. Therefore it causes the +editor to move to the end of another line. For example, "1$" moves you to +the end of the first line (the one you're on), "2$" to the end of the next +line, and so on. + The "0" command doesn't take a count argument, because the "0" would be +part of the count. Unexpectedly, using a count with "^" doesn't have any +effect. + +============================================================================== +*03.3* Moving to a character + +One of the most useful movement commands is the single-character search +command. The command "fx" searches forward in the line for the single +character x. Hint: "f" stands for "Find". + For example, you are at the beginning of the following line. Suppose you +want to go to the h of human. Just execute the command "fh" and the cursor +will be positioned over the h: + + To err is human. To really foul up you need a computer. ~ + ---------->---------------> + fh fy + +This also shows that the command "fy" moves to the end of the word really. + You can specify a count; therefore, you can go to the "l" of "foul" with +"3fl": + + To err is human. To really foul up you need a computer. ~ + ---------------------> + 3fl + +The "F" command searches to the left: + + To err is human. To really foul up you need a computer. ~ + <--------------------- + Fh + +The "tx" command works like the "fx" command, except it stops one character +before the searched character. Hint: "t" stands for "To". The backward +version of this command is "Tx". + + To err is human. To really foul up you need a computer. ~ + <------------ -------------> + Th tn + +These four commands can be repeated with ";". "," repeats in the other +direction. The cursor is never moved to another line. Not even when the +sentence continues. + +Sometimes you will start a search, only to realize that you have typed the +wrong command. You type "f" to search backward, for example, only to realize +that you really meant "F". To abort a search, press <Esc>. So "f<Esc>" is an +aborted forward search and doesn't do anything. Note: <Esc> cancels most +operations, not just searches. + +============================================================================== +*03.4* Matching a parenthesis + +When writing a program you often end up with nested () constructs. Then the +"%" command is very handy: It moves to the matching paren. If the cursor is +on a "(" it will move to the matching ")". If it's on a ")" it will move to +the matching "(". + + % + <-----> + if (a == (b * c) / d) ~ + <----------------> + % + +This also works for [] and {} pairs. (This can be defined with the +'matchpairs' option.) + +When the cursor is not on a useful character, "%" will search forward to find +one. Thus if the cursor is at the start of the line of the previous example, +"%" will search forward and find the first "(". Then it moves to its match: + + if (a == (b * c) / d) ~ + ---+----------------> + % + +============================================================================== +*03.5* Moving to a specific line + +If you are a C or C++ programmer, you are familiar with error messages such as +the following: + + prog.c:33: j undeclared (first use in this function) ~ + +This tells you that you might want to fix something on line 33. So how do you +find line 33? One way is to do "9999k" to go to the top of the file and "32j" +to go down thirty two lines. It is not a good way, but it works. A much +better way of doing things is to use the "G" command. With a count, this +command positions you at the given line number. For example, "33G" puts you +on line 33. (For a better way of going through a compiler's error list, see +|usr_30.txt|, for information on the :make command.) + With no argument, "G" positions you at the end of the file. A quick way to +go to the start of a file use "gg". "1G" will do the same, but is a tiny bit +more typing. + + | first line of a file ^ + | text text text text | + | text text text text | gg + 7G | text text text text | + | text text text text + | text text text text + V text text text text | + text text text text | G + text text text text | + last line of a file V + +Another way to move to a line is using the "%" command with a count. For +example "50%" moves you to halfway the file. "90%" goes to near the end. + +The previous assumes that you want to move to a line in the file, no matter if +it's currently visible or not. What if you want to move to one of the lines +you can see? This figure shows the three commands you can use: + + +---------------------------+ + H --> | text sample text | + | sample text | + | text sample text | + | sample text | + M --> | text sample text | + | sample text | + | text sample text | + | sample text | + L --> | text sample text | + +---------------------------+ + +Hints: "H" stands for Home, "M" for Middle and "L" for Last. + +============================================================================== +*03.6* Telling where you are + +To see where you are in a file, there are three ways: + +1. Use the CTRL-G command. You get a message like this (assuming the 'ruler' + option is off): + + "usr_03.txt" line 233 of 650 --35%-- col 45-52 ~ + + This shows the name of the file you are editing, the line number where the + cursor is, the total number of lines, the percentage of the way through + the file and the column of the cursor. + Sometimes you will see a split column number. For example, "col 2-9". + This indicates that the cursor is positioned on the second character, but + because character one is a tab, occupying eight spaces worth of columns, + the screen column is 9. + +2. Set the 'number' option. This will display a line number in front of + every line: > + + :set number +< + To switch this off again: > + + :set nonumber +< + Since 'number' is a boolean option, prepending "no" to its name has the + effect of switching it off. A boolean option has only these two values, + it is either on or off. + Vim has many options. Besides the boolean ones there are options with + a numerical value and string options. You will see examples of this where + they are used. + +3. Set the 'ruler' option. This will display the cursor position in the + lower right corner of the Vim window: > + + :set ruler + +Using the 'ruler' option has the advantage that it doesn't take much room, +thus there is more space for your text. + +============================================================================== +*03.7* Scrolling around + +The CTRL-U command scrolls down half a screen of text. Think of looking +through a viewing window at the text and moving this window up by half the +height of the window. Thus the window moves up over the text, which is +backward in the file. Don't worry if you have a little trouble remembering +which end is up. Most users have the same problem. + The CTRL-D command moves the viewing window down half a screen in the file, +thus scrolls the text up half a screen. + + +----------------+ + | some text | + | some text | + | some text | + +---------------+ | some text | + | some text | CTRL-U --> | | + | | | 123456 | + | 123456 | +----------------+ + | 7890 | + | | +----------------+ + | example | CTRL-D --> | 7890 | + +---------------+ | | + | example | + | example | + | example | + | example | + +----------------+ + +To scroll one line at a time use CTRL-E (scroll up) and CTRL-Y (scroll down). +Think of CTRL-E to give you one line Extra. (If you use MS-Windows compatible +key mappings CTRL-Y will redo a change instead of scroll.) + +To scroll forward by a whole screen (except for two lines) use CTRL-F. The +other way is backward, CTRL-B is the command to use. Fortunately CTRL-F is +Forward and CTRL-B is Backward, that's easy to remember. + +A common issue is that after moving down many lines with "j" your cursor is at +the bottom of the screen. You would like to see the context of the line with +the cursor. That's done with the "zz" command. + + +------------------+ +------------------+ + | some text | | some text | + | some text | | some text | + | some text | | some text | + | some text | zz --> | line with cursor | + | some text | | some text | + | some text | | some text | + | line with cursor | | some text | + +------------------+ +------------------+ + +The "zt" command puts the cursor line at the top, "zb" at the bottom. There +are a few more scrolling commands, see |Q_sc|. To always keep a few lines of +context around the cursor, use the 'scrolloff' option. + +============================================================================== +*03.8* Simple searches + +To search for a string, use the "/string" command. To find the word include, +for example, use the command: > + + /include + +You will notice that when you type the "/" the cursor jumps to the last line +of the Vim window, like with colon commands. That is where you type the word. +You can press the backspace key (backarrow or <BS>) to make corrections. Use +the <Left> and <Right> cursor keys when necessary. + Pressing <Enter> executes the command. + + Note: + The characters .*[]^%/\?~$ have special meanings. If you want to use + them in a search you must put a \ in front of them. See below. + +To find the next occurrence of the same string use the "n" command. Use this +to find the first #include after the cursor: > + + /#include + +And then type "n" several times. You will move to each #include in the text. +You can also use a count if you know which match you want. Thus "3n" finds +the third match. Using a count with "/" doesn't work. + +The "?" command works like "/" but searches backwards: > + + ?word + +The "N" command repeats the last search the opposite direction. Thus using +"N" after a "/" command search backwards, using "N" after "?" searches +forward. + + +IGNORING CASE + +Normally you have to type exactly what you want to find. If you don't care +about upper or lowercase in a word, set the 'ignorecase' option: > + + :set ignorecase + +If you now search for "word", it will also match "Word" and "WORD". To match +case again: > + + :set noignorecase + + +HISTORY + +Suppose you do three searches: > + + /one + /two + /three + +Now let's start searching by typing a simple "/" without pressing <Enter>. If +you press <Up> (the cursor key), Vim puts "/three" on the command line. +Pressing <Enter> at this point searches for three. If you do not press +<Enter>, but press <Up> instead, Vim changes the prompt to "/two". Another +press of <Up> moves you to "/one". + You can also use the <Down> cursor key to move through the history of +search commands in the other direction. + +If you know what a previously used pattern starts with, and you want to use it +again, type that character before pressing <Up>. With the previous example, +you can type "/o<Up>" and Vim will put "/one" on the command line. + +The commands starting with ":" also have a history. That allows you to recall +a previous command and execute it again. These two histories are separate. + + +SEARCHING FOR A WORD IN THE TEXT + +Suppose you see the word "TheLongFunctionName" in the text and you want to +find the next occurrence of it. You could type "/TheLongFunctionName", but +that's a lot of typing. And when you make a mistake Vim won't find it. + There is an easier way: Position the cursor on the word and use the "*" +command. Vim will grab the word under the cursor and use it as the search +string. + The "#" command does the same in the other direction. You can prepend a +count: "3*" searches for the third occurrence of the word under the cursor. + + +SEARCHING FOR WHOLE WORDS + +If you type "/the" it will also match "there". To only find words that end +in "the" use: > + + /the\> + +The "\>" item is a special marker that only matches at the end of a word. +Similarly "\<" only matches at the begin of a word. Thus to search for the +word "the" only: > + + /\<the\> + +This does not match "there" or "soothe". Notice that the "*" and "#" commands +use these start-of-word and end-of-word markers to only find whole words (you +can use "g*" and "g#" to match partial words). + + +HIGHLIGHTING MATCHES + +While editing a program you see a variable called "nr". You want to check +where it's used. You could move the cursor to "nr" and use the "*" command +and press "n" to go along all the matches. + There is another way. Type this command: > + + :set hlsearch + +If you now search for "nr", Vim will highlight all matches. That is a very +good way to see where the variable is used, without the need to type commands. + To switch this off: > + + :set nohlsearch + +Then you need to switch it on again if you want to use it for the next search +command. If you only want to remove the highlighting, use this command: > + + :nohlsearch + +This doesn't reset the option. Instead, it disables the highlighting. As +soon as you execute a search command, the highlighting will be used again. +Also for the "n" and "N" commands. + + +TUNING SEARCHES + +There are a few options that change how searching works. These are the +essential ones: +> + :set incsearch + +This makes Vim display the match for the string while you are still typing it. +Use this to check if the right match will be found. Then press <Enter> to +really jump to that location. Or type more to change the search string. +> + :set nowrapscan + +This stops the search at the end of the file. Or, when you are searching +backwards, at the start of the file. The 'wrapscan' option is on by default, +thus searching wraps around the end of the file. + + +INTERMEZZO + +If you like one of the options mentioned before, and set it each time you use +Vim, you can put the command in your Vim startup file. + Edit the file, as mentioned at |not-compatible|. Or use this command to +find out where it is: > + + :scriptnames + +Edit the file, for example with: > + + :edit ~/.vimrc + +Then add a line with the command to set the option, just like you typed it in +Vim. Example: > + + Go:set hlsearch<Esc> + +"G" moves to the end of the file. "o" starts a new line, where you type the +":set" command. You end insert mode with <Esc>. Then write the file: > + + ZZ + +If you now start Vim again, the 'hlsearch' option will already be set. + +============================================================================== +*03.9* Simple search patterns + +The Vim editor uses regular expressions to specify what to search for. +Regular expressions are an extremely powerful and compact way to specify a +search pattern. Unfortunately, this power comes at a price, because regular +expressions are a bit tricky to specify. + In this section we mention only a few essential ones. More about search +patterns and commands in chapter 27 |usr_27.txt|. You can find the full +explanation here: |pattern|. + + +BEGINNING AND END OF A LINE + +The ^ character matches the beginning of a line. On an English-US keyboard +you find it above the 6. The pattern "include" matches the word include +anywhere on the line. But the pattern "^include" matches the word include +only if it is at the beginning of a line. + The $ character matches the end of a line. Therefore, "was$" matches the +word was only if it is at the end of a line. + +Let's mark the places where "the" matches in this example line with "x"s: + + the solder holding one of the chips melted and the ~ + xxx xxx xxx + +Using "/the$" we find this match: + + the solder holding one of the chips melted and the ~ + xxx + +And with "/^the" we find this one: + the solder holding one of the chips melted and the ~ + xxx + +You can try searching with "/^the$", it will only match a single line +consisting of "the". White space does matter here, thus if a line contains a +space after the word, like "the ", the pattern will not match. + + +MATCHING ANY SINGLE CHARACTER + +The . (dot) character matches any existing character. For example, the +pattern "c.m" matches a string whose first character is a c, whose second +character is anything, and whose the third character is m. Example: + + We use a computer that became the cummin winter. ~ + xxx xxx xxx + + +MATCHING SPECIAL CHARACTERS + +If you really want to match a dot, you must avoid its special meaning by +putting a backslash before it. + If you search for "ter.", you will find these matches: + + We use a computer that became the cummin winter. ~ + xxxx xxxx + +Searching for "ter\." only finds the second match. + +============================================================================== +*03.10* Using marks + +When you make a jump to a position with the "G" command, Vim remembers the +position from before this jump. This position is called a mark. To go back +where you came from, use this command: > + + `` + +This ` is a backtick or open single-quote character. + If you use the same command a second time you will jump back again. That's +because the ` command is a jump itself, and the position from before this jump +is remembered. + +Generally, every time you do a command that can move the cursor further than +within the same line, this is called a jump. This includes the search +commands "/" and "n" (it doesn't matter how far away the match is). But not +the character searches with "fx" and "tx" or the word movements "w" and "e". + Also, "j" and "k" are not considered to be a jump. Even when you use a +count to make them move the cursor quite a long way away. + +The `` command jumps back and forth, between two points. The CTRL-O command +jumps to older positions (Hint: O for older). CTRL-I then jumps back to newer +positions (Hint: I is just next to O on the keyboard). Consider this sequence +of commands: > + + 33G + /^The + CTRL-O + +You first jump to line 33, then search for a line that starts with "The". +Then with CTRL-O you jump back to line 33. Another CTRL-O takes you back to +where you started. If you now use CTRL-I you jump to line 33 again. And +to the match for "The" with another CTRL-I. + + + | example text ^ | + 33G | example text | CTRL-O | CTRL-I + | example text | | + V line 33 text ^ V + | example text | | + /^The | example text | CTRL-O | CTRL-I + V There you are | V + example text + + Note: + CTRL-I is the same as <Tab>. + +The ":jumps" command gives a list of positions you jumped to. The entry which +you used last is marked with a ">". + + +NAMED MARKS *bookmark* + +Vim enables you to place your own marks in the text. The command "ma" marks +the place under the cursor as mark a. You can place 26 marks (a through z) in +your text. You can't see them, it's just a position that Vim remembers. + To go to a mark, use the command `{mark}, where {mark} is the mark letter. +Thus to move to the a mark: +> + `a + +The command 'mark (single quotation mark, or apostrophe) moves you to the +beginning of the line containing the mark. This differs from the `mark +command, which moves you to marked column. + +The marks can be very useful when working on two related parts in a file. +Suppose you have some text near the start of the file you need to look at, +while working on some text near the end of the file. + Move to the text at the start and place the s (start) mark there: > + + ms + +Then move to the text you want to work on and put the e (end) mark there: > + + me + +Now you can move around, and when you want to look at the start of the file, +you use this to jump there: > + + 's + +Then you can use '' to jump back to where you were, or 'e to jump to the text +you were working on at the end. + There is nothing special about using s for start and e for end, they are +just easy to remember. + +You can use this command to get a list of marks: > + + :marks + +You will notice a few special marks. These include: + + ' The cursor position before doing a jump + " The cursor position when last editing the file + [ Start of the last change + ] End of the last change + +============================================================================== + +Next chapter: |usr_04.txt| Making small changes + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_04.txt b/runtime/doc/usr_04.txt new file mode 100644 index 0000000000..c09cb204c5 --- /dev/null +++ b/runtime/doc/usr_04.txt @@ -0,0 +1,514 @@ +*usr_04.txt* For Vim version 7.4. Last change: 2008 Sep 06 + + VIM USER MANUAL - by Bram Moolenaar + + Making small changes + + +This chapter shows you several ways of making corrections and moving text +around. It teaches you the three basic ways to change text: operator-motion, +Visual mode and text objects. + +|04.1| Operators and motions +|04.2| Changing text +|04.3| Repeating a change +|04.4| Visual mode +|04.5| Moving text +|04.6| Copying text +|04.7| Using the clipboard +|04.8| Text objects +|04.9| Replace mode +|04.10| Conclusion + + Next chapter: |usr_05.txt| Set your settings + Previous chapter: |usr_03.txt| Moving around +Table of contents: |usr_toc.txt| + +============================================================================== +*04.1* Operators and motions + +In chapter 2 you learned the "x" command to delete a single character. And +using a count: "4x" deletes four characters. + The "dw" command deletes a word. You may recognize the "w" command as the +move word command. In fact, the "d" command may be followed by any motion +command, and it deletes from the current location to the place where the +cursor winds up. + The "4w" command, for example, moves the cursor over four words. The d4w +command deletes four words. + + To err is human. To really foul up you need a computer. ~ + ------------------> + d4w + + To err is human. you need a computer. ~ + +Vim only deletes up to the position where the motion takes the cursor. That's +because Vim knows that you probably don't want to delete the first character +of a word. If you use the "e" command to move to the end of a word, Vim +guesses that you do want to include that last character: + + To err is human. you need a computer. ~ + --------> + d2e + + To err is human. a computer. ~ + +Whether the character under the cursor is included depends on the command you +used to move to that character. The reference manual calls this "exclusive" +when the character isn't included and "inclusive" when it is. + +The "$" command moves to the end of a line. The "d$" command deletes from the +cursor to the end of the line. This is an inclusive motion, thus the last +character of the line is included in the delete operation: + + To err is human. a computer. ~ + ------------> + d$ + + To err is human ~ + +There is a pattern here: operator-motion. You first type an operator command. +For example, "d" is the delete operator. Then you type a motion command like +"4l" or "w". This way you can operate on any text you can move over. + +============================================================================== +*04.2* Changing text + +Another operator is "c", change. It acts just like the "d" operator, except +it leaves you in Insert mode. For example, "cw" changes a word. Or more +specifically, it deletes a word and then puts you in Insert mode. + + To err is human ~ + -------> + c2wbe<Esc> + + To be human ~ + +This "c2wbe<Esc>" contains these bits: + + c the change operator + 2w move two words (they are deleted and Insert mode started) + be insert this text + <Esc> back to Normal mode + +If you have paid attention, you will have noticed something strange: The space +before "human" isn't deleted. There is a saying that for every problem there +is an answer that is simple, clear, and wrong. That is the case with the +example used here for the "cw" command. The c operator works just like the +d operator, with one exception: "cw". It actually works like "ce", change to +end of word. Thus the space after the word isn't included. This is an +exception that dates back to the old Vi. Since many people are used to it +now, the inconsistency has remained in Vim. + + +MORE CHANGES + +Like "dd" deletes a whole line, "cc" changes a whole line. It keeps the +existing indent (leading white space) though. + +Just like "d$" deletes until the end of the line, "c$" changes until the end +of the line. It's like doing "d$" to delete the text and then "a" to start +Insert mode and append new text. + + +SHORTCUTS + +Some operator-motion commands are used so often that they have been given a +single letter command: + + x stands for dl (delete character under the cursor) + X stands for dh (delete character left of the cursor) + D stands for d$ (delete to end of the line) + C stands for c$ (change to end of the line) + s stands for cl (change one character) + S stands for cc (change a whole line) + + +WHERE TO PUT THE COUNT + +The commands "3dw" and "d3w" delete three words. If you want to get really +picky about things, the first command, "3dw", deletes one word three times; +the command "d3w" deletes three words once. This is a difference without a +distinction. You can actually put in two counts, however. For example, +"3d2w" deletes two words, repeated three times, for a total of six words. + + +REPLACING WITH ONE CHARACTER + +The "r" command is not an operator. It waits for you to type a character, and +will replace the character under the cursor with it. You could do the same +with "cl" or with the "s" command, but with "r" you don't have to press <Esc> + + there is somerhing grong here ~ + rT rt rw + + There is something wrong here ~ + +Using a count with "r" causes that many characters to be replaced with the +same character. Example: + + There is something wrong here ~ + 5rx + + There is something xxxxx here ~ + +To replace a character with a line break use "r<Enter>". This deletes one +character and inserts a line break. Using a count here only applies to the +number of characters deleted: "4r<Enter>" replaces four characters with one +line break. + +============================================================================== +*04.3* Repeating a change + +The "." command is one of the most simple yet powerful commands in Vim. It +repeats the last change. For instance, suppose you are editing an HTML file +and want to delete all the <B> tags. You position the cursor on the first < +and delete the <B> with the command "df>". You then go to the < of the next +</B> and kill it using the "." command. The "." command executes the last +change command (in this case, "df>"). To delete another tag, position the +cursor on the < and use the "." command. + + To <B>generate</B> a table of <B>contents ~ + f< find first < ---> + df> delete to > --> + f< find next < ---------> + . repeat df> ---> + f< find next < -------------> + . repeat df> --> + +The "." command works for all changes you make, except for the "u" (undo), +CTRL-R (redo) and commands that start with a colon (:). + +Another example: You want to change the word "four" to "five". It appears +several times in your text. You can do this quickly with this sequence of +commands: + + /four<Enter> find the first string "four" + cwfive<Esc> change the word to "five" + n find the next "four" + . repeat the change to "five' + n find the next "four" + . repeat the change + etc. + +============================================================================== +*04.4* Visual mode + +To delete simple items the operator-motion changes work quite well. But often +it's not so easy to decide which command will move over the text you want to +change. Then you can use Visual mode. + +You start Visual mode by pressing "v". You move the cursor over the text you +want to work on. While you do this, the text is highlighted. Finally type +the operator command. + For example, to delete from halfway one word to halfway another word: + + This is an examination sample of visual mode ~ + ----------> + velllld + + This is an example of visual mode ~ + +When doing this you don't really have to count how many times you have to +press "l" to end up in the right position. You can immediately see what text +will be deleted when you press "d". + +If at any time you decide you don't want to do anything with the highlighted +text, just press <Esc> and Visual mode will stop without doing anything. + + +SELECTING LINES + +If you want to work on whole lines, use "V" to start Visual mode. You will +see right away that the whole line is highlighted, without moving around. +When you move left or right nothing changes. When you move up or down the +selection is extended whole lines at a time. + For example, select three lines with "Vjj": + + +------------------------+ + | text more text | + >> | more text more text | | + selected lines >> | text text text | | Vjj + >> | text more | V + | more text more | + +------------------------+ + + +SELECTING BLOCKS + +If you want to work on a rectangular block of characters, use CTRL-V to start +Visual mode. This is very useful when working on tables. + + name Q1 Q2 Q3 + pierre 123 455 234 + john 0 90 39 + steve 392 63 334 + +To delete the middle "Q2" column, move the cursor to the "Q" of "Q2". Press +CTRL-V to start blockwise Visual mode. Now move the cursor three lines down +with "3j" and to the next word with "w". You can see the first character of +the last column is included. To exclude it, use "h". Now press "d" and the +middle column is gone. + + +GOING TO THE OTHER SIDE + +If you have selected some text in Visual mode, and discover that you need to +change the other end of the selection, use the "o" command (Hint: o for other +end). The cursor will go to the other end, and you can move the cursor to +change where the selection starts. Pressing "o" again brings you back to the +other end. + +When using blockwise selection, you have four corners. "o" only takes you to +one of the other corners, diagonally. Use "O" to move to the other corner in +the same line. + +Note that "o" and "O" in Visual mode work very differently from Normal mode, +where they open a new line below or above the cursor. + +============================================================================== +*04.5* Moving text + +When you delete something with the "d", "x", or another command, the text is +saved. You can paste it back by using the p command. (The Vim name for +this is put). + Take a look at how this works. First you will delete an entire line, by +putting the cursor on the line you want to delete and typing "dd". Now you +move the cursor to where you want to put the line and use the "p" (put) +command. The line is inserted on the line below the cursor. + + a line a line a line + line 2 dd line 3 p line 3 + line 3 line 2 + +Because you deleted an entire line, the "p" command placed the text line below +the cursor. If you delete part of a line (a word, for instance), the "p" +command puts it just after the cursor. + + Some more boring try text to out commands. ~ + ----> + dw + + Some more boring text to out commands. ~ + -------> + welp + + Some more boring text to try out commands. ~ + + +MORE ON PUTTING + +The "P" command puts text like "p", but before the cursor. When you deleted a +whole line with "dd", "P" will put it back above the cursor. When you deleted +a word with "dw", "P" will put it back just before the cursor. + +You can repeat putting as many times as you like. The same text will be used. + +You can use a count with "p" and "P". The text will be repeated as many times +as specified with the count. Thus "dd" and then "3p" puts three copies of the +same deleted line. + + +SWAPPING TWO CHARACTERS + +Frequently when you are typing, your fingers get ahead of your brain (or the +other way around?). The result is a typo such as "teh" for "the". Vim +makes it easy to correct such problems. Just put the cursor on the e of "teh" +and execute the command "xp". This works as follows: "x" deletes the +character e and places it in a register. "p" puts the text after the cursor, +which is after the h. + + teh th the ~ + x p + +============================================================================== +*04.6* Copying text + +To copy text from one place to another, you could delete it, use "u" to undo +the deletion and then "p" to put it somewhere else. There is an easier way: +yanking. The "y" operator copies text into a register. Then a "p" command +can be used to put it. + Yanking is just a Vim name for copying. The "c" letter was already used +for the change operator, and "y" was still available. Calling this +operator "yank" made it easier to remember to use the "y" key. + +Since "y" is an operator, you use "yw" to yank a word. A count is possible as +usual. To yank two words use "y2w". Example: + + let sqr = LongVariable * ~ + --------------> + y2w + + let sqr = LongVariable * ~ + p + + let sqr = LongVariable * LongVariable ~ + +Notice that "yw" includes the white space after a word. If you don't want +this, use "ye". + +The "yy" command yanks a whole line, just like "dd" deletes a whole line. +Unexpectedly, while "D" deletes from the cursor to the end of the line, "Y" +works like "yy", it yanks the whole line. Watch out for this inconsistency! +Use "y$" to yank to the end of the line. + + a text line yy a text line a text line + line 2 line 2 p line 2 + last line last line a text line + last line + +============================================================================== +*04.7* Using the clipboard + +If you are using the GUI version of Vim (gvim), you can find the "Copy" item +in the "Edit" menu. First select some text with Visual mode, then use the +Edit/Copy menu. The selected text is now copied to the clipboard. You can +paste the text in other programs. In Vim itself too. + +If you have copied text to the clipboard in another application, you can paste +it in Vim with the Edit/Paste menu. This works in Normal mode and Insert +mode. In Visual mode the selected text is replaced with the pasted text. + +The "Cut" menu item deletes the text before it's put on the clipboard. The +"Copy", "Cut" and "Paste" items are also available in the popup menu (only +when there is a popup menu, of course). If your Vim has a toolbar, you can +also find these items there. + +If you are not using the GUI, or if you don't like using a menu, you have to +use another way. You use the normal "y" (yank) and "p" (put) commands, but +prepend "* (double-quote star) before it. To copy a line to the clipboard: > + + "*yy + +To put text from the clipboard back into the text: > + + "*p + +This only works on versions of Vim that include clipboard support. More about +the clipboard in section |09.3| and here: |clipboard|. + +============================================================================== +*04.8* Text objects + +If the cursor is in the middle of a word and you want to delete that word, you +need to move back to its start before you can do "dw". There is a simpler way +to do this: "daw". + + this is some example text. ~ + daw + + this is some text. ~ + +The "d" of "daw" is the delete operator. "aw" is a text object. Hint: "aw" +stands for "A Word". Thus "daw" is "Delete A Word". To be precise, the white +space after the word is also deleted (the white space before the word at the +end of the line). + +Using text objects is the third way to make changes in Vim. We already had +operator-motion and Visual mode. Now we add operator-text object. + It is very similar to operator-motion, but instead of operating on the text +between the cursor position before and after a movement command, the text +object is used as a whole. It doesn't matter where in the object the cursor +was. + +To change a whole sentence use "cis". Take this text: + + Hello there. This ~ + is an example. Just ~ + some text. ~ + +Move to the start of the second line, on "is an". Now use "cis": + + Hello there. Just ~ + some text. ~ + +The cursor is in between the blanks in the first line. Now you type the new +sentence "Another line.": + + Hello there. Another line. Just ~ + some text. ~ + +"cis" consists of the "c" (change) operator and the "is" text object. This +stands for "Inner Sentence". There is also the "as" (a sentence) object. The +difference is that "as" includes the white space after the sentence and "is" +doesn't. If you would delete a sentence, you want to delete the white space +at the same time, thus use "das". If you want to type new text the white +space can remain, thus you use "cis". + +You can also use text objects in Visual mode. It will include the text object +in the Visual selection. Visual mode continues, thus you can do this several +times. For example, start Visual mode with "v" and select a sentence with +"as". Now you can repeat "as" to include more sentences. Finally you use an +operator to do something with the selected sentences. + +You can find a long list of text objects here: |text-objects|. + +============================================================================== +*04.9* Replace mode + +The "R" command causes Vim to enter replace mode. In this mode, each +character you type replaces the one under the cursor. This continues until +you type <Esc>. + In this example you start Replace mode on the first "t" of "text": + + This is text. ~ + Rinteresting.<Esc> + + This is interesting. ~ + +You may have noticed that this command replaced 5 characters in the line with +twelve others. The "R" command automatically extends the line if it runs out +of characters to replace. It will not continue on the next line. + +You can switch between Insert mode and Replace mode with the <Insert> key. + +When you use <BS> (backspace) to make correction, you will notice that the +old text is put back. Thus it works like an undo command for the last typed +character. + +============================================================================== +*04.10* Conclusion + +The operators, movement commands and text objects give you the possibility to +make lots of combinations. Now that you know how it works, you can use N +operators with M movement commands to make N * M commands! + +You can find a list of operators here: |operator| + +For example, there are many other ways to delete pieces of text. Here are a +few often used ones: + +x delete character under the cursor (short for "dl") +X delete character before the cursor (short for "dh") +D delete from cursor to end of line (short for "d$") +dw delete from cursor to next start of word +db delete from cursor to previous start of word +diw delete word under the cursor (excluding white space) +daw delete word under the cursor (including white space) +dG delete until the end of the file +dgg delete until the start of the file + +If you use "c" instead of "d" they become change commands. And with "y" you +yank the text. And so forth. + + +There are a few often used commands to make changes that didn't fit somewhere +else: + + ~ change case of the character under the cursor, and move the + cursor to the next character. This is not an operator (unless + 'tildeop' is set), thus you can't use it with a motion + command. It does work in Visual mode and changes case for + all the selected text then. + + I Start Insert mode after moving the cursor to the first + non-blank in the line. + + A Start Insert mode after moving the cursor to the end of the + line. + +============================================================================== + +Next chapter: |usr_05.txt| Set your settings + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt new file mode 100644 index 0000000000..f71cf42cff --- /dev/null +++ b/runtime/doc/usr_05.txt @@ -0,0 +1,624 @@ +*usr_05.txt* For Vim version 7.4. Last change: 2012 Nov 20 + + VIM USER MANUAL - by Bram Moolenaar + + Set your settings + + +Vim can be tuned to work like you want it to. This chapter shows you how to +make Vim start with options set to different values. Add plugins to extend +Vim's capabilities. Or define your own macros. + +|05.1| The vimrc file +|05.2| The example vimrc file explained +|05.3| Simple mappings +|05.4| Adding a plugin +|05.5| Adding a help file +|05.6| The option window +|05.7| Often used options + + Next chapter: |usr_06.txt| Using syntax highlighting + Previous chapter: |usr_04.txt| Making small changes +Table of contents: |usr_toc.txt| + +============================================================================== +*05.1* The vimrc file *vimrc-intro* + +You probably got tired of typing commands that you use very often. To start +Vim with all your favorite option settings and mappings, you write them in +what is called the vimrc file. Vim executes the commands in this file when it +starts up. + +If you already have a vimrc file (e.g., when your sysadmin has one setup for +you), you can edit it this way: > + + :edit $MYVIMRC + +If you don't have a vimrc file yet, see |vimrc| to find out where you can +create a vimrc file. Also, the ":version" command mentions the name of the +"user vimrc file" Vim looks for. + +For Unix and Macintosh this file is always used and is recommended: + + ~/.vimrc ~ + +For MS-DOS and MS-Windows you can use one of these: + + $HOME/_vimrc ~ + $VIM/_vimrc ~ + +The vimrc file can contain all the commands that you type after a colon. The +most simple ones are for setting options. For example, if you want Vim to +always start with the 'incsearch' option on, add this line your vimrc file: > + + set incsearch + +For this new line to take effect you need to exit Vim and start it again. +Later you will learn how to do this without exiting Vim. + +This chapter only explains the most basic items. For more information on how +to write a Vim script file: |usr_41.txt|. + +============================================================================== +*05.2* The example vimrc file explained *vimrc_example.vim* + +In the first chapter was explained how the example vimrc (included in the +Vim distribution) file can be used to make Vim startup in not-compatible mode +(see |not-compatible|). The file can be found here: + + $VIMRUNTIME/vimrc_example.vim ~ + +In this section we will explain the various commands used in this file. This +will give you hints about how to set up your own preferences. Not everything +will be explained though. Use the ":help" command to find out more. + +> + set nocompatible + +As mentioned in the first chapter, these manuals explain Vim working in an +improved way, thus not completely Vi compatible. Setting the 'compatible' +option off, thus 'nocompatible' takes care of this. + +> + set backspace=indent,eol,start + +This specifies where in Insert mode the <BS> is allowed to delete the +character in front of the cursor. The three items, separated by commas, tell +Vim to delete the white space at the start of the line, a line break and the +character before where Insert mode started. +> + + set autoindent + +This makes Vim use the indent of the previous line for a newly created line. +Thus there is the same amount of white space before the new line. For example +when pressing <Enter> in Insert mode, and when using the "o" command to open a +new line. +> + + if has("vms") + set nobackup + else + set backup + endif + +This tells Vim to keep a backup copy of a file when overwriting it. But not +on the VMS system, since it keeps old versions of files already. The backup +file will have the same name as the original file with "~" added. See |07.4| +> + + set history=50 + +Keep 50 commands and 50 search patterns in the history. Use another number if +you want to remember fewer or more lines. +> + + set ruler + +Always display the current cursor position in the lower right corner of the +Vim window. + +> + set showcmd + +Display an incomplete command in the lower right corner of the Vim window, +left of the ruler. For example, when you type "2f", Vim is waiting for you to +type the character to find and "2f" is displayed. When you press "w" next, +the "2fw" command is executed and the displayed "2f" is removed. + + +-------------------------------------------------+ + |text in the Vim window | + |~ | + |~ | + |-- VISUAL -- 2f 43,8 17% | + +-------------------------------------------------+ + ^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^ + 'showmode' 'showcmd' 'ruler' + +> + set incsearch + +Display the match for a search pattern when halfway typing it. + +> + map Q gq + +This defines a key mapping. More about that in the next section. This +defines the "Q" command to do formatting with the "gq" operator. This is how +it worked before Vim 5.0. Otherwise the "Q" command starts Ex mode, but you +will not need it. + +> + vnoremap _g y:exe "grep /" . escape(@", '\\/') . "/ *.c *.h"<CR> + +This mapping yanks the visually selected text and searches for it in C files. +This is a complicated mapping. You can see that mappings can be used to do +quite complicated things. Still, it is just a sequence of commands that are +executed like you typed them. + +> + if &t_Co > 2 || has("gui_running") + syntax on + set hlsearch + endif + +This switches on syntax highlighting, but only if colors are available. And +the 'hlsearch' option tells Vim to highlight matches with the last used search +pattern. The "if" command is very useful to set options only when some +condition is met. More about that in |usr_41.txt|. + + *vimrc-filetype* > + filetype plugin indent on + +This switches on three very clever mechanisms: +1. Filetype detection. + Whenever you start editing a file, Vim will try to figure out what kind of + file this is. When you edit "main.c", Vim will see the ".c" extension and + recognize this as a "c" filetype. When you edit a file that starts with + "#!/bin/sh", Vim will recognize it as a "sh" filetype. + The filetype detection is used for syntax highlighting and the other two + items below. + See |filetypes|. + +2. Using filetype plugin files + Many different filetypes are edited with different options. For example, + when you edit a "c" file, it's very useful to set the 'cindent' option to + automatically indent the lines. These commonly useful option settings are + included with Vim in filetype plugins. You can also add your own, see + |write-filetype-plugin|. + +3. Using indent files + When editing programs, the indent of a line can often be computed + automatically. Vim comes with these indent rules for a number of + filetypes. See |:filetype-indent-on| and 'indentexpr'. + +> + autocmd FileType text setlocal textwidth=78 + +This makes Vim break text to avoid lines getting longer than 78 characters. +But only for files that have been detected to be plain text. There are +actually two parts here. "autocmd FileType text" is an autocommand. This +defines that when the file type is set to "text" the following command is +automatically executed. "setlocal textwidth=78" sets the 'textwidth' option +to 78, but only locally in one file. + + *restore-cursor* > + autocmd BufReadPost * + \ if line("'\"") > 1 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif + +Another autocommand. This time it is used after reading any file. The +complicated stuff after it checks if the '" mark is defined, and jumps to it +if so. The backslash at the start of a line is used to continue the command +from the previous line. That avoids a line getting very long. +See |line-continuation|. This only works in a Vim script file, not when +typing commands at the command-line. + +============================================================================== +*05.3* Simple mappings + +A mapping enables you to bind a set of Vim commands to a single key. Suppose, +for example, that you need to surround certain words with curly braces. In +other words, you need to change a word such as "amount" into "{amount}". With +the :map command, you can tell Vim that the F5 key does this job. The command +is as follows: > + + :map <F5> i{<Esc>ea}<Esc> +< + Note: + When entering this command, you must enter <F5> by typing four + characters. Similarly, <Esc> is not entered by pressing the <Esc> + key, but by typing five characters. Watch out for this difference + when reading the manual! + +Let's break this down: + <F5> The F5 function key. This is the trigger key that causes the + command to be executed as the key is pressed. + + i{<Esc> Insert the { character. The <Esc> key ends Insert mode. + + e Move to the end of the word. + + a}<Esc> Append the } to the word. + +After you execute the ":map" command, all you have to do to put {} around a +word is to put the cursor on the first character and press F5. + +In this example, the trigger is a single key; it can be any string. But when +you use an existing Vim command, that command will no longer be available. +You better avoid that. + One key that can be used with mappings is the backslash. Since you +probably want to define more than one mapping, add another character. You +could map "\p" to add parentheses around a word, and "\c" to add curly braces, +for example: > + + :map \p i(<Esc>ea)<Esc> + :map \c i{<Esc>ea}<Esc> + +You need to type the \ and the p quickly after another, so that Vim knows they +belong together. + +The ":map" command (with no arguments) lists your current mappings. At +least the ones for Normal mode. More about mappings in section |40.1|. + +============================================================================== +*05.4* Adding a plugin *add-plugin* *plugin* + +Vim's functionality can be extended by adding plugins. A plugin is nothing +more than a Vim script file that is loaded automatically when Vim starts. You +can add a plugin very easily by dropping it in your plugin directory. +{not available when Vim was compiled without the |+eval| feature} + +There are two types of plugins: + + global plugin: Used for all kinds of files + filetype plugin: Only used for a specific type of file + +The global plugins will be discussed first, then the filetype ones +|add-filetype-plugin|. + + +GLOBAL PLUGINS *standard-plugin* + +When you start Vim, it will automatically load a number of global plugins. +You don't have to do anything for this. They add functionality that most +people will want to use, but which was implemented as a Vim script instead of +being compiled into Vim. You can find them listed in the help index +|standard-plugin-list|. Also see |load-plugins|. + + *add-global-plugin* +You can add a global plugin to add functionality that will always be present +when you use Vim. There are only two steps for adding a global plugin: +1. Get a copy of the plugin. +2. Drop it in the right directory. + + +GETTING A GLOBAL PLUGIN + +Where can you find plugins? +- Some come with Vim. You can find them in the directory $VIMRUNTIME/macros + and its sub-directories. +- Download from the net. There is a large collection on http://www.vim.org. +- They are sometimes posted in a Vim |maillist|. +- You could write one yourself, see |write-plugin|. + +Some plugins come as a vimball archive, see |vimball|. +Some plugins can be updated automatically, see |getscript|. + + +USING A GLOBAL PLUGIN + +First read the text in the plugin itself to check for any special conditions. +Then copy the file to your plugin directory: + + system plugin directory ~ + Unix ~/.vim/plugin/ + PC and OS/2 $HOME/vimfiles/plugin or $VIM/vimfiles/plugin + Amiga s:vimfiles/plugin + Macintosh $VIM:vimfiles:plugin + Mac OS X ~/.vim/plugin/ + RISC-OS Choices:vimfiles.plugin + +Example for Unix (assuming you didn't have a plugin directory yet): > + + mkdir ~/.vim + mkdir ~/.vim/plugin + cp /usr/local/share/vim/vim60/macros/justify.vim ~/.vim/plugin + +That's all! Now you can use the commands defined in this plugin to justify +text. + +Instead of putting plugins directly into the plugin/ directory, you may +better organize them by putting them into subdirectories under plugin/. +As an example, consider using "~/.vim/plugin/perl/*.vim" for all your Perl +plugins. + + +FILETYPE PLUGINS *add-filetype-plugin* *ftplugins* + +The Vim distribution comes with a set of plugins for different filetypes that +you can start using with this command: > + + :filetype plugin on + +That's all! See |vimrc-filetype|. + +If you are missing a plugin for a filetype you are using, or you found a +better one, you can add it. There are two steps for adding a filetype plugin: +1. Get a copy of the plugin. +2. Drop it in the right directory. + + +GETTING A FILETYPE PLUGIN + +You can find them in the same places as the global plugins. Watch out if the +type of file is mentioned, then you know if the plugin is a global or a +filetype one. The scripts in $VIMRUNTIME/macros are global ones, the filetype +plugins are in $VIMRUNTIME/ftplugin. + + +USING A FILETYPE PLUGIN *ftplugin-name* + +You can add a filetype plugin by dropping it in the right directory. The +name of this directory is in the same directory mentioned above for global +plugins, but the last part is "ftplugin". Suppose you have found a plugin for +the "stuff" filetype, and you are on Unix. Then you can move this file to the +ftplugin directory: > + + mv thefile ~/.vim/ftplugin/stuff.vim + +If that file already exists you already have a plugin for "stuff". You might +want to check if the existing plugin doesn't conflict with the one you are +adding. If it's OK, you can give the new one another name: > + + mv thefile ~/.vim/ftplugin/stuff_too.vim + +The underscore is used to separate the name of the filetype from the rest, +which can be anything. If you use "otherstuff.vim" it wouldn't work, it would +be loaded for the "otherstuff" filetype. + +On MS-DOS you cannot use long filenames. You would run into trouble if you +add a second plugin and the filetype has more than six characters. You can +use an extra directory to get around this: > + + mkdir $VIM/vimfiles/ftplugin/fortran + copy thefile $VIM/vimfiles/ftplugin/fortran/too.vim + +The generic names for the filetype plugins are: > + + ftplugin/<filetype>.vim + ftplugin/<filetype>_<name>.vim + ftplugin/<filetype>/<name>.vim + +Here "<name>" can be any name that you prefer. +Examples for the "stuff" filetype on Unix: > + + ~/.vim/ftplugin/stuff.vim + ~/.vim/ftplugin/stuff_def.vim + ~/.vim/ftplugin/stuff/header.vim + +The <filetype> part is the name of the filetype the plugin is to be used for. +Only files of this filetype will use the settings from the plugin. The <name> +part of the plugin file doesn't matter, you can use it to have several plugins +for the same filetype. Note that it must end in ".vim". + + +Further reading: +|filetype-plugins| Documentation for the filetype plugins and information + about how to avoid that mappings cause problems. +|load-plugins| When the global plugins are loaded during startup. +|ftplugin-overrule| Overruling the settings from a global plugin. +|write-plugin| How to write a plugin script. +|plugin-details| For more information about using plugins or when your + plugin doesn't work. +|new-filetype| How to detect a new file type. + +============================================================================== +*05.5* Adding a help file *add-local-help* *matchit-install* + +If you are lucky, the plugin you installed also comes with a help file. We +will explain how to install the help file, so that you can easily find help +for your new plugin. + Let us use the "matchit.vim" plugin as an example (it is included with +Vim). This plugin makes the "%" command jump to matching HTML tags, +if/else/endif in Vim scripts, etc. Very useful, although it's not backwards +compatible (that's why it is not enabled by default). + This plugin comes with documentation: "matchit.txt". Let's first copy the +plugin to the right directory. This time we will do it from inside Vim, so +that we can use $VIMRUNTIME. (You may skip some of the "mkdir" commands if +you already have the directory.) > + + :!mkdir ~/.vim + :!mkdir ~/.vim/plugin + :!cp $VIMRUNTIME/macros/matchit.vim ~/.vim/plugin + +The "cp" command is for Unix, on MS-DOS you can use "copy". + +Now create a "doc" directory in one of the directories in 'runtimepath'. > + + :!mkdir ~/.vim/doc + +Copy the help file to the "doc" directory. > + + :!cp $VIMRUNTIME/macros/matchit.txt ~/.vim/doc + +Now comes the trick, which allows you to jump to the subjects in the new help +file: Generate the local tags file with the |:helptags| command. > + + :helptags ~/.vim/doc + +Now you can use the > + + :help g% + +command to find help for "g%" in the help file you just added. You can see an +entry for the local help file when you do: > + + :help local-additions + +The title lines from the local help files are automagically added to this +section. There you can see which local help files have been added and jump to +them through the tag. + +For writing a local help file, see |write-local-help|. + +============================================================================== +*05.6* The option window + +If you are looking for an option that does what you want, you can search in +the help files here: |options|. Another way is by using this command: > + + :options + +This opens a new window, with a list of options with a one-line explanation. +The options are grouped by subject. Move the cursor to a subject and press +<Enter> to jump there. Press <Enter> again to jump back. Or use CTRL-O. + +You can change the value of an option. For example, move to the "displaying +text" subject. Then move the cursor down to this line: + + set wrap nowrap ~ + +When you hit <Enter>, the line will change to: + + set nowrap wrap ~ + +The option has now been switched off. + +Just above this line is a short description of the 'wrap' option. Move the +cursor one line up to place it in this line. Now hit <Enter> and you jump to +the full help on the 'wrap' option. + +For options that take a number or string argument you can edit the value. +Then press <Enter> to apply the new value. For example, move the cursor a few +lines up to this line: + + set so=0 ~ + +Position the cursor on the zero with "$". Change it into a five with "r5". +Then press <Enter> to apply the new value. When you now move the cursor +around you will notice that the text starts scrolling before you reach the +border. This is what the 'scrolloff' option does, it specifies an offset +from the window border where scrolling starts. + +============================================================================== +*05.7* Often used options + +There are an awful lot of options. Most of them you will hardly ever use. +Some of the more useful ones will be mentioned here. Don't forget you can +find more help on these options with the ":help" command, with single quotes +before and after the option name. For example: > + + :help 'wrap' + +In case you have messed up an option value, you can set it back to the +default by putting an ampersand (&) after the option name. Example: > + + :set iskeyword& + + +NOT WRAPPING LINES + +Vim normally wraps long lines, so that you can see all of the text. Sometimes +it's better to let the text continue right of the window. Then you need to +scroll the text left-right to see all of a long line. Switch wrapping off +with this command: > + + :set nowrap + +Vim will automatically scroll the text when you move to text that is not +displayed. To see a context of ten characters, do this: > + + :set sidescroll=10 + +This doesn't change the text in the file, only the way it is displayed. + + +WRAPPING MOVEMENT COMMANDS + +Most commands for moving around will stop moving at the start and end of a +line. You can change that with the 'whichwrap' option. This sets it to the +default value: > + + :set whichwrap=b,s + +This allows the <BS> key, when used in the first position of a line, to move +the cursor to the end of the previous line. And the <Space> key moves from +the end of a line to the start of the next one. + +To allow the cursor keys <Left> and <Right> to also wrap, use this command: > + + :set whichwrap=b,s,<,> + +This is still only for Normal mode. To let <Left> and <Right> do this in +Insert mode as well: > + + :set whichwrap=b,s,<,>,[,] + +There are a few other flags that can be added, see 'whichwrap'. + + +VIEWING TABS + +When there are tabs in a file, you cannot see where they are. To make them +visible: > + + :set list + +Now every tab is displayed as ^I. And a $ is displayed at the end of each +line, so that you can spot trailing spaces that would otherwise go unnoticed. + A disadvantage is that this looks ugly when there are many Tabs in a file. +If you have a color terminal, or are using the GUI, Vim can show the spaces +and tabs as highlighted characters. Use the 'listchars' option: > + + :set listchars=tab:>-,trail:- + +Now every tab will be displayed as ">---" (with more or less "-") and trailing +white space as "-". Looks a lot better, doesn't it? + + +KEYWORDS + +The 'iskeyword' option specifies which characters can appear in a word: > + + :set iskeyword +< iskeyword=@,48-57,_,192-255 ~ + +The "@" stands for all alphabetic letters. "48-57" stands for ASCII +characters 48 to 57, which are the numbers 0 to 9. "192-255" are the +printable latin characters. + Sometimes you will want to include a dash in keywords, so that commands +like "w" consider "upper-case" to be one word. You can do it like this: > + + :set iskeyword+=- + :set iskeyword +< iskeyword=@,48-57,_,192-255,- ~ + +If you look at the new value, you will see that Vim has added a comma for you. + To remove a character use "-=". For example, to remove the underscore: > + + :set iskeyword-=_ + :set iskeyword +< iskeyword=@,48-57,192-255,- ~ + +This time a comma is automatically deleted. + + +ROOM FOR MESSAGES + +When Vim starts there is one line at the bottom that is used for messages. +When a message is long, it is either truncated, thus you can only see part of +it, or the text scrolls and you have to press <Enter> to continue. + You can set the 'cmdheight' option to the number of lines used for +messages. Example: > + + :set cmdheight=3 + +This does mean there is less room to edit text, thus it's a compromise. + +============================================================================== + +Next chapter: |usr_06.txt| Using syntax highlighting + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_06.txt b/runtime/doc/usr_06.txt new file mode 100644 index 0000000000..5e3c7726d4 --- /dev/null +++ b/runtime/doc/usr_06.txt @@ -0,0 +1,280 @@ +*usr_06.txt* For Vim version 7.4. Last change: 2009 Oct 28 + + VIM USER MANUAL - by Bram Moolenaar + + Using syntax highlighting + + +Black and white text is boring. With colors your file comes to life. This +not only looks nice, it also speeds up your work. Change the colors used for +the different sorts of text. Print your text, with the colors you see on the +screen. + +|06.1| Switching it on +|06.2| No or wrong colors? +|06.3| Different colors +|06.4| With colors or without colors +|06.5| Printing with colors +|06.6| Further reading + + Next chapter: |usr_07.txt| Editing more than one file + Previous chapter: |usr_05.txt| Set your settings +Table of contents: |usr_toc.txt| + +============================================================================== +*06.1* Switching it on + +It all starts with one simple command: > + + :syntax enable + +That should work in most situations to get color in your files. Vim will +automagically detect the type of file and load the right syntax highlighting. +Suddenly comments are blue, keywords brown and strings red. This makes it +easy to overview the file. After a while you will find that black&white text +slows you down! + +If you always want to use syntax highlighting, put the ":syntax enable" +command in your |vimrc| file. + +If you want syntax highlighting only when the terminal supports colors, you +can put this in your |vimrc| file: > + + if &t_Co > 1 + syntax enable + endif + +If you want syntax highlighting only in the GUI version, put the ":syntax +enable" command in your |gvimrc| file. + +============================================================================== +*06.2* No or wrong colors? + +There can be a number of reasons why you don't see colors: + +- Your terminal does not support colors. + Vim will use bold, italic and underlined text, but this doesn't look + very nice. You probably will want to try to get a terminal with + colors. For Unix, I recommend the xterm from the XFree86 project: + |xfree-xterm|. + +- Your terminal does support colors, but Vim doesn't know this. + Make sure your $TERM setting is correct. For example, when using an + xterm that supports colors: > + + setenv TERM xterm-color +< + or (depending on your shell): > + + TERM=xterm-color; export TERM + +< The terminal name must match the terminal you are using. If it + still doesn't work, have a look at |xterm-color|, which shows a few + ways to make Vim display colors (not only for an xterm). + +- The file type is not recognized. + Vim doesn't know all file types, and sometimes it's near to impossible + to tell what language a file uses. Try this command: > + + :set filetype +< + If the result is "filetype=" then the problem is indeed that Vim + doesn't know what type of file this is. You can set the type + manually: > + + :set filetype=fortran + +< To see which types are available, look in the directory + $VIMRUNTIME/syntax. For the GUI you can use the Syntax menu. + Setting the filetype can also be done with a |modeline|, so that the + file will be highlighted each time you edit it. For example, this + line can be used in a Makefile (put it near the start or end of the + file): > + + # vim: syntax=make + +< You might know how to detect the file type yourself. Often the file + name extension (after the dot) can be used. + See |new-filetype| for how to tell Vim to detect that file type. + +- There is no highlighting for your file type. + You could try using a similar file type by manually setting it as + mentioned above. If that isn't good enough, you can write your own + syntax file, see |mysyntaxfile|. + + +Or the colors could be wrong: + +- The colored text is very hard to read. + Vim guesses the background color that you are using. If it is black + (or another dark color) it will use light colors for text. If it is + white (or another light color) it will use dark colors for text. If + Vim guessed wrong the text will be hard to read. To solve this, set + the 'background' option. For a dark background: > + + :set background=dark + +< And for a light background: > + + :set background=light + +< Make sure you put this _before_ the ":syntax enable" command, + otherwise the colors will already have been set. You could do + ":syntax reset" after setting 'background' to make Vim set the default + colors again. + +- The colors are wrong when scrolling bottom to top. + Vim doesn't read the whole file to parse the text. It starts parsing + wherever you are viewing the file. That saves a lot of time, but + sometimes the colors are wrong. A simple fix is hitting CTRL-L. Or + scroll back a bit and then forward again. + For a real fix, see |:syn-sync|. Some syntax files have a way to make + it look further back, see the help for the specific syntax file. For + example, |tex.vim| for the TeX syntax. + +============================================================================== +*06.3* Different colors *:syn-default-override* + +If you don't like the default colors, you can select another color scheme. In +the GUI use the Edit/Color Scheme menu. You can also type the command: > + + :colorscheme evening + +"evening" is the name of the color scheme. There are several others you might +want to try out. Look in the directory $VIMRUNTIME/colors. + +When you found the color scheme that you like, add the ":colorscheme" command +to your |vimrc| file. + +You could also write your own color scheme. This is how you do it: + +1. Select a color scheme that comes close. Copy this file to your own Vim + directory. For Unix, this should work: > + + !mkdir ~/.vim/colors + !cp $VIMRUNTIME/colors/morning.vim ~/.vim/colors/mine.vim +< + This is done from Vim, because it knows the value of $VIMRUNTIME. + +2. Edit the color scheme file. These entries are useful: + + term attributes in a B&W terminal + cterm attributes in a color terminal + ctermfg foreground color in a color terminal + ctermbg background color in a color terminal + gui attributes in the GUI + guifg foreground color in the GUI + guibg background color in the GUI + + For example, to make comments green: > + + :highlight Comment ctermfg=green guifg=green +< + Attributes you can use for "cterm" and "gui" are "bold" and "underline". + If you want both, use "bold,underline". For details see the |:highlight| + command. + +3. Tell Vim to always use your color scheme. Put this line in your |vimrc|: > + + colorscheme mine + +If you want to see what the most often used color combinations look like, use +this command: > + + :runtime syntax/colortest.vim + +You will see text in various color combinations. You can check which ones are +readable and look nice. + +============================================================================== +*06.4* With colors or without colors + +Displaying text in color takes a lot of effort. If you find the displaying +too slow, you might want to disable syntax highlighting for a moment: > + + :syntax clear + +When editing another file (or the same one) the colors will come back. + + *:syn-off* +If you want to stop highlighting completely use: > + + :syntax off + +This will completely disable syntax highlighting and remove it immediately for +all buffers. + + *:syn-manual* +If you want syntax highlighting only for specific files, use this: > + + :syntax manual + +This will enable the syntax highlighting, but not switch it on automatically +when starting to edit a buffer. To switch highlighting on for the current +buffer, set the 'syntax' option: > + + :set syntax=ON +< +============================================================================== +*06.5* Printing with colors *syntax-printing* + +In the MS-Windows version you can print the current file with this command: > + + :hardcopy + +You will get the usual printer dialog, where you can select the printer and a +few settings. If you have a color printer, the paper output should look the +same as what you see inside Vim. But when you use a dark background the +colors will be adjusted to look good on white paper. + +There are several options that change the way Vim prints: + 'printdevice' + 'printheader' + 'printfont' + 'printoptions' + +To print only a range of lines, use Visual mode to select the lines and then +type the command: > + + v100j:hardcopy + +"v" starts Visual mode. "100j" moves a hundred lines down, they will be +highlighted. Then ":hardcopy" will print those lines. You can use other +commands to move in Visual mode, of course. + +This also works on Unix, if you have a PostScript printer. Otherwise, you +will have to do a bit more work. You need to convert the text to HTML first, +and then print it from a web browser. + +Convert the current file to HTML with this command: > + + :TOhtml + +In case that doesn't work: > + + :source $VIMRUNTIME/syntax/2html.vim + +You will see it crunching away, this can take quite a while for a large file. +Some time later another window shows the HTML code. Now write this somewhere +(doesn't matter where, you throw it away later): +> + :write main.c.html + +Open this file in your favorite browser and print it from there. If all goes +well, the output should look exactly as it does in Vim. See |2html.vim| for +details. Don't forget to delete the HTML file when you are done with it. + +Instead of printing, you could also put the HTML file on a web server, and let +others look at the colored text. + +============================================================================== +*06.6* Further reading + +|usr_44.txt| Your own syntax highlighted. +|syntax| All the details. + +============================================================================== + +Next chapter: |usr_07.txt| Editing more than one file + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_07.txt b/runtime/doc/usr_07.txt new file mode 100644 index 0000000000..8a0600b84d --- /dev/null +++ b/runtime/doc/usr_07.txt @@ -0,0 +1,479 @@ +*usr_07.txt* For Vim version 7.4. Last change: 2006 Apr 24 + + VIM USER MANUAL - by Bram Moolenaar + + Editing more than one file + + +No matter how many files you have, you can edit them without leaving Vim. +Define a list of files to work on and jump from one to the other. Copy text +from one file and put it in another one. + +|07.1| Edit another file +|07.2| A list of files +|07.3| Jumping from file to file +|07.4| Backup files +|07.5| Copy text between files +|07.6| Viewing a file +|07.7| Changing the file name + + Next chapter: |usr_08.txt| Splitting windows + Previous chapter: |usr_06.txt| Using syntax highlighting +Table of contents: |usr_toc.txt| + +============================================================================== +*07.1* Edit another file + +So far you had to start Vim for every file you wanted to edit. There is a +simpler way. To start editing another file, use this command: > + + :edit foo.txt + +You can use any file name instead of "foo.txt". Vim will close the current +file and open the new one. If the current file has unsaved changes, however, +Vim displays an error message and does not open the new file: + + E37: No write since last change (use ! to override) ~ + + Note: + Vim puts an error ID at the start of each error message. If you do + not understand the message or what caused it, look in the help system + for this ID. In this case: > + + :help E37 + +At this point, you have a number of alternatives. You can write the file +using this command: > + + :write + +Or you can force Vim to discard your changes and edit the new file, using the +force (!) character: > + + :edit! foo.txt + +If you want to edit another file, but not write the changes in the current +file yet, you can make it hidden: > + + :hide edit foo.txt + +The text with changes is still there, but you can't see it. This is further +explained in section |22.4|: The buffer list. + +============================================================================== +*07.2* A list of files + +You can start Vim to edit a sequence of files. For example: > + + vim one.c two.c three.c + +This command starts Vim and tells it that you will be editing three files. +Vim displays just the first file. After you have done your thing in this +file, to edit the next file you use this command: > + + :next + +If you have unsaved changes in the current file, you will get an error +message and the ":next" will not work. This is the same problem as with +":edit" mentioned in the previous section. To abandon the changes: > + + :next! + +But mostly you want to save the changes and move on to the next file. There +is a special command for this: > + + :wnext + +This does the same as using two separate commands: > + + :write + :next + + +WHERE AM I? + +To see which file in the argument list you are editing, look in the window +title. It should show something like "(2 of 3)". This means you are editing +the second file out of three files. + If you want to see the list of files, use this command: > + + :args + +This is short for "arguments". The output might look like this: + + one.c [two.c] three.c ~ + +These are the files you started Vim with. The one you are currently editing, +"two.c", is in square brackets. + + +MOVING TO OTHER ARGUMENTS + +To go back one file: > + + :previous + +This is just like the ":next" command, except that it moves in the other +direction. Again, there is a shortcut command for when you want to write the +file first: > + + :wprevious + +To move to the very last file in the list: > + + :last + +And to move back to the first one again: > + + :first + +There is no ":wlast" or ":wfirst" command though! + +You can use a count for ":next" and ":previous". To skip two files forward: > + + :2next + + +AUTOMATIC WRITING + +When moving around the files and making changes, you have to remember to use +":write". Otherwise you will get an error message. If you are sure you +always want to write modified files, you can tell Vim to automatically write +them: > + + :set autowrite + +When you are editing a file which you may not want to write, switch it off +again: > + + :set noautowrite + + +EDITING ANOTHER LIST OF FILES + +You can redefine the list of files without the need to exit Vim and start it +again. Use this command to edit three other files: > + + :args five.c six.c seven.h + +Or use a wildcard, like it's used in the shell: > + + :args *.txt + +Vim will take you to the first file in the list. Again, if the current file +has changes, you can either write the file first, or use ":args!" (with ! +added) to abandon the changes. + + +DID YOU EDIT THE LAST FILE? + *arglist-quit* +When you use a list of files, Vim assumes you want to edit them all. To +protect you from exiting too early, you will get this error when you didn't +edit the last file in the list yet: + + E173: 46 more files to edit ~ + +If you really want to exit, just do it again. Then it will work (but not when +you did other commands in between). + +============================================================================== +*07.3* Jumping from file to file + +To quickly jump between two files, press CTRL-^ (on English-US keyboards the ^ +is above the 6 key). Example: > + + :args one.c two.c three.c + +You are now in one.c. > + + :next + +Now you are in two.c. Now use CTRL-^ to go back to one.c. Another CTRL-^ and +you are back in two.c. Another CTRL-^ and you are in one.c again. If you now +do: > + + :next + +You are in three.c. Notice that the CTRL-^ command does not change the idea +of where you are in the list of files. Only commands like ":next" and +":previous" do that. + +The file you were previously editing is called the "alternate" file. When you +just started Vim CTRL-^ will not work, since there isn't a previous file. + + +PREDEFINED MARKS + +After jumping to another file, you can use two predefined marks which are very +useful: > + + `" + +This takes you to the position where the cursor was when you left the file. +Another mark that is remembered is the position where you made the last +change: > + + `. + +Suppose you are editing the file "one.txt". Somewhere halfway the file you +use "x" to delete a character. Then you go to the last line with "G" and +write the file with ":w". You edit several other files, and then use ":edit +one.txt" to come back to "one.txt". If you now use `" Vim jumps to the last +line of the file. Using `. takes you to the position where you deleted the +character. Even when you move around in the file `" and `. will take you to +the remembered position. At least until you make another change or leave the +file. + + +FILE MARKS + +In chapter 4 was explained how you can place a mark in a file with "mx" and +jump to that position with "`x". That works within one file. If you edit +another file and place marks there, these are specific for that file. Thus +each file has its own set of marks, they are local to the file. + So far we were using marks with a lowercase letter. There are also marks +with an uppercase letter. These are global, they can be used from any file. +For example suppose that we are editing the file "foo.txt". Go to halfway the +file ("50%") and place the F mark there (F for foo): > + + 50%mF + +Now edit the file "bar.txt" and place the B mark (B for bar) at its last line: +> + GmB + +Now you can use the "'F" command to jump back to halfway foo.txt. Or edit yet +another file, type "'B" and you are at the end of bar.txt again. + +The file marks are remembered until they are placed somewhere else. Thus you +can place the mark, do hours of editing and still be able to jump back to that +mark. + It's often useful to think of a simple connection between the mark letter +and where it is placed. For example, use the H mark in a header file, M in +a Makefile and C in a C code file. + +To see where a specific mark is, give an argument to the ":marks" command: > + + :marks M + +You can also give several arguments: > + + :marks MCP + +Don't forget that you can use CTRL-O and CTRL-I to jump to older and newer +positions without placing marks there. + +============================================================================== +*07.4* Backup files + +Usually Vim does not produce a backup file. If you want to have one, all you +need to do is execute the following command: > + + :set backup + +The name of the backup file is the original file with a ~ added to the end. +If your file is named data.txt, for example, the backup file name is +data.txt~. + If you do not like the fact that the backup files end with ~, you can +change the extension: > + + :set backupext=.bak + +This will use data.txt.bak instead of data.txt~. + Another option that matters here is 'backupdir'. It specifies where the +backup file is written. The default, to write the backup in the same +directory as the original file, will mostly be the right thing. + + Note: + When the 'backup' option isn't set but the 'writebackup' is, Vim will + still create a backup file. However, it is deleted as soon as writing + the file was completed successfully. This functions as a safety + against losing your original file when writing fails in some way (disk + full is the most common cause; being hit by lightning might be + another, although less common). + + +KEEPING THE ORIGINAL FILE + +If you are editing source files, you might want to keep the file before you +make any changes. But the backup file will be overwritten each time you write +the file. Thus it only contains the previous version, not the first one. + To make Vim keep the original file, set the 'patchmode' option. This +specifies the extension used for the first backup of a changed file. Usually +you would do this: > + + :set patchmode=.orig + +When you now edit the file data.txt for the first time, make changes and write +the file, Vim will keep a copy of the unchanged file under the name +"data.txt.orig". + If you make further changes to the file, Vim will notice that +"data.txt.orig" already exists and leave it alone. Further backup files will +then be called "data.txt~" (or whatever you specified with 'backupext'). + If you leave 'patchmode' empty (that is the default), the original file +will not be kept. + +============================================================================== +*07.5* Copy text between files + +This explains how to copy text from one file to another. Let's start with a +simple example. Edit the file that contains the text you want to copy. Move +the cursor to the start of the text and press "v". This starts Visual mode. +Now move the cursor to the end of the text and press "y". This yanks (copies) +the selected text. + To copy the above paragraph, you would do: > + + :edit thisfile + /This + vjjjj$y + +Now edit the file you want to put the text in. Move the cursor to the +character where you want the text to appear after. Use "p" to put the text +there. > + :edit otherfile + /There + p + +Of course you can use many other commands to yank the text. For example, to +select whole lines start Visual mode with "V". Or use CTRL-V to select a +rectangular block. Or use "Y" to yank a single line, "yaw" to yank-a-word, +etc. + The "p" command puts the text after the cursor. Use "P" to put the text +before the cursor. Notice that Vim remembers if you yanked a whole line or a +block, and puts it back that way. + + +USING REGISTERS + +When you want to copy several pieces of text from one file to another, having +to switch between the files and writing the target file takes a lot of time. +To avoid this, copy each piece of text to its own register. + A register is a place where Vim stores text. Here we will use the +registers named a to z (later you will find out there are others). Let's copy +a sentence to the f register (f for First): > + + "fyas + +The "yas" command yanks a sentence like before. It's the "f that tells Vim +the text should be place in the f register. This must come just before the +yank command. + Now yank three whole lines to the l register (l for line): > + + "l3Y + +The count could be before the "l just as well. To yank a block of text to the +b (for block) register: > + + CTRL-Vjjww"by + +Notice that the register specification "b is just before the "y" command. +This is required. If you would have put it before the "w" command, it would +not have worked. + Now you have three pieces of text in the f, l and b registers. Edit +another file, move around and place the text where you want it: > + + "fp + +Again, the register specification "f comes before the "p" command. + You can put the registers in any order. And the text stays in the register +until you yank something else into it. Thus you can put it as many times as +you like. + +When you delete text, you can also specify a register. Use this to move +several pieces of text around. For example, to delete-a-word and write it in +the w register: > + + "wdaw + +Again, the register specification comes before the delete command "d". + + +APPENDING TO A FILE + +When collecting lines of text into one file, you can use this command: > + + :write >> logfile + +This will write the text of the current file to the end of "logfile". Thus it +is appended. This avoids that you have to copy the lines, edit the log file +and put them there. Thus you save two steps. But you can only append to the +end of a file. + To append only a few lines, select them in Visual mode before typing +":write". In chapter 10 you will learn other ways to select a range of lines. + +============================================================================== +*07.6* Viewing a file + +Sometimes you only want to see what a file contains, without the intention to +ever write it back. There is the risk that you type ":w" without thinking and +overwrite the original file anyway. To avoid this, edit the file read-only. + To start Vim in readonly mode, use this command: > + + vim -R file + +On Unix this command should do the same thing: > + + view file + +You are now editing "file" in read-only mode. When you try using ":w" you +will get an error message and the file won't be written. + When you try to make a change to the file Vim will give you a warning: + + W10: Warning: Changing a readonly file ~ + +The change will be done though. This allows for formatting the file, for +example, to be able to read it easily. + If you make changes to a file and forgot that it was read-only, you can +still write it. Add the ! to the write command to force writing. + +If you really want to forbid making changes in a file, do this: > + + vim -M file + +Now every attempt to change the text will fail. The help files are like this, +for example. If you try to make a change you get this error message: + + E21: Cannot make changes, 'modifiable' is off ~ + +You could use the -M argument to setup Vim to work in a viewer mode. This is +only voluntary though, since these commands will remove the protection: > + + :set modifiable + :set write + +============================================================================== +*07.7* Changing the file name + +A clever way to start editing a new file is by using an existing file that +contains most of what you need. For example, you start writing a new program +to move a file. You know that you already have a program that copies a file, +thus you start with: > + + :edit copy.c + +You can delete the stuff you don't need. Now you need to save the file under +a new name. The ":saveas" command can be used for this: > + + :saveas move.c + +Vim will write the file under the given name, and edit that file. Thus the +next time you do ":write", it will write "move.c". "copy.c" remains +unmodified. + When you want to change the name of the file you are editing, but don't +want to write the file, you can use this command: > + + :file move.c + +Vim will mark the file as "not edited". This means that Vim knows this is not +the file you started editing. When you try to write the file, you might get +this message: + + E13: File exists (use ! to override) ~ + +This protects you from accidentally overwriting another file. + +============================================================================== + +Next chapter: |usr_08.txt| Splitting windows + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_08.txt b/runtime/doc/usr_08.txt new file mode 100644 index 0000000000..ef26b46eb7 --- /dev/null +++ b/runtime/doc/usr_08.txt @@ -0,0 +1,601 @@ +*usr_08.txt* For Vim version 7.4. Last change: 2014 Jul 06 + + VIM USER MANUAL - by Bram Moolenaar + + Splitting windows + + +Display two different files above each other. Or view two locations in the +file at the same time. See the difference between two files by putting them +side by side. All this is possible with split windows. + +|08.1| Split a window +|08.2| Split a window on another file +|08.3| Window size +|08.4| Vertical splits +|08.5| Moving windows +|08.6| Commands for all windows +|08.7| Viewing differences with vimdiff +|08.8| Various +|08.9| Tab pages + + Next chapter: |usr_09.txt| Using the GUI + Previous chapter: |usr_07.txt| Editing more than one file +Table of contents: |usr_toc.txt| + +============================================================================== +*08.1* Split a window + +The easiest way to open a new window is to use the following command: > + + :split + +This command splits the screen into two windows and leaves the cursor in the +top one: + + +----------------------------------+ + |/* file one.c */ | + |~ | + |~ | + |one.c=============================| + |/* file one.c */ | + |~ | + |one.c=============================| + | | + +----------------------------------+ + +What you see here is two windows on the same file. The line with "====" is +that status line. It displays information about the window above it. (In +practice the status line will be in reverse video.) + The two windows allow you to view two parts of the same file. For example, +you could make the top window show the variable declarations of a program, and +the bottom one the code that uses these variables. + +The CTRL-W w command can be used to jump between the windows. If you are in +the top window, CTRL-W w jumps to the window below it. If you are in the +bottom window it will jump to the first window. (CTRL-W CTRL-W does the same +thing, in case you let go of the CTRL key a bit later.) + + +CLOSE THE WINDOW + +To close a window, use the command: > + + :close + +Actually, any command that quits editing a file works, like ":quit" and "ZZ". +But ":close" prevents you from accidentally exiting Vim when you close the +last window. + + +CLOSING ALL OTHER WINDOWS + +If you have opened a whole bunch of windows, but now want to concentrate on +one of them, this command will be useful: > + + :only + +This closes all windows, except for the current one. If any of the other +windows has changes, you will get an error message and that window won't be +closed. + +============================================================================== +*08.2* Split a window on another file + +The following command opens a second window and starts editing the given file: +> + :split two.c + +If you were editing one.c, then the result looks like this: + + +----------------------------------+ + |/* file two.c */ | + |~ | + |~ | + |two.c=============================| + |/* file one.c */ | + |~ | + |one.c=============================| + | | + +----------------------------------+ + +To open a window on a new, empty file, use this: > + + :new + +You can repeat the ":split" and ":new" commands to create as many windows as +you like. + +============================================================================== +*08.3* Window size + +The ":split" command can take a number argument. If specified, this will be +the height of the new window. For example, the following opens a new window +three lines high and starts editing the file alpha.c: > + + :3split alpha.c + +For existing windows you can change the size in several ways. When you have a +working mouse, it is easy: Move the mouse pointer to the status line that +separates two windows, and drag it up or down. + +To increase the size of a window: > + + CTRL-W + + +To decrease it: > + + CTRL-W - + +Both of these commands take a count and increase or decrease the window size +by that many lines. Thus "4 CTRL-W +" make the window four lines higher. + +To set the window height to a specified number of lines: > + + {height}CTRL-W _ + +That's: a number {height}, CTRL-W and then an underscore (the - key with Shift +on English-US keyboards). + To make a window as high as it can be, use the CTRL-W _ command without a +count. + + +USING THE MOUSE + +In Vim you can do many things very quickly from the keyboard. Unfortunately, +the window resizing commands require quite a bit of typing. In this case, +using the mouse is faster. Position the mouse pointer on a status line. Now +press the left mouse button and drag. The status line will move, thus making +the window on one side higher and the other smaller. + + +OPTIONS + +The 'winheight' option can be set to a minimal desired height of a window and +'winminheight' to a hard minimum height. + Likewise, there is 'winwidth' for the minimal desired width and +'winminwidth' for the hard minimum width. + The 'equalalways' option, when set, makes Vim equalize the windows sizes +when a window is closed or opened. + +============================================================================== +*08.4* Vertical splits + +The ":split" command creates the new window above the current one. To make +the window appear at the left side, use: > + + :vsplit + +or: > + :vsplit two.c + +The result looks something like this: + + +--------------------------------------+ + |/* file two.c */ |/* file one.c */ | + |~ |~ | + |~ |~ | + |~ |~ | + |two.c===============one.c=============| + | | + +--------------------------------------+ + +Actually, the | lines in the middle will be in reverse video. This is called +the vertical separator. It separates the two windows left and right of it. + +There is also the ":vnew" command, to open a vertically split window on a new, +empty file. Another way to do this: > + + :vertical new + +The ":vertical" command can be inserted before another command that splits a +window. This will cause that command to split the window vertically instead +of horizontally. (If the command doesn't split a window, it works +unmodified.) + + +MOVING BETWEEN WINDOWS + +Since you can split windows horizontally and vertically as much as you like, +you can create almost any layout of windows. Then you can use these commands +to move between them: + + CTRL-W h move to the window on the left + CTRL-W j move to the window below + CTRL-W k move to the window above + CTRL-W l move to the window on the right + + CTRL-W t move to the TOP window + CTRL-W b move to the BOTTOM window + +You will notice the same letters as used for moving the cursor. And the +cursor keys can also be used, if you like. + More commands to move to other windows: |Q_wi|. + +============================================================================== +*08.5* Moving windows + +You have split a few windows, but now they are in the wrong place. Then you +need a command to move the window somewhere else. For example, you have three +windows like this: + + +----------------------------------+ + |/* file two.c */ | + |~ | + |~ | + |two.c=============================| + |/* file three.c */ | + |~ | + |~ | + |three.c===========================| + |/* file one.c */ | + |~ | + |one.c=============================| + | | + +----------------------------------+ + +Clearly the last one should be at the top. Go to that window (using CTRL-W w) +and the type this command: > + + CTRL-W K + +This uses the uppercase letter K. What happens is that the window is moved to +the very top. You will notice that K is again used for moving upwards. + When you have vertical splits, CTRL-W K will move the current window to the +top and make it occupy the full width of the Vim window. If this is your +layout: + + +-------------------------------------------+ + |/* two.c */ |/* three.c */ |/* one.c */ | + |~ |~ |~ | + |~ |~ |~ | + |~ |~ |~ | + |~ |~ |~ | + |~ |~ |~ | + |two.c=========three.c=========one.c========| + | | + +-------------------------------------------+ + +Then using CTRL-W K in the middle window (three.c) will result in: + + +-------------------------------------------+ + |/* three.c */ | + |~ | + |~ | + |three.c====================================| + |/* two.c */ |/* one.c */ | + |~ |~ | + |two.c==================one.c===============| + | | + +-------------------------------------------+ + +The other three similar commands (you can probably guess these now): + + CTRL-W H move window to the far left + CTRL-W J move window to the bottom + CTRL-W L move window to the far right + +============================================================================== +*08.6* Commands for all windows + +When you have several windows open and you want to quit Vim, you can close +each window separately. A quicker way is using this command: > + + :qall + +This stands for "quit all". If any of the windows contain changes, Vim will +not exit. The cursor will automatically be positioned in a window with +changes. You can then either use ":write" to save the changes, or ":quit!" to +throw them away. + +If you know there are windows with changes, and you want to save all these +changes, use this command: > + + :wall + +This stands for "write all". But actually, it only writes files with +changes. Vim knows it doesn't make sense to write files that were not +changed. + And then there is the combination of ":qall" and ":wall": the "write and +quit all" command: > + + :wqall + +This writes all modified files and quits Vim. + Finally, there is a command that quits Vim and throws away all changes: > + + :qall! + +Be careful, there is no way to undo this command! + + +OPENING A WINDOW FOR ALL ARGUMENTS + +To make Vim open a window for each file, start it with the "-o" argument: > + + vim -o one.txt two.txt three.txt + +This results in: + + +-------------------------------+ + |file one.txt | + |~ | + |one.txt========================| + |file two.txt | + |~ | + |two.txt========================| + |file three.txt | + |~ | + |three.txt======================| + | | + +-------------------------------+ + +The "-O" argument is used to get vertically split windows. + When Vim is already running, the ":all" command opens a window for each +file in the argument list. ":vertical all" does it with vertical splits. + +============================================================================== +*08.7* Viewing differences with vimdiff + +There is a special way to start Vim, which shows the differences between two +files. Let's take a file "main.c" and insert a few characters in one line. +Write this file with the 'backup' option set, so that the backup file +"main.c~" will contain the previous version of the file. + Type this command in a shell (not in Vim): > + + vimdiff main.c~ main.c + +Vim will start, with two windows side by side. You will only see the line +in which you added characters, and a few lines above and below it. + + VV VV + +-----------------------------------------+ + |+ +--123 lines: /* a|+ +--123 lines: /* a| <- fold + | text | text | + | text | text | + | text | text | + | text | changed text | <- changed line + | text | text | + | text | ------------------| <- deleted line + | text | text | + | text | text | + | text | text | + |+ +--432 lines: text|+ +--432 lines: text| <- fold + | ~ | ~ | + | ~ | ~ | + |main.c~==============main.c==============| + | | + +-----------------------------------------+ + +(This picture doesn't show the highlighting, use the vimdiff command for a +better look.) + +The lines that were not modified have been collapsed into one line. This is +called a closed fold. They are indicated in the picture with "<- fold". Thus +the single fold line at the top stands for 123 text lines. These lines are +equal in both files. + The line marked with "<- changed line" is highlighted, and the inserted +text is displayed with another color. This clearly shows what the difference +is between the two files. + The line that was deleted is displayed with "---" in the main.c window. +See the "<- deleted line" marker in the picture. These characters are not +really there. They just fill up main.c, so that it displays the same number +of lines as the other window. + + +THE FOLD COLUMN + +Each window has a column on the left with a slightly different background. In +the picture above these are indicated with "VV". You notice there is a plus +character there, in front of each closed fold. Move the mouse pointer to that +plus and click the left button. The fold will open, and you can see the text +that it contains. + The fold column contains a minus sign for an open fold. If you click on +this -, the fold will close. + Obviously, this only works when you have a working mouse. You can also use +"zo" to open a fold and "zc" to close it. + + +DIFFING IN VIM + +Another way to start in diff mode can be done from inside Vim. Edit the +"main.c" file, then make a split and show the differences: > + + :edit main.c + :vertical diffsplit main.c~ + +The ":vertical" command is used to make the window split vertically. If you +omit this, you will get a horizontal split. + +If you have a patch or diff file, you can use the third way to start diff +mode. First edit the file to which the patch applies. Then tell Vim the name +of the patch file: > + + :edit main.c + :vertical diffpatch main.c.diff + +WARNING: The patch file must contain only one patch, for the file you are +editing. Otherwise you will get a lot of error messages, and some files might +be patched unexpectedly. + The patching will only be done to the copy of the file in Vim. The file on +your harddisk will remain unmodified (until you decide to write the file). + + +SCROLL BINDING + +When the files have more changes, you can scroll in the usual way. Vim will +try to keep both the windows start at the same position, so you can easily see +the differences side by side. + When you don't want this for a moment, use this command: > + + :set noscrollbind + + +JUMPING TO CHANGES + +When you have disabled folding in some way, it may be difficult to find the +changes. Use this command to jump forward to the next change: > + + ]c + +To go the other way use: > + + [c + +Prepended a count to jump further away. + + +REMOVING CHANGES + +You can move text from one window to the other. This either removes +differences or adds new ones. Vim doesn't keep the highlighting updated in +all situations. To update it use this command: > + + :diffupdate + +To remove a difference, you can move the text in a highlighted block from one +window to another. Take the "main.c" and "main.c~" example above. Move the +cursor to the left window, on the line that was deleted in the other window. +Now type this command: > + + dp + +The change will be removed by putting the text of the current window in the +other window. "dp" stands for "diff put". + You can also do it the other way around. Move the cursor to the right +window, to the line where "changed" was inserted. Now type this command: > + + do + +The change will now be removed by getting the text from the other window. +Since there are no changes left now, Vim puts all text in a closed fold. +"do" stands for "diff obtain". "dg" would have been better, but that already +has a different meaning ("dgg" deletes from the cursor until the first line). + +For details about diff mode, see |vimdiff|. + +============================================================================== +*08.8* Various + +The 'laststatus' option can be used to specify when the last window has a +statusline: + + 0 never + 1 only when there are split windows (the default) + 2 always + +Many commands that edit another file have a variant that splits the window. +For Command-line commands this is done by prepending an "s". For example: +":tag" jumps to a tag, ":stag" splits the window and jumps to a +tag. + For Normal mode commands a CTRL-W is prepended. CTRL-^ jumps to the +alternate file, CTRL-W CTRL-^ splits the window and edits the alternate file. + +The 'splitbelow' option can be set to make a new window appear below the +current window. The 'splitright' option can be set to make a vertically split +window appear right of the current window. + +When splitting a window you can prepend a modifier command to tell where the +window is to appear: + + :leftabove {cmd} left or above the current window + :aboveleft {cmd} idem + :rightbelow {cmd} right or below the current window + :belowright {cmd} idem + :topleft {cmd} at the top or left of the Vim window + :botright {cmd} at the bottom or right of the Vim window + + +============================================================================== +*08.9* Tab pages + +You will have noticed that windows never overlap. That means you quickly run +out of screen space. The solution for this is called Tab pages. + +Assume you are editing "thisfile". To create a new tab page use this command: > + + :tabedit thatfile + +This will edit the file "thatfile" in a window that occupies the whole Vim +window. And you will notice a bar at the top with the two file names: + + +----------------------------------+ + | thisfile | /thatfile/ __________X| (thatfile is bold) + |/* thatfile */ | + |that | + |that | + |~ | + |~ | + |~ | + | | + +----------------------------------+ + +You now have two tab pages. The first one has a window for "thisfile" and the +second one a window for "thatfile". It's like two pages that are on top of +each other, with a tab sticking out of each page showing the file name. + +Now use the mouse to click on "thisfile" in the top line. The result is + + +----------------------------------+ + | /thisfile/ | thatfile __________X| (thisfile is bold) + |/* thisfile */ | + |this | + |this | + |~ | + |~ | + |~ | + | | + +----------------------------------+ + +Thus you can switch between tab pages by clicking on the label in the top +line. If you don't have a mouse or don't want to use it, you can use the "gt" +command. Mnemonic: Goto Tab. + +Now let's create another tab page with the command: > + + :tab split + +This makes a new tab page with one window that is editing the same buffer as +the window we were in: + + +-------------------------------------+ + | thisfile | /thisfile/ | thatfile __X| (thisfile is bold) + |/* thisfile */ | + |this | + |this | + |~ | + |~ | + |~ | + | | + +-------------------------------------+ + +You can put ":tab" before any Ex command that opens a window. The window will +be opened in a new tab page. Another example: > + + :tab help gt + +Will show the help text for "gt" in a new tab page. + +A few more things you can do with tab pages: + +- click with the mouse in the space after the last label + The next tab page will be selected, like with "gt". + +- click with the mouse on the "X" in the top right corner + The current tab page will be closed. Unless there are unsaved + changes in the current tab page. + +- double click with the mouse in the top line + A new tab page will be created. + +- the "tabonly" command + Closes all tab pages except the current one. Unless there are unsaved + changes in other tab pages. + +For more information about tab pages see |tab-page|. + +============================================================================== + +Next chapter: |usr_09.txt| Using the GUI + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_09.txt b/runtime/doc/usr_09.txt new file mode 100644 index 0000000000..68575f5184 --- /dev/null +++ b/runtime/doc/usr_09.txt @@ -0,0 +1,289 @@ +*usr_09.txt* For Vim version 7.4. Last change: 2006 Apr 24 + + VIM USER MANUAL - by Bram Moolenaar + + Using the GUI + + +Vim works in an ordinary terminal. GVim can do the same things and a few +more. The GUI offers menus, a toolbar, scrollbars and other items. This +chapter is about these extra things that the GUI offers. + +|09.1| Parts of the GUI +|09.2| Using the mouse +|09.3| The clipboard +|09.4| Select mode + + Next chapter: |usr_10.txt| Making big changes + Previous chapter: |usr_08.txt| Splitting windows +Table of contents: |usr_toc.txt| + +============================================================================== +*09.1* Parts of the GUI + +You might have an icon on your desktop that starts gVim. Otherwise, one of +these commands should do it: > + + gvim file.txt + vim -g file.txt + +If this doesn't work you don't have a version of Vim with GUI support. You +will have to install one first. + Vim will open a window and display "file.txt" in it. What the window looks +like depends on the version of Vim. It should resemble the following picture +(for as far as this can be shown in ASCII!). + + +----------------------------------------------------+ + | file.txt + (~/dir) - VIM X | <- window title + +----------------------------------------------------+ + | File Edit Tools Syntax Buffers Window Help | <- menubar + +----------------------------------------------------+ + | aaa bbb ccc ddd eee fff ggg hhh iii jjj | <- toolbar + | aaa bbb ccc ddd eee fff ggg hhh iii jjj | + +----------------------------------------------------+ + | file text | ^ | + | ~ | # | + | ~ | # | <- scrollbar + | ~ | # | + | ~ | # | + | ~ | # | + | | V | + +----------------------------------------------------+ + +The largest space is occupied by the file text. This shows the file in the +same way as in a terminal. With some different colors and another font +perhaps. + + +THE WINDOW TITLE + +At the very top is the window title. This is drawn by your window system. +Vim will set the title to show the name of the current file. First comes the +name of the file. Then some special characters and the directory of the file +in parens. These special character can be present: + + - The file cannot be modified (e.g., a help file) + + The file contains changes + = The file is read-only + =+ The file is read-only, contains changes anyway + +If nothing is shown you have an ordinary, unchanged file. + + +THE MENUBAR + +You know how menus work, right? Vim has the usual items, plus a few more. +Browse them to get an idea of what you can use them for. A relevant submenu +is Edit/Global Settings. You will find these entries: + + Toggle Toolbar make the toolbar appear/disappear + Toggle Bottom Scrollbar make a scrollbar appear/disappear at the bottom + Toggle Left Scrollbar make a scrollbar appear/disappear at the left + Toggle Right Scrollbar make a scrollbar appear/disappear at the right + +On most systems you can tear-off the menus. Select the top item of the menu, +the one that looks like a dashed line. You will get a separate window with +the items of the menu. It will hang around until you close the window. + + +THE TOOLBAR + +This contains icons for the most often used actions. Hopefully the icons are +self-explanatory. There are tooltips to get an extra hint (move the mouse +pointer to the icon without clicking and don't move it for a second). + +The "Edit/Global Settings/Toggle Toolbar" menu item can be used to make the +toolbar disappear. If you never want a toolbar, use this command in your +vimrc file: > + + :set guioptions-=T + +This removes the 'T' flag from the 'guioptions' option. Other parts of the +GUI can also be enabled or disabled with this option. See the help for it. + + +THE SCROLLBARS + +By default there is one scrollbar on the right. It does the obvious thing. +When you split the window, each window will get its own scrollbar. + You can make a horizontal scrollbar appear with the menu item +Edit/Global Settings/Toggle Bottom Scrollbar. This is useful in diff mode, or +when the 'wrap' option has been reset (more about that later). + +When there are vertically split windows, only the windows on the right side +will have a scrollbar. However, when you move the cursor to a window on the +left, it will be this one the that scrollbar controls. This takes a bit of +time to get used to. + When you work with vertically split windows, consider adding a scrollbar on +the left. This can be done with a menu item, or with the 'guioptions' option: +> + :set guioptions+=l + +This adds the 'l' flag to 'guioptions'. + +============================================================================== +*09.2* Using the mouse + +Standards are wonderful. In Microsoft Windows, you can use the mouse to +select text in a standard manner. The X Window system also has a standard +system for using the mouse. Unfortunately, these two standards are not the +same. + Fortunately, you can customize Vim. You can make the behavior of the mouse +work like an X Window system mouse or a Microsoft Windows mouse. The following +command makes the mouse behave like an X Window mouse: > + + :behave xterm + +The following command makes the mouse work like a Microsoft Windows mouse: > + + :behave mswin + +The default behavior of the mouse on UNIX systems is xterm. The default +behavior on a Microsoft Windows system is selected during the installation +process. For details about what the two behaviors are, see |:behave|. Here +follows a summary. + + +XTERM MOUSE BEHAVIOR + +Left mouse click position the cursor +Left mouse drag select text in Visual mode +Middle mouse click paste text from the clipboard +Right mouse click extend the selected text until the mouse + pointer + + +MSWIN MOUSE BEHAVIOR + +Left mouse click position the cursor +Left mouse drag select text in Select mode (see |09.4|) +Left mouse click, with Shift extend the selected text until the mouse + pointer +Middle mouse click paste text from the clipboard +Right mouse click display a pop-up menu + + +The mouse can be further tuned. Check out these options if you want to change +the way how the mouse works: + + 'mouse' in which mode the mouse is used by Vim + 'mousemodel' what effect a mouse click has + 'mousetime' time between clicks for a double-click + 'mousehide' hide the mouse while typing + 'selectmode' whether the mouse starts Visual or Select mode + +============================================================================== +*09.3* The clipboard + +In section |04.7| the basic use of the clipboard was explained. There is one +essential thing to explain about X-windows: There are actually two places to +exchange text between programs. MS-Windows doesn't have this. + +In X-Windows there is the "current selection". This is the text that is +currently highlighted. In Vim this is the Visual area (this assumes you are +using the default option settings). You can paste this selection in another +application without any further action. + For example, in this text select a few words with the mouse. Vim will +switch to Visual mode and highlight the text. Now start another gVim, without +a file name argument, so that it displays an empty window. Click the middle +mouse button. The selected text will be inserted. + +The "current selection" will only remain valid until some other text is +selected. After doing the paste in the other gVim, now select some characters +in that window. You will notice that the words that were previously selected +in the other gVim window are displayed differently. This means that it no +longer is the current selection. + +You don't need to select text with the mouse, using the keyboard commands for +Visual mode works just as well. + + +THE REAL CLIPBOARD + +Now for the other place with which text can be exchanged. We call this the +"real clipboard", to avoid confusion. Often both the "current selection" and +the "real clipboard" are called clipboard, you'll have to get used to that. + To put text on the real clipboard, select a few different words in one of +the gVims you have running. Then use the Edit/Copy menu entry. Now the text +has been copied to the real clipboard. You can't see this, unless you have +some application that shows the clipboard contents (e.g., KDE's klipper). + Now select the other gVim, position the cursor somewhere and use the +Edit/Paste menu. You will see the text from the real clipboard is inserted. + + +USING BOTH + +This use of both the "current selection" and the "real clipboard" might sound +a bit confusing. But it is very useful. Let's show this with an example. +Use one gVim with a text file and perform these actions: + +- Select two words in Visual mode. +- Use the Edit/Copy menu to get these words onto the clipboard. +- Select one other word in Visual mode. +- Use the Edit/Paste menu item. What will happen is that the single selected + word is replaced with the two words from the clipboard. +- Move the mouse pointer somewhere else and click the middle button. You + will see that the word you just overwrote with the clipboard is inserted + here. + +If you use the "current selection" and the "real clipboard" with care, you can +do a lot of useful editing with them. + + +USING THE KEYBOARD + +If you don't like using the mouse, you can access the current selection and +the real clipboard with two registers. The "* register is for the current +selection. + To make text become the current selection, use Visual mode. For example, +to select a whole line just press "V". + To insert the current selection before the cursor: > + + "*P + +Notice the uppercase "P". The lowercase "p" puts the text after the cursor. + +The "+ register is used for the real clipboard. For example, to copy the text +from the cursor position until the end of the line to the clipboard: > + + "+y$ + +Remember, "y" is yank, which is Vim's copy command. + To insert the contents of the real clipboard before the cursor: > + + "+P + +It's the same as for the current selection, but uses the plus (+) register +instead of the star (*) register. + +============================================================================== +*09.4* Select mode + +And now something that is used more often on MS-Windows than on X-Windows. +But both can do it. You already know about Visual mode. Select mode is like +Visual mode, because it is also used to select text. But there is an obvious +difference: When typing text, the selected text is deleted and the typed text +replaces it. + +To start working with Select mode, you must first enable it (for MS-Windows +it is probably already enabled, but you can do this anyway): > + + :set selectmode+=mouse + +Now use the mouse to select some text. It is highlighted like in Visual mode. +Now press a letter. The selected text is deleted, and the single letter +replaces it. You are in Insert mode now, thus you can continue typing. + +Since typing normal text causes the selected text to be deleted, you can not +use the normal movement commands "hjkl", "w", etc. Instead, use the shifted +function keys. <S-Left> (shifted cursor left key) moves the cursor left. The +selected text is changed like in Visual mode. The other shifted cursor keys +do what you expect. <S-End> and <S-Home> also work. + +You can tune the way Select mode works with the 'selectmode' option. + +============================================================================== + +Next chapter: |usr_10.txt| Making big changes + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_10.txt b/runtime/doc/usr_10.txt new file mode 100644 index 0000000000..4398c4d64f --- /dev/null +++ b/runtime/doc/usr_10.txt @@ -0,0 +1,824 @@ +*usr_10.txt* For Vim version 7.4. Last change: 2006 Nov 05 + + VIM USER MANUAL - by Bram Moolenaar + + Making big changes + + +In chapter 4 several ways to make small changes were explained. This chapter +goes into making changes that are repeated or can affect a large amount of +text. The Visual mode allows doing various things with blocks of text. Use +an external program to do really complicated things. + +|10.1| Record and playback commands +|10.2| Substitution +|10.3| Command ranges +|10.4| The global command +|10.5| Visual block mode +|10.6| Reading and writing part of a file +|10.7| Formatting text +|10.8| Changing case +|10.9| Using an external program + + Next chapter: |usr_11.txt| Recovering from a crash + Previous chapter: |usr_09.txt| Using the GUI +Table of contents: |usr_toc.txt| + +============================================================================== +*10.1* Record and playback commands + +The "." command repeats the preceding change. But what if you want to do +something more complex than a single change? That's where command recording +comes in. There are three steps: + +1. The "q{register}" command starts recording keystrokes into the register + named {register}. The register name must be between a and z. +2. Type your commands. +3. To finish recording, press q (without any extra character). + +You can now execute the macro by typing the command "@{register}". + +Take a look at how to use these commands in practice. You have a list of +filenames that look like this: + + stdio.h ~ + fcntl.h ~ + unistd.h ~ + stdlib.h ~ + +And what you want is the following: + + #include "stdio.h" ~ + #include "fcntl.h" ~ + #include "unistd.h" ~ + #include "stdlib.h" ~ + +You start by moving to the first character of the first line. Next you +execute the following commands: + + qa Start recording a macro in register a. + ^ Move to the beginning of the line. + i#include "<Esc> Insert the string #include " at the beginning + of the line. + $ Move to the end of the line. + a"<Esc> Append the character double quotation mark (") + to the end of the line. + j Go to the next line. + q Stop recording the macro. + +Now that you have done the work once, you can repeat the change by typing the +command "@a" three times. + The "@a" command can be preceded by a count, which will cause the macro to +be executed that number of times. In this case you would type: > + + 3@a + + +MOVE AND EXECUTE + +You might have the lines you want to change in various places. Just move the +cursor to each location and use the "@a" command. If you have done that once, +you can do it again with "@@". That's a bit easier to type. If you now +execute register b with "@b", the next "@@" will use register b. + If you compare the playback method with using ".", there are several +differences. First of all, "." can only repeat one change. As seen in the +example above, "@a" can do several changes, and move around as well. +Secondly, "." can only remember the last change. Executing a register allows +you to make any changes and then still use "@a" to replay the recorded +commands. Finally, you can use 26 different registers. Thus you can remember +26 different command sequences to execute. + + +USING REGISTERS + +The registers used for recording are the same ones you used for yank and +delete commands. This allows you to mix recording with other commands to +manipulate the registers. + Suppose you have recorded a few commands in register n. When you execute +this with "@n" you notice you did something wrong. You could try recording +again, but perhaps you will make another mistake. Instead, use this trick: + + G Go to the end of the file. + o<Esc> Create an empty line. + "np Put the text from the n register. You now see + the commands you typed as text in the file. + {edits} Change the commands that were wrong. This is + just like editing text. + 0 Go to the start of the line. + "ny$ Yank the corrected commands into the n + register. + dd Delete the scratch line. + +Now you can execute the corrected commands with "@n". (If your recorded +commands include line breaks, adjust the last two items in the example to +include all the lines.) + + +APPENDING TO A REGISTER + +So far we have used a lowercase letter for the register name. To append to a +register, use an uppercase letter. + Suppose you have recorded a command to change a word to register c. It +works properly, but you would like to add a search for the next word to +change. This can be done with: > + + qC/word<Enter>q + +You start with "qC", which records to the c register and appends. Thus +writing to an uppercase register name means to append to the register with +the same letter, but lowercase. + +This works both with recording and with yank and delete commands. For +example, you want to collect a sequence of lines into the a register. Yank +the first line with: > + + "aY + +Now move to the second line, and type: > + + "AY + +Repeat this command for all lines. The a register now contains all those +lines, in the order you yanked them. + +============================================================================== +*10.2* Substitution *find-replace* + +The ":substitute" command enables you to perform string replacements on a +whole range of lines. The general form of this command is as follows: > + + :[range]substitute/from/to/[flags] + +This command changes the "from" string to the "to" string in the lines +specified with [range]. For example, you can change "Professor" to "Teacher" +in all lines with the following command: > + + :%substitute/Professor/Teacher/ +< + Note: + The ":substitute" command is almost never spelled out completely. + Most of the time, people use the abbreviated version ":s". From here + on the abbreviation will be used. + +The "%" before the command specifies the command works on all lines. Without +a range, ":s" only works on the current line. More about ranges in the next +section |10.3|. + +By default, the ":substitute" command changes only the first occurrence on +each line. For example, the preceding command changes the line: + + Professor Smith criticized Professor Johnson today. ~ + +to: + + Teacher Smith criticized Professor Johnson today. ~ + +To change every occurrence on the line, you need to add the g (global) flag. +The command: > + + :%s/Professor/Teacher/g + +results in (starting with the original line): + + Teacher Smith criticized Teacher Johnson today. ~ + +Other flags include p (print), which causes the ":substitute" command to print +out the last line it changes. The c (confirm) flag tells ":substitute" to ask +you for confirmation before it performs each substitution. Enter the +following: > + + :%s/Professor/Teacher/c + +Vim finds the first occurrence of "Professor" and displays the text it is +about to change. You get the following prompt: > + + replace with Teacher (y/n/a/q/l/^E/^Y)? + +At this point, you must enter one of the following answers: + + y Yes; make this change. + n No; skip this match. + a All; make this change and all remaining ones without + further confirmation. + q Quit; don't make any more changes. + l Last; make this change and then quit. + CTRL-E Scroll the text one line up. + CTRL-Y Scroll the text one line down. + + +The "from" part of the substitute command is actually a pattern. The same +kind as used for the search command. For example, this command only +substitutes "the" when it appears at the start of a line: > + + :s/^the/these/ + +If you are substituting with a "from" or "to" part that includes a slash, you +need to put a backslash before it. A simpler way is to use another character +instead of the slash. A plus, for example: > + + :s+one/two+one or two+ + +============================================================================== +*10.3* Command ranges + +The ":substitute" command, and many other : commands, can be applied to a +selection of lines. This is called a range. + The simple form of a range is {number},{number}. For example: > + + :1,5s/this/that/g + +Executes the substitute command on the lines 1 to 5. Line 5 is included. +The range is always placed before the command. + +A single number can be used to address one specific line: > + + :54s/President/Fool/ + +Some commands work on the whole file when you do not specify a range. To make +them work on the current line the "." address is used. The ":write" command +works like that. Without a range, it writes the whole file. To make it write +only the current line into a file: > + + :.write otherfile + +The first line always has number one. How about the last line? The "$" +character is used for this. For example, to substitute in the lines from the +cursor to the end: > + + :.,$s/yes/no/ + +The "%" range that we used before, is actually a short way to say "1,$", from +the first to the last line. + + +USING A PATTERN IN A RANGE + +Suppose you are editing a chapter in a book, and want to replace all +occurrences of "grey" with "gray". But only in this chapter, not in the next +one. You know that only chapter boundaries have the word "Chapter" in the +first column. This command will work then: > + + :?^Chapter?,/^Chapter/s=grey=gray=g + +You can see a search pattern is used twice. The first "?^Chapter?" finds the +line above the current position that matches this pattern. Thus the ?pattern? +range is used to search backwards. Similarly, "/^Chapter/" is used to search +forward for the start of the next chapter. + To avoid confusion with the slashes, the "=" character was used in the +substitute command here. A slash or another character would have worked as +well. + + +ADD AND SUBTRACT + +There is a slight error in the above command: If the title of the next chapter +had included "grey" it would be replaced as well. Maybe that's what you +wanted, but what if you didn't? Then you can specify an offset. + To search for a pattern and then use the line above it: > + + /Chapter/-1 + +You can use any number instead of the 1. To address the second line below the +match: > + + /Chapter/+2 + +The offsets can also be used with the other items in a range. Look at this +one: > + + :.+3,$-5 + +This specifies the range that starts three lines below the cursor and ends +five lines before the last line in the file. + + +USING MARKS + +Instead of figuring out the line numbers of certain positions, remembering them +and typing them in a range, you can use marks. + Place the marks as mentioned in chapter 3. For example, use "mt" to mark +the top of an area and "mb" to mark the bottom. Then you can use this range +to specify the lines between the marks (including the lines with the marks): > + + :'t,'b + + +VISUAL MODE AND RANGES + +You can select text with Visual mode. If you then press ":" to start a colon +command, you will see this: > + + :'<,'> + +Now you can type the command and it will be applied to the range of lines that +was visually selected. + + Note: + When using Visual mode to select part of a line, or using CTRL-V to + select a block of text, the colon commands will still apply to whole + lines. This might change in a future version of Vim. + +The '< and '> are actually marks, placed at the start and end of the Visual +selection. The marks remain at their position until another Visual selection +is made. Thus you can use the "'<" command to jump to position where the +Visual area started. And you can mix the marks with other items: > + + :'>,$ + +This addresses the lines from the end of the Visual area to the end of the +file. + + +A NUMBER OF LINES + +When you know how many lines you want to change, you can type the number and +then ":". For example, when you type "5:", you will get: > + + :.,.+4 + +Now you can type the command you want to use. It will use the range "." +(current line) until ".+4" (four lines down). Thus it spans five lines. + +============================================================================== +*10.4* The global command + +The ":global" command is one of the more powerful features of Vim. It allows +you to find a match for a pattern and execute a command there. The general +form is: > + + :[range]global/{pattern}/{command} + +This is similar to the ":substitute" command. But, instead of replacing the +matched text with other text, the command {command} is executed. + + Note: + The command executed for ":global" must be one that starts with a + colon. Normal mode commands can not be used directly. The |:normal| + command can do this for you. + +Suppose you want to change "foobar" to "barfoo", but only in C++ style +comments. These comments start with "//". Use this command: > + + :g+//+s/foobar/barfoo/g + +This starts with ":g". That is short for ":global", just like ":s" is short +for ":substitute". Then the pattern, enclosed in plus characters. Since the +pattern we are looking for contains a slash, this uses the plus character to +separate the pattern. Next comes the substitute command that changes "foobar" +into "barfoo". + The default range for the global command is the whole file. Thus no range +was specified in this example. This is different from ":substitute", which +works on one line without a range. + The command isn't perfect, since it also matches lines where "//" appears +halfway a line, and the substitution will also take place before the "//". + +Just like with ":substitute", any pattern can be used. When you learn more +complicated patterns later, you can use them here. + +============================================================================== +*10.5* Visual block mode + +With CTRL-V you can start selection of a rectangular area of text. There are +a few commands that do something special with the text block. + +There is something special about using the "$" command in Visual block mode. +When the last motion command used was "$", all lines in the Visual selection +will extend until the end of the line, also when the line with the cursor is +shorter. This remains effective until you use a motion command that moves the +cursor horizontally. Thus using "j" keeps it, "h" stops it. + + +INSERTING TEXT + +The command "I{string}<Esc>" inserts the text {string} in each line, just +left of the visual block. You start by pressing CTRL-V to enter visual block +mode. Now you move the cursor to define your block. Next you type I to enter +Insert mode, followed by the text to insert. As you type, the text appears on +the first line only. + After you press <Esc> to end the insert, the text will magically be +inserted in the rest of the lines contained in the visual selection. Example: + + include one ~ + include two ~ + include three ~ + include four ~ + +Move the cursor to the "o" of "one" and press CTRL-V. Move it down with "3j" +to "four". You now have a block selection that spans four lines. Now type: > + + Imain.<Esc> + +The result: + + include main.one ~ + include main.two ~ + include main.three ~ + include main.four ~ + +If the block spans short lines that do not extend into the block, the text is +not inserted in that line. For example, make a Visual block selection that +includes the word "long" in the first and last line of this text, and thus has +no text selected in the second line: + + This is a long line ~ + short ~ + Any other long line ~ + + ^^^^ selected block + +Now use the command "Ivery <Esc>". The result is: + + This is a very long line ~ + short ~ + Any other very long line ~ + +In the short line no text was inserted. + +If the string you insert contains a newline, the "I" acts just like a Normal +insert command and affects only the first line of the block. + +The "A" command works the same way, except that it appends after the right +side of the block. And it does insert text in a short line. Thus you can +make a choice whether you do or don't want to append text to a short line. + There is one special case for "A": Select a Visual block and then use "$" +to make the block extend to the end of each line. Using "A" now will append +the text to the end of each line. + Using the same example from above, and then typing "$A XXX<Esc>, you get +this result: + + This is a long line XXX ~ + short XXX ~ + Any other long line XXX ~ + +This really requires using the "$" command. Vim remembers that it was used. +Making the same selection by moving the cursor to the end of the longest line +with other movement commands will not have the same result. + + +CHANGING TEXT + +The Visual block "c" command deletes the block and then throws you into Insert +mode to enable you to type in a string. The string will be inserted in each +line in the block. + Starting with the same selection of the "long" words as above, then typing +"c_LONG_<Esc>", you get this: + + This is a _LONG_ line ~ + short ~ + Any other _LONG_ line ~ + +Just like with "I" the short line is not changed. Also, you can't enter a +newline in the new text. + +The "C" command deletes text from the left edge of the block to the end of +line. It then puts you in Insert mode so that you can type in a string, +which is added to the end of each line. + Starting with the same text again, and typing "Cnew text<Esc>" you get: + + This is a new text ~ + short ~ + Any other new text ~ + +Notice that, even though only the "long" word was selected, the text after it +is deleted as well. Thus only the location of the left edge of the visual +block really matters. + Again, short lines that do not reach into the block are excluded. + +Other commands that change the characters in the block: + + ~ swap case (a -> A and A -> a) + U make uppercase (a -> A and A -> A) + u make lowercase (a -> a and A -> a) + + +FILLING WITH A CHARACTER + +To fill the whole block with one character, use the "r" command. Again, +starting with the same example text from above, and then typing "rx": + + This is a xxxx line ~ + short ~ + Any other xxxx line ~ + + + Note: + If you want to include characters beyond the end of the line in the + block, check out the 'virtualedit' feature in chapter 25. + + +SHIFTING + +The command ">" shifts the selected text to the right one shift amount, +inserting whitespace. The starting point for this shift is the left edge of +the visual block. + With the same example again, ">" gives this result: + + This is a long line ~ + short ~ + Any other long line ~ + +The shift amount is specified with the 'shiftwidth' option. To change it to +use 4 spaces: > + + :set shiftwidth=4 + +The "<" command removes one shift amount of whitespace at the left +edge of the block. This command is limited by the amount of text that is +there; so if there is less than a shift amount of whitespace available, it +removes what it can. + + +JOINING LINES + +The "J" command joins all selected lines together into one line. Thus it +removes the line breaks. Actually, the line break, leading white space and +trailing white space is replaced by one space. Two spaces are used after a +line ending (that can be changed with the 'joinspaces' option). + Let's use the example that we got so familiar with now. The result of +using the "J" command: + + This is a long line short Any other long line ~ + +The "J" command doesn't require a blockwise selection. It works with "v" and +"V" selection in exactly the same way. + +If you don't want the white space to be changed, use the "gJ" command. + +============================================================================== +*10.6* Reading and writing part of a file + +When you are writing an e-mail message, you may want to include another file. +This can be done with the ":read {filename}" command. The text of the file is +put below the cursor line. + Starting with this text: + + Hi John, ~ + Here is the diff that fixes the bug: ~ + Bye, Pierre. ~ + +Move the cursor to the second line and type: > + + :read patch + +The file named "patch" will be inserted, with this result: + + Hi John, ~ + Here is the diff that fixes the bug: ~ + 2c2 ~ + < for (i = 0; i <= length; ++i) ~ + --- ~ + > for (i = 0; i < length; ++i) ~ + Bye, Pierre. ~ + +The ":read" command accepts a range. The file will be put below the last line +number of this range. Thus ":$r patch" appends the file "patch" at the end of +the file. + What if you want to read the file above the first line? This can be done +with the line number zero. This line doesn't really exist, you will get an +error message when using it with most commands. But this command is allowed: +> + :0read patch + +The file "patch" will be put above the first line of the file. + + +WRITING A RANGE OF LINES + +To write a range of lines to a file, the ":write" command can be used. +Without a range it writes the whole file. With a range only the specified +lines are written: > + + :.,$write tempo + +This writes the lines from the cursor until the end of the file into the file +"tempo". If this file already exists you will get an error message. Vim +protects you from accidentally overwriting an existing file. If you know what +you are doing and want to overwrite the file, append !: > + + :.,$write! tempo + +CAREFUL: The ! must follow the ":write" command immediately, without white +space. Otherwise it becomes a filter command, which is explained later in +this chapter. + + +APPENDING TO A FILE + +In the first section of this chapter was explained how to collect a number of +lines into a register. The same can be done to collect lines in a file. +Write the first line with this command: > + + :.write collection + +Now move the cursor to the second line you want to collect, and type this: > + + :.write >>collection + +The ">>" tells Vim the "collection" file is not to be written as a new file, +but the line must be appended at the end. You can repeat this as many times +as you like. + +============================================================================== +*10.7* Formatting text + +When you are typing plain text, it's nice if the length of each line is +automatically trimmed to fit in the window. To make this happen while +inserting text, set the 'textwidth' option: > + + :set textwidth=72 + +You might remember that in the example vimrc file this command was used for +every text file. Thus if you are using that vimrc file, you were already +using it. To check the current value of 'textwidth': > + + :set textwidth + +Now lines will be broken to take only up to 72 characters. But when you +insert text halfway a line, or when you delete a few words, the lines will get +too long or too short. Vim doesn't automatically reformat the text. + To tell Vim to format the current paragraph: > + + gqap + +This starts with the "gq" command, which is an operator. Following is "ap", +the text object that stands for "a paragraph". A paragraph is separated from +the next paragraph by an empty line. + + Note: + A blank line, which contains white space, does NOT separate + paragraphs. This is hard to notice! + +Instead of "ap" you could use any motion or text object. If your paragraphs +are properly separated, you can use this command to format the whole file: > + + gggqG + +"gg" takes you to the first line, "gq" is the format operator and "G" the +motion that jumps to the last line. + +In case your paragraphs aren't clearly defined, you can format just the lines +you manually select. Move the cursor to the first line you want to format. +Start with the command "gqj". This formats the current line and the one below +it. If the first line was short, words from the next line will be appended. +If it was too long, words will be moved to the next line. The cursor moves to +the second line. Now you can use "." to repeat the command. Keep doing this +until you are at the end of the text you want to format. + +============================================================================== +*10.8* Changing case + +You have text with section headers in lowercase. You want to make the word +"section" all uppercase. Do this with the "gU" operator. Start with the +cursor in the first column: > + + gUw +< section header ----> SECTION header + +The "gu" operator does exactly the opposite: > + + guw +< SECTION header ----> section header + +You can also use "g~" to swap case. All these are operators, thus they work +with any motion command, with text objects and in Visual mode. + To make an operator work on lines you double it. The delete operator is +"d", thus to delete a line you use "dd". Similarly, "gugu" makes a whole line +lowercase. This can be shortened to "guu". "gUgU" is shortened to "gUU" and +"g~g~" to "g~~". Example: > + + g~~ +< Some GIRLS have Fun ----> sOME girls HAVE fUN ~ + +============================================================================== +*10.9* Using an external program + +Vim has a very powerful set of commands, it can do anything. But there may +still be something that an external command can do better or faster. + The command "!{motion}{program}" takes a block of text and filters it +through an external program. In other words, it runs the system command +represented by {program}, giving it the block of text represented by {motion} +as input. The output of this command then replaces the selected block. + Because this summarizes badly if you are unfamiliar with UNIX filters, take +a look at an example. The sort command sorts a file. If you execute the +following command, the unsorted file input.txt will be sorted and written to +output.txt. (This works on both UNIX and Microsoft Windows.) > + + sort <input.txt >output.txt + +Now do the same thing in Vim. You want to sort lines 1 through 5 of a file. +You start by putting the cursor on line 1. Next you execute the following +command: > + + !5G + +The "!" tells Vim that you are performing a filter operation. The Vim editor +expects a motion command to follow, indicating which part of the file to +filter. The "5G" command tells Vim to go to line 5, so it now knows that it +is to filter lines 1 (the current line) through 5. + In anticipation of the filtering, the cursor drops to the bottom of the +screen and a ! prompt displays. You can now type in the name of the filter +program, in this case "sort". Therefore, your full command is as follows: > + + !5Gsort<Enter> + +The result is that the sort program is run on the first 5 lines. The output +of the program replaces these lines. + + line 55 line 11 + line 33 line 22 + line 11 --> line 33 + line 22 line 44 + line 44 line 55 + last line last line + +The "!!" command filters the current line through a filter. In Unix the "date" +command prints the current time and date. "!!date<Enter>" replaces the current +line with the output of "date". This is useful to add a timestamp to a file. + + +WHEN IT DOESN'T WORK + +Starting a shell, sending it text and capturing the output requires that Vim +knows how the shell works exactly. When you have problems with filtering, +check the values of these options: + + 'shell' specifies the program that Vim uses to execute + external programs. + 'shellcmdflag' argument to pass a command to the shell + 'shellquote' quote to be used around the command + 'shellxquote' quote to be used around the command and redirection + 'shelltype' kind of shell (only for the Amiga) + 'shellslash' use forward slashes in the command (only for + MS-Windows and alikes) + 'shellredir' string used to write the command output into a file + +On Unix this is hardly ever a problem, because there are two kinds of shells: +"sh" like and "csh" like. Vim checks the 'shell' option and sets related +options automatically, depending on whether it sees "csh" somewhere in +'shell'. + On MS-Windows, however, there are many different shells and you might have +to tune the options to make filtering work. Check the help for the options +for more information. + + +READING COMMAND OUTPUT + +To read the contents of the current directory into the file, use this: + +on Unix: > + :read !ls +on MS-Windows: > + :read !dir + +The output of the "ls" or "dir" command is captured and inserted in the text, +below the cursor. This is similar to reading a file, except that the "!" is +used to tell Vim that a command follows. + The command may have arguments. And a range can be used to tell where Vim +should put the lines: > + + :0read !date -u + +This inserts the current time and date in UTC format at the top of the file. +(Well, if you have a date command that accepts the "-u" argument.) Note the +difference with using "!!date": that replaced a line, while ":read !date" will +insert a line. + + +WRITING TEXT TO A COMMAND + +The Unix command "wc" counts words. To count the words in the current file: > + + :write !wc + +This is the same write command as before, but instead of a file name the "!" +character is used and the name of an external command. The written text will +be passed to the specified command as its standard input. The output could +look like this: + + 4 47 249 ~ + +The "wc" command isn't verbose. This means you have 4 lines, 47 words and 249 +characters. + +Watch out for this mistake: > + + :write! wc + +This will write the file "wc" in the current directory, with force. White +space is important here! + + +REDRAWING THE SCREEN + +If the external command produced an error message, the display may have been +messed up. Vim is very efficient and only redraws those parts of the screen +that it knows need redrawing. But it can't know about what another program +has written. To tell Vim to redraw the screen: > + + CTRL-L + +============================================================================== + +Next chapter: |usr_11.txt| Recovering from a crash + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_11.txt b/runtime/doc/usr_11.txt new file mode 100644 index 0000000000..9935ded48c --- /dev/null +++ b/runtime/doc/usr_11.txt @@ -0,0 +1,307 @@ +*usr_11.txt* For Vim version 7.4. Last change: 2010 Jul 20 + + VIM USER MANUAL - by Bram Moolenaar + + Recovering from a crash + + +Did your computer crash? And you just spent hours editing? Don't panic! Vim +stores enough information to be able to restore most of your work. This +chapter shows you how to get your work back and explains how the swap file is +used. + +|11.1| Basic recovery +|11.2| Where is the swap file? +|11.3| Crashed or not? +|11.4| Further reading + + Next chapter: |usr_12.txt| Clever tricks + Previous chapter: |usr_10.txt| Making big changes +Table of contents: |usr_toc.txt| + +============================================================================== +*11.1* Basic recovery + +In most cases recovering a file is quite simple, assuming you know which file +you were editing (and the harddisk is still working). Start Vim on the file, +with the "-r" argument added: > + + vim -r help.txt + +Vim will read the swap file (used to store text you were editing) and may read +bits and pieces of the original file. If Vim recovered your changes you will +see these messages (with different file names, of course): + + Using swap file ".help.txt.swp" ~ + Original file "~/vim/runtime/doc/help.txt" ~ + Recovery completed. You should check if everything is OK. ~ + (You might want to write out this file under another name ~ + and run diff with the original file to check for changes) ~ + You may want to delete the .swp file now. ~ + +To be on the safe side, write this file under another name: > + + :write help.txt.recovered + +Compare the file with the original file to check if you ended up with what you +expected. Vimdiff is very useful for this |08.7|. For example: > + + :write help.txt.recovered + :edit # + :diffsp help.txt + +Watch out for the original file to contain a more recent version (you saved +the file just before the computer crashed). And check that no lines are +missing (something went wrong that Vim could not recover). + If Vim produces warning messages when recovering, read them carefully. +This is rare though. + +If the recovery resulted in text that is exactly the same as the file +contents, you will get this message: + + Using swap file ".help.txt.swp" ~ + Original file "~/vim/runtime/doc/help.txt" ~ + Recovery completed. Buffer contents equals file contents. ~ + You may want to delete the .swp file now. ~ + +This usually happens if you already recovered your changes, or you wrote the +file after making changes. It is safe to delete the swap file now. + +It is normal that the last few changes can not be recovered. Vim flushes the +changes to disk when you don't type for about four seconds, or after typing +about two hundred characters. This is set with the 'updatetime' and +'updatecount' options. Thus when Vim didn't get a chance to save itself when +the system went down, the changes after the last flush will be lost. + +If you were editing without a file name, give an empty string as argument: > + + vim -r "" + +You must be in the right directory, otherwise Vim can't find the swap file. + +============================================================================== +*11.2* Where is the swap file? + +Vim can store the swap file in several places. Normally it is in the same +directory as the original file. To find it, change to the directory of the +file, and use: > + + vim -r + +Vim will list the swap files that it can find. It will also look in other +directories where the swap file for files in the current directory may be +located. It will not find swap files in any other directories though, it +doesn't search the directory tree. + The output could look like this: + + Swap files found: ~ + In current directory: ~ + 1. .main.c.swp ~ + owned by: mool dated: Tue May 29 21:00:25 2001 ~ + file name: ~mool/vim/vim6/src/main.c ~ + modified: YES ~ + user name: mool host name: masaka.moolenaar.net ~ + process ID: 12525 ~ + In directory ~/tmp: ~ + -- none -- ~ + In directory /var/tmp: ~ + -- none -- ~ + In directory /tmp: ~ + -- none -- ~ + +If there are several swap files that look like they may be the one you want to +use, a list is given of these swap files and you are requested to enter the +number of the one you want to use. Carefully look at the dates to decide +which one you want to use. + In case you don't know which one to use, just try them one by one and check +the resulting files if they are what you expected. + + +USING A SPECIFIC SWAP FILE + +If you know which swap file needs to be used, you can recover by giving the +swap file name. Vim will then finds out the name of the original file from +the swap file. + +Example: > + vim -r .help.txt.swo + +This is also handy when the swap file is in another directory than expected. +Vim recognizes files with the pattern *.s[uvw][a-z] as swap files. + +If this still does not work, see what file names Vim reports and rename the +files accordingly. Check the 'directory' option to see where Vim may have +put the swap file. + + Note: + Vim tries to find the swap file by searching the directories in the + 'dir' option, looking for files that match "filename.sw?". If + wildcard expansion doesn't work (e.g., when the 'shell' option is + invalid), Vim does a desperate try to find the file "filename.swp". + If that fails too, you will have to give the name of the swapfile + itself to be able to recover the file. + +============================================================================== +*11.3* Crashed or not? *ATTENTION* *E325* + +Vim tries to protect you from doing stupid things. Suppose you innocently +start editing a file, expecting the contents of the file to show up. Instead, +Vim produces a very long message: + + E325: ATTENTION ~ + Found a swap file by the name ".main.c.swp" ~ + owned by: mool dated: Tue May 29 21:09:28 2001 ~ + file name: ~mool/vim/vim6/src/main.c ~ + modified: no ~ + user name: mool host name: masaka.moolenaar.net ~ + process ID: 12559 (still running) ~ + While opening file "main.c" ~ + dated: Tue May 29 19:46:12 2001 ~ + ~ + (1) Another program may be editing the same file. ~ + If this is the case, be careful not to end up with two ~ + different instances of the same file when making changes. ~ + Quit, or continue with caution. ~ + ~ + (2) An edit session for this file crashed. ~ + If this is the case, use ":recover" or "vim -r main.c" ~ + to recover the changes (see ":help recovery"). ~ + If you did this already, delete the swap file ".main.c.swp" ~ + to avoid this message. ~ + +You get this message, because, when starting to edit a file, Vim checks if a +swap file already exists for that file. If there is one, there must be +something wrong. It may be one of these two situations. + +1. Another edit session is active on this file. Look in the message for the + line with "process ID". It might look like this: + + process ID: 12559 (still running) ~ + + The text "(still running)" indicates that the process editing this file + runs on the same computer. When working on a non-Unix system you will not + get this extra hint. When editing a file over a network, you may not see + the hint, because the process might be running on another computer. In + those two cases you must find out what the situation is yourself. + If there is another Vim editing the same file, continuing to edit will + result in two versions of the same file. The one that is written last will + overwrite the other one, resulting in loss of changes. You better quit + this Vim. + +2. The swap file might be the result from a previous crash of Vim or the + computer. Check the dates mentioned in the message. If the date of the + swap file is newer than the file you were editing, and this line appears: + + modified: YES ~ + + Then you very likely have a crashed edit session that is worth recovering. + If the date of the file is newer than the date of the swap file, then + either it was changed after the crash (perhaps you recovered it earlier, + but didn't delete the swap file?), or else the file was saved before the + crash but after the last write of the swap file (then you're lucky: you + don't even need that old swap file). Vim will warn you for this with this + extra line: + + NEWER than swap file! ~ + + +UNREADABLE SWAP FILE + +Sometimes the line + + [cannot be read] ~ + +will appear under the name of the swap file. This can be good or bad, +depending on circumstances. + +It is good if a previous editing session crashed without having made any +changes to the file. Then a directory listing of the swap file will show +that it has zero bytes. You may delete it and proceed. + +It is slightly bad if you don't have read permission for the swap file. You +may want to view the file read-only, or quit. On multi-user systems, if you +yourself did the last changes under a different login name, a logout +followed by a login under that other name might cure the "read error". Or +else you might want to find out who last edited (or is editing) the file and +have a talk with them. + +It is very bad if it means there is a physical read error on the disk +containing the swap file. Fortunately, this almost never happens. +You may want to view the file read-only at first (if you can), to see the +extent of the changes that were "forgotten". If you are the one in charge of +that file, be prepared to redo your last changes. + + +WHAT TO DO? *swap-exists-choices* + +If dialogs are supported you will be asked to select one of five choices: + + Swap file ".main.c.swp" already exists! ~ + [O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort, (D)elete it: ~ + +O Open the file readonly. Use this when you just want to view the file and + don't need to recover it. You might want to use this when you know someone + else is editing the file, but you just want to look in it and not make + changes. + +E Edit the file anyway. Use this with caution! If the file is being edited + in another Vim, you might end up with two versions of the file. Vim will + try to warn you when this happens, but better be safe then sorry. + +R Recover the file from the swap file. Use this if you know that the swap + file contains changes that you want to recover. + +Q Quit. This avoids starting to edit the file. Use this if there is another + Vim editing the same file. + When you just started Vim, this will exit Vim. When starting Vim with + files in several windows, Vim quits only if there is a swap file for the + first one. When using an edit command, the file will not be loaded and you + are taken back to the previously edited file. + +A Abort. Like Quit, but also abort further commands. This is useful when + loading a script that edits several files, such as a session with multiple + windows. + +D Delete the swap file. Use this when you are sure you no longer need it. + For example, when it doesn't contain changes, or when the file itself is + newer than the swap file. + On Unix this choice is only offered when the process that created the + swap file does not appear to be running. + +If you do not get the dialog (you are running a version of Vim that does not +support it), you will have to do it manually. To recover the file, use this +command: > + + :recover + + +Vim cannot always detect that a swap file already exists for a file. This is +the case when the other edit session puts the swap files in another directory +or when the path name for the file is different when editing it on different +machines. Therefore, don't rely on Vim always warning you. + +If you really don't want to see this message, you can add the 'A' flag to the +'shortmess' option. But it's very unusual that you need this. + +For remarks about encryption and the swap file, see |:recover-crypt|. + +============================================================================== +*11.4* Further reading + +|swap-file| An explanation about where the swap file will be created and + what its name is. +|:preserve| Manually flushing the swap file to disk. +|:swapname| See the name of the swap file for the current file. +'updatecount' Number of key strokes after which the swap file is flushed to + disk. +'updatetime' Timeout after which the swap file is flushed to disk. +'swapsync' Whether the disk is synced when the swap file is flushed. +'directory' List of directory names where to store the swap file. +'maxmem' Limit for memory usage before writing text to the swap file. +'maxmemtot' Same, but for all files in total. + +============================================================================== + +Next chapter: |usr_12.txt| Clever tricks + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_12.txt b/runtime/doc/usr_12.txt new file mode 100644 index 0000000000..fba1b53274 --- /dev/null +++ b/runtime/doc/usr_12.txt @@ -0,0 +1,358 @@ +*usr_12.txt* For Vim version 7.4. Last change: 2007 May 11 + + VIM USER MANUAL - by Bram Moolenaar + + Clever tricks + + +By combining several commands you can make Vim do nearly everything. In this +chapter a number of useful combinations will be presented. This uses the +commands introduced in the previous chapters and a few more. + +|12.1| Replace a word +|12.2| Change "Last, First" to "First Last" +|12.3| Sort a list +|12.4| Reverse line order +|12.5| Count words +|12.6| Find a man page +|12.7| Trim blanks +|12.8| Find where a word is used + + Next chapter: |usr_20.txt| Typing command-line commands quickly + Previous chapter: |usr_11.txt| Recovering from a crash +Table of contents: |usr_toc.txt| + +============================================================================== +*12.1* Replace a word + +The substitute command can be used to replace all occurrences of a word with +another word: > + + :%s/four/4/g + +The "%" range means to replace in all lines. The "g" flag at the end causes +all words in a line to be replaced. + This will not do the right thing if your file also contains "thirtyfour". +It would be replaced with "thirty4". To avoid this, use the "\<" item to +match the start of a word: > + + :%s/\<four/4/g + +Obviously, this still goes wrong on "fourteen". Use "\>" to match the end of +a word: > + + :%s/\<four\>/4/g + +If you are programming, you might want to replace "four" in comments, but not +in the code. Since this is difficult to specify, add the "c" flag to have the +substitute command prompt you for each replacement: > + + + :%s/\<four\>/4/gc + + +REPLACING IN SEVERAL FILES + +Suppose you want to replace a word in more than one file. You could edit each +file and type the command manually. It's a lot faster to use record and +playback. + Let's assume you have a directory with C++ files, all ending in ".cpp". +There is a function called "GetResp" that you want to rename to "GetAnswer". + + vim *.cpp Start Vim, defining the argument list to + contain all the C++ files. You are now in the + first file. + qq Start recording into the q register + :%s/\<GetResp\>/GetAnswer/g + Do the replacements in the first file. + :wnext Write this file and move to the next one. + q Stop recording. + @q Execute the q register. This will replay the + substitution and ":wnext". You can verify + that this doesn't produce an error message. + 999@q Execute the q register on the remaining files. + +At the last file you will get an error message, because ":wnext" cannot move +to the next file. This stops the execution, and everything is done. + + Note: + When playing back a recorded sequence, an error stops the execution. + Therefore, make sure you don't get an error message when recording. + +There is one catch: If one of the .cpp files does not contain the word +"GetResp", you will get an error and replacing will stop. To avoid this, add +the "e" flag to the substitute command: > + + :%s/\<GetResp\>/GetAnswer/ge + +The "e" flag tells ":substitute" that not finding a match is not an error. + +============================================================================== +*12.2* Change "Last, First" to "First Last" + +You have a list of names in this form: + + Doe, John ~ + Smith, Peter ~ + +You want to change that to: + + John Doe ~ + Peter Smith ~ + +This can be done with just one command: > + + :%s/\([^,]*\), \(.*\)/\2 \1/ + +Let's break this down in parts. Obviously it starts with a substitute +command. The "%" is the line range, which stands for the whole file. Thus +the substitution is done in every line in the file. + The arguments for the substitute command are "/from/to/". The slashes +separate the "from" pattern and the "to" string. This is what the "from" +pattern contains: + \([^,]*\), \(.*\) ~ + + The first part between \( \) matches "Last" \( \) + match anything but a comma [^,] + any number of times * + matches ", " literally , + The second part between \( \) matches "First" \( \) + any character . + any number of times * + +In the "to" part we have "\2" and "\1". These are called backreferences. +They refer to the text matched by the "\( \)" parts in the pattern. "\2" +refers to the text matched by the second "\( \)", which is the "First" name. +"\1" refers to the first "\( \)", which is the "Last" name. + You can use up to nine backreferences in the "to" part of a substitute +command. "\0" stands for the whole matched pattern. There are a few more +special items in a substitute command, see |sub-replace-special|. + +============================================================================== +*12.3* Sort a list + +In a Makefile you often have a list of files. For example: + + OBJS = \ ~ + version.o \ ~ + pch.o \ ~ + getopt.o \ ~ + util.o \ ~ + getopt1.o \ ~ + inp.o \ ~ + patch.o \ ~ + backup.o ~ + +To sort this list, filter the text through the external sort command: > + + /^OBJS + j + :.,/^$/-1!sort + +This goes to the first line, where "OBJS" is the first thing in the line. +Then it goes one line down and filters the lines until the next empty line. +You could also select the lines in Visual mode and then use "!sort". That's +easier to type, but more work when there are many lines. + The result is this: + + OBJS = \ ~ + backup.o ~ + getopt.o \ ~ + getopt1.o \ ~ + inp.o \ ~ + patch.o \ ~ + pch.o \ ~ + util.o \ ~ + version.o \ ~ + + +Notice that a backslash at the end of each line is used to indicate the line +continues. After sorting, this is wrong! The "backup.o" line that was at +the end didn't have a backslash. Now that it sorts to another place, it +must have a backslash. + The simplest solution is to add the backslash with "A \<Esc>". You can +keep the backslash in the last line, if you make sure an empty line comes +after it. That way you don't have this problem again. + +============================================================================== +*12.4* Reverse line order + +The |:global| command can be combined with the |:move| command to move all the +lines before the first line, resulting in a reversed file. The command is: > + + :global/^/m 0 + +Abbreviated: > + + :g/^/m 0 + +The "^" regular expression matches the beginning of the line (even if the line +is blank). The |:move| command moves the matching line to after the mythical +zeroth line, so the current matching line becomes the first line of the file. +As the |:global| command is not confused by the changing line numbering, +|:global| proceeds to match all remaining lines of the file and puts each as +the first. + +This also works on a range of lines. First move to above the first line and +mark it with "mt". Then move the cursor to the last line in the range and +type: > + + :'t+1,.g/^/m 't + +============================================================================== +*12.5* Count words + +Sometimes you have to write a text with a maximum number of words. Vim can +count the words for you. + When the whole file is what you want to count the words in, use this +command: > + + g CTRL-G + +Do not type a space after the g, this is just used here to make the command +easy to read. + The output looks like this: + + Col 1 of 0; Line 141 of 157; Word 748 of 774; Byte 4489 of 4976 ~ + +You can see on which word you are (748), and the total number of words in the +file (774). + +When the text is only part of a file, you could move to the start of the text, +type "g CTRL-G", move to the end of the text, type "g CTRL-G" again, and then +use your brain to compute the difference in the word position. That's a good +exercise, but there is an easier way. With Visual mode, select the text you +want to count words in. Then type g CTRL-G. The result: + + Selected 5 of 293 Lines; 70 of 1884 Words; 359 of 10928 Bytes ~ + +For other ways to count words, lines and other items, see |count-items|. + +============================================================================== +*12.6* Find a man page *find-manpage* + +While editing a shell script or C program, you are using a command or function +that you want to find the man page for (this is on Unix). Let's first use a +simple way: Move the cursor to the word you want to find help on and press > + + K + +Vim will run the external "man" program on the word. If the man page is +found, it is displayed. This uses the normal pager to scroll through the text +(mostly the "more" program). When you get to the end pressing <Enter> will +get you back into Vim. + +A disadvantage is that you can't see the man page and the text you are working +on at the same time. There is a trick to make the man page appear in a Vim +window. First, load the man filetype plugin: > + + :runtime! ftplugin/man.vim + +Put this command in your vimrc file if you intend to do this often. Now you +can use the ":Man" command to open a window on a man page: > + + :Man csh + +You can scroll around and the text is highlighted. This allows you to find +the help you were looking for. Use CTRL-W w to jump to the window with the +text you were working on. + To find a man page in a specific section, put the section number first. +For example, to look in section 3 for "echo": > + + :Man 3 echo + +To jump to another man page, which is in the text with the typical form +"word(1)", press CTRL-] on it. Further ":Man" commands will use the same +window. + +To display a man page for the word under the cursor, use this: > + + \K + +(If you redefined the <Leader>, use it instead of the backslash). +For example, you want to know the return value of "strstr()" while editing +this line: + + if ( strstr (input, "aap") == ) ~ + +Move the cursor to somewhere on "strstr" and type "\K". A window will open +to display the man page for strstr(). + +============================================================================== +*12.7* Trim blanks + +Some people find spaces and tabs at the end of a line useless, wasteful, and +ugly. To remove whitespace at the end of every line, execute the following +command: > + + :%s/\s\+$// + +The line range "%" is used, thus this works on the whole file. The pattern +that the ":substitute" command matches with is "\s\+$". This finds white +space characters (\s), 1 or more of them (\+), before the end-of-line ($). +Later will be explained how you write patterns like this |usr_27.txt|. + The "to" part of the substitute command is empty: "//". Thus it replaces +with nothing, effectively deleting the matched white space. + +Another wasteful use of spaces is placing them before a tab. Often these can +be deleted without changing the amount of white space. But not always! +Therefore, you can best do this manually. Use this search command: > + + / + +You cannot see it, but there is a space before a tab in this command. Thus +it's "/<Space><Tab>". Now use "x" to delete the space and check that the +amount of white space doesn't change. You might have to insert a tab if it +does change. Type "n" to find the next match. Repeat this until no more +matches can be found. + +============================================================================== +*12.8* Find where a word is used + +If you are a UNIX user, you can use a combination of Vim and the grep command +to edit all the files that contain a given word. This is extremely useful if +you are working on a program and want to view or edit all the files that +contain a specific variable. + For example, suppose you want to edit all the C program files that contain +the word "frame_counter". To do this you use the command: > + + vim `grep -l frame_counter *.c` + +Let's look at this command in detail. The grep command searches through a set +of files for a given word. Because the -l argument is specified, the command +will only list the files containing the word and not print the matching lines. +The word it is searching for is "frame_counter". Actually, this can be any +regular expression. (Note: What grep uses for regular expressions is not +exactly the same as what Vim uses.) + The entire command is enclosed in backticks (`). This tells the UNIX shell +to run this command and pretend that the results were typed on the command +line. So what happens is that the grep command is run and produces a list of +files, these files are put on the Vim command line. This results in Vim +editing the file list that is the output of grep. You can then use commands +like ":next" and ":first" to browse through the files. + + +FINDING EACH LINE + +The above command only finds the files in which the word is found. You still +have to find the word within the files. + Vim has a built-in command that you can use to search a set of files for a +given string. If you want to find all occurrences of "error_string" in all C +program files, for example, enter the following command: > + + :grep error_string *.c + +This causes Vim to search for the string "error_string" in all the specified +files (*.c). The editor will now open the first file where a match is found +and position the cursor on the first matching line. To go to the next +matching line (no matter in what file it is), use the ":cnext" command. To go +to the previous match, use the ":cprev" command. Use ":clist" to see all the +matches and where they are. + The ":grep" command uses the external commands grep (on Unix) or findstr +(on Windows). You can change this by setting the option 'grepprg'. + +============================================================================== + +Next chapter: |usr_20.txt| Typing command-line commands quickly + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_20.txt b/runtime/doc/usr_20.txt new file mode 100644 index 0000000000..5f0a660187 --- /dev/null +++ b/runtime/doc/usr_20.txt @@ -0,0 +1,384 @@ +*usr_20.txt* For Vim version 7.4. Last change: 2006 Apr 24 + + VIM USER MANUAL - by Bram Moolenaar + + Typing command-line commands quickly + + +Vim has a few generic features that makes it easier to enter commands. Colon +commands can be abbreviated, edited and repeated. Completion is available for +nearly everything. + +|20.1| Command line editing +|20.2| Command line abbreviations +|20.3| Command line completion +|20.4| Command line history +|20.5| Command line window + + Next chapter: |usr_21.txt| Go away and come back + Previous chapter: |usr_12.txt| Clever tricks +Table of contents: |usr_toc.txt| + +============================================================================== +*20.1* Command line editing + +When you use a colon (:) command or search for a string with / or ?, Vim puts +the cursor on the bottom of the screen. There you type the command or search +pattern. This is called the Command line. Also when it's used for entering a +search command. + +The most obvious way to edit the command you type is by pressing the <BS> key. +This erases the character before the cursor. To erase another character, +typed earlier, first move the cursor with the cursor keys. + For example, you have typed this: > + + :s/col/pig/ + +Before you hit <Enter>, you notice that "col" should be "cow". To correct +this, you type <Left> five times. The cursor is now just after "col". Type +<BS> and "w" to correct: > + + :s/cow/pig/ + +Now you can press <Enter> directly. You don't have to move the cursor to the +end of the line before executing the command. + +The most often used keys to move around in the command line: + + <Left> one character left + <Right> one character right + <S-Left> or <C-Left> one word left + <S-Right> or <C-Right> one word right + CTRL-B or <Home> to begin of command line + CTRL-E or <End> to end of command line + + Note: + <S-Left> (cursor left key with Shift key pressed) and <C-Left> (cursor + left key with Control pressed) will not work on all keyboards. Same + for the other Shift and Control combinations. + +You can also use the mouse to move the cursor. + + +DELETING + +As mentioned, <BS> deletes the character before the cursor. To delete a whole +word use CTRL-W. + + /the fine pig ~ + + CTRL-W + + /the fine ~ + +CTRL-U removes all text, thus allows you to start all over again. + + +OVERSTRIKE + +The <Insert> key toggles between inserting characters and replacing the +existing ones. Start with this text: + + /the fine pig ~ + +Move the cursor to the start of "fine" with <S-Left> twice (or <Left> eight +times, if <S-Left> doesn't work). Now press <Insert> to switch to overstrike +and type "great": + + /the greatpig ~ + +Oops, we lost the space. Now, don't use <BS>, because it would delete the +"t" (this is different from Replace mode). Instead, press <Insert> to switch +from overstrike to inserting, and type the space: + + /the great pig ~ + + +CANCELLING + +You thought of executing a : or / command, but changed your mind. To get rid +of what you already typed, without executing it, press CTRL-C or <Esc>. + + Note: + <Esc> is the universal "get out" key. Unfortunately, in the good old + Vi pressing <Esc> in a command line executed the command! Since that + might be considered to be a bug, Vim uses <Esc> to cancel the command. + But with the 'cpoptions' option it can be made Vi compatible. And + when using a mapping (which might be written for Vi) <Esc> also works + Vi compatible. Therefore, using CTRL-C is a method that always works. + +If you are at the start of the command line, pressing <BS> will cancel the +command. It's like deleting the ":" or "/" that the line starts with. + +============================================================================== +*20.2* Command line abbreviations + +Some of the ":" commands are really long. We already mentioned that +":substitute" can be abbreviated to ":s". This is a generic mechanism, all +":" commands can be abbreviated. + +How short can a command get? There are 26 letters, and many more commands. +For example, ":set" also starts with ":s", but ":s" doesn't start a ":set" +command. Instead ":set" can be abbreviated to ":se". + When the shorter form of a command could be used for two commands, it +stands for only one of them. There is no logic behind which one, you have to +learn them. In the help files the shortest form that works is mentioned. For +example: > + + :s[ubstitute] + +This means that the shortest form of ":substitute" is ":s". The following +characters are optional. Thus ":su" and ":sub" also work. + +In the user manual we will either use the full name of command, or a short +version that is still readable. For example, ":function" can be abbreviated +to ":fu". But since most people don't understand what that stands for, we +will use ":fun". (Vim doesn't have a ":funny" command, otherwise ":fun" would +be confusing too.) + +It is recommended that in Vim scripts you write the full command name. That +makes it easier to read back when you make later changes. Except for some +often used commands like ":w" (":write") and ":r" (":read"). + A particularly confusing one is ":end", which could stand for ":endif", +":endwhile" or ":endfunction". Therefore, always use the full name. + + +SHORT OPTION NAMES + +In the user manual the long version of the option names is used. Many options +also have a short name. Unlike ":" commands, there is only one short name +that works. For example, the short name of 'autoindent' is 'ai'. Thus these +two commands do the same thing: > + + :set autoindent + :set ai + +You can find the full list of long and short names here: |option-list|. + +============================================================================== +*20.3* Command line completion + +This is one of those Vim features that, by itself, is a reason to switch from +Vi to Vim. Once you have used this, you can't do without. + +Suppose you have a directory that contains these files: + + info.txt + intro.txt + bodyofthepaper.txt + +To edit the last one, you use the command: > + + :edit bodyofthepaper.txt + +It's easy to type this wrong. A much quicker way is: > + + :edit b<Tab> + +Which will result in the same command. What happened? The <Tab> key does +completion of the word before the cursor. In this case "b". Vim looks in the +directory and finds only one file that starts with a "b". That must be the +one you are looking for, thus Vim completes the file name for you. + +Now type: > + + :edit i<Tab> + +Vim will beep, and give you: > + + :edit info.txt + +The beep means that Vim has found more than one match. It then uses the first +match it found (alphabetically). If you press <Tab> again, you get: > + + :edit intro.txt + +Thus, if the first <Tab> doesn't give you the file you were looking for, press +it again. If there are more matches, you will see them all, one at a time. + If you press <Tab> on the last matching entry, you will go back to what you +first typed: > + + :edit i + +Then it starts all over again. Thus Vim cycles through the list of matches. +Use CTRL-P to go through the list in the other direction: + + <------------------- <Tab> -------------------------+ + | + <Tab> --> <Tab> --> + :edit i :edit info.txt :edit intro.txt + <-- CTRL-P <-- CTRL-P + | + +---------------------- CTRL-P ------------------------> + + +CONTEXT + +When you type ":set i" instead of ":edit i" and press <Tab> you get: > + + :set icon + +Hey, why didn't you get ":set info.txt"? That's because Vim has context +sensitive completion. The kind of words Vim will look for depends on the +command before it. Vim knows that you cannot use a file name just after a +":set" command, but you can use an option name. + Again, if you repeat typing the <Tab>, Vim will cycle through all matches. +There are quite a few, it's better to type more characters first: > + + :set isk<Tab> + +Gives: > + + :set iskeyword + +Now type "=" and press <Tab>: > + + :set iskeyword=@,48-57,_,192-255 + +What happens here is that Vim inserts the old value of the option. Now you +can edit it. + What is completed with <Tab> is what Vim expects in that place. Just try +it out to see how it works. In some situations you will not get what you +want. That's either because Vim doesn't know what you want, or because +completion was not implemented for that situation. In that case you will get +a <Tab> inserted (displayed as ^I). + + +LIST MATCHES + +When there are many matches, you would like to see an overview. Do this by +pressing CTRL-D. For example, pressing CTRL-D after: > + + :set is + +results in: > + + :set is + incsearch isfname isident iskeyword isprint + :set is + +Vim lists the matches and then comes back with the text you typed. You can +now check the list for the item you wanted. If it isn't there, you can use +<BS> to correct the word. If there are many matches, type a few more +characters before pressing <Tab> to complete the rest. + If you have watched carefully, you will have noticed that "incsearch" +doesn't start with "is". In this case "is" stands for the short name of +"incsearch". (Many options have a short and a long name.) Vim is clever +enough to know that you might have wanted to expand the short name of the +option into the long name. + + +THERE IS MORE + +The CTRL-L command completes the word to the longest unambiguous string. If +you type ":edit i" and there are files "info.txt" and "info_backup.txt" you +will get ":edit info". + +The 'wildmode' option can be used to change the way completion works. +The 'wildmenu' option can be used to get a menu-like list of matches. +Use the 'suffixes' option to specify files that are less important and appear +at the end of the list of files. +The 'wildignore' option specifies files that are not listed at all. + +More about all of this here: |cmdline-completion| + +============================================================================== +*20.4* Command line history + +In chapter 3 we briefly mentioned the history. The basics are that you can +use the <Up> key to recall an older command line. <Down> then takes you back +to newer commands. + +There are actually four histories. The ones we will mention here are for ":" +commands and for "/" and "?" search commands. The "/" and "?" commands share +the same history, because they are both search commands. The two other +histories are for expressions and input lines for the input() function. +|cmdline-history| + +Suppose you have done a ":set" command, typed ten more colon commands and then +want to repeat that ":set" command again. You could press ":" and then ten +times <Up>. There is a quicker way: > + + :se<Up> + +Vim will now go back to the previous command that started with "se". You have +a good chance that this is the ":set" command you were looking for. At least +you should not have to press <Up> very often (unless ":set" commands is all +you have done). + +The <Up> key will use the text typed so far and compare it with the lines in +the history. Only matching lines will be used. + If you do not find the line you were looking for, use <Down> to go back to +what you typed and correct that. Or use CTRL-U to start all over again. + +To see all the lines in the history: > + + :history + +That's the history of ":" commands. The search history is displayed with this +command: > + + :history / + +CTRL-P will work like <Up>, except that it doesn't matter what you already +typed. Similarly for CTRL-N and <Down>. CTRL-P stands for previous, CTRL-N +for next. + +============================================================================== +*20.5* Command line window + +Typing the text in the command line works different from typing text in Insert +mode. It doesn't allow many commands to change the text. For most commands +that's OK, but sometimes you have to type a complicated command. That's where +the command line window is useful. + +Open the command line window with this command: > + + q: + +Vim now opens a (small) window at the bottom. It contains the command line +history, and an empty line at the end: + + +-------------------------------------+ + |other window | + |~ | + |file.txt=============================| + |:e c | + |:e config.h.in | + |:set path=.,/usr/include,, | + |:set iskeyword=@,48-57,_,192-255 | + |:set is | + |:q | + |: | + |command-line=========================| + | | + +-------------------------------------+ + +You are now in Normal mode. You can use the "hjkl" keys to move around. For +example, move up with "5k" to the ":e config.h.in" line. Type "$h" to go to +the "i" of "in" and type "cwout". Now you have changed the line to: + + :e config.h.out ~ + +Now press <Enter> and this command will be executed. The command line window +will close. + The <Enter> command will execute the line under the cursor. It doesn't +matter whether Vim is in Insert mode or in Normal mode. + Changes in the command line window are lost. They do not result in the +history to be changed. Except that the command you execute will be added to +the end of the history, like with all executed commands. + +The command line window is very useful when you want to have overview of the +history, lookup a similar command, change it a bit and execute it. A search +command can be used to find something. + In the previous example the "?config" search command could have been used +to find the previous command that contains "config". It's a bit strange, +because you are using a command line to search in the command line window. +While typing that search command you can't open another command line window, +there can be only one. + +============================================================================== + +Next chapter: |usr_21.txt| Go away and come back + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_21.txt b/runtime/doc/usr_21.txt new file mode 100644 index 0000000000..450d394337 --- /dev/null +++ b/runtime/doc/usr_21.txt @@ -0,0 +1,499 @@ +*usr_21.txt* For Vim version 7.4. Last change: 2012 Nov 02 + + VIM USER MANUAL - by Bram Moolenaar + + Go away and come back + + +This chapter goes into mixing the use of other programs with Vim. Either by +executing program from inside Vim or by leaving Vim and coming back later. +Furthermore, this is about the ways to remember the state of Vim and restore +it later. + +|21.1| Suspend and resume +|21.2| Executing shell commands +|21.3| Remembering information; viminfo +|21.4| Sessions +|21.5| Views +|21.6| Modelines + + Next chapter: |usr_22.txt| Finding the file to edit + Previous chapter: |usr_20.txt| Typing command-line commands quickly +Table of contents: |usr_toc.txt| + +============================================================================== +*21.1* Suspend and resume + +Like most Unix programs Vim can be suspended by pressing CTRL-Z. This stops +Vim and takes you back to the shell it was started in. You can then do any +other commands until you are bored with them. Then bring back Vim with the +"fg" command. > + + CTRL-Z + {any sequence of shell commands} + fg + +You are right back where you left Vim, nothing has changed. + In case pressing CTRL-Z doesn't work, you can also use ":suspend". +Don't forget to bring Vim back to the foreground, you would lose any changes +that you made! + +Only Unix has support for this. On other systems Vim will start a shell for +you. This also has the functionality of being able to execute shell commands. +But it's a new shell, not the one that you started Vim from. + When you are running the GUI you can't go back to the shell where Vim was +started. CTRL-Z will minimize the Vim window instead. + +============================================================================== +*21.2* Executing shell commands + +To execute a single shell command from Vim use ":!{command}". For example, to +see a directory listing: > + + :!ls + :!dir + +The first one is for Unix, the second one for MS-Windows. + Vim will execute the program. When it ends you will get a prompt to hit +<Enter>. This allows you to have a look at the output from the command before +returning to the text you were editing. + The "!" is also used in other places where a program is run. Let's take +a look at an overview: + + :!{program} execute {program} + :r !{program} execute {program} and read its output + :w !{program} execute {program} and send text to its input + :[range]!{program} filter text through {program} + +Notice that the presence of a range before "!{program}" makes a big +difference. Without it executes the program normally, with the range a number +of text lines is filtered through the program. + +Executing a whole row of programs this way is possible. But a shell is much +better at it. You can start a new shell this way: > + + :shell + +This is similar to using CTRL-Z to suspend Vim. The difference is that a new +shell is started. + +When using the GUI the shell will be using the Vim window for its input and +output. Since Vim is not a terminal emulator, this will not work perfectly. +If you have trouble, try toggling the 'guipty' option. If this still doesn't +work well enough, start a new terminal to run the shell in. For example with: +> + :!xterm& + +============================================================================== +*21.3* Remembering information; viminfo + +After editing for a while you will have text in registers, marks in various +files, a command line history filled with carefully crafted commands. When +you exit Vim all of this is lost. But you can get it back! + +The viminfo file is designed to store status information: + + Command-line and Search pattern history + Text in registers + Marks for various files + The buffer list + Global variables + +Each time you exit Vim it will store this information in a file, the viminfo +file. When Vim starts again, the viminfo file is read and the information +restored. + +The 'viminfo' option is set by default to restore a limited number of items. +You might want to set it to remember more information. This is done through +the following command: > + + :set viminfo=string + +The string specifies what to save. The syntax of this string is an option +character followed by an argument. The option/argument pairs are separated by +commas. + Take a look at how you can build up your own viminfo string. First, the ' +option is used to specify how many files for which you save marks (a-z). Pick +a nice even number for this option (1000, for instance). Your command now +looks like this: > + + :set viminfo='1000 + +The f option controls whether global marks (A-Z and 0-9) are stored. If this +option is 0, none are stored. If it is 1 or you do not specify an f option, +the marks are stored. You want this feature, so now you have this: > + + :set viminfo='1000,f1 + +The < option controls how many lines are saved for each of the registers. By +default, all the lines are saved. If 0, nothing is saved. To avoid adding +thousands of lines to your viminfo file (which might never get used and makes +starting Vim slower) you use a maximum of 500 lines: > + + :set viminfo='1000,f1,<500 +< +Other options you might want to use: + : number of lines to save from the command line history + @ number of lines to save from the input line history + / number of lines to save from the search history + r removable media, for which no marks will be stored (can be + used several times) + ! global variables that start with an uppercase letter and + don't contain lowercase letters + h disable 'hlsearch' highlighting when starting + % the buffer list (only restored when starting Vim without file + arguments) + c convert the text using 'encoding' + n name used for the viminfo file (must be the last option) + +See the 'viminfo' option and |viminfo-file| for more information. + +When you run Vim multiple times, the last one exiting will store its +information. This may cause information that previously exiting Vims stored +to be lost. Each item can be remembered only once. + + +GETTING BACK TO WHERE YOU STOPPED VIM + +You are halfway editing a file and it's time to leave for holidays. You exit +Vim and go enjoy yourselves, forgetting all about your work. After a couple +of weeks you start Vim, and type: +> + '0 + +And you are right back where you left Vim. So you can get on with your work. + Vim creates a mark each time you exit Vim. The last one is '0. The +position that '0 pointed to is made '1. And '1 is made to '2, and so forth. +Mark '9 is lost. + The |:marks| command is useful to find out where '0 to '9 will take you. + + +GETTING BACK TO SOME FILE + +If you want to go back to a file that you edited recently, but not when +exiting Vim, there is a slightly more complicated way. You can see a list of +files by typing the command: > + + :oldfiles +< 1: ~/.viminfo ~ + 2: ~/text/resume.txt ~ + 3: /tmp/draft ~ + +Now you would like to edit the second file, which is in the list preceded by +"2:". You type: > + + :e #<2 + +Instead of ":e" you can use any command that has a file name argument, the +"#<2" item works in the same place as "%" (current file name) and "#" +(alternate file name). So you can also split the window to edit the third +file: > + + :split #<3 + +That #<123 thing is a bit complicated when you just want to edit a file. +Fortunately there is a simpler way: > + + :browse oldfiles +< 1: ~/.viminfo ~ + 2: ~/text/resume.txt ~ + 3: /tmp/draft ~ + -- More -- + +You get the same list of files as with |:oldfiles|. If you want to edit +"resume.txt" first press "q" to stop the listing. You will get a prompt: + + Type number and <Enter> (empty cancels): ~ + +Type "2" and press <Enter> to edit the second file. + +More info at |:oldfiles|, |v:oldfiles| and |c_#<|. + + +MOVE INFO FROM ONE VIM TO ANOTHER + +You can use the ":wviminfo" and ":rviminfo" commands to save and restore the +information while still running Vim. This is useful for exchanging register +contents between two instances of Vim, for example. In the first Vim do: > + + :wviminfo! ~/tmp/viminfo + +And in the second Vim do: > + + :rviminfo! ~/tmp/viminfo + +Obviously, the "w" stands for "write" and the "r" for "read". + The ! character is used by ":wviminfo" to forcefully overwrite an existing +file. When it is omitted, and the file exists, the information is merged into +the file. + The ! character used for ":rviminfo" means that all the information is +used, this may overwrite existing information. Without the ! only information +that wasn't set is used. + These commands can also be used to store info and use it again later. You +could make a directory full of viminfo files, each containing info for a +different purpose. + +============================================================================== +*21.4* Sessions + +Suppose you are editing along, and it is the end of the day. You want to quit +work and pick up where you left off the next day. You can do this by saving +your editing session and restoring it the next day. + A Vim session contains all the information about what you are editing. +This includes things such as the file list, window layout, global variables, +options and other information. (Exactly what is remembered is controlled by +the 'sessionoptions' option, described below.) + The following command creates a session file: > + + :mksession vimbook.vim + +Later if you want to restore this session, you can use this command: > + + :source vimbook.vim + +If you want to start Vim and restore a specific session, you can use the +following command: > + + vim -S vimbook.vim + +This tells Vim to read a specific file on startup. The 'S' stands for +session (actually, you can source any Vim script with -S, thus it might as +well stand for "source"). + +The windows that were open are restored, with the same position and size as +before. Mappings and option values are like before. + What exactly is restored depends on the 'sessionoptions' option. The +default value is "blank,buffers,curdir,folds,help,options,winsize". + + blank keep empty windows + buffers all buffers, not only the ones in a window + curdir the current directory + folds folds, also manually created ones + help the help window + options all options and mappings + winsize window sizes + +Change this to your liking. To also restore the size of the Vim window, for +example, use: > + + :set sessionoptions+=resize + + +SESSION HERE, SESSION THERE + +The obvious way to use sessions is when working on different projects. +Suppose you store your session files in the directory "~/.vim". You are +currently working on the "secret" project and have to switch to the "boring" +project: > + + :wall + :mksession! ~/.vim/secret.vim + :source ~/.vim/boring.vim + +This first uses ":wall" to write all modified files. Then the current session +is saved, using ":mksession!". This overwrites the previous session. The +next time you load the secret session you can continue where you were at this +point. And finally you load the new "boring" session. + +If you open help windows, split and close various windows, and generally mess +up the window layout, you can go back to the last saved session: > + + :source ~/.vim/boring.vim + +Thus you have complete control over whether you want to continue next time +where you are now, by saving the current setup in a session, or keep the +session file as a starting point. + Another way of using sessions is to create a window layout that you like to +use, and save this in a session. Then you can go back to this layout whenever +you want. + For example, this is a nice layout to use: + + +----------------------------------------+ + | VIM - main help file | + | | + |Move around: Use the cursor keys, or "h| + |help.txt================================| + |explorer | | + |dir |~ | + |dir |~ | + |file |~ | + |file |~ | + |file |~ | + |file |~ | + |~/=========|[No File]===================| + | | + +----------------------------------------+ + +This has a help window at the top, so that you can read this text. The narrow +vertical window on the left contains a file explorer. This is a Vim plugin +that lists the contents of a directory. You can select files to edit there. +More about this in the next chapter. + Create this from a just started Vim with: > + + :help + CTRL-W w + :vertical split ~/ + +You can resize the windows a bit to your liking. Then save the session with: +> + :mksession ~/.vim/mine.vim + +Now you can start Vim with this layout: > + + vim -S ~/.vim/mine.vim + +Hint: To open a file you see listed in the explorer window in the empty +window, move the cursor to the filename and press "O". Double clicking with +the mouse will also do this. + + +UNIX AND MS-WINDOWS + +Some people have to do work on MS-Windows systems one day and on Unix another +day. If you are one of them, consider adding "slash" and "unix" to +'sessionoptions'. The session files will then be written in a format that can +be used on both systems. This is the command to put in your vimrc file: > + + :set sessionoptions+=unix,slash + +Vim will use the Unix format then, because the MS-Windows Vim can read and +write Unix files, but Unix Vim can't read MS-Windows format session files. +Similarly, MS-Windows Vim understands file names with / to separate names, but +Unix Vim doesn't understand \. + + +SESSIONS AND VIMINFO + +Sessions store many things, but not the position of marks, contents of +registers and the command line history. You need to use the viminfo feature +for these things. + In most situations you will want to use sessions separately from viminfo. +This can be used to switch to another session, but keep the command line +history. And yank text into registers in one session, and paste it back in +another session. + You might prefer to keep the info with the session. You will have to do +this yourself then. Example: > + + :mksession! ~/.vim/secret.vim + :wviminfo! ~/.vim/secret.viminfo + +And to restore this again: > + + :source ~/.vim/secret.vim + :rviminfo! ~/.vim/secret.viminfo + +============================================================================== +*21.5* Views + +A session stores the looks of the whole of Vim. When you want to store the +properties for one window only, use a view. + The use of a view is for when you want to edit a file in a specific way. +For example, you have line numbers enabled with the 'number' option and +defined a few folds. Just like with sessions, you can remember this view on +the file and restore it later. Actually, when you store a session, it stores +the view of each window. + There are two basic ways to use views. The first is to let Vim pick a name +for the view file. You can restore the view when you later edit the same +file. To store the view for the current window: > + + :mkview + +Vim will decide where to store the view. When you later edit the same file +you get the view back with this command: > + + :loadview + +That's easy, isn't it? + Now you want to view the file without the 'number' option on, or with all +folds open, you can set the options to make the window look that way. Then +store this view with: > + + :mkview 1 + +Obviously, you can get this back with: > + + :loadview 1 + +Now you can switch between the two views on the file by using ":loadview" with +and without the "1" argument. + You can store up to ten views for the same file this way, one unnumbered +and nine numbered 1 to 9. + + +A VIEW WITH A NAME + +The second basic way to use views is by storing the view in a file with a name +you choose. This view can be loaded while editing another file. Vim will +then switch to editing the file specified in the view. Thus you can use this +to quickly switch to editing another file, with all its options set as you +saved them. + For example, to save the view of the current file: > + + :mkview ~/.vim/main.vim + +You can restore it with: > + + :source ~/.vim/main.vim + +============================================================================== +*21.6* Modelines + +When editing a specific file, you might set options specifically for that +file. Typing these commands each time is boring. Using a session or view for +editing a file doesn't work when sharing the file between several people. + The solution for this situation is adding a modeline to the file. This is +a line of text that tells Vim the values of options, to be used in this file +only. + A typical example is a C program where you make indents by a multiple of 4 +spaces. This requires setting the 'shiftwidth' option to 4. This modeline +will do that: + + /* vim:set shiftwidth=4: */ ~ + +Put this line as one of the first or last five lines in the file. When +editing the file, you will notice that 'shiftwidth' will have been set to +four. When editing another file, it's set back to the default value of eight. + For some files the modeline fits well in the header, thus it can be put at +the top of the file. For text files and other files where the modeline gets +in the way of the normal contents, put it at the end of the file. + +The 'modelines' option specifies how many lines at the start and end of the +file are inspected for containing a modeline. To inspect ten lines: > + + :set modelines=10 + +The 'modeline' option can be used to switch this off. Do this when you are +working as root on Unix or Administrator on MS-Windows, or when you don't +trust the files you are editing: > + + :set nomodeline + +Use this format for the modeline: + + any-text vim:set {option}={value} ... : any-text ~ + +The "any-text" indicates that you can put any text before and after the part +that Vim will use. This allows making it look like a comment, like what was +done above with /* and */. + The " vim:" part is what makes Vim recognize this line. There must be +white space before "vim", or "vim" must be at the start of the line. Thus +using something like "gvim:" will not work. + The part between the colons is a ":set" command. It works the same way as +typing the ":set" command, except that you need to insert a backslash before a +colon (otherwise it would be seen as the end of the modeline). + +Another example: + + // vim:set textwidth=72 dir=c\:\tmp: use c:\tmp here ~ + +There is an extra backslash before the first colon, so that it's included in +the ":set" command. The text after the second colon is ignored, thus a remark +can be placed there. + +For more details see |modeline|. + +============================================================================== + +Next chapter: |usr_22.txt| Finding the file to edit + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_22.txt b/runtime/doc/usr_22.txt new file mode 100644 index 0000000000..cff8e9db1e --- /dev/null +++ b/runtime/doc/usr_22.txt @@ -0,0 +1,400 @@ +*usr_22.txt* For Vim version 7.4. Last change: 2012 Nov 15 + + VIM USER MANUAL - by Bram Moolenaar + + Finding the file to edit + + +Files can be found everywhere. So how do you find them? Vim offers various +ways to browse the directory tree. There are commands to jump to a file that +is mentioned in another. And Vim remembers which files have been edited +before. + +|22.1| The file browser +|22.2| The current directory +|22.3| Finding a file +|22.4| The buffer list + + Next chapter: |usr_23.txt| Editing other files + Previous chapter: |usr_21.txt| Go away and come back +Table of contents: |usr_toc.txt| + +============================================================================== +*22.1* The file browser + +Vim has a plugin that makes it possible to edit a directory. Try this: > + + :edit . + +Through the magic of autocommands and Vim scripts, the window will be filled +with the contents of the directory. It looks like this: + +" ============================================================================ ~ +" Netrw Directory Listing (netrw v109) ~ +" Sorted by name ~ +" Sort sequence: [\/]$,\.h$,\.c$,\.cpp$,*,\.info$,\.swp$,\.o$\.obj$,\.bak$ ~ +" Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:exec ~ +" ============================================================================ ~ +../ ~ +./ ~ +check/ ~ +Makefile ~ +autocmd.txt ~ +change.txt ~ +eval.txt~ ~ +filetype.txt~ ~ +help.txt.info ~ + +You can see these items: + +1. The name of the browsing tool and its version number +2. The name of the browsing directory +3. The method of sorting (may be by name, time, or size) +4. How names are to be sorted (directories first, then *.h files, + *.c files, etc) +5. How to get help (use the <F1> key), and an abbreviated listing + of available commands +6. A listing of files, including "../", which allows one to list + the parent directory. + +If you have syntax highlighting enabled, the different parts are highlighted +so as to make it easier to spot them. + +You can use Normal mode Vim commands to move around in the text. For example, +move the cursor atop a file and press <Enter>; you will then be editing that +file. To go back to the browser use ":edit ." again, or use ":Explore". +CTRL-O also works. + +Try using <Enter> while the cursor is atop a directory name. The result is +that the file browser moves into that directory and displays the items found +there. Pressing <Enter> on the first directory "../" moves you one level +higher. Pressing "-" does the same thing, without the need to move to the +"../" item first. + +You can press <F1> to get help on the things you can do in the netrw file +browser. This is what you get: > + + 9. Directory Browsing netrw-browse netrw-dir netrw-list netrw-help + + MAPS netrw-maps + <F1>.............Help.......................................|netrw-help| + <cr>.............Browsing...................................|netrw-cr| + <del>............Deleting Files or Directories..............|netrw-delete| + -................Going Up...................................|netrw--| + a................Hiding Files or Directories................|netrw-a| + mb...............Bookmarking a Directory....................|netrw-mb| + gb...............Changing to a Bookmarked Directory.........|netrw-gb| + c................Make Browsing Directory The Current Dir....|netrw-c| + d................Make A New Directory.......................|netrw-d| + D................Deleting Files or Directories..............|netrw-D| + <c-h>............Edit File/Directory Hiding List............|netrw-ctrl-h| + i................Change Listing Style.......................|netrw-i| + <c-l>............Refreshing the Listing.....................|netrw-ctrl-l| + o................Browsing with a Horizontal Split...........|netrw-o| + p................Use Preview Window.........................|netrw-p| + P................Edit in Previous Window....................|netrw-p| + q................Listing Bookmarks and History..............|netrw-q| + r................Reversing Sorting Order....................|netrw-r| +< (etc) + +The <F1> key thus brings you to a netrw directory browsing contents help page. +It's a regular help page; use the usual |CTRL-]| to jump to tagged help items +and |CTRL-O| to jump back. + +To select files for display and editing: (with the cursor is atop a filename) + + <enter> Open the file in the current window. |netrw-cr| + o Horizontally split window and display file |netrw-o| + v Vertically split window and display file |netrw-v| + p Use the |preview-window| |netrw-p| + P Edit in the previous window |netrw-P| + t Open file in a new tab |netrw-t| + +The following normal-mode commands may be used to control the browser display: + + i Controls listing style (thin, long, wide, and tree). + The long listing includes size and date information. + s Repeatedly pressing s will change the way the files + are sorted; one may sort on name, modification time, + or size. + r Reverse the sorting order. + +As a sampling of extra normal-mode commands: + + c Change Vim's notion of the current directory to be + the same as the browser directory. (see + |g:netrw_keepdir| to control this, too) + R Rename the file or directory under the cursor; a + prompt will be issued for the new name. + D Delete the file or directory under the cursor; a + confirmation request will be issued. + mb gb Make bookmark/goto bookmark + + +One may also use command mode; again, just a sampling: + + :Explore [directory] Browse specified/current directory + :NetrwSettings A comprehensive list of your current netrw + settings with help linkage. + +The netrw browser is not limited to just your local machine; one may use +urls such as: (that trailing / is important) + + :Explore ftp://somehost/path/to/dir/ + :e scp://somehost/path/to/dir/ + +See |netrw-browse| for more. + +============================================================================== +*22.2* The current directory + +Just like the shell, Vim has the concept of a current directory. Suppose you +are in your home directory and want to edit several files in a directory +"VeryLongFileName". You could do: > + + :edit VeryLongFileName/file1.txt + :edit VeryLongFileName/file2.txt + :edit VeryLongFileName/file3.txt + +To avoid much of the typing, do this: > + + :cd VeryLongFileName + :edit file1.txt + :edit file2.txt + :edit file3.txt + +The ":cd" command changes the current directory. You can see what the current +directory is with the ":pwd" command: > + + :pwd + /home/Bram/VeryLongFileName + +Vim remembers the last directory that you used. Use "cd -" to go back to it. +Example: > + + :pwd + /home/Bram/VeryLongFileName + :cd /etc + :pwd + /etc + :cd - + :pwd + /home/Bram/VeryLongFileName + :cd - + :pwd + /etc + + +WINDOW LOCAL DIRECTORY + +When you split a window, both windows use the same current directory. When +you want to edit a number of files somewhere else in the new window, you can +make it use a different directory, without changing the current directory in +the other window. This is called a local directory. > + + :pwd + /home/Bram/VeryLongFileName + :split + :lcd /etc + :pwd + /etc + CTRL-W w + :pwd + /home/Bram/VeryLongFileName + +So long as no ":lcd" command has been used, all windows share the same current +directory. Doing a ":cd" command in one window will also change the current +directory of the other window. + For a window where ":lcd" has been used a different current directory is +remembered. Using ":cd" or ":lcd" in other windows will not change it. + When using a ":cd" command in a window that uses a different current +directory, it will go back to using the shared directory. + +============================================================================== +*22.3* Finding a file + +You are editing a C program that contains this line: + + #include "inits.h" ~ + +You want to see what is in that "inits.h" file. Move the cursor on the name +of the file and type: > + + gf + +Vim will find the file and edit it. + What if the file is not in the current directory? Vim will use the 'path' +option to find the file. This option is a list of directory names where to +look for your file. + Suppose you have your include files located in "c:/prog/include". This +command will add it to the 'path' option: > + + :set path+=c:/prog/include + +This directory is an absolute path. No matter where you are, it will be the +same place. What if you have located files in a subdirectory, below where the +file is? Then you can specify a relative path name. This starts with a dot: +> + :set path+=./proto + +This tells Vim to look in the directory "proto", below the directory where the +file in which you use "gf" is. Thus using "gf" on "inits.h" will make Vim +look for "proto/inits.h", starting in the directory of the file. + Without the "./", thus "proto", Vim would look in the "proto" directory +below the current directory. And the current directory might not be where the +file that you are editing is located. + +The 'path' option allows specifying the directories where to search for files +in many more ways. See the help on the 'path' option. + The 'isfname' option is used to decide which characters are included in the +file name, and which ones are not (e.g., the " character in the example +above). + +When you know the file name, but it's not to be found in the file, you can +type it: > + + :find inits.h + +Vim will then use the 'path' option to try and locate the file. This is the +same as the ":edit" command, except for the use of 'path'. + +To open the found file in a new window use CTRL-W f instead of "gf", or use +":sfind" instead of ":find". + + +A nice way to directly start Vim to edit a file somewhere in the 'path': > + + vim "+find stdio.h" + +This finds the file "stdio.h" in your value of 'path'. The quotes are +necessary to have one argument |-+c|. + +============================================================================== +*22.4* The buffer list + +The Vim editor uses the term buffer to describe a file being edited. +Actually, a buffer is a copy of the file that you edit. When you finish +changing the buffer, you write the contents of the buffer to the file. +Buffers not only contain file contents, but also all the marks, settings, and +other stuff that goes with it. + + +HIDDEN BUFFERS + +Suppose you are editing the file one.txt and need to edit the file two.txt. +You could simply use ":edit two.txt", but since you made changes to one.txt +that won't work. You also don't want to write one.txt yet. Vim has a +solution for you: > + + :hide edit two.txt + +The buffer "one.txt" disappears from the screen, but Vim still knows that you +are editing this buffer, so it keeps the modified text. This is called a +hidden buffer: The buffer contains text, but you can't see it. + The argument of ":hide" is another command. ":hide" makes that command +behave as if the 'hidden' option was set. You could also set this option +yourself. The effect is that when any buffer is abandoned, it becomes hidden. + Be careful! When you have hidden buffers with changes, don't exit Vim +without making sure you have saved all the buffers. + + +INACTIVE BUFFERS + + When a buffer has been used once, Vim remembers some information about it. +When it is not displayed in a window and it is not hidden, it is still in the +buffer list. This is called an inactive buffer. Overview: + + Active Appears in a window, text loaded. + Hidden Not in a window, text loaded. + Inactive Not in a window, no text loaded. + +The inactive buffers are remembered, because Vim keeps information about them, +like marks. And remembering the file name is useful too, so that you can see +which files you have edited. And edit them again. + + +LISTING BUFFERS + +View the buffer list with this command: > + + :buffers + +A command which does the same, is not so obvious to list buffers, but is much +shorter to type: > + + :ls + +The output could look like this: + + 1 #h "help.txt" line 62 ~ + 2 %a + "usr_21.txt" line 1 ~ + 3 "usr_toc.txt" line 1 ~ + +The first column contains the buffer number. You can use this to edit the +buffer without having to type the name, see below. + After the buffer number come the flags. Then the name of the file +and the line number where the cursor was the last time. + The flags that can appear are these (from left to right): + + u Buffer is unlisted |unlisted-buffer|. + % Current buffer. + # Alternate buffer. + a Buffer is loaded and displayed. + h Buffer is loaded but hidden. + = Buffer is read-only. + - Buffer is not modifiable, the 'modifiable' option is off. + + Buffer has been modified. + + +EDITING A BUFFER + +You can edit a buffer by its number. That avoids having to type the file +name: > + + :buffer 2 + +But the only way to know the number is by looking in the buffer list. You can +use the name, or part of it, instead: > + + :buffer help + +Vim will find the best match for the name you type. If there is only one +buffer that matches the name, it will be used. In this case "help.txt". + To open a buffer in a new window: > + + :sbuffer 3 + +This works with a name as well. + + +USING THE BUFFER LIST + +You can move around in the buffer list with these commands: + + :bnext go to next buffer + :bprevious go to previous buffer + :bfirst go to the first buffer + :blast go to the last buffer + +To remove a buffer from the list, use this command: > + + :bdelete 3 + +Again, this also works with a name. + If you delete a buffer that was active (visible in a window), that window +will be closed. If you delete the current buffer, the current window will be +closed. If it was the last window, Vim will find another buffer to edit. You +can't be editing nothing! + + Note: + Even after removing the buffer with ":bdelete" Vim still remembers it. + It's actually made "unlisted", it no longer appears in the list from + ":buffers". The ":buffers!" command will list unlisted buffers (yes, + Vim can do the impossible). To really make Vim forget about a buffer, + use ":bwipe". Also see the 'buflisted' option. + +============================================================================== + +Next chapter: |usr_23.txt| Editing other files + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_23.txt b/runtime/doc/usr_23.txt new file mode 100644 index 0000000000..63cbc612de --- /dev/null +++ b/runtime/doc/usr_23.txt @@ -0,0 +1,343 @@ +*usr_23.txt* For Vim version 7.4. Last change: 2006 Apr 24 + + VIM USER MANUAL - by Bram Moolenaar + + Editing other files + + +This chapter is about editing files that are not ordinary files. With Vim you +can edit files that are compressed or encrypted. Some files need to be +accessed over the internet. With some restrictions, binary files can be +edited as well. + +|23.1| DOS, Mac and Unix files +|23.2| Files on the internet +|23.3| Encryption +|23.4| Binary files +|23.5| Compressed files + + Next chapter: |usr_24.txt| Inserting quickly + Previous chapter: |usr_22.txt| Finding the file to edit +Table of contents: |usr_toc.txt| + +============================================================================== +*23.1* DOS, Mac and Unix files + +Back in the early days, the old Teletype machines used two characters to +start a new line. One to move the carriage back to the first position +(carriage return, <CR>), another to move the paper up (line feed, <LF>). + When computers came out, storage was expensive. Some people decided that +they did not need two characters for end-of-line. The UNIX people decided +they could use <Line Feed> only for end-of-line. The Apple people +standardized on <CR>. The MS-DOS (and Microsoft Windows) folks decided to +keep the old <CR><LF>. + This means that if you try to move a file from one system to another, you +have line-break problems. The Vim editor automatically recognizes the +different file formats and handles things properly behind your back. + The option 'fileformats' contains the various formats that will be tried +when a new file is edited. The following command, for example, tells Vim to +try UNIX format first and MS-DOS format second: > + + :set fileformats=unix,dos + +You will notice the format in the message you get when editing a file. You +don't see anything if you edit a native file format. Thus editing a Unix file +on Unix won't result in a remark. But when you edit a dos file, Vim will +notify you of this: + + "/tmp/test" [dos] 3L, 71C ~ + +For a Mac file you would see "[mac]". + The detected file format is stored in the 'fileformat' option. To see +which format you have, execute the following command: > + + :set fileformat? + +The three names that Vim uses are: + + unix <LF> + dos <CR><LF> + mac <CR> + + +USING THE MAC FORMAT + +On Unix, <LF> is used to break a line. It's not unusual to have a <CR> +character halfway a line. Incidentally, this happens quite often in Vi (and +Vim) scripts. + On the Macintosh, where <CR> is the line break character, it's possible to +have a <LF> character halfway a line. + The result is that it's not possible to be 100% sure whether a file +containing both <CR> and <LF> characters is a Mac or a Unix file. Therefore, +Vim assumes that on Unix you probably won't edit a Mac file, and doesn't check +for this type of file. To check for this format anyway, add "mac" to +'fileformats': > + + :set fileformats+=mac + +Then Vim will take a guess at the file format. Watch out for situations where +Vim guesses wrong. + + +OVERRULING THE FORMAT + +If you use the good old Vi and try to edit an MS-DOS format file, you will +find that each line ends with a ^M character. (^M is <CR>). The automatic +detection avoids this. Suppose you do want to edit the file that way? Then +you need to overrule the format: > + + :edit ++ff=unix file.txt + +The "++" string is an item that tells Vim that an option name follows, which +overrules the default for this single command. "++ff" is used for +'fileformat'. You could also use "++ff=mac" or "++ff=dos". + This doesn't work for any option, only "++ff" and "++enc" are currently +implemented. The full names "++fileformat" and "++encoding" also work. + + +CONVERSION + +You can use the 'fileformat' option to convert from one file format to +another. Suppose, for example, that you have an MS-DOS file named README.TXT +that you want to convert to UNIX format. Start by editing the MS-DOS format +file: > + vim README.TXT + +Vim will recognize this as a dos format file. Now change the file format to +UNIX: > + + :set fileformat=unix + :write + +The file is written in Unix format. + +============================================================================== +*23.2* Files on the internet + +Someone sends you an e-mail message, which refers to a file by its URL. For +example: + + You can find the information here: ~ + ftp://ftp.vim.org/pub/vim/README ~ + +You could start a program to download the file, save it on your local disk and +then start Vim to edit it. + There is a much simpler way. Move the cursor to any character of the URL. +Then use this command: > + + gf + +With a bit of luck, Vim will figure out which program to use for downloading +the file, download it and edit the copy. To open the file in a new window use +CTRL-W f. + If something goes wrong you will get an error message. It's possible that +the URL is wrong, you don't have permission to read it, the network connection +is down, etc. Unfortunately, it's hard to tell the cause of the error. You +might want to try the manual way of downloading the file. + +Accessing files over the internet works with the netrw plugin. Currently URLs +with these formats are recognized: + + ftp:// uses ftp + rcp:// uses rcp + scp:// uses scp + http:// uses wget (reading only) + +Vim doesn't do the communication itself, it relies on the mentioned programs +to be available on your computer. On most Unix systems "ftp" and "rcp" will +be present. "scp" and "wget" might need to be installed. + +Vim detects these URLs for each command that starts editing a new file, also +with ":edit" and ":split", for example. Write commands also work, except for +http://. + +For more information, also about passwords, see |netrw|. + +============================================================================== +*23.3* Encryption + +Some information you prefer to keep to yourself. For example, when writing +a test on a computer that students also use. You don't want clever students +to figure out a way to read the questions before the exam starts. Vim can +encrypt the file for you, which gives you some protection. + To start editing a new file with encryption, use the "-x" argument to start +Vim. Example: > + + vim -x exam.txt + +Vim prompts you for a key used for encrypting and decrypting the file: + + Enter encryption key: ~ + +Carefully type the secret key now. You cannot see the characters you type, +they will be replaced by stars. To avoid the situation that a typing mistake +will cause trouble, Vim asks you to enter the key again: + + Enter same key again: ~ + +You can now edit this file normally and put in all your secrets. When you +finish editing the file and tell Vim to exit, the file is encrypted and +written. + When you edit the file with Vim, it will ask you to enter the same key +again. You don't need to use the "-x" argument. You can also use the normal +":edit" command. Vim adds a magic string to the file by which it recognizes +that the file was encrypted. + If you try to view this file using another program, all you get is garbage. +Also, if you edit the file with Vim and enter the wrong key, you get garbage. +Vim does not have a mechanism to check if the key is the right one (this makes +it much harder to break the key). + + +SWITCHING ENCRYPTION ON AND OFF + +To disable the encryption of a file, set the 'key' option to an empty string: +> + :set key= + +The next time you write the file this will be done without encryption. + Setting the 'key' option to enable encryption is not a good idea, because +the password appears in the clear. Anyone shoulder-surfing can read your +password. + To avoid this problem, the ":X" command was created. It asks you for an +encryption key, just like the "-x" argument did: > + + :X + Enter encryption key: ****** + Enter same key again: ****** + + +LIMITS ON ENCRYPTION + +The encryption algorithm used by Vim is weak. It is good enough to keep out +the casual prowler, but not good enough to keep out a cryptology expert with +lots of time on his hands. Also you should be aware that the swap file is not +encrypted; so while you are editing, people with superuser privileges can read +the unencrypted text from this file. + One way to avoid letting people read your swap file is to avoid using one. +If the -n argument is supplied on the command line, no swap file is used +(instead, Vim puts everything in memory). For example, to edit the encrypted +file "file.txt" without a swap file use the following command: > + + vim -x -n file.txt + +When already editing a file, the swapfile can be disabled with: > + + :setlocal noswapfile + +Since there is no swapfile, recovery will be impossible. Save the file a bit +more often to avoid the risk of losing your changes. + +While the file is in memory, it is in plain text. Anyone with privilege can +look in the editor's memory and discover the contents of the file. + If you use a viminfo file, be aware that the contents of text registers are +written out in the clear as well. + If you really want to secure the contents of a file, edit it only on a +portable computer not connected to a network, use good encryption tools, and +keep the computer locked up in a big safe when not in use. + +============================================================================== +*23.4* Binary files + +You can edit binary files with Vim. Vim wasn't really made for this, thus +there are a few restrictions. But you can read a file, change a character and +write it back, with the result that only that one character was changed and +the file is identical otherwise. + To make sure that Vim does not use its clever tricks in the wrong way, add +the "-b" argument when starting Vim: > + + vim -b datafile + +This sets the 'binary' option. The effect of this is that unexpected side +effects are turned off. For example, 'textwidth' is set to zero, to avoid +automatic formatting of lines. And files are always read in Unix file format. + +Binary mode can be used to change a message in a program. Be careful not to +insert or delete any characters, it would stop the program from working. Use +"R" to enter replace mode. + +Many characters in the file will be unprintable. To see them in Hex format: > + + :set display=uhex + +Otherwise, the "ga" command can be used to see the value of the character +under the cursor. The output, when the cursor is on an <Esc>, looks like +this: + + <^[> 27, Hex 1b, Octal 033 ~ + +There might not be many line breaks in the file. To get some overview switch +the 'wrap' option off: > + + :set nowrap + + +BYTE POSITION + +To see on which byte you are in the file use this command: > + + g CTRL-G + +The output is verbose: + + Col 9-16 of 9-16; Line 277 of 330; Word 1806 of 2058; Byte 10580 of 12206 ~ + +The last two numbers are the byte position in the file and the total number of +bytes. This takes into account how 'fileformat' changes the number of bytes +that a line break uses. + To move to a specific byte in the file, use the "go" command. For +example, to move to byte 2345: > + + 2345go + + +USING XXD + +A real binary editor shows the text in two ways: as it is and in hex format. +You can do this in Vim by first converting the file with the "xxd" program. +This comes with Vim. + First edit the file in binary mode: > + + vim -b datafile + +Now convert the file to a hex dump with xxd: > + + :%!xxd + +The text will look like this: + + 0000000: 1f8b 0808 39d7 173b 0203 7474 002b 4e49 ....9..;..tt.+NI ~ + 0000010: 4b2c 8660 eb9c ecac c462 eb94 345e 2e30 K,.`.....b..4^.0 ~ + 0000020: 373b 2731 0b22 0ca6 c1a2 d669 1035 39d9 7;'1.".....i.59. ~ + +You can now view and edit the text as you like. Vim treats the information as +ordinary text. Changing the hex does not cause the printable character to be +changed, or the other way around. + Finally convert it back with: +> + :%!xxd -r + +Only changes in the hex part are used. Changes in the printable text part on +the right are ignored. + +See the manual page of xxd for more information. + +============================================================================== +*23.5* Compressed files + +This is easy: You can edit a compressed file just like any other file. The +"gzip" plugin takes care of decompressing the file when you edit it. And +compressing it again when you write it. + These compression methods are currently supported: + + .Z compress + .gz gzip + .bz2 bzip2 + +Vim uses the mentioned programs to do the actual compression and +decompression. You might need to install the programs first. + +============================================================================== + +Next chapter: |usr_24.txt| Inserting quickly + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_24.txt b/runtime/doc/usr_24.txt new file mode 100644 index 0000000000..46a22c683c --- /dev/null +++ b/runtime/doc/usr_24.txt @@ -0,0 +1,606 @@ +*usr_24.txt* For Vim version 7.4. Last change: 2006 Jul 23 + + VIM USER MANUAL - by Bram Moolenaar + + Inserting quickly + + +When entering text, Vim offers various ways to reduce the number of keystrokes +and avoid typing mistakes. Use Insert mode completion to repeat previously +typed words. Abbreviate long words to short ones. Type characters that +aren't on your keyboard. + +|24.1| Making corrections +|24.2| Showing matches +|24.3| Completion +|24.4| Repeating an insert +|24.5| Copying from another line +|24.6| Inserting a register +|24.7| Abbreviations +|24.8| Entering special characters +|24.9| Digraphs +|24.10| Normal mode commands + + Next chapter: |usr_25.txt| Editing formatted text + Previous chapter: |usr_23.txt| Editing other files +Table of contents: |usr_toc.txt| + +============================================================================== +*24.1* Making corrections + +The <BS> key was already mentioned. It deletes the character just before the +cursor. The <Del> key does the same for the character under (after) the +cursor. + When you typed a whole word wrong, use CTRL-W: + + The horse had fallen to the sky ~ + CTRL-W + The horse had fallen to the ~ + +If you really messed up a line and want to start over, use CTRL-U to delete +it. This keeps the text after the cursor and the indent. Only the text from +the first non-blank to the cursor is deleted. With the cursor on the "f" of +"fallen" in the next line pressing CTRL-U does this: + + The horse had fallen to the ~ + CTRL-U + fallen to the ~ + +When you spot a mistake a few words back, you need to move the cursor there to +correct it. For example, you typed this: + + The horse had follen to the ground ~ + +You need to change "follen" to "fallen". With the cursor at the end, you +would type this to correct it: > + + <Esc>4blraA + +< get out of Insert mode <Esc> + four words back 4b + move on top of the "o" l + replace with "a" ra + restart Insert mode A + +Another way to do this: > + + <C-Left><C-Left><C-Left><C-Left><Right><Del>a<End> + +< four words back <C-Left><C-Left><C-Left><C-Left> + move on top of the "o" <Right> + delete the "o" <Del> + insert an "a" a + go to end of the line <End> + +This uses special keys to move around, while remaining in Insert mode. This +resembles what you would do in a modeless editor. It's easier to remember, +but takes more time (you have to move your hand from the letters to the cursor +keys, and the <End> key is hard to press without looking at the keyboard). + These special keys are most useful when writing a mapping that doesn't +leave Insert mode. The extra typing doesn't matter then. + An overview of the keys you can use in Insert mode: + + <C-Home> to start of the file + <PageUp> a whole screenful up + <Home> to start of line + <S-Left> one word left + <C-Left> one word left + <S-Right> one word right + <C-Right> one word right + <End> to end of the line + <PageDown> a whole screenful down + <C-End> to end of the file + +There are a few more, see |ins-special-special|. + +============================================================================== +*24.2* Showing matches + +When you type a ) it would be nice to see with which ( it matches. To make +Vim do that use this command: > + + :set showmatch + +When you now type a text like "(example)", as soon as you type the ) Vim will +briefly move the cursor to the matching (, keep it there for half a second, +and move back to where you were typing. + In case there is no matching (, Vim will beep. Then you know that you +might have forgotten the ( somewhere, or typed a ) too many. + The match will also be shown for [] and {} pairs. You don't have to wait +with typing the next character, as soon as Vim sees it the cursor will move +back and inserting continues as before. + You can change the time Vim waits with the 'matchtime' option. For +example, to make Vim wait one and a half second: > + + :set matchtime=15 + +The time is specified in tenths of a second. + +============================================================================== +*24.3* Completion + +Vim can automatically complete words on insertion. You type the first part of +a word, press CTRL-P, and Vim guesses the rest. + Suppose, for example, that you are creating a C program and want to type in +the following: + + total = ch_array[0] + ch_array[1] + ch_array[2]; ~ + +You start by entering the following: + + total = ch_array[0] + ch_ ~ + +At this point, you tell Vim to complete the word using the command CTRL-P. +Vim searches for a word that starts with what's in front of the cursor. In +this case, it is "ch_", which matches with the word ch_array. So typing +CTRL-P gives you the following: + + total = ch_array[0] + ch_array ~ + +After a little more typing, you get this (ending in a space): + + total = ch_array[0] + ch_array[1] + ~ + +If you now type CTRL-P Vim will search again for a word that completes the +word before the cursor. Since there is nothing in front of the cursor, it +finds the first word backwards, which is "ch_array". Typing CTRL-P again +gives you the next word that matches, in this case "total". A third CTRL-P +searches further back. If there is nothing else, it causes the editor to run +out of words, so it returns to the original text, which is nothing. A fourth +CTRL-P causes the editor to start over again with "ch_array". + +To search forward, use CTRL-N. Since the search wraps around the end of the +file, CTRL-N and CTRL-P will find the same matches, but in a different +sequence. Hint: CTRL-N is Next-match and CTRL-P is Previous-match. + +The Vim editor goes through a lot of effort to find words to complete. By +default, it searches the following places: + + 1. Current file + 2. Files in other windows + 3. Other loaded files (hidden buffers) + 4. Files which are not loaded (inactive buffers) + 5. Tag files + 6. All files #included by the current file + + +OPTIONS + +You can customize the search order with the 'complete' option. + +The 'ignorecase' option is used. When it is set, case differences are ignored +when searching for matches. + +A special option for completion is 'infercase'. This is useful to find +matches while ignoring case ('ignorecase' must be set) but still using the +case of the word typed so far. Thus if you type "For" and Vim finds a match +"fortunately", it will result in "Fortunately". + + +COMPLETING SPECIFIC ITEMS + +If you know what you are looking for, you can use these commands to complete +with a certain type of item: + + CTRL-X CTRL-F file names + CTRL-X CTRL-L whole lines + CTRL-X CTRL-D macro definitions (also in included files) + CTRL-X CTRL-I current and included files + CTRL-X CTRL-K words from a dictionary + CTRL-X CTRL-T words from a thesaurus + CTRL-X CTRL-] tags + CTRL-X CTRL-V Vim command line + +After each of them CTRL-N can be used to find the next match, CTRL-P to find +the previous match. + More information for each of these commands here: |ins-completion|. + + +COMPLETING FILE NAMES + +Let's take CTRL-X CTRL-F as an example. This will find file names. It scans +the current directory for files and displays each one that matches the word in +front of the cursor. + Suppose, for example, that you have the following files in the current +directory: + + main.c sub_count.c sub_done.c sub_exit.c + +Now enter Insert mode and start typing: + + The exit code is in the file sub ~ + +At this point, you enter the command CTRL-X CTRL-F. Vim now completes the +current word "sub" by looking at the files in the current directory. The +first match is sub_count.c. This is not the one you want, so you match the +next file by typing CTRL-N. This match is sub_done.c. Typing CTRL-N again +takes you to sub_exit.c. The results: + + The exit code is in the file sub_exit.c ~ + +If the file name starts with / (Unix) or C:\ (MS-Windows) you can find all +files in the file system. For example, type "/u" and CTRL-X CTRL-F. This +will match "/usr" (this is on Unix): + + the file is found in /usr/ ~ + +If you now press CTRL-N you go back to "/u". Instead, to accept the "/usr/" +and go one directory level deeper, use CTRL-X CTRL-F again: + + the file is found in /usr/X11R6/ ~ + +The results depend on what is found in your file system, of course. The +matches are sorted alphabetically. + + +COMPLETING IN SOURCE CODE + +Source code files are well structured. That makes it possible to do +completion in an intelligent way. In Vim this is called Omni completion. In +some other editors it's called intellisense, but that is a trademark. + +The key to Omni completion is CTRL-X CTRL-O. Obviously the O stands for Omni +here, so that you can remember it easier. Let's use an example for editing C +source: + + { ~ + struct foo *p; ~ + p-> ~ + +The cursor is after "p->". Now type CTRL-X CTRL-O. Vim will offer you a list +of alternatives, which are the items that "struct foo" contains. That is +quite different from using CTRL-P, which would complete any word, while only +members of "struct foo" are valid here. + +For Omni completion to work you may need to do some setup. At least make sure +filetype plugins are enabled. Your vimrc file should contain a line like +this: > + filetype plugin on +Or: > + filetype plugin indent on + +For C code you need to create a tags file and set the 'tags' option. That is +explained |ft-c-omni|. For other filetypes you may need to do something +similar, look below |compl-omni-filetypes|. It only works for specific +filetypes. Check the value of the 'omnifunc' option to find out if it would +work. + +============================================================================== +*24.4* Repeating an insert + +If you press CTRL-A, the editor inserts the text you typed the last time you +were in Insert mode. + Assume, for example, that you have a file that begins with the following: + + "file.h" ~ + /* Main program begins */ ~ + +You edit this file by inserting "#include " at the beginning of the first +line: + + #include "file.h" ~ + /* Main program begins */ ~ + +You go down to the beginning of the next line using the commands "j^". You +now start to insert a new "#include" line. So you type: > + + i CTRL-A + +The result is as follows: + + #include "file.h" ~ + #include /* Main program begins */ ~ + +The "#include " was inserted because CTRL-A inserts the text of the previous +insert. Now you type "main.h"<Enter> to finish the line: + + + #include "file.h" ~ + #include "main.h" ~ + /* Main program begins */ ~ + +The CTRL-@ command does a CTRL-A and then exits Insert mode. That's a quick +way of doing exactly the same insertion again. + +============================================================================== +*24.5* Copying from another line + +The CTRL-Y command inserts the character above the cursor. This is useful +when you are duplicating a previous line. For example, you have this line of +C code: + + b_array[i]->s_next = a_array[i]->s_next; ~ + +Now you need to type the same line, but with "s_prev" instead of "s_next". +Start the new line, and press CTRL-Y 14 times, until you are at the "n" of +"next": + + b_array[i]->s_next = a_array[i]->s_next; ~ + b_array[i]->s_ ~ + +Now you type "prev": + + b_array[i]->s_next = a_array[i]->s_next; ~ + b_array[i]->s_prev ~ + +Continue pressing CTRL-Y until the following "next": + + b_array[i]->s_next = a_array[i]->s_next; ~ + b_array[i]->s_prev = a_array[i]->s_ ~ + +Now type "prev;" to finish it off. + +The CTRL-E command acts like CTRL-Y except it inserts the character below the +cursor. + +============================================================================== +*24.6* Inserting a register + +The command CTRL-R {register} inserts the contents of the register. This is +useful to avoid having to type a long word. For example, you need to type +this: + + r = VeryLongFunction(a) + VeryLongFunction(b) + VeryLongFunction(c) ~ + +The function name is defined in a different file. Edit that file and move the +cursor on top of the function name there, and yank it into register v: > + + "vyiw + +"v is the register specification, "yiw" is yank-inner-word. Now edit the file +where the new line is to be inserted, and type the first letters: + + r = ~ + +Now use CTRL-R v to insert the function name: + + r = VeryLongFunction ~ + +You continue to type the characters in between the function name, and use +CTRL-R v two times more. + You could have done the same with completion. Using a register is useful +when there are many words that start with the same characters. + +If the register contains characters such as <BS> or other special characters, +they are interpreted as if they had been typed from the keyboard. If you do +not want this to happen (you really want the <BS> to be inserted in the text), +use the command CTRL-R CTRL-R {register}. + +============================================================================== +*24.7* Abbreviations + +An abbreviation is a short word that takes the place of a long one. For +example, "ad" stands for "advertisement". Vim enables you to type an +abbreviation and then will automatically expand it for you. + To tell Vim to expand "ad" into "advertisement" every time you insert it, +use the following command: > + + :iabbrev ad advertisement + +Now, when you type "ad", the whole word "advertisement" will be inserted into +the text. This is triggered by typing a character that can't be part of a +word, for example a space: + + What Is Entered What You See + I saw the a I saw the a ~ + I saw the ad I saw the ad ~ + I saw the ad<Space> I saw the advertisement<Space> ~ + +The expansion doesn't happen when typing just "ad". That allows you to type a +word like "add", which will not get expanded. Only whole words are checked +for abbreviations. + + +ABBREVIATING SEVERAL WORDS + +It is possible to define an abbreviation that results in multiple words. For +example, to define "JB" as "Jack Benny", use the following command: > + + :iabbrev JB Jack Benny + +As a programmer, I use two rather unusual abbreviations: > + + :iabbrev #b /**************************************** + :iabbrev #e <Space>****************************************/ + +These are used for creating boxed comments. The comment starts with #b, which +draws the top line. I then type the comment text and use #e to draw the +bottom line. + Notice that the #e abbreviation begins with a space. In other words, the +first two characters are space-star. Usually Vim ignores spaces between the +abbreviation and the expansion. To avoid that problem, I spell space as seven +characters: <, S, p, a, c, e, >. + + Note: + ":iabbrev" is a long word to type. ":iab" works just as well. + That's abbreviating the abbreviate command! + + +FIXING TYPING MISTAKES + +It's very common to make the same typing mistake every time. For example, +typing "teh" instead of "the". You can fix this with an abbreviation: > + + :abbreviate teh the + +You can add a whole list of these. Add one each time you discover a common +mistake. + + +LISTING ABBREVIATIONS + +The ":abbreviate" command lists the abbreviations: + + :abbreviate + i #e ****************************************/ + i #b /**************************************** + i JB Jack Benny + i ad advertisement + ! teh the + +The "i" in the first column indicates Insert mode. These abbreviations are +only active in Insert mode. Other possible characters are: + + c Command-line mode :cabbrev + ! both Insert and Command-line mode :abbreviate + +Since abbreviations are not often useful in Command-line mode, you will mostly +use the ":iabbrev" command. That avoids, for example, that "ad" gets expanded +when typing a command like: > + + :edit ad + + +DELETING ABBREVIATIONS + +To get rid of an abbreviation, use the ":unabbreviate" command. Suppose you +have the following abbreviation: > + + :abbreviate @f fresh + +You can remove it with this command: > + + :unabbreviate @f + +While you type this, you will notice that @f is expanded to "fresh". Don't +worry about this, Vim understands it anyway (except when you have an +abbreviation for "fresh", but that's very unlikely). + To remove all the abbreviations: > + + :abclear + +":unabbreviate" and ":abclear" also come in the variants for Insert mode +(":iunabbreviate and ":iabclear") and Command-line mode (":cunabbreviate" and +":cabclear"). + + +REMAPPING ABBREVIATIONS + +There is one thing to watch out for when defining an abbreviation: The +resulting string should not be mapped. For example: > + + :abbreviate @a adder + :imap dd disk-door + +When you now type @a, you will get "adisk-doorer". That's not what you want. +To avoid this, use the ":noreabbrev" command. It does the same as +":abbreviate", but avoids that the resulting string is used for mappings: > + + :noreabbrev @a adder + +Fortunately, it's unlikely that the result of an abbreviation is mapped. + +============================================================================== +*24.8* Entering special characters + +The CTRL-V command is used to insert the next character literally. In other +words, any special meaning the character has, it will be ignored. For +example: > + + CTRL-V <Esc> + +Inserts an escape character. Thus you don't leave Insert mode. (Don't type +the space after CTRL-V, it's only to make this easier to read). + + Note: + On MS-Windows CTRL-V is used to paste text. Use CTRL-Q instead of + CTRL-V. On Unix, on the other hand, CTRL-Q does not work on some + terminals, because it has a special meaning. + +You can also use the command CTRL-V {digits} to insert a character with the +decimal number {digits}. For example, the character number 127 is the <Del> +character (but not necessarily the <Del> key!). To insert <Del> type: > + + CTRL-V 127 + +You can enter characters up to 255 this way. When you type fewer than two +digits, a non-digit will terminate the command. To avoid the need of typing a +non-digit, prepend one or two zeros to make three digits. + All the next commands insert a <Tab> and then a dot: + + CTRL-V 9. + CTRL-V 09. + CTRL-V 009. + +To enter a character in hexadecimal, use an "x" after the CTRL-V: > + + CTRL-V x7f + +This also goes up to character 255 (CTRL-V xff). You can use "o" to type a +character as an octal number and two more methods allow you to type up to +a 16 bit and a 32 bit number (e.g., for a Unicode character): > + + CTRL-V o123 + CTRL-V u1234 + CTRL-V U12345678 + +============================================================================== +*24.9* Digraphs + +Some characters are not on the keyboard. For example, the copyright character +(©). To type these characters in Vim, you use digraphs, where two characters +represent one. To enter a ©, for example, you press three keys: > + + CTRL-K Co + +To find out what digraphs are available, use the following command: > + + :digraphs + +Vim will display the digraph table. Here are three lines of it: + + AC ~_ 159 NS | 160 !I ¡ 161 Ct ¢ 162 Pd £ 163 Cu ¤ 164 Ye ¥ 165 ~ + BB ¦ 166 SE § 167 ': ¨ 168 Co © 169 -a ª 170 << « 171 NO ¬ 172 ~ + -- ­ 173 Rg ® 174 'm ¯ 175 DG ° 176 +- ± 177 2S ² 178 3S ³ 179 ~ + +This shows, for example, that the digraph you get by typing CTRL-K Pd is the +character (£). This is character number 163 (decimal). + Pd is short for Pound. Most digraphs are selected to give you a hint about +the character they will produce. If you look through the list you will +understand the logic. + You can exchange the first and second character, if there is no digraph for +that combination. Thus CTRL-K dP also works. Since there is no digraph for +"dP" Vim will also search for a "Pd" digraph. + + Note: + The digraphs depend on the character set that Vim assumes you are + using. On MS-DOS they are different from MS-Windows. Always use + ":digraphs" to find out which digraphs are currently available. + +You can define your own digraphs. Example: > + + :digraph a" ä + +This defines that CTRL-K a" inserts an ä character. You can also specify the +character with a decimal number. This defines the same digraph: > + + :digraph a" 228 + +More information about digraphs here: |digraphs| + Another way to insert special characters is with a keymap. More about that +here: |45.5| + +============================================================================== +*24.10* Normal mode commands + +Insert mode offers a limited number of commands. In Normal mode you have many +more. When you want to use one, you usually leave Insert mode with <Esc>, +execute the Normal mode command, and re-enter Insert mode with "i" or "a". + There is a quicker way. With CTRL-O {command} you can execute any Normal +mode command from Insert mode. For example, to delete from the cursor to the +end of the line: > + + CTRL-O D + +You can execute only one Normal mode command this way. But you can specify a +register or a count. A more complicated example: > + + CTRL-O "g3dw + +This deletes up to the third word into register g. + +============================================================================== + +Next chapter: |usr_25.txt| Editing formatted text + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_25.txt b/runtime/doc/usr_25.txt new file mode 100644 index 0000000000..5a687599b3 --- /dev/null +++ b/runtime/doc/usr_25.txt @@ -0,0 +1,578 @@ +*usr_25.txt* For Vim version 7.4. Last change: 2007 May 11 + + VIM USER MANUAL - by Bram Moolenaar + + Editing formatted text + + +Text hardly ever comes in one sentence per line. This chapter is about +breaking sentences to make them fit on a page and other formatting. +Vim also has useful features for editing single-line paragraphs and tables. + +|25.1| Breaking lines +|25.2| Aligning text +|25.3| Indents and tabs +|25.4| Dealing with long lines +|25.5| Editing tables + + Next chapter: |usr_26.txt| Repeating + Previous chapter: |usr_24.txt| Inserting quickly +Table of contents: |usr_toc.txt| + +============================================================================== +*25.1* Breaking lines + +Vim has a number of functions that make dealing with text easier. By default, +the editor does not perform automatic line breaks. In other words, you have +to press <Enter> yourself. This is useful when you are writing programs where +you want to decide where the line ends. It is not so good when you are +creating documentation and want the text to be at most 70 character wide. + If you set the 'textwidth' option, Vim automatically inserts line breaks. +Suppose, for example, that you want a very narrow column of only 30 +characters. You need to execute the following command: > + + :set textwidth=30 + +Now you start typing (ruler added): + + 1 2 3 + 12345678901234567890123456789012345 + I taught programming for a whi ~ + +If you type "l" next, this makes the line longer than the 30-character limit. +When Vim sees this, it inserts a line break and you get the following: + + 1 2 3 + 12345678901234567890123456789012345 + I taught programming for a ~ + whil ~ + +Continuing on, you can type in the rest of the paragraph: + + 1 2 3 + 12345678901234567890123456789012345 + I taught programming for a ~ + while. One time, I was stopped ~ + by the Fort Worth police, ~ + because my homework was too ~ + hard. True story. ~ + +You do not have to type newlines; Vim puts them in automatically. + + Note: + The 'wrap' option makes Vim display lines with a line break, but this + doesn't insert a line break in the file. + + +REFORMATTING + +The Vim editor is not a word processor. In a word processor, if you delete +something at the beginning of the paragraph, the line breaks are reworked. In +Vim they are not; so if you delete the word "programming" from the first line, +all you get is a short line: + + 1 2 3 + 12345678901234567890123456789012345 + I taught for a ~ + while. One time, I was stopped ~ + by the Fort Worth police, ~ + because my homework was too ~ + hard. True story. ~ + +This does not look good. To get the paragraph into shape you use the "gq" +operator. + Let's first use this with a Visual selection. Starting from the first +line, type: > + + v4jgq + +"v" to start Visual mode, "4j" to move to the end of the paragraph and then +the "gq" operator. The result is: + + 1 2 3 + 12345678901234567890123456789012345 + I taught for a while. One ~ + time, I was stopped by the ~ + Fort Worth police, because my ~ + homework was too hard. True ~ + story. ~ + +Note: there is a way to do automatic formatting for specific types of text +layouts, see |auto-format|. + +Since "gq" is an operator, you can use one of the three ways to select the +text it works on: With Visual mode, with a movement and with a text object. + The example above could also be done with "gq4j". That's less typing, but +you have to know the line count. A more useful motion command is "}". This +moves to the end of a paragraph. Thus "gq}" formats from the cursor to the +end of the current paragraph. + A very useful text object to use with "gq" is the paragraph. Try this: > + + gqap + +"ap" stands for "a-paragraph". This formats the text of one paragraph +(separated by empty lines). Also the part before the cursor. + If you have your paragraphs separated by empty lines, you can format the +whole file by typing this: > + + gggqG + +"gg" to move to the first line, "gqG" to format until the last line. + Warning: If your paragraphs are not properly separated, they will be joined +together. A common mistake is to have a line with a space or tab. That's a +blank line, but not an empty line. + +Vim is able to format more than just plain text. See |fo-table| for how to +change this. See the 'joinspaces' option to change the number of spaces used +after a full stop. + It is possible to use an external program for formatting. This is useful +if your text can't be properly formatted with Vim's builtin command. See the +'formatprg' option. + +============================================================================== +*25.2* Aligning text + +To center a range of lines, use the following command: > + + :{range}center [width] + +{range} is the usual command-line range. [width] is an optional line width to +use for centering. If [width] is not specified, it defaults to the value of +'textwidth'. (If 'textwidth' is 0, the default is 80.) + For example: > + + :1,5center 40 + +results in the following: + + I taught for a while. One ~ + time, I was stopped by the ~ + Fort Worth police, because my ~ + homework was too hard. True ~ + story. ~ + + +RIGHT ALIGNMENT + +Similarly, the ":right" command right-justifies the text: > + + :1,5right 37 + +gives this result: + + I taught for a while. One ~ + time, I was stopped by the ~ + Fort Worth police, because my ~ + homework was too hard. True ~ + story. ~ + +LEFT ALIGNMENT + +Finally there is this command: > + + :{range}left [margin] + +Unlike ":center" and ":right", however, the argument to ":left" is not the +length of the line. Instead it is the left margin. If it is omitted, the +text will be put against the left side of the screen (using a zero margin +would do the same). If it is 5, the text will be indented 5 spaces. For +example, use these commands: > + + :1left 5 + :2,5left + +This results in the following: + + I taught for a while. One ~ + time, I was stopped by the ~ + Fort Worth police, because my ~ + homework was too hard. True ~ + story. ~ + + +JUSTIFYING TEXT + +Vim has no built-in way of justifying text. However, there is a neat macro +package that does the job. To use this package, execute the following +command: > + + :runtime macros/justify.vim + +This Vim script file defines a new visual command "_j". To justify a block of +text, highlight the text in Visual mode and then execute "_j". + Look in the file for more explanations. To go there, do "gf" on this name: +$VIMRUNTIME/macros/justify.vim. + +An alternative is to filter the text through an external program. Example: > + + :%!fmt + +============================================================================== +*25.3* Indents and tabs + +Indents can be used to make text stand out from the rest. The example texts +in this manual, for example, are indented by eight spaces or a tab. You would +normally enter this by typing a tab at the start of each line. Take this +text: + the first line ~ + the second line ~ + +This is entered by typing a tab, some text, <Enter>, tab and more text. + The 'autoindent' option inserts indents automatically: > + + :set autoindent + +When a new line is started it gets the same indent as the previous line. In +the above example, the tab after the <Enter> is not needed anymore. + + +INCREASING INDENT + +To increase the amount of indent in a line, use the ">" operator. Often this +is used as ">>", which adds indent to the current line. + The amount of indent added is specified with the 'shiftwidth' option. The +default value is 8. To make ">>" insert four spaces worth of indent, for +example, type this: > + + :set shiftwidth=4 + +When used on the second line of the example text, this is what you get: + + the first line ~ + the second line ~ + +"4>>" will increase the indent of four lines. + + +TABSTOP + +If you want to make indents a multiple of 4, you set 'shiftwidth' to 4. But +when pressing a <Tab> you still get 8 spaces worth of indent. To change this, +set the 'softtabstop' option: > + + :set softtabstop=4 + +This will make the <Tab> key insert 4 spaces worth of indent. If there are +already four spaces, a <Tab> character is used (saving seven characters in the +file). (If you always want spaces and no tab characters, set the 'expandtab' +option.) + + Note: + You could set the 'tabstop' option to 4. However, if you edit the + file another time, with 'tabstop' set to the default value of 8, it + will look wrong. In other programs and when printing the indent will + also be wrong. Therefore it is recommended to keep 'tabstop' at eight + all the time. That's the standard value everywhere. + + +CHANGING TABS + +You edit a file which was written with a tabstop of 3. In Vim it looks ugly, +because it uses the normal tabstop value of 8. You can fix this by setting +'tabstop' to 3. But you have to do this every time you edit this file. + Vim can change the use of tabstops in your file. First, set 'tabstop' to +make the indents look good, then use the ":retab" command: > + + :set tabstop=3 + :retab 8 + +The ":retab" command will change 'tabstop' to 8, while changing the text such +that it looks the same. It changes spans of white space into tabs and spaces +for this. You can now write the file. Next time you edit it the indents will +be right without setting an option. + Warning: When using ":retab" on a program, it may change white space inside +a string constant. Therefore it's a good habit to use "\t" instead of a +real tab. + +============================================================================== +*25.4* Dealing with long lines + +Sometimes you will be editing a file that is wider than the number of columns +in the window. When that occurs, Vim wraps the lines so that everything fits +on the screen. + If you switch the 'wrap' option off, each line in the file shows up as one +line on the screen. Then the ends of the long lines disappear off the screen +to the right. + When you move the cursor to a character that can't be seen, Vim will scroll +the text to show it. This is like moving a viewport over the text in the +horizontal direction. + By default, Vim does not display a horizontal scrollbar in the GUI. If you +want to enable one, use the following command: > + + :set guioptions+=b + +One horizontal scrollbar will appear at the bottom of the Vim window. + +If you don't have a scrollbar or don't want to use it, use these commands to +scroll the text. The cursor will stay in the same place, but it's moved back +into the visible text if necessary. + + zh scroll right + 4zh scroll four characters right + zH scroll half a window width right + ze scroll right to put the cursor at the end + zl scroll left + 4zl scroll four characters left + zL scroll half a window width left + zs scroll left to put the cursor at the start + +Let's attempt to show this with one line of text. The cursor is on the "w" of +"which". The "current window" above the line indicates the text that is +currently visible. The "window"s below the text indicate the text that is +visible after the command left of it. + + |<-- current window -->| + some long text, part of which is visible in the window ~ + ze |<-- window -->| + zH |<-- window -->| + 4zh |<-- window -->| + zh |<-- window -->| + zl |<-- window -->| + 4zl |<-- window -->| + zL |<-- window -->| + zs |<-- window -->| + + +MOVING WITH WRAP OFF + +When 'wrap' is off and the text has scrolled horizontally, you can use the +following commands to move the cursor to a character you can see. Thus text +left and right of the window is ignored. These never cause the text to +scroll: + + g0 to first visible character in this line + g^ to first non-blank visible character in this line + gm to middle of this line + g$ to last visible character in this line + + |<-- window -->| + some long text, part of which is visible ~ + g0 g^ gm g$ + + +BREAKING AT WORDS *edit-no-break* + +When preparing text for use by another program, you might have to make +paragraphs without a line break. A disadvantage of using 'nowrap' is that you +can't see the whole sentence you are working on. When 'wrap' is on, words are +broken halfway, which makes them hard to read. + A good solution for editing this kind of paragraph is setting the +'linebreak' option. Vim then breaks lines at an appropriate place when +displaying the line. The text in the file remains unchanged. + Without 'linebreak' text might look like this: + + +---------------------------------+ + |letter generation program for a b| + |ank. They wanted to send out a s| + |pecial, personalized letter to th| + |eir richest 1000 customers. Unfo| + |rtunately for the programmer, he | + +---------------------------------+ +After: > + + :set linebreak + +it looks like this: + + +---------------------------------+ + |letter generation program for a | + |bank. They wanted to send out a | + |special, personalized letter to | + |their richest 1000 customers. | + |Unfortunately for the programmer,| + +---------------------------------+ + +Related options: +'breakat' specifies the characters where a break can be inserted. +'showbreak' specifies a string to show at the start of broken line. +Set 'textwidth' to zero to avoid a paragraph to be split. + + +MOVING BY VISIBLE LINES + +The "j" and "k" commands move to the next and previous lines. When used on +a long line, this means moving a lot of screen lines at once. + To move only one screen line, use the "gj" and "gk" commands. When a line +doesn't wrap they do the same as "j" and "k". When the line does wrap, they +move to a character displayed one line below or above. + You might like to use these mappings, which bind these movement commands to +the cursor keys: > + + :map <Up> gk + :map <Down> gj + + +TURNING A PARAGRAPH INTO ONE LINE + +If you want to import text into a program like MS-Word, each paragraph should +be a single line. If your paragraphs are currently separated with empty +lines, this is how you turn each paragraph into a single line: > + + :g/./,/^$/join + +That looks complicated. Let's break it up in pieces: + + :g/./ A ":global" command that finds all lines that contain + at least one character. + ,/^$/ A range, starting from the current line (the non-empty + line) until an empty line. + join The ":join" command joins the range of lines together + into one line. + +Starting with this text, containing eight lines broken at column 30: + + +----------------------------------+ + |A letter generation program | + |for a bank. They wanted to | + |send out a special, | + |personalized letter. | + | | + |To their richest 1000 | + |customers. Unfortunately for | + |the programmer, | + +----------------------------------+ + +You end up with two lines: + + +----------------------------------+ + |A letter generation program for a | + |bank. They wanted to send out a s| + |pecial, personalized letter. | + |To their richest 1000 customers. | + |Unfortunately for the programmer, | + +----------------------------------+ + +Note that this doesn't work when the separating line is blank but not empty; +when it contains spaces and/or tabs. This command does work with blank lines: +> + :g/\S/,/^\s*$/join + +This still requires a blank or empty line at the end of the file for the last +paragraph to be joined. + +============================================================================== +*25.5* Editing tables + +Suppose you are editing a table with four columns: + + nice table test 1 test 2 test 3 ~ + input A 0.534 ~ + input B 0.913 ~ + +You need to enter numbers in the third column. You could move to the second +line, use "A", enter a lot of spaces and type the text. + For this kind of editing there is a special option: > + + set virtualedit=all + +Now you can move the cursor to positions where there isn't any text. This is +called "virtual space". Editing a table is a lot easier this way. + Move the cursor by searching for the header of the last column: > + + /test 3 + +Now press "j" and you are right where you can enter the value for "input A". +Typing "0.693" results in: + + nice table test 1 test 2 test 3 ~ + input A 0.534 0.693 ~ + input B 0.913 ~ + +Vim has automatically filled the gap in front of the new text for you. Now, +to enter the next field in this column use "Bj". "B" moves back to the start +of a white space separated word. Then "j" moves to the place where the next +field can be entered. + + Note: + You can move the cursor anywhere in the display, also beyond the end + of a line. But Vim will not insert spaces there, until you insert a + character in that position. + + +COPYING A COLUMN + +You want to add a column, which should be a copy of the third column and +placed before the "test 1" column. Do this in seven steps: +1. Move the cursor to the left upper corner of this column, e.g., with + "/test 3". +2. Press CTRL-V to start blockwise Visual mode. +3. Move the cursor down two lines with "2j". You are now in "virtual space": + the "input B" line of the "test 3" column. +4. Move the cursor right, to include the whole column in the selection, plus + the space that you want between the columns. "9l" should do it. +5. Yank the selected rectangle with "y". +6. Move the cursor to "test 1", where the new column must be placed. +7. Press "P". + +The result should be: + + nice table test 3 test 1 test 2 test 3 ~ + input A 0.693 0.534 0.693 ~ + input B 0.913 ~ + +Notice that the whole "test 1" column was shifted right, also the line where +the "test 3" column didn't have text. + +Go back to non-virtual cursor movements with: > + + :set virtualedit= + + +VIRTUAL REPLACE MODE + +The disadvantage of using 'virtualedit' is that it "feels" different. You +can't recognize tabs or spaces beyond the end of line when moving the cursor +around. Another method can be used: Virtual Replace mode. + Suppose you have a line in a table that contains both tabs and other +characters. Use "rx" on the first tab: + + inp 0.693 0.534 0.693 ~ + + | + rx | + V + + inpx0.693 0.534 0.693 ~ + +The layout is messed up. To avoid that, use the "gr" command: + + inp 0.693 0.534 0.693 ~ + + | + grx | + V + + inpx 0.693 0.534 0.693 ~ + +What happens is that the "gr" command makes sure the new character takes the +right amount of screen space. Extra spaces or tabs are inserted to fill the +gap. Thus what actually happens is that a tab is replaced by "x" and then +blanks added to make the text after it keep its place. In this case a +tab is inserted. + When you need to replace more than one character, you use the "R" command +to go to Replace mode (see |04.9|). This messes up the layout and replaces +the wrong characters: + + inp 0 0.534 0.693 ~ + + | + R0.786 | + V + + inp 0.78634 0.693 ~ + +The "gR" command uses Virtual Replace mode. This preserves the layout: + + inp 0 0.534 0.693 ~ + + | + gR0.786 | + V + + inp 0.786 0.534 0.693 ~ + +============================================================================== + +Next chapter: |usr_26.txt| Repeating + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_26.txt b/runtime/doc/usr_26.txt new file mode 100644 index 0000000000..cc23959621 --- /dev/null +++ b/runtime/doc/usr_26.txt @@ -0,0 +1,221 @@ +*usr_26.txt* For Vim version 7.4. Last change: 2006 Apr 24 + + VIM USER MANUAL - by Bram Moolenaar + + Repeating + + +An editing task is hardly ever unstructured. A change often needs to be made +several times. In this chapter a number of useful ways to repeat a change +will be explained. + +|26.1| Repeating with Visual mode +|26.2| Add and subtract +|26.3| Making a change in many files +|26.4| Using Vim from a shell script + + Next chapter: |usr_27.txt| Search commands and patterns + Previous chapter: |usr_25.txt| Editing formatted text +Table of contents: |usr_toc.txt| + +============================================================================== +*26.1* Repeating with Visual mode + +Visual mode is very handy for making a change in any sequence of lines. You +can see the highlighted text, thus you can check if the correct lines are +changed. But making the selection takes some typing. The "gv" command +selects the same area again. This allows you to do another operation on the +same text. + Suppose you have some lines where you want to change "2001" to "2002" and +"2000" to "2001": + + The financial results for 2001 are better ~ + than for 2000. The income increased by 50%, ~ + even though 2001 had more rain than 2000. ~ + 2000 2001 ~ + income 45,403 66,234 ~ + +First change "2001" to "2002". Select the lines in Visual mode, and use: > + + :s/2001/2002/g + +Now use "gv" to reselect the same text. It doesn't matter where the cursor +is. Then use ":s/2000/2001/g" to make the second change. + Obviously, you can repeat these changes several times. + +============================================================================== +*26.2* Add and subtract + +When repeating the change of one number into another, you often have a fixed +offset. In the example above, one was added to each year. Instead of typing +a substitute command for each year that appears, the CTRL-A command can be +used. + Using the same text as above, search for a year: > + + /19[0-9][0-9]\|20[0-9][0-9] + +Now press CTRL-A. The year will be increased by one: + + The financial results for 2002 are better ~ + than for 2000. The income increased by 50%, ~ + even though 2001 had more rain than 2000. ~ + 2000 2001 ~ + income 45,403 66,234 ~ + +Use "n" to find the next year, and press "." to repeat the CTRL-A ("." is a +bit quicker to type). Repeat "n" and "." for all years that appear. + Hint: set the 'hlsearch' option to see the matches you are going to change, +then you can look ahead and do it faster. + +Adding more than one can be done by prepending the number to CTRL-A. Suppose +you have this list: + + 1. item four ~ + 2. item five ~ + 3. item six ~ + +Move the cursor to "1." and type: > + + 3 CTRL-A + +The "1." will change to "4.". Again, you can use "." to repeat this on the +other numbers. + +Another example: + + 006 foo bar ~ + 007 foo bar ~ + +Using CTRL-A on these numbers results in: + + 007 foo bar ~ + 010 foo bar ~ + +7 plus one is 10? What happened here is that Vim recognized "007" as an octal +number, because there is a leading zero. This notation is often used in C +programs. If you do not want a number with leading zeros to be handled as +octal, use this: > + + :set nrformats-=octal + +The CTRL-X command does subtraction in a similar way. + +============================================================================== +*26.3* Making a change in many files + +Suppose you have a variable called "x_cnt" and you want to change it to +"x_counter". This variable is used in several of your C files. You need to +change it in all files. This is how you do it. + Put all the relevant files in the argument list: > + + :args *.c +< +This finds all C files and edits the first one. Now you can perform a +substitution command on all these files: > + + :argdo %s/\<x_cnt\>/x_counter/ge | update + +The ":argdo" command takes an argument that is another command. That command +will be executed on all files in the argument list. + The "%s" substitute command that follows works on all lines. It finds the +word "x_cnt" with "\<x_cnt\>". The "\<" and "\>" are used to match the whole +word only, and not "px_cnt" or "x_cnt2". + The flags for the substitute command include "g" to replace all occurrences +of "x_cnt" in the same line. The "e" flag is used to avoid an error message +when "x_cnt" does not appear in the file. Otherwise ":argdo" would abort on +the first file where "x_cnt" was not found. + The "|" separates two commands. The following "update" command writes the +file only if it was changed. If no "x_cnt" was changed to "x_counter" nothing +happens. + +There is also the ":windo" command, which executes its argument in all +windows. And ":bufdo" executes its argument on all buffers. Be careful with +this, because you might have more files in the buffer list than you think. +Check this with the ":buffers" command (or ":ls"). + +============================================================================== +*26.4* Using Vim from a shell script + +Suppose you have a lot of files in which you need to change the string +"-person-" to "Jones" and then print it. How do you do that? One way is to +do a lot of typing. The other is to write a shell script to do the work. + The Vim editor does a superb job as a screen-oriented editor when using +Normal mode commands. For batch processing, however, Normal mode commands do +not result in clear, commented command files; so here you will use Ex mode +instead. This mode gives you a nice command-line interface that makes it easy +to put into a batch file. ("Ex command" is just another name for a +command-line (:) command.) + The Ex mode commands you need are as follows: > + + %s/-person-/Jones/g + write tempfile + quit + +You put these commands in the file "change.vim". Now to run the editor in +batch mode, use this shell script: > + + for file in *.txt; do + vim -e -s $file < change.vim + lpr -r tempfile + done + +The for-done loop is a shell construct to repeat the two lines in between, +while the $file variable is set to a different file name each time. + The second line runs the Vim editor in Ex mode (-e argument) on the file +$file and reads commands from the file "change.vim". The -s argument tells +Vim to operate in silent mode. In other words, do not keep outputting the +:prompt, or any other prompt for that matter. + The "lpr -r tempfile" command prints the resulting "tempfile" and deletes +it (that's what the -r argument does). + + +READING FROM STDIN + +Vim can read text on standard input. Since the normal way is to read commands +there, you must tell Vim to read text instead. This is done by passing the +"-" argument in place of a file. Example: > + + ls | vim - + +This allows you to edit the output of the "ls" command, without first saving +the text in a file. + If you use the standard input to read text from, you can use the "-S" +argument to read a script: > + + producer | vim -S change.vim - + + +NORMAL MODE SCRIPTS + +If you really want to use Normal mode commands in a script, you can use it +like this: > + + vim -s script file.txt ... +< + Note: + "-s" has a different meaning when it is used without "-e". Here it + means to source the "script" as Normal mode commands. When used with + "-e" it means to be silent, and doesn't use the next argument as a + file name. + +The commands in "script" are executed like you typed them. Don't forget that +a line break is interpreted as pressing <Enter>. In Normal mode that moves +the cursor to the next line. + To create the script you can edit the script file and type the commands. +You need to imagine what the result would be, which can be a bit difficult. +Another way is to record the commands while you perform them manually. This +is how you do that: > + + vim -w script file.txt ... + +All typed keys will be written to "script". If you make a small mistake you +can just continue and remember to edit the script later. + The "-w" argument appends to an existing script. That is good when you +want to record the script bit by bit. If you want to start from scratch and +start all over, use the "-W" argument. It overwrites any existing file. + +============================================================================== + +Next chapter: |usr_27.txt| Search commands and patterns + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_27.txt b/runtime/doc/usr_27.txt new file mode 100644 index 0000000000..fb096593f2 --- /dev/null +++ b/runtime/doc/usr_27.txt @@ -0,0 +1,563 @@ +*usr_27.txt* For Vim version 7.4. Last change: 2010 Mar 28 + + VIM USER MANUAL - by Bram Moolenaar + + Search commands and patterns + + +In chapter 3 a few simple search patterns were mentioned |03.9|. Vim can do +much more complex searches. This chapter explains the most often used ones. +A detailed specification can be found here: |pattern| + +|27.1| Ignoring case +|27.2| Wrapping around the file end +|27.3| Offsets +|27.4| Matching multiple times +|27.5| Alternatives +|27.6| Character ranges +|27.7| Character classes +|27.8| Matching a line break +|27.9| Examples + + Next chapter: |usr_28.txt| Folding + Previous chapter: |usr_26.txt| Repeating +Table of contents: |usr_toc.txt| + +============================================================================== +*27.1* Ignoring case + +By default, Vim's searches are case sensitive. Therefore, "include", +"INCLUDE", and "Include" are three different words and a search will match +only one of them. + Now switch on the 'ignorecase' option: > + + :set ignorecase + +Search for "include" again, and now it will match "Include", "INCLUDE" and +"InClUDe". (Set the 'hlsearch' option to quickly see where a pattern +matches.) + You can switch this off again with: > + + :set noignorecase + +But let's keep it set, and search for "INCLUDE". It will match exactly the +same text as "include" did. Now set the 'smartcase' option: > + + :set ignorecase smartcase + +If you have a pattern with at least one uppercase character, the search +becomes case sensitive. The idea is that you didn't have to type that +uppercase character, so you must have done it because you wanted case to +match. That's smart! + With these two options set you find the following matches: + + pattern matches ~ + word word, Word, WORD, WoRd, etc. + Word Word + WORD WORD + WoRd WoRd + + +CASE IN ONE PATTERN + +If you want to ignore case for one specific pattern, you can do this by +prepending the "\c" string. Using "\C" will make the pattern to match case. +This overrules the 'ignorecase' and 'smartcase' options, when "\c" or "\C" is +used their value doesn't matter. + + pattern matches ~ + \Cword word + \CWord Word + \cword word, Word, WORD, WoRd, etc. + \cWord word, Word, WORD, WoRd, etc. + +A big advantage of using "\c" and "\C" is that it sticks with the pattern. +Thus if you repeat a pattern from the search history, the same will happen, no +matter if 'ignorecase' or 'smartcase' was changed. + + Note: + The use of "\" items in search patterns depends on the 'magic' option. + In this chapter we will assume 'magic' is on, because that is the + standard and recommended setting. If you would change 'magic', many + search patterns would suddenly become invalid. + + Note: + If your search takes much longer than you expected, you can interrupt + it with CTRL-C on Unix and CTRL-Break on MS-DOS and MS-Windows. + +============================================================================== +*27.2* Wrapping around the file end + +By default, a forward search starts searching for the given string at the +current cursor location. It then proceeds to the end of the file. If it has +not found the string by that time, it starts from the beginning and searches +from the start of the file to the cursor location. + Keep in mind that when repeating the "n" command to search for the next +match, you eventually get back to the first match. If you don't notice this +you keep searching forever! To give you a hint, Vim displays this message: + + search hit BOTTOM, continuing at TOP ~ + +If you use the "?" command, to search in the other direction, you get this +message: + + search hit TOP, continuing at BOTTOM ~ + +Still, you don't know when you are back at the first match. One way to see +this is by switching on the 'ruler' option: > + + :set ruler + +Vim will display the cursor position in the lower righthand corner of the +window (in the status line if there is one). It looks like this: + + 101,29 84% ~ + +The first number is the line number of the cursor. Remember the line number +where you started, so that you can check if you passed this position again. + + +NOT WRAPPING + +To turn off search wrapping, use the following command: > + + :set nowrapscan + +Now when the search hits the end of the file, an error message displays: + + E385: search hit BOTTOM without match for: forever ~ + +Thus you can find all matches by going to the start of the file with "gg" and +keep searching until you see this message. + If you search in the other direction, using "?", you get: + + E384: search hit TOP without match for: forever ~ + +============================================================================== +*27.3* Offsets + +By default, the search command leaves the cursor positioned on the beginning +of the pattern. You can tell Vim to leave it some other place by specifying +an offset. For the forward search command "/", the offset is specified by +appending a slash (/) and the offset: > + + /default/2 + +This command searches for the pattern "default" and then moves to the +beginning of the second line past the pattern. Using this command on the +paragraph above, Vim finds the word "default" in the first line. Then the +cursor is moved two lines down and lands on "an offset". + +If the offset is a simple number, the cursor will be placed at the beginning +of the line that many lines from the match. The offset number can be positive +or negative. If it is positive, the cursor moves down that many lines; if +negative, it moves up. + + +CHARACTER OFFSETS + +The "e" offset indicates an offset from the end of the match. It moves the +cursor onto the last character of the match. The command: > + + /const/e + +puts the cursor on the "t" of "const". + From that position, adding a number moves forward that many characters. +This command moves to the character just after the match: > + + /const/e+1 + +A positive number moves the cursor to the right, a negative number moves it to +the left. For example: > + + /const/e-1 + +moves the cursor to the "s" of "const". + +If the offset begins with "b", the cursor moves to the beginning of the +pattern. That's not very useful, since leaving out the "b" does the same +thing. It does get useful when a number is added or subtracted. The cursor +then goes forward or backward that many characters. For example: > + + /const/b+2 + +Moves the cursor to the beginning of the match and then two characters to the +right. Thus it lands on the "n". + + +REPEATING + +To repeat searching for the previously used search pattern, but with a +different offset, leave out the pattern: > + + /that + //e + +Is equal to: > + + /that/e + +To repeat with the same offset: > + + / + +"n" does the same thing. To repeat while removing a previously used offset: > + + // + + +SEARCHING BACKWARDS + +The "?" command uses offsets in the same way, but you must use "?" to separate +the offset from the pattern, instead of "/": > + + ?const?e-2 + +The "b" and "e" keep their meaning, they don't change direction with the use +of "?". + + +START POSITION + +When starting a search, it normally starts at the cursor position. When you +specify a line offset, this can cause trouble. For example: > + + /const/-2 + +This finds the next word "const" and then moves two lines up. If you +use "n" to search again, Vim could start at the current position and find the same +"const" match. Then using the offset again, you would be back where you started. +You would be stuck! + It could be worse: Suppose there is another match with "const" in the next +line. Then repeating the forward search would find this match and move two +lines up. Thus you would actually move the cursor back! + +When you specify a character offset, Vim will compensate for this. Thus the +search starts a few characters forward or backward, so that the same match +isn't found again. + +============================================================================== +*27.4* Matching multiple times + +The "*" item specifies that the item before it can match any number of times. +Thus: > + + /a* + +matches "a", "aa", "aaa", etc. But also "" (the empty string), because zero +times is included. + The "*" only applies to the item directly before it. Thus "ab*" matches +"a", "ab", "abb", "abbb", etc. To match a whole string multiple times, it +must be grouped into one item. This is done by putting "\(" before it and +"\)" after it. Thus this command: > + + /\(ab\)* + +Matches: "ab", "abab", "ababab", etc. And also "". + +To avoid matching the empty string, use "\+". This makes the previous item +match one or more times. > + + /ab\+ + +Matches "ab", "abb", "abbb", etc. It does not match "a" when no "b" follows. + +To match an optional item, use "\=". Example: > + + /folders\= + +Matches "folder" and "folders". + + +SPECIFIC COUNTS + +To match a specific number of items use the form "\{n,m}". "n" and "m" are +numbers. The item before it will be matched "n" to "m" times |inclusive|. +Example: > + + /ab\{3,5} + +matches "abbb", "abbbb" and "abbbbb". + When "n" is omitted, it defaults to zero. When "m" is omitted it defaults +to infinity. When ",m" is omitted, it matches exactly "n" times. +Examples: + + pattern match count ~ + \{,4} 0, 1, 2, 3 or 4 + \{3,} 3, 4, 5, etc. + \{0,1} 0 or 1, same as \= + \{0,} 0 or more, same as * + \{1,} 1 or more, same as \+ + \{3} 3 + + +MATCHING AS LITTLE AS POSSIBLE + +The items so far match as many characters as they can find. To match as few +as possible, use "\{-n,m}". It works the same as "\{n,m}", except that the +minimal amount possible is used. + For example, use: > + + /ab\{-1,3} + +Will match "ab" in "abbb". Actually, it will never match more than one b, +because there is no reason to match more. It requires something else to force +it to match more than the lower limit. + The same rules apply to removing "n" and "m". It's even possible to remove +both of the numbers, resulting in "\{-}". This matches the item before it +zero or more times, as few as possible. The item by itself always matches +zero times. It is useful when combined with something else. Example: > + + /a.\{-}b + +This matches "axb" in "axbxb". If this pattern would be used: > + + /a.*b + +It would try to match as many characters as possible with ".*", thus it +matches "axbxb" as a whole. + +============================================================================== +*27.5* Alternatives + +The "or" operator in a pattern is "\|". Example: > + + /foo\|bar + +This matches "foo" or "bar". More alternatives can be concatenated: > + + /one\|two\|three + +Matches "one", "two" and "three". + To match multiple times, the whole thing must be placed in "\(" and "\)": > + + /\(foo\|bar\)\+ + +This matches "foo", "foobar", "foofoo", "barfoobar", etc. + Another example: > + + /end\(if\|while\|for\) + +This matches "endif", "endwhile" and "endfor". + +A related item is "\&". This requires that both alternatives match in the +same place. The resulting match uses the last alternative. Example: > + + /forever\&... + +This matches "for" in "forever". It will not match "fortuin", for example. + +============================================================================== +*27.6* Character ranges + +To match "a", "b" or "c" you could use "/a\|b\|c". When you want to match all +letters from "a" to "z" this gets very long. There is a shorter method: > + + /[a-z] + +The [] construct matches a single character. Inside you specify which +characters to match. You can include a list of characters, like this: > + + /[0123456789abcdef] + +This will match any of the characters included. For consecutive characters +you can specify the range. "0-3" stands for "0123". "w-z" stands for "wxyz". +Thus the same command as above can be shortened to: > + + /[0-9a-f] + +To match the "-" character itself make it the first or last one in the range. +These special characters are accepted to make it easier to use them inside a +[] range (they can actually be used anywhere in the search pattern): + + \e <Esc> + \t <Tab> + \r <CR> + \b <BS> + +There are a few more special cases for [] ranges, see |/[]| for the whole +story. + + +COMPLEMENTED RANGE + +To avoid matching a specific character, use "^" at the start of the range. +The [] item then matches everything but the characters included. Example: > + + /"[^"]*" +< + " a double quote + [^"] any character that is not a double quote + * as many as possible + " a double quote again + +This matches "foo" and "3!x", including the double quotes. + + +PREDEFINED RANGES + +A number of ranges are used very often. Vim provides a shortcut for these. +For example: > + + /\a + +Finds alphabetic characters. This is equal to using "/[a-zA-Z]". Here are a +few more of these: + + item matches equivalent ~ + \d digit [0-9] + \D non-digit [^0-9] + \x hex digit [0-9a-fA-F] + \X non-hex digit [^0-9a-fA-F] + \s white space [ ] (<Tab> and <Space>) + \S non-white characters [^ ] (not <Tab> and <Space>) + \l lowercase alpha [a-z] + \L non-lowercase alpha [^a-z] + \u uppercase alpha [A-Z] + \U non-uppercase alpha [^A-Z] + + Note: + Using these predefined ranges works a lot faster than the character + range it stands for. + These items can not be used inside []. Thus "[\d\l]" does NOT work to + match a digit or lowercase alpha. Use "\(\d\|\l\)" instead. + +See |/\s| for the whole list of these ranges. + +============================================================================== +*27.7* Character classes + +The character range matches a fixed set of characters. A character class is +similar, but with an essential difference: The set of characters can be +redefined without changing the search pattern. + For example, search for this pattern: > + + /\f\+ + +The "\f" items stands for file name characters. Thus this matches a sequence +of characters that can be a file name. + Which characters can be part of a file name depends on the system you are +using. On MS-Windows, the backslash is included, on Unix it is not. This is +specified with the 'isfname' option. The default value for Unix is: > + + :set isfname + isfname=@,48-57,/,.,-,_,+,,,#,$,%,~,= + +For other systems the default value is different. Thus you can make a search +pattern with "\f" to match a file name, and it will automatically adjust to +the system you are using it on. + + Note: + Actually, Unix allows using just about any character in a file name, + including white space. Including these characters in 'isfname' would + be theoretically correct. But it would make it impossible to find the + end of a file name in text. Thus the default value of 'isfname' is a + compromise. + +The character classes are: + + item matches option ~ + \i identifier characters 'isident' + \I like \i, excluding digits + \k keyword characters 'iskeyword' + \K like \k, excluding digits + \p printable characters 'isprint' + \P like \p, excluding digits + \f file name characters 'isfname' + \F like \f, excluding digits + +============================================================================== +*27.8* Matching a line break + +Vim can find a pattern that includes a line break. You need to specify where +the line break happens, because all items mentioned so far don't match a line +break. + To check for a line break in a specific place, use the "\n" item: > + + /the\nword + +This will match at a line that ends in "the" and the next line starts with +"word". To match "the word" as well, you need to match a space or a line +break. The item to use for it is "\_s": > + + /the\_sword + +To allow any amount of white space: > + + /the\_s\+word + +This also matches when "the " is at the end of a line and " word" at the +start of the next one. + +"\s" matches white space, "\_s" matches white space or a line break. +Similarly, "\a" matches an alphabetic character, and "\_a" matches an +alphabetic character or a line break. The other character classes and ranges +can be modified in the same way by inserting a "_". + +Many other items can be made to match a line break by prepending "\_". For +example: "\_." matches any character or a line break. + + Note: + "\_.*" matches everything until the end of the file. Be careful with + this, it can make a search command very slow. + +Another example is "\_[]", a character range that includes a line break: > + + /"\_[^"]*" + +This finds a text in double quotes that may be split up in several lines. + +============================================================================== +*27.9* Examples + +Here are a few search patterns you might find useful. This shows how the +items mentioned above can be combined. + + +FINDING A CALIFORNIA LICENSE PLATE + +A sample license plate number is "1MGU103". It has one digit, three uppercase +letters and three digits. Directly putting this into a search pattern: > + + /\d\u\u\u\d\d\d + +Another way is to specify that there are three digits and letters with a +count: > + + /\d\u\{3}\d\{3} + +Using [] ranges instead: > + + /[0-9][A-Z]\{3}[0-9]\{3} + +Which one of these you should use? Whichever one you can remember. The +simple way you can remember is much faster than the fancy way that you can't. +If you can remember them all, then avoid the last one, because it's both more +typing and slower to execute. + + +FINDING AN IDENTIFIER + +In C programs (and many other computer languages) an identifier starts with a +letter and further consists of letters and digits. Underscores can be used +too. This can be found with: > + + /\<\h\w*\> + +"\<" and "\>" are used to find only whole words. "\h" stands for "[A-Za-z_]" +and "\w" for "[0-9A-Za-z_]". + + Note: + "\<" and "\>" depend on the 'iskeyword' option. If it includes "-", + for example, then "ident-" is not matched. In this situation use: > + + /\w\@<!\h\w*\w\@! +< + This checks if "\w" does not match before or after the identifier. + See |/\@<!| and |/\@!|. + +============================================================================== + +Next chapter: |usr_28.txt| Folding + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_28.txt b/runtime/doc/usr_28.txt new file mode 100644 index 0000000000..46db1b90af --- /dev/null +++ b/runtime/doc/usr_28.txt @@ -0,0 +1,426 @@ +*usr_28.txt* For Vim version 7.4. Last change: 2008 Jun 14 + + VIM USER MANUAL - by Bram Moolenaar + + Folding + + +Structured text can be separated in sections. And sections in sub-sections. +Folding allows you to display a section as one line, providing an overview. +This chapter explains the different ways this can be done. + +|28.1| What is folding? +|28.2| Manual folding +|28.3| Working with folds +|28.4| Saving and restoring folds +|28.5| Folding by indent +|28.6| Folding with markers +|28.7| Folding by syntax +|28.8| Folding by expression +|28.9| Folding unchanged lines +|28.10| Which fold method to use? + + Next chapter: |usr_29.txt| Moving through programs + Previous chapter: |usr_27.txt| Search commands and patterns +Table of contents: |usr_toc.txt| + +============================================================================== +*28.1* What is folding? + +Folding is used to show a range of lines in the buffer as a single line on the +screen. Like a piece of paper which is folded to make it shorter: + + +------------------------+ + | line 1 | + | line 2 | + | line 3 | + |_______________________ | + \ \ + \________________________\ + / folded lines / + /________________________/ + | line 12 | + | line 13 | + | line 14 | + +------------------------+ + +The text is still in the buffer, unchanged. Only the way lines are displayed +is affected by folding. + +The advantage of folding is that you can get a better overview of the +structure of text, by folding lines of a section and replacing it with a line +that indicates that there is a section. + +============================================================================== +*28.2* Manual folding + +Try it out: Position the cursor in a paragraph and type: > + + zfap + +You will see that the paragraph is replaced by a highlighted line. You have +created a fold. |zf| is an operator and |ap| a text object selection. You +can use the |zf| operator with any movement command to create a fold for the +text that it moved over. |zf| also works in Visual mode. + +To view the text again, open the fold by typing: > + + zo + +And you can close the fold again with: > + + zc + +All the folding commands start with "z". With some fantasy, this looks like a +folded piece of paper, seen from the side. The letter after the "z" has a +mnemonic meaning to make it easier to remember the commands: + + zf F-old creation + zo O-pen a fold + zc C-lose a fold + +Folds can be nested: A region of text that contains folds can be folded +again. For example, you can fold each paragraph in this section, and then +fold all the sections in this chapter. Try it out. You will notice that +opening the fold for the whole chapter will restore the nested folds as they +were, some may be open and some may be closed. + +Suppose you have created several folds, and now want to view all the text. +You could go to each fold and type "zo". To do this faster, use this command: > + + zr + +This will R-educe the folding. The opposite is: > + + zm + +This folds M-ore. You can repeat "zr" and "zm" to open and close nested folds +of several levels. + +If you have nested several levels deep, you can open all of them with: > + + zR + +This R-educes folds until there are none left. And you can close all folds +with: > + + zM + +This folds M-ore and M-ore. + +You can quickly disable the folding with the |zn| command. Then |zN| brings +back the folding as it was. |zi| toggles between the two. This is a useful +way of working: +- create folds to get overview on your file +- move around to where you want to do your work +- do |zi| to look at the text and edit it +- do |zi| again to go back to moving around + +More about manual folding in the reference manual: |fold-manual| + +============================================================================== +*28.3* Working with folds + +When some folds are closed, movement commands like "j" and "k" move over a +fold like it was a single, empty line. This allows you to quickly move around +over folded text. + +You can yank, delete and put folds as if it was a single line. This is very +useful if you want to reorder functions in a program. First make sure that +each fold contains a whole function (or a bit less) by selecting the right +'foldmethod'. Then delete the function with "dd", move the cursor and put it +with "p". If some lines of the function are above or below the fold, you can +use Visual selection: +- put the cursor on the first line to be moved +- hit "V" to start Visual mode +- put the cursor on the last line to be moved +- hit "d" to delete the selected lines. +- move the cursor to the new position and "p"ut the lines there. + +It is sometimes difficult to see or remember where a fold is located, thus +where a |zo| command would actually work. To see the defined folds: > + + :set foldcolumn=4 + +This will show a small column on the left of the window to indicate folds. +A "+" is shown for a closed fold. A "-" is shown at the start of each open +fold and "|" at following lines of the fold. + +You can use the mouse to open a fold by clicking on the "+" in the foldcolumn. +Clicking on the "-" or a "|" below it will close an open fold. + +To open all folds at the cursor line use |zO|. +To close all folds at the cursor line use |zC|. +To delete a fold at the cursor line use |zd|. +To delete all folds at the cursor line use |zD|. + +When in Insert mode, the fold at the cursor line is never closed. That allows +you to see what you type! + +Folds are opened automatically when jumping around or moving the cursor left +or right. For example, the "0" command opens the fold under the cursor +(if 'foldopen' contains "hor", which is the default). The 'foldopen' option +can be changed to open folds for specific commands. If you want the line +under the cursor always to be open, do this: > + + :set foldopen=all + +Warning: You won't be able to move onto a closed fold then. You might want to +use this only temporarily and then set it back to the default: > + + :set foldopen& + +You can make folds close automatically when you move out of it: > + + :set foldclose=all + +This will re-apply 'foldlevel' to all folds that don't contain the cursor. +You have to try it out if you like how this feels. Use |zm| to fold more and +|zr| to fold less (reduce folds). + +The folding is local to the window. This allows you to open two windows on +the same buffer, one with folds and one without folds. Or one with all folds +closed and one with all folds open. + +============================================================================== +*28.4* Saving and restoring folds + +When you abandon a file (starting to edit another one), the state of the folds +is lost. If you come back to the same file later, all manually opened and +closed folds are back to their default. When folds have been created +manually, all folds are gone! To save the folds use the |:mkview| command: > + + :mkview + +This will store the settings and other things that influence the view on the +file. You can change what is stored with the 'viewoptions' option. +When you come back to the same file later, you can load the view again: > + + :loadview + +You can store up to ten views on one file. For example, to save the current +setup as the third view and load the second view: > + + :mkview 3 + :loadview 2 + +Note that when you insert or delete lines the views might become invalid. +Also check out the 'viewdir' option, which specifies where the views are +stored. You might want to delete old views now and then. + +============================================================================== +*28.5* Folding by indent + +Defining folds with |zf| is a lot of work. If your text is structured by +giving lower level items a larger indent, you can use the indent folding +method. This will create folds for every sequence of lines with the same +indent. Lines with a larger indent will become nested folds. This works well +with many programming languages. + +Try this by setting the 'foldmethod' option: > + + :set foldmethod=indent + +Then you can use the |zm| and |zr| commands to fold more and reduce folding. +It's easy to see on this example text: + +This line is not indented + This line is indented once + This line is indented twice + This line is indented twice + This line is indented once +This line is not indented + This line is indented once + This line is indented once + +Note that the relation between the amount of indent and the fold depth depends +on the 'shiftwidth' option. Each 'shiftwidth' worth of indent adds one to the +depth of the fold. This is called a fold level. + +When you use the |zr| and |zm| commands you actually increase or decrease the +'foldlevel' option. You could also set it directly: > + + :set foldlevel=3 + +This means that all folds with three times a 'shiftwidth' indent or more will +be closed. The lower the foldlevel, the more folds will be closed. When +'foldlevel' is zero, all folds are closed. |zM| does set 'foldlevel' to zero. +The opposite command |zR| sets 'foldlevel' to the deepest fold level that is +present in the file. + +Thus there are two ways to open and close the folds: +(A) By setting the fold level. + This gives a very quick way of "zooming out" to view the structure of the + text, move the cursor, and "zoom in" on the text again. + +(B) By using |zo| and |zc| commands to open or close specific folds. + This allows opening only those folds that you want to be open, while other + folds remain closed. + +This can be combined: You can first close most folds by using |zm| a few times +and then open a specific fold with |zo|. Or open all folds with |zR| and +then close specific folds with |zc|. + +But you cannot manually define folds when 'foldmethod' is "indent", as that +would conflict with the relation between the indent and the fold level. + +More about folding by indent in the reference manual: |fold-indent| + +============================================================================== +*28.6* Folding with markers + +Markers in the text are used to specify the start and end of a fold region. +This gives precise control over which lines are included in a fold. The +disadvantage is that the text needs to be modified. + +Try it: > + + :set foldmethod=marker + +Example text, as it could appear in a C program: + + /* foobar () {{{ */ + int foobar() + { + /* return a value {{{ */ + return 42; + /* }}} */ + } + /* }}} */ + +Notice that the folded line will display the text before the marker. This is +very useful to tell what the fold contains. + +It's quite annoying when the markers don't pair up correctly after moving some +lines around. This can be avoided by using numbered markers. Example: + + /* global variables {{{1 */ + int varA, varB; + + /* functions {{{1 */ + /* funcA() {{{2 */ + void funcA() {} + + /* funcB() {{{2 */ + void funcB() {} + /* }}}1 */ + +At every numbered marker a fold at the specified level begins. This will make +any fold at a higher level stop here. You can just use numbered start markers +to define all folds. Only when you want to explicitly stop a fold before +another starts you need to add an end marker. + +More about folding with markers in the reference manual: |fold-marker| + +============================================================================== +*28.7* Folding by syntax + +For each language Vim uses a different syntax file. This defines the colors +for various items in the file. If you are reading this in Vim, in a terminal +that supports colors, the colors you see are made with the "help" syntax file. + In the syntax files it is possible to add syntax items that have the "fold" +argument. These define a fold region. This requires writing a syntax file +and adding these items in it. That's not so easy to do. But once it's done, +all folding happens automatically. + Here we'll assume you are using an existing syntax file. Then there is +nothing more to explain. You can open and close folds as explained above. +The folds will be created and deleted automatically when you edit the file. + +More about folding by syntax in the reference manual: |fold-syntax| + +============================================================================== +*28.8* Folding by expression + +This is similar to folding by indent, but instead of using the indent of a +line a user function is called to compute the fold level of a line. You can +use this for text where something in the text indicates which lines belong +together. An example is an e-mail message where the quoted text is indicated +by a ">" before the line. To fold these quotes use this: > + + :set foldmethod=expr + :set foldexpr=strlen(substitute(substitute(getline(v:lnum),'\\s','',\"g\"),'[^>].*','','')) + +You can try it out on this text: + +> quoted text he wrote +> quoted text he wrote +> > double quoted text I wrote +> > double quoted text I wrote + +Explanation for the 'foldexpr' used in the example (inside out): + getline(v:lnum) gets the current line + substitute(...,'\\s','','g') removes all white space from the line + substitute(...,'[^>].*','','') removes everything after leading '>'s + strlen(...) counts the length of the string, which + is the number of '>'s found + +Note that a backslash must be inserted before every space, double quote and +backslash for the ":set" command. If this confuses you, do > + + :set foldexpr + +to check the actual resulting value. To correct a complicated expression, use +the command-line completion: > + + :set foldexpr=<Tab> + +Where <Tab> is a real Tab. Vim will fill in the previous value, which you can +then edit. + +When the expression gets more complicated you should put it in a function and +set 'foldexpr' to call that function. + +More about folding by expression in the reference manual: |fold-expr| + +============================================================================== +*28.9* Folding unchanged lines + +This is useful when you set the 'diff' option in the same window. The +|vimdiff| command does this for you. Example: > + + :setlocal diff foldmethod=diff scrollbind nowrap foldlevel=1 + +Do this in every window that shows a different version of the same file. You +will clearly see the differences between the files, while the text that didn't +change is folded. + +For more details see |fold-diff|. + +============================================================================== +*28.10* Which fold method to use? + +All these possibilities make you wonder which method you should choose. +Unfortunately, there is no golden rule. Here are some hints. + +If there is a syntax file with folding for the language you are editing, that +is probably the best choice. If there isn't one, you might try to write it. +This requires a good knowledge of search patterns. It's not easy, but when +it's working you will not have to define folds manually. + +Typing commands to manually fold regions can be used for unstructured text. +Then use the |:mkview| command to save and restore your folds. + +The marker method requires you to change the file. If you are sharing the +files with other people or you have to meet company standards, you might not +be allowed to add them. + The main advantage of markers is that you can put them exactly where you +want them. That avoids that a few lines are missed when you cut and paste +folds. And you can add a comment about what is contained in the fold. + +Folding by indent is something that works in many files, but not always very +well. Use it when you can't use one of the other methods. However, it is +very useful for outlining. Then you specifically use one 'shiftwidth' for +each nesting level. + +Folding with expressions can make folds in almost any structured text. It is +quite simple to specify, especially if the start and end of a fold can easily +be recognized. + If you use the "expr" method to define folds, but they are not exactly how +you want them, you could switch to the "manual" method. This will not remove +the defined folds. Then you can delete or add folds manually. + +============================================================================== + +Next chapter: |usr_29.txt| Moving through programs + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_29.txt b/runtime/doc/usr_29.txt new file mode 100644 index 0000000000..f13cd3a409 --- /dev/null +++ b/runtime/doc/usr_29.txt @@ -0,0 +1,613 @@ +*usr_29.txt* For Vim version 7.4. Last change: 2008 Jun 28 + + VIM USER MANUAL - by Bram Moolenaar + + Moving through programs + + +The creator of Vim is a computer programmer. It's no surprise that Vim +contains many features to aid in writing programs. Jump around to find where +identifiers are defined and used. Preview declarations in a separate window. +There is more in the next chapter. + +|29.1| Using tags +|29.2| The preview window +|29.3| Moving through a program +|29.4| Finding global identifiers +|29.5| Finding local identifiers + + Next chapter: |usr_30.txt| Editing programs + Previous chapter: |usr_28.txt| Folding +Table of contents: |usr_toc.txt| + +============================================================================== +*29.1* Using tags + +What is a tag? It is a location where an identifier is defined. An example +is a function definition in a C or C++ program. A list of tags is kept in a +tags file. This can be used by Vim to directly jump from any place to the +tag, the place where an identifier is defined. + To generate the tags file for all C files in the current directory, use the +following command: > + + ctags *.c + +"ctags" is a separate program. Most Unix systems already have it installed. +If you do not have it yet, you can find Exuberant ctags here: + + http://ctags.sf.net ~ + +Now when you are in Vim and you want to go to a function definition, you can +jump to it by using the following command: > + + :tag startlist + +This command will find the function "startlist" even if it is in another file. + The CTRL-] command jumps to the tag of the word that is under the cursor. +This makes it easy to explore a tangle of C code. Suppose, for example, that +you are in the function "write_block". You can see that it calls +"write_line". But what does "write_line" do? By placing the cursor on the +call to "write_line" and pressing CTRL-], you jump to the definition of this +function. + The "write_line" function calls "write_char". You need to figure out what +it does. So you position the cursor over the call to "write_char" and press +CTRL-]. Now you are at the definition of "write_char". + + +-------------------------------------+ + |void write_block(char **s; int cnt) | + |{ | + | int i; | + | for (i = 0; i < cnt; ++i) | + | write_line(s[i]); | + |} | | + +-----------|-------------------------+ + | + CTRL-] | + | +----------------------------+ + +--> |void write_line(char *s) | + |{ | + | while (*s != 0) | + | write_char(*s++); | + |} | | + +--------|-------------------+ + | + CTRL-] | + | +------------------------------------+ + +--> |void write_char(char c) | + |{ | + | putchar((int)(unsigned char)c); | + |} | + +------------------------------------+ + +The ":tags" command shows the list of tags that you traversed through: + + :tags + # TO tag FROM line in file/text ~ + 1 1 write_line 8 write_block.c ~ + 2 1 write_char 7 write_line.c ~ + > ~ +> +Now to go back. The CTRL-T command goes to the preceding tag. In the example +above you get back to the "write_line" function, in the call to "write_char". + This command takes a count argument that indicates how many tags to jump +back. You have gone forward, and now back. Let's go forward again. The +following command goes to the tag on top of the list: > + + :tag + +You can prefix it with a count and jump forward that many tags. For example: +":3tag". CTRL-T also can be preceded with a count. + These commands thus allow you to go down a call tree with CTRL-] and back +up again with CTRL-T. Use ":tags" to find out where you are. + + +SPLIT WINDOWS + +The ":tag" command replaces the file in the current window with the one +containing the new function. But suppose you want to see not only the old +function but also the new one? You can split the window using the ":split" +command followed by the ":tag" command. Vim has a shorthand command that does +both: > + :stag tagname + +To split the current window and jump to the tag under the cursor use this +command: > + + CTRL-W ] + +If a count is specified, the new window will be that many lines high. + + +MORE TAGS FILES + +When you have files in many directories, you can create a tags file in each of +them. Vim will then only be able to jump to tags within that directory. + To find more tags files, set the 'tags' option to include all the relevant +tags files. Example: > + + :set tags=./tags,./../tags,./*/tags + +This finds a tags file in the same directory as the current file, one +directory level higher and in all subdirectories. + This is quite a number of tags files, but it may still not be enough. For +example, when editing a file in "~/proj/src", you will not find the tags file +"~/proj/sub/tags". For this situation Vim offers to search a whole directory +tree for tags files. Example: > + + :set tags=~/proj/**/tags + + +ONE TAGS FILE + +When Vim has to search many places for tags files, you can hear the disk +rattling. It may get a bit slow. In that case it's better to spend this +time while generating one big tags file. You might do this overnight. + This requires the Exuberant ctags program, mentioned above. It offers an +argument to search a whole directory tree: > + + cd ~/proj + ctags -R . + +The nice thing about this is that Exuberant ctags recognizes various file +types. Thus this doesn't work just for C and C++ programs, also for Eiffel +and even Vim scripts. See the ctags documentation to tune this. + Now you only need to tell Vim where your big tags file is: > + + :set tags=~/proj/tags + + +MULTIPLE MATCHES + +When a function is defined multiple times (or a method in several classes), +the ":tag" command will jump to the first one. If there is a match in the +current file, that one is used first. + You can now jump to other matches for the same tag with: > + + :tnext + +Repeat this to find further matches. If there are many, you can select which +one to jump to: > + + :tselect tagname + +Vim will present you with a list of choices: + + # pri kind tag file ~ + 1 F f mch_init os_amiga.c ~ + mch_init() ~ + 2 F f mch_init os_mac.c ~ + mch_init() ~ + 3 F f mch_init os_msdos.c ~ + mch_init(void) ~ + 4 F f mch_init os_riscos.c ~ + mch_init() ~ + Enter nr of choice (<CR> to abort): ~ + +You can now enter the number (in the first column) of the match that you would +like to jump to. The information in the other columns give you a good idea of +where the match is defined. + +To move between the matching tags, these commands can be used: + + :tfirst go to first match + :[count]tprevious go to [count] previous match + :[count]tnext go to [count] next match + :tlast go to last match + +If [count] is omitted then one is used. + + +GUESSING TAG NAMES + +Command line completion is a good way to avoid typing a long tag name. Just +type the first bit and press <Tab>: > + + :tag write_<Tab> + +You will get the first match. If it's not the one you want, press <Tab> until +you find the right one. + Sometimes you only know part of the name of a function. Or you have many +tags that start with the same string, but end differently. Then you can tell +Vim to use a pattern to find the tag. + Suppose you want to jump to a tag that contains "block". First type +this: > + + :tag /block + +Now use command line completion: press <Tab>. Vim will find all tags that +contain "block" and use the first match. + The "/" before a tag name tells Vim that what follows is not a literal tag +name, but a pattern. You can use all the items for search patterns here. For +example, suppose you want to select a tag that starts with "write_": > + + :tselect /^write_ + +The "^" specifies that the tag starts with "write_". Otherwise it would also +be found halfway a tag name. Similarly "$" at the end makes sure the pattern +matches until the end of a tag. + + +A TAGS BROWSER + +Since CTRL-] takes you to the definition of the identifier under the cursor, +you can use a list of identifier names as a table of contents. Here is an +example. + First create a list of identifiers (this requires Exuberant ctags): > + + ctags --c-types=f -f functions *.c + +Now start Vim without a file, and edit this file in Vim, in a vertically split +window: > + + vim + :vsplit functions + +The window contains a list of all the functions. There is some more stuff, +but you can ignore that. Do ":setlocal ts=99" to clean it up a bit. + In this window, define a mapping: > + + :nnoremap <buffer> <CR> 0ye<C-W>w:tag <C-R>"<CR> + +Move the cursor to the line that contains the function you want to go to. +Now press <Enter>. Vim will go to the other window and jump to the selected +function. + + +RELATED ITEMS + +You can set 'ignorecase' to make case in tag names be ignored. + +The 'tagbsearch' option tells if the tags file is sorted or not. The default +is to assume a sorted tags file, which makes a tags search a lot faster, but +doesn't work if the tags file isn't sorted. + +The 'taglength' option can be used to tell Vim the number of significant +characters in a tag. + +When you use the SNiFF+ program, you can use the Vim interface to it |sniff|. +SNiFF+ is a commercial program. + +Cscope is a free program. It does not only find places where an identifier is +declared, but also where it is used. See |cscope|. + +============================================================================== +*29.2* The preview window + +When you edit code that contains a function call, you need to use the correct +arguments. To know what values to pass you can look at how the function is +defined. The tags mechanism works very well for this. Preferably the +definition is displayed in another window. For this the preview window can be +used. + To open a preview window to display the function "write_char": > + + :ptag write_char + +Vim will open a window, and jumps to the tag "write_char". Then it takes you +back to the original position. Thus you can continue typing without the need +to use a CTRL-W command. + If the name of a function appears in the text, you can get its definition +in the preview window with: > + + CTRL-W } + +There is a script that automatically displays the text where the word under +the cursor was defined. See |CursorHold-example|. + +To close the preview window use this command: > + + :pclose + +To edit a specific file in the preview window, use ":pedit". This can be +useful to edit a header file, for example: > + + :pedit defs.h + +Finally, ":psearch" can be used to find a word in the current file and any +included files and display the match in the preview window. This is +especially useful when using library functions, for which you do not have a +tags file. Example: > + + :psearch popen + +This will show the "stdio.h" file in the preview window, with the function +prototype for popen(): + + FILE *popen __P((const char *, const char *)); ~ + +You can specify the height of the preview window, when it is opened, with the +'previewheight' option. + +============================================================================== +*29.3* Moving through a program + +Since a program is structured, Vim can recognize items in it. Specific +commands can be used to move around. + C programs often contain constructs like this: + + #ifdef USE_POPEN ~ + fd = popen("ls", "r") ~ + #else ~ + fd = fopen("tmp", "w") ~ + #endif ~ + +But then much longer, and possibly nested. Position the cursor on the +"#ifdef" and press %. Vim will jump to the "#else". Pressing % again takes +you to the "#endif". Another % takes you to the "#ifdef" again. + When the construct is nested, Vim will find the matching items. This is a +good way to check if you didn't forget an "#endif". + When you are somewhere inside a "#if" - "#endif", you can jump to the start +of it with: > + + [# + +If you are not after a "#if" or "#ifdef" Vim will beep. To jump forward to +the next "#else" or "#endif" use: > + + ]# + +These two commands skip any "#if" - "#endif" blocks that they encounter. +Example: + + #if defined(HAS_INC_H) ~ + a = a + inc(); ~ + # ifdef USE_THEME ~ + a += 3; ~ + # endif ~ + set_width(a); ~ + +With the cursor in the last line, "[#" moves to the first line. The "#ifdef" +- "#endif" block in the middle is skipped. + + +MOVING IN CODE BLOCKS + +In C code blocks are enclosed in {}. These can get pretty long. To move to +the start of the outer block use the "[[" command. Use "][" to find the end. +This assumes that the "{" and "}" are in the first column. + The "[{" command moves to the start of the current block. It skips over +pairs of {} at the same level. "]}" jumps to the end. + An overview: + + function(int a) + +-> { + | if (a) + | +-> { + [[ | | for (;;) --+ + | | +-> { | + | [{ | | foo(32); | --+ + | | [{ | if (bar(a)) --+ | ]} | + +-- | +-- break; | ]} | | + | } <-+ | | ][ + +-- foobar(a) | | + } <-+ | + } <-+ + +When writing C++ or Java, the outer {} block is for the class. The next level +of {} is for a method. When somewhere inside a class use "[m" to find the +previous start of a method. "]m" finds the next start of a method. + +Additionally, "[]" moves backward to the end of a function and "]]" moves +forward to the start of the next function. The end of a function is defined +by a "}" in the first column. + + int func1(void) + { + return 1; + +----------> } + | + [] | int func2(void) + | +-> { + | [[ | if (flag) + start +-- +-- return flag; + | ][ | return 2; + | +-> } + ]] | + | int func3(void) + +----------> { + return 3; + } + +Don't forget you can also use "%" to move between matching (), {} and []. +That also works when they are many lines apart. + + +MOVING IN BRACES + +The "[(" and "])" commands work similar to "[{" and "]}", except that they +work on () pairs instead of {} pairs. +> + [( +< <-------------------------------- + <------- + if (a == b && (c == d || (e > f)) && x > y) ~ + --------------> + --------------------------------> > + ]) + +MOVING IN COMMENTS + +To move back to the start of a comment use "[/". Move forward to the end of a +comment with "]/". This only works for /* - */ comments. + + +-> +-> /* + | [/ | * A comment about --+ + [/ | +-- * wonderful life. | ]/ + | */ <-+ + | + +-- foo = bar * 3; --+ + | ]/ + /* a short comment */ <-+ + +============================================================================== +*29.4* Finding global identifiers + +You are editing a C program and wonder if a variable is declared as "int" or +"unsigned". A quick way to find this is with the "[I" command. + Suppose the cursor is on the word "column". Type: > + + [I + +Vim will list the matching lines it can find. Not only in the current file, +but also in all included files (and files included in them, etc.). The result +looks like this: + + structs.h ~ + 1: 29 unsigned column; /* column number */ ~ + +The advantage over using tags or the preview window is that included files are +searched. In most cases this results in the right declaration to be found. +Also when the tags file is out of date. Also when you don't have tags for the +included files. + However, a few things must be right for "[I" to do its work. First of all, +the 'include' option must specify how a file is included. The default value +works for C and C++. For other languages you will have to change it. + + +LOCATING INCLUDED FILES + + Vim will find included files in the places specified with the 'path' +option. If a directory is missing, some include files will not be found. You +can discover this with this command: > + + :checkpath + +It will list the include files that could not be found. Also files included +by the files that could be found. An example of the output: + + --- Included files not found in path --- ~ + <io.h> ~ + vim.h --> ~ + <functions.h> ~ + <clib/exec_protos.h> ~ + +The "io.h" file is included by the current file and can't be found. "vim.h" +can be found, thus ":checkpath" goes into this file and checks what it +includes. The "functions.h" and "clib/exec_protos.h" files, included by +"vim.h" are not found. + + Note: + Vim is not a compiler. It does not recognize "#ifdef" statements. + This means every "#include" statement is used, also when it comes + after "#if NEVER". + +To fix the files that could not be found, add a directory to the 'path' +option. A good place to find out about this is the Makefile. Look out for +lines that contain "-I" items, like "-I/usr/local/X11". To add this directory +use: > + + :set path+=/usr/local/X11 + +When there are many subdirectories, you can use the "*" wildcard. Example: > + + :set path+=/usr/*/include + +This would find files in "/usr/local/include" as well as "/usr/X11/include". + +When working on a project with a whole nested tree of included files, the "**" +items is useful. This will search down in all subdirectories. Example: > + + :set path+=/projects/invent/**/include + +This will find files in the directories: + + /projects/invent/include ~ + /projects/invent/main/include ~ + /projects/invent/main/os/include ~ + etc. + +There are even more possibilities. Check out the 'path' option for info. + If you want to see which included files are actually found, use this +command: > + + :checkpath! + +You will get a (very long) list of included files, the files they include, and +so on. To shorten the list a bit, Vim shows "(Already listed)" for files that +were found before and doesn't list the included files in there again. + + +JUMPING TO A MATCH + +"[I" produces a list with only one line of text. When you want to have a +closer look at the first item, you can jump to that line with the command: > + + [<Tab> + +You can also use "[ CTRL-I", since CTRL-I is the same as pressing <Tab>. + +The list that "[I" produces has a number at the start of each line. When you +want to jump to another item than the first one, type the number first: > + + 3[<Tab> + +Will jump to the third item in the list. Remember that you can use CTRL-O to +jump back to where you started from. + + +RELATED COMMANDS + + [i only lists the first match + ]I only lists items below the cursor + ]i only lists the first item below the cursor + + +FINDING DEFINED IDENTIFIERS + +The "[I" command finds any identifier. To find only macros, defined with +"#define" use: > + + [D + +Again, this searches in included files. The 'define' option specifies what a +line looks like that defines the items for "[D". You could change it to make +it work with other languages than C or C++. + The commands related to "[D" are: + + [d only lists the first match + ]D only lists items below the cursor + ]d only lists the first item below the cursor + +============================================================================== +*29.5* Finding local identifiers + +The "[I" command searches included files. To search in the current file only, +and jump to the first place where the word under the cursor is used: > + + gD + +Hint: Goto Definition. This command is very useful to find a variable or +function that was declared locally ("static", in C terms). Example (cursor on +"counter"): + + +-> static int counter = 0; + | + | int get_counter(void) + gD | { + | ++counter; + +-- return counter; + } + +To restrict the search even further, and look only in the current function, +use this command: > + + gd + +This will go back to the start of the current function and find the first +occurrence of the word under the cursor. Actually, it searches backwards to +an empty line above a "{" in the first column. From there it searches forward +for the identifier. Example (cursor on "idx"): + + int find_entry(char *name) + { + +-> int idx; + | + gd | for (idx = 0; idx < table_len; ++idx) + | if (strcmp(table[idx].name, name) == 0) + +-- return idx; + } + +============================================================================== + +Next chapter: |usr_30.txt| Editing programs + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_30.txt b/runtime/doc/usr_30.txt new file mode 100644 index 0000000000..b2be512980 --- /dev/null +++ b/runtime/doc/usr_30.txt @@ -0,0 +1,643 @@ +*usr_30.txt* For Vim version 7.4. Last change: 2007 Nov 10 + + VIM USER MANUAL - by Bram Moolenaar + + Editing programs + + +Vim has various commands that aid in writing computer programs. Compile a +program and directly jump to reported errors. Automatically set the indent +for many languages and format comments. + +|30.1| Compiling +|30.2| Indenting C files +|30.3| Automatic indenting +|30.4| Other indenting +|30.5| Tabs and spaces +|30.6| Formatting comments + + Next chapter: |usr_31.txt| Exploiting the GUI + Previous chapter: |usr_29.txt| Moving through programs +Table of contents: |usr_toc.txt| + +============================================================================== +*30.1* Compiling + +Vim has a set of so called "quickfix" commands. They enable you to compile a +program from within Vim and then go through the errors generated and fix them +(hopefully). You can then recompile and fix any new errors that are found +until finally your program compiles without any error. + +The following command runs the program "make" (supplying it with any argument +you give) and captures the results: > + + :make {arguments} + +If errors were generated, they are captured and the editor positions you where +the first error occurred. + Take a look at an example ":make" session. (Typical :make sessions generate +far more errors and fewer stupid ones.) After typing ":make" the screen looks +like this: + + :!make | &tee /tmp/vim215953.err ~ + gcc -g -Wall -o prog main.c sub.c ~ + main.c: In function 'main': ~ + main.c:6: too many arguments to function 'do_sub' ~ + main.c: At top level: ~ + main.c:10: parse error before '}' ~ + make: *** [prog] Error 1 ~ + + 2 returned ~ + "main.c" 11L, 111C ~ + (3 of 6): too many arguments to function 'do_sub' ~ + Press ENTER or type command to continue ~ + +From this you can see that you have errors in the file "main.c". When you +press <Enter>, Vim displays the file "main.c", with the cursor positioned on +line 6, the first line with an error. You did not need to specify the file or +the line number, Vim knew where to go by looking in the error messages. + + +---------------------------------------------------+ + |int main() | + |{ | + | int i=3; | + cursor -> | do_sub("foo"); | + | ++i; | + | return (0); | + |} | + |} | + | ~ | + |(3 of 12): too many arguments to function 'do_sub' | + +---------------------------------------------------+ + +The following command goes to where the next error occurs: > + + :cnext + +Vim jumps to line 10, the last line in the file, where there is an extra '}'. + When there is not enough room, Vim will shorten the error message. To see +the whole message use: > + + :cc + +You can get an overview of all the error messages with the ":clist" command. +The output looks like this: > + + :clist +< 3 main.c: 6:too many arguments to function 'do_sub' ~ + 5 main.c: 10:parse error before '}' ~ + +Only the lines where Vim recognized a file name and line number are listed +here. It assumes those are the interesting lines and the rest is just boring +messages. However, sometimes unrecognized lines do contain something you want +to see. Output from the linker, for example, about an undefined function. +To see all the messages add a "!" to the command: > + + :clist! +< 1 gcc -g -Wall -o prog main.c sub.c ~ + 2 main.c: In function 'main': ~ + 3 main.c:6: too many arguments to function 'do_sub' ~ + 4 main.c: At top level: ~ + 5 main.c:10: parse error before '}' ~ + 6 make: *** [prog] Error 1 ~ + +Vim will highlight the current error. To go back to the previous error, use: +> + :cprevious + +Other commands to move around in the error list: + + :cfirst to first error + :clast to last error + :cc 3 to error nr 3 + + +USING ANOTHER COMPILER + +The name of the program to run when the ":make" command is executed is defined +by the 'makeprg' option. Usually this is set to "make", but Visual C++ users +should set this to "nmake" by executing the following command: > + + :set makeprg=nmake + +You can also include arguments in this option. Special characters need to +be escaped with a backslash. Example: > + + :set makeprg=nmake\ -f\ project.mak + +You can include special Vim keywords in the command specification. The % +character expands to the name of the current file. So if you execute the +command: > + :set makeprg=make\ %:S + +When you are editing main.c, then ":make" executes the following command: > + + make main.c + +This is not too useful, so you will refine the command a little and use the :r +(root) modifier: > + + :set makeprg=make\ %:r:S.o + +Now the command executed is as follows: > + + make main.o + +More about these modifiers here: |filename-modifiers|. + + +OLD ERROR LISTS + +Suppose you ":make" a program. There is a warning message in one file and an +error message in another. You fix the error and use ":make" again to check if +it was really fixed. Now you want to look at the warning message. It doesn't +show up in the last error list, since the file with the warning wasn't +compiled again. You can go back to the previous error list with: > + + :colder + +Then use ":clist" and ":cc {nr}" to jump to the place with the warning. + To go forward to the next error list: > + + :cnewer + +Vim remembers ten error lists. + + +SWITCHING COMPILERS + +You have to tell Vim what format the error messages are that your compiler +produces. This is done with the 'errorformat' option. The syntax of this +option is quite complicated and it can be made to fit almost any compiler. +You can find the explanation here: |errorformat|. + +You might be using various different compilers. Setting the 'makeprg' option, +and especially the 'errorformat' each time is not easy. Vim offers a simple +method for this. For example, to switch to using the Microsoft Visual C++ +compiler: > + + :compiler msvc + +This will find the Vim script for the "msvc" compiler and set the appropriate +options. + You can write your own compiler files. See |write-compiler-plugin|. + + +OUTPUT REDIRECTION + +The ":make" command redirects the output of the executed program to an error +file. How this works depends on various things, such as the 'shell'. If your +":make" command doesn't capture the output, check the 'makeef' and +'shellpipe' options. The 'shellquote' and 'shellxquote' options might also +matter. + +In case you can't get ":make" to redirect the file for you, an alternative is +to compile the program in another window and redirect the output into a file. +Then have Vim read this file with: > + + :cfile {filename} + +Jumping to errors will work like with the ":make" command. + +============================================================================== +*30.2* Indenting C style text + +A program is much easier to understand when the lines have been properly +indented. Vim offers various ways to make this less work. For C or C style +programs like Java or C++, set the 'cindent' option. Vim knows a lot about C +programs and will try very hard to automatically set the indent for you. Set +the 'shiftwidth' option to the amount of spaces you want for a deeper level. +Four spaces will work fine. One ":set" command will do it: > + + :set cindent shiftwidth=4 + +With this option enabled, when you type something such as "if (x)", the next +line will automatically be indented an additional level. + + if (flag) + Automatic indent ---> do_the_work(); + Automatic unindent <-- if (other_flag) { + Automatic indent ---> do_file(); + keep indent do_some_more(); + Automatic unindent <-- } + +When you type something in curly braces ({}), the text will be indented at the +start and unindented at the end. The unindenting will happen after typing the +'}', since Vim can't guess what you are going to type. + +One side effect of automatic indentation is that it helps you catch errors in +your code early. When you type a } to finish a function, only to find that +the automatic indentation gives it more indent than what you expected, there +is probably a } missing. Use the "%" command to find out which { matches the +} you typed. + A missing ) and ; also cause extra indent. Thus if you get more white +space than you would expect, check the preceding lines. + +When you have code that is badly formatted, or you inserted and deleted lines, +you need to re-indent the lines. The "=" operator does this. The simplest +form is: > + + == + +This indents the current line. Like with all operators, there are three ways +to use it. In Visual mode "=" indents the selected lines. A useful text +object is "a{". This selects the current {} block. Thus, to re-indent the +code block the cursor is in: > + + =a{ + +I you have really badly indented code, you can re-indent the whole file with: +> + gg=G + +However, don't do this in files that have been carefully indented manually. +The automatic indenting does a good job, but in some situations you might want +to overrule it. + + +SETTING INDENT STYLE + +Different people have different styles of indentation. By default Vim does a +pretty good job of indenting in a way that 90% of programmers do. There are +different styles, however; so if you want to, you can customize the +indentation style with the 'cinoptions' option. + By default 'cinoptions' is empty and Vim uses the default style. You can +add various items where you want something different. For example, to make +curly braces be placed like this: + + if (flag) ~ + { ~ + i = 8; ~ + j = 0; ~ + } ~ + +Use this command: > + + :set cinoptions+={2 + +There are many of these items. See |cinoptions-values|. + +============================================================================== +*30.3* Automatic indenting + +You don't want to switch on the 'cindent' option manually every time you edit +a C file. This is how you make it work automatically: > + + :filetype indent on + +Actually, this does a lot more than switching on 'cindent' for C files. First +of all, it enables detecting the type of a file. That's the same as what is +used for syntax highlighting. + When the filetype is known, Vim will search for an indent file for this +type of file. The Vim distribution includes a number of these for various +programming languages. This indent file will then prepare for automatic +indenting specifically for this file. + +If you don't like the automatic indenting, you can switch it off again: > + + :filetype indent off + +If you don't like the indenting for one specific type of file, this is how you +avoid it. Create a file with just this one line: > + + :let b:did_indent = 1 + +Now you need to write this in a file with a specific name: + + {directory}/indent/{filetype}.vim + +The {filetype} is the name of the file type, such as "cpp" or "java". You can +see the exact name that Vim detected with this command: > + + :set filetype + +In this file the output is: + + filetype=help ~ + +Thus you would use "help" for {filetype}. + For the {directory} part you need to use your runtime directory. Look at +the output of this command: > + + set runtimepath + +Now use the first item, the name before the first comma. Thus if the output +looks like this: + + runtimepath=~/.vim,/usr/local/share/vim/vim60/runtime,~/.vim/after ~ + +You use "~/.vim" for {directory}. Then the resulting file name is: + + ~/.vim/indent/help.vim ~ + +Instead of switching the indenting off, you could write your own indent file. +How to do that is explained here: |indent-expression|. + +============================================================================== +*30.4* Other indenting + +The most simple form of automatic indenting is with the 'autoindent' option. +It uses the indent from the previous line. A bit smarter is the 'smartindent' +option. This is useful for languages where no indent file is available. +'smartindent' is not as smart as 'cindent', but smarter than 'autoindent'. + With 'smartindent' set, an extra level of indentation is added for each { +and removed for each }. An extra level of indentation will also be added for +any of the words in the 'cinwords' option. Lines that begin with # are +treated specially: all indentation is removed. This is done so that +preprocessor directives will all start in column 1. The indentation is +restored for the next line. + + +CORRECTING INDENTS + +When you are using 'autoindent' or 'smartindent' to get the indent of the +previous line, there will be many times when you need to add or remove one +'shiftwidth' worth of indent. A quick way to do this is using the CTRL-D and +CTRL-T commands in Insert mode. + For example, you are typing a shell script that is supposed to look like +this: + + if test -n a; then ~ + echo a ~ + echo "-------" ~ + fi ~ + +Start off by setting these options: > + + :set autoindent shiftwidth=3 + +You start by typing the first line, <Enter> and the start of the second line: + + if test -n a; then ~ + echo ~ + +Now you see that you need an extra indent. Type CTRL-T. The result: + + if test -n a; then ~ + echo ~ + +The CTRL-T command, in Insert mode, adds one 'shiftwidth' to the indent, no +matter where in the line you are. + You continue typing the second line, <Enter> and the third line. This time +the indent is OK. Then <Enter> and the last line. Now you have this: + + if test -n a; then ~ + echo a ~ + echo "-------" ~ + fi ~ + +To remove the superfluous indent in the last line press CTRL-D. This deletes +one 'shiftwidth' worth of indent, no matter where you are in the line. + When you are in Normal mode, you can use the ">>" and "<<" commands to +shift lines. ">" and "<" are operators, thus you have the usual three ways to +specify the lines you want to indent. A useful combination is: > + + >i{ + +This adds one indent to the current block of lines, inside {}. The { and } +lines themselves are left unmodified. ">a{" includes them. In this example +the cursor is on "printf": + + original text after ">i{" after ">a{" + + if (flag) if (flag) if (flag) ~ + { { { ~ + printf("yes"); printf("yes"); printf("yes"); ~ + flag = 0; flag = 0; flag = 0; ~ + } } } ~ + +============================================================================== +*30.5* Tabs and spaces + +'tabstop' is set to eight by default. Although you can change it, you quickly +run into trouble later. Other programs won't know what tabstop value you +used. They probably use the default value of eight, and your text suddenly +looks very different. Also, most printers use a fixed tabstop value of eight. +Thus it's best to keep 'tabstop' alone. (If you edit a file which was written +with a different tabstop setting, see |25.3| for how to fix that.) + For indenting lines in a program, using a multiple of eight spaces makes +you quickly run into the right border of the window. Using a single space +doesn't provide enough visual difference. Many people prefer to use four +spaces, a good compromise. + Since a <Tab> is eight spaces and you want to use an indent of four spaces, +you can't use a <Tab> character to make your indent. There are two ways to +handle this: + +1. Use a mix of <Tab> and space characters. Since a <Tab> takes the place of + eight spaces, you have fewer characters in your file. Inserting a <Tab> + is quicker than eight spaces. Backspacing works faster as well. + +2. Use spaces only. This avoids the trouble with programs that use a + different tabstop value. + +Fortunately, Vim supports both methods quite well. + + +SPACES AND TABS + +If you are using a combination of tabs and spaces, you just edit normally. +The Vim defaults do a fine job of handling things. + You can make life a little easier by setting the 'softtabstop' option. +This option tells Vim to make the <Tab> key look and feel as if tabs were set +at the value of 'softtabstop', but actually use a combination of tabs and +spaces. + After you execute the following command, every time you press the <Tab> key +the cursor moves to the next 4-column boundary: > + + :set softtabstop=4 + +When you start in the first column and press <Tab>, you get 4 spaces inserted +in your text. The second time, Vim takes out the 4 spaces and puts in a <Tab> +(thus taking you to column 8). Thus Vim uses as many <Tab>s as possible, and +then fills up with spaces. + When backspacing it works the other way around. A <BS> will always delete +the amount specified with 'softtabstop'. Then <Tab>s are used as many as +possible and spaces to fill the gap. + The following shows what happens pressing <Tab> a few times, and then using +<BS>. A "." stands for a space and "------->" for a <Tab>. + + type result ~ + <Tab> .... + <Tab><Tab> -------> + <Tab><Tab><Tab> ------->.... + <Tab><Tab><Tab><BS> -------> + <Tab><Tab><Tab><BS><BS> .... + +An alternative is to use the 'smarttab' option. When it's set, Vim uses +'shiftwidth' for a <Tab> typed in the indent of a line, and a real <Tab> when +typed after the first non-blank character. However, <BS> doesn't work like +with 'softtabstop'. + + +JUST SPACES + +If you want absolutely no tabs in your file, you can set the 'expandtab' +option: > + + :set expandtab + +When this option is set, the <Tab> key inserts a series of spaces. Thus you +get the same amount of white space as if a <Tab> character was inserted, but +there isn't a real <Tab> character in your file. + The backspace key will delete each space by itself. Thus after typing one +<Tab> you have to press the <BS> key up to eight times to undo it. If you are +in the indent, pressing CTRL-D will be a lot quicker. + + +CHANGING TABS IN SPACES (AND BACK) + +Setting 'expandtab' does not affect any existing tabs. In other words, any +tabs in the document remain tabs. If you want to convert tabs to spaces, use +the ":retab" command. Use these commands: > + + :set expandtab + :%retab + +Now Vim will have changed all indents to use spaces instead of tabs. However, +all tabs that come after a non-blank character are kept. If you want these to +be converted as well, add a !: > + + :%retab! + +This is a little bit dangerous, because it can also change tabs inside a +string. To check if these exist, you could use this: > + + /"[^"\t]*\t[^"]*" + +It's recommended not to use hard tabs inside a string. Replace them with +"\t" to avoid trouble. + +The other way around works just as well: > + + :set noexpandtab + :%retab! + +============================================================================== +*30.6* Formatting comments + +One of the great things about Vim is that it understands comments. You can +ask Vim to format a comment and it will do the right thing. + Suppose, for example, that you have the following comment: + + /* ~ + * This is a test ~ + * of the text formatting. ~ + */ ~ + +You then ask Vim to format it by positioning the cursor at the start of the +comment and type: > + + gq]/ + +"gq" is the operator to format text. "]/" is the motion that takes you to the +end of a comment. The result is: + + /* ~ + * This is a test of the text formatting. ~ + */ ~ + +Notice that Vim properly handled the beginning of each line. + An alternative is to select the text that is to be formatted in Visual mode +and type "gq". + +To add a new line to the comment, position the cursor on the middle line and +press "o". The result looks like this: + + /* ~ + * This is a test of the text formatting. ~ + * ~ + */ ~ + +Vim has automatically inserted a star and a space for you. Now you can type +the comment text. When it gets longer than 'textwidth', Vim will break the +line. Again, the star is inserted automatically: + + /* ~ + * This is a test of the text formatting. ~ + * Typing a lot of text here will make Vim ~ + * break ~ + */ ~ + +For this to work some flags must be present in 'formatoptions': + + r insert the star when typing <Enter> in Insert mode + o insert the star when using "o" or "O" in Normal mode + c break comment text according to 'textwidth' + +See |fo-table| for more flags. + + +DEFINING A COMMENT + +The 'comments' option defines what a comment looks like. Vim distinguishes +between a single-line comment and a comment that has a different start, end +and middle part. + Many single-line comments start with a specific character. In C++ // is +used, in Makefiles #, in Vim scripts ". For example, to make Vim understand +C++ comments: > + + :set comments=:// + +The colon separates the flags of an item from the text by which the comment is +recognized. The general form of an item in 'comments' is: + + {flags}:{text} + +The {flags} part can be empty, as in this case. + Several of these items can be concatenated, separated by commas. This +allows recognizing different types of comments at the same time. For example, +let's edit an e-mail message. When replying, the text that others wrote is +preceded with ">" and "!" characters. This command would work: > + + :set comments=n:>,n:! + +There are two items, one for comments starting with ">" and one for comments +that start with "!". Both use the flag "n". This means that these comments +nest. Thus a line starting with ">" may have another comment after the ">". +This allows formatting a message like this: + + > ! Did you see that site? ~ + > ! It looks really great. ~ + > I don't like it. The ~ + > colors are terrible. ~ + What is the URL of that ~ + site? ~ + +Try setting 'textwidth' to a different value, e.g., 80, and format the text by +Visually selecting it and typing "gq". The result is: + + > ! Did you see that site? It looks really great. ~ + > I don't like it. The colors are terrible. ~ + What is the URL of that site? ~ + +You will notice that Vim did not move text from one type of comment to +another. The "I" in the second line would have fit at the end of the first +line, but since that line starts with "> !" and the second line with ">", Vim +knows that this is a different kind of comment. + + +A THREE PART COMMENT + +A C comment starts with "/*", has "*" in the middle and "*/" at the end. The +entry in 'comments' for this looks like this: > + + :set comments=s1:/*,mb:*,ex:*/ + +The start is defined with "s1:/*". The "s" indicates the start of a +three-piece comment. The colon separates the flags from the text by which the +comment is recognized: "/*". There is one flag: "1". This tells Vim that the +middle part has an offset of one space. + The middle part "mb:*" starts with "m", which indicates it is a middle +part. The "b" flag means that a blank must follow the text. Otherwise Vim +would consider text like "*pointer" also to be the middle of a comment. + The end part "ex:*/" has the "e" for identification. The "x" flag has a +special meaning. It means that after Vim automatically inserted a star, +typing / will remove the extra space. + +For more details see |format-comments|. + +============================================================================== + +Next chapter: |usr_31.txt| Exploiting the GUI + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_31.txt b/runtime/doc/usr_31.txt new file mode 100644 index 0000000000..550564e10c --- /dev/null +++ b/runtime/doc/usr_31.txt @@ -0,0 +1,272 @@ +*usr_31.txt* For Vim version 7.4. Last change: 2007 May 08 + + VIM USER MANUAL - by Bram Moolenaar + + Exploiting the GUI + + +Vim works well in a terminal, but the GUI has a few extra items. A file +browser can be used for commands that use a file. A dialog to make a choice +between alternatives. Use keyboard shortcuts to access menu items quickly. + +|31.1| The file browser +|31.2| Confirmation +|31.3| Menu shortcuts +|31.4| Vim window position and size +|31.5| Various + + Next chapter: |usr_32.txt| The undo tree + Previous chapter: |usr_30.txt| Editing programs +Table of contents: |usr_toc.txt| + +============================================================================== +*31.1* The file browser + +When using the File/Open... menu you get a file browser. This makes it easier +to find the file you want to edit. But what if you want to split a window to +edit another file? There is no menu entry for this. You could first use +Window/Split and then File/Open..., but that's more work. + Since you are typing most commands in Vim, opening the file browser with a +typed command is possible as well. To make the split command use the file +browser, prepend "browse": > + + :browse split + +Select a file and then the ":split" command will be executed with it. If you +cancel the file dialog nothing happens, the window isn't split. + You can also specify a file name argument. This is used to tell the file +browser where to start. Example: > + + :browse split /etc + +The file browser will pop up, starting in the directory "/etc". + +The ":browse" command can be prepended to just about any command that opens a +file. + If no directory is specified, Vim will decide where to start the file +browser. By default it uses the same directory as the last time. Thus when +you used ":browse split" and selected a file in "/usr/local/share", the next +time you use a ":browse" it will start in "/usr/local/share" again. + This can be changed with the 'browsedir' option. It can have one of three +values: + + last Use the last directory browsed (default) + buffer Use the same directory as the current buffer + current use the current directory + +For example, when you are in the directory "/usr", editing the file +"/usr/local/share/readme", then the command: > + + :set browsedir=buffer + :browse edit + +Will start the browser in "/usr/local/share". Alternatively: > + + :set browsedir=current + :browse edit + +Will start the browser in "/usr". + + Note: + To avoid using the mouse, most file browsers offer using key presses + to navigate. Since this is different for every system, it is not + explained here. Vim uses a standard browser when possible, your + system documentation should contain an explanation on the keyboard + shortcuts somewhere. + +When you are not using the GUI version, you could use the file explorer window +to select files like in a file browser. However, this doesn't work for the +":browse" command. See |netrw-browse|. + +============================================================================== +*31.2* Confirmation + +Vim protects you from accidentally overwriting a file and other ways to lose +changes. If you do something that might be a bad thing to do, Vim produces an +error message and suggests appending ! if you really want to do it. + To avoid retyping the command with the !, you can make Vim give you a +dialog. You can then press "OK" or "Cancel" to tell Vim what you want. + For example, you are editing a file and made changes to it. You start +editing another file with: > + + :confirm edit foo.txt + +Vim will pop up a dialog that looks something like this: + + +-----------------------------------+ + | | + | ? Save changes to "bar.txt"? | + | | + | YES NO CANCEL | + +-----------------------------------+ + +Now make your choice. If you do want to save the changes, select "YES". If +you want to lose the changes for ever: "NO". If you forgot what you were +doing and want to check what really changed use "CANCEL". You will be back in +the same file, with the changes still there. + +Just like ":browse", the ":confirm" command can be prepended to most commands +that edit another file. They can also be combined: > + + :confirm browse edit + +This will produce a dialog when the current buffer was changed. Then it will +pop up a file browser to select the file to edit. + + Note: + In the dialog you can use the keyboard to select the choice. + Typically the <Tab> key and the cursor keys change the choice. + Pressing <Enter> selects the choice. This depends on the system + though. + +When you are not using the GUI, the ":confirm" command works as well. Instead +of popping up a dialog, Vim will print the message at the bottom of the Vim +window and ask you to press a key to make a choice. > + + :confirm edit main.c +< Save changes to "Untitled"? ~ + [Y]es, (N)o, (C)ancel: ~ + +You can now press the single key for the choice. You don't have to press +<Enter>, unlike other typing on the command line. + +============================================================================== +*31.3* Menu shortcuts + +The keyboard is used for all Vim commands. The menus provide a simple way to +select commands, without knowing what they are called. But you have to move +your hand from the keyboard and grab the mouse. + Menus can often be selected with keys as well. This depends on your +system, but most often it works this way. Use the <Alt> key in combination +with the underlined letter of a menu. For example, <A-w> (<Alt> and w) pops +up the Window menu. + In the Window menu, the "split" item has the p underlined. To select it, +let go of the <Alt> key and press p. + +After the first selection of a menu with the <Alt> key, you can use the cursor +keys to move through the menus. <Right> selects a submenu and <left> closes +it. <Esc> also closes a menu. <Enter> selects a menu item. + +There is a conflict between using the <Alt> key to select menu items, and +using <Alt> key combinations for mappings. The 'winaltkeys' option tells Vim +what it should do with the <Alt> key. + The default value "menu" is the smart choice: If the key combination is a +menu shortcut it can't be mapped. All other keys are available for mapping. + The value "no" doesn't use any <Alt> keys for the menus. Thus you must use +the mouse for the menus, and all <Alt> keys can be mapped. + The value "yes" means that Vim will use any <Alt> keys for the menus. Some +<Alt> key combinations may also do other things than selecting a menu. + +============================================================================== +*31.4* Vim window position and size + +To see the current Vim window position on the screen use: > + + :winpos + +This will only work in the GUI. The output may look like this: + + Window position: X 272, Y 103 ~ + +The position is given in screen pixels. Now you can use the numbers to move +Vim somewhere else. For example, to move it to the left a hundred pixels: > + + :winpos 172 103 +< + Note: + There may be a small offset between the reported position and where + the window moves. This is because of the border around the window. + This is added by the window manager. + +You can use this command in your startup script to position the window at a +specific position. + +The size of the Vim window is computed in characters. Thus this depends on +the size of the font being used. You can see the current size with this +command: > + + :set lines columns + +To change the size set the 'lines' and/or 'columns' options to a new value: > + + :set lines=50 + :set columns=80 + +Obtaining the size works in a terminal just like in the GUI. Setting the size +is not possible in most terminals. + +You can start the X-Windows version of gvim with an argument to specify the +size and position of the window: > + + gvim -geometry {width}x{height}+{x_offset}+{y_offset} + +{width} and {height} are in characters, {x_offset} and {y_offset} are in +pixels. Example: > + + gvim -geometry 80x25+100+300 + +============================================================================== +*31.5* Various + +You can use gvim to edit an e-mail message. In your e-mail program you must +select gvim to be the editor for messages. When you try that, you will +see that it doesn't work: The mail program thinks that editing is finished, +while gvim is still running! + What happens is that gvim disconnects from the shell it was started in. +That is fine when you start gvim in a terminal, so that you can do other work +in that terminal. But when you really want to wait for gvim to finish, you +must prevent it from disconnecting. The "-f" argument does this: > + + gvim -f file.txt + +The "-f" stands for foreground. Now Vim will block the shell it was started +in until you finish editing and exit. + + +DELAYED START OF THE GUI + +On Unix it's possible to first start Vim in a terminal. That's useful if you +do various tasks in the same shell. If you are editing a file and decide you +want to use the GUI after all, you can start it with: > + + :gui + +Vim will open the GUI window and no longer use the terminal. You can continue +using the terminal for something else. The "-f" argument is used here to run +the GUI in the foreground. You can also use ":gui -f". + + +THE GVIM STARTUP FILE + +When gvim starts, it reads the gvimrc file. That's similar to the vimrc file +used when starting Vim. The gvimrc file can be used for settings and commands +that are only to be used when the GUI is going to be started. For example, +you can set the 'lines' option to set a different window size: > + + :set lines=55 + +You don't want to do this in a terminal, since its size is fixed (except for +an xterm that supports resizing). + The gvimrc file is searched for in the same locations as the vimrc file. +Normally its name is "~/.gvimrc" for Unix and "$VIM/_gvimrc" for MS-Windows. +The $MYGVIMRC environment variable is set to it, thus you can use this command +to edit the file, if you have one: > + + :edit $MYGVIMRC +< + If for some reason you don't want to use the normal gvimrc file, you can +specify another one with the "-U" argument: > + + gvim -U thisrc ... + +That allows starting gvim for different kinds of editing. You could set +another font size, for example. + To completely skip reading a gvimrc file: > + + gvim -U NONE ... + +============================================================================== + +Next chapter: |usr_32.txt| The undo tree + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_32.txt b/runtime/doc/usr_32.txt new file mode 100644 index 0000000000..fd58f2d517 --- /dev/null +++ b/runtime/doc/usr_32.txt @@ -0,0 +1,180 @@ +*usr_32.txt* For Vim version 7.4. Last change: 2010 Jul 20 + + VIM USER MANUAL - by Bram Moolenaar + + The undo tree + + +Vim provides multi-level undo. If you undo a few changes and then make a new +change you create a branch in the undo tree. This text is about moving +through the branches. + +|32.1| Undo up to a file write +|32.2| Numbering changes +|32.3| Jumping around the tree +|32.4| Time travelling + + Next chapter: |usr_40.txt| Make new commands + Previous chapter: |usr_31.txt| Exploiting the GUI +Table of contents: |usr_toc.txt| + +============================================================================== +*32.1* Undo up to a file write + +Sometimes you make several changes, and then discover you want to go back to +when you have last written the file. You can do that with this command: > + + :earlier 1f + +The "f" stands for "file" here. + +You can repeat this command to go further back in the past. Or use a count +different from 1 to go back faster. + +If you go back too far, go forward again with: > + + :later 1f + +Note that these commands really work in time sequence. This matters if you +made changes after undoing some changes. It's explained in the next section. + +Also note that we are talking about text writes here. For writing the undo +information in a file see |undo-persistence|. + +============================================================================== +*32.2* Numbering changes + +In section |02.5| we only discussed one line of undo/redo. But it is also +possible to branch off. This happens when you undo a few changes and then +make a new change. The new changes become a branch in the undo tree. + +Let's start with the text "one". The first change to make is to append +" too". And then move to the first 'o' and change it into 'w'. We then have +two changes, numbered 1 and 2, and three states of the text: + + one ~ + | + change 1 + | + one too ~ + | + change 2 + | + one two ~ + +If we now undo one change, back to "one too", and change "one" to "me" we +create a branch in the undo tree: + + one ~ + | + change 1 + | + one too ~ + / \ + change 2 change 3 + | | + one two me too ~ + +You can now use the |u| command to undo. If you do this twice you get to +"one". Use |CTRL-R| to redo, and you will go to "one too". One more |CTRL-R| +takes you to "me too". Thus undo and redo go up and down in the tree, using +the branch that was last used. + +What matters here is the order in which the changes are made. Undo and redo +are not considered changes in this context. After each change you have a new +state of the text. + +Note that only the changes are numbered, the text shown in the tree above has +no identifier. They are mostly referred to by the number of the change above +it. But sometimes by the number of one of the changes below it, especially +when moving up in the tree, so that you know which change was just undone. + +============================================================================== +*32.3* Jumping around the tree + +So how do you get to "one two" now? You can use this command: > + + :undo 2 + +The text is now "one two", you are below change 2. You can use the |:undo| +command to jump to below any change in the tree. + +Now make another change: change "one" to "not": + + one ~ + | + change 1 + | + one too ~ + / \ + change 2 change 3 + | | + one two me too ~ + | + change 4 + | + not two ~ + +Now you change your mind and want to go back to "me too". Use the |g-| +command. This moves back in time. Thus it doesn't walk the tree upwards or +downwards, but goes to the change made before. + +You can repeat |g-| and you will see the text change: + me too ~ + one two ~ + one too ~ + one ~ + +Use |g+| to move forward in time: + one ~ + one too ~ + one two ~ + me too ~ + not two ~ + +Using |:undo| is useful if you know what change you want to jump to. |g-| and +|g+| are useful if you don't know exactly what the change number is. + +You can type a count before |g-| and |g+| to repeat them. + +============================================================================== +*32.4* Time travelling + +When you have been working on text for a while the tree grows to become big. +Then you may want to go to the text of some minutes ago. + +To see what branches there are in the undo tree use this command: > + + :undolist +< number changes time ~ + 3 2 16 seconds ago + 4 3 5 seconds ago + +Here you can see the number of the leaves in each branch and when the change +was made. Assuming we are below change 4, at "not two", you can go back ten +seconds with this command: > + + :earlier 10s + +Depending on how much time you took for the changes you end up at a certain +position in the tree. The |:earlier| command argument can be "m" for minutes, +"h" for hours and "d" for days. To go all the way back use a big number: > + + :earlier 100d + +To travel forward in time again use the |:later| command: > + + :later 1m + +The arguments are "s", "m" and "h", just like with |:earlier|. + +If you want even more details, or want to manipulate the information, you can +use the |undotree()| function. To see what it returns: > + + :echo undotree() + +============================================================================== + +Next chapter: |usr_40.txt| Make new commands + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_40.txt b/runtime/doc/usr_40.txt new file mode 100644 index 0000000000..9d706481df --- /dev/null +++ b/runtime/doc/usr_40.txt @@ -0,0 +1,657 @@ +*usr_40.txt* For Vim version 7.4. Last change: 2013 Aug 05 + + VIM USER MANUAL - by Bram Moolenaar + + Make new commands + + +Vim is an extensible editor. You can take a sequence of commands you use +often and turn it into a new command. Or redefine an existing command. +Autocommands make it possible to execute commands automatically. + +|40.1| Key mapping +|40.2| Defining command-line commands +|40.3| Autocommands + + Next chapter: |usr_41.txt| Write a Vim script + Previous chapter: |usr_32.txt| The undo tree +Table of contents: |usr_toc.txt| + +============================================================================== +*40.1* Key mapping + +A simple mapping was explained in section |05.3|. The principle is that one +sequence of key strokes is translated into another sequence of key strokes. +This is a simple, yet powerful mechanism. + The simplest form is that one key is mapped to a sequence of keys. Since +the function keys, except <F1>, have no predefined meaning in Vim, these are +good choices to map. Example: > + + :map <F2> GoDate: <Esc>:read !date<CR>kJ + +This shows how three modes are used. After going to the last line with "G", +the "o" command opens a new line and starts Insert mode. The text "Date: " is +inserted and <Esc> takes you out of insert mode. + Notice the use of special keys inside <>. This is called angle bracket +notation. You type these as separate characters, not by pressing the key +itself. This makes the mappings better readable and you can copy and paste +the text without problems. + The ":" character takes Vim to the command line. The ":read !date" command +reads the output from the "date" command and appends it below the current +line. The <CR> is required to execute the ":read" command. + At this point of execution the text looks like this: + + Date: ~ + Fri Jun 15 12:54:34 CEST 2001 ~ + +Now "kJ" moves the cursor up and joins the lines together. + To decide which key or keys you use for mapping, see |map-which-keys|. + + +MAPPING AND MODES + +The ":map" command defines remapping for keys in Normal mode. You can also +define mappings for other modes. For example, ":imap" applies to Insert mode. +You can use it to insert a date below the cursor: > + + :imap <F2> <CR>Date: <Esc>:read !date<CR>kJ + +It looks a lot like the mapping for <F2> in Normal mode, only the start is +different. The <F2> mapping for Normal mode is still there. Thus you can map +the same key differently for each mode. + Notice that, although this mapping starts in Insert mode, it ends in Normal +mode. If you want it to continue in Insert mode, append an "a" to the +mapping. + +Here is an overview of map commands and in which mode they work: + + :map Normal, Visual and Operator-pending + :vmap Visual + :nmap Normal + :omap Operator-pending + :map! Insert and Command-line + :imap Insert + :cmap Command-line + +Operator-pending mode is when you typed an operator character, such as "d" or +"y", and you are expected to type the motion command or a text object. Thus +when you type "dw", the "w" is entered in operator-pending mode. + +Suppose that you want to define <F7> so that the command d<F7> deletes a C +program block (text enclosed in curly braces, {}). Similarly y<F7> would yank +the program block into the unnamed register. Therefore, what you need to do +is to define <F7> to select the current program block. You can do this with +the following command: > + + :omap <F7> a{ + +This causes <F7> to perform a select block "a{" in operator-pending mode, just +like you typed it. This mapping is useful if typing a { on your keyboard is a +bit difficult. + + +LISTING MAPPINGS + +To see the currently defined mappings, use ":map" without arguments. Or one +of the variants that include the mode in which they work. The output could +look like this: + + _g :call MyGrep(1)<CR> ~ + v <F2> :s/^/> /<CR>:noh<CR>`` ~ + n <F2> :.,$s/^/> /<CR>:noh<CR>`` ~ + <xHome> <Home> + <xEnd> <End> + + +The first column of the list shows in which mode the mapping is effective. +This is "n" for Normal mode, "i" for Insert mode, etc. A blank is used for a +mapping defined with ":map", thus effective in both Normal and Visual mode. + One useful purpose of listing the mapping is to check if special keys in <> +form have been recognized (this only works when color is supported). For +example, when <Esc> is displayed in color, it stands for the escape character. +When it has the same color as the other text, it is five characters. + + +REMAPPING + +The result of a mapping is inspected for other mappings in it. For example, +the mappings for <F2> above could be shortened to: > + + :map <F2> G<F3> + :imap <F2> <Esc><F3> + :map <F3> oDate: <Esc>:read !date<CR>kJ + +For Normal mode <F2> is mapped to go to the last line, and then behave like +<F3> was pressed. In Insert mode <F2> stops Insert mode with <Esc> and then +also uses <F3>. Then <F3> is mapped to do the actual work. + +Suppose you hardly ever use Ex mode, and want to use the "Q" command to format +text (this was so in old versions of Vim). This mapping will do it: > + + :map Q gq + +But, in rare cases you need to use Ex mode anyway. Let's map "gQ" to Q, so +that you can still go to Ex mode: > + + :map gQ Q + +What happens now is that when you type "gQ" it is mapped to "Q". So far so +good. But then "Q" is mapped to "gq", thus typing "gQ" results in "gq", and +you don't get to Ex mode at all. + To avoid keys to be mapped again, use the ":noremap" command: > + + :noremap gQ Q + +Now Vim knows that the "Q" is not to be inspected for mappings that apply to +it. There is a similar command for every mode: + + :noremap Normal, Visual and Operator-pending + :vnoremap Visual + :nnoremap Normal + :onoremap Operator-pending + :noremap! Insert and Command-line + :inoremap Insert + :cnoremap Command-line + + +RECURSIVE MAPPING + +When a mapping triggers itself, it will run forever. This can be used to +repeat an action an unlimited number of times. + For example, you have a list of files that contain a version number in the +first line. You edit these files with "vim *.txt". You are now editing the +first file. Define this mapping: > + + :map ,, :s/5.1/5.2/<CR>:wnext<CR>,, + +Now you type ",,". This triggers the mapping. It replaces "5.1" with "5.2" +in the first line. Then it does a ":wnext" to write the file and edit the +next one. The mapping ends in ",,". This triggers the same mapping again, +thus doing the substitution, etc. + This continues until there is an error. In this case it could be a file +where the substitute command doesn't find a match for "5.1". You can then +make a change to insert "5.1" and continue by typing ",," again. Or the +":wnext" fails, because you are in the last file in the list. + When a mapping runs into an error halfway, the rest of the mapping is +discarded. CTRL-C interrupts the mapping (CTRL-Break on MS-Windows). + + +DELETE A MAPPING + +To remove a mapping use the ":unmap" command. Again, the mode the unmapping +applies to depends on the command used: + + :unmap Normal, Visual and Operator-pending + :vunmap Visual + :nunmap Normal + :ounmap Operator-pending + :unmap! Insert and Command-line + :iunmap Insert + :cunmap Command-line + +There is a trick to define a mapping that works in Normal and Operator-pending +mode, but not in Visual mode. First define it for all three modes, then +delete it for Visual mode: > + + :map <C-A> /---><CR> + :vunmap <C-A> + +Notice that the five characters "<C-A>" stand for the single key CTRL-A. + +To remove all mappings use the |:mapclear| command. You can guess the +variations for different modes by now. Be careful with this command, it can't +be undone. + + +SPECIAL CHARACTERS + +The ":map" command can be followed by another command. A | character +separates the two commands. This also means that a | character can't be used +inside a map command. To include one, use <Bar> (five characters). Example: +> + :map <F8> :write <Bar> !checkin %:S<CR> + +The same problem applies to the ":unmap" command, with the addition that you +have to watch out for trailing white space. These two commands are different: +> + :unmap a | unmap b + :unmap a| unmap b + +The first command tries to unmap "a ", with a trailing space. + +When using a space inside a mapping, use <Space> (seven characters): > + + :map <Space> W + +This makes the spacebar move a blank-separated word forward. + +It is not possible to put a comment directly after a mapping, because the " +character is considered to be part of the mapping. You can use |", this +starts a new, empty command with a comment. Example: > + + :map <Space> W| " Use spacebar to move forward a word + + +MAPPINGS AND ABBREVIATIONS + +Abbreviations are a lot like Insert mode mappings. The arguments are handled +in the same way. The main difference is the way they are triggered. An +abbreviation is triggered by typing a non-word character after the word. A +mapping is triggered when typing the last character. + Another difference is that the characters you type for an abbreviation are +inserted in the text while you type them. When the abbreviation is triggered +these characters are deleted and replaced by what the abbreviation produces. +When typing the characters for a mapping, nothing is inserted until you type +the last character that triggers it. If the 'showcmd' option is set, the +typed characters are displayed in the last line of the Vim window. + An exception is when a mapping is ambiguous. Suppose you have done two +mappings: > + + :imap aa foo + :imap aaa bar + +Now, when you type "aa", Vim doesn't know if it should apply the first or the +second mapping. It waits for another character to be typed. If it is an "a", +the second mapping is applied and results in "bar". If it is a space, for +example, the first mapping is applied, resulting in "foo", and then the space +is inserted. + + +ADDITIONALLY... + +The <script> keyword can be used to make a mapping local to a script. See +|:map-<script>|. + +The <buffer> keyword can be used to make a mapping local to a specific buffer. +See |:map-<buffer>| + +The <unique> keyword can be used to make defining a new mapping fail when it +already exists. Otherwise a new mapping simply overwrites the old one. See +|:map-<unique>|. + +To make a key do nothing, map it to <Nop> (five characters). This will make +the <F7> key do nothing at all: > + + :map <F7> <Nop>| map! <F7> <Nop> + +There must be no space after <Nop>. + +============================================================================== +*40.2* Defining command-line commands + +The Vim editor enables you to define your own commands. You execute these +commands just like any other Command-line mode command. + To define a command, use the ":command" command, as follows: > + + :command DeleteFirst 1delete + +Now when you execute the command ":DeleteFirst" Vim executes ":1delete", which +deletes the first line. + + Note: + User-defined commands must start with a capital letter. You cannot + use ":X", ":Next" and ":Print". The underscore cannot be used! You + can use digits, but this is discouraged. + +To list the user-defined commands, execute the following command: > + + :command + +Just like with the builtin commands, the user defined commands can be +abbreviated. You need to type just enough to distinguish the command from +another. Command line completion can be used to get the full name. + + +NUMBER OF ARGUMENTS + +User-defined commands can take a series of arguments. The number of arguments +must be specified by the -nargs option. For instance, the example +:DeleteFirst command takes no arguments, so you could have defined it as +follows: > + + :command -nargs=0 DeleteFirst 1delete + +However, because zero arguments is the default, you do not need to add +"-nargs=0". The other values of -nargs are as follows: + + -nargs=0 No arguments + -nargs=1 One argument + -nargs=* Any number of arguments + -nargs=? Zero or one argument + -nargs=+ One or more arguments + + +USING THE ARGUMENTS + +Inside the command definition, the arguments are represented by the +<args> keyword. For example: > + + :command -nargs=+ Say :echo "<args>" + +Now when you type > + + :Say Hello World + +Vim echoes "Hello World". However, if you add a double quote, it won't work. +For example: > + + :Say he said "hello" + +To get special characters turned into a string, properly escaped to use as an +expression, use "<q-args>": > + + :command -nargs=+ Say :echo <q-args> + +Now the above ":Say" command will result in this to be executed: > + + :echo "he said \"hello\"" + +The <f-args> keyword contains the same information as the <args> keyword, +except in a format suitable for use as function call arguments. For example: +> + :command -nargs=* DoIt :call AFunction(<f-args>) + :DoIt a b c + +Executes the following command: > + + :call AFunction("a", "b", "c") + + +LINE RANGE + +Some commands take a range as their argument. To tell Vim that you are +defining such a command, you need to specify a -range option. The values for +this option are as follows: + + -range Range is allowed; default is the current line. + -range=% Range is allowed; default is the whole file. + -range={count} Range is allowed; the last number in it is used as a + single number whose default is {count}. + +When a range is specified, the keywords <line1> and <line2> get the values of +the first and last line in the range. For example, the following command +defines the SaveIt command, which writes out the specified range to the file +"save_file": > + + :command -range=% SaveIt :<line1>,<line2>write! save_file + + +OTHER OPTIONS + +Some of the other options and keywords are as follows: + + -count={number} The command can take a count whose default is + {number}. The resulting count can be used + through the <count> keyword. + -bang You can use a !. If present, using <bang> will + result in a !. + -register You can specify a register. (The default is + the unnamed register.) + The register specification is available as + <reg> (a.k.a. <register>). + -complete={type} Type of command-line completion used. See + |:command-completion| for the list of possible + values. + -bar The command can be followed by | and another + command, or " and a comment. + -buffer The command is only available for the current + buffer. + +Finally, you have the <lt> keyword. It stands for the character <. Use this +to escape the special meaning of the <> items mentioned. + + +REDEFINING AND DELETING + +To redefine the same command use the ! argument: > + + :command -nargs=+ Say :echo "<args>" + :command! -nargs=+ Say :echo <q-args> + +To delete a user command use ":delcommand". It takes a single argument, which +is the name of the command. Example: > + + :delcommand SaveIt + +To delete all the user commands: > + + :comclear + +Careful, this can't be undone! + +More details about all this in the reference manual: |user-commands|. + +============================================================================== +*40.3* Autocommands + +An autocommand is a command that is executed automatically in response to some +event, such as a file being read or written or a buffer change. Through the +use of autocommands you can train Vim to edit compressed files, for example. +That is used in the |gzip| plugin. + Autocommands are very powerful. Use them with care and they will help you +avoid typing many commands. Use them carelessly and they will cause a lot of +trouble. + +Suppose you want to replace a datestamp on the end of a file every time it is +written. First you define a function: > + + :function DateInsert() + : $delete + : read !date + :endfunction + +You want this function to be called each time, just before a buffer is written +to a file. This will make that happen: > + + :autocmd BufWritePre * call DateInsert() + +"BufWritePre" is the event for which this autocommand is triggered: Just +before (pre) writing a buffer to a file. The "*" is a pattern to match with +the file name. In this case it matches all files. + With this command enabled, when you do a ":write", Vim checks for any +matching BufWritePre autocommands and executes them, and then it +performs the ":write". + The general form of the :autocmd command is as follows: > + + :autocmd [group] {events} {file_pattern} [nested] {command} + +The [group] name is optional. It is used in managing and calling the commands +(more on this later). The {events} parameter is a list of events (comma +separated) that trigger the command. + {file_pattern} is a filename, usually with wildcards. For example, using +"*.txt" makes the autocommand be used for all files whose name end in ".txt". +The optional [nested] flag allows for nesting of autocommands (see below), and +finally, {command} is the command to be executed. + + +EVENTS + +One of the most useful events is BufReadPost. It is triggered after a new +file is being edited. It is commonly used to set option values. For example, +you know that "*.gsm" files are GNU assembly language. To get the syntax file +right, define this autocommand: > + + :autocmd BufReadPost *.gsm set filetype=asm + +If Vim is able to detect the type of file, it will set the 'filetype' option +for you. This triggers the Filetype event. Use this to do something when a +certain type of file is edited. For example, to load a list of abbreviations +for text files: > + + :autocmd Filetype text source ~/.vim/abbrevs.vim + +When starting to edit a new file, you could make Vim insert a skeleton: > + + :autocmd BufNewFile *.[ch] 0read ~/skeletons/skel.c + +See |autocmd-events| for a complete list of events. + + +PATTERNS + +The {file_pattern} argument can actually be a comma-separated list of file +patterns. For example: "*.c,*.h" matches files ending in ".c" and ".h". + The usual file wildcards can be used. Here is a summary of the most often +used ones: + + * Match any character any number of times + ? Match any character once + [abc] Match the character a, b or c + . Matches a dot + a{b,c} Matches "ab" and "ac" + +When the pattern includes a slash (/) Vim will compare directory names. +Without the slash only the last part of a file name is used. For example, +"*.txt" matches "/home/biep/readme.txt". The pattern "/home/biep/*" would +also match it. But "home/foo/*.txt" wouldn't. + When including a slash, Vim matches the pattern against both the full path +of the file ("/home/biep/readme.txt") and the relative path (e.g., +"biep/readme.txt"). + + Note: + When working on a system that uses a backslash as file separator, such + as MS-Windows, you still use forward slashes in autocommands. This + makes it easier to write the pattern, since a backslash has a special + meaning. It also makes the autocommands portable. + + +DELETING + +To delete an autocommand, use the same command as what it was defined with, +but leave out the {command} at the end and use a !. Example: > + + :autocmd! FileWritePre * + +This will delete all autocommands for the "FileWritePre" event that use the +"*" pattern. + + +LISTING + +To list all the currently defined autocommands, use this: > + + :autocmd + +The list can be very long, especially when filetype detection is used. To +list only part of the commands, specify the group, event and/or pattern. For +example, to list all BufNewFile autocommands: > + + :autocmd BufNewFile + +To list all autocommands for the pattern "*.c": > + + :autocmd * *.c + +Using "*" for the event will list all the events. To list all autocommands +for the cprograms group: > + + :autocmd cprograms + + +GROUPS + +The {group} item, used when defining an autocommand, groups related autocommands +together. This can be used to delete all the autocommands in a certain group, +for example. + When defining several autocommands for a certain group, use the ":augroup" +command. For example, let's define autocommands for C programs: > + + :augroup cprograms + : autocmd BufReadPost *.c,*.h :set sw=4 sts=4 + : autocmd BufReadPost *.cpp :set sw=3 sts=3 + :augroup END + +This will do the same as: > + + :autocmd cprograms BufReadPost *.c,*.h :set sw=4 sts=4 + :autocmd cprograms BufReadPost *.cpp :set sw=3 sts=3 + +To delete all autocommands in the "cprograms" group: > + + :autocmd! cprograms + + +NESTING + +Generally, commands executed as the result of an autocommand event will not +trigger any new events. If you read a file in response to a FileChangedShell +event, it will not trigger the autocommands that would set the syntax, for +example. To make the events triggered, add the "nested" argument: > + + :autocmd FileChangedShell * nested edit + + +EXECUTING AUTOCOMMANDS + +It is possible to trigger an autocommand by pretending an event has occurred. +This is useful to have one autocommand trigger another one. Example: > + + :autocmd BufReadPost *.new execute "doautocmd BufReadPost " . expand("<afile>:r") + +This defines an autocommand that is triggered when a new file has been edited. +The file name must end in ".new". The ":execute" command uses expression +evaluation to form a new command and execute it. When editing the file +"tryout.c.new" the executed command will be: > + + :doautocmd BufReadPost tryout.c + +The expand() function takes the "<afile>" argument, which stands for the file +name the autocommand was executed for, and takes the root of the file name +with ":r". + +":doautocmd" executes on the current buffer. The ":doautoall" command works +like "doautocmd" except it executes on all the buffers. + + +USING NORMAL MODE COMMANDS + +The commands executed by an autocommand are Command-line commands. If you +want to use a Normal mode command, the ":normal" command can be used. +Example: > + + :autocmd BufReadPost *.log normal G + +This will make the cursor jump to the last line of *.log files when you start +to edit it. + Using the ":normal" command is a bit tricky. First of all, make sure its +argument is a complete command, including all the arguments. When you use "i" +to go to Insert mode, there must also be a <Esc> to leave Insert mode again. +If you use a "/" to start a search pattern, there must be a <CR> to execute +it. + The ":normal" command uses all the text after it as commands. Thus there +can be no | and another command following. To work around this, put the +":normal" command inside an ":execute" command. This also makes it possible +to pass unprintable characters in a convenient way. Example: > + + :autocmd BufReadPost *.chg execute "normal ONew entry:\<Esc>" | + \ 1read !date + +This also shows the use of a backslash to break a long command into more +lines. This can be used in Vim scripts (not at the command line). + +When you want the autocommand do something complicated, which involves jumping +around in the file and then returning to the original position, you may want +to restore the view on the file. See |restore-position| for an example. + + +IGNORING EVENTS + +At times, you will not want to trigger an autocommand. The 'eventignore' +option contains a list of events that will be totally ignored. For example, +the following causes events for entering and leaving a window to be ignored: > + + :set eventignore=WinEnter,WinLeave + +To ignore all events, use the following command: > + + :set eventignore=all + +To set it back to the normal behavior, make 'eventignore' empty: > + + :set eventignore= + +============================================================================== + +Next chapter: |usr_41.txt| Write a Vim script + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt new file mode 100644 index 0000000000..f30b79a2ea --- /dev/null +++ b/runtime/doc/usr_41.txt @@ -0,0 +1,2475 @@ +*usr_41.txt* For Vim version 7.4. Last change: 2014 May 28 + + VIM USER MANUAL - by Bram Moolenaar + + Write a Vim script + + +The Vim script language is used for the startup vimrc file, syntax files, and +many other things. This chapter explains the items that can be used in a Vim +script. There are a lot of them, thus this is a long chapter. + +|41.1| Introduction +|41.2| Variables +|41.3| Expressions +|41.4| Conditionals +|41.5| Executing an expression +|41.6| Using functions +|41.7| Defining a function +|41.8| Lists and Dictionaries +|41.9| Exceptions +|41.10| Various remarks +|41.11| Writing a plugin +|41.12| Writing a filetype plugin +|41.13| Writing a compiler plugin +|41.14| Writing a plugin that loads quickly +|41.15| Writing library scripts +|41.16| Distributing Vim scripts + + Next chapter: |usr_42.txt| Add new menus + Previous chapter: |usr_40.txt| Make new commands +Table of contents: |usr_toc.txt| + +============================================================================== +*41.1* Introduction *vim-script-intro* *script* + +Your first experience with Vim scripts is the vimrc file. Vim reads it when +it starts up and executes the commands. You can set options to values you +prefer. And you can use any colon command in it (commands that start with a +":"; these are sometimes referred to as Ex commands or command-line commands). + Syntax files are also Vim scripts. As are files that set options for a +specific file type. A complicated macro can be defined by a separate Vim +script file. You can think of other uses yourself. + +Let's start with a simple example: > + + :let i = 1 + :while i < 5 + : echo "count is" i + : let i += 1 + :endwhile +< + Note: + The ":" characters are not really needed here. You only need to use + them when you type a command. In a Vim script file they can be left + out. We will use them here anyway to make clear these are colon + commands and make them stand out from Normal mode commands. + Note: + You can try out the examples by yanking the lines from the text here + and executing them with :@" + +The output of the example code is: + + count is 1 ~ + count is 2 ~ + count is 3 ~ + count is 4 ~ + +In the first line the ":let" command assigns a value to a variable. The +generic form is: > + + :let {variable} = {expression} + +In this case the variable name is "i" and the expression is a simple value, +the number one. + The ":while" command starts a loop. The generic form is: > + + :while {condition} + : {statements} + :endwhile + +The statements until the matching ":endwhile" are executed for as long as the +condition is true. The condition used here is the expression "i < 5". This +is true when the variable i is smaller than five. + Note: + If you happen to write a while loop that keeps on running, you can + interrupt it by pressing CTRL-C (CTRL-Break on MS-Windows). + +The ":echo" command prints its arguments. In this case the string "count is" +and the value of the variable i. Since i is one, this will print: + + count is 1 ~ + +Then there is the ":let i += 1" command. This does the same thing as +":let i = i + 1". This adds one to the variable i and assigns the new value +to the same variable. + +The example was given to explain the commands, but would you really want to +make such a loop it can be written much more compact: > + + :for i in range(1, 4) + : echo "count is" i + :endfor + +We won't explain how |:for| and |range()| work until later. Follow the links +if you are impatient. + + +THREE KINDS OF NUMBERS + +Numbers can be decimal, hexadecimal or octal. A hexadecimal number starts +with "0x" or "0X". For example "0x1f" is decimal 31. An octal number starts +with a zero. "017" is decimal 15. Careful: don't put a zero before a decimal +number, it will be interpreted as an octal number! + The ":echo" command always prints decimal numbers. Example: > + + :echo 0x7f 036 +< 127 30 ~ + +A number is made negative with a minus sign. This also works for hexadecimal +and octal numbers. A minus sign is also used for subtraction. Compare this +with the previous example: > + + :echo 0x7f -036 +< 97 ~ + +White space in an expression is ignored. However, it's recommended to use it +for separating items, to make the expression easier to read. For example, to +avoid the confusion with a negative number above, put a space between the +minus sign and the following number: > + + :echo 0x7f - 036 + +============================================================================== +*41.2* Variables + +A variable name consists of ASCII letters, digits and the underscore. It +cannot start with a digit. Valid variable names are: + + counter + _aap3 + very_long_variable_name_with_underscores + FuncLength + LENGTH + +Invalid names are "foo+bar" and "6var". + These variables are global. To see a list of currently defined variables +use this command: > + + :let + +You can use global variables everywhere. This also means that when the +variable "count" is used in one script file, it might also be used in another +file. This leads to confusion at least, and real problems at worst. To avoid +this, you can use a variable local to a script file by prepending "s:". For +example, one script contains this code: > + + :let s:count = 1 + :while s:count < 5 + : source other.vim + : let s:count += 1 + :endwhile + +Since "s:count" is local to this script, you can be sure that sourcing the +"other.vim" script will not change this variable. If "other.vim" also uses an +"s:count" variable, it will be a different copy, local to that script. More +about script-local variables here: |script-variable|. + +There are more kinds of variables, see |internal-variables|. The most often +used ones are: + + b:name variable local to a buffer + w:name variable local to a window + g:name global variable (also in a function) + v:name variable predefined by Vim + + +DELETING VARIABLES + +Variables take up memory and show up in the output of the ":let" command. To +delete a variable use the ":unlet" command. Example: > + + :unlet s:count + +This deletes the script-local variable "s:count" to free up the memory it +uses. If you are not sure if the variable exists, and don't want an error +message when it doesn't, append !: > + + :unlet! s:count + +When a script finishes, the local variables used there will not be +automatically freed. The next time the script executes, it can still use the +old value. Example: > + + :if !exists("s:call_count") + : let s:call_count = 0 + :endif + :let s:call_count = s:call_count + 1 + :echo "called" s:call_count "times" + +The "exists()" function checks if a variable has already been defined. Its +argument is the name of the variable you want to check. Not the variable +itself! If you would do this: > + + :if !exists(s:call_count) + +Then the value of s:call_count will be used as the name of the variable that +exists() checks. That's not what you want. + The exclamation mark ! negates a value. When the value was true, it +becomes false. When it was false, it becomes true. You can read it as "not". +Thus "if !exists()" can be read as "if not exists()". + What Vim calls true is anything that is not zero. Zero is false. + Note: + Vim automatically converts a string to a number when it is looking for + a number. When using a string that doesn't start with a digit the + resulting number is zero. Thus look out for this: > + :if "true" +< The "true" will be interpreted as a zero, thus as false! + + +STRING VARIABLES AND CONSTANTS + +So far only numbers were used for the variable value. Strings can be used as +well. Numbers and strings are the basic types of variables that Vim supports. +The type is dynamic, it is set each time when assigning a value to the +variable with ":let". More about types in |41.8|. + To assign a string value to a variable, you need to use a string constant. +There are two types of these. First the string in double quotes: > + + :let name = "peter" + :echo name +< peter ~ + +If you want to include a double quote inside the string, put a backslash in +front of it: > + + :let name = "\"peter\"" + :echo name +< "peter" ~ + +To avoid the need for a backslash, you can use a string in single quotes: > + + :let name = '"peter"' + :echo name +< "peter" ~ + +Inside a single-quote string all the characters are as they are. Only the +single quote itself is special: you need to use two to get one. A backslash +is taken literally, thus you can't use it to change the meaning of the +character after it. + In double-quote strings it is possible to use special characters. Here are +a few useful ones: + + \t <Tab> + \n <NL>, line break + \r <CR>, <Enter> + \e <Esc> + \b <BS>, backspace + \" " + \\ \, backslash + \<Esc> <Esc> + \<C-W> CTRL-W + +The last two are just examples. The "\<name>" form can be used to include +the special key "name". + See |expr-quote| for the full list of special items in a string. + +============================================================================== +*41.3* Expressions + +Vim has a rich, yet simple way to handle expressions. You can read the +definition here: |expression-syntax|. Here we will show the most common +items. + The numbers, strings and variables mentioned above are expressions by +themselves. Thus everywhere an expression is expected, you can use a number, +string or variable. Other basic items in an expression are: + + $NAME environment variable + &name option + @r register + +Examples: > + + :echo "The value of 'tabstop' is" &ts + :echo "Your home directory is" $HOME + :if @a > 5 + +The &name form can be used to save an option value, set it to a new value, +do something and restore the old value. Example: > + + :let save_ic = &ic + :set noic + :/The Start/,$delete + :let &ic = save_ic + +This makes sure the "The Start" pattern is used with the 'ignorecase' option +off. Still, it keeps the value that the user had set. (Another way to do +this would be to add "\C" to the pattern, see |/\C|.) + + +MATHEMATICS + +It becomes more interesting if we combine these basic items. Let's start with +mathematics on numbers: + + a + b add + a - b subtract + a * b multiply + a / b divide + a % b modulo + +The usual precedence is used. Example: > + + :echo 10 + 5 * 2 +< 20 ~ + +Grouping is done with parentheses. No surprises here. Example: > + + :echo (10 + 5) * 2 +< 30 ~ + +Strings can be concatenated with ".". Example: > + + :echo "foo" . "bar" +< foobar ~ + +When the ":echo" command gets multiple arguments, it separates them with a +space. In the example the argument is a single expression, thus no space is +inserted. + +Borrowed from the C language is the conditional expression: + + a ? b : c + +If "a" evaluates to true "b" is used, otherwise "c" is used. Example: > + + :let i = 4 + :echo i > 5 ? "i is big" : "i is small" +< i is small ~ + +The three parts of the constructs are always evaluated first, thus you could +see it work as: + + (a) ? (b) : (c) + +============================================================================== +*41.4* Conditionals + +The ":if" commands executes the following statements, until the matching +":endif", only when a condition is met. The generic form is: + + :if {condition} + {statements} + :endif + +Only when the expression {condition} evaluates to true (non-zero) will the +{statements} be executed. These must still be valid commands. If they +contain garbage, Vim won't be able to find the ":endif". + You can also use ":else". The generic form for this is: + + :if {condition} + {statements} + :else + {statements} + :endif + +The second {statements} is only executed if the first one isn't. + Finally, there is ":elseif": + + :if {condition} + {statements} + :elseif {condition} + {statements} + :endif + +This works just like using ":else" and then "if", but without the need for an +extra ":endif". + A useful example for your vimrc file is checking the 'term' option and +doing something depending upon its value: > + + :if &term == "xterm" + : " Do stuff for xterm + :elseif &term == "vt100" + : " Do stuff for a vt100 terminal + :else + : " Do something for other terminals + :endif + + +LOGIC OPERATIONS + +We already used some of them in the examples. These are the most often used +ones: + + a == b equal to + a != b not equal to + a > b greater than + a >= b greater than or equal to + a < b less than + a <= b less than or equal to + +The result is one if the condition is met and zero otherwise. An example: > + + :if v:version >= 700 + : echo "congratulations" + :else + : echo "you are using an old version, upgrade!" + :endif + +Here "v:version" is a variable defined by Vim, which has the value of the Vim +version. 600 is for version 6.0. Version 6.1 has the value 601. This is +very useful to write a script that works with multiple versions of Vim. +|v:version| + +The logic operators work both for numbers and strings. When comparing two +strings, the mathematical difference is used. This compares byte values, +which may not be right for some languages. + When comparing a string with a number, the string is first converted to a +number. This is a bit tricky, because when a string doesn't look like a +number, the number zero is used. Example: > + + :if 0 == "one" + : echo "yes" + :endif + +This will echo "yes", because "one" doesn't look like a number, thus it is +converted to the number zero. + +For strings there are two more items: + + a =~ b matches with + a !~ b does not match with + +The left item "a" is used as a string. The right item "b" is used as a +pattern, like what's used for searching. Example: > + + :if str =~ " " + : echo "str contains a space" + :endif + :if str !~ '\.$' + : echo "str does not end in a full stop" + :endif + +Notice the use of a single-quote string for the pattern. This is useful, +because backslashes would need to be doubled in a double-quote string and +patterns tend to contain many backslashes. + +The 'ignorecase' option is used when comparing strings. When you don't want +that, append "#" to match case and "?" to ignore case. Thus "==?" compares +two strings to be equal while ignoring case. And "!~#" checks if a pattern +doesn't match, also checking the case of letters. For the full table see +|expr-==|. + + +MORE LOOPING + +The ":while" command was already mentioned. Two more statements can be used +in between the ":while" and the ":endwhile": + + :continue Jump back to the start of the while loop; the + loop continues. + :break Jump forward to the ":endwhile"; the loop is + discontinued. + +Example: > + + :while counter < 40 + : call do_something() + : if skip_flag + : continue + : endif + : if finished_flag + : break + : endif + : sleep 50m + :endwhile + +The ":sleep" command makes Vim take a nap. The "50m" specifies fifty +milliseconds. Another example is ":sleep 4", which sleeps for four seconds. + +Even more looping can be done with the ":for" command, see below in |41.8|. + +============================================================================== +*41.5* Executing an expression + +So far the commands in the script were executed by Vim directly. The +":execute" command allows executing the result of an expression. This is a +very powerful way to build commands and execute them. + An example is to jump to a tag, which is contained in a variable: > + + :execute "tag " . tag_name + +The "." is used to concatenate the string "tag " with the value of variable +"tag_name". Suppose "tag_name" has the value "get_cmd", then the command that +will be executed is: > + + :tag get_cmd + +The ":execute" command can only execute colon commands. The ":normal" command +executes Normal mode commands. However, its argument is not an expression but +the literal command characters. Example: > + + :normal gg=G + +This jumps to the first line and formats all lines with the "=" operator. + To make ":normal" work with an expression, combine ":execute" with it. +Example: > + + :execute "normal " . normal_commands + +The variable "normal_commands" must contain the Normal mode commands. + Make sure that the argument for ":normal" is a complete command. Otherwise +Vim will run into the end of the argument and abort the command. For example, +if you start Insert mode, you must leave Insert mode as well. This works: > + + :execute "normal Inew text \<Esc>" + +This inserts "new text " in the current line. Notice the use of the special +key "\<Esc>". This avoids having to enter a real <Esc> character in your +script. + +If you don't want to execute a string but evaluate it to get its expression +value, you can use the eval() function: > + + :let optname = "path" + :let optval = eval('&' . optname) + +A "&" character is prepended to "path", thus the argument to eval() is +"&path". The result will then be the value of the 'path' option. + The same thing can be done with: > + :exe 'let optval = &' . optname + +============================================================================== +*41.6* Using functions + +Vim defines many functions and provides a large amount of functionality that +way. A few examples will be given in this section. You can find the whole +list here: |functions|. + +A function is called with the ":call" command. The parameters are passed in +between parentheses separated by commas. Example: > + + :call search("Date: ", "W") + +This calls the search() function, with arguments "Date: " and "W". The +search() function uses its first argument as a search pattern and the second +one as flags. The "W" flag means the search doesn't wrap around the end of +the file. + +A function can be called in an expression. Example: > + + :let line = getline(".") + :let repl = substitute(line, '\a', "*", "g") + :call setline(".", repl) + +The getline() function obtains a line from the current buffer. Its argument +is a specification of the line number. In this case "." is used, which means +the line where the cursor is. + The substitute() function does something similar to the ":substitute" +command. The first argument is the string on which to perform the +substitution. The second argument is the pattern, the third the replacement +string. Finally, the last arguments are the flags. + The setline() function sets the line, specified by the first argument, to a +new string, the second argument. In this example the line under the cursor is +replaced with the result of the substitute(). Thus the effect of the three +statements is equal to: > + + :substitute/\a/*/g + +Using the functions becomes more interesting when you do more work before and +after the substitute() call. + + +FUNCTIONS *function-list* + +There are many functions. We will mention them here, grouped by what they are +used for. You can find an alphabetical list here: |functions|. Use CTRL-] on +the function name to jump to detailed help on it. + +String manipulation: *string-functions* + nr2char() get a character by its ASCII value + char2nr() get ASCII value of a character + str2nr() convert a string to a Number + str2float() convert a string to a Float + printf() format a string according to % items + escape() escape characters in a string with a '\' + shellescape() escape a string for use with a shell command + fnameescape() escape a file name for use with a Vim command + tr() translate characters from one set to another + strtrans() translate a string to make it printable + tolower() turn a string to lowercase + toupper() turn a string to uppercase + match() position where a pattern matches in a string + matchend() position where a pattern match ends in a string + matchstr() match of a pattern in a string + matchlist() like matchstr() and also return submatches + stridx() first index of a short string in a long string + strridx() last index of a short string in a long string + strlen() length of a string in bytes + strchars() length of a string in characters + strwidth() size of string when displayed + strdisplaywidth() size of string when displayed, deals with tabs + substitute() substitute a pattern match with a string + submatch() get a specific match in ":s" and substitute() + strpart() get part of a string + expand() expand special keywords + iconv() convert text from one encoding to another + byteidx() byte index of a character in a string + byteidxcomp() like byteidx() but count composing characters + repeat() repeat a string multiple times + eval() evaluate a string expression + +List manipulation: *list-functions* + get() get an item without error for wrong index + len() number of items in a List + empty() check if List is empty + insert() insert an item somewhere in a List + add() append an item to a List + extend() append a List to a List + remove() remove one or more items from a List + copy() make a shallow copy of a List + deepcopy() make a full copy of a List + filter() remove selected items from a List + map() change each List item + sort() sort a List + reverse() reverse the order of a List + uniq() remove copies of repeated adjacent items + split() split a String into a List + join() join List items into a String + range() return a List with a sequence of numbers + string() String representation of a List + call() call a function with List as arguments + index() index of a value in a List + max() maximum value in a List + min() minimum value in a List + count() count number of times a value appears in a List + repeat() repeat a List multiple times + +Dictionary manipulation: *dict-functions* + get() get an entry without an error for a wrong key + len() number of entries in a Dictionary + has_key() check whether a key appears in a Dictionary + empty() check if Dictionary is empty + remove() remove an entry from a Dictionary + extend() add entries from one Dictionary to another + filter() remove selected entries from a Dictionary + map() change each Dictionary entry + keys() get List of Dictionary keys + values() get List of Dictionary values + items() get List of Dictionary key-value pairs + copy() make a shallow copy of a Dictionary + deepcopy() make a full copy of a Dictionary + string() String representation of a Dictionary + max() maximum value in a Dictionary + min() minimum value in a Dictionary + count() count number of times a value appears + +Floating point computation: *float-functions* + float2nr() convert Float to Number + abs() absolute value (also works for Number) + round() round off + ceil() round up + floor() round down + trunc() remove value after decimal point + fmod() remainder of division + exp() exponential + log() natural logarithm (logarithm to base e) + log10() logarithm to base 10 + pow() value of x to the exponent y + sqrt() square root + sin() sine + cos() cosine + tan() tangent + asin() arc sine + acos() arc cosine + atan() arc tangent + atan2() arc tangent + sinh() hyperbolic sine + cosh() hyperbolic cosine + tanh() hyperbolic tangent + +Other computation: *bitwise-function* + and() bitwise AND + invert() bitwise invert + or() bitwise OR + xor() bitwise XOR + sha256() SHA-256 hash + +Variables: *var-functions* + type() type of a variable + islocked() check if a variable is locked + function() get a Funcref for a function name + getbufvar() get a variable value from a specific buffer + setbufvar() set a variable in a specific buffer + getwinvar() get a variable from specific window + gettabvar() get a variable from specific tab page + gettabwinvar() get a variable from specific window & tab page + setwinvar() set a variable in a specific window + settabvar() set a variable in a specific tab page + settabwinvar() set a variable in a specific window & tab page + garbagecollect() possibly free memory + +Cursor and mark position: *cursor-functions* *mark-functions* + col() column number of the cursor or a mark + virtcol() screen column of the cursor or a mark + line() line number of the cursor or mark + wincol() window column number of the cursor + winline() window line number of the cursor + cursor() position the cursor at a line/column + screencol() get screen column of the cursor + screenrow() get screen row of the cursor + getcurpos() get position of the cursor + getpos() get position of cursor, mark, etc. + setpos() set position of cursor, mark, etc. + byte2line() get line number at a specific byte count + line2byte() byte count at a specific line + diff_filler() get the number of filler lines above a line + screenattr() get attribute at a screen line/row + screenchar() get character code at a screen line/row + +Working with text in the current buffer: *text-functions* + getline() get a line or list of lines from the buffer + setline() replace a line in the buffer + append() append line or list of lines in the buffer + indent() indent of a specific line + cindent() indent according to C indenting + lispindent() indent according to Lisp indenting + nextnonblank() find next non-blank line + prevnonblank() find previous non-blank line + search() find a match for a pattern + searchpos() find a match for a pattern + searchpair() find the other end of a start/skip/end + searchpairpos() find the other end of a start/skip/end + searchdecl() search for the declaration of a name + + *system-functions* *file-functions* +System functions and manipulation of files: + glob() expand wildcards + globpath() expand wildcards in a number of directories + findfile() find a file in a list of directories + finddir() find a directory in a list of directories + resolve() find out where a shortcut points to + fnamemodify() modify a file name + pathshorten() shorten directory names in a path + simplify() simplify a path without changing its meaning + executable() check if an executable program exists + exepath() full path of an executable program + filereadable() check if a file can be read + filewritable() check if a file can be written to + getfperm() get the permissions of a file + getftype() get the kind of a file + isdirectory() check if a directory exists + getfsize() get the size of a file + getcwd() get the current working directory + haslocaldir() check if current window used |:lcd| + tempname() get the name of a temporary file + mkdir() create a new directory + delete() delete a file + rename() rename a file + system() get the result of a shell command as a string + systemlist() get the result of a shell command as a list + hostname() name of the system + readfile() read a file into a List of lines + writefile() write a List of lines into a file + +Date and Time: *date-functions* *time-functions* + getftime() get last modification time of a file + localtime() get current time in seconds + strftime() convert time to a string + reltime() get the current or elapsed time accurately + reltimestr() convert reltime() result to a string + + *buffer-functions* *window-functions* *arg-functions* +Buffers, windows and the argument list: + argc() number of entries in the argument list + argidx() current position in the argument list + arglistid() get id of the argument list + argv() get one entry from the argument list + bufexists() check if a buffer exists + buflisted() check if a buffer exists and is listed + bufloaded() check if a buffer exists and is loaded + bufname() get the name of a specific buffer + bufnr() get the buffer number of a specific buffer + tabpagebuflist() return List of buffers in a tab page + tabpagenr() get the number of a tab page + tabpagewinnr() like winnr() for a specified tab page + winnr() get the window number for the current window + bufwinnr() get the window number of a specific buffer + winbufnr() get the buffer number of a specific window + getbufline() get a list of lines from the specified buffer + +Command line: *command-line-functions* + getcmdline() get the current command line + getcmdpos() get position of the cursor in the command line + setcmdpos() set position of the cursor in the command line + getcmdtype() return the current command-line type + +Quickfix and location lists: *quickfix-functions* + getqflist() list of quickfix errors + setqflist() modify a quickfix list + getloclist() list of location list items + setloclist() modify a location list + +Insert mode completion: *completion-functions* + complete() set found matches + complete_add() add to found matches + complete_check() check if completion should be aborted + pumvisible() check if the popup menu is displayed + +Folding: *folding-functions* + foldclosed() check for a closed fold at a specific line + foldclosedend() like foldclosed() but return the last line + foldlevel() check for the fold level at a specific line + foldtext() generate the line displayed for a closed fold + foldtextresult() get the text displayed for a closed fold + +Syntax and highlighting: *syntax-functions* *highlighting-functions* + clearmatches() clear all matches defined by |matchadd()| and + the |:match| commands + getmatches() get all matches defined by |matchadd()| and + the |:match| commands + hlexists() check if a highlight group exists + hlID() get ID of a highlight group + synID() get syntax ID at a specific position + synIDattr() get a specific attribute of a syntax ID + synIDtrans() get translated syntax ID + synstack() get list of syntax IDs at a specific position + synconcealed() get info about concealing + diff_hlID() get highlight ID for diff mode at a position + matchadd() define a pattern to highlight (a "match") + matchaddpos() define a list of positions to highlight + matcharg() get info about |:match| arguments + matchdelete() delete a match defined by |matchadd()| or a + |:match| command + setmatches() restore a list of matches saved by + |getmatches()| + +Spelling: *spell-functions* + spellbadword() locate badly spelled word at or after cursor + spellsuggest() return suggested spelling corrections + soundfold() return the sound-a-like equivalent of a word + +History: *history-functions* + histadd() add an item to a history + histdel() delete an item from a history + histget() get an item from a history + histnr() get highest index of a history list + +Interactive: *interactive-functions* + browse() put up a file requester + browsedir() put up a directory requester + confirm() let the user make a choice + getchar() get a character from the user + getcharmod() get modifiers for the last typed character + feedkeys() put characters in the typeahead queue + input() get a line from the user + inputlist() let the user pick an entry from a list + inputsecret() get a line from the user without showing it + inputdialog() get a line from the user in a dialog + inputsave() save and clear typeahead + inputrestore() restore typeahead + +GUI: *gui-functions* + getfontname() get name of current font being used + getwinposx() X position of the GUI Vim window + getwinposy() Y position of the GUI Vim window + +Vim server: *server-functions* + serverlist() return the list of server names + remote_send() send command characters to a Vim server + remote_expr() evaluate an expression in a Vim server + server2client() send a reply to a client of a Vim server + remote_peek() check if there is a reply from a Vim server + remote_read() read a reply from a Vim server + foreground() move the Vim window to the foreground + remote_foreground() move the Vim server window to the foreground + +Window size and position: *window-size-functions* + winheight() get height of a specific window + winwidth() get width of a specific window + winrestcmd() return command to restore window sizes + winsaveview() get view of current window + winrestview() restore saved view of current window + +Mappings: *mapping-functions* + hasmapto() check if a mapping exists + mapcheck() check if a matching mapping exists + maparg() get rhs of a mapping + wildmenumode() check if the wildmode is active + +Various: *various-functions* + mode() get current editing mode + visualmode() last visual mode used + exists() check if a variable, function, etc. exists + has() check if a feature is supported in Vim + changenr() return number of most recent change + cscope_connection() check if a cscope connection exists + did_filetype() check if a FileType autocommand was used + eventhandler() check if invoked by an event handler + getpid() get process ID of Vim + + libcall() call a function in an external library + libcallnr() idem, returning a number + + undofile() get the name of the undo file + undotree() return the state of the undo tree + + getreg() get contents of a register + getregtype() get type of a register + setreg() set contents and type of a register + + shiftwidth() effective value of 'shiftwidth' + + taglist() get list of matching tags + tagfiles() get a list of tags files + + luaeval() evaluate Lua expression + mzeval() evaluate |MzScheme| expression + py3eval() evaluate Python expression (|+python3|) + pyeval() evaluate Python expression (|+python|) + +============================================================================== +*41.7* Defining a function + +Vim enables you to define your own functions. The basic function declaration +begins as follows: > + + :function {name}({var1}, {var2}, ...) + : {body} + :endfunction +< + Note: + Function names must begin with a capital letter. + +Let's define a short function to return the smaller of two numbers. It starts +with this line: > + + :function Min(num1, num2) + +This tells Vim that the function is named "Min" and it takes two arguments: +"num1" and "num2". + The first thing you need to do is to check to see which number is smaller: + > + : if a:num1 < a:num2 + +The special prefix "a:" tells Vim that the variable is a function argument. +Let's assign the variable "smaller" the value of the smallest number: > + + : if a:num1 < a:num2 + : let smaller = a:num1 + : else + : let smaller = a:num2 + : endif + +The variable "smaller" is a local variable. Variables used inside a function +are local unless prefixed by something like "g:", "a:", or "s:". + + Note: + To access a global variable from inside a function you must prepend + "g:" to it. Thus "g:today" inside a function is used for the global + variable "today", and "today" is another variable, local to the + function. + +You now use the ":return" statement to return the smallest number to the user. +Finally, you end the function: > + + : return smaller + :endfunction + +The complete function definition is as follows: > + + :function Min(num1, num2) + : if a:num1 < a:num2 + : let smaller = a:num1 + : else + : let smaller = a:num2 + : endif + : return smaller + :endfunction + +For people who like short functions, this does the same thing: > + + :function Min(num1, num2) + : if a:num1 < a:num2 + : return a:num1 + : endif + : return a:num2 + :endfunction + +A user defined function is called in exactly the same way as a built-in +function. Only the name is different. The Min function can be used like +this: > + + :echo Min(5, 8) + +Only now will the function be executed and the lines be interpreted by Vim. +If there are mistakes, like using an undefined variable or function, you will +now get an error message. When defining the function these errors are not +detected. + +When a function reaches ":endfunction" or ":return" is used without an +argument, the function returns zero. + +To redefine a function that already exists, use the ! for the ":function" +command: > + + :function! Min(num1, num2, num3) + + +USING A RANGE + +The ":call" command can be given a line range. This can have one of two +meanings. When a function has been defined with the "range" keyword, it will +take care of the line range itself. + The function will be passed the variables "a:firstline" and "a:lastline". +These will have the line numbers from the range the function was called with. +Example: > + + :function Count_words() range + : let lnum = a:firstline + : let n = 0 + : while lnum <= a:lastline + : let n = n + len(split(getline(lnum))) + : let lnum = lnum + 1 + : endwhile + : echo "found " . n . " words" + :endfunction + +You can call this function with: > + + :10,30call Count_words() + +It will be executed once and echo the number of words. + The other way to use a line range is by defining a function without the +"range" keyword. The function will be called once for every line in the +range, with the cursor in that line. Example: > + + :function Number() + : echo "line " . line(".") . " contains: " . getline(".") + :endfunction + +If you call this function with: > + + :10,15call Number() + +The function will be called six times. + + +VARIABLE NUMBER OF ARGUMENTS + +Vim enables you to define functions that have a variable number of arguments. +The following command, for instance, defines a function that must have 1 +argument (start) and can have up to 20 additional arguments: > + + :function Show(start, ...) + +The variable "a:1" contains the first optional argument, "a:2" the second, and +so on. The variable "a:0" contains the number of extra arguments. + For example: > + + :function Show(start, ...) + : echohl Title + : echo "start is " . a:start + : echohl None + : let index = 1 + : while index <= a:0 + : echo " Arg " . index . " is " . a:{index} + : let index = index + 1 + : endwhile + : echo "" + :endfunction + +This uses the ":echohl" command to specify the highlighting used for the +following ":echo" command. ":echohl None" stops it again. The ":echon" +command works like ":echo", but doesn't output a line break. + +You can also use the a:000 variable, it is a List of all the "..." arguments. +See |a:000|. + + +LISTING FUNCTIONS + +The ":function" command lists the names and arguments of all user-defined +functions: > + + :function +< function Show(start, ...) ~ + function GetVimIndent() ~ + function SetSyn(name) ~ + +To see what a function does, use its name as an argument for ":function": > + + :function SetSyn +< 1 if &syntax == '' ~ + 2 let &syntax = a:name ~ + 3 endif ~ + endfunction ~ + + +DEBUGGING + +The line number is useful for when you get an error message or when debugging. +See |debug-scripts| about debugging mode. + You can also set the 'verbose' option to 12 or higher to see all function +calls. Set it to 15 or higher to see every executed line. + + +DELETING A FUNCTION + +To delete the Show() function: > + + :delfunction Show + +You get an error when the function doesn't exist. + + +FUNCTION REFERENCES + +Sometimes it can be useful to have a variable point to one function or +another. You can do it with the function() function. It turns the name of a +function into a reference: > + + :let result = 0 " or 1 + :function! Right() + : return 'Right!' + :endfunc + :function! Wrong() + : return 'Wrong!' + :endfunc + : + :if result == 1 + : let Afunc = function('Right') + :else + : let Afunc = function('Wrong') + :endif + :echo call(Afunc, []) +< Wrong! ~ + +Note that the name of a variable that holds a function reference must start +with a capital. Otherwise it could be confused with the name of a builtin +function. + The way to invoke a function that a variable refers to is with the call() +function. Its first argument is the function reference, the second argument +is a List with arguments. + +Function references are most useful in combination with a Dictionary, as is +explained in the next section. + +============================================================================== +*41.8* Lists and Dictionaries + +So far we have used the basic types String and Number. Vim also supports two +composite types: List and Dictionary. + +A List is an ordered sequence of things. The things can be any kind of value, +thus you can make a List of numbers, a List of Lists and even a List of mixed +items. To create a List with three strings: > + + :let alist = ['aap', 'mies', 'noot'] + +The List items are enclosed in square brackets and separated by commas. To +create an empty List: > + + :let alist = [] + +You can add items to a List with the add() function: > + + :let alist = [] + :call add(alist, 'foo') + :call add(alist, 'bar') + :echo alist +< ['foo', 'bar'] ~ + +List concatenation is done with +: > + + :echo alist + ['foo', 'bar'] +< ['foo', 'bar', 'foo', 'bar'] ~ + +Or, if you want to extend a List directly: > + + :let alist = ['one'] + :call extend(alist, ['two', 'three']) + :echo alist +< ['one', 'two', 'three'] ~ + +Notice that using add() will have a different effect: > + + :let alist = ['one'] + :call add(alist, ['two', 'three']) + :echo alist +< ['one', ['two', 'three']] ~ + +The second argument of add() is added as a single item. + + +FOR LOOP + +One of the nice things you can do with a List is iterate over it: > + + :let alist = ['one', 'two', 'three'] + :for n in alist + : echo n + :endfor +< one ~ + two ~ + three ~ + +This will loop over each element in List "alist", assigning the value to +variable "n". The generic form of a for loop is: > + + :for {varname} in {listexpression} + : {commands} + :endfor + +To loop a certain number of times you need a List of a specific length. The +range() function creates one for you: > + + :for a in range(3) + : echo a + :endfor +< 0 ~ + 1 ~ + 2 ~ + +Notice that the first item of the List that range() produces is zero, thus the +last item is one less than the length of the list. + You can also specify the maximum value, the stride and even go backwards: > + + :for a in range(8, 4, -2) + : echo a + :endfor +< 8 ~ + 6 ~ + 4 ~ + +A more useful example, looping over lines in the buffer: > + + :for line in getline(1, 20) + : if line =~ "Date: " + : echo matchstr(line, 'Date: \zs.*') + : endif + :endfor + +This looks into lines 1 to 20 (inclusive) and echoes any date found in there. + + +DICTIONARIES + +A Dictionary stores key-value pairs. You can quickly lookup a value if you +know the key. A Dictionary is created with curly braces: > + + :let uk2nl = {'one': 'een', 'two': 'twee', 'three': 'drie'} + +Now you can lookup words by putting the key in square brackets: > + + :echo uk2nl['two'] +< twee ~ + +The generic form for defining a Dictionary is: > + + {<key> : <value>, ...} + +An empty Dictionary is one without any keys: > + + {} + +The possibilities with Dictionaries are numerous. There are various functions +for them as well. For example, you can obtain a list of the keys and loop +over them: > + + :for key in keys(uk2nl) + : echo key + :endfor +< three ~ + one ~ + two ~ + +You will notice the keys are not ordered. You can sort the list to get a +specific order: > + + :for key in sort(keys(uk2nl)) + : echo key + :endfor +< one ~ + three ~ + two ~ + +But you can never get back the order in which items are defined. For that you +need to use a List, it stores items in an ordered sequence. + + +DICTIONARY FUNCTIONS + +The items in a Dictionary can normally be obtained with an index in square +brackets: > + + :echo uk2nl['one'] +< een ~ + +A method that does the same, but without so many punctuation characters: > + + :echo uk2nl.one +< een ~ + +This only works for a key that is made of ASCII letters, digits and the +underscore. You can also assign a new value this way: > + + :let uk2nl.four = 'vier' + :echo uk2nl +< {'three': 'drie', 'four': 'vier', 'one': 'een', 'two': 'twee'} ~ + +And now for something special: you can directly define a function and store a +reference to it in the dictionary: > + + :function uk2nl.translate(line) dict + : return join(map(split(a:line), 'get(self, v:val, "???")')) + :endfunction + +Let's first try it out: > + + :echo uk2nl.translate('three two five one') +< drie twee ??? een ~ + +The first special thing you notice is the "dict" at the end of the ":function" +line. This marks the function as being used from a Dictionary. The "self" +local variable will then refer to that Dictionary. + Now let's break up the complicated return command: > + + split(a:line) + +The split() function takes a string, chops it into whitespace separated words +and returns a list with these words. Thus in the example it returns: > + + :echo split('three two five one') +< ['three', 'two', 'five', 'one'] ~ + +This list is the first argument to the map() function. This will go through +the list, evaluating its second argument with "v:val" set to the value of each +item. This is a shortcut to using a for loop. This command: > + + :let alist = map(split(a:line), 'get(self, v:val, "???")') + +Is equivalent to: > + + :let alist = split(a:line) + :for idx in range(len(alist)) + : let alist[idx] = get(self, alist[idx], "???") + :endfor + +The get() function checks if a key is present in a Dictionary. If it is, then +the value is retrieved. If it isn't, then the default value is returned, in +the example it's '???'. This is a convenient way to handle situations where a +key may not be present and you don't want an error message. + +The join() function does the opposite of split(): it joins together a list of +words, putting a space in between. + This combination of split(), map() and join() is a nice way to filter a line +of words in a very compact way. + + +OBJECT ORIENTED PROGRAMMING + +Now that you can put both values and functions in a Dictionary, you can +actually use a Dictionary like an object. + Above we used a Dictionary for translating Dutch to English. We might want +to do the same for other languages. Let's first make an object (aka +Dictionary) that has the translate function, but no words to translate: > + + :let transdict = {} + :function transdict.translate(line) dict + : return join(map(split(a:line), 'get(self.words, v:val, "???")')) + :endfunction + +It's slightly different from the function above, using 'self.words' to lookup +word translations. But we don't have a self.words. Thus you could call this +an abstract class. + +Now we can instantiate a Dutch translation object: > + + :let uk2nl = copy(transdict) + :let uk2nl.words = {'one': 'een', 'two': 'twee', 'three': 'drie'} + :echo uk2nl.translate('three one') +< drie een ~ + +And a German translator: > + + :let uk2de = copy(transdict) + :let uk2de.words = {'one': 'ein', 'two': 'zwei', 'three': 'drei'} + :echo uk2de.translate('three one') +< drei ein ~ + +You see that the copy() function is used to make a copy of the "transdict" +Dictionary and then the copy is changed to add the words. The original +remains the same, of course. + +Now you can go one step further, and use your preferred translator: > + + :if $LANG =~ "de" + : let trans = uk2de + :else + : let trans = uk2nl + :endif + :echo trans.translate('one two three') +< een twee drie ~ + +Here "trans" refers to one of the two objects (Dictionaries). No copy is +made. More about List and Dictionary identity can be found at |list-identity| +and |dict-identity|. + +Now you might use a language that isn't supported. You can overrule the +translate() function to do nothing: > + + :let uk2uk = copy(transdict) + :function! uk2uk.translate(line) + : return a:line + :endfunction + :echo uk2uk.translate('three one wladiwostok') +< three one wladiwostok ~ + +Notice that a ! was used to overwrite the existing function reference. Now +use "uk2uk" when no recognized language is found: > + + :if $LANG =~ "de" + : let trans = uk2de + :elseif $LANG =~ "nl" + : let trans = uk2nl + :else + : let trans = uk2uk + :endif + :echo trans.translate('one two three') +< one two three ~ + +For further reading see |Lists| and |Dictionaries|. + +============================================================================== +*41.9* Exceptions + +Let's start with an example: > + + :try + : read ~/templates/pascal.tmpl + :catch /E484:/ + : echo "Sorry, the Pascal template file cannot be found." + :endtry + +The ":read" command will fail if the file does not exist. Instead of +generating an error message, this code catches the error and gives the user a +nice message. + +For the commands in between ":try" and ":endtry" errors are turned into +exceptions. An exception is a string. In the case of an error the string +contains the error message. And every error message has a number. In this +case, the error we catch contains "E484:". This number is guaranteed to stay +the same (the text may change, e.g., it may be translated). + +When the ":read" command causes another error, the pattern "E484:" will not +match in it. Thus this exception will not be caught and result in the usual +error message. + +You might be tempted to do this: > + + :try + : read ~/templates/pascal.tmpl + :catch + : echo "Sorry, the Pascal template file cannot be found." + :endtry + +This means all errors are caught. But then you will not see errors that are +useful, such as "E21: Cannot make changes, 'modifiable' is off". + +Another useful mechanism is the ":finally" command: > + + :let tmp = tempname() + :try + : exe ".,$write " . tmp + : exe "!filter " . tmp + : .,$delete + : exe "$read " . tmp + :finally + : call delete(tmp) + :endtry + +This filters the lines from the cursor until the end of the file through the +"filter" command, which takes a file name argument. No matter if the +filtering works, something goes wrong in between ":try" and ":finally" or the +user cancels the filtering by pressing CTRL-C, the "call delete(tmp)" is +always executed. This makes sure you don't leave the temporary file behind. + +More information about exception handling can be found in the reference +manual: |exception-handling|. + +============================================================================== +*41.10* Various remarks + +Here is a summary of items that apply to Vim scripts. They are also mentioned +elsewhere, but form a nice checklist. + +The end-of-line character depends on the system. For Unix a single <NL> +character is used. For MS-DOS, Windows, OS/2 and the like, <CR><LF> is used. +This is important when using mappings that end in a <CR>. See |:source_crnl|. + + +WHITE SPACE + +Blank lines are allowed and ignored. + +Leading whitespace characters (blanks and TABs) are always ignored. The +whitespaces between parameters (e.g. between the 'set' and the 'cpoptions' in +the example below) are reduced to one blank character and plays the role of a +separator, the whitespaces after the last (visible) character may or may not +be ignored depending on the situation, see below. + +For a ":set" command involving the "=" (equal) sign, such as in: > + + :set cpoptions =aABceFst + +the whitespace immediately before the "=" sign is ignored. But there can be +no whitespace after the "=" sign! + +To include a whitespace character in the value of an option, it must be +escaped by a "\" (backslash) as in the following example: > + + :set tags=my\ nice\ file + +The same example written as: > + + :set tags=my nice file + +will issue an error, because it is interpreted as: > + + :set tags=my + :set nice + :set file + + +COMMENTS + +The character " (the double quote mark) starts a comment. Everything after +and including this character until the end-of-line is considered a comment and +is ignored, except for commands that don't consider comments, as shown in +examples below. A comment can start on any character position on the line. + +There is a little "catch" with comments for some commands. Examples: > + + :abbrev dev development " shorthand + :map <F3> o#include " insert include + :execute cmd " do it + :!ls *.c " list C files + +The abbreviation 'dev' will be expanded to 'development " shorthand'. The +mapping of <F3> will actually be the whole line after the 'o# ....' including +the '" insert include'. The "execute" command will give an error. The "!" +command will send everything after it to the shell, causing an error for an +unmatched '"' character. + There can be no comment after ":map", ":abbreviate", ":execute" and "!" +commands (there are a few more commands with this restriction). For the +":map", ":abbreviate" and ":execute" commands there is a trick: > + + :abbrev dev development|" shorthand + :map <F3> o#include|" insert include + :execute cmd |" do it + +With the '|' character the command is separated from the next one. And that +next command is only a comment. For the last command you need to do two +things: |:execute| and use '|': > + :exe '!ls *.c' |" list C files + +Notice that there is no white space before the '|' in the abbreviation and +mapping. For these commands, any character until the end-of-line or '|' is +included. As a consequence of this behavior, you don't always see that +trailing whitespace is included: > + + :map <F4> o#include + +To spot these problems, you can set the 'list' option when editing vimrc +files. + +For Unix there is one special way to comment a line, that allows making a Vim +script executable: > + #!/usr/bin/env vim -S + echo "this is a Vim script" + quit + +The "#" command by itself lists a line with the line number. Adding an +exclamation mark changes it into doing nothing, so that you can add the shell +command to execute the rest of the file. |:#!| |-S| + + +PITFALLS + +Even bigger problem arises in the following example: > + + :map ,ab o#include + :unmap ,ab + +Here the unmap command will not work, because it tries to unmap ",ab ". This +does not exist as a mapped sequence. An error will be issued, which is very +hard to identify, because the ending whitespace character in ":unmap ,ab " is +not visible. + +And this is the same as what happens when one uses a comment after an 'unmap' +command: > + + :unmap ,ab " comment + +Here the comment part will be ignored. However, Vim will try to unmap +',ab ', which does not exist. Rewrite it as: > + + :unmap ,ab| " comment + + +RESTORING THE VIEW + +Sometimes you want to make a change and go back to where the cursor was. +Restoring the relative position would also be nice, so that the same line +appears at the top of the window. + This example yanks the current line, puts it above the first line in the +file and then restores the view: > + + map ,p ma"aYHmbgg"aP`bzt`a + +What this does: > + ma"aYHmbgg"aP`bzt`a +< ma set mark a at cursor position + "aY yank current line into register a + Hmb go to top line in window and set mark b there + gg go to first line in file + "aP put the yanked line above it + `b go back to top line in display + zt position the text in the window as before + `a go back to saved cursor position + + +PACKAGING + +To avoid your function names to interfere with functions that you get from +others, use this scheme: +- Prepend a unique string before each function name. I often use an + abbreviation. For example, "OW_" is used for the option window functions. +- Put the definition of your functions together in a file. Set a global + variable to indicate that the functions have been loaded. When sourcing the + file again, first unload the functions. +Example: > + + " This is the XXX package + + if exists("XXX_loaded") + delfun XXX_one + delfun XXX_two + endif + + function XXX_one(a) + ... body of function ... + endfun + + function XXX_two(b) + ... body of function ... + endfun + + let XXX_loaded = 1 + +============================================================================== +*41.11* Writing a plugin *write-plugin* + +You can write a Vim script in such a way that many people can use it. This is +called a plugin. Vim users can drop your script in their plugin directory and +use its features right away |add-plugin|. + +There are actually two types of plugins: + + global plugins: For all types of files. +filetype plugins: Only for files of a specific type. + +In this section the first type is explained. Most items are also relevant for +writing filetype plugins. The specifics for filetype plugins are in the next +section |write-filetype-plugin|. + + +NAME + +First of all you must choose a name for your plugin. The features provided +by the plugin should be clear from its name. And it should be unlikely that +someone else writes a plugin with the same name but which does something +different. And please limit the name to 8 characters, to avoid problems on +old Windows systems. + +A script that corrects typing mistakes could be called "typecorr.vim". We +will use it here as an example. + +For the plugin to work for everybody, it should follow a few guidelines. This +will be explained step-by-step. The complete example plugin is at the end. + + +BODY + +Let's start with the body of the plugin, the lines that do the actual work: > + + 14 iabbrev teh the + 15 iabbrev otehr other + 16 iabbrev wnat want + 17 iabbrev synchronisation + 18 \ synchronization + 19 let s:count = 4 + +The actual list should be much longer, of course. + +The line numbers have only been added to explain a few things, don't put them +in your plugin file! + + +HEADER + +You will probably add new corrections to the plugin and soon have several +versions lying around. And when distributing this file, people will want to +know who wrote this wonderful plugin and where they can send remarks. +Therefore, put a header at the top of your plugin: > + + 1 " Vim global plugin for correcting typing mistakes + 2 " Last Change: 2000 Oct 15 + 3 " Maintainer: Bram Moolenaar <Bram@vim.org> + +About copyright and licensing: Since plugins are very useful and it's hardly +worth restricting their distribution, please consider making your plugin +either public domain or use the Vim |license|. A short note about this near +the top of the plugin should be sufficient. Example: > + + 4 " License: This file is placed in the public domain. + + +LINE CONTINUATION, AVOIDING SIDE EFFECTS *use-cpo-save* + +In line 18 above, the line-continuation mechanism is used |line-continuation|. +Users with 'compatible' set will run into trouble here, they will get an error +message. We can't just reset 'compatible', because that has a lot of side +effects. To avoid this, we will set the 'cpoptions' option to its Vim default +value and restore it later. That will allow the use of line-continuation and +make the script work for most people. It is done like this: > + + 11 let s:save_cpo = &cpo + 12 set cpo&vim + .. + 42 let &cpo = s:save_cpo + 43 unlet s:save_cpo + +We first store the old value of 'cpoptions' in the s:save_cpo variable. At +the end of the plugin this value is restored. + +Notice that a script-local variable is used |s:var|. A global variable could +already be in use for something else. Always use script-local variables for +things that are only used in the script. + + +NOT LOADING + +It's possible that a user doesn't always want to load this plugin. Or the +system administrator has dropped it in the system-wide plugin directory, but a +user has his own plugin he wants to use. Then the user must have a chance to +disable loading this specific plugin. This will make it possible: > + + 6 if exists("g:loaded_typecorr") + 7 finish + 8 endif + 9 let g:loaded_typecorr = 1 + +This also avoids that when the script is loaded twice it would cause error +messages for redefining functions and cause trouble for autocommands that are +added twice. + +The name is recommended to start with "loaded_" and then the file name of the +plugin, literally. The "g:" is prepended just to avoid mistakes when using +the variable in a function (without "g:" it would be a variable local to the +function). + +Using "finish" stops Vim from reading the rest of the file, it's much quicker +than using if-endif around the whole file. + + +MAPPING + +Now let's make the plugin more interesting: We will add a mapping that adds a +correction for the word under the cursor. We could just pick a key sequence +for this mapping, but the user might already use it for something else. To +allow the user to define which keys a mapping in a plugin uses, the <Leader> +item can be used: > + + 22 map <unique> <Leader>a <Plug>TypecorrAdd + +The "<Plug>TypecorrAdd" thing will do the work, more about that further on. + +The user can set the "mapleader" variable to the key sequence that he wants +this mapping to start with. Thus if the user has done: > + + let mapleader = "_" + +the mapping will define "_a". If the user didn't do this, the default value +will be used, which is a backslash. Then a map for "\a" will be defined. + +Note that <unique> is used, this will cause an error message if the mapping +already happened to exist. |:map-<unique>| + +But what if the user wants to define his own key sequence? We can allow that +with this mechanism: > + + 21 if !hasmapto('<Plug>TypecorrAdd') + 22 map <unique> <Leader>a <Plug>TypecorrAdd + 23 endif + +This checks if a mapping to "<Plug>TypecorrAdd" already exists, and only +defines the mapping from "<Leader>a" if it doesn't. The user then has a +chance of putting this in his vimrc file: > + + map ,c <Plug>TypecorrAdd + +Then the mapped key sequence will be ",c" instead of "_a" or "\a". + + +PIECES + +If a script gets longer, you often want to break up the work in pieces. You +can use functions or mappings for this. But you don't want these functions +and mappings to interfere with the ones from other scripts. For example, you +could define a function Add(), but another script could try to define the same +function. To avoid this, we define the function local to the script by +prepending it with "s:". + +We will define a function that adds a new typing correction: > + + 30 function s:Add(from, correct) + 31 let to = input("type the correction for " . a:from . ": ") + 32 exe ":iabbrev " . a:from . " " . to + .. + 36 endfunction + +Now we can call the function s:Add() from within this script. If another +script also defines s:Add(), it will be local to that script and can only +be called from the script it was defined in. There can also be a global Add() +function (without the "s:"), which is again another function. + +<SID> can be used with mappings. It generates a script ID, which identifies +the current script. In our typing correction plugin we use it like this: > + + 24 noremap <unique> <script> <Plug>TypecorrAdd <SID>Add + .. + 28 noremap <SID>Add :call <SID>Add(expand("<cword>"), 1)<CR> + +Thus when a user types "\a", this sequence is invoked: > + + \a -> <Plug>TypecorrAdd -> <SID>Add -> :call <SID>Add() + +If another script would also map <SID>Add, it would get another script ID and +thus define another mapping. + +Note that instead of s:Add() we use <SID>Add() here. That is because the +mapping is typed by the user, thus outside of the script. The <SID> is +translated to the script ID, so that Vim knows in which script to look for +the Add() function. + +This is a bit complicated, but it's required for the plugin to work together +with other plugins. The basic rule is that you use <SID>Add() in mappings and +s:Add() in other places (the script itself, autocommands, user commands). + +We can also add a menu entry to do the same as the mapping: > + + 26 noremenu <script> Plugin.Add\ Correction <SID>Add + +The "Plugin" menu is recommended for adding menu items for plugins. In this +case only one item is used. When adding more items, creating a submenu is +recommended. For example, "Plugin.CVS" could be used for a plugin that offers +CVS operations "Plugin.CVS.checkin", "Plugin.CVS.checkout", etc. + +Note that in line 28 ":noremap" is used to avoid that any other mappings cause +trouble. Someone may have remapped ":call", for example. In line 24 we also +use ":noremap", but we do want "<SID>Add" to be remapped. This is why +"<script>" is used here. This only allows mappings which are local to the +script. |:map-<script>| The same is done in line 26 for ":noremenu". +|:menu-<script>| + + +<SID> AND <Plug> *using-<Plug>* + +Both <SID> and <Plug> are used to avoid that mappings of typed keys interfere +with mappings that are only to be used from other mappings. Note the +difference between using <SID> and <Plug>: + +<Plug> is visible outside of the script. It is used for mappings which the + user might want to map a key sequence to. <Plug> is a special code + that a typed key will never produce. + To make it very unlikely that other plugins use the same sequence of + characters, use this structure: <Plug> scriptname mapname + In our example the scriptname is "Typecorr" and the mapname is "Add". + This results in "<Plug>TypecorrAdd". Only the first character of + scriptname and mapname is uppercase, so that we can see where mapname + starts. + +<SID> is the script ID, a unique identifier for a script. + Internally Vim translates <SID> to "<SNR>123_", where "123" can be any + number. Thus a function "<SID>Add()" will have a name "<SNR>11_Add()" + in one script, and "<SNR>22_Add()" in another. You can see this if + you use the ":function" command to get a list of functions. The + translation of <SID> in mappings is exactly the same, that's how you + can call a script-local function from a mapping. + + +USER COMMAND + +Now let's add a user command to add a correction: > + + 38 if !exists(":Correct") + 39 command -nargs=1 Correct :call s:Add(<q-args>, 0) + 40 endif + +The user command is defined only if no command with the same name already +exists. Otherwise we would get an error here. Overriding the existing user +command with ":command!" is not a good idea, this would probably make the user +wonder why the command he defined himself doesn't work. |:command| + + +SCRIPT VARIABLES + +When a variable starts with "s:" it is a script variable. It can only be used +inside a script. Outside the script it's not visible. This avoids trouble +with using the same variable name in different scripts. The variables will be +kept as long as Vim is running. And the same variables are used when sourcing +the same script again. |s:var| + +The fun is that these variables can also be used in functions, autocommands +and user commands that are defined in the script. In our example we can add +a few lines to count the number of corrections: > + + 19 let s:count = 4 + .. + 30 function s:Add(from, correct) + .. + 34 let s:count = s:count + 1 + 35 echo s:count . " corrections now" + 36 endfunction + +First s:count is initialized to 4 in the script itself. When later the +s:Add() function is called, it increments s:count. It doesn't matter from +where the function was called, since it has been defined in the script, it +will use the local variables from this script. + + +THE RESULT + +Here is the resulting complete example: > + + 1 " Vim global plugin for correcting typing mistakes + 2 " Last Change: 2000 Oct 15 + 3 " Maintainer: Bram Moolenaar <Bram@vim.org> + 4 " License: This file is placed in the public domain. + 5 + 6 if exists("g:loaded_typecorr") + 7 finish + 8 endif + 9 let g:loaded_typecorr = 1 + 10 + 11 let s:save_cpo = &cpo + 12 set cpo&vim + 13 + 14 iabbrev teh the + 15 iabbrev otehr other + 16 iabbrev wnat want + 17 iabbrev synchronisation + 18 \ synchronization + 19 let s:count = 4 + 20 + 21 if !hasmapto('<Plug>TypecorrAdd') + 22 map <unique> <Leader>a <Plug>TypecorrAdd + 23 endif + 24 noremap <unique> <script> <Plug>TypecorrAdd <SID>Add + 25 + 26 noremenu <script> Plugin.Add\ Correction <SID>Add + 27 + 28 noremap <SID>Add :call <SID>Add(expand("<cword>"), 1)<CR> + 29 + 30 function s:Add(from, correct) + 31 let to = input("type the correction for " . a:from . ": ") + 32 exe ":iabbrev " . a:from . " " . to + 33 if a:correct | exe "normal viws\<C-R>\" \b\e" | endif + 34 let s:count = s:count + 1 + 35 echo s:count . " corrections now" + 36 endfunction + 37 + 38 if !exists(":Correct") + 39 command -nargs=1 Correct :call s:Add(<q-args>, 0) + 40 endif + 41 + 42 let &cpo = s:save_cpo + 43 unlet s:save_cpo + +Line 33 wasn't explained yet. It applies the new correction to the word under +the cursor. The |:normal| command is used to use the new abbreviation. Note +that mappings and abbreviations are expanded here, even though the function +was called from a mapping defined with ":noremap". + +Using "unix" for the 'fileformat' option is recommended. The Vim scripts will +then work everywhere. Scripts with 'fileformat' set to "dos" do not work on +Unix. Also see |:source_crnl|. To be sure it is set right, do this before +writing the file: > + + :set fileformat=unix + + +DOCUMENTATION *write-local-help* + +It's a good idea to also write some documentation for your plugin. Especially +when its behavior can be changed by the user. See |add-local-help| for how +they are installed. + +Here is a simple example for a plugin help file, called "typecorr.txt": > + + 1 *typecorr.txt* Plugin for correcting typing mistakes + 2 + 3 If you make typing mistakes, this plugin will have them corrected + 4 automatically. + 5 + 6 There are currently only a few corrections. Add your own if you like. + 7 + 8 Mappings: + 9 <Leader>a or <Plug>TypecorrAdd + 10 Add a correction for the word under the cursor. + 11 + 12 Commands: + 13 :Correct {word} + 14 Add a correction for {word}. + 15 + 16 *typecorr-settings* + 17 This plugin doesn't have any settings. + +The first line is actually the only one for which the format matters. It will +be extracted from the help file to be put in the "LOCAL ADDITIONS:" section of +help.txt |local-additions|. The first "*" must be in the first column of the +first line. After adding your help file do ":help" and check that the entries +line up nicely. + +You can add more tags inside ** in your help file. But be careful not to use +existing help tags. You would probably use the name of your plugin in most of +them, like "typecorr-settings" in the example. + +Using references to other parts of the help in || is recommended. This makes +it easy for the user to find associated help. + + +FILETYPE DETECTION *plugin-filetype* + +If your filetype is not already detected by Vim, you should create a filetype +detection snippet in a separate file. It is usually in the form of an +autocommand that sets the filetype when the file name matches a pattern. +Example: > + + au BufNewFile,BufRead *.foo set filetype=foofoo + +Write this single-line file as "ftdetect/foofoo.vim" in the first directory +that appears in 'runtimepath'. For Unix that would be +"~/.vim/ftdetect/foofoo.vim". The convention is to use the name of the +filetype for the script name. + +You can make more complicated checks if you like, for example to inspect the +contents of the file to recognize the language. Also see |new-filetype|. + + +SUMMARY *plugin-special* + +Summary of special things to use in a plugin: + +s:name Variables local to the script. + +<SID> Script-ID, used for mappings and functions local to + the script. + +hasmapto() Function to test if the user already defined a mapping + for functionality the script offers. + +<Leader> Value of "mapleader", which the user defines as the + keys that plugin mappings start with. + +:map <unique> Give a warning if a mapping already exists. + +:noremap <script> Use only mappings local to the script, not global + mappings. + +exists(":Cmd") Check if a user command already exists. + +============================================================================== +*41.12* Writing a filetype plugin *write-filetype-plugin* *ftplugin* + +A filetype plugin is like a global plugin, except that it sets options and +defines mappings for the current buffer only. See |add-filetype-plugin| for +how this type of plugin is used. + +First read the section on global plugins above |41.11|. All that is said there +also applies to filetype plugins. There are a few extras, which are explained +here. The essential thing is that a filetype plugin should only have an +effect on the current buffer. + + +DISABLING + +If you are writing a filetype plugin to be used by many people, they need a +chance to disable loading it. Put this at the top of the plugin: > + + " Only do this when not done yet for this buffer + if exists("b:did_ftplugin") + finish + endif + let b:did_ftplugin = 1 + +This also needs to be used to avoid that the same plugin is executed twice for +the same buffer (happens when using an ":edit" command without arguments). + +Now users can disable loading the default plugin completely by making a +filetype plugin with only this line: > + + let b:did_ftplugin = 1 + +This does require that the filetype plugin directory comes before $VIMRUNTIME +in 'runtimepath'! + +If you do want to use the default plugin, but overrule one of the settings, +you can write the different setting in a script: > + + setlocal textwidth=70 + +Now write this in the "after" directory, so that it gets sourced after the +distributed "vim.vim" ftplugin |after-directory|. For Unix this would be +"~/.vim/after/ftplugin/vim.vim". Note that the default plugin will have set +"b:did_ftplugin", but it is ignored here. + + +OPTIONS + +To make sure the filetype plugin only affects the current buffer use the > + + :setlocal + +command to set options. And only set options which are local to a buffer (see +the help for the option to check that). When using |:setlocal| for global +options or options local to a window, the value will change for many buffers, +and that is not what a filetype plugin should do. + +When an option has a value that is a list of flags or items, consider using +"+=" and "-=" to keep the existing value. Be aware that the user may have +changed an option value already. First resetting to the default value and +then changing it is often a good idea. Example: > + + :setlocal formatoptions& formatoptions+=ro + + +MAPPINGS + +To make sure mappings will only work in the current buffer use the > + + :map <buffer> + +command. This needs to be combined with the two-step mapping explained above. +An example of how to define functionality in a filetype plugin: > + + if !hasmapto('<Plug>JavaImport') + map <buffer> <unique> <LocalLeader>i <Plug>JavaImport + endif + noremap <buffer> <unique> <Plug>JavaImport oimport ""<Left><Esc> + +|hasmapto()| is used to check if the user has already defined a map to +<Plug>JavaImport. If not, then the filetype plugin defines the default +mapping. This starts with |<LocalLeader>|, which allows the user to select +the key(s) he wants filetype plugin mappings to start with. The default is a +backslash. +"<unique>" is used to give an error message if the mapping already exists or +overlaps with an existing mapping. +|:noremap| is used to avoid that any other mappings that the user has defined +interferes. You might want to use ":noremap <script>" to allow remapping +mappings defined in this script that start with <SID>. + +The user must have a chance to disable the mappings in a filetype plugin, +without disabling everything. Here is an example of how this is done for a +plugin for the mail filetype: > + + " Add mappings, unless the user didn't want this. + if !exists("no_plugin_maps") && !exists("no_mail_maps") + " Quote text by inserting "> " + if !hasmapto('<Plug>MailQuote') + vmap <buffer> <LocalLeader>q <Plug>MailQuote + nmap <buffer> <LocalLeader>q <Plug>MailQuote + endif + vnoremap <buffer> <Plug>MailQuote :s/^/> /<CR> + nnoremap <buffer> <Plug>MailQuote :.,$s/^/> /<CR> + endif + +Two global variables are used: +no_plugin_maps disables mappings for all filetype plugins +no_mail_maps disables mappings for a specific filetype + + +USER COMMANDS + +To add a user command for a specific file type, so that it can only be used in +one buffer, use the "-buffer" argument to |:command|. Example: > + + :command -buffer Make make %:r.s + + +VARIABLES + +A filetype plugin will be sourced for each buffer of the type it's for. Local +script variables |s:var| will be shared between all invocations. Use local +buffer variables |b:var| if you want a variable specifically for one buffer. + + +FUNCTIONS + +When defining a function, this only needs to be done once. But the filetype +plugin will be sourced every time a file with this filetype will be opened. +This construct makes sure the function is only defined once: > + + :if !exists("*s:Func") + : function s:Func(arg) + : ... + : endfunction + :endif +< + +UNDO *undo_ftplugin* + +When the user does ":setfiletype xyz" the effect of the previous filetype +should be undone. Set the b:undo_ftplugin variable to the commands that will +undo the settings in your filetype plugin. Example: > + + let b:undo_ftplugin = "setlocal fo< com< tw< commentstring<" + \ . "| unlet b:match_ignorecase b:match_words b:match_skip" + +Using ":setlocal" with "<" after the option name resets the option to its +global value. That is mostly the best way to reset the option value. + +This does require removing the "C" flag from 'cpoptions' to allow line +continuation, as mentioned above |use-cpo-save|. + + +FILE NAME + +The filetype must be included in the file name |ftplugin-name|. Use one of +these three forms: + + .../ftplugin/stuff.vim + .../ftplugin/stuff_foo.vim + .../ftplugin/stuff/bar.vim + +"stuff" is the filetype, "foo" and "bar" are arbitrary names. + + +SUMMARY *ftplugin-special* + +Summary of special things to use in a filetype plugin: + +<LocalLeader> Value of "maplocalleader", which the user defines as + the keys that filetype plugin mappings start with. + +:map <buffer> Define a mapping local to the buffer. + +:noremap <script> Only remap mappings defined in this script that start + with <SID>. + +:setlocal Set an option for the current buffer only. + +:command -buffer Define a user command local to the buffer. + +exists("*s:Func") Check if a function was already defined. + +Also see |plugin-special|, the special things used for all plugins. + +============================================================================== +*41.13* Writing a compiler plugin *write-compiler-plugin* + +A compiler plugin sets options for use with a specific compiler. The user can +load it with the |:compiler| command. The main use is to set the +'errorformat' and 'makeprg' options. + +Easiest is to have a look at examples. This command will edit all the default +compiler plugins: > + + :next $VIMRUNTIME/compiler/*.vim + +Use |:next| to go to the next plugin file. + +There are two special items about these files. First is a mechanism to allow +a user to overrule or add to the default file. The default files start with: > + + :if exists("current_compiler") + : finish + :endif + :let current_compiler = "mine" + +When you write a compiler file and put it in your personal runtime directory +(e.g., ~/.vim/compiler for Unix), you set the "current_compiler" variable to +make the default file skip the settings. + *:CompilerSet* +The second mechanism is to use ":set" for ":compiler!" and ":setlocal" for +":compiler". Vim defines the ":CompilerSet" user command for this. However, +older Vim versions don't, thus your plugin should define it then. This is an +example: > + + if exists(":CompilerSet") != 2 + command -nargs=* CompilerSet setlocal <args> + endif + CompilerSet errorformat& " use the default 'errorformat' + CompilerSet makeprg=nmake + +When you write a compiler plugin for the Vim distribution or for a system-wide +runtime directory, use the mechanism mentioned above. When +"current_compiler" was already set by a user plugin nothing will be done. + +When you write a compiler plugin to overrule settings from a default plugin, +don't check "current_compiler". This plugin is supposed to be loaded +last, thus it should be in a directory at the end of 'runtimepath'. For Unix +that could be ~/.vim/after/compiler. + +============================================================================== +*41.14* Writing a plugin that loads quickly *write-plugin-quickload* + +A plugin may grow and become quite long. The startup delay may become +noticeable, while you hardly ever use the plugin. Then it's time for a +quickload plugin. + +The basic idea is that the plugin is loaded twice. The first time user +commands and mappings are defined that offer the functionality. The second +time the functions that implement the functionality are defined. + +It may sound surprising that quickload means loading a script twice. What we +mean is that it loads quickly the first time, postponing the bulk of the +script to the second time, which only happens when you actually use it. When +you always use the functionality it actually gets slower! + +Note that since Vim 7 there is an alternative: use the |autoload| +functionality |41.15|. + +The following example shows how it's done: > + + " Vim global plugin for demonstrating quick loading + " Last Change: 2005 Feb 25 + " Maintainer: Bram Moolenaar <Bram@vim.org> + " License: This file is placed in the public domain. + + if !exists("s:did_load") + command -nargs=* BNRead call BufNetRead(<f-args>) + map <F19> :call BufNetWrite('something')<CR> + + let s:did_load = 1 + exe 'au FuncUndefined BufNet* source ' . expand('<sfile>') + finish + endif + + function BufNetRead(...) + echo 'BufNetRead(' . string(a:000) . ')' + " read functionality here + endfunction + + function BufNetWrite(...) + echo 'BufNetWrite(' . string(a:000) . ')' + " write functionality here + endfunction + +When the script is first loaded "s:did_load" is not set. The commands between +the "if" and "endif" will be executed. This ends in a |:finish| command, thus +the rest of the script is not executed. + +The second time the script is loaded "s:did_load" exists and the commands +after the "endif" are executed. This defines the (possible long) +BufNetRead() and BufNetWrite() functions. + +If you drop this script in your plugin directory Vim will execute it on +startup. This is the sequence of events that happens: + +1. The "BNRead" command is defined and the <F19> key is mapped when the script + is sourced at startup. A |FuncUndefined| autocommand is defined. The + ":finish" command causes the script to terminate early. + +2. The user types the BNRead command or presses the <F19> key. The + BufNetRead() or BufNetWrite() function will be called. + +3. Vim can't find the function and triggers the |FuncUndefined| autocommand + event. Since the pattern "BufNet*" matches the invoked function, the + command "source fname" will be executed. "fname" will be equal to the name + of the script, no matter where it is located, because it comes from + expanding "<sfile>" (see |expand()|). + +4. The script is sourced again, the "s:did_load" variable exists and the + functions are defined. + +Notice that the functions that are loaded afterwards match the pattern in the +|FuncUndefined| autocommand. You must make sure that no other plugin defines +functions that match this pattern. + +============================================================================== +*41.15* Writing library scripts *write-library-script* + +Some functionality will be required in several places. When this becomes more +than a few lines you will want to put it in one script and use it from many +scripts. We will call that one script a library script. + +Manually loading a library script is possible, so long as you avoid loading it +when it's already done. You can do this with the |exists()| function. +Example: > + + if !exists('*MyLibFunction') + runtime library/mylibscript.vim + endif + call MyLibFunction(arg) + +Here you need to know that MyLibFunction() is defined in a script +"library/mylibscript.vim" in one of the directories in 'runtimepath'. + +To make this a bit simpler Vim offers the autoload mechanism. Then the +example looks like this: > + + call mylib#myfunction(arg) + +That's a lot simpler, isn't it? Vim will recognize the function name and when +it's not defined search for the script "autoload/mylib.vim" in 'runtimepath'. +That script must define the "mylib#myfunction()" function. + +You can put many other functions in the mylib.vim script, you are free to +organize your functions in library scripts. But you must use function names +where the part before the '#' matches the script name. Otherwise Vim would +not know what script to load. + +If you get really enthusiastic and write lots of library scripts, you may +want to use subdirectories. Example: > + + call netlib#ftp#read('somefile') + +For Unix the library script used for this could be: + + ~/.vim/autoload/netlib/ftp.vim + +Where the function is defined like this: > + + function netlib#ftp#read(fname) + " Read the file fname through ftp + endfunction + +Notice that the name the function is defined with is exactly the same as the +name used for calling the function. And the part before the last '#' +exactly matches the subdirectory and script name. + +You can use the same mechanism for variables: > + + let weekdays = dutch#weekdays + +This will load the script "autoload/dutch.vim", which should contain something +like: > + + let dutch#weekdays = ['zondag', 'maandag', 'dinsdag', 'woensdag', + \ 'donderdag', 'vrijdag', 'zaterdag'] + +Further reading: |autoload|. + +============================================================================== +*41.16* Distributing Vim scripts *distribute-script* + +Vim users will look for scripts on the Vim website: http://www.vim.org. +If you made something that is useful for others, share it! + +Vim scripts can be used on any system. There might not be a tar or gzip +command. If you want to pack files together and/or compress them the "zip" +utility is recommended. + +For utmost portability use Vim itself to pack scripts together. This can be +done with the Vimball utility. See |vimball|. + +It's good if you add a line to allow automatic updating. See |glvs-plugins|. + +============================================================================== + +Next chapter: |usr_42.txt| Add new menus + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_42.txt b/runtime/doc/usr_42.txt new file mode 100644 index 0000000000..1d16112aa0 --- /dev/null +++ b/runtime/doc/usr_42.txt @@ -0,0 +1,365 @@ +*usr_42.txt* For Vim version 7.4. Last change: 2008 May 05 + + VIM USER MANUAL - by Bram Moolenaar + + Add new menus + + +By now you know that Vim is very flexible. This includes the menus used in +the GUI. You can define your own menu entries to make certain commands easily +accessible. This is for mouse-happy users only. + +|42.1| Introduction +|42.2| Menu commands +|42.3| Various +|42.4| Toolbar and popup menus + + Next chapter: |usr_43.txt| Using filetypes + Previous chapter: |usr_41.txt| Write a Vim script +Table of contents: |usr_toc.txt| + +============================================================================== +*42.1* Introduction + +The menus that Vim uses are defined in the file "$VIMRUNTIME/menu.vim". If +you want to write your own menus, you might first want to look through that +file. + To define a menu item, use the ":menu" command. The basic form of this +command is as follows: > + + :menu {menu-item} {keys} + +The {menu-item} describes where on the menu to put the item. A typical +{menu-item} is "File.Save", which represents the item "Save" under the +"File" menu. A dot is used to separate the names. Example: > + + :menu File.Save :update<CR> + +The ":update" command writes the file when it was modified. + You can add another level: "Edit.Settings.Shiftwidth" defines a submenu +"Settings" under the "Edit" menu, with an item "Shiftwidth". You could use +even deeper levels. Don't use this too much, you need to move the mouse quite +a bit to use such an item. + The ":menu" command is very similar to the ":map" command: the left side +specifies how the item is triggered and the right hand side defines the +characters that are executed. {keys} are characters, they are used just like +you would have typed them. Thus in Insert mode, when {keys} is plain text, +that text is inserted. + + +ACCELERATORS + +The ampersand character (&) is used to indicate an accelerator. For instance, +you can use Alt-F to select "File" and S to select "Save". (The 'winaltkeys' +option may disable this though!). Therefore, the {menu-item} looks like +"&File.&Save". The accelerator characters will be underlined in the menu. + You must take care that each key is used only once in each menu. Otherwise +you will not know which of the two will actually be used. Vim doesn't warn +you for this. + + +PRIORITIES + +The actual definition of the File.Save menu item is as follows: > + + :menu 10.340 &File.&Save<Tab>:w :confirm w<CR> + +The number 10.340 is called the priority number. It is used by the editor to +decide where it places the menu item. The first number (10) indicates the +position on the menu bar. Lower numbered menus are positioned to the left, +higher numbers to the right. + These are the priorities used for the standard menus: + + 10 20 40 50 60 70 9999 + + +------------------------------------------------------------+ + | File Edit Tools Syntax Buffers Window Help | + +------------------------------------------------------------+ + +Notice that the Help menu is given a very high number, to make it appear on +the far right. + The second number (340) determines the location of the item within the +pull-down menu. Lower numbers go on top, higher number on the bottom. These +are the priorities in the File menu: + + +-----------------+ + 10.310 |Open... | + 10.320 |Split-Open... | + 10.325 |New | + 10.330 |Close | + 10.335 |---------------- | + 10.340 |Save | + 10.350 |Save As... | + 10.400 |---------------- | + 10.410 |Split Diff with | + 10.420 |Split Patched By | + 10.500 |---------------- | + 10.510 |Print | + 10.600 |---------------- | + 10.610 |Save-Exit | + 10.620 |Exit | + +-----------------+ + +Notice that there is room in between the numbers. This is where you can +insert your own items, if you really want to (it's often better to leave the +standard menus alone and add a new menu for your own items). + When you create a submenu, you can add another ".number" to the priority. +Thus each name in {menu-item} has its priority number. + + +SPECIAL CHARACTERS + +The {menu-item} in this example is "&File.&Save<Tab>:w". This brings up an +important point: {menu-item} must be one word. If you want to put a dot, +space or tabs in the name, you either use the <> notation (<Space> and <Tab>, +for instance) or use the backslash (\) escape. > + + :menu 10.305 &File.&Do\ It\.\.\. :exit<CR> + +In this example, the name of the menu item "Do It..." contains a space and the +command is ":exit<CR>". + +The <Tab> character in a menu name is used to separate the part that defines +the menu name from the part that gives a hint to the user. The part after the +<Tab> is displayed right aligned in the menu. In the File.Save menu the name +used is "&File.&Save<Tab>:w". Thus the menu name is "File.Save" and the hint +is ":w". + + +SEPARATORS + +The separator lines, used to group related menu items together, can be defined +by using a name that starts and ends in a '-'. For example "-sep-". When +using several separators the names must be different. Otherwise the names +don't matter. + The command from a separator will never be executed, but you have to define +one anyway. A single colon will do. Example: > + + :amenu 20.510 Edit.-sep3- : + +============================================================================== +*42.2* Menu commands + +You can define menu items that exist for only certain modes. This works just +like the variations on the ":map" command: + + :menu Normal, Visual and Operator-pending mode + :nmenu Normal mode + :vmenu Visual mode + :omenu Operator-pending mode + :menu! Insert and Command-line mode + :imenu Insert mode + :cmenu Command-line mode + :amenu All modes + +To avoid that the commands of a menu item are being mapped, use the command +":noremenu", ":nnoremenu", ":anoremenu", etc. + + +USING :AMENU + +The ":amenu" command is a bit different. It assumes that the {keys} you +give are to be executed in Normal mode. When Vim is in Visual or Insert mode +when the menu is used, Vim first has to go back to Normal mode. ":amenu" +inserts a CTRL-C or CTRL-O for you. For example, if you use this command: +> + :amenu 90.100 Mine.Find\ Word * + +Then the resulting menu commands will be: + + Normal mode: * + Visual mode: CTRL-C * + Operator-pending mode: CTRL-C * + Insert mode: CTRL-O * + Command-line mode: CTRL-C * + +When in Command-line mode the CTRL-C will abandon the command typed so far. +In Visual and Operator-pending mode CTRL-C will stop the mode. The CTRL-O in +Insert mode will execute the command and then return to Insert mode. + CTRL-O only works for one command. If you need to use two or more +commands, put them in a function and call that function. Example: > + + :amenu Mine.Next\ File :call <SID>NextFile()<CR> + :function <SID>NextFile() + : next + : 1/^Code + :endfunction + +This menu entry goes to the next file in the argument list with ":next". Then +it searches for the line that starts with "Code". + The <SID> before the function name is the script ID. This makes the +function local to the current Vim script file. This avoids problems when a +function with the same name is defined in another script file. See |<SID>|. + + +SILENT MENUS + +The menu executes the {keys} as if you typed them. For a ":" command this +means you will see the command being echoed on the command line. If it's a +long command, the hit-Enter prompt will appear. That can be very annoying! + To avoid this, make the menu silent. This is done with the <silent> +argument. For example, take the call to NextFile() in the previous example. +When you use this menu, you will see this on the command line: + + :call <SNR>34_NextFile() ~ + +To avoid this text on the command line, insert "<silent>" as the first +argument: > + + :amenu <silent> Mine.Next\ File :call <SID>NextFile()<CR> + +Don't use "<silent>" too often. It is not needed for short commands. If you +make a menu for someone else, being able the see the executed command will +give him a hint about what he could have typed, instead of using the mouse. + + +LISTING MENUS + +When a menu command is used without a {keys} part, it lists the already +defined menus. You can specify a {menu-item}, or part of it, to list specific +menus. Example: > + + :amenu + +This lists all menus. That's a long list! Better specify the name of a menu +to get a shorter list: > + + :amenu Edit + +This lists only the "Edit" menu items for all modes. To list only one +specific menu item for Insert mode: > + + :imenu Edit.Undo + +Take care that you type exactly the right name. Case matters here. But the +'&' for accelerators can be omitted. The <Tab> and what comes after it can be +left out as well. + + +DELETING MENUS + +To delete a menu, the same command is used as for listing, but with "menu" +changed to "unmenu". Thus ":menu" becomes, ":unmenu", ":nmenu" becomes +":nunmenu", etc. To delete the "Tools.Make" item for Insert mode: > + + :iunmenu Tools.Make + +You can delete a whole menu, with all its items, by using the menu name. +Example: > + + :aunmenu Syntax + +This deletes the Syntax menu and all the items in it. + +============================================================================== +*42.3* Various + +You can change the appearance of the menus with flags in 'guioptions'. In the +default value they are all included, except "M". You can remove a flag with a +command like: > + + :set guioptions-=m +< + m When removed the menubar is not displayed. + + M When added the default menus are not loaded. + + g When removed the inactive menu items are not made grey + but are completely removed. (Does not work on all + systems.) + + t When removed the tearoff feature is not enabled. + +The dotted line at the top of a menu is not a separator line. When you select +this item, the menu is "teared-off": It is displayed in a separate window. +This is called a tearoff menu. This is useful when you use the same menu +often. + +For translating menu items, see |:menutrans|. + +Since the mouse has to be used to select a menu item, it is a good idea to use +the ":browse" command for selecting a file. And ":confirm" to get a dialog +instead of an error message, e.g., when the current buffer contains changes. +These two can be combined: > + + :amenu File.Open :browse confirm edit<CR> + +The ":browse" makes a file browser appear to select the file to edit. The +":confirm" will pop up a dialog when the current buffer has changes. You can +then select to save the changes, throw them away or cancel the command. + For more complicated items, the confirm() and inputdialog() functions can +be used. The default menus contain a few examples. + +============================================================================== +*42.4* Toolbar and popup menus + +There are two special menus: ToolBar and PopUp. Items that start with these +names do not appear in the normal menu bar. + + +TOOLBAR + +The toolbar appears only when the "T" flag is included in the 'guioptions' +option. + The toolbar uses icons rather than text to represent the command. For +example, the {menu-item} named "ToolBar.New" causes the "New" icon to appear +on the toolbar. + The Vim editor has 28 built-in icons. You can find a table here: +|builtin-tools|. Most of them are used in the default toolbar. You can +redefine what these items do (after the default menus are setup). + You can add another bitmap for a toolbar item. Or define a new toolbar +item with a bitmap. For example, define a new toolbar item with: > + + :tmenu ToolBar.Compile Compile the current file + :amenu ToolBar.Compile :!cc %:S -o %:r:S<CR> + +Now you need to create the icon. For MS-Windows it must be in bitmap format, +with the name "Compile.bmp". For Unix XPM format is used, the file name is +"Compile.xpm". The size must be 18 by 18 pixels. On MS-Windows other sizes +can be used as well, but it will look ugly. + Put the bitmap in the directory "bitmaps" in one of the directories from +'runtimepath'. E.g., for Unix "~/.vim/bitmaps/Compile.xpm". + +You can define tooltips for the items in the toolbar. A tooltip is a short +text that explains what a toolbar item will do. For example "Open file". It +appears when the mouse pointer is on the item, without moving for a moment. +This is very useful if the meaning of the picture isn't that obvious. +Example: > + + :tmenu ToolBar.Make Run make in the current directory +< + Note: + Pay attention to the case used. "Toolbar" and "toolbar" are different + from "ToolBar"! + +To remove a tooltip, use the |:tunmenu| command. + +The 'toolbar' option can be used to display text instead of a bitmap, or both +text and a bitmap. Most people use just the bitmap, since the text takes +quite a bit of space. + + +POPUP MENU + +The popup menu pops up where the mouse pointer is. On MS-Windows you activate +it by clicking the right mouse button. Then you can select an item with the +left mouse button. On Unix the popup menu is used by pressing and holding the +right mouse button. + The popup menu only appears when the 'mousemodel' has been set to "popup" +or "popup_setpos". The difference between the two is that "popup_setpos" +moves the cursor to the mouse pointer position. When clicking inside a +selection, the selection will be used unmodified. When there is a selection +but you click outside of it, the selection is removed. + There is a separate popup menu for each mode. Thus there are never grey +items like in the normal menus. + +What is the meaning of life, the universe and everything? *42* +Douglas Adams, the only person who knew what this question really was about is +now dead, unfortunately. So now you might wonder what the meaning of death +is... + +============================================================================== + +Next chapter: |usr_43.txt| Using filetypes + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_43.txt b/runtime/doc/usr_43.txt new file mode 100644 index 0000000000..6eaa9c14a5 --- /dev/null +++ b/runtime/doc/usr_43.txt @@ -0,0 +1,173 @@ +*usr_43.txt* For Vim version 7.4. Last change: 2008 Dec 28 + + VIM USER MANUAL - by Bram Moolenaar + + Using filetypes + + +When you are editing a file of a certain type, for example a C program or a +shell script, you often use the same option settings and mappings. You +quickly get tired of manually setting these each time. This chapter explains +how to do it automatically. + +|43.1| Plugins for a filetype +|43.2| Adding a filetype + + Next chapter: |usr_44.txt| Your own syntax highlighted + Previous chapter: |usr_42.txt| Add new menus +Table of contents: |usr_toc.txt| + +============================================================================== +*43.1* Plugins for a filetype *filetype-plugin* + +How to start using filetype plugins has already been discussed here: +|add-filetype-plugin|. But you probably are not satisfied with the default +settings, because they have been kept minimal. Suppose that for C files you +want to set the 'softtabstop' option to 4 and define a mapping to insert a +three-line comment. You do this with only two steps: + + *your-runtime-dir* +1. Create your own runtime directory. On Unix this usually is "~/.vim". In + this directory create the "ftplugin" directory: > + + mkdir ~/.vim + mkdir ~/.vim/ftplugin +< + When you are not on Unix, check the value of the 'runtimepath' option to + see where Vim will look for the "ftplugin" directory: > + + set runtimepath + +< You would normally use the first directory name (before the first comma). + You might want to prepend a directory name to the 'runtimepath' option in + your |vimrc| file if you don't like the default value. + +2. Create the file "~/.vim/ftplugin/c.vim", with the contents: > + + setlocal softtabstop=4 + noremap <buffer> <LocalLeader>c o/**************<CR><CR>/<Esc> + +Try editing a C file. You should notice that the 'softtabstop' option is set +to 4. But when you edit another file it's reset to the default zero. That is +because the ":setlocal" command was used. This sets the 'softtabstop' option +only locally to the buffer. As soon as you edit another buffer, it will be +set to the value set for that buffer. For a new buffer it will get the +default value or the value from the last ":set" command. + +Likewise, the mapping for "\c" will disappear when editing another buffer. +The ":map <buffer>" command creates a mapping that is local to the current +buffer. This works with any mapping command: ":map!", ":vmap", etc. The +|<LocalLeader>| in the mapping is replaced with the value of the +"maplocalleader" variable. + +You can find examples for filetype plugins in this directory: > + + $VIMRUNTIME/ftplugin/ + +More details about writing a filetype plugin can be found here: +|write-plugin|. + +============================================================================== +*43.2* Adding a filetype + +If you are using a type of file that is not recognized by Vim, this is how to +get it recognized. You need a runtime directory of your own. See +|your-runtime-dir| above. + +Create a file "filetype.vim" which contains an autocommand for your filetype. +(Autocommands were explained in section |40.3|.) Example: > + + augroup filetypedetect + au BufNewFile,BufRead *.xyz setf xyz + augroup END + +This will recognize all files that end in ".xyz" as the "xyz" filetype. The +":augroup" commands put this autocommand in the "filetypedetect" group. This +allows removing all autocommands for filetype detection when doing ":filetype +off". The "setf" command will set the 'filetype' option to its argument, +unless it was set already. This will make sure that 'filetype' isn't set +twice. + +You can use many different patterns to match the name of your file. Directory +names can also be included. See |autocmd-patterns|. For example, the files +under "/usr/share/scripts/" are all "ruby" files, but don't have the expected +file name extension. Adding this to the example above: > + + augroup filetypedetect + au BufNewFile,BufRead *.xyz setf xyz + au BufNewFile,BufRead /usr/share/scripts/* setf ruby + augroup END + +However, if you now edit a file /usr/share/scripts/README.txt, this is not a +ruby file. The danger of a pattern ending in "*" is that it quickly matches +too many files. To avoid trouble with this, put the filetype.vim file in +another directory, one that is at the end of 'runtimepath'. For Unix for +example, you could use "~/.vim/after/filetype.vim". + You now put the detection of text files in ~/.vim/filetype.vim: > + + augroup filetypedetect + au BufNewFile,BufRead *.txt setf text + augroup END + +That file is found in 'runtimepath' first. Then use this in +~/.vim/after/filetype.vim, which is found last: > + + augroup filetypedetect + au BufNewFile,BufRead /usr/share/scripts/* setf ruby + augroup END + +What will happen now is that Vim searches for "filetype.vim" files in each +directory in 'runtimepath'. First ~/.vim/filetype.vim is found. The +autocommand to catch *.txt files is defined there. Then Vim finds the +filetype.vim file in $VIMRUNTIME, which is halfway 'runtimepath'. Finally +~/.vim/after/filetype.vim is found and the autocommand for detecting ruby +files in /usr/share/scripts is added. + When you now edit /usr/share/scripts/README.txt, the autocommands are +checked in the order in which they were defined. The *.txt pattern matches, +thus "setf text" is executed to set the filetype to "text". The pattern for +ruby matches too, and the "setf ruby" is executed. But since 'filetype' was +already set to "text", nothing happens here. + When you edit the file /usr/share/scripts/foobar the same autocommands are +checked. Only the one for ruby matches and "setf ruby" sets 'filetype' to +ruby. + + +RECOGNIZING BY CONTENTS + +If your file cannot be recognized by its file name, you might be able to +recognize it by its contents. For example, many script files start with a +line like: + + #!/bin/xyz ~ + +To recognize this script create a file "scripts.vim" in your runtime directory +(same place where filetype.vim goes). It might look like this: > + + if did_filetype() + finish + endif + if getline(1) =~ '^#!.*[/\\]xyz\>' + setf xyz + endif + +The first check with did_filetype() is to avoid that you will check the +contents of files for which the filetype was already detected by the file +name. That avoids wasting time on checking the file when the "setf" command +won't do anything. + The scripts.vim file is sourced by an autocommand in the default +filetype.vim file. Therefore, the order of checks is: + + 1. filetype.vim files before $VIMRUNTIME in 'runtimepath' + 2. first part of $VIMRUNTIME/filetype.vim + 3. all scripts.vim files in 'runtimepath' + 4. remainder of $VIMRUNTIME/filetype.vim + 5. filetype.vim files after $VIMRUNTIME in 'runtimepath' + +If this is not sufficient for you, add an autocommand that matches all files +and sources a script or executes a function to check the contents of the file. + +============================================================================== + +Next chapter: |usr_44.txt| Your own syntax highlighted + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_44.txt b/runtime/doc/usr_44.txt new file mode 100644 index 0000000000..48f661eb07 --- /dev/null +++ b/runtime/doc/usr_44.txt @@ -0,0 +1,719 @@ +*usr_44.txt* For Vim version 7.4. Last change: 2008 Dec 28 + + VIM USER MANUAL - by Bram Moolenaar + + Your own syntax highlighted + + +Vim comes with highlighting for a couple of hundred different file types. If +the file you are editing isn't included, read this chapter to find out how to +get this type of file highlighted. Also see |:syn-define| in the reference +manual. + +|44.1| Basic syntax commands +|44.2| Keywords +|44.3| Matches +|44.4| Regions +|44.5| Nested items +|44.6| Following groups +|44.7| Other arguments +|44.8| Clusters +|44.9| Including another syntax file +|44.10| Synchronizing +|44.11| Installing a syntax file +|44.12| Portable syntax file layout + + Next chapter: |usr_45.txt| Select your language + Previous chapter: |usr_43.txt| Using filetypes +Table of contents: |usr_toc.txt| + +============================================================================== +*44.1* Basic syntax commands + +Using an existing syntax file to start with will save you a lot of time. Try +finding a syntax file in $VIMRUNTIME/syntax for a language that is similar. +These files will also show you the normal layout of a syntax file. To +understand it, you need to read the following. + +Let's start with the basic arguments. Before we start defining any new +syntax, we need to clear out any old definitions: > + + :syntax clear + +This isn't required in the final syntax file, but very useful when +experimenting. + +There are more simplifications in this chapter. If you are writing a syntax +file to be used by others, read all the way through the end to find out the +details. + + +LISTING DEFINED ITEMS + +To check which syntax items are currently defined, use this command: > + + :syntax + +You can use this to check which items have actually been defined. Quite +useful when you are experimenting with a new syntax file. It also shows the +colors used for each item, which helps to find out what is what. + To list the items in a specific syntax group use: > + + :syntax list {group-name} + +This also can be used to list clusters (explained in |44.8|). Just include +the @ in the name. + + +MATCHING CASE + +Some languages are not case sensitive, such as Pascal. Others, such as C, are +case sensitive. You need to tell which type you have with the following +commands: > + :syntax case match + :syntax case ignore + +The "match" argument means that Vim will match the case of syntax elements. +Therefore, "int" differs from "Int" and "INT". If the "ignore" argument is +used, the following are equivalent: "Procedure", "PROCEDURE" and "procedure". + The ":syntax case" commands can appear anywhere in a syntax file and affect +the syntax definitions that follow. In most cases, you have only one ":syntax +case" command in your syntax file; if you work with an unusual language that +contains both case-sensitive and non-case-sensitive elements, however, you can +scatter the ":syntax case" command throughout the file. + +============================================================================== +*44.2* Keywords + +The most basic syntax elements are keywords. To define a keyword, use the +following form: > + + :syntax keyword {group} {keyword} ... + +The {group} is the name of a syntax group. With the ":highlight" command you +can assign colors to a {group}. The {keyword} argument is an actual keyword. +Here are a few examples: > + + :syntax keyword xType int long char + :syntax keyword xStatement if then else endif + +This example uses the group names "xType" and "xStatement". By convention, +each group name is prefixed by the filetype for the language being defined. +This example defines syntax for the x language (eXample language without an +interesting name). In a syntax file for "csh" scripts the name "cshType" +would be used. Thus the prefix is equal to the value of 'filetype'. + These commands cause the words "int", "long" and "char" to be highlighted +one way and the words "if", "then", "else" and "endif" to be highlighted +another way. Now you need to connect the x group names to standard Vim +names. You do this with the following commands: > + + :highlight link xType Type + :highlight link xStatement Statement + +This tells Vim to highlight "xType" like "Type" and "xStatement" like +"Statement". See |group-name| for the standard names. + + +UNUSUAL KEYWORDS + +The characters used in a keyword must be in the 'iskeyword' option. If you +use another character, the word will never match. Vim doesn't give a warning +message for this. + The x language uses the '-' character in keywords. This is how it's done: +> + :setlocal iskeyword+=- + :syntax keyword xStatement when-not + +The ":setlocal" command is used to change 'iskeyword' only for the current +buffer. Still it does change the behavior of commands like "w" and "*". If +that is not wanted, don't define a keyword but use a match (explained in the +next section). + +The x language allows for abbreviations. For example, "next" can be +abbreviated to "n", "ne" or "nex". You can define them by using this command: +> + :syntax keyword xStatement n[ext] + +This doesn't match "nextone", keywords always match whole words only. + +============================================================================== +*44.3* Matches + +Consider defining something a bit more complex. You want to match ordinary +identifiers. To do this, you define a match syntax item. This one matches +any word consisting of only lowercase letters: > + + :syntax match xIdentifier /\<\l\+\>/ +< + Note: + Keywords overrule any other syntax item. Thus the keywords "if", + "then", etc., will be keywords, as defined with the ":syntax keyword" + commands above, even though they also match the pattern for + xIdentifier. + +The part at the end is a pattern, like it's used for searching. The // is +used to surround the pattern (like how it's done in a ":substitute" command). +You can use any other character, like a plus or a quote. + +Now define a match for a comment. In the x language it is anything from # to +the end of a line: > + + :syntax match xComment /#.*/ + +Since you can use any search pattern, you can highlight very complex things +with a match item. See |pattern| for help on search patterns. + +============================================================================== +*44.4* Regions + +In the example x language, strings are enclosed in double quotation marks ("). +To highlight strings you define a region. You need a region start (double +quote) and a region end (double quote). The definition is as follows: > + + :syntax region xString start=/"/ end=/"/ + +The "start" and "end" directives define the patterns used to find the start +and end of the region. But what about strings that look like this? + + "A string with a double quote (\") in it" ~ + +This creates a problem: The double quotation marks in the middle of the string +will end the region. You need to tell Vim to skip over any escaped double +quotes in the string. Do this with the skip keyword: > + + :syntax region xString start=/"/ skip=/\\"/ end=/"/ + +The double backslash matches a single backslash, since the backslash is a +special character in search patterns. + +When to use a region instead of a match? The main difference is that a match +item is a single pattern, which must match as a whole. A region starts as +soon as the "start" pattern matches. Whether the "end" pattern is found or +not doesn't matter. Thus when the item depends on the "end" pattern to match, +you cannot use a region. Otherwise, regions are often simpler to define. And +it is easier to use nested items, as is explained in the next section. + +============================================================================== +*44.5* Nested items + +Take a look at this comment: + + %Get input TODO: Skip white space ~ + +You want to highlight TODO in big yellow letters, even though it is in a +comment that is highlighted blue. To let Vim know about this, you define the +following syntax groups: > + + :syntax keyword xTodo TODO contained + :syntax match xComment /%.*/ contains=xTodo + +In the first line, the "contained" argument tells Vim that this keyword can +exist only inside another syntax item. The next line has "contains=xTodo". +This indicates that the xTodo syntax element is inside it. The result is that +the comment line as a whole is matched with "xComment" and made blue. The +word TODO inside it is matched by xTodo and highlighted yellow (highlighting +for xTodo was setup for this). + + +RECURSIVE NESTING + +The x language defines code blocks in curly braces. And a code block may +contain other code blocks. This can be defined this way: > + + :syntax region xBlock start=/{/ end=/}/ contains=xBlock + +Suppose you have this text: + + while i < b { ~ + if a { ~ + b = c; ~ + } ~ + } ~ + +First a xBlock starts at the { in the first line. In the second line another +{ is found. Since we are inside a xBlock item, and it contains itself, a +nested xBlock item will start here. Thus the "b = c" line is inside the +second level xBlock region. Then a } is found in the next line, which matches +with the end pattern of the region. This ends the nested xBlock. Because the +} is included in the nested region, it is hidden from the first xBlock region. +Then at the last } the first xBlock region ends. + + +KEEPING THE END + +Consider the following two syntax items: > + + :syntax region xComment start=/%/ end=/$/ contained + :syntax region xPreProc start=/#/ end=/$/ contains=xComment + +You define a comment as anything from % to the end of the line. A +preprocessor directive is anything from # to the end of the line. Because you +can have a comment on a preprocessor line, the preprocessor definition +includes a "contains=xComment" argument. Now look what happens with this +text: + + #define X = Y % Comment text ~ + int foo = 1; ~ + +What you see is that the second line is also highlighted as xPreProc. The +preprocessor directive should end at the end of the line. That is why +you have used "end=/$/". So what is going wrong? + The problem is the contained comment. The comment starts with % and ends +at the end of the line. After the comment ends, the preprocessor syntax +continues. This is after the end of the line has been seen, so the next +line is included as well. + To avoid this problem and to avoid a contained syntax item eating a needed +end of line, use the "keepend" argument. This takes care of +the double end-of-line matching: > + + :syntax region xComment start=/%/ end=/$/ contained + :syntax region xPreProc start=/#/ end=/$/ contains=xComment keepend + + +CONTAINING MANY ITEMS + +You can use the contains argument to specify that everything can be contained. +For example: > + + :syntax region xList start=/\[/ end=/\]/ contains=ALL + +All syntax items will be contained in this one. It also contains itself, but +not at the same position (that would cause an endless loop). + You can specify that some groups are not contained. Thus contain all +groups but the ones that are listed: +> + :syntax region xList start=/\[/ end=/\]/ contains=ALLBUT,xString + +With the "TOP" item you can include all items that don't have a "contained" +argument. "CONTAINED" is used to only include items with a "contained" +argument. See |:syn-contains| for the details. + +============================================================================== +*44.6* Following groups + +The x language has statements in this form: + + if (condition) then ~ + +You want to highlight the three items differently. But "(condition)" and +"then" might also appear in other places, where they get different +highlighting. This is how you can do this: > + + :syntax match xIf /if/ nextgroup=xIfCondition skipwhite + :syntax match xIfCondition /([^)]*)/ contained nextgroup=xThen skipwhite + :syntax match xThen /then/ contained + +The "nextgroup" argument specifies which item can come next. This is not +required. If none of the items that are specified are found, nothing happens. +For example, in this text: + + if not (condition) then ~ + +The "if" is matched by xIf. "not" doesn't match the specified nextgroup +xIfCondition, thus only the "if" is highlighted. + +The "skipwhite" argument tells Vim that white space (spaces and tabs) may +appear in between the items. Similar arguments are "skipnl", which allows a +line break in between the items, and "skipempty", which allows empty lines. +Notice that "skipnl" doesn't skip an empty line, something must match after +the line break. + +============================================================================== +*44.7* Other arguments + +MATCHGROUP + +When you define a region, the entire region is highlighted according to the +group name specified. To highlight the text enclosed in parentheses () with +the group xInside, for example, use the following command: > + + :syntax region xInside start=/(/ end=/)/ + +Suppose, that you want to highlight the parentheses differently. You can do +this with a lot of convoluted region statements, or you can use the +"matchgroup" argument. This tells Vim to highlight the start and end of a +region with a different highlight group (in this case, the xParen group): > + + :syntax region xInside matchgroup=xParen start=/(/ end=/)/ + +The "matchgroup" argument applies to the start or end match that comes after +it. In the previous example both start and end are highlighted with xParen. +To highlight the end with xParenEnd: > + + :syntax region xInside matchgroup=xParen start=/(/ + \ matchgroup=xParenEnd end=/)/ + +A side effect of using "matchgroup" is that contained items will not match in +the start or end of the region. The example for "transparent" uses this. + + +TRANSPARENT + +In a C language file you would like to highlight the () text after a "while" +differently from the () text after a "for". In both of these there can be +nested () items, which should be highlighted in the same way. You must make +sure the () highlighting stops at the matching ). This is one way to do this: +> + :syntax region cWhile matchgroup=cWhile start=/while\s*(/ end=/)/ + \ contains=cCondNest + :syntax region cFor matchgroup=cFor start=/for\s*(/ end=/)/ + \ contains=cCondNest + :syntax region cCondNest start=/(/ end=/)/ contained transparent + +Now you can give cWhile and cFor different highlighting. The cCondNest item +can appear in either of them, but take over the highlighting of the item it is +contained in. The "transparent" argument causes this. + Notice that the "matchgroup" argument has the same group as the item +itself. Why define it then? Well, the side effect of using a matchgroup is +that contained items are not found in the match with the start item then. +This avoids that the cCondNest group matches the ( just after the "while" or +"for". If this would happen, it would span the whole text until the matching +) and the region would continue after it. Now cCondNest only matches after +the match with the start pattern, thus after the first (. + + +OFFSETS + +Suppose you want to define a region for the text between ( and ) after an +"if". But you don't want to include the "if" or the ( and ). You can do this +by specifying offsets for the patterns. Example: > + + :syntax region xCond start=/if\s*(/ms=e+1 end=/)/me=s-1 + +The offset for the start pattern is "ms=e+1". "ms" stands for Match Start. +This defines an offset for the start of the match. Normally the match starts +where the pattern matches. "e+1" means that the match now starts at the end +of the pattern match, and then one character further. + The offset for the end pattern is "me=s-1". "me" stands for Match End. +"s-1" means the start of the pattern match and then one character back. The +result is that in this text: + + if (foo == bar) ~ + +Only the text "foo == bar" will be highlighted as xCond. + +More about offsets here: |:syn-pattern-offset|. + + +ONELINE + +The "oneline" argument indicates that the region does not cross a line +boundary. For example: > + + :syntax region xIfThen start=/if/ end=/then/ oneline + +This defines a region that starts at "if" and ends at "then". But if there is +no "then" after the "if", the region doesn't match. + + Note: + When using "oneline" the region doesn't start if the end pattern + doesn't match in the same line. Without "oneline" Vim does _not_ + check if there is a match for the end pattern. The region starts even + when the end pattern doesn't match in the rest of the file. + + +CONTINUATION LINES AND AVOIDING THEM + +Things now become a little more complex. Let's define a preprocessor line. +This starts with a # in the first column and continues until the end of the +line. A line that ends with \ makes the next line a continuation line. The +way you handle this is to allow the syntax item to contain a continuation +pattern: > + + :syntax region xPreProc start=/^#/ end=/$/ contains=xLineContinue + :syntax match xLineContinue "\\$" contained + +In this case, although xPreProc normally matches a single line, the group +contained in it (namely xLineContinue) lets it go on for more than one line. +For example, it would match both of these lines: + + #define SPAM spam spam spam \ ~ + bacon and spam ~ + +In this case, this is what you want. If it is not what you want, you can call +for the region to be on a single line by adding "excludenl" to the contained +pattern. For example, you want to highlight "end" in xPreProc, but only at +the end of the line. To avoid making the xPreProc continue on the next line, +like xLineContinue does, use "excludenl" like this: > + + :syntax region xPreProc start=/^#/ end=/$/ + \ contains=xLineContinue,xPreProcEnd + :syntax match xPreProcEnd excludenl /end$/ contained + :syntax match xLineContinue "\\$" contained + +"excludenl" must be placed before the pattern. Since "xLineContinue" doesn't +have "excludenl", a match with it will extend xPreProc to the next line as +before. + +============================================================================== +*44.8* Clusters + +One of the things you will notice as you start to write a syntax file is that +you wind up generating a lot of syntax groups. Vim enables you to define a +collection of syntax groups called a cluster. + Suppose you have a language that contains for loops, if statements, while +loops, and functions. Each of them contains the same syntax elements: numbers +and identifiers. You define them like this: > + + :syntax match xFor /^for.*/ contains=xNumber,xIdent + :syntax match xIf /^if.*/ contains=xNumber,xIdent + :syntax match xWhile /^while.*/ contains=xNumber,xIdent + +You have to repeat the same "contains=" every time. If you want to add +another contained item, you have to add it three times. Syntax clusters +simplify these definitions by enabling you to have one cluster stand for +several syntax groups. + To define a cluster for the two items that the three groups contain, use +the following command: > + + :syntax cluster xState contains=xNumber,xIdent + +Clusters are used inside other syntax items just like any syntax group. +Their names start with @. Thus, you can define the three groups like this: > + + :syntax match xFor /^for.*/ contains=@xState + :syntax match xIf /^if.*/ contains=@xState + :syntax match xWhile /^while.*/ contains=@xState + +You can add new group names to this cluster with the "add" argument: > + + :syntax cluster xState add=xString + +You can remove syntax groups from this list as well: > + + :syntax cluster xState remove=xNumber + +============================================================================== +*44.9* Including another syntax file + +The C++ language syntax is a superset of the C language. Because you do not +want to write two syntax files, you can have the C++ syntax file read in the +one for C by using the following command: > + + :runtime! syntax/c.vim + +The ":runtime!" command searches 'runtimepath' for all "syntax/c.vim" files. +This makes the C parts of the C++ syntax be defined like for C files. If you +have replaced the c.vim syntax file, or added items with an extra file, these +will be loaded as well. + After loading the C syntax items the specific C++ items can be defined. +For example, add keywords that are not used in C: > + + :syntax keyword cppStatement new delete this friend using + +This works just like in any other syntax file. + +Now consider the Perl language. A Perl script consists of two distinct parts: +a documentation section in POD format, and a program written in Perl itself. +The POD section starts with "=head" and ends with "=cut". + You want to define the POD syntax in one file, and use it from the Perl +syntax file. The ":syntax include" command reads in a syntax file and stores +the elements it defined in a syntax cluster. For Perl, the statements are as +follows: > + + :syntax include @Pod <sfile>:p:h/pod.vim + :syntax region perlPOD start=/^=head/ end=/^=cut/ contains=@Pod + +When "=head" is found in a Perl file, the perlPOD region starts. In this +region the @Pod cluster is contained. All the items defined as top-level +items in the pod.vim syntax files will match here. When "=cut" is found, the +region ends and we go back to the items defined in the Perl file. + The ":syntax include" command is clever enough to ignore a ":syntax clear" +command in the included file. And an argument such as "contains=ALL" will +only contain items defined in the included file, not in the file that includes +it. + The "<sfile>:p:h/" part uses the name of the current file (<sfile>), +expands it to a full path (:p) and then takes the head (:h). This results in +the directory name of the file. This causes the pod.vim file in the same +directory to be included. + +============================================================================== +*44.10* Synchronizing + +Compilers have it easy. They start at the beginning of a file and parse it +straight through. Vim does not have it so easy. It must start in the middle, +where the editing is being done. So how does it tell where it is? + The secret is the ":syntax sync" command. This tells Vim how to figure out +where it is. For example, the following command tells Vim to scan backward +for the beginning or end of a C-style comment and begin syntax coloring from +there: > + + :syntax sync ccomment + +You can tune this processing with some arguments. The "minlines" argument +tells Vim the minimum number of lines to look backward, and "maxlines" tells +the editor the maximum number of lines to scan. + For example, the following command tells Vim to look at least 10 lines +before the top of the screen: > + + :syntax sync ccomment minlines=10 maxlines=500 + +If it cannot figure out where it is in that space, it starts looking farther +and farther back until it figures out what to do. But it looks no farther +back than 500 lines. (A large "maxlines" slows down processing. A small one +might cause synchronization to fail.) + To make synchronizing go a bit faster, tell Vim which syntax items can be +skipped. Every match and region that only needs to be used when actually +displaying text can be given the "display" argument. + By default, the comment to be found will be colored as part of the Comment +syntax group. If you want to color things another way, you can specify a +different syntax group: > + + :syntax sync ccomment xAltComment + +If your programming language does not have C-style comments in it, you can try +another method of synchronization. The simplest way is to tell Vim to space +back a number of lines and try to figure out things from there. The following +command tells Vim to go back 150 lines and start parsing from there: > + + :syntax sync minlines=150 + +A large "minlines" value can make Vim slower, especially when scrolling +backwards in the file. + Finally, you can specify a syntax group to look for by using this command: +> + :syntax sync match {sync-group-name} + \ grouphere {group-name} {pattern} + +This tells Vim that when it sees {pattern} the syntax group named {group-name} +begins just after the pattern given. The {sync-group-name} is used to give a +name to this synchronization specification. For example, the sh scripting +language begins an if statement with "if" and ends it with "fi": + + if [ --f file.txt ] ; then ~ + echo "File exists" ~ + fi ~ + +To define a "grouphere" directive for this syntax, you use the following +command: > + + :syntax sync match shIfSync grouphere shIf "\<if\>" + +The "groupthere" argument tells Vim that the pattern ends a group. For +example, the end of the if/fi group is as follows: > + + :syntax sync match shIfSync groupthere NONE "\<fi\>" + +In this example, the NONE tells Vim that you are not in any special syntax +region. In particular, you are not inside an if block. + +You also can define matches and regions that are with no "grouphere" or +"groupthere" arguments. These groups are for syntax groups skipped during +synchronization. For example, the following skips over anything inside {}, +even if it would normally match another synchronization method: > + + :syntax sync match xSpecial /{.*}/ + +More about synchronizing in the reference manual: |:syn-sync|. + +============================================================================== +*44.11* Installing a syntax file + +When your new syntax file is ready to be used, drop it in a "syntax" directory +in 'runtimepath'. For Unix that would be "~/.vim/syntax". + The name of the syntax file must be equal to the file type, with ".vim" +added. Thus for the x language, the full path of the file would be: + + ~/.vim/syntax/x.vim ~ + +You must also make the file type be recognized. See |43.2|. + +If your file works well, you might want to make it available to other Vim +users. First read the next section to make sure your file works well for +others. Then e-mail it to the Vim maintainer: <maintainer@vim.org>. Also +explain how the filetype can be detected. With a bit of luck your file will +be included in the next Vim version! + + +ADDING TO AN EXISTING SYNTAX FILE + +We were assuming you were adding a completely new syntax file. When an existing +syntax file works, but is missing some items, you can add items in a separate +file. That avoids changing the distributed syntax file, which will be lost +when installing a new version of Vim. + Write syntax commands in your file, possibly using group names from the +existing syntax. For example, to add new variable types to the C syntax file: +> + :syntax keyword cType off_t uint + +Write the file with the same name as the original syntax file. In this case +"c.vim". Place it in a directory near the end of 'runtimepath'. This makes +it loaded after the original syntax file. For Unix this would be: + + ~/.vim/after/syntax/c.vim ~ + +============================================================================== +*44.12* Portable syntax file layout + +Wouldn't it be nice if all Vim users exchange syntax files? To make this +possible, the syntax file must follow a few guidelines. + +Start with a header that explains what the syntax file is for, who maintains +it and when it was last updated. Don't include too much information about +changes history, not many people will read it. Example: > + + " Vim syntax file + " Language: C + " Maintainer: Bram Moolenaar <Bram@vim.org> + " Last Change: 2001 Jun 18 + " Remark: Included by the C++ syntax. + +Use the same layout as the other syntax files. Using an existing syntax file +as an example will save you a lot of time. + +Choose a good, descriptive name for your syntax file. Use lowercase letters +and digits. Don't make it too long, it is used in many places: The name of +the syntax file "name.vim", 'filetype', b:current_syntax and the start of each +syntax group (nameType, nameStatement, nameString, etc). + +Start with a check for "b:current_syntax". If it is defined, some other +syntax file, earlier in 'runtimepath' was already loaded: > + + if exists("b:current_syntax") + finish + endif + +To be compatible with Vim 5.8 use: > + + if version < 600 + syntax clear + elseif exists("b:current_syntax") + finish + endif + +Set "b:current_syntax" to the name of the syntax at the end. Don't forget +that included files do this too, you might have to reset "b:current_syntax" if +you include two files. + +If you want your syntax file to work with Vim 5.x, add a check for v:version. +See yacc.vim for an example. + +Do not include anything that is a user preference. Don't set 'tabstop', +'expandtab', etc. These belong in a filetype plugin. + +Do not include mappings or abbreviations. Only include setting 'iskeyword' if +it is really necessary for recognizing keywords. + +To allow users select their own preferred colors, make a different group name +for every kind of highlighted item. Then link each of them to one of the +standard highlight groups. That will make it work with every color scheme. +If you select specific colors it will look bad with some color schemes. And +don't forget that some people use a different background color, or have only +eight colors available. + +For the linking use "hi def link", so that the user can select different +highlighting before your syntax file is loaded. Example: > + + hi def link nameString String + hi def link nameNumber Number + hi def link nameCommand Statement + ... etc ... + +Add the "display" argument to items that are not used when syncing, to speed +up scrolling backwards and CTRL-L. + +============================================================================== + +Next chapter: |usr_45.txt| Select your language + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_45.txt b/runtime/doc/usr_45.txt new file mode 100644 index 0000000000..828ea6fe2d --- /dev/null +++ b/runtime/doc/usr_45.txt @@ -0,0 +1,419 @@ +*usr_45.txt* For Vim version 7.4. Last change: 2008 Nov 15 + + VIM USER MANUAL - by Bram Moolenaar + + Select your language + + +The messages in Vim can be given in several languages. This chapter explains +how to change which one is used. Also, the different ways to work with files +in various languages is explained. + +|45.1| Language for Messages +|45.2| Language for Menus +|45.3| Using another encoding +|45.4| Editing files with a different encoding +|45.5| Entering language text + + Next chapter: |usr_90.txt| Installing Vim + Previous chapter: |usr_44.txt| Your own syntax highlighted +Table of contents: |usr_toc.txt| + +============================================================================== +*45.1* Language for Messages + +When you start Vim, it checks the environment to find out what language you +are using. Mostly this should work fine, and you get the messages in your +language (if they are available). To see what the current language is, use +this command: > + + :language + +If it replies with "C", this means the default is being used, which is +English. + + Note: + Using different languages only works when Vim was compiled to handle + it. To find out if it works, use the ":version" command and check the + output for "+gettext" and "+multi_lang". If they are there, you are + OK. If you see "-gettext" or "-multi_lang" you will have to find + another Vim. + +What if you would like your messages in a different language? There are +several ways. Which one you should use depends on the capabilities of your +system. + The first way is to set the environment to the desired language before +starting Vim. Example for Unix: > + + env LANG=de_DE.ISO_8859-1 vim + +This only works if the language is available on your system. The advantage is +that all the GUI messages and things in libraries will use the right language +as well. A disadvantage is that you must do this before starting Vim. If you +want to change language while Vim is running, you can use the second method: > + + :language fr_FR.ISO_8859-1 + +This way you can try out several names for your language. You will get an +error message when it's not supported on your system. You don't get an error +when translated messages are not available. Vim will silently fall back to +using English. + To find out which languages are supported on your system, find the +directory where they are listed. On my system it is "/usr/share/locale". On +some systems it's in "/usr/lib/locale". The manual page for "setlocale" +should give you a hint where it is found on your system. + Be careful to type the name exactly as it should be. Upper and lowercase +matter, and the '-' and '_' characters are easily confused. + +You can also set the language separately for messages, edited text and the +time format. See |:language|. + + +DO-IT-YOURSELF MESSAGE TRANSLATION + +If translated messages are not available for your language, you could write +them yourself. To do this, get the source code for Vim and the GNU gettext +package. After unpacking the sources, instructions can be found in the +directory src/po/README.txt. + It's not too difficult to do the translation. You don't need to be a +programmer. You must know both English and the language you are translating +to, of course. + When you are satisfied with the translation, consider making it available +to others. Upload it at vim-online (http://vim.sf.net) or e-mail it to +the Vim maintainer <maintainer@vim.org>. Or both. + +============================================================================== +*45.2* Language for Menus + +The default menus are in English. To be able to use your local language, they +must be translated. Normally this is automatically done for you if the +environment is set for your language, just like with messages. You don't need +to do anything extra for this. But it only works if translations for the +language are available. + Suppose you are in Germany, with the language set to German, but prefer to +use "File" instead of "Datei". You can switch back to using the English menus +this way: > + + :set langmenu=none + +It is also possible to specify a language: > + + :set langmenu=nl_NL.ISO_8859-1 + +Like above, differences between "-" and "_" matter. However, upper/lowercase +differences are ignored here. + The 'langmenu' option must be set before the menus are loaded. Once the +menus have been defined changing 'langmenu' has no direct effect. Therefore, +put the command to set 'langmenu' in your vimrc file. + If you really want to switch menu language while running Vim, you can do it +this way: > + + :source $VIMRUNTIME/delmenu.vim + :set langmenu=de_DE.ISO_8859-1 + :source $VIMRUNTIME/menu.vim + +There is one drawback: All menus that you defined yourself will be gone. You +will need to redefine them as well. + + +DO-IT-YOURSELF MENU TRANSLATION + +To see which menu translations are available, look in this directory: + + $VIMRUNTIME/lang ~ + +The files are called menu_{language}.vim. If you don't see the language you +want to use, you can do your own translations. The simplest way to do this is +by copying one of the existing language files, and change it. + First find out the name of your language with the ":language" command. Use +this name, but with all letters made lowercase. Then copy the file to your +own runtime directory, as found early in 'runtimepath'. For example, for Unix +you would do: > + + :!cp $VIMRUNTIME/lang/menu_ko_kr.euckr.vim ~/.vim/lang/menu_nl_be.iso_8859-1.vim + +You will find hints for the translation in "$VIMRUNTIME/lang/README.txt". + +============================================================================== +*45.3* Using another encoding + +Vim guesses that the files you are going to edit are encoded for your +language. For many European languages this is "latin1". Then each byte is +one character. That means there are 256 different characters possible. For +Asian languages this is not sufficient. These mostly use a double-byte +encoding, providing for over ten thousand possible characters. This still +isn't enough when a text is to contain several different languages. This is +where Unicode comes in. It was designed to include all characters used in +commonly used languages. This is the "Super encoding that replaces all +others". But it isn't used that much yet. + Fortunately, Vim supports these three kinds of encodings. And, with some +restrictions, you can use them even when your environment uses another +language than the text. + Nevertheless, when you only edit files that are in the encoding of your +language, the default should work fine and you don't need to do anything. The +following is only relevant when you want to edit different languages. + + Note: + Using different encodings only works when Vim was compiled to handle + it. To find out if it works, use the ":version" command and check the + output for "+multi_byte". If it's there, you are OK. If you see + "-multi_byte" you will have to find another Vim. + + +USING UNICODE IN THE GUI + +The nice thing about Unicode is that other encodings can be converted to it +and back without losing information. When you make Vim use Unicode +internally, you will be able to edit files in any encoding. + Unfortunately, the number of systems supporting Unicode is still limited. +Thus it's unlikely that your language uses it. You need to tell Vim you want +to use Unicode, and how to handle interfacing with the rest of the system. + Let's start with the GUI version of Vim, which is able to display Unicode +characters. This should work: > + + :set encoding=utf-8 + :set guifont=-misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1 + +The 'encoding' option tells Vim the encoding of the characters that you use. +This applies to the text in buffers (files you are editing), registers, Vim +script files, etc. You can regard 'encoding' as the setting for the internals +of Vim. + This example assumes you have this font on your system. The name in the +example is for the X Window System. This font is in a package that is used to +enhance xterm with Unicode support. If you don't have this font, you might +find it here: + + http://www.cl.cam.ac.uk/~mgk25/download/ucs-fonts.tar.gz ~ + +For MS-Windows, some fonts have a limited number of Unicode characters. Try +using the "Courier New" font. You can use the Edit/Select Font... menu to +select and try out the fonts available. Only fixed-width fonts can be used +though. Example: > + + :set guifont=courier_new:h12 + +If it doesn't work well, try getting a fontpack. If Microsoft didn't move it, +you can find it here: + + http://www.microsoft.com/typography/fonts/default.aspx ~ + +Now you have told Vim to use Unicode internally and display text with a +Unicode font. Typed characters still arrive in the encoding of your original +language. This requires converting them to Unicode. Tell Vim the language +from which to convert with the 'termencoding' option. You can do it like +this: > + + :let &termencoding = &encoding + :set encoding=utf-8 + +This assigns the old value of 'encoding' to 'termencoding' before setting +'encoding' to utf-8. You will have to try out if this really works for your +setup. It should work especially well when using an input method for an Asian +language, and you want to edit Unicode text. + + +USING UNICODE IN A UNICODE TERMINAL + +There are terminals that support Unicode directly. The standard xterm that +comes with XFree86 is one of them. Let's use that as an example. + First of all, the xterm must have been compiled with Unicode support. See +|UTF8-xterm| how to check that and how to compile it when needed. + Start the xterm with the "-u8" argument. You might also need so specify a +font. Example: > + + xterm -u8 -fn -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1 + +Now you can run Vim inside this terminal. Set 'encoding' to "utf-8" as +before. That's all. + + +USING UNICODE IN AN ORDINARY TERMINAL + +Suppose you want to work with Unicode files, but don't have a terminal with +Unicode support. You can do this with Vim, although characters that are not +supported by the terminal will not be displayed. The layout of the text +will be preserved. > + + :let &termencoding = &encoding + :set encoding=utf-8 + +This is the same as what was used for the GUI. But it works differently: Vim +will convert the displayed text before sending it to the terminal. That +avoids that the display is messed up with strange characters. + For this to work the conversion between 'termencoding' and 'encoding' must +be possible. Vim will convert from latin1 to Unicode, thus that always works. +For other conversions the |+iconv| feature is required. + Try editing a file with Unicode characters in it. You will notice that Vim +will put a question mark (or underscore or some other character) in places +where a character should be that the terminal can't display. Move the cursor +to a question mark and use this command: > + + ga + +Vim will display a line with the code of the character. This gives you a hint +about what character it is. You can look it up in a Unicode table. You could +actually view a file that way, if you have lots of time at hand. + + Note: + Since 'encoding' is used for all text inside Vim, changing it makes + all non-ASCII text invalid. You will notice this when using registers + and the 'viminfo' file (e.g., a remembered search pattern). It's + recommended to set 'encoding' in your vimrc file, and leave it alone. + +============================================================================== +*45.4* Editing files with a different encoding + +Suppose you have setup Vim to use Unicode, and you want to edit a file that is +in 16-bit Unicode. Sounds simple, right? Well, Vim actually uses utf-8 +encoding internally, thus the 16-bit encoding must be converted, since there +is a difference between the character set (Unicode) and the encoding (utf-8 or +16-bit). + Vim will try to detect what kind of file you are editing. It uses the +encoding names in the 'fileencodings' option. When using Unicode, the default +value is: "ucs-bom,utf-8,latin1". This means that Vim checks the file to see +if it's one of these encodings: + + ucs-bom File must start with a Byte Order Mark (BOM). This + allows detection of 16-bit, 32-bit and utf-8 Unicode + encodings. + utf-8 utf-8 Unicode. This is rejected when a sequence of + bytes is illegal in utf-8. + latin1 The good old 8-bit encoding. Always works. + +When you start editing that 16-bit Unicode file, and it has a BOM, Vim will +detect this and convert the file to utf-8 when reading it. The 'fileencoding' +option (without s at the end) is set to the detected value. In this case it +is "utf-16le". That means it's Unicode, 16-bit and little-endian. This +file format is common on MS-Windows (e.g., for registry files). + When writing the file, Vim will compare 'fileencoding' with 'encoding'. If +they are different, the text will be converted. + An empty value for 'fileencoding' means that no conversion is to be done. +Thus the text is assumed to be encoded with 'encoding'. + +If the default 'fileencodings' value is not good for you, set it to the +encodings you want Vim to try. Only when a value is found to be invalid will +the next one be used. Putting "latin1" first doesn't work, because it is +never illegal. An example, to fall back to Japanese when the file doesn't +have a BOM and isn't utf-8: > + + :set fileencodings=ucs-bom,utf-8,sjis + +See |encoding-values| for suggested values. Other values may work as well. +This depends on the conversion available. + + +FORCING AN ENCODING + +If the automatic detection doesn't work you must tell Vim what encoding the +file is. Example: > + + :edit ++enc=koi8-r russian.txt + +The "++enc" part specifies the name of the encoding to be used for this file +only. Vim will convert the file from the specified encoding, Russian in this +example, to 'encoding'. 'fileencoding' will also be set to the specified +encoding, so that the reverse conversion can be done when writing the file. + The same argument can be used when writing the file. This way you can +actually use Vim to convert a file. Example: > + + :write ++enc=utf-8 russian.txt +< + Note: + Conversion may result in lost characters. Conversion from an encoding + to Unicode and back is mostly free of this problem, unless there are + illegal characters. Conversion from Unicode to other encodings often + loses information when there was more than one language in the file. + +============================================================================== +*45.5* Entering language text + +Computer keyboards don't have much more than a hundred keys. Some languages +have thousands of characters, Unicode has over hundred thousand. So how do +you type these characters? + First of all, when you don't use too many of the special characters, you +can use digraphs. This was already explained in |24.9|. + When you use a language that uses many more characters than keys on your +keyboard, you will want to use an Input Method (IM). This requires learning +the translation from typed keys to resulting character. When you need an IM +you probably already have one on your system. It should work with Vim like +with other programs. For details see |mbyte-XIM| for the X Window system and +|mbyte-IME| for MS-Windows. + + +KEYMAPS + +For some languages the character set is different from latin, but uses a +similar number of characters. It's possible to map keys to characters. Vim +uses keymaps for this. + Suppose you want to type Hebrew. You can load the keymap like this: > + + :set keymap=hebrew + +Vim will try to find a keymap file for you. This depends on the value of +'encoding'. If no matching file was found, you will get an error message. + +Now you can type Hebrew in Insert mode. In Normal mode, and when typing a ":" +command, Vim automatically switches to English. You can use this command to +switch between Hebrew and English: > + + CTRL-^ + +This only works in Insert mode and Command-line mode. In Normal mode it does +something completely different (jumps to alternate file). + The usage of the keymap is indicated in the mode message, if you have the +'showmode' option set. In the GUI Vim will indicate the usage of keymaps with +a different cursor color. + You can also change the usage of the keymap with the 'iminsert' and +'imsearch' options. + +To see the list of mappings, use this command: > + + :lmap + +To find out which keymap files are available, in the GUI you can use the +Edit/Keymap menu. Otherwise you can use this command: > + + :echo globpath(&rtp, "keymap/*.vim") + + +DO-IT-YOURSELF KEYMAPS + +You can create your own keymap file. It's not very difficult. Start with +a keymap file that is similar to the language you want to use. Copy it to the +"keymap" directory in your runtime directory. For example, for Unix, you +would use the directory "~/.vim/keymap". + The name of the keymap file must look like this: + + keymap/{name}.vim ~ +or + keymap/{name}_{encoding}.vim ~ + +{name} is the name of the keymap. Chose a name that is obvious, but different +from existing keymaps (unless you want to replace an existing keymap file). +{name} cannot contain an underscore. Optionally, add the encoding used after +an underscore. Examples: + + keymap/hebrew.vim ~ + keymap/hebrew_utf-8.vim ~ + +The contents of the file should be self-explanatory. Look at a few of the +keymaps that are distributed with Vim. For the details, see |mbyte-keymap|. + + +LAST RESORT + +If all other methods fail, you can enter any character with CTRL-V: + + encoding type range ~ + 8-bit CTRL-V 123 decimal 0-255 + 8-bit CTRL-V x a1 hexadecimal 00-ff + 16-bit CTRL-V u 013b hexadecimal 0000-ffff + 31-bit CTRL-V U 001303a4 hexadecimal 00000000-7fffffff + +Don't type the spaces. See |i_CTRL-V_digit| for the details. + +============================================================================== + +Next chapter: |usr_90.txt| Installing Vim + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_90.txt b/runtime/doc/usr_90.txt new file mode 100644 index 0000000000..38e5886fa0 --- /dev/null +++ b/runtime/doc/usr_90.txt @@ -0,0 +1,498 @@ +*usr_90.txt* For Vim version 7.4. Last change: 2008 Sep 10 + + VIM USER MANUAL - by Bram Moolenaar + + Installing Vim + + *install* +Before you can use Vim you have to install it. Depending on your system it's +simple or easy. This chapter gives a few hints and also explains how +upgrading to a new version is done. + +|90.1| Unix +|90.2| MS-Windows +|90.3| Upgrading +|90.4| Common installation issues +|90.5| Uninstalling Vim + + Previous chapter: |usr_45.txt| Select your language +Table of contents: |usr_toc.txt| + +============================================================================== +*90.1* Unix + +First you have to decide if you are going to install Vim system-wide or for a +single user. The installation is almost the same, but the directory where Vim +is installed in differs. + For a system-wide installation the base directory "/usr/local" is often +used. But this may be different for your system. Try finding out where other +packages are installed. + When installing for a single user, you can use your home directory as the +base. The files will be placed in subdirectories like "bin" and "shared/vim". + + +FROM A PACKAGE + +You can get precompiled binaries for many different UNIX systems. There is a +long list with links on this page: + + http://www.vim.org/binaries.html ~ + +Volunteers maintain the binaries, so they are often out of date. It is a +good idea to compile your own UNIX version from the source. Also, creating +the editor from the source allows you to control which features are compiled. +This does require a compiler though. + +If you have a Linux distribution, the "vi" program is probably a minimal +version of Vim. It doesn't do syntax highlighting, for example. Try finding +another Vim package in your distribution, or search on the web site. + + +FROM SOURCES + +To compile and install Vim, you will need the following: + + - A C compiler (GCC preferred) + - The GZIP program (you can get it from www.gnu.org) + - The Vim source and runtime archives + +To get the Vim archives, look in this file for a mirror near you, this should +provide the fastest download: + + ftp://ftp.vim.org/pub/vim/MIRRORS ~ + +Or use the home site ftp.vim.org, if you think it's fast enough. Go to the +"unix" directory and you'll find a list of files there. The version number is +embedded in the file name. You will want to get the most recent version. + You can get the files for Unix in two ways: One big archive that contains +everything, or four smaller ones that each fit on a floppy disk. For version +6.1 the single big one is called: + + vim-6.1.tar.bz2 ~ + +You need the bzip2 program to uncompress it. If you don't have it, get the +four smaller files, which can be uncompressed with gzip. For Vim 6.1 they are +called: + + vim-6.1-src1.tar.gz ~ + vim-6.1-src2.tar.gz ~ + vim-6.1-rt1.tar.gz ~ + vim-6.1-rt2.tar.gz ~ + + +COMPILING + +First create a top directory to work in, for example: > + + mkdir ~/vim + cd ~/vim + +Then unpack the archives there. If you have the one big archive, you unpack +it like this: > + + bzip2 -d -c path/vim-6.1.tar.bz2 | tar xf - + +Change "path" to where you have downloaded the file. > + + gzip -d -c path/vim-6.1-src1.tar.gz | tar xf - + gzip -d -c path/vim-6.1-src2.tar.gz | tar xf - + gzip -d -c path/vim-6.1-rt1.tar.gz | tar xf - + gzip -d -c path/vim-6.1-rt2.tar.gz | tar xf - + +If you are satisfied with getting the default features, and your environment +is setup properly, you should be able to compile Vim with just this: > + + cd vim61/src + make + +The make program will run configure and compile everything. Further on we +will explain how to compile with different features. + If there are errors while compiling, carefully look at the error messages. +There should be a hint about what went wrong. Hopefully you will be able to +correct it. You might have to disable some features to make Vim compile. +Look in the Makefile for specific hints for your system. + + +TESTING + +Now you can check if compiling worked OK: > + + make test + +This will run a sequence of test scripts to verify that Vim works as expected. +Vim will be started many times and all kinds of text and messages flash by. +If it is alright you will finally see: + + test results: ~ + ALL DONE ~ + +If you get "TEST FAILURE" some test failed. If there are one or two messages +about failed tests, Vim might still work, but not perfectly. If you see a lot +of error messages or Vim doesn't finish until the end, there must be something +wrong. Either try to find out yourself, or find someone who can solve it. +You could look in the |maillist-archive| for a solution. If everything else +fails, you could ask in the vim |maillist| if someone can help you. + + +INSTALLING + *install-home* +If you want to install in your home directory, edit the Makefile and search +for a line: + + #prefix = $(HOME) ~ + +Remove the # at the start of the line. + When installing for the whole system, Vim has most likely already selected +a good installation directory for you. You can also specify one, see below. +You need to become root for the following. + +To install Vim do: > + + make install + +That should move all the relevant files to the right place. Now you can try +running vim to verify that it works. Use two simple tests to check if Vim can +find its runtime files: > + + :help + :syntax enable + +If this doesn't work, use this command to check where Vim is looking for the +runtime files: > + + :echo $VIMRUNTIME + +You can also start Vim with the "-V" argument to see what happens during +startup: > + + vim -V + +Don't forget that the user manual assumes you Vim in a certain way. After +installing Vim, follow the instructions at |not-compatible| to make Vim work +as assumed in this manual. + + +SELECTING FEATURES + +Vim has many ways to select features. One of the simple ways is to edit the +Makefile. There are many directions and examples. Often you can enable or +disable a feature by uncommenting a line. + An alternative is to run "configure" separately. This allows you to +specify configuration options manually. The disadvantage is that you have to +figure out what exactly to type. + Some of the most interesting configure arguments follow. These can also be +enabled from the Makefile. + + --prefix={directory} Top directory where to install Vim. + + --with-features=tiny Compile with many features disabled. + --with-features=small Compile with some features disabled. + --with-features=big Compile with more features enabled. + --with-features=huge Compile with most features enabled. + See |+feature-list| for which feature + is enabled in which case. + + --enable-perlinterp Enable the Perl interface. There are + similar arguments for ruby, python and + tcl. + + --disable-gui Do not compile the GUI interface. + --without-x Do not compile X-windows features. + When both of these are used, Vim will + not connect to the X server, which + makes startup faster. + +To see the whole list use: > + + ./configure --help + +You can find a bit of explanation for each feature, and links for more +information here: |feature-list|. + For the adventurous, edit the file "feature.h". You can also change the +source code yourself! + +============================================================================== +*90.2* MS-Windows + +There are two ways to install the Vim program for Microsoft Windows. You can +uncompress several archives, or use a self-installing big archive. Most users +with fairly recent computers will prefer the second method. For the first +one, you will need: + + - An archive with binaries for Vim. + - The Vim runtime archive. + - A program to unpack the zip files. + +To get the Vim archives, look in this file for a mirror near you, this should +provide the fastest download: + + ftp://ftp.vim.org/pub/vim/MIRRORS ~ + +Or use the home site ftp.vim.org, if you think it's fast enough. Go to the +"pc" directory and you'll find a list of files there. The version number is +embedded in the file name. You will want to get the most recent version. +We will use "61" here, which is version 6.1. + + gvim61.exe The self-installing archive. + +This is all you need for the second method. Just launch the executable, and +follow the prompts. + +For the first method you must chose one of the binary archives. These are +available: + + gvim61.zip The normal MS-Windows GUI version. + gvim61ole.zip The MS-Windows GUI version with OLE support. + Uses more memory, supports interfacing with + other OLE applications. + vim61w32.zip 32 bit MS-Windows console version. For use in + a Win NT/2000/XP console. Does not work well + on Win 95/98. + vim61d32.zip 32 bit MS-DOS version. For use in the + Win 95/98 console window. + vim61d16.zip 16 bit MS-DOS version. Only for old systems. + Does not support long filenames. + +You only need one of them. Although you could install both a GUI and a +console version. You always need to get the archive with runtime files. + + vim61rt.zip The runtime files. + +Use your un-zip program to unpack the files. For example, using the "unzip" +program: > + + cd c:\ + unzip path\gvim61.zip + unzip path\vim61rt.zip + +This will unpack the files in the directory "c:\vim\vim61". If you already +have a "vim" directory somewhere, you will want to move to the directory just +above it. + Now change to the "vim\vim61" directory and run the install program: > + + install + +Carefully look through the messages and select the options you want to use. +If you finally select "do it" the install program will carry out the actions +you selected. + The install program doesn't move the runtime files. They remain where you +unpacked them. + +In case you are not satisfied with the features included in the supplied +binaries, you could try compiling Vim yourself. Get the source archive from +the same location as where the binaries are. You need a compiler for which a +makefile exists. Microsoft Visual C works, but is expensive. The Free +Borland command-line compiler 5.5 can be used, as well as the free MingW and +Cygwin compilers. Check the file src/INSTALLpc.txt for hints. + +============================================================================== +*90.3* Upgrading + +If you are running one version of Vim and want to install another, here is +what to do. + + +UNIX + +When you type "make install" the runtime files will be copied to a directory +which is specific for this version. Thus they will not overwrite a previous +version. This makes it possible to use two or more versions next to +each other. + The executable "vim" will overwrite an older version. If you don't care +about keeping the old version, running "make install" will work fine. You can +delete the old runtime files manually. Just delete the directory with the +version number in it and all files below it. Example: > + + rm -rf /usr/local/share/vim/vim58 + +There are normally no changed files below this directory. If you did change +the "filetype.vim" file, for example, you better merge the changes into the +new version before deleting it. + +If you are careful and want to try out the new version for a while before +switching to it, install the new version under another name. You need to +specify a configure argument. For example: > + + ./configure --with-vim-name=vim6 + +Before running "make install", you could use "make -n install" to check that +no valuable existing files are overwritten. + When you finally decide to switch to the new version, all you need to do is +to rename the binary to "vim". For example: > + + mv /usr/local/bin/vim6 /usr/local/bin/vim + + +MS-WINDOWS + +Upgrading is mostly equal to installing a new version. Just unpack the files +in the same place as the previous version. A new directory will be created, +e.g., "vim61", for the files of the new version. Your runtime files, vimrc +file, viminfo, etc. will be left alone. + If you want to run the new version next to the old one, you will have to do +some handwork. Don't run the install program, it will overwrite a few files +of the old version. Execute the new binaries by specifying the full path. +The program should be able to automatically find the runtime files for the +right version. However, this won't work if you set the $VIMRUNTIME variable +somewhere. + If you are satisfied with the upgrade, you can delete the files of the +previous version. See |90.5|. + +============================================================================== +*90.4* Common installation issues + +This section describes some of the common problems that occur when installing +Vim and suggests some solutions. It also contains answers to many +installation questions. + + +Q: I Do Not Have Root Privileges. How Do I Install Vim? (Unix) + +Use the following configuration command to install Vim in a directory called +$HOME/vim: > + + ./configure --prefix=$HOME + +This gives you a personal copy of Vim. You need to put $HOME/bin in your +path to execute the editor. Also see |install-home|. + + +Q: The Colors Are Not Right on My Screen. (Unix) + +Check your terminal settings by using the following command in a shell: > + + echo $TERM + +If the terminal type listed is not correct, fix it. For more hints, see +|06.2|. Another solution is to always use the GUI version of Vim, called +gvim. This avoids the need for a correct terminal setup. + + +Q: My Backspace And Delete Keys Don't Work Right + +The definition of what key sends what code is very unclear for backspace <BS> +and Delete <Del> keys. First of all, check your $TERM setting. If there is +nothing wrong with it, try this: > + + :set t_kb=^V<BS> + :set t_kD=^V<Del> + +In the first line you need to press CTRL-V and then hit the backspace key. +In the second line you need to press CTRL-V and then hit the Delete key. +You can put these lines in your vimrc file, see |05.1|. A disadvantage is +that it won't work when you use another terminal some day. Look here for +alternate solutions: |:fixdel|. + + +Q: I Am Using RedHat Linux. Can I Use the Vim That Comes with the System? + +By default RedHat installs a minimal version of Vim. Check your RPM packages +for something named "Vim-enhanced-version.rpm" and install that. + + +Q: How Do I Turn Syntax Coloring On? How do I make plugins work? + +Use the example vimrc script. You can find an explanation on how to use it +here: |not-compatible|. + +See chapter 6 for information about syntax highlighting: |usr_06.txt|. + + +Q: What Is a Good vimrc File to Use? + +See the www.vim.org Web site for several good examples. + + +Q: Where Do I Find a Good Vim Plugin? + +See the Vim-online site: http://vim.sf.net. Many users have uploaded useful +Vim scripts and plugins there. + + +Q: Where Do I Find More Tips? + +See the Vim-online site: http://vim.sf.net. There is an archive with hints +from Vim users. You might also want to search in the |maillist-archive|. + +============================================================================== +*90.5* Uninstalling Vim + +In the unlikely event you want to uninstall Vim completely, this is how you do +it. + + +UNIX + +When you installed Vim as a package, check your package manager to find out +how to remove the package again. + If you installed Vim from sources you can use this command: > + + make uninstall + +However, if you have deleted the original files or you used an archive that +someone supplied, you can't do this. Do delete the files manually, here is an +example for when "/usr/local" was used as the root: > + + rm -rf /usr/local/share/vim/vim61 + rm /usr/local/bin/eview + rm /usr/local/bin/evim + rm /usr/local/bin/ex + rm /usr/local/bin/gview + rm /usr/local/bin/gvim + rm /usr/local/bin/gvim + rm /usr/local/bin/gvimdiff + rm /usr/local/bin/rgview + rm /usr/local/bin/rgvim + rm /usr/local/bin/rview + rm /usr/local/bin/rvim + rm /usr/local/bin/rvim + rm /usr/local/bin/view + rm /usr/local/bin/vim + rm /usr/local/bin/vimdiff + rm /usr/local/bin/vimtutor + rm /usr/local/bin/xxd + rm /usr/local/man/man1/eview.1 + rm /usr/local/man/man1/evim.1 + rm /usr/local/man/man1/ex.1 + rm /usr/local/man/man1/gview.1 + rm /usr/local/man/man1/gvim.1 + rm /usr/local/man/man1/gvimdiff.1 + rm /usr/local/man/man1/rgview.1 + rm /usr/local/man/man1/rgvim.1 + rm /usr/local/man/man1/rview.1 + rm /usr/local/man/man1/rvim.1 + rm /usr/local/man/man1/view.1 + rm /usr/local/man/man1/vim.1 + rm /usr/local/man/man1/vimdiff.1 + rm /usr/local/man/man1/vimtutor.1 + rm /usr/local/man/man1/xxd.1 + + +MS-WINDOWS + +If you installed Vim with the self-installing archive you can run +the "uninstall-gui" program located in the same directory as the other Vim +programs, e.g. "c:\vim\vim61". You can also launch it from the Start menu if +installed the Vim entries there. This will remove most of the files, menu +entries and desktop shortcuts. Some files may remain however, as they need a +Windows restart before being deleted. + You will be given the option to remove the whole "vim" directory. It +probably contains your vimrc file and other runtime files that you created, so +be careful. + +Else, if you installed Vim with the zip archives, the preferred way is to use +the "uninstal" program (note the missing l at the end). You can find it in +the same directory as the "install" program, e.g., "c:\vim\vim61". This +should also work from the usual "install/remove software" page. + However, this only removes the registry entries for Vim. You have to +delete the files yourself. Simply select the directory "vim\vim61" and delete +it recursively. There should be no files there that you changed, but you +might want to check that first. + The "vim" directory probably contains your vimrc file and other runtime +files that you created. You might want to keep that. + +============================================================================== + +Table of contents: |usr_toc.txt| + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_toc.txt b/runtime/doc/usr_toc.txt new file mode 100644 index 0000000000..d98a999aa4 --- /dev/null +++ b/runtime/doc/usr_toc.txt @@ -0,0 +1,354 @@ +*usr_toc.txt* For Vim version 7.4. Last change: 2010 Jul 20 + + VIM USER MANUAL - by Bram Moolenaar + + Table Of Contents *user-manual* + +============================================================================== +Overview ~ + +Getting Started +|usr_01.txt| About the manuals +|usr_02.txt| The first steps in Vim +|usr_03.txt| Moving around +|usr_04.txt| Making small changes +|usr_05.txt| Set your settings +|usr_06.txt| Using syntax highlighting +|usr_07.txt| Editing more than one file +|usr_08.txt| Splitting windows +|usr_09.txt| Using the GUI +|usr_10.txt| Making big changes +|usr_11.txt| Recovering from a crash +|usr_12.txt| Clever tricks + +Editing Effectively +|usr_20.txt| Typing command-line commands quickly +|usr_21.txt| Go away and come back +|usr_22.txt| Finding the file to edit +|usr_23.txt| Editing other files +|usr_24.txt| Inserting quickly +|usr_25.txt| Editing formatted text +|usr_26.txt| Repeating +|usr_27.txt| Search commands and patterns +|usr_28.txt| Folding +|usr_29.txt| Moving through programs +|usr_30.txt| Editing programs +|usr_31.txt| Exploiting the GUI +|usr_32.txt| The undo tree + +Tuning Vim +|usr_40.txt| Make new commands +|usr_41.txt| Write a Vim script +|usr_42.txt| Add new menus +|usr_43.txt| Using filetypes +|usr_44.txt| Your own syntax highlighted +|usr_45.txt| Select your language + +Making Vim Run +|usr_90.txt| Installing Vim + + +Reference manual +|reference_toc| More detailed information for all commands + +The user manual is available as a single, ready to print HTML and PDF file +here: + http://vimdoc.sf.net + +============================================================================== +Getting Started ~ + +Read this from start to end to learn the essential commands. + +|usr_01.txt| About the manuals + |01.1| Two manuals + |01.2| Vim installed + |01.3| Using the Vim tutor + |01.4| Copyright + +|usr_02.txt| The first steps in Vim + |02.1| Running Vim for the First Time + |02.2| Inserting text + |02.3| Moving around + |02.4| Deleting characters + |02.5| Undo and Redo + |02.6| Other editing commands + |02.7| Getting out + |02.8| Finding help + +|usr_03.txt| Moving around + |03.1| Word movement + |03.2| Moving to the start or end of a line + |03.3| Moving to a character + |03.4| Matching a paren + |03.5| Moving to a specific line + |03.6| Telling where you are + |03.7| Scrolling around + |03.8| Simple searches + |03.9| Simple search patterns + |03.10| Using marks + +|usr_04.txt| Making small changes + |04.1| Operators and motions + |04.2| Changing text + |04.3| Repeating a change + |04.4| Visual mode + |04.5| Moving text + |04.6| Copying text + |04.7| Using the clipboard + |04.8| Text objects + |04.9| Replace mode + |04.10| Conclusion + +|usr_05.txt| Set your settings + |05.1| The vimrc file + |05.2| The example vimrc file explained + |05.3| Simple mappings + |05.4| Adding a plugin + |05.5| Adding a help file + |05.6| The option window + |05.7| Often used options + +|usr_06.txt| Using syntax highlighting + |06.1| Switching it on + |06.2| No or wrong colors? + |06.3| Different colors + |06.4| With colors or without colors + |06.5| Printing with colors + |06.6| Further reading + +|usr_07.txt| Editing more than one file + |07.1| Edit another file + |07.2| A list of files + |07.3| Jumping from file to file + |07.4| Backup files + |07.5| Copy text between files + |07.6| Viewing a file + |07.7| Changing the file name + +|usr_08.txt| Splitting windows + |08.1| Split a window + |08.2| Split a window on another file + |08.3| Window size + |08.4| Vertical splits + |08.5| Moving windows + |08.6| Commands for all windows + |08.7| Viewing differences with vimdiff + |08.8| Various + +|usr_09.txt| Using the GUI + |09.1| Parts of the GUI + |09.2| Using the mouse + |09.3| The clipboard + |09.4| Select mode + +|usr_10.txt| Making big changes + |10.1| Record and playback commands + |10.2| Substitution + |10.3| Command ranges + |10.4| The global command + |10.5| Visual block mode + |10.6| Reading and writing part of a file + |10.7| Formatting text + |10.8| Changing case + |10.9| Using an external program + +|usr_11.txt| Recovering from a crash + |11.1| Basic recovery + |11.2| Where is the swap file? + |11.3| Crashed or not? + |11.4| Further reading + +|usr_12.txt| Clever tricks + |12.1| Replace a word + |12.2| Change "Last, First" to "First Last" + |12.3| Sort a list + |12.4| Reverse line order + |12.5| Count words + |12.6| Find a man page + |12.7| Trim blanks + |12.8| Find where a word is used + +============================================================================== +Editing Effectively ~ + +Subjects that can be read independently. + +|usr_20.txt| Typing command-line commands quickly + |20.1| Command line editing + |20.2| Command line abbreviations + |20.3| Command line completion + |20.4| Command line history + |20.5| Command line window + +|usr_21.txt| Go away and come back + |21.1| Suspend and resume + |21.2| Executing shell commands + |21.3| Remembering information; viminfo + |21.4| Sessions + |21.5| Views + |21.6| Modelines + +|usr_22.txt| Finding the file to edit + |22.1| The file explorer + |22.2| The current directory + |22.3| Finding a file + |22.4| The buffer list + +|usr_23.txt| Editing other files + |23.1| DOS, Mac and Unix files + |23.2| Files on the internet + |23.3| Encryption + |23.4| Binary files + |23.5| Compressed files + +|usr_24.txt| Inserting quickly + |24.1| Making corrections + |24.2| Showing matches + |24.3| Completion + |24.4| Repeating an insert + |24.5| Copying from another line + |24.6| Inserting a register + |24.7| Abbreviations + |24.8| Entering special characters + |24.9| Digraphs + |24.10| Normal mode commands + +|usr_25.txt| Editing formatted text + |25.1| Breaking lines + |25.2| Aligning text + |25.3| Indents and tabs + |25.4| Dealing with long lines + |25.5| Editing tables + +|usr_26.txt| Repeating + |26.1| Repeating with Visual mode + |26.2| Add and subtract + |26.3| Making a change in many files + |26.4| Using Vim from a shell script + +|usr_27.txt| Search commands and patterns + |27.1| Ignoring case + |27.2| Wrapping around the file end + |27.3| Offsets + |27.4| Matching multiple times + |27.5| Alternatives + |27.6| Character ranges + |27.7| Character classes + |27.8| Matching a line break + |27.9| Examples + +|usr_28.txt| Folding + |28.1| What is folding? + |28.2| Manual folding + |28.3| Working with folds + |28.4| Saving and restoring folds + |28.5| Folding by indent + |28.6| Folding with markers + |28.7| Folding by syntax + |28.8| Folding by expression + |28.9| Folding unchanged lines + |28.10| Which fold method to use? + +|usr_29.txt| Moving through programs + |29.1| Using tags + |29.2| The preview window + |29.3| Moving through a program + |29.4| Finding global identifiers + |29.5| Finding local identifiers + +|usr_30.txt| Editing programs + |30.1| Compiling + |30.2| Indenting C files + |30.3| Automatic indenting + |30.4| Other indenting + |30.5| Tabs and spaces + |30.6| Formatting comments + +|usr_31.txt| Exploiting the GUI + |31.1| The file browser + |31.2| Confirmation + |31.3| Menu shortcuts + |31.4| Vim window position and size + |31.5| Various + +|usr_32.txt| The undo tree + |32.1| Undo up to a file write + |32.2| Numbering changes + |32.3| Jumping around the tree + |32.4| Time travelling + +============================================================================== +Tuning Vim ~ + +Make Vim work as you like it. + +|usr_40.txt| Make new commands + |40.1| Key mapping + |40.2| Defining command-line commands + |40.3| Autocommands + +|usr_41.txt| Write a Vim script + |41.1| Introduction + |41.2| Variables + |41.3| Expressions + |41.4| Conditionals + |41.5| Executing an expression + |41.6| Using functions + |41.7| Defining a function + |41.8| Lists and Dictionaries + |41.9| Exceptions + |41.10| Various remarks + |41.11| Writing a plugin + |41.12| Writing a filetype plugin + |41.13| Writing a compiler plugin + |41.14| Writing a plugin that loads quickly + |41.15| Writing library scripts + |41.16| Distributing Vim scripts + +|usr_42.txt| Add new menus + |42.1| Introduction + |42.2| Menu commands + |42.3| Various + |42.4| Toolbar and popup menus + +|usr_43.txt| Using filetypes + |43.1| Plugins for a filetype + |43.2| Adding a filetype + +|usr_44.txt| Your own syntax highlighted + |44.1| Basic syntax commands + |44.2| Keywords + |44.3| Matches + |44.4| Regions + |44.5| Nested items + |44.6| Following groups + |44.7| Other arguments + |44.8| Clusters + |44.9| Including another syntax file + |44.10| Synchronizing + |44.11| Installing a syntax file + |44.12| Portable syntax file layout + +|usr_45.txt| Select your language + |45.1| Language for Messages + |45.2| Language for Menus + |45.3| Using another encoding + |45.4| Editing files with a different encoding + |45.5| Entering language text + +============================================================================== +Making Vim Run ~ + +Before you can use Vim. + +|usr_90.txt| Installing Vim + |90.1| Unix + |90.2| MS-Windows + |90.3| Upgrading + |90.4| Common installation issues + |90.5| Uninstalling Vim + +============================================================================== + +Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt new file mode 100644 index 0000000000..b264e5be8c --- /dev/null +++ b/runtime/doc/various.txt @@ -0,0 +1,667 @@ +*various.txt* For Vim version 7.4. Last change: 2014 May 22 + + + VIM REFERENCE MANUAL by Bram Moolenaar + + +Various commands *various* + +1. Various commands |various-cmds| +2. Using Vim like less or more |less| + +============================================================================== +1. Various commands *various-cmds* + + *CTRL-L* +CTRL-L Clear and redraw the screen. The redraw may happen + later, after processing typeahead. + + *:redr* *:redraw* +:redr[aw][!] Redraw the screen right now. When ! is included it is + cleared first. + Useful to update the screen halfway executing a script + or function. Also when halfway a mapping and + 'lazyredraw' is set. + + *:redraws* *:redrawstatus* +:redraws[tatus][!] Redraw the status line of the current window. When ! + is included all status lines are redrawn. + Useful to update the status line(s) when 'statusline' + includes an item that doesn't cause automatic + updating. + + *N<Del>* +<Del> When entering a number: Remove the last digit. + Note: if you like to use <BS> for this, add this + mapping to your .vimrc: > + :map CTRL-V <BS> CTRL-V <Del> +< See |:fixdel| if your <Del> key does not do what you + want. + +:as[cii] or *ga* *:as* *:ascii* +ga Print the ascii value of the character under the + cursor in decimal, hexadecimal and octal. For + example, when the cursor is on a 'R': + <R> 82, Hex 52, Octal 122 ~ + When the character is a non-standard ASCII character, + but printable according to the 'isprint' option, the + non-printable version is also given. When the + character is larger than 127, the <M-x> form is also + printed. For example: + <~A> <M-^A> 129, Hex 81, Octal 201 ~ + <p> <|~> <M-~> 254, Hex fe, Octal 376 ~ + (where <p> is a special character) + The <Nul> character in a file is stored internally as + <NL>, but it will be shown as: + <^@> 0, Hex 00, Octal 000 ~ + If the character has composing characters these are + also shown. The value of 'maxcombine' doesn't matter. + Mnemonic: Get Ascii value. {not in Vi} + + *g8* +g8 Print the hex values of the bytes used in the + character under the cursor, assuming it is in |UTF-8| + encoding. This also shows composing characters. The + value of 'maxcombine' doesn't matter. + Example of a character with two composing characters: + e0 b8 81 + e0 b8 b9 + e0 b9 89 ~ + {not in Vi} {only when compiled with the |+multi_byte| + feature} + + *8g8* +8g8 Find an illegal UTF-8 byte sequence at or after the + cursor. This works in two situations: + 1. when 'encoding' is any 8-bit encoding + 2. when 'encoding' is "utf-8" and 'fileencoding' is + any 8-bit encoding + Thus it can be used when editing a file that was + supposed to be UTF-8 but was read as if it is an 8-bit + encoding because it contains illegal bytes. + Does not wrap around the end of the file. + Note that when the cursor is on an illegal byte or the + cursor is halfway a multi-byte character the command + won't move the cursor. + {not in Vi} {only when compiled with the |+multi_byte| + feature} + + *:p* *:pr* *:print* *E749* +:[range]p[rint] [flags] + Print [range] lines (default current line). + Note: If you are looking for a way to print your text + on paper see |:hardcopy|. In the GUI you can use the + File.Print menu entry. + See |ex-flags| for [flags]. + +:[range]p[rint] {count} [flags] + Print {count} lines, starting with [range] (default + current line |cmdline-ranges|). + See |ex-flags| for [flags]. + + *:P* *:Print* +:[range]P[rint] [count] [flags] + Just as ":print". Was apparently added to Vi for + people that keep the shift key pressed too long... + Note: A user command can overrule this command. + See |ex-flags| for [flags]. + + *:l* *:list* +:[range]l[ist] [count] [flags] + Same as :print, but display unprintable characters + with '^' and put $ after the line. This can be + further changed with the 'listchars' option. + See |ex-flags| for [flags]. + + *:nu* *:number* +:[range]nu[mber] [count] [flags] + Same as :print, but precede each line with its line + number. (See also 'highlight' and 'numberwidth' + option). + See |ex-flags| for [flags]. + + *:#* +:[range]# [count] [flags] + synonym for :number. + + *:#!* +:#!{anything} Ignored, so that you can start a Vim script with: > + #!vim -S + echo "this is a Vim script" + quit +< + *:z* *E144* +:{range}z[+-^.=]{count} Display several lines of text surrounding the line + specified with {range}, or around the current line + if there is no {range}. If there is a {count}, that's + how many lines you'll see; if there is only one window + then twice the value of the 'scroll' option is used, + otherwise the current window height minus 3 is used. + + If there is a {count} the 'window' option is set to + its value. + + :z can be used either alone or followed by any of + several punctuation marks. These have the following + effect: + + mark first line last line new cursor line ~ + ---- ---------- --------- ------------ + + current line 1 scr forward 1 scr forward + - 1 scr back current line current line + ^ 2 scr back 1 scr back 1 scr back + . 1/2 scr back 1/2 scr fwd 1/2 scr fwd + = 1/2 scr back 1/2 scr fwd current line + + Specifying no mark at all is the same as "+". + If the mark is "=", a line of dashes is printed + around the current line. + +:{range}z#[+-^.=]{count} *:z#* + Like ":z", but number the lines. + {not in all versions of Vi, not with these arguments} + + *:=* +:= [flags] Print the last line number. + See |ex-flags| for [flags]. + +:{range}= [flags] Prints the last line number in {range}. For example, + this prints the current line number: > + :.= +< See |ex-flags| for [flags]. + +:norm[al][!] {commands} *:norm* *:normal* + Execute Normal mode commands {commands}. This makes + it possible to execute Normal mode commands typed on + the command-line. {commands} are executed like they + are typed. For undo all commands are undone together. + Execution stops when an error is encountered. + + If the [!] is given, mappings will not be used. + Without it, when this command is called from a + non-remappable mapping (|:noremap|), the argument can + be mapped anyway. + + {commands} should be a complete command. If + {commands} does not finish a command, the last one + will be aborted as if <Esc> or <C-C> was typed. + This implies that an insert command must be completed + (to start Insert mode, see |:startinsert|). A ":" + command must be completed as well. And you can't use + "Q" or "gQ" to start Ex mode. + + The display is not updated while ":normal" is busy. + + {commands} cannot start with a space. Put a count of + 1 (one) before it, "1 " is one space. + + The 'insertmode' option is ignored for {commands}. + + This command cannot be followed by another command, + since any '|' is considered part of the command. + + This command can be used recursively, but the depth is + limited by 'maxmapdepth'. + + An alternative is to use |:execute|, which uses an + expression as argument. This allows the use of + printable characters to represent special characters. + + Example: > + :exe "normal \<c-w>\<c-w>" +< {not in Vi, of course} + {not available when the |+ex_extra| feature was + disabled at compile time} + +:{range}norm[al][!] {commands} *:normal-range* + Execute Normal mode commands {commands} for each line + in the {range}. Before executing the {commands}, the + cursor is positioned in the first column of the range, + for each line. Otherwise it's the same as the + ":normal" command without a range. + {not in Vi} + {not available when |+ex_extra| feature was disabled + at compile time} + + *:sh* *:shell* *E371* +:sh[ell] This command starts a shell. When the shell exits + (after the "exit" command) you return to Vim. The + name for the shell command comes from 'shell' option. + *E360* + Note: This doesn't work when Vim on the Amiga was + started in QuickFix mode from a compiler, because the + compiler will have set stdin to a non-interactive + mode. + + *:!cmd* *:!* *E34* +:!{cmd} Execute {cmd} with the shell. See also the 'shell' + and 'shelltype' option. + + Any '!' in {cmd} is replaced with the previous + external command (see also 'cpoptions'). But not when + there is a backslash before the '!', then that + backslash is removed. Example: ":!ls" followed by + ":!echo ! \! \\!" executes "echo ls ! \!". + + A '|' in {cmd} is passed to the shell, you cannot use + it to append a Vim command. See |:bar|. + + If {cmd} contains "%" it is expanded to the current + file name. Special characters are not escaped, use + quotes to avoid their special meaning: > + :!ls "%" +< If the file name contains a "$" single quotes might + work better (but a single quote causes trouble): > + :!ls '%' +< This should always work, but it's more typing: > + :exe "!ls " . shellescape(expand("%")) +< + A newline character ends {cmd}, what follows is + interpreted as a following ":" command. However, if + there is a backslash before the newline it is removed + and {cmd} continues. It doesn't matter how many + backslashes are before the newline, only one is + removed. + + On Unix the command normally runs in a non-interactive + shell. If you want an interactive shell to be used + (to use aliases) set 'shellcmdflag' to "-ic". + For Win32 also see |:!start|. + + After the command has been executed, the timestamp and + size of the current file is checked |timestamp|. + + Vim redraws the screen after the command is finished, + because it may have printed any text. This requires a + hit-enter prompt, so that you can read any messages. + To avoid this use: > + :silent !{cmd} +< The screen is not redrawn then, thus you have to use + CTRL-L or ":redraw!" if the command did display + something. + Also see |shell-window|. + + *:!!* +:!! Repeat last ":!{cmd}". + + *:ve* *:version* +:ve[rsion] Print the version number of the editor. If the + compiler used understands "__DATE__" the compilation + date is mentioned. Otherwise a fixed release-date is + shown. + The following lines contain information about which + features were enabled when Vim was compiled. When + there is a preceding '+', the feature is included, + when there is a '-' it is excluded. To change this, + you have to edit feature.h and recompile Vim. + To check for this in an expression, see |has()|. + Here is an overview of the features. + The first column shows the smallest version in which + they are included: + T tiny + S small + N normal + B big + H huge + m manually enabled or depends on other features + (none) system dependent + Thus if a feature is marked with "N", it is included + in the normal, big and huge versions of Vim. + + *+feature-list* + *+acl* |ACL| support included + *+ARP* Amiga only: ARP support included +B *+arabic* |Arabic| language support +N *+autocmd* |:autocmd|, automatic commands +m *+balloon_eval* |balloon-eval| support. Included when compiling with + supported GUI (Motif, GTK, GUI) and either + Netbeans/Sun Workshop integration or |+eval| feature. +N *+browse* |:browse| command +N *+builtin_terms* some terminals builtin |builtin-terms| +B *++builtin_terms* maximal terminals builtin |builtin-terms| +N *+byte_offset* support for 'o' flag in 'statusline' option, "go" + and ":goto" commands. +N *+cindent* |'cindent'|, C indenting +N *+clientserver* Unix and Win32: Remote invocation |clientserver| + *+clipboard* |clipboard| support +N *+cmdline_compl* command line completion |cmdline-completion| +N *+cmdline_hist* command line history |cmdline-history| +N *+cmdline_info* |'showcmd'| and |'ruler'| +N *+comments* |'comments'| support +B *+conceal* "conceal" support, see |conceal| |:syn-conceal| etc. +N *+cryptv* encryption support |encryption| +B *+cscope* |cscope| support +m *+cursorbind* |'cursorbind'| support +m *+cursorshape* |termcap-cursor-shape| support +m *+debug* Compiled for debugging. +N *+dialog_gui* Support for |:confirm| with GUI dialog. +N *+dialog_con* Support for |:confirm| with console dialog. +N *+dialog_con_gui* Support for |:confirm| with GUI and console dialog. +N *+diff* |vimdiff| and 'diff' +N *+digraphs* |digraphs| *E196* + *+dnd* Support for DnD into the "~ register |quote_~|. +B *+emacs_tags* |emacs-tags| files +N *+eval* expression evaluation |eval.txt| +N *+ex_extra* Vim's extra Ex commands: |:center|, |:left|, + |:normal|, |:retab| and |:right| +N *+extra_search* |'hlsearch'| and |'incsearch'| options. +B *+farsi* |farsi| language +N *+file_in_path* |gf|, |CTRL-W_f| and |<cfile>| +N *+find_in_path* include file searches: |[I|, |:isearch|, + |CTRL-W_CTRL-I|, |:checkpath|, etc. +N *+folding* |folding| + *+footer* |gui-footer| + *+fork* Unix only: |fork| shell commands + *+float* Floating point support +N *+gettext* message translations |multi-lang| + *+GUI_Athena* Unix only: Athena |GUI| + *+GUI_neXtaw* Unix only: neXtaw |GUI| + *+GUI_GTK* Unix only: GTK+ |GUI| + *+GUI_Motif* Unix only: Motif |GUI| + *+GUI_Photon* QNX only: Photon |GUI| +m *+hangul_input* Hangul input support |hangul| + *+iconv* Compiled with the |iconv()| function + *+iconv/dyn* Likewise |iconv-dynamic| |/dyn| +N *+insert_expand* |insert_expand| Insert mode completion +N *+jumplist* |jumplist| +B *+keymap* |'keymap'| +B *+langmap* |'langmap'| +N *+libcall* |libcall()| +N *+linebreak* |'linebreak'|, |'breakat'| and |'showbreak'| +N *+lispindent* |'lisp'| +N *+listcmds* Vim commands for the list of buffers |buffer-hidden| + and argument list |:argdelete| +N *+localmap* Support for mappings local to a buffer |:map-local| +m *+lua* |Lua| interface +m *+lua/dyn* |Lua| interface |/dyn| +N *+menu* |:menu| +N *+mksession* |:mksession| +N *+modify_fname* |filename-modifiers| +N *+mouse* Mouse handling |mouse-using| +N *+mouseshape* |'mouseshape'| +B *+mouse_dec* Unix only: Dec terminal mouse handling |dec-mouse| +N *+mouse_gpm* Unix only: Linux console mouse handling |gpm-mouse| +N *+mouse_jsbterm* JSB mouse handling |jsbterm-mouse| +B *+mouse_netterm* Unix only: netterm mouse handling |netterm-mouse| +N *+mouse_pterm* QNX only: pterm mouse handling |qnx-terminal| +N *+mouse_sysmouse* Unix only: *BSD console mouse handling |sysmouse| +B *+mouse_sgr* Unix only: sgr mouse handling |sgr-mouse| +B *+mouse_urxvt* Unix only: urxvt mouse handling |urxvt-mouse| +N *+mouse_xterm* Unix only: xterm mouse handling |xterm-mouse| +N *+multi_byte* 16 and 32 bit characters |multibyte| + *+multi_byte_ime* Win32 input method for multibyte chars |multibyte-ime| +N *+multi_lang* non-English language support |multi-lang| +m *+mzscheme* Mzscheme interface |mzscheme| +m *+mzscheme/dyn* Mzscheme interface |mzscheme-dynamic| |/dyn| +m *+netbeans_intg* |netbeans| +m *+ole* Win32 GUI only: |ole-interface| +N *+path_extra* Up/downwards search in 'path' and 'tags' +m *+perl* Perl interface |perl| +m *+perl/dyn* Perl interface |perl-dynamic| |/dyn| +N *+persistent_undo* Persistent undo |undo-persistence| + *+postscript* |:hardcopy| writes a PostScript file +N *+printer* |:hardcopy| command +H *+profile* |:profile| command +m *+python* Python 2 interface |python| +m *+python/dyn* Python 2 interface |python-dynamic| |/dyn| +m *+python3* Python 3 interface |python| +m *+python3/dyn* Python 3 interface |python-dynamic| |/dyn| +N *+quickfix* |:make| and |quickfix| commands +N *+reltime* |reltime()| function, 'hlsearch'/'incsearch' timeout, + 'redrawtime' option +B *+rightleft* Right to left typing |'rightleft'| +m *+ruby* Ruby interface |ruby| +m *+ruby/dyn* Ruby interface |ruby-dynamic| |/dyn| +N *+scrollbind* |'scrollbind'| +B *+signs* |:sign| +N *+smartindent* |'smartindent'| +m *+sniff* SniFF interface |sniff| +N *+startuptime* |--startuptime| argument +N *+statusline* Options 'statusline', 'rulerformat' and special + formats of 'titlestring' and 'iconstring' +m *+sun_workshop* |workshop| +N *+syntax* Syntax highlighting |syntax| + *+system()* Unix only: opposite of |+fork| +N *+tag_binary* binary searching in tags file |tag-binary-search| +N *+tag_old_static* old method for static tags |tag-old-static| +m *+tag_any_white* any white space allowed in tags file |tag-any-white| +m *+tcl* Tcl interface |tcl| +m *+tcl/dyn* Tcl interface |tcl-dynamic| |/dyn| + *+terminfo* uses |terminfo| instead of termcap +N *+termresponse* support for |t_RV| and |v:termresponse| +N *+textobjects* |text-objects| selection + *+tgetent* non-Unix only: able to use external termcap +N *+title* Setting the window 'title' and 'icon' +N *+toolbar* |gui-toolbar| +N *+user_commands* User-defined commands. |user-commands| +N *+viminfo* |'viminfo'| +N *+vertsplit* Vertically split windows |:vsplit| +N *+virtualedit* |'virtualedit'| +S *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200. +N *+visualextra* extra Visual mode commands |blockwise-operators| +N *+vreplace* |gR| and |gr| +N *+wildignore* |'wildignore'| +N *+wildmenu* |'wildmenu'| +S *+windows* more than one window +m *+writebackup* |'writebackup'| is default on +m *+xim* X input method |xim| + *+xfontset* X fontset support |xfontset| + *+xpm* pixmap support +m *+xpm_w32* Win32 GUI only: pixmap support |w32-xpm-support| + *+xsmp* XSMP (X session management) support + *+xsmp_interact* interactive XSMP (X session management) support +N *+xterm_clipboard* Unix only: xterm clipboard handling +m *+xterm_save* save and restore xterm screen |xterm-screens| +N *+X11* Unix only: can restore window title |X11| + + */dyn* *E370* *E448* + To some of the features "/dyn" is added when the + feature is only available when the related library can + be dynamically loaded. + +:ve[rsion] {nr} Is now ignored. This was previously used to check the + version number of a .vimrc file. It was removed, + because you can now use the ":if" command for + version-dependent behavior. {not in Vi} + + *:redi* *:redir* +:redi[r][!] > {file} Redirect messages to file {file}. The messages which + are the output of commands are written to that file, + until redirection ends. The messages are also still + shown on the screen. When [!] is included, an + existing file is overwritten. When [!] is omitted, + and {file} exists, this command fails. + Only one ":redir" can be active at a time. Calls to + ":redir" will close any active redirection before + starting redirection to the new target. + To stop the messages and commands from being echoed to + the screen, put the commands in a function and call it + with ":silent call Function()". + An alternative is to use the 'verbosefile' option, + this can be used in combination with ":redir". + {not in Vi} + +:redi[r] >> {file} Redirect messages to file {file}. Append if {file} + already exists. {not in Vi} + +:redi[r] @{a-zA-Z} +:redi[r] @{a-zA-Z}> Redirect messages to register {a-z}. Append to the + contents of the register if its name is given + uppercase {A-Z}. The ">" after the register name is + optional. {not in Vi} +:redi[r] @{a-z}>> Append messages to register {a-z}. {not in Vi} + +:redi[r] @*> +:redi[r] @+> Redirect messages to the selection or clipboard. For + backward compatibility, the ">" after the register + name can be omitted. See |quotestar| and |quoteplus|. + {not in Vi} +:redi[r] @*>> +:redi[r] @+>> Append messages to the selection or clipboard. + {not in Vi} + +:redi[r] @"> Redirect messages to the unnamed register. For + backward compatibility, the ">" after the register + name can be omitted. {not in Vi} +:redi[r] @">> Append messages to the unnamed register. {not in Vi} + +:redi[r] => {var} Redirect messages to a variable. If the variable + doesn't exist, then it is created. If the variable + exists, then it is initialized to an empty string. + The variable will remain empty until redirection ends. + Only string variables can be used. After the + redirection starts, if the variable is removed or + locked or the variable type is changed, then further + command output messages will cause errors. {not in Vi} + +:redi[r] =>> {var} Append messages to an existing variable. Only string + variables can be used. {not in Vi} + +:redi[r] END End redirecting messages. {not in Vi} + + *:sil* *:silent* +:sil[ent][!] {command} Execute {command} silently. Normal messages will not + be given or added to the message history. + When [!] is added, error messages will also be + skipped, and commands and mappings will not be aborted + when an error is detected. |v:errmsg| is still set. + When [!] is not used, an error message will cause + further messages to be displayed normally. + Redirection, started with |:redir|, will continue as + usual, although there might be small differences. + This will allow redirecting the output of a command + without seeing it on the screen. Example: > + :redir >/tmp/foobar + :silent g/Aap/p + :redir END +< To execute a Normal mode command silently, use the + |:normal| command. For example, to search for a + string without messages: > + :silent exe "normal /path\<CR>" +< ":silent!" is useful to execute a command that may + fail, but the failure is to be ignored. Example: > + :let v:errmsg = "" + :silent! /^begin + :if v:errmsg != "" + : ... pattern was not found +< ":silent" will also avoid the hit-enter prompt. When + using this for an external command, this may cause the + screen to be messed up. Use |CTRL-L| to clean it up + then. + ":silent menu ..." defines a menu that will not echo a + Command-line command. The command will still produce + messages though. Use ":silent" in the command itself + to avoid that: ":silent menu .... :silent command". + + *:uns* *:unsilent* +:uns[ilent] {command} Execute {command} not silently. Only makes a + difference when |:silent| was used to get to this + command. + Use this for giving a message even when |:silent| was + used. In this example |:silent| is used to avoid the + message about reading the file and |:unsilent| to be + able to list the first line of each file. > + :silent argdo unsilent echo expand('%') . ": " . getline(1) +< + + *:verb* *:verbose* +:[count]verb[ose] {command} + Execute {command} with 'verbose' set to [count]. If + [count] is omitted one is used. ":0verbose" can be + used to set 'verbose' to zero. + The additional use of ":silent" makes messages + generated but not displayed. + The combination of ":silent" and ":verbose" can be + used to generate messages and check them with + |v:statusmsg| and friends. For example: > + :let v:statusmsg = "" + :silent verbose runtime foobar.vim + :if v:statusmsg != "" + : " foobar.vim could not be found + :endif +< When concatenating another command, the ":verbose" + only applies to the first one: > + :4verbose set verbose | set verbose +< verbose=4 ~ + verbose=0 ~ + For logging verbose messages in a file use the + 'verbosefile' option. + + *:verbose-cmd* +When 'verbose' is non-zero, listing the value of a Vim option or a key map or +an abbreviation or a user-defined function or a command or a highlight group +or an autocommand will also display where it was last defined. If it was +defined manually then there will be no "Last set" message. When it was +defined while executing a function, user command or autocommand, the script in +which it was defined is reported. +{not available when compiled without the |+eval| feature} + + *K* +K Run a program to lookup the keyword under the + cursor. The name of the program is given with the + 'keywordprg' (kp) option (default is "man"). The + keyword is formed of letters, numbers and the + characters in 'iskeyword'. The keyword under or + right of the cursor is used. The same can be done + with the command > + :!{program} {keyword} +< There is an example of a program to use in the tools + directory of Vim. It is called 'ref' and does a + simple spelling check. + Special cases: + - If 'keywordprg' is empty, the ":help" command is + used. It's a good idea to include more characters + in 'iskeyword' then, to be able to find more help. + - When 'keywordprg' is equal to "man", a count before + "K" is inserted after the "man" command and before + the keyword. For example, using "2K" while the + cursor is on "mkdir", results in: > + !man 2 mkdir +< - When 'keywordprg' is equal to "man -s", a count + before "K" is inserted after the "-s". If there is + no count, the "-s" is removed. + {not in Vi} + + *v_K* +{Visual}K Like "K", but use the visually highlighted text for + the keyword. Only works when the highlighted text is + not more than one line. {not in Vi} + +[N]gs *gs* *:sl* *:sleep* +:[N]sl[eep] [N] [m] Do nothing for [N] seconds. When [m] is included, + sleep for [N] milliseconds. The count for "gs" always + uses seconds. The default is one second. > + :sleep "sleep for one second + :5sleep "sleep for five seconds + :sleep 100m "sleep for a hundred milliseconds + 10gs "sleep for ten seconds +< Can be interrupted with CTRL-C (CTRL-Break on MS-DOS). + "gs" stands for "goto sleep". + While sleeping the cursor is positioned in the text, + if at a visible position. {not in Vi} + Also process the received netbeans messages. {only + available when compiled with the |+netbeans_intg| + feature} + + + *g_CTRL-A* +g CTRL-A Only when Vim was compiled with MEM_PROFILING defined + (which is very rare): print memory usage statistics. + Only useful for debugging Vim. + +============================================================================== +2. Using Vim like less or more *less* + +If you use the less or more program to view a file, you don't get syntax +highlighting. Thus you would like to use Vim instead. You can do this by +using the shell script "$VIMRUNTIME/macros/less.sh". + +This shell script uses the Vim script "$VIMRUNTIME/macros/less.vim". It sets +up mappings to simulate the commands that less supports. Otherwise, you can +still use the Vim commands. + +This isn't perfect. For example, when viewing a short file Vim will still use +the whole screen. But it works good enough for most uses, and you get syntax +highlighting. + +The "h" key will give you a short overview of the available commands. + + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/version4.txt b/runtime/doc/version4.txt new file mode 100644 index 0000000000..6b791be88b --- /dev/null +++ b/runtime/doc/version4.txt @@ -0,0 +1,355 @@ +*version4.txt* For Vim version 7.4. Last change: 2006 Apr 24 + + + VIM REFERENCE MANUAL by Bram Moolenaar + + +This document lists the incompatible differences between Vim 3.0 and Vim 4.0. +Although 4.0 is mentioned here, this is also for version 4.1, 4.2, etc.. + +This file is important for everybody upgrading from Vim 3.0. Read it +carefully to avoid unexpected problems. + +'backup' option default changed |backup-changed| +Extension for backup file changed |backup-extension| +Structure of swap file changed |swapfile-changed| +"-w scriptout" argument changed |scriptout-changed| +Backspace and Delete keys |backspace-delete| +Escape for | changed |escape-bar| +Key codes changed |key-codes-changed| +Terminal options changed |termcap-changed| +'errorformat' option changed |errorformat-changed| +'graphic' option gone |graphic-option-gone| +'yankendofline' option gone |ye-option-gone| +'icon' and 'title' default value changed |icon-changed| +'highlight' option changed |highlight-changed| +'tildeop' and 'weirdinvert' short names changed |short-name-changed| +Use of "v", "V" and "CTRL-V" in Visual mode |use-visual-cmds| +CTRL-B in Insert mode removed |toggle-revins| + + +'backup' option default changed *backup-changed* +------------------------------- + +The default value for 'backup' used to be on. This resulted in a backup file +being made when the original file was overwritten. + +Now the default for 'backup' is off. As soon as the writing of the file has +successfully finished, the backup file is deleted. If you want to keep the +backup file, set 'backup' on in your vimrc. The reason for this change is +that many people complained that leaving a backup file behind is not +Vi-compatible. |'backup'| + + +Extension for backup file changed *backup-extension* +--------------------------------- + +The extension for the backup file used to be ".bak". Since other programs +also use this extension and some users make copies with this extension, it was +changed to the less obvious "~". Another advantage is that this takes less +space, which is useful when working on a system with short file names. For +example, on MS-DOS the backup files for "longfile.c" and "longfile.h" would +both become "longfile.bak"; now they will be "longfile.c~" and "longfile.h~". + +If you prefer to use ".bak", you can set the 'backupext' option: > + :set bex=.bak + + +Structure of swap file changed *swapfile-changed* +------------------------------ + +The contents of the swap file were extended with several parameters. Vim +stores the user name and other information about the edited file to make +recovery more easy and to be able to know where the swap file comes from. The +first part of the swap file can now be understood on a machine with a +different byte order or sizeof(int). When you try to recover a file on such a +machine, you will get an error message that this is not possible. + +Because of this change, swap files cannot be exchanged between 3.0 and 4.0. +If you have a swap file from a crashed session with 3.0, use Vim 3.0 to +recover the file---don't use 4.0. |swap-file| + + +"-w scriptout" argument changed *scriptout-changed* +------------------------------- + +"vim -w scriptout" used to append to the scriptout file. Since this was +illogical, it now creates a new file. An existing file is not overwritten +(to avoid destroying an existing file for those who rely on the appending). +[This was removed again later] |-w| + + +Backspace and Delete keys *backspace-delete* +------------------------- + +In 3.0 both the delete key and the backspace key worked as a backspace in +insert mode; they deleted the character to the left of the cursor. In 4.0 the +delete key has a new function: it deletes the character under the cursor, just +like it does on the command-line. If the cursor is after the end of the line +and 'bs' is set, two lines are joined. |<Del>| |i_<Del>| + +In 3.0 the backspace key was always defined as CTRL-H and delete as CTRL-?. +In 4.0 the code for the backspace and delete key is obtained from termcap or +termlib, and adjusted for the "stty erase" value on Unix. This helps people +who define the erase character according to the keyboard they are working on. + |<BS>| |i_<BS>| + +If you prefer backspace and delete in Insert mode to have the old behavior, +put this line in your vimrc: + + inoremap ^? ^H + +And you may also want to add these, to fix the values for <BS> and <Del>: + + set t_kb=^H + set t_kD=^? + +(Enter ^H with CTRL-V CTRL-H and ^? with CTRL-V CTRL-? or <Del>.) + +If the value for t_kb is correct, but the t_kD value is not, use the ":fixdel" +command. It will set t_kD according to the value of t_kb. This is useful if +you are using several different terminals. |:fixdel| + +When ^H is not recognized as <BS> or <Del>, it is used like a backspace. + + +Escape for | changed *escape-bar* +-------------------- + +When the 'b' flag is present in 'cpoptions', the backslash cannot be used to +escape '|' in mapping and abbreviate commands, only CTRL-V can. This is +Vi-compatible. If you work in Vi-compatible mode and had used "\|" to include +a bar in a mapping, this needs to be replaced by "^V|". See |:bar|. + + +Key codes changed *key-codes-changed* +----------------- + +The internal representation of key codes has changed dramatically. In 3.0 a +one-byte code was used to represent a key. This caused problems with +different characters sets that also used these codes. In 4.0 a three-byte +code is used that cannot be confused with a character. |key-notation| + +If you have used the single-byte key codes in your vimrc for mappings, you +will have to replace them with the 4.0 codes. Instead of using the three-byte +code directly, you should use the symbolic representation for this in <>. See +the table below. The table also lists the old name, as it was used in the 3.0 +documentation. + +The key names in <> can be used in mappings directly. This makes it possible +to copy/paste examples or type them literally. The <> notation has been +introduced for this |<>|. The 'B' and '<' flags must not be present in +'cpoptions' to enable this to work |'cpoptions'|. + +old name new name old code old MS-DOS code ~ + hex dec hex dec ~ +<ESC> <Esc> +<TAB> <Tab> +<LF> <NL> <NewLine> <LineFeed> +<SPACE> <Space> +<NUL> <Nul> +<BELL> <Bell> +<BS> <BS> <BackSpace> +<INSERT> <Insert> +<DEL> <Del> <Delete> +<HOME> <Home> +<END> <End> +<PAGE_UP> <PageUp> +<PAGE_DOWN> <PageDown> + +<C_UP> <Up> 0x80 128 0xb0 176 +<C_DOWN> <Down> 0x81 129 0xb1 177 +<C_LEFT> <Left> 0x82 130 0xb2 178 +<C_RIGHT> <Right> 0x83 131 0xb3 179 +<SC_UP> <S-Up> 0x84 132 0xb4 180 +<SC_DOWN> <S-Down> 0x85 133 0xb5 181 +<SC_LEFT> <S-Left> 0x86 134 0xb6 182 +<SC_RIGHT> <S-Right> 0x87 135 0xb7 183 + +<F1> <F1> 0x88 136 0xb8 184 +<F2> <F2> 0x89 137 0xb9 185 +<F3> <F3> 0x8a 138 0xba 186 +<F4> <F4> 0x8b 139 0xbb 187 +<F5> <F5> 0x8c 140 0xbc 188 +<F6> <F6> 0x8d 141 0xbd 189 +<F7> <F7> 0x8e 142 0xbe 190 +<F8> <F8> 0x8f 143 0xbf 191 +<F9> <F9> 0x90 144 0xc0 192 +<F10> <F10> 0x91 145 0xc1 193 + +<SF1> <S-F1> 0x92 146 0xc2 194 +<SF2> <S-F2> 0x93 147 0xc3 195 +<SF3> <S-F3> 0x94 148 0xc4 196 +<SF4> <S-F4> 0x95 149 0xc5 197 +<SF5> <S-F5> 0x96 150 0xc6 198 +<SF6> <S-F6> 0x97 151 0xc7 199 +<SF7> <S-F7> 0x98 152 0xc8 200 +<SF8> <S-F8> 0x99 153 0xc9 201 +<SF9> <S-F9> 0x9a 154 0xca 202 +<SF10> <S-F10> 0x9b 155 0xcb 203 + +<HELP> <Help> 0x9c 156 0xcc 204 +<UNDO> <Undo> 0x9d 157 0xcd 205 + + (not used) 0x9e 158 0xce 206 + (not used) 0x9f 159 0xcf 207 + + +Terminal options changed *termcap-changed* +------------------------ + +The names of the terminal options have been changed to match the termcap names +of these options. All terminal options now have the name t_xx, where xx is +the termcap name. Normally these options are not used, unless you have a +termcap entry that is wrong or incomplete, or you have set the highlight +options to a different value. |terminal-options| + +Note that for some keys there is no termcap name. Use the <> type of name +instead, which is a good idea anyway. + +Note that "t_ti" has become "t_mr" (invert/reverse output) and "t_ts" has +become "t_ti" (init terminal mode). Be careful when you use "t_ti"! + +old name new name meaning ~ +t_cdl t_DL delete number of lines *t_cdl* +t_ci t_vi cursor invisible *t_ci* +t_cil t_AL insert number of lines *t_cil* +t_cm t_cm move cursor +t_cri t_RI cursor number of chars right *t_cri* +t_cv t_ve cursor visible *t_cv* +t_cvv t_vs cursor very visible *t_cvv* +t_dl t_dl delete line +t_cs t_cs scroll region +t_ed t_cl clear display *t_ed* +t_el t_ce clear line *t_el* +t_il t_al insert line *t_il* + t_da display may be retained above the screen + t_db display may be retained below the screen +t_ke t_ke put terminal out of keypad transmit mode +t_ks t_ks put terminal in keypad transmit mode +t_ms t_ms save to move cursor in highlight mode +t_se t_se normal mode (undo t_so) +t_so t_so shift out (standout) mode +t_ti t_mr reverse highlight +t_tb t_md bold mode *t_tb* +t_tp t_me highlight end *t_tp* +t_sr t_sr scroll reverse +t_te t_te out of termcap mode +t_ts t_ti into termcap mode *t_ts_old* +t_vb t_vb visual bell +t_csc t_CS cursor is relative to scroll region *t_csc* + +t_ku t_ku <Up> arrow up +t_kd t_kd <Down> arrow down +t_kr t_kr <Right> arrow right +t_kl t_kl <Left> arrow left +t_sku <S-Up> shifted arrow up *t_sku* +t_skd <S-Down> shifted arrow down *t_skd* +t_skr t_%i <S-Right> shifted arrow right *t_skr* +t_skl t_#4 <S-Left> shifted arrow left *t_skl* +t_f1 t_k1 <F1> function key 1 *t_f1* +t_f2 t_k2 <F2> function key 2 *t_f2* +t_f3 t_k3 <F3> function key 3 *t_f3* +t_f4 t_k4 <F4> function key 4 *t_f4* +t_f5 t_k5 <F5> function key 5 *t_f5* +t_f6 t_k6 <F6> function key 6 *t_f6* +t_f7 t_k7 <F7> function key 7 *t_f7* +t_f8 t_k8 <F8> function key 8 *t_f8* +t_f9 t_k9 <F9> function key 9 *t_f9* +t_f10 t_k; <F10> function key 10 *t_f10* +t_sf1 <S-F1> shifted function key 1 *t_sf1* +t_sf2 <S-F2> shifted function key 2 *t_sf2* +t_sf3 <S-F3> shifted function key 3 *t_sf3* +t_sf4 <S-F4> shifted function key 4 *t_sf4* +t_sf5 <S-F5> shifted function key 5 *t_sf5* +t_sf6 <S-F6> shifted function key 6 *t_sf6* +t_sf7 <S-F7> shifted function key 7 *t_sf7* +t_sf8 <S-F8> shifted function key 8 *t_sf8* +t_sf9 <S-F9> shifted function key 9 *t_sf9* +t_sf10 <S-F10> shifted function key 10 *t_sf10* +t_help t_%1 <Help> help key *t_help* +t_undo t_&8 <Undo> undo key *t_undo* + + +'errorformat' option changed *errorformat-changed* +---------------------------- + +'errorformat' can now contain several formats, separated by commas. The first +format that matches is used. The default values have been adjusted to catch +the most common formats. |errorformat| + +If you have a format that contains a comma, it needs to be preceded with a +backslash. Type two backslashes, because the ":set" command will eat one. + + +'graphic' option gone *graphic-option-gone* +--------------------- + +The 'graphic' option was used to make the characters between <~> and 0xa0 +display directly on the screen. Now the 'isprint' option takes care of this +with many more possibilities. The default setting is the same; you only need +to look into this if you previously set the 'graphic' option in your vimrc. + |'isprint'| + + +'yankendofline' option gone *ye-option-gone* +--------------------------- + +The 'yankendofline' option has been removed. Instead you can just use + :map Y y$ + + +'icon' and 'title' default value changed *icon-changed* +---------------------------------------- + +The 'title' option is now only set by default if the original title can be +restored. Avoids "Thanks for flying Vim" titles. If you want them anyway, +put ":set title" in your vimrc. |'title'| + +The default for 'icon' now depends on the possibility of restoring the +original value, just like 'title'. If you don't like your icon titles to be +changed, add this line to your vimrc: |'icon'| + :set noicon + + +'highlight' option changed *highlight-changed* +-------------------------- + +The 'i' flag now means italic highlighting, instead of invert. The 'r' flag +is used for reverse highlighting, which is what 'i' used to be. Normally you +won't see the difference, because italic mode is not supported on most +terminals and reverse mode is used as a fallback. |'highlight'| + +When an occasion is not present in 'highlight', use the mode from the default +value for 'highlight', instead of reverse mode. + + +'tildeop' and 'weirdinvert' short names changed *short-name-changed* +----------------------------------------------- + +Renamed 'to' (abbreviation for 'tildeop') to 'top'. |'tildeop'| +Renamed 'wi' (abbreviation for 'weirdinvert') to 'wiv'. |'weirdinvert'| + +This was done because Vi uses 'wi' as the short name for 'window' and 'to' as +the short name for 'timeout'. This means that if you try setting these +options, you won't get an error message, but the effect will be different. + + +Use of "v", "V" and "CTRL-V" in Visual mode *use-visual-cmds* +------------------------------------------- + +In Visual mode, "v", "V", and "CTRL-V" used to end Visual mode. Now this +happens only if the Visual mode was in the corresponding type. Otherwise the +type of Visual mode is changed. Now only ESC can be used in all circumstances +to end Visual mode without doing anything. |v_V| + + +CTRL-B in Insert mode removed *toggle-revins* +----------------------------- + +CTRL-B in Insert mode used to toggle the 'revins' option. If you don't know +this and accidentally hit CTRL-B, it is very difficult to find out how to undo +it. Since hardly anybody uses this feature, it is disabled by default. If +you want to use it, define RIGHTLEFT in feature.h before compiling. |'revins'| + + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/version5.txt b/runtime/doc/version5.txt new file mode 100644 index 0000000000..1cc6a25597 --- /dev/null +++ b/runtime/doc/version5.txt @@ -0,0 +1,7813 @@ +*version5.txt* For Vim version 7.4. Last change: 2012 Aug 08 + + + VIM REFERENCE MANUAL by Bram Moolenaar + +Welcome to Vim Version 5.0! + +This document lists the differences between Vim 4.x and Vim 5.0. +Although 5.0 is mentioned here, this is also for version 5.1, 5.2, etc. +See |vi_diff.txt| for an overview of differences between Vi and Vim 5.0. +See |version4.txt| for differences between Vim 3.0 and Vim 4.0. + +INCOMPATIBLE: |incompatible-5| + +Default value for 'compatible' changed |cp-default| +Text formatting command "Q" changed |Q-command-changed| +Command-line arguments changed |cmdline-changed| +Autocommands are kept |autocmds-kept| +Use of 'hidden' changed |hidden-changed| +Text object commands changed |text-objects-changed| +X-Windows Resources removed |x-resources| +Use of $VIM |$VIM-use| +Use of $HOME for MS-DOS and Win32 |$HOME-use| +Tags file format changed |tags-file-changed| +Options changed |options-changed| +CTRL-B in Insert mode gone |i_CTRL-B-gone| + +NEW FEATURES: |new-5| + +Syntax highlighting |new-highlighting| +Built-in script language |new-script| +Perl and Python support |new-perl-python| +Win32 GUI version |added-win32-GUI| +VMS version |added-VMS| +BeOS version |added-BeOS| +Macintosh GUI version |added-Mac| +More Vi compatible |more-compatible| +Read input from stdin |read-stdin| +Regular expression patterns |added-regexp| +Overloaded tags |tag-overloaded| +New commands |new-commands| +New options |added-options| +New command-line arguments |added-cmdline-args| +Various additions |added-various| + +IMPROVEMENTS |improvements-5| + +COMPILE TIME CHANGES |compile-changes-5| + +BUG FIXES |bug-fixes-5| + +VERSION 5.1 |version-5.1| +Changed |changed-5.1| +Added |added-5.1| +Fixed |fixed-5.1| + +VERSION 5.2 |version-5.2| +Long lines editable |long-lines| +File browser added |file-browser-5.2| +Dialogs added |dialogs-added| +Popup menu added |popup-menu-added| +Select mode added |new-Select-mode| +Session files added |new-session-files| +User defined functions and commands |new-user-defined| +New interfaces |interfaces-5.2| +New ports |ports-5.2| +Multi-byte support |new-multi-byte| +New functions |new-functions-5.2| +New options |new-options-5.2| +New Ex commands |new-ex-commands-5.2| +Changed |changed-5.2| +Added |added-5.2| +Fixed |fixed-5.2| + +VERSION 5.3 |version-5.3| +Changed |changed-5.3| +Added |added-5.3| +Fixed |fixed-5.3| + +VERSION 5.4 |version-5.4| +Runtime directory introduced |new-runtime-dir| +Filetype introduced |new-filetype-5.4| +Vim script line continuation |new-line-continuation| +Improved session files |improved-sessions| +Autocommands improved |improved-autocmds-5.4| +Encryption |new-encryption| +GTK GUI port |new-GTK-GUI| +Menu changes |menu-changes-5.4| +Viminfo improved |improved-viminfo| +Various new commands |new-commands-5.4| +Various new options |new-options-5.4| +Vim scripts |new-script-5.4| +Avoid hit-enter prompt |avoid-hit-enter| +Improved quickfix |improved-quickfix| +Regular expressions |regexp-changes-5.4| +Changed |changed-5.4| +Added |added-5.4| +Fixed |fixed-5.4| + +VERSION 5.5 |version-5.5| +Changed |changed-5.5| +Added |added-5.5| +Fixed |fixed-5.5| + +VERSION 5.6 |version-5.6| +Changed |changed-5.6| +Added |added-5.6| +Fixed |fixed-5.6| + +VERSION 5.7 |version-5.7| +Changed |changed-5.7| +Added |added-5.7| +Fixed |fixed-5.7| + +VERSION 5.8 |version-5.8| +Changed |changed-5.8| +Added |added-5.8| +Fixed |fixed-5.8| + +============================================================================== + INCOMPATIBLE *incompatible-5* + +Default value for 'compatible' changed *cp-default* +-------------------------------------- + +Vim version 5.0 tries to be more Vi compatible. This helps people who use Vim +as a drop-in replacement for Vi, but causes some things to be incompatible +with version 4.x. + +In version 4.x the default value for the 'compatible' option was off. Now the +default is on. The first thing you will notice is that the "u" command undoes +itself. Other side effects will be that mappings may work differently or not +work at all. + +Since a lot of people switching from Vim 4.x to 5.0 will find this annoying, +the 'compatible' option is switched off if Vim finds a vimrc file. This is a +bit of magic to make sure that 90% of the Vim users will not be bitten by +this change. + +What does this mean? +- If you prefer to run in 'compatible' mode and don't have a vimrc file, you + don't have to do anything. +- If you prefer to run in 'nocompatible' mode and do have a vimrc file, you + don't have to do anything. +- If you prefer to run in 'compatible' mode and do have a vimrc file, you + should put this line first in your vimrc file: > + :set compatible +- If you prefer to run in 'nocompatible' mode and don't have a vimrc file, + you can do one of the following: + - Create an empty vimrc file (e.g.: "~/.vimrc" for Unix). + - Put this command in your .exrc file or $EXINIT: > + :set nocompatible +< - Start Vim with the "-N" argument. + +If you are new to Vi and Vim, using 'nocompatible' is strongly recommended, +because Vi has a lot of unexpected side effects, which are avoided by this +setting. See 'compatible'. + +If you like some things from 'compatible' and some not, you can tune the +compatibility with 'cpoptions'. + +When you invoke Vim as "ex" or "gex", Vim always starts in compatible mode. + + +Text formatting command "Q" changed *Q-command-changed* +----------------------------------- + +The "Q" command formerly formatted lines to the width the 'textwidth' option +specifies. The command for this is now "gq" (see |gq| for more info). The +reason for this change is that "Q" is the standard Vi command to enter "Ex" +mode, and Vim now does in fact have an "Ex" mode (see |Q| for more info). + +If you still want to use "Q" for formatting, use this mapping: > + :noremap Q gq +And if you also want to use the functionality of "Q": > + :noremap gQ Q + + +Command-line arguments changed *cmdline-changed* +------------------------------ + +Command-line file-arguments and option-arguments can now be mixed. You can +give options after the file names. Example: > + vim main.c -g + +This is not possible when editing a file that starts with a '-'. Use the "--" +argument then |---|: > + vim -g -- -main.c + +"-v" now means to start Ex in Vi mode, use "-R" for read-only mode. +old: "vim -v file" |-v| +new: "vim -R file" |-R| + +"-e" now means to start Vi in Ex mode, use "-q" for quickfix. +old: "vim -e errorfile" |-e| +new: "vim -q errorfile" |-q| + +"-s" in Ex mode now means to run in silent (batch) mode. |-s-ex| + +"-x" reserved for crypt, use "-f" to avoid starting a new CLI (Amiga). +old: "vim -x file" |-x| +new: "vim -f file" |-f| + +Vim allows up to ten "+cmd" and "-c cmd" arguments. Previously Vim executed +only the last one. + +"-n" now overrides any setting for 'updatecount' in a vimrc file, but not in +a gvimrc file. + + +Autocommands are kept *autocmds-kept* +--------------------- + +Before version 5.0, autocommands with the same event, file name pattern, and +command could appear only once. This was fine for simple autocommands (like +setting option values), but for more complicated autocommands, where the same +command might appear twice, this restriction caused problems. Therefore +Vim stores all autocommands and keeps them in the order that they are defined. + +The most obvious side effect of this change is that when you source a vimrc +file twice, the autocommands in it will be defined twice. To avoid this, do +one of these: + +- Remove any autocommands that might potentially defined twice before + defining them. Example: > + :au! * *.ext + :au BufEnter *.ext ... + +- Put the autocommands inside an ":if" command. Example: > + if !exists("did_ext_autocmds") + let did_ext_autocmds = 1 + autocmd BufEnter *.ext ... + endif + +- Put your autocommands in a different autocommand group so you can remove + them before defining them |:augroup|: > + augroup uncompress + au! + au BufReadPost *.gz ... + augroup END + + +Use of 'hidden' changed *hidden-changed* +----------------------- + +In version 4.x, only some commands used the 'hidden' option. Now all commands +uses it whenever a buffer disappears from a window. + +Previously you could do ":buf xxx" in a changed buffer and that buffer would +then become hidden. Now you must set the 'hidden' option for this to work. + +The new behavior is simpler: whether Vim hides buffers no longer depends on +the specific command that you use. +- with 'hidden' not set, you never get hidden buffers. Exceptions are the + ":hide" and ":close!" commands and, in rare cases, where you would otherwise + lose changes to the buffer. +- With 'hidden' set, you almost never unload a buffer. Exceptions are the + ":bunload" or ":bdel" commands. + +":buffer" now supports a "!": abandon changes in current buffer. So do +":bnext", ":brewind", etc. + + +Text object commands changed *text-objects-changed* +---------------------------- + +Text object commands have new names. This allows more text objects and makes +characters available for other Visual mode commands. Since no more single +characters were available, text objects names now require two characters. +The first one is always 'i' or 'a'. + OLD NEW ~ + a aw a word |v_aw| + A aW a WORD |v_aW| + s as a sentence |v_as| + p ap a paragraph |v_ap| + S ab a () block |v_ab| + P aB a {} block |v_aB| + +There is another set of text objects that starts with "i", for "inner". These +select the same objects, but exclude white space. + + +X-Windows Resources removed *x-resources* +-------------------------- + +Vim no longer supports the following X resources: +- boldColor +- italicColor +- underlineColor +- cursorColor + +Vim now uses highlight groups to set colors. This avoids the confusion of +using a bold Font, which would imply a certain color. See |:highlight| and +|gui-resources|. + + +Use of $VIM *$VIM-use* +----------- + +Vim now uses the VIM environment variable to find all Vim system files. This +includes the global vimrc, gvimrc, and menu.vim files and all on-line help +and syntax files. See |$VIM|. Starting with version 5.4, |$VIMRUNTIME| can +also be used. +For Unix, Vim sets a default value for $VIM when doing "make install". +When $VIM is not set, its default value is the directory from 'helpfile', +excluding "/doc/help.txt". + + +Use of $HOME for MS-DOS and Win32 *$HOME-use* +--------------------------------- + +The MS-DOS and Win32 versions of Vim now first check $HOME when searching for +a vimrc or exrc file and for reading/storing the viminfo file. Previously Vim +used $VIM for these systems, but this causes trouble on a system with several +users. Now Vim uses $VIM only when $HOME is not set or the file is not found +in $HOME. See |_vimrc|. + + +Tags file format changed *tags-file-changed* +------------------------ + +Only tabs are allowed to separate fields in a tags file. This allows for +spaces in a file name and is still Vi compatible. In previous versions of +Vim, any white space was allowed to separate the fields. If you have a file +which doesn't use a single tab between fields, edit the tags file and execute +this command: > + :%s/\(\S*\)\s\+\(\S*\)\s\+\(.*\)/\1\t\2\t\3/ + + +Options changed *options-changed* +--------------- + +The default value of 'errorfile' has changed from "errors.vim" to "errors.err". +The reason is that only Vim scripts should have the ".vim" extensions. + +The ":make" command no longer uses the 'errorfile' option. This prevents the +output of the ":make" command from overwriting a manually saved error file. +":make" uses the 'makeef' option instead. This also allows for generating a +unique name, to prevent concurrently running ":make" commands from overwriting +each other's files. + +With 'insertmode' set, a few more things change: +- <Esc> in Normal mode goes to Insert mode. +- <Esc> in Insert mode doesn't leave Insert mode. +- When doing ":set im", go to Insert mode immediately. + +Vim considers a buffer to be changed when the 'fileformat' (formerly the +'textmode' option) is different from the buffer's initial format. + + +CTRL-B in Insert mode gone *i_CTRL-B-gone* +-------------------------- + +When Vim was compiled with the |+rightleft| feature, you could use CTRL-B to +toggle the 'revins' option. Unfortunately, some people hit the 'B' key +accidentally when trying to type CTRL-V or CTRL-N and then didn't know how to +undo this. Since toggling the 'revins' option can easily be done with the +mapping below, this use of the CTRL-B key is disabled. You can still use the +CTRL-_ key for this |i_CTRL-_|. > + :imap <C-B> <C-O>:set revins!<CR> + +============================================================================== + NEW FEATURES *new-5* + +Syntax highlighting *new-highlighting* +------------------- + +Vim now has a very flexible way to highlighting just about any type of file. +See |syntax|. Summary: > + :syntax on + +Colors and attributes can be set for the syntax highlighting, and also for +other highlighted items with the ':' flag in the 'highlight' option. All +highlighted items are assigned a highlight group which specifies their +highlighting. See |:highlight|. The default colors have been improved. + +You can use the "Normal" group to set the default fore/background colors for a +color terminal. For the GUI, you can use this group to specify the font, too. + +The "2html.vim" script can be used to convert any file that has syntax +highlighting to HTML. The colors will be exactly the same as how you see them +in Vim. With a HTML viewer you can also print the file with colors. + + +Built-in script language *new-script* +------------------------ + +A few extra commands and an expression evaluator enable you to write simple +but powerful scripts. Commands include ":if" and ":while". Expressions can +manipulate numbers and strings. You can use the '=' register to insert +directly the result of an expression. See |expression|. + + +Perl and Python support *new-perl-python* +----------------------- + +Vim can call Perl commands with ":perldo", ":perl", etc. See |perl|. +Patches made by Sven Verdoolaege and Matt Gerassimoff. + +Vim can call Python commands with ":python" and ":pyfile". See |python|. + +Both of these are only available when enabled at compile time. + + +Win32 GUI version *added-win32-GUI* +----------------- + +The GUI has been ported to MS Windows 95 and NT. All the features of the X11 +GUI are available to Windows users now. |gui-w32| +This also fixes problems with running the Win32 console version under Windows +95, where console support has always been bad. +There is also a version that supports OLE automation interface. |if_ole.txt| +Vim can be integrated with Microsoft Developer Studio using the VisVim DLL. +It is possible to produce a DLL version of gvim with Borland C++ (Aaron). + + +VMS version *added-VMS* +----------- + +Vim can now also be used on VMS systems. Port done by Henk Elbers. +This has not been tested much, but it should work. +Sorry, no documentation! + + +BeOS version *added-BeOS* +------------ + +Vim can be used on BeOS systems (including the BeBox). (Olaf Seibert) +See |os_beos.txt|. + + +Macintosh GUI version *added-Mac* +--------------------- + +Vim can now be used on the Macintosh. (Dany St-Amant) +It has not been tested much yet, be careful! +See |os_mac.txt|. + + +More Vi compatible *more-compatible* +------------------ + +There is now a real Ex mode. Started with the "Q" command, or by calling the +executable "ex" or "gex". |Ex-mode| + +Always allow multi-level undo, also in Vi compatible mode. When the 'u' flag +in 'cpoptions' is included, CTRL-R is used for repeating the undo or redo +(like "." in Nvi). + + +Read input from stdin *read-stdin* +--------------------- + +When using the "-" command-line argument, Vim reads its text input from stdin. +This can be used for putting Vim at the end of a pipe: > + grep "^a.*" *.c | vim - +See |--|. + + +Regular expression patterns *added-regexp* +--------------------------- + +Added specifying a range for the number of matches of an atom: "\{a,b}". |/\{| +Added the "shortest match" regexp "\{-}" (Webb). +Added "\s", matches a white character. Can replace "[ \t]". |/\s| +Added "\S", matches a non-white character. Can replace "[^ \t]". |/\S| + + +Overloaded tags *tag-overloaded* +--------------- + +When using a language like C++, there can be several tags for the same +tagname. Commands have been added to be able to jump to any of these +overloaded tags: +|:tselect| List matching tags, and jump to one of them. +|:stselect| Idem, and split window. +|g_CTRL-]| Do ":tselect" with the word under the cursor. + + After ":ta {tagname}" with multiple matches: +|:tnext| Go to next matching tag. +|:tprevious| Go to previous matching tag. +|:trewind| Go to first matching tag. +|:tlast| Go to last matching tag. + +The ":tag" command now also accepts wildcards. When doing command-line +completion on tags, case-insensitive matching is also available (at the end). + + +New commands *new-commands* +------------ + +|:amenu| Define menus for all modes, inserting a CTRL-O for Insert + mode, ESC for Visual and CTRL-C for Cmdline mode. "amenu" is + used for the default menus and the Syntax menu. + +|:augroup| Set group to be used for following autocommands. Allows the + grouping of autocommands to enable deletion of a specific + group. + +|:crewind| Go to first error. +|:clast| Go to last error. + +|:doautoall| Execute autocommands for all loaded buffers. + +|:echo| Echo its argument, which is an expression. Can be used to + display messages which include variables. + +|:execute| Execute its argument, which is an expression. Can be used to + built up an Ex command with anything. + +|:hide| Works like ":close". + +|:if| Conditional execution, for built-in script language. + +|:intro| Show introductory message. This is always executed when Vim + is started without file arguments. + +|:let| Assign a value to an internal variable. + +|:omap| Map only in operator-pending mode. Makes it possible to map + text-object commands. + +|:redir| Redirect output of messages to a file. + +|:update| Write when buffer has changed. + +|:while| While-loop for built-in script language. + +Visual mode: +|v_O| "O" in Visual block mode, moves the cursor to the other corner + horizontally. +|v_D| "D" in Visual block mode deletes till end of line. + +Insert mode: +|i_CTRL-]| Triggers abbreviation, without inserting any character. + + +New options *added-options* +----------- + +'background' Used for selecting highlight color defaults. Also used in + "syntax.vim" for selecting the syntax colors. Often set + automatically, depending on the terminal used. + +'complete' Specifies how Insert mode completion works. + +'eventignore' Makes it possible to ignore autocommands temporarily. + +'fileformat' Current file format. Replaces 'textmode'. +'fileformats' Possible file formats. Replaces 'textauto'. + New is that this also supports Macintosh format: A single <CR> + separates lines. + The default for 'fileformats' for MS-DOS, Win32 and OS/2 is + "dos,unix", also when 'compatible' set. Unix type files + didn't work anyway when 'fileformats' was empty. + +'guicursor' Set the cursor shape and blinking in various modes. + Default is to adjust the cursor for Insert and Replace mode, + and when an operator is pending. Blinking is default on. + +'fkmap' Farsi key mapping. + +'hlsearch' Highlight all matches with the last used search pattern. + +'hkmapp' Phonetic Hebrew mapping. (Ilya Dogolazky) + +'iconstring' Define the name of the icon, when not empty. (Version 5.2: the + string is used literally, a newline can be used to make two + lines.) + +'lazyredraw' Don't redraw the screen while executing macros, registers or + other not typed commands. + +'makeef' Errorfile to be used for ":make". "##" is replaced with a + unique number. Avoids that two Vim sessions overwrite each + others errorfile. The Unix default is "/tmp/vim##.err"; for + Amiga "t:vim##.Err, for others "vim##.err". + +'matchtime' 1/10s of a second to show a matching paren, when 'showmatch' + is set. Like Nvi. + +'mousehide' Hide mouse pointer in GUI when typing text. + +'nrformats' Defines what bases Vim will consider for numbers when using + the CTRL-A and CTRL-X commands. Default: "hex,octal". + +'shellxquote' Add extra quotes around the whole shell command, including + redirection. + +'softtabstop' Make typing behave like tabstop is set at this value, without + changing the value of 'tabstop'. Makes it more easy to keep + 'ts' at 8, while still getting four spaces for a <Tab>. + +'titlestring' String for the window title, when not empty. (Version 5.2: + this string is used literally, a newline can be used to make + two lines.) + +'verbose' Level of verbosity. Makes it possible to show which .vimrc, + .exrc, .viminfo files etc. are used for initializing. Also + to show autocommands that are being executed. Can also be set + by using the "-V" command-line argument. + + +New command-line arguments *added-cmdline-args* +-------------------------- + +|-U| Set the gvimrc file to be used. Like "-u" for the vimrc. + +|-V| Set the 'verbose' option. E.g. "vim -V10". + +|-N| Start in non-compatible mode. + +|-C| Start in compatible mode. + +|-Z| Start in restricted mode, disallow shell commands. Can also + be done by calling the executable "rvim". + +|-h| Show usage information and exit. + + +Various additions *added-various* +----------------- + +Added support for SNiFF+ connection (submitted by Toni Leherbauer). Vim can +be used as an editor for SNiFF. No documentation available... + +For producing a bug report, the bugreport.vim script has been included. +Can be used with ":so $VIMRUNTIME/bugreport.vim", which creates the file +"bugreport.txt" in the current directory. |bugs| + +Added range to ":normal" command. Now you can repeat the same command for +each line in the range. |:normal-range| + +Included support for the Farsi language (Shiran). Only when enabled at +compile time. See |farsi|. + +============================================================================== + IMPROVEMENTS *improvements-5* + +Performance: +- When 'showcmd' was set, mappings would execute much more slowly because the + output would be flushed very often. Helps a lot when executing the "life" + macros with 'showcmd' set. +- Included patches for binary searching in tags file (David O'Neill). + Can be disabled by resetting the 'tagbsearch' option. +- Don't update the ruler when repeating insert (slowed it down a lot). +- For Unix, file name expansion is now done internally instead of starting a + shell for it. +- Expand environment variables with expand_env(), instead of calling the + shell. Makes ":so $VIMRUNTIME/syntax/syntax.vim" a LOT faster. +- Reduced output for cursor positioning: Use CR-LF for moving to first few + columns in next few lines; Don't output CR twice when using termios. +- Optimized cursor positioning. Use CR, BS and NL when it's shorter than + absolute cursor positioning. +- Disable redrawing while repeating insert "1000ii<Esc>". +- Made "d$" or "D" for long lines a lot faster (delete all characters at once, + instead of one by one). +- Access option table by first letter, instead of searching from start. +- Made setting special highlighting attributes a lot faster by using + highlight_attr[], instead of searching in the 'highlight' string. +- Don't show the mode when redrawing is disabled. +- When setting an option, only redraw the screen when required. +- Improved performance of Ex commands by using a lookup table for the first + character. + +Options: +'cinoptions' Added 'g' flag, for C++ scope declarations. +'cpoptions' Added 'E' flag: Disallow yanking, deleting, etc. empty text + area. Default is to allow empty yanks. When 'E' is included, + "y$" in an empty line now is handled as an error (Vi + compatible). + Added 'j' flag: Only add two spaces for a join after a '.', + not after a '?' or '!'. + Added 'A' flag: don't give ATTENTION message. + Added 'L' flag: When not included, and 'list' is set, + 'textwidth' formatting works like 'list' is not set. + Added 'W' flag: Let ":w!" behave like Vi: don't overwrite + readonly files, or a file owned by someone else. +'highlight' Added '@' flag, for '@' characters after the last line on the + screen, and '$' at the end of the line when 'list' is set. + Added 'i' flag: Set highlighting for 'incsearch'. Default + uses "IncSearch" highlight group, which is linked to "Visual". + Disallow 'h' flag in 'highlight' (wasn't used anymore since + 3.0). +'guifont' Win32 GUI only: When set to "*" brings up a font requester. +'guipty' Default on, because so many people need it. +'path' Can contain wildcards, and "**" for searching a whole tree. +'shortmess' Added 'I' flag to avoid the intro message. +'viminfo' Added '%' flag: Store buffer list in viminfo file. + +- Increased defaults for 'maxmem' and 'maxmemtot' for Unix and Win32. Most + machines have much more RAM now that prices have dropped. +- Implemented ":set all&", set all options to their default value. |:set| + +Swap file: +- Don't create a swap file for a readonly file. Then create one on the first + change. Also create a swapfile when the amount of memory used is getting + too high. |swap-file| +- Make swap file "hidden", if possible. On Unix this is done by prepending a + dot to the swap file name. When long file names are used, the DJGPP and + Win32 versions also prepend a dot, in case a file on a mounted Unix file + system is edited. |:swapname| On MSDOS the hidden file attribute is NOT + set, because this causes problems with share.exe. +- 'updatecount' always defaults to non-zero, also for Vi compatible mode. + This means there is a swap file, which can be used for recovery. + +Tags: +- Included ctags 2.0 (Darren Hiebert). The syntax for static tags changed + from + {tag}:{fname} {fname} {command} + to + {tag} {fname} {command};" file: + Which is both faster to parse, shorter and Vi compatible. The old format is + also still accepted, unless disabled in src/feature.h (see OLD_STATIC_TAGS). + |tags-file-format| +- Completion of tags now also includes static tags for other files, at the + end. +- Included "shtags" from Stephen Riehm. +- When finding a matching tag, but the file doesn't exist, continue searching + for another match. Helps when using the same tags file (with links) for + different versions of source code. +- Give a tag with a global match in the current file a higher priority than a + global match in another file. + +Included xxd version V1.8 (Juergen Weigert). + +Autocommands: +- VimLeave autocommands are executed after writing the viminfo file, instead + of before. |VimLeave| +- Allow changing autocommands while executing them. This allows for + self-modifying autocommands. (idea from Goldberg) +- When using autocommands with two or more patterns, could not split + ":if/:endif" over two lines. Now all matching autocommands are executed in + one do_cmdline(). +- Autocommands no longer change the command repeated with ".". +- Search patterns are restored after executing autocommands. This avoids + that the 'hlsearch' highlighting is messed up by autocommands. +- When trying to execute an autocommand, also try matching the pattern with + the short file name. Helps when short file name is different from full + file name (expanded symbolic links). |autocmd-patterns| +- Made the output of ":autocmd" shorter and look better. +- Expand <sfile> in an ":autocmd" when it is defined. |<sfile>| +- Added "nested" flag to ":autocmd", allows nesting. |autocmd-nested| +- Added [group] argument to ":autocmd". Overrides the currently set group. + |autocmd-groups| +- new events: + |BufUnload| before a buffer is unloaded + |BufDelete| before a buffer is deleted from the buffer list + |FileChangedShell| when a file's modification time has changed after + executing a shell command + |User| user-defined autocommand +- When 'modified' was set by a BufRead* autocommand, it was reset again + afterwards. Now the ":set modified" is remembered. + +GUI: +- Improved GUI scrollbar handling when redrawing is slower than the scrollbar + events are generated. +- "vim -u NONE" now also stops loading the .gvimrc and other GUI inits. |-u| + Use "-U" to use another gvimrc file. |-U| +- Handle CTRL-C for external command, also for systems where "setsid()" is + supported. +- When starting the GUI, restrict the window size to the screen size. +- The default menus are read from $VIMRUNTIME/menu.vim. This allows for a + customized default menu. |menu.vim| +- Improved the default menus. Added File/Print, a Window menu, Syntax menu, + etc. +- Added priority to the ":menu" command. Now each menu can be put in a place + where you want it, independent of the order in which the menus are defined. + |menu-priority| + +Give a warning in the intro screen when running the Win32 console version on +Windows 95 because there are problems using this version under Windows 95. +|win32-problems| + +Added 'e' flag for ":substitute" command: Don't complain when not finding a +match (Campbell). |:s| + +When using search commands in a mapping, only the last one is kept in the +history. Avoids that the history is trashed by long mappings. + +Ignore characters after "ex", "view" and "gvim" when checking startup mode. +Allows the use of "gvim5" et. al. |gvim| "gview" starts the GUI in readonly +mode. |gview| + +When resizing windows, the cursor is kept in the same relative position, if +possible. (Webb) + +":all" and ":ball" no longer close and then open a window for the same buffer. +Avoids losing options, jumplist, and other info. + +"-f" command-line argument is now ignored if Vim was compiled without GUI. +|-f| + +In Visual block mode, the right mouse button picks up the nearest corner. + +Changed default mappings for DOS et al. Removed the DOS-specific mappings, +only use the Windows ones. Added Shift-Insert, Ctrl-Insert, Ctrl-Del and +Shift-Del. + +Changed the numbers in the output of ":jumps", so you can see where {count} +CTRL-O takes you. |:jumps| + +Using "~" for $HOME now works for all systems. |$HOME| + +Unix: Besides using CTRL-C, also use the INTR character from the tty settings. +Somebody has INTR set to DEL. + +Allow a <LF> in a ":help" command argument to end the help command, so another +command can follow. + +Doing "%" on a line that starts with " #if" didn't jump to matching "#else". +Don't recognize "#if", "#else" etc. for '%' when 'cpo' contains the '%' flag. +|%| + +Insert mode expansion with "CTRL-N", "CTRL-P" and "CTRL-X" improved +|ins-completion|: +- 'complete' option added. +- When 'nowrapscan' is set, and no match found, report the searched direction + in the error message. +- Repeating CTRL-X commands adds following words/lines after the match. +- When adding-expansions, accept single character matches. +- Made repeated CTRL-X CTRL-N not break undo, and "." repeats the whole + insertion. Also fixes not being able to backspace over a word that has been + inserted with CTRL-N. + +When copying characters in Insert mode from previous/next line, with CTRL-E or +CTRL-Y, 'textwidth' is no longer used. |i_CTRL-E| + +Commands that move in the arglist, like ":n" and ":rew", keep the old cursor +position of the file (this is mostly Vi compatible). + +Vim now remembers the '< and '> marks for each buffer. This fixes a problem +that a line-delete in one buffer invalidated the '< and '> marks in another +buffer. |'<| + +For MSDOS, Unix and OS/2: When $VIM not set, use the path from the executable. +When using the executable path for $VIM, remove "src/" when present. Should +make Vim find the docs and syntax files when it is run directly after +compiling. |$VIM| + +When quitting Visual mode with <Esc>, the cursor is put at start of the Visual +area (like after executing an operator). + +Win32 and Unix version: Removed 1100 character limit on external commands. + +Added possibility to include a space in a ":edit +command" argument, by +putting a backslash before it. |+cmd| + +After recovery, BufReadPost autocommands are applied. |:recover| + +Added color support for "os2ansi", OS/2 console. (Slootman) |os2ansi| + +Allow "%:p:h" when % is empty. |:_%| + +Included "<sfile>": file name from the ":source" command. |<sfile>| + +Added "<Bslash>" special character. Helps for avoiding multiple backslashes +in mappings and menus. + +In a help window, a double-click jumps to the tag under the cursor (like +CTRL-]). + +<C-Left> and <C-Right> now work like <S-Left> and <S-Right>, move a word +forward/backward (Windows compatible). |<C-Left>| + +Removed the requirement for a ":version" command in a .vimrc file. It wasn't +used for anything. You can use ":if" to handle differences between versions. +|:version| + +For MS-DOS, Win32 and OS/2: When comparing file names for autocommands, don't +make a difference between '/' and '\' for path separator. + +New termcap options: +"mb": blink. Can only be used by assigning it to one of the other highlight + options. |t_mb| +"bc": backspace character. |t_bc| +"nd": Used for moving the cursor right in the GUI, to avoid removing one line + of pixels from the last bold character. |t_nd| +"xs": highlighting not erased by overwriting, for hpterm. Combined with + 'weirdinvert'. Visual mode works on hpterm now. |t_xs| + +Unix: Set time of patch and backup file same as original file. (Hiebert). + +Amiga: In QuickFix mode no longer opens another window. Shell commands can be +used now. + +Added decmouse patches from David Binette. Can now use Dec and Netterm mouse. +But only when enabled at compile time. + +Added '#' register: Alternate file name |quote#|. Display '#' register with +":dis" command. |:display| + +Removed ':' from 'isfname' default for Unix. Check for "://" in a file name +anyway. Also check for ":\\", for MS-DOS. + +Added count to "K"eyword command, when 'keywordprg' is "man", is inserted in +the man command. "2K" results in "!man 2 <cword>". |K| + +When using "gf" on a relative path name, remove "../" from the file name, like +it's done for file names in the tags file. |gf| + +When finishing recording, don't make the recorded register the default put +register. + +When using "!!", don't put ":5,5!" on the command-line, but ":.!". And some +other enhancements to replace the line number with "." or "$" when possible. + +MSDOS et al.: Renamed $VIM/viminfo to $VIM/_viminfo. It's more consistent: +.vimrc/_vimrc and .viminfo/_viminfo + +For systems where case doesn't matter in file names (MSDOS, Amiga), ignore +case while sorting file names. For buffer names too. + +When reading from stdin doesn't work, read from stderr (helps for "foo | xargs +vim"). + +32 bit MS-DOS version: Replaced csdpmi3 by csdpmi4. + +Changed <C-Left> and <C-Right> to skip a WORD instead of a word. + +Warning for changed modified time when overwriting a file now also works on +other systems than Unix. + +Unix: Changed the defaults for configure to be the same as the defaults for +Makefile: include GUI, Perl, and Python. + +Some versions of Motif require "-lXpm". Added check for this in configure. + +Don't add "-L/usr/lib" to the link line, causes problems on a few systems. + +============================================================================== + COMPILE TIME CHANGES *compile-changes-5* + +When compiling, allow a choice for minimal, normal or maximal features in an +easy way, by changing a single line in src/feature.h. +The DOS16 version has been compiled with minimal features to avoid running +out of memory too quickly. |dos16| +The Win32, DJGPP, and OS/2 versions use maximal features, because they have +enough memory. +The Amiga version is available with normal and maximal features. + +Added "make test" to Unix version Makefile. Allows for a quick check if most +"normal" commands work properly. Also tests a few specific commands. + +Added setlocale() with codepage support for DJGPP version. + +autoconf: +- Added autoconf check for -lXdmcp. +- Included check for -lXmu, no longer needed to edit the Makefile for this. +- Switched to autoconf 2.12. +- Added configure check for <poll.h>. Seems to be needed when including + Perl on Linux? +- termlib is now checked before termcap. +- Added configure check for strncasecmp(), stricmp() and strnicmp(). Added + vim_stricmp() for when there's no library function for stricmp(). +- Use "datadir" in configure, instead of our own check for HELPDIR. + +Removed "make proto" from Makefile.manx. Could not make it work without a lot +of #ifdefs. + +Removed "proto/" from paths in proto.h. Needed for the Mac port. + +Drastically changed Makefile.mint. Now it includes the Unix Makefile. + +Added support for Dos16 in Makefile.b32 (renamed Makefile.b32 to Makefile.bor) + +All source files are now edited with a tabstop of 8 instead of 4, which is +better when debugging and using other tools. 'softtabstop' is set to 4, to +make editing easier. + +Unix: Added "link.sh" script, which removes a few unnecessary libraries from +the link command. + +Don't use HPUX digraphs by default, but only when HPUX_DIGRAPHS is defined. +|digraphs-default| + +============================================================================== + BUG FIXES *bug-fixes-5* + +Note: Some of these fixes may only apply to test versions which were + created after version 4.6, but before 5.0. + + +When doing ":bdel", try going to the next loaded buffer. Don't rewind to the +start of the buffer list. + +mch_isdir() for Unix returned TRUE for "" on some systems. + +Win32: 'shell' set to "mksnt/sh.exe" breaks ":!" commands. Don't use +backslashes in the temp file names. + +On linux, with a FAT file system, could get spurious "file xxx changed since +editing started" messages, because the time is rounded off to two seconds +unexpectedly. + +Crash in GUI, when selecting a word (double click) and then extend until an +empty line. + +For systems where isdigit() can't handle characters > 255, get_number() caused +a crash when moving the mouse during the prompt for recovery. + +In Insert mode, "CTRL-O P" left the cursor on the last inserted character. +Now the cursor is left after the last putted character. + +When quickfix found an error type other than 'e' or 'w', it was never printed. + +A setting for 'errorfile' in a .vimrc overruled the "-q errorfile" argument. + +Some systems create a file when generating a temp file name. Filtering would +then create a backup file for this, which was never deleted. Now no backup +file is made when filtering. + +simplify_filename() could remove a ".." after a link, resulting in the wrong +file name. Made simplify_filename also work for MSDOS. Don't use it for +Amiga, since it doesn't have "../". + +otherfile() was unreliable when using links. Could think that reading/writing +was for a different file, when it was the same. + +Pasting with mouse in Replace mode didn't replace anything. + +Window height computed wrong when resizing a window with an autocommand (could +cause a crash). + +":s!foo!bar!" wasn't possible (Vi compatible). + +do_bang() freed memory twice when called recursively, because of autocommands +(test11). Thanks to Electric Fence! + +"v$d" on an empty line didn't remove the "-- VISUAL --" mode message from the +command-line, and inverted the cursor. + +":mkexrc" didn't check for failure to open the file, causing a crash. +(Felderhoff). + +Win32 mch_write() wrote past fixed buffer, causing terminal keys no longer to +be recognized. Both console and GUI version. + +Athena GUI: Crash when removing a menu item. Now Vim doesn't crash, but the +reversing of the menu item is still wrong. + +Always reset 'list' option for the help window. + +When 'scrolloff' is non-zero, a 'showmatch' could cause the shown match to be +in the wrong line and the window to be scrolled (Acevedo). + +After ":set all&", 'lines' and 'ttytype' were still non-default, because the +defaults never got set. Now the defaults for 'lines' and 'columns' are set +after detecting the window size. 'term' and 'ttytype' defaults are set when +detecting the terminal type. + +For (most) non-Unix systems, don't add file names with illegal characters when +expanding. Fixes "cannot open swapfile" error when doing ":e *.burp", when +there is no match. + +In X11 GUI, drawing part of the cursor obscured the text. Now the text is +drawn over the cursor, like when it fills the block. (Seibert) + +when started with "-c cmd -q errfile", the cursor would be left in line 1. +Now a ":cc" is done after executing "cmd". + +":ilist" never ignored case, even when 'ignorecase' set. + +"vim -r file" for a readonly file, then making a change, got ATTENTION message +in insert mode, display mixed up until <Esc> typed. Also don't give ATTENTION +message after recovering a file. + +The abbreviation ":ab #i #include" could not be removed. + +CTRL-L completion (longest common match) on command-line didn't work properly +for case-insensitive systems (MS-DOS, Windows, etc.). (suggested by Richard +Kilgore). + +For terminals that can hide the cursor ("vi" termcap entry), resizing the +window caused the cursor to disappear. + +Using an invalid mark in an Ex address didn't abort the command. + +When 'smarttab' set, would use 'shiftround' when inserting a TAB after a +space. Now it always rounds to a tabstop. + +Set '[ and '] marks for ":copy", ":move", ":append", ":insert", ":substitute" +and ":change". (Acevedo). + +"d$" in an empty line still caused an error, even when 'E' is not in +'cpoptions'. + +Help files were stored in the viminfo buffer list without a path. + +GUI: Displaying cursor was not synchronized with other displaying. Caused +several display errors. For example, when the last two lines in the file +start with spaces, "dd" on the last line copied text to the (then) last line. + +Win32: Needed to type CTRL-SHIFT-- to get CTRL-_. + +GUI: Moving the cursor forwards over bold text would remove one column of bold +pixels. + +X11 GUI: When a bold character in the last column was scrolled up or down, one +column of pixels would not be copied. + +Using <BS> to move the cursor left can sometimes erase a character. Now use +"le" termcap entry for this. + +Keyword completion with regexp didn't work. e.g., for "b.*crat". + +Fixed: With CTRL-O that jumps to another file, cursor could end up just after +the line. + +Amiga: '$' was missing from character recognized as wildcards, causing $VIM +sometimes not to be expanded. + +":change" didn't adjust marks for deleted lines. + +":help [range]" didn't work. Also for [pattern], [count] and [quotex]. + +For 'cindent'ing, typing "class::method" doesn't align like a label when the +second ':' is typed. +When inserting a CR with 'cindent' set (and a bunch of other conditions) the +cursor went to a wrong location. +'cindent' was wrong for a line that ends in '}'. +'cindent' was wrong after "else {". + +While editing the cmdline in the GUI, could not use the mouse to select text +from the command-line itself. + +When deleting lines, marks in tag stack were only adjusted for the current +window, not for other windows on the same buffer. + +Tag guessing could find a function "some_func" instead of the "func" we were +looking for. + +Tags file name relative to the current file didn't work. + +":g/pat2/s//pat2/g", causing the number of subs to be reported, used to cause +a scroll up. Now you no longer have to hit <CR>. + +X11 GUI: Selecting text could cause a crash. + +32 bit DOS version: CTRL-C in external command killed Vim. When SHELL is set +to "sh.exe", external commands didn't work. Removed using of command.com, no +longer need to set 'shellquote'. + +Fixed crash when using ":g/pat/i". + +Fixed (potential) crash for X11 GUI, when using an X selection. Was giving a +pointer on the stack to a callback function, now it's static. + +Using "#" and "*" with an operator didn't work. E.g. "c#". + +Command-line expansion didn't work properly after ":*". (Acevedo) + +Setting 'weirdinvert' caused highlighting to be wrong in the GUI. + +":e +4 #" didn't work, because the "4" was in unallocated memory (could cause +a crash). + +Cursor position was wrong for ":e #", after ":e #" failed, because of changes +to the buffer. + +When doing ":buf N", going to a buffer that was edited with ":view", the +readonly flag was reset. Now make a difference between ":e file" and ":buf +file": Only set/reset 'ro' for the first one. + +Avoid |hit-enter| prompt when not able to write viminfo on exit. + +When giving error messages in the terminal where the GUI was started, GUI +escape codes would be written to the terminal. In an xterm this could be seen +as a '$' after the message. + +Mouse would not work directly after ":gui", because full_screen isn't set, +which causes starttermcap() not to do its work. + +'incsearch' did not scroll the window in the same way as the actual search. +When 'nowrap' set, incsearch didn't show a match when it was off the side of +the screen. Now it also shows the whole match, instead of just the cursor +position (if possible). + +":unmap", ":unab" and ":unmenu" did not accept a double quote, it was seen as +the start of a comment. Now it's Vi compatible. + +Using <Up><Left><Left><Up> in the command-line, when there is no previous +cmdline in the history, inserted a NUL on the command-line. + +"i<Esc>" when on a <Tab> in column 0 left the cursor in the wrong place. + +GUI Motif: When adding a lot of menu items, the menu bar goes into two rows. +Deleting menu items, reducing the number of rows, now also works. + +With ":g/pat/s//foo/c", a match in the first line was scrolled off of the +screen, so you could not see it. +When using ":s//c", with 'nowrap' set, a match could be off the side of the +screen, so you could not see it. + +When 'helpfile' was set to a fixed, non-absolute path in feature.h, Vim would +crash. mch_Fullname can now handle file names in read-only memory. (Lottem) + +When using CTRL-A or CTRL-@ in Insert mode, there could be strange effects +when using CTRL-D next. Also, when repeating inserted text that included "0 +CTRL-D" or "^ CTRL-D" this didn't work. (Acevedo) +Using CTRL-D after using CTRL-E or CTRL-Y in Insert mode that inserted a '0' +or '^', removed the '0' or '^' and more indent. + +The command "2".p" caused the last inserted text to be executed as commands. +(Acevedo) + +Repeating the insert of "CTRL-V 048" resulted in "^@" to be inserted. + +Repeating Insert completion could fail if there are special characters in the +text. (Acevedo) + +":normal /string<CR>" caused the window to scroll. Now all ":normal" commands +are executed without scrolling messages. + +Redo of CTRL-E or CTRL-Y in Insert mode interpreted special characters as +commands. + +Line wrapping for 'tw' was done one character off for insert expansion +inserts. + +buffer_exists() function didn't work properly for buffer names with a symbolic +link in them (e.g. when using buffer_exists(#)). + +Removed the "MOTIF_COMMENT" construction from Makefile. It now works with +FreeBSD make, and probably with NeXT make too. + +Matching the 'define' and 'include' arguments now honor the settings for +'ignorecase'. (Acevedo) + +When one file shown in two windows, Visual selection mixed up cursor position +in current window and other window. + +When doing ":e file" from a help file, the 'isk' option wasn't reset properly, +because of a modeline in the help file. + +When doing ":e!", a cursor in another window on the same buffer could become +invalid, leading to "ml_get: invalid lnum" errors. + +Matching buffer name for when expanded name has a different path from not +expanded name (Brugnara). + +Normal mappings didn't work after an operator. For example, with ":map Q gq", +"QQ" didn't work. + +When ":make" resulted in zero errors, a "No Errors" error message was given +(which breaks mappings). + +When ":sourcing" a file, line length was limited to 1024 characters. CTRL-V +before <EOL> was not handled Vi compatible. (Acevedo) + +Unexpected exit for X11 GUI, caused by SAVE_YOURSELF event. (Heimann) + +CTRL-X CTRL-I only found one match per line. (Acevedo) +When using an illegal CTRL-X key in Insert mode, the CTRL-X mode message +was stuck. + +Finally managed to ignore the "Quit" menu entry of the Window manager! Now +Vim only exists when there are no changed buffers. + +Trying to start the GUI when $DISPLAY is not set resulted in a crash. +When $DISPLAY is not set and gvim starts vim, title was restored to "Thanks +for flying Vim". +When $DISPLAY not set, starting "gvim" (dropping back to vim) and then +selecting text with the mouse caused a crash. + +"J", with 'joinspaces' set, on a line ending in ". ", caused one space too +many to be added. (Acevedo) + +In insert mode, a CTRL-R {regname} which didn't insert anything left the '"' +on the screen. + +":z10" didn't work. (Clapp) + +"Help "*" didn't work. + +Renamed a lot of functions, to avoid clashes with POSIX name space. + +When adding characters to a line, making it wrap, the following lines were +sometimes not shifted down (e.g. after a tag jump). + +CTRL-E, with 'so' set and cursor on last line, now does not move cursor as +long as the last line is on the screen. + +When there are two windows, doing "^W+^W-" in the bottom window could cause +the status line to be doubled (not redrawn correctly). + +This command would hang: ":n `cat`". Now connect stdin of the external +command to /dev/null, when expanding. + +Fixed lalloc(0,) error for ":echo %:e:r". (Acevedo) + +The "+command" argument to ":split" didn't work when there was no file name. + +When selecting text in the GUI, which is the output of a command-line command +or an external command, the inversion would sometimes remain. + +GUI: "-mh 70" argument was broken. Now, when menuheight is specified, it is +not changed anymore. + +GUI: When using the scrollbar or mouse while executing an external command, +this caused garbage characters. + +Showmatch sometimes jumped to the wrong position. Was caused by a call to +findmatch() when redrawing the display (when syntax highlighting is on). + +Search pattern "\(a *\)\{3} did not work correctly, also matched "a a". +Problem with brace_count not being decremented. + +Wildcard expansion added too many non-matching file names. + +When 'iskeyword' contains characters like '~', "*" and "#" didn't work +properly. (Acevedo) + +On Linux, on a FAT file system, modification time can change by one second. +Avoid a "file has changed" warning for a one second difference. + +When using the page-switching in an xterm, Vim would position the cursor on +the last line of the window on exit. Also removed the cursor positioning for +":!" commands. + +":g/pat/p" command (partly) overwrote the command. Now the output is on a +separate line. + +With 'ic' and 'scs' set, a search for "Keyword", ignore-case matches were +highlighted too. + +"^" on a line with only white space, put cursor beyond the end of the line. + +When deleting characters before where insertion started ('bs' == 2), could not +use abbreviations. + +CTRL-E at end of file puts cursor below the file, in Visual mode, when 'so' is +non-zero. CTRL-E didn't work when 'so' is big and the line below the window +wraps. CTRL-E, when 'so' is non-zero, at end of the file, caused jumping +up-down. + +":retab" didn't work well when 'list' is set. + +Amiga: When inserting characters at the last line on the screen, causing it +to wrap, messed up the display. It appears that a '\n' on the last line +doesn't always cause a scroll up. + +In Insert mode "0<C-D><C-D>" deleted an extra character, because Vim thought +that the "0" was still there. (Acevedo) + +"z{count}l" ignored the count. Also for "zh" et. al. (Acevedo) + +"S" when 'autoindent' is off didn't delete leading white space. + +"/<Tab>" landed on the wrong character when 'incsearch' is set. + +Asking a yes/no question could cause a |hit-enter| prompt. + +When the file consists of one long line (>4100 characters), making changes +caused various errors and a crash. + +DJGPP version could not save long lines (>64000) for undo. + +"yw" on the last char in the file didn't work. Also fixed "6x" at the end of +the line. "6X" at the start of a line fails, but does not break a mapping. In +general, a movement for an operator doesn't beep or flush a mapping, but when +there is nothing to operate on it beeps (this is Vi compatible). + +"m'" and "m`" now set the '' mark at the cursor position. + +Unix: Resetting of signals for external program didn't work, because SIG_DFL +and NULL are the same! For "!!yes|dd count=1|, the yes command kept on +running. + +Partly fixed: Unix GUI: Typeahead while executing an external command was lost. +Now it's not lost while the command is producing output. + +Typing <S-Tab> in Insert mode, when it isn't mapped, inserted "<S-Tab>". Now +it works like a normal <Tab>, just like <C-Tab> and <M-Tab>. + +Redrawing ruler didn't check for old value correctly (caused UMR warnings in +Purify). + +Negative array index in finish_viminfo_history(). + +":g/^/d|mo $" deleted all the lines. The ":move" command now removes the +:global mark from the moved lines. + +Using "vG" while the last line in the window is a "@" line, didn't update +correctly. Just the "v" showed "~" lines. + +"daw" on the last char of the file, when it's a space, moved the cursor beyond +the end of the line. + +When 'hlsearch' was set or reset, only the current buffer was redrawn, while +this affects all windows. + +CTRL-^, positioning the cursor somewhere from 1/2 to 1 1/2 screen down the +file, put the cursor at the bottom of the window, instead of halfway. + +When scrolling up for ":append" command, not all windows were updated +correctly. + +When 'hlsearch' is set, and an auto-indent is highlighted, pressing <Esc> +didn't remove the highlighting, although the indent was deleted. + +When 'ru' set and 'nosc', using "$j" showed a wrong ruler. + +Under Xfree 3.2, Shift-Tab didn't work (wrong keysym is used). + +Mapping <S-Tab> didn't work. Changed the key translations to use the shortest +key code possible. This makes the termcode translations and mappings more +consistent. Now all modifiers work in all combinations, not only with <Tab>, +but also with <Space>, <CR>, etc. + +For Unix, restore three more signals. And Vim catches SIGINT now, so CTRL-C +in Ex mode doesn't make Vim exit. + +""a5Y" yanked 25 lines instead of 5. + +"vrxxx<Esc>" in an empty line could not be undone. + +A CTRL-C that breaks ":make" caused the errorfile not to be read (annoying +when you want to handle what ":make" produced so far). + +":0;/pat" didn't find "pat" in line 1. + +Search for "/test/s+1" at first char of file gave bottom-top message, or +didn't work at all with 'nowrapscan'. + +Bug in viminfo history. Could cause a crash on exit. + +":print" didn't put cursor on first non-blank in line. + +":0r !cat </dev/null" left cursor in line zero, with very strange effects. + +With 'showcmd' set and 'timeoutlen' set to a few seconds, trick to position +the cursor leftwards didn't work. + +AIX stty settings were restored to cs5 instead of cs8 (Winn). + +File name completion didn't work for "zsh" versions that put spaces between +file names, instead of NULs. + +Changed "XawChain*" to "XtChain*", should work for more systems. + +Included quite a few fixes for rightleft mode (Lottem). + +Didn't ask to |hit-enter| when GUI is started and error messages are printed. + +When trying to edit a file in a non-existent directory, ended up with editing +"No file". + +"gqap" to format a paragraph did too much redrawing. + +When 'hlsearch' set, only the current window was updated for a new search +pattern. + +Sometimes error messages on startup didn't cause a |hit-enter| prompt, +because of autocommands containing an empty line. + +Was possible to select part of the window in the border, below the command +line. + +'< and '> marks were not at the correct position after linewise Visual +selection. + +When translating a help argument to "CTRL-x", prepend or append a '_', when +applicable. + +Blockwise visual mode wasn't correct when moving vertically over a special +character (displayed as two screen characters). + +Renamed "struct option" to "struct vimoption" to avoid name clash with GNU +getopt(). + +":abclear" didn't work (but ":iabclear" and ":cabclear" did work). + +When 'nowrap' used, screen wasn't always updated correctly. + +"vim -c split file" displayed extra lines. + +After starting the GUI, searched the termcap for a "gui" term. + +When 'hls' used, search for "^$" caused a hang. +When 'hls' was set, an error in the last regexp caused trouble. + +Unix: Only output an extra <EOL> on exit when outputted something in the +alternate screen, or when there is a message that needs to be cleared. + +"/a\{" did strange things, depending on previous search. + +"c}" only redrew one line (with -u NONE). + +For mappings, CTRL-META-A was shown as <M-^A> instead of <MC-A>, while :map +only accepts <MC-A>. Now <M-C-A> is shown. + +Unix: When using full path name in a tags file, which contains a link, and +'hidden' set and jumping to a tag in the current file, would get bogus +ATTENTION message. Solved by always expanding file names, even when starting +with '/'. + +'hlsearch' highlighting of special characters (e.g., a TAB) didn't highlight +the whole thing. + +"r<CR>" didn't work correctly on the last char of a line. + +Sometimes a window resize or other signal caused an endless loop, involving +set_winsize(). + +"vim -r" didn't work, it would just hang (using tgetent() while 'term' is +empty). + +"gk" while 'nowrap' set moved two lines up. + +When windows are split, a message that causes a scroll-up messed up one of the +windows, which required a CTRL-L to be typed. + +Possible endless loop when using shell command in the GUI. + +Menus defined in the .vimrc were removed when GUI started. + +Crash when pasting with the mouse in insert mode. + +Crash with ":unmenu *" in .gvimrc for Athena. + +"5>>" shifted 5 lines 5 times, instead of 1 time. + +CTRL-C when getting a prompt in ":global" didn't interrupt. + +When 'so' is non-zero, and moving the scrollbar completely to the bottom, +there was a lot of flashing. + +GUI: Scrollbar ident must be long for DEC Alpha. + +Some functions called vim_regcomp() without setting reg_magic, which could +lead to unpredictable magicness. + +Crash when clicking around the status line, could get a selection with a +backwards range. + +When deleting more than one line characterwise, the last character wasn't +deleted. + +GUI: Status line could be overwritten when moving the scrollbar quickly (or +when 'wd' is non-zero). + +An ESC at the end of a ":normal" command caused a wait for a terminal code to +finish. Now, a terminal code is not recognized when its start comes from a +mapping or ":normal" command. + +Included patches from Robert Webb for GUI. Layout of the windows is now done +inside Vim, instead of letting the layout manager do this. Makes Vim work +with Lesstif! + +UMR warning in set_expand_context(). + +Memory leak: b_winlnum list was never freed. + +Removed TIOCLSET/TIOCLGET code from os_unix.c. Was changing some of the +terminal settings, and looked like it wasn't doing anything good. (suggested +by Juergen Weigert). + +Ruler overwrote "is a directory" message. When starting up, and 'cmdheight' +set to > 1, first message could still be in the last line. + +Removed prototype for putenv() from proto.h, it's already in osdef2.h.in. + +In replace mode, when moving the cursor and then backspacing, wrong characters +were inserted. + +Win32 GUI was checking for a CTRL-C too often, making it slow. + +Removed mappings for MS-DOS that were already covered by commands. + +When visually selecting all lines in a file, cursor at last line, then "J". +Gave ml_get errors. Was a problem with scrolling down during redrawing. + +When doing a linewise operator, and then an operator with a mouse click, it +was also linewise, instead of characterwise. + +When 'list' is set, the column of the ruler was wrong. + +Spurious error message for "/\(b\+\)*". + +When visually selected many lines, message from ":w file" disappeared when +redrawing the screen. + +":set <M-b>=^[b", then insert "^[b", waited for another character. And then +inserted "<M-b>" instead of the real <M-b> character. Was trying to insert +K_SPECIAL x NUL. + +CTRL-W ] didn't use count to set window height. + +GUI: "-font" command-line argument didn't override 'guifont' setting from +.gvimrc. (Acevedo) + +GUI: clipboard wasn't used for "*y". And some more Win32/X11 differences +fixed for the clipboard (Webb). + +Jumping from one help file to another help file, with 'compatible' set, +removed the 'help' flag from the buffer. + +File-writable bit could be reset when using ":w!" for a readonly file. + +There was a wait for CTRL-O n in Insert mode, because the search pattern was +shown. +Reduced wait, to allow reading a message, from 10 to 3 seconds. It seemed +nothing was happening. + +":recover" found same swap file twice. + +GUI: "*yy only worked the second time (when pasting to an xterm)." + +DJGPP version (dos32): The system flags were cleared. + +Dos32 version: Underscores were sometimes replaced with y-umlaut (Levin). + +Version 4.1 of ncurses can't handle tputs("", ..). Avoid calling tputs() with +an empty string. + +<S-Tab> in the command-line worked like CTRL-P when no completion started yet. +Now it does completion, last match first. + +Unix: Could get annoying "can't write viminfo" message after doing "su". Now +the viminfo file is overwritten, and the user set back to the original one. + +":set term=builtin_gui" started the GUI in a wrong way. Now it's not +allowed anymore. But "vim -T gui" does start the GUI correctly now. + +GUI: Triple click after a line only put last char in selection, when it is a +single character word. + +When the window is bigger than the screen, the scrolling up of messages was +wrong (e.g. ":vers", ":hi"). Also when the bottom part of the window was +obscured by another window. + +When using a wrong option only an error message is printed, to avoid that the +usage information makes it scroll off the screen. + +When exiting because of not being able to read from stdin, didn't preserve the +swap files properly. + +Visual selecting all chars in more than one line, then hit "x" didn't leave an +empty line. For one line it did leave an empty line. + +Message for which autocommand is executing messed up file write message (for +FileWritePost event). + +"vim -h" included "-U" even when GUI is not available, and "-l" when lisp is +not available. + +Crash for ":he <C-A>" (command-line longer than screen). + +":s/this/that/gc", type "y" two times, then undo, did reset the modified +option, even though the file is still modified. + +Empty lines in a tags file caused a ":tag" to be aborted. + +When hitting 'q' at the more prompt for ":menu", still scrolled a few lines. + +In an xterm that uses the bold trick a single row of characters could remain +after an erased bold character. Now erase one extra char after the bold char, +like for the GUI. + +":pop!" didn't work. + +When the reading a buffer was interrupted, ":w" should not be able to +overwrite the file, ":w!" is required. + +":cf%" caused a crash. + +":gui longfilename", when forking is enabled, could leave part of the +longfilename at the shell prompt. + +============================================================================== +VERSION 5.1 *version-5.1* + +Improvements made between version 5.0 and 5.1. + +This was mostly a bug-fix release, not many new features. + + +Changed *changed-5.1* +------- + +The expand() function now separates file names with <NL> instead of a space. +This avoids problems for file names with embedded spaces. To get the old +result, use substitute(expand(foo), "\n", " ", "g"). + +For Insert-expanding dictionaries allow a backslash to be used for +wildchars. Allows expanding "ze\kra", when 'isk' includes a backslash. + +New icon for the Win32 GUI. + +":tag", ":tselect" etc. only use the argument as a regexp when it starts +with '/'. Avoids that ":tag xx~" gives an error message: "No previous sub. +regexp". Also, when the :tag argument contained wildcard characters, it was +not Vi compatible. +When using '/', the argument is taken literally too, with a higher priority, +so it's found before wildcard matches. +Only when the '/' is used are matches with different case found, even though +'ignorecase' isn't set. +Changed "g^]" to only do ":tselect" when there is more than on matching tag. + +Changed some of the default colors, because they were not very readable on a +dark background. + +A character offset to a search pattern can move the cursor to the next or +previous line. Also fixes that "/pattern/e+2" got stuck on "pattern" at the +end of a line. + +Double-clicks in the status line do no longer start Visual mode. Dragging a +status line no longer stops Visual mode. + +Perl interface: Buffers() and Windows() now use more logical arguments, like +they are used in the rest of Vim (Moore). + +Init '" mark to the first character of the first line. Makes it possible to +use '" in an autocommand without getting an error message. + + +Added *added-5.1* +----- + +"shell_error" internal variable: result of last shell command. + +":echohl" command: Set highlighting for ":echo". + +'S' flag in 'highlight' and StatusLineNC highlight group: highlighting for +status line of not-current window. Default is to use bold for current +window. + +Added buffer_name() and buffer_number() functions (Aaron). +Added flags argument "g" to substitute() function (Aaron). +Added winheight() function. + +Win32: When an external command starts with "start ", no console is opened +for it (Aaron). + +Win32 console: Use termcap codes for bold/reverse based on the current +console attributes. + +Configure check for "strip". (Napier) + +CTRL-R CTRL-R x in Insert mode: Insert the contents of a register literally, +instead of as typed. + +Made a few "No match" error messages more informative by adding the pattern +that didn't match. + +"make install" now also copies the macro files. + +tools/tcltags, a shell script to generate a tags file from a TCL file. + +"--with-tlib" setting for configure. Easy way to use termlib: "./configure +--with-tlib=termlib". + +'u' flag in 'cino' for setting the indent for contained () parts. + +When Win32 OLE version can't load the registered type library, ask the user +if he wants to register Vim now. (Erhardt) +Win32 with OLE: When registered automatically, exit Vim. +Included VisVim 1.1b, with a few enhancements and the new icon (Heiko +Erhardt). + +Added patch from Vince Negri for Win32s support. Needs to be compiled with +VC 4.1! + +Perl interface: Added $curbuf. Rationalized Buffers() and Windows(). +(Moore) Added "group" argument to Msg(). + +Included Perl files in DOS source archive. Changed Makefile.bor and +Makefile.w32 to support building a Win32 version with Perl included. + +Included new Makefile.w32 from Ken Scott. Now it's able to make all Win32 +versions, including OLE, Perl and Python. + +Added CTRL-W g ] and CTRL-W g ^]: split window and do g] or g^]. + +Added "g]" to always do ":tselect" for the ident under the cursor. +Added ":tjump" and ":stjump" commands. +Improved listing of ":tselect" when tag names are a bit long. + +Included patches for the Macintosh version. Also for Python interface. +(St-Amant) + +":buf foo" now also restores cursor column, when the buffer was used before. + +Adjusted the Makefile for different final destinations for the syntax files +and scripts (for Debian Linux). + +Amiga: $VIM can be used everywhere. When $VIM is not defined, "VIM:" is +used. This fixes that "VIM:" had to be assigned for the help files, and +$VIM set for the syntax files. Now either of these work. + +Some xterms send vt100 compatible function keys F1-F4. Since it's not +possible to detect this, recognize both type of keys and translate them to +<F1> - <F4>. + +Added "VimEnter" autocommand. Executed after loading all the startup stuff. + +BeOS version now also runs on Intel CPUs (Seibert). + + +Fixed *fixed-5.1* +----- + +":ts" changed position in the tag stack when cancelled with <CR>. +":ts" changed the cursor position for CTRL-T when cancelled with <CR>. +":tn" would always jump to the second match. Was using the wrong entry in +the tag stack. +Doing "tag foo", then ":tselect", overwrote the original cursor position in +the tag stack. + +"make install" changed the vim.1 manpage in a wrong way, causing "doc/doc" +to appear for the documentation files. + +When compiled with MAX_FEAT, xterm mouse handling failed. Was caused by DEC +mouse handling interfering. + +Was leaking memory when using selection in X11. + +CTRL-D halfway a command-line left some characters behind the first line(s) +of the listing. + +When expanding directories for ":set path=", put two extra backslashes +before a space in a directory name. + +When 'lisp' set, first line of a function would be indented. Now its indent +is set to zero. And use the indent of the first previous line that is at +the same () level. Added test33. + +"so<Esc>u" in an empty file didn't work. + +DOS: "seek error in swap file write" errors, when using DOS 6.2 share.exe, +because the swap file was made hidden. It's no longer hidden. + +":global" command would sometimes not execute on a matching line. Happened +when a data block is full in ml_replace(). + +For AIX use a tgetent buffer of 2048 bytes, instead of 1024. + +Win32 gvim now only sets the console size for external commands to 25x80 +on Windows 95, not on NT. + +Win32 console: Dead key could cause a crash, because of a missing "WINAPI" +(Deshpande). + +The right mouse button started Visual mode, even when 'mouse' is empty, and +in the command-line, a left click moved the cursor when 'mouse' is empty. +In Visual mode, 'n' in 'mouse' would be used instead of 'v'. + +A blinking cursor or focus change cleared a non-Visual selection. + +CTRL-Home and CTRL-End didn't work for MS-DOS versions. + +Could include NUL in 'iskeyword', causing a crash when doing insert mode +completion. + +Use _dos_commit() to flush the swap file to disk for MSDOS 16 bit version. + +In mappings, CTRL-H was replaced by the backspace key code. This caused +problems when it was used as text, e.g. ":map _U :%s/.^H//g<CR>". + +":set t_Co=0" was not handled like a normal term. Now it's translated into +":set t_Co=", which works. + +For ":syntax keyword" the "transparent" option did work, although not +mentioned in the help. But synID() returned wrong name. + +"gqG" in a file with one-word-per-line (e.g. a dictionary) was very slow and +not interruptible. + +"gq" operator inserted screen lines in the wrong situation. Now screen +lines are inserted or deleted when this speeds up displaying. + +cindent was wrong when an "if" contained "((". + +'r' flag in 'viminfo' was not used for '%'. Could get files in the buffer +list from removable media. + +Win32 GUI with OLE: if_ole_vc.mak could not be converted into a project. +Hand-edited to fix this... + +With 'nosol' set, doing "$kdw" below an empty line positioned the cursor at +the end of the line. + +Dos32 version changed "\dir\file" into "/dir/file", to work around a DJGPP +bug. That bug appears to have been fixed, therefore this translation has +been removed. + +"/^*" didn't work (find '*' in first column). + +"<afile>" was not always set for autocommands. E.g., for ":au BufEnter * +let &tags = expand("<afile>:p:h") . "/tags". + +In an xterm, the window may be a child of the outer xterm window. Use the +parent window when getting the title and icon names. (Smith) + +When starting with "gvim -bg black -fg white", the value of 'background' is +only set after reading the .gvimrc file. This causes a ":syntax on" to use +the wrong colors. Now allow using ":gui" to open the GUI window and set the +colors. Previously ":gui" in a gvimrc crashed Vim. + +tempname() returned the same name all the time, unless the file was actually +created. Now there are at least 26 different names. + +File name used for <afile> was sometimes full path, sometimes file name +relative to current directory. + +When 'background' was set after the GUI window was opened, it could change +colors that were set by the user in the .gvimrc file. Now it only changes +colors that have not been set by the user. + +Ignore special characters after a CSI in the GUI version. These could be +interpreted as special characters in a wrong way. (St-Amant) + +Memory leak in farsi code, when using search or ":s" command. +Farsi string reversing for a mapping was only done for new mappings. Now it +also works for replacing a mapping. + +Crash in Win32 when using a file name longer than _MAX_PATH. (Aaron) + +When BufDelete autocommands were executed, some things for the buffer were +already deleted (esp. Perl stuff). + +Perl interface: Buffer specific items were deleted too soon; fixes "screen +no longer exists" messages. (Moore) + +The Perl functions didn't set the 'modified' flag. + +link.sh did not return an error on exit, which may cause Vim to start +installing, even though there is no executable to install. (Riehm) + +Vi incompatibility: In Vi "." redoes the "y" command. Added the 'y' flag to +'cpoptions'. Only for 'compatible' mode. + +":echohl" defined a new group, when the argument was not an existing group. + +"syn on" and ":syn off" could move the cursor, if there is a hidden buffer +that is shorter that the current cursor position. + +The " mark was not set when doing ":b file". + +When a "nextgroup" is used with "skipwhite" in syntax highlighting, space at +the end of the line made the nextgroup also be found in the next line. + +":he g<CTRL-D>", then ":" and backspace to the start didn't redraw. + +X11 GUI: "gvim -rv" reversed the colors twice on Sun. Now Vim checks if the +result is really reverse video (background darker than foreground). + +"cat link.sh | vim -" didn't set syntax highlighting. + +Win32: Expanding "file.sw?" matched ".file.swp". This is an error of +FindnextFile() that we need to work around. (Kilgore) + +"gqgq" gave an "Invalid lnum" error on the last line. +Formatting with "gq" didn't format the first line after a change of comment +leader. + +There was no check for out-of-memory in win_alloc(). + +"vim -h" didn't mention "-register" and "-unregister" for the OLE version. + +Could not increase 'cmdheight' when the last window is only one line. Now +other windows are also made smaller, when necessary. + +Added a few {} to avoid "suggest braces around" warnings from gcc 2.8.x. +Changed return type of main() from void to int. (Nam) + +Using '~' twice in a substitute pattern caused a crash. + +"syn on" and ":syn off" could scroll the window, if there is a hidden buffer +that is shorter that the current cursor position. + +":if 0 | if 1 | endif | endif" didn't work. Same for ":while" and "elseif". + +With two windows on modified files, with 'autowrite' set, cursor in second +window, ":qa" gave a warning for the file in the first window, but then +auto-wrote the file in the second window. (Webb) + +Win32 GUI scrollbar could only handle 32767 lines. Also makes the +intellimouse wheel use the configurable number of scrolls. (Robinson) + +When using 'patchmode', and the backup file is on another partition, the file +copying messed up the write-file message. + +GUI X11: Alt-Backspace and Alt-Delete didn't work. + +"`0" could put the cursor after the last character in the line, causing +trouble for other commands, like "i". + +When completing tags in insert mode with ^X^], some matches were skipped, +because the compare with other tags was wrong. E.g., when "mnuFileSave" was +already there, "mnuFile" would be skipped. (Negri) + +When scrolling up/down, a syntax item with "keepend" didn't work properly. +Now the flags are also stored for the syntax state at the start of each line. + +When 'ic' was changed while 'hlsearch' is on, there was no redraw to show the +effect. + +Win32 GUI: Don't display "No write since last chance" in a message box, but in +the Vim window. + +============================================================================== +VERSION 5.2 *version-5.2* + +Improvements made between version 5.1 and 5.2. + + +Long lines editable *long-lines* +------------------- + +A single long line that doesn't fit in the window doesn't show a line of @@@ +anymore. Redrawing starts at a character further on in the line, such that +the text around the cursor can be seen. This makes it possible to edit these +long lines when wrapping is on. + + +File browser added *file-browser-5.2* +------------------ + +The Win32, Athena and Motif GUI bring up a file requester if the user asks to +":browse" for the ":e", ":w", ":r", ":so", ":redirect" and +":mkexrc/vimrc/vsess" commands. ":browse e /foo/bar" opens the requester in +the /foo/bar directory, so you can have nice mapping rhs's like ":browse so +$vim/macros". If no initial dir specified for ":browse e", can be compiled to +either begin in the current directory, or that of the current buffer. (Negri +and Kahn) +Added the 'browsedir' option, with value "current", "last" or "buffer". Tells +whether a browse dialog starts in last used dir, dir of current buffer, or +current dir. ":browse w" is unaffected. +The default menus have been changed to use the ":browse" command. + + +Dialogs added *dialogs-added* +------------- + +Added the ":confirm" command. Works on ":e", ":q", ":w", ":cl". Win32, +Athena and Motif GUI uses a window-dialog. All other platforms can use +prompt in command-line. ":confirm qa" offers a choice to save all modified +files. + +confirm() function: allows user access to the confirm engine. + +Added 'v' flag to 'guioptions'. When included, a vertical button layout is +always used for the Win32 GUI dialog. Otherwise, a horizontal layout is +preferred. + +Win32 GUI: ":promptfind" and ":promptrepl" pop up a dialog to find/replace. +To be used from a menu entry. (Negri) + + +Popup menu added *popup-menu-added* +---------------- + +When the 'mousemodel' option is set to "popup", the right mouse button +displays the top level menu headed with "PopUp" as pop-up context menu. The +"PopUp" menu is not displayed in the normal menu bar. This currently only +works for Win32 and Athena GUI. + + +Select mode added *new-Select-mode* +----------------- + +A new mode has been added: "Select mode". It is like Visual mode, but typing +a printable character replaces the selection. +- CTRL-G can be used to toggle between Visual mode and Select mode. +- CTRL-O can be used to switch from Select mode to Visual mode for one command. +- Added 'selectmode' option: tells when to start Select mode instead of Visual + mode. +- Added 'mousemodel' option: Change use of mouse buttons. +- Added 'keymodel' option: tells to use shifted special keys to start a + Visual or Select mode selection. +- Added ":behave". Can be used to quickly set 'selectmode', 'mousemodel' + and 'keymodel' for MS-Windows and xterm behavior. +- The xterm-like selection is now called modeless selection. +- Visual mode mappings and menus are used in Select mode. They automatically + switch to Visual mode first. Afterwards, reselect the area, unless it was + deleted. The "gV" command can be used in a mapping to skip the reselection. +- Added the "gh", "gH" and "g^H" commands: start Select (highlight) mode. +- Backspace in Select mode deletes the selected area. + +"mswin.vim" script. Sets behavior mostly like MS-Windows. + + +Session files added *new-session-files* +------------------- + +":mks[ession]" acts like "mkvimrc", but also writes the full filenames of the +currently loaded buffers and current directory, so that :so'ing the file +re-loads those files and cd's to that directory. Also stores and restores +windows. File names are made relative to session file. +The 'sessionoptions' option sets behavior of ":mksession". (Negri) + + +User defined functions and commands *new-user-defined* +----------------------------------- + +Added user defined functions. Defined with ":function" until ":endfunction". +Called with "Func()". Allows the use of a variable number of arguments. +Included support for local variables "l:name". Return a value with ":return". +See |:function|. +Call a function with ":call". When using a range, the function is called for +each line in the range. |:call| +"macros/justify.vim" is an example of using user defined functions. +User functions do not change the last used search pattern or the command to be +redone with ".". +'maxfuncdepth' option. Restricts the depth of function calls. Avoids trouble +(crash because of out-of-memory) when a function uses endless recursion. + +User definable Ex commands: ":command", ":delcommand" and ":comclear". +(Moore) See |user-commands|. + + +New interfaces *interfaces-5.2* +-------------- + +Tcl interface. (Wilken) See |tcl|. +Uses the ":tcl", ":tcldo" and "tclfile" commands. + +Cscope support. (Kahn) (Sekera) See |cscope|. +Uses the ":cscope" and ":cstag" commands. Uses the options 'cscopeprg', +'cscopetag', 'cscopetagorder' and 'cscopeverbose'. + + +New ports *ports-5.2* +--------- + +Amiga GUI port. (Nielsen) Not tested much yet! + +RISC OS version. (Thomas Leonard) See |riscos|. +This version can run either with a GUI or in text mode, depending upon where +it is invoked. +Deleted the "os_archie" files, they were not working anyway. + + +Multi-byte support *new-multi-byte* +------------------ + +MultiByte support for Win32 GUI. (Baek) +The 'fileencoding' option decides how the text in the file is encoded. +":ascii" works for multi-byte characters. Multi-byte characters work on +Windows 95, even when using the US version. (Aaron) +Needs to be enabled in feature.h. +This has not been tested much yet! + + +New functions *new-functions-5.2* +------------- + +|browse()| puts up a file requester when available. (Negri) +|escape()| escapes characters in a string with a backslash. +|fnamemodify()| modifies a file name. +|input()| asks the user to enter a line. (Aaron) There is a separate + history for lines typed for the input() function. +|argc()| +|argv()| can be used to access the argument list. +|winbufnr()| buffer number of a window. (Aaron) +|winnr()| window number. (Aaron) +|matchstr()| Return matched string. +|setline()| Set a line to a string value. + + +New options *new-options-5.2* +----------- + +'allowrevins' Enable the CTRL-_ command in Insert and Command-line mode. +'browsedir' Tells in which directory a browse dialog starts. +'confirm' when set, :q :w and :e commands always act as if ":confirm" + is used. (Negri) +'cscopeprg' +'cscopetag' +'cscopetagorder' +'cscopeverbose' Set the |cscope| behavior. +'filetype' RISC-OS specific type of file. +'grepformat' +'grepprg' For the |:grep| command. +'keymodel' Tells to use shifted special keys to start a Visual or Select + mode selection. +'listchars' Set character to show in 'list' mode for end-of-line, tabs and + trailing spaces. (partly by Smith) Also sets character to + display if a line doesn't fit when 'nowrap' is set. +'matchpairs' Allows matching '<' with '>', and other single character + pairs. +'mousefocus' Window focus follows mouse (partly by Terhaar). Changing the + focus with a keyboard command moves the pointer to that + window. Also move the pointer when changing the window layout + (split window, change window height, etc.). +'mousemodel' Change use of mouse buttons. +'selection' When set to "inclusive" or "exclusive", the cursor can go one + character past the end of the line in Visual or Select mode. + When set to "old" the old behavior is used. When + "inclusive", the character under the cursor is included in the + operation. When using "exclusive", the new "ve" entry of + 'guicursor' is used. The default is a vertical bar. +'selectmode' Tells when to start Select mode instead of Visual mode. +'sessionoptions' Sets behavior of ":mksession". (Negri) +'showfulltag' When completing a tag in Insert mode, show the tag search + pattern (tidied up) as a choice as well (if there is one). +'swapfile' Whether to use a swap file for a buffer. +'syntax' When it is set, the syntax by that name is loaded. Allows for + setting a specific syntax from a modeline. +'ttymouse' Allows using xterm mouse codes for terminals which name + doesn't start with "xterm". +'wildignore' List of patterns for files that should not be completed at + all. +'wildmode' Can be used to set the type of expansion for 'wildchar'. + Replaces the CTRL-T command for command line completion. + Don't beep when listing all matches. +'winaltkeys' Win32 and Motif GUI. When "yes", ALT keys are handled + entirely by the window system. When "no", ALT keys are never + used by the window system. When "menu" it depends on whether + a key is a menu shortcut. +'winminheight' Minimal height for each window. Default is 1. Set to 0 if + you want zero-line windows. Scrollbar is removed for + zero-height windows. (Negri) + + + +New Ex commands *new-ex-commands-5.2* +--------------- + +|:badd| Add file name to buffer list without side effects. (Negri) +|:behave| Quickly set MS-Windows or xterm behavior. +|:browse| Use file selection dialog. +|:call| Call a function, optionally with a range. +|:cnewer| +|:colder| To access a stack of quickfix error lists. +|:comclear| Clear all user-defined commands. +|:command| Define a user command. +|:continue| Go back to ":while". +|:confirm| Ask confirmation if something unexpected happens. +|:cscope| Execute cscope command. +|:cstag| Use cscope to jump to a tag. +|:delcommand| Delete a user-defined command. +|:delfunction| Delete a user-defined function. +|:endfunction| End of user-defined function. +|:function| Define a user function. +|:grep| Works similar to ":make". (Negri) +|:mksession| Create a session file. +|:nohlsearch| Stop 'hlsearch' highlighting for a moment. +|:Print| This is Vi compatible. Does the same as ":print". +|:promptfind| Search dialog (Win32 GUI). +|:promptrepl| Search/replace dialog (Win32 GUI). +|:return| Return from a user-defined function. +|:simalt| Win32 GUI: Simulate alt-key pressed. (Negri) +|:smagic| Like ":substitute", but always use 'magic'. +|:snomagic| Like ":substitute", but always use 'nomagic'. +|:tcl| Execute TCL command. +|:tcldo| Execute TCL command for a range of lines. +|:tclfile| Execute a TCL script file. +|:tearoff| Tear-off a menu (Win32 GUI). +|:tmenu| +|:tunmenu| Win32 GUI: menu tooltips. (Negri) +|:star| :* Execute a register. + + +Changed *changed-5.2* +------- + +Renamed functions: + buffer_exists() -> bufexists() + buffer_name() -> bufname() + buffer_number() -> bufnr() + file_readable() -> filereadable() + highlight_exists() -> hlexists() + highlightID() -> hlID() + last_buffer_nr() -> bufnr("$") +The old ones are still there, for backwards compatibility. + +The CTRL-_ command in Insert and Command-line mode is only available when the +new 'allowrevins' option is set. Avoids that people who want to type SHIFT-_ +accidentally enter reverse Insert mode, and don't know how to get out. + +When a file name path in ":tselect" listing is too long, remove a part in the +middle and put "..." there. + +Win32 GUI: Made font selector appear inside Vim window, not just any odd +place. (Negri) + +":bn" skips help buffers, unless currently in a help buffer. (Negri) + +When there is a status line and only one window, don't show '^' in the status +line of the current window. + +":*" used to be used for "'<,'>", the Visual area. But in Vi it's used as an +alternative for ":@". When 'cpoptions' includes '*' this is Vi compatible. + +When 'insertmode' is set, using CTRL-O to execute a mapping will work like +'insertmode' was not set. This allows "normal" mappings to be used even when +'insertmode' is set. + +When 'mouse' was set already (e.g., in the .vimrc file), don't automatically +set 'mouse' when the GUI starts. + +Removed the 'N', 'I' and 'A' flags from the 'mouse' option. + +Renamed "toggle option" to "boolean option". Some people thought that ":set +xyz" would toggle 'xyz' on/off each time. + +The internal variable "shell_error" contains the error code from the shell, +instead of just 0 or 1. + +When inserting or replacing, typing CTRL-V CTRL-<CR> used to insert "<C-CR>". +That is not very useful. Now the CTRL key is ignored and a <CR> is inserted. +Same for all other "normal" keys with modifiers. Mapping these modified key +combinations is still possible. +In Insert mode, <C-CR> and <S-Space> can be inserted by using CTRL-K and then +the special character. + +Moved "quotes" file to doc/quotes.txt, and "todo" file to doc/todo.txt. They +are now installed like other documentation files. + +winheight() function returns -1 for a non-existing window. It used to be +zero, but that is a valid height now. + +The default for 'selection' is "inclusive", which makes a difference when +using "$" or the mouse to move the cursor in Visual mode. + +":q!" does not exit when there are changed buffers which are hidden. Use +":qa!" to exit anyway. + +Disabled the Perl/Python/Tcl interfaces by default. Not many people use them +and they make the executable a lot bigger. The internal scripting language is +now powerful enough for most tasks. + +The strings from the 'titlestring' and 'iconstring' options are used +untranslated for the Window title and icon. This allows for including a <CR>. +Previously a <CR> would be shown as "^M" (two characters). + +When a mapping is started in Visual or Select mode which was started from +Insert mode (the mode shows "(insert) Visual"), don't return to Insert mode +until the mapping has ended. Makes it possible to use a mapping in Visual +mode that also works when the Visual mode was started from Select mode. + +Menus in $VIMRUNTIME/menu.vim no longer overrule existing menus. This helps +when defining menus in the .vimrc file, or when sourcing mswin.vim. + +Unix: Use /var/tmp for .swp files, if it exists. Files there survive a +reboot (at least on Linux). + + +Added *added-5.2* +----- + +--with-motif-lib configure argument. Allows for using a static Motif library. + +Support for mapping numeric keypad +,-,*,/ keys. (Negri) +When not mapped, they produce the normal character. + +Win32 GUI: When directory dropped on Gvim, cd there and edit new buffer. +(Negri) + +Win32 GUI: Made CTRL-Break work as interrupt, so that CTRL-C can be +used for mappings. + +In the output of ":map", highlight the "*" to make clear it's not part of the +rhs. (Roemer) + +When showing the Visual area, the cursor is not switched off, so that it can +be located. The Visual area is now highlighted with a grey background in the +GUI. This makes the cursor visible when it's also reversed. + +Win32: When started with single full pathname (e.g. via double-clicked file), +cd to that file's directory. (Negri) + +Win32 GUI: Tear-off menus, with ":tearoff <menu-name>" command. (Negri) +'t' option to 'guioptions': Add tearoff menu items for Win32 GUI and Motif. +It's included by default. +Win32 GUI: tearoff menu with submenus is indicated with a ">>". (Negri) + +Added ^Kaa and ^KAA digraphs. +Added "euro" symbol to digraph.c. (Corry) + +Support for Motif menu shortcut keys, using '&' like MS-Windows (Ollis). +Other GUIs ignore '&' in a menu name. + +DJGPP: Faster screen updating (John Lange). + +Clustering of syntax groups ":syntax cluster" (Bigham). +Including syntax files: ":syntax include" (Bigham). + +Keep column when switching buffers, when 'nosol' is set (Radics). + +Number function for Perl interface. + +Support for Intellimouse in Athena GUI. (Jensen) + +":sleep" also accepts an argument in milliseconds, when "m" is used. + +Added 'p' flag in 'guioptions': Install callbacks for enter/leave window +events. Makes cursor blinking work for Terhaar, breaks it for me. + +"--help" and "--version" command-line arguments. + +Non-text in ":list" output is highlighted with NonText. + +Added text objects: "i(" and "i)" as synonym for "ib". "i{" and "i}" as +synonym for "iB". New: "i<" and "i>", to select <thing>. All this also for +"a" objects. + +'O' flag in 'shortmess': message for reading a file overwrites any previous +message. (Negri) + +Win32 GUI: 'T' flag in 'guioptions': switch toolbar on/off. +Included a list with self-made toolbar bitmaps. (Negri) + +Added menu priority for sub-menus. Implemented for Win32 and Motif GUI. +Display menu priority with ":menu" command. +Default and Syntax menus now include priority for items. Allows inserting +menu items in between the default ones. + +When the 'number' option is on, highlight line numbers with the LineNr group. + +"Ignore" highlight group: Text highlighted with this is made blank. It is +used to hide special characters in the help text. + +Included Exuberant Ctags version 2.3, with C++ support, Java support and +recurse into directories. (Hiebert) + +When a tags file is not sorted, and this is detected (in a simplistic way), an +error message is given. + +":unlet" accepts a "!", to ignore non-existing variables, and accepts more +than one argument. (Roemer) +Completion of variable names for ":unlet". (Roemer) + +When there is an error in a function which is called by another function, show +the call stack in the error message. + +New file name modifiers: +":.": reduce file name to be relative to current dir. +":~": reduce file name to be relative to home dir. +":s?pat?sub?": substitute "pat" with "sub" once. +":gs?pat?sub?": substitute "pat" with "sub" globally. + +New configure arguments: --enable-min-features and --enable-max-features. +Easy way to switch to minimum or maximum features. + +New compile-time feature: modify_fname. For file name modifiers, e.g, +"%:p:h". Can be disabled to save some code (16 bit DOS). + +When using whole-line completion in Insert mode, and 'cindent' is set, indent +the line properly. + +MSDOS and Win32 console: 'guicursor' sets cursor thickness. (Negri) + +Included new set of Farsi fonts. (Shiran) + +Accelerator text now also works in Motif. All menus can be defined with & for +mnemonic and TAB for accelerator text. They are ignored on systems that don't +support them. +When removing or replacing a menu, compare the menu name only up to the <Tab> +before the mnemonic. + +'i' and 'I' flags after ":substitute": ignore case or not. + +"make install" complains if the runtime files are missing. + +Unix: When finding an existing swap file that can't be opened, mention the +owner of the file in the ATTENTION message. + +The 'i', 't' and 'k' options in 'complete' now also print the place where they +are looking for matches. (Acevedo) + +"gJ" command: Join lines without inserting a space. + +Setting 'keywordprg' to "man -s" is handled specifically. The "-s" is removed +when no count given, the count is added otherwise. Configure checks if "man +-s 2 read" works, and sets the default for 'keywordprg' accordingly. + +If you do a ":bd" and there is only one window open, Vim tries to move to a +buffer of the same type (i.e. non-help to non-help, help to help), for +consistent behavior to :bnext/:bprev. (Negri) + +Allow "<Nop>" to be used as the rhs of a mapping. ":map xx <Nop>", maps "xx" +to nothing at all. + +In a ":menu" command, "<Tab>" can be used instead of a real tab, in the menu +path. This makes it more easy to type, no backslash needed. + +POSIX compatible character classes for regexp patterns: [:alnum:], [:alpha:], +[:blank:], [:cntrl:], [:digit:], [:graph:], [:lower:], [:print:], [:punct:], +[:space:], [:upper:] and [:xdigit:]. (Briscoe) + +regexp character classes (for fast syntax highlight matching): + digits: \d [0-9] \D not digit (Roemer) + hex: \x [0-9a-fA-F] \X not hex + octal: \o [0-7] \O not octal + word: \w [a-zA-Z0-9_] \W not word + head: \h [a-zA-Z_] \H not head + alphabetic: \a [a-zA-Z] \A not alphabetic + lowercase: \l [a-z] \L not lowercase + uppercase: \u [A-Z] \U not uppercase + +":set" now accepts "+=", |^=" and "-=": add or remove parts of a string +option, add or subtract a number from a number option. A comma is +automagically inserted or deleted for options that are a comma separated list. + +Filetype feature, for autocommands. Uses a file type instead of a pattern to +match a file. Currently only used for RISC OS. (Leonard) + +In a pattern for an autocommand, environment variables can be used. They are +expanded when the autocommand is defined. + +"BufFilePre" and "BufFilePost" autocommand evens: Before and after applying +the ":file" command to change the name of a buffer. +"VimLeavePre" autocommand event: before writing the .viminfo file. + +For autocommands argument: <abuf> is buffer number, like <afile>. + +Made syntax highlighting a bit faster when scrolling backwards, by keeping +more syncing context. + +Win32 GUI: Made scrolling faster by avoiding a redraw when deleting or +inserting screen lines. + +GUI: Made scrolling faster by not redrawing the scrollbar when the thumb moved +less than a pixel. + +Included ":highlight" in bugreport.vim. + +Created install.exe program, for simplistic installation on DOS and +MS-Windows. + +New register: '_', the black hole. When writing to it, nothing happens. When +reading from it, it's always empty. Can be used to avoid a delete or change +command to modify the registers, or reduce memory use for big changes. + +CTRL-V xff enters character by hex number. CTRL-V o123 enters character by +octal number. (Aaron) + +Improved performance of syntax highlighting by skipping check for "keepend" +when there isn't any. + +Moved the mode message ("-- INSERT --") to the last line of the screen. When +'cmdheight' is more than one, messages will remain readable. + +When listing matching files, they are also sorted on 'suffixes', such that +they are listed in the same order as CTRL-N retrieves them. + +synIDattr() takes a third argument (optionally), which tells for which +terminal type to get the attributes for. This makes it possible to run +2html.vim outside of gvim (using color names instead of #RRGGBB). + +Memory profiling, only for debugging. Prints at exit, and with "g^A" command. +(Kahn) + +DOS: When using a file in the current drive, remove the drive name: +"A:\dir\file" -> "\dir\file". This helps when moving a session file on a +floppy from "A:\dir" to "B:\dir". + +Increased number of remembered jumps from 30 to 50 per window. + +Command to temporarily disable 'hls' highlighting until the next search: +":nohlsearch". + +"gp" and "gP" commands: like "p" and "P", but leave the cursor just after the +inserted text. Used for the CTRL-V command in MS-Windows mode. + + +Fixed *fixed-5.2* +----- + +Win32 GUI: Could draw text twice in one place, for fake-bold text. Removed +this, Windows will handle the bold text anyway. (Negri) + +patch 5.1.1: Win32s GUI: pasting caused a crash (Negri) + +patch 5.1.2: When entering another window, where characters before the cursor +have been deleted, could have a cursor beyond the end of the line. + +patch 5.1.3: Win32s GUI: Didn't wait for external command to finish. (Negri) + +patch 5.1.4: Makefile.w32 can now also be used to generate the OLE version +(Scott). + +patch 5.1.5: Crashed when using syntax highlighting: cursor on a line that +doesn't fit in the window, and splitting that line in two. + +patch 5.1.6: Visual highlighting bug: After ":set nowrap", go to end of line +(so that the window scrolls horizontally), ":set wrap". Following Visual +selection was wrong. + +patch 5.1.7: When 'tagbsearch' off, and 'ignorecase' off, still could do +binary searching. + +patch 5.1.8: Win32 GUI: dragging the scrollbar didn't update the ruler. + +patch 5.1.9: Using ":gui" in .vimrc, caused xterm cursor to disappear. + +patch 5.1.10: A CTRL-N in Insert mode could cause a crash, when a buffer +without a name exists. + +patch 5.1.11: "make test" didn't work in the shadow directory. Also adjusted +"make shadow" for the links in the ctags directory. + +patch 5.1.12: "buf 123foo" used "123" as a count, instead as the start of a +buffer name. + +patch 5.1.13: When completing file names on the command-line, reallocating the +command-line may go wrong. + +patch 5.1.14: ":[nvci]unmenu" removed menu for all modes, when full menu patch +specified. + +Graceful handling of NULLs in drag-dropped file list. Handle passing NULL to +Fullname_save(). (Negri) + +Win32: ":!start" to invoke a program without opening a console, swapping +screens, or waiting for completion in either console or gui version, e.g. you +can type ":!start winfile". ALSO fixes "can't delete swapfile after spawning +a shell" bug. (enhancement of Aaron patch) (Negri) + +Win32 GUI: Fix CTRL-X default keymapping to be more Windows-like. (Negri) + +Shorten filenames on startup. If in /foo/bar, entering "vim ../bar/bang.c" +displays "bang.c" in status bar, not "/foo/bar/bang.c" (Negri) + +Win32 GUI: No copy to Windows clipboard when it's not desired. + +Win32s: Fix pasting from clipboard - made an assumption not valid under +Win32s. (Negri) + +Win32 GUI: Speed up calls to gui_mch_draw_string() and cursor drawing +functions. (Negri) + +Win32 GUI: Middle mouse button emulation now works in GUI! (Negri) + +Could skip messages when combining commands in one line, e.g.: +":echo "hello" | write". + +Perl interpreter was disabled before executing VimLeave autocommands. Could +not use ":perl" in them. (Aaron) + +Included patch for the Intellimouse (Aaron/Robinson). + +Could not set 'ls' to one, when last window has only one line. (Mitterand) + +Fixed a memory leak when removing menus. + +After ":only" the ruler could overwrite a message. + +Dos32: removed changing of __system_flags. It appears to work better when +it's left at the default value. + +p_aleph was an int instead of along, caused trouble on systems where +sizeof(int) != sizeof(long). (Schmidt) + +Fixed enum problems for Ultrix. (Seibert) + +Small redraw problem: "dd" on last line in file cleared wrong line. + +Didn't interpret "cmd | endif" when "cmd" starts with a range. E.g. "if 0 | +.d | endif". + +Command "+|" on the last line of the file caused ml_get errors. + +Memory underrun in eval_vars(). (Aaron) + +Don't rename files in a difficult way, except on Windows 95 (was also done on +Windows NT). + +Win32 GUI: An external command that produces an error code put the error +message in a dialog box. had to close the window and close the dialog. Now +the error code is displayed in the console. (Negri) + +"comctl32.lib" was missing from the GUI libraries in Makefile.w32. (Battle) + +In Insert mode, when entering a window in Insert mode, allow the cursor to be +one char beyond the text. + +Renamed machine dependent rename() to mch_rename(). Define mch_rename() to +rename() when it works properly. + +Rename vim_chdir() to mch_chdir(), because it's machine dependent. + +When using an arglist, and editing file 5 of 4, ":q" could cause "-1 more +files to edit" error. + +In if_python.c, VimCommand() caused an assertion when a do_cmdline() failed. +Moved the Python_Release_Vim() to before the VimErrorCheck(). (Harkins) + +Give an error message for an unknown argument after "--". E.g. for "vim +--xyz". + +The FileChangedShell autocommand didn't set <afile> to the name of the changed +file. + +When doing ":e file", causing the attention message, there sometimes was no +hit-enter prompt. Caused by empty line or "endif" at end of sourced file. + +A large number of patches for the VMS version. (Hunsaker) + +When CTRL-L completion (find longest match) results in a shorter string, no +completion is done (happens with ":help"). + +Crash in Win32 GUI version, when using an Ex "@" command, because +LinePointers[] was used while not initialized. + +Win32 GUI: allow mapping of Alt-Space. + +Output from "vim -h" was sent to stderr. Sending it to stdout is better, so +one can use "vim -h | more". + +In command-line mode, ":vi[!]" should reload the file, just like ":e[!]". +In Ex mode, ":vi" stops Ex mode, but doesn't reload the file. This is Vi +compatible. + +When using a ":set ls=1" in the .gvimrc file, would get a status line for a +single window. (Robinson) + +Didn't give an error message for ":set ai,xx". (Roemer) +Didn't give an error message for ":set ai?xx", ":set ai&xx", ":set ai!xx". + +Non-Unix systems: That a file exists but is unreadable is recognized as "new +file". Now check for existence when file can't be opened (like Unix). + +Unix: osdef.sh didn't handle declarations where the function name is at the +first column of the line. + +DJGPP: Shortening of file names didn't work properly, because get_cwd() +returned a path with backslashes. (Negri) + +When using a 'comments' part where a space is required after the middle part, +always insert a space when starting a new line. Helps for C comments, below a +line with "/****". + +Replacing path of home directory with "~/" could be wrong for file names +with embedded spaces or commas. + +A few fixes for the Sniff interface. (Leherbauer) + +When asking to hit 'y' or 'n' (e.g. for ":3,1d"), using the mouse caused +trouble. Same for ":s/x/y/c" prompt. + +With 'nowrap' and 'list', a Tab halfway on the screen was displayed as blanks, +instead of the characters specified with 'listchars'. Also for other +characters that take more than one screen character. + +When setting 'guifont' to an unknown font name, the previous font was lost and +a default font would be used. (Steed) + +DOS: Filenames in the root directory didn't get shortened properly. (Negri) + +DJGPP: making a full path name out of a file name didn't work properly when +there is no _fullpath() function. (Negri) + +Win32 console: ":sh" caused a crash. (Negri) + +Win32 console: Setting 'lines' and/or 'columns' in the _vimrc failed miserably +(could hang Windows 95). (Negri) + +Win32: The change-drive function was not correct, went to the wrong drive. +(Tsindlekht) + +GUI: When editing a command line in Ex mode, Tabs were sometimes not +backspaced properly, and unprintable characters were displayed directly. +non-GUI can still be wrong, because a system function is called for this. + +":set" didn't stop after an error. For example ":set no ai" gave an error for +"no", but still set "ai". Now ":set" stops after the first error. + +When running configure for ctags, $LDFLAGS wasn't passed to it, causing +trouble for IRIX. + +"@%" and "@#" when file name not set gave an error message. Now they just +return an empty string. (Steed) + +CTRL-X and CTRL-A didn't work correctly with negative hex and octal numbers. +(Steed) + +":echo" always started with a blank. + +Updating GUI cursor shape didn't always work (e.g., when blinking is off). + +In silent Ex mode ("ex -s" or "ex <file") ":s///p" didn't print a line. Also +a few other commands that explicitly print a text line didn't work. Made this +Vi compatible. + +Win32 version of _chdrive() didn't return correct value. (Tsindlekht) + +When using 't' in 'complete' option, no longer give an error message for a +missing tags file. + +Unix: tgoto() can return NULL, which was not handled correctly in configure. + +When doing ":help" from a buffer where 'binary' is set, also edited the help +file in binary mode. Caused extra ^Ms for DOS systems. + +Cursor position in a file was reset to 1 when closing a window. + +":!ls" in Ex mode switched off echo. + +When doing a double click in window A, while currently in window B, first +click would reset double click time, had to click three times to select a +word. + +When using <F11> in mappings, ":mkexrc" produced an exrc file that can't be +used in Vi compatible mode. Added setting of 'cpo' to avoid this. Also, add +a CTRL-V in front of a '<', to avoid a normal string to be interpreted as a +special key name. + +Gave confusing error message for ":set guifont=-*-lucida-*": first "font is +not fixed width", then "Unknown font". + +Some options were still completely left out, instead of included as hidden +options. + +While running the X11 GUI, ignore SIGHUP signals. Avoids a crash after +executing an external command (in rare cases). + +In os_unixx.h, signal() was defined to sigset(), while it already was. + +Memory leak when executing autocommands (was reported as a memory leak in +syntax highlighting). + +Didn't print source of error sometimes, because pointers were the same, +although names were different. + +Avoid a number of UMR errors from Purify (third argument to open()). + +A swap file could still be created just after setting 'updatecount' to zero, +when there is an empty buffer and doing ":e file". (Kutschera) + +Test 35 failed on 64 bit machines. (Schild) + +With "p" and "P" commands, redrawing was slow. + +Awk script for html documentation didn't work correctly with AIX awk. +Replaced "[ ,.);\] ]" with "[] ,.); ]". (Briscoe) +The makehtml.awk script had a small problem, causing extra lines to be +inserted. (Briscoe) + +"gqgq" could not be repeated. Repeating for "gugu" and "gUgU" worked in a +wrong way. Also made "gqq" work to be consistent with "guu". + +C indent was wrong after "case ':':". + +":au BufReadPre *.c put": Line from put text was deleted, because the buffer +was still assumed to be empty. + +Text pasted with the Edit/Paste menu was subject to 'textwidth' and +'autoindent'. That was inconsistent with using the mouse to paste. Now "*p +is used. + +When using CTRL-W CTRL-] on a word that's not a tag, and then CTRL-] on a tag, +window was split. + +":ts" got stuck on a tags line that has two extra fields. + +In Insert mode, with 'showmode' on, <C-O><C-G> message was directly +overwritten by mode message, if preceded with search command warning message. + +When putting the result of an expression with "=<expr>p, newlines were +inserted like ^@ (NUL in the file). Now the string is split up in lines at +the newline. + +putenv() was declared with "const char *" in pty.c, but with "char *" in +osdef2.h.in. Made the last one also "const char *". + +":help {word}", where +{word} is a feature, jumped to the feature list instead +of where the command was explained. E.g., ":help browse", ":help autocmd". + +Using the "\<xx>" form in an expression only got one byte, even when using a +special character that uses several bytes (e.g., "\<F9>"). +Changed "\<BS>" to produce CTRL-H instead of the special key code for the +backspace key. "\<Del>" produces 0x7f. + +":mkvimrc" didn't write a command to set 'compatible' or 'nocompatible'. + +The shell syntax didn't contain a "syn sync maxlines" setting. In a long file +without recognizable items, syncing took so long it looked like Vim hangs. +Added a maxlines setting, and made syncing interruptible. + +The "gs" command didn't flush output before waiting. + +Memory leaks for: + ":if 0 | let a = b . c | endif" + "let a = b[c]" + ":so {file}" where {file} contains a ":while" + +GUI: allocated fonts were never released. (Leonard) + +Makefile.bor: +- Changed $(DEFINES) into a list of "-D" options, so that it can also be used + for the resource compiler. (not tested!) +- "bcc.cfg" was used for all configurations. When building for another + configuration, the settings for the previous one would be used. Moved + "bcc.cfg" to the object directory. (Geddes) +- Included targets for vimrun, install, ctags and xxd. Changed the default to + use the Borland DLL Runtime Library, makes Vim.exe a log smaller. (Aaron) + +"2*" search for the word under the cursor with "2" prepended. (Leonard) + +When deleting into a specific register, would still overwrite the non-Win32 +GUI selection. Now ""x"*P works. + +When deleting into the "" register, would write to the last used register. +Now ""x always writes to the unnamed register. + +GUI Athena: A submenu with a '.' in it didn't work. E.g., +":amenu Syntax.XY\.Z.foo lll". + +When first doing ":tag foo" and then ":tnext" and/or ":tselect" the order of +matching tags could change, because the current file is different. Now the +existing matches are kept in the same order, newly found matches are added +after them, not matter what the current file is. + +":ta" didn't find the second entry in a tags file, if the second entry was +longer than the first one. + +When using ":set si tw=7" inserting "foo {^P}" made the "}" inserted at the +wrong position. can_si was still TRUE when the cursor is not in the indent of +the line. + +Running an external command in Win32 version had the problem that Vim exits +when the X on the console is hit (and confirmed). Now use the "vimrun" +command to start the external command indirectly. (Negri) + +Win32 GUI: When running an external filter, do it in a minimized DOS box. +(Negri) + +":let" listed variables without translation into printable characters. + +Win32 console: When resizing the window, switching back to the old size +(when exiting or executing an external command) sometimes failed. (Negri) +This appears to also fix a "non fixable" problem: +Win32 console in NT 4.0: When running Vim in a cmd window with a scrollbar, +the scrollbar disappeared and was not restored when Vim exits. This does work +under NT 3.51, it appears not to be a Vim problem. + +When executing BufDelete and BufUnload autocommands for a buffer without a +name, the name of the current buffer was used for <afile>. + +When jumping to a tag it reported "tag 1 of >2", while in fact there could be +only two matches. Changed to "tag 1 of 2 or more". + +":tjump tag" did a linear search in the tags file, which can be slow. + +Configure didn't find "LibXm.so.2.0", a Xm library with a version number. + +Win32 GUI: When using a shifted key with ALT, the shift modifier would remain +set, even when it was already used by changing the used key. E.g., "<M-S-9>" +resulted in "<M-S-(>", but it should be "<M-(>". (Negri) + +A call to ga_init() was often followed by setting growsize and itemsize. +Created ga_init2() for this, which looks better. (Aaron) + +Function filereadable() could call fopen() with an empty string, which might +be illegal. + +X Windows GUI: When executing an external command that outputs text, could +write one character beyond the end of a buffer, which caused a crash. (Kohan) + +When using "*" or "#" on a string that includes '/' or '?' (when these are +included in 'isk'), they were not escaped. (Parmelan) + +When adding a ToolBar menu in the Motif GUI, the submenu_id field was not +cleared, causing random problems. + +When adding a menu, the check if this menu (or submenu) name already exists +didn't compare with the simplified version (no mnemonic or accelerator) of the +new menu. Could get two menus with the same name, e.g., "File" and "&File". + +Breaking a line because of 'textwidth' at the last line in the window caused a +redraw of the whole window instead of a scroll. Speeds up normal typing with +'textwidth' a lot for slow terminals. + +An invalid line number produced an "invalid range" error, even when it wasn't +to be executed (inside "if 0"). + +When the unnamed, first buffer is re-used, the "BufDelete" autocommand was +not called. It would stick in a buffer list menu. + +When doing "%" on the NUL after the line, a "{" or "}" in the last character +of the line was not found. + +The Insert mode menu was not used for the "s" command, the Operator-pending +menu was used instead. + +With 'compatible' set, some syntax highlighting was not correct, because of +using "[\t]" for a search pattern. Now use the regexps for syntax +highlighting like the 'cpoptions' option is empty (as was documented already). + +When using "map <M-Space> ms" or "map <Space> sss" the output of ":map" didn't +show any lhs for the mapping (if 'isprint' includes 160). Now always use +<Space> and <M-Space>, even when they are printable. + +Adjusted the Syntax menu, so that the lowest entry fits on a small screen (for +Athena, where menus don't wrap). + +When using CTRL-E or CTRL-Y in Insert mode for characters like 'o', 'x' and +digits, repeating the insert didn't work. + +The file "tools/ccfilter.README.txt" could not be unpacked when using short +file names, because of the two dots. Renamed it to +"tools/ccfilter_README.txt". + +For a dark 'background', using Blue for Directory and SpecialKey highlight +groups is not very readable. Use Cyan instead. + +In the function uc_scan_attr() in ex_docmd.c there was a goto that jumped into +a block with a local variable. That's illegal for some compilers. + +Win32 GUI: There was a row of pixels at the bottom of the window which was not +drawn. (Aaron) + +Under DOS, editing "filename/" created a swap file of "filename/.swp". Should +be "filename/_swp". + +Win32 GUI: pointer was hidden when executing an external command. + +When 'so' is 999, "J" near the end of the file didn't redisplay correctly. + +":0a" inserted after the first line, instead of before the first line. + +Unix: Wildcard expansion didn't handle single quotes and {} patterns. Now +":file 'window.c'" removes the quotes and ":e 'main*.c'" works (literal '*'). +":file {o}{n}{e}" now results in file name "one". + +Memory leak when setting a string option back to its default value. + +============================================================================== +VERSION 5.3 *version-5.3* + +Version 5.3 was a bug-fix version of 5.2. There are not many changes. +Improvements made between version 5.2 and 5.3: + +Changed *changed-5.3* +------- + +Renamed "IDE" menu to "Tools" menu. + + +Added *added-5.3* +----- + +Win32 GUI: Give a warning when Vim is activated, and one of the files changed +since editing started. (Negri) + + +Fixed *fixed-5.3* +----- + +5.2.1: Win32 GUI: space for external command was not properly allocated, could +cause a crash. (Aaron) This was the reason to bring out 5.3 quickly after +5.2. + +5.2.2: Some commands didn't complain when used without an argument, although +they need one: ":badd", ":browse", ":call", ":confirm", ":behave", +":delfunction", ":delcommand" and ":tearoff". +":endfunction" outside of a function gave wrong error message: "Command not +implemented". Should be ":endfunction not inside a function". + +5.2.3: Win32 GUI: When gvim was installed in "Program files", or another path +with a space in it, executing external commands with vimrun didn't work. + +5.2.4: Pasting with the mouse in Insert mode left the cursor on the last +pasted character, instead of behind it. + +5.2.5: In Insert mode, cursor after the end of the line, a shift-cursor-left +didn't include the last character in the selection. + +5.2.6: When deleting text from Insert mode (with "<C-O>D" or the mouse), which +includes the last character in the line, the cursor could be left on the last +character in the line, instead of just after it. + +5.2.7: Win32 GUI: scrollbar was one pixel too big. + +5.2.8: Completion of "PopUp" menu showed the derivatives "PopUpc", "PopUPi", +etc. ":menu" also showed these. + +5.2.9: When using two input() functions on a row, the prompt would not be +drawn in column 0. + +5.2.10: A loop with input() could not be broken with CTRL-C. + +5.2.11: ":call asdf" and ":call asdf(" didn't give an error message. + +5.2.12: Recursively using ":normal" crashes Vim after a while. E.g.: +":map gq :normal gq<CR>" + +5.2.13: Syntax highlighting used 'iskeyword' from wrong buffer. When using +":help", then "/\k*" in another window with 'hlsearch' set. + +5.2.14: When using ":source" from a function, global variables would not be +available unless "g:" was used. + +5.2.15: XPM files can have the extension ".pm", which is the same as for Perl +modules. Added "syntax/pmfile.vim" to handle this. + +5.2.16: On Win32 and Amiga, "echo expand("%:p:h")" removed one dirname in an +empty buffer. mch_Fullname() didn't append a slash at the end of a directory +name. + +Should include the character under the cursor in the Visual area when using +'selection' "exclusive". This wasn't done for "%", "e", "E", "t" and "f". + +""p would always put register 0, instead of the unnamed (last used) register. +Reverse the change that ""x doesn't write in the unnamed (last used) register. +It would always write in register 0, which isn't very useful. Use "-x for the +paste mappings in Visual mode. + +When there is one long line on the screen, and 'showcmd' is off, "0$" didn't +redraw the screen. + +Win32 GUI: When using 'mousehide', the pointer would flicker when the cursor +shape is changed. (Negri) + +When cancelling Visual mode, and the cursor moves to the start, the wanted +column wasn't set, "k" or "j" moved to the wrong column. + +When using ":browse" or ":confirm", was checking for a comment and separating +bar, which can break some commands. + +Included fixes for Macintosh. (Kielhorn) + +============================================================================== +VERSION 5.4 *version-5.4* + +Version 5.4 adds new features, useful changes and a lot of bug fixes. + + +Runtime directory introduced *new-runtime-dir* +---------------------------- + +The distributed runtime files are now in $VIMRUNTIME, the user files in $VIM. +You normally don't set $VIMRUNTIME but let Vim find it, by using +$VIM/vim{version}, or use $VIM when that doesn't exist. This allows for +separating the user files from the distributed files and makes it more easy to +upgrade to another version. It also makes it possible to keep two versions of +Vim around, each with their own runtime files. + +In the Unix distribution the runtime files have been moved to the "runtime" +directory. This makes it possible to copy all the runtime files at once, +without the need to know what needs to be copied. + +The archives for DOS, Windows, Amiga and OS/2 now have an extra top-level +"vim" directory. This is to make clear that user-modified files should be put +here. The directory that contains the executables doesn't have '-' or '.' +characters. This avoids strange extensions. + +The $VIM and $VIMRUNTIME variables are set when they are first used. This +allows them to be used by Perl, for example. + +The runtime files are also found in a directory called "$VIM/runtime". This +helps when running Vim after just unpacking the runtime archive. When using +an executable in the "src" directory, Vim checks if "vim54" or "runtime" can +be added after removing it. This make the runtime files be found just after +compiling. + +A default for $VIMRUNTIME can be given in the Unix Makefile. This is useful +if $VIM doesn't point to above the runtime directory but to e.g., "/etc/". + + +Filetype introduced *new-filetype-5.4* +------------------- + +Syntax files are now loaded with the new FileType autocommand. Old +"mysyntaxfile" files will no longer work. |filetypes| + +The scripts for loading syntax highlighting have been changed to use the +new Syntax autocommand event. + +This combination of Filetype and Syntax events allows tuning the syntax +highlighting a bit more, also when selected from the Syntax menu. The +FileType autocommand can also be used to set options and mappings specifically +for that type of file. + +The "$VIMRUNTIME/filetype.vim" file is not loaded automatically. The +":filetype on" command has been added for this. ":syntax on" also loads it. + +The 'filetype' option has been added. It is used to trigger the FileType +autocommand event, like the 'syntax' option does for the Syntax event. + +":set syntax=OFF" and ":set syntax=ON" can be used (in a modeline) to switch +syntax highlighting on/off for the current file. + +The Syntax menu commands have been moved to $VIMRUNTIME/menu.vim. The Syntax +menu is included both when ":filetype on" and when ":syntax manual" is used. + +Renamed the old 'filetype' option to 'osfiletype'. It was only used for +RISCOS. 'filetype' is now used for the common file type. + +Added the ":syntax manual" command. Allows manual selection of the syntax to +be used, e.g., from a modeline. + + +Vim script line continuation *new-line-continuation* +---------------------------- + +When an Ex line starts with a backslash, it is concatenated to the previous +line. This avoids the need for long lines. |line-continuation| (Roemer) +Example: > + if has("dialog_con") || + \ has("dialog_gui") + :let result = confirm("Enter your choice", + \ "&Yes\n&No\n&Maybe", + \ 2) + endif + + +Improved session files *improved-sessions* +---------------------- + +New words for 'sessionoptions': +- "help" Restore the help window. +- "blank" Restore empty windows. +- "winpos" Restore the Vim window position. Uses the new ":winpos" + command +- "buffers" Restore hidden and unloaded buffers. Without it only the + buffers in windows are restored. +- "slash" Replace backward by forward slashes in file names. +- "globals" Store global variables. +- "unix" Use unix file format (<NL> instead of <CR><NL>) + +The ":mksession" and 'sessionoptions' are now in the +mksession feature. + +The top line of the window is also restored when using a session file. + +":mksession" and ":mkvimrc" don't store 'fileformat', it should be detected +when loading a file. + +(Most of this was done by Vince Negri and Robert Webb) + + +Autocommands improved *improved-autocmds-5.4* +--------------------- + +New events: +|FileType| When the file type has been detected. +|FocusGained| When Vim got input focus. (Negri) +|FocusLost| When Vim lost input focus. (Negri) +|BufCreate| Called just after a new buffer has been created or has been + renamed. (Madsen) +|CursorHold| Triggered when no key has been typed for 'updatetime'. Can be + used to do something with the word under the cursor. (Negri) + Implemented CursorHold autocommand event for Unix. (Zellner) + Also for Amiga and MS-DOS. +|GUIEnter| Can be used to do something with the GUI window after it has + been created (e.g., a ":winpos 100 50"). +|BufHidden| When a buffer becomes hidden. Used to delete the + option-window when it becomes hidden. + +Also trigger |BufDelete| just before a buffer is going to be renamed. (Madsen) + +The "<amatch>" pattern can be used like "<afile>" for autocommands, except +that it is the matching value for the FileType and Syntax events. + +When ":let @/ = <string>" is used in an autocommand, this last search pattern +will be used after the autocommand finishes. + +Made loading autocommands a bit faster. Avoid doing strlen() on each exiting +pattern for each new pattern by remembering the length. + + +Encryption *new-encryption* +---------- + +Files can be encrypted when writing and decrypted when reading. Added the +'key' option, "-x" command line argument and ":X" command. |encryption| (based +on patch from Mohsin Ahmed) + +When reading a file, there is an automatic detection whether it has been +crypted. Vim will then prompt for the key. + +Note that the encryption method is not compatible with Vi. The encryption is +not unbreakable. This allows it to be exported from the US. + + +GTK GUI port *new-GTK-GUI* +------------ + +New GUI port for GTK+. Includes a toolbar, menu tearoffs, etc. |gui-gtk| +Added the |:helpfind| command. (Kahn and Dalecki) + + +Menu changes *menu-changes-5.4* +------------ + +Menus can now also be used in the console. It is enabled by the new +'wildmenu' option. This shows matches for command-line completion like a +menu. This works as a minimal file browser. + +The new |:emenu| command can be used to execute a menu item. + +Uses the last status line to list items, or inserts a line just above the +command line. (Negri) + +The 'wildcharx' option can be used to trigger 'wildmenu' completion from a +mapping. + +When compiled without menus, this can be detected with has("menu"). Also show +this in the ":version" output. Allow compiling GUI versions without menu +support. Only include toolbar support when there is menu support. + +Moved the "Window" menu all the way to the right (priority 70). Looks more +familiar for people working with MS-Windows, shouldn't matter for others. + +Included "Buffers" menu. Works with existing autocommands and functions. It +can be disabled by setting the "no_buffers_menu" variable. (Aaron and Madsen) + +Win32 supports separators in a menu: "-.*-". (Geddes) +Menu separators for Motif now work too. + +Made Popup menu for Motif GUI work. (Madsen) + +'M' flag in 'guioptions': Don't source the system menu. + +All the menu code has been moved from gui.c to menu.c. + + +Viminfo improved *improved-viminfo* +---------------- + +New flags for 'viminfo': +'!' Store global variables in the viminfo file if they are in uppercase + letters. (Negri) +'h' Do ":nohlsearch" when loading a viminfo file. + +Store search patterns in the viminfo file with their offset, magic, etc. Also +store the flag whether 'hlsearch' highlighting is on or off (which is not used +if the 'h' flag is in 'viminfo'). + +Give an error message when setting 'viminfo' without commas. + + +Various new commands *new-commands-5.4* +-------------------- + +Operator |g?|: rot13 encoding. (Negri) + +|zH| and |zL| commands: Horizontal scrolling by half a page. +|gm| move cursor to middle of screen line. (Ideas by Campbell) + +Operations on Visual blocks: |v_b_I|, |v_b_A|, |v_b_c|, |v_b_C|, |v_b_r|, +|v_b_<| and |v_b_>|. (Kelly) + +New command: CTRL-\ CTRL-N, which does nothing in Normal mode, and goes to +Normal mode when in Insert or Command-line mode. Can be used by VisVim or +other OLE programs to make sure Vim is in Normal mode, without causing a beep. +|CTRL-\_CTRL-N| + +":cscope kill" command to use the connection filename. |:cscope| (Kahn) + +|:startinsert| command: Start Insert mode next. + +|:history| command, to show all four types of histories. (Roemer) + +|[m|, |[M|, |]m| and |]M| commands, for jumping backward/forward to start/end +of method in a (Java) class. + +":@*" executes the * register. |:@| (Acevedo) + +|go| and |:goto| commands: Jump to byte offset in the file. + +|gR| and |gr| command: Virtual Replace mode. Replace characters without +changing the layout. (Webb) + +":cd -" changes to the directory from before the previous ":cd" command. +|:cd-| (Webb) + +Tag preview commands |:ptag|. Shows the result of a ":tag" in a dedicated +window. Can be used to see the context of the tag (e.g., function arguments). +(Negri) +|:pclose| command, and CTRL-W CTRL-Z: Close preview window. (Moore) +'previewheight' option, height for the preview window. +Also |:ppop|, |:ptnext|, |:ptprevious|, |:ptNext|, |:ptrewind|, |:ptlast|. + +|:find| and |:sfind| commands: Find a file in 'path', (split window) and edit +it. + +The |:options| command opens an option window that shows the current option +values. Or use ":browse set" to open it. Options are grouped by function. +Offers short help on each option. Hit <CR> to jump to more help. Edit the +option value and hit <CR> on a "set" line to set a new value. + + +Various new options *new-options-5.4* +------------------- + +Scroll-binding: 'scrollbind' and 'scrollopt' options. Added |:syncbind| +command. Makes windows scroll the same amount (horizontally and/or +vertically). (Ralston) + +'conskey' option for MS-DOS. Use direct console I/O. This should work with +telnet (untested!). + +'statusline' option: Configurable contents of the status line. Also allows +showing the byte offset in the file. Highlighting with %1* to %9*, using the +new highlight groups User1 to User9. (Madsen) + +'rulerformat' option: Configurable contents of the ruler, like 'statusline'. +(Madsen) + +'write' option: When off, writing files is not allowed. Avoids overwriting a +file even with ":w!". The |-m| command line option resets 'write'. + +'clipboard' option: How the clipboard is used. Value "unnamed": Use unnamed +register like "*. (Cortopassi) Value "autoselect": Like what 'a' in +'guioptions' does but works in the terminal. + +'guifontset' option: Specify fonts for the +fontset feature, for the X11 GUI +versions. Allows using normal fonts when vim is compiled with this feature. +(Nam) + +'guiheadroom' option: How much room to allow above/below the GUI window. +Used for Motif, Athena and GTK. + +Implemented 'tagstack' option: When off, pushing tags onto the stack is +disabled (Vi compatible). Useful for mappings. + +'shellslash' option. Only for systems that use a backslash as a file +separator. This option will use a forward slash in file names when expanding +it. Useful when 'shell' is sh or csh. + +'pastetoggle' option: Key sequence that toggles 'paste'. Works around the +problem that mappings don't work in Insert mode when 'paste' is set. + +'display' option: When set to "lastline", the last line fills the window, +instead of being replaced with "@" lines. Only the last three characters are +replaced with "@@@", to indicate that the line has not finished yet. + +'switchbuf' option: Allows re-using existing windows on a buffer that is being +jumped to, or split the window to open a new buffer. (Roemer) + +'titleold' option. Replaces the fixed string "Thanks for flying Vim", which +is used to set the title when exiting. (Schild) + + +Vim scripts *new-script-5.4* +----------- + +The |exists()| function can also check for existence of a function. (Roemer) +An internal function is now found with a binary search, should be a bit +faster. (Roemer) + +New functions: +- |getwinposx()| and |getwinposy()|: get Vim window position. (Webb) +- |histnr()|, |histadd()|, |histget()| and |histdel()|: Make history + available. (Roemer) +- |maparg()|: Returns rhs of a mapping. Based on a patch from Vikas. +- |mapcheck()|: Check if a map name matches with an existing one. +- |visualmode()|: Return type of last Visual mode. (Webb) +- |libcall()|: Call a function in a library. Currently only for Win32. (Negri) +- |bufwinnr()|: find window that contains the specified buffer. (Roemer) +- |bufloaded()|: Whether a buffer exists and is loaded. +- |localtime()| and |getftime()|: wall clock time and last modification time + of a file (Webb) +- |glob()|: expand file name wildcards only. +- |system()|: get the raw output of an external command. (based on a patch + from Aaron). +- |strtrans()|: Translate String into printable characters. Used for + 2html.vim script. +- |append()|: easy way to append a line of text in a buffer. + +Changed functions: +- Optional argument to |strftime()| to give the time in seconds. (Webb) +- |expand()| now also returns names for files that don't exist. + +Allow numbers in the name of a user command. (Webb) + +Use "v:" for internal Vim variables: "v:errmsg", "v:shell_error", etc. The +ones from version 5.3 can be used without "v:" too, for backwards +compatibility. + +New variables: +"v:warningmsg" and "v:statusmsg" internal variables. Contain the last given +warning and status message. |v:warningmsg| |v:statusmsg| (Madsen) +"v:count1" variable: like "v:count", but defaults to one when no count is +used. |v:count1| + +When compiling without expression evaluation, "if 1" can be used around the +not supported commands to avoid it being executed. Works like in Vim 4.x. +Some of the runtime scripts gave errors when used with a Vim that was compiled +with minimal features. Now "if 1" is used around code that is not always +supported. + +When evaluating an expression with && and ||, skip the parts that will not +influence the outcome. This makes it faster and avoids error messages. (Webb) +Also optimized the skipping of expressions inside an "if 0". + + +Avoid hit-enter prompt *avoid-hit-enter* +----------------------- + +Added 'T' flag to 'shortmess': Truncate all messages that would cause the +hit-enter prompt (unless that would happen anyway). +The 'O' flag in 'shortmess' now also applies to quickfix messages, e.g., from +the ":cn" command. + +The default for 'shortmess' is now "filnxtToO", to make most messages fit on +the command line, and not cause the hit-enter prompt. + +Previous messages can be viewed with the new |:messages| command. + +Some messages are shown fully, even when 'shortmess' tells to shorten +messages, because the user is expected to want to see them in full: CTRL-G and +some quickfix commands. + + +Improved quickfix *improved-quickfix* +----------------- + +Parse change-directory lines for gmake: "make[1]: Entering directory 'name'". +Uses "%D" and "%X" in 'errorformat'. +Also parse "Making {target} in {dir}" messages from make. Helps when not +using GNU make. (Schandl) + +Use 'isfname' for "%f" in 'errorformat'. + +Parsing of multi-line messages. |errorformat-multi-line| + +Allow a range for the |:clist| command. (Roemer) + +Support for "global" file names, for error formats that output the file name +once for several errors. (Roemer) + +|:cnfile| jumps to first error in next file. + +"$*" in 'makeprg' is replaced by arguments to ":make". (Roemer) + + +Regular expressions *regexp-changes-5.4* +------------------- + +In a regexp, a '$' before "\)" is also considered to be an end-of-line. |/$| +In patterns "^" after "\|" or "\(" is a start-of-line. |/^| (Robinson) + +In a regexp, in front of "\)" and "\|" both "$" and "\$" were considered +end-of-line. Now use "$" as end-of-line and "\$" for a literal dollar. Same +for '^' after "\(" and "\|". |/\$| |/\^| + +Some search patterns can be extremely slow, even though they are not really +illegal. For example: "\([^a-z]\+\)\+Q". Allow interrupting any regexp +search with CTRL-C. + +Register "/: last search string (read-only). (Kohan) Changed to use last used +search pattern (like what 'hlsearch' uses). Can set the search pattern with +":let @/ = {expr}". + +Added character classes to search patterns, to avoid the need for removing the +'l' flag from 'cpoptions': |[:tab:]|, |[:return:]|, |[:backspace:]| and +|[:escape:]|. + +By adding a '?' after a comparative operator in an expression, the comparison +is done by ignoring case. |expr-==?| + + +Other improvements made between version 5.3 and 5.4 +--------------------------------------------------- + +Changed *changed-5.4* +------- + +Unix: Use $TMPDIR for temporary files, if it is set and exists. + +Removed "Empty buffer" message. It isn't useful and can cause a hit-enter +prompt. (Negri) + +"ex -" now reads commands from stdin and works in silent mode. This is to be +compatible with the original "ex" command that is used for scripts. + +Default range for ":tcldo" is the whole file. + +Cancelling Visual mode with ESC moved the cursor. There appears to be no +reason for this. Now leave the cursor where it is. + +The ":grep" and ":make" commands see " as part of the arguments, instead of +the start of a comment. + +In expressions the "=~" and "!~" operators no longer are affected by +'ignorecase'. + +Renamed vimrc_example to vimrc_example.vim and gvimrc_example to +gvimrc_example.vim. Makes them being recognized as vim scripts. + +"gd" no longer starts searching at the end of the previous function, but at +the first blank line above the start of the current function. Avoids that +using "gd" in the first function finds global a variable. + +Default for 'complete' changed from ".,b" to ".,w,b,u,t,i". Many more matches +will be found, at the cost of time (the search can be interrupted). + +It is no longer possible to set 'shell*' options from a modeline. Previously +only a warning message was given. This reduces security risks. + +The ordering of the index of documentation files was changed to make it more +easy to find a subject. + +On MS-DOS and win32, when $VIM was not set, $HOME was used. This caused +trouble if $HOME was set to e.g., "C:\" for some other tool, the runtime files +would not be found. Now use $HOME only for _vimrc, _gvimrc, etc., not to find +the runtime file. + +When 'tags' is "./{fname}" and there is no file name for the current buffer, +just use it. Previously it was skipped, causing "vim -t {tag}" not to find +many tags. + +When trying to select text in the 'scrolloff' area by mouse dragging, the +resulting scrolling made this difficult. Now 'scrolloff' is temporarily set +to 0 or 1 to avoid this. But still allow scrolling in the top line to extend +to above the displayed text. + +Default for 'comments' now includes "sl:/*,mb: *,ex:*/", to make javadoc +comments work. Also helps for C comments that start with "/*******". + +CTRL-X CTRL-] Insert mode tag expansion tried to expand to all tags when used +after a non-ID character, which can take a very long time. Now limit this to +200 matches. Also used for command-line tag completion. + +The OS/2 distribution has been split in two files. It was too big to fit on a +floppy. The same runtime archive as for the PC is now used. + +In the documentation, items like <a-z> have been replaced with {a-z} for +non-optional arguments. This avoids confusion with key names: <C-Z> is a +CTRL-Z, not a character between C and Z, that is {C-Z}. + + +Added *added-5.4* +----- + +Color support for the iris-ansi builtin termcap entry. (Tubman) + +Included VisVim version 1.3a. (Erhardt) + +Win32 port for SNiFF+ interface. (Leherbauer) +Documentation file for sniff interface: if_sniff.txt. (Leherbauer) + +Included the "SendToVim" and "OpenWithVim" programs in the OleVim directory. +To be used with the OLE version of gvim under MS-Windows. (Schaller) + +Included Exuberant Ctags version 3.2.4 with Eiffel support. (Hiebert) + +When a file that is being edited is deleted, give a warning (like when the +time stamp changed). + +Included newer versions of the HTML-generating Awk and Perl scripts. (Colombo) + +Linux console mouse support through "gpm". (Tsindlekht) + +Security fix: Disallow changing 'secure' and 'exrc' from a modeline. When +'secure' is set, give a warning for changing options that contain a program +name. + +Made the Perl interface work with Perl 5.005 and threads. (Verdoolaege) + +When giving an error message for an ambiguous mapping, include the offending +mapping. (Roemer) + +Command line editing: +- Command line completion of mappings. (Roemer) +- Command line completion for ":function", ":delfunction", ":let", ":call", + ":if", etc. (Roemer) +- When using CTRL-D completion for user commands that have + "-complete=tag_listfiles" also list the file names. (Madsen) +- Complete the arguments of the ":command" command. (Webb) +- CTRL-R . in command line inserts last inserted text. CTRL-F, CTRL-P, CTRL-W + and CTRL-A after CTRL-R are used to insert an object from under the cursor. + (Madsen) + +Made the text in uganda.txt about copying Vim a bit more clear. + +Updated the Vim tutor. Added the "vimtutor" command, which copies the tutor +and starts Vim on it. "make install" now also copies the tutor. + +In the output of ":clist" the current entry is highlighted, with the 'i' +highlighting (same as used for 'incsearch'). + +For the ":clist" command, you can scroll backwards with "b" (one screenful), +"u" (half a screenful) and "k" (one line). + +Multi-byte support: +- X-input method for multi-byte characters. And various fixes for multi-byte + support. (Nam) +- Hangul input method feature: |hangul|. (Nam) +- Cleaned up configuration of multi-byte support, XIM, fontset and Hangul + input. Each is now configurable separately. +- Changed check for GTK_KEYBOARD to HANGUL_KEYBOARD_TYPE. (Nam) +- Added doc/hangulin.txt: Documentation for the Hangul input code. (Nam) +- XIM support for GTK+. (Nam) +- First attempt to include support for SJIS encoding. (Nagano) +- When a double-byte character doesn't fit at the end of the line, put a "~" + there and print it on the next line. +- Optimize output of multi-byte text. (Park) +- Win32 IME: preedit style is like over-the-spot. (Nagano) +- Win32 IME: IME mode change now done with ImmSetOpenStatus. (Nagano) +- GUI Athena: file selection dialog can display multi-byte characters. + (Nagano) +- Selection reply for XA_TEXT as XA_STRING. (Nagano) + +"runtime/macros/diffwin.vim". Mappings to make a diff window. (Campbell) + +Added ".obj" to the 'suffixes' option. + +Reduced size of syntax/synload.vim by using the ":SynAu" user command. +Automated numbering of Syntax menu entries in menu.vim. +In the Syntax menu, insert separators between syntax names that start with +a different letter. (Geddes) + +Xterm: +- Clipboard support when using the mouse in an xterm. (Madsen) +- When using the xterm mouse, track dragging of the mouse. Use xterm escape + sequences when possible. It is more precise than other methods, but + requires a fairly recent xterm version. It is enabled with "xterm2" in + 'ttymouse'. (Madsen) +- Check xterm patch level, to set the value of 'ttymouse'. Has only been + added to xterm recently (patch level > 95). Uses the new 't_RV' termcap + option. Set 'ttymouse' to "xterm2" when a correct response is recognized. + Will make xterm mouse dragging work better. +- Support for shifted function keys on xterm. Changed codes for shifted + cursor keys to what the xterm actually produces. Added codes for shifted + <End> and <Home>. +- Added 't_WP' to set the window position in pixels and 't_WS' to set the + window size in characters. Xterm can now move (used for ":winpos") and + resize (use for ":set lines=" and ":set columns="). + +X11: +- When in Visual mode but not owning the selection, display the Visual area + with the VisualNOS group to show this. (Madsen) +- Support for requesting the type of clipboard support. Used for AIX and + dtterm. (Wittig) +- Support compound_text selection (even when compiled without multi-byte). + +Swap file: +- New variation for naming swap files: Replace path separators into %, place + all swap files in one directory. Used when a name in 'dir' ends in two path + separators. (Madsen) +- When a swap file is found, show whether it contains modifications or not in + the informative message. (Madsen) +- When dialogs are supported, use a dialog to ask the user what to do when a + swapfile already exists. + +"popup_setpos" in 'mousemodel' option. Allows for moving the cursor when +using the right mouse button. + +When a buffer is deleted, the selection for which buffer to display instead +now uses the most recent entry from the jump list. (Madsen) + +When using CTRL-O/CTRL-I, skip deleted buffers. + +A percentage is shown in the ruler, when there is room. + +Used autoconf 1.13 to generate configure. + +Included get_lisp_indent() from Dirk van Deun. Does better Lisp indenting +when 'p' flag in 'cpoptions' is not included. + +Made the 2html.vim script quite a bit faster. (based on ideas from Geddes) + +Unix: +- Included the name of the user that compiled Vim and the system name it was + compiled on in the version message. +- "make install" now also installs the "tools" directory. Makes them + available for everybody. +- "make check" now does the same as "make test". "make test" checks for + Visual block mode shift, insert, replace and change. +- Speed up comparing a file name with existing buffers by storing the + device/inode number with the buffer. +- Added configure arguments "--disable-gtk", "--disable-motif" and + "--disable-athena", to be able to disable a specific GUI (when it doesn't + work). +- Renamed the configure arguments for disabling the check for specific GUIs. + Should be clearer now. (Kahn) +- On a Digital Unix system ("OSF1") check for the curses library before + termlib and termcap. (Schild) +- "make uninstall_runtime" will only delete the version-specific files. Can + be used to delete the runtime files of a previous version. + +Macintosh: (St-Amant) +- Dragging the scrollbar, like it's done for the Win32 GUI. Moved common code + from gui_w32.c to gui.c +- Added dialogs and file browsing. +- Resource fork preserved, warning when it will be lost. +- Copy original file attributes to newly written file. +- Set title/notitle bug solved. +- Filename completion improved. +- Grow box limit resize to a char by char size. +- Use of rgb.txt for more colors (but give back bad color). +- Apple menu works (beside the about...). +- Internal border now vim compliant. +- Removing a menu doesn't crash anymore. +- Weak-linking of Python 1.5.1 (only on PPC). Python is supported when the + library is available. +- If an error is encountered when sourcing the users .vimrc, the alert box now + shows right away with the OK button defaulted. There's no more "Delete"-key + sign at the start of each line +- Better management of environment variables. Now $VIM is calculated only + once, not regenerated every time it is used. +- No more CPU hog when in background. +- In a sourced Vim script the Mac file format can be recognized, just like DOS + file format is. + +When both "unix" and "mac" are present in 'fileformats', prefer "mac" format +when there are more CR than NL characters. +When using "mac" fileformat, use CR instead of a NL, because NL is used for +NUL. Will preserve all characters in a file. (Madsen) + +The DOS install.exe now contains checks for an existing installation. It +avoids setting $VIM and $PATH again. +The install program for Dos/Windows can now install Vim in the popup menu, by +adding two registry keys. + +Port to EGCS/mingw32. New Makefile.ming. (Aaron) + +DOS 16 bit: Don't include cursor shape stuff. Save some bytes. + +TCL support to Makefile.w32. (Duperval) + +OS/2: Use argv[0] to find runtime files. + +When using "gf" to go to a buffer that has already been used, jump to the +line where the cursor last was. + +Colored the output of ":tselect" a bit more. Different highlighting between +tag name and file name. Highlight field name ("struct:") separately from +argument. + +Backtick expansion for non-Unix systems. Based on a patch from Aaron. +Allows the use of things like ":n `grep -l test *.c`" and +"echo expand('`ls m*`')". + +Check for the 'complete' option when it is set. (Acevedo) +'d' flag in 'complete' searches for defined names or macros. +While searching for Insert mode completions in include files and tags files, +check for typeahead, so that you can use matches early. (Webb) +The '.' flag in 'complete' now scans the current buffer completely, ignoring +'nowrapscan'. (Webb) + +Added '~' flag to 'whichwrap'. (Acevedo) + +When ending the Visual mode (e.g., with ESC) don't grab ownership of the +selection. + +In a color terminal, "fg" and "bg" can be used as color names. They stand for +the "Normal" colors. + +A few cscope cleanups. (Kahn) + +Included changed vimspell.sh from Schemenauer. + +Concatenation of strings in an expression with "." is a bit faster. (Roemer) + +The ":redir" command can now redirect to a register: ":redir @r". (Roemer) + +Made the output of ":marks" and ":jumps" look similar. When the mark is in +the current file, show the text at the mark. Also for ":tags". + +When configure finds ftello() and fseeko(), they are used in tag.c (for when +you have extremely big tags files). + +Configure check for "-FOlimit,2000" argument for the compiler. (Borsenkow) + +GUI: +- When using ":gui" in a non-GUI Vim, give a clear error message. +- "gvim -v" doesn't start the GUI (if console support is present). +- When in Ex mode, use non-Visual selection for the whole screen. +- When starting with "gvim -f" and using ":gui" in the .gvimrc file, Vim + forked anyway. Now the "-f" flag is remembered for ":gui". Added "gui -b" + to run gvim in the background anyway. + +Motif GUI: +- Check for "-lXp" library in configure (but it doesn't work yet...). +- Let configure check for Lesstif in "/usr/local/Lesstif/Motif*". Changed the + order to let a local Motif version override a system standard version. + +Win32 GUI: +- When using "-register" or "-unregister" in the non-OLE version, give an + error message. +- Use GTK toolbar icons. Make window border look better. Use sizing handles + on the lower left&right corners of the window. (Negri) +- When starting an external command with ":!start" and the command can not be + executed, give an error message. (Webb) +- Use sizing handles for the grey rectangles below the scrollbars. Can draw + toolbar in flat mode now, looks better. (Negri) +- Preparations for MS-Windows 3.1 addition. Mostly changing WIN32 to MSWIN + and USE_GUI_WIN32 to USE_GUI_MSWIN. (Negri) + +Avoid allocating the same string four times in buflist_findpat(). (Williams) + +Set title and icon text with termcap options 't_ts', 't_fs', 't_IS' and +'t_IE'. Allows doing this on any terminal that supports setting the title +and/or icon text. (Schild) + +New 'x' flag in 'comments': Automatically insert the end part when its last +character is typed. Helps to close a /* */ comment in C. (Webb) + +When expand() has a second argument which is non-zero, don't use 'suffixes' +and 'wildignore', return all matches. + +'O' flag in 'cpoptions' When not included, Vim will not overwrite a file, if +it didn't exist when editing started but it does exist when the buffer is +written to the file. The file must have been created outside of Vim, possibly +without the user knowing it. When this is detected after a shell command, +give a warning message. + +When editing a new file, CTRL-G will show [New file]. When there were errors +while reading the file, CTRL-G will show [Read errors]. + +":wall" can now use a dialog and file-browsing when needed. + +Grouped functionality into new features, mainly to reduce the size of the +minimal version: ++linebreak: 'showbreak', 'breakat' and 'linebreak' ++visualextra: "I"nsert and "A"ppend in Visual block mode, "c"hange all lines + in a block, ">" and "<": Shifting a block, "r": Replacing a + Visual area with one character. ++comments: 'comments' ++cmdline_info: 'ruler' and 'showcmd'. Replaces +showcmd. +"+title" Don't add code to set title or icon for MSDOS, this was not + possible anyway. ++cmdline_compl Disable commandline completion at compile time, except for + files, directories and help items. + +Moved features from a list of function calls into an array. Should save a bit +of space. + +While entering the body of a function, adjust indent according to "if" and +"while" commands. + +VMS: Adjusted os_vms.mms a bit according to suggestions from Arpadffy. + +The flags in the 'comments' option can now include an offset. This makes it +possible to align "/*****", "/* xxx" and "/*" comments with the same +'comments' setting. The default value for 'comments' uses this. +Added 'O' flag: Don't use this part for the "O" command. Useful for "set +com=sO:*\ -,mO:*\ \ ,exO:*/" + +FileType autocommands recognize ".bak", ".orig" and "~" extensions and remove +them to find the relevant extension. + +The tutorial for writing a Vim script file has been extended. + +Some more highlighting in help files, for items that are not typed literally. + +Can use "CTRL-W CTRL-G" like "CTRL-W g". + +"make test" for OS/2. + +Adjusted configure to automatically use the GUI for BeOS. + + +Fixed *fixed-5.4* +----- + +5.3.1: When using an autocommand for BufWritePre that changes the name of the +buffer, freed memory would be used. (Geddes) + +Mac: Compiler didn't understand start of skip_class_name(). + +Win32 GUI: +- When cancelling the font requester, don't give an error message. +- When a tearoff-menu is open and its menu is deleted, Vim could crash. + (Negri) +- There was a problem on Windows 95 with (un)maximizing the window. + (Williams) +- when 'mousehide' is set, the mouse would stay hidden when a menu is dropped + with the keyboard. (Ralston) +- The tempname() function already created the file. Caused problems when + using ":w". Now the file is deleted. +- Cursor disappeared when ending up in the top-left character on the screen + after scrolling. (Webb) +- When adding a submenu for a torn-off menu, it was not updated. +- Menu tooltip was using the toolbar tooltip. (Negri) +- Setting 'notitle' didn't remove the title. (Steed) +- Using ":!start cmd" scrolled the screen one line up, and didn't wait for + return when the command wasn't found. + +Cscope interface: Sorting of matches was wrong. Starting the interface could +fail. (Kahn) + +Motif GUI: Could not compile with Motif 1.1, because some tear-off +functionality was not in #ifdefs. + +Configure could sometimes not compile or link the test program for sizeof(int) +properly. This caused alignment problems for the undo structure allocations. +Added a safety check that SIZEOF_INT is not zero. + +Added configure check to test if strings.h can be included after string.h. +Some systems can't handle it. +Some systems need both string.h and strings.h included. Adjusted vim.h for +that. Removed including string.h from os_unixx.h, since it's already in +vim.h. (Savage) +AIX: defining _NO_PROTO in os_unix.h causes a conflict between string.h and +strings.h, but after the configure check said it was OK. Also define +_NO_PROTO for AIX in the configure check. (Winn) + +When closing a window with CTRL-W c, the value of 'hidden' was not taken into +account, the buffer was always unloaded. (Negri) + +Unix Makefile: "make install" always tried to rename an older executable and +remove it. This caused an error message when it didn't exit. Added a check +for the existence of an old executable. +The command line for "make install" could get too long, because of the many +syntax files. Now first do a "cd" to reduce the length. + +On RISCOS and MSDOS, reading a file could fail, because the short filename was +used, which can be wrong after a ":!cd". + +In the DOS versions, the wrong install.exe was included (required Windows). +Now the install.exe version is included that is the same as the Vim version. +This also supports long file names where possible. + +When recording, and stopping while in Insert mode with CTRL-O q, the CTRL-O +would also be recorded. + +32bit DOS version: "vim \file", while in a subdirectory, resulted in "new +file" for "file" in the local directory, while "\file" did exist. When +"file" in the current directory existed, this didn't happen. + +MSDOS: Mouse could not go beyond 80 columns in 132 columns mode. (Young) + +"make test" failed in the RedHat RPM, because compatible is off by default. + +In Insert mode <C-O><C-W><C-W> changes to other window, but the status bars +were not updated until another character was typed. + +MSDOS: environment options in lowercase didn't work, although they did in the +Win32 versions. (Negri) + +After ":nohlsearch", a tag command switched highlighting back on. + +When using "append" command as the last line in an autocommand, Vim would +crash. + +RISCOS: The scroll bumpers (?) were not working properly. (Leonard) + +"zl" and "zh" could move the cursor, but this didn't set the column in which +e.g., "k" would move the cursor. + +When doing ":set all&" the value of 'scroll' was not set correctly. This +caused an error message when later setting any other number option. + +When 'hlsearch' highlighting has been disabled with ":nohlsearch", +incremental searching would switch it back on too early. + +When listing tags for ":tselect", and using a non-search command, and the last +character was equal to the first (e.g., "99"), the last char would not be +shown. + +When searching for tags with ":tag" Vim would assume that all matches had been +found when there were still more (e.g. from another tags file). + +Win32: Didn't recognize "c:\" (e.g., in tags file) as absolute path when +upper/lowercase was different. + +Some xterms (Debian) send <Esc>OH for HOME and <Esc>OF for END. Added these +to the builtin-xterm. + +In ex mode, any CR was seen as the end of the line. Only a NL should be +handled that way. broke ":s/foo/some^Mtext/". + +In menu.vim, a vmenu was used to override an amenu. That didn't work, because +the system menu file doesn't overwrite existing menus. Added explicit vunmenu +to solve this. + +Configure check for terminal library could find a library that doesn't work at +runtime (Solaris: shared library not found). Added a check that a program +with tgoto() can run correctly. + +Unix: "echo -n" in the Makefile doesn't work on all systems, causing errors +compiling pathdef.c. Replaced it with "tr". + +Perl: DO_JOIN was redefined by Perl. Undefined it in the perl files. + +Various XIM and multi-byte fixes: +- Fix user cannot see his language while he is typing his language with + off-the-spot method. (Nagano) +- Fix preedit position using text/edit area (using gui.wid). (Nagano) +- remove 'fix dead key' codes. It was needed since XNFocusWindow was + "x11_window", XNFocusWindow is now gui.wid. (Nagano) +- Remove some compile warnings and fix typos. (Namsh) +- For status area, check the gtk+ version while Vim runs. I believe it is + better than compile time check. (Namsh) +- Remove one FIXME for gtk+-xim. (Namsh) +- XIM: Dead keys didn't work for Czech. (Vyskovsky) +- Multibyte: If user input only 3byte such as mb1_mb2_eng or eng_mb1_mb2 VIM + could convert it to special character. (Nam) +- Athena/Motif with XIM: fix preedit area. (Nam) +- XIM: Composed strings were sometimes ignored. Vim crashed when compose + string was longer than 256 bytes. IM's geometry control is fixed. (Nam, + Nagano) +- Win32 multi-byte: hollowed cursor width on a double byte char was wrong. + (Nagano) +- When there is no GUI, selecting XIM caused compilation problems. + Automatically disable XIM when there is no GUI in configure. +- Motif and Athena: When compiled with XIM, but the input method was not + enabled, there would still be a status line. Now the status line is gone if + the input method doesn't work. (Nam) + +Win32: tooltip was not removed when selecting a parent menu (it was when +selecting a menu entry). (Negri) + +Unix with X: Some systems crash on exit, because of the XtCloseDisplay() call. +Removed it, it should not be necessary when exiting. + +Win32: Crash on keypress when compiled with Borland C++. (Aaron) + +When checking for Motif library files, prefer the same location as the include +files (with "include" replaced with "lib") above another entry. + +Athena GUI: Changed "XtOffset()" in gui_at_fs.c to "XtOffsetOf()", like it's +used in gui_x11.c. + +Win32: When testing for a timestamp of a file on floppy, would get a dialog +box when the floppy has been removed. Now return with an error. (Negri) + +Win32 OLE: When forced to come to the foreground, a minimized window was still +minimized, now it's restored. (Zivkov) + +There was no check for a positive 'shiftwidth'. A negative value could cause +a hangup, a zero value a crash. + +Athena GUI: horizontal scrollbar wasn't updated correctly when clicking right +or left of the thumb. + +When making a Visual-block selection in one window, and trying to scroll +another, could cause errors for accessing non-existent line numbers. + +When 'matchpairs' contains "`:'", jumping from the ` to the ' didn't work +properly. + +Changed '\"' to '"' to make it compatible with old C compilers. + +The command line expansion for mappings caused a script with a TAB between lhs +and rhs of a map command to fail. Assume the TAB is to separate lhs and rhs +when there are no mappings to expand. + +When editing a file with very long lines with 'scrolloff' set, "j" would +sometimes end up in a line which wasn't displayed. + +When editing a read-only file, it was completely read into memory, even when +it would not fit. Now create a swap file for a read-only file when running +out of memory while reading the file. + +When using ":set cino={s,e-s", a line after "} else {" was not indented +properly. Also added a check for this in test3.in. + +The Hebrew mapping for the command line was remembered for the next command +line. That isn't very useful, a command is not Hebrew. (Kol) + +When completing file names with embedded spaces, like "Program\ files", this +didn't work. Also for user commands. Moved backslash_halve() down to +mch_expandpath(). + +When using "set mouse=a" in Ex mode, mouse events were handled like typed +text. Then typing "quit" screwed up the mouse behavior of the xterm. + +When repeating an insert with "." that contains a CTRL-Y, a number 5 was +inserted as "053". + +Yanking a Visual area, with the cursor past the line, didn't move the cursor +back onto the line. Same for "~", "u", "U" and "g?" + +Win32: Default for 'grepprg' could be "findstr /n" even though there is no +findstr.exe (Windows 95). Check if it exists, and fall back to "grep -n" if +it doesn't. + +Because gui_mouse_moved() inserted a leftmouse click in the input buffer, +remapping a leftmouse click caused strange effects. Now Insert another code +in the input buffer. Also insert a leftmouse release, to avoid the problem +with ":map <LeftMouse> l" that the next release is seen as the release for the +focus click. + +With 'wrap' on, when using a line that doesn't fit on the screen, if the start +of the Visual area is before the start of the screen, there was no +highlighting. Also, 'showbreak' doesn't work properly. + +DOS, Win32: A pattern "[0-9]\+" didn't work in autocommands. + +When creating a swap file for a buffer which isn't the current buffer, could +get a mixup of short file name, resulting in a long file name when a short +file name was required. makeswapname() was calling modname() instead of +buf_modname(). + +When a function caused an error, and the error message was very long because +of recursiveness, this would cause a crash. + +'suffixes' were always compared with matching case. For MS-DOS, Win32 and +OS/2 case is now ignored. + +The use of CHARBITS in regexp.c didn't work on some Linux. Don't use it. + +When generating a script file, 'cpo' was made empty. This caused backslashes +to disappear from mappings. Set it to "B" to avoid that. + +Lots of typos in the documentation. (Campbell) + +When editing an existing (hidden) buffer, jump to the last used cursor +position. (Madsen) + +On a Sun the xterm screen was not restored properly when suspending. (Madsen) + +When $VIMINIT is processed, 'nocompatible' was only set after processing it. + +Unix: Polling for a character wasn't done for GPM, Sniff and Xterm clipboard +all together. Cleaned up the code for using select() too. + +When executing external commands from the GUI, some typeahead was lost. Added +some code to regain as much typeahead as possible. + +When the window height is 5 lines or fewer, <PageDown> didn't use a one-line +overlap, while <PageUp> does. Made sure that <PageUp> uses the same overlap +as <PageDown>, so that using them both always displays the same lines. + +Removed a few unused functions and variables (found with lint). + +Dictionary completion didn't use 'infercase'. (Raul) + +Configure tests failed when the Perl library was not in LD_LIBRARY_PATH. +Don't use the Perl library for configure tests, add it to the linker line only +when linking Vim. + +When using ncurses/terminfo, could get a 't_Sf' and 't_Sb' termcap entry that +has "%d" instead of "%p1%d". The light background colors didn't work then. + +GTK GUI with ncurses: Crashed when starting up in tputs(). Don't use tputs() +when the GUI is active. + +Could use the ":let" command to set the "count", "shell_error" and "version" +variables, but that didn't work. Give an error message when trying to set +them. + +On FreeBSD 3.0, tclsh is called tclsh8.0. Adjusted configure.in to find it. + +When Vim is linked with -lncurses, but python uses -ltermcap, this causes +trouble: "OOPS". Configure now removes the -ltermcap. + +:@" and :*" didn't work properly, because the " was recognized as the start of +a comment. + +Win32s GUI: Minimizing the console where a filter command runs in caused +trouble for detecting that the filter command has finished. (Negri) + +After executing a filter command from an xterm, the mouse would be disabled. +It would work again after changing the mode. + +Mac GUI: Crashed in newenv(). (St-Amant) + +The menus and mappings in mswin.vim didn't handle text ending in a NL +correctly. (Acevedo) + +The ":k" command didn't check if it had a valid argument or extra characters. +Now give a meaningful error message. (Webb) + +On SGI, the signal function doesn't always have three arguments. Check for +struct sigcontext to find out. Might still be wrong... + +Could crash when using 'hlsearch' and search pattern is "^". + +When search patterns were saved and restored, status of no_hlsearch was not +also saved and restored (from ":nohlsearch" command). + +When using setline() to make a line shorter, the cursor position was not +adjusted. + +MS-DOS and Win95: When trying to edit a file and accidentally adding a slash +or backslash at the end, the file was deleted. Probably when trying to create +the swap file. Explicitly check for a trailing slash or backslash before +trying to read a file. + +X11 GUI: When starting the GUI failed and received a deadly signal while +setting the title, would lock up when trying to exit, because the title is +reset again. Avoid using mch_settitle() recursively. + +X11 GUI: When starting the GUI fails, and then trying it again, would crash, +because argv[] has been freed and x11_display was reset to NULL. + +Win32: When $HOME was set, would put "~user" in the swap file, which would +never compare with a file name, and never cause the attention message. Put +the full path in the swap file instead. + +Win32 console: There were funny characters at the end of the "vim -r" swap +files message (direct output of CR CR LF). + +DOS 32 bit: "vim -r" put the text at the top of the window. + +GUI: With 'mousefocus' set, got mouse codes as text with "!sleep 100" or "Q". + +Motif and Win32 GUI: When changing 'guifont' to a font of the same size the +screen wasn't redrawn. + +Unix: When using ":make", jumping to a file b.c, which is already open as a +symbolic link a.c, opened a new buffer instead of using the existing one. + +Inserting text in the current buffer while sourcing the .vimrc file would +cause a crash or hang. The memfile for the current buffer was never +allocated. Now it's allocated as soon as something is written in the buffer. + +DOS 32 bit: "lightblue" background worked for text, but not drawn parts were +black. + +DOS: Colors of console were not restored upon exiting. + +When recording, with 'cmdheight' set to 2 and typing Esc> in Insert mode +caused the "recording" message to be doubled. + +Spurious "file changed" messages could happen on Windows. Now tolerate a one +second difference, like for Linux. + +GUI: When returning from Ex mode, scrollbars were not updated. + +Win32: Copying text to the clipboard containing a <CR>, pasting it would +replace it with a <NL> and drop the next character. + +Entering a double byte character didn't work if the second byte is in [xXoO]. +(Eric Lee) + +vim_realloc was both defined and had a prototype in proto/misc2.pro. Caused +conflicts on Solaris. + +A pattern in an autocommand was treated differently on DOS et al. than on +Unix. Now it's the same, also when using backslashes. + +When using <Tab> twice for command line completion, without a match, the <Tab> +would be inserted. (Negri) + +Bug in MS-Visual C++ 6.0 when compiling ex_docmd.c with optimization. (Negri) + +Testing the result of mktemp() for failure was wrong. Could cause a crash. +(Peters) + +GUI: When checking for a ".gvimrc" file in the current directory, didn't check +for a "_gvimrc" file too. + +Motif GUI: When using the popup menu and then adding an item to the menu bar, +the menu bar would get very high. + +Mouse clicks and special keys (e.g. cursor keys) quit the more prompt and +dialogs. Now they are ignored. + +When at the more-prompt, xterm selection didn't work. Now use the 'r' flag in +'mouse' also for the more-prompt. + +When selecting a Visual area of more than 1023 lines, with 'guioptions' set to +"a", could mess up the display because of a message in free_yank(). Removed +that message, except for the Amiga. + +Moved auto-selection from ui_write() to the screen update functions. Avoids +unexpected behavior from a low-level function. Also makes the different +feedback of owning the selection possible. + +Vi incompatibility: Using "i<CR>" in an indent, with 'ai' set, used the +original indent instead of truncating it at the cursor. (Webb) + +":echo x" didn't stop at "q" for the more prompt. + +Various fixes for Macintosh. (St-Amant) + +When using 'selectmode' set to "exclusive", selecting a word and then using +CTRL-] included the character under the cursor. + +Using ":let a:name" in a function caused a crash. (Webb) + +When using ":append", an empty line didn't scroll up. + +DOS etc.: A file name starting with '!' didn't work. Added '!' to default for +'isfname'. + +BeOS: Compilation problem with prototype of skip_class_name(). (Price) + +When deleting more than one line, e.g., with "de", could still use "U" +command, which didn't work properly then. + +Amiga: Could not compile ex_docmd.c, it was getting too big. Moved some +functions to ex_cmds.c. + +The expand() function would add a trailing slash for directories. + +Didn't give an error message when trying to assign a value to an argument of a +function. (Webb) + +Moved including sys/ptem.h to after termios.h. Needed for Sinix. + +OLE interface: Don't delete the object in CVimCF::Release() when the reference +count becomes zero. (Cordell) +VisVim could still crash on exit. (Erhardt) + +"case a: case b:" (two case statements in one line) aligned with the second +case. Now it uses one 'sw' for indent. (Webb) + +Font initialisation wasn't right for Athena/Motif GUI. Moved the call to +highlight_gui_started() gui_mch_init() to gui_mch_open(). (Nam) + +In Replace mode, backspacing over a TAB before where the replace mode started +while 'sts' is different from 'ts', would delete the TAB. + +Win32 console: When executing external commands and switching between the two +console screens, Vim would copy the text between the buffers. That caused the +screen to be messed up for backtick expansion. + +":winpos -1" then ":winpos" gave wrong error message. + +Windows commander creates files called c:\tmp\$wc\abc.txt. Don't remove the +backslash before the $. Environment variables were not expanded anyway, +because of the backslash before the dollar. + +Using "-=" with ":set" could remove half a part when it contains a "\,". +E.g., ":set path+=a\\,b" and then "set path-=b" removed ",b". + +When Visually selecting lines, with 'selection' set to "inclusive", including +the last char of the line, "<<" moved an extra line. Also for other operators +that always work on lines. + +link.sh changed "-lnsl_s" to "_s" when looking for "nsl" to be removed. +Now it only remove whole words. + +When jumped to a mark or using "fz", and there is an error, the current column +was lost. E.g. when using "$fzj". + +The "g CTRL-G" command could not be interrupted, even though it can take a +long time. + +Some terminals do have <F4> and <xF4>. <xF4> was always interpreted as <F4>. +Now map <xF4> to <F4>, so that the user can override this. + +When compiling os_win32.c with MIN_FEAT the apply_autocmds() should not be +used. (Aaron) + +This autocommand looped forever: ":au FileChangedShell * nested e <afile>" +Now FileChangeShell never nests. (Roemer) + +When evaluating an ":elseif" that was not going to matter anyway, ignore +errors. (Roemer) + +GUI Lesstif: Tearoff bar was the last item, instead of the first. + +GUI Motif: Colors of tear-off widgets was wrong when 't' flag added to +'guioptions' afterwards. When 't' flag in 'guioptions' is excluded, would +still get a tearoff item in a new menu. + +An inode number can be "long long". Use ino_t instead of long. Added +configure check for ino_t. + +Binary search for tags was using a file offset "long" instead of "off_t". + +Insert mode completion of tags was not using 'ignorecase' properly. + +In Insert mode, the <xFn> keys were not properly mapped to <Fn> for the +default mappings. Also caused errors for ":mkvimrc" and ":mksession". + +When jumping to another window while in Insert mode, would get the "warning: +changing readonly file" even when not making a change. + +A '(' or '{' inside a trailing "//" comment would disturb C-indenting. +When using two labels below each other, the second one was not indented +properly. Comments could mess up C-indenting in many places. (Roemer) + +Could delete or redefine a function while it was being used. Could cause a +crash. +In a function it's logical to prepend "g:" to a system variable, but this +didn't work. (Roemer) + +Hangul input: Buffer would overflow when user inputs invalid key sequence. +(Nam) + +When BufLoad or BufEnter autocommands change the topline of the buffer in the +window, it was overruled and the cursor put halfway the window. Now only put +the cursor halfway if the autocommands didn't change the topline. + +Calling exists("&option") always returned 1. (Roemer) + +Win32: Didn't take actually available memory into account. (Williams) + +White space after an automatically inserted comment leader was not removed +when 'ai' is not set and <CR> hit just after inserting it. (Webb) + +A few menus had duplicated accelerators. (Roemer) + +Spelling errors in documentation, quite a few "the the". (Roemer) + +Missing prototypes for Macintosh. (Kielhorn) + +Win32: When using 'shellquote' or 'shellxquote', the "!start cmd" wasn't +executed in a disconnected process. + +When resizing the window, causing a line before the cursor to wrap or unwrap, +the cursor was displayed in the wrong position. + +There was quite a bit of dead code when compiling with minimal features. + +When doing a ":%s///" command that makes lines shorter, such that lines above +the final cursor position no longer wrap, the cursor position was not updated. + +get_id_list() could allocate an array one too small, when a "contains=" item +has a wildcard that matches a group name that is added just after it. E.g.: +"contains=a.*b,axb". Give an error message for it. + +When yanking a Visual area and using the middle mouse button -> crash. When +clipboard doesn't work, now make "* always use "". + +Win32: Using ":buf a\ b\file" didn't work, it was interpreted as "ab\file". + +Using ":ts ident", then hit <CR>, with 'cmdheight' set to 2: command line was +not cleared, the tselect prompt was on the last but one line. + +mksession didn't restore the cursor column properly when it was after a tab. +Could not get all windows back when using a smaller terminal screen. Didn't +restore all windows when "winsize" was not in 'sessionoptions'. (Webb) + +Command line completion for ":buffer" depended on 'ignorecase' for Unix, but +not for DOS et al. Now don't use 'ignorecase', but let it depend on whether +file names are case sensitive or not (like when expanding file names). + +Win32 GUI: (Negri) +- Redrawing the background caused flicker when resizing the window. Removed + _OnEraseBG(). Removed CS_HREDRAW and CS_VREDRAW flags from the + sndclass.style. +- Some parts of the window were drawn in grey, instead of using the color from + the user color scheme. +- Dropping a file on gvim didn't activate the window. +- When there is no menu ('guioptions' excludes 'm'), never use the ALT key for + it. + +GUI: When resizing the window, would make the window height a bit smaller. +Now round off to the nearest char cell size. (Negri) + +In Vi the ")" and "(" commands don't stop at a single space after a dot. +Added 'J' flag in 'cpoptions' to make this behave Vi compatible. (Roemer) + +When saving a session without any buffers loaded, there would be a ":normal" +command without arguments in it. (Webb) + +Memory leaks fixed: (Madsen) +- eval.c: forgot to release func structure when func deleted +- ex_docmd.c: forgot to release string after "<sfile>" +- misc1.c: leak when completion pattern had no matches. +- os_unix.c: forgot to release regexp after file completions + +Could crash when using a buffer without a name. (Madsen) +Could crash when doing file name completion, because of backslash_halve(). +(Madsen) + +":@a" would do mappings on register a, which is not Vi compatible. (Roemer) + +":g/foo.*()/s/foobar/_&/gc" worked fine, but then "n" searched for "foobar" +and displayed "/foo.*()". (Roemer) + +OS/2: get_cmd_output() was not included. Didn't check for $VIM/.vimrc file. + +Command line completion of options didn't work after "+=" and "-=". + +Unix configure: Test for memmove()/bcopy()/memcpy() tried redefining these +functions, which could fail if they are defined already. Use mch_memmove() to +redefine. + +Unix: ":let a = expand("`xterm`&")" started an xterm asynchronously, but +":let a = expand("`xterm&`")" generated an error message, because the +redirection was put after the '&'. + +Win32 GUI: Dialog buttons could not be selected properly with cursor keys, +when the default is not the first button. (Webb) + +The "File has changed since editing started" (when regaining focus) could not +always be seen. (Webb) + +When starting with "ex filename", the file message was overwritten with +the "entering Ex mode" message. + +Output of ":tselect" listed name of file directly from the tags file. Now it +is corrected for the position of the tags file. + +When 'backspace' is 0, could backspace over autoindent. Now it is no longer +allowed (Vi compatible). + +In Replace mode, when 'noexpandtab' and 'smarttab' were set, and inserting +Tabs, backspacing didn't work correctly for Tabs inserted at the start of the +line (unless 'sts' was set too). Also, when replacing the first non-blank +after which is a space, rounding the indent was done on the first non-blank +instead of on the character under the cursor. + +When 'sw' at 4, 'ts' at 8 and 'smarttab' set: When a tab was appended after +four spaces (they are replaced with a tab) couldn't backspace over the tab. + +In Insert mode, with 'bs' set to 0, couldn't backspace to before autoindent, +even when it was removed with CTRL-D. + +When repeating an insert command where a <BS>, <Left> or other key causes an +error, would flush buffers and remain in Insert mode. No longer flush +buffers, only beep and continue with the insert command. + +Dos and Win32 console: Setting t_me didn't work to get another color. Made +this works backwards compatible. + +For Turkish (LANG = "tr") uppercase 'i' is not an 'I'. Use ASCII uppercase +translation in vim_strup() to avoid language problems. (Komur) + +Unix: Use usleep() or nanosleep() for mch_delay() when available. Hopefully +this avoids a hangup in select(0, ..) for Solaris 2.6. + +Vim would crash when using a script file with 'let &sp = "| tee"', starting +vim with "vim -u test", then doing ":set sp=". The P_WAS_SET flag wasn't set +for a string option, could cause problems with any string option. + +When using "cmd | vim -", stdin is not a terminal. This gave problems with +GPM (Linux console mouse) and when executing external commands. Now close +stdin and re-open it as a copy of stderr. + +Syntax highlighting: A "nextgroup" item was not properly stored in the state +list. This caused missing of next groups when not redrawing from start to +end, but starting halfway. + +Didn't check for valid values of 'ttymouse'. + +When executing an external command from the GUI, waiting for the child to +terminate might not work, causing a hang. (Parmelan) + +"make uninstall" didn't delete the vimrc_example.vim and gvimrc_example.vim +files and the vimtutor. + +Win32: "expand("%:p:h")" with no buffer name removed the directory name. +"fnamemodify("", ":p")" did not add a trailing slash, fname_case() removed it. + +Fixed: When 'hlsearch' was set and the 'c' flag was not in 'cpoptions': +highlighting was not correct. Now overlapping matches are handled correctly. + +Athena, Motif and GTK GUI: When started without focus, cursor was shown as if +with focus. + +Don't include 'shellpipe' when compiled without quickfix, it's not used. +Don't include 'dictionary' option when compiled without the +insert_expand +feature. +Only include the 'shelltype' option for the Amiga. + +When making a change to a line, with 'hlsearch' on, causing it to wrap, while +executing a register, the screen would not be updated correctly. This was a +generic problem in update_screenline() being called while must_redraw is +VALID. + +Using ":bdelete" in a BufUnload autocommand could cause a crash. The window +height was added to another window twice in close_window(). + +Win32 GUI: When removing a menu item, the tearoff wasn't updated. (Negri) + +Some performance bottlenecks removed. Allocating memory was not efficient. +For Win32 checking for available memory was slow, don't check it every time +now. On NT obtaining the user name takes a long time, cache the result (for +all systems). + +fnamemodify() with an argument ":~:." or ":.:~" didn't work properly. + +When editing a new file and exiting, the marks for the buffer were not saved +in the viminfo file. + +":confirm only" didn't put up a dialog. + +These text objects didn't work when 'selection' was "exclusive": va( vi( va{ +vi{ va< vi< vi[ va[. + +The dialog for writing a readonly file didn't have a valid default. (Negri) + +The line number used for error messages when sourcing a file was reset when +modelines were inspected. It was wrong when executing a function. + +The file name and line number for an error message wasn't displayed when it +was the same as for the last error, even when this was long ago. Now reset +the name/lnum after a hit-enter prompt. + +In a session file, a "%" in a file name caused trouble, because fprintf() was +used to write it to the file. + +When skipping statements, a mark in an address wasn't skipped correctly: +"ka|if 0|'ad|else|echo|endif". (Roemer) + +":wall" could overwrite a not-edited file without asking. + +GUI: When $DISPLAY was not set or starting the GUI failed in another way, the +console mode then started with wrong colors and skipped initializations. Now +do an early check if the GUI can be started. Don't source the menu.vim or +gvimrc when it will not. Also do normal terminal initializations if the GUI +might not start. + +When using a BufEnter autocommand to position the cursor and scroll the +window, the cursor was always put at the last used line and halfway the window +anyhow. + +When 'wildmode' was set to "longest,list:full", ":e *.c<Tab><Tab>" didn't list +the matches. Also avoid that listing after a "longest" lists the wrong +matches when the first expansion changed the string in front of the cursor. + +When using ":insert", ":append" or ":change" inside a while loop, was not able +to break out of it with a CTRL-C. + +Win32: ":e ." took an awful long time before an error message when used in +"C:\". Was caused by adding another backslash and then trying to get the full +name for "C:\\". + +":winpos -10 100" was working like ":winpos -10 -10", because a pointer was +not advanced past the '-' sign. + +When obtaining the value of a hidden option, would give an error message. Now +just use a zero value. + +OS/2: Was using argv[0], even though it was not a useful name. It could be +just "vim", found in the search path. + +Xterm: ":set columns=78" didn't redraw properly (when lines wrap/unwrap) until +after a delay of 'updatetime'. Didn't check for the size-changed signal. + +'scrollbind' didn't work in Insert mode. +Horizontal scrollbinding didn't always work for "0" and "$" commands (e.g., +when 'showcmd' was off). + +When compiled with minimal features but with GUI, switching on the mouse in an +xterm caused garbage, because the mouse codes were not recognized. Don't +enable the mouse when it can't be recognized. In the GUI it also didn't work, +the arguments to the mouse code were not interpreted. + +When 'showbreak' used, in Insert mode, when the cursor is just after the last +character in the line, which is also the in the rightmost column, the cursor +position would be like the 'showbreak' string is shown, but it wasn't. + +Autocommands could move the cursor in a new file, so that CTRL-W i didn't show +the right line. Same for when using a filemark to jump to another file. + +When redefining the argument list, the title used for other windows could be +showing the wrong info about the position in the argument list. Also update +this for a ":split" command without arguments. + +When editing file 97 of 13, ":Next" didn't work. Now it goes to the last +file in the argument list. + +Insert mode completion (for dictionaries or included files) could not be +interrupted by typing an <Esc>. Could get hit-enter prompt after line +completion, or whenever the informative message would get too long. + +When using the ":edit" command to re-edit the same file, an autocommand to +jump to the last cursor position caused the cursor to move. Now set the last +used cursor position to avoid this. + +When 'comments' has a part that starts with white space, formatting the +comment didn't work. + +At the ":tselect" prompt Normal mode mappings were used. That has been +disabled. + +When 'selection' is not "old", some commands still didn't allow the cursor +past the end-of-line in Visual mode. + +Athena: When a menu was deleted, it would appear again (but not functional) +when adding another menu. Now they don't reappear anymore (although they are +not really deleted either). + +Borland C++ 4.x had an optimizer problem in fill_breakat_flags(). (Negri) + +"ze" didn't work when 'number' was on. (Davis) + +Win32 GUI: Intellimouse code didn't work properly on Windows 98. (Robinson) + +A few files were including proto.h a second time, after vim.h had already done +that, which could cause problems with the vim_realloc() macro. + +Win32 console: <M-x> or ALT-x was not recognized. Also keypad '+', '-' and +'*'. (Negri) +MS-DOS: <M-x> didn't work, produced a two-byte code. Now the alphabetic and +number keys work. (Negri) + +When finding a lot of matches for a tag completion, the check for avoiding +double matches could take a lot of time. Add a line_breakcheck() to be able +to interrupt this. (Deshpande) + +When the command line was getting longer than the screen, the more-prompt +would be given regularly, and the cursor position would be wrong. Now only +show the part of the command line that fits on the screen and force the cursor +to be positioned on the visible part. There can be text after the cursor +which isn't editable. + +At the more prompt and with the console dialog, a cursor key was interpreted +as <Esc> and OA. Now recognize special keys in get_keystroke(). Ignore mouse +and scrollbar events. + +When typing a BS after inserting a middle comment leader, typing the last char +of the end comment leader still changed it into the end comment leader. (Webb) + +When a file system is full, writing to a swap file failed. Now first try to +write one block to the file. Try next entry in 'dir' if it fails. + +When "~" is in 'whichwrap', doing "~" on last char of a line didn't update the +display. + +Unix: Expanding wildcards for ":file {\\}" didn't work, because "\}" was +translated to "}" before the shell got it. Now don't remove backslashes when +wildcards are going to be expanded. + +Unix: ":e /tmp/$uid" didn't work. When expanding environment variables in a +file name doesn't work, use the shell to expand the file name. ":e /tmp/$tty" +still doesn't work though. + +"make test" didn't always work on DOS/Windows for test30, because it depended +on the external "echo" command. + +The link.sh script used "make" instead of $MAKE from the Makefile. Caused +problems for generating pathdef.c when "make" doesn't work properly. + +On versions that can do console and GUI: In the console a typed CSI code could +cause trouble. + +The patterns in expression evaluation didn't ignore the 'l' flag in +'cpoptions'. This broke the working of <CR> in the options window. + +When 'hls' off and 'ai' on, "O<Esc>" did remove the indent, but it was still +highlighted red for trailing space. + +Win32 GUI: Dropping an encrypted file on a running gvim didn't work right. Vim +would loop while outputting "*" characters. vgetc() was called recursively, +thus it returns NUL. Added safe_vgetc(), which reads input directly from the +user in this situation. + +While reading text from stdin, only an empty screen was shown. Now show that +Vim is reading from stdin. + +The cursor shape wasn't set properly when returning to Insert mode, after +using a CTRL-O /asdf command which fails. It would be OK after a few seconds. +Now it's OK right away. + +The 'isfname' default for DOS/Windows didn't include the '@' character. File +names that contained "dir\@file" could not be edited. + +Win32 console: <C-S-Left> could cause a crash when compiled with Borland or +egcs. (Aaron) + +Unix and VMS: "#if HAVE_DIRENT_H" caused problems for some compilers. Use +"#ifdef HAVE_DIRENT_H" instead. (Jones) + +When a matching tag is in the current file but has a search pattern that +doesn't match, the cursor would jump to the first line. + +Unix: Dependencies for pty.c were not included in Makefile. Dependency of +ctags/config.h was not included (only matters for parallel make). + +Removed a few Uninitialized Memory Reads (potential crashes). In do_call() +calling clear_var() when not evaluating. In win32_expandpath() and +dos_expandpath() calling backslash_halve() past the end of a file name. + +Removed memory leaks: Set_vim_var_string() never freed the value. The +next_list for a syntax keyword was never freed. + +On non-Unix systems, using a file name with wildcards without a match would +silently fail. E.g., ":e *.sh". Now give a "No match" error message. + +The life/life.mac, urm/urm.mac and hanoi/hanoi.mac files were not recognized +as Vim scripts. Renamed them to *.vim. + +[Note: some numbered patches are not relevant when upgrading from version 5.3, +they have been removed] + +Patch 5.4m.1 +Problem: When editing a file with a long name, would get the hit-enter + prompt, even though all settings are such that the name should be + truncated to avoid that. filemess() was printing the file name + without truncating it. +Solution: Truncate the message in filemess(). Use the same code as for + msg_trunc_attr(), which is moved to the new function + msg_may_trunc(). +Files: src/message.c, src/proto/message.pro, src/fileio.c + +Patch 5.4m.3 +Problem: The Motif libraries were not found by configure for Digital Unix. +Solution: Add "/usr/shlib" to the search path. (Andy Kahn) +Files: src/configure.in, src/configure + +Patch 5.4m.5 +Problem: Win32 GUI: When using the Save-As menu entry and selecting an + existing file in the file browser, would get a dialog to confirm + overwriting twice. (Ed Krall) +Solution: Removed the dialog from the file browser. It would be nicer to + set the "forceit" flag and skip Vim's ":confirm" dialog, but it + requires quite a few changes to do that. +Files: src/gui_w32.c + +Patch 5.4m.6 +Problem: Win32 GUI: When reading text from stdin, e.g., "cat foo | gvim -", + a message box would pop up with "-stdin-" (when exiting). (Michael + Schaap) +Solution: Don't switch off termcap mode for versions that are GUI-only. + They use another terminal to read from stdin. +Files: src/main.c, src/fileio.c + +Patch 5.4m.7 +Problem: Unix: running configure with --enable-gtk-check, + --enable-motif-check, --enable-athena-check or --enable-gtktest + had the reverse effect. (Thomas Koehler) +Solution: Use $enable_gtk_check variable correctly in AC_ARG_ENABLE(). +Files: src/configure.in, src/configure + +Patch 5.4m.9 +Problem: Multi-byte: With wrapping lines, the cursor was sometimes 2 + characters to the left. Syntax highlighting was wrong when a + double-byte character was split for a wrapping line. When + 'showbreak' was on the splitting also didn't work. +Solution: Adjust getvcol() and win_line(). (Chong-Dae Park) +Files: src/charset.c, src/screen.c + +Patch 5.4m.11 +Problem: The ":call" command didn't check for illegal trailing characters. + (Stefan Roemer) +Solution: Add the check in do_call(). +Files: src/eval.c + +Patch 5.4m.13 +Problem: With the ":s" command: + 1. When performing a substitute command, the mouse would be + disabled and enabled for every substitution. + 2. The cursor position could be beyond the end of the line. + Calling line_breakcheck() could try to position the cursor, + which causes a crash in the Win32 GUI. + 3. When using ":s" in a ":g" command, the cursor was not put on + the first non-white in the line. + 4. There was a hit-enter prompt when confirming the substitution + and the replacement was a bit longer. +Solution: 1. Only disable/enable the mouse when asking for confirmation. + 2. Always put the cursor on the first character, it is going to be + moved to the first non-blank anyway. + Don't use the cursor position in gui_mch_draw_hollow_cursor(), + get the character from the screen buffer. + 3. Added global_need_beginline flag to call beginline() after ":g" + has finished all substitutions. + 4. Clear the need_wait_return flag after prompting the user. +Files: src/ex_cmds.c, src/gui_w32.c + +Patch 5.4m.14 +Problem: When doing "vim xxx", ":opt", ":only" and then ":e xxx" we end + up with two swapfiles for "xxx". That is caused by the ":bdel" + command which is executed when unloading the option-window. + Also, there was no check if closing a buffer made the new one + invalid, this could cause a crash. +Solution: When closing a buffer causes the current buffer to be deleted, + use the new buffer to replace it. Also detect that the new buffer + has become invalid as a side effect of closing the current one. + Make autocommand that calls ":bdel" in optwin.vim nested, so that + the buffer loading it triggers also executes autocommands. + Also added a test for this in test13. +Files: runtime/optwin.vim, src/buffer.c, src/ex_cmds.c, src/globals.h + src/testdir/test13.in, src/testdir/test13.ok + +Patch 5.4m.15 +Problem: When using a BufEnter autocommand to reload the syntax file, + conversion to HTML caused a crash. (Sung-Hyun Nam) +Solution: When using ":syntax clear" the current stack of syntax items was + not cleared. This will cause memory to be used that has already + been freed. Added call to invalidate_current_state() in + syntax_clear(). +Files: src/syntax.c + +Patch 5.4m.17 +Problem: When omitting a ')' in an expression it would not be seen as a + failure. + When detecting an error inside (), there would be an error message + for a missing ')' too. + When using ":echo 1+|echo 2" there was no error message. (Roemer) + When using ":exe 1+" there was no error message. + When using ":return 1+" there was no error message. +Solution: Fix do_echo(), do_execute() and do_return() to give an error + message when eval1() returns FAIL. + Fix eval6() to handle trailing ')' correctly and return FAIL when + it's missing. +Files: src/eval.c + +Patch 5.4m.18 +Problem: When using input() from inside an expression entered with + "CTRL-R =" on the command line, there could be a crash. And the + resulting command line was wrong. +Solution: Added getcmdline_prompt(), which handles recursive use of + getcmdline() correctly. It also sets the command line prompt. + Removed cmdline_prompt(). Also use getcmdline_prompt() for + getting the crypt key in get_crypt_key(). +Files: src/proto/ex_getln.pro, src/ex_getln.c, src/eval.c, src/misc2.c + +Patch 5.4m.21 +Problem: When starting up, the screen structures were first allocated at + the minimal size, then initializations were done with Rows + possibly different from screen_Rows. Caused a crash in rare + situations (GTK with XIM and fontset). +Solution: Call screenalloc() in main() only after calling ui_get_winsize(). + Also avoids a potential delay because of calling screenclear() + while "starting" is non-zero. +Files: src/main.c + +Patch 5.4m.22 +Problem: In the GUI it was possible that the screen was resized and the + screen structures re-allocated while redrawing the screen. This + could cause a crash (hard to reproduce). The call sequence goes + through update_screen() .. syntax_start() .. ui_breakcheck() .. + gui_resize_window() .. screenalloc(). +Solution: Set updating_screen while redrawing. If the window is resized + remember the new size and handle it only after redrawing is + finished. + This also fixes that resizing the screen while still redrawing + (slow syntax highlighting) would not work properly. + Also disable display_hint, it was never used. +Files: src/globals.h, src/gui.c, src/screen.c, src/proto/gui.pro + +Patch 5.4m.23 +Problem: When using expand("<cword>") when there was no word under the + cursor, would get an error message. Same for <cWORD> and <cfile>. +Solution: Don't give an error message, return an empty string. +Files: src/eval.c + +Patch 5.4m.24 +Problem: ":help \|" didn't find anything. It was translated to "/\\|". +Solution: Translate "\|" into "\\bar". First check the table for specific + translations before checking for "\x". +Files: src/ex_cmds.c + +Patch 5.4m.25 +Problem: Unix: When using command line completion on files that contain + ''', '"' or '|' the file name could not be used. + Adding this file name to the Buffers menu caused an error message. +Solution: Insert a backslash before these three characters. + Adjust Mungename() function to insert a backslash before '|'. +Files: src/ex_getln.c, runtime/menu.vim + +Patch 5.4m.26 +Problem: When using a mapping of two function keys, e.g., <F1><F1>, and + only the first char of the second key has been read, the mapping + would not be recognized. Noticed on some Unix systems with xterm. +Solution: Add 'K' flag to 'cpoptions' to wait for the whole key code, even + when halfway a mapping. +Files: src/option.h, src/term.c + +Patch 5.4m.27 +Problem: When making test33 without the lisp feature it hangs. Interrupting + the execution of the script then might cause a crash. +Solution: In inchar(), after closing a script, don't use buf[] anymore. + closescript() has freed typebuf[] and buf[] might be pointing + inside typebuf[]. + Avoid that test33 hangs when the lisp feature is missing. +Files: src/getchar.c src/testdir/test33.in + +"os2" was missing from the feature list. Useful for has("os2"). + +BeOS: +- Included patches from Richard Offer for BeOS R4.5. +- menu code didn't work right. Crashed in the Buffers menu. The window title + wasn't set. (Offer) + +Patch 5.4n.3 +Problem: C-indenting was wrong after " } else". The white space was not + skipped. Visible when 'cino' has "+10". +Solution: Skip white space before calling cin_iselse(). (Norbert Zeh) +Files: src/misc1.c + +Patch 5.4n.4 +Problem: When the 't' flag in 'cpoptions' is included, after a + ":nohlsearch" the search highlighting would not be enabled again + after a tag search. (Norbert Zeh) +Solution: When setting the new search pattern in jumpto_tag(), don't restore + no_hlsearch. +Files: src/tag.c + +Patch 5.4n.5 +Problem: When using ":normal" from a CursorHold autocommand Vim hangs. The + autocommand is executed down from vgetc(). Calling vgetc() + recursively to execute the command doesn't work then. +Solution: Forbid the use of ":normal" when vgetc_busy is set. Give an error + message when this happens. +Files: src/ex_docmd.c, runtime/doc/autocmd.txt + +Patch 5.4n.6 +Problem: "gv" could reselect a Visual that starts and/or ends past the end + of a line. (Robert Webb) +Solution: Check that the start and end of the Visual area are on a valid + character by calling adjust_cursor(). +Files: src/normal.c + +Patch 5.4n.8 +Problem: When a mark was on a non existing line (e.g., when the .viminfo + was edited), jumping to it caused ml_get errors. (Alexey + Marinichev). +Solution: Added check_cursor_lnum() in nv_gomark(). +Files: src/normal.c + +Patch 5.4n.9 +Problem: ":-2" moved the cursor to a negative line number. (Ralf Schandl) +Solution: Give an error message for a negative line number. +Files: src/ex_docmd.c + +Patch 5.4n.10 +Problem: Win32 GUI: At the hit-enter prompt, it was possible to scroll the + text. This erased the prompt and made Vim look like it is in + Normal mode, while it is actually still waiting for a <CR>. +Solution: Disallow scrolling at the hit-enter prompt for systems that use + on the fly scrolling. +Files: src/message.c + +Patch 5.4n.14 +Problem: Win32 GUI: When using ":winsize 80 46" and the height is more than + what fits on the screen, the window size was made smaller than + asked for (that's OK) and Vim crashed (that's not OK)> +Solution: Call check_winsize() from gui_set_winsize() to resize the windows. +Files: src/gui.c + +Patch 5.4n.16 +Problem: Win32 GUI: The <F10> key both selected the menu and was handled as + a key hit. +Solution: Apply 'winaltkeys' to <F10>, like it is used for Alt keys. +Files: src/gui_w32.c + +Patch 5.4n.17 +Problem: Local buffer variables were freed when the buffer is unloaded. + That's not logical, since options are not freed. (Ron Aaron) +Solution: Free local buffer variables only when deleting the buffer. +Files: src/buffer.c + +Patch 5.4n.19 +Problem: Doing ":e" (without argument) in an option-window causes trouble. + The mappings for <CR> and <Space> are not removed. When there is + another buffer loaded, the swap file for it gets mixed up. + (Steve Mueller) +Solution: Also remove the mappings at the BufUnload event, if they are still + present. + When re-editing the same file causes the current buffer to be + deleted, don't try editing it. + Also added a test for this situation. +Files: runtime/optwin.vim, src/ex_cmds.c, src/testdir/test13.in, + src/testdir/test13.ok + +Patch 5.4n.24 +Problem: BeOS: configure never enabled the GUI, because $with_x was "no". + Unix prototypes caused problems, because Display and Widget are + undefined. + Freeing fonts on exit caused a crash. +Solution: Only disable the GUI when $with_x is "no" and $BEOS is not "yes". + Add dummy defines for Display and Widget in proto.h. + Don't free the fonts in gui_exit() for BeOS. +Files: src/configure.in, src/configure, src/proto.h, src/gui.c. + + +The runtime/vim48x48.xpm icon didn't have a transparent background. (Schild) + +Some versions of the mingw32/egcs compiler didn't have WINBASEAPI defined. +(Aaron) + +VMS: +- mch_setenv() had two arguments instead of three. +- The system vimrc and gvimrc files were called ".vimrc" and ".gvimrc". + Removed the dot. +- call to RealWaitForChar() had one argument too many. (Campbell) +- WaitForChar() is static, removed the prototype from proto/os_vms.pro. +- Many file accesses failed, because Unix style file names were used. + Translate file names to VMS style by using vim_fopen(). +- Filtering didn't work, because the temporary file name was generated wrong. +- There was an extra newline every 9192 characters when writing a file. Work + around it by writing line by line. (Campbell) +- os_vms.c contained "# typedef int DESC". Should be "typedef int DESC;". + Only mattered for generating prototypes. +- Added file name translation to many places. Made easy by defining macros + mch_access(), mch_fopen(), mch_fstat(), mch_lstat() and mch_stat(). +- Set default for 'tagbsearch' to off, because binary tag searching apparently + doesn't work for VMS. +- make mch_get_host_name() work with /dec and /standard=vaxc. (Campbell) + + +Patch 5.4o.2 +Problem: Crash when using "gf" on "file.c://comment here". (Scott Graham) +Solution: Fix wrong use of pointers in get_file_name_in_path(). +Files: src/window.c + +Patch 5.4o.3 +Problem: The horizontal scrollbar was not sized correctly when 'number' is + set and 'wrap' not set. + Athena: Horizontal scrollbar wasn't updated when the cursor was + positioned with a mouse click just after dragging. +Solution: Subtract 8 from the size when 'number' set and 'wrap' not set. + Reset gui.dragged_sb when a mouse click is received. +Files: src/gui.c + +Patch 5.4o.4 +Problem: When running in an xterm and $WINDOWID is set to an illegal value, + Vim would exit with "Vim: Got X error". +Solution: When using the display which was opened for the xterm clipboard, + check if x11_window is valid by trying to obtain the window title. + Also add a check in setup_xterm_clip(), for when using X calls to + get the pointer position in an xterm. +Files: src/os_unix.c + +Patch 5.4o.5 +Problem: Motif version with Lesstif: When removing the menubar and then + using a menu shortcut key, Vim would crash. (raf) +Solution: Disable the menu mnemonics when the menu bar is removed. +Files: src/gui_motif.c + +Patch 5.4o.9 +Problem: The DOS install.exe program used the "move" program. That doesn't + work on Windows NT, where "move" is internal to cmd.exe. +Solution: Don't use an external program for moving the executables. Use C + functions to copy the file and delete the original. +Files: src/dosinst.c + +Motif and Athena obtained the status area height differently from GTK. Moved +status_area_enabled from global.h to gui_x11.c and call +xim_get_status_area_height() to get the status area height. + +Patch 5.4p.1 +Problem: When using auto-select, and the "gv" command is used, would not + always obtain ownership of the selection. Caused by the Visual + area still being the same, but ownership taken away by another + program. +Solution: Reset the clipboard Visual mode to force updating the selection. +Files: src/normal.c + +Patch 5.4p.2 +Problem: Motif and Athena with XIM: Typing 3-byte + <multibyte><multibyte><space> doesn't work correctly with Ami XIM. +Solution: Avoid using key_sym XK_VoidSymbol. (Nam) +Files: src/multbyte.c, src/gui_x11.c + +Patch 5.4p.4 +Problem: Win32 GUI: The scrollbar values were reduced for a file with more + than 32767 lines. But this info was kept global for all + scrollbars, causing a mixup between the windows. + Using the down arrow of a scrollbar in a large file didn't work. + Because of round-off errors there is no scroll at all. +Solution: Give each scrollbar its own scroll_shift field. When the down + arrow is used, scroll several lines. +Files: src/gui.h, src/gui_w32.c + +Patch 5.4p.5 +Problem: When changing buffers in a BufDelete autocommand, there could be + ml_line errors and/or a crash. (Schandl) Was caused by deleting + the current buffer. +Solution: When the buffer to be deleted unexpectedly becomes the current + buffer, don't delete it. + Also added a check for this in test13. +Files: src/buffer.c, src/testdir/test13.in, src/testdir/test13.ok + +Patch 5.4p.7 +Problem: Win32 GUI: When using 'mousemodel' set to "popup_setpos" and + clicking the right mouse button outside of the selected area, the + selected area wasn't removed until the popup menu has gone. + (Aaron) +Solution: Set the cursor and update the display before showing the popup + menu. +Files: src/normal.c + +Patch 5.4p.8 +Problem: The generated bugreport didn't contain information about + $VIMRUNTIME and whether runtime files actually exist. +Solution: Added a few checks to the bugreport script. +Files: runtime/bugreport.vim + +Patch 5.4p.9 +Problem: The windows install.exe created a wrong entry in the popup menu. + The "%1" was "". The full directory was included, even when the + executable had been moved elsewhere. (Ott) +Solution: Double the '%' to get one from printf. Only include the path to + gvim.exe when it wasn't moved and it's not in $PATH. +Files: src/dosinst.c + +Patch 5.4p.10 +Problem: Win32: On top of 5.4p.9: The "Edit with Vim" entry sometimes used + a short file name for a directory. +Solution: Change the "%1" to "%L" in the registry entry. +Files: src/dosinst.c + +Patch 5.4p.11 +Problem: Motif, Athena and GTK: When closing the GUI window when there is a + changed buffer, there was only an error message and Vim would not + exit. +Solution: Put up a dialog, like for ":confirm qa". Uses the code that was + already used for MS-Windows. +Files: src/gui.c, src/gui_w32.c + +Patch 5.4p.12 +Problem: Win32: Trying to expand a string that is longer than 256 + characters could cause a crash. (Steed) +Solution: For the buffer in win32_expandpath() don't use a fixed size array, + allocate it. +Files: src/os_win32.c + +MSDOS: Added "-Wall" to Makefile.djg compile flags. Function prototypes for +fname_case() and mch_update_cursor() were missing. "fd" was unused in +mf_sync(). "puiLocation" was unused in myputch(). "newcmd" unused in +mch_call_shell() for DJGPP version. + +============================================================================== +VERSION 5.5 *version-5.5* + +Version 5.5 is a bug-fix version of 5.4. + + +Changed *changed-5.5* +------- + +The DJGPP version is now compiled with "-O2" instead of "-O4" to reduce the +size of the executables. + +Moved the src/STYLE file to runtime/doc/develop.txt. Added the design goals +to it. + +'backspace' is now a string option. See patch 5.4.15. + + +Added *added-5.5* +----- + +Included Exuberant Ctags version 3.3. (Darren Hiebert) + +In runtime/mswin.vim, map CTRL-Q to CTRL-V, so that CTRL-Q can be used +everywhere to do what CTRL-V used to do. + +Support for decompression of bzip2 files in vimrc_example.vim. + +When a patch is included, the patch number is entered in a table in version.c. +This allows skipping a patch without breaking a next one. + +Support for mouse scroll wheel in X11. See patch 5.5a.14. + +line2byte() can be used to get the size of the buffer. See patch 5.4.35. + +The CTRL-R CTRL-O r and CTRL-R CTRL-P r commands in Insert mode are used to +insert a register literally. See patch 5.4.48. + +Uninstall program for MS-Windows. To be able to remove the registry entries +for "Edit with Vim". It is registered to be run from the "Add/Remove +programs" application. See patch 5.4.x7. + + +Fixed *fixed-5.5* +----- + +When using vimrc_example.vim: An error message when the cursor is on a line +higher than the number of lines in the compressed file. Move the autocommand +for jumping to the last known cursor position to after the decompressing +autocommands. + +":mkexrc" and ":mksession" wrote the current value of 'textmode'. That may +mark a file as modified, which causes problems. This is a buffer-specific +setting, it should not affect all files. + +"vim --version" wrote two empty lines. + +Unix: The alarm signal could kill Vim. It is generated by the Perl alarm() +function. Ignore SIGALRM. + +Win32 GUI: Toolbar still had the yellow bitmap for running a Vim script. + +BeOS: "tmo" must be bigtime_t, instead of double. (Seibert) + +Patch 5.4.1 +Problem: Test11 fails when $GZIP is set to "-v". (Matthew Jackson) +Solution: Set $GZIP to an empty string. +Files: src/testdir/test11.in + +Patch 5.4.2 +Problem: Typing <Esc> at the crypt key prompt caused a crash. (Kallingal) +Solution: Check for a NULL pointer returned from get_crypt_key(). +Files: src/fileio.c + +Patch 5.4.3 +Problem: Python: Trying to use the name of an unnamed buffer caused a + crash. (Daniel Burrows) +Solution: Check for b_fname being a NULL pointer. +Files: src/if_python.c + +Patch 5.4.4 +Problem: Win32: When compiled without toolbar, but the 'T' flag is in + 'guioptions', there would be an empty space for the toolbar. +Solution: Add two #ifdefs where checking for the 'T' flag. (Vince Negri) +Files: src/gui.c + +Patch 5.4.5 +Problem: Athena GUI: Using the Buffers.Refresh menu entry caused a crash. + Looks like any ":unmenu" command may cause trouble. +Solution: Disallow ":unmenu" in the Athena version. Disable the Buffers + menu, because the Refresh item would not work. +Files: src/menu.c, runtime/menu.vim + +Patch 5.4.6 +Problem: GTK GUI: Using ":gui" in the .gvimrc file caused an error. Only + happens when the GUI forks. +Solution: Don't fork in a recursive call of gui_start(). +Files: src/gui.c + +Patch 5.4.7 +Problem: Typing 'q' at the more prompt for the ATTENTION message causes the + file loading to be interrupted. (Will Day) +Solution: Reset got_int after showing the ATTENTION message. +Files: src/memline.c + +Patch 5.4.8 +Problem: Edit some file, ":he", ":opt": options from help window are shown, + but pressing space updates from the other window. (Phillipps) + Also: When there are changes in the option-window, ":q!" gives an + error message. +Solution: Before creating the option-window, go to a non-help window. + Use ":bdel!" to delete the buffer. +Files: runtime/optwin.vim + +Patch 5.4.9 + Just updates version.h. The real patch has been moved to 5.4.x1. + This patch is just to keep the version number correct. + +Patch 5.4.10 +Problem: GTK GUI: When $DISPLAY is invalid, "gvim -f" just exits. It + should run in the terminal. +Solution: Use gtk_init_check() instead of gtk_init(). +Files: src/gui_gtk_x11.c + +Patch 5.4.11 +Problem: When using the 'S' flag in 'cpoptions', 'tabstop' is not copied to + the next buffer for some commands, e.g., ":buffer". +Solution: When the BCO_NOHELP flag is given to buf_copy_options(), still + copy the options used by do_help() when neither the "from" or "to" + buffer is a help buffer. +Files: src/option.c + +Patch 5.4.12 +Problem: When using 'smartindent', there would be no extra indent if the + current line did not have any indent already. (Hanus Adler) +Solution: There was a wrongly placed "else", that previously matched with + the "if" that set trunc_line. Removed the "else" and added a + check for trunc_line to be false. +Files: src/misc1.c + +Patch 5.4.13 +Problem: New SGI C compilers need another option for optimisation. +Solution: Add a check in configure for "-OPT:Olimit". (Chin A Young) +Files: src/configure.in, src/configure + +Patch 5.4.14 +Problem: Motif GUI: When the popup menu is present, a tiny window appears + on the desktop for some users. +Solution: Set the menu widget ID for a popup menu to 0. (Thomas Koehler) +Files: src/gui_motif.c + +Patch 5.4.15 +Problem: Since 'backspace' set to 0 has been made Vi compatible, it is no + longer possible to only allow deleting autoindent. +Solution: Make 'backspace' a list of parts, to allow each kind of + backspacing separately. +Files: src/edit.c, src/option.c, src/option.h, src/proto/option.pro, + runtime/doc/option.txt, runtime/doc/insert.txt + +Patch 5.4.16 +Problem: Multibyte: Locale zh_TW.Big5 was not checked for in configure. +Solution: Add zh_TW.Big5 to configure check. (Chih-Tsun Huang) +Files: src/configure.in, src/configure + +Patch 5.4.17 +Problem: GUI: When started from inside gvim with ":!gvim", Vim would not + start. ":!gvim -f" works fine. +Solution: After forking, wait a moment in the parent process, to give the + child a chance to set its process group. +Files: src/gui.c + +Patch 5.4.18 +Problem: Python: The clear_history() function also exists in a library. +Solution: Rename clear_history() to clear_hist(). +Files: src/ex_getln.c, src/eval.c, src/proto/ex_getln.pro + +Patch 5.4.19 +Problem: In a terminal with 25 lines, there is a more prompt after the + ATTENTION message. When hitting 'q' here the dialog prompt + doesn't appear and file loading is interrupted. (Will Day) +Solution: Don't allow quitting the printing of a message for the dialog + prompt. Added the msg_noquit_more flag for this. +Files: src/message.c + +Patch 5.4.20 +Problem: GTK: When starting gvim, would send escape sequences to the + terminal to switch the cursor off and on. +Solution: Don't call msg_start() if the GUI is expected to start. +Files: src/main.c + +Patch 5.4.21 +Problem: Motif: Toplevel menu ordering was wrong when using tear-off items. +Solution: Don't add one to the index for a toplevel menu. +Files: src/gui_motif.c + +Patch 5.4.22 +Problem: In Insert mode, <C-Left>, <S-Left>, <C-Right> and <S-Right> didn't + update the column used for vertical movement. +Solution: Set curwin->w_set_curswant for those commands. +Files: src/edit.c + +Patch 5.4.23 +Problem: When a Visual selection is lost to another program, and then the + same text is Visually selected again, the clipboard ownership + wasn't regained. +Solution: Set clipboard.vmode to NUL to force regaining the clipboard. +Files: src/normal.c + +Patch 5.4.24 +Problem: Encryption: When using ":r file" while 'key' has already entered, + the 'key' option would be messed up. When writing the file it + would be encrypted with an unknown key and lost! (Brad Despres) +Solution: Don't free cryptkey when it is equal to the 'key' option. +Files: src/fileio.c + +Patch 5.4.25 +Problem: When 'cindent' is set, but 'autoindent' isn't, comments are not + properly indented when starting a new line. (Mitterand) +Solution: When there is a comment leader for the new line, but 'autoindent' + isn't set, do C-indenting. +Files: src/misc1.c + +Patch 5.4.26 +Problem: Multi-byte: a multi-byte character is never recognized in a file + name, causing a backslash before it to be removed on Windows. +Solution: Assume that a leading-byte character is a file name character in + vim_isfilec(). +Files: src/charset.c + +Patch 5.4.27 +Problem: Entries in the PopUp[nvic] menus were added for several modes, but + only deleted for the mode they were used for. This resulted in + the entry remaining in the PopUp menu. + When removing a PopUp[nvic] menu, the name had been truncated, + could result in greying-out the whole PopUp menu. +Solution: Remove entries for all modes from the PopUp[nvic] menus. Remove + the PopUp[nvic] menu entries first, before the name is changed. +Files: src/menu.c + +Patch 5.4.28 +Problem: When using a BufWritePre autocommand to change 'fileformat', the + new value would not be used for writing the file. +Solution: Check 'fileformat' after executing the autocommands instead of + before. +Files: src/fileio.c + +Patch 5.4.29 +Problem: Athena GUI: When removing the 'g' flag from 'guioptions', using a + menu can result in a crash. +Solution: Always grey-out menus for Athena, don't hide them. +Files: src/menu.c + +Patch 5.4.30 +Problem: BeOS: Suspending Vim with CTRL-Z didn't work (killed Vim). The + first character typed after ":sh" goes to Vim, instead of the + started shell. +Solution: Don't suspend Vim, start a new shell. Kill the async read thread + when starting a new shell. It will be restarted later. (Will Day) +Files: src/os_unix.c, src/ui.c + +Patch 5.4.31 +Problem: GUI: When 'mousefocus' is set, moving the mouse over where a + window boundary was, causes a hit-enter prompt to be finished. + (Jeff Walker) +Solution: Don't use 'mousefocus' at the hit-enter prompt. Also ignore it + for the more prompt and a few other situations. When an operator + is pending, abort it first. +Files: src/gui.c + +Patch 5.4.32 +Problem: Unix: $LDFLAGS was not passed to configure. +Solution: Pass $LDFLAGS to configure just like $CFLAGS. (Jon Miner) +Files: src/Makefile + +Patch 5.4.33 +Problem: Unix: After expanding an environment variable with the shell, the + next expansion would also use the shell, even though it is not + needed. +Solution: Reset "recursive" before returning from gen_expand_wildcards(). +Files: src/misc1.c + +Patch 5.4.34 (also see 5.4.x5) +Problem: When editing a file, and the file name is relative to a directory + above the current directory, the file name was made absolute. + (Gregory Margo) +Solution: Add an argument to shorten_fnames() which indicates if all file + names should be shortened, or only absolute names. In main() only + use shorten_fnames() to shorten absolute names. +Files: src/ex_docmd.c, src/fileio.c, src/main.c, src/proto/fileio.pro + +Patch 5.4.35 +Problem: There is no function to get the current file size. +Solution: Allow using line2byte() with the number of lines in the file plus + one. This returns the offset of the line past the end of the + file, which is the file size plus one. +Files: src/eval.c, runtime/doc/eval.txt + +Patch 5.4.36 +Problem: Comparing strings while ignoring case didn't work correctly for + some machines. (Mide Steed) +Solution: vim_stricmp() and vim_strnicmp() only returned 0 or 1. Changed + them to return -1 when the first argument is smaller. +Files: src/misc2.c + +Patch 5.4.37 (also see 5.4.40 and 5.4.43) +Problem: Long strings from the viminfo file are truncated. +Solution: When writing a long string to the viminfo file, first write a line + with the length, then the string itself in a second line. +Files: src/eval.c, src/ex_cmds.c, src/ex_getln.c, src/mark.c, src/ops.c, + src/search.c, src/proto/ex_cmds.pro, runtime/syntax/viminfo.vim + +Patch 5.4.38 +Problem: In the option-window, ":set go&" resulted in 'go' being handled + like a boolean option. + Mappings for <Space> and <CR> were overruled by the option-window. +Solution: When the value of an option isn't 0 or 1, don't handle it like a + boolean option. + Save and restore mappings for <Space> and <CR> when entering and + leaving the option-window. +Files: runtime/optwin.vim + +Patch 5.4.39 +Problem: When setting a hidden option, spaces before the equal sign were + not skipped and cause an error message. E.g., ":set csprg =cmd". +Solution: When skipping over a hidden option, check for a following "=val" + and skip it too. +Files: src/option.c + +Patch 5.4.40 (depends on 5.4.37) +Problem: Compiler error for "atol(p + 1)". (Axel Kielhorn) +Solution: Add a typecast: "atol((char *)p + 1)". +Files: src/ex_cmds.c + +Patch 5.4.41 +Problem: Some commands that were not included would give an error message, + even when after "if 0". +Solution: Don't give an error message for an unsupported command when not + executing the command. +Files: src/ex_docmd.c + +Patch 5.4.42 +Problem: ":w" would also cause a truncated message to appear in the message + history. +Solution: Don't put a kept message in the message history when it starts + with "<". +Files: src/message.c + +Patch 5.4.43 (depends on 5.4.37) +Problem: Mixing long lines with multiple lines in a register causes errors + when writing the viminfo file. (Robinson) +Solution: When reading the viminfo file to skip register contents, skip + lines that start with "<". +Files: src/ops.c + +Patch 5.4.44 +Problem: When 'whichwrap' includes '~', a "~" command that goes on to the + next line cannot be properly undone. (Zellner) +Solution: Save each line for undo in n_swapchar(). +Files: src/normal.c + +Patch 5.4.45 (also see 5.4.x8) +Problem: When expand("$ASDF") fails, there is an error message. +Solution: Remove the global expand_interactively. Pass a flag down to skip + the error message. + Also: expand("$ASDF") returns an empty string if $ASDF isn't set. + Previously it returned "$ASDF" when 'shell' is "sh". + Also: system() doesn't print an error when the command returns an + error code. +Files: many + +Patch 5.4.46 +Problem: Backspacing did not always use 'softtabstop' after hitting <CR>, + inserting a register, moving the cursor, etc. +Solution: Reset inserted_space much more often in edit(). +Files: src/edit.c + +Patch 5.4.47 +Problem: When executing BufWritePre or BufWritePost autocommands for a + hidden buffer, the cursor could be moved to a non-existing + position. (Vince Negri) +Solution: Save and restore the cursor and topline for the current window + when it is going to be used to execute autocommands for a hidden + buffer. Use an existing window for the buffer when it's not + hidden. +Files: src/fileio.c + +Patch 5.4.48 +Problem: A paste with the mouse in Insert mode was not repeated exactly the + same with ".". For example, when 'autoindent' is set and pasting + text with leading indent. (Perry) +Solution: Add the CTRL-R CTRL-O r and CTRL-R CTRL-P r commands in Insert + mode, which insert the contents of a register literally. +Files: src/edit.c, src/normal.c, runtime/doc/insert.txt + +Patch 5.4.49 +Problem: When pasting text with [ <MiddleMouse>, the cursor could end up + after the last character of the line. +Solution: Correct the cursor position for the change in indent. +Files: src/ops.c + +Patch 5.4.x1 (note: Replaces patch 5.4.9) +Problem: Win32 GUI: menu hints were never used, because WANT_MENU is not + defined until vim.h is included. +Solution: Move the #ifdef WANT_MENU from where MENUHINTS is defined to where + it is used. +Files: src/gui_w32.c + +Patch 5.4.x2 +Problem: BeOS: When pasting text, one character was moved to the end. +Solution: Re-enable the BeOS code in fill_input_buf(), and fix timing out + with acquire_sem_etc(). (Will Day) +Files: src/os_beos.c, src/ui.c + +Patch 5.4.x3 +Problem: Win32 GUI: When dropping a directory on a running gvim it crashes. +Solution: Avoid using a NULL file name. Also display a message to indicate + that the current directory was changed. +Files: src/gui_w32.c + +Patch 5.4.x4 +Problem: Win32 GUI: Removing an item from the popup menu doesn't work. +Solution: Don't remove the item from the menubar, but from the parent popup + menu. +Files: src/gui_w32.c + +Patch 5.4.x5 (addition to 5.4.34) +Files: src/gui_w32.c + +Patch 5.4.x6 +Problem: Win32: Expanding (dir)name starting with a dot doesn't work. + (McCormack) Only when there is a path before it. +Solution: Fix the check, done before expansion, if the file name pattern + starts with a dot. +Files: src/os_win32.c + +Patch 5.4.x7 +Problem: Win32 GUI: Removing "Edit with Vim" from registry is difficult. +Solution: Add uninstall program to remove the registry keys. It is installed + in the "Add/Remove programs" list for ease of use. + Also: don't set $VIM when the executable is with the runtime files. + Also: Add a text file with a step-by-step description of how to + uninstall Vim for DOS and Windows. +Files: src/uninstal.c, src/dosinst.c, src/Makefile.w32, uninstal.txt + +Patch 5.4.x8 (addition to 5.4.45) +Files: many + +Patch 5.4.x9 +Problem: Win32 GUI: After executing an external command, focus is not + always regained (when using focus-follows-mouse). +Solution: Add SetFocus() in mch_system(). (Mike Steed) +Files: src/os_win32.c + + +Patch 5.5a.1 +Problem: ":let @* = @:" did not work. The text was not put on the + I clipboard. (Fisher) +Solution: Own the clipboard and put the text on it. +Files: src/ops.c + +Patch 5.5a.2 +Problem: append() did not mark the buffer modified. Marks below the + new line were not adjusted. +Solution: Fix the f_append() function. +Files: src/eval.c + +Patch 5.5a.3 +Problem: Editing compressed ".gz" files doesn't work on non-Unix systems, + because there is no "mv" command. +Solution: Add the rename() function and use it instead of ":!mv". + Also: Disable the automatic jump to the last position, because it + changes the jumplist. +Files: src/eval.c, runtime/doc/eval.txt, runtime/vimrc_example.vim + +Patch 5.5a.4 +Problem: When using whole-line completion in insert mode while the cursor + is in the indent, get "out of memory" error. (Stekrt) +Solution: Don't allocate a negative amount of memory in ins_complete(). +Files: src/edit.c + +Patch 5.5a.5 +Problem: Win32: The 'path' option can hold only up to 256 characters, + because _MAX_PATH is 256. (Robert Webb) +Solution: Use a fixed path length of 1024. +Files: src/os_win32.h + +Patch 5.5a.6 +Problem: Compiling with gcc on Win32, using the Unix Makefile, didn't work. +Solution: Add $(SUFFIX) to all places where an executable is used. Also + pass it to ctags. (Reynolds) +Files: src/Makefile + +Patch 5.5a.7 +Problem: When using "cat | vim -" in an xterm, the xterm version reply + would end up in the file. +Solution: Read the file from stdin before switching the terminal to RAW + mode. Should also avoid problems with programs that use a + specific terminal setting. + Also: when using the GUI, print "Reading from stdin..." in the GUI + window, to give a hint why it doesn't do anything. +Files: src/main.c, src/fileio.c + +Patch 5.5a.8 +Problem: On multi-threaded Solaris, suspending doesn't work. +Solution: Call pause() when the SIGCONT signal was not received after + sending the SIGTSTP signal. (Nagano) +Files: src/os_unix.c + +Patch 5.5a.9 +Problem: 'winaltkeys' could be set to an empty argument, which is illegal. +Solution: Give an error message when doing ":set winaltkeys=". +Files: src/option.c + +Patch 5.5a.10 +Problem: Win32 console: Using ALTGR on a German keyboard to produce "}" + doesn't work, because the 8th bit is set when ALT is pressed. +Solution: Don't set the 8th bit when ALT and CTRL are used. (Leipert) +Files: src/os_win32.c + +Patch 5.5a.11 +Problem: Tcl: Configure always uses tclsh8.0. + Also: Loading a library doesn't work. +Solution: Add "--with-tclsh" configure argument to allow specifying another + name for the tcl shell. + Call Tcl_Init() in tclinit() to make loading libraries work. + (Johannes Zellner) +Files: src/configure.in, src/configure, src/if_tcl.c + +Patch 5.5a.12 +Problem: The "user_commands" feature is called "user-commands". +Solution: Replace "user-commands" with "user_commands". (Kim Sung-bom) + Keep "user-commands" for the has() function, to remain backwards + compatible with 5.4. +Files: src/eval.c, src/version.c + +Patch 5.5a.13 +Problem: OS/2: When $HOME is not defined, "C:/" is used for the viminfo + file. That is very wrong when OS/2 is on another partition. +Solution: Use $VIM for the viminfo file when it is defined, like for MSDOS. + Also: Makefile.os2 didn't depend on os_unix.h. +Files: src/os_unix.h, src/Makefile.os2 + +Patch 5.5a.14 +Problem: Athena, Motif and GTK: The Mouse scroll wheel doesn't work. +Solution: Interpret a click of the wheel as a key press of the <MouseDown> + or <MouseUp> keys. Default behavior is to scroll three lines, or + a full page when Shift is used. +Files: src/edit.c, src/ex_getln.c, src/gui.c, src/gui_gtk_x11.c, + src/gui_x11.c, src/keymap.h, src/message.c, src/misc1.c, + src/misc2.c, src/normal.c, src/proto/normal.pro, src/vim.h, + runtime/doc/scroll.txt + +Patch 5.5a.15 +Problem: Using CTRL-A in Insert mode doesn't work correctly when the insert + started with the <Insert> key. (Andreas Rohrschneider) +Solution: Replace <Insert> with "i" before setting up the redo buffer. +Files: src/normal.c + +Patch 5.5a.16 +Problem: VMS: GUI does not compile and run. +Solution: Various fixes. (Zoltan Arpadffy) + Moved functions from os_unix.c to ui.c, so that VMS can use them + too: open_app_context(), x11_setup_atoms() and clip_x11* functions. + Made xterm_dpy global, it's now used by ui.c and os_unix.c. + Use gethostname() always, sys_hostname doesn't exist. +Files: src/globals.h, src/gui_x11.c, src/os_vms.mms, src/os_unix.c, + src/os_vms.c, src/ui.c, src/proto/os_unix.pro, src/proto/ui.pro + +Renamed AdjustCursorForMultiByteCharacter() to AdjustCursorForMultiByteChar() +to avoid symbol length limit of 31 characters. (Steve P. Wall) + +Patch 5.5b.1 +Problem: SASC complains about dead assignments and implicit type casts. +Solution: Removed the dead assignments. Added explicit type casts. +Files: src/buffer.c, src/edit.c, src/eval.c, src/ex_cmds.c, + src/ex_getln.c, src/fileio.c, src/getchar.c, src/memline.c, + src/menu.c, src/misc1.c, src/normal.c, src/ops.c, src/quickfix.c, + src/screen.c + +Patch 5.5b.2 +Problem: When using "CTRL-O O" in Insert mode, hit <Esc> and then "o" in + another line truncates that line. (Devin Weaver) +Solution: When using a command that starts Insert mode from CTRL-O, reset + "restart_edit" first. This avoids that edit() is called with a + mix of starting a new edit command and restarting a previous one. +Files: src/normal.c + +============================================================================== +VERSION 5.6 *version-5.6* + +Version 5.6 is a bug-fix version of 5.5. + + +Changed *changed-5.6* +------- + +Small changes to OleVim files. (Christian Schaller) + +Inserted "/**/" between patch numbers in src/version.c. This allows for one +line of context, which some versions of patch need. + +Reordered the Syntax menu to avoid long submenus. Removed keyboard shortcuts +for alphabetical items to avoid a clash with fixed items. + + +Added *added-5.6* +----- + +Included Exuberant Ctags version 3.4. (Darren Hiebert) + +OpenWithVim in Python. (Christian Schaller) + +Win32 GUI: gvimext.dll, for the context menu "Edit with Vim" entry. Avoids +the reported problems with the MS Office taskbar. Now it's a Shell Extension. +(Tianmiao Hu) + +New syntax files: +abel Abel (John Cook) +aml Arc Macro Language (Nikki Knuit) +apachestyle Apache-style config file (Christian Hammers) +cf Cold Fusion (Jeff Lanzarotta) +ctrlh files with CTRL-H sequences (Bram Moolenaar) +cupl CUPL (John Cook) +cuplsim CUPL simulation (John Cook) +erlang Erlang (Kresimir Marzic) +gedcom Gedcom (Paul Johnson) +icon Icon (Wendell Turner) +ist MakeIndex style (Peter Meszaros) +jsp Java Server Pages (Rafael Garcia-Suarez) +rcslog Rcslog (Joe Karthauser) +remind Remind (Davide Alberani) +sqr Structured Query Report Writer (Paul Moore) +tads TADS (Amir Karger) +texinfo Texinfo (Sandor Kopanyi) +xpm2 X Pixmap v2 (Steve Wall) + +The 'C' flag in 'cpoptions' can be used to switch off concatenation for +sourced lines. See patch 5.5.013 below. |line-continuation| + +"excludenl" argument for the ":syntax" command. See patch 5.5.032 below. +|:syn-excludenl| + +Implemented |z+| and |z^| commands. See patch 5.5.050 below. + +Vim logo in Corel Draw format. Can be scaled to any resolution. + + +Fixed *fixed-5.6* +----- + +Using this mapping in Select mode, terminated completion: +":vnoremap <C-N> <Esc>a<C-N>" (Benji Fisher) +Ignore K_SELECT in ins_compl_prep(). + +VMS (Zoltan Arpadffy, David Elins): +- ioctl() in pty.c caused trouble, #ifndef VMS added. +- Cut & paste mismatch corrected. +- Popup menu line crash corrected. (Patch 5.5.047) +- Motif directories during open and save as corrected. +- Handle full file names with version numbers. (Patch 5.5.046) +- Directory handling (CD command etc.) +- Corrected file name conversion VMS to Unix and v.v. +- Recovery was not working. +- Terminal and signal handling was outdated compared to os_unix.c. +- Improved os_vms.txt. + +Configure used fprintf() instead of printf() to check for __DATE__ and +__TIME__. (John Card II) + +BeOS: Adjust computing the char_height and char_ascent. Round them up +separately, avoids redrawing artifacts. (Mike Steed) + +Fix a few multi-byte problems in menu_name_skip(), set_reg_ic(), searchc() and +findmatchlimit(). (Taro Muraoka) + +GTK GUI: +- With GTK 1.2.5 and later the scrollbars were not redrawn correctly. +- Adjusted the gtk_form_draw() function. +- SNiFF connection didn't work. +- 'mousefocus' was not working. (Dalecki) +- Some keys were not working with modifiers: Shift-Tab, Ctrl-Space and CTRL-@. + + +Patch 5.5.001 +Problem: Configure in the top directory did not pass on an argument with a + space correctly. For example "./configure --previs="/My home". + (Stephane Chazelas) +Solution: Use '"$@"' instead of '$*' to pass on the arguments. +Files: configure + +Patch 5.5.002 +Problem: Compilation error for using "fds[] & POLLIN". (Jeff Walker) +Solution: Use "fds[].revents & POLLIN". +Files: src/os_unix.c + +Patch 5.5.003 +Problem: The autoconf check for sizeof(int) is wrong on machines where + sizeof(size_t) != sizeof(int). +Solution: Use our own configure check. Also fixes the warning for + cross-compiling. +Files: src/configure.in, src/configure + +Patch 5.5.004 +Problem: On Unix it's not possible to interrupt ":sleep 100". +Solution: Switch terminal to cooked mode while asleep, to allow a SIGINT to + wake us up. But switch off echo, added TMODE_SLEEP. +Files: src/term.h, src/os_unix.c + +Patch 5.5.005 +Problem: When using <f-args> with a user command, an empty argument to the + command resulted in one empty string, while no string was + expected. +Solution: Catch an empty argument and pass no argument to the function. + (Paul Moore) +Files: src/ex_docmd.c + +Patch 5.5.006 +Problem: Python: When platform-dependent files are in another directory + than the platform-independent files it doesn't work. +Solution: Also check the executable directory, and add it to CFLAGS. (Tessa + Lau) +Files: src/configure.in, src/configure + +Patch 5.5.007 (extra) +Problem: Win32 OLE: Occasional crash when exiting while still being used + via OLE. +Solution: Move OleUninitialize() to before deleting the application object. + (Vince Negri) +Files: src/if_ole.cpp + +Patch 5.5.008 +Problem: 10000@@ takes a long time and cannot be interrupted. +Solution: Check for CTRL-C typed while in the loop to push the register. +Files: src/normal.c + +Patch 5.5.009 +Problem: Recent Sequent machines don't link with "-linet". (Kurtis Rader) +Solution: Remove configure check for Sequent. +Files: src/configure.in, src/configure + +Patch 5.5.010 +Problem: Ctags freed a memory block twice when exiting. When out of + memory, a misleading error message was given. +Solution: Update to ctags 3.3.2. Also fixes a few other problems. (Darren + Hiebert) +Files: src/ctags/* + +Patch 5.5.011 +Problem: After "CTRL-V s", the cursor jumps back to the start, while all + other operators leave the cursor on the last changed character. + (Xiangjiang Ma) +Solution: Position cursor on last changed character, if possible. +Files: src/ops.c + +Patch 5.5.012 +Problem: Using CTRL-] in Visual mode doesn't work when the text includes a + space (just where it's useful). (Stefan Bittner) +Solution: Don't escape special characters in a tag name with a backslash. +Files: src/normal.c + +Patch 5.5.013 +Problem: The ":append" and ":insert" commands allow using a leading + backslash in a line. The ":source" command concatenates those + lines. (Heinlein) +Solution: Add the 'C' flag in 'cpoptions' to switch off concatenation. +Files: src/ex_docmd.c, src/option.h, runtime/doc/options.txt, + runtime/filetype.vim, runtime/scripts.vim + +Patch 5.5.014 +Problem: When executing a register with ":@", the ":append" command would + get text lines with a ':' prepended. (Heinlein) +Solution: Remove the ':' characters. +Files: src/ex_docmd.c, src/ex_getln.c, src/globals.h + +Patch 5.5.015 +Problem: When using ":g/pat/p", it's hard to see where the output starts, + the ":g" command is overwritten. Vi keeps the ":g" command. +Solution: Keep the ":g" command, but allow overwriting it with the report + for the number of changes. +Files: src/ex_cmds.c + +Patch 5.5.016 (extra) +Problem: Win32: Using regedit to install Vim in the popup menu requires the + user to confirm this in a dialog. +Solution: Use "regedit /s" to avoid the dialog +Files: src/dosinst.c + +Patch 5.5.017 +Problem: If an error occurs when closing the current window, Vim could get + stuck in the error handling. +Solution: Don't set curwin to NULL when closing the current window. +Files: src/window.c + +Patch 5.5.018 +Problem: Absolute paths in shell scripts do not always work. +Solution: Use /usr/bin/env to find out the path. +Files: runtime/doc/vim2html.pl, runtime/tools/efm_filter.pl, + runtime/tools/shtags.pl + +Patch 5.5.019 +Problem: A function call in 'statusline' stops using ":q" twice from + exiting, when the last argument hasn't been edited. +Solution: Don't decrement quitmore when executing a function. (Madsen) +Files: src/ex_docmd.c + +Patch 5.5.020 +Problem: When the output of CTRL-D completion in the commandline goes all + the way to the last column, there is an empty line. +Solution: Don't add a newline when the cursor wrapped already. (Madsen) +Files: src/ex_getln.c + +Patch 5.5.021 +Problem: When checking if a file name in the tags file is relative, + environment variables were not expanded. +Solution: Expand the file name before checking if it is relative. (Madsen) +Files: src/tag.c + +Patch 5.5.022 +Problem: When setting or resetting 'paste' the ruler wasn't updated. +Solution: Update the status lines when 'ruler' changes because of 'paste'. +Files: src/option.c + +Patch 5.5.023 +Problem: When editing a new file and autocommands change the cursor + position, the cursor was moved back to the first non-white, unless + 'startofline' was reset. +Solution: Keep the new column, just like the line number. +Files: src/ex_cmds.c + +Patch 5.5.024 (extra) +Problem: Win32 GUI: When using confirm() to put up a dialog without a + default button, the dialog would not have keyboard focus. + (Krishna) +Solution: Always set focus to the dialog window. Only set focus to a button + when a default one is specified. +Files: src/gui_w32.c + +Patch 5.5.025 +Problem: When using "keepend" in a syntax region, a contained match that + includes the end-of-line could still force that region to + continue, if there is another contained match in between. +Solution: Check the keepend_level in check_state_ends(). +Files: src/syntax.c + +Patch 5.5.026 +Problem: When starting Vim in a white-on-black xterm, with 'bg' set to + "dark", and then starting the GUI with ":gui", setting 'bg' to + "light" in the gvimrc, the highlighting isn't set. (Tsjokwing) +Solution: Set the highlighting when 'bg' is changed in the gvimrc, even + though full_screen isn't set. +Files: src/option.c + +Patch 5.5.027 +Problem: Unix: os_unix.c doesn't compile when XTERM_CLIP is used but + WANT_TITLE isn't. (Barnum) +Solution: Move a few functions that are used by the X11 title and clipboard + and put another "#if" around it. +Files: src/os_unix.c + +Patch 5.5.028 (extra) +Problem: Win32 GUI: When a file is dropped on Win32 gvim while at the ":" + prompt, the file is edited but the command line is actually still + there, the cursor goes back to command line on the next command. + (Krishna) +Solution: When dropping a file or directory on gvim while at the ":" prompt, + insert the name of the file/directory. Allows using the + file/directory name for any Ex command. +Files: src/gui_w32.c + +Patch 5.5.029 +Problem: "das" at the end of the file didn't delete the last character of + the sentence. +Solution: When there is no character after the sentence, make the operation + inclusive in current_sent(). +Files: src/search.c + +Patch 5.5.030 +Problem: Unix: in os_unix.c, "term_str" is used, which is also defined in + vim.h as a macro. (wuxin) +Solution: Renamed "term_str" to "buf" in do_xterm_trace(). +Files: src/os_unix.c + +Patch 5.5.031 (extra) +Problem: Win32 GUI: When exiting Windows, gvim will leave swap files behind + and will be killed ungracefully. (Krishna) +Solution: Catch the WM_QUERYENDSESSION and WM_ENDSESSION messages and try to + exit gracefully. Allow the user to cancel the shutdown if there + is a changed buffer. +Files: src/gui_w32.c + +Patch 5.5.032 +Problem: Patch 5.5.025 wasn't right. And C highlighting was still not + working correctly for a #define. +Solution: Added "excludenl" argument to ":syntax", to be able not to extend + a containing item when there is a match with the end-of-line. +Files: src/syntax.c, runtime/doc/syntax.txt, runtime/syntax/c.vim + +Patch 5.5.033 +Problem: When reading from stdin, a long line in viminfo would mess up the + file message. readfile() uses IObuff for keep_msg, which could be + overwritten by anyone. +Solution: Copy the message from IObuff to msg_buf and set keep_msg to that. + Also change vim_fgets() to not use IObuff any longer. +Files: src/fileio.c + +Patch 5.5.034 +Problem: "gvim -rv" caused a crash. Using 't_Co' before it's set. +Solution: Don't try to initialize the highlighting before it has been + initialized from main(). +Files: src/syntax.c + +Patch 5.5.035 +Problem: GTK with XIM: Resizing with status area was messy, and + ":set guioptions+=b" didn't work. +Solution: Make status area a separate widget, but not a separate window. + (Chi-Deok Hwang) +Files: src/gui_gtk_f.c, src/gui_gtk_x11.c, src/multbyte.c + +Patch 5.5.036 +Problem: The GZIP_read() function in $VIMRUNTIME/vimrc_example.vim to + uncompress a file did not do detection for 'fileformat'. This is + because the filtering is done with 'binary' set. +Solution: Split the filtering into separate write, filter and read commands. +Files: runtime/vimrc_example.vim + +Patch 5.5.037 +Problem: The "U" command didn't mark the buffer as changed. (McCormack) +Solution: Set the 'modified' flag when using "U". +Files: src/undo.c + +Patch 5.5.038 +Problem: When typing a long ":" command, so that the screen scrolls up, + causes the hit-enter prompt, even though the user just typed + return to execute the command. +Solution: Reset need_wait_return if (part of) the command was typed in + getcmdline(). +Files: src/ex_getln.c + +Patch 5.5.039 +Problem: When using a custom status line, "%a" (file # of #) reports the + index of the current window for all windows. +Solution: Pass a window pointer to append_arg_number(), and pass the window + being updated from build_stl_str_hl(). (Stephen P. Wall) +Files: src/buffer.c, src/screen.c, src/proto/buffer.pro + +Patch 5.5.040 +Problem: Multi-byte: When there is some error in xim_real_init(), it can + close XIM and return. After this there can be a segv. +Solution: Test "xic" for being non-NULL, don't set "xim" to NULL. Also try + to find more matches for supported styles. (Sung-Hyun Nam) +Files: src/multbyte.c + +Patch 5.5.041 +Problem: X11 GUI: CTRL-_ requires the SHIFT key only on some machines. +Solution: Translate CTRL-- to CTRL-_. (Robert Webb) +Files: src/gui_x11.c + +Patch 5.5.042 +Problem: X11 GUI: keys with ALT were assumed to be used for the menu, even + when the menu has been disabled by removing 'm' from 'guioptions'. +Solution: Ignore keys with ALT only when gui.menu_is_active is set. (Raf) +Files: src/gui_x11.c + +Patch 5.5.043 +Problem: GTK: Handling of fontset fonts was not right when 'guifontset' + contains exactly 14 times '-'. +Solution: Avoid setting fonts when working with a fontset. (Sung-Hyun Nam) +Files: src/gui_gtk_x11.c + +Patch 5.5.044 +Problem: pltags.pl contains an absolute path "/usr/local/bin/perl". That + might not work everywhere. +Solution: Use "/usr/bin/env perl" instead. +Files: runtime/tools/pltags.pl + +Patch 5.5.045 +Problem: Using "this_session" variable does not work, requires preceding it + with "v:". Default filename for ":mksession" isn't mentioned + in the docs. (Fisher) +Solution: Support using "this_session" to be backwards compatible. +Files: src/eval.c, runtime/doc/options.txt + +Patch 5.5.046 (extra) +Problem: VMS: problems with path and filename. +Solution: Truncate file name at last ';', etc. (Zoltan Arpadffy) +Files: src/buffer.c, src/fileio.c, src/gui_motif.c, src/os_vms.c, + src/proto/os_vms.pro + +Patch 5.5.047 +Problem: VMS: Crash when using the popup menu +Solution: Turn the #define MENU_MODE_CHARS into an array. (Arpadffy) +Files: src/structs.h, src/menu.c + +Patch 5.5.048 +Problem: HP-UX 11: Compiling doesn't work, because both string.h and + strings.h are included. (Squassabia) +Solution: The configure test for including both string.h and strings.h + must include <Xm/Xm.h> first, because it causes problems. +Files: src/configure.in, src/configure, src/config.h.in + +Patch 5.5.049 +Problem: Unix: When installing Vim, the protection bits of files might be + influenced by the umask. +Solution: Add $(FILEMOD) to Makefile. (Shetye) +Files: src/Makefile + +Patch 5.5.050 +Problem: "z+" and "z^" commands are missing. +Solution: Implemented "z+" and "z^". +Files: src/normal.c, runtime/doc/scroll.txt, runtime/doc/index.txt + +Patch 5.5.051 +Problem: Several Unix systems have a problem with the optimization limits + check in configure. +Solution: Removed the configure check, let the user add it manually in + Makefile or the environment. +Files: src/configure.in, src/configure, src/Makefile + +Patch 5.5.052 +Problem: Crash when using a cursor key at the ATTENTION prompt. (Alberani) +Solution: Ignore special keys at the console dialog. Also ignore characters + > 255 for other uses of tolower() and toupper(). +Files: src/menu.c, src/message.c, src/misc2.c + +Patch 5.5.053 +Problem: Indenting is wrong after a function when 'cino' has "fs". Another + problem when 'cino' has "{s". +Solution: Put line after closing "}" of a function at the left margin. + Apply ind_open_extra in the right way after a '{'. +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + +Patch 5.5.054 +Problem: Unix: ":e #" doesn't work if the alternate file name contains a + space or backslash. (Hudacek) +Solution: When replacing "#", "%" or other items that stand for a file name, + prepend a backslash before special characters. +Files: src/ex_docmd.c + +Patch 5.5.055 +Problem: Using "<C-V>$r-" in blockwise Visual mode replaces one character + beyond the end of the line. (Zivkov) +Solution: Only replace existing characters. +Files: src/ops.c + +Patch 5.5.056 +Problem: After "z20<CR>" messages were printed at the old command line + position once. (Veselinovic) +Solution: Set msg_row and msg_col when changing cmdline_row in + win_setheight(). +Files: src/window.c + +Patch 5.5.057 +Problem: After "S<Esc>" it should be possible to restore the line with "U". + (Veselinovic) +Solution: Don't call u_clearline() in op_delete() when changing only one + line. +Files: src/ops.c + +Patch 5.5.058 +Problem: Using a long search pattern and then "n" causes the hit-enter + prompt. (Krishna) +Solution: Truncate the echoed pattern, like other messages. Moved code for + truncating from msg_attr() to msg_strtrunc(). +Files: src/message.c, src/proto/message.pro, src/search.c + +Patch 5.5.059 +Problem: GTK GUI: When $term is invalid, using "gvim" gives an error + message, even though $term isn't really used. (Robbins) +Solution: When the GUI is about to start, skip the error messages for a + wrong $term. +Files: src/term.c + +Patch 5.5.060 (extra) +Problem: Dos 32 bit: When a directory in 'backupdir' doesn't exist, ":w" + causes the file to be renamed to "axlqwqhy.ba~". (Matzdorf) +Solution: The code to work around a LFN bug in Windows 95 doesn't handle a + non-existing target name correctly. When renaming fails, make + sure the file has its original name. Also do this for the Win32 + version, although it's unlikely that it runs into this problem. +Files: src/os_msdos.c, src/os_win32.c + +Patch 5.5.061 +Problem: When using "\:" in a modeline, the backslash is included in the + option value. (Mohsin) +Solution: Remove one backslash before the ':' in a modeline. +Files: src/buffer.c, runtime/doc/options.txt + +Patch 5.5.062 (extra) +Problem: Win32 console: Temp files are created in the root of the current + drive, which may be read-only. (Peterson) +Solution: Use the same mechanism of the GUI version: Use $TMP, $TEMP or the + current directory. Cleaned up vim_tempname() a bit. +Files: src/fileio.c, src/os_win32.h, runtime/doc/os_dos.txt + +Patch 5.5.063 +Problem: When using whole-line completion in Insert mode, 'cindent' is + applied, even after changing the indent of the line. +Solution: Don't reindent the completed line after inserting/removing indent. + (Robert Webb) +Files: src/edit.c + +Patch 5.5.064 +Problem: has("sniff") doesn't work correctly. +Solution: Return 1 when Vim was compiled with the +sniff feature. (Pruemmer) +Files: src/eval.c + +Patch 5.5.065 +Problem: When dropping a file on Vim, the 'shellslash' option is not + effective. (Krishna) +Solution: Fix the slashes in the dropped file names according to + 'shellslash'. +Files: src/ex_docmd.c, runtime/doc/options.txt + +Patch 5.5.066 +Problem: For systems with backslash in file name: Setting a file name + option to a value starting with "\\machine" removed a backslash. +Solution: Keep the double backslash for "\\machine", but do change + "\\\\machine" to "\\machine" for backwards compatibility. +Files: src/option.c, runtime/doc/options.txt + +Patch 5.5.067 +Problem: With 'hlsearch' set, the pattern "\>" doesn't highlight the first + match in a line. (Benji Fisher) +Solution: Fix highlighting an empty match. Also highlight the first + character in an empty line for "$". +Files: src/screen.c + +Patch 5.5.068 +Problem: Crash when a ":while" is used with an argument that has an error. + (Sylvain Viart) +Solution: Was using an uninitialized index in the cs_line[] array. The + crash only happened when the index was far off. Made sure the + uninitialized index isn't used. +Files: src/ex_docmd.c + +Patch 5.5.069 +Problem: Shifting lines in blockwise Visual mode didn't set the 'modified' + flag. +Solution: Do set the 'modified' flag. +Files: src/ops.c + +Patch 5.5.070 +Problem: When editing a new file, creating that file outside of Vim, then + editing it again, ":w" still warns for overwriting an existing + file. (Nam) +Solution: The BF_NEW flag in the "b_flags" field wasn't cleared properly. +Files: src/buffer.c, src/fileio.c + +Patch 5.5.071 +Problem: Using a matchgroup in a ":syn region", which is the same syntax + group as the region, didn't stop a contained item from matching in + the start pattern. +Solution: Also push an item on the stack when the syntax ID of the + matchgroup is the same as the syntax ID of the region. +Files: src/syntax.c + +Patch 5.5.072 (extra) +Problem: Dos 32 bit: When setting 'columns' to a too large value, Vim may + crash, and the DOS console too. +Solution: Check that the value of 'columns' isn't larger than the number of + columns that the BIOS reports. +Files: src/os_msdos.c, src/proto/os_msdos.pro, src/option.c + +Patch 5.5.073 (extra) +Problem: Win 32 GUI: The Find and Find/Replace dialogs didn't show the + "match case" checkbox. The Find/Replace dialog didn't handle the + "match whole word" checkbox. +Solution: Support the "match case" and "match whole word" checkboxes. +Files: src/gui_w32.c + +Patch 5.6a.001 +Problem: Using <C-End> with a count doesn't work like it does with "G". + (Benji Fisher) +Solution: Accept a count for <C-End> and <C-Home>. +Files: src/normal.c + +Patch 5.6a.002 +Problem: The script for conversion to HTML was an older version. +Solution: Add support for running 2html.vim on a color terminal. +Files: runtime/syntax/2html.vim + +Patch 5.6a.003 +Problem: Defining a function inside a function didn't give an error + message. A missing ":endfunction" doesn't give an error message. +Solution: Allow defining a function inside a function. +Files: src/eval.c, runtime/doc/eval.txt + +Patch 5.6a.004 +Problem: A missing ":endwhile" or ":endif" doesn't give an error message. + (Johannes Zellner) +Solution: Check for missing ":endwhile" and ":endif" in sourced files. + Add missing ":endif" in file selection macros. +Files: src/ex_docmd.c, runtime/macros/file_select.vim + +Patch 5.6a.005 +Problem: 'hlsearch' was not listed alphabetically. The value of 'toolbar' + was changed when 'compatible' is set. +Solution: Moved entry of 'hlsearch' in options[] table down. + Don't reset 'toolbar' option to the default value when + 'compatible' is set. +Files: src/option.c + +Patch 5.6a.006 +Problem: Using a backwards range inside ":if 0" gave an error message. +Solution: Don't complain about a range when it is not going to be used. + (Stefan Roemer) +Files: src/ex_docmd.c + +Patch 5.6a.007 +Problem: ":let" didn't show internal Vim variables. (Ron Aaron) +Solution: Do show ":v" variables for ":let" and ":let v:name". +Files: src/eval.c + +Patch 5.6a.008 +Problem: Selecting a syntax from the Syntax menu gives an error message. +Solution: Replace "else if" in SetSyn() with "elseif". (Ronald Schild) +Files: runtime/menu.vim + +Patch 5.6a.009 +Problem: When compiling with +extra_search but without +syntax, there is a + compilation error in screen.c. (Axel Kielhorn) +Solution: Adjust the #ifdef for declaring and initializing "line" in + win_line(). Also solve compilation problem when +statusline is + used without +eval. Another one when +cmdline_compl is used + without +eval. +Files: src/screen.c, src/misc2.c + +Patch 5.6a.010 +Problem: In a function, ":startinsert!" does not append to the end of the + line if a ":normal" command was used to move the cursor. (Fisher) +Solution: Reset "w_set_curswant" to avoid that w_curswant is changed again. +Files: src/ex_docmd.c + +Patch 5.6a.011 (depends on 5.6a.004) +Problem: A missing ":endif" or ":endwhile" in a function doesn't give an + error message. +Solution: Give that error message. +Files: src/ex_docmd.c + +Patch 5.6a.012 (depends on 5.6a.008) +Problem: Some Syntax menu entries caused a hit-enter prompt. +Solution: Call a function to make the command shorter. Also rename a few + functions to avoid name clashes. +Files: runtime/menu.vim + +Patch 5.6a.013 +Problem: Command line completion works different when another completion + was done earlier. (Johannes Zellner) +Solution: Reset wim_index when starting a new completion. +Files: src/ex_getln.c + +Patch 5.6a.014 +Problem: Various warning messages when compiling and running lint with + different combinations of features. +Solution: Fix the warning messages. +Files: src/eval.c, src/ex_cmds.c, src/ex_docmd.c, src/gui_gtk_x11.c, + src/option.c, src/screen.c, src/search.c, src/syntax.c, + src/feature.h, src/globals.h + +Patch 5.6a.015 +Problem: The vimtutor command doesn't always know the value of $VIMRUNTIME. +Solution: Let Vim expand $VIMRUNTIME, instead of the shell. +Files: src/vimtutor + +Patch 5.6a.016 (extra) +Problem: Mac: Window size is restricted when starting. Cannot drag the + window all over the desktop. +Solution: Get real screen size instead of assuming 640x400. Do not use a + fixed number for the drag limits. (Axel Kielhorn) +Files: src/gui_mac.c + +Patch 5.6a.017 +Problem: The "Paste" entry in popup menu for Visual, Insert and Cmdline + mode is in the wrong position. (Stol) +Solution: Add priority numbers for all Paste menu entries. +Files: runtime/menu.vim + +Patch 5.6a.018 +Problem: GTK GUI: submenu priority doesn't work. + Help dialog could be destroyed too soon. + When closing a dialog window (e.g. the "ATTENTION" one), Vim would + just hang. + When GTK theme is changed, Vim doesn't adjust to the new colors. + Argument for ":promptfind" isn't used. +Solution: Fixed the mentioned problems. + Made the dialogs look&feel nicer. + Moved functions to avoid the need for a forward declaration. + Fixed reentrancy of the file browser dialog. + Added drag&drop support for GNOME. + Init the text for the Find/replace dialog from the last used + search string. Set "match whole word" toggle button correctly. + Made repeat rate for drag outside of window depend on the + distance from the window. (Marcin Dalecki) + Made the drag in Visual mode actually work. + Removed recursiveness protection from gui_mch_get_rgb(), it might + cause more trouble than it solves. +Files: src/ex_docmd.c, src/gui_gtk.c, src/gui_gtk_x11.c, src/ui.c, + src/proto/ui.pro, src/misc2.c + +Patch 5.6a.019 +Problem: When trying to recover through NFS, which uses a large block size, + Vim might think the swap file is empty, because mf_blocknr_max is + zero. (Scott McDermott) +Solution: When computing the number of blocks of the file in mf_open(), + round up instead of down. +Files: src/memfile.c + +Patch 5.6a.020 +Problem: GUI GTK: Could not set display for gvim. +Solution: Add "-display" and "--display" arguments. (Marcin Dalecki) +Files: src/gui_gtk_x11.c + +Patch 5.6a.021 +Problem: Recovering still may not work when the block size of the device + where the swap file is located is larger than 4096. +Solution: Read block 0 with the minimal block size. +Files: src/memline.c, src/memfile.c, src/vim.h + +Patch 5.6a.022 (extra) +Problem: Win32 GUI: When an error in the vimrc causes a dialog to pop up + (e.g., for an existing swap file), Vim crashes. (David Elins) +Solution: Before showing a dialog, open the main window. +Files: src/gui_w32.c + +Patch 5.6a.023 +Problem: Using expand("%:gs??/?") causes a crash. (Ron Aaron) +Solution: Check for running into the end of the string in do_string_sub(). +Files: src/eval.c + +Patch 5.6a.024 +Problem: Using an autocommand to delete a buffer when leaving it can cause + a crash when jumping to a tag. (Franz Gorkotte) +Solution: In do_tag(), store tagstacklen before jumping to another buffer. + Check tagstackidx after jumping to another buffer. + Add extra check in win_split() if tagname isn't NULL. +Files: src/tag.c, src/window.c + +Patch 5.6a.025 (extra) +Problem: Win32 GUI: The tables for toupper() and tolower() are initialized + too late. (Mike Steed) +Solution: Move the initialization to win32_init() and call it from main(). +Files: src/main.c, src/os_w32.c, src/proto/os_w32.pro + +Patch 5.6a.026 +Problem: When the SNiFF connection is open, shell commands hang. (Pruemmer) +Solution: Skip a second wait() call if waitpid() already detected that the + child has exited. +Files: src/os_unix.c + +Patch 5.6a.027 (extra) +Problem: Win32 GUI: The "Edit with Vim" popup menu entry causes problems + for the Office toolbar. +Solution: Use a shell extension dll. (Tianmiao Hu) + Added it to the install and uninstal programs, replaces the old + "Edit with Vim" menu registry entries. +Files: src/dosinst.c, src/uninstal.c, gvimext/*, runtime/doc/gui_w32.txt + +Patch 5.6a.028 (extra) +Problem: Win32 GUI: Dialogs and tear-off menus can't handle multi-byte + characters. +Solution: Adjust nCopyAnsiToWideChar() to handle multi-byte characters + correctly. +Files: src/gui_w32.c + +============================================================================== +VERSION 5.7 *version-5.7* + +Version 5.7 is a bug-fix version of 5.6. + +Changed *changed-5.7* +------- + +Renamed src/INSTALL.mac to INSTALL_mac.txt to avoid it being recognized with a +wrong file type. Also renamed src/INSTALL.amiga to INSTALL_ami.txt. + + +Added *added-5.7* +----- + +New syntax files: +stp Stored Procedures (Jeff Lanzarotta) +snnsnet, snnspat, snnsres SNNS (Davide Alberani) +mel MEL (Robert Minsk) +ruby Ruby (Mirko Nasato) +tli TealInfo (Kurt W. Andrews) +ora Oracle config file (Sandor Kopanyi) +abaqus Abaqus (Carl Osterwisch) +jproperties Java Properties (Simon Baldwin) +apache Apache config (Allan Kelly) +csp CSP (Jan Bredereke) +samba Samba config (Rafael Garcia-Suarez) +kscript KDE script (Thomas Capricelli) +hb Hyper Builder (Alejandro Forero Cuervo) +fortran Fortran (rewritten) (Ajit J. Thakkar) +sml SML (Fabrizio Zeno Cornelli) +cvs CVS commit (Matt Dunford) +aspperl ASP Perl (Aaron Hope) +bc BC calculator (Vladimir Scholtz) +latte Latte (Nick Moffitt) +wml WML (Gerfried Fuchs) + +Included Exuberant ctags 3.5.1. (Darren Hiebert) + +"display" and "fold" arguments for syntax items. For future extension, they +are ignored now. + +strftime() function for the Macintosh. + +macros/explorer.vim: A file browser script (M A Aziz Ahmed) + + +Fixed *fixed-5.7* +----- + +The 16 bit MS-DOS version is now compiled with Bcc 3.1 instead of 4.0. The +executable is smaller. + +When a "make test" failed, the output file was lost. Rename it to +test99.failed to be able to see what went wrong. + +After sourcing bugreport.vim, it's not clear that bugreport.txt has been +written in the current directory. Edit bugreport.txt to avoid that. + +Adding IME support when using Makefile.w32 didn't work. (Taro Muraoka) + +Win32 console: Mouse drags were passed on even when the mouse didn't move. + +Perl interface: In Buffers(), type of argument to SvPV() was int, should be +STRLEN. (Tony Leneis) + +Problem with prototype for index() on AIX 4.3.0. Added check for _AIX43 in +os_unix.h. (Jake Hamby) + +Mappings in mswin.vim could break when some commands are mapped. Add "nore" +to most mappings to avoid re-mapping. + +modify_fname() made a copy of a file name for ":p" when it already was a full +path name, which is a bit slow. + +Win32 with Borland C++ 5.5: Pass the path to the compiler on to xxd and ctags, +to avoid depending on $PATH. Fixed "make clean". + +Many fixes to Macintosh specific parts: (mostly by Dany StAmant) +- Only one Help menu. +- No more crash when removing a menu item. +- Support as External Editor for Codewarrior (still some little glitches). +- Popup menu support. +- Fixed crash when pasting after application switch. +- Color from rgb.txt properly displayed. +- 'isprint' default includes all chars above '~'. (Axel Kielhorn) +- mac_expandpath() was leaking memory. +- Add digraphs table. (Axel Kielhorn) +- Multi-byte support: (Kenichi Asai) + Switch keyscript when going in/out of Insert mode. + Draw multi-byte character correctly. + Don't use mblen() but highest bit of char to detect multi-byte char. + Display value of multi-byte in statusline (also for other systems). +- mouse button was not initialized properly to MOUSE_LEFT when + USE_CTRLCLICKMENU not defined. +- With Japanese SJIS characters: Make "w", "b", and "e" work + properly. (Kenichi Asai) +- Replaced old CodeWarrior file os_mac.CW9.hqx with os_mac.cw5.sit.hqx. + +Fixes for VMS: (Zoltan Arpadffy) (also see patch 5.6.045 below) +- Added Makefile_vms.mms and vimrc.vms to src/testdir to be able to run the + tests. +- Various fixes. +- Set 'undolevels' to 1000 by default. +- Made mch_settitle() equivalent to the one in os_unix.c. + +RiscOS: A few prototypes for os_riscos.c were outdated. Generate prototypes +automatically. + + +Previously released patches: + +Patch 5.6.001 +Problem: When using "set bs=0 si cin", Inserting "#<BS>" or "}<BS>" which + reduces the indent doesn't delete the "#" or "}". (Lorton) +Solution: Adjust ai_col in ins_try_si(). +Files: src/edit.c + +Patch 5.6.002 +Problem: When using the vim.vim syntax file, a comment with all uppercase + characters causes a hang. +Solution: Adjust pattern for vimCommentTitle (Charles Campbell) +Files: runtime/syntax/vim.vim + +Patch 5.6.003 +Problem: GTK GUI: Loading a user defined toolbar bitmap gives a warning + about the colormap. Probably because the window has not been + opened yet. +Solution: Use gdk_pixmap_colormap_create_from_xpm() to convert the xpm file. + (Keith Radebaugh) +Files: src/gui_gtk.c + +Patch 5.6.004 (extra) +Problem: Win32 GUI with IME: When setting 'guifont' to "*", the font + requester appears twice. +Solution: In gui_mch_init_font() don't call get_logfont() but copy + norm_logfont from fh. (Yasuhiro Matsumoto) +Files: src/gui_w32.c + +Patch 5.6.005 +Problem: When 'winminheight' is zero, CTRL-W - with a big number causes a + crash. (David Kotchan) +Solution: Check for negative window height in win_setheight(). +Files: src/window.c + +Patch 5.6.006 +Problem: GTK GUI: Bold font cannot always be used. Memory is freed too + early in gui_mch_init_font(). +Solution: Move call to g_free() to after where sdup is used. (Artem Hodyush) +Files: src/gui_gtk_x11.c + +Patch 5.6.007 (extra) +Problem: Win32 IME: Font is not changed when screen font is changed. And + IME composition window does not trace the cursor. +Solution: Initialize IME font. When cursor is moved, set IME composition + window with ImeSetCompositionWindow(). Add call to + ImmReleaseContext() in several places. (Taro Muraoka) +Files: src/gui.c, src/gui_w32.c, src/proto/gui_w32.pro + +Patch 5.6.008 (extra) +Problem: Win32: When two files exist with the same name but different case + (through NFS or Samba), fixing the file name case could cause the + wrong one to be edited. +Solution: Prefer a perfect match above a match while ignoring case in + fname_case(). (Flemming Madsen) +Files: src/os_win32.c + +Patch 5.6.009 (extra) +Problem: Win32 GUI: Garbage in Windows Explorer help line when selecting + "Edit with Vim" popup menu entry. +Solution: Only return the help line when called with the GCS_HELPTEXT flag. + (Tianmiao Hu) +Files: GvimExt/gvimext.cpp + +Patch 5.6.010 +Problem: A file name which contains a TAB was not read correctly from the + viminfo file and the ":ls" listing was not aligned properly. +Solution: Parse the buffer list lines in the viminfo file from the end + backwards. Count a Tab for two characters to align the ":ls" list. +Files: src/buffer.c + +Patch 5.6.011 +Problem: When 'columns' is huge (using a tiny font) and 'statusline' is + used, Vim can crash. +Solution: Limit maxlen to MAXPATHL in win_redr_custom(). (John Mullin) +Files: src/screen.c + +Patch 5.6.012 +Problem: When using "zsh" for /bin/sh, toolcheck may hang until "exit" is + typed. (Kuratczyk) +Solution: Add "-c exit" when checking for the shell version. +Files: src/toolcheck + +Patch 5.6.013 +Problem: Multibyte char in tooltip is broken. +Solution: Consider multibyte char in replace_termcodes(). (Taro Muraoka) +Files: src/term.c + +Patch 5.6.014 +Problem: When cursor is at the end of line and the character under cursor + is a multibyte character, "yl" doesn't yank 1 multibyte-char. + (Takuhiro Nishioka) +Solution: Recognize a multibyte-char at end-of-line correctly in oneright(). + (Taro Muraoka) + Also: make "+quickfix" in ":version" output appear alphabetically. +Files: src/edit.c + +Patch 5.6.015 +Problem: New xterm delete key sends <Esc>[3~ by default. +Solution: Added <kDel> and <kIns> to make the set of keypad keys complete. +Files: src/edit.c, src/ex_getln.c, src/keymap.h, src/misc1.c, + src/misc2.c, src/normal.c, src/os_unix.c, src/term.c + +Patch 5.6.016 +Problem: When deleting a search string from history from inside a mapping, + another entry is deleted too. (Benji Fisher) +Solution: Reset last_maptick when deleting the last entry of the search + history. Also: Increment maptick when starting a mapping from + typed characters to avoid a just added search string being + overwritten or removed from history. +Files: src/ex_getln.c, src/getchar.c + +Patch 5.6.017 +Problem: ":s/e/\^M/" should replace an "e" with a CTRL-M, not split the + line. (Calder) +Solution: Replace the backslash with a CTRL-V internally. (Stephen P. Wall) +Files: src/ex_cmds.c + +Patch 5.6.018 +Problem: ":help [:digit:]" takes a long time to jump to the wrong place. +Solution: Insert a backslash to avoid the special meaning of '[]'. +Files: src/ex_cmds.c + +Patch 5.6.019 +Problem: "snd.c", "snd.java", etc. were recognized as "mail" filetype. +Solution: Make pattern for mail filetype more strict. +Files: runtime/filetype.vim + +Patch 5.6.020 (extra) +Problem: The DJGPP version eats processor time (Walter Briscoe). +Solution: Call __dpmi_yield() in the busy-wait loop. +Files: src/os_msdos.c + +Patch 5.6.021 +Problem: When 'selection' is "exclusive", a double mouse click in Insert + mode doesn't select last char in line. (Lutz) +Solution: Allow leaving the cursor on the NUL past the line in this case. +Files: src/edit.c + +Patch 5.6.022 +Problem: ":e \~<Tab>" expands to ":e ~\$ceelen", which doesn't work. +Solution: Re-insert the backslash before the '~'. +Files: src/ex_getln.c + +Patch 5.6.023 (extra) +Problem: Various warnings for the Ming compiler. +Solution: Changes to avoid the warnings. (Bill McCarthy) +Files: src/ex_cmds.c, src/gui_w32.c, src/os_w32exe.c, src/os_win32.c, + src/syntax.c, src/vim.rc + +Patch 5.6.024 (extra) +Problem: Win32 console: Entering CTRL-_ requires the shift key. (Kotchan) +Solution: Specifically catch keycode 0xBD, like the GUI. +Files: src/os_win32.c + +Patch 5.6.025 +Problem: GTK GUI: Starting the GUI could be interrupted by a SIGWINCH. + (Nils Lohner) +Solution: Repeat the read() call to get the gui_in_use value when + interrupted by a signal. +Files: src/gui.c + +Patch 5.6.026 (extra) +Problem: Win32 GUI: Toolbar bitmaps are searched for in + $VIMRUNTIME/bitmaps, while GTK looks in $VIM/bitmaps. (Keith + Radebaugh) +Solution: Use $VIM/bitmaps for both, because these are not part of the + distribution but defined by the user. +Files: src/gui_w32.c, runtime/doc/gui.txt + +Patch 5.6.027 +Problem: TCL: Crash when using a Tcl script (reported for Win32). +Solution: Call Tcl_FindExecutable() in main(). (Brent Fulgham) +Files: src/main.c + +Patch 5.6.028 +Problem: Xterm patch level 126 sends codes for mouse scroll wheel. + Fully works with xterm patch level 131. +Solution: Recognize the codes for button 4 (0x60) and button 5 (0x61). +Files: src/term.c + +Patch 5.6.029 +Problem: GTK GUI: Shortcut keys cannot be used for a dialog. (Johannes + Zellner) +Solution: Add support for shortcut keys. (Marcin Dalecki) +Files: src/gui_gtk.c + +Patch 5.6.030 +Problem: When closing a window and 'ea' is set, Vim can crash. (Yasuhiro + Matsumoto) +Solution: Set "curbuf" to a valid value in win_close(). +Files: src/window.c + +Patch 5.6.031 +Problem: Multi-byte: When a double-byte character ends in CSI, Vim waits + for another character to be typed. +Solution: Recognize the CSI as the second byte of a character and don't wait + for another one. (Yasuhiro Matsumoto) +Files: src/getchar.c + +Patch 5.6.032 +Problem: Functions with an argument that is a line number don't all accept + ".", "$", etc. (Ralf Arens) +Solution: Add get_art_lnum() and use it for setline(), line2byte() and + synID(). +Files: src/eval.c + +Patch 5.6.033 +Problem: Multi-byte: "f " sometimes skips to the second space. (Sung-Hyun + Nam) +Solution: Change logic in searchc() to skip trailing byte of a double-byte + character. + Also: Ask for second byte when searching for double-byte + character. (Park Chong-Dae) +Files: src/search.c + +Patch 5.6.034 (extra) +Problem: Compiling with Borland C++ 5.5 fails on tolower() and toupper(). +Solution: Use TO_LOWER() and TO_UPPER() instead. Also adjust the Makefile + to make using bcc 5.5 easier. +Files: src/edit.c, src/ex_docmd.c, src/misc1.c, src/Makefile.bor + +Patch 5.6.035 +Problem: Listing the"+comments" feature in the ":version" output depended + on the wrong ID. (Stephen P. Wall) +Solution: Change "CRYPTV" to "COMMENTS". +Files: src/version.c + +Patch 5.6.036 +Problem: GTK GUI: Copy/paste text doesn't work between gvim and Eterm. +Solution: Support TEXT and COMPOUND_TEXT selection targets. (ChiDeok Hwang) +Files: src/gui_gtk_x11.c + +Patch 5.6.037 +Problem: Multi-byte: Can't use "f" command with multi-byte character in GUI. +Solution: Enable XIM in Normal mode for the GUI. (Sung-Hyun Nam) +Files: src/gui_gtk_x11.c, src/multbyte.c + +Patch 5.6.038 +Problem: Multi-clicks in GUI are interpreted as a mouse wheel click. When + 'ttymouse' is "xterm" a mouse click is interpreted as a mouse + wheel click. +Solution: Don't recognize the mouse wheel in check_termcode() in the GUI. + Use 0x43 for a mouse drag in do_xterm_trace(), not 0x63. +Files: src/term.c, src/os_unix.c + +Patch 5.6.039 +Problem: Motif GUI under KDE: When trying to logout, Vim hangs up the + system. (Hermann Rochholz) +Solution: When handling the WM_SAVE_YOURSELF event, set the WM_COMMAND + property of the window to let the session manager know we finished + saving ourselves. +Files: src/gui_x11.c + +Patch 5.6.040 +Problem: When using ":s" command, matching the regexp is done twice. +Solution: After copying the matched line, adjust the pointers instead of + finding the match again. (Loic Grenie) Added vim_regnewptr(). +Files: src/ex_cmds.c, src/regexp.c, src/proto/regexp.pro + +Patch 5.6.041 +Problem: GUI: Athena, Motif and GTK don't give more than 10 dialog buttons. +Solution: Remove the limit on the number of buttons. + Also support the 'v' flag in 'guioptions'. + For GTK: Center the buttons. +Files: src/gui_athena.c, src/gui_gtk.c, src/gui_motif.c + +Patch 5.6.042 +Problem: When doing "vim -u vimrc" and vimrc contains ":q", the cursor in + the terminal can remain off. +Solution: Call cursor_on() in mch_windexit(). +Files: src/os_unix.c + +Patch 5.6.043 (extra) +Problem: Win32 GUI: When selecting guifont with the dialog, 'guifont' + doesn't include the bold or italic attributes. +Solution: Append ":i" and/or ":b" to 'guifont' in gui_mch_init_font(). +Files: src/gui_w32.c + +Patch 5.6.044 (extra) +Problem: MS-DOS and Windows: The line that dosinst.exe appends to + autoexec.bat to set PATH is wrong when Vim is in a directory with + an embedded space. +Solution: Use double quotes for the value when there is an embedded space. +Files: src/dosinst.c + +Patch 5.6.045 (extra) (fixed version) +Problem: VMS: Various small problems. +Solution: Many small changes. (Zoltan Arpadffy) + File name modifier ":h" keeps the path separator. + File name modifier ":e" also removes version. + Compile with MAX_FEAT by default. + When checking for autocommands ignore version in file name. + Be aware of file names being case insensitive. + Added vt320 builtin termcap. + Be prepared for an empty default_vim_dir. +Files: runtime/gvimrc_example.vim, runtime/vimrc_example.vim, + runtime/doc/os_vms.txt, src/eval.c, src/feature.h, src/fileio.c, + src/gui_motif.c, src/gui_vms_conf.h, src/main.c, src/memline.c, + src/misc1.c, src/option.c, src/os_vms_conf.h, src/os_vms.c, + src/os_vms.h, src/os_vms.mms, src/tag.c, src/term.c, src/version.c + +Patch 5.6.046 +Problem: Systems with backslash in file name: With 'shellslash' set, "vim + */*.c" only uses a slash for the first file name. (Har'El) +Solution: Fix slashes in file name arguments after reading the vimrc file. +Files: src/option.c + +Patch 5.6.047 +Problem: $CPPFLAGS is not passed on to ctags configure. +Solution: Add it. (Walter Briscoe) +Files: src/config.mk.in, src/Makefile + +Patch 5.6.048 +Problem: CTRL-R in Command-line mode is documented to insert text as typed, + but inserts text literally. +Solution: Make CTRL-R insert text as typed, use CTRL-R CTRL-R to insert + literally. This is consistent with Insert mode. But characters + that end Command-line mode are inserted literally. +Files: runtime/doc/index.txt, runtime/doc/cmdline.txt, src/ex_getln.c, + src/ops.c, src/proto/ops.pro + +Patch 5.6.049 +Problem: Documentation for [!] after ":ijump" is wrong way around. (Benji + Fisher) +Solution: Fix the documentation. Also improve the code to check for a match + after a /* */ comment. +Files: runtime/doc/tagsearch.txt, src/search.c + +Patch 5.6.050 +Problem: Replacing is wrong when replacing a single-byte char with + double-byte char or the other way around. +Solution: Shift the text after the character when it is replaced. + (Yasuhiro Matsumoto) +Files: src/normal.c, src/misc1.c + +Patch 5.6.051 +Problem: ":tprev" and ":tnext" don't give an error message when trying to + go before the first or beyond the last tag. (Robert Webb) +Solution: Added error messages. Also: Delay a second when a file-read + message is going to overwrite an error message, otherwise it won't + be seen. +Files: src/fileio.c, src/tag.c + +Patch 5.6.052 +Problem: Multi-byte: When an Ex command has a '|' or '"' as a second byte, + it terminates the command. +Solution: Skip second byte of multi-byte char when checking for '|' and '"'. + (Asai Kenichi) +Files: src/ex_docmd.c + +Patch 5.6.053 +Problem: CTRL-] doesn't work on a tag that contains a '|'. (Cesar Crusius) +Solution: Escape '|', '"' and '\' in tag names when using CTRL-] and also + for command-line completion. +Files: src/ex_getln.c, src/normal.c + +Patch 5.6.054 +Problem: When using ":e" and ":e #" the cursor is put in the first column + when 'startofline' is set. (Cordell) +Solution: Use the last known column when 'startofline' is set. + Also, use ECMD_LAST more often to simplify the code. +Files: src/buffer.c, src/ex_cmds.c, src/ex_docmd.c, src/proto/buffer.pro + +Patch 5.6.055 +Problem: When 'statusline' only contains a text without "%" and doesn't fit + in the window, Vim crashes. (Ron Aaron) +Solution: Don't use the pointer for the first item if there is no item. +Files: src/screen.c + +Patch 5.6.056 (extra) +Problem: MS-DOS: F11 and F12 don't work when 'bioskey' is set. +Solution: Use enhanced keyboard functions. (Vince Negri) + Detect presence of enhanced keyboard and set bioskey_read and + bioskey_ready. +Files: src/os_msdos.c + +Patch 5.6.057 (extra) +Problem: Win32 GUI: Multi-byte characters are wrong in dialogs and tear-off + menus. +Solution: Use system font instead of a fixed font. (Matsumoto, Muraoka) +Files: src/gui_w32.c + +Patch 5.6.058 +Problem: When the 'a' flag is not in 'guioptions', non-Windows systems + copy Visually selected text to the clipboard/selection on a yank + or delete command anyway. On Windows it isn't done even when the + 'a' flag is included. +Solution: Respect the 'a' flag in 'guioptions' on all systems. +Files: src/normal.c + +Patch 5.6.059 (extra) +Problem: When moving the cursor over italic text and the characters spill + over to the cell on the right, that spill-over is deleted. + Noticed in the Win32 GUI, can happen on other systems too. +Solution: Redraw italic text starting from a blank, like this is already + done for bold text. (Vince Negri) +Files: src/gui.c, src/gui.h, src/gui_w32.c + +Patch 5.6.060 +Problem: Some bold characters spill over to the cell on the left, that + spill-over can remain sometimes. +Solution: Redraw a character when the next character was bold and needs + redrawing. (Robert Webb) +Files: src/screen.c + +Patch 5.6.061 +Problem: When xterm sends 8-bit controls, recognizing the version response + doesn't work. + When using CSI instead of <Esc>[ for the termcap color codes, + using 16 colors doesn't work. (Neil Bird) +Solution: Also accept CSI in place of <Esc>[ for the version string. + Also check for CSI when handling colors 8-15 in term_color(). + Use CSI for builtin xterm termcap entries when 'term' contains + "8bit". +Files: runtime/doc/term.txt, src/ex_cmds.c, src/option.c, src/term.c, + src/os_unix.c, src/proto/option.pro, src/proto/term.pro + +Patch 5.6.062 +Problem: The documentation says that setting 'smartindent' doesn't have an + effect when 'cindent' is set, but it does make a difference for + lines starting with "#". (Neil Bird) +Solution: Really ignore 'smartindent' when 'cindent' is set. +Files: src/misc1.c, src/ops.c + +Patch 5.6.063 +Problem: Using "I" in Visual-block mode doesn't accept a count. (Johannes + Zellner) +Solution: Pass the count on to do_insert() and edit(). (Allan Kelly) +Files: src/normal.c, src/ops.c, src/proto/ops.pro + +Patch 5.6.064 +Problem: MS-DOS and Win32 console: Mouse doesn't work correctly after + including patch 5.6.28. (Vince Negri) +Solution: Don't check for mouse scroll wheel when the mouse code contains + the number of clicks. +Files: src/term.c + +Patch 5.6.065 +Problem: After moving the cursor around in Insert mode, typing a space can + still trigger an abbreviation. (Benji Fisher) +Solution: Don't check for an abbreviation after moving around in Insert mode. +Files: src/edit.c + +Patch 5.6.066 +Problem: Still a few bold character spill-over remains after patch 60. +Solution: Clear character just in front of blanking out rest of the line. + (Robert Webb) +Files: src/screen.c + +Patch 5.6.067 +Problem: When a file name contains a NL, the viminfo file is corrupted. +Solution: Use viminfo_writestring() to convert the NL to CTRL-V n. + Also fix the Buffers menu and listing a menu name with a newline. +Files: runtime/menu.vim, src/buffer.c, src/mark.c, src/menu.c + +Patch 5.6.068 +Problem: Compiling the Perl interface doesn't work with Perl 5.6.0. + (Bernhard Rosenkraenzer) +Solution: Also check xs_apiversion for the version number when prepending + defines for PL_*. +Files: src/Makefile + +Patch 5.6.069 +Problem: "go" doesn't always end up at the right character when + 'fileformat' is "dos". (Bruce DeVisser) +Solution: Correct computations in ml_find_line_or_offset(). +Files: src/memline. + +Patch 5.6.070 (depends on 5.6.068) +Problem: Compiling the Perl interface doesn't work with Perl 5.6.0. + (Bernhard Rosenkraenzer) +Solution: Simpler check instead of the one from patch 68. +Files: src/Makefile + +Patch 5.6.071 +Problem: "A" in Visual block mode on a Tab positions the cursor one char to + the right. (Michael Haumann) +Solution: Correct the column computation in op_insert(). +Files: src/ops.c + +Patch 5.6.072 +Problem: When starting Vim with "vim +startinsert", it enters Insert mode + only after typing the first command. (Andrew Pimlott) +Solution: Insert a dummy command in the stuff buffer. +Files: src/main.c + +Patch 5.6.073 (extra) (depends on 5.6.034) +Problem: Win32 GUI: When compiled with Bcc 5.5 menus don't work. + In dosinst.c toupper() and tolower() give an "internal compiler + error" for Bcc 5.5. +Solution: Define WINVER to 4 to avoid compiling for Windows 2000. (Dan + Sharp) Also cleaned up compilation arguments. + Use our own implementation of toupper() in dosinst.c. Use + mytoupper() instead of tolower(). +Files: src/Makefile.bor, src/dosinst.c + +Patch 5.6.074 (extra) +Problem: Entering CSI directly doesn't always work, because it's recognized + as the start of a special key. Mostly a problem with multi-byte + in the GUI. +Solution: Use K_CSI for a typed CSI character. Use <CSI> for a normal CSI, + <xCSI> for a CSI typed in the GUI. +Files: runtime/doc/intro.txt, src/getchar.c, src/gui_amiga.c, + src/gui_gtk_x11.c, src/gui_mac.c, src/gui_riscos.c, src/gui_w32.c, + src/keymap.h, src/misc2.c + +Patch 5.6.075 +Problem: When using "I" or "A" in Visual block mode while 'sts' is set may + change spaces to a Tab the inserted text is not correct. (Mike + Steed) And some other problems when using "A" to append after the + end of the line. +Solution: Check for change in spaces/tabs after inserting the text. Append + spaces to fill the gap between the end-of-line and the right edge + of the block. +Files: src/ops.c + +Patch 5.6.076 +Problem: GTK GUI: Mapping <M-Space> doesn't work. +Solution: Don't use the "Alt" modifier twice in key_press_event(). +Files: src/gui_gtk_x11.c + +Patch 5.6.077 +Problem: GUI: When interrupting an external program with CTRL-C, gvim might + crash. (Benjamin Korvemaker) +Solution: Avoid using a NULL pointer in ui_inchar_undo(). +Files: src/ui.c + +Patch 5.6.078 +Problem: Locale doesn't always work on FreeBSD. (David O'Brien) +Solution: Link with the "xpg4" library when available. +Files: src/configure.in, src/configure + +Patch 5.6.079 +Problem: Vim could crash when several Tcl interpreters are created and + destroyed. +Solution: handle the "exit" command and nested ":tcl" commands better. (Ingo + Wilken) +Files: runtime/doc/if_tcl.txt, src/if_tcl.c + +Patch 5.6.080 +Problem: When jumping to a tag, generating the tags file and jumping to the + same tag again uses the old search pattern. (Sung-Hyun Nam) +Solution: Flush cached tag matches when executing an external command. +Files: src/misc2.c, src/proto/tag.pro, src/tag.c + +Patch 5.6.081 +Problem: ":syn include" uses a level for the included file, this confuses + contained items included at the same level. +Solution: Use a unique tag for each included file. Changed sp_syn_inc_lvl + to sp_syn_inc_tag. (Scott Bigham) +Files: src/syntax.c, src/structs.h + +Patch 5.6.082 +Problem: When using cscope, Vim can crash. +Solution: Initialize tag_fname in find_tags(). (Anton Blanchard) +Files: src/tag.c + +Patch 5.6.083 (extra) +Problem: Win32: The visual beep can't be seen. (Eric Roesinger) +Solution: Flush the output before waiting with GdiFlush(). (Maurice S. Barnum) + Also: Allow specifying the delay in t_vb for the GUI. +Files: src/gui.c, src/gui_amiga.c, src/gui_gtk_x11.c, src/gui_mac.c, + src/gui_riscos.c, src/gui_w32.c, src/gui_x11.c, src/gui_beos.cc, + src/proto/gui_amiga.pro, src/proto/gui_gtk_x11.pro, + src/proto/gui_mac.pro, src/proto/gui_riscos.pro, + src/proto/gui_w32.pro, src/proto/gui_x11.pro, + src/proto/gui_beos.pro + +Patch 5.6.084 (depends on 5.6.074) +Problem: GUI: Entering CSI doesn't always work for Athena and Motif. +Solution: Handle typed CSI as <xCSI> (forgot this bit in 5.6.074). +Files: src/gui_x11.c + +Patch 5.6.085 +Problem: Multi-byte: Using "r" to replace a double-byte char with a + single-byte char moved the cursor one character. (Matsumoto) + Also, using a count when replacing a single-byte char with a + double-byte char didn't work. +Solution: Don't use del_char() to delete the second byte. + Get "ptr" again after calling ins_char(). +Files: src/normal.c + +Patch 5.6.086 (extra) +Problem: Win32: When using libcall() and the returned value is not a valid + pointer, Vim crashes. +Solution: Use IsBadStringPtr() to check if the pointer is valid. +Files: src/os_win32.c + +Patch 5.6.087 +Problem: Multi-byte: Commands and messages with multi-byte characters are + displayed wrong. +Solution: Detect double-byte characters. (Yasuhiro Matsumoto) +Files: src/ex_getln.c, src/message.c, src/misc2.c, src/screen.c + +Patch 5.6.088 +Problem: Multi-byte with Motif or Athena: The message "XIM requires + fontset" is annoying when Vim was compiled with XIM support but it + is not being used. +Solution: Remove that message. +Files: src/multbyte.c + +Patch 5.6.089 +Problem: On non-Unix systems it's possible to overwrite a read-only file + without using "!". +Solution: Check if the file permissions allow overwriting before moving the + file to become the backup file. +Files: src/fileio.c + +Patch 5.6.090 +Problem: When editing a file in "/home/dir/home/dir" this was replaced with + "~~". (Andreas Jellinghaus) +Solution: Replace the home directory only once in home_replace(). +Files: src/misc1.c + +Patch 5.6.091 +Problem: When editing many "no file" files, can't create swap file, because + .sw[a-p] have all been used. (Neil Bird) +Solution: Also use ".sv[a-z]", ".su[a-z]", etc. +Files: src/memline.c + +Patch 5.6.092 +Problem: FreeBSD: When setting $TERM to a non-valid terminal name, Vim + hangs in tputs(). +Solution: After tgetent() returns an error code, call it again with the + terminal name "dumb". This apparently creates an environment in + which tputs() doesn't fail. +Files: src/term.c + +Patch 5.6.093 (extra) +Problem: Win32 GUI: "ls | gvim -" will show a message box about reading + stdin when Vim exits. (Donohue) +Solution: Don't write a message about the file read from stdin until the GUI + has started. +Files: src/fileio.c + +Patch 5.6.094 +Problem: Problem with multi-byte string for ":echo var". +Solution: Check for length in msg_outtrans_len_attr(). (Sung-Hyun Nam) + Also make do_echo() aware of multi-byte characters. +Files: src/eval.c, src/message.c + +Patch 5.6.095 +Problem: With an Emacs TAGS file that include another a relative path + doesn't always work. +Solution: Use expand_tag_fname() on the name of the included file. + (Utz-Uwe Haus) +Files: src/tag.c + +Patch 5.6.096 +Problem: Unix: When editing many files, startup can be slow. (Paul + Ackersviller) +Solution: Halve the number of stat() calls used to add a file to the buffer + list. +Files: src/buffer.c + +Patch 5.7a.001 +Problem: GTK doesn't respond on drag&drop from ROX-Filer. +Solution: Add "text/uri-list" target. (Thomas Leonard) + Also: fix problem with checking for trash arguments. +Files: src/gui_gtk_x11.c + +Patch 5.7a.002 +Problem: Multi-byte: 'showmatch' is performed when second byte of an + inserted double-byte char is a paren or brace. +Solution: Check IsTrailByte() before calling showmatch(). (Taro Muraoka) +Files: src/misc1.c + +Patch 5.7a.003 +Problem: Multi-byte: After using CTRL-O in Insert mode with the cursor at + the end of the line on a multi-byte character the cursor moves to + the left. +Solution: Check for multi-byte character at end-of-line. (Taro Muraoka) + Also: fix cls() to detect a double-byte character. (Chong-Dae Park) +Files: src/edit.c, src/search.c + +Patch 5.7a.004 +Problem: When reporting the search pattern offset, the string could be + unterminated, which may cause a crash. +Solution: Terminate the string for the search offset. (Stephen P. Wall) +Files: src/search.c + +Patch 5.7a.005 +Problem: When ":s//~/" doesn't find a match it reports "[NULL]" for the + pattern. +Solution: Use get_search_pat() to obtain the actually used pattern. +Files: src/ex_cmds.c, src/proto/search.pro, src/search.c + +Patch 5.7a.006 (extra) +Problem: VMS: Various problems, also with the VAXC compiler. +Solution: In many places use the Unix code for VMS too. + Added time, date and compiler version to version message. + (Zoltan Arpadffy) +Files: src/ex_cmds.c, src/ex_docmd.c, src/globals.h, src/gui_vms_conf.h, + src/main.c, src/message.c, src/misc1.c, src/os_vms.c, + src/os_vms.h, src/os_vms.mms, src/os_vms_conf.h, + src/proto/os_vms.pro, src/proto/version.pro, src/term.c, + src/version.c, src/xxd/os_vms.mms, src/xxd/xxd.c + +Patch 5.7a.007 +Problem: Motif and Athena GUI: CTRL-@ is interpreted as CTRL-C. +Solution: Only use "intr_char" when it has been set. +Files: src/gui_x11.c + +Patch 5.7a.008 +Problem: GTK GUI: When using CTRL-L the screen is redrawn twice, causing + trouble for bold characters. Also happens when moving with the + scrollbar. Best seen when 'writedelay' is non-zero. + When starting the GUI with ":gui" the screen is redrawn once with + the wrong colors. +Solution: Only set the geometry hints when the window size really changed. + This avoids setting it each time the scrollbar is forcefully + redrawn. + Don't redraw in expose_event() when gui.starting is still set. +Files: src/gui_gtk_x11.c + + +============================================================================== +VERSION 5.8 *version-5.8* + +Version 5.8 is a bug-fix version of 5.7. + + +Changed *changed-5.8* +------- + +Ctags is no longer included with Vim. It has grown into a project of its own. +You can find it here: http://ctags.sf.net. It is highly recommended as a Vim +companion when you are writing programs. + + +Added *added-5.8* +----- + +New syntax files: +acedb AceDB (Stewart Morris) +aflex Aflex (Mathieu Clabaut) +antlr Antlr (Mathieu Clabaut) +asm68k 68000 Assembly (Steve Wall) +automake Automake (John Williams) +ayacc Ayacc (Mathieu Clabaut) +b B (Mathieu Clabaut) +bindzone BIND zone (glory hump) +blank Blank (Rafal Sulejman) +cfg Configure files (Igor Prischepoff) +changelog ChangeLog (Gediminas Paulauskas) +cl Clever (Phil Uren) +crontab Crontab (John Hoelzel) +csc Essbase script (Raul Segura Acevedo) +cynlib Cynlib(C++) (Phil Derrick) +cynpp Cyn++ (Phil Derrick) +debchangelog Debian Changelog (Wichert Akkerman) +debcontrol Debian Control (Wichert Akkerman) +dns DNS zone file (Jehsom) +dtml Zope's DTML (Jean Jordaan) +dylan Dylan, Dylan-intr and Dylan-lid (Brent Fulgham) +ecd Embedix Component Description (John Beppu) +fgl Informix 4GL (Rafal Sulejman) +foxpro FoxPro (Powing Tse) +gsp GNU Server Pages (Nathaniel Harward) +gtkrc GTK rc (David Necas) +hercules Hercules (Avant! Corporation) (Dana Edwards) +htmlos HTML/OS by Aestiva (Jason Rust) +inittab SysV process control (David Necas) +iss Inno Setup (Dominique Stephan) +jam Jam (Ralf Lemke) +jess Jess (Paul Baleme) +lprolog LambdaProlog (Markus Mottl) +ia64 Intel Itanium (parth malwankar) +kix Kixtart (Nigel Gibbs) +mgp MaGic Point (Gerfried Fuchs) +mason Mason (HTML with Perl) (Andrew Smith) +mma Mathematica (Wolfgang Waltenberger) +nqc Not Quite C (Stefan Scherer) +omnimark Omnimark (Paul Terray) +openroad OpenROAD (Luis Moreno Serrano) +named BIND configuration (glory hump) +papp PApp (Marc Lehmann) +pfmain Postfix main config (Peter Kelemen) +pic PIC assembly (Aleksandar Veselinovic) +ppwiz PPWizard (Stefan Schwarzer) +progress Progress (Phil Uren) +psf Product Specification File (Rex Barzee) +r R (Tom Payne) +registry MS-Windows registry (Dominique Stephan) +robots Robots.txt (Dominique Stephan) +rtf Rich Text Format (Dominique Stephan) +setl SETL (Alex Poylisher) +sgmldecl SGML Declarations (Daniel A. Molina W.) +sinda Sinda input (Adrian Nagle) +sindacmp Sinda compare (Adrian Nagle) +sindaout Sinda output (Adrian Nagle) +smith SMITH (Rafal Sulejman) +snobol4 Snobol 4 (Rafal Sulejman) +strace Strace (David Necas) +tak TAK input (Adrian Nagle) +takcmp TAK compare (Adrian Nagle) +takout TAK output (Adrian Nagle) +tasm Turbo assembly (FooLman) +texmf TeX configuration (David Necas) +trasys Trasys input (Adrian Nagle) +tssgm TSS Geometry (Adrian Nagle) +tssop TSS Optics (Adrian Nagle) +tsscl TSS Command line (Adrian Nagle) +virata Virata Configuration Script (Manuel M.H. Stol) +vsejcl VSE JCL (David Ondrejko) +wdiff Wordwise diff (Gerfried Fuchs) +wsh Windows Scripting Host (Paul Moore) +xkb X Keyboard Extension (David Necas) + +Renamed php3 to php, it now also supports php4 (Lutz Eymers) + +Patch 5.7.015 +Problem: Syntax files for Vim 6.0 can't be used with 5.x. +Solution: Add the "default" argument to the ":highlight" command: Ignore the + command if highlighting was already specified. +Files: src/syntax.c + +Generate the Syntax menu with makemenu.vim, so that it doesn't have to be done +when Vim is starting up. Reduces the startup time of the GUI. + + +Fixed *fixed-5.8* +----- + +Conversion of docs to HTML didn't convert "|tag|s" to a hyperlink. + +Fixed compiling under NeXT. (Jeroen C.M. Goudswaard) + +optwin.vim gave an error when used in Vi compatible mode ('cpo' contains 'C'). + +Tcl interpreter: "buffer" command didn't check for presence of an argument. +(Dave Bodenstab) + +dosinst.c: Added checks for too long file name. + +Amiga: a file name starting with a colon was considered absolute but it isn't. +Amiga: ":pwd" added a slash when in the root of a drive. + +Macintosh: Warnings for unused variables. (Bernhard Pruemmer) + +Unix: When catching a deadly signal, handle it in such a way that it's +unlikely that Vim will hang. Call _exit() instead of exit() in case of a +severe problem. + +Setting the window title from nothing to something didn't work after patch 29. + +Check for ownership of .exrc and .vimrc was done with stat(). Use lstat() as +well for extra security. + +Win32 GUI: Printing a file with 'fileformat' "unix" didn't work. Set +'fileformat' to "dos" before writing the temp file. + +Unix: Could start waiting for a character when checking for a CTRL-C typed +when an X event is received. + +Could not use Perl and Python at the same time on FreeBSD, because Perl used +"-lc" and Python used the threaded C library. + +Win32: The Mingw compiler gave a few warning messages. + +When using "ZZ" and an autocommand for writing uses an abbreviation it didn't +work. Don't stuff the ":x" command but execute it directly. (Mikael Berthe) + +VMS doesn't always have lstat(), added an #ifdef around it. + +Added a few corrections for the Macintosh. (Axel Kielhorn) + +Win32: Gvimext could not edit more than a few files at once, the length of the +argument was fixed. + + +Previously released patches for Vim 5.7: + +Patch 5.7.001 +Problem: When the current buffer is crypted, and another modified buffer + isn't, ":wall" will encrypt the other buffer. +Solution: In buf_write() use "buf" instead of "curbuf" to check for the + crypt key. +Files: src/fileio.c + +Patch 5.7.002 +Problem: When 'showmode' is set, using "CTRL-O :r file" waits three seconds + before displaying the read text. (Wichert Akkerman) +Solution: Set "keep_msg" to the file message so that the screen is redrawn + before the three seconds wait for displaying the mode message. +Files: src/fileio.c + +Patch 5.7.003 +Problem: Searching for "[[:cntrl:]]" doesn't work. +Solution: Exclude NUL from the matching characters, it terminates the list. +Files: src/regexp.c + +Patch 5.7.004 +Problem: GTK: When selecting a new font, Vim can crash. +Solution: In gui_mch_init_font() unreference the old font, not the new one. +Files: src/gui_gtk_x11.c + +Patch 5.7.005 +Problem: Multibyte: Inserting a wrapped line corrupts kterm screen. + Pasting TEXT/COMPOUND_TEXT into Vim does not work. + On Motif no XIM status line is displayed even though it is + available. +Solution: Don't use xterm trick for wrapping lines for multibyte mode. + Correct a missing "break", added TEXT/COMPOUND_TEXT selection + request. + Add XIMStatusArea fallback code. + (Katsuhito Nagano) +Files: src/gui_gtk_x11.c, src/multbyte.c, src/screen.c, src/ui.c + +Patch 5.7.006 +Problem: GUI: redrawing the non-Visual selection is wrong when the window + is unobscured. (Jean-Pierre Etienne) +Solution: Redraw the selection properly and don't clear it. Added "len" + argument to clip_may_redraw_selection(). +Files: src/gui.c, src/ui.c, src/proto/ui.pro + +Patch 5.7.007 +Problem: Python: Crash when using the current buffer twice. +Solution: Increase the reference count for buffer and window objects. + (Johannes Zellner) +Files: src/if_python.c + +Patch 5.7.008 +Problem: In Ex mode, backspacing over the first TAB doesn't work properly. + (Wichert Akkerman) +Solution: Switch the cursor on before printing the newline. +Files: src/ex_getln.c + +Patch 5.7.009 (extra) +Problem: Mac: Crash when using a long file. +Solution: Don't redefine malloc() and free(), because it will break using + realloc(). +Files: src/os_mac.h + +Patch 5.7.010 +Problem: When using CTRL-A on a very long number Vim can crash. (Michael + Naumann) +Solution: Truncate the length of the new number to avoid a buffer overflow. +Files: src/ops.c + +Patch 5.7.011 (extra) +Problem: Win32 GUI on NT 5 and Win98: Displaying Hebrew is reversed. +Solution: Output each character separately, to avoid that Windows reverses + the text for some fonts. (Ron Aaron) +Files: src/gui_w32.c + +Patch 5.7.012 +Problem: When using "-complete=buffer" for ":command" the user command + fails. +Solution: In a user command don't replace the buffer name with a count for + the buffer number. +Files: src/ex_docmd.c + +Patch 5.7.013 +Problem: "gD" didn't always find a match in the first line, depending on + the column the search started at. +Solution: Reset the column to zero before starting to search. +Files: src/normal.c + +Patch 5.7.014 +Problem: Rot13 encoding was done on characters with accents, which is + wrong. (Sven Gottwald) +Solution: Only do rot13 encoding on ASCII characters. +Files: src/ops.c + +Patch 5.7.016 +Problem: When hitting 'n' for a ":s///c" command, the ignore-case flag was + not restored, some matches were skipped. (Daniel Blaustein) +Solution: Restore the reg_ic variable when 'n' was hit. +Files: src/ex_cmds.c + +Patch 5.7.017 +Problem: When using a Vim script for Vim 6.0 with <SID> before a function + name, it produces an error message even when inside an "if version + >= 600". (Charles Campbell) +Solution: Ignore errors in the function name when the function is not going + to be defined. +Files: src/eval.c + +Patch 5.7.018 +Problem: When running "rvim" or "vim -Z" it was still possible to execute a + shell command with system() and backtick-expansion. (Antonios A. + Kavarnos) +Solution: Disallow executing a shell command in get_cmd_output() and + mch_expand_wildcards(). +Files: src/misc1.c, src/os_unix.c + +Patch 5.7.019 +Problem: Multibyte: In a substitute string, a multi-byte character isn't + skipped properly, can be a problem when the second byte is a + backslash. +Solution: Skip an extra byte for a double-byte character. (Muraoka Taro) +Files: src/ex_cmds.c + +Patch 5.7.020 +Problem: Compilation doesn't work on MacOS-X. +Solution: Add a couple of #ifdefs. (Jamie Curmi) +Files: src/regexp.c, src/ctags/general.h + +Patch 5.7.021 +Problem: Vim sometimes produces a beep when started in an xterm. Only + happens when compiled without mouse support. +Solution: Requesting the xterm version results in a K_IGNORE. This wasn't + handled when mouse support is disabled. Accept K_IGNORE always. +Files: src/normal.c + +Patch 5.7.022 +Problem: %v in 'statusline' is not displayed when it's equal to %c. +Solution: Check if %V or %v is used and handle them differently. +Files: src/screen.c + +Patch 5.7.023 +Problem: Crash when a WinLeave autocommand deletes the buffer in the other + window. +Solution: Check that after executing the WinLeave autocommands there still + is a window to be closed. Also update the test that was supposed + to check for this problem. +Files: src/window.c, testdir/test13.in, testdir/test13.ok + +Patch 5.7.024 +Problem: Evaluating an expression for 'statusline' can have side effects. +Solution: Evaluate the expression in a sandbox. +Files: src/edit.c, src/eval.c, src/proto/eval.pro, src/ex_cmds.c, + src/ex_cmds.h, src/ex_docmd.c, src/globals.h, src/option.c, + src/screen.c, src/undo.c + +Patch 5.7.025 (fixed) +Problem: Creating a temp file has a race condition. +Solution: Create a private directory to write the temp files in. +Files: src/fileio.c, src/misc1.c, src/proto/misc1.pro, + src/proto/fileio.pro, src/memline.c, src/os_unix.h + +Patch 5.7.026 (extra) +Problem: Creating a temp file has a race condition. +Solution: Create a private directory to write the temp files in. + This is the extra part of patch 5.7.025. +Files: src/os_msdos.h + +Patch 5.7.027 +Problem: Starting to edit a file can cause a crash. For example when in + Insert mode, using CTRL-O :help abbr<Tab> to scroll the screen and + then <CR>, which edits a help file. (Robert Bogomip) +Solution: Check if keep_msg is NULL before copying it. +Files: src/fileio.c + +Patch 5.7.028 +Problem: Creating a backup or swap file could fail in rare situations. +Solution: Use O_EXCL for open(). +Files: src/fileio.c, src/memfile.c + +Patch 5.7.029 +Problem: Editing a file with an extremely long name crashed Vim. +Solution: Check for length of the name when setting the window title. +Files: src/buffer.c + +Patch 5.7.030 +Problem: A ":make" or ":grep" command with a very long argument could cause + a crash. +Solution: Allocate the buffer for the shell command. +Files: src/ex_docmd.c + + + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/version6.txt b/runtime/doc/version6.txt new file mode 100644 index 0000000000..f18fea8705 --- /dev/null +++ b/runtime/doc/version6.txt @@ -0,0 +1,14530 @@ +*version6.txt* For Vim version 7.4. Last change: 2013 Jul 28 + + + VIM REFERENCE MANUAL by Bram Moolenaar + + +Welcome to Vim Version 6.0! A large number of features has been added. This +file mentions all the new items that have been added, changes to existing +features and bug fixes compared to Vim 5.x. + +See |vi_diff.txt| for an overview of differences between Vi and Vim 6.0. +See |version4.txt| for differences between Vim 3.0 and Vim 4.0. +See |version5.txt| for differences between Vim 4.0 and Vim 5.0. + +INCOMPATIBLE CHANGES |incompatible-6| + +Cursor position in Visual mode |curpos-visual| +substitute command Vi compatible |substitute-CR| +global option values introduced |new-global-values| +'fileencoding' changed |fileencoding-changed| +Digraphs changed |digraphs-changed| +Filetype detection changed |filetypedetect-changed| +Unlisted buffers introduced |new-unlisted-buffers| +CTRL-U in Command-line mode changed |CTRL-U-changed| +Ctags gone |ctags-gone| +Documentation reorganized |documentation-6| +Modeless selection and clipboard |modeless-and-clipboard| +Small incompatibilities |incomp-small-6| + +NEW FEATURES |new-6| + +Folding |new-folding| +Vertically split windows |new-vertsplit| +Diff mode |new-diff-mode| +Easy Vim: click-and-type |new-evim| +User manual |new-user-manual| +Flexible indenting |new-indent-flex| +Extended search patterns |new-searchpat| +UTF-8 support |new-utf-8| +Multi-language support |new-multi-lang| +Plugin support |new-plugins| +Filetype plugins |new-filetype-plugins| +File browser |new-file-browser| +Editing files over a network |new-network-files| +Window for command-line editing |new-cmdwin| +Debugging mode |new-debug-mode| +Cursor in virtual position |new-virtedit| +Debugger interface |new-debug-itf| +Communication between Vims |new-vim-server| +Buffer type options |new-buftype| +Printing |new-printing| +Ports |ports-6| +Quickfix extended |quickfix-6| +Operator modifiers |new-operator-mod| +Search Path |new-search-path| +Writing files improved |new-file-writing| +Argument list |new-argument-list| +Restore a View |new-View| +Color schemes |new-color-schemes| +Various new items |new-items-6| + +IMPROVEMENTS |improvements-6| + +COMPILE TIME CHANGES |compile-changes-6| + +BUG FIXES |bug-fixes-6| + +VERSION 6.1 |version-6.1| +Changed |changed-6.1| +Added |added-6.1| +Fixed |fixed-6.1| + +VERSION 6.2 |version-6.2| +Changed |changed-6.2| +Added |added-6.2| +Fixed |fixed-6.2| + +VERSION 6.3 |version-6.3| +Changed |changed-6.3| +Added |added-6.3| +Fixed |fixed-6.3| + +VERSION 6.4 |version-6.4| +Changed |changed-6.4| +Added |added-6.4| +Fixed |fixed-6.4| + +============================================================================== +INCOMPATIBLE CHANGES *incompatible-6* + +These changes are incompatible with previous releases. Check this list if you +run into a problem when upgrading from Vim 5.x to 6.0 + + +Cursor position in Visual mode *curpos-visual* +------------------------------ + +When going from one window to another window on the same buffer while in +Visual mode, the cursor position of the other window is adjusted to keep the +same Visual area. This can be used to set the start of the Visual area in one +window and the end in another. In vim 5.x the cursor position of the other +window would be used, which could be anywhere and was not very useful. + + +Substitute command Vi compatible *substitute-CR* +-------------------------------- + +The substitute string (the "to" part of the substitute command) has been made +Vi compatible. Previously a CTRL-V had a special meaning and could be used to +prevent a <CR> to insert a line break. This made it impossible to insert a +CTRL-V before a line break. Now a backslash is used to prevent a <CR> to +cause a line break. Since the number of backslashes is halved, it is still +possible to insert a line break at the end of the line. This now works just +like Vi, but it's not compatible with Vim versions before 6.0. + +When a ":s" command doesn't make any substitutions, it no longer sets the '[ +and '] marks. This is not related to Vi, since it doesn't have these marks. + + +Global option values introduced *new-global-values* +------------------------------- + +There are now global values for options which are local to a buffer or window. +Previously the local options were copied from one buffer to another. When +editing another file this could cause option values from a modeline to be used +for the wrong file. Now the global values are used when entering a buffer +that has not been used before. Also, when editing another buffer in a window, +the local window options are reset to their global values. The ":set" command +sets both the local and global values, this is still compatible. But a +modeline only sets the local value, this is not backwards compatible. + +":let &opt = val" now sets the local and global values, like ":set". New +commands have been added to set the global or local value: + :let &opt = val like ":set" + :let &g:opt = val like ":setglobal" + :let &l:opt = val like ":setlocal" + + +'fileencoding' changed *fileencoding-changed* +---------------------- + +'fileencoding' was used in Vim 5.x to set the encoding used inside all of Vim. +This was a bit strange, because it was local to a buffer and worked for all +buffers. It could never be different between buffers, because it changed the +way text in all buffers was interpreted. +It is now used for the encoding of the file related to the buffer. If you +still set 'fileencoding' it is likely to be overwritten by the detected +encoding from 'fileencodings', thus it is "mostly harmless". +The old FileEncoding autocommand now does the same as the new EncodingChanged +event. + + +Digraphs changed *digraphs-changed* +---------------- + +The default digraphs now correspond to RFC1345. This is very different from +what was used in Vim 5.x. |digraphs| + + +Filetype detection changed *filetypedetect-changed* +-------------------------- + +The filetype detection previously was using the "filetype" autocommand group. +This caused confusion with the FileType event name (case is ignored). The +group is now called "filetypedetect". It still works, but if the "filetype" +group is used the autocommands will not be removed by ":filetype off". + The support for 'runtimepath' has made the "myfiletypefile" and +"mysyntaxfile" mechanism obsolete. They are still used for backwards +compatibility. + +The connection between the FileType event and setting the 'syntax' option was +previously in the "syntax" autocommand group. That caused confusion with the +Syntax event name. The group is now called "syntaxset". + +The distributed syntax files no longer contain "syntax clear". That makes it +possible to include one in the other without tricks. The syntax is now +cleared when the 'syntax' option is set (by an autocommand added from +synload.vim). This makes the syntax cleared when the value of 'syntax' does +not correspond to a syntax file. Previously the existing highlighting was +kept. + + +Unlisted buffers introduced *new-unlisted-buffers* +--------------------------- + +There is now a difference between buffers which don't appear in the buffer +list and buffers which are really not in the buffer list. Commands like +":ls", ":bnext", ":blast" and the Buffers menu will skip buffers not in the +buffer list. |unlisted-buffer| +The 'buflisted' option can be used to make a buffer appear in the buffer list +or not. + +Several commands that previously added a buffer to the buffer list now create +an unlisted buffer. This means that a ":bnext" and ":ball" will not find these +files until they have actually been edited. For example, buffers used for the +alternative file by ":write file" and ":read file". + Other commands previously completely deleted a buffer and now only remove +the buffer from the buffer list. Commands relying on a buffer not to be +present might fail. For example, a ":bdelete" command in an autocommand that +relied on something following to fail (was used in the automatic tests). +|:bwipeout| can be used for the old meaning of ":bdelete". + +The BufDelete autocommand event is now triggered when a buffer is removed from +the buffer list. The BufCreate event is only triggered when a buffer is +created that is added to the buffer list, or when an existing buffer is added +to the buffer list. BufAdd is a new name for BufCreate. +The new BufNew event is for creating any buffer and BufWipeout for really +deleting a buffer. + +When doing Insert mode completion, only buffers in the buffer list are +scanned. Added the 'U' flag to 'complete' to do completion from unlisted +buffers. + +Unlisted buffers are not stored in a viminfo file. + + +CTRL-U in Command-line mode changed *CTRL-U-changed* +----------------------------------- + +Using CTRL-U when editing the command line cleared the whole line. Most +shells only delete the characters before the cursor. Made it work like that. +(Steve Wall) + +You can get the old behavior with CTRL-E CTRL-U: > + :cnoremap <C-U> <C-E><C-U> + + +Ctags gone *ctags-gone* +---------- + +Ctags is no longer part of the Vim distribution. It's now a grown-up program +by itself, it deserves to be distributed separately. +Ctags can be found here: http://ctags.sf.net/. + + +Documentation reorganized *documentation-6* +------------------------- + +The documentation has been reorganized, an item may not be where you found it +in Vim 5.x. +- The user manual was added, some items have been moved to it from the + reference manual. +- The quick reference is now in a separate file (so that it can be printed). + +The examples in the documentation were previously marked with a ">" in the +first column. This made it difficult to copy/paste them. There is now a +single ">" before the example and it ends at a "<" or a non-blank in the first +column. This also looks better without highlighting. + +'helpfile' is no longer used to find the help tags file. This allows a user +to add its own help files (e.g., for plugins). + + +Modeless selection and clipboard *modeless-and-clipboard* +-------------------------------- + +The modeless selection is used to select text when Visual mode can't be used, +for example when editing the command line or at the more prompt. +In Vim 5.x the modeless selection was always used. On MS-Windows this caused +the clipboard to be overwritten, with no way to avoid that. The modeless +selection now obeys the 'a' and 'A' flags in 'guioptions' and "autoselect" and +"autoselectml" in 'clipboard'. By default there is no automatic copy on +MS-Windows. Use the |c_CTRL-Y| command to manually copy the selection. + +To get the old behavior back, do this: > + + :set clipboard^=autoselectml guioptions+=A + + +Small incompatibilities *incomp-small-6* +----------------------- + +'backupdir', 'cdpath', 'directory', 'equalprg', 'errorfile', 'formatprg', +'grepprg', 'helpfile', 'makeef', 'makeprg', 'keywordprg', 'cscopeprg', +'viminfo' and 'runtimepath' can no longer be set from a modeline, for better +security. + +Removed '_' from the 'breakat' default: It's commonly used in keywords. + +The default for 'mousehide' is on, because this works well for most people. + +The Amiga binary is now always compiled with "big" features. The "big" binary +archive no longer exists. + +The items "[RO]", "[+]", "[help]", "[Preview]" and "[filetype]" in +'statusline' no longer have a leading space. + +Non-Unix systems: When expanding wildcards for the Vim arguments, don't use +'suffixes'. It now works as if the shell had expanded the arguments. + +The 'lisp', 'smartindent' and 'cindent' options are not switched off when +'paste' is set. The auto-indenting is disabled when 'paste' is set, but +manual indenting with "=" still works. + +When formatting with "=" uses 'cindent' or 'indentexpr' indenting, and there +is no change in indent, this is not counted as a change ('modified' isn't set +and there is nothing to undo). + +Report 'modified' as changed when 'fileencoding' or 'fileformat' was set. +Thus it reflects the possibility to abandon the buffer without losing changes. + +The "Save As" menu entry now edits the saved file. Most people expect it to +work like this. + +A buffer for a directory is no longer added to the Buffers menu. + +Renamed <Return> to <Enter>, since that's what it's called on most keyboards. +Thus it's now the hit-enter prompt instead of the hit-return prompt. +Can map <Enter> just like <CR> or <Return>. + +The default for the 'viminfo' option is now '20,"50,h when 'compatible' isn't +set. Most people will want to use it, including beginners, but it required +setting the option, which isn't that easy. + +After using ":colder" the newer error lists are overwritten. This makes it +possible to use ":grep" to browse in a tree-like way. Must use ":cnewer 99" +to get the old behavior. + +The patterns in 'errorformat' would sometimes ignore case (MS-Windows) and +sometimes not (Unix). Now case is always ignored. Add "\C" to the pattern to +match case. + +The 16 bit MS-DOS version is now compiled without the +listcmds feature +(buffer list manipulation commands). They are not often needed and this +executable needs to be smaller. + +'sessionoptions' now includes "curdir" by default. This means that restoring +a session will result in the current directory being restored, instead of +going to the directory where the session file is located. + +A session deleted all buffers, deleting all marks. Now keep the buffer list, +it shouldn't hurt for some existing buffers to remain present. +When the argument list is empty ":argdel *" caused an error message. + +No longer put the search pattern from a tag jump in the history. + +Use "SpecialKey" highlighting for unprintable characters instead of "NonText". +The idea is that unprintable text or any text that's displayed differently +from the characters in the file is using "SpecialKey", and "NonText" is used +for text that doesn't really exist in the file. + +Motif now uses the system default colors for the menu and scrollbar. Used to +be grey. It's still possible to set the colors with ":highlight" commands and +resources. + +Formatting text with "gq" breaks a paragraph at a non-empty blank line. +Previously the line would be removed, which wasn't very useful. + +":normal" does no longer hang when the argument ends in half a command. +Previously Vim would wait for more characters to be typed, without updating +the screen. Now it pretends an <Esc> was typed. + +Bitmaps for the toolbar are no longer searched for in "$VIM/bitmaps" but in +the "bitmaps" directories in 'runtimepath'. + +Now use the Cmdline-mode menus for the hit-enter prompt instead of the Normal +mode menus. This generally works better and allows using the "Copy" menu to +produce CTRL-Y to copy the modeless selection. + +Moved the font selection from the Window to the Edit menu, together with the +other settings. + +The default values for 'isfname' include more characters to make "gf" work +better. + +Changed the license for the documentation to the Open Publication License. +This seemed fair, considering the inclusion of parts of the Vim book, which is +also published under the OPL. The downside is that we can't force someone who +would sell copies of the manual to contribute to Uganda. + +After "ayy don't let ""yy or :let @" = val overwrite the "a register. +Use the unnamed register instead. + +MSDOS: A pattern "*.*" previously also matched a file name without a dot. +This was inconsistent with other versions. + +In Insert mode, CTRL-O CTRL-\ CTRL-N {cmd} remains in Normal mode. Previously +it would go back to Insert mode, thus confusing the meaning of CTRL-\ CTRL-N, +which is supposed to take us to Normal mode (especially in ":amenu"). + +Allow using ":" commands after an operator. Could be used to implement a new +movement command. Thus it no longer aborts a pending operator. + +For the Amiga the "-d {device}" argument was possible. When compiled with the +diff feature, this no longer works. Use "-dev {device}" instead. |-dev| + +Made the default mappings for <S-Insert> in Insert mode insert the text +literally, avoids that special characters like BS cause side effects. + +Using ":confirm" applied to the rest of the line. Now it applies only to the +command right after it. Thus ":confirm if x | edit | endif" no longer works, +use ":if x | confirm edit | endif". This was the original intention, that it +worked differently was a bug. + +============================================================================== +NEW FEATURES *new-6* + +Folding *new-folding* +------- + +Vim can now display a buffer with text folded. This allows overviewing the +structure of a file quickly. It is also possible to yank, delete and put +folded text, for example to move a function to another position. + +There is a whole bunch of new commands and options related to folding. +See |folding|. + + +Vertically split windows *new-vertsplit* +------------------------ + +Windows can also be split vertically. This makes it possible to have windows +side by side. One nice use for this is to compare two similar files (see +|new-diff-mode|). The 'scrollbind' option can be used to synchronize +scrolling. + +A vertical split can be created with the commands: + :vsplit or CTRL-W v or CTRL-W CTRL-V |:vsplit| + :vnew |:vnew| + :vertical {cmd} |:vertical| +The last one is a modifier, which has a meaning for any command that splits a +window. For example: > + :vertical stag main +Will vertically split the window and jump to the tag "main" in the new window. + +Moving from window to window horizontally can be done with the |CTRL-W_h| and +|CTRL-W_l| commands. The |CTRL-W_k| and |CTRL-W_j| commands have been changed +to jump to the window above or below the cursor position. + +The vertical and horizontal splits can be mixed as you like. Resizing windows +is easy when using the mouse, just position the pointer on a status line or +vertical separator and drag it. In the GUI a special mouse pointer shape +indicates where you can drag a status or separator line. + +To resize vertically split windows use the |CTRL-W_<| and |CTRL-W_>| commands. +To make a window the maximum width use the CTRL-W | command |CTRL-W_bar|. + +To force a new window to use the full width or height of the Vim window, +these two modifiers are available: + :topleft {cmd} New window appears at the top with full + width or at the left with full height. + :botright {cmd} New window appears at the bottom with full + width or at the right with full height. +This can be combined with ":vertical" to force a vertical split: > + :vert bot dsplit DEBUG +This will open a window at the far right, occupying the full height of the Vim +window, with the cursor on the first definition of "DEBUG". +The help window is opened at the top, like ":topleft" was used, if the current +window is fewer than 80 characters wide. + +A few options can be used to set the preferences for vertically split windows. +They work similar to their existing horizontal equivalents: + horizontal vertical ~ + 'splitbelow' 'splitright' + 'winheight' 'winwidth' + 'winminheight' 'winminwidth' +It's possible to set 'winminwidth' to zero, so that temporarily unused windows +hardly take up space without closing them. + +The new 'eadirection' option tells where 'equalalways' applies: + :set eadirection=both both directions + :set eadirection=ver equalize window heights + :set eadirection=hor equalize windows widths +This can be used to avoid changing window sizes when you want to keep them. + +Since windows can become quite narrow with vertical splits, text lines will +often not fit. The 'sidescrolloff' has been added to keep some context left +and right of the cursor. The 'listchars' option has been extended with the +"precedes" item, to show a "<" for example, when there is text left off the +screen. (Utz-Uwe Haus) + +"-O" command line argument: Like "-o" but split windows vertically. (Scott +Urban) + +Added commands to move the current window to the very top (CTRL-W K), bottom +(CTRL-W J), left (CTRL-W H) and right (CTRL-W L). In the new position the +window uses the full width/height of the screen. + +When there is not enough room in the status line for both the file name and +the ruler, use up to half the width for the ruler. Useful for narrow windows. + + +Diff mode *new-diff-mode* +--------- + +In diff mode Vim shows the differences between two, three or four files. +Folding is used to hide the parts of the file that are equal. +Highlighting is used to show deleted and changed lines. +See |diff-mode|. + +An easy way to start in diff mode is to start Vim as "vimdiff file1 file2". +Added the vimdiff manpage. + +In a running Vim the |:diffsplit| command starts diff mode for the current +file and another file. The |:diffpatch| command starts diff mode using the +current file and a patch file. The |:diffthis| command starts diff mode for +the current window. + +Differences can be removed with the |:diffget| and |:diffput| commands. + +- The 'diff' option switches diff mode on in a window. +- The |:diffupdate| command refreshes the diffs. +- The 'diffopt' option changes how diffs are displayed. +- The 'diffexpr' option can be set how a diff is to be created. +- The 'patchexpr' option can be set how patch is applied to a file. +- Added the "diff" folding method. When opening a window for diff-mode, set + 'foldlevel' to zero and 'foldenable' on, to close the folds. +- Added the DiffAdd, DiffChange, DiffDelete and DiffText highlight groups to + specify the highlighting for differences. The defaults are ugly... +- Unix: make a vimdiff symbolic link for "make install". +- Removed the now obsolete "vimdiff.vim" script from the distribution. +- Added the "[c" and "]c" commands to move to the next/previous change in diff + mode. + + +Easy Vim: click-and-type *new-evim* +------------------------ + +eVim stands for "Easy Vim". This is a separate program, but can also be +started as "vim -y". + +This starts Vim with 'insertmode' set to allow click-and-type editing. The +$VIMRUNTIME/evim.vim script is used to add mappings and set options to be able +to do most things like Notepad. This is only for people who can't stand two +modes. + +eView does the same but in readonly mode. + +In the GUI a CTRL-C now only interrupts when busy with something, not when +waiting for a character. Allows using CTRL-C to copy text to the clipboard. + + +User manual *new-user-manual* +----------- + +The user manual has been added. It is organised around editing tasks. It +reads like a book, from start to end. It should allow beginners to start +learning Vim. It helps everybody to learn using the most useful Vim features. +It is much easier to read than the reference manual, but omits details. See +|user-manual|. + +The user manual includes parts of the Vim book by Steve Oualline |frombook|. +It is published under the OPL |manual-copyright|. + +When syntax highlighting is not enabled, the characters in the help file which +mark examples ('>' and '<') and header lines ('~') are replaced with a space. + +When closing the help window, the window layout is restored from before +opening it, if the window layout didn't change since then. +When opening the help window, put it at the top of the Vim window if the +current window is fewer than 80 characters and not full width. + + +Flexible indenting *new-indent-flex* +------------------ + +Automatic indenting is now possible for any language. It works with a Vim +script, which makes it very flexible to compute the indent. + +The ":filetype indent on" command enables using the provided indent scripts. +This is explained in the user manual: |30.3|. + +The 'indentexpr' option is evaluated to get the indent for a line. The +'indentkeys' option tells when to trigger re-indenting. Normally these +options are set from an indent script. Like Syntax files, indent scripts will +be created and maintained by many people. + + +Extended search patterns *new-searchpat* +------------------------ + +Added the possibility to match more than one line with a pattern. (partly by +Loic Grenie) +New items in a search pattern for multi-line matches: +\n match end-of-line, also in [] +\_[] match characters in range and end-of-line +\_x match character class and end-of-line +\_. match any character or end-of-line +\_^ match start-of-line, can be used anywhere in the regexp +\_$ match end-of-line, can be used anywhere in the regexp + +Various other new items in search patterns: +\c ignore case for the whole pattern +\C match case for the whole pattern +\m magic on for the following +\M magic off for the following +\v make following characters "very magic" +\V make following characters "very nomagic" + +\@! don't match atom before this. + Example: "foo\(bar\)\@!" matches "foo " but not "foobar". +\@= match atom, resulting in zero-width match + Example: "foo\(bar\)\@=" matches "foo" in "foobar". +\@<! don't match preceding atom before the current position +\@<= match preceding atom before the current position +\@> match preceding atom as a subexpression + +\& match only when branch before and after it match + +\%[] optionally match a list of atoms; "end\%[if]" matches "end", + "endi" and "endif" +\%(\) like \(\), but without creating a back-reference; there can be + any number of these, overcomes the limit of nine \( \) pairs +\%^ match start-of-file (Chase Tingley) +\%$ match end-of-file (Chase Tingley) +\%# Match with the cursor position. (Chase Tingley) +\? Just like "\=" but can't be used in a "?" command. + +\%23l match in line 23 +\%<23l match before line 23 +\%>23l match after line 23 +\%23c, \%<23c, \%>23c match in/before/after column 23 +\%23v, \%<23v, \%>23v match in/before/after virtual column 23 + + +For syntax items: +\z(...\) external reference match set (in region start pattern) +\z1 - \z9 external reference match use (in region skip or end pattern) + (Scott Bigham) + +\zs use position as start of match +\ze use position as end of match + +Removed limit of matching only up to 32767 times with *, \+, etc. + +Added support to match multi-byte characters. (partly by Muraoka Taro) +Made "\<" and "\>" work for UTF-8. (Muraoka Taro) + + +UTF-8 support *new-utf-8* +------------- + +Vim can now edit files in UTF-8 encoding. Up to 31 bit characters can be +used, but only 16 bit characters are displayed. Up to two combining +characters are supported, they overprint the preceding character. +Double-wide characters are also supported. See |UTF-8|. + +UCS-2, UCS-4 and UTF-16 encodings are supported too, they are converted to +UTF-8 internally. There is also support for editing Unicode files in a Latin1 +environment. Other encodings are converted with iconv() or an external +converter specified with 'charconvert'. + +Many new items for Multi-byte support: +- Added 'encoding' option: specifies character encoding used inside Vim. It + can be any 8-bit encoding, some double-byte encodings or Unicode. + It is initialized from the environment when a supported value is found. +- Added 'fileencoding' and 'fileencodings': specify character coding in a + file, similar to 'fileformat' and 'fileformats'. + When 'encoding' is "utf-8" and 'fileencodings' is "utf-8,latin1" this will + automatically switch to latin1 if a file does not contain valid UTF-8. +- Added 'bomb' option and detection of a BOM at the start of a file. Can be + used with "ucs-bom" in 'fileencodings' to automatically detect a Unicode + file if it starts with a BOM. Especially useful on MS-Windows (NT and + 2000), which uses ucs-2le files with a BOM (e.g., when exporting the + registry). +- Added the 'termencoding' option: Specifies the encoding used for the + terminal. Useful to put Vim in utf-8 mode while in a non-Unicode locale: > + :let &termencoding = &encoding + :set encoding=utf-8 +- When 'viminfo' contains the 'c' flag, the viminfo file is converted from the + 'encoding' it was written with to the current 'encoding'. +- Added ":scriptencoding" command: convert lines in a sourced script to + 'encoding'. Useful for menu files. +- Added 'guifontwide' to specify a font for double-wide characters. +- Added Korean support for character class detection. Also fix cls() in + search.c. (Chong-Dae Park) +- Win32: Typing multi-byte characters without IME. (Alexander Smishlajev) +- Win32 with Mingw: compile with iconv library. (Ron Aaron) +- Win32 with MSVC: dynamically load iconv.dll library. (Muraoka Taro) +- Make it possible to build a version with multi-byte and iconv support with + Borland 5.5. (Yasuhiro Matsumoto) +- Added 'delcombine' option: Delete combining character separately. (Ron + Aaron) +- The "xfontset" feature isn't required for "xim". These are now two + independent features. +- XIM: enable XIM when typing a language character (Insert mode, Search + pattern, "f" or "r" command). Disable XIM when typing a Normal mode + command. +- When the XIM is active, show "XIM" in the 'showmode' message. (Nam SungHyun) +- Support "CursorIM" for XIM. (Nam SungHyun) +- Added 'm' flag to 'formatoptions': When wrapping words, allow splitting at + each multibyte character, not only at a space. +- Made ":syntax keyword" work with multi-byte characters. +- Added support for Unicode upper/lowercase flipping and comparing. (based on + patch by Raphael Finkel) + Let "~" on multi-byte characters that have a third case ("title case") + switch between the three cases. (Raphael Finkel) + +Allow defining digraphs for multi-byte characters. +Added RFC1345 digraphs for Unicode. +Most Normal mode commands that accept a character argument, like "r", "t" and +"f" now accept a digraph. The 'D' flag in 'cpoptions' disables this to remain +Vi compatible. + +Added Language mapping and 'keymap' to be able to type multi-byte characters: +- Added the ":lmap" command and friends: Define mappings that are used when + typing characters in the language of the text. Also for "r", "t", etc. In + Insert and Command-line mode CTRL-^ switches the use of the mappings on/off. + CTRL-^ also toggles the use of an input method when no language mappings are + present. Allows switching the IM back on halfway typing. +- "<char-123>" argument to ":map", allows to specify the decimal, octal or + hexadecimal value of a character. +- Implemented the 'keymap' option: Load a keymap file. Uses ":lnoremap" to + define mappings for the keymap. The new ":loadkeymap" command is used in + the keymap file. +- Added 'k' flag in 'statusline': Value of "b:keymap_name" or 'keymap' when + it's being used. Uses "<lang>" when no keymap is loaded and ":lmap"s are + active. Show this text in the default statusline too. +- Added the 'iminsert' and 'imsearch' options: Specify use of langmap mappings + and Input Method with an option. (Muraoka Taro) + Added 'imcmdline' option: When set the input method is always enabled when + starting to edit a command line. Useful for a XIM that uses dead keys to + type accented characters. + Added 'imactivatekey' option to better control XIM. (Muraoka Taro) +- When typing a mapping that's not finished yet, display the last character + under the cursor in Insert mode and Command-line mode. Looks good for dead + characters. +- Made the 'langmap' option recognize multi-byte characters. But mapping only + works for 8-bit characters. Helps when using UTF-8. +- Use a different cursor for when ":lmap" mappings are active. Can specify + two highlight groups for an item in 'guicursor'. By default "lCursor" and + "Cursor" are equal, the user must set a color he likes. + Use the cursor color for hangul input as well. (Sung-Hyun Nam) +- Show "(lang)" for 'showmode' when language mapping is enabled. +- UTF-8: Made "r" work with a ":lmap" that includes a composing character. + Also works for "f", which now works to find a character that includes a + composing character. + +Other multi-byte character additions: +- Support double-byte single-width characters for euc-jp: Characters starting + with 0x8E. Added ScreenLines2[] to store the second byte. + + +Multi-language support *new-multi-lang* +---------------------- + +The messages used in Vim can be translated. Several translations are +available. This uses the gettext mechanism. It allows adding a translation +without recompiling Vim. |multi-lang| (partly by Marcin Dalecki) + +The translation files are in the src/po directory. The src/po/README.txt file +explains a few things about doing a translation. + +Menu translations are available as well. This uses the new |:menutranslate| +command. The translations are found in the runtime directory "lang". This +allows a user to add a translation. + +Added |:language| command to set the language (locale) for messages, time and +character type. This allows switching languages in Vim without changing the +locale outside of Vim. + +Made it possible to have vimtutor use different languages. (Eduardo Fernandez) +Spanish (Eduardo Fernandez), Italian (Antonio Colombo), Japanese (Yasuhiro +Matsumoto) and French (Adrien Beau) translations are included. +Added "vimtutor.bat": script to start Vim on a copy of the tutor file for +MS-Windows. (Dan Sharp) + +- Added v:lang variable to be able to get current language setting. + (Marcin Dalecki) Also v:lc_time and v:ctype. +- Make it possible to translate the dialogs used by the menus. Uses global + "menutrans_" variables. ":menutrans clear" deletes them. +- removed "broken locale" (Marcin Dalecki). +- Don't use color names in icons, use RGB values. The names could be + translated. +- Win32: Added global IME support (Muraoka) +- Win32: Added dynamic loading of IME support. +- ":messages" prints a message about who maintains the messages or the + translations. Useful to find out where to make a remark about a wrong + translation. +- --disable-nls argument for configure: Disable use of gettext(). (Sung-Hyun + Nam) +- Added NLS support for Win32 with the MingW compiler. (Eduardo Fernandez) +- When available, call bind_textdomain_codeset() to have gettext() translate + messages to 'encoding'. This requires GNU gettext 0.10.36 or later. +- Added gettext support for Win32. This means messages will be translated + when the locale is set and libintl.dll can be found. (Muraoka Taro) + Also made it work with MingW compiler. (Eduardo Fernandez) + Detect the language and set $LANG to get the appropriate translated messages + (if supported). Also use $LANG to select a language, v:lang is a very + different kind of name. +- Made gvimext.dll use translated messages, if possible. (Yasuhiro Matsumoto) + + +Plugin support *new-plugins* +-------------- + +To make it really easy to load a Vim script when starting Vim, the "plugin" +runtime directory can be used. All "*.vim" files in it will be automatically +loaded. For Unix, the directory "~/.vim/plugin" is used by default. The +'runtimepath' option can be set to look in other directories for plugins. +|load-plugins| |add-plugin| + +The |:runtime| command has been added to load one or more files in +'runtimepath'. + +Standard plugins: +netrw.vim - Edit files over a network |new-network-files| +gzip.vim - Edit compressed files +explorer.vim - Browse directories |new-file-browser| + +Added support for local help files. |add-local-help|. +When searching for help tags, all "doc/tags" files in 'runtimepath' are used. +Added the ":helptags" command: Generate a tags file for a help directory. +The first line of each help file is automagically added to the "LOCAL +ADDITIONS" section in doc/help.txt. + +Added the <unique> argument to ":map": only add a mapping when it wasn't +defined before. + +When displaying an option value with 'verbose' set will give a message about +where the option was last set. Very useful to find out which script did set +the value. + +The new |:scriptnames| command displays a list of all scripts that have been +sourced. + +GUI: For Athena, Motif and GTK look for a toolbar bitmap in the "bitmaps" +directories in 'runtimepath'. Allows adding your own bitmaps. + + +Filetype plugins *new-filetype-plugins* +----------------- + +A new group of files has been added to do settings for specific file types. +These can be options and mappings which are specifically used for one value of +'filetype'. + +The files are located in "$VIMRUNTIME/ftplugin". The 'runtimepath' option +makes it possible to use several sets of plugins: Your own, system-wide, +included in the Vim distribution, etc. + +To be able to make this work, several features were added: +- Added the "s:" variables, local to a script. Avoids name conflicts with + global variables. They can be used in the script and in functions, + autocommands and user commands defined in the script. They are kept between + invocations of the same script. |s:var| +- Added the global value for local options. This value is used when opening + a new buffer or editing another file. The option value specified in a + modeline or filetype setting is not carried over to another buffer. + ":set" sets both the local and the global value. + ":setlocal" sets the local option value only. + ":setglobal" sets or displays the global value for a local option. + ":setlocal name<" sets a local option to its global value. +- Added the buffer-local value for some global options: 'equalprg', 'makeprg', + 'errorformat', 'grepprg', 'path', 'dictionary', 'thesaurus', 'tags', + 'include' and 'define'. This allows setting a local value for these global + options, without making it incompatible. +- Added mappings and abbreviations local to a buffer: ":map <buffer>". +- In a mapping "<Leader>" can be used to get the value of the "mapleader" + variable. This simplifies mappings that use "mapleader". "<Leader>" + defaults to "\". "<LocalLeader>" does the same with "maplocalleader". This + is to be used for mappings local to a buffer. +- Added <SID> Script ID to define functions and mappings local to a script. +- Added <script> argument to ":noremap" and ":noremenu": Only remap + script-local mappings. Avoids that mappings from other scripts get in the + way, but does allow using mappings defined in the script. +- User commands can be local to a buffer: ":command -buffer". + +The new ":setfiletype" command is used in the filetype detection autocommands, +to avoid that 'filetype' is set twice. + + +File browser *new-file-browser* +------------ + +When editing a directory, the explorer plugin will list the files in the +directory. Pressing <Enter> on a file name edits that file. Pressing <Enter> +on a directory moves the browser to that directory. + +There are several other possibilities, such as opening a file in the preview +window, renaming files and deleting files. + + +Editing files over a network *new-network-files* +---------------------------- + +Files starting with scp://, rcp://, ftp:// and http:// are recognized as +remote files. An attempt is made to access these files with the indicated +method. For http:// only reading is possible, for the others writing is also +supported. Uses the netrw.vim script as a standard "plugin". |netrw| + +Made "gf" work on a URL. It no longer assumes the file is local on the +computer (mostly didn't work anyway, because the full path was required). +Adjusted test2 for this. + +Allow using a URL in 'path'. Makes ":find index.html" work. + +GTK: Allow dropping a http:// and ftp:// URL on Vim. The netrw plugin takes +care of downloading the file. (MiKael Berthe) + + +Window for command-line editing *new-cmdwin* +------------------------------- + +The Command-line window can be used to edit a command-line with Normal and +Insert mode commands. When it is opened it contains the history. This allows +copying parts of previous command lines. |cmdwin| + +The command-line window can be opened from the command-line with the key +specified by the 'cedit' option (like Nvi). It can also be opened directly +from Normal mode with "q:", "q/" and "q?". + +The 'cmdwinheight' is used to specify the initial height of the window. + +In Insert mode CTRL-X CTRL-V can be used to complete an Ex command line, like +it's done on the command-line. This is also useful for writing Vim scripts! + +Additionally, there is "improved Ex mode". Entered when Vim is started as +"exim" or "vim -E", and with the "gQ" command. Works like repeated use of +":", with full command-line editing and completion. (Ulf Carlsson) + + +Debugging mode *new-debug-mode* +-------------- + +In debugging mode sourced scripts and user functions can be executed line by +line. There are commands to step over a command or step into it. |debug-mode| + +Breakpoints can be set to run until a certain line in a script or user +function is executed. |:breakadd| + +Debugging can be started with ":debug {cmd}" to debug what happens when a +command executes. The |-D| argument can be used to debug while starting up. + + +Cursor in virtual position *new-virtedit* +-------------------------- + +Added the 'virtualedit' option: Allow positioning the cursor where there is no +actual character in Insert mode, Visual mode or always. (Matthias Kramm) +This is especially useful in Visual-block mode. It allows positioning a +corner of the area where there is no text character. (Many improvements by +Chase Tingley) + + +Debugger interface *new-debug-itf* +------------------ + +This was originally made to work with Sun Visual Workshop. (Gordon Prieur) +See |debugger.txt|, |sign.txt| and |workshop.txt|. + +Added the ":sign" command to define and place signs. They can be displayed +with two ASCII characters or an icon. The line after it can be highlighted. +Useful to display breakpoints and the current PC position. + +Added the |:wsverb| command to execute debugger commands. + +Added balloon stuff: 'balloondelay' and 'ballooneval' options. + +Added "icon=" argument for ":menu". Allows defining a specific icon for a +ToolBar item. + + +Communication between Vims *new-vim-server* +-------------------------- + +Added communication between two Vims. Makes it possible to send commands from +one Vim to another. Works for X-Windows and MS-Windows |clientserver|. + +Use "--remote" to have files be edited in an already running Vim. +Use "--remote-wait" to do the same and wait for the editing to finish. +Use "--remote-send" to send commands from one Vim to another. +Use "--remote-expr" to have an expression evaluated in another Vim. +Use "--serverlist" to list the currently available Vim servers. (X only) +There are also functions to communicate between the server and the client. +|remote_send()| |remote_expr()| + +(X-windows version implemented by Flemming Madsen, MS-Windows version by Paul +Moore) + +Added the command server name to the window title, so you can see which server +name belongs to which Vim. + +Removed the OleVim directory and SendToVim.exe and EditWithVim.exe from the +distribution. Can now use "gvim --remote" and "gvim --remote-send", which is +portable. + +GTK+: Support running Vim inside another window. Uses the --socketid argument +(Neil Bird) + + +Buffer type options *new-buftype* +------------------- + +The 'buftype' and 'bufhidden' options have been added. They can be set to +have different kinds of buffers. For example: +- 'buftype' = "quickfix": buffer with error list +- 'buftype' = "nofile" and 'bufhidden' = "delete": scratch buffer that will be + deleted as soon as there is no window displaying it. + +'bufhidden' can be used to overrule the 'hidden' option for one buffer. + +In combination with 'buflisted' and 'swapfile' this offers the possibility to +use various kinds of special buffers. See |special-buffers|. + + +Printing *new-printing* +-------- + +Included first implementation of the ":hardcopy" command for printing +to paper. For MS-Windows any installed printer can be used. For other +systems a PostScript file is generated, which can be printed with the +'printexpr' option. +(MS-Windows part by Vince Negri, Vipin Aravind, PostScript by Vince Negri and +Mike Williams) + +Made ":hardcopy" work with multi-byte characters. (Muraoka Taro, Yasuhiro +Matsumoto) + +Added options to tune the way printing works: (Vince Negri) +- 'printoptions' defines various things. +- 'printheader' specifies the header format. Added "N" field to 'statusline' + for the page number. +- 'printfont' specifies the font name and attributes. +- 'printdevice' defines the default printer for ":hardcopy!". + + +Ports *ports-6* +----- + +Port to OS/390 Unix (Ralf Schandl) +- A lot of changes to handle EBCDIC encoding. +- Changed Ctrl('x') to Ctrl_x define. + +Included jsbmouse support. (Darren Garth) +Support for dec mouse in Unix. (Steve Wall) + +Port to 16-bit MS Windows (Windows 3.1x) (Vince Negri) + +Port to QNX. Supports the Photon GUI, mouse, etc. (Julian Kinraid) + +Allow cross-compiling the Win32 version with Make_ming.mak. (Ron Aaron) +Added Python support for compiling with Mingw. (Ron Aaron) + +Dos 32 bit: Added support the Windows clipboard. (David Kotchan) + +Win32: Dynamically load Perl and Python. Allows compiling Vim with these +interfaces and will try to find the DLLs at runtime. (Muraoka Taro) + +Compiling the Win32 GUI with Cygwin. Also compile vimrun, dosinst and +uninstall. (Gerfried) + +Mac: Make Vim compile with the free MPW compiler supplied by Apple. And +updates for CodeWarrior. (Axel Kielhorn) + +Added typecasts and ifdefs as a start to make Vim work on Win64 (George +Reilly) + + +Quickfix extended *quickfix-6* +----------------- + +Added the "error window". It contains all the errors of the current error +list. Pressing <Enter> in a line makes Vim jump to that line (in another +window). This makes it easy to navigate through the error list. +|quickfix-window|. + +- |:copen| opens the quickfix window. +- |:cclose| closes the quickfix window. +- |:cwindow| takes care that there is a quickfix window only when there are + recognized errors. (Dan Sharp) + +- Quickfix also knows "info", next to "warning" and "error" types. "%I" can be + used for the start of a multi-line informational message. (Tony Leneis) +- The "%p" argument can be used in 'errorformat' to get the column number from + a line where "^" points to the column. (Stefan Roemer) +- When using "%f" in 'errorformat' on a DOS/Windows system, also include "c:" + in the filename, even when using "%f:". + + +Operator modifiers *new-operator-mod* +------------------ + +Insert "v", "V" or CTRL-V between an operator and a motion command to force +the operator to work characterwise, linewise or blockwise. |o_v| + + +Search Path *new-search-path* +----------- + +Vim can search in a directory tree not only in downwards but also upwards. +Works for the 'path', 'cdpath' and 'tags' options. (Ralf Schandl) + +Also use "**" for 'tags' option. (Ralf Schandl) + +Added 'includeexpr', can be used to modify file name found by 'include' +option. +Also use 'includeexpr' for "gf" and "<cfile>" when the file can't be found +without modification. Useful for doing "gf" on the name after an include or +import statement. + +Added the 'cdpath' option: Locations to find a ":cd" argument. (Raf) + +Added the 'suffixesadd' option: Suffixes to be added to a file name when +searching for a file for the "gf", "[I", etc. commands. + + +Writing files improved *new-file-writing* +---------------------- + +Added the 'backupcopy' option: Select whether a file is to be copied or +renamed to make a backup file. Useful on Unix to speed up writing an ordinary +file. Useful on other systems to preserve file attributes and when editing a +file on a Unix filesystem. + +Added the 'autowriteall' option. Works like 'autowrite' but for more +commands. + +Added the 'backupskip' option: A list of file patterns to skip making a backup +file when it matches. The default for Unix includes "/tmp/*", this makes +"crontab -e" work. + +Added support for Access Control Lists (ACL) for FreeBSD and Win32. The ACL +is copied from the original file to the new file (or the backup if it's +copied). +ACL is also supported for AIX, Solaris and generic POSIX. (Tomas Ogren) +And on SGI. + + +Argument list *new-argument-list* +------------- + +The support for the argument list has been extended. It can now be +manipulated to contain the files you want it to contain. + +The argument list can now be local to a window. It is created with the +|:arglocal| command. The |:argglobal| command can be used to go back to the +global argument list. + +The |:argdo| command executes a command on all files in the argument list. + +File names can be added to the argument list with |:argadd|. File names can +be removed with |:argdelete|. + +"##" can be used like "#", it is replaced by all the names in the argument +list concatenated. Useful for ":grep foo ##". + +The |:argedit| adds a file to the argument list and edits it. Like ":argadd" +and then ":edit". + + +Restore a View *new-View* +-------------- + +The ":mkview" command writes a Vim script with the settings and mappings for +one window. When the created file is sourced, the view of the window is +restored. It's like ":mksession" for one window. +The View also contains the local argument list and manually created, opened +and closed folds. + +Added the ":loadview" command and the 'viewdir' option: Allows for saving and +restoring views of a file with simple commands. ":mkview 1" saves view 1 for +the current file, ":loadview 1" loads it again. Also allows quickly switching +between two views on one file. And saving and restoring manual folds and the +folding state. + +Added 'viewoptions' to specify how ":mkview" works. + +":mksession" now also works fine with vertical splits. It has been further +improved and restores the view of each window. It also works properly with +preview and quickfix windows. + +'sessionoptions' is used for ":mkview" as well. +Added "curdir" and "sesdir" to 'sessionoptions'. Allows selection of what +the current directory will be restored to. + +The session file now also contains the argument list(s). + + +Color schemes *new-color-schemes* +------------- + +Support for loading a color scheme. Added the ":colorscheme" command. +Automatically add menu entries for available schemes. +Should now properly reset the colors when 'background' or 't_Co' is changed. +":highlight clear" sets the default colors again. +":syntax reset" sets the syntax highlight colors back to the defaults. +For ":set bg&" guess the value. This allows a color scheme to switch back to +the default colors. +When syntax highlighting is switched on and a color scheme was defined, reload +the color scheme to define the colors. + + +Various new items *new-items-6* +----------------- + +Normal mode commands: ~ + +"gi" Jump to the ^ mark and start Insert mode. Also works when the + mark is just after the line. |gi| + +"g'm" and "g`m" + Jump to a mark without changing the jumplist. Now you can use + g`" to jump to the last known position in a file without side + effects. Also useful in mappings. + +[', [`, ]' and ]` + move the cursor to the next/previous lowercase mark. + +g_ Go to last non-blank in line. (Steve Wall) + + +Options: ~ + +'autoread' When detected that a file changed outside of Vim, + automatically read a buffer again when it's not changed. + It has a global and a local value. Use ":setlocal autoread<" + to go back to using the global value for 'autoread'. + +'debug' When set to "msg" it will print error messages that would + otherwise be omitted. Useful for debugging 'indentexpr' and + 'foldexpr'. + +'lispwords' List of words used for lisp indenting. It was previously hard + coded. Added a number of Lisp names to the default. + +'fold...' Many new options for folding. + +'modifiable' When off, it is impossible to make changes to a buffer. + The %m and %M items in 'statusline' show a '-'. + +'previewwindow' Set in the preview window. Used in a session file to mark a + window as the preview window. + +'printfont' +'printexpr' +'printheader' +'printdevice' +'printoptions' for ":hardcopy". + +'buflisted' Makes a buffer appear in the buffer list or not. + +Use "vim{version}:" for modelines, only to be executed when the version is +>= {version}. Also "vim>{version}", "vim<{version}" and "vim={version}". + + +Ex commands: ~ + +:sav[eas][!] {file} + Works like ":w file" and ":e #", but without loading the file + again and avoiding other side effects. |:saveas| + +:silent[!] {cmd} + Execute a command silently. Also don't use a delay that would + come after the message. And don't do 'showmatch'. + RISCOS: Removed that "!~cmd" didn't output anything, and + didn't wait for <Enter> afterwards. Can use ":silent !cmd" + now. +:menu <silent> Add a menu that won't echo Ex commands. +:map <silent> Add a mapping that won't echo Ex commands. + +:checktime Check for changed buffers. + +:verbose {cmd} Set 'verbose' for one command. + +:echomsg {expr} +:echoerr {expr} Like ":echo" but store the message in the history. (Mark + Waggoner) + +:grepadd Works just like ":grep" but adds to the current error list + instead of defining a new list. |:grepadd| + +:finish Finish sourcing a file. Can be used to skip the rest of a Vim + script. |:finish| + +:leftabove +:aboveleft Split left/above current window. + +:rightbelow +:belowright Split right/below current window. + +:first, :bfirst, :ptfirst, etc. + Alias for ":rewind". It's more logical compared to ":last". + +:enew Edit a new, unnamed buffer. This is needed, because ":edit" + re-edits the same file. (Wall) + +:quitall Same as ":qall". + +:match Define match highlighting local to a window. Allows + highlighting an item in the current window without interfering + with syntax highlighting. + +:menu enable +:menu disable Commands to enable/disable menu entries without removing them. + (Monish Shah) + +:windo Execute a command in all windows. +:bufdo Execute a command in all buffers. + +:wincmd Window (CTRL-W) command. Useful when a Normal mode command + can't be used (e.g., for a CursorHold autocommand). See + |CursorHold-example| for a nice application with it. + +:lcd and :lchdir + Set local directory for a window. (Benjie Chen) + +:hide {command} + Execute {command} with 'hidden' set. + +:emenu in Visual mode to execute a ":vmenu" entry. + +:popup Pop up a popup menu. + +:redraw Redraw the screen even when busy with a script or function. + +:hardcopy Print to paper. + +:compiler Load a Vim script to do settings for a specific compiler. + +:z# List numbered lines. (Bohdan Vlasyuk) + + +New marks: ~ + +'( and ') Begin or end of current sentence. Useful in Ex commands. +'{ and '} Begin or end of current paragraph. Useful in Ex commands. +'. Position of the last change in the current buffer. +'^ Position where Insert mode was stopped. + +Store the ^ and . marks in the viminfo file. Makes it possible to jump to the +last insert position or changed text. + + +New functions: ~ +argidx() Current index in argument list. +buflisted() Checks if the buffer exists and has 'buflisted' set. +cindent() Get indent according to 'cindent'. +eventhandler() Returns 1 when inside an event handler and interactive + commands can't be used. +executable() Checks if a program or batch script can be executed. +filewritable() Checks if a file can be written. (Ron Aaron) +foldclosed() Find out if there is a closed fold. (Johannes Zellner). +foldcloseend() Find the end of a closed fold. +foldlevel() Find out the foldlevel. (Johannes Zellner) +foreground() Move the GUI window to the foreground. +getchar() Get one character from the user. Can be used to define a + mapping that takes an argument. +getcharmod() Get last used key modifier. +getbufvar() gets the value of an option or local variable in a buffer (Ron + Aaron) +getfsize() Return the size of a file. +getwinvar() gets the value of an option or local variable in a window (Ron + Aaron) +globpath() Find matching files in a list of directories. +hasmapto() Detect if a mapping to a string is already present. +iconv() Convert a string from one encoding to another. +indent() gets the indent of a line (Ron Aaron) +inputdialog() Like input() but use a GUI dialog when possible. Currently + only works for Win32, Motif, Athena and GTK. + Use inputdialog() for the Edit/Settings/Text Width menu. Also + for the Help/Find.. and Toolbar FindHelp items. + (Win32 support by Thore B. Karlsen) + (Win16 support by Vince Negri) +inputsecret() Ask the user to type a string without showing the typed keys. + (Charles Campbell) +libcall() for Unix (Neil Bird, Johannes Zellner, Stephen Wall) +libcallnr() for Win32 and Unix +lispindent() Get indent according to 'lisp'. +mode() Return a string that indicates the current mode. +nextnonblank() Skip blank lines forwards. +prevnonblank() Skip blank lines backwards. Useful to for indent scripts. +resolve() MS-Windows: resolve a shortcut to the file it points to. + Unix: resolve a symbolic link. +search() Search for a pattern. +searchpair() Search for matching pair. Can be used in indent files to find + the "if" matching an endif. +setbufvar() sets an option or variable local to a buffer (Ron Aaron) +setwinvar() sets an option or variable local to a window (Ron Aaron) +stridx() Search for first occurrence of one string in another. +strridx() Search for last occurrence of one string in another. +tolower() Convert string to all-lowercase. +toupper() Convert string to all-uppercase. +type() Check the type of an expression. +wincol() window column of the cursor +winwidth() Width of a window. (Johannes Zellner) +winline() window line of the cursor + + +Added expansion of curly braces in variable and function names. This can be +used for variable names that include the value of an option. Or a primitive +form of arrays. (Vince Negri) + + +New autocommand events: ~ +BufWinEnter Triggered when a buffer is displayed in a window, after using + the modelines. Can be used to load a view. +BufWinLeave Triggered when a buffer is no longer in a window. Also + triggered when exiting Vim. Can be used to save views. +FileChangedRO Triggered before making the first change to a read-only file. + Can be used to check-out the file. (Scott Graham) +TermResponse Triggered when the terminal replies to the version-request. + The v:termresponse internal variable holds the result. Can be + used to react to the version of the terminal. (Ronald Schild) +FileReadCmd Triggered before reading a file. +BufReadCmd Triggered before reading a file into a buffer. +FileWriteCmd Triggered before writing a file. +BufWriteCmd Triggered before writing a buffer into a file. +FileAppendCmd Triggered before appending to a file. +FuncUndefined Triggered when a user function is not defined. (Ron Aaron) + +The autocommands for the *Cmd events read or write the file instead of normal +file read/write. Use this in netrw.vim to be able to edit files on a remote +system. (Charles Campbell) + + +New Syntax files: ~ + +bdf BDF font definition (Nikolai Weibull) +catalog SGML catalog (Johannes Zellner) +debchangelog Debian Changelog (Wichert Akkerman) +debcontrol Debian Control (Wichert Akkerman) +dot dot (Markus Mottl) +dsl DSSSL syntax (Johannes Zellner) +eterm Eterm configuration (Nikolai Weibull) +indent Indent profile (Nikolai Weibull) +lftp LFTP (Nikolai Weibull) +lynx Lynx config (Doug Kearns) +mush mush sourcecode (Bek Oberin) +natural Natural (Marko Leipert) +pilrc Pal resource compiler (Brian Schau) +plm PL/M (Philippe Coulonges) +povini Povray configuration (David Necas) +ratpoison Ratpoison config/command (Doug Kearns) +readline readline config (Nikolai Weibull) +screen Screen RC (Nikolai Weibull) +specman Specman (Or Freund) +sqlforms SQL*Forms (Austin Ziegler) +terminfo terminfo (Nikolai Weibull) +tidy Tidy configuration (Doug Kearns) +wget Wget configuration (Doug Kearns) + + +Updated many syntax files to work both with Vim 5.7 and 6.0. + +Interface to Ruby. (Shugo Maeda) +Support dynamic loading of the Ruby interface on MS-Windows. (Muraoka Taro) +Support this for Mingw too. (Benoit Cerrina) + +Win32: Added possibility to load TCL dynamically. (Muraoka Taro) +Also for Borland 5.5. (Dan Sharp) + +Win32: When editing a file that is a shortcut (*.lnk file), edit the file it +links to. Unless 'binary' is set, then edit the shortcut file itself. +(Yasuhiro Matsumoto) + +The ":command" command now accepts a "-bar" argument. This allows the user +command to be followed by "| command". + +The preview window is now also used by these commands: +- |:pedit| edits the specified file in the preview window +- |:psearch| searches for a word in included files, like |:ijump|, and + displays the found text in the preview window. +Added the CTRL-W P command: go to preview window. + +MS-DOS and MS-Windows also read the system-wide vimrc file $VIM/vimrc. Mostly +for NT systems with multiple users. + +A double-click of the mouse on a character that has a "%" match selects from +that character to the match. Similar to "v%". + +"-S session.vim" argument: Source a script file when starting up. Convenient +way to start Vim with a session file. + +Added "--cmd {command}" Vim argument to execute a command before a vimrc file +is loaded. (Vince Negri) + +Added the "-M" Vim argument: reset 'modifiable' and 'write', thus disallow +making changes and writing files. + +Added runtime/delmenu.vim. Source this to remove all menus and prepare for +loading new menus. Useful when changing 'langmenu'. + +Perl script to filter Perl error messages to quickfix usable format. (Joerg +Ziefle) + +Added runtime/macros/less.vim: Vim script to simulate less, but with syntax +highlighting. + +MS-Windows install program: (Jon Merz) +- The Win32 program can now create shortcuts on the desktop and install Vim in + the Start menu. +- Possibly remove old "Edit with Vim" entries. +- The Vim executable is never moved or $PATH changed. A small batch file is + created in a directory in $PATH. Fewer choices to be made. +- Detect already installed Vim versions and offer to uninstall them first. + +Improved the MS-Windows uninstal program. It now also deletes the entries in +the Start menu, icons from the desktop and the created batch files. (Jon Merz) +Also made it possible to delete only some of these. Also unregister gvim for +OLE. + +Generate a self-installing Vim package for MS-Windows. This uses NSIS. (Jon +Merz et al.) + +Added ":filetype detect". Try detecting the filetype again. Helps when +writing a new shell script, after adding "#!/bin/csh". + +Added ":augroup! name" to delete an autocommand group. Needed for the +client-server "--remote-wait". + +Add the Vim version number to the viminfo file, useful for debugging. + +============================================================================== +IMPROVEMENTS *improvements-6* + +Added the 'n' flag in 'cpoptions': When omitted text of wrapped lines is not +put between line numbers from 'number' option. Makes it a lot easier to read +wrapped lines. + +When there is a format error in a tags file, the byte position is reported so +that the error can be located. + +"gf" works in Visual mode: Use the selected text as the file name. (Chase +Tingley) + +Allow ambiguous mappings. Thus "aa" and "aaa" can both be mapped, the longest +matching one is used. Especially useful for ":lmap" and 'keymap'. + +Encryption: Ask the key to be typed twice when crypting the first time. +Otherwise a typo might cause the text to be lost forever. (Chase Tingley) + +The window title now has "VIM" on the end. The file name comes first, useful +in the taskbar. A "+" is added when the file is modified. "=" is added for +a read-only file. "-" is added for a file with 'modifiable' off. + +In Visual mode, mention the size of the selected area in the 'showcmd' +position. + +Added the "b:changedtick" variable. Incremented at each change, also for +undo. Can be used to take action only if the buffer has been changed. + +In the replacement string of a ":s" command "\=" can be used to replace with +the result of an expression. From this expression the submatch() function can +be used to access submatches. + +When doing ":qall" and there is a change in a buffer that is being edited in +another window, jump to that window, instead of editing that buffer in the +current window. + +Added the "++enc=" and "++ff=" arguments to file read/write commands to force +using the given 'encoding' or 'fileformat'. And added the "v:cmdarg" +variable, to be used for FileReadCmd autocommands that read/write the file +themselves. + +When reading stdin, first read the text in binary mode and then re-read it +with automatic selection of 'fileformat' and 'fileencoding'. This avoids +problems with not being able to rewind the file (e.g., when a line near the +end of the file ends in LF instead of CR-LF). +When reading text from stdin and the buffer is empty, don't mark it changed. +Allows exiting without trouble. + +Added an ID to many error messages. This will make it easier to find help for +a message. + +Insert mode: +- "CTRL-G j" and "CTRL-G k" can be used to insert in another line in the same + column. Useful for editing a table. +- Added Thesaurus completion with CTRL-X CTRL-T. (Vince Negri) +- Added the 'thesaurus' option, to use instead of 'dictionary' for thesaurus + completion. Added the 's' flag in 'complete'. +- Made CTRL-X CTRL-L in Insert mode use the 'complete' option. It now also + scans other loaded buffers for matching lines. +- CTRL-R now also works in Insert mode while doing completion with CTRL-X or + CTRL-N. (Neil Bird) +- When doing Insert mode completion, when completion is finished check for a + match with words from 'cinkeys' or 'indentkeys'. + +Performance: +- Made display updating more efficient. Insert/delete lines may be used for + all changes, also for undo/redo. +- The display is not redrawn when there is typeahead in Insert mode. Speeds + up CTRL-R a lot. +- Improved speed of screen output for 32 bit DOS version. (Vince Negri) +- When dragging with the mouse, there is a lookahead to skip mouse codes when + there is another one next. Makes dragging with the mouse a lot faster. +- Also a memory usage improvement: When calling u_save with a single line, + don't save it if the line was recently saved for the same undo already. +- When using a script that appends one character at a time, the amount of + allocated memory was growing steadily. Also when 'undolevels' is -1. + Caused by the line saved for "U" never to be freed. Now free an undo block + when it becomes empty. +- GUI and Dos32: Use a vertical scroll region, to make scrolling in a + vertically split window faster. No need to redraw the whole window. +- When scrolling isn't possible with terminal codes (e.g., for a vertically + split window) redraw from ScreenLines[]. That should be faster than going + through the lines with win_line(), especially when using syntax + highlighting. +- The Syntax menu is now pre-generated by a separate script. Makes loading + the menu 70% faster. This can halve the startup time of gvim. +- When doing ":help tag", don't open help.txt first, jump directly to the help + tag. It's faster and avoids an extra message. +- Win32: When a file name doesn't end in ".lnk" don't try resolving a + shortcut, it takes quite a bit of time. +- Don't update the mouse pointer shape while there are typeahead characters. +- Change META[] from a string into an array, avoids using strchr() on it. +- Don't clear the command line when adding characters, avoids that screen_fill + is called but doesn't do anything. + +Robustness: +- Unix: Check for running out of stack space when executing a regexp. Avoids + a nasty crash. Only works when the system supports running the signal + function on another stack. +- Disallow ":source <dirname>". On unix it's possible to read a directory, + does not make sense to use it as Vim commands. + +Security: +- When reading from or writing to a temporary file, check that it isn't a + symbolic link. Gives some protection against symlink attacks. +- When creating a backup file copy or a swap file, check for it already + existing to avoid a symlink attack. (Colin Phipps) +- Evaluating options which are an expression is done in a |sandbox|. If the + option was set by a modeline, it cannot cause damage. +- Use a secure way to generate temp file names: Create a private directory for + temp files. Used for Unix, MS-DOS and OS/2. +- 'makeef' can be empty, which means that an internally generated file name is + used. The old default was "/tmp/file", which is a security risk. + Writing 'makeef' in the current directory fails in a read-only directory and + causes trouble when using ":grep" on all files. Made the default empty for + all systems, so that a temp file is used. +- The command from a tags file is executed in the sandbox for better security. +- The Ruby, Tcl and Python interfaces cannot be used from the sandbox. They + might do dangerous things. Perl is still possible, but limited to the Safe + environment. (Donnie Smith) + +Syntax highlighting: +- Optimized the speed by caching the state stack all over the file, not just + the part being displayed. Required for folding. +- Added ":syntax sync fromstart": Always parse from the start of the file. +- Added the "display" argument for syntax items: use the item only when + displaying the result. Can make parsing faster for text that isn't going to + be displayed. +- When using CTRL-L, the cached states are deleted, to force parsing the text + again. +- Use elfhash algorithm for table of keywords. This should give a better + distribution and speedup keyword lookup. (Campbell) +- Also allow the "lc" leading context for skip and end patterns. (Scott + Bigham) +- Syntax items can have the "extend" argument to undo the effect of a + "keepend" argument of an item it is contained in. Makes it possible to have + some contained items extend a region while others don't. +- ":syntax clear" now deletes the b:current_syntax variable. That's logical, + since no syntax is defined after this command. +- Added ":syntax enable": switch on syntax highlighting without changing the + colors. This allows specifying the colors in the .vimrc file without the + need for a mysyntaxfile. +- Added ":syntax reset": reset the colors to their defaults. +- Added the "contains=TOP" and "contains=CONTAINED" arguments. Makes it + possible to define a transparent item that doesn't contain itself. +- Added a "containedin" argument to syntax items. Allows adding a contained + item to an existing item (e.g., to highlight a name in a comment). + +Modeless selection: +- When in the command-line window, use modeless selection in the other + windows. Makes it possible to copy visible text to the command-line window. +- Support modeless selection on the cmdline in a terminal. Previously it was + only possible for the GUI. +- Make double-right-click in modeless selection select a whole word. Single + right click doesn't use the word selection started by a double-left-click. + Makes it work like in Visual mode. +- The modeless selection no longer has an implied automatic copy to the + clipboard. It now obeys the 'a' and 'A' flags in 'guioptions' or + "autoselect" and "autoselectml" in 'clipboard'. +- Added the CTRL-Y command in Cmdline-mode to copy the modeless selection to + the clipboard. Also works at the hit-enter prompt and the more prompt. + Removed the mappings in runtime/mswin.vim for CTRL-Y and CTRL-Z in + cmdline-mode to be able to use CTRL-Y in the new way. + +Reduced the amount of stack space used by regmatch() to allow it to handle +complicated patterns on a longer text. + +'isfname' now includes '%' and '#'. Makes "vim dir\#file" work for MS-DOS. + +Added keypad special keys <kEnter>, <k0> - <k9>. When not mapped they behave +like the ASCII equivalent. (Ivan Wellesz and Vince Negri) +Recognize a few more xterm keys: <C-Right>, <C-Left>, <C-End>, <C-Home> + +Also trigger the BufUnload event when Vim is going to exit. Perhaps a script +needs to do some cleaning up. + +Expand expression in backticks: `={expr}`. Can be used where backtick +expansion is done. (Vince Negri) + +GUI: +- Added 'L' and 'R' flags in 'guioptions': Add a left or right scrollbar only + when there is a vertically split window. +- X11: When a color can't be allocated, use the nearest match from the + colormap. This avoids that black is used for many things. (Monish Shah) + Also do this for the menu and scrollbar, to avoid that they become black. +- Win32 and X11: Added 'mouseshape' option: Adjust the mouse pointer shape to + the current mode. (Vince Negri) +- Added the 'linespace' option: Insert a pixel line between lines. (Nam) +- Allow modeless selection (without moving the cursor) by keeping CTRL and + SHIFT pressed. (Ivan Wellesz) +- Motif: added toolbar. (Gordon Prieur) Also added tooltips. +- Athena: added toolbar and tooltips. (David Harrison -- based on Gordon + Prieur's work) +- Made the 'toolbar' option work for Athena and Motif. Can now switch between + text and icons on the fly. (David Harrison) +- Support menu separator lines for Athena. (David Harrison) +- Athena: Adjust the arrow pixmap used in a pullright menu to the size of the + font. (David Harrison) +- Win32: Added "c" flag to 'guifont' to be able to specify the charset. (Artem + Khodush) +- When no --enable-xim argument is given, automatically enable it when a X GUI + is used. Required for dead key support (and multi-byte input). +- After a file selection dialog, check that the edited files were not changed + or deleted. The Win32 dialog allows deleting and renaming files. +- Motif and Athena: Added support for "editres". (Marcin Dalecki) +- Motif and Athena: Added "menuFont" to be able to specify a font or fontset + for the menus. Can also be set with the "Menu" highlight group. Useful + when the locale is different from 'encoding'. (David Harrison) + When FONTSET_ALWAYS is defined, always use a fontset for the menus. Should + avoid trouble with changing from a font to a fontset. (David Harrison) +- Highlighting and font for the tooltips can be specified with the "Tooltip" + highlight group. (David Harrison) +- The Cmdline-mode menus can be used at the more-prompt. This mostly works + fine, because they start with a CTRL-C. The "Copy" menu works to copy the + modeless selection. Allows copying the output of ":set all" or ":intro" + without auto-selection. +- When starting the GUI when there is no terminal connected to stdout and + stderr, display error messages in a dialog. Previously they wouldn't be + displayed at all. +- Allow setting 'browsedir' to the name of a directory, to be used for the + file dialog. (Dan Sharp) +- b:browsefilter and g:browsefilter can be set to the filters used for the + file dialog. Supported for Win32 and Motif GUI. (Dan Sharp) + +X11: +- Support for the clipboard selection as register "+. When exiting or + suspending copy the selection to cut buffer 0. Should allow copy/paste with + more applications in a X11-standard way. (Neil Bird) +- Use the X clipboard in any terminal, not just in an xterm. + Added "exclude:" in 'clipboard': Specify a pattern to match against terminal + names for which no connection should be made to the X server. The default + currently work for FreeBSD and Linux consoles. +- Added a few messages for when 'verbose' is non-zero to show what happens + when trying to connect to the X server. Should help when trying to find out + why startup is slow. + +GTK GUI: (partly by Marcin Dalecki) +- With some fonts the characters can be taller than ascent + descent. E.g., + "-misc-fixed-*-*-*-*-18-*-*-*-*-*-iso10646-1". Add one to the character + cell height. +- Implement "no" value for 'winaltkeys': don't use Alt-Key as a menu shortcut, + when 'wak' changed after creating the menus. +- Setting 'wak' after the GUI started works. +- recycle text GC's to reduce communication. +- Adjust icon size to window manager. +- Cleanup in font handling. +- Replace XQueryColor with GDK calls. +- Gnome support. Detects Gnome in configure and uses different widgets. + Otherwise it's much like GTK. (Andy Kahn) + It is disabled by default, because it causes a few problems. +- Removed the special code to fork first and then start the GUI. Now use + _exit() instead of exit(), this works fine without special tricks. +- Dialogs sometimes appeared a bit far away. Position the dialogs inside + the gvim window. (Brent Verner) +- When dropping a file on Vim, remove extra slashes from the start of the + path. Also shorten the file name if possible. + +Motif: (Marcin Dalecki) +- Made the dialog layout better. +- Added find and find/replace dialogs. +- For the menus, change "iso-8859" to "iso_8859", Linux appears to need this. +- Added icon to dialogs, like for GTK. +- Use XPM bitmaps for the icon when possible. Use the Solaris XpmP.h include + file when it's available. +- Change the shadow of the toolbar items to get a visual feedback of it being + pressed on non-LessTif. +- Use gadgets instead of windows for some items for speed. + +Command line completion: +- Complete environment variable names. (Mike Steed) +- For ":command", added a few completion methods: "mapping", "function", + "expression" and "environment". +- When a function doesn't take arguments, let completion add () instead of (. + +For MS-DOS, MS-Windows and OS/2: Expand %VAR% environment variables like $VAR. +(Walter Briscoe) + +Redirect messages to the clipboard ":redir @*" and to the unnamed register +":redir @"". (Wall) + +":let @/ = ''" clears the search pattern, instead of setting it to an empty +string. + +Expression evaluation: +- "? :" can be used like in C. +- col("$") returns the length of the cursor line plus one. (Stephen P. Wall) +- Optional extra argument for match(), matchend() and matchstr(): Offset to + start looking for a match. +- Made third argument to strpart() optional. (Paul Moore, Zdenek Sekera) +- exists() can also be used to check for Ex commands and defined autocommands. +- Added extra argument to input(): Default text. +- Also set "v:errmsg" when using ":silent! cmd". +- Added the v:prevcount variable: v:count for the previous command. +- Added "v:progname", name with which Vim was started. (Vince Negri) +- In the verbose message about returning from a function, also show the return + value. + +Cscope: +- Added the cscope_connection() function. (Andy Kahn) +- ":cscope kill -1" kills all cscope connections. (Andy Kahn) +- Added the 'cscopepathcomp' option. (Scott Hauck) +- Added ":scscope" command, split window and execute Cscope command. (Jason + Duell) + +VMS: +- Command line arguments are always uppercase. Interpret a "-X" argument as + "-x" and "-/X" as "-X". +- Set 'makeprg' and 'grepprg' to meaningful defaults. (Zoltan Arpadffy) +- Use the X-clipboard feature and the X command server. (Zoltan Arpadffy) + +Macintosh: (Dany St-Amant) +- Allow a tags file to have CR, CR-LF or LF line separator. (Axel Kielhorn) +- Carbonized (while keeping non Carbon code) + (Some work "stolen" from Ammon Skidmore) +- Improved the menu item index handling (should be faster) +- Runtime commands now handle / in file name (MacOS 9 version) +- Added ":winpos" support. +- Support using "~" in file names for home directory. + +Options: +- When using set += or ^= , check for items used twice. Duplicates are + removed. (Vince Negri) +- When setting an option that is a list of flags, remove duplicate flags. +- If possible, use getrlimit() to set 'maxmemtot' and 'maxmem'. (Pina) +- Added "alpha" to 'nrformats': increment or decrement an alphabetic character + with CTRL-A and CTRL-X. +- ":set opt&vi" sets an option to its Vi default, ":set opt&vim" to its Vim + default. Useful to set 'cpo' to its Vim default without knowing what flags + that includes. +- 'scrolloff' now also applies to a long, wrapped line that doesn't fit in the + window. +- Added more option settings to the default menus. +- Updated the option window with new options. Made it a bit easier to read. + +Internal changes: +- Split line pointers in text part and attributes part. Allows for future + change to make attribute more than one byte. +- Provide a qsort() function for systems that don't have it. +- Changed the big switch for Normal mode commands into a table. This cleans + up the code considerably and avoids trouble for some optimizing compilers. +- Assigned a negative value to special keys, to avoid them being mixed up with + Unicode characters. +- Global variables expand_context and expand_pattern were not supposed to be + global. Pass them to ExpandOne() and all functions called by it. +- No longer use the global reg_ic flag. It caused trouble and in a few places + it was not set. +- Removed the use of the stuff buffer for "*", "K", CTRL-], etc. Avoids + problem with autocommands. +- Moved some code from ex_docmd.c to ex_cmds2.c. The file was getting too + big. Also moved some code from screen.c to move.c. +- Don't include the CRC table for encryption, generate it. Saves quite a bit + of space in the source code. (Matthias Kramm) +- Renamed multibyte.c to mbyte.c to avoid a problem with 8.3 filesystems. +- Removed the GTK implementation of ":findhelp", it now uses the + ToolBar.FindHelp menu entry. +- Renamed mch_windexit() to mch_exit(), mch_init() to mch_early_init() and + mch_shellinit() to mch_init(). + +Highlighting: +- In a ":highlight" listing, show "xxx" with the highlight color. +- Added support for xterm with 88 or 256 colors. The right color numbers will + be used for the name used in a ":highlight" command. (Steve Wall) +- Added "default" argument for ":highlight". When included, the command is + ignored if highlighting for the group was already defined. + All syntax files now use ":hi default ..." to allow the user to specify + colors in his vimrc file. Also, the "if did_xxx_syntax_inits" is not needed + anymore. This greatly simplifies using non-default colors for a specific + language. +- Adjusted colortest.vim: Included colors on normal background and reduced the + size by using a while loop. (Rafael Garcia-Suarez) +- Added the "DarkYellow" color name. Just to make the list of standard colors + consistent, it's not really a nice color to use. + +When an xterm is in 8-bit mode this is detected by the code returned for +|t_RV|. All key codes are automatically converted to their 8-bit versions. + +The OPT_TCAP_QUERY in xterm patch level 141 and later is used to obtain the +actual key codes used and the number of colors for t_Co. Only when |t_RV| is +also used. + +":browse set" now also works in the console mode. ":browse edit" will give an +error message. + +":bdelete" and ":bunload" only report the number of deleted/unloaded buffers +when more than 'report'. The message was annoying when deleting a buffer in a +script. + +Jump list: +- The number of marks kept in the jumplist has been increased from 50 to 100. +- The jumplist is now stored in the viminfo file. CTRL-O can be used to jump + to positions from a previous edit session. +- When doing ":split" copy the jumplist to the new window. + +Also set the '[ and '] marks for the "~" and "r" commands. These marks are +now always set when making a change with a Normal mode command. + +Python interface: Allow setting the width of a vertically split window. (John +Cook) + +Added "=word" and "=~word" to 'cinkeys' (also used in 'indentkeys'). + +Added "j1" argument in 'cinoptions': indent {} inside () for Java. (Johannes +Zellner) +Added the "l" flag in 'cinoptions'. (Anduin Withers) +Added 'C', 'U', 'w' and 'm' flags to 'cinoptions'. (Servatius Brandt) + +When doing ":wall" or ":wqall" and a modified buffer doesn't have a name, +mention its buffer number in the error message. + +":function Name" lists the function with line numbers. Makes it easier to +find out where an error happened. + +In non-blockwise Visual mode, "r" replaces all selected characters with the +typed one, like in blockwise Visual mode. + +When editing the last file in the argument list in any way, allow exiting. +Previously this was only possible when getting to that file with ":next" or +":last". + +Added the '1' flag to 'formatoptions'. (Vit Stradal) +Added 'n' flag in 'formatoptions': format a numbered list. + +Swap file: +- When a swap file already exists, and the user selects "Delete" at the + ATTENTION prompt, use the same ".swp" swapfile, to avoid creating a ".swo" + file which won't always be found. +- When giving the ATTENTION message and the date of the file is newer than the + date of swap file, give a warning about this. +- Made the info for an existing swap file a bit shorter, so that it still fits + on a 24 line screen. +- It was possible to make a symlink with the name of a swap file, linking to a + file that doesn't exist. Vim would then silently use another file (if open + with O_EXCL refuses a symlink). Now check for a symlink to exist. Also do + another check for an existing swap file just before creating it to catch a + symlink attack. + +The g CTRL-G command also works in Visual mode and counts the number of words. +(Chase Tingley) + +Give an error message when using 'shell' and it's empty. + +Added the possibility to include "%s" in 'shellpipe'. + +Added "uhex" value for 'display': show non-printable characters as <xx>. +Show unprintable characters with NonText highlighting, also in the command +line. + +When asked to display the value of a hidden option, tell it's not supported. + +Win32: +- When dropping a shortcut on gvim (.lnk file) edit the target, not the + shortcut itself. (Yasuhiro Matsumoto) +- Added C versions of the OpenWithVim and SendToVim programs. (Walter Briscoe) +- When 'shell' is "cmd" or "cmd.exe", set 'shellredir' to redirect stderr too. + Also check for the Unix shell names. +- When $HOMEDRIVE and $HOMEPATH are defined, use them to define $HOME. (Craig + Barkhouse) + +Win32 console version: +- Includes the user and system name in the ":version" message, when available. + It generates a pathdef.c file for this. (Jon Miner) +- Set the window icon to Vim's icon (only for Windows 2000). While executing + a shell command, modify the window title to show this. When exiting, + restore the cursor position too. (Craig Barkhouse) +- The Win32 console version can be compiled with OLE support. It can only + function as a client, not as an OLE server. + +Errorformat: +- Let "%p" in 'errorformat' (column of error indicated by a row of characters) + also accept a line of dots. +- Added "%v" item in 'errorformat': Virtual column number. (Dan Sharp) +- Added a default 'errorformat' value for VMS. (Jim Bush) + +The "p" command can now be used in Visual mode. It overwrites the selected +text with the contents of a register. + +Highlight the <> items in the intro message to make clear they are special. + +When using the "c" flag for ":substitute", allow typing "l" for replacing this +item and then stop: "last". + +When printing a verbose message about sourcing another file, print the line +number. + +When resizing the Vim window, don't use 'equalalways'. Avoids that making the +Vim window smaller makes split windows bigger. And it's what the docs say. + +When typing CTRL-D in Insert mode, just after an autoindent, then hitting CR +kept the remaining white space. Now made it work like BS: delete the +autoindent to avoid a blank non-empty line results. + +Added a GetHwnd() call to the OLE interface. (Vince Negri) + +Made ":normal" work in an event handler. Useful when dropping a file on Vim +and for CursorHold autocommands. + +For the MS-Windows version, don't change to the directory of the file when a +slash is used instead of a backslash. Explorer should always use a backslash, +the user can use a slash when typing the command. + +Timestamps: +- When a buffer was changed outside of Vim and regaining focus, give a dialog + to allow the user to reload the file. Now also for other GUIs than + MS-Windows. And also used in the console, when compiled with dialog + support. +- Inspect the file contents to find out if it really changed, ignore + situations where only the time stamp changed (e.g., checking the file out + from CVS). +- When checking the timestamp, first check if the file size changed, to avoid + a file compare then. Makes it quicker for large (log) files that are + appended to. +- Don't give a warning for a changed or deleted file when 'buftype' is set. +- No longer warn for a changed directory. This avoids that the file explorer + produces warnings. +- Checking timestamps is only done for buffers that are not hidden. These + will be checked when they become unhidden. +- When checking for a file being changed outside of Vim, also check if the + file permissions changed. When the file contents didn't change but the + permissions did, give a warning. +- Avoid checking too often, otherwise the dialog keeps popping up for a log + file that steadily grows. + +Mapping <M-A> when 'encoding' is "latin1" and then setting 'encoding' to +"utf-8" causes the first byte of a multi-byte to be mapped. Can cause very +hard to find problems. Disallow mapping part of a multi-byte character. + +For ":python" and ":tcl" accept an in-line script. (Johannes Zellner) +Also for ":ruby" and ":perl". (Benoit Cerrina) + +Made ":syn include" use 'runtimepath' when the file name is not a full path. + +When 'switchbuf' contains "split" and the current window is empty, don't split +the window. + +Unix: Catch SIGPWR to preserve files when the power is about to go down. + +Sniff interface: (Anton Leherbauer) +- fixed windows code, esp. the event handling stuff +- adaptations for sniff 4.x ($SNIFF_DIR4) +- support for adding sniff requests at runtime + +Support the notation <A-x> as an alias for <M-x>. This logical, since the Alt +key is used. + +":find" accepts a count, which means that the count'th match in 'path' is +used. + +":ls" and ":buffers" output shows modified/readonly/modifiable flag. When a +buffer is active show "a" instead of nothing. When a buffer isn't loaded +show nothing instead of "-". + +Unix install: +- When installing the tools, set absolute paths in tools scripts efm_perl.pl + and mve.awk. Avoids that the user has to edit these files. +- Install Icons for KDE when the directories exist and the icons do not exist + yet. + +Added has("win95"), to be able to distinguish between MS-Windows 95/98/ME and +NT/2000/XP in a Vim script. + +When a ":cd" command was typed, echo the new current directory. (Dan Sharp) + +When using ":winpos" before the GUI window has been opened, remember the +values until it is opened. + +In the ":version" output, add "/dyn" for features that are dynamically loaded. +This indicates the feature may not always work. + +On Windows NT it is possible that a directory is read-only, but a file can be +deleted. When making a backup by renaming the file and 'backupdir' doesn't +use the current directory, this causes the original file to be deleted, +without the possibility to create a new file. Give an extra error message +then to warn to user about this. + +Made CTRL-R CTRL-O at the command line work like CTRL-R CTRL-R, so that it's +consistent with Insert mode. + +============================================================================== +COMPILE TIME CHANGES *compile-changes-6* + +All generated files have been moved out of the "src" directory. This makes it +easy to see which files are not edited by hand. The files generated by +configure are now in the "src/auto" directory. For Unix, compiled object +files go in the objects directory. + +The source archive was over the 1.4M floppy limit. The archives are now split +up into two runtime and two source archives. Also provide a bzip2 compressed +archive that contains all the sources and runtime files. + +Added "reconfig" as a target for make. Useful when changing some of the +arguments that require flushing the cache, such as switching from GTK to +Motif. Adjusted the meaning of GUI_INC_LOC and GUI_LIB_LOC to be consistent +over different GUIs. + +Added src/README.txt to give an overview of the main parts of the source code. + +The Unix Makefile now fully supports using $(DESTDIR) to install to a specific +location. Replaces the manual setting of *ENDLOC variables. + +Added the possibility for a maintainer of a binary version to include his +e-mail address with the --with-compiledby configure argument. + +Included features are now grouped in "tiny", "small", "normal", "big" and +"huge". This replaces "min-features" and "max-features". Using "tiny" +disables multiple windows for a really small Vim. + +For the tiny version or when FEAT_WINDOWS is not defined: Firstwin and lastwin +are equal to curwin and don't use w_next and w_prev. + +Added the +listcmds feature. Can be used to compile without the Vim commands +that manipulate the buffer list and argument list (the buffer list itself is +still there, can't do without it). + +Added the +vreplace feature. It is disabled in the "small" version to avoid +that the 16 bit DOS version runs out of memory. + +Removed GTK+ support for versions older than 1.1.16. + +The configure checks for using PTYs have been improved. Code taken from a +recent version of screen. + +Added configure options to install Vim, Ex and View under another name (e.g., +vim6, ex6 and view6). + +Added "--with-global-runtime" configure argument. Allows specifying the +global directory used in the 'runtimepath' default. + +Made enabling the SNiFF+ interface possible with a configure argument. + +Configure now always checks /usr/local/lib for libraries and +/usr/local/include for include files. Helps finding the stuff for iconv() and +gettext(). + +Moved the command line history stuff into the +cmdline_hist feature, to +exclude the command line history from the tiny version. + +MS-Windows: Moved common functions from Win16 and Win32 to os_mswin.c. Avoids +having to change two files for one problem. (Vince Negri) + +Moved common code from gui_w16.c and gui_w32.c to gui_w48.c (Vince Negri) + +The jumplist is now a separate feature. It is disabled for the "small" +version (16 bit MS-DOS). + +Renamed all types ending in _t to end in _T. Avoids potential problems with +system types. + +Added a configure check for X11 header files that implicitly define the return +type to int. (Steve Wall) + +"make doslang" in the top directory makes an archive with the menu and .mo +files for Windows. This uses the files generated on Unix, these should work +on MS-Windows as well. + +Merged a large part of os_vms.c with os_unix.c. The code was duplicated in +the past which made maintenance more work. (Zoltan Arpadffy) + +Updated the Borland C version 5 Makefile: (Dan Sharp) +- Fixed the Perl build +- Added python and tcl builds +- Added dynamic perl and dynamic python builds +- Added uninstal.exe build +- Use "yes" and "no" for the options, like in Make_mvc.mak. + +Win32: Merged Make_gvc.mak and Make_ovc.mak into one file: Make_ivc.mak. It's +much smaller, many unnecessary text has been removed. (Walter Briscoe) +Added Make_dvc.mak to be able to debug exe generated with Make_mvc.mak in +MS-Devstudio. (Walter Briscoe) + +MS-Windows: The big gvim.exe, which includes OLE, now also includes +dynamically loaded Tcl, Perl and Python. This uses ActivePerl 5.6.1, +ActivePython 2.1.1 and ActiveTCL 8.3.3 + +Added AC_EXEEXT to configure.in, to check if the executable needs ".exe" for +Cygwin or MingW. Renamed SUFFIX to EXEEXT in Makefile. + +Win32: Load comdlg32.dll delayed for faster startup. Only when using VC 6. +(Vipin Aravind) + +Win32: When compiling with Borland, allow using IME. (Yasuhiro Matsumoto) + +Win32: Added Makefile for Borland 5 to compile gvimext.dll. (Yasuhiro +Matsumoto) + +============================================================================== +BUG FIXES *bug-fixes-6* + +When checking the command name for "gvim", "ex", etc. ignore case. Required +for systems where case is ignored in command names. + +Search pattern "[a-c-e]" also matched a 'd' and didn't match a '-'. + +When double-clicking in another window, wasn't recognized as double click, +because topline is different. Added set_mouse_topline(). + +The BROKEN_LOCALE check was broken. (Marcin Dalecki) + +When "t_Co" is set, the default colors remain the same, thus wrong. Reset the +colors after changing "t_Co". (Steve Wall) + +When exiting with ":wqall" the messages about writing files could overwrite +each other and be lost forever. + +When starting Vim with an extremely long file name (around 1024 characters) it +would crash. Added a few checks to avoid buffer overflows. + +CTRL-E could get stuck in a file with very long lines. + +":au syntax<Tab>" expanded event names while it should expand groups starting +with "syntax". + +When expanding a file name caused an error (e.g., for <amatch>) it was +produced even when inside an "if 0". + +'cindent' formatted C comments differently from what the 'comments' option +specified. (Steve Wall) + +Default for 'grepprg' didn't include the file name when only grepping in one +file. Now /dev/null has been added for Unix. + +Opening the option window twice caused trouble. Now the cursor goes to the +existing option window. + +":sview" and ":view" didn't set 'readonly' for an existing buffer. Now do set +'readonly', unless the buffer is also edited in another window. + +GTK GUI: When 'guioptions' excluded 'g', the more prompt caused the toolbar +and menubar to disappear and resize the window (which clears the text). +Now always grey-out the toplevel menus to avoid that the menubar changes size +or disappears. + +When re-using the current buffer for a new buffer, buffer-local variables were +not deleted. + +GUI: when 'scrolloff' is 0 dragging the mouse above the window didn't cause a +down scroll. Now pass on a mouse event with mouse_row set to -1. + +Win32: Console version didn't work on telnet, because of switching between two +console screens. Now use one console screen and save/restore the contents +when needed. (Craig Barkhouse) + +When reading a file the magic number for encryption was included in the file +length. (Antonio Colombo) + +The quickfix window contained leading whitespace and NULs for multi-line +messages. (David Harrison) + +When using cscope, redundant tags were removed. This caused a numbering +problem, because they were all listed. Don't remove redundant cscope tags. +(David Bustos). + +Cscope: Test for which matches are in the current buffer sometimes failed, +causing a jump to another match than selected. (David Bustos) + +Win32: Buffer overflow when adding a charset name in a font. + +'titlestring' and 'iconstring' were evaluating an expression in the current +context, which could be a user function, which is a problem for local +variables vs global variables. + +Win32 GUI: Mapping <M-F> didn't work. Now handle SHIFT and CTRL in +_OnSysChar(). + +Win32 GUI: (on no file), :vs<CR>:q<CR> left a trail of pixels down the middle. +Could also happen for the ruler. screen_puts() didn't clear the right char in +ScreenLines[] for the bold trick. + +Win32: ":%!sort|uniq" didn't work, because the input file name touches the +"|". Insert a space before the "|". + +OS/2: Expanding wildcards included non-existing files. Caused ":runtime" to +fail, which caused syntax highlighting to fail. + +Pasting a register containing CTRL-R on the command line could cause an +endless loop that can't be interrupted. Now it can be stopped with CTRL-C. + +When 'verbose' is set, a message for file read/write could overwrite the +previous message. +When 'verbose' is set, the header from ":select" was put after the last +message. Now start a new line. + +The hit-enter prompt reacted to the response of the t_RV string, causing +messages at startup to disappear. + +When t_Co was set to 1, colors were still used. Now only use color when t_Co +> 1. + +Listing functions with ":function" didn't quit when 'q' or ':' was typed at +the more prompt. + +Use mkstemp() instead of mktemp() when it's available, avoids a warning for +linking on FreeBSD. + +When doing Insert mode completion it's possible that b_sfname is NULL. Don't +give it to printf() for the "Scanning" message. + +":set runtimepath-=$VIMRUNTIME" didn't work, because expansion of wildcards +was done after trying to remove the string. Now for ":set opt+=val" and ":set +opt-=val" the expansion of wildcards is done before adding or removing "val". + +Using CTRL-V with the "r" command with a blockwise Visual selection inserted a +CTRL-V instead of getting a special character. + +Unix: Changed the order of libraries: Put -lXdmcp after -lX11 and -lSM -lICE +after -lXdmcp. Should fix link problem on HP-UX 10.20. + +Don't remove the last "-lm" from the link line. Vim may link but fail later +when the GUI starts. + +When the shell returns with an error when trying to expand wildcards, do +include the pattern when the "EW_NOTFOUND" flag was set. +When expanding wildcards with the shell fails, give a clear error message +instead of just "1 returned". + +Selecting a Visual block, with the start partly on a Tab, deleting it leaves +the cursor too far to the left. Causes "s" to work in the wrong position. + +Pound sign in normal.c caused trouble on some compilers. Use 0xA3 instead. + +Warning for changing a read-only file wasn't given when 'insertmode' was set. + +Win32: When 'shellxquote' is set to a double quote (e.g., using csh), ":!start +notepad file" doesn't work. Remove the double quotes added by 'shellxquote' +when using ":!start". (Pavol Juhas) + +The "<f-args>" argument of ":command" didn't accept Tabs for white space. +Also, don't add an empty argument when there are trailing blanks. + +":e test\\je" edited "test\je", but ":next test\\je" edited "testje". +Backslashes were removed one time too many for ":next". + +VMS: "gf" didn't work properly. Use vms_fixfilename() to translate the file +name. (Zoltan Arpadffy) + +After ":hi Normal ctermbg=black ctermfg=white" and suspending Vim not all +characters are redrawn with the right background. + +When doing "make test" without +eval or +windows feature, many tests failed. +Now have test1 generate a script to copy the correct output, so that a test +that doesn't work is skipped. + +On FreeBSD the Perl interface added "-lc" to the link command and Python added +"-pthread". These two don't work together, because the libc_r library should +be used. Removed "-lc" from Perl, it should not be needed. +Also: Add "-pthread" to $LIBS, so that the checks for functions is done with +libc_r. Sigaltstack() appears to be missing from libc_r. + +The Syntax sub-menus were getting too long, reorganized them and added another +level for some languages. + +Visual block "r"eplace didn't work well when a Tab is partly included. +(Matthias Kramm) + +When yanking a Visual block, where some lines end halfway the block, putting +the text somewhere else doesn't insert a block. Padd with spaces for missing +characters. Added "y_width" to struct yankreg. (Matthias Kramm) + +If a substitute string has a multibyte character after a backslash only the +first byte of it was skipped. (Muraoka Taro) + +Win32: Numeric keypad keys were missing from the builtin termcap entry. + +When a file was read-only ":wa!" didn't force it to be written. (Vince Negri) + +Amiga: A file name starting with a colon was considered absolute but it isn't. +Amiga: ":pwd" added a slash when in the root of a drive. + +Don't let 'ttymouse' default to "dec" when compiled with dec mouse support. +It breaks the gpm mouse (Linux console). + +The prototypes for the Perl interface didn't work for threaded Perl. Added a +sed command to remove the prototypes from proto/if_perl.pro and added them +manually to if_perl.xs. + +When ":w!" resets the 'readonly' option the title and status lines were not +updated. + +":args" showed the current file when the argument list was empty. Made this +work like Vi: display nothing. + +"99:<C-U>echo v:count" echoed "99" in Normal mode, but 0 in Visual mode. +Don't set v:count when executing a stuffed command. + +Amiga: Got a requester for "home:" because it's in the default runtime path. +Don't bring up a requester when searching for a file in 'path', sourcing the +.vimrc file or using ":runtime". + +Win16 and Win32: Considered a file "\path\file" absolute. Can cause the same +file to appear as two different buffers. + +Win32: Renaming a file to an empty string crashed Vim. Happened when using +explorer.vim and hitting ESC at the rename prompt. + +Win32: strftime() crashed when called with a "-1" value for the time. + +Win32 with Borland compiler: mch_FullName() didn't work, caused tag file not +to be found. + +Cscope sometimes jumped to the wrong tag. (David Bustos) + +OS/2: Could not find the tags file. mch_expand_wildcards() added another +slash to a directory name. + +When using ">>" the `] mark was not in the last column. + +When Vim was compiled without menu support, filetype.vim was still trying to +source the menu.vim script. (Rafael Garcia-Suarez) + +":ptag" added an item to the tag stack. + +Win32 IME: "gr" didn't use IME mode. + +In the "vim --help" message the term "options" was used for arguments. That's +confusing, call them "arguments". + +When there are two windows, and a BufUnload autocommand for closing window #1 +closed window #2, Vim would crash. + +When there is a preview window and only one other window, ":q" wouldn't exit. + +In Insert mode, when cancelling a digraph with ESC, the '?' wasn't removed. + +On Unix glob(".*") returned "." and "..", on Windows it didn't. On Windows +glob("*") also returned files starting with a dot. Made this work like Unix +on all systems. + +Win32: Removed old code to open a console. Vimrun is now used and works fine. + +Compute the room needed by the intro message accurately, so that it also fits +on a 25 line console. (Craig Barkhouse) + +":ptnext" was broken. Now remember the last tag used in the preview window +separately from the tagstack. + +Didn't check for "-display" being the last argument. (Wichert Akkerman) + +GTK GUI: When starting "gvim" under some conditions there would be an X error. +Don't replace the error handler when creating the xterm clipboard. (Wichert +Akkerman) + +Adding a space after a help tag caused the tag not to be found. E.g., ":he +autoindent ". + +Was trying to expand a URL into a full path name. On Windows this resulted in +the current directory to be prepended to the URL. Added vim_isAbsName() and +vim_FullName() to avoid that various machine specific functions do it +differently. + +":n *.c" ":cd .." ":n" didn't use the original directory of the file. Vi only +does it for the current file (looks like a bug). Now remember the buffer used +for the entry in the argument list and use its name (adjusted when doing +":cd"), unless it's deleted. + +When inserting a special key as its name ("<F8>" as four characters) after +moving around in Insert mode, undo didn't work properly. + +Motif GUI: When using the right mouse button, for some people gvim froze for +a couple of seconds (Motif 1.2?). This doesn't happen when there is no Popup +menu. Solved by only creating a popup menu when 'mousemodel' is "popup" or +"popup_setpos". (David Harrison) + +Motif: When adding many menu items, the "Help" menu disappeared but the +menubar didn't wrap. Now manually set the menubar height. + +When using <BS> in Insert mode to remove a line break, or using "J" to join +lines, the cursor could end up halfway a multi-byte character. (Muraoka Taro) + +Removed defining SVR4 in configure. It causes problems for some X header +files and doesn't appear to be used anywhere. + +When 'wildignore' is used, 'ignorecase' for a tag match was not working. + +When 'wildignore' contains "*~" it was impossible to edit a file ending in a +"~". Now don't recognize a file ending in "~" as containing wildcards. + +Disabled the mouse code for OS/2. It was not really used. + +":mksession" always used the full path name for a buffer, also when the short +name could be used. +":mkvimrc" and ":mksession" didn't save 'wildchar' and 'pastetoggle' in such a +way that they would be restored. Now use the key name if possible, this is +portable. + +After recovering a file and abandoning it, an ":edit" command didn't give the +ATTENTION prompt again. Would be useful to be able to delete the file in an +easy way. Reset the BF_RECOVERED flag when unloading the buffer. + +histdel() could match or ignore case, depending on what happened before it. +Now always match case. + +When a window size was specified when splitting a window, it would still get +the size from 'winheight' or 'winwidth' if it's larger. + +When using "append" or "insert" inside a function definition, a line starting +with "function" or "endfunction" caused confusion. Now recognize the commands +and skip lines until a ".". + +At the end of any function or sourced file need_wait_return could be reset, +causing messages to disappear when redrawing. + +When in a while loop the line number for error messages stayed fixed. Now the +line number is remembered in the while loop. + +"cd c:/" didn't work on MS-DOS. mch_isdir() removed a trailing slash. + +MS-Windows: getftime() didn't work when a directory had a trailing slash or +backslash. Didn't show the time in the explorer because of this. + +When doing wildcard completion, a directory "a/" sorted after "a-b". Now +recognize path separators when sorting files. + +Non-Unix systems: When editing "c:/dir/../file" and "c:/file" they were +created as different buffers, although it's the same file. Expand to a full +file name also when an absolute name contains "..". + +"g&" didn't repeat the last substitute properly. + +When 'clipboard' was set to "unnamed", a "Y" command would not write to "0. +Now make a copy of register 0 to the clipboard register. + +When the search pattern matches in many ways, it could not always be +interrupted with a CTRL-C. And CTRL-C would have to be hit once for every +line when 'hlsearch' is on. +When 'incsearch' is on and interrupting the search for a match, don't abandon +the command line. + +When turning a directory name into a full path, e.g., with fnamemodify(), +sometimes a slash was added. Make this consistent: Don't add a slash. + +When a file name contains a "!", using it in a shell command will cause +trouble: ":!cat %". Escape the "!" to avoid that. Escape it another time +when 'shell' contains "sh". + +Completing a file name that has a tail that starts with a "~" didn't work: +":e view/~<Tab>". + +Using a ":command" argument that contains < and > but not for a special +argument was not skipped properly. + +The DOS install program: On Win2000 the check for a vim.exe or gvim.exe in +$PATH didn't work, it always found it in the current directory. +Rename the vim.exe in the current dir to avoid this. (Walter Briscoe) + +In the MS-DOS/Windows install program, use %VIM% instead of an absolute path, +so that moving Vim requires only one change in the batch file. + +Mac: mch_FullName() changed the "fname" argument and didn't always initialize +the buffer. + +MS-DOS: mch_FullName() didn't fix forward/backward slashes in an absolute file +name. + +"echo expand("%:p:h")" with an empty file name removed one directory name on +MS-DOS. For Unix, when the file name is a directory, the directory name was +removed. Now make it consistent: "%:p" adds a path separator for all systems, +but no path separator is added in other situations. + +Unix: When checking for a CTRL-C (could happen any time) and there is an X +event (e.g., clipboard updated) and there is typeahead, Vim would hang until a +character was typed. + +MS-DOS, MS-Windows and Amiga: expanding "$ENV/foo" when $ENV ends in a colon, +had the slash removed. + +":he \^=" gave an error for using \_. ":he ^=" didn't find tag :set^=. Even +"he :set^=" didn't find it. + +A tags file name "D:/tags" was used as file "tags" in "D:". That doesn't work +when the current path for D: isn't the root of the drive. + +Removed calls to XtInitializeWidgetClass(), they shouldn't be necessary. + +When using a dtterm or various other color terminals, and the Normal group has +been set to use a different background color, the background wouldn't always +be displayed with that color. Added check for "ut" termcap entry: If it's +missing, clearing the screen won't give us the current background color. Need +to draw each character instead. Vim now also works when the "cl" (clear +screen) termcap entry is missing. + +When repeating a "/" search command with a line offset, the "n" did use the +offset but didn't make the motion linewise. Made "d/pat/+2" and "dn" do the +same. + +Win32: Trying to use ":tearoff" for a menu that doesn't exist caused a crash. + +OpenPTY() didn't work on Sequent. Add a configure check for getpseudotty(). + +C-indenting: Indented a line starting with ")" with the matching "(", but not +a line starting with "x)" looks strange. Also compute the indent for aligning +with items inside the () and use the lowest indent. + +MS-DOS and Windows: ":n *.vim" also matched files ending in "~". +Moved mch_expandpath() from os_win16.c and os_msdos.c to misc1.c, they are +equal. + +Macintosh: (Dany St-Amant) +- In Vi-compatible mode didn't read files with CR line separators. +- Fixed a bug in the handling of Activate/Deactivate Event +- Fixed a bug in gui_mch_dialog (using wrong pointer) + +Multibyte GDK XIM: While composing a multibyte-word, if user presses a +mouse button, then the word is removed. It should remain and composing end. +(Sung-Hyun Nam) + +MS-DOS, MS-Windows and OS/2: When reading from stdin, automatic CR-LF +conversion by the C library got in the way of detecting a "dos" 'fileformat'. + +When 'smartcase' is set, patterns with "\S" would also make 'ignorecase' +reset. + +When clicking the mouse in a column larger than 222, it moved to the first +column. Can't encode a larger number in a character. Now limit the number to +222, don't jump back to the first column. + +GUI: In some versions CSI would cause trouble, either when typed directly or +when part of a multi-byte sequence. + +When using multibyte characters in a ":normal" command, a trailing byte that +is CSI or K_SPECIAL caused problems. + +Wildmenu didn't handle multi-byte characters. + +":sleep 10" could not be interrupted on Windows, while "gs" could. Made them +both work the same. + +Unix: When waiting for a character is interrupted by an X-windows event (e.g., +to obtain the contents of the selection), the wait time would not be honored. +A message could be overwritten quickly. Now compute the remaining waiting +time. + +Windows: Completing "\\share\c$\S" inserted a backslash before the $ and then +the name is invalid. Don't insert the backslash. + +When doing an auto-write before ":make", IObuff was overwritten and the wrong +text displayed later. + +On the Mac the directories "c:/tmp" and "c:/temp" were used in the defaults +for 'backupdir' and 'directory', they don't exist. + +The check for a new file not to be on an MS-DOS filesystem created the file +temporarily, which can be slow. Don't do this if there is another check for +the swap file being on an MS-DOS filesystem. + +Don't give the "Changing a readonly file" warning when reading from stdin. + +When using the "Save As" menu entry and not entering a file name, would get an +error message for the trailing ":edit #". Now only do that when the +alternate file name was changed. + +When Vim owns the X11 selection and is being suspended, an application that +tries to use the selection hangs. When Vim continues it could no longer +obtain the selection. Now give up the selection when suspending. + +option.h and globals.h were included in some files, while they were already +included in vim.h. Moved the definition of EXTERN to vim.h to avoid doing it +twice. + +When repeating an operator that used a search pattern and the search pattern +contained characters that have a special meaning on the cmdline (e.g., CTRL-U) +it didn't work. + +Fixed various problems with using K_SPECIAL (0x80) and CSI (0x9b) as a byte in +a (multibyte) character. For example, the "r" command could not be repeated. + +The DOS/Windows install program didn't always work from a directory with a +long filename, because $VIM and the executable name would not have the same +path. + +Multi-byte: +- Using an any-but character range [^x] in a regexp didn't work for UTF-8. + (Muraoka Taro) +- When backspacing over inserted characters in Replace mode multi-byte + characters were not handled correctly. (Muraoka Taro) +- Search commands "#" and "*" didn't work with multibyte characters. (Muraoka + Taro) +- Word completion in Insert mode didn't work with multibyte characters. + (Muraoka Taro) +- Athena/Motif GUI: when 'linespace' is non-zero the cursor would be drawn too + wide (number of bytes instead of cell width). +- When changing 'encoding' to "euc-jp" and inserting a character Vim would + crash. +- For euc-jp characters positioning the cursor would sometimes be wrong. + Also, with two characters with 0x8e leading byte only the first one would be + displayed. +- When using DYNAMIC_ICONV on Win32 conversion might fail because of using the + wrong error number. (Muraoka Taro) +- Using Alt-x in the GUI while 'encoding' was set to "utf-8" didn't produce + the right character. +- When using Visual block selection and only the left halve of a double-wide + character is selected, the highlighting continued to the end of the line. +- Visual-block delete didn't work properly when deleting the right halve of a + double-wide character. +- Overstrike mode for the cmdline replaced only the first byte of a multibyte + character. +- The cursor in Replace mode (also in the cmdline) was to small on a + double-wide character. +- When a multibyte character contained a 0x80 byte, it didn't work (was using + a CSI byte instead). (Muraoka Taro) +- Wordwise selection with the mouse didn't work. +- Yanking a modeless selection of multi-byte characters didn't work. +- When 'selection' is "exclusive", selecting a word that ends in a multi-byte + character used wrong highlighting for the following character. + +Win32 with Make_mvc.mak: Didn't compile for debugging. (Craig Barkhouse) + +Win32 GUI: When "vimrun.exe" is used to execute an external command, don't +give a message box with the return value, it was already printed by vimrun. +Also avoid printing the return value of the shell when ":silent!" is used. + +Win32: selecting a lot of text and using the "find/replace" dialog caused a +crash. + +X11 GUI: When typing a character with the 8th bit set and the Meta/Alt +modifier, the modifier was removed without changing the character. + +Truncating a message to make it fit on the command line, using "..." for the +middle, didn't always compute the space correctly. + +Could not imap <C-@>. Now it works like <Nul>. + +VMS: +- Fixed a few things for VAXC. os_vms_fix.com had some strange CTRL-M + characters. (Zoltan Arpadffy and John W. Hamill) +- Added VMS-specific defaults for the 'isfname' and 'isprint' options. + (Zoltan Arpadffy) +- Removed os_vms_osdef.h, it's no longer used. + +The gzip plugin used a ":normal" command, this doesn't work when dropping a +compressed file on Vim. + +In very rare situations a binary search for a tag would fail, because an +uninitialized value happens to be half the size of the tag file. (Narendran) + +When using BufEnter and BufLeave autocommands to enable/disable a menu, it +wasn't updated right away. + +When doing a replace with the "c"onfirm flag, the cursor was positioned after +the ruler, instead of after the question. With a long replacement string the +screen could scroll up and cause a "more" prompt. Now the message is +truncated to make it fit. + +Motif: The autoconf check for the Xp library didn't work. + +When 'verbose' is set to list lines of a sourced file, defining a function +would reset the counter used for the "more" prompt. + +In the Win32 find/replace dialog, a '/' character caused problems. Escape it +with a backslash. + +Starting a shell with ":sh" was different from starting a shell for CTRL-Z +when suspending doesn't work. They now work the same way. + +Jumping to a file mark while in a changed buffer gave a "mark not set" error. + +":execute histget("cmd")" causes an endless loop and crashed Vim. Now catch +all commands that cause too much recursiveness. + +Removed "Failed to open input method" error message, too many people got this +when they didn't want to use a XIM. + +GUI: When compiled without the +windows feature, the scrollbar would start +below line one. + +Removed the trick with redefining character class functions from regexp.c. + +Win32 GUI: Find dialog gives focus back to main window, when typing a +character mouse pointer is blanked, it didn't reappear when moving it in the +dialog window. (Vince Negri) + +When recording and typing a CTRL-C, no character was recorded. When in Insert +mode or cancelling half a command, playing back the recorded sequence wouldn't +work. Now record the CTRL-C. + +When the GUI was started, mouse codes for DEC and netterm were still checked +for. + +GUI: When scrolling and 'writedelay' is non-zero, the character under the +cursor was displayed in the wrong position (one line above/below with +CTRL-E/CTRL-Y). + +A ":normal" command would reset the 'scrollbind' info. Causes problems when +using a ":normal" command in an autocommand for opening a file. + +Windows GUI: a point size with a dot, like "7.5", wasn't recognized. (Muraoka +Taro) + +When 'scrollbind' wasn't set would still remember the current position, +wasting time. + +GTK: Crash when 'shell' doesn't exist and doing":!ls". Use _exit() instead of +exit() when the child couldn't execute the shell. + +Multi-byte: +- GUI with double-byte encoding: a mouse click in left halve of double-wide + character put the cursor in previous char. +- Using double-byte encoding and 'selection' is "exclusive": "vey" and "^Vey" + included the character after the word. +- When using a double-byte encoding and there is a lead byte at the end of the + line, the preceding line would be displayed. "ga" also showed wrong info. +- "gf" didn't include multi-byte characters before the cursor properly. + (Muraoka Taro) + +GUI: The cursor was sometimes not removed when scrolling. Changed the policy +from redrawing the cursor after each call to gui_write() to only update it at +the end of update_screen() or when setting the cursor position. Also only +update the scrollbars at the end of update_screen(), that's the only place +where the window text may have been scrolled. + +Formatting "/*<Tab>long text", produced "* <Tab>" in the next line. Now +remove the space before the Tab. +Formatting "/*<Tab> long text", produced "* <Tab> long text" in the next +line. Now keep the space after the Tab. + +In some places non-ASCII alphabetical characters were accepted, which could +cause problems. For example, ":X" (X being such a character). + +When a pattern matches the end of the line, the last character in the line was +highlighted for 'hlsearch'. That looks wrong for "/\%3c". Now highlight the +character just after the line. + +Motif: If a dialog was closed by clicking on the "X" of the window frame Vim +would no longer respond. + +When using CTRL-X or CTRL-A on a number with many leading zeros, Vim would +crash. (Matsumoto) + +When 'insertmode' is set, the mapping in mswin.vim for CTRL-V didn't work in +Select mode. Insert mode wasn't restarted after overwriting the text. +Now allow nesting Insert mode with insert and change commands. CTRL-O +cwfoo<Esc> now also works. + +Clicking with the right mouse button in another window started Visual mode, +but used the start position of the current window. Caused ml_get errors when +the line number was invalid. Now stay in the same window. + +When 'selection' is "exclusive", "gv" sometimes selected one character fewer. + +When 'comments' contains more than one start/middle/end triplet, the optional +flags could be mixed up. Also didn't align the end with the middle part. + +Double-right-click in Visual mode didn't update the shown mode. + +When the Normal group has a font name, it was never used when starting up. +Now use it when 'guifont' and 'guifontset' are empty. +Setting a font name to a highlight group before the GUI was started didn't +work. + +"make test" didn't use the name of the generated Vim executable. + +'cindent' problems: +- Aligned with an "else" inside a do-while loop for a line below that loop. + (Meikel Brandmeyer) +- A line before a function would be indented even when terminated with a + semicolon. (Meikel Brandmeyer) +- 'cindent' gave too much indent to a line after a "};" that ends an array + init. +- Support declaration lines ending in "," and "\". (Meikel Brandmeyer) +- A case statement inside a do-while loop was used for indenting a line after + the do-while loop. (Meikel Brandmeyer) +- When skipping a string in a line with one double quote it could continue in + the previous line. (Meikel Brandmeyer) + +When 'list' is set, 'hlsearch' didn't highlight a match at the end of the +line. Now highlight the '$'. + +The Paste menu item in the menu bar, the popup menu and the toolbar were all +different. Now made them all equal to how it was done in mswin.vim. + +st_dev can be smaller than "unsigned". The compiler may give an overflow +warning. Added a configure check for dev_t. + +Athena: closing a confirm() dialog killed Vim. + +Various typos in the documentation. (Matt Dunford) + +Python interface: The definition of _DEBUG could cause trouble, undefine it. +The error message for not being able to load the shared library wasn't +translated. (Muraoka Taro) + +Mac: (Dany St-Amant and Axel Kielhorn) +- Several fixes. +- Vim was eating 80% of the CPU time. +- The project os_mac.pbxproj didn't work, Moved it to a subdirectory. +- Made the menu priority work for the menubar. +- Fixed a problem with dragging the scrollbar. +- Cleaned up the various #ifdefs. + +Unix: When catching a deadly signal and we keep getting one use _exit() to +exit in a quick and dirty way. + +Athena menu ordering didn't work correctly. (David Harrison) + +A ":make" or ":grep" command with a long argument could cause a crash. + +Doing ":new file" and using "Quit" for the ATTENTION dialog still opened a new +window. + +GTK: When starting the GUI and there is an error in the .vimrc file, don't +present the wait-return prompt, since the message was given in the terminal. + +When there was an error in a .vimrc file the terminal where gvim was started +could be cleared. Set msg_row in main.c before writing any messages. + +GTK and X11 GUI: When trying to read characters from the user (e.g. with +input()) before the Vim window was opened caused Vim to hang when it was +started from the desktop. + +OS/390 uses 31 bit pointers. That broke some computations with MAX_COL. +Reduce MAX_COL by one bit for OS/390. (Ralf Schandl) + +When defining a function and it already exists, Vim didn't say it existed +until after typing it. Now do this right away when typing it. + +The message remembered for displaying later (keep_msg) was sometimes pointing +into a generic buffer, which might be changed by the time the message is +displayed. Now make a copy of the message. + +When using multi-byte characters in a menu and a trailing byte is a backslash, +the menu would not be created correctly. (Muraoka Taro) +Using a multibyte character in the substitute string where a trail byte is a +backslash didn't work. (Muraoka Taro) + +When setting "t_Co" in a vimrc file, then setting it automatically from an +xterm termresponse and then setting it again manually caused a crash. + +When getting the value of a string option that is not supported, the number +zero was returned. This breaks a check like "&enc == "asdf". Now an empty +string is returned for string options. + +Crashed when starting the GTK GUI while using 'notitle' in the vimrc, setting +'title' in the gvimrc and starting the GUI with ":gui". Closed the connection +to the X server accidentally. + +Had to hit return after selecting an entry for ":ts". + +The message from ":cn" message was sometimes cleared. Now display it after +redrawing if it doesn't cause a scroll (truncated when necessary). + +hangulin.c didn't compile when the GUI was disabled. Disable it when it won't +work. + +When setting a termcap option like "t_CO", the value could be displayed as +being for a normal key with a modifier, like "<M-=>". + +When expanding the argument list, entries which are a directory name did not +get included. This stopped "vim c:/" from opening the file explorer. + +":syn match sd "^" nextgroup=asdf" skipped the first column and matched the +nextgroup in the second column. + +GUI: When 'lazyredraw' is set, 'showmatch' didn't work. Required flushing +the output. + +Don't define the <NetMouse> termcode in an xterm, reduces the problem when +someone types <Esc> } in Insert mode. + +Made slash_adjust() work correctly for multi-byte characters. (Yasuhiro +Matsumoto) +Using a filename in Big5 encoding for autocommands didn't work (backslash in +trailbyte). (Yasuhiro Matsumoto) + +DOS and Windows: Expanding *.vim also matched file.vimfoo. Expand path like +Unix to avoid problems with Windows dir functions. Merged the DOS and Win32 +functions. + +Win32: Gvimext could not edit more than a few files at once, the length of the +argument was fixed. + +"ls -1 * | xargs vim" worked, but the input was in cooked mode. Now switch to +raw mode when needed. Use dup() to copy the stderr file descriptor to stdin +to make shell commands work. No longer requires an external program to do +this. + +When using ":filetype off", ftplugin and indent usage would be switched off at +the same time. Don't do this, setting 'filetype' manually can still use them. + +GUI: When writing a double-byte character, it could be split up in two calls +to gui_write(), which doesn't work. Now flush before the output buffer +becomes full. + +When 'laststatus' is set and 'cmdheight' is two or bigger, the intro message +would be written over the status line. +The ":intro" command didn't work when there wasn't enough room. + +Configuring for Ruby failed with a recent version of Ruby. (Akinori Musha) + +Athena: When deleting the directory in which Vim was started, using the file +browser made Vim exit. Removed the use of XtAppError(). + +When using autoconf 2.50, UNIX was not defined. Moved the comment for "#undef +UNIX" to a separate line. + +Win32: Disabled _OnWindowPosChanging() to make maximize work better. + +Win32: Compiling with VC 4.0 didn't work. (Walter Briscoe) + +Athena: +- Finally fixed the problems with deleting a menu. (David Harrison) +- Athena: When closing the confirm() dialog, worked like OK was pressed, + instead of Cancel. + +The file explorer didn't work in compatible mode, because of line +continuation. + +Didn't give an error message for ":digraph a". + +When using Ex mode in the GUI and typing a special key, <BS> didn't delete it +correctly. Now display '?' for a special key. + +When an operator is pending, clicking in another window made it apply to that +window, even though the line numbers could be beyond the end of the buffer. + +When a function call doesn't have a terminating ")" Vim could crash. + +Perl interface: could crash on exit with perl 5.6.1. (Anduin Withers) + +Using %P in 'errorformat' wasn't handled correctly. (Tomas Zellerin) + +Using a syntax cluster that includes itself made Vim crash. + +GUI: With 'ls' set to 2, dragging the status line all the way up, then making +the Vim window smaller: Could not the drag status line anymore. + +"vim -c startinsert! file" placed cursor on last char of a line, instead of +after it. A ":set" command in the buffer menu set w_set_curswant. Now don't +do this when w_curswant is MAXCOL. + +Win32: When the gvim window was maximized and selecting another font, the +window would no longer fill the screen. + +The line with 'pastetoggle' in ":options" didn't show the right value when it +is a special key. Hitting <CR> didn't work either. + +Formatting text, resulting in a % landing in the first line, repeated the % in +the following lines, like it's the start of a comment. + +GTK: When adding a toolbar item while gvim is already running, it wasn't +possible to use the tooltip. Now it works by adding the tooltip first. + +The output of "g CTRL-G" mentioned "Char" but it's actually bytes. + +Searching for the end of a oneline region didn't work correctly when there is +an offset for the highlighting. + +Syntax highlighting: When synchronizing on C-comments, //*/ was seen as the +start of a comment. + +Win32: Without scrollbars present, the MS mouse scroll wheel didn't work. +Also handle the scrollbars when they are not visible. + +Motif: When there is no right scrollbar, the bottom scrollbar would still +leave room for it. (Marcin Dalecki) + +When changing 'guicursor' and the value is invalid, some of the effects would +still take place. Now first check for errors and only make the new value +effective when it's OK. + +Using "A" In Visual block mode, appending to lines that don't extend into the +block, padding was wrong. + +When pasting a block of text, a character that occupies more than one screen +column could be deleted and spaces inserted instead. Now only do that with a +tab. + +Fixed conversion of documentation to HTML using Perl. (Dan Sharp) + +Give an error message when a menu name starts with a dot. + +Avoid a hang when executing a shell from the GUI on HP-UX by pushing "ptem" +even when sys/ptem.h isn't present. + +When creating the temp directory, make sure umask is 077, otherwise the +directory is not accessible when it was set to 0177. + +Unix: When resizing the window and a redraw is a bit slow, could get a window +resize event while redrawing, resulting in a messed up window. Any input +(e.g., a mouse click) would redraw. + +The "%B" item in the status line became zero in Insert mode (that's normal) +for another than the current window. + +The menu entries to convert to xxd and back didn't work in Insert mode. + +When ":vglobal" didn't find a line where the pattern doesn't match, the error +message would be the wrong way around. + +When ignoring a multi-line error message with "%-A", the continuation lines +would be used anyway. (Servatius Brandt) + +"grx" on a double-wide character inserted "x", instead of replacing the +character with "x ". "gR" on <xx> ('display' set the "uhex") didn't replace +at all. When doing "gRxx" on a control character the first "x" would be +inserted, breaking the alignment. + +Added "0)" to 'cinkeys', so that when typing a ) it is put in the same place +as where "==" would put it. + +Win32: When maximized, adding/removing toolbar didn't resize the text area. + +When using <C-RightMouse> a count was discarded. + +When typing CTRL-V and <RightMouse> in the command line, would insert +<LeftMouse>. + +Using "vis" or "vas" when 'selection' is exclusive didn't include the last +character. + +When adding to an option like 'grepprg', leading space would be lost. Don't +expand environment variables when there is no comma separating the items. + +GUI: When using a bold-italic font, would still use the bold trick and +underlining. + +Motif: The default button didn't work in dialogs, the first one was always +used. Had to give input focus to the default button. + +When using CTRL-T to jump within the same file, the '' mark wasn't set. + +Undo wasn't Vi compatible when using the 'c' flag for ":s". Now it undoes the +whole ":s" command instead of each confirmed replacement. + +The Buffers menu, when torn-off, disappeared when being refreshed. Add a +dummy item to avoid this. + +Removed calling msg_start() in main(), it should not be needed. + +vim_strpbrk() did not support multibyte characters. (Muraoka Taro) + +The Amiga version didn't compile, the code was too big for relative jumps. +Moved a few files from ex_docmd.c to ex_cmds2.c + +When evaluating the "= register resulted in the "= register being changed, Vim +would crash. + +When doing ":view file" and it fails, the current buffer was made read-only. + +Motif: For some people the separators in the toolbar disappeared when resizing +the Vim window. (Marcin Dalecki) + +Win32 GUI: when setting 'lines' to a huge number, would not compute the +available space correctly. Was counting the menu height twice. + +Conversion of the docs to HTML didn't handle the line with the +quickfix tag +correctly. (Antonio Colombo) + +Win32: fname_case() didn't handle multi-byte characters correctly. (Yasuhiro +Matsumoto) + +The Cygwin version had trouble with fchdir(). Don't use that function for +Cygwin. + +The generic check in scripts.vim for "conf" syntax was done before some checks +in filetype.vim, resulting in "conf" syntax too often. + +Dos32: Typing lagged behind. Would wait for one biostick when checking if a +character is available. + +GTK: When setting 'columns' while starting up "gvim", would set the width of +the terminal it was started in. + +When using ESC in Insert mode, an autoindent that wraps to the next line +caused the cursor to move to the end of the line temporarily. When the +character before the cursor was a double-wide multi-byte character the cursor +would be on the right halve, which causes problems with some terminals. + +Didn't handle multi-byte characters correctly when expanding a file name. +(Yasuhiro Matsumoto) + +Win32 GUI: Errors generated before the GUI is decided to start were not +reported. + +globpath() didn't reserve enough room for concatenated results. (Anduin +Withers) + +When expanding an option that is very long already, don't do the expansion, it +would be truncated to MAXPATHL. (Anduin Withers) + +When 'selection' is "exclusive", using "Fx" in Visual mode only moved until +just after the character. + +When using IME on the console to enter a file name, the screen may scroll up. +Redraw the screen then. (Yasuhiro Matsumoto) + +Motif: In the find/replace dialog the "Replace" button didn't work first time, +second time it replaced all matches. Removed the use of ":s///c". +GTK: Similar problems with the find/replace dialog, moved the code to a common +function. + +X11: Use shared GC's for text. (Marcin Dalecki) + +"]i" found the match under the cursor, instead of the first one below it. +Same for "]I", "] CTRL-I", "]d", "]D" and "] CTRL-D". + +Win16: When maximized and the font is changed, don't change the window size. +(Vince Negri) + +When 'lbr' is set, deleting a block of text could leave the cursor in the +wrong position. + +Win32: When opening a file with the "Edit with Vim" popup menu entry, +wildcards would cause trouble. Added the "--literal" argument to avoid +expanding file names. + +When using "gv", it didn't restore that "$" was used in Visual block mode. + +Win32 GUI: While waiting for a shell command to finish, the window wasn't +redrawn at all. (Yasuhiro Matsumoto) + +Syntax highlighting: A match that continues on a next line because of a +contained region didn't end when that region ended. + +The ":s" command didn't allow flags like 'e' and 'i' right after it. + +When using ":s" to split a line, marks were moved to the next line. Vi keeps +them in the first line. + +When using ":n" ":rew", the previous context mark was at the top of the file, +while Vi puts it in the same place as the cursor. Made it Vi compatible. + +Fixed Vi incompatibility: Text was not put in register 1 when using "c" and +"d" with a motion character, when deleting within one line with one of the +commands: % ( ) `<character> / ? N n { } + +Win32 GUI: The tooltip for tear-off items remained when the tear-off item was +no longer selected. + +GUI: When typing ":" at the more prompt, would return to Normal mode and not +redraw the screen. + +When starting Vim with an argument "-c g/at/p" the printed lines would +overwrite each other. + +BeOS: Didn't compile. Configure didn't add the os_beos files, the QNX check +removed them. Various changes to os_beos.cc. (Joshua Haberman) +Removed the check for the hardware platform, the BeBox has not been produced +for a long time now. + +Win32 GUI: don't use a message box when the shell returns an error code, +display the message in the Vim window. + +Make_mvc.mak always included "/debug" for linking. "GUI=no" argument didn't +work. Use "DEBUG=yes" instead of "DEBUG=1" to make it consistent. (Dan Sharp) + +When a line in the tags file ended in ;" (no TAB following) the command would +not be recognized as a search command. + +X11: The inputMethod resource never worked. Don't use the "none" input method +for SGI, it apparently makes the first character in Input method dropped. + +Fixed incorrect tests in os_mac.h. (Axel Kielhorn) + +Win32 console: When the console where Vim runs in is closed, Vim could hang in +trying to restore the window icon. (Yasuhiro Matsumoto) + +When using ":3call func()" or ":3,3call func() the line number was ignored. + +When 'showbreak' and 'linebreak' were both set, Visual highlighting sometimes +continued until the end of the line. + +GTK GUI: Tearoff items were added even when 'guioptions' didn't contain 't' +when starting up. + +MS-Windows: When the current directory includes a "~", searching files with +"gf" or ":find" didn't work. A "$" in the directory had the same problem. +Added mch_has_exp_wildcard() functions. + +When reducing the Vim window height while starting up, would get an +out-of-memory error message. + +When editing a very long search pattern, 'incsearch' caused the redraw of the +command line to fail. + +Motif GUI: On some systems the "Help" menu would not be on the far right, as +it should be. On some other systems (esp. IRIX) the command line would not +completely show. Solution is to only resize the menubar for Lesstif. + +Using "%" in a line that contains "\\" twice didn't take care of the quotes +properly. Now make a difference between \" and \\". + +For non-Unix systems a dummy file is created when finding a swap name to +detect a 8.3 filesystem. When there is an existing swap file, would get a +warning for the file being created outside of Vim. Also, when closing the Vim +window the file would remain. + +Motif: The menu height was always computed, using a "-menuheight" argument +was setting the room for the command line. Now make clear the argument is not +supported. + +For some (EBCDIC) systems, POUND was equal to '#'. Added an #if for that to +avoid a duplicate case in a switch. + +The GUI may have problems when forking. Always call _exit() instead of exit() +in the parent, the child will call exit(). + +Win32 GUI: Accented characters were often wrong in dialogs and tearoff menus. +Now use CP_ACP instead of CP_OEMCP. (Vince Negri) + +When displaying text with syntax highlighting causes an error (e.g., running +out of stack) the syntax highlighting is disabled to avoid further messages. + +When a command in a .vimrc or .gvimrc causes an ATTENTION prompt, and Vim was +started from the desktop (no place to display messages) it would hang. Now +open the GUI window early to be able to display the messages and pop up the +dialog. + +"r<CR>" on a multi-byte character deleted only the first byte of the +character. "3r<CR>" deleted three bytes instead of three characters. + +When interrupting reading a file, Vi considers the buffer modified. Added the +'i' flag in 'cpoptions' flag for this (we don't want it modified to be able to +do ":q"). + +When using an item in 'guicursor' that starts with a colon, Vim would get +stuck or crash. + +When putting a file mark in a help file and later jumping back to it, the +options would not be set. Extended the modeline in all help files to make +this work better. + +When a modeline contained "::" the local option values would be printed. Now +ignore it. + +Some help files did not use a 8.3 names, which causes problems when using +MS-DOS unzip. Renamed "multibyte.txt" to "mbyte.txt", "rightleft.txt" to +"rileft.txt", "tagsearch.txt" to "tagsrch.txt", "os_riscos.txt" to +"os_risc.txt". + +When Visual mode is blockwise, using "iw" or "aw" made it characterwise. That +doesn't seem right, only do this when in linewise mode. But then do it +always, not only when start and end of Visual mode are equal. + +When using "viw" on a single-letter word and 'selection' is exclusive, would +not include the word. + +When formatting text from Insert mode, using CTRL-O, could mess up undo +information. + +While writing a file (also for the backup file) there was no check for an +interrupt (hitting CTRL-C). Vim could hang when writing a large file over a +slow network, and moving the mouse didn't make it appear (when 'mousehide' is +set) and the screen wasn't updated in the GUI. Also allow interrupting when +syncing the swap file, it can take a long time. + +When using ":mksession" while there is help window, it would later be restored +to the right file but not marked as a help buffer. ":help" would then open +another window. Now use the value "help" for 'buftype' to mark a help buffer. + +The session file contained absolute path names in option values, that doesn't +work when the home directory depends on the situation. Replace the home +directory with ~/ when possible. + +When using 'showbreak' a TAB just after the shown break would not be counted +correctly, the cursor would be positioned wrong. + +With 'showbreak' set to "--->" or "------->" and 'sts' set to 4, inserting +tabs did not work right. Could cause a crash. Backspacing was also wrong, +could get stuck at a line break. + +Win32: crashed when tearing off a menu with over 300 items. + +GUI: A menu or toolbar item would appear when only a tooltip was defined for +it. + +When 'scrolloff' is non-zero and "$" is in 'cpoptions', using "s" while the +last line of the file is the first line on screen, the text wasn't displayed. + +When running "autoconf", delete the configure cache to force starting cleanly +when configure is run again. + +When changing the Normal colors for cterm, the value of 'background' was +changed even when the GUI was used. + +The warning for a missing vimrun.exe was always given on startup, but some +people just editing a file don't need to be bothered by it. Only show it when +vimrun would be used. + +When using "%" in a multibyte text it could get confused by trailbytes that +match. (Muraoka Taro) + +Termcap entry for RiscOS was wrong, using 7 and 8 in octal codes. + +Athena: The title of a dialog window and the file selector window were not +set. (David Harrison) + +The "htmlLink" highlight group specified colors, which gives problems when +using a color scheme. Added the "Underlined" highlight group for this. + +After using ":insert" or ":change" the '[ mark would be one line too low. + +When looking for the file name after a match with 'include' one character was +skipped. Same for 'define'. + +Win32 and DJGPP: When editing a file with a short name in a directory, and +editing the same file but using the long name, would end up with two buffers +on the same file. + +"gf" on a filename that starts with "../" only worked when the file being +edited is in the current directory. An include file search didn't work +properly for files starting with "../" or ".". Now search both relative to +the file and to the current directory. + +When 'printheader', 'titlestring', 'iconstring', 'rulerformat' or 'statusline' +contained "%{" but no following "}" memory was corrupted and a crash could +happen. + +":0append" and then inserting two lines did not redraw the blank lines that +were scrolled back down. + +When using insert mode completion in a narrow window, the message caused a +scroll up. Now shorten the message if it doesn't fit and avoid writing the +ruler over the message. + +XIM still didn't work correctly on some systems, especially SGI/IRIX. Added +the 'imdisable' option, which is set by default for that system. + +Patch 6.0aw.008 +Problem: When the first character of a file name is over 127, the Buffers + menu entry would get a negative priority and cause problems. +Solution: Reduce the multiplier for the first character when computing + the hash value for a Buffers menu entry. +Files: runtime/menu.vim + +Patch 6.0aw.010 +Problem: Win32: ":browse edit dir/dir" didn't work. (Vikas) +Solution: Change slashes to backslashes in the directory passed to the file + browser. +Files: src/gui_w48.c + +Athena file browser: On some systems wcstombs() can't be used to get the +length of a multi-byte string. Use the maximum length then. (Yasuhiro +Matsumoto) + +Patch 6.0ax.001 +Problem: When 'patchmode' is set, appending to a file gives an empty + original file. (Ed Ralston) +Solution: Also make a backup copy when appending and 'patchmode' is set. +Files: src/fileio.c + +Patch 6.0ax.002 +Problem: When 'patchmode' is set, appending to a compressed file gives an + uncompressed original file. (Ed Ralston) +Solution: Create the original file before decompressing. +Files: runtime/plugin/gzip.vim + +Patch 6.0ax.005 +Problem: Athena file selector keeps the title of the first invocation. +Solution: Set the title each time the file selector is opened. (David + Harrison) +Files: src/gui_at_fs.c + +Patch 6.0ax.007 +Problem: When using GPM (mouse driver in a Linux console) a double click is + interpreted as a scroll wheel click. +Solution: Check if GPM is being used when deciding if a mouse event is for + the scroll wheel. +Files: src/term.c + +Patch 6.0ax.010 +Problem: The Edit.Save menu and the Save toolbar button didn't work when + the buffer has no file name. +Solution: Use a file browser to ask for a file name. Also fix the toolbar + Find item in Visual mode. +Files: runtime/menu.vim + +Patch 6.0ax.012 +Problem: When 'cpoptions' contains "$", breaking a line for 'textwidth' + doesn't redraw properly. (Stefan Schulze) +Solution: Remove the dollar before breaking the line. +Files: src/edit.c + +Patch 6.0ax.014 +Problem: Win32: On Windows 98 ":make -f file" doesn't work when 'shell' is + "command.com" and 'makeprg' is "nmake". The environment isn't + passed on to "nmake". +Solution: Also use vimrun.exe when redirecting the output of a command. +Files: src/os_win32.c + +Patch 6.0ax.016 +Problem: The version number was reported wrong in the intro screen. +Solution: Check for a version number with two additional letters. +Files: src/version.c + +Patch 6.0ax.019 +Problem: When scrolling a window with folds upwards, switching to another + vertically split window and back may not update the scrollbar. +Solution: Limit w_botline to the number of lines in the buffer plus one. +Files: src/move.c + + +============================================================================== +VERSION 6.1 *version-6.1* + +This section is about improvements made between version 6.0 and 6.1. + +This is a bug-fix release, there are not really any new features. + + +Changed *changed-6.1* +------- + +'iminsert' and 'imsearch' are no longer set as a side effect of defining a +language-mapping using ":lmap". + + +Added *added-6.1* +----- + +Syntax files: +ampl AMPL (David Krief) +ant Ant (Johannes Zellner) +baan Baan (Her van de Vliert) +cs C# (Johannes Zellner) +lifelines Lifelines (Patrick Texier) +lscript LotusScript (Taryn East) +moo MOO (Timo Frenay) +nsis NSIS (Alex Jakushev) +ppd Postscript Printer Description (Bjoern Jacke) +rpl RPL/2 (Joel Bertrand) +scilab Scilab (Benoit Hamelin) +splint Splint (Ralf Wildenhues) +sqlj SQLJ (Andreas Fischbach) +wvdial WvDial (Prahlad Vaidyanathan) +xf86conf XFree86 config (Nikolai Weibull) +xmodmap Xmodmap (Nikolai Weibull) +xslt Xslt (Johannes Zellner) +monk Monk (Mike Litherland) +xsd Xsd (Johannes Zellner) +cdl CDL (Raul Segura Acevedo) +sendpr Send-pr (Hendrik Scholz) + +Added indent file for Scheme. (Dorai Sitaram) +Added indent file for Prolog. (Kontra Gergely) +Added indent file for Povray (David Necas) +Added indent file for IDL (Aleksandar Jelenak) +Added C# indent and ftplugin scripts. + +Added Ukrainian menu translations. (Bohdan Vlasyuk) +Added ASCII version of the Czech menus. (Jiri Brezina) + +Added Simplified Chinese translation of the tutor. (Mendel L Chan) + +Added Russian keymap for yawerty keyboard. + +Added an explanation of using the vimrc file in the tutor. +Changed tutor.vim to get the right encoding for the Taiwainese tutor. + +Added Russian tutor. (Andrey Kiselev) +Added Polish tutor. (Mikolaj Machowski) + +Added darkblue color scheme. (Bohdan Vlasyuk) + +When packing the dos language archive automatically generate the .mo files +that are required. + +Improved NSIS script to support NSIS 180. Added icons for the +enabled/disabled status. (Mirek Pruchnik) + +cp1250 version of the Slovak message translations. + +Compiler plugins for IRIX compilers. (David Harrison) + + +Fixed *fixed-6.1* +----- + +The license text was updated to make the meaning clearer and make it +compatible with the GNU GPL. Otherwise distributors have a problem when +linking Vim with a GPL'ed library. + +When installing the "less.sh" script it was not made executable. (Chuck Berg) + +Win32: The "9" key on the numpad wasn't working. (Julian Kinraid) + +The NSIS install script didn't work with NSIS 1.80 or later. Also add +Vim-specific icons. (Pruchnik) + +The script for conversion to HTML contained an "if" in the wrong place. +(Michael Geddes) + +Allow using ":ascii" in the sandbox, it's harmless. + +Removed creat() from osdef2.h.in, it wasn't used and may cause a problem when +it's redefined to creat64(). + +The text files in the VisVim directory were in "dos" format. This caused +problems when applying a patch. Now keep them in "unix" format and convert +them to "dos" format only for the PC archives. + +Add ruby files to the dos source archive, they can be used by Make_mvc.mak. +(Mirek Pruchnik) + +"cp -f" doesn't work on all systems. Change "cp -f" in the Makefile to "rm +-f" and "cp". + +Didn't compile on a Compaq Tandem Himalaya OSS. (Michael A. Benzinger) + +The GTK file selection dialog didn't include the "Create Dir", "Delete File" +and "Rename File" buttons. + +When doing ":browse source" the dialog has the title "Run Macro". Better +would be "Source Vim script". (Yegappan Lakshmanan) + +Win32: Don't use the printer font as default for the font dialog. + +"make doslang" didn't work when configure didn't run (yet). Set $MAKEMO to +"yes". (Mirek Pruchnik) + +The ToolBar TagJump item used "g]", which prompts for a selection even when +there is only one matching tag. Use "g<C-]>" instead. + +The ming makefile for message translations didn't have the right list of +files. + +The MS-Windows 3.1 version complains about LIBINTL.DLL not found. Compile +this version without message translations. + +The Borland 5 makefile contained a check for Ruby which is no longer needed. +The URLs for the TCL library was outdated. (Dan Sharp) + +The eviso.ps file was missing from the DOS runtime archive, it's needed for +printing PostScript in the 32bit DOS version. + +In menu files ":scriptencoding" was used in a wrong way after patch 6.1a.032 +Now use ":scriptencoding" in the file where the translations are given. Do +the same for all menus in latin1 encoding. + +Included a lot of fixes for the Macintosh, mostly to make it work with Carbon. +(Dany StAmant, Axel Kielhorn, Benji Fisher) + +Improved the vimtutor shell script to use $TMPDIR when it exists, and delete +the copied file when exiting in an abnormal way. (Max Ischenko) + +When "iconv.dll" can't be found, try using "libiconv.dll". + +When encryption is used, filtering with a shell command wasn't possible. + +DJGPP: ":cd c:" always failed, can't get permissions for "c:". +Win32: ":cd c:/" failed if the previous current directory on c: had become +invalid. + +DJGPP: Shift-Del and Del both produce \316\123. Default mapping for Del is +wrong. Disabled it. + +Dependencies on header files in MingW makefile was wrong. + +Win32: Don't use ACL stuff for MSVC 4.2, it's not supported. (Walter Briscoe) + +Win32 with Borland: bcc.cfg was caching the value for $(BOR), but providing a +different argument to make didn't regenerate it. + +Win32 with MSVC: Make_ivc.mak generates a new if_ole.h in a different +directory, the if_ole.h in the src directory may be used instead. Delete the +distributed file. + +When a window is vertically split and then ":ball" is used, the window layout +is messed up, can cause a crash. (Muraoka Taro) + +When 'insertmode' is set, using File/New menu and then double clicking, "i" is +soon inserted. (Merlin Hansen) + +When Select mode is active and using the Buffers menu to switch to another +buffer, an old selection comes back. Reset VIsual_reselect for a ":buffer" +command. + +When Select mode is active and 'insertmode' is set, using the Buffers menu to +switch to another buffer, did not return to Insert mode. Make sure +"restart_edit" is set. + +When double clicking on the first character of a word while 'selection' is +"exclusive" didn't select that word. + + +Patch 6.0.001 +Problem: Loading the sh.vim syntax file causes error messages. (Corinna + Vinschen) +Solution: Add an "if". (Charles Campbell) +Files: runtime/syntax/sh.vim + +Patch 6.0.002 +Problem: Using a '@' item in 'viminfo' doesn't work. (Marko Leipert) +Solution: Add '@' to the list of accepted items. +Files: src/option.c + +Patch 6.0.003 +Problem: The configure check for ACLs on AIX doesn't work. +Solution: Fix the test program so that it compiles. (Tomas Ogren) +Files: src/configure.in, src/auto/configure + +Patch 6.0.004 +Problem: The find/replace dialog doesn't reuse a previous argument + properly. +Solution: After removing a "\V" terminate the string. (Zwane Mwaikambo) +Files: src/gui.c + +Patch 6.0.005 +Problem: In Insert mode, "CTRL-O :ls" has a delay before redrawing. +Solution: Don't delay just after wait_return() was called. Added the + did_wait_return flag. +Files: src/globals.h, src/message.c, src/normal.c, src/screen.c + +Patch 6.0.006 +Problem: With a vertical split, 'number' set and 'scrolloff' non-zero, + making the window width very small causes a crash. (Niklas + Lindstrom) +Solution: Check for a zero width. +Files: src/move.c + +Patch 6.0.007 +Problem: When setting 'filetype' while there is no FileType autocommand, a + following ":setfiletype" would set 'filetype' again. (Kobus + Retief) +Solution: Set did_filetype always when 'filetype' has been set. +Files: src/option.c + +Patch 6.0.008 +Problem: 'imdisable' is missing from the options window. (Michael Naumann) +Solution: Add an entry for it. +Files: runtime/optwin.vim + +Patch 6.0.009 +Problem: Nextstep doesn't have S_ISBLK. (John Beppu) +Solution: Define S_ISBLK using S_IFBLK. +Files: src/os_unix.h + +Patch 6.0.010 +Problem: Using "gf" on a file name starting with "./" or "../" in a buffer + without a name causes a crash. (Roy Lewis) +Solution: Check for a NULL file name. +Files: src/misc2.c + +Patch 6.0.011 +Problem: Python: After replacing or deleting lines get an ml_get error. + (Leo Lipelis) +Solution: Adjust the cursor position for deleted or added lines. +Files: src/if_python.c + +Patch 6.0.012 +Problem: Polish translations contain printf format errors, this can result + in a crash when using one of them. +Solution: Fix for translated messages. (Michal Politowski) +Files: src/po/pl.po + +Patch 6.0.013 +Problem: Using ":silent! cmd" still gives some error messages, like for an + invalid range. (Salman Halim) +Solution: Reset emsg_silent after calling emsg() in do_one_cmd(). +Files: src/ex_docmd.c + +Patch 6.0.014 +Problem: When 'modifiable' is off and 'virtualedit' is "all", "rx" on a TAB + still changes the buffer. (Muraoka Taro) +Solution: Check if saving the line for undo fails. +Files: src/normal.c + +Patch 6.0.015 +Problem: When 'cpoptions' includes "S" and "filetype plugin on" has been + used, can get an error for deleting the b:did_ftplugin variable. + (Ralph Henderson) +Solution: Only delete the variable when it exists. +Files: runtime/ftplugin.vim + +Patch 6.0.016 +Problem: bufnr(), bufname() and bufwinnr() don't find unlisted buffers when + the argument is a string. (Hari Krishna Dara) + Also for setbufvar() and getbufvar(). +Solution: Also find unlisted buffers. +Files: src/eval.c + +Patch 6.0.017 +Problem: When 'ttybuiltin' is set and a builtin termcap entry defines t_Co + and the external one doesn't, it gets reset to empty. (David + Harrison) +Solution: Only set t_Co when it wasn't set yet. +Files: src/term.c + +Patch 6.0.018 +Problem: Initializing 'encoding' may cause a crash when setlocale() is not + used. (Dany St-Amant) +Solution: Check for a NULL pointer. +Files: src/mbyte.c + +Patch 6.0.019 +Problem: Converting a string with multi-byte characters to a printable + string, e.g., with strtrans(), may cause a crash. (Tomas Zellerin) +Solution: Correctly compute the length of the result in transstr(). +Files: src/charset.c + +Patch 6.0.020 +Problem: When obtaining the value of a global variable internally, could + get the function-local value instead. Applies to using <Leader> + and <LocalLeader> and resetting highlighting in a function. +Solution: Prepend "g:" to the variable name. (Aric Blumer) +Files: src/syntax.c, src/term.c + +Patch 6.0.021 +Problem: The 'cscopepathcomp' option didn't work. +Solution: Change USE_CSCOPE to FEAT_CSCOPE. (Mark Feng) +Files: src/option.c + +Patch 6.0.022 +Problem: When using the 'langmap' option, the second character of a command + starting with "g" isn't adjusted. +Solution: Apply 'langmap' to the second character. (Alex Kapranoff) +Files: src/normal.c + +Patch 6.0.023 +Problem: Loading the lhaskell syntax doesn't work. (Thore B. Karlsen) +Solution: Use ":runtime" instead of "source" to load haskell.vim. +Files: runtime/syntax/lhaskell.vim + +Patch 6.0.024 +Problem: Using "CTRL-V u 9900" in Insert mode may cause a crash. (Noah + Levitt) +Solution: Don't insert a NUL byte in the text, use a newline. +Files: src/misc1.c + +Patch 6.0.025 +Problem: The pattern "\vx(.|$)" doesn't match "x" at the end of a line. + (Preben Peppe Guldberg) +Solution: Always see a "$" as end-of-line after "\v". Do the same for "^". +Files: src/regexp.c + +Patch 6.0.026 +Problem: GTK: When using arrow keys to navigate through the menus, the + separators are selected. +Solution: Set the separators "insensitive". (Pavel Kankovsky) +Files: src/gui_gtk.c, src/gui_gtk_x11.c + +Patch 6.0.027 +Problem: VMS: Printing doesn't work, the file is deleted too quickly. + No longer need the VMS specific printing menu. + gethostname() is not available with VAXC. + The makefile was lacking selection of the tiny-huge feature set. +Solution: Adjust the 'printexpr' option default. Fix the other problems and + update the documentation. (Zoltan Arpadffy) +Files: runtime/doc/os_vms.txt, runtime/menu.vim, src/INSTALLvms.txt, + src/Make_vms.mms, src/option.c, src/os_unix.c, src/os_vms_conf.h + +Patch 6.0.028 +Problem: Can't compile without +virtualedit and with +visualextra. (Geza + Lakner) +Solution: Add an #ifdef for +virtualedit. +Files: src/ops.c + +Patch 6.0.029 +Problem: When making a change in line 1, then in line 2 and then deleting + line 1, undo info could be wrong. Only when the changes are undone + at once. (Gerhard Hochholzer) +Solution: When not saving a line for undo because it was already done + before, remember for which entry the last line must be computed. + Added ue_getbot_entry pointer for this. When the number of lines + changes, adjust the position of newer undo entries. +Files: src/structs.h, src/undo.c + +Patch 6.0.030 +Problem: Using ":source! file" doesn't work inside a loop or after + ":argdo". (Pavol Juhas) +Solution: Execute the commands in the file right away, do not let the main + loop do it. +Files: src/ex_cmds2.c, src/ex_docmd.c, src/getchar.c, src/globals.h, + src/proto/ex_docmd.pro, src/proto/getchar.pro + +Patch 6.0.031 +Problem: Nextstep doesn't have setenv() or putenv(). (John Beppu) +Solution: Move putenv() from pty.c to misc2.c +Files: src/misc2.c, src/pty.c + +Patch 6.0.032 +Problem: When changing a setting that affects all folds, they are not + displayed immediately. +Solution: Set the redraw flag in foldUpdateAll(). +Files: src/fold.c + +Patch 6.0.033 +Problem: Using 'wildmenu' on MS-Windows, file names that include a space + are only displayed starting with that space. (Xie Yuheng) +Solution: Don't recognize a backslash before a space as a path separator. +Files: src/screen.c + +Patch 6.0.034 +Problem: Calling searchpair() with three arguments could result in a crash + or strange error message. (Kalle Bjorklid) +Solution: Don't use the fifth argument when there is no fourth argument. +Files: src/eval.c + +Patch 6.0.035 +Problem: The menu item Edit/Global_Settings/Toggle_Toolbar doesn't work + when 'ignorecase' is set. (Allen Castaban) +Solution: Always match case when checking if a flag is already present in + 'guioptions'. +Files: runtime/menu.vim + +Patch 6.0.036 +Problem: OS/2, MS-DOS and MS-Windows: Using a path that starts with a + slash in 'tags' doesn't work as expected. (Mathias Koehrer) +Solution: Only use the drive, not the whole path to the current directory. + Also make it work for "c:dir/file". +Files: src/misc2.c + +Patch 6.0.037 +Problem: When the user has set "did_install_syntax_menu" to avoid the + default Syntax menu it still appears. (Virgilio) +Solution: Don't add the three default items when "did_install_syntax_menu" + is set. +Files: runtime/menu.vim + +Patch 6.0.038 +Problem: When 'selection' is "exclusive", deleting a block of text at the + end of a line can leave the cursor beyond the end of the line. +Solution: Correct the cursor position. +Files: src/ops.c + +Patch 6.0.039 +Problem: "gP" leaves the cursor in the wrong position when 'virtualedit' is + used. Using "c" in blockwise Visual mode leaves the cursor in a + strange position. +Solution: For "gP" reset the "coladd" field for the '] mark. For "c" leave + the cursor on the last inserted character. +Files: src/ops.c + +Patch 6.0.040 +Problem: When 'fileencoding' is invalid and writing fails because of + this, the original file is gone. (Eric Carlier) +Solution: Restore the original file from the backup. +Files: src/fileio.c + +Patch 6.0.041 +Problem: Using ":language messages en" when LC_MESSAGES is undefined + results in setting LC_CTYPE. (Eric Carlier) +Solution: Set $LC_MESSAGES instead. +Files: src/ex_cmds2.c + +Patch 6.0.042 +Problem: ":mksession" can't handle file names with a space. +Solution: Escape special characters in file names with a backslash. +Files: src/ex_docmd.c + +Patch 6.0.043 +Problem: Patch 6.0.041 was wrong. +Solution: Use mch_getenv() instead of vim_getenv(). +Files: src/ex_cmds2.c + +Patch 6.0.044 +Problem: Using a "containedin" list for a syntax item doesn't work for an + item that doesn't have a "contains" argument. Also, "containedin" + doesn't ignore a transparent item. (Timo Frenay) +Solution: When there is a "containedin" argument somewhere, always check for + contained items. Don't check for the transparent item but the + item it's contained in. +Files: src/structs.h, src/syntax.c + +Patch 6.0.045 +Problem: After creating a fold with a Visual selection, another window + with the same buffer still has inverted text. (Sami Salonen) +Solution: Redraw the inverted text. +Files: src/normal.c + +Patch 6.0.046 +Problem: When getrlimit() returns an 8 byte number the check for running + out of stack may fail. (Anthony Meijer) +Solution: Skip the stack check if the limit doesn't fit in a long. +Files: src/auto/configure, src/config.h.in, src/configure.in, + src/os_unix.c + +Patch 6.0.047 +Problem: Using a regexp with "\(\)" inside a "\%[]" item causes a crash. + (Samuel Lacas) +Solution: Don't allow nested atoms inside "\%[]". +Files: src/regexp.c + +Patch 6.0.048 +Problem: Win32: In the console the mouse doesn't always work correctly. + Sometimes after getting focus a mouse movement is interpreted like + a button click. +Solution: Use a different function to obtain the number of mouse buttons. + Avoid recognizing a button press from undefined bits. (Vince Negri) +Files: src/os_win32.c + +Patch 6.0.049 +Problem: When using evim the intro screen is misleading. (Adrian Nagle) +Solution: Mention whether 'insertmode' is set and the menus to be used. +Files: runtime/menu.vim, src/version.c + +Patch 6.0.050 +Problem: UTF-8: "viw" doesn't include non-ASCII characters before the + cursor. (Bertilo Wennergren) +Solution: Use dec_cursor() instead of decrementing the column number. +Files: src/search.c + +Patch 6.0.051 +Problem: UTF-8: Using CTRL-R on the command line doesn't insert composing + characters. (Ron Aaron) +Solution: Also include the composing characters and fix redrawing them. +Files: src/ex_getln.c, src/ops.c + +Patch 6.0.052 +Problem: The check for rlim_t in patch 6.0.046 does not work on some + systems. (Zdenek Sekera) +Solution: Also look in sys/resource.h for rlim_t. +Files: src/auto/configure, src/configure.in + +Patch 6.0.053 (extra) +Problem: Various problems with QNX. +Solution: Minor fix for configure. Switch on terminal clipboard support in + main.c. Fix "pterm" mouse support. os_qnx.c didn't build without + photon. (Julian Kinraid) +Files: src/auto/configure, src/configure.in, src/gui_photon.c, + src/main.c, src/misc2.c, src/option.h, src/os_qnx.c, src/os_qnx.h, + src/syntax.c + +Patch 6.0.054 +Problem: When using mswin.vim, CTRL-V pastes a block of text like it is + normal text. Using CTRL-V in blockwise Visual mode leaves "x" + characters behind. +Solution: Make CTRL-V work as it should. Do the same for the Paste menu + entries. +Files: runtime/menu.vim, runtime/mswin.vim + +Patch 6.0.055 +Problem: GTK: The selection isn't copied the first time. +Solution: Own the selection at the right moment. +Files: src/gui_gtk_x11.c + +Patch 6.0.056 +Problem: Using "CTRL-O cw" in Insert mode results in a nested Insert mode. + <Esc> doesn't leave Insert mode then. +Solution: Only use nested Insert mode when 'insertmode' is set or when a + mapping is used. +Files: src/normal.c + +Patch 6.0.057 +Problem: Using ":wincmd g}" in a function doesn't work. (Gary Holloway) +Solution: Execute the command directly, instead of putting it in the + typeahead buffer. +Files: src/normal.c, src/proto/normal.pro, src/window.c + +Patch 6.0.058 +Problem: When a Cursorhold autocommand moved the cursor, the ruler wasn't + updated. (Bohdan Vlasyuk) +Solution: Update the ruler after executing the autocommands. +Files: src/gui.c + +Patch 6.0.059 +Problem: Highlighting for 'hlsearch' isn't visible in lines that are + highlighted for diff highlighting. (Gary Holloway) +Solution: Let 'hlsearch' highlighting overrule diff highlighting. +Files: src/screen.c + +Patch 6.0.060 +Problem: Motif: When the tooltip is to be popped up, Vim crashes. + (Gary Holloway) +Solution: Check for a NULL return value from gui_motif_fontset2fontlist(). +Files: src/gui_beval.c + +Patch 6.0.061 +Problem: The toolbar buttons to load and save a session do not correctly + use v:this_session. +Solution: Check for v:this_session to be empty instead of existing. +Files: runtime/menu.vim + +Patch 6.0.062 +Problem: Crash when 'verbose' is > 3 and using ":shell". (Yegappan + Lakshmanan) +Solution: Avoid giving a NULL pointer to printf(). Also output a newline + and switch the cursor on. +Files: src/misc2.c + +Patch 6.0.063 +Problem: When 'cpoptions' includes "$", using "cw" to type a ')' on top of + the "$" doesn't update syntax highlighting after it. +Solution: Stop displaying the "$" when typing a ')' in its position. +Files: src/search.c + +Patch 6.0.064 (extra) +Problem: The NSIS install script doesn't work with newer versions of NSIS. + The diff feature doesn't work when there isn't a good diff.exe on + the system. +Solution: Replace the GetParentDir instruction by a user function. + Fix a few cosmetic problems. Use defined constants for the + version number, so that it's defined in one place only. + Only accept the install directory when it ends in "vim". + (Eduardo Fernandez) + Add a diff.exe and use it from the default _vimrc. +Files: nsis/gvim.nsi, nsis/README.txt, src/dosinst.c + +Patch 6.0.065 +Problem: When using ":normal" in 'indentexpr' it may use redo characters + before its argument. (Neil Bird) +Solution: Save and restore the stuff buffer in ex_normal(). +Files: src/ex_docmd.c, src/getchar.c, src/globals.h, src/structs.h + +Patch 6.0.066 +Problem: Sometimes undo for one command is split into two undo actions. + (Halim Salman) +Solution: Don't set the undo-synced flag when reusing a line that was + already saved for undo. +Files: src/undo.c + +Patch 6.0.067 +Problem: if_xcmdsrv.c doesn't compile on systems where fd_set isn't defined + in the usual header file (e.g., AIX). (Mark Waggoner) +Solution: Include sys/select.h in if_xcmdsrv.c for systems that have it. +Files: src/if_xcmdsrv.c + +Patch 6.0.068 +Problem: When formatting a Visually selected area with "gq" and the number + of lines increases the last line may not be redrawn correctly. + (Yegappan Lakshmanan) +Solution: Correct the area to be redrawn for inserted/deleted lines. +Files: src/ops.c + +Patch 6.0.069 +Problem: Using "K" on a word that includes a "!" causes a "No previous + command" error, because the "!" is expanded. (Craig Jeffries) +Solution: Put a backslash before the "!". +Files: src/normal.c + +Patch 6.0.070 +Problem: Win32: The error message for a failed dynamic linking of a Perl, + Ruby, Tcl and Python library is unclear about what went wrong. +Solution: Give the name of the library or function that could not be loaded. + Also for the iconv and gettext libraries when 'verbose' is set. +Files: src/eval.c, src/if_perl.xs, src/if_python.c, src/if_ruby.c, + src/if_tcl.c, src/mbyte.c, src/os_win32.c, src/proto/if_perl.pro, + src/proto/if_python.pro, src/proto/if_ruby.pro, + src/proto/if_tcl.pro, src/proto/mbyte.pro + +Patch 6.0.071 +Problem: The "iris-ansi" builtin termcap isn't very good. +Solution: Fix the wrong entries. (David Harrison) +Files: src/term.c + +Patch 6.0.072 +Problem: When 'lazyredraw' is set, a mapping that stops Visual mode, moves + the cursor and starts Visual mode again causes a redraw problem. + (Brian Silverman) +Solution: Redraw both the old and the new Visual area when necessary. +Files: src/normal.c, src/screen.c + +Patch 6.0.073 (extra) +Problem: DJGPP: When using CTRL-Z to start a shell, the prompt is halfway + the text. (Volker Kiefel) +Solution: Position the system cursor before starting the shell. +Files: src/os_msdos.c + +Patch 6.0.074 +Problem: When using "&" in a substitute string a multi-byte character with + a trailbyte 0x5c is not handled correctly. +Solution: Recognize multi-byte characters inside the "&" part. (Muraoka Taro) +Files: src/regexp.c + +Patch 6.0.075 +Problem: When closing a horizontally split window while 'eadirection' is + "hor" another horizontally split window is still resized. (Aron + Griffis) +Solution: Only resize windows in the same top frame as the window that is + split or closed. +Files: src/main.c, src/proto/window.pro, src/window.c + +Patch 6.0.076 +Problem: Warning for wrong pointer type when compiling. +Solution: Use char instead of char_u pointer. +Files: src/version.c + +Patch 6.0.077 +Problem: Patch 6.0.075 was incomplete. +Solution: Fix another call to win_equal(). +Files: src/option.c + +Patch 6.0.078 +Problem: Using "daw" at the end of a line on a single-character word didn't + include the white space before it. At the end of the file it + didn't work at all. (Gavin Sinclair) +Solution: Include the white space before the word. +Files: src/search.c + +Patch 6.0.079 +Problem: When "W" is in 'cpoptions' and 'backupcopy' is "no" or "auto", can + still overwrite a read-only file, because it's renamed. (Gary + Holloway) +Solution: Add a check for a read-only file before renaming the file to + become the backup. +Files: src/fileio.c + +Patch 6.0.080 +Problem: When using a session file that has the same file in two windows, + the fileinfo() call in do_ecmd() causes a scroll and a hit-enter + prompt. (Robert Webb) +Solution: Don't scroll this message when 'shortmess' contains 'O'. +Files: src/ex_cmds.c + +Patch 6.0.081 +Problem: After using ":saveas" the new buffer name is added to the Buffers + menu with a wrong number. (Chauk-Mean Proum) +Solution: Trigger BufFilePre and BufFilePost events for the renamed buffer + and BufAdd for the old name (which is with a new buffer). +Files: src/ex_cmds.c + +Patch 6.0.082 +Problem: When swapping screens in an xterm and there is an (error) message + from the vimrc script, the shell prompt is after the message. +Solution: Output a newline when there was output on the alternate screen. + Also when starting the GUI. +Files: src/main.c + +Patch 6.0.083 +Problem: GTK: When compiled without menu support the buttons in a dialog + don't have any text. (Erik Edelmann) +Solution: Add the text also when GTK_USE_ACCEL isn't defined. And define + GTK_USE_ACCEL also when not using menus. +Files: src/gui_gtk.c + +Patch 6.0.084 +Problem: UTF-8: a "r" command with an argument that is a keymap for a + character with a composing character can't be repeated with ".". + (Raphael Finkel) +Solution: Add the composing characters to the redo buffer. +Files: src/normal.c + +Patch 6.0.085 +Problem: When 'mousefocus' is set, using "s" to go to Insert mode and then + moving the mouse pointer to another window stops Insert mode, + while this doesn't happen with "a" or "i". (Robert Webb) +Solution: Reset finish_op before calling edit(). +Files: src/normal.c + +Patch 6.0.086 +Problem: When using "gu" the message says "~ed". +Solution: Make the message say "changed". +Files: src/ops.c + +Patch 6.0.087 (lang) +Problem: Message translations are incorrect, which may cause a crash. + (Peter Figura) + The Turkish translations needed more work and the maintainer + didn't have time. +Solution: Fix order of printf arguments. Remove %2$d constructs. + Add "-v" to msgfmt to get a warning for wrong translations. + Don't install the Turkish translations for now. + Update a few more translations. +Files: src/po/Makefile, src/po/af.po, src/po/cs.po, src/po/cs.cp1250.po, + src/po/de.po, src/po/es.po, src/po/fr.po, src/po/it.po, + src/po/ja.po, src/po/ja.sjis.po, src/po/ko.po, src/po/pl.po, + src/po/sk.po, src/po/uk.po, src/po/zh_CN.UTF-8.po, + src/po/zh_CN.cp936.po, src/po/zh_CN.po, src/po/zh_TW.po + +Patch 6.0.088 +Problem: "." doesn't work after using "rx" in Visual mode. (Charles + Campbell) +Solution: Also store the replacement character in the redo buffer. +Files: src/normal.c + +Patch 6.0.089 +Problem: In a C file, using "==" to align a line starting with "* " after + a line with "* -" indents one space too few. (Piet Delport) +Solution: Align with the previous line if the comment-start-string matches + there. +Files: src/misc1.c + +Patch 6.0.090 +Problem: When a wrapping line does not fit in a window and 'scrolloff' is + bigger than half the window height, moving the cursor left or + right causes the screen to flash badly. (Lubomir Host) +Solution: When there is not enough room to show 'scrolloff' screen lines and + near the end of the line, show the end of the line. +Files: src/move.c + +Patch 6.0.091 +Problem: Using CTRL-O in Insert mode, while 'virtualedit' is "all" and the + cursor is after the end-of-line, moves the cursor left. (Yegappan + Lakshmanan) +Solution: Keep the cursor in the same position. +Files: src/edit.c + +Patch 6.0.092 +Problem: The explorer plugin doesn't ignore case of 'suffixes' on + MS-Windows. (Mike Williams) +Solution: Match or ignore case as appropriate for the OS. +Files: runtime/plugin/explorer.vim + +Patch 6.0.093 +Problem: When the Tcl library couldn't be loaded dynamically, get an error + message when closing a buffer or window. (Muraoka Taro) +Solution: Only free structures if already using the Tcl interpreter. +Files: src/if_tcl.c + +Patch 6.0.094 +Problem: Athena: When clicking in the horizontal scrollbar Vim crashes. + (Paul Ackersviller) +Solution: Use the thumb size instead of the window pointer of the scrollbar + (which is NULL). (David Harrison) + Also avoid that scrolling goes the wrong way in a narrow window. +Files: src/gui_athena.c + +Patch 6.0.095 +Problem: Perl: Deleting lines may leave the cursor beyond the end of the + file. +Solution: Check the cursor position after deleting a line. (Serguei) +Files: src/if_perl.xs + +Patch 6.0.096 +Problem: When ":saveas fname" fails because the file already exists, the + file name is changed anyway and a following ":w" will overwrite + the file. (Eric Carlier) +Solution: Don't change the file name if the file already exists. +Files: src/ex_cmds.c + +Patch 6.0.097 +Problem: Re-indenting in Insert mode with CTRL-F may cause a crash with a + multi-byte encoding. +Solution: Avoid using a character before the start of a line. (Sergey + Vlasov) +Files: src/edit.c + +Patch 6.0.098 +Problem: GTK: When using Gnome the "Search" and "Search and Replace" dialog + boxes are not translated. +Solution: Define ENABLE_NLS before including gnome.h. (Eduardo Fernandez) +Files: src/gui_gtk.c, src/gui_gtk_x11.c + +Patch 6.0.099 +Problem: Cygwin: When running Vi compatible MS-DOS line endings cause + trouble. +Solution: Make the default for 'fileformats' "unix,dos" in Vi compatible + mode. (Michael Schaap) +Files: src/option.h + +Patch 6.0.100 +Problem: ":badd +0 test%file" causes a crash. +Solution: Take into account that the "+0" is NUL terminated when allocating + room for replacing the "%". +Files: src/ex_docmd.c + +Patch 6.0.101 +Problem: ":mksession" doesn't restore editing a file that has a '#' or '%' + in its name. (Wolfgang Blankenburg) +Solution: Put a backslash before the '#' and '%'. +Files: src/ex_docmd.c + +Patch 6.0.102 +Problem: When changing folds the cursor may appear halfway a closed fold. + (Nam SungHyun) +Solution: Set w_cline_folded correctly. (Yasuhiro Matsumoto) +Files: src/move.c + +Patch 6.0.103 +Problem: When using 'scrollbind' a large value of 'scrolloff' will make the + scroll binding stop near the end of the file. (Coen Engelbarts) +Solution: Don't use 'scrolloff' when limiting the topline for scroll + binding. (Dany StAmant) +Files: src/normal.c + +Patch 6.0.104 +Problem: Multi-byte: When '$' is in 'cpoptions', typing a double-wide + character that overwrites the left halve of an old double-wide + character causes a redraw problem and the cursor stops blinking. +Solution: Clear the right half of the old character. (Yasuhiro Matsumoto) +Files: src/edit.c, src/screen.c + +Patch 6.0.105 +Problem: Multi-byte: In a window of one column wide, with syntax + highlighting enabled a crash might happen. +Solution: Skip getting the syntax attribute when the character doesn't fit + anyway. (Yasuhiro Matsumoto) +Files: src/screen.c + +Patch 6.0.106 (extra) +Problem: Win32: When the printer font is wrong, there is no error message. +Solution: Give an appropriate error message. (Yasuhiro Matsumoto) +Files: src/os_mswin.c + +Patch 6.0.107 (extra) +Problem: VisVim: When editing another file, a modified file may be written + unexpectedly and without warning. +Solution: Split the window if a file was modified. +Files: VisVim/Commands.cpp + +Patch 6.0.108 +Problem: When using folding could try displaying line zero, resulting in an + error for a NULL pointer. +Solution: Stop decrementing w_topline when the first line of a window is in + a closed fold. +Files: src/window.c + +Patch 6.0.109 +Problem: XIM: When the input method is enabled, repeating an insertion with + "." disables it. (Marcel Svitalsky) +Solution: Don't store the input method status when a command comes from the + stuff buffer. +Files: src/ui.c + +Patch 6.0.110 +Problem: Using undo after executing "OxjAxkdd" from a register in + an empty buffer gives an error message. (Gerhard Hochholzer) +Solution: Don't adjust the bottom line number of an undo block when it's + zero. Add a test for this problem. +Files: src/undo.c, src/testdir/test20.in, src/testdir/test20.ok + +Patch 6.0.111 +Problem: The virtcol() function doesn't take care of 'virtualedit'. +Solution: Add the column offset when needed. (Yegappan Lakshmanan) +Files: src/eval.c + +Patch 6.0.112 +Problem: The explorer plugin doesn't sort directories with a space or + special character after a directory with a shorter name. +Solution: Ignore the trailing slash when comparing directory names. (Mike + Williams) +Files: runtime/plugin/explorer.vim + +Patch 6.0.113 +Problem: ":edit ~/fname" doesn't work if $HOME includes a space. Also, + expanding wildcards with the shell may fail. (John Daniel) +Solution: Escape spaces with a backslash when needed. +Files: src/ex_docmd.c, src/misc1.c, src/proto/misc1.pro, src/os_unix.c + +Patch 6.0.114 +Problem: Using ":p" with fnamemodify() didn't expand "~/" or "~user/" to a + full path. For Win32 the current directory was prepended. + (Michael Geddes) +Solution: Expand the home directory. +Files: src/eval.c + +Patch 6.0.115 (extra) +Problem: Win32: When using a dialog with a textfield it cannot scroll the + text. +Solution: Add ES_AUTOHSCROLL to the textfield style. (Pedro Gomes) +Files: src/gui_w32.c + +Patch 6.0.116 (extra) +Problem: MS-Windows NT/2000/XP: filewritable() doesn't work correctly for + filesystems that use ACLs. +Solution: Use ACL functions to check if a file is writable. (Mike Williams) +Files: src/eval.c, src/macros.h, src/os_win32.c, src/proto/os_win32.pro + +Patch 6.0.117 (extra) +Problem: Win32: when disabling the menu, "set lines=999" doesn't use all + the available screen space. +Solution: Don't subtract the fixed caption height but the real menu height + from the available screen space. Also: Avoid recursion in + gui_mswin_get_menu_height(). +Files: src/gui_w32.c, src/gui_w48.c + +Patch 6.0.118 +Problem: When $TMPDIR is a relative path, the temp directory is missing a + trailing slash and isn't deleted when Vim exits. (Peter Holm) +Solution: Add the slash after expanding the directory to an absolute path. +Files: src/fileio.c + +Patch 6.0.119 (depends on patch 6.0.116) +Problem: VMS: filewritable() doesn't work properly. +Solution: Use the same method as for Unix. (Zoltan Arpadffy) +Files: src/eval.c + +Patch 6.0.120 +Problem: The conversion to html isn't compatible with XHTML. +Solution: Quote the values. (Jess Thrysoee) +Files: runtime/syntax/2html.vim + +Patch 6.0.121 (extra) (depends on patch 6.0.116) +Problem: Win32: After patch 6.0.116 Vim doesn't compile with mingw32. +Solution: Add an #ifdef HAVE_ACL. +Files: src/os_win32.c + +Patch 6.0.122 (extra) +Problem: Win16: Same resize problems as patch 6.0.117 fixed for Win32. And + dialog textfield problem from patch 6.0.115. +Solution: Set old_menu_height only when used. Add ES_AUTOHSCROLL flag. + (Vince Negri) +Files: src/gui_w16.c + +Patch 6.0.123 (depends on patch 6.0.119) +Problem: Win16: Compilation problems. +Solution: Move "&&" to other lines. (Vince Negri) +Files: src/eval.c + +Patch 6.0.124 +Problem: When using a ":substitute" command that starts with "\=" + (evaluated as an expression), "~" was still replaced with the + previous substitute string. +Solution: Skip the replacement when the substitute string starts with "\=". + Also adjust the documentation about doubling backslashes. +Files: src/ex_cmds.c, runtime/doc/change.txt + +Patch 6.0.125 (extra) +Problem: Win32: When using the multi_byte_ime feature pressing the shift + key would be handled as if a character was entered, thus mappings + with a shifted key didn't work. (Charles Campbell) +Solution: Ignore pressing the shift, control and alt keys. +Files: src/os_win32.c + +Patch 6.0.126 +Problem: The python library was always statically linked. +Solution: Link the python library dynamically. (Matthias Klose) +Files: src/auto/configure, src/configure.in + +Patch 6.0.127 +Problem: When using a terminal that swaps screens and the Normal background + color has a different background, using an external command may + cause the color of the wrong screen to be changed. (Mark Waggoner) +Solution: Don't call screen_stop_highlight() in stoptermcap(). +Files: src/term.c + +Patch 6.0.128 +Problem: When moving a vertically split window to the far left or right, + the scrollbars are not adjusted. (Scott E Lee) When 'mousefocus' + is set the mouse pointer wasn't adjusted. +Solution: Adjust the scrollbars and the mouse pointer. +Files: src/window.c + +Patch 6.0.129 +Problem: When using a very long file name, ":ls" (repeated a few times) + causes a crash. Test with "vim `perl -e 'print "A"x1000'`". + (Tejeda) +Solution: Terminate a string before getting its length in buflist_list(). +Files: src/buffer.c + +Patch 6.0.130 +Problem: When using ":cprev" while the error window is open, and the new + line at the top wraps, the window isn't correctly drawn. + (Yegappan Lakshmanan) +Solution: When redrawing the topline don't scroll twice. +Files: src/screen.c + +Patch 6.0.131 +Problem: When using bufname() and there are two matches for listed buffers + and one match for an unlisted buffer, the unlisted buffer is used. + (Aric Blumer) +Solution: When there is a match with a listed buffer, don't check for + unlisted buffers. +Files: src/buffer.c + +Patch 6.0.132 +Problem: When setting 'iminsert' in the vimrc and using an xterm with two + screens the ruler is drawn in the wrong screen. (Igor Goldenberg) +Solution: Only draw the ruler when using the right screen. +Files: src/option.c + +Patch 6.0.133 +Problem: When opening another buffer while 'keymap' is set and 'iminsert' + is zero, 'iminsert' is set to one unexpectedly. (Igor Goldenberg) +Solution: Don't set 'iminsert' as a side effect of defining a ":lmap" + mapping. Only do that when 'keymap' is set. +Files: src/getchar.c, src/option.c + +Patch 6.0.134 +Problem: When completing ":set tags=" a path with an embedded space causes + the completion to stop. (Sektor van Skijlen) +Solution: Escape spaces with backslashes, like for ":set path=". Also take + backslashes into account when searching for the start of the path + to complete (e.g., for 'backupdir' and 'cscopeprg'). +Files: src/ex_docmd.c, src/ex_getln.c, src/option.c, src/structs.h + +Patch 6.0.135 +Problem: Menus that are not supposed to do anything used "<Nul>", which + still produced an error beep. + When CTRL-O is mapped for Insert mode, ":amenu" commands didn't + work in Insert mode. + Menu language falls back to English when $LANG ends in "@euro". +Solution: Use "<Nop>" for a menu item that doesn't do anything, just like + mappings. + Use ":anoremenu" instead of ":amenu". + Ignore "@euro" in the locale name. +Files: runtime/makemenu.vim, runtime/menu.vim, src/menu.c + +Patch 6.0.136 +Problem: When completing in Insert mode, a mapping could be unexpectedly + applied. +Solution: Don't use mappings when checking for a typed character. +Files: src/edit.c + +Patch 6.0.137 +Problem: GUI: When using the find or find/replace dialog from Insert mode, + the input mode is stopped. +Solution: Don't use the input method status when the main window doesn't + have focus. +Files: src/ui.c + +Patch 6.0.138 +Problem: GUI: When using the find or find/replace dialog from Insert mode, + the text is inserted when CTRL-O is mapped. (Andre Pang) + When opening the dialog again, a whole word search isn't + recognized. + When doing "replace all" a whole word search was never done. +Solution: Don't put a search or replace command in the input buffer, + execute it directly. + Recognize "\<" and "\>" after removing "\V". + Add "\<" and "\>" also for "replace all". +Files: src/gui.c + +Patch 6.0.139 +Problem: When stopping 'wildmenu' completion, the statusline of the + bottom-left vertically split window isn't redrawn. (Yegappan + Lakshmanan) +Solution: Redraw all the bottom statuslines. +Files: src/ex_getln.c, src/proto/screen.pro, src/screen.c + +Patch 6.0.140 +Problem: Memory allocated for local mappings and abbreviations is leaked + when the buffer is wiped out. +Solution: Clear the local mappings when deleting a buffer. +Files: src/buffer.c, src/getchar.c, src/proto/getchar.pro, src/vim.h + +Patch 6.0.141 +Problem: When using ":enew" in an empty buffer, some buffer-local things + are not cleared. b:keymap_name is not set. +Solution: Clear user commands and mappings local to the buffer when re-using + the current buffer. Reload the keymap. +Files: src/buffer.c + +Patch 6.0.142 +Problem: When Python is linked statically, loading dynamic extensions might + fail. +Solution: Add an extra linking flag when needed. (Andrew Rodionoff) +Files: src/configure.in, src/auto/configure + +Patch 6.0.143 +Problem: When a syntax item includes a line break in a pattern, the syntax + may not be updated properly when making a change. +Solution: Add the "linebreaks" argument to ":syn sync". +Files: runtime/doc/syntax.txt, src/screen.c, src/structs.h, src/syntax.c + +Patch 6.0.144 +Problem: After patch 6.0.088 redoing "veU" doesn't work. +Solution: Don't add the "U" to the redo buffer, it will be used as an undo + command. +Files: src/normal.c + +Patch 6.0.145 +Problem: When Vim can't read any input it might get stuck. When + redirecting stdin and stderr Vim would not read commands from a + file. (Servatius Brandt) +Solution: When repeatedly trying to read a character when it's not possible, + exit Vim. When stdin and stderr are not a tty, still try reading + from them, but don't do a blocking wait. +Files: src/ui.c + +Patch 6.0.146 +Problem: When 'statusline' contains "%{'-'}" this results in a zero. + (Milan Vancura) +Solution: Don't handle numbers with a minus as a number, they were not + displayed anyway. +Files: src/buffer.c + +Patch 6.0.147 +Problem: It's not easy to mark a Vim version as being modified. The new + license requires this. +Solution: Add the --modified-by argument to configure and the MODIFIED_BY + define. It's used in the intro screen and the ":version" output. +Files: src/auto/configure, src/configure.in, src/config.h.in, + src/feature.h, src/version.c + +Patch 6.0.148 +Problem: After "p" in an empty line, `[ goes to the second character. + (Kontra Gergely) +Solution: Don't increment the column number in an empty line. +Files: src/ops.c + +Patch 6.0.149 +Problem: The pattern "\(.\{-}\)*" causes a hang. When using a search + pattern that causes a stack overflow to be detected Vim could + still hang. +Solution: Correctly report "operand could be empty" when using "\{-}". + Check for "out_of_stack" inside loops to avoid a hang. +Files: src/regexp.c + +Patch 6.0.150 +Problem: When using a multi-byte encoding, patch 6.0.148 causes "p" to work + like "P". (Sung-Hyun Nam) +Solution: Compute the byte length of a multi-byte character. +Files: src/ops.c + +Patch 6.0.151 +Problem: Redrawing the status line and ruler can be wrong when it contains + multi-byte characters. +Solution: Use character width and byte length correctly. (Yasuhiro Matsumoto) +Files: src/screen.c + +Patch 6.0.152 +Problem: strtrans() could hang on an illegal UTF-8 byte sequence. +Solution: Skip over illegal bytes. (Yasuhiro Matsumoto) +Files: src/charset.c + +Patch 6.0.153 +Problem: When using (illegal) double-byte characters and Vim syntax + highlighting Vim can crash. (Yasuhiro Matsumoto) +Solution: Increase a pointer over a character instead of a byte. +Files: src/regexp.c + +Patch 6.0.154 +Problem: MS-DOS and MS-Windows: The menu entries for xxd don't work when + there is no xxd in the path. + When converting back from Hex the filetype may remain "xxd" if it + is not detected. +Solution: When xxd is not in the path use the one in the runtime directory, + where the install program has put it. + Clear the 'filetype' option before detecting the new value. +Files: runtime/menu.vim + +Patch 6.0.155 +Problem: Mac: compilation problems in ui.c after patch 6.0.145. (Axel + Kielhorn) +Solution: Don't call mch_inchar() when NO_CONSOLE is defined. +Files: src/ui.c + +Patch 6.0.156 +Problem: Starting Vim with the -b argument and two files, ":next" doesn't + set 'binary' in the second file, like Vim 5.7. (Norman Diamond) +Solution: Set the global value for 'binary'. +Files: src/option.c + +Patch 6.0.157 +Problem: When defining a user command with "-complete=dir" files will also + be expanded. Also, "-complete=mapping" doesn't appear to work. + (Michael Naumann) +Solution: Use the expansion flags defined with the user command. + Handle expanding mappings specifically. +Files: src/ex_docmd.c + +Patch 6.0.158 +Problem: When getting the warning for a file being changed outside of Vim + and reloading the file, the 'readonly' option is reset, even when + the permissions didn't change. (Marcel Svitalsky) +Solution: Keep 'readonly' set when reloading a file and the permissions + didn't change. +Files: src/fileio.c + +Patch 6.0.159 +Problem: Wildcard expansion for ":emenu" also shows separators. +Solution: Skip menu separators for ":emenu", ":popup" and ":tearoff". + Also, don't handle ":tmenu" as if it was ":tearoff". And leave + out the alternatives with "&" included. +Files: src/menu.c + +Patch 6.0.160 +Problem: When compiling with GCC 3.0.2 and using the "-O2" argument, the + optimizer causes a problem that makes Vim crash. +Solution: Add a configure check to avoid "-O2" for this version of gcc. +Files: src/configure.in, src/auto/configure + +Patch 6.0.161 (extra) +Problem: Win32: Bitmaps don't work with signs. +Solution: Make it possible to use bitmaps with signs. (Muraoka Taro) +Files: src/ex_cmds.c, src/feature.h, src/gui_w32.c, src/gui_x11.c, + src/proto/gui_w32.pro, src/proto/gui_x11.pro + +Patch 6.0.162 +Problem: Client-server: An error message for a wrong expression appears in + the server instead of the client. +Solution: Pass the error message from the server to the client. Also + adjust the example code. (Flemming Madsen) +Files: src/globals.h, src/if_xcmdsrv.c, src/main.c, src/os_mswin.c, + src/proto/if_xcmdsrv.pro, src/proto/os_mswin.pro, + runtime/doc/eval.txt, runtime/tools/xcmdsrv_client.c + +Patch 6.0.163 +Problem: When using a GUI dialog, a file name is sometimes used like it was + a directory. +Solution: Separate path and file name properly. + For GTK, Motif and Athena concatenate directory and file name for + the default selection. +Files: src/diff.c, src/ex_cmds.c, src/ex_cmds2.c, src/ex_docmd.c, + src/gui_athena.c, src/gui_gtk.c, src/gui_motif.c, src/message.c + +Patch 6.0.164 +Problem: After patch 6.0.135 the menu entries for pasting don't work in + Insert and Visual mode. (Muraoka Taro) +Solution: Add <script> to allow script-local mappings. +Files: runtime/menu.vim + +Patch 6.0.165 +Problem: Using --remote and executing locally gives unavoidable error + messages. +Solution: Add --remote-silent and --remote-wait-silent to silently execute + locally. + For Win32 there was no error message when a server didn't exist. +Files: src/eval.c, src/if_xcmdsrv.c, src/main.c, src/os_mswin.c, + src/proto/if_xcmdsrv.pro, src/proto/os_mswin.pro + +Patch 6.0.166 +Problem: GUI: There is no way to avoid dialogs to pop up. +Solution: Add the 'c' flag to 'guioptions': Use console dialogs. (Yegappan + Lakshmanan) +Files: runtime/doc/options.txt, src/option.h, src/message.c + +Patch 6.0.167 +Problem: When 'fileencodings' is "latin2" some characters in the help files + are displayed wrong. +Solution: Force the 'fileencoding' for the help files to be "latin1". +Files: src/fileio.c + +Patch 6.0.168 +Problem: ":%s/\n/#/" doesn't replace at an empty line. (Bruce DeVisser) +Solution: Don't skip matches after joining two lines. +Files: src/ex_cmds.c + +Patch 6.0.169 +Problem: When run as evim and the GUI can't be started we get stuck in a + terminal without menus in Insert mode. +Solution: Exit when using "evim" and "gvim -y" when the GUI can't be + started. +Files: src/main.c + +Patch 6.0.170 +Problem: When printing double-width characters the size of tabs after them + is wrong. (Muraoka Taro) +Solution: Correctly compute the column after a double-width character. +Files: src/ex_cmds2.c + +Patch 6.0.171 +Problem: With 'keymodel' including "startsel", in Insert mode after the end + of a line, shift-Left does not move the cursor. (Steve Hall) +Solution: CTRL-O doesn't move the cursor left, need to do that explicitly. +Files: src/edit.c + +Patch 6.0.172 +Problem: CTRL-Q doesn't replace CTRL-V after CTRL-X in Insert mode while it + does in most other situations. +Solution: Make CTRL-X CTRL-Q work like CTRL-X CTRL-V in Insert mode. +Files: src/edit.c + +Patch 6.0.173 +Problem: When using "P" to insert a line break the cursor remains past the + end of the line. +Solution: Check for the cursor being beyond the end of the line. +Files: src/ops.c + +Patch 6.0.174 +Problem: After using "gd" or "gD" the search direction for "n" may still be + backwards. (Servatius Brandt) +Solution: Reset the search direction to forward. +Files: src/normal.c, src/search.c, src/proto/search.pro + +Patch 6.0.175 +Problem: ":help /\z(\)" doesn't work. (Thomas Koehler) +Solution: Double the backslashes. +Files: src/ex_cmds.c + +Patch 6.0.176 +Problem: When killed by a signal autocommands are still triggered as if + nothing happened. +Solution: Add the v:dying variable to allow autocommands to work differently + when a deadly signal has been trapped. +Files: src/eval.c, src/os_unix.c, src/vim.h + +Patch 6.0.177 +Problem: When 'commentstring' is empty and 'foldmethod' is "marker", "zf" + doesn't work. (Thomas S. Urban) +Solution: Add the marker even when 'commentstring' is empty. +Files: src/fold.c, src/normal.c + +Patch 6.0.178 +Problem: Uninitialized memory read from xp_backslash field. +Solution: Initialize xp_backslash field properly. +Files: src/eval.c, src/ex_docmd.c, src/ex_getln.c, src/misc1.c, src/tag.c + +Patch 6.0.179 +Problem: Win32: When displaying UTF-8 characters may read uninitialized + memory. +Solution: Add utfc_ptr2len_check_len() to avoid reading past the end of a + string. +Files: src/mbyte.c, src/proto/mbyte.pro, src/gui_w32.c + +Patch 6.0.180 +Problem: Expanding environment variables in a string that ends in a + backslash could go past the end of the string. +Solution: Detect the trailing backslash. +Files: src/misc1.c + +Patch 6.0.181 +Problem: When using ":cd dir" memory was leaked. +Solution: Free the allocated memory. Also avoid an uninitialized memory + read. +Files: src/misc2.c + +Patch 6.0.182 +Problem: When using a regexp on multi-byte characters, could try to read a + character before the start of the line. +Solution: Don't decrement a pointer to before the start of the line. +Files: src/regexp.c + +Patch 6.0.183 +Problem: Leaking memory when ":func!" redefines a function. +Solution: Free the function name when it's not used. +Files: src/eval.c + +Patch 6.0.184 +Problem: Leaking memory when expanding option values. +Solution: Don't always copy the expanded option into allocated memory. +Files: src/option.c + +Patch 6.0.185 +Problem: Crash in Vim when pasting a selection in another application, on a + 64 bit machine. +Solution: Fix the format for an Atom to 32 bits. (Peter Derr) +Files: src/ui.c + +Patch 6.0.186 +Problem: X11: Three warnings when compiling the client-server code. +Solution: Add a typecast to unsigned char. +Files: src/if_xcmdsrv.c + +Patch 6.0.187 +Problem: "I" in Visual mode and then "u" reports too many changes. (Andrew + Stryker) + "I" in Visual linewise mode adjusts the indent for no apparent + reason. +Solution: Only save those lines for undo that are changed. + Don't change the indent after inserting in Visual linewise mode. +Files: src/ops.c + +Patch 6.0.188 +Problem: Win32: After patch 6.0.161 signs defined in the vimrc file don't + work. +Solution: Initialize the sign icons after initializing the GUI. (Vince + Negri) +Files: src/gui.c, src/gui_x11.c + +Patch 6.0.189 +Problem: The size of the Visual area isn't always displayed when scrolling + ('ruler' off, 'showcmd' on). Also not when using a search + command. (Sylvain Hitier) +Solution: Redisplay the size of the selection after showing the mode. +Files: src/screen.c + +Patch 6.0.190 +Problem: GUI: when 'mouse' is empty a click with the middle button still + moves the cursor. +Solution: Paste at the cursor position instead of the mouse position. +Files: src/normal.c + +Patch 6.0.191 +Problem: When no servers are available serverlist() gives an error instead + of returning an empty string. (Hari Krishna) +Solution: Don't give an error message. +Files: src/eval.c + +Patch 6.0.192 +Problem: When 'virtualedit' is set, "ylj" goes to the wrong column. (Andrew + Nikitin) +Solution: Reset the flag that w_virtcol is valid when moving the cursor back + to the start of the operated area. +Files: src/normal.c + +Patch 6.0.193 +Problem: When 'virtualedit' is set, col(".") after the end of the line + should return one extra. +Solution: Add one to the column. +Files: src/eval.c + +Patch 6.0.194 +Problem: "--remote-silent" tries to send a reply to the client, like it was + "--remote-wait". +Solution: Properly check for the argument. +Files: src/main.c + +Patch 6.0.195 +Problem: When 'virtualedit' is set and a search starts in virtual space + ":call search('x')" goes to the wrong position. (Eric Long) +Solution: Reset coladd when finding a match. +Files: src/search.c + +Patch 6.0.196 +Problem: When 'virtualedit' is set, 'selection' is "exclusive" and visually + selecting part of a tab at the start of a line, "x" joins it with + the previous line. Also, when the selection spans more than one + line the whole tab is deleted. +Solution: Take coladd into account when adjusting for 'selection' being + "exclusive". Also expand a tab into spaces when deleting more + than one line. +Files: src/normal.c, src/ops.c + +Patch 6.0.197 +Problem: When 'virtualedit' is set and 'selection' is "exclusive", "v$x" + doesn't delete the last character in the line. (Eric Long) +Solution: Don't reset the inclusive flag. (Helmut Stiegler) +Files: src/normal.c + +Patch 6.0.198 +Problem: When 'virtualedit' is set and 'showbreak' is not empty, moving the + cursor over the line break doesn't work properly. (Eric Long) +Solution: Make getviscol() and getviscol2() use getvvcol() to obtain the + virtual cursor position. Adjust coladvance() and oneleft() to + skip over the 'showbreak' characters. +Files: src/edit.c, src/misc2.c + +Patch 6.0.199 +Problem: Multi-byte: could use iconv() after calling iconv_end(). + (Yasuhiro Matsumoto) +Solution: Stop converting input and output stream after calling iconv_end(). +Files: src/mbyte.c + +Patch 6.0.200 +Problem: A script that starts with "#!perl" isn't recognized as a Perl + filetype. +Solution: Ignore a missing path in a script header. Also, speed up + recognizing scripts by simplifying the patterns used. +Files: runtime/scripts.vim + +Patch 6.0.201 +Problem: When scrollbinding and doing a long jump, switching windows jumps + to another position in the file. Scrolling a few lines at a time + is OK. (Johannes Zellner) +Solution: When setting w_topline reset the flag that indicates w_botline is + valid. +Files: src/diff.c + +Patch 6.0.202 +Problem: The "icon=" argument for the menu command to define a toolbar icon + with a file didn't work for GTK. (Christian J. Robinson) + For Motif and Athena a full path was required. +Solution: Search the icon file using the specified path. Expand environment + variables in the file name. +Files: src/gui_gtk.c, src/gui_x11.c + +Patch 6.0.203 +Problem: Can change 'fileformat' even though 'modifiable' is off. + (Servatius Brandt) +Solution: Correct check for kind of set command. +Files: src/option.c + +Patch 6.0.204 +Problem: ":unlet" doesn't work for variables with curly braces. (Thomas + Scott Urban) +Solution: Handle variable names with curly braces properly. (Vince Negri) +Files: src/eval.c + +Patch 6.0.205 (extra) +Problem: "gvim -f" still forks when using the batch script to start Vim. +Solution: Add an argument to "start" to use a foreground session (Michael + Geddes) +Files: src/dosinst.c + +Patch 6.0.206 +Problem: Unix: if expanding a wildcard in a file name results in a + wildcard character and there are more parts in the path with a + wildcard, it is expanded again. + Windows: ":edit \[abc]" could never edit the file "[abc]". +Solution: Don't expand wildcards in already expanded parts. + Don't remove backslashes used to escape the special meaning of a + wildcard; can edit "[abc]" if '[' is removed from 'isfname'. +Files: src/misc1.c, src/os_unix.c + +Patch 6.0.207 (extra) +Problem: Win32: The shortcuts and start menu entries let Vim startup in the + desktop directory, which is not very useful. +Solution: Let shortcuts start Vim in $HOME or $HOMEDIR$HOMEPATH. +Files: src/dosinst.c + +Patch 6.0.208 +Problem: GUI: When using a keymap and the cursor is not blinking, CTRL-^ in + Insert mode doesn't directly change the cursor color. (Alex + Solow) +Solution: Force a redraw of the cursor after CTRL-^. +Files: src/edit.c + +Patch 6.0.209 +Problem: GUI GTK: After selecting a 'guifont' with the font dialog there + are redraw problems for multi-byte characters. +Solution: Separate the font dialog from setting the new font name to avoid + that "*" is used to find wide and bold fonts. + When redrawing extra characters for the bold trick, take care of + UTF-8 characters. +Files: src/gui.c, src/gui_gtk_x11.c, src/option.c, src/proto/gui.pro, + src/proto/gui_gtk_x11.pro + +Patch 6.0.210 +Problem: After patch 6.0.167 it's no longer possible to edit a help file in + another encoding than latin1. +Solution: Let the "++enc=" argument overrule the encoding. +Files: src/fileio.c + +Patch 6.0.211 +Problem: When reading a file fails, the buffer is empty, but it might still + be possible to write it with ":w" later. The original file is + lost then. (Steve Amerige) +Solution: Set the 'readonly' option for the buffer. +Files: src/fileio.c + +Patch 6.0.212 +Problem: GUI GTK: confirm("foo", "") causes a crash. +Solution: Don't make a non-existing button the default. Add a default "OK" + button if none is specified. +Files: src/eval.c, src/gui_gtk.c + +Patch 6.0.213 +Problem: When a file name contains unprintable characters, CTRL-G and other + commands don't work well. +Solution: Turn unprintable into printable characters. (Yasuhiro Matsumoto) +Files: src/buffer.c, src/charset.c + +Patch 6.0.214 +Problem: When there is a buffer without a name, empty entries appear in the + jumplist saved in the viminfo file. +Solution: Don't write jumplist entries without a file name. +Files: src/mark.c + +Patch 6.0.215 +Problem: After using "/" from Visual mode the Paste menu and Toolbar + entries don't work. Pasting with the middle mouse doesn't work + and modeless selection doesn't work. +Solution: Use the command line mode menus and use the mouse like in the + command line. +Files: src/gui.c, src/menu.c, src/ui.c + +Patch 6.0.216 +Problem: After reloading a file, displayed in another window than the + current one, which was changed outside of Vim the part of the file + around the cursor set by autocommands may be displayed, but + jumping back to the original cursor position when entering the + window again. +Solution: Restore the topline of the window. +Files: src/fileio.c + +Patch 6.0.217 +Problem: When getting help from a help file that was used before, an empty + unlisted buffer remains in the buffer list. (Eric Long) +Solution: Wipe out the buffer used to do the tag jump from. +Files: src/buffer.c, src/ex_cmds.c, src/proto/buffer.pro + +Patch 6.0.218 +Problem: With explorer plugin: "vim -o filename dirname" doesn't load the + explorer window until entering the window. +Solution: Call s:EditDir() for each window after starting up. +Files: runtime/plugin/explorer.vim + +Patch 6.0.219 +Problem: ":setlocal" and ":setglobal", without arguments, display terminal + options. (Zdenek Sekera) +Solution: Skip terminal options for these two commands. +Files: src/option.c + +Patch 6.0.220 +Problem: After patch 6.0.218 get a beep on startup. (Muraoka Taro) +Solution: Don't try going to another window when there isn't one. +Files: runtime/plugin/explorer.vim + +Patch 6.0.221 +Problem: When using ":bdel" and all other buffers are unloaded the lowest + numbered buffer is jumped to instead of the most recent one. (Dave + Cecil) +Solution: Prefer an unloaded buffer from the jumplist. +Files: src/buffer.c + +Patch 6.0.222 +Problem: When 'virtualedit' is set and using autoindent, pressing Esc after + starting a new line leaves behind part of the autoindent. (Helmut + Stiegler) +Solution: After deleting the last char in the line adjust the cursor + position in del_bytes(). +Files: src/misc1.c, src/ops.c + +Patch 6.0.223 +Problem: When splitting a window that contains the explorer, hitting CR on + a file name gives error messages. +Solution: Set the window variables after splitting the window. +Files: runtime/plugin/explorer.vim + +Patch 6.0.224 +Problem: When 'sidescroll' and 'sidescrolloff' are set in a narrow window + the text may jump left-right and the cursor is displayed in the + wrong position. (Aric Blumer) +Solution: When there is not enough room, compute the left column for the + window to put the cursor in the middle. +Files: src/move.c + +Patch 6.0.225 +Problem: In Visual mode "gk" gets stuck in a closed fold. (Srinath + Avadhanula) +Solution: Behave differently in a closed fold. +Files: src/normal.c + +Patch 6.0.226 +Problem: When doing ":recover file" get the ATTENTION prompt. + After recovering the same file five times get a read error or a + crash. (Alex Davis) +Solution: Set the recoverymode flag before setting the file name. + Correct the amount of used memory for the size of block zero. +Files: src/ex_docmd.c + +Patch 6.0.227 (extra) +Problem: The RISC OS port has several problems. +Solution: Update the makefile and fix some of the problems. (Andy Wingate) +Files: src/Make_ro.mak, src/os_riscos.c, src/os_riscos.h, + src/proto/os_riscos.pro, src/search.c + +Patch 6.0.228 +Problem: After putting text in Visual mode the '] mark is not at the end of + the put text. + Undo doesn't work properly when putting a word into a Visual + selection that spans more than one line. +Solution: Correct the '] mark for the deleting the Visually selected text. + #ifdef code that depends on FEAT_VISUAL properly. + Also fix that "d" crossing line boundary puts '[ just before + deleted text. + Fix undo by saving all deleted lines at once. +Files: src/ex_docmd.c, src/globals.h, src/normal.c, src/ops.c, + src/structs.h, src/vim.h + +Patch 6.0.229 +Problem: Multi-byte: With 'm' in 'formatoptions', formatting doesn't break + at a multi-byte char followed by an ASCII char, and the other way + around. (Muraoka Taro) + When joining lines a space is inserted between multi-byte + characters, which is not always wanted. +Solution: Check for multi-byte character before and after the breakpoint. + Don't insert a space before or after a multi-byte character when + joining lines and the 'M' flag is in 'formatoptions'. Don't + insert a space between multi-byte characters when the 'B' flag is + in 'formatoptions'. +Files: src/edit.c, src/ops.c, src/option.h + +Patch 6.0.230 +Problem: The ":" used as a motion after an operator is exclusive, but + sometimes it should be inclusive. +Solution: Make the "v" in between an operator and motion toggle + inclusive/exclusive. (Servatius Brandt) +Files: runtime/doc/motion.txt, src/normal.c + +Patch 6.0.231 +Problem: "gd" and "gD" don't work when the variable matches in a comment + just above the match to be found. (Servatius Brandt) +Solution: Continue searching in the first column below the comment. +Files: src/normal.c + +Patch 6.0.232 +Problem: "vim --version" prints on stderr while "vim --help" prints on + stdout. +Solution: Make "vim --version" use stdout. +Files: runtime/doc/starting.txt, src/globals.h, src/main.c, src/message.c + +Patch 6.0.233 +Problem: "\1\{,8}" in a regexp is not allowed, but it should work, because + there is an upper limit. (Jim Battle) +Solution: Allow using "\{min,max}" after an atom that can be empty if there + is an upper limit. +Files: src/regexp.c + +Patch 6.0.234 +Problem: It's not easy to set the cursor position without modifying marks. +Solution: Add the cursor() function. (Yegappan Lakshmanan) +Files: runtime/doc/eval.txt, src/eval.c + +Patch 6.0.235 +Problem: When writing a file and renaming the original file to make the + backup, permissions could change when setting the owner. +Solution: Only set the owner when it's needed and set the permissions again + afterwards. + When 'backupcopy' is "auto" check that the owner and permissions + of a newly created file can be set properly. +Files: src/fileio.c + +Patch 6.0.236 +Problem: ":edit" without argument should move cursor to line 1 in Vi + compatible mode. +Solution: Add 'g' flag to 'cpoptions'. +Files: runtime/doc/options.txt, src/ex_docmd.c, src/option.h + +Patch 6.0.237 +Problem: In a C file, using the filetype plugin, re-indenting a comment + with two spaces after the middle "*" doesn't align properly. +Solution: Don't use a middle entry from a start/middle/end to line up with + the start of the comment when the start part doesn't match with + the actual comment start. +Files: src/misc1.c + +Patch 6.0.238 +Problem: Using a ":substitute" command with a substitute() call in the + substitution expression causes errors. (Srinath Avadhanula) +Solution: Save and restore pointers when doing substitution recursively. +Files: src/regexp.c + +Patch 6.0.239 +Problem: Using "A" to append after a Visually selected block which is after + the end of the line, spaces are inserted in the wrong line and + other unexpected effects. (Michael Naumann) +Solution: Don't advance the cursor to the next line. +Files: src/ops.c + +Patch 6.0.240 +Problem: Win32: building with Python 2.2 doesn't work. +Solution: Add support for Python 2.2 with dynamic linking. (Paul Moore) +Files: src/if_python.c + +Patch 6.0.241 +Problem: Win32: Expanding the old value of an option that is a path that + starts with a backslash, an extra backslash is inserted. +Solution: Only insert backslashes where needed. + Also handle multi-byte characters properly when removing + backslashes. +Files: src/option.c + +Patch 6.0.242 +Problem: GUI: On a system with an Exceed X server sometimes get a "Bad + Window" error. (Tommi Maekitalo) +Solution: When forking, use a pipe to wait in the parent for the child to + have done the setsid() call. +Files: src/gui.c + +Patch 6.0.243 +Problem: Unix: "vim --version" outputs a NL before the last line instead of + after it. (Charles Campbell) +Solution: Send the NL to the same output stream as the text. +Files: src/message.c, src/os_unix.c, src/proto/message.pro + +Patch 6.0.244 +Problem: Multi-byte: Problems with (illegal) UTF-8 characters in menu and + file name (e.g., icon text, status line). +Solution: Correctly handle unprintable characters. Catch illegal UTF-8 + characters and replace them with <xx>. Truncating the status line + wasn't done correctly at a multi-byte character. (Yasuhiro + Matsumoto) + Added correct_cmdspos() and transchar_byte(). +Files: src/buffer.c, src/charset.c, src/ex_getln.c, src/gui.c, + src/message.c, src/screen.c, src/vim.h + +Patch 6.0.245 +Problem: After using a color scheme, setting the 'background' option might + not work. (Peter Horst) +Solution: Disable the color scheme if it switches 'background' back to the + wrong value. +Files: src/option.c + +Patch 6.0.246 +Problem: ":echomsg" didn't use the highlighting set by ":echohl". (Gary + Holloway) +Solution: Use the specified attributes for the message. (Yegappan + Lakshmanan) +Files: src/eval.c + +Patch 6.0.247 +Problem: GTK GUI: Can't use gvim in a kpart widget. +Solution: Add the "--echo-wid" argument to let Vim echo the window ID on + stdout. (Philippe Fremy) +Files: runtime/doc/starting.txt, src/globals.h, src/gui_gtk_x11.c, + src/main.c + +Patch 6.0.248 +Problem: When using compressed help files and 'encoding' isn't "latin1", + Vim converts the help file before decompressing. (David Reviejo) +Solution: Don't convert a help file when 'binary' is set. +Files: src/fileio.c + +Patch 6.0.249 +Problem: "vim -t edit -c 'sta ex_help'" doesn't move cursor to edit(). +Solution: Don't set the cursor on the first line for "-c" arguments when + there also is a "-t" argument. +Files: src/main.c + +Patch 6.0.250 (extra) +Problem: Macintosh: Various problems when compiling. +Solution: Various fixes, mostly #ifdefs. (Dany St. Amant) +Files: src/gui_mac.c, src/main.c, src/misc2.c, src/os_mac.h, + src/os_mac.pbproj/project.pbxproj, src/os_unix.c + +Patch 6.0.251 (extra) +Problem: Macintosh: menu shortcuts are not very clear. +Solution: Show the shortcut with the Mac clover symbol. (raindog) +Files: src/gui_mac.c + +Patch 6.0.252 +Problem: When a user function was defined with "abort", an error that is + not inside if/endif or while/endwhile doesn't abort the function. + (Servatius Brandt) +Solution: Don't reset did_emsg when the function is to be aborted. +Files: src/ex_docmd.c + +Patch 6.0.253 +Problem: When 'insertmode' is set, after "<C-O>:edit file" the next <C-O> + doesn't work. (Benji Fisher) <C-L> has the same problem. +Solution: Reset need_start_insertmode once in edit(). +Files: src/edit.c + +Patch 6.0.254 (extra) +Problem: Borland C++ 5.5: Checking for stack overflow doesn't work + correctly. Matters when using a complicated regexp. +Solution: Remove -N- from Make_bc5.mak. (Yasuhiro Matsumoto) +Files: src/Make_bc5.mak + +Patch 6.0.255 (extra) (depends on patch 6.0.116 and 6.0.121) +Problem: Win32: ACL support doesn't work well on Samba drives. +Solution: Add a check for working ACL support. (Mike Williams) +Files: src/os_win32.c + +Patch 6.0.256 (extra) +Problem: Win32: ":highlight Comment guifg=asdf" does not give an error + message. (Randall W. Morris) Also for other systems. +Solution: Add gui_get_color() to give one error message for all systems. +Files: src/gui.c, src/gui_amiga.c, src/gui_athena.c, src/gui_motif.c, + src/gui_riscos.c, src/gui_x11.c, src/gui_gtk_x11.c, + src/proto/gui.pro, src/syntax.c + +Patch 6.0.257 +Problem: Win32: When 'mousefocus' is set and there is a BufRead + autocommand, after the dialog for permissions changed outside of + Vim: 'mousefocus' stops working. (Robert Webb) +Solution: Reset need_mouse_correct after checking timestamps. +Files: src/fileio.c + +Patch 6.0.258 +Problem: When 'scrolloff' is 999 and there are folds, the text can jump up + and down when moving the cursor down near the end of the file. + (Lubomir Host) +Solution: When putting the cursor halfway the window start counting lines at + the end of a fold. +Files: src/move.c + +Patch 6.0.259 +Problem: MS-DOS: after editing the command line the cursor shape may remain + like in Insert mode. (Volker Kiefel) +Solution: Reset the cursor shape after editing the command line. +Files: src/ex_getln.c + +Patch 6.0.260 +Problem: GUI: May crash while starting up when giving an error message for + missing color. (Servatius Brandt) +Solution: Don't call gui_write() when still starting up. Don't give error + message for empty color name. Don't use 't_vb' while the GUI is + still starting up. +Files: src/fileio.c, src/gui.c, src/misc1.c, src/ui.c + +Patch 6.0.261 +Problem: nr2char() and char2nr() don't work with multi-byte characters. +Solution: Use 'encoding' for these functions. (Yasuhiro Matsumoto) +Files: runtime/doc/eval.txt, src/eval.c + +Patch 6.0.262 (extra) +Problem: Win32: IME doesn't work properly. OnImeComposition() isn't used + at all. +Solution: Adjust various things for IME. +Files: src/globals.h, src/gui_w32.c, src/mbyte.c, src/proto/ui.pro, + src/structs.h, src/ui.c + +Patch 6.0.263 +Problem: GTK: When a dialog is closed by the window manager, Vim hangs. + (Christian J. Robinson) +Solution: Use GTK_WIDGET_DRAWABLE() instead of GTK_WIDGET_VISIBLE(). +Files: src/gui_gtk.c, src/gui_gtk_x11.c + +Patch 6.0.264 +Problem: The amount of virtual memory is used to initialize 'maxmemtot', + which may be much more than the amount of physical memory, + resulting in a lot of swapping. +Solution: Get the amount of physical memory with sysctl(), sysconf() or + sysinfo() when possible. +Files: src/auto/configure, src/configure.in, src/config.h.in, + src/os_unix.c, src/os_unix.h + +Patch 6.0.265 +Problem: Win32: Using backspace while 'fkmap' is set causes a crash. + (Jamshid Oasjmoha) +Solution: Don't try mapping special keys. +Files: src/farsi.c + +Patch 6.0.266 +Problem: The rename() function deletes the file if the old and the new name + are the same. (Volker Kiefel) +Solution: Don't do anything if the names are equal. +Files: src/fileio.c + +Patch 6.0.267 +Problem: UTF-8: Although 'isprint' says a character is printable, + utf_char2cells() still considers it unprintable. +Solution: Use vim_isprintc() for characters upto 0x100. (Yasuhiro Matsumoto) +Files: src/mbyte.c + +Patch 6.0.268 (extra) (depends on patch 6.0.255) +Problem: Win32: ACL check crashes when using forward slash in file name. +Solution: Improve the check for the path in the file name. +Files: src/os_win32.c + +Patch 6.0.269 +Problem: Unprintable characters in a file name may cause problems when + using the 'statusline' option or when 'buftype' is "nofile". +Solution: call trans_characters() for the resulting statusline. (Yasuhiro + Matsumoto) +Files: src/buffer.c, src/screen.c, src/charset.c + +Patch 6.0.270 (depends on patch 6.0.267) +Problem: A tab causes UTF-8 text to be displayed in the wrong position. + (Ron Aaron) +Solution: Correct utf_char2cells() again. +Files: src/mbyte.c + +Patch 6.1a.001 (extra) +Problem: 32bit DOS: copying text to the clipboard may cause a crash. + (Jonathan D Johnston) +Solution: Don't copy one byte too much in SetClipboardData(). +Files: src/os_msdos.c + +Patch 6.1a.002 +Problem: GTK: On some configurations, when closing a dialog from the window + manager, Vim hangs. +Solution: Catch the "destroy" signal. (Aric Blumer) +Files: src/gui_gtk.c + +Patch 6.1a.003 +Problem: Multi-byte: With UTF-8 double-wide char and 'virtualedit' set: + yanking in Visual mode doesn't include the last byte. (Eric Long) +Solution: Don't add a space for a double-wide character. +Files: src/ops.c + +Patch 6.1a.004 (extra) +Problem: MINGW: undefined type. (Ron Aaron) +Solution: Make GetCompositionString_inUCS2() static. +Files: src/gui_w32.c, src/gui_w48.c, src/proto/gui_w32.pro + +Patch 6.1a.005 (extra) +Problem: Win32: ":hardcopy" doesn't work after ":hardcopy!". (Jonathan + Johnston) +Solution: Don't keep the driver context when using ":hardcopy!". (Vince + Negri) +Files: src/os_mswin.c + +Patch 6.1a.006 +Problem: multi-byte: after setting 'encoding' the window title might be + wrong. +Solution: Force resetting the title. (Yasuhiro Matsumoto) +Files: src/option.c + +Patch 6.1a.007 +Problem: Filetype detection for "*.inc" doesn't work. +Solution: Use a ":let" command. (David Schweikert) +Files: runtime/filetype.vim + +Patch 6.1a.008 (extra) +Problem: Win32: ACL detection for network shares doesn't work. +Solution: Include the trailing (back)slash in the root path. (Mike Williams) +Files: src/os_win32.c + +Patch 6.1a.009 +Problem: When using "\@<=" or "\@<!" in a pattern, a "\1" may refer to a () + part that follows, but it generates an error message. +Solution: Allow a forward reference when there is a following "\@<=" or + "\@<!". +Files: runtime/doc/pattern.txt, src/regexp.c + +Patch 6.1a.010 +Problem: When using ":help" and opening a new window, the alternate file + isn't set. +Solution: Set the alternate file to the previously edited file. +Files: src/ex_cmds.c + +Patch 6.1a.011 +Problem: GTK: ":set co=77", change width with the mouse, ":set co=77" + doesn't resize the window. (Darren Hiebert) +Solution: Set the form size after handling a resize event. +Files: src/gui_gtk_x11.c + +Patch 6.1a.012 +Problem: GTK: The file browser always returns a full path. (Lohner) +Solution: Shorten the file name if possible. +Files: src/gui_gtk.c + +Patch 6.1a.013 +Problem: When using "=~word" in 'cinkeys' or 'indentkeys', the case of the + last character of the word isn't ignored. (Raul Segura Acevedo) +Solution: Ignore case when checking the last typed character. +Files: src/edit.c + +Patch 6.1a.014 +Problem: After patch 6.1a.006 can't compile without the title feature. +Solution: Add an #ifdef. +Files: src/option.c + +Patch 6.1a.015 +Problem: MS-Windows: When expanding a file name that contains a '[' or '{' + an extra backslash is inserted. (Raul Segura Acevedo) +Solution: Avoid adding the backslash. +Files: src/ex_getln.c + +Patch 6.1a.016 +Problem: Completion after ":language" doesn't include "time". (Raul Segura + Acevedo) +Solution: Add the alternative to the completions. +Files: src/ex_cmds2.c + +Patch 6.1a.017 +Problem: Clicking the mouse in the top row of a window where the first line + doesn't fit moves the cursor to the wrong column. +Solution: Add the skipcol also for the top row of a window. +Files: src/ui.c + +Patch 6.1a.018 +Problem: When 'scrolloff' is one and the window height is one, "gj" can put + the cursor above the window. (Raul Segura Acevedo) +Solution: Don't let skipcol become bigger than the cursor column. +Files: src/move.c + +Patch 6.1a.019 +Problem: When using a composing character on top of an ASCII character, the + "l" command clears the composing character. Only when 'ruler' and + 'showcmd' are off. (Raphael Finkel) +Solution: Don't move the cursor by displaying characters when there are + composing characters. +Files: src/screen.c + +Patch 6.1a.020 +Problem: GTK: after patch 6.1a.011 resizing with the mouse doesn't always + work well for small sizes. (Adrien Beau) +Solution: Use another way to avoid the problem with ":set co=77". +Files: src/gui_gtk_x11.c + +Patch 6.1a.021 +Problem: Several Syntax menu entries are wrong or confusing. +Solution: Rephrase and correct the menu entries. (Adrien Beau) +Files: runtime/makemenu.vim, runtime/menu.vim + +Patch 6.1a.022 +Problem: A tags file might be used twice on case insensitive systems. + (Rick Swanton) +Solution: Don't use the same file name twice in the default for the 'tags' + option. Ignore case when comparing names of already visited + files. +Files: src/misc2.c, src/option.c + +Patch 6.1a.023 +Problem: When starting the GUI get "C" characters echoed in the terminal. +Solution: Don't try sending a clear-screen command while the GUI is starting + up. +Files: src/screen.c + +Patch 6.1a.024 +Problem: In other editors CTRL-F is often used for a find dialog. +Solution: In evim use CTRL-F for the find dialog. +Files: runtime/evim.vim + +Patch 6.1a.025 +Problem: The choices for the fileformat dialog can't be translated. +Solution: Add g:menutrans_fileformat_choices. (Adrien Beau) +Files: runtime/menu.vim + +Patch 6.1a.026 +Problem: Indenting Java files is wrong with "throws", "extends" and + "implements" clauses. +Solution: Update the Java indent script. +Files: runtime/indent/java.vim + +Patch 6.1a.027 +Problem: A few Syntax menu entries missing or incorrect. +Solution: Add and correct the menu entries. (Adrien Beau) + Shorten a few menus to avoid they become too long. +Files: runtime/makemenu.vim, runtime/menu.vim + +Patch 6.1a.028 +Problem: XIM: problems with feedback and some input methods. +Solution: Use iconv for calculating the cells. Remove the queue for + key_press_event only when text was changed. (Yasuhiro Matsumoto) +Files: src/globals.h, src/mbyte.c, src/screen.c + +Patch 6.1a.029 +Problem: After patch 6.1a.028 can't compile GTK version with XIM but + without multi-byte chars. +Solution: Add an #ifdef. (Aschwin Marsman) +Files: src/mbyte.c + +Patch 6.1a.030 +Problem: With double-byte encodings toupper() and tolower() may have wrong + results. +Solution: Skip double-byte characters. (Eric Long) +Files: src/eval.c + +Patch 6.1a.031 +Problem: Accessing the 'balloondelay' variable may cause a crash. +Solution: Make the variable for 'balloondelay' a long. (Olaf Seibert) +Files: src/option.h + +Patch 6.1a.032 (extra) +Problem: Some menu files used a wrong encoding name for "scriptencoding". +Solution: Move the translations to a separate file, which is sourced after + setting "scriptencoding". + Also add Czech menu translations in ASCII and update the other + encodings. +Files: runtime/lang/menu_cs_cz.iso_8859-1.vim, + runtime/lang/menu_cs_cz.iso_8859-2.vim, + runtime/lang/menu_czech_czech_republic.1250.vim, + runtime/lang/menu_czech_czech_republic.1252.vim, + runtime/lang/menu_czech_czech_republic.ascii.vim, + runtime/lang/menu_de_de.iso_8859-1.vim, + runtime/lang/menu_de_de.latin1.vim, + runtime/lang/menu_fr_fr.iso_8859-1.vim, + runtime/lang/menu_fr_fr.latin1.vim, + runtime/lang/menu_french_france.1252.vim, + runtime/lang/menu_german_germany.1252.vim, + runtime/lang/menu_ja_jp.euc-jp.vim, + runtime/lang/menu_ja_jp.utf-8.vim, + runtime/lang/menu_japanese_japan.932.vim + +Patch 6.1a.033 +Problem: XIM: doesn't reset input context. +Solution: call xim_reset() with im_set_active(FALSE). (Takuhiro Nishioka) +Files: src/mbyte.c + +Patch 6.1a.034 (extra) +Problem: Win32: The ACL checks for a readonly file still don't work well. +Solution: Remove the ACL checks, go back to how it worked in Vim 6.0. +Files: src/os_win32.c + +Patch 6.1a.035 +Problem: multi-byte: When using ":sh" in the GUI, typed and displayed + multi-byte characters are not handled correctly. +Solution: Deal with multi-byte characters to and from the shell. (Yasuhiro + Matsumoto) Also handle UTF-8 composing characters. +Files: src/os_unix.c + +Patch 6.1a.036 +Problem: GTK: the save-yourself event was not handled. +Solution: Catch the save-yourself event and preserve swap files. (Neil Bird) +Files: src/gui_gtk_x11.c + +Patch 6.1a.037 +Problem: The MS-Windows key mapping doesn't include CTRL-S for saving. + (Vlad Sandrini) +Solution: Map CTRL-S to ":update". +Files: runtime/mswin.vim + +Patch 6.1a.038 +Problem: Solaris: Including both sys/sysctl.h and sys/sysinfo.h doesn't + work. (Antonio Colombo) +Solution: Don't include sys/sysinfo.h when not calling sysinfo(). +Files: src/os_unix.c + +Patch 6.1a.039 +Problem: Not all visual basic files are recognized. +Solution: Add checks to catch *.ctl files. (Raul Segura Acevedo) +Files: runtime/filetype.vim + +Patch 6.1a.040 +Problem: A *.pl file is recognized as Perl, but it could be a prolog file. +Solution: Check the first non-empty line. (Kontra Gergely) +Files: runtime/filetype.vim + +Patch 6.1a.041 +Problem: When pressing the left mouse button in the command line and them + moving the mouse upwards, nearly all the text is selected. +Solution: Don't try extending a modeless selection when there isn't one. +Files: src/ui.c + +Patch 6.1a.042 +Problem: When merging files, ":diffput" and ":diffget" are used a lot, but + they require a lot of typing. +Solution: Add "dp" for ":diffput" and "do" for ":diffget". +Files: runtime/doc/diff.txt, src/diff.c, src/normal.c, src/proto/diff.pro + + +Patch 6.1b.001 (extra) +Problem: Checking for wildcards in a path does not handle multi-byte + characters with a trail byte which is a wildcard. +Solution: Handle multi-byte characters correctly. (Muraoka Taro) +Files: src/os_amiga.c, src/os_mac.c, src/os_msdos.c, src/os_mswin.c, + src/os_unix.c + +Patch 6.1b.002 +Problem: A regexp that ends in "\{" is not flagged as an error. May cause + a stack overflow when 'incsearch' is set. (Gerhard Hochholzer) +Solution: Handle a missing "}" as an error. +Files: src/regexp.c + +Patch 6.1b.003 (extra) +Problem: The RISC OS GUI doesn't compile. +Solution: Include changes since Vim 5.7. (Andy Wingate) +Files: src/Make_ro.mak, src/gui_riscos.c, src/os_riscos.c, + src/os_riscos.h, src/proto/gui_riscos.pro + +Patch 6.1b.004 +Problem: col("'>") returns a negative number for linewise selection. (Neil + Bird) +Solution: Don't add one to MAXCOL. +Files: src/eval.c + +Patch 6.1b.005 +Problem: Using a search pattern that causes an out-of-stack error while + 'hlsearch' is set keeps giving the hit-Enter prompt. + A search pattern that takes a long time delays typing when + 'incsearch' is set. +Solution: Stop 'hlsearch' highlighting when the regexp causes an error. + Stop searching for 'incsearch' when a character is typed. +Files: src/globals.h, src/message.c, src/screen.c, src/search.c, + src/vim.h + +Patch 6.1b.006 +Problem: When entering a composing character on the command line with + CTRL-V, the text isn't redrawn correctly. +Solution: Redraw the text under and after the cursor. +Files: src/ex_getln.c + +Patch 6.1b.007 +Problem: When the cursor is in the white space between two sentences, "dis" + deletes the first character of the following sentence, "das" + deletes a space after the sentence. +Solution: Backup the cursor one character in these situations. +Files: src/search.c + +Patch 6.1b.008 +Problem: *.xsl files are not recognized as xslt but xml. + Monk files are not recognized. +Solution: Delete the duplicate line for *.xsl. (Johannes Zellner) + Recognize monk files. +Files: runtime/filetype.vim + +Patch 6.1b.009 +Problem: Can't always compile small features and then adding eval feature, + "sandbox" is undefined. (Axel Kielhorn) +Solution: Always define "sandbox" when the eval feature is used. +Files: src/globals.h + +Patch 6.1b.010 (extra) +Problem: When compiling gvimext.cpp with MSVC 4.2 get a number of warnings. +Solution: Change "true" to "TRUE". (Walter Briscoe) +Files: GvimExt/gvimext.cpp + +Patch 6.1b.011 +Problem: When using a very long string for confirm(), can't quit the + displaying at the more prompt. (Hari Krishna Dara) +Solution: Jump to the end of the message to show the choices. +Files: src/message.c + +Patch 6.1b.012 +Problem: Multi-byte: When 'showbreak' is set and a double-wide character + doesn't fit at the right window edge the cursor gets stuck there. + Using cursor-left gets stuck when 'virtualedit' is set. (Eric + Long) +Solution: Fix the way the extra ">" character is counted when 'showbreak' is + set. Don't correct cursor for virtual editing on a double-wide + character. +Files: src/charset.c, src/edit.c + +Patch 6.1b.013 +Problem: A user command that partly matches with a buffer-local user + command and matches full with a global user command unnecessarily + gives an 'ambiguous command' error. +Solution: Find the full global match even after a partly local match. +Files: src/ex_docmd.c + +Patch 6.1b.014 +Problem: EBCDIC: switching mouse events off causes garbage on screen. + Positioning the cursor in the GUI causes garbage. +Solution: Insert an ESC in the terminal code. (Ralf Schandl) + Use "\b" instead of "\010" for KS_LE. +Files: src/os_unix.c, src/term.c + +Patch 6.1b.015 +Problem: Vimtutor has a typo. Get a warning for "tempfile" if it + doesn't exist. +Solution: Move a quote to the end of a line. (Max Ischenko) + Use "mktemp" first, more systems have it. +Files: src/vimtutor + +Patch 6.1b.016 +Problem: GTK: loading a fontset that works partly, Vim might hang or crash. +Solution: Avoid that char_width becomes zero. (Yasuhiro Matsumoto) +Files: src/gui_gtk_x11.c + +Patch 6.1b.017 +Problem: GUI: When using ":shell" and there is a beep, nothing happens. +Solution: Call vim_beep() to produce the beep from the shell. (Yasuhiro + Matsumoto) +Files: src/message.c + +Patch 6.1b.018 (depends on 6.1b.006) +Problem: When entering the encryption key, special keys may still reveal + the typed characters. +Solution: Make sure stars are used or nothing is shown in all cases. +Files: src/digraph.c, src/getchar.c, src/ex_getln.c + +Patch 6.1b.019 (depends on 6.1b.005) +Problem: A search pattern that takes a long time slows down typing when + 'incsearch' is set. +Solution: Pass SEARCH_PEEK to dosearch(). +Files: src/ex_getln.c + +Patch 6.1b.020 +Problem: When using the matchit plugin, "%" finds a match on the "end" of a + ":syntax region" command in Vim scripts. +Solution: Skip over ":syntax region" commands by setting b:match_skip. +Files: runtime/ftplugin/vim.vim + +Patch 6.1b.021 +Problem: when 'mousefocus' is set, CTRL-W CTRL-] sometimes doesn't warp the + pointer to the new window. (Robert Webb) +Solution: Don't reset need_mouse_correct when checking the timestamp of a + file. +Files: src/fileio.c + +Patch 6.1b.022 +Problem: With lots of folds "j" does not obey 'scrolloff' properly. + (Srinath Avadhanula) +Solution: Go to end of the fold before counting context lines. +Files: src/move.c + +Patch 6.1b.023 +Problem: On MS-Windows system() may cause checking timestamps, because Vim + loses and gains input focus, while this doesn't happen on Unix. +Solution: Don't check timestamps while system() is busy. +Files: src/ex_cmds2.c, src/fileio.c, src/globals.h, src/misc1.c + +Patch 6.1b.024 (extra) +Problem: Gettext 0.11 complains that "sjis" is not a standard name. +Solution: Use "cp932" instead. +Files: src/po/sjiscorr.c + +Patch 6.1b.025 (extra) +Problem: Win32: When closing gvim while it is minimized and has a changed + file, the file-changed dialog pops up in a corner of the screen. +Solution: Put the dialog in the middle of the screen. +Files: src/gui_w48.c + +Patch 6.1b.026 +Problem: When 'diffopt' contains 'iwhite' but not 'icase': differences in + case are not highlighted properly. (Gerhard Hochholzer) +Solution: Don't ignore case when ignoring white space differences. +Files: src/diff.c + +Patch 6.1b.027 +Problem: "vim --remote +" may cause a crash. +Solution: Check for missing file name argument. (Martin Kahlert) +Files: src/main.c + +Patch 6.1b.028 (extra) +Problem: Win16: Can't compile after patch 6.1b.025. +Solution: Add code specifically for Win16. (Vince Negri) +Files: src/gui_w48.c + +Patch 6.1b.029 +Problem: Win32: When a directory on an NTFS partition is read/execute (no + delete,modify,write) and the file has modify rights, trying to + write the file deletes it. Making the file read/write/execute + (not delete) solves it. (Mark Canup) +Solution: Use the Unix code to check for a writable directory. If not, then + make a backup copy and overwrite the file. +Files: src/fileio.c + +Patch 6.1b.030 (extra) +Problem: Mac: small mistake in the build script and prototypes. +Solution: Fix the build script and add the prototypes. (Axel Kielhorn) +Files: src/os_mac.build, src/gui_mac.c + +Patch 6.1b.031 (extra) +Problem: Win32 GUI: ":set guifont=*" doesn't set 'guifont' to the resulting + font name. (Vlad Sandrini) +Solution: Put the code back in gui_mch_init_font() to form the font name out + of the logfont. +Files: src/gui_w48.c + +Patch 6.1b.032 +Problem: Athena: Setting a color scheme before the GUI has started causes a + crash. (Todd Blumer) +Solution: Don't try using color names that haven't been set yet. +Files: src/gui_athena.c + +Patch 6.1b.033 +Problem: When using a count after a ":s" command may get ml_get errors. + (Dietmar Lang) +Solution: Check that the resulting range does not go past the end of the + buffer. +Files: src/ex_cmds.c + +Patch 6.1b.034 +Problem: After sourcing mswin.vim, when using <C-S-Right> after + auto-indenting and then <Del>, get warning for allocating + ridiculous amount of memory. (Dave Delgreco) +Solution: Adjust the start of the Visual area when deleting the auto-indent. +Files: src/edit.c + +Patch 6.1b.035 +Problem: When using evim, dropping a file on Vim and then double clicking + on a word, it is changed to "i". (Merlin Hansen) +Solution: Reset need_start_insertmode after editing the file. +Files: src/ex_docmd.c + + +============================================================================== +VERSION 6.2 *version-6.2* + +This section is about improvements made between version 6.1 and 6.2. + +This is mainly a bug-fix release. There are also a few new features. + +Main new features: +- Support for GTK 2. (Daniel Elstner) +- Support for editing Arabic text. (Nadim Shaikli & Isam Bayazidi) +- ":try" command and exception handling. (Servatius Brandt) +- Support for the neXtaw GUI toolkit (mostly like Athena). (Alexey Froloff) +- Cscope support for Win32. (Khorev Sergey) +- Support for PostScript printing in various 8-bit encodings. (Mike Williams) + + +Changed *changed-6.2* +------- + +Removed the scheme indent file, the internal Lisp indenting works well now. + +Moved the GvimEXt, OleVim and VisVim directories into the "src" directory. +This is more consistent with how xxd is handled. + +The VisVim.dll file is installed in the top directory, next to gvimext.dll, +instead of in a subdirectory "VisVim". Fixes that NSIS was uninstalling it +from the wrong directory. + +Removed the art indent file, it didn't do anything. + +submatch() returned line breaks with CR instead of LF. + +Changed the Win32 Makefiles to become more uniform and compile gvimext.dll. +(Dan Sharp) + +'cindent': Align a "//" comment with a "//" comment in a previous line. +(Helmut Stiegler) + +Previously only for xterm-like terminals parent widgets were followed to find +the title and icon label. Now do this for all terminal emulators. + +Made it possible to recognize backslashes for "%" matching. The 'M' flag in +'cpoptions' disables it. (Haakon Riiser) + +Removed the Make_tcc.mak makefile for Turbo C. It didn't work and we probably +can't make it work (the compiler runs out of memory). + +Even though the documentation refers to keywords, "[ CTRL-D" was using +'isident' to find matches. Changed it to use 'iskeyword'. Also applies to +other commands that search for defined words in included files such as +":dsearch", "[D" and "[d". + +Made 'keywordprg' global-local. (Christian Robinson) + +Enabled the Netbeans interface by default. Reversed the configure argument +from "--enable-netbeans" to "--disable-netbeans". + + +Added *added-6.2* +----- + +New options: + 'arabic' + 'arabicshape' + 'ambiwidth' + 'autochdir' + 'casemap' + 'copyindent' + 'cscopequickfix' + 'preserveindent' + 'printencoding' + 'rightleftcmd' + 'termbidi' + 'toolbariconsize' + 'winfixheight' + +New keymaps: + Serbian (Aleksandar Veselinovic) + Chinese Pinyin (Fredrik Roubert) + Esperanto (Antoine J. Mechelynck) + +New syntax files: + Valgrind (Roger Luethi) + Smarty template (Manfred Stienstra) + MySQL (Kenneth Pronovici) + RockLinux package description (Piotr Esden-Tempski) + MMIX (Dirk Huesken) + gkrellmrc (David Necas) + Tilde (Tobias Rundtrom) + Logtalk (Paulo Moura) + PLP (Juerd Waalboer) + fvwm2m4 (David Necas) + IPfilter (Hendrik Scholz) + fstab (Radu Dineiu) + Quake (Nikolai Weibull) + Occam (Mario Schweigler) + lpc (Shizhu Pan) + Exim conf (David Necas) + EDIF (Artem Zankovich) + .cvsrc (Nikolai Weibull) + .fetchmailrc (Nikolai Weibull) + GNU gpg (Nikolai Weibull) + Grub (Nikolai Weibull) + Modconf (Nikolai Weibull) + RCS (Dmitry Vasiliev) + Art (Dorai Sitaram) + Renderman Interface Bytestream (Andrew J Bromage) + Mailcap (Doug Kearns) + Subversion commit file (Dmitry Vasiliev) + Microsoft IDL (Vadim Zeitlin) + WildPackets EtherPeek Decoder (Christopher Shinn) + Spyce (Rimon Barr) + Resolv.conf (Radu Dineiu) + A65 (Clemens Kirchgatterer) + sshconfig and sshdconfig (David Necas) + Cheetah and HTMLCheetah (Max Ischenko) + Packet filter (Camiel Dobbelaar) + +New indent files: + Eiffel (David Clarke) + Tilde (Tobias Rundtrom) + Occam (Mario Schweigler) + Art (Dorai Sitaram) + PHP (Miles Lott) + Dylan (Brent Fulgham) + +New tutor translations: + Slovak (Lubos Celko) + Greek (Christos Kontas) + German (Joachim Hofmann) + Norwegian (Øyvind Holm) + +New filetype plugins: + Occam (Mario Schweigler) + Art (Dorai Sitaram) + ant.vim, aspvbs.vim, config.vim, csc.vim, csh.vim, dtd.vim, html.vim, + jsp.vim, pascal.vim, php.vim, sgml.vim, sh.vim, svg.vim, tcsh.vim, + xhtml.vim, xml.vim, xsd.vim. (Dan Sharp) + +New compiler plugins: + Checkstyle (Doug Kearns) + g77 (Ralf Wildenhues) + fortran (Johann-Guenter Simon) + Xmllint (Doug Kearns) + Ruby (Tim Hammerquist) + Modelsim vcom (Paul Baleme) + +New menu translations: + Brazilian (José de Paula) + British (Mike Williams) + Korean in UTF-8. (Nam SungHyun) + Norwegian (Øyvind Holm) + Serbian (Aleksandar Jelenak) + +New message translation for Norwegian. (Øyvind Holm) + +New color scheme: + desert (Hans Fugal) + +Arabic specific features. 'arabicshape', 'termbidi', 'arabic' and +'rightleftcmd' options. (Nadim Shaikli & Isam Bayazidi) + +Support for neXtaw GUI toolkit, mostly like Athena. (Alexey Froloff) + +Win32: cscope support. (Khorev Sergey) + +VMS: various improvements to documentation and makefiles. (Zoltan Arpadffy) + +Added "x" key to the explorer plugin: execute the default action. (Yasuhiro +Matsumoto) + +Compile gvimext.dll with MingW. (Rene de Zwart) + +Add the "tohtml.vim" plugin. It defines the ":TOhtml" user command, an easy +way to convert text to HTML. + +Added ":try" / ":catch" / ":finally" / ":endtry" commands. Add E999 numbers +to all error messages, so that they can be caught by the number. +(Servatius Brandt) +Moved part of ex_docmd.c to the new ex_eval.c source file. + +Include support for GTK+ 2.2.x (Daniel Elstner) +Adds the "~" register: drag & drop text. +Adds the 'toolbariconsize' option. +Add -Dalloca when running lint to work around a problem with alloca() +prototype. + +When selecting an item in the error window to jump to, take some effort to +find an ordinary window to show the file in (not a preview window). + +Support for PostScript printing of various 8-bit encodings. (Mike Williams) + +inputdialog() accepts a third argument that is used when the dialog is +cancelled. Makes it possible to see a difference between cancelling and +entering nothing. + +Included Aap recipes. Can be used to update Vim to the latest version, +building and installing. + +"/" option in 'cinoptions': extra indent for comment lines. (Helmut Stiegler) + +Vim variable "v:register" and functions setreg(), getreg() and getregtype(). +(Michael Geddes) + +"v" flag in 'cpoptions': Leave text on screen with backspace in Insert mode. +(Phillip Vandry) + +Dosinst.exe also finds gvimext.dll in the "GvimExt" directory. Useful when +running install in the "src" directory for testing. + +Support tag files that were sorted with case ignored. (Flemming Madsen) + +When completing a wildcard in a leading path element, as in "../*/Makefile", +only the last part ("Makefile") was listed. Support custom defined +command line completion. (Flemming Madsen) + +Also recognize "rxvt" as an xterm-like terminal. (Tomas Styblo) + +Proper X11 session management. Fixes that the WM_SAVE_YOURSELF event was not +used by popular desktops. (Neil Bird) +Not used for Gnome 2, it has its own handling. + +Support BOR, DEBUG and SPAWNO arguments for the Borland 3 Makefile. (Walter +Briscoe) + +Support page breaks for printing. Adds the "formfeed" field in +'printoptions'. (Mike Williams) + +Mac OSX: multi-language support: iconv and gettext. (Muraoka Taro, Axel +Kielhorn) + +"\Z" flag in patterns: ignore differences in combining characters. (Ron Aaron) + +Added 'preserveindent' and 'copyindent' options. They use existing white +space characters instead of using Tabs as much as possible. (Chris Leishman) + +Updated Unicode tables to Unicode 4.0. (Raphael Finkel) + +Support for the mouse wheel in rxvt. (AIDA Shinra) + +Win32: Added ":8" file modifier to get short filename. Test50 tests the ":8" +expansion on Win32 systems. (Michael Geddes) + +'cscopequickfix' option: Open quickfix window for Cscope commands. Also +cleanup the code for giving messages. (Khorev Sergey) + +GUI: Support more than 222 columns for mouse positions. + +":stopinsert" command: Don't return to Insert mode. + +"interrupt" command for debug mode. Useful for simulating CTRL-C. (Servatius +Brandt) + + +Fixed *fixed-6.2* +----- + +Removed a few unused #defines from config.h.in, os_os2_cfg.h and os_vms_conf.h. + +The Vim icons in PNG format didn't have a transparent background. (Greg +Roelofs) + +Fixed a large number of spelling mistakes in the docs. (Adri Verhoef) + +The #defines for prototype generation were causing trouble. Changed them to +typedefs. + +A new version of libintl.h uses __asm__, which confuses cproto. Define a +dummy __asm__ macro. + +When 'virtualedit' is set can't move to halfway an unprintable character. +Cripples CTRL-V selection. (Taro Muraoka) +Allow moving to halfway an unprintable character. Don't let getvvcol() change +the pos->coladd argument. + +When a tab wraps to the next line, 'listchars' is set and 'foldcolumn' is +non-zero, only one character of the foldcolumn is highlighted. (Muraoka Taro) + +When using ":catch" without an argument Vim crashes. (Yasuhiro Matsumoto) +When no argument given use the ".*" pattern. + +Win32: When gvim.exe is started from a shortcut with the window style property +set to maximize Vim doesn't start with a maximized window. (Yasuhiro +Matsumoto) Open the window with the default size and don't call ShowWindow() +again when it's already visible. (Helmut Stiegler) + +gui_gtk.c used MAX, but it's undefined to avoid a conflict with system header +files. + +Win32: When closing a window from a mapping some pixels remain on the +statusline. (Yasuhiro Matsumoto) + +A column number in an errorformat that goes beyond the end of the line may +cause a crash. + +":throw 'test'" crashes Vim. (Yasuhiro Matsumoto) + +The file selector's scrollbar colors are not set after doing a ":hi Scrollbar +guifg=color". And the file selector's colors are not changed by the +colorscheme command. (David Harrison) + +Motif: When compiling with FEAT_FOOTER defined, the text area gets a few +pixels extra space on the right. Remove the special case in +gui_get_base_width(). (David Harrison) + +Using CTRL-R CTRL-P in Insert mode puts the '] mark in the wrong position. +(Helmut Stiegler) + +When 'formatoptions' includes "awct" a non-comment wasn't auto-formatted. + +Using a "--cmd" argument more than 10 times caused a crash. + +DEC style mouse support didn't work if the page field is not empty. +(Uribarri) + +"vim -l one two" did only set 'lisp' in the first file. Vi does it for every +file. + +":set tw<" didn't work. Was checking for '^' instead of '<'. + +In ":hardcopy > %.ps" the "%" was not expanded to the current filename. + +Made ":redraw" also update the Visual area. + +When a not implemented command, such as ":perl", has wrong arguments the less +important error was reported, giving the user the idea the command could work. + +On non-Unix systems autocommands for writing did not attempt a match with the +short file name, causing a pattern like "a/b" to fail. + +VMS: e_screenmode was not defined and a few other fixes for VMS. (Zoltan +Arpadffy) + +redraw_msg() depended on FEAT_ARABIC instead of FEAT_RIGHTLEFT. (Walter +Briscoe) + +Various changes for the PC Makefiles. (Walter Briscoe) + +Use _truename() instead of our own code to expand a file name into a full +path. (Walter Briscoe) + +Error in filetype check for /etc/modutils. (Lubomir Host) + +Cscope interface: allocated a buffer too small. + +Win16: remove a trailing backslash from a path when obtaining the permission +flags. (Vince Negri) + +When searching for tags with case ignored Vim could hang. + +When searching directories with a stopdir could get a crash. Did not +re-allocate enough memory. (Vince Negri) + +A user command may cause a crash. Don't use the command index when it's +negative. (Vince Negri) + +putenv() didn't work for MingW and Cygwin. (Dan Sharp) + +Many functions were common between os_msdos.c and os_win16.c. Use os_msdos.c +for compiling the Win16 version and remove the functions from os_win16.c. +(Vince Negri) + +For terminals that behave like an xterm but didn't have a name that is +recognized, the window title would not always be set. + +When syntax highlighting is off ":hardcopy" could still attempt printing +colors. + +Crash when using ":catch" without an argument. (Servatius Brandt) + +Win32: ":n #" doubled the backslashes. + +Fixed Arabic shaping for the command line. (Nadim Shaikli) + +Avoid splitting up a string displayed on the command line into individual +characters, it breaks Arabic shaping. + +Updated Cygwin and MingW makefiles to use more dependencies. (Dan Sharp) + +2html.vim didn't work with 'nomagic' set. + +When a local argument list is used and doing ":only" Vim could crash later. +(Muraoka Taro) + +When using "%P" in 'statusline' and the fillchar is "-", a percentage of 3% +could result in "-3%". Also avoid changing a space inside a filename to the +fill character. + +MSwin: Handling of backslashes and double quotes for command line arguments +was not like what other applications do. (Walter Briscoe) + +Test32 sometimes didn't work, because test11.out was written as TEST11.OUT. + +Avoid pointer conversions warnings for Borland C 5.5 in dosinst.c and +uninstal.c. + +More improvements for Make_bc3.mak file. (Walter Briscoe) + +When ":syn sync linebreaks=1" is used, editing the first line caused a redraw +of the whole screen. + +Making translated messages didn't work, if_perl.xs wasn't found. (Vlad +Sandrini) + +Motif and Athena: moving Vim to the foreground didn't uniconify it. Use +XMapRaised() instead of XRaiseWindow(). (Srikanth Sankaran) + +When using ":ptag" in a window where 'scrollbind' is set the preview window +would also have 'scrollbind' set. Also reset 'foldcolumn' and 'diff'. + +Various commands that split a window took over 'scrollbind', which is hardly +ever desired. Esp. for "q:" and ":copen". Mostly reset 'scrollbind' when +splitting a window. + +When 'shellslash' is set in the vimrc file the first entry of ":scriptnames" +would still have backslashes. Entries in the quickfix list could also have +wrong (back)slashes. + +Win32: printer dialog texts were not translated. (Yasuhiro Matsumoto) + +When using a multi-byte character with a K_SPECIAL byte or a special key code +with "--remote-send" the received byte sequence was mangled. Put it in the +typeahead buffer instead of the input buffer. + +Win32: The cursor position was incorrect after changing cursor shape. +(Yasuhiro Matsumoto). + +Win32: When 'encoding' is not the current codepage the title could not be set +to non-ascii characters. + +"vim -d scp://machine/file1 scp://machine/file2" did not work, there was only +one window. Fixed the netrw plugin not to wipe out the buffer if it is +displayed in other windows. + +"/$" caused "e" in last column of screen to disappear, a highlighted blank was +displayed instead. + +":s/ *\ze\n//e" removed the line break and introduced arbitrary text. Was +using the line count including what matched after the "\ze". + +Using the "c" flag with ":s" changed the behavior when a line break is +replaced and "\@<=" is used. Without "c" a following match was not found. + +":%s/\vA@<=\nB@=//gce" got stuck on "A\nB" when entering "n". + +VMS: add HAVE_STRFTIME in the config file. (Zoltan Arpadffy) + +When a delete prompts if a delete should continue when yanking is not +possible, restore msg_silent afterwards. + +":sign" did not complain about a missing argument. + +When adding or deleting a sign 'hlsearch' highlighting could disappear. +Use the generic functions for updating signs. + +On MS-Windows NT, 2K and XP don't use command.com but cmd.exe for testing. +Makes the tests work on more systems. + +In the DOS tests don't create "/tmp" to avoid an error. + +Mac classic: Problems with reading files with CR vs CR/LF. Rely on the +library version of fgets() to work correctly for Metrowerks 2.2. (Axel +Kielhorn) + +When typing a password a "*" was shown for each byte instead of for each +character. Added multi-byte handling to displaying the stars. (Yasuhiro +Matsumoto) + +When using Perl 5.6 accessing $curbuf doesn't work. Add an #ifdef to use +different code for 5.6 and 5.8. (Dan Sharp) + +MingW and Cygwin: Don't strip the debug executable. (Dan Sharp) + +An assignment to a variable with curlies that includes "==" doesn't work. +Skip over the curlies before searching for an "=". (Vince Negri) + +When cancelling the selection of alternate matching tags the tag stack index +could be advanced too far, resulting in an error message when using CTRL-T. + + +Patch 6.1.001 +Problem: When formatting UTF-8 text it might be wrapped at a space that is + followed by a composing character. (Raphael Finkel) + Also correct a display error for removing a composing char on top + of a space. +Solution: Check for a composing character on a space. +Files: src/edit.c, src/misc1.c, src/screen.c + +Patch 6.1.002 (extra) +Problem: Win32: after a ":popup" command the mouse pointer stays hidden. +Solution: Unhide the mouse pointer before showing the menu. +Files: src/gui_w48.c + +Patch 6.1.003 +Problem: When 'laststatus' is zero and there is a vertical split, the + vertical separator is drawn in the command line. (Srikant + Sankaran) +Solution: Don't draw the vertical separator where there is no statusline. +Files: src/screen.c + +Patch 6.1.004 +Problem: Unicode 3.2 changes width and composing of a few characters. + (Markus Kuhn) +Solution: Adjust the Unicode functions for the character width and composing + characters. +Files: src/mbyte.c + +Patch 6.1.005 +Problem: When using more than 50 items in 'statusline' Vim might crash. + (Steve Hall) +Solution: Increment itemcnt in check_stl_option(). (Flemming Madsen) +Files: src/option.c + +Patch 6.1.006 +Problem: When using "P" in Visual mode to put linewise selected text, the + wrong text is deleted. (Jakub Turski) +Solution: Put the text before the Visual area and correct the text to be + deleted for the inserted lines. + Also fix that "p" of linewise text in Visual block mode doesn't + work correctly. +Files: src/normal.c, src/ops.c + +Patch 6.1.007 +Problem: Using ":filetype plugin off" when filetype plugins were never + enabled causes an error message. (Yiu Wing) +Solution: Use ":silent!" to avoid the error message. +Files: runtime/ftplugof.vim + +Patch 6.1.008 +Problem: The "%" command doesn't ignore \" inside a string, it's seen as + the end of the string. (Ken Clark) +Solution: Skip a double quote preceded by an odd number of backslashes. +Files: src/search.c + +Patch 6.1.009 +Problem: Vim crashes when using a huge number for the maxwid value in a + statusline. (Robert M. Nowotniak) +Solution: Check for an overflow that makes maxwid negative. +Files: src/buffer.c + +Patch 6.1.010 +Problem: Searching backwards for a question mark with "?\?" doesn't work. + (Alan Isaac) Same problem in ":s?\??" and ":g?\??". +Solution: Change the "\?" in a pattern to "?" when using "?" as delimiter. +Files: src/ex_cmds.c, src/ex_docmd.c, src/proto/regexp.pro, src/regexp.c, + src/search.c, src/syntax.c, src/tag.c + +Patch 6.1.011 +Problem: XIM: doesn't work correctly when 'number' is set. Also, a focus + problem when selecting candidates. +Solution: Fix the XIM problems. (Yasuhiro Matsumoto) +Files: src/mbyte.c, src/screen.c + +Patch 6.1.012 +Problem: A system() call might fail if fread() does CR-LF to LF + translation. +Solution: Open the output file in binary mode. (Pavol Huhas) +Files: src/misc1.c + +Patch 6.1.013 +Problem: Win32: The default for 'printexpr' doesn't work when there are + special characters in 'printdevice'. +Solution: Add double quotes around the device name. (Mike Williams) +Files: runtime/doc/option.txt, src/option.c + +Patch 6.1.014 +Problem: An operator like "r" used in Visual block mode doesn't use + 'virtualedit' when it's set to "block". +Solution: Check for 'virtualedit' being active in Visual block mode when the + operator was started. +Files: src/ex_docmd.c, src/globals.h, src/misc2.c, src/normal.c, + src/ops.c, src/undo.c + +Patch 6.1.015 +Problem: After patch 6.1.014 can't compile with tiny features. (Christian + J. Robinson) +Solution: Add the missing define of virtual_op. +Files: src/vim.h + +Patch 6.1.016 (extra) +Problem: Win32: Outputting Hebrew or Arabic text might have a problem with + reversing. +Solution: Replace the RevOut() function with ETO_IGNORELANGUAGE. (Ron Aaron) +Files: src/gui_w32.c + +Patch 6.1.017 +Problem: Cygwin: After patch 6.1.012 Still doesn't do binary file I/O. + (Pavol Juhas) +Solution: Define BINARY_FILE_IO for Cygwin. +Files: src/os_unix.h + +Patch 6.1.018 +Problem: Error message when using cterm highlighting. (Leonardo Di Lella) +Solution: Remove a backslash before a question mark. +Files: runtime/syntax/cterm.vim + +Patch 6.1.019 (extra) +Problem: Win32: File name is messed up when editing just a drive name. + (Walter Briscoe) +Solution: Append a NUL after the drive name. (Vince Negri) +Files: src/os_win32.c + +Patch 6.1.020 +Problem: col("'>") returns a huge number after using Visual line mode. +Solution: Return the length of the line instead. +Files: src/eval.c + +Patch 6.1.021 (depends on patch 6.1.009) +Problem: Vim crashes when using a huge number for the minwid value in a + statusline. (Robert M. Nowotniak) +Solution: Check for an overflow that makes minwid negative. +Files: src/buffer.c + +Patch 6.1.022 +Problem: Grabbing the status line above the command-line window works like + the bottom status line was grabbed. (Jim Battle) +Solution: Make it possible to grab the status line above the command-line + window, so that it can be resized. +Files: src/ui.c + +Patch 6.1.023 (extra) +Problem: VMS: running tests doesn't work properly. +Solution: Adjust the makefile. (Zoltan Arpadffy) +Files: src/testdir/Make_vms.mms + +Patch 6.1.024 +Problem: When header files use a new syntax for declaring functions, Vim + can't figure out missing prototypes properly. +Solution: Accept braces around a function name. (M. Warner Losh) +Files: src/osdef.sh + +Patch 6.1.025 +Problem: Five messages for "vim --help" don't start with a capital. (Vlad + Sandrini) +Solution: Make the messages consistent. +Files: src/main.c + +Patch 6.1.026 +Problem: *.patch files are not recognized as diff files. In a script a + "VAR=val" argument after "env" isn't ignored. PHP scripts are not + recognized. +Solution: Add *.patch for diff filetypes. Ignore "VAR=val". Recognize PHP + scripts. (Roman Neuhauser) +Files: runtime/filetype.vim, runtime/scripts.vim + +Patch 6.1.027 +Problem: When 'foldcolumn' is non-zero, a special character that wraps to + the next line disturbs the foldcolumn highlighting. (Yasuhiro + Matsumoto) +Solution: Only use the special highlighting when drawing text characters. +Files: src/screen.c + +Patch 6.1.028 +Problem: Client-server: When a --remote-expr fails, Vim still exits with + status zero. +Solution: Exit Vim with a non-zero status to indicate the --remote-expr + failed. (Thomas Scott Urban) +Files: src/main.c + +Patch 6.1.029 +Problem: When 'encoding' is an 8-bit encoding other than "latin1", editing + a utf-8 or other Unicode file uses the wrong conversion. (Jan + Fedak) +Solution: Don't use Unicode to latin1 conversion for 8-bit encodings other + than "latin1". +Files: src/fileio.c + +Patch 6.1.030 +Problem: When CTRL-N is mapped in Insert mode, it is also mapped after + CTRL-X CTRL-N, while it is not mapped after CTRL-X CTRL-F. + (Kontra Gergely) +Solution: Don't map CTRL-N after CTRL-X CTRL-N. Same for CTRL-P. +Files: src/getchar.c + +Patch 6.1.031 +Problem: Cygwin: Xxd could read a file in text mode instead of binary mode. +Solution: Use "rb" or "rt" when needed. (Pavol Juhas) +Files: src/xxd/xxd.c + +Patch 6.1.032 +Problem: Can't specify a quickfix file without jumping to the first error. +Solution: Add the ":cgetfile" command. (Yegappan Lakshmanan) +Files: runtime/doc/index.txt, runtime/doc/quickfix.txt, src/ex_cmds.h, + src/quickfix.c + +Patch 6.1.033 +Problem: GUI: When the selection is lost and the Visual highlighting is + changed to underlining, the cursor is left in a different + position. (Christian Michon) +Solution: Update the cursor position after redrawing the selection. +Files: src/ui.c + +Patch 6.1.034 +Problem: A CVS diff file isn't recognized as diff filetype. +Solution: Skip lines starting with "? " before checking for an "Index:" line. +Files: runtime/scripts.vim + +Patch 6.1.035 (extra, depends on 6.1.016) +Problem: Win32: Outputting Hebrew or Arabic text might have a problem with + reversing on MS-Windows 95/98/ME. +Solution: Restore the RevOut() function and use it in specific situations + only. (Ron Aaron) +Files: src/gui_w32.c + +Patch 6.1.036 +Problem: This command may cause a crash: ":v/./,//-j". (Ralf Arens) +Solution: Compute the right length of the regexp when it's empty. +Files: src/search.c + +Patch 6.1.037 +Problem: When 'lazyredraw' is set, pressing "q" at the hit-enter prompt + causes an incomplete redraw and the cursor isn't positioned. + (Lubomir Host) +Solution: Overrule 'lazyredraw' when do_redraw is set. +Files: src/main.c, src/screen.c + +Patch 6.1.038 +Problem: Multi-byte: When a ":s" command contains a multi-byte character + where the trail byte is '~' the text is messed up. +Solution: Properly skip multi-byte characters in regtilde() (Muraoka Taro) +Files: src/regexp.c + +Patch 6.1.039 +Problem: When folds are defined and the file is changed outside of Vim, + reloading the file doesn't update the folds. (Anders + Schack-Nielsen) +Solution: Recompute the folds after reloading the file. +Files: src/fileio.c + +Patch 6.1.040 +Problem: When changing directory for expanding a file name fails there is + no error message. +Solution: Give an error message for this situation. Don't change directory + if we can't return to the original directory. +Files: src/diff.c, src/ex_docmd.c, src/globals.h, src/misc1.c, + src/os_unix.c + +Patch 6.1.041 +Problem: ":mkvimrc" doesn't handle a mapping that has a leading space in + the rhs. (Davyd Ondrejko) +Solution: Insert a CTRL-V before the leading space. Also display leading + and trailing white space in <> form. +Files: src/getchar.c, src/message.c + +Patch 6.1.042 +Problem: "vim -r" doesn't show all matches when 'wildignore' removes swap + files. (Steve Talley) +Solution: Keep all matching swap file names. +Files: src/memline.c + +Patch 6.1.043 +Problem: After patch 6.1.040 a few warnings are produced. +Solution: Add a type cast to "char *" for mch_chdir(). (Axel Kielhorn) +Files: src/diff.c, src/ex_docmd.c.c, src/misc1.c, src/os_unix.c + +Patch 6.1.044 (extra) +Problem: GUI: When using the find/replace dialog with text that contains a + slash, an invalid substitute command is generated. + On Win32 a find doesn't work when 'insertmode' is set. +Solution: Escape slashes with a backslash. + Make the Win32, Motif and GTK gui use common code for the + find/replace dialog. + Add the "match case" option for Motif and GTK. +Files: src/feature.h, src/proto/gui.pro, src/gui.c, src/gui.h, + src/gui_motif.c, src/gui_gtk.c, src/gui_w48.c + +Patch 6.1.045 +Problem: In Visual mode, with lots of folds and 'scrolloff' set to 999, + moving the cursor down near the end of the file causes the text to + jump up and down. (Lubomir Host) +Solution: Take into account that the cursor may be on the last line of a + closed fold. +Files: src/move.c + +Patch 6.1.046 +Problem: X11 GUI: ":set lsp=2 gcr=n-v-i:hor1-blinkon0" draws a black + rectangle. ":set lsp=2 gcr=n-v-i:hor10-blinkon0" makes the cursor + disappear. (Nam SungHyun) +Solution: Correctly compute the height of the horizontal cursor. +Files: src/gui_gtk_x11.c, src/gui_x11.c + +Patch 6.1.047 +Problem: When skipping commands after an error was encountered, expressions + for ":if", ";elseif" and ":while" are still evaluated. +Solution: Skip the expression after an error. (Servatius Brandt) +Files: src/ex_docmd.c + +Patch 6.1.048 +Problem: Unicode 3.2 changes were missing a few Hangul Jamo characters. +Solution: Recognize more characters as composing characters. (Jungshik Shin) +Files: src/mbyte.c + +Patch 6.1.049 (extra) +Problem: On a 32 bit display a valid color may cause an error message, + because its pixel value is negative. (Chris Paulson-Ellis) +Solution: Check for -11111 instead of the color being negative. + Don't add one to the pixel value, -1 may be used for white. +Files: src/globals.h, src/gui.c, src/gui.h, src/gui_amiga.c, + src/gui_athena.c, src/gui_beos.cc, src/gui_gtk_x11.c, + src/gui_mac.c, src/gui_motif.c, src/gui_photon.c, + src/gui_riscos.c, src/gui_w16.c, src/gui_w32.c, src/gui_w48.c, + src/gui_x11.c, src/mbyte.c, src/syntax.c + +Patch 6.1.050 (depends on 6.1.049) +Problem: After patch 6.1.049 the non-GUI version doesn't compile. +Solution: Add an #ifdef FEAT_GUI. (Robert Stanton) +Files: src/syntax.c + +Patch 6.1.051 (depends on 6.1.044) +Problem: Doesn't compile with GUI and small features. +Solution: Adjust the #if for ga_append(). +Files: src/misc2.c + +Patch 6.1.052 +Problem: Unix: The executable() function doesn't work when the "which" + command isn't available. +Solution: Go through $PATH manually. Also makes it work for VMS. +Files: src/os_unix.c + +Patch 6.1.053 +Problem: When 'sessionoptions' contains "globals", or "localoptions" and an + option value contains a line break, the resulting script is wrong. +Solution: Use "\n" and "\r" for a line break. (Srinath Avadhanula) +Files: src/eval.c + +Patch 6.1.054 +Problem: GUI: A mouse click is not recognized at the more prompt, even when + 'mouse' includes 'r'. +Solution: Recognize a mouse click at the more prompt. + Also accept a mouse click in the last line in the GUI. + Add "ml" entry in 'mouseshape'. +Files: src/gui.c, src/message.c, src/misc1.c, src/misc2.c, src/option.c, + src/structs.h + +Patch 6.1.055 +Problem: When editing a compressed file, Vim will inspect the contents to + guess the filetype. +Solution: Don't source scripts.vim for .Z, .gz, .bz2, .zip and .tgz files. +Files: runtime/filetype.vim, runtime/plugin/gzip.vim + +Patch 6.1.056 +Problem: Loading the Syntax menu can take quite a bit of time. +Solution: Add the "skip_syntax_sel_menu" variable. When it's defined the + available syntax files are not in the Syntax menu. +Files: runtime/doc/gui.txt, runtime/menu.vim + +Patch 6.1.057 +Problem: An ESC inside a mapping doesn't work as documented when + 'insertmode' is set, it does go from Visual or Normal mode to + Insert mode. (Benji Fisher) +Solution: Make it work as documented. +Files: src/normal.c + +Patch 6.1.058 +Problem: When there is a closed fold just above the first line in the + window, using CTRL-X CTRL-Y in Insert mode will show only one line + of the fold. (Alexey Marinichev) +Solution: Correct the topline by putting it at the start of the fold. +Files: src/move.c + +Patch 6.1.059 +Problem: ":redir > ~/file" doesn't work. (Stephen Rasku) +Solution: Expand environment variables in the ":redir >" argument. +Files: src/ex_docmd.c + +Patch 6.1.060 +Problem: When 'virtualedit' is set and 'selection' is "exclusive", deleting + a character just before a tab changes the tab into spaces. Undo + doesn't restore the tab. (Helmut Stiegler) +Solution: Don't replace the tab by spaces when it's not needed. Correctly + save the line before it's changed. +Files: src/ops.c + +Patch 6.1.061 +Problem: When 'virtualedit' is set and 'selection' is "exclusive", a Visual + selection that ends just after a tab doesn't include that tab in + the highlighting. (Helmut Stiegler) +Solution: Use a different way to exclude the character under the cursor. +Files: src/screen.c + +Patch 6.1.062 +Problem: The "man" filetype plugin doesn't work properly on Solaris 5. +Solution: Use a different way to detect that "man -s" should be used. (Hugh + Sasse) +Files: runtime/ftplugin/man.vim + +Patch 6.1.063 +Problem: Java indenting doesn't work properly. +Solution: Ignore comments when checking if the indent doesn't increase after + a "}". +Files: runtime/indent/java.vim + +Patch 6.1.064 +Problem: The URLs that the netrw plugin recognized for ftp and rcp did not + conform to the standard method://[user@]host[:port]/path. +Solution: Use ftp://[user@]host[[:#]port]/path, which supports both the new + and the previous style. Also added a bit of dav/cadaver support. + (Charles Campbell) +Files: runtime/plugin/netrw.vim + +Patch 6.1.065 +Problem: VMS: The colorscheme, keymap and compiler menus are not filled in. +Solution: Ignore case when looking for ".vim" files. (Coen Engelbarts) +Files: runtime/menu.vim + +Patch 6.1.066 (extra) +Problem: When calling system() in a plugin reading stdin hangs. +Solution: Don't set the terminal to RAW mode when it wasn't in RAW mode + before the system() call. +Files: src/os_amiga.c, src/os_msdos.c, src/os_riscos.c, src/os_unix.c, + src/os_win16.c, src/os_win32.c + +Patch 6.1.067 +Problem: ":set viminfo+=f0" is not working. (Benji Fisher) +Solution: Check the "f" flag instead of "'" in 'viminfo'. +Files: src/mark.c + +Patch 6.1.068 +Problem: When a file is reloaded after it was changed outside of Vim, diff + mode isn't updated. (Michael Naumann) +Solution: Invalidate the diff info so that it's updated when needed. +Files: src/fileio.c + +Patch 6.1.069 +Problem: When 'showmatch' is set and "$" is in 'cpoptions', using + "C}<Esc>" may forget to remove the "$". (Preben Guldberg) +Solution: Restore dollar_vcol after displaying the matching cursor position. +Files: src/search.c + +Patch 6.1.070 (depends on 6.1.060) +Problem: Compiler warning for signed/unsigned mismatch. (Mike Williams) +Solution: Add a typecast to int. +Files: src/ops.c + +Patch 6.1.071 +Problem: When 'selection' is exclusive, g CTRL-G in Visual mode counts one + character too much. (David Necas) +Solution: Subtract one from the end position. +Files: src/ops.c + +Patch 6.1.072 +Problem: When a file name in a tags file starts with http:// or something + else for which there is a BufReadCmd autocommand, the file isn't + opened anyway. +Solution: Check if there is a matching BufReadCmd autocommand and try to + open the file. +Files: src/fileio.c, src/proto/fileio.pro, src/tag.c + +Patch 6.1.073 (extra) +Problem: BC5: Can't easily specify a tiny, small, normal, big or huge + version. +Solution: Allow selecting the version with the FEATURES variable. (Ajit + Thakkar) +Files: src/Make_bc5.mak + +Patch 6.1.074 +Problem: When 'cdpath' includes "../..", changing to a directory in which + we currently already are doesn't work. ff_check_visited() adds + the directory both when using it as the root for searching and for + the actual matches. (Stephen Rasku) +Solution: Use a separate list for the already searched directories. +Files: src/misc2.c + +Patch 6.1.075 (depends on 6.1.072) +Problem: Can't compile fileio.c on MS-Windows. +Solution: Add a declaration for the "p" pointer. (Madoka Machitani) +Files: src/fileio.c + +Patch 6.1.076 (extra) +Problem: Macintosh: explorer plugin doesn't work on Mac Classic. + IME doesn't work. Dialog boxes don't work on Mac OS X +Solution: Fix explorer plugin and key modifiers. (Axel Kielhorn) + Fix IME support. (Muraoka Taro) + Disable dialog boxes. (Benji Fisher) +Files: src/edit.c, src/feature.h, src/gui_mac.c, src/os_mac.c + +Patch 6.1.077 +Problem: On a Debian system with ACL linking fails. (Lubomir Host) +Solution: When the "acl" library is used, check if the "attr" library is + present and use it. +Files: src/auto/configure, src/configure.in, src/link.sh + +Patch 6.1.078 +Problem: When using 'foldmethod' "marker" and the end marker appears before + the start marker in the file, no fold is found. (Nazri Ramliy) +Solution: Don't let the fold depth go negative. +Files: src/fold.c + +Patch 6.1.079 +Problem: When using "s" in Visual block mode with 'virtualedit' set, when + the selected block is after the end of some lines the wrong text + is inserted and some lines are skipped. (Servatius Brandt) +Solution: Insert the right text and extend short lines. +Files: src/ops.c + +Patch 6.1.080 +Problem: When using gcc with /usr/local already in the search path, adding + it again causes problems. +Solution: Adjust configure.in to avoid adding /usr/local/include and + /usr/local/lib when using GCC and they are already used. (Johannes + Zellner) +Files: src/auto/configure, src/configure.in + +Patch 6.1.081 +Problem: ":help CTRL-\_CTRL-N" doesn't work. (Christian J. Robinson) +Solution: Double the backslash to avoid the special meaning of "\_". +Files: src/ex_cmds.c + +Patch 6.1.082 +Problem: On MS-Windows the vimrc_example.vim script is sourced and then + mswin.vim. This enables using select mode, but since "p" is + mapped it doesn't replace the selection. +Solution: Remove the mapping of "p" from vimrc_example.vim, it's obsolete. + (Vlad Sandrini) +Files: runtime/vimrc_example.vim + +Patch 6.1.083 +Problem: When $LANG is "sk" or "sk_sk", the Slovak menu file isn't found. + (Martin Lacko) +Solution: Guess the right menu file based on the system. +Files: runtime/lang/menu_sk_sk.vim + +Patch 6.1.084 (depends on 6.1.080) +Problem: "include" and "lib" are mixed up when checking the directories gcc + already searches. +Solution: Swap the variable names. (SunHo Kim) +Files: src/auto/configure, src/configure.in + +Patch 6.1.085 +Problem: When using CTRL-O CTRL-\ CTRL-N from Insert mode, the displayed + mode "(insert)" isn't removed. (Benji Fisher) +Solution: Clear the command line. +Files: src/normal.c + +Patch 6.1.086 (depends on 6.1.049) +Problem: The guifg color for CursorIM doesn't take effect. +Solution: Use the foreground color when it's defined. (Muraoka Taro) +Files: src/gui.c + +Patch 6.1.087 +Problem: A thesaurus with Japanese characters has problems with characters + in different word classes. +Solution: Only separate words with single-byte non-word characters. + (Muraoka Taro) +Files: src/edit.c + +Patch 6.1.088 (extra) +Problem: Win32: no debugging info is generated. Tags file excludes .cpp + files. +Solution: Add "/map" to compiler flags. Add "*.cpp" to ctags command. + (Muraoka Taro) +Files: src/Make_mvc.mak + +Patch 6.1.089 +Problem: On BSDI systems there is no ss_sp field in stack_t. (Robert Jan) +Solution: Use ss_base instead. +Files: src/auto/configure, src/configure.in, src/config.h.in, + src/os_unix.c + +Patch 6.1.090 +Problem: CTRL-F gets stuck when 'scrolloff' is non-zero and there is a mix + of long wrapping lines and a non-wrapping line. +Solution: Check that CTRL-F scrolls at least one line. +Files: src/move.c + +Patch 6.1.091 +Problem: GTK: Can't change preeditstate without setting 'imactivatekey'. +Solution: Add some code to change preeditstate for OnTheSpot. (Yasuhiro + Matsumoto) +Files: src/mbyte.c + +Patch 6.1.092 +Problem: ":mapclear <buffer>" doesn't work. (Srikanth Adayapalam) +Solution: Allow an argument for ":mapclear". +Files: src/ex_cmds.h + +Patch 6.1.093 (extra) +Problem: Mac and MS-Windows GUI: when scrolling while ":s" is working the + results can be messed up, because the cursor is moved. +Solution: Disallow direct scrolling when not waiting for a character. +Files: src/gui_mac.c, src/gui_w16.c, src/gui_w32.c, src/gui_w48.c + +Patch 6.1.094 +Problem: Cygwin: Passing a file name that has backslashes isn't handled + very well. +Solution: Convert file name arguments to Posix. (Chris Metcalf) +Files: src/main.c + +Patch 6.1.095 +Problem: When using signs can free an item on the stack. + Overruling sign colors doesn't work. (Srikanth Sankaran) +Solution: Don't free the item on the stack. Use NULL instead of "none" for + the value of the color. +Files: src/gui_x11.c + +Patch 6.1.096 +Problem: When erasing the right halve of a double-byte character, it may + cause further characters to be erased. (Yasuhiro Matsumoto) +Solution: Make sure only one character is erased. +Files: src/screen.c + +Patch 6.1.097 (depends on 6.1.090) +Problem: When 'scrolloff' is set to a huge value, CTRL-F at the end of the + file scrolls one line. (Lubomir Host) +Solution: Don't scroll when CTRL-F detects the end-of-file. +Files: src/move.c + +Patch 6.1.098 +Problem: MS-Windows: When the xxd program is under "c:\program files" the + "Convert to Hex" menu doesn't work. (Brian Mathis) +Solution: Put the path to xxd in double quotes. +Files: runtime/menu.vim + +Patch 6.1.099 +Problem: Memory corrupted when closing a fold with more than 99999 lines. +Solution: Allocate more space for the fold text. (Walter Briscoe) +Files: src/eval.c + +Patch 6.1.100 (extra, depends on 6.1.088) +Problem: Win32: VC5 and earlier don't support the /mapinfo option. +Solution: Add "/mapinfo" only when "MAP=lines" is specified. (Muraoka Taro) +Files: src/Make_mvc.mak + +Patch 6.1.101 +Problem: After using ":options" the tabstop of a new window is 15. Entry + in ":options" window for 'autowriteall' is wrong. (Antoine J + Mechelynck) Can't insert a space in an option value. +Solution: Use ":setlocal" instead of ":set". Change "aw" to "awa". + Don't map space in Insert mode. +Files: runtime/optwin.vim + +Patch 6.1.102 +Problem: Unprintable and multi-byte characters in a statusline item are not + truncated correctly. (Yasuhiro Matsumoto) +Solution: Count the width of characters instead of the number of bytes. +Files: src/buffer.c + +Patch 6.1.103 +Problem: A function returning from a while loop, with 'verbose' set to 12 + or higher, doesn't mention the return value. A function with the + 'abort' attribute may return -1 while the verbose message says + something else. +Solution: Move the verbose message about returning from a function to + call_func(). (Servatius Brandt) +Files: src/eval.c + +Patch 6.1.104 +Problem: GCC 3.1 appears to have an optimizer problem that makes test 3 + crash. +Solution: For GCC 3.1 add -fno-strength-reduce to avoid the optimizer bug. + Filter out extra info from "gcc --version". +Files: src/auto/configure, src/configure.in + +Patch 6.1.105 +Problem: Win32: The default for 'shellpipe' doesn't redirect stderr. (Dion + Nicolaas) +Solution: Redirect stderr, depending on the shell (like for 'shellredir'). +Files: src/option.c + +Patch 6.1.106 +Problem: The maze program crashes. +Solution: Change "11" to "27" and it works. (Greg Roelofs) +Files: runtime/macros/maze/mazeansi.c + +Patch 6.1.107 +Problem: When 'list' is set the current line in the error window may be + displayed wrong. (Muraoka Taro) +Solution: Don't continue the line after the $ has been displayed and the + rightmost column is reached. +Files: src/screen.c + +Patch 6.1.108 +Problem: When interrupting a filter command such as "!!sleep 20" the file + becomes read-only. (Mark Brader) +Solution: Only set the read-only flag when opening a buffer is interrupted. + When the shell command was interrupted, read the output that was + produced so far. +Files: src/ex_cmds.c, src/fileio.c + +Patch 6.1.109 +Problem: When 'eadirection' is "hor", using CTRL-W = doesn't equalize the + window heights. (Roman Neuhauser) +Solution: Ignore 'eadirection' for CTRL-W = +Files: src/window.c + +Patch 6.1.110 +Problem: When using ":badd file" when "file" is already present but not + listed, it stays unlisted. (David Frey) +Solution: Set 'buflisted'. +Files: src/buffer.c + +Patch 6.1.111 +Problem: It's not possible to detect using the Unix sources on Win32 or Mac. +Solution: Add has("macunix") and has("win32unix"). +Files: runtime/doc/eval.txt, src/eval.c + +Patch 6.1.112 +Problem: When using ":argdo", ":bufdo" or ":windo", CTRL-O doesn't go to + the cursor position from before this command but every position + where the argument was executed. +Solution: Only remember the cursor position from before the ":argdo", + ":bufdo" and ":windo". +Files: src/ex_cmds2.c, src/mark.c + +Patch 6.1.113 +Problem: ":bufdo bwipe" only wipes out half the buffers. (Roman Neuhauser) +Solution: Decide what buffer to go to next before executing the command. +Files: src/ex_cmds2.c + +Patch 6.1.114 +Problem: ":python import vim", ":python vim.current.buffer[0:0] = []" gives + a lalloc(0) error. (Chris Southern) +Solution: Don't allocate an array when it's size is zero. +Files: src/if_python.c + +Patch 6.1.115 +Problem: "das" on the white space at the end of a paragraph does not delete + the "." the sentence ends with. +Solution: Don't exclude the last character when it is not white space. +Files: src/search.c + +Patch 6.1.116 +Problem: When 'endofline' is changed while 'binary' is set a file should be + considered modified. (Olaf Buddenhagen) +Solution: Remember the 'eol' value when editing started and consider the + file changed when the current value is different and 'binary' is + set. Also fix that the window title isn't updated when 'ff' or + 'bin' changes. +Files: src/option.c, src/structs.h + +Patch 6.1.117 +Problem: Small problem with editing a file over ftp: and with Cygwin. +Solution: Remove a dot from a ":normal" command. Use "cygdrive" where + appropriate. (Charles Campbell) +Files: runtime/plugin/netrw.vim + +Patch 6.1.118 +Problem: When a file in diff mode is reloaded because it changed outside + of Vim, other windows in diff mode are not always updated. + (Michael Naumann) +Solution: After reloading a file in diff mode mark all windows in diff mode + for redraw. +Files: src/diff.c + +Patch 6.1.119 (extra) +Problem: With the Sniff interface, using Sniff 4.0.X on HP-UX, there may be + a crash when connecting to Sniff. +Solution: Initialize sniff_rq_sep such that its value can be changed. + (Martin Egloff) +Files: src/if_sniff.c + +Patch 6.1.120 (depends on 6.1.097) +Problem: When 'scrolloff' is non-zero and there are folds, CTRL-F at the + end of the file scrolls part of a closed fold. (Lubomir Host) +Solution: Adjust the first line to the start of a fold. +Files: src/move.c + +Patch 6.1.121 (depends on 6.1.098) +Problem: When starting Select mode from Insert mode, then using the Paste + menu entry, the cursor is left before the last pasted character. + (Mario Schweigler) +Solution: Set the cursor for Insert mode one character to the right. +Files: runtime/menu.vim + +Patch 6.1.122 +Problem: ":file name" creates a new buffer to hold the old buffer name, + which becomes the alternate file. This buffer is unexpectedly + listed. +Solution: Create the buffer for the alternate name unlisted. +Files: src/ex_cmds.c + +Patch 6.1.123 +Problem: A ":match" command with more than one argument doesn't report an + error. +Solution: Check for extra characters. (Servatius Brandt) +Files: src/ex_docmd.c + +Patch 6.1.124 +Problem: When trying to exit and there is a hidden buffer that had 'eol' + off and 'bin' set exiting isn't possible. (John McGowan) +Solution: Set b_start_eol when clearing the buffer. +Files: src/buffer.c + +Patch 6.1.125 +Problem: Explorer plugin asks for saving a modified buffer even when it's + open in another window as well. +Solution: Count the number of windows using the buffer. +Files: runtime/plugin/explorer.vim + +Patch 6.1.126 +Problem: Adding the choices in the syntax menu is consuming much of the + startup time of the GUI while it's not often used. +Solution: Only add the choices when the user wants to use them. +Files: Makefile, runtime/makemenu.vim, runtime/menu.vim, + runtime/synmenu.vim, src/Makefile + +Patch 6.1.127 +Problem: When using "--remote file" and the server has 'insertmode' set, + commands are inserted instead of being executed. (Niklas Volbers) +Solution: Go to Normal mode again after the ":drop" command. +Files: src/main.c + +Patch 6.1.128 +Problem: The expression "input('very long prompt')" puts the cursor in the + wrong line (column is OK). +Solution: Add the wrapped lines to the indent. (Yasuhiro Matsumoto) +Files: src/ex_getln.c + +Patch 6.1.129 +Problem: On Solaris editing "file/" and then "file" results in using the + same buffer. (Jim Battle) +Solution: Before using stat(), check that there is no illegal trailing + slash. +Files: src/auto/configure, src/config.h.in, src/configure.in, + src/macros.h src/misc2.c, src/proto/misc2.pro + +Patch 6.1.130 +Problem: The documentation for some of the 'errorformat' items is unclear. +Solution: Add more examples and explain hard to understand items. (Stefan + Roemer) +Files: runtime/doc/quickfix.txt + +Patch 6.1.131 +Problem: X11 GUI: when expanding a CSI byte in the input stream to K_CSI, + the CSI byte itself isn't copied. +Solution: Copy the CSI byte. +Files: src/gui_x11.c + +Patch 6.1.132 +Problem: Executing a register in Ex mode may cause commands to be skipped. + (John McGowan) +Solution: In Ex mode use an extra check if the register contents was + consumed, to avoid input goes into the typeahead buffer. +Files: src/ex_docmd.c + +Patch 6.1.133 +Problem: When drawing double-wide characters in the statusline, may clear + half of a character. (Yasuhiro Matsumoto) +Solution: Force redraw of the next character by setting the attributes + instead of putting a NUL in ScreenLines[]. Do put a NUL in + ScreenLines[] when overwriting half of a double-wide character. +Files: src/screen.c + +Patch 6.1.134 +Problem: An error for a trailing argument of ":match" should not be given + after ":if 0". (Servatius Brandt) +Solution: Only do the check when executing commands. +Files: src/ex_docmd.c + +Patch 6.1.135 +Problem: Passing a command to the shell that includes a newline always has + a backslash before the newline. +Solution: Remove one backslash before the newline. (Servatius Brandt) +Files: src/ex_docmd.c + +Patch 6.1.136 +Problem: When $TERM is "linux" the default for 'background' is "dark", even + though the GUI uses a light background. (Hugh Allen) +Solution: Don't mark the option as set when defaulting to "dark" for the + linux console. Also reset 'background' to "light" when the GUI + has a light background. +Files: src/option.c + +Patch 6.1.137 +Problem: Converting to HTML has a clumsy way of dealing with tabs which may + change the highlighting. +Solution: Replace tabs with spaces after converting a line to HTML. (Preben + Guldberg) +Files: runtime/syntax/2html.vim + +Patch 6.1.138 (depends on 6.1.126) +Problem: Adding extra items to the Syntax menu can't be done when the "Show + individual choices" menu is used. +Solution: Use ":runtime!" instead of ":source", so that all synmenu.vim + files in the runtime path are loaded. (Servatius Brandt) + Also fix that a translated menu can't be removed. +Files: runtime/menu.vim + +Patch 6.1.139 +Problem: Cygwin: PATH_MAX is not defined. +Solution: Include limits.h. (Dan Sharp) +Files: src/main.c + +Patch 6.1.140 +Problem: Cygwin: ":args `ls *.c`" does not work if the shell command + produces CR NL line separators. +Solution: Remove the CR characters ourselves. (Pavol Juhas) +Files: src/os_unix.c + +Patch 6.1.141 +Problem: ":wincmd gx" may cause problems when mixed with other commands. + ":wincmd c" doesn't close the window immediately. (Benji Fisher) +Solution: Pass the extra command character directly instead of using the + stuff buffer and call ex_close() directly. +Files: src/ex_docmd.c, src/normal.c, src/proto/normal.pro, + src/proto/window.pro, src/window.c + +Patch 6.1.142 +Problem: Defining paragraphs without a separating blank line isn't + possible. Paragraphs can't be formatted automatically. +Solution: Allow defining paragraphs with lines that end in white space. + Added the 'w' and 'a' flags in 'formatoptions'. +Files: runtime/doc/change.txt, src/edit.c, src/misc1.c, src/normal.c, + src/option.h, src/ops.c, src/proto/edit.pro, src/proto/ops.pro, + src/vim.h + +Patch 6.1.143 (depends on 6.1.142) +Problem: Auto formatting near the end of the file moves the cursor to a + wrong position. In Insert mode some lines are made one char too + narrow. When deleting a line undo might not always work properly. +Solution: Don't always move to the end of the line in the last line. Don't + position the cursor past the end of the line in Insert mode. + After deleting a line save the cursor line for undo. +Files: src/edit.c, src/ops.c, src/normal.c + +Patch 6.1.144 +Problem: Obtaining the size of a line in screen characters can be wrong. + A pointer may wrap around zero. +Solution: In win_linetabsize() check for a MAXCOL length argument. (Jim + Dunleavy) +Files: src/charset.c + +Patch 6.1.145 +Problem: GTK: Drag&drop with more than 3 files may cause a crash. (Mickael + Marchand) +Solution: Rewrite the code that parses the received list of files to be more + robust. +Files: src/charset.c, src/gui_gtk_x11.c + +Patch 6.1.146 +Problem: MS-Windows: When $HOME is constructed from $HOMEDRIVE and + $HOMEPATH, it is not used for storing the _viminfo file. (Normal + Diamond) +Solution: Set $HOME with the value obtained from $HOMEDRIVE and $HOMEPATH. +Files: src/misc1.c + +Patch 6.1.147 (extra) +Problem: MS-Windows: When a dialog has no default button, pressing Enter + ends it anyway and all buttons are selected. +Solution: Don't end a dialog when there is no default button. Don't select + all button when there is no default. (Vince Negri) +Files: src/gui_w32.c + +Patch 6.1.148 (extra) +Problem: MS-Windows: ACL is not properly supported. +Solution: Add an access() replacement that also works for ACL. (Mike + Williams) +Files: runtime/doc/editing.txt, src/os_win32.c + +Patch 6.1.149 (extra) +Problem: MS-Windows: Can't use diff mode from the file explorer. +Solution: Add a "diff with Vim" context menu entry. (Dan Sharp) +Files: GvimExt/gvimext.cpp, GvimExt/gvimext.h + +Patch 6.1.150 +Problem: OS/2, MS-Windows and MS-DOS: When 'shellslash' is set getcwd() + still uses backslash. (Yegappan Lakshmanan) +Solution: Adjust slashes in getcwd(). +Files: src/eval.c + +Patch 6.1.151 (extra) +Problem: Win32: The NTFS substream isn't copied. +Solution: Copy the substream when making a backup copy. (Muraoka Taro) +Files: src/fileio.c, src/os_win32.c, src/proto/os_win32.pro + +Patch 6.1.152 +Problem: When $LANG is iso8859-1 translated menus are not used. +Solution: Change iso8859 to iso_8859. +Files: runtime/menu.vim + +Patch 6.1.153 +Problem: Searching in included files may search recursively when the path + starts with "../". (Sven Berkvens-Matthijsse) +Solution: Compare full file names, use inode/device when possible. +Files: src/search.c + +Patch 6.1.154 (extra) +Problem: DJGPP: "vim -h" leaves the cursor in a wrong position. +Solution: Don't position the cursor using uninitialized variables. (Jim + Dunleavy) +Files: src/os_msdos.c + +Patch 6.1.155 +Problem: Win32: Cursor may sometimes disappear in Insert mode. +Solution: Change "hor10" in 'guicursor' to "hor15". (Walter Briscoe) +Files: src/option.c + +Patch 6.1.156 +Problem: Conversion between DBCS and UCS-2 isn't implemented cleanly. +Solution: Clean up a few things. +Files: src/mbyte.c, src/structs.h + +Patch 6.1.157 +Problem: 'hlsearch' highlights only the second comma in ",,,,," with + "/,\@<=[^,]*". (Preben Guldberg) +Solution: Also check for an empty match to start just after a previous + match. +Files: src/screen.c + +Patch 6.1.158 +Problem: "zs" and "ze" don't work correctly with ":set nowrap siso=1". + (Preben Guldberg) +Solution: Take 'siso' into account when computing the horizontal scroll + position for "zs" and "ze". +Files: src/normal.c + +Patch 6.1.159 +Problem: When expanding an abbreviation that includes a multi-byte + character too many characters are deleted. (Andrey Urazov) +Solution: Delete the abbreviation counting characters instead of bytes. +Files: src/getchar.c + +Patch 6.1.160 +Problem: ":$read file.gz" doesn't work. (Preben Guldberg) +Solution: Don't use the '[ mark after it has become invalid. +Files: runtime/plugin/gzip.vim + +Patch 6.1.161 (depends on 6.1.158) +Problem: Warning for signed/unsigned compare. Can set 'siso' to a negative + value. (Mike Williams) +Solution: Add a typecast. Add a check for 'siso' being negative. +Files: src/normal.c, src/option.c + +Patch 6.1.162 +Problem: Python interface: Didn't initialize threads properly. +Solution: Call PyEval_InitThreads() when starting up. +Files: src/if_python.c + +Patch 6.1.163 +Problem: Win32: Can't compile with Python after 6.1.162. +Solution: Dynamically load PyEval_InitThreads(). (Dan Sharp) +Files: src/if_python.c + +Patch 6.1.164 +Problem: If 'modifiable' is off, converting to xxd fails and 'filetype' is + changed to "xxd" anyway. +Solution: Don't change 'filetype' when conversion failed. +Files: runtime/menu.vim + +Patch 6.1.165 +Problem: Making changes in several lines and then a change in one of these + lines that splits it in two or more lines, undo information was + corrupted. May cause a crash. (Dave Fishburn) +Solution: When skipping to save a line for undo because it was already + saved, move it to become the last saved line, so that when the + command changes the line count other saved lines are not involved. +Files: src/undo.c + +Patch 6.1.166 +Problem: When 'autoindent' is set and mswin.vim has been sourced, pasting + with CTRL-V just after auto-indenting removes the indent. (Shlomi + Fish) +Solution: First insert an "x" and delete it again, so that the auto-indent + remains. +Files: runtime/mswin.vim + +Patch 6.1.167 +Problem: When giving a negative argument to ":retab" strange things start + happening. (Hans Ginzel) +Solution: Check for a negative value. +Files: src/ex_cmds.c + +Patch 6.1.168 +Problem: Pressing CTRL-C at the hit-enter prompt doesn't end the prompt. +Solution: Make CTRL-C stop the hit-enter prompt. +Files: src/message.c + +Patch 6.1.169 +Problem: bufexists() finds a buffer by using the name of a symbolic link to + it, but bufnr() doesn't. (Yegappan Lakshmanan) +Solution: When bufnr() can't find a buffer, try using the same method as + bufexists(). +Files: src/eval.c + +Patch 6.1.170 +Problem: Using ":mksession" uses the default session file name, but "vim + -S" doesn't. (Hans Ginzel) +Solution: Use the default session file name if "-S" is the last command + line argument or another option follows. +Files: runtime/doc/starting.txt, src/main.c + +Patch 6.1.171 +Problem: When opening a line just above a closed fold with "O" and the + comment leader is automatically inserted, the cursor is displayed + in the first column. (Sung-Hyun Nam) +Solution: Update the flag that indicates the cursor is in a closed fold. +Files: src/misc1.c + +Patch 6.1.172 +Problem: Command line completion of ":tag /pat" does not show the same + results as the tags the command actually finds. (Gilles Roy) +Solution: Don't modify the pattern to make it a regexp. +Files: src/ex_getln.c, src/tag.c + +Patch 6.1.173 +Problem: When using remote control to edit a position in a file and this + file is the current buffer and it's modified, the window is split + and the ":drop" command fails. +Solution: Don't split the window, keep editing the same buffer. + Use the ":drop" command in VisVim to avoid the problem there. +Files: src/ex_cmds.c, src/ex_cmds2.c, src/proto/ex_cmds2.pro, + VisVim/Commands.cpp + +Patch 6.1.174 +Problem: It is difficult to know in a script whether an option not only + exists but really works. +Solution: Add "exists('+option')". +Files: runtime/doc/eval.txt, src/eval.c + +Patch 6.1.175 +Problem: When reading commands from a pipe and a CTRL-C is pressed, Vim + will hang. (Piet Delport) +Solution: Don't keep reading characters to clear typeahead when an interrupt + was detected, stop when a single CTRL-C is read. +Files: src/getchar.c, src/ui.c + +Patch 6.1.176 +Problem: When the stack limit is very big a false out-of-stack error may + be detected. +Solution: Add a check for overflow of the stack limit computation. (Jim + Dunleavy) +Files: src/os_unix.c + +Patch 6.1.177 (depends on 6.1.141) +Problem: ":wincmd" does not allow a following command. (Gary Johnson) +Solution: Check for a following " | cmd". Also give an error for trailing + characters. +Files: src/ex_docmd.c + +Patch 6.1.178 +Problem: When 'expandtab' is set "r<C-V><Tab>" still expands the Tab. + (Bruce deVisser) +Solution: Replace with a literal Tab. +Files: src/normal.c + +Patch 6.1.179 (depends on 6.1.091) +Problem: When using X11R5 XIMPreserveState is undefined. (Albert Chin) +Solution: Include the missing definitions. +Files: src/mbyte.c + +Patch 6.1.180 +Problem: Use of the GUI code for forking is inconsistent. +Solution: Define MAY_FORK and use it for later #ifdefs. (Ben Fowlwer) +Files: src/gui.c + +Patch 6.1.181 +Problem: If the terminal doesn't wrap from the last char in a line to the + next line, the last column is blanked out. (Peter Karp) +Solution: Don't output a space to mark the wrap, but the same character + again. +Files: src/screen.c + +Patch 6.1.182 (depends on 6.1.142) +Problem: It is not possible to auto-format comments only. (Moshe Kaminsky) +Solution: When the 'a' and 'c' flags are in 'formatoptions' only auto-format + comments. +Files: runtime/doc/change.txt, src/edit.c + +Patch 6.1.183 +Problem: When 'fencs' is empty and 'enc' is utf-8, reading a file with + illegal bytes gives "CONVERSION ERROR" even though no conversion + is done. 'readonly' is set, even though writing the file results + in an unmodified file. +Solution: For this specific error use "ILLEGAL BYTE" and don't set + 'readonly'. +Files: src/fileio.c + +Patch 6.1.184 (extra) +Problem: The extra mouse buttons found on some mice don't work. +Solution: Support two extra buttons for MS-Windows. (Michael Geddes) +Files: runtime/doc/term.txt, src/edit.c, src/ex_getln.c, src/gui.c, + src/gui_w32.c, src/gui_w48.c, src/keymap.h, src/message.c, + src/misc1.c, src/misc2.c, src/normal.c, src/vim.h + +Patch 6.1.185 (depends on 6.1.182) +Problem: Can't compile without +comments feature. +Solution: Add #ifdef FEAT_COMMENTS. (Christian J. Robinson) +Files: src/edit.c + +Patch 6.1.186 (depends on 6.1.177) +Problem: ":wincmd" does not allow a following comment. (Aric Blumer) +Solution: Check for a following double quote. +Files: src/ex_docmd.c + +Patch 6.1.187 +Problem: Using ":doarg" with 'hidden' set and the current file is the only + argument and was modified gives an error message. (Preben + Guldberg) +Solution: Don't try re-editing the same file. +Files: src/ex_cmds2.c + +Patch 6.1.188 (depends on 6.1.173) +Problem: Unused variable in the small version. +Solution: Move the declaration for "p" inside #ifdef FEAT_LISTCMDS. +Files: src/ex_cmds2.c + +Patch 6.1.189 +Problem: inputdialog() doesn't work when 'c' is in 'guioptions'. (Aric + Blumer) +Solution: Fall back to the input() function in this situation. +Files: src/eval.c + +Patch 6.1.190 (extra) +Problem: VMS: doesn't build with GTK GUI. Various other problems. +Solution: Fix building for GTK. Improved Perl, Python and TCL support. + Improved VMS documentation. (Zoltan Arpadffy) + Added Vimtutor for VMS (T. R. Wyant) +Files: runtime/doc/os_vms.txt, src/INSTALLvms.txt, src/gui_gtk_f.h, + src/if_tcl.c, src/main.c, src/gui_gtk_vms.h, src/Make_vms.mms, + src/os_vms.opt, src/proto/if_tcl.pro, vimtutor.com, + src/testdir/Make_vms.mms + +Patch 6.1.191 +Problem: When using "vim -s script" and redirecting the output, the delay + for the "Output is not to a terminal" warning slows Vim down too + much. +Solution: Don't delay when reading commands from a script. +Files: src/main.c + +Patch 6.1.192 +Problem: ":diffsplit" doesn't add "hor" to 'scrollopt'. (Gary Johnson) +Solution: Add "hor" to 'scrollopt' each time ":diffsplit" is used. +Files: src/diff.c, src/main.c + +Patch 6.1.193 +Problem: Crash in in_id_list() for an item with a "containedin" list. (Dave + Fishburn) +Solution: Check for a negative syntax id, used for keywords. +Files: src/syntax.c + +Patch 6.1.194 +Problem: When "t_ti" is set but it doesn't cause swapping terminal pages, + "ZZ" may cause the shell prompt to appear on top of the file-write + message. +Solution: Scroll the text up in the Vim page before swapping to the terminal + page. (Michael Schroeder) +Files: src/os_unix.c + +Patch 6.1.195 +Problem: The quickfix and preview windows always keep their height, while + other windows can't fix their height. +Solution: Add the 'winfixheight' option, so that a fixed height can be + specified for any window. Also fix that the wildmenu may resize a + one-line window to a two-line window if 'ls' is zero. +Files: runtime/doc/options.txt, runtime/optwin.vim, src/ex_cmds.c, + src/ex_getln.c, src/globals.h, src/option.c, src/quickfix.c, + src/screen.c, src/structs.h, src/window.c + +Patch 6.1.196 (depends on 6.1.084) +Problem: On Mac OS X 10.2 generating osdef.h fails. +Solution: Add -no-cpp-precomp to avoid using precompiled header files, which + disables printing the search path. (Ben Fowler) +Files: src/auto/configure, src/configure.in + +Patch 6.1.197 +Problem: ":help <C-V><C-\><C-V><C-N>" (resulting in <1c><0e>) gives an + error message. (Servatius Brandt) +Solution: Double the backslash in "CTRL-\". +Files: src/ex_cmds.c + +Patch 6.1.198 (extra) (depends on 6.1.076) +Problem: Mac OS X: Dialogues don't work. +Solution: Fix a crashing problem for some GUI dialogues. Fix a problem when + saving to a new file from the GUI. (Peter Cucka) +Files: src/feature.h, src/gui_mac.c + +Patch 6.1.199 +Problem: 'guifontwide' doesn't work on Win32. +Solution: Output each wide character separately. (Michael Geddes) +Files: src/gui.c + +Patch 6.1.200 +Problem: ":syn sync fromstart" is not skipped after ":if 0". This can make + syntax highlighting very slow. +Solution: Check "eap->skip" appropriately. (Rob West) +Files: src/syntax.c + +Patch 6.1.201 (depends on 6.1.192) +Problem: Warning for illegal pointer combination. (Zoltan Arpadffy) +Solution: Add a typecast. +Files: src/diff.c + +Patch 6.1.202 (extra)(depends on 6.1.148) +Problem: Win32: filewritable() doesn't work properly on directories. +Solution: fix filewritable(). (Mike Williams) +Files: src/os_win32.c + +Patch 6.1.203 +Problem: ":%s/~//" causes a crash after ":%s/x//". (Gary Holloway) +Solution: Avoid reading past the end of a line when "~" is empty. +Files: src/regexp.c + +Patch 6.1.204 (depends on 6.1.129) +Problem: Warning for an illegal pointer on Solaris. +Solution: Add a typecast. (Derek Wyatt) +Files: src/misc2.c + +Patch 6.1.205 +Problem: The gzip plugin changes the alternate file when editing a + compressed file. (Oliver Fuchs) +Solution: Temporarily remove the 'a' and 'A' flags from 'cpo'. +Files: runtime/plugin/gzip.vim + +Patch 6.1.206 +Problem: The script generated with ":mksession" doesn't work properly when + some commands are mapped. +Solution: Use ":normal!" instead of ":normal". And use ":wincmd" where + possible. (Muraoka Taro) +Files: src/ex_docmd.c, src/fold.c + +Patch 6.1.207 +Problem: Indenting a Java file hangs below a line with a comment after a + command. +Solution: Break out of a loop. (Andre Pang) + Also line up } with matching {. +Files: runtime/indent/java.vim + +Patch 6.1.208 +Problem: Can't use the buffer number from the Python interface. +Solution: Add buffer.number. (Michal Vitecek) +Files: src/if_python.c + +Patch 6.1.209 +Problem: Printing doesn't work on Mac OS classic. +Solution: Use a ":" for path separator when opening the resource file. (Axel + Kielhorn) +Files: src/ex_cmds2.c + +Patch 6.1.210 +Problem: When there is an iconv() conversion error when reading a file + there can be an error the next time iconv() is used. +Solution: Reset the state of the iconv() descriptor. (Yasuhiro Matsumoto) +Files: src/fileio.c + +Patch 6.1.211 +Problem: The message "use ! to override" is confusing. +Solution: Make it "add ! to override". +Files: src/buffer.c, src/eval.c, src/ex_docmd.c, src/fileio.c, + src/globals.h + +Patch 6.1.212 +Problem: When Vim was started with "-R" ":new" creates a buffer + 'noreadonly' while ":enew" has 'readonly' set. (Preben Guldberg) +Solution: Don't set 'readonly in a new empty buffer for ":enew". +Files: src/ex_docmd.c + +Patch 6.1.213 +Problem: Using CTRL-W H may cause a big gap to appear below the last + window. (Aric Blumer) +Solution: Don't set the window height when there is a vertical split. + (Yasuhiro Matsumoto) +Files: src/window.c + +Patch 6.1.214 +Problem: When installing Vim and the runtime files were checked out from + CVS the CVS directories will also be installed. +Solution: Avoid installing the CVS dirs and their contents. +Files: src/Makefile + +Patch 6.1.215 +Problem: Win32: ":pwd" uses backslashes even when 'shellslash' is set. + (Xiangjiang Ma) +Solution: Adjust backslashes before printing the message. +Files: src/ex_docmd.c + +Patch 6.1.216 +Problem: When dynamically loading the iconv library, the error codes may be + confused. +Solution: Use specific error codes for iconv and redefine them for dynamic + loading. (Yasuhiro Matsumoto) +Files: src/fileio.c, src/mbyte.c, src/vim.h + +Patch 6.1.217 +Problem: When sourcing the same Vim script using a different name (symbolic + link or MS-Windows 8.3 name) it is listed twice with + ":scriptnames". (Tony Mechelynck) +Solution: Turn the script name into a full path before using it. On Unix + compare inode/device numbers. +Files: src/ex_cmds2.c + +Patch 6.1.218 +Problem: No error message for using the function argument "5+". (Servatius + Brandt) +Solution: Give an error message if a function or variable is expected but is + not found. +Files: src/eval.c + +Patch 6.1.219 +Problem: When using ":amenu :b 1<CR>" with a Visual selection and + 'insertmode' is set, Vim does not return to Insert mode. (Mickael + Marchand) +Solution: Add the command CTRL-\ CTRL-G that goes to Insert mode if + 'insertmode' is set and to Normal mode otherwise. Append this to + menus defined with ":amenu". +Files: src/edit.c, src/ex_getln.c, src/normal.c + +Patch 6.1.220 +Problem: When using a BufReadPost autocommand that changes the line count, + e.g., "$-1join", reloading a file that was changed outside Vim + does not work properly. (Alan G Isaac) +Solution: Make the buffer empty before reading the new version of the file. + Save the lines in a dummy buffer, so that they can be put back + when reading the file fails. +Files: src/buffer.c, src/ex_cmds.c, src/fileio.c, src/globals.h, + src/proto/buffer.pro + +Patch 6.1.221 +Problem: Changing case may not work properly, depending on the current + locale. +Solution: Add the 'casemap' option to let the user chose how changing case + is to be done. + Also fix lowering case when an UTF-8 character doesn't keep the + same byte length. +Files: runtime/doc/options.txt, src/ascii.h, src/auto/configure, + src/buffer.c, src/charset.c, src/config.h.in, src/configure.in, + src/diff.c, src/edit.c, src/eval.c, src/ex_cmds2.c, + src/ex_docmd.c, src/ex_getln.c, src/fileio.c, src/gui_amiga.c + src/gui_mac.c, src/gui_photon.c, src/gui_w48.c, src/gui_beos.cc, + src/macros.h, src/main.c, src/mbyte.c, src/menu.c, src/message.c, + src/misc1.c, src/misc2.c, src/option.c, src/os_msdos.c, + src/os_mswin.c, src/proto/charset.pro, src/regexp.c, src/option.h, + src/syntax.c + +Patch 6.1.222 (depends on 6.1.219) +Problem: Patch 6.1.219 was incomplete. +Solution: Add the changes for ":amenu". +Files: src/menu.c + +Patch 6.1.223 (extra) +Problem: Win32: When IME is activated 'iminsert' is set, but it might never + be reset when IME is disabled. (Muraoka Taro) + All systems: 'iminsert' is set to 2 when leaving Insert mode, even + when langmap is being used. (Peter Valach) +Solution: Don't set "b_p_iminsert" in _OnImeNotify(). (Muraoka Taro) + Don't store the status of the input method in 'iminsert' when + 'iminsert' is one. Also for editing the command line and for + arguments to Normal mode commands. +Files: src/edit.c, src/ex_getln.c, src/gui_w32.c, src/normal.c + +Patch 6.1.224 +Problem: "expand('$VAR')" returns an empty string when the expanded $VAR + is not an existing file. (Aric Blumer) +Solution: Included non-existing files, as documented. +Files: src/eval.c + +Patch 6.1.225 +Problem: Using <C-O><C-^> in Insert mode has a delay when starting "vim -u + NONE" and ":set nocp hidden". (Emmanuel) do_ecmd() uses + fileinfo(), the redraw is done after a delay to give the user time + to read the message. +Solution: Put the message from fileio() in "keep_msg", so that the redraw is + done before the delay (still needed to avoid the mode message + overwrites the fileinfo() message). +Files: src/buffer.c + +Patch 6.1.226 +Problem: Using ":debug" with a ":normal" command may cause a hang. (Colin + Keith) +Solution: Save the typeahead buffer when obtaining a debug command. +Files: src/ex_cmds2.c, src/getchar.c, src/proto/getchar.pro + +Patch 6.1.227 +Problem: It is possible to use a variable name "asdf:asdf" and ":let j:asdf + = 5" does not give an error message. (Mikolaj Machowski) +Solution: Check for a ":" inside the variable name. +Files: src/eval.c + +Patch 6.1.228 (extra) +Problem: Win32: The special output function for Hangul is used too often, + causing special handling for other situations to be skipped. + bInComposition is always FALSE, causing ImeGetTempComposition() + always to return NULL. +Solution: Remove HanExtTextOut(). Delete the dead code around + bInComposition and ImeGetTempComposition(). +Files: src/gui_w16.c, src/gui_w32.c, src/gui_w48.c + +Patch 6.1.229 +Problem: Win32: Conversion to/from often used codepages requires the iconv + library, which is not always available. +Solution: Use standard MS-Windows functions for the conversion when + possible. (mostly by Glenn Maynard) + Also fixes missing declaration for patch 6.1.220. +Files: src/fileio.c + +Patch 6.1.230 (extra) +Problem: Win16: building doesn't work. +Solution: Exclude the XBUTTON handling. (Vince Negri) +Files: src/gui_w48.c + +Patch 6.1.231 +Problem: Double clicking with the mouse to select a word does not work for + multi-byte characters. +Solution: Use vim_iswordc() instead of vim_isIDc(). This means 'iskeyword' + is used instead of 'isident'. Also fix that mixing ASCII with + multi-byte word characters doesn't work, the mouse class for + punctuation and word characters was mixed up. +Files: src/normal.c + +Patch 6.1.232 (depends on 6.1.226) +Problem: Using ex_normal_busy while it might not be available. (Axel + Kielhorn) +Solution: Only use ex_normal_busy when FEAT_EX_EXTRA is defined. +Files: src/ex_cmds2.c + +Patch 6.1.233 +Problem: ":help expr-||" does not work. +Solution: Don't use the '|' as a command separator +Files: src/ex_cmds.c + +Patch 6.1.234 (depends on 6.1.217) +Problem: Get a warning for using a negative value for st_dev. +Solution: Don't assign a negative value to st_dev. +Files: src/ex_cmds2.c + +Patch 6.1.235 (depends on 6.1.223) +Problem: 'iminsert' is changed from 1 to 2 when leaving Insert mode. (Peter + Valach) +Solution: Check "State" before resetting it to NORMAL. +Files: src/edit.c + +Patch 6.1.236 +Problem: Memory leaks when appending lines for ":diffget" or ":diffput" and + when reloading a changed buffer. +Solution: Free a line after calling ml_append(). +Files: src/diff.c, src/fileio.c + +Patch 6.1.237 +Problem: Putting in Visual block mode does not work correctly when "$" was + used or when the first line is short. (Christian Michon) +Solution: First delete the selected text and then put the new text. Save + and restore registers as necessary. +Files: src/globals.h, src/normal.c, src/ops.c, src/proto/ops.pro, + src/vim.h + +Patch 6.1.238 (extra) +Problem: Win32: The "icon=" argument for the ":menu" command does not + search for the bitmap file. +Solution: Expand environment variables and search for the bitmap file. + (Vince Negri) + Make it consistent, use the same mechanism for X11 and GTK. +Files: src/gui.c src/gui_gtk.c, src/gui_w32.c, src/gui_x11.c, + src/proto/gui.pro + +Patch 6.1.239 +Problem: Giving an error for missing :endif or :endwhile when being + interrupted. +Solution: Don't give these messages when interrupted. +Files: src/ex_docmd.c, src/os_unix.c + +Patch 6.1.240 (extra) +Problem: Win32 with BCC 5: CPU may be defined in the environment, which + causes a wrong argument for the compiler. (Walter Briscoe) +Solution: Use CPUNR instead of CPU. +Files: src/Make_bc5.mak + +Patch 6.1.241 +Problem: Something goes wrong when drawing or undrawing the cursor. +Solution: Remember when the cursor invalid in a better way. +Files: src/gui.c + +Patch 6.1.242 +Problem: When pasting a large number of lines on the command line it is not + possible to interrupt. (Jean Jordaan) +Solution: Check for an interrupt after each pasted line. +Files: src/ops.c + +Patch 6.1.243 (extra) +Problem: Win32: When the OLE version is started and wasn't registered, a + message pops up to suggest registering, even when this isn't + possible (when the registry is not writable). +Solution: Check if registering is possible before asking whether it should + be done. (Walter Briscoe) + Also avoid restarting Vim after registering. +Files: src/if_ole.cpp + +Patch 6.1.244 +Problem: Patch 6.1.237 was missing the diff for vim.h. (Igor Goldenberg) +Solution: Include it here. +Files: src/vim.h + +Patch 6.1.245 +Problem: Comparing with ignored case does not work properly for Unicode + with a locale where case folding an ASCII character results in a + multi-byte character. (Glenn Maynard) +Solution: Handle ignore-case compare for Unicode differently. +Files: src/mbyte.c + +Patch 6.1.246 +Problem: ":blast" goes to the first buffer if the last one is unlisted. + (Andrew Stryker) +Solution: From the last buffer search backwards for the first listed buffer + instead of forwards. +Files: src/ex_docmd.c + +Patch 6.1.247 +Problem: ACL support doesn't always work properly. +Solution: Add a configure argument to disable ACL "--disable-acl". (Thierry + Vignaud) +Files: src/auto/configure, src/configure.in + +Patch 6.1.248 +Problem: Typing 'q' at the more-prompt for ":let" does not quit the + listing. (Hari Krishna Dara) +Solution: Quit the listing when got_int is set. +Files: src/eval.c + +Patch 6.1.249 +Problem: Can't expand a path on the command line if it includes a "|" as a + trail byte of a multi-byte character. +Solution: Check for multi-byte characters. (Yasuhiro Matsumoto) +Files: src/ex_docmd.c + +Patch 6.1.250 +Problem: When changing the value of 'lines' inside the expression set with + 'diffexpr' Vim might crash. (Dave Fishburn) +Solution: Don't allow changing the screen size while updating the screen. +Files: src/globals.h, src/option.c, src/screen.c + +Patch 6.1.251 +Problem: Can't use completion for ":lcd" and ":lchdir" like ":cd". +Solution: Expand directory names for these commands. (Servatius Brandt) +Files: src/ex_docmd.c + +Patch 6.1.252 +Problem: "vi}" does not include a line break when the "}" is at the start + of a following line. (Kamil Burzynski) +Solution: Include the line break. +Files: src/search.c + +Patch 6.1.253 (extra) +Problem: Win32 with Cygwin: Changes the path of arguments in a wrong way. + (Xiangjiang Ma) +Solution: Don't use cygwin_conv_to_posix_path() for the Win32 version. + Update the Cygwin makefile to support more features. (Dan Sharp) +Files: src/Make_cyg.mak, src/if_ole.cpp, src/main.c + +Patch 6.1.254 +Problem: exists("foo{bar}") does not work. ':unlet v{"a"}r' does not work. + ":let v{a}r1 v{a}r2" does not work. ":func F{(1)}" does not work. + ":delfunc F{" does not give an error message. ':delfunc F{"F"}' + does not work. +Solution: Support magic braces for the exists() argument. (Vince Negri) + Check for trailing comments explicitly for ":unlet". Add support + for magic braces in further arguments of ":let". Look for a + parenthesis only after the function name. (Servatius Brandt) + Also expand magic braces for "exists('*expr')". Give an error + message for an invalid ":delfunc" argument. Allow quotes in the + ":delfunc" argument. +Files: src/eval.c, src/ex_cmds.h, src/ex_docmd.c + +Patch 6.1.255 (depends on 6.1.254) +Problem: Crash when loading menu.vim a second time. (Christian Robinson) + ":unlet garbage foo" tries unletting "foo" after an error message. + (Servatius Brandt) + Very long function arguments cause very long messages when + 'verbose' is 14 or higher. +Solution: Avoid reading from uninitialized memory. + Break out of a loop after an invalid argument for ":unlet". + Truncate long function arguments to 80 characters. +Files: src/eval.c + +Patch 6.1.256 (depends on 6.1.255) +Problem: Defining a function after ":if 0" could still cause an error + message for an existing function. + Leaking memory when there are trailing characters for ":delfunc". +Solution: Check the "skip" flag. Free the memory. (Servatius Brandt) +Files: src/eval.c + +Patch 6.1.257 +Problem: ":cwindow" always sets the previous window to the last but one + window. (Benji Fisher) +Solution: Set the previous window properly. +Files: src/globals.c, src/quickfix.c, src/window.c + +Patch 6.1.258 +Problem: Buffers menu doesn't work properly for multibyte buffer names. +Solution: Use a pattern to get the left and right part of the name. + (Yasuhiro Matsumoto) +Files: runtime/menu.vim + +Patch 6.1.259 (extra) +Problem: Mac: with 'patchmode' is used filenames are truncated. +Solution: Increase the BASENAMELEN for Mac OS X. (Ed Ralston) +Files: src/os_mac.h + +Patch 6.1.260 (depends on 6.1.104) +Problem: GCC 3.2 still seems to have an optimizer problem. (Zvi Har'El) +Solution: Use the same configure check as used for GCC 3.1. +Files: src/auto/configure, src/configure.in + +Patch 6.1.261 +Problem: When deleting a line in a buffer which is not the current buffer, + using the Perl interface Delete(), the cursor in the current + window may move. (Chris Houser) +Solution: Don't adjust the cursor position when changing another buffer. +Files: src/if_perl.xs + +Patch 6.1.262 +Problem: When jumping over folds with "z[", "zj" and "zk" the previous + position is not remembered. (Hari Krishna Dara) +Solution: Set the previous context mark before jumping. +Files: src/fold.c + +Patch 6.1.263 +Problem: When typing a multi-byte character that triggers an abbreviation + it is not inserted properly. +Solution: Handle adding the typed multi-byte character. (Yasuhiro Matsumoto) +Files: src/getchar.c + +Patch 6.1.264 (depends on patch 6.1.254) +Problem: exists() does not work for built-in functions. (Steve Wall) +Solution: Don't check for the function name to start with a capital. +Files: src/eval.c + +Patch 6.1.265 +Problem: libcall() can be used in 'foldexpr' to call any system function. + rename(), delete() and remote_send() can also be used in + 'foldexpr'. These are security problems. (Georgi Guninski) +Solution: Don't allow using libcall(), rename(), delete(), remote_send() and + similar functions in the sandbox. +Files: src/eval.c + +Patch 6.1.266 (depends on 6.1.265) +Problem: Win32: compile error in eval.c. (Bill McCarthy) +Solution: Move a variable declaration. +Files: src/eval.c + +Patch 6.1.267 +Problem: Using "p" to paste into a Visual selected area may cause a crash. +Solution: Allocate enough memory for saving the register contents. (Muraoka + Taro) +Files: src/ops.c + +Patch 6.1.268 +Problem: When triggering an abbreviation with a multi-byte character, this + character is not correctly inserted after expanding the + abbreviation. (Taro Muraoka) +Solution: Add ABBR_OFF to all characters above 0xff. +Files: src/edit.c, src/ex_getln.c, src/getchar.c + +Patch 6.1.269 +Problem: After using input() text written with ":redir" gets extra indent. + (David Fishburn) +Solution: Restore msg_col after using input(). +Files: src/ex_getln.c + +Patch 6.1.270 (depends on 6.1.260) +Problem: GCC 3.2.1 still seems to have an optimizer problem. +Solution: Use the same configure check as used for GCC 3.1. +Files: src/auto/configure, src/configure.in + +Patch 6.1.271 +Problem: When compiling without the +syntax feature there are errors. +Solution: Don't use some code for syntax highlighting. (Roger Cornelius) + Make test 45 work without syntax highlighting. + Also fix an error in a pattern matching: "\%(" was not supported. +Files: src/ex_cmds2.c, src/regexp.c, src/testdir/test45.in + +Patch 6.1.272 +Problem: After using ":set define<" a crash may happen. (Christian Robinson) +Solution: Make a copy of the option value in allocated memory. +Files: src/option.c + +Patch 6.1.273 +Problem: When the cursor doesn't blink, redrawing an exposed area may hide + the cursor. +Solution: Always draw the cursor, also when it didn't move. (Muraoka Taro) +Files: src/gui.c + +Patch 6.1.274 (depends on 6.1.210) +Problem: Resetting the iconv() state after each error is wrong for an + incomplete sequence. +Solution: Don't reset the iconv() state. +Files: src/fileio.c + +Patch 6.1.275 +Problem: When using "v" in a startup script, get warning message that + terminal cannot highlight. (Charles Campbell) +Solution: Only give the message after the terminal has been initialized. +Files: src/normal.c + +Patch 6.1.276 +Problem: "gvim --remote file" doesn't prompt for an encryption key. +Solution: The further characters the client sends to the server are used. + Added inputsave() and inputrestore() to allow prompting the + user directly and not using typeahead. + Also fix possible memory leak for ":normal". +Files: src/eval.c, src/ex_cmds2.c, src/ex_docmd.c, src/getchar.c, + src/main.c, src/proto/getchar.pro, src/proto/ui.pro, + src/runtime/doc/eval.txt, src/structs.h, src/ui.c, src/vim.h + +Patch 6.1.277 (depends on 6.1.276) +Problem: Compilation error when building with small features. +Solution: Define trash_input_buf() when needed. (Kelvin Lee) +Files: src/ui.c + +Patch 6.1.278 +Problem: When using signs the line number of a closed fold doesn't line up + with the other line numbers. (Kamil Burzynski) +Solution: Insert two spaces for the sign column. +Files: src/screen.c + +Patch 6.1.279 +Problem: The prototype for smsg() and smsg_attr() do not match the function + definition. This may cause trouble for some compilers. (Nix) +Solution: Use va_list for systems that have stdarg.h. Use "int" instead of + "void" for the return type. +Files: src/auto/configure, src/config.h.in, src/configure.in, + src/proto.h, src/message.c + +Patch 6.1.280 +Problem: It's possible to use an argument "firstline" or "lastline" for a + function but using "a:firstline" or "a:lastline" in the function + won't work. (Benji Fisher) +Solution: Give an error message for these arguments. + Also avoid that the following function body causes a whole row of + errors, skip over it after an error in the first line. +Files: src/eval.c + +Patch 6.1.281 +Problem: In Insert mode CTRL-X CTRL-G leaves the cursor after the ruler. +Solution: Set the cursor position before waiting for the argument of CTRL-G. + (Yasuhiro Matsumoto) +Files: src/edit.c + +Patch 6.1.282 +Problem: Elvis uses "se" in a modeline, Vim doesn't recognize this. +Solution: Also accept "se " where "set " is accepted in a modeline. + (Yasuhiro Matsumoto) +Files: src/buffer.c + +Patch 6.1.283 +Problem: For ":sign" the icon file name cannot contain a space. +Solution: Handle backslashes in the file name. (Yasuhiro Matsumoto) +Files: src/ex_cmds.c + +Patch 6.1.284 +Problem: On Solaris there is a warning for "struct utimbuf". +Solution: Move including "utime.h" to outside the function. (Derek Wyatt) +Files: src/fileio.c + +Patch 6.1.285 +Problem: Can't wipe out a buffer with 'bufhide' option. +Solution: Add "wipe" value to 'bufhide'. (Yegappan Lakshmanan) +Files: runtime/doc/options.txt, src/buffer.c, src/option.c, + src/quickfix.c + +Patch 6.1.286 +Problem: 'showbreak' cannot contain multi-byte characters. +Solution: Allow using all printable characters for 'showbreak'. +Files: src/charset.c, src/move.c, src/option.c + +Patch 6.1.287 (depends on 6.1.285) +Problem: Effect of "delete" and "wipe" in 'bufhide' were mixed up. +Solution: Wipe out when wiping out is asked for. +Files: src/buffer.c + +Patch 6.1.288 +Problem: ":silent function F" hangs. (Hari Krishna Dara) +Solution: Don't use msg_col, it is not incremented when using ":silent". + Also made the function output look a bit better. Don't translate + "function". +Files: src/eval.c + +Patch 6.1.289 (depends on 6.1.278) +Problem: Compiler warning for pointer. (Axel Kielhorn) +Solution: Add a typecast for " ". +Files: src/screen.c + +Patch 6.1.290 (extra) +Problem: Truncating long text for message box may break multi-byte + character. +Solution: Adjust to start of multi-byte character. (Yasuhiro Matsumoto) +Files: src/os_mswin.c + +Patch 6.1.291 (extra) +Problem: Win32: CTRL-@ doesn't work. Don't even get a message for it. +Solution: Recognize the keycode for CTRL-@. (Yasuhiro Matsumoto) +Files: src/gui_w48.c + +Patch 6.1.292 (extra, depends on 6.1.253) +Problem: Win32: Can't compile with new MingW compiler. + Borland 5 makefile doesn't generate pathdef.c. +Solution: Remove -wwide-multiply argument. (Rene de Zwart) + Various fixes for other problems in Win32 makefiles. (Dan Sharp) +Files: src/Make_bc5.mak, src/Make_cyg.mak, src/Make_ming.mak, + src/Make_mvc.mak + +Patch 6.1.293 +Problem: byte2line() returns a wrong result for some values. +Solution: Change ">=" to ">" in ml_find_line_or_offset(). (Bradford C Smith) + Add one to the line number when at the end of a block. +Files: src/memline.c + +Patch 6.1.294 +Problem: Can't include a multi-byte character in a string by its hex value. + (Benji Fisher) +Solution: Add "\u....": a character specified with up to four hex numbers + and stored according to the value of 'encoding'. +Files: src/eval.c + +Patch 6.1.295 (extra) +Problem: Processing the cs.po file generates an error. (Rahul Agrawal) +Solution: Fix the printf format characters in the translation. +Files: src/po/cs.po + +Patch 6.1.296 +Problem: Win32: When cancelling the font dialog 'guifont' remains set to + "*". +Solution: Restore the old value of 'guifont' (Yasuhiro Matsumoto) +Files: src/option.c + +Patch 6.1.297 +Problem: "make test" fails in test6 in an UTF-8 environment. (Benji Fisher) +Solution: Before executing the BufReadPost autocommands save the current + fileencoding, so that the file isn't marked changed. +Files: src/fileio.c + +Patch 6.1.298 +Problem: When using signs and the first line of a closed fold has a sign + it can be redrawn as if the fold was open. (Kamil Burzynski) +Solution: Don't redraw a sign inside a closed fold. +Files: src/screen.c + +Patch 6.1.299 +Problem: ":edit +set\ ro file" doesn't work. +Solution: Halve the number of backslashes in the "+cmd" argument. +Files: src/ex_docmd.c + +Patch 6.1.300 (extra) +Problem: Handling of ETO_IGNORELANGUAGE is confusing. +Solution: Clean up the handling of ETO_IGNORELANGUAGE. (Glenn Maynard) +Files: src/gui_w32.c + +Patch 6.1.301 (extra) +Problem: French translation of file-save dialog doesn't show file name. +Solution: Insert a star in the printf string. (Francois Terrot) +Files: src/po/fr.po + +Patch 6.1.302 +Problem: Counting lines of the Visual area is incorrect for closed folds. + (Mikolaj Machowski) +Solution: Correct the start and end for the closed fold. +Files: src/normal.c + +Patch 6.1.303 (extra) +Problem: The Top/Bottom/All text does not always fit in the ruler when + translated to Japanese. Problem with a character being wider when + in a bold font. +Solution: Use ETO_PDY to specify the width of each character. (Yasuhiro + Matsumoto) +Files: src/gui_w32.c + +Patch 6.1.304 (extra, depends on 6.1.292) +Problem: Win32: Postscript is always enabled in the MingW Makefile. + Pathdef.c isn't generated properly with Make_bc5.mak. (Yasuhiro + Matsumoto) +Solution: Change an ifdef to an ifeq. (Madoka Machitani) + Use the Borland make redirection to generate pathdef.c. (Maurice + Barnum) +Files: src/Make_bc5.mak, src/Make_ming.mak + +Patch 6.1.305 +Problem: When 'verbose' is 14 or higher, a function call may cause reading + uninitialized data. (Walter Briscoe) +Solution: Check for end-of-string in trunc_string(). +Files: src/message.c + +Patch 6.1.306 +Problem: The AIX VisualAge cc compiler doesn't define __STDC__. +Solution: Use __EXTENDED__ like __STDC__. (Jess Thrysoee) +Files: src/os_unix.h + +Patch 6.1.307 +Problem: When a double-byte character has an illegal tail byte the display + is messed up. (Yasuhiro Matsumoto) +Solution: Draw "XX" instead of the wrong character. +Files: src/screen.c + +Patch 6.1.308 +Problem: Can't reset the Visual mode returned by visualmode(). +Solution: Use an optional argument to visualmode(). (Charles Campbell) +Files: runtime/doc/eval.txt, src/eval.c, src/normal.c, + src/structs.h + +Patch 6.1.309 +Problem: The tutor doesn't select German if the locale name is + "German_Germany.1252". (Joachim Hofmann) +Solution: Check for "German" in the locale name. Also check for + ".ge". And include the German and Greek tutors. +Files: runtime/tutor/tutor.de, runtime/tutor/tutor.vim, + runtime/tutor/tutor.gr, runtime/tutor/tutor.gr.cp737 + +Patch 6.1.310 (depends on 6.1.307) +Problem: All double-byte characters are displayed as "XX". +Solution: Use ">= 32" instead of "< 32". (Yasuhiro Matsumoto) +Files: src/screen.c + +Patch 6.1.311 (extra) +Problem: VMS: path in window title doesn't include necessary separator. + file version doesn't always work properly with Unix. + Crashes because of memory overwrite in GUI. + Didn't always handle files with lowercase and correct path. +Solution: Fix the problems. Remove unnecessary file name translations. + (Zoltan Arpadffy) +Files: src/buffer.c, src/ex_cmds2.c, src/fileio.c, src/memline.c, + src/misc1.c, src/misc2.c, src/os_unix.c, src/os_vms.c, src/tag.c + +Patch 6.1.312 +Problem: When using ":silent" debugging is also done silently. +Solution: Disable silence while at the debug prompt. +Files: src/ex_cmds2.c + +Patch 6.1.313 +Problem: When a ":drop fname" command is used and "fname" is open in + another window, it is also opened in the current window. +Solution: Change to the window with "fname" instead. + Don't redefine the argument list when dropping only one file. +Files: runtime/doc/windows.txt, src/ex_cmds2.c, src/ex_cmds.c, + src/ex_docmd.c, src/proto/ex_cmds2.pro, src/proto/ex_docmd.pro + +Patch 6.1.314 (depends on 6.1.126) +Problem: Missing backslash in "Generic Config file" syntax menu. +Solution: Insert the backslash. (Zak Beck) +Files: runtime/makemenu.vim, runtime/synmenu.vim + +Patch 6.1.315 (extra) +Problem: A very long hostname may lead to an unterminated string. Failing + to obtain a hostname may result in garbage. (Walter Briscoe) +Solution: Add a NUL at the end of the hostname buffer. +Files: src/os_mac.c, src/os_msdos.c, src/os_unix.c, src/os_win16.c, + src/os_win32.c + +Patch 6.1.316 +Problem: When exiting with "wq" and there is a hidden buffer, after the + "file changed" dialog there is a warning for a changed buffer. + (Ajit Thakkar) +Solution: Do update the buffer timestamps when exiting. +Files: src/fileio.c + +Patch 6.1.317 +Problem: Closing a window may cause some of the remaining windows to be + positioned wrong if there is a mix of horizontal and vertical + splits. (Stefan Ingi Valdimarsson) +Solution: Update the frame sizes before updating the window positions. +Files: src/window.c + +Patch 6.1.318 +Problem: auto/pathdef.c can include wrong quotes when a compiler flag + includes quotes. +Solution: Put a backslash before the quotes in compiler flags. (Shinra Aida) +Files: src/Makefile + +Patch 6.1.319 (depends on 6.1.276) +Problem: Using "--remote +cmd file" does not execute "cmd". +Solution: Call inputrestore() in the same command line as inputsave(), + otherwise it will never get executed. +Files: src/main.c + +Patch 6.1.320 (depends on 6.1.313) +Problem: When a ":drop one\ file" command is used the file "one\ file" is + opened, the backslash is not removed. (Taro Muraoka) +Solution: Handle backslashes correctly. Always set the argument list to + keep it simple. +Files: runtime/doc/windows.txt, src/ex_cmds.c + +Patch 6.1.321 +Problem: When 'mouse' includes 'n' but not 'v', don't allow starting Visual + mode with the mouse. +Solution: Don't use MOUSE_MAY_VIS when there is no 'v' in 'mouse'. (Flemming + Madsen) +Files: src/normal.c + +Patch 6.1.322 (extra, depends on 6.1.315) +Problem: Win32: The host name is always "PC " plus the real host name. +Solution: Don't insert "PC " before the host name. +Files: src/os_win32.c + +Patch 6.1.323 +Problem: ":registers" doesn't stop listing for a "q" at the more prompt. + (Hari Krishna Dara) +Solution: Check for interrupt and got_int. +Files: src/ops.c, src/proto/ops.pro + +Patch 6.1.324 +Problem: Crash when dragging a vertical separator when <LeftMouse> is + remapped to jump to another window. +Solution: Pass the window pointer to the function doing the dragging instead + of always using the current window. (Daniel Elstner) + Also fix that starting a drag changes window focus. +Files: src/normal.c, src/proto/window.pro, src/ui.c, src/vim.h, + src/window.c + +Patch 6.1.325 +Problem: Shift-Tab is not automatically recognized in an xterm. +Solution: Add <Esc>[Z as the termcap code. (Andrew Pimlott) +Files: src/term.c + +Patch 6.1.326 +Problem: Using a search pattern may read from uninitialized data (Yasuhiro + Matsumoto) +Solution: Initialize pointers to NULL. +Files: src/regexp.c + +Patch 6.1.327 +Problem: When opening the "mbyte.txt" help file the utf-8 characters are + unreadable, because the fileencoding is forced to be latin1. +Solution: Check for utf-8 encoding first in help files. (Daniel Elstner) +Files: runtime/doc/mbyte.txt, src/fileio.c + +Patch 6.1.328 +Problem: Prototype for enc_canon_search() is missing. +Solution: Add the prototype. (Walter Briscoe) +Files: src/mbyte.c + +Patch 6.1.329 +Problem: When editing a file "a b c" replacing "%" in ":Cmd %" or ":next %" + does not work properly. (Hari Krishna Dara) +Solution: Always escape spaces when expanding "%". Don't split argument for + <f-args> in a user command when only one argument is used. +Files: src/ex_docmd.c + +Patch 6.1.330 +Problem: GTK, Motif and Athena: Keypad keys produce the same code as + non-keypad keys, making it impossible to map them separately. +Solution: Use different termcap codes for the keypad keys. (Neil Bird) +Files: src/gui_gtk_x11.c, src/gui_x11.c + +Patch 6.1.331 +Problem: When translating the help files, "LOCAL ADDITIONS" no longer marks + the spot where help files from plugins are to be listed. +Solution: Add a "local-additions" tag and use that to find the right spot. +Files: runtime/doc/help.txt, src/ex_cmds.c + +Patch 6.1.332 (extra) +Problem: Win32: Loading Perl dynamically doesn't work with Perl 5.8. + Perl 5.8 also does not work with Cygwin and Ming. +Solution: Adjust the function calls. (Taro Muraoka) + Adjust the cyg and ming makefiles. (Dan Sharp) +Files: src/Make_cyg.mak, src/Make_ming.mak, src/Make_mvc.mak, + src/if_perl.xs + +Patch 6.1.333 (extra) +Problem: Win32: Can't handle Unicode text on the clipboard. + Can't pass NUL byte, it becomes a line break. (Bruce DeVisser) +Solution: Support Unicode for the clipboard (Ron Aaron and Glenn Maynard) + Also support copy/paste of NUL bytes. +Files: src/os_mswin.c, src/os_win16.c src/os_win32.c + +Patch 6.1.334 (extra, depends on 6.1.303) +Problem: Problem with drawing Hebrew characters. +Solution: Only use ETO_PDY for Windows NT and the like. (Yasuhiro Matsumoto) +Files: src/gui_w32.c + +Patch 6.1.335 (extra) +Problem: Failure of obtaining the cursor position and window size is + ignored. +Solution: Remove a semicolon after an "if". (Walter Briscoe) +Files: src/gui_w32.c + +Patch 6.1.336 (extra) +Problem: Warning for use of function prototypes of smsg(). +Solution: Define HAVE_STDARG_H. (Walter Briscoe) +Files: src/os_win32.h + +Patch 6.1.337 +Problem: When using "finish" in debug mode in function B() for ":call + A(B())" does not stop after B() is finished. +Solution: Increase debug_level while evaluating a function. +Files: src/ex_docmd.c + +Patch 6.1.338 +Problem: When using a menu that checks out the current file from Insert + mode, there is no warning for the changed file until exiting + Insert mode. (Srikanth Sankaran) +Solution: Add a check for need_check_timestamps in the Insert mode loop. +Files: src/edit.c + +Patch 6.1.339 +Problem: Completion doesn't allow "g:" in ":let g:did_<Tab>". (Benji + Fisher) +Solution: Return "g:var" for global variables when that is what is being + expanded. (Flemming Madsen) +Files: src/eval.c + +Patch 6.1.340 (extra, depends on 6.1.332) +Problem: Win32: Can't compile the Perl interface with nmake. +Solution: Don't compare the version number as a string but as a number. + (Juergen Kraemer) +Files: src/Make_mvc.mak + +Patch 6.1.341 +Problem: In Insert mode with 'rightleft' set the cursor is drawn halfway a + double-wide character. For CTRL-R and CTRL-K in Insert mode the " + or ? is not displayed. +Solution: Draw the cursor in the next character cell. Display the " or ? + over the right half of the double-wide character. (Yasuhiro + Matsumoto) Also fix that cancelling a digraph doesn't redraw + a double-byte character correctly. +Files: src/edit.c, src/gui.c, src/mbyte.c + +Patch 6.1.342 (depends on 6.1.341) +Problem: With 'rightleft' set typing "c" on a double-wide character causes + the cursor to be displayed one cell to the left. +Solution: Draw the cursor in the next character cell. (Yasuhiro Matsumoto) +Files: src/gui.c + +Patch 6.1.343 (depends on 6.1.342) +Problem: Cannot compile with the +multi_byte feature but without +rightleft. + Cannot compile without the GUI. +Solution: Fix the #ifdefs. (partly by Nam SungHyun) +Files: src/gui.c, src/mbyte.c, src/ui.c + +Patch 6.1.344 +Problem: When using ":silent filetype" the output is still put in the + message history. (Hari Krishna Dara) +Solution: Don't add messages in the history when ":silent" is used. +Files: src/message.c + +Patch 6.1.345 (extra) +Problem: Win32: 'imdisable' doesn't work. +Solution: Make 'imdisable' work. (Yasuhiro Matsumoto) +Files: src/gui_w32.c + +Patch 6.1.346 +Problem: The scroll wheel can only scroll the current window. +Solution: Make the scroll wheel scroll the window that the mouse points to. + (Daniel Elstner) +Files: src/edit.c, src/gui.c, src/normal.c, src/term.c + +Patch 6.1.347 +Problem: When using cscope to list matching tags, the listed number is + sometimes not equal to what cscope uses. (Vihren Milev) +Solution: For cscope tags use only one table, don't give tags in the current + file a higher priority. +Files: src/tag.c + +Patch 6.1.348 +Problem: Wildmode with wildmenu: ":set wildmode=list,full", ":colorscheme + <tab>" results in "zellner" instead of the first entry. (Anand + Hariharan) +Solution: Don't call ExpandOne() from globpath(). (Flemming Madsen) +Files: src/ex_getln.c + +Patch 6.1.349 +Problem: "vim --serverlist" when no server was ever started gives an error + message without "\n". + "vim --serverlist" doesn't exit when the X server can't be + contacted, it starts Vim unexpectedly. (Ricardo Signes) +Solution: Don't give an error when no Vim server was ever started. + Treat failing of opening the display equal to errors inside the + remote*() functions. (Flemming Madsen) +Files: src/if_xcmdsrv.c, src/main.c + +Patch 6.1.350 +Problem: When entering a buffer with ":bnext" for the first time, using an + autocommand to restore the last used cursor position doesn't work. + (Paolo Giarusso) +Solution: Don't use the last known cursor position of the current Vim + invocation if an autocommand changed the position. +Files: src/buffer.c + +Patch 6.1.351 (depends on 6.1.349) +Problem: Crash when starting Vim the first time in an X server. (John + McGowan) +Solution: Don't call xFree() with a fixed string. +Files: src/if_xcmdsrv.c + +Patch 6.1.352 (extra, depends on 6.1.345) +Problem: Win32: Crash when setting "imdisable" in _vimrc. +Solution: Don't call IME functions when imm32.dll was not loaded (yet). + Also add typecasts to avoid Compiler warnings for + ImmAssociateContext() argument. +Files: src/gui_w32.c + +Patch 6.1.353 (extra, depends on 6.1.334) +Problem: Problem with drawing Arabic characters. +Solution: Don't use ETO_PDY, do use padding. +Files: src/gui_w32.c + +Patch 6.1.354 (extra, depends on 6.1.333) +Problem: MS-Windows 98: Notepad can't paste text copied from Vim when + 'encoding' is "utf-8". +Solution: Also make CF_TEXT available on the clipboard. (Ron Aaron) +Files: src/os_mswin.c + +Patch 6.1.355 +Problem: In a regexp '\n' will never match anything in a string. +Solution: Make '\n' match a newline character. +Files: src/buffer.c, src/edit.c, src/eval.c, src/ex_cmds2.c, + src/ex_docmd.c, src/ex_getln.c, src/fileio.c, src/misc1.c, + src/option.c, src/os_mac.c, src/os_unix.c, src/quickfix.c, + src/regexp.c, src/search.c, src/syntax.c, src/tag.c, src/vim.h + +Patch 6.1.356 (extra, depends on, well, eh, several others) +Problem: Compiler warnings for using convert_setup() and a few other + things. +Solution: Add typecasts. +Files: src/mbyte.c, src/os_mswin.c, src/proto/os_win32.pro, src/os_win32.c + +Patch 6.1.357 +Problem: CR in the quickfix window jumps to the error under the cursor, but + this doesn't work in Insert mode. (Srikanth Sankaran) +Solution: Handle CR in Insert mode in the quickfix window. +Files: src/edit.c + +Patch 6.1.358 +Problem: The tutor doesn't select another locale version properly. +Solution: Insert the "let" command. (Yasuhiro Matsumoto) +Files: runtime/tutor/tutor.vim + +Patch 6.1.359 (extra) +Problem: Mac Carbon: Vim doesn't get focus when started from the command + line. Crash when using horizontal scroll bar. +Solution: Set Vim as the frontprocess. Fix scrolling. (Peter Cucka) +Files: src/gui_mac.c + +Patch 6.1.360 (depends on 6.1.341) +Problem: In Insert mode CTRL-K ESC messes up a multi-byte character. + (Anders Helmersson) +Solution: Save all bytes of a character when displaying a character + temporarily. +Files: src/edit.c, src/proto/screen.pro, src/screen.c + +Patch 6.1.361 +Problem: Cannot jump to a file mark with ":'M". +Solution: Allow jumping to another file for a mark in an Ex address when it + is the only thing in the command line. +Files: src/ex_docmd.c + +Patch 6.1.362 +Problem: tgetent() may return zero for success. tgetflag() may return -1 + for an error. +Solution: Check tgetflag() for returning a positive value. Add an autoconf + check for the value that tgetent() returns. +Files: src/auto/configure, src/config.h.in, src/configure.in, src/term.c + +Patch 6.1.363 +Problem: byte2line() can return one more than the number of lines. +Solution: Return -1 if the offset is one byte past the end. +Files: src/memline.c + +Patch 6.1.364 +Problem: That the FileChangedShell autocommand event never nests makes it + difficult to reload a file in a normal way. +Solution: Allow nesting for the FileChangedShell event but do not allow + triggering itself again. + Also avoid autocommands for the cmdline window in rare cases. +Files: src/ex_getln.c, src/fileio.c, src/window.c + +Patch 6.1.365 (depends on 6.1.217) +Problem: Setting a breakpoint in a sourced file with a relative path name + doesn't work. (Servatius Brandt) +Solution: Expand the file name to a full path. +Files: src/ex_cmds2.c + +Patch 6.1.366 +Problem: Can't use Vim with Netbeans. +Solution: Add the Netbeans interface. Includes support for sign icons and + "-fg" and "-bg" arguments for GTK. Add the 'autochdir' + option. (Gordon Prieur, George Hernandez, Dave Weatherford) + Make it possible to display both a sign with a text and one with + line highlighting in the same line. + Add support for Agide, interface version 2.1. + Also fix that when 'iskeyword' includes '?' the "*" command + doesn't work properly on a word that includes "?" (Bill McCarthy): + Don't escape "?" to "\?" when searching forward. +Files: runtime/doc/Makefile, runtime/doc/netbeans.txt, + runtime/doc/options.txt, runtime/doc/various.txt, + src/Makefile, src/auto/configure, src/buffer.c, src/config.h.in, + src/config.mk.in, src/configure.in, src/edit.c, src/ex_cmds.c, + src/ex_docmd.c, src/feature.h, src/fileio.c, src/globals.h, + src/gui.c, src/gui_beval.c, src/gui_gtk_x11.c, src/gui_x11.c, + src/main.c, src/memline.c, src/misc1.c, src/misc2.c, src/move.c, + src/nbdebug.c, src/nbdebug.h, src/netbeans.c, src/normal.c, + src/ops.c, src/option.c, src/option.h, src/proto/buffer.pro, + src/proto/gui_beval.pro, src/proto/gui_gtk_x11.pro, + src/proto/gui_x11.pro, src/proto/misc2.pro, + src/proto/netbeans.pro, src/proto/normal.pro, src/proto/ui.pro, + src/proto.h, src/screen.c, src/structs.h, src/ui.c, src/undo.c, + src/vim.h, src/window.c, src/workshop.c + +Patch 6.1.367 (depends on 6.1.365) +Problem: Setting a breakpoint in a function doesn't work. For a sourced + file it doesn't work when symbolic links are involved. (Servatius + Brandt) +Solution: Expand the file name in the same way as do_source() does. Don't + prepend the path to a function name. +Files: src/ex_cmds2.c + +Patch 6.1.368 +Problem: Completion for ":map" does not include <silent> and <script>. + ":mkexrc" do not save the <silent> attribute of mappings. +Solution: Add "<silent>" to the generated map commands when appropriate. + (David Elstner) + Add <silent> and <script> to command line completion. +Files: src/getchar.c + +Patch 6.1.369 (extra) +Problem: VMS: Vim hangs when attempting to edit a read-only file in the + terminal. Problem with VMS filenames for quickfix. +Solution: Rewrite low level input. Remove version number from file name in + a couple more places. Fix crash after patch 6.1.362. Correct + return code for system(). (Zoltan Arpadffy, Tomas Stehlik) +Files: src/misc1.c, src/os_unix.c, src/os_vms.c, src/proto/os_vms.pro, + src/os_vms_conf.h, src/quickfix.c, src/ui.c + +Patch 6.1.370 +Problem: #ifdef nesting is unclear. +Solution: Insert spaces to indicate the nesting. +Files: src/os_unix.c + +Patch 6.1.371 +Problem: "%V" in 'statusline' doesn't show "0-1" in an empty line. +Solution: Add one to the column when comparing with virtual column (Andrew + Pimlott) +Files: src/buffer.c + +Patch 6.1.372 +Problem: With 16 bit ints there are compiler warnings. (Walter Briscoe) +Solution: Change int into long. +Files: src/structs.h, src/syntax.c + +Patch 6.1.373 +Problem: The default page header for printing is not translated. +Solution: Add _() around the two places where "Page" is used. (Mike + Williams) Translate the default value of the 'titleold' and + 'printheader' options. +Files: src/ex_cmds2.c, src/option.c + +Patch 6.1.374 (extra) +Problem: MS-Windows: Cannot build GvimExt with MingW or Cygwin. +Solution: Add makefile and modified resource files. (Rene de Zwart) + Also support Cygwin. (Alejandro Lopez_Valencia) +Files: GvimExt/Make_cyg.mak, GvimExt/Make_ming.mak, GvimExt/Makefile, + GvimExt/gvimext_ming.def, GvimExt/gvimext_ming.rc + +Patch 6.1.375 +Problem: MS-Windows: ':!dir "%"' does not work for a file name with spaces. + (Xiangjiang Ma) +Solution: Don't insert backslashes for spaces in a shell command. +Files: src/ex_docmd.c + +Patch 6.1.376 +Problem: "vim --version" and "vim --help" have a non-zero exit code. + That is unusual. (Petesea) +Solution: Use a zero exit code. +Files: src/main.c + +Patch 6.1.377 +Problem: Can't add words to 'lispwords' option. +Solution: Add P_COMMA and P_NODUP flags. (Haakon Riiser) +Files: src/option.c + +Patch 6.1.378 +Problem: When two buffer-local user commands are ambiguous, a full match + with a global user command isn't found. (Hari Krishna Dara) +Solution: Detect this situation and accept the global command. +Files: src/ex_docmd.c + +Patch 6.1.379 +Problem: Linux with kernel 2.2 can't use the alternate stack in combination + with threading, causes an infinite loop. +Solution: Don't use the alternate stack in this situation. +Files: src/os_unix.c + +Patch 6.1.380 +Problem: When 'winminheight' is zero and the quickfix window is zero lines, + entering the window doesn't make it higher. (Christian J. + Robinson) +Solution: Make sure the current window is at least one line high. +Files: src/window.c + +Patch 6.1.381 +Problem: When a BufWriteCmd is used and it leaves the buffer modified, the + window may still be closed. (Hari Krishna Dara) +Solution: Return FAIL from buf_write() when the buffer is still modified + after a BufWriteCmd autocommand was used. +Files: src/fileio.c + +Patch 6.1.382 (extra) +Problem: Win32 GUI: When using two monitors, the code that checks/fixes the + window size and position (e.g. when a font changes) doesn't work + properly. (George Reilly) +Solution: Handle a double monitor situation. (Helmut Stiegler) +Files: src/gui_w32.c + +Patch 6.1.383 +Problem: The filling of the status line doesn't work properly for + multi-byte characters. (Nam SungHyun) + There is no check for going past the end of the buffer. +Solution: Properly distinguish characters and bytes. Properly check for + running out of buffer space. +Files: src/buffer.c, src/ex_cmds2.c, src/proto/buffer.pro, src/screen.c + +Patch 6.1.384 +Problem: It is not possible to find if a certain patch has been included. + (Lubomir Host) +Solution: Support using has() to check if a patch was included. +Files: runtime/doc/eval.txt, src/eval.c, src/proto/version.pro, + src/version.c + +Patch 6.1.385 (depends on 6.1.383) +Problem: Can't compile without the multi-byte feature. +Solution: Move an #ifdef. (Christian J. Robinson) +Files: src/buffer.c + +Patch 6.1.386 +Problem: Get duplicate tags when running ":helptags". +Solution: Do the other halve of moving a section to another help file. +Files: runtime/tagsrch.txt + +Patch 6.1.387 (depends on 6.1.373) +Problem: Compiler warning for pointer cast. +Solution: Add (char_u *). +Files: src/option.c + +Patch 6.1.388 (depends on 6.1.384) +Problem: Compiler warning for pointer cast. +Solution: Add (char *). Only include has_patch() when used. +Files: src/eval.c, src/version.c + +Patch 6.1.389 (depends on 6.1.366) +Problem: Balloon evaluation doesn't work for GTK. + has("balloon_eval") doesn't work. +Solution: Add balloon evaluation for GTK. Also improve displaying of signs. + (Daniel Elstner) + Also make ":gui" start the netbeans connection and avoid using + netbeans functions when the connection is not open. +Files: src/Makefile, src/feature.h, src/gui.c, src/gui.h, + src/gui_beval.c, src/gui_beval.h, src/gui_gtk.c, + src/gui_gtk_x11.c, src/eval.c, src/memline.c, src/menu.c, + src/netbeans.c, src/proto/gui_beval.pro, src/proto/gui_gtk.pro, + src/structs.h, src/syntax.c, src/ui.c, src/workshop.c + +Patch 6.1.390 (depends on 6.1.389) +Problem: It's not possible to tell Vim to save and exit through the + Netbeans interface. Would still try to send balloon eval text + after the connection is closed. + Can't use Unicode characters for sign text. +Solution: Add functions "saveAndExit" and "getModified". Check for a + working connection before sending a balloonText event. + various other cleanups. + Support any character for sign text. (Daniel Elstner) +Files: runtime/doc/netbeans.txt, runtime/doc/sign.txt, src/ex_cmds.c, + src/netbeans.c, src/screen.c + +Patch 6.1.391 +Problem: ml_get() error when using virtualedit. (Charles Campbell) +Solution: Get a line from a specific window, not the current one. +Files: src/charset.c + +Patch 6.1.392 (depends on 6.1.383) +Problem: Highlighting in the 'statusline' is in the wrong position when an + item is truncated. (Zak Beck) +Solution: Correct the start of 'statusline' items properly for a truncated + item. +Files: src/buffer.c + +Patch 6.1.393 +Problem: When compiled with Python and threads, detaching the terminal may + cause Vim to loop forever. +Solution: Add -pthread to $CFLAGS when using Python and gcc. (Daniel + Elstner) +Files: src/auto/configure,, src/configure.in + +Patch 6.1.394 (depends on 6.1.390) +Problem: The netbeans interface doesn't recognize multibyte glyph names. +Solution: Check the number of cells rather than bytes to decide + whether a glyph name is not a filename. (Daniel Elstner) +Files: src/netbeans.c + +Patch 6.1.395 (extra, depends on 6.1.369) +Problem: VMS: OLD_VMS is never defined. Missing function prototype. +Solution: Define OLD_VMS in Make_vms.mms. Add vms_sys_status() to + os_vms.pro. (Zoltan Arpadffy) +Files: src/Make_vms.mms, src/proto/os_vms.pro + +Patch 6.1.396 (depends on 6.1.330) +Problem: Compiler warnings for using enum. +Solution: Add typecast to char_u. +Files: src/gui_gtk_x11.c, src/gui_x11.c + +Patch 6.1.397 (extra) +Problem: The install program may use a wrong path for the diff command if + there is a space in the install directory path. +Solution: Use double quotes around the path if necessary. (Alejandro + Lopez-Valencia) Also use double quotes around the file name + arguments. +Files: src/dosinst.c + +Patch 6.1.398 +Problem: Saving the typeahead for debug mode causes trouble for a test + script. (Servatius Brandt) +Solution: Add the ":debuggreedy" command to avoid saving the typeahead. +Files: runtime/doc/repeat.txt, src/ex_cmds.h, src/ex_cmds2.c, + src/ex_docmd.c, src/proto/ex_cmds2.pro + +Patch 6.1.399 +Problem: Warning for unused variable. +Solution: Remove the variable two_or_more. +Files: src/ex_cmds.c + +Patch 6.1.400 (depends on 6.1.381) +Problem: When a BufWriteCmd wipes out the buffer it may still be accessed. +Solution: Don't try accessing a buffer that has been wiped out. +Files: src/fileio.c + +Patch 6.1.401 (extra) +Problem: Building the Win16 version with Borland 5.01 doesn't work. + "make test" doesn't work with Make_dos.mak. (Walter Briscoe) +Solution: Various fixes to the w16 makefile. (Walter Briscoe) + Don't use deltree. Use "mkdir \tmp" instead of "mkdir /tmp". +Files: src/Make_w16.mak, src/testdir/Make_dos.mak + +Patch 6.1.402 +Problem: When evaluating a function name with curly braces, an error + is not handled consistently. +Solution: Accept the result of a curly braces expression when an + error was encountered. Skip evaluating an expression in curly + braces when skipping. (Servatius Brandt) +Files: src/eval.c + +Patch 6.1.403 (extra) +Problem: MS-Windows 16 bit: compiler warnings. +Solution: Add typecasts. (Walter Briscoe) +Files: src/ex_cmds2.c, src/gui_w48.c, src/os_mswin.c, src/os_win16.c, + src/syntax.c + +Patch 6.1.404 (extra) +Problem: Various small problems. +Solution: Fix comments. Various small additions, changes in indent, removal + of unused items and fixes. +Files: Makefile, README.txt, runtime/menu.vim, runtime/vimrc_example.vim, + src/INSTALL, src/INSTALLole.txt, src/Make_bc5.mak, + src/Make_cyg.mak, src/Make_ming.mak, src/Makefile, + src/config.h.in, src/edit.c, src/eval.c, src/ex_cmds2.c, + src/ex_docmd.c, src/ex_getln.c, src/fileio.c, src/getchar.c, + src/gui.c, src/gui_gtk.c, src/gui_photon.c, src/if_cscope.c, + src/if_python.c, src/keymap.h, src/mark.c, src/mbyte.c, + src/message.c, src/misc1.c, src/misc2.c, src/normal.c, + src/option.c, src/os_os2_cfg.h, src/os_win32.c, + src/proto/getchar.pro, src/proto/message.pro, + src/proto/regexp.pro, src/screen.c, src/structs.h, src/syntax.c, + src/term.c, src/testdir/test15.in, src/testdir/test15.ok, + src/vim.rc, src/xxd/Make_cyg.mak, src/xxd/Makefile + +Patch 6.1.405 +Problem: A few files are missing from the toplevel Makefile. +Solution: Add the missing files. +Files: Makefile + +Patch 6.1.406 (depends on 6.1.392) +Problem: When a statusline item doesn't fit arbitrary text appears. + (Christian J. Robinson) +Solution: When there is just enough room but not for the "<" truncate the + statusline item like there is no room. +Files: src/buffer.c + +Patch 6.1.407 +Problem: ":set scrollbind | help" scrollbinds the help window. (Andrew + Pimlott) +Solution: Reset 'scrollbind' when opening a help window. +Files: src/ex_cmds.c + +Patch 6.1.408 +Problem: When 'rightleft' is set unprintable character 0x0c is displayed as + ">c0<". +Solution: Reverse the text of the hex character. +Files: src/screen.c + +Patch 6.1.409 +Problem: Generating tags for the help doesn't work for some locales. +Solution: Set LANG=C LC_ALL=C in the environment for "sort". (Daniel + Elstner) +Files: runtime/doc/Makefile + +Patch 6.1.410 (depends on 6.1.390) +Problem: Linking error when compiling with Netbeans but without sign icons. + (Malte Neumann) +Solution: Don't define buf_signcount() when sign icons are unavailable. +Files: src/buffer.c + +Patch 6.1.411 +Problem: When 'virtualedit' is set, highlighting a Visual block beyond the + end of a line may be wrong. +Solution: Correct the virtual column when the end of the line is before the + displayed part of the line. (Muraoka Taro) +Files: src/screen.c + +Patch 6.1.412 +Problem: When swapping terminal screens and using ":gui" to start the GUI, + the shell prompt may be after a hit-enter prompt. +Solution: Output a newline in the terminal when starting the GUI and there + was a hit-enter prompt.. +Files: src/gui.c + +Patch 6.1.413 +Problem: When 'clipboard' contains "unnamed", "p" in Visual mode doesn't + work correctly. +Solution: Save the register before overwriting it and put the resulting text + on the clipboard afterwards. (Muraoka Taro) +Files: src/normal.c, src/ops.c + +Patch 6.1.414 (extra, depends on 6.1.369) +Problem: VMS: Vim busy waits when waiting for input. +Solution: Delay for a short while before getting another character. (Zoltan + Arpadffy) +Files: src/os_vms.c + +Patch 6.1.415 +Problem: When there is a vertical split and a quickfix window, reducing the + size of the Vim window may result in a wrong window layout and a + crash. +Solution: When reducing the window size and there is not enough space for + 'winfixheight' set the frame height to the larger height, so that + there is a retry while ignoring 'winfixheight'. (Yasuhiro + Matsumoto) +Files: src/window.c + +Patch 6.1.416 (depends on 6.1.366) +Problem: When using the Netbeans interface, a line with a sign cannot be + changed. +Solution: Respect the GUARDEDOFFSET for sign IDs when checking for a guarded + area. +Files: src/netbeans.c + +Patch 6.1.417 +Problem: Unprintable multi-byte characters are not handled correctly. + Multi-byte characters above 0xffff are displayed as another + character. +Solution: Handle unprintable multi-byte characters. Display multi-byte + characters above 0xffff with a marker. Recognize UTF-16 words and + BOM words as unprintable. (Daniel Elstner) +Files: src/charset.c, src/mbyte.c, src/screen.c + +Patch 6.1.418 +Problem: The result of strftime() is in the current locals. Need to + convert it to 'encoding'. +Solution: Obtain the current locale and convert the argument for strftime() + to it and the result back to 'encoding'. (Daniel Elstner) +Files: src/eval.c, src/ex_cmds.c, src/ex_cmds2.c, src/mbyte.c, + src/proto/mbyte.pro, src/option.c, src/os_mswin.c + +Patch 6.1.419 +Problem: Vim doesn't compile on AIX 5.1. +Solution: Don't define _NO_PROTO on this system. (Uribarri) +Files: src/auto/configure, src/configure.in + +Patch 6.1.420 (extra) +Problem: convert_input() has an unnecessary STRLEN(). + Conversion from UCS-2 to a codepage uses word count instead of + byte count. +Solution: Remove the STRLEN() call. (Daniel Elstner) + Always use byte count for string_convert(). +Files: src/gui_w32.c, src/mbyte.c + +Patch 6.1.421 (extra, depends on 6.1.354) +Problem: MS-Windows 9x: When putting text on the clipboard it can be in + the wrong encoding. +Solution: Convert text to the active codepage for CF_TEXT. (Glenn Maynard) +Files: src/os_mswin.c + +Patch 6.1.422 +Problem: Error in .vimrc doesn't cause hit-enter prompt when swapping + screens. (Neil Bird) +Solution: Set msg_didany also when sending a message to the terminal + directly. +Files: src/message.c + +Patch 6.1.423 +Problem: Can't find arbitrary text in help files. +Solution: Added the ":helpgrep" command. +Files: runtime/doc/various.txt, src/ex_cmds.h, src/ex_docmd.c, + src/proto/quickfix.pro, src/quickfix.c + +Patch 6.1.424 (extra) +Problem: Win32: Gvim compiled with VC++ 7.0 run on Windows 95 does not show + menu items. +Solution: Define $WINVER to avoid an extra item is added to MENUITEMINFO. + (Muraoka Taro) +Files: src/Make_mvc.mak + +Patch 6.1.425 +Problem: ":helptags $VIMRUNTIME/doc" does not add the "help-tags" tag. +Solution: Do add the "help-tags" tag for that specific directory. +Files: src/ex_cmds.c + +Patch 6.1.426 +Problem: "--remote-wait +cmd file" waits forever. (Valery Kondakoff) +Solution: Don't wait for the "+cmd" argument to have been edited. +Files: src/main.c + +Patch 6.1.427 +Problem: Several error messages for regexp patterns are not translated. +Solution: Use _() properly. (Muraoka Taro) +Files: src/regexp.c + +Patch 6.1.428 +Problem: FreeBSD: wait() may hang when compiled with Python support and + doing a system() call in a startup script. +Solution: Use waitpid() instead of wait() and poll every 10 msec, just like + what is done in the GUI. +Files: src/os_unix.c + +Patch 6.1.429 (depends on 6.1.390) +Problem: Crash when using showmarks.vim plugin. (Charles Campbell) +Solution: Check for sign_get_text() returning a NULL pointer. +Files: src/screen.c + +Patch 6.1.430 +Problem: In Lisp code backslashed parens should be ignored for "%". (Dorai) +Solution: Skip over backslashed parens. +Files: src/search.c + +Patch 6.1.431 +Problem: Debug commands end up in redirected text. +Solution: Disable redirection while handling debug commands. +Files: src/ex_cmds2.c + +Patch 6.1.432 (depends on 6.1.375) +Problem: MS-Windows: ":make %:p" inserts extra backslashes. (David Rennalls) +Solution: Don't add backslashes, handle it like ":!cmd". +Files: src/ex_docmd.c + +Patch 6.1.433 +Problem: ":popup" only works for Win32. +Solution: Add ":popup" support for GTK. (Daniel Elstner) +Files: runtime/doc/gui.txt, src/ex_docmd.c, src/gui_gtk.c, src/menu.c, + src/proto/gui_gtk.pro + +Patch 6.1.434 (extra) +Problem: Win32: When there are more than 32767 lines, the scrollbar has a + roundoff error. +Solution: Make a click on an arrow move one line. Also move the code to + gui_w48.c, there is hardly any difference between the 16 bit and + 32 bit versions. (Walter Briscoe) +Files: src/gui_w16.c, src/gui_w32.c, src/gui_w48.c + +Patch 6.1.435 +Problem: ":winsize x" resizes the Vim window to the minimal size. (Andrew + Pimlott) +Solution: Give an error message for wrong arguments of ":winsize" and + ":winpos". +Files: src/ex_docmd.c + +Patch 6.1.436 +Problem: When a long UTF-8 file contains an illegal byte it's hard to find + out where it is. (Ron Aaron) +Solution: Add the line number to the error message. +Files: src/fileio.c + +Patch 6.1.437 (extra, depends on 6.1.421) +Problem: Using multi-byte functions when they are not available. +Solution: Put the clipboard conversion inside an #ifdef. (Vince Negri) + Also fix a pointer type mistake. (Walter Briscoe) +Files: src/os_mswin.c + +Patch 6.1.438 +Problem: When Perl has thread support Vim cannot use the Perl interface. +Solution: Add a configure check and disable Perl when it will not work. + (Aron Griffis) +Files: src/auto/configure, src/configure.in + +Patch 6.1.439 +Problem: Netbeans: A "create" function doesn't actually create a buffer, + following functions may fail. +Solution: Create a Vim buffer without a name when "create" is called. + (Gordon Prieur) +Files: runtime/doc/netbeans.txt, src/netbeans.c + +Patch 6.1.440 +Problem: The "@*" command doesn't obtain the actual contents of the + clipboard. (Hari Krishna Dara) +Solution: Obtain the clipboard text before executing the command. +Files: src/ops.c + +Patch 6.1.441 +Problem: "zj" and "zk" cannot be used as a motion command after an + operator. (Ralf Hetzel) +Solution: Accept these commands as motion commands. +Files: src/normal.c + +Patch 6.1.442 +Problem: Unicode 3.2 defines more space and punctuation characters. +Solution: Add the new characters to the Unicode tables. (Raphael Finkel) +Files: src/mbyte.c + +Patch 6.1.443 (extra) +Problem: Win32: The gvimext.dll build with Borland 5.5 requires another + DLL. +Solution: Build a statically linked version by default. (Dan Sharp) +Files: GvimExt/Make_bc5.mak + +Patch 6.1.444 (extra) +Problem: Win32: Enabling a build with gettext support is not consistent. +Solution: Use "GETTEXT" for Borland and msvc makefiles. (Dan Sharp) +Files: src/Make_bc5.mak, src/Make_mvc.mak + +Patch 6.1.445 (extra) +Problem: DJGPP: get warning for argument of putenv() +Solution: Define HAVE_PUTENV to use DJGPP's putenv(). (Walter Briscoe) +Files: src/os_msdos.h + +Patch 6.1.446 (extra) +Problem: Win32: The MingW makefile uses a different style of arguments than + other makefiles. + Dynamic IME is not supported for Cygwin. +Solution: Use "no" and "yes" style arguments. Remove the use of the + dyn-ming.h include file. (Dan Sharp) + Do not include the ime.h file and adjust the makefile. (Alejandro + Lopez-Valencia) +Files: src/Make_cyg.mak, src/Make_ming.mak, src/gui_w32.c, + src/if_perl.xs, src/if_python.c, src/if_ruby.c, src/os_win32.c + +Patch 6.1.447 +Problem: "make install" uses "make" directly for generating help tags. +Solution: Use $(MAKE) instead of "make". (Tim Mooney) +Files: src/Makefile + +Patch 6.1.448 +Problem: 'titlestring' has a default maximum width of 50 chars per item. +Solution: Remove the default maximum (also for 'statusline'). +Files: src/buffer.c + +Patch 6.1.449 +Problem: When "1" and "a" are in 'formatoptions', auto-formatting always + moves a newly added character to the next line. (Servatius Brandt) +Solution: Don't move a single character to the next line when it was just + typed. +Files: src/edit.c + +Patch 6.1.450 +Problem: Termcap entry "kB" for back-tab is not recognized. +Solution: Use back-tab as the shift-tab code. +Files: src/keymap.h, src/misc2.c, src/term.c + +Patch 6.1.451 +Problem: GUI: When text in the find dialog contains a slash, a backslash is + inserted the next time it is opened. (Mezz) +Solution: Remove escaped backslashes and question marks. (Daniel Elstner) +Files: src/gui.c + +Patch 6.1.452 (extra, after 6.1.446) +Problem: Win32: IME support doesn't work for MSVC. +Solution: Use _MSC_VER instead of __MSVC. (Alejandro Lopez-Valencia) +Files: src/gui_w32.c + +Patch 6.1.453 (after 6.1.429) +Problem: When compiled without sign icons but with sign support, adding a + sign may cause a crash. +Solution: Check for the text sign to exist before using it. (Kamil + Burzynski) +Files: src/screen.c + +Patch 6.1.454 (extra) +Problem: Win32: pasting Russian text in Vim with 'enc' set to cp1251 + results in utf-8 bytes. (Perelyubskiy) + Conversion from DBCS to UCS2 does not work when 'encoding' is not + the active codepage. +Solution: Introduce enc_codepage and use it for conversion to 'encoding' + (Glenn Maynard) + Use MultiByteToWideChar() and WideCharToMultiByte() instead of + iconv(). Should do most needed conversions without iconv.dll. +Files: src/globals.h, src/gui_w32.c, src/mbyte.c, src/os_mswin.c, + src/proto/mbyte.pro, src/proto/os_mswin.pro, src/structs.h + +Patch 6.1.455 +Problem: Some Unicode characters can be one or two character cells wide. +Solution: Add the 'ambiwidth' option to tell Vim how to display these + characters. (Jungshik Shin) + Also reset the script ID when setting an option to its default + value, so that ":verbose set" won't give wrong info. +Files: runtime/doc/options.txt, src/mbyte.c, src/option.c, src/option.h + +Patch 6.1.456 (extra, after 6.1.454) +Problem: Win32: IME doesn't work. +Solution: ImmGetCompositionStringW() returns the size in bytes, not words. + (Yasuhiro Matsumoto) Also fix typecast problem. +Files: src/gui_w32.c, src/os_mswin.c + +Patch 6.1.457 +Problem: An empty register in viminfo causes conversion to fail. +Solution: Don't convert an empty string. (Yasuhiro Matsumoto) +Files: src/ex_cmds.c, src/mbyte.c + +Patch 6.1.458 +Problem: Compiler warning for pointer. +Solution: Add a typecast. +Files: src/ex_cmds.c + +Patch 6.1.459 (extra) +Problem: Win32: libcall() may return an invalid pointer and cause Vim to + crash. +Solution: Add a strict check for the returned pointer. (Bruce Mellows) +Files: src/os_mswin.c + +Patch 6.1.460 +Problem: GTK: after scrolling the text one line with a key, clicking the + arrow of the scrollbar does not always work. (Nam SungHyun) +Solution: Always update the scrollbar thumb when the value changed, even + when it would not move, like for RISCOS. (Daniel Elstner) +Files: src/gui.c, src/gui.h + +Patch 6.1.461 +Problem: When a keymap is active, typing a character in Select mode does + not use it. (Benji Fisher) +Solution: Apply Insert mode mapping to the character typed in Select mode. +Files: src/normal.c + +Patch 6.1.462 +Problem: When autocommands wipe out a buffer, a crash may happen. (Hari + Krishna Dara) +Solution: Don't decrement the window count of a buffer before calling the + autocommands for it. When re-using the current buffer, watch out + for autocommands changing the current buffer. +Files: src/buffer.c, src/ex_cmds.c, src/proto/buffer.pro + +Patch 6.1.463 +Problem: When writing a compressed file, the file name that gzip stores in + the file is the weird temporary file name. (David Rennalls) +Solution: Use the real file name when possible. +Files: runtime/plugin/gzip.vim + +Patch 6.1.464 +Problem: Crash when using C++ syntax highlighting. (Gerhard Hochholzer) +Solution: Check for a negative index. +Files: src/syntax.c + +Patch 6.1.465 (after 6.1.454) +Problem: Compile error when using cygwin. +Solution: Change #ifdef WIN32 to #ifdef WIN3264. (Alejandro Lopez-Valencia) + Undefine WIN32 after including windows.h +Files: src/mbyte.c + +Patch 6.1.466 +Problem: The "-f" argument is a bit obscure. +Solution: Add the "--nofork" argument. Improve the help text a bit. +Files: runtime/doc/starting.txt, src/main.c + +Patch 6.1.467 +Problem: Setting the window title doesn't work for Chinese. +Solution: Use an X11 function to convert text to a text property. (Kentaro + Nakazawa) +Files: src/os_unix.c + +Patch 6.1.468 +Problem: ":mksession" also stores folds for buffers which will not be + restored. +Solution: Only store folds for a buffer with 'buftype' empty and help files. +Files: src/ex_docmd.c + +Patch 6.1.469 +Problem: 'listchars' cannot contain multi-byte characters. +Solution: Handle multi-byte UTF-8 list characters. (Matthew Samsonoff) +Files: src/message.c, src/option.c, src/screen.c + +Patch 6.1.470 (lang) +Problem: Polish messages don't show up correctly on MS-Windows. +Solution: Convert messages to cp1250. (Mikolaj Machowski) + Also add English message translations, because it got in the way + of the patch. +Files: Makefile, src/po/Makefile, src/po/en_gb.po, src/po/pl.po + +Patch 6.1.471 +Problem: ":jumps" output continues after pressing "q" at the more-prompt. + (Hari Krishna Dara) +Solution: Check for "got_int" being set. +Files: src/mark.c + +Patch 6.1.472 +Problem: When there is an authentication error when connecting to the X + server Vim exits. +Solution: Use XSetIOErrorHandler() to catch the error and longjmp() to avoid + the exit. Also do this in the main loop, so that when the X + server exits a Vim running in a console isn't killed. +Files: src/globals.h, src/main.c, src/os_unix.c + +Patch 6.1.473 +Problem: Referring to $curwin or $curbuf in Perl 5.6 causes a crash. +Solution: Add "pTHX_" to cur_val(). (Yasuhiro Matsumoto) +Files: src/if_perl.xs + +Patch 6.1.474 +Problem: When opening the command-line window in Ex mode it's impossible to + go back. (Pavol Juhas) +Solution: Reset "exmode_active" and restore it when the command-line window + is closed. +Files: src/ex_getln.c + + +Patch 6.2f.001 +Problem: The configure check for Ruby didn't work properly for Ruby 1.8.0. +Solution: Change the way the Ruby check is done. (Aron Griffis) +Files: src/auto/configure, src/configure.in + +Patch 6.2f.002 +Problem: The output of ":ls" doesn't show whether a buffer had read errors. +Solution: Add the "x" flag in the ":ls" output. +Files: runtime/doc/windows.txt, src/buffer.c + +Patch 6.2f.003 +Problem: Test49 doesn't properly test the behavior of ":catch" without an + argument. +Solution: Update test49. (Servatius Brandt) +Files: src/testdir/test49.ok, src/testdir/test49.vim + +Patch 6.2f.004 +Problem: "vim --version" always uses CR/LF in the output. +Solution: Omit the CR. +Files: src/message.c, src/os_unix.c + +Patch 6.2f.005 +Problem: Two error messages without a colon after the number. +Solution: Add the colon. (Taro Muraoka) +Files: src/if_cscope.c + +Patch 6.2f.006 +Problem: When saving a file takes a while and Vim regains focus this can + result in a "file changed outside of Vim" warning and ml_get() + errors. (Mike Williams) +Solution: Add the "b_saving" flag to avoid checking the timestamp while the + buffer is being saved. (Michael Schaap) +Files: src/fileio.c, src/structs.h + +Patch 6.2f.007 +Problem: Irix compiler complains about multiple defined symbols. + vsnprintf() is not available. (Charles Campbell) +Solution: Insert EXTERN for variables in globals.h. Change the configure + check for vsnprintf() from compiling to linking. +Files: src/auto/configure, src/configure.in, src/globals.h + +Patch 6.2f.008 +Problem: The Aap recipe doesn't work with Aap 0.149. +Solution: Change targetarg to TARGETARG. Update the mysign file. +Files: src/main.aap, src/mysign + +Patch 6.2f.009 (extra) +Problem: Small problem when building with Borland 5.01. +Solution: Use mkdir() instead of _mkdir(). (Walter Briscoe) +Files: src/dosinst.h + +Patch 6.2f.010 +Problem: Warning for missing prototypes. +Solution: Add missing prototypes. (Walter Briscoe) +Files: src/if_cscope.c + +Patch 6.2f.011 +Problem: The configure script doesn't work with autoconf 2.5x. +Solution: Add square brackets around a header check. (Aron Griffis) + Note: touch src/auto/configure after applying this patch. +Files: src/configure.in + +Patch 6.2f.012 +Problem: ":echoerr" doesn't work correctly inside try/endtry. +Solution: Don't reset did_emsg inside a try/endtry. (Servatius Brandt) +Files: src/eval.c + +Patch 6.2f.013 (extra) +Problem: Macintosh: Compiler warning for a trigraph. +Solution: Insert a backslash before each question mark. (Peter Cucka) +Files: src/os_mac.h + +Patch 6.2f.014 (extra) +Problem: Macintosh: ex_eval is not included in the project file. +Solution: Add ex_eval. (Dany St-Amant) +Files: src/os_mac.pbproj/project.pbxproj + +Patch 6.2f.015 (extra) +Problem: Win32: When changing header files not all source files involved + are recompiled. +Solution: Improve the dependency rules. (Dan Sharp) +Files: src/Make_cyg.mak, src/Make_ming.mak + +Patch 6.2f.016 +Problem: "vim --version > ff" on non-Unix systems results in a file with a + missing line break at the end. (Bill McCArthy) +Solution: Add a line break. +Files: src/main.c + +Patch 6.2f.017 +Problem: Unix: starting Vim in the background and then bringing it to the + foreground may cause the terminal settings to be wrong. +Solution: Check for tcsetattr() to return an error, retry when it does. + (Paul Tapper) +Files: src/os_unix.c + +Patch 6.2f.018 +Problem: Mac OS X 10.2: OK is defined to zero in cursus.h while Vim uses + one. Redefining it causes a warning message. +Solution: Undefine OK before defining it to one. (Taro Muraoka) +Files: src/vim.h + +Patch 6.2f.019 +Problem: Mac OS X 10.2: COLOR_BLACK and COLOR_WHITE are defined in + curses.h. +Solution: Rename them to PRCOLOR_BLACK and PRCOLOR_WHITE. +Files: src/ex_cmds2.c + +Patch 6.2f.020 +Problem: Win32: test50 produces beeps and fails with some versions of diff. +Solution: Remove empty lines and convert the output to dos fileformat. +Files: src/testdir/test50.in + +Patch 6.2f.021 +Problem: Running configure with "--enable-netbeans" disables Netbeans. + (Gordon Prieur) +Solution: Fix the tests in configure.in where the default is to enable a + feature. Fix that "--enable-acl" reported "yes" confusingly. +Files: src/auto/configure, src/configure.in, src/mysign + +Patch 6.2f.022 +Problem: A bogus value for 'foldmarker' is not rejected, possibly causing a + hang. (Derek Wyatt) +Solution: Check for a non-empty string before and after the comma. +Files: src/option.c + +Patch 6.2f.023 +Problem: When the help files are not in $VIMRUNTIME but 'helpfile' is + correct Vim still can't find the help files. +Solution: Also look for a tags file in the directory of 'helpfile'. +Files: src/tag.c + +Patch 6.2f.024 +Problem: When 'delcombine' is set and a character has more than two + composing characters "x" deletes them all. +Solution: Always delete only the last composing character. +Files: src/misc1.c + +Patch 6.2f.025 +Problem: When reading a file from stdin that has DOS line endings but a + missing end-of-line for the last line 'fileformat' becomes "unix". + (Bill McCarthy) +Solution: Don't add the missing line break when re-reading the text from the + buffer. +Files: src/fileio.c + +Patch 6.2f.026 +Problem: When typing new text at the command line, old composing characters + may be displayed. +Solution: Don't read composing characters from after the end of the + text to be displayed. +Files: src/ex_getln.c, src/mbyte.c, src/message.c, src/proto/mbyte.pro, + src/screen.c + +Patch 6.2f.027 +Problem: Compiler warnings for unsigned char pointers. (Tony Leneis) +Solution: Add typecasts to char pointer. +Files: src/quickfix.c + +Patch 6.2f.028 +Problem: GTK: When 'imactivatekey' is empty and XIM is inactive it can't be + made active again. Cursor isn't updated immediately when changing + XIM activation. Japanese XIM may hang when using 'imactivatekey'. + Can't activate XIM after typing fFtT command or ":sh". +Solution: Properly set the flag that indicates the IM is active. Update the + cursor right away. Do not send a key-release event. Handle + Normal mode and running an external command differently. + (Yasuhiro Matsumoto) +Files: src/mbyte.c + +Patch 6.2f.029 +Problem: Mixing use of int and enum. +Solution: Adjust argument type of cs_usage_msg(). Fix wrong typedef. +Files: src/if_cscope.c, src/if_cscope.h + +Patch 6.2f.030 (after 6.2f.028) +Problem: Cursor moves up when using XIM. +Solution: Reset im_preedit_cursor. (Yasuhiro Matsumoto) +Files: src/mbyte.c + +Patch 6.2f.031 +Problem: Crash when listing a function argument in the debugger. (Ron Aaron) +Solution: Init the name field of an argument to NULL. +Files: src/eval.c + +Patch 6.2f.032 +Problem: When a write fails for a ":silent!" while inside try/endtry the + BufWritePost autocommands are not triggered. +Solution: Check the emsg_silent flag in should_abort(). (Servatius Brandt) +Files: src/ex_eval.c, src/testdir/test49.ok, src/testdir/test49.vim + +Patch 6.2f.033 +Problem: Cscope: re-entrance problem for ":cscope" command. Checking for + duplicate database didn't work well for Win95. Didn't check for + duplicate databases after an empty entry. +Solution: Don't set postponed_split too early. Remember first empty + database entry. (Sergey Khorev) +Files: src/if_cscope.c + +Patch 6.2f.034 +Problem: The netbeans interface cannot be used on systems without + vsnprintf(). (Tony Leneis) +Solution: Use EMSG(), EMSGN() and EMSG2() instead. +Files: src/auto/configure, src/configure.in, src/netbeans.c + +Patch 6.2f.035 +Problem: The configure check for the netbeans interface doesn't work if the + socket and nsl libraries are required. +Solution: Check for the socket and nsl libraries before the netbeans check. +Files: src/auto/configure, src/configure.in + +Patch 6.2f.036 +Problem: Moving leftwards over text with an illegal UTF-8 byte moves one + byte instead of one character. +Solution: Ignore an illegal byte after the cursor position. +Files: src/mbyte.c + +Patch 6.2f.037 +Problem: When receiving a Netbeans command at the hit-enter or more prompt + the screen is redrawn but Vim is still waiting at the prompt. +Solution: Quit the prompt like a CTRL-C was typed. +Files: src/netbeans.c + +Patch 6.2f.038 +Problem: The dependency to run autoconf causes a patch for configure.in + to run autoconf, even though the configure script was updated as + well. +Solution: Only run autoconf with "make autoconf". +Files: src/Makefile + +Patch 6.2f.039 +Problem: CTRL-W K makes the new top window very high. +Solution: When 'equalalways' is set equalize the window heights. +Files: src/window.c + + +============================================================================== +VERSION 6.3 *version-6.3* + +This section is about improvements made between version 6.2 and 6.3. + +This is mainly a bug-fix release. There are also a few new features. +The major number of new items is in the runtime files and translations. + + +Changed *changed-6.3* +------- + +The intro message also displays a note about sponsoring Vim, mixed randomly +with the message about helping children in Uganda. + +Included the translated menus, keymaps and tutors with the normal runtime +files. The separate "lang" archive now only contains translated messages. + +Made the translated menu file names a bit more consistent. Use "latin1" for +"iso_8859-1" and "iso_8859-15". + +Removed the "file_select.vim" script from the distribution. It's not more +useful than other scripts that can be downloaded from www.vim.org. + +The "runtime/doc/tags" file is now always in unix fileformat. On MS-Windows +it used to be dos fileformat, but ":helptags" generates a unix format file. + + +Added *added-6.3* +----- + +New commands: + :cNfile go to last error in previous file + :cpfile idem + :changes print the change list + :keepmarks following command keeps marks where they are + :keepjumps following command keeps jumplist and marks + :lockmarks following command keeps marks where they are + :redrawstatus force a redraw of the status line(s) + +New options: + 'antialias' Mac OS X: use smooth, antialiased fonts + 'helplang' preferred help languages + +Syntax files: + Arch inventory (Nikolai Weibull) + Calendar (Nikolai Weibull) + Ch (Wayne Cheng) + Controllable Regex Mutilator (Nikolai Weibull) + D (Jason Mills) + Desktop (Mikolaj Machowski) + Dircolors (Nikolai Weibull) + Elinks configuration (Nikolai Weibull) + FASM (Ron Aaron) + GrADS scripts (Stefan Fronzek) + Icewm menu (James Mahler) + LDIF (Zak Johnson) + Locale input, fdcc. (Dwayne Bailey) + Pinfo config (Nikolai Weibull) + Pyrex (Marco Barisione) + Relax NG Compact (Nikolai Weibull) + Slice (Morel Bodin) + VAX Macro Assembly (Tom Uijldert) + grads (Stefan Fronzek) + libao (Nikolai Weibull) + mplayer (Nikolai Weibull) + rst (Nikolai Weibull) + tcsh (Gautam Iyer) + yaml (Nikolai Weibull) + +Compiler plugins: + ATT dot (Marcos Macedo) + Apple Project Builder (Alexander von Below) + Intel (David Harrison) + bdf (Nikolai Weibull) + icc (Peter Puck) + javac (Doug Kearns) + neato (Marcos Macedo) + onsgmls (Robert B. Rowsome) + perl (Christian J. Robinson) + rst (Nikolai Weibull) + se (SmartEiffel) (Doug Kearns) + tcl (Doug Kearns) + xmlwf (Robert B. Rowsome) + +Filetype plugins: + Aap (Bram Moolenaar) + Ch (Wayne Cheng) + Css (Nikolai Weibull) + Pyrex (Marco Barisione) + Rst (Nikolai Weibull) + +Indent scripts: + Aap (Bram Moolenaar) + Ch (Wayne Cheng) + DocBook (Nikolai Weibull) + MetaPost (Eugene Minkovskii) + Objective-C (Kazunobu Kuriyama) + Pyrex (Marco Barisione) + Rst (Nikolai Weibull) + Tcsh (Gautam Iyer) + XFree86 configuration file (Nikolai Weibull) + Zsh (Nikolai Weibull) + +Keymaps: + Greek for cp1253 (Panagiotis Louridas) + Hungarian (Magyar) (Laszlo Zavaleta) + Persian-Iranian (Behnam Esfahbod) + +Message translations: + Catalan (Ernest Adrogue) + Russian (Vassily Ragosin) + Swedish (Johan Svedberg) + +Menu translations: + Catalan (Ernest Adrogue) + Russian (Tim Alexeevsky) + Swedish (Johan Svedberg) + +Tutor translations: + Catalan (Ernest Adrogue) + Russian in cp1251 (Alexey Froloff) + Slovak in cp1250 and iso8859-2 (Lubos Celko) + Swedish (Johan Svedberg) + Korean (Kee-Won Seo) + UTF-8 version of the Japanese tutor (Yasuhiro Matsumoto) Use this as + the original, create the other Japanese tutor by conversion. + +Included "russian.txt" help file. (Vassily Ragosin) + +Include Encapsulated PostScript and PDF versions of the Vim logo in the extra +archive. + +The help highlighting finds the highlight groups and shows them in the color +that is actually being used. (idea from Yakov Lerner) + +The big Win32 version is now compiled with Ruby interface, version 1.8. For +Python version 2.3 is used. For Perl version 5.8 is used. + +The "ftdetect" directory is mentioned in the documentation. The DOS install +program creates it. + + +Fixed *fixed-6.3* +----- + +Test 42 failed on MS-Windows. Set and reset 'fileformat' and 'binary' options +here and there. (Walter Briscoe) + +The explorer plugin didn't work for double-byte 'encoding's. + +Use "copy /y" in Make_bc5.mak to avoid a prompt for overwriting. + +Patch 6.2.001 +Problem: The ":stopinsert" command doesn't have a help tag. +Solution: Add the tag. (Antoine J. Mechelynck) +Files: runtime/doc/insert.txt, runtime/doc/tags + +Patch 6.2.002 +Problem: When compiled with the +multi_byte feature but without +eval, + displaying UTF-8 characters may cause a crash. (Karsten Hopp) +Solution: Also set the default for 'ambiwidth' when compiled without the + +eval feature. +Files: src/option.c + +Patch 6.2.003 +Problem: GTK 2: double-wide characters below 256 are not displayed + correctly. +Solution: Check the cell width for characters above 127. (Yasuhiro + Matsumoto) +Files: src/gui_gtk_x11.c + +Patch 6.2.004 +Problem: With a line-Visual selection at the end of the file a "p" command + puts the text one line upwards. +Solution: Detect that the last line was deleted and put forward. (Taro + Muraoka) +Files: src/normal.c + +Patch 6.2.005 +Problem: GTK: the "Find" and "Find and Replace" tools don't work. (Aschwin + Marsman) +Solution: Show the dialog after creating it. (David Necas) +Files: src/gui_gtk.c + +Patch 6.2.006 +Problem: The Netbeans code contains an obsolete function that uses "vim61" + and sets the fall-back value for $VIMRUNTIME. +Solution: Delete the obsolete function. +Files: src/main.c, src/netbeans.c, src/proto/netbeans.pro + +Patch 6.2.007 +Problem: Listing tags for Cscope doesn't always work. +Solution: Avoid using smgs_attr(). (Sergey Khorev) +Files: src/if_cscope.c + +Patch 6.2.008 +Problem: XIM with GTK 2: After backspacing preedit characters are wrong. +Solution: Reset the cursor position. (Yasuhiro Matsumoto) +Files: src/mbyte.c + +Patch 6.2.009 +Problem: Win32: The self-installing executable "Full" selection only + selects some of the items to install. (Salman Mohsin) +Solution: Change commas to spaces in between section numbers. +Files: nsis/gvim.nsi + +Patch 6.2.010 +Problem: When 'virtualedit' is effective and a line starts with a + multi-byte character, moving the cursor right doesn't work. +Solution: Obtain the right character to compute the column offset. (Taro + Muraoka) +Files: src/charset.c + +Patch 6.2.011 +Problem: Alpha OSF1: stat() is a macro and doesn't allow an #ifdef halfway. + (Moshe Kaminsky) +Solution: Move the #ifdef outside of stat(). +Files: src/os_unix.c + +Patch 6.2.012 +Problem: May hang when polling for a character. +Solution: Break the wait loop when not waiting for a character. +Files: src/os_unix.c + +Patch 6.2.013 (extra) +Problem: Win32: The registry key for uninstalling GvimExt still uses "6.1". +Solution: Change the version number to "6.2". (Ajit Thakkar) +Files: src/GvimExt/GvimExt.reg + +Patch 6.2.014 (after 6.2.012) +Problem: XSMP doesn't work when using poll(). +Solution: Use xsmp_idx instead of gpm_idx. (Neil Bird) +Files: src/os_unix.c + +Patch 6.2.015 +Problem: The +xsmp feature is never enabled. +Solution: Move the #define for USE_XSMP to below where WANT_X11 is defined. + (Alexey Froloff) +Files: src/feature.h + +Patch 6.2.016 +Problem: Using ":scscope find" with 'cscopequickfix' does not always split + the window. (Gary Johnson) + Win32: ":cscope add" could make the script that contains it + read-only until the corresponding ":cscope kill". + Errors during ":cscope add" may not be handled properly. +Solution: When using the quickfix window may need to split the window. + Avoid file handle inheritance for the script. + Check for a failed connection and/or process. (Sergey Khorev) +Files: src/ex_cmds2.c, src/if_cscope.c + +Patch 6.2.017 +Problem: Test11 sometimes prompts the user, because a file would have been + changed outside of Vim. (Antonio Colombo) +Solution: Add a FileChangedShell autocommand to avoid the prompt. +Files: src/testdir/test11.in + +Patch 6.2.018 +Problem: When using the XSMP protocol and reading from stdin Vim may wait + for a key to be pressed. +Solution: Avoid that RealWaitForChar() is used recursively. +Files: src/os_unix.c + +Patch 6.2.019 (lang) +Problem: Loading the Portuguese menu causes an error message. +Solution: Join two lines. (Jose Pedro Oliveira, José de Paula) +Files: runtime/lang/menu_pt_br.vim + +Patch 6.2.020 +Problem: The "Syntax/Set syntax only" menu item causes an error message. + (Oyvind Holm) +Solution: Set the script-local variable in a function. (Benji Fisher) +Files: runtime/synmenu.vim + +Patch 6.2.021 +Problem: The user manual section on exceptions contains small mistakes. +Solution: Give a good example of an error that could be missed and other + improvements. (Servatius Brandt) +Files: runtime/doc/usr_41.txt + +Patch 6.2.022 (extra) +Problem: Win32: After deleting a menu item it still appears in a tear-off + window. +Solution: Set the mode to zero for the deleted item. (Yasuhiro Matsumoto) +Files: src/gui_w32.c + +Patch 6.2.023 (extra) +Problem: Win32: Make_ivc.mak does not clean everything. +Solution: Delete more files in the clean rule. (Walter Briscoe) +Files: src/Make_ivc.mak + +Patch 6.2.024 (extra) +Problem: Win32: Compiler warnings for typecasts. +Solution: Use DWORD instead of WORD. (Walter Briscoe) +Files: src/gui_w32.c + +Patch 6.2.025 +Problem: Missing prototype for sigaltstack(). +Solution: Add the prototype when it is not found in a header file. +Files: src/os_unix.c + +Patch 6.2.026 +Problem: Warning for utimes() argument. +Solution: Add a typecast. +Files: src/fileio.c + +Patch 6.2.027 +Problem: Warning for uninitialized variable. +Solution: Set mb_l to one when not using multi-byte characters. +Files: src/message.c + +Patch 6.2.028 +Problem: Cscope connection may kill Vim process and others. +Solution: Check for pid being larger than one. (Khorev Sergey) +Files: src/if_cscope.c + +Patch 6.2.029 +Problem: When using the remote server functionality Vim may leak memory. + (Srikanth Sankaran) +Solution: Free the result of XListProperties(). +Files: src/if_xcmdsrv.c + +Patch 6.2.030 +Problem: Mac: Warning for not being able to use precompiled header files. +Solution: Don't redefine select. Use -no-cpp-precomp for compiling, so that + function prototypes are still found. +Files: src/os_unix.c, src/osdef.sh + +Patch 6.2.031 +Problem: The langmenu entry in the options window doesn't work. (Rodolfo + Lima) + With GTK 1 the ":options" command causes an error message. + (Michael Naumann) +Solution: Change "lmenu" to "langmenu". Only display the 'tbis' option for + GTK 2. +Files: runtime/optwin.vim + +Patch 6.2.032 +Problem: The lpc filetype is never recognized. (Shizhu Pan) +Solution: Check for g:lpc_syntax_for_c instead of the local variable + lpc_syntax_for_c. (Benji Fisher) +Files: runtime/filetype.vim + +Patch 6.2.033 (extra) +Problem: Mac: Various compiler warnings. +Solution: Don't include Classic-only headers in Unix version. + Remove references to several unused variables. (Ben Fowler) + Fix double definition of DEFAULT_TERM. + Use int instead of unsigned short for pixel values, so that the + negative error values are recognized. +Files: src/gui_mac.c, src/term.c + +Patch 6.2.034 +Problem: Mac: Compiler warning for redefining DEFAULT_TERM. +Solution: Fix double definition of DEFAULT_TERM. +Files: src/term.c + +Patch 6.2.035 +Problem: Mac: Compiler warnings in Python interface. +Solution: Make a difference between pure Mac and Unix-Mac. (Peter Cucka) +Files: src/if_python.c + +Patch 6.2.036 (extra) +Problem: Mac Unix version: If foo is a directory, then ":e f<Tab>" should + expand to ":e foo/" instead of ":e foo" . (Vadim Zeitlin) +Solution: Define DONT_ADD_PATHSEP_TO_DIR only for pure Mac. (Benji Fisher) +Files: src/os_mac.h + +Patch 6.2.037 +Problem: Win32: converting an encoding name to a codepage could result in + an arbitrary number. +Solution: make encname2codepage() return zero if the encoding name doesn't + contain a codepage number. +Files: src/mbyte.c + +Patch 6.2.038 (extra) +Problem: Warning messages when using the MingW compiler. (Bill McCarthy) + Can't compile console version without +mouse feature. +Solution: Initialize variables, add parenthesis. + Add an #ifdef around g_nMouseClick. (Ajit Thakkar) +Files: src/eval.c, src/os_win32.c, src/gui_w32.c, src/dosinst.c + +Patch 6.2.039 (extra) +Problem: More warning messages when using the MingW compiler. +Solution: Initialize variables. (Bill McCarthy) +Files: src/os_mswin.c + +Patch 6.2.040 +Problem: FreeBSD: Crash while starting up when compiled with +xsmp feature. +Solution: Pass a non-NULL argument to IceAddConnectionWatch(). +Files: src/os_unix.c + +Patch 6.2.041 (extra, after 6.2.033) +Problem: Mac: Compiler warnings for conversion types, missing prototype, + missing return type. +Solution: Change sscanf "%hd" to "%d", the argument is an int now. Add + gui_mch_init_check() prototype. Add "int" to termlib functions. +Files: src/gui_mac.c, src/proto/gui_mac.pro, src/termlib.c. + +Patch 6.2.042 (extra) +Problem: Cygwin: gcc 3.2 has an optimizer problem, sometimes causing a + crash. +Solution: Add -fno-strength-reduce to the compiler arguments. (Dan Sharp) +Files: src/Make_cyg.mak + +Patch 6.2.043 +Problem: Compiling with both netbeans and workshop doesn't work. +Solution: Move the shellRectangle() function to gui_x11.c. (Gordon Prieur) +Files: src/gui_x11.c, src/integration.c, src/netbeans.c, + src/proto/netbeans.pro + +Patch 6.2.044 +Problem: ":au filetypedetect" gives an error for a non-existing event name, + but it's actually a non-existing group name. (Antoine Mechelynck) +Solution: Make the error message clearer. +Files: src/fileio.c + +Patch 6.2.045 +Problem: Obtaining the '( mark changes the '' mark. (Gary Holloway) +Solution: Don't set the '' mark when searching for the start/end of the + current sentence/paragraph. +Files: src/mark.c + +Patch 6.2.046 +Problem: When evaluating an argument of a function throws an exception the + function is still called. (Hari Krishna Dara) +Solution: Don't call the function when an exception was thrown. +Files: src/eval.c + +Patch 6.2.047 (extra) +Problem: Compiler warnings when using MingW. (Bill McCarthy) +Solution: Give the s_dwLastClickTime variable a type. Initialize dwEndTime. +Files: src/os_win32.c + +Patch 6.2.048 +Problem: The Python interface doesn't compile with Python 2.3 when + dynamically loaded. +Solution: Use dll_PyObject_Malloc and dll_PyObject_Free. (Paul Moore) +Files: src/if_python.c + +Patch 6.2.049 +Problem: Using a "-range=" argument with ":command" doesn't work and + doesn't generate an error message. +Solution: Generate an error message. +Files: src/ex_docmd.c + +Patch 6.2.050 +Problem: Test 32 didn't work on MS-Windows. +Solution: Write the temp file in Unix fileformat. (Walter Briscoe) +Files: src/testdir/test32.in + +Patch 6.2.051 +Problem: When using "\=submatch(0)" in a ":s" command, line breaks become + NUL characters. +Solution: Change NL to CR characters, so that they become line breaks. +Files: src/regexp.c + +Patch 6.2.052 +Problem: A few messages are not translated. +Solution: Add _() to the messages. (Muraoka Taro) +Files: src/ex_cmds.c + +Patch 6.2.053 +Problem: Prototype for bzero() doesn't match most systems. +Solution: Use "void *" instead of "char *" and "size_t" instead of "int". +Files: src/osdef1.h.in + +Patch 6.2.054 +Problem: A double-byte character with a second byte that is a backslash + causes problems inside a string. +Solution: Skip over multi-byte characters in a string properly. (Yasuhiro + Matsumoto) +Files: src/eval.c + +Patch 6.2.055 +Problem: Using col('.') from CTRL-O in Insert mode does not return the + correct value for multi-byte characters. +Solution: Correct the cursor position when it is necessary, move to the + first byte of a multi-byte character. (Yasuhiro Matsumoto) +Files: src/edit.c + +Patch 6.2.056 (extra) +Problem: Building with Sniff++ doesn't work. +Solution: Use the multi-threaded libc when needed. (Holger Ditting) +Files: src/Make_mvc.mak + +Patch 6.2.057 (extra) +Problem: Mac: With -DMACOS_X putenv() is defined twice, it is in a system + library. Get a warning for redefining OK. Unused variables in + os_mac.c +Solution: Define HAVE_PUTENV. Undefine OK after including curses.h. + Remove declarations for unused variables. +Files: src/os_mac.c, src/os_mac.h, src/vim.h + +Patch 6.2.058 +Problem: When 'autochdir' is set ":bnext" to a buffer without a name causes + a crash. +Solution: Don't call vim_chdirfile() when the file name is NULL. (Taro + Muraoka) +Files: src/buffer.c + +Patch 6.2.059 +Problem: When 'scrolloff' is a large number and listing completion results + on the command line, then executing a command that jumps close to + where the cursor was before, part of the screen is not updated. + (Yakov Lerner) +Solution: Don't skip redrawing part of the window when it was scrolled. +Files: src/screen.c + +Patch 6.2.060 (extra) +Problem: Win32: When 'encoding' is set to "iso-8859-7" copy/paste to/from + the clipboard gives a lalloc(0) error. (Kriton Kyrimis) +Solution: When the string length is zero allocate one byte. Also fix that + when the length of the Unicode text is zero (conversion from + 'encoding' to UCS-2 was not possible) the normal text is used. +Files: src/os_mswin.c + +Patch 6.2.061 +Problem: GUI: Using the left mouse button with the shift key should work + like "*" but it scrolls instead. (Martin Beller) +Solution: Don't recognize an rxvt scroll wheel event when using the GUI. +Files: src/term.c + +Patch 6.2.062 +Problem: When one buffer uses a syntax with "containedin" and another + buffer does not, redrawing depends on what the current buffer is. + (Brett Pershing Stahlman) +Solution: Use "syn_buf" instead of "curbuf" to get the b_syn_containedin + flag. +Files: src/syntax.c + +Patch 6.2.063 +Problem: When using custom completion end up with no matches. +Solution: Make cmd_numfiles and cmd_files local to completion to avoid that + they are overwritten when ExpandOne() is called recursively by + f_glob(). +Files: src/eval.c, src/ex_docmd.c, src/ex_getln.c, src/proto/ex_getln.pro, + src/misc1.c, src/structs.h, src/tag.c + +Patch 6.2.064 +Problem: resolve() only handles one symbolic link, need to repeat it to + resolve all of them. Then need to simplify the file name. +Solution: Make resolve() resolve all symbolic links and simplify the result. + Add simplify() to just simplify a file name. Fix that test49 + doesn't work if /tmp is a symbolic link. (Servatius Brandt) +Files: runtime/doc/eval.txt, src/eval.c, src/tag.c, + src/testdir/test49.vim + +Patch 6.2.065 +Problem: ":windo 123" only updates other windows when entering them. + (Walter Briscoe) +Solution: Update the topline before going to the next window. +Files: src/ex_cmds2.c + +Patch 6.2.066 (extra) +Problem: Ruby interface doesn't work with Ruby 1.8.0. +Solution: Change "defout" to "stdout". (Aron Griffis) + Change dynamic loading. (Taro Muraoka) +Files: src/if_ruby.c, src/Make_mvc.mak + +Patch 6.2.067 +Problem: When searching for a string that starts with a composing character + the command line isn't drawn properly. +Solution: Don't count the space to draw the composing character on and + adjust the cursor column after drawing the string. +Files: src/message.c + +Patch 6.2.068 +Problem: Events for the netbeans interface that include a file name with + special characters don't work properly. +Solution: Use nb_quote() on the file name. (Sergey Khorev) +Files: src/netbeans.c + +Patch 6.2.069 (after 6.2.064) +Problem: Unused variables "limit" and "new_st" and unused label "fail" in + some situation. (Bill McCarthy) +Solution: Put the declarations inside an #ifdef. (Servatius Brandt) +Files: src/eval.c, src/tag.c + +Patch 6.2.070 (after 6.2.069) +Problem: Still unused variable "new_st". (Bill McCarthy) +Solution: Move the declaration to the right block this time. +Files: src/tag.c + +Patch 6.2.071 +Problem: 'statusline' can only contain 50 % items. (Antony Scriven) +Solution: Allow 80 items and mention it in the docs. +Files: runtime/doc/option.txt, src/vim.h + +Patch 6.2.072 +Problem: When using expression folding, foldexpr() mostly returns -1 for + the previous line, which makes it difficult to write a fold + expression. +Solution: Make the level of the previous line available while still looking + for the end of a fold. +Files: src/fold.c + +Patch 6.2.073 +Problem: When adding detection of a specific filetype for a plugin you need + to edit "filetype.vim". +Solution: Source files from the "ftdetect" directory, so that a filetype + detection plugin only needs to be dropped in a directory. +Files: runtime/doc/filetype.txt, runtime/doc/usr_05.txt, + runtime/doc/usr_41.txt, runtime/filetype.vim + +Patch 6.2.074 +Problem: Warnings when compiling the Python interface. (Ajit Thakkar) +Solution: Use ANSI function declarations. +Files: src/if_python.c + +Patch 6.2.075 +Problem: When the temp file for writing viminfo can't be used "NULL" + appears in the error message. (Ben Lavender) +Solution: Print the original file name when there is no temp file name. +Files: src/ex_cmds.c + +Patch 6.2.076 +Problem: The tags listed for cscope are in the wrong order. (Johannes + Stezenbach) +Solution: Remove the reordering of tags for the current file. (Sergey + Khorev) +Files: src/if_cscope.c + +Patch 6.2.077 +Problem: When a user function specifies custom completion, the function + gets a zero argument instead of an empty string when there is no + word before the cursor. (Preben Guldberg) +Solution: Don't convert an empty string to a zero. +Files: src/eval.c + +Patch 6.2.078 +Problem: "make test" doesn't work if Vim wasn't compiled yet. (Ed Avis) +Solution: Build Vim before running the tests. +Files: src/Makefile + +Patch 6.2.079 +Problem: ":w ++enc=utf-8 !cmd" doesn't work. +Solution: Check for the "++" argument before the "!". +Files: src/ex_docmd.c + +Patch 6.2.080 +Problem: When 't_ti' is not empty but doesn't swap screens, using "ZZ" in + an unmodified file doesn't clear the last line. +Solution: Call msg_clr_eos() when needed. (Michael Schroeder) +Files: src/os_unix.c + +Patch 6.2.081 +Problem: Problem when using a long multibyte string for the statusline. +Solution: Use the right pointer to get the cell size. (Taro Muraoka) +Files: src/buffer.c + +Patch 6.2.082 +Problem: Can't compile with Perl 5.8.1. +Solution: Rename "e_number" to "e_number_exp". (Sascha Blank) +Files: src/digraph.c, src/globals.h + +Patch 6.2.083 +Problem: When a compiler uses ^^^^ to mark a word the information is not + visible in the quickfix window. (Srikanth Sankaran) +Solution: Don't remove the indent for a line that is not recognized as an + error message. +Files: src/quickfix.c + +Patch 6.2.084 +Problem: "g_" in Visual mode always goes to the character after the line. + (Jean-Rene David) +Solution: Ignore the NUL at the end of the line. +Files: src/normal.c + +Patch 6.2.085 +Problem: ":verbose set ts" doesn't say an option was set with a "-c" or + "--cmd" argument. +Solution: Remember the option was set from a Vim argument. +Files: src/main.c, src/ex_cmds2.c, src/vim.h + +Patch 6.2.086 +Problem: "{" and "}" stop inside a closed fold. +Solution: Only stop once inside a closed fold. (Stephen Riehm) +Files: src/search.c + +Patch 6.2.087 +Problem: CTRL-^ doesn't use the 'confirm' option. Same problem with + ":bnext". (Yakov Lerner) +Solution: Put up a dialog for a changed file when 'confirm' is set in more + situations. +Files: src/buffer.c, src/ex_cmds.c + +Patch 6.2.088 +Problem: When 'sidescrolloff' is set 'showmatch' doesn't work correctly if + the match is less than 'sidescrolloff' off from the side of the + window. (Roland Stahn) +Solution: Set 'sidescrolloff' to zero while displaying the match. +Files: src/search.c + +Patch 6.2.089 +Problem: ":set isk+=" adds a comma. (Mark Waggoner) +Solution: Don't add a comma when the added value is empty. +Files: src/option.c + +Patch 6.2.090 (extra) +Problem: Win32: MingW compiler complains about #pragmas. (Bill McCarthy) +Solution: Put an #ifdef around the #pragmas. +Files: src/os_win32.c + +Patch 6.2.091 +Problem: When an autocommand is triggered when a file is dropped on Vim and + it produces output, messages from a following command may be + scrolled unexpectedly. (David Rennalls) +Solution: Save and restore msg_scroll in handle_drop(). +Files: src/ex_docmd.c + +Patch 6.2.092 +Problem: Invalid items appear in the help file tags. (Antonio Colombo) +Solution: Only accept tags with white space before the first "*". +Files: runtime/doc/doctags.c, src/ex_cmds.c + +Patch 6.2.093 +Problem: ":nnoremenu" also defines menu for Visual mode. (Klaus Bosau) +Solution: Check the second command character for an "o", not the third. +Files: src/menu.c + +Patch 6.2.094 +Problem: Can't compile with GTK and tiny features. +Solution: Include handle_drop() and vim_chdirfile() when FEAT_DND is defined. + Do not try to split the window. +Files: src/ex_docmd.c, src/misc2.c + +Patch 6.2.095 +Problem: The message "Cannot go to buffer x" is confusing for ":buf 6". + (Frans Englich) +Solution: Make it "Buffer x does not exist". +Files: src/buffer.c + +Patch 6.2.096 +Problem: Win32: ":let @* = ''" put a newline on the clipboard. (Klaus + Bosau) +Solution: Put zero bytes on the clipboard for an empty string. +Files: src/ops.c + +Patch 6.2.097 +Problem: Setting or resetting 'insertmode' in a BufEnter autocommand + doesn't always have immediate effect. (Nagger) +Solution: When 'insertmode' is set, set need_start_insertmode, when it's + reset set stop_insert_mode. +Files: src/option.c + +Patch 6.2.098 (after 6.2.097) +Problem: Can't build Vim with tiny features. (Christian J. Robinson) +Solution: Declare stop_insert_mode always. +Files: src/edit.c, src/globals.h + +Patch 6.2.099 (extra) +Problem: Test 49 fails. (Mikolaj Machowski) +Solution: The Polish translation must not change "E116" to "R116". +Files: src/po/pl.po + +Patch 6.2.100 +Problem: "make proto" fails when compiled with the Perl interface. +Solution: Remove "-fno.*" from PERL_CFLAGS, cproto sees it as its option. +Files: src/auto/configure, src/configure.in + +Patch 6.2.101 +Problem: When using syntax folding, opening a file slows down a lot when + it's size increases by only 20%. (Gary Johnson) +Solution: The array with cached syntax states is leaking entries. After + cleaning up the list obtain the current entry again. +Files: src/syntax.c + +Patch 6.2.102 +Problem: The macros equal() and CR conflict with a Carbon header file. +Solution: Rename equal() to equalpos(). Rename CR to CAR. + Do this in the non-extra files only. +Files: src/ascii.h, src/buffer.c, src/charset.c, src/edit.c, src/eval.c, + src/ex_cmds.c, src/ex_cmds2.c, src/ex_getln.c, src/fileio.c, + src/getchar.c, src/gui.c, src/gui_athena.c, src/gui_gtk_x11.c, + src/gui_motif.c, src/macros.h, src/mark.c, src/message.c, + src/misc1.c, src/misc2.c, src/normal.c, src/ops.c, src/os_unix.c, + src/regexp.c, src/search.c, src/ui.c, src/workshop.c + +Patch 6.2.103 (extra) +Problem: The macros equal() and CR conflict with a Carbon header file. +Solution: Rename equal() to equalpos(). Rename CR to CAR. + Do this in the extra files only. +Files: src/gui_photon.c, src/gui_w48.c + +Patch 6.2.104 +Problem: Unmatched braces in the table with options. +Solution: Move the "}," outside of the #ifdef. (Yakov Lerner) +Files: src/option.c + +Patch 6.2.105 +Problem: When the cursor is past the end of the line when calling + get_c_indent() a crash might occur. +Solution: Don't look past the end of the line. (NJ Verenini) +Files: src/misc1.c + +Patch 6.2.106 +Problem: Tag searching gets stuck on a very long line in the tags file. +Solution: When skipping back to search the first matching tag remember the + offset where searching started looking for a line break. +Files: src/tag.c + +Patch 6.2.107 (extra) +Problem: The NetBeans interface cannot be used on Win32. +Solution: Add support for the NetBeans for Win32. Add support for reading + XPM files on Win32. Also fixes that a sign icon with a space in + the file name did not work through the NetBeans interface. + (Sergey Khorev) + Also: avoid repeating error messages when the connection is lost. +Files: Makefile, runtime/doc/netbeans.txt, src/Make_bc5.mak, + src/Make_cyg.mak, src/Make_ming.mak, src/Make_mvc.mak, + src/bigvim.bat, src/feature.h, src/gui_beval.c, src/gui_beval.h, + src/gui_w32.c, src/gui_w48.c, src/menu.c, src/nbdebug.c, + src/nbdebug.h, src/netbeans.c, src/os_mswin.c, src/os_win32.h, + src/proto/gui_beval.pro, src/proto/gui_w32.pro, + src/proto/netbeans.pro, src/proto.h, src/version.c, src/vim.h, + src/xpm_w32.c, src/xpm_w32.h + +Patch 6.2.108 +Problem: Crash when giving a message about ignoring case in a tag. (Manfred + Kuehn) +Solution: Use a longer buffer for the message. +Files: src/tag.c + +Patch 6.2.109 +Problem: Compiler warnings with various Amiga compilers. +Solution: Add typecast, prototypes, et al. that are also useful for other + systems. (Flavio Stanchina) +Files: src/eval.c, src/ops.c + +Patch 6.2.110 +Problem: When $LANG includes the encoding, a menu without an encoding name + is not found. +Solution: Also look for a menu file without any encoding. +Files: runtime/menu.vim + +Patch 6.2.111 +Problem: Encoding "cp1251" is not recognized. +Solution: Add "cp1251" to the table of encodings. (Alexey Froloff) +Files: src/mbyte.c + +Patch 6.2.112 +Problem: After applying patches test32 fails. (Antonio Colombo) +Solution: Have "make clean" in the testdir delete *.rej and *.orig files. + Use this when doing "make clean" in the src directory. +Files: src/Makefile, src/testdir/Makefile + +Patch 6.2.113 +Problem: Using ":startinsert" after "$" works like "a" instead of "i". + (Ajit Thakkar) +Solution: Reset "w_curswant" for ":startinsert" and reset o_eol in edit(). +Files: src/edit.c, src/ex_docmd.c + +Patch 6.2.114 +Problem: When stdout is piped through "tee", the size of the screen may not + be correct. +Solution: Use stdin instead of stdout for ioctl() when stdin is a tty and + stdout isn't. +Files: src/os_unix.c + +Patch 6.2.115 (extra) +Problem: Compiler warnings with various Amiga compilers. +Solution: Add typecast, prototypes, et al. Those changes that are + Amiga-specific. (Flavio Stanchina) +Files: src/fileio.c, src/memfile.c, src/os_amiga.c, src/os_amiga.h, + src/vim.h + +Patch 6.2.116 (extra) +Problem: German keyboard with Numlock set different from system startup + causes problems. +Solution: Ignore keys with code 0xff. (Helmut Stiegler) +Files: src/gui_w48.c + +Patch 6.2.117 +Problem: Breakpoints in loops of sourced files and functions are not + detected. (Hari Krishna Dara) +Solution: Check for breakpoints when using lines that were previously read. + (Servatius Brandt) +Files: src/eval.c, src/ex_cmds2.c, src/ex_docmd.c, src/proto/eval.pro, + src/proto/ex_cmds2.pro + +Patch 6.2.118 (extra) +Problem: Mac: Compiling is done in a non-standard way. +Solution: Use the Unix method for Mac OS X, with autoconf. Add "CARBONGUI" + to Makefile and configure. (Eric Kow) + Move a few prototypes from os_mac.pro to gui_mac.pro. +Files: src/Makefile, src/auto/configure, src/configure.in, + src/config.mk.in, src/gui_mac.c, src/os_mac.h, src/os_macosx.c, + src/proto/gui_mac.pro, src/proto/os_mac.pro, + src/infplist.xml, src/vim.h + +Patch 6.2.119 (after 6.2.107) +Problem: When packing the MS-Windows archives a few files are missing. + (Guopeng Wen) +Solution: Add gui_beval.* to the list of generic source files. +Files: Makefile + +Patch 6.2.120 +Problem: Win32 GUI: The console dialogs are not supported on MS-Windows, + disabling the 'c' flag of 'guioptions'. (Servatius Brandt) +Solution: Define FEAT_CON_DIALOG also for GUI-only builds. +Files: src/feature.h + +Patch 6.2.121 (after 6.2.118) +Problem: Not all make programs support "+=". (Charles Campbell) +Solution: Use a normal assignment. +Files: src/Makefile + +Patch 6.2.122 (after 6.2.119) +Problem: Not all shells can expand [^~]. File missing. (Guopeng Wen) +Solution: Use a simpler pattern. Add the Aap recipe for the maze program + and a clean version of the source code. +Files: Makefile, runtime/macros/maze/Makefile, + runtime/macros/maze/README.txt, runtime/macros/maze/main.aap, + runtime/macros/maze/mazeclean.c + +Patch 6.2.123 (after 6.2.118) +Problem: Running configure fails. (Tony Leneis) +Solution: Change "==" to "=" for a test. +Files: src/auto/configure, src/configure.in + +Patch 6.2.124 (after 6.2.121)(extra) +Problem: Mac: Recursive use of M4FLAGS causes problems. When running Vim + directly it can't find the runtime files. (Emily Jackson) + Using GNU constructs causes warnings with other make programs. + (Ronald Schild) +Solution: Use another name for the M4FLAGS variable. + Don't remove "Vim.app" from the path. + Update the explanation for compiling on the Mac. (Eric Kow) + Don't use $(shell ) and $(addprefix ). +Files: src/INSTALLmac.txt, src/Makefile, src/misc1.c + +Patch 6.2.125 (after 6.2.107) +Problem: The "winsock2.h" file isn't always available. +Solution: Don't include this header file. +Files: src/netbeans.c + +Patch 6.2.126 +Problem: Typing CTRL-C at a confirm() prompt doesn't throw an exception. +Solution: Reset "mapped_ctrl_c" in get_keystroke(), so that "got_int" is set + in _OnChar(). +Files: src/misc1.c + +Patch 6.2.127 (extra) +Problem: Win32 console: Typing CTRL-C doesn't throw an exception. +Solution: Set got_int immediately when CTRL-C is typed, don't wait for + mch_breakcheck() being called. +Files: src/os_win32.c + +Patch 6.2.128 (after 6.2.118) +Problem: src/auto/configure is not consistent with src/configure.in. +Solution: Use the newly generated configure script. +Files: src/auto/configure + +Patch 6.2.129 +Problem: When 'number' is set 'wrapmargin' does not work Vi-compatible. + (Yasuhiro Matsumoto) +Solution: Reduce the textwidth when 'number' is set. Also for 'foldcolumn' + and similar things. +Files: src/edit.c + +Patch 6.2.130 (extra) +Problem: Win32 console: When 'restorescreen' is not set exiting Vim causes + the screen to be cleared. (Michael A. Mangino) +Solution: Don't clear the screen when exiting and 'restorescreen' isn't set. +Files: src/os_win32.c + +Patch 6.2.131 (extra) +Problem: Win32: Font handles are leaked. +Solution: Free italic, bold and bold-italic handles before overwriting them. + (Michael Wookey) +Files: src/gui_w48.c + +Patch 6.2.132 (extra) +Problem: Win32: console version doesn't work on latest Windows Server 2003. +Solution: Copy 12000 instead of 15000 cells at a time to avoid running out + of memory. +Files: src/os_win32.c + +Patch 6.2.133 +Problem: When starting the GUI a bogus error message about 'imactivatekey' + may be given. +Solution: Only check the value of 'imactivatekey' when the GUI is running. +Files: src/gui.c, src/option.c + +Patch 6.2.134 (extra) +Problem: Win32: When scrolling parts of the window are redrawn when this + isn't necessary. +Solution: Only invalidate parts of the window when they are obscured by + other windows. (Michael Wookey) +Files: src/gui_w48.c + +Patch 6.2.135 +Problem: An item <> in the ":command" argument is interpreted as <args>. +Solution: Avoid that <> is recognized as <args>. +Files: src/ex_docmd.c + +Patch 6.2.136 +Problem: ":e ++enc=latin1 newfile" doesn't set 'fenc' when the file doesn't + exist. (Miroslaw Dobrzanski-Neumann) +Solution: Set 'fileencoding' to the specified encoding when editing a file + that does not exist. +Files: src/fileio.c + +Patch 6.2.137 +Problem: "d:cmd<CR>" cannot be repeated with ".". Breaks repeating "d%" + when using the matchit plugin. +Solution: Store the command to be repeated. This is restricted to + single-line commands. +Files: src/ex_docmd.c, src/globals.h, src/normal.c, src/vim.h + +Patch 6.2.138 (extra) +Problem: Compilation problem on VMS with dynamic buffer on the stack. +Solution: Read one byte less than the size of the buffer, so that we can + check for the string length without an extra buffer. +Files: src/os_vms.c + +Patch 6.2.139 +Problem: Code is repeated in the two Perl files. +Solution: Move common code from if_perl.xs and if_perlsfio.c to vim.h. + Also fix a problem with generating prototypes. +Files: src/if_perl.xs, src/if_perlsfio.c, src/vim.h + +Patch 6.2.140 (after 6.2.121) +Problem: Mac: Compiling with Python and Perl doesn't work. +Solution: Adjust the configure check for Python to use "-framework Python" + for Python 2.3 on Mac OS/X. + Move "-ldl" after "DynaLoader.a" in the link command. + Change "perllibs" to "PERL_LIBS". +Files: src/auto/configure, src/configure.in, src/config.mk.in + +Patch 6.2.141 (extra) +Problem: Mac: The b_FSSpec field is sometimes unused. +Solution: Change the #ifdef to FEAT_CW_EDITOR and defined it in feature.h +Files: src/fileio.c, src/gui_mac.c, src/structs.h, src/feature.h + +Patch 6.2.142 (after 6.2.124) +Problem: Mac: building without GUI through configure doesn't work. + When the system is slow, unpacking the resource file takes too + long. +Solution: Don't always define FEAT_GUI_MAC when MACOS is defined, define it + in the Makefile. + Add a configure option to skip Darwin detection. + Use a Python script to unpack the resources to avoid a race + condition. (Taro Muraoka) +Files: Makefile, src/Makefile, src/auto/configure, src/configure.in, + src/dehqx.py, src/vim.h + +Patch 6.2.143 +Problem: Using "K" on Visually selected text doesn't work if it ends in + a multi-byte character. +Solution: Include all the bytes of the last character. (Taro Muraoka) +Files: src/normal.c + +Patch 6.2.144 +Problem: When "g:html_use_css" is set the HTML header generated by the + 2html script is wrong. +Solution: Add the header after adding HREF for links. + Also use ":normal!" instead of ":normal" to avoid mappings + getting in the way. +Files: runtime/syntax/2html.vim + +Patch 6.2.145 (after 6.2.139) +Problem: Undefining "bool" doesn't work for older systems. (Wojtek Pilorz) +Solution: Only undefine "bool" on Mac OS. +Files: src/vim.h + +Patch 6.2.146 +Problem: On some systems the prototype for iconv() is wrong, causing a + warning message. +Solution: Use a cast (void *) to avoid the warning. (Charles Campbell) +Files: src/fileio.c, src/mbyte.c + +Patch 6.2.147 +Problem: ":s/pat/\=col('.')" always replaces with "1". +Solution: Set the cursor to the start of the match before substituting. + (Helmut Stiegler) +Files: src/ex_cmds.c + +Patch 6.2.148 +Problem: Can't break an Insert into several undoable parts. +Solution: Add the CTRL-G u command. +Files: runtime/doc/insert.txt, src/edit.c + +Patch 6.2.149 +Problem: When the cursor is on a line past 21,474,748 the indicated + percentage of the position is invalid. With that many lines + "100%" causes a negative cursor line number, resulting in a crash. + (Daniel Goujot) +Solution: Divide by 100 instead of multiplying. Avoid overflow when + computing the line number for "100%". +Files: src/buffer.c, src/ex_cmds2.c, src/normal.c + +Patch 6.2.150 +Problem: When doing "vim - < file" lines are broken at NUL chars. + (Daniel Goujot) +Solution: Change NL characters back to NUL when reading from the temp + buffer. +Files: src/fileio.c + +Patch 6.2.151 +Problem: When doing "vim --remote +startinsert file" some commands are + inserted as text. (Klaus Bosau) +Solution: Put all the init commands in one Ex line, not using a <CR>, so + that Insert mode isn't started too early. +Files: src/main.c + +Patch 6.2.152 +Problem: The cursor() function doesn't reset the column offset for + 'virtualedit'. +Solution: Reset the offset to zero. (Helmut Stiegler) +Files: src/eval.c + +Patch 6.2.153 +Problem: Win32: ":lang german" doesn't use German messages. +Solution: Add a table to translate the Win32 language names to two-letter + language codes. +Files: src/ex_cmds2.c + +Patch 6.2.154 +Problem: Python bails out when giving a warning message. (Eugene + Minkovskii) +Solution: Set sys.argv[] to an empty string. +Files: src/if_python.c + +Patch 6.2.155 +Problem: Win32: Using ":tjump www" in a help file gives two results. + (Dave Roberts) +Solution: Ignore differences between slashes and backslashes when checking + for identical tag matches. +Files: src/tag.c + +Patch 6.2.156 (after 6.2.125) +Problem: Win32: Netbeans fails to build, EINTR is not defined. +Solution: Redefine EINTR to WSAEINTR. (Mike Williams) +Files: src/netbeans.c + +Patch 6.2.157 +Problem: Using "%p" in 'errorformat' gives a column number that is too + high. +Solution: Set the flag to use the number as a virtual column. (Lefteris + Koutsoloukas) +Files: src/quickfix.c + +Patch 6.2.158 +Problem: The sed command on Solaris and HPUX doesn't work for a line that + doesn't end in a newline. +Solution: Add a newline when feeding text to sed. (Mark Waggoner) +Files: src/configure.in, src/auto/configure + +Patch 6.2.159 +Problem: When using expression folding and 'foldopen' is "undo" an undo + command doesn't always open the fold. +Solution: Save and restore the KeyTyped variable when evaluating 'foldexpr'. + (Taro Muraoka) +Files: src/fold.c + +Patch 6.2.160 +Problem: When 'virtualedit' is "all" and 'selection' is "exclusive", + selecting a double-width character below a single-width character + may cause a crash. +Solution: Avoid overflow on unsigned integer decrement. (Taro Muraoka) +Files: src/normal.c + +Patch 6.2.161 (extra) +Problem: VMS: Missing header file. Reading input busy loops. +Solution: Include termdef.h. Avoid the use of a wait function in + vms_read(). (Frank Ries) +Files: src/os_unix.h, src/os_vms.c + +Patch 6.2.162 +Problem: ":redraw" doesn't always display the text that includes the cursor + position, e.g. after ":call cursor(1, 0)". (Eugene Minkovskii) +Solution: Call update_topline() before redrawing. +Files: src/ex_docmd.c + +Patch 6.2.163 +Problem: "make install" may also copy AAPDIR directories. +Solution: Delete AAPDIR directories, just like CVS directories. +Files: src/Makefile + +Patch 6.2.164 (after 6.2.144) +Problem: When "g:html_use_css" is set the HTML header generated by the + 2html script is still wrong. +Solution: Search for a string instead of jumping to a fixed line number. + Go to the start of the line before inserting the header. + (Jess Thrysoee) +Files: runtime/syntax/2html.vim + +Patch 6.2.165 +Problem: The configure checks hang when using autoconf 2.57. +Solution: Invoke AC_PROGRAM_EGREP to set $EGREP. (Aron Griffis) +Files: src/auto/configure, src/configure.in + +Patch 6.2.166 +Problem: When $GZIP contains "-N" editing compressed files doesn't work + properly. +Solution: Add "-n" to "gzip -d" to avoid restoring the file name. (Oyvind + Holm) +Files: runtime/plugin/gzip.vim + +Patch 6.2.167 +Problem: The Python interface leaks memory when assigning lines to a + buffer. (Sergey Khorev) +Solution: Do not copy the line when calling ml_replace(). +Files: src/if_python.c + +Patch 6.2.168 +Problem: Python interface: There is no way to get the indices from a range + object. +Solution: Add the "start" and "end" attributes. (Maurice S. Barnum) +Files: src/if_python.c, runtime/doc/if_pyth.txt + +Patch 6.2.169 +Problem: The prototype for _Xmblen() appears in a recent XFree86 header + file, causing a warning for our prototype. (Hisashi T Fujinaka) +Solution: Move the prototype to an osdef file, so that it's filtered out. +Files: src/mbyte.c, src/osdef2.h.in + +Patch 6.2.170 +Problem: When using Sun WorkShop the current directory isn't changed to + where the file is. +Solution: Set the 'autochdir' option when using WorkShop. And avoid using + the basename when 'autochdir' is not set. +Files: src/gui_x11.c, src/ex_cmds.c + +Patch 6.2.171 (after 6.2.163) +Problem: The "-or" argument of "find" doesn't work for SysV systems. +Solution: Use "-o" instead. (Gordon Prieur) +Files: src/Makefile + +Patch 6.2.172 (after 6.2.169) +Problem: The prototype for _Xmblen() still causes trouble. +Solution: Include the X11 header file that defines the prototype. +Files: src/osdef2.h.in, src/osdef.sh + +Patch 6.2.173 (extra) +Problem: Win32: Ruby interface doesn't work with Ruby 1.8.0 for other + compilers than MSVC. +Solution: Fix the BC5, Cygwin and Mingw makefiles. (Dan Sharp) +Files: src/Make_bc5.mak, src/Make_cyg.mak, src/Make_ming.mak + +Patch 6.2.174 +Problem: After the ":intro" message only a mouse click in the last line + gets past the hit-return prompt. +Solution: Accept a click at or below the hit-return prompt. +Files: src/gui.c, src/message.c + +Patch 6.2.175 +Problem: Changing 'backupext' in a *WritePre autocommand doesn't work. + (William Natter) +Solution: Move the use of p_bex to after executing the *WritePre + autocommands. Also avoids reading allocated memory after freeing. +Files: src/fileio.c + +Patch 6.2.176 +Problem: Accented characters in translated help files are not handled + correctly. (Fabien Vayssiere) +Solution: Include "192-255" in 'iskeyword' for the help window. +Files: src/ex_cmds.c + +Patch 6.2.177 (extra) +Problem: VisVim: Opening a file with a space in the name doesn't work. (Rob + Retter) Arbitrary commands are being executed. (Neil Bird) +Solution: Put a backslash in front of every space in the file name. + (Gerard Blais) Terminate the CTRL-\ CTRL-N command with a NUL. +Files: src/VisVim/Commands.cpp, src/VisVim/VisVim.rc + +Patch 6.2.178 +Problem: People who don't know how to exit Vim try pressing CTRL-C. +Solution: Give a message how to exit Vim when CTRL-C is pressed and it + doesn't cancel anything. +Files: src/normal.c + +Patch 6.2.179 (extra) +Problem: The en_gb messages file isn't found on case sensitive systems. +Solution: Rename en_gb to en_GB. (Mike Williams) +Files: src/po/en_gb.po, src/po/en_GB.po, src/po/Make_ming.mak, + src/po/Make_mvc.mak, src/po/Makefile, src/po/README_mvc.txt + +Patch 6.2.180 +Problem: Compiling with GTK2 on Win32 doesn't work. +Solution: Include gdkwin32.h instead of gdkx.h. (Srinath Avadhanula) +Files: src/gui_gtk.c, src/gui_gtk_f.c, src/gui_gtk_x11.c, src/mbyte.c + +Patch 6.2.181 (after 6.2.171) +Problem: The "-o" argument of "find" has lower priority than the implied + "and" with "-print". +Solution: Add parenthesis around the "-o" expression. (Gordon Prieur) +Files: src/Makefile + +Patch 6.2.182 (after 6.2.094) +Problem: Compilation with tiny features fails because of missing + get_past_head() function. +Solution: Adjust the #ifdef for get_past_head(). +Files: src/misc1.c + +Patch 6.2.183 (after 6.2.178) +Problem: Warning for char/unsigned char mixup. +Solution: Use MSG() instead of msg(). (Tony Leneis) +Files: src/normal.c + +Patch 6.2.184 +Problem: With 'formatoptions' set to "1aw" inserting text may cause the + paragraph to be ended. (Alan Schmitt) +Solution: Temporarily add an extra space to make the paragraph continue + after moving the word after the cursor to the next line. + Also format when pressing Esc. +Files: src/edit.c, src/normal.c, src/proto/edit.pro + +Patch 6.2.185 +Problem: Restoring a session with zero-height windows does not work + properly. (Charles Campbell) +Solution: Accept a zero argument to ":resize" as intended. Add a window + number argument to ":resize" to be able to set the size of other + windows, because the current window cannot be zero-height. + Fix the explorer plugin to avoid changing the window sizes. Add + the winrestcmd() function for this. +Files: runtime/doc/eval.txt, runtime/plugin/explorer.vim, src/eval.c, + src/ex_cmds.h, src/ex_docmd.c, src/proto/window.pro, src/window.c + +Patch 6.2.186 (after 6.2.185) +Problem: Documentation file eval.txt contains examples without indent. +Solution: Insert the indent. Also fix other mistakes. +Files: runtime/doc/eval.txt + +Patch 6.2.187 +Problem: Using Insure++ reveals a number of bugs. (Dominique Pelle) +Solution: Initialize variables where needed. Free allocated memory to avoid + leaks. Fix comparing tags to avoid reading past allocated memory. +Files: src/buffer.c, src/diff.c, src/fileio.c, src/mark.c, src/misc1.c, + src/misc2.c, src/ops.c, src/option.c, src/tag.c, src/ui.c + +Patch 6.2.188 (extra) +Problem: MS-Windows: Multi-byte characters in a filename cause trouble for + the window title. +Solution: Return when the wide function for setting the title did its work. +Files: src/gui_w48.c + +Patch 6.2.189 +Problem: When setting 'viminfo' after editing a new buffer its marks are + not stored. (Keith Roberts) +Solution: Set the "b_marks_read" flag when skipping to read marks from the + viminfo file. +Files: src/fileio.c + +Patch 6.2.190 +Problem: When editing a compressed files, marks are lost. +Solution: Add the ":lockmarks" modifier and use it in the gzip plugin. + Make exists() also check for command modifiers, so that the + existence of ":lockmarks" can be checked for. + Also add ":keepmarks" to avoid that marks are deleted when + filtering text. + When deleting lines put marks 'A - 'Z and '0 - '9 at the first + deleted line instead of clearing the mark. They were kept in the + viminfo file anyway. + Avoid that the gzip plugin puts deleted text in registers. +Files: runtime/doc/motion.txt, runtime/plugin/gzip.vim, src/ex_cmds.c, + src/ex_docmd.c, src/mark.c, src/structs.h + +Patch 6.2.191 +Problem: The intro message is outdated. Information about sponsoring and + registering is missing. +Solution: Show info about sponsoring and registering Vim in the intro + message now and then. Add help file about sponsoring. +Files: runtime/doc/help.txt, runtime/doc/sponsor.txt, runtime/doc/tags, + runtime/menu.vim, src/version.c + +Patch 6.2.192 +Problem: Using CTRL-T and CTRL-D with "gR" messes up the text. (Jonathan + Hankins) +Solution: Avoid calling change_indent() recursively. +Files: src/edit.c + +Patch 6.2.193 +Problem: When recalling a search pattern from the history from a ":s,a/c," + command the '/' ends the search string. (JC van Winkel) +Solution: Store the separator character with the history entries. Escape + characters when needed, replace the old separator with the new one. + Also fixes that recalling a "/" search for a "?" command messes up + trailing flags. +Files: src/eval.c, src/ex_getln.c, src/normal.c, src/proto/ex_getln.pro, + src/search.c, src/tag.c + +Patch 6.2.194 (after 6.2.068) +Problem: For NetBeans, instead of writing the file and sending an event + about it, tell NetBeans to write the file. +Solution: Add the "save" command, "netbeansBuffer" command and + "buttonRelease" event to the netbeans protocol. Updated the + interface to version 2.2. (Gordon Prieur) + Also: open a fold when the cursor has been positioned. + Also: fix memory leak, free result of nb_quote(). +Files: runtime/doc/netbeans.txt, src/fileio.c, src/netbeans.c, + src/normal.c, src/proto/netbeans.pro, src/structs.h + +Patch 6.2.195 (after 6.2.190) +Problem: Compiling fails for missing CPO_REMMARK symbol. +Solution: Add the patch I forgot to include... +Files: src/option.h + +Patch 6.2.196 (after 6.2.191) +Problem: Rebuilding the documentation doesn't use the sponsor.txt file. +Solution: Add sponsor.txt to the Makefile. (Christian J. Robinson) +Files: runtime/doc/Makefile + +Patch 6.2.197 +Problem: It is not possible to force a redraw of status lines. (Gary + Johnson) +Solution: Add the ":redrawstatus" command. +Files: runtime/doc/various.txt, src/ex_cmds.h, src/ex_docmd.c, + src/screen.c + +Patch 6.2.198 +Problem: A few messages are not translated. (Ernest Adrogue) +Solution: Mark the messages to be translated. +Files: src/ex_cmds.c + +Patch 6.2.199 (after 6.2.194) +Problem: Vim doesn't work perfectly well with NetBeans. +Solution: When NetBeans saves the file, reset the timestamp to avoid "file + changed" warnings. Close a buffer in a proper way. Don't try + giving a debug message with an invalid pointer. Send a + newDotAndMark message when needed. Report a change by the "r" + command to NetBeans. (Gordon Prieur) +Files: src/netbeans.c, src/normal.c + +Patch 6.2.200 +Problem: When recovering a file, 'fileformat' is always the default, thus + writing the file may result in differences. (Penelope Fudd) +Solution: Before recovering the file try reading the original file to obtain + the values of 'fileformat', 'fileencoding', etc. +Files: src/memline.c + +Patch 6.2.201 +Problem: When 'autowriteall' is set ":qall" still refuses to exit if there + is a modified buffer. (Antoine Mechelynck) +Solution: Attempt writing modified buffers as intended. +Files: src/ex_cmds2.c + +Patch 6.2.202 +Problem: Filetype names of CHILL and ch script are confusing. +Solution: Rename "ch" to "chill" and "chscript" to "ch". +Files: runtime/filetype.vim, runtime/makemenu.vim, runtime/synmenu.vim + runtime/syntax/ch.vim, runtime/syntax/chill.vim + +Patch 6.2.203 +Problem: With characterwise text that has more than one line, "3P" works + wrong. "3p" has the same problem. There also is a display + problem. (Daniel Goujot) +Solution: Perform characterwise puts with a count in the right position. +Files: src/ops.c + +Patch 6.2.204 (after 6.2.086) +Problem: "]]" in a file with closed folds moves to the end of the file. + (Nam SungHyun) +Solution: Find one position in each closed fold, then move to after the fold. +Files: src/search.c + +Patch 6.2.205 (extra) +Problem: MS-Windows: When the taskbar is at the left or top of the screen, + the Vim window placement is wrong. +Solution: Compute the size and position of the window correctly. (Taro + Muraoka) +Files: src/gui_w32.c, src/gui_w48.c + +Patch 6.2.206 +Problem: Multi-byte characters cannot be used as hotkeys in a console + dialog. (Mattias Erkisson) +Solution: Handle multi-byte characters properly. Also put () or [] around + default hotkeys. +Files: src/message.c, src/macros.h + +Patch 6.2.207 +Problem: When 'encoding' is a multi-byte encoding, expanding an + abbreviation that starts where insertion started results in + characters before the insertion to be deleted. (Xiangjiang Ma) +Solution: Stop searching leftwards for the start of the word at the position + where insertion started. +Files: src/getchar.c + +Patch 6.2.208 +Problem: When using fold markers, three lines in a row have the start + marker and deleting the first one with "dd", a nested fold is not + deleted. (Kamil Burzynski) + Using marker folding, a level 1 fold doesn't stop when it is + followed by "{{{2", starting a level 2 fold. +Solution: Don't stop updating folds at the end of a change when the nesting + level of folds is larger than the fold level. + Correctly compute the number of folds that start at "{{{2". + Also avoid a crash for a NULL pointer. +Files: src/fold.c + +Patch 6.2.209 +Problem: A bogus fold is created when using "P" while the cursor is in the + middle of a closed fold. (Kamil Burzynski) +Solution: Correct the line number where marks are modified for closed folds. +Files: src/ops.c + +Patch 6.2.210 (extra) +Problem: Mac OSX: antialiased fonts are not supported. +Solution: Add the 'antialias' option to switch on antialiasing on Mac OSX + 10.2 and later. (Peter Cucka) +Files: runtime/doc/options.txt, src/gui_mac.c, src/option.h, src/option.c + +Patch 6.2.211 (extra) +Problem: Code for handling file dropped on Vim is duplicated. +Solution: Move the common code to gui_handle_drop(). + Add code to drop the files in the window under the cursor. + Support drag&drop on the Macintosh. (Taro Muraoka) + When dropping a directory name edit that directory (using the + explorer plugin) + Fix that changing directory with Shift pressed didn't work for + relative path names. +Files: src/fileio.c, src/gui.c, src/gui_gtk_x11.c, src/gui_mac.c, + src/gui_w48.c, src/proto/fileio.pro, src/proto/gui.pro + +Patch 6.2.212 (after 6.2.199) +Problem: NetBeans: Replacing with a count is not handled correctly. +Solution: Move reporting the change outside of the loop for the count. + (Gordon Prieur) +Files: src/normal.c + +Patch 6.2.213 (after 6.2.208) +Problem: Using marker folding, "{{{1" doesn't start a new fold when already + at fold level 1. (Servatius Brandt) +Solution: Correctly compute the number of folds that start at "{{{1". +Files: src/fold.c + +Patch 6.2.214 (after 6.2.211) (extra) +Problem: Warning for an unused variable. +Solution: Delete the declaration. (Bill McCarthy) +Files: src/gui_w48.c + +Patch 6.2.215 +Problem: NetBeans: problems saving an unmodified file. +Solution: Add isNetbeansModified() function. Disable netbeans_unmodified(). + (Gordon Prieur) +Files: src/fileio.c, src/netbeans.c, src/proto/netbeans.pro, + runtime/doc/netbeans.txt, runtime/doc/tags + +Patch 6.2.216 (after 6.2.206) +Problem: Multi-byte characters still cannot be used as hotkeys in a console + dialog. (Mattias Erkisson) +Solution: Make get_keystroke() handle multi-byte characters. +Files: src/misc1.c + +Patch 6.2.217 +Problem: GTK: setting the title doesn't always work correctly. +Solution: Invoke gui_mch_settitle(). (Tomas Stehlik) +Files: src/os_unix.c + +Patch 6.2.218 +Problem: Warning for function without prototype. +Solution: Add argument types to the msgCB field of the BalloonEval struct. +Files: src/gui_beval.h + +Patch 6.2.219 +Problem: Syntax highlighting hangs on an empty match of an item with a + nextgroup. (Charles Campbell) +Solution: Remember that the item has already matched and don't match it + again at the same position. +Files: src/syntax.c + +Patch 6.2.220 +Problem: When a Vim server runs in a console a remote command isn't handled + before a key is typed. (Joshua Neuheisel) +Solution: Don't try reading more input when a client-server command has been + received. +Files: src/os_unix.c + +Patch 6.2.221 +Problem: No file name completion for ":cscope add". +Solution: Add the XFILE flag to ":cscope". (Gary Johnson) +Files: src/ex_cmds.h + +Patch 6.2.222 +Problem: Using "--remote" several times on a row only opens some of the + files. (Dany St-Amant) +Solution: Don't delete all typeahead when the server receives a command from + a client, only delete typed characters. +Files: src/main.c + +Patch 6.2.223 +Problem: Cscope: Avoid a hang when cscope waits for a response while Vim + waits for a prompt. + Error messages from Cscope mess up the display. +Solution: Detect the hit-enter message and respond by sending a return + character to cscope. (Gary Johnson) + Use EMSG() and strerror() when possible. Replace perror() with + PERROR() everywhere, add emsg3(). +Files: src/diff.c, src/if_cscope.c, src/integration.c, src/message.c, + src/proto/message.pro, src/misc2.c, src/netbeans.c, src/vim.h + +Patch 6.2.224 +Problem: Mac: Can't compile with small features. (Axel Kielhorn) +Solution: Also include vim_chdirfile() when compiling for the Mac. +Files: src/misc2.c + +Patch 6.2.225 +Problem: NetBeans: Reported modified state isn't exactly right. +Solution: Report a file being modified in the NetBeans way. +Files: src/netbeans.c + +Patch 6.2.226 (after 6.2.107) (extra) +Problem: The "ws2-32.lib" file isn't always available. +Solution: Use "WSock32.lib" instead. (Taro Muraoka, Dan Sharp) +Files: src/Make_cyg.mak, src/Make_ming.mak, src/Make_mvc.mak + +Patch 6.2.227 (extra) +Problem: The "PC" symbol is defined but not used anywhere. +Solution: Remove "-DPC" from the makefiles. +Files: src/Make_bc3.mak, src/Make_bc5.mak, src/Make_cyg.mak, + src/Make_ming.mak + +Patch 6.2.228 +Problem: Receiving CTRL-\ CTRL-N after typing "f" or "m" doesn't switch Vim + back to Normal mode. Same for CTRL-\ CTRL-G. +Solution: Check if the character typed after a command is CTRL-\ and obtain + another character to check for CTRL-N or CTRL-G, waiting up to + 'ttimeoutlen' msec. +Files: src/normal.c + +Patch 6.2.229 +Problem: ":function" with a name that uses magic curlies does not work + inside a function. (Servatius Brandt) +Solution: Skip over the function name properly. +Files: src/eval.c + +Patch 6.2.230 (extra) +Problem: Win32: a complex pattern may cause a crash. +Solution: Use __try and __except to catch the exception and handle it + gracefully, when possible. Add myresetstkoflw() to reset the + stack overflow. (Benjamin Peterson) +Files: src/Make_bc5.mak, src/os_mswin.c src/os_win32.c, src/os_win32.h, + src/proto/os_win32.pro, src/regexp.c + +Patch 6.2.231 (after 6.2.046) +Problem: Various problems when an error exception is raised from within a + builtin function. When it is invoked while evaluating arguments + to a function following arguments are still evaluated. When + invoked with a line range it will be called for remaining lines. +Solution: Update "force_abort" also after calling a builtin function, so + that aborting() always returns the correct value. (Servatius + Brandt) +Files: src/eval.c, src/ex_eval.c, src/proto/ex_eval.pro, + src/testdir/test49.ok, src/testdir/test49.vim + +Patch 6.2.232 +Problem: ":python vim.command('python print 2*2')" crashes Vim. (Eugene + Minkovskii) +Solution: Disallow executing a Python command recursively and give an error + message. +Files: src/if_python.c + +Patch 6.2.233 +Problem: On Mac OSX adding -pthread for Python only generates a warning. + The test for Perl threads rejects Perl while it's OK. + Tcl doesn't work at all. + The test for Ruby fails if ruby exists but there are no header + files. The Ruby library isn't detected properly +Solution: Avoid adding -pthread on Mac OSX. Accept Perl threads when it's + not the 5.5 threads. + Use the Tcl framework for header files. For Ruby rename cWindow + to cVimWindow to avoid a name clash. (Ken Scott) + Only enable Ruby when the header files can be found. Use "-lruby" + instead of "libruby.a" when it can't be found. +Files: src/auto/configure, src/configure.in, src/if_ruby.c + +Patch 6.2.234 +Problem: GTK 2 GUI: ":sp" and the ":q" leaves the cursor on the command + line. +Solution: Flush output before removing scrollbars. Also do this in other + places where gui_mch_*() functions are invoked. +Files: src/ex_cmds.c, src/option.c, src/window.c + +Patch 6.2.235 (extra) +Problem: Win32: Cursor isn't removed with a 25x80 window and doing: + "1830ia<Esc>400a-<Esc>0w0". (Yasuhiro Matsumoto) +Solution: Remove the call to gui_undraw_cursor() from gui_mch_insert_lines(). +Files: src/gui_w48.c + +Patch 6.2.236 +Problem: Using gvim with Agide gives "connection lost" error messages. +Solution: Only give the "connection lost" message when the buffer was once + owned by NetBeans. +Files: src/netbeans.c, src/structs.h + +Patch 6.2.237 +Problem: GTK 2: Thai text is drawn wrong. It changes when moving the + cursor over it. +Solution: Disable the shaping engine, it moves combining characters to a + wrong position and combines characters, while drawing the cursor + doesn't combine characters. +Files: src/gui_gtk_x11.c + +Patch 6.2.238 (after 6.2.231) +Problem: ":function" does not work inside a while loop. (Servatius Brandt) +Solution: Add get_while_line() and pass it to do_one_cmd() when in a while + loop, so that all lines are stored and can be used again when + repeating the loop. + Adjust test 49 so that it checks for the fixed problems. + (Servatius Brandt) +Files: src/digraph.c, src/ex_cmds2.c, src/ex_docmd.c, src/ex_eval.c, + src/proto/ex_cmds2.pro, src/proto/ex_docmd.pro, + src/testdir/test49.in, src/testdir/test49.ok, + src/testdir/test49.vim + +Patch 6.2.239 +Problem: GTK 2: With closed folds the arrow buttons of a vertical scrollbar + often doesn't scroll. (Moshe Kaminsky) +Solution: Hackish solution: Detect that the button was pressed from the + mouse pointer position. +Files: src/gui_gtk.c, src/gui.c + +Patch 6.2.240 +Problem: GTK 2: Searching for bitmaps for the toolbar doesn't work as with + other systems. Need to explicitly use "icon=name". (Ned Konz, + Christian J. Robinson) +Solution: Search for icons like done for Motif. +Files: src/gui_gtk.c + +Patch 6.2.241 +Problem: GTK 2: Search and Search/Replace dialogs are synced, that makes no + sense. Buttons are sometimes greyed-out. (Jeremy Messenger) +Solution: Remove the code to sync the two dialogs. Adjust the code to react + to an empty search string to also work for GTK2. (David Necas) +Files: src/gui_gtk.c + +Patch 6.2.242 +Problem: Gnome: "vim --help" only shows the Gnome arguments, not the Vim + arguments. +Solution: Don't let the Gnome code remove the "--help" argument and don't + exit at the end of usage(). +Files: src/gui_gtk_x11.c, src/main.c + +Patch 6.2.243 (extra) +Problem: Mac: Dropping a file on a Vim icon causes a hit-enter prompt. +Solution: Move the dropped files to the global argument list, instead of the + usual drop handling. (Eckehard Berns) +Files: src/main.c, src/gui_mac.c + +Patch 6.2.244 +Problem: ':echo "\xf7"' displays the illegal byte as if it was a character + and leaves "cho" after it. +Solution: When checking the length of a UTF-8 byte sequence and it's shorter + than the number of bytes available, assume it's an illegal byte. +Files: src/mbyte.c + +Patch 6.2.245 +Problem: Completion doesn't work for ":keepmarks" and ":lockmarks". +Solution: Add the command modifiers to the table of commands. (Madoka + Machitani) +Files: src/ex_cmds.h, src/ex_docmd.c + +Patch 6.2.246 +Problem: Mac: Starting Vim from Finder doesn't show error messages. +Solution: Recognize that output is being displayed by stderr being + "/dev/console". (Eckehard Berns) +Files: src/main.c, src/message.c + +Patch 6.2.247 (after 6.2.193) +Problem: When using a search pattern from the viminfo file the last + character is replaced with a '/'. +Solution: Store the separator character in the right place. (Kelvin Lee) +Files: src/ex_getln.c + +Patch 6.2.248 +Problem: GTK: When XIM is enabled normal "2" and keypad "2" cannot be + distinguished. +Solution: Detect that XIM changes the keypad key to the expected ASCII + character and fall back to the non-XIM code. (Neil Bird) +Files: src/gui_gtk_x11.c, src/mbyte.c, src/proto/mbyte.pro + +Patch 6.2.249 +Problem: ":cnext" moves to the error in the next file, but there is no + method to go back. +Solution: Add ":cpfile" and ":cNfile". +Files: src/ex_cmds.h, src/quickfix.c, src/vim.h, runtime/doc/quickfix.txt + +Patch 6.2.250 +Problem: Memory leaks when using signs. (Xavier de Gaye) +Solution: Delete the list of signs when unloading a buffer. +Files: src/buffer.c + +Patch 6.2.251 +Problem: GTK: The 'v' flag in 'guioptions' doesn't work. (Steve Hall) + Order of buttons is reversed for GTK 2.2.4. Don't always get + focus back after handling a dialog. +Solution: Make buttons appear vertically when desired. Reverse the order in + which buttons are added to a dialog. Move mouse pointer around + when the dialog is done and we don't have focus. +Files: src/gui_gtk.c + +Patch 6.2.252 (extra, after 6.2.243) +Problem: Mac: Dropping a file on a Vim icon causes a hit-enter prompt for + Mac OS classic. +Solution: Remove the #ifdef from the code that fixes it for Mac OSX. +Files: src/gui_mac.c + +Patch 6.2.253 +Problem: When 'tagstack' is not set a ":tag id" command does not work after + a ":tjump" command. +Solution: Set "new_tag" when 'tagstack' isn't set. (G. Narendran) +Files: src/tag.c + +Patch 6.2.254 +Problem: May run out of space for error messages. +Solution: Keep room for two more bytes. +Files: src/quickfix.c + +Patch 6.2.255 +Problem: GTK: A new item in the popup menu is put just after instead of + just before the right item. (Gabriel Zachmann) +Solution: Don't increment the menu item index. +Files: src/gui_gtk.c + +Patch 6.2.256 +Problem: Mac: "macroman" encoding isn't recognized, need to use + "8bit-macroman". +Solution: Recognize "macroman" with an alias "mac". (Eckehard Berns) +Files: src/mbyte.c + +Patch 6.2.257 (after 6.2.250) +Problem: Signs are deleted for ":bdel", but they could still be useful. +Solution: Delete signs only for ":bwipe". +Files: src/buffer.c + +Patch 6.2.258 +Problem: GUI: can't disable (grey-out) a popup menu item. (Ajit Thakkar) +Solution: Loop over the popup menus for all modes. +Files: src/menu.c + +Patch 6.2.259 +Problem: If there are messages when exiting, on the console there is a + hit-enter prompt while the message can be read; in the GUI the + message may not be visible. +Solution: Use the hit-enter prompt when there is an error message from + writing the viminfo file or autocommands, or when there is any + output in the GUI and 'verbose' is set. Don't use a hit-enter + prompt for the non-GUI version unless there is an error message. +Files: src/main.c + +Patch 6.2.260 +Problem: GTK 2: Can't quit a dialog with <Esc>. + GTK 1 and 2: <Enter> always gives a result, even when the default + button has been disabled. +Solution: Handle these keys explicitly. When no default button is specified + use the first one (works mostly like it was before). +Files: src/gui_gtk.c + +Patch 6.2.261 +Problem: When 'autoindent' and 'cindent' are set and a line is recognized + as a comment, starting a new line won't do 'cindent' formatting. +Solution: Also use 'cindent' formatting for lines that are used as a + comment. (Servatius Brandt) +Files: src/misc1.c + +Patch 6.2.262 +Problem: 1 CTRL-W w beeps, even though going to the first window is + possible. (Charles Campbell) +Solution: Don't beep. +Files: src/window.c + +Patch 6.2.263 +Problem: Lint warnings: Duplicate function prototypes, duplicate macros, + use of a zero character instead of a zero pointer, unused + variable. Clearing allocated memory in a complicated way. +Solution: Remove the function prototypes from farsi.h. Remove the + duplicated lines in keymap.h. Change getvcol() argument from NUL + to NULL. Remove the "col" variable in regmatch(). Use + lalloc_clear() instead of lalloc(). (Walter Briscoe) +Files: src/farsi.h, src/keymap.h, src/ops.c, src/regexp.c, src/search.c + +Patch 6.2.264 (after 6.2.247) +Problem: Writing past allocated memory when using a command line from the + viminfo file. +Solution: Store the NUL in the right place. +Files: src/ex_getln.c + +Patch 6.2.265 +Problem: Although ":set" is not allowed in the sandbox, ":let &opt = val" + works. +Solution: Do allow changing options in the sandbox, but not the ones that + can't be changed from a modeline. +Files: src/ex_cmds.h, src/options.c + +Patch 6.2.266 +Problem: When redirecting output and using ":silent", line breaks are + missing from output of ":map" and ":tselect". Alignment of + columns is wrong. +Solution: Insert a line break where "msg_didout" was tested. Update msg_col + when redirecting and using ":silent". +Files: src/getchar.c, src/message.c + +Patch 6.2.267 (extra) +Problem: Win32: "&&" in a tearoff menu is not shown. (Luc Hermitte) +Solution: Use the "name" item from the menu instead of the "dname" item. +Files: src/gui_w32.c, src/menu.c + +Patch 6.2.268 +Problem: GUI: When changing 'guioptions' part of the window may be off + screen. (Randall Morris) +Solution: Adjust the size of the window when changing 'guioptions', but only + when adding something. +Files: src/gui.c + +Patch 6.2.269 +Problem: Diff mode does not highlight a change in a combining character. + (Raphael Finkel) +Solution: Make diff_find_change() multi-byte aware: find the start byte of + a character that contains a change. +Files: src/diff.c + +Patch 6.2.270 +Problem: Completion in Insert mode, then repeating with ".", doesn't handle + composing characters in the completed text. (Raphael Finkel) +Solution: Don't skip over composing chars when adding completed text to the + redo buffer. +Files: src/getchar.c + +Patch 6.2.271 +Problem: NetBeans: Can't do "tail -f" on the log. Passing socket info with + an argument or environment variable is not secure. +Solution: Wait after initializing the log. Allow passing the socket info + through a file. (Gordon Prieur) +Files: runtime/doc/netbeans.txt, src/main.c, src/netbeans.c + +Patch 6.2.272 +Problem: When the "po" directory exists, but "po/Makefile" doesn't, + building fails. Make loops when the "po" directory has been + deleted after running configure. +Solution: Check for the "po/Makefile" instead of just the "po" directory. + Check this again before trying to run make with that Makefile. +Files: src/auto/configure, src/configure.in, src/Makefile + +Patch 6.2.273 +Problem: Changing the sort order in an explorer window for an empty + directory produces error messages. (Doug Kearns) +Solution: When an invalid range is used for a function that is not going to + be executed, skip over the arguments anyway. +Files: src/eval.c + +Patch 6.2.274 +Problem: ":print" skips empty lines when 'list' is set and there is no + "eol" in 'listchars'. (Yakov Lerner) +Solution: Skip outputting a space for an empty line only when 'list' is set + and the end-of-line character is not empty. +Files: src/message.c + +Patch 6.2.275 (extra, after 6.2.267) +Problem: Warning for uninitialized variable when using gcc. +Solution: Initialize "acLen" to zero. (Bill McCarthy) +Files: src/gui_w32.c + +Patch 6.2.276 +Problem: ":echo X()" does not put a line break between the message that X() + displays and the text that X() returns. (Yakov Lerner) +Solution: Invoke msg_start() after evaluating the argument. +Files: src/eval.c + +Patch 6.2.277 +Problem: Vim crashes when a ":runtime ftplugin/ada.vim" causes a recursive + loop. (Robert Nowotniak) +Solution: Restore "msg_list" before returning from do_cmdline(). +Files: src/ex_docmd.c + +Patch 6.2.278 +Problem: Using "much" instead of "many". +Solution: Correct the error message. +Files: src/eval.c + +Patch 6.2.279 +Problem: There is no default choice for a confirm() dialog, now that it is + possible not to have a default choice. +Solution: Make the first choice the default choice. +Files: runtime/doc/eval.txt, src/eval.c + +Patch 6.2.280 +Problem: "do" and ":diffget" don't work in the first line and the last line + of a buffer. (Aron Griffis) +Solution: Find a difference above the first line and below the last line. + Also fix a few display updating bugs. +Files: src/diff.c, src/fold.c, src/move.c + +Patch 6.2.281 +Problem: PostScript printing doesn't work on Mac OS X 10.3.2. +Solution: Adjust the header file. (Mike Williams) +Files: runtime/print/prolog.ps + +Patch 6.2.282 +Problem: When using CTRL-O to go back to a help file, it becomes listed. + (Andrew Nesbit) + Using ":tag" or ":tjump" in a help file doesn't keep the help file + settings (e.g. for 'iskeyword'). +Solution: Don't mark a buffer as listed when its help flag is set. Put all + the option settings for a help buffer together in do_ecmd(). +Files: src/ex_cmds.c + +Patch 6.2.283 +Problem: The "local additions" in help.txt are used without conversion, + causing latin1 characters showing up wrong when 'enc' is utf-8. + (Antoine J. Mechelynck) +Solution: Convert the text to 'encoding'. +Files: src/ex_cmds.c + +Patch 6.2.284 +Problem: Listing a function puts "endfunction" in the message history. + Typing "q" at the more prompt isn't handled correctly when listing + variables and functions. (Hara Krishna Dara) +Solution: Don't use msg() for "endfunction". Check "got_int" regularly. +Files: src/eval.c + +Patch 6.2.285 +Problem: GUI: In a single wrapped line that fills the window, "gj" in the + last screen line leaves the cursor behind. (Ivan Tarasov) +Solution: Undraw the cursor before scrolling the text up. +Files: src/gui.c + +Patch 6.2.286 +Problem: When trying to rename a file and it doesn't exist, the destination + file is deleted anyway. (Luc Deux) +Solution: Don't delete the destination when the source doesn't exist. (Taro + Muraoka) +Files: src/fileio.c + +Patch 6.2.287 (after 6.2.264) +Problem: Duplicate lines are added to the viminfo file. +Solution: Compare with existing entries without an offset. Also fixes + reading very long history lines from viminfo. +Files: src/ex_getln.c + +Patch 6.2.288 (extra) +Problem: Mac: An external program can't be interrupted. +Solution: Don't use the 'c' key for backspace. (Eckehard Berns) +Files: src/gui_mac.c + +Patch 6.2.289 +Problem: Compiling the Tcl interface with thread support causes ":make" to + fail. (Juergen Salk) +Solution: Use $TCL_DEFS from the Tcl config script to obtain the required + compile flags for using the thread library. +Files: src/auto/configure, src/configure.in + +Patch 6.2.290 (extra) +Problem: Mac: The mousewheel doesn't work. +Solution: Add mousewheel support. Also fix updating the thumb after a drag + and then using another way to scroll. (Eckehard Berns) +Files: src/gui_mac.c + +Patch 6.2.291 (extra) +Problem: Mac: the plus button and close button don't do anything. +Solution: Make the plus button maximize the window and the close button + close Vim. (Eckehard Berns) +Files: src/gui.c, src/gui_mac.c + +Patch 6.2.292 +Problem: Motif: When removing GUI arguments from argv[] a "ps -ef" shows + the last argument repeated. +Solution: Set argv[argc] to NULL. (Michael Jarvis) +Files: src/gui_x11.c + +Patch 6.2.293 (after 6.2.255) +Problem: GTK: A new item in a menu is put before the tearoff item. +Solution: Do increment the menu item index for non-popup menu items. +Files: src/gui_gtk.c + +Patch 6.2.294 (extra) +Problem: Mac: Cannot use modifiers with Space, Tab, Enter and Escape. +Solution: Handle all modifiers for these keys. (Eckehard Berns) +Files: src/gui_mac.c + +Patch 6.2.295 +Problem: When in debug mode, receiving a message from a remote client + causes a crash. Evaluating an expression causes Vim to wait for + "cont" to be typed, without a prompt. (Hari Krishna Dara) +Solution: Disable debugging when evaluating an expression for a client. + (Michael Geddes) Don't try reading into the typeahead buffer when + it may have been filled in another way. +Files: src/ex_getln.c, src/getchar.c, src/if_xcmdsrv.c, src/main.c, + src/misc1.c, src/proto/getchar.pro, src/proto/main.pro, + src/proto/os_unix.pro, src/proto/ui.pro, src/structs.h, + src/os_unix.c, src/ui.c + +Patch 6.2.296 (extra) +Problem: Same as 6.2.295. +Solution: Extra files for patch 6.2.295. +Files: src/os_amiga.c, src/os_msdos.c, src/os_riscos.c, src/os_win32.c, + src/proto/os_amiga.pro, src/proto/os_msdos.pro, + src/proto/os_riscos.pro, src/proto/os_win32.pro + +Patch 6.2.297 (after 6.2.232) +Problem: Cannot invoke Python commands recursively. +Solution: With Python 2.3 and later use the available mechanisms to invoke + Python recursively. (Matthew Mueller) +Files: src/if_python.c + +Patch 6.2.298 +Problem: A change always sets the '. mark and an insert always sets the '^ + mark, even when this is not wanted. + Cannot go back to the position of older changes without undoing + those changes. +Solution: Add the ":keepjumps" command modifier. + Add the "g," and "g;" commands. +Files: runtime/doc/motion.txt, src/ex_cmds.h, src/ex_docmd.c, src/edit.c, + src/mark.c, src/misc1.c, src/normal.c, src/proto/mark.pro, + src/structs.h, src/undo.c + +Patch 6.2.299 +Problem: Can only use one language for help files. +Solution: Add the 'helplang' option to select the preferred language(s). + Make ":helptags" generate tags files for all languages. +Files: runtime/doc/options.txt, runtime/doc/various.txt, src/Makefile, + src/ex_cmds.c, src/ex_cmds2.c, src/ex_cmds.h, src/ex_getln.c, + src/normal.c, src/option.c, src/option.h, src/proto/ex_cmds.pro, + src/proto/ex_cmds2.pro, src/proto/option.pro, src/structs.h, + src/tag.c, src/vim.h + +Patch 6.2.300 (after 6.2.297) +Problem: Cannot build Python interface with Python 2.2 or earlier. +Solution: Add a semicolon. +Files: src/if_python.c + +Patch 6.2.301 +Problem: The "select all" item from the popup menu doesn't work for Select + mode. +Solution: Use the same commands as for the "Edit.select all" menu. + (Benji Fisher) +Files: runtime/menu.vim + +Patch 6.2.302 +Problem: Using "CTRL-O ." in Insert mode doesn't work properly. (Benji + Fisher) +Solution: Restore "restart_edit" after an insert command that was not typed. + Avoid waiting with displaying the mode when there is no text to be + overwritten. + Fix that "CTRL-O ." sometimes doesn't put the cursor back after + the end-of-line. Only reset the flag that CTRL-O was used past + the end of the line when restarting editing. Update "o_lnum" + number when inserting text and "o_eol" is set. +Files: src/edit.c, src/normal.c + +Patch 6.2.303 +Problem: Cannot use Unicode digraphs while 'encoding' is not Unicode. +Solution: Convert the character from Unicode to 'encoding' when needed. + Use the Unicode digraphs for the Macintosh. (Eckehard Berns) +Files: src/digraph.c + +Patch 6.2.304 (extra, after 6.2.256) +Problem: Mac: No proper support for 'encoding'. Conversion without iconv() + is not possible. +Solution: Convert input from 'termencoding' to 'encoding'. Add + mac_string_convert(). Convert text for the clipboard when needed. + (Eckehard Berns) +Files: src/gui_mac.c, src/mbyte.c, src/structs.h, src/vim.h + +Patch 6.2.305 (after 6.2.300) +Problem: Win32: Cannot build Python interface with Python 2.3. (Ajit + Thakkar) +Solution: Add two functions to the dynamic loading feature. +Files: src/if_python.c + +Patch 6.2.306 (extra) +Problem: Win32: Building console version with BCC 5.5 gives a warning for + get_cmd_args() prototype missing. (Ajit Thakkar) +Solution: Don't build os_w32exe.c for the console version. +Files: src/Make_bc5.mak + +Patch 6.2.307 (after 6.2.299) +Problem: Installing help files fails. +Solution: Expand wildcards for translated help files separately. +Files: src/Makefile + +Patch 6.2.308 +Problem: Not all systems have "whoami", resulting in an empty user name. +Solution: Use "logname" when possible, "whoami" otherwise. (David Boyce) +Files: src/Makefile + +Patch 6.2.309 +Problem: "3grx" waits for two ESC to be typed. (Jens Paulus) +Solution: Append the ESC to the stuff buffer when redoing the "gr" insert. +Files: src/edit.c + +Patch 6.2.310 +Problem: When setting 'undolevels' to -1, making a change and setting + 'undolevels' to a positive value an "undo list corrupt" error + occurs. (Madoka Machitani) +Solution: Sync undo before changing 'undolevels'. +Files: src/option.c + +Patch 6.2.311 (after 6.2.298) +Problem: When making several changes in one line the changelist grows + quickly. There is no error message for reaching the end of the + changelist. Reading changelist marks from viminfo doesn't work + properly. +Solution: Only make a new entry in the changelist when making a change in + another line or 'textwidth' columns away. Add E662, E663 and E664 + error messages. Put a changelist mark from viminfo one position + before the end. +Files: runtime/doc/motion.txt, src/mark.c, src/misc1.c, src/normal.c + +Patch 6.2.312 (after 6.2.299) +Problem: "make install" clears the screen when installing the docs. +Solution: Execute ":helptags" in silent mode. +Files: runtime/doc/Makefile + +Patch 6.2.313 +Problem: When opening folds in a diff window, other diff windows no longer + show the same text. +Solution: Sync the folds in diff windows. +Files: src/diff.c, src/fold.c, src/move.c, src/proto/diff.pro, + src/proto/move.pro + +Patch 6.2.314 +Problem: When 'virtualedit' is set "rx" may cause a crash with a blockwise + selection and using "$". (Moritz Orbach) +Solution: Don't try replacing chars in a line that has no characters in the + block. +Files: src/ops.c + +Patch 6.2.315 +Problem: Using CTRL-C in a Visual mode mapping while 'insertmode' is set + stops Vim from returning to Insert mode. +Solution: Don't reset "restart_edit" when a CTRL-C is found and 'insertmode' + is set. +Files: src/normal.c + +Patch 6.2.316 (after 6.2.312) +Problem: "make install" tries connecting to the X server when installing + the docs. (Stephen Thomas) +Solution: Add the "-X" argument. +Files: runtime/doc/Makefile + +Patch 6.2.317 (after 6.2.313) +Problem: When using "zi" in a diff window, other diff windows are not + adjusted. (Richard Curnow) +Solution: Distribute a change in 'foldenable' to other diff windows. +Files: src/normal.c + +Patch 6.2.318 +Problem: When compiling with _THREAD_SAFE external commands don't echo + typed characters. +Solution: Don't set the terminal mode to TMODE_SLEEP when it's already at + TMODE_COOK. +Files: src/os_unix.c + +Patch 6.2.319 (extra) +Problem: Building gvimext.dll with Mingw doesn't work properly. +Solution: Use gcc instead of dllwrap. Use long option names. (Alejandro + Lopez-Valencia) +Files: src/GvimExt/Make_ming.mak + +Patch 6.2.320 +Problem: Win32: Adding and removing the menubar resizes the Vim window. + (Jonathon Merz) +Solution: Don't let a resize event change 'lines' unexpectedly. +Files: src/gui.c + +Patch 6.2.321 +Problem: When using modeless selection, wrapping lines are not recognized, + a line break is always inserted. +Solution: Add LineWraps[] to remember whether a line wrapped or not. +Files: src/globals.h, src/screen.c, src/ui.c + +Patch 6.2.322 +Problem: With 'showcmd' set, after typing "dd" the next "d" may not be + displayed. (Jens Paulus) +Solution: Redraw the command line after updating the screen, scrolling may + have set "clear_cmdline". +Files: src/screen.c + +Patch 6.2.323 +Problem: Win32: expanding "~/file" in an autocommand pattern results in + backslashes, while this pattern should only have forward slashes. +Solution: Make expanding environment variables respect 'shellslash' and set + p_ssl when expanding the autocommand pattern. +Files: src/fileio.c, src/misc1.c, src/proto/fileio.pro + +Patch 6.2.324 (extra) +Problem: Win32: when "vimrun.exe" has a path with white space, such as + "Program Files", executing external commands may fail. +Solution: Put double quotes around the path to "vimrun". +Files: src/os_win32.c + +Patch 6.2.325 +Problem: When $HOME includes a space, doing ":set tags=~/tags" doesn't + work, the space is used to separate file names. (Brett Stahlman) +Solution: Escape the space with a backslash. +Files: src/option.c + +Patch 6.2.326 +Problem: ":windo set syntax=foo" doesn't work. (Tim Chase) +Solution: Don't change 'eventignore' for ":windo". +Files: src/ex_cmds2.c + +Patch 6.2.327 +Problem: When formatting text all marks in the formatted lines are lost. + A word is not joined to a previous line when this would be + possible. (Mikolaj Machowski) +Solution: Try to keep marks in the same position as much as possible. + Also keep mark positions when joining lines. + Start auto-formatting in the previous line when appropriate. + Add the "gw" operator: Like "gq" but keep the cursor where it is. +Files: runtime/doc/change.txt, src/edit.c, src/globals.h, src/mark.c, + src/misc1.c, src/normal.c, src/ops.c, src/proto/edit.pro, + src/proto/mark.pro, src/proto/ops.pro, src/structs.h, src/vim.h + +Patch 6.2.328 +Problem: XIM with GTK: It is hard to understand what XIM is doing. +Solution: Add xim_log() to log XIM events and help with debugging. +Files: src/mbyte.c + +Patch 6.2.329 +Problem: ":=" does not work Vi compatible. (Antony Scriven) +Solution: Print the last line number instead of the current line. Don't + print "line". +Files: src/ex_cmds.h, src/ex_docmd.c + +Patch 6.2.330 (extra, after 6.2.267) +Problem: Win32: Crash when tearing off a menu. +Solution: Terminate a string with a NUL. (Yasuhiro Matsumoto) +Files: src/gui_w32.c + +Patch 6.2.331 (after 6.2.327) +Problem: "gwap" leaves cursor in the wrong line. +Solution: Remember the cursor position before finding the ends of the + paragraph. +Files: src/normal.c, src/ops.c, src/structs.h + +Patch 6.2.332 (extra) +Problem: Amiga: Compile error for string array. Compiling the Amiga GUI + doesn't work. +Solution: Use a char pointer instead. Move including "gui_amiga.h" to after + including "vim.h". Add a semicolon. (Ali Akcaagac) +Files: src/gui_amiga.c, src/os_amiga.c + +Patch 6.2.333 (extra) +Problem: Win32: printing doesn't work with specified font charset. +Solution: Use the specified font charset. (Mike Williams) +Files: src/os_mswin.c + +Patch 6.2.334 (extra, after 6.2.296) +Problem: Win32: evaluating client expression in debug mode requires typing + "cont". +Solution: Use eval_client_expr_to_string(). +Files: src/os_mswin.c + +Patch 6.2.335 +Problem: The ":sign" command cannot be followed by another command. +Solution: Add TRLBAR to the command flags. +Files: src/ex_cmds.h + +Patch 6.2.336 (after 6.2.327) +Problem: Mixup of items in an expression. +Solution: Move "== NUL" to the right spot. +Files: src/edit.c + +Patch 6.2.337 (extra, after 6.2.319) +Problem: Building gvimext.dll with Mingw doesn't work properly. +Solution: Fix white space and other details. (Alejandro Lopez-Valencia) +Files: src/GvimExt/Make_ming.mak + +Patch 6.2.338 (after 6.2.331) +Problem: When undoing "gwap" the cursor is always put at the start of the + paragraph. When undoing auto-formatting the cursor may be above + the change. +Solution: Try to move the cursor back to where it was or to the first line + that actually changed. +Files: src/normal.c, src/ops.c, src/undo.c + +Patch 6.2.339 +Problem: Crash when using many different highlight groups and a User + highlight group. (Juergen Kraemer) +Solution: Do not use the sg_name_u pointer when it is NULL. Also simplify + use of the highlight group table. +Files: src/syntax.c + +Patch 6.2.340 +Problem: ":reg" doesn't show the actual contents of the clipboard if it was + filled outside of Vim. (Stuart MacDonald) +Solution: Obtain the clipboard contents before displaying it. +Files: src/ops.c + +Patch 6.2.341 (extra) +Problem: Win32: When the path to diff.exe contains a space and using the + vimrc generated by the install program, diff mode does not work. +Solution: Put the first double quote just before the space instead of before + the path. +Files: src/dosinst.c + +Patch 6.2.342 (extra) +Problem: Win32: macros are not always used as expected. +Solution: Define WINVER to 0x0400 instead of 0x400. (Alejandro + Lopez-Valencia) +Files: src/Make_bc5.mak, src/Make_cyg.mak, src/Make_mvc.mak + +Patch 6.2.343 +Problem: Title doesn't work with some window managers. X11: Setting the + text property for the window title is hard coded. +Solution: Use STRING format when possible. Use the UTF-8 function when + it's available and 'encoding' is utf-8. Use + XStringListToTextProperty(). Do the same for the icon name. + (David Harrison) +Files: src/os_unix.c + +Patch 6.2.344 (extra, after 6.2.337) +Problem: Cannot build gvimext.dll with MingW on Linux. +Solution: Add support for cross compiling. (Ronald Hoellwarth) +Files: src/GvimExt/Make_ming.mak + +Patch 6.2.345 (extra) +Problem: Win32: Copy/paste between two Vims fails if 'encoding' is not set + properly or there are illegal bytes. +Solution: Use a raw byte format. Always set it when copying. When pasting + use the raw format if 'encoding' is the same. +Files: src/os_mswin.c, src/os_win16.c, src/os_win32.c, src/vim.h + +Patch 6.2.346 +Problem: Win32 console: After using "chcp" Vim does not detect the + different codepage. +Solution: Use GetConsoleCP() and when it is different from GetACP() set + 'termencoding'. +Files: src/option.c + +Patch 6.2.347 (extra) +Problem: Win32: XP theme support is missing. +Solution: Add a manifest and refer to it from the resource file. (Michael + Wookey) +Files: Makefile, src/gvim.exe.mnf, src/vim.rc + +Patch 6.2.348 +Problem: Win32: "vim c:\dir\(test)" doesn't work, because the 'isfname' + default value doesn't contain parenthesis. +Solution: Temporarily add '(' and ')' to 'isfname' when expanding file name + arguments. +Files: src/main.c + +Patch 6.2.349 +Problem: Finding a match using 'matchpairs' may cause a crash. + 'matchpairs' is not used for 'showmatch'. +Solution: Don't look past the NUL in 'matchpairs'. Use 'matchpairs' for + 'showmatch'. (Dave Olszewkski) +Files: src/misc1.c, src/normal.c, src/proto/search.pro, src/search.c + +Patch 6.2.350 +Problem: Not enough info about startup timing. +Solution: Add a few more TIME_MSG() calls. +Files: src/main.c + +Patch 6.2.351 +Problem: Win32: $HOME may be set to %USERPROFILE%. +Solution: Expand %VAR% at the start of $HOME. +Files: src/misc1.c + +Patch 6.2.352 (after 6.2.335) +Problem: ":sign texthl=||" does not work. +Solution: Remove the check for a following command. Give an error for extra + arguments after "buff=1". +Files: src/ex_cmds.c, src/ex_cmds.h + +Patch 6.2.353 (extra) +Problem: Win32: Supported server name length is limited. (Paul Bossi) +Solution: Use MAX_PATH instead of 25. +Files: src/os_mswin.c + +Patch 6.2.354 (extra) +Problem: Win32: When the mouse pointer is on a tear-off menu it is hidden + when typing but is not redisplayed when moved. (Markx Hackmann) +Solution: Handle the pointer move event for the tear-off menu window. +Files: src/gui_w32.c + +Patch 6.2.355 (after 6.2.303) +Problem: When 'encoding' is a double-byte encoding different from the + current locale, the width of characters is not correct. + Possible failure and memory leak when using iconv, Unicode + digraphs and 'encoding' is not "utf-8". +Solution: Use iconv() to discover the actual width of characters. + Add the "vc_fail" field to vimconv_T. + When converting a digraph, init the conversion type to NONE and + cleanup afterwards. +Files: src/digraph.c, src/mbyte.c, src/structs.h + +Patch 6.2.356 +Problem: When using a double-byte 'encoding' and 'selection' is + "exclusive", "vy" only yanks the first byte of a double-byte + character. (Xiangjiang Ma) +Solution: Correct the column in unadjust_for_sel() to position on the first + byte, always include the trailing byte of the selected text. +Files: src/normal.c + +Patch 6.2.357 (after 6.2.321) +Problem: Memory leak when resizing the Vim window. +Solution: Free the LineWraps array. +Files: src/screen.c + +Patch 6.2.358 (after 6.2.299) +Problem: Memory leak when using ":help" and the language doesn't match. +Solution: Free the array with matching tags. +Files: src/ex_cmds.c + +Patch 6.2.359 (after 6.2.352) +Problem: Compiler warning for long to int type cast. +Solution: Add explicit type cast. +Files: src/ex_cmds.c + +Patch 6.2.360 +Problem: "100|" in an empty line results in a ruler "1,0-100". (Pavol + Juhas) +Solution: Recompute w_virtcol if the target column was not reached. +Files: src/misc2.c + +Patch 6.2.361 (extra) +Problem: Win32: Run gvim, ":set go-=m", use Alt-Tab, keep Alt pressed while + pressing Esc, then release Alt: Cursor disappears and typing a key + causes a beep. (Hari Krishna Dara) +Solution: Don't ignore the WM_SYSKEYUP event when the menu is disabled. +Files: src/gui_w32.c + +Patch 6.2.362 (extra, after 6.2.347) +Problem: Win32: The manifest causes Gvim not to work. (Dave Roberts) +Solution: Change "x86" to "X86". (Serge Pirotte) +Files: src/gvim.exe.mnf + +Patch 6.2.363 +Problem: In an empty file with 'showmode' off, "i" doesn't change the ruler + from "0-1" to "1". Typing "x<BS>" does show "1", but then <Esc> + doesn't make it "0-1" again. Same problem for ruler in + statusline. (Andrew Pimlott) +Solution: Remember the "empty line" flag with Insert mode and'ed to it. +Files: src/screen.c + +Patch 6.2.364 +Problem: HTML version of the documentation doesn't mention the encoding, + which is a problem for mbyte.txt. +Solution: Adjust the awk script. (Ilya Sher) +Files: runtime/doc/makehtml.awk + +Patch 6.2.365 +Problem: The configure checks for Perl and Python may add compile and link + arguments that break building Vim. +Solution: Do a sanity check: try building with the arguments. +Files: src/auto/configure, src/configure.in + +Patch 6.2.366 +Problem: When the GUI can't start because no valid font is found, there is + no error message. (Ugen) +Solution: Add an error message. +Files: src/gui.c + +Patch 6.2.367 +Problem: Building the help tags file while installing may fail if there is + another Vim in $PATH. +Solution: Specify the just installed Vim executable. (Gordon Prieur) +Files: src/Makefile + +Patch 6.2.368 +Problem: When 'autochdir' is set, closing a window doesn't change to the + directory of the new current window. (Salman Halim) +Solution: Handle 'autochdir' always when a window becomes the current one. +Files: src/window.c + +Patch 6.2.369 +Problem: Various memory leaks: when using globpath(), when searching for + help tags files, when defining a function inside a function, when + giving an error message through an exception, for the final "." + line in ":append", in expression "cond ? a : b" that fails and for + missing ")" in an expression. Using NULL pointer when adding + first user command and for pointer computations with regexp. + (tests by Dominique Pelle) +Solution: Fix the leaks by freeing the allocated memory. Don't use the + array of user commands when there are no entries. Use a macro + instead of a function call for saving and restoring regexp states. +Files: src/eval.c, src/ex_cmds.c, src/ex_docmd.c, src/ex_getln.c, + src/misc2.c, src/regexp.c, src/screen.c, src/tag.c + +Patch 6.2.370 (extra, after6.2.341) +Problem: Win32: When the path to diff.exe contains a space and using the + vimrc generated by the install program, diff mode may not work. + (Alejandro Lopez-Valencia) +Solution: Do not use double quotes for arguments that do not have a space. +Files: src/dosinst.c + +Patch 6.2.371 +Problem: When 'virtualedit' is set and there is a Tab before the next "x", + "dtx" does not delete the whole Tab. (Ken Hashishi) +Solution: Move the cursor to the last position of the Tab. Also for + "df<Tab>". +Files: src/normal.c + +Patch 6.2.372 +Problem: When using balloon evaluation, no value is displayed for members + of structures and items of an array. +Solution: Include "->", "." and "[*]" in the expression. +Files: src/gui_beval.c, src/normal.c, src/vim.h + +Patch 6.2.373 +Problem: When 'winminheight' is zero and a window is reduced to zero + height, the ruler always says "Top" instead of the cursor + position. (Antoine J. Mechelynck) +Solution: Don't recompute w_topline for a zero-height window. +Files: src/window.c + +Patch 6.2.374 +Problem: ":echo "hello" | silent normal n" removes the "hello" message. + (Servatius Brandt) +Solution: Don't echo the search string when ":silent" was used. Also don't + show the mode. In general: don't clear to the end of the screen. +Files: src/gui.c, src/message.c, src/os_unix.c, src/proto/message.pro, + src/screen.c, src/search.c, src/window.c + +Patch 6.2.375 +Problem: When changing 'guioptions' the hit-enter prompt may be below the + end of the Vim window. +Solution: Call screen_alloc() before showing the prompt. +Files: src/message.c + +Patch 6.2.376 +Problem: Win32: Ruby interface cannot be dynamically linked with Ruby 1.6. +Solution: Add #ifdefs around use of rb_w32_snprintf(). (Benoît Cerrina) +Files: src/if_ruby.c + +Patch 6.2.377 (after 6.2.372) +Problem: Compiler warnings for signed/unsigned compare. (Michael Wookey) +Solution: Add type cast. +Files: src/normal.c + +Patch 6.2.378 (extra, after 6.2.118) +Problem: Mac: cannot build with Project Builder. +Solution: Add remove_tail_with_ext() to locate and remove the "build" + directory from the runtime path. Include os_unix.c when needed. + (Dany St Amant) +Files: src/misc1.c, src/os_macosx.c, src/vim.h + +Patch 6.2.379 +Problem: Using ":mkvimrc" in the ":options" window sets 'bufhidden' to + "delete". (Michael Naumann) +Solution: Do not add buffer-specific option values to a global vimrc file. +Files: src/option.c + +Patch 6.2.380 (extra) +Problem: DOS: "make test" fails when running it again. Can't "make test" + with Borland C. +Solution: Make sure ".out" files are deleted when they get in the way. Add + a "test" target to the Borland C Makefile. +Files: src/Make_bc5.mak, src/testdir/Make_dos.mak + +Patch 6.2.381 +Problem: Setting 'fileencoding' to a comma separated list (confusing it + with 'fileencodings') does not result in an error message. + Setting 'fileencoding' in an empty file marks it as modified. + There is no "+" in the title after setting 'fileencoding'. +Solution: Check for a comma in 'fileencoding'. Only consider a non-empty + file modified by changing 'fileencoding'. Update the title after + changing 'fileencoding'. +Files: src/option.c + +Patch 6.2.382 +Problem: Running "make test" puts marks from test files in viminfo. +Solution: Specify a different viminfo file to use. +Files: src/testdir/test15.in, src/testdir/test49.in + +Patch 6.2.383 +Problem: ":hi foo term='bla" crashes Vim. (Antony Scriven) +Solution: Check that the closing ' is there. +Files: src/syntax.c + +Patch 6.2.384 +Problem: ":menu a.&b" ":unmenu a.b" only works if "&b" isn't translated. +Solution: Also compare the names without '&' characters. +Files: src/menu.c + +Patch 6.2.385 (extra) +Problem: Win32: forward_slash() and trash_input_buf() are undefined when + compiling with small features. (Ajit Thakkar) +Solution: Change the #ifdefs for forward_slash(). Don't call + trash_input_buf() if the input buffer isn't used. +Files: src/fileio.c, src/os_win32.c + +Patch 6.2.386 +Problem: Wasting time trying to read marks from the viminfo file for a + buffer without a name. +Solution: Skip reading marks when the buffer has no name. +Files: src/fileio.c + +Patch 6.2.387 +Problem: There is no highlighting of translated items in help files. +Solution: Search for a "help_ab.vim" syntax file when the help file is + called "*.abx". Also improve the help highlighting a bit. +Files: runtime/syntax/help.vim + +Patch 6.2.388 +Problem: GTK: When displaying some double-width characters they are drawn + as single-width, because of conversion to UTF-8. +Solution: Check the width that GTK uses and add a space if it's one instead + of two. +Files: src/gui_gtk_x11.c + +Patch 6.2.389 +Problem: When working over a slow connection, it's very annoying that the + last line is partly drawn and then cleared for every change. +Solution: Don't redraw the bottom line if no rows were inserted or deleted. + Don't draw the line if we know "@" lines will be used. +Files: src/screen.c + +Patch 6.2.390 +Problem: Using "r*" in Visual mode on multi-byte characters only replaces + every other character. (Tyson Roberts) +Solution: Correct the cursor position after replacing each character. +Files: src/ops.c + +Patch 6.2.391 (extra) +Problem: The ":highlight" command is not tested. +Solution: Add a test script for ":highlight". +Files: src/testdir/Makefile, src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_os2.mak, + src/testdir/Make_vms.mms, src/testdir/test51.in, + src/testdir/test51.ok + +Patch 6.2.392 (after 6.2.384) +Problem: Unused variable. +Solution: Remove "dlen". +Files: src/menu.c + +Patch 6.2.393 +Problem: When using very long lines the viminfo file can become very big. +Solution: Add the "s" flag to 'viminfo': skip registers with more than the + specified Kbyte of text. +Files: runtime/doc/options.txt, src/ops.c, src/option.c + +Patch 6.2.394 (after 6.2.391) +Problem: Test 51 fails on a terminal with 8 colors. (Tony Leneis) +Solution: Use "DarkBlue" instead of "Blue" to avoid the "bold" attribute. +Files: src/testdir/test51.in + +Patch 6.2.395 +Problem: When using ":tag" or ":pop" the previous matching tag is used. + But since the current file is different, the ordering of the tags + may change. +Solution: Remember what the current buffer was for when re-using cur_match. +Files: src/edit.c, src/ex_cmds.c, src/proto/tag.pro, src/structs.h, + src/tag.c + +Patch 6.2.396 +Problem: When CTRL-T jumps to another file and an autocommand moves the + cursor to the '" mark, don't end up on the right line. (Michal + Malecki) +Solution: Set the line number after loading the file. +Files: src/tag.c + +Patch 6.2.397 +Problem: When using a double-byte 'encoding' mapping <M-x> doesn't work. + (Yasuhiro Matsumoto) +Solution: Do not set the 8th bit of the character but use a modifier. +Files: src/gui_gtk_x11.c, src/gui_x11.c, src/misc2.c + +Patch 6.2.398 (extra) +Problem: Win32 console: no extra key modifiers are supported. +Solution: Encode the modifiers into the input stream. Also fix that special + keys are converted and stop working when 'tenc' is set. Also fix + that when 'tenc' is initialized the input and output conversion is + not setup properly until 'enc' or 'tenc' is set. +Files: src/getchar.c, src/option.c, src/os_win32.c + +Patch 6.2.399 +Problem: A ":set" command that fails still writes a message when it is + inside a try/catch block. +Solution: Include all the text of the message in the error message. +Files: src/charset.c, src/option.c + +Patch 6.2.400 +Problem: Can't compile if_xcmdsrv.c on HP-UX 11.0. +Solution: Include header file poll.h. (Malte Neumann) +Files: src/if_xcmdsrv.c + +Patch 6.2.401 +Problem: When opening a buffer that was previously opened, Vim does not + restore the cursor position if the first line starts with white + space. (Gregory Margo) +Solution: Don't skip restoring the cursor position if it is past the blanks + in the first line. +Files: src/buffer.c + +Patch 6.2.402 +Problem: Mac: "make install" doesn't generate help tags. (Benji Fisher) +Solution: Generate help tags before copying the runtime files. +Files: src/Makefile + +Patch 6.2.403 +Problem: ":@y" checks stdin if there are more commands to execute. This + fails if stdin is not connected, e.g., when starting the GUI from + KDE. (Ned Konz) +Solution: Only check for a next command if there still is typeahead. +Files: src/ex_docmd.c + +Patch 6.2.404 +Problem: Our own function to determine width of Unicode characters may get + outdated. (Markus Kuhn) +Solution: Use wcwidth() when it is available. Also use iswprint(). +Files: src/auto/configure, src/configure.in, src/config.h.in, src/mbyte.c + +Patch 6.2.405 +Problem: Cannot map zero without breaking the count before a command. + (Benji Fisher) +Solution: Disable mapping zero when entering a count. +Files: src/getchar.c, src/globals.h, src/normal.c + +Patch 6.2.406 +Problem: ":help \zs", ":help \@=" and similar don't find useful help. +Solution: Prepend "/\" to the arguments to find the desired help tag. +Files: src/ex_cmds.c + +Patch 6.2.407 (after 6.2.299) +Problem: ":help \@<=" doesn't find help. +Solution: Avoid that ":help \@<=" searches for the "<=" language. +Files: src/tag.c + +Patch 6.2.408 +Problem: ":compiler" is not consistent: Sets local options and a global + variable. (Douglas Potts) There is no error message when a + compiler is not supported. +Solution: Use ":compiler!" to set a compiler globally, otherwise it's local + to the buffer and "b:current_compiler" is used. Give an error + when no compiler script could be found. + Note: updated compiler plugins can be found at + ftp://ftp.vim.org/pub/vim/runtime/compiler/ +Files: runtime/compiler/msvc.vim, runtime/doc/quickfix.txt, src/eval.c, + src/ex_cmds2.c + +Patch 6.2.409 +Problem: The cursor ends up in the last column instead of after the line + when doing "i//<Esc>o" with 'indentexpr' set to "cindent(v:lnum)". + (Toby Allsopp) +Solution: Adjust the cursor as if in Insert mode. +Files: src/misc1.c + +Patch 6.2.410 (after 6.2.389) +Problem: In diff mode, when there are more filler lines than fit in the + window, they are not drawn. +Solution: Check for filler lines when skipping to draw a line that doesn't + fit. +Files: src/screen.c + +Patch 6.2.411 +Problem: A "\n" inside a string is not seen as a line break by the regular + expression matching. (Hari Krishna Dara) +Solution: Add the vim_regexec_nl() function for strings where "\n" is to be + matched with a line break. +Files: src/eval.c, src/ex_eval.c, src/proto/regexp.c, src/regexp.c + +Patch 6.2.412 +Problem: Ruby: "ruby << EOF" inside a function doesn't always work. Also + for ":python", ":tcl" and ":perl". +Solution: Check for "<< marker" and skip until "marker" before checking for + "endfunction". +Files: src/eval.c + +Patch 6.2.413 (after 6.2.411) +Problem: Missing prototype for vim_regexec_nl(). (Marcel Svitalsky) +Solution: Now really include the prototype. +Files: src/proto/regexp.pro + +Patch 6.2.414 +Problem: The function used for custom completion of user commands cannot + have <SID> to make it local. (Hari Krishna Dara) +Solution: Pass the SID of the script where the user command was defined on + to the completion. Also clean up #ifdefs. +Files: src/ex_docmd.c, src/eval.c, src/ex_getln.c, src/structs.h + +Patch 6.2.415 +Problem: Vim may crash after a sequence of events that change the window + size. The window layout assumes a larger window than is actually + available. (Servatius Brandt) +Solution: Invoke win_new_shellsize() from screenalloc() instead of from + set_shellsize(). +Files: src/screen.c, src/term.c + +Patch 6.2.416 +Problem: Compiler warning for incompatible pointer. +Solution: Remove the "&" in the call to poll(). (Xavier de Gaye) +Files: src/os_unix.c + +Patch 6.2.417 (after 6.2.393) +Problem: Many people forget that the '"' item in 'viminfo' needs to be + preceded with a backslash, +Solution: Add '<' as an alias for the '"' item. +Files: runtime/doc/options.txt, src/ops.c, src/option.c + +Patch 6.2.418 +Problem: Using ":nnoremap <F12> :echo "cheese" and ":cabbr cheese xxx": + when pressing <F12> still uses the abbreviation. (Hari Krishna) +Solution: Also apply "noremap" to abbreviations. +Files: src/getchar.c + +Patch 6.2.419 (extra) +Problem: Win32: Cannot open the Vim window inside another application. +Solution: Add the "-P" argument to specify the window title of the + application to run inside. (Zibo Zhao) +Files: runtime/doc/starting.txt, src/main.c, src/gui_w32.c, + src/gui_w48.c, src/if_ole.cpp, src/os_mswin.c, + src/proto/gui_w32.pro + +Patch 6.2.420 +Problem: Cannot specify a file to be edited in binary mode without setting + the global value of the 'binary' option. +Solution: Support ":edit ++bin file". +Files: runtime/doc/editing.txt, src/buffer.c, src/eval.c, src/ex_cmds.h, + src/ex_docmd.c, src/fileio.c, src/misc2.c + +Patch 6.2.421 +Problem: Cannot set the '[ and '] mark, which may be necessary when an + autocommand simulates reading a file. +Solution: Allow using "m[" and "m]". +Files: runtime/doc/motion.txt, src/mark.c + +Patch 6.2.422 +Problem: In CTRL-X completion messages the "/" makes them less readable. +Solution: Remove the slashes. (Antony Scriven) +Files: src/edit.c + +Patch 6.2.423 +Problem: ":vertical wincmd ]" does not split vertically. +Solution: Add "postponed_split_flags". +Files: src/ex_docmd.c, src/globals.h, src/if_cscope.c, src/tag.c + +Patch 6.2.424 +Problem: A BufEnter autocommand that sets an option stops 'mousefocus' from + working in Insert mode (Normal mode is OK). (Gregory Seidman) +Solution: In the Insert mode loop invoke gui_mouse_correct() when needed. +Files: src/edit.c + +Patch 6.2.425 +Problem: Vertical split and command line window: can only drag status line + above the cmdline window on the righthand side, not lefthand side. +Solution: Check the status line row instead of the window pointer. +Files: src/ui.c + +Patch 6.2.426 +Problem: A syntax region end match with a matchgroup that includes a line + break only highlights the last line with matchgroup. (Gary + Holloway) +Solution: Also use the line number of the position where the region + highlighting ends. +Files: src/syntax.c + +Patch 6.2.427 (extra) +Problem: When pasting a lot of text in a multi-byte encoding, conversion + from 'termencoding' to 'encoding' may fail for some characters. + (Kuang-che Wu) +Solution: When there is an incomplete byte sequence at the end of the read + text keep it for the next time. +Files: src/mbyte.c, src/os_amiga.c, src/os_mswin.c, src/proto/mbyte.pro, + src/proto/os_mswin.pro, src/ui.c + +Patch 6.2.428 +Problem: The X11 clipboard supports the Vim selection for char/line/block + mode, but since the encoding is not included can't copy/paste + between two Vims with a different 'encoding'. +Solution: Add a new selection format that includes the 'encoding'. Perform + conversion when necessary. +Files: src/gui_gtk_x11.c, src/ui.c, src/vim.h + +Patch 6.2.429 +Problem: Unix: glob() doesn't work for a directory with a single quote in + the name. (Nazri Ramliy) +Solution: When using the shell to expand, only put double quotes around + spaces and single quotes, not the whole thing. +Files: src/os_unix.c + +Patch 6.2.430 +Problem: BOM at start of a vim script file is not recognized and causes an + error message. +Solution: Detect the BOM and skip over it. Also fix that after using + ":scriptencoding" the iconv() file descriptor was not closed + (memory leak). +Files: src/ex_cmds2.c + +Patch 6.2.431 +Problem: When using the horizontal scrollbar, the scrolling is limited to + the length of the cursor line. +Solution: Make the scroll limit depend on the longest visible line. The + cursor is moved when necessary. Including the 'h' flag in + 'guioptions' disables this. +Files: runtime/doc/gui.txt, runtime/doc/options.txt, src/gui.c, + src/misc2.c, src/option.h + +Patch 6.2.432 (after 6.2.430 and 6.2.431) +Problem: Lint warnings. +Solution: Add type casts. +Files: src/ex_cmds2.c, src/gui.c + +Patch 6.2.433 +Problem: Translating "VISUAL" and "BLOCK" separately doesn't give a good + result. (Alejandro Lopez Valencia) +Solution: Use a string for each combination. +Files: src/screen.c + +Patch 6.2.434 (after 6.2.431) +Problem: Compiler warning. (Salman Halim) +Solution: Add type casts. +Files: src/gui.c + +Patch 6.2.435 +Problem: When there are vertically split windows the minimal Vim window + height is computed wrong. +Solution: Use frame_minheight() to correctly compute the minimal height. +Files: src/window.c + +Patch 6.2.436 +Problem: Running the tests changes the user's viminfo file. +Solution: In test 49 tell the extra Vim to use the test viminfo file. +Files: src/testdir/test49.vim + +Patch 6.2.437 +Problem: ":mksession" always puts "set nocompatible" in the session file. + This changes option settings. (Ron Aaron) +Solution: Add an "if" to only change 'compatible' when needed. +Files: src/ex_docmd.c + +Patch 6.2.438 +Problem: When the 'v' flag is present in 'cpoptions', backspacing and then + typing text again: one character too much is overtyped before + inserting is done again. +Solution: Set "dollar_vcol" to the right column. +Files: src/edit.c + +Patch 6.2.439 +Problem: GTK 2: Changing 'lines' may cause a mismatch between the window + layout and the size of the window. +Solution: Disable the hack with force_shell_resize_idle(). +Files: src/gui_gtk_x11.c + +Patch 6.2.440 +Problem: When 'lazyredraw' is set the window title is still updated. + The size of the Visual area and the ruler are displayed too often. +Solution: Postpone redrawing the window title. Only show the Visual area + size when waiting for a character. Don't draw the ruler + unnecessary. +Files: src/buffer.c, src/normal.c, src/screen.c + +Patch 6.2.441 +Problem: ":unabbreviate foo " doesn't work, because of the trailing space, + while an abbreviation with a trailing space is not possible. (Paul + Jolly) +Solution: Accept a match with the lhs of an abbreviation without the + trailing space. +Files: src/getchar.c + +Patch 6.2.442 +Problem: Cannot manipulate the command line from a function. +Solution: Add getcmdline(), getcmdpos() and setcmdpos() functions and the + CTRL-\ e command. +Files: runtime/doc/cmdline.txt, runtime/doc/eval.txt, src/eval.c + src/ex_getln.c, src/ops.c, src/proto/ex_getln.pro, + src/proto/ops.pro + +Patch 6.2.443 +Problem: With ":silent! echoerr something" you don't get the position of + the error. emsg() only writes the message itself and returns. +Solution: Also redirect the position of the error. +Files: src/message.c + +Patch 6.2.444 +Problem: When adding the 'c' flag to a ":substitute" command it may replace + more times than without the 'c' flag. Happens for a match that + starts with "\ze" (Marcel Svitalsk) and when using "\@<=" (Klaus + Bosau). +Solution: Correct "prev_matchcol" when replacing the line. Don't replace + the line when the pattern uses look-behind matching. +Files: src/ex_cmds.c, src/proto/regexp.pro, src/regexp.c + +Patch 6.2.445 +Problem: Copying vimtutor to /tmp/something is not secure, a symlink may + cause trouble. +Solution: Create a directory and create the file in it. Use "umask" to + create the directory with mode 700. (Stefan Nordhausen) +Files: src/vimtutor + +Patch 6.2.446 (after 6.2.404) +Problem: Using library functions wcwidth() and iswprint() results in + display problems for Hebrew characters. (Ron Aaron) +Solution: Disable the code to use the library functions, use our own. +Files: src/mbyte.c + +Patch 6.2.447 (after 6.2.440) +Problem: Now that the title is only updated when redrawing, it is no longer + possible to show it while executing a function. (Madoka Machitani) +Solution: Make ":redraw" also update the title. +Files: src/ex_docmd.c + +Patch 6.2.448 (after 6.2.427) +Problem: Mac: conversion done when 'termencoding' differs from 'encoding' + fails when pasting a longer text. +Solution: Check for an incomplete sequence at the end of the chunk to be + converted. (Eckehard Berns) +Files: src/mbyte.c + +Patch 6.2.449 (after 6.2.431) +Problem: Get error messages when switching files. +Solution: Check for a valid line number when calculating the width of the + horizontal scrollbar. (Helmut Stiegler) +Files: src/gui.c + +Patch 6.2.450 +Problem: " #include" and " #define" are not recognized with the default + option values for 'include' and 'defined'. (RG Kiran) +Solution: Adjust the default values to allow white space before the #. +Files: runtime/doc/options.txt, src/option.c + +Patch 6.2.451 +Problem: GTK: when using XIM there are various problems, including setting + 'modified' and breaking undo at the wrong moment. +Solution: Add "xim_changed_while_preediting", "preedit_end_col" and + im_is_preediting(). (Yasuhiro Matsumoto) +Files: src/ex_getln.c, src/globals.h, src/gui_gtk.c, src/gui_gtk_x11.c, + src/mbyte.c, src/misc1.c, src/proto/mbyte.pro, src/screen.c, + src/undo.c + +Patch 6.2.452 +Problem: In diff mode, when DiffAdd and DiffText highlight settings are + equal, an added line is highlighted with DiffChange. (Tom Schumm) +Solution: Remember the diff highlight type instead of the attributes. +Files: src/screen.c + +Patch 6.2.453 +Problem: ":s/foo\|\nbar/x/g" does not replace two times in "foo\nbar". + (Pavel Papushev) +Solution: When the pattern can match a line break also try matching at the + NUL at the end of a line. +Files: src/ex_cmds.c, src/regexp.c + +Patch 6.2.454 +Problem: ":let b:changedtick" doesn't work. (Alan Schmitt) ":let + b:changedtick = 99" does not give an error message. +Solution: Add code to recognize ":let b:changedtick". +Files: src/eval.c + +Patch 6.2.455 (after 6.2.297) +Problem: In Python commands the current locale changes how certain Python + functions work. (Eugene M. Minkovskii) +Solution: Set the LC_NUMERIC locale to "C" while executing a Python command. +Files: src/if_python.c + +Patch 6.2.456 (extra) +Problem: Win32: Editing a file by its Unicode name (dropping it on Vim or + using the file selection dialog) doesn't work. (Yakov Lerner, Alex + Jakushev) +Solution: Use wide character functions when file names are involved and + convert from/to 'encoding' where needed. +Files: src/gui_w48.c, src/macros.h, src/memfile.c, src/memline.c, + src/os_mswin.c, src/os_win32.c + +Patch 6.2.457 (after 6.2.244) +Problem: When 'encoding' is "utf-8" and writing text with chars above 0x80 + in latin1, conversion is wrong every 8200 bytes. (Oyvind Holm) +Solution: Correct the utf_ptr2len_check_len() function and fix the problem + of displaying 0xf7 in utfc_ptr2len_check_len(). +Files: src/mbyte.c + +Patch 6.2.458 +Problem: When 'virtualedit' is set "$" doesn't move to the end of an + unprintable character, causing "y$" not to include that character. + (Fred Ma) +Solution: Set "coladd" to move the cursor to the end of the character. +Files: src/misc2.c + +Patch 6.2.459 (after 6.2.454) +Problem: Variable "b" cannot be written. (Salman Halim) +Solution: Compare strings properly. +Files: src/eval.c + +Patch 6.2.460 (extra, after 6.2.456) +Problem: Compiler warnings for missing prototypes. +Solution: Include the missing prototypes. +Files: src/proto/os_win32.pro + +Patch 6.2.461 +Problem: After using a search command "x" starts putting single characters + in the numbered registers. +Solution: Reset "use_reg_one" at the right moment. +Files: src/normal.c + +Patch 6.2.462 +Problem: Finding a matching parenthesis does not correctly handle a + backslash in a trailing byte. +Solution: Handle multi-byte characters correctly. (Taro Muraoka) +Files: src/search.c + +Patch 6.2.463 (extra) +Problem: Win32: An NTFS file system may contain files with extra info + streams. The current method to copy them creates one and then + deletes it again. (Peter Toennies) Also, only three streams with + hard coded names are copied. +Solution: Use BackupRead() to check which info streams the original file + contains and only copy these streams. +Files: src/os_win32.c + +Patch 6.2.464 (extra, after 6.2.427) +Problem: Amiga: Compilation error with gcc. (Ali Akcaagac) +Solution: Move the #ifdef outside of Read(). +Files: src/os_amiga.c + +Patch 6.2.465 +Problem: When resizing the GUI window the window manager sometimes moves it + left of or above the screen. (Michael McCarty) +Solution: Check the window position after resizing it and move it onto the + screen when it isn't. +Files: src/gui.c + +Patch 6.2.466 (extra, after 6.2.456) +Problem: Win32: Compiling with Borland C fails, and an un/signed warning. +Solution: Redefine wcsicmp() to wcscmpi() and add type casts. (Yasuhiro + Matsumoto) +Files: src/os_win32.c + +Patch 6.2.467 (extra, after 6.2.463) +Problem: Win32: can't compile without multi-byte feature. (Ajit Thakkar) +Solution: Add #ifdefs around the info stream code. +Files: src/os_win32.c + +Patch 6.2.468 +Problem: Compiler warnings for shadowed variables. (Matthias Mohr) +Solution: Delete superfluous variables and rename others. +Files: src/eval.c, src/ex_docmd.c, src/ex_eval.c, src/if_cscope.c, + src/fold.c, src/option.c, src/os_unix.c, src/quickfix.c, + src/regexp.c + +Patch 6.2.469 (extra, after 6.2.456) +Problem: Win32: Can't create swap file when 'encoding' differs from the + active code page. (Kriton Kyrimis) +Solution: In enc_to_ucs2() terminate the converted string with a NUL +Files: src/os_mswin.c + +Patch 6.2.470 +Problem: The name returned by tempname() may be equal to the file used for + shell output when ignoring case. +Solution: Skip 'O' and 'I' in tempname(). +Files: src/eval.c + +Patch 6.2.471 +Problem: "-L/usr/lib" is used in the link command, even though it's + supposed to be filtered out. "-lw" and "-ldl" are not + automatically added when needed for "-lXmu". (Antonio Colombo) +Solution: Check for a space after the argument instead of before. Also + remove "-R/usr/lib" if it's there. Check for "-lw" and "-ldl" + before trying "-lXmu". +Files: src/auto/configure, src/configure.in, src/link.sh + +Patch 6.2.472 +Problem: When using a FileChangedShell autocommand that changes the current + buffer, a buffer exists that can't be wiped out. + Also, Vim sometimes crashes when executing an external command + that changes the buffer and a FileChangedShell autocommand is + used. (Hari Krishna Dara) + Users are confused by the warning for a file being changed outside + of Vim. +Solution: Avoid that the window counter for a buffer is incremented twice. + Avoid that buf_check_timestamp() is used recursively. + Add a hint to look in the help for more info. +Files: src/ex_cmds.c, src/fileio.c + +Patch 6.2.473 +Problem: Using CTRL-] in a help buffer without a name causes a crash. +Solution: Check for name to be present before using it. (Taro Muraoka) +Files: src/tag.c + +Patch 6.2.474 (extra, after 6.2.456) +Problem: When Vim is starting up conversion is done unnecessarily. Failure + to find the runtime files on Windows 98. (Randall W. Morris) +Solution: Init enc_codepage negative, only use it when not negative. + Don't use GetFileAttributesW() on Windows 98 or earlier. +Files: src/globals.h, src/gui_w32.c, src/gui_w48.c, src/os_mswin.c, + src/os_win32.c + +Patch 6.2.475 +Problem: Commands after "perl <<EOF" are parsed as Vim commands when they + are not executed. +Solution: Properly skip over the perl commands. +Files: src/ex_docmd.c, src/ex_getln.c, src/if_perl.xs, src/if_python.c, + src/if_ruby.c, src/if_tcl.c, src/misc2.c + +Patch 6.2.476 +Problem: When reloading a hidden buffer changed outside of Vim and the + current buffer is read-only, the reloaded buffer becomes + read-only. (Hari Krishna Dara) +Solution: Save the 'readonly' flag of the reloaded buffer instead of the + current buffer. +Files: src/fileio.c + +Patch 6.2.477 +Problem: Using remote_send(v:servername, "\<C-V>") causes Vim to hang. + (Yakov Lerner) +Solution: When the resulting string is empty don't set received_from_client. +Files: src/main.c + +Patch 6.2.478 +Problem: Win32: "--remote file" fails changing directory if the current + directory name starts with a single quote. (Iestyn Walters) +Solution: Add a backslash where it will be removed later. +Files: src/main.c, src/misc2.c, src/proto/misc2.pro + +Patch 6.2.479 +Problem: The error message for errors during recovery goes unnoticed. +Solution: Avoid that the hit-enter prompt overwrites the message. Add a few + lines to make the error stand out. +Files: src/main.c, src/message.c, src/memline.c + +Patch 6.2.480 +Problem: NetBeans: Using negative index in array. backslash at end of + message may cause Vim to crash. (Xavier de Gaye) +Solution: Initialize buf_list_used to zero. Check for trailing backslash. +Files: src/netbeans.c + +Patch 6.2.481 +Problem: When writing a file it is not possible to specify that hard and/or + symlinks are to be broken instead of preserved. +Solution: Add the "breaksymlink" and "breakhardlink" values to 'backupcopy'. + (Simon Ekstrand) +Files: runtime/doc/options.txt, src/fileio.c, src/option.c, src/option.h + +Patch 6.2.482 +Problem: Repeating insert of CTRL-K 1 S doesn't work. The superscript 1 is + considered to be a digit. (Juergen Kraemer) +Solution: In vim_isdigit() only accept '0' to '9'. Use VIM_ISDIGIT() for + speed where possible. Also add vim_isxdigit(). +Files: src/buffer.c, src/charset.c, src/diff.c, src/digraph.c, + src/edit.c, src/eval.c,, src/ex_cmds.c, src/ex_cmds2.c, + src/ex_docmd.c, src/ex_eval.c, src/ex_getln.c, + src/if_xcmdsrv.c, src/farsi.c, src/fileio.c, src/fold.c, + src/getchar.c, src/gui.c, src/if_cscope.c, src/macros.h, + src/main.c, src/mark.c, src/mbyte.c, src/menu.c, src/misc1.c, + src/misc2.c, src/normal.c, src/ops.c, src/option.c, + src/proto/charset.pro, src/regexp.c, src/screen.c, src/search.c, + src/syntax.c, src/tag.c, src/term.c, src/termlib.c + +Patch 6.2.483 (extra, after 6.2.482) +Problem: See 6.2.482. +Solution: Extra part of patch 6.2.482. +Files: src/gui_photon.c, src/gui_w48.c, src/os_msdos.c, src/os_mswin.c + +Patch 6.2.484 +Problem: MS-Windows: With the included diff.exe, differences after a CTRL-Z + are not recognized. (Peter Keresztes) +Solution: Write the files with unix fileformat and invoke diff with --binary + if possible. +Files: src/diff.c + +Patch 6.2.485 +Problem: A BufWriteCmd autocommand cannot know if "!" was used or not. + (Hari Krishna Dara) +Solution: Add the v:cmdbang variable. +Files: runtime/doc/eval.txt, src/eval.c, src/proto/eval.pro, + src/fileio.c, src/vim.h + +Patch 6.2.486 (6.2.482) +Problem: Diff for eval.c is missing. +Solution: Addition to patch 6.2.482. +Files: src/eval.c + +Patch 6.2.487 (extra, after 6.2.456) +Problem: Compiler warnings for wrong prototype. (Alejandro Lopez Valencia) +Solution: Delete the prototype for Handle_WM_Notify(). +Files: src/proto/gui_w32.pro + +Patch 6.2.488 +Problem: Missing ")" in *.ch filetype detection. +Solution: Add the ")". (Ciaran McCreesh) +Files: runtime/filetype.vim + +Patch 6.2.489 +Problem: When accidentally opening a session in Vim which has already been + opened in another Vim there is a long row of ATTENTION prompts. + Need to quit each of them to get out. (Robert Webb) +Solution: Add the "Abort" alternative to the dialog. +Files: src/memline.c + +Patch 6.2.490 +Problem: With 'paragraph' it is not possible to use a single dot as a + paragraph boundary. (Dorai Sitaram) +Solution: Allow using " " (two spaces) in 'paragraph' to match ".$" or + ". $" +Files: src/search.c + +Patch 6.2.491 +Problem: Decrementing a position doesn't take care of multi-byte chars. +Solution: Adjust the column for multi-byte characters. Remove mb_dec(). + (Yasuhiro Matsumoto) +Files: src/mbyte.c, src/misc2.c, src/proto/mbyte.pro + +Patch 6.2.492 +Problem: When using ":redraw" while there is a message, the next ":echo" + still causes text to scroll. (Yasuhiro Matsumoto) +Solution: Reset msg_didout and msg_col, so that after ":redraw" the next + message overwrites an existing one. +Files: src/ex_docmd.c + +Patch 6.2.493 +Problem: "@x" doesn't work when 'insertmode' is set. (Benji Fisher) +Solution: Put "restart_edit" in the typeahead buffer, so that it's used + after executing the register contents. +Files: src/ops.c + +Patch 6.2.494 +Problem: Using diff mode with two windows, when moving horizontally in + inserted lines, a fold in the other window may open. +Solution: Compute the line number in the other window correctly. +Files: src/diff.c + +Patch 6.2.495 (extra, after 6.2.456) +Problem: Win32: The file dialog doesn't work on Windows 95. +Solution: Put the wide code of gui_mch_browse() in gui_mch_browseW() and use + it only on Windows NT/2000/XP. +Files: src/gui_w32.c, src/gui_w48.c + +Patch 6.2.496 +Problem: FreeBSD 4.x: When compiled with the pthread library (Python) a + complicated pattern may cause Vim to crash. Catching the signal + doesn't work. +Solution: When compiled with threads, instead of using the normal stacksize + limit, use the size of the initial stack. +Files: src/auto/configure, src/config.h.in, src/configure.in, + src/os_unix.c + +Patch 6.2.497 (extra) +Problem: Russian messages are only available in one encoding. +Solution: Convert the messages to MS-Windows codepages. (Vassily Ragosin) +Files: src/po/Makefile + +Patch 6.2.498 +Problem: Non-latin1 help files are not properly supported. +Solution: Support utf-8 help files and convert them to 'encoding' when + needed. +Files: src/fileio.c + +Patch 6.2.499 +Problem: When writing a file and halting the system, the file might be lost + when using a journaling file system. +Solution: Use fsync() to flush the file data to disk after writing a file. + (Radim Kolar) +Files: src/fileio.c + +Patch 6.2.500 (extra) +Problem: The DOS/MS-Windows the installer doesn't use the --binary flag for + diff. +Solution: Add --binary to the diff argument in MyDiff(). (Alejandro Lopez- + Valencia) +Files: src/dosinst.c + +Patch 6.2.501 +Problem: Vim does not compile with MorphOS. +Solution: Add a Makefile and a few changes to make Vim work with MorphOS. + (Ali Akcaagac) +Files: runtime/doc/os_amiga.txt, src/INSTALLami.txt, + src/Make_morphos.mak, src/memfile.c, src/term.c + +Patch 6.2.502 +Problem: Building fails for generating message files. +Solution: Add dummy message files. +Files: src/po/ca.po, src/po/ru.po, src/po/sv.po + +Patch 6.2.503 +Problem: Mac: Can't compile MacRoman conversions without the GUI. +Solution: Also link with the Carbon framework for the terminal version, for + the MacRoman conversion functions. (Eckehard Berns) + Remove -ltermcap from the GUI link command, it is not needed. +Files: src/auto/configure, src/Makefile, src/configure.in + +Patch 6.2.504 +Problem: Various problems with 'cindent', among which that a + list of variable declarations is not indented properly. +Solution: Fix the wrong indenting. Improve indenting of C++ methods. + Add the 'i', 'b' and 'W' options to 'cinoptions'. (mostly by + Helmut Stiegler) + Improve indenting of preprocessor-continuation lines. +Files: runtime/doc/indent.txt, src/misc1.c, src/testdir/test3.in, + src/testdir/test3.ok + +Patch 6.2.505 +Problem: Help for -P argument is missing. (Ronald Hoellwarth) +Solution: Add the patch that was missing in 6.2.419. +Files: runtime/doc/starting.txt + +Patch 6.2.506 (extra) +Problem: Win32: When 'encoding' is a codepage then reading a utf-8 file + only works when iconv is available. Writing a file in another + codepage uses the wrong kind of conversion. +Solution: Use internal conversion functions. Enable reading and writing + files with 'fileencoding' different from 'encoding' for all valid + codepages and utf-8 without the need for iconv. +Files: src/fileio.c, src/testdir/Make_dos.mak, src/testdir/test52.in, + src/testdir/test52.ok + +Patch 6.2.507 +Problem: The ownership of the file with the password for the NetBeans + connection is not checked. "-nb={file}" doesn't work for GTK. +Solution: Only accept the file when owned by the user and not accessible by + others. Detect "-nb=" for GTK. +Files: src/netbeans.c, src/gui_gtk_x11.c + +Patch 6.2.508 +Problem: Win32: "v:lang" does not show the current language for messages if + it differs from the other locale settings. +Solution: Use the value of the $LC_MESSAGES environment variable. +Files: src/ex_cmds2.c + +Patch 6.2.509 (after 6.2.508) +Problem: Crash when $LANG is not set. +Solution: Add check for NULL pointer. (Ron Aaron) +Files: src/ex_cmds2.c + +Patch 6.2.510 (after 6.2.507) +Problem: Warning for pointer conversion. +Solution: Add a type cast. +Files: src/gui_gtk_x11.c + +Patch 6.2.511 +Problem: Tags in Russian help files are in utf-8 encoding, which may be + different from 'encoding'. +Solution: Use the "TAG_FILE_ENCODING" field in the tags file to specify the + encoding of the tags. Convert help tags from 'encoding' to the + tag file encoding when searching for matches, do the reverse when + listing help tags. +Files: runtime/doc/tagsrch.txt, src/ex_cmds.c, src/tag.c + +Patch 6.2.512 +Problem: Translating "\"\n" is useless. (Gerfried Fuchs) +Solution: Remove the _() around it. +Files: src/main.c, src/memline.c + +Patch 6.2.513 (after 6.2.507) +Problem: NetBeans: the check for owning the connection info file can be + simplified. (Nikolay Molchanov) +Solution: Only check if the access mode is right. +Files: src/netbeans.c + +Patch 6.2.514 +Problem: When a highlight/syntax group name contains invalid characters + there is no warning. +Solution: Add an error for unprintable characters and a warning for other + invalid characters. +Files: src/syntax.c + +Patch 6.2.515 +Problem: When using the options window 'swapfile' is reset. +Solution: Use ":setlocal" instead of ":set". +Files: runtime/optwin.vim + +Patch 6.2.516 +Problem: The sign column cannot be seen, looks like there are two spaces + before the text. (Rob Retter) +Solution: Add the SignColumn highlight group. +Files: runtime/doc/options.txt, runtime/doc/sign.txt, src/option.c, + src/screen.c, src/syntax.c, src/vim.h + +Patch 6.2.517 +Problem: Using "r*" in Visual mode on multi-byte characters replaces + too many characters. In Visual Block mode replacing with a + multi-byte character doesn't work. +Solution: Adjust the operator end for the difference in byte length of the + original and the replaced character. Insert all bytes of a + multi-byte character, take care of double-wide characters. +Files: src/ops.c + +Patch 6.2.518 +Problem: Last line of a window is not updated after using "J" and then "D". + (Adri Verhoef) +Solution: When no line is found below a change that doesn't need updating, + update all lines below the change. +Files: src/screen.c + +Patch 6.2.519 +Problem: Mac: cannot read/write files in MacRoman format. +Solution: Do internal conversion from/to MacRoman to/from utf-8 and latin1. + (Eckehard Berns) +Files: src/fileio.c + +Patch 6.2.520 (extra) +Problem: The NSIS installer is outdated. +Solution: Make it work with NSIS 2.0. Also include console executables for + Win 95/98/ME and Win NT/2000/XP. Use LZWA compression. Use + "/oname" to avoid having to rename files before running NSIS. +Files: Makefile, nsis/gvim.nsi + +Patch 6.2.521 +Problem: When using silent Ex mode the "changing a readonly file" warning + is omitted but the one second wait isn't. (Yakov Lerner) +Solution: Skip the delay when "silent_mode" is set. +Files: src/misc1.c + +Patch 6.2.522 +Problem: GUI: when changing 'cmdheight' in the gvimrc file the window + layout is messed up. (Keith Dart) +Solution: Skip updating the window layout when changing 'cmdheight' while + still starting up. +Files: src/option.c + +Patch 6.2.523 +Problem: When loading a session and aborting when a swap file already + exists, the user is left with useless windows. (Robert Webb) +Solution: Load one file before creating the windows. +Files: src/ex_docmd.c + +Patch 6.2.524 (extra, after 6.2.520) +Problem: Win32: (un)installing gvimext.dll may fail if it was used. + The desktop and start menu links are created for the current user + instead of all users. + Using the home directory as working directory for the links is a + bad idea for multi-user systems. + Cannot use Vim from the "Open With..." menu. +Solution: Force a reboot if necessary. (Alejandro Lopez-Valencia) Also use + macros for the directory of the source and runtime files. Use + "CSIDL_COMMON_*" instead of "CSIDL_*" when possible. + Do not specify a working directory in the links. + Add Vim to the "Open With..." menu. (Giuseppe Bilotta) +Files: nsis/gvim.nsi, src/dosinst.c, src/dosinst.h, src/uninstal.c + +Patch 6.2.525 +Problem: When the history contains a very long line ":history" causes a + crash. (Volker Kiefel) +Solution: Shorten the history entry to fit it in one line. +Files: src/ex_getln.c + +Patch 6.2.526 +Problem: When s:lang is "ja" the Japanese menus are not used. +Solution: Add 'encoding' to the language when there is no charset. +Files: runtime/menu.vim + +Patch 6.2.527 +Problem: The 2html script uses ":wincmd p", which breaks when using some + autocommands. +Solution: Remember the window numbers and jump to them with ":wincmd w". + Also add XHTML support. (Panagiotis Issaris) +Files: runtime/syntax/2html.vim + +Patch 6.2.528 +Problem: NetBeans: Changes of the "~" command are not reported. +Solution: Call netbeans_inserted() after performing "~". (Gordon Prieur) + Also change NetBeans debugging to append to the log file. + Also fix that "~" in Visual block mode changes too much if there + are multi-byte characters. +Files: src/nbdebug.c, src/normal.c, src/ops.c + +Patch 6.2.529 (extra) +Problem: VisVim only works for Admin. Doing it for one user doesn't work. + (Alexandre Gouraud) +Solution: When registering the module fails, simply continue. +Files: src/VisVim/VisVim.cpp + +Patch 6.2.530 +Problem: Warning for missing prototype on the Amiga. +Solution: Include time.h +Files: src/version.c + +Patch 6.2.531 +Problem: In silent ex mode no messages are given, which makes debugging + very difficult. +Solution: Do output messages when 'verbose' is set. +Files: src/message.c, src/ui.c + +Patch 6.2.532 (extra) +Problem: Compiling for Win32s with VC 4.1 doesn't work. +Solution: Don't use CP_UTF8 if it's not defined. Don't use CSIDL_COMMON* + when not defined. +Files: src/dosinst.h, src/fileio.c + +Win32 console: After patch 6.2.398 Ex mode did not work. (Yasuhiro Matsumoto) + +Patch 6.3a.001 +Problem: Win32: if testing for the "--binary" option fails, diff isn't used + at all. +Solution: Handle the "ok" flag properly. (Yasuhiro Matsumoto) +Files: src/diff.c + +Patch 6.3a.002 +Problem: NetBeans: An insert command from NetBeans beyond the end of a + buffer crashes Vim. (Xavier de Gaye) +Solution: Use a local pos_T structure for the position. +Files: src/netbeans.c + +Patch 6.3a.003 +Problem: E315 error with auto-formatting comments. (Henry Van Roessel) +Solution: Pass the line number to same_leader(). +Files: src/ops.c + +Patch 6.3a.004 +Problem: Test32 fails on Windows XP for the DJGPP version. Renaming + test11.out fails. +Solution: Don't try renaming, create new files to use for the test. +Files: src/testdir/test32.in, src/testdir/test32.ok + +Patch 6.3a.005 +Problem: ":checkpath!" does not use 'includeexpr'. +Solution: Use a file name that was found directly. When a file was not + found and the located name is empty, use the rest of the line. +Files: src/search.c + +Patch 6.3a.006 +Problem: "yip" moves the cursor to the first yanked line, but not to the + first column. Looks like not all text was yanked. (Jens Paulus) +Solution: Move the cursor to the first column. +Files: src/search.c + +Patch 6.3a.007 +Problem: 'cindent' recognizes "enum" but not "typedef enum". +Solution: Skip over "typedef" before checking for "enum". (Helmut Stiegler) + Also avoid that searching for this item goes too far back. +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + +Patch 6.3a.008 (extra) +Problem: Windows 98: Some of the wide functions are not implemented, + resulting in file I/O to fail. This depends on what Unicode + support is installed. +Solution: Handle the failure and fall back to non-wide functions. +Files: src/os_win32.c + +Patch 6.3a.009 +Problem: Win32: Completion of filenames does not work properly when + 'encoding' differs from the active code page. +Solution: Use wide functions for expanding wildcards when appropriate. +Files: src/misc1.c + +Patch 6.3a.010 (extra) +Problem: Win32: Characters in the window title that do not appear in the + active codepage are replaced by a question mark. +Solution: Use DefWindowProcW() instead of DefWindowProc() when possible. +Files: src/glbl_ime.cpp, src/globals.h, src/proto/gui_w16.pro, + src/proto/gui_w32.pro, src/gui_w16.c, src/gui_w32.c, src/gui_w48.c + +Patch 6.3a.011 +Problem: Using the explorer plugin changes a local directory to the global + directory. +Solution: Don't use ":chdir" to restore the current directory. Make + "expand('%:p')" remove "/../" and "/./" items from the path. +Files: runtime/plugin/explorer.vim, src/eval.c, src/os_unix.c + +Patch 6.3a.012 (extra) +Problem: On Windows 98 the installer doesn't work, don't even get the "I + agree" button. The check for the path ending in "vim" makes the + browse dialog hard to use. The default path when no previous Vim + is installed is "c:\vim" instead of "c:\Program Files\Vim". +Solution: Remove the background gradient command. Change the + .onVerifyInstDir function to a leave function for the directory + page. Don't let the install program default to c:\vim when no + path could be found. +Files: nsis/gvim.nsi, src/dosinst.c + +Patch 6.3a.013 (extra) +Problem: Win32: Characters in the menu that are not in the active codepage + are garbled. +Solution: Convert menu strings from 'encoding' to the active codepage. +Files: src/gui_w32.c, src/gui_w48.c + +Patch 6.3a.014 +Problem: Using multi-byte text and highlighting in a statusline causes gaps + to appear. (Helmut Stiegler) +Solution: Advance the column by text width instead of number of bytes. Add + the vim_strnsize() function. +Files: src/charset.c, src/proto/charset.pro, src/screen.c + +Patch 6.3a.015 +Problem: Using the "select all" menu item when 'insertmode' is set and + clicking the mouse button doesn't return to Insert mode. The + Buffers/Delete menu doesn't offer a choice to abandon a changed + buffer. (Jens Paulus) +Solution: Don't use CTRL-\ CTRL-N. Add ":confirm" for the Buffers menu + items. +Files: runtime/menu.vim + +Patch 6.3a.016 +Problem: After cancelling the ":confirm" dialog the error message and + hit-enter prompt may not be displayed properly. +Solution: Flush output after showing the dialog. +Files: src/message.c + +Patch 6.3a.017 +Problem: servername() doesn't work when Vim was started with the "-X" + argument or when the "exclude" in 'clipboard' matches the terminal + name. (Robert Nowotniak) +Solution: Force connecting to the X server when using client-server + commands. +Files: src/eval.c, src/globals.h, src/os_unix.c + +Patch 6.3a.018 (after 6.3a.017) +Problem: Compiler warning for return value of make_connection(). +Solution: Use void return type. +Files: src/eval.c + +Patch 6.3a.019 (extra) +Problem: Win32: typing non-latin1 characters doesn't work. +Solution: Invoke _OnChar() directly to avoid that the argument is truncated + to a byte. Convert the UTF-16 character to bytes according to + 'encoding' and ignore 'termencoding'. Same for _OnSysChar(). +Files: src/gui_w32.c, src/gui_w48.c + +Patch 6.3a.020 (extra) +Problem: Missing support for AROS (AmigaOS reimplementation). Amiga GUI + doesn't work. +Solution: Add AROS support. (Adam Chodorowski) + Fix Amiga GUI problems. (Georg Steger, Ali Akcaagac) +Files: Makefile, src/Make_aros.mak, src/gui_amiga.c, src/gui_amiga.h, + src/memfile.c, src/os_amiga.c, src/term.c + +Patch 6.3a.021 (after 6.3a.017) +Problem: Can't compile with X11 but without GUI. +Solution: Put use of "gui.in_use" inside an #ifdef. +Files: src/eval.c + +Patch 6.3a.022 +Problem: When typing Tabs when 'softtabstop' is used and 'list' is set a + tab is counted for two spaces. +Solution: Use the "L" flag in 'cpoptions' to tell whether a tab is counted + as two spaces or as 'tabstop'. (Antony Scriven) +Files: runtime/doc/options.txt, src/edit.c + +Patch 6.3a.023 +Problem: Completion on the command line doesn't handle backslashes + properly. Only the tail of matches is shown, even when not + completing filenames. +Solution: When turning the string into a pattern double backslashes. Don't + omit the path when not expanding files or directories. +Files: src/ex_getln.c + +Patch 6.3a.024 +Problem: The "save all" toolbar item fails for buffers that don't have a + name. When using ":wa" or closing the Vim window and there are + nameless buffers, browsing for a name may cause the name being + given to the wrong buffer or not stored properly. ":browse" only + worked for one file. +Solution: Use ":confirm browse" for "save all". + Pass buffer argument to setfname(). Restore "browse" flag and + "forceit" after doing the work for one file. +Files: runtime/menu.vim, src/buffer.c, src/ex_cmds.c, src/ex_cmds2.c, + src/ex_docmd.c, src/ex_getln.c, src/fileio.c, src/memline.c, + src/message.c, src/window.c, src/proto/buffer.pro, + src/proto/ex_cmds2.pro, src/proto/memline.pro + +Patch 6.3a.025 +Problem: Setting 'virtualedit' moves the cursor. (Benji Fisher) +Solution: Update the virtual column before using it. +Files: src/option.c + +Patch 6.3a.026 (extra, after 6.3a.008) +Problem: Editing files on Windows 98 doesn't work when 'encoding' is + "utf-8" (Antoine Mechelynck) + Warning for missing function prototype. +Solution: For all wide functions check if it failed because it is not + implemented. Use ANSI function declaration for char_to_string(). +Files: src/gui_w48.c, src/os_mswin.c, src/os_win32.c + +Patch 6.3a.027 (extra, after 6.3a.026) +Problem: Compiler warning for function argument. +Solution: Declare both char and WCHAR arrays. +Files: src/gui_w48.c + +Patch 6.3a.028 +Problem: ":normal ." doesn't work inside a function, because redo is saved + and restored. (Benji Fisher) +Solution: Make a copy of the redo buffer when executing a function. +Files: src/getchar.c + +Patch 6.3b.001 (extra) +Problem: Bcc 5: The generated auto/pathdef can't be compiled. +Solution: Fix the way quotes and backslashes are escaped. +Files: src/Make_bc5.mak + +Patch 6.3b.002 +Problem: Win32: conversion during file write fails when a double-byte + character is split over two writes. +Solution: Fix the conversion retry without a trailing byte. (Taro Muraoka) +Files: src/fileio.c + +Patch 6.3b.003 (extra) +Problem: Win32: When compiling with Borland C 5.5 and 'encoding' is "utf-8" + then Vim can't open files under MS-Windows 98. (Antoine J. + Mechelynck) +Solution: Don't use _wstat(), _wopen() and _wfopen() in this situation. +Files: src/os_mswin.c, src/os_win32.c + +Patch 6.3b.004 +Problem: ":helpgrep" includes a trailing CR in the text line. +Solution: Remove the CR. +Files: src/quickfix.c + +Patch 6.3b.005 +Problem: ":echo &g:ai" results in the local option value. (Salman Halim) +Solution: Pass the flags from find_option_end() to get_option_value(). +Files: src/eval.c + +Patch 6.3b.006 +Problem: When using "mswin.vim", CTRL-V in Insert mode leaves cursor before + last pasted character. (Mathew Davis) +Solution: Use the same Paste() function as in menu.vim. +Files: runtime/mswin.vim + +Patch 6.3b.007 +Problem: Session file doesn't restore view on windows properly. (Robert + Webb) +Solution: Restore window sizes both before and after restoring the view, so + that the view, cursor position and size are restored properly. +Files: src/ex_docmd.c + +Patch 6.3b.008 +Problem: Using ":finally" in a user command doesn't always work. (Hari + Krishna Dara) +Solution: Don't assume that using getexline() means the command was typed. +Files: src/ex_docmd.c + +Patch 6.3b.009 (extra) +Problem: Win32: When the -P argument is not found in a window title, there + is no error message. +Solution: When the window can't be found give an error message and exit. + Also use try/except to catch failing to open the MDI window. + (Michael Wookey) +Files: src/gui_w32.c + +Patch 6.3b.010 +Problem: Win32: Using the "-D" argument and expanding arguments may cause a + hang, because the terminal isn't initialized yet. (Vince Negri) +Solution: Don't go into debug mode before the terminal is initialized. +Files: src/main.c + +Patch 6.3b.011 +Problem: Using CTRL-\ e while obtaining an expression aborts the command + line. (Hari Krishna Dara) +Solution: Insert the CTRL-\ e as typed. +Files: src/ex_getln.c + +Patch 6.3b.012 (after 6.3b.010) +Problem: Can't compile with tiny features. (Norbert Tretkowski) +Solution: Add #ifdefs. +Files: src/main.c + +Patch 6.3b.013 +Problem: Loading a session file results in editing the wrong file in the + first window when this is not the file at the current position in + the argument list. (Robert Webb) +Solution: Check w_arg_idx_invalid to decide whether to edit a file. +Files: src/ex_docmd.c + +Patch 6.3b.014 +Problem: ":runtime! foo*.vim" may using freed memory when a sourced script + changes the value of 'runtimepath'. +Solution: Make a copy of 'runtimepath' when looping over the matches. +Files: src/ex_cmds2.c + +Patch 6.3b.015 +Problem: Get lalloc(0) error when using "p" in Visual mode while + 'clipboard' contains "autoselect,unnamed". (Mark Wagonner) +Solution: Avoid allocating zero bytes. Obtain the clipboard when necessary. +Files: src/ops.c + +Patch 6.3b.016 +Problem: When 'virtualedit' is used "x" doesn't delete the last character + of a line that has as many characters as 'columns'. (Yakov Lerner) +Solution: When the cursor isn't moved let oneright() return FAIL. +Files: src/edit.c + +Patch 6.3b.017 +Problem: Win32: "vim --remote-wait" doesn't exit when the server finished + editing the file. (David Fishburn) +Solution: In the rrhelper plugin change backslashes to forward slashes and + escape special characters. +Files: runtime/plugin/rrhelper.vim + +Patch 6.3b.018 +Problem: The list of help files in the "local additions" table doesn't + recognize utf-8 encoding. (Yasuhiro Matsumoto) +Solution: Recognize utf-8 characters. +Files: src/ex_cmds.c + +Patch 6.3b.019 +Problem: When $VIMRUNTIME is not a full path name the "local additions" + table lists all the help files. +Solution: Use fullpathcmp() instead of fnamecmp() to compare the directory + names. +Files: src/ex_cmds.c + +Patch 6.3b.020 +Problem: When using CTRL-^ when entering a search string, the item in the + statusline that indicates the keymap is not updated. (Ilya + Dogolazky) +Solution: Mark the statuslines for updating. +Files: src/ex_getln.c + +Patch 6.3b.021 +Problem: The swapfile is not readable for others, the ATTENTION prompt does + not show all info when someone else is editing the same file. + (Marcel Svitalsky) +Solution: Use the protection of original file for the swapfile and set it + after creating the swapfile. +Files: src/fileio.c + +Patch 6.3b.022 +Problem: Using "4v" to select four times the old Visual area may put the + cursor beyond the end of the line. (Jens Paulus) +Solution: Correct the cursor column. +Files: src/normal.c + +Patch 6.3b.023 +Problem: When "3dip" starts in an empty line, white lines after the + non-white lines are not deleted. (Jens Paulus) +Solution: Include the white lines. +Files: src/search.c + +Patch 6.3b.024 +Problem: "2daw" does not delete leading white space like "daw" does. (Jens + Paulus) +Solution: Include the white space when a count is used. +Files: src/search.c + +Patch 6.3b.025 +Problem: Percentage in ruler isn't updated when a line is deleted. (Jens + Paulus) +Solution: Check for a change in line count when deciding to update the ruler. +Files: src/screen.c, src/structs.h + +Patch 6.3b.026 +Problem: When selecting "abort" at the ATTENTION prompt for a file that is + already being edited Vim crashes. +Solution: Don't abort creating a new buffer when we really need it. +Files: src/buffer.c, src/vim.h + +Patch 6.3b.027 +Problem: Win32: When enabling the menu in a maximized window, Vim uses more + lines than what is room for. (Shizhu Pan) +Solution: When deciding to call shell_resized(), also compare the text area + size with Rows and Columns, not just with screen_Rows and + screen_Columns. +Files: src/gui.c + +Patch 6.3b.028 +Problem: When in diff mode, setting 'rightleft' causes a crash. (Eddine) +Solution: Check for last column differently when 'rightleft' is set. +Files: src/screen.c + +Patch 6.3b.029 +Problem: Win32: warning for uninitialized variable. +Solution: Initialize to zero. +Files: src/misc1.c + +Patch 6.3b.030 +Problem: After Visually selecting four characters, changing it to other + text, Visually selecting and yanking two characters: "." changes + four characters, another "." changes two characters. (Robert Webb) +Solution: Don't store the size of the Visual area when redo is active. +Files: src/normal.c + +============================================================================== +VERSION 6.4 *version-6.4* + +This section is about improvements made between version 6.3 and 6.4. + +This is a bug-fix release. There are also a few new features. The major +number of new items is in the runtime files and translations. + +The big MS-Windows version now uses: + Ruby version 1.8.3 + Perl version 5.8.7 + Python version 2.4.2 + + +Changed *changed-6.4* +------- + +Removed runtime/tools/tcltags, Exuberant ctags does it better. + + +Added *added-6.4* +----- + +Alsaconf syntax file (Nikolai Weibull) +Eruby syntax, indent, compiler and ftplugin file (Doug Kearns) +Esterel syntax file (Maurizio Tranchero) +Mathematica indent file (Steve Layland) +Netrc syntax file (Nikolai Weibull) +PHP compiler file (Doug Kearns) +Pascal indent file (Neil Carter) +Prescribe syntax file (Klaus Muth) +Rubyunit compiler file (Doug Kearns) +SMTPrc syntax file (Kornel Kielczewski) +Sudoers syntax file (Nikolai Weibull) +TPP syntax file (Gerfried Fuchs) +VHDL ftplugin file (R. Shankar) +Verilog-AMS syntax file (S. Myles Prather) + +Bulgarian keymap (Alberto Mardegan) +Canadian keymap (Eric Joanis) + +Hungarian menu translations in UTF-8 (Kantra Gergely) +Ukrainian menu translations (Bohdan Vlasyuk) + +Irish message translations (Kevin Patrick Scannell) + +Configure also checks for tclsh8.4. + + +Fixed *fixed-6.4* +----- + +"dFxd;" deleted the character under the cursor, "d;" didn't remember the +exclusiveness of the motion. + +When using "set laststatus=2 cmdheight=2" in the .gvimrc you may only get one +line for the cmdline. (Christian Robinson) Invoke command_height() after the +GUI has started up. + +Gcc would warn "dereferencing type-punned pointer will break strict -aliasing +rules". Avoid using typecasts for variable pointers. + +Gcc 3.x interprets the -MM argument differently. Change "-I /path" to +"-isystem /path" for "make depend". + + +Patch 6.3.001 +Problem: ":browse split" gives the file selection dialog twice. (Gordon + Bazeley) Same problem for ":browse diffpatch". +Solution: Reset cmdmod.browse before calling do_ecmd(). +Files: src/diff.c, src/ex_docmd.c + +Patch 6.3.002 +Problem: When using translated help files with non-ASCII latin1 characters + in the first line the utf-8 detection is wrong. +Solution: Properly detect utf-8 characters. When a mix of encodings is + detected continue with the next language and avoid a "no matches" + error because of "got_int" being set. Add the directory name to + the error message for a duplicate tag. +Files: src/ex_cmds.c + +Patch 6.3.003 +Problem: Crash when using a console dialog and the first choice does not + have a default button. (Darin Ohashi) +Solution: Allocate two more characters for the [] around the character for + the default choice. +Files: src/message.c + +Patch 6.3.004 +Problem: When searching for a long string (140 chars in a 80 column + terminal) get three hit-enter prompts. (Robert Webb) +Solution: Avoid the hit-enter prompt when giving the message for wrapping + around the end of the buffer. Don't give that message again when + the string was not found. +Files: src/message.c, src/search.c + +Patch 6.3.005 +Problem: Crash when searching for a pattern with a character offset and + starting in a closed fold. (Frank Butler) +Solution: Check for the column to be past the end of the line. Also fix + that a pattern with a character offset relative to the end isn't + read back from the viminfo properly. +Files: src/search.c + +Patch 6.3.006 +Problem: ":breakadd file *foo" prepends the current directory to the file + pattern. (Hari Krishna Dara) +Solution: Keep the pattern as-is. +Files: src/ex_cmds2.c + +Patch 6.3.007 +Problem: When there is a buffer with 'buftype' set to "nofile" and using a + ":cd" command, the swap file is not deleted when exiting. +Solution: Use the full path of the swap file also for "nofile" buffers. +Files: src/fileio.c + +Patch 6.3.008 +Problem: Compiling fails under OS/2. +Solution: Include "e_screenmode" also for OS/2. (David Sanders) +Files: src/globals.h + +Patch 6.3.009 (after 6.3.006) +Problem: ":breakadd file /path/foo.vim" does not match when a symbolic link + is involved. (Servatius Brandt) +Solution: Do expand the pattern when it does not start with "*". +Files: runtime/doc/repeat.txt, src/ex_cmds2.c + +Patch 6.3.010 +Problem: When writing to a named pipe there is an error for fsync() + failing. +Solution: Ignore the fsync() error for devices. +Files: src/fileio.c + +Patch 6.3.011 +Problem: Crash when the completion function of a user-command uses a + "normal :cmd" command. (Hari Krishna Dara) +Solution: Save the command line when invoking the completion function. +Files: src/ex_getln.c + +Patch 6.3.012 +Problem: Internal lalloc(0) error when using a complicated multi-line + pattern in a substitute command. (Luc Hermitte) +Solution: Avoid going past the end of a line. +Files: src/ex_cmds.c + +Patch 6.3.013 +Problem: Crash when editing a command line and typing CTRL-R = to evaluate + a function that uses "normal :cmd". (Hari Krishna Dara) +Solution: Save and restore the command line when evaluating an expression + for CTRL-R =. +Files: src/ex_getln.c, src/ops.c, src/proto/ex_getln.pro, + src/proto/ops.pro + +Patch 6.3.014 +Problem: When using Chinese or Taiwanese the default for 'helplang' is + wrong. (Simon Liang) +Solution: Use the part of the locale name after "zh_". +Files: src/option.c + +Patch 6.3.015 +Problem: The string that winrestcmd() returns may end in garbage. +Solution: NUL-terminate the string. (Walter Briscoe) +Files: src/eval.c + +Patch 6.3.016 +Problem: The default value for 'define' has "\s" before '#'. +Solution: Add a star after "\s". (Herculano de Lima Einloft Neto) +Files: src/option.c + +Patch 6.3.017 +Problem: "8zz" may leave the cursor beyond the end of the line. (Niko + Maatjes) +Solution: Correct the cursor column after moving to another line. +Files: src/normal.c + +Patch 6.3.018 +Problem: ":0argadd zero" added the argument after the first one, instead of + before it. (Adri Verhoef) +Solution: Accept a zero range for ":argadd". +Files: src/ex_cmds.h + +Patch 6.3.019 +Problem: Crash in startup for debug version. (David Rennals) +Solution: Move the call to nbdebug_wait() to after allocating NameBuff. +Files: src/main.c + +Patch 6.3.020 +Problem: When 'encoding' is "utf-8" and 'delcombine' is set, "dw" does not + delete a word but only a combining character of the first + character, if there is one. (Raphael Finkel) +Solution: Correctly check that one character is being deleted. +Files: src/misc1.c + +Patch 6.3.021 +Problem: When the last character of a file name is a multi-byte character + and the last byte is a path separator, the file cannot be edited. +Solution: Check for the last byte to be part of a multi-byte character. + (Taro Muraoka) +Files: src/fileio.c + +Patch 6.3.022 (extra) +Problem: Win32: When the last character of a file name is a multi-byte + character and the last byte is a path separator, the file cannot + be written. A trail byte that is a space makes that a file cannot + be opened from the command line. +Solution: Recognize double-byte characters when parsing the command line. + In mch_stat() check for the last byte to be part of a multi-byte + character. (Taro Muraoka) +Files: src/gui_w48.c, src/os_mswin.c + +Patch 6.3.023 +Problem: When the "to" part of a mapping starts with its "from" part, + abbreviations for the same characters is not possible. For + example, when <Space> is mapped to something that starts with a + space, typing <Space> does not expand abbreviations. +Solution: Only disable expanding abbreviations when a mapping is not + remapped, don't disable it when the RHS of a mapping starts with + the LHS. +Files: src/getchar.c, src/vim.h + +Patch 6.3.024 +Problem: In a few places a string in allocated memory is not terminated + with a NUL. +Solution: Add ga_append(NUL) in script_get(), gui_do_findrepl() and + serverGetVimNames(). +Files: src/ex_getln.c, src/gui.c, src/if_xcmdsrv.c, src/os_mswin.c + +Patch 6.3.025 (extra) +Problem: Missing NUL for list of server names. +Solution: Add ga_append(NUL) in serverGetVimNames(). +Files: src/os_mswin.c + +Patch 6.3.026 +Problem: When ~/.vim/after/syntax/syncolor.vim contains a command that + reloads the colors an endless loop and/or a crash may occur. +Solution: Only free the old value of an option when it was originally + allocated. Limit recursiveness of init_highlight() to 5 levels. +Files: src/option.c, src/syntax.c + +Patch 6.3.027 +Problem: VMS: Writing a file may insert extra CR characters. Not all + terminals are recognized correctly. Vt320 doesn't support colors. + Environment variables are not expanded correctly. +Solution: Use another method to write files. Add vt320 termcap codes for + colors. (Zoltan Arpadffy) +Files: src/fileio.c, src/misc1.c, src/os_unix.c, src/structs.h, + src/term.c + +Patch 6.3.028 +Problem: When appending to a file the BOM marker may be written. (Alex + Jakushev) +Solution: Do not write the BOM marker when appending. +Files: src/fileio.c + +Patch 6.3.029 +Problem: Crash when inserting a line break. (Walter Briscoe) +Solution: In the syntax highlighting code, don't use an old state after a + change was made, current_col may be past the end of the line. +Files: src/syntax.c + +Patch 6.3.030 +Problem: GTK 2: Crash when sourcing a script that deletes the menus, sets + 'encoding' to "utf-8" and loads the menus again. GTK error + message when tooltip text is in a wrong encoding. +Solution: Don't copy characters from the old screen to the new screen when + switching 'encoding' to utf-8, they may be invalid. Only set the + tooltip when it is valid utf-8. +Files: src/gui_gtk.c, src/mbyte.c, src/proto/mbyte.pro, src/screen.c + +Patch 6.3.031 +Problem: When entering a mapping and pressing Tab halfway the command line + isn't redrawn properly. (Adri Verhoef) +Solution: Reposition the cursor after drawing over the "..." of the + completion attempt. +Files: src/ex_getln.c + +Patch 6.3.032 +Problem: Using Python 2.3 with threads doesn't work properly. +Solution: Release the lock after initialization. +Files: src/if_python.c + +Patch 6.3.033 +Problem: When a mapping ends in a Normal mode command of more than one + character Vim doesn't return to Insert mode. +Solution: Check that the mapping has ended after obtaining all characters of + the Normal mode command. +Files: src/normal.c + +Patch 6.3.034 +Problem: VMS: crash when using ":help". +Solution: Avoid using "tags-??", some Open VMS systems can't handle the "?" + wildcard. (Zoltan Arpadffy) +Files: src/tag.c + +Patch 6.3.035 (extra) +Problem: RISC OS: Compile errors. +Solution: Change e_screnmode to e_screenmode. Change the way + __riscosify_control is set. Improve the makefile. (Andy Wingate) +Files: src/os_riscos.c, src/search.c, src/Make_ro.mak + +Patch 6.3.036 +Problem: ml_get errors when the whole file is a fold, switching + 'foldmethod' and doing "zj". (Christian J. Robinson) Was not + deleting the fold but creating a fold with zero lines. +Solution: Delete the fold properly. +Files: src/fold.c + +Patch 6.3.037 (after 6.3.032) +Problem: Warning for unused variable. +Solution: Change the #ifdefs for the saved thread stuff. +Files: src/if_python.c + +Patch 6.3.038 (extra) +Problem: Win32: When the "file changed" dialog pops up after a click that + gives gvim focus and not moving the mouse after that, the effect + of the click may occur when moving the mouse later. (Ken Clark) + Happened because the release event was missed. +Solution: Clear the s_button_pending variable when any input is received. +Files: src/gui_w48.c + +Patch 6.3.039 +Problem: When 'number' is set and inserting lines just above the first + displayed line (in another window on the same buffer), the line + numbers are not updated. (Hitier Sylvain) +Solution: When 'number' is set and lines are inserted/deleted redraw all + lines below the change. +Files: src/screen.c + +Patch 6.3.040 +Problem: Error handling does not always work properly and may cause a + buffer to be marked as if it's viewed in a window while it isn't. + Also when selecting "Abort" at the attention prompt. +Solution: Add enter_cleanup() and leave_cleanup() functions to move + saving/restoring things for error handling to one place. + Clear a buffer read error when it's unloaded. +Files: src/buffer.c, src/ex_docmd.c, src/ex_eval.c, + src/proto/ex_eval.pro, src/structs.h, src/vim.h + +Patch 6.3.041 (extra) +Problem: Win32: When the path to a file has Russian characters, ":cd %:p:h" + doesn't work. (Valery Kondakoff) +Solution: Use a wide function to change directory. +Files: src/os_mswin.c + +Patch 6.3.042 +Problem: When there is a closed fold at the top of the window, CTRL-X + CTRL-E in Insert mode reduces the size of the fold instead of + scrolling the text up. (Gautam) +Solution: Scroll over the closed fold. +Files: src/move.c + +Patch 6.3.043 +Problem: 'hlsearch' highlighting sometimes disappears when inserting text + in PHP code with syntax highlighting. (Marcel Svitalsky) +Solution: Don't use pointers to remember where a match was found, use an + index. The pointers may become invalid when searching in other + lines. +Files: src/screen.c + +Patch 6.3.044 (extra) +Problem: Mac: When 'linespace' is non-zero the Insert mode cursor leaves + pixels behind. (Richard Sandilands) +Solution: Erase the character cell before drawing the text when needed. +Files: src/gui_mac.c + + +Patch 6.3.045 +Problem: Unusual characters in an option value may cause unexpected + behavior, especially for a modeline. (Ciaran McCreesh) +Solution: Don't allow setting termcap options or 'printdevice' in a + modeline. Don't list options for "termcap" and "all" in a + modeline. Don't allow unusual characters in 'filetype', 'syntax', + 'backupext', 'keymap', 'patchmode' and 'langmenu'. +Files: src/option.c, runtime/doc/options.txt + +Patch 6.3.046 +Problem: ":registers" doesn't show multi-byte characters properly. + (Valery Kondakoff) +Solution: Get the length of each character before displaying it. +Files: src/ops.c + +Patch 6.3.047 (extra) +Problem: Win32 with Borland C 5.5 on Windows XP: A new file is created with + read-only attributes. (Tony Mechelynck) +Solution: Don't use the _wopen() function for Borland. +Files: src/os_win32.c + +Patch 6.3.048 (extra) +Problem: Build problems with VMS on IA64. +Solution: Add dependencies to the build file. (Zoltan Arpadffy) +Files: src/Make_vms.mms + +Patch 6.3.049 (after 6.3.045) +Problem: Compiler warning for "char" vs "char_u" mixup. (Zoltan Arpadffy) +Solution: Add a typecast. +Files: src/option.c + +Patch 6.3.050 +Problem: When SIGHUP is received while busy exiting, non-reentrant + functions such as free() may cause a crash. +Solution: Ignore SIGHUP when exiting because of an error. (Scott Anderson) +Files: src/misc1.c, src/main.c + +Patch 6.3.051 +Problem: When 'wildmenu' is set and completed file names contain multi-byte + characters Vim may crash. +Solution: Reserve room for multi-byte characters. (Yasuhiro Matsumoto) +Files: src/screen.c + +Patch 6.3.052 (extra) +Problem: Windows 98: typed keys that are not ASCII may not work properly. + For example with a Russian input method. (Jiri Jezdinsky) +Solution: Assume that the characters arrive in the current codepage instead + of UCS-2. Perform conversion based on that. +Files: src/gui_w48.c + +Patch 6.3.053 +Problem: Win32: ":loadview" cannot find a file with non-ASCII characters. + (Valerie Kondakoff) +Solution: Use mch_open() instead of open() to open the file. +Files: src/ex_cmds2.c + +Patch 6.3.054 +Problem: When 'insertmode' is set <C-L>4ixxx<C-L> hangs Vim. (Jens Paulus) + Vim is actually still working but redraw is disabled. +Solution: When stopping Insert mode with CTRL-L don't put an Esc in the redo + buffer but a CTRL-L. +Files: src/edit.c + +Patch 6.3.055 (after 6.3.013) +Problem: Can't use getcmdline(), getcmdpos() or setcmdpos() with <C-R>= + when editing a command line. Using <C-\>e may crash Vim. (Peter + Winters) +Solution: When moving ccline out of the way for recursive use, make it + available to the functions that need it. Also save and restore + ccline when calling get_expr_line(). Make ccline.cmdbuf NULL at + the end of getcmdline(). +Files: src/ex_getln.c + +Patch 6.3.056 +Problem: The last characters of a multi-byte file name may not be displayed + in the window title. +Solution: Avoid to remove a multi-byte character where the last byte looks + like a path separator character. (Yasuhiro Matsumoto) +Files: src/buffer.c, src/ex_getln.c + +Patch 6.3.057 +Problem: When filtering lines folds are not updated. (Carl Osterwisch) +Solution: Update folds for filtered lines. +Files: src/ex_cmds.c + +Patch 6.3.058 +Problem: When 'foldcolumn' is equal to the window width and 'wrap' is on + Vim may crash. Disabling the vertical split feature breaks + compiling. (Peter Winters) +Solution: Check for zero room for wrapped text. Make compiling without + vertical splits possible. +Files: src/move.c, src/quickfix.c, src/screen.c, src/netbeans.c + +Patch 6.3.059 +Problem: Crash when expanding an ":edit" command containing several spaces + with the shell. (Brian Hirt) +Solution: Allocate enough space for the quotes. +Files: src/os_unix.c + +Patch 6.3.060 +Problem: Using CTRL-R CTRL-O in Insert mode with an invalid register name + still causes something to be inserted. +Solution: Check the register name for being valid. +Files: src/edit.c + +Patch 6.3.061 +Problem: When editing a utf-8 file in an utf-8 xterm and there is a + multi-byte character in the last column, displaying is messed up. + (Joël Rio) +Solution: Check for a multi-byte character, not a multi-column character. +Files: src/screen.c + +Patch 6.3.062 +Problem: ":normal! gQ" hangs. +Solution: Quit getcmdline() and do_exmode() when out of typeahead. +Files: src/ex_getln.c, src/ex_docmd.c + +Patch 6.3.063 +Problem: When a CursorHold autocommand changes to another window + (temporarily) 'mousefocus' stops working. +Solution: Call gui_mouse_correct() after triggering CursorHold. +Files: src/gui.c + +Patch 6.3.064 +Problem: line2byte(line("$") + 1) sometimes returns the wrong number. + (Charles Campbell) +Solution: Flush the cached line before counting the bytes. +Files: src/memline.c + +Patch 6.3.065 +Problem: The euro digraph doesn't always work. +Solution: Add an "e=" digraph for Unicode euro character and adjust the + help files. +Files: src/digraph.c, runtime/doc/digraph.txt + +Patch 6.3.066 +Problem: Backup file may get wrong permissions. +Solution: Use permissions of original file for backup file in more places. +Files: src/fileio.c + +Patch 6.3.067 (after 6.3.066) +Problem: Newly created file gets execute permission. +Solution: Check for "perm" to be negative before using it. +Files: src/fileio.c + +Patch 6.3.068 +Problem: When editing a compressed file xxx.gz which is a symbolic link to + the actual file a ":write" renames the link. +Solution: Resolve the link, so that the actual file is renamed and + compressed. +Files: runtime/plugin/gzip.vim + +Patch 6.3.069 +Problem: When converting text with illegal characters Vim may crash. +Solution: Avoid that too much is subtracted from the length. (Da Woon Jung) +Files: src/mbyte.c + +Patch 6.3.070 +Problem: After ":set number linebreak wrap" and a vertical split, moving + the vertical separator far left will crash Vim. (Georg Dahn) +Solution: Avoid dividing by zero. +Files: src/charset.c + +Patch 6.3.071 +Problem: The message for CTRL-X mode is still displayed after an error for + 'thesaurus' or 'dictionary' being empty. +Solution: Clear "edit_submode". +Files: src/edit.c + +Patch 6.3.072 +Problem: Crash in giving substitute message when language is Chinese and + encoding is utf-8. (Yongwei) +Solution: Make the msg_buf size larger when using multi-byte. +Files: src/vim.h + +Patch 6.3.073 +Problem: Win32 GUI: When the Vim window is partly above or below the + screen, scrolling causes display errors when the taskbar is not on + that side. +Solution: Use the SW_INVALIDATE flag when the Vim window is partly below or + above the screen. +Files: src/gui_w48.c + +Patch 6.3.074 +Problem: When mswin.vim is used and 'insertmode' is set, typing text in + Select mode and then using CTRL-V results in <SNR>99_Pastegi. + (Georg Dahn) +Solution: When restart_edit is set use "d" instead of "c" to remove the + selected text to avoid calling edit() twice. +Files: src/normal.c + +Patch 6.3.075 +Problem: After unloading another buffer, syntax highlighting in the current + buffer may be wrong when it uses "containedin". (Eric Arnold) +Solution: Use "buf" instead of "curbuf" in syntax_clear(). +Files: src/syntax.c + +Patch 6.3.076 +Problem: Crash when using cscope and there is a parse error (e.g., line too + long). (Alexey I. Froloff) +Solution: Pass the actual number of matches to cs_manage_matches() and + correctly handle the error situation. +Files: src/if_cscope.c + +Patch 6.3.077 (extra) +Problem: VMS: First character input after ESC was not recognized. +Solution: Added TRM$M_TM_TIMED in vms_read(). (Zoltan Arpadffy) +Files: src/os_vms.c + +Patch 6.3.078 (extra, after 6.3.077) +Problem: VMS: Performance issue after patch 6.3.077 +Solution: Add a timeout in the itemlist. (Zoltan Arpadffy) +Files: src/os_vms.c + +Patch 6.3.079 +Problem: Crash when executing a command in the command line window while + syntax highlighting is enabled. (Pero Brbora) +Solution: Don't use a pointer to a buffer that has been deleted. +Files: src/syntax.c + +Patch 6.3.080 (extra) +Problem: Win32: With 'encoding' set to utf-8 while the current codepage is + Chinese editing a file with some specific characters in the name + fails. +Solution: Use _wfullpath() instead of _fullpath() when necessary. +Files: src/os_mswin.c + +Patch 6.3.081 +Problem: Unix: glob() may execute a shell command when it's not wanted. + (Georgi Guninski) +Solution: Verify the sandbox flag is not set. +Files: src/os_unix.c + +Patch 6.3.082 (after 6.3.081) +Problem: Unix: expand() may execute a shell command when it's not wanted. + (Georgi Guninski) +Solution: A more generic solution than 6.3.081. +Files: src/os_unix.c + +Patch 6.3.083 +Problem: VMS: The vt320 termcap entry is incomplete. +Solution: Add missing function keys. (Zoltan Arpadffy) +Files: src/term.c + +Patch 6.3.084 (extra) +Problem: Cygwin: compiling with DEBUG doesn't work. Perl path was ignored. + Failure when $(OUTDIR) already exists. "po" makefile is missing. +Solution: Use changes tested in Vim 7. (Tony Mechelynck) +Files: src/Make_cyg.mak, src/po/Make_cyg.mak + +Patch 6.3.085 +Problem: Crash in syntax highlighting code. (Marc Espie) +Solution: Prevent current_col going past the end of the line. +Files: src/syntax.c + +Patch 6.3.086 (extra) +Problem: Can't produce message translation file with msgfmt that checks + printf strings. +Solution: Fix the Russian translation. +Files: src/po/ru.po, src/po/ru.cp1251.po + +Patch 6.3.087 +Problem: MS-DOS: Crash. (Jason Hood) +Solution: Don't call fname_case() with a NULL pointer. +Files: src/ex_cmds.c + +Patch 6.3.088 +Problem: Editing ".in" causes error E218. (Stefan Karlsson) +Solution: Require some characters before ".in". Same for ".orig" and others. +Files: runtime/filetype.vim + +Patch 6.3.089 +Problem: A session file doesn't work when created while the current + directory contains a space or the directory of the session files + contains a space. (Paolo Giarrusso) +Solution: Escape spaces with a backslash. +Files: src/ex_docmd.c + +Patch 6.3.090 +Problem: A very big value for 'columns' or 'lines' may cause a crash. +Solution: Limit the values to 10000 and 1000. +Files: src/option.c + +Patch 6.4a.001 +Problem: The Unix Makefile contained too many dependencies and a few + uncommented lines. +Solution: Run "make depend" with manual changes to avoid a gcc + incompatibility. Comment a few lines. +Files: src/Makefile + +Patch 6.4b.001 +Problem: Vim reports "Vim 6.4a" in the ":version" output. +Solution: Change "a" to "b". (Tony Mechelynck) +Files: src/version.h + +Patch 6.4b.002 +Problem: In Insert mode, pasting a multi-byte character after the end of + the line leaves the cursor just before that character. +Solution: Make sure "gP" leaves the cursor in the right place when + 'virtualedit' is set. +Files: src/ops.c + +Patch 6.4b.003 (after 6.4b.002) +Problem: The problem still exists when 'encoding' is set to "cp936". +Solution: Fix the problem in getvvcol(), compute the coladd field correctly. +Files: src/charset.c, src/ops.c + +Patch 6.4b.004 +Problem: Selecting a {} block with "viB" includes the '}' when there is an + empty line before it. +Solution: Don't advance the cursor to include a line break when it's already + at the line break. +Files: src/search.c + + + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt new file mode 100644 index 0000000000..1bff5b5da9 --- /dev/null +++ b/runtime/doc/version7.txt @@ -0,0 +1,18311 @@ +*version7.txt* For Vim version 7.4. Last change: 2013 Nov 18 + + + VIM REFERENCE MANUAL by Bram Moolenaar + + *vim7* *version-7.0* *version7.0* +Welcome to Vim 7! A large number of features has been added. This file +mentions all the new items, changes to existing features and bug fixes +since Vim 6.x. Use this command to see the version you are using: > + :version + +See |vi_diff.txt| for an overview of differences between Vi and Vim 7.0. +See |version4.txt| for differences between Vim 3.x and Vim 4.x. +See |version5.txt| for differences between Vim 4.x and Vim 5.x. +See |version6.txt| for differences between Vim 5.x and Vim 6.x. + +INCOMPATIBLE CHANGES |incompatible-7| + +NEW FEATURES |new-7| + +Vim script enhancements |new-vim-script| +Spell checking |new-spell| +Omni completion |new-omni-completion| +MzScheme interface |new-MzScheme| +Printing multi-byte text |new-print-multi-byte| +Tab pages |new-tab-pages| +Undo branches |new-undo-branches| +Extended Unicode support |new-more-unicode| +More highlighting |new-more-highlighting| +Translated manual pages |new-manpage-trans| +Internal grep |new-vimgrep| +Scroll back in messages |new-scroll-back| +Cursor past end of the line |new-onemore| +POSIX compatibility |new-posix| +Debugger support |new-debug-support| +Remote file explorer |new-netrw-explore| +Define an operator |new-define-operator| +Mapping to an expression |new-map-expression| +Visual and Select mode mappings |new-map-select| +Location list |new-location-list| +Various new items |new-items-7| + +IMPROVEMENTS |improvements-7| + +COMPILE TIME CHANGES |compile-changes-7| + +BUG FIXES |bug-fixes-7| + +VERSION 7.1 |version-7.1| +Changed |changed-7.1| +Added |added-7.1| +Fixed |fixed-7.1| + +VERSION 7.2 |version-7.2| +Changed |changed-7.2| +Added |added-7.2| +Fixed |fixed-7.2| + +VERSION 7.3 |version-7.3| + +Persistent undo |new-persistent-undo| +More encryption |new-more-encryption| +Conceal text |new-conceal| +Lua interface |new-lua| +Python3 interface |new-python3| + +Changed |changed-7.3| +Added |added-7.3| +Fixed |fixed-7.3| + +VERSION 7.4 |version-7.4| +New regexp engine |new-regexp-engine| +Better Python interface |better-python-interface| +Changed |changed-7.4| +Added |added-7.4| +Fixed |fixed-7.4| + + +============================================================================== +INCOMPATIBLE CHANGES *incompatible-7* + +These changes are incompatible with previous releases. Check this list if you +run into a problem when upgrading from Vim 6.x to 7.0. + +A ":write file" command no longer resets the 'modified' flag of the buffer, +unless the '+' flag is in 'cpoptions' |cpo-+|. This was illogical, since the +buffer is still modified compared to the original file. And when undoing +all changes the file would actually be marked modified. It does mean that +":quit" fails now. + +":helpgrep" now uses a help window to display a match. + +In an argument list double quotes could be used to include spaces in a file +name. This caused a difference between ":edit" and ":next" for escaping +double quotes and it is incompatible with some versions of Vi. + Command Vim 6.x file name Vim 7.x file name ~ + :edit foo\"888 foo"888 foo"888 + :next foo\"888 foo888 foo"888 + :next a\"b c\"d ab cd a"b and c"d + +In a |literal-string| a single quote can be doubled to get one. +":echo 'a''b'" would result in "a b", but now that two quotes stand for one it +results in "a'b". + +When overwriting a file with ":w! fname" there was no warning for when "fname" +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: + +For filetype detection: For many types, use */.dir/filename instead of +~/.dir/filename, so that it also works for other user's files. + +For quite a few filetypes the indent settings have been moved from the +filetype plugin to the indent plugin. If you used: > + :filetype plugin on +Then some indent settings may be missing. You need to use: > + :filetype plugin indent on + +":0verbose" now sets 'verbose' to zero instead of one. + +Removed the old and incomplete "VimBuddy" code. + +Buffers without a name report "No Name" instead of "No File". It was +confusing for buffers with a name and 'buftype' set to "nofile". + +When ":file xxx" is used in a buffer without a name, the alternate file name +isn't set. This avoids creating buffers without a name, they are not useful. + +The "2html.vim" script now converts closed folds to HTML. This means the HTML +looks like it's displayed, with the same folds open and closed. Use "zR", or +"let html_ignore_folding=1", if no folds should appear in the HTML. (partly by +Carl Osterwisch) +Diff mode is now also converted to HTML as it is displayed. + +Win32: The effect of the <F10> key depended on 'winaltkeys'. Now it depends +on whether <F10> has been mapped or not. This allows mapping <F10> without +changing 'winaltkeys'. + +When 'octal' is in 'nrformats' and using CTRL-A on "08" it became "018", which +is illogical. Now it becomes "9". The leading zero(s) is(are) removed to +avoid the number becoming octal after incrementing "009" to "010". + +When 'encoding' is set to a Unicode encoding, the value for 'fileencodings' +now includes "default" before "latin1". This means that for files with 8-bit +encodings the default is to use the encoding specified by the environment, if +possible. Previously latin1 would always be used, which is wrong in a +non-latin1 environment, such as Russian. + +Previously Vim would exit when there are two windows, both of them displaying +a help file, and using ":quit". Now only the window is closed. + +"-w {scriptout}" only works when {scriptout} doesn't start with a digit. +Otherwise it's used to set the 'window' option. + +Previously <Home> and <xHome> could be mapped separately. This had the +disadvantage that all mappings (with modifiers) had to be duplicated, since +you can't be sure what the keyboard generates. Now all <xHome> are internally +translated to <Home>, both for the keys and for mappings. Also for <xEnd>, +<xF1>, etc. + +":put" now leaves the cursor on the last inserted line. + +When a .gvimrc file exists then 'compatible' is off, just like when a ".vimrc" +file exists. + +When making a string upper-case with "vlllU" or similar then the German sharp +s is replaced with "SS". This does not happen with "~" to avoid backwards +compatibility problems and because "SS" can't be changed back to a sharp s. + +"gd" previously found the very first occurrence of a variable in a function, +that could be the function argument without type. Now it finds the position +where the type is given. + +The line continuation in functions was not taken into account, line numbers in +errors were logical lines, not lines in the sourced file. That made it +difficult to locate errors. Now the line number in the sourced file is +reported, relative to the function start. This also means that line numbers +for ":breakadd func" are different. + +When defining a user command with |:command| the special items could be +abbreviated. This caused unexpected behavior, such as <li> being recognized +as <line1>. The items can no longer be abbreviated. + +When executing a FileChangedRO autocommand it is no longer allowed to switch +to another buffer or edit another file. This is to prevent crashes (the event +is triggered deep down in the code where changing buffers is not anticipated). +It is still possible to reload the buffer. + +At the |more-prompt| and the |hit-enter-prompt|, when the 'more' option is +set, the 'k', 'u', 'g' and 'b' keys are now used to scroll back to previous +messages. Thus they are no longer used as typeahead. + +============================================================================== +NEW FEATURES *new-7* + +Vim script enhancements *new-vim-script* +----------------------- + +In Vim scripts the following types have been added: + + |List| ordered list of items + |Dictionary| associative array of items + |Funcref| reference to a function + +Many functions and commands have been added to support the new types. + +The |string()| function can be used to get a string representation of a +variable. Works for Numbers, Strings and composites of them. Then |eval()| +can be used to turn the string back into the variable value. + +The |:let| command can now use "+=", "-=" and ".=": > + :let var += expr " works like :let var = var + expr + :let var -= expr " works like :let var = var - expr + :let var .= string " works like :let var = var . string + +With the |:profile| command you can find out where your function or script +is wasting time. + +In the Python interface vim.eval() also handles Dictionaries and Lists. +|python-eval| (G. Sumner Hayes) + +The |getscript| plugin was added as a convenient way to update scripts from +www.vim.org automatically. (Charles Campbell) + +The |vimball| plugin was added as a convenient way to distribute a set of +files for a plugin (plugin file, autoload script, documentation). (Charles +Campbell) + + +Spell checking *new-spell* +-------------- + +Spell checking has been integrated in Vim. There were a few implementations +with scripts, but they were slow and/or required an external program. + +The 'spell' option is used to switch spell checking on or off +The 'spelllang' option is used to specify the accepted language(s) +The 'spellfile' option specifies where new words are added +The 'spellsuggest' option specifies the methods used for making suggestions + +The |]s| and |[s| commands can be used to move to the next or previous error +The |zg| and |zw| commands can be used to add good and wrong words +The |z=| command can be used to list suggestions and correct the word +The |:mkspell| command is used to generate a Vim spell file from word lists + +The "undercurl" highlighting attribute was added to nicely point out spelling +mistakes in the GUI (based on patch from Marcin Dalecki). +The "guisp" color can be used to give it a color different from foreground and +background. +The number of possible different highlight attributes was raised from about +220 to over 30000. This allows for the attributes of spelling to be combined +with syntax highlighting attributes. This is also used for syntax +highlighting and marking the Visual area. + +Much more info here: |spell|. + + +Omni completion *new-omni-completion* +--------------- + +This could also be called "intellisense", but that is a trademark. It is a +smart kind of completion. The text in front of the cursor is inspected to +figure out what could be following. This may suggest struct and class +members, system functions, etc. + +Use CTRL-X CTRL-O in Insert mode to start the completion. |i_CTRL-X_CTRL-O| + +The 'omnifunc' option is set by filetype plugins to define the function that +figures out the completion. + +Currently supported languages: + C |ft-c-omni| + (X)HTML with CSS |ft-html-omni| + JavaScript |ft-javascript-omni| + PHP |ft-php-omni| + Python + Ruby |ft-ruby-omni| + SQL |ft-sql-omni| + XML |ft-xml-omni| + any language with syntax highlighting |ft-syntax-omni| + +You can add your own omni completion scripts. + +When the 'completeopt' option contains "menu" then matches for Insert mode +completion are displayed in a (rather primitive) popup menu. + + +MzScheme interface *new-MzScheme* +------------------ + +The MzScheme interpreter is supported. |MzScheme| + +The |:mzscheme| command can be used to execute MzScheme commands +The |:mzfile| command can be used to execute an MzScheme script file + +This depends on Vim being compiled with the |+mzscheme| feature. + + +Printing multi-byte text *new-print-multi-byte* +------------------------ + +The |:hardcopy| command now supports printing multi-byte characters when using +PostScript. + +The 'printmbcharset' and 'printmbfont' options are used for this. +Also see |postscript-cjk-printing|. (Mike Williams) + + +Tab pages *new-tab-pages* +--------- + +A tab page is a page with one or more windows with a label (aka tab) at the top. +By clicking on the label you can quickly switch between the tab pages. And +with the keyboard, using the |gt| (Goto Tab) command. This is a convenient +way to work with many windows. + +To start Vim with each file argument in a separate tab page use the |-p| +argument. The maximum number of pages can be set with 'tabpagemax'. + +The line with tab labels is either made with plain text and highlighting or +with a GUI mechanism. The GUI labels look better but are only available on a +few systems. The line can be customized with 'tabline', 'guitablabel' and +'guitabtooltip'. Whether it is displayed is set with 'showtabline'. Whether +to use the GUI labels is set with the "e" flag in 'guioptions'. + +The |:tab| command modifier can be used to have most commands that open a new +window open a new tab page instead. + +The |--remote-tab| argument can be used to edit a file in a new tab page in an +already running Vim server. + +Variables starting with "t:" are local to a tab page. + +More info here: |tabpage| +Most of the GUI stuff was implemented by Yegappan Lakshmanan. + + +Undo branches *new-undo-branches* +------------- + +Previously there was only one line of undo-redo. If, after undoing a number +of changes, a new change was made all the undone changes were lost. This +could lead to accidentally losing work. + +Vim now makes an undo branch in this situation. Thus you can go back to the +text after any change, even if they were undone. So long as you do not run +into 'undolevels', when undo information is freed up to limit the memory used. + +To be able to navigate the undo branches each change is numbered sequentially. +The commands |g-| and |:earlier| go back in time, to older changes. The +commands |g+| and |:later| go forward in time, to newer changes. + +The changes are also timestamped. Use ":earlier 10m" to go to the text as it +was about ten minutes earlier. + +The |:undolist| command can be used to get an idea of which undo branches +exist. The |:undo| command now takes an argument to directly jump to a +specific position in this list. The |changenr()| function can be used to +obtain the change number. + +There is no graphical display of the tree with changes, navigation can be +quite confusing. + + +Extended Unicode support *new-more-unicode* +------------------------ + +Previously only two combining characters were displayed. The limit is now +raised to 6. This can be set with the 'maxcombine' option. The default is +still 2. + +|ga| now shows all combining characters, not just the first two. + +Previously only 16 bit Unicode characters were supported for displaying. Now +the full 32 bit character set can be used. Unless manually disabled at +compile time to save a bit of memory. + +For pattern matching it is now possible to search for individual composing +characters. |patterns-composing| + +The |8g8| command searches for an illegal UTF-8 byte sequence. + + +More highlighting *new-more-highlighting* +----------------- + +Highlighting matching parens: + +When moving the cursor through the text and it is on a paren, then the +matching paren can be highlighted. This uses the new |CursorMoved| +autocommand event. + +This means some commands are executed every time you move the cursor. If this +slows you down too much switch it off with: > + :NoMatchParen + +See |matchparen| for more information. + +The plugin uses the |:match| command. It now supports three match patterns. +The plugin uses the third one. The first one is for the user and the second +one can be used by another plugin. + +Highlighting the cursor line and column: + +The 'cursorline' and 'cursorcolumn' options have been added. These highlight +the screen line and screen column of the cursor. This makes the cursor +position easier to spot. 'cursorcolumn' is also useful to align text. This +may make screen updating quite slow. The CursorColumn and CursorLine +highlight groups allow changing the colors used. |hl-CursorColumn| +|hl-CursorLine| + +The number of possible different highlight attributes was raised from about +220 to over 30000. This allows for the attributes of spelling to be combined +with syntax highlighting attributes. This is also used for syntax +highlighting, marking the Visual area, CursorColumn, etc. + + +Translated manual pages *new-manpage-trans* +----------------------- + +The manual page of Vim and associated programs is now also available in +several other languages. + +French - translated by David Blanchet +Italian - translated by Antonio Colombo +Russian - translated by Vassily Ragosin +Polish - translated by Mikolaj Machowski + +The Unix Makefile installs the Italian manual pages in .../man/it/man1/, +.../man/it.ISO8859-1/man1/ and .../man/it.UTF-8/man1/. There appears to be no +standard for what encoding goes in the "it" directory, the 8-bit encoded file +is used there as a best guess. +Other languages are installed in similar places. +The translated pages are not automatically installed when Vim was configured +with "--disable-nls", but "make install-languages install-tool-languages" will +do it anyway. + + +Internal grep *new-vimgrep* +------------- + +The ":vimgrep" command can be used to search for a pattern in a list of files. +This is like the ":grep" command, but no external program is used. Besides +better portability, handling of different file encodings and using multi-line +patterns, this also allows grepping in compressed and remote files. +|:vimgrep|. + +If you want to use the search results in a script you can use the +|getqflist()| function. + +To grep files in various directories the "**" pattern can be used. It expands +into an arbitrary depth of directories. "**" can be used in all places where +file names are expanded, thus also with |:next| and |:args|. + + +Scroll back in messages *new-scroll-back* +----------------------- + +When displaying messages, at the |more-prompt| and the |hit-enter-prompt|, The +'k', 'u', 'g' and 'b' keys can be used to scroll back to previous messages. +This is especially useful for commands such as ":syntax", ":autocommand" and +":highlight". This is implemented in a generic way thus it works for all +commands and highlighting is kept. Only works when the 'more' option is set. +Previously it only partly worked for ":clist". + +The |g<| command can be used to see the last page of messages after you have +hit <Enter> at the |hit-enter-prompt|. Then you can scroll further back. + + +Cursor past end of the line *new-onemore* +--------------------------- + +When the 'virtualedit' option contains "onemore" the cursor can move just past +the end of the line. As if it's on top of the line break. + +This makes some commands more consistent. Previously the cursor was always +past the end of the line if the line was empty. But it is far from Vi +compatible. It may also break some plugins or Vim scripts. Use with care! + +The patch was provided by Mattias Flodin. + + +POSIX compatibility *new-posix* +------------------- + +The POSIX test suite was used to verify POSIX compatibility. A number of +problems have been fixed to make Vim more POSIX compatible. Some of them +conflict with traditional Vi or expected behavior. The $VIM_POSIX environment +variable can be set to get POSIX compatibility. See |posix|. + +Items that were fixed for both Vi and POSIX compatibility: +- repeating "R" with a count only overwrites text once; added the 'X' flag to + 'cpoptions' |cpo-X| +- a vertical movement command that moves to a non-existing line fails; added + the '-' flag to 'cpoptions' |cpo--| +- when preserving a file and doing ":q!" the file can be recovered; added the + '&' flag to 'cpoptions' |cpo-&| +- The 'window' option is partly implemented. It specifies how much CTRL-F and + CTRL-B scroll when there is one window. The "-w {number}" argument is now + accepted. "-w {scriptout}" only works when {scriptout} doesn't start with a + digit. +- Allow "-c{command}" argument, no space between "-c" and {command}. +- When writing a file with ":w!" don't reset 'readonly' when 'Z' is present in + 'cpoptions'. +- Allow 'l' and '#' flags for ":list", ":print" and ":number". +- Added the '.' flag to 'cpoptions': ":cd" fails when the buffer is modified. +- In Ex mode with an empty buffer ":read file" doesn't keep an empty line + above or below the new lines. +- Remove a backslash before a NL for the ":global" command. +- When ":append", ":insert" or ":change" is used with ":global", get the + inserted lines from the command. Can use backslash-NL to separate lines. +- Can use ":global /pat/ visual" to execute Normal mode commands at each + matched line. Use "Q" to continue and go to the next line. +- The |:open| command has been partially implemented. It stops Ex mode, but + redraws the whole screen, not just one line as open mode is supposed to do. +- Support using a pipe to read the output from and write input to an external + command. Added the 'shelltemp' option and has("filterpipe"). +- In ex silent mode the ":set" command output is displayed. +- The ":@@" and ":**" give an error message when no register was used before. +- The search pattern "[]-`]" matches ']', '^', '_' and '`'. +- Autoindent for ":insert" is using the line below the insert. +- Autoindent for ":change" is using the first changed line. +- Editing Ex command lines is not done in cooked mode, because CTRL-D and + CTRL-T cannot be handled then. +- In Ex mode, "1,3" prints three lines. "%" prints all lines. +- In Ex mode "undo" would undo all changes since Ex mode was started. +- Implemented the 'prompt' option. + + +Debugger support *new-debug-support* +---------------- + +The 'balloonexpr' option has been added. This is a generic way to implement +balloon functionality. You can use it to show info for the word under the +mouse pointer. + + +Remote file explorer *new-netrw-explore* +-------------------- + +The netrw plugin now also supports viewing a directory, when "scp://" is used. +Deleting and renaming files is possible. + +To avoid duplicating a lot of code, the previous file explorer plugin has been +integrated in the netrw plugin. This means browsing local and remote files +works the same way. + +":browse edit" and ":browse split" use the netrw plugin when it's available +and a GUI dialog is not possible. + +The netrw plugin is maintained by Charles Campbell. + + +Define an operator *new-define-operator* +------------------ + +Previously it was not possible to define your own operator; a command that is +followed by a {motion}. Vim 7 introduces the 'operatorfunc' option and the +|g@| operator. This makes it possible to define a mapping that works like an +operator. The actual work is then done by a function, which is invoked +through the |g@| operator. + +See |:map-operator| for the explanation and an example. + + +Mapping to an expression *new-map-expression* +------------------------ + +The {rhs} argument of a mapping can be an expression. That means the +resulting characters can depend on the context. Example: > + :inoremap <expr> . InsertDot() +Here the dot will be mapped to whatever InsertDot() returns. + +This also works for abbreviations. See |:map-<expr>| for the details. + + +Visual and Select mode mappings *new-map-select* +------------------------------- + +Previously Visual mode mappings applied both to Visual and Select mode. With +a trick to have the mappings work in Select mode like they would in Visual +mode. + +Commands have been added to define mappings for Visual and Select mode +separately: |:xmap| and |:smap|. With the associated "noremap" and "unmap" +commands. + +The same is done for menus: |:xmenu|, |:smenu|, etc. + + +Location list *new-location-list* +------------- + +The support for a per-window quickfix list (location list) is added. The +location list can be displayed in a location window (similar to the quickfix +window). You can open more than one location list window. A set of commands +similar to the quickfix commands are added to browse the location list. +(Yegappan Lakshmanan) + + +Various new items *new-items-7* +----------------- + +Normal mode commands: ~ + +a", a' and a` New text objects to select quoted strings. |a'| +i", i' and i` (Taro Muraoka) + +CTRL-W <Enter> In the quickfix window: opens a new window to show the + location of the error under the cursor. + +|at| and |it| text objects select a block of text between HTML or XML tags. + +<A-LeftMouse> ('mousemodel' "popup" or "popup-setpos") +<A-RightMouse> ('mousemodel' "extend") + Make a blockwise selection. |<A-LeftMouse>| + +gF Start editing the filename under the cursor and jump + to the line number following the file name. + (Yegappan Lakshmanan) + +CTRL-W F Start editing the filename under the cursor in a new + window and jump to the line number following the file + name. (Yegappan Lakshmanan) + +Insert mode commands: ~ + +CTRL-\ CTRL-O Execute a Normal mode command. Like CTRL-O but + without moving the cursor. |i_CTRL-\_CTRL-O| + +Options: ~ + +'balloonexpr' expression for text to show in evaluation balloon +'completefunc' The name of the function used for user-specified + Insert mode completion. CTRL-X CTRL-U can be used in + Insert mode to do any kind of completion. (Taro + Muraoka) +'completeopt' Enable popup menu and other settings for Insert mode + completion. +'cursorcolumn' highlight column of the cursor +'cursorline' highlight line of the cursor +'formatexpr' expression for formatting text with |gq| and when text + goes over 'textwidth' in Insert mode. +'formatlistpat' pattern to recognize a numbered list for formatting. + (idea by Hugo Haas) +'fsync' Whether fsync() is called after writing a file. + (Ciaran McCreesh) +'guitablabel' expression for text to display in GUI tab page label +'guitabtooltip' expression for text to display in GUI tab page tooltip +'macatsui' Mac: use ATSUI text display functions +'maxcombine' maximum number of combining characters displayed +'maxmempattern' maximum amount of memory to use for pattern matching +'mkspellmem' parameters for |:mkspell| memory use +'mzquantum' Time in msec to schedule MzScheme threads. +'numberwidth' Minimal width of the space used for the 'number' and + 'relativenumber' option. (Emmanuel Renieris) +'omnifunc' The name of the function used for omni completion. +'operatorfunc' function to be called for |g@| operator +'printmbcharset' CJK character set to be used for :hardcopy +'printmbfont' font names to be used for CJK output of :hardcopy +'pumheight' maximum number of items to show in the popup menu +'quoteescape' Characters used to escape quotes inside a string. + Used for the a", a' and a` text objects. |a'| +'shelltemp' whether to use a temp file or pipes for shell commands +'showtabline' whether to show the tab pages line +'spell' switch spell checking on/off +'spellcapcheck' pattern to locate the end of a sentence +'spellfile' file where good and wrong words are added +'spelllang' languages to check spelling for +'spellsuggest' methods for spell suggestions +'synmaxcol' maximum column to look for syntax items; avoids very + slow redrawing when there are very long lines +'tabline' expression for text to display in the tab pages line +'tabpagemax' maximum number of tab pages to open for |-p| +'verbosefile' Log messages in a file. +'wildoptions' "tagfile" value enables listing the file name of + matching tags for CTRL-D command line completion. + (based on an idea from Yegappan Lakshmanan) +'winfixwidth' window with fixed width, similar to 'winfixheight' + + +Ex commands: ~ + +Win32: The ":winpos" command now also works in the console. (Vipin Aravind) + +|:startreplace| Start Replace mode. (Charles Campbell) +|:startgreplace| Start Virtual Replace mode. + +|:0file| Removes the name of the buffer. (Charles Campbell) + +|:diffoff| Switch off diff mode in the current window or in all + windows. + +|:delmarks| Delete marks. + +|:exusage| Help for Ex commands (Nvi command). +|:viusage| Help for Vi commands (Nvi command). + +|:sort| Sort lines in the buffer without depending on an + external command. (partly by Bryce Wagner) + +|:vimgrep| Internal grep command, search for a pattern in files. +|:vimgrepadd| Like |:vimgrep| but don't make a new list. + +|:caddfile| Add error messages to an existing quickfix list + (Yegappan Lakshmanan). +|:cbuffer| Read error lines from a buffer. (partly by Yegappan + Lakshmanan) +|:cgetbuffer| Create a quickfix list from a buffer but don't jump to + the first error. +|:caddbuffer| Add errors from the current buffer to the quickfix + list. +|:cexpr| Read error messages from a Vim expression (Yegappan + Lakshmanan). +|:caddexpr| Add error messages from a Vim expression to an + existing quickfix list. (Yegappan Lakshmanan). +|:cgetexpr| Create a quickfix list from a Vim expression, but + don't jump to the first error. (Yegappan Lakshmanan). + +|:lfile| Like |:cfile| but use the location list. +|:lgetfile| Like |:cgetfile| but use the location list. +|:laddfile| Like |:caddfile| but use the location list. +|:lbuffer| Like |:cbuffer| but use the location list. +|:lgetbuffer| Like |:cgetbuffer| but use the location list. +|:laddbuffer| Like |:caddbuffer| but use the location list. +|:lexpr| Like |:cexpr| but use the location list. +|:lgetexpr| Like |:cgetexpr| but use the location list. +|:laddexpr| Like |:caddexpr| but use the location list. +|:ll| Like |:cc| but use the location list. +|:llist| Like |:clist| but use the location list. +|:lnext| Like |:cnext| but use the location list. +|:lprevious| Like |:cprevious| but use the location list. +|:lNext| Like |:cNext| but use the location list. +|:lfirst| Like |:cfirst| but use the location list. +|:lrewind| Like |:crewind| but use the location list. +|:llast| Like |:clast| but use the location list. +|:lnfile| Like |:cnfile| but use the location list. +|:lpfile| Like |:cpfile| but use the location list. +|:lNfile| Like |:cNfile| but use the location list. +|:lolder| Like |:colder| but use the location list. +|:lnewer| Like |:cnewer| but use the location list. +|:lwindow| Like |:cwindow| but use the location list. +|:lopen| Like |:copen| but use the location list. +|:lclose| Like |:cclose| but use the location list. +|:lmake| Like |:make| but use the location list. +|:lgrep| Like |:grep| but use the location list. +|:lgrepadd| Like |:grepadd| but use the location list. +|:lvimgrep| Like |:vimgrep| but use the location list. +|:lvimgrepadd| Like |:vimgrepadd| but use the location list. +|:lhelpgrep| Like |:helpgrep| but use the location list. +|:lcscope| Like |:cscope| but use the location list. +|:ltag| Jump to a tag and add matching tags to a location list. + +|:undojoin| Join a change with the previous undo block. +|:undolist| List the leafs of the undo tree. + +|:earlier| Go back in time for changes in the text. +|:later| Go forward in time for changes in the text. + +|:for| Loop over a |List|. +|:endfor| + +|:lockvar| Lock a variable, prevents it from being changed. +|:unlockvar| Unlock a locked variable. + +|:mkspell| Create a Vim spell file. +|:spellgood| Add a word to the list of good words. +|:spellwrong| Add a word to the list of bad words +|:spelldump| Dump list of good words. +|:spellinfo| Show information about the spell files used. +|:spellrepall| Repeat a spelling correction for the whole buffer. +|:spellundo| Remove a word from list of good and bad words. + +|:mzscheme| Execute MzScheme commands. +|:mzfile| Execute an MzScheme script file. + +|:nbkey| Pass a key to NetBeans for processing. + +|:profile| Commands for Vim script profiling. +|:profdel| Stop profiling for specified items. + +|:smap| Select mode mapping. +|:smapclear| +|:snoremap| +|:sunmap| + +|:xmap| Visual mode mapping, not used for Select mode. +|:xmapclear| +|:xnoremap| +|:xunmap| + +|:smenu| Select mode menu. +|:snoremenu| +|:sunmenu| + +|:xmenu| Visual mode menu, not used for Select mode. +|:xnoremenu| +|:xunmenu| + +|:tabclose| Close the current tab page. +|:tabdo| Perform a command in every tab page. +|:tabedit| Edit a file in a new tab page. +|:tabnew| Open a new tab page. +|:tabfind| Search for a file and open it in a new tab page. +|:tabnext| Go to the next tab page. +|:tabprevious| Go to the previous tab page. +|:tabNext| Go to the previous tab page. +|:tabfirst| Go to the first tab page. +|:tabrewind| Go to the first tab page. +|:tablast| Go to the last tab page. +|:tabmove| Move the current tab page elsewhere. +|:tabonly| Close all other tab pages. +|:tabs| List the tab pages and the windows they contain. + +Ex command modifiers: ~ + +|:keepalt| Do not change the alternate file. + +|:noautocmd| Do not trigger autocommand events. + +|:sandbox| Execute a command in the sandbox. + +|:tab| When opening a new window create a new tab page. + + +Ex command arguments: ~ + +|++bad| Specify what happens with characters that can't be + converted and illegal bytes. (code example by Yasuhiro + Matsumoto) + Also, when a conversion error occurs or illegal bytes + are found include the line number in the error + message. + + +New and extended functions: ~ + +|add()| append an item to a List +|append()| append List of lines to the buffer +|argv()| without an argument return the whole argument list +|browsedir()| dialog to select a directory +|bufnr()| takes an extra argument: create buffer +|byteidx()| index of a character (Ilya Sher) +|call()| call a function with List as arguments +|changenr()| number of current change +|complete()| set matches for Insert mode completion +|complete_add()| add match for 'completefunc' +|complete_check()| check for key pressed, for 'completefunc' +|copy()| make a shallow copy of a List or Dictionary +|count()| count nr of times a value is in a List or Dictionary +|cursor()| also accepts an offset for 'virtualedit', and + the first argument can be a list: [lnum, col, off] +|deepcopy()| make a full copy of a List or Dictionary +|diff_filler()| returns number of filler lines above line {lnum}. +|diff_hlID()| returns the highlight ID for diff mode +|empty()| check if List or Dictionary is empty +|eval()| evaluate {string} and return the result +|extend()| append one List to another or add items from one + Dictionary to another +|feedkeys()| put characters in the typeahead buffer +|filter()| remove selected items from a List or Dictionary +|finddir()| find a directory in 'path' +|findfile()| find a file in 'path' (Johannes Zellner) +|foldtextresult()| the text displayed for a closed fold at line "lnum" +|function()| make a Funcref out of a function name +|garbagecollect()| cleanup unused |Lists| and |Dictionaries| with circular + references +|get()| get an item from a List or Dictionary +|getbufline()| get a list of lines from a specified buffer + (Yegappan Lakshmanan) +|getcmdtype()| return the current command-line type + (Yegappan Lakshmanan) +|getfontname()| get actual font name being used +|getfperm()| get file permission string (Nikolai Weibull) +|getftype()| get type of file (Nikolai Weibull) +|getline()| with second argument: get List with buffer lines +|getloclist()| list of location list items (Yegappan Lakshmanan) +|getpos()| return a list with the position of cursor, mark, etc. +|getqflist()| list of quickfix errors (Yegappan Lakshmanan) +|getreg()| get contents of a register +|gettabwinvar()| get variable from window in specified tab page. +|has_key()| check whether a key appears in a Dictionary +|haslocaldir()| check if current window used |:lcd| +|hasmapto()| check for a mapping to a string +|index()| index of item in List +|inputlist()| prompt the user to make a selection from a list +|insert()| insert an item somewhere in a List +|islocked()| check if a variable is locked +|items()| get List of Dictionary key-value pairs +|join()| join List items into a String +|keys()| get List of Dictionary keys +|len()| number of items in a List or Dictionary +|map()| change each List or Dictionary item +|maparg()| extra argument: use abbreviation +|mapcheck()| extra argument: use abbreviation +|match()| extra argument: count +|matcharg()| return arguments of |:match| command +|matchend()| extra argument: count +|matchlist()| list with match and submatches of a pattern in a string +|matchstr()| extra argument: count +|max()| maximum value in a List or Dictionary +|min()| minimum value in a List or Dictionary +|mkdir()| create a directory +|pathshorten()| reduce directory names to a single character +|printf()| format text +|pumvisible()| check whether the popup menu is displayed +|range()| generate a List with numbers +|readfile()| read a file into a list of lines +|reltime()| get time value, possibly relative +|reltimestr()| turn a time value into a string +|remove()| remove one or more items from a List or Dictionary +|repeat()| repeat "expr" "count" times (Christophe Poucet) +|reverse()| reverse the order of a List +|search()| extra argument: +|searchdecl()| search for declaration of variable +|searchpair()| extra argument: line to stop searching +|searchpairpos()| return a List with the position of the match +|searchpos()| return a List with the position of the match +|setloclist()| modify a location list (Yegappan Lakshmanan) +|setpos()| set cursor or mark to a position +|setqflist()| modify a quickfix list (Yegappan Lakshmanan) +|settabwinvar()| set variable in window of specified tab page +|sort()| sort a List +|soundfold()| get the sound-a-like equivalent of a word +|spellbadword()| get a badly spelled word +|spellsuggest()| get suggestions for correct spelling +|split()| split a String into a List +|str2nr()| convert a string to a number, base 8, 10 or 16 +|stridx()| extra argument: start position +|strridx()| extra argument: start position +|string()| string representation of a List or Dictionary +|system()| extra argument: filters {input} through a shell command +|tabpagebuflist()| List of buffers in a tab page +|tabpagenr()| number of current or last tab page +|tabpagewinnr()| window number in a tab page +|tagfiles()| List with tags file names +|taglist()| get list of matching tags (Yegappan Lakshmanan) +|tr()| translate characters (Ron Aaron) +|uniq()| remove copies of repeated adjacent list items +|values()| get List of Dictionary values +|winnr()| takes an argument: what window to use +|winrestview()| restore the view of the current window +|winsaveview()| save the view of the current window +|writefile()| write a list of lines into a file + +User defined functions can now be loaded automatically from the "autoload" +directory in 'runtimepath'. See |autoload-functions|. + + +New Vim variables: ~ + +|v:insertmode| used for |InsertEnter| and |InsertChange| autocommands +|v:val| item value in a |map()| or |filter()| function +|v:key| item key in a |map()| or |filter()| function +|v:profiling| non-zero after a ":profile start" command +|v:fcs_reason| the reason why |FileChangedShell| was triggered +|v:fcs_choice| what should happen after |FileChangedShell| +|v:beval_bufnr| buffer number for 'balloonexpr' +|v:beval_winnr| window number for 'balloonexpr' +|v:beval_lnum| line number for 'balloonexpr' +|v:beval_col| column number for 'balloonexpr' +|v:beval_text| text under the mouse pointer for 'balloonexpr' +|v:scrollstart| what caused the screen to be scrolled up +|v:swapname| name of the swap file for the |SwapExists| event +|v:swapchoice| what to do for an existing swap file +|v:swapcommand| command to be executed after handling |SwapExists| +|v:char| argument for evaluating 'formatexpr' + + +New autocommand events: ~ + +|ColorScheme| after loading a color scheme + +|CursorHoldI| the user doesn't press a key for a while in Insert mode +|CursorMoved| the cursor was moved in Normal mode +|CursorMovedI| the cursor was moved in Insert mode + +|FileChangedShellPost| after handling a file changed outside of Vim + +|InsertEnter| starting Insert or Replace mode +|InsertChange| going from Insert to Replace mode or back +|InsertLeave| leaving Insert or Replace mode + +|MenuPopup| just before showing popup menu + +|QuickFixCmdPre| before :make, :grep et al. (Ciaran McCreesh) +|QuickFixCmdPost| after :make, :grep et al. (Ciaran McCreesh) + +|SessionLoadPost| after loading a session file. (Yegappan Lakshmanan) + +|ShellCmdPost| after executing a shell command +|ShellFilterPost| after filtering with a shell command + +|SourcePre| before sourcing a Vim script + +|SpellFileMissing| when a spell file can't be found + +|SwapExists| found existing swap file when editing a file + +|TabEnter| just after entering a tab page +|TabLeave| just before leaving a tab page + +|VimResized| after the Vim window size changed (Yakov Lerner) + + +New highlight groups: ~ + +Pmenu Popup menu: normal item |hl-Pmenu| +PmenuSel Popup menu: selected item |hl-PmenuSel| +PmenuThumb Popup menu: scrollbar |hl-PmenuThumb| +PmenuSbar Popup menu: Thumb of the scrollbar |hl-PmenuSbar| + +TabLine tab pages line, inactive label |hl-TabLine| +TabLineSel tab pages line, selected label |hl-TabLineSel| +TabLineFill tab pages line, filler |hl-TabLineFill| + +SpellBad badly spelled word |hl-SpellBad| +SpellCap word with wrong caps |hl-SpellCap| +SpellRare rare word |hl-SpellRare| +SpellLocal word only exists in other region |hl-SpellLocal| + +CursorColumn 'cursorcolumn' |hl-CursorColumn| +CursorLine 'cursorline' |hl-CursorLine| + +MatchParen matching parens |pi_paren.txt| |hl-MatchParen| + + +New items in search patterns: ~ +|/\%d| \%d123 search for character with decimal number +|/\]| [\d123] idem, in a collection +|/\%o| \%o103 search for character with octal number +|/\]| [\o1o3] idem, in a collection +|/\%x| \%x1a search for character with 2 pos. hex number +|/\]| [\x1a] idem, in a collection +|/\%u| \%u12ab search for character with 4 pos. hex number +|/\]| [\u12ab] idem, in a collection +|/\%U| \%U1234abcd search for character with 8 pos. hex number +|/\]| [\U1234abcd] idem, in a collection + (The above partly by Ciaran McCreesh) + +|/[[=| [[=a=]] an equivalence class (only for latin1 characters) +|/[[.| [[.a.]] a collation element (only works with single char) + +|/\%'m| \%'m match at mark m +|/\%<'m| \%<'m match before mark m +|/\%>'m| \%>'m match after mark m +|/\%V| \%V match in Visual area + +Nesting |/multi| items no longer is an error when an empty match is possible. + +It is now possible to use \{0}, it matches the preceding atom zero times. Not +useful, just for compatibility. + + +New Syntax/Indent/FTplugin files: ~ + +Moved all the indent settings from the filetype plugin to the indent file. +Implemented b:undo_indent to undo indent settings when setting 'filetype' to a +different value. + +a2ps syntax and ftplugin file. (Nikolai Weibull) +ABAB/4 syntax file. (Marius van Wyk) +alsaconf ftplugin file. (Nikolai Weibull) +AppendMatchGroup ftplugin file. (Dave Silvia) +arch ftplugin file. (Nikolai Weibull) +asterisk and asteriskvm syntax file. (Tilghman Lesher) +BDF ftplugin file. (Nikolai Weibull) +BibTeX indent file. (Dorai Sitaram) +BibTeX Bibliography Style syntax file. (Tim Pope) +BTM ftplugin file. (Bram Moolenaar) +calendar ftplugin file. (Nikolai Weibull) +Changelog indent file. (Nikolai Weibull) +ChordPro syntax file. (Niels Bo Andersen) +Cmake indent and syntax file. (Andy Cedilnik) +conf ftplugin file. (Nikolai Weibull) +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) +django and htmldjango syntax file. (Dave Hodder) +doxygen syntax file. (Michael Geddes) +elinks ftplugin file. (Nikolai Weibull) +eterm ftplugin file. (Nikolai Weibull) +eviews syntax file. (Vaidotas Zemlys) +fetchmail RC ftplugin file. (Nikolai Weibull) +FlexWiki syntax and ftplugin file. (George Reilly) +Generic indent file. (Dave Silvia) +gpg ftplugin file. (Nikolai Weibull) +gretl syntax file. (Vaidotas Zemlys) +groovy syntax file. (Alessio Pace) +group syntax and ftplugin file. (Nikolai Weibull) +grub ftplugin file. (Nikolai Weibull) +Haskell ftplugin file. (Nikolai Weibull) +help ftplugin file. (Nikolai Weibull) +indent ftplugin file. (Nikolai Weibull) +Javascript ftplugin file. (Bram Moolenaar) +Kconfig ftplugin and syntax file. (Nikolai Weibull) +ld syntax, indent and ftplugin file. (Nikolai Weibull) +lftp ftplugin file. (Nikolai Weibull) +libao config ftplugin file. (Nikolai Weibull) +limits syntax and ftplugin file. (Nikolai Weibull) +Lisp indent file. (Sergey Khorev) +loginaccess and logindefs syntax and ftplugin file. (Nikolai Weibull) +m4 ftplugin file. (Nikolai Weibull) +mailaliases syntax file. (Nikolai Weibull) +mailcap ftplugin file. (Nikolai Weibull) +manconf syntax and ftplugin file. (Nikolai Weibull) +matlab ftplugin file. (Jake Wasserman) +Maxima syntax file. (Robert Dodier) +MGL syntax file. (Gero Kuhlmann) +modconf ftplugin file. (Nikolai Weibull) +mplayer config ftplugin file. (Nikolai Weibull) +Mrxvtrc syntax and ftplugin file. (Gautam Iyer) +MuPAD source syntax, indent and ftplugin. (Dave Silvia) +mutt RC ftplugin file. (Nikolai Weibull) +nanorc syntax and ftplugin file. (Nikolai Weibull) +netrc ftplugin file. (Nikolai Weibull) +pamconf syntax and ftplugin file. (Nikolai Weibull) +Pascal indent file. (Neil Carter) +passwd syntax and ftplugin file. (Nikolai Weibull) +PHP compiler plugin. (Doug Kearns) +pinfo ftplugin file. (Nikolai Weibull) +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) +quake ftplugin file. (Nikolai Weibull) +racc syntax and ftplugin file. (Nikolai Weibull) +readline ftplugin file. (Nikolai Weibull) +rhelp syntax file. (Johannes Ranke) +rnoweb syntax file. (Johannes Ranke) +Relax NG compact ftplugin file. (Nikolai Weibull) +Scheme indent file. (Sergey Khorev) +screen ftplugin file. (Nikolai Weibull) +sensors syntax and ftplugin file. (Nikolai Weibull) +services syntax and ftplugin file. (Nikolai Weibull) +setserial syntax and ftplugin file. (Nikolai Weibull) +sieve syntax and ftplugin file. (Nikolai Weibull) +SiSU syntax file (Ralph Amissah) +Sive syntax file. (Nikolai Weibull) +slp config, reg and spi syntax and ftplugin files. (Nikolai Weibull) +SML indent file. (Saikat Guha) +SQL anywhere syntax and indent file. (David Fishburn) +SQL indent file. +SQL-Informix syntax file. (Dean L Hill) +SQL: Handling of various variants. (David Fishburn) +sshconfig ftplugin file. (Nikolai Weibull) +Stata and SMCL syntax files. (Jeff Pitblado) +sudoers ftplugin file. (Nikolai Weibull) +sysctl syntax and ftplugin file. (Nikolai Weibull) +terminfo ftplugin file. (Nikolai Weibull) +trustees syntax file. (Nima Talebi) +Vera syntax file. (David Eggum) +udev config, permissions and rules syntax and ftplugin files. (Nikolai Weibull) +updatedb syntax and ftplugin file. (Nikolai Weibull) +VHDL indent file (Gerald Lai) +WSML syntax file. (Thomas Haselwanter) +Xdefaults ftplugin file. (Nikolai Weibull) +XFree86 config ftplugin file. (Nikolai Weibull) +xinetd syntax, indent and ftplugin file. (Nikolai Weibull) +xmodmap ftplugin file. (Nikolai Weibull) +Xquery syntax file. (Jean-Marc Vanel) +xsd (XML schema) indent file. +YAML ftplugin file. (Nikolai Weibull) +Zsh ftplugin file. (Nikolai Weibull) + + +New Keymaps: ~ + +Sinhala (Sri Lanka) (Harshula Jayasuriya) +Tamil in TSCII encoding (Yegappan Lakshmanan) +Greek in cp737 (Panagiotis Louridas) +Polish-slash (HS6_06) +Ukrainian-jcuken (Anatoli Sakhnik) +Kana (Edward L. Fox) + + +New message translations: ~ + +The Ukrainian messages are now also available in cp1251. +Vietnamese message translations and menu. (Phan Vinh Thinh) + + +Others: ~ + +The |:read| command has the |++edit| argument. This means it will use the +detected 'fileformat', 'fileencoding' and other options for the buffer. This +also fixes the problem that editing a compressed file didn't set these +options. + +The Netbeans interface was updated for Sun Studio 10. The protocol number +goes from 2.2 to 2.3. (Gordon Prieur) + +Mac: When starting up Vim will load the $VIMRUNTIME/macmap.vim script to +define default command-key mappings. (mostly by Benji Fisher) + +Mac: Add the selection type to the clipboard, so that Block, line and +character selections can be used between two Vims. (Eckehard Berns) +Also fixes the problem that setting 'clipboard' to "unnamed" breaks using +"yyp". + +Mac: GUI font selector. (Peter Cucka) + +Mac: support for multi-byte characters. (Da Woon Jung) +This doesn't always work properly. If you see text drawing problems try +switching the 'macatsui' option off. + +Mac: Support the xterm mouse in the non-GUI version. + +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. +To be used to set the cursor shape to a bar or a block. No default values, +they are not supported by termcap/terminfo. + +GUI font selector for Motif. (Marcin Dalecki) + +Nicer toolbar buttons for Motif. (Marcin Dalecki) + +Mnemonics for the Motif find/replace dialog. (Marcin Dalecki) + +Included a few improvements for Motif from Marcin Dalecki. Draw label +contents ourselves to make them handle fonts in a way configurable by Vim and +a bit less dependent on the X11 font management. + +Autocommands can be defined local to a buffer. This means they will also work +when the buffer does not have a name or no specific name. See +|autocmd-buflocal|. (Yakov Lerner) + +For xterm most combinations of modifiers with function keys are recognized. +|xterm-modifier-keys| + +When 'verbose' is set the output of ":highlight" will show where a highlight +item was last set. +When 'verbose' is set the output of the ":map", ":abbreviate", ":command", +":function" and ":autocmd" commands will show where it was last defined. +(Yegappan Lakshmanan) + +":function /pattern" lists functions matching the pattern. + +"1gd" can be used like "gd" but ignores matches in a {} block that ends before +the cursor position. Likewise for "1gD" and "gD". + +'scrolljump' can be set to a negative number to scroll a percentage of the +window height. + +The |v:scrollstart| variable has been added to help find the location in +your script that causes the hit-enter prompt. + +To make it possible to handle the situation that a file is being edited that +is already being edited by another Vim instance, the |SwapExists| event has +been added. The |v:swapname|, |v:swapchoice| and |v:swapcommand| variables +can be used, for example to use the |client-server| functionality to bring the +other Vim to the foreground. +When starting Vim with a "-t tag" argument, there is an existing swapfile and +the user selects "quit" or "abort" then exit Vim. + +Undo now also restores the '< and '> marks. "gv" selects the same area as +before the change and undo. + +When editing a search pattern for a "/" or "?" command and 'incsearch' is set +CTRL-L can be used to add a character from the current match. CTRL-R CTRL-W +will add a word, but exclude the part of the word that was already typed. + +Ruby interface: add line number methods. (Ryan Paul) + +The $MYVIMRC environment variable is set to the first found vimrc file. +The $MYGVIMRC environment variable is set to the first found gvimrc file. + +============================================================================== +IMPROVEMENTS *improvements-7* + +":helpgrep" accepts a language specifier after the pattern: "pat@it". + +Moved the help for printing to a separate help file. It's quite a lot now. + +When doing completion for ":!cmd", ":r !cmd" or ":w !cmd" executable files are +found in $PATH instead of looking for ordinary files in the current directory. + +When ":silent" is used and a backwards range is given for an Ex command the +range is swapped automatically instead of asking if that is OK. + +The pattern matching code was changed from a recursive function to an +iterative mechanism. This avoids out-of-stack errors. State is stored in +allocated memory, running out of memory can always be detected. Allows +matching more complex things, but Vim may seem to hang while doing that. + +Previously some options were always evaluated in the |sandbox|. Now that only +happens when the option was set from a modeline or in secure mode. Applies to +'balloonexpr', 'foldexpr', 'foldtext' and 'includeexpr'. (Sumner Hayes) + +Some commands and expressions could have nasty side effects, such as using +CTRL-R = while editing a search pattern and the expression invokes a function +that jumps to another window. The |textlock| has been added to prevent this +from happening. + +":breakadd here" and ":breakdel here" can be used to set or delete a +breakpoint at the cursor. + +It is now possible to define a function with: > + :exe "func Test()\n ...\n endfunc" + +The tutor was updated to make it simpler to use and text was added to explain +a few more important commands. Used ideas from Gabriel Zachmann. + +Unix: When libcall() fails obtain an error message with dlerror() and display +it. (Johannes Zellner) + +Mac and Cygwin: When editing an existing file make the file name the same case +of the edited file. Thus when typing ":e os_UNIX.c" the file name becomes +"os_unix.c". + +Added "nbsp" in 'listchars'. (David Blanchet) + +Added the "acwrite" value for the 'buftype' option. This is for a buffer that +does not have a name that refers to a file and is written with BufWriteCmd +autocommands. + +For lisp indenting and matching parenthesis: (Sergey Khorev) +- square brackets are recognized properly +- #\(, #\), #\[ and #\] are recognized as character literals +- Lisp line comments (delimited by semicolon) are recognized + +Added the "count" argument to match(), matchend() and matchstr(). (Ilya Sher) + +winnr() takes an optional "$" or "#" argument. (Nikolai Weibull, Yegappan +Lakshmanan) + +Added 's' flag to search(): set ' mark if cursor moved. (Yegappan Lakshmanan) +Added 'n' flag to search(): don't move the cursor. (Nikolai Weibull) +Added 'c' flag to search(): accept match at the cursor. +Added 'e' flag to search(): move to end of the match. (Benji Fisher) +Added 'p' flag to search(): return number of sub-pattern. (Benji Fisher) +These also apply to searchpos(), searchpair() and searchpairpos(). + +The search() and searchpair() functions have an extra argument to specify +where to stop searching. Speeds up searches that should not continue too far. + +When uncompressing fails in the gzip plugin, give an error message but don't +delete the raw text. Helps if the file has a .gz extension but is not +actually compressed. (Andrew Pimlott) + +When C, C++ or IDL syntax is used, may additionally load doxygen syntax. +(Michael Geddes) + +Support setting 'filetype' and 'syntax' to "aaa.bbb" for "aaa" plus "bbb" +filetype or syntax. + +The ":registers" command now displays multi-byte characters properly. + +VMS: In the usage message mention that a slash can be used to make a flag +upper case. Add color support to the builtin vt320 terminal codes. +(Zoltan Arpadffy) + +For the '%' item in 'viminfo', allow a number to set a maximum for the number +of buffers. + +For recognizing the file type: When a file looks like a shell script, check +for an "exec" command that starts the tcl interpreter. (suggested by Alexios +Zavras) + +Support conversion between utf-8 and latin9 (iso-8859-15) internally, so that +digraphs still work when iconv is not available. + +When a session file is loaded while editing an unnamed, empty buffer that +buffer is wiped out. Avoids that there is an unused buffer in the buffer +list. + +Win32: When libintl.dll supports bind_textdomain_codeset(), use it. +(NAKADAIRA Yukihiro) + +Win32: Vim was not aware of hard links on NTFS file systems. These are +detected now for when 'backupcopy' is "auto". Also fixed a bogus "file has +been changed since reading it" error for links. + +When foldtext() finds no text after removing the comment leader, use the +second line of the fold. Helps for C-style /* */ comments where the first +line is just "/*". + +When editing the same file from two systems (e.g., Unix and MS-Windows) there +mostly was no warning for an existing swap file, because the name of the +edited file differs (e.g., y:\dir\file vs /home/me/dir/file). Added a flag to +the swap file to indicate it is in the same directory as the edited file. The +used path then doesn't matter and the check for editing the same file is much +more reliable. + +Unix: When editing a file through a symlink the swap file would use the name +of the symlink. Now use the name of the actual file, so that editing the same +file twice is detected. (suggestions by Stefano Zacchiroli and James Vega) + +Client-server communication now supports 'encoding'. When setting 'encoding' +in a Vim server to "utf-8", and using "vim --remote fname" in a console, +"fname" is converted from the console encoding to utf-8. Also allows Vims +with different 'encoding' settings to exchange messages. + +Internal: Changed ga_room into ga_maxlen, so that it doesn't need to be +incremented/decremented each time. + +When a register is empty it is not stored in the viminfo file. + +Removed the tcltags script, it's obsolete. + +":redir @*>>" and ":redir @+>>" append to the clipboard. Better check for +invalid characters after the register name. |:redir| + +":redir => variable" and ":redir =>> variable" write or append to a variable. +(Yegappan Lakshmanan) |:redir| + +":redir @{a-z}>>" appends to register a to z. (Yegappan Lakshmanan) + +The 'verbosefile' option can be used to log messages in a file. Verbose +messages are not displayed then. The "-V{filename}" argument can be used to +log startup messages. + +":let g:" lists global variables. +":let b:" lists buffer-local variables. +":let w:" lists window-local variables. +":let v:" lists Vim variables. + +The stridx() and strridx() functions take a third argument, where to start +searching. (Yegappan Lakshmanan) + +The getreg() function takes an extra argument to be able to get the expression +for the '=' register instead of the result of evaluating it. + +The setline() function can take a List argument to set multiple lines. When +the line number is just below the last line the line is appended. + +g CTRL-G also shows the number of characters if it differs from the number of +bytes. + +Completion for ":debug" and entering an expression for the '=' register. Skip +":" between range and command name. (Peter winters) + +CTRL-Q in Insert mode now works like CTRL-V by default. Previously it was +ignored. + +When "beep" is included in 'debug' a function or script that causes a beep +will result in a message with the source of the error. + +When completing buffer names, match with "\(^\|[\/]\)" instead of "^", so that +":buf stor<Tab>" finds both "include/storage.h" and "storage/main.c". + +To count items (pattern matches) without changing the buffer the 'n' flag has +been added to |:substitute|. See |count-items|. + +In a |:substitute| command the \u, \U, \l and \L items now also work for +multi-byte characters. + +The "screen.linux" $TERM name is recognized to set the default for +'background' to "dark". (Ciaran McCreesh) Also for "cygwin" and "putty". + +The |FileChangedShell| autocommand event can now use the |v:fcs_reason| +variable that specifies what triggered the event. |v:fcs_choice| can be used +to reload the buffer or ask the user what to do. + +Not all modifiers were recognized for xterm function keys. Added the +possibility in term codes to end in ";*X" or "O*X", where X is any character +and the * stands for the modifier code. +Added the <xUp>, <xDown>, <xLeft> and <xRight> keys, to be able to recognize +the two forms that xterm can send their codes in and still handle all possible +modifiers. + +getwinvar() now also works to obtain a buffer-local option from the specified +window. + +Added the "%s" item to 'errorformat'. (Yegappan Lakshmanan) +Added the "%>" item to 'errorformat'. + +For 'errorformat' it was not possible to have a file name that contains the +character that follows after "%f". For example, in "%f:%l:%m" the file name +could not contain ":". Now include the first ":" where the rest of the +pattern matches. In the example a ":" not followed by a line number is +included in the file name. (suggested by Emanuele Giaquinta) + +GTK GUI: use the GTK file dialog when it's available. Mix from patches by +Grahame Bowland and Evan Webb. + +Added ":scriptnames" to bugreport.vim, so that we can see what plugins were +used. + +Win32: If the user changes the setting for the number of lines a scroll wheel +click scrolls it is now used immediately. Previously Vim would need to be +restarted. + +When using @= in an expression the value is expression @= contains. ":let @= += value" can be used to set the register contents. + +A ! can be added to ":popup" to have the popup menu appear at the mouse +pointer position instead of the text cursor. + +The table with encodings has been expanded with many MS-Windows codepages, +such as cp1250 and cp737, so that these can also be used on Unix without +prepending "8bit-". +When an encoding name starts with "microsoft-cp" ignore the "microsoft-" part. + +Added the "customlist" completion argument to a user-defined command. The +user-defined completion function should return the completion candidates as a +Vim List and the returned results are not filtered by Vim. (Yegappan +Lakshmanan) + +Win32: Balloons can have multiple lines if common controls supports it. +(Sergey Khorev) + +For command-line completion the matches for various types of arguments are now +sorted: user commands, variables, syntax names, etc. + +When no locale is set, thus using the "C" locale, Vim will work with latin1 +characters, using its own isupper()/toupper()/etc. functions. + +When using an rxvt terminal emulator guess the value of 'background' using the +COLORFGBG environment variable. (Ciaran McCreesh) + +Also support t_SI and t_EI on Unix with normal features. (Ciaran McCreesh) + +When 'foldcolumn' is one then put as much info in it as possible. This allows +closing a fold with the mouse by clicking on the '-'. + +input() takes an optional completion argument to specify the type of +completion supported for the input. (Yegappan Lakshmanan) + +"dp" works with more than two buffers in diff mode if there is only one where +'modifiable' is set. + +The 'diffopt' option has three new values: "horizontal", "vertical" and +"foldcolumn". + +When the 'include' option contains \zs the file name found is what is being +matched from \zs to the end or \ze. Useful to pass more to 'includeexpr'. + +Loading plugins on startup now supports subdirectories in the plugin +directory. |load-plugins| + +In the foldcolumn always show the '+' for a closed fold, so that it can be +opened easily. It may overwrite another character, esp. if 'foldcolumn' is 1. + +It is now possible to get the W10 message again by setting 'readonly'. Useful +in the FileChangedRO autocommand when checking out the file fails. + +Unix: When open() returns EFBIG give an appropriate message. + +":mksession" sets the SessionLoad variable to notify plugins. A modeline is +added to the session file to set 'filetype' to "vim". + +In the ATTENTION prompt put the "Delete it" choice before "Quit" to make it +more logical. (Robert Webb) + +When appending to a file while the buffer has no name the name of the appended +file would be used for the current buffer. But the buffer contents is +actually different from the file content. Don't set the file name, unless the +'P' flag is present in 'cpoptions'. + +When starting to edit a new file and the directory for the file doesn't exist +then Vim will report "[New DIRECTORY]" instead of "[New File] to give the user +a hint that something might be wrong. + +Win32: Preserve the hidden attribute of the viminfo file. + +In Insert mode CTRL-A didn't keep the last inserted text when using CTRL-O and +then a cursor key. Now keep the previously inserted text if nothing is +inserted after the CTRL-O. Allows using CTRL-O commands to move the cursor +without losing the last inserted text. + +The exists() function now supports checking for autocmd group definition +and for supported autocommand events. (Yegappan Lakshmanan) + +Allow using ":global" in the sandbox, it doesn't do anything harmful by +itself. + +":saveas asdf.c" will set 'filetype' to c when it's empty. Also for ":w +asdf.c" when it sets the filename for the buffer. + +Insert mode completion for whole lines now also searches unloaded buffers. + +The colortest.vim script can now be invoked directly with ":source" or +":runtime syntax/colortest.vim". + +The 'statusline' option can be local to the window, so that each window can +have a different value. (partly by Yegappan Lakshmanan) + +The 'statusline' option and other options that support the same format can now +use these new features: +- When it starts with "%!" the value is first evaluated as an expression + before parsing the value. +- "%#HLname#" can be used to start highlighting with HLname. + +When 'statusline' is set to something that causes an error message then it is +made empty to avoid an endless redraw loop. Also for other options, such at +'tabline' and 'titlestring'. ":verbose set statusline" will mention that it +was set in an error handler. + +When there are several matching tags, the ":tag <name>" and CTRL-] commands +jump to the [count] matching tag. (Yegappan Lakshmanan) + +Win32: In the batch files generated by the install program, use $VIMRUNTIME or +$VIM if it's set. Example provided by Mathias Michaelis. +Also create a vimtutor.bat batch file. + +The 'balloonexpr' option is now |global-local|. + +The system() function now runs in cooked mode, thus can be interrupted by +CTRL-C. + +============================================================================== +COMPILE TIME CHANGES *compile-changes-7* + +Dropped the support for the BeOS and Amiga GUI. They were not maintained and +probably didn't work. If you want to work on this: get the Vim 6.x version +and merge it back in. + +When running the tests and one of them fails to produce "test.out" the +following tests are still executed. This helps when running out of memory. + +When compiling with EXITFREE defined and the ccmalloc library it is possible +to detect memory leaks. Some memory will always reported as leaked, such as +allocated by X11 library functions and the memory allocated in alloc_cmdbuff() +to store the ":quit" command. + +Moved the code for printing to src/hardcopy.c. + +Moved some code from main() to separate functions to make it easier to see +what is being done. Using a structure to avoid a lot of arguments to the +functions. + +Moved unix_expandpath() to misc1.c, so that it can also be used by os_mac.c +without copying the code. + +--- Mac --- + +"make" now creates the Vim.app directory and "make install" copies it to its +final destination. (Raf) + +Put the runtime directory not directly in Vim.app but in +Vim.app/Contents/Resources/vim, so that it's according to Mac specs. + +Made it possible to compile with Motif, Athena or GTK without tricks and still +being able to use the MacRoman conversion. Added the os_mac_conv.c file. + +When running "make install" the runtime files are installed as for Unix. +Avoids that too many files are copied. When running "make" a link to the +runtime files is created to avoid a recursive copy that takes much time. + +Configure will attempt to build Vim for both Intel and PowerPC. The +--with-mac-arch configure argument can change it. + +--- Win32 --- + +The Make_mvc.mak file was adjusted to work with the latest MS compilers, +including the free version of Visual Studio 2005. (George Reilly) + +INSTALLpc.txt was updated for the recent changes. (George Reilly) + +The distributed executable is now produced with the free Visual C++ Toolkit +2003 and other free SDK chunks. msvcsetup.bat was added to support this. + +Also generate the .pdb file that can be used to generate a useful crash report +on MS-Windows. (George Reilly) + +============================================================================== +BUG FIXES *bug-fixes-7* + +When using PostScript printing on MS-DOS the default 'printexpr' used "lpr" +instead of "copy". When 'printdevice' was empty the copy command did not +work. Use "LPT1" then. + +The GTK font dialog uses a font size zero when the font name doesn't include a +size. Use a default size of 10. + +This example in the documentation didn't work: + :e `=foo . ".c"` +Skip over the expression in `=expr` when looking for comments, |, % and #. + +When ":helpgrep" doesn't find anything there is no error message. + +"L" and "H" did not take closed folds into account. + +Win32: The "-P title" argument stopped at the first title that matched, even +when it doesn't support MDI. + +Mac GUI: CTRL-^ and CTRL-@ did not work. + +"2daw" on "word." at the end of a line didn't include the preceding white +space. + +Win32: Using FindExecutable() doesn't work to find a program. Use +SearchPath() instead. For executable() use $PATHEXT when the program searched +for doesn't have an extension. + +When 'virtualedit' is set, moving the cursor up after appending a character +may move it to a different column. Was caused by auto-formatting moving the +cursor and not putting it back where it was. + +When indent was added automatically and then moving the cursor, the indent was +not deleted (like when pressing ESC). The "I" flag in 'cpoptions' can be used +to make it work the old way. + +When opening a command-line window, 'textwidth' gets set to 78 by the Vim +filetype plugin. Reset 'textwidth' to 0 to avoid lines are broken. + +After using cursor(line, col) moving up/down doesn't keep the same column. + +Win32: Borland C before 5.5 requires using ".u." for LowPart and HighPart +fields. (Walter Briscoe) + +On Sinix SYS_NMLN isn't always defined. Define it ourselves. (Cristiano De +Michele) + +Printing with PostScript may keep the printer waiting for more. Append a +CTRL-D to the printer output. (Mike Williams) + +When converting a string with a hex or octal number the leading '-' was +ignored. ":echo '-05' + 0" resulted in 5 instead of -5. + +Using "@:" to repeat a command line didn't work when it contains control +characters. Also remove "'<,'>" when in Visual mode to avoid that it appears +twice. + +When using file completion for a user command, it would not expand environment +variables like for a regular command with a file argument. + +'cindent': When the argument of a #define looks like a C++ class the next line +is indented too much. + +When 'comments' includes multi-byte characters inserting the middle part and +alignment may go wrong. 'cindent' also suffers from this for right-aligned +items. + +Win32: when 'encoding' is set to "utf-8" getenv() still returns strings in the +active codepage. Convert to utf-8. Also for $HOME. + +The default for 'helplang' was "zh" for both "zh_cn" and "zh_tw". Now use +"cn" or "tw" as intended. + +When 'bin' is set and 'eol' is not set then line2byte() added the line break +after the last line while it's not there. + +Using foldlevel() in a WinEnter autocommand may not work. Noticed when +resizing the GUI shell upon startup. + +Python: Using buffer.append(f.readlines()) didn't work. Allow appending a +string with a trailing newline. The newline is ignored. + +When using the ":saveas f2" command for buffer "f1", the Buffers menu would +contain "f2" twice, one of them leading to "f1". Also trigger the BufFilePre +and BufFilePost events for the alternate buffer that gets the old name. + +strridx() did not work well when the needle is empty. (Ciaran McCreesh) + +GTK: Avoid a potential hang in gui_mch_wait_for_chars() when input arrives +just before it is invoked + +VMS: Occasionally CR characters were inserted in the file. Expansion of +environment variables was not correct. (Zoltan Arpadffy) + +UTF-8: When 'delcombine' is set "dw" only deleted the last combining character +from the first character of the word. + +When using ":sball" in an autocommand only the filetype in one buffer was +detected. Reset did_filetype in enter_buffer(). + +When using ":argdo" and the window already was at the first argument index, +but not actually editing it, the current buffer would be used instead. + +When ":next dir/*" includes many matches, adding the names to the argument +list may take an awful lot of time and can't be interrupted. Allow +interrupting this. + +When editing a file that was already loaded in a buffer, modelines were not +used. Now window-local options in the modeline are set. Buffer-local options +and global options remain unmodified. + +Win32: When 'encoding' is set to "utf-8" in the vimrc file, files from the +command line with non-ASCII characters are not used correctly. Recode the +file names when 'encoding' is set, using the Unicode command line. + +Win32 console: When the default for 'encoding' ends up to be "latin1", the +default value of 'isprint' was wrong. + +When an error message is given while waiting for a character (e.g., when an +xterm reports the number of colors), the hit-enter prompt overwrote the last +line. Don't reset msg_didout in normal_cmd() for K_IGNORE. + +Mac GUI: Shift-Tab didn't work. + +When defining tooltip text, don't translate terminal codes, since it's not +going to be used like a command. + +GTK 2: Check the tooltip text for valid utf-8 characters to avoid getting a +GTK error. Invalid characters may appear when 'encoding' is changed. + +GTK 2: Add a safety check for invalid utf-8 sequences, they can crash pango. + +Win32: When 'encoding' is changed while starting up, use the Unicode command +line to convert the file arguments to 'encoding'. Both for the GUI and the +console version. + +Win32 GUI: latin9 text (iso-8859-15) was not displayed correctly, because +there is no codepage for latin9. Do our own conversion from latin9 to UCS2. + +When two versions of GTK+ 2 are installed it was possible to use the header +files from one and the library from the other. Use GTK_LIBDIR to put the +directory for the library early in the link flags. + +With the GUI find/replace dialog a replace only worked if the pattern was +literal text. Now it works for any pattern. + +When 'equalalways' is set and 'eadirection' is "hor", ":quit" would still +cause equalizing window heights in the vertical direction. + +When ":emenu" is used in a startup script the command was put in the typeahead +buffer, causing a prompt for the crypt key to be messed up. + +Mac OS/X: The default for 'isprint' included characters 128-160, causes +problems for Terminal.app. + +When a syntax item with "containedin" is used, it may match in the start or +end of a region with a matchgroup, while this doesn't happen for a "contains" +argument. + +When a transparent syntax items matches in another item where the highlighting +has already stopped (because of a he= argument), the highlighting would come +back. + +When cscope is used to set the quickfix error list, it didn't get set if there +was only one match. (Sergey Khorev) + +When 'confirm' is set and using ":bdel" in a modified buffer, then selecting +"cancel", would still give an error message. + +The PopUp menu items that started Visual mode didn't work when not in Normal +mode. Switching between selecting a word and a line was not possible. + +Win32: The keypad decimal point always resulted in a '.', while on some +keyboards it's a ','. Use MapVirtualKey(VK_DECIMAL, 2). + +Removed unused function DisplayCompStringOpaque() from gui_w32.c + +In Visual mode there is not always an indication whether the line break is +selected or not. Highlight the character after the line when the line break +is included, e.g., after "v$o". + +GTK: The <F10> key can't be mapped, it selects the menu. Disable that with a +GTK setting and do select the menu when <F10> isn't mapped. (David Necas) + +After "Y" '[ and '] were not at start/end of the yanked text. + +When a telnet connection is dropped Vim preserves files and exits. While +doing that a SIGHUP may arrive and disturb us, thus ignore it. (Scott +Anderson) Also postpone SIGHUP, SIGQUIT and SIGTERM until it's safe to +handle. Added handle_signal(). + +When completing a file name on the command line backslashes are required for +white space. Was only done for a space, not for a Tab. + +When configure could not find a terminal library, compiling continued for a +long time before reporting the problem. Added a configure check for tgetent() +being found in a library. + +When the cursor is on the first char of the last line a ":g/pat/s///" command +may cause the cursor to be displayed below the text. + +Win32: Editing a file with non-ASCII characters doesn't work when 'encoding' +is "utf-8". use _wfullpath() instead of _fullpath(). (Yu-sung Moon) + +When recovering the 'fileformat' and 'fileencoding' were taken from the +original file instead of from the swapfile. When the file didn't exist, was +empty or the option was changed (e.g., with ":e ++fenc=cp123 file") it could +be wrong. Now store 'fileformat' and 'fileencoding' in the swapfile and use +the values when recovering. + +":bufdo g/something/p" overwrites each last printed text line with the file +message for the next buffer. Temporarily clear 'shortmess' to avoid that. + +Win32: Cannot edit a file starting with # with --remote. Do escape % and # +when building the ":drop" command. + +A comment or | just after an expression-backtick argument was not recognized. +E.g. in :e `="foo"`"comment. + +"(" does not stop at an empty sentence (single dot and white space) while ")" +does. Also breaks "das" on that dot. + +When doing "yy" with the cursor on a TAB the ruler could be wrong and "k" +moved the cursor to another column. + +When 'commentstring' is '"%s' and there is a double quote in the line a double +quote before the fold marker isn't removed in the text displayed for a closed +fold. + +In Visual mode, when 'bin' and 'eol' set, g CTRL-G counted the last line +break, resulting in "selected 202 of 201 bytes". + +Motif: fonts were not used for dialog components. (Marcin Dalecki) + +Motif: After using a toolbar button the keyboard focus would be on the toolbar +(Lesstif problem). (Marcin Dalecki) + +When using "y<C-V>`x" where mark x is in the first column, the last line was +not included. + +Not all test scripts work properly on MS-Windows when checked out from CVS. +Use a Vim command to fix all fileformats to dos before executing the tests. + +When using ":new" and the file fits in the window, lines could still be above +the window. Now remove empty lines instead of keeping the relative position. + +Cmdline completion didn't work after ":let var1 var<Tab>". + +When using ":startinsert" or ":startreplace" when already in Insert mode +(possible when using CTRL-R =), pressing Esc would directly restart Insert +mode. (Peter Winters) + +"2daw" didn't work at end of file if the last word is a single character. + +Completion for ":next a'<Tab>" put a backslash before single quote, but it was +not removed when editing a file. Now halve backslashes in save_patterns(). +Also fix expanding a file name with the shell that contains "\'". + +When doing "1,6d|put" only "fewer lines" was reported. Now a following "more +lines" overwrites the message. + +Configure could not handle "-Dfoo=long\ long" in the TCL config output. + +When searching backwards, using a pattern that matches a newline and uses \zs +after that, didn't find a match. Could also get a hang or end up in the right +column in the wrong line. + +When $LANG is "sl" for slovenian, the slovak menu was used, since "slovak" +starts with "sl". + +When 'paste' is set in the GUI the Paste toolbar button doesn't work. Clear +'paste' when starting the GUI. + +A message about a wrong viminfo line included the trailing NL. + +When 'paste' is set in the GUI the toolbar button doesn't work in Insert mode. +Use ":exe" in menu.vim to avoid duplicating the commands, instead of using a +mapping. + +Treat "mlterm" as an xterm-like terminal. (Seiichi Sato) + +":z.4" and ":z=4" didn't work Vi compatible. + +When sourcing a file, editing it and sourcing it again, it could appear twice +in ":scriptnames" and get a new <SID>, because the inode has changed. + +When $SHELL is set but empty the 'shell' option would be empty. Don't use an +empty $SHELL value. + +A command "w! file" in .vimrc or $EXINIT didn't work. Now it writes an empty +file. + +When a CTRL-F command at the end of the file failed, the cursor was still +moved to the start of the line. Now it remains where it is. + +When using ":s" or "&" to repeat the last substitute and "$" was used to put +the cursor in the last column, put the cursor in the last column again. This +is Vi compatible. + +Vim is not fully POSIX compliant but sticks with traditional Vi behavior. +Added a few flags in 'cpoptions' to behave the POSIX way when wanted. The +$VIM_POSIX environment variable is checked to set the default. + +Appending to a register didn't insert a line break like Vi. Added the '>' +flag to 'cpoptions' for this. + +Using "I" in a line with only blanks appended to the line. This is not Vi +compatible. Added the 'H' flag in 'coptions' for this. + +When joining multiple lines the cursor would be at the last joint, but Vi +leaves it at the position where "J" would put it. Added the 'q' flag in +'cpoptions' for this. + +Autoindent didn't work for ":insert" and ":append". + +Using ":append" in an empty buffer kept the dummy line. Now it's deleted to +be Vi compatible. + +When reading commands from a file and stdout goes to a terminal, would still +request the xterm version. Vim can't read it, thus the output went to the +shell and caused trouble there. + +When redirecting to a register with an invalid name the redirection would +still be done (after an error message). Now reset "redir_reg". (Yegappan +Lakshmanan) + +It was not possible to use a NL after a backslash in Ex mode. This is +sometimes used to feed multiple lines to a shell command. + +When 'cmdheight' is set to 2 in .vimrc and the GUI uses the number of lines +from the terminal we actually get 3 lines for the cmdline in gvim. + +When setting $HOME allocated memory would leak. + +Win32: bold characters may sometimes write in another character cell. Use +unicodepdy[] as for UTF-8. (Taro Muraoka) + +":w fname" didn't work for files with 'buftype' set to "nofile". + +The method used to locate user commands for completion differed from when they +are executed. Ambiguous command names were not completed properly. + +Incremental search may cause a crash when there is a custom statusline that +indirectly invokes ":normal". + +Diff mode failed when $DIFF_OPTIONS was set in the environment. Unset it +before invoking "diff". + +Completion didn't work after ":argdo", ":windo" and ":bufdo". Also for ":set +&l:opt" and ":set &g:opt". (Peter Winters) + +When setting 'ttymouse' to "dec" in an xterm that supports the DEC mouse +locator it doesn't work. Now switch off the mouse before selecting another +mouse model. + +When the CursorHold event is triggered and the commands peek for typed +characters the typeahead buffer may be messed up, e.g., when a mouse-up event +is received. Avoid invoking the autocommands from the function waiting for a +character, let it put K_CURSORHOLD in the input buffer. + +Removed the "COUNT" flag from ":argadd", to avoid ":argadd 1*" to be used like +":1argadd *". Same for ":argdelete" and ":argedit". + +Avoid that $LANG is used for the menus when LC_MESSAGES is "en_US". + +Added backslashes before dashes in the vim.1 manual page to make the appear as +real dashes. (Pierr Habouzit) + +Where "gq" left the cursor depended on the value of 'formatprg'. Now "gq" +always leaves the cursor at the last line of the formatted text. + +When editing a compressed file, such as "changelog.Debian.gz" file, filetype +detection may try to check the contents of the file while it's still +compressed. Skip setting 'filetype' for compressed files until they have been +decompressed. Required for patterns that end in a "*". + +Starting with an argument "+cmd" or "-S script" causes the cursor the be moved +to the first line. That breaks a BufReadPost autocommand that uses g`". +Don't move the cursor if it's somewhere past the first line. + +"gg=G" while 'modifiable' is off was uninterruptible. + +When 'encoding' is "sjis" inserting CTRL-V u d800 a few times causes a crash. +Don't insert a DBCS character with a NUL second byte. + +In Insert mode CTRL-O <Home> didn't move the cursor. Made "ins_at_eol" global +and reset it in nv_home(). + +Wildcard expansion failed: ":w /tmp/$$.`echo test`". Don't put quotes around +spaces inside backticks. + +After this sequence of commands: Y V p gv: the wrong line is selected. Now +let "gv" select the text that was put, since the original text is deleted. +This should be the most useful thing to do. + +":sleep 100u" sleeps for 100 seconds, not 100 usec as one might expect. Give +an error message when the argument isn't recognized. + +In gui_mch_draw_string() in gui_w32.c "unibuflen" wasn't static, resulting in +reallocating the buffer every time. (Alexei Alexandrov) + +When using a Python "atexit" function it was not invoked when Vim exits. Now +call Py_Finalize() for that. (Ugo Di Girolamo) +This breaks the thread stuff though, fixed by Ugo. + +GTK GUI: using a .vimrc with "set cmdheight=2 lines=43" and ":split" right +after startup, the window layout is messed up. (Michael Schaap) Added +win_new_shellsize() call in gui_init() to fix the topframe size. + +Trick to get ...MOUSE_NM not used when there are vertical splits. Now pass +column -1 for the left most window and add MOUSE_COLOFF for others. Limits +mouse column to 10000. + +searchpair() may hang when the end pattern has "\zs" at the end. Check that +we find the same position again and advance one character. + +When in diff mode and making a change that causes the "changed" highlighting +to disappear or reappear, it was still highlighted in another window. + +When a ":next" command fails because the user selects "Abort" at the ATTENTION +prompt the argument index was advanced anyway. + +When "~" is in 'iskeyword' the "gd" doesn't work, it's used for the previous +substitute pattern. Put "\V" in the pattern to avoid that. + +Use of sprintf() sometimes didn't check properly for buffer overflow. Also +when using smsg(). Included code for snprintf() to avoid having to do size +checks where invoking them + +":help \=<Tab>" didn't find "sub-replace-\=". Wild menu for help tags didn't +show backslashes. ":he :s\=" didn't work. + +When reading an errorfile "~/" in a file name was not expanded. + +GTK GUI: When adding a scrollbar (e.g. when using ":vsplit") in a script or +removing it the window size may change. GTK sends us resize events when we +change the window size ourselves, but they may come at an unexpected moment. +Peek for a character to get any window resize events and fix 'columns' and +'lines' to undo this. + +When using the GTK plug mechanism, resizing and focus was not working +properly. (Neil Bird) + +After deleting files from the argument list a session file generated with +":mksession" may contain invalid ":next" commands. + +When 'shortmess' is empty and 'keymap' set to accents, in Insert mode CTRL-N +may cause the hit-enter prompt. Typing 'a then didn't result in the accented +character. Put the character typed at the prompt back in the typeahead buffer +so that mapping is done in the right mode. + +setbufvar() and setwinvar() did not give error messages. + +It was possible to set a variable with an illegal name, e.g. with setbufvar(). +It was possible to define a function with illegal name, e.t. ":func F{-1}()" + +CTRL-W F and "gf" didn't use the same method to get the file name. + +When reporting a conversion error the line number of the last error could be +given. Now report the first encountered error. + +When using ":e ++enc=name file" and iconv() was used for conversion an error +caused a fall-back to no conversion. Now replace a character with '?' and +continue. + +When opening a new buffer the local value of 'bomb' was not initialized from +the global value. + +Win32: When using the "Edit with Vim" entry the file name was limited to about +200 characters. + +When using command line completion for ":e *foo" and the file "+foo" exists +the resulting command ":e +foo" doesn't work. Now insert a backslash: ":e +\+foo". + +When the translation of "-- More --" was not 10 characters long the following +message would be in the wrong position. + +At the more-prompt the last character in the last line wasn't drawn. + +When deleting non-existing text while 'virtualedit' is set the '[ and '] marks +were not set. + +Win32: Could not use "**/" in 'path', it had to be "**\". + +The search pattern "\n" did not match at the end of the last line. + +Searching for a pattern backwards, starting on the NUL at the end of the line +and 'encoding' is "utf-8" would match the pattern just before it incorrectly. +Affected searchpair('/\*', '', '\*/'). + +For the Find/Replace dialog it was possible that not finding the text resulted +in an error message while redrawing, which cleared the syntax highlighting +while it was being used, resulting in a crash. Now don't clear syntax +highlighting, disable it with b_syn_error. + +Win32: Combining UTF-8 characters were drawn on the previous character. +Could be noticed with a Thai font. + +Output of ":function" could leave some of the typed text behind. (Yegappan +Lakshmanan) + +When the command line history has only a few lines the command line window +would be opened with these lines above the first window line. + +When using a command line window for search strings ":qa" would result in +searching for "qa" instead of quitting all windows. + +GUI: When scrolling with the scrollbar and there is a line that doesn't fit +redrawing may fail. Make sure w_skipcol is valid before redrawing. + +Limit the values of 'columns' and 'lines' to avoid an overflow in Rows * +Columns. Fixed bad effects when running out of memory (command line would be +reversed, ":qa!" resulted in ":!aq"). + +Motif: "gvim -iconic" opened the window anyway. (David Harrison) + +There is a tiny chance that a symlink gets created between checking for an +existing file and creating a file. Use the O_NOFOLLOW for open() if it's +available. + +In an empty line "ix<CTRL-O>0" moved the cursor to after the line instead of +sticking to the first column. + +When using ":wq" and a BufWriteCmd autocmd uses inputsecret() the text was +echoed anyway. Set terminal to raw mode in getcmdline(). + +Unix: ":w a;b~c" caused an error in expanding wildcards. + +When appending to a file with ":w >>fname" in a buffer without a name, causing +the buffer to use "fname", the modified flag was reset. + +When appending to the current file the "not edited" flag would be reset. +":w" would overwrite the file accidentally. + +Unix: When filtering text with an external command Vim would still read input, +causing text typed for the command (e.g., a password) to be eaten and echoed. +Don't read input when the terminal is in cooked mode. + +The Cygwin version of xxd used CR/LF line separators. (Corinna Vinschen) + +Unix: When filtering text through a shell command some resulting text may be +dropped. Now after detecting that the child has exited try reading some more +of its output. + +When inside input(), using "CTRL-R =" and the expression throws an exception +the command line was not abandoned but it wasn't used either. Now abandon +typing the command line. + +'delcombine' was also used in Visual and Select mode and for commands like +"cl". That was illogical and has been disabled. + +When recording while a CursorHold autocommand was defined special keys would +appear in the register. Now the CursorHold event is not triggered while +recording. + +Unix: the src/configure script used ${srcdir-.}, not all shells understand +that. Use ${srcdir:-.} instead. + +When editing file "a" which is a symlink to file "b" that doesn't exist, +writing file "a" to create "b" and then ":split b" resulted in two buffers on +the same file with two different swapfile names. Now set the inode in the +buffer when creating a new file. + +When 'esckeys' is not set don't send the xterm code to request the version +string, because it may cause trouble in Insert mode. + +When evaluating an expression for CTRL-R = on the command line it was possible +to call a function that opens a new window, resulting in errors for +incremental search, and many other nasty things were possible. Now use the +|textlock| to disallow changing the buffer or jumping to another window +to protect from unexpected behavior. Same for CTRL-\ e. + +"d(" deleted the character under the cursor, while the documentation specified +an exclusive motion. Vi also doesn't delete the character under the cursor. + +Shift-Insert in Insert mode could put the cursor before the last character +when it just fits in the window. In coladvance() don't stop at the window +edge when filling with spaces and when in Insert mode. In mswin.vim avoid +getting a beep from the "l" command. + +Win32 GUI: When Alt-F4 is used to close the window and Cancel is selected in +the dialog then Vim would insert <M-F4> in the text. Now it's ignored. + +When ":silent! {cmd}" caused the swap file dialog, which isn't displayed, +there would still be a hit-enter prompt. + +Requesting the termresponse (|t_RV|) early may cause problems with "-c" +arguments that invoke an external command or even "-c quit". Postpone it +until after executing "-c" arguments. + +When typing in Insert mode so that a new line is started, using CTRL-G u to +break undo and start a new change, then joining the lines with <BS> caused +undo info to be missing. Now reset the insertion start point. + +Syntax HL: When a region start match has a matchgroup and an offset that +happens to be after the end of the line then it continued in the next line and +stopped at the region end match, making the region continue after that. +Now check for the column being past the end of the line in syn_add_end_off(). + +When changing a file, setting 'swapfile' off and then on again, making another +change and killing Vim, then some blocks may be missing from the swapfile. +When 'swapfile' is switched back on mark all blocks in the swapfile as dirty. +Added mf_set_dirty(). + +Expanding wildcards in a command like ":e aap;<>!" didn't work. Put +backslashes before characters that are special to the shell. (Adri Verhoef) + +A CursorHold autocommand would cause a message to be cleared. Don't show the +special key for the event for 'showcmd'. + +When expanding a file name for a shell command, as in "!cmd foo<Tab>" or ":r +!cmd foo<Tab>" also escape characters that are special for the shell: +"!;&()<>". + +When the name of the buffer was set by a ":r fname" command |cpo-f| no +autocommands were triggered to notify about the change in the buffer list. + +In the quickfix buffer 'bufhidden' was set to "delete", which caused closing +the quickfix window to leave an unlisted "No Name" buffer behind every time. + +Win32: when using two screens of different size, setting 'lines' to a large +value didn't fill the whole screen. (SungHyun Nam) + +Win32 installer: The generated _vimrc contained an absolute path to diff.exe. +After upgrading it becomes invalid. Now use $VIMRUNTIME instead. + +The command line was cleared to often when 'showmode' was set and ":silent +normal vy" was used. Don't clear the command line unless the mode was +actually displayed. Added the "mode_displayed" variable. + +The "load session" toolbar item could not handle a space or other special +characters in v:this_session. + +":set sta ts=8 sw=4 sts=2" deleted 4 spaces halfway a line instead of 2. + +In a multi-byte file the foldmarker could be recognized in the trail byte. +(Taro Muraoka) + +Pasting with CTRL-V and menu didn't work properly when some commands are +mapped. Use ":normal!" instead of ":normal". (Tony Apuzzo) + +Crashed when expanding a file name argument in backticks. + +In some situations the menu and scrollbar didn't work, when the value contains +a CSI byte. (Yukihiro Nakadaira) + +GTK GUI: When drawing the balloon focus changes and we might get a key release +event that removed the balloon again. Ignore the key release event. + +'titleold' was included in ":mkexrc" and ":mksession" files. + +":set background&" didn't use the same logic as was used when starting up. + +When "umask" is set such that nothing is writable then the viminfo file would +be written without write permission. (Julian Bridle) + +Motif: In diff mode dragging one scrollbar didn't update the scrollbar of the +other diff'ed window. + +When editing in an xterm with a different number of colors than expected the +screen would be cleared and redrawn, causing the message about the edited file +to be cleared. Now set "keep_msg" to redraw the last message. + +For a color terminal: When the Normal HL uses bold, possibly to make the color +lighter, and another HL group specifies a color it might become light as well. +Now reset bold if a HL group doesn't specify bold itself. + +When using 256 color xterm the color 255 would show up as color 0. Use a +short instead of a char to store the color number. + +ml_get errors when searching for "\n\zs" in an empty file. + +When selecting a block and using "$" to select until the end of every line and +not highlighting the character under the cursor the first character of the +block could be unhighlighted. + +When counting words for the Visual block area and using "$" to select until +the end of every line only up to the length of the last line was counted. + +"dip" in trailing empty lines left one empty line behind. + +The script ID was only remembered globally for each option. When a buffer- or +window-local option was set the same "last set" location was changed for all +buffers and windows. Now remember the script ID for each local option +separately. + +GUI: The "Replace All" button didn't handle backslashes in the replacement in +the same way as "Replace". Escape backslashes so that they are taken +literally. + +When using Select mode from Insert mode and typing a key, causing lines to be +deleted and a message displayed, delayed the effect of inserting the key. +Now overwrite the message without delay. + +When 'whichwrap' includes "l" then "dl" and "yl" on a single letter line +worked differently. Now recognize all operators when using "l" at the end of +a line. + +GTK GUI: when the font selector returned a font name with a comma in it then +it would be handled like two font names. Now put a backslash before the +comma. + +MS-DOS, Win32: When 'encoding' defaults to "latin1" then the value for +'iskeyword' was still for CPxxx. And when 'nocompatible' was set 'isprint' +would also be the wrong value. + +When a command was defined not to take arguments and no '|' no warning message +would be given for using a '|'. Also with ":loadkeymap". + +Motif: When using a fontset and 'encoding' is "utf-8" and sizeof(wchar_t) != +sizeof(XChar2b) then display was wrong. (Yukihiro Nakadaira) + +":all" always set the current window to the first window, even when it +contains a buffer that is not in the argument list (can't be closed because it +is modified). Now go to the window that has the first item of the argument +list. + +GUI: To avoid left-over pixels from bold text all characters after a character +with special attributes were redrawn. Now only do this for characters that +actually are bold. Speeds up displaying considerably. + +When only highlighting changes and the text is scrolled at the same time +everything is redrawn instead of using a scroll and updating the changed text. +E.g., when using ":match" to highlight a paren that the cursor landed on. +Added SOME_VALID: Redraw the whole window but also try to scroll to minimize +redrawing. + +Win32: When using Korean IME making it active didn't work properly. (Moon, +Yu-sung, 2005 March 21) + +Ruby interface: when inserting/deleting lines display wasn't updated. (Ryan +Paul) + +--- fixes since Vim 7.0b --- + +Getting the GCC version in configure didn't work with Solaris sed. First +strip any "darwin." and then get the version number. + +The "autoload" directory was missing from the self-installing executable for +MS-Windows. + +The MS-Windows install program would find "vimtutor.bat" in the install +directory. After changing to "c:" also change to "\" to avoid looking in the +install directory. + +To make the 16 bit DOS version compile exclude not used highlight +initializations and build a tiny instead of small version. + +finddir() and findfile() accept a negative count and return a List then. + +The Python indent file contained a few debugging statements, removed. + +Expanding {} for a function name, resulting in a name starting with "s:" was +not handled correctly. + +Spelling: renamed COMPOUNDMAX to COMPOUNDWORDMAX. Added several items to be +able to handle the new Hungarian dictionary. + +Mac: Default to building for the current platform only, that is much faster +than building a universal binary. Also, using Perl/Python/etc. only works for +the current platform. + +The time on undo messages disappeared for someone. Using %T for strftime() +apparently doesn't work everywhere. Use %H:%M:%S instead. + +Typing BS at the "z=" prompt removed the prompt. + +--- fixes and changes since Vim 7.0c --- + +When jumping to another tab page the Vim window size was always set, even when +nothing in the layout changed. + +Win32 GUI tab pages line wasn't always enabled. Do a proper check for the +compiler version. + +Win32: When switching between tab pages the Vim window was moved when part of +it was outside of the screen. Now only do that in the direction of a size +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 right scrollbars, ":tabedit" kept them instead of +using the one that isn't needed. + +Using "gP" to replace al the text could leave the cursor below the last line, +causing ml_get errors. + +When 'cursorline' is set don't use the highlighting when Visual mode is +active, otherwise it's difficult to see the selected area. + +The matchparen plugin restricts the search to 100 lines, to avoid a long delay +when there are closed folds. + +Sometimes using CTRL-X s to list spelling suggestions used text from another +line. + +Win32: Set the default for 'isprint' back to the wrong default "@,~-255", +because many people use Windows-1252 while 'encoding' is "latin1". + +GTK: Added a workaround for gvim crashing when used over an untrusted ssh +link, caused by GTK doing something nasty. (Ed Catmur) + +Win32: The font used for the tab page labels is too big. Use the system menu +font. (George Reilly) + +Win32: Adjusting the window position and size to keep it on the screen didn't +work properly when the taskbar is on the left or top of the screen. + +The installman.sh and installml.sh scripts use ${10}, that didn't work with +old shells. And use "test -f" instead of "test -e". + +Win32: When 'encoding' was set in the vimrc then a directory argument for diff +mode didn't work. + +GUI: at the inputlist() prompt the cursorshape was adjusted as if the windows +were still at their old position. + +The parenmatch plugin didn't remember the highlighting per window. + +Using ":bd" for a buffer that's the current window in another tab page caused +a crash. + +For a new tab page the 'scroll' option wasn't set to a good default. + +Using an end offset for a search "/pat/e" didn't work properly for multi-byte +text. (Yukihiro Nakadaira) + +":s/\n/,/" doubled the text when used on the last line. + +When "search" is in 'foldopen' "[s" and "]s" now open folds. + +When using a numbered function "dict" can be omitted, but "self" didn't work +then. Always add FC_DICT to the function flags when it's part of a +dictionary. + +When "--remote-tab" executes locally it left an empty tab page. + +"gvim -u NONE", ":set cursorcolumn", "C" in the second line didn't update +text. Do update further lines even though the "$" is displayed. + +VMS: Support GTK better, also enable +clientserver. (Zoltan Arpadffy) + +When highlighting of statusline or tabline is changed there was no redraw to +show the effect. + +Mac: Added "CFBundleIdentifier" to infplist.xml. + +Added tabpage-local variables t:var. + +Win32: Added double-click in tab pages line creates new tab. (Yegappan +Lakshmanan) + +Motif: Added GUI tab pages line. (Yegappan Lakshmanan) + +Fixed crash when 'lines' was set to 1000 in a modeline. + +When init_spellfile() finds a writable directory in 'runtimepath' but it +doesn't contain a "spell" directory, create one. + +Win32: executable() also finds "xxd" in the directory where Vim was started, +but "!xxd" doesn't work. Append the Vim starting directory to $PATH. + +The tab page labels are shortened, directory names are reduced to a single +letter by default. Added the pathshorten() function to allow a user to do the +same. + +":saveas" now resets 'readonly' if the file was successfully written. + +Set $MYVIMRC file to the first found .vimrc file. +Set $MYGVIMRC file to the first found .gvimrc file. +Added menu item "Startup Settings" that edits the $MYVIMRC file + +Added matcharg(). + +Error message E745 appeared twice. Renamed one to E786. + +Fixed crash when using "au BufRead * Sexplore" and doing ":help". Was wiping +out a buffer that's still in a window. + +":hardcopy" resulted in an error message when 'encoding' is "utf-8" and +'printencoding' is empty. Now it assumes latin1. (Mike Williams) + +The check for the toolbar feature for Motif, depending on certain included +files, wasn't detailed enough, causing building to fail in gui_xmebw.c. + +Using CTRL-E in Insert mode completion after CTRL-P inserted the first match +instead of the original text. + +When displaying a UTF-8 character with a zero lower byte Vim might think the +previous character is double-wide. + +The "nbsp" item of 'listchars' didn't work when 'encoding' was utf-8. + +Motif: when Xm/xpm.h is missing gui_xmebw.c would not compile. +HAVE_XM_UNHIGHLIGHTT_H was missing a T. + +Mac: Moved the .icns files into src/os_mac_rsrc, so that they can all be +copied at once. Adjusted the Info.plist file for three icons. + +When Visual mode is active while switching to another tabpage could get ml_get +errors. + +When 'list' is set, 'nowrap' the $ in the first column caused 'cursorcolumn' +to move to the right. + +When a line wraps, 'cursorcolumn' was never displayed past the end of the +line. + +'autochdir' was only available when compiled with NetBeans and GUI. Now it's +a separate feature, also available in the "big" version. + +Added CTRL-W gf: open file under cursor in new tab page. + +When using the menu in the tab pages line, "New Tab" opens the new tab before +where the click was. Beyond the labels the new tab appears at the end instead +of after the current tab page. + +Inside a mapping with an expression getchar() could not be used. + +When vgetc is used recursively vgetc_busy protects it from being used +recursively. But after a ":normal" command the protection was reset. + +":s/a/b/n" didn't work when 'modifiable' was off. + +When $VIMRUNTIME includes a multi-byte character then rgb.txt could not be +found. (Yukihiro Nakadaira) + +":mkspell" didn't work correctly for non-ASCII affix flags when conversion is +needed on the spell file. + +glob('/dir/\$ABC/*') didn't work. + +When using several tab pages and changing 'cmdheight' the display could become +messed up. Now store the value of 'cmdheight' separately for each tab page. + +The user of the Enter key while the popup menu is visible was still confusing. +Now use Enter to select the match after using a cursor key. + +Added "usetab" to 'switchbuf'. + + +--- fixes and changes since Vim 7.0d --- + +Added CTRL-W T: move a window to a new tab page. + +Using CTRL-X s in Insert mode to complete spelling suggestions and using BS +deleted characters before the bad word. + +A few small fixes for the VMS makefile. (Zoltan Arpadffy) + +With a window of 91 lines 45 cols, ":vsp" scrolled the window. Copy w_wrow +when splitting a window and skip setting the height when it's already at the +right value. + +Using <silent> in a mapping with a shell command and the GUI caused redraw +to use wrong attributes. + +Win32: Using MSVC 4.1 for install.exe resulted in the start menu items to be +created in the administrator directory instead of "All Users". Define the +CSIDL_ items if they are missing. + +Motif: The GUI tabline did not use the space above the right scrollbar. Work +around a bug in the Motif library. (Yegappan Lakshmanan) + +The extra files for XML Omni completion are now also installed. +|xml-omni-datafile| + +GTK GUI: when 'm' is missing from 'guioptions' during startup and pressing +<F10> GTK produced error messages. Now do create the menu but disable it just +after the first gui_mch_update(). + +":mkspell" doesn't work well with the Hungarian dictionary from the Hunspell +project. Back to the Myspell dictionary. + +In help files hide the | used around tags. + +Renamed pycomplete to pythoncomplete. + +Added "tabpages" to 'sessionoptions'. + +When 'guitablabel' is set the effect wasn't visible right away. + +Fixed a few 'cindent' errors. + +When completing menu names, e.g., after ":emenu", don't sort the entries but +keep them in the original order. + +Fixed a crash when editing a directory in diff mode. Don't trigger +autocommands when executing the diff command. + +Getting a keystroke could get stuck if 'encoding' is a multi-byte encoding and +typing a special key. + +When 'foldignore' is set the folds were not updated right away. + +When a list is indexed with [a : b] and b was greater than the length an error +message was given. Now silently truncate the result. + +When using BS during Insert mode completion go back to the original text, so +that CTRL-N selects the first matching entry. + +Added the 'M' flag to 'cinoptions'. + +Win32: Make the "gvim --help" window appear in the middle of the screen +instead of at an arbitrary position. (Randall W. Morris) + +Added gettabwinvar() and settabwinvar(). + +Command line completion: pressing <Tab> after ":e /usr/*" expands the whole +tree, because it becomes ":e /usr/**". Don't add a star if there already is +one. + +Added grey10 to grey90 to all GUIs, so that they can all be used for +initializing highlighting. Use grey40 for CursorColumn and CursorLine when +'background' is "dark". + +When reading a file and using iconv for conversion, an incomplete byte +sequence at the end caused problems. (Yukihiro Nakadaira) + + +--- fixes and changes since Vim 7.0e --- + +Default color for MatchParen when 'background' is "dark" is now DarkCyan. + +":syn off" had to be used twice in a file that sets 'syntax' in a modeline. +(Michael Geddes) + +When using ":vsp" or ":sp" the available space wasn't used equally between +windows. (Servatius Brandt) + +Expanding <cWORD> on a trailing blank resulted in the first word in the line +if 'encoding' is a multi-byte encoding. + +Spell checking: spellbadword() didn't see a missing capital in the first word +of a line. Popup menu now only suggest the capitalized word when appropriate. + +When using whole line completion CTRL-L moves through the matches but it +didn't work when at the original text. + +When completion finds the longest match, don't go to the first match but stick +at the original text, so that CTRL-N selects the first one. + +Recognize "zsh-beta" like "zsh" for setting the 'shellpipe' default. (James +Vega) + +When using ":map <expr>" and the expression results in something with a +special byte (NUL or CSI) then it didn't work properly. Now escape special +bytes. + +The default Visual highlighting for a color xterm with 8 colors was a magenta +background, which made magenta text disappear. Now use reverse in this +specific situation. + +After completing the longest match "." didn't insert the same text. Repeating +also didn't work correctly for multi-byte text. + +When using Insert mode completion and BS the whole word that was completed +would result in all possible matches. Now stop completion. Also fixes that +for spell completion the previous word was deleted. + +GTK: When 'encoding' is "latin1" and using non-ASCII characters in a file name +the tab page label was wrong and an error message would be given. + +The taglist() function could hang on a tags line with a non-ASCII character. + +Win32: When 'encoding' differs from the system encoding tab page labels with +non-ASCII characters looked wrong. (Yegappan Lakshmanan) + +Motif: building failed when Xm/Notebook.h doesn't exist. Added a configure +check, disable GUI tabline when it's missing. + +Mac: When compiled without multi-byte feature the clipboard didn't work. + +It was possible to switch to another tab page when the cmdline window is open. + +Completion could hang when 'lines' is 6 and a preview window was opened. + +Added CTRL-W gF: open file under cursor in new tab page and jump to the line +number following the file name. +Added 'guitabtooltip'. Implemented for Win32 (Yegappan Lakshmanan). + +Added "throw" to 'debug' option: throw an exception for error messages even +whey they would otherwise be ignored. + +When 'keymap' is set and a line contains an invalid entry could get a "No +mapping found" warning instead of a proper error message. + +Motif: default to using XpmAttributes instead of XpmAttributes_21. + +A few more changes for 64 bit MS-Windows. (George Reilly) + +Got ml_get errors when doing "o" and selecting in other window where there are +less lines shorter than the cursor position in the other window. ins_mouse() +was using position in wrong window. + +Win32 GUI: Crash when giving a lot of messages during startup. Allocate twice +as much memory for the dialog template. + +Fixed a few leaks and wrong pointer use reported by coverity. + +When showing menus the mode character was sometimes wrong. + +Added feedkeys(). (Yakov Lerner) + +Made matchlist() always return all submatches. + +Moved triggering QuickFixCmdPost to before jumping to the first location. + +Mac: Added the 'macatsui' option as a temporary work around for text drawing +problems. + +Line completion on "/**" gave error messages when scanning an unloaded buffer. + +--- fixes and changes since Vim 7.0f --- + +Win32: The height of the tab page labels is now adjusted to the font height. +(Yegappan Lakshmanan) + +Win32: selecting the tab label was off by one. (Yegappan Lakshmanan) + +Added tooltips for Motif and GTK tab page labels. (Yegappan Lakshmanan) + +When 'encoding' is "utf-8" then ":help spell" would report an illegal byte and +the file was not converted from latin1 to utf-8. Now retry with latin1 if +reading the file as utf-8 results in illegal bytes. + +Escape the argument of feedkeys() before putting it in the typeahead buffer. +(Yukihiro Nakadaira) + +Added the v:char variable for evaluating 'formatexpr'. (Yukihiro Nakadaira) + +With 8 colors Search highlighting combined with Statement highlighted text +made the text disappear. + +VMS: avoid warnings for redefining MAX and MIN. (Zoltan Arpadffy) + +When 'virtualedit' includes "onemore", stopping Visual selection would still +move the cursor left. + +Prevent that using CTRL-R = in Insert mode can start Visual mode. + +Fixed a crash that occurred when in Insert mode with completion active and a +mapping caused edit() to be called recursively. + +When using CTRL-O in Insert mode just after the last character while +'virtualedit' is "all", then typing CR moved the last character to the next +line. Call coladvance() before starting the new line. + +When using |:shell| ignore clicks on the tab page labels. Also when using the +command line window. + +When 'eventignore' is "all" then adding more to ignoring some events, e.g., +for ":vimgrep", would actually trigger more events. + +Win32: When a running Vim uses server name GVIM1 then "gvim --remote fname" +didn't find it. When looking for a server name that doesn't end in a digit +and it is not found then use another server with that name and a number (just +like on Unix). + +When using "double" in 'spellsuggest' when the language doesn't support sound +folding resulted in too many suggestions. + +Win32: Dropping a shortcut on the Vim icon didn't edit the referred file like +editing it in another way would. Use fname_expand() in buf_set_name() instead +of simply make the file name a full path. + +Using feedkeys() could cause Vim to hang. + +When closing another tab page from the tabline menu in Insert mode the tabline +was not updated right away. + +The syntax menu didn't work in compatible mode. + +After using ":tag id" twice with the same "id", ":ts" and then ":pop" a ":ts" +reported no matching tag. Clear the cached tag name. + +In Insert mode the matchparen plugin highlighted the wrong paren when there is +a string just next to a paren. + +GTK: After opening a new tab page the text was sometimes not drawn correctly. +Flush output and catch up with events when updating the tab page labels. + +In the GUI, using CTRL-W q to close the last window of a tab page could cause +a crash. + +GTK: The tab pages line menu was not converted from 'encoding' to utf-8. + +Typing a multi-byte character or a special key at the hit-enter prompt did not +work. + +When 'virtualedit' contains "onemore" CTRL-O in Insert mode still moved the +cursor left when it was after the end of the line, even though it's allowed to +be there. + +Added test for using tab pages. + +towupper() and towlower() were not used, because of checking for +__STDC__ISO_10646__ instead of __STDC_ISO_10646__. (sertacyildiz) + +For ":map <expr>" forbid changing the text, jumping to another buffer and +using ":normal" to avoid nasty side effects. + +--- fixes and changes since Vim 7.0g --- + +Compilation error on HP-UX, use of "dlerr" must be inside a #ifdef. +(Gary Johnson) + +Report +reltime feature in ":version" output. + +The tar and zip plugins detect failure to get the contents of the archive and +edit the file as-is. + +When the result of 'guitablabel' is empty fall back to the default label. + +Fixed crash when using ":insert" in a while loop and missing "endwhile". + +"gt" and other commands could move to another window when |textlock| active +and when the command line window was open. + +Spell checking a file with syntax highlighting and a bad word at the end of +the line is ignored could make "]s" hang. + +Mac: inputdialog() didn't work when compiled with big features. + +Interrupting ":vimgrep" while it is busy loading a file left a modified and +hidden buffer behind. Use enter_cleanup() and leave_cleanup() around +wipe_buffer(). + +When making 'keymap' empty the b:keymap_name variable wasn't deleted. + +Using CTRL-N that searches a long time, pressing space to interrupt the +searching and accept the first match, the popup menu was still displayed +briefly. + +When setting the Vim window height with -geometry the 'window' option could be +at a value that makes CTRL-F behave differently. + +When opening a quickfix window in two tabs they used different buffers, +causing redrawing problems later. Now use the same buffer for all quickfix +windows. (Yegappan Lakshmanan) + +When 'mousefocus' is set moving the mouse to the text tab pages line would +move focus to the first window. Also, the mouse pointer would jump to the +active window. + +In a session file, when an empty buffer is wiped out, do this silently. + +When one window has the cursor on the last line and another window is resized +to make that window smaller, the cursor line could go below the displayed +lines. In win_new_height() subtract one from the available space. +Also avoid that using "~" lines makes the window scroll down. + +Mac: When sourcing the "macmap.vim" script and then finding a .vimrc file the +'cpo' option isn't set properly, because it was already set and restored. +Added the <special> argument to ":map", so that 'cpo' doesn't need to be +changed to be able to use <> notation. Also do this for ":menu" for +consistency. + +When using "/encoding=abc" in a spell word list, only "bc" was used. + +When 'encoding' and 'printencoding' were both "utf-8" then ":hardcopy" didn't +work. (Mike Williams) + +Mac: When building with "--disable-gui" the install directory would still be +"/Applications" and Vim.app would be installed. Now install in /usr/local as +usual for a console application. + +GUI: when doing completion and there is one match and still searching for +another, the cursor was displayed at the end of the line instead of after the +match. Now show the cursor after the match while still searching for matches. + +GUI: The mouse shape changed on the statusline even when 'mouse' was empty and +they can't be dragged. + +GTK2: Selecting a button in the confirm() dialog with Tab or cursor keys and +hitting Enter didn't select that button. Removed GTK 1 specific code. (Neil +Bird) + +When evaluating 'balloonexpr' takes a long time it could be called +recursively, which could cause a crash. + +exists() could not be used to detect whether ":2match" is supported. Added a +check for it specifically. + +GTK1: Tab page labels didn't work. (Yegappan Lakshmanan) + +Insert mode completion: When finding matches use 'ignorecase', but when adding +matches to the list don't use it, so that all words with different case are +added, "word", "Word" and "WORD". + +When 'cursorline' and 'hlsearch' are set and the search pattern is "x\n" +the rest of the line was highlighted as a match. + +Cursor moved while evaluating 'balloonexpr' that invokes ":isearch" and +redirects the output. Don't move the cursor to the command line if msg_silent +is set. + +exists() ignored text after a function name and option name, which could +result in false positives. + +exists() ignored characters after the recognized word, which can be wrong when +using a name with non-keyword characters. Specifically, these calls no longer +allow characters after the name: exists('*funcname') exists('*funcname(...') +exists('&option') exists(':cmd') exists('g:name') exists('g:name[n]') +exists('g:name.n') + +Trigger the TabEnter autocommand only after entering the current window of the +tab page, otherwise the commands are executed with an invalid current window. + +Win32: When using two monitors and Vim is on the second monitor, changing the +width of the Vim window could make it jump to the first monitor. + +When scrolling back at the more prompt and the quitting a line of text would +be left behind when 'cmdheight' is 2 or more. + +Fixed a few things for Insert mode completion, especially when typing BS, +CTRL-N or a printable character while still searching for matches. + + +============================================================================== +VERSION 7.1 *version-7.1* *version7.1* + +This section is about improvements made between version 7.0 and 7.1. + +This is a bug-fix release, there are no fancy new features. + + +Changed *changed-7.1* +------- + +Added setting 'mouse' in vimrc_example.vim. + +When building with MZscheme also look for include files in the "plt" +subdirectory. That's where they are for FreeBSD. + +The Ruby interface module is now called "Vim" instead of "VIM". But "VIM" is +an alias, so it's backwards compatible. (Tim Pope) + + +Added *added-7.1* +----- + +New syntax files: + /var/log/messages (Yakov Lerner) + Autohotkey (Nikolai Weibull) + AutoIt v3 (Jared Breland) + Bazaar commit file "bzr". (Dmitry Vasiliev) + Cdrdao TOC (Nikolai Weibull) + Cmusrc (Nikolai Weibull) + Conary recipe (rPath Inc) + Framescript (Nikolai Weibull) + FreeBasic (Mark Manning) + Hamster (David Fishburn) + IBasic (Mark Manning) + Initng (Elan Ruusamae) + Ldapconf (Nikolai Weibull) + Litestep (Nikolai Weibull) + Privoxy actions file (Doug Kearns) + Streaming Descriptors "sd" (Puria Nafisi Azizi) + +New tutor files: + Czech (Lubos Turek) + Hungarian (Arpad Horvath) + Turkish (Serkan kkk) + utf-8 version of Greek tutor. + utf-8 version of Russian tutor. + utf-8 version of Slowak tutor. + +New filetype plugins: + Bst (Tim Pope) + Cobol (Tim Pope) + Fvwm (Gautam Iyer) + Hamster (David Fishburn) + Django HTML template (Dave Hodder) + +New indent files: + Bst (Tim Pope) + Cobol (Tim Pope) + Hamster (David Fishburn) + Django HTML template (Dave Hodder) + Javascript + JSP (David Fishburn) + +New keymap files: + Bulgarian (Boyko Bantchev) + Mongolian (Natsagdorj Shagdar) + Thaana (Ibrahim Fayaz) + Vietnamese (Samuel Thibault) + +Other new runtime files: + Ada support files. (Neil Bird, Martin Krischik) + Slovenian menu translations (Mojca Miklavec) + Mono C# compiler plugin (Jarek Sobiecki) + + +Fixed *fixed-7.1* +----- + +Could not build the Win32s version. Added a few structure definitions in +src/gui_w32.c + + +Patch 7.0.001 +Problem: ":set spellsuggest+=10" does not work. (Suresh Govindachar) +Solution: Add P_COMMA to the 'spellsuggest' flags. +Files: src/option.c + +Patch 7.0.002 +Problem: C omni completion has a problem with tags files with a path + containing "#" or "%". +Solution: Escape these characters. (Sebastian Baberowski) +Files: runtime/autoload/ccomplete.vim + +Patch 7.0.003 +Problem: GUI: clicking in the lower part of a label in the tab pages line + while 'mousefocus' is set may warp the mouse pointer. (Robert + Webb) +Solution: Check for a negative mouse position. +Files: src/gui.c + +Patch 7.0.004 +Problem: Compiler warning for debug_saved used before set. (Todd Blumer) +Solution: Remove the "else" for calling save_dbg_stuff(). +Files: src/ex_docmd.c + +Patch 7.0.005 (extra) +Problem: Win32: The installer doesn't remove the "autoload" and "spell" + directories. (David Fishburn) +Solution: Add the directories to the list to be removed. +Files: nsis/gvim.nsi + +Patch 7.0.006 +Problem: Mac: "make shadow" doesn't make a link for infplist.xml. (Axel + Kielhorn) +Solution: Make the link. +Files: src/Makefile + +Patch 7.0.007 +Problem: AIX: compiling fails for message.c. (Ruediger Hornig) +Solution: Move the #if outside of memchr(). +Files: src/message.c + +Patch 7.0.008 +Problem: Can't call a function that uses both <SID> and {expr}. (Thomas) +Solution: Check both the expanded and unexpanded name for <SID>. +Files: src/eval.c + +Patch 7.0.009 +Problem: ml_get errors with both 'sidescroll' and 'spell' set. +Solution: Use ml_get_buf() instead of ml_get(), get the line from the right + buffer, not the current one. +Files: src/spell.c + +Patch 7.0.010 +Problem: The spellfile plugin required typing login name and password. +Solution: Use "anonymous" and "vim7user" by default. No need to setup a + .netrc file. +Files: runtime/autoload/spellfile.vim + +Patch 7.0.011 +Problem: Can't compile without the folding and with the eval feature. +Solution: Add an #ifdef. (Vallimar) +Files: src/option.c + +Patch 7.0.012 +Problem: Using the matchparen plugin, moving the cursor in Insert mode to a + shorter line that ends in a brace, changes the preferred column +Solution: Use winsaveview()/winrestview() instead of getpos()/setpos(). +Files: runtime/plugin/matchparen.vim + +Patch 7.0.013 +Problem: Insert mode completion: using CTRL-L to add an extra character + also deselects the current match, making it impossible to use + CTRL-L a second time. +Solution: Keep the current match. Also make CTRL-L work at the original + text, using the first displayed match. +Files: src/edit.c + +Patch 7.0.014 +Problem: Compiling gui_xmebw.c fails on Dec Alpha Tru64. (Rolfe) +Solution: Disable some code for Motif 1.2 and older. +Files: src/gui_xmebw.c + +Patch 7.0.015 +Problem: Athena: compilation problems with modern compiler. +Solution: Avoid type casts for lvalue. (Alexey Froloff) +Files: src/gui_at_fs.c + +Patch 7.0.016 +Problem: Printing doesn't work for "dec-mcs" encoding. +Solution: Add "dec-mcs", "mac-roman" and "hp-roman8" to the list of + recognized 8-bit encodings. (Mike Williams) +Files: src/mbyte.c + +Patch 7.0.017 (after 7.0.014) +Problem: Linking gui_xmebw.c fails on Dec Alpha Tru64. (Rolfe) +Solution: Adjust defines for Motif 1.2 and older. +Files: src/gui_xmebw.c + +Patch 7.0.018 +Problem: VMS: plugins are not loaded on startup. +Solution: Remove "**" from the path. (Zoltan Arpadffy) +Files: src/main.c + +Patch 7.0.019 +Problem: Repeating "VjA789" may cause a crash. (James Vega) +Solution: Check the cursor column after moving it to another line. +Files: src/ops.c + +Patch 7.0.020 +Problem: Crash when using 'mousefocus'. (William Fulton) +Solution: Make buffer for mouse coordinates 2 bytes longer. (Juergen Weigert) +Files: src/gui.c + +Patch 7.0.021 +Problem: Crash when using "\\[" and "\\]" in 'errorformat'. (Marc Weber) +Solution: Check for valid submatches after matching the pattern. +Files: src/quickfix.c + +Patch 7.0.022 +Problem: Using buffer.append() in Ruby may append the line to the wrong + buffer. (Alex Norman) +Solution: Properly switch to the buffer to do the appending. Also for + buffer.delete() and setting a buffer line. +Files: src/if_ruby.c + +Patch 7.0.023 +Problem: Crash when doing spell completion in an empty line and pressing + CTRL-E. +Solution: Check for a zero pointer. (James Vega) + Also handle a situation without a matching pattern better, report + "No matches" instead of remaining in undefined CTRL-X mode. And + get out of CTRL-X mode when typing a letter. +Files: src/edit.c + +Patch 7.0.024 +Problem: It is possible to set arbitrary "v:" variables. +Solution: Disallow setting "v:" variables that are not predefined. +Files: src/eval.c + +Patch 7.0.025 +Problem: Crash when removing an element of a:000. (Nikolai Weibull) +Solution: Mark the a:000 list with VAR_FIXED. +Files: src/eval.c + +Patch 7.0.026 +Problem: Using libcall() may show an old error. +Solution: Invoke dlerror() to clear a previous error. (Yukihiro Nakadaira) +Files: src/os_unix.c + +Patch 7.0.027 (extra) +Problem: Win32: When compiled with SNIFF gvim may hang on exit. +Solution: Translate and dispatch the WM_USER message. (Mathias Michaelis) +Files: src/gui_w48.c + +Patch 7.0.028 (extra) +Problem: OS/2: Vim doesn't compile with gcc 3.2.1. +Solution: Add argument to after_pathsep(), don't define vim_handle_signal(), + define HAVE_STDARG_H. (David Sanders) +Files: src/os_unix.c, src/vim.h, src/os_os2_cfg.h + +Patch 7.0.029 +Problem: getchar() may not position the cursor after a space. +Solution: Position the cursor explicitly. +Files: src/eval.c + +Patch 7.0.030 +Problem: The ":compiler" command can't be used in a FileChangedRO event. + (Hari Krishna Dara) +Solution: Add the CMDWIN flag to the ":compiler" command. +Files: src/ex_cmds.h + +Patch 7.0.031 +Problem: When deleting a buffer the buffer-local mappings for Select mode + remain. +Solution: Add the Select mode bit to MAP_ALL_MODES. (Edwin Steiner) +Files: src/vim.h + +Patch 7.0.032 (extra, after 7.0.027) +Problem: Missing semicolon. +Solution: Add the semicolon. +Files: src/gui_w48.c + +Patch 7.0.033 +Problem: When pasting text, with the menu or CTRL-V, autoindent is removed. +Solution: Use "x<BS>" to avoid indent to be removed. (Benji Fisher) +Files: runtime/autoload/paste.vim + +Patch 7.0.034 +Problem: After doing completion and typing more characters or using BS + repeating with "." didn't work properly. (Martin Stubenschrott) +Solution: Don't put BS and other characters in the redo buffer right away, + do this when finishing completion. +Files: src/edit.c + +Patch 7.0.035 +Problem: Insert mode completion works when typed but not when replayed from + a register. (Hari Krishna Dara) + Also: Mappings for Insert mode completion don't always work. +Solution: When finding a non-completion key in the input don't interrupt + completion when it wasn't typed. + Do use mappings when checking for typeahead while still finding + completions. Avoids that completion is interrupted too soon. + Use "compl_pending" in a different way. +Files: src/edit.c + +Patch 7.0.036 +Problem: Can't compile with small features and syntax highlighting or the + diff feature. +Solution: Define LINE_ATTR whenever syntax highlighting or the diff feature + is enabled. +Files: src/screen.c + +Patch 7.0.037 +Problem: Crash when resizing the GUI window vertically when there is a line + that doesn't fit. +Solution: Don't redraw while the screen data is invalid. +Files: src/screen.c + +Patch 7.0.038 +Problem: When calling complete() from an Insert mode expression mapping + text could be inserted in an improper way. +Solution: Make undo_allowed() global and use it in complete(). +Files: src/undo.c, src/proto/undo.pro, src/eval.c + +Patch 7.0.039 +Problem: Calling inputdialog() with a third argument in the console doesn't + work. +Solution: Make a separate function for input() and inputdialog(). (Yegappan + Lakshmanan) +Files: src/eval.c + +Patch 7.0.040 +Problem: When 'cmdheight' is larger than 1 using inputlist() or selecting + a spell suggestion with the mouse gets the wrong entry. +Solution: Start listing the first alternative on the last line of the screen. +Files: src/eval.c, src/spell.c + +Patch 7.0.041 +Problem: cursor([1, 1]) doesn't work. (Peter Hodge) +Solution: Allow leaving out the third item of the list and use zero for the + virtual column offset. +Files: src/eval.c + +Patch 7.0.042 +Problem: When pasting a block of text in Insert mode Vim hangs or crashes. + (Noam Halevy) +Solution: Avoid that the cursor is positioned past the NUL of a line. +Files: src/ops.c + +Patch 7.0.043 +Problem: Using "%!" at the start of 'statusline' doesn't work. +Solution: Recognize the special item when the option is being set. +Files: src/option.c + +Patch 7.0.044 +Problem: Perl: setting a buffer line in another buffer may result in + changing the current buffer. +Solution: Properly change to the buffer to be changed. +Files: src/if_perl.xs + +Patch 7.0.045 (extra) +Problem: Win32: Warnings when compiling OLE version with MSVC 2005. +Solution: Move including vim.h to before windows.h. (Ilya Bobir) +Files: src/if_ole.cpp + +Patch 7.0.046 +Problem: The matchparen plugin ignores parens in strings, but not in single + quotes, often marked with "character". +Solution: Also ignore parens in syntax items matching "character". +Files: runtime/plugin/matchparen.vim + +Patch 7.0.047 +Problem: When running configure the exit status is wrong. +Solution: Handle the exit status properly. (Matthew Woehlke) +Files: configure, src/configure + +Patch 7.0.048 +Problem: Writing a compressed file fails when there are parens in the name. + (Wang Jian) +Solution: Put quotes around the temp file name. +Files: runtime/autoload/gzip.vim + +Patch 7.0.049 +Problem: Some TCL scripts are not recognized. (Steven Atkinson) +Solution: Check for "exec wish" in the file. +Files: runtime/scripts.vim + +Patch 7.0.050 +Problem: After using the netbeans interface close command a stale pointer + may be used. +Solution: Clear the pointer to the closed buffer. (Xaview de Gaye) +Files: src/netbeans.c + +Patch 7.0.051 (after 7.0.44) +Problem: The Perl interface doesn't compile or doesn't work properly. +Solution: Remove the spaces before #ifdef and avoid an empty line above it. +Files: src/if_perl.xs + +Patch 7.0.052 +Problem: The user may not be aware that the Vim server allows others more + functionality than desired. +Solution: When running Vim as root don't become a Vim server without an + explicit --servername argument. +Files: src/main.c + +Patch 7.0.053 +Problem: Shortening a directory name may fail when there are multi-byte + characters. +Solution: Copy the correct bytes. (Titov Anatoly) +Files: src/misc1.c + +Patch 7.0.054 +Problem: Mac: Using a menu name that only has a mnemonic or accelerator + causes a crash. (Elliot Shank) +Solution: Check for an empty menu name. Also delete empty submenus that + were created before detecting the error. +Files: src/menu.c + +Patch 7.0.055 +Problem: ":startinsert" in a CmdwinEnter autocommand doesn't take immediate + effect. (Bradley White) +Solution: Put a NOP key in the typeahead buffer. Also avoid that using + CTRL-C to go back to the command line moves the cursor left. +Files: src/edit.c, src/ex_getln.c + +Patch 7.0.056 +Problem: "#!something" gives an error message. +Solution: Ignore this line, so that it can be used in an executable Vim + script. +Files: src/ex_docmd.c + +Patch 7.0.057 (extra, after 7.0.45) +Problem: Win32: Compilation problem with Borland C 5.5. +Solution: Include vim.h as before. (Mark S. Williams) +Files: src/if_ole.cpp + +Patch 7.0.058 +Problem: The gbk and gb18030 encodings are not recognized. +Solution: Add aliases to cp936. (Edward L. Fox) +Files: src/mbyte.c + +Patch 7.0.059 +Problem: The Perl interface doesn't compile with ActiveState Perl 5.8.8. +Solution: Remove the __attribute__() items. (Liu Yubao) +Files: src/if_perl.xs + +Patch 7.0.060 (after 7.0.51) +Problem: Code for temporarily switching to another buffer is duplicated in + quite a few places. +Solution: Use aucmd_prepbuf() and aucmd_restbuf() also when FEAT_AUTOCMD is + not defined. +Files: src/buffer.c, src/eval.c, src/fileio.c, src/if_ruby.c, + src/if_perl.xs, src/quickfix.c, src/structs.h + +Patch 7.0.061 +Problem: Insert mode completion for Vim commands may crash if there is + nothing to complete. +Solution: Instead of freeing the pattern make it empty, so that a "not + found" error is given. (Yukihiro Nakadaira) +Files: src/edit.c + +Patch 7.0.062 +Problem: Mac: Crash when using the popup menu for spell correction. The + popup menu appears twice when letting go of the right mouse button + early. +Solution: Don't show the popup menu on the release of the right mouse + button. Also check that a menu pointer is actually valid. +Files: src/proto/menu.pro, src/menu.c, src/normal.c, src/term.c + +Patch 7.0.063 +Problem: Tiny chance for a memory leak. (coverity) +Solution: Free pointer when next memory allocation fails. +Files: src/eval.c + +Patch 7.0.064 +Problem: Using uninitialized variable. (Tony Mechelynck) +Solution: When not used set "temp" to zero. Also avoid a warning for + "files" in ins_compl_dictionaries(). +Files: src/edit.c + +Patch 7.0.065 (extra) +Problem: Mac: left-right movement of the scrollwheel causes up-down + scrolling. +Solution: Ignore mouse wheel events that are not up-down. (Nicolas Weber) +Files: src/gui_mac.c + +Patch 7.0.066 +Problem: After the popup menu for Insert mode completion overlaps the tab + pages line it is not completely removed. +Solution: Redraw the tab pages line after removing the popup menu. (Ori + Avtalion) +Files: src/popupmnu.c + +Patch 7.0.067 +Problem: Undo doesn't always work properly when using "scim" input method. + Undo is split up when using preediting. +Solution: Reset xim_has_preediting also when preedit_start_col is not + MAXCOL. Don't split undo when <Left> is used while preediting. + (Yukihiro Nakadaira) +Files: src/edit.c, src/mbyte.c + +Patch 7.0.068 +Problem: When 'ignorecase' is set and using Insert mode completion, + typing characters to change the list of matches, case is not + ignored. (Hugo Ahlenius) +Solution: Store the 'ignorecase' flag with the matches where needed. +Files: src/edit.c, src/search.c, src/spell.c + +Patch 7.0.069 +Problem: Setting 'guitablabel' to %!expand(\%) causes Vim to free an + invalid pointer. (Kim Schulz) +Solution: Don't try freeing a constant string pointer. +Files: src/buffer.c + +Patch 7.0.070 +Problem: Compiler warnings for shadowed variables and uninitialized + variables. +Solution: Rename variables such as "index", "msg" and "dup". Initialize + variables. +Files: src/edit.c, src/eval.c, src/ex_cmds.c, src/ex_cmds2.c, + src/ex_docmd.c, src/gui_beval.c, src/gui_gtk.c, src/gui_gtk_x11.c, + src/hardcopy.c, src/if_cscope.c, src/main.c, src/mbyte.c, + src/memline.c, src/netbeans.c, src/normal.c, src/option.c, + src/os_unix.c, src/quickfix.c, src/regexp.c, src/screen.c, + src/search.c, src/spell.c, src/ui.c, src/undo.c, src/window.c, + src/version.c + +Patch 7.0.071 +Problem: Using an empty search pattern may cause a crash. +Solution: Avoid using a NULL pointer. +Files: src/search.c + +Patch 7.0.072 +Problem: When starting the GUI fails there is no way to adjust settings or + do something else. +Solution: Add the GUIFailed autocommand event. +Files: src/fileio.c, src/gui.c, src/vim.h + +Patch 7.0.073 +Problem: Insert mode completion: Typing <CR> sometimes selects the original + text instead of keeping what was typed. (Justin Constantino) +Solution: Don't let <CR> select the original text if there is no popup menu. +Files: src/edit.c + +Patch 7.0.074 (extra) +Problem: Win32: tooltips were not converted from 'encoding' to Unicode. +Solution: Set the tooltip to use Unicode and do the conversion. Also + cleanup the code for the tab pages tooltips. (Yukihiro Nakadaira) +Files: src/gui_w32.c, src/gui_w48.c + +Patch 7.0.075 +Problem: winsaveview() did not store the actual value of the desired cursor + column. This could move the cursor in the matchparen plugin. +Solution: Call update_curswant() before using the value w_curswant. +Files: src/eval.c + +Patch 7.0.076 (after 7.0.010) +Problem: Automatic downloading of spell files only works for ftp. +Solution: Don't add login and password for non-ftp URLs. (Alexander Patrakov) +Files: runtime/autoload/spellfile.vim + +Patch 7.0.077 +Problem: ":unlet v:this_session" causes a crash. (Marius Roets) +Solution: When trying to unlet a fixed variable give an error message. +Files: src/eval.c + +Patch 7.0.078 +Problem: There are two error messages E46. +Solution: Change the number for the sandbox message to E794. +Files: src/globals.h + +Patch 7.0.079 +Problem: Russian tutor doesn't work when 'encoding' is "utf-8". +Solution: Use tutor.ru.utf-8 as the master, and generate the other encodings + from it. Select the right tutor depending on 'encoding'. (Alexey + Froloff) +Files: runtime/tutor/Makefile, runtime/tutor/tutor.vim, + runtime/tutor/tutor.ru.utf-8 + +Patch 7.0.080 +Problem: Generating auto/pathdef.c fails for CFLAGS with a backslash. +Solution: Double backslashes in the string. (Alexey Froloff) +Files: src/Makefile + +Patch 7.0.081 +Problem: Command line completion doesn't work for a shell command with an + absolute path. +Solution: Don't use $PATH when there is an absolute path. +Files: src/ex_getln.c + +Patch 7.0.082 +Problem: Calling a function that waits for input may cause List and + Dictionary arguments to be freed by the garbage collector. +Solution: Keep a list of all arguments to internal functions. +Files: src/eval.c + +Patch 7.0.083 +Problem: Clicking with the mouse on an item for inputlist() doesn't work + when 'compatible' is set and/or when 'cmdheight' is more than one. + (Christian J. Robinson) +Solution: Also decrement "lines_left" when 'more' isn't set. Set + "cmdline_row" to zero to get all mouse events. +Files: src/message.c, src/misc1.c + +Patch 7.0.084 +Problem: The garbage collector may do its work while some Lists or + Dictionaries are used internally, e.g., by ":echo" that runs into + the more-prompt or ":echo [garbagecollect()]". +Solution: Only do garbage collection when waiting for a character at the + toplevel. Let garbagecollect() set a flag that is handled at the + toplevel before waiting for a character. +Files: src/eval.c, src/getchar.c, src/globals.h, src/main.c + +Patch 7.0.085 +Problem: When doing "make test" the viminfo file is modified. +Solution: Use another viminfo file after setting 'compatible'. +Files: src/testdir/test56.in + +Patch 7.0.086 +Problem: getqflist() returns entries for pattern and text with the number + zero. Passing these to setqflist() results in the string "0". +Solution: Use an empty string instead of the number zero. +Files: src/quickfix.c + +Patch 7.0.087 +Problem: After ":file fname" and ":saveas fname" the 'autochdir' option + does not take effect. (Yakov Lerner) + Commands for handling 'autochdir' are repeated many times. +Solution: Add the DO_AUTOCHDIR macro and do_autochdir(). Use it for + ":file fname" and ":saveas fname". +Files: src/proto/buffer.pro, src/buffer.c, src/ex_cmds.c, src/macros.h, + src/netbeans.c, src/option.c, src/window.c + +Patch 7.0.088 +Problem: When compiled with Perl the generated prototypes have "extern" + unnecessarily added. +Solution: Remove the "-pipe" argument from PERL_CFLAGS. +Files: src/auto/configure, src/configure.in + +Patch 7.0.089 +Problem: "ga" does not work properly for a non-Unicode multi-byte encoding. +Solution: Only check for composing chars for utf-8. (Taro Muraoka) +Files: src/ex_cmds.c + +Patch 7.0.090 +Problem: Cancelling the conform() dialog on the console with Esc requires + typing it twice. (Benji Fisher) +Solution: When the start of an escape sequence is found use 'timeoutlen' or + 'ttimeoutlen'. +Files: src/misc1.c + +Patch 7.0.091 +Problem: Using winrestview() while 'showcmd' is set causes the cursor to be + displayed in the wrong position. (Yakov Lerner) +Solution: Set the window topline properly. +Files: src/eval.c + +Patch 7.0.092 (after 7.0.082 and 7.0.084) +Problem: The list of internal function arguments is obsolete now that + garbage collection is only done at the toplevel. +Solution: Remove the list of all arguments to internal functions. +Files: src/eval.c + +Patch 7.0.093 +Problem: The matchparen plugin can't handle a 'matchpairs' value where a + colon is matched. +Solution: Change the split() that is used to change 'matchpairs' into a + List. +Files: runtime/plugin/matchparen.vim + +Patch 7.0.094 +Problem: When a hidden buffer is made the current buffer and another file + edited later, the file message will still be given. Using + ":silent" also doesn't prevent the file message. (Marvin Renich) +Solution: Reset the need_fileinfo flag when reading a file. Don't set + need_fileinfo when msg_silent is set. +Files: src/buffer.c, src/fileio.c + +Patch 7.0.095 +Problem: The Greek tutor is not available in utf-8. "el" is used for the + language, only "gr" for the country is recognized. +Solution: Add the utf-8 Greek tutor. Use it for conversion to iso-8859-7 + and cp737. (Lefteris Dimitroulakis) +Files: runtime/tutor/Makefile, runtime/tutor/tutor.gr.utf-8, + runtime/tutor/tutor.vim + +Patch 7.0.096 +Problem: taglist() returns the filename relative to the tags file, while + the directory of the tags file is unknown. (Hari Krishna Dara) +Solution: Expand the file name. (Yegappan Lakshmanan) +Files: src/tag.c + +Patch 7.0.097 +Problem: ":tabclose N" that closes another tab page does not remove the tab + pages line. Same problem when using the mouse. +Solution: Adjust the tab pages line when needed in tabpage_close_other(). +Files: src/ex_docmd.c + +Patch 7.0.098 +Problem: Redirecting command output in a cmdline completion function + doesn't work. (Hari Krishna Dara) +Solution: Enable redirection when redirection is started. +Files: src/ex_docmd.c, src/ex_getln.c + +Patch 7.0.099 +Problem: GUI: When the popup menu is visible using the scrollbar messes up + the display. +Solution: Disallow scrolling the current window. Redraw the popup menu + after scrolling another window. +Files: src/gui.c + +Patch 7.0.100 +Problem: "zug" may report the wrong filename. (Lawrence Kesteloot) +Solution: Call home_replace() to fill NameBuff[]. +Files: src/spell.c + +Patch 7.0.101 +Problem: When the "~/.vim/spell" directory does not exist "zg" may create + a wrong directory. "zw" doesn't work. +Solution: Use the directory of the file name instead of NameBuff. For "zw" + not only remove a good word but also add the word with "!". +Files: src/spell.c + +Patch 7.0.102 +Problem: Redrawing cmdline is not correct when using SCIM. +Solution: Don't call im_get_status(). (Yukihiro Nakadaira) +Files: src/ex_getln.c + +Patch 7.0.103 (after 7.0.101) +Problem: Compiler warning for uninitialized variable. (Tony Mechelynck) +Solution: Init variable. +Files: src/spell.c + +Patch 7.0.104 +Problem: The CursorHoldI event only triggers once in Insert mode. It also + triggers after CTRL-V and other two-key commands. +Solution: Set "did_cursorhold" before getting a second key. Reset + "did_cursorhold" after handling a command. +Files: src/edit.c, src/fileio.c + +Patch 7.0.105 +Problem: When using incremental search the statusline ruler isn't updated. + (Christoph Koegl) +Solution: Update the statusline when it contains the ruler. +Files: src/ex_getln.c + +Patch 7.0.106 +Problem: The spell popup menu uses ":amenu", triggering mappings. Other + PopupMenu autocommands are removed. (John Little) +Solution: Use ":anoremenu" and use an autocmd group. +Files: runtime/menu.vim + +Patch 7.0.107 +Problem: Incremental search doesn't redraw the text tabline. (Ilya Bobir) + Also happens in other situations with one window in a tab page. +Solution: Redraw the tabline after clearing the screen. +Files: src/screen.c + +Patch 7.0.108 (extra) +Problem: Amiga: Compilation problem. +Solution: Have mch_mkdir() return a failure flag. (Willy Catteau) +Files: src/os_amiga.c, src/proto/os_amiga.pro + +Patch 7.0.109 +Problem: Lisp indenting is confused by escaped quotes in strings. (Dorai + Sitaram) +Solution: Check for backslash inside strings. (Sergey Khorev) +Files: src/misc1.c + +Patch 7.0.110 +Problem: Amiga: Compilation problems when not using libnix. +Solution: Change a few #ifdefs. (Willy Catteau) +Files: src/memfile.c + +Patch 7.0.111 +Problem: The gzip plugin can't handle filenames with single quotes. +Solution: Add and use the shellescape() function. (partly by Alexey Froloff) +Files: runtime/autoload/gzip.vim, runtime/doc/eval.txt, src/eval.c, + src/mbyte.c, src/misc2.c, src/proto/misc2.pro + +Patch 7.0.112 +Problem: Python interface does not work with Python 2.5. +Solution: Change PyMem_DEL() to Py_DECREF(). (Sumner Hayes) +Files: src/if_python.c + +Patch 7.0.113 +Problem: Using CTRL-L in Insert completion when there is no current match + may cause a crash. (Yukihiro Nakadaira) +Solution: Check for compl_leader to be NULL +Files: src/edit.c + +Patch 7.0.114 +Problem: When aborting an insert with CTRL-C an extra undo point is + created in the GUI. (Yukihiro Nakadaira) +Solution: Call gotchars() only when advancing. +Files: src/getchar.c + +Patch 7.0.115 +Problem: When 'ignorecase' is set, Insert mode completion only adds "foo" + and not "Foo" when both are found. + A found match isn't displayed right away when 'completeopt' does + not have "menu" or "menuone". +Solution: Do not ignore case when checking if a completion match already + exists. call ins_compl_check_keys() also when not using a popup + menu. (Yukihiro Nakadaira) +Files: src/edit.c + +Patch 7.0.116 +Problem: 64 bit Windows version reports "32 bit" in the ":version" output. + (M. Veerman) +Solution: Change the text for Win64. +Files: src/version.c + +Patch 7.0.117 +Problem: Using "extend" on a syntax item inside a region with "keepend", an + intermediate item may be truncated. + When applying the "keepend" and there is an offset to the end + pattern the highlighting of a contained item isn't adjusted. +Solution: Use the seen_keepend flag to remember when to apply the "keepend" + flag. Adjust the keepend highlighting properly. (Ilya Bobir) +Files: src/syntax.c + +Patch 7.0.118 +Problem: printf() does not do zero padding for strings. +Solution: Do allow zero padding for strings. +Files: src/message.c + +Patch 7.0.119 +Problem: When going back from Insert to Normal mode the CursorHold event + doesn't trigger. (Yakov Lerner) +Solution: Reset "did_cursorhold" when leaving Insert mode. +Files: src/edit.c + +Patch 7.0.120 +Problem: Crash when using CTRL-R = at the command line and entering + "getreg('=')". (James Vega) +Solution: Avoid recursiveness of evaluating the = register. +Files: src/ops.c + +Patch 7.0.121 +Problem: GUI: Dragging the last status line doesn't work when there is a + text tabline. (Markus Wolf) +Solution: Take the text tabline into account when deciding to start modeless + selection. +Files: src/gui.c + +Patch 7.0.122 +Problem: GUI: When clearing after a bold, double-wide character half a + character may be drawn. +Solution: Check for double-wide character and redraw it. (Yukihiro Nakadaira) +Files: src/screen.c + +Patch 7.0.123 +Problem: On SCO Openserver configure selects the wrong terminal library. +Solution: Put terminfo before the other libraries. (Roger Cornelius) + Also fix a small problem compiling on Mac without Darwin. +Files: src/configure.in, src/auto/configure + +Patch 7.0.124 +Problem: getwinvar() obtains a dictionary with window-local variables, but + it's always for the current window. +Solution: Get the variables of the specified window. (Geoff Reedy) +Files: src/eval.c + +Patch 7.0.125 +Problem: When "autoselect" is in the 'clipboard' option then the '< and '> + marks are set while Visual mode is still active. +Solution: Don't set the '< and '> marks when yanking the selected area for + the clipboard. +Files: src/normal.c + +Patch 7.0.126 +Problem: When 'formatexpr' uses setline() and later internal formatting is + used undo information is not correct. (Jiri Cerny, Benji Fisher) +Solution: Set ins_need_undo after using 'formatexpr'. +Files: src/edit.c + +Patch 7.0.127 +Problem: Crash when swap files has invalid timestamp. +Solution: Check return value of ctime() for being NULL. +Files: src/memline.c + +Patch 7.0.128 +Problem: GUI: when closing gvim is cancelled because there is a changed + buffer the screen isn't updated to show the changed buffer in the + current window. (Krzysztof Kacprzak) +Solution: Redraw when closing gvim is cancelled. +Files: src/gui.c + +Patch 7.0.129 +Problem: GTK GUI: the GTK file dialog can't handle a relative path. +Solution: Make the initial directory a full path before passing it to GTK. + (James Vega) Also postpone adding the default file name until + after setting the directory. +Files: src/gui_gtk.c + +Patch 7.0.130 (extra) +Problem: Win32: Trying to edit or write devices may cause Vim to get stuck. +Solution: Add the 'opendevice' option, default off. Disallow + reading/writing from/to devices when it's off. + Also detect more devices by the full name starting with "\\.\". +Files: runtime/doc/options.txt, src/fileio.c, src/option.c, src/option.h, + src/os_win32.c + +Patch 7.0.131 +Problem: Win32: "vim -r" does not list all the swap files. +Solution: Also check for swap files starting with a dot. +Files: src/memline.c + +Patch 7.0.132 (after 7.0.130) +Problem: Win32: Crash when Vim reads from stdin. +Solution: Only use mch_nodetype() when there is a file name. +Files: src/fileio.c + +Patch 7.0.133 +Problem: When searching included files messages are added to the history. +Solution: Set msg_hist_off for messages about scanning included files. + Set msg_silent to avoid message about wrapping around. +Files: src/edit.c, src/globals.h, src/message.c, src/search.c + +Patch 7.0.134 +Problem: Crash when comparing a recursively looped List or Dictionary. +Solution: Limit recursiveness for comparing to 1000. +Files: src/eval.c + +Patch 7.0.135 +Problem: Crash when garbage collecting list or dict with loop. +Solution: Don't use DEL_REFCOUNT but don't recurse into Lists and + Dictionaries when freeing them in the garbage collector. + Also add allocated Dictionaries to the list of Dictionaries to + avoid leaking memory. +Files: src/eval.c, src/proto/eval.pro, src/tag.c + +Patch 7.0.136 +Problem: Using "O" while matching parens are highlighted may not remove the + highlighting. (Ilya Bobir) +Solution: Also trigger CursorMoved when a line is inserted under the cursor. +Files: src/misc1.c + +Patch 7.0.137 +Problem: Configure check for big features is wrong. +Solution: Change "==" to "=". (Martti Kuparinen) +Files: src/auto/configure, src/configure.in + +Patch 7.0.138 (extra) +Problem: Mac: modifiers don't work with function keys. +Solution: Use GetEventParameter() to obtain modifiers. (Nicolas Weber) +Files: src/gui_mac.c + +Patch 7.0.139 +Problem: Using CTRL-PageUp or CTRL-PageDown in Insert mode to go to another + tab page does not prepare for undo properly. (Stefano Zacchiroli) +Solution: Call start_arrow() before switching tab page. +Files: src/edit.c + +Patch 7.0.140 (after 7.0.134) +Problem: Comparing recursively looped List or Dictionary doesn't work well. +Solution: Detect comparing a List or Dictionary with itself. +Files: src/eval.c + +Patch 7.0.141 +Problem: When pasting a while line on the command line an extra CR is added + literally. +Solution: Don't add the trailing CR when pasting with the mouse. +Files: src/ex_getln.c, src/proto/ops.pro, src/ops.c + +Patch 7.0.142 +Problem: Using the middle mouse button in Select mode to paste text results + in an extra "y". (Kriton Kyrimis) +Solution: Let the middle mouse button replace the selected text with the + contents of the clipboard. +Files: src/normal.c + +Patch 7.0.143 +Problem: Setting 'scroll' to its default value was not handled correctly. +Solution: Compare the right field to PV_SCROLL. +Files: src/option.c + +Patch 7.0.144 +Problem: May compare two unrelated pointers when matching a pattern against + a string. (Dominique Pelle) +Solution: Avoid calling reg_getline() when REG_MULTI is false. +Files: src/regexp.c + +Patch 7.0.145 (after 7.0.142) +Problem: Compiler warning. +Solution: Add type cast. +Files: src/normal.c + +Patch 7.0.146 +Problem: When 'switchbuf' is set to "usetab" and the current tab has only a + quickfix window, jumping to an error always opens a new window. + Also, when the buffer is open in another tab page it's not found. +Solution: Check for the "split" value of 'switchbuf' properly. Search in + other tab pages for the desired buffer. (Yegappan Lakshmanan) +Files: src/buffer.c, src/quickfix.c + +Patch 7.0.147 +Problem: When creating a session file and there are several tab pages and + some windows have a local directory a short file name may be used + when it's not valid. (Marius Roets) + A session with multiple tab pages may result in "No Name" buffers. + (Bill McCarthy) +Solution: Don't enter tab pages when going through the list, only use a + pointer to the first window in each tab page. + Use "tabedit" instead of "tabnew | edit" when possible. +Files: src/ex_docmd.c + +Patch 7.0.148 +Problem: When doing "call a.xyz()" and "xyz" does not exist in dictionary + "a" there is no error message. (Yegappan Lakshmanan) +Solution: Add the error message. +Files: src/eval.c + +Patch 7.0.149 +Problem: When resizing a window that shows "~" lines the text sometimes + jumps down. +Solution: Remove code that uses "~" lines in some situations. Fix the + computation of the screen line of the cursor. Also set w_skipcol + to handle very long lines. +Files: src/misc1.c, src/window.c + +Patch 7.0.150 +Problem: When resizing the Vim window scrollbinding doesn't work. (Yakov + Lerner) +Solution: Do scrollbinding in set_shellsize(). +Files: src/term.c + +Patch 7.0.151 +Problem: Buttons in file dialog are not according to Gnome guidelines. +Solution: Swap Cancel and Open buttons. (Stefano Zacchiroli) +Files: src/gui_gtk.c + +Patch 7.0.152 +Problem: Crash when using lesstif 2. +Solution: Fill in the extension field. (Ben Hutchings) +Files: src/gui_xmebw.c + +Patch 7.0.153 +Problem: When using cscope and opening the temp file fails Vim crashes. + (Kaya Bekiroglu) +Solution: Check for NULL pointer returned from mch_open(). +Files: src/if_cscope.c + +Patch 7.0.154 +Problem: When 'foldnextmax' is negative Vim can hang. (James Vega) +Solution: Avoid the fold level becoming negative. +Files: src/fold.c, src/syntax.c + +Patch 7.0.155 +Problem: When getchar() returns a mouse button click there is no way to get + the mouse coordinates. +Solution: Add v:mouse_win, v:mouse_lnum and v:mouse_col. +Files: runtime/doc/eval.txt, src/eval.c, src/vim.h + +Patch 7.0.156 (extra) +Problem: Vim doesn't compile for Amiga OS 4. +Solution: Various changes for Amiga OS4. (Peter Bengtsson) +Files: src/feature.h, src/mbyte.c, src/memfile.c, src/memline.c, + src/os_amiga.c, src/os_amiga.h, src/pty.c + +Patch 7.0.157 +Problem: When a function is used recursively the profiling information is + invalid. (Mikolaj Machowski) +Solution: Put the start time on the stack instead of in the function. +Files: src/eval.c + +Patch 7.0.158 +Problem: In a C file with ":set foldmethod=syntax", typing {<CR> on the + last line results in the cursor being in a closed fold. (Gautam + Iyer) +Solution: Open fold after inserting a new line. +Files: src/edit.c + +Patch 7.0.159 +Problem: When there is an I/O error in the swap file the cause of the error + cannot be seen. +Solution: Use PERROR() instead of EMSG() where possible. +Files: src/memfile.c + +Patch 7.0.160 +Problem: ":@a" echoes the command, Vi doesn't do that. +Solution: Set the silent flag in the typeahead buffer to avoid echoing the + command. +Files: src/ex_docmd.c, src/normal.c, src/ops.c, src/proto/ops.pro + +Patch 7.0.161 +Problem: Win32: Tab pages line popup menu isn't using the right encoding. + (Yongwei Wu) +Solution: Convert the text when necessary. Also fixes the Find/Replace + dialog title. (Yegappan Lakshmanan) +Files: src/gui_w48.c + +Patch 7.0.162 +Problem: "vim -o a b" when file "a" triggers the ATTENTION dialog, + selecting "Quit" exits Vim instead of editing "b" only. + When file "b" triggers the ATTENTION dialog selecting "Quit" or + "Abort" results in editing file "a" in that window. +Solution: When selecting "Abort" exit Vim. When selecting "Quit" close the + window. Also avoid hit-enter prompt when selecting Abort. +Files: src/buffer.c, src/main.c + +Patch 7.0.163 +Problem: Can't retrieve the position of a sign after it was set. +Solution: Add the netbeans interface getAnno command. (Xavier de Gaye) +Files: runtime/doc/netbeans.txt, src/netbeans.c + +Patch 7.0.164 +Problem: ":redir @+" doesn't work. +Solution: Accept "@+" just like "@*". (Yegappan Lakshmanan) +Files: src/ex_docmd.c + +Patch 7.0.165 +Problem: Using CTRL-L at the search prompt adds a "/" and other characters + without escaping, causing the pattern not to match. +Solution: Escape special characters with a backslash. +Files: src/ex_getln.c + +Patch 7.0.166 +Problem: Crash in cscope code when connection could not be opened. + (Kaya Bekiroglu) +Solution: Check for the file descriptor to be NULL. +Files: src/if_cscope.c + +Patch 7.0.167 +Problem: ":function" redefining a dict function doesn't work properly. + (Richard Emberson) +Solution: Allow a function name to be a number when it's a function + reference. +Files: src/eval.c + +Patch 7.0.168 +Problem: Using uninitialized memory and memory leak. (Dominique Pelle) +Solution: Use alloc_clear() instead of alloc() for w_lines. Free + b_ml.ml_stack after recovery. +Files: src/memline.c, src/window.c + +Patch 7.0.169 +Problem: With a Visual block selection, with the cursor in the left upper + corner, pressing "I" doesn't remove the highlighting. (Guopeng + Wen) +Solution: When checking if redrawing is needed also check if Visual + selection is still active. +Files: src/screen.c + +Patch 7.0.170 (extra) +Problem: Win32: Using "gvim --remote-tab foo" when gvim is minimized while + it previously was maximized, un-maximizing doesn't work properly. + And the labels are not displayed properly when 'encoding' is + utf-8. +Solution: When minimized check for SW_SHOWMINIMIZED. When updating the tab + pages line use TCM_SETITEMW instead of TCM_INSERTITEMW. (Liu + Yubao) +Files: src/gui_w48.c + +Patch 7.0.171 (extra) +Problem: VMS: A file name with multiple paths is written in the wrong file. +Solution: Get the actually used file name. (Zoltan Arpadffy) + Also add info to the :version command about compilation. +Files: src/Make_vms.mms, src/buffer.c, src/os_unix.c, src/version.c + +Patch 7.0.172 +Problem: Crash when recovering and quitting at the "press-enter" prompt. +Solution: Check for "msg_list" to be NULL. (Liu Yubao) +Files: src/ex_eval.c + +Patch 7.0.173 +Problem: ":call f().TT()" doesn't work. (Richard Emberson) +Solution: When a function returns a Dictionary or another composite continue + evaluating what follows. +Files: src/eval.c + +Patch 7.0.174 +Problem: ":mksession" doesn't restore window layout correctly in tab pages + other than the current one. (Zhibin He) +Solution: Use the correct topframe for producing the window layout commands. +Files: src/ex_docmd.c + +Patch 7.0.175 +Problem: The result of tr() is missing the terminating NUL. (Ingo Karkat) +Solution: Add the NUL. +Files: src/eval.c + +Patch 7.0.176 +Problem: ":emenu" isn't executed directly, causing the encryption key + prompt to fail. (Life Jazzer) +Solution: Fix wrong #ifdef. +Files: src/menu.c + +Patch 7.0.177 +Problem: When the press-enter prompt gets a character from a non-remappable + mapping, it's put back in the typeahead buffer as remappable, + which may cause an endless loop. +Solution: Restore the non-remappable flag and the silent flag when putting a + char back in the typeahead buffer. +Files: src/getchar.c, src/message.c, src/normal.c + +Patch 7.0.178 +Problem: When 'enc' is "utf-8" and 'ignorecase' is set the result of ":echo + ("\xe4" == "\xe4")" varies. +Solution: In mb_strnicmp() avoid looking past NUL bytes. +Files: src/mbyte.c + +Patch 7.0.179 +Problem: Using ":recover" or "vim -r" without a swapfile crashes Vim. +Solution: Check for "buf" to be unequal NULL. (Yukihiro Nakadaira) +Files: src/memline.c + +Patch 7.0.180 (extra, after 7.0.171) +Problem: VMS: build failed. Problem with swapfiles. +Solution: Add "compiled_arch". Always expand path and pass it to + buf_modname(). (Zoltan Arpadffy) +Files: src/globals.h, src/memline.c, src/os_unix.c, runtime/menu.vim + +Patch 7.0.181 +Problem: When reloading a file that starts with an empty line, the reloaded + buffer has an extra empty line at the end. (Motty Lentzitzky) +Solution: Delete all lines, don't use bufempty(). +Files: src/fileio.c + +Patch 7.0.182 +Problem: When using a mix of undo and "g-" it may no longer be possible to + go to every point in the undo tree. (Andy Wokula) +Solution: Correctly update pointers in the undo tree. +Files: src/undo.c + +Patch 7.0.183 +Problem: Crash in ":let" when redirecting to a variable that's being + displayed. (Thomas Link) +Solution: When redirecting to a variable only do the assignment when + stopping redirection to avoid that setting the variable causes a + freed string to be accessed. +Files: src/eval.c + +Patch 7.0.184 +Problem: When the cscope program is called "mlcscope" the Cscope interface + doesn't work. +Solution: Accept "\S*cscope:" instead of "cscope:". (Frodak D. Baksik) +Files: src/if_cscope.c + +Patch 7.0.185 +Problem: Multi-byte characters in a message are displayed with attributes + from what comes before it. +Solution: Don't use the attributes for a multi-byte character. Do use + attributes for special characters. (Yukihiro Nakadaira) +Files: src/message.c + +Patch 7.0.186 +Problem: Get an ml_get error when 'encoding' is "utf-8" and searching for + "/\_s*/e" in an empty buffer. (Andrew Maykov) +Solution: Don't try getting the line just below the last line. +Files: src/search.c + +Patch 7.0.187 +Problem: Can't source a remote script properly. +Solution: Add the SourceCmd event. (Charles Campbell) +Files: runtime/doc/autocmd.txt, src/ex_cmds2.c, src/fileio.c, src/vim.h + +Patch 7.0.188 (after 7.0.186) +Problem: Warning for wrong pointer type. +Solution: Add a type cast. +Files: src/search.c + +Patch 7.0.189 +Problem: Translated message about finding matches is truncated. (Yukihiro + Nakadaira) +Solution: Enlarge the buffer. Also use vim_snprintf(). +Files: src/edit.c + +Patch 7.0.190 +Problem: "syntax spell default" results in an error message. +Solution: Change 4 to 7 for STRNICMP(). (Raul Nunez de Arenas Coronado) +Files: src/syntax.c + +Patch 7.0.191 +Problem: The items used by getqflist() and setqflist() don't match. +Solution: Support the "bufnum" item for setqflist(). (Yegappan Lakshmanan) +Files: runtime/doc/eval.txt, src/quickfix.c + +Patch 7.0.192 +Problem: When 'swapfile' is switched off in an empty file it is possible + that not all blocks are loaded into memory, causing ml_get errors + later. +Solution: Rename "dont_release" to "mf_dont_release" and also use it to + avoid using the cached line and locked block. +Files: src/globals.h, src/memfile.c, src/memline.c + +Patch 7.0.193 +Problem: Using --remote or --remote-tab with an argument that matches + 'wildignore' causes a crash. +Solution: Check the argument count before using ARGLIST[0]. +Files: src/ex_cmds.c + +Patch 7.0.194 +Problem: Once an ml_get error is given redrawing part of the screen may + cause it again, resulting in an endless loop. +Solution: Don't give the error message for a recursive call. +Files: src/memline.c + +Patch 7.0.195 +Problem: When a buffer is modified and 'autowriteall' is set, ":quit" + results in an endless loop when there is a conversion error while + writing. (Nikolai Weibull) +Solution: Make autowrite() return FAIL if the buffer is still changed after + writing it. + /* put the cursor on the last char, for 'tw' formatting */ +Files: src/ex_cmds2.c + +Patch 7.0.196 +Problem: When using ":vert ball" the computation of the mouse pointer + position may be off by one column. (Stefan Karlsson) +Solution: Recompute the frame width when moving the vertical separator from + one window to another. +Files: src/window.c + +Patch 7.0.197 (extra) +Problem: Win32: Compiling with EXITFREE doesn't work. +Solution: Adjust a few #ifdefs. (Alexei Alexandrof) +Files: src/misc2.c, src/os_mswin.c + +Patch 7.0.198 (extra) +Problem: Win32: Compiler warnings. No need to generate gvim.exe.mnf. +Solution: Add type casts. Use "*" for processorArchitecture. (George Reilly) +Files: src/Make_mvc.mak, src/eval.c, src/gvim.exe.mnf, src/misc2.c + +Patch 7.0.199 +Problem: When using multi-byte characters the combination of completion and + formatting may result in a wrong cursor position. +Solution: Don't decrement the cursor column, use dec_cursor(). (Yukihiro + Nakadaira) Also check for the column to be zero. +Files: src/edit.c + +Patch 7.0.200 +Problem: Memory leaks when out of memory. +Solution: Free the memory. +Files: src/edit.c, src/diff.c + +Patch 7.0.201 +Problem: Message for ":diffput" about buffer not being in diff mode may be + wrong. +Solution: Check for buffer in diff mode but not modifiable. +Files: src/diff.c + +Patch 7.0.202 +Problem: Problems on Tandem systems while compiling and at runtime. +Solution: Recognize root uid is 65535. Check select() return value for it + not being supported. Avoid wrong function prototypes. Mention + use of -lfloss. (Matthew Woehlke) +Files: src/Makefile, src/ex_cmds.c, src/fileio.c, src/main.c, + src/osdef1.h.in, src/osdef2.h.in, src/os_unix.c, src/pty.c, + src/vim.h + +Patch 7.0.203 +Problem: 0x80 characters in a register are not handled correctly for the + "@" command. +Solution: Escape CSI and 0x80 characters. (Yukihiro Nakadaira) +Files: src/ops.c + +Patch 7.0.204 +Problem: Cscope: Parsing matches for listing isn't done properly. +Solution: Check for line number being found. (Yu Zhao) +Files: src/if_cscope.c + +Patch 7.0.205 (after 7.0.203) +Problem: Can't compile. +Solution: Always include the vim_strsave_escape_csi function. +Files: src/getchar.c + +Patch 7.0.206 (after 7.0.058) +Problem: Some characters of the "gb18030" encoding are not handled + properly. +Solution: Do not use "cp936" as an alias for "gb18030" encoding. Instead + initialize 'encoding' to "cp936". +Files: src/mbyte.c, src/option.c + +Patch 7.0.207 +Problem: After patch 2.0.203 CSI and K_SPECIAL characters are escaped when + recorded and then again when the register is executed. +Solution: Remove escaping before putting the recorded characters in a + register. (Yukihiro Nakadaira) +Files: src/getchar.c, src/ops.c, src/proto/getchar.pro + +Patch 7.0.208 (after 7.0.171 and 7.0.180) +Problem: VMS: changes to path handling cause more trouble than they solve. +Solution: Revert changes. +Files: src/buffer.c, src/memline.c, src/os_unix.c + +Patch 7.0.209 +Problem: When replacing a line through Python the cursor may end up beyond + the end of the line. +Solution: Check the cursor column after replacing the line. +Files: src/if_python.c + +Patch 7.0.210 +Problem: ":cbuffer" and ":lbuffer" always fail when the buffer is modified. + (Gary Johnson) +Solution: Support adding a !. (Yegappan Lakshmanan) +Files: runtime/doc/quickfix.txt, src/ex_cmds.h + +Patch 7.0.211 +Problem: With ":set cindent noai bs=0" using CTRL-U in Insert mode will + delete auto-indent. After ":set ai" it doesn't. +Solution: Also check 'cindent' being set. (Ryan Lortie) +Files: src/edit.c + +Patch 7.0.212 +Problem: The GUI can't be terminated with SIGTERM. (Mark Logan) +Solution: Use the signal protection in the GUI as in the console, allow + signals when waiting for 100 msec or longer. +Files: src/ui.c + +Patch 7.0.213 +Problem: When 'spellfile' has two regions that use the same sound folding + using "z=" will cause memory to be freed twice. (Mark Woodward) +Solution: Clear the hashtable properly so that the items are only freed once. +Files: src/spell.c + +Patch 7.0.214 +Problem: When using <f-args> in a user command it's not possible to have an + argument end in '\ '. +Solution: Change the handling of backslashes. (Yakov Lerner) +Files: runtime/doc/map.txt, src/ex_docmd.c + +Patch 7.0.215 (extra) +Problem: Mac: Scrollbar size isn't set. Context menu has disabled useless + Help entry. Call to MoreMasterPointers() is ignored. +Solution: Call SetControlViewSize() in gui_mch_set_scrollbar_thumb(). Use + kCMHelpItemRemoveHelp for ContextualMenuSelect(). Remove call to + MoreMasterPointers(). (Nicolas Weber) +Files: src/gui_mac.c + +Patch 7.0.216 +Problem: ":tab wincmd ]" does not open a tab page. (Tony Mechelynck) +Solution: Copy the cmdmod.tab value to postponed_split_tab and use it. +Files: src/globals.h, src/ex_docmd.c, src/if_cscope.c, src/window.c + +Patch 7.0.217 +Problem: This hangs when pressing "n": ":%s/\n/,\r/gc". (Ori Avtalion) +Solution: Set "skip_match" to advance to the next line. +Files: src/ex_cmds.c + +Patch 7.0.218 +Problem: "%B" in 'statusline' always shows zero in Insert mode. (DervishD) +Solution: Remove the exception for Insert mode, check the column for being + valid instead. +Files: src/buffer.c + +Patch 7.0.219 +Problem: When using the 'editexisting.vim' script and a file is being + edited in another tab page the window is split. The "+123" + argument is not used. +Solution: Make the tab page with the file the current tab page. Set + v:swapcommand when starting up to the first "+123" or "-c" command + line argument. +Files: runtime/macros/editexisting.vim, src/main.c + +Patch 7.0.220 +Problem: Crash when using winnr('#') in a new tab page. (Andy Wokula) +Solution: Check for not finding the window. +Files: src/eval.c + +Patch 7.0.221 +Problem: finddir() uses 'path' by default, where "." means relative to the + current file. But it works relative to the current directory. + (Tye Zdrojewski) +Solution: Add the current buffer name to find_file_in_path_option() for the + relative file name. +Files: runtime/doc/eval.txt, src/eval.c + +Patch 7.0.222 +Problem: Perl indenting using 'cindent' works almost right. +Solution: Recognize '#' to start a comment. (Alex Manoussakis) Added '#' + flag in 'cinoptions'. +Files: runtime/doc/indent.txt, src/misc1.c + +Patch 7.0.223 +Problem: Unprintable characters in completion text mess up the popup menu. + (Gombault Damien) +Solution: Use strtrans() to make the text printable. +Files: src/charset.c, src/popupmnu.c + +Patch 7.0.224 +Problem: When expanding "##" spaces are escaped twice. (Pavol Juhas) +Solution: Don't escape the spaces that separate arguments. +Files: src/eval.c, src/ex_docmd.c, src/proto/ex_docmd.pro + +Patch 7.0.225 +Problem: When using setline() in an InsertEnter autocommand and doing "A" + the cursor ends up on the last byte in the line. (Yukihiro + Nakadaira) +Solution: Only adjust the column when using setline() for the cursor line. + Move it back to the head byte if necessary. +Files: src/eval.c, src/misc2.c + +Patch 7.0.226 +Problem: Display flickering when updating signs through the netbeans + interface. (Xavier de Gaye) +Solution: Remove the redraw_later(CLEAR) call. +Files: src/netbeans.c + +Patch 7.0.227 +Problem: Crash when closing a window in the GUI. (Charles Campbell) +Solution: Don't call out_flush() from win_free(). +Files: src/window.c + +Patch 7.0.228 +Problem: Cygwin: problem with symlink to DOS style path. +Solution: Invoke cygwin_conv_to_posix_path(). (Luca Masini) +Files: src/os_unix.c + +Patch 7.0.229 +Problem: When 'pastetoggle' starts with Esc then pressing Esc in Insert + mode will not time out. (Jeffery Small) +Solution: Use KL_PART_KEY instead of KL_PART_MAP, so that 'ttimeout' applies + to the 'pastetoggle' key. +Files: src/getchar.c + +Patch 7.0.230 +Problem: After using ":lcd" a script doesn't know how to restore the + current directory. +Solution: Add the haslocaldir() function. (Bob Hiestand) +Files: runtime/doc/usr_41.txt, runtime/doc/eval.txt, src/eval.c + +Patch 7.0.231 +Problem: When recovering from a swap file the page size is likely to be + different from the minimum. The block used for the first page + then has a buffer of the wrong size, causing a crash when it's + reused later. (Zephaniah Hull) +Solution: Reallocate the buffer when the page size changes. Also check that + the page size is at least the minimum value. +Files: src/memline.c + +Patch 7.0.232 (extra) +Problem: Mac: doesn't support GUI tab page labels. +Solution: Add GUI tab page labels. (Nicolas Weber) +Files: src/feature.h, src/gui.c, src/gui.h, src/gui_mac.c, + src/proto/gui_mac.pro + +Patch 7.0.233 (extra) +Problem: Mac: code formatted badly. +Solution: Fix code formatting +Files: src/gui_mac.c + +Patch 7.0.234 +Problem: It's possible to use feedkeys() from a modeline. That is a + security issue, can be used for a trojan horse. +Solution: Disallow using feedkeys() in the sandbox. +Files: src/eval.c + +Patch 7.0.235 +Problem: It is possible to use writefile() in the sandbox. +Solution: Add a few more checks for the sandbox. +Files: src/eval.c + +Patch 7.0.236 +Problem: Linux 2.4 uses sysinfo() with a mem_unit field, which is not + backwards compatible. +Solution: Add an autoconf check for sysinfo.mem_unit. Let mch_total_mem() + return Kbyte to avoid overflow. +Files: src/auto/configure, src/configure.in, src/config.h.in, + src/option.c, src/os_unix.c + +Patch 7.0.237 +Problem: For root it is recommended to not use 'modeline', but in + not-compatible mode the default is on. +Solution: Let 'modeline' default to off for root. +Files: runtime/doc/options.txt, src/option.c + +Patch 7.0.238 +Problem: Crash when ":match" pattern runs into 'maxmempattern'. (Yakov + Lerner) +Solution: Don't free the regexp program of match_hl. +Files: src/screen.c + +Patch 7.0.239 +Problem: When using local directories and tab pages ":mksession" uses a + short file name when it shouldn't. Window-local options from a + modeline may be applied to the wrong window. (Teemu Likonen) +Solution: Add the did_lcd flag, use the full path when it's set. Don't use + window-local options from the modeline when using the current + window for another buffer in ":doautoall". +Files: src/fileio.c, src/ex_docmd.c + +Patch 7.0.240 +Problem: Crash when splitting a window in the GUI. (opposite of 7.0.227) +Solution: Don't call out_flush() from win_alloc(). Also avoid this for + win_delete(). Also block autocommands while the window structure + is invalid. +Files: src/window.c + +Patch 7.0.241 +Problem: ":windo throw 'foo'" loops forever. (Andy Wokula) +Solution: Detect that win_goto() doesn't work. +Files: src/ex_cmds2.c + +Patch 7.0.242 (extra) +Problem: Win32: Using "-register" in a Vim that does not support OLE causes + a crash. +Solution: Don't use EMSG() but mch_errmsg(). Check p_go for being NULL. + (partly by Michael Wookey) +Files: src/gui_w32.c + +Patch 7.0.243 (extra) +Problem: Win32: When GvimExt is built with MSVC 2005 or later, the "Edit + with vim" context menu doesn't appear in the Windows Explorer. +Solution: Embed the linker manifest file into the resources of GvimExt.dll. + (Mathias Michaelis) +Files: src/GvimExt/Makefile + + +Fixes after Vim 7.1a BETA: + +The extra archive had CVS directories included below "farsi" and +"runtime/icons". CVS was missing the farsi icon files. + +Fix compiling with Gnome 2.18, undefine bind_textdomain_codeset. (Daniel +Drake) + +Mac: "make install" didn't copy rgb.txt. + +When editing a compressed file while there are folds caused "ml_get" errors +and some lines could be missing. When decompressing failed option values were +not restored. + + +Patch 7.1a.001 +Problem: Crash when downloading a spell file. (Szabolcs Horvat) +Solution: Avoid that did_set_spelllang() is used recursively when a new + window is opened for the download. + Also avoid wiping out the wrong buffer. +Files: runtime/autoload/spellfile.vim, src/buffer.c, src/ex_cmds.c, + src/spell.c + +Patch 7.1a.002 (extra) +Problem: Compilation error with MingW. +Solution: Check for LPTOOLTIPTEXT to be defined. +Files: src/gui_w32.c + + +Fixes after Vim 7.1b BETA: + +Made the Mzscheme interface build both with old and new versions of Mzscheme, +using an #ifdef. (Sergey Khorev) +Mzscheme interface didn't link, missing function. Changed order of libraries +in the configure script. + +Ruby interface didn't compile on Mac. Changed #ifdef. (Kevin Ballard) + +Patch 7.1b.001 (extra) +Problem: Random text in a source file. No idea how it got there. +Solution: Delete the text. +Files: src/gui_w32.c + +Patch 7.1b.002 +Problem: When 'maxmem' is large there can be an overflow in computations. + (Thomas Wiegner) +Solution: Use the same mechanism as in mch_total_mem(): first reduce the + multiplier as much as possible. +Files: src/memfile.c + +============================================================================== +VERSION 7.2 *version-7.2* *version7.2* + +This section is about improvements made between version 7.1 and 7.2. + +This is mostly a bug-fix release. The main new feature is floating point +support. |Float| + + +Changed *changed-7.2* +------- + +Changed the command line buffer name from "command-line" to "[Command Line]". + +Removed optional ! for ":caddexpr", ":cgetexpr", ":cgetfile", ":laddexpr", +":lgetexpr" and ":lgetfile". They are not needed. (Yegappan Lakshmanan) + +An offset for syntax matches worked on bytes instead of characters. That is +inconsistent and can easily be done wrong. Use character offsets now. +(Yukihiro Nakadaira) + +The FileChangedShellPost event was also given when a file didn't change. +(John Little) + +When the current line is long (doesn't fit) the popup menu can't be seen. +Display it below the screen line instead of below the text line. +(Francois Ingelrest) + +Switched to autoconf version 2.62. + +Moved including fcntl.h to vim.h and removed it from all .c files. + +Introduce macro STRMOVE(d, s), like STRCPY() for overlapping strings. +Use it instead of mch_memmove(p, p + x, STRLEN(p + x) + 1). + +Removed the bulgarian.vim keymap file, two more standard ones replace it. +(Boyko Bantchev) + +Increased the maximum number of tag matches for command line completion from +200 to 300. + +Renamed help file sql.txt to ft_sql.txt and ada.txt to ft_ada.txt. + + +Added *added-7.2* +----- + +New syntax files: + CUDA (Timothy B. Terriberry) + Cdrdao config (Nikolai Weibull) + Coco/R (Ashish Shukla) + Denyhosts config (Nikolai Weibull) + Dtrace script (Nicolas Weber) + Git output, commit, config, rebase, send-email (Tim Pope) + HASTE and HastePreProc (M. Tranchero) + Haml (Tim Pope) + Host conf (Nikolai Weibull) + Linden script (Timo Frenay) + MS messages (Kevin Locke) + PDF (Tim Pope) + ProMeLa (Maurizio Tranchero) + Reva Foth (Ron Aaron) + Sass (Tim Pope) + Symbian meta-makefile, MMP (Ron Aaron) + VOS CM macro (Andrew McGill) + XBL (Doug Kearns) + +New tutor files: + Made UTF-8 versions of all the tutor files. + Greek renamed from ".gr" to ".el" (Greek vs Greece). + Esperanto (Dominique Pelle) + Croatian (Paul B. Mahol) + +New filetype plugins: + Cdrdao config (Nikolai Weibull) + Debian control files (Debian Vim maintainers) + Denyhosts (Nikolai Weibull) + Dos .ini file (Nikolai Weibull) + Dtrace script (Nicolas Weber) + FnameScript (Nikolai Weibull) + Git, Git config, Git commit, Git rebase, Git send-email (Tim Pope) + Haml (Tim Pope) + Host conf (Nikolai Weibull) + Host access (Nikolai Weibull) + Logtalk (Paulo Moura) + MS messages (Kevin Locke) + NSIS script (Nikolai Weibull) + PDF (Tim Pope) + Reva Forth (Ron Aaron) + Sass (Tim Pope) + +New indent files: + DTD (Nikolai Weibull) + Dtrace script (Nicolas Weber) + Erlang (Csaba Hoch) + FrameScript (Nikolai Weibull) + Git config (Tim Pope) + Haml (Tim Pope) + Logtalk (Paulo Moura) + Sass (Tim Pope) + Tiny Fugue (Christian J. Robinson) + +New compiler plugins: + RSpec (Tim Pope) + +New keymap files: + Croatian (Paul B. Mahol) + Russian Dvorak (Serhiy Boiko) + Ukrainian Dvorak (Serhiy Boiko) + Removed plain Bulgarian, "bds" and phonetic are sufficient. + +Other new runtime files: + Esperanto menu and message translations. (Dominique Pelle) + Finnish menu and message translations. (Flammie Pirinen) + Brazilian Portuguese message translations. (Eduardo Dobay) + +Added floating point support. |Float| + +Added argument to mode() to return a bit more detail about the current mode. +(Ben Schmidt) + +Added support for BSD console mouse: |sysmouse|. (Paul B. Mahol) + +Added the "newtab" value for the 'switchbuf' option. (partly by Yegappan +Lakshmanan) + +Improved error messages for the netbeans interface. (Philippe Fremy) + +Added support for using xterm mouse codes for screen. (Micah Cowan) + +Added support for cross compiling: +Adjusted configure.in and added INSTALLcross.txt. (Marc Haisenko) Fixed +mistakes in configure.in after that. +Don't use /usr/local/include and /usr/local/lib in configure. (Philip +Prindeville) +For cross compiling the Cygwin version on Unix, change VIM.TLB to vim.tlb in +src/vim.rc. (Tsuneo Nakagawa) + +Added v:searchforward variable: What direction we're searching in. (Yakov +Lerner) + + +Fixed *fixed-7.2* +----- + +Patch 7.1.001 +Problem: Still can't build with Gnome libraries. +Solution: Fix typo in bind_textdomain_codeset. (Mike Kelly) +Files: src/gui_gtk.c, src/gui_gtk_x11.c + +Patch 7.1.002 +Problem: Oracle Pro*C/C++ files are not detected. +Solution: Add the missing star. (Micah J. Cowan) +Files: runtime/filetype.vim + +Patch 7.1.003 (extra) +Problem: The "Tear off this menu" message appears in the message history + when using a menu. (Yongwei Wu) +Solution: Disable message history when displaying the menu tip. +Files: src/gui_w32.c + +Patch 7.1.004 +Problem: Crash when doing ":next directory". (Raphael Finkel) +Solution: Do not use "buf", it may be invalid after autocommands. +Files: src/ex_cmds.c + +Patch 7.1.005 +Problem: "cit" used on <foo></foo> deletes <foo>. Should not delete + anything and start insertion, like "ci'" does on "". (Michal + Bozon) +Solution: Handle an empty object specifically. Made it work consistent for + various text objects. +Files: src/search.c + +Patch 7.1.006 +Problem: Resetting 'modified' in a StdinReadPost autocommand doesn't work. +Solution: Set 'modified' before the autocommands instead of after it. +Files: src/buffer.c + +Patch 7.1.007 (extra) +Problem: Mac: Context menu doesn't work on Intel Macs. + Scrollbars are not dimmed when Vim is not the active application. +Solution: Remove the test whether context menus are supported. They are + always there in OS/X. Handle the dimming. (Nicolas Weber) +Files: src/gui_mac.c, src/gui.h + +Patch 7.1.008 +Problem: getfsize() returns a negative number for very big files. +Solution: Check for overflow and return -2. +Files: runtime/doc/eval.txt, src/eval.c + +Patch 7.1.009 +Problem: In diff mode, displaying the difference between a tab and spaces + is not highlighted correctly. +Solution: Only change highlighting at the end of displaying a tab. +Files: src/screen.c + +Patch 7.1.010 +Problem: The Gnome session file doesn't restore tab pages. +Solution: Add SSOP_TABPAGES to the session flags. (Matias D'Ambrosio) +Files: src/gui_gtk_x11.c + +Patch 7.1.011 +Problem: Possible buffer overflow when $VIMRUNTIME is very long. (Victor + Stinner) +Solution: Use vim_snprintf(). +Files: src/main.c + +Patch 7.1.012 +Problem: ":let &shiftwidth = 'asdf'" doesn't produce an error message. +Solution: Check for a string argument. (Chris Lubinski) +Files: src/option.c + +Patch 7.1.013 +Problem: ":syn include" only loads the first file, while it is documented + as doing the equivalent of ":runtime!". +Solution: Change the argument to source_runtime(). (James Vega) +Files: src/syntax.c + +Patch 7.1.014 +Problem: Crash when doing C indenting. (Chris Monson) +Solution: Obtain the current line again after invoking cin_islabel(). +Files: src/edit.c + +Patch 7.1.015 +Problem: MzScheme interface: current-library-collection-paths produces no + list. Interface doesn't build on a Mac. +Solution: Use a list instead of a pair. (Bernhard Fisseni) Use "-framework" + argument for MZSCHEME_LIBS in configure. +Files: src/configure.in, src/if_mzsch.c, src/auto/configure + +Patch 7.1.016 (after patch 7.1.012) +Problem: Error message about setting 'diff' to a string. +Solution: Don't pass an empty string to set_option_value() when setting + 'diff'. +Files: src/quickfix.c, src/popupmnu.c + +Patch 7.1.017 +Problem: ":confirm w" does give a prompt when 'readonly' is set, but not + when the file permissions are read-only. (Michael Schaap) +Solution: Provide a dialog in both situations. (Chris Lubinski) +Files: src/ex_cmds.c, src/fileio.c, src/proto/fileio.pro + +Patch 7.1.018 +Problem: When 'virtualedit' is set a "p" of a block just past the end of + the line inserts before the cursor. (Engelke) +Solution: Check for the cursor being just after the line (Chris Lubinski) +Files: src/ops.c + +Patch 7.1.019 +Problem: ":py" asks for an argument, ":py asd" then gives the error that + ":py" isn't implemented. Should already happen for ":py". +Solution: Compare with ex_script_ni. (Chris Lubinski) +Files: src/ex_docmd.c + +Patch 7.1.020 +Problem: Reading from uninitialized memory when using a dialog. (Dominique + Pelle) +Solution: In msg_show_console_dialog() append a NUL after every appended + character. +Files: src/message.c + +Patch 7.1.021 (after 7.1.015) +Problem: Mzscheme interface doesn't compile on Win32. +Solution: Fix the problem that 7.1.015 fixed in a better way. (Sergey Khorev) +Files: src/if_mzsch.c + +Patch 7.1.022 +Problem: When setting 'keymap' twice the b:keymap_name variable isn't set. + (Milan Berta) +Solution: Don't unlet b:keymap_name for ":loadkeymap". (Martin Toft) +Files: src/digraph.c + +Patch 7.1.023 +Problem: "dw" in a line with one character deletes the line. Vi and nvi + don't do this. (Kjell Arne Rekaa) +Solution: Check for one-character words especially. +Files: src/search.c + +Patch 7.1.024 +Problem: Using a pointer that has become invalid. (Chris Monson) +Solution: Obtain the line pointer again after we looked at another line. +Files: src/search.c + +Patch 7.1.025 +Problem: search() and searchpos() don't use match under cursor at start of + line when using 'bc' flags. (Viktor Kojouharov) +Solution: Don't go to the previous line when the 'c' flag is present. + Also fix that "j" doesn't move the cursor to the right column. +Files: src/eval.c, src/search.c + +Patch 7.1.026 +Problem: "[p" doesn't work in Visual mode. (David Brown) +Solution: Use checkclearop() instead of checkclearopq(). +Files: src/normal.c + +Patch 7.1.027 +Problem: On Sun systems opening /dev/fd/N doesn't work, and they are used + by process substitutions. +Solution: Allow opening specific character special files for Sun systems. + (Gary Johnson) +Files: src/fileio.c, src/os_unix.h + +Patch 7.1.028 +Problem: Can't use last search pattern for ":sort". (Brian McKee) +Solution: When the pattern is empty use the last search pattern. (Martin + Toft) +Files: runtime/doc/change.txt, src/ex_cmds.c + +Patch 7.1.029 (after 7.1.019) +Problem: Can't compile when all interfaces are used. (Taylor Venable) +Solution: Only check for ex_script_ni when it's defined. +Files: src/ex_docmd.c + +Patch 7.1.030 +Problem: The "vimtutor" shell script checks for "vim6" but not for "vim7". + (Christian Robinson) +Solution: Check for more versions, but prefer using "vim". +Files: src/vimtutor + +Patch 7.1.031 +Problem: virtcol([123, '$']) doesn't work. (Michael Schaap) +Solution: When '$' is used for the column number get the last column. +Files: runtime/doc/eval.txt, src/eval.c + +Patch 7.1.032 +Problem: Potential crash when editing a command line. (Chris Monson) +Solution: Check the position to avoid access before the start of an array. +Files: src/ex_getln.c + +Patch 7.1.033 +Problem: A buffer is marked modified when it was first deleted and then + added again using a ":next" command. (John Mullin) +Solution: When checking if a buffer is modified use the BF_NEVERLOADED flag. +Files: src/option.c + +Patch 7.1.034 +Problem: Win64: A few compiler warnings. Problems with optimizer. +Solution: Use int instead of size_t. Disable the optimizer in one function. + (George V. Reilly) +Files: src/eval.c, src/spell.c + +Patch 7.1.035 +Problem: After ":s/./&/#" all listed lines have a line number. (Yakov + Lerner) +Solution: Reset the line number flag when not using the "&" flag. +Files: src/ex_cmds.c + +Patch 7.1.036 +Problem: Completing ":echohl" argument should include "None". (Ori + Avtalion) ":match" should have "none" too. +Solution: Add flags to use expand_highlight(). Also fix that when disabling + FEAT_CMDL_COMPL compilation fails. (Chris Lubinski) +Files: src/eval.c, src/ex_docmd.c, src/ex_getln.c, src/proto/syntax.pro + src/syntax.c + +Patch 7.1.037 +Problem: strcpy() used for overlapping strings. (Chris Monson) +Solution: Use mch_memmove() instead. +Files: src/option.c + +Patch 7.1.038 +Problem: When 'expandtab' is set then a Tab copied for 'copyindent' is + expanded to spaces, even when 'preserveindent' is set. (Alexei + Alexandrov) +Solution: Remove the check for 'expandtab'. Also fix that ">>" doesn't obey + 'preserveindent'. (Chris Lubinski) +Files: src/misc1.c + +Patch 7.1.039 +Problem: A tag in a help file that starts with "help-tags" and contains a + percent sign may make Vim crash. (Ulf Harnhammar) +Solution: Use puts() instead of fprintf(). +Files: src/ex_cmds.c + +Patch 7.1.040 +Problem: ":match" only supports three matches. +Solution: Add functions clearmatches(), getmatches(), matchadd(), + matchdelete() and setmatches(). Changed the data structures for + this. A small bug in syntax.c is fixed, so newly created + highlight groups can have their name resolved correctly from their + ID. (Martin Toft) +Files: runtime/doc/eval.txt, runtime/doc/pattern.txt, + runtime/doc/usr_41.txt, src/eval.c, src/ex_docmd.c, + src/proto/window.pro, src/screen.c, src/structs.h, src/syntax.c, + src/testdir/Makefile, src/testdir/test63.in, + src/testdir/test63.ok, src/window.c + +Patch 7.1.041 (extra, after 7.1.040) +Problem: Some changes for patch 7.1.040 are in extra files. +Solution: Update the extra files. +Files: src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mms + +Patch 7.1.042 (after 7.1.040) +Problem: Internal error when using matchadd(). (David Larson) +Solution: Check the third argument to be present before using the fourth + argument. (Martin Toft) +Files: src/eval.c + +Patch 7.1.043 +Problem: In Ex mode using CTRL-D twice may cause a crash. Cursor isn't + positioned properly after CTRL-D. +Solution: Set prev_char properly. Position the cursor correctly. (Antony + Scriven) +Files: src/ex_getln.c + +Patch 7.1.044 +Problem: In Insert mode 0 CTRL-T deletes all indent, it should add indent. + (Gautam Iyer) +Solution: Check for CTRL-D typed. +Files: src/edit.c + +Patch 7.1.045 +Problem: Unnecessary screen redrawing. (Jjgod Jiang) +Solution: Reset "must_redraw" after clearing the screen. +Files: src/screen.c + +Patch 7.1.046 +Problem: ":s" command removes combining characters. (Ron Aaron) +Solution: Copy composing characters individually. (Chris Lubinski) +Files: src/regexp.c + +Patch 7.1.047 +Problem: vim_regcomp() called with invalid argument. (Xiaozhou Liu) +Solution: Change TRUE to RE_MAGIC + RE_STRING. +Files: src/ex_eval.c + +Patch 7.1.048 +Problem: The matchparen plugin doesn't update the match when scrolling with + the mouse wheel. (Ilya Bobir) +Solution: Set the match highlighting for text that can be scrolled into the + viewable area without moving the cursor. (Chris Lubinski) +Files: runtime/plugin/matchparen.vim + +Patch 7.1.049 +Problem: Cannot compile GTK2 version with Hangul input feature. +Solution: Don't define FEAT_XFONTSET when using GTK2. +Files: src/feature.h + +Patch 7.1.050 +Problem: Possible crash when using C++ indenting. (Chris Monson) +Solution: Keep the line pointer to the line to compare with. Avoid going + past the end of line. +Files: src/misc1.c + +Patch 7.1.051 +Problem: Accessing uninitialized memory when finding spell suggestions. +Solution: Don't try swapping characters at the end of a word. +Files: src/spell.c + +Patch 7.1.052 +Problem: When creating a new match not all fields are initialized, which + may lead to unpredictable results. +Solution: Initialise rmm_ic and rmm_maxcol. +Files: src/window.c + +Patch 7.1.053 +Problem: Accessing uninitialized memory when giving a message. +Solution: Check going the length before checking for a NUL byte. +Files: src/message.c + +Patch 7.1.054 +Problem: Accessing uninitialized memory when displaying the fold column. +Solution: Add a NUL to the extra array. (Dominique Pelle). Also do this in + a couple of other situations. +Files: src/screen.c + +Patch 7.1.055 +Problem: Using strcpy() with arguments that overlap. +Solution: Use mch_memmove() instead. +Files: src/buffer.c, src/charset.c, src/eval.c, src/ex_getln.c, + src/misc1.c, src/regexp.c, src/termlib.c + +Patch 7.1.056 +Problem: More prompt does not behave correctly after scrolling back. + (Randall W. Morris) +Solution: Avoid lines_left becomes negative. (Chris Lubinski) Don't check + mp_last when deciding to show the more prompt. (Martin Toft) +Files: src/message.c + +Patch 7.1.057 +Problem: Problem with CursorHoldI when using "r" in Visual mode (Max + Dyckhoff) +Solution: Ignore CursorHold(I) when getting a second character for a Normal + mode command. Also abort the "r" command in Visual when a special + key is typed. +Files: src/normal.c + +Patch 7.1.058 +Problem: When 'rightleft' is set the completion menu is positioned wrong. + (Baha-Eddine MOKADEM) +Solution: Fix the completion menu. (Martin Toft) +Files: src/popupmnu.c, src/proto/search.pro, src/search.c + +Patch 7.1.059 +Problem: When in Ex mode and doing "g/^/vi" and then pressing CTRL-C Vim + hangs and beeps. (Antony Scriven) +Solution: Clear "got_int" in the main loop to avoid the hang. When typing + CTRL-C twice in a row abort the ":g" command. This is Vi + compatible. +Files: src/main.c + +Patch 7.1.060 +Problem: Splitting quickfix window messes up window layout. (Marius + Gedminas) +Solution: Compute the window size in a smarter way. (Martin Toft) +Files: src/window.c + +Patch 7.1.061 +Problem: Win32: When 'encoding' is "latin1" 'ignorecase' doesn't work for + characters with umlaut. (Joachim Hofmann) +Solution: Do not use islower()/isupper()/tolower()/toupper() but our own + functions. (Chris Lubinski) +Files: src/mbyte.c, src/regexp.c, src/vim.h + +Patch 7.1.062 (after 7.1.038) +Problem: Indents of C comments can be wrong. (John Mullin) +Solution: Adjust ind_len. (Chris Lubinski) +Files: src/misc1.c + +Patch 7.1.063 (after 7.1.040) +Problem: Warning for uninitialized variable. +Solution: Initialise it to NULL. +Files: src/ex_docmd.c + +Patch 7.1.064 +Problem: On Interix some files appear not to exist. +Solution: Remove the top bit from st_mode. (Ligesh) +Files: src/os_unix.c + +Patch 7.1.065 (extra) +Problem: Win32: Compilation problem for newer version of w32api. +Solution: Only define __IID_DEFINED__ when needed. (Chris Sutcliffe) +Files: src/Make_ming.mak, src/iid_ole.c + +Patch 7.1.066 +Problem: When 'bomb' is set or reset the file should be considered + modified. (Tony Mechelynck) +Solution: Handle like 'endofline'. (Martin Toft) +Files: src/buffer.c, src/fileio.c, src/option.c, src/structs.h + +Patch 7.1.067 +Problem: 'thesaurus' doesn't work when 'infercase' is set. (Mohsin) +Solution: Don't copy the characters being completed but check the case and + apply it to the suggested word. Also fix that the first word in + the thesaurus line is not used. (Martin Toft) +Files: src/edit.c + +Patch 7.1.068 +Problem: When 'equalalways' is set and splitting a window, it's possible + that another small window gets bigger. +Solution: Only equalize window sizes when after a split the windows are + smaller than another window. (Martin Toft) +Files: runtime/doc/options.txt, runtime/doc/windows.txt, src/window.c + +Patch 7.1.069 +Problem: GTK GUI: When using confirm() without a default button there still + is a default choice. +Solution: Ignore Enter and Space when there is no default button. (Chris + Lubinski) +Files: src/gui_gtk.c + +Patch 7.1.070 (extra) +Problem: Win32 GUI: When using confirm() without a default button there + still is a default choice. +Solution: Set focus on something else than a button. (Chris Lubinski) +Files: src/gui_w32.c + +Patch 7.1.071 (after 7.1.040) +Problem: Regexp patterns are not tested. +Solution: Add a basic test, to be expanded later. + Also add (commented-out) support for valgrind. +Files: src/testdir/Makefile, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.1.072 (extra, after 7.1.041 and 7.1.071) +Problem: Some changes for patch 7.1.071 are in extra files. +Solution: Update the extra files. Also fix a few warnings from the DOS test + makefile. +Files: src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mms + +Patch 7.1.073 (after 7.1.062) +Problem: Wrong cursor position and crash when 'preserveindent' is set. + (Charles Campbell) +Solution: Handle the situation that we start without indent. (Chris + Lubinski) +Files: src/misc1.c + +Patch 7.1.074 +Problem: Crash when calling string() on a recursively nested List. +Solution: Check result value for being NULL. (Yukihiro Nakadaira) +Files: src/eval.c + +Patch 7.1.075 +Problem: ":let v:statusmsg" reads memory already freed. +Solution: Don't set v:statusmsg when listing it. +Files: src/eval.c + +Patch 7.1.076 +Problem: Another strcpy() with overlapping arguments. +Solution: Use mch_memmove(). (Dominique Pelle) And another one. +Files: src/ex_docmd.c, src/normal.c + +Patch 7.1.077 +Problem: Using "can_spell" without initializing it. (Dominique Pelle) +Solution: Set a default for get_syntax_attr(). +Files: src/syntax.c + +Patch 7.1.078 +Problem: Dropping a file name on gvim that contains a CSI byte doesn't work + when editing the command line. +Solution: Escape the CSI byte when inserting in the input buffer. (Yukihiro + Nakadaira) +Files: src/gui.c, src/ui.c + +Patch 7.1.079 +Problem: When the locale is "C" and 'encoding' is "latin1" then the "@" + character in 'isfname', 'isprint', etc. doesn't pick up accented + characters. +Solution: Instead of isalpha() use MB_ISLOWER() and MB_ISUPPER(). +Files: src/charset.c, src/macros.h + +Patch 7.1.080 (extra) +Problem: Compiler warnings for using "const char *" for "char *". +Solution: Add type casts. (Chris Sutcliffe) +Files: src/GvimExt/gvimext.cpp + +Patch 7.1.081 +Problem: Command line completion for a shell command: "cat </tmp/file<Tab>" + doesn't work. +Solution: Start the file name at any character that can't be in a file name. + (Martin Toft) +Files: src/ex_docmd.c + +Patch 7.1.082 +Problem: After a ":split" the matchparen highlighting isn't there. +Solution: Install a WinEnter autocommand. Also fixes that after + ":NoMatchParen" only the current window is updated. (Martin Toft) +Files: runtime/doc/pi_paren.txt, runtime/plugin/matchparen.vim + +Patch 7.1.083 (after 7.1.081) +Problem: Command line completion doesn't work with wildcards. +Solution: Add vim_isfilec_or_wc() and use it. (Martin Toft) +Files: src/charset.c, src/proto/charset.pro, src/ex_docmd.c + +Patch 7.1.084 +Problem: Using the "-nb" argument twice causes netbeans not to get + fileOpened events. +Solution: Change "&" to "&&". (Xavier de Gaye) +Files: src/ex_cmds.c + +Patch 7.1.085 +Problem: ":e fold.c" then ":sp fold.c" results in folds of original window + to disappear. (Akita Noek) +Solution: Invoke foldUpdateAll() for all windows of the changed buffer. + (Martin Toft) +Files: src/ex_cmds.c + +Patch 7.1.086 +Problem: Crash when using specific Python syntax highlighting. (Quirk) +Solution: Check for a negative index, coming from a keyword match at the + start of a line from a saved state. +Files: src/syntax.c + +Patch 7.1.087 +Problem: Reading past ":cscope find" command. Writing past end of a buffer. +Solution: Check length of the argument before using the pattern. Use + vim_strncpy(). (Dominique Pelle) +Files: if_cscope.c + +Patch 7.1.088 (extra) +Problem: The coordinates used by ":winpos" differ from what getwinposx() + and getwinposy() return. +Solution: Use MoveWindowStructure() instead of MoveWindow(). (Michael Henry) +Files: src/gui_mac.c + +Patch 7.1.089 +Problem: ":let loaded_getscriptPlugin" doesn't clear to eol, result is + "#1in". +Solution: Clear to the end of the screen after displaying the first variable + value. +Files: src/eval.c + +Patch 7.1.090 +Problem: Compiler warning on Mac OS X 10.5. +Solution: Don't redeclare sigaltstack(). (Hisashi T Fujinaka) +Files: src/os_unix.c + +Patch 7.1.091 (extra) +Problem: Win32: Can't embed Vim inside another application. +Solution: Add the --windowid argument. (Nageshwar) +Files: runtime/doc/gui_w32.txt, runtime/doc/starting.txt, + runtime/doc/vi_diff.txt, src/globals.h, src/gui_w32.c, src/main.c + +Patch 7.1.092 (extra, after 7.1.088) +Problem: Wrong arguments for MoveWindowStructure(). +Solution: Remove "TRUE". (Michael Henry) +Files: src/gui_mac.c + +Patch 7.1.093 +Problem: Reading past end of a screen line when determining cell width. + (Dominique Pelle) +Solution: Add an argument to mb_off2cells() for the maximum offset. +Files: src/globals.h, src/gui.c, src/mbyte.c, src/proto/mbyte.pro, + src/screen.c + +Patch 7.1.094 +Problem: When checking if syntax highlighting is present, looking in the + current buffer instead of the specified one. +Solution: Use "buf" instead of "curbuf". +Files: src/syntax.c + +Patch 7.1.095 +Problem: The FocusLost and FocusGained autocommands are triggered + asynchronously in the GUI. This may cause arbitrary problems. +Solution: Put the focus event in the input buffer and handle it when ready + for it. +Files: src/eval.c, src/getchar.c, src/gui.c, src/gui_gtk_x11.c, + src/keymap.h + +Patch 7.1.096 +Problem: Reading past end of a string when resizing Vim. (Dominique Pelle) +Solution: Check the string pointer before getting the char it points to. +Files: src/message.c + +Patch 7.1.097 +Problem: ":setlocal stl=%!1+1" does not work. +Solution: Adjust check for pointer. (Politz) +Files: src/option.c + +Patch 7.1.098 +Problem: ":call s:var()" doesn't work if "s:var" is a Funcref. (Andy Wokula) +Solution: Before converting "s:" into a script ID, check if it is a Funcref. +Files: src/eval.c + +Patch 7.1.099 +Problem: When the 'keymap' and 'paste' options have a non-default value, + ":mkexrc" and ":mksession" do not correctly set the options. +Solution: Set the options with side effects before other options. +Files: src/option.c + +Patch 7.1.100 +Problem: Win32: Executing cscope doesn't always work properly. +Solution: Use another way to invoke cscope. (Mike Williams) +Files: src/if_cscope.c, src/if_cscope.h, src/main.c, + src/proto/if_cscope.pro + +Patch 7.1.101 +Problem: Ruby: The Buffer.line= method does not work. +Solution: Add the "self" argument to set_current_line(). (Jonathan Hankins) +Files: src/if_ruby.c + +Patch 7.1.102 +Problem: Perl interface doesn't compile with new version of Perl. +Solution: Add two variables to the dynamic library loading. (Suresh + Govindachar) +Files: src/if_perl.xs + +Patch 7.1.103 +Problem: Using "dw" with the cursor past the end of the last line (using + CTRL-\ CTRL-O from Insert mode) deletes a character. (Tim Chase) +Solution: Don't move the cursor back when the movement failed. +Files: src/normal.c + +Patch 7.1.104 (after 7.1.095) +Problem: When 'lazyredraw' is set a focus event causes redraw to be + postponed until a key is pressed. +Solution: Instead of not returning from vgetc() when a focus event is + encountered return K_IGNORE. Add plain_vgetc() for when the + caller doesn't want to get K_IGNORE. +Files: src/digraph.c, src/edit.c, src/ex_cmds.c, src/ex_getln.c, + src/getchar.c, src/normal.c, src/proto/getchar.pro, src/window.c + +Patch 7.1.105 +Problem: Internal error when using "0 ? {'a': 1} : {}". (A.Politz) +Solution: When parsing a dictionary value without using the value, don't try + obtaining the key name. +Files: src/eval.c + +Patch 7.1.106 +Problem: ":messages" doesn't quit listing on ":". +Solution: Break the loop when "got_int" is set. +Files: src/message.c + +Patch 7.1.107 +Problem: When doing a block selection and using "s" to change the text, + while triggering auto-indenting, causes the wrong text to be + repeated in other lines. (Adri Verhoef) +Solution: Compute the change of indent and compensate for that. +Files: src/ops.c + +Patch 7.1.108 (after 7.1.100) +Problem: Win32: Compilation problems in Cscope code. (Jeff Lanzarotta) +Solution: Use (long) instead of (intptr_t) when it's not defined. +Files: src/if_cscope.c + +Patch 7.1.109 +Problem: GTK: when there are many tab pages, clicking on the arrow left of + the labels moves to the next tab page on the right. (Simeon Bird) +Solution: Check the X coordinate of the click and pass -1 as value for the + left arrow. +Files: src/gui_gtk_x11.c, src/term.c + +Patch 7.1.110 (after 7.1.102) +Problem: Win32: Still compilation problems with Perl. +Solution: Change the #ifdefs. (Suresh Govindachar) +Files: src/if_perl.xs + +Patch 7.1.111 +Problem: When using ":vimgrep" with the "j" flag folds from another buffer + may be displayed. (A.Politz) +Solution: When not jumping to another buffer update the folds. +Files: src/quickfix.c + +Patch 7.1.112 +Problem: Using input() with a wrong argument may crash Vim. (A.Politz) +Solution: Init the input() return value to NULL. +Files: src/eval.c + +Patch 7.1.113 +Problem: Using map() to go over an empty list causes memory to be freed + twice. (A.Politz) +Solution: Don't clear the typeval in restore_vimvar(). +Files: src/eval.c + +Patch 7.1.114 +Problem: Memory leak in getmatches(). +Solution: Don't increment the refcount twice. +Files: src/eval.c + +Patch 7.1.115 (after 7.1.105) +Problem: Compiler warning for uninitialized variable. (Tony Mechelynck) +Solution: Init variable to NULL. +Files: src/eval.c + +Patch 7.1.116 +Problem: Cannot display Unicode characters above 0x10000. +Solution: Remove the replacement with a question mark when UNICODE16 is not + defined. (partly by Nicolas Weber) +Files: src/screen.c + +Patch 7.1.117 +Problem: Can't check whether Vim was compiled with Gnome. (Tony Mechelynck) +Solution: Add gui_gnome to the has() list. +Files: src/eval.c + +Patch 7.1.118 (after 7.1.107) +Problem: Compiler warning for Visual C compiler. +Solution: Add typecast. (Mike Williams) +Files: src/ops.c + +Patch 7.1.119 +Problem: Crash when 'cmdheight' set to very large value. (A.Politz) +Solution: Limit 'cmdheight' to 'lines' minus one. Store right value of + 'cmdheight' when running out of room. +Files: src/option.c, src/window.c + +Patch 7.1.120 +Problem: Can't properly check memory leaks while running tests. +Solution: Add an argument to garbagecollect(). Delete functions and + variables in the test scripts. +Files: runtime/doc/eval.txt src/eval.c, src/globals.h, src/main.c, + src/testdir/Makefile, src/testdir/test14.in, + src/testdir/test26.in, src/testdir/test34.in, + src/testdir/test45.in, src/testdir/test47.in, + src/testdir/test49.in, src/testdir/test55.in, + src/testdir/test56.in, src/testdir/test58.in, + src/testdir/test59.in, src/testdir/test60.in, + src/testdir/test60.vim, src/testdir/test62.in, + src/testdir/test63.in, src/testdir/test64.in, + +Patch 7.1.121 +Problem: Using ":cd %:h" when editing a file in the current directory + results in an error message for using an empty string. +Solution: When "%:h" results in an empty string use ".". +Files: src/eval.c + +Patch 7.1.122 +Problem: Mac: building Vim.app fails. Using wrong architecture. +Solution: Use line continuation for the gui_bundle dependency. Detect the + system architecture with "uname -a". +Files: src/main.aap + +Patch 7.1.123 +Problem: Win32: ":edit foo ~ foo" expands "~". +Solution: Change the call to expand_env(). +Files: src/ex_docmd.c, src/misc1.c, src/proto/misc1.pro, src/option.c + +Patch 7.1.124 (extra) +Problem: Mac: When dropping a file on Vim.app that is already in the buffer + list (from .viminfo) results in editing an empty, unnamed buffer. + (Axel Kielhorn) Also: warning for unused variable. +Solution: Move to the buffer of the first argument. Delete unused variable. +Files: src/gui_mac.c + +Patch 7.1.125 +Problem: The TermResponse autocommand event is not always triggered. (Aron + Griffis) +Solution: When unblocking autocommands check if v:termresponse changed and + trigger the event then. +Files: src/buffer.c, src/diff.c, src/ex_getln.c, src/fileio.c, + src/globals.h, src/misc2.c, src/proto/fileio.pro, src/window.c + +Patch 7.1.126 (extra) +Problem: ":vimgrep */*" fails when a BufRead autocommand changes directory. + (Bernhard Kuhn) +Solution: Change back to the original directory after loading a file. + Also: use shorten_fname1() to avoid duplicating code. +Files: src/buffer.c, src/ex_docmd.c, src/fileio.c, src/gui_gtk.c, + src/gui_w48.c, src/proto/ex_docmd.pro, src/proto/fileio.pro, + src/quickfix.c + +Patch 7.1.127 +Problem: Memory leak when doing cmdline completion. (Dominique Pelle) +Solution: Free "orig" argument of ExpandOne() when it's not used. +Files: src/ex_getln.c + +Patch 7.1.128 (extra) +Problem: Build problems with new version of Cygwin. +Solution: Remove -D__IID_DEFINED__, like with MingW. (Guopeng Wen) +Files: src/Make_cyg.mak + +Patch 7.1.129 (extra) +Problem: Win32: Can't get the user name when it is longer than 15 + characters. +Solution: Use UNLEN instead of MAX_COMPUTERNAME_LENGTH. (Alexei Alexandrov) +Files: src/os_win32.c + +Patch 7.1.130 +Problem: Crash with specific order of undo and redo. (A.Politz) +Solution: Clear and adjust pointers properly. Add u_check() for debugging. +Files: src/undo.c, src/structs.h + +Patch 7.1.131 +Problem: ":mksession" always adds ":setlocal autoread". (Christian J. + Robinson) +Solution: Skip boolean global/local option using global value. +Files: src/option.c + +Patch 7.1.132 +Problem: getpos("'>") may return a negative column number for a Linewise + selection. (A.Politz) +Solution: Don't add one to MAXCOL. +Files: src/eval.c + +Patch 7.1.133 (after 7.1.126) +Problem: shorten_fname1() linked when it's not needed. +Solution: Add #ifdef. +Files: src/fileio.c + +Patch 7.1.134 (extra) +Problem: Win32: Can't build with VC8 +Solution: Detect the MSVC version instead of using NMAKE_VER. + (Mike Williams) +Files: src/Make_mvc.mak + +Patch 7.1.135 +Problem: Win32: When editing a file c:\tmp\foo and c:\tmp\\foo we have two + buffers for the same file. (Suresh Govindachar) +Solution: Invoke FullName_save() when a path contains "//" or "\\". +Files: src/buffer.c + +Patch 7.1.136 +Problem: Memory leak when using Ruby syntax highlighting. (Dominique Pelle) +Solution: Free the contained-in list. +Files: src/syntax.c + +Patch 7.1.137 +Problem: Build failure when using EXITFREE. (Dominique Pelle) +Solution: Add an #ifdef around using clip_exclude_prog. +Files: src/misc2.c + +Patch 7.1.138 +Problem: The Perl Msg() function doesn't stop when "q" is typed at the more + prompt. (Hari Krishna Dara) +Solution: Check got_int. +Files: src/if_perl.xs + +Patch 7.1.139 +Problem: When using marker folding and ending Insert mode with CTRL-C the + current fold is truncated. (Fred Kater) +Solution: Ignore got_int while updating folds. +Files: src/fold.c + +Patch 7.1.140 +Problem: v:count is set only after typing a non-digit, that makes it + difficult to make a nice mapping. +Solution: Set v:count while still typing the count. +Files: src/normal.c + +Patch 7.1.141 +Problem: GTK: -geom argument doesn't support a negative offset. +Solution: Compute position from the right/lower corner. +Files: src/gui_gtk_x11.c + +Patch 7.1.142 +Problem: ":redir @A>" doesn't work. +Solution: Ignore the extra ">" also when appending. (James Vega) +Files: src/ex_docmd.c + +Patch 7.1.143 +Problem: Uninitialized memory read when diffing three files. (Dominique + Pelle) +Solution: Remove "+ !notset" so that we don't use fields that were not + computed. +Files: src/diff.c + +Patch 7.1.144 +Problem: After ":diffup" cursor can be in the wrong position. +Solution: Force recomputing the cursor position. +Files: src/diff.c + +Patch 7.1.145 +Problem: Insert mode completion: When using the popup menu, after + completing a word and typing a non-word character Vim is still + completing the same word, following CTRL-N doesn't work. + Insert mode Completion: When using CTRL-X O and there is only + "struct." before the cursor, typing one char to reduce the + matches, then BS completion stops. +Solution: When typing a character that is not part of the item being + completed, stop complete mode. For whole line completion also + accept a space. For file name completion stop at a path + separator. + For omni completion stay in completion mode even if completing + with empty string. +Files: src/edit.c + +Patch 7.1.146 (extra) +Problem: VMS: Files with a very rare record organization (VFC) cannot be + properly written by Vim. + On older VAX systems mms runs into a syntax error. +Solution: Check for this special situation. Do not wrap a comment, make it + one long line. (Zoltan Arpadffy) +Files: src/fileio.c, src/Make_vms.mms + +Patch 7.1.147 (after 7.1.127) +Problem: Freeing memory already freed when completing user name. (Meino + Cramer) +Solution: Use a flag to remember if "orig" needs to be freed. +Files: src/ex_getln.c + +Patch 7.1.148 +Problem: Some types are not found by configure. +Solution: Test for the sys/types.h header file. (Sean Boudreau) +Files: src/configure.in, src/auto/configure + +Patch 7.1.149 +Problem: GTK GUI: When the completion popup menu is used scrolling another + window by the scrollbar is OK, but using the scroll wheel it + behaves line <Enter>. +Solution: Ignore K_MOUSEDOWN and K_MOUSEUP. Fix redrawing the popup menu. +Files: src/edit.c, src/gui.c + +Patch 7.1.150 +Problem: When 'clipboard' has "unnamed" using "p" in Visual mode doesn't + work correctly. (Jianrong Yu) +Solution: When 'clipboard' has "unnamed" also obtain the selection when + getting the default register. +Files: src/ops.c + +Patch 7.1.151 +Problem: Using whole line completion with 'ignorecase' and 'infercase' set + and the line is empty get an lalloc(0) error. +Solution: Don't try changing case for an empty match. (Matthew Wozniski) +Files: src/edit.c + +Patch 7.1.152 +Problem: Display problem when 'hls' and 'cursorcolumn' are set and + searching for "$". (John Mullin) Also when scrolling + horizontally when 'wrap' is off. +Solution: Keep track of the column where highlighting was set. Check the + column offset when skipping characters. +Files: src/screen.c + +Patch 7.1.153 +Problem: Compiler warnings on SGI. Undefined XpmAllocColor (Charles + Campbell) +Solution: Add type casts. Init st_dev and st_ino separately. Don't use + type casts for vim_snprintf() when HAVE_STDARG_H is defined. + Define XpmAllocColor when needed. +Files: src/eval.c, src/ex_cmds.c, src/fileio.c, src/misc2.c, + src/gui_xmebw.c + +Patch 7.1.154 +Problem: Compiler warning for signed/unsigned compare. +Solution: Add type cast. +Files: src/screen.c + +Patch 7.1.155 +Problem: Crash when 'undolevels' is 0 and repeating "udd". (James Vega) +Solution: When there is only one branch use u_freeheader() to delete it. +Files: src/undo.c + +Patch 7.1.156 +Problem: Overlapping arguments for strcpy() when expanding command line + variables. +Solution: Use mch_memmove() instead of STRCPY(). Also fix a few typos. + (Dominique Pelle) +Files: src/ex_docmd.c + +Patch 7.1.157 +Problem: In Ex mode, :" gives an error at end-of-file. (Michael Hordijk) +Solution: Only give an error for an empty line, not for a comment. +Files: src/ex_docmd.c + +Patch 7.1.158 (extra) +Problem: Win32 console: When 'encoding' is "utf-8" and typing Alt-y the + result is wrong. Win32 GUI: Alt-y results in "u" when 'encoding' + is "cp1250" (Lukas Cerman) +Solution: For utf-8 don't set the 7th bit in a byte, convert to the correct + byte sequence. For cp1250, when conversion to 'encoding' results + in the 7th bit not set, set the 7th bit after conversion. +Files: src/os_win32.c, src/gui_w48.c + +Patch 7.1.159 +Problem: strcpy() has overlapping arguments. +Solution: Use mch_memmove() instead. (Dominique Pelle) +Files: src/ex_cmds.c + +Patch 7.1.160 +Problem: When a focus autocommand is defined, getting or losing focus + causes the hit-enter prompt to be redrawn. (Bjorn Winckler) +Solution: Overwrite the last line. +Files: src/message.c + +Patch 7.1.161 +Problem: Compilation errors with tiny features and EXITFREE. +Solution: Add #ifdefs. (Dominique Pelle) +Files: src/edit.c, src/misc2.c + +Patch 7.1.162 +Problem: Crash when using a modifier before "while" or "for". (A.Politz) +Solution: Skip modifiers when checking for a loop command. +Files: src/proto/ex_docmd.pro, src/ex_docmd.c, src/ex_eval.c + +Patch 7.1.163 +Problem: Warning for the unknown option 'bufsecret'. +Solution: Remove the lines .vim that use this option. (Andy Wokula) +Files: runtime/menu.vim + +Patch 7.1.164 +Problem: Reading past end of regexp pattern. (Dominique Pelle) +Solution: Use utf_ptr2len(). +Files: src/regexp.c + +Patch 7.1.165 +Problem: Crash related to getting X window ID. (Dominique Pelle) +Solution: Don't trust the window ID that we got in the past, check it every + time. +Files: src/os_unix.c + +Patch 7.1.166 +Problem: Memory leak for using "gp" in Visual mode. +Solution: Free memory in put_register(). (Dominique Pelle) +Files: src/ops.c + +Patch 7.1.167 +Problem: Xxd crashes when using "xxd -b -c 110". (Debian bug 452789) +Solution: Allocate more memory. Fix check for maximum number of columns. +Files: src/xxd/xxd.c + +Patch 7.1.168 (extra) +Problem: Win32 GUI: Since patch 7.1.095, when the Vim window does not have + focus, clicking in it doesn't position the cursor. (Juergen + Kraemer) +Solution: Don't reset s_button_pending just after receiving focus. +Files: src/gui_w48.c + +Patch 7.1.169 +Problem: Using uninitialized variable when system() fails. (Dominique + Pelle) +Solution: Let system() return an empty string when it fails. +Files: src/eval.c + +Patch 7.1.170 +Problem: Valgrind warning for overlapping arguments for strcpy(). +Solution: Use mch_memmove() instead. (Dominique Pelle) +Files: src/getchar.c + +Patch 7.1.171 +Problem: Reading one byte before allocated memory. +Solution: Check index not to become negative. (Dominique Pelle) +Files: src/ex_getln.c + +Patch 7.1.172 +Problem: When 'buftype' is "acwrite" Vim still checks if the file or + directory exists before overwriting. +Solution: Don't check for overwriting when the buffer name is not a file + name. +Files: src/ex_cmds.c + +Patch 7.1.173 +Problem: Accessing freed memory. (Dominique Pelle) +Solution: Don't call reg_getline() to check if a line is the first in the + file. +Files: src/regexp.c + +Patch 7.1.174 +Problem: Writing NUL past end of a buffer. +Solution: Copy one byte less when using strncat(). (Dominique Pelle) +Files: src/ex_cmds.c, src/ex_docmd.c, + +Patch 7.1.175 +Problem: <BS> doesn't work with some combination of 'sts', 'linebreak' and + 'backspace'. (Francois Ingelrest) +Solution: When adding white space results in not moving back delete one + character. +Files: src/edit.c + +Patch 7.1.176 +Problem: Building with Aap fails when the "compiledby" argument contains + '<' or '>' characters. (Alex Yeh) +Solution: Change how quoting is done in the Aap recipe. +Files: src/main.aap + +Patch 7.1.177 +Problem: Freeing memory twice when in debug mode while reading a script. +Solution: Ignore script input while in debug mode. +Files: src/ex_cmds2.c, src/getchar.c, src/globals.h + +Patch 7.1.178 +Problem: "%" doesn't work on "/* comment *//* comment */". +Solution: Don't handle the "//" in "*//*" as a C++ comment. (Markus + Heidelberg) +Files: src/search.c + +Patch 7.1.179 +Problem: Need to check for TCL 8.5. +Solution: Adjust configure script. (Alexey Froloff) +Files: src/configure.in, src/auto/configure + +Patch 7.1.180 +Problem: Regexp patterns not tested sufficiently. +Solution: Add more checks to the regexp test. +Files: src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.1.181 +Problem: Accessing uninitialized memory in Farsi mode. (Dominique Pelle) +Solution: Only invoke lrF_sub() when there is something to do. +Files: src/ex_cmds.c + +Patch 7.1.182 +Problem: When using tab pages and an argument list the session file may + contain wrong "next" commands. (Alexander Bluem) +Solution: Use "argu" commands and only when needed. +Files: src/ex_docmd.c + +Patch 7.1.183 +Problem: "Internal error" for ":echo matchstr('a', 'a\%[\&]')" (Mitanu + Paul) +Solution: Inside "\%[]" detect \&, \| and \) as an error. +Files: src/regexp.c + +Patch 7.1.184 +Problem: Crash when deleting backwards over a line break in Insert mode. +Solution: Don't advance the cursor when it's already on the NUL after a + line. (Matthew Wozniski) +Files: src/normal.c + +Patch 7.1.185 +Problem: Using "gR" with a multi-byte encoding and typing a CR pushes + characters onto the replace stack incorrectly, resulting in BS + putting back the wrong characters. (Paul B. Mahol) +Solution: Push multi-byte characters onto the replace stack in reverse byte + order. Add replace_push_mb(). +Files: src/edit.c, src/misc1.c, src/proto/edit.pro + +Patch 7.1.186 +Problem: "expand('<afile>')" returns a bogus value after changing + directory. (Dave Fishburn) +Solution: Copy "autocmd_fname" to allocated memory and expand to full + filename. Shorten the path when expanding <afile>. +Files: src/ex_docmd.c, src/fileio.c + +Patch 7.1.187 +Problem: Win32 GUI: Custom completion using system() no longer works + after patch 7.1.104. (Erik Falor) +Solution: Loop when safe_vgetc() returns K_IGNORE. +Files: src/ex_getln.c + +Patch 7.1.188 +Problem: When 'showmode' is off the message for changing a readonly file is + given in the second column instead of the first. (Payl B. Mahol) +Solution: Put the W10 message in the first column. +Files: src/edit.c + +Patch 7.1.189 (after 7.1.104) +Problem: Patch 7.1.104 was incomplete. +Solution: Also call plain_vgetc() in ask_yesno(). +Files: src/misc1.c + +Patch 7.1.190 +Problem: Cursor after end-of-line: "iA sentence.<Esc>)" +Solution: Move cursor back and make motion inclusive. +Files: src/normal.c + +Patch 7.1.191 +Problem: Win32 GUI: after patch 7.1.168 there is still a problem when + clicking in a scrollbar. (Juergen Jottkaerr) +Solution: Don't check the input buffer when dragging the scrollbar. +Files: src/gui.c + +Patch 7.1.192 +Problem: With Visual block selection, "s" and typing something, CTRL-C + doesn't stop Vim from repeating the replacement in other lines, + like happens for "I". +Solution: Check for "got_int" to be set. +Files: src/ops.c + +Patch 7.1.193 +Problem: Some Vim 5.x digraphs are missing in Vim 7, even though the + character pairs are not used. (Philippe de Muyter) +Solution: Add those Vim 5.x digraphs that don't conflict with others. +Files: src/digraph.c + +Patch 7.1.194 +Problem: ":echo glob('~/{}')" results in /home/user//. +Solution: Don't add a slash if there already is one. +Files: src/os_unix.c + +Patch 7.1.195 +Problem: '0 mark doesn't work for "~/foo ~ foo". +Solution: Don't expand the whole file name, only "~/". +Files: src/mark.c + +Patch 7.1.196 (extra) +Problem: Win32 GUI: "\n" in a tooltip doesn't cause a line break. (Erik + Falor) +Solution: Use the TTM_SETMAXTIPWIDTH message. +Files: src/gui_w32.c + +Patch 7.1.197 +Problem: Mac: "make install" doesn't work when prefix defined. +Solution: Pass different arguments to "make installruntime". (Jjgod Jiang) +Files: src/Makefile + +Patch 7.1.198 +Problem: Hang when using ":s/\n//gn". (Burak Gorkemli) +Solution: Set "skip_match". +Files: src/ex_cmds.c + +Patch 7.1.199 +Problem: Can't do command line completion for a specific file name + extension. +Solution: When the pattern ends in "$" don't add a star for completion and + remove the "$" before matching with file names. +Files: runtime/doc/cmdline.txt, src/ex_getln.c + +Patch 7.1.200 (after 7.1.177 and 7.1.182) +Problem: Compiler warnings for uninitialized variables. +Solution: Init variables. +Files: src/ex_cmds2.c, src/ex_docmd.c + +Patch 7.1.201 +Problem: When reading stdin 'fenc' and 'ff' are not set. +Solution: Set the options after reading stdin. (Ben Schmidt) +Files: src/fileio.c + +Patch 7.1.202 +Problem: Incomplete utf-8 byte sequence is not checked for validity. +Solution: Check the bytes that are present for being valid. (Ben Schmidt) +Files: src/mbyte.c + +Patch 7.1.203 +Problem: When 'virtualedit' is "onemore" then "99|" works but ":normal 99|" + doesn't. (Andy Wokula) +Solution: Check for "onemore" flag in check_cursor_col(). +Files: src/misc2.c + +Patch 7.1.204 (extra) +Problem: Win32: Using the example at 'balloonexpr' the balloon disappears + after four seconds and then comes back again. Also moves the + mouse pointer a little bit. (Yongwei Wu) +Solution: Set the autopop time to 30 seconds (the max value). (Sergey + Khorev) Move the mouse two pixels forward and one back to end up + in the same position (really!). +Files: src/gui_w32.c + +Patch 7.1.205 +Problem: Can't get the operator in an ":omap". +Solution: Add the "v:operator" variable. (Ben Schmidt) +Files: runtime/doc/eval.txt, src/eval.c, src/normal.c, src/vim.h + +Patch 7.1.206 +Problem: Compiler warnings when using MODIFIED_BY. +Solution: Add type casts. (Ben Schmidt) +Files: src/version.c + +Patch 7.1.207 +Problem: Netbeans: "remove" cannot delete one line. +Solution: Remove partial lines and whole lines properly. Avoid a memory + leak. (Xavier de Gaye) +Files: src/netbeans.c + +Patch 7.1.208 +Problem: On Alpha get an unaligned access error. +Solution: Store the dictitem pointer before using it. (Matthew Luckie) +Files: src/eval.c + +Patch 7.1.209 +Problem: GTK: When using the netrw plugin and doing ":gui" Vim hangs. +Solution: Stop getting a selection after three seconds. This is a hack. +Files: src/gui_gtk_x11.c + +Patch 7.1.210 +Problem: Listing mapping for 0xdb fails when 'encoding' is utf-8. (Tony + Mechelynck) +Solution: Recognize K_SPECIAL KS_EXTRA KE_CSI as a CSI byte. +Files: src/mbyte.c + +Patch 7.1.211 +Problem: The matchparen plugin may take an unexpected amount of time, so + that it looks like Vim hangs. +Solution: Add a timeout to searchpair(), searchpairpos(), search() and + searchpos(). Use half a second timeout in the plugin. +Files: runtime/doc/eval.txt, runtime/plugin/matchparen.vim, src/edit.c, + src/eval.c, src/ex_cmds2.c, src/ex_docmd.c, src/normal.c, + src/proto/eval.pro, src/proto/ex_cmds2.pro, src/proto/search.pro, + src/search.c + +Patch 7.1.212 +Problem: Accessing a byte before a line. +Solution: Check that the column is 1 or more. (Dominique Pelle) +Files: src/edit.c + +Patch 7.1.213 +Problem: A ":tabedit" command that results in the "swap file exists" dialog + and selecting "abort" doesn't close the new tab. (Al Budden) +Solution: Pass "old_curwin" to do_exedit(). +Files: src/ex_docmd.c + +Patch 7.1.214 +Problem: ":1s/g\n\zs1//" deletes characters from the first line. (A Politz) +Solution: Start replacing in the line where the match starts. +Files: src/ex_cmds.c + +Patch 7.1.215 +Problem: It is difficult to figure out what syntax items are nested at a + certain position. +Solution: Add the synstack() function. +Files: runtime/doc/eval.txt, src/eval.c, src/proto/syntax.pro, + src/syntax.c + +Patch 7.1.216 +Problem: Variants of --remote-tab are not mentioned for "vim --help". +Solution: Display optional -wait and -silent. +Files: src/main.c + +Patch 7.1.217 +Problem: The "help-tags" tag may be missing from runtime/doc/tags when it + was generated during "make install". +Solution: Add the "++t" argument to ":helptags" to force adding the tag. +Files: runtime/doc/Makefile, runtime/doc/various.txt, src/ex_cmds.c, + src/ex_cmds.h + +Patch 7.1.218 +Problem: A syntax region without a "keepend", containing a region with + "extend" could be truncated at the end of the containing region. +Solution: Do not call syn_update_ends() when there are no keepend items. +Files: src/syntax.c + +Patch 7.1.219 (after 7.1.215) +Problem: synstack() returns situation after the current character, can't + see the state for a one-character region. +Solution: Don't update ending states in the requested column. +Files: runtime/doc/eval.txt, src/eval.c, src/hardcopy.c, + src/proto/syntax.pro, src/screen.c, src/spell.c, src/syntax.c + +Patch 7.1.220 +Problem: When a ")" or word movement command moves the cursor back from the + end of the line it may end up on the trail byte of a multi-byte + character. It's also moved back when it isn't needed. +Solution: Add the adjust_cursor() function. +Files: src/normal.c + +Patch 7.1.221 +Problem: When inserting a "(", triggering the matchparen plugin, the + following highlighting may be messed up. +Solution: Before triggering the CursorMovedI autocommands update the display + to update the stored syntax stacks for the change. +Files: src/edit.c + +Patch 7.1.222 (after 7.1.217) +Problem: Wildcards in argument of ":helptags" are not expanded. (Marcel + Svitalsky) +Solution: Expand wildcards in the directory name. +Files: src/ex_cmds.c + +Patch 7.1.223 +Problem: glob() doesn't work properly when 'shell' is "sh" or "bash" and + the expanded name contains spaces, '~', single quotes and other + special characters. (Adri Verhoef, Charles Campbell) +Solution: For Posix shells define a vimglob() function to list the matches + instead of using "echo" directly. +Files: src/os_unix.c + +Patch 7.1.224 +Problem: When using "vim -F -o file1 file2" only one window is + right-to-left. Same for "-H". (Ben Schmidt) +Solution: use set_option_value() to set 'rightleft'. +Files: src/main.c + +Patch 7.1.225 +Problem: Using uninitialized value when XGetWMNormalHints() fails. +Solution: Check the return value. (Dominique Pelle) +Files: src/os_unix.c + +Patch 7.1.226 +Problem: Command line completion doesn't work when a file name contains a + '&' character. +Solution: Accept all characters in a file name, except ones that end a + command or white space. +Files: src/ex_docmd.c + +Patch 7.1.227 +Problem: Hang in syntax HL when moving over a ")". (Dominique Pelle) +Solution: Avoid storing a syntax state in the wrong position in the list of + remembered states. +Files: src/syntax.c + +Patch 7.1.228 +Problem: When 'foldmethod' is "indent" and a fold is created with ">>" it + can't be closed with "zc". (Daniel Shahaf) +Solution: Reset the "small" flag of a fold when adding a line to it. +Files: src/fold.c + +Patch 7.1.229 +Problem: A fold is closed when it shouldn't when 'foldmethod' is "indent" + and backspacing a non-white character so that the indent increases. +Solution: Keep the fold open after backspacing a character. +Files: src/edit.c + +Patch 7.1.230 +Problem: Memory leak when executing SourceCmd autocommands. +Solution: Free the memory. (Dominique Pelle) +Files: src/ex_cmds2.c + +Patch 7.1.231 +Problem: When shifting lines the change is acted upon multiple times. +Solution: Don't have shift_line() call changed_bytes. +Files: src/edit.c, src/ops.c, src/proto/edit.pro, src/proto/ops.pro + +Patch 7.1.232 (after 7.1.207 and 7.1.211) +Problem: Compiler warnings with MSVC. +Solution: Add type casts. (Mike Williams) +Files: src/ex_cmds2.c, src/netbeans.c + +Patch 7.1.233 +Problem: Crash when doing Insert mode completion for a user defined + command. (Yegappan Lakshmanan) +Solution: Don't use the non-existing command line. +Files: src/ex_getln.c + +Patch 7.1.234 +Problem: When diff'ing three files the third one isn't displayed correctly. + (Gary Johnson) +Solution: Compute the size of diff blocks correctly when merging blocks. + Compute filler lines correctly when scrolling. +Files: src/diff.c + +Patch 7.1.235 +Problem: Pattern matching is slow when using a lot of simple patterns. +Solution: Avoid allocating memory by not freeing it when it's not so much. + (Alexei Alexandrov) +Files: src/regexp.c + +Patch 7.1.236 +Problem: When using 'incsearch' and 'hlsearch' a complicated pattern may + make Vim hang until CTRL-C is pressed. +Solution: Add the 'redrawtime' option. +Files: runtime/doc/options.txt, src/ex_cmds.c, src/ex_docmd.c, + src/ex_getln.c, src/gui.c, src/misc1.c, src/normal.c, + src/option.c, src/quickfix.c, src/regexp.c, src/proto/regexp.pro, + src/proto/search.pro, src/search.c, src/screen.c, + src/option.h, src/spell.c, src/structs.h, src/syntax.c, src/tag.c, + src/vim.h + +Patch 7.1.237 +Problem: Compiler warning on an Alpha processor in Motif code. +Solution: Change a typecast. (Adri Verhoef) +Files: src/gui_motif.c + +Patch 7.1.238 +Problem: Using the 'c' flag with searchpair() may cause it to fail. Using + the 'r' flag doesn't work when 'wrapscan' is set. (A.Politz) +Solution: Only use the 'c' flag for the first search, not for repeating. + When using 'r' imply 'W'. (Antony Scriven) +Files: src/eval.c + +Patch 7.1.239 (after 7.1.233) +Problem: Compiler warning for sprintf() argument. +Solution: Add a typecast. (Nico Weber) +Files: src/ex_getln.c + +Patch 7.1.240 +Problem: When "gUe" turns a German sharp s into SS the operation stops + before the end of the word. Latin2 has the same sharp s but it's + not changed to SS there. +Solution: Make sure all the characters are operated upon. Detect the sharp + s in latin2. Also fixes that changing case of a multi-byte + character that changes the byte count doesn't always work. +Files: src/ops.c + +Patch 7.1.241 +Problem: Focus change events not always ignored. (Erik Falor) +Solution: Ignore K_IGNORE in Insert mode in a few more places. +Files: src/edit.c + +Patch 7.1.242 (after 7.1.005) +Problem: "cib" doesn't work properly on "(x)". (Tim Pope) +Solution: Use ltoreq() instead of lt(). Also fix "ciT" on "<a>x</a>". +Files: src/search.c + +Patch 7.1.243 (after 7.1.240) +Problem: "U" doesn't work on all text in Visual mode. (Adri Verhoef) +Solution: Loop over all the lines to be changed. Add tests for this. +Files: src/ops.c, src/testdir/test39.in, src/testdir/test39.ok + +Patch 7.1.244 +Problem: GUI may have part of the command line cut off. +Solution: Don't round the number of lines up, always round down. + (Tony Houghton, Scott Dillard) +Files: src/gui.c + +Patch 7.1.245 +Problem: Pressing CTRL-\ three times causes Vim to quit. (Ranganath Rao). + Also for f CTRL-\ CTRL-\. +Solution: When going to cooked mode in mch_delay() set a flag to ignore + SIGQUIT. +Files: src/os_unix.c + +Patch 7.1.246 +Problem: Configure hangs when the man pager is something strange. (lorien) +Solution: Set MANPAGER and PAGER to "cat". (Micah Cowan) +Files: src/auto/configure, src/configure.in + +Patch 7.1.247 +Problem: When using Netbeans backspacing in Insert mode skips a character + now and then. (Ankit Jain) +Solution: Avoid calling netbeans_removed(), it frees the line pointer. + (partly by Dominique Pelle). +Files: src/misc1.c + +Patch 7.1.248 +Problem: Can't set the '" mark. Can't know if setpos() was successful. +Solution: Allow setting the '" mark with setpos(). Have setpos() return a + value indicating success/failure. +Files: runtime/doc/eval.txt, src/eval.c, src/mark.c + +Patch 7.1.249 +Problem: After "U" the cursor can be past end of line. (Adri Verhoef) +Solution: Adjust the cursor position in u_undoline(). +Files: src/undo.c + +Patch 7.1.250 +Problem: ":setglobal fenc=anything" gives an error message in a buffer + where 'modifiable' is off. (Ben Schmidt) +Solution: Don't give an error if 'modifiable' doesn't matter. +Files: src/option.c + +Patch 7.1.251 +Problem: Using freed memory when spell checking enabled. +Solution: Obtain the current line again after calling spell_move_to(). + (Dominique Pelle) +Files: src/screen.c + +Patch 7.1.252 (after 7.1.243) +Problem: Test 39 fails when the environment has a utf-8 locale. (Dominique + Pelle) +Solution: Force 'encoding' to be latin1. +Files: src/testdir/test39.in + +Patch 7.1.253 +Problem: ":sort" doesn't work in a one line file. (Patrick Texier) +Solution: Don't sort if there is only one line. (Dominique Pelle) +Files: src/ex_cmds.c + +Patch 7.1.254 +Problem: Tests 49 and 55 fail when the locale is French. +Solution: Using C messages for test 49. Filter the error message in test 55 + such that it works when the number is halfway the message. +Files: src/testdir/test49.in, src/testdir/test55.in + +Patch 7.1.255 +Problem: Vim doesn't support utf-32. (Yongwei Wu) +Solution: Add aliases for utf-32, it's the same as ucs-4. +Files: src/mbyte.c + +Patch 7.1.256 +Problem: findfile() also returns directories. +Solution: Cleanup the code for finding files and directories in a list of + directories. Remove the ugly global ff_search_ctx. +Files: src/eval.c, src/misc2.c, src/vim.h, src/tag.c + +Patch 7.1.257 +Problem: Configure can't always find the Tcl header files. +Solution: Also look in /usr/local/include/tcl$tclver and + /usr/include/tcl$tclver (James Vega) +Files: src/auto/configure, src/configure.in + +Patch 7.1.258 +Problem: Crash when doing "d/\n/e" and 'virtualedit' is "all". (Andy Wokula) +Solution: Avoid that the column becomes negative. Also fixes other problems + with the end of a pattern match is in column zero. (A.Politz) +Files: src/search.c + +Patch 7.1.259 +Problem: Cursor is in the wrong position when 'rightleft' is set, + 'encoding' is "utf-8" and on an illegal byte. (Dominique Pelle) +Solution: Only put the cursor in the first column when actually on a + double-wide character. (Yukihiro Nakadaira) +Files: src/screen.c + +Patch 7.1.260 +Problem: Cursor positioning problem after ^@ wrapping halfway when + 'encoding' is utf-8. +Solution: Only count a position for printable characters. (partly by + Yukihiro Nakadaira) +Files: src/charset.c + +Patch 7.1.261 +Problem: When a 2 byte BOM is detected Vim uses UCS-2, which doesn't work + for UTF-16 text. (Tony Mechelynck) +Solution: Default to UTF-16. +Files: src/fileio.c, src/testdir/test42.ok + +Patch 7.1.262 +Problem: Can't get the process ID of Vim. +Solution: Implement getpid(). +Files: src/eval.c, runtime/doc/eval.txt + +Patch 7.1.263 +Problem: The filetype can consist of two dot separated names. This works + for syntax and ftplugin, but not for indent. (Brett Stahlman) +Solution: Use split() and loop over each dot separated name. +Files: runtime/indent.vim + +Patch 7.1.264 +Problem: Crash when indenting lines. (Dominique Pelle) +Solution: Set the cursor column when changing the cursor line. +Files: src/ops.c, src/misc1.c + +Patch 7.1.265 +Problem: When 'isfname' contains a space, cmdline completion can hang. + (James Vega) +Solution: Reset the "len" variable. +Files: src/ex_docmd.c + +Patch 7.1.266 +Problem: When the version string returned by the terminal contains + unexpected characters, it is used as typed input. (James Vega) +Solution: Assume the escape sequence ends in a letter. +Files: src/term.c + +Patch 7.1.267 +Problem: When changing folds cursor may be positioned in the wrong place. +Solution: Call changed_window_setting_win() instead of + changed_window_setting(). +Files: src/fold.c + +Patch 7.1.268 +Problem: Always shows "+" at end of screen line with: ":set + listchars=eol:$,extends:+ nowrap list cursorline" (Gary Johnson) +Solution: Check for lcs_eol_one instead of lcs_eol. +Files: src/screen.c + +Patch 7.1.269 +Problem: The matchparen plugin has an arbitrary limit for the number of + lines to look for a match. +Solution: Rely on the searchpair() timeout. +Files: runtime/plugin/matchparen.vim + +Patch 7.1.270 +Problem: ":?foo?" matches in current line since patch 7.1.025. (A.Politz) +Solution: Remove the SEARCH_START flag. +Files: src/ex_docmd.c, src/search.c + +Patch 7.1.271 +Problem: In a Vim build without autocommands, checking a file that was + changed externally causes the current buffer to be changed + unexpectedly. (Karsten Hopp) +Solution: Store "curbuf" instead of "buf". +Files: src/fileio.c + +Patch 7.1.272 +Problem: The special buffer name [Location List] is not used for a buffer + displayed in another tab page. +Solution: Use FOR_ALL_TAB_WINDOWS instead of FOR_ALL_WINDOWS. (Hiroaki + Nishihara) +Files: src/buffer.c + +Patch 7.1.273 +Problem: When profiling on Linux Vim exits early. (Liu Yubao) +Solution: When profiling don't exit on SIGPROF. +Files: src/Makefile, src/os_unix.c + +Patch 7.1.274 (after 7.1.272) +Problem: Compiler warning for optimized build. +Solution: Init win to NULL. +Files: src/buffer.c + +Patch 7.1.275 (extra) +Problem: Mac: ATSUI and 'antialias' don't work properly together. +Solution: Fix this and the input method. (Jjgod Jiang) +Files: src/vim.h, src/gui_mac.c + +Patch 7.1.276 +Problem: "gw" uses 'formatexpr', even though the docs say it doesn't. +Solution: Don't use 'formatexpr' for "gw". +Files: src/vim.h, src/edit.c, src/ops.c, src/proto/ops.pro + +Patch 7.1.277 +Problem: Default for 'paragraphs' misses some items (Colin Watson) +Solution: Add TP, HP, Pp, Lp and It to 'paragraphs'. (James Vega) +Files: runtime/doc/options.txt, src/option.c + +Patch 7.1.278 (extra, after 7.1.275) +Problem: Build failure when USE_CARBONKEYHANDLER is not defined. +Solution: Remove #ifdef. +Files: src/gui_mac.c + +Patch 7.1.279 +Problem: When using cscope temporary files are left behind. +Solution: Send the quit command to cscope and give it two seconds to exit + nicely before killing it. (partly by Dominique Pelle) +Files: src/if_cscope.c + +Patch 7.1.280 (after 7.1.275) +Problem: Mac: build problems when not using multibyte feature. (Nicholas + Stallard) +Solution: Don't define USE_IM_CONTROL when not using multibyte. +Files: src/vim.h + +Patch 7.1.281 (after 7.1.279) +Problem: sa.sa_mask is not initialized. Cscope may not exit. +Solution: Use sigemptyset(). Use SIGKILL instead of SIGTERM. (Dominique + Pelle) +Files: src/if_cscope.c + +Patch 7.1.282 (extra) +Problem: Win64: Edit with Vim context menu isn't installed correctly. + Compiler warnings and a few other things. +Solution: Add [ and ] to entry of class name. Use UINT_PTR instead of UINT. + And a fixes for the other things. (George V. Reilly) +Files: src/GvimExt/Makefile, src/dosinst.c, src/if_ole.cpp, src/if_ole.h, + src/if_ole.idl, src/INSTALLpc.txt, src/Make_mvc.mak, + src/os_win32.c, + +Patch 7.1.283 +Problem: Non-extra part for 7.1.282. +Solution: Various changes. +Files: src/ex_docmd.c, src/globals.h, src/if_cscope.c, src/main.c, + src/mark.c, src/netbeans.c, src/popupmnu.c, src/vim.h, + src/window.c + +Patch 7.1.284 +Problem: Compiler warnings for functions without prototype. +Solution: Add the function prototypes. (Patrick Texier) +Files: src/eval.c, src/quickfix.c + +Patch 7.1.285 (extra) +Problem: Mac: dialog hotkeys don't work. +Solution: Add hotkey support. (Dan Sandler) +Files: src/gui_mac.c + +Patch 7.1.286 (after 7.1.103) +Problem: "w" at the end of the buffer moves the cursor past the end of the + line. (Markus Heidelberg) +Solution: Move the cursor back from the NUL when it was moved forward. +Files: src/normal.c + +Patch 7.1.287 +Problem: Crash when reversing a list after using it. (Andy Wokula) +Solution: Update the pointer to the last used element. (Dominique Pelle) +Files: src/eval.c + +Patch 7.1.288 (after 7.1.281) +Problem: Cscope still leaves behind temp files when using gvim. +Solution: When getting the ECHILD error loop for a while until cscope exits. + (Dominique Pelle) +Files: if_cscope.c + +Patch 7.1.289 +Problem: When EXITFREE is defined and 'acd' is set freed memory is used. + (Dominique Pelle) +Solution: Reset p_acd before freeing all buffers. +Files: src/misc2.c + +Patch 7.1.290 +Problem: Reading bytes that were not written when spell checking and a line + has a very large indent. +Solution: Don't copy the start of the next line when it only contains + spaces. (Dominique Pelle) +Files: src/spell.c + +Patch 7.1.291 (after 7.1.288) +Problem: Compiler warning. +Solution: Change 50 to 50L. +Files: src/if_cscope.c + +Patch 7.1.292 +Problem: When using a pattern with "\@<=" the submatches can be wrong. + (Brett Stahlman) +Solution: Save the submatches when attempting a look-behind match. +Files: src/regexp.c + +Patch 7.1.293 +Problem: Spell checking considers super- and subscript characters as word + characters. +Solution: Recognize the Unicode super and subscript characters. +Files: src/spell.c + +Patch 7.1.294 +Problem: Leaking memory when executing a shell command. +Solution: Free memory when not able to save for undo. (Dominique Pelle) +Files: src/ex_cmds.c + +Patch 7.1.295 +Problem: Vimtutor only works with vim, not gvim. +Solution: Add the -g flag to vimtutor. (Dominique Pelle) Add gvimtutor. +Files: src/Makefile, src/gvimtutor, src/vimtutor, runtime/doc/vimtutor.1 + +Patch 7.1.296 +Problem: SELinux is not supported. +Solution: Detect the selinux library and use mch_copy_sec(). (James Vega) +Files: src/auto/configure, src/config.h.in, src/configure.in, + src/fileio.c, src/memfile.c, src/os_unix.c, src/proto/os_unix.pro + +Patch 7.1.297 +Problem: When using the search/replace dialog the parenmatch highlighting + can be wrong. (Tim Duncan) +Solution: In the GUI redraw function invoke the CursorMoved autocmd. +Files: src/gui.c + +Patch 7.1.298 (after 7.1.295) +Problem: src/gvimtutor is not distributed. +Solution: Add it to the list of distributed files. +Files: Filelist + +Patch 7.1.299 +Problem: Filetype detection doesn't work properly for file names ending in + a part that is ignored and contain a space or other special + characters. +Solution: Escape the special characters using the new fnameescape function. +Files: runtime/doc/eval.txt, runtime/filetype.vim, src/eval.c, + src/ex_getln.c, src/proto/ex_getln.pro, src/vim.h + +Patch 7.1.300 +Problem: Value of asmsyntax argument isn't checked for valid characters. +Solution: Only accepts letters and digits. +Files: runtime/filetype.vim + +Patch 7.1.301 +Problem: When the "File/Save" menu is used in Insert mode, a tab page label + is not updated to remove the "+". +Solution: Call draw_tabline() from showruler(). (Bjorn Winckler) +Files: src/screen.c + +Patch 7.1.302 (after 7.1.299) +Problem: Compilation error on MS-Windows. +Solution: Don't use xp_shell when it's not defined. +Files: src/ex_getln.c + +Patch 7.1.303 (after 7.1.302) +Problem: Compilation error on MS-Windows, again. +Solution: Declare p. +Files: src/ex_getln.c + +Patch 7.1.304 +Problem: Shortpath_for_invalid_fname() does not work correctly and is + unnecessary complex. +Solution: Clean up shortpath_for_invalid_fname(). (mostly by Yegappan + Lakshmanan) +Files: src/eval.c + +Patch 7.1.305 +Problem: Editing a compressed file with special characters in the name + doesn't work properly. +Solution: Escape special characters. +Files: runtime/autoload/gzip.vim + +Patch 7.1.306 +Problem: Some Unicode characters are handled like word characters while + they are symbols. +Solution: Adjust the table for Unicode classification. +Files: src/mbyte.c + +Patch 7.1.307 +Problem: Many warnings when compiling with Python 2.5. +Solution: Use ssize_t instead of int for some types. (James Vega) +Files: src/if_python.c + +Patch 7.1.308 +Problem: When in readonly mode ":options" produces an error. +Solution: Reset 'readonly'. (Gary Johnson) +Files: runtime/optwin.vim + +Patch 7.1.309 +Problem: Installing and testing with a shadow directory doesn't work. + (James Vega) +Solution: Add "po" to the list of directories to link. Also link the Vim + scripts in testdir. And a few more small fixes. +Files: src/Makefile + +Patch 7.1.310 +Problem: Incomplete utf-8 byte sequence at end of the file is not detected. + Accessing memory that wasn't written. +Solution: Check the last bytes in the buffer for being a valid utf-8 + character. (mostly by Ben Schmidt) + Also fix that the reported line number of the error was wrong. +Files: src/fileio.c + +Patch 7.1.311 +Problem: Compiler warning for missing sentinel in X code. +Solution: Change 0 to NULL. (Markus Heidelberg) +Files: src/mbyte.c + +Patch 7.1.312 +Problem: The .po files have mistakes in error numbers. +Solution: Search for these mistakes in the check script. (Dominique Pelle) +Files: src/po/check.vim + +Patch 7.1.313 +Problem: When the netbeans interface setModified call is used the status + lines and window title are not updated. +Solution: Redraw the status lines and title. (Philippe Fremy) +Files: src/netbeans.c + +Patch 7.1.314 +Problem: The value of 'pastetoggle' is written to the session file without + any escaping. (Randall Hansen) +Solution: Use put_escstr(). (Ben Schmidt) +Files: src/option.c + +Patch 7.1.315 +Problem: Crash with specific search pattern using look-behind match. + (Andreas Politz) +Solution: Also save the value of "need_clear_subexpr". +Files: src/regexp.c + +Patch 7.1.316 +Problem: When 'cscopetag' is set ":tag" gives an error message instead of + going to the next tag in the tag stack. +Solution: Don't call do_cstag() when there is no argument. (Mark Goldman) +Files: src/ex_docmd.c + +Patch 7.1.317 +Problem: Compiler warnings in Motif calls. +Solution: Change zero to NULL. (Dominique Pelle) +Files: src/gui_motif.c + +Patch 7.1.318 +Problem: Memory leak when closing xsmp connection. Crash on exit when + using Lesstif. +Solution: Don't close the X display to work around a Lesstif bug. Free + clientid. Also fix a leak for Motif and Athena. (Dominique Pelle) +Files: src/gui_x11.c, src/os_unix.c + +Patch 7.1.319 +Problem: When a register has an illegal utf-8 sequence, pasting it on the + command line causes an illegal memory access. +Solution: Use mb_cptr2char_adv(). (Dominique Pelle) +Files: src/ex_getln.c + +Patch 7.1.320 (extra) +Problem: Win64: Warnings while compiling Python interface. +Solution: Use PyInt in more places. Also update version message for the + console. (George Reilly) +Files: src/if_python.c, src/version.c + +Patch 7.1.321 (extra) +Problem: Win32 / Win64: Install file is outdated. +Solution: Update the text for recent compiler. (George Reilly) +Files: src/INSTALLpc.txt + +Patch 7.1.322 +Problem: Can't get start of Visual area in an <expr> mapping. +Solution: Add the 'v' argument to getpos(). +Files: runtime/doc/eval.txt, src/eval.c + +Patch 7.1.323 +Problem: Test 19 fails with some termcaps. (Dominique Pelle) +Solution: Set the t_kb and t_kD termcap values. +Files: src/testdir/test19.in, src/testdir/test38.in + +Patch 7.1.324 +Problem: File name path length on Unix is limited to 1024. +Solution: Use PATH_MAX when it's more than 1000. +Files: src/os_unix.h + +Patch 7.1.325 +Problem: When editing a command line that's longer than available space in + the window, the characters at the end are in reverse order. +Solution: Increment the insert position even when the command line doesn't + fit. (Ingo Karkat) +Files: src/ex_getln.c + +Patch 7.1.326 +Problem: ":s!from!to!" works, but ":smagic!from!to!" doesn't. It sees the + "!" as a flag to the command. Same for ":snomagic". (Johan Spetz) +Solution: When checking for a forced command also ignore ":smagic" and + ":snomagic". (Ian Kelling) +Files: src/ex_docmd.c + +Patch 7.1.327 +Problem: The GUI tutor is installed when there is no GUI version. +Solution: Only install gvimtutor when building a GUI version. +Files: src/Makefile + +Patch 7.1.328 +Problem: Crash when using Cygwin and non-posix path name in tags file. +Solution: Use separate buffer for posix path. (Ben Schmidt) +Files: src/os_unix.c + +Patch 7.1.329 +Problem: When the popup menu is removed a column of cells, the right halve + of double-wide characters, may not be redrawn. +Solution: Check if the right halve of a character needs to be redrawn. + (Yukihiro Nakadaira) +Files: src/screen.c + +Patch 7.1.330 +Problem: Reading uninitialized memory when using Del in replace mode. +Solution: Use utfc_ptr2len_len() instead of mb_ptr2len(). (Dominique Pelle) +Files: src/misc1.c + + +Warning for missing sentinel in gui_xmldlg.c. (Dominique Pelle) + +A search offset from the end of a match didn't work properly for multi-byte +characters. (Yukihiro Nakadaira) + +When displaying the value of 'key' don't show "*****" when the value is empty. +(Ben Schmidt) + +Internal error when compiled with EXITFREE and using the nerd_tree plugin. +Set last_msg_hist to NULL when history becomes empty. Call +free_all_functions() after garbage collection. (Dominique Pelle) + +GTK with XIM: <S-Space> does not work. (Yukihiro Nakadaira) + +Some shells do not support "echo -n", which breaks glob(). Use "echo" instead +of "echo -n $1; echo". (Gary Johnson) + +"echo 22,44" printed "22" on top of the command, the error messages caused +the rest not to be cleared. Added the need_clr_eos flag. + +Netbeans events are handled while updating the screen, causing a crash. +Change the moment when events are handled. Rename nb_parse_messages() to +netbeans_parse_messages(). (Xavier de Gaye) + +Test 11 was broken after patch 7.1.186 on Win32 console. (Daniel Shahaf) +Use shellescape() on the file name. + +IM was turned off in im_preedit_end_cb() for no good reason. (Takuhiro +Nishioka) + +A corrupted spell file could cause Vim to use lots of memory. Better +detection for running into the end of the file. (idea from James Vega) + +Mac: Included a patch to make it build with GTK. Moved language init to +mac_lang_init() function. (Ben Schmidt) + +Problem with 'wildmenu' after ":lcd", up/down arrows don't work. (Erik Falor) + +Fix configure.in to avoid "implicitly declared" warnings when running +configure. + +Fixed a memory leak when redefining a keymap. (Dominique Pelle) + +Setting 'pastetoggle' to "jj" didn't work. + +'ic' and 'smartcase' don't work properly when using \%V in a search pattern. +(Kana Natsuno) + +Patch 7.2a.001 +Problem: On some systems X11/Xlib.h exists (from X11-dev package) but + X11/Intrinsic.h does not (in Xt-dev package). This breaks the + build. Also, on Solaris 9 sys/ptem.h isn't found. +Solution: Have configure only accept X11 when X11/Intrinsic.h exists. + Check for sys/ptem.h while including sys/stream.h. (Vladimir + Marek) +Files: src/auto/configure, src/configure.in + +Patch 7.2a.002 +Problem: getbufvar(N, "") gets the dictionary of the current buffer instead + of buffer N. +Solution: Set curbuf before calling find_var_in_ht(). (Kana Natsuno) +Files: src/eval.c + +Patch 7.2a.003 +Problem: Leaking memory when using ":file name" and using access control + lists. +Solution: Invoke mch_free_acl() in vim_rename(). (Dominique Pelle) +Files: src/fileio.c + +Patch 7.2a.004 +Problem: Some systems can't get spell files by ftp. +Solution: Use http when it looks like it's possible. (James Vega) +Files: runtime/autoload/spellfile.vim + +Patch 7.2a.005 +Problem: A few error messages use confusing names. Misspelling. +Solution: Change "dissallows" to "disallows". (Dominique Pelle) Change + "number" to "Number". +Files: src/eval.c, src/fileio.c + +Patch 7.2a.006 +Problem: Reading past NUL in a string. +Solution: Check for invalid utf-8 byte sequence. (Dominique Pelle) +Files: src/charset.c + +Patch 7.2a.007 +Problem: ":let v = 1.2.3" was OK in Vim 7.1, now it gives an error. +Solution: Don't look for a floating point number after the "." operator. +Files: src/eval.c + +Patch 7.2a.008 +Problem: printf("%g", 1) doesn't work. +Solution: Convert Number to Float when needed. +Files: src/message.c + +Patch 7.2a.009 +Problem: cygwin_conv_to_posix_path() does not specify buffer size. +Solution: Use new Cygwin function: cygwin_conv_path(). (Corinna Vinschen) +Files: src/main.c, src/os_unix.c + +Patch 7.2a.010 +Problem: When a file name has an illegal byte sequence Vim may read + uninitialised memory. +Solution: Don't use UTF_COMPOSINGLIKE() on an illegal byte. In + msg_outtrans_len_attr() use char2cells() instead of ptr2cells(). + In utf_ptr2char() don't check second byte when first byte is + illegal. (Dominique Pelle) +Files: src/mbyte.c, src/message.c + +Patch 7.2a.011 +Problem: The Edit/Startup Settings menu doesn't work. +Solution: Expand environment variables. (Ben Schmidt) +Files: runtime/menu.vim + +Patch 7.2a.012 +Problem: Compiler warnings for casting int to pointer. +Solution: Add cast to long in between. (Martin Toft) +Files: src/gui_gtk_x11.c + +Patch 7.2a.013 +Problem: shellescape() does not escape "%" and "#" characters. +Solution: Add find_cmdline_var() and use it when the second argument to + shellescape() is non-zero. +Files: runtime/doc/eval.txt, src/eval.c, src/ex_docmd.c, + src/proto/ex_docmd.pro, src/proto/misc2.pro, src/misc2.c + +Patch 7.2a.014 +Problem: Problem with % in message. +Solution: Put % in single quotes. +Files: src/eval.c + +Patch 7.2a.015 (after 7.2a.010) +Problem: Misaligned messages. +Solution: Compute length of unprintable chars correctly. +Files: src/message.c + +Patch 7.2a.016 +Problem: Using CTRL-W v in the quickfix window results in two quickfix + windows, which is not allowed. ":tab split" should be allowed to + open a new quickfix window in another tab. +Solution: For CTRL-W v instead of splitting the window open a new one. + When using ":tab" do allow splitting the quickfix window (was + already included in patch 7.2a.013). +Files: src/window.c + +Patch 7.2a.017 +Problem: ":doautoall" executes autocommands for all buffers instead of just + for loaded buffers. +Solution: Change "curbuf" to "buf". +Files: src/fileio.c + +Patch 7.2a.018 +Problem: Compiler warnings when compiling with Gnome. (Tony Mechelynck) +Solution: Add type casts. +Files: src/gui_gtk_x11.c + +Patch 7.2a.019 +Problem: ":let &g:tw = 44" sets the local option value. (Cyril Slobin) +Solution: Use get_varp_scope() instead of get_varp(). (Ian Kelling) +Files: src/option.c + +There is no way to avoid adding /usr/local/{include|lib} to the build +commands. Add the --with-local-dir argument to configure. (Michael +Haubenwallner) + +When using CTRL-D after ":help", the number of matches could be thousands. +Restrict to TAG_MANY to avoid this taking too long. (Ian Kelling) + +The popup menu could be placed at a weird location. Caused by w_wcol computed +by curs_columns(). (Dominique Pelle) + +Overlapping STRCPY() arguments when using %r item in 'errorformat'. Use +STRMOVE() instead. (Ralf Wildenhues) + +Mac: On Leopard gvim, when using the mouse wheel nothing would happen until +another event occurs, such as moving the mouse. Then the recorded scrolling +would take place all at once. (Eckehard Berns) + +Solution for cursor color not reflecting IM status for GTK 2. Add +preedit_is_active flag. (SungHyun Nam) + +filereadable() can hang on a FIFO on Linux. Use open() instead of fopen(), +with O_NONBLOCK. (suggested by Lars Kotthoff) + +Included patch to support Perl 5.10. (Yasuhiro Matsumoto) + +When files are dropped on gvim while the screen is being updated, ignore the +drop command to avoid freeing memory that is being used. + +In a terminal, when drawing the popup menu over double-wide characters, half +characters may not be cleared properly. (Yukihiro Nakadaira) + +The #ifdef for including "vimio.h" was inconsistent. In a few files it +depended on MSWIN, which isn't defined until later. + +Patch 7.2b.001 +Problem: Compilation problem: mb_fix_col() missing with multi-byte feature + but without GUI or clipboard. +Solution: Remove #ifdef. +Files: src/mbyte.c + +Patch 7.2b.002 +Problem: Compiler warnings for signed/unsigned mismatch. +Solution: Add type casts. +Files: src/screen.c + +Patch 7.2b.003 +Problem: Still a compilation problem, check_col() and check_row() missing. +Solution: Add FEAT_MBYTE to the #if. +Files: src/ui.c + +Patch 7.2b.004 +Problem: Trying to free memory for a static string when using ":helpgrep". + (George Reilly) +Solution: Set 'cpo' to empty_option instead of an empty string. Also for + searchpair() and substitute(). +Files: src/quickfix.c, src/eval.c + +Patch 7.2b.005 +Problem: The special character "!" isn't handled properly in shellescape(). + (Jan Minar) +Solution: Escape "!" when using a "csh" like shell and with + shellescape(s, 1). Twice for both. Also escape <NL>. +Files: src/misc2.c + +Patch 7.2b.006 +Problem: Reading past end of string when reading info from tags line. +Solution: Break the loop when encountering a NUL. (Dominique Pelle) +Files: src/tag.c + +Patch 7.2b.007 +Problem: Part of a message cannot be translated. +Solution: Put _() around the message. +Files: src/search.c + +Patch 7.2b.008 +Problem: A few filetypes are not detected or not detected properly. +Solution: Add filetype detection patterns. (Nikolai Weibull) +Files: runtime/filetype.vim + +Patch 7.2b.009 +Problem: Reading past end of screen line. (Epicurus) +Solution: Avoid going past the value of Columns. +Files: src/screen.c + +Patch 7.2b.010 +Problem: ":mksession" doesn't work for ":map , foo", ":sunmap ,". (Ethan + Mallove) +Solution: Check for "nxo", "nso" and other strange mapping combinations. +Files: src/getchar.c + +Patch 7.2b.011 +Problem: Configure for TCL ends up with include file in compiler command. + (Richard Hogg) +Solution: Delete items from $TCL_DEFS that do not start with a dash. +Files: src/auto/configure, src/configure.in + +Patch 7.2b.012 +Problem: Build failure with +multi_byte but without +diff. +Solution: Add #ifdef. (Patrick Texier) +Files: src/main.c + +Patch 7.2b.013 +Problem: Build fails with tiny features and Perl. (Dominique Pelle) +Solution: Define missing functions. Also when compiling Python. +Files: src/if_perl.xs, src/if_python.c + +Patch 7.2b.014 +Problem: Configure uses an unsafe temp file to store commands. +Solution: Create the temp file in local directory. +Files: src/auto/configure, src/configure.in + +Patch 7.2b.015 +Problem: Build fails on Mac when using Aap. +Solution: Fix typo in configure script. +Files: src/auto/configure, src/configure.in + +Patch 7.2b.016 +Problem: Build fails with normal features but without +autocmd. +Solution: Fix #ifdefs. (Ian Kelling) +Files: src/eval.c, src/ex_cmds.c, src/quickfix.c, src/option.c, + src/ex_docmd.c + +Patch 7.2b.017 +Problem: "vim -O foo foo" results in only one window. (Zdenek Sekera) +Solution: Handle result of ATTENTION prompt properly. (Ian Kelling) +Files: src/main.c + +Patch 7.2b.018 +Problem: When doing command line completion on a file name for a csh-like + shell argument a '!' character isn't escaped properly. +Solution: Add another backslash. +Files: src/ex_getln.c, src/misc2.c, src/proto/misc2.pro, src/screen.c + +Patch 7.2b.019 (extra) +Problem: Win32: Various compiler warnings. +Solution: Use __w64 attribute. Comment-out unused parameters. Adjust a few + #ifdefs. (George Reilly) +Files: src/gui_w48.c, src/GvimExt/gvimext.cpp, src/Make_mvc.mak, + src/os_mswin.c, src/os_win32.c, src/vim.h + +Patch 7.2b.020 +Problem: ":sort n" doesn't handle negative numbers. (James Vega) +Solution: Include '-' in the number. +Files: src/charset.c, src/ex_cmds.c + +Patch 7.2b.021 +Problem: Reloading doesn't read the BOM correctly. (Steve Gardner) +Solution: Accept utf-8 BOM when specified file encoding is utf-8. +Files: src/fileio.c + +Patch 7.2b.022 +Problem: When using ":normal" while updating the status line the count of + an operator is lost. (Dominique Pelle) +Solution: Save and restore "opcount". +Files: src/ex_docmd.c, src/globals.h, src/normal.c + +Patch 7.2b.023 +Problem: Crash when using the result of synstack(0,0). (Matt Wozniski) +Solution: Check for v_list to be NULL in a few more places. +Files: src/eval.c + +Patch 7.2b.024 +Problem: Using ":gui" while the netrw plugin is active causes a delay in + updating the display. +Solution: Don't check for terminal codes when starting the GUI. +Files: src/term.c + +Patch 7.2b.025 +Problem: When the CursorHold event triggers a pending count is lost. + (Juergen Kraemer) +Solution: Save the counts and restore them. +Files: src/normal.c, src/structs.h + +Patch 7.2b.026 +Problem: The GTK 2 file chooser causes the ~/.recently-used.xbel file to be + written over and over again. This may cause a significant + slowdown. (Guido Berhoerster) +Solution: Don't use the GTK 2 file chooser. +Files: src/gui_gtk.c + +Patch 7.2b.027 +Problem: Memory leak for Python, Perl, etc. script command with end marker. +Solution: Free the memory of the end marker. (Andy Kittner) +Files: src/ex_getln.c + +Patch 7.2b.028 +Problem: Reading uninitialized memory when doing ":gui -f". (Dominique + Pelle) +Solution: Don't position the cursor when the screen size is invalid. +Files: src/gui.c + +Patch 7.2b.029 +Problem: ":help a" doesn't jump to "a" tag in docs. (Tony Mechelynck) +Solution: Get all tags and throw away more than TAG_MANY after sorting. + When there is no argument find matches for "help" to avoid a long + delay. +Files: src/ex_cmds.c, src/ex_getln.c + +Patch 7.2b.030 +Problem: When changing the value of t_Co from 8 to 16 the Visual + highlighting keeps both reverse and a background color. +Solution: Remove the attribute when setting the default highlight color. + (Markus Heidelberg) +Files: src/syntax.c + +Error when cancelling completion menu and auto-formatting. (fixed by Ian +Kelling) + +Patch 7.2c.001 +Problem: ":let x=[''] | let x += x" causes hang. (Matt Wozniski) +Solution: Only insert elements up to the original length of the List. +Files: runtime/doc/eval.txt, src/eval.c + +Patch 7.2c.002 +Problem: fnameescape() doesn't handle a leading '+' or '>'. (Jan Minar) +Solution: Escape a leading '+' and '>'. And a single '-'. +Files: runtime/doc/eval.txt, src/ex_getln.c + +Patch 7.2c.003 +Problem: Searching for "foo\%[bar]\+" gives a "Corrupted regexp program" + error. (Joachim Hofmann) +Solution: Mark the \%[] item as not being simple. +Files: src/regexp.c + +On Vista access to system directories is virtualized. (Michael Mutschler) +Adjusted the manifest file to avoid this. (George Reilly) + +Memory leak when using CTRL-C to cancel listing the jump list. (Dominique +Pelle) + +Mac: Could not build with Perl interface. + +============================================================================== +VERSION 7.3 *version-7.3* *version7.3* + +This section is about improvements made between version 7.2 and 7.3. + +This release has hundreds of bug fixes and there are a few new features. The +most notable new features are: + + +Persistent undo *new-persistent-undo* +--------------- + +Store undo information in a file. Can undo to before when the file was read, +also for unloaded buffers. See |undo-persistence| (partly by Jordan Lewis) + +Added the ":earlier 1f" and ":later 1f" commands. +Added file save counter to undo information. +Added the |undotree()| and |undofile()| functions. + +Also added the 'undoreload' option. This makes it possible to save the +current text when reloading the buffer, so that the reload can be undone. + + +More encryption *new-more-encryption* +--------------- + +Support for Blowfish encryption. Added the 'cryptmethod' option. +Mostly by Mohsin Ahmed. + +Also encrypt the text in the swap file and the undo file. + + +Conceal text *new-conceal* +------------ + +Added the |+conceal| feature. (Vince Negri) +This allows hiding stretches of text, based on syntax highlighting. +It also allows replacing a stretch of text by a character |:syn-cchar|. +The 'conceallevel' option specifies what happens with text matching a syntax +item that has the conceal attribute. +The 'concealcursor' option specifies what happens in the cursor line. + +The help files conceal characters used to mark tags and examples. + +Added the |synconcealed()| function and use it for :TOhtml. (Benjamin Fritz) + +Added the 'cursorbind' option, keeps the cursor in two windows with the same +text in sync. + + +Lua interface *new-lua* +------------- + +Added the |Lua| interface. (Luis Carvalho) + + +Python3 interface *new-python3* +----------------- + +Added the Python3 interface. It exists next to Python 2.x, both can be used +at the same time. See |python3| (Roland Puntaier) + + +Changed *changed-7.3* +------- + +The MS-Windows installer no longer requires the user to type anything in the +console windows. The installer now also works on 64 bit systems, including +the "Edit with Vim" context menu. +The gvim executable is 32 bits, the installed gvimext.dll is either a 32 or 64 +bit version. (mostly by George Reilly) +Made the DOS installer work with more compilers. +The MS-Windows big gvim is now built with Python 2.7 and 3.1.2, Perl 5.12 and +Ruby 1.9.1. You need the matching .dll files to use them. + +The extra and language files are no longer distributed separately. +The source files for all systems are included in one distribution. + +After using ":recover" or recovering a file in another way, ":x" and "ZZ" +didn't save what you see. This could result in work being lost. Now the text +after recovery is compared to the original file contents. When they differ +the buffer is marked as modified. + +When Vim is exiting because of a deadly signal, when v:dying is 2 or more, +VimLeavePre, VimLeave, BufWinLeave and BufUnload autocommands are not +executed. + +Removed support for GTK 1. It was no longer maintained and required a lot of +#ifdefs in the source code. GTK 2 should be available for every system. +(James Vega) + +It is no longer allowed to set the 'encoding' option from a modeline. It +would corrupt the text. (Patrick Texier) + +Renamed runtime/spell/fixdup to runtime/spell/fixdup.vim. + +Removed obsolete Mac code. + +Updated spell files for Ubuntu locale names. + +Switched from autoconf 2.63 to 2.65. + +Removed Mupad indent and ftplugin files, they are not useful. + +The maximum number of messages remembered in the history is now 200 (was 100). + + +Added *added-7.3* +----- + +Added the 'relativenumber' option. (Markus Heidelberg) + +Added the 'colorcolumn' option: highlight one or more columns in a window. +E.g. to highlight the column after 'textwidth'. (partly by Gregor Uhlenheuer) + +Added support for NetBeans in a terminal. Added |:nbstart| and |:nbclose|. +(Xavier de Gaye) + +More floating point functions: |acos()|, |asin()|, |atan2()|, |cosh()|, +|exp()|, |fmod()|, |log()|, |sinh()|, |tan()|, |tanh()|. (Bill McCarthy) + +Added the |gettabvar()| and |settabvar()| functions. (Yegappan Lakshmanan) + +Added the |strchars()|, |strwidth()| and |strdisplaywidth()| functions. + +Support GDK_SUPER_MASK for GTK on Mac. (Stephan Schulz) + +Made CTRL and ALT modifier work for mouse wheel. (Benjamin Haskell) + +Added support for horizontal scroll wheel. (Bjorn Winckler) + +When the buffer is in diff mode, have :TOhtml create HTML to show the diff +side-by-side. (Christian Brabandt) + +Various improvements to ":TOhtml" and the 2html.vim script. (Benjamin Fritz) + +Add the 'L' item to 'cinoptions'. (Manuel Konig) + +Improve Javascript indenting. Add "J" flag to 'cinoptions'. (Hari Kumar G) + +Mac: Support disabling antialias. (LC Mi) + +Mac: Add clipboard support in the Mac console. (Bjorn Winckler) + +Make it possible to drag a tab page label to another position. (Paul B. Mahol) + +Better implementation of creating the Color Scheme menu. (Juergen Kraemer) + +In Visual mode with 'showcmd' display the number of bytes and characters. + +Allow synIDattr() getting GUI attributes when built without GUI. (Matt +Wozniski) + +Support completion for ":find". Added test 73. (Nazri Ramliy) + +Command line completion for :ownsyntax and :setfiletype. (Dominique Pelle) + +Command line completion for :lmap and :lunmap. + +Support syntax and filetype completion for user commands. (Christian Brabandt) + +Avoid use of the GTK main_loop() so that the GtkFileChooser can be used. +(James Vega) + +When 'formatexpr' evaluates to non-zero fall back to internal formatting, also +for "gq". (James Vega) + +Support :browse for commands that use an error file argument. (Lech Lorens) + +Support wide file names in gvimext. (Szabolcs Horvat) + +Improve test for joining lines. (Milan Vancura) +Make joining a range of lines much faster. (Milan Vancura) + +Add patch to improve support of z/OS (OS/390). (Ralf Schandl) + +Added the helphelp.txt file. Moved text from various.txt to it. + +Added "q" item for 'statusline'. Added |w:quickfix_title|. (Lech Lorens) + +Various improvements for VMS. (Zoltan Arpadffy) + + +New syntax files: ~ +Haskell Cabal build file (Vincent Berthoux) +ChaiScript (Jason Turner) +Cucumber (Tim Pope) +Datascript (Dominique Pelle) +Fantom (Kamil Toman) +Liquid (Tim Pope) +Markdown (Tim Pope) +wavefront's obj file (Vincent Berthoux) +Perl 6 (Andy Lester) +SDC - Synopsys Design Constraints (Maurizio Tranchero) +SVG - Scalable Vector Graphics (Vincent Berthoux) +task data (John Florian) +task 42 edit (John Florian) + +New filetype plugins: ~ +Cucumber (Tim Pope) +Liquid (Tim Pope) +Logcheck (Debian) +Markdown (Tim Pope) +Perl 6 (Andy Lester) +Quickfix window (Lech Lorens) +Tcl (Robert L Hicks) + +New indent plugins: ~ +CUDA (Bram Moolenaar) +ChaiScript (Jason Turner) +Cucumber (Tim Pope) +LifeLines (Patrick Texier) +Liquid (Tim Pope) +Mail (Bram Moolenaar) +Perl 6 (Andy Lester) + +Other new runtime files: ~ +Breton spell file (Dominique Pelle) +Dvorak keymap (Ashish Shukla) +Korean translations. (SungHyun Nam) +Python 3 completion (Aaron Griffin) +Serbian menu translations (Aleksandar Jelenak) +Tetum spell files +Tutor Bairish (Sepp Hell) +Tutor in Esperanto. (Dominique Pellé) +Tutor in Portuguese. +Norwegian Tutor now also available as tutor.nb + +Removed the Mupad runtime files, they were not maintained. + + +Fixed *fixed-7.3* +----- + +Patch 7.2.001 +Problem: Mac: pseudo-ttys don't work properly on Leopard, resulting in the + shell not to have a prompt, CTRL-C not working, etc. +Solution: Don't use SVR4 compatible ptys, even though they are detected. + (Ben Schmidt) +Files: src/pty.c + +Patch 7.2.002 +Problem: Leaking memory when displaying menus. +Solution: Free allocated memory. (Dominique Pelle) +Files: src/menu.c + +Patch 7.2.003 +Problem: Typo in translated message. Message not translated. +Solution: Correct spelling. Add _(). (Dominique Pelle) +Files: src/spell.c, src/version.c + +Patch 7.2.004 +Problem: Cscope help message is not translated. +Solution: Put it in _(). (Dominique Pelle) +Files: src/if_cscope.c, src/if_cscope.h + +Patch 7.2.005 +Problem: A few problems when profiling. Using flag pointer instead of flag + value. Allocating zero bytes. Not freeing used memory. +Solution: Remove wrong '&' characters. Skip dumping when there is nothing + to dump. Free used memory. (Dominique Pelle) +Files: src/eval.c + +Patch 7.2.006 +Problem: HTML files are not recognized by contents. +Solution: Add a rule to the scripts file. (Nico Weber) +Files: runtime/scripts.vim + +Patch 7.2.007 (extra) +Problem: Minor issues for VMS. +Solution: Minor fixes for VMS. Add float support. (Zoltan Arpadffy) +Files: runtime/doc/os_vms.txt, src/os_vms_conf.h, src/Make_vms.mms, + src/testdir/Make_vms.mms, src/testdir/test30.in, + src/testdir/test54.in + +Patch 7.2.008 +Problem: With a BufHidden autocommand that invokes ":bunload" the window + count for a buffer can be wrong. (Bob Hiestand) +Solution: Don't call enter_buffer() when already in that buffer. +Files: src/buffer.c + +Patch 7.2.009 +Problem: Can't compile with Perl 5.10 on MS-Windows. (Cesar Romani) +Solution: Add the Perl_sv_free2 function for dynamic loading. (Dan Sharp) +Files: src/if_perl.xs + +Patch 7.2.010 +Problem: When using "K" in Visual mode not all characters are properly + escaped. (Ben Schmidt) +Solution: Use a function with the functionality of shellescape(). (Jan + Minar) +Files: src/mbyte.c, src/misc2.c, src/normal.c + +Patch 7.2.011 +Problem: Get an error when inserting a float value from the expression + register. +Solution: Convert the Float to a String automatically in the same place + where a List would be converted to a String. +Files: src/eval.c + +Patch 7.2.012 +Problem: Compiler warnings when building with startup timing. +Solution: Add type casts. +Files: src/ex_cmds2.c + +Patch 7.2.013 +Problem: While waiting for the X selection Vim consumes a lot of CPU time + and hangs until a response is received. +Solution: Sleep a bit when the selection event hasn't been received yet. + Time out after a couple of seconds to avoid a hang when the + selection owner isn't responding. +Files: src/ui.c + +Patch 7.2.014 +Problem: synstack() doesn't work in an empty line. +Solution: Accept column zero as a valid position. +Files: src/eval.c + +Patch 7.2.015 +Problem: "make all test install" doesn't stop when the test fails. (Daniel + Shahaf) +Solution: When test.log contains failures exit with non-zero status. +Files: src/testdir/Makefile + +Patch 7.2.016 +Problem: The pattern being completed may be in freed memory when the + command line is being reallocated. (Dominique Pelle) +Solution: Keep a pointer to the expand_T in the command line structure. + Don't use <S-Tab> as CTRL-P when there are no results. Clear the + completion when using a command line from the history. +Files: src/ex_getln.c + +Patch 7.2.017 +Problem: strlen() used on text that may not end in a NUL. (Dominique Pelle) + Pasting a very big selection doesn't work. +Solution: Use the length passed to the XtSelectionCallbackProc() function. + After getting the SelectionNotify event continue dispatching + events until the callback is actually called. Also dispatch the + PropertyNotify event. +Files: src/ui.c + +Patch 7.2.018 +Problem: Memory leak when substitute is aborted. +Solution: Free the buffer allocated for the new text. (Dominique Pelle) +Files: src/ex_cmds.c + +Patch 7.2.019 +Problem: Completion of ":noautocmd" doesn't work and exists(":noautocmd") + returns zero. (Ben Fritz) +Solution: Add "noautocmd" to the list of modifiers and commands. +Files: src/ex_cmds.h, src/ex_docmd.c + +Patch 7.2.020 +Problem: Starting the GUI when the executable starts with 'k', but the KDE + version no longer exists. +Solution: Don't have "kvim" start the GUI. +Files: src/main.c + +Patch 7.2.021 +Problem: When executing autocommands getting the full file name may be + slow. (David Kotchan) +Solution: Postpone calling FullName_save() until autocmd_fname is used. +Files: src/ex_docmd.c, src/fileio.c, src/globals.h + +Patch 7.2.022 (extra) +Problem: Testing is not possible when compiling with MingW. +Solution: Add a MingW specific test Makefile. (Bill McCarthy) +Files: Filelist, src/testdir/Make_ming.mak + +Patch 7.2.023 +Problem: 'cursorcolumn' is in the wrong place in a closed fold when the + display is shifted left. (Gary Johnson) +Solution: Subtract w_skipcol or w_leftcol when needed. +Files: src/screen.c + +Patch 7.2.024 +Problem: It's possible to set 'history' to a negative value and that causes + an out-of-memory error. +Solution: Check that 'history' has a positive value. (Doug Kearns) +Files: src/option.c + +Patch 7.2.025 +Problem: When a CursorHold event invokes system() it is retriggered over + and over again. +Solution: Don't reset did_cursorhold when getting K_IGNORE. +Files: src/normal.c + +Patch 7.2.026 (after 7.2.010) +Problem: "K" doesn't use the length of the identifier but uses the rest of + the line. +Solution: Copy the desired number of characters first. +Files: src/normal.c + +Patch 7.2.027 +Problem: Can use cscope commands in the sandbox. +Solution: Disallow them, they might not be safe. +Files: src/ex_cmds.h + +Patch 7.2.028 +Problem: Confusing error message for missing (). +Solution: Change "braces" to "parentheses". (Gary Johnson) +Files: src/eval.c + +Patch 7.2.029 +Problem: No completion for ":doautoall". +Solution: Complete ":doautoall" like ":doautocmd". (Doug Kearns) +Files: src/ex_docmd.c + +Patch 7.2.030 (after 7.2.027) +Problem: Can't compile. +Solution: Remove prematurely added ex_oldfiles. +Files: src/ex_cmds.h + +Patch 7.2.031 +Problem: Information in the viminfo file about previously edited files is + not available to the user. There is no way to get a complete list + of files edited in previous Vim sessions. +Solution: Add v:oldfiles and fill it with the list of old file names when + first reading the viminfo file. Add the ":oldfiles" command, + ":browse oldfiles" and the "#<123" special file name. Increase + the default value for 'viminfo' from '20 to '100. +Files: runtime/doc/cmdline.txt, runtime/doc/eval.txt, + runtime/doc/starting.txt, runtime/doc/usr_21.txt, src/eval.c, + src/ex_cmds.c, src/ex_cmds.h, src/ex_docmd.c, src/feature.h, + src/fileio.c, src/main.c, src/mark.c, src/misc1.c, + src/proto/eval.pro, src/proto/ex_cmds.pro, src/proto/mark.pro, + src/option.c, src/structs.h, src/vim.h + +Patch 7.2.032 (after 7.2.031) +Problem: Can't build with EXITFREE defined. (Dominique Pelle) +Solution: Change vv_string to vv_str. +Files: src/eval.c + +Patch 7.2.033 +Problem: When detecting a little endian BOM "ucs-2le" is used, but the text + might be "utf-16le". +Solution: Default to "utf-16le", it also works for "ucs-2le". (Jia Yanwei) +Files: src/fileio.c, src/testdir/test42.ok + +Patch 7.2.034 +Problem: Memory leak in spell info when deleting buffer. +Solution: Free the memory. (Dominique Pelle) +Files: src/buffer.c + +Patch 7.2.035 +Problem: Mismatches between alloc/malloc, free/vim_free, + realloc/vim_realloc. +Solution: Use the right function. (Dominique Pelle) +Files: src/gui_x11.c, src/mbyte.c, src/misc2.c, src/os_unix.c + +Patch 7.2.036 (extra) +Problem: Mismatches between alloc/malloc, free/vim_free, + realloc/vim_realloc. +Solution: Use the right function. (Dominique Pelle) +Files: src/gui_riscos.c, src/gui_w48.c, src/mbyte.c, src/os_vms.c, + src/os_w32exe.c, src/os_win16.c + +Patch 7.2.037 +Problem: Double free with GTK 1 and compiled with EXITFREE. +Solution: Don't close display. (Dominique Pelle) +Files: src/os_unix.c + +Patch 7.2.038 +Problem: Overlapping arguments to memcpy(). +Solution: Use mch_memmove(). (Dominique Pelle) +Files: src/if_xcmdsrv.c + +Patch 7.2.039 +Problem: Accessing freed memory on exit when EXITFREE is defined. +Solution: Call hash_init() on the v: hash table. +Files: src/eval.c + +Patch 7.2.040 +Problem: When using ":e ++ff=dos fname" and the file contains a NL without + a CR before it and 'ffs' contains "unix" then the fileformat + becomes unix. +Solution: Ignore 'ffs' when using the ++ff argument. (Ben Schmidt) + Also remove unreachable code. +Files: src/fileio.c + +Patch 7.2.041 +Problem: In diff mode, when using two tabs, each with two diffed buffers, + editing a buffer of the other tab messes up the diff. (Matt + Mzyzik) +Solution: Only copy options from a window where the buffer was edited that + doesn't have 'diff' set or is for the current tab page. + Also fix that window options for a buffer are stored with the + wrong window. +Files: src/buffer.c, src/ex_cmds.c, src/ex_cmds2.c, src/ex_docmd.c, + src/ex_getln.c, src/if_sniff.c, src/main.c, src/netbeans.c, + src/normal.c, src/popupmnu.c, src/proto/buffer.pro, + src/proto/ex_cmds.pro src/quickfix.c, src/window.c + +Patch 7.2.042 +Problem: When using winrestview() in a BufWinEnter autocommand the window + is scrolled anyway. (Matt Zyzik) +Solution: Don't recompute topline when above 'scrolloff' from the bottom. + Don't always put the cursor halfway when entering a buffer. Add + "w_topline_was_set". +Files: src/buffer.c, src/move.c, src/structs.h + +Patch 7.2.043 +Problem: VMS: Too many characters are escaped in filename and shell + commands. +Solution: Escape fewer characters. (Zoltan Arpadffy) +Files: src/vim.h + +Patch 7.2.044 +Problem: Crash because of STRCPY() being over protective of the destination + size. (Dominique Pelle) +Solution: Add -D_FORTIFY_SOURCE=1 to CFLAGS. Use an intermediate variable + for the pointer to avoid a warning. +Files: src/auto/configure, src/configure.in, src/eval.c + +Patch 7.2.045 +Problem: The Python interface has an empty entry in sys.path. +Solution: Filter out the empty entry. (idea from James Vega) +Files: src/if_python.c + +Patch 7.2.046 +Problem: Wrong check for filling buffer with encoding. (Danek Duvall) +Solution: Remove pointers. (Dominique Pelle) +Files: src/mbyte.c + +Patch 7.2.047 +Problem: Starting Vim with the -nb argument while it's not supported causes + the other side to hang. +Solution: When -nb is used while it's not supported exit Vim. (Xavier de + Gaye) +Files: src/main.c, src/vim.h + +Patch 7.2.048 +Problem: v:prevcount is changed too often. Counts are not multiplied when + setting v:count. +Solution: Set v:prevcount properly. Multiply counts. (idea by Ben Schmidt) +Files: src/eval.c, src/normal.c, src/proto/eval.pro + +Patch 7.2.049 (extra) +Problem: Win32: the clipboard doesn't support UTF-16. +Solution: Change UCS-2 support to UTF-16 support. (Jia Yanwei) +Files: src/gui_w32.c, src/gui_w48.c, src/mbyte.c, src/misc1.c, + src/os_mswin.c, src/os_win32.c, src/proto/os_mswin.pro + +Patch 7.2.050 +Problem: Warnings for not checking return value of fwrite(). (Chip Campbell) +Solution: Use the return value. +Files: src/spell.c + +Patch 7.2.051 +Problem: Can't avoid 'wildignore' and 'suffixes' for glob() and globpath(). +Solution: Add an extra argument to these functions. (Ingo Karkat) +Files: src/eval.c, src/ex_getln.c, src/proto/ex_getln.pro, + runtime/doc/eval.txt, runtime/doc/options.txt + +Patch 7.2.052 +Problem: synIDattr() doesn't support "sp" for special color. +Solution: Recognize "sp" and "sp#". (Matt Wozniski) +Files: runtime/doc/eval.txt, src/eval.c + +Patch 7.2.053 +Problem: Crash when using WorkShop command ":ws foo". (Dominique Pelle) +Solution: Avoid using a NULL pointer. +Files: src/workshop.c + +Patch 7.2.054 +Problem: Compilation warnings for format in getchar.c. +Solution: Use fputs() instead of fprintf(). (Dominique Pelle) +Files: src/getchar.c + +Patch 7.2.055 +Problem: Various compiler warnings with strict checking. +Solution: Avoid the warnings by using return values and renaming. +Files: src/diff.c, src/eval.c, src/ex_cmds.c, src/ex_docmd.c, + src/fileio.c, src/fold.c, src/globals.h, src/gui.c, + src/gui_at_sb.c, src/gui_gtk_x11.c, src/gui_xmdlg.c, + src/gui_xmebw.c, src/main.c, src/mbyte.c, src/message.c, + src/netbeans.c, src/option.c, src/os_unix.c, src/spell.c, + src/ui.c, src/window.c + +Patch 7.2.056 (after 7.2.050) +Problem: Tests 58 and 59 fail. +Solution: Don't invoke fwrite() with a zero length. (Dominique Pelle) +Files: src/spell.c + +Patch 7.2.057 (after 7.2.056) +Problem: Combination of int and size_t may not work. +Solution: Use size_t for variable. +Files: src/spell.c + +Patch 7.2.058 +Problem: Can't add a patch name to the ":version" output. +Solution: Add the extra_patches array. +Files: src/version.c + +Patch 7.2.059 +Problem: Diff display is not always updated. +Solution: Update the display more often. +Files: src/diff.c + +Patch 7.2.060 +Problem: When a spell files has many compound rules it may take a very long + time making the list of suggestions. Displaying also can be slow + when there are misspelled words. + Can't parse some Hunspell .aff files. +Solution: Check if a compounding can possibly work before trying a + combination, if the compound rules don't contain wildcards. + Implement using CHECKCOMPOUNDPATTERN. + Ignore COMPOUNDRULES. Ignore a comment after most items. + Accept ONLYINCOMPOUND as an alias for NEEDCOMPOUND. + Accept FORBIDDENWORD as an alias for BAD. +Files: runtime/doc/spell.txt, src/spell.c + +Patch 7.2.061 +Problem: Can't create a funcref for an autoload function without loading + the script first. (Marc Weber) +Solution: Accept autoload functions that don't exist yet in function(). +Files: src/eval.c + +Patch 7.2.062 +Problem: "[Scratch]" is not translated. +Solution: Mark the string for translation. (Dominique Pelle) +Files: src/buffer.c + +Patch 7.2.063 +Problem: Warning for NULL argument of Perl_sys_init3(). +Solution: Use Perl_sys_init() instead. (partly by Dominique Pelle) +Files: src/if_perl.xs + +Patch 7.2.064 +Problem: Screen update bug when repeating "~" on a Visual block and the + last line doesn't change. +Solution: Keep track of changes for all lines. (Moritz Orbach) +Files: src/ops.c + +Patch 7.2.065 +Problem: GTK GUI: the cursor disappears when doing ":vsp" and the Vim + window is maximized. (Dominique Pelle, Denis Smolyar) +Solution: Don't change "Columns" back to an old value at a wrong moment. + Do change "Rows" when it should not be a problem. +Files: src/gui.c + +Patch 7.2.066 +Problem: It's not easy to see whether 'encoding' is a multi-byte encoding. +Solution: Add has('multi_byte_encoding'). +Files: runtime/doc/eval.txt, src/eval.c + +Patch 7.2.067 +Problem: Session file can't load extra file when the path contains special + characters. +Solution: Escape the file name. (Lech Lorens) +Files: src/ex_docmd.c + +Patch 7.2.068 +Problem: Emacs tags file lines can be too long, resulting in an error + message. (James Vega) +Solution: Ignore lines with errors if they are too long. +Files: src/tag.c + +Patch 7.2.069 (after 7.2.060) +Problem: Compiler warning for storing size_t in int. +Solution: Add type cast. +Files: src/spell.c + +Patch 7.2.070 +Problem: Crash when a function returns a:000. (Matt Wozniski) +Solution: Don't put the function struct on the stack, allocate it. Free it + only when nothing in it is used. +Files: src/eval.c + +Patch 7.2.071 (extra) +Problem: Win32: Handling netbeans events while Vim is busy updating the + screen may cause a crash. +Solution: Like with GTK, only handle netbeans messages in the main loop. + (Xavier de Gaye) +Files: src/gui_w48.c, src/netbeans.c + +Patch 7.2.072 (extra) +Problem: Compiler warning in Sniff code. +Solution: Use return value of pipe(). (Dominique Pelle) +Files: src/if_sniff.c + +Patch 7.2.073 +Problem: ":set <xHome>" has the same output as ":set <Home>". (Matt + Wozniski) +Solution: Don't translate "x" keys to its alternative for ":set". +Files: src/gui_mac.c, src/misc2.c, src/option.c, src/proto/misc2.pro + +Patch 7.2.074 (extra, after 7.2.073) +Problem: ":set <xHome>" has the same output as ":set <Home>". (Matt + Wozniski) +Solution: Don't translate "x" keys to its alternative for ":set". +Files: src/gui_mac.c + +Patch 7.2.075 (after 7.2.058) +Problem: Explanation about making a diff for extra_patches is unclear. +Solution: Adjust comment. +Files: src/version.c + +Patch 7.2.076 +Problem: rename(from, to) deletes the file if "from" and "to" are not equal + but still refer to the same file. E.g., on a FAT32 filesystem + under Unix. +Solution: Go through another file name. +Files: src/fileio.c + +Patch 7.2.077 (after 7.2.076) +Problem: rename(from, to) doesn't work if "from" and "to" differ only in + case on a system that ignores case in file names. +Solution: Go through another file name. +Files: src/fileio.c + +Patch 7.2.078 +Problem: When deleting a fold that is specified with markers the cursor + position may be wrong. Folds may not be displayed properly after + a delete. Wrong fold may be deleted. +Solution: Fix the problems. (mostly by Lech Lorens) +Files: src/fold.c + +Patch 7.2.079 +Problem: "killed" netbeans events are not handled correctly. +Solution: A "killed" netbeans event is sent when the buffer is deleted or + wiped out (in this case, the netbeans annotations in this buffer + have been removed). A user can still remove a sign with the + command ":sign unplace" and this does not trigger a "killed" + event. (Xavier de Gaye) +Files: runtime/doc/netbeans.txt, src/buffer.c, src/globals.h, + src/netbeans.c, src/proto/netbeans.pro + +Patch 7.2.080 +Problem: When typing a composing character just after starting completion + may access memory before its allocation point. (Dominique Pelle) +Solution: Don't delete before the completion start column. Add extra checks + for the offset not being negative. +Files: src/edit.c + +Patch 7.2.081 +Problem: Compiler warning for floating point overflow on VAX. +Solution: For VAX use a smaller number. (Zoltan Arpadffy) +Files: src/message.c + +Patch 7.2.082 +Problem: When 'ff' is "mac" then "ga" on a ^J shows 0x0d instead of 0x0a. + (Andy Wokula) +Solution: Use NL for this situation. (Lech Lorens) +Files: src/ex_cmds.c + +Patch 7.2.083 +Problem: ":tag" does not return to the right tag entry from the tag stack. +Solution: Don't change the current match when there is no argument. + (Erik Falor) +Files: src/tag.c + +Patch 7.2.084 +Problem: Recursive structures are not handled properly in Python + vim.eval(). +Solution: Keep track of references in a better way. (Yukihiro Nakadaira) +Files: src/if_python.c + +Patch 7.2.085 +Problem: ":set <M-b>=<Esc>b" does not work when 'encoding' is utf-8. +Solution: Put the <M-b> character in the input buffer as valid utf-8. + (partly by Matt Wozniski) +Files: src/term.c + +Patch 7.2.086 +Problem: Using ":diffget 1" in buffer 1 corrupts the text. +Solution: Don't do anything when source and destination of ":diffget" or + ":diffput" is the same buffer. (Dominique Pelle) +Files: src/diff.c + +Patch 7.2.087 +Problem: Adding URL to 'path' doesn't work to edit a file. +Solution: Skip simplify_filename() for URLs. (Matt Wozniski) +Files: src/misc2.c + +Patch 7.2.088 (extra) +Problem: OpenClipboard() may fail when another application is using the + clipboard. +Solution: Retry OpenClipboard() a few times. (Jianrong Yu) +Files: src/os_mswin.c + +Patch 7.2.089 (extra) +Problem: Win32: crash when using Ultramon buttons. +Solution: Don't use a WM_OLE message of zero size. (Ray Megal) +Files: src/if_ole.cpp, src/gui_w48.c + +Patch 7.2.090 +Problem: User command containing 0x80 in multi-byte character does not work + properly. (Yasuhiro Matsumoto) +Solution: Undo replacement of K_SPECIAL and CSI characters when executing + the command. +Files: src/ex_docmd.c + +Patch 7.2.091 +Problem: ":cs help" output is not aligned for some languages. +Solution: Compute character size instead of byte size. (Dominique Pelle) +Files: src/if_cscope.c + +Patch 7.2.092 +Problem: Some error messages are not translated. +Solution: Add _() around the messages. (Dominique Pelle) +Files: src/eval.c + +Patch 7.2.093 (extra) +Problem: Win32: inputdialog() and find/replace dialogs can't handle + multi-byte text. +Solution: Use the wide version of dialog functions when available. (Yanwei + Jia) +Files: src/gui_w32.c, src/gui_w48.c + +Patch 7.2.094 +Problem: Compiler warning for signed/unsigned compare. +Solution: Add type cast. Also fix a few typos. +Files: src/edit.c + +Patch 7.2.095 +Problem: With Visual selection, "r" and then CTRL-C Visual mode is stopped + but the highlighting is not removed. +Solution: Call reset_VIsual(). +Files: src/normal.c + +Patch 7.2.096 +Problem: After ":number" the "Press Enter" message may be on the wrong + screen, if switching screens for shell commands. +Solution: Reset info_message. (James Vega) +Files: src/ex_cmds.c + +Patch 7.2.097 +Problem: "!xterm&" doesn't work when 'shell' is "bash". +Solution: Ignore SIGHUP after calling setsid(). (Simon Schubert) +Files: src/os_unix.c + +Patch 7.2.098 +Problem: Warning for signed/unsigned pointer. +Solution: Add type cast. +Files: src/eval.c + +Patch 7.2.099 +Problem: Changing GUI options causes an unnecessary redraw when the GUI + isn't active. +Solution: Avoid the redraw. (Lech Lorens) +Files: src/option.c + +Patch 7.2.100 +Problem: When using ":source" on a FIFO or something else that can't rewind + the first three bytes are skipped. +Solution: Instead of rewinding read the first line and detect a BOM in that. + (mostly by James Vega) +Files: src/ex_cmds2.c + +Patch 7.2.101 (extra) +Problem: MSVC version not recognized. +Solution: Add the version number to the list. (Zhong Zhang) +Files: src/Make_mvc.mak + +Patch 7.2.102 (after 7.2.100) +Problem: When 'encoding' is "utf-8" a BOM at the start of a Vim script is + not removed. (Tony Mechelynck) +Solution: When no conversion is taking place make a copy of the line without + the BOM. +Files: src/ex_cmds2.c + +Patch 7.2.103 +Problem: When 'bomb' is changed the window title is updated to show/hide a + "+", but the tab page label isn't. (Patrick Texier) +Solution: Set "redraw_tabline" in most places where "need_maketitle" is set. + (partly by Lech Lorens) +Files: src/option.c + +Patch 7.2.104 +Problem: When using ":saveas bar.c" the tab label isn't updated right away. +Solution: Set redraw_tabline. (Francois Ingelrest) +Files: src/ex_cmds.c + +Patch 7.2.105 +Problem: Modeline setting for 'foldmethod' overrules diff options. (Ingo + Karkat) +Solution: Don't set 'foldmethod' and 'wrap' from a modeline when 'diff' is + on. +Files: src/option.c + +Patch 7.2.106 +Problem: Endless loop when using "]s" in HTML when there are no + misspellings. (Ingo Karkat) +Solution: Break the search loop. Also fix pointer alignment for systems + with pointers larger than int. +Files: src/spell.c + +Patch 7.2.107 +Problem: When using a GUI dialog and ":echo" commands the messages are + deleted after the dialog. (Vincent Birebent) +Solution: Don't call msg_end_prompt() since there was no prompt. +Files: src/message.c + +Patch 7.2.108 (after 7.2.105) +Problem: Can't build without the diff feature. +Solution: Add #ifdef. +Files: src/option.c + +Patch 7.2.109 +Problem: 'langmap' does not work for multi-byte characters. +Solution: Add a list of mapped multi-byte characters. (based on work by + Konstantin Korikov, Agathoklis Hatzimanikas) +Files: runtime/doc/options.txt, src/edit.c, src/getchar.c, src/macros.h, + src/normal.c, src/option.c, src/proto/option.pro, src/window.c + +Patch 7.2.110 +Problem: Compiler warning for unused variable. +Solution: Init the variable. +Files: src/ex_docmd.c + +Patch 7.2.111 +Problem: When using Visual block mode with 'cursorcolumn' it's unclear what + is selected. +Solution: Don't use 'cursorcolumn' highlighting inside the Visual selection. + (idea by Dominique Pelle) +Files: src/screen.c + +Patch 7.2.112 +Problem: Cursor invisible in Visual mode when 'number' is set and cursor in + first column. (Matti Niemenmaa, Renato Alves) +Solution: Check that vcol_prev is smaller than vcol. +Files: src/screen.c + +Patch 7.2.113 +Problem: Crash for substitute() call using submatch(1) while there is no + such submatch. (Yukihiro Nakadaira) +Solution: Also check the start of the submatch is set, it can be NULL when + an attempted match didn't work out. +Files: src/regexp.c + +Patch 7.2.114 +Problem: Using wrong printf format. +Solution: Use "%ld" instead of "%d". (Dominique Pelle) +Files: src/netbeans.c + +Patch 7.2.115 +Problem: Some debugging code is never used. +Solution: Remove nbtrace() and nbprt(). (Dominique Pelle) +Files: src/nbdebug.c, src/nbdebug.h + +Patch 7.2.116 +Problem: Not all memory is freed when EXITFREE is defined. +Solution: Free allocated memory on exit. (Dominique Pelle) +Files: src/ex_docmd.c, src/gui_gtk_x11.c, src/misc2.c, src/search.c, + src/tag.c + +Patch 7.2.117 +Problem: Location list incorrectly labelled "Quickfix List". +Solution: Break out of both loops for finding window for location list + buffer. (Lech Lorens) +Files: src/buffer.c, src/quickfix.c, src/screen.c + +Patch 7.2.118 +Problem: <PageUp> at the more prompt only does half a page. +Solution: Make <PageUp> go up a whole page. Also make 'f' go a page + forward, but not quit the more prompt. (Markus Heidelberg) +Files: src/message.c + +Patch 7.2.119 +Problem: Status line is redrawn too often. +Solution: Check ScreeenLinesUC[] properly. (Yukihiro Nakadaira) +Files: src/screen.c + +Patch 7.2.120 +Problem: When opening the quickfix window or splitting the window and + setting the location list, the location list is copied and then + deleted, which is inefficient. +Solution: Don't copy the location list when not needed. (Lech Lorens) +Files: src/quickfix.c, src/vim.h, src/window.c + +Patch 7.2.121 +Problem: In gvim "!grep a *.c" spews out a lot of text that can't be + stopped with CTRL-C. +Solution: When looping to read and show text, do check for typed characters + every two seconds. +Files: src/os_unix.c + +Patch 7.2.122 +Problem: Invalid memory access when the VimResized autocommand changes + 'columns' and/or 'lines'. +Solution: After VimResized check for changed values. (Dominique Pelle) +Files: src/screen.c + +Patch 7.2.123 +Problem: Typing 'q' at more prompt for ":map" output still displays another + line, causing another more prompt. (Markus Heidelberg) +Solution: Quit listing maps when 'q' typed. +Files: src/getchar.c + +Patch 7.2.124 +Problem: Typing 'q' at more prompt for ":tselect" output still displays + more lines, causing another more prompt. (Markus Heidelberg) +Solution: Quit listing tags when 'q' typed. +Files: src/tag.c + +Patch 7.2.125 +Problem: Leaking memory when reading XPM bitmap for a sign. +Solution: Don't allocate the memory twice. (Dominique Pelle) +Files: src/gui_x11.c + +Patch 7.2.126 +Problem: When EXITFREE is defined signs are not freed. +Solution: Free all signs on exit. Also free keymaps. (Dominique Pelle) +Files: src/misc2.c, src/ex_cmds.c, src/proto/ex_cmds.pro + +Patch 7.2.127 +Problem: When listing mappings and a wrapping line causes the more prompt, + after typing 'q' there can be another more prompt. (Markus + Heidelberg) +Solution: Set "lines_left" to allow more lines to be displayed. +Files: src/message.c + +Patch 7.2.128 (after 7.2.055) +Problem: Using ":lcd" makes session files not work. +Solution: Compare return value of mch_chdir() properly. (Andreas Bernauer) +Files: src/ex_docmd.c + +Patch 7.2.129 +Problem: When opening a command window from input() it uses the search + history. +Solution: Use get_cmdline_type(). (James Vega) +Files: src/ex_getln.c + +Patch 7.2.130 +Problem: Vim may hang until CTRL-C is typed when using CTRL-Z. +Solution: Avoid using pause(). Also use "volatile" for variables used in + signal functions. (Dominique Pelle) +Files: src/auto/configure, src/configure.in, src/config.h.in, + src/globals.h, src/os_unix.c + +Patch 7.2.131 +Problem: When 'keymap' is cleared may still use the cursor highlighting for + when it's enabled. +Solution: Reset 'iminsert' and 'imsearch'. (partly by Dominique Pelle) + Also avoid ":setlocal" for these options have a global effect. +Files: src/option.c + +Patch 7.2.132 +Problem: When changing directory during a SwapExists autocmd freed memory + may be accessed. (Dominique Pelle) +Solution: Add the allbuf_lock flag. +Files: src/ex_getln.c, src/globals.h, src/fileio.c, + src/proto/ex_getln.pro + +Patch 7.2.133 +Problem: ":diffoff!" changes settings in windows not in diff mode. +Solution: Only change settings in other windows when 'diff' is set, always + do it for the current window. (Lech Lorens) +Files: src/diff.c + +Patch 7.2.134 +Problem: Warning for discarding "const" from pointer. +Solution: Don't pass const pointer to mch_memmove(). +Files: src/fileio.c + +Patch 7.2.135 +Problem: Memory leak when redefining user command with complete argument. +Solution: Free the old complete argument. (Dominique Pelle) +Files: src/ex_docmd.c + +Patch 7.2.136 (after 7.2.132) +Problem: ":cd" is still possible in a SwapExists autocmd. +Solution: Check the allbuf_lock flag in ex_cd(). +Files: src/ex_docmd.c + +Patch 7.2.137 +Problem: When 'virtualedit' is set, a left shift of a blockwise selection + that starts and ends inside a tab shifts too much. (Helmut + Stiegler) +Solution: Redo the block left shift code. (Lech Lorens) +Files: src/ops.c, src/testdir/Makefile, src/testdir/test66.in, + src/testdir/test66.ok + +Patch 7.2.138 (extra part of 7.2.137) +Problem: See 7.2.137. +Solution: See 7.2.137. +Files: src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Make_os2.mak, + src/testdir/Make_vms.mms + +Patch 7.2.139 +Problem: Crash when 'virtualedit' is "all". (James Vega) +Solution: Avoid overflow when column is MAXCOL. (Dominique Pelle) +Files: src/misc2.c + +Patch 7.2.140 +Problem: Diff highlighting isn't displayed before the Visual area if it + starts at the cursor position. (Markus Heidelberg) +Solution: Also check fromcol_prev. +Files: src/screen.c + +Patch 7.2.141 +Problem: When redrawing a character for bold spill this causes the next + character to be redrawn as well. +Solution: Only redraw one extra character. (Yukihiro Nakadaira) +Files: src/screen.c + +Patch 7.2.142 +Problem: Motif and Athena balloons don't use tooltip colors. +Solution: Set the colors. (Matt Wozniski) +Files: src/gui_beval.c + +Patch 7.2.143 +Problem: No command line completion for ":cscope" command. +Solution: Add the completion for ":cscope". (Dominique Pelle) +Files: src/ex_docmd.c, src/ex_getln.c, src/if_cscope.c, + src/proto/if_cscope.pro, src/vim.h + +Patch 7.2.144 +Problem: When 't_Co' is set to the value it already had the color scheme is + reloaded anyway. +Solution: Only load the colorscheme when the t_Co value changes. (Dominique + Pelle) +Files: src/option.c + +Patch 7.2.145 +Problem: White space in ":cscope find" is not ignored. +Solution: Ignore the white space, but not when the leading white space is + useful for the argument. +Files: runtime/doc/if_scop.txt, src/if_cscope.c + +Patch 7.2.146 +Problem: v:warningmsg isn't used for all warnings. +Solution: Set v:warningmsg for relevant warnings. (Ingo Karkat) +Files: src/fileio.c, src/misc1.c, src/option.c + +Patch 7.2.147 +Problem: When compiled as small version and 'number' is on the cursor is + displayed in the wrong position after a tab. (James Vega) +Solution: Don't increment vcol when still displaying the line number. +Files: src/screen.c + +Patch 7.2.148 +Problem: When searching for "$" while 'hlsearch' is set, highlighting the + character after the line does not work in the cursor column. + Also highlighting for Visual mode after the line end when this + isn't needed. (Markus Heidelberg) +Solution: Only compare the cursor column in the cursor line. Only highlight + for Visual selection after the last character when it's needed to + see where the Visual selection ends. +Files: src/screen.c + +Patch 7.2.149 +Problem: Using return value of function that doesn't return a value results + in reading uninitialized memory. +Solution: Set the default to return zero. Make cursor() return -1 on + failure. Let complete() return an empty string in case of an + error. (partly by Dominique Pelle) +Files: runtime/doc/eval.txt, src/eval.c + +Patch 7.2.150 (extra) +Problem: Can't use tab pages from VisVim. +Solution: Add tab page support to VisVim. (Adam Slater) +Files: src/VisVim/Commands.cpp, src/VisVim/Resource.h, + src/VisVim/VisVim.rc + +Patch 7.2.151 +Problem: ":hist a" doesn't work like ":hist all" as the docs suggest. +Solution: Make ":hist a" and ":hist al" work. (Dominique Pelle) +Files: src/ex_getln.c + +Patch 7.2.152 +Problem: When using "silent echo x" inside ":redir" a next echo may start + halfway the line. (Tony Mechelynck, Dennis Benzinger) +Solution: Reset msg_col after redirecting silently. +Files: src/ex_docmd.c, src/message.c, src/proto/message.pro + +Patch 7.2.153 +Problem: Memory leak for ":recover empty_dir/". +Solution: Free files[] when it becomes empty. (Dominique Pelle) +Files: src/memline.c + +Patch 7.2.154 (after 7.2.132) +Problem: ":cd" is still possible in a SwapExists autocmd. +Solution: Set allbuf_lock in do_swapexists(). +Files: src/memline.c + +Patch 7.2.155 +Problem: Memory leak in ":function /pat". +Solution: Free the memory. (Dominique Pelle) +Files: src/eval.c + +Patch 7.2.156 (after 7.2.143) +Problem: No completion for :scscope and :lcscope commands. +Solution: Implement the completion. (Dominique Pelle) +Files: src/if_cscope.c, src/ex_docmd.c, src/proto/if_cscope.pro + +Patch 7.2.157 +Problem: Illegal memory access when searching in path. +Solution: Avoid looking at a byte after end of a string. (Dominique Pelle) +Files: src/search.c + +Patch 7.2.158 +Problem: Warnings from VisualC compiler. +Solution: Add type casts. (George Reilly) +Files: src/ops.c + +Patch 7.2.159 +Problem: When $x_includes ends up being "NONE" configure fails. +Solution: Check for $x_includes not to be "NONE" (Rainer) +Files: src/auto/configure, src/configure.in + +Patch 7.2.160 +Problem: Search pattern not freed on exit when 'rightleft' set. +Solution: Free mr_pattern_alloced. +Files: src/search.c + +Patch 7.2.161 +Problem: Folds messed up in other tab page. (Vlad Irnov) +Solution: Instead of going over all windows in current tab page go over all + windows in all tab pages. Also free memory for location lists in + other tab pages when exiting. (Lech Lorens) +Files: src/fileio.c, src/mark.c, src/misc1.c, src/misc2.c + +Patch 7.2.162 +Problem: The quickfix window may get wrong filetype. +Solution: Do not detect the filetype for the quickfix window. (Lech Lorens) +Files: src/quickfix.c + +Patch 7.2.163 +Problem: The command line window may get folding. +Solution: Default to no/manual folding. (Lech Lorens) +Files: src/ex_getln.c + +Patch 7.2.164 +Problem: When 'showbreak' is set the size of the Visual block may be + reported wrong. (Eduardo Daudt Flach) +Solution: Temporarily make 'sbr' empty. +Files: src/normal.c, src/ops.c + +Patch 7.2.165 +Problem: The argument for the FuncUndefined autocmd event is expanded like + a file name. +Solution: Don't try expanding it. (Wang Xu) +Files: src/fileio.c + +Patch 7.2.166 +Problem: No completion for ":sign" command. +Solution: Add ":sign" completion. (Dominique Pelle) +Files: src/ex_cmds.c, src/ex_docmd.c, src/ex_getln.c, src/vim.h, + src/proto/ex_cmds.pro + +Patch 7.2.167 +Problem: Splint doesn't work well for checking the code. +Solution: Add splint arguments in the Makefile. Exclude some code from + splint that it can't handle. Tune splint arguments to give + reasonable errors. Add a filter for removing false warnings from + splint output. Many small changes to avoid warnings. More to + follow... +Files: Filelist, src/Makefile, src/buffer.c, src/charset.c, + src/cleanlint.vim, src/digraph.c, src/edit.c, src/ex_cmds.c, + src/globals.h, src/ops.c, src/os_unix.c, src/os_unix.h, + src/proto/buffer.pro, src/proto/edit.pro, src/screen.c, + src/structs.h + +Patch 7.2.168 +Problem: When no ctags program can be found, "make tags" attempts to + execute the first C file. +Solution: Default to "ctags" when no ctags program can be found. +Files: src/configure.in, src/auto/configure + +Patch 7.2.169 +Problem: Splint complains about a lot of things. +Solution: Add type casts, #ifdefs and other changes to avoid warnings. + Change colnr_T from unsigned to int. Avoids mistakes with + subtracting columns. +Files: src/cleanlint.vim, src/diff.c, src/edit.c, src/ex_cmds.c, + src/ex_cmds2.c, src/ex_docmd.c, src/proto/ex_cmds.pro, + src/proto/spell.pro, src/quickfix.c, src/spell.c, src/structs.h, + src/term.h, src/vim.h + +Patch 7.2.170 +Problem: Using b_dev while it was not set. (Dominique Pelle) +Solution: Add the b_dev_valid flag. +Files: src/buffer.c, src/fileio.c, src/structs.h + +Patch 7.2.171 (after 7.2.169) +Problem: Compiler warnings. (Tony Mechelynck) +Solution: Add function prototype. (Patrick Texier) Init variable. +Files: src/ex_cmds.c + +Patch 7.2.172 (extra) +Problem: Compiler warning. +Solution: Adjust function prototype. (Patrick Texier) +Files: src/os_mswin.c + +Patch 7.2.173 +Problem: Without lint there is no check for unused function arguments. +Solution: Use gcc -Wunused-parameter instead of lint. For a few files add + attributes to arguments that are known not to be used. +Files: src/auto/configure, src/buffer.c, src/charset.c, src/diff.c, + src/configure.in, src/config.h.in, src/edit.c, src/ex_cmds.c, + src/ex_cmds2.c, src/version.c, src/vim.h + +Patch 7.2.174 +Problem: Too many warnings from gcc -Wextra. +Solution: Change initializer. Add UNUSED. Add type casts. +Files: src/edit.c, src/eval.c, src/ex_cmds.c, src/ex_docmd.c, + src/ex_getln.c, src/fileio.c, getchar.c, globals.h, main.c, + memline.c, message.c, src/misc1.c, src/move.c, src/normal.c, + src/option.c, src/os_unix.c, src/os_unix.h, src/regexp.c, + src/search.c, src/tag.c + +Patch 7.2.175 +Problem: Compiler warning in OpenBSD. +Solution: Add type cast for NULL. (Dasn) +Files: src/if_cscope.c + +Patch 7.2.176 +Problem: Exceptions for splint are not useful. +Solution: Remove the S_SPLINT_S ifdefs. +Files: src/edit.c, src/ex_cmds.c, src/ex_docmd.c, src/os_unix.c, + src/os_unix.h, src/os_unixx.h, src/structs.h, src/term.h + +Patch 7.2.177 +Problem: Compiler warnings when using -Wextra +Solution: Add UNUSED and type casts. +Files: src/eval.c, src/ex_docmd.c, src/ex_eval.c, src/ex_getln.c, + src/fileio.c, src/hardcopy.c, src/if_cscope.c, src/if_xcmdsrv.c, + src/farsi.c, src/mark.c, src/menu.c + +Patch 7.2.178 +Problem: Using negative value for device number might not work. +Solution: Use a separate flag for whether ffv_dev was set. +Files: src/misc2.c + +Patch 7.2.179 +Problem: Using negative value for device number might not work. +Solution: Use a separate flag for whether sn_dev was set. +Files: src/ex_cmds2.c + +Patch 7.2.180 +Problem: Some more compiler warnings when using gcc -Wextra. +Solution: Add UNUSED and type casts. +Files: src/buffer.c, src/ex_cmds.c, src/macros.h, src/main.c, + src/menu.c, src/message.c, src/misc1.c, src/mbyte.c, + src/normal.c, src/option.c, src/os_unix.c, src/quickfix.c, + src/screen.c, src/search.c, src/spell.c, src/syntax.c, src/tag.c, + src/term.c, src/ui.c + +Patch 7.2.181 +Problem: Some more compiler warnings when using gcc -Wextra. +Solution: Add UNUSED and type casts. +Files: src/if_mzsch.c, src/gui.c, src/gui_gtk.c, src/gui_gtk_x11.c, + src/gui_gtk_f.c, src/gui_beval.c, src/netbeans.c + +Patch 7.2.182 (after 7.2.181) +Problem: Compilation problems after previous patch for Motif. Gvim with + GTK crashes on startup. +Solution: Add comma. Init form structure to zeroes. +Files: src/netbeans.c, src/gui_gtk_f.c + +Patch 7.2.183 +Problem: Configure problem for sys/sysctl.h on OpenBSD. (Dasn) +Solution: Add separate check for this header file. Also switch to newer + version of autoconf. +Files: src/auto/configure, src/configure.in + +Patch 7.2.184 +Problem: Some more compiler warnings when using gcc -Wextra. +Solution: Add UNUSED and type casts. Autoconf check for wchar_t. +Files: src/auto/configure, src/config.h.in, src/configure.in, + src/gui_athena.c, src/gui_x11.c, src/gui.c, src/gui_beval.c, + src/gui_at_sb.c, src/gui_at_fs.c, src/gui_motif.c, + src/gui_xmdlg.c, src/gui_xmebw.c, src/if_python.c, src/window.c, + src/workshop.c + +Patch 7.2.185 +Problem: Some more compiler warnings when using gcc -Wextra. +Solution: Add UNUSED and type casts. +Files: src/Makefile, src/if_tlc.c, src/if_ruby.c + +Patch 7.2.186 +Problem: Some more compiler warnings when using gcc -Wextra. +Solution: Now with the intended if_tcl.c changes. +Files: src/if_tcl.c + +Patch 7.2.187 (after 7.2.186) +Problem: Doesn't build with older versions of TCL. (Yongwei Wu) +Solution: Add #ifdefs. (Dominique Pelle) +Files: src/if_tcl.c + +Patch 7.2.188 +Problem: Crash with specific use of function calls. (Meikel Brandmeyer) +Solution: Make sure the items referenced by a function call are not freed + twice. (based on patch from Nico Weber) +Files: src/eval.c + +Patch 7.2.189 +Problem: Possible hang for deleting auto-indent. (Dominique Pelle) +Solution: Make sure the position is not beyond the end of the line. +Files: src/edit.c + +Patch 7.2.190 +Problem: The register executed by @@ isn't restored. +Solution: Mark the executable register in the viminfo file. +Files: src/ops.c + +Patch 7.2.191 +Problem: Mzscheme interface doesn't work on Ubuntu. +Solution: Change autoconf rules. Define missing macro. Some changes to + avoid gcc warnings. Remove per-buffer namespace. (Sergey Khorev) +Files: runtime/doc/if_mzsch.txt, src/Makefile, src/Make_ming.mak, + src/Make_mvc.mak, src/auto/configure, src/configure.in, + src/config.mk.in, src/eval.c, src/if_mzsch.c, src/if_mzsch.h, + src/main.c, src/proto/if_mzsch.pro + +Patch 7.2.192 (after 7.2.188) +Problem: Still a crash in the garbage collector for a very rare situation. +Solution: Make sure current_copyID is always incremented correctly. (Kent + Sibilev) +Files: src/eval.c + +Patch 7.2.193 +Problem: Warning for uninitialized values. +Solution: Initialize all the struct items. +Files: src/eval.c + +Patch 7.2.194 (extra) +Problem: MSVC: rem commands are echoed. +Solution: Add commands to switch off echo. (Wang Xu) +Files: src/msvc2008.bat + +Patch 7.2.195 +Problem: Leaking memory for the command Vim was started with. +Solution: Remember the pointer and free it. +Files: src/gui_gtk_x11.c + +Patch 7.2.196 (after 7.2.167) +Problem: Turns out splint doesn't work well enough to be usable. +Solution: Remove splint support. +Files: Filelist, src/cleanlint.vim + +Patch 7.2.197 +Problem: Warning for uninitialized values. +Solution: Initialize all the struct items of typebuf. +Files: src/globals.h + +Patch 7.2.198 +Problem: Size of buffer used for tgetent() may be too small. +Solution: Use the largest known size everywhere. +Files: src/vim.h + +Patch 7.2.199 +Problem: Strange character in comment. +Solution: Change to "message". (Yongwei Wu) +Files: src/term.c + +Patch 7.2.200 +Problem: Reading past end of string when navigating the menu bar or + resizing the window. +Solution: Add and use mb_ptr2len_len(). (partly by Dominique Pelle) + Also add mb_ptr2cells_len() to prevent more trouble. +Files: src/gui_gtk_x11.c, src/os_unix.c, src/globals.h, src/mbyte.c, + src/proto/mbyte.pro + +Patch 7.2.201 +Problem: Cannot copy/paste HTML to/from Firefox via the clipboard. +Solution: Implement this for GTK. Add the "html" value to 'clipboard'. +Files: runtime/doc/options.txt, src/globals.h, src/gui_gtk_x11.c, + src/mbyte.c, src/proto/mbyte.pro, src/option.c + +Patch 7.2.202 +Problem: BufWipeout autocommand that edits another buffer causes problems. +Solution: Check for the situation, give an error and quit the operation. +Files: src/fileio.c + +Patch 7.2.203 +Problem: When reloading a buffer or doing anything else with a buffer that + is not displayed in a visible window, autocommands may be applied + to the current window, folds messed up, etc. +Solution: Instead of using the current window for the hidden buffer use a + special window, splitting the current one temporarily. +Files: src/fileio.c, src/globals.h, src/gui.c, src/if_perl.xs, + src/progo/gui.pro, src/proto/window.pro, src/screen.c, + src/structs.h, src/window.c + +Patch 7.2.204 (extra) +Problem: Win32: Can't build with Visual Studio 2010 beta 1. +Solution: Fix the makefile. (George Reilly) +Files: src/Make_mvc.mak + +Patch 7.2.205 (extra) +Problem: Win32: No support for High DPI awareness. +Solution: Fix the manifest file. (George Reilly) +Files: src/Make_mvc.mak, src/gvim.exe.mnf + +Patch 7.2.206 +Problem: Win32: Can't build netbeans interface with Visual Studio 2010. +Solution: Undefine ECONNREFUSED. (George Reilly) +Files: src/netbeans.c + +Patch 7.2.207 +Problem: Using freed memory with ":redrawstatus" when it works recursively. +Solution: Prevent recursively updating the status line. (partly by Dominique + Pelle) +Files: src/screen.c + +Patch 7.2.208 +Problem: "set novice" gives an error message, it should be ignored. +Solution: Don't see "no" in "novice" as unsetting an option. (Patrick + Texier) +Files: src/option.c + +Patch 7.2.209 +Problem: For xxd setmode() is undefined on Cygwin. +Solution: Include io.h. (Dominique Pelle) +Files: src/xxd/xxd.c + +Patch 7.2.210 +Problem: When a file that is being edited has its timestamp updated outside + of Vim and ":checktime" is used still get a warning when writing + the file. (Matt Mueller) +Solution: Store the timestamp in b_mtime_read when the timestamp is the only + thing that changed. +Files: src/fileio.c + +Patch 7.2.211 +Problem: Memory leak when expanding a series of file names. +Solution: Use ga_clear_strings() instead of ga_clear(). +Files: src/misc1.c + +Patch 7.2.212 (extra) +Problem: Warnings for redefining SIG macros. +Solution: Don't define them if already defined. (Bjorn Winckler) +Files: src/os_mac.h + +Patch 7.2.213 +Problem: Warning for using vsprintf(). +Solution: Use vim_vsnprintf(). +Files: src/netbeans.c + +Patch 7.2.214 +Problem: Crash with complete function for user command. (Andy Wokula) +Solution: Avoid using a NULL pointer (Dominique Pelle) +Files: src/ex_getln.c + +Patch 7.2.215 +Problem: ml_get error when using ":vimgrep". +Solution: Load the memfile for the hidden buffer before putting it in a + window. Correct the order of splitting the window and filling + the window and buffer with data. +Files: src/fileio.c, src/proto/window.pro, src/quickfix.c, src/window.c + +Patch 7.2.216 +Problem: Two error messages have the same number E812. +Solution: Give one message a different number. +Files: runtime/doc/autocmd.txt, runtime/doc/if_mzsch.txt, src/if_mzsch.c + +Patch 7.2.217 +Problem: Running tests with valgrind doesn't work as advertised. +Solution: Fix the line in the Makefile. +Files: src/testdir/Makefile + +Patch 7.2.218 +Problem: Cannot build GTK with hangul_input feature. (Dominique Pelle) +Solution: Adjust #ifdef. (SungHyun Nam) +Files: src/gui.c + +Patch 7.2.219 (extra) +Problem: Photon GUI is outdated. +Solution: Updates for QNX 6.4.0. (Sean Boudreau) +Files: src/gui_photon.c + +Patch 7.2.220 (after 7.2.215) +Problem: a BufEnter autocommand that changes directory causes problems. + (Ajit Thakkar) +Solution: Disable autocommands when opening a hidden buffer in a window. +Files: src/fileio.c + +Patch 7.2.221 +Problem: X cut_buffer0 text is used as-is, it may be in the wrong encoding. +Solution: Convert between 'enc' and latin1. (James Vega) +Files: src/gui_gtk_x11.c, src/message.c, src/ops.c, src/proto/ui.pro, + src/ui.c + +Patch 7.2.222 +Problem: ":mksession" doesn't work properly with 'acd' set. +Solution: Make it work. (Yakov Lerner) +Files: src/ex_docmd.c + +Patch 7.2.223 +Problem: When a script is run with ":silent" it is not able to give warning + messages. +Solution: Add the ":unsilent" command. +Files: runtime/doc/various.txt, src/ex_cmds.h, src/ex_docmd.c + +Patch 7.2.224 +Problem: Crash when using 'completefunc'. (Ingo Karkat) +Solution: Disallow entering edit() recursively when doing completion. +Files: src/edit.c + +Patch 7.2.225 +Problem: When using ":normal" a saved character may be executed. +Solution: Also store old_char when saving typeahead. +Files: src/getchar.c, src/structs.h + +Patch 7.2.226 +Problem: ml_get error after deleting the last line. (Xavier de Gaye) +Solution: When adjusting marks a callback may be invoked. Adjust the cursor + position before invoking deleted_lines_mark(). +Files: src/ex_cmds.c, src/ex_docmd.c, src/if_mzsch.c, src/if_python.c, + src/if_perl.xs, src/misc1.c + +Patch 7.2.227 +Problem: When using ":cd" in a script there is no way to track this. +Solution: Display the directory when 'verbose' is 5 or higher. +Files: src/ex_docmd.c + +Patch 7.2.228 +Problem: Cscope is limited to 8 connections. +Solution: Allocated the connection array to handle any number of + connections. (Dominique Pelle) +Files: runtime/doc/if_cscop.txt, src/if_cscope.h, src/if_cscope.c + +Patch 7.2.229 +Problem: Warning for shadowed variable. +Solution: Rename "wait" to "wait_time". +Files: src/os_unix.c + +Patch 7.2.230 +Problem: A few old lint-style ARGUSED comments. +Solution: Change to the new UNUSED style. +Files: src/getchar.c + +Patch 7.2.231 +Problem: Warning for unreachable code. +Solution: Add #ifdef. +Files: src/if_perl.xs + +Patch 7.2.232 +Problem: Cannot debug problems with being in a wrong directory. +Solution: When 'verbose' is 5 or higher report directory changes. +Files: src/os_unix.c, src/os_unix.h, src/proto/os_unix.pro + +Patch 7.2.233 (extra part of 7.2.232) +Problem: Cannot debug problems with being in a wrong directory. +Solution: When 'verbose' is 5 or higher report directory changes. +Files: src/os_msdos.c, src/os_mswin.c, src/os_riscos.c, src/os_mac.h + +Patch 7.2.234 +Problem: It is not possible to ignore file names without a suffix. +Solution: Use an empty entry in 'suffixes' for file names without a dot. +Files: runtime/doc/cmdline.txt, src/misc1.c + +Patch 7.2.235 +Problem: Using CTRL-O z= in Insert mode has a delay before redrawing. +Solution: Reset msg_didout and msg_scroll. +Files: src/misc1.c, src/spell.c + +Patch 7.2.236 +Problem: Mac: Compiling with Ruby doesn't always work. +Solution: In configure filter out the --arch argument (Bjorn Winckler) +Files: src/configure.in, src/auto/configure + +Patch 7.2.237 +Problem: Crash on exit when window icon not set. +Solution: Copy terminal name when using it for the icon name. +Files: src/os_unix.c + +Patch 7.2.238 +Problem: Leaking memory when setting term to "builtin_dumb". +Solution: Free memory when resetting term option t_Co. +Files: src/option.c, src/proto/option.pro, src/term.c + +Patch 7.2.239 +Problem: Using :diffpatch twice or when patching fails causes memory + corruption and/or a crash. (Bryan Venteicher) +Solution: Detect missing output file. Avoid using non-existing buffer. +Files: src/diff.c + +Patch 7.2.240 +Problem: Crash when using find/replace dialog repeatedly. (Michiel + Hartsuiker) +Solution: Avoid doing the operation while busy or recursively. Also refuse + replace when text is locked. +Files: src/gui.c + +Patch 7.2.241 +Problem: When using a combination of ":bufdo" and "doautoall" we may end up + in the wrong directory. (Ajit Thakkar) + Crash when triggering an autocommand in ":vimgrep". (Yukihiro + Nakadaira) +Solution: Clear w_localdir and globaldir when using the aucmd_win. + Use a separate flag to decide aucmd_win needs to be restored. +Files: src/fileio.c, src/globals.h, src/structs.h + +Patch 7.2.242 +Problem: Setting 'lazyredraw' causes the cursor column to be recomputed. + (Tom Link) +Solution: Only recompute the cursor column for a boolean option if changes + the cursor position. +Files: src/option.c + +Patch 7.2.243 +Problem: Memory leak when using :vimgrep and resizing. (Dominique Pelle) +Solution: Free memory for aucmd_win when resizing and don't allocate it + twice. +Files: src/screen.c + +Patch 7.2.244 +Problem: When 'enc' is utf-8 and 'fenc' is latin1, writing a non-latin1 + character gives a conversion error without any hint what is wrong. +Solution: When known add the line number to the error message. +Files: src/fileio.c + +Patch 7.2.245 +Problem: When 'enc' is "utf-16" and 'fenc' is "utf-8" writing a file does + conversion while none should be done. (Yukihiro Nakadaira) When + 'fenc' is empty the file is written as utf-8 instead of utf-16. +Solution: Do proper comparison of encodings, taking into account that all + Unicode values for 'enc' use utf-8 internally. +Files: src/fileio.c + +Patch 7.2.246 +Problem: Cscope home page link is wrong. +Solution: Update the URL. (Sergey Khorev) +Files: runtime/doc/if_cscop.txt + +Patch 7.2.247 +Problem: Mzscheme interface minor problem. +Solution: Better error message when build fails. (Sergey Khorev) +Files: src/if_mzsch.c + +Patch 7.2.248 (extra) +Problem: Mzscheme interface building minor problems. +Solution: Update Win32 makefiles. (Sergey Khorev) +Files: src/Make_cyg.mak, src/Make_ming.mak, src/Make_mvc.mak + +Patch 7.2.249 +Problem: The script to check .po files can't handle '%' in plural forms. +Solution: Remove "Plural-Forms:" from the checked string. +Files: src/po/check.vim + +Patch 7.2.250 (extra) +Problem: Possible buffer overflow. +Solution: Compute the remaining space. (Dominique Pelle) +Files: src/GvimExt/gvimext.cpp + +Patch 7.2.251 (after 7.2.044) +Problem: Compiler adds invalid memory bounds check. +Solution: Remove _FORTIFY_SOURCE=2 from CFLAGS. (Dominique Pelle) +Files: src/auto/configure, src/configure.in + +Patch 7.2.252 +Problem: When using a multi-byte 'enc' the 'iskeyword' option cannot + contain characters above 128. +Solution: Use mb_ptr2char_adv(). +Files: src/charset.c + +Patch 7.2.253 +Problem: Netbeans interface: getLength always uses current buffer. +Solution: Use ml_get_buf() instead of ml_get(). (Xavier de Gaye) +Files: src/netbeans.c + +Patch 7.2.254 +Problem: Compiler warning for assigning size_t to int. +Solution: Use size_t for the variable. (George Reilly) +Files: src/fileio.c + +Patch 7.2.255 (after 7.2.242) +Problem: Setting 'rightleft', 'linebreak' and 'wrap' may cause cursor to be + in wrong place. +Solution: Recompute the cursor column for these options. +Files: src/option.c + +Patch 7.2.256 +Problem: When 'guifont' was not set GTK font dialog doesn't have a default. + (Andreas Metzler) +Solution: Set default to DEFAULT_FONT. (James Vega) +Files: src/gui_gtk_x11.c + +Patch 7.2.257 +Problem: With GTK 2.17 lots of assertion error messages. +Solution: Remove check for static gravity. (Sebastian Droege) +Files: src/gui_gtk_f.c + +Patch 7.2.258 +Problem: v:beval_col and b:beval_text are wrong in UTF-8 text. (Tony + Mechelynck) +Solution: Use byte number instead of character number for the column. +Files: src/ui.c + +Patch 7.2.259 +Problem: exists() doesn't work properly for an empty aucmd group. +Solution: Change how au_exists() handles a missing pattern. Also add a + test for this. (Bob Hiestand) +Files: src/fileio.c, src/testdir/Makefile, src/testdir/test67.in, + src/testdir/test67.ok + +Patch 7.2.260 (extra part of 7.2.259) +Problem: exists() doesn't work properly for empty aucmd group. +Solution: Change how au_exists() handles a missing pattern. Also add a + test for this. (Bob Hiestand) +Files: src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Make_os2.mak, + src/testdir/Make_vms.mms + +Patch 7.2.261 +Problem: When deleting lines with a specific folding configuration E38 may + appear. (Shahaf) +Solution: When adjusting nested folds for deleted lines take into account + that they don't start at the top of the enclosing fold. +Files: src/fold.c + +Patch 7.2.262 +Problem: When using custom completion for a user command the pattern string + goes beyond the cursor position. (Hari Krishna Dara) +Solution: Truncate the string at the cursor position. +Files: src/ex_getln.c, src/structs.h + +Patch 7.2.263 +Problem: GTK2: when using the -geom argument with an offset from the right + edge and the size is smaller than the default, the Vim window is + not positioned properly. +Solution: Use another function to set the size. (Vitaly Minko) +Files: src/gui_gtk_x11.c + +Patch 7.2.264 +Problem: GTK2: When the Vim window is maximized setting 'columns' or + 'lines' doesn't work. +Solution: Unmaximize the window before setting the size. (Vitaly Minko) +Files: src/gui.c, src/gui_gtk_x11.c, src/proto/gui_gtk_x11.pro + +Patch 7.2.265 +Problem: When using ":silent broken" inside try/catch silency may persist. + (dr-dr xp) +Solution: Set msg_silent when there is an error and it's bigger than the + saved value. +Files: src/ex_docmd.c + +Patch 7.2.266 +Problem: When an expression abbreviation is triggered, the typed character + is unknown. +Solution: Make the typed character available in v:char. +Files: runtime/doc/map.txt, src/eval.c, src/getchar.c, src/ops.c, + src/proto/eval.pro + +Patch 7.2.267 +Problem: Crash for narrow window and double-width character. +Solution: Check for zero width. (Taro Muraoka) +Files: src/charset.c + +Patch 7.2.268 +Problem: Crash when using Python to set cursor beyond end of line. + (winterTTr) +Solution: Check the column to be valid. +Files: src/if_python.c + +Patch 7.2.269 +Problem: Many people struggle to find out why Vim startup is slow. +Solution: Add the --startuptime command line flag. +Files: runtime/doc/starting.txt, src/globals.h, src/feature.h, + src/main.c, src/macros.h + +Patch 7.2.270 +Problem: Using ":@c" when the c register contains a CR causes the rest to + be executed later. (Dexter Douglas) +Solution: Don't check for typeahead to start with ':', keep executing + commands until all added typeahead has been used. +Files: src/ex_docmd.c + +Patch 7.2.271 +Problem: Using freed memory in Motif GUI version when making a choice. +Solution: Free memory only after using it. (Dominique Pelle) +Files: src/gui_xmdlg.c + +Patch 7.2.272 +Problem: "_.svz" is not recognized as a swap file. (David M. Besonen) +Solution: Accept .s[uvw][a-z] as a swap file name extension. +Files: src/memline.c + +Patch 7.2.273 +Problem: Crash with redir to unknown array. (Christian Brabandt) +Solution: Don't assign the redir result when there was an error. +Files: src/eval.c + +Patch 7.2.274 +Problem: Syntax folding doesn't work properly when adding a comment. +Solution: Fix it and add a test. (Lech Lorens) +Files: src/fold.c, src/testdir/test45.in, src/testdir/test45.ok + +Patch 7.2.275 +Problem: Warning for unused argument and comparing signed and unsigned. +Solution: Add type cast. +Files: src/memline.c + +Patch 7.2.276 +Problem: Crash when setting 'isprint' to a small bullet. (Raul Coronado) +Solution: Check for the character to be < 256. Also make it possible to + specify a range of multi-byte characters. (Lech Lorens) +Files: src/charset.c + +Patch 7.2.277 +Problem: CTRL-Y in a diff'ed window may move the cursor outside of the + window. (Lech Lorens) +Solution: Limit the number of filler lines to the height of the window. + Don't reset filler lines to zero for an empty buffer. +Files: src/move.c + +Patch 7.2.278 +Problem: Using magic number in the folding code. +Solution: Use the defined MAX_LEVEL. +Files: src/fold.c + +Patch 7.2.279 +Problem: Invalid memory read with visual mode "r". (Dominique Pelle) +Solution: Make sure the cursor position is valid. Don't check the cursor + position but the position being used. And make sure we get the + right line. +Files: src/misc2.c, src/ops.c + +Patch 7.2.280 +Problem: A redraw in a custom statusline with %! may cause a crash. + (Yukihiro Nakadaira) +Solution: Make a copy of 'statusline'. Also fix typo in function name + redraw_custom_statusline. (partly by Dominique Pelle) +Files: src/screen.c + +Patch 7.2.281 +Problem: 'cursorcolumn' highlighting is wrong in diff mode. +Solution: Adjust the column computation. (Lech Lorens) +Files: src/screen.c + +Patch 7.2.282 +Problem: A fold can't be closed. +Solution: Initialize fd_small to MAYBE. (Lech Lorens) +Files: src/fold.c + +Patch 7.2.283 +Problem: Changing font while the window is maximized doesn't keep the + window maximized. +Solution: Recompute number of lines and columns after changing font. (James + Vega) +Files: src/gui_gtk_x11.c + +Patch 7.2.284 +Problem: When editing the same buffer in two windows, one with folding, + display may be wrong after changes. +Solution: Call set_topline() to take care of side effects. (Lech Lorens) +Files: src/misc1.c + +Patch 7.2.285 (after 7.2.169) +Problem: CTRL-U in Insert mode also deletes indent. (Andrey Voropaev) +Solution: Fix mistake made in patch 7.2.169. +Files: src/edit.c + +Patch 7.2.286 (after 7.2.269) +Problem: The "--startuptime=<file>" argument is not consistent with other + arguments. +Solution: Use "--startuptime <file>". Added the +startuptime feature. +Files: runtime/doc/eval.txt, runtime/doc/starting.txt, + runtime/doc/various.txt, src/eval.c, src/main.c, src/version.c + +Patch 7.2.287 +Problem: Warning from gcc 3.4 about uninitialized variable. +Solution: Move assignment outside of #ifdef. +Files: src/if_perl.xs + +Patch 7.2.288 +Problem: Python 2.6 pyconfig.h redefines macros. +Solution: Undefine the macros before including pyconfig.h. +Files: src/if_python.c + +Patch 7.2.289 +Problem: Checking wrong struct member. +Solution: Change tb_buf to tb_noremap. (Dominique Pelle) +Files: src/getchar.c + +Patch 7.2.290 +Problem: Not freeing memory from ":lmap", ":xmap" and ":menutranslate". +Solution: Free the memory when exiting. (Dominique Pelle) +Files: src/misc2.c + +Patch 7.2.291 +Problem: Reading uninitialised memory in arabic mode. +Solution: Use utfc_ptr2char_len() rather than utfc_ptr2char(). (Dominique + Pelle) +Files: src/screen.c + +Patch 7.2.292 +Problem: Block right-shift doesn't work properly with multi-byte encoding + and 'list' set. +Solution: Add the missing "else". (Lech Lorens) +Files: src/ops.c + +Patch 7.2.293 +Problem: When setting 'comments' option it may be used in a wrong way. +Solution: Don't increment after skipping over digits. (Yukihiro Nakadaira) +Files: src/misc1.c + +Patch 7.2.294 +Problem: When using TEMPDIRS dir name could get too long. +Solution: Overwrite tail instead of appending each time. Use mkdtemp() when + available. (James Vega) +Files: src/auto/configure, src/config.h.in, src/configure.in, src/fileio.c + +Patch 7.2.295 +Problem: When using map() on a List the index is not known. +Solution: Set v:key to the index. (Hari Krishna Dara) +Files: runtime/doc/eval.txt, src/eval.c + +Patch 7.2.296 +Problem: Help message about startuptime is wrong. (Dominique Pelle) +Solution: Remove the equal sign. +Files: src/main.c + +Patch 7.2.297 +Problem: Reading freed memory when writing ":reg" output to a register. + (Dominique Pelle) +Solution: Skip the register being written to. +Files: src/ops.c + +Patch 7.2.298 +Problem: ":vimgrep" crashes when there is an autocommand that sets a + window-local variable. +Solution: Initialize the w: hashtab for re-use. (Yukihiro Nakadaira) +Files: src/fileio.c + +Patch 7.2.299 +Problem: Crash when comment middle is longer than start. +Solution: Fix size computation. (Lech Lorens) +Files: src/misc1.c + +Patch 7.2.300 +Problem: Vim doesn't close file descriptors when forking and executing + another command, e.g., ":shell". +Solution: Use FD_CLOEXEC when available. (James Vega) +Files: auto/configure, src/config.h.in, src/configure.in, + src/ex_cmdds2.c, src/fileio.c, src/memfile.c, src/memline.c + +Patch 7.2.301 +Problem: Formatting is wrong when 'tw' is set to a small value. +Solution: Fix it and add tests. Also fix behavior of "1" in 'fo'. (Yukihiro + Nakadaira) +Files: src/edit.c, src/testdir/Makefile, src/testdir/test68.in, + src/testdir/test68.ok, src/testdir/test69.in, + src/testdir/test69,ok + +Patch 7.2.302 (extra part of 7.2.301) +Problem: Formatting wrong with small 'tw' value. +Solution: Add build rules for tests. +Files: src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Make_os2.mak, + src/testdir/Make_vms.mms + +Patch 7.2.303 (after 7.2.294) +Problem: Can't build on MS-Windows. +Solution: Add #ifdef around vim_settempdir(). (James Vega) +Files: src/fileio.c + +Patch 7.2.304 +Problem: Compiler warning for bad pointer cast. +Solution: Use another variable for int pointer. +Files: src/ops.c + +Patch 7.2.305 +Problem: Recursively redrawing causes a memory leak. (Dominique Pelle) +Solution: Disallow recursive screen updating. +Files: src/screen.c + +Patch 7.2.306 +Problem: shellescape("10%%", 1) only escapes first %. (Christian Brabandt) +Solution: Don't copy the character after the escaped one. +Files: src/misc2.c + +Patch 7.2.307 +Problem: Crash with a very long syntax match statement. (Guy Gur Ari) +Solution: When the offset does not fit in the two bytes available give an + error instead of continuing with invalid pointers. +Files: src/regexp.c + +Patch 7.2.308 +Problem: When using a regexp in the "\=" expression of a substitute + command, submatch() returns empty strings for further lines. + (Clockwork Jam) +Solution: Save and restore the line number and line count when calling + reg_getline(). +Files: src/regexp.c + +Patch 7.2.309 (after 7.2.308) +Problem: Warning for missing function prototype. (Patrick Texier) +Solution: Add the prototype. +Files: src/regexp.c + +Patch 7.2.310 +Problem: When a filetype plugin in ~/.vim/ftdetect uses ":setfiletype" and + the file starts with a "# comment" it gets "conf" filetype. +Solution: Check for "conf" filetype after using ftdetect plugins. +Files: runtime/filetype.vim + +Patch 7.2.311 +Problem: Can't compile with FreeMiNT. +Solution: Change #ifdef for limits.h. (Alan Hourihane) +Files: src/fileio.c + +Patch 7.2.312 +Problem: iconv() returns an invalid character sequence when conversion + fails. It should return an empty string. (Yongwei Wu) +Solution: Be more strict about invalid characters in the input. +Files: src/mbyte.c + +Patch 7.2.313 +Problem: Command line completion doesn't work after "%:h" and similar. +Solution: Expand these items before doing the completion. +Files: src/ex_getln.c, src/misc1.c, src/proto/misc1.pro + +Patch 7.2.314 +Problem: Missing function in small build. +Solution: Always include concat_str. +Files: src/misc1.c + +Patch 7.2.315 +Problem: Python libs can't be found on 64 bit system. +Solution: Add lib64 to the list of directories. (Michael Henry) +Files: src/auto/configure, src/configure.in + +Patch 7.2.316 +Problem: May get multiple _FORTIFY_SOURCE arguments. (Tony Mechelynck) +Solution: First remove all these arguments and then add the one we want. + (Dominique Pelle) +Files: src/auto/configure, src/configure.in + +Patch 7.2.317 +Problem: Memory leak when adding a highlight group with unprintable + characters, resulting in E669. +Solution: Free the memory. And fix a few typos. (Dominique Pelle) +Files: src/syntax.c + +Patch 7.2.318 +Problem: Wrong locale value breaks floating point numbers for gvim. +Solution: Set the locale again after doing GUI inits. (Dominique Pelle) +Files: src/main.c + +Patch 7.2.319 +Problem: Motif: accessing freed memory when cancelling font dialog. +Solution: Destroy the widget only after accessing it. (Dominique Pelle) +Files: src/gui_xmdlg.c + +Patch 7.2.320 +Problem: Unused function in Mzscheme interface. +Solution: Remove the function and what depends on it. (Dominique Pelle) +Files: src/if_mzsch.c, src/proto/if_mzsch.pro + +Patch 7.2.321 +Problem: histadd() and searching with "*" fails to add entry to history + when it is empty. +Solution: Initialize the history. (Lech Lorens) +Files: src/eval.c, src/normal.c + +Patch 7.2.322 +Problem: Wrong indenting in virtual replace mode with CTRL-Y below a short + line. +Solution: Check for character to be NUL. (suggested by Lech Lorens) +Files: src/edit.c + +Patch 7.2.323 (extra) +Problem: Balloon evaluation crashes on Win64. +Solution: Change pointer types. (Sergey Khorev) +Files: src/gui_w32.c + +Patch 7.2.324 +Problem: A negative column argument in setpos() may cause a crash. +Solution: Check for invalid column number. (James Vega) +Files: src/eval.c, src/misc2.c + +Patch 7.2.325 +Problem: A stray "w" in the startup vimrc file causes the edited file to be + replaced with an empty file. (Stone Kang). +Solution: Do not write a buffer when it has never been loaded. +Files: src/fileio.c + +Patch 7.2.326 +Problem: Win32: $HOME doesn't work when %HOMEPATH% is not defined. +Solution: Use "\" for %HOMEPATH% when it is not defined. +Files: src/misc1.c + +Patch 7.2.327 +Problem: Unused functions in Workshop. +Solution: Add "#if 0" and minor cleanup. (Dominique Pelle) +Files: src/workshop.c, src/integration.c, src/integration.h + +Patch 7.2.328 +Problem: has("win64") does not return 1 on 64 bit MS-Windows version. +Solution: Also check for _WIN64 besides WIN64. +Files: src/eval.c + +Patch 7.2.329 +Problem: "g_" doesn't position cursor correctly when in Visual mode and + 'selection' is "exclusive". (Ben Fritz) +Solution: Call adjust_for_sel(). +Files: src/normal.c + +Patch 7.2.330 +Problem: Tables for Unicode case operators are outdated. +Solution: Add a Vim script for generating the tables. Include tables for + Unicode 5.2. +Files: runtime/tools/README.txt, runtime/tools/unicode.vim, src/mbyte.c + +Patch 7.2.331 +Problem: Can't interrupt "echo list" for a very long list. +Solution: Call line_breakcheck() in list_join(). +Files: src/eval.c + +Patch 7.2.332 +Problem: Crash when spell correcting triggers an autocommand that reloads + the buffer. +Solution: Make a copy of the line to be modified. (Dominique Pelle) +Files: src/spell.c + +Patch 7.2.333 +Problem: Warnings from static code analysis. +Solution: Small changes to various lines. (Dominique Pelle) +Files: src/buffer.c, src/edit.c, src/ex_getln.c, src/fileio.c, + src/if_cscope.c, src/netbeans.c, src/ops.c, src/quickfix.c, + src/syntax.c, src/ui.c + +Patch 7.2.334 +Problem: Postponing keys in Netbeans interface does not work properly. +Solution: Store the key string instead of the number. Avoid an infinite + loop. (Mostly by Xavier de Gaye) +Files: src/netbeans.c, src/proto/netbeans.pro + +Patch 7.2.335 +Problem: The CTRL-] command escapes too many characters. +Solution: Use a different list of characters to be escaped. (Sergey Khorev) +Files: src/normal.c + +Patch 7.2.336 +Problem: MzScheme interface can't evaluate an expression. +Solution: Add mzeval(). (Sergey Khorev) +Files: runtime/doc/eval.txt, runtime/doc/if_mzsch.txt, + runtime/doc/usr_41.txt, src/eval.c, src/if_mzsch.c, + src/proto/eval.pro, src/proto/if_mzsch.pro, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Makefile, src/testdir/main.aap, src/testdir/test1.in, + src/testdir/test70.in, src/testdir/test70.ok + +Patch 7.2.337 +Problem: The :compiler command doesn't function properly when invoked in a + function. +Solution: Add "g:" before "current_compiler". (Yukihiro Nakadaira) +Files: src/ex_cmds2.c + +Patch 7.2.338 (after 7.2.300) +Problem: Part of FD_CLOEXEC change is missing. +Solution: Include source file skipped because of typo. +Files: src/ex_cmds2.c + +Patch 7.2.339 (after 7.2.269) +Problem: Part of --startuptime patch is missing. +Solution: Add check for time_fd. +Files: src/ex_cmds2.c + +Patch 7.2.340 +Problem: Gcc warning for condition that can never be true. (James Vega) +Solution: Use start_lvl instead flp->lvl. +Files: src/fold.c + +Patch 7.2.341 +Problem: Popup menu wraps to next line when double-wide character doesn't + fit. (Jiang Ma) +Solution: Display a ">" instead. (Dominique Pelle) +Files: src/screen.c + +Patch 7.2.342 +Problem: Popup menu displayed wrong in 'rightleft' mode when there are + multi-byte characters. +Solution: Adjust the column computations. (Dominique Pelle) +Files: src/popupmnu.c + +Patch 7.2.343 (after 7.2.338) +Problem: Can't compile on Win32. +Solution: Insert the missing '|'. +Files: src/ex_cmds2.c + +Patch 7.2.344 (after 7.2.343) +Problem: Can't compile on some systems +Solution: Move the #ifdef outside of the mch_open macro. (Patrick Texier) +Files: src/ex_cmds2.c + +Patch 7.2.345 +Problem: Tab line is not updated when the value of 'bt' is changed. +Solution: Call redraw_titles(). (Lech Lorens) +Files: src/option.c + +Patch 7.2.346 +Problem: Repeating a command with @: causes a mapping to be applied twice. +Solution: Do not remap characters inserted in the typeahead buffer. (Kana + Natsuno) +Files: src/ops.c + +Patch 7.2.347 +Problem: Crash when executing <expr> mapping redefines that same mapping. +Solution: Save the values used before evaluating the expression. +Files: src/getchar.c + +Patch 7.2.348 (after 7.2.330) +Problem: Unicode double-width characters are not up-to date. +Solution: Produce the double-width table like the others. +Files: runtime/tools/unicode.vim, src/mbyte.c + +Patch 7.2.349 +Problem: CTRL-W gf doesn't put the new tab in the same place as "tab split" + and "gf". (Tony Mechelynck) +Solution: Store the tab number in cmdmod.tab. +Files: src/window.c + +Patch 7.2.350 +Problem: Win32: When changing font the window may jump from the secondary + to the primary screen. (Michael Wookey) +Solution: When the screen position was negative don't correct it to zero. +Files: src/gui.c + +Patch 7.2.351 (after 7.2.347) +Problem: Can't build with some compilers. +Solution: Move the #ifdef outside of a macro. Cleanup the code. +Files: src/getchar.c + +Patch 7.2.352 (extra) +Problem: Win64: Vim doesn't work when cross-compiled with MingW libraries. +Solution: Always return TRUE for the WM_NCCREATE message. (Andy Kittner) +Files: src/gui_w48.c + +Patch 7.2.353 +Problem: No command line completion for ":profile". +Solution: Complete the subcommand and file name. +Files: src/ex_docmd.c, src/ex_cmds2.c, src/ex_getln.c, + src/proto/ex_cmds2.pro, src/vim.h + +Patch 7.2.354 +Problem: Japanese single-width double-byte characters not handled correctly. +Solution: Put 0x8e in ScreenLines[] and the second byte in ScreenLines2[]. + (partly by Kikuchan) +Files: src/screen.c + +Patch 7.2.355 +Problem: Computing the cursor column in validate_cursor_col() is wrong when + line numbers are used and 'n' is not in 'cpoptions', causing the + popup menu to be positioned wrong. +Solution: Correctly use the offset. (partly by Dominique Pelle) +Files: src/move.c + +Patch 7.2.356 +Problem: When 'foldmethod' is changed not all folds are closed as expected. +Solution: In foldUpdate() correct the start position and reset fd_flags when + w_foldinvalid is set. (Lech Lorens) +Files: src/fold.c + +Patch 7.2.357 +Problem: When changing 'fileformat' from/to "mac" and there is a CR in the + text the display is wrong. +Solution: Redraw the text when 'fileformat' is changed. (Ben Schmidt) +Files: src/option.c + +Patch 7.2.358 +Problem: Compiler warnings on VMS. (Zoltan Arpadffy) +Solution: Pass array itself instead its address. Return a value. +Files: src/gui_gtk_x11.c, src/os_unix.c + +Patch 7.2.359 +Problem: Crash when using the Netbeans join command. +Solution: Make sure the ml_flush_line() function is not used recursively. + (Xavier de Gaye) +Files: src/memline.c + +Patch 7.2.360 +Problem: Ruby on MS-Windows: can't use sockets. +Solution: Call NtInitialize() during initialization. (Ariya Mizutani) +Files: src/if_ruby.c + +Patch 7.2.361 +Problem: Ruby 1.9 is not supported. +Solution: Add Ruby 1.9 support. (Masaki Suketa) +Files: src/Makefile, src/auto/configure, src/configure.in, src/if_ruby.c + +Patch 7.2.362 (extra, after 7.2.352) +Problem: Win64: Vim doesn't work when cross-compiled with MingW libraries. +Solution: Instead of handling WM_NCCREATE, create wide text area window + class if the parent window iw side. (Sergey Khorev) +Files: src/gui_w32.c, src/gui_w48.c + +Patch 7.2.363 +Problem: Can't dynamically load Perl 5.10. +Solution: Add the function Perl_croak_xs_usage. (Sergey Khorev) +Files: src/if_perl.xs + +Patch 7.2.364 (extra) +Problem: Can't build gvimext.dll on Win 7 x64 using MinGW (John Marriott) +Solution: Check if _MSC_VER is defined. (Andy Kittner) +Files: src/GvimExt/gvimext.h + +Patch 7.2.365 (extra) +Problem: MS-Windows with MingW: "File->Save As" does not work. (John + Marriott) +Solution: Correctly fill in structure size. (Andy Kittner) +Files: src/gui_w48.c + +Patch 7.2.366 +Problem: CTRL-B doesn't go back to the first line of the buffer. +Solution: Avoid an overflow when adding MAXCOL. +Files: src/move.c + +Patch 7.2.367 +Problem: "xxd -r -p" doesn't work as documented. +Solution: Skip white space. (James Vega) +Files: src/xxd/xxd.c + +Patch 7.2.368 (after 7.2.361) +Problem: Ruby interface: Appending line doesn't work. (Michael Henry) +Solution: Reverse check for NULL line. (James Vega) +Files: src/if_ruby.c + +Patch 7.2.369 +Problem: Error message is not easy to understand. +Solution: Add quotes. (SungHyun Nam) +Files: src/ex_cmds2.c + +Patch 7.2.370 (after 7.2.356) +Problem: A redraw may cause folds to be closed. +Solution: Revert part of the previous patch. Add a test. (Lech Lorens) +Files: src/diff.c, src/fold.c, src/option.c, src/testdir/test45.in, + src/testdir/test45.ok + +Patch 7.2.371 +Problem: Build problems on Tandem NonStop. +Solution: A few changes to #ifdefs (Joachim Schmitz) +Files: src/auto/configure, src/configure.in, src/config.h.in, src/vim.h, + src/if_cscope.c, src/osdef1.h.in, src/tag.c + +Patch 7.2.372 (extra) +Problem: Cross-compiling GvimExt and xxd doesn't work. +Solution: Change the build files. (Markus Heidelberg) +Files: src/INSTALLpc.txt, src/GvimExt/Make_ming.mak, src/Make_cyg.mak, + src/Make_ming.mak, src/xxd/Make_cyg.mak + +Patch 7.2.373 +Problem: Gcc 4.5 adds more error messages. (Chris Indy) +Solution: Update default 'errorformat'. +Files: src/option.h + +Patch 7.2.374 +Problem: Ruby eval() doesn't understand Vim types. +Solution: Add the vim_to_ruby() function. (George Gensure) +Files: src/eval.c, src/if_ruby.c + +Patch 7.2.375 +Problem: ml_get errors when using ":bprevious" in a BufEnter autocmd. + (Dominique Pelle) +Solution: Clear w_valid when entering another buffer. +Files: src/buffer.c + +Patch 7.2.376 +Problem: ml_get error when using SiSU syntax. (Nathan Thomas) +Solution: If the match ends below the last line move it to the end of the + last line. +Files: src/syntax.c + +Patch 7.2.377 (extra, after 7.2.372) +Problem: Misplaced assignment. Duplicate build line for gvimext.dll. +Solution: Move setting CROSS_COMPILE to before ifneq. Remove the wrong + build line. (Markus Heidelberg) +Files: src/Make_ming.mak + +Patch 7.2.378 +Problem: C function declaration indented too much. (Rui) +Solution: Don't see a line containing { or } as a type. (Matt Wozniski) +Files: src/misc1.c + +Patch 7.2.379 +Problem: 'eventignore' is set to an invalid value inside ":doau". (Antony + Scriven) +Solution: Don't include the leading comma when the option was empty. +Files: src/fileio.c + +Patch 7.2.380 (after 7.2.363) +Problem: Perl interface builds with 5.10.1 but not with 5.10.0. +Solution: Change the #ifdefs. (Sergey Khorev) +Files: src/if_perl.xs + +Patch 7.2.381 +Problem: No completion for :behave. +Solution: Add :behave completion. Minor related fixes. (Dominique Pelle) +Files: src/ex_docmd.c, src/ex_getln.c, src/proto/ex_docmd.pro, src/vim.h + +Patch 7.2.382 +Problem: Accessing freed memory when closing the cmdline window when + 'bufhide' is set to "wipe". +Solution: Check if the buffer still exists before invoking close_buffer() + (Dominique Pelle) +Files: src/ex_getln.c + +Patch 7.2.383 +Problem: Vim doesn't build cleanly with MSVC 2010. +Solution: Change a few types. (George Reilly) +Files: src/ex_cmds2.c, src/if_python.c, src/syntax.c + +Patch 7.2.384 (extra) +Problem: Vim doesn't build properly with MSVC 2010. +Solution: Add the nmake version to the build file. (George Reilly) +Files: src/Make_mvc.mak, src/testdir/Make_dos.mak + +Patch 7.2.385 +Problem: When in the command line window dragging status line only works + for last-but-one window. (Jean Johner) +Solution: Remove the code that disallows this. +Files: src/ui.c + +Patch 7.2.386 +Problem: Focus hack for KDE 3.1 causes problems for other window managers. +Solution: Remove the hack. (forwarded by Joel Bradshaw) +Files: src/gui_gtk.c + +Patch 7.2.387 +Problem: Ruby with MingW still doesn't build all versions. +Solution: More #ifdefs for the Ruby code. (Sergey Khorev) +Files: src/if_ruby.c + +Patch 7.2.388 (extra part of 7.2.387) +Problem: Ruby with MingW still doesn't build all versions. +Solution: Different approach to build file. (Sergey Khorev) +Files: src/Make_ming.mak + +Patch 7.2.389 +Problem: synIDattr() cannot return the font. +Solution: Support the "font" argument. (Christian Brabandt) +Files: runtime/doc/eval.txt, src/eval.c, src/syntax.c + +Patch 7.2.390 +Problem: In some situations the popup menu can be displayed wrong. +Solution: Remove the popup menu if the cursor moved. (Lech Lorens) +Files: src/edit.c + +Patch 7.2.391 +Problem: Internal alloc(0) error when doing "CTRL-V $ c". (Martti Kuparinen) +Solution: Fix computations in getvcol(). (partly by Lech Lorens) +Files: src/charset.c, src/memline.c + +Patch 7.2.392 +Problem: Netbeans hangs reading from a socket at the maximum block size. +Solution: Use select() or poll(). (Xavier de Gaye) +Files: src/vim.h, src/os_unixx.h, src/if_xcmdsrv.c, src/netbeans.c + +Patch 7.2.393 +Problem: Mac: Can't build with different Xcode developer tools directory. +Solution: make "Developer" directory name configurable. (Rainer Muller) +Files: src/configure.in, src/auto/configure + +Patch 7.2.394 +Problem: .lzma and .xz files are not supported. +Solution: Recognize .lzma and .xz files so that they can be edited. +Files: runtime/plugin/gzip.vim + +Patch 7.2.395 +Problem: In help CTRL=] on g?g? escapes the ?, causing it to fail. (Tony + Mechelynck) +Solution: Don't escape ? for a help command. (Sergey Khorev) +Files: src/normal.c + +Patch 7.2.396 +Problem: Get E38 errors. (Dasn) +Solution: Set cursor to line 1 instead of 0. (Dominique Pelle) +Files: src/popupmnu.c + +Patch 7.2.397 +Problem: Redundant check for w_lines_valid. +Solution: Remove the if. (Lech Lorens) +Files: src/fold.c + +Patch 7.2.398 +Problem: When moving windows the cursor ends up in the wrong line. +Solution: Set the window width and height properly. (Lech Lorens) +Files: src/window.c + +Patch 7.2.399 (extra, after 7.2.388) +Problem: Cannot compile on MingW. +Solution: Move ifneq to separate line. (Vlad Sandrini, Dominique Pelle) +Files: src/Make_ming.mak + +Patch 7.2.400 (after 7.2.387) +Problem: Dynamic Ruby is not initialised properly for version 1.9.1. + Ruby cannot create strings from NULL. +Solution: Cleanup #ifdefs. Handle NULL like an empty string. Add + ruby_init_stack. (Sergey Khorev) +Files: src/if_ruby.c + +Patch 7.2.401 +Problem: ":e dir<Tab>" with 'wildmode' set to "list" doesn't highlight + directory names with a space. (Alexandre Provencio) +Solution: Remove the backslash before checking if the name is a directory. + (Dominique Pelle) +Files: src/ex_getln.c + +Patch 7.2.402 +Problem: This gives a #705 error: let X = function('haslocaldir') + let X = function('getcwd') +Solution: Don't give E705 when the name is found in the hashtab. (Sergey + Khorev) +Files: src/eval.c + +Patch 7.2.403 (after 7.2.400) +Problem: Compiler warning for pointer type. (Tony Mechelynck) +Solution: Move type cast to the right place. +Files: src/if_ruby.c + +Patch 7.2.404 +Problem: Pointers for composing characters are not properly initialized. +Solution: Compute the size of the pointer, not what it points to. (Yukihiro + Nakadaira) +Files: src/screen.c + +Patch 7.2.405 +Problem: When built with small features the matching text is not + highlighted for ":s/pat/repl/c". +Solution: Remove the #ifdef for IncSearch. (James Vega) +Files: src/syntax.c + +Patch 7.2.406 +Problem: Patch 7.2.119 introduces uninit mem read. (Dominique Pelle) +Solution: Only used ScreeenLinesC when ScreeenLinesUC is not zero. (Yukihiro + Nakadaira) Also clear ScreeenLinesC when allocating. +Files: src/screen.c + +Patch 7.2.407 +Problem: When using an expression in ":s" backslashes in the result are + dropped. (Sergey Goldgaber, Christian Brabandt) +Solution: Double backslashes. +Files: src/regexp.c + +Patch 7.2.408 +Problem: With ":g/the/s/foo/bar/" the '[ and '] marks can be set to a line + that was not changed. +Solution: Only set '[ and '] marks when a substitution was done. +Files: src/ex_cmds.c + +Patch 7.2.409 +Problem: Summary of number of substitutes is incorrect for ":folddo". (Jean + Johner) +Solution: Reset sub_nsubs and sub_nlines in global_exe(). +Files: src/ex_cmds.c + +Patch 7.2.410 +Problem: Highlighting directories for completion doesn't work properly. +Solution: Don't halve backslashes when not needed, expanded "~/". + (Dominique Pelle) +Files: src/ex_getln.c + +Patch 7.2.411 +Problem: When parsing 'cino' a comma isn't skipped properly. +Solution: Skip the comma. (Lech Lorens) +Files: src/misc1.c + +Patch 7.2.412 +Problem: [ or ] followed by mouse click doesn't work. +Solution: Reverse check for key being a mouse event. (Dominique Pelle) +Files: src/normal.c + +Patch 7.2.413 +Problem: Large file support is incorrect. +Solution: Add AC_SYS_LARGEFILE to configure. (James Vega) +Files: src/configure.in, src/config.h.in, src/auto/configure + +Patch 7.2.414 +Problem: CTRK-K <space> <space> does not produce 0xa0 as expected. (Tony + Mechelynck) +Solution: Remove the Unicode range 0xe000 - 0xefff from digraphs, these are + not valid characters. +Files: src/digraph.c + +Patch 7.2.415 +Problem: Win32: Can't open a remote file when starting Vim. +Solution: Don't invoke cygwin_conv_path() for URLs. (Tomoya Adachi) +Files: src/main.c + +Patch 7.2.416 +Problem: Logtalk.dict is not installed. +Solution: Add it to the install target. (Markus Heidelberg) +Files: src/Makefile + +Patch 7.2.417 +Problem: When 'shell' has an argument with a slash then 'shellpipe' is not + set properly. (Britton Kerin) +Solution: Assume there are no spaces in the path, arguments follow. +Files: src/option.c + +Patch 7.2.418 +Problem: Vim tries to set the background or foreground color in a terminal + to -1. (Graywh) Happens with ":hi Normal ctermbg=NONE". +Solution: When resetting the foreground or background color don't set the + color, let the clear screen code do that. +Files: src/syntax.c + +Patch 7.2.419 +Problem: Memory leak in Motif when clicking on "Search Vim Help". +Solution: Free string returned by XmTextGetString(). (Dominique Pelle) +Files: src/gui_motif.c + +Patch 7.2.420 +Problem: ":argedit" does not accept "++enc=utf8" as documented. (Dominique + Pelle) +Solution: Add the ARGOPT flag to ":argedit". +Files: src/ex_cmds.h + +Patch 7.2.421 +Problem: Folds are sometimes not updated properly and there is no way to + force an update. +Solution: Make "zx" and "zX" recompute folds (suggested by Christian + Brabandt) +Files: src/normal.c + +Patch 7.2.422 +Problem: May get E763 when using spell dictionaries. +Solution: Avoid utf-8 case folded character to be truncated to 8 bits and + differ from latin1. (Dominique Pelle) +Files: src/spell.c + +Patch 7.2.423 +Problem: Crash when assigning s: to variable. (Yukihiro Nakadaira) +Solution: Make ga_scripts contain pointer to scriptvar_T instead of + scriptvar_T itself. (Dominique Pelle) +Files: src/eval.c + +Patch 7.2.424 +Problem: ":colorscheme" without an argument doesn't do anything. +Solution: Make it echo the current color scheme name. (partly by Christian + Brabandt) +Files: runtime/doc/syntax.txt, src/ex_cmds.h, src/ex_docmd.c + +Patch 7.2.425 +Problem: Some compilers complain about fourth EX() argument. +Solution: Add cast to long_u. +Files: src/ex_cmds.h + +Patch 7.2.426 +Problem: Commas in 'langmap' are not always handled correctly. +Solution: Require commas to be backslash escaped. (James Vega) +Files: src/option.c + +Patch 7.2.427 +Problem: The swapfile is created using the destination of a symlink, but + recovery doesn't follow symlinks. +Solution: When recovering, resolve symlinks. (James Vega) +Files: src/memline.c + +Patch 7.2.428 +Problem: Using setqflist([]) to clear the error list doesn't work properly. +Solution: Set qf_nonevalid to TRUE when appropriate. (Christian Brabandt) +Files: src/quickfix.c + +Patch 7.2.429 +Problem: A file that exists but access is denied may result in a "new file" + message. E.g. when its directory is unreadable. +Solution: Specifically check for ENOENT to decide a file doesn't exist. + (partly by James Vega) +Files: src/fileio.c + +Patch 7.2.430 +Problem: The ++bad argument is handled wrong, resulting in an invalid + memory access. +Solution: Use the bad_char field only for the replacement character, add + bad_char_idx to store the position. (Dominique Pelle) +Files: src/eval.c, src/ex_cmds.h, src/ex_docmd.c + +Patch 7.2.431 +Problem: ":amenu" moves the cursor when in Insert mode. +Solution: Use CTRL-\ CTRL-O instead of CTRL-O. (Christian Brabandt) +Files: src/menu.c + +Patch 7.2.432 +Problem: When menus are translated they can only be found by the translated + name. That makes ":emenu" difficult to use. +Solution: Store the untranslated name and use it for completion and :emenu. + (Liang Peng (Bezetek James), Edward L. Fox) +Files: src/menu.c, src/structs.h + +Patch 7.2.433 +Problem: Can't use cscope with QuickFixCmdPre and QuickFixCmdPost. +Solution: Add cscope support for these autocmd events. (Bryan Venteicher) +Files: runtime/doc/autocmd.txt, src/if_cscope.c + +Patch 7.2.434 (after 7.2.432) +Problem: Compilation fails without the multi-lang feature. +Solution: Add #ifdefs. (John Marriott) +Files: src/menu.c + +Patch 7.2.435 (after 7.2.430) +Problem: Crash when using bad_char_idx uninitialized. (Patrick Texier) +Solution: Don't use bad_char_idx, reproduce the ++bad argument from bad_char. +Files: src/eval.c, src/ex_cmds.h, src/ex_docmd.c + +Patch 7.2.436 +Problem: Reproducible crash in syntax HL. (George Reilly, Dominique Pelle) +Solution: Make sst_stacksize an int instead of short. (Dominique Pelle) +Files: src/structs.h + +Patch 7.2.437 (after 7.2.407) +Problem: When "\\\n" appears in the expression result the \n doesn't result + in a line break. (Andy Wokula) +Solution: Also replace a \n after a backslash into \r. +Files: src/regexp.c + +Patch 7.2.438 (after 7.2.427) +Problem: "vim -r" crashes. +Solution: Don't use NULL pointer argument. +Files: src/memline.c + +Patch 7.2.439 +Problem: Invalid memory access when doing thesaurus completion and + 'infercase' is set. +Solution: Use the minimal length of completed word and replacement. + (Dominique Pelle) +Files: src/edit.c + +Patch 7.2.440 +Problem: Calling a function through a funcref, where the function deletes + the funcref, leads to an invalid memory access. +Solution: Make a copy of the function name. (Lech Lorens) +Files: src/eval.c, src/testdir/test34.in, src/testdir/test34.ok + +Patch 7.2.441 +Problem: When using ":earlier" undo information may be wrong. +Solution: When changing alternate branches also adjust b_u_oldhead. +Files: src/undo.c + +Patch 7.2.442 (after 7.2.201) +Problem: Copy/paste with OpenOffice doesn't work. +Solution: Do not offer the HTML target when it is not supported. (James + Vega) +Files: src/gui_gtk_x11.c, src/option.c, src/proto/gui_gtk_x11.pro + +Patch 7.2.443 +Problem: Using taglist() on a tag file with duplicate fields generates an + internal error. (Peter Odding) +Solution: Check for duplicate field names. +Files: src/eval.c, src/proto/eval.pro, src/tag.c + +Patch 7.2.444 (after 7.2.442) +Problem: Can't build with GTK 1, gtk_selection_clear_targets() is not + available. (Patrick Texier) +Solution: Don't change the targets for GTK 1, set them once. +Files: src/gui_gtk_x11.c, src/option.c + +Patch 7.2.445 +Problem: Crash when using undo/redo and a FileChangedRO autocmd event that + reloads the buffer. (Dominique Pelle) +Solution: Do not allow autocommands while performing and undo or redo. +Files: src/misc1.c, src/undo.c + +Patch 7.2.446 +Problem: Crash in GUI when closing the last window in a tabpage. (ryo7000) +Solution: Remove the tabpage from the list before freeing the window. +Files: src/window.c + +When writing a file, switching tab pages and selecting a word the file write +message would be displayed again. This happened in Insert mode and with +'cmdheight' set to 2. + +When using ":lang" to set a locale that uses a comma for decimal separator and +using GTK floating point numbers stop working. Use gtk_disable_setlocale(). +(James Vega) + +"g8" didn't produce the right value on a NUL. (Dominique Pelle) + +Use BASEMODLIBS instead of MODLIBS for Python configuration to pick up the +right compiler flags. (Michael Bienia) + +Window title was not updated after dropping a file on Vim. (Hari G) + +synstack() did not return anything when just past the end of the line. Useful +when using the cursor position in Insert mode. + +When entering a digraph or special character after a line that fits the window +the '?' or '^' on the next line is not redrawn. (Ian Kelling) + +Composing characters in |:s| substitute text were dropped. + +|exists()| was causing an autoload script to be loaded. + +Filter out -pthread for cproto. + +Make CTRL-L in command line mode respect 'ignorecase' and 'smartcase'. (Martin +Toft) + +Spell menu moved the cursor, causing Copy not to work. Spell replacement +didn't work in 'compatible' mode. + +Various small fixes from Dominique Pelle. + +Fix that :mksession may generate "2argu" even though there is no such +argument. (Peter Odding) + +Fixes for time in clipboard request. Also fix ownership. (David Fries) + +Fixed completion of file names with '%' and '*'. + +Fixed MSVC makefile use of /Wp64 flag. + +Correct use of long instead of off_t for file size. (James Vega) + +Add a few #ifdefs to exclude functions that are not used. (Dominique Pelle) + +Remove old and unused method to allocate memory for undo. + +Fix definition of UINT_PTR for 64 bit systems. + +Some versions of Ruby redefine rb_str_new2 to rb_str_new_cstr. + +Window title not updated after file dropped. + +Fixed crash for ":find" completion, might also happen in other path expansion +usage. + +When 'searchhl' causes a hang make CTRL-C disable 'searchhl'. + +When resetting both 'title' and 'icon' the title would be set after a shell +command. + +Reset 'title' and 'icon' in test47 to avoid the xterm title getting messed up. + +Fix for compiler warning about function prototype in pty.c. + +Added 'window' to the options window. + +Fixed: errors for allocating zero bytes when profiling an empty function. + +Remove -arch flag from build flags for Perl. (Bjorn Wickler) + +Fix 'autochdir' not showing up in :options window. (Dominique Pelle) + +Fix: test 69 didn't work on MS-Windows. Test 72 beeped too often. + +Avoid illegal memory access in spell suggestion. (Dominique Pelle) +Fix: crash in spell checking with a 0x300 character. + +Avoid that running tests changes viminfo. + +Fix: changing case of a character removed combining characters. +Fixed: CTRL-R in Insert mode doesn't insert composing characters. + +Added the WOW64 flag to OLE registration, for 64 bit Windows systems. + +Various fixes for coverity warnings. + +Fix compile warnings, esp. for 64-bit systems. (Mike Williams) + +Fix: :redir to a dictionary that is changed before ":redir END" causes a +memory access error. + +Fix: terminal title not properly restored when there are multi-byte +characters. (partly by James Vega) + +Set 'wrapscan' when checking the .po files. (Mike Williams) + +Win32: Put quotes around the gvim.exe path for the "Open with" menu entry. + +On MS-Windows sometimes files with number 4913 or higher are left behind. + +'suffixesadd' was used for finding tags file. + +Removed unused code. + +Improved positioning of combining characters in GTK. + +Made test 11 pass when there is no gzip program. (John Beckett) + +Changed readfile() to ignore byte order marks, unless in binary mode. + +On MS-Windows completion of shell commands didn't work. + +An unprintable multi-byte character at the start of the screen line caused the +following text to be drawn at the wrong position. + +Got ml_get errors when using undo with 'virtualedit'. + +Call gui_mch_update() before triggering GuiEnter autocmd. (Ron Aaron) + +Unix "make install" installed a few Amiga .info files. + +Disallow setting 'ambiwidth' to "double" when 'listchars' or 'fillchars' +contains a character that would become double width. + +Set 'wrapscan' when checking the .po files. (Mike Williams) + +Fixed: using expression in command line may cause a crash. + +Avoid warnings from the clang compiler. (Dominique Pelle) + +Fix: Include wchar.h in charset.c for towupper(). + +Fixed: Using ":read file" in an empty buffer when 'compatible' is set caused +an error. Was caused by patch 7.2.132. + +Make the references to features in the help more consistent. (Sylvain Hitier) + +============================================================================== +VERSION 7.4 *version-7.4* *version7.4* + +This section is about improvements made between version 7.3 and 7.4. + +This release has hundreds of bug fixes and there are a few new features. The +most notable new features are: + +- New regexp engine |new-regexp-engine| +- A more pythonic Python interface |better-python-interface| + + +New regexp engine *new-regexp-engine* +----------------- + +What is now called the "old" regexp engine uses a backtracking algorithm. It +tries to match the pattern with the text in one way, and when that fails it +goes back and tries another way. This works fine for simple patterns, but +complex patterns can be very slow on longer text. + +The new engine uses a state machine. It tries all possible alternatives at +the current character and stores the possible states of the pattern. This is +a bit slower for simple patterns, but much faster for complex patterns and +long text. + +Most notably, syntax highlighting for Javascript and XML files with long lines +is now working fine. Previously Vim could get stuck. + +More information here: |two-engines| + + +Better Python interface *better-python-interface* +----------------------- + +Added |python-bindeval| function. Unlike |python-eval| this one returns +|python-Dictionary|, |python-List| and |python-Function| objects for +dictionaries lists and functions respectively in place of their Python +built-in equivalents (or None if we are talking about function references). + For simple types this function returns Python built-in types and not only +Python `str()` like |python-eval| does. On Python 3 it will return `bytes()` +objects in place of `str()` ones avoiding possibility of UnicodeDecodeError. + Interface of new objects mimics standard Python `dict()` and `list()` +interfaces to some extent. Extent will be improved in the future. + +Added special |python-vars| objects also available for |python-buffer| and +|python-window|. They ease access to VimL variables from Python. + +Now you no longer need to alter `sys.path` to import your module: special +hooks are responsible for importing from {rtp}/python2, {rtp}/python3 and +{rtp}/pythonx directories (for Python 2, Python 3 and both respectively). +See |python-special-path|. + +Added possibility to work with |tabpage|s through |python-tabpage| object. + +Added automatic conversion of Vim errors and exceptions to Python +exceptions. + +Changed the behavior of the |python-buffers| object: it now uses buffer numbers +as keys in place of the index of the buffer in the internal buffer list. +This should not break anything as the only way to get this index was +iterating over |python-buffers|. + +Added |:pydo| and |:py3do| commands. + +Added the |pyeval()| and |py3eval()| functions. + +Now in all places which previously accepted `str()` objects, `str()` and +`unicode()` (Python 2) or `bytes()` and `str()` (Python 3) are accepted. + +|python-window| has gained `.col` and `.row` attributes that are currently +the only way to get internal window positions. + +Added or fixed support for `dir()` in Vim Python objects. + + +Changed *changed-7.4* +------- + +Old Python versions (≤2.2) are no longer supported. Building with them did +not work anyway. + +Options: + Added ability to automatically save the selection into the system + clipboard when using non-GUI version of Vim (autoselectplus in + 'clipboard'). Also added ability to use the system clipboard as + default register (previously only primary selection could be used). + (Ivan Krasilnikov, Christian Brabandt, Bram Moolenaar) + + Added a special 'shiftwidth' value that makes 'sw' follow 'tabstop'. + As indenting via 'indentexpr' became tricky |shiftwidth()| function + was added. Also added equivalent special value to 'softtabstop' + option. (Christian Brabandt, so8res) + + Show absolute number in number column when 'relativenumber' option is + on. Now there are four combinations with 'number' and + 'relativenumber'. (Christian Brabandt) + +Commands: + |:diffoff| now saves the local values of some settings and restores + them in place of blindly resetting them to the defaults. (Christian + Brabandt) + +Other: + Lua interface now also uses userdata binded to Vim structures. (Taro + Muraoka, Luis Carvalho) + + glob() and autocommand patterns used to work with the undocumented + "\{n,m\}" item from a regexp. "\{" is now used for a literal "{", as + this is normal in shell file patterns. Now used "\\\{n,m\}" to get + "\{n,m}" in the regexp pattern. + +Added *added-7.4* +----- + +Various syntax, indent and other plugins were added. + +Added support for |Lists| and |Dictionaries| in |viminfo|. (Christian +Brabandt) + +Functions: + Bitwise functions: |and()|, |or()|, |invert()|, |xor()|. + + Added |luaeval()| function. (Taro Muraoka, Luis Carvalho) + + Added |sha256()| function. (Tyru, Hirohito Higashi) + + Added |wildmenumode()| function. (Christian Brabandt) + + Debugging functions: |screenattr()|, |screenchar()|, |screencol()|, + |screenrow()|. (Simon Ruderich, Bram Moolenaar) + + Added ability to use |Dictionary-function|s for |sort()|ing, via + optional third argument. (Nikolay Pavlov) + + Added special |expand()| argument that expands to the current line + number. + + Made it possible to force |char2nr()| to always give unicode codepoints + regardless of current encoding. (Yasuhiro Matsumoto) + + Made it possible for functions generating file list generate |List| + and not NL-separated string. (e.g. |glob()|, |expand()|) (Christian + Brabandt) + + Functions that obtain variables from the specific window, tabpage or + buffer scope dictionary can now return specified default value in + place of empty string in case variable is not found. (|gettabvar()|, + |getwinvar()|, |getbufvar()|) (Shougo Matsushita, Hirohito Higashi) + +Autocommands: + Added |InsertCharPre| event launched before inserting character. + (Jakson A. Aquino) + + Added |CompleteDone| event launched after finishing completion in + insert mode. (idea by Florian Klein) + + Added |QuitPre| event launched when commands that can either close Vim + or only some window(s) are launched. + + Added |TextChanged| and |TextChangedI| events launched when text is + changed. + +Commands: + |:syntime| command useful for debugging. + + Made it possible to remove all signs from the current buffer using + |:sign-unplace|. (Christian Brabandt) + + Added |:language| autocompletion. (Dominique Pelle) + + Added more |:command-complete| completion types: |:behave| suboptions, + color schemes, compilers, |:cscope| suboptions, files from 'path', + |:history| suboptions, locale names, |:syntime| suboptions, user + names. (Dominique Pelle) + + Added |:map-nowait| creating mapping which when having lhs that is the + prefix of another mapping’s lhs will not allow Vim to wait for user to + type more characters to resolve ambiguity, forcing Vim to take the + shorter alternative: one with <nowait>. + +Options: + Made it possible to ignore case when completing: 'wildignorecase'. + + Added ability to delete comment leader when using |J| by `j` flag in + 'formatoptions' (|fo-table|). (Lech Lorens) + + Added ability to control indentation inside namespaces: |cino-N|. + (Konstantin Lepa) + + Added ability to control alignment inside `if` condition separately + from alignment inside function arguments: |cino-k|. (Lech Lorens) + +Other: + Improved support for cmd.exe. (Ben Fritz, Bram Moolenaar) + + Added |v:windowid| variable containing current window number in GUI + Vim. (Christian J. Robinson, Lech Lorens) + + Added rxvt-unicode and SGR mouse support. (Yiding Jia, Hayaki Saito) + + +All changes in 7.4 *fixed-7.4* +------------------ + +Patch 7.3.001 +Problem: When editing "src/main.c" and 'path' set to "./proto", + ":find e<C-D" shows ./proto/eval.pro instead of eval.pro. +Solution: Check for path separator when comparing names. (Nazri Ramliy) +Files: src/misc1.c + +Patch 7.3.002 +Problem: ":find" completion doesn't work when halfway an environment + variable. (Dominique Pelle) +Solution: Only use in-path completion when expanding file names. (Nazri + Ramliy) +Files: src/ex_docmd.c + +Patch 7.3.003 +Problem: Crash with specific BufWritePost autocmd. (Peter Odding) +Solution: Don't free the quickfix title twice. (Lech Lorens) +Files: src/quickfix.c + +Patch 7.3.004 +Problem: Crash when using very long regexp. (Peter Odding) +Solution: Reset reg_toolong. (Carlo Teubner) +Files: src/regexp.c + +Patch 7.3.005 +Problem: Crash when using undotree(). (Christian Brabandt) +Solution: Increase the list reference count. Add a test for undotree() + (Lech Lorens) +Files: src/eval.c, src/testdir/Makefile, src/testdir/test61.in + +Patch 7.3.006 +Problem: Can't build some multi-byte code with C89. +Solution: Move code to after declarations. (Joachim Schmitz) +Files: src/mbyte.c, src/spell.c + +Patch 7.3.007 +Problem: Python code defines global "buffer". Re-implements a grow-array. +Solution: Use a grow-array instead of coding the same functionality. Handle + out-of-memory situation properly. +Files: src/if_py_both.h + +Patch 7.3.008 +Problem: 'cursorbind' is kept in places where 'scrollbind' is reset. +Solution: Reset 'cursorbind'. +Files: src/buffer.c, src/diff.c, src/ex_cmds.c, src/ex_cmds2.c, + src/ex_docmd.c, src/ex_getln.c, src/if_cscope.c, src/macros.h, + src/quickfix.c, src/search.c, src/tag.c, src/window.c + +Patch 7.3.009 +Problem: Win32: Crash on Windows when using a bad argument for strftime(). + (Christian Brabandt) +Solution: Use the bad_param_handler(). (Mike Williams) +Files: src/os_win32.c + +Patch 7.3.010 +Problem: Mac GUI: Missing break statements. +Solution: Add the break statements. (Dominique Pelle) +Files: src/gui_mac.c + +Patch 7.3.011 +Problem: X11 clipboard doesn't work in Athena/Motif GUI. First selection + after a shell command doesn't work. +Solution: When using the GUI use XtLastTimestampProcessed() instead of + changing a property. (partly by Toni Ronkko) + When executing a shell command disown the selection. +Files: src/ui.c, src/os_unix.c + +Patch 7.3.012 +Problem: Problems building with MingW. +Solution: Adjust the MingW makefiles. (Jon Maken) +Files: src/Make_ming.mak, src/GvimExt/Make_ming.mak + +Patch 7.3.013 +Problem: Dynamic loading with Ruby doesn't work for 1.9.2. +Solution: Handle rb_str2cstr differently. Also support dynamic loading on + Unix. (Jon Maken) +Files: src/if_ruby.c + +Patch 7.3.014 +Problem: Ending a line in a backslash inside an ":append" or ":insert" + command in Ex mode doesn't work properly. (Ray Frush) +Solution: Halve the number of backslashes, only insert a NUL after an odd + number of backslashes. +Files: src/ex_getln.c + +Patch 7.3.015 +Problem: Test is using error message that no longer exists. +Solution: Change E106 to E121. (Dominique Pelle) +Files: src/testdir/test49.vim + +Patch 7.3.016 +Problem: Netbeans doesn't work under Athena. +Solution: Support Athena, just like Motif. (Xavier de Gaye) +Files: runtime/doc/netbeans.txt, src/gui.c, src/main.c, src/netbeans.c + +Patch 7.3.017 +Problem: smatch reports errors. +Solution: Fix the reported errors. (Dominique Pelle) +Files: src/spell.c, src/syntax.c + +Patch 7.3.018 (after 7.3.012) +Problem: Missing argument to windres in MingW makefiles. +Solution: Add the argument that was wrapped in the patch. (Jon Maken) +Files: src/Make_ming.mak, src/GvimExt/Make_ming.mak + +Patch 7.3.019 +Problem: ":nbstart" can fail silently. +Solution: Give an error when netbeans is not supported by the GUI. (Xavier + de Gaye) +Files: src/netbeans.c + +Patch 7.3.020 +Problem: Cursor position wrong when joining multiple lines and + 'formatoptions' contains "a". (Moshe Kamensky) +Solution: Adjust cursor position for skipped indent. (Carlo Teubner) +Files: src/ops.c, src/testdir/test68.in, src/testdir/test68.ok + +Patch 7.3.021 +Problem: Conflict for defining Boolean in Mac header files. +Solution: Define NO_X11_INCLUDES. (Rainer Muller) +Files: src/os_macosx.m, src/vim.h + +Patch 7.3.022 +Problem: When opening a new window the 'spellcapcheck' option is cleared. +Solution: Copy the correct option value. (Christian Brabandt) +Files: src/option.c + +Patch 7.3.023 +Problem: External program may hang when it tries to write to the tty. +Solution: Don't close the slave tty until after the child exits. (Nikola + Knezevic) +Files: src/os_unix.c + +Patch 7.3.024 +Problem: Named signs do not use a negative number as intended. +Solution: Fix the numbering of named signs. (Xavier de Gaye) +Files: src/ex_cmds.c + +Patch 7.3.025 +Problem: ":mksession" does not square brackets escape file name properly. +Solution: Improve escaping of file names. (partly by Peter Odding) +Files: src/ex_docmd.c + +Patch 7.3.026 +Problem: CTRL-] in a help file doesn't always work. (Tony Mechelynck) +Solution: Don't escape special characters. (Carlo Teubner) +Files: src/normal.c + +Patch 7.3.027 +Problem: Opening a file on a network share is very slow. +Solution: When fixing file name case append "\*" to directory, server and + network share names. (David Anderson, John Beckett) +Files: src/os_win32.c + +Patch 7.3.028 (after 7.3.024) +Problem: Signs don't show up. (Charles Campbell) +Solution: Don't use negative numbers. Also assign a number to signs that + have a name of all digits to avoid using a sign number twice. +Files: src/ex_cmds.c + +Patch 7.3.029 +Problem: ":sort n" sorts lines without a number as number zero. (Beeyawned) +Solution: Make lines without a number sort before lines with a number. Also + fix sorting negative numbers. +Files: src/ex_cmds.c, src/testdir/test57.in, src/testdir/test57.ok + +Patch 7.3.030 +Problem: Cannot store Dict and List in viminfo file. +Solution: Add support for this. (Christian Brabandt) +Files: runtime/doc/options.txt, src/eval.c, src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mms, + src/testdir/Makefile, src/testdir/main.aap, src/testdir/test74.in, + src/testdir/test74.ok + +Patch 7.3.031 +Problem: Can't pass the X window ID to another application. +Solution: Add v:windowid. (Christian J. Robinson, Lech Lorens) +Files: runtime/doc/eval.txt, src/eval.c, src/gui.c, src/vim.h, + src/os_unix.c + +Patch 7.3.032 +Problem: maparg() doesn't return the flags, such as <buffer>, <script>, + <silent>. These are needed to save and restore a mapping. +Solution: Improve maparg(). (also by Christian Brabandt) +Files: runtime/doc/eval.txt, src/eval.c, src/getchar.c, src/gui_w48.c, + src/message.c, src/proto/getchar.pro, src/proto/message.pro, + src/structs.h src/testdir/test75.in, src/testdir/test75.ok + +Patch 7.3.033 (after 7.3.032) +Problem: Can't build without FEAT_LOCALMAP. +Solution: Add an #ifdef. (John Marriott) +Files: src/getchar.c + +Patch 7.3.034 +Problem: Win32: may be loading .dll from the wrong directory. +Solution: Go to the Vim executable directory when opening a library. +Files: src/gui_w32.c, src/if_lua.c, src/if_mzsch.c, src/if_perl.xs, + src/if_python.c, src/if_python3.c, src/if_ruby.c, src/mbyte.c, + src/os_mswin.c, src/os_win32.c, src/proto/os_win32.pro + +Patch 7.3.035 (after 7.3.034) +Problem: Stray semicolon after if statement. (Hari G) +Solution: Remove the semicolon. +Files: src/os_win32.c + +Patch 7.3.036 +Problem: Win32 GUI: When building without menus, the font for dialogs and + tab page headers also changes. +Solution: Define USE_SYSMENU_FONT always. (Harig G.) +Files: src/gui_w32.c + +Patch 7.3.037 +Problem: Compiler warnings for loss of data. (Mike Williams) +Solution: Add type casts. +Files: src/if_py_both.h, src/getchar.c, src/os_win32.c + +Patch 7.3.038 +Problem: v:windowid isn't set on MS-Windows. +Solution: Set it to the window handle. (Chris Sutcliffe) +Files: runtime/doc/eval.txt, src/gui_w32.c + +Patch 7.3.039 +Problem: Crash when using skk.vim plugin. +Solution: Get length of expression evaluation result only after checking for + NULL. (Noriaki Yagi, Dominique Pelle) +Files: src/ex_getln.c + +Patch 7.3.040 +Problem: Comparing strings while ignoring case goes beyond end of the + string when there are illegal bytes. (Dominique Pelle) +Solution: Explicitly check for illegal bytes. +Files: src/mbyte.c + +Patch 7.3.041 +Problem: Compiler warning for accessing mediumVersion. (Tony Mechelynck) +Solution: Use the pointer instead of the array itself. (Dominique Pelle) +Files: src/version.c + +Patch 7.3.042 +Problem: No spell highlighting when re-using an empty buffer. +Solution: Clear the spell checking info only when clearing the options for a + buffer. (James Vega) +Files: src/buffer.c + +Patch 7.3.043 +Problem: Can't load Ruby dynamically on Unix. +Solution: Adjust the configure script. (James Vega) +Files: src/Makefile, src/config.h.in, src/configure.in, + src/auto/configure, src/if_ruby.c + +Patch 7.3.044 +Problem: The preview window opened by the popup menu is larger than + specified with 'previewheight'. (Benjamin Haskell) +Solution: Use 'previewheight' if it's set and smaller. +Files: src/popupmnu.c + +Patch 7.3.045 +Problem: Compiler warning for uninitialized variable. +Solution: Initialize the variable always. +Files: src/getchar.c + +Patch 7.3.046 (after 7.3.043) +Problem: Can't build Ruby on MS-Windows. +Solution: Add #ifdef, don't use WIN3264 before including vim.h. +Files: src/if_ruby.c + +Patch 7.3.047 (after 7.3.032) +Problem: Missing makefile updates for test 75. +Solution: Update the makefiles. +Files: src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Makefile, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mms + +Patch 7.3.048 +Problem: ":earlier 1f" doesn't work after loading undo file. +Solution: Set b_u_save_nr_cur when loading an undo file. (Christian + Brabandt) + Fix only showing time in ":undolist" +Files: src/undo.c + +Patch 7.3.049 +Problem: PLT has rebranded their Scheme to Racket. +Solution: Add support for Racket 5.x. (Sergey Khorev) +Files: src/Make_cyg.mak, src/Make_ming.mak, src/Make_mvc.mak, + src/auto/configure, src/configure.in, src/if_mzsch.c + +Patch 7.3.050 +Problem: The link script is clumsy. +Solution: Use the --as-needed linker option if available. (Kirill A. + Shutemov) +Files: src/Makefile, src/auto/configure, src/config.mk.in, + src/configure.in, src/link.sh + +Patch 7.3.051 +Problem: Crash when $PATH is empty. +Solution: Check for vim_getenv() returning NULL. (Yasuhiro Matsumoto) +Files: src/ex_getln.c, src/os_win32.c + +Patch 7.3.052 +Problem: When 'completefunc' opens a new window all kinds of errors follow. + (Xavier Deguillard) +Solution: When 'completefunc' goes to another window or buffer and when it + deletes text abort completion. Add a test for 'completefunc'. +Files: src/edit.c, src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Make_os2.mak, + src/testdir/Make_vms.mms, src/testdir/Makefile, + src/testdir/test76.in, src/testdir/test76.ok + +Patch 7.3.053 +Problem: complete() function doesn't reset complete direction. Can't use + an empty string in the list of matches. +Solution: Set compl_direction to FORWARD. Add "empty" key to allow empty + words. (Kikuchan) +Files: src/edit.c + +Patch 7.3.054 +Problem: Can define a user command for :Print, but it doesn't work. (Aaron + Thoma) +Solution: Let user command :Print overrule the builtin command (Christian + Brabandt) Disallow :X and :Next as a user defined command. +Files: src/ex_docmd.c + +Patch 7.3.055 +Problem: Recursively nested lists and dictionaries cause a near-endless + loop when comparing them with a copy. (ZyX) +Solution: Limit recursiveness in a way that non-recursive structures can + still be nested very deep. +Files: src/eval.c, src/testdir/test55.in, src/testdir/test55.ok + +Patch 7.3.056 +Problem: "getline" argument in do_cmdline() shadows global. +Solution: Rename the argument. +Files: src/ex_docmd.c + +Patch 7.3.057 +Problem: Segfault with command line abbreviation. (Randy Morris) +Solution: Don't retrigger the abbreviation when abandoning the command line. + Continue editing the command line after the error. +Files: src/ex_getln.c + +Patch 7.3.058 +Problem: Error "code converter not found" when loading Ruby script. +Solution: Load Gem module. (Yasuhiro Matsumoto) +Files: src/if_ruby.c + +Patch 7.3.059 +Problem: Netbeans: Problem with recursively handling messages for Athena + and Motif. +Solution: Call netbeans_parse_messages() in the main loop, like it's done + for GTK. (Xavier de Gaye) +Files: src/gui_x11.c, src/netbeans.c + +Patch 7.3.060 +Problem: Netbeans: crash when socket is disconnected unexpectedly. +Solution: Don't cleanup when a read fails, put a message in the queue and + disconnect later. (Xavier de Gaye) +Files: src/netbeans.c + +Patch 7.3.061 +Problem: Remote ":drop" does not respect 'autochdir'. (Peter Odding) +Solution: Don't restore the directory when 'autochdir' is set. (Benjamin + Fritz) +Files: src/main.c + +Patch 7.3.062 +Problem: Python doesn't work properly when installed in another directory + than expected. +Solution: Figure out home directory in configure and use Py_SetPythonHome() + at runtime. (Roland Puntaier) +Files: src/configure.in, src/auto/configure, src/if_python.c, + src/if_python3.c + +Patch 7.3.063 +Problem: Win32: Running a filter command makes Vim lose focus. +Solution: Use SW_SHOWMINNOACTIVE instead of SW_SHOWMINIMIZED. (Hong Xu) +Files: src/os_win32.c + +Patch 7.3.064 +Problem: Win32: ":dis +" shows nothing, but "+p does insert text. +Solution: Display the * register, since that's what will be inserted. + (Christian Brabandt) +Files: src/globals.h, src/ops.c + +Patch 7.3.065 +Problem: Can't get current line number in a source file. +Solution: Add the <slnum> item, similar to <sfile>. +Files: src/ex_docmd.c + +Patch 7.3.066 +Problem: Crash when changing to another window while in a :vimgrep command. + (Christian Brabandt) +Solution: When wiping out the dummy before, remove it from aucmd_win. +Files: src/quickfix.c + +Patch 7.3.067 (after 7.3.058) +Problem: Ruby: Init_prelude is not always available. +Solution: Remove use of Init_prelude. (Yasuhiro Matsumoto) +Files: src/if_ruby.c + +Patch 7.3.068 +Problem: Using freed memory when doing ":saveas" and an autocommand sets + 'autochdir'. (Kevin Klement) +Solution: Get the value of fname again after executing autocommands. +Files: src/ex_cmds.c + +Patch 7.3.069 +Problem: GTK: pressing Enter in inputdialog() doesn't work like clicking OK + as documented. +Solution: call gtk_entry_set_activates_default(). (Britton Kerin) +Files: src/gui_gtk.c + +Patch 7.3.070 +Problem: Can set environment variables in the sandbox, could be abused. +Solution: Disallow it. +Files: src/eval.c + +Patch 7.3.071 +Problem: Editing a file in a window that's in diff mode resets 'diff' + but not cursor binding. +Solution: Reset cursor binding in two more places. +Files: src/quickfix.c, src/option.c + +Patch 7.3.072 +Problem: Can't complete file names while ignoring case. +Solution: Add 'wildignorecase'. +Files: src/ex_docmd.c, src/ex_getln.c, src/misc1.c, src/option.c, + src/option.h, src/vim.h, src/runtime/options.txt + +Patch 7.3.073 +Problem: Double free memory when netbeans command follows DETACH. +Solution: Only free the node when owned. (Xavier de Gaye) +Files: src/netbeans.c + +Patch 7.3.074 +Problem: Can't use the "+ register like "* for yank and put. +Solution: Add "unnamedplus" to the 'clipboard' option. (Ivan Krasilnikov) +Files: runtime/doc/options.txt, src/eval.c, src/globals.h, src/ops.c, + src/option.c + +Patch 7.3.075 (after 7.3.072) +Problem: Missing part of 'wildignorecase' +Solution: Also adjust expand() +Files: src/eval.c + +Patch 7.3.076 +Problem: Clang warnings for dead code. +Solution: Remove it. (Carlo Teubner) +Files: src/gui_gtk.c, src/if_ruby.c, src/misc2.c, src/netbeans.c, + src/spell.c + +Patch 7.3.077 +Problem: When updating crypt of swapfile fails there is no error message. + (Carlo Teubner) +Solution: Add the error message. +Files: src/memline.c + +Patch 7.3.078 +Problem: Warning for unused variable. +Solution: Adjust #ifdefs. +Files: src/ops.c + +Patch 7.3.079 +Problem: Duplicate lines in makefile. +Solution: Remove the lines. (Hong Xu) +Files: src/Make_mvc.mak + +Patch 7.3.080 +Problem: Spell doesn't work on VMS. +Solution: Use different file names. (Zoltan Bartos, Zoltan Arpadffy) +Files: src/spell.c + +Patch 7.3.081 +Problem: Non-printable characters in 'statusline' cause trouble. (ZyX) +Solution: Use transstr(). (partly by Caio Ariede) +Files: src/screen.c + +Patch 7.3.082 +Problem: Leaking file descriptor when hostname doesn't exist. +Solution: Remove old debugging lines. +Files: src/netbeans.c + +Patch 7.3.083 +Problem: When a read() or write() is interrupted by a signal it fails. +Solution: Add read_eintr() and write_eintr(). +Files: src/fileio.c, src/proto/fileio.pro, src/memfile.c, src/memline.c, + src/os_unix.c, src/undo.c, src/vim.h + +Patch 7.3.084 +Problem: When splitting the window, the new one scrolls with the cursor at + the top. +Solution: Compute w_fraction before setting the new height. +Files: src/window.c + +Patch 7.3.085 (after 7.3.083) +Problem: Inconsistency with preproc symbols. void * computation. +Solution: Include vimio.h from vim.h. Add type cast. +Files: src/eval.c, src/ex_cmds.c, src/ex_cmds2.c, src/fileio.c, + src/if_cscope.c, src/if_sniff.c, src/main.c, src/memfile.c, + src/memline.c, src/netbeans.c, src/os_msdos.c, src/os_mswin.c, + src/os_win16.c, src/os_win32.c, src/spell.c, src/tag.c, + src/undo.c, src/vim.h + +Patch 7.3.086 +Problem: When using a mapping with an expression and there was no count, + v:count has the value of the previous command. (ZyX) +Solution: Also set v:count and v:count1 before getting the character that + could be a command or a count. +Files: src/normal.c + +Patch 7.3.087 +Problem: EINTR is not always defined. +Solution: Include errno.h in vim.h. +Files: src/if_cscope.c, src/if_tcl.c, src/integration.c, src/memline.c, + src/os_mswin.c, src/os_win16.c, src/os_win32.c, src/vim.h, + src/workshop.c + +Patch 7.3.088 +Problem: Ruby can't load Gems sometimes, may cause a crash. +Solution: Undefine off_t. Use ruby_process_options(). (Yasuhiro Matsumoto) +Files: src/if_ruby.c + +Patch 7.3.089 +Problem: Compiler warning on 64 bit MS-Windows. +Solution: Add type cast. (Mike Williams) +Files: src/netbeans.c + +Patch 7.3.090 +Problem: Wrong help text for Cscope. +Solution: Adjust the help text for "t". (Dominique Pelle) +Files: src/if_cscope.c + +Patch 7.3.091 +Problem: "vim -w foo" writes special key codes for removed escape + sequences. (Josh Triplett) +Solution: Don't write K_IGNORE codes. +Files: src/getchar.c, src/misc1.c, src/term.c, src/vim.h + +Patch 7.3.092 +Problem: Resizing the window when exiting. +Solution: Don't resize when exiting. +Files: src/term.c + +Patch 7.3.093 +Problem: New DLL dependencies in MingW with gcc 4.5.0. +Solution: Add STATIC_STDCPLUS, LDFLAGS and split up WINDRES. (Guopeng Wen) +Files: src/GvimExt/Make_ming.mak, src/Make_ming.mak + +Patch 7.3.094 +Problem: Using abs() requires type cast to int. +Solution: Use labs() so that the value remains long. (Hong Xu) +Files: src/screen.c + +Patch 7.3.095 +Problem: Win32: In Chinese tear-off menu doesn't work. (Weasley) +Solution: Use menu_name_equal(). (Alex Jakushev) +Files: src/menu.c + +Patch 7.3.096 +Problem: "gvim -nb" is not interruptible. Leaking file descriptor on + netbeans connection error. +Solution: Check for CTRL-C typed. Free file descriptor. (Xavier de Gaye) +Files: src/netbeans.c + +Patch 7.3.097 +Problem: Using ":call" inside "if 0" does not see that a function returns a + Dict and gives error for "." as string concatenation. +Solution: Use eval0() to skip over the expression. (Yasuhiro Matsumoto) +Files: src/eval.c + +Patch 7.3.098 +Problem: Function that ignores error still causes called_emsg to be set. + E.g. when expand() fails the status line is disabled. +Solution: Move check for emsg_not_now() up. (James Vega) +Files: src/message.c + +Patch 7.3.099 +Problem: Crash when splitting a window with zero height. (Yukihiro + Nakadaira) +Solution: Don't set the fraction in a window with zero height. +Files: src/window.c + +Patch 7.3.100 +Problem: When using :normal v:count isn't set. +Solution: Call normal_cmd() with toplevel set to TRUE. +Files: src/ex_docmd.c + +Patch 7.3.101 +Problem: ino_t defined with wrong size. +Solution: Move including auto/config.h before other includes. (Marius + Geminas) +Files: src/if_ruby.c, src/if_lua.c + +Patch 7.3.102 +Problem: When using ":make", typing the next command and then getting the + "reload" prompt the next command is (partly) eaten by the reload + prompt. +Solution: Accept ':' as a special character at the reload prompt to accept + the default choice and execute the command. +Files: src/eval.c, src/fileio.c, src/gui.c, src/gui_xmdlg.c, + src/memline.c, src/message.c, src/proto/message.pro, + src/gui_athena.c, src/gui_gtk.c, src/gui_mac.c, src/gui_motif.c, + src/gui_photon.c, src/gui_w16.c, src/gui_w32.c, src/os_mswin.c + src/proto/gui_athena.pro, src/proto/gui_gtk.pro, + src/proto/gui_mac.pro, src/proto/gui_motif.pro, + src/proto/gui_photon.pro, src/proto/gui_w16.pro, + src/proto/gui_w32.pro + +Patch 7.3.103 +Problem: Changing 'fileformat' and then using ":w" in an empty file sets + the 'modified' option. +Solution: In unchanged() don't ignore 'ff' for an empty file. +Files: src/misc1.c, src/option.c, src/proto/option.pro, src/undo.c + +Patch 7.3.104 +Problem: Conceal: using Tab for cchar causes problems. (ZyX) +Solution: Do not accept a control character for cchar. +Files: src/syntax.c + +Patch 7.3.105 +Problem: Can't get the value of "b:changedtick" with getbufvar(). +Solution: Make it work. (Christian Brabandt) +Files: src/eval.c + +Patch 7.3.106 +Problem: When 'cursorbind' is set another window may scroll unexpectedly + when 'scrollbind' is also set. (Xavier Wang) +Solution: Don't call update_topline() if 'scrollbind' is set. +Files: src/move.c + +Patch 7.3.107 +Problem: Year number for :undolist can be confused with month or day. +Solution: Change "%y" to "%Y". +Files: src/undo.c + +Patch 7.3.108 +Problem: Useless check for NULL when calling vim_free(). +Solution: Remove the check. (Dominique Pelle) +Files: src/eval.c, src/ex_cmds.c, src/os_win32.c + +Patch 7.3.109 +Problem: Processing new Esperanto spell file fails and crashes Vim. + (Dominique Pelle) +Solution: When running out of memory give an error. Handle '?' in + COMPOUNDRULE properly. +Files: src/spell.c + +Patch 7.3.110 +Problem: The "nbsp" item in 'listchars' isn't used for ":list". +Solution: Make it work. (Christian Brabandt) +Files: src/message.c + +Patch 7.3.111 (after 7.3.100) +Problem: Executing a :normal command in 'statusline' evaluation causes the + cursor to move. (Dominique Pelle) +Solution: When updating the cursor for 'cursorbind' allow the cursor beyond + the end of the line. When evaluating 'statusline' temporarily + reset 'cursorbind'. +Files: src/move.c, src/screen.c + +Patch 7.3.112 +Problem: Setting 'statusline' to "%!'asdf%' reads uninitialized memory. +Solution: Check for NUL after %. +Files: src/buffer.c + +Patch 7.3.113 +Problem: Windows: Fall back directory for creating temp file is wrong. +Solution: Use "." instead of empty string. (Hong Xu) +Files: src/fileio.c + +Patch 7.3.114 +Problem: Potential problem in initialization when giving an error message + early. +Solution: Initialize 'verbosefile' empty. (Ben Schmidt) +Files: src/option.h + +Patch 7.3.115 +Problem: Vim can crash when tmpnam() returns NULL. +Solution: Check for NULL. (Hong Xu) +Files: src/fileio.c + +Patch 7.3.116 +Problem: 'cursorline' is displayed too short when there are concealed + characters and 'list' is set. (Dennis Preiser) +Solution: Check for 'cursorline' when 'list' is set. (Christian Brabandt) +Files: src/screen.c + +Patch 7.3.117 +Problem: On some systems --as-needed does not work, because the "tinfo" + library is included indirectly from "ncurses". (Charles Campbell) +Solution: In configure prefer using "tinfo" instead of "ncurses". +Files: src/configure.in, src/auto/configure + +Patch 7.3.118 +Problem: Ruby uses SIGVTALARM which makes Vim exit. (Alec Tica) +Solution: Ignore SIGVTALARM. (Dominique Pelle) +Files: src/os_unix.c + +Patch 7.3.119 +Problem: Build problem on Mac. (Nicholas Stallard) +Solution: Use "extern" instead of "EXTERN" for p_vfile. +Files: src/option.h + +Patch 7.3.120 +Problem: The message for an existing swap file is too long to fit in a 25 + line terminal. +Solution: Make the message shorter. (Chad Miller) +Files: src/memline.c + +Patch 7.3.121 +Problem: Complicated 'statusline' causes a crash. (Christian Brabandt) +Solution: Check that the number of items is not too big. +Files: src/buffer.c + +Patch 7.3.122 +Problem: Having auto/config.mk in the repository causes problems. +Solution: Remove auto/config.mk from the distribution. In the toplevel + Makefile copy it from the "dist" file. +Files: Makefile, src/Makefile, src/auto/config.mk + +Patch 7.3.123 +Problem: ml_get error when executing register being recorded into, deleting + lines and 'conceallevel' is set. (ZyX) +Solution: Don't redraw a line for concealing when it doesn't exist. +Files: src/main.c + +Patch 7.3.124 +Problem: When writing a file in binary mode it may be missing the final EOL + if a file previously read was missing the EOL. (Kevin Goodsell) +Solution: Move the write_no_eol_lnum into the buffer struct. +Files: src/structs.h, src/fileio.c, src/globals.h, src/os_unix.c + +Patch 7.3.125 +Problem: MSVC: Problem with quotes in link argument. +Solution: Escape backslashes and quotes. (Weasley) +Files: src/Make_mvc.mak + +Patch 7.3.126 +Problem: Compiler warning for signed pointer. +Solution: Use unsigned int argument for sscanf(). +Files: src/blowfish.c + +Patch 7.3.127 +Problem: Compiler complains about comma. +Solution: Remove comma after last enum element. +Files: src/ex_cmds2.c + +Patch 7.3.128 +Problem: Another compiler warning for signed pointer. +Solution: Use unsigned int argument for sscanf(). +Files: src/mark.c + +Patch 7.3.129 +Problem: Using integer like a boolean. +Solution: Nicer check for integer being non-zero. +Files: src/tag.c + +Patch 7.3.130 +Problem: Variable misplaced in #ifdef. +Solution: Move clipboard_event_time outside of #ifdef. +Files: src/gui_gtk_x11.c + +Patch 7.3.131 +Problem: Including errno.h too often. +Solution: Don't include errno.h in Unix header file. +Files: src/os_unix.h + +Patch 7.3.132 +Problem: C++ style comments. +Solution: Change to C comments. +Files: src/if_python3.c + +Patch 7.3.133 +Problem: When using encryption it's not clear what method was used. +Solution: In the file message show "blowfish" when using blowfish. +Files: src/fileio.c + +Patch 7.3.134 +Problem: Drag-n-drop doesn't work in KDE Dolphin. +Solution: Add GDK_ACTION_MOVE flag. (Florian Degner) +Files: src/gui_gtk_x11.c + +Patch 7.3.135 +Problem: When there is no previous substitute pattern, the previous search + pattern is used. The other way around doesn't work. +Solution: When there is no previous search pattern, use the previous + substitute pattern if possible. (Christian Brabandt) +Files: src/search.c + +Patch 7.3.136 +Problem: Duplicate include of assert.h. +Solution: Remove it. +Files: src/if_cscope.c + +Patch 7.3.137 (after 7.3.091) +Problem: When 'lazyredraw' is set the screen may not be updated. (Ivan + Krasilnikov) +Solution: Call update_screen() before waiting for input. +Files: src/misc1.c, src/getchar.c + +Patch 7.3.138 +Problem: ":com" changes the multi-byte text of :echo. (Dimitar Dimitrov) +Solution: Search for K_SPECIAL as a byte, not a character. (Ben Schmidt) +Files: src/ex_docmd.c + +Patch 7.3.139 (after 7.3.137) +Problem: When 'lazyredraw' is set ":ver" output can't be read. +Solution: Don't redraw the screen when at a prompt or command line. +Files: src/getchar.c, src/message.c, src/misc1.c + +Patch 7.3.140 +Problem: Crash when drawing the "$" at end-of-line for list mode just after + the window border and 'cursorline' is set. +Solution: Don't check for 'cursorline'. (Quentin Carbonneaux) +Files: src/screen.c + +Patch 7.3.141 +Problem: When a key code is not set get a confusing error message. +Solution: Change the error message to say the key code is not set. +Files: src/option.c, runtime/doc/options.txt + +Patch 7.3.142 +Problem: Python stdout doesn't have a flush() method, causing an import to + fail. +Solution: Add a dummy flush() method. (Tobias Columbus) +Files: src/if_py_both.h + +Patch 7.3.143 +Problem: Memfile is not tested sufficiently. Looking up blocks in a + memfile is slow when there are many blocks. +Solution: Add high level test and unittest. Adjust the number of hash + buckets to the number of blocks. (Ivan Krasilnikov) +Files: Filelist, src/Makefile, src/main.c, src/memfile.c, + src/memfile_test.c src/structs.h src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mak, + src/testdir/Makefile, src/testdir/test77.in, src/testdir/test77.ok + +Patch 7.3.144 +Problem: Crash with ":python help(dir)". (Kearn Holliday) +Solution: Fix the way the type is set on objects. (Tobias Columbus) +Files: src/if_python.c + +Patch 7.3.145 (after 7.3.144) +Problem: Can't build with Python dynamically loading. +Solution: Add dll_PyType_Ready. +Files: src/if_python.c + +Patch 7.3.146 +Problem: It's possible to assign to a read-only member of a dict. + It's possible to create a global variable "0". (ZyX) + It's possible to add a v: variable with ":let v:.name = 1". +Solution: Add check for dict item being read-only. + Check the name of g: variables. + Disallow adding v: variables. +Files: src/eval.c + +Patch 7.3.147 (after 7.3.143) +Problem: Can't build on HP-UX. +Solution: Remove an unnecessary backslash. (John Marriott) +Files: src/Makefile + +Patch 7.3.148 +Problem: A syntax file with a huge number of items or clusters causes weird + behavior, a hang or a crash. (Yukihiro Nakadaira) +Solution: Check running out of IDs. (partly by Ben Schmidt) +Files: src/syntax.c + +Patch 7.3.149 +Problem: The cursor disappears after the processing of the 'setDot' + netbeans command when vim runs in a terminal. +Solution: Show the cursor after a screen update. (Xavier de Gaye) +Files: src/netbeans.c + +Patch 7.3.150 +Problem: readline() does not return the last line when the NL is missing. + (Hong Xu) +Solution: When at the end of the file Also check for a previous line. +Files: src/eval.c + +Patch 7.3.151 (after 7.3.074) +Problem: When "unnamedplus" is in 'clipboard' the selection is sometimes + also copied to the star register. +Solution: Avoid copy to the star register when undesired. (James Vega) +Files: src/ops.c + +Patch 7.3.152 +Problem: Xxd does not check for errors from library functions. +Solution: Add error checks. (Florian Zumbiehl) +Files: src/xxd/xxd.c + +Patch 7.3.153 (after 7.3.152) +Problem: Compiler warning for ambiguous else, missing prototype. +Solution: Add braces. (Dominique Pelle) Add prototype for die(). +Files: src/xxd/xxd.c + +Patch 7.3.154 (after 7.3.148) +Problem: Can't compile with tiny features. (Tony Mechelynck) +Solution: Move #define outside of #ifdef. +Files: src/syntax.c + +Patch 7.3.155 +Problem: Crash when using map(), filter() and remove() on v:. (ZyX) + Also for extend(). (Yukihiro Nakadaira) +Solution: Mark v: as locked. Also correct locking error messages. +Files: src/eval.c + +Patch 7.3.156 +Problem: Tty names possibly left unterminated. +Solution: Use vim_strncpy() instead of strncpy(). +Files: src/pty.c + +Patch 7.3.157 +Problem: Superfluous assignment. +Solution: Remove assignment. +Files: src/misc1.c + +Patch 7.3.158 +Problem: Might use uninitialized memory in C indenting. +Solution: Init arrays to empty. +Files: src/misc1.c + +Patch 7.3.159 +Problem: Using uninitialized pointer when out of memory. +Solution: Check for NULL return value. +Files: src/mbyte.c + +Patch 7.3.160 +Problem: Unsafe string copying. +Solution: Use vim_strncpy() instead of strcpy(). Use vim_strcat() instead + of strcat(). +Files: src/buffer.c, src/ex_docmd.c, src/hardcopy.c, src/menu.c, + src/misc1.c, src/misc2.c, src/proto/misc2.pro, src/netbeans.c, + src/os_unix.c, src/spell.c, src/syntax.c, src/tag.c + +Patch 7.3.161 +Problem: Items on the stack may be too big. +Solution: Make items static or allocate them. +Files: src/eval.c, src/ex_cmds.c, src/ex_cmds2.c, src/ex_docmd.c, + src/fileio.c, src/hardcopy.c, src/quickfix.c, src/main.c, + src/netbeans.c, src/spell.c, src/tag.c, src/vim.h, src/xxd/xxd.c + +Patch 7.3.162 +Problem: No error message when assigning to a list with an index out of + range. (Yukihiro Nakadaira) +Solution: Add the error message. +Files: src/eval.c + +Patch 7.3.163 +Problem: For the default of 'shellpipe' "mksh" and "pdksh" are not + recognized. +Solution: Recognize these shell names. +Files: src/option.c + +Patch 7.3.164 +Problem: C-indenting: a preprocessor statement confuses detection of a + function declaration. +Solution: Ignore preprocessor lines. (Lech Lorens) Also recognize the style + to put a comma before the argument name. +Files: src/misc1.c, testdir/test3.in, testdir/test3.ok + +Patch 7.3.165 +Problem: ":find" completion does not escape spaces in a directory name. + (Isz) +Solution: Add backslashes for EXPAND_FILES_IN_PATH. (Carlo Teubner) +Files: src/ex_getln.c + +Patch 7.3.166 +Problem: Buffer on the stack may be too big +Solution: Allocate the space. +Files: src/option.c + +Patch 7.3.167 +Problem: When using the internal grep QuickFixCmdPost is not triggered. + (Yukihiro Nakadaira) +Solution: Change the place where autocommands are triggered. +Files: src/quickfix.c + +Patch 7.3.168 +Problem: When the second argument of input() contains a CR the text up to + that is used without asking the user. (Yasuhiro Matsumoto) +Solution: Change CR, NL and ESC in the text to a space. +Files: src/getchar.c + +Patch 7.3.169 +Problem: Freeing memory already freed, warning from static code analyzer. +Solution: Initialize pointers to NULL, correct use of "mustfree". (partly by + Dominique Pelle) +Files: src/mis1.c + +Patch 7.3.170 +Problem: VMS Makefile for testing was not updated for test77. +Solution: Add test77 to the Makefile. +Files: src/testdir/Make_vms.mms + +Patch 7.3.171 +Problem: When the clipboard isn't supported: ":yank*" gives a confusing + error message. +Solution: Specifically mention that the register name is invalid. + (Jean-Rene David) +Files: runtime/doc/change.txt, src/ex_docmd.c, src/globals.h + +Patch 7.3.172 +Problem: MS-Windows: rename() might delete the file if the name differs but + it's actually the same file. +Solution: Use the file handle to check if it's the same file. (Yukihiro + Nakadaira) +Files: src/if_cscope.c, src/fileio.c, src/os_win32.c, + src/proto/os_win32.pro, src/vim.h + +Patch 7.3.173 +Problem: After using setqflist() to make the quickfix list empty ":cwindow" + may open the window anyway. Also after ":vimgrep". +Solution: Correctly check whether the list is empty. (Ingo Karkat) +Files: src/quickfix.c + +Patch 7.3.174 +Problem: When Exuberant ctags binary is exctags it's not found. +Solution: Add configure check for exctags. (Hong Xu) +Files: src/configure.in, src/auto/configure + +Patch 7.3.175 +Problem: When 'colorcolumn' is set locally to a window, ":new" opens a + window with the same highlighting but 'colorcolumn' is empty. + (Tyru) +Solution: Call check_colorcolumn() after clearing and copying options. + (Christian Brabandt) +Files: src/buffer.c + +Patch 7.3.176 +Problem: Ruby linking doesn't work properly on Mac OS X. +Solution: Fix the configure check for Ruby. (Bjorn Winckler) +Files: src/configure.in, src/auto/configure + +Patch 7.3.177 +Problem: MS-Windows: mkdir() doesn't work properly when 'encoding' is + "utf-8". +Solution: Convert to utf-16. (Yukihiro Nakadaira) +Files: src/os_win32.c, src/os_win32.h, src/proto/os_win32.pro + +Patch 7.3.178 +Problem: C-indent doesn't handle code right after { correctly. +Solution: Fix detecting unterminated line. (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + +Patch 7.3.179 +Problem: C-indent doesn't handle colon in string correctly. +Solution: Skip the string. (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + +Patch 7.3.180 +Problem: When both a middle part of 'comments' matches and an end part, the + middle part was used erroneously. +Solution: After finding the middle part match continue looking for a better + end part match. (partly by Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + +Patch 7.3.181 +Problem: When repeating the insert of CTRL-V or a digraph the display may + not be updated correctly. +Solution: Only call edit_unputchar() after edit_putchar(). (Lech Lorens) +Files: src/edit.c + +Patch 7.3.182 (after 7.3.180) +Problem: Compiler warning for uninitialized variable. +Solution: Add dummy initializer. +Files: src/misc1.c + +Patch 7.3.183 (after 7.3.174) +Problem: When Exuberant ctags binary is exuberant-ctags it's not found. +Solution: Add configure check for exuberant-ctags. +Files: src/configure.in, src/auto/configure + +Patch 7.3.184 +Problem: Static code analysis errors in riscOS. +Solution: Make buffer size bigger. (Dominique Pelle) +Files: src/gui_riscos.c + +Patch 7.3.185 +Problem: ":windo g/pattern/q" closes windows and reports "N more lines". + (Tim Chase) +Solution: Remember what buffer ":global" started in. (Jean-Rene David) +Files: src/ex_cmds.c + +Patch 7.3.186 +Problem: When 'clipboard' contains "unnamed" or "unnamedplus" the value of + v:register is wrong for operators without a specific register. +Solution: Adjust the register according to 'clipboard'. (Ingo Karkat) +Files: src/normal.c + +Patch 7.3.187 +Problem: The RISC OS port has obvious errors and is not being maintained. +Solution: Remove the RISC OS files and code. +Files: src/ascii.h, src/eval.c, src/ex_cmds.c, src/ex_cmds2.c, + src/ex_docmd.c, src/fileio.c, src/globals.h, src/gui.c, src/gui.h, + src/main.c, src/memfile.c, src/memline.c, src/misc1.c, + src/proto.h, src/quickfix.c, src/search.c, src/structs.h, + src/term.c, src/termlib.c, src/version.c, src/vim.h, + src/gui_riscos.h, src/os_riscos.h, src/gui_riscos.c, + src/os_riscos.c, runtime/doc/os_risc.txt + +Patch 7.3.188 +Problem: More RISC OS files to remove. +Solution: Remove them. Update the file list. +Files: src/proto/gui_riscos.pro, src/proto/os_riscos.pro, Filelist + +Patch 7.3.189 (after 7.3.186) +Problem: Can't build without +clipboard feature. (Christian Ebert) +Solution: Add the missing #ifdef. +Files: src/normal.c + +Patch 7.3.190 +Problem: When there is a "containedin" syntax argument highlighting may be + wrong. (Radek) +Solution: Reset current_next_list. (Ben Schmidt) +Files: src/syntax.c + +Patch 7.3.191 +Problem: Still some RISC OS stuff to remove. +Solution: Remove files and lines. (Hong Xu) + Remove the 'osfiletype' option code. +Files: README_extra.txt, src/Make_ro.mak, src/INSTALL, src/Makefile, + src/buffer.c, src/eval.c, src/feature.h, src/option.c, + src/option.h, src/structs.h, src/version.c, src/pty.c, Filelist + +Patch 7.3.192 +Problem: Ex command ":s/ \?/ /g" splits multi-byte characters into bytes. + (Dominique Pelle) +Solution: Advance over whole character instead of one byte. +Files: src/ex_cmds.c + +Patch 7.3.193 +Problem: In the command line window ":close" doesn't work properly. (Tony + Mechelynck) +Solution: Use Ctrl_C instead of K_IGNORE for cmdwin_result. (Jean-Rene + David) +Files: src/ex_docmd.c, src/ex_getln.c + +Patch 7.3.194 +Problem: When "b" is a symlink to directory "a", resolve("b/") doesn't + result in "a/". (ZyX) +Solution: Remove the trailing slash. (Jean-Rene David) +Files: src/eval.c + +Patch 7.3.195 +Problem: "} else" causes following lines to be indented too much. (Rouben + Rostamian) +Solution: Better detection for the "else". (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + +Patch 7.3.196 +Problem: Can't intercept a character that is going to be inserted. +Solution: Add the InsertCharPre autocommand event. (Jakson A. Aquino) +Files: runtime/doc/autocmd.txt, runtime/doc/eval.txt, + runtime/doc/map.txt, src/edit.c, src/eval.c, src/fileio.c, + src/vim.h + +Patch 7.3.197 +Problem: When a QuickfixCmdPost event removes all errors, Vim still tries + to jump to the first error, resulting in E42. +Solution: Get the number of error after the autocmd event. (Mike Lundy) +Files: src/quickfix.c + +Patch 7.3.198 +Problem: No completion for ":lang". +Solution: Get locales to complete from. (Dominique Pelle) +Files: src/eval.c, src/ex_cmds2.c, src/ex_getln.c, + src/proto/ex_cmds2.pro, src/proto/ex_getln.pro, src/vim.h + +Patch 7.3.199 +Problem: MS-Windows: Compilation problem of OLE with MingW compiler. +Solution: Put #ifdef around declarations. (Guopeng Wen) +Files: src/if_ole.h + +Patch 7.3.200 (after 7.3.198) +Problem: CTRL-D doesn't complete :lang. +Solution: Add the missing part of the change. (Dominique Pelle) +Files: src/ex_docmd.c + +Patch 7.3.201 (after 7.3.195) +Problem: "} else" still causes following lines to be indented too much. +Solution: Better detection for the "else" block. (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + +Patch 7.3.202 +Problem: Cannot influence the indent inside a namespace. +Solution: Add the "N" 'cino' parameter. (Konstantin Lepa) +Files: runtime/doc/indent.txt, src/misc1.c, src/testdir/test3.in, + src/testdir/test3.ok + +Patch 7.3.203 +Problem: MS-Windows: Can't run an external command without a console window. +Solution: Support ":!start /b cmd". (Xaizek) +Files: runtime/doc/os_win32.txt, src/os_win32.c + +Patch 7.3.204 (after 7.3.201) +Problem: Compiler warning. +Solution: Add type cast. (Mike Williams) +Files: src/misc1.c + +Patch 7.3.205 +Problem: Syntax "extend" doesn't work correctly. +Solution: Avoid calling check_state_ends() recursively (Ben Schmidt) +Files: src/syntax.c + +Patch 7.3.206 +Problem: 64bit MS-Windows compiler warning. +Solution: Use HandleToLong() instead of type cast. (Mike Williams) +Files: src/gui_w32.c + +Patch 7.3.207 +Problem: Can't compile with MSVC with pentium4 and 64 bit. +Solution: Only use SSE2 for 32 bit. (Mike Williams) +Files: src/Make_mvc.mak + +Patch 7.3.208 +Problem: Early terminated if statement. +Solution: Remove the semicolon. (Lech Lorens) +Files: src/gui_mac.c + +Patch 7.3.209 +Problem: MSVC Install instructions point to wrong batch file. +Solution: Add a batch file for use with MSVC 10. +Files: src/msvc2010.bat, src/INSTALLpc.txt, Filelist + +Patch 7.3.210 +Problem: Can't always find the file when using cscope. +Solution: Add the 'cscoperelative' option. (Raghavendra D Prabhu) +Files: runtime/doc/if_cscop.txt, runtime/doc/options.txt, + src/if_cscope.c + +Patch 7.3.211 (after 7.3.210) +Problem: Compiler warning. +Solution: Add type cast. +Files: src/if_cscope.c + +Patch 7.3.212 +Problem: With Python 3.2 ":py3" fails. +Solution: Move PyEval_InitThreads() to after Py_Initialize(). (Roland + Puntaier) Check abiflags in configure. (Andreas Behr) +Files: src/if_python3.c, src/auto/configure, src/configure.in + +Patch 7.3.213 +Problem: Javascript object literal is not indented correctly. +Solution: Make a special case for when "J1" is in 'cino'. (Luc Deschenaux) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + +Patch 7.3.214 +Problem: The text displayed by ":z-" isn't exactly like old Vi. +Solution: Add one to the start line number. (ChangZhuo Chen) +Files: src/ex_cmds.c + +Patch 7.3.215 (after 7.3.210) +Problem: Wrong file names in previous patch. (Toothpik) +Solution: Include the option changes. +Files: src/option.c, src/option.h + +Patch 7.3.216 +Problem: When recovering a file a range of lines is missing. (Charles Jie) +Solution: Reset the index when advancing to the next pointer block. Add a + test to verify recovery works. +Files: src/memline.c, src/testdir/test78.in, src/testdir/test78.ok, + src/testdir/Makefile, src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mms + +Patch 7.3.217 +Problem: Inside an "if" a ":wincmd" causes problems. +Solution: When skipping commands let ":wincmd" skip over its argument. +Files: src/ex_docmd.c + +Patch 7.3.218 (after 7.3.212) +Problem: Tiny configuration problem with Python 3. +Solution: Add abiflags in one more place. (Andreas Behr) +Files: src/auto/configure, src/configure.in + +Patch 7.3.219 +Problem: Can't compile with GTK on Mac. +Solution: Add some #ifdef trickery. (Ben Schmidt) +Files: src/os_mac_conv.c, src/os_macosx.m, src/vim.h + +Patch 7.3.220 +Problem: Python 3: vim.error is a 'str' instead of an 'Exception' object, + so 'except' or 'raise' it causes a 'SystemError' exception. + Buffer objects do not support slice assignment. + When exchanging text between Vim and Python, multibyte texts become + garbage or cause Unicode Exceptions, etc. + 'py3file' tries to read in the file as Unicode, sometimes causes + UnicodeDecodeException +Solution: Fix the problems. (lilydjwg) +Files: src/if_py_both.h, src/if_python.c, src/if_python3.c + +Patch 7.3.221 +Problem: Text from the clipboard is sometimes handled as linewise, but not + consistently. +Solution: Assume the text is linewise when it ends in a CR or NL. +Files: src/gui_gtk_x11.c, src/gui_mac.c, src/ops.c, src/os_msdos.c, + src/os_mswin.c, src/os_qnx.c, src/ui.c + +Patch 7.3.222 +Problem: Warning for building GvimExt. +Solution: Comment-out the DESCRIPTION line. (Mike Williams) +Files: src/GvimExt/gvimext.def, src/GvimExt/gvimext_ming.def + +Patch 7.3.223 +Problem: MingW cross compilation doesn't work with tiny features. +Solution: Move acp_to_enc(), enc_to_utf16() and utf16_to_enc() outside of + "#ifdef CLIPBOARD". Fix typo in makefile. +Files: src/Make_ming.mak, src/os_mswin.c + +Patch 7.3.224 +Problem: Can't pass dict to sort function. +Solution: Add the optional {dict} argument to sort(). (ZyX) +Files: runtime/doc/eval.txt, src/eval.c + +Patch 7.3.225 +Problem: Using "\n" in a substitute inside ":s" does not result in a line + break. +Solution: Change behavior inside vim_regexec_nl(). Add tests. (Motoya + Kurotsu) +Files: src/regexp.c, src/testdir/test79.in, src/testdir/test79.ok, + src/testdir/test80.in, src/testdir/test80.ok, + src/testdir/Makefile, src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mms + +Patch 7.3.226 +Problem: On a 64 bit system "syn sync fromstart" is very slow. (Bjorn + Steinbrink) +Solution: Store the state when starting to parse from the first line. +Files: src/syntax.c + +Patch 7.3.227 (after 7.3.221) +Problem: Mac OS doesn't have the linewise clipboard fix. +Solution: Also change the Mac OS file. (Bjorn Winckler) +Files: src/os_macosx.m + +Patch 7.3.228 +Problem: "2gj" does not always move to the correct position. +Solution: Get length of line after moving to a next line. (James Vega) +Files: src/normal.c + +Patch 7.3.229 +Problem: Using fork() makes gvim crash on Mac when build with + CoreFoundation. +Solution: Disallow fork() when __APPLE__ is defined. (Hisashi T Fujinaka) +Files: src/gui.c + +Patch 7.3.230 +Problem: ":wundo" and ":rundo" don't unescape their argument. (Aaron + Thoma) +Solution: Use FILE1 instead of XFILE. +Files: src/ex_cmds.h + +Patch 7.3.231 +Problem: Runtime file patches failed. +Solution: Redo the patches made against the patched files instead of the + files in the mercurial repository. +Files: runtime/doc/indent.txt, runtime/doc/os_win32.txt + +Patch 7.3.232 +Problem: Python doesn't compile without +multi_byte +Solution: Use "latin1" when MULTI_BYTE is not defined. +Files: src/if_py_both.h + +Patch 7.3.233 +Problem: ":scriptnames" and ":breaklist" show long file names. +Solution: Shorten to use "~/" when possible. (Jean-Rene David) +Files: src/ex_cmds2.c + +Patch 7.3.234 +Problem: With GTK menu may be popping down. +Solution: Use event time instead of GDK_CURRENT_TIME. (Hong Xu) +Files: src/gui.c, src/gui.h, src/gui_gtk.c, src/gui_gtk_x11.c + +Patch 7.3.235 +Problem: ";" gets stuck on a "t" command, it's not useful. +Solution: Add the ';' flag in 'cpo'. (Christian Brabandt) +Files: runtime/doc/motion.txt, runtime/doc/options.txt, src/option.h, + src/search.c src/testdir/test81.in, src/testdir/test81.ok, + src/testdir/Makefile, src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mms + +Patch 7.3.236 (after 7.3.232) +Problem: Python 3 doesn't compile without +multi_byte +Solution: Use "latin1" when MULTI_BYTE is not defined. (lilydjwg) +Files: src/if_python3.c + +Patch 7.3.237 +Problem: "filetype" completion doesn't work on Windows. (Yue Wu) +Solution: Don't use a glob pattern for the directories, use a list of + directories. (Dominique Pelle) +Files: src/ex_getln.c + +Patch 7.3.238 +Problem: Compiler warning for conversion. +Solution: Add type cast. (Mike Williams) +Files: src/ex_getln.c + +Patch 7.3.239 +Problem: Python corrects the cursor column without taking 'virtualedit' + into account. (lilydjwg) +Solution: Call check_cursor_col_win(). +Files: src/if_py_both.h, src/mbyte.c, src/misc2.c, src/normal.c, + src/proto/mbyte.pro, src/proto/misc2.pro + +Patch 7.3.240 +Problem: External commands can't use pipes on MS-Windows. +Solution: Implement pipes and use them when 'shelltemp' isn't set. (Vincent + Berthoux) +Files: src/eval.c, src/ex_cmds.c, src/misc2.c, src/os_unix.c, + src/os_win32.c, src/proto/misc2.pro, src/ui.c + +Patch 7.3.241 +Problem: Using CTRL-R CTRL-W on the command line may insert only part of + the word. +Solution: Use the cursor position instead of assuming it is at the end of + the command. (Tyru) +Files: src/ex_getln.c + +Patch 7.3.242 +Problem: Illegal memory access in after_pathsep(). +Solution: Check that the pointer is not at the start of the file name. + (Dominique Pelle) +Files: src/misc2.c + +Patch 7.3.243 +Problem: Illegal memory access in readline(). +Solution: Swap the conditions. (Dominique Pelle) +Files: src/eval.c + +Patch 7.3.244 +Problem: MS-Windows: Build problem with old compiler. (John Beckett) +Solution: Only use HandleToLong() when available. (Mike Williams) +Files: src/gui_w32.c + +Patch 7.3.245 +Problem: Python 3.2 libraries not correctly detected. +Solution: Add the suffix to the library name. (Niclas Zeising) +Files: src/auto/configure, src/configure.in + +Patch 7.3.246 (after 7.3.235) +Problem: Repeating "f4" in "4444" skips one 4. +Solution: Check the t_cmd flag. (Christian Brabandt) +Files: src/search.c + +Patch 7.3.247 +Problem: Running tests changes the users viminfo file. Test for patch + 7.3.246 missing. +Solution: Add "nviminfo" to the 'viminfo' option. Include the test. +Files: src/testdir/test78.in, src/testdir/test81.in + +Patch 7.3.248 +Problem: PC Install instructions missing install instructions. +Solution: Step-by-step explanation. (Michael Soyka) +Files: src/INSTALLpc.txt + +Patch 7.3.249 +Problem: Wrong indenting for array initializer. +Solution: Detect '}' in a better way. (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + +Patch 7.3.250 +Problem: Python: Errors in Unicode characters not handled nicely. +Solution: Add the surrogateescape error handler. (lilydjwg) +Files: src/if_python3.c + +Patch 7.3.251 +Problem: "gH<Del>" deletes the current line, except when it's the last + line. +Solution: Set the "include" flag to indicate the last line is to be deleted. +Files: src/normal.c, src/ops.c + +Patch 7.3.252 (after 7.3.247) +Problem: Tests fail. (David Northfield) +Solution: Add missing update for .ok file. +Files: src/testdir/test81.ok + +Patch 7.3.253 +Problem: "echo 'abc' > ''" returns 0 or 1, depending on 'ignorecase'. + Checks in mb_strnicmp() for illegal and truncated bytes are + wrong. Should not assume that byte length is equal before case + folding. +Solution: Add utf_safe_read_char_adv() and utf_strnicmp(). Add a test for + this. (Ivan Krasilnikov) +Files: src/mbyte.c src/testdir/test82.in, src/testdir/test82.ok, + src/testdir/Makefile, src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mms + +Patch 7.3.254 +Problem: The coladd field is not reset when setting the line number for a + ":call" command. +Solution: Reset it. +Files: src/eval.c + +Patch 7.3.255 +Problem: When editing a file such as "File[2010-08-15].vim" an E16 error is + given. (Manuel Stol) +Solution: Don't give an error for failing to compile the regexp. +Files: src/ex_docmd.c, src/misc1.c, src/vim.h + +Patch 7.3.256 +Problem: Javascript indenting not sufficiently tested. +Solution: Add more tests. (Luc Deschenaux) Mark the lines that are indented + wrong. +Files: src/testdir/test3.in, src/testdir/test3.ok + +Patch 7.3.257 +Problem: Not all completions are available to user commands. +Solution: Add "color", "compiler", "file_in_path" and "locale". (Dominique + Pelle) +Files: src/ex_docmd.c, runtime/doc/map.txt + +Patch 7.3.258 +Problem: MS-Windows: The edit with existing vim context menu entries can be + unwanted. +Solution: Let a registry entry disable them. (Jerome Vuarand) +Files: src/GvimExt/gvimext.cpp + +Patch 7.3.259 +Problem: Equivalence classes only work for latin characters. +Solution: Add the Unicode equivalence characters. (Dominique Pelle) +Files: runtime/doc/pattern.txt, src/regexp.c, src/testdir/test44.in, + src/testdir/test44.ok + +Patch 7.3.260 +Problem: CursorHold triggers on an incomplete mapping. (Will Gray) +Solution: Don't trigger CursorHold when there is typeahead. +Files: src/fileio.c + +Patch 7.3.261 +Problem: G++ error message erroneously recognized as error. +Solution: Ignore "In file included from" line also when it ends in a colon. + (Fernando Castillo) +Files: src/option.h + +Patch 7.3.262 +Problem: Photon code style doesn't match Vim style. +Solution: Clean up some of it. (Elias Diem) +Files: src/gui_photon.c + +Patch 7.3.263 +Problem: Perl and Tcl have a few code style problems. +Solution: Clean it up. (Elias Diem) +Files: src/if_perl.xs, src/if_tcl.c + +Patch 7.3.264 +Problem: When the current directory name contains wildcard characters, such + as "foo[with]bar", the tags file can't be found. (Jeremy + Erickson) +Solution: When searching for matching files also match without expanding + wildcards. This is a bit of a hack. +Files: src/vim.h, src/misc1.c, src/misc2.c + +Patch 7.3.265 +Problem: When storing a pattern in search history there is no proper check + for the separator character. +Solution: Pass the separator character to in_history(). (Taro Muraoka) +Files: src/ex_getln.c + +Patch 7.3.266 +Problem: In Gvim with iBus typing space in Insert mode doesn't work. +Solution: Clear xim_expected_char after checking it. +Files: src/mbyte.c + +Patch 7.3.267 +Problem: Ruby on Mac OS X 10.7 may crash. +Solution: Avoid alloc(0). (Bjorn Winckler) +Files: src/if_ruby.c + +Patch 7.3.268 +Problem: Vim freezes when executing an external command with zsh. +Solution: Use O_NOCTTY both in the master and slave. (Bjorn Winckler) +Files: src/os_unix.c + +Patch 7.3.269 +Problem: 'shellcmdflag' only works with one flag. +Solution: Split into multiple arguments. (Gary Johnson) +Files: src/os_unix.c + +Patch 7.3.270 +Problem: Illegal memory access. +Solution: Swap conditions. (Dominique Pelle) +Files: src/ops.c + +Patch 7.3.271 +Problem: Code not following Vim coding style. +Solution: Fix the style. (Elias Diem) +Files: src/gui_photon.c + +Patch 7.3.272 +Problem: ":put =list" does not add an empty line for a trailing empty + item. +Solution: Add a trailing NL when turning a list into a string. +Files: src/eval.c + +Patch 7.3.273 +Problem: A BOM in an error file is seen as text. (Aleksey Baibarin) +Solution: Remove the BOM from the text before evaluating. (idea by Christian + Brabandt) +Files: src/quickfix.c, src/mbyte.c, src/proto/mbyte.pro, + src/testdir/test10.in + +Patch 7.3.274 +Problem: With concealed characters tabs do not have the right size. +Solution: Use VCOL_HLC instead of vcol. (Eiichi Sato) +Files: src/screen.c + +Patch 7.3.275 +Problem: MS-Windows: When using a black background some screen updates + cause the window to flicker. +Solution: Add WS_CLIPCHILDREN to CreateWindow(). (René Aguirre) +Files: src/gui_w32.c + +Patch 7.3.276 +Problem: GvimExt sets $LANG in the wrong way. +Solution: Save the environment and use it for gvim. (Yasuhiro Matsumoto) +Files: src/GvimExt/gvimext.cpp + +Patch 7.3.277 +Problem: MS-Windows: some characters do not show in dialogs. +Solution: Use the wide methods when available. (Yanwei Jia) +Files: src/gui_w32.c, src/gui_w48.c, src/os_mswin.c, src/os_win32.c, + src/os_win32.h + +Patch 7.3.278 +Problem: Passing the file name to open in VisVim doesn't work. +Solution: Adjust the index and check for end of buffer. (Jiri Sedlak) +Files: src/VisVim/Commands.cpp + +Patch 7.3.279 +Problem: With GTK, when gvim is full-screen and a tab is opened and using a + specific monitor configuration the window is too big. +Solution: Adjust the window size like on MS-Windows. (Yukihiro Nakadaira) +Files: src/gui.c, src/gui_gtk_x11.c, src/proto/gui_gtk_x11.pro + +Patch 7.3.280 +Problem: ":lmake" does not update the quickfix window title. +Solution: Update the title. (Lech Lorens) +Files: src/quickfix.c, src/testdir/test10.in, src/testdir/test10.ok + +Patch 7.3.281 +Problem: After using "expand('%:8')" the buffer name is changed. +Solution: Make a copy of the file name before shortening it. +Files: src/eval.c + +Patch 7.3.282 +Problem: When using input() and :echo in a loop the displayed text is + incorrect. (Benjamin Fritz) +Solution: Only restore the cursor position when there is a command line. + (Ben Schmidt) +Files: src/ex_getln.c + +Patch 7.3.283 +Problem: An expression mapping with a multi-byte character containing a + 0x80 byte gets messed up. (ZyX) +Solution: Unescape the expression before evaluating it (Yukihiro Nakadaira) +Files: src/getchar.c + +Patch 7.3.284 +Problem: The str2special() function doesn't handle multi-byte characters + properly. +Solution: Recognize multi-byte characters. (partly by Vladimir Vichniakov) +Files: src/getchar.c, src/message.c, src/misc2.c + +Patch 7.3.285 (after 7.3.284) +Problem: Mapping <Char-123> no longer works. +Solution: Properly check for "char-". Add a test for it. +Files: src/misc2.c, src/testdir/test75.in, src/testdir/test75.ok + +Patch 7.3.286 +Problem: Crash when using "zd" on a large number of folds. (Sam King) +Solution: Recompute pointer after reallocating array. Move fewer entries + when making room. +Files: src/fold.c + +Patch 7.3.287 +Problem: Can't compile with MSVC and tiny options. +Solution: Move variables and #ifdefs. (Sergey Khorev) +Files: src/os_win32.c + +Patch 7.3.288 +Problem: has('python') may give an error message for not being able to load + the library after using python3. +Solution: Only give the error when the verbose argument is true. +Files: src/if_python.c, src/if_python3.c + +Patch 7.3.289 +Problem: Complete function isn't called when the leader changed. +Solution: Call ins_compl_restart() when the leader changed. (Taro Muraoka) +Files: src/edit.c + +Patch 7.3.290 +Problem: When a BufWriteCmd autocommand resets 'modified' this doesn't + change older buffer states to be marked as 'modified' like + ":write" does. (Yukihiro Nakadaira) +Solution: When the BufWriteCmd resets 'modified' then adjust the undo + information like ":write" does. +Files: src/fileio.c + +Patch 7.3.291 +Problem: Configure doesn't work properly with Python3. +Solution: Put -ldl before $LDFLAGS. Add PY3_NO_RTLD_GLOBAL. (Roland + Puntaier) +Files: src/config.h.in, src/auto/configure, src/configure.in + +Patch 7.3.292 +Problem: Crash when using fold markers and selecting a visual block that + includes a folded line and goes to end of line. (Sam Lidder) +Solution: Check for the column to be MAXCOL. (James Vega) +Files: src/screen.c + +Patch 7.3.293 +Problem: MSVC compiler has a problem with non-ASCII characters. +Solution: Avoid non-ASCII characters. (Hong Xu) +Files: src/ascii.h, src/spell.c + +Patch 7.3.294 (after 7.3.289) +Problem: Patch 289 causes more problems than it solves. +Solution: Revert the patch until a better solution is found. +Files: src/edit.c + +Patch 7.3.295 +Problem: When filtering text with an external command Vim may not read all + the output. +Solution: When select() is interrupted loop and try again. (James Vega) +Files: src/os_unix.c + +Patch 7.3.296 +Problem: When writing to an external command a zombie process may be left + behind. +Solution: Wait on the process. (James Vega) +Files: src/os_unix.c + +Patch 7.3.297 +Problem: Can't load Perl 5.14 dynamically. +Solution: Add code in #ifdefs. (Charles Cooper) +Files: if_perl.xs + +Patch 7.3.298 +Problem: Built-in colors are different from rgb.txt. +Solution: Adjust the color values. (Benjamin Haskell) +Files: src/gui_photon.c, src/gui_w48.c + +Patch 7.3.299 +Problem: Source code not in Vim style. +Solution: Adjust the style. (Elias Diem) +Files: src/gui_photon.c + +Patch 7.3.300 +Problem: Python doesn't parse multi-byte argument correctly. +Solution: Use "t" instead of "s". (lilydjwg) +Files: src/if_py_both.h + +Patch 7.3.301 +Problem: When 'smartindent' and 'copyindent' are set a Tab is used even + though 'expandtab' is set. +Solution: Do not insert Tabs. Add a test. (Christian Brabandt) +Files: src/misc1.c, src/testdir/test19.in, src/testdir/test19.ok + +Patch 7.3.302 (after 7.3.301) +Problem: Test 19 fails without 'smartindent' and +eval. +Solution: Don't use ":exe". Source small.vim. +Files: src/testdir/test19.in + +Patch 7.3.303 (after 7.3.296) +Problem: Compilation error. +Solution: Correct return type from int to pid_t. (Danek Duvall) +Files: src/os_unix.c + +Patch 7.3.304 +Problem: Strawberry Perl doesn't work on MS-Windows. +Solution: Use xsubpp if needed. (Yasuhiro Matsumoto) +Files: src/Make_ming.mak, src/Make_mvc.mak + +Patch 7.3.305 +Problem: Auto-loading a function while editing the command line causes + scrolling up the display. +Solution: Don't set msg_scroll when defining a function and the user is not + typing. (Yasuhiro Matsumoto) +Files: src/eval.c + +Patch 7.3.306 +Problem: When closing a window there is a chance that deleting a scrollbar + triggers a GUI resize, which uses the window while it is not in a + valid state. +Solution: Set the buffer pointer to NULL to be able to detect the invalid + situation. Fix a few places that used the buffer pointer + incorrectly. +Files: src/buffer.c, src/ex_cmds.c, src/term.c, src/window.c + +Patch 7.3.307 +Problem: Python 3 doesn't support slice assignment. +Solution: Implement slices. (Brett Overesch, Roland Puntaier) +Files: src/if_python3.c + +Patch 7.3.308 +Problem: Writing to 'verbosefile' has problems, e.g. for :highlight. +Solution: Do not use a separate verbose_write() function but write with the + same code that does redirecting. (Yasuhiro Matsumoto) +Files: src/message.c + +Patch 7.3.309 (after 7.3.307) +Problem: Warnings for pointer types. +Solution: Change PySliceObject to PyObject. +Files: src/if_python3.c + +Patch 7.3.310 +Problem: Code not following Vim style. +Solution: Fix the style. (Elias Diem) +Files: src/gui_photon.c + +Patch 7.3.311 (replaces 7.3.289) +Problem: Complete function isn't called when the leader changed. +Solution: Allow the complete function to return a dictionary with a flag + that indicates ins_compl_restart() is to be called when the leader + changes. (Taro Muraoka) +Files: runtime/insert.txt, src/edit.c, src/eval.c, src/proto/eval.pro + +Patch 7.3.312 (after 7.3.306) +Problem: Can't compile with tiny features. +Solution: Add #ifdef around win_valid(). +Files: src/buffer.c + +Patch 7.3.313 (after 7.3.307) +Problem: One more warning when compiling with dynamic Python 3. +Solution: Change PySliceObject to PyObject. +Files: src/if_python3.c + +Patch 7.3.314 (after 7.3.304) +Problem: Missing parenthesis. +Solution: Add it. (Benjamin R. Haskell) +Files: src/Make_mvc.mak + +Patch 7.3.315 +Problem: Opening a window before forking causes problems for GTK. +Solution: Fork first, create the window in the child and report back to the + parent process whether it worked. If successful the parent exits, + if unsuccessful the child exits and the parent continues in the + terminal. (Tim Starling) +Files: src/gui.c + +Patch 7.3.316 (after 7.3.306) +Problem: Crash when 'colorcolumn' is set and closing buffer. +Solution: Check for w_buffer to be NULL. (Yasuhiro Matsumoto) +Files: src/option.c + +Patch 7.3.317 +Problem: Calling debug.debug() in Lua may cause Vim to hang. +Solution: Add a better debug method. (Rob Hoelz, Luis Carvalho) +Files: src/if_lua.c + +Patch 7.3.318 +Problem: "C" on the last line deletes that line if it's blank. +Solution: Only delete the last line for a delete operation. (James Vega) +Files: src/ops.c + +Patch 7.3.319 (after 7.3.311) +Problem: Redobuff doesn't always include changes of the completion leader. +Solution: Insert backspaces as needed. (idea by Taro Muraoka) +Files: src/edit.c + +Patch 7.3.320 +Problem: When a 0xa0 character is in a sourced file the error message for + unrecognized command does not show the problem. +Solution: Display 0xa0 as <a0>. +Files: src/ex_docmd.c + +Patch 7.3.321 +Problem: Code not following Vim style. +Solution: Fix the style. (Elias Diem) +Files: src/os_qnx.c + +Patch 7.3.322 +Problem: #ifdef for PDP_RETVAL doesn't work, INT_PTR can be a typedef. +Solution: Check the MSC version and 64 bit flags. (Sergiu Dotenco) +Files: src/os_mswin.c + +Patch 7.3.323 +Problem: The default 'errorformat' does not ignore some "included from" + lines. +Solution: Add a few more patterns. (Ben Boeckel) +Files: src/option.h + +Patch 7.3.324 (after 7.3.237) +Problem: Completion for ":compiler" shows color scheme names. +Solution: Fix the directory name. (James Vega) +Files: src/ex_getln.c + +Patch 7.3.325 +Problem: A duplicated function argument gives an internal error. +Solution: Give a proper error message. (based on patch by Tyru) +Files: src/eval.c + +Patch 7.3.326 +Problem: MingW 4.6 no longer supports the -mno-cygwin option. +Solution: Split the Cygwin and MingW makefiles. (Matsushita Shougo) +Files: src/GvimExt/Make_cyg.mak, src/GvimExt/Make_ming.mak, + src/Make_cyg.mak, src/Make_ming.mak, src/xxd/Make_ming.mak, + Filelist + +Patch 7.3.327 +Problem: When jumping to a help tag a closed fold doesn't open. +Solution: Save and restore KeyTyped. (Yasuhiro Matsumoto) +Files: src/ex_cmds.c + +Patch 7.3.328 +Problem: When command line wraps the cursor may be displayed wrong when + there are multi-byte characters. +Solution: Position the cursor before drawing the text. (Yasuhiro Matsumoto) +Files: src/ex_getln.c + +Patch 7.3.329 +Problem: When skipping over code from ":for" to ":endfor" get an error for + calling a dict function. (Yasuhiro Matsumoto) +Solution: Ignore errors when skipping over :call command. +Files: src/ex_docmd.c, src/eval.c + +Patch 7.3.330 +Problem: When longjmp() is invoked if the X server gives an error the state + is not properly restored. +Solution: Reset vgetc_busy. (Yukihiro Nakadaira) +Files: src/main.c + +Patch 7.3.331 +Problem: "vit" selects wrong text when a tag name starts with the same text + as an outer tag name. (Ben Fritz) +Solution: Add "\>" to the pattern to check for word boundary. +Files: src/search.c + +Patch 7.3.332 (after 7.3.202) +Problem: Indent after "public:" is not increased in C++ code. (Lech Lorens) +Solution: Check for namespace after the regular checks. (partly by Martin + Gieseking) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + +Patch 7.3.333 +Problem: Using "." to repeat a Visual delete counts the size in bytes, not + characters. (Connor Lane Smith) +Solution: Store the virtual column numbers instead of byte positions. +Files: src/normal.c + +Patch 7.3.334 +Problem: Latest MingW about XSUBPP referencing itself. (Gongqian Li) +Solution: Rename the first use to XSUBPPTRY. +Files: src/Make_ming.mak + +Patch 7.3.335 +Problem: When 'imdisable' is reset from an autocommand in Insert mode it + doesn't take effect. +Solution: Call im_set_active() in Insert mode. (Taro Muraoka) +Files: src/option.c + +Patch 7.3.336 +Problem: When a tags file specifies an encoding different from 'enc' it + may hang and using a pattern doesn't work. +Solution: Convert the whole line. Continue reading the header after the + SORT tag. Add test83. (Yukihiro Nakadaira) +Files: src/tag.c, src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Make_os2.mak, + src/testdir/Make_vms.mms, src/testdir/Makefile, + src/testdir/test83-tags2, src/testdir/test83-tags3, + src/testdir/test83.in, src/testdir/test83.ok + +Patch 7.3.337 (after 7.3.295) +Problem: Screen doesn't update after resizing the xterm until a character + is typed. +Solution: When the select call is interrupted check do_resize. (Taylor + Hedberg) +Files: src/os_unix.c + +Patch 7.3.338 +Problem: Using getchar() in an expression mapping doesn't work well. +Solution: Don't save and restore the typeahead. (James Vega) +Files: src/getchar.c, src/testdir/test34.ok + +Patch 7.3.339 +Problem: "make shadow" doesn't link all test files. +Solution: Add a line in Makefile and Filelist. +Files: src/Makefile, Filelist + +Patch 7.3.340 +Problem: When 'verbosefile' is set ftplugof.vim can give an error. +Solution: Only remove filetypeplugin autocommands when they exist. (Yasuhiro + Matsumoto) +Files: runtime/ftplugof.vim + +Patch 7.3.341 +Problem: Local help files are only listed in help.txt, not in translated + help files. +Solution: Also find translated help files. (Yasuhiro Matsumoto) +Files: src/ex_cmds.c + +Patch 7.3.342 +Problem: Code not in Vim style. +Solution: Fix the style. (Elias Diem) +Files: src/os_amiga.c, src/os_mac_conv.c, src/os_win16.c + +Patch 7.3.343 +Problem: No mouse support for urxvt. +Solution: Implement urxvt mouse support, also for > 252 columns. (Yiding + Jia) +Files: src/feature.h, src/keymap.h, src/option.h, src/os_unix.c, + src/term.c, src/version.c + +Patch 7.3.344 +Problem: Problem with GUI startup related to XInitThreads. +Solution: Use read() and write() instead of fputs() and fread(). (James + Vega) +Files: src/gui.c + +Patch 7.3.345 +Problem: When switching language with ":lang" the window title doesn't + change until later. +Solution: Update the window title right away. (Dominique Pelle) +Files: src/ex_cmds2.c + +Patch 7.3.346 +Problem: It's hard to test netbeans commands. +Solution: Process netbeans commands after :sleep. (Xavier de Gaye) +Files: runtime/doc/netbeans.txt, src/ex_docmd.c, src/netbeans.c + +Patch 7.3.347 +Problem: When dropping text from a browser on Vim it receives HTML even + though "html" is excluded from 'clipboard'. (Andrei Avk) +Solution: Fix the condition for TARGET_HTML. +Files: src/gui_gtk_x11.c + +Patch 7.3.348 +Problem: "call range(1, 947948399)" causes a crash. (ZyX) +Solution: Avoid a loop in the out of memory message. +Files: src/misc2.c + +Patch 7.3.349 +Problem: When running out of memory during startup trying to open a + swapfile will loop forever. +Solution: Let findswapname() set dirp to NULL if out of memory. +Files: src/memline.c + +Patch 7.3.350 +Problem: Block of code after ":lua << EOF" may not work. (Paul Isambert) +Solution: Recognize the ":lua" command, skip to EOF. +Files: src/eval.c + +Patch 7.3.351 +Problem: Text formatting uses start of insert position when it should not. + (Peter Wagenaar) +Solution: Do not use Insstart when intentionally formatting. +Files: src/edit.c + +Patch 7.3.352 +Problem: When completing methods dict functions and script-local functions + get in the way. +Solution: Sort function names starting with "<" to the end. (Yasuhiro + Matsumoto) +Files: src/ex_getln.c + +Patch 7.3.353 (after 7.3.343) +Problem: Missing part of the urxvt patch. +Solution: Add the change in term.c +Files: src/term.c + +Patch 7.3.354 +Problem: ":set backspace+=eol" doesn't work when 'backspace' has a + backwards compatible value of 2. +Solution: Convert the number to a string. (Hirohito Higashi) +Files: src/option.c + +Patch 7.3.355 +Problem: GTK warnings when using netrw.vim. (Ivan Krasilnikov) +Solution: Do not remove the beval event handler twice. +Files: src/option.c + +Patch 7.3.356 +Problem: Using "o" with 'cindent' set may freeze Vim. (lolilolicon) +Solution: Skip over {} correctly. (Hari G) +Files: src/misc1.c + +Patch 7.3.357 +Problem: Compiler warning in MS-Windows console build. +Solution: Adjust return type of PrintHookProc(). (Mike Williams) +Files: src/os_mswin.c + +Patch 7.3.358 (after 7.3.353) +Problem: Mouse support doesn't work properly. +Solution: Add HMT_URXVT. (lilydjwg, James McCoy) +Files: src/term.c + +Patch 7.3.359 +Problem: Command line completion shows dict functions. +Solution: Skip dict functions for completion. (Yasuhiro Matsumoto) +Files: src/eval.c + +Patch 7.3.360 +Problem: Interrupting the load of an autoload function may cause a crash. +Solution: Do not use the hashitem when not valid. (Yukihiro Nakadaira) +Files: src/eval.c + +Patch 7.3.361 +Problem: Accessing memory after it is freed when EXITFREE is defined. +Solution: Don't access curwin when firstwin is NULL. (Dominique Pelle) +Files: src/buffer.c + +Patch 7.3.362 +Problem: ml_get error when using ":g" with folded lines. +Solution: Adjust the line number for changed_lines(). (Christian Brabandt) +Files: src/ex_cmds.c + +Patch 7.3.363 +Problem: C indenting is wrong after #endif followed by a semicolon. +Solution: Add special handling for a semicolon in a line by itself. (Lech + Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + +Patch 7.3.364 (after 7.3.353) +Problem: Can't compile on HP-UX. (John Marriott) +Solution: Only use TTYM_URXVT when it is defined. +Files: src/term.c + +Patch 7.3.365 +Problem: Crash when using a large Unicode character in a file that has + syntax highlighting. (ngollan) +Solution: Check for going past the end of the utf tables. (Dominique Pelle) +Files: src/mbyte.c + +Patch 7.3.366 +Problem: A tags file with an extremely long name causes errors. +Solution: Ignore tags that are too long. (Arno Renevier) +Files: src/tag.c + +Patch 7.3.367 +Problem: :wundo and :rundo use a wrong checksum. +Solution: Include the last line when computing the hash. (Christian Brabandt) +Files: src/undo.c + +Patch 7.3.368 +Problem: Gcc complains about redefining _FORTIFY_SOURCE. +Solution: Undefine it before redefining it. +Files: src/Makefile, src/configure.in, src/auto/configure + +Patch 7.3.369 +Problem: When compiled with Gnome get an error message when using --help. +Solution: Don't fork. (Ivan Krasilnikov) +Files: src/main.c + +Patch 7.3.370 +Problem: Compiler warns for unused variable in Lua interface. +Solution: Remove the variable. +Files: src/if_lua.c + +Patch 7.3.371 +Problem: Crash in autocomplete. (Greg Weber) +Solution: Check not going over allocated buffer size. +Files: src/misc2.c + +Patch 7.3.372 +Problem: When using a command line mapping to <Up> with file name + completion to go one directory up, 'wildchar' is inserted. + (Yasuhiro Matsumoto) +Solution: Set the KeyTyped flag. +Files: src/ex_getln.c + +Patch 7.3.373 (after 7.3.366) +Problem: A tags file with an extremely long name may cause an infinite loop. +Solution: When encountering a long name switch to linear search. +Files: src/tag.c + +Patch 7.3.374 +Problem: ++encoding does not work properly. +Solution: Recognize ++encoding before ++enc. (Charles Cooper) +Files: src/ex_docmd.c + +Patch 7.3.375 +Problem: Duplicate return statement. +Solution: Remove the superfluous one. (Dominique Pelle) +Files: src/gui_mac.c + +Patch 7.3.376 +Problem: Win32: Toolbar repainting does not work when the mouse pointer + hovers over a button. +Solution: Call DefWindowProc() when not handling an event. (Sergiu Dotenco) +Files: src/gui_w32.c + +Patch 7.3.377 +Problem: No support for bitwise AND, OR, XOR and invert. +Solution: Add and(), or(), invert() and xor() functions. +Files: src/eval.c, src/testdir/test49.in, src/testdir/test65.in, + src/testdir/test65.ok, runtime/doc/eval.txt + +Patch 7.3.378 +Problem: When cross-compiling the check for uint32_t fails. +Solution: Only give a warning message. (Maksim Melnikau) +Files: src/configure.in, src/auto/configure + +Patch 7.3.379 +Problem: C-indenting wrong for static enum. +Solution: Skip over "static". (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + +Patch 7.3.380 +Problem: C-indenting wrong for a function header. +Solution: Skip to the start paren. (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + +Patch 7.3.381 +Problem: Configure silently skips interfaces that won't work. +Solution: Add the --enable-fail_if_missing argument. (Shlomi Fish) +Files: src/Makefile, src/configure.in, src/auto/configure + +Patch 7.3.382 (after 7.3.376) +Problem: IME characters are inserted twice. +Solution: Do not call DefWindowProc() if the event was handled. (Yasuhiro + Matsumoto) +Files: src/gui_w32.c + +Patch 7.3.383 +Problem: For EBCDIC pound sign is defined as 't'. +Solution: Correctly define POUND. +Files: src/ascii.h + +Patch 7.3.384 +Problem: Mapping CTRL-K in Insert mode breaks CTRL-X CTRL-K for dictionary + completion. +Solution: Add CTRL-K to the list of recognized keys. (James McCoy) +Files: src/edit.c + +Patch 7.3.385 +Problem: When using an expression mapping on the command line the cursor + ends up in the wrong place. (Yasuhiro Matsumoto) +Solution: Save and restore msg_col and msg_row when evaluating the + expression. +Files: src/getchar. + +Patch 7.3.386 +Problem: Test 83 fails when iconv does not support cp932. (raf) +Solution: Test if conversion works. (Yukihiro Nakadaira) +Files: src/testdir/test83.in + +Patch 7.3.387 (after 7.3.386) +Problem: Test 83 may fail for some encodings. +Solution: Set 'encoding' to utf-8 earlier. +Files: src/testdir/test83.in + +Patch 7.3.388 +Problem: Crash on exit when EXITFREE is defined and using tiny features. +Solution: Check for NULL window pointer. (Dominique Pelle) +Files: src/buffer.c + +Patch 7.3.389 +Problem: After typing at a prompt the "MORE" message appears too soon. +Solution: reset lines_left in msg_end_prompt(). (Eswald) +Files: src/message.c + +Patch 7.3.390 +Problem: Using NULL buffer pointer in a window. +Solution: Check for w_buffer being NULL in more places. (Bjorn Winckler) +Files: src/ex_cmds.c, src/quickfix.c, src/window.c + +Patch 7.3.391 +Problem: Can't check if the XPM_W32 feature is enabled. +Solution: Add xpm_w32 to the list of features. (kat) +Files: src/eval.c + +Patch 7.3.392 +Problem: When setting 'undofile' while the file is already loaded but + unchanged, try reading the undo file. (Andy Wokula) +Solution: Compute a checksum of the text when 'undofile' is set. (Christian + Brabandt) +Files: src/option.c, src/testdir/test72.in, src/testdir/test72.ok + +Patch 7.3.393 +Problem: Win32: When resizing Vim it is always moved to the primary monitor + if the secondary monitor is on the left. +Solution: Use the nearest monitor. (Yukihiro Nakadaira) +Files: src/gui_w32.c + +Patch 7.3.394 +Problem: When placing a mark while starting up a screen redraw messes up + the screen. (lith) +Solution: Don't redraw while still starting up. (Christian Brabandt) +Files: src/screen.c + +Patch 7.3.395 (after 7.3.251) +Problem: "dv?bar" in the last line deletes too much and breaks undo. +Solution: Only adjust the cursor position when it's after the last line of + the buffer. Add a test. (Christian Brabandt) +Files: src/ops.c, src/testdir/test43.in, src/testdir/test43.ok + +Patch 7.3.396 +Problem: After forcing an operator to be characterwise it can still become + linewise when spanning whole lines. +Solution: Don't make the operator linewise when motion_force was set. + (Christian Brabandt) +Files: src/ops.c + +Patch 7.3.397 +Problem: ":helpgrep" does not work properly when 'encoding' is not utf-8 or + latin1. +Solution: Convert non-ascii lines to 'encoding'. (Yasuhiro Matsumoto) +Files: src/quickfix.c, src/spell.c, src/misc2.c, src/proto/misc2.pro + +Patch 7.3.398 +Problem: When creating more than 10 location lists and adding items one by + one a previous location may be used. (Audrius Kažukauskas) +Solution: Clear the location list completely when adding the tenth one. +Files: src/quickfix.c + +Patch 7.3.399 +Problem: ":cd" doesn't work when the path contains wildcards. (Yukihiro + Nakadaira) +Solution: Ignore wildcard errors when the EW_NOTWILD flag is used. +Files: src/misc1.c + +Patch 7.3.400 +Problem: Compiler warnings for shadowed variables. +Solution: Remove or rename the variables. +Files: src/charset.c, src/digraph.c, src/edit.c, src/eval.c, src/fold.c, + src/getchar.c, src/message.c, src/misc2.c, src/move.c, + src/netbeans.c, src/option.c, src/os_unix.c, src/screen.c, + src/search.c, src/spell.c, src/syntax.c, src/tag.c, src/window.c + +Patch 7.3.401 +Problem: A couple more shadowed variables. +Solution: Rename the variables. +Files: src/netbeans.c + +Patch 7.3.402 +Problem: When jumping to the first error a line of the buffer is sometimes + redrawn on top of the list of errors. +Solution: Do not call update_topline_redraw() if the display was scrolled + up. +Files: src/quickfix.c + +Patch 7.3.403 +Problem: ":helpgrep" does not trigger QuickFixCmd* autocommands. +Solution: Trigger the autocommands. (Christian Brabandt) +Files: src/quickfix.c + +Patch 7.3.404 +Problem: When a complete function uses refresh "always" redo will not work + properly. +Solution: Do not reset compl_leader when compl_opt_refresh_always is set. + (Yasuhiro Matsumoto) +Files: src/edit.c + +Patch 7.3.405 +Problem: When xterm gets back the function keys it may delete the urxvt + mouse termcap code. +Solution: Check for the whole code, not just the start. (Egmont Koblinger) +Files: src/keymap.h, src/misc2.c, src/term.c + +Patch 7.3.406 +Problem: Multi-byte characters in b:browsefilter are not handled correctly. +Solution: First use convert_filter() normally and then convert to wide + characters. (Taro Muraoka) +Files: src/gui_w48.c + +Patch 7.3.407 +Problem: ":12verbose call F()" may duplicate text while trying to truncate. + (Thinca) +Solution: Only truncate when there is not enough room. Also check the byte + length of the buffer. +Files: src/buffer.c, src/eval.c, src/ex_getln.c, src/message.c, + src/proto/message.pro + +Patch 7.3.408 (after 7.3.406) +Problem: Missing declaration. +Solution: Add the declaration. (John Marriott) +Files: src/gui_w48.c + +Patch 7.3.409 +Problem: The license in pty.c is unclear. +Solution: Add a comment about the license. +Files: src/pty.c + +Patch 7.3.410 +Problem: Compiler error for // comment. (Joachim Schmitz) +Solution: Turn into /* comment */. +Files: src/message.c + +Patch 7.3.411 +Problem: Pasting in Visual mode using the "" register does not work. (John + Beckett) +Solution: Detect that the write is overwriting the pasted register. + (Christian Brabandt) +Files: src/normal.c + +Patch 7.3.412 +Problem: Storing a float in a session file has an additional '&'. +Solution: Remove the '&'. (Yasuhiro Matsumoto) +Files: src/eval.c + +Patch 7.3.413 +Problem: Build warnings on MS-Windows. +Solution: Add type casts. (Mike Williams) +Files: src/ex_getln.c, src/message.c, src/term.c + +Patch 7.3.414 +Problem: Using CTRL-A on "000" drops the leading zero, while on "001" it + doesn't. +Solution: Detect "000" as an octal number. (James McCoy) +Files: src/charset.c + +Patch 7.3.415 (after 7.3.359) +Problem: Completion of functions stops once a dictionary is encountered. + (James McCoy) +Solution: Return an empty string instead of NULL. +Files: src/eval.c + +Patch 7.3.416 (after 7.3.415) +Problem: Compiler warning for wrong pointer. +Solution: Add type cast. +Files: src/eval.c + +Patch 7.3.417 (after 7.3.395) +Problem: Test 43 fails with a tiny build. +Solution: Only run test 43 with at least a small build. +Files: src/testdir/test43.in + +Patch 7.3.418 +Problem: When a user complete function returns -1 an error message is + given. +Solution: When -2 is returned stop completion silently. (Yasuhiro Matsumoto) +Files: src/edit. + +Patch 7.3.419 +Problem: DBCS encoding in a user command does not always work. +Solution: Skip over DBCS characters. (Yasuhiro Matsumoto) +Files: src/ex_docmd.c + +Patch 7.3.420 +Problem: "it" and "at" don't work properly with a dash in the tag name. +Solution: Require a space to match the tag name. (Christian Brabandt) +Files: src/search.c + +Patch 7.3.421 +Problem: Get E832 when setting 'undofile' in vimrc and there is a file to + be edited on the command line. (Toothpik) +Solution: Do not try reading the undo file for a file that wasn't loaded. +Files: src/option.c + +Patch 7.3.422 +Problem: Python 3 does not have __members__. +Solution: Add "name" and "number" in another way. (lilydjwg) +Files: src/if_py_both.h, src/if_python3.c + +Patch 7.3.423 +Problem: Small mistakes in comments, proto and indent. +Solution: Fix the mistakes. +Files: src/ex_cmds2.c, src/structs.h, src/ui.c, src/proto/ex_docmd.pro + +Patch 7.3.424 +Problem: Win16 version missing some functions. +Solution: Add #defines for the functions. +Files: src/gui_w16.c + +Patch 7.3.425 (after 7.3.265) +Problem: Search history lines are duplicated. (Edwin Steiner) +Solution: Convert separator character from space to NUL. +Files: src/ex_getln.c + +Patch 7.3.426 +Problem: With '$' in 'cpoptions' the $ is not displayed in the first + column. +Solution: Use -1 instead of 0 as a special value. (Hideki Eiraku and + Hirohito Higashi) +Files: src/edit.c, src/globals.h, src/move.c, src/screen.c, src/search.c + +Patch 7.3.427 +Problem: readfile() can be slow with long lines. +Solution: Use realloc() instead of alloc(). (John Little) +Files: src/eval.c + +Patch 7.3.428 +Problem: Win32: an xpm file without a mask crashes Vim. +Solution: Fail when the mask is missing. (Dave Bodenstab) +Files: src/xpm_w32.c + +Patch 7.3.429 +Problem: When 'cpoptions' includes "E" "c0" in the first column is an + error. The redo register is then set to the erroneous command. +Solution: Do not set the redo register if the command fails because of an + empty region. (Hideki Eiraku) +Files: src/getchar.c, src/normal.c, src/proto/getchar.pro + +Patch 7.3.430 +Problem: When a custom filetype detection uses "augroup END" the conf + fileytpe detection does not have the filetypedetect group. +Solution: Always end the group and include filetypedetect in the conf + autocommand. (Lech Lorens) +Files: runtime/filetype.vim + +Patch 7.3.431 +Problem: Fetching a key at a prompt may be confused by escape sequences. + Especially when getting a prompt at a VimEnter autocommand. + (Alex Efros) +Solution: Properly handle escape sequences deleted by check_termcode(). +Files: src/getchar.c, src/misc1.c, src/term.c, src/proto/term.pro + +Patch 7.3.432 +Problem: ACLs are not supported for ZFS or NFSv4 on Solaris. +Solution: Add configure check and code. (Danek Duvall) +Files: src/configure.in, src/auto/configure, src/config.h.in, + src/os_unix.c + +Patch 7.3.433 +Problem: Using continued lines in a Vim script can be slow. +Solution: Instead of reallocating for every line use a growarray. (Yasuhiro + Matsumoto) +Files: src/ex_cmds2.c + +Patch 7.3.434 +Problem: Using join() can be slow. +Solution: Compute the size of the result before allocation to avoid a lot of + allocations and copies. (Taro Muraoka) +Files: src/eval.c + +Patch 7.3.435 +Problem: Compiler warning for unused variable. +Solution: Move the variable inside #ifdef. +Files: src/ex_cmds2.c + +Patch 7.3.436 +Problem: Compiler warnings for types on Windows. +Solution: Add type casts. (Mike Williams) +Files: src/eval.c + +Patch 7.3.437 +Problem: Continue looping inside FOR_ALL_TAB_WINDOWS even when already done. +Solution: Use goto instead of break. (Hirohito Higashi) +Files: src/fileio.c, src/globals.h + +Patch 7.3.438 +Problem: There is no way to avoid ":doautoall" reading modelines. +Solution: Add the <nomodeline> argument. Adjust documentation. +Files: src/fileio.c, runtime/doc/autocmd.txt + +Patch 7.3.439 +Problem: Compiler warnings to size casts in Perl interface. +Solution: Use XS macros. (James McCoy) +Files: src/if_perl.xs, src/typemap + +Patch 7.3.440 +Problem: Vim does not support UTF8_STRING for the X selection. +Solution: Add UTF8_STRING atom support. (Alex Efros) Use it only when + 'encoding' is set to Unicode. +Files: src/ui.c + +Patch 7.3.441 +Problem: Newer versions of MzScheme (Racket) require earlier (trampolined) + initialisation. +Solution: Call mzscheme_main() early in main(). (Sergey Khorev) +Files: src/Make_mvc.mak, src/if_mzsch.c, src/main.c, + src/proto/if_mzsch.pro + +Patch 7.3.442 (after 7.3.438) +Problem: Still read modelines for ":doautocmd". +Solution: Move check for <nomodeline> to separate function. +Files: src/fileio.c, src/ex_docmd.c, src/proto/fileio.pro, + runtime/doc/autocmd.txt + +Patch 7.3.443 +Problem: MS-Windows: 'shcf' and 'shellxquote' defaults are not very good. +Solution: Make a better guess when 'shell' is set to "cmd.exe". (Ben Fritz) +Files: src/option.c, runtime/doc/options.txt + +Patch 7.3.444 +Problem: ":all!" and ":sall!" give error E477, even though the + documentation says these are valid commands. +Solution: Support the exclamation mark. (Hirohito Higashi) +Files: src/ex_cmds.h, src/testdir/test31.in, src/testdir/test31.ok + +Patch 7.3.445 (after 7.3.443) +Problem: Can't properly escape commands for cmd.exe. +Solution: Default 'shellxquote' to '('. Append ')' to make '(command)'. + No need to use "/s" for 'shellcmdflag'. +Files: src/misc2.c, src/option.c, src/os_win32.c + +Patch 7.3.446 (after 7.3.445) +Problem: Win32: External commands with special characters don't work. +Solution: Add the 'shellxescape' option. +Files: src/misc2.c, src/option.c, src/option.h, runtime/doc/options.txt + +Patch 7.3.447 (after 7.3.446) +Problem: Win32: External commands with "start" do not work. +Solution: Unescape part of the command. (Yasuhiro Matsumoto) +Files: src/os_win32.c + +Patch 7.3.448 (after 7.3.447) +Problem: Win32: Still a problem with "!start /b". +Solution: Escape only '|'. (Yasuhiro Matsumoto) +Files: src/os_win32.c + +Patch 7.3.449 +Problem: Crash when a BufWinLeave autocommand closes the only other window. + (Daniel Hunt) +Solution: Abort closing a buffer when it becomes the only one. +Files: src/buffer.c, src/proto/buffer.pro, src/ex_cmds.c, src/ex_getln.c, + src/misc2.c, src/quickfix.c, src/window.c, src/proto/window.pro + +Patch 7.3.450 (after 7.3.448) +Problem: Win32: Still a problem with "!start /b". +Solution: Fix pointer use. (Yasuhiro Matsumoto) +Files: src/os_win32.c + +Patch 7.3.451 +Problem: Tcl doesn't work on 64 MS-Windows. +Solution: Make it work. (Dave Bodenstab) +Files: src/Make_mvc.mak, src/if_tcl.c + +Patch 7.3.452 +Problem: Undo broken when pasting close to the last line. (Andrey Radev) +Solution: Use a flag to remember if the deleted included the last line. + (Christian Brabandt) +Files: src/ops.c + +Patch 7.3.453 +Problem: Pasting in the command line is slow. +Solution: Don't redraw if there is another character to read. (Dominique + Pelle) +Files: src/ex_getln.c + +Patch 7.3.454 +Problem: Re-allocating memory slows Vim down. +Solution: Use realloc() in ga_grow(). (Dominique Pelle) +Files: src/misc2.c + +Patch 7.3.455 +Problem: Using many continuation lines can be slow. +Solution: Adjust the reallocation size to the current length. +Files: src/ex_cmds2.c + +Patch 7.3.456 +Problem: ":tab drop file" has several problems, including moving the + current window and opening a new tab for a file that already has a + window. +Solution: Refactor ":tab drop" handling. (Hirohito Higashi) +Files: src/buffer.c, src/testdir/test62.in, src/testdir/test62.ok + +Patch 7.3.457 +Problem: When setting $VIMRUNTIME later the directory for fetching + translated messages is not adjusted. +Solution: Put bindtextdomain() in vim_setenv(). +Files: src/misc1.c + +Patch 7.3.458 +Problem: Crash when calling smsg() during startup. +Solution: Don't use 'shortmess' when it is not set yet. +Files: src/option.c + +Patch 7.3.459 +Problem: Win32: Warnings for type conversion. +Solution: Add type casts. (Mike Williams) +Files: src/misc2.c, src/os_win32.c + +Patch 7.3.460 +Problem: Win32: UPX does not compress 64 bit binaries. +Solution: Mention and add the alternative: mpress. (Dave Bodenstab) +Files: src/INSTALLpc.txt, src/Make_ming.mak + +Patch 7.3.461 +Problem: The InsertCharPre autocommand event is not triggered during + completion and when typing several characters quickly. +Solution: Also trigger InsertCharPre during completion. Do not read ahead + when an InsertCharPre autocommand is defined. (Yasuhiro Matsumoto) +Files: src/edit.c, src/fileio.c, src/proto/fileio.pro + +Patch 7.3.462 +Problem: When using ":loadview" folds may be closed unexpectedly. +Solution: Take into account foldlevel. (Xavier de Gaye) +Files: src/fold.c + +Patch 7.3.463 +Problem: When using ":s///c" the cursor is moved away from the match. + (Lawman) +Solution: Don't move the cursor when do_ask is set. (Christian Brabandt) +Files: src/ex_cmds.c + +Patch 7.3.464 +Problem: Compiler warning for sprintf. +Solution: Put the length in a variable. (Dominique Pelle) +Files: src/version.c + +Patch 7.3.465 +Problem: Cannot get file name with newline from glob(). +Solution: Add argument to glob() and expand() to indicate they must return a + list. (Christian Brabandt) +Files: runtime/doc/eval.txt, src/eval.c, src/ex_getln.c, src/vim.h + +Patch 7.3.466 +Problem: Get ml_get error hen ":behave mswin" was used and selecting + several lines. (A. Sinan Unur) +Solution: Adjust the end of the operation. (Christian Brabandt) +Files: src/ops.c + +Patch 7.3.467 +Problem: Cursor positioned wrong at the command line when regaining focus + and using some input method. +Solution: Do not position the cursor in command line mode. +Files: src/mbyte.c + +Patch 7.3.468 +Problem: For some compilers the error file is not easily readable. +Solution: Use QuickFixCmdPre for more commands. (Marcin Szamotulski) +Files: runtime/doc/autocmd.txt, src/quickfix.c + +Patch 7.3.469 +Problem: Compiler warning for unused argument without some features. +Solution: Add UNUSED. +Files: src/buffer.c + +Patch 7.3.470 +Problem: Test 62 fails when compiled without GUI and X11. +Solution: Don't test :drop when it is not supported. +Files: src/testdir/test62.in + +Patch 7.3.471 +Problem: Can't abort listing placed signs. +Solution: Check "got_int". (Christian Brabandt) +Files: src/buffer.c, src/ex_cmds.c + +Patch 7.3.472 +Problem: Crash when using ":redraw" in a BufEnter autocommand and + switching to another tab. (驼峰) +Solution: Move triggering the autocommands to after correcting the + option values. Also check the row value to be out of bounds. + (Christian Brabandt, Sergey Khorev) +Files: src/screen.c, src/window.c + +Patch 7.3.473 +Problem: 'cursorbind' does not work correctly in combination with + 'virtualedit' set to "all". +Solution: Copy coladd. (Gary Johnson) +Files: src/move.c + +Patch 7.3.474 +Problem: Perl build with gcc 4 fails. +Solution: Remove XS() statements. (Yasuhiro Matsumoto) +Files: src/if_perl.xs + +Patch 7.3.475 +Problem: In a terminal with few colors the omnicomplete menu may be hard to + see when using the default colors. +Solution: Use more explicit colors. (suggested by Alex Henrie) +Files: src/syntax.c + +Patch 7.3.476 +Problem: When selecting a block, using "$" to include the end of each line + and using "A" and typing a backspace strange things happen. + (Yuangchen Xie) +Solution: Avoid using a negative length. (Christian Brabandt) +Files: src/ops.c + +Patch 7.3.477 +Problem: Using ":echo" to output enough lines to scroll, then using "j" and + "k" at the more prompt, displays the command on top of the output. + (Marcin Szamotulski) +Solution: Put the output below the command. (Christian Brabandt) +Files: src/eval.c + +Patch 7.3.478 +Problem: Memory leak using the ':rv!' command when reading dictionary or + list global variables i.e. with 'viminfo' containing !. +Solution: Free the typeval. (Dominique Pelle) +Files: src/eval.c + +Patch 7.3.479 +Problem: When 'cursorline' is set the line number highlighting can't be set + separately. +Solution: Add "CursorLineNr". (Howard Buchholz) +Files: src/option.c, src/screen.c, src/syntax.c, src/vim.h + +Patch 7.3.480 +Problem: When using ":qa" and there is a changed buffer picking the buffer + to jump to is not very good. +Solution: Consider current and other tab pages. (Hirohito Higashi) +Files: src/ex_cmds2.c + +Patch 7.3.481 +Problem: Changing 'virtualedit' in an operator function to "all" does not + have the desired effect. (Aaron Bohannon) +Solution: Save, reset and restore virtual_op when executing an operator + function. +Files: src/normal.c + +Patch 7.3.482 +Problem: With 'cursorbind' set moving up/down does not always keep the same + column. +Solution: Set curswant appropriately. (Gary Johnson) +Files: src/move.c + +Patch 7.3.483 (after 7.3.477) +Problem: More prompt shows up too often. +Solution: Instead of adding a line break, only start a new line in the + message history. (Christian Brabandt) +Files: src/eval.c, src/message.c, src/proto/message.pro + +Patch 7.3.484 +Problem: The -E and --echo-wid command line arguments are not mentioned in + "vim --help". +Solution: Add the help lines. (Dominique Pelle) +Files: src/main.c + +Patch 7.3.485 +Problem: When building Vim LDFLAGS isn't passed on to building xxd. +Solution: Pass the LDFLAGS value. (James McCoy) +Files: src/Makefile + +Patch 7.3.486 +Problem: Build error with mingw64 on Windows 7. +Solution: Avoid the step of going through vimres.res. (Guopeng Wen) +Files: src/Make_ming.mak + +Patch 7.3.487 +Problem: When setting 'timeoutlen' or 'ttimeoutlen' the column for vertical + movement is reset unnecessarily. +Solution: Do not set w_set_curswant for every option. Add a test for this. + (Kana Natsuno) Add the P_CURSWANT flag for options. +Files: src/option.c, src/testdir/test84.in, src/testdir/test84.ok, + src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Make_os2.mak, + src/testdir/Make_vms.mms, src/testdir/Makefile + +Patch 7.3.488 +Problem: ":help!" in a help file does not work as documented. +Solution: When in a help file don't give an error message. (thinca) +Files: src/ex_cmds.c + +Patch 7.3.489 +Problem: CTRL-] in Insert mode does not expand abbreviation when used in a + mapping. (Yichao Zhou) +Solution: Special case using CTRL-]. (Christian Brabandt) +Files: src/getchar.c, src/edit.c + +Patch 7.3.490 +Problem: Member confusion in Lua interface. +Solution: Fix it. Add luaeval(). (Taro Muraoka, Luis Carvalho) +Files: runtime/doc/if_lua.txt, src/eval.c, src/if_lua.c, + src/proto/if_lua.pro + +Patch 7.3.491 +Problem: No tests for Lua. +Solution: Add some simple tests for Lua. (Luis Carvalho) +Files: src/testdir/test1.in, src/testdir/test85.in, src/testdir/test85.ok + src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Make_os2.mak, + src/testdir/Make_vms.mms, src/testdir/Makefile + +Patch 7.3.492 +Problem: Can't indent conditions separately from function arguments. +Solution: Add the 'k' flag in 'cino'. (Lech Lorens) +Files: runtime/doc/indent.txt, src/misc1.c, src/testdir/test3.in, + src/testdir/test3.ok + +Patch 7.3.493 (after 7.3.492) +Problem: Two unused variables. +Solution: Remove them. (Hong Xu) +Files: src/misc1.c + +Patch 7.3.494 (after 7.3.491) +Problem: Can't compile with Lua 5.1 or dynamic Lua. +Solution: Fix dll_ methods. Fix luado(). (Muraoka Taro, Luis Carvalho) +Files: src/if_lua.c + +Patch 7.3.495 (after 7.3.492) +Problem: Compiler warnings. +Solution: Add function declaration. Remove "offset" argument. +Files: src/misc1.c + +Patch 7.3.496 +Problem: MS-DOS: When "diff" trips over difference in line separators some + tests fail. +Solution: Make some .ok files use unix line separators. (David Pope) +Files: src/testdir/Make_dos.mak, src/testdir/Make_ming.mak + +Patch 7.3.497 +Problem: Crash when doing ":python print" and compiled with gcc and + the optimizer enabled. +Solution: Avoid the crash, doesn't really fix the problem. (Christian + Brabandt) +Files: src/if_py_both.h + +Patch 7.3.498 +Problem: The behavior of the "- register changes depending on value of + the 'clipboard' option. (Szamotulski) +Solution: Also set the "- register when the register is "*" or "+". + (Christian Brabandt) +Files: src/ops.c + +Patch 7.3.499 +Problem: When using any interface language when Vim is waiting for a child + process it gets confused by a child process started through the + interface. +Solution: Always used waitpid() instead of wait(). (Yasuhiro Matsumoto) +Files: src/os_unix.c + +Patch 7.3.500 +Problem: Ming makefile unconditionally sets WINVER. +Solution: Only defined when not already defined. (Yasuhiro Matsumoto) +Files: src/Make_ming.mak + +Patch 7.3.501 +Problem: Error for "flush" not being defined when using Ruby command. +Solution: Defined "flush" as a no-op method. (Kent Sibilev) +Files: src/if_ruby.c + +Patch 7.3.502 +Problem: Netbeans insert halfway a line actually appends to the line. +Solution: Insert halfway the line. (Brian Victor) +Files: src/netbeans.c + +Patch 7.3.503 (after 7.3.501) +Problem: Warning for unused argument. +Solution: Add UNUSED. +Files: src/if_ruby.c + +Patch 7.3.504 +Problem: Commands in help files are not highlighted. +Solution: Allow for commands in backticks. Adjust CTRL-] to remove the + backticks. +Files: src/ex_cmds.c + +Patch 7.3.505 +Problem: Test 11 fails on MS-Windows in some versions. +Solution: Fix #ifdefs for whether filtering through a pipe is possible. Move + setting b_no_eol_lnum back to where it was before patch 7.3.124. + (David Pope) +Files: src/feature.h, src/eval.c, src/ex_cmds.c, src/fileio.c + +Patch 7.3.506 +Problem: GTK gives an error when selecting a non-existent file. +Solution: Add a handler to avoid the error. (Christian Brabandt) +Files: src/gui_gtk.c + +Patch 7.3.507 +Problem: When exiting with unsaved changes, selecting an existing file in + the file dialog, there is no dialog to ask whether the existing + file should be overwritten. (Felipe G. Nievinski) +Solution: Call check_overwrite() before writing. (Christian Brabandt) +Files: src/ex_cmds.c, src/ex_cmds2.c, src/proto/ex_cmds.pro + +Patch 7.3.508 +Problem: Default for v:register is not set. +Solution: Init v:register in eval_init(). Correct for 'clipboard' before the + main loop. (Ingo Karkat) +Files: src/eval.c, src/main.c + +Patch 7.3.509 +Problem: ":vimgrep" fails when 'autochdir' is set. +Solution: A more generic solution for changing directory. (Ben Fritz) +Files: src/quickfix.c + +Patch 7.3.510 +Problem: Test 77 fails on Solaris 7. (Michael Soyka) +Solution: Replace any tabs with spaces. +Files: src/testdir/test77.in + +Patch 7.3.511 +Problem: Using a FileReadCmd autocommand that does ":e! {file}" may cause a + crash. (Christian Brabandt) +Solution: Properly restore curwin->w_s. +Files: src/fileio.c + +Patch 7.3.512 +Problem: undofile() returns a useless name when passed an empty string. +Solution: Return an empty string. (Christian Brabandt) +Files: src/eval.c + +Patch 7.3.513 +Problem: Cannot use CTRL-E and CTRL-Y with "r". +Solution: Make CTRL-E and CTRL-Y work like in Insert mode. (Christian + Brabandt) +Files: src/edit.c, src/normal.c, src/proto/edit.pro + +Patch 7.3.514 +Problem: No completion for :history command. +Solution: Add the completion and update the docs. Also fix ":behave" + completion. (Dominique Pelle) +Files: runtime/doc/cmdline.txt, runtime/doc/map.txt, src/ex_docmd.c, + src/ex_getln.c, src/vim.h + +Patch 7.3.515 +Problem: 'wildignorecase' only applies to the last part of the path. +Solution: Also ignore case for letters earlier in the path. +Files: src/misc1.c + +Patch 7.3.516 +Problem: extend(o, o) may crash Vim. +Solution: Fix crash and add test. (Thinca and Hirohito Higashi) +Files: src/eval.c, src/testdir/test55.in, src/testdir/test55.ok + +Patch 7.3.517 +Problem: Crash when using "vipvv". (Alexandre Provencio) +Solution: Don't let the text length become negative. +Files: src/ops.c + +Patch 7.3.518 +Problem: When 'encoding' is a double-byte encoding ":helptags" may not find + tags correctly. +Solution: Use vim_strbyte() instead of vim_strchr(). (Yasuhiro Matsumoto) +Files: src/ex_cmds.c + +Patch 7.3.519 +Problem: When completefunction returns it cannot indicate end of completion + mode. +Solution: Recognize completefunction returning -3. (Matsushita Shougo) +Files: src/edit.c + +Patch 7.3.520 +Problem: Gvim starts up slow on Ubuntu 12.04. +Solution: Move the call to gui_mch_init_check() to after fork(). (Yasuhiro + Matsumoto) Do check $DISPLAY being set. +Files: src/gui.c, src/gui_gtk_x11.c, src/proto/gui_gtk_x11.pro + +Patch 7.3.521 +Problem: Using "z=" on a multi-byte character may cause a crash. +Solution: Don't use strlen() on an int pointer. +Files: src/spell.c + +Patch 7.3.522 +Problem: Crash in vim_realloc() when using MEM_PROFILE. +Solution: Avoid using a NULL argument. (Dominique Pelle) +Files: src/eval.c + +Patch 7.3.523 +Problem: ":diffupdate" doesn't check for files changed elsewhere. +Solution: Add the ! flag. (Christian Brabandt) +Files: runtime/doc/diff.txt, src/diff.c, src/ex_cmds.h + +Patch 7.3.524 (after 7.3.523) +Problem: Missing comma. +Solution: Add the comma. +Files: src/version.c + +Patch 7.3.525 +Problem: Compiler warning on 64 bit MS-Windows. +Solution: Add type cast. (Mike Williams) +Files: src/ex_getln.c + +Patch 7.3.526 +Problem: Confusing indenting for #ifdef. +Solution: Remove and add indent. (Elias Diem) +Files: src/normal.c + +Patch 7.3.527 +Problem: Clang complains about non-ASCII characters in a string. +Solution: Change to \x88 form. (Dominique Pelle) +Files: src/charset.c + +Patch 7.3.528 +Problem: Crash when closing last window in a tab. (Alex Efros) +Solution: Use common code in close_last_window_tabpage(). (Christian + Brabandt) +Files: src/window.c + +Patch 7.3.529 +Problem: Using a count before "v" and "V" does not work (Kikyous) +Solution: Make the count select that many characters or lines. (Christian + Brabandt) +Files: src/normal.c + +Patch 7.3.530 (after 7.3.520) +Problem: Gvim does not work when 'guioptions' includes "f". (Davido) +Solution: Call gui_mch_init_check() when running GUI in the foreground. + (Yasuhiro Matsumoto) +Files: src/gui.c + +Patch 7.3.531 (after 7.3.530) +Problem: GUI does not work on MS-Windows. +Solution: Add the missing #ifdef. (Patrick Avery) +Files: src/gui.c + +Patch 7.3.532 +Problem: Compiler warning from Clang. +Solution: Use a different way to point inside a string. (Dominique Pelle) +Files: src/syntax.c + +Patch 7.3.533 +Problem: Memory leak when writing undo file. +Solution: Free the ACL. (Dominique Pelle) +Files: src/undo.c + +Patch 7.3.534 (after 7.3.461) +Problem: When using an InsertCharPre autocommand autoindent fails. +Solution: Proper handling of v:char. (Alexey Radkov) +Files: src/edit.c + +Patch 7.3.535 +Problem: Many #ifdefs for MB_MAXBYTES. +Solution: Also define MB_MAXBYTES without the +multi_byte feature. Fix + places where the buffer didn't include space for a NUL byte. +Files: src/arabic.c, src/edit.c, src/eval.c, src/getchar.c, src/mbyte.c, + src/misc1.c, src/screen.c, src/spell.c, src/vim.h + +Patch 7.3.536 +Problem: When spell checking the German sharp s is not seen as a word + character. (Aexl Bender) +Solution: In utf_islower() return true for the sharp s. Note: also need + updated spell file for this to take effect. +Files: src/mbyte.c + +Patch 7.3.537 +Problem: Unnecessary call to init_spell_chartab(). +Solution: Delete the call. +Files: src/spell.c + +Patch 7.3.538 +Problem: 'efm' does not handle Tabs in pointer lines. +Solution: Add Tab support. Improve tests. (Lech Lorens) +Files: src/quickfix.c, src/testdir/test10.in, src/testdir/test10.ok + +Patch 7.3.539 +Problem: Redrawing a character on the command line does not work properly + for multi-byte characters. +Solution: Count the number of bytes in a character. (Yukihiro Nakadaira) +Files: src/ex_getln.c + +Patch 7.3.540 +Problem: Cursor is left on the text instead of the command line. +Solution: Don't call setcursor() in command line mode. +Files: src/getchar.c + +Patch 7.3.541 +Problem: When joining lines comment leaders need to be removed manually. +Solution: Add the 'j' flag to 'formatoptions'. (Lech Lorens) +Files: runtime/doc/change.txt, src/edit.c, src/ex_docmd.c, src/misc1.c, + src/normal.c, src/ops.c, src/option.h, src/proto/misc1.pro, + src/proto/ops.pro, src/search.c, src/testdir/test29.in, + src/testdir/test29.ok + +Patch 7.3.542 (after 7.3.506) +Problem: Function is sometimes unused. +Solution: Add #ifdef. +Files: src/gui_gtk.c + +Patch 7.3.543 +Problem: The cursor is in the wrong line after using ":copen". (John + Beckett) +Solution: Invoke more drastic redraw method. +Files: src/eval.c + +Patch 7.3.544 +Problem: There is no good way to close a quickfix window when closing the + last ordinary window. +Solution: Add the QuitPre autocommand. +Files: src/ex_docmd.c, src/fileio.c, src/vim.h + +Patch 7.3.545 +Problem: When closing a window or buffer autocommands may close it too, + causing problems for where the autocommand was invoked from. +Solution: Add the w_closing and b_closing flags. When set disallow ":q" and + ":close" to prevent recursive closing. +Files: src/structs.h, src/buffer.c, src/ex_docmd.c, src/window.c + +Patch 7.3.546 +Problem: Bogus line break. +Solution: Remove the line break. +Files: src/screen.c + +Patch 7.3.547 (after 7.3.541) +Problem: Compiler warning for uninitialized variable. +Solution: Initialize it. +Files: src/ops.c + +Patch 7.3.548 +Problem: Compiler warning on 64 bit Windows. +Solution: Add type cast. (Mike Williams) +Files: src/ops.c + +Patch 7.3.549 +Problem: In 'cinoptions' "0s" is interpreted as one shiftwidth. (David + Pineau) +Solution: Use the zero as zero. (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + +Patch 7.3.550 (after 7.3.541) +Problem: With "j" in 'formatoptions' a list leader is not removed. (Gary + Johnson) +Solution: Don't ignore the start of a three part comment. (Lech Lorens) +Files: src/ops.c, src/testdir/test29.in, src/testdir/test29.ok + +Patch 7.3.551 +Problem: When using :tablose a TabEnter autocommand is triggered too early. + (Karthick) +Solution: Don't trigger *Enter autocommands before closing the tab. + (Christian Brabandt) +Files: src/buffer.c, src/eval.c, src/ex_cmds2.c, src/fileio.c, + src/proto/window.pro, src/window.c + +Patch 7.3.552 +Problem: Formatting inside comments does not use the "2" flag in + 'formatoptions'. +Solution: Support the "2" flag. (Tor Perkins) +Files: src/vim.h, src/ops.c, src/edit.c, src/misc1.c, + src/testdir/test68.in, src/testdir/test68.ok + +Patch 7.3.553 +Problem: With double-width characters and 'listchars' containing "precedes" + the text is displayed one cell off. +Solution: Check for double-width character being overwritten by the + "precedes" character. (Yasuhiro Matsumoto) +Files: src/screen.c + +Patch 7.3.554 (after 7.3.551) +Problem: Compiler warning for unused argument. +Solution: Add UNUSED. +Files: src/window.c + +Patch 7.3.555 +Problem: Building on IBM z/OS fails. +Solution: Adjust configure. Use the QUOTESED value from config.mk instead of + the hard coded one in Makefile. (Stephen Bovy) +Files: src/configure.in, src/auto/configure, src/Makefile + +Patch 7.3.556 +Problem: Compiler warnings on 64 bit Windows. +Solution: Add type casts. (Mike Williams) +Files: src/misc1.c + +Patch 7.3.557 +Problem: Crash when an autocommand wipes out a buffer when it is hidden. +Solution: Restore the current window when needed. (Christian Brabandt) +Files: src/buffer.c + +Patch 7.3.558 +Problem: Memory access error. (Gary Johnson) +Solution: Allocate one more byte. (Dominique Pelle) +Files: src/misc1.c + +Patch 7.3.559 +Problem: home_replace() does not work with 8.3 filename. +Solution: Make ":p" expand 8.3 name to full path. (Yasuhiro Matsumoto) +Files: src/eval.c, src/misc1.c + +Patch 7.3.560 +Problem: Get an error for a locked argument in extend(). +Solution: Initialize the lock flag for a dictionary. (Yukihiro Nakadaira) +Files: src/eval.c + +Patch 7.3.561 +Problem: Using refresh: always in a complete function breaks the "." + command. (Val Markovic) +Solution: Add match leader to the redo buffer. (Yasuhiro Matsumoto) +Files: src/edit.c + +Patch 7.3.562 +Problem: ":profdel" should not work when the +profile feature is disabled. +Solution: Call ex_ni(). (Yasuhiro Matsumoto) +Files: src/ex_cmds2.c + +Patch 7.3.563 (after 7.3.557) +Problem: Can't build with tiny features. +Solution: Add #ifdef. +Files: src/buffer.c + +Patch 7.3.564 (after 7.3.559) +Problem: Warning for pointer conversion. +Solution: Add type cast. +Files: src/misc1.c + +Patch 7.3.565 +Problem: Can't generate proto file for Python 3. +Solution: Add PYTHON3_CFLAGS to LINT_CFLAGS. +Files: src/Makefile + +Patch 7.3.566 (after 7.3.561) +Problem: Redo after completion does not work correctly when refresh: always + is not used. (Raymond Ko) +Solution: Check the compl_opt_refresh_always flag. (Christian Brabandt) +Files: src/edit.c + +Patch 7.3.567 +Problem: Missing copyright notice. +Solution: Add Vim copyright notice. (Taro Muraoka) +Files: src/dehqx.py + +Patch 7.3.568 +Problem: Bad indents for #ifdefs. +Solution: Add and remove spaces. (Elias Diem) +Files: src/globals.h + +Patch 7.3.569 +Problem: Evaluating Vim expression in Python is insufficient. +Solution: Add vim.bindeval(). Also add pyeval() and py3eval(). (ZyX) +Files: runtime/doc/eval.txt, runtime/doc/if_pyth.txt, src/eval.c, + src/if_lua.c, src/if_py_both.h, src/if_python.c, src/if_python3.c, + src/proto/eval.pro, src/proto/if_python.pro, + src/proto/if_python3.pro, src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Makefile, + src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.570 +Problem: ":vimgrep" does not obey 'wildignore'. +Solution: Apply 'wildignore' and 'suffixes' to ":vimgrep". (Ingo Karkat) +Files: src/ex_cmds2.c, src/proto/ex_cmds2.pro, src/quickfix.c, src/spell.c + +Patch 7.3.571 +Problem: Duplicated condition. +Solution: Remove one. (Dominique Pelle) +Files: src/os_win32.c + +Patch 7.3.572 +Problem: Duplicate statement in if and else. (Dominique Pelle) +Solution: Remove the condition and add a TODO. +Files: src/gui_xmebw.c + +Patch 7.3.573 +Problem: Using array index before bounds checking. +Solution: Swap the parts of the condition. (Dominique Pelle) +Files: src/ops.c + +Patch 7.3.574 +Problem: When pasting a register in the search command line a CTRL-L + character is not pasted. (Dominique Pelle) +Solution: Escape the CTRL-L. (Christian Brabandt) +Files: src/ex_getln.c + +Patch 7.3.575 +Problem: "ygt" tries to yank instead of giving an error. (Daniel Mueller) +Solution: Check for a pending operator. +Files: src/normal.c + +Patch 7.3.576 +Problem: Formatting of lists inside comments is not right yet. +Solution: Use another solution and add a test. (Tor Perkins) +Files: src/edit.c, src/misc1.c, src/testdir/test68.in, + src/testdir/test69.ok + +Patch 7.3.577 +Problem: Size of memory does not fit in 32 bit unsigned. +Solution: Use Kbyte instead of byte. Call GlobalMemoryStatusEx() instead of + GlobalMemoryStatus() when available. +Files: src/misc2.c, src/option.c, src/os_amiga.c, src/os_msdos.c, + src/os_win16.c, src/os_win32.c + +Patch 7.3.578 +Problem: Misplaced declaration. +Solution: Move declaration to start of block. +Files: src/if_py_both.h + +Patch 7.3.579 (after 7.3.569) +Problem: Can't compile with Python 2.5. +Solution: Use PyCObject when Capsules are not available. +Files: src/if_py_both.h, src/if_python.c, src/if_python3.c + +Patch 7.3.580 +Problem: Warning on 64 bit MS-Windows. +Solution: Add type cast. (Mike Williams) +Files: src/if_py_both.h + +Patch 7.3.581 +Problem: Problems compiling with Python. +Solution: Pick UCS2 or UCS4 function at runtime. (lilydjwg) +Files: src/if_python.c + +Patch 7.3.582 (after 7.3.576) +Problem: Missing parts of the test OK file. +Solution: Add the missing parts. +Files: src/testdir/test68.ok + +Patch 7.3.583 +Problem: PyObject_NextNotImplemented is not defined before Python 2.7. + (Danek Duvall) +Solution: Add #ifdefs. +Files: src/if_python.c + +Patch 7.3.584 +Problem: PyCObject is not always defined. +Solution: Use PyObject instead. +Files: src/if_py_both.h, src/if_python.c + +Patch 7.3.585 +Problem: Calling changed_bytes() too often. +Solution: Move changed_bytes() out of a loop. (Tor Perkins) +Files: src/edit.c + +Patch 7.3.586 +Problem: When compiling with Cygwin or MingW MEMORYSTATUSEX is not defined. +Solution: Set the default for WINVER to 0x0500. +Files: src/Make_ming.mak, src/Make_cyg.mak + +Patch 7.3.587 +Problem: Compiler warning for local var shadowing global var. +Solution: Rename the var and move it to an inner block. (Christian Brabandt) +Files: src/buffer.c + +Patch 7.3.588 +Problem: Crash on NULL pointer. +Solution: Fix the immediate problem by checking for NULL. (Lech Lorens) +Files: src/window.c + +Patch 7.3.589 +Problem: Crash when $HOME is not set. +Solution: Check for a NULL pointer. (Chris Webb) +Files: src/misc1.c + +Patch 7.3.590 +Problem: The '< and '> marks cannot be set directly. +Solution: Allow setting '< and '>. (Christian Brabandt) +Files: src/mark.c + +Patch 7.3.591 +Problem: Can only move to a tab by absolute number. +Solution: Move a number of tabs to the left or the right. (Lech Lorens) +Files: runtime/doc/tabpage.txt, src/ex_cmds.h, src/ex_docmd.c, + src/testdir/test62.in, src/testdir/test62.ok, src/window.c + +Patch 7.3.592 +Problem: Vim on GTK does not support g:browsefilter. +Solution: Add a GtkFileFilter to the file chooser. (Christian Brabandt) +Files: src/gui_gtk.c + +Patch 7.3.593 +Problem: No easy way to decide if b:browsefilter will work. +Solution: Add the browsefilter feature. +Files: src/gui_gtk.c, src/eval.c, src/vim.h + +Patch 7.3.594 +Problem: The X command server doesn't work perfectly. It sends an empty + reply for as-keys requests. +Solution: Remove duplicate ga_init2(). Do not send a reply for as-keys + requests. (Brian Burns) +Files: src/if_xcmdsrv.c + +Patch 7.3.595 +Problem: The X command server responds slowly +Solution: Change the loop that waits for replies. (Brian Burns) +Files: src/if_xcmdsrv.c + +Patch 7.3.596 +Problem: Can't remove all signs for a file or buffer. +Solution: Support "*" for the sign id. (Christian Brabandt) +Files: runtime/doc/sign.txt, src/buffer.c, src/ex_cmds.c, + src/proto/buffer.pro + +Patch 7.3.597 +Problem: 'clipboard' "autoselect" only applies to the * register. (Sergey + Vakulenko) +Solution: Make 'autoselect' work for the + register. (Christian Brabandt) + Add the "autoselectplus" option in 'clipboard' and the "P" flag in + 'guioptions'. +Files: runtime/doc/options.txt, src/normal.c, src/ops.c, src/screen.c, + src/ui.c, src/globals.h, src/proto/ui.pro, src/option.h, src/gui.c + +Patch 7.3.598 +Problem: Cannot act upon end of completion. (Taro Muraoka) +Solution: Add an autocommand event that is triggered when completion has + finished. (Idea by Florian Klein) +Files: src/edit.c, src/fileio.c, src/vim.h + +Patch 7.3.599 (after 7.3.597) +Problem: Missing change in one file. +Solution: Patch for changed clip_autoselect(). +Files: src/option.c + +Patch 7.3.600 +Problem: <f-args> is not expanded properly with DBCS encoding. +Solution: Skip over character instead of byte. (Yukihiro Nakadaira) +Files: src/ex_docmd.c + +Patch 7.3.601 +Problem: Bad code style. +Solution: Insert space, remove parens. +Files: src/farsi.c + +Patch 7.3.602 +Problem: Missing files in distribution. +Solution: Update the list of files. +Files: Filelist + +Patch 7.3.603 +Problem: It is possible to add replace builtin functions by calling + extend() on g:. +Solution: Add a flag to a dict to indicate it is a scope. Check for + existing functions. (ZyX) +Files: src/buffer.c, src/eval.c, src/proto/eval.pro, src/structs.h, + src/testdir/test34.in, src/testdir/test34.ok, src/window.c + +Patch 7.3.604 +Problem: inputdialog() doesn't use the cancel argument in the console. + (David Fishburn) +Solution: Use the third argument. (Christian Brabandt) +Files: src/eval.c + +Patch 7.3.605 (after 7.3.577) +Problem: MS-Windows: Can't compile with older compilers. (Titov Anatoly) +Solution: Add #ifdef for MEMORYSTATUSEX. +Files: src/os_win32.c + +Patch 7.3.606 +Problem: CTRL-P completion has a problem with multi-byte characters. +Solution: Check for next character being NUL properly. (Yasuhiro Matsumoto) +Files: src/search.c, src/macros.h + +Patch 7.3.607 +Problem: With an 8 color terminal the selected menu item is black on black, + because darkGrey as bg is the same as black. +Solution: Swap fg and bg colors. (James McCoy) +Files: src/syntax.c + +Patch 7.3.608 +Problem: winrestview() does not always restore the view correctly. +Solution: Call win_new_height() and win_new_width(). (Lech Lorens) +Files: src/eval.c, src/proto/window.pro, src/window.c + +Patch 7.3.609 +Problem: File names in :checkpath! output are garbled. +Solution: Check for \zs in the pattern. (Lech Lorens) +Files: src/search.c, src/testdir/test17.in, src/testdir/test17.ok + +Patch 7.3.610 +Problem: Cannot operate on the text that a search pattern matches. +Solution: Add the "gn" and "gN" commands. (Christian Brabandt) +Files: runtime/doc/index.txt, runtime/doc/visual.txt, src/normal.c, + src/proto/search.pro, src/search.c, src/testdir/test53.in, + src/testdir/test53.ok + +Patch 7.3.611 +Problem: Can't use Vim dictionary as self argument in Python. +Solution: Fix the check for the "self" argument. (ZyX) +Files: src/if_py_both.h + +Patch 7.3.612 +Problem: Auto formatting messes up text when 'fo' contains "2". (ZyX) +Solution: Decrement "less_cols". (Tor Perkins) +Files: src/misc1.c, src/testdir/test68.in, src/testdir/test68.ok + +Patch 7.3.613 +Problem: Including Python's config.c in the build causes trouble. It is + not clear why it was there. +Solution: Omit the config file. (James McCoy) +Files: src/Makefile, src/auto/configure, src/configure.in + +Patch 7.3.614 +Problem: Number argument gets turned into a number while it should be a + string. +Solution: Add flag to the call_vim_function() call. (Yasuhiro Matsumoto) +Files: src/edit.c, src/eval.c, src/proto/eval.pro + +Patch 7.3.615 +Problem: Completion for a user command does not recognize backslash before + a space. +Solution: Recognize escaped characters. (Yasuhiro Matsumoto) +Files: src/ex_docmd.c + +Patch 7.3.616 (after 7.3.610) +Problem: Can't compile without +visual. +Solution: Add #ifdef. +Files: src/normal.c + +Patch 7.3.617 (after 7.3.615) +Problem: Hang on completion. +Solution: Skip over the space. (Yasuhiro Matsumoto) +Files: src/ex_docmd.c + +Patch 7.3.618 (after 7.3.616) +Problem: Still doesn't compile with small features. +Solution: Move current_search() out of #ifdef. (Dominique Pelle) +Files: src/normal.c, src/search.c + +Patch 7.3.619 +Problem: When executing a shell command Vim may become slow to respond. +Solution: Don't wait after every processed message. (idea by Yasuhiro + Matsumoto) +Files: src/os_win32.c + +Patch 7.3.620 +Problem: Building with recent Ruby on Win32 doesn't work. +Solution: Add a separate argument for the API version. (Yasuhiro Matsumoto) +Files: src/Make_ming.mak, src/Make_mvc.mak + +Patch 7.3.621 +Problem: Compiler warnings on 64 bit windows. +Solution: Add type casts. (Mike Williams) +Files: src/ex_docmd.c, src/search.c + +Patch 7.3.622 +Problem: XPM library for Win32 can't be found. +Solution: Suggest using the one from the Vim ftp site. +Files: src/Make_mvc.mak + +Patch 7.3.623 +Problem: Perl 5.14 commands crash Vim on MS-Windows. +Solution: Use perl_get_sv() instead of GvSV(). (Raymond Ko) +Files: src/if_perl.xs + +Patch 7.3.624 +Problem: When cancelling input() it returns the third argument. That should + only happen for inputdialog(). +Solution: Check if inputdialog() was used. (Hirohito Higashi) +Files: src/eval.c + +Patch 7.3.625 +Problem: "gn" does not handle zero-width matches correctly. +Solution: Handle zero-width patterns specially. (Christian Brabandt) +Files: src/search.c + +Patch 7.3.626 +Problem: Python interface doesn't build with Python 2.4 or older. +Solution: Define Py_ssize_t. (Benjamin Bannier) +Files: src/if_py_both.h + +Patch 7.3.627 +Problem: When using the "n" flag with the ":s" command a \= substitution + will not be evaluated. +Solution: Do perform the evaluation, so that a function can be invoked at + every matching position without changing the text. (Christian + Brabandt) +Files: src/ex_cmds.c + +Patch 7.3.628 +Problem: ":open" does not allow for a !, which results in a confusing error + message. (Shawn Wilson) +Solution: Allow ! on ":open". (Christian Brabandt) +Files: src/ex_cmds.h + +Patch 7.3.629 +Problem: There is no way to make 'shiftwidth' follow 'tabstop'. +Solution: When 'shiftwidth' is zero use the value of 'tabstop'. (Christian + Brabandt) +Files: src/edit.c, src/ex_getln.c, src/fold.c, src/misc1.c, src/ops.c, + src/option.c, src/proto/option.pro + +Patch 7.3.630 +Problem: "|" does not behave correctly when 'virtualedit' is set. +Solution: Call validate_virtcol(). (David Bürgin) +Files: src/normal.c + +Patch 7.3.631 +Problem: Cannot complete user names. +Solution: Add user name completion. (Dominique Pelle) +Files: runtime/doc/map.txt, src/auto/configure, src/config.h.in, + src/configure.in, src/ex_docmd.c, src/ex_getln.c, src/misc1.c, + src/misc2.c, src/proto/misc1.pro, src/vim.h + +Patch 7.3.632 +Problem: Cannot select beyond 222 columns with the mouse in xterm. +Solution: Add support for SGR mouse tracking. (Hayaki Saito) +Files: runtime/doc/options.txt, src/feature.h, src/keymap.h, src/misc2.c, + src/option.h, src/os_unix.c, src/term.c, src/version.c + +Patch 7.3.633 +Problem: Selection remains displayed as selected after selecting another + text. +Solution: Call xterm_update() before select(). (Andrew Pimlott) +Files: src/os_unix.c + +Patch 7.3.634 +Problem: Month/Day format for undo is confusing. (Marcin Szamotulski) +Solution: Always use Year/Month/Day, should work for everybody. +Files: src/undo.c + +Patch 7.3.635 +Problem: Issue 21: System call during startup sets 'lines' to a wrong + value. (Karl Yngve) +Solution: Don't set the shell size while the GUI is still starting up. + (Christian Brabandt) +Files: src/ui.c + +Patch 7.3.636 (after 7.3.625) +Problem: Not all zero-width matches handled correctly for "gn". +Solution: Move zero-width detection to a separate function. (Christian + Brabandt) +Files: src/search.c + +Patch 7.3.637 +Problem: Cannot catch the error caused by a foldopen when there is no fold. + (ZyX, Issue 48) +Solution: Do not break out of the loop early when inside try/catch. + (Christian Brabandt) Except when there is a syntax error. +Files: src/ex_docmd.c, src/globals.h + +Patch 7.3.638 +Problem: Unnecessary redraw of the previous character. +Solution: Check if the character is double-width. (Jon Long) +Files: src/screen.c + +Patch 7.3.639 +Problem: It's not easy to build Vim on Windows with XPM support. +Solution: Include the required files, they are quite small. Update the + MSVC makefile to use them. Binary files are in the next patch. + (Sergey Khorev) +Files: src/xpm/COPYRIGHT, src/xpm/README.txt, src/xpm/include/simx.h, + src/xpm/include/xpm.h, src/Make_mvc.mak, src/bigvim.bat, + src/bigvim64.bat, Filelist + +Patch 7.3.640 +Problem: It's not easy to build Vim on Windows with XPM support. +Solution: Binary files for 7.3.639. (Sergey Khorev) +Files: src/xpm/x64/lib/libXpm.lib, src/xpm/x86/lib/libXpm.a, + src/xpm/x86/lib/libXpm.lib + +Patch 7.3.641 +Problem: ":mkview" uses ":normal" instead of ":normal!" for folds. (Dan) +Solution: Add the bang. (Christian Brabandt) +Files: src/fold.c + +Patch 7.3.642 +Problem: Segfault with specific autocommands. Was OK after 7.3.449 and + before 7.3.545. (Richard Brown) +Solution: Pass TRUE for abort_if_last in the call to close_buffer(). + (Christian Brabandt) +Files: src/window.c + +Patch 7.3.643 (after 7.3.635) +Problem: MS-Windows: When starting gvim maximized 'lines' and 'columns' are + wrong. (Christian Robinson) +Solution: Move the check for gui.starting from ui_get_shellsize() to + check_shellsize(). +Files: src/ui.c, src/term.c + +Patch 7.3.644 +Problem: Dead code for BeOS GUI. +Solution: Remove unused __BEOS__ stuff. +Files: src/gui.c + +Patch 7.3.645 +Problem: No tests for patch 7.3.625 and 7.3.637. +Solution: Add more tests for the "gn" command and try/catch. (Christian + Brabandt) +Files: src/testdir/test53.in, src/testdir/test53.ok, + src/testdir/test55.in, src/testdir/test55.ok + +Patch 7.3.646 +Problem: When reloading a buffer the undo file becomes unusable unless ":w" + is executed. (Dmitri Frank) +Solution: After reloading the buffer write the undo file. (Christian + Brabandt) +Files: src/fileio.c + +Patch 7.3.647 +Problem: "gnd" doesn't work correctly in Visual mode. +Solution: Handle Visual mode differently in "gn". (Christian Brabandt) +Files: src/search.c, src/testdir/test53.in, src/testdir/test53.ok + +Patch 7.3.648 +Problem: Crash when using a very long file name. (ZyX) +Solution: Properly check length of buffer space. +Files: src/buffer.c + +Patch 7.3.649 +Problem: When 'clipboard' is set to "unnamed" small deletes end up in the + numbered registers. (Ingo Karkat) +Solution: Use the original register name to decide whether to put a delete + in a numbered register. (Christian Brabandt) +Files: src/ops.c + +Patch 7.3.650 +Problem: Completion after ":help \{-" gives an error message and messes up + the command line. +Solution: Cancel the tag search if the pattern can't be compiled. (Yasuhiro + Matsumoto) +Files: src/tag.c + +Patch 7.3.651 +Problem: Completion after ":help \{-" gives an error message. +Solution: Prepend a backslash. +Files: src/ex_cmds.c + +Patch 7.3.652 +Problem: Workaround for Python crash isn't perfect. +Solution: Change the type of the length argument. (Sean Estabrooks) +Files: src/if_py_both.h + +Patch 7.3.653 +Problem: MingW needs build rule for included XPM files. Object directory + for 32 and 64 builds is the same, also for MSVC. +Solution: Add MingW build rule to use included XPM files. Add the CPU or + architecture to the object directory name. (Sergey Khorev) +Files: src/Make_ming.mak, src/Make_mvc.mak, src/xpm/README.txt + +Patch 7.3.654 +Problem: When creating a Vim dictionary from Python objects an empty key + might be used. +Solution: Do not use empty keys, throw an IndexError. (ZyX) +Files: src/if_py_both.h + +Patch 7.3.655 +Problem: 64 bit MingW xpm .a file is missing. +Solution: Add the file. (Sergey Khorev) +Files: src/xpm/x64/lib/libXpm.a + +Patch 7.3.656 +Problem: Internal error in :pyeval. +Solution: Handle failed object conversion. (ZyX) +Files: src/if_python.c, src/if_python3.c + +Patch 7.3.657 +Problem: Python bindings silently truncate string values containing NUL. +Solution: Fail when a string contains NUL. (ZyX) +Files: src/if_python.c, src/if_python3.c + +Patch 7.3.658 +Problem: NUL bytes truncate strings when converted from Python. +Solution: Handle truncation as an error. (ZyX) +Files: src/if_py_both.h, src/if_python3.c + +Patch 7.3.659 +Problem: Recent Python changes are not tested. +Solution: Add tests for Python bindings. (ZyX) +Files: src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.660 +Problem: ":help !" jumps to help for ":!". +Solution: Adjust check for tag header line. (Andy Wokula) +Files: src/tag.c + +Patch 7.3.661 (after 7.3.652) +Problem: SEGV in Python code. +Solution: Initialize len to zero. Use the right function depending on + version. (Maxim Philippov) +Files: src/if_py_both.h, src/if_python.c, src/if_python3.c + +Patch 7.3.662 +Problem: Can't build Ruby interface with Ruby 1.9.3. +Solution: Add missing functions. (V. Ondruch) +Files: src/if_ruby.c + +Patch 7.3.663 +Problem: End of color scheme name not clear in E185. (Aaron Lewis) +Solution: Put the name in single quotes. +Files: src/ex_docmd.c + +Patch 7.3.664 +Problem: Buffer overflow in unescaping text. (Raymond Ko) +Solution: Limit check for multi-byte character to 4 bytes. +Files: src/mbyte.c + +Patch 7.3.665 +Problem: MSVC 11 is not supported. (Raymond Ko) +Solution: Recognize MSVC 11. (Gary Willoughby) +Files: src/Make_mvc.mak + +Patch 7.3.666 +Problem: With MSVC 11 Win32.mak is not found. +Solution: Add the SDK_INCLUDE_DIR variable. (Raymond Ko) +Files: src/Make_mvc.mak + +Patch 7.3.667 +Problem: Unused variables in Perl interface. +Solution: Adjust #ifdefs. +Files: src/if_perl.xs + +Patch 7.3.668 +Problem: Building with Perl loaded dynamically still uses static library. +Solution: Adjust use of PL_thr_key. (Ken Takata) +Files: src/if_perl.xs + +Patch 7.3.669 +Problem: When building with Cygwin loading Python dynamically fails. +Solution: Use DLLLIBRARY instead of INSTSONAME. (Ken Takata) +Files: src/configure.in, src/auto/configure + +Patch 7.3.670 +Problem: Python: memory leaks when there are exceptions. +Solution: Add DICTKEY_UNREF in the right places. (ZyX) +Files: src/if_py_both.h + +Patch 7.3.671 +Problem: More Python code can be shared between Python 2 and 3. +Solution: Move code to if_py_both.h. (ZyX) +Files: src/if_py_both.h, src/if_python.c, src/if_python3.c + +Patch 7.3.672 +Problem: Not possible to lock/unlock lists in Python interface. +Solution: Add .locked and .scope attributes. (ZyX) +Files: runtime/doc/if_pyth.txt, src/if_py_both.h, src/if_python.c, + src/if_python3.c, src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.673 +Problem: Using "gN" while 'selection' is "exclusive" misses one character. + (Ben Fritz) +Solution: Check the direction when compensating for exclusive selection. + (Christian Brabandt) +Files: src/search.c + +Patch 7.3.674 +Problem: Can't compile with Lua/dyn on Cygwin. +Solution: Adjust configure to use the right library name. (Ken Takata) +Files: src/configure.in, src/auto/configure + +Patch 7.3.675 +Problem: Using uninitialized memory with very long file name. +Solution: Put NUL after text when it is truncated. (ZyX) +Files: src/buffer.c + +Patch 7.3.676 +Problem: Ruby compilation on Windows 32 bit doesn't work. +Solution: Only use some functions for 64 bit. (Ken Takata) +Files: src/if_ruby.c + +Patch 7.3.677 +Problem: buf_spname() is used inconsistently. +Solution: Make the return type a char_u pointer. Check the size of the + returned string. +Files: src/buffer.c, src/proto/buffer.pro, src/ex_cmds2.c, + src/ex_docmd.c, src/memline.c, src/screen.c + +Patch 7.3.678 +Problem: Ruby .so name may not be correct. +Solution: Use the LIBRUBY_SO entry from the config. (Vit Ondruch) +Files: src/configure.in, src/auto/configure + +Patch 7.3.679 +Problem: Ruby detection uses Config, newer Ruby versions use RbConfig. +Solution: Detect the need to use RbConfig. (Vit Ondruch) +Files: src/configure.in, src/auto/configure + +Patch 7.3.680 +Problem: Some files missing in the list of distributed files. +Solution: Add lines for new files. +Files: Filelist + +Patch 7.3.681 (after 7.3.680) +Problem: List of distributed files picks up backup files. +Solution: Make tutor patterns more specific. +Files: Filelist + +Patch 7.3.682 (after 7.3.677) +Problem: Compiler complains about incompatible types. +Solution: Remove type casts. (hint by Danek Duvall) +Files: src/edit.c + +Patch 7.3.683 +Problem: ":python" may crash when vimbindeval() returns None. +Solution: Check for v_string to be NULL. (Yukihiro Nakadaira) +Files: src/if_py_both.h + +Patch 7.3.684 +Problem: "make test" does not delete lua.vim. +Solution: Add lua.vim to the clean target. (Simon Ruderich) +Files: src/testdir/Makefile, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Make_vms.mms + +Patch 7.3.685 +Problem: No test for what patch 7.3.673 fixes. +Solution: Add a test. (Christian Brabandt) +Files: src/testdir/test53.in, src/testdir/test53.ok + +Patch 7.3.686 +Problem: Using CTRL-\ e mappings is useful also when entering an + expression, but it doesn't work. (Marcin Szamotulski) +Solution: Allow using CTRL-\ e when entering an expression if it was not + typed. +Files: src/ex_getln.c + +Patch 7.3.687 +Problem: Test 16 fails when $DISPLAY is not set. +Solution: Skip the test when $DISPLAY is not set. +Files: src/testdir/test16.in + +Patch 7.3.688 +Problem: Python 3.3 is not supported. +Solution: Add Python 3.3 support (Ken Takata) +Files: src/if_python3.c + +Patch 7.3.689 +Problem: MzScheme and Lua may use a NULL string. +Solution: Use an empty string instead of NULL. (Yukihiro Nakadaira) +Files: src/if_lua.c, src/if_mzsch.c + +Patch 7.3.690 +Problem: When the current directory name is exactly the maximum path length + Vim may crash. +Solution: Only add "/" when there is room. (Danek Duvall) +Files: src/os_unix.c + +Patch 7.3.691 +Problem: State specific to the Python thread is discarded. +Solution: Keep state between threads. (Paul) +Files: src/if_python.c + +Patch 7.3.692 +Problem: Can't build GTK version with GTK 2.0. +Solution: Put GtkFileFilter declaration in the right place. (Yegappan + Lakshmanan) +Files: src/gui_gtk.c + +Patch 7.3.693 +Problem: Can't make 'softtabstop' follow 'shiftwidth'. +Solution: When 'softtabstop' is negative use the value of 'shiftwidth'. + (so8res) +Files: src/edit.c, src/option.c, src/proto/option.pro + +Patch 7.3.694 +Problem: Now that 'shiftwidth' may use the value of 'tabstop' it is not so + easy to use in indent files. +Solution: Add the shiftwidth() function. (so8res) +Files: runtime/doc/eval.txt, src/eval.c + +Patch 7.3.695 +Problem: Balloon cannot show multi-byte text. +Solution: Properly deal with multi-byte characters. (Dominique Pelle) +Files: src/gui_beval.c, src/ui.c + +Patch 7.3.696 +Problem: Message about added spell language can be wrong. +Solution: Give correct message. Add g:menutrans_set_lang_to to allow for + translation. (Jiri Sedlak) +Files: runtime/menu.vim + +Patch 7.3.697 +Problem: Leaking resources when setting GUI font. +Solution: Free the font. (Ken Takata) +Files: src/syntax.c + +Patch 7.3.698 +Problem: Python 3 does not preserve state between commands. +Solution: Preserve the state. (Paul Ollis) +Files: src/if_python.c, src/if_python3.c + +Patch 7.3.699 +Problem: When 'ttymouse' is set to "sgr" manually, it is overruled by + automatic detection. +Solution: Do not use automatic detection when 'ttymouse' was set manually. + (Hayaki Saito) +Files: src/term.c + +Patch 7.3.700 +Problem: Cannot detect URXVT and SGR mouse support. +Solution: add +mouse_urxvt and +mouse_sgr. (Hayaki Saito) +Files: src/feature.h, src/eval.c + +Patch 7.3.701 +Problem: MS-Windows: Crash with stack overflow when setting 'encoding'. +Solution: Handle that loading the iconv library may be called recursively. + (Jiri Sedlak) +Files: src/os_win32.c + +Patch 7.3.702 +Problem: Nmake from VS6 service pack 6 is not recognized. +Solution: Detect the version number. (Jiri Sedlak) +Files: src/Make_mvc.mak + +Patch 7.3.703 +Problem: When 'undofile' is reset the hash is computed unnecessarily. +Solution: Only compute the hash when the option was set. (Christian Brabandt) +Files: src/option.c + +Patch 7.3.704 +Problem: Repeating "cgn" does not always work correctly. +Solution: Also fetch the operator character. (Christian Brabandt) +Files: src/normal.c + +Patch 7.3.705 +Problem: Mouse features are not sorted properly. (Tony Mechelynck) +Solution: Put the mouse features in alphabetical order. +Files: src/version.c + +Patch 7.3.706 (after 7.3.697) +Problem: Can't build Motif version. +Solution: Fix wrongly named variable. (Ike Devolder) +Files: src/syntax.c + +Patch 7.3.707 (after 7.3.701) +Problem: Problems loading a library for a file name with non-latin + characters. +Solution: Use wide system functions when possible. (Ken Takata) +Files: src/os_win32.c, src/os_win32.h + +Patch 7.3.708 +Problem: Filler lines above the first line may be hidden when opening Vim. +Solution: Change how topfill is computed. (Christian Brabandt) +Files: src/diff.c, src/testdir/test47.in, src/testdir/test47.ok + +Patch 7.3.709 +Problem: Compiler warning for unused argument. +Solution: Add UNUSED. +Files: src/eval.c + +Patch 7.3.710 (after 7.3.704) +Problem: Patch 7.3.704 breaks "fn". +Solution: Add check for ca.cmdchar. (Christian Brabandt) +Files: src/normal.c + +Patch 7.3.711 (after 7.3.688) +Problem: vim.current.buffer is not available. (lilydjwg) +Solution: Use py3_PyUnicode_AsUTF8 instead of py3_PyUnicode_AsUTF8String. + (Ken Takata) +Files: src/if_python3.c + +Patch 7.3.712 +Problem: Nmake from VS2010 SP1 is not recognized. +Solution: Add the version number. (Ken Takata) +Files: src/Make_mvc.mak + +Patch 7.3.713 +Problem: printf() can only align to bytes, not characters. +Solution: Add the "S" item. (Christian Brabandt) +Files: runtime/doc/eval.txt, src/message.c + +Patch 7.3.714 +Problem: Inconsistency: :set can be used in the sandbox, but :setlocal and + :setglobal cannot. (Michael Henry) +Solution: Fix the flags for :setlocal and :setglobal. (Christian Brabandt) +Files: src/ex_cmds.h + +Patch 7.3.715 +Problem: Crash when calling setloclist() in BufUnload autocmd. (Marcin + Szamotulski) +Solution: Set w_llist to NULL when it was freed. Also add a test. + (Christian Brabandt) +Files: src/quickfix.c, src/testdir/test49.ok, src/testdir/test49.vim + +Patch 7.3.716 +Problem: Error on exit when using Python 3. +Solution: Remove PythonIO_Fini(). (Roland Puntaier) +Files: src/if_python3.c + +Patch 7.3.717 +Problem: When changing the font size, only MS-Windows limits the window + size. +Solution: Also limit the window size on other systems. (Roland Puntaier) +Files: src/gui.c + +Patch 7.3.718 +Problem: When re-using the current buffer the buffer-local options stay. +Solution: Re-initialize the buffer-local options. (Christian Brabandt) +Files: src/buffer.c + +Patch 7.3.719 +Problem: Cannot run new version of cproto, it fails on missing include + files. +Solution: Add lots of #ifndef PROTO +Files: src/os_amiga.c, src/os_amiga.h, src/gui_w16.c, src/gui_w48.c, + src/gui_w32.c, src/vimio.h, src/os_msdos.c, src/os_msdos.h, + src/os_win16.h, src/os_win16.c, src/os_win32.h, src/os_win32.c, + src/os_mswin.c, src/gui_photon.c, src/os_unix.h, src/os_beos.c, + src/os_beos.h + +Patch 7.3.720 +Problem: Proto files are outdated. +Solution: Update the newly generated proto files. +Files: src/proto/digraph.pro, src/proto/fold.pro, src/proto/misc1.pro, + src/proto/move.pro, src/proto/screen.pro, src/proto/search.pro, + src/proto/os_win32.pro, src/proto/os_mswin.pro, + src/proto/os_beos.pro + +Patch 7.3.721 +Problem: Ruby interface defines local functions globally. +Solution: Make the functions static. +Files: src/if_ruby.c + +Patch 7.3.722 +Problem: Perl flags may contain "-g", which breaks "make proto". +Solution: Filter out the "-g" flag for cproto. (Ken Takata) +Files: src/Makefile + +Patch 7.3.723 +Problem: Various tiny problems. +Solution: Various tiny fixes. +Files: src/gui_mac.c, src/xpm_w32.c, src/netbeans.c, src/sha256.c, + src/if_sniff.c, README.txt + +Patch 7.3.724 +Problem: Building with Ruby and Tcl on MS-Windows 64 bit does not work. +Solution: Remove Ruby and Tcl from the big MS-Windows build. +Files: src/bigvim64.bat + +Patch 7.3.725 +Problem: :aboveleft and :belowright have no effect on :copen. +Solution: Check for cmdmod.split. (Christian Brabandt) +Files: src/quickfix.c + +Patch 7.3.726 +Problem: Typos and duplicate info in README. +Solution: Fix the text. +Files: README.txt + +Patch 7.3.727 +Problem: Can't always find Win32.mak when building GvimExt. +Solution: Use same mechanism as in Make_mvc.mak. (Cade Foster) +Files: src/GvimExt/Makefile + +Patch 7.3.728 +Problem: Cannot compile with MzScheme interface on Ubuntu 12.10. +Solution: Find the collects directory under /usr/share. +Files: src/configure.in, src/auto/configure + +Patch 7.3.729 +Problem: Building with Ruby fails on some systems. +Solution: Remove "static" and add #ifndef PROTO. (Ken Takata) +Files: src/if_ruby.c + +Patch 7.3.730 +Problem: Crash in PHP file when using syntastic. (Ike Devolder) +Solution: Avoid using NULL pointer. (Christian Brabandt) +Files: src/quickfix.c + +Patch 7.3.731 +Problem: Py3Init_vim() is exported unnecessarily. +Solution: Make it static. (Ken Takata) +Files: src/if_python3.c + +Patch 7.3.732 +Problem: Compiler warnings for function arguments. +Solution: Use inteptr_t instead of long. +Files: src/if_mzsch.c, src/main.c + +Patch 7.3.733 +Problem: Tests fail when including MzScheme. +Solution: Change #ifdefs for vim_main2(). +Files: src/main.c + +Patch 7.3.734 +Problem: Cannot put help files in a sub-directory. +Solution: Make :helptags work for sub-directories. (Charles Campbell) +Files: src/ex_cmds.c + +Patch 7.3.735 +Problem: Cannot build Ruby 1.9 with MingW or Cygwin. +Solution: Add another include directory. (Ken Takata) +Files: src/Make_cyg.mak, src/Make_ming.mak + +Patch 7.3.736 +Problem: File name completion in input() escapes white space. (Frederic + Hardy) +Solution: Do not escape white space. (Christian Brabandt) +Files: src/ex_getln.c + +Patch 7.3.737 +Problem: When using do_cmdline() recursively did_endif is not reset, + causing messages to be overwritten. +Solution: Reset did_endif. (Christian Brabandt) +Files: src/ex_docmd.c + +Patch 7.3.738 (after 7.3.730) +Problem: Unused function argument. +Solution: Remove it. (Christian Brabandt) +Files: src/quickfix.c + +Patch 7.3.739 +Problem: Computing number of lines may have an integer overflow. +Solution: Check for MAXCOL explicitly. (Dominique Pelle) +Files: src/move.c + +Patch 7.3.740 +Problem: IOC tool complains about undefined behavior for int. +Solution: Change to unsigned int. (Dominique Pelle) +Files: src/hashtab.c, src/misc2.c + +Patch 7.3.741 (after 7.3.737) +Problem: Tiny build fails. +Solution: Move #ifdef. (Ike Devolder) +Files: src/ex_docmd.c + +Patch 7.3.742 +Problem: Leaking memory when :vimgrep restores the directory. +Solution: Free the allocated memory. (Christian Brabandt) +Files: src/quickfix.c + +Patch 7.3.743 (after 7.3.741) +Problem: Tiny build still fails. +Solution: Add #else in the right place. +Files: src/ex_docmd.c + +Patch 7.3.744 +Problem: 64 bit compiler warning. +Solution: Add type cast. (Mike Williams) +Files: src/ex_cmds.c + +Patch 7.3.745 +Problem: Automatically setting 'ttymouse' doesn't work. +Solution: Reset the "option was set" flag when using the default. +Files: src/option.c, src/proto/option.pro, src/term.c + +Patch 7.3.746 +Problem: Memory leaks when using location lists. +Solution: Set qf_title to something. (Christian Brabandt) +Files: src/eval.c, src/quickfix.c + +Patch 7.3.747 +Problem: When characters are concealed text aligned with tabs are no longer + aligned, e.g. at ":help :index". +Solution: Compensate space for tabs for concealed characters. (Dominique + Pelle) +Files: src/screen.c + +Patch 7.3.748 +Problem: Cannot properly test conceal mode. +Solution: Add the screencol() and screenrow() functions. Use them in + test88. (Simon Ruderich) +Files: runtime/doc/eval.txt, src/eval.c, src/proto/screen.pro, + src/screen.c, src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mms + src/testdir/Makefile, src/testdir/test88.in, + src/testdir/test88.ok, + +Patch 7.3.749 +Problem: Python interface doesn't build without the multi-byte feature. +Solution: Add #ifdef. (Ken Takata) +Files: src/if_py_both.h + +Patch 7.3.750 +Problem: The justify macro does not always work correctly. +Solution: Fix off-by-one error (James McCoy) +Files: runtime/macros/justify.vim + +Patch 7.3.751 +Problem: Test 61 is flaky, it fails once in a while. +Solution: When it fails retry once. +Files: src/testdir/Makefile + +Patch 7.3.752 +Problem: Test 49 script file doesn't fold properly. +Solution: Add a colon. +Files: src/testdir/test49.vim + +Patch 7.3.753 +Problem: When there is a QuitPre autocommand using ":q" twice does not work + for exiting when there are more files to edit. +Solution: Do not decrement quitmore in an autocommand. (Techlive Zheng) +Files: src/ex_docmd.c, src/fileio.c, src/proto/fileio.pro + +Patch 7.3.754 +Problem: Latest nmake is not recognized. +Solution: Add nmake version 11.00.51106.1. (Raymond Ko) +Files: src/Make_mvc.mak + +Patch 7.3.755 +Problem: Autoconf doesn't find Python 3 if it's called "python". +Solution: Search for "python2" and "python3" first, then "python". +Files: src/configure.in, src/auto/configure + +Patch 7.3.756 +Problem: A location list can get a wrong count in :lvimgrep. +Solution: Check if the list was changed by autocommands. (mostly by + Christian Brabandt) +Files: src/quickfix.c + +Patch 7.3.757 +Problem: Issue 96: May access freed memory when a put command triggers + autocommands. (Dominique Pelle) +Solution: Call u_save() before getting y_array. +Files: src/ops.c + +Patch 7.3.758 +Problem: Matchit plugin does not handle space in #ifdef. +Solution: Change matching pattern to allow spaces. (Mike Morearty) +Files: runtime/macros/matchit.vim + +Patch 7.3.759 +Problem: MS-Windows: Updating the tabline is slow when there are many tabs. +Solution: Disable redrawing while performing the update. (Arseny Kapoulkine) +Files: src/gui_w48.c + +Patch 7.3.760 +Problem: dv_ deletes the white space before the line. +Solution: Move the cursor to the first non-white. (Christian Brabandt) +Files: src/normal.c, src/testdir/test19.in, src/testdir/test19.ok + +Patch 7.3.761 +Problem: In Visual mode a "-p does not work. (Marcin Szamotulski) +Solution: Avoid writing to "- before putting it. (Christian Brabandt) +Files: src/normal.c, src/testdir/test48.in, src/testdir/test48.ok + +Patch 7.3.762 (after 7.3.759) +Problem: On some systems the tabline is not redrawn. +Solution: Call RedrawWindow(). (Charles Peacech) +Files: src/gui_w48.c + +Patch 7.3.763 +Problem: Jumping to a mark does not open a fold if it is in the same line. + (Wiktor Ruben) +Solution: Also compare the column after the jump. (Christian Brabandt) +Files: src/normal.c + +Patch 7.3.764 +Problem: Not all message translation files are installed. +Solution: Also install the converted files. +Files: src/po/Makefile + +Patch 7.3.765 +Problem: Segfault when doing "cclose" on BufUnload in a python function. + (Sean Reifschneider) +Solution: Skip window with NULL buffer. (Christian Brabandt) +Files: src/main.c, src/window.c + +Patch 7.3.766 +Problem: ":help cpo-*" jumps to the wrong place. +Solution: Make it equivalent to ":help cpo-star". +Files: src/ex_cmds.c + +Patch 7.3.767 +Problem: (Win32) The _errno used for iconv may be the wrong one. +Solution: Use the _errno from iconv.dll. (Ken Takata) +Files: src/mbyte.c + +Patch 7.3.768 +Problem: settabvar() and setwinvar() may move the cursor. +Solution: Save and restore the cursor position when appropriate. (idea by + Yasuhiro Matsumoto) +Files: src/edit.c + +Patch 7.3.769 +Problem: 'matchpairs' does not work with multi-byte characters. +Solution: Make it work. (Christian Brabandt) +Files: src/misc1.c, src/option.c, src/proto/option.pro, src/search.c, + src/testdir/test69.in, src/testdir/test69.ok + +Patch 7.3.770 +Problem: Vim.h indentation is inconsistent. +Solution: Adjust the indentation. (Elias Diem) +Files: src/vim.h + +Patch 7.3.771 (after 7.3.769) +Problem: Uninitialized variable. (Yasuhiro Matsumoto) +Solution: Set x2 to -1. +Files: src/option.c + +Patch 7.3.772 +Problem: Cursor is at the wrong location and below the end of the file + after doing substitutions with confirm flag: %s/x/y/c + (Dominique Pelle) +Solution: Update the cursor position. (Christian Brabandt & Dominique) +Files: src/ex_cmds.c + +Patch 7.3.773 (after 7.3.767) +Problem: Crash when OriginalFirstThunk is zero. +Solution: Skip items with OriginalFirstThunk not set. (Ken Takata) +Files: src/mbyte.c + +Patch 7.3.774 +Problem: Tiny GUI version misses console dialog feature. +Solution: Define FEAT_CON_DIALOG when appropriate. (Christian Brabandt) +Files: src/feature.h, src/gui.h + +Patch 7.3.775 +Problem: Cygwin and Mingw builds miss dependency on gui_w48.c. +Solution: Add a build rule. (Ken Takata) +Files: src/Make_cyg.mak, src/Make_ming.mak + +Patch 7.3.776 +Problem: ml_get error when searching, caused by curwin not matching curbuf. +Solution: Avoid changing curbuf. (Lech Lorens) +Files: src/charset.c, src/eval.c, src/mark.c, src/proto/charset.pro, + src/proto/mark.pro, src/regexp.c, src/syntax.c, + +Patch 7.3.777 +Problem: When building with Gnome locale gets reset. +Solution: Set locale after gnome_program_init(). (Christian Brabandt) +Files: src/gui_gtk_x11.c + +Patch 7.3.778 +Problem: Compiler error for adding up two pointers. (Titov Anatoly) +Solution: Add a type cast. (Ken Takata) +Files: src/mbyte.c + +Patch 7.3.779 +Problem: Backwards search lands in wrong place when started on a multibyte + character. +Solution: Do not set extra_col for a backwards search. (Sung Pae) +Files: src/search.c, src/testdir/test44.in, src/testdir/test44.ok + +Patch 7.3.780 +Problem: char2nr() and nr2char() always use 'encoding'. +Solution: Add argument to use utf-8 characters. (Yasuhiro Matsumoto) +Files: runtime/doc/eval.txt, src/eval.c + +Patch 7.3.781 +Problem: Drawing with 'guifontwide' can be slow. +Solution: Draw multiple characters at a time. (Taro Muraoka) +Files: src/gui.c + +Patch 7.3.782 +Problem: Windows: IME composition may use a wrong font. +Solution: Use 'guifontwide' for IME when it is set. (Taro Muraoka) +Files: runtime/doc/options.txt, src/gui.c, src/gui_w48.c, + src/proto/gui_w16.pro, src/proto/gui_w32.pro + +Patch 7.3.783 +Problem: Crash when mark is not set. (Dominique Pelle) +Solution: Check for NULL. +Files: src/normal.c + +Patch 7.3.784 (after 7.3.781) +Problem: Error when 'guifontwide' has a comma. +Solution: Use gui.wide_font. (Taro Muraoka) +Files: src/gui_w48.c + +Patch 7.3.785 (after 7.3.776) +Problem: Crash with specific use of search pattern. +Solution: Initialize reg_buf to curbuf. +Files: src/regexp.c + +Patch 7.3.786 +Problem: Python threads don't run in the background (issue 103). +Solution: Move the statements to manipulate thread state. +Files: src/if_python.c + +Patch 7.3.787 +Problem: With 'relativenumber' set it is not possible to see the absolute + line number. +Solution: For the cursor line show the absolute line number instead of a + zero. (Nazri Ramliy) +Files: src/screen.c + +Patch 7.3.788 +Problem: When only using patches build fails on missing nl.po. +Solution: Create an empty nl.po file. +Files: src/po/Makefile + +Patch 7.3.789 (after 7.3.776) +Problem: "\k" in regexp does not work in other window. +Solution: Use the right buffer. (Yukihiro Nakadaira) +Files: src/mbyte.c, src/proto/mbyte.pro, src/regexp.c + +Patch 7.3.790 +Problem: After reloading a buffer the modelines are not processed. +Solution: call do_modelines(). (Ken Takata) +Files: src/fileio.c + +Patch 7.3.791 +Problem: MzScheme interface doesn't work properly. +Solution: Make it work better. (Sergey Khorev) +Files: runtime/doc/if_mzsch.txt, src/configure.in, src/auto/configure, + src/eval.c, src/if_mzsch.c, src/if_mzsch.h, src/Make_ming.mak, + src/Make_mvc.mak, src/os_unix.c, src/proto/eval.pro, + src/testdir/test70.in, src/testdir/test70.ok + +Patch 7.3.792 +Problem: ":substitute" works differently without confirmation. +Solution: Do not change the text when asking for confirmation, only display + it. +Files: src/ex_cmds.c + +Patch 7.3.793 (after 7.3.792) +Problem: New interactive :substitute behavior is not tested. +Solution: Add tests. (Christian Brabandt) +Files: src/testdir/test80.in, src/testdir/test80.ok + +Patch 7.3.794 +Problem: Tiny build fails. (Tony Mechelynck) +Solution: Adjust #ifdefs. +Files: src/charset.c + +Patch 7.3.795 +Problem: MzScheme does not build with tiny features. +Solution: Add #ifdefs. Also add UNUSED to avoid warnings. And change + library ordering. +Files: src/if_mzsch.c, src/Makefile + +Patch 7.3.796 +Problem: "/[^\n]" does match at a line break. +Solution: Make it do the same as "/.". (Christian Brabandt) +Files: src/regexp.c, src/testdir/test79.in, src/testdir/test79.ok + +Patch 7.3.797 (after 7.3.792) +Problem: Compiler warning for size_t to int conversion. (Skeept) +Solution: Add type casts. +Files: src/ex_cmds.c + +Patch 7.3.798 (after 7.3.791) +Problem: MzScheme: circular list does not work correctly. +Solution: Separate Mac-specific code from generic code. (Sergey Khorev) +Files: src/if_mzsch.c, src/testdir/test70.in + +Patch 7.3.799 +Problem: The color column is not correct when entering a buffer. (Ben + Fritz) +Solution: Call check_colorcolumn() if 'textwidth' changed. (Christian + Brabandt) +Files: src/buffer.c + +Patch 7.3.800 +Problem: The " mark is not adjusted when inserting lines. (Roland Eggner) +Solution: Adjust the line number. (Christian Brabandt) +Files: src/mark.c + +Patch 7.3.801 +Problem: ":window set nu?" displays the cursor line. (Nazri Ramliy) +Solution: Do not update the cursor line when conceallevel is zero or the + screen has scrolled. (partly by Christian Brabandt) +Files: src/window.c + +Patch 7.3.802 +Problem: After setting 'isk' to a value ending in a comma appending to the + option fails. +Solution: Disallow a trailing comma for 'isk' and similar options. +Files: src/charset.c + +Patch 7.3.803 (after 7.3.792) +Problem: Substitute with confirmation and then "q" does not replace + anything. (John McGowan) +Solution: Do not break the loop, skip to the end. +Files: src/ex_cmds.c, src/testdir/test80.in, src/testdir/test80.ok + +Patch 7.3.804 (after 7.3.799) +Problem: Compiler warning for tiny build. (Tony Mechelynck) +Solution: Add #ifdefs around variable. +Files: src/buffer.c + +Patch 7.3.805 +Problem: Lua version 5.2 is not detected properly on Arch Linux. +Solution: Adjust autoconf. (lilydjwg) +Files: src/configure.in, src/auto/configure + +Patch 7.3.806 +Problem: Compiler warnings in Perl code when building with Visual studio + 2012. (skeept) +Solution: Add type casts. (Christian Brabandt, 2013 Jan 30) +Files: src/if_perl.xs + +Patch 7.3.807 +Problem: Popup menu does not work properly with the preview window, folds + and 'cursorcolumn'. +Solution: Redraw the popup menu after redrawing windows. (Christian + Brabandt) +Files: src/screen.c + +Patch 7.3.808 +Problem: Python threads still do not work properly. +Solution: Fix both Python 2 and 3. Add tests. (Ken Takata) +Files: src/if_python.c, src/if_python3.c, src/testdir/test86.in, + src/testdir/test86.ok, src/testdir/test87.in, + src/testdir/test87.ok + +Patch 7.3.809 +Problem: The dosinst.c program has a buffer overflow. (Thomas Gwae) +Solution: Ignore $VIMRUNTIME if it is too long. +Files: src/dosinst.c + +Patch 7.3.810 +Problem: 'relativenumber' is reset unexpectedly. (François Ingelrest) +Solution: After an option was reset also reset the global value. Add a test. + (Christian Brabandt) +Files: src/option.c, src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mms, + src/testdir/Makefile, src/testdir/test89.in, + src/testdir/test89.ok + +Patch 7.3.811 +Problem: Useless termresponse parsing for SGR mouse. +Solution: Skip the parsing. (Hayaki Saito) +Files: src/term.c + +Patch 7.3.812 +Problem: When 'indentexpr' moves the cursor "curswant" not restored. +Solution: Restore "curswant". (Sung Pae) +Files: src/misc1.c + +Patch 7.3.813 +Problem: The CompleteDone event is not triggered when there are no pattern + matches. (Jianjun Mao) +Solution: Trigger the event. (Christian Brabandt) +Files: src/edit.c + +Patch 7.3.814 +Problem: Can't input multibyte characters on Win32 console if 'encoding' is + different from current codepage. +Solution: Use convert_input_safe() instead of convert_input(). Make + string_convert_ext() return an error for incomplete input. (Ken + Takata) +Files: src/mbyte.c, src/os_win32.c + +Patch 7.3.815 +Problem: Building with Cygwin and Ruby doesn't work. +Solution: Copy some things from the MingW build file. (Ken Takata) +Files: src/Make_cyg.mak + +Patch 7.3.816 +Problem: Can't compute a hash. +Solution: Add the sha256() function. (Tyru, Hirohito Higashi) +Files: runtime/doc/eval.txt, src/eval.c, src/proto/sha256.pro, + src/sha256.c, src/testdir/test90.in, src/testdir/test90.ok, + src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Make_os2.mak, + src/testdir/Make_vms.mms, src/testdir/Makefile + +Patch 7.3.817 +Problem: Test 89 fails with tiny and small features. +Solution: Add sourcing small.vim. +Files: src/testdir/test89.in + +Patch 7.3.818 +Problem: When test 40 fails because of a bad build it may leave files + behind that cause it to fail later. +Solution: Let the file names start with "X". +Files: src/testdir/test40.in + +Patch 7.3.819 +Problem: Compiling without +eval and with Python isn't working. +Solution: Add the eval feature when building with Python. +Files: src/if_py_both.h, src/feature.h, src/eval.c, src/ex_docmd.c, + src/normal.c, src/ex_docmd.c, src/gui_gtk_x11.c + +Patch 7.3.820 +Problem: Build errors and warnings when building with small features and + Lua, Perl or Ruby. +Solution: Add #ifdefs and UNUSED. +Files: src/if_perl.xs, src/if_lua.c, src/if_ruby.c + +Patch 7.3.821 +Problem: Build with OLE and Cygwin is broken. (Steve Hall) +Solution: Select static or shared stdc library. (Ken Takata) +Files: src/Make_cyg.mak + +Patch 7.3.822 (after 7.3.799) +Problem: Crash when accessing freed buffer. +Solution: Get 'textwidth' in caller of enter_buffer(). (Christian Brabandt) +Files: src/buffer.c + +Patch 7.3.823 (after 7.3.821) +Problem: Building with Cygwin: '-lsupc++' is not needed. +Solution: Remove it. (Ken Takata) +Files: src/Make_cyg.mak + +Patch 7.3.824 +Problem: Can redefine builtin functions. (ZyX) +Solution: Disallow adding a function to g:. +Files: src/eval.c + +Patch 7.3.825 +Problem: With Python errors are not always clear. +Solution: Print the stack trace, unless :silent is used. (ZyX) +Files: src/if_python3.c, src/if_python.c + +Patch 7.3.826 +Problem: List of features in :version output is hard to read. +Solution: Make columns. (Nazri Ramliy) +Files: src/version.c + +Patch 7.3.827 (after 7.3.825) +Problem: Python tests fail. +Solution: Adjust the output for the stack trace. +Files: src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.ok + +Patch 7.3.828 +Problem: Mappings are not aware of wildmenu mode. +Solution: Add wildmenumode(). (Christian Brabandt) +Files: src/eval.c, runtime/doc/eval.txt + +Patch 7.3.829 +Problem: When compiled with the +rightleft feature 'showmatch' also shows a + match for the opening paren. When 'revins' is set the screen may + scroll. +Solution: Only check the opening paren when the +rightleft feature was + enabled. Do not show a match that is not visible. (partly by + Christian Brabandt) +Files: src/search.c + +Patch 7.3.830 +Problem: :mksession confuses bytes, columns and characters when positioning + the cursor. +Solution: Use w_virtcol with "|" instead of w_cursor.col with "l". +Files: src/ex_docmd.c + +Patch 7.3.831 +Problem: Clumsy to handle the situation that a variable does not exist. +Solution: Add default value to getbufvar() et al. (Shougo Matsushita, + Hirohito Higashi) +Files: runtime/doc/eval.txt, src/eval.c src/testdir/test91.in, + src/testdir/test91.ok, src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mms, + src/testdir/Makefile + +Patch 7.3.832 +Problem: Compiler warning. +Solution: Add type cast. (Mike Williams) +Files: src/version.c + +Patch 7.3.833 +Problem: In the terminal the scroll wheel always scrolls the active window. +Solution: Scroll the window under the mouse pointer, like in the GUI. + (Bradie Rao) +Files: src/edit.c, src/normal.c + +Patch 7.3.834 +Problem: Ruby 2.0 has a few API changes. +Solution: Add handling of Ruby 2.0. (Yasuhiro Matsumoto) +Files: src/if_ruby.c + +Patch 7.3.835 +Problem: "xxd -i" fails on an empty file. +Solution: Do output the closing } for an empty file. (partly by Lawrence + Woodman) +Files: src/xxd/xxd.c + +Patch 7.3.836 +Problem: Clipboard does not work on Win32 when compiled with Cygwin. +Solution: Move the Win32 clipboard code to a separate file and use it when + building with os_unix.c. (Frodak Baksik, Ken Takata) +Files: src/Make_bc5.mak, src/Make_cyg.mak, src/Make_ivc.mak, + src/Make_ming.mak, src/Make_mvc.mak, src/Make_w16.mak, + src/Makefile, src/config.h.in, src/configure.in, + src/auto/configure, src/feature.h, src/globals.h, src/mbyte.c, + src/os_mswin.c, src/os_unix.c, src/os_win32.c, src/proto.h, + src/proto/os_mswin.pro, src/proto/winclip.pro, src/term.c, + src/vim.h, src/winclip.c + +Patch 7.3.837 (after 7.3.826) +Problem: Empty lines in :version output when 'columns' is 320. +Solution: Simplify the logic of making columns. (Nazri Ramliy, Roland + Eggner) +Files: src/version.c + +Patch 7.3.838 (after 7.3.830) +Problem: Insufficient testing for mksession. +Solution: Add tests. (mostly by Roland Eggner) +Files: src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Make_os2.mak, + src/testdir/Make_vms.mms, src/testdir/Makefile, + src/testdir/test92.in, src/testdir/test92.ok, + src/testdir/test93.in, src/testdir/test93.ok, + src/ex_docmd.c + +Patch 7.3.839 +Problem: Some files missing in the list of distributed files. +Solution: Add lines for new files. +Files: Filelist + +Patch 7.3.840 +Problem: "\@<!" in regexp does not work correctly with multi-byte + characters, especially cp932. +Solution: Move column to start of multi-byte character. (Yasuhiro Matsumoto) +Files: src/regexp.c + +Patch 7.3.841 +Problem: When a "cond ? one : two" expression has a subscript it is not + parsed correctly. (Andy Wokula) +Solution: Handle a subscript also when the type is unknown. (Christian + Brabandt) +Files: src/eval.c + +Patch 7.3.842 +Problem: Compiler warning for signed/unsigned pointer. +Solution: Add type cast. (Christian Brabandt) +Files: src/eval.c + +Patch 7.3.843 (after 7.3.841) +Problem: Missing test file changes. +Solution: Change the tests. +Files: src/testdir/test49.vim, src/testdir/test49.ok + +Patch 7.3.844 +Problem: Enum is not indented correctly with "public" etc. +Solution: Skip "public", "private" and "protected". (Hong Xu) +Files: src/misc1.c + +Patch 7.3.845 (after 7.3.844) +Problem: Enum indenting is not tested. +Solution: Add tests. (Hong Xu) +Files: src/testdir/test3.in, src/testdir/test3.ok + +Patch 7.3.846 +Problem: Missing proto files. +Solution: Add the files. +Files: Filelist, src/proto/os_beos.pro + +Patch 7.3.847 +Problem: Test 55 fails when messages are translated. +Solution: Set language to C. (Ken Takata) +Files: src/testdir/test55.in + +Patch 7.3.848 +Problem: Can't build with Ruby 2.0 when using MinGW x64 or MSVC10. +Solution: Fix it. Also detect RUBY_PLATFORM and RUBY_INSTALL_NAME for x64. + (Ken Takata) +Files: src/Make_cyg.mak, src/Make_ming.mak, src/if_ruby.c + +Patch 7.3.849 +Problem: ":g//" gives "Pattern not found error" with E486. Should not use + the error number, it's not a regular error message. +Solution: Use a normal message. (David Bürgin) +Files: src/ex_cmds.c + +Patch 7.3.850 +Problem: ":vimgrep //" matches everywhere. +Solution: Make it use the previous search pattern. (David Bürgin) +Files: runtime/doc/quickfix.txt, src/quickfix.c + +Patch 7.3.851 +Problem: Using an empty pattern with :sort silently continues when there is + no previous search pattern. +Solution: Give an error message. (David Bürgin) +Files: src/ex_cmds.c + +Patch 7.3.852 +Problem: system() breaks clipboard text. (Yukihiro Nakadaira) +Solution: Use Xutf8TextPropertyToTextList(). (Christian Brabandt) + Also do not put the text in the clip buffer if conversion fails. +Files: src/ui.c, src/ops.c + +Patch 7.3.853 +Problem: Using "ra" in multiple lines on multi-byte characters leaves a few + characters not replaced. +Solution: Adjust the end column only in the last line. (Yasuhiro Matsumoto) +Files: src/testdir/test69.in, src/testdir/test69.ok, src/ops.c + +Patch 7.3.854 +Problem: After using backspace in insert mode completion, CTRL-N and CTRL-P + do not highlight the right entry. (Olivier Teuliere) +Solution: Set the current item to the shown item after using backspace. +Files: src/edit.c + +Patch 7.3.855 +Problem: Compiler warnings. +Solution: Add type casts. (Mike Williams) +Files: src/misc1.c + +Patch 7.3.856 +Problem: When calling system() multi-byte clipboard contents is garbled. +Solution: Save and restore the clipboard contents. (Yukihiro Nakadaira) +Files: src/gui_gtk_x11.c, src/proto/gui_gtk_x11.pro, src/ops.c, + src/proto/ops.pro, src/os_unix.c, src/proto/ui.pro, src/ui.c + +Patch 7.3.857 +Problem: The QuitPre autocommand event does not trigger for :qa and :wq. +Solution: Trigger the event. (Tatsuro Fujii) +Files: src/ex_docmd.c + +Patch 7.3.858 +Problem: "gv" selects the wrong area after some operators. +Solution: Save and restore the type of selection. (Christian Brabandt) +Files: src/testdir/test66.in, src/testdir/test66.ok, src/normal.c + +Patch 7.3.859 +Problem: 'ambiwidth' must be set by the user. +Solution: Detects East Asian ambiguous width (UAX #11) state of the terminal + at the start-up time and 'ambiwidth' accordingly. (Hayaki Saito) +Files: src/main.c, src/option.c, src/term.c, src/term.h, + src/proto/term.pro + +Patch 7.3.860 +Problem: When using --remote-expr try/catch does not work. (Andrey Radev) +Solution: Set emsg_silent instead of emsg_skip. +Files: src/main.c + +Patch 7.3.861 +Problem: ":setlocal number" clears global value of 'relativenumber'. +Solution: Do it properly. (Markus Heidelberg) +Files: src/testdir/test89.in, src/testdir/test89.ok, src/option.c + +Patch 7.3.862 +Problem: Dragging the status line can be slow. +Solution: Look ahead and drop the drag event if there is a next one. +Files: src/eval.c, src/misc1.c, src/proto/misc1.pro, src/normal.c + +Patch 7.3.863 (after 7.3.859) +Problem: Problem with 'ambiwidth' detection for ANSI terminal. +Solution: Work around not recognizing a term response. (Hayaki Saito) +Files: src/term.c + +Patch 7.3.864 (after 7.3.862) +Problem: Can't build without the mouse feature. +Solution: Add an #ifdef. (Ike Devolder) +Files: src/misc1.c + +Patch 7.3.865 (after 7.3.862) +Problem: Mouse position may be wrong. +Solution: Let vungetc() restore the mouse position. +Files: src/getchar.c + +Patch 7.3.866 +Problem: Not serving the X selection during system() isn't nice. +Solution: When using fork() do not loose the selection, keep serving it. + Add a loop similar to handling I/O. (Yukihiro Nakadaira) +Files: src/os_unix.c + +Patch 7.3.867 +Problem: Matchparen does not update match when using auto-indenting. + (Marc Aldorasi) +Solution: Add the TextChanged and TextChangedI autocommand events. +Files: runtime/plugin/matchparen.vim, src/main.c, src/edit.c, + src/globals.h, src/vim.h, src/fileio.c, src/proto/fileio.pro, + runtime/doc/autocmd.txt + +Patch 7.3.868 +Problem: When at the hit-return prompt and using "k" while no text has + scrolled off screen, then using "j", an empty line is displayed. +Solution: Only act on "k" when text scrolled off screen. Also accept + page-up and page-down. (cptstubing) +Files: src/message.c + +Patch 7.3.869 +Problem: bufwinnr() matches buffers in other tabs. +Solution: For bufwinnr() and ? only match buffers in the current tab. + (Alexey Radkov) +Files: src/buffer.c, src/diff.c, src/eval.c, src/ex_docmd.c, + src/if_perl.xs, src/proto/buffer.pro + +Patch 7.3.870 +Problem: Compiler warnings when using MingW 4.5.3. +Solution: Do not use MAKEINTRESOURCE. Adjust #if. (Ken Takata) +Files: src/gui_w32.c, src/gui_w48.c, src/os_mswin.c, src/os_win32.c, + src/os_win32.h + +Patch 7.3.871 +Problem: search('^$', 'c') does not use the empty match under the cursor. +Solution: Special handling of the 'c' flag. (Christian Brabandt) + Add tests. +Files: src/search.c, src/testdir/test14.in, src/testdir/test14.ok + +Patch 7.3.872 +Problem: On some systems case of file names is always ignored, on others + never. +Solution: Add the 'fileignorecase' option to control this at runtime. + Implies 'wildignorecase'. +Files: src/buffer.c, src/edit.c, src/ex_cmds2.c, src/ex_getln.c, + src/fileio.c, src/misc1.c, src/misc2.c, src/option.c, + src/option.h, src/vim.h, runtime/doc/options.txt + +Patch 7.3.873 +Problem: Cannot easily use :s to make title case. +Solution: Have "\L\u" result in title case. (James McCoy) +Files: src/regexp.c, src/testdir/test79.in, src/testdir/test79.ok, + src/testdir/test80.in, src/testdir/test80.ok + +Patch 7.3.874 +Problem: Comparing file names does not handle multi-byte characters + properly. +Solution: Implement multi-byte handling. +Files: src/misc1.c, src/misc2.c + +Patch 7.3.875 (after 7.3.866) +Problem: Build problem with some combination of features. +Solution: Use FEAT_XCLIPBOARD instead of FEAT_CLIPBOARD. +Files: src/os_unix.c + +Patch 7.3.876 +Problem: #if indents are off. +Solution: Insert a space where appropriate. (Taro Muraoka) +Files: src/gui.c + +Patch 7.3.877 (after 7.3.871) +Problem: Forward searching with search() is broken. +Solution: Fix it and add tests. (Sung Pae) +Files: src/search.c, src/testdir/test14.in, src/testdir/test14.ok + +Patch 7.3.878 +Problem: 'fileignorecase' is missing in options window and quickref. +Solution: Add the option. +Files: runtime/optwin.vim, runtime/doc/quickref.txt + +Patch 7.3.879 +Problem: When using an ex command in operator pending mode, using Esc to + abort the command still executes the operator. (David Bürgin) +Solution: Clear the operator when the ex command fails. (Christian Brabandt) +Files: src/normal.c + +Patch 7.3.880 +Problem: When writing viminfo, old history lines may replace lines written + more recently by another Vim instance. +Solution: Mark history entries that were read from viminfo and overwrite + them when merging with the current viminfo. +Files: src/ex_getln.c + +Patch 7.3.881 +Problem: Python list does not work correctly. +Solution: Fix it and add a test. (Yukihiro Nakadaira) +Files: src/testdir/test86.in, src/testdir/test86.ok, src/if_py_both.h + +Patch 7.3.882 +Problem: CursorHold may trigger after receiving the termresponse. +Solution: Set the did_cursorhold flag. (Hayaki Saito) +Files: src/term.c + +Patch 7.3.883 (after 7.3.880) +Problem: Can't build with some combination of features. +Solution: Adjust #ifdefs. +Files: src/ex_getln.c + +Patch 7.3.884 +Problem: Compiler warning for variable shadowing another. (John Little) +Solution: Rename the variable. (Christian Brabandt) +Files: src/term.c + +Patch 7.3.885 +Problem: Double free for list and dict in Lua. (Shougo Matsu) +Solution: Do not unref list and dict. (Yasuhiro Matsumoto) +Files: src/if_lua.c + +Patch 7.3.886 +Problem: Can't build with multi-byte on Solaris 10. +Solution: Add #ifdef X_HAVE_UTF8_STRING. (Laurent Blume) +Files: src/ui.c + +Patch 7.3.887 +Problem: No tests for Visual mode operators, what 7.3.879 fixes. +Solution: Add a new test file. (David Bürgin) +Files: src/testdir/test94.in, src/testdir/test94.ok, + src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Make_os2.mak, + src/testdir/Make_vms.mms, src/testdir/Makefile + +Patch 7.3.888 +Problem: Filename completion with 'fileignorecase' does not work for + multi-byte characters. +Solution: Make 'fileignorecase' work properly. (Hirohito Higashi) +Files: src/misc2.c + +Patch 7.3.889 +Problem: Can't build with Ruby 2.0 on a 64 bit system. +Solution: Define rb_fix2int and rb_num2int. (Kohei Suzuki) +Files: src/if_ruby.c + +Patch 7.3.890 +Problem: Test 79 fails on Windows. (Michael Soyka) +Solution: Add comment below line causing an error. +Files: src/testdir/test79.in + +Patch 7.3.891 +Problem: Merging viminfo history doesn't work well. +Solution: Don't stop when one type of history is empty. Don't merge history + when writing viminfo. +Files: src/ex_getln.c + +Patch 7.3.892 (after 7.3.891) +Problem: Still merging problems for viminfo history. +Solution: Do not merge lines when writing, don't write old viminfo lines. +Files: src/ex_getln.c, src/ex_cmds.c, src/proto/ex_getln.pro + +Patch 7.3.893 +Problem: Crash when using b:, w: or t: after closing the buffer, window or + tabpage. +Solution: Allocate the dictionary instead of having it part of the + buffer/window/tabpage struct. (Yukihiro Nakadaira) +Files: src/buffer.c, src/eval.c, src/fileio.c, src/structs.h, + src/window.c, src/proto/eval.pro + +Patch 7.3.894 +Problem: Using wrong RUBY_VER causing Ruby build to break. +Solution: Correct the RUBY_VER value. (Yongwei Wu) +Files: src/bigvim.bat + +Patch 7.3.895 +Problem: Valgrind error in test 91. (Issue 128) +Solution: Pass scope name to find_var_in_ht(). +Files: src/eval.c + +Patch 7.3.896 +Problem: Memory leaks in Lua interface. +Solution: Fix the leaks, add tests. (Yukihiro Nakadaira) +Files: src/testdir/test85.in, src/testdir/test85.ok, src/if_lua.c + +Patch 7.3.897 +Problem: Configure doesn't always find the shared library. +Solution: Change the configure script. (Ken Takata) +Files: src/configure.in, src/auto/configure + +Patch 7.3.898 +Problem: Memory leak reported by valgrind in test 91. +Solution: Only use default argument when needed. +Files: src/eval.c, src/testdir/test91.in, src/testdir/test91.ok + +Patch 7.3.899 +Problem: #if indents are off. +Solution: Fix the indents. +Files: src/os_unix.c + +Patch 7.3.900 +Problem: Not obvious that some mouse features are mutual-exclusive. +Solution: Add a comment. +Files: src/feature.h + +Patch 7.3.901 +Problem: Outdated comment, ugly condition. +Solution: Update a few comments, break line. +Files: src/getchar.c, src/misc1.c, src/undo.c + +Patch 7.3.902 +Problem: When deleting last buffer in other tab the tabline is not updated. +Solution: Set the redraw_tabline flag. (Yukihiro Nakadaira) +Files: src/window.c + +Patch 7.3.903 (after 7.3.892) +Problem: Crash on exit writing viminfo. (Ron Aaron) +Solution: Check for the history to be empty. +Files: src/ex_getln.c + +Patch 7.3.904 (after 7.3.893) +Problem: Using memory freed by the garbage collector. +Solution: Mark items in aucmd_win as used. +Files: src/eval.c + +Patch 7.3.905 (after 7.3.903) +Problem: Crash when writing viminfo. (Ron Aaron) +Solution: Prevent freed history info to be used. +Files: src/ex_getln.c + +Patch 7.3.906 +Problem: The "sleep .2" for running tests does not work on Solaris. +Solution: Fall back to using "sleep 1". (Laurent Blume) +Files: src/testdir/Makefile + +Patch 7.3.907 +Problem: Python uses IndexError when a dict key is not found. +Solution: Use KeyError instead. (ZyX) +Files: src/if_py_both.h, src/if_python3.c, src/if_python.c, + src/testdir/test86.ok, src/testdir/test87.ok + +Patch 7.3.908 +Problem: Possible crash when using a list in Python. +Solution: Return early if the list is NULL. (ZyX) +Files: src/if_py_both.h + +Patch 7.3.909 +Problem: Duplicate Python code. +Solution: Move more items to if_py_both.h. (ZyX) Also avoid compiler + warnings for missing initializers. +Files: src/if_py_both.h, src/if_python3.c, src/if_python.c + +Patch 7.3.910 +Problem: Python code in #ifdef branches with only minor differences. +Solution: Merge the #ifdef branches. (ZyX) +Files: src/if_py_both.h, src/if_python.c + +Patch 7.3.911 +Problem: Python: Access to Vim variables is not so easy. +Solution: Define vim.vars and vim.vvars. (ZyX) +Files: runtime/doc/if_pyth.txt, src/eval.c, src/globals.h, + src/if_py_both.h, src/if_python3.c, src/if_python.c, + src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.912 +Problem: Typing a ":" command at the hit-enter dialog does not work if the + "file changed" dialog happens next. +Solution: Check for changed files before giving the hit-enter dialog. +Files: src/message.c + +Patch 7.3.913 (after 7.3.905) +Problem: Still a crash when writing viminfo. +Solution: Add checks for NULL pointers. (Ron Aaron) +Files: src/ex_getln.c + +Patch 7.3.914 +Problem: ~/.viminfo is messed up when running tests. +Solution: Set the viminfo filename. +Files: src/testdir/test89.in, src/testdir/test94.in + +Patch 7.3.915 +Problem: When reading a file with encoding conversion fails at the end the + next encoding in 'fencs' is not used. +Solution: Retry with another encoding when possible. (Taro Muraoka) +Files: src/fileio.c + +Patch 7.3.916 +Problem: Using freed memory when pasting with the mouse (Issue 130). +Solution: Get the byte value early. (hint by Dominique Pelle) +Files: src/buffer.c + +Patch 7.3.917 +Problem: When a path ends in a backslash appending a comma has the wrong + effect. +Solution: Replace a trailing backslash with a slash. (Nazri Ramliy) +Files: src/misc1.c, src/testdir/test73.in, src/testdir/test73.ok + +Patch 7.3.918 +Problem: Repeating an Ex command after using a Visual motion does not work. +Solution: Check for an Ex command being used. (David Bürgin) +Files: src/normal.c + +Patch 7.3.919 (after 7.3.788) +Problem: An empty nl.po file does not work with an old msgfmt. +Solution: Put a single # in the file. (Laurent Blume) +Files: src/po/Makefile + +Patch 7.3.920 +Problem: Compiler warning for size_t to int. +Solution: Add a type cast. (Mike Williams) +Files: src/misc1.c + +Patch 7.3.921 (after 7.3.697) +Problem: Trying to create a fontset handle when 'guifontset' is not set. +Solution: Add curly braces around the code block. (Max Kirillov) +Files: src/syntax.c + +Patch 7.3.922 +Problem: No test for what 7.3.918 fixes. +Solution: Add a test. (David Bürgin) +Files: src/testdir/test94.in, src/testdir/test94.ok + +Patch 7.3.923 +Problem: Check for X11 header files fails on Solaris. +Solution: Only use -Werror for gcc. (Laurent Blume) +Files: src/configure.in, src/auto/configure + +Patch 7.3.924 +Problem: Python interface can't easily access options. +Solution: Add vim.options, vim.window.options and vim.buffer.options. (ZyX) +Files: runtime/doc/if_pyth.txt, src/eval.c, src/if_py_both.h, + src/if_python.c, src/if_python3.c, src/option.c, + src/proto/eval.pro, src/proto/option.pro, src/testdir/test86.in, + src/testdir/test86.ok, src/testdir/test87.in, + src/testdir/test87.ok, src/vim.h + +Patch 7.3.925 +Problem: Typos in source files. +Solution: Fix the typos. (Ken Takata) +Files: runtime/plugin/matchparen.vim, runtime/tools/vim_vs_net.cmd, + src/GvimExt/gvimext.cpp, src/INSTALLvms.txt, src/Make_cyg.mak, + src/Make_mvc.mak, src/Make_sas.mak, src/Make_vms.mms, + src/Make_w16.mak, src/Makefile, src/VisVim/OleAut.cpp, + src/VisVim/README_VisVim.txt, src/auto/configure, src/buffer.c, + src/configure.in, src/diff.c, src/dosinst.c, src/edit.c, + src/eval.c, src/ex_cmds2.c, src/ex_docmd.c, src/ex_eval.c, + src/farsi.c, src/feature.h, src/fileio.c, src/glbl_ime.cpp, + src/gui.c, src/gui_athena.c, src/gui_beval.c, src/gui_gtk_x11.c, + src/gui_mac.c, src/gui_motif.c, src/gui_photon.c, src/gui_w16.c, + src/gui_w32.c, src/gui_w48.c, src/gui_xmebw.c, src/gui_xmebwp.h, + src/hardcopy.c, src/if_cscope.c, src/if_mzsch.c, src/if_ole.cpp, + src/if_perl.xs, src/if_py_both.h, src/if_python.c, + src/if_python3.c, src/if_ruby.c, src/main.aap, src/mbyte.c, + src/memfile.c, src/memline.c, src/misc1.c, src/misc2.c, + src/nbdebug.c, src/normal.c, src/ops.c, src/os_amiga.c, + src/os_mac.h, src/os_msdos.c, src/os_mswin.c, src/os_win16.h, + src/os_win32.c, src/os_win32.h, src/quickfix.c, src/screen.c, + src/search.c, src/spell.c, src/structs.h, src/syntax.c, + src/window.c, vimtutor.com + + +Patch 7.3.926 +Problem: Autocommands are triggered by setwinvar() et al. Missing BufEnter + on :tabclose. Duplicate WinEnter on :tabclose. Wrong order of + events for :tablose and :tabnew. +Solution: Fix these autocommand events. (ZyX) +Files: runtime/doc/eval.txt, src/buffer.c, src/eval.c, src/ex_cmds2.c, + src/fileio.c, src/proto/window.pro, src/testdir/test62.in, + src/testdir/test62.ok, src/window.c + +Patch 7.3.927 +Problem: Missing combining characters when putting text in a register. +Solution: Include combining characters. (David Bürgin) +Files: src/getchar.c, src/testdir/test44.in, src/testdir/test44.ok + +Patch 7.3.928 (after 7.3.924) +Problem: Can't build with strict C compiler. +Solution: Move declaration to start of block. (Taro Muraoka) +Files: src/if_py_both.h + +Patch 7.3.929 (after 7.3.924) +Problem: Compiler warning for unused variable. Not freeing unused string. +Solution: Remove the variable. Clear the options. +Files: src/option.c + +Patch 7.3.930 +Problem: MSVC 2012 update is not recognized. +Solution: Update the version in the makefile. (Raymond Ko) +Files: src/Make_mvc.mak + +Patch 7.3.931 +Problem: No completion for :xmap and :smap. (Yukihiro Nakadaira) +Solution: Add the case statements. (Christian Brabandt) +Files: src/ex_docmd.c + +Patch 7.3.932 +Problem: Compiler warning for uninitialized variable. (Tony Mechelynck) +Solution: Initialize the variable. +Files: src/option.c + +Patch 7.3.933 +Problem: Ruby on Mac crashes due to GC failure. +Solution: Init the stack from main(). (Hiroshi Shirosaki) +Files: src/main.c, src/if_ruby.c, src/proto/if_ruby.pro + +Patch 7.3.934 +Problem: E381 and E380 make the user think nothing happened. +Solution: Display the message indicating what error list is now active. + (Christian Brabandt) +Files: src/quickfix.c + +Patch 7.3.935 (after 7.3.933) +Problem: Ruby: Init stack works differently on 64 bit systems. +Solution: Handle 64 bit systems and also static library. (Yukihiro + Nakadaira) +Files: src/if_ruby.c + +Patch 7.3.936 (after 7.3.935) +Problem: Ruby 1.8: Missing piece for static linking on 64 bit systems. +Solution: Define ruby_init_stack() (Hiroshi Shirosaki) + Also fix preprocessor indents. +Files: src/if_ruby.c + +Patch 7.3.937 +Problem: More can be shared between Python 2 and 3. +Solution: Move code to if_py_both.h. (ZyX) +Files: src/if_python.c, src/if_python3.c, src/if_py_both.h + +Patch 7.3.938 +Problem: Python: not easy to get to window number. +Solution: Add vim.window.number. (ZyX) +Files: runtime/doc/if_pyth.txt, src/if_py_both.h, src/proto/window.pro, + src/window.c + +Patch 7.3.939 +Problem: Using Py_BuildValue is inefficient sometimes. +Solution: Use PyLong_FromLong(). (ZyX) +Files: src/if_py_both.h + +Patch 7.3.940 +Problem: Python: Can't get position of window. +Solution: Add window.row and window.col. (ZyX) +Files: runtime/doc/if_pyth.txt, src/if_py_both.h + +Patch 7.3.941 +Problem: Stuff in if_py_both.h is ordered badly. +Solution: Reorder by type. (ZyX) +Files: src/if_py_both.h, src/if_python.c + +Patch 7.3.942 +Problem: Python: SEGV in Buffer functions. +Solution: Call CheckBuffer() at the right time. (ZyX) +Files: src/if_py_both.h, src/if_python.c, src/if_python3.c + +Patch 7.3.943 +Problem: Python: Negative indices were failing. +Solution: Fix negative indices. Add tests. (ZyX) +Files: src/if_py_both.h, src/if_python3.c, src/testdir/test86.in, + src/testdir/test86.ok, src/testdir/test87.in, + src/testdir/test87.ok + +Patch 7.3.944 +Problem: External program receives the termrespone. +Solution: Insert a delay and discard input. (Hayaki Saito) +Files: src/term.c + +Patch 7.3.945 +Problem: Python: List of buffers is not very useful. +Solution: Make vim.buffers a map. No iterator yet. (ZyX) +Files: runtime/doc/if_pyth.txt, src/if_py_both.h, src/if_python3.c, + src/if_python.c, src/testdir/test86.ok, src/testdir/test87.ok + +Patch 7.3.946 +Problem: Sometimes get stuck in waiting for cursor position report, + resulting in keys starting with <Esc>[ not working. +Solution: Only wait for more characters after <Esc>[ if followed by '?', '>' + or a digit. +Files: src/term.c + +Patch 7.3.947 +Problem: Python: No iterator for vim.list and vim.bufferlist. +Solution: Add the iterators. Also fix name of FunctionType. Add tests for + vim.buffers. (ZyX) +Files: runtime/doc/if_pyth.txt, src/eval.c, src/if_py_both.h, + src/if_python3.c, src/if_python.c, src/proto/eval.pro, + src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.948 +Problem: Cannot build with Python 2.2 +Solution: Make Python interface work with Python 2.2 + Make 2.2 the first supported version. (ZyX) +Files: src/if_py_both.h, src/if_python3.c, src/if_python.c, + src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.ok, src/configure.in, src/auto/configure + +Patch 7.3.949 +Problem: Python: no easy access to tabpages. +Solution: Add vim.tabpages and vim.current.tabpage. (ZyX) +Files: runtime/doc/if_pyth.txt, src/if_py_both.h, src/if_python3.c, + src/if_python.c, src/proto/if_python3.pro, + src/proto/if_python.pro, src/proto/window.pro, src/structs.h, + src/window.c + +Patch 7.3.950 +Problem: Python: Stack trace printer can't handle messages. +Solution: Make KeyErrors use PyErr_SetObject. (ZyX) +Files: src/if_py_both.h, src/if_python3.c, src/if_python.c + +Patch 7.3.951 +Problem: Python exceptions have problems. +Solution: Change some IndexErrors to TypeErrors. Make “line number out of + range†an IndexError. Make “unable to get option value†a + RuntimeError. Make all PyErr_SetString messages start with + lowercase letter and use _(). (ZyX) +Files: src/if_py_both.h, src/if_python3.c, src/if_python.c, + src/testdir/test86.ok, src/testdir/test87.ok + +Patch 7.3.952 +Problem: Python: It's not easy to change window/buffer/tabpage. +Solution: Add ability to assign to vim.current.{tabpage,buffer,window}. + (ZyX) +Files: runtime/doc/if_pyth.txt, src/if_py_both.h + +Patch 7.3.953 +Problem: Python: string exceptions are deprecated. +Solution: Make vim.error an Exception subclass. (ZyX) +Files: src/if_python.c, src/if_python3.c + +Patch 7.3.954 +Problem: No check if PyObject_IsTrue fails. +Solution: Add a check for -1 value. (ZyX) +Files: src/if_py_both.h + +Patch 7.3.955 +Problem: Python: Not enough tests. +Solution: Add tests for vim.{current,window*,tabpage*}. (ZyX) +Files: src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.956 +Problem: Python vim.bindeval() causes SIGABRT. +Solution: Make pygilstate a local variable. (Yukihiro Nakadaira) +Files: src/if_py_both.h, src/if_python.c, src/if_python3.c + +Patch 7.3.957 +Problem: Python does not have a "do" command like Perl or Lua. +Solution: Add the ":py3do" command. (Lilydjwg) +Files: runtime/doc/if_pyth.txt, src/ex_cmds.h, src/ex_docmd.c, + src/if_python3.c, src/proto/if_python3.pro + +Patch 7.3.958 +Problem: Python: Iteration destructor not set. +Solution: Put IterDestructor to use. (ZyX) +Files: src/if_py_both.c + +Patch 7.3.959 (after 7.3.957) +Problem: Missing error number. +Solution: Assign an error number. +Files: src/if_python3.c + +Patch 7.3.960 +Problem: Compiler warning for unused variable. +Solution: Put declaration in #ifdef. +Files: src/window.c + +Patch 7.3.961 +Problem: Tests 86 and 87 fail when using another language than English. +Solution: Set the language to C in the test. (Dominique Pelle) +Files: src/testdir/test86.in, src/testdir/test87.in, + src/testdir/test87.ok + +Patch 7.3.962 +Problem: Python tests are not portable. +Solution: Use shiftwidth instead of iminsert. (ZyX) +Files: src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.963 +Problem: Setting curbuf without curwin causes trouble. +Solution: Add switch_buffer() and restore_buffer(). Block autocommands to + avoid trouble. +Files: src/eval.c, src/proto/eval.pro, src/proto/window.pro, + src/if_py_both.h, src/window.c, src/testdir/test86.ok + +Patch 7.3.964 +Problem: Python: not so easy to access tab pages. +Solution: Add window.tabpage, make window.number work with non-current tab + pages. (ZyX) +Files: runtime/doc/if_pyth.txt, src/if_py_both.h, src/if_python3.c, + src/if_python.c, src/testdir/test86.ok, src/testdir/test87.ok + +Patch 7.3.965 +Problem: Python garbage collection not working properly. +Solution: Add support for garbage collection. (ZyX) +Files: src/if_py_both.h + +Patch 7.3.966 +Problem: There is ":py3do" but no ":pydo". +Solution: Add the ":pydo" command. (Lilydjwg) +Files: runtime/doc/if_pyth.txt, src/ex_cmds.h, src/ex_docmd.c, + src/if_py_both.h, src/if_python.c, src/if_python3.c, + src/proto/if_python.pro + +Patch 7.3.967 (after 7.3.965) +Problem: Build fails on Mac OSX. (Greg Novack) +Solution: Undefine clear(). +Files: src/if_py_both.h + +Patch 7.3.968 +Problem: Multi-byte support is only available when compiled with "big" + features. +Solution: Include multi-byte by default, with "normal" features. +Files: src/feature.h + +Patch 7.3.969 +Problem: Can't build with Python 3 and without Python 2. +Solution: Adjust #ifdef. (Xavier de Gaye) +Files: src/window.c + +Patch 7.3.970 +Problem: Syntax highlighting can be slow. +Solution: Include the NFA regexp engine. Add the 'regexpengine' option to + select which one is used. (various authors, including Ken Takata, + Andrei Aiordachioaie, Russ Cox, Xiaozhou Liua, Ian Young) +Files: src/Make_cyg.mak, src/Make_ming.mak, src/Make_mvc.mak, + src/Makefile, src/regexp.c, src/regexp.h, src/regexp_nfa.c, + src/structs.h, src/testdir/Makefile, src/testdir/test64.in, + src/testdir/test64.ok, Filelist, runtime/doc/pattern.txt, + runtime/doc/option.txt, src/option.c, src/option.h, + src/testdir/test95.in, src/testdir/test95.ok, + src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Make_os2.mak, + src/testdir/Make_vms.mms, src/testdir/Makefile + +Patch 7.3.971 +Problem: No support for VS2012 static code analysis. +Solution: Add the ANALYZE option. (Mike Williams) +Files: src/Make_mvc.mak + +Patch 7.3.972 +Problem: Cursor not restored after InsertEnter autocommand if it moved to + another line. +Solution: Also restore if the saved line number is still valid. Allow + setting v:char to skip restoring. +Files: src/edit.c, runtime/doc/autocmd.txt + +Patch 7.3.973 +Problem: Compiler warnings. Crash on startup. (Tony Mechelynck) +Solution: Change EMSG2 to EMSGN. Make array one character longer. +Files: src/regexp_nfa.c + +Patch 7.3.974 +Problem: Can't build with ruby 1.8.5. +Solution: Only use ruby_init_stack() when RUBY_INIT_STACK is defined. + (Yukihiro Nakadaira) +Files: src/if_ruby.c + +Patch 7.3.975 +Problem: Crash in regexp parsing. +Solution: Correctly compute the end of allocated memory. +Files: src/regexp_nfa.c + +Patch 7.3.976 +Problem: Can't build on HP-UX. +Solution: Remove modern initialization. (John Marriott) +Files: src/regexp_nfa.c + +Patch 7.3.977 +Problem: Compiler warnings on 64 bit Windows. +Solution: Add type casts. (Mike Williams) Also fix some white space and + uncomment what was commented-out for testing. +Files: src/regexp_nfa.c + +Patch 7.3.978 +Problem: Regexp debug logs don't have a good name. +Solution: Use clear names and make it possible to write logs for the old and + new engines separately. (Taro Muraoka) +Files: src/regexp.c, src/regexp_nfa.c + +Patch 7.3.979 +Problem: Complex NFA regexp doesn't work. +Solution: Set actual state stack end instead of using an arbitrary number. + (Yasuhiro Matsumoto) +Files: src/regexp_nfa.c + +Patch 7.3.980 +Problem: Regexp logs may contain garbage. Character classes don't work + correctly for multi-byte characters. +Solution: Check for end of post list. Only use "is" functions for + characters up to 255. (Ken Takata) +Files: src/regexp_nfa.c + +Patch 7.3.981 +Problem: In the old regexp engine \i, \I, \f and \F don't work on + multi-byte characters. +Solution: Dereference pointer properly. +Files: src/regexp.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.982 +Problem: In the new regexp engine \p does not work on multi-byte + characters. +Solution: Don't point to an integer but the characters. +Files: src/regexp_nfa.c, src/testdir/test95.in, src/testdir/test95.ok + +Patch 7.3.983 +Problem: Unnecessary temp variable. +Solution: Remove the variable. +Files: src/regexp_nfa.c + +Patch 7.3.984 +Problem: A Visual mapping that uses CTRL-G works differently when started + from Insert mode. (Ein Brown) +Solution: Reset old_mapped_len when handling typed text in Select mode. +Files: src/normal.c + +Patch 7.3.985 +Problem: GTK vim not started as gvim doesn't set WM_CLASS property to a + useful value. +Solution: Call g_set_prgname() on startup. (James McCoy) +Files: src/gui_gtk_x11.c + +Patch 7.3.986 +Problem: Test 95 doesn't pass when 'encoding' isn't utf-8. (Yasuhiro + Matsumoto) +Solution: Force 'encoding' to be utf-8. +Files: src/testdir/test95.in + +Patch 7.3.987 +Problem: No easy to run an individual test. Tests 64 fails when + 'encoding' is not utf-8. +Solution: Add individual test targets to the Makefile. Move some lines from + test 64 to 95. +Files: src/Makefile, src/testdir/test64.in, src/testdir/test64.ok, + src/testdir/test95.in, src/testdir/test95.ok + +Patch 7.3.988 +Problem: New regexp engine is slow. +Solution: Break out of the loop when the state list is empty. +Files: src/regexp_nfa.c + +Patch 7.3.989 +Problem: New regexp engine compares negative numbers to character. +Solution: Add missing case statements. +Files: src/regexp_nfa.c + +Patch 7.3.990 +Problem: Memory leak in new regexp engine. +Solution: Jump to end of function to free memory. (Dominique Pelle) +Files: src/regexp_nfa.c + +Patch 7.3.991 +Problem: More can be shared by Python 2 and 3. +Solution: Move more stuff to if_py_both. (ZyX) +Files: src/if_py_both.h, src/if_python3.c, src/if_python.c, + src/testdir/test87.ok + +Patch 7.3.992 +Problem: Python: Too many type casts. +Solution: Change argument types. (ZyX) +Files: src/if_py_both.h, src/if_python3.c, src/if_python.c + +Patch 7.3.993 +Problem: Python: Later patch does things slightly differently. +Solution: Adjusted argument type changes. (ZyX) +Files: src/if_py_both.h, src/if_python3.c, src/if_python.c + +Patch 7.3.994 +Problem: Python: using magic constants. +Solution: Use descriptive values for ml_flags. (ZyX) +Files: src/if_py_both.h, src/if_python3.c + +Patch 7.3.995 +Problem: Python: Module initialization is duplicated. +Solution: Move to shared file. (ZyX) +Files: src/if_py_both.h, src/if_python3.c, src/if_python.c + +Patch 7.3.996 +Problem: Python: Can't check types of what is returned by bindeval(). +Solution: Add vim.List, vim.Dictionary and vim.Function types. (ZyX) +Files: runtime/doc/if_pyth.txt, src/if_py_both.h, src/testdir/test86.in, + src/testdir/test86.ok, src/testdir/test87.in, + src/testdir/test87.ok + +Patch 7.3.997 +Problem: Vim and Python exceptions are different. +Solution: Make Vim exceptions be Python exceptions. (ZyX) +Files: src/if_py_both.h, src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.998 +Problem: Python: garbage collection issues. +Solution: Fix the GC issues: Use proper DESTRUCTOR_FINISH: avoids negative + refcounts, use PyObject_GC_* for objects with tp_traverse and + tp_clear, add RangeTraverse and RangeClear, use Py_XDECREF in some + places. (ZyX) +Files: src/if_py_both.h, src/if_python3.c, src/if_python.c + +Patch 7.3.999 +Problem: New regexp engine sets curbuf temporarily. +Solution: Use reg_buf instead, like the old engine. +Files: src/regexp_nfa.c + +Patch 7.3.1000 (whoa!) +Problem: Typo in char value causes out of bounds access. +Solution: Fix character value. (Klemens Baum) +Files: src/regexp.c + +Patch 7.3.1001 +Problem: Duplicate condition in if. +Solution: Remove one condition. +Files: src/regexp_nfa.c + +Patch 7.3.1002 +Problem: Valgrind errors for Python interface. +Solution: Fix memory leaks when running tests. (ZyX) +Files: src/if_py_both.h + +Patch 7.3.1003 +Problem: Python interface does not compile with Python 2.2 +Solution: Fix thread issues and True/False. (ZyX) +Files: src/if_py_both.h, src/if_python3.c, src/if_python.c, + src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.1004 +Problem: No error when option could not be set. +Solution: Report an error. (ZyX) +Files: src/if_py_both.h, src/option.c, src/proto/option.pro, + src/testdir/test86.ok, src/testdir/test87.ok + +Patch 7.3.1005 +Problem: Get stuck on regexp "\n*" and on "%s/^\n\+/\r". +Solution: Fix handling of matching a line break. (idea by Hirohito Higashi) +Files: src/regexp_nfa.c + +Patch 7.3.1006 +Problem: NFA engine not used for "\_[0-9]". +Solution: Enable this, fixed in patch 1005. +Files: src/regexp_nfa.c + +Patch 7.3.1007 +Problem: Can't build on Minix 3.2.1. +Solution: Add a condition to an #ifdef. (Gautam Tirumala) +Files: src/memfile.c + +Patch 7.3.1008 +Problem: Test 95 fails on MS-Windows. +Solution: Set 'nomore'. Change \i to \f. Change multi-byte character to + something that is not matching \i. (Ken Takata) +Files: src/testdir/test95.in, src/testdir/test95.ok + +Patch 7.3.1009 +Problem: Compiler warning for ambiguous else. +Solution: Add curly braces. +Files: src/if_py_both.h + +Patch 7.3.1010 +Problem: New regexp: adding \Z makes every character match. +Solution: Only apply ireg_icombine for composing characters. + Also add missing change from patch 1008. (Ken Takata) +Files: src/regexp_nfa.c, src/testdir/test95.in, src/testdir/test95.ok + +Patch 7.3.1011 +Problem: New regexp engine is inefficient with multi-byte characters. +Solution: Handle a character at a time instead of a byte at a time. Also + make \Z partly work. +Files: src/regexp_nfa.c, src/testdir/test95.in, src/testdir/test95.ok + +Patch 7.3.1012 +Problem: \Z does not work properly with the new regexp engine. +Solution: Make \Z work. Add tests. +Files: src/regexp_nfa.c, src/testdir/test95.in, src/testdir/test95.ok + +Patch 7.3.1013 +Problem: New regexp logging is a bit messy. +Solution: Consistently use #defines, add explanatory comment. (Taro Muraoka) +Files: src/regexp_nfa.c + +Patch 7.3.1014 +Problem: New regexp state dump is hard to read. +Solution: Make the state dump more pretty. (Taro Muraoka) +Files: src/regexp_nfa.c + +Patch 7.3.1015 +Problem: New regexp engine: Matching composing characters is wrong. +Solution: Fix matching composing characters. +Files: src/regexp_nfa.c, src/testdir/test95.in, src/testdir/test95.ok + +Patch 7.3.1016 +Problem: Unused field in nfa_state. +Solution: Remove lastthread. +Files: src/regexp.h, src/regexp_nfa.c + +Patch 7.3.1017 +Problem: Zero width match changes length of match. +Solution: For a zero width match put new states in the current position in + the state list. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok, + src/regexp.h + +Patch 7.3.1018 +Problem: New regexp engine wastes memory. +Solution: Allocate prog with actual number of states, not estimated maximum + number of sates. +Files: src/regexp_nfa.c + +Patch 7.3.1019 +Problem: These do not work with the new regexp engine: \%o123, \%x123, + \%d123, \%u123 and \%U123. +Solution: Implement these items. +Files: src/regexp_nfa.c + +Patch 7.3.1020 +Problem: Not all patterns are tested with auto / old / new engine. +Solution: Test patterns with three values of 'regexpengine'. +Files: src/testdir/test64.in, src/testdir/test64.ok, + src/testdir/test95.in, src/testdir/test95.ok + +Patch 7.3.1021 +Problem: New regexp engine does not ignore order of composing chars. +Solution: Ignore composing chars order. +Files: src/regexp_nfa.c, src/testdir/test95.in, src/testdir/test95.ok + +Patch 7.3.1022 +Problem: Compiler warning for shadowed variable. (John Little) +Solution: Move declaration, rename variables. +Files: src/regexp_nfa.c + +Patch 7.3.1023 +Problem: Searching for composing char only and using \Z has different + results. +Solution: Make it match the composing char, matching everything is not + useful. +Files: src/regexp_nfa.c, src/testdir/test95.in, src/testdir/test95.ok + +Patch 7.3.1024 +Problem: New regexp: End of matching pattern not set correctly. (Cesar + Romani) +Solution: Quit the loop after finding the match. Store nfa_has_zend in the + program. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok, + src/regexp.h + +Patch 7.3.1025 +Problem: New regexp: not matching newline in string. (Marc Weber) +Solution: Check for "\n" character. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1026 +Problem: New regexp: pattern that includes a new-line matches too early. + (john McGowan) +Solution: Do not start searching in the second line. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1027 +Problem: New regexp performance: Calling no_Magic() very often. +Solution: Remove magicness inline. +Files: src/regexp_nfa.c + +Patch 7.3.1028 +Problem: New regexp performance: Copying a lot of position state. +Solution: Only copy the sub-expressions that are being used. +Files: src/regexp_nfa.c, src/regexp.h + +Patch 7.3.1029 +Problem: New regexp performance: Unused position state being copied. +Solution: Keep track of which positions are actually valid. +Files: src/regexp_nfa.c + +Patch 7.3.1030 (after 7.3.1028) +Problem: Can't build for debugging. +Solution: Fix struct member names. +Files: src/regexp_nfa.c + +Patch 7.3.1031 +Problem: Compiler warnings for shadowed variable. (John Little) +Solution: Move the variable declarations to the scope where they are used. +Files: src/regexp_nfa.c + +Patch 7.3.1032 +Problem: "\ze" is not supported by the new regexp engine. +Solution: Make "\ze" work. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1033 +Problem: "\1" .. "\9" are not supported in the new regexp engine. +Solution: Implement them. Add a few more tests. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok, + src/regexp.h + +Patch 7.3.1034 +Problem: New regexp code using strange multi-byte code. +Solution: Use the normal code to advance and backup pointers. +Files: src/regexp_nfa.c + +Patch 7.3.1035 +Problem: Compiler warning on 64 bit windows. +Solution: Add type cast. (Mike Williams) +Files: src/if_py_both.h + +Patch 7.3.1036 +Problem: Can't build on HP-UX. +Solution: Give the union a name. (John Marriott) +Files: src/regexp_nfa.c + +Patch 7.3.1037 +Problem: Look-behind matching is very slow on long lines. +Solution: Add a byte limit to how far back an attempt is made. +Files: src/regexp.c, src/regexp_nfa.c, src/testdir/test64.in, + src/testdir/test64.ok + +Patch 7.3.1038 +Problem: Crash when using Cscope. +Solution: Avoid negative argument to vim_strncpy(). (Narendran + Gopalakrishnan) +Files: src/if_cscope.c + +Patch 7.3.1039 +Problem: New regexp engine does not support \%23c, \%<23c and the like. +Solution: Implement them. (partly by Yasuhiro Matsumoto) +Files: src/regexp.h, src/regexp_nfa.c, src/testdir/test64.in, + src/testdir/test64.ok + +Patch 7.3.1040 +Problem: Python: Problems with debugging dynamic build. +Solution: Python patch 1. (ZyX) +Files: src/if_python.c, src/if_python3.c + +Patch 7.3.1041 +Problem: Python: Invalid read valgrind errors. +Solution: Python patch 2: defer DICTKEY_UNREF until key is no longer needed. + (ZyX) +Files: src/if_py_both.h + +Patch 7.3.1042 +Problem: Python: can't assign to vim.Buffer.name. +Solution: Python patch 3. (ZyX) +Files: runtime/doc/if_pyth.txt, src/ex_cmds.c, src/if_py_both.h, + src/if_python3.c, src/if_python.c, src/proto/ex_cmds.pro, + src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.1043 +Problem: Python: Dynamic compilation with 2.3 fails. +Solution: Python patch 4. (ZyX) +Files: src/if_python.c + +Patch 7.3.1044 +Problem: Python: No {Buffer,TabPage,Window}.valid attributes. +Solution: Python patch 5: add .valid (ZyX) +Files: src/if_py_both.h, src/if_python3.c, src/if_python.c, + src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.1045 +Problem: Python: No error handling for VimToPython function. +Solution: Python patch 6. (ZyX) +Files: src/if_py_both.h + +Patch 7.3.1046 +Problem: Python: Using Py_BuildValue for building strings. +Solution: Python patch 7 and 7.5: Replace Py_BuildValue with + PyString_FromString. (ZyX) +Files: src/if_py_both.h + +Patch 7.3.1047 +Problem: Python: dir() does not work properly. +Solution: Python patch 8. Add __dir__ method to all objects with custom + tp_getattr supplemented by __members__ attribute for at least + python-2* versions. __members__ is not mentioned in python-3* + dir() output even if it is accessible. (ZyX) +Files: src/if_py_both.h, src/if_python3.c, src/if_python.c, + src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.1048 +Problem: Python: no consistent naming. +Solution: Python patch 9: Rename d to dict and lookupDict to lookup_dict. + (ZyX) +Files: src/if_py_both.h + +Patch 7.3.1049 +Problem: Python: no consistent naming +Solution: Python patch 10: Rename DICTKEY_GET_NOTEMPTY to DICTKEY_GET. (ZyX) +Files: src/if_py_both.h + +Patch 7.3.1050 +Problem: Python: Typo in pyiter_to_tv. +Solution: Python patch 11. (ZyX) +Files: src/if_py_both.h + +Patch 7.3.1051 +Problem: Python: possible memory leaks. +Solution: Python patch 12: fix the leaks (ZyX) +Files: src/if_py_both.h + +Patch 7.3.1052 +Problem: Python: possible SEGV and negative refcount. +Solution: Python patch 13: Fix IterIter function. (ZyX) +Files: src/if_py_both.h + +Patch 7.3.1053 +Problem: Python: no flag for types with tp_traverse+tp_clear. +Solution: Python patch 14: Add Py_TPFLAGS_HAVE_GC. (ZyX) +Files: src/if_py_both.h + +Patch 7.3.1054 (after 7.3.1042) +Problem: Can't build without the +autocmd feature. (Elimar Riesebieter) +Solution: Fix use of buf and curbuf. +Files: src/ex_cmds.c, src/testdir/test86.ok, src/testdir/test87.ok + +Patch 7.3.1055 +Problem: Negated collection does not match newline. +Solution: Handle newline differently. (Hiroshi Shirosaki) +Files: src/regexp_nfa.c, src/testdir/test64.ok, src/testdir/test64.in + +Patch 7.3.1056 +Problem: Python: possible memory leaks. +Solution: Python patch 15. (ZyX) Fix will follow later. +Files: src/eval.c, src/if_py_both.h, src/proto/eval.pro + +Patch 7.3.1057 +Problem: Python: not enough compatibility. +Solution: Python patch 16: Make OutputWritelines support any sequence object + (ZyX) Note: tests fail +Files: src/if_py_both.h, src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.1058 +Problem: Call of funcref does not succeed in other script. +Solution: Python patch 17: add get_expanded_name(). (ZyX) +Files: src/eval.c, src/proto/eval.pro + +Patch 7.3.1059 +Problem: Python: Using fixed size buffers. +Solution: Python patch 18: Use python's own formatter. (ZyX) +Files: src/if_py_both.h, src/if_python3.c, src/if_python.c + +Patch 7.3.1060 +Problem: Python: can't repr() a function. +Solution: Python patch 19: add FunctionRepr(). (ZyX) +Files: src/if_py_both.h + +Patch 7.3.1061 +Problem: Python: Dictionary is not standard. +Solution: Python patch 20: Add standard methods and fields. (ZyX) +Files: runtime/doc/if_pyth.txt, src/eval.c, src/if_py_both.h, + src/if_python3.c, src/if_python.c, src/proto/eval.pro, + src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.1062 +Problem: Python: List is not standard. +Solution: Python patch 21: Add standard methods and fields. (ZyX) +Files: src/if_py_both.h, src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.1063 +Problem: Python: Function is not standard. +Solution: Python patch 22: make Function subclassable. (ZyX) +Files: src/eval.c, src/if_py_both.h, src/proto/eval.pro, + src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.1064 +Problem: Python: insufficient error checking. +Solution: Python patch 23. (ZyX) +Files: src/if_py_both.h + +Patch 7.3.1065 +Problem: Python: key mapping is not standard. +Solution: Python patch 24: use PyMapping_Keys. (ZyX) +Files: src/if_py_both.h, src/if_python3.c, src/if_python.c + +Patch 7.3.1066 +Problem: Python: Insufficient exception and error testing. +Solution: Python patch 25. (ZyX) +Files: src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.1067 +Problem: Python: documentation lags behind. +Solution: Python patch 26. (ZyX) +Files: runtime/doc/if_pyth.txt + +Patch 7.3.1068 +Problem: Python: Script is auto-loaded on function creation. +Solution: Python patch 27. (ZyX) +Files: src/eval.c, src/if_py_both.h, src/proto/eval.pro, + src/testdir/test86.ok, src/testdir/test87.ok, src/vim.h + +Patch 7.3.1069 +Problem: Python: memory leaks. +Solution: Python patch 28: Purge out DICTKEY_CHECK_EMPTY macros. (ZyX) +Files: src/if_py_both.h + +Patch 7.3.1070 +Problem: Vim crashes in Python tests. Compiler warning for unused function. +Solution: Disable the tests for now. Move the function. +Files: src/if_py_both.h, src/if_python.c, src/testdir/test86.in, + src/testdir/test87.in + +Patch 7.3.1071 +Problem: New regexp engine: backreferences don't work correctly. +Solution: Add every possible start/end position on the state stack. +Files: src/regexp_nfa.c, src/regexp.h, src/testdir/test64.in, + src/testdir/test64.ok + +Patch 7.3.1072 +Problem: Compiler warning for uninitialized variable. +Solution: Initialize it. +Files: src/regexp_nfa.c + +Patch 7.3.1073 +Problem: New regexp engine may run out of states. +Solution: Allocate states dynamically. Also make the test report errors. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok, + src/testdir/test95.in + +Patch 7.3.1074 +Problem: Compiler warning for printf format. (Manuel Ortega) +Solution: Add type casts. +Files: src/if_py_both.h + +Patch 7.3.1075 +Problem: Compiler warning for storing a long_u in an int. +Solution: Declare the number as an int. (Mike Williams) +Files: src/regexp_nfa.c + +Patch 7.3.1076 +Problem: New regexp engine: \@= and \& don't work. +Solution: Make these items work. Add column info to logging. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1077 +Problem: Python: Allocating dict the wrong way, causing a crash. +Solution: Use py_dict_alloc(). Fix some exception problems. (ZyX) +Files: src/if_py_both.h + +Patch 7.3.1078 +Problem: New regexp engine: \@! doesn't work. +Solution: Implement the negated version of \@=. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1079 +Problem: Test 87 fails. +Solution: Fix the test for Python 3.3. (ZyX) Make it pass on 32 bit systems. +Files: src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.1080 +Problem: Test 86 fails. +Solution: Comment out the parts that don't work. Make it pass on 32 bit + systems. +Files: src/testdir/test86.in, src/testdir/test86.ok + +Patch 7.3.1081 +Problem: Compiler warnings on 64-bit Windows. +Solution: Change variable types. (Mike Williams) +Files: src/if_py_both.h, src/regexp_nfa.c + +Patch 7.3.1082 +Problem: New regexp engine: Problem with \@= matching. +Solution: Save and restore nfa_match. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1083 +Problem: New regexp engine: Does not support \%^ and \%$. +Solution: Support matching start and end of file. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1084 +Problem: New regexp engine: only accepts up to \{,10}. +Solution: Remove upper limit. Remove dead code with NFA_PLUS. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1085 +Problem: New regexp engine: Non-greedy multi doesn't work. +Solution: Implement \{-}. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1086 +Problem: Old regexp engine accepts illegal range, new one doesn't. +Solution: Also accept the illegal range with the new engine. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1087 +Problem: A leading star is not seen as a normal char when \{} follows. +Solution: Save and restore the parse state properly. +Files: src/regexp.c, src/regexp_nfa.c, src/testdir/test64.in, + src/testdir/test64.ok + +Patch 7.3.1088 +Problem: New regexp engine: \@<= and \@<! are not implemented. +Solution: Implement look-behind matching. Fix off-by-one error in old + regexp engine. +Files: src/regexp.c, src/regexp_nfa.c, src/testdir/test64.in, + src/testdir/test64.ok + +Patch 7.3.1089 +Problem: Tests 86 and 87 fail on MS-Windows. (Ken Takata) +Solution: Fix platform-specific stuff. (ZyX) +Files: src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.1090 +Problem: New regexp engine does not support \z1 .. \z9 and \z(. +Solution: Implement the syntax submatches. +Files: src/regexp.h, src/regexp_nfa.c + +Patch 7.3.1091 +Problem: New regexp engine: no error when using \z1 or \z( where it does + not work. +Solution: Give an error message. +Files: src/regexp.c, src/regexp_nfa.c + +Patch 7.3.1092 +Problem: Can't build with regexp debugging. NFA debug output shows wrong + pattern. +Solution: Fix debugging code for recent changes. Add the pattern to the + program. +Files: src/regexp_nfa.c, src/regexp.h + +Patch 7.3.1093 +Problem: New regexp engine: When a sub expression is empty \1 skips a + character. +Solution: Make \1 try the current position when the match is empty. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1094 +Problem: New regexp engine: Attempts to match "^" at every character. +Solution: Only try "^" at the start of a line. +Files: src/regexp_nfa.c + +Patch 7.3.1095 +Problem: Compiler warnings for shadowed variables. (Christian Brabandt) +Solution: Rename new_state() to alloc_state(). Remove unnecessary + declaration. +Files: src/regexp_nfa.c + +Patch 7.3.1096 +Problem: Python: popitem() was not defined in a standard way. +Solution: Remove the argument from popitem(). (ZyX) +Files: runtime/doc/if_pyth.txt, src/if_py_both.h, src/testdir/test86.in, + src/testdir/test86.ok, src/testdir/test87.in, + src/testdir/test87.ok + +Patch 7.3.1097 +Problem: Python: a few recently added items are not documented. +Solution: Update the documentation. (ZyX) +Files: runtime/doc/if_pyth.txt + +Patch 7.3.1098 +Problem: Python: Possible memory leaks +Solution: Add Py_XDECREF() calls. (ZyX) +Files: src/if_py_both.h + +Patch 7.3.1099 +Problem: Python: Changing directory with os.chdir() causes problems for + Vim's notion of directories. +Solution: Add vim.chdir() and vim.fchdir(). (ZyX) +Files: runtime/doc/if_pyth.txt, src/ex_docmd.c, src/if_py_both.h, + src/if_python3.c, src/if_python.c, src/proto/ex_docmd.pro, + src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.1100 +Problem: Python: a few more memory problems. +Solution: Add and remove Py_XDECREF(). (ZyX) +Files: src/if_py_both.h, src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.1101 +Problem: Configure doesn't find Python 3 on Ubuntu 13.04. +Solution: First try distutils.sysconfig. Also fix some indents. (Ken + Takata) +Files: src/configure.in, src/auto/configure + +Patch 7.3.1102 +Problem: Completion of ":py3do" and ":py3file" does not work after ":py3". +Solution: Make completion work. (Taro Muraoka) +Files: src/ex_docmd.c + +Patch 7.3.1103 +Problem: New regexp engine: overhead in saving and restoring. +Solution: Make saving and restoring list IDs faster. Don't copy or check \z + subexpressions when they are not used. +Files: src/regexp_nfa.c + +Patch 7.3.1104 +Problem: New regexp engine does not handle "~". +Solution: Add support for "~". +Files: src/regexp_nfa.c, src/testdir/test24.in, src/testdir/test24.ok + +Patch 7.3.1105 +Problem: New regexp engine: too much code in one function. Dead code. +Solution: Move the recursive nfa_regmatch call to a separate function. + Remove the dead code. +Files: src/regexp_nfa.c + +Patch 7.3.1106 +Problem: New regexp engine: saving and restoring lastlist in the states + takes a lot of time. +Solution: Use a second lastlist value for the first recursive call. +Files: src/regexp.h, src/regexp_nfa.c + +Patch 7.3.1107 +Problem: Compiler warnings for unused variables. +Solution: Put the variables inside #ifdef. +Files: src/regexp.c, src/regexp_nfa.c + +Patch 7.3.1108 +Problem: Error message for os.fchdir() (Charles Peacech) +Solution: Clear the error. (ZyX) +Files: src/if_py_both.h + +Patch 7.3.1109 +Problem: Building on MS-Windows doesn't see changes in if_py_both.h. +Solution: Add a dependency. (Ken Takata) +Files: src/Make_bc5.mak, src/Make_cyg.mak, src/Make_ming.mak, + src/Make_mvc.mak + +Patch 7.3.1110 +Problem: New regexp matching: Using \@= and the like can be slow. +Solution: Decide whether to first try matching the zero-width part or what + follows, whatever is more likely to fail. +Files: src/regexp_nfa.c + +Patch 7.3.1111 +Problem: nfa_recognize_char_class() implementation is inefficient. +Solution: Use bits in an int instead of chars in a string. (Dominique Pelle) +Files: src/regexp_nfa.c, src/testdir/test36.in, src/testdir/test36.ok + +Patch 7.3.1112 +Problem: New regexp engine: \%V not supported. +Solution: Implement \%V. Add tests. +Files: src/regexp.c, src/regexp_nfa.c, src/testdir/test64.in, + src/testdir/test64.ok + +Patch 7.3.1113 +Problem: New regexp engine: \%'m not supported. +Solution: Implement \%'m. Add tests. +Files: src/regexp.c, src/regexp_nfa.c, src/testdir/test64.in, + src/testdir/test64.ok + +Patch 7.3.1114 (after 7.3.1110) +Problem: Can't build without the syntax feature. +Solution: Add #ifdefs. (Erik Falor) +Files: src/regexp_nfa.c + +Patch 7.3.1115 +Problem: Many users don't like the cursor line number when 'relativenumber' + is set. +Solution: Have four combinations with 'number' and 'relativenumber'. + (Christian Brabandt) +Files: runtime/doc/options.txt, src/option.c, src/screen.c, + src/testdir/test89.in, src/testdir/test89.ok + +Patch 7.3.1116 +Problem: Can't build without Visual mode. +Solution: Add #ifdefs. +Files: src/regexp_nfa.c + +Patch 7.3.1117 +Problem: New regexp engine: \%[abc] not supported. +Solution: Implement \%[abc]. Add tests. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1118 +Problem: Match failure rate is not very specific. +Solution: Tune the failure rate for match items. +Files: src/regexp_nfa.c + +Patch 7.3.1119 +Problem: Flags in 'cpo' are search for several times. +Solution: Store the result and re-use the flags. +Files: src/regexp.c, src/regexp_nfa.c + +Patch 7.3.1120 +Problem: Crash when regexp logging is enabled. +Solution: Avoid using NULL pointers. Advance over count argument. +Files: src/regexp.c, src/regexp_nfa.c + +Patch 7.3.1121 +Problem: New regexp engine: adding states that are not used. +Solution: Don't add the states. +Files: src/regexp_nfa.c + +Patch 7.3.1122 +Problem: New regexp engine: \@> not supported. +Solution: Implement \%>. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1123 +Problem: Can't build tiny Vim on MS-Windows. +Solution: Adjust #ifdef around using modif_fname(). (Mike Williams) +Files: src/misc1.c + +Patch 7.3.1124 +Problem: Python: Crash on MS-Windows when os.fchdir() is not available. +Solution: Check for _chdir to be NULL. (Ken Takata) +Files: src/if_py_both.h + +Patch 7.3.1125 +Problem: Error for using \%V in a pattern in tiny Vim. +Solution: Allow using \%V but never match. (Dominique Pelle) +Files: src/regexp_nfa.c + +Patch 7.3.1126 +Problem: Compiler warning for uninitialized variable. (Tony Mechelynck) +Solution: Assign something to the variable. +Files: src/regexp_nfa.c + +Patch 7.3.1127 +Problem: No error for using empty \%[]. +Solution: Give error message. +Files: src/regexp.c, src/regexp_nfa.c + +Patch 7.3.1128 +Problem: Now that the NFA engine handles everything every failure is a + syntax error. +Solution: Remove the syntax_error flag. +Files: src/regexp.c, src/regexp_nfa.c + +Patch 7.3.1129 +Problem: Can't see what pattern in syntax highlighting is slow. +Solution: Add the ":syntime" command. +Files: src/structs.h, src/syntax.c, src/ex_cmds.h, src/ex_docmd.c, + src/proto/syntax.pro, src/ex_cmds2.c, src/proto/ex_cmds2.pro, + runtime/doc/syntax.txt + +Patch 7.3.1130 (after 7.3.1129) +Problem: Can't build with anything but huge features. +Solution: Check for FEAT_PROFILE. (Yasuhiro Matsumoto) +Files: src/ex_docmd.c, src/structs.h, src/syntax.c + +Patch 7.3.1131 +Problem: New regexp engine is a bit slow. +Solution: Do not clear the state list. Don't copy syntax submatches when + not used. +Files: src/regexp_nfa.c + +Patch 7.3.1132 +Problem: Crash when debugging regexp. +Solution: Do not try to dump subexpr that were not set. Skip over count of + \% items. +Files: src/regexp.c, src/regexp_nfa.c + +Patch 7.3.1133 +Problem: New regexp engine is a bit slow. +Solution: Skip ahead to a character that must match. Don't try matching a + "^" patter past the start of line. +Files: src/regexp_nfa.c, src/regexp.h + +Patch 7.3.1134 +Problem: Running test 49 takes a long time. +Solution: Don't have it grep all files. +Files: src/testdir/test49.vim + +Patch 7.3.1135 +Problem: Compiler warning for unused argument. +Solution: Add UNUSED. +Files: src/syntax.c + +Patch 7.3.1136 +Problem: ":func Foo" does not show attributes. +Solution: Add "abort", "dict" and "range". (Yasuhiro Matsumoto) +Files: src/eval.c + +Patch 7.3.1137 +Problem: New regexp engine: collections are slow. +Solution: Handle all characters in one go. +Files: src/regexp_nfa.c + +Patch 7.3.1138 +Problem: New regexp engine: neglist no longer used. +Solution: Remove the now unused neglist. +Files: src/regexp_nfa.c + +Patch 7.3.1139 +Problem: New regexp engine: negated flag is hardly used. +Solution: Add separate _NEG states, remove negated flag. +Files: src/regexp_nfa.c, src/regexp.h + +Patch 7.3.1140 +Problem: New regexp engine: trying expensive match while the result is not + going to be used. +Solution: Check for output state already being in the state list. +Files: src/regexp_nfa.c + +Patch 7.3.1141 +Problem: Win32: Check for available memory is not reliable and adds + overhead. +Solution: Remove mch_avail_mem(). (Mike Williams) +Files: src/os_win32.c, src/os_win32.h + +Patch 7.3.1142 +Problem: Memory leak in ":syntime report". +Solution: Clear the grow array. (Dominique Pelle) +Files: src/syntax.c + +Patch 7.3.1143 +Problem: When mapping NUL it is displayed as an X. +Solution: Check for KS_ZERO instead of K_ZERO. (Yasuhiro Matsumoto) +Files: src/message.c + +Patch 7.3.1144 +Problem: "RO" is not translated everywhere. +Solution: Put inside _(). (Sergey Alyoshin) +Files: src/buffer.c, src/screen.c + +Patch 7.3.1145 +Problem: New regexp engine: addstate() is called very often. +Solution: Optimize adding the start state. +Files: src/regexp_nfa.c + +Patch 7.3.1146 +Problem: New regexp engine: look-behind match not checked when followed by + zero-width match. +Solution: Do the look-behind match before adding the zero-width state. +Files: src/regexp_nfa.c + +Patch 7.3.1147 +Problem: New regexp engine: regstart is only used to find the first match. +Solution: Use regstart whenever adding the start state. +Files: src/regexp_nfa.c + +Patch 7.3.1148 +Problem: No command line completion for ":syntime". +Solution: Implement the completion. (Dominique Pelle) +Files: runtime/doc/map.txt, src/ex_cmds.h, src/ex_docmd.c, + src/ex_getln.c, src/proto/syntax.pro, src/syntax.c, src/vim.h + +Patch 7.3.1149 +Problem: New regexp engine: Matching plain text could be faster. +Solution: Detect a plain text match and handle it specifically. Add + vim_regfree(). +Files: src/regexp.c, src/regexp.h, src/regexp_nfa.c, + src/proto/regexp.pro, src/buffer.c, src/edit.c, src/eval.c, + src/ex_cmds.c, src/ex_cmds2.c, src/ex_docmd.c, src/ex_eval.c, + src/ex_getln.c, src/fileio.c, src/gui.c, src/misc1.c, src/misc2.c, + src/option.c, src/syntax.c, src/quickfix.c, src/search.c, + src/spell.c, src/tag.c, src/window.c, src/screen.c, src/macros.h, + src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1150 +Problem: New regexp engine: Slow when a look-behind match does not have a + width specified. +Solution: Try to compute the maximum width. +Files: src/regexp_nfa.c + +Patch 7.3.1151 +Problem: New regexp engine: Slow when a look-behind match is followed by a + zero-width match. +Solution: Postpone the look-behind match more often. +Files: src/regexp_nfa.c + +Patch 7.3.1152 +Problem: In tiny build ireg_icombine is undefined. (Tony Mechelynck) +Solution: Add #ifdef. +Files: src/regexp_nfa.c + +Patch 7.3.1153 +Problem: New regexp engine: Some look-behind matches are very expensive. +Solution: Postpone invisible matches further, until a match is almost found. +Files: src/regexp_nfa.c + +Patch 7.3.1154 +Problem: New regexp_nfa engine: Unnecessary code. +Solution: Remove unnecessary code. +Files: src/regexp_nfa.c + +Patch 7.3.1155 +Problem: MS-DOS: "make test" uses external rmdir command. +Solution: Rename "rmdir" to "rd". (Taro Muraoka) +Files: src/testdir/Make_dos.mak + +Patch 7.3.1156 +Problem: Compiler warnings. (dv1445) +Solution: Initialize variables, even when the value isn't really used. +Files: src/regexp_nfa.c, src/eval.c + +Patch 7.3.1157 +Problem: New regexp engine fails on "\(\<command\)\@<=.*" +Solution: Fix rule for postponing match. Further tune estimating whether + postponing works better. Add test. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1158 +Problem: Crash when running test 86. (Jun Takimoto) +Solution: Define PY_SSIZE_T_CLEAN early. (Elimar Riesebieter) +Files: src/if_python.c, src/if_python3.c + +Patch 7.3.1159 +Problem: The round() function is not always available. (Christ van + Willegen) +Solution: Use the solution from f_round(). +Files: src/ex_cmds2.c, src/eval.c, src/proto/eval.pro + +Patch 7.3.1160 +Problem: Mixing long and pointer doesn't always work. +Solution: Avoid cast to pointer. +Files: src/undo.c + +Patch 7.3.1161 +Problem: Python: PyList_SetItem() is inefficient. +Solution: Use PyList_SET_ITEM() (ZyX) +Files: src/if_py_both.h + +Patch 7.3.1162 +Problem: Python: Memory leaks +Solution: Add more Py_DECREF(). (ZyX) +Files: src/if_py_both.h, src/if_python.c + +Patch 7.3.1163 +Problem: Not easy to load Python modules. +Solution: Search "python2", "python3" and "pythonx" directories in + 'runtimepath' for Python modules. (ZyX) +Files: runtime/doc/if_pyth.txt, src/configure.in, src/ex_cmds2.c, + src/if_py_both.h, src/if_python.c, src/if_python3.c, + src/testdir/test86.in, src/testdir/test87.in, src/auto/configure + +Patch 7.3.1164 +Problem: Can't test what is actually displayed on screen. +Solution: Add the screenchar() and screenattr() functions. +Files: src/eval.c, runtime/doc/eval.txt + +Patch 7.3.1165 +Problem: HP-UX compiler can't handle zero size array. (Charles Cooper) +Solution: Make the array one item big. +Files: src/regexp.h, src/regexp_nfa.c + +Patch 7.3.1166 +Problem: Loading Python modules is not tested. +Solution: Enable commented-out tests, add missing files. (ZyX) +Files: src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok, + src/testdir/python2/module.py, src/testdir/python3/module.py, + src/testdir/pythonx/module.py, src/testdir/pythonx/modulex.py, + Filelist + +Patch 7.3.1167 +Problem: Python configure check doesn't reject Python 2 when requesting + Python 3. Some systems need -pthreads instead of -pthread. +Solution: Adjust configure accordingly. (Andrei Olsen) +Files: src/configure.in, src/auto/configure + +Patch 7.3.1168 +Problem: Python "sane" configure checks give a warning message. +Solution: Use single quotes instead of escaped double quotes. (Ben Fritz) +Files: src/configure.in, src/auto/configure + +Patch 7.3.1169 +Problem: New regexp engine: some work is done while executing a pattern, + even though the result is predictable. +Solution: Do the work while compiling the pattern. +Files: src/regexp_nfa.c + +Patch 7.3.1170 +Problem: Patch 7.3.1058 breaks backwards compatibility, not possible to use + a function reference as a string. (lilydjwg) +Solution: Instead of translating the function name only translate "s:". +Files: src/eval.c + +Patch 7.3.1171 +Problem: Check for digits and ascii letters can be faster. +Solution: Use a trick with one comparison. (Dominique Pelle) +Files: src/macros.h + +Patch 7.3.1172 +Problem: Python 2: loading modules doesn't work well. +Solution: Fix the code. Add more tests. (ZyX) +Files: runtime/doc/if_pyth.txt, src/if_py_both.h, src/if_python.c, + src/testdir/python2/module.py, src/testdir/python3/module.py, + src/testdir/python_after/after.py, + src/testdir/python_before/before.py, src/testdir/test86.in, + src/testdir/test86.ok, src/testdir/test87.in, + src/testdir/test87.ok, Filelist + +Patch 7.3.1173 +Problem: Python 2 tests don't have the same output everywhere. +Solution: Make the Python 2 tests more portable. (ZyX) +Files: src/testdir/test86.in, src/testdir/test86.ok + +Patch 7.3.1174 +Problem: Python 2 and 3 use different ways to load modules. +Solution: Use the same method. (ZyX) +Files: runtime/doc/if_pyth.txt, src/if_py_both.h, src/if_python3.c, + src/if_python.c + +Patch 7.3.1175 +Problem: Using isalpha() and isalnum() can be slow. +Solution: Use range checks. (Mike Williams) +Files: src/ex_docmd.c, src/macros.h + +Patch 7.3.1176 +Problem: Compiler warnings on 64 bit system. +Solution: Add type casts. (Mike Williams) +Files: src/eval.c, src/if_py_both.h + +Patch 7.3.1177 +Problem: Wasting memory on padding. +Solution: Reorder struct fields. (Dominique Pelle) +Files: src/structs.h, src/fileio.c + +Patch 7.3.1178 +Problem: Can't put all Vim config files together in one directory. +Solution: Load ~/.vim/vimrc if ~/.vimrc does not exist. (Lech Lorens) +Files: runtime/doc/gui.txt, runtime/doc/starting.txt, src/gui.c, + src/main.c, src/os_amiga.h, src/os_dos.h, src/os_unix.h + +Patch 7.3.1179 +Problem: When a global mapping starts with the same characters as a + buffer-local mapping Vim waits for a character to be typed to find + out whether the global mapping is to be used. (Andy Wokula) +Solution: Use the local mapping without waiting. (Michael Henry) +Files: runtime/doc/map.txt, src/getchar.c + +Patch 7.3.1180 +Problem: When current directory changes, path from cscope may no longer be + valid. (AS Budden) +Solution: Always store the absolute path. (Christian Brabandt) +Files: src/if_cscope.c + +Patch 7.3.1181 +Problem: Wrong error message for 1.0[0]. +Solution: Check for funcref and float separately. (Yasuhiro Matsumoto) +Files: src/eval.c + +Patch 7.3.1182 +Problem: 'backupcopy' default on MS-Windows does not work for hard and soft + links. +Solution: Check for links. (David Pope, Ken Takata) +Files: src/fileio.c, src/os_win32.c, src/proto/os_win32.pro + +Patch 7.3.1183 +Problem: Python tests 86 and 87 fail. +Solution: Add "empty" files. (ZyX) +Files: src/testdir/python_before/before_1.py, + src/testdir/python_before/before_2.py + +Patch 7.3.1184 +Problem: Highlighting is sometimes wrong. (Axel Bender) +Solution: Fetch regline again when returning from recursive regmatch. +Files: src/regexp_nfa.c + +Patch 7.3.1185 +Problem: New regexp engine: no match with ^ after \n. (SungHyun Nam) +Solution: Fix it, add a test. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1186 +Problem: Python 3: test 87 may crash. +Solution: Use _PyArg_Parse_SizeT instead of PyArg_Parse. (Jun Takimoto) +Files: src/if_python3.c + +Patch 7.3.1187 (after 7.3.1170) +Problem: "s:" is recognized but "<SID>" is not. (ZyX) +Solution: Translate "<SID>" like "s:". +Files: src/eval.c + +Patch 7.3.1188 +Problem: Newline characters messing up error message. +Solution: Remove the newlines. (Kazunobu Kuriyama) +Files: src/gui_x11.c + +Patch 7.3.1189 (after 7.3.1185) +Problem: Highlighting is still wrong sometimes. (Dominique Pelle) +Solution: Also restore reginput properly. +Files: src/regexp_nfa.c + +Patch 7.3.1190 +Problem: Compiler warning for parentheses. (Christian Wellenbrock) +Solution: Change #ifdef. +Files: src/ex_docmd.c + +Patch 7.3.1191 +Problem: Backreference to previous line doesn't work. (Lech Lorens) +Solution: Implement looking in another line. +Files: src/regexp.c, src/regexp_nfa.c, src/testdir/test64.in, + src/testdir/test64.ok + +Patch 7.3.1192 +Problem: Valgrind reports errors when using backreferences. (Dominique + Pelle) +Solution: Do not check the end of submatches. +Files: src/regexp_nfa.c + +Patch 7.3.1193 +Problem: fail_if_missing not used for Python 3. +Solution: Give an error when Python 3 can't be configured. (Andrei Olsen) +Files: src/configure.in, src/auto/configure + +Patch 7.3.1194 +Problem: Yaml highlighting is slow. +Solution: Tune the estimation of pattern failure chance. +Files: src/regexp_nfa.c + +Patch 7.3.1195 +Problem: Compiler warning for uninitialized variable. (Tony Mechelynck) +Solution: Set the length to the matching backref. +Files: src/regexp.c + +Patch 7.3.1196 +Problem: Old regexp engine does not match pattern with backref correctly. + (Dominique Pelle) +Solution: Fix setting status. Test multi-line patterns better. +Files: src/regexp.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1197 +Problem: ":wviminfo!" does not write history previously read from a viminfo + file. (Roland Eggner) +Solution: When not merging history write all entries. +Files: src/ex_cmds.c, src/ex_getln.c, src/proto/ex_getln.pro + +Patch 7.3.1198 +Problem: Build error when using Perl 5.18.0 and dynamic loading. +Solution: Change #ifdefs for Perl_croak_xs_usage. (Ike Devolder) +Files: src/if_perl.xs + +Patch 7.3.1199 +Problem: When evaluating 'foldexpr' causes an error this is silently + ignored and evaluation is retried every time. +Solution: Set emsg_silent instead of emsg_off. Stop evaluating 'foldexpr' is + it is causing errors. (Christian Brabandt) +Files: src/fold.c + +Patch 7.3.1200 +Problem: When calling setline() from Insert mode, using CTRL-R =, undo does + not work properly. (Israel Chauca) +Solution: Sync undo after evaluating the expression. (Christian Brabandt) +Files: src/edit.c, src/testdir/test61.in, src/testdir/test61.ok + +Patch 7.3.1201 +Problem: When a startup script creates a preview window, it probably + becomes the current window. +Solution: Make another window the current one. (Christian Brabandt) +Files: src/main.c + +Patch 7.3.1202 (after 7.3.660) +Problem: Tags are not found in case-folded tags file. (Darren cole, Issue + 90) +Solution: Take into account that when case folding was used for the tags + file "!rm" sorts before the "!_TAG" header lines. +Files: src/tag.c + +Patch 7.3.1203 +Problem: Matches from matchadd() might be highlighted incorrectly when they + are at a fixed position and inserting lines. (John Szakmeister) +Solution: Redraw all lines below a change if there are highlighted matches. + (idea by Christian Brabandt) +Files: src/screen.c + +Patch 7.3.1204 +Problem: Calling gettabwinvar() in 'tabline' cancels Visual mode. (Hirohito + Higashi) +Solution: Don't always use goto_tabpage_tp(). +Files: src/window.c, src/proto/window.pro, src/eval.c, src/if_py_both.h + +Patch 7.3.1205 +Problem: logtalk.dict is not removed on uninstall. +Solution: Remove the file. (Kazunobu Kuriyama) +Files: src/Makefile + +Patch 7.3.1206 +Problem: Inconsistent function argument declarations. +Solution: Use ANSI style. +Files: src/if_py_both.h + +Patch 7.3.1207 +Problem: New regexp engine: no match found on "#if FOO". (Lech Lorens) +Solution: When adding a state gets skipped don't adjust the index. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1208 +Problem: Compiler warnings on MS-Windows. +Solution: Add type cast. Move variable declaration. (Mike Williams) +Files: src/option.c, src/os_mswin.c + +Patch 7.3.1209 +Problem: No completion for ":tabdo". +Solution: Add tabdo to the list of modifiers. (Dominique Pelle) +Files: src/ex_docmd.c + +Patch 7.3.1210 (after 7.3.1182) +Problem: 'backupcopy' default on MS-Windows is wrong when 'encoding' equals + the current codepage. +Solution: Change the #else block. (Ken Takata) +Files: src/os_win32.c + +Patch 7.3.1211 +Problem: MS-Windows: When 'encoding' differs from the current codepage + ":hardcopy" does not work properly. +Solution: Use TextOutW() and SetDlgItemTextW(). (Ken Takata) +Files: src/os_mswin.c, src/vim.rc + +Patch 7.3.1212 +Problem: "make test" on MS-Windows does not report failure like Unix does. +Solution: Make it work like on Unix. (Taro Muraoka) +Files: src/testdir/Make_dos.mak + +Patch 7.3.1213 +Problem: Can't build with small features and Python. +Solution: Adjust #ifdefs. +Files: src/eval.c, src/buffer.c, src/eval.c, src/window.c + +Patch 7.3.1214 +Problem: Missing declaration for init_users() and realloc_post_list(). + (Salman Halim) +Solution: Add the declarations. +Files: src/misc1.c, src/regexp_nfa.c + +Patch 7.3.1215 +Problem: Compiler warning for function not defined. +Solution: Add #ifdef. +Files: src/misc1.c + +Patch 7.3.1216 +Problem: Configure can't find Motif on Ubuntu. +Solution: Search for libXm in /usr/lib/*-linux-gnu. +Files: src/configure.in, src/auto/configure + +Patch 7.3.1217 +Problem: New regexp engine: Can't handle \%[[ao]]. (Yukihiro Nakadaira) +Solution: Support nested atoms inside \%[]. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1218 +Problem: "make test" on MS-Windows does not clean all temporary files and + gives some unnecessary message. +Solution: Clean the right files. Create .failed files. (Ken Takata) +Files: src/testdir/Make_dos.mak + +Patch 7.3.1219 +Problem: No test for using []] inside \%[]. +Solution: Add a test. +Files: src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1220 +Problem: MS-Windows: When using wide font italic and bold are not included. +Solution: Support wide-bold, wide-italic and wide-bold-italic. (Ken Takata, + Taro Muraoka) +Files: src/gui.c, src/gui.h, src/gui_w48.c + +Patch 7.3.1221 +Problem: When build flags change "make distclean" run into a configure + error. +Solution: When CFLAGS changes delete auto/config.cache. Also avoid adding + duplicate text to flags. (Ken Takata) +Files: src/Makefile, src/configure.in, src/auto/configure + +Patch 7.3.1222 +Problem: Cannot execute some tests from the src directly. +Solution: Add missing targets. +Files: src/Makefile + +Patch 7.3.1223 +Problem: Tests fail on MS-Windows. +Solution: Avoid depending on OS version. Use DOS commands instead of Unix + commands. (Taro Muraoka, Ken Takata) +Files: src/testdir/test17.in, src/testdir/test50.in, + src/testdir/test71.in, src/testdir/test77.in + +Patch 7.3.1224 +Problem: Clang gives warnings on xxd. +Solution: Change how to use part of a string. (Dominique Pelle) Also avoid + warning for return not reached. +Files: src/xxd/xxd.c, src/regexp_nfa.c + +Patch 7.3.1225 +Problem: Compiler warnings when building with Motif. +Solution: Change set_label() argument. (Kazunobu Kuriyama) +Files: src/gui_motif.c + +Patch 7.3.1226 +Problem: Python: duplicate code. +Solution: Share code between OutputWrite() and OutputWritelines(). (ZyX) +Files: src/if_py_both.h, src/testdir/test86.ok, src/testdir/test87.ok + +Patch 7.3.1227 +Problem: Inconsistent string conversion. +Solution: Use 'encoding' instead of utf-8. Use METH_O in place of + METH_VARARGS where appropriate. (ZyX) +Files: src/if_py_both.h, src/testdir/test86.ok, src/testdir/test87.ok + +Patch 7.3.1228 +Problem: Python: various inconsistencies and problems. +Solution: StringToLine now supports both bytes() and unicode() objects. + Make function names consistent. Fix memory leak fixed in + StringToLine. (ZyX) +Files: src/if_py_both.h, src/if_python3.c, src/if_python.c + +Patch 7.3.1229 +Problem: Python: not so easy to delete/restore translating. +Solution: Make macros do translation of exception messages. (ZyX) + Note: this breaks translations! +Files: src/if_py_both.h, src/if_python3.c + +Patch 7.3.1230 +Problem: Python: Exception messages are not clear. +Solution: Make exception messages more verbose. (ZyX) +Files: src/if_py_both.h, src/if_python3.c, src/if_python.c, + src/testdir/test86.ok, src/testdir/test87.ok + +Patch 7.3.1231 +Problem: Python: use of numbers not consistent. +Solution: Add support for Number protocol. (ZyX) +Files: src/if_py_both.h, src/if_python3.c, src/if_python.c, + src/testdir/test86.ok, src/testdir/test87.ok + +Patch 7.3.1232 +Problem: Python: inconsistencies in variable names. +Solution: Rename variables. (ZyX) +Files: src/eval.c, src/if_py_both.h + +Patch 7.3.1233 +Problem: Various Python problems. +Solution: Fix VimTryEnd. Crash with debug build and PYTHONDUMPREFS=1. Memory + leaks in StringToLine(), BufferMark() and convert_dl. (ZyX) +Files: src/if_py_both.h, src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + +Patch 7.3.1234 (after 7.3.1229) +Problem: Python: Strings are not marked for translation. +Solution: Add N_() where appropriate. (ZyX) +Files: src/if_py_both.h + +Patch 7.3.1235 +Problem: In insert mode CTRL-] is not inserted, on the command-line it is. +Solution: Don't insert CTRL-] on the command line. (Yukihiro Nakadaira) +Files: src/ex_getln.c + +Patch 7.3.1236 +Problem: Python: WindowSetattr() missing support for NUMBER_UNSIGNED. +Solution: Add NUMBER_UNSIGNED, add more tests. Various fixes. (ZyX) +Files: src/if_py_both.h, src/if_python3.c, src/if_python.c, + src/testdir/pythonx/failing.py, + src/testdir/pythonx/failing_import.py, src/testdir/test86.in, + src/testdir/test86.ok, src/testdir/test87.in, + src/testdir/test87.ok, src/testdir/pythonx/topmodule/__init__.py, + src/testdir/pythonx/topmodule/submodule/__init__.py, + src/testdir/pythonx/topmodule/submodule/subsubmodule/__init__.py, + src/testdir/pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py + +Patch 7.3.1237 +Problem: Python: non-import errors not handled correctly. +Solution: Let non-ImportError exceptions pass the finder. (ZyX) +Files: src/if_py_both.h, src/testdir/test86.ok, src/testdir/test87.ok + +Patch 7.3.1238 +Problem: Crash in Python interface on 64 bit machines. +Solution: Change argument type of PyString_AsStringAndSize. (Taro Muraoka, + Jun Takimoto) +Files: src/if_python.c + +Patch 7.3.1239 +Problem: Can't build with Python and MSVC10. +Solution: Move #if outside of macro. (Taro Muraoka) +Files: src/if_py_both.h + +Patch 7.3.1240 +Problem: Memory leak in findfile(). +Solution: Free the memory. (Christian Brabandt) +Files: src/eval.c + +Patch 7.3.1241 (after 7.3.1236) +Problem: Some test files missing from the distribution. +Solution: Update the list of files. +Files: Filelist + +Patch 7.3.1242 +Problem: No failure when trying to use a number as a string. +Solution: Give an error when StringToLine() is called with an instance of + the wrong type. (Jun Takimoto) +Files: src/if_py_both.h + +Patch 7.3.1243 +Problem: New regexp engine: back references in look-behind match don't + work. (Lech Lorens) +Solution: Copy the submatches before a recursive match. Also fix function + prototypes. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1244 +Problem: MS-Windows: confirm() dialog text may not fit. +Solution: Use GetTextWidthEnc() instead of GetTextWidth(). (Yasuhiro + Matsumoto) +Files: src/gui_w32.c + +Patch 7.3.1245 +Problem: MS-Windows: confirm() dialog text may still not fit. +Solution: Use GetTextWidthEnc() instead of GetTextWidth() in two more + places. (Yasuhiro Matsumoto) +Files: src/gui_w32.c + +Patch 7.3.1246 +Problem: When setting 'winfixheight' and resizing the window causes the + window layout to be wrong. +Solution: Add frame_check_height() and frame_check_width() (Yukihiro + Nakadaira) +Files: src/window.c + +Patch 7.3.1247 +Problem: New regexp engine: '[ ]\@!\p\%([ ]\@!\p\)*:' does not always match. +Solution: When there is a PIM add a duplicate state that starts at another + position. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1248 +Problem: Still have old hacking code for Input Method. +Solution: Add 'imactivatefunc' and 'imstatusfunc' as a generic solution to + Input Method activation. (Yukihiro Nakadaira) +Files: runtime/doc/options.txt, src/fileio.c, src/mbyte.c, src/option.c, + src/option.h, src/proto/fileio.pro + +Patch 7.3.1249 +Problem: Modeline not recognized when using "Vim" instead of "vim". +Solution: Also accept "Vim". +Files: src/buffer.c + +Patch 7.3.1250 +Problem: Python tests fail on MS-Windows. +Solution: Change backslashes to slashes. (Taro Muraoka) +Files: src/testdir/test86.in, src/testdir/test87.in + +Patch 7.3.1251 +Problem: Test 61 messes up viminfo. +Solution: Specify a separate viminfo file. +Files: src/testdir/test61.in + +Patch 7.3.1252 +Problem: Gvim does not find the toolbar bitmap files in ~/vimfiles/bitmaps + if the corresponding menu command contains additional characters + like the shortcut marker '&' or if you use a non-english locale. +Solution: Use menu->en_dname or menu->dname. (Martin Gieseking) +Files: src/gui_w32.c + +Patch 7.3.1253 (after 7.3.1200) +Problem: Still undo problem after using CTRL-R = setline(). (Hirohito + Higashi) +Solution: Set the ins_need_undo flag. +Files: src/edit.c + +Patch 7.3.1254 (after 7.3.1252) +Problem: Can't build without the multi-lang feature. (John Marriott) +Solution: Add #ifdef. +Files: src/gui_w32.c + +Patch 7.3.1255 +Problem: Clang warnings when building with Athena. +Solution: Add type casts. (Dominique Pelle) +Files: src/gui_at_fs.c + +Patch 7.3.1256 +Problem: Can't build without eval or autocmd feature. +Solution: Add #ifdefs. +Files: src/mbyte.c, src/window.c + +Patch 7.3.1257 +Problem: With GNU gettext() ":lang de_DE.utf8" does not always result in + German messages. +Solution: Clear the $LANGUAGE environment variable. +Files: src/ex_cmds2.c + +Patch 7.3.1258 +Problem: Using submatch() may crash Vim. (Ingo Karkat) +Solution: Restore the number of subexpressions used. +Files: src/regexp_nfa.c + +Patch 7.3.1259 +Problem: No test for patch 7.3.1258 +Solution: Add a test entry. +Files: src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.3.1260 +Problem: User completion does not get the whole command line in the command + line window. +Solution: Pass on the whole command line. (Daniel Thau) +Files: src/ex_getln.c, src/structs.h + +Patch 7.3.1261 (after patch 7.3.1179) +Problem: A buffer-local language mapping from a keymap stops a global + insert mode mapping from working. (Ron Aaron) +Solution: Do not wait for more characters to be typed only when the mapping + was defined with <nowait>. +Files: runtime/doc/map.txt, src/eval.c, src/getchar.c, + src/testdir/test75.in, src/testdir/test75.ok + +Patch 7.3.1262 +Problem: Crash and compilation warnings with Cygwin. +Solution: Check return value of XmbTextListToTextProperty(). Add type casts. + Adjust #ifdefs. (Lech Lorens) +Files: src/main.c, src/os_unix.c, src/ui.c + +Patch 7.3.1263 +Problem: Typo in short option name. +Solution: Change "imse" to "imsf". +Files: src/option.c + +Patch 7.3.1264 (after 7.3.1261) +Problem: Missing m_nowait. +Solution: Include missing part of the patch. +Files: src/structs.h + +Patch 7.3.1265 (after 7.3.1249) +Problem: Accepting "Vim:" for a modeline causes errors too often. +Solution: Require "Vim:" to be followed by "set". +Files: src/buffer.c + +Patch 7.3.1266 +Problem: QNX: GUI fails to start. +Solution: Remove the QNX-specific #ifdef. (Sean Boudreau) +Files: src/gui.c + +Patch 7.3.1267 +Problem: MS-Windows ACL support doesn't work well. +Solution: Implement more ACL support. (Ken Takata) +Files: src/os_win32.c + +Patch 7.3.1268 +Problem: ACL support doesn't work when compiled with MingW. +Solution: Support ACL on MingW. (Ken Takata) +Files: src/os_win32.c, src/os_win32.h + +Patch 7.3.1269 +Problem: Insert completion keeps entry selected even though the list has + changed. (Olivier Teuliere) +Solution: Reset compl_shown_match and compl_curr_match. (Christian Brabandt) +Files: src/edit.c + +Patch 7.3.1270 +Problem: Using "Vp" in an empty buffer can't be undone. (Hauke Petersen) +Solution: Save one line in an empty buffer. (Christian Brabandt) +Files: src/ops.c + +Patch 7.3.1271 (after 7.3.1260) +Problem: Command line completion does not work. +Solution: Move setting xp_line down. (Daniel Thau) +Files: src/ex_getln.c + +Patch 7.3.1272 +Problem: Crash when editing Ruby file. (Aliaksandr Rahalevich) +Solution: Reallocate the state list when necessary. +Files: src/regexp_nfa.c + +Patch 7.3.1273 +Problem: When copying a location list the index might be wrong. +Solution: Set the index to one when using the first entry. (Lech Lorens) +Files: src/quickfix.c + +Patch 7.3.1274 +Problem: When selecting an entry from a location list it may pick an + arbitrary window or open a new one. +Solution: Prefer using a window related to the location list. (Lech Lorens) +Files: src/quickfix.c + +Patch 7.3.1275 +Problem: "gn" does not work when the match is a single character. +Solution: Fix it, add a test. (Christian Brabandt) +Files: src/search.c, src/testdir/test53.in, src/testdir/test53.ok + +Patch 7.3.1276 +Problem: When using a cscope connection resizing the window may send + SIGWINCH to cscope and it quits. +Solution: Call setpgid(0, 0) in the child process. (Narendran Gopalakrishnan) +Files: src/if_cscope.c + +Patch 7.3.1277 +Problem: In diff mode 'cursorline' also draws in the non-active window. + When 'nu' and 'sbr' are set the 'sbr' string is not underlined. +Solution: Only draw the cursor line in the current window. Combine the + 'cursorline' and other highlighting attributes. (Christian + Brabandt) +Files: src/screen.c + +Patch 7.3.1278 +Problem: When someone sets the screen size to a huge value with "stty" Vim + runs out of memory before reducing the size. +Solution: Limit Rows and Columns in more places. +Files: src/gui.c, src/gui_gtk_x11.c, src/option.c, src/os_unix.c, + src/proto/term.pro, src/term.c + +Patch 7.3.1279 +Problem: Compiler warning for variable uninitialized. (Tony Mechelynck) +Solution: Add an init. +Files: src/ex_getln.c + +Patch 7.3.1280 +Problem: Reading memory already freed since patch 7.3.1247. (Simon + Ruderich, Dominique Pelle) +Solution: Copy submatches before reallocating the state list. +Files: src/regexp_nfa.c + +Patch 7.3.1281 +Problem: When 'ttymouse' is set to "xterm2" clicking in column 123 moves + the cursor to column 96. (Kevin Goodsell) +Solution: Decode KE_CSI. +Files: src/term.c + +Patch 7.3.1282 (after 7.3.1277) +Problem: 'cursorline' not drawn in any other window. (Charles Campbell) +Solution: Do draw the cursor line in other windows. +Files: src/screen.c + +Patch 7.3.1283 +Problem: Test 71 fails on MS-Windows. +Solution: Put the binary data in a separate file. (Ken Takata) +Files: src/testdir/test71.in, src/testdir/test71a.in + +Patch 7.3.1284 +Problem: Compiler warnings in MS-Windows clipboard handling. +Solution: Add type casts. (Ken Takata) +Files: src/winclip.c + +Patch 7.3.1285 +Problem: No tests for picking a window when selecting an entry in a + location list. Not picking the right window sometimes. +Solution: Add test 96. Set usable_win appropriately. (Lech Lorens) +Files: src/quickfix.c, src/testdir/Makefile, src/testdir/test96.in, + src/testdir/test96.ok, src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mms + +Patch 7.3.1286 +Problem: Check for screen size missing for Athena and Motif. +Solution: Add call to limit_screen_size(). +Files: src/gui_x11.c + +Patch 7.3.1287 +Problem: Python SystemExit exception is not handled properly. +Solution: Catch the exception and give an error. (Yasuhiro Matsumoto, Ken + Takata) +Files: runtime/doc/if_pyth.txt, src/if_py_both.h, src/if_python.c, + src/if_python3.c + +Patch 7.3.1288 +Problem: The first ":echo 'hello'" command output doesn't show. Mapping + for <S-F3> gets triggered during startup. +Solution: Add debugging code for the termresponse. When receiving the "Co" + entry and when setting 'ambiwidth' redraw right away if possible. + Add redraw_asap(). Don't set 'ambiwidth' if it already had the + right value. Do the 'ambiwidth' check in the second row to avoid + confusion with <S-F3>. +Files: src/term.c, src/screen.c, src/proto/screen.pro + +Patch 7.3.1289 +Problem: Get GLIB warning when removing a menu item. +Solution: Reference menu-id and also call gtk_container_remove(). (Ivan + Krasilnikov) +Files: src/gui_gtk.c + +Patch 7.3.1290 (after 7.3.1253) +Problem: CTRL-R = in Insert mode changes the start of the insert position. + (Ingo Karkat) +Solution: Only break undo, don't start a new insert. +Files: src/edit.c + +Patch 7.3.1291 (after 7.3.1288) +Problem: Compiler warnings for uninitialized variables. (Tony Mechelynck) +Solution: Initialize the variables. +Files: src/screen.c + +Patch 7.3.1292 +Problem: Possibly using invalid pointer when searching for window. (Raichoo) +Solution: Use "firstwin" instead of "tp_firstwin" for current tab. +Files: src/window.c + +Patch 7.3.1293 +Problem: Put in empty buffer cannot be undone. +Solution: Save one more line for undo. (Ozaki) +Files: src/ops.c + +Patch 7.3.1294 +Problem: ":diffoff" resets options. +Solution: Save and restore option values. (Christian Brabandt) +Files: src/diff.c, src/structs.h, src/option.c + +Patch 7.3.1295 +Problem: glob() and globpath() do not handle escaped special characters + properly. +Solution: Handle escaped characters differently. (Adnan Zafar) +Files: src/testdir/Makefile, src/testdir/test97.in, + src/testdir/test97.ok, src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mms, src/fileio.c, + src/misc1.c + +Patch 7.3.1296 +Problem: Only MS-Windows limits the GUI window size to what fits on the + monitor. +Solution: Limit the size for all systems. (Daniel Harding) +Files: src/ui.c + +Patch 7.3.1297 +Problem: findfile() directory matching does not work when a star follows + text. (Markus Braun) +Solution: Make a wildcard work properly. (Christian Brabandt) +Files: src/misc2.c, src/testdir/test89.in, src/testdir/test89.ok + +Patch 7.3.1298 (after 7.3.1297) +Problem: Crash. +Solution: Use STRCPY() instead of STRCAT() and allocate one more byte. +Files: src/misc2.c + +Patch 7.3.1299 +Problem: Errors when doing "make proto". Didn't do "make depend" for a + while. +Solution: Add #ifdefs. Update dependencies. Update proto files. +Files: src/if_python3.c, src/os_win32.c, src/Makefile, + src/proto/ex_docmd.pro, src/proto/if_python.pro, + src/proto/if_python3.pro, src/proto/gui_w16.pro, + src/proto/gui_w32.pro, src/proto/os_win32.pro + +Patch 7.3.1300 +Problem: Mac: tiny and small build fails. +Solution: Don't include os_macosx.m in tiny build. Include mouse support in + small build. (Kazunobu Kuriyama) +Files: src/configure.in, src/auto/configure, src/vim.h + +Patch 7.3.1301 +Problem: Some tests fail on MS-Windows. +Solution: Fix path separators in test 89 and 96. Omit test 97, escaping + works differently. Make findfile() work on MS-Windows. +Files: src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/test89.in, + src/testdir/test96.in, src/misc2.c + +Patch 7.3.1302 +Problem: Test 17 fails on MS-Windows. Includes line break in file name + everywhere. +Solution: Fix 'fileformat'. Omit CR-LF from a line read from an included + file. +Files: src/search.c, src/testdir/test17.in, src/testdir/test17.ok + +Patch 7.3.1303 (after 7.3.1290) +Problem: Undo is synced whenever CTRL-R = is called, breaking some plugins. +Solution: Only break undo when calling setline() or append(). +Files: src/globals.h, src/eval.c, src/edit.c, src/testdir/test61.in, + src/testdir/test61.ok + +Patch 7.3.1304 +Problem: Test 89 still fails on MS-Windows. +Solution: Set 'shellslash'. (Taro Muraoka) +Files: src/testdir/test89.in + +Patch 7.3.1305 +Problem: Warnings from 64 bit compiler. +Solution: Add type casts. +Files: src/misc2.c + +Patch 7.3.1306 +Problem: When redrawing the screen during startup the intro message may be + cleared. +Solution: Redisplay the intro message when appropriate. +Files: src/screen.c, src/version.c, src/proto/version.pro + +Patch 7.3.1307 +Problem: MS-Windows build instructions are outdated. +Solution: Adjust for building on Windows 7. Drop Windows 95/98/ME support. +Files: Makefile, nsis/gvim.nsi + +Patch 7.3.1308 +Problem: Typos in MS-Windows build settings and README. +Solution: Minor changes to MS-Windows files. +Files: src/msvc2008.bat, src/msvc2010.bat, src/VisVim/README_VisVim.txt + +Patch 7.3.1309 +Problem: When a script defines a function the flag to wait for the user to + hit enter is reset. +Solution: Restore the flag. (Yasuhiro Matsumoto) Except when the user was + typing the function. +Files: src/eval.c + +Patch 7.3.1310 +Problem: Typos in nsis script. Can use better compression. +Solution: Fix typos. Use lzma compression. (Ken Takata) +Files: nsis/gvim.nsi + +Patch 7.3.1311 +Problem: Compiler warnings on Cygwin. +Solution: Add type casts. Add windows include files. (Ken Takata) +Files: src/mbyte.c, src/ui.c + +Patch 7.3.1312 (after 7.3.1287) +Problem: Not giving correct error messages for SystemExit(). +Solution: Move E858 into an else. (Ken Takata) +Files: src/if_py_both.h + +Patch 7.3.1313 +Problem: :py and :py3 don't work when compiled with Cygwin or MingW with 64 + bit. +Solution: Add -DMS_WIN64 to the build command. (Ken Takata) +Files: src/Make_cyg.mak, src/Make_ming.mak + +Patch 7.3.1314 +Problem: Test 87 fails with Python 3.3. +Solution: Filter the error messages. (Taro Muraoka) +Files: src/testdir/test87.in + +Patch 7.4a.001 +Problem: Script to update syntax menu is outdated. +Solution: Add the missing items. +Files: runtime/makemenu.vim + +Patch 7.4a.002 +Problem: Valgrind errors in test 89. (Simon Ruderich) +Solution: Allocate one more byte. (Dominique Pelle) +Files: src/misc2.c + +Patch 7.4a.003 +Problem: Copyright year is outdated. +Solution: Only use the first year. +Files: src/vim.rc, src/vim16.rc + +Patch 7.4a.004 +Problem: MSVC 2012 Update 3 is not recognized. +Solution: Add the version number. (Raymond Ko) +Files: src/Make_mvc.mak + +Patch 7.4a.005 +Problem: Scroll binding causes unexpected scroll. +Solution: Store the topline after updating scroll binding. Add a test. + (Lech Lorens) +Files: src/testdir/test98.in, src/testdir/test98a.in, + src/testdir/test98.ok, src/option.c, src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mms, + src/testdir/Makefile + +Patch 7.4a.006 +Problem: Failure in po file check goes unnoticed. +Solution: Fail "make test" if the po file check fails. +Files: src/Makefile + +Patch 7.4a.007 +Problem: After "g$" with 'virtualedit' set, "k" moves to a different + column. (Dimitar Dimitrov) +Solution: Set w_curswant. (Christian Brabandt) +Files: src/normal.c + +Patch 7.4a.008 +Problem: Python 3 doesn't handle multibyte characters properly when + 'encoding' is not utf-8. +Solution: Use PyUnicode_Decode() instead of PyUnicode_FromString(). (Ken + Takata) +Files: src/if_python3.c + +Patch 7.4a.009 +Problem: Compiler warnings for function prototypes. +Solution: Add "void". Move list_features() prototype. (Ken Takata) +Files: src/gui_w48.c, src/if_py_both.h, src/version.c + +Patch 7.4a.010 +Problem: Test 86 and 87 fail when building with Python or Python 3 and + using a static library. +Solution: Add configure check to add -fPIE compiler flag. +Files: src/configure.in, src/auto/configure + +Patch 7.4a.011 +Problem: Configure check for Python 3 config name isn't right. +Solution: Always include vi_cv_var_python3_version. (Tim Harder) +Files: src/configure.in, src/auto/configure + +Patch 7.4a.012 +Problem: "make test" fails when using a shadow directory. +Solution: Create links for files in src/po. (James McCoy) +Files: src/Makefile + +Patch 7.4a.013 +Problem: Setting/resetting 'lbr' in the main help file changes alignment + after a Tab. (Dimitar Dimitrov) +Solution: Also use the code for conceal mode where n_extra is computed for + 'lbr'. +Files: src/screen.c, src/testdir/test88.in, src/testdir/test88.ok + +Patch 7.4a.014 +Problem: Test 86 and 89 have a problem with using a shadow dir. +Solution: Adjust for the different directory structure. (James McCoy) +Files: src/testdir/test89.in, src/testdir/test86.in, src/Makefile + +Patch 7.4a.015 +Problem: No Japanese man pages. +Solution: Add Japanese translations of man pages. (Ken Takata, Yukihiro + Nakadaira, et al.) +Files: Filelist, src/Makefile, runtime/doc/evim-ja.UTF-8.1, + runtime/doc/vim-ja.UTF-8.1, runtime/doc/vimdiff-ja.UTF-8.1, + runtime/doc/vimtutor-ja.UTF-8.1, runtime/doc/xxd-ja.UTF-8.1 + +Patch 7.4a.016 (after 7.4a.014) +Problem: Features enabled in Makefile. +Solution: Undo accidental changes. +Files: src/Makefile + +Patch 7.4a.017 +Problem: When 'foldmethod' is "indent", using ">>" on a line just above a + fold makes the cursor line folded. (Evan Laforge) +Solution: Call foldOpenCursor(). (Christian Brabandt) +Files: src/ops.c + +Patch 7.4a.018 +Problem: Compiler warning for code unreachable. (Charles Campbell) +Solution: Use "while" instead of endless loop. Change break to continue. +Files: src/regexp_nfa.c, src/ui.c + +Patch 7.4a.019 +Problem: Invalid closing parenthesis in test 62. Command truncated at + double quote. +Solution: Remove the parenthesis. Change double quote to ''. (ZyX) +Files: src/testdir/test62.in, src/testdir/test62.ok + +Patch 7.4a.020 +Problem: Superfluous mb_ptr_adv(). +Solution: Remove the call. (Dominique Pelle) +Files: src/regexp_nfa.c + +Patch 7.4a.021 +Problem: Using feedkeys() doesn't always work. +Solution: Omit feedkeys(). (Ken Takata) +Files: src/testdir/test98a.in + +Patch 7.4a.022 +Problem: Using "d2g$" does not delete the last character. (ZyX) +Solution: Set the "inclusive" flag properly. +Files: src/normal.c + +Patch 7.4a.023 (after 7.4a.019) +Problem: Still another superfluous parenthesis. (ZyX) +Solution: Remove it. +Files: src/testdir/test62.in + +Patch 7.4a.024 +Problem: X11 GUI: Checking icon height twice. +Solution: Check height and width. (Dominique Pelle) +Files: src/gui_x11.c + +Patch 7.4a.025 +Problem: Get the press-Enter prompt even after using :redraw. +Solution: Clear need_wait_return when executing :redraw. +Files: src/ex_docmd.c + +Patch 7.4a.026 +Problem: ":diffoff" does not remove folds. (Ramel) +Solution: Do not restore 'foldenable' when 'foldmethod' is "manual". +Files: src/diff.c + +Patch 7.4a.027 +Problem: When Python adds lines to another buffer the cursor position is + wrong, it might be below the last line causing ml_get errors. + (Vlad Irnov) +Solution: Temporarily change the current window, so that marks are corrected + properly. +Files: src/if_py_both.h, src/window.c, src/proto/buffer.pro + +Patch 7.4a.028 +Problem: Crash when spell checking in new buffer. +Solution: Set the b_p_key field. (Mike Williams) +Files: src/spell.c, src/testdir/test58.in + +Patch 7.4a.029 +Problem: Can't build with MzScheme on Ubuntu 13.04. +Solution: Add configure check for the "ffi" library. +Files: src/configure.in, src/auto/configure + +Patch 7.4a.030 (after 7.4.027) +Problem: Missing find_win_for_buf(). (toothpik) +Solution: Add missing changes. +Files: src/buffer.c + +Patch 7.4a.031 +Problem: Compiler warnings. (Charles Campbell) +Solution: Initialize variables even when not needed. +Files: src/regexp_nfa.c, src/search.c + +Patch 7.4a.032 +Problem: New regexp engine: Does not match shorter alternative. (Ingo + Karkat) +Solution: Do not drop a new state when the PIM info is different. +Files: src/regexp_nfa.c + +Patch 7.4a.033 +Problem: Test 98 always passes. +Solution: Include test98a.in in test98.in, execute the crucial command in + one line. (Yukihiro Nakadaira) +Files: src/testdir/test98.in, src/testdir/test98a.in + +Patch 7.4a.034 +Problem: The tabline may flicker when opening a new tab after 7.3.759 on + Win32. +Solution: Move call to TabCtrl_SetCurSel(). (Ken Takata) +Files: src/gui_w48.c + +Patch 7.4a.035 +Problem: Fix in patch 7.4a.032 is not tested. +Solution: Add test. +Files: src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.4a.036 +Problem: "\p" in a regexp does not match double-width characters. + (Yukihiro Nakadaira) +Solution: Don't count display cells, use vim_isprintc(). +Files: src/regexp.c, src/regexp_nfa.c, src/testdir/test64.in, + src/testdir/test64.ok, src/testdir/test95.in, + src/testdir/test95.ok + +Patch 7.4a.037 +Problem: Win32: When mouse is hidden and in the toolbar, moving it won't + make it appear. (Sami Salonen) +Solution: Add tabline_wndproc() and toolbar_wndproc(). (Ken Takata) +Files: src/gui_w32.c, src/gui_w48.c + +Patch 7.4a.038 +Problem: When using MSVC 2012 there are various issues, including GUI size + computations. +Solution: Use SM_CXPADDEDBORDER. (Mike Williams) +Files: src/gui_w32.c, src/gui_w48.c, src/os_win32.h + +Patch 7.4a.039 +Problem: New regexp engine doesn't match pattern. (Ingo Karkat) +Solution: When adding a state also check for different PIM if the list of + states has any state with a PIM. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.4a.040 +Problem: Win32: using uninitialized variable. +Solution: (Yukihiro Nakadaira) +Files: src/os_win32.c + +Patch 7.4a.041 +Problem: When using ":new ++ff=unix" and "dos" is first in 'fileformats' + then 'ff' is set to "dos" instead of "unix". (Ingo Karkat) +Solution: Create set_file_options() and invoke it from do_ecmd(). +Files: src/fileio.c, src/proto/fileio.pro, src/ex_cmds.c, + src/testdir/test91.in, src/testdir/test91.ok + +Patch 7.4a.042 +Problem: Crash when BufUnload autocommands close all buffers. (Andrew + Pimlott) +Solution: Set curwin->w_buffer to curbuf to avoid NULL. +Files: src/window.c, src/testdir/test8.in, src/testdir/test8.ok + +Patch 7.4a.043 +Problem: More ml_get errors when adding or deleting lines from Python. + (Vlad Irnov) +Solution: Switch to a window with the buffer when possible. +Files: src/if_py_both.h + +Patch 7.4a.044 +Problem: Test 96 sometimes fails. +Solution: Clear window from b_wininfo in win_free(). (Suggestion by + Yukihiro Nakadaira) +Files: src/window.c + +Patch 7.4a.045 +Problem: Configure does not always find the right library for Lua. Missing + support for LuaJit. +Solution: Improve the configure detection of Lua. (Hiroshi Shirosaki) +Files: src/Makefile, src/configure.in, src/auto/configure + +Patch 7.4a.046 +Problem: Can't build without mbyte feature. +Solution: Add #ifdefs. +Files: src/ex_cmds.c + +Patch 7.4a.047 +Problem: Some comments are not so nice. +Solution: Change the comments. +Files: src/ex_docmd.c, src/message.c, src/ops.c, src/option.c + +Patch 7.4b.001 +Problem: Win32: dialog may extend off-screen. +Solution: Reduce the size, use correct borders. (Andrei Olsen) +Files: src/gui_w32.c + +Patch 7.4b.002 +Problem: Crash searching for \%(\%(\|\d\|-\|\.\)*\|\*\). (Marcin + Szamotulski) Also for \(\)*. +Solution: Do add a state for opening parenthesis, so that we can check if it + was added before at the same position. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.4b.003 +Problem: Regexp code is not nicely aligned. +Solution: Adjust white space. (Ken Takata) +Files: src/regexp_nfa.c + +Patch 7.4b.004 +Problem: Regexp crash on pattern "@\%[\w\-]*". (Axel Kielhorn) +Solution: Add \%(\) around \%[] internally. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + +Patch 7.4b.005 +Problem: Finding %s in shellpipe and shellredir does not ignore %%s. +Solution: Skip over %%. (lcd 47) +Files: src/ex_cmds.c + +Patch 7.4b.006 (after 7.3.1295) +Problem: Using \{n,m} in an autocommand pattern no longer works. + Specifically, mutt temp files are not recognized. (Gary Johnson) +Solution: Make \\\{n,m\} work. +Files: runtime/doc/autocmd.txt, src/fileio.c + +Patch 7.4b.007 +Problem: On 32 bit MS-Windows :perldo does not work. +Solution: Make sure time_t uses 32 bits. (Ken Takata) +Files: src/if_perl.xs, src/vim.h + +Patch 7.4b.008 +Problem: 'autochdir' causes setbufvar() to change the current directory. + (Ben Fritz) +Solution: When disabling autocommands also reset 'acd' temporarily. + (Christian Brabandt) +Files: src/fileio.c + +Patch 7.4b.009 +Problem: When setting the Visual area manually and 'selection' is + exclusive, a yank includes one character too much. (Ingo Karkat) +Solution: Default the Visual operation to "v". (Christian Brabandt) +Files: src/mark.c + +Patch 7.4b.010 +Problem: Win32: Tcl library load does not use standard mechanism. +Solution: Call vimLoadLib() instead of LoadLibraryEx(). (Ken Takata) +Files: src/if_perl.xs, src/if_tcl.c + +Patch 7.4b.011 +Problem: ":he \%(\)" does not work. (ZyX) +Solution: Add an exception to the list. +Files: src/ex_cmds.c + +Patch 7.4b.012 +Problem: Output from a shell command is truncated at a NUL. (lcd 47) +Solution: Change every NUL into an SOH. +Files: src/misc1.c + +Patch 7.4b.013 +Problem: Install dir for JP man pages is wrong. +Solution: Remove ".UTF-8" from the directory name. (Ken Takata) +Files: src/Makefile + +Patch 7.4b.014 (after 7.4b.012) +Problem: Stupid mistake. +Solution: Changle "len" to "i". +Files: src/misc1.c + +Patch 7.4b.015 (after 7.4b.008) +Problem: Can't compile without the 'acd' feature. +Solution: Add #ifdefs. (Kazunobu Kuriyama) +Files: src/fileio.c + +Patch 7.4b.016 +Problem: Ruby detection fails on Fedora 19. +Solution: Use one way to get the Ruby version. (Michael Henry) +Files: src/configure.in, src/auto/configure + +Patch 7.4b.017 +Problem: ":he \^x" gives a strange error message. (glts) +Solution: Do not translate \^x to \_CTRL-x. +Files: src/ex_cmds.c + +Patch 7.4b.018 (after 7.4b.001) +Problem: Win32: Dialog can still be too big. +Solution: Move the check for height further down. (Andrei Olsen) +Files: src/gui_w32.c + +Patch 7.4b.019 (after 7.4a.034) +Problem: Tabline is not updated properly when closing a tab on Win32. +Solution: Only reduce flickering when adding a tab. (Ken Takata) +Files: src/gui_w48.c + +Patch 7.4b.020 +Problem: "g~ap" changes first character of next paragraph. (Manuel Ortega) +Solution: Avoid subtracting (0 - 1) from todo. (Mike Williams) +Files: src/ops.c, src/testdir/test82.in, src/testdir/test82.ok + +Patch 7.4b.021 +Problem: Pressing "u" after an external command results in multiple + press-enter messages. (glts) +Solution: Don't call hit_return_msg() when we have K_IGNORE. (Christian + Brabandt) +Files: src/message.c + +Patch 7.4b.022 +Problem: Not waiting for a character when the tick count overflows. +Solution: Subtract the unsigned numbers and cast to int. (Ken Takata) +Files: src/os_win32.c + + + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/vi_diff.txt b/runtime/doc/vi_diff.txt new file mode 100644 index 0000000000..aadbf9b419 --- /dev/null +++ b/runtime/doc/vi_diff.txt @@ -0,0 +1,1012 @@ +*vi_diff.txt* For Vim version 7.4. Last change: 2013 Aug 22 + + + VIM REFERENCE MANUAL by Bram Moolenaar + + +Differences between Vim and Vi *vi-differences* + +Throughout the help files differences between Vim and Vi/Ex are given in +curly braces, like "{not in Vi}". This file only lists what has not been +mentioned in other files and gives an overview. + +Vim is mostly POSIX 1003.2-1 compliant. The only command known to be missing +is ":open". There are probably a lot of small differences (either because Vim +is missing something or because Posix is beside the mark). + +1. Simulated command |simulated-command| +2. Missing options |missing-options| +3. Limits |limits| +4. The most interesting additions |vim-additions| +5. Other vim features |other-features| +6. Command-line arguments |cmdline-arguments| +7. POSIX compliance |posix-compliance| + +============================================================================== +1. Simulated command *simulated-command* + +This command is in Vi, but Vim only simulates it: + + *:o* *:op* *:open* +:[range]o[pen] Works like |:visual|: end Ex mode. + {Vi: start editing in open mode} + +:[range]o[pen] /pattern/ As above, additionally move the cursor to the + column where "pattern" matches in the cursor + line. + +Vim does not support open mode, since it's not really useful. For those +situations where ":open" would start open mode Vim will leave Ex mode, which +allows executing the same commands, but updates the whole screen instead of +only one line. + +============================================================================== +2. Missing options *missing-options* + +These options are in the Unix Vi, but not in Vim. If you try to set one of +them you won't get an error message, but the value is not used and cannot be +printed. + +autoprint (ap) boolean (default on) *'autoprint'* *'ap'* +beautify (bf) boolean (default off) *'beautify'* *'bf'* +flash (fl) boolean (default ??) *'flash'* *'fl'* +graphic (gr) boolean (default off) *'graphic'* *'gr'* +hardtabs (ht) number (default 8) *'hardtabs'* *'ht'* + number of spaces that a <Tab> moves on the display +mesg boolean (default on) *'mesg'* +novice boolean (default off) *'novice'* +open boolean (default on) *'open'* +optimize (op) boolean (default off) *'optimize'* *'op'* +redraw boolean (default off) *'redraw'* +slowopen (slow) boolean (default off) *'slowopen'* *'slow'* +sourceany boolean (default off) *'sourceany'* +w300 number (default 23) *'w300'* +w1200 number (default 23) *'w1200'* +w9600 number (default 23) *'w9600'* + +============================================================================== +3. Limits *limits* + +Vim has only a few limits for the files that can be edited {Vi: can not handle +<Nul> characters and characters above 128, has limited line length, many other +limits}. + *E340* +Maximum line length On machines with 16-bit ints (Amiga and MS-DOS real + mode): 32767, otherwise 2147483647 characters. + Longer lines are split. +Maximum number of lines 2147483647 lines. +Maximum file size 2147483647 bytes (2 Gbyte) when a long integer is + 32 bits. Much more for 64 bit longs. Also limited + by available disk space for the |swap-file|. + *E75* +Length of a file path Unix and Win32: 1024 characters, otherwise 256 + characters (or as much as the system supports). +Length of an expanded string option + Unix and Win32: 1024 characters, otherwise 256 + characters +Maximum display width Unix and Win32: 1024 characters, otherwise 255 + characters +Maximum lhs of a mapping 50 characters. +Number of different highlighting types: over 30000 +Range of a Number variable: -2147483648 to 2147483647 (might be more on 64 + bit systems) +Maximum length of a line in a tags file: 512 bytes. + +Information for undo and text in registers is kept in memory, thus when making +(big) changes the amount of (virtual) memory available limits the number of +undo levels and the text that can be kept in registers. Other things are also +kept in memory: Command-line history, error messages for Quickfix mode, etc. + +Memory usage limits +------------------- + +The option 'maxmem' ('mm') is used to set the maximum memory used for one +buffer (in kilobytes). 'maxmemtot' is used to set the maximum memory used for +all buffers (in kilobytes). The defaults depend on the system used. For the +Amiga and MS-DOS, 'maxmemtot' is set depending on the amount of memory +available. +These are not hard limits, but tell Vim when to move text into a swap file. +If you don't like Vim to swap to a file, set 'maxmem' and 'maxmemtot' to a +very large value. The swap file will then only be used for recovery. If you +don't want a swap file at all, set 'updatecount' to 0, or use the "-n" +argument when starting Vim. + +============================================================================== +4. The most interesting additions *vim-additions* + +Vi compatibility. |'compatible'| + Although Vim is 99% Vi compatible, some things in Vi can be + considered to be a bug, or at least need improvement. But still, Vim + starts in a mode which behaves like the "real" Vi as much as possible. + To make Vim behave a little bit better, try resetting the 'compatible' + option: + :set nocompatible + Or start Vim with the "-N" argument: + vim -N + Vim starts with 'nocompatible' automatically if you have a .vimrc + file. See |startup|. + The 'cpoptions' option can be used to set Vi compatibility on/off for + a number of specific items. + +Support for different systems. + Vim can be used on: + - All Unix systems (it works on all systems it was tested on, although + the GUI and Perl interface may not work everywhere). + - Amiga (500, 1000, 1200, 2000, 3000, 4000, ...). + - MS-DOS in real-mode (no additional drivers required). + - In protected mode on Windows 3.1 and MS-DOS (DPMI driver required). + - Windows 95 and Windows NT, with support for long file names. + - OS/2 (needs emx.dll) + - Atari MiNT + - VMS + - BeOS + - Macintosh + - Risc OS + - IBM OS/390 + Note that on some systems features need to be disabled to reduce + resource usage, esp. on MS-DOS. For some outdated systems you need to + use an older Vim version. + +Multi level undo. |undo| + 'u' goes backward in time, 'CTRL-R' goes forward again. Set option + 'undolevels' to the number of changes to be remembered (default 1000). + Set 'undolevels' to 0 for a Vi-compatible one level undo. Set it to + -1 for no undo at all. + When all changes in a buffer have been undone, the buffer is not + considered changed anymore. You can exit it with :q, without <!>. + When undoing a few changes and then making a new change Vim will + create a branch in the undo tree. This means you can go back to any + state of the text, there is no risk of a change causing text to be + lost forever. |undo-tree| + +Graphical User Interface (GUI). |gui| + Included support for GUI: menu's, mouse, scrollbars, etc. You can + define your own menus. Better support for CTRL/SHIFT/ALT keys in + combination with special keys and mouse. Supported for various + platforms, such as X11 (with Motif and Athena interfaces), GTK, Win32 + (Windows 95 and later), BeOS, Amiga and Macintosh. + +Multiple windows and buffers. |windows.txt| + Vim can split the screen into several windows, each editing a + different buffer or the same buffer at a different location. Buffers + can still be loaded (and changed) but not displayed in a window. This + is called a hidden buffer. Many commands and options have been added + for this facility. + Vim can also use multiple tab pages, each with one or more windows. A + line with tab labels can be used to quickly switch between these pages. + |tab-page| + +Syntax highlighting. |:syntax| + Vim can highlight keywords, patterns and other things. This is + defined by a number of |:syntax| commands, and can be made to + highlight most languages and file types. A number of files are + included for highlighting the most common languages, like C, C++, + Java, Pascal, Makefiles, shell scripts, etc. The colors used for + highlighting can be defined for ordinary terminals, color terminals + and the GUI with the |:highlight| command. A convenient way to do + this is using a |:colorscheme| command. + The highlighted text can be exported as HTML. |convert-to-HTML| + Other items that can be highlighted are matches with the search string + |'hlsearch'|, matching parens |matchparen| and the cursor line and + column |'cursorline'| |'cursorcolumn'|. + +Spell checking. |spell| + When the 'spell' option is set Vim will highlight spelling mistakes. + About 50 languages are currently supported, selected with the + 'spelllang' option. In source code only comments and strings are + checked for spelling. + +Folding. |folding| + A range of lines can be shown as one "folded" line. This allows + overviewing a file and moving blocks of text around quickly. + Folds can be created manually, from the syntax of the file, by indent, + etc. + +Diff mode. |diff| + Vim can show two versions of a file with the differences highlighted. + Parts of the text that are equal are folded away. Commands can be + used to move text from one version to the other. + +Plugins. |add-plugin| + The functionality can be extended by dropping a plugin file in the + right directory. That's an easy way to start using Vim scripts + written by others. Plugins can be for all kind of files, or + specifically for a filetype. + +Repeat a series of commands. |q| + "q{c}" starts recording typed characters into named register {c}. + A subsequent "q" stops recording. The register can then be executed + with the "@{c}" command. This is very useful to repeat a complex + action. + +Flexible insert mode. |ins-special-special| + The arrow keys can be used in insert mode to move around in the file. + This breaks the insert in two parts as far as undo and redo is + concerned. + + CTRL-O can be used to execute a single Normal mode command. This is + almost the same as hitting <Esc>, typing the command and doing |a|. + +Visual mode. |Visual-mode| + Visual mode can be used to first highlight a piece of text and then + give a command to do something with it. This is an (easy to use) + alternative to first giving the operator and then moving to the end of + the text to be operated upon. + |v| and |V| are used to start Visual mode. |v| works on characters + and |V| on lines. Move the cursor to extend the Visual area. It is + shown highlighted on the screen. By typing "o" the other end of the + Visual area can be moved. The Visual area can be affected by an + operator: + d delete + c change + y yank + > or < insert or delete indent + ! filter through external program + = filter through indent + : start |:| command for the Visual lines. + gq format text to 'textwidth' columns + J join lines + ~ swap case + u make lowercase + U make uppercase + +Block operators. |visual-block| + With Visual mode a rectangular block of text can be selected. Start + Visual mode with CTRL-V. The block can be deleted ("d"), yanked ("y") + or its case can be changed ("~", "u" and "U"). A deleted or yanked + block can be put into the text with the "p" and "P" commands. + +Help system. |:help| + Help is displayed in a window. The usual commands can be used to + move around, search for a string, etc. Tags can be used to jump + around in the help files, just like hypertext links. The |:help| + command takes an argument to quickly jump to the info on a subject. + <F1> is the quick access to the help system. The name of the help + index file can be set with the 'helpfile' option. + +Command-line editing and history. |cmdline-editing| + You can insert or delete at any place in the command-line using the + cursor keys. The right/left cursor keys can be used to move + forward/backward one character. The shifted right/left cursor keys + can be used to move forward/backward one word. CTRL-B/CTRL-E can be + used to go to the begin/end of the command-line. + |cmdline-history| + The command-lines are remembered. The up/down cursor keys can be used + to recall previous command-lines. The 'history' option can be set to + the number of lines that will be remembered. There is a separate + history for commands and for search patterns. + +Command-line completion. |cmdline-completion| + While entering a command-line (on the bottom line of the screen) + <Tab> can be typed to complete + what example ~ + - command :e<Tab> + - tag :ta scr<Tab> + - option :set sc<Tab> + - option value :set hf=<Tab> + - file name :e ve<Tab> + - etc. + + If there are multiple matches, CTRL-N (next) and CTRL-P (previous) + will walk through the matches. <Tab> works like CTRL-N, but wraps + around to the first match. + + The 'wildchar' option can be set to the character for command-line + completion, <Tab> is the default. CTRL-D can be typed after an + (incomplete) wildcard; all matches will be listed. CTRL-A will insert + all matches. CTRL-L will insert the longest common part of the + matches. + +Insert-mode completion. |ins-completion| + In Insert mode the CTRL-N and CTRL-P keys can be used to complete a + word that appears elsewhere. |i_CTRL-N| + With CTRL-X another mode is entered, through which completion can be + done for: + |i_CTRL-X_CTRL-F| file names + |i_CTRL-X_CTRL-K| words from 'dictionary' files + |i_CTRL-X_CTRL-T| words from 'thesaurus' files + |i_CTRL-X_CTRL-I| words from included files + |i_CTRL-X_CTRL-L| whole lines + |i_CTRL-X_CTRL-]| words from the tags file + |i_CTRL-X_CTRL-D| definitions or macros + |i_CTRL-X_CTRL-O| Omni completion: clever completion + specifically for a file type + etc. + +Long line support. |'wrap'| |'linebreak'| + If the 'wrap' option is off, long lines will not wrap and only part + of them will be shown. When the cursor is moved to a part that is not + shown, the screen will scroll horizontally. The minimum number of + columns to scroll can be set with the 'sidescroll' option. The |zh| + and |zl| commands can be used to scroll sideways. + Alternatively, long lines are broken in between words when the + 'linebreak' option is set. This allows editing a single-line + paragraph conveniently (e.g. when the text is later read into a DTP + program). Move the cursor up/down with the |gk| and |gj| commands. + +Text formatting. |formatting| + The 'textwidth' option can be used to automatically limit the line + length. This supplements the 'wrapmargin' option of Vi, which was not + very useful. The |gq| operator can be used to format a piece of text + (for example, |gqap| formats the current paragraph). Commands for + text alignment: |:center|, |:left| and |:right|. + +Extended search patterns. |pattern| + There are many extra items to match various text items. Examples: + A "\n" can be used in a search pattern to match a line break. + "x\{2,4}" matches "x" 2 to 4 times. + "\s" matches a white space character. + +Directory, remote and archive browsing. |netrw| + Vim can browse the file system. Simply edit a directory. Move around + in the list with the usual commands and press <Enter> to go to the + directory or file under the cursor. + This also works for remote files over ftp, http, ssh, etc. + Zip and tar archives can also be browsed. |tar| |zip| + +Edit-compile-edit speedup. |quickfix| + The |:make| command can be used to run the compilation and jump to the + first error. A file with compiler error messages is interpreted. Vim + jumps to the first error. + + Each line in the error file is scanned for the name of a file, line + number and error message. The 'errorformat' option can be set to a + list of scanf-like strings to handle output from many compilers. + + The |:cn| command can be used to jump to the next error. + |:cl| lists all the error messages. Other commands are available. + The 'makeef' option has the name of the file with error messages. + The 'makeprg' option contains the name of the program to be executed + with the |:make| command. + The 'shellpipe' option contains the string to be used to put the + output of the compiler into the errorfile. + +Finding matches in files. |:vimgrep| + Vim can search for a pattern in multiple files. This uses the + advanced Vim regexp pattern, works on all systems and also works to + search in compressed files. + +Improved indenting for programs. |'cindent'| + When the 'cindent' option is on the indent of each line is + automatically adjusted. C syntax is mostly recognized. The indent + for various styles can be set with 'cinoptions'. The keys to trigger + indenting can be set with 'cinkeys'. + + Comments can be automatically formatted. The 'comments' option can be + set to the characters that start and end a comment. This works best + for C code, but also works for e-mail (">" at start of the line) and + other types of text. The |=| operator can be used to re-indent + lines. + + For many other languages an indent plugin is present to support + automatic indenting. |30.3| + +Searching for words in included files. |include-search| + The |[i| command can be used to search for a match of the word under + the cursor in the current and included files. The 'include' option + can be set to a pattern that describes a command to include a file + (the default is for C programs). + The |[I| command lists all matches, the |[_CTRL-I| command jumps to + a match. + The |[d|, |[D| and |[_CTRL-D| commands do the same, but only for + lines where the pattern given with the 'define' option matches. + +Automatic commands. |autocommand| + Commands can be automatically executed when reading a file, writing a + file, jumping to another buffer, etc., depending on the file name. + This is useful to set options and mappings for C programs, + documentation, plain text, e-mail, etc. This also makes it possible + to edit compressed files. + +Scripts and Expressions. |expression| + Commands have been added to form up a powerful script language. + |:if| Conditional execution, which can be used for example + to set options depending on the value of $TERM. + |:while| Repeat a number of commands. + |:for| Loop over a list. + |:echo| Print the result of an expression. + |:let| Assign a value to an internal variable, option, etc. + Variable types are Number, String, List and Dictionary. + |:execute| Execute a command formed by an expression. + |:try| Catch exceptions. + etc., etc. See |eval|. + Debugging and profiling are supported. |debug-scripts| |profile| + If this is not enough, an interface is provided to |Python|, |Ruby|, + |Tcl|, |Lua|, |Perl| and |MzScheme|. + +Viminfo. |viminfo-file| + The command-line history, marks and registers can be stored in a file + that is read on startup. This can be used to repeat a search command + or command-line command after exiting and restarting Vim. It is also + possible to jump right back to where the last edit stopped with |'0|. + The 'viminfo' option can be set to select which items to store in the + .viminfo file. This is off by default. + +Printing. |printing| + The |:hardcopy| command sends text to the printer. This can include + syntax highlighting. + +Mouse support. |mouse-using| + The mouse is supported in the GUI version, in an xterm for Unix, for + BSDs with sysmouse, for Linux with gpm, for MS-DOS, and Win32. It + can be used to position the cursor, select the visual area, paste a + register, etc. + +Usage of key names. |<>| |key-notation| + Special keys now all have a name like <Up>, <End>, etc. + This name can be used in mappings, to make it easy to edit them. + +Editing binary files. |edit-binary| + Vim can edit binary files. You can change a few characters in an + executable file, without corrupting it. Vim doesn't remove NUL + characters (they are represented as <NL> internally). + |-b| command-line argument to start editing a binary file + |'binary'| Option set by |-b|. Prevents adding an <EOL> for the + last line in the file. + +Multi-language support. |multi-lang| + Files in double-byte or multi-byte encodings can be edited. There is + UTF-8 support to be able to edit various languages at the same time, + without switching fonts. |UTF-8| + Messages and menus are available in different languages. + +Move cursor beyond lines. + When the 'virtualedit' option is set the cursor can move all over the + screen, also where there is no text. This is useful to edit tables + and figures easily. + +============================================================================== +5. Other vim features *other-features* + +A random collection of nice extra features. + + +When Vim is started with "-s scriptfile", the characters read from +"scriptfile" are treated as if you typed them. If end of file is reached +before the editor exits, further characters are read from the console. + +The "-w" option can be used to record all typed characters in a script file. +This file can then be used to redo the editing, possibly on another file or +after changing some commands in the script file. + +The "-o" option opens a window for each argument. "-o4" opens four windows. + +Vi requires several termcap entries to be able to work full-screen. Vim only +requires the "cm" entry (cursor motion). + + +In command mode: + +When the 'showcmd' option is set, the command characters are shown in the last +line of the screen. They are removed when the command is finished. + +If the 'ruler' option is set, the current cursor position is shown in the +last line of the screen. + +"U" still works after having moved off the last changed line and after "u". + +Characters with the 8th bit set are displayed. The characters between '~' and +0xa0 are displayed as "~?", "~@", "~A", etc., unless they are included in the +'isprint' option. + +"][" goes to the next ending of a C function ('}' in column 1). +"[]" goes to the previous ending of a C function ('}' in column 1). + +"]f", "[f" and "gf" start editing the file whose name is under the cursor. +CTRL-W f splits the window and starts editing the file whose name is under +the cursor. + +"*" searches forward for the identifier under the cursor, "#" backward. +"K" runs the program defined by the 'keywordprg' option, with the identifier +under the cursor as argument. + +"%" can be preceded with a count. The cursor jumps to the line that +percentage down in the file. The normal "%" function to jump to the matching +brace skips braces inside quotes. + +With the CTRL-] command, the cursor may be in the middle of the identifier. + +The used tags are remembered. Commands that can be used with the tag stack +are CTRL-T, ":pop" and ":tag". ":tags" lists the tag stack. + +The 'tags' option can be set to a list of tag file names. Thus multiple +tag files can be used. For file names that start with "./", the "./" is +replaced with the path of the current file. This makes it possible to use a +tags file in the same directory as the file being edited. + +Previously used file names are remembered in the alternate file name list. +CTRL-^ accepts a count, which is an index in this list. +":files" command shows the list of alternate file names. +"#<N>" is replaced with the <N>th alternate file name in the list. +"#<" is replaced with the current file name without extension. + +Search patterns have more features. The <NL> character is seen as part of the +search pattern and the substitute string of ":s". Vi sees it as the end of +the command. + +Searches can put the cursor on the end of a match and may include a character +offset. + +Count added to "~", ":next", ":Next", "n" and "N". + +The command ":next!" with 'autowrite' set does not write the file. In vi the +file was written, but this is considered to be a bug, because one does not +expect it and the file is not written with ":rewind!". + +In Vi when entering a <CR> in replace mode deletes a character only when 'ai' +is set (but does not show it until you hit <Esc>). Vim always deletes a +character (and shows it immediately). + +Added :wnext command. Same as ":write" followed by ":next". + +The ":w!" command always writes, also when the file is write protected. In Vi +you would have to do ":!chmod +w %:S" and ":set noro". + +When 'tildeop' has been set, "~" is an operator (must be followed by a +movement command). + +With the "J" (join) command you can reset the 'joinspaces' option to have only +one space after a period (Vi inserts two spaces). + +"cw" can be used to change white space formed by several characters (Vi is +confusing: "cw" only changes one space, while "dw" deletes all white space). + +"o" and "O" accept a count for repeating the insert (Vi clears a part of +display). + +Flags after Ex commands not supported (no plans to include it). + +On non-UNIX systems ":cd" command shows current directory instead of going to +the home directory (there isn't one). ":pwd" prints the current directory on +all systems. + +After a ":cd" command the file names (in the argument list, opened files) +still point to the same files. In Vi ":cd" is not allowed in a changed file; +otherwise the meaning of file names change. + +":source!" command reads Vi commands from a file. + +":mkexrc" command writes current modified options and mappings to a ".exrc" +file. ":mkvimrc" writes to a ".vimrc" file. + +No check for "tail recursion" with mappings. This allows things like +":map! foo ^]foo". + +When a mapping starts with number, vi loses the count typed before it (e.g. +when using the mapping ":map g 4G" the command "7g" goes to line 4). This is +considered a vi bug. Vim concatenates the counts (in the example it becomes +"74G"), as most people would expect. + +The :put! command inserts the contents of a register above the current line. + +The "p" and "P" commands of vi cannot be repeated with "." when the putted +text is less than a line. In Vim they can always be repeated. + +":noremap" command can be used to enter a mapping that will not be remapped. +This is useful to exchange the meaning of two keys. ":cmap", ":cunmap" and +":cnoremap" can be used for mapping in command-line editing only. ":imap", +":iunmap" and ":inoremap" can be used for mapping in insert mode only. +Similar commands exist for abbreviations: ":noreabbrev", ":iabbrev" +":cabbrev", ":iunabbrev", ":cunabbrev", ":inoreabbrev", ":cnoreabbrev". + +In Vi the command ":map foo bar" would remove a previous mapping +":map bug foo". This is considered a bug, so it is not included in Vim. +":unmap! foo" does remove ":map! bug foo", because unmapping would be very +difficult otherwise (this is vi compatible). + +The ':' register contains the last command-line. +The '%' register contains the current file name. +The '.' register contains the last inserted text. + +":dis" command shows the contents of the yank registers. + +CTRL-O/CTRL-I can be used to jump to older/newer positions. These are the +same positions as used with the '' command, but may be in another file. The +":jumps" command lists the older positions. + +If the 'shiftround' option is set, an indent is rounded to a multiple of +'shiftwidth' with ">" and "<" commands. + +The 'scrolljump' option can be set to the minimum number of lines to scroll +when the cursor gets off the screen. Use this when scrolling is slow. + +The 'scrolloff' option can be set to the minimum number of lines to keep +above and below the cursor. This gives some context to where you are +editing. When set to a large number the cursor line is always in the middle +of the window. + +Uppercase marks can be used to jump between files. The ":marks" command lists +all currently set marks. The commands "']" and "`]" jump to the end of the +previous operator or end of the text inserted with the put command. "'[" and +"`[" do jump to the start. + +The 'shelltype' option can be set to reflect the type of shell used on the +Amiga. + +The 'highlight' option can be set for the highlight mode to be used for +several commands. + +The CTRL-A (add) and CTRL-X (subtract) commands are new. The count to the +command (default 1) is added to/subtracted from the number at or after the +cursor. That number may be decimal, octal (starts with a '0') or hexadecimal +(starts with '0x'). Very useful in macros. + +With the :set command the prefix "inv" can be used to invert boolean options. + +In both Vi and Vim you can create a line break with the ":substitute" command +by using a CTRL-M. For Vi this means you cannot insert a real CTRL-M in the +text. With Vim you can put a real CTRL-M in the text by preceding it with a +CTRL-V. + + +In Insert mode: + +If the 'revins' option is set, insert happens backwards. This is for typing +Hebrew. When inserting normal characters the cursor will not be shifted and +the text moves rightwards. Backspace, CTRL-W and CTRL-U will also work in +the opposite direction. CTRL-B toggles the 'revins' option. In replace mode +'revins' has no effect. Only when enabled at compile time. + +The backspace key can be used just like CTRL-D to remove auto-indents. + +You can backspace, CTRL-U and CTRL-W over line breaks if the 'backspace' (bs) +option includes "eol". You can backspace over the start of insert if the +'backspace' option includes "start". + +When the 'paste' option is set, a few options are reset and mapping in insert +mode and abbreviation are disabled. This allows for pasting text in windowing +systems without unexpected results. When the 'paste' option is reset, the old +option values are restored. + +CTRL-T/CTRL-D always insert/delete an indent in the current line, no matter +what column the cursor is in. + +CTRL-@ (insert previously inserted text) works always (Vi: only when typed as +first character). + +CTRL-A works like CTRL-@ but does not leave insert mode. + +CTRL-R {0-9a-z..} can be used to insert the contents of a register. + +When the 'smartindent' option is set, C programs will be better auto-indented. +With 'cindent' even more. + +CTRL-Y and CTRL-E can be used to copy a character from above/below the +current cursor position. + +After CTRL-V you can enter a three digit decimal number. This byte value is +inserted in the text as a single character. Useful for international +characters that are not on your keyboard. + +When the 'expandtab' (et) option is set, a <Tab> is expanded to the +appropriate number of spaces. + +The window always reflects the contents of the buffer (Vi does not do this +when changing text and in some other cases). + +If Vim is compiled with DIGRAPHS defined, digraphs are supported. A set of +normal digraphs is included. They are shown with the ":digraph" command. +More can be added with ":digraph {char1}{char2} {number}". A digraph is +entered with "CTRL-K {char1} {char2}" or "{char1} BS {char2}" (only when +'digraph' option is set). + +When repeating an insert, e.g. "10atest <Esc>" vi would only handle wrapmargin +for the first insert. Vim does it for all. + +A count to the "i" or "a" command is used for all the text. Vi uses the count +only for one line. "3iabc<NL>def<Esc>" would insert "abcabcabc<NL>def" in Vi +but "abc<NL>defabc<NL>defabc<NL>def" in Vim. + + +In Command-line mode: + +<Esc> terminates the command-line without executing it. In vi the command +line would be executed, which is not what most people expect (hitting <Esc> +should always get you back to command mode). To avoid problems with some +obscure macros, an <Esc> in a macro will execute the command. If you want a +typed <Esc> to execute the command like vi does you can fix this with + ":cmap ^V<Esc> ^V<CR>" + +General: + +The 'ttimeout' option is like 'timeout', but only works for cursor and +function keys, not for ordinary mapped characters. The 'timeoutlen' option +gives the number of milliseconds that is waited for. If the 'esckeys' option +is not set, cursor and function keys that start with <Esc> are not recognized +in insert mode. + +There is an option for each terminal string. Can be used when termcap is not +supported or to change individual strings. + +The 'fileformat' option can be set to select the <EOL>: "dos" <CR><NL>, "unix" +<NL> or "mac" <CR>. +When the 'fileformats' option is not empty, Vim tries to detect the type of +<EOL> automatically. The 'fileformat' option is set accordingly. + +On systems that have no job control (older Unix systems and non-Unix systems) +the CTRL-Z, ":stop" or ":suspend" command starts a new shell. + +If Vim is started on the Amiga without an interactive window for output, a +window is opened (and :sh still works). You can give a device to use for +editing with the |-d| argument, e.g. "-d con:20/20/600/150". + +The 'columns' and 'lines' options are used to set or get the width and height +of the display. + +Option settings are read from the first and last few lines of the file. +Option 'modelines' determines how many lines are tried (default is 5). Note +that this is different from the Vi versions that can execute any Ex command +in a modeline (a major security problem). |trojan-horse| + +If the 'insertmode' option is set (e.g. in .exrc), Vim starts in insert mode. +And it comes back there, when pressing <Esc>. + +Undo information is kept in memory. Available memory limits the number and +size of change that can be undone. This may be a problem with MS-DOS, is +hardly a problem on the Amiga and almost never with Unix and Win32. + +If the 'backup' or 'writebackup' option is set: Before a file is overwritten, +a backup file (.bak) is made. If the "backup" option is set it is left +behind. + +Vim creates a file ending in ".swp" to store parts of the file that have been +changed or that do not fit in memory. This file can be used to recover from +an aborted editing session with "vim -r file". Using the swap file can be +switched off by setting the 'updatecount' option to 0 or starting Vim with +the "-n" option. Use the 'directory' option for placing the .swp file +somewhere else. + +Vim is able to work correctly on filesystems with 8.3 file names, also when +using messydos or crossdos filesystems on the Amiga, or any 8.3 mounted +filesystem under Unix. See |'shortname'|. + +Error messages are shown at least one second (Vi overwrites error messages). + +If Vim gives the |hit-enter| prompt, you can hit any key. Characters other +than <CR>, <NL> and <Space> are interpreted as the (start of) a command. (Vi +only accepts a command starting with ':'). + +The contents of the numbered and unnamed registers is remembered when +changing files. + +The "No lines in buffer" message is a normal message instead of an error +message, since that may cause a mapping to be aborted. + +The AUX: device of the Amiga is supported. + +============================================================================== +6. Command-line arguments *cmdline-arguments* + +Different versions of Vi have different command-line arguments. This can be +confusing. To help you, this section gives an overview of the differences. + +Five variants of Vi will be considered here: + Elvis Elvis version 2.1b + Nvi Nvi version 1.79 + Posix Posix 1003.2 + Vi Vi version 3.7 (for Sun 4.1.x) + Vile Vile version 7.4 (incomplete) + Vim Vim version 5.2 + +Only Vim is able to accept options in between and after the file names. + ++{command} Elvis, Nvi, Posix, Vi, Vim: Same as "-c {command}". + +- Nvi, Posix, Vi: Run Ex in batch mode. + Vim: Read file from stdin (use -s for batch mode). + +-- Vim: End of options, only file names are following. + +--cmd {command} Vim: execute {command} before sourcing vimrc files. + +--echo-wid Vim: GTK+ echoes the Window ID on stdout + +--help Vim: show help message and exit. + +--literal Vim: take file names literally, don't expand wildcards. + +--nofork Vim: same as |-f| + +--noplugin[s] Vim: Skip loading plugins. + +--remote Vim: edit the files in another Vim server + +--remote-expr {expr} Vim: evaluate {expr} in another Vim server + +--remote-send {keys} Vim: send {keys} to a Vim server and exit + +--remote-silent {file} Vim: edit the files in another Vim server if possible + +--remote-wait Vim: edit the files in another Vim server and wait for it + +--remote-wait-silent Vim: like --remote-wait, no complaints if not possible + +--role {role} Vim: GTK+ 2: set role of main window + +--serverlist Vim: Output a list of Vim servers and exit + +--servername {name} Vim: Specify Vim server name + +--socketid {id} Vim: GTK window socket to run Vim in + +--windowid {id} Vim: Win32 window ID to run Vim in + +--version Vim: show version message and exit. + +-? Vile: print usage summary and exit. + +-a Elvis: Load all specified file names into a window (use -o for + Vim). + +-A Vim: Start in Arabic mode (when compiled with Arabic). + +-b {blksize} Elvis: Use {blksize} blocksize for the session file. +-b Vim: set 'binary' mode. + +-C Vim: Compatible mode. + +-c {command} Elvis, Nvi, Posix, Vim: run {command} as an Ex command after + loading the edit buffer. + Vim: allow up to 10 "-c" arguments + +-d {device} Vim: Use {device} for I/O (Amiga only). {only when compiled + without the |+diff| feature} +-d Vim: start with 'diff' set. |vimdiff| + +-dev {device} Vim: Use {device} for I/O (Amiga only). + +-D Vim: debug mode. + +-e Elvis, Nvi, Vim: Start in Ex mode, as if the executable is + called "ex". + +-E Vim: Start in improved Ex mode |gQ|, like "exim". + +-f Vim: Run GUI in foreground (Amiga: don't open new window). +-f {session} Elvis: Use {session} as the session file. + +-F Vim: Start in Farsi mode (when compiled with Farsi). + Nvi: Fast start, don't read the entire file when editing + starts. + +-G {gui} Elvis: Use the {gui} as user interface. + +-g Vim: Start GUI. +-g N Vile: start editing at line N + +-h Vim: Give help message. + Vile: edit the help file + +-H Vim: start Hebrew mode (when compiled with it). + +-i Elvis: Start each window in Insert mode. +-i {viminfo} Vim: Use {viminfo} for viminfo file. + +-L Vim: Same as "-r" (also in some versions of Vi). + +-l Nvi, Vi, Vim: Set 'lisp' and 'showmatch' options. + +-m Vim: Modifications not allowed to be written, resets 'write' + option. + +-M Vim: Modifications not allowed, resets 'modifiable' and the + 'write' option. + +-N Vim: No-compatible mode. + +-n Vim: No swap file used. + +-nb[args] Vim: open a NetBeans interface connection + +-O[N] Vim: Like -o, but use vertically split windows. + +-o[N] Vim: Open [N] windows, or one for each file. + +-p[N] Vim: Open [N] tab pages, or one for each file. + +-P {parent-title} Win32 Vim: open Vim inside a parent application window + +-q {name} Vim: Use {name} for quickfix error file. +-q{name} Vim: Idem. + +-R Elvis, Nvi, Posix, Vile, Vim: Set the 'readonly' option. + +-r Elvis, Nvi, Posix, Vi, Vim: Recovery mode. + +-S Nvi: Set 'secure' option. +-S {script} Vim: source script after starting up. + +-s Nvi, Posix, Vim: Same as "-" (silent mode), when in Ex mode. + Elvis: Sets the 'safer' option. +-s {scriptin} Vim: Read from script file {scriptin}; only when not in Ex + mode. +-s {pattern} Vile: search for {pattern} + +-t {tag} Elvis, Nvi, Posix, Vi, Vim: Edit the file containing {tag}. +-t{tag} Vim: Idem. + +-T {term} Vim: Set terminal name to {term}. + +-u {vimrc} Vim: Read initializations from {vimrc} file. + +-U {gvimrc} Vim: Read GUI initializations from {gvimrc} file. + +-v Nvi, Posix, Vi, Vim: Begin in Normal mode (visual mode, in Vi + terms). + Vile: View mode, no changes possible. + +-V Elvis, Vim: Verbose mode. +-V{nr} Vim: Verbose mode with specified level. + +-w {size} Elvis, Posix, Nvi, Vi, Vim: Set value of 'window' to {size}. +-w{size} Nvi, Vi: Same as "-w {size}". +-w {name} Vim: Write to script file {name} (must start with non-digit). + +-W {name} Vim: Append to script file {name}. + +-x Vi, Vim: Ask for encryption key. See |encryption|. + +-X Vim: Don't connect to the X server. + +-y Vim: Start in easy mode, like |evim|. + +-Z Vim: restricted mode + +@{cmdfile} Vile: use {cmdfile} as startup file. + +============================================================================== +7. POSIX compliance *posix* *posix-compliance* + +In 2005 the POSIX test suite was run to check the compatibility of Vim. Most +of the test was executed properly. There are the few things where Vim +is not POSIX compliant, even when run in Vi compatibility mode. + +Set the $VIM_POSIX environment variable to have 'cpoptions' include the POSIX +flags when Vim starts up. This makes Vim run as POSIX as it can. That's +a bit different from being Vi compatible. + +This is where Vim does not behave as POSIX specifies and why: + + *posix-screen-size* + The $COLUMNS and $LINES environment variables are ignored by Vim if + the size can be obtained from the terminal in a more reliable way. + Add the '|' flag to 'cpoptions' to have $COLUMNS and $LINES overrule + sizes obtained in another way. + + The "{" and "}" commands don't stop at a "{" in the original Vi, but + POSIX specifies it does. Add the '{' flag to 'cpoptions' if you want + it the POSIX way. + + The "D", "o" and "O" commands accept a count. Also when repeated. + Add the '#' flag to 'cpoptions' if you want to ignore the count. + + The ":cd" command fails if the current buffer is modified when the '.' + flag is present in 'cpoptions'. + + There is no ATTENTION message, the "A" flag is added to 'shortmess'. + +These are remarks about running the POSIX test suite: +- vi test 33 sometimes fails for unknown reasons +- vi test 250 fails; behavior will be changed in a new revision + http://www.opengroup.org/austin/mailarchives/ag-review/msg01710.html + (link no longer works, perhaps it's now: + https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=show_archive.tpl&source=L&listname=austin-review-l&id=1711) +- vi test 310 fails; exit code non-zero when any error occurred? +- ex test 24 fails because test is wrong. Changed between SUSv2 and SUSv3. +- ex tests 47, 48, 49, 72, 73 fail because .exrc file isn't read in silent + mode and $EXINIT isn't used. +- ex tests 76, 78 fail because echo is used instead of printf. (fixed) + Also: problem with \s not changed to space. +- ex test 355 fails because 'window' isn't used for "30z". +- ex test 368 fails because shell command isn't echoed in silent mode. +- ex test 394 fails because "=" command output isn't visible in silent mode. +- ex test 411 fails because test file is wrong, contains stray ':'. +- ex test 475 and 476 fail because reprint output isn't visible in silent mode. +- ex test 480 and 481 fail because the tags file has spaces instead of a tab. +- ex test 502 fails because .exrc isn't read in silent mode. +- ex test 509 fails because .exrc isn't read in silent mode. and exit code is + 1 instead of 2. +- ex test 534 fails because .exrc isn't read in silent mode. + + + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/vim-de.1 b/runtime/doc/vim-de.1 new file mode 100644 index 0000000000..0ba4938f7a --- /dev/null +++ b/runtime/doc/vim-de.1 @@ -0,0 +1,478 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.\" Translated by bw1 (2008) and Florian Rehnisch <fm-r@gmx.de> (2012) +.\" Kudos to the folks on vim-dev and debian-l10n-german +.TH VIM 1 "2006 Apr 11" +.SH BEZEICHNUNG +vim \- Vi IMproved, ein Text\-Editor für Programmierer +.SH ÜBERSICHT +.br +\fBvim\fP [Optionen] [Datei ...] +.br +\fBvim\fP [Optionen] \- +.br +\fBvim\fP [Optionen] \-t Tag +.br +\fBvim\fP [Optionen] \-q [Fehlerdatei] +.PP +.br +\fBex\fP +.br +\fBview\fP +.br +\fBgvim\fP \fBgview\fP \fBevim\fP \fBeview\fP +.br +\fBrvim\fP \fBrview\fP \fBrgvim\fP \fBrgview\fP +.SH BESCHREIBUNG +\fBVim\fP ist ein Text\-Editor, der aufwärtskompatibel zu Vi ist. Er kann +verwendet werden, um alle Arten von Klartext zu bearbeiten. Er ist besonders +nützlich, um Programme zu bearbeiten. +.PP +Vim hat einige Erweiterungen gegenüber Vi, z.B.: Rückgängigmachen in +mehreren Schritten, mehrere Fenster und Puffer, Syntax\-Hervorhebung, +Bearbeiten der Befehlszeile, Dateinamenergänzung, eingebaute Hilfe, visuelle +Auswahl, usw. ... Siehe »:help vi_diff.txt« für eine Übersicht der +Unterschiede zwischen \fBVim\fP und Vi. +.PP +Im laufenden \fBVim\fP kann mit dem Befehl »:help« viel Hilfe durch das +eingebaute Hilfesystem erlangt werden. Siehe den Abschnitt EINGEBAUTE HILFE +weiter unten. +.PP +Meistens wird \fBVim\fP zum Editieren einer einzigen Datei mit dem folgende +Befehl gestartet: +.PP + vim Datei +.PP +Allgemeiner betrachtet, wird \fBVim\fP folgendermaßen gestartet: +.PP + vim [Optionen] [Dateiliste] +.PP +Bei einer fehlenden Dateiliste startet der Editor mit einem leeren +Puffer. Andernfalls werden nach den folgenden vier Möglichkeiten eine oder +mehrere Dateien bearbeitet: +.TP 12 +Datei ... +Eine Liste von Dateinamen. Die erste Datei wird in den Puffer geladen und +zur aktuellen. Der Cursor wird auf der ersten Zeile des Puffers +platziert. Zu den anderen Dateien kann mit dem Befehl »:next« gelangt +werden. Falls einer der Dateinamen mit einem Bindestrich beginnt, stellen +Sie der Dateiliste »\-\-« voran. +.TP +\- +Die zu bearbeitende Datei wird von der Standardeingabe gelesen. Befehle +werden von der Standardfehlerausgabe gelesen, die ein Text\-Terminal sein +sollte. +.TP +\-t {Tag} +Die zu editierende Datei und die anfängliche Cursor\-Position hängen von +einem »Tag« ab, einer Art Sprungmarke. {Tag} wird in der Tag\-Datei +nachgeschlagen, die zugehörige Datei wird zur aktuellen und der zugehörige +Befehl wird ausgeführt. Dies wird meistens für Programme in der Sprache »C« +benutzt, wobei {Tag} ein Funktionsname sein könnte. Die Wirkung dieses +Befehls ist, dass die Datei, die die Funktion enthält, als aktuelle im +Editor geöffnet und angezeigt wird und der Cursor auf dem Beginn der +Funktion positioniert wird. Siehe »:help tag\-commands«. +.TP +\-q [Fehlerdatei] +Startet im QuickFix\-Modus. Die Datei [Fehlerdatei] wird gelesen und der +erste Fehler wird angezeigt. Falls [Fehlerdatei] ausgelassen wird, wird der +Dateiname aus der Option 'errorfile' verwendet (bei AmigaOS ist dies +vorgabemäßig »AztecC.Err«, sowie "errors.err« bei anderen). Weitere Fehler +können mit dem »:cn«\-Befehl angesprungen werden. Siehe ":help quickfix«. +.PP +\fBVim\fP reagiert unterschiedlich auf den Namen, der verwendet wird, um Vim zu +starten (die ausführbare Datei kann dieselbe sein). +.TP 10 +vim +der »normale« Weg, alles ist standardmäßig +.TP +ex +Startet im Ex\-Modus. Mit dem Befehl »:vi« gelangt man in den normalen +Modus. Funktioniert auch mit dem Argument »\-e«. +.TP +view +Startet im Nur\-Lesen\-Modus. Die Datei wird vor dem Überschreiben +geschützt. Dasselbe wird mit dem Parameter »\-R« erreicht. +.TP +gvim gview +Die grafische Version: Öffnet ein neues Fenster. Dasselbe wird mit dem +Parameter »\-g« erreicht. +.TP +evim eview +Die grafische Version im einfachen Modus: Öffnet ein neues Fenster. Dasselbe +wird mit dem Parameter »\-y« erreicht. +.TP +rvim rview rgvim rgview +Wie die obigen, aber mit Beschränkungen: Es ist nicht möglich, Shell\-Befehle +aufzurufen oder mit Unterbrechung in eine Shell zurückzuspringen. Dasselbe +wird mit dem Parameter »\-Z« erreicht. +.SH OPTIONEN +Die Optionen können in beliebiger Reihenfolge vor oder nach den Dateinamen +angegeben werden. Optionen ohne Parameter können hinter einem einzigen +Bindestrich gruppiert werden. +.TP 12 ++[Nummer] +In der ersten Datei wird der Cursor auf die Zeile [Nummer] gesetzt. Falls +[Nummer] nicht angegeben wird, wird der Cursor in die letzte Zeile der Datei +gesetzt. +.TP ++/{Suchmuster} +In der ersten Datei wird der Cursor auf das erste Auftreten von {Suchmuster} +gesetzt. Siehe »:help search\-pattern«. +.TP ++{Befehl} +.TP +\-c {Befehl} +{Befehl} wird nach dem Lesen der ersten Datei ausgeführt. Als {Befehl} wird +ein Ex\-Befehl erwartet. Sind in {Befehl} Leerzeichen vorhanden, muss alles +in Anführungszeichen gesetzt werden (hängt von der verwendeten Shell +ab). Beispiel: vim "+set si" main.c +.br +Anmerkung: Sie können bis zu 10 »+«\- oder "\-c«\-Befehle verwenden. +.TP +\-S {Datei} +{Datei} wird nach dem Lesen der ersten Datei ausgeführt. Dies entspricht »\-c +"source {Datei}"«. {Datei} darf nicht mit einem Bindestrich (\-) +anfangen. Wenn kein Dateiname angegeben wird, wird »Session.vim« verwendet +(Funktioniert nur, wenn »\-S« als letzter Parameter steht). +.TP +\-\-cmd {Befehl} +Wie »\-c«, aber dieser Befehl wird vor allen VimRC\-Dateien ausgeführt. Sie +können unabhängig von den »\-c«\-Befehlen bis zu 10 dieser Befehle verwenden. +.TP +\-A +Falls \fBVim\fP mit Unterstützung für das Schreiben von rechts nach links und +arabischer Tastaturbelegung compiliert wurde (ARABIC), startet dieser +Parameter den Modus fürs Arabische (:set arabic). Anderenfalls beendet sich +\fBVim\fP mit einer Fehlermeldung. +.TP +b +Binärer Modus: Es werden einige Variablen gesetzt, sodass es möglich ist, +eine binäre oder ausführbare Datei zu bearbeiten. +.TP +\-C +Kompatibel: Setzt die Option 'compatible'. Das macht \fBVim\fP im Verhalten +sehr ähnlich zu Vi, selbst wenn eine VimRC\-Datei existiert. +.TP +\-d +Startet im diff\-Modus. Es sollten zwei, drei oder vier Dateinamen als +Parameter übergeben werden. \fBVim\fP öffnet sie alle und zeigt die +Unterschiede an. Arbeitet wie vimdiff(1). +.TP +\-d {Gerät} +Öffnet das {Gerät}, um es als Terminal zu nutzen. Nur für AmigaOS. Beispiel: +"\-d con:20/30/600/150". +.TP +D +Debug\-Modus: \fBVim\fP geht in den Debug\-Modus, wenn der erste Befehl in einem +Skript ausgeführt wird. +.TP +\-e +Startet \fBVim\fP im Ex\-Modus, als würde als ausführbare Datei »ex« aufgerufen. +.TP +\-E +Startet \fBVim\fP im erweiterten Ex\-Modus, als würde die ausführbare Datei als +»exim« aufgerufen. +.TP +\-f +Vordergrund: Bei der GUI\-Version erzeugt \fBVim\fP keinen neuen Prozess und +löst sich nicht von der Shell, in der er aufgerufen wurde. Bei AmigaOS wird +kein neues Fenster geöffnet. Dieser Parameter wird benutzt, damit das +aufrufende Programm auf das Beenden des Bearbeitungssitzung wartet (z.B.: +mail). Bei AmigaOS funktionieren die Befehle »:sh« und ":!« nicht. +.TP +\-\-nofork +Vordergrund: Bei der GUI\-Version erzeugt \fBVim\fP keinen neuen Prozess und +löst sich nicht von der Shell, in der er aufgerufen wurde. +.TP +\-F +Wenn \fBVim\fP mit FKMAP\-Unterstützung für das Schreiben von rechts nach links +und Farsi\-Tastatur\-Belegung kompiliert wurde, startet Vim im Farsi\-Modus, +d.h. die Optionen 'fkmap' und 'rightleft' werden gesetzt. Andernfalls bricht +\fBVim\fP mit einer Fehlermeldung ab. +.TP +\-g +Falls \fBVim\fP mit GUI\-Unterstützung kompiliert wurde, wird die GUI +aktiviert. Falls keine GUI\-Unterstützung einkompiliert wurde, wird mit einer +Fehlermeldung abgebrochen. +.TP +\-h +Gibt eine kleine Hilfe für die Befehlszeilenparameter aus. Danach beendet +sich \fBVim.\fP +.TP +\-H +Hebräisch\-Modus, falls \fBVim\fP mit RIGHTLEFT\-Unterstützung für das Schreiben +von rechts nach links und hebräischer Tastaturbelegung kompiliert wurde, +werden die Optionen 'hkmap' und 'rightleft' gesetzt. Andernfalls beendet +sich \fBVim\fP mit einer Fehlermeldung. +.TP +\-i {VimInfo} +Wenn eine VimInfo\-Datei verwendet wird: Verwendet statt »~/.viminfo« die +angegebene Datei. Es ist auch möglich die Verwendung einer VimInfo\-Datei +durch Angabe des Dateinamen »NONE« zu verhindern, +.TP +\-L +dasselbe wie »\-r« +.TP +\-l +Lisp\-Modus. Aktiviert die Optionen 'lisp' und 'showmatch'. +.TP +\-m +Deaktiviert das Verändern von Dateien, indem die Option 'write' gelöscht +wird. Der Puffer kann verändert werden, nur das Schreiben einer Datei ist +nicht möglich. +.TP +\-M +Keine Veränderungen erlaubt: Die Optionen 'modifiable' und 'write' werden +gelöscht, so dass Änderungen nicht erlaubt sind und Dateien nicht +geschrieben werden können. Man beachte, dass diese Optionen ('modifiable', +\&'write') dennnoch nachträglich zum Erlauben von Änderungen gesetzt werden +können. +.TP +\-N +Nicht\-kompatibler Modus: Löscht die Option 'compatible'. Dies veranlasst +\fBVim\fP, sich ein wenig besser, aber weniger Vi\-kompatibel zu verhalten, +selbst wenn es keine VimRC\-Datei gibt. +.TP +\-n +Verwendet keine Auslagerungsdatei: Eine Wiederherstellung nach einem Absturz +ist nicht möglich. Auf einem langsamen Medium (Diskette) kann diese +Einstellung nützlich sein. Kann auch mit »set uc=0« erreicht werden; kann +mit »set uc=200« aufgehoben werden. +.TP +\-nb +\fBVim\fP fungiert als Server für NetBeans. Details siehe Dokumentation. +.TP +\-o[N] +Öffnet [N] Fenster übereinander. Wenn keine Zahl angegeben wird, öffne ein +Fenster pro Datei. +.TP +\-O[N] +Öffnet [N] Fenster nebeneinander. Wenn keine Zahl angegeben wird, öffne ein +Fenster pro Datei. +.TP +\-p[N] +Öffnet [N] Reiterseiten. Wenn keine Zahl angegeben wird, öffne eine +Reiterseite pro Datei. +.TP +\-R +Nur\-Lesen\-Modus: Die Option 'readonly' wird gesetzt. Der Puffer kann noch +bearbeitet werden, aber es wird verhindert, eine Datei aus Versehen zu +überschreiben. Wenn Sie wirklich eine Datei überschreiben wollen, fügen Sie +dem Ex\-Befehl ein Ausrufezeichen hinzu (wie in »:w!«). Die Option "\-R« +bedingt die Option »\-n« (siehe oben). Die Option 'readonly' kann durch ":set +noro« gelöscht werden. Siehe »:help 'readonly'«. +.TP +\-r +Listet die Auslagerungsdateien und gibt Informationen zu ihrer +Verwendbarkeit zur Wiederherstellung. +.TP +\-r {Datei} +Wiederherstellungsmodus: Die Auslagerungsdatei wird zur Wiederherstellung +verwendet und hat denselben Dateinamen wie die Text\-Datei + ».swp«. Siehe +":help recovery«. +.TP +\-s +Der stille Modus: Nur wenn die ausführbare Datei als »ex« aufgerufen wird +oder vor »\-s« die Option "\-e« gegeben wird. +.TP +\-s {Eingabeskript} +Die Datei {Eingabeskript} wird gelesen und ausgeführt, als würden Sie die +Zeichen in ihr tippen. Dasselbe kann mit dem Befehl »:source! +{Eingabeskript}« erreicht werden. Wird das Ende der Datei vor dem Beenden +des Editors erreicht, werden weitere Zeichen von der Tastatur gelesen. +.TP +\-T {Terminal} +Setzt den Namen des benutzten Terminals. Nur erforderlich, wenn die +Automatik nicht funktioniert. Sollte ein \fBVim\fP bekanntes Terminal sein: +(builtin) oder in einer termcap\- oder terminfo\-Datei definiert. +.TP +\-u {VimRC} +Verwendet zur Initialisierung die Befehle in der Datei {VimRC}. Alle anderen +Initialisierungen werden übersprungen. Benutzen Sie dies, um eine besondere +Art von Dateien zu bearbeiten. Dies kann auch benutzt werden, um alle +Initialisierungen zu überspringen, indem der Name »NONE« angegeben wird. Für +weitere Einzelheiten siehe »:help initialisation« innerhalb von Vim. +.TP +\-U {GvimRC} +Benutzt die Befehle in der Datei {GvimRC} für die Initialisierung der +grafischen Oberfläche. Alle anderen Initialisierungen werden +übersprungen. Dies kann ebenfalls benutzt werden, um alle +GUI\-Initialisierungen zu überspringen, indem der Name »NONE« angegeben +wird. Siehe »:help gui\-init« innerhalb von Vim für weitere Einzelheiten. +.TP +\-V[N] +Ausführlich (verbose): Gibt Meldungen darüber, welche Befehlsdateien +eingelesen werden, und über das Lesen und Schreiben einer VimInfo\-Datei. Die +optionale Zahl N ist der Wert für 'verbose'. Vorgabe ist 10. +.TP +\-v +Startet \fBVim\fP im Vi\-Modus, so als würde die ausführbare Datei mit »vi« +aufgerufen. Dies wirkt sich nur aus, wenn die ausführbare Datei als »ex« +aufgerufen wird. +.TP +\-w {Ausgabeskript} +Alle Zeichen, die eingetippt werden, werden in der Datei {Ausgabeskript} +aufgezeichnet, solange bis Sie \fBVim\fP beenden. Dies ist nützlich, falls Sie +eine Skript\-Datei zum Benutzen mit »vim \-s« oder ":source!« erzeugen +wollen. Falls die Datei {Ausgabeskript} vorhanden ist, werden die Zeichen +angehängt. +.TP +\-W {Ausgabeskript} +Wie \-w, aber eine bereits vorhandene Datei wird überschrieben. +.TP +\-x +Benutzt beim Schreiben von Dateien eine Verschlüsselung. Fragt nach dem +Schlüssel. +.TP +\-X +Führt keine Verbindung zum X\-Server durch. Dadurch verkürzt sich die +Startzeit, aber der Fenstertitel und die Zwischenablage werden nicht +verwendet. +.TP +\-y +Startet \fBVim\fP im einfachen Modus, als würde die ausführbare Datei mit +»evim« oder »eview« aufgerufen. \fBVim\fP verhält sich dann wie ein Editor zum +Klicken und Tippen. +.TP +\-Z +Eingeschränkter Modus: Funktioniert, als würde der Name der ausführbaren +Datei mit »r« beginnen. +.TP +\-\- +Markiert das Ende der Optionen. Argumente, die folgen, werden als Dateinamen +behandelt. Dies kann benutzt werden, um einen Dateinamen mit »\-« am Anfang +zu verwenden. +.TP +\-\-echo\-wid +Nur GTK\-GUI: Schreibe die Fenster\-ID auf die Standardausgabe. +.TP +\-\-help +Gibt eine Hilfe\-Nachricht aus und beendet, wie »\-h«. +.TP +\-\-literal +Nimmt die Dateinamen so wie sie sind und vervollständigt sie nicht nach +Metazeichen (*,?). Dies wirkt sich nicht unter Unix aus, wo die Shell die +Metazeichen expandiert. +.TP +\-\-noplugin +Lade keine Plugins. Impliziert durch »\-u NONE«. +.TP +\-\-remote +Verbindet mit einem Vim\-Server und lässt ihn die in den restlichen +Argumenten angegeben Dateien editieren. Wenn kein Server gefunden wird, +führt dies zu einer Warnmeldung und die Dateien werden im gegenwärtigen Vim +zum Bearbeiten geöffnet. +.TP +\-\-remote\-expr {Ausdruck} +Verbindet mit einem Vim\-Server, führt {Ausdruck} aus und zeigt das Ergebnis +auf der Standardausgabe an. +.TP +\-\-remote\-send {Zeichen} +Verbindet mit einem Vim\-Server und sendet ihm {Zeichen}. +.TP +\-\-remote\-silent +Wie »\-\-remote«, aber ohne Warnung, wenn kein Server gefunden wird. +.TP +\-\-remote\-wait +Wie »\-\-remote«, aber Vim beendet sich nicht, bis die Dateien bearbeitet +wurden. +.TP +\-\-remote\-wait\-silent +Wie »\-\-remote\-wait«, aber ohne Warnung, wenn kein Server gefunden wird. +.TP +\-\-serverlist +Listet die Namen aller gefundenen Vim\-Server auf. +.TP +\-\-servername {Name} +Benutzt {Name} als Server\-Namen. Wird für den gegenwärtigen Vim benutzt, +außer es wird mit dem Argument »\-\-remote« benutzt, dann ist es der Name des +zu kontaktierenden Servers. +.TP +\-\-socketid {id} +Nur GTK\-GUI: Benutzt den GtkPlug\-Mechanismus, um GVim in einem anderen +Fenster laufen zu lassen. +.TP +\-\-version +Versionsinformation anzeigen und beenden +.SH "EINGEBAUTE HILFE" +Tippen Sie in \fBVim\fP »:help«, um zu beginnen. Geben Sie ":help begriff« ein, +um Hilfe über ein bestimmtes Thema zu bekommen. Zum Beispiel »:help ZZ« für +Hilfe über den Befehl »ZZ«. Benutzen Sie <Tab> und CTRL\-D, um +Begriffe zu vervollständigen (»:help cmdline\-completion«). Tags sind +vorhanden, um von einem Ort zum anderen zu springen (eine Art +Hypertext\-Verknüpfungen, siehe »:help«). Auf diese Weise können alle +Dokumentations\-Dateien aufgerufen werden, zum Beispiel »:help syntax.txt«. +.SH DATEIEN +.TP 15 +/usr/local/lib/vim/doc/*.txt +Dokumentations\-Dateien für \fBVim\fP. Verwenden Sie »:help doc\-file\-list«, um +die gesamte Liste zu bekommen. +.TP +/usr/local/lib/vim/doc/tags +Die »Tag«\-Datei, die verwendet wird, um Informationen in der Dokumentation +zu finden. +.TP +/usr/local/lib/vim/syntax/syntax.vim +Die systemweite Einrichtung der Syntaxhervorhebung. +.TP +/usr/local/lib/vim/syntax/*.vim +Syntaxdateien für die verschiedenen Sprachen. +.TP +/usr/local/lib/vim/vimrc +Systemweite Einstellungsdatei für \fBVim\fP +.TP +~/.vimrc +Persönliche Einstellungsdatei für \fBVim\fP +.TP +/usr/local/lib/vim/gvimrc +Systemweite Einstellungsdatei für GVim +.TP +~/.gvimrc +Persönliche Einstellungsdatei für GVim +.TP +/usr/local/lib/vim/optwin.vim +Das Script, das von dem Befehl »:options« verwendet wird, eine schöne +Möglichkeit, um Optionen zu betrachten und zu setzen. +.TP +/usr/local/lib/vim/menu.vim +Systemweite Einstellungsdatei für das Menü von GVim +.TP +/usr/local/lib/vim/bugreport.vim +Das Script zum Generieren eines Fehlerberichts. Siehe »:help bugs«. +.TP +/usr/local/lib/vim/filetype.vim +Mit diesem Script erkennt Vim den Typ einer Datei anhand ihres +Dateinamens. Siehe »:help 'filetype'«. +.TP +/usr/local/lib/vim/scripts.vim +Mit diesem Script erkennt Vim den Typ einer Datei anhand ihres +Inhaltes. Siehe »:help 'filetype'«. +.TP +/usr/local/lib/vim/print/*.ps +Diese Dateien werden zum Drucken von PostScript verwendet. +.PP +Für die neuesten Informationen lesen Sie die Vim\-Homepage: +.br +<URL:http://www.vim.org/> +.SH "SIEHE AUCH" +vimtutor(1) +.SH AUTOR +\fBVim\fP wurde größtenteils von Bram Moolenaar erstellt, mit viel Hilfe von +anderen Leuten. Siehe »:help credits« in \fBVim.\fP +.br +\fBVim\fP basiert auf Stevie, der von Tim Thompson, Tony Andrews und +G.R. (Fred) Walter geschrieben wurde. Es ist jedoch kaum etwas vom +ursprünglichen Code übrig geblieben. +.SH FEHLER +Die sind möglich. Siehe »:help todo« für eine Liste bekannter Probleme. +.PP +Beachten Sie, dass gewisse Dinge, die manche Leute als Fehler betrachten +mögen, in Wirklichkeit durch zu getreue Nachbildung des Vi\-Verhaltens +verursacht werden. Und falls Sie denken, dass andere Dinge Fehler sind, +»weil Vi es anders tut«, sollten Sie einen genaueren Blick auf die Datei +vi_diff.txt werfen (oder in Vim »:help vi_diff.txt« tippen). Sehen Sie sich +auch die Optionen 'compatible' und 'cpoptions' an. diff --git a/runtime/doc/vim-de.UTF-8.1 b/runtime/doc/vim-de.UTF-8.1 new file mode 100644 index 0000000000..f79e622a74 --- /dev/null +++ b/runtime/doc/vim-de.UTF-8.1 @@ -0,0 +1,478 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.\" Translated by bw1 (2008) and Florian Rehnisch <fm-r@gmx.de> (2012) +.\" Kudos to the folks on vim-dev and debian-l10n-german +.TH VIM 1 "2006 Apr 11" +.SH BEZEICHNUNG +vim \- Vi IMproved, ein Text\-Editor für Programmierer +.SH ÜBERSICHT +.br +\fBvim\fP [Optionen] [Datei …] +.br +\fBvim\fP [Optionen] \- +.br +\fBvim\fP [Optionen] \-t Tag +.br +\fBvim\fP [Optionen] \-q [Fehlerdatei] +.PP +.br +\fBex\fP +.br +\fBview\fP +.br +\fBgvim\fP \fBgview\fP \fBevim\fP \fBeview\fP +.br +\fBrvim\fP \fBrview\fP \fBrgvim\fP \fBrgview\fP +.SH BESCHREIBUNG +\fBVim\fP ist ein Text\-Editor, der aufwärtskompatibel zu Vi ist. Er kann +verwendet werden, um alle Arten von Klartext zu bearbeiten. Er ist besonders +nützlich, um Programme zu bearbeiten. +.PP +Vim hat einige Erweiterungen gegenüber Vi, z.B.: Rückgängigmachen in +mehreren Schritten, mehrere Fenster und Puffer, Syntax\-Hervorhebung, +Bearbeiten der Befehlszeile, Dateinamenergänzung, eingebaute Hilfe, visuelle +Auswahl, usw. … Siehe »:help vi_diff.txt« für eine Übersicht der +Unterschiede zwischen \fBVim\fP und Vi. +.PP +Im laufenden \fBVim\fP kann mit dem Befehl »:help« viel Hilfe durch das +eingebaute Hilfesystem erlangt werden. Siehe den Abschnitt EINGEBAUTE HILFE +weiter unten. +.PP +Meistens wird \fBVim\fP zum Editieren einer einzigen Datei mit dem folgende +Befehl gestartet: +.PP + vim Datei +.PP +Allgemeiner betrachtet, wird \fBVim\fP folgendermaßen gestartet: +.PP + vim [Optionen] [Dateiliste] +.PP +Bei einer fehlenden Dateiliste startet der Editor mit einem leeren +Puffer. Andernfalls werden nach den folgenden vier Möglichkeiten eine oder +mehrere Dateien bearbeitet: +.TP 12 +Datei … +Eine Liste von Dateinamen. Die erste Datei wird in den Puffer geladen und +zur aktuellen. Der Cursor wird auf der ersten Zeile des Puffers +platziert. Zu den anderen Dateien kann mit dem Befehl »:next« gelangt +werden. Falls einer der Dateinamen mit einem Bindestrich beginnt, stellen +Sie der Dateiliste »\-\-« voran. +.TP +\- +Die zu bearbeitende Datei wird von der Standardeingabe gelesen. Befehle +werden von der Standardfehlerausgabe gelesen, die ein Text\-Terminal sein +sollte. +.TP +\-t {Tag} +Die zu editierende Datei und die anfängliche Cursor\-Position hängen von +einem »Tag« ab, einer Art Sprungmarke. {Tag} wird in der Tag\-Datei +nachgeschlagen, die zugehörige Datei wird zur aktuellen und der zugehörige +Befehl wird ausgeführt. Dies wird meistens für Programme in der Sprache »C« +benutzt, wobei {Tag} ein Funktionsname sein könnte. Die Wirkung dieses +Befehls ist, dass die Datei, die die Funktion enthält, als aktuelle im +Editor geöffnet und angezeigt wird und der Cursor auf dem Beginn der +Funktion positioniert wird. Siehe »:help tag\-commands«. +.TP +\-q [Fehlerdatei] +Startet im QuickFix\-Modus. Die Datei [Fehlerdatei] wird gelesen und der +erste Fehler wird angezeigt. Falls [Fehlerdatei] ausgelassen wird, wird der +Dateiname aus der Option 'errorfile' verwendet (bei AmigaOS ist dies +vorgabemäßig »AztecC.Err«, sowie „errors.err« bei anderen). Weitere Fehler +können mit dem »:cn«\-Befehl angesprungen werden. Siehe „:help quickfix«. +.PP +\fBVim\fP reagiert unterschiedlich auf den Namen, der verwendet wird, um Vim zu +starten (die ausführbare Datei kann dieselbe sein). +.TP 10 +vim +der »normale« Weg, alles ist standardmäßig +.TP +ex +Startet im Ex\-Modus. Mit dem Befehl »:vi« gelangt man in den normalen +Modus. Funktioniert auch mit dem Argument »\-e«. +.TP +view +Startet im Nur\-Lesen\-Modus. Die Datei wird vor dem Überschreiben +geschützt. Dasselbe wird mit dem Parameter »\-R« erreicht. +.TP +gvim gview +Die grafische Version: Öffnet ein neues Fenster. Dasselbe wird mit dem +Parameter »\-g« erreicht. +.TP +evim eview +Die grafische Version im einfachen Modus: Öffnet ein neues Fenster. Dasselbe +wird mit dem Parameter »\-y« erreicht. +.TP +rvim rview rgvim rgview +Wie die obigen, aber mit Beschränkungen: Es ist nicht möglich, Shell\-Befehle +aufzurufen oder mit Unterbrechung in eine Shell zurückzuspringen. Dasselbe +wird mit dem Parameter »\-Z« erreicht. +.SH OPTIONEN +Die Optionen können in beliebiger Reihenfolge vor oder nach den Dateinamen +angegeben werden. Optionen ohne Parameter können hinter einem einzigen +Bindestrich gruppiert werden. +.TP 12 ++[Nummer] +In der ersten Datei wird der Cursor auf die Zeile [Nummer] gesetzt. Falls +[Nummer] nicht angegeben wird, wird der Cursor in die letzte Zeile der Datei +gesetzt. +.TP ++/{Suchmuster} +In der ersten Datei wird der Cursor auf das erste Auftreten von {Suchmuster} +gesetzt. Siehe »:help search\-pattern«. +.TP ++{Befehl} +.TP +\-c {Befehl} +{Befehl} wird nach dem Lesen der ersten Datei ausgeführt. Als {Befehl} wird +ein Ex\-Befehl erwartet. Sind in {Befehl} Leerzeichen vorhanden, muss alles +in Anführungszeichen gesetzt werden (hängt von der verwendeten Shell +ab). Beispiel: vim "+set si" main.c +.br +Anmerkung: Sie können bis zu 10 »+«\- oder „\-c«\-Befehle verwenden. +.TP +\-S {Datei} +{Datei} wird nach dem Lesen der ersten Datei ausgeführt. Dies entspricht »\-c +"source {Datei}"«. {Datei} darf nicht mit einem Bindestrich (\-) +anfangen. Wenn kein Dateiname angegeben wird, wird »Session.vim« verwendet +(Funktioniert nur, wenn »\-S« als letzter Parameter steht). +.TP +\-\-cmd {Befehl} +Wie »\-c«, aber dieser Befehl wird vor allen VimRC\-Dateien ausgeführt. Sie +können unabhängig von den »\-c«\-Befehlen bis zu 10 dieser Befehle verwenden. +.TP +\-A +Falls \fBVim\fP mit Unterstützung für das Schreiben von rechts nach links und +arabischer Tastaturbelegung compiliert wurde (ARABIC), startet dieser +Parameter den Modus fürs Arabische (:set arabic). Anderenfalls beendet sich +\fBVim\fP mit einer Fehlermeldung. +.TP +b +Binärer Modus: Es werden einige Variablen gesetzt, sodass es möglich ist, +eine binäre oder ausführbare Datei zu bearbeiten. +.TP +\-C +Kompatibel: Setzt die Option 'compatible'. Das macht \fBVim\fP im Verhalten +sehr ähnlich zu Vi, selbst wenn eine VimRC\-Datei existiert. +.TP +\-d +Startet im diff\-Modus. Es sollten zwei, drei oder vier Dateinamen als +Parameter übergeben werden. \fBVim\fP öffnet sie alle und zeigt die +Unterschiede an. Arbeitet wie vimdiff(1). +.TP +\-d {Gerät} +Öffnet das {Gerät}, um es als Terminal zu nutzen. Nur für AmigaOS. Beispiel: +"\-d con:20/30/600/150". +.TP +D +Debug\-Modus: \fBVim\fP geht in den Debug\-Modus, wenn der erste Befehl in einem +Skript ausgeführt wird. +.TP +\-e +Startet \fBVim\fP im Ex\-Modus, als würde als ausführbare Datei »ex« aufgerufen. +.TP +\-E +Startet \fBVim\fP im erweiterten Ex\-Modus, als würde die ausführbare Datei als +»exim« aufgerufen. +.TP +\-f +Vordergrund: Bei der GUI\-Version erzeugt \fBVim\fP keinen neuen Prozess und +löst sich nicht von der Shell, in der er aufgerufen wurde. Bei AmigaOS wird +kein neues Fenster geöffnet. Dieser Parameter wird benutzt, damit das +aufrufende Programm auf das Beenden des Bearbeitungssitzung wartet (z.B.: +mail). Bei AmigaOS funktionieren die Befehle »:sh« und „:!« nicht. +.TP +\-\-nofork +Vordergrund: Bei der GUI\-Version erzeugt \fBVim\fP keinen neuen Prozess und +löst sich nicht von der Shell, in der er aufgerufen wurde. +.TP +\-F +Wenn \fBVim\fP mit FKMAP\-Unterstützung für das Schreiben von rechts nach links +und Farsi\-Tastatur\-Belegung kompiliert wurde, startet Vim im Farsi\-Modus, +d.h. die Optionen 'fkmap' und 'rightleft' werden gesetzt. Andernfalls bricht +\fBVim\fP mit einer Fehlermeldung ab. +.TP +\-g +Falls \fBVim\fP mit GUI\-Unterstützung kompiliert wurde, wird die GUI +aktiviert. Falls keine GUI\-Unterstützung einkompiliert wurde, wird mit einer +Fehlermeldung abgebrochen. +.TP +\-h +Gibt eine kleine Hilfe für die Befehlszeilenparameter aus. Danach beendet +sich \fBVim.\fP +.TP +\-H +Hebräisch\-Modus, falls \fBVim\fP mit RIGHTLEFT\-Unterstützung für das Schreiben +von rechts nach links und hebräischer Tastaturbelegung kompiliert wurde, +werden die Optionen 'hkmap' und 'rightleft' gesetzt. Andernfalls beendet +sich \fBVim\fP mit einer Fehlermeldung. +.TP +\-i {VimInfo} +Wenn eine VimInfo\-Datei verwendet wird: Verwendet statt »~/.viminfo« die +angegebene Datei. Es ist auch möglich die Verwendung einer VimInfo\-Datei +durch Angabe des Dateinamen »NONE« zu verhindern, +.TP +\-L +dasselbe wie »\-r« +.TP +\-l +Lisp\-Modus. Aktiviert die Optionen 'lisp' und 'showmatch'. +.TP +\-m +Deaktiviert das Verändern von Dateien, indem die Option 'write' gelöscht +wird. Der Puffer kann verändert werden, nur das Schreiben einer Datei ist +nicht möglich. +.TP +\-M +Keine Veränderungen erlaubt: Die Optionen 'modifiable' und 'write' werden +gelöscht, so dass Änderungen nicht erlaubt sind und Dateien nicht +geschrieben werden können. Man beachte, dass diese Optionen ('modifiable', +\&'write') dennnoch nachträglich zum Erlauben von Änderungen gesetzt werden +können. +.TP +\-N +Nicht\-kompatibler Modus: Löscht die Option 'compatible'. Dies veranlasst +\fBVim\fP, sich ein wenig besser, aber weniger Vi\-kompatibel zu verhalten, +selbst wenn es keine VimRC\-Datei gibt. +.TP +\-n +Verwendet keine Auslagerungsdatei: Eine Wiederherstellung nach einem Absturz +ist nicht möglich. Auf einem langsamen Medium (Diskette) kann diese +Einstellung nützlich sein. Kann auch mit »set uc=0« erreicht werden; kann +mit »set uc=200« aufgehoben werden. +.TP +\-nb +\fBVim\fP fungiert als Server für NetBeans. Details siehe Dokumentation. +.TP +\-o[N] +Öffnet [N] Fenster übereinander. Wenn keine Zahl angegeben wird, öffne ein +Fenster pro Datei. +.TP +\-O[N] +Öffnet [N] Fenster nebeneinander. Wenn keine Zahl angegeben wird, öffne ein +Fenster pro Datei. +.TP +\-p[N] +Öffnet [N] Reiterseiten. Wenn keine Zahl angegeben wird, öffne eine +Reiterseite pro Datei. +.TP +\-R +Nur\-Lesen\-Modus: Die Option 'readonly' wird gesetzt. Der Puffer kann noch +bearbeitet werden, aber es wird verhindert, eine Datei aus Versehen zu +überschreiben. Wenn Sie wirklich eine Datei überschreiben wollen, fügen Sie +dem Ex\-Befehl ein Ausrufezeichen hinzu (wie in »:w!«). Die Option „\-R« +bedingt die Option »\-n« (siehe oben). Die Option 'readonly' kann durch „:set +noro« gelöscht werden. Siehe »:help 'readonly'«. +.TP +\-r +Listet die Auslagerungsdateien und gibt Informationen zu ihrer +Verwendbarkeit zur Wiederherstellung. +.TP +\-r {Datei} +Wiederherstellungsmodus: Die Auslagerungsdatei wird zur Wiederherstellung +verwendet und hat denselben Dateinamen wie die Text\-Datei + ».swp«. Siehe +„:help recovery«. +.TP +\-s +Der stille Modus: Nur wenn die ausführbare Datei als »ex« aufgerufen wird +oder vor »\-s« die Option „\-e« gegeben wird. +.TP +\-s {Eingabeskript} +Die Datei {Eingabeskript} wird gelesen und ausgeführt, als würden Sie die +Zeichen in ihr tippen. Dasselbe kann mit dem Befehl »:source! +{Eingabeskript}« erreicht werden. Wird das Ende der Datei vor dem Beenden +des Editors erreicht, werden weitere Zeichen von der Tastatur gelesen. +.TP +\-T {Terminal} +Setzt den Namen des benutzten Terminals. Nur erforderlich, wenn die +Automatik nicht funktioniert. Sollte ein \fBVim\fP bekanntes Terminal sein: +(builtin) oder in einer termcap\- oder terminfo\-Datei definiert. +.TP +\-u {VimRC} +Verwendet zur Initialisierung die Befehle in der Datei {VimRC}. Alle anderen +Initialisierungen werden übersprungen. Benutzen Sie dies, um eine besondere +Art von Dateien zu bearbeiten. Dies kann auch benutzt werden, um alle +Initialisierungen zu überspringen, indem der Name »NONE« angegeben wird. Für +weitere Einzelheiten siehe »:help initialisation« innerhalb von Vim. +.TP +\-U {GvimRC} +Benutzt die Befehle in der Datei {GvimRC} für die Initialisierung der +grafischen Oberfläche. Alle anderen Initialisierungen werden +übersprungen. Dies kann ebenfalls benutzt werden, um alle +GUI\-Initialisierungen zu überspringen, indem der Name »NONE« angegeben +wird. Siehe »:help gui\-init« innerhalb von Vim für weitere Einzelheiten. +.TP +\-V[N] +Ausführlich (verbose): Gibt Meldungen darüber, welche Befehlsdateien +eingelesen werden, und über das Lesen und Schreiben einer VimInfo\-Datei. Die +optionale Zahl N ist der Wert für 'verbose'. Vorgabe ist 10. +.TP +\-v +Startet \fBVim\fP im Vi\-Modus, so als würde die ausführbare Datei mit »vi« +aufgerufen. Dies wirkt sich nur aus, wenn die ausführbare Datei als »ex« +aufgerufen wird. +.TP +\-w {Ausgabeskript} +Alle Zeichen, die eingetippt werden, werden in der Datei {Ausgabeskript} +aufgezeichnet, solange bis Sie \fBVim\fP beenden. Dies ist nützlich, falls Sie +eine Skript\-Datei zum Benutzen mit »vim \-s« oder „:source!« erzeugen +wollen. Falls die Datei {Ausgabeskript} vorhanden ist, werden die Zeichen +angehängt. +.TP +\-W {Ausgabeskript} +Wie \-w, aber eine bereits vorhandene Datei wird überschrieben. +.TP +\-x +Benutzt beim Schreiben von Dateien eine Verschlüsselung. Fragt nach dem +Schlüssel. +.TP +\-X +Führt keine Verbindung zum X\-Server durch. Dadurch verkürzt sich die +Startzeit, aber der Fenstertitel und die Zwischenablage werden nicht +verwendet. +.TP +\-y +Startet \fBVim\fP im einfachen Modus, als würde die ausführbare Datei mit +»evim« oder »eview« aufgerufen. \fBVim\fP verhält sich dann wie ein Editor zum +Klicken und Tippen. +.TP +\-Z +Eingeschränkter Modus: Funktioniert, als würde der Name der ausführbaren +Datei mit »r« beginnen. +.TP +\-\- +Markiert das Ende der Optionen. Argumente, die folgen, werden als Dateinamen +behandelt. Dies kann benutzt werden, um einen Dateinamen mit »\-« am Anfang +zu verwenden. +.TP +\-\-echo\-wid +Nur GTK\-GUI: Schreibe die Fenster\-ID auf die Standardausgabe. +.TP +\-\-help +Gibt eine Hilfe\-Nachricht aus und beendet, wie »\-h«. +.TP +\-\-literal +Nimmt die Dateinamen so wie sie sind und vervollständigt sie nicht nach +Metazeichen (*,?). Dies wirkt sich nicht unter Unix aus, wo die Shell die +Metazeichen expandiert. +.TP +\-\-noplugin +Lade keine Plugins. Impliziert durch »\-u NONE«. +.TP +\-\-remote +Verbindet mit einem Vim\-Server und lässt ihn die in den restlichen +Argumenten angegeben Dateien editieren. Wenn kein Server gefunden wird, +führt dies zu einer Warnmeldung und die Dateien werden im gegenwärtigen Vim +zum Bearbeiten geöffnet. +.TP +\-\-remote\-expr {Ausdruck} +Verbindet mit einem Vim\-Server, führt {Ausdruck} aus und zeigt das Ergebnis +auf der Standardausgabe an. +.TP +\-\-remote\-send {Zeichen} +Verbindet mit einem Vim\-Server und sendet ihm {Zeichen}. +.TP +\-\-remote\-silent +Wie »\-\-remote«, aber ohne Warnung, wenn kein Server gefunden wird. +.TP +\-\-remote\-wait +Wie »\-\-remote«, aber Vim beendet sich nicht, bis die Dateien bearbeitet +wurden. +.TP +\-\-remote\-wait\-silent +Wie »\-\-remote\-wait«, aber ohne Warnung, wenn kein Server gefunden wird. +.TP +\-\-serverlist +Listet die Namen aller gefundenen Vim\-Server auf. +.TP +\-\-servername {Name} +Benutzt {Name} als Server\-Namen. Wird für den gegenwärtigen Vim benutzt, +außer es wird mit dem Argument »\-\-remote« benutzt, dann ist es der Name des +zu kontaktierenden Servers. +.TP +\-\-socketid {id} +Nur GTK\-GUI: Benutzt den GtkPlug\-Mechanismus, um GVim in einem anderen +Fenster laufen zu lassen. +.TP +\-\-version +Versionsinformation anzeigen und beenden +.SH "EINGEBAUTE HILFE" +Tippen Sie in \fBVim\fP »:help«, um zu beginnen. Geben Sie „:help begriff« ein, +um Hilfe über ein bestimmtes Thema zu bekommen. Zum Beispiel »:help ZZ« für +Hilfe über den Befehl »ZZ«. Benutzen Sie <Tab> und CTRL\-D, um +Begriffe zu vervollständigen (»:help cmdline\-completion«). Tags sind +vorhanden, um von einem Ort zum anderen zu springen (eine Art +Hypertext\-Verknüpfungen, siehe »:help«). Auf diese Weise können alle +Dokumentations\-Dateien aufgerufen werden, zum Beispiel »:help syntax.txt«. +.SH DATEIEN +.TP 15 +/usr/local/lib/vim/doc/*.txt +Dokumentations\-Dateien für \fBVim\fP. Verwenden Sie »:help doc\-file\-list«, um +die gesamte Liste zu bekommen. +.TP +/usr/local/lib/vim/doc/tags +Die »Tag«\-Datei, die verwendet wird, um Informationen in der Dokumentation +zu finden. +.TP +/usr/local/lib/vim/syntax/syntax.vim +Die systemweite Einrichtung der Syntaxhervorhebung. +.TP +/usr/local/lib/vim/syntax/*.vim +Syntaxdateien für die verschiedenen Sprachen. +.TP +/usr/local/lib/vim/vimrc +Systemweite Einstellungsdatei für \fBVim\fP +.TP +~/.vimrc +Persönliche Einstellungsdatei für \fBVim\fP +.TP +/usr/local/lib/vim/gvimrc +Systemweite Einstellungsdatei für GVim +.TP +~/.gvimrc +Persönliche Einstellungsdatei für GVim +.TP +/usr/local/lib/vim/optwin.vim +Das Script, das von dem Befehl »:options« verwendet wird, eine schöne +Möglichkeit, um Optionen zu betrachten und zu setzen. +.TP +/usr/local/lib/vim/menu.vim +Systemweite Einstellungsdatei für das Menü von GVim +.TP +/usr/local/lib/vim/bugreport.vim +Das Script zum Generieren eines Fehlerberichts. Siehe »:help bugs«. +.TP +/usr/local/lib/vim/filetype.vim +Mit diesem Script erkennt Vim den Typ einer Datei anhand ihres +Dateinamens. Siehe »:help 'filetype'«. +.TP +/usr/local/lib/vim/scripts.vim +Mit diesem Script erkennt Vim den Typ einer Datei anhand ihres +Inhaltes. Siehe »:help 'filetype'«. +.TP +/usr/local/lib/vim/print/*.ps +Diese Dateien werden zum Drucken von PostScript verwendet. +.PP +Für die neuesten Informationen lesen Sie die Vim\-Homepage: +.br +<URL:http://www.vim.org/> +.SH "SIEHE AUCH" +vimtutor(1) +.SH AUTOR +\fBVim\fP wurde größtenteils von Bram Moolenaar erstellt, mit viel Hilfe von +anderen Leuten. Siehe »:help credits« in \fBVim.\fP +.br +\fBVim\fP basiert auf Stevie, der von Tim Thompson, Tony Andrews und +G.R. (Fred) Walter geschrieben wurde. Es ist jedoch kaum etwas vom +ursprünglichen Code übrig geblieben. +.SH FEHLER +Die sind möglich. Siehe »:help todo« für eine Liste bekannter Probleme. +.PP +Beachten Sie, dass gewisse Dinge, die manche Leute als Fehler betrachten +mögen, in Wirklichkeit durch zu getreue Nachbildung des Vi\-Verhaltens +verursacht werden. Und falls Sie denken, dass andere Dinge Fehler sind, +»weil Vi es anders tut«, sollten Sie einen genaueren Blick auf die Datei +vi_diff.txt werfen (oder in Vim »:help vi_diff.txt« tippen). Sehen Sie sich +auch die Optionen 'compatible' und 'cpoptions' an. diff --git a/runtime/doc/vim-fr.1 b/runtime/doc/vim-fr.1 new file mode 100644 index 0000000000..209ab915c9 --- /dev/null +++ b/runtime/doc/vim-fr.1 @@ -0,0 +1,589 @@ +.\" Traduction lundi 7 août 2000 par Richard Hitier +.\" (richard.hitier@dial.oleane.com) +.\" Mise à jour de la traduction par David Blanchet +.\" (david.blanchet@free.fr) 2006-06-10 +.\" Mise à jour de la traduction par Dominique Pellé +.\" (dominique.pelle@gmail.com) 2013-05-10 +.\" +.TH VIM 1 "22 février 2002" +.SH NOM +vim \- Vi IMproved, éditeur de texte pour programmeurs +.SH SYNOPSIS +.br +.B vim +[options] [fichier ...] +.br +.B vim +[options] \- +.br +.B vim +[options] \-t marqueur +.br +.B vim +[options] \-q [fichiererreurs] +.PP +.br +.B ex +.br +.B view +.br +.B gvim +.B gview +.B evim +.B eview +.br +.B rvim +.B rview +.B rgvim +.B rgview +.SH DESCRIPTION +.B Vim +est un éditeur de texte proposant une compatibilité ascendante +avec Vi. Il permet d'éditer n'importe quel type de texte brut. +Il est particulièrement adapté pour l'édition des programmes. +.PP +Il comporte de nombreuses améliorations par rapport à Vi : annulation sur +plusieurs niveaux, fenêtres et tampons multiples, coloration syntaxique, +édition en ligne de commande, complètement des noms de fichiers, aide en +ligne, sélection visuelle, etc. +Voir ":help vi_diff.txt" pour un résumé des différences entre +.B Vim +et Vi. +.PP +Pendant l'exécution de +.B Vim +\, une aide abondante est accessible au travers du système d'aide +en ligne, grâce à la commande ":help". +Voir la section AIDE EN LIGNE plus bas. +.PP +Le plus souvent +.B Vim +est démarré pour éditer un unique fichier avec la commande +.PP + vim fichier +.PP +Plus généralement, +.B Vim +est lancé avec : +.PP + vim [options] [listefichiers] +.PP +Si la listefichiers est omise, l'éditeur démarre avec un tampon vide. +Autrement, l'une des quatre méthodes suivantes vous permettra de choisir +un ou plusieurs fichiers à éditer. +.TP 12 +fichier ... +Une liste de noms de fichiers. +Le premier sera le fichier courant et sera lu dans le tampon. +Le curseur sera placé sur la première ligne du tampon. +Vous pouvez passer aux autres fichiers avec la commande ":next". +Pour éditer un fichier débutant par un tiret, faites précéder la +liste de fichiers par "\-\-". +.TP +\- +Le fichier à éditer est lu sur l'entrée standard (stdin). Les commandes sont +lues depuis stderr, qui devrait être un terminal. +.TP +\-t {marqueur} +Le fichier à éditer et la position initiale du curseur dépendent +d'un "marqueur", qui est une sorte d'étiquette. +{marqueur} est recherché dans le fichier des marqueurs, le fichier correspondant +devient le fichier courant et la commande associée est exécutée. +Principalement utile pour les programmes en C ; dans ce cas, {marqueur} +peut être le nom d'une fonction. +Au final, le fichier contenant cette fonction devient le fichier +courant et le curseur est placé au début de la fonction. +Voir ":help tag\-commands". +.TP +\-q [fichiererreurs] +Démarre en mode Mise-au-point (QuickFix). +Le fichier [fichiererreurs] est lu et la première erreur est affichée. +Si [fichiererreurs] est omis, le nom du fichier est lu dans +l'option 'errorfile' ("AztecC.Err" par défaut sur Amiga, "errors.err" sur les +autres systèmes). +La commande ":cn" permet de sauter aux erreurs suivantes. +Voir ":help quickfix". +.PP +.B Vim +se comporte différemment selon le nom de la commande (l'exécutable peut +cependant être le même fichier). +.TP 10 +vim +La façon "normale", le comportement par défaut. +.TP +ex +Démarre en mode Ex. +La commande ":vi" permet de passer en mode Normal. +Ce mode est également accessible avec l'argument "\-e". +.TP +view +Démarre en mode Lecture-Seule. Vous êtes protégé de l'écriture accidentelle +des fichiers. Ce mode est également accessible avec l'argument "\-R". +.TP +gvim gview +La version graphique. +Ouvre une nouvelle fenêtre. +Également accessible avec l'argument "\-g". +.TP +evim eview +La version graphique en mode Débutant (easy). +Ouvre une nouvelle fenêtre. +Également accessible avec l'argument "\-y". +.TP +rvim rview rgvim rgview +Comme ci-dessus, mais avec des restrictions. Il vous sera impossible de +lancer des commandes du shell, ou de suspendre +.B Vim. +Également accessible avec l'argument "\-Z". +.SH OPTIONS +Les options peuvent être spécifiées dans n'importe quel ordre, +avant ou après les noms de fichiers. Les options sans arguments +peuvent être combinées après un unique tiret. +.TP 12 ++[num] +Place le curseur sur la ligne "num" dans le premier fichier. +Si "num" est omis, le curseur sera placé sur la dernière ligne. +.TP ++/{motif} +Place le curseur sur la première occurrence de {motif} dans le premier fichier. +Voir ":help search\-pattern" pour connaître les motifs de recherches +disponibles. +.TP ++{commande} +.TP +\-c {commande} +Exécute {commande} après la lecture du premier fichier. +{commande} est interprétée comme une commande Ex. +Si la {commande} contient des espaces, elle doit être entourée +de doubles-apostrophes (cela dépend du shell utilisé). +Exemple : Vim "+set si" main.c +.br +Note : vous pouvez utiliser jusqu'à 10 commandes "+" ou "\-c". +.TP +\-S {fichier} +Source {fichier} après la lecture du premier fichier. +C'est équivalent à \-c "source {fichier}". +{fichier} ne peut pas débuter par un '\-'. +Si {fichier} est omis, "Session.vim" est utilisé (cela ne fonctionne que si +\-S est le dernier argument). +.TP +\-\-cmd {commande} +Comme "\-c", mais la commande est exécutée juste avant de traiter les fichiers +vimrc. +Vous pouvez utiliser jusqu'à 10 de ces commandes, indépendamment des +commandes "\-c". +.TP +\-A +Si +.B Vim +a été compilé avec le support de la fonctionnalité ARABIC pour l'édition de +fichiers de droite à gauche et les claviers arabes, cette option lance +.B Vim +en mode Arabe, c.-à-d. que l'option 'arabic' est activée. +Sinon, un message d'erreur est émis et +.B Vim +quitte. +.TP +\-b +Mode Binaire. +Active plusieurs options pour permettre l'édition +d'un fichier binaire ou exécutable. +.TP +\-C +Compatible. Active l'option 'compatible'. +.B Vim +se comportera alors quasiment comme Vi, même s'il existe un fichier .vimrc. +.TP +\-d +Démarre en mode Diff. +Deux, trois ou quatre noms de fichiers doivent être spécifiés. +.B Vim +ouvrira alors tous les fichiers et affichera leurs différences. +Fonctionne comme vimdiff(1). +.TP +\-d {périph} +Ouvre {périph} pour l'utiliser comme terminal. +Uniquement sur Amiga. +Exemple : +"\-d con:20/30/600/150". +.TP +\-D +Debogage. Passe en mode Débogage lors de l'exécution de la première commande +d'un script. +.TP +\-e +Démarre +.B Vim +en mode Ex, comme si l'exécutable s'appelait "ex". +.TP +\-E +Démarre +.B Vim +en mode Ex amélioré, comme si l'exécutable "exim" avait été invoqué. +.TP +\-f +Premier-plan (Foreground). Pour la version graphique, +.B Vim +ne forke pas et ne se détache pas du shell dans lequel il a été invoqué. +Sur Amiga, +.B Vim +n'est pas relancé pour ouvrir une nouvelle fenêtre. +Cette option est utile quand +.B Vim +est exécuté par un programme qui attend la fin de la session d'édition +(par exemple mail). +Sur Amiga, les commandes ":sh" et ":!" ne fonctionneront pas. +.TP +\-\-nofork +Premier-plan (Foreground). Pour la version graphique, +.B Vim +ne forkera pas et ne se détachera pas du shell dans lequel il a été lancé. +.TP +\-F +Si +.B Vim +a été compilé avec le support de la fonctionnalité FKMAP pour l'édition de +fichiers de droite à gauche et les claviers farsi, cette option lance +.B Vim +en mode Farsi, c.-à-d. avec les options 'fkmap' et 'rightleft' activées. +Sinon, un message d'erreur est émis et +.B Vim +quitte. +.TP +\-g +Si +.B Vim +a été compilé avec le support de l'IHM graphique, cette option active +l'IHM graphique. Si le support n'a pas été compilé, un message d'erreur +est émis et +.B Vim +quitte. +.TP +\-h +Donne une aide succincte sur les arguments et les options de la ligne de +commande. Après cela, +.B Vim +quitte. +.TP +\-H +Si +.B Vim +a été compilé avec le support de la fonctionnalité RIGHTLEFT pour l'édition de +fichiers de droite à gauche et les claviers hébreux, cette option lance +.B Vim +en mode Hébreu, c.-à-d. avec les options 'hkmap' et 'rightleft' activées. +Sinon, un message d'erreur est émis et +.B Vim +quitte. +.TP +\-i {viminfo} +Lorsque l'utilisation d'un fichier viminfo est activée, cette option indique +le nom de fichier à utiliser à la place de "~/.viminfo" par défaut. +Il est possible d'empêcher l'utilisation d'un fichier ".viminfo", en +spécifiant le nom de fichier "NONE". +.TP +\-L +Comme \-r. +.TP +\-l +Mode Lisp. +Active les options 'lisp' et 'showmatch'. +.TP +\-m +Empêche la modification des fichiers. +Désactive l'option 'write'. +Vous pouvez toujours modifier le tampon, mais il vous sera impossible +d'écrire le fichier. +.TP +\-M +N'autorise aucune modification. les options 'modifiable' et 'write' sont +désactivées, de sorte que les changements ne sont pas autorisés et que les +fichiers ne peuvent pas être écrits. Note : ces options peuvent être activées +pour autoriser les modifications. +.TP +\-N +Mode Non-compatible. Désactive l'option 'compatible'. +Cela améliorera le comportement de +.B Vim +\, mais il sera moins conforme à celui de Vi, même s'il n'existe aucun +fichier ".vimrc". +.TP +\-n +N'utilise pas de fichier d'échange (swapfile). +Le recouvrement après un plantage sera impossible. +Utile pour éditer un fichier sur un support très lent (disquette par ex.). +Également activable avec ":set uc=0". +Il est possible de l'annuler avec ":set uc=200". +.TP +\-nb +Devient un serveur d'édition pour NetBeans. Consulter la documentation à ce +sujet pour davantage de détails. +.TP +\-o[N] +Ouvre N fenêtres les unes au-dessus des autres. +Quand N est omis, ouvre une fenêtre pour chaque fichier. +.TP +\-O[N] +Ouvre N fenêtres côte à côte. +Quand N est omis, ouvre une fenêtre pour chaque fichier fichier. +.TP +\-p[N] +Ouvre N onglets. +Quand N est omis, ouvre un onglet pour chaque fichier fichier. +.TP +\-R +Mode Lecture-Seule. +Active l'option 'readonly'. +Vous pouvez toujours éditer le tampon, mais il vous sera impossible de +d'écraser accidentellement un fichier. +Si vous voulez écraser un fichier, ajoutez un point d'exclamation à la commande +Ex, comme dans ":w!". +L'option \-R impose l'option \-n (voir ci-dessus). +L'option 'readonly' peut être désactivée avec ":set noro". +Voir ":help 'readonly'". +.TP +\-r +Donne la liste des fichiers d'échange, avec des informations pour les utiliser +à des fins de recouvrement. +.TP +\-r {file} +Mode Recouvrement. +Utilise le fichier d'échange pour récouvrer d'une session d'édition plantée. +Le fichier d'échange est un fichier avec le même nom que le fichier texte, +suivi du suffixe ".swp". +Voir ":help recovery". +.TP +\-s +Mode Silencieux. Disponible uniquement quand +.B Vim +est lancé en tant que "ex" ou quand l'option "\-e" a été spécifiée avant +l'option "\-s". +.TP +\-s {scriptEntrée} +Lit le fichier de script {scriptEntrée}. +Les caractères du fichier sont interprétés comme si vous les tapiez. +La commande ":source! {scriptEntrée}" donne le même résultat. +Si la fin du fichier est atteinte avant que l'éditeur quitte, les caractères +suivants sont lus depuis le clavier. +.TP +\-T {terminal} +Indique à +.B Vim +le nom du terminal utilisé. +Cela n'est requis que lorsque la détection automatique échoue. +Le {terminal} devrait être connu de +.B Vim +(intégré) ou défini dans le fichier termcap ou terminfo. +.TP +\-u {vimrc} +Utilise les commandes du fichier {vimrc} pour les initialisations. +Toutes les autres initialisations sont omises. +À utiliser pour éditer un type de fichiers particulier. +Cela permet aussi d'omettre toute initialisation en spécifiant le nom de +fichier "NONE". +Voir ":help initialization" dans Vim pour davantage de détails. +.TP +\-U {gvimrc} +Utilise les commandes du fichier {gvimrc} pour l'initialisation de l'IHM +graphique. +Toutes les autres initialisations graphiques sont omises. +Cela permet aussi d'omettre toute initialisation graphique en spécifiant le nom +de fichier "NONE". +Voir ":help gui\-init" dans Vim pour davantage de détails. +.TP +\-V[N] +Mode Verbeux. +Donne des messages à propos des fichiers sourcés, ainsi que sur la lecture +et les écritures dans le fichier viminfo. le nombre optionnel N précise la +valeur de l'option 'verbose' (10 par défaut). +.TP +\-v +Démarre +.B Vim +en mode Vi, comme si l'exécutable s'appelait "vi". Cela n'a d'effet que si +l'exécutable invoqué est "ex". +.TP +\-w {scriptSortie} +Tous les caractères que vous tapez sont enregistrés dans le fichier +{scriptSortie}, jusqu'à ce que vous quittiez +.B Vim. +C'est utile quand vous voulez créer un fichier de script à utiliser avec +"vim \-s" ou ":source!". +Si le fichier {scriptSortie} existe, les caractères sont ajoutés à la fin. +.TP +\-W {scriptSortie} +Comme \-w, mais un fichier existant sera écrasé. +.TP +\-x +Chiffre les fichiers lors de l'écriture. Une clé de chiffrement sera demandée. +.TP +\-X +Ne se connecte pas au serveur X. Accélère le temps de démarrage dans un +terminal, mais le titre de la fenêtre et le presse-papier seront inaccessibles. +.TP +\-y +Démarre +.B Vim +en mode Débutant (easy), comme si l'exécutable s'appelait "evim" ou "eview". +Donne à +.B Vim +un comportement plus proche des éditeurs « cliquez-tapez ». +.TP +\-Z +Mode restreint. Fonctionne comme si l'exécutable commençait par la lettre 'r'. +.TP +\-\- +Délimite la fin des options. +Les arguments qui suivent seront considérés comme des noms de fichiers. +Cela permet d'éditer des fichiers débutant par un '\-'. +.TP +\-\-echo\-wid +IHM graphique GTK uniquement : retourne la Window ID sur stdout. +.TP +\-\-help +Donne un message d'aide et quitte, comme "\-h". +.TP +\-\-literal +Prend les arguments de noms de fichiers littéralement, sans étendre les +jokers. N'a aucun effet sur Unix, où le shell étend les jokers. +.TP +\-\-noplugin +Ne charge pas les greffons. Implicite avec \-u NONE. +.TP +\-\-remote +Se connecte à un serveur Vim et lui fait éditer les fichiers spécifiés dans +le reste des arguments. Si aucun serveur n'est trouvé, un avertissement est +émis et les fichiers sont édités dans le Vim courant. +.TP +\-\-remote\-expr {expr} +Se connecte à un serveur Vim, y évalue {expr} et affiche le résultat sur la +sortie standard (stdout). +.TP +\-\-remote\-send {touches} +Se connecte à un serveur Vim et y envoie {touches}. +.TP +\-\-remote\-silent +Comme \-\-remote, mais sans émettre d'avertissement si aucun serveur n'est +trouvé. +.TP +\-\-remote\-wait +Comme \-\-remote, mais Vim ne quitte pas tant que le fichier est en cours +d'édition. +.TP +\-\-remote\-wait\-silent +Comme \-\-remote\-wait, mais sans émettre d'avertissement si aucun serveur n'est +trouvé. +.TP +\-\-serverlist +Donne la liste des noms de tous les serveurs Vim disponibles. +.TP +\-\-servername {nom} +Utilise {nom} pour le nom de serveur. Ce nom est donné au Vim courant, à moins +qu'il ne soit utilisé avec un argument \-\-remote. Dans ce cas, il s'agit du nom +du serveur auquel se connecter. +.TP +\-\-socketid {id} +IHM graphique GTK+ uniquement : utilise le mécanisme GtkPlug pour faire +fonctionner gvim dans une autre fenêtre. +.TP +\-\-version +Affiche les informations sur la version puis quitte. +.SH AIDE EN LIGNE +Taper ":help" dans +.B Vim +pour commencer. +Taper ":help sujet" pour obtenir de l'aide sur un sujet précis. +Par exemple : ":help ZZ" pour consulter l'aide sur la commande "ZZ". +Utiliser <Tab> et CTRL\-D pour compléter les sujets (":help +cmdline\-completion"). +Des marqueurs sont inclus dans l'aide et vous permettent de sauter d'un endroit +à un autre (comme des liens hypertextes, voir ":help"). +L'ensemble des fichiers de la documentation peut être consulté de cette +façon, par exemple ":help syntax.txt". +.SH FICHIERS +.TP 15 +/usr/local/lib/vim/doc/*.txt +Les fichiers de la documentation de +.B Vim. +Utiliser ":help doc\-file\-list" pour obtenir la liste complète. +.TP +/usr/local/lib/vim/doc/tags +Le fichier des marqueurs utilisé pour trouver les informations dans les +fichiers de la documentation. +.TP +/usr/local/lib/vim/syntax/syntax.vim +Initialisation de la syntaxe pour l'ensemble du système. +.TP +/usr/local/lib/vim/syntax/*.vim +Fichiers de syntaxe pour différents langages. +.TP +/usr/local/lib/vim/vimrc +Initialisation de +.B Vim +pour l'ensemble du système. +.TP +~/.vimrc +Initialisation de +.B Vim +de votre compte utilisateur. +.TP +/usr/local/lib/vim/gvimrc +Initialisation de gvim pour l'ensemble du système. +.TP +~/.gvimrc +Initialisation de gvim pour votre compte utilisateur. +.TP +/usr/local/lib/vim/optwin.vim +Script utilisé pour la commande ":options", une manière pratique de consulter +et de modifier les options. +.TP +/usr/local/lib/vim/menu.vim +Initialisation des menus de gvim pour l'ensemble du système. +.TP +/usr/local/lib/vim/bugreport.vim +Script pour générer un rapport de bogue. Voir ":help bugs". +.TP +/usr/local/lib/vim/filetype.vim +Script pour détecter le type d'un fichier d'après son nom. +Voir ":help 'filetype'". +.TP +/usr/local/lib/vim/scripts.vim +Script pour détecter le type d'un fichier d'après son contenu. +Voir ":help 'filetype'". +.TP +/usr/local/lib/vim/print/*.ps +Fichiers utilisés pour l'impression PostScript. +.PP +Pour disposer d'informations récentes, consulter le site Internet de VIM : +.br +<URL:http://www.vim.org/> +.SH VOIR AUSSI +vimtutor(1) +.SH AUTEUR +La majeure partie de +.B Vim +a été écrite par Bram Moolenaar, avec l'aide de nombreux autres contributeurs. +Voir ":help credits" dans +.B Vim. +.br +.B Vim +est basé sur Stevie, réalisé par Tim Thompson, +Tony Andrews et G.R. (Fred) Walter. +Toutefois, pratiquement rien du code original ne subsiste. +.SH BOGUES +Probablement. +Voir ":help todo" pour consulter la liste des problèmes connus. +.PP +NOTE : Remarquez que bon nombre de points, qui pourraient être considérés comme +des bugs par certains, sont en fait dus à une reproduction trop fidèle +du comportement de Vi. Et si vous pensez que d'autres points sont des +bugs "parce que Vi le fait différemment", vous devriez jeter un oeil +attentif au fichier vi_diff.txt (ou taper ":help vi_diff.txt" dans Vim). +Regardez aussi les options 'compatible' et 'coptions'. +.SH TRADUCTION +Cette page de manuel a été traduite par Richard Hitier. +<richard.hitier@dial.oleane.com> 2000-08-07. +.br +Cette page de manuel a été mise à jour par David Blanchet. +<david.blanchet@free.fr> 2006-04-10. +Mise à jour 2013-05-10, Dominique Pellé <dominique.pelle@gmail.com> diff --git a/runtime/doc/vim-fr.UTF-8.1 b/runtime/doc/vim-fr.UTF-8.1 new file mode 100644 index 0000000000..67be106673 --- /dev/null +++ b/runtime/doc/vim-fr.UTF-8.1 @@ -0,0 +1,589 @@ +.\" Traduction lundi 7 août 2000 par Richard Hitier +.\" (richard.hitier@dial.oleane.com) +.\" Mise à jour de la traduction par David Blanchet +.\" (david.blanchet@free.fr) 2006-06-10 +.\" Mise à jour de la traduction par Dominique Pellé +.\" (dominique.pelle@gmail.com) 2013-05-10 +.\" +.TH VIM 1 "22 février 2002" +.SH NOM +vim \- Vi IMproved, éditeur de texte pour programmeurs +.SH SYNOPSIS +.br +.B vim +[options] [fichier ...] +.br +.B vim +[options] \- +.br +.B vim +[options] \-t marqueur +.br +.B vim +[options] \-q [fichiererreurs] +.PP +.br +.B ex +.br +.B view +.br +.B gvim +.B gview +.B evim +.B eview +.br +.B rvim +.B rview +.B rgvim +.B rgview +.SH DESCRIPTION +.B Vim +est un éditeur de texte proposant une compatibilité ascendante +avec Vi. Il permet d'éditer n'importe quel type de texte brut. +Il est particulièrement adapté pour l'édition des programmes. +.PP +Il comporte de nombreuses améliorations par rapport à Vi : annulation sur +plusieurs niveaux, fenêtres et tampons multiples, coloration syntaxique, +édition en ligne de commande, complètement des noms de fichiers, aide en +ligne, sélection visuelle, etc. +Voir ":help vi_diff.txt" pour un résumé des différences entre +.B Vim +et Vi. +.PP +Pendant l'exécution de +.B Vim +\, une aide abondante est accessible au travers du système d'aide +en ligne, grâce à la commande ":help". +Voir la section AIDE EN LIGNE plus bas. +.PP +Le plus souvent +.B Vim +est démarré pour éditer un unique fichier avec la commande +.PP + vim fichier +.PP +Plus généralement, +.B Vim +est lancé avec : +.PP + vim [options] [listefichiers] +.PP +Si la listefichiers est omise, l'éditeur démarre avec un tampon vide. +Autrement, l'une des quatre méthodes suivantes vous permettra de choisir +un ou plusieurs fichiers à éditer. +.TP 12 +fichier ... +Une liste de noms de fichiers. +Le premier sera le fichier courant et sera lu dans le tampon. +Le curseur sera placé sur la première ligne du tampon. +Vous pouvez passer aux autres fichiers avec la commande ":next". +Pour éditer un fichier débutant par un tiret, faites précéder la +liste de fichiers par "\-\-". +.TP +\- +Le fichier à éditer est lu sur l'entrée standard (stdin). Les commandes sont +lues depuis stderr, qui devrait être un terminal. +.TP +\-t {marqueur} +Le fichier à éditer et la position initiale du curseur dépendent +d'un "marqueur", qui est une sorte d'étiquette. +{marqueur} est recherché dans le fichier des marqueurs, le fichier correspondant +devient le fichier courant et la commande associée est exécutée. +Principalement utile pour les programmes en C ; dans ce cas, {marqueur} +peut être le nom d'une fonction. +Au final, le fichier contenant cette fonction devient le fichier +courant et le curseur est placé au début de la fonction. +Voir ":help tag\-commands". +.TP +\-q [fichiererreurs] +Démarre en mode Mise-au-point (QuickFix). +Le fichier [fichiererreurs] est lu et la première erreur est affichée. +Si [fichiererreurs] est omis, le nom du fichier est lu dans +l'option 'errorfile' ("AztecC.Err" par défaut sur Amiga, "errors.err" sur les +autres systèmes). +La commande ":cn" permet de sauter aux erreurs suivantes. +Voir ":help quickfix". +.PP +.B Vim +se comporte différemment selon le nom de la commande (l'exécutable peut +cependant être le même fichier). +.TP 10 +vim +La façon "normale", le comportement par défaut. +.TP +ex +Démarre en mode Ex. +La commande ":vi" permet de passer en mode Normal. +Ce mode est également accessible avec l'argument "\-e". +.TP +view +Démarre en mode Lecture-Seule. Vous êtes protégé de l'écriture accidentelle +des fichiers. Ce mode est également accessible avec l'argument "\-R". +.TP +gvim gview +La version graphique. +Ouvre une nouvelle fenêtre. +Également accessible avec l'argument "\-g". +.TP +evim eview +La version graphique en mode Débutant (easy). +Ouvre une nouvelle fenêtre. +Également accessible avec l'argument "\-y". +.TP +rvim rview rgvim rgview +Comme ci-dessus, mais avec des restrictions. Il vous sera impossible de +lancer des commandes du shell, ou de suspendre +.B Vim. +Également accessible avec l'argument "\-Z". +.SH OPTIONS +Les options peuvent être spécifiées dans n'importe quel ordre, +avant ou après les noms de fichiers. Les options sans arguments +peuvent être combinées après un unique tiret. +.TP 12 ++[num] +Place le curseur sur la ligne "num" dans le premier fichier. +Si "num" est omis, le curseur sera placé sur la dernière ligne. +.TP ++/{motif} +Place le curseur sur la première occurrence de {motif} dans le premier fichier. +Voir ":help search\-pattern" pour connaître les motifs de recherches +disponibles. +.TP ++{commande} +.TP +\-c {commande} +Exécute {commande} après la lecture du premier fichier. +{commande} est interprétée comme une commande Ex. +Si la {commande} contient des espaces, elle doit être entourée +de doubles-apostrophes (cela dépend du shell utilisé). +Exemple : Vim "+set si" main.c +.br +Note : vous pouvez utiliser jusqu'à 10 commandes "+" ou "\-c". +.TP +\-S {fichier} +Source {fichier} après la lecture du premier fichier. +C'est équivalent à \-c "source {fichier}". +{fichier} ne peut pas débuter par un '\-'. +Si {fichier} est omis, "Session.vim" est utilisé (cela ne fonctionne que si +\-S est le dernier argument). +.TP +\-\-cmd {commande} +Comme "\-c", mais la commande est exécutée juste avant de traiter les fichiers +vimrc. +Vous pouvez utiliser jusqu'à 10 de ces commandes, indépendamment des +commandes "\-c". +.TP +\-A +Si +.B Vim +a été compilé avec le support de la fonctionnalité ARABIC pour l'édition de +fichiers de droite à gauche et les claviers arabes, cette option lance +.B Vim +en mode Arabe, c.-à-d. que l'option 'arabic' est activée. +Sinon, un message d'erreur est émis et +.B Vim +quitte. +.TP +\-b +Mode Binaire. +Active plusieurs options pour permettre l'édition +d'un fichier binaire ou exécutable. +.TP +\-C +Compatible. Active l'option 'compatible'. +.B Vim +se comportera alors quasiment comme Vi, même s'il existe un fichier .vimrc. +.TP +\-d +Démarre en mode Diff. +Deux, trois ou quatre noms de fichiers doivent être spécifiés. +.B Vim +ouvrira alors tous les fichiers et affichera leurs différences. +Fonctionne comme vimdiff(1). +.TP +\-d {périph} +Ouvre {périph} pour l'utiliser comme terminal. +Uniquement sur Amiga. +Exemple : +"\-d con:20/30/600/150". +.TP +\-D +Debogage. Passe en mode Débogage lors de l'exécution de la première commande +d'un script. +.TP +\-e +Démarre +.B Vim +en mode Ex, comme si l'exécutable s'appelait "ex". +.TP +\-E +Démarre +.B Vim +en mode Ex amélioré, comme si l'exécutable "exim" avait été invoqué. +.TP +\-f +Premier-plan (Foreground). Pour la version graphique, +.B Vim +ne forke pas et ne se détache pas du shell dans lequel il a été invoqué. +Sur Amiga, +.B Vim +n'est pas relancé pour ouvrir une nouvelle fenêtre. +Cette option est utile quand +.B Vim +est exécuté par un programme qui attend la fin de la session d'édition +(par exemple mail). +Sur Amiga, les commandes ":sh" et ":!" ne fonctionneront pas. +.TP +\-\-nofork +Premier-plan (Foreground). Pour la version graphique, +.B Vim +ne forkera pas et ne se détachera pas du shell dans lequel il a été lancé. +.TP +\-F +Si +.B Vim +a été compilé avec le support de la fonctionnalité FKMAP pour l'édition de +fichiers de droite à gauche et les claviers farsi, cette option lance +.B Vim +en mode Farsi, c.-à-d. avec les options 'fkmap' et 'rightleft' activées. +Sinon, un message d'erreur est émis et +.B Vim +quitte. +.TP +\-g +Si +.B Vim +a été compilé avec le support de l'IHM graphique, cette option active +l'IHM graphique. Si le support n'a pas été compilé, un message d'erreur +est émis et +.B Vim +quitte. +.TP +\-h +Donne une aide succincte sur les arguments et les options de la ligne de +commande. Après cela, +.B Vim +quitte. +.TP +\-H +Si +.B Vim +a été compilé avec le support de la fonctionnalité RIGHTLEFT pour l'édition de +fichiers de droite à gauche et les claviers hébreux, cette option lance +.B Vim +en mode Hébreu, c.-à-d. avec les options 'hkmap' et 'rightleft' activées. +Sinon, un message d'erreur est émis et +.B Vim +quitte. +.TP +\-i {viminfo} +Lorsque l'utilisation d'un fichier viminfo est activée, cette option indique +le nom de fichier à utiliser à la place de "~/.viminfo" par défaut. +Il est possible d'empêcher l'utilisation d'un fichier ".viminfo", en +spécifiant le nom de fichier "NONE". +.TP +\-L +Comme \-r. +.TP +\-l +Mode Lisp. +Active les options 'lisp' et 'showmatch'. +.TP +\-m +Empêche la modification des fichiers. +Désactive l'option 'write'. +Vous pouvez toujours modifier le tampon, mais il vous sera impossible +d'écrire le fichier. +.TP +\-M +N'autorise aucune modification. les options 'modifiable' et 'write' sont +désactivées, de sorte que les changements ne sont pas autorisés et que les +fichiers ne peuvent pas être écrits. Note : ces options peuvent être activées +pour autoriser les modifications. +.TP +\-N +Mode Non-compatible. Désactive l'option 'compatible'. +Cela améliorera le comportement de +.B Vim +\, mais il sera moins conforme à celui de Vi, même s'il n'existe aucun +fichier ".vimrc". +.TP +\-n +N'utilise pas de fichier d'échange (swapfile). +Le recouvrement après un plantage sera impossible. +Utile pour éditer un fichier sur un support très lent (disquette par ex.). +Également activable avec ":set uc=0". +Il est possible de l'annuler avec ":set uc=200". +.TP +\-nb +Devient un serveur d'édition pour NetBeans. Consulter la documentation à ce +sujet pour davantage de détails. +.TP +\-o[N] +Ouvre N fenêtres les unes au-dessus des autres. +Quand N est omis, ouvre une fenêtre pour chaque fichier. +.TP +\-O[N] +Ouvre N fenêtres côte à côte. +Quand N est omis, ouvre une fenêtre pour chaque fichier fichier. +.TP +\-p[N] +Ouvre N onglets. +Quand N est omis, ouvre un onglet pour chaque fichier fichier. +.TP +\-R +Mode Lecture-Seule. +Active l'option 'readonly'. +Vous pouvez toujours éditer le tampon, mais il vous sera impossible de +d'écraser accidentellement un fichier. +Si vous voulez écraser un fichier, ajoutez un point d'exclamation à la commande +Ex, comme dans ":w!". +L'option \-R impose l'option \-n (voir ci-dessus). +L'option 'readonly' peut être désactivée avec ":set noro". +Voir ":help 'readonly'". +.TP +\-r +Donne la liste des fichiers d'échange, avec des informations pour les utiliser +à des fins de recouvrement. +.TP +\-r {file} +Mode Recouvrement. +Utilise le fichier d'échange pour récouvrer d'une session d'édition plantée. +Le fichier d'échange est un fichier avec le même nom que le fichier texte, +suivi du suffixe ".swp". +Voir ":help recovery". +.TP +\-s +Mode Silencieux. Disponible uniquement quand +.B Vim +est lancé en tant que "ex" ou quand l'option "\-e" a été spécifiée avant +l'option "\-s". +.TP +\-s {scriptEntrée} +Lit le fichier de script {scriptEntrée}. +Les caractères du fichier sont interprétés comme si vous les tapiez. +La commande ":source! {scriptEntrée}" donne le même résultat. +Si la fin du fichier est atteinte avant que l'éditeur quitte, les caractères +suivants sont lus depuis le clavier. +.TP +\-T {terminal} +Indique à +.B Vim +le nom du terminal utilisé. +Cela n'est requis que lorsque la détection automatique échoue. +Le {terminal} devrait être connu de +.B Vim +(intégré) ou défini dans le fichier termcap ou terminfo. +.TP +\-u {vimrc} +Utilise les commandes du fichier {vimrc} pour les initialisations. +Toutes les autres initialisations sont omises. +À utiliser pour éditer un type de fichiers particulier. +Cela permet aussi d'omettre toute initialisation en spécifiant le nom de +fichier "NONE". +Voir ":help initialization" dans Vim pour davantage de détails. +.TP +\-U {gvimrc} +Utilise les commandes du fichier {gvimrc} pour l'initialisation de l'IHM +graphique. +Toutes les autres initialisations graphiques sont omises. +Cela permet aussi d'omettre toute initialisation graphique en spécifiant le nom +de fichier "NONE". +Voir ":help gui\-init" dans Vim pour davantage de détails. +.TP +\-V[N] +Mode Verbeux. +Donne des messages à propos des fichiers sourcés, ainsi que sur la lecture +et les écritures dans le fichier viminfo. le nombre optionnel N précise la +valeur de l'option 'verbose' (10 par défaut). +.TP +\-v +Démarre +.B Vim +en mode Vi, comme si l'exécutable s'appelait "vi". Cela n'a d'effet que si +l'exécutable invoqué est "ex". +.TP +\-w {scriptSortie} +Tous les caractères que vous tapez sont enregistrés dans le fichier +{scriptSortie}, jusqu'à ce que vous quittiez +.B Vim. +C'est utile quand vous voulez créer un fichier de script à utiliser avec +"vim \-s" ou ":source!". +Si le fichier {scriptSortie} existe, les caractères sont ajoutés à la fin. +.TP +\-W {scriptSortie} +Comme \-w, mais un fichier existant sera écrasé. +.TP +\-x +Chiffre les fichiers lors de l'écriture. Une clé de chiffrement sera demandée. +.TP +\-X +Ne se connecte pas au serveur X. Accélère le temps de démarrage dans un +terminal, mais le titre de la fenêtre et le presse-papier seront inaccessibles. +.TP +\-y +Démarre +.B Vim +en mode Débutant (easy), comme si l'exécutable s'appelait "evim" ou "eview". +Donne à +.B Vim +un comportement plus proche des éditeurs « cliquez-tapez ». +.TP +\-Z +Mode restreint. Fonctionne comme si l'exécutable commençait par la lettre 'r'. +.TP +\-\- +Délimite la fin des options. +Les arguments qui suivent seront considérés comme des noms de fichiers. +Cela permet d'éditer des fichiers débutant par un '\-'. +.TP +\-\-echo\-wid +IHM graphique GTK uniquement : retourne la Window ID sur stdout. +.TP +\-\-help +Donne un message d'aide et quitte, comme "\-h". +.TP +\-\-literal +Prend les arguments de noms de fichiers littéralement, sans étendre les +jokers. N'a aucun effet sur Unix, où le shell étend les jokers. +.TP +\-\-noplugin +Ne charge pas les greffons. Implicite avec \-u NONE. +.TP +\-\-remote +Se connecte à un serveur Vim et lui fait éditer les fichiers spécifiés dans +le reste des arguments. Si aucun serveur n'est trouvé, un avertissement est +émis et les fichiers sont édités dans le Vim courant. +.TP +\-\-remote\-expr {expr} +Se connecte à un serveur Vim, y évalue {expr} et affiche le résultat sur la +sortie standard (stdout). +.TP +\-\-remote\-send {touches} +Se connecte à un serveur Vim et y envoie {touches}. +.TP +\-\-remote\-silent +Comme \-\-remote, mais sans émettre d'avertissement si aucun serveur n'est +trouvé. +.TP +\-\-remote\-wait +Comme \-\-remote, mais Vim ne quitte pas tant que le fichier est en cours +d'édition. +.TP +\-\-remote\-wait\-silent +Comme \-\-remote\-wait, mais sans émettre d'avertissement si aucun serveur n'est +trouvé. +.TP +\-\-serverlist +Donne la liste des noms de tous les serveurs Vim disponibles. +.TP +\-\-servername {nom} +Utilise {nom} pour le nom de serveur. Ce nom est donné au Vim courant, à moins +qu'il ne soit utilisé avec un argument \-\-remote. Dans ce cas, il s'agit du nom +du serveur auquel se connecter. +.TP +\-\-socketid {id} +IHM graphique GTK+ uniquement : utilise le mécanisme GtkPlug pour faire +fonctionner gvim dans une autre fenêtre. +.TP +\-\-version +Affiche les informations sur la version puis quitte. +.SH AIDE EN LIGNE +Taper ":help" dans +.B Vim +pour commencer. +Taper ":help sujet" pour obtenir de l'aide sur un sujet précis. +Par exemple : ":help ZZ" pour consulter l'aide sur la commande "ZZ". +Utiliser <Tab> et CTRL\-D pour compléter les sujets (":help +cmdline\-completion"). +Des marqueurs sont inclus dans l'aide et vous permettent de sauter d'un endroit +à un autre (comme des liens hypertextes, voir ":help"). +L'ensemble des fichiers de la documentation peut être consulté de cette +façon, par exemple ":help syntax.txt". +.SH FICHIERS +.TP 15 +/usr/local/lib/vim/doc/*.txt +Les fichiers de la documentation de +.B Vim. +Utiliser ":help doc\-file\-list" pour obtenir la liste complète. +.TP +/usr/local/lib/vim/doc/tags +Le fichier des marqueurs utilisé pour trouver les informations dans les +fichiers de la documentation. +.TP +/usr/local/lib/vim/syntax/syntax.vim +Initialisation de la syntaxe pour l'ensemble du système. +.TP +/usr/local/lib/vim/syntax/*.vim +Fichiers de syntaxe pour différents langages. +.TP +/usr/local/lib/vim/vimrc +Initialisation de +.B Vim +pour l'ensemble du système. +.TP +~/.vimrc +Initialisation de +.B Vim +de votre compte utilisateur. +.TP +/usr/local/lib/vim/gvimrc +Initialisation de gvim pour l'ensemble du système. +.TP +~/.gvimrc +Initialisation de gvim pour votre compte utilisateur. +.TP +/usr/local/lib/vim/optwin.vim +Script utilisé pour la commande ":options", une manière pratique de consulter +et de modifier les options. +.TP +/usr/local/lib/vim/menu.vim +Initialisation des menus de gvim pour l'ensemble du système. +.TP +/usr/local/lib/vim/bugreport.vim +Script pour générer un rapport de bogue. Voir ":help bugs". +.TP +/usr/local/lib/vim/filetype.vim +Script pour détecter le type d'un fichier d'après son nom. +Voir ":help 'filetype'". +.TP +/usr/local/lib/vim/scripts.vim +Script pour détecter le type d'un fichier d'après son contenu. +Voir ":help 'filetype'". +.TP +/usr/local/lib/vim/print/*.ps +Fichiers utilisés pour l'impression PostScript. +.PP +Pour disposer d'informations récentes, consulter le site Internet de VIM : +.br +<URL:http://www.vim.org/> +.SH VOIR AUSSI +vimtutor(1) +.SH AUTEUR +La majeure partie de +.B Vim +a été écrite par Bram Moolenaar, avec l'aide de nombreux autres contributeurs. +Voir ":help credits" dans +.B Vim. +.br +.B Vim +est basé sur Stevie, réalisé par Tim Thompson, +Tony Andrews et G.R. (Fred) Walter. +Toutefois, pratiquement rien du code original ne subsiste. +.SH BOGUES +Probablement. +Voir ":help todo" pour consulter la liste des problèmes connus. +.PP +NOTE : Remarquez que bon nombre de points, qui pourraient être considérés comme +des bugs par certains, sont en fait dus à une reproduction trop fidèle +du comportement de Vi. Et si vous pensez que d'autres points sont des +bugs "parce que Vi le fait différemment", vous devriez jeter un oeil +attentif au fichier vi_diff.txt (ou taper ":help vi_diff.txt" dans Vim). +Regardez aussi les options 'compatible' et 'coptions'. +.SH TRADUCTION +Cette page de manuel a été traduite par Richard Hitier. +<richard.hitier@dial.oleane.com> 2000-08-07. +.br +Cette page de manuel a été mise à jour par David Blanchet. +<david.blanchet@free.fr> 2006-04-10. +Mise à jour 2013-05-10, Dominique Pellé <dominique.pelle@gmail.com> diff --git a/runtime/doc/vim-it.1 b/runtime/doc/vim-it.1 new file mode 100755 index 0000000000..0ab3eff0d2 --- /dev/null +++ b/runtime/doc/vim-it.1 @@ -0,0 +1,566 @@ +.TH VIM 1 "22 febbraio 2002" +.SH NOME +vim \- VI Migliorato, un editor di testi per programmatori +.SH SINTASSI +.br +.B vim +[opzioni] [file ..] +.br +.B vim +[opzioni] \- +.br +.B vim +[opzioni] \-t tag +.br +.B vim +[opzioni] \-q [file_errori] +.PP +.br +.B ex +.br +.B view +.br +.B gvim +.B gview +.B evim +.B eview +.br +.B rvim +.B rview +.B rgvim +.B rgview +.SH DESCRIZIONE +.B Vim +Un editore di testi, compatibile con, e migliore di, Vi. +Può essere usato per editare qualsiasi file di testo. +Particolarmente utile per editare programmi. +.PP +Ci sono parecchi miglioramenti rispetto a Vi: undo multipli, +finestre e buffer multipli, evidenziazione sintattica, possibilità +di modificare la linea di comando, completamento nomi file, help +in linea, selezione testi in Modo Visual, etc.. +Vedere ":help vi_diff.txt" per un sommario delle differenze fra +.B Vim +e Vi. +.PP +Mentre usate +.B Vim +potete ricevere molto aiuto dal sistema di help online, col comando ":help". +Vedere qui sotto la sezione AIUTO ONLINE. +.PP +Quasi sempre +.B Vim +viene invocato, per modificare un file, col comando +.PP + vim nome_file +.PP +Più in generale +.B Vim +viene invocato con: +.PP + vim [opzioni] [lista_file] +.PP +Se lista_file non è presente, l'editor inizia aprendo un buffer vuoto. +Altrimenti, una e una sola delle quattro maniere indicate qui sotto può +essere usata per scegliere uno o più file da modificare. +.TP 12 +nome_file .. +Una lista di nomi di file. +Il primo di questi sarà il file corrente, e verrà letto nel buffer. +Il cursore sarà posizionato sulla prima linea del buffer. +Potete arrivare agli altri file col comando ":next". +Per editare un file il cui nome inizia per "\-" premettete "\-\-" alla +lista_file. +.TP +\- +Il file da editare è letto dallo "stdin" [di solito, ma non +necessariamente, il terminale \- NdT]. I comandi sono letti da "stderr", +che dovrebbe essere un terminale [tty]. +.TP +\-t {tag} +Il file da editare e la posizione iniziale del cursore dipendono da "tag", +una specie di "etichetta" a cui saltare. +{tag} viene cercata nel file "tags", ed il file ad essa associato diventa +quello corrente, ed il comando ad essa associato viene eseguito. +Di solito si usa per programmi C, nel qual caso {tag} potrebbe essere un +nome di funzione. +L'effetto è che il file contenente quella funzione diventa il file corrente +e il cursore è posizionato all'inizio della funzione. +Vedere ":help tag\-commands". +.TP +\-q [file_errori] +Inizia in Modo QuickFix [correzione veloce]. +Il file [file_errori] è letto e il primo errore è visualizzato. +Se [file_errori] non è indicato, il suo nome è ottenuto dal valore +dell'opzione 'errorfile' (che, se non specificata, vale "AztecC.Err" +per l'Amiga, "errors.err" su altri sistemi). +Si può saltare all'errore successivo col comando ":cn". +Vedere ":help quickfix". +.PP +.B Vim +si comporta in modo diverso se invocato con nomi differenti (il programma +eseguibile "sottostante" può essere sempre lo stesso). +.TP 10 +vim +Modo Normal, comportamento normale. +.TP +ex +Inizia in Modo "Ex". +Si può passare in Modo Normal col comando ":vi". +Si può invocare il Modo "Ex" anche con l'argomento "\-e". +.TP +view +Inizia in Modo Read-only (Sola Lettura). Non potete modificare i file. +Si può invocare il Modo Read-only anche con l'argomento "\-R". +.TP +gvim gview +La versione GUI [Graphical User Interface]. +Apre una nuova finestra. +Si può invocare il Modo GUI anche con l'argomento "\-g". +.TP +evim eview +La versione GUI in Modo Easy (semplificata). +Apre una nuova finestra. +Si può invocare il Modo Easy anche con l'argomento "\-y". +.TP +rvim rview rgvim rgview +Come sopra, ma con restrizioni ai comandi. Non si potranno eseguire comandi +della shell o sospendere +.B Vim. +Si può chiedere la stessa cosa anche con l'argomento "\-Z". +.SH OPZIONI +Le opzioni possono essere in un ordine qualsiasi, prima o dopo i nomi di +file. Opzioni che non necessitano un argomento possono essere specificate +dietro a un solo "\-". +.TP 12 ++[numero] +Per il primo file il cursore sarà posizionato sulla linea "numero". +Se "numero" manca, il cursore sarà posizionato sull'ultima linea del file. +.TP ++/{espressione} +Per il primo file il cursore sarà posizionato alla +prima occorrenza di {espressione}. +Vedere ":help search\-pattern" per come specificare l'espressione. +.TP ++{comando} +.TP +\-c {comando} +{comando} sarà eseguito dopo che il +primo file è stato letto. +{comando} è interpretato come un comando Ex. +Se il {comando} contiene spazi deve essere incluso fra doppi apici +(o altro delimitatore, a seconda della shell che si sta usando). +Esempio: Vim "+set si" main.c +.br +Note: Si possono avere fino a 10 comandi "+" o "\-c". +.TP +\-S {file} +I comandi contenuti in {file} sono eseguiti dopo la lettura del primo file. +Equivalente a \-c "source {file}". +{file} non può avere un nome che inizia per '\-'. +Se {file} è omesso si usa "Session.vim" (funziona solo se \-S è l'ultimo +argomento specificato). +.TP +\-\-cmd {comando} +Come "\-c", ma il comando è eseguito PRIMA +di eseguire qualsiasi file vimrc. +Si possono usare fino a 10 di questi comandi, indipendentemente dai comandi +"\-c". +.TP +\-A +Se +.B Vim +è stato compilato con supporto Arabic per editare file con orientamento +destra-sinistra e tastiera con mappatura Araba, questa opzione inizia +.B Vim +in Modo Arabic, cioè impostando 'arabic'. +Altrimenti viene dato un messaggio di errore e +.B Vim +termina in modo anormale. +.TP +\-b +Modo Binary (binario). +Vengono impostate alcune opzioni che permettono di modificare un file +binario o un programma eseguibile. +.TP +\-C +Compatibile. Imposta l'opzione 'compatible'. +In questo modo +.B Vim +ha quasi lo stesso comportamento di Vi, anche in presenza di un file +di configurazione .vimrc [proprio di Vim, vi usa .exrc \- Ndt]. +.TP +\-d +Inizia in Modo Diff [differenze]. +Dovrebbero esserci come argomenti due o tre o quattro nomi di file. +.B Vim +aprirà tutti i file evidenziando le differenze fra gli stessi. +Funziona come vimdiff(1). +.TP +\-d {dispositivo} +Apre {dispositivo} per usarlo come terminale. +Solo per l'Amiga. +Esempio: +"\-d con:20/30/600/150". +.TP +\-D +Debugging. Vim si mette in Modo "debugging" a partire +dall'esecuzione del primo comando da uno script. +.TP +\-e +Eseguire +.B Vim +in Modo Ex, come se il programma eseguito sia "ex". +.TP +\-E +Eseguire +.B Vim +in Modo Ex migliorato, come se il programma eseguito sia "exim". +.TP +\-f +Direttamente [Foreground]. Per la versione GUI, +.B Vim +non crea [fork] una nuova finestra, indipendente dalla shell di invocazione. +Per l'Amiga, +.B Vim +non è fatto ripartire per aprire una nuova finestra. +Opzione da usare quando +.B Vim +è eseguito da un programma che attende la fine della +sessione di edit (ad es. mail). +Sull'Amiga i comandi ":sh" e ":!" non sono disponibili. +.TP +\-\-nofork +Direttamente [Foreground]. Per la versione GUI, +.B Vim +non crea [fork] una nuova finestra, indipendente dalla shell di invocazione. +.TP +\-F +Se +.B Vim +è stato compilato con supporto FKMAP per editare file con orientamento +destra-sinistra e tastiera con mappatura Farsi, questa opzione inizia +.B Vim +in Modo Farsi, cioè impostando 'fkmap' e 'rightleft'. +Altrimenti viene dato un messaggio di errore e +.B Vim +termina in modo anormale. +.TP +\-g +Se +.B Vim +è stato compilato con supporto GUI, questa opzione chiede di usarla. +Se Vim è stato compilato senza supporto GUI viene dato un messaggio di errore e +.B Vim +termina in modo anormale. +.TP +\-h +Un po' di aiuto su opzioni e argomenti che si possono dare invocando Vim. +Subito dopo +.B Vim +esce. +.TP +\-H +Se +.B Vim +è stato compilato col supporto RIGHTLEFT per editare file con orientamento +destra-sinistra e tastiera con mappatura Ebraica, questa opzione inizia +.B Vim +in Modo Ebraico, cioè impostando 'hkmap' e 'rightleft'. +Altrimenti viene dato un messaggio di errore e +.B Vim +termina in modo anormale. +.TP +\-i {viminfo} +Se è abilitato l'uso di un file viminfo, questa opzione indica il nome +del file da usare invece di quello predefinito "~/.viminfo". +Si può anche evitare l'uso di un file .viminfo, dando come nome "NONE". +.TP +\-L +Equivalente a \-r. +.TP +\-l +Modo Lisp. +Imposta le opzioni 'lisp' e 'showmatch'. +.TP +\-m +Inibisce modifica file. +Annulla l'opzione 'write'. +È ancora possibile modificare un buffer [in memoria \- Ndt], ma non scriverlo. +.TP +\-M +Modifiche non permesse. Le opzioni 'modifiable' e 'write' sono annullate, +in modo da impedire sia modifiche che riscritture. Da notare che queste +opzioni possono essere abilitate in seguito, permettendo così modifiche. +.TP +\-N +Modo "Non-compatibile". Annulla l'opzione 'compatible'. +Così +.B Vim +va un po' meglio, ma è meno compatibile con Vi, anche in assenza di un +file .vimrc. +.TP +\-n +Inibisce l'uso di un file di swap. +Il recupero dopo una caduta di macchina diventa impossibile. +Utile per editare un file su un supporto molto lento (ad es. floppy). +Il comando ":set uc=0" ha lo stesso effetto. +Per abilitare il recupero usare ":set uc=200". +.TP +\-nb +Diviene un Editor server per NetBeans. Vedere la documentazione per dettagli. +.TP +\-o[N] +Apri N finestre in orizzontale. +Se N manca, apri una finestra per ciascun file. +.TP +\-O[N] +Apri N finestre, in verticale. +Se N manca, apri una finestra per ciascun file. +.TP +\-R +Modo Read-only (Sola Lettura). +Imposta l'opzione 'readonly'. +Si può ancora modificare il buffer, ma siete protetti da una riscrittura +involontaria. +Se volete davvero riscrivere il file, aggiungete un punto esclamativo +al comando Ex, come in ":w!". +L'opzione \-R implica anche l'opzione \-n (vedere sotto). +L'opzione 'readonly' può essere annullata con ":set noro". +Vedere ":help 'readonly'". +.TP +\-r +Lista file di swap, assieme a dati utili per un recupero. +.TP +\-r {file} +Modo Recovery (ripristino). +Il file di swap è usato per recuperare una sessione di edit finita male. +Il file di swap è un file con lo stesso nome file del file di testo +editato, col suffisso ".swp". +Vedere ":help recovery". +.TP +\-s +Modo silenzioso. Solo quando invocato come "Ex" o quando l'opzione +"\-e" è stata data prima dell'opzione "\-s". +.TP +\-s {scriptin} +Lo script file {scriptin} è letto. +I caratteri nel file sono interpretati come se immessi da voi. +Lo stesso si può ottenere col comando ":source! {scriptin}". +Se la fine del file di input viene raggiunta prima che Vim termini, +l'ulteriore input viene preso dalla tastiera. +.TP +\-T {terminale} +Dice a +.B Vim +quale tipo di terminale state usando. +Utile solo se il terminale non viene riconosciuto correttamente da Vim. +Dovrebbe essere un terminale noto a +.B Vim +(internamente) o definito nel file termcap o terminfo. +.TP +\-u {vimrc} +Usa i comandi nel file {vimrc} per inizializzazioni. +Tutte le altre inizializzazioni non sono eseguite. +Usate questa opzione per editare qualche file di tipo speciale. +Può anche essere usato per non fare alcuna inizializzazione dando +come nome "NONE". +Vedere ":help initialization" da vim per ulteriori dettagli. +.TP +\-U {gvimrc} +Usa i comandi nel file {gvimrc} per inizializzazioni GUI. +Tutte le altre inizializzazioni GUI non sono eseguite. +Può anche essere usata per non fare alcuna inizializzazione GUI dando +come nome "NONE". +Vedere ":help gui-init" da vim per ulteriori dettagli. +.TP +\-V[N] +Verboso. Vim manda messaggi relativi agli script file che esegue +e quando legge o scrive un file viminfo. Il numero opzionale N è il valore +dell'opzione 'verbose'. +Il valore predefinito è 10. +.TP +\-v +Inizia +.B Vim +in Modo Vi, come se il programma eseguibile fosse "vi". Questo ha +effetto solo quando Vim viene invocato con il nome "ex". +.TP +\-w {scriptout} +Ogni carattere immesso viene registrato nel file {scriptout}, +finché non uscite da +.B Vim. +Utile se si vuole creare uno script file da usare con "vim \-s" o +":source!". +Se il file {scriptout} esiste, quel che immettete viene aggiunto in fondo. +.TP +\-W {scriptout} +Come \-w, ma uno script file esistente viene sovrascritto. +.TP +\-x +Uso di cifratura nella scrittura dei file. E' necessario immettere +una chiave di cifratura. +.TP +\-X +Non connetterti al server X. Vim parte più rapidamente, +ma il titolo della finestra e la clipboard non sono disponibili. +.TP +\-y +Eseguire +.B Vim +in Modo Easy (semplificata), come se l'eseguibile invocato +sia "evim" o "eview". +Fa sì che +.B Vim +si comporti come un editor che usa solo il mouse e i caratteri. +.TP +\-Z +Modo ristretto. Vim si comporta come se invocato con un nome +che inizia per "r". +.TP +\-\- +Specifica la fine delle opzioni. +Argomenti specificati dopo questo sono considerati nomi file. +Si può usare per editare un file il cui nome inizi per '-'. +.TP +\-\-echo\-wid +Solo con GUI GTK: Visualizza Window ID su "stdout". +.TP +\-\-help +Vim dà un messaggio ed esce, come con l'argomento "\-h". +.TP +\-\-literal +Considera i nomi passati come argomenti letterali, senza espandere +metacaratteri. Non necessario in Unix, la shell espande i metacaratteri. +.TP +\-\-noplugin +Non caricare plugin. Implicito se si specifica \-u NONE. +.TP +\-\-remote +Connettersi a un server Vim e chiedere di editare i file elencati come altri +argomenti. Se non si trova un server viene dato un messaggio e i file sono +editati nel Vim corrente. +.TP +\-\-remote\-expr {expr} +Connettersi a un server Vim, valutare ivi {expr} e stampare il risultato +su "stdout". +.TP +\-\-remote\-send {chiavi} +Connettersi a un server Vim e spedirgli {chiavi}. +.TP +\-\-remote\-silent +Come \-\-remote, ma senza avvisare se non si trova un server. +.TP +\-\-remote-wait +Come \-\-remote, ma Vim non termina finché i file non sono stati editati. +.TP +\-\-remote\-wait\-silent +Come \-\-remote\-wait, ma senza avvisare se non si trova un server. +.TP +\-\-serverlist +Lista i nomi di tutti i server Vim disponibili. +.TP +\-\-servername {nome} +Usa {nome} come nome server. Usato per il Vim corrente, a meno che sia +usato con l'argomento \-\-remote, nel qual caso indica il server a cui +connettersi. +.TP +\-\-socketid {id} +Solo con GUI GTK: Usa il meccanismo GtkPlug per eseguire gvim in un'altra +finestra. +.TP +\-\-version +Stampa la versione di Vim ed esci. +.SH AIUTO ONLINE +Battere ":help" in +.B Vim +per iniziare. +Battere ":help argomento" per ricevere aiuto su uno specifico argomento. +Per esempio: ":help ZZ" per ricevere aiuto sul comando "ZZ". +Usare <Tab> e CTRL\-D per completare gli argomenti +(":help cmdline\-completion"). +Ci sono "tag" nei file di help per saltare da un argomento a un altro +(simili a legami ipertestuali, vedere ":help"). +Tutti i file di documentazione possono essere navigati così. Ad es.: +":help syntax.txt". +.SH FILE +.TP 15 +/usr/local/lib/vim/doc/*.txt +I file di documentazione di +.B Vim +. +Usate ":help doc\-file\-list" per avere la lista completa. +.TP +/usr/local/lib/vim/doc/tags +Il file di tags usato per trovare informazioni nei file di documentazione. +.TP +/usr/local/lib/vim/syntax/syntax.vim +Inizializzazioni sintattiche a livello di sistema. +.TP +/usr/local/lib/vim/syntax/*.vim +File di colorazione sintattica per vari linguaggi. +.TP +/usr/local/lib/vim/vimrc +Inizializzazioni +.B Vim +a livello di sistema. +.TP +~/.vimrc +Le vostre personali inizializzazioni di +.B Vim +. +.TP +/usr/local/lib/vim/gvimrc +Inizializzazioni gvim a livello di sistema. +.TP +~/.gvimrc +Le vostre personali inizializzazioni di gvim. +.TP +/usr/local/lib/vim/optwin.vim +Script Vim usato dal comando ":options", un modo semplice +per visualizzare e impostare opzioni. +.TP +/usr/local/lib/vim/menu.vim +Inizializzazioni del menù gvim a livello di sistema. +.TP +/usr/local/lib/vim/bugreport.vim +Script Vim per generare una segnalazione di errore. Vedere ":help bugs". +.TP +/usr/local/lib/vim/filetype.vim +Script Vim per determinare il tipo di un file a partire dal suo nome. +Vedere ":help 'filetype'". +.TP +/usr/local/lib/vim/scripts.vim +Script Vim per determinare il tipo di un file a partire dal suo contenuto. +Vedere ":help 'filetype'". +.TP +/usr/local/lib/vim/print/*.ps +File usati per stampa PostScript. +.PP +Per informazioni aggiornate [in inglese \- NdT] vedere la home page di Vim: +.br +<URL:http://www.vim.org/> +.SH VEDERE ANCHE +vimtutor(1) +.SH AUTORE +Buona parte di +.B Vim +è stato scritto da Bram Moolenaar, con molto aiuto da altri. +Vedere ":help credits" in +.B Vim. +.br +.B Vim +è basato su Stevie, scritto da: Tim Thompson, +Tony Andrews e G.R. (Fred) Walter. +In verità, poco o nulla è rimasto del loro codice originale. +.SH BACHI +Probabili. +Vedere ":help todo" per una lista di problemi noti. +.PP +Si noti che un certo numero di comportamenti che possono essere considerati +errori da qualcuno, sono in effetti causati da una riproduzione fin troppo +fedele del comportamento di Vi. +Se ritenete che altre cose siano errori "perché Vi si comporta diversamente", +date prima un'occhiata al file vi_diff.txt +(o battere :help vi_diff.txt da Vim). +Date anche un'occhiata alle opzioni 'compatible' e 'cpoptions. diff --git a/runtime/doc/vim-it.UTF-8.1 b/runtime/doc/vim-it.UTF-8.1 new file mode 100644 index 0000000000..51e7e043da --- /dev/null +++ b/runtime/doc/vim-it.UTF-8.1 @@ -0,0 +1,566 @@ +.TH VIM 1 "22 febbraio 2002" +.SH NOME +vim \- VI Migliorato, un editor di testi per programmatori +.SH SINTASSI +.br +.B vim +[opzioni] [file ..] +.br +.B vim +[opzioni] \- +.br +.B vim +[opzioni] \-t tag +.br +.B vim +[opzioni] \-q [file_errori] +.PP +.br +.B ex +.br +.B view +.br +.B gvim +.B gview +.B evim +.B eview +.br +.B rvim +.B rview +.B rgvim +.B rgview +.SH DESCRIZIONE +.B Vim +Un editore di testi, compatibile con, e migliore di, Vi. +Può essere usato per editare qualsiasi file di testo. +Particolarmente utile per editare programmi. +.PP +Ci sono parecchi miglioramenti rispetto a Vi: undo multipli, +finestre e buffer multipli, evidenziazione sintattica, possibilità +di modificare la linea di comando, completamento nomi file, help +in linea, selezione testi in Modo Visual, etc.. +Vedere ":help vi_diff.txt" per un sommario delle differenze fra +.B Vim +e Vi. +.PP +Mentre usate +.B Vim +potete ricevere molto aiuto dal sistema di help online, col comando ":help". +Vedere qui sotto la sezione AIUTO ONLINE. +.PP +Quasi sempre +.B Vim +viene invocato, per modificare un file, col comando +.PP + vim nome_file +.PP +Più in generale +.B Vim +viene invocato con: +.PP + vim [opzioni] [lista_file] +.PP +Se lista_file non è presente, l'editor inizia aprendo un buffer vuoto. +Altrimenti, una e una sola delle quattro maniere indicate qui sotto può +essere usata per scegliere uno o più file da modificare. +.TP 12 +nome_file .. +Una lista di nomi di file. +Il primo di questi sarà il file corrente, e verrà letto nel buffer. +Il cursore sarà posizionato sulla prima linea del buffer. +Potete arrivare agli altri file col comando ":next". +Per editare un file il cui nome inizia per "\-" premettete "\-\-" alla +lista_file. +.TP +\- +Il file da editare è letto dallo "stdin" [di solito, ma non +necessariamente, il terminale \- NdT]. I comandi sono letti da "stderr", +che dovrebbe essere un terminale [tty]. +.TP +\-t {tag} +Il file da editare e la posizione iniziale del cursore dipendono da "tag", +una specie di "etichetta" a cui saltare. +{tag} viene cercata nel file "tags", ed il file ad essa associato diventa +quello corrente, ed il comando ad essa associato viene eseguito. +Di solito si usa per programmi C, nel qual caso {tag} potrebbe essere un +nome di funzione. +L'effetto è che il file contenente quella funzione diventa il file corrente +e il cursore è posizionato all'inizio della funzione. +Vedere ":help tag\-commands". +.TP +\-q [file_errori] +Inizia in Modo QuickFix [correzione veloce]. +Il file [file_errori] è letto e il primo errore è visualizzato. +Se [file_errori] non è indicato, il suo nome è ottenuto dal valore +dell'opzione 'errorfile' (che, se non specificata, vale "AztecC.Err" +per l'Amiga, "errors.err" su altri sistemi). +Si può saltare all'errore successivo col comando ":cn". +Vedere ":help quickfix". +.PP +.B Vim +si comporta in modo diverso se invocato con nomi differenti (il programma +eseguibile "sottostante" può essere sempre lo stesso). +.TP 10 +vim +Modo Normal, comportamento normale. +.TP +ex +Inizia in Modo "Ex". +Si può passare in Modo Normal col comando ":vi". +Si può invocare il Modo "Ex" anche con l'argomento "\-e". +.TP +view +Inizia in Modo Read-only (Sola Lettura). Non potete modificare i file. +Si può invocare il Modo Read-only anche con l'argomento "\-R". +.TP +gvim gview +La versione GUI [Graphical User Interface]. +Apre una nuova finestra. +Si può invocare il Modo GUI anche con l'argomento "\-g". +.TP +evim eview +La versione GUI in Modo Easy (semplificata). +Apre una nuova finestra. +Si può invocare il Modo Easy anche con l'argomento "\-y". +.TP +rvim rview rgvim rgview +Come sopra, ma con restrizioni ai comandi. Non si potranno eseguire comandi +della shell o sospendere +.B Vim. +Si può chiedere la stessa cosa anche con l'argomento "\-Z". +.SH OPZIONI +Le opzioni possono essere in un ordine qualsiasi, prima o dopo i nomi di +file. Opzioni che non necessitano un argomento possono essere specificate +dietro a un solo "\-". +.TP 12 ++[numero] +Per il primo file il cursore sarà posizionato sulla linea "numero". +Se "numero" manca, il cursore sarà posizionato sull'ultima linea del file. +.TP ++/{espressione} +Per il primo file il cursore sarà posizionato alla +prima occorrenza di {espressione}. +Vedere ":help search\-pattern" per come specificare l'espressione. +.TP ++{comando} +.TP +\-c {comando} +{comando} sarà eseguito dopo che il +primo file è stato letto. +{comando} è interpretato come un comando Ex. +Se il {comando} contiene spazi deve essere incluso fra doppi apici +(o altro delimitatore, a seconda della shell che si sta usando). +Esempio: Vim "+set si" main.c +.br +Note: Si possono avere fino a 10 comandi "+" o "\-c". +.TP +\-S {file} +I comandi contenuti in {file} sono eseguiti dopo la lettura del primo file. +Equivalente a \-c "source {file}". +{file} non può avere un nome che inizia per '\-'. +Se {file} è omesso si usa "Session.vim" (funziona solo se \-S è l'ultimo +argomento specificato). +.TP +\-\-cmd {comando} +Come "\-c", ma il comando è eseguito PRIMA +di eseguire qualsiasi file vimrc. +Si possono usare fino a 10 di questi comandi, indipendentemente dai comandi +"\-c". +.TP +\-A +Se +.B Vim +è stato compilato con supporto Arabic per editare file con orientamento +destra-sinistra e tastiera con mappatura Araba, questa opzione inizia +.B Vim +in Modo Arabic, cioè impostando 'arabic'. +Altrimenti viene dato un messaggio di errore e +.B Vim +termina in modo anormale. +.TP +\-b +Modo Binary (binario). +Vengono impostate alcune opzioni che permettono di modificare un file +binario o un programma eseguibile. +.TP +\-C +Compatibile. Imposta l'opzione 'compatible'. +In questo modo +.B Vim +ha quasi lo stesso comportamento di Vi, anche in presenza di un file +di configurazione .vimrc [proprio di Vim, vi usa .exrc \- Ndt]. +.TP +\-d +Inizia in Modo Diff [differenze]. +Dovrebbero esserci come argomenti due o tre o quattro nomi di file. +.B Vim +aprirà tutti i file evidenziando le differenze fra gli stessi. +Funziona come vimdiff(1). +.TP +\-d {dispositivo} +Apre {dispositivo} per usarlo come terminale. +Solo per l'Amiga. +Esempio: +"\-d con:20/30/600/150". +.TP +\-D +Debugging. Vim si mette in Modo "debugging" a partire +dall'esecuzione del primo comando da uno script. +.TP +\-e +Eseguire +.B Vim +in Modo Ex, come se il programma eseguito sia "ex". +.TP +\-E +Eseguire +.B Vim +in Modo Ex migliorato, come se il programma eseguito sia "exim". +.TP +\-f +Direttamente [Foreground]. Per la versione GUI, +.B Vim +non crea [fork] una nuova finestra, indipendente dalla shell di invocazione. +Per l'Amiga, +.B Vim +non è fatto ripartire per aprire una nuova finestra. +Opzione da usare quando +.B Vim +è eseguito da un programma che attende la fine della +sessione di edit (ad es. mail). +Sull'Amiga i comandi ":sh" e ":!" non sono disponibili. +.TP +\-\-nofork +Direttamente [Foreground]. Per la versione GUI, +.B Vim +non crea [fork] una nuova finestra, indipendente dalla shell di invocazione. +.TP +\-F +Se +.B Vim +è stato compilato con supporto FKMAP per editare file con orientamento +destra-sinistra e tastiera con mappatura Farsi, questa opzione inizia +.B Vim +in Modo Farsi, cioè impostando 'fkmap' e 'rightleft'. +Altrimenti viene dato un messaggio di errore e +.B Vim +termina in modo anormale. +.TP +\-g +Se +.B Vim +è stato compilato con supporto GUI, questa opzione chiede di usarla. +Se Vim è stato compilato senza supporto GUI viene dato un messaggio di errore e +.B Vim +termina in modo anormale. +.TP +\-h +Un po' di aiuto su opzioni e argomenti che si possono dare invocando Vim. +Subito dopo +.B Vim +esce. +.TP +\-H +Se +.B Vim +è stato compilato col supporto RIGHTLEFT per editare file con orientamento +destra-sinistra e tastiera con mappatura Ebraica, questa opzione inizia +.B Vim +in Modo Ebraico, cioè impostando 'hkmap' e 'rightleft'. +Altrimenti viene dato un messaggio di errore e +.B Vim +termina in modo anormale. +.TP +\-i {viminfo} +Se è abilitato l'uso di un file viminfo, questa opzione indica il nome +del file da usare invece di quello predefinito "~/.viminfo". +Si può anche evitare l'uso di un file .viminfo, dando come nome "NONE". +.TP +\-L +Equivalente a \-r. +.TP +\-l +Modo Lisp. +Imposta le opzioni 'lisp' e 'showmatch'. +.TP +\-m +Inibisce modifica file. +Annulla l'opzione 'write'. +È ancora possibile modificare un buffer [in memoria \- Ndt], ma non scriverlo. +.TP +\-M +Modifiche non permesse. Le opzioni 'modifiable' e 'write' sono annullate, +in modo da impedire sia modifiche che riscritture. Da notare che queste +opzioni possono essere abilitate in seguito, permettendo così modifiche. +.TP +\-N +Modo "Non-compatibile". Annulla l'opzione 'compatible'. +Così +.B Vim +va un po' meglio, ma è meno compatibile con Vi, anche in assenza di un +file .vimrc. +.TP +\-n +Inibisce l'uso di un file di swap. +Il recupero dopo una caduta di macchina diventa impossibile. +Utile per editare un file su un supporto molto lento (ad es. floppy). +Il comando ":set uc=0" ha lo stesso effetto. +Per abilitare il recupero usare ":set uc=200". +.TP +\-nb +Diviene un Editor server per NetBeans. Vedere la documentazione per dettagli. +.TP +\-o[N] +Apri N finestre in orizzontale. +Se N manca, apri una finestra per ciascun file. +.TP +\-O[N] +Apri N finestre, in verticale. +Se N manca, apri una finestra per ciascun file. +.TP +\-R +Modo Read-only (Sola Lettura). +Imposta l'opzione 'readonly'. +Si può ancora modificare il buffer, ma siete protetti da una riscrittura +involontaria. +Se volete davvero riscrivere il file, aggiungete un punto esclamativo +al comando Ex, come in ":w!". +L'opzione \-R implica anche l'opzione \-n (vedere sotto). +L'opzione 'readonly' può essere annullata con ":set noro". +Vedere ":help 'readonly'". +.TP +\-r +Lista file di swap, assieme a dati utili per un recupero. +.TP +\-r {file} +Modo Recovery (ripristino). +Il file di swap è usato per recuperare una sessione di edit finita male. +Il file di swap è un file con lo stesso nome file del file di testo +editato, col suffisso ".swp". +Vedere ":help recovery". +.TP +\-s +Modo silenzioso. Solo quando invocato come "Ex" o quando l'opzione +"\-e" è stata data prima dell'opzione "\-s". +.TP +\-s {scriptin} +Lo script file {scriptin} è letto. +I caratteri nel file sono interpretati come se immessi da voi. +Lo stesso si può ottenere col comando ":source! {scriptin}". +Se la fine del file di input viene raggiunta prima che Vim termini, +l'ulteriore input viene preso dalla tastiera. +.TP +\-T {terminale} +Dice a +.B Vim +quale tipo di terminale state usando. +Utile solo se il terminale non viene riconosciuto correttamente da Vim. +Dovrebbe essere un terminale noto a +.B Vim +(internamente) o definito nel file termcap o terminfo. +.TP +\-u {vimrc} +Usa i comandi nel file {vimrc} per inizializzazioni. +Tutte le altre inizializzazioni non sono eseguite. +Usate questa opzione per editare qualche file di tipo speciale. +Può anche essere usato per non fare alcuna inizializzazione dando +come nome "NONE". +Vedere ":help initialization" da vim per ulteriori dettagli. +.TP +\-U {gvimrc} +Usa i comandi nel file {gvimrc} per inizializzazioni GUI. +Tutte le altre inizializzazioni GUI non sono eseguite. +Può anche essere usata per non fare alcuna inizializzazione GUI dando +come nome "NONE". +Vedere ":help gui-init" da vim per ulteriori dettagli. +.TP +\-V[N] +Verboso. Vim manda messaggi relativi agli script file che esegue +e quando legge o scrive un file viminfo. Il numero opzionale N è il valore +dell'opzione 'verbose'. +Il valore predefinito è 10. +.TP +\-v +Inizia +.B Vim +in Modo Vi, come se il programma eseguibile fosse "vi". Questo ha +effetto solo quando Vim viene invocato con il nome "ex". +.TP +\-w {scriptout} +Ogni carattere immesso viene registrato nel file {scriptout}, +finché non uscite da +.B Vim. +Utile se si vuole creare uno script file da usare con "vim \-s" o +":source!". +Se il file {scriptout} esiste, quel che immettete viene aggiunto in fondo. +.TP +\-W {scriptout} +Come \-w, ma uno script file esistente viene sovrascritto. +.TP +\-x +Uso di cifratura nella scrittura dei file. E' necessario immettere +una chiave di cifratura. +.TP +\-X +Non connetterti al server X. Vim parte più rapidamente, +ma il titolo della finestra e la clipboard non sono disponibili. +.TP +\-y +Eseguire +.B Vim +in Modo Easy (semplificata), come se l'eseguibile invocato +sia "evim" o "eview". +Fa sì che +.B Vim +si comporti come un editor che usa solo il mouse e i caratteri. +.TP +\-Z +Modo ristretto. Vim si comporta come se invocato con un nome +che inizia per "r". +.TP +\-\- +Specifica la fine delle opzioni. +Argomenti specificati dopo questo sono considerati nomi file. +Si può usare per editare un file il cui nome inizi per '-'. +.TP +\-\-echo\-wid +Solo con GUI GTK: Visualizza Window ID su "stdout". +.TP +\-\-help +Vim dà un messaggio ed esce, come con l'argomento "\-h". +.TP +\-\-literal +Considera i nomi passati come argomenti letterali, senza espandere +metacaratteri. Non necessario in Unix, la shell espande i metacaratteri. +.TP +\-\-noplugin +Non caricare plugin. Implicito se si specifica \-u NONE. +.TP +\-\-remote +Connettersi a un server Vim e chiedere di editare i file elencati come altri +argomenti. Se non si trova un server viene dato un messaggio e i file sono +editati nel Vim corrente. +.TP +\-\-remote\-expr {expr} +Connettersi a un server Vim, valutare ivi {expr} e stampare il risultato +su "stdout". +.TP +\-\-remote\-send {chiavi} +Connettersi a un server Vim e spedirgli {chiavi}. +.TP +\-\-remote\-silent +Come \-\-remote, ma senza avvisare se non si trova un server. +.TP +\-\-remote-wait +Come \-\-remote, ma Vim non termina finché i file non sono stati editati. +.TP +\-\-remote\-wait\-silent +Come \-\-remote\-wait, ma senza avvisare se non si trova un server. +.TP +\-\-serverlist +Lista i nomi di tutti i server Vim disponibili. +.TP +\-\-servername {nome} +Usa {nome} come nome server. Usato per il Vim corrente, a meno che sia +usato con l'argomento \-\-remote, nel qual caso indica il server a cui +connettersi. +.TP +\-\-socketid {id} +Solo con GUI GTK: Usa il meccanismo GtkPlug per eseguire gvim in un'altra +finestra. +.TP +\-\-version +Stampa la versione di Vim ed esci. +.SH AIUTO ONLINE +Battere ":help" in +.B Vim +per iniziare. +Battere ":help argomento" per ricevere aiuto su uno specifico argomento. +Per esempio: ":help ZZ" per ricevere aiuto sul comando "ZZ". +Usare <Tab> e CTRL\-D per completare gli argomenti +(":help cmdline\-completion"). +Ci sono "tag" nei file di help per saltare da un argomento a un altro +(simili a legami ipertestuali, vedere ":help"). +Tutti i file di documentazione possono essere navigati così. Ad es.: +":help syntax.txt". +.SH FILE +.TP 15 +/usr/local/lib/vim/doc/*.txt +I file di documentazione di +.B Vim +. +Usate ":help doc\-file\-list" per avere la lista completa. +.TP +/usr/local/lib/vim/doc/tags +Il file di tags usato per trovare informazioni nei file di documentazione. +.TP +/usr/local/lib/vim/syntax/syntax.vim +Inizializzazioni sintattiche a livello di sistema. +.TP +/usr/local/lib/vim/syntax/*.vim +File di colorazione sintattica per vari linguaggi. +.TP +/usr/local/lib/vim/vimrc +Inizializzazioni +.B Vim +a livello di sistema. +.TP +~/.vimrc +Le vostre personali inizializzazioni di +.B Vim +. +.TP +/usr/local/lib/vim/gvimrc +Inizializzazioni gvim a livello di sistema. +.TP +~/.gvimrc +Le vostre personali inizializzazioni di gvim. +.TP +/usr/local/lib/vim/optwin.vim +Script Vim usato dal comando ":options", un modo semplice +per visualizzare e impostare opzioni. +.TP +/usr/local/lib/vim/menu.vim +Inizializzazioni del menù gvim a livello di sistema. +.TP +/usr/local/lib/vim/bugreport.vim +Script Vim per generare una segnalazione di errore. Vedere ":help bugs". +.TP +/usr/local/lib/vim/filetype.vim +Script Vim per determinare il tipo di un file a partire dal suo nome. +Vedere ":help 'filetype'". +.TP +/usr/local/lib/vim/scripts.vim +Script Vim per determinare il tipo di un file a partire dal suo contenuto. +Vedere ":help 'filetype'". +.TP +/usr/local/lib/vim/print/*.ps +File usati per stampa PostScript. +.PP +Per informazioni aggiornate [in inglese \- NdT] vedere la home page di Vim: +.br +<URL:http://www.vim.org/> +.SH VEDERE ANCHE +vimtutor(1) +.SH AUTORE +Buona parte di +.B Vim +è stato scritto da Bram Moolenaar, con molto aiuto da altri. +Vedere ":help credits" in +.B Vim. +.br +.B Vim +è basato su Stevie, scritto da: Tim Thompson, +Tony Andrews e G.R. (Fred) Walter. +In verità, poco o nulla è rimasto del loro codice originale. +.SH BACHI +Probabili. +Vedere ":help todo" per una lista di problemi noti. +.PP +Si noti che un certo numero di comportamenti che possono essere considerati +errori da qualcuno, sono in effetti causati da una riproduzione fin troppo +fedele del comportamento di Vi. +Se ritenete che altre cose siano errori "perché Vi si comporta diversamente", +date prima un'occhiata al file vi_diff.txt +(o battere :help vi_diff.txt da Vim). +Date anche un'occhiata alle opzioni 'compatible' e 'cpoptions. diff --git a/runtime/doc/vim-ja.UTF-8.1 b/runtime/doc/vim-ja.UTF-8.1 new file mode 100644 index 0000000000..a4788b3c48 --- /dev/null +++ b/runtime/doc/vim-ja.UTF-8.1 @@ -0,0 +1,501 @@ +.TH VIM 1 "2006 Apr 11" +.SH åå‰ +vim \- Vi IMproved, プログラマã®ãƒ†ã‚­ã‚¹ãƒˆã‚¨ãƒ‡ã‚£ã‚¿ +.SH æ›¸å¼ +.br +.B vim +[options] [file ..] +.br +.B vim +[options] \- +.br +.B vim +[options] \-t tag +.br +.B vim +[options] \-q [errorfile] +.PP +.br +.B ex +.br +.B view +.br +.B gvim +.B gview +.B evim +.B eview +.br +.B rvim +.B rview +.B rgvim +.B rgview +.SH 説明 +.B Vim +㯠Vi 互æ›ã®ãƒ†ã‚­ã‚¹ãƒˆã‚¨ãƒ‡ã‚£ã‚¿ã§ã™ã€‚ +ã©ã®ã‚ˆã†ãªç¨®é¡žã®ãƒ—レインテキストã§ã‚‚編集ã§ãã¾ã™ã€‚ +特ã«ã€ãƒ—ログラムã®ç·¨é›†ã«åŠ›ã‚’ç™ºæ®ã—ã¾ã™ã€‚ +.PP +Vi ã«å¤šãã®æ”¹è‰¯ãŒåŠ ãˆã‚‰ã‚Œã¦ã„ã¾ã™: +多段アンドゥã€ãƒžãƒ«ãƒã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã€ãƒžãƒ«ãƒãƒãƒƒãƒ•ã‚¡ã€æ§‹æ–‡å¼·èª¿è¡¨ç¤ºã€ +コマンドライン編集ã€ãƒ•ァイルå補完ã€ãƒ˜ãƒ«ãƒ—ã€ãƒ“ã‚¸ãƒ¥ã‚¢ãƒ«é¸æŠžã€ãªã©ãªã©ã€‚ +.B Vim +㨠Vi ã®é•ã„ã«ã¤ã„ã¦ã®è¦ç´„㯠":help vi_diff.txt" ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +.PP +.B Vim +ã®å®Ÿè¡Œä¸­ã¯ ":help" コマンドã§ãƒ˜ãƒ«ãƒ—を引ãã“ã¨ãŒã§ãã¾ã™ã€‚ +下記ã€ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ãƒ˜ãƒ«ãƒ—ã®é …ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +.PP +.B Vim +ã¯æ¬¡ã®ã‚ˆã†ãªã‚³ãƒžãƒ³ãƒ‰ã§èµ·å‹•ã§ãã¾ã™ã€‚ +.PP + vim file +.PP +æ­£ç¢ºãªæ›¸å¼ã¯æ¬¡ã®é€šã‚Šã§ã™: +.PP + vim [options] [filelist] +.PP +filelist ã‚’çœç•¥ã—ãŸå ´åˆã¯ã€ç©ºã®ãƒãƒƒãƒ•ã‚¡ãŒé–‹ã‹ã‚Œã¾ã™ã€‚ +指定ã—ãŸå ´åˆã¯ã€ä»¥ä¸‹ã®å››ã¤ã®ã†ã¡ã©ã‚Œã‹ä¸€ã¤ã®æ–¹æ³•ã§ãƒ•ァイルãŒé–‹ã‹ã‚Œã¾ã™ã€‚ +.TP 12 +file .. +ファイルã®ãƒªã‚¹ãƒˆã€‚ +一番目ã®ãƒ•ァイルãŒã‚«ãƒ¬ãƒ³ãƒˆãƒ•ァイルã«ãªã‚Šã€ãƒãƒƒãƒ•ã‚¡ã«èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ +カーソルã¯ã€ãƒãƒƒãƒ•ã‚¡ã®ä¸€è¡Œç›®ã«ç½®ã‹ã‚Œã¾ã™ã€‚ +ä»–ã®ãƒ•ァイルを表示ã™ã‚‹ã«ã¯ ":next" コマンドを使ã£ã¦ãã ã•ã„。 +ファイルåãŒãƒ€ãƒƒã‚·ãƒ¥ã§å§‹ã¾ã‚‹ãƒ•ァイルを開ãå ´åˆã¯ã€ +filelist ã®å‰ã« "\-\-" を指定ã—ã¦ãã ã•ã„。 +.TP +\- +ãƒ•ã‚¡ã‚¤ãƒ«ã¯æ¨™æº–入力ã‹ã‚‰èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ã‚³ãƒžãƒ³ãƒ‰ã¯æ¨™æº–エラー (ttyã‹ã‚‰ã®å…¥ +力ã«ãªã£ã¦ã„ã‚‹ã¯ãš) ã‹ã‚‰èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ +.TP +\-t {tag} +é–‹ãファイルã¨ã‚«ãƒ¼ã‚½ãƒ«ã®åˆæœŸä½ç½®ã¯ "tag" ã«ä¾å­˜ã—ã¾ã™ã€‚goto label ã®ä¸€ç¨®ã§ã™ã€‚ +tags ファイルã‹ã‚‰ {tag} ãŒæ¤œç´¢ã•れã€é–¢é€£ã—ãŸãƒ•ァイルãŒã‚«ãƒ¬ãƒ³ãƒˆãƒ•ァイルã«ãªã‚Š +ã¾ã™ã€‚ãã—ã¦ã€é–¢é€£ã—ãŸã‚³ãƒžãƒ³ãƒ‰ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ +ã“れã¯ä¸»ã« C 言語ã®ãƒ•ァイルを開ãã¨ãã«ä½¿ã‚れã¾ã™ã€‚ãã®å ´åˆ {tag} ã«é–¢æ•°ãªã© +を指定ã—ã¦ä½¿ã„ã¾ã™ã€‚ +関数をå«ã‚“ã§ã„るファイルãŒé–‹ã‹ã‚Œã€ãã®é–¢æ•°ã®å…ˆé ­ã«ã‚«ãƒ¼ã‚½ãƒ«ãŒç§»å‹•ã™ã‚‹ã€ +ã¨ã„ã†å‹•作ã«ãªã‚Šã¾ã™ã€‚ +詳ã—ã㯠":help tag\-commands" ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +.TP +\-q [errorfile] +クイックフィックスモードã§èµ·å‹•ã—ã¾ã™ã€‚ +[errorfile] ã«æŒ‡å®šã—ãŸãƒ•ァイルãŒèª­ã¿è¾¼ã¾ã‚Œã€æœ€åˆã®ã‚¨ãƒ©ãƒ¼ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +[errorfile] ã‚’çœç•¥ã—ãŸå ´åˆã¯ã€ã‚ªãƒ—ション 'errorfile' ãŒä½¿ã‚れã¾ã™ (åˆæœŸè¨­å®š +ã¯ã€Amiga ã§ã¯ "AztecC.Err"ã€ãã®ä»–ã®ã‚·ã‚¹ãƒ†ãƒ ã§ã¯ "errors.err" ã§ã™)。 +":cn" ã‚³ãƒžãƒ³ãƒ‰ã§æ¬¡ã®ã‚¨ãƒ©ãƒ¼ã«ã‚¸ãƒ£ãƒ³ãƒ—ã§ãã¾ã™ã€‚ +詳ã—ã㯠":help quickfix" ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +.PP +.B Vim +ã¯ã€èµ·å‹•ã•れãŸã¨ãã®å®Ÿè¡Œãƒ•ァイルã®åå‰ã«ã‚ˆã£ã¦å‹•作を変ãˆã¾ã™ +(実行ファイルã®å®Ÿä½“ãŒåŒã˜ã§ã‚ã£ã¦ã‚‚)。 +.TP 10 +vim +"普通" ã«èµ·å‹•ã—ã¾ã™ã€‚標準ã®çŠ¶æ…‹ã§ã™ã€‚ +.TP +ex +Ex モードã§èµ·å‹•ã—ã¾ã™ã€‚ +ノーマルモードã«åˆ‡ã‚Šæ›¿ãˆã‚‹ã«ã¯ ":vi" コマンドを使ã£ã¦ãã ã•ã„。 +引数㫠"\-e" を指定ã—ãŸå ´åˆã¨åŒã˜ã§ã™ã€‚ +.TP +view +読ã¿è¾¼ã¿å°‚用モードã§èµ·å‹•ã—ã¾ã™ã€‚ファイルã®ä¿å­˜ãŒåˆ¶é™ã•れã¾ã™ã€‚ +引数㫠"\-R" を指定ã—ãŸå ´åˆã¨åŒã˜ã§ã™ã€‚ +.TP +gvim gview +GUI ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ +æ–°ã—ã„ウィンドウを開ã„ã¦èµ·å‹•ã—ã¾ã™ã€‚ +引数㫠"\-g" を指定ã—ãŸå ´åˆã¨åŒã˜ã§ã™ã€‚ +.TP +evim eview +簡易モード㮠GUI ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ +æ–°ã—ã„ウィンドウを開ã„ã¦èµ·å‹•ã—ã¾ã™ã€‚ +引数㫠"\-y" を指定ã—ãŸå ´åˆã¨åŒã˜ã§ã™ã€‚ +.TP +rvim rview rgvim rgview +上記ã¨åŒã˜ã§ã™ãŒã€åˆ¶é™ãƒ¢ãƒ¼ãƒ‰ã§èµ·å‹•ã—ã¾ã™ã€‚シェルコマンドを実行ã—ãŸã‚Šã€ +.B Vim +をサスペンドã—ãŸã‚Šã§ããªããªã‚Šã¾ã™ã€‚ +引数㫠"\-Z" を指定ã—ãŸå ´åˆã¨åŒã˜ã§ã™ã€‚ +.SH オプション +ファイルåã®å‰ã§ã‚‚後ã‚ã§ã‚‚ã€å¥½ããªé †ç•ªã§ã‚ªãƒ—ションを指定ã§ãã¾ã™ã€‚ +パラメータを必è¦ã¨ã—ãªã„引数ã¯ã€ä¸€ã¤ã®ãƒ€ãƒƒã‚·ãƒ¥ã«ã¾ã¨ã‚ã¦æŒ‡å®šã§ãã¾ã™ã€‚ +.TP 12 ++[num] +一番目ã®ãƒ•ァイル㮠"num" 行目ã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¾ã™ã€‚ +"num" ã‚’çœç•¥ã—ãŸå ´åˆã¯ã€ä¸€è¡Œç›®ã«ã‚«ãƒ¼ã‚½ãƒ«ãŒç§»å‹•ã—ã¾ã™ã€‚ +.TP ++/{pat} +一番目ã®ãƒ•ァイルã®ã€æœ€åˆã« {pat} ãŒè¦‹ã¤ã‹ã£ãŸè¡Œã«ã‚«ãƒ¼ã‚½ãƒ«ãŒç§»å‹•ã—ã¾ã™ã€‚ +検索パターンã«ã¤ã„ã¦ã¯ ":help search\-pattern" ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +.TP ++{command} +.TP +\-c {command} +一番目ã®ãƒ•ァイルãŒèª­ã¿è¾¼ã¾ã‚ŒãŸå¾Œã« {command} ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ +{command} 㯠Ex コマンドã¨ã—ã¦è§£é‡ˆã•れã¾ã™ã€‚ +{command} ã«ç©ºç™½ã‚’å«ã‚ã‚‹å ´åˆã¯ã€ãƒ€ãƒ–ルクォートã§å›²ã‚“ã§ãã ã•ã„ (シェルã«ä¾å­˜)。 +例: vim "+set si" main.c +.br +Note: "+" 㨠"\-c" ã¯åˆã‚ã›ã¦ 10 個ã¾ã§æŒ‡å®šã§ãã¾ã™ã€‚ +.TP +\-S {file} +一番目ã®ãƒ•ァイルãŒèª­ã¿è¾¼ã¾ã‚ŒãŸå¾Œã« {file} ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ +ã“れ㯠\-c "source {file}" ã¨åŒã˜å‹•作ã§ã™ã€‚ +{file} ã®å…ˆé ­ãŒ '\-' ã®å ´åˆã¯ä½¿ãˆã¾ã›ã‚“。 +{file} ãŒçœç•¥ã•れãŸå ´åˆã¯ã€"Session.vim" ãŒä½¿ã‚れã¾ã™ (ãŸã ã— \-S ãŒæœ€å¾Œã®å¼• +æ•°ã ã£ãŸå ´åˆã®ã¿)。 +.TP +\-\-cmd {command} +"\-c" ã¨åŒã˜ã§ã™ãŒã€vimrc を処ç†ã™ã‚‹å‰ã«ã‚³ãƒžãƒ³ãƒ‰ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ +ã“れらã®ã‚³ãƒžãƒ³ãƒ‰ã¯ "\-c" コマンドã¨ã¯åˆ¥ã«ã€10 個ã¾ã§æŒ‡å®šã§ãã¾ã™ã€‚ +.TP +\-A +アラビア語ãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¦ã€ã‚¢ãƒ©ãƒ“ア語キーマップãŒã‚ã‚‹å ´åˆã¯ã€ +アラビア語モードã§èµ·å‹•ã—ã¾ã™ ('arabic' ãŒã‚ªãƒ³ã«ãªã‚Šã¾ã™)。 +峿¨ªæ›¸ãã®ãƒ•ァイルを編集ã§ãã¾ã™ã€‚ +サãƒãƒ¼ãƒˆã•れã¦ã„ãªã„å ´åˆã¯ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’表示ã—ã¦çµ‚了ã—ã¾ã™ã€‚ +.TP +\-b +ãƒã‚¤ãƒŠãƒªãƒ¢ãƒ¼ãƒ‰ã€‚ +ãƒã‚¤ãƒŠãƒªãƒ•ァイルを編集ãŸã‚ã®ã‚ªãƒ—ションãŒã„ãã¤ã‹è¨­å®šã•れã¾ã™ã€‚ +.TP +\-C +互æ›ãƒ¢ãƒ¼ãƒ‰ã€‚'compatible' オプションãŒã‚ªãƒ³ã«ãªã‚Šã¾ã™ã€‚ + .vimrc ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ‰ç„¡ã«é–¢ã‚らãšã€ +.B Vim +ã®å‹•作㌠Vi 互æ›ã«ãªã‚Šã¾ã™ã€‚ +.TP +\-d +差分モードã§èµ·å‹•ã—ã¾ã™ã€‚ +二ã¤ã‹ä¸‰ã¤ã®å››ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’å¼•æ•°ã«æŒ‡å®šã—ã¦ãã ã•ã„。 +指定ã•れãŸãƒ•ァイルãŒé–‹ã‹ã‚Œã€ãれらã®ãƒ•ァイルã®å·®åˆ†ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +vimdiff(1) ã¨åŒæ§˜ã®å‹•作ã§ã™ã€‚ +.TP +\-d {device} +{device} を端末ã¨ã—ã¦é–‹ãã¾ã™ã€‚ +Amiga ã§ã®ã¿ä½¿ã„ã¾ã™ã€‚ +例: +"\-d con:20/30/600/150". +.TP +\-D +デãƒãƒƒã‚°ã€‚ã‚¹ã‚¯ãƒªãƒ—ãƒˆã®æœ€åˆã®ã‚³ãƒžãƒ³ãƒ‰ãŒå®Ÿè¡Œã•れるã¨ã“ã‚ã‹ã‚‰ãƒ‡ãƒãƒƒã‚°ãƒ¢ãƒ¼ãƒ‰ã‚’é–‹ +å§‹ã—ã¾ã™ã€‚ +.TP +\-e +Ex モードã§èµ·å‹•ã—ã¾ã™ã€‚ +実行ファイルã®åå‰ãŒ "ex" ã®å ´åˆã¨åŒã˜ã§ã™ã€‚ +.TP +\-E +改良版 Ex モードã§èµ·å‹•ã—ã¾ã™ã€‚ +実行ファイルã®åå‰ãŒ "exim" ã®å ´åˆã¨åŒã˜ã§ã™ã€‚ +.TP +\-f +フォアグラウンド。GUI ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã€ãƒ—ロセスをフォークã—ãªããªã‚Šã¾ã™ã€‚ +Amiga ã®å ´åˆã¯ã€æ–°ã—ã„ウィンドウã§å†èµ·å‹•ã—ãªããªã‚Šã¾ã™ã€‚ +メールソフトãªã©ã‹ã‚‰ +.B Vim +ã‚’èµ·å‹•ã—ã¦ã€ç·¨é›†ãŒçµ‚ã‚ã‚‹ã¾ã§å¾…機ã—ãŸã„よã†ãªå ´åˆã«ä½¿ã£ã¦ãã ã•ã„。 +Amiga ã§ã¯ã€":sh" 㨠"!" ã‚³ãƒžãƒ³ãƒ‰ã¯æ©Ÿèƒ½ã—ãªããªã‚Šã¾ã™ã€‚ +.TP +\-\-nofork +フォアグラウンド。GUI ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã€ãƒ—ロセスをフォークã—ãªããªã‚Šã¾ã™ã€‚ +.TP +\-F +ペルシア語ãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¦ã€ãƒšãƒ«ã‚·ã‚¢èªžã‚­ãƒ¼ãƒžãƒƒãƒ—ãŒã‚ã‚‹å ´åˆã¯ã€ +ペルシア語モードã§èµ·å‹•ã—ã¾ã™ ('fkmap' 㨠'rightleft' ãŒã‚ªãƒ³ã«ãªã‚Šã¾ã™)。 +峿¨ªæ›¸ãã®ãƒ•ァイルを編集ã§ãã¾ã™ã€‚ +サãƒãƒ¼ãƒˆã•れã¦ã„ãªã„å ´åˆã¯ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’表示ã—ã¦çµ‚了ã—ã¾ã™ã€‚ +.TP +\-g +GUI ãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã‚‹å ´åˆã¯ã€GUI ã§èµ·å‹•ã—ã¾ã™ã€‚ +サãƒãƒ¼ãƒˆã•れã¦ã„ãªã„å ´åˆã¯ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’表示ã—ã¦çµ‚了ã—ã¾ã™ã€‚ +.TP +\-h +コマンドライン引数やオプションã®ãƒ˜ãƒ«ãƒ—を表示ã—ã¦çµ‚了ã—ã¾ã™ã€‚ +.TP +\-H +ヘブライ語ãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¦ã€ãƒ˜ãƒ–ライ語キーマップãŒã‚ã‚‹å ´åˆã¯ã€ +ヘブライ語モードã§èµ·å‹•ã—ã¾ã™ ('hkmap' 㨠'rightleft' ãŒã‚ªãƒ³ã«ãªã‚Šã¾ã™)。 +峿¨ªæ›¸ãã®ãƒ•ァイルを編集ã§ãã¾ã™ã€‚ +サãƒãƒ¼ãƒˆã•れã¦ã„ãªã„å ´åˆã¯ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’表示ã—ã¦çµ‚了ã—ã¾ã™ã€‚ +.TP +\-i {viminfo} +viminfo ファイルを使ã†è¨­å®šã«ãªã£ã¦ã„ã‚‹å ´åˆã¯ã€åˆæœŸè¨­å®šã® "~/.viminfo" ã®ä»£ã‚ +りã«ã€æŒ‡å®šã•れãŸãƒ•ァイルを設定ã—ã¾ã™ã€‚ +"NONE" を指定ã™ã‚‹ã¨ã€.viminfo ファイルを使ã‚ãªã„よã†ã«è¨­å®šã§ãã¾ã™ã€‚ +.TP +\-L +\-r ã¨åŒã˜ã§ã™ã€‚ +.TP +\-l +lisp モード。 +オプション㮠'lisp' 㨠'showmatch' ãŒã‚ªãƒ³ã«ãªã‚Šã¾ã™ã€‚ +.TP +\-m +ファイルã®å¤‰æ›´ã‚’ä¸å¯èƒ½ã«ã—ã¾ã™ã€‚ +オプション 'write' ãŒã‚ªãƒ•ã«ãªã‚Šã¾ã™ã€‚ +ãƒãƒƒãƒ•ァを変更ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã™ãŒã€ãƒ•ァイルをä¿å­˜ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +.TP +\-M +変更をä¸å¯èƒ½ã«ã—ã¾ã™ã€‚オプション㮠'modifiable' 㨠'write' ãŒã‚ªãƒ•ã«ãªã‚Šã€ +ファイルã®å¤‰æ›´ã¨ä¿å­˜ãŒã§ããªããªã‚Šã¾ã™ã€‚ +Note: ãれらã®ã‚ªãƒ—ションを設定ã™ã‚Œã°å¤‰æ›´ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ +.TP +\-N +éžäº’æ›ãƒ¢ãƒ¼ãƒ‰ã€‚'compatible' オプションãŒã‚ªãƒ•ã«ãªã‚Šã¾ã™ã€‚ + .vimrc ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ‰ç„¡ã«é–¢ã‚らãšã€ +.B Vim +ã®æ”¹è‰¯ã•ã‚ŒãŸæ©Ÿèƒ½ãŒæœ‰åйã«ãªã‚Šã¾ã™ã€‚Vi ã¨ã®äº’æ›æ€§ãŒå°‘ã—失ã‚れã¾ã™ã€‚ +.TP +\-n +スワップファイルを使用ã—ã¾ã›ã‚“。 +クラッシュã—ã¦ã‚‚リカãƒãƒªã§ããªããªã‚Šã¾ã™ã€‚ +フロッピーディスクã®ã‚ˆã†ãªéžå¸¸ã«ä½Žé€Ÿãªãƒ¡ãƒ‡ã‚£ã‚¢ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’èª­ã¿æ›¸ãã™ã‚‹ã¨ãã« +便利ã§ã™ã€‚ +":set uc=0" ã¨è¨­å®šã—ã¦ã‚‚åŒã˜ã§ã™ã€‚ +戻ã™ã«ã¯ ":set uc=200" ã¨è¨­å®šã—ã¦ãã ã•ã„。 +.TP +\-nb +NetBeans ã¨æŽ¥ç¶šã—ã€ã‚¨ãƒ‡ã‚£ã‚¿ã‚µãƒ¼ãƒãƒ¼ã«ãªã‚Šã¾ã™ã€‚ +詳ã—ãã¯ãƒ˜ãƒ«ãƒ—ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +.TP +\-o[N] +N 個ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’水平分割ã§é–‹ãã¾ã™ã€‚ +N ã‚’çœç•¥ã—ãŸå ´åˆã¯ã€å¼•æ•°ã®ãƒ•ァイルを個別ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§é–‹ãã¾ã™ã€‚ +.TP +\-O[N] +N 個ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’垂直分割ã§é–‹ãã¾ã™ã€‚ +N ã‚’çœç•¥ã—ãŸå ´åˆã¯ã€å¼•æ•°ã®ãƒ•ァイルを個別ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§é–‹ãã¾ã™ã€‚ +.TP +\-p[N] +N 個ã®ã‚¿ãƒ–ページを開ãã¾ã™ã€‚ +N ã‚’çœç•¥ã—ãŸå ´åˆã¯ã€å¼•æ•°ã®ãƒ•ァイルを個別ã®ã‚¿ãƒ–ページã§é–‹ãã¾ã™ã€‚ +.TP +\-R +読ã¿è¾¼ã¿å°‚用モード。 +オプション 'readonly' ãŒã‚ªãƒ³ã«ãªã‚Šã¾ã™ã€‚ +ãƒãƒƒãƒ•ァを変更ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã™ãŒã€é–“é•ã£ã¦ãƒ•ァイルを上書ãã—ã¦ã—ã¾ã†ã®ã‚’防 +ãã“ã¨ãŒã§ãã¾ã™ã€‚ +ファイルをä¿å­˜ã—ãŸã„å ´åˆã¯ã€":w!" ã®ã‚ˆã†ã«ã€Ex ã‚³ãƒžãƒ³ãƒ‰ã«æ„Ÿå˜†ç¬¦ã‚’付ã‘ã¦ãã  +ã•ã„。 +\-R オプション㯠\-n オプションã®åŠ¹æžœã‚‚å«ã‚“ã§ã„ã¾ã™ (下記å‚ç…§)。 +オプション 'readonly' 㯠":set noro" ã§ã‚ªãƒ•ã«ã§ãã¾ã™ã€‚ +詳ã—ã㯠":help 'readonly'" ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +.TP +\-r +スワップファイルã®ä¸€è¦§ã‚’表示ã—ã¾ã™ã€‚リカãƒãƒªã«é–¢ã™ã‚‹æƒ…報も表示ã•れã¾ã™ã€‚ +.TP +\-r {file} +リカãƒãƒªãƒ¢ãƒ¼ãƒ‰ã€‚ +スワップファイルを使ã£ã¦ã€ã‚¯ãƒ©ãƒƒã‚·ãƒ¥ã—ãŸç·¨é›†ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’復活ã•ã›ã¾ã™ã€‚ +スワップファイルã¯ã€ãƒ•ァイルåã« ".swp" を加ãˆãŸåå‰ã®ãƒ•ァイルã§ã™ã€‚ +詳ã—ã㯠":help recovery" ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +.TP +\-s +サイレントモード。"ex" ã¨ã„ã†åå‰ã§èµ·å‹•ã™ã‚‹ã‹ã€"\-e" オプションã®å¾Œã§ +"\-s" ã‚ªãƒ—ã‚·ãƒ§ãƒ³ãŒæŒ‡å®šã•れãŸå ´åˆã®ã¿ã€‚ +.TP +\-s {scriptin} +{scriptin} をスクリプトファイルã¨ã—ã¦èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ +ãƒ•ã‚¡ã‚¤ãƒ«ä¸­ã®æ–‡å­—列ã¯ã€æ‰‹ã§å…¥åŠ›ã—ãŸã¨ãã¨åŒã˜ã‚ˆã†ã«å‡¦ç†ã•れã¾ã™ã€‚ +ã“れ㯠":source! {scriptin}" ã¨åŒã˜å‹•作ã§ã™ã€‚ +エディタãŒçµ‚了ã™ã‚‹å‰ã«ãƒ•ァイルã®çµ‚ã‚りã¾ã§èª­ã¿è¾¼ã‚“ã å ´åˆã€ +ãれ以é™ã¯ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ã‹ã‚‰å…¥åŠ›ã‚’èª­ã¿è¾¼ã¿ã¾ã™ã€‚ +.TP +\-T {terminal} +端末ã®åå‰ã‚’指定ã—ã¾ã™ã€‚ +端末ãŒè‡ªå‹•çš„ã«èªè­˜ã•れãªã„å ´åˆã«ä½¿ã£ã¦ãã ã•ã„。 +Vim ãŒçµ„ã¿è¾¼ã¿ã§ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã‚‹åå‰ã‹ã€ +termcap ã¾ãŸã¯ terminfo ファイルã§å®šç¾©ã•れã¦ã„ã‚‹åå‰ã‚’指定ã—ã¦ãã ã•ã„。 +.TP +\-u {vimrc} +{vimrc} ファイルを使ã£ã¦åˆæœŸåŒ–ã—ã¾ã™ã€‚ +ä»–ã®åˆæœŸåŒ–処ç†ã¯ã‚¹ã‚­ãƒƒãƒ—ã•れã¾ã™ã€‚ +特殊ãªãƒ•ァイルを編集ã™ã‚‹å ´åˆãªã©ã«ä½¿ã£ã¦ãã ã•ã„。 +ã™ã¹ã¦ã®åˆæœŸåŒ–をスキップã™ã‚‹ã«ã¯ "NONE" を指定ã—ã¦ãã ã•ã„。 +詳ã—ã㯠":help initialization" ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +.TP +\-U {gvimrc} +{gvimrc} ファイルを使ã£ã¦ GUI ã‚’åˆæœŸåŒ–ã—ã¾ã™ã€‚ +ä»–ã® GUI ã®åˆæœŸåŒ–ã¯ã‚¹ã‚­ãƒƒãƒ—ã•れã¾ã™ã€‚ +ã™ã¹ã¦ã® GUI ã®åˆæœŸåŒ–をスキップã™ã‚‹ã«ã¯ "NONE" を指定ã—ã¦ãã ã•ã„。 +詳ã—ã㯠":help gui\-init" ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +.TP +\-V[N] +冗長モード。スクリプトファイルを実行ã—ãŸã‚Š viminfo ãƒ•ã‚¡ã‚¤ãƒ«ã‚’èª­ã¿æ›¸ãã™ã‚‹ãŸ +ã³ã«ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’表示ã—ã¾ã™ã€‚N ã«æŒ‡å®šã—ãŸæ•°å€¤ãŒ 'verbose' ã«è¨­å®šã•れã¾ã™ã€‚ +çœç•¥ã—ãŸå ´åˆã¯ 10 ã«ãªã‚Šã¾ã™ã€‚ +.TP +\-v +Vi モードã§èµ·å‹•ã—ã¾ã™ã€‚ +実行ファイルã®åå‰ãŒ "vi" ã®å ´åˆã¨åŒã˜ã§ã™ã€‚ +実行ファイルã®åå‰ãŒ "ex" ã®å ´åˆã ã‘効果ãŒã‚りã¾ã™ã€‚ +.TP +\-w {scriptout} +入力ã—ãŸæ–‡å­—ã‚’ {scriptout} ã«è¨˜éŒ²ã—ã¾ã™ã€‚ +"vim \-s" ã‚„ "source!" ã§å®Ÿè¡Œã™ã‚‹ãŸã‚ã®ã‚¹ã‚¯ãƒªãƒ—トファイルを作æˆã™ã‚‹ã®ã«ä¾¿åˆ© +ã§ã™ã€‚ +{scriptout} ファイルãŒã™ã§ã«å­˜åœ¨ã—ãŸå ´åˆã¯è¿½åŠ ä¿å­˜ã•れã¾ã™ã€‚ +.TP +\-W {scriptout} +\-w ã¨åŒã˜ã§ã™ãŒã€ãƒ•ァイルãŒã™ã§ã«å­˜åœ¨ã—ãŸå ´åˆã¯ä¸Šæ›¸ãã•れã¾ã™ã€‚ +.TP +\-x +ファイルを暗å·åŒ–ã—ã¦æ›¸ãè¾¼ã¿ã¾ã™ã€‚æš—å·åŒ–キーã®å…¥åŠ›ãƒ—ãƒ­ãƒ³ãƒ—ãƒˆãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +.TP +\-X +X サーãƒãƒ¼ã¨é€šä¿¡ã—ã¾ã›ã‚“。端末ã§ã®èµ·å‹•時間を短ãã§ãã¾ã™ã€‚ +ã—ã‹ã—ã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚¿ã‚¤ãƒˆãƒ«ã®å¤‰æ›´ã‚„クリップボードã¯ä½¿ãˆãªããªã‚Šã¾ã™ã€‚ +.TP +\-y +簡易モードã§èµ·å‹•ã—ã¾ã™ã€‚ +実行ファイルã®åå‰ãŒ "evim" ã‚„ "eview" ã®å ´åˆã¨åŒã˜ã§ã™ã€‚ +.B Vim +ã®å‹•作ãŒãƒ¢ãƒ¼ãƒ‰ãƒ¬ã‚¹ã‚¨ãƒ‡ã‚£ã‚¿ (click-and-type editor) ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ +.TP +\-Z +制é™ãƒ¢ãƒ¼ãƒ‰ã€‚ +実行ファイルã®åå‰ãŒ "r" ã§å§‹ã¾ã£ã¦ã„ã‚‹å ´åˆã¨åŒã˜ã§ã™ã€‚ +.TP +\-\- +ã‚ªãƒ—ã‚·ãƒ§ãƒ³æŒ‡å®šã®æœ«å°¾ã‚’示ã™è¨˜å·ã§ã™ã€‚ +ã“れ以é™ã®å¼•æ•°ã¯ã™ã¹ã¦ãƒ•ァイルåã¨ã—ã¦æ‰±ã‚れã¾ã™ã€‚ +ファイルå㌠'\-' ã§å§‹ã¾ã£ã¦ã„るファイルを開ãã¨ãã«ä½¿ã£ã¦ãã ã•ã„。 +.TP +\-\-echo\-wid +GTK GUI ã®ã¿: Window ID を標準出力ã«å‡ºåŠ›ã—ã¾ã™ã€‚ +.TP +\-\-help +ヘルプを表示ã—ã¦çµ‚了ã—ã¾ã™ã€‚"\-h" ã¨åŒã˜ã§ã™ã€‚ +.TP +\-\-literal +引数ã®ãƒ•ァイルåをリテラル文字列ã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚ワイルドカードを展開ã—ã¾ã› +ん。Unix ã®ã‚ˆã†ã«ã€ã‚·ã‚§ãƒ«ãŒãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã‚’展開ã™ã‚‹å ´åˆã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“。 +.TP +\-\-noplugin +プラグインをロードã—ã¾ã›ã‚“。\-u NONE ã¯ã“ã®å‹•作をå«ã‚“ã§ã„ã¾ã™ã€‚ +.TP +\-\-remote +Vim サーãƒãƒ¼ã¨é€šä¿¡ã—ã€å¼•æ•°ã«æŒ‡å®šã•れãŸãƒ•ァイルを Vim サーãƒãƒ¼ã§é–‹ãã¾ã™ã€‚ +サーãƒãƒ¼ãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ã€ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’表示ã•れã€èµ·å‹•中㮠Vim ã§ãƒ•ã‚¡ +イルãŒé–‹ã‹ã‚Œã¾ã™ã€‚ +.TP +\-\-remote\-expr {expr} +Vim サーãƒãƒ¼ã¨é€šä¿¡ã—ã€{expr} ã«ä¸Žãˆã‚‰ã‚ŒãŸå¼ã‚’ Vim サーãƒãƒ¼ã§å®Ÿè¡Œã—ã€çµæžœã‚’標 +準出力ã«å‡ºåŠ›ã—ã¾ã™ã€‚ +.TP +\-\-remote\-send {keys} +Vim サーãƒãƒ¼ã¨é€šä¿¡ã—ã€{keys} ã«ä¸Žãˆã‚‰ã‚ŒãŸã‚­ãƒ¼ã‚’ Vim サーãƒãƒ¼ã«é€ä¿¡ã—ã¾ã™ã€‚ +.TP +\-\-remote\-silent +\-\-remote ã¨åŒã˜ã§ã™ãŒã€ã‚µãƒ¼ãƒãƒ¼ãŒå­˜åœ¨ã—ãªãã¦ã‚‚エラーメッセージを表示ã—ã¾ +ã›ã‚“。 +.TP +\-\-remote\-wait +\-\-remote ã¨åŒã˜ã§ã™ãŒã€ãƒ•ァイルãŒé–‹ã‹ã‚Œã‚‹ã®ã‚’確èªã§ãã‚‹ã¾ã§å¾…機ã—ã¾ã™ã€‚ +.TP +\-\-remote\-wait\-silent +\-\-remote\-wait ã¨åŒã˜ã§ã™ãŒã€ã‚µãƒ¼ãƒãƒ¼ãŒå­˜åœ¨ã—ãªãã¦ã‚‚エラーメッセージを表 +示ã—ã¾ã›ã‚“。 +.TP +\-\-serverlist +Vim サーãƒãƒ¼ã®ä¸€è¦§ã‚’表示ã—ã¾ã™ã€‚ +.TP +\-\-servername {name} +サーãƒãƒ¼ã®åå‰ã‚’ {name} ã«è¨­å®šã—ã¾ã™ã€‚\-\-remote 引数を指定ã—ãªã‹ã£ãŸå ´åˆ +ã¯ã€èµ·å‹•中㮠Vim ã®åå‰ã¨ã—ã¦ä½¿ã‚れるã®ã§ã€å¾Œã‹ã‚‰ãã®åå‰ã‚’使ã£ã¦ã‚µãƒ¼ãƒãƒ¼é€š +ä¿¡ã§ãã¾ã™ã€‚ +.TP +\-\-socketid {id} +GTK GUI ã®ã¿: GtkPlug メカニズムを使ã£ã¦ gvim を別ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®ä¸­ã§å®Ÿè¡Œã—ã¾ +ã™ã€‚ +.TP +\-\-version +ãƒãƒ¼ã‚¸ãƒ§ãƒ³æƒ…報を表示ã—ã¦çµ‚了ã—ã¾ã™ã€‚ +.SH オンラインヘルプ +ヘルプを開ãã«ã¯ã€ +.B Vim +ã®ä¸­ã§ ":help" ã¨å…¥åŠ›ã—ã¦ãã ã•ã„。 +":help 調ã¹ãŸã„é …ç›®" ã¨å…¥åŠ›ã™ã‚Œã°ã€æŒ‡å®šã—ãŸé …ç›®ã®ãƒ˜ãƒ«ãƒ—ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +例: "ZZ" コマンドã®ãƒ˜ãƒ«ãƒ—を表示ã™ã‚‹ã«ã¯ ":help ZZ" ã¨å…¥åŠ›ã—ã¾ã™ã€‚ +<Tab> ã‚„ CTRL\-D を使ã£ã¦è£œå®Œã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ +(":help cmdline\-completion" å‚ç…§)。 +ヘルプã«ã¯ã€é …ç›®ã‹ã‚‰é …ç›®ã¸ã‚¸ãƒ£ãƒ³ãƒ—ã§ãるよã†ã«ã‚¿ã‚°ãŒåŸ‹ã‚è¾¼ã¾ã‚Œã¦ã„ã¾ã™ +(ãƒã‚¤ãƒ‘ーリンクã®ã‚ˆã†ãªã‚‚ã®ã§ã™ã€‚":help" å‚ç…§)。 +ã™ã¹ã¦ã®ãƒ˜ãƒ«ãƒ—ファイルã¯ã“ã®æ–¹æ³•ã§é–‹ãã“ã¨ãŒã§ãã¾ã™ã€‚ +例: ":help syntax.txt"。 +.SH ファイル +.TP 15 +/usr/local/lib/vim/doc/*.txt +.B Vim +ã®ãƒ˜ãƒ«ãƒ—ファイル。 +ファイルã®ä¸€è¦§ã¯ ":help doc\-file\-list" ã«è¨˜è¼‰ã•れã¦ã„ã¾ã™ã€‚ +.TP +/usr/local/lib/vim/doc/tags +ヘルプを検索ã™ã‚‹ãŸã‚ã® tags ファイル。 +.TP +/usr/local/lib/vim/syntax/syntax.vim +ã‚·ã‚¹ãƒ†ãƒ ã®æ§‹æ–‡å®šç¾©åˆæœŸåŒ–ファイル。 +.TP +/usr/local/lib/vim/syntax/*.vim +ã„ã‚ã„ã‚ãªè¨€èªžç”¨ã®æ§‹æ–‡å®šç¾©ãƒ•ァイル。 +.TP +/usr/local/lib/vim/vimrc +システム㮠+.B Vim +åˆæœŸåŒ–ファイル。 +.TP +~/.vimrc +ユーザー㮠+.B Vim +åˆæœŸåŒ–ファイル。 +.TP +/usr/local/lib/vim/gvimrc +システム㮠gvim åˆæœŸåŒ–ファイル。 +.TP +~/.gvimrc +ユーザー㮠gvim åˆæœŸåŒ–ファイル。 +.TP +/usr/local/lib/vim/optwin.vim +":options" コマンドã§ä½¿ã‚れるファイル。オプションを表示ã—ãŸã‚Šè¨­å®šã—ãŸã‚Šã§ã +ã¾ã™ã€‚ +.TP +/usr/local/lib/vim/menu.vim +システムã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼åˆæœŸåŒ–ファイル。gvim ã§ä½¿ã„ã¾ã™ã€‚ +.TP +/usr/local/lib/vim/bugreport.vim +ãƒã‚°ãƒ¬ãƒãƒ¼ãƒˆã‚’生æˆã™ã‚‹ã‚¹ã‚¯ãƒªãƒ—ト。":help bugs" å‚照。 +.TP +/usr/local/lib/vim/filetype.vim +ファイルåã‹ã‚‰ãƒ•ァイルタイプを判定ã™ã‚‹ã‚¹ã‚¯ãƒªãƒ—ト。":help 'filetype'" å‚照。 +.TP +/usr/local/lib/vim/scripts.vim +ファイルã®å†…容ã‹ã‚‰ãƒ•ァイルタイプを判定ã™ã‚‹ã‚¹ã‚¯ãƒªãƒ—ト。":help 'filetype'" å‚照。 +.TP +/usr/local/lib/vim/print/*.ps +PostScript å°åˆ·ã«ä½¿ã‚れるファイル。 +.PP +æœ€æ–°ã®æƒ…報㯠VIM ã®ãƒ›ãƒ¼ãƒ ãƒšãƒ¼ã‚¸ã‚’å‚ç…§ã—ã¦ãã ã•ã„: +.br +<URL:http://www.vim.org/> +.SH 関連項目 +vimtutor(1) +.SH 著者 +.B Vim +ã®ã»ã¨ã‚“ã©ã®æ©Ÿèƒ½ã¯ Bram Moolenaar ãŒé–‹ç™ºã—ã€å¤šãã®äººãŒå”力ã—ã¾ã—ãŸã€‚ +":help credits" ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +.br +.B Vim +㯠Stevie を基ã«ã—ã¦ã„ã¾ã™ã€‚Stevie 㯠Tim Thompsonã€Tony Andrews〠+G.R. (Fred) Walter ã«ã‚ˆã£ã¦é–‹ç™ºã•れã¾ã—ãŸã€‚ +ãŸã ã—ã€ã‚ªãƒªã‚¸ãƒŠãƒ«ã®ã‚³ãƒ¼ãƒ‰ã¯ã‚‚ã†ã»ã¨ã‚“ã©æ®‹ã£ã¦ã„ã¾ã›ã‚“。 +.SH ãƒã‚° +既知ã®ãƒã‚°ã¯ ":help todo" ã«è¨˜è¼‰ã•れã¦ã„ã¾ã™ã€‚ +.PP +Vi ã®å‹•作を忠実ã«å†ç¾ã—ãŸçµæžœã€å¤šãã®äººãŒãƒã‚°ã ã¨æ€ã†ã‚ˆã†ãªæ©Ÿèƒ½ã‚‚ã„ãã¤ã‹ã‚ +りã¾ã™ã€‚ +"ã“ã®å‹•作㯠Vi ã¨é•ã†" ã‹ã‚‰ãƒã‚°ã ã¨æ€ã£ãŸå ´åˆã¯ã€vi_diff.txtを確èªã—ã¦ã¿ã¦ã +ã ã•ã„ (ファイルを開ãã‹ã€Vim ã‹ã‚‰ ":help vi_diff.txt" ã¨å…¥åŠ›)。 +オプション㮠'compatible' 㨠'cpoptions' も確èªã—ã¦ãã ã•ã„。 diff --git a/runtime/doc/vim-pl.1 b/runtime/doc/vim-pl.1 new file mode 100644 index 0000000000..d506b33c98 --- /dev/null +++ b/runtime/doc/vim-pl.1 @@ -0,0 +1,558 @@ +.TH VIM 1 "2006 kwi 11" +.SH NAME +vim \- Vi rozbudowany, edytor tekstu dla programisty +.SH SYNOPSIS +.br +.B vim +[opcje] [plik ..] +.br +.B vim +[opcje] \- +.br +.B vim +[opcje] \-t znacznik +.br +.B vim +[opcje] \-q [plik_b³êdu] +.PP +.br +.B ex +.br +.B view +.br +.B gvim +.B gview +.B evim +.B eview +.br +.B rvim +.B rview +.B rgvim +.B rgview +.SH OPIS +.B Vim +jest edytorem tekstu kompatybilnym z Vi. Mo¿e byæ +u¿ywany do edycji wszelkiego rodzaju plików tekstowych. +U¿yteczny zw³aszcza przy edycji programów. +.PP +Posiada wiele usprawnieñ w porównaniu z Vi: wielopoziomowe cofanie zmian, +wiele okien i buforów, pod¶wietlanie sk³adni, edycja linii poleceñ, +uzupe³nianie nazw plików, pomoc on-line, wizualna selekcja, itd. +Zobacz ":help vi_diff.txt" dla podsumowania ró¿nic pomiêdzy +.B Vimem +i Vi. +.PP +W czasie korzystania z +.B Vima +mo¿na uzyskaæ obszern± pomoc z systemu pomocy on-line dziêki poleceniu ":help". +Zobacz rozdzia³ POMOC ON-LINE poni¿ej. +.PP +Najczê¶ciej +.B Vim +jest uruchamiany do edycji pojedynczego pliku poleceniem +.PP + vim plik +.PP +Bardziej ogólnie +.B Vim +jest uruchamiany poprzez: +.PP + vim [opcje] [lista plików] +.PP +Je¶li brak listy plików edytor rozpocznie z pustym buforem. W innym +wypadku istnieje dok³adnie jedna z czterech mo¿liwo¶ci by wybraæ jeden +lub wiêcej plików do edycji. +.TP 12 +plik .. +Lista nazw plików. +Pierwsza nazwa bêdzie nazw± bie¿±cego pliku, który zostanie wczytany +do bufora. Kursor zostanie umieszczony w pierwszym wierszu. Do +kolejnych plików mo¿na przej¶æ dziêki poleceniu ":next". By otworzyæ +plik, którego nazwa zaczyna siê od my¶lnika nale¿y listê plików +poprzedziæ "\-\-". +.TP +\- +Plik do edycji jest wczytany ze standardowego wej¶cia. Polecenia s± +odczytywane ze standardowego wyj¶cia b³êdów, którym powinien byæ +terminal (tty). +.TP +\-t {znacznik} +Plik do edycji i pocz±tkowa pozycja kursora zale¿y od "znacznika", +rodzaju etykiety goto. +{znacznika} szuka siê w pliku tags, zwi±zany z nim plik staje siê +plikiem bie¿±cym i wykonuje siê powi±zane polecenie. +Zazwyczaj u¿ywa siê tego sposobu dla programów w C, w których wypadku +{znacznik} mo¿e byæ nazw± funkcji. +W efekcie plik zawieraj±cy okre¶lon± funkcjê staje siê plikiem +bie¿±cym a kursor jest umieszczony na pocz±tku funkcji. +Zobacz ":help tag-commands". +.TP +\-q [plik_b³êdów] +Zacznij w trybie quickFix. +Plik [plik_b³êdów] zostaje zinterpretowany i poka¿e siê pierwszy b³±d. +Je¶li brak opcji [plik_b³êdów] nazwa pliku zostanie pobrana z opcji +\&'errorfile' (domy¶lnie "AztecC.Err" dla Amigi, "errros.err" dla innych +systemów. +Do kolejnych b³êdów mo¿na przeskoczyæ dziêki poleceniu ":cn". +Zobacz ":help quickfix". +.PP +W zale¿no¶ci od wywo³ania +.B Vim +zachowuje siê inaczej (program mo¿e byæ ca³y czas tym samym +plikiem). +.TP 10 +vim +"Normalny" sposób, wszystko jest domy¶lne. +.TP +ex +Zacznij w trybie Ex. +Przejd¼ do trybu Normalnego poleceniem ":vi". +Mo¿na tak¿e uruchomiæ poprzez argument "\-e". +.TP +view +Zacznij w trybie tylko do odczytu. W ten sposób bêdziesz chroniony +przed zapisywaniem pliku. Mo¿na tak¿e uruchomiæ poprzez argument +"\-R". +.TP +gvim gview +Wersja GUI. +Uruchamia nowe okno. +Mo¿na tak¿e uruchomiæ poprzez argument "\-g". +.TP +evim eview +Wersja GUI w ³atwym trybie. +Uruchamia nowe okno. +Mo¿na tak¿e uruchomiæ poprzez argument "\-y". +.TP +rvim rview rgvim rgview +Podobnie jak powy¿ej, ale z ograniczeniami. Nie bêdzie mo¿na uruchomiæ +poleceñ pow³oki lub zawiesiæ +.B Vima. +Mo¿na tak¿e uruchomiæ poprzez argument "\-Z". +.SH OPCJE +Opcje mo¿na podaæ w dowolnej kolejno¶ci, przed lub po nazwach plików. +Opcje bez argumentów mo¿na ³±czyæ po pojedynczym my¶lniku. +.TP 12 ++[num] +W pierwszym pliku kursor zostanie umieszczony w wierszu "num". +Je¶li brak "num" kursor zostanie umieszczony w ostatnim wierszu. +.TP ++/{wzór} +W pierwszym pliku kursor zostanie umieszczony na pierwszym wyst±pieniu +{wzór}. +Zobacz ":help search-pattern" by dowiedzieæ siê jakie s± mo¿liwe +wzorce wyszukiwania. +.TP ++{polecenie} +.TP +\-c {polecenie} +{polecenie} zostanie wykonane po tym jak wczyta siê pierwszy plik. +{polecenie} jest interpretowane jako polecenie Ex. +Je¶li {poleceni} zawiera bia³e znaki musi byæ umieszczone w podwójnych +cudzys³owach (zale¿y to od u¿ywanej pow³oki). +Przyk³ad: Vim "+set si" main.c +.br +Uwaga: Mo¿na u¿yæ do 10 poleceñ "+" lub "\-c". +.TP +\-S {plik} +{plik} zostanie zinterpretowany po wczytaniu pierwszego pliku. +Jest równowa¿ne \-c "source {plik}". +{plik} nie mo¿e zaczynaæ siê '\-'. +Je¶li nie podano {plik} zostanie u¿yty "Session.vim" (dzia³a tylko +wtedy je¶li \-S jest ostatnim argumentem). +.TP +\-\-cmd {polecenie} +Podobne do "\-c", ale polecenie jest wykonywane tu¿ przed +interpretacj± jakiegokolwiek pliku vimrc. +Mo¿na u¿yæ do 10 takich poleceñ, niezale¿nie od poleceñ od "\-c" +.TP +\-A +Je¶li +.B Vim +zosta³ skompilowany ze wsparciem dla jêzyków arabskich (edycja od +prawej do lewej i arabska mapa klawiatury) ta opcja uruchamia +.B Vima +w trybie arabskim, np. ustawia siê opcja 'arabic'. W innym wypadku +pojawi siê komunikat b³êdu i +.B Vim +zakoñczy dzia³anie. +.TP +\-b +Tryb binarny. +Ustawi siê kilka opcji, które umo¿liwi± edycjê plików binarnych lub +wykonywalnych. +.TP +\-C +Kompatybilny. Ustawia opcjê 'compatible'. +W ten sposób +.B Vim +bêdzie zachowywa³ siê jak Vi, nawet je¶li istnieje plik .vimrc. +.TP +\-d +Uruchom w trybie diff. +Powinno siê u¿yæ dwóch, trzech lub czterech nazwy plików jako argumentów. +.B Vim +otworzy wszystkie te pliki i poka¿e ró¿nice miêdzy nimi. +Dzia³a jak vimdiff(1). +.TP +\-d {urz±dzenie} +Otwórz {urz±dzenie} by u¿ywaæ jako terminal. +Tylko na Amidze. +Przyk³ad: +"\-d con:20/30/600/150". +.TP +\-D +Debugowanie. Przejd¼ do trybu debugowanie wykonuj±c pierwsze polecenie +ze skryptu. +.TP +\-e +Uruchom +.B Vima +w trybie Ex, dzia³a tak samo jakby wywo³ano program jako "ex". +.TP +\-E +Uruchom +.B Vima +w ulepszonym trybie Ex, dzia³a tak samo jakby wywo³ano program jako +"exim". +.TP +\-f +Pierszy plan. Dla wersji GUI. +.B Vim +nie nie oddzieli siê od pow³oki w jakiej zosta³ uruchomiony. Na Amidze +.B Vim +nie jest uruchomiony ponownie by otworzyæ nowe okno. +Opcja powinna byæ u¿yta kiedy +.B Vim +jest wywo³ywany przez program, który ma zaczekaæ na koniec sesji (np. +mail). +Na Amidze polecenia ":sh" i ":!" nie bêd± dzia³aæ. +.TP +\-\-nofork +Pierwszy plan. Dla wersji GUI. +.B Vim +nie oddzieli siê od pow³oki w jakiej zosta³ uruchomiony. +.TP +\-F +Je¶li Vim zosta³ skompilowany ze wsparciem FKMAP dla edycji tekstów od +prawej do lewej i mapowania klawiatury Farsi, ta opcja uruchomi +.B Vima +w trybie Farsi, np. zostawi± ustawione opcje 'fkmap' i 'rightleft'. +W innym wypadku pojawi siê komunikat b³êdu i +.B Vim +zakoñczy dzia³anie. +.TP +\-g +Je¶li +.B Vim +zosta³ skompilowany ze wsparciem dla GUI ta opcja uruchomi GUI. +W innym wypadku pojawi siê komunikat b³êdu i +.B Vim +zakoñczy dzia³anie. +.TP +\-h +Wy¶wietli krótk± pomoc o argumentach linii poleceñ i opcjach. Potem +.B Vim +zakoñczy dzia³anie. +.TP +\-H +Je¶li +.B Vim +zosta³ skompilowany ze wsparciem RIGHTLEFT dla edycji od prawej do +lewej oraz ma mapowanie klawiatury dla hebrajskiego, ta opcja uruchomi +.B Vima +w trybie hebrajskim, np. ustawi opcje 'hkmap' i 'rightleft'. +W innym wypadku pojawi siê komunikat b³êdu i +.B Vim +zakoñczy dzia³anie. +.TP +\-i {viminfo} +Kiedy +.B Vim +u¿ywa pliku viminfo ta opcja wska¿e jakiego pliku u¿yæ zamiast +domy¶lnego "~/.viminfo". +Mo¿na te¿ omin±æ u¿ycie pliku .viminfo przez podanie nazwy "NONE". +.TP +\-L +To samo co \-r. +.TP +\-l +Tryb Lisp. +Ustawia opcje 'lisp' i 'showmatch'. +.TP +\-m +Zmiana pliku jest niemo¿liwa. +Przestawia opcjê 'write'. +Mo¿na zmieniaæ zawarto¶æ bufora, ale zapisanie pliku nie jest +mo¿liwe. +.TP +\-M +Opcje 'modifiable' i 'write' zostan± wy³±czone, tak wiêc zmiany +w pliku oraz ich zapisanie nie s± mo¿liwe. Warto¶æ tych opcji mo¿na +zmieniæ. +.TP +\-N +Tryb niekompatybilny. Przestawia opcjê 'compatible'. Dziêki temu +.B Vim +bêdzie zachowywa³ siê odrobinê lepiej, ale mniej zgodnie z Vi nawet +je¶li nie istnieje plik .vimrc. +.TP +\-n +Nie powstanie plik wymiany. Odzyskanie pliku po wypadku nie bêdzie +mo¿liwe. +Wygodne je¶li instnieje potrzeba edycji na bardzo wolnym medium (np. +dyskietce). Ten cel mo¿na osi±gn±æ tak¿e przez ":set uc=0". Mo¿na +odwróciæ przez ":set uc=200". +.TP +\-nb +Uruchom jako serwer edytora dla NetBeans. Zobacz dokumentacjê by +dowiedzieæ siê wiêcej. +.TP +\-o[N] +Otwórz N okien w stosie. +Kiedy brak N, otwórz jedno okno dla ka¿dego pliku. +.TP +\-O[N] +Otwórz N okien obok siebie. +Kiedy brak N, otwórz jedno okno dla ka¿dego pliku. +.TP +\-p[N] +Otwórz N kart. +Kiedy brak N, otwórz jedn± kartê dla ka¿dego pliku. +.TP +\-R +Tryb tylko do odczytu. +Zostanie ustawiona opcja 'readonly'. +Ca³y czas mo¿na zmieniaæ bufor, ale bêdzie istnia³a blokada by chroniæ +przed przypadkowym zapisaniem pliku. +Je¶li chcesz zapisaæ plik dodaj wykrzyknik do polecenia Ex, np. ":w!". +Opcja \-R implikuje opcjê \-n (zobacz poni¿ej). +Opcja 'readonly' mo¿e zostaæ przestawiona poprzez ":set noro". +Zobacz ":help 'readonly'". +.TP +\-r +Wypisz listê plików wymiany razem z informacjami o nich. +.TP +\-r {plik} +Tryb odzyskiwania danych. +Plik wymiany zostanie wykorzystany do odzyskania gwa³townie przerwanej sesji. +Plik wymiany to plik z tak± sam± nazw± co plik oryginalny z dodanym ".swp". +Zobacz ":help recovery". +.TP +\-s +Tryb cichy. Rozpoczêty tylko kiedy uruchomiony jako "Ex" lub opcja +"\-e" zosta³a podana przed opcj± "\-s". +.TP +\-s {skrypt} +Zostanie wczytany plik {skrypt}. +Znaki w pliku zostan± zinterpretowane jakby by³y wpisywane. +To samo mo¿na osi±gn±æ poprzez polecenie ":source! {skrypt}". +Je¶li osi±gniêto koniec pliku zanim edytor zakoñczy³ dzia³anie, dalsze +znaki odczytywane s± z klawiatury. +.TP +\-T {terminal} +Przekazuje +.B Vimowi +nazwê terminalu jakiego u¿ywasz. +Wymagane tylko wtedy je¶li nie dzia³a automatycznie. +Powinien byæ to terminal znany +.B Vimowi +(builtin) lub zdefiniowany w plikach termcap lub terminfo. +.TP +\-u {vimrc} +U¿yj poleceñ z pliku {vimrc} w czasie uruchamiania. +Wszystkie inne mo¿liwe pliki uruchamiania zostan± pominiête. +U¿ywaj do edytowania plików specjalnych. +Mo¿na pomin±æ tak¿e wszystkie mo¿liwe pliki uruchamiania poprzez +podanie nazwy "NONE". +Zobacz ":help initialization" by poznaæ wiêcej szczegó³ów. +.TP +\-U {gvimrc} +U¿yj poleceñ z pliku {gvimrc} w czasie uruchamiania GUI. +Wszystkie inne mo¿liwe pliki uruchamiania GUI zostan± pominiête. +Mo¿na pomin±æ tak¿e wszystkie mo¿liwe pliki uruchamiania GUI poprzez +podanie nazwy "NONE". +Zobacz ":help gui-init" by poznaæ wiêcej szczegó³ów. +.TP +\-V[N] +Tryb gadatliwy. Wypisz wiadomo¶ci o tym jaki pliki s± wczytywane +i o informacjach pobieranych i dodawanych do pliku viminfo. Opcjonalny +argument N jest warto¶ci± 'verbose'. Domy¶lnie 10. +.TP +\-v +Uruchom +.B Vima +w trybie Vi, tak jakby program by³ nazwany "vi". Ma znaczenie +tylko wtedy je¶li program nazwany jest "ex". +.TP +\-w {plik} +Wszystkie wci¶niêcia klawiszy, a¿ do zakoñczenia dzia³ania programu, +s± zapisywane w {plik} . +U¿yteczne je¶li chce siê stworzyæ skrypt do u¿ycia z "vim \-s" lub +":source!". +Je¶li {plik} istnieje, znaki s± dopisywane. +.TP +\-W {plik} +Podobnie do \-w, ale istniej±cy plik jest nadpisywany. +.TP +\-x +U¿yj szyfrowania podczas zapisywania plików. Zostaniesz poproszony +o podanie klucza. +.TP +\-X +Nie ³±cz z serwerem X. Skraca czas uruchamiania w terminalu, ale tytu³ +okna i schowek nie bêd± wykorzystywane. +.TP +\-y +Uruchom +.B Vima +w ³atwym trybie, tak jakby program zosta³ wywo³any "evim" lub "eview". +.B Vim +bêdzie zachowywa³ siê bardziej jak edytor kliknij-i-wpisz. +.TP +\-Z +Tryb ograniczony. Zachowuje siê jakby nazwa programu zaczyna³a siê od +"r". +.TP +\-\- +Oznacza koniec opcji. +Argumenty po tej opcji bêd± traktowane jak nazwy plików. U¿ywa siê do +otwierania plików, których nazwy zaczynaj± siê od '\-'. +.TP +\-\-echo\-wid +Wy³±cznie GTK GUI: wypisz ID okna na standardowe wyj¶cie. +.TP +\-\-help +Wy¶wietl informacjê o pomocy i zakoñczy, to samo co"\-h". +.TP +\-\-literal +Potraktuj nazwy plików dos³ownie i nie rozwi±zuj kwantyfikatorów. Nie +ma znaczenia na Uniksach gdzie pow³oka rozwi±zuje kwantyfikatory. +.TP +\-\-noplugin +Pomiñ ³adowanie wtyczek. Implikowane przy \-u NONE. +.TP +\-\-remote +Po³±cz siê z serwerem Vima i edytuj w nim resztê plików podanych jako +argumenty. Je¶li nie znaleziono serwera zostanie zg³oszony b³±d a pliki zostan± +otwarte w bie¿±cym Vimie. +.TP +\-\-remote\-expr {wyra¿enie} +Po³±cz z serwerem Vima, rozwi±¿ w nim {wyra¿enie} i wypisz rozwi±zanie +na standardowe wyj¶cie. +.TP +\-\-remote\-send {klawisze} +Po³±cz z serwerem Vima i wy¶lij do niego {klawisze}. +.TP +\-\-remote\-silent +Tak samo jak \-remote, ale bez ostrze¿enia kiedy nie znaleziono +serwera. +.TP +\-\-remote\-wait +Tak samo jak \-remote, ale Vim nie zakoñczy dopóki pliki pozostan± +otwarte. +.TP +\-\-remote\-wait\-silent +Tak samo jak \-\-remote\-wait, ale bez ostrze¿enie kiedy nie +znaleziono serwera. +.TP +\-\-serverlist +Wypisz nazwy wszystkich serwerów Vima jakie mo¿na znale¼æ. +.TP +\-\-servername {nazwa} +U¿yj {nazwa} jako nazwy serwera. Wykorzystane dla bie¿±cego Vima o ile +nie po³±czone z argumentem \-\-remote, wtedy jest to nazwa serwera do +po³±czenia. +.TP +\-\-socketid {id} +Wy³±cznie GTK GUI: U¿yj mechanizmu GtkPlug by uruchomiæ gvima w innym +oknie. +.TP +\-\-version +Wypisz informacjê o wersji i zakoñcz. +.SH POMOC ON-LINE +By rozpocz±æ wpisz ":help" w +.B Vimie +Wpisz ":help temat" by uzyskaæ pomoc na okre¶lony temat. +Przyk³ad: ":help ZZ" by uzyskaæ pomoc na temat polecenia "ZZ". +U¿yj <Tab> i CTRL\-D aby uzupe³niæ tematy (":help +cmdline\-completion"). W plikach pomocy istniej± znaczniki by u³atwiæ +skakanie z jednego miejsca do innego (rodzaj linków hipertekstowych, +zobacz ":help"). +Mo¿na w ten sposób zobaczyæ ca³± dokumentacjê, np. ":help syntax.txt". +.SH PLIKI +.TP 15 +/usr/local/lib/vim/doc/*.txt +Dokumentacja +.B Vima +U¿yj ":help doc\-file\-list" aby uzyskaæ pe³n± listê. +.TP +/usr/local/lib/vim/doc/tags +Plik znaczników s³u¿y do znajdowania informacji w plikach dokumentacji. +.TP +/usr/local/lib/vim/syntax/syntax.vim +Globalne uruchamianie pod¶wietlania sk³adni. +.TP +/usr/local/lib/vim/syntax/*.vim +Pliki sk³adni dla ró¿nych jêzyków. +.TP +/usr/local/lib/vim/vimrc +Globalny plik uruchamiania +.B Vima +.TP +~/.vimrc +Osobiste parametry uruchamiania +.B Vima +.TP +/usr/local/lib/vim/gvimrc +Globalne uruchamianie gvima. +.TP +~/.gvimrc +Osobiste parametry uruchamiania gvima. +.TP +/usr/local/lib/vim/optwin.vim +Skrypt u¿ywany w poleceniu ":options", dobry sposób do przegl±dania +i ustawiania opcji. +.TP +/usr/local/lib/vim/menu.vim +Globalne uruchamianie menu gvima. +.TP +/usr/local/lib/vim/bugreport.vim +Skrypt s³u¿±cy do tworzenia raportów o b³êdach. Zobacz ":help bugs". +.TP +/usr/local/lib/vim/filetype.vim +Skrypt do wykrywania typu pliku wed³ug jego nazwy. Zobacz ":help 'filetype'". +.TP +/usr/local/lib/vim/scripts.vim +Skrypt do wykrywania typu pliku wed³ug jego zawarto¶ci. Zobacz ":help 'filetype'". +.TP +/usr/local/lib/vim/print/*.ps +Pliku u¿ywane do drukowania PostScriptu. +.PP +Naj¶wie¿sze wiadomo¶ci na stronie +.B Vima: +.br +<URL:http://www.vim.org/> +.SH ZOBACZ TAK¯E +vimtutor(1) +.SH AUTOR +.B Vim +zosta³ napisany przez Brama Moolenaara z du¿± pomoc± innych osób. +Zobacz ":help credits" w +.B Vimie. +.br +.B Vim +bazuje na Steviem, nad którym pracowali: Tim Thompson, Tony Andrews +i G.R. (Fred) Walter. +Ma³o ju¿ zosta³o z oryginalnego kodu. +.SH B£ÊDY +Prawdopodobne. +Zobacz ":help todo" by poznaæ listê znanych problemów. +.PP +Pamiêtaj ¿e pewna ilo¶æ problemów, które mog± byæ uznawane przez +niektórych ludzi za b³êdy s± w rzeczywisto¶ci spowodowane wierno¶ci± +w odtwarzaniu zachowania Vi. +Je¶li s±dzisz, ¿e inne rzeczy s± b³êdami "poniewa¿ Vi robi to +inaczej", powiniene¶ przyjrzeæ siê bli¿ej plikowi vi_diff.txt (lub +wpisaæ ":help vi_diff.txt" w Vimie). +Sprawd¼ tak¿e opis opcji 'compatible' i 'cpoptions'. diff --git a/runtime/doc/vim-pl.UTF-8.1 b/runtime/doc/vim-pl.UTF-8.1 new file mode 100644 index 0000000000..f3551d2f63 --- /dev/null +++ b/runtime/doc/vim-pl.UTF-8.1 @@ -0,0 +1,558 @@ +.TH VIM 1 "2006 kwi 11" +.SH NAME +vim \- Vi rozbudowany, edytor tekstu dla programisty +.SH SYNOPSIS +.br +.B vim +[opcje] [plik ..] +.br +.B vim +[opcje] \- +.br +.B vim +[opcje] \-t znacznik +.br +.B vim +[opcje] \-q [plik_błędu] +.PP +.br +.B ex +.br +.B view +.br +.B gvim +.B gview +.B evim +.B eview +.br +.B rvim +.B rview +.B rgvim +.B rgview +.SH OPIS +.B Vim +jest edytorem tekstu kompatybilnym z Vi. Może być +używany do edycji wszelkiego rodzaju plików tekstowych. +Użyteczny zwÅ‚aszcza przy edycji programów. +.PP +Posiada wiele usprawnieÅ„ w porównaniu z Vi: wielopoziomowe cofanie zmian, +wiele okien i buforów, podÅ›wietlanie skÅ‚adni, edycja linii poleceÅ„, +uzupeÅ‚nianie nazw plików, pomoc on-line, wizualna selekcja, itd. +Zobacz ":help vi_diff.txt" dla podsumowania różnic pomiÄ™dzy +.B Vimem +i Vi. +.PP +W czasie korzystania z +.B Vima +można uzyskać obszernÄ… pomoc z systemu pomocy on-line dziÄ™ki poleceniu ":help". +Zobacz rozdziaÅ‚ POMOC ON-LINE poniżej. +.PP +Najczęściej +.B Vim +jest uruchamiany do edycji pojedynczego pliku poleceniem +.PP + vim plik +.PP +Bardziej ogólnie +.B Vim +jest uruchamiany poprzez: +.PP + vim [opcje] [lista plików] +.PP +JeÅ›li brak listy plików edytor rozpocznie z pustym buforem. W innym +wypadku istnieje dokÅ‚adnie jedna z czterech możliwoÅ›ci by wybrać jeden +lub wiÄ™cej plików do edycji. +.TP 12 +plik .. +Lista nazw plików. +Pierwsza nazwa bÄ™dzie nazwÄ… bieżącego pliku, który zostanie wczytany +do bufora. Kursor zostanie umieszczony w pierwszym wierszu. Do +kolejnych plików można przejść dziÄ™ki poleceniu ":next". By otworzyć +plik, którego nazwa zaczyna siÄ™ od myÅ›lnika należy listÄ™ plików +poprzedzić "\-\-". +.TP +\- +Plik do edycji jest wczytany ze standardowego wejÅ›cia. Polecenia sÄ… +odczytywane ze standardowego wyjÅ›cia błędów, którym powinien być +terminal (tty). +.TP +\-t {znacznik} +Plik do edycji i poczÄ…tkowa pozycja kursora zależy od "znacznika", +rodzaju etykiety goto. +{znacznika} szuka siÄ™ w pliku tags, zwiÄ…zany z nim plik staje siÄ™ +plikiem bieżącym i wykonuje siÄ™ powiÄ…zane polecenie. +Zazwyczaj używa siÄ™ tego sposobu dla programów w C, w których wypadku +{znacznik} może być nazwÄ… funkcji. +W efekcie plik zawierajÄ…cy okreÅ›lonÄ… funkcjÄ™ staje siÄ™ plikiem +bieżącym a kursor jest umieszczony na poczÄ…tku funkcji. +Zobacz ":help tag-commands". +.TP +\-q [plik_błędów] +Zacznij w trybie quickFix. +Plik [plik_błędów] zostaje zinterpretowany i pokaże siÄ™ pierwszy błąd. +JeÅ›li brak opcji [plik_błędów] nazwa pliku zostanie pobrana z opcji +\&'errorfile' (domyÅ›lnie "AztecC.Err" dla Amigi, "errros.err" dla innych +systemów. +Do kolejnych błędów można przeskoczyć dziÄ™ki poleceniu ":cn". +Zobacz ":help quickfix". +.PP +W zależnoÅ›ci od wywoÅ‚ania +.B Vim +zachowuje siÄ™ inaczej (program może być caÅ‚y czas tym samym +plikiem). +.TP 10 +vim +"Normalny" sposób, wszystko jest domyÅ›lne. +.TP +ex +Zacznij w trybie Ex. +Przejdź do trybu Normalnego poleceniem ":vi". +Można także uruchomić poprzez argument "\-e". +.TP +view +Zacznij w trybie tylko do odczytu. W ten sposób bÄ™dziesz chroniony +przed zapisywaniem pliku. Można także uruchomić poprzez argument +"\-R". +.TP +gvim gview +Wersja GUI. +Uruchamia nowe okno. +Można także uruchomić poprzez argument "\-g". +.TP +evim eview +Wersja GUI w Å‚atwym trybie. +Uruchamia nowe okno. +Można także uruchomić poprzez argument "\-y". +.TP +rvim rview rgvim rgview +Podobnie jak powyżej, ale z ograniczeniami. Nie bÄ™dzie można uruchomić +poleceÅ„ powÅ‚oki lub zawiesić +.B Vima. +Można także uruchomić poprzez argument "\-Z". +.SH OPCJE +Opcje można podać w dowolnej kolejnoÅ›ci, przed lub po nazwach plików. +Opcje bez argumentów można łączyć po pojedynczym myÅ›lniku. +.TP 12 ++[num] +W pierwszym pliku kursor zostanie umieszczony w wierszu "num". +JeÅ›li brak "num" kursor zostanie umieszczony w ostatnim wierszu. +.TP ++/{wzór} +W pierwszym pliku kursor zostanie umieszczony na pierwszym wystÄ…pieniu +{wzór}. +Zobacz ":help search-pattern" by dowiedzieć siÄ™ jakie sÄ… możliwe +wzorce wyszukiwania. +.TP ++{polecenie} +.TP +\-c {polecenie} +{polecenie} zostanie wykonane po tym jak wczyta siÄ™ pierwszy plik. +{polecenie} jest interpretowane jako polecenie Ex. +JeÅ›li {poleceni} zawiera biaÅ‚e znaki musi być umieszczone w podwójnych +cudzysÅ‚owach (zależy to od używanej powÅ‚oki). +PrzykÅ‚ad: Vim "+set si" main.c +.br +Uwaga: Można użyć do 10 poleceÅ„ "+" lub "\-c". +.TP +\-S {plik} +{plik} zostanie zinterpretowany po wczytaniu pierwszego pliku. +Jest równoważne \-c "source {plik}". +{plik} nie może zaczynać siÄ™ '\-'. +JeÅ›li nie podano {plik} zostanie użyty "Session.vim" (dziaÅ‚a tylko +wtedy jeÅ›li \-S jest ostatnim argumentem). +.TP +\-\-cmd {polecenie} +Podobne do "\-c", ale polecenie jest wykonywane tuż przed +interpretacjÄ… jakiegokolwiek pliku vimrc. +Można użyć do 10 takich poleceÅ„, niezależnie od poleceÅ„ od "\-c" +.TP +\-A +JeÅ›li +.B Vim +zostaÅ‚ skompilowany ze wsparciem dla jÄ™zyków arabskich (edycja od +prawej do lewej i arabska mapa klawiatury) ta opcja uruchamia +.B Vima +w trybie arabskim, np. ustawia siÄ™ opcja 'arabic'. W innym wypadku +pojawi siÄ™ komunikat błędu i +.B Vim +zakoÅ„czy dziaÅ‚anie. +.TP +\-b +Tryb binarny. +Ustawi siÄ™ kilka opcji, które umożliwiÄ… edycjÄ™ plików binarnych lub +wykonywalnych. +.TP +\-C +Kompatybilny. Ustawia opcjÄ™ 'compatible'. +W ten sposób +.B Vim +bÄ™dzie zachowywaÅ‚ siÄ™ jak Vi, nawet jeÅ›li istnieje plik .vimrc. +.TP +\-d +Uruchom w trybie diff. +Powinno siÄ™ użyć dwóch, trzech lub czterech nazwy plików jako argumentów. +.B Vim +otworzy wszystkie te pliki i pokaże różnice miÄ™dzy nimi. +DziaÅ‚a jak vimdiff(1). +.TP +\-d {urzÄ…dzenie} +Otwórz {urzÄ…dzenie} by używać jako terminal. +Tylko na Amidze. +PrzykÅ‚ad: +"\-d con:20/30/600/150". +.TP +\-D +Debugowanie. Przejdź do trybu debugowanie wykonujÄ…c pierwsze polecenie +ze skryptu. +.TP +\-e +Uruchom +.B Vima +w trybie Ex, dziaÅ‚a tak samo jakby wywoÅ‚ano program jako "ex". +.TP +\-E +Uruchom +.B Vima +w ulepszonym trybie Ex, dziaÅ‚a tak samo jakby wywoÅ‚ano program jako +"exim". +.TP +\-f +Pierszy plan. Dla wersji GUI. +.B Vim +nie nie oddzieli siÄ™ od powÅ‚oki w jakiej zostaÅ‚ uruchomiony. Na Amidze +.B Vim +nie jest uruchomiony ponownie by otworzyć nowe okno. +Opcja powinna być użyta kiedy +.B Vim +jest wywoÅ‚ywany przez program, który ma zaczekać na koniec sesji (np. +mail). +Na Amidze polecenia ":sh" i ":!" nie bÄ™dÄ… dziaÅ‚ać. +.TP +\-\-nofork +Pierwszy plan. Dla wersji GUI. +.B Vim +nie oddzieli siÄ™ od powÅ‚oki w jakiej zostaÅ‚ uruchomiony. +.TP +\-F +JeÅ›li Vim zostaÅ‚ skompilowany ze wsparciem FKMAP dla edycji tekstów od +prawej do lewej i mapowania klawiatury Farsi, ta opcja uruchomi +.B Vima +w trybie Farsi, np. zostawiÄ… ustawione opcje 'fkmap' i 'rightleft'. +W innym wypadku pojawi siÄ™ komunikat błędu i +.B Vim +zakoÅ„czy dziaÅ‚anie. +.TP +\-g +JeÅ›li +.B Vim +zostaÅ‚ skompilowany ze wsparciem dla GUI ta opcja uruchomi GUI. +W innym wypadku pojawi siÄ™ komunikat błędu i +.B Vim +zakoÅ„czy dziaÅ‚anie. +.TP +\-h +WyÅ›wietli krótkÄ… pomoc o argumentach linii poleceÅ„ i opcjach. Potem +.B Vim +zakoÅ„czy dziaÅ‚anie. +.TP +\-H +JeÅ›li +.B Vim +zostaÅ‚ skompilowany ze wsparciem RIGHTLEFT dla edycji od prawej do +lewej oraz ma mapowanie klawiatury dla hebrajskiego, ta opcja uruchomi +.B Vima +w trybie hebrajskim, np. ustawi opcje 'hkmap' i 'rightleft'. +W innym wypadku pojawi siÄ™ komunikat błędu i +.B Vim +zakoÅ„czy dziaÅ‚anie. +.TP +\-i {viminfo} +Kiedy +.B Vim +używa pliku viminfo ta opcja wskaże jakiego pliku użyć zamiast +domyÅ›lnego "~/.viminfo". +Można też ominąć użycie pliku .viminfo przez podanie nazwy "NONE". +.TP +\-L +To samo co \-r. +.TP +\-l +Tryb Lisp. +Ustawia opcje 'lisp' i 'showmatch'. +.TP +\-m +Zmiana pliku jest niemożliwa. +Przestawia opcjÄ™ 'write'. +Można zmieniać zawartość bufora, ale zapisanie pliku nie jest +możliwe. +.TP +\-M +Opcje 'modifiable' i 'write' zostanÄ… wyłączone, tak wiÄ™c zmiany +w pliku oraz ich zapisanie nie sÄ… możliwe. Wartość tych opcji można +zmienić. +.TP +\-N +Tryb niekompatybilny. Przestawia opcjÄ™ 'compatible'. DziÄ™ki temu +.B Vim +bÄ™dzie zachowywaÅ‚ siÄ™ odrobinÄ™ lepiej, ale mniej zgodnie z Vi nawet +jeÅ›li nie istnieje plik .vimrc. +.TP +\-n +Nie powstanie plik wymiany. Odzyskanie pliku po wypadku nie bÄ™dzie +możliwe. +Wygodne jeÅ›li instnieje potrzeba edycji na bardzo wolnym medium (np. +dyskietce). Ten cel można osiÄ…gnąć także przez ":set uc=0". Można +odwrócić przez ":set uc=200". +.TP +\-nb +Uruchom jako serwer edytora dla NetBeans. Zobacz dokumentacjÄ™ by +dowiedzieć siÄ™ wiÄ™cej. +.TP +\-o[N] +Otwórz N okien w stosie. +Kiedy brak N, otwórz jedno okno dla każdego pliku. +.TP +\-O[N] +Otwórz N okien obok siebie. +Kiedy brak N, otwórz jedno okno dla każdego pliku. +.TP +\-p[N] +Otwórz N kart. +Kiedy brak N, otwórz jednÄ… kartÄ™ dla każdego pliku. +.TP +\-R +Tryb tylko do odczytu. +Zostanie ustawiona opcja 'readonly'. +CaÅ‚y czas można zmieniać bufor, ale bÄ™dzie istniaÅ‚a blokada by chronić +przed przypadkowym zapisaniem pliku. +JeÅ›li chcesz zapisać plik dodaj wykrzyknik do polecenia Ex, np. ":w!". +Opcja \-R implikuje opcjÄ™ \-n (zobacz poniżej). +Opcja 'readonly' może zostać przestawiona poprzez ":set noro". +Zobacz ":help 'readonly'". +.TP +\-r +Wypisz listÄ™ plików wymiany razem z informacjami o nich. +.TP +\-r {plik} +Tryb odzyskiwania danych. +Plik wymiany zostanie wykorzystany do odzyskania gwaÅ‚townie przerwanej sesji. +Plik wymiany to plik z takÄ… samÄ… nazwÄ… co plik oryginalny z dodanym ".swp". +Zobacz ":help recovery". +.TP +\-s +Tryb cichy. RozpoczÄ™ty tylko kiedy uruchomiony jako "Ex" lub opcja +"\-e" zostaÅ‚a podana przed opcjÄ… "\-s". +.TP +\-s {skrypt} +Zostanie wczytany plik {skrypt}. +Znaki w pliku zostanÄ… zinterpretowane jakby byÅ‚y wpisywane. +To samo można osiÄ…gnąć poprzez polecenie ":source! {skrypt}". +JeÅ›li osiÄ…gniÄ™to koniec pliku zanim edytor zakoÅ„czyÅ‚ dziaÅ‚anie, dalsze +znaki odczytywane sÄ… z klawiatury. +.TP +\-T {terminal} +Przekazuje +.B Vimowi +nazwÄ™ terminalu jakiego używasz. +Wymagane tylko wtedy jeÅ›li nie dziaÅ‚a automatycznie. +Powinien być to terminal znany +.B Vimowi +(builtin) lub zdefiniowany w plikach termcap lub terminfo. +.TP +\-u {vimrc} +Użyj poleceÅ„ z pliku {vimrc} w czasie uruchamiania. +Wszystkie inne możliwe pliki uruchamiania zostanÄ… pominiÄ™te. +Używaj do edytowania plików specjalnych. +Można pominąć także wszystkie możliwe pliki uruchamiania poprzez +podanie nazwy "NONE". +Zobacz ":help initialization" by poznać wiÄ™cej szczegółów. +.TP +\-U {gvimrc} +Użyj poleceÅ„ z pliku {gvimrc} w czasie uruchamiania GUI. +Wszystkie inne możliwe pliki uruchamiania GUI zostanÄ… pominiÄ™te. +Można pominąć także wszystkie możliwe pliki uruchamiania GUI poprzez +podanie nazwy "NONE". +Zobacz ":help gui-init" by poznać wiÄ™cej szczegółów. +.TP +\-V[N] +Tryb gadatliwy. Wypisz wiadomoÅ›ci o tym jaki pliki sÄ… wczytywane +i o informacjach pobieranych i dodawanych do pliku viminfo. Opcjonalny +argument N jest wartoÅ›ciÄ… 'verbose'. DomyÅ›lnie 10. +.TP +\-v +Uruchom +.B Vima +w trybie Vi, tak jakby program byÅ‚ nazwany "vi". Ma znaczenie +tylko wtedy jeÅ›li program nazwany jest "ex". +.TP +\-w {plik} +Wszystkie wciÅ›niÄ™cia klawiszy, aż do zakoÅ„czenia dziaÅ‚ania programu, +sÄ… zapisywane w {plik} . +Użyteczne jeÅ›li chce siÄ™ stworzyć skrypt do użycia z "vim \-s" lub +":source!". +JeÅ›li {plik} istnieje, znaki sÄ… dopisywane. +.TP +\-W {plik} +Podobnie do \-w, ale istniejÄ…cy plik jest nadpisywany. +.TP +\-x +Użyj szyfrowania podczas zapisywania plików. Zostaniesz poproszony +o podanie klucza. +.TP +\-X +Nie łącz z serwerem X. Skraca czas uruchamiania w terminalu, ale tytuÅ‚ +okna i schowek nie bÄ™dÄ… wykorzystywane. +.TP +\-y +Uruchom +.B Vima +w Å‚atwym trybie, tak jakby program zostaÅ‚ wywoÅ‚any "evim" lub "eview". +.B Vim +bÄ™dzie zachowywaÅ‚ siÄ™ bardziej jak edytor kliknij-i-wpisz. +.TP +\-Z +Tryb ograniczony. Zachowuje siÄ™ jakby nazwa programu zaczynaÅ‚a siÄ™ od +"r". +.TP +\-\- +Oznacza koniec opcji. +Argumenty po tej opcji bÄ™dÄ… traktowane jak nazwy plików. Używa siÄ™ do +otwierania plików, których nazwy zaczynajÄ… siÄ™ od '\-'. +.TP +\-\-echo\-wid +Wyłącznie GTK GUI: wypisz ID okna na standardowe wyjÅ›cie. +.TP +\-\-help +WyÅ›wietl informacjÄ™ o pomocy i zakoÅ„czy, to samo co"\-h". +.TP +\-\-literal +Potraktuj nazwy plików dosÅ‚ownie i nie rozwiÄ…zuj kwantyfikatorów. Nie +ma znaczenia na Uniksach gdzie powÅ‚oka rozwiÄ…zuje kwantyfikatory. +.TP +\-\-noplugin +PomiÅ„ Å‚adowanie wtyczek. Implikowane przy \-u NONE. +.TP +\-\-remote +Połącz siÄ™ z serwerem Vima i edytuj w nim resztÄ™ plików podanych jako +argumenty. JeÅ›li nie znaleziono serwera zostanie zgÅ‚oszony błąd a pliki zostanÄ… +otwarte w bieżącym Vimie. +.TP +\-\-remote\-expr {wyrażenie} +Połącz z serwerem Vima, rozwiąż w nim {wyrażenie} i wypisz rozwiÄ…zanie +na standardowe wyjÅ›cie. +.TP +\-\-remote\-send {klawisze} +Połącz z serwerem Vima i wyÅ›lij do niego {klawisze}. +.TP +\-\-remote\-silent +Tak samo jak \-remote, ale bez ostrzeżenia kiedy nie znaleziono +serwera. +.TP +\-\-remote\-wait +Tak samo jak \-remote, ale Vim nie zakoÅ„czy dopóki pliki pozostanÄ… +otwarte. +.TP +\-\-remote\-wait\-silent +Tak samo jak \-\-remote\-wait, ale bez ostrzeżenie kiedy nie +znaleziono serwera. +.TP +\-\-serverlist +Wypisz nazwy wszystkich serwerów Vima jakie można znaleźć. +.TP +\-\-servername {nazwa} +Użyj {nazwa} jako nazwy serwera. Wykorzystane dla bieżącego Vima o ile +nie połączone z argumentem \-\-remote, wtedy jest to nazwa serwera do +połączenia. +.TP +\-\-socketid {id} +Wyłącznie GTK GUI: Użyj mechanizmu GtkPlug by uruchomić gvima w innym +oknie. +.TP +\-\-version +Wypisz informacjÄ™ o wersji i zakoÅ„cz. +.SH POMOC ON-LINE +By rozpocząć wpisz ":help" w +.B Vimie +Wpisz ":help temat" by uzyskać pomoc na okreÅ›lony temat. +PrzykÅ‚ad: ":help ZZ" by uzyskać pomoc na temat polecenia "ZZ". +Użyj <Tab> i CTRL\-D aby uzupeÅ‚nić tematy (":help +cmdline\-completion"). W plikach pomocy istniejÄ… znaczniki by uÅ‚atwić +skakanie z jednego miejsca do innego (rodzaj linków hipertekstowych, +zobacz ":help"). +Można w ten sposób zobaczyć całą dokumentacjÄ™, np. ":help syntax.txt". +.SH PLIKI +.TP 15 +/usr/local/lib/vim/doc/*.txt +Dokumentacja +.B Vima +Użyj ":help doc\-file\-list" aby uzyskać peÅ‚nÄ… listÄ™. +.TP +/usr/local/lib/vim/doc/tags +Plik znaczników sÅ‚uży do znajdowania informacji w plikach dokumentacji. +.TP +/usr/local/lib/vim/syntax/syntax.vim +Globalne uruchamianie podÅ›wietlania skÅ‚adni. +.TP +/usr/local/lib/vim/syntax/*.vim +Pliki skÅ‚adni dla różnych jÄ™zyków. +.TP +/usr/local/lib/vim/vimrc +Globalny plik uruchamiania +.B Vima +.TP +~/.vimrc +Osobiste parametry uruchamiania +.B Vima +.TP +/usr/local/lib/vim/gvimrc +Globalne uruchamianie gvima. +.TP +~/.gvimrc +Osobiste parametry uruchamiania gvima. +.TP +/usr/local/lib/vim/optwin.vim +Skrypt używany w poleceniu ":options", dobry sposób do przeglÄ…dania +i ustawiania opcji. +.TP +/usr/local/lib/vim/menu.vim +Globalne uruchamianie menu gvima. +.TP +/usr/local/lib/vim/bugreport.vim +Skrypt sÅ‚użący do tworzenia raportów o błędach. Zobacz ":help bugs". +.TP +/usr/local/lib/vim/filetype.vim +Skrypt do wykrywania typu pliku wedÅ‚ug jego nazwy. Zobacz ":help 'filetype'". +.TP +/usr/local/lib/vim/scripts.vim +Skrypt do wykrywania typu pliku wedÅ‚ug jego zawartoÅ›ci. Zobacz ":help 'filetype'". +.TP +/usr/local/lib/vim/print/*.ps +Pliku używane do drukowania PostScriptu. +.PP +NajÅ›wieższe wiadomoÅ›ci na stronie +.B Vima: +.br +<URL:http://www.vim.org/> +.SH ZOBACZ TAKÅ»E +vimtutor(1) +.SH AUTOR +.B Vim +zostaÅ‚ napisany przez Brama Moolenaara z dużą pomocÄ… innych osób. +Zobacz ":help credits" w +.B Vimie. +.br +.B Vim +bazuje na Steviem, nad którym pracowali: Tim Thompson, Tony Andrews +i G.R. (Fred) Walter. +MaÅ‚o już zostaÅ‚o z oryginalnego kodu. +.SH BÅĘDY +Prawdopodobne. +Zobacz ":help todo" by poznać listÄ™ znanych problemów. +.PP +PamiÄ™taj że pewna ilość problemów, które mogÄ… być uznawane przez +niektórych ludzi za błędy sÄ… w rzeczywistoÅ›ci spowodowane wiernoÅ›ciÄ… +w odtwarzaniu zachowania Vi. +JeÅ›li sÄ…dzisz, że inne rzeczy sÄ… błędami "ponieważ Vi robi to +inaczej", powinieneÅ› przyjrzeć siÄ™ bliżej plikowi vi_diff.txt (lub +wpisać ":help vi_diff.txt" w Vimie). +Sprawdź także opis opcji 'compatible' i 'cpoptions'. diff --git a/runtime/doc/vim-ru.1 b/runtime/doc/vim-ru.1 new file mode 100644 index 0000000000..dfcb3ece98 --- /dev/null +++ b/runtime/doc/vim-ru.1 @@ -0,0 +1,489 @@ +.TH VIM 1 "2002 Feb 22" +.SH éíñ +vim \- Vi IMproved (õÌÕÞÛÅÎÎÙÊ Vi), ÔÅËÓÔÏ×ÙÊ ÒÅÄÁËÔÏÒ ÄÌÑ ÐÒÏÇÒÁÍÍÉÓÔÏ× +.SH ëïíáîäîáñ óôòïëá +.br +.B vim +[ËÌÀÞÉ] [ÆÁÊÌ ..] +.br +.B vim +[ËÌÀÞÉ] \- +.br +.B vim +[ËÌÀÞÉ] \-t ÍÅÔËÁ +.br +.B vim +[ËÌÀÞÉ] \-q [ÆÁÊÌ ÏÛÉÂÏË] +.PP +.br +.B ex +.br +.B view +.br +.B gvim +.B gview +.br +.B rvim +.B rview +.B rgvim +.B rgview +.SH ïðéóáîéå +.B Vim +-- ÔÅËÓÔÏ×ÙÊ ÒÅÄÁËÔÏÒ, ÏÂÒÁÔÎÏ-ÓÏ×ÍÅÓÔÉÍÙÊ Ó Vi. +ïÎ ÍÏÖÅÔ ÂÙÔØ ÉÓÐÏÌØÚÏ×ÁÎ ÄÌÑ ÐÒÁ×ËÉ ×ÓÅÈ ×ÉÄÏ× ÐÒÏÓÔÏÇÏ ÔÅËÓÔÁ. +ïÓÏÂÅÎÎÏ ÏÎ ÈÏÒÏÛ ÄÌÑ ÐÒÁ×ËÉ ÉÓÈÏÄÎÙÈ ÔÅËÓÔÏ× ÐÒÏÇÒÁÍÍ. +.PP +ðÏ ÓÒÁ×ÎÅÎÉÀ Ó Vi, +.B Vim +ÉÍÅÅÔ ÍÎÏÇÏ ÕÓÏ×ÅÒÛÅÎÓÔ×Ï×ÁÎÉÊ: ÍÎÏÇÏËÒÁÔÎÁÑ ÏÔÍÅÎÁ ÏÐÅÒÁÃÉÊ, +ÍÎÏÖÅÓÔ×ÅÎÎÏÓÔØ ÏËÏÎ É ÂÕÆÅÒÏ×, ÐÏÄÓ×ÅÔËÁ ÓÉÎÔÁËÓÉÓÁ, ÐÒÁ×ËÁ ËÏÍÁÎÄÎÏÊ ÓÔÒÏËÉ, +Á×ÔÏÄÏÐÏÌÎÅÎÉÅ ÉͣΠÆÁÊÌÏ×, ×ÓÔÒÏÅÎÎÁÑ ÓÐÒÁ×ËÁ, ×ÉÚÕÁÌØÎÏÅ ×ÙÄÅÌÅÎÉÅ É Ô.Ð. +óÍ. ":help vi_diff.txt" ÄÌÑ ÐÏÌÕÞÅÎÉÑ ÐÏÌÎÏÇÏ ÓÐÉÓËÁ ÒÁÚÌÉÞÉÊ ÍÅÖÄÕ +.B Vim +É Vi. +.PP +÷Ï ×ÒÅÍÑ ÒÁÂÏÔÙ × +.B Vim +ÍÏÖÎÏ ÐÏÌÕÞÉÔØ ÓÐÒÁ×ËÕ Ó ÐÏÍÏÝØÀ ÓÉÓÔÅÍÙ ×ÓÔÒÏÅÎÎÏÊ ÓÐÒÁ×ËÉ (ËÏÍÁÎÄÁ ":help"). +óÍ. ÒÁÚÄÅÌ "÷óôòïåîîáñ óðòá÷ëá" ÎÉÖÅ ÐÏ ÔÅËÓÔÕ. +.PP +þÁÝÅ ×ÓÅÇÏ +.B Vim +ÚÁÐÕÓËÁÀÔ ÄÌÑ ÐÒÁ×ËÉ ÏÄÎÏÇÏ ÆÁÊÌÁ ÐÒÉ ÐÏÍÏÝÉ ËÏÍÁÎÄÙ +.PP + vim ÆÁÊÌ +.PP +÷ ÏÂÝÅÍ ×ÉÄÅ ËÏÍÁÎÄÁ ÚÁÐÕÓËÁ +.B Vim +×ÙÇÌÑÄÉÔ ÔÁË: +.PP + vim [ËÌÀÞÉ] [ÓÐÉÓÏË ÆÁÊÌÏ×] +.PP +åÓÌÉ ÓÐÉÓÏË ÆÁÊÌÏ× ÏÔÓÕÔÓÔ×ÕÅÔ, ÒÅÄÁËÔÏÒ ÎÁÞÎ£Ô ÒÁÂÏÔÕ Ó ÐÕÓÔÙÍ ÂÕÆÅÒÏÍ. +÷ ÐÒÏÔÉ×ÎÏÍ ÓÌÕÞÁÅ ÉÍÑ ÆÁÊÌÁ ÄÏÌÖÎÏ ÂÙÔØ ÕËÁÚÁÎÏ ÏÄÎÉÍ ÉÚ ÓÌÅÄÕÀÝÉÈ ÞÅÔÙÒ£È ÓÐÏÓÏÂÏ×: +.TP 12 +ÆÁÊÌ .. +óÐÉÓÏË ÉͣΠÆÁÊÌÏ×. +ðÅÒ×ÙÊ ÆÁÊÌ ÂÕÄÅÔ ÏÂßÑ×ÌÅÎ ÁËÔÉ×ÎÙÍ É ÚÁÇÒÕÖÅÎ × ÂÕÆÅÒ. ëÕÒÓÏÒ ÂÕÄÅÔ ÐÏÍÅݣΠ+× ÐÅÒ×ÏÊ ÓÔÒÏËÅ ÂÕÆÅÒÁ. äÏÓÔÕÐ Ë ÄÒÕÇÉÍ ÆÁÊÌÁÍ ÍÏÖÅÔ ÂÙÔØ ÏÓÕÝÅÓÔ×̣ΠÐÒÉ +ÐÏÍÏÝÉ ËÏÍÁÎÄÙ ":next". þÔÏÂÙ ÐÒÁ×ÉÔØ ÆÁÊÌ, ÉÍÑ ËÏÔÏÒÏÇÏ ÎÁÞÉÎÁÅÔÓÑ Ó ÓÉÍ×ÏÌÁ +"ÄÅÆÉÓ" (-), ÐÅÒÅÄ ÓÐÉÓËÏÍ ÆÁÊÌÏ× ÎÅÏÂÈÏÄÉÍÏ ÐÏÓÔÁ×ÉÔØ "--". +.TP +\- +æÁÊÌ ÂÕÄÅÔ ÐÒÏÞÉÔÁÎ ÉÚ ÐÏÔÏËÁ ÓÔÁÎÄÁÒÔÎÏÇÏ ××ÏÄÁ. ëÏÍÁÎÄÙ ÂÕÄÕÔ ÓÞÉÔÙ×ÁÔØÓÑ +ÉÚ ÓÔÁÎÄÁÒÔÎÏÇÏ ÐÏÔÏËÁ ÄÉÁÇÎÏÓÔÉËÉ (stderr), ËÏÔÏÒÙÊ ÄÏÌÖÅÎ ÂÙÔØ +ÔÅÒÍÉÎÁÌÏÍ. +.TP +\-t {ÍÅÔËÁ} +éÍÑ ÆÁÊÌÁ É ÎÁÞÁÌØÎÁÑ ÐÏÚÉÃÉÑ ËÕÒÓÏÒÁ ÚÁ×ÉÓÑÔ ÏÔ "ÍÅÔËÉ", ÐÏÈÏÖÅÊ ÎÁ ÍÅÔËÕ goto. +{ÍÅÔËÁ} ÉÝÅÔÓÑ × ÆÁÊÌÅ ÍÅÔÏË, ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÊ ÆÁÊÌ ÓÔÁÎÏ×ÉÔÓÑ ÁËÔÉ×ÎÙÍ, Á +ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÁÑ ËÏÍÁÎÄÁ ÉÓÐÏÌÎÑÅÔÓÑ. +þÁÝÅ ×ÓÅÇÏ ÉÓÐÏÌØÚÕÅÔÓÑ × ÐÒÏÇÒÁÍÍÁÈ ÎÁ ÑÚÙËÅ óÉ, ÇÄÅ {ÍÅÔËÁ} ÍÏÖÅÔ ÂÙÔØ ÉÍÅÎÅÍ +ÆÕÎËÃÉÉ. +æÁÊÌ, ÓÏÄÅÒÖÁÝÉÊ ÆÕÎËÃÉÀ, ÓÔÁÎÏ×ÉÔÓÑ ÁËÔÉ×ÎÙÍ, Á ËÕÒÓÏÒ ÐÏÍÅÝÁÅÔÓÑ × ÎÁÞÁÌÏ ÆÕÎËÃÉÉ. +óÍ. ":help tag-commands". +.TP +\-q [ÆÁÊÌ ÏÛÉÂÏË] +îÁÞÁÔØ ÒÁÂÏÔÕ × ÒÅÖÉÍÅ ÂÙÓÔÒÏÇÏ ÉÓÐÒÁ×ÌÅÎÉÑ. +ðÒÉ ÜÔÏÍ ÓÞÉÔÙ×ÁÅÔÓÑ [ÆÁÊÌ ÏÛÉÂÏË] É ÐÅÒ×ÁÑ ÏÛÉÂËÁ ×Ù×ÏÄÉÔÓÑ ÎÁ ÜËÒÁÎ. +åÓÌÉ [ÆÁÊÌ ÏÛÉÂÏË] ÎÅ ÕËÁÚÁÎ, ÉÍÑ ÆÁÊÌÁ ÂÅÒ£ÔÓÑ ÉÚ ÚÎÁÞÅÎÉÑ ÏÐÃÉÉ 'errorfile' +(ÐÏ ÕÍÏÌÞÁÎÉÀ: "AztecC.Err" ÄÌÑ Amiga, "errors.err" ÄÌÑ ÄÒÕÇÉÈ ÓÉÓÔÅÍ). +ë ÓÌÅÄÕÀÝÉÍ ÏÛÉÂËÁÍ ÍÏÖÎÏ ÐÅÒÅÊÔÉ ÐÏ ËÏÍÁÎÄÅ ":cn". +óÍ. ":help quickfix". +.PP +.B Vim +×ÅÄ£Ô ÓÅÂÑ ÐÏ-ÒÁÚÎÏÍÕ × ÚÁ×ÉÓÉÍÏÓÔÉ ÏÔ ÉÍÅÎÉ ËÏÍÁÎÄÙ (ÉÓÐÏÌÎÑÅÍÙÊ ÆÁÊÌ ÍÏÖÅÔ +ÂÙÔØ ÏÄÎÉÍ É ÔÅÍ ÖÅ). +.TP 10 +vim +"îÏÒÍÁÌØÎÙÊ" ÚÁÐÕÓË, ×Ó£ ÐÏ ÕÍÏÌÞÁÎÉÀ. +.TP +ex +úÁÐÕÓË × ÒÅÖÉÍÅ Ex. äÌÑ ÐÅÒÅÈÏÄÁ × ÎÏÒÍÁÌØÎÙÊ ÒÅÖÉÍ +ÎÅÏÂÈÏÄÉÍÏ ×ÙÐÏÌÎÉÔØ ËÏÍÁÎÄÕ ":vi". òÅÖÉÍ Ex ×ËÌÀÞÁÅÔ +ÔÁËÖÅ ËÌÀÞ "\-e". +.TP +view +úÁÐÕÓË × ÒÅÖÉÍÅ "ÔÏÌØËÏ ÄÌÑ ÞÔÅÎÉÑ". ÷Ù ÂÕÄÅÔÅ ÚÁÝÉÝÅÎÙ ÏÔ ÓÌÕÞÁÊÎÏÊ ÚÁÐÉÓÉ +ÆÁÊÌÁ. ôÏ ÖÅ ÓÁÍÏÅ ÍÏÖÎÏ ÓÄÅÌÁÔØ ËÌÀÞÏÍ "\-R". +.TP +gvim gview +÷ÅÒÓÉÑ Ó ÇÒÁÆÉÞÅÓËÉÍ ÉÎÔÅÒÆÅÊÓÏÍ. úÁÐÕÓËÁÅÔÓÑ × ÎÏ×ÏÍ ÏËÎÅ. +ôÏ ÖÅ ÓÁÍÏÅ ÍÏÖÎÏ ÓÄÅÌÁÔØ ÐÒÉ ÚÁÐÕÓËÅ Ó ËÌÀÞÏÍ "\-g". +.TP +rvim rview rgvim rgview +ëÁË É ÐÒÅÄÙÄÕÝÉÅ ËÏÍÁÎÄÙ, ÎÏ Ó ÏÇÒÁÎÉÞÅÎÉÑÍÉ. îÅÌØÚÑ ÚÁÐÕÓËÁÔØ ËÏÍÁÎÄÙ ÏÂÏÌÏÞËÉ +ÉÌÉ ÐÒÉÏÓÔÁÎÁ×ÌÉ×ÁÔØ ÒÁÂÏÔÕ +.B Vim. +÷ÍÅÓÔÏ ÐÒÉÓÔÁ×ËÉ "r" ÍÏÖÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ ËÌÀÞ "\-Z". +.SH ëìàþé +ëÌÀÞÉ ÍÏÇÕÔ ÂÙÔØ ÕËÁÚÁÎÙ × ÌÀÂÏÍ ÐÏÒÑÄËÅ, ÄÏ ÉÌÉ ÐÏÓÌÅ ÉͣΠ+ÆÁÊÌÏ×. ëÌÀÞÉ ÂÅÚ ÁÒÇÕÍÅÎÔÏ× ÍÏÇÕÔ ÂÙÔØ ÏÂßÅÄÉÎÅÎÙ ÐÏÄ ÏÄÎÉÍ +ÄÅÆÉÓÏÍ. +.TP 12 ++[ÎÏÍÅÒ] +÷ ÐÅÒ×ÏÍ ÆÁÊÌÅ ËÕÒÓÏÒ ÂÕÄÅÔ ÐÏÍÅݣΠÎÁ ÓÔÒÏËÕ Ó ÕËÁÚÁÎÎÙÍ ÎÏÍÅÒÏÍ. +åÓÌÉ "ÎÏÍÅÒ" ÎÅ ÕËÁÚÁÎ, ËÕÒÓÏÒ ÂÕÄÅÔ ÐÏÍÅݣΠÎÁ ÐÏÓÌÅÄÎÀÀ ÓÔÒÏËÕ. +.TP ++/{ÛÁÂÌÏÎ} +÷ ÐÅÒ×ÏÍ ÆÁÊÌÅ ËÕÒÓÏÒ ÂÕÄÅÔ ÐÏÍÅݣΠÎÁ ÍÅÓÔÏ ÐÅÒ×ÏÇÏ ÓÏ×ÐÁÄÅÎÉÑ +Ó ÕËÁÚÁÎÎÙÍ ÛÁÂÌÏÎÏÍ. óÍ. ":help search-pattern" ÄÌÑ ÐÏÌÕÞÅÎÉÑ +ÓÐÉÓËÁ ÄÏÐÕÓÔÉÍÙÈ ÛÁÂÌÏÎÏ×. +.TP ++{ËÏÍÁÎÄÁ} +.TP +\-c {ËÏÍÁÎÄÁ} +{ËÏÍÁÎÄÁ} ÉÓÐÏÌÎÑÅÔÓÑ ÐÏÓÌÅ ÚÁÇÒÕÚËÉ ÐÅÒ×ÏÇÏ ÆÁÊÌÁ ËÁË ËÏÍÁÎÄÁ Ex. +åÓÌÉ {ËÏÍÁÎÄÁ} ÓÏÄÅÒÖÉÔ ÐÒÏÂÅÌÙ, ÔÏ ÏÎÁ ÄÏÌÖÎÁ ÂÙÔØ ÚÁËÌÀÞÅÎÁ × +Ä×ÏÊÎÙÅ ËÁ×ÙÞËÉ (× ÚÁ×ÉÓÉÍÏÓÔÉ ÏÔ ÉÓÐÏÌØÚÕÅÍÏÊ ÏÂÏÌÏÞËÉ). +ðÒÉÍÅÒ: vim "+set si" main.c +.br +ðÒÉÍÅÞÁÎÉÅ: íÏÖÎÏ ÕËÁÚÙ×ÁÔØ ÄÏ ÄÅÓÑÔÉ ËÏÍÁÎÄ "+" ÉÌÉ "\-c". +.TP +\-\-cmd {ËÏÍÁÎÄÁ} +ëÁË "\-c", ÎÏ ËÏÍÁÎÄÁ ÉÓÐÏÌÎÑÅÔÓÑ ÐÅÒÅÄ ÏÂÒÁÂÏÔËÏÊ ÌÀÂÏÇÏ ÆÁÊÌÁ +ÎÁÓÔÒÏÅË (vimrc). +íÏÖÎÏ ÕËÁÚÙ×ÁÔØ ÄÏ ÄÅÓÑÔÉ ÔÁËÉÈ ËÏÍÁÎÄ, ÎÅÚÁ×ÉÓÉÍÏ ÏÔ ËÏÌÉÞÅÓÔ×Á +ËÏÍÁÎÄ "\-c". +.TP +\-A +åÓÌÉ +.B Vim +ÂÙÌ ÓÏÂÒÁÎ Ó ÐÏÄÄÅÒÖËÏÊ ÁÒÁÂÓËÏÇÏ ÑÚÙËÁ ÄÌÑ ÐÒÁ×ËÉ ÆÁÊÌÏ×, +ÎÁÂÒÁÎÎÙÈ ÓÐÒÁ×Á ÎÁÌÅ×Ï, É Ó ÐÏÄÄÅÒÖËÏÊ ÁÒÁÂÓËÏÊ ËÌÁ×ÉÁÔÕÒÙ, +ÜÔÏÔ ËÌÀÞ ÚÁÐÕÓËÁÅÔ +.B Vim +× ÁÒÁÂÓËÏÍ ÒÅÖÉÍÅ, Ó ×ËÌÀÞÅÎÎÏÊ ÏÐÃÉÅÊ 'arabic'. ÷ ÐÒÏÔÉ×ÎÏÍ +ÓÌÕÞÁÅ +.B Vim +ÚÁ×ÅÒÛÁÅÔ ÒÁÂÏÔÕ Ó ÏÛÉÂËÏÊ. +.TP +\-b +ä×ÏÉÞÎÙÊ ÒÅÖÉÍ. +ðÒÏÉÚ×ÏÄÉÔÓÑ ÎÁÓÔÒÏÊËÁ ÎÅËÏÔÏÒÙÈ ÏÐÃÉÊ, ÄÅÌÁÀÝÉÈ ×ÏÚÍÏÖÎÏÊ ÐÒÁ×ËÕ +Ä×ÏÉÞÎÏÇÏ ÉÌÉ ÉÓÐÏÌÎÑÅÍÏÇÏ ÆÁÊÌÁ. +.TP +\-C +òÅÖÉÍ ÓÏ×ÍÅÓÔÉÍÏÓÔÉ. ÷ËÌÀÞÁÅÔ ÏÐÃÉÀ 'compatible'. +.B Vim +ÂÕÄÅÔ ÒÁÂÏÔÁÔØ ÐÏÞÔÉ ËÁË Vi, ÄÁÖÅ ÅÓÌÉ ÓÕÝÅÓÔ×ÕÅÔ ÆÁÊÌ .vimrc. +.TP +\-d +òÅÖÉÍ ÐÏÉÓËÁ ÒÁÚÌÉÞÉÊ. +äÏÌÖÎÏ ÂÙÔØ ÕËÁÚÁÎÏ Ä×Á ÉÌÉ ÔÒÉ ÉÍÅÎÉ ÆÁÊÌÁ. +.B Vim +ÏÔËÒÏÅÔ ×ÓÅ ÆÁÊÌÙ É ÐÏËÁÖÅÔ ÒÁÚÌÉÞÉÑ ÍÅÖÄÕ ÎÉÍÉ +(ËÁË vimdiff(1)). +.TP +\-d {ÕÓÔÒÏÊÓÔ×Ï} +ïÔËÒÙÔØ {ÕÓÔÒÏÊÓÔ×Ï} ÄÌÑ ÉÓÐÏÌØÚÏ×ÁÎÉÑ × ËÁÞÅÓÔ×Å ÔÅÒÍÉÎÁÌÁ (ÔÏÌØËÏ ÎÁ Amiga). +ðÒÉÍÅÒ: +"\-d con:20/30/600/150". +.TP +\-e +úÁÐÕÓÔÉÔØ +.B Vim +× ÒÅÖÉÍÅ Ex, ËÁË ÂÕÄÔÏ ÉÓÐÏÌÎÑÅÍÙÊ ÆÁÊÌ ÉÍÅÅÔ ÉÍÑ "ex". +.TP +\-f +òÅÖÉÍ ÁËÔÉ×ÎÏÇÏ ÐÒÉÌÏÖÅÎÉÑ. ÷ÅÒÓÉÑ +.B Vim +Ó ÇÒÁÆÉÞÅÓËÉÍ ÉÎÔÅÒÆÅÊÓÏÍ ÎÅ ÂÕÄÅÔ ×ÅÔ×ÉÔØÓÑ É ÏÔËÌÀÞÁÔØÓÑ +ÏÔ ÚÁÐÕÓÔÉ×ÛÅÊ Å£ ÏÂÏÌÏÞËÉ. îÁ ÐÌÁÔÆÏÒÍÅ Amiga +.B Vim +ÎÅ ÂÕÄÅÔ ÓÏÚÄÁ×ÁÔØ ÎÏ×ÏÅ ÏËÎÏ. üÔÏÔ ËÌÀÞ ÎÕÖÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ, +ËÏÇÄÁ +.B Vim +ÚÁÐÕÓËÁÅÔÓÑ ÐÒÏÇÒÁÍÍÏÊ, ËÏÔÏÒÁÑ ÄÏÌÖÎÁ ÖÄÁÔØ ÚÁ×ÅÒÛÅÎÉÑ +ÓÅÁÎÓÁ ÐÒÁ×ËÉ (ÎÁÐÒÉÍÅÒ, ÐÒÏÇÒÁÍÍÁ ÄÌÑ ÒÁÂÏÔÙ Ó ÜÌÅËÔÒÏÎÎÏÊ ÐÏÞÔÏÊ). +îÁ ÐÌÁÔÆÏÒÍÅ Amiga ËÏÍÁÎÄÙ ":sh" É ":!" ÎÅ ÂÕÄÕÔ ÒÁÂÏÔÁÔØ. +.TP +\-\-nofork +òÅÖÉÍ ÁËÔÉ×ÎÏÇÏ ÐÒÉÌÏÖÅÎÉÑ. ÷ÅÒÓÉÑ +.B Vim +Ó ÇÒÁÆÉÞÅÓËÉÍ ÉÎÔÅÒÆÅÊÓÏÍ ÎÅ ÂÕÄÅÔ ×ÅÔ×ÉÔØÓÑ É ÏÔËÌÀÞÁÔØÓÑ +ÏÔ ÚÁÐÕÓÔÉ×ÛÅÊ Å£ ÏÂÏÌÏÞËÉ. +.TP +\-F +åÓÌÉ +.B Vim +ÂÙÌ ÓÏÂÒÁÎ Ó ÐÏÄÄÅÒÖËÏÊ FKMAP ÄÌÑ ÐÒÁ×ËÉ ÔÅËÓÔÁ ÓÐÒÁ×Á ÎÁÌÅ×Ï +É ÎÁÓÔÒÏÅË ËÌÁ×ÉÁÔÕÒÙ ÄÌÑ ÑÚÙËÁ ÆÁÒÓÉ, ÜÔÏÔ ËÌÀÞ ÚÁÐÕÓËÁÅÔ +.B Vim +× ÒÅÖÉÍÅ ÆÁÒÓÉ, ÉÎÁÞÅ ÇÏ×ÏÒÑ, Ó ×ËÌÀÞ£ÎÎÙÍÉ ÏÐÃÉÑÍÉ +\&'fkmap' É 'rightleft'. +÷ ÐÒÏÔÉ×ÎÏÍ ÓÌÕÞÁÅ +.B Vim +ÚÁ×ÅÒÛÁÅÔ ÒÁÂÏÔÕ Ó ÓÏÏÂÝÅÎÉÅÍ Ï ÏÛÉÂËÅ. +.TP +\-g +åÓÌÉ +.B Vim +ÂÙÌ ÓÏÂÒÁÎ Ó ÐÏÄÄÅÒÖËÏÊ ÇÒÁÆÉÞÅÓËÏÇÏ ÉÎÔÅÒÆÅÊÓÁ, ÜÔÏÔ ËÌÀÞ +×ËÌÀÞÁÅÔ ÇÒÁÆÉÞÅÓËÉÊ ÉÎÔÅÒÆÅÊÓ. ÷ ÐÒÏÔÉ×ÎÏÍ ÓÌÕÞÁÅ +.B Vim +ÚÁ×ÅÒÛÁÅÔ ÒÁÂÏÔÕ Ó ÓÏÏÂÝÅÎÉÅÍ Ï ÏÛÉÂËÅ. +.TP +\-h +÷Ù×ÏÄÉÔ ËÒÁÔËÕÀ ÉÎÆÏÒÍÁÃÉÀ Ï ÁÒÇÕÍÅÎÔÁÈ É ËÌÀÞÁÈ ËÏÍÁÎÄÎÏÊ ÓÔÒÏËÉ. +ðÏÓÌÅ ÜÔÏÇÏ +.B Vim +ÚÁ×ÅÒÛÁÅÔ ÒÁÂÏÔÕ. +.TP +\-H +åÓÌÉ +.B Vim +ÂÙÌ ÓÏÂÒÁÎ Ó ÐÏÄÄÅÒÖËÏÊ ÐÒÁ×ËÉ ÔÅËÓÔÁ ÓÐÒÁ×Á ÎÁÌÅ×Ï +É ÎÁÓÔÒÏÅË ËÌÁ×ÉÁÔÕÒÙ ÄÌÑ É×ÒÉÔÁ, ÜÔÏÔ ËÌÀÞ ÚÁÐÕÓËÁÅÔ +.B Vim +× ÒÅÖÉÍÅ É×ÒÉÔÁ, ÉÎÁÞÅ ÇÏ×ÏÒÑ, Ó ×ËÌÀÞ£ÎÎÙÍÉ ÏÐÃÉÑÍÉ 'hkmap' É 'rightleft'. +÷ ÐÒÏÔÉ×ÎÏÍ ÓÌÕÞÁÅ +.B Vim +ÚÁ×ÅÒÛÁÅÔ ÒÁÂÏÔÕ Ó ÓÏÏÂÝÅÎÉÅÍ Ï ÏÛÉÂËÅ. +.TP +\-i {viminfo} +åÓÌÉ ÉÓÐÏÌØÚÕÅÔÓÑ ÆÁÊÌ viminfo, ÔÏ ÜÔÏÔ ËÌÀÞ ÚÁÄÁ£Ô ÉÍÑ ÔÁËÏÇÏ ÆÁÊÌÁ (×ÍÅÓÔÏ +"~/.viminfo" ÐÏ ÕÍÏÌÞÁÎÉÀ). íÏÖÎÏ ÔÁËÖÅ ÉÚÂÅÖÁÔØ ÉÓÐÏÌØÚÏ×ÁÎÉÑ ÆÁÊÌÁ viminfo +ÐÕÔ£Í ÕËÁÚÁÎÉÑ ÉÍÅÎÉ "NONE". +.TP +\-L +ôÏ ÖÅ, ÞÔÏ É \-r. +.TP +\-l +òÅÖÉÍ Lisp. ÷ËÌÀÞÁÀÔÓÑ ÏÐÃÉÉ 'lisp' É 'showmatch'. +.TP +\-m +éÚÍÅÎÅÎÉÅ ÆÁÊÌÏ× ÚÁÐÒÅÝÅÎÏ. ðÒÉ ÜÔÏÍ ÏÔËÌÀÞÁÅÔÓÑ ÏÐÃÉÑ 'write', ÐÏÜÔÏÍÕ +ÚÁÐÉÓØ ÆÁÊÌÏ× ÓÔÁÎÏ×ÉÔÓÑ ÎÅ×ÏÚÍÏÖÎÏÊ. +.TP +\-N +òÅÖÉÍ ÎÅÐÏÌÎÏÊ ÓÏ×ÍÅÓÔÉÍÏÓÔÉ. ïÔËÌÀÞÁÅÔÓÑ 'compatible'. +.B Vim +ÂÕÄÅÔ ÒÁÂÏÔÁÔØ ÌÕÞÛÅ, ÎÏ ÎÅ ÂÕÄÅÔ ÐÏÌÎÏÓÔØÀ ÓÏ×ÍÅÓÔÉÍ Ó Vi, ÄÁÖÅ ÅÓÌÉ +ÏÔÓÕÔÓÔ×ÕÅÔ ÆÁÊÌ ÓÃÅÎÁÒÉÑ ÎÁÓÔÒÏÅË (.vimrc). +.TP +\-n +îÅ ÉÓÐÏÌØÚÏ×ÁÔØ Ó×ÏÐ-ÆÁÊÌ. ÷ÏÓÓÔÁÎÏ×ÌÅÎÉÅ ÐÒÉ ÓÂÏÅ × ÒÁÂÏÔÅ ÂÕÄÅÔ ÎÅ×ÏÚÍÏÖÎÏ. +õÄÏÂÎÏ ÄÌÑ ÐÒÁ×ËÉ ÆÁÊÌÁ ÎÁ ÏÞÅÎØ ÍÅÄÌÅÎÎÏÍ ÎÏÓÉÔÅÌÅ (ÎÁÐÒÉÍÅÒ, ÇÉÂËÏÍ ÄÉÓËÅ). +ôÏ ÖÅ ÓÁÍÏÅ ÍÏÖÎÏ ÓÄÅÌÁÔØ ËÏÍÁÎÄÏÊ ":set uc=0". ïÔÍÅÎÁ -- ":set uc=200". +.TP +\-o[N] +ïÔËÒÙÔØ N ÏËÏÎ, ÒÁÚÄÅÌ£ÎÎÙÈ ÐÏ ÇÏÒÉÚÏÎÔÁÌÉ. åÓÌÉ N ÎÅ ÕËÁÚÁÎÏ, ÔÏ ÏÔËÒÙ×ÁÅÔÓÑ +ÐÏ ÏÄÎÏÍÕ ÏËÎÕ ÎÁ ËÁÖÄÙÊ ÆÁÊÌ. +.TP +\-O[N] +ïÔËÒÙÔØ N ÏËÏÎ, ÒÁÚÄÅÌ£ÎÎÙÈ ÐÏ ×ÅÒÔÉËÁÌÉ. åÓÌÉ N ÎÅ ÕËÁÚÁÎÏ, ÔÏ ÏÔËÒÙ×ÁÅÔÓÑ +ÐÏ ÏÄÎÏÍÕ ÏËÎÕ ÎÁ ËÁÖÄÙÊ ÆÁÊÌ. +.TP +\-R +òÅÖÉÍ "ÔÏÌØËÏ ÄÌÑ ÞÔÅÎÉÑ". ÷ËÌÀÞÁÅÔÓÑ ÏÐÃÉÑ 'readonly'. +æÁÊÌ × ÂÕÆÅÒÅ ÄÏÓÔÕÐÅÎ ÄÌÑ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ, ÎÏ ÅÇÏ ËÏÐÉÀ ÎÁ ÄÉÓËÅ ÎÅÌØÚÑ +ÓÌÕÞÁÊÎÏ ÐÅÒÅÚÁÐÉÓÁÔØ. äÌÑ ÓÏÈÒÁÎÅÎÉÑ ÆÁÊÌÁ ÎÅÏÂÈÏÄÉÍÏ ÄÏÂÁ×ÉÔØ ×ÏÓËÌÉÃÁÔÅÌØÎÙÊ +ÚÎÁË Ë ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ËÏÍÁÎÄÅ Ex (ÎÁÐÒÉÍÅÒ, ":w!"). +ëÌÀÞ "\-R" ÐÏÄÒÁÚÕÍÅ×ÁÅÔ ÔÁËÖÅ, ÞÔÏ ÉÓÐÏÌØÚÕÅÔÓÑ É ËÌÀÞ "\-n" (ÓÍ. ×ÙÛÅ). +ïÐÃÉÑ 'readonly' ÍÏÖÅÔ ÂÙÔØ ×ÙËÌÀÞÅÎÁ ÐÏ ËÏÍÁÎÄÅ ":set noro". +óÍ. ":help 'readonly'". +.TP +\-r +÷Ù×ÅÓÔÉ ÓÐÉÓÏË Ó×ÏÐ-ÆÁÊÌÏ× É ÉÎÆÏÒÍÁÃÉÀ Ï ÉÈ ÉÓÐÏÌØÚÏ×ÁÎÉÉ ÄÌÑ ×ÏÓÓÔÁÎÏ×ÌÅÎÉÑ ÐÏÓÌÅ ÓÂÏÑ. +.TP +\-r {ÆÁÊÌ} +òÅÖÉÍ ×ÏÓÓÔÁÎÏ×ÌÅÎÉÑ. +äÌÑ ×ÏÓÓÔÁÎÏ×ÌÅÎÉÑ ÐÏÓÌÅ ÓÂÏÑ ÂÕÄÅÔ ÉÓÐÏÌØÚÏ×ÁÎ Ó×ÏÐ-ÆÁÊÌ. +ó×ÏÐ-ÆÁÊÌ ÉÍÅÅÔ ÔÏ ÖÅ ÉÍÑ, ÞÔÏ É ÔÅËÓÔÏ×ÙÊ ÆÁÊÌ, ÎÏ Ó ÄÏÂÁ×ÌÅÎÉÅÍ ÒÁÓÛÉÒÅÎÉÑ ".swp". +óÍ. ":help recovery". +.TP +\-s +ôÉÈÉÊ ÒÅÖÉÍ. ôÏÌØËÏ ÐÒÉ ÚÁÐÕÓËÅ ËÁË "Ex" ÉÌÉ ÅÓÌÉ ÐÅÒÅÄ "\-s" ÕËÁÚÁÎ ËÌÀÞ "\-e". +.TP +\-s {scriptin} +óÞÉÔÙ×ÁÅÔÓÑ ÆÁÊÌ ÓÃÅÎÁÒÉÑ {scriptin}. ðÒÉ ÜÔÏÍ, ÓÏÄÅÒÖÉÍÏÅ ÆÁÊÌÁ ×ÏÓÐÒÉÎÉÍÁÅÔÓÑ +× ×ÉÄÅ ËÏÍÁÎÄ, ËÁË ÅÓÌÉ ÂÙ ÏÎÉ ÂÙÌÉ ÎÁÂÒÁÎÙ ÎÁ ËÏÎÓÏÌÉ. +ôÏ ÖÅ ÓÁÍÏÅ ÄÏÓÔÉÇÁÅÔÓÑ ËÏÍÁÎÄÏÊ ":source! {scriptin}". +åÓÌÉ ËÏÎÅà ÆÁÊÌÁ ÓÞÉÔÙ×ÁÅÔÓÑ ÄÏ ÚÁ×ÅÒÛÅÎÉÑ ÒÁÂÏÔÙ ÒÅÄÁËÔÏÒÁ, ÔÏ × ÄÁÌØÎÅÊÛÅÍ +××ÏÄ ÏÓÕÝÅÓÔ×ÌÑÅÔÓÑ Ó ËÌÁ×ÉÁÔÕÒÙ. +.TP +\-T {terminal} +óÏÏÂÝÁÅÔ +.B Vim +ÔÉÐ ÉÓÐÏÌØÚÕÅÍÏÇÏ ÔÅÒÍÉÎÁÌÁ. îÅÏÂÈÏÄÉÍÏ ÔÏÌØËÏ × ÔÅÈ ÓÉÔÕÁÃÉÑÈ, ËÏÇÄÁ +Á×ÔÏÍÁÔÉÞÅÓËÏÅ ÏÐÒÅÄÅÌÅÎÉÅ ÔÅÒÍÉÎÁÌÁ ÎÅ ÒÁÂÏÔÁÅÔ. éÍÑ ÔÅÒÍÉÎÁÌÁ ÄÏÌÖÎÏ ÂÙÔØ +ÉÚ×ÅÓÔÎÏ +.B Vim +(×ÓÔÒÏÅÎÏ × ÎÅÇÏ) ÉÌÉ ÏÐÒÅÄÅÌÅÎÏ × ÆÁÊÌÁÈ termcap ÉÌÉ terminfo. +.TP +\-u {vimrc} +éÓÐÏÌØÚÏ×ÁÔØ ËÏÍÁÎÄÙ ÉÚ ÆÁÊÌÁ ÓÃÅÎÁÒÉÑ {vimrc} ÄÌÑ ÎÁÓÔÒÏÊËÉ. +÷ÓÅ ÏÓÔÁÌØÎÙÅ ÆÁÊÌÙ ÎÁÓÔÒÏÅË ÐÒÏÐÕÓËÁÀÔÓÑ. +õÄÏÂÎÏ ÄÌÑ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ ÓÐÅÃÉÁÌØÎÙÈ ÔÉÐÏ× ÆÁÊÌÏ×. +þÔÏÂÙ ÉÚÂÅÖÁÔØ ÉÓÐÏÌØÚÏ×ÁÎÉÑ ÓÃÅÎÁÒÉÅ× ÎÁÓÔÒÏÅË ×ÏÏÂÝÅ, ÍÏÖÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ +ÉÍÑ "NONE". óÍ. ":help initialization". +.TP +\-U {gvimrc} +éÓÐÏÌØÚÏ×ÁÔØ ËÏÍÁÎÄÙ ÉÚ ÆÁÊÌÁ ÓÃÅÎÁÒÉÑ {gvimrc} ÄÌÑ ÎÁÓÔÒÏÊËÉ ÇÒÁÆÉÞÅÓËÏÇÏ +ÉÎÔÅÒÆÅÊÓÁ. +÷ÓÅ ÏÓÔÁÌØÎÙÅ ÆÁÊÌÙ ÎÁÓÔÒÏÅË ÄÌÑ ÇÒÁÆÉÞÅÓËÏÇÏ ÉÎÔÅÒÆÅÊÓÁ ÐÒÏÐÕÓËÁÀÔÓÑ. +þÔÏÂÙ ÉÚÂÅÖÁÔØ ÉÓÐÏÌØÚÏ×ÁÎÉÑ ÓÃÅÎÁÒÉÅ× ÎÁÓÔÒÏÅË ÇÒÁÆÉÞÅÓËÏÇÏ ÉÎÔÅÒÆÅÊÓÁ ×ÏÏÂÝÅ, +ÍÏÖÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ ÉÍÑ "NONE". óÍ. ":help gui-init". +.TP +\-V +"âÏÌÔÌÉ×ÙÊ" ÒÅÖÉÍ. ÷Ù×ÏÄÉÔØ ÓÏÏÂÝÅÎÉÑ Ï ÔÏÍ, ËÁËÉÅ ÆÁÊÌÙ ÞÉÔÁÀÔÓÑ, É Ï +ÞÔÅÎÉÉ-ÚÁÐÉÓÉ ÆÁÊÌÁ viminfo. +.TP +\-v +úÁÐÕÓÔÉÔØ +.B Vim +× ÒÅÖÉÍÅ Vi, ËÁË ÂÕÄÔÏ ÉÓÐÏÌÎÑÅÍÙÊ ÆÁÊÌ ÉÍÅÅÔ ÉÍÑ "vi". éÍÅÅÔ ÓÍÙÓÌ ÔÏÌØËÏ ÅÓÌÉ +ÉÓÐÏÌÎÑÅÍÙÊ ÆÁÊÌ ÉÍÅÅÔ ÉÍÑ "ex". +.TP +\-w {scriptout} +÷ÓÅ ÓÉÍ×ÏÌÙ, ××ÅÄ£ÎÎÙÅ Ó ËÌÁ×ÉÁÔÕÒÙ ×ÐÌÏÔØ ÄÏ ÍÏÍÅÎÔÁ ÚÁ×ÅÒÛÅÎÉÑ ÒÁÂÏÔÙ, +ÚÁÐÉÓÙ×ÁÀÔÓÑ × ÆÁÊÌ {scriptout}. +õÄÏÂÎÏ × ÔÏÍ ÓÌÕÞÁÅ, ËÏÇÄÁ ×Ù ÈÏÔÉÔÅ ÓÏÚÄÁÔØ ÆÁÊÌ ÓÃÅÎÁÒÉÑ ÄÌÑ ÐÏÓÌÅÄÕÀÝÅÇÏ +ÉÓÐÏÌØÚÏ×ÁÎÉÑ Ó "vim \-s" ÉÌÉ ":source!". åÓÌÉ ÆÁÊÌ {scriptout} ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ, +ÔÏ ÎÏ×ÙÅ ÓÉÍ×ÏÌÙ ÂÕÄÕÔ ÄÏÂÁ×ÌÑÀÔÓÑ × ËÏÎÅà ÆÁÊÌÁ. +.TP +\-W {scriptout} +ëÁË "\-w", ÎÏ ÕÖÅ ÓÕÝÅÓÔ×ÕÀÝÉÊ ÆÁÊÌ ÂÕÄÅÔ ÐÅÒÅÚÁÐÉÓÁÎ. +.TP +\-x +ûÉÆÒÏ×ÁÔØ ÚÁÐÉÓÙ×ÁÅÍÙÅ ÆÁÊÌÙ. âÕÄÅÔ ×ÙÄÁÎÏ ÐÒÉÇÌÁÛÅÎÉÅ ××ÅÓÔÉ ÐÁÒÏÌØ. +.TP +\-X +îÅ ÐÏÄËÌÀÞÁÔØÓÑ Ë X-ÓÅÒ×ÅÒÕ. õÓËÏÒÑÅÔ ÚÁÇÒÕÚËÕ ÎÁ ËÏÎÓÏÌÉ, ÎÏ ÄÅÌÁÅÔ ÎÅ×ÏÚÍÏÖÎÙÍ +ÉÓÐÏÌØÚÏ×ÁÎÉÅ ÚÁÇÏÌÏ×ËÁ ÏËÎÁ É ÂÕÆÅÒÁ ÏÂÍÅÎÁ. +.TP +\-Z +ïÇÒÁÎÉÞÅÎÎÙÊ ÒÅÖÉÍ. òÁÂÏÔÁÅÔ ÔÁË ÖÅ, ËÁË É ÐÒÏÇÒÁÍÍÙ, ÎÁÞÉÎÁÀÝÉÅÓÑ Ó "r". +.TP +\-\- +ëÏÎÅà ËÌÀÞÅÊ. ÷ÓÅ ÏÓÔÁÌØÎÙÅ ÁÒÇÕÍÅÎÔÙ ÒÁÓÓÍÁÔÒÉ×ÁÀÔÓÑ ËÁË ÉÍÅÎÁ ÆÁÊÌÏ×. +íÏÖÅÔ ÂÙÔØ ÉÓÐÏÌØÚÏ×ÁÎÏ ÄÌÑ ÐÒÁ×ËÉ ÆÁÊÌÏ×, ÉÍÅÎÁ ËÏÔÏÒÙÈ ÎÁÞÉÎÁÀÔÓÑ Ó ÄÅÆÉÓÁ. +.TP +\-\-help +÷Ù×ÅÓÔÉ ËÒÁÔËÕÀ ÓÐÒÁ×ËÕ É ÚÁ×ÅÒÛÉÔØ ÒÁÂÏÔÕ. ôÏ ÖÅ, ÞÔÏ É "\-h". +.TP +\-\-version +÷Ù×ÅÓÔÉ ÉÎÆÏÒÍÁÃÉÀ Ï ×ÅÒÓÉÉ ÐÒÏÇÒÁÍÍÙ É ÚÁ×ÅÒÛÉÔØ ÒÁÂÏÔÕ. +.TP +\-\-remote +ðÏÄËÌÀÞÉÔØÓÑ Ë ÓÅÒ×ÅÒÕ Vim É ÚÁÓÔÁ×ÉÔØ ÅÇÏ ÐÒÁ×ÉÔØ ÆÁÊÌÙ, ÕËÁÚÁÎÎÙÅ × +ÐÏÓÌÅÄÕÀÝÉÈ ÁÒÇÕÍÅÎÔÁÈ. åÓÌÉ ÓÅÒ×ÅÒ ÎÅ ÎÁÊÄÅÎ, ×Ù×ÏÄÉÔÓÑ ÐÒÅÄÕÐÒÅÖÄÅÎÉÅ, +Á ÆÁÊÌÙ ÐÒÁ×ÑÔÓÑ × ÍÅÓÔÎÏÊ ËÏÐÉÉ Vim. +.TP +\-\-remote\-expr {×ÙÒÁÖÅÎÉÅ} +ðÏÄËÌÀÞÉÔØÓÑ Ë ÓÅÒ×ÅÒÕ Vim É ×ÙÞÉÓÌÉÔØ ÎÁ Î£Í ÕËÁÚÁÎÎÏÅ {×ÙÒÁÖÅÎÉÅ}. +òÅÚÕÌØÔÁÔ ×ÙÞÉÓÌÅÎÉÑ ÂÕÄÅÔ ×Ù×ÅÄÅÎ × ÐÏÔÏË ÓÔÁÎÄÁÒÔÎÏÇÏ ×Ù×ÏÄÁ (stdout). +.TP +\-\-remote\-send {ËÌÀÞÉ} +ðÏÄËÌÀÞÉÔØÓÑ Ë ÓÅÒ×ÅÒÕ Vim É ÐÅÒÅÄÁÔØ ÅÍÕ ÕËÁÚÁÎÎÙÅ {ËÌÀÞÉ}. +.TP +\-\-remote\-silent +ëÁË "\-\-remote", ÎÏ ÂÅÚ ×Ù×ÏÄÁ ÐÒÅÄÕÐÒÅÖÄÅÎÉÑ, ÅÓÌÉ ÓÅÒ×ÅÒ ÎÅ ÎÁÊÄÅÎ. +.TP +\-\-remote\-wait +ëÁË "\-\-remote", ÎÏ Vim ÎÅ ÂÕÄÅÔ ÚÁ×ÅÒÛÁÔØ ÒÁÂÏÔÕ ÄÏ ÔÅÈ ÐÏÒ, ÐÏËÁ ÎÅ ÂÕÄÅÔ +×ÙÐÏÌÎÅÎÁ ÐÒÁ×ËÁ ×ÓÅÈ ÆÁÊÌÏ×. +.TP +\-\-remote\-wait\-silent +ëÁË "\-\-remote\-wait", ÎÏ ÂÅÚ ×Ù×ÏÄÁ ÐÒÅÄÕÐÒÅÖÄÅÎÉÑ, ÅÓÌÉ ÓÅÒ×ÅÒ ÎÅ ÎÁÊÄÅÎ. +.TP +\-\-serverlist +÷Ù×ÅÓÔÉ ÓÐÉÓÏË ×ÓÅÈ ÄÏÓÔÕÐÎÙÈ ÓÅÒ×ÅÒÏ× Vim. +.TP +\-\-servername {ÉÍÑ} +éÓÐÏÌØÚÏ×ÁÔØ ÕËÁÚÁÎÎÏÅ {ÉÍÑ} × ËÁÞÅÓÔ×Å ÉÍÅÎÉ ÓÅÒ×ÅÒÁ. åÓÌÉ ËÌÀÞ +"\-\-remote" ÎÅ ÕËÁÚÁÎ, ÔÏ {ÉÍÑ} ÐÒÉÓ×ÁÉ×ÁÅÔÓÑ ÄÁÎÎÏÊ ËÏÐÉÉ Vim, +× ÐÒÏÔÉ×ÎÏÍ ÓÌÕÞÁÅ ÕËÁÚÙ×ÁÅÔ ÎÁ ÉÍÑ ÓÅÒ×ÅÒÁ, Ë ËÏÔÏÒÏÍÕ ÓÌÅÄÕÅÔ +ÐÏÄËÌÀÞÉÔØÓÑ. +.TP +\-\-socketid {id} +ôÏÌØËÏ ÄÌÑ ÇÒÁÆÉÞÅÓËÏÇÏ ÉÎÔÅÒÆÅÊÓÁ GTK: ÉÓÐÏÌØÚÏ×ÁÔØ ÍÅÈÁÎÉÚÍ GtkPlug ÄÌÑ +ÚÁÐÕÓËÁ gvim × ÏÔÄÅÌØÎÏÍ ÏËÎÅ. +.TP +\-\-echo\-wid +ôÏÌØËÏ ÄÌÑ ÇÒÁÆÉÞÅÓËÏÇÏ ÉÎÔÅÒÆÅÊÓÁ GTK: ×Ù×ÅÓÔÉ ÉÄÅÎÔÉÆÉËÁÔÏÒ ÏËÎÁ (Window ID) +× ÐÏÔÏË ÓÔÁÎÄÁÒÔÎÏÇÏ ×Ù×ÏÄÁ (stdout). +.SH ÷óôòïåîîáñ óðòá÷ëá +äÌÑ ÎÁÞÁÌÁ, ÎÁÂÅÒÉÔÅ ËÏÍÁÎÄÕ ":help". +÷×ÅÄÉÔÅ ":help ÔÅÍÁ", ÞÔÏÂÙ ÐÏÌÕÞÉÔØ ÓÐÒÁ×ËÕ ÐÏ ËÏÎËÒÅÔÎÏÊ ÔÅÍÅ. +îÁÐÒÉÍÅÒ, ËÏÍÁÎÄÁ ":help ZZ" ×Ù×ÅÄÅÔ ÉÎÆÏÒÍÁÃÉÀ Ï ËÏÍÁÎÄÅ "ZZ". +éÓÐÏÌØÚÕÊÔÅ <Tab> É CTRL-D ÄÌÑ Á×ÔÏÍÁÔÉÞÅÓËÏÇÏ ÄÏÐÏÌÎÅÎÉÑ +ÎÁÚ×ÁÎÉÊ ÔÅÍ (":help cmdline-completion"). +äÌÑ ÂÙÓÔÒÏÇÏ ÐÅÒÅÍÅÝÅÎÉÑ ÐÏ ÓÐÒÁ×ÏÞÎÉËÕ ÉÓÐÏÌØÚÕÀÔÓÑ ÍÅÔËÉ (ÞÔÏ-ÔÏ +×ÒÏÄÅ ÇÉÐÅÒÔÅËÓÔÏ×ÙÈ ÓÓÙÌÏË, ÓÍ. ":help"). ôÁËÉÍ ÏÂÒÁÚÏÍ ÍÏÖÎÏ +ÐÒÏÓÍÁÔÒÉ×ÁÔØ ×ÓÅ ÆÁÊÌÙ ÓÐÒÁ×ËÉ, ÎÁÐÒÉÍÅÒ ":help syntax.txt". +.SH æáêìù +.TP 15 +/usr/local/lib/vim/doc/*.txt +æÁÊÌÙ ÓÐÒÁ×ÏÞÎÉËÁ +.B Vim. +óÍ. ":help doc-file-list" ÄÌÑ ÐÏÌÕÞÅÎÉÑ ÐÏÌÎÏÇÏ ÓÐÉÓËÁ. +.TP +/usr/local/lib/vim/doc/tags +æÁÊÌ ÍÅÔÏË, ÉÓÐÏÌØÚÕÅÍÙÊ ÄÌÑ ÐÏÉÓËÁ ÉÎÆÏÒÍÁÃÉÉ × ÆÁÊÌÁÈ ÓÐÒÁ×ËÉ. +.TP +/usr/local/lib/vim/syntax/syntax.vim +óÉÓÔÅÍÎÙÅ ÎÁÓÔÒÏÊËÉ ÓÉÎÔÁËÓÉÓÁ. +.TP +/usr/local/lib/vim/syntax/*.vim +æÁÊÌÙ ÓÉÎÔÁËÓÉÓÁ ÄÌÑ ÒÁÚÎÙÈ ÑÚÙËÏ×. +.TP +/usr/local/lib/vim/vimrc +óÉÓÔÅÍÎÙÅ ÎÁÓÔÒÏÊËÉ +.B Vim. +.TP +/usr/local/lib/vim/gvimrc +óÉÓÔÅÍÎÙÊ ÎÁÓÔÒÏÊËÉ ÇÒÁÆÉÞÅÓËÏÇÏ ÉÎÔÅÒÆÅÊÓÁ. +.TP +/usr/local/lib/vim/optwin.vim +óÃÅÎÁÒÉÊ, ÉÓÐÏÌØÚÕÅÍÙÊ ÐÒÉ ×ÙÐÏÌÎÅÎÉÉ ËÏÍÁÎÄÙ ":options". +èÏÒÏÛÉÊ ÓÐÏÓÏ ÐÒÏÓÍÁÔÒÉ×ÁÔØ É ÉÚÍÅÎÑÔØ ÎÁÓÔÒÏÊËÉ. +.TP +/usr/local/lib/vim/menu.vim +óÉÓÔÅÍÎÙÅ ÎÁÓÔÒÏÊËÉ ÍÅÎÀ ÄÌÑ gvim. +.TP +/usr/local/lib/vim/bugreport.vim +óÃÅÎÁÒÉÊ ÄÌÑ ÓÏÚÄÁÎÉÑ ÏÔÞ£ÔÁ Ï ÏÂÎÁÒÕÖÅÎÎÙÈ ÇÌÀËÁÈ. óÍ. ":help bugs". +.TP +/usr/local/lib/vim/filetype.vim +óÃÅÎÁÒÉÊ ÄÌÑ ÏÐÒÅÄÅÌÅÎÉÑ ÔÉÐÁ ÆÁÊÌÁ ÐÏ ÉÍÅÎÉ. óÍ. ":help 'filetype'". +.TP +/usr/local/lib/vim/scripts.vim +óÃÅÎÁÒÉÊ ÄÌÑ ÏÐÒÅÄÅÌÅÎÉÑ ÔÉÐÁ ÆÁÊÌÁ ÐÏ ÓÏÄÅÒÖÉÍÏÍÕ. óÍ. ":help 'filetype'". +.TP +/usr/local/lib/vim/print/*.ps +æÁÊÌÙ ÄÌÑ ÐÅÞÁÔÉ PostScript. +.PP +âÏÌÅÅ Ó×ÅÖÁÑ ÉÎÆÏÒÍÁÃÉÑ -- ÎÁ ÓÁÊÔÅ VIM: +.br +<URL:http://www.vim.org/> +.SH óíïôòé ôáëöå +vimtutor(1) +.SH á÷ôïòù +âÏÌØÛÁÑ ÞÁÓÔØ +.B Vim +ÓÏÚÄÁÎÁ âÒÁÍÏÍ íÏÏÌÅÎÁÁÒÏÍ (Bram Moolenaar), ËÏÔÏÒÏÍÕ ÐÏÍÏÇÁÅÔ ÏÇÒÏÍÎÏÅ +ËÏÌÉÞÅÓÔ×Ï ÌÀÄÅÊ. óÍ. ":help credits" × +.B Vim. +.br +.B Vim +ÂÁÚÉÒÕÅÔÓÑ ÎÁ ËÏÄÅ ÒÅÄÁËÔÏÒÁ Stevie, ÎÁÐÉÓÁÎÎÏÇÏ ôÉÍÏÍ ôÏÍÐÓÏÎÏÍ (Tim Thompson), +ôÏÎÉ üÎÄÒÀÓÏÍ (Tony Andrews) É ç. ò. (æÒÅÄÏÍ) õÏÌÔÅÒÏÍ (G.R. (Fred) Walter). +ïÄÎÁËÏ, × ÎÁÓÔÏÑÝÅÅ ×ÒÅÍÑ × Vim ÐÏÞÔÉ ÎÅ ÏÓÔÁÌÏÓØ ÎÉÞÅÇÏ ÏÔ ÉÓÔÏÒÉÞÅÓËÏÇÏ ËÏÄÁ +ÅÇÏ ÐÒÅÄÛÅÓÔ×ÅÎÎÉËÁ. +.br +òÕÓÓËÁÑ ÌÏËÁÌÉÚÁÃÉÑ +.B Vim +×ÙÐÏÌÎÑÅÔÓÑ × ÒÁÍËÁÈ ÐÒÏÅËÔÁ "òÕ÷ÉÍ", +ÓÍ. <URL:http://sourceforge.net/projects/ruvim/>. +.SH çìàëé +óËÏÒÅÅ ×ÓÅÇÏ ÅÓÔØ. +óÍ. ":help todo" -- ÓÐÉÓÏË ÉÚ×ÅÓÔÎÙÈ ÐÒÏÂÌÅÍ. +.PP +úÁÍÅÔÉÍ, ÞÔÏ ÍÎÏÇÉÅ ×ÅÝÉ, ËÏÔÏÒÙÅ ÓÞÉÔÁÀÔÓÑ ÇÌÀËÁÍÉ, ÎÁ ÓÁÍÏÍ ÄÅÌÅ +Ñ×ÌÑÀÔÓÑ ÒÅÚÕÌØÔÁÔÏÍ ÓÌÉÛËÏÍ ÐÏÌÎÏÇÏ ×ÏÓÐÒÏÉÚ×ÅÄÅÎÉÑ ÐÏ×ÅÄÅÎÉÑ Vi. +åÓÌÉ ×Ù ÄÕÍÁÅÔÅ, ÞÔÏ ÞÔÏ-ÔÏ Ñ×ÌÑÅÔÓÑ ÏÛÉÂËÏÊ ÔÏÌØËÏ ÐÏÔÏÍÕ, ÞÔÏ +"Vi ÄÅÌÁÅÔ ÜÔÏ ÐÏ-ÄÒÕÇÏÍÕ", ×ÎÉÍÁÔÅÌØÎÏ ÐÒÏÞÉÔÁÊÔÅ ÆÁÊÌ vi_diff.txt +(ÉÌÉ ÎÁÂÅÒÉÔÅ ":help vi_diff.txt" × Vim) É ÉÓÐÏÌØÚÕÊÔÅ ÏÐÃÉÉ 'compatible' +É 'cpoptions'. diff --git a/runtime/doc/vim-ru.UTF-8.1 b/runtime/doc/vim-ru.UTF-8.1 new file mode 100644 index 0000000000..ef527213e3 --- /dev/null +++ b/runtime/doc/vim-ru.UTF-8.1 @@ -0,0 +1,489 @@ +.TH VIM 1 "2002 Feb 22" +.SH ИМЯ +vim \- Vi IMproved (Улучшенный Vi), текÑтовый редактор Ð´Ð»Ñ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð¼Ð¸Ñтов +.SH КОМÐÐДÐÐЯ СТРОКР+.br +.B vim +[ключи] [файл ..] +.br +.B vim +[ключи] \- +.br +.B vim +[ключи] \-t метка +.br +.B vim +[ключи] \-q [файл ошибок] +.PP +.br +.B ex +.br +.B view +.br +.B gvim +.B gview +.br +.B rvim +.B rview +.B rgvim +.B rgview +.SH ОПИСÐÐИЕ +.B Vim +-- текÑтовый редактор, обратно-ÑовмеÑтимый Ñ Vi. +Он может быть иÑпользован Ð´Ð»Ñ Ð¿Ñ€Ð°Ð²ÐºÐ¸ вÑех видов проÑтого текÑта. +ОÑобенно он хорош Ð´Ð»Ñ Ð¿Ñ€Ð°Ð²ÐºÐ¸ иÑходных текÑтов программ. +.PP +По Ñравнению Ñ Vi, +.B Vim +имеет много уÑовершенÑтвований: Ð¼Ð½Ð¾Ð³Ð¾ÐºÑ€Ð°Ñ‚Ð½Ð°Ñ Ð¾Ñ‚Ð¼ÐµÐ½Ð° операций, +множеÑтвенноÑть окон и буферов, подÑветка ÑинтакÑиÑа, правка командной Ñтроки, +автодополнение имён файлов, вÑÑ‚Ñ€Ð¾ÐµÐ½Ð½Ð°Ñ Ñправка, визуальное выделение и Ñ‚.п. +См. ":help vi_diff.txt" Ð´Ð»Ñ Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð»Ð½Ð¾Ð³Ð¾ ÑпиÑка различий между +.B Vim +и Vi. +.PP +Во Ð²Ñ€ÐµÐ¼Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ в +.B Vim +можно получить Ñправку Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ ÑиÑтемы вÑтроенной Ñправки (команда ":help"). +См. раздел "ВСТРОЕÐÐÐЯ СПРÐВКÐ" ниже по текÑту. +.PP +Чаще вÑего +.B Vim +запуÑкают Ð´Ð»Ñ Ð¿Ñ€Ð°Ð²ÐºÐ¸ одного файла при помощи команды +.PP + vim файл +.PP +Ð’ общем виде команда запуÑка +.B Vim +выглÑдит так: +.PP + vim [ключи] [ÑпиÑок файлов] +.PP +ЕÑли ÑпиÑок файлов отÑутÑтвует, редактор начнёт работу Ñ Ð¿ÑƒÑтым буфером. +Ð’ противном Ñлучае Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° должно быть указано одним из Ñледующих четырёх ÑпоÑобов: +.TP 12 +файл .. +СпиÑок имён файлов. +Первый файл будет объÑвлен активным и загружен в буфер. КурÑор будет помещён +в первой Ñтроке буфера. ДоÑтуп к другим файлам может быть оÑущеÑтвлён при +помощи команды ":next". Чтобы править файл, Ð¸Ð¼Ñ ÐºÐ¾Ñ‚Ð¾Ñ€Ð¾Ð³Ð¾ начинаетÑÑ Ñ Ñимвола +"дефиÑ" (-), перед ÑпиÑком файлов необходимо поÑтавить "--". +.TP +\- +Файл будет прочитан из потока Ñтандартного ввода. Команды будут ÑчитыватьÑÑ +из Ñтандартного потока диагноÑтики (stderr), который должен быть +терминалом. +.TP +\-t {метка} +Ð˜Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° и Ð½Ð°Ñ‡Ð°Ð»ÑŒÐ½Ð°Ñ Ð¿Ð¾Ð·Ð¸Ñ†Ð¸Ñ ÐºÑƒÑ€Ñора завиÑÑÑ‚ от "метки", похожей на метку goto. +{метка} ищетÑÑ Ð² файле меток, ÑоответÑтвующий файл ÑтановитÑÑ Ð°ÐºÑ‚Ð¸Ð²Ð½Ñ‹Ð¼, а +ÑоответÑÑ‚Ð²ÑƒÑŽÑ‰Ð°Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð° иÑполнÑетÑÑ. +Чаще вÑего иÑпользуетÑÑ Ð² программах на Ñзыке Си, где {метка} может быть именем +функции. +Файл, Ñодержащий функцию, ÑтановитÑÑ Ð°ÐºÑ‚Ð¸Ð²Ð½Ñ‹Ð¼, а курÑор помещаетÑÑ Ð² начало функции. +См. ":help tag-commands". +.TP +\-q [файл ошибок] +Ðачать работу в режиме быÑтрого иÑправлениÑ. +При Ñтом ÑчитываетÑÑ [файл ошибок] и Ð¿ÐµÑ€Ð²Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ° выводитÑÑ Ð½Ð° Ñкран. +ЕÑли [файл ошибок] не указан, Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° берётÑÑ Ð¸Ð· Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¾Ð¿Ñ†Ð¸Ð¸ 'errorfile' +(по умолчанию: "AztecC.Err" Ð´Ð»Ñ Amiga, "errors.err" Ð´Ð»Ñ Ð´Ñ€ÑƒÐ³Ð¸Ñ… ÑиÑтем). +К Ñледующим ошибкам можно перейти по команде ":cn". +См. ":help quickfix". +.PP +.B Vim +ведёт ÑÐµÐ±Ñ Ð¿Ð¾-разному в завиÑимоÑти от имени команды (иÑполнÑемый файл может +быть одним и тем же). +.TP 10 +vim +"Ðормальный" запуÑк, вÑÑ‘ по умолчанию. +.TP +ex +ЗапуÑк в режиме Ex. Ð”Ð»Ñ Ð¿ÐµÑ€ÐµÑ…Ð¾Ð´Ð° в нормальный режим +необходимо выполнить команду ":vi". Режим Ex включает +также ключ "\-e". +.TP +view +ЗапуÑк в режиме "только Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ". Ð’Ñ‹ будете защищены от Ñлучайной запиÑи +файла. То же Ñамое можно Ñделать ключом "\-R". +.TP +gvim gview +ВерÑÐ¸Ñ Ñ Ð³Ñ€Ð°Ñ„Ð¸Ñ‡ÐµÑким интерфейÑом. ЗапуÑкаетÑÑ Ð² новом окне. +То же Ñамое можно Ñделать при запуÑке Ñ ÐºÐ»ÑŽÑ‡Ð¾Ð¼ "\-g". +.TP +rvim rview rgvim rgview +Как и предыдущие команды, но Ñ Ð¾Ð³Ñ€Ð°Ð½Ð¸Ñ‡ÐµÐ½Ð¸Ñми. ÐÐµÐ»ÑŒÐ·Ñ Ð·Ð°Ð¿ÑƒÑкать команды оболочки +или приоÑтанавливать работу +.B Vim. +ВмеÑто приÑтавки "r" можно иÑпользовать ключ "\-Z". +.SH КЛЮЧИ +Ключи могут быть указаны в любом порÑдке, до или поÑле имён +файлов. Ключи без аргументов могут быть объединены под одним +дефиÑом. +.TP 12 ++[номер] +Ð’ первом файле курÑор будет помещён на Ñтроку Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð½Ñ‹Ð¼ номером. +ЕÑли "номер" не указан, курÑор будет помещён на поÑледнюю Ñтроку. +.TP ++/{шаблон} +Ð’ первом файле курÑор будет помещён на меÑто первого ÑÐ¾Ð²Ð¿Ð°Ð´ÐµÐ½Ð¸Ñ +Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð½Ñ‹Ð¼ шаблоном. См. ":help search-pattern" Ð´Ð»Ñ Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ +ÑпиÑка допуÑтимых шаблонов. +.TP ++{команда} +.TP +\-c {команда} +{команда} иÑполнÑетÑÑ Ð¿Ð¾Ñле загрузки первого файла как команда Ex. +ЕÑли {команда} Ñодержит пробелы, то она должна быть заключена в +двойные кавычки (в завиÑимоÑти от иÑпользуемой оболочки). +Пример: vim "+set si" main.c +.br +Примечание: Можно указывать до деÑÑти команд "+" или "\-c". +.TP +\-\-cmd {команда} +Как "\-c", но команда иÑполнÑетÑÑ Ð¿ÐµÑ€ÐµÐ´ обработкой любого файла +наÑтроек (vimrc). +Можно указывать до деÑÑти таких команд, незавиÑимо от количеÑтва +команд "\-c". +.TP +\-A +ЕÑли +.B Vim +был Ñобран Ñ Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶ÐºÐ¾Ð¹ арабÑкого Ñзыка Ð´Ð»Ñ Ð¿Ñ€Ð°Ð²ÐºÐ¸ файлов, +набранных Ñправа налево, и Ñ Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶ÐºÐ¾Ð¹ арабÑкой клавиатуры, +Ñтот ключ запуÑкает +.B Vim +в арабÑком режиме, Ñ Ð²ÐºÐ»ÑŽÑ‡ÐµÐ½Ð½Ð¾Ð¹ опцией 'arabic'. Ð’ противном +Ñлучае +.B Vim +завершает работу Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ¾Ð¹. +.TP +\-b +Двоичный режим. +ПроизводитÑÑ Ð½Ð°Ñтройка некоторых опций, делающих возможной правку +двоичного или иÑполнÑемого файла. +.TP +\-C +Режим ÑовмеÑтимоÑти. Включает опцию 'compatible'. +.B Vim +будет работать почти как Vi, даже еÑли ÑущеÑтвует файл .vimrc. +.TP +\-d +Режим поиÑка различий. +Должно быть указано два или три имени файла. +.B Vim +откроет вÑе файлы и покажет Ñ€Ð°Ð·Ð»Ð¸Ñ‡Ð¸Ñ Ð¼ÐµÐ¶Ð´Ñƒ ними +(как vimdiff(1)). +.TP +\-d {уÑтройÑтво} +Открыть {уÑтройÑтво} Ð´Ð»Ñ Ð¸ÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð² качеÑтве терминала (только на Amiga). +Пример: +"\-d con:20/30/600/150". +.TP +\-e +ЗапуÑтить +.B Vim +в режиме Ex, как будто иÑполнÑемый файл имеет Ð¸Ð¼Ñ "ex". +.TP +\-f +Режим активного приложениÑ. ВерÑÐ¸Ñ +.B Vim +Ñ Ð³Ñ€Ð°Ñ„Ð¸Ñ‡ÐµÑким интерфейÑом не будет ветвитьÑÑ Ð¸ отключатьÑÑ +от запуÑтившей её оболочки. Ðа платформе Amiga +.B Vim +не будет Ñоздавать новое окно. Этот ключ нужно иÑпользовать, +когда +.B Vim +запуÑкаетÑÑ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð¼Ð¾Ð¹, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ð´Ð¾Ð»Ð¶Ð½Ð° ждать Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð¸Ñ +ÑеанÑа правки (например, программа Ð´Ð»Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ Ñ Ñлектронной почтой). +Ðа платформе Amiga команды ":sh" и ":!" не будут работать. +.TP +\-\-nofork +Режим активного приложениÑ. ВерÑÐ¸Ñ +.B Vim +Ñ Ð³Ñ€Ð°Ñ„Ð¸Ñ‡ÐµÑким интерфейÑом не будет ветвитьÑÑ Ð¸ отключатьÑÑ +от запуÑтившей её оболочки. +.TP +\-F +ЕÑли +.B Vim +был Ñобран Ñ Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶ÐºÐ¾Ð¹ FKMAP Ð´Ð»Ñ Ð¿Ñ€Ð°Ð²ÐºÐ¸ текÑта Ñправа налево +и наÑтроек клавиатуры Ð´Ð»Ñ Ñзыка фарÑи, Ñтот ключ запуÑкает +.B Vim +в режиме фарÑи, иначе говорÑ, Ñ Ð²ÐºÐ»ÑŽÑ‡Ñ‘Ð½Ð½Ñ‹Ð¼Ð¸ опциÑми +\&'fkmap' и 'rightleft'. +Ð’ противном Ñлучае +.B Vim +завершает работу Ñ Ñообщением об ошибке. +.TP +\-g +ЕÑли +.B Vim +был Ñобран Ñ Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶ÐºÐ¾Ð¹ графичеÑкого интерфейÑа, Ñтот ключ +включает графичеÑкий интерфейÑ. Ð’ противном Ñлучае +.B Vim +завершает работу Ñ Ñообщением об ошибке. +.TP +\-h +Выводит краткую информацию об аргументах и ключах командной Ñтроки. +ПоÑле Ñтого +.B Vim +завершает работу. +.TP +\-H +ЕÑли +.B Vim +был Ñобран Ñ Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶ÐºÐ¾Ð¹ правки текÑта Ñправа налево +и наÑтроек клавиатуры Ð´Ð»Ñ Ð¸Ð²Ñ€Ð¸Ñ‚Ð°, Ñтот ключ запуÑкает +.B Vim +в режиме иврита, иначе говорÑ, Ñ Ð²ÐºÐ»ÑŽÑ‡Ñ‘Ð½Ð½Ñ‹Ð¼Ð¸ опциÑми 'hkmap' и 'rightleft'. +Ð’ противном Ñлучае +.B Vim +завершает работу Ñ Ñообщением об ошибке. +.TP +\-i {viminfo} +ЕÑли иÑпользуетÑÑ Ñ„Ð°Ð¹Ð» viminfo, то Ñтот ключ задаёт Ð¸Ð¼Ñ Ñ‚Ð°ÐºÐ¾Ð³Ð¾ файла (вмеÑто +"~/.viminfo" по умолчанию). Можно также избежать иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð° viminfo +путём ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ð¸Ð¼ÐµÐ½Ð¸ "NONE". +.TP +\-L +То же, что и \-r. +.TP +\-l +Режим Lisp. ВключаютÑÑ Ð¾Ð¿Ñ†Ð¸Ð¸ 'lisp' и 'showmatch'. +.TP +\-m +Изменение файлов запрещено. При Ñтом отключаетÑÑ Ð¾Ð¿Ñ†Ð¸Ñ 'write', поÑтому +запиÑÑŒ файлов ÑтановитÑÑ Ð½ÐµÐ²Ð¾Ð·Ð¼Ð¾Ð¶Ð½Ð¾Ð¹. +.TP +\-N +Режим неполной ÑовмеÑтимоÑти. ОтключаетÑÑ 'compatible'. +.B Vim +будет работать лучше, но не будет полноÑтью ÑовмеÑтим Ñ Vi, даже еÑли +отÑутÑтвует файл ÑÑ†ÐµÐ½Ð°Ñ€Ð¸Ñ Ð½Ð°Ñтроек (.vimrc). +.TP +\-n +Ðе иÑпользовать Ñвоп-файл. ВоÑÑтановление при Ñбое в работе будет невозможно. +Удобно Ð´Ð»Ñ Ð¿Ñ€Ð°Ð²ÐºÐ¸ файла на очень медленном ноÑителе (например, гибком диÑке). +То же Ñамое можно Ñделать командой ":set uc=0". Отмена -- ":set uc=200". +.TP +\-o[N] +Открыть N окон, разделённых по горизонтали. ЕÑли N не указано, то открываетÑÑ +по одному окну на каждый файл. +.TP +\-O[N] +Открыть N окон, разделённых по вертикали. ЕÑли N не указано, то открываетÑÑ +по одному окну на каждый файл. +.TP +\-R +Режим "только Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ". ВключаетÑÑ Ð¾Ð¿Ñ†Ð¸Ñ 'readonly'. +Файл в буфере доÑтупен Ð´Ð»Ñ Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ, но его копию на диÑке Ð½ÐµÐ»ÑŒÐ·Ñ +Ñлучайно перезапиÑать. Ð”Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð° необходимо добавить воÑклицательный +знак к ÑоответÑтвующей команде Ex (например, ":w!"). +Ключ "\-R" подразумевает также, что иÑпользуетÑÑ Ð¸ ключ "\-n" (Ñм. выше). +ÐžÐ¿Ñ†Ð¸Ñ 'readonly' может быть выключена по команде ":set noro". +См. ":help 'readonly'". +.TP +\-r +ВывеÑти ÑпиÑок Ñвоп-файлов и информацию об их иÑпользовании Ð´Ð»Ñ Ð²Ð¾ÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð¿Ð¾Ñле ÑбоÑ. +.TP +\-r {файл} +Режим воÑÑтановлениÑ. +Ð”Ð»Ñ Ð²Ð¾ÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð¿Ð¾Ñле ÑÐ±Ð¾Ñ Ð±ÑƒÐ´ÐµÑ‚ иÑпользован Ñвоп-файл. +Своп-файл имеет то же имÑ, что и текÑтовый файл, но Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸ÐµÐ¼ раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ ".swp". +См. ":help recovery". +.TP +\-s +Тихий режим. Только при запуÑке как "Ex" или еÑли перед "\-s" указан ключ "\-e". +.TP +\-s {scriptin} +СчитываетÑÑ Ñ„Ð°Ð¹Ð» ÑÑ†ÐµÐ½Ð°Ñ€Ð¸Ñ {scriptin}. При Ñтом, Ñодержимое файла воÑпринимаетÑÑ +в виде команд, как еÑли бы они были набраны на конÑоли. +То же Ñамое доÑтигаетÑÑ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð¾Ð¹ ":source! {scriptin}". +ЕÑли конец файла ÑчитываетÑÑ Ð´Ð¾ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð¸Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ редактора, то в дальнейшем +ввод оÑущеÑтвлÑетÑÑ Ñ ÐºÐ»Ð°Ð²Ð¸Ð°Ñ‚ÑƒÑ€Ñ‹. +.TP +\-T {terminal} +Сообщает +.B Vim +тип иÑпользуемого терминала. Ðеобходимо только в тех ÑитуациÑÑ…, когда +автоматичеÑкое определение терминала не работает. Ð˜Ð¼Ñ Ñ‚ÐµÑ€Ð¼Ð¸Ð½Ð°Ð»Ð° должно быть +извеÑтно +.B Vim +(вÑтроено в него) или определено в файлах termcap или terminfo. +.TP +\-u {vimrc} +ИÑпользовать команды из файла ÑÑ†ÐµÐ½Ð°Ñ€Ð¸Ñ {vimrc} Ð´Ð»Ñ Ð½Ð°Ñтройки. +Ð’Ñе оÑтальные файлы наÑтроек пропуÑкаютÑÑ. +Удобно Ð´Ð»Ñ Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ñпециальных типов файлов. +Чтобы избежать иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ñценариев наÑтроек вообще, можно иÑпользовать +Ð¸Ð¼Ñ "NONE". См. ":help initialization". +.TP +\-U {gvimrc} +ИÑпользовать команды из файла ÑÑ†ÐµÐ½Ð°Ñ€Ð¸Ñ {gvimrc} Ð´Ð»Ñ Ð½Ð°Ñтройки графичеÑкого +интерфейÑа. +Ð’Ñе оÑтальные файлы наÑтроек Ð´Ð»Ñ Ð³Ñ€Ð°Ñ„Ð¸Ñ‡ÐµÑкого интерфейÑа пропуÑкаютÑÑ. +Чтобы избежать иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ñценариев наÑтроек графичеÑкого интерфейÑа вообще, +можно иÑпользовать Ð¸Ð¼Ñ "NONE". См. ":help gui-init". +.TP +\-V +"Болтливый" режим. Выводить ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¾ том, какие файлы читаютÑÑ, и о +чтении-запиÑи файла viminfo. +.TP +\-v +ЗапуÑтить +.B Vim +в режиме Vi, как будто иÑполнÑемый файл имеет Ð¸Ð¼Ñ "vi". Имеет ÑмыÑл только еÑли +иÑполнÑемый файл имеет Ð¸Ð¼Ñ "ex". +.TP +\-w {scriptout} +Ð’Ñе Ñимволы, введённые Ñ ÐºÐ»Ð°Ð²Ð¸Ð°Ñ‚ÑƒÑ€Ñ‹ вплоть до момента Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð¸Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹, +запиÑываютÑÑ Ð² файл {scriptout}. +Удобно в том Ñлучае, когда вы хотите Ñоздать файл ÑÑ†ÐµÐ½Ð°Ñ€Ð¸Ñ Ð´Ð»Ñ Ð¿Ð¾Ñледующего +иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ñ "vim \-s" или ":source!". ЕÑли файл {scriptout} уже ÑущеÑтвует, +то новые Ñимволы будут добавлÑÑŽÑ‚ÑÑ Ð² конец файла. +.TP +\-W {scriptout} +Как "\-w", но уже ÑущеÑтвующий файл будет перезапиÑан. +.TP +\-x +Шифровать запиÑываемые файлы. Будет выдано приглашение ввеÑти пароль. +.TP +\-X +Ðе подключатьÑÑ Ðº X-Ñерверу. УÑкорÑет загрузку на конÑоли, но делает невозможным +иÑпользование заголовка окна и буфера обмена. +.TP +\-Z +Ограниченный режим. Работает так же, как и программы, начинающиеÑÑ Ñ "r". +.TP +\-\- +Конец ключей. Ð’Ñе оÑтальные аргументы раÑÑматриваютÑÑ ÐºÐ°Ðº имена файлов. +Может быть иÑпользовано Ð´Ð»Ñ Ð¿Ñ€Ð°Ð²ÐºÐ¸ файлов, имена которых начинаютÑÑ Ñ Ð´ÐµÑ„Ð¸Ñа. +.TP +\-\-help +ВывеÑти краткую Ñправку и завершить работу. То же, что и "\-h". +.TP +\-\-version +ВывеÑти информацию о верÑии программы и завершить работу. +.TP +\-\-remote +ПодключитьÑÑ Ðº Ñерверу Vim и заÑтавить его править файлы, указанные в +поÑледующих аргументах. ЕÑли Ñервер не найден, выводитÑÑ Ð¿Ñ€ÐµÐ´ÑƒÐ¿Ñ€ÐµÐ¶Ð´ÐµÐ½Ð¸Ðµ, +а файлы правÑÑ‚ÑÑ Ð² меÑтной копии Vim. +.TP +\-\-remote\-expr {выражение} +ПодключитьÑÑ Ðº Ñерверу Vim и вычиÑлить на нём указанное {выражение}. +Результат вычиÑÐ»ÐµÐ½Ð¸Ñ Ð±ÑƒÐ´ÐµÑ‚ выведен в поток Ñтандартного вывода (stdout). +.TP +\-\-remote\-send {ключи} +ПодключитьÑÑ Ðº Ñерверу Vim и передать ему указанные {ключи}. +.TP +\-\-remote\-silent +Как "\-\-remote", но без вывода предупреждениÑ, еÑли Ñервер не найден. +.TP +\-\-remote\-wait +Как "\-\-remote", но Vim не будет завершать работу до тех пор, пока не будет +выполнена правка вÑех файлов. +.TP +\-\-remote\-wait\-silent +Как "\-\-remote\-wait", но без вывода предупреждениÑ, еÑли Ñервер не найден. +.TP +\-\-serverlist +ВывеÑти ÑпиÑок вÑех доÑтупных Ñерверов Vim. +.TP +\-\-servername {имÑ} +ИÑпользовать указанное {имÑ} в качеÑтве имени Ñервера. ЕÑли ключ +"\-\-remote" не указан, то {имÑ} приÑваиваетÑÑ Ð´Ð°Ð½Ð½Ð¾Ð¹ копии Vim, +в противном Ñлучае указывает на Ð¸Ð¼Ñ Ñервера, к которому Ñледует +подключитьÑÑ. +.TP +\-\-socketid {id} +Только Ð´Ð»Ñ Ð³Ñ€Ð°Ñ„Ð¸Ñ‡ÐµÑкого интерфейÑа GTK: иÑпользовать механизм GtkPlug Ð´Ð»Ñ +запуÑка gvim в отдельном окне. +.TP +\-\-echo\-wid +Только Ð´Ð»Ñ Ð³Ñ€Ð°Ñ„Ð¸Ñ‡ÐµÑкого интерфейÑа GTK: вывеÑти идентификатор окна (Window ID) +в поток Ñтандартного вывода (stdout). +.SH ВСТРОЕÐÐÐЯ СПРÐВКР+Ð”Ð»Ñ Ð½Ð°Ñ‡Ð°Ð»Ð°, наберите команду ":help". +Введите ":help тема", чтобы получить Ñправку по конкретной теме. +Ðапример, команда ":help ZZ" выведет информацию о команде "ZZ". +ИÑпользуйте <Tab> и CTRL-D Ð´Ð»Ñ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡ÐµÑкого Ð´Ð¾Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ +названий тем (":help cmdline-completion"). +Ð”Ð»Ñ Ð±Ñ‹Ñтрого Ð¿ÐµÑ€ÐµÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð¿Ð¾ Ñправочнику иÑпользуютÑÑ Ð¼ÐµÑ‚ÐºÐ¸ (что-то +вроде гипертекÑтовых ÑÑылок, Ñм. ":help"). Таким образом можно +проÑматривать вÑе файлы Ñправки, например ":help syntax.txt". +.SH ФÐЙЛЫ +.TP 15 +/usr/local/lib/vim/doc/*.txt +Файлы Ñправочника +.B Vim. +См. ":help doc-file-list" Ð´Ð»Ñ Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð»Ð½Ð¾Ð³Ð¾ ÑпиÑка. +.TP +/usr/local/lib/vim/doc/tags +Файл меток, иÑпользуемый Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка информации в файлах Ñправки. +.TP +/usr/local/lib/vim/syntax/syntax.vim +СиÑтемные наÑтройки ÑинтакÑиÑа. +.TP +/usr/local/lib/vim/syntax/*.vim +Файлы ÑинтакÑиÑа Ð´Ð»Ñ Ñ€Ð°Ð·Ð½Ñ‹Ñ… Ñзыков. +.TP +/usr/local/lib/vim/vimrc +СиÑтемные наÑтройки +.B Vim. +.TP +/usr/local/lib/vim/gvimrc +СиÑтемный наÑтройки графичеÑкого интерфейÑа. +.TP +/usr/local/lib/vim/optwin.vim +Сценарий, иÑпользуемый при выполнении команды ":options". +Хороший ÑпоÑоб проÑматривать и изменÑть наÑтройки. +.TP +/usr/local/lib/vim/menu.vim +СиÑтемные наÑтройки меню Ð´Ð»Ñ gvim. +.TP +/usr/local/lib/vim/bugreport.vim +Сценарий Ð´Ð»Ñ ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ð¾Ñ‚Ñ‡Ñ‘Ñ‚Ð° об обнаруженных глюках. См. ":help bugs". +.TP +/usr/local/lib/vim/filetype.vim +Сценарий Ð´Ð»Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ñ‚Ð¸Ð¿Ð° файла по имени. См. ":help 'filetype'". +.TP +/usr/local/lib/vim/scripts.vim +Сценарий Ð´Ð»Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ñ‚Ð¸Ð¿Ð° файла по Ñодержимому. См. ":help 'filetype'". +.TP +/usr/local/lib/vim/print/*.ps +Файлы Ð´Ð»Ñ Ð¿ÐµÑ‡Ð°Ñ‚Ð¸ PostScript. +.PP +Более ÑÐ²ÐµÐ¶Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ -- на Ñайте VIM: +.br +<URL:http://www.vim.org/> +.SH СМОТРИ ТÐКЖЕ +vimtutor(1) +.SH ÐВТОРЫ +Ð‘Ð¾Ð»ÑŒÑˆÐ°Ñ Ñ‡Ð°Ñть +.B Vim +Ñоздана Брамом Мооленааром (Bram Moolenaar), которому помогает огромное +количеÑтво людей. См. ":help credits" в +.B Vim. +.br +.B Vim +базируетÑÑ Ð½Ð° коде редактора Stevie, напиÑанного Тимом ТомпÑоном (Tim Thompson), +Тони ЭндрюÑом (Tony Andrews) и Г. Р. (Фредом) Уолтером (G.R. (Fred) Walter). +Однако, в наÑтоÑщее Ð²Ñ€ÐµÐ¼Ñ Ð² Vim почти не оÑталоÑÑŒ ничего от иÑторичеÑкого кода +его предшеÑтвенника. +.br +РуÑÑÐºÐ°Ñ Ð»Ð¾ÐºÐ°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ +.B Vim +выполнÑетÑÑ Ð² рамках проекта "РуВим", +Ñм. <URL:http://sourceforge.net/projects/ruvim/>. +.SH ГЛЮКИ +Скорее вÑего еÑть. +См. ":help todo" -- ÑпиÑок извеÑтных проблем. +.PP +Заметим, что многие вещи, которые ÑчитаютÑÑ Ð³Ð»ÑŽÐºÐ°Ð¼Ð¸, на Ñамом деле +ÑвлÑÑŽÑ‚ÑÑ Ñ€ÐµÐ·ÑƒÐ»ÑŒÑ‚Ð°Ñ‚Ð¾Ð¼ Ñлишком полного воÑÐ¿Ñ€Ð¾Ð¸Ð·Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Vi. +ЕÑли вы думаете, что что-то ÑвлÑетÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ¾Ð¹ только потому, что +"Vi делает Ñто по-другому", внимательно прочитайте файл vi_diff.txt +(или наберите ":help vi_diff.txt" в Vim) и иÑпользуйте опции 'compatible' +и 'cpoptions'. diff --git a/runtime/doc/vim.1 b/runtime/doc/vim.1 new file mode 100644 index 0000000000..820caa24f5 --- /dev/null +++ b/runtime/doc/vim.1 @@ -0,0 +1,553 @@ +.TH VIM 1 "2006 Apr 11" +.SH NAME +vim \- Vi IMproved, a programmers text editor +.SH SYNOPSIS +.br +.B vim +[options] [file ..] +.br +.B vim +[options] \- +.br +.B vim +[options] \-t tag +.br +.B vim +[options] \-q [errorfile] +.PP +.br +.B ex +.br +.B view +.br +.B gvim +.B gview +.B evim +.B eview +.br +.B rvim +.B rview +.B rgvim +.B rgview +.SH DESCRIPTION +.B Vim +is a text editor that is upwards compatible to Vi. +It can be used to edit all kinds of plain text. +It is especially useful for editing programs. +.PP +There are a lot of enhancements above Vi: multi level undo, +multi windows and buffers, syntax highlighting, command line +editing, filename completion, on-line help, visual selection, etc.. +See ":help vi_diff.txt" for a summary of the differences between +.B Vim +and Vi. +.PP +While running +.B Vim +a lot of help can be obtained from the on-line help system, with the ":help" +command. +See the ON-LINE HELP section below. +.PP +Most often +.B Vim +is started to edit a single file with the command +.PP + vim file +.PP +More generally +.B Vim +is started with: +.PP + vim [options] [filelist] +.PP +If the filelist is missing, the editor will start with an empty buffer. +Otherwise exactly one out of the following four may be used to choose one or +more files to be edited. +.TP 12 +file .. +A list of filenames. +The first one will be the current file and read into the buffer. +The cursor will be positioned on the first line of the buffer. +You can get to the other files with the ":next" command. +To edit a file that starts with a dash, precede the filelist with "\-\-". +.TP +\- +The file to edit is read from stdin. Commands are read from stderr, which +should be a tty. +.TP +\-t {tag} +The file to edit and the initial cursor position depends on a "tag", a sort +of goto label. +{tag} is looked up in the tags file, the associated file becomes the current +file and the associated command is executed. +Mostly this is used for C programs, in which case {tag} could be a function +name. +The effect is that the file containing that function becomes the current file +and the cursor is positioned on the start of the function. +See ":help tag\-commands". +.TP +\-q [errorfile] +Start in quickFix mode. +The file [errorfile] is read and the first error is displayed. +If [errorfile] is omitted, the filename is obtained from the 'errorfile' +option (defaults to "AztecC.Err" for the Amiga, "errors.err" on other +systems). +Further errors can be jumped to with the ":cn" command. +See ":help quickfix". +.PP +.B Vim +behaves differently, depending on the name of the command (the executable may +still be the same file). +.TP 10 +vim +The "normal" way, everything is default. +.TP +ex +Start in Ex mode. +Go to Normal mode with the ":vi" command. +Can also be done with the "\-e" argument. +.TP +view +Start in read-only mode. You will be protected from writing the files. Can +also be done with the "\-R" argument. +.TP +gvim gview +The GUI version. +Starts a new window. +Can also be done with the "\-g" argument. +.TP +evim eview +The GUI version in easy mode. +Starts a new window. +Can also be done with the "\-y" argument. +.TP +rvim rview rgvim rgview +Like the above, but with restrictions. It will not be possible to start shell +commands, or suspend +.B Vim. +Can also be done with the "\-Z" argument. +.SH OPTIONS +The options may be given in any order, before or after filenames. +Options without an argument can be combined after a single dash. +.TP 12 ++[num] +For the first file the cursor will be positioned on line "num". +If "num" is missing, the cursor will be positioned on the last line. +.TP ++/{pat} +For the first file the cursor will be positioned on the +first occurrence of {pat}. +See ":help search\-pattern" for the available search patterns. +.TP ++{command} +.TP +\-c {command} +{command} will be executed after the +first file has been read. +{command} is interpreted as an Ex command. +If the {command} contains spaces it must be enclosed in double quotes (this +depends on the shell that is used). +Example: Vim "+set si" main.c +.br +Note: You can use up to 10 "+" or "\-c" commands. +.TP +\-S {file} +{file} will be sourced after the first file has been read. +This is equivalent to \-c "source {file}". +{file} cannot start with '\-'. +If {file} is omitted "Session.vim" is used (only works when \-S is the last +argument). +.TP +\-\-cmd {command} +Like using "\-c", but the command is executed just before +processing any vimrc file. +You can use up to 10 of these commands, independently from "\-c" commands. +.TP +\-A +If +.B Vim +has been compiled with ARABIC support for editing right-to-left +oriented files and Arabic keyboard mapping, this option starts +.B Vim +in Arabic mode, i.e. 'arabic' is set. Otherwise an error +message is given and +.B Vim +aborts. +.TP +\-b +Binary mode. +A few options will be set that makes it possible to edit a binary or +executable file. +.TP +\-C +Compatible. Set the 'compatible' option. +This will make +.B Vim +behave mostly like Vi, even though a .vimrc file exists. +.TP +\-d +Start in diff mode. +There should be two, three or four file name arguments. +.B Vim +will open all the files and show differences between them. +Works like vimdiff(1). +.TP +\-d {device} +Open {device} for use as a terminal. +Only on the Amiga. +Example: +"\-d con:20/30/600/150". +.TP +\-D +Debugging. Go to debugging mode when executing the first command from a +script. +.TP +\-e +Start +.B Vim +in Ex mode, just like the executable was called "ex". +.TP +\-E +Start +.B Vim +in improved Ex mode, just like the executable was called "exim". +.TP +\-f +Foreground. For the GUI version, +.B Vim +will not fork and detach from the shell it was started in. +On the Amiga, +.B Vim +is not restarted to open a new window. +This option should be used when +.B Vim +is executed by a program that will wait for the edit +session to finish (e.g. mail). +On the Amiga the ":sh" and ":!" commands will not work. +.TP +\-\-nofork +Foreground. For the GUI version, +.B Vim +will not fork and detach from the shell it was started in. +.TP +\-F +If +.B Vim +has been compiled with FKMAP support for editing right-to-left +oriented files and Farsi keyboard mapping, this option starts +.B Vim +in Farsi mode, i.e. 'fkmap' and 'rightleft' are set. +Otherwise an error message is given and +.B Vim +aborts. +.TP +\-g +If +.B Vim +has been compiled with GUI support, this option enables the GUI. +If no GUI support was compiled in, an error message is given and +.B Vim +aborts. +.TP +\-h +Give a bit of help about the command line arguments and options. +After this +.B Vim +exits. +.TP +\-H +If +.B Vim +has been compiled with RIGHTLEFT support for editing right-to-left +oriented files and Hebrew keyboard mapping, this option starts +.B Vim +in Hebrew mode, i.e. 'hkmap' and 'rightleft' are set. +Otherwise an error message is given and +.B Vim +aborts. +.TP +\-i {viminfo} +When using the viminfo file is enabled, this option sets the filename to use, +instead of the default "~/.viminfo". +This can also be used to skip the use of the .viminfo file, by giving the name +"NONE". +.TP +\-L +Same as \-r. +.TP +\-l +Lisp mode. +Sets the 'lisp' and 'showmatch' options on. +.TP +\-m +Modifying files is disabled. +Resets the 'write' option. +You can still modify the buffer, but writing a file is not possible. +.TP +\-M +Modifications not allowed. The 'modifiable' and 'write' options will be unset, +so that changes are not allowed and files can not be written. Note that these +options can be set to enable making modifications. +.TP +\-N +No-compatible mode. Reset the 'compatible' option. +This will make +.B Vim +behave a bit better, but less Vi compatible, even though a .vimrc file does +not exist. +.TP +\-n +No swap file will be used. +Recovery after a crash will be impossible. +Handy if you want to edit a file on a very slow medium (e.g. floppy). +Can also be done with ":set uc=0". +Can be undone with ":set uc=200". +.TP +\-nb +Become an editor server for NetBeans. See the docs for details. +.TP +\-o[N] +Open N windows stacked. +When N is omitted, open one window for each file. +.TP +\-O[N] +Open N windows side by side. +When N is omitted, open one window for each file. +.TP +\-p[N] +Open N tab pages. +When N is omitted, open one tab page for each file. +.TP +\-R +Read-only mode. +The 'readonly' option will be set. +You can still edit the buffer, but will be prevented from accidently +overwriting a file. +If you do want to overwrite a file, add an exclamation mark to the Ex command, +as in ":w!". +The \-R option also implies the \-n option (see below). +The 'readonly' option can be reset with ":set noro". +See ":help 'readonly'". +.TP +\-r +List swap files, with information about using them for recovery. +.TP +\-r {file} +Recovery mode. +The swap file is used to recover a crashed editing session. +The swap file is a file with the same filename as the text file with ".swp" +appended. +See ":help recovery". +.TP +\-s +Silent mode. Only when started as "Ex" or when the "\-e" option was given +before the "\-s" option. +.TP +\-s {scriptin} +The script file {scriptin} is read. +The characters in the file are interpreted as if you had typed them. +The same can be done with the command ":source! {scriptin}". +If the end of the file is reached before the editor exits, further characters +are read from the keyboard. +.TP +\-T {terminal} +Tells +.B Vim +the name of the terminal you are using. +Only required when the automatic way doesn't work. +Should be a terminal known +to +.B Vim +(builtin) or defined in the termcap or terminfo file. +.TP +\-u {vimrc} +Use the commands in the file {vimrc} for initializations. +All the other initializations are skipped. +Use this to edit a special kind of files. +It can also be used to skip all initializations by giving the name "NONE". +See ":help initialization" within vim for more details. +.TP +\-U {gvimrc} +Use the commands in the file {gvimrc} for GUI initializations. +All the other GUI initializations are skipped. +It can also be used to skip all GUI initializations by giving the name "NONE". +See ":help gui\-init" within vim for more details. +.TP +\-V[N] +Verbose. Give messages about which files are sourced and for reading and +writing a viminfo file. The optional number N is the value for 'verbose'. +Default is 10. +.TP +\-v +Start +.B Vim +in Vi mode, just like the executable was called "vi". This only has effect +when the executable is called "ex". +.TP +\-w {scriptout} +All the characters that you type are recorded in the file +{scriptout}, until you exit +.B Vim. +This is useful if you want to create a script file to be used with "vim \-s" or +":source!". +If the {scriptout} file exists, characters are appended. +.TP +\-W {scriptout} +Like \-w, but an existing file is overwritten. +.TP +\-x +Use encryption when writing files. Will prompt for a crypt key. +.TP +\-X +Don't connect to the X server. Shortens startup time in a terminal, but the +window title and clipboard will not be used. +.TP +\-y +Start +.B Vim +in easy mode, just like the executable was called "evim" or "eview". +Makes +.B Vim +behave like a click-and-type editor. +.TP +\-Z +Restricted mode. Works like the executable starts with "r". +.TP +\-\- +Denotes the end of the options. +Arguments after this will be handled as a file name. +This can be used to edit a filename that starts with a '\-'. +.TP +\-\-echo\-wid +GTK GUI only: Echo the Window ID on stdout. +.TP +\-\-help +Give a help message and exit, just like "\-h". +.TP +\-\-literal +Take file name arguments literally, do not expand wildcards. This has no +effect on Unix where the shell expands wildcards. +.TP +\-\-noplugin +Skip loading plugins. Implied by \-u NONE. +.TP +\-\-remote +Connect to a Vim server and make it edit the files given in the rest of the +arguments. If no server is found a warning is given and the files are edited +in the current Vim. +.TP +\-\-remote\-expr {expr} +Connect to a Vim server, evaluate {expr} in it and print the result on stdout. +.TP +\-\-remote\-send {keys} +Connect to a Vim server and send {keys} to it. +.TP +\-\-remote\-silent +As \-\-remote, but without the warning when no server is found. +.TP +\-\-remote\-wait +As \-\-remote, but Vim does not exit until the files have been edited. +.TP +\-\-remote\-wait\-silent +As \-\-remote\-wait, but without the warning when no server is found. +.TP +\-\-serverlist +List the names of all Vim servers that can be found. +.TP +\-\-servername {name} +Use {name} as the server name. Used for the current Vim, unless used with a +\-\-remote argument, then it's the name of the server to connect to. +.TP +\-\-socketid {id} +GTK GUI only: Use the GtkPlug mechanism to run gvim in another window. +.TP +\-\-version +Print version information and exit. +.SH ON-LINE HELP +Type ":help" in +.B Vim +to get started. +Type ":help subject" to get help on a specific subject. +For example: ":help ZZ" to get help for the "ZZ" command. +Use <Tab> and CTRL-D to complete subjects (":help cmdline\-completion"). +Tags are present to jump from one place to another (sort of hypertext links, +see ":help"). +All documentation files can be viewed in this way, for example +":help syntax.txt". +.SH FILES +.TP 15 +/usr/local/lib/vim/doc/*.txt +The +.B Vim +documentation files. +Use ":help doc\-file\-list" to get the complete list. +.TP +/usr/local/lib/vim/doc/tags +The tags file used for finding information in the documentation files. +.TP +/usr/local/lib/vim/syntax/syntax.vim +System wide syntax initializations. +.TP +/usr/local/lib/vim/syntax/*.vim +Syntax files for various languages. +.TP +/usr/local/lib/vim/vimrc +System wide +.B Vim +initializations. +.TP +~/.vimrc +Your personal +.B Vim +initializations. +.TP +/usr/local/lib/vim/gvimrc +System wide gvim initializations. +.TP +~/.gvimrc +Your personal gvim initializations. +.TP +/usr/local/lib/vim/optwin.vim +Script used for the ":options" command, a nice way to view and set options. +.TP +/usr/local/lib/vim/menu.vim +System wide menu initializations for gvim. +.TP +/usr/local/lib/vim/bugreport.vim +Script to generate a bug report. See ":help bugs". +.TP +/usr/local/lib/vim/filetype.vim +Script to detect the type of a file by its name. See ":help 'filetype'". +.TP +/usr/local/lib/vim/scripts.vim +Script to detect the type of a file by its contents. See ":help 'filetype'". +.TP +/usr/local/lib/vim/print/*.ps +Files used for PostScript printing. +.PP +For recent info read the VIM home page: +.br +<URL:http://www.vim.org/> +.SH SEE ALSO +vimtutor(1) +.SH AUTHOR +Most of +.B Vim +was made by Bram Moolenaar, with a lot of help from others. +See ":help credits" in +.B Vim. +.br +.B Vim +is based on Stevie, worked on by: Tim Thompson, +Tony Andrews and G.R. (Fred) Walter. +Although hardly any of the original code remains. +.SH BUGS +Probably. +See ":help todo" for a list of known problems. +.PP +Note that a number of things that may be regarded as bugs by some, are in fact +caused by a too-faithful reproduction of Vi's behaviour. +And if you think other things are bugs "because Vi does it differently", +you should take a closer look at the vi_diff.txt file (or type :help +vi_diff.txt when in Vim). +Also have a look at the 'compatible' and 'cpoptions' options. diff --git a/runtime/doc/vim.man b/runtime/doc/vim.man new file mode 100644 index 0000000000..5b9b83cb6c --- /dev/null +++ b/runtime/doc/vim.man @@ -0,0 +1,428 @@ +VIM(1) VIM(1) + + + +NAME + vim - Vi IMproved, a programmers text editor + +SYNOPSIS + vim [options] [file ..] + vim [options] - + vim [options] -t tag + vim [options] -q [errorfile] + + ex + view + gvim gview evim eview + rvim rview rgvim rgview + +DESCRIPTION + Vim is a text editor that is upwards compatible to Vi. It can be used + to edit all kinds of plain text. It is especially useful for editing + programs. + + There are a lot of enhancements above Vi: multi level undo, multi win- + dows and buffers, syntax highlighting, command line editing, filename + completion, on-line help, visual selection, etc.. See ":help + vi_diff.txt" for a summary of the differences between Vim and Vi. + + While running Vim a lot of help can be obtained from the on-line help + system, with the ":help" command. See the ON-LINE HELP section below. + + Most often Vim is started to edit a single file with the command + + vim file + + More generally Vim is started with: + + vim [options] [filelist] + + If the filelist is missing, the editor will start with an empty buffer. + Otherwise exactly one out of the following four may be used to choose + one or more files to be edited. + + file .. A list of filenames. The first one will be the current + file and read into the buffer. The cursor will be posi- + tioned on the first line of the buffer. You can get to the + other files with the ":next" command. To edit a file that + starts with a dash, precede the filelist with "--". + + - The file to edit is read from stdin. Commands are read + from stderr, which should be a tty. + + -t {tag} The file to edit and the initial cursor position depends on + a "tag", a sort of goto label. {tag} is looked up in the + tags file, the associated file becomes the current file and + the associated command is executed. Mostly this is used + for C programs, in which case {tag} could be a function + name. The effect is that the file containing that function + becomes the current file and the cursor is positioned on + the start of the function. See ":help tag-commands". + + -q [errorfile] + Start in quickFix mode. The file [errorfile] is read and + the first error is displayed. If [errorfile] is omitted, + the filename is obtained from the 'errorfile' option + (defaults to "AztecC.Err" for the Amiga, "errors.err" on + other systems). Further errors can be jumped to with the + ":cn" command. See ":help quickfix". + + Vim behaves differently, depending on the name of the command (the exe- + cutable may still be the same file). + + vim The "normal" way, everything is default. + + ex Start in Ex mode. Go to Normal mode with the ":vi" command. + Can also be done with the "-e" argument. + + view Start in read-only mode. You will be protected from writing + the files. Can also be done with the "-R" argument. + + gvim gview + The GUI version. Starts a new window. Can also be done with + the "-g" argument. + + evim eview + The GUI version in easy mode. Starts a new window. Can also + be done with the "-y" argument. + + rvim rview rgvim rgview + Like the above, but with restrictions. It will not be possi- + ble to start shell commands, or suspend Vim. Can also be + done with the "-Z" argument. + +OPTIONS + The options may be given in any order, before or after filenames. + Options without an argument can be combined after a single dash. + + +[num] For the first file the cursor will be positioned on line + "num". If "num" is missing, the cursor will be positioned + on the last line. + + +/{pat} For the first file the cursor will be positioned on the + first occurrence of {pat}. See ":help search-pattern" for + the available search patterns. + + +{command} + + -c {command} + {command} will be executed after the first file has been + read. {command} is interpreted as an Ex command. If the + {command} contains spaces it must be enclosed in double + quotes (this depends on the shell that is used). Example: + Vim "+set si" main.c + Note: You can use up to 10 "+" or "-c" commands. + + -S {file} {file} will be sourced after the first file has been read. + This is equivalent to -c "source {file}". {file} cannot + start with '-'. If {file} is omitted "Session.vim" is used + (only works when -S is the last argument). + + --cmd {command} + Like using "-c", but the command is executed just before + processing any vimrc file. You can use up to 10 of these + commands, independently from "-c" commands. + + -A If Vim has been compiled with ARABIC support for editing + right-to-left oriented files and Arabic keyboard mapping, + this option starts Vim in Arabic mode, i.e. 'arabic' is + set. Otherwise an error message is given and Vim aborts. + + -b Binary mode. A few options will be set that makes it pos- + sible to edit a binary or executable file. + + -C Compatible. Set the 'compatible' option. This will make + Vim behave mostly like Vi, even though a .vimrc file + exists. + + -d Start in diff mode. There should be two, three or four + file name arguments. Vim will open all the files and show + differences between them. Works like vimdiff(1). + + -d {device} Open {device} for use as a terminal. Only on the Amiga. + Example: "-d con:20/30/600/150". + + -D Debugging. Go to debugging mode when executing the first + command from a script. + + -e Start Vim in Ex mode, just like the executable was called + "ex". + + -E Start Vim in improved Ex mode, just like the executable was + called "exim". + + -f Foreground. For the GUI version, Vim will not fork and + detach from the shell it was started in. On the Amiga, Vim + is not restarted to open a new window. This option should + be used when Vim is executed by a program that will wait + for the edit session to finish (e.g. mail). On the Amiga + the ":sh" and ":!" commands will not work. + + --nofork Foreground. For the GUI version, Vim will not fork and + detach from the shell it was started in. + + -F If Vim has been compiled with FKMAP support for editing + right-to-left oriented files and Farsi keyboard mapping, + this option starts Vim in Farsi mode, i.e. 'fkmap' and + 'rightleft' are set. Otherwise an error message is given + and Vim aborts. + + -g If Vim has been compiled with GUI support, this option + enables the GUI. If no GUI support was compiled in, an + error message is given and Vim aborts. + + -h Give a bit of help about the command line arguments and + options. After this Vim exits. + + -H If Vim has been compiled with RIGHTLEFT support for editing + right-to-left oriented files and Hebrew keyboard mapping, + this option starts Vim in Hebrew mode, i.e. 'hkmap' and + 'rightleft' are set. Otherwise an error message is given + and Vim aborts. + + -i {viminfo} + When using the viminfo file is enabled, this option sets + the filename to use, instead of the default "~/.viminfo". + This can also be used to skip the use of the .viminfo file, + by giving the name "NONE". + + -L Same as -r. + + -l Lisp mode. Sets the 'lisp' and 'showmatch' options on. + + -m Modifying files is disabled. Resets the 'write' option. + You can still modify the buffer, but writing a file is not + possible. + + -M Modifications not allowed. The 'modifiable' and 'write' + options will be unset, so that changes are not allowed and + files can not be written. Note that these options can be + set to enable making modifications. + + -N No-compatible mode. Reset the 'compatible' option. This + will make Vim behave a bit better, but less Vi compatible, + even though a .vimrc file does not exist. + + -n No swap file will be used. Recovery after a crash will be + impossible. Handy if you want to edit a file on a very + slow medium (e.g. floppy). Can also be done with ":set + uc=0". Can be undone with ":set uc=200". + + -nb Become an editor server for NetBeans. See the docs for + details. + + -o[N] Open N windows stacked. When N is omitted, open one window + for each file. + + -O[N] Open N windows side by side. When N is omitted, open one + window for each file. + + -p[N] Open N tab pages. When N is omitted, open one tab page for + each file. + + -R Read-only mode. The 'readonly' option will be set. You + can still edit the buffer, but will be prevented from acci- + dently overwriting a file. If you do want to overwrite a + file, add an exclamation mark to the Ex command, as in + ":w!". The -R option also implies the -n option (see + below). The 'readonly' option can be reset with ":set + noro". See ":help 'readonly'". + + -r List swap files, with information about using them for + recovery. + + -r {file} Recovery mode. The swap file is used to recover a crashed + editing session. The swap file is a file with the same + filename as the text file with ".swp" appended. See ":help + recovery". + + -s Silent mode. Only when started as "Ex" or when the "-e" + option was given before the "-s" option. + + -s {scriptin} + The script file {scriptin} is read. The characters in the + file are interpreted as if you had typed them. The same + can be done with the command ":source! {scriptin}". If the + end of the file is reached before the editor exits, further + characters are read from the keyboard. + + -T {terminal} + Tells Vim the name of the terminal you are using. Only + required when the automatic way doesn't work. Should be a + terminal known to Vim (builtin) or defined in the termcap + or terminfo file. + + -u {vimrc} Use the commands in the file {vimrc} for initializations. + All the other initializations are skipped. Use this to + edit a special kind of files. It can also be used to skip + all initializations by giving the name "NONE". See ":help + initialization" within vim for more details. + + -U {gvimrc} Use the commands in the file {gvimrc} for GUI initializa- + tions. All the other GUI initializations are skipped. It + can also be used to skip all GUI initializations by giving + the name "NONE". See ":help gui-init" within vim for more + details. + + -V[N] Verbose. Give messages about which files are sourced and + for reading and writing a viminfo file. The optional num- + ber N is the value for 'verbose'. Default is 10. + + -v Start Vim in Vi mode, just like the executable was called + "vi". This only has effect when the executable is called + "ex". + + -w {scriptout} + All the characters that you type are recorded in the file + {scriptout}, until you exit Vim. This is useful if you + want to create a script file to be used with "vim -s" or + ":source!". If the {scriptout} file exists, characters are + appended. + + -W {scriptout} + Like -w, but an existing file is overwritten. + + -x Use encryption when writing files. Will prompt for a crypt + key. + + -X Don't connect to the X server. Shortens startup time in a + terminal, but the window title and clipboard will not be + used. + + -y Start Vim in easy mode, just like the executable was called + "evim" or "eview". Makes Vim behave like a click-and-type + editor. + + -Z Restricted mode. Works like the executable starts with + "r". + + -- Denotes the end of the options. Arguments after this will + be handled as a file name. This can be used to edit a + filename that starts with a '-'. + + --echo-wid GTK GUI only: Echo the Window ID on stdout. + + --help Give a help message and exit, just like "-h". + + --literal Take file name arguments literally, do not expand wild- + cards. This has no effect on Unix where the shell expands + wildcards. + + --noplugin Skip loading plugins. Implied by -u NONE. + + --remote Connect to a Vim server and make it edit the files given in + the rest of the arguments. If no server is found a warning + is given and the files are edited in the current Vim. + + --remote-expr {expr} + Connect to a Vim server, evaluate {expr} in it and print + the result on stdout. + + --remote-send {keys} + Connect to a Vim server and send {keys} to it. + + --remote-silent + As --remote, but without the warning when no server is + found. + + --remote-wait + As --remote, but Vim does not exit until the files have + been edited. + + --remote-wait-silent + As --remote-wait, but without the warning when no server is + found. + + --serverlist + List the names of all Vim servers that can be found. + + --servername {name} + Use {name} as the server name. Used for the current Vim, + unless used with a --remote argument, then it's the name of + the server to connect to. + + --socketid {id} + GTK GUI only: Use the GtkPlug mechanism to run gvim in + another window. + + --version Print version information and exit. + +ON-LINE HELP + Type ":help" in Vim to get started. Type ":help subject" to get help + on a specific subject. For example: ":help ZZ" to get help for the + "ZZ" command. Use <Tab> and CTRL-D to complete subjects (":help cmd- + line-completion"). Tags are present to jump from one place to another + (sort of hypertext links, see ":help"). All documentation files can be + viewed in this way, for example ":help syntax.txt". + +FILES + /usr/local/lib/vim/doc/*.txt + The Vim documentation files. Use ":help doc-file-list" + to get the complete list. + + /usr/local/lib/vim/doc/tags + The tags file used for finding information in the docu- + mentation files. + + /usr/local/lib/vim/syntax/syntax.vim + System wide syntax initializations. + + /usr/local/lib/vim/syntax/*.vim + Syntax files for various languages. + + /usr/local/lib/vim/vimrc + System wide Vim initializations. + + ~/.vimrc Your personal Vim initializations. + + /usr/local/lib/vim/gvimrc + System wide gvim initializations. + + ~/.gvimrc Your personal gvim initializations. + + /usr/local/lib/vim/optwin.vim + Script used for the ":options" command, a nice way to + view and set options. + + /usr/local/lib/vim/menu.vim + System wide menu initializations for gvim. + + /usr/local/lib/vim/bugreport.vim + Script to generate a bug report. See ":help bugs". + + /usr/local/lib/vim/filetype.vim + Script to detect the type of a file by its name. See + ":help 'filetype'". + + /usr/local/lib/vim/scripts.vim + Script to detect the type of a file by its contents. + See ":help 'filetype'". + + /usr/local/lib/vim/print/*.ps + Files used for PostScript printing. + + For recent info read the VIM home page: + <URL:http://www.vim.org/> + +SEE ALSO + vimtutor(1) + +AUTHOR + Most of Vim was made by Bram Moolenaar, with a lot of help from others. + See ":help credits" in Vim. + Vim is based on Stevie, worked on by: Tim Thompson, Tony Andrews and + G.R. (Fred) Walter. Although hardly any of the original code remains. + +BUGS + Probably. See ":help todo" for a list of known problems. + + Note that a number of things that may be regarded as bugs by some, are + in fact caused by a too-faithful reproduction of Vi's behaviour. And + if you think other things are bugs "because Vi does it differently", + you should take a closer look at the vi_diff.txt file (or type :help + vi_diff.txt when in Vim). Also have a look at the 'compatible' and + 'cpoptions' options. + + + + 2006 Apr 11 VIM(1) diff --git a/runtime/doc/vim2html.pl b/runtime/doc/vim2html.pl new file mode 100644 index 0000000000..9066b03b16 --- /dev/null +++ b/runtime/doc/vim2html.pl @@ -0,0 +1,228 @@ +#!/usr/bin/env perl + +# converts vim documentation to simple html +# Sirtaj Singh Kang (taj@kde.org) + +# Sun Feb 24 14:49:17 CET 2002 + +use strict; +use vars qw/%url $date/; + +%url = (); +$date = `date`; +chop $date; + +sub maplink +{ + my $tag = shift; + if( exists $url{ $tag } ){ + return $url{ $tag }; + } else { + #warn "Unknown hyperlink target: $tag\n"; + $tag =~ s/\.txt//; + $tag =~ s/</</g; + $tag =~ s/>/>/g; + return "<code class=\"badlink\">$tag</code>"; + } +} + +sub readTagFile +{ + my($tagfile) = @_; + my( $tag, $file, $name ); + + open(TAGS,"$tagfile") || die "can't read tags\n"; + + while( <TAGS> ) { + next unless /^(\S+)\s+(\S+)\s+/; + + $tag = $1; + my $label = $tag; + ($file= $2) =~ s/.txt$/.html/g; + $label =~ s/\.txt//; + + $url{ $tag } = "<a href=\"$file#".escurl($tag)."\">".esctext($label)."</a>"; + } + close( TAGS ); +} + +sub esctext +{ + my $text = shift; + $text =~ s/&/&/g; + $text =~ s/</</g; + $text =~ s/>/>/g; + return $text; +} + +sub escurl +{ + my $url = shift; + $url =~ s/"/%22/g; + $url =~ s/~/%7E/g; + $url =~ s/</%3C/g; + $url =~ s/>/%3E/g; + $url =~ s/=/%20/g; + $url =~ s/#/%23/g; + $url =~ s/\//%2F/g; + + return $url; +} + +sub vim2html +{ + my( $infile ) = @_; + my( $outfile ); + + open(IN, "$infile" ) || die "Couldn't read from $infile: $!.\n"; + + ($outfile = $infile) =~ s:.*/::g; + $outfile =~ s/\.txt$//g; + + open( OUT, ">$outfile.html" ) + || die "Couldn't write to $outfile.html: $!.\n"; + my $head = uc( $outfile ); + + print OUT<<EOF; +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> +<title>VIM: $outfile + + + +

$head

+
+EOF
+
+	my $inexample = 0;
+	while(  ) {
+		chop;
+		if ( /^\s*[-=]+\s*$/ ) {
+			print OUT "

";
+			next;
+		}
+
+		# examples
+		elsif( /^>$/ || /\s>$/ ) {
+			$inexample = 1;
+			chop;
+		}
+		elsif ( $inexample && /^([<\S])/ ) {
+			$inexample = 0;
+			$_ = $' if $1 eq "<";
+		}
+
+		s/\s+$//g;
+
+		# Various vim highlights. note that < and > have already been escaped
+		# so that HTML doesn't get screwed up.
+
+		my @out = ();
+		#		print "Text: $_\n";
+		LOOP:
+		foreach my $token ( split /((?:\|[^\|]+\|)|(?:\*[^\*]+\*))/ ) {
+			if ( $token =~ /^\|([^\|]+)\|/ ) {
+				# link
+				push( @out, "|".maplink( $1 )."|" );
+				next LOOP;
+			}
+			elsif ( $token =~ /^\*([^\*]+)\*/ ) {
+				# target
+				push( @out,
+					"\*".esctext($1)."<\/a>\*<\/b>");
+				next LOOP;
+			}
+
+			$_ = esctext($token);
+			s/CTRL-(\w+)/CTRL-$1<\/code>/g;
+			# parameter <...>
+			s/<(.*?)>/<$1><\/code>/g;
+
+			# parameter {...}
+			s/\{([^}]*)\}/{$1}<\/code>/g;
+
+			# parameter [...]
+			s/\[(range|line|count|offset|cmd|[-+]?num)\]/\[$1\]<\/code>/g;
+			# note
+			s/(Note:?)/$1<\/code>/gi;
+
+			# local heading
+			s/^(.*)\~$/$1<\/code>/g;
+			push( @out, $_ );
+		}
+
+		$_ = join( "", @out );
+
+		if( $inexample == 2 ) {
+			print OUT "$_\n";
+		} else {
+			print OUT $_,"\n";
+		}
+
+		$inexample = 2 if $inexample == 1;
+	}
+	print OUT<
+

Generated by vim2html on $date

+ + +EOF + +} + +sub usage +{ +die< +EOF +} + + +sub writeCSS +{ + open( CSS, ">vim-stylesheet.css" ) || die "Couldn't write stylesheet: $!\n"; + print CSS< 2005-03-12. +Mise à jour 2012-05-06, Dominique Pellé diff --git a/runtime/doc/vimdiff-fr.UTF-8.1 b/runtime/doc/vimdiff-fr.UTF-8.1 new file mode 100644 index 0000000000..3b44a3dd58 --- /dev/null +++ b/runtime/doc/vimdiff-fr.UTF-8.1 @@ -0,0 +1,54 @@ +.TH VIMDIFF 1 "30 mars 2001" +.SH NOM +vimdiff \- ouvre deux, trois ou quatre versions d'un fichier dans Vim et +affiche leurs différences +.SH SYNOPSIS +.br +.B vimdiff +[options] fichier1 fichier2 [fichier3 [fichier4]] +.PP +.B gvimdiff +.SH DESCRIPTION +.B Vimdiff +démarre +.B Vim +avec deux (ou trois ou quatre) fichiers. +Chaque fichier est ouvert dans sa propre fenêtre. +Les différences entre ces fichiers sont mises en surbrillance. +C'est un outil très pratique pour visualiser et reporter les +changements entre deux versions d'un même fichier. +.PP +Consulter vim(1) pour des informations sur l'éditeur Vim lui-même. +.PP +Si +.B gvimdiff +est invoqué, l'IHM graphique est démarrée quand elle est disponible. +.PP +L'option 'diff' est activée dans chacune des fenêtres, ce qui provoque la mise +en surbrillance des différences. +.br +Les options 'wrap' et 'scrollbind' sont activées pour donner un aspect +agréable au texte. +.br +L'option 'foldmethod' est fixée à "diff", ce qui replie les lignes consécutives +identiques. 'foldcolumn' est fixé à 2 pour trouver les replis rapidement et +les ouvrir ou les fermer facilement. +.SH ARGUMENTS +La fenêtre de Vim est partagée verticalement afin d'afficher les lignes +correspondantes les unes en face des autres, comme si l'argument "\-O" était +spécifié. Utilisez l'argument "\-o" pour obtenir un partage horizontal à la +place. +.PP +Pour connaître les autres arguments disponibles, consultez vim(1). +.SH VOIR AUSSI +vim(1) +.SH AUTEUR +La majeure partie de +.B Vim +a été écrite par Bram Moolenaar, avec l'aide de nombreux autres contributeurs. +Voir ":help credits" dans +.B Vim. +.SH TRADUCTION +Cette page de manuel a été traduite par David Blanchet + 2005-03-12. +Mise à jour 2012-05-06, Dominique Pellé diff --git a/runtime/doc/vimdiff-it.1 b/runtime/doc/vimdiff-it.1 new file mode 100755 index 0000000000..2203877acf --- /dev/null +++ b/runtime/doc/vimdiff-it.1 @@ -0,0 +1,48 @@ +.TH VIMDIFF 1 "30 marzo 2001" +.SH NOME +vimdiff \- modifica due, tre o quattro versioni di un file con Vim, +visualizzando le differenze +.SH SINTASSI +.br +.B vimdiff +[opzioni] file1 file2 [file3 [file4]] +.PP +.B gvimdiff +.SH DESCRIZIONE +.B Vimdiff +inizia +.B Vim +per due (o tre o quattro) file. +Ogni file ha una sua finestra. +Le differenze fra file sono evidenziate. +È una maniera elegante per controllare modifiche e portare modifiche +verso un'altra versione dello stesso file. +.PP +Vedere vim(1) per dettagli su Vim in generale. +.PP +Se iniziato con +.B gvimdiff +la GUI sarà utilizzata, se disponibile. +.PP +In ogni finestra l'opzione 'diff' è impostata, evidenziando così le +differenze. +.br +Le opzioni 'wrap' e 'scrollbind' sono impostate per migliorare la +visibilità del testo. +.br +L'opzione 'foldmethod' è impostata al valore "diff", che mette gruppi di +linee uguali fra i diversi file in una piegatura. 'foldcolumn' è impostato +a due per poter facilmente visualizzare le piegature, aprirle e chiuderle. +.SH OPZIONI +Lo schermo è diviso verticalmente, come se aveste usato l'opzione "\-O". +Per dividerlo orizzontalmente, usare l'opzione "\-o". +.PP +Per tutte le altre opzioni, vedere vim(1). +.SH VEDERE ANCHE +vim(1) +.SH AUTORE +Buona parte di +.B Vim +è stato scritto da Bram Moolenaar, con molto aiuto da altri. +Vedere ":help credits" in +.B Vim. diff --git a/runtime/doc/vimdiff-it.UTF-8.1 b/runtime/doc/vimdiff-it.UTF-8.1 new file mode 100644 index 0000000000..090892fa93 --- /dev/null +++ b/runtime/doc/vimdiff-it.UTF-8.1 @@ -0,0 +1,48 @@ +.TH VIMDIFF 1 "30 marzo 2001" +.SH NOME +vimdiff \- modifica due, tre o quattro versioni di un file con Vim, +visualizzando le differenze +.SH SINTASSI +.br +.B vimdiff +[opzioni] file1 file2 [file3 [file4]] +.PP +.B gvimdiff +.SH DESCRIZIONE +.B Vimdiff +inizia +.B Vim +per due (o tre o quattro) file. +Ogni file ha una sua finestra. +Le differenze fra file sono evidenziate. +È una maniera elegante per controllare modifiche e portare modifiche +verso un'altra versione dello stesso file. +.PP +Vedere vim(1) per dettagli su Vim in generale. +.PP +Se iniziato con +.B gvimdiff +la GUI sarà utilizzata, se disponibile. +.PP +In ogni finestra l'opzione 'diff' è impostata, evidenziando così le +differenze. +.br +Le opzioni 'wrap' e 'scrollbind' sono impostate per migliorare la +visibilità del testo. +.br +L'opzione 'foldmethod' è impostata al valore "diff", che mette gruppi di +linee uguali fra i diversi file in una piegatura. 'foldcolumn' è impostato +a due per poter facilmente visualizzare le piegature, aprirle e chiuderle. +.SH OPZIONI +Lo schermo è diviso verticalmente, come se aveste usato l'opzione "\-O". +Per dividerlo orizzontalmente, usare l'opzione "\-o". +.PP +Per tutte le altre opzioni, vedere vim(1). +.SH VEDERE ANCHE +vim(1) +.SH AUTORE +Buona parte di +.B Vim +è stato scritto da Bram Moolenaar, con molto aiuto da altri. +Vedere ":help credits" in +.B Vim. diff --git a/runtime/doc/vimdiff-ja.UTF-8.1 b/runtime/doc/vimdiff-ja.UTF-8.1 new file mode 100644 index 0000000000..56fadfef6e --- /dev/null +++ b/runtime/doc/vimdiff-ja.UTF-8.1 @@ -0,0 +1,44 @@ +.TH VIMDIFF 1 "2001 March 30" +.SH åå‰ +vimdiff \- 二ã¤ã‹ä¸‰ã¤ã‹å››ã¤ã®ãƒ•ァイルを Vim ã§é–‹ã„ã¦ã€ãã®å·®åˆ†ã‚’表示ã™ã‚‹ +.SH æ›¸å¼ +.br +.B vimdiff +[options] file1 file2 [file3 [file4]] +.PP +.B gvimdiff +.SH 説明 +.B Vimdiff +ã¯ã€äºŒã¤ (ã‹ä¸‰ã¤ã‹å››ã¤) ã®ãƒ•ァイルを +.B Vim +ã§é–‹ãã¾ã™ã€‚ +ファイルã¯å€‹åˆ¥ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§é–‹ã‹ã‚Œã€å·®åˆ†ãŒå¼·èª¿è¡¨ç¤ºã•れã¾ã™ã€‚ +åŒã˜ãƒ•ァイルã®åˆ¥ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³é–“ã§ã€å¤‰æ›´ã‚’確èªã—ãŸã‚Šã€å¤‰æ›´ã‚’移動ã—ãŸã‚Šã™ã‚‹ã®ãŒ +ç°¡å˜ã«ãªã‚Šã¾ã™ã€‚ +.PP +Vim ã«ã¤ã„ã¦ã®è©³ç´°ã¯ vim(1) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +.PP +.B gvimdiff +ã¨ã„ã†åå‰ã§èµ·å‹•ã•れãŸå ´åˆã¯ GUI ã§èµ·å‹•ã—ã¾ã™ã€‚ +.PP +差分を強調表示ã™ã‚‹ãŸã‚ã«ã€ +ãれãžã‚Œã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã® 'diff' オプションãŒã‚ªãƒ³ã«è¨­å®šã•れã¾ã™ã€‚ +.br +テキストを見やã™ãã™ã‚‹ãŸã‚ã«ã€ã‚ªãƒ—ション㮠'wrap' 㨠'scrollbind' もオンã«è¨­ +定ã•れã¾ã™ã€‚ +.br + 'foldmethod' オプション㯠"diff" ã«è¨­å®šã•れã€å¤‰æ›´ã•れã¦ã„ãªã„è¡Œã¯æŠ˜ã‚Šç•³ã¾ã‚Œ +ã¾ã™ã€‚ +折り畳ã¿ã®ç¢ºèªã¨é–‹é–‰ãŒç°¡å˜ã«ã§ãるよã†ã«ã€'foldcolumn' 㯠2 ã«è¨­å®šã•れã¾ã™ã€‚ +.SH オプション +行を並ã¹ã¦è¡¨ç¤ºã™ã‚‹ãŸã‚ã«ã€"\-O" 引数を使ã£ãŸã¨ãã®ã‚ˆã†ã«ã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¯åž‚直分 +割ã•れã¾ã™ã€‚ +ウィンドウを水平分割ã—ãŸã„å ´åˆã¯ "\-o" 引数を使ã£ã¦ãã ã•ã„。 +.PP +ãã®ä»–ã®å¼•æ•°ã«ã¤ã„ã¦ã¯ vim(1) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +.SH 関連項目 +vim(1) +.SH 著者 +.B Vim +ã®ã»ã¨ã‚“ã©ã®æ©Ÿèƒ½ã¯ Bram Moolenaar ãŒé–‹ç™ºã—ã€å¤šãã®äººãŒå”力ã—ã¾ã—ãŸã€‚ +":help credits" ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/runtime/doc/vimdiff-pl.1 b/runtime/doc/vimdiff-pl.1 new file mode 100644 index 0000000000..5332f78328 --- /dev/null +++ b/runtime/doc/vimdiff-pl.1 @@ -0,0 +1,46 @@ +.TH VIMDIFF 1 "2001 Mar 30" +.SH NAZWA +vimdiff \- edytuj dwie, trzy lub cztery wersje pliku w Vimie i zobacz ró¿nice +.SH SYNOPSIS +.br +.B vimdiff +[opcje] plik1 plik2 [plik3 [plik4]] +.PP +.B gvimdiff +.SH OPIS +.B Vimdiff +uruchomi +.B Vima +z dwoma (trzema lub czterema plikami), ka¿dy z nich we w³asnym oknie. +Ró¿nice miêdzy plikami zostan± pod¶wietlone. +Jest to dobry sposób by przeanalizowaæ ró¿nice i przenie¶æ zmiany z jednej +wersji pliku do innej. +.PP +Zobacz vim(1) by poznaæ wiêcej szczegó³ów o samym Vimie. +.PP +Kiedy uruchomiony jako +.B gvimdiff +zostanie uruchomione GUI (je¶li dostêpne). +.PP +W ka¿dym oknie zostanie ustawiona opcja 'diff', która spowoduje +pod¶wietlenie ró¿nic. +.br +Opcje 'wrap' i 'scrollbind' zostan± ustawione by tekst siê +wygodnie przegl±da³o. +.br +Opcja 'foldmethod' zostanie ustawiona na "diff", dziêki czemu +niezmienione linie zostan± zwiniête. 'foldcolumn' bêdzie równe 2 aby +³atwo wyszukiwaæ, otwieraæ i zamykaæ zwiniêcia. +.SH OPCJE +Pionowy podzia³ zostanie u¿yty do wyrównania linii, tak jakby u¿yto +opcji "\-O". Aby uzyskaæ poziomy podzia³ u¿yj opcji "\-o". +.PP +Aby poznaæ inne opcje zobacz vim(1). +.SH ZOBACZ TAK¯E +vim(1) +.SH AUTOR +Wiêkszo¶æ +.B Vima +zosta³a napisana przez Brama Moolenaara przy pomocy wielu innych osób. +Zobacz ":help credits w +.B Vimie. diff --git a/runtime/doc/vimdiff-pl.UTF-8.1 b/runtime/doc/vimdiff-pl.UTF-8.1 new file mode 100644 index 0000000000..d66fdc9c03 --- /dev/null +++ b/runtime/doc/vimdiff-pl.UTF-8.1 @@ -0,0 +1,46 @@ +.TH VIMDIFF 1 "2001 Mar 30" +.SH NAZWA +vimdiff \- edytuj dwie, trzy lub cztery wersje pliku w Vimie i zobacz różnice +.SH SYNOPSIS +.br +.B vimdiff +[opcje] plik1 plik2 [plik3 [plik4]] +.PP +.B gvimdiff +.SH OPIS +.B Vimdiff +uruchomi +.B Vima +z dwoma (trzema lub czterema plikami), każdy z nich we wÅ‚asnym oknie. +Różnice miÄ™dzy plikami zostanÄ… podÅ›wietlone. +Jest to dobry sposób by przeanalizować różnice i przenieść zmiany z jednej +wersji pliku do innej. +.PP +Zobacz vim(1) by poznać wiÄ™cej szczegółów o samym Vimie. +.PP +Kiedy uruchomiony jako +.B gvimdiff +zostanie uruchomione GUI (jeÅ›li dostÄ™pne). +.PP +W każdym oknie zostanie ustawiona opcja 'diff', która spowoduje +podÅ›wietlenie różnic. +.br +Opcje 'wrap' i 'scrollbind' zostanÄ… ustawione by tekst siÄ™ +wygodnie przeglÄ…daÅ‚o. +.br +Opcja 'foldmethod' zostanie ustawiona na "diff", dziÄ™ki czemu +niezmienione linie zostanÄ… zwiniÄ™te. 'foldcolumn' bÄ™dzie równe 2 aby +Å‚atwo wyszukiwać, otwierać i zamykać zwiniÄ™cia. +.SH OPCJE +Pionowy podziaÅ‚ zostanie użyty do wyrównania linii, tak jakby użyto +opcji "\-O". Aby uzyskać poziomy podziaÅ‚ użyj opcji "\-o". +.PP +Aby poznać inne opcje zobacz vim(1). +.SH ZOBACZ TAKÅ»E +vim(1) +.SH AUTOR +WiÄ™kszość +.B Vima +zostaÅ‚a napisana przez Brama Moolenaara przy pomocy wielu innych osób. +Zobacz ":help credits w +.B Vimie. diff --git a/runtime/doc/vimdiff-ru.1 b/runtime/doc/vimdiff-ru.1 new file mode 100644 index 0000000000..385536790e --- /dev/null +++ b/runtime/doc/vimdiff-ru.1 @@ -0,0 +1,50 @@ +.TH VIMDIFF 1 "2001 March 30" +.SH éíñ +vimdiff \- ÐÏÚ×ÏÌÑÅÔ ÒÅÄÁËÔÉÒÏ×ÁÔØ Ä×Å ÉÌÉ ÔÒÉ ×ÅÒÓÉÉ ÆÁÊÌÁ Ó ÐÏÍÏÝØÀ Vim +Ó ÏÔÏÂÒÁÖÅÎÉÅÍ ÒÁÚÌÉÞÉÊ. +.SH ëïíáîäîáñ óôòïëá +.br +.B vimdiff +[ËÌÀÞÉ] ÆÁÊÌ1 ÆÁÊÌ2 [ÆÁÊÌ3] +.PP +.B gvimdiff +.SH ïðéóáîéå +ëÏÍÁÎÄÁ +.B vimdiff +ÚÁÇÒÕÖÁÅÔ × +.B Vim +Ä×Á (ÉÌÉ ÔÒÉ) ÆÁÊÌÁ. ëÁÖÄÙÊ ÆÁÊÌ ÏÔËÒÙ×ÁÅÔÓÑ × ÓÏÂÓÔ×ÅÎÎÏÍ ÏËÎÅ. +òÁÚÌÉÞÉÑ ÍÅÖÄÕ ÆÁÊÌÁÍÉ ÏÔÏÂÒÁÖÁÀÔÓÑ Ó ÐÏÍÏÝØÀ ÐÏÄÓ×ÅÔËÉ ÓÉÎÔÁËÓÉÓÁ. +üÔÁ ËÏÍÁÎÄÁ ÐÏÚ×ÏÌÑÅÔ ÎÁÇÌÑÄÎÏ ÏÔÏÂÒÁÖÁÔØ ×ÎÅÓ£ÎÎÙÅ ÉÚÍÅÎÅÎÉÑ É ÐÅÒÅÎÏÓÉÔØ +ÒÁÚÌÉÞÁÀÝÉÅÓÑ ÆÒÁÇÍÅÎÔÙ ÉÚ ÏÄÎÏÊ ×ÅÒÓÉÉ ÆÁÊÌÁ × ÄÒÕÇÕÀ. +.PP +ðÏÄÒÏÂÎÅÅ Ï Vim ÓÍ. ÎÁ ÓÔÒÁÎÉÃÅ ÓÐÒÁ×ÏÞÎÉËÁ vim(1). +.PP +ðÒÉ ÚÁÐÕÓËÅ Ó ÐÏÍÏÝØÀ ËÏÍÁÎÄÙ +.B gvimdiff +ÒÅÄÁËÔÏÒ ÚÁÐÕÓËÁÅÔÓÑ × ÒÅÖÉÍÅ ÇÒÁÆÉÞÅÓËÏÇÏ ÉÎÔÅÒÆÅÊÓÁ, ÅÓÌÉ ÜÔÏ ×ÏÚÍÏÖÎÏ. +.PP +÷ ËÁÖÄÏÍ ÏËÎÅ ×ËÌÀÞÁÅÔÓÑ ÏÐÃÉÑ 'diff', ÞÔÏ ÐÏÚ×ÏÌÑÅÔ ÉÓÐÏÌØÚÏ×ÁÔØ ÐÏÄÓ×ÅÔËÕ +ÓÉÎÔÁËÓÉÓÁ ÄÌÑ ÏÔÏÂÒÁÖÅÎÉÑ ÒÁÚÌÉÞÉÊ ÍÅÖÄÕ ÆÁÊÌÁÍÉ. +.br +äÌÑ ÕÌÕÞÛÅÎÉÑ ÒÁÂÏÔÙ Ó ÆÁÊÌÁÍÉ × ÒÅÖÉÍÅ ÏÔÏÂÒÁÖÅÎÉÑ ÏÔÌÉÞÉÊ ÔÁËÖÅ ×ËÌÀÞÁÀÔÓÑ +ÏÐÃÉÉ 'wrap' É 'scrollbind'. +.br +úÎÁÞÅÎÉÅ ÏÐÃÉÉ 'foldmethod' ÕÓÔÁÎÁ×ÌÉ×ÁÅÔÓÑ ÒÁ×ÎÙÍ "diff", ÞÔÏ ÐÏÚ×ÏÌÑÅÔ +ÐÒÑÔÁÔØ × ÓËÌÁÄËÕ ÏÂÌÁÓÔÉ ÔÅËÓÔÁ, ËÏÔÏÒÙÅ ÎÅ ÏÔÌÉÞÁÀÔÓÑ × ÒÁÚÌÉÞÎÙÈ ×ÅÒÓÉÑÈ ÆÁÊÌÁ. +úÎÁÞÅÎÉÅ ÏÐÃÉÉ 'foldcolumn' ÕÓÔÁÎÁ×ÌÉ×ÁÅÔÓÑ ÒÁ×ÎÙÍ 2, ÞÔÏÂÙ ÂÙÌÏ ÐÒÏÝÅ +ÎÁÈÏÄÉÔØ, ÏÔËÒÙ×ÁÔØ É ÚÁËÒÙ×ÁÔØ ÔÁËÉÅ ÓËÌÁÄËÉ. +.SH ëìàþé úáðõóëá +äÌÑ ×ÙÒÁ×ÎÉ×ÁÎÉÑ ÓÔÒÏË ÍÅÖÄÕ ÏËÎÁÍÉ ÉÓÐÏÌØÚÕÅÔÓÑ ×ÅÒÔÉËÁÌØÎÏÅ ÒÁÚÄÅÌÅÎÉÅ ÏËÏÎ, +ËÁË ÅÓÌÉ ÂÙ ÉÓÐÏÌØÚÏ×ÁÌÓÑ ËÌÀÞ "\-O". äÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÉÓÐÏÌØÚÏ×ÁÔØ ÒÁÚÄÅÌÅÎÉÅ +ÏËÏÎ ÐÏ ÇÏÒÉÚÏÎÔÁÌÉ, ÓÌÅÄÕÅÔ ÕËÁÚÁÔØ × ËÏÍÁÎÄÎÏÊ ÓÔÒÏËÅ ËÌÀÞ "\-o". +.PP +ïÓÔÁÌØÎÙÅ ËÌÀÞÉ ËÏÍÁÎÄÎÏÊ ÓÔÒÏËÉ ÒÁÓÓÍÁÔÒÉ×ÁÀÔÓÑ ÎÁ ÓÔÒÁÎÉÃÅ ÓÐÒÁ×ÏÞÎÉËÁ vim(1). +.SH óíïôòé ôáëöå +vim(1) +.SH á÷ôïòù +âÏÌØÛÁÑ ÞÁÓÔØ +.B Vim +ÓÏÚÄÁÎÁ âÒÁÍÏÍ íÏÏÌÅÎÁÁÒÏÍ (Bram Moolenaar), ËÏÔÏÒÏÍÕ ÐÏÍÏÇÁÅÔ ÏÇÒÏÍÎÏÅ +ËÏÌÉÞÅÓÔ×Ï ÌÀÄÅÊ. óÍ. ":help credits" × +.B Vim. diff --git a/runtime/doc/vimdiff-ru.UTF-8.1 b/runtime/doc/vimdiff-ru.UTF-8.1 new file mode 100644 index 0000000000..2f17e9c2e5 --- /dev/null +++ b/runtime/doc/vimdiff-ru.UTF-8.1 @@ -0,0 +1,50 @@ +.TH VIMDIFF 1 "2001 March 30" +.SH ИМЯ +vimdiff \- позволÑет редактировать две или три верÑии файла Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ Vim +Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸ÐµÐ¼ различий. +.SH КОМÐÐДÐÐЯ СТРОКР+.br +.B vimdiff +[ключи] файл1 файл2 [файл3] +.PP +.B gvimdiff +.SH ОПИСÐÐИЕ +Команда +.B vimdiff +загружает в +.B Vim +два (или три) файла. Каждый файл открываетÑÑ Ð² ÑобÑтвенном окне. +Ð Ð°Ð·Ð»Ð¸Ñ‡Ð¸Ñ Ð¼ÐµÐ¶Ð´Ñƒ файлами отображаютÑÑ Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ подÑветки ÑинтакÑиÑа. +Эта команда позволÑет наглÑдно отображать внеÑённые Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¸ переноÑить +различающиеÑÑ Ñ„Ñ€Ð°Ð³Ð¼ÐµÐ½Ñ‚Ñ‹ из одной верÑии файла в другую. +.PP +Подробнее о Vim Ñм. на Ñтранице Ñправочника vim(1). +.PP +При запуÑке Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ команды +.B gvimdiff +редактор запуÑкаетÑÑ Ð² режиме графичеÑкого интерфейÑа, еÑли Ñто возможно. +.PP +Ð’ каждом окне включаетÑÑ Ð¾Ð¿Ñ†Ð¸Ñ 'diff', что позволÑет иÑпользовать подÑветку +ÑинтакÑиÑа Ð´Ð»Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñ€Ð°Ð·Ð»Ð¸Ñ‡Ð¸Ð¹ между файлами. +.br +Ð”Ð»Ñ ÑƒÐ»ÑƒÑ‡ÑˆÐµÐ½Ð¸Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ Ñ Ñ„Ð°Ð¹Ð»Ð°Ð¼Ð¸ в режиме Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð¾Ñ‚Ð»Ð¸Ñ‡Ð¸Ð¹ также включаютÑÑ +опции 'wrap' и 'scrollbind'. +.br +Значение опции 'foldmethod' уÑтанавливаетÑÑ Ñ€Ð°Ð²Ð½Ñ‹Ð¼ "diff", что позволÑет +прÑтать в Ñкладку облаÑти текÑта, которые не отличаютÑÑ Ð² различных верÑиÑÑ… файла. +Значение опции 'foldcolumn' уÑтанавливаетÑÑ Ñ€Ð°Ð²Ð½Ñ‹Ð¼ 2, чтобы было проще +находить, открывать и закрывать такие Ñкладки. +.SH КЛЮЧИ ЗÐПУСКР+Ð”Ð»Ñ Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ñтрок между окнами иÑпользуетÑÑ Ð²ÐµÑ€Ñ‚Ð¸ÐºÐ°Ð»ÑŒÐ½Ð¾Ðµ разделение окон, +как еÑли бы иÑпользовалÑÑ ÐºÐ»ÑŽÑ‡ "\-O". Ð”Ð»Ñ Ñ‚Ð¾Ð³Ð¾, чтобы иÑпользовать разделение +окон по горизонтали, Ñледует указать в командной Ñтроке ключ "\-o". +.PP +ОÑтальные ключи командной Ñтроки раÑÑматриваютÑÑ Ð½Ð° Ñтранице Ñправочника vim(1). +.SH СМОТРИ ТÐКЖЕ +vim(1) +.SH ÐВТОРЫ +Ð‘Ð¾Ð»ÑŒÑˆÐ°Ñ Ñ‡Ð°Ñть +.B Vim +Ñоздана Брамом Мооленааром (Bram Moolenaar), которому помогает огромное +количеÑтво людей. См. ":help credits" в +.B Vim. diff --git a/runtime/doc/vimdiff.1 b/runtime/doc/vimdiff.1 new file mode 100644 index 0000000000..bed2b32889 --- /dev/null +++ b/runtime/doc/vimdiff.1 @@ -0,0 +1,46 @@ +.TH VIMDIFF 1 "2001 March 30" +.SH NAME +vimdiff \- edit two, three or four versions of a file with Vim and show differences +.SH SYNOPSIS +.br +.B vimdiff +[options] file1 file2 [file3 [file4]] +.PP +.B gvimdiff +.SH DESCRIPTION +.B Vimdiff +starts +.B Vim +on two (or three or four) files. +Each file gets its own window. +The differences between the files are highlighted. +This is a nice way to inspect changes and to move changes from one version +to another version of the same file. +.PP +See vim(1) for details about Vim itself. +.PP +When started as +.B gvimdiff +the GUI will be started, if available. +.PP +In each window the 'diff' option will be set, which causes the differences +to be highlighted. +.br +The 'wrap' and 'scrollbind' options are set to make the text look good. +.br +The 'foldmethod' option is set to "diff", which puts ranges of lines without +changes in a fold. 'foldcolumn' is set to two to make it easy to spot the +folds and open or close them. +.SH OPTIONS +Vertical splits are used to align the lines, as if the "\-O" argument was used. +To use horizontal splits instead, use the "\-o" argument. +.PP +For all other arguments see vim(1). +.SH SEE ALSO +vim(1) +.SH AUTHOR +Most of +.B Vim +was made by Bram Moolenaar, with a lot of help from others. +See ":help credits" in +.B Vim. diff --git a/runtime/doc/vimdiff.man b/runtime/doc/vimdiff.man new file mode 100644 index 0000000000..913ac13847 --- /dev/null +++ b/runtime/doc/vimdiff.man @@ -0,0 +1,46 @@ +VIMDIFF(1) VIMDIFF(1) + + + +NAME + vimdiff - edit two, three or four versions of a file with Vim and show + differences + +SYNOPSIS + vimdiff [options] file1 file2 [file3 [file4]] + + gvimdiff + +DESCRIPTION + Vimdiff starts Vim on two (or three or four) files. Each file gets its + own window. The differences between the files are highlighted. This + is a nice way to inspect changes and to move changes from one version + to another version of the same file. + + See vim(1) for details about Vim itself. + + When started as gvimdiff the GUI will be started, if available. + + In each window the 'diff' option will be set, which causes the differ- + ences to be highlighted. + The 'wrap' and 'scrollbind' options are set to make the text look good. + The 'foldmethod' option is set to "diff", which puts ranges of lines + without changes in a fold. 'foldcolumn' is set to two to make it easy + to spot the folds and open or close them. + +OPTIONS + Vertical splits are used to align the lines, as if the "-O" argument + was used. To use horizontal splits instead, use the "-o" argument. + + For all other arguments see vim(1). + +SEE ALSO + vim(1) + +AUTHOR + Most of Vim was made by Bram Moolenaar, with a lot of help from others. + See ":help credits" in Vim. + + + + 2001 March 30 VIMDIFF(1) diff --git a/runtime/doc/vimtutor-fr.1 b/runtime/doc/vimtutor-fr.1 new file mode 100644 index 0000000000..06e03fbef3 --- /dev/null +++ b/runtime/doc/vimtutor-fr.1 @@ -0,0 +1,60 @@ +.TH VIMTUTOR 1 "2 avril 2001" +.SH NAME +vimtutor \- tutoriel Vim +.SH SYNOPSIS +.br +.B vimtutor [\-g] [langue] +.SH DESCRIPTION +.B Vimtutor +lance le tutoriel +.B Vim +\. +Il copie d'abord le fichier du tutoriel, afin que vous puissiez le modifier +sans altérer le fichier original. +.PP +.B Vimtutor +est utile pour les personnes souhaitant apprendre leurs premières commandes +.B Vim +\. +.PP +L'argument optionnel \-g lance vimtutor avec gvim plutôt qu'avec vim, si l'IHM +graphique de vim est disponible, ou le lance avec vim si gvim n'est pas +disponible. +.PP +L'argument optionnel [langue] est le nom d'une langue, spécifiée par son +symbole à deux lettres, tels que "it" ou "es". Si l'argument [langue] est omis, +la langue de la région linguistique actuelle sera retenue. Si le tutoriel est +disponible dans cette langue, il est proposé. Sinon, c'est la version anglaise +qui est proposée. +.PP +.B Vim +est toujours lancé en mode Compatible Vi. +.SH FICHIERS +.TP 15 +/usr/local/lib/vim/tutor/tutor[.langue] +Les fichiers textes de +.B Vimtutor +\. +.TP 15 +/usr/local/lib/vim/tutor/tutor.vim +Le script Vim utilisé pour copier les fichiers texte de +.B Vimtutor +\. +.SH AUTEUR +.B Vimtutor +a été écrit à l'origine pour Vi par Michael C. Pierce et Robert K. Ware, de la +Colorado School of Mines, en reprenant des idées émises par Charles Smith, de +la Colorado State University. +E-mail : bware@mines.colorado.edu. +.br +Il a été modifié pour +.B Vim +par Bram Moolenaar. +Pour connaître le nom des traducteurs, consultez les fichiers textes du +tutoriel. +.SH VOIR AUSSI +vim(1) +.SH TRADUCTION +Cette page de manuel a été traduite par David Blanchet + 2004-12-27. +Mise à jour 2012-05-06, Dominique Pellé diff --git a/runtime/doc/vimtutor-fr.UTF-8.1 b/runtime/doc/vimtutor-fr.UTF-8.1 new file mode 100644 index 0000000000..f47f840ec1 --- /dev/null +++ b/runtime/doc/vimtutor-fr.UTF-8.1 @@ -0,0 +1,60 @@ +.TH VIMTUTOR 1 "2 avril 2001" +.SH NAME +vimtutor \- tutoriel Vim +.SH SYNOPSIS +.br +.B vimtutor [\-g] [langue] +.SH DESCRIPTION +.B Vimtutor +lance le tutoriel +.B Vim +\. +Il copie d'abord le fichier du tutoriel, afin que vous puissiez le modifier +sans altérer le fichier original. +.PP +.B Vimtutor +est utile pour les personnes souhaitant apprendre leurs premières commandes +.B Vim +\. +.PP +L'argument optionnel \-g lance vimtutor avec gvim plutôt qu'avec vim, si l'IHM +graphique de vim est disponible, ou le lance avec vim si gvim n'est pas +disponible. +.PP +L'argument optionnel [langue] est le nom d'une langue, spécifiée par son +symbole à deux lettres, tels que "it" ou "es". Si l'argument [langue] est omis, +la langue de la région linguistique actuelle sera retenue. Si le tutoriel est +disponible dans cette langue, il est proposé. Sinon, c'est la version anglaise +qui est proposée. +.PP +.B Vim +est toujours lancé en mode Compatible Vi. +.SH FICHIERS +.TP 15 +/usr/local/lib/vim/tutor/tutor[.langue] +Les fichiers textes de +.B Vimtutor +\. +.TP 15 +/usr/local/lib/vim/tutor/tutor.vim +Le script Vim utilisé pour copier les fichiers texte de +.B Vimtutor +\. +.SH AUTEUR +.B Vimtutor +a été écrit à l'origine pour Vi par Michael C. Pierce et Robert K. Ware, de la +Colorado School of Mines, en reprenant des idées émises par Charles Smith, de +la Colorado State University. +E-mail : bware@mines.colorado.edu. +.br +Il a été modifié pour +.B Vim +par Bram Moolenaar. +Pour connaître le nom des traducteurs, consultez les fichiers textes du +tutoriel. +.SH VOIR AUSSI +vim(1) +.SH TRADUCTION +Cette page de manuel a été traduite par David Blanchet + 2004-12-27. +Mise à jour 2012-05-06, Dominique Pellé diff --git a/runtime/doc/vimtutor-it.1 b/runtime/doc/vimtutor-it.1 new file mode 100755 index 0000000000..b5c1e61e01 --- /dev/null +++ b/runtime/doc/vimtutor-it.1 @@ -0,0 +1,58 @@ +.TH VIMTUTOR 1 "2 aprile 2001" +.SH NOME +vimtutor \- Un breve corso per imparare Vim +.SH SINTASSI +.br +.B vimtutor [\-g] [lingua] +.SH DESCRIZIONE +.B Vimtutor +inizia il +.B Vim +tutor (una breve corso per imparare Vim). +Per prima cosa viene creata una copia del file di lavoro, che può così essere +modificato senza alterare il file usato come modello. +.PP +Il comando +.B Vimtutor +è utile a chi voglia imparare i primi comandi +.B Vim +. +.PP +L'argomento opzionale \-g inizia vimtutor usando gvim invece che vim, se la +versione GUI di vim è disponibile. oppure utilizza vim, se gvim non è +disponibile. +.PP +L'arogmento opzionale [lingua] è l'abbreviazione di due lettere del nome +di una lingua, per esempio "it" oppure "es". +se L'argomento [lingua] non viene specificato, si utilizza la lingua "locale" +del computer. +Se la versione in quella lingua del "tutor" è disponibile, sarà usata. +Altrimenti sarà usata la versione inglese. +.PP +.B Vim +è sempre iniziato in Modo compatibile con vi. +.SH FILE +.TP 15 +/usr/local/lib/vim/tutor/tutor[.language] +Il/I file di testo per +.B Vimtutor + +.TP 15 +/usr/local/lib/vim/tutor/tutor.vim +Lo script di Vim usato per copiare il file di testo +.B Vimtutor +. +.SH AUTORE +The +.B Vimtutor +è stato scritto in origine per Vi 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. +.br +È stato modificato per +.B Vim +da Bram Moolenaar. +Per i nomi dei traduttori, vedere i file usati nelle rispettive lingue. +.SH VEDERE ANCHE +vim(1) diff --git a/runtime/doc/vimtutor-it.UTF-8.1 b/runtime/doc/vimtutor-it.UTF-8.1 new file mode 100644 index 0000000000..a33dcb00b0 --- /dev/null +++ b/runtime/doc/vimtutor-it.UTF-8.1 @@ -0,0 +1,58 @@ +.TH VIMTUTOR 1 "2 aprile 2001" +.SH NOME +vimtutor \- Un breve corso per imparare Vim +.SH SINTASSI +.br +.B vimtutor [\-g] [lingua] +.SH DESCRIZIONE +.B Vimtutor +inizia il +.B Vim +tutor (una breve corso per imparare Vim). +Per prima cosa viene creata una copia del file di lavoro, che può così essere +modificato senza alterare il file usato come modello. +.PP +Il comando +.B Vimtutor +è utile a chi voglia imparare i primi comandi +.B Vim +. +.PP +L'argomento opzionale \-g inizia vimtutor usando gvim invece che vim, se la +versione GUI di vim è disponibile. oppure utilizza vim, se gvim non è +disponibile. +.PP +L'arogmento opzionale [lingua] è l'abbreviazione di due lettere del nome +di una lingua, per esempio "it" oppure "es". +se L'argomento [lingua] non viene specificato, si utilizza la lingua "locale" +del computer. +Se la versione in quella lingua del "tutor" è disponibile, sarà usata. +Altrimenti sarà usata la versione inglese. +.PP +.B Vim +è sempre iniziato in Modo compatibile con vi. +.SH FILE +.TP 15 +/usr/local/lib/vim/tutor/tutor[.language] +Il/I file di testo per +.B Vimtutor + +.TP 15 +/usr/local/lib/vim/tutor/tutor.vim +Lo script di Vim usato per copiare il file di testo +.B Vimtutor +. +.SH AUTORE +The +.B Vimtutor +è stato scritto in origine per Vi 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. +.br +È stato modificato per +.B Vim +da Bram Moolenaar. +Per i nomi dei traduttori, vedere i file usati nelle rispettive lingue. +.SH VEDERE ANCHE +vim(1) diff --git a/runtime/doc/vimtutor-ja.UTF-8.1 b/runtime/doc/vimtutor-ja.UTF-8.1 new file mode 100644 index 0000000000..29b9b48f2c --- /dev/null +++ b/runtime/doc/vimtutor-ja.UTF-8.1 @@ -0,0 +1,45 @@ +.TH VIMTUTOR 1 "2001 April 2" +.SH åå‰ +vimtutor \- Vim ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ« +.SH æ›¸å¼ +.br +.B vimtutor [\-g] [language] +.SH 説明 +.B Vim +ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã‚’èµ·å‹•ã—ã¾ã™ã€‚ +演習ファイルã®ã‚³ãƒ”ーを使ã£ã¦å®Ÿæ–½ã™ã‚‹ã®ã§ã€ã‚ªãƒªã‚¸ãƒŠãƒ«ã®æ¼”習ファイルを壊ã—ã¦ã— +ã¾ã†å¿ƒé…ã¯ã‚りã¾ã›ã‚“。 +.PP +.B Vim +ã‚’åˆã‚ã¦å­¦ã¶äººå‘ã‘ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ã§ã™ã€‚ +.PP +引数㫠\-g を指定ã™ã‚‹ã¨ GUI 版㮠vim ãŒåˆ©ç”¨å¯èƒ½ã§ã‚れ㰠vim ã§ã¯ãªã gvim ã‚’ +使ã£ã¦ vimtutor ãŒé–‹å§‹ã—ã¾ã™ã€‚gvim ãŒè¦‹ã¤ã‹ã‚‰ãªã„ã¨ã㯠Vim ãŒä½¿ç”¨ã•れã¾ã™ã€‚ +.PP +[language] 引数㯠"ja" ã‚„ "es" ãªã©ã®äºŒæ–‡å­—ã®è¨€èªžåã§ã™ã€‚ +[language] 引数をçœç•¥ã—ãŸå ´åˆã¯ãƒ­ã‚±ãƒ¼ãƒ«ã®è¨€èªžãŒä½¿ã‚れã¾ã™ã€‚ +翻訳ã•ã‚ŒãŸæ¼”習ファイルãŒã‚ã‚‹å ´åˆã¯ã€ãã®ãƒ•ァイルãŒä½¿ã‚れã¾ã™ã€‚ +ãªã„å ´åˆã¯è‹±èªžã®ãƒ•ァイルãŒä½¿ã‚れã¾ã™ã€‚ +.PP +.B Vim +㯠Vi 互æ›ãƒ¢ãƒ¼ãƒ‰ã§èµ·å‹•ã•れã¾ã™ã€‚ +.SH ファイル +.TP 15 +/usr/local/lib/vim/tutor/tutor[.language] +.B Vimtutor +ã®æ¼”習ファイル。 +.TP 15 +/usr/local/lib/vim/tutor/tutor.vim +演習ファイルをコピーã™ã‚‹ãŸã‚ã® Vim スクリプト。 +.SH 著者 +.B Vimtutor +ã¯ã€Colorado State University ã® Charles Smith ã®ã‚¢ã‚¤ãƒ‡ã‚¢ã‚’基ã«ã€ +Colorado School of Mines ã® Michael C. Pierce 㨠Robert K. Ware ã®ä¸¡å +ã«ã‚ˆã£ã¦ Vi å‘ã‘ã«ä½œæˆã•れãŸã‚‚ã®ã‚’基ã«ã—ã¦ã„ã¾ã™ã€‚ +E-mail: bware@mines.colorado.edu. +.br +.B Vim +ã«åˆã‚ã›ã¦ Bram Moolenaar ãŒå¤‰æ›´ã‚’加ãˆã¾ã—ãŸã€‚ +翻訳者ã®åå‰ã¯æ¼”習ファイルをå‚ç…§ã—ã¦ãã ã•ã„。 +.SH 関連項目 +vim(1) diff --git a/runtime/doc/vimtutor-pl.1 b/runtime/doc/vimtutor-pl.1 new file mode 100644 index 0000000000..e603ca5b8f --- /dev/null +++ b/runtime/doc/vimtutor-pl.1 @@ -0,0 +1,51 @@ +.TH VIMTUTOR 1 "2001 Kwi 2" +.SH NAZWA +vimtutor \- nauczyciel Vima +.SH SYNOPSIS +.br +.B vimtutor -g [jêzyk] +.SH OPIS +.B Vimtutor +uruchamia nauczyciela +.B Vima. +Najpierw kopiuje w³a¶ciwy plik, dziêki temu mo¿na go zmieniaæ bez obaw +utraty tre¶ci. +.PP +.B Vimtutor +przyda siê ludziom, którzy chc± siê nauczyæ pierwszych poleceñ +.B Vima +.PP +Opcjonalny argument \-g uruchamia vimtutor w gvimie a nie w Vimie je¶li +graficzna wersja Vima jest dostêpna, je¶li nie zostanie uruchomiony Vim. +.PP +Opcjonalny argument [jêzyk] jest dwu literowym kodem jêzyka, tak jak +"it" lub "es". +Je¶li brak argumentu [jêzyk] zostanie u¿yty jêzyk bie¿±cej +lokalizacji. +Je¶li nauczyciel w tym jêzyku jest dostêpny, zostanie u¿yty \- w innym +wypadku zostanie wykorzystana wersja angielska. +.PP +.B Vim +jest uruchamiany zawsze w trybie kompatybilno¶ci z Vi +.SH PLIKI +.TP 15 +/usr/local/lib/vim/tutor/tutor[.jêzyk] +Tekstowe pliki +.B Vimtutora. +.TP 15 +/usr/local/lib/vim/tutor/tutor.vim +Skrypt Vima u¿ywany do kopiowania pliku +.B Vimtutora. +.SH AUTOR +.B Vimtutor +zosta³ pocz±tkowo napisany dla Vi przez Michaela C. Pierce'a +i Roberta K. Ware'a z Colorado School of Mines zainspirowani przez +Charlesa Smitha z Colorado State University. +E-mail: bware@mines.colorado.edu +.br +Zmodyfikowany na potrzeby +.B Vima +przez Brama Moolenaara. +Nazwiska t³umaczy w plikach. +.SH ZOBACZ TAK¯E +vim(1) diff --git a/runtime/doc/vimtutor-pl.UTF-8.1 b/runtime/doc/vimtutor-pl.UTF-8.1 new file mode 100644 index 0000000000..199fcd0e8f --- /dev/null +++ b/runtime/doc/vimtutor-pl.UTF-8.1 @@ -0,0 +1,51 @@ +.TH VIMTUTOR 1 "2001 Kwi 2" +.SH NAZWA +vimtutor \- nauczyciel Vima +.SH SYNOPSIS +.br +.B vimtutor -g [jÄ™zyk] +.SH OPIS +.B Vimtutor +uruchamia nauczyciela +.B Vima. +Najpierw kopiuje wÅ‚aÅ›ciwy plik, dziÄ™ki temu można go zmieniać bez obaw +utraty treÅ›ci. +.PP +.B Vimtutor +przyda siÄ™ ludziom, którzy chcÄ… siÄ™ nauczyć pierwszych poleceÅ„ +.B Vima +.PP +Opcjonalny argument \-g uruchamia vimtutor w gvimie a nie w Vimie jeÅ›li +graficzna wersja Vima jest dostÄ™pna, jeÅ›li nie zostanie uruchomiony Vim. +.PP +Opcjonalny argument [jÄ™zyk] jest dwu literowym kodem jÄ™zyka, tak jak +"it" lub "es". +JeÅ›li brak argumentu [jÄ™zyk] zostanie użyty jÄ™zyk bieżącej +lokalizacji. +JeÅ›li nauczyciel w tym jÄ™zyku jest dostÄ™pny, zostanie użyty \- w innym +wypadku zostanie wykorzystana wersja angielska. +.PP +.B Vim +jest uruchamiany zawsze w trybie kompatybilnoÅ›ci z Vi +.SH PLIKI +.TP 15 +/usr/local/lib/vim/tutor/tutor[.jÄ™zyk] +Tekstowe pliki +.B Vimtutora. +.TP 15 +/usr/local/lib/vim/tutor/tutor.vim +Skrypt Vima używany do kopiowania pliku +.B Vimtutora. +.SH AUTOR +.B Vimtutor +zostaÅ‚ poczÄ…tkowo napisany dla Vi przez Michaela C. Pierce'a +i Roberta K. Ware'a z Colorado School of Mines zainspirowani przez +Charlesa Smitha z Colorado State University. +E-mail: bware@mines.colorado.edu +.br +Zmodyfikowany na potrzeby +.B Vima +przez Brama Moolenaara. +Nazwiska tÅ‚umaczy w plikach. +.SH ZOBACZ TAKÅ»E +vim(1) diff --git a/runtime/doc/vimtutor-ru.1 b/runtime/doc/vimtutor-ru.1 new file mode 100644 index 0000000000..fa3c5d9b08 --- /dev/null +++ b/runtime/doc/vimtutor-ru.1 @@ -0,0 +1,51 @@ +.TH VIMTUTOR 1 "2001 April 2" +.SH éíñ +vimtutor \- ÕÞÅÂÎÉË ÐÏ Vim +.SH ëïíáîäîáñ óôòïëá +.br +.B vimtutor [ÑÚÙË] +.SH ïðéóáîéå +ëÏÍÁÎÄÁ +.B vimtutor +ÚÁÐÕÓËÁÅÔ ÕÞÅÂÎÉË ÐÏ +.B Vim. +ðÒÉ ÜÔÏÍ ÓÎÁÞÁÌÁ ÐÒÏÉÓÈÏÄÉÔ ÓÏÚÄÁÎÉÅ ËÏÐÉÉ ÆÁÊÌÁ ÕÞÅÂÎÉËÁ, +ÞÔÏÂÙ ÅÇÏ ÍÏÖÎÏ ÂÙÌÏ ÒÅÄÁËÔÉÒÏ×ÁÔØ ÂÅÚ ÏÐÁÓÅÎÉÑ ÐÏÔÅÒÑÔØ ÉÓÈÏÄÎÙÊ ÆÁÊÌ. +.PP +ðÒÏÇÒÁÍÍÁ +.B vimtutor +ÐÏÌÅÚÎÁ ÄÌÑ ÎÏ×ÉÞËÏ×, ÖÅÌÁÀÝÉÈ ÎÁÕÞÉÔØÓÑ ÓÁÍÙÍ ÏÓÎÏ×ÎÙÍ ËÏÍÁÎÄÁÍ +.B Vim. +.PP +îÅÏÂÑÚÁÔÅÌØÎÙÊ ÐÁÒÁÍÅÔÒ [ÑÚÙË] ÐÒÅÄÓÔÁ×ÌÑÅÔ ÓÏÂÏÊ Ä×ÕÈÓÉÍ×ÏÌØÎÙÊ ËÏÄ ÑÚÙËÁ, +ÎÁÐÒÉÍÅÒ "ru" ÉÌÉ "it". +åÓÌÉ ÐÁÒÁÍÅÔÒ [ÑÚÙË] ÎÅ ÕËÁÚÁÎ, ÔÏ ÉÓÐÏÌØÚÕÅÔÓÑ ÑÚÙË ÁËÔÉ×ÎÏÊ × ÎÁÓÔÏÑÝÉÊ +ÍÏÍÅÎÔ ÌÏËÁÌÉ. åÓÌÉ ÕÞÅÂÎÉË ÎÁ ÜÔÏÍ ÑÚÙËÅ ÎÅ ÓÕÝÅÓÔ×ÕÅÔ, ÔÏ ÐÏ ÕÍÏÌÞÁÎÉÀ +ÉÓÐÏÌØÚÕÅÔÓÑ ÕÞÅÂÎÉË ÎÁ ÁÎÇÌÉÊÓËÏÍ ÑÚÙËÅ. +.PP +ðÒÉ ÒÁÂÏÔÅ Ó ÕÞÅÂÎÉËÏÍ +.B Vim +×ÓÅÇÄÁ ÚÁÐÕÓËÁÅÔÓÑ × ÒÅÖÉÍÅ ÓÏ×ÍÅÓÔÉÍÏÓÔÉ Ó Vi. +.SH æáêìù +.TP 15 +/usr/local/lib/vim/tutor/tutor[.ÑÚÙË] +ôÅËÓÔ ÕÞÅÂÎÉËÁ +.B vimtutor. +.TP 15 +/usr/local/lib/vim/tutor/tutor.vim +óÃÅÎÁÒÉÊ Vim, ËÏÔÏÒÙÊ ÉÓÐÏÌØÚÕÅÔÓÑ ÄÌÑ ÓÏÚÄÁÎÉÑ ÒÁÂÏÞÅÊ +ËÏÐÉÉ ÔÅËÓÔÁ ÕÞÅÂÎÉËÁ +.B vimtutor. +.SH á÷ôïòù +.B Vimtutor +ÂÙÌ ×ÐÅÒ×ÙÅ ÎÁÐÉÓÁÎ ÄÌÑ Vi íÁÊËÌÏÍ ë. ðÉÒÓÏÍ (Michael C. Pierce) É +òÏÂÅÒÔÏÍ ë. õÜÁ (Robert K. Ware) ÉÚ Colorado School of Mines ÐÏ +ÉÄÅÅ þÁÒÌØÚÁ óÍÉÔÁ (Charles Smith) ÉÚ Colorado State University. +E-mail: bware@mines.colorado.edu. +.br +÷ÐÏÓÌÅÄÓÔ×ÉÉ ÕÞÅÂÎÉË ÂÙÌ ÄÏÒÁÂÏÔÁÎ ÄÌÑ ÉÓÐÏÌØÚÏ×ÁÎÉÑ × +.B Vim +âÒÁÍÏÍ íÏÏÌÅÎÁÁÒÏÍ (Bram Moolenaar). +éÍÅÎÁ ÐÅÒÅ×ÏÄÞÉËÏ× ÕÞÅÂÎÉËÁ ÕÐÏÍÉÎÁÀÔÓÑ × ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÈ ÆÁÊÌÁÈ. +.SH óíïôòé ôáëöå +vim(1) diff --git a/runtime/doc/vimtutor-ru.UTF-8.1 b/runtime/doc/vimtutor-ru.UTF-8.1 new file mode 100644 index 0000000000..6b1ba90df0 --- /dev/null +++ b/runtime/doc/vimtutor-ru.UTF-8.1 @@ -0,0 +1,51 @@ +.TH VIMTUTOR 1 "2001 April 2" +.SH ИМЯ +vimtutor \- учебник по Vim +.SH КОМÐÐДÐÐЯ СТРОКР+.br +.B vimtutor [Ñзык] +.SH ОПИСÐÐИЕ +Команда +.B vimtutor +запуÑкает учебник по +.B Vim. +При Ñтом Ñначала проиÑходит Ñоздание копии файла учебника, +чтобы его можно было редактировать без опаÑÐµÐ½Ð¸Ñ Ð¿Ð¾Ñ‚ÐµÑ€Ñть иÑходный файл. +.PP +Программа +.B vimtutor +полезна Ð´Ð»Ñ Ð½Ð¾Ð²Ð¸Ñ‡ÐºÐ¾Ð², желающих научитьÑÑ Ñамым оÑновным командам +.B Vim. +.PP +ÐеобÑзательный параметр [Ñзык] предÑтавлÑет Ñобой двухÑимвольный код Ñзыка, +например "ru" или "it". +ЕÑли параметр [Ñзык] не указан, то иÑпользуетÑÑ Ñзык активной в наÑтоÑщий +момент локали. ЕÑли учебник на Ñтом Ñзыке не ÑущеÑтвует, то по умолчанию +иÑпользуетÑÑ ÑƒÑ‡ÐµÐ±Ð½Ð¸Ðº на английÑком Ñзыке. +.PP +При работе Ñ ÑƒÑ‡ÐµÐ±Ð½Ð¸ÐºÐ¾Ð¼ +.B Vim +вÑегда запуÑкаетÑÑ Ð² режиме ÑовмеÑтимоÑти Ñ Vi. +.SH ФÐЙЛЫ +.TP 15 +/usr/local/lib/vim/tutor/tutor[.Ñзык] +ТекÑÑ‚ учебника +.B vimtutor. +.TP 15 +/usr/local/lib/vim/tutor/tutor.vim +Сценарий Vim, который иÑпользуетÑÑ Ð´Ð»Ñ ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ñ€Ð°Ð±Ð¾Ñ‡ÐµÐ¹ +копии текÑта учебника +.B vimtutor. +.SH ÐВТОРЫ +.B Vimtutor +был впервые напиÑан Ð´Ð»Ñ Vi Майклом К. ПирÑом (Michael C. Pierce) и +Робертом К. УÑа (Robert K. Ware) из Colorado School of Mines по +идее Чарльза Смита (Charles Smith) из Colorado State University. +E-mail: bware@mines.colorado.edu. +.br +ВпоÑледÑтвии учебник был доработан Ð´Ð»Ñ Ð¸ÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð² +.B Vim +Брамом Мооленааром (Bram Moolenaar). +Имена переводчиков учебника упоминаютÑÑ Ð² ÑоответÑтвующих файлах. +.SH СМОТРИ ТÐКЖЕ +vim(1) diff --git a/runtime/doc/vimtutor.1 b/runtime/doc/vimtutor.1 new file mode 100644 index 0000000000..0aa7e8d8d9 --- /dev/null +++ b/runtime/doc/vimtutor.1 @@ -0,0 +1,57 @@ +.TH VIMTUTOR 1 "2001 April 2" +.SH NAME +vimtutor \- the Vim tutor +.SH SYNOPSIS +.br +.B vimtutor [\-g] [language] +.SH DESCRIPTION +.B Vimtutor +starts the +.B Vim +tutor. +It copies the tutor file first, so that it can be modified without changing +the original file. +.PP +The +.B Vimtutor +is useful for people that want to learn their first +.B Vim +commands. +.PP +The optional argument \-g starts vimtutor with gvim rather than vim, if the +GUI version of vim is available, or falls back to Vim if gvim is not found. +.PP +The optional [language] argument is the two-letter name of a language, like +"it" or "es". +If the [language] argument is missing, the language of the current locale will +be used. +If a tutor in this language is available, it will be used. +Otherwise the English version will be used. +.PP +.B Vim +is always started in Vi compatible mode. +.SH FILES +.TP 15 +/usr/local/lib/vim/tutor/tutor[.language] +The +.B Vimtutor +text file(s). +.TP 15 +/usr/local/lib/vim/tutor/tutor.vim +The Vim script used to copy the +.B Vimtutor +text file. +.SH AUTHOR +The +.B Vimtutor +was originally written for Vi 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. +.br +It was modified for +.B Vim +by Bram Moolenaar. +For the names of the translators see the tutor files. +.SH SEE ALSO +vim(1) diff --git a/runtime/doc/vimtutor.man b/runtime/doc/vimtutor.man new file mode 100644 index 0000000000..9f2350a0ae --- /dev/null +++ b/runtime/doc/vimtutor.man @@ -0,0 +1,50 @@ +VIMTUTOR(1) VIMTUTOR(1) + + + +NAME + vimtutor - the Vim tutor + +SYNOPSIS + vimtutor [-g] [language] + +DESCRIPTION + Vimtutor starts the Vim tutor. It copies the tutor file first, so that + it can be modified without changing the original file. + + The Vimtutor is useful for people that want to learn their first Vim + commands. + + The optional argument -g starts vimtutor with gvim rather than vim, if + the GUI version of vim is available, or falls back to Vim if gvim is + not found. + + The optional [language] argument is the two-letter name of a language, + like "it" or "es". If the [language] argument is missing, the language + of the current locale will be used. If a tutor in this language is + available, it will be used. Otherwise the English version will be + used. + + Vim is always started in Vi compatible mode. + +FILES + /usr/local/lib/vim/tutor/tutor[.language] + The Vimtutor text file(s). + + /usr/local/lib/vim/tutor/tutor.vim + The Vim script used to copy the Vimtutor text file. + +AUTHOR + The Vimtutor was originally written for Vi 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.col†+ orado.edu. + It was modified for Vim by Bram Moolenaar. For the names of the trans†+ lators see the tutor files. + +SEE ALSO + vim(1) + + + + 2001 April 2 VIMTUTOR(1) diff --git a/runtime/doc/visual.txt b/runtime/doc/visual.txt new file mode 100644 index 0000000000..fe47e996aa --- /dev/null +++ b/runtime/doc/visual.txt @@ -0,0 +1,540 @@ +*visual.txt* For Vim version 7.4. Last change: 2014 Mar 23 + + + VIM REFERENCE MANUAL by Bram Moolenaar + + +Visual mode *Visual* *Visual-mode* *visual-mode* + +Visual mode is a flexible and easy way to select a piece of text for an +operator. It is the only way to select a block of text. + +This is introduced in section |04.4| of the user manual. + +1. Using Visual mode |visual-use| +2. Starting and stopping Visual mode |visual-start| +3. Changing the Visual area |visual-change| +4. Operating on the Visual area |visual-operators| +5. Blockwise operators |blockwise-operators| +6. Repeating |visual-repeat| +7. Examples |visual-examples| +8. Select mode |Select-mode| + +{Vi has no Visual mode, the name "visual" is used for Normal mode, to +distinguish it from Ex mode} +{Since Vim 7.4.200 the |+visual| feature is always included} + +============================================================================== +1. Using Visual mode *visual-use* + +Using Visual mode consists of three parts: +1. Mark the start of the text with "v", "V" or CTRL-V. + The character under the cursor will be used as the start. +2. Move to the end of the text. + The text from the start of the Visual mode up to and including the + character under the cursor is highlighted. +3. Type an operator command. + The highlighted characters will be operated upon. + +The 'highlight' option can be used to set the display mode to use for +highlighting in Visual mode. +The 'virtualedit' option can be used to allow positioning the cursor to +positions where there is no actual character. + +The highlighted text normally includes the character under the cursor. +However, when the 'selection' option is set to "exclusive" and the cursor is +after the Visual area, the character under the cursor is not included. + +With "v" the text before the start position and after the end position will +not be highlighted. However, all uppercase and non-alpha operators, except +"~" and "U", will work on whole lines anyway. See the list of operators +below. + + *visual-block* +With CTRL-V (blockwise Visual mode) the highlighted text will be a rectangle +between start position and the cursor. However, some operators work on whole +lines anyway (see the list below). The change and substitute operators will +delete the highlighted text and then start insertion at the top left +position. + +============================================================================== +2. Starting and stopping Visual mode *visual-start* + + *v* *characterwise-visual* +[count]v Start Visual mode per character. + With [count] select the same number of characters or + lines as used for the last Visual operation, but at + the current cursor position, multiplied by [count]. + When the previous Visual operation was on a block both + the width and height of the block are multiplied by + [count]. + When there was no previous Visual operation [count] + characters are selected. This is like moving the + cursor right N * [count] characters. One less when + 'selection' is not "exclusive". + + *V* *linewise-visual* +[count]V Start Visual mode linewise. + With [count] select the same number of lines as used + for the last Visual operation, but at the current + cursor position, multiplied by [count]. When there + was no previous Visual operation [count] lines are + selected. + + *CTRL-V* *blockwise-visual* +[count]CTRL-V Start Visual mode blockwise. Note: Under Windows + CTRL-V could be mapped to paste text, it doesn't work + to start Visual mode then, see |CTRL-V-alternative|. + [count] is used as with `v` above. + +If you use , click the left mouse button or use any command that +does a jump to another buffer while in Visual mode, the highlighting stops +and no text is affected. Also when you hit "v" in characterwise Visual mode, +"CTRL-V" in blockwise Visual mode or "V" in linewise Visual mode. If you hit +CTRL-Z the highlighting stops and the editor is suspended or a new shell is +started |CTRL-Z|. + + new mode after typing: *v_v* *v_CTRL-V* *v_V* +old mode "v" "CTRL-V" "V" ~ + +Normal Visual blockwise Visual linewise Visual +Visual Normal blockwise Visual linewise Visual +blockwise Visual Visual Normal linewise Visual +linewise Visual Visual blockwise Visual Normal + + *gv* *v_gv* *reselect-Visual* +gv Start Visual mode with the same area as the previous + area and the same mode. + In Visual mode the current and the previous Visual + area are exchanged. + After using "p" or "P" in Visual mode the text that + was put will be selected. + + *gn* *v_gn* +gn Search forward for the last used search pattern, like + with `n`, and start Visual mode to select the match. + If the cursor is on the match, visually selects it. + If an operator is pending, operates on the match. + E.g., "dgn" deletes the text of the next match. + If Visual mode is active, extends the selection + until the end of the next match. + + *gN* *v_gN* +gN Like |gn| but searches backward, like with `N`. + + ** + Set the current cursor position. If Visual mode is + active it is stopped. Only when 'mouse' option is + contains 'n' or 'a'. If the position is within 'so' + lines from the last line on the screen the text is + scrolled up. If the position is within 'so' lines from + the first line on the screen the text is scrolled + down. + + ** + Start Visual mode if it is not active. The text from + the cursor position to the position of the click is + highlighted. If Visual mode was already active move + the start or end of the highlighted text, which ever + is closest, to the position of the click. Only when + 'mouse' option contains 'n' or 'a'. + + Note: when 'mousemodel' is set to "popup", + has to be used instead of . + + ** + This works like a , if it is not at + the same position as . In an older version + of xterm you won't see the selected area until the + button is released, unless there is access to the + display where the xterm is running (via the DISPLAY + environment variable or the -display argument). Only + when 'mouse' option contains 'n' or 'a'. + +If Visual mode is not active and the "v", "V" or CTRL-V is preceded with a +count, the size of the previously highlighted area is used for a start. You +can then move the end of the highlighted area and give an operator. The type +of the old area is used (character, line or blockwise). +- Linewise Visual mode: The number of lines is multiplied with the count. +- Blockwise Visual mode: The number of lines and columns is multiplied with + the count. +- Normal Visual mode within one line: The number of characters is multiplied + with the count. +- Normal Visual mode with several lines: The number of lines is multiplied + with the count, in the last line the same number of characters is used as + in the last line in the previously highlighted area. +The start of the text is the Cursor position. If the "$" command was used as +one of the last commands to extend the highlighted text, the area will be +extended to the rightmost column of the longest line. + +If you want to highlight exactly the same area as the last time, you can use +"gv" |gv| |v_gv|. + + *v_* + In Visual mode: Stop Visual mode. + + *v_CTRL-C* +CTRL-C In Visual mode: Stop Visual mode. When insert mode is + pending (the mode message shows + "-- (insert) VISUAL --"), it is also stopped. + +============================================================================== +3. Changing the Visual area *visual-change* + + *v_o* +o Go to Other end of highlighted text: The current + cursor position becomes the start of the highlighted + text and the cursor is moved to the other end of the + highlighted text. The highlighted area remains the + same. + + *v_O* +O Go to Other end of highlighted text. This is like + "o", but in Visual block mode the cursor moves to the + other corner in the same line. When the corner is at + a character that occupies more than one position on + the screen (e.g., a ), the highlighted text may + change. + + *v_$* +When the "$" command is used with blockwise Visual mode, the right end of the +highlighted text will be determined by the longest highlighted line. This +stops when a motion command is used that does not move straight up or down. + +For moving the end of the block many commands can be used, but you cannot +use Ex commands, commands that make changes or abandon the file. Commands +(starting with) ".", "&", CTRL-^, "Z", CTRL-], CTRL-T, CTRL-R, CTRL-I +and CTRL-O cause a beep and Visual mode continues. + +When switching to another window on the same buffer, the cursor position in +that window is adjusted, so that the same Visual area is still selected. This +is especially useful to view the start of the Visual area in one window, and +the end in another. You can then use (or when +'mousemodel' is "popup") to drag either end of the Visual area. + +============================================================================== +4. Operating on the Visual area *visual-operators* + +The operators that can be used are: + ~ switch case |v_~| + d delete |v_d| + c change (4) |v_c| + y yank |v_y| + > shift right (4) |v_>| + < shift left (4) |v_<| + ! filter through external command (1) |v_!| + = filter through 'equalprg' option command (1) |v_=| + gq format lines to 'textwidth' length (1) |v_gq| + +The objects that can be used are: + aw a word (with white space) |v_aw| + iw inner word |v_iw| + aW a WORD (with white space) |v_aW| + iW inner WORD |v_iW| + as a sentence (with white space) |v_as| + is inner sentence |v_is| + ap a paragraph (with white space) |v_ap| + ip inner paragraph |v_ip| + ab a () block (with parenthesis) |v_ab| + ib inner () block |v_ib| + aB a {} block (with braces) |v_aB| + iB inner {} block |v_iB| + at a block (with tags) |v_at| + it inner block |v_it| + a< a <> block (with <>) |v_a<| + i< inner <> block |v_i<| + a[ a [] block (with []) |v_a[| + i[ inner [] block |v_i[| + a" a double quoted string (with quotes) |v_aquote| + i" inner double quoted string |v_iquote| + a' a single quoted string (with quotes) |v_a'| + i' inner simple quoted string |v_i'| + a` a string in backticks (with backticks) |v_a`| + i` inner string in backticks |v_i`| + +Additionally the following commands can be used: + : start Ex command for highlighted lines (1) |v_:| + r change (4) |v_r| + s change |v_s| + C change (2)(4) |v_C| + S change (2) |v_S| + R change (2) |v_R| + x delete |v_x| + D delete (3) |v_D| + X delete (2) |v_X| + Y yank (2) |v_Y| + p put |v_p| + J join (1) |v_J| + U make uppercase |v_U| + u make lowercase |v_u| + ^] find tag |v_CTRL-]| + I block insert |v_b_I| + A block append |v_b_A| + +(1): Always whole lines, see |:visual_example|. +(2): Whole lines when not using CTRL-V. +(3): Whole lines when not using CTRL-V, delete until the end of the line when + using CTRL-V. +(4): When using CTRL-V operates on the block only. + +Note that the ":vmap" command can be used to specifically map keys in Visual +mode. For example, if you would like the "/" command not to extend the Visual +area, but instead take the highlighted text and search for that: > + :vmap / y/" +(In the <> notation |<>|, when typing it you should type it literally; you +need to remove the 'B' and '<' flags from 'cpoptions'.) + +If you want to give a register name using the """ command, do this just before +typing the operator character: "v{move-around}"xd". + +If you want to give a count to the command, do this just before typing the +operator character: "v{move-around}3>" (move lines 3 indents to the right). + + *{move-around}* +The {move-around} is any sequence of movement commands. Note the difference +with {motion}, which is only ONE movement command. + +Another way to operate on the Visual area is using the |/\%V| item in a +pattern. For example, to replace all '(' in the Visual area with '#': > + + :'<,'>s/\%V(/#/g + +Note that the "'<,'>" will appear automatically when you press ":" in Visual +mode. + +============================================================================== +5. Blockwise operators *blockwise-operators* + +{not available when compiled without the |+visualextra| feature} + +Reminder: Use 'virtualedit' to be able to select blocks that start or end +after the end of a line or halfway a tab. + +Visual-block Insert *v_b_I* +With a blockwise selection, I{string} will insert {string} at the start +of block on every line of the block, provided that the line extends into the +block. Thus lines that are short will remain unmodified. TABs are split to +retain visual columns. +See |v_b_I_example|. + +Visual-block Append *v_b_A* +With a blockwise selection, A{string} will append {string} to the end of +block on every line of the block. There is some differing behavior where the +block RHS is not straight, due to different line lengths: + +1. Block was created with $ + In this case the string is appended to the end of each line. +2. Block was created with {move-around} + In this case the string is appended to the end of the block on each line, + and whitespace is inserted to pad to the end-of-block column. +See |v_b_A_example|. +Note: "I" and "A" behave differently for lines that don't extend into the +selected block. This was done intentionally, so that you can do it the way +you want. + +Visual-block change *v_b_c* +All selected text in the block will be replaced by the same text string. When +using "c" the selected text is deleted and Insert mode started. You can then +enter text (without a line break). When you hit , the same string is +inserted in all previously selected lines. + +Visual-block Change *v_b_C* +Like using "c", but the selection is extended until the end of the line for +all lines. + + *v_b_<* +Visual-block Shift *v_b_>* +The block is shifted by 'shiftwidth'. The RHS of the block is irrelevant. The +LHS of the block determines the point from which to apply a right shift, and +padding includes TABs optimally according to 'ts' and 'et'. The LHS of the +block determines the point upto which to shift left. +See |v_b_>_example|. +See |v_b_<_example|. + +Visual-block Replace *v_b_r* +Every screen char in the highlighted region is replaced with the same char, ie +TABs are split and the virtual whitespace is replaced, maintaining screen +layout. +See |v_b_r_example|. + + +============================================================================== +6. Repeating *visual-repeat* + +When repeating a Visual mode operator, the operator will be applied to the +same amount of text as the last time: +- Linewise Visual mode: The same number of lines. +- Blockwise Visual mode: The same number of lines and columns. +- Normal Visual mode within one line: The same number of characters. +- Normal Visual mode with several lines: The same number of lines, in the + last line the same number of characters as in the last line the last time. +The start of the text is the Cursor position. If the "$" command was used as +one of the last commands to extend the highlighted text, the repeating will +be applied up to the rightmost column of the longest line. + + +============================================================================== +7. Examples *visual-examples* + + *:visual_example* +Currently the ":" command works on whole lines only. When you select part of +a line, doing something like ":!date" will replace the whole line. If you +want only part of the line to be replaced you will have to make a mapping for +it. In a future release ":" may work on partial lines. + +Here is an example, to replace the selected text with the output of "date": > + :vmap _a `>a`!!datekJJ + +(In the <> notation |<>|, when typing it you should type it literally; you +need to remove the 'B' and '<' flags from 'cpoptions') + +What this does is: + stop Visual mode +`> go to the end of the Visual area +a break the line after the Visual area +`< jump to the start of the Visual area +i break the line before the Visual area +!!date filter the Visual text through date +kJJ Join the lines back together + + *visual-search* +Here is an idea for a mapping that makes it possible to do a search for the +selected text: > + :vmap X y/" + +(In the <> notation |<>|, when typing it you should type it literally; you +need to remove the 'B' and '<' flags from 'cpoptions') + +Note that special characters (like '.' and '*') will cause problems. + +Visual-block Examples *blockwise-examples* +With the following text, I will indicate the commands to produce the block and +the results below. In all cases, the cursor begins on the 'a' in the first +line of the test text. +The following modeline settings are assumed ":ts=8:sw=4:". + +It will be helpful to +:set hls +/ +where is a real TAB. This helps visualise the operations. + +The test text is: + +abcdefghijklmnopqrstuvwxyz +abc defghijklmnopqrstuvwxyz +abcdef ghi jklmnopqrstuvwxyz +abcdefghijklmnopqrstuvwxyz + +1. fo3jISTRING *v_b_I_example* + +abcdefghijklmnSTRINGopqrstuvwxyz +abc STRING defghijklmnopqrstuvwxyz +abcdef ghi STRING jklmnopqrstuvwxyz +abcdefghijklmnSTRINGopqrstuvwxyz + +2. fo3j$ASTRING *v_b_A_example* + +abcdefghijklmnopqrstuvwxyzSTRING +abc defghijklmnopqrstuvwxyzSTRING +abcdef ghi jklmnopqrstuvwxyzSTRING +abcdefghijklmnopqrstuvwxyzSTRING + +3. fo3j3l<.. *v_b_<_example* + +abcdefghijklmnopqrstuvwxyz +abc defghijklmnopqrstuvwxyz +abcdef ghi jklmnopqrstuvwxyz +abcdefghijklmnopqrstuvwxyz + +4. fo3j>.. *v_b_>_example* + +abcdefghijklmn opqrstuvwxyz +abc defghijklmnopqrstuvwxyz +abcdef ghi jklmnopqrstuvwxyz +abcdefghijklmn opqrstuvwxyz + +5. fo5l3jrX *v_b_r_example* + +abcdefghijklmnXXXXXXuvwxyz +abc XXXXXXhijklmnopqrstuvwxyz +abcdef ghi XXXXXX jklmnopqrstuvwxyz +abcdefghijklmnXXXXXXuvwxyz + +============================================================================== +8. Select mode *Select* *Select-mode* + +Select mode looks like Visual mode, but the commands accepted are quite +different. This resembles the selection mode in Microsoft Windows. +When the 'showmode' option is set, "-- SELECT --" is shown in the last line. + +Entering Select mode: +- Using the mouse to select an area, and 'selectmode' contains "mouse". + 'mouse' must also contain a flag for the current mode. +- Using a non-printable movement command, with the Shift key pressed, and + 'selectmode' contains "key". For example: and . 'keymodel' + must also contain "startsel". +- Using "v", "V" or CTRL-V command, and 'selectmode' contains "cmd". +- Using "gh", "gH" or "g_CTRL-H" command in Normal mode. +- From Visual mode, press CTRL-G. *v_CTRL-G* + +Commands in Select mode: +- Printable characters, and cause the selection to be deleted, and + Vim enters Insert mode. The typed character is inserted. +- Non-printable movement commands, with the Shift key pressed, extend the + selection. 'keymodel' must include "startsel". +- Non-printable movement commands, with the Shift key NOT pressed, stop Select + mode. 'keymodel' must include "stopsel". +- ESC stops Select mode. +- CTRL-O switches to Visual mode for the duration of one command. *v_CTRL-O* +- CTRL-G switches to Visual mode. + +Otherwise, typed characters are handled as in Visual mode. + +When using an operator in Select mode, and the selection is linewise, the +selected lines are operated upon, but like in characterwise selection. For +example, when a whole line is deleted, it can later be pasted halfway a line. + + +Mappings and menus in Select mode. *Select-mode-mapping* + +When mappings and menus are defined with the |:vmap| or |:vmenu| command they +work both in Visual mode and in Select mode. When these are used in Select +mode Vim automatically switches to Visual mode, so that the same behavior as +in Visual mode is effective. If you don't want this use |:xmap| or |:smap|. + +Users will expect printable characters to replace the selected area. +Therefore avoid mapping printable characters in Select mode. Or use +|:sunmap| after |:map| and |:vmap| to remove it for Select mode. + +After the mapping or menu finishes, the selection is enabled again and Select +mode entered, unless the selected area was deleted, another buffer became +the current one or the window layout was changed. + +When a character was typed that causes the selection to be deleted and Insert +mode started, Insert mode mappings are applied to this character. This may +cause some confusion, because it means Insert mode mappings apply to a +character typed in Select mode. Language mappings apply as well. + + *gV* *v_gV* +gV Avoid the automatic reselection of the Visual area + after a Select mode mapping or menu has finished. + Put this just before the end of the mapping or menu. + At least it should be after any operations on the + selection. + + *gh* +gh Start Select mode, characterwise. This is like "v", + but starts Select mode instead of Visual mode. + Mnemonic: "get highlighted". + + *gH* +gH Start Select mode, linewise. This is like "V", + but starts Select mode instead of Visual mode. + Mnemonic: "get Highlighted". + + *g_CTRL-H* +g CTRL-H Start Select mode, blockwise. This is like CTRL-V, + but starts Select mode instead of Visual mode. + Mnemonic: "get Highlighted". + + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt new file mode 100644 index 0000000000..4ba28a3c08 --- /dev/null +++ b/runtime/doc/windows.txt @@ -0,0 +1,1203 @@ +*windows.txt* For Vim version 7.4. Last change: 2014 Mar 25 + + + VIM REFERENCE MANUAL by Bram Moolenaar + + +Editing with multiple windows and buffers. *windows* *buffers* + +The commands which have been added to use multiple windows and buffers are +explained here. Additionally, there are explanations for commands that work +differently when used in combination with more than one window. + +The basics are explained in chapter 7 and 8 of the user manual |usr_07.txt| +|usr_08.txt|. + +1. Introduction |windows-intro| +2. Starting Vim |windows-starting| +3. Opening and closing a window |opening-window| +4. Moving cursor to other windows |window-move-cursor| +5. Moving windows around |window-moving| +6. Window resizing |window-resize| +7. Argument and buffer list commands |buffer-list| +8. Do a command in all buffers or windows |list-repeat| +9. Tag or file name under the cursor |window-tag| +10. The preview window |preview-window| +11. Using hidden buffers |buffer-hidden| +12. Special kinds of buffers |special-buffers| + +{Vi does not have any of these commands} +{not able to use multiple windows when the |+windows| feature was disabled at +compile time} +{not able to use vertically split windows when the |+vertsplit| feature was +disabled at compile time} + +============================================================================== +1. Introduction *windows-intro* *window* + +Summary: + A buffer is the in-memory text of a file. + A window is a viewport on a buffer. + A tab page is a collection of windows. + +A window is a viewport onto a buffer. You can use multiple windows on one +buffer, or several windows on different buffers. + +A buffer is a file loaded into memory for editing. The original file remains +unchanged until you write the buffer to the file. + +A buffer can be in one of three states: + + *active-buffer* +active: The buffer is displayed in a window. If there is a file for this + buffer, it has been read into the buffer. The buffer may have been + modified since then and thus be different from the file. + *hidden-buffer* +hidden: The buffer is not displayed. If there is a file for this buffer, it + has been read into the buffer. Otherwise it's the same as an active + buffer, you just can't see it. + *inactive-buffer* +inactive: The buffer is not displayed and does not contain anything. Options + for the buffer are remembered if the file was once loaded. It can + contain marks from the |viminfo| file. But the buffer doesn't + contain text. + +In a table: + +state displayed loaded ":buffers" ~ + in window shows ~ +active yes yes 'a' +hidden no yes 'h' +inactive no no ' ' + +Note: All CTRL-W commands can also be executed with |:wincmd|, for those +places where a Normal mode command can't be used or is inconvenient. + +The main Vim window can hold several split windows. There are also tab pages +|tab-page|, each of which can hold multiple windows. + +============================================================================== +2. Starting Vim *windows-starting* + +By default, Vim starts with one window, just like Vi. + +The "-o" and "-O" arguments to Vim can be used to open a window for each file +in the argument list. The "-o" argument will split the windows horizontally; +the "-O" argument will split the windows vertically. If both "-o" and "-O" +are given, the last one encountered will be used to determine the split +orientation. For example, this will open three windows, split horizontally: > + vim -o file1 file2 file3 + +"-oN", where N is a decimal number, opens N windows split horizontally. If +there are more file names than windows, only N windows are opened and some +files do not get a window. If there are more windows than file names, the +last few windows will be editing empty buffers. Similarly, "-ON" opens N +windows split vertically, with the same restrictions. + +If there are many file names, the windows will become very small. You might +want to set the 'winheight' and/or 'winwidth' options to create a workable +situation. + +Buf/Win Enter/Leave |autocommand|s are not executed when opening the new +windows and reading the files, that's only done when they are really entered. + + *status-line* +A status line will be used to separate windows. The 'laststatus' option tells +when the last window also has a status line: + 'laststatus' = 0 never a status line + 'laststatus' = 1 status line if there is more than one window + 'laststatus' = 2 always a status line + +You can change the contents of the status line with the 'statusline' option. +This option can be local to the window, so that you can have a different +status line in each window. + +Normally, inversion is used to display the status line. This can be changed +with the 's' character in the 'highlight' option. For example, "sb" sets it to +bold characters. If no highlighting is used for the status line ("sn"), the +'^' character is used for the current window, and '=' for other windows. If +the mouse is supported and enabled with the 'mouse' option, a status line can +be dragged to resize windows. + +Note: If you expect your status line to be in reverse video and it isn't, +check if the 'highlight' option contains "si". In version 3.0, this meant to +invert the status line. Now it should be "sr", reverse the status line, as +"si" now stands for italic! If italic is not available on your terminal, the +status line is inverted anyway; you will only see this problem on terminals +that have termcap codes for italics. + +============================================================================== +3. Opening and closing a window *opening-window* *E36* + +CTRL-W s *CTRL-W_s* +CTRL-W S *CTRL-W_S* +CTRL-W CTRL-S *CTRL-W_CTRL-S* +:[N]sp[lit] [++opt] [+cmd] [file] *:sp* *:split* + Split current window in two. The result is two viewports on + the same file. + + Make the new window N high (default is to use half the height + of the current window). Reduces the current window height to + create room (and others, if the 'equalalways' option is set, + 'eadirection' isn't "hor", and one of them is higher than the + current or the new window). + + If [file] is given it will be edited in the new window. If it + is not loaded in any buffer, it will be read. Else the new + window will use the already loaded buffer. + + Note: CTRL-S does not work on all terminals and might block + further input, use CTRL-Q to get going again. + Also see |++opt| and |+cmd|. + +CTRL-W CTRL-V *CTRL-W_CTRL-V* +CTRL-W v *CTRL-W_v* +:[N]vs[plit] [++opt] [+cmd] [file] *:vs* *:vsplit* + Like |:split|, but split vertically. The windows will be + spread out horizontally if + 1. a width was not specified, + 2. 'equalalways' is set, + 3. 'eadirection' isn't "ver", and + 4. one of the other windows is wider than the current or new + window. + Note: In other places CTRL-Q does the same as CTRL-V, but here + it doesn't! + +CTRL-W n *CTRL-W_n* +CTRL-W CTRL_N *CTRL-W_CTRL-N* +:[N]new [++opt] [+cmd] *:new* + Create a new window and start editing an empty file in it. + Make new window N high (default is to use half the existing + height). Reduces the current window height to create room (and + others, if the 'equalalways' option is set and 'eadirection' + isn't "hor"). + Also see |++opt| and |+cmd|. + If 'fileformats' is not empty, the first format given will be + used for the new buffer. If 'fileformats' is empty, the + 'fileformat' of the current buffer is used. This can be + overridden with the |++opt| argument. + Autocommands are executed in this order: + 1. WinLeave for the current window + 2. WinEnter for the new window + 3. BufLeave for the current buffer + 4. BufEnter for the new buffer + This behaves like a ":split" first, and then an ":enew" + command. + +:[N]vne[w] [++opt] [+cmd] [file] *:vne* *:vnew* + Like |:new|, but split vertically. If 'equalalways' is set + and 'eadirection' isn't "ver" the windows will be spread out + horizontally, unless a width was specified. + +:[N]new [++opt] [+cmd] {file} +:[N]sp[lit] [++opt] [+cmd] {file} *:split_f* + Create a new window and start editing file {file} in it. This + behaves like a ":split" first, and then an ":e" command. + If [+cmd] is given, execute the command when the file has been + loaded |+cmd|. + Also see |++opt|. + Make new window N high (default is to use half the existing + height). Reduces the current window height to create room + (and others, if the 'equalalways' option is set). + +:[N]sv[iew] [++opt] [+cmd] {file} *:sv* *:sview* *splitview* + Same as ":split", but set 'readonly' option for this buffer. + +:[N]sf[ind] [++opt] [+cmd] {file} *:sf* *:sfind* *splitfind* + Same as ":split", but search for {file} in 'path' like in + |:find|. Doesn't split if {file} is not found. + +CTRL-W CTRL-^ *CTRL-W_CTRL-^* *CTRL-W_^* +CTRL-W ^ Does ":split #", split window in two and edit alternate file. + When a count is given, it becomes ":split #N", split window + and edit buffer N. + +Note that the 'splitbelow' and 'splitright' options influence where a new +window will appear. + + *:vert* *:vertical* +:vert[ical] {cmd} + Execute {cmd}. If it contains a command that splits a window, + it will be split vertically. + Doesn't work for |:execute| and |:normal|. + +:lefta[bove] {cmd} *:lefta* *:leftabove* +:abo[veleft] {cmd} *:abo* *:aboveleft* + Execute {cmd}. If it contains a command that splits a window, + it will be opened left (vertical split) or above (horizontal + split) the current window. Overrules 'splitbelow' and + 'splitright'. + Doesn't work for |:execute| and |:normal|. + +:rightb[elow] {cmd} *:rightb* *:rightbelow* +:bel[owright] {cmd} *:bel* *:belowright* + Execute {cmd}. If it contains a command that splits a window, + it will be opened right (vertical split) or below (horizontal + split) the current window. Overrules 'splitbelow' and + 'splitright'. + Doesn't work for |:execute| and |:normal|. + + *:topleft* *E442* +:to[pleft] {cmd} + Execute {cmd}. If it contains a command that splits a window, + it will appear at the top and occupy the full width of the Vim + window. When the split is vertical the window appears at the + far left and occupies the full height of the Vim window. + Doesn't work for |:execute| and |:normal|. + + *:botright* +:bo[tright] {cmd} + Execute {cmd}. If it contains a command that splits a window, + it will appear at the bottom and occupy the full width of the + Vim window. When the split is vertical the window appears at + the far right and occupies the full height of the Vim window. + Doesn't work for |:execute| and |:normal|. + +These command modifiers can be combined to make a vertically split window +occupy the full height. Example: > + :vertical topleft split tags +Opens a vertically split, full-height window on the "tags" file at the far +left of the Vim window. + + +Closing a window +---------------- + +CTRL-W q *CTRL-W_q* +CTRL-W CTRL-Q *CTRL-W_CTRL-Q* +:q[uit] Quit current window. When quitting the last window (not + counting a help window), exit Vim. + When 'hidden' is set, and there is only one window for the + current buffer, it becomes hidden. + When 'hidden' is not set, and there is only one window for the + current buffer, and the buffer was changed, the command fails. + (Note: CTRL-Q does not work on all terminals) + +:q[uit]! Quit current window. If this was the last window for a buffer, + any changes to that buffer are lost. When quitting the last + window (not counting help windows), exit Vim. The contents of + the buffer are lost, even when 'hidden' is set. + +CTRL-W c *CTRL-W_c* *:clo* *:close* +:clo[se][!] Close current window. When the 'hidden' option is set, or + when the buffer was changed and the [!] is used, the buffer + becomes hidden (unless there is another window editing it). + When there is only one window in the current tab page and + there is another tab page, this closes the current tab page. + |tab-page|. + This command fails when: *E444* + - There is only one window on the screen. + - When 'hidden' is not set, [!] is not used, the buffer has + changes, and there is no other window on this buffer. + Changes to the buffer are not written and won't get lost, so + this is a "safe" command. + +CTRL-W CTRL-C *CTRL-W_CTRL-C* + You might have expected that CTRL-W CTRL-C closes the current + window, but that does not work, because the CTRL-C cancels the + command. + + *:hide* +:hid[e] Quit current window, unless it is the last window on the + screen. The buffer becomes hidden (unless there is another + window editing it or 'bufhidden' is "unload" or "delete"). + If the window is the last one in the current tab page the tab + page is closed. |tab-page| + The value of 'hidden' is irrelevant for this command. + Changes to the buffer are not written and won't get lost, so + this is a "safe" command. + +:hid[e] {cmd} Execute {cmd} with 'hidden' is set. The previous value of + 'hidden' is restored after {cmd} has been executed. + Example: > + :hide edit Makefile +< This will edit "Makefile", and hide the current buffer if it + has any changes. + +CTRL-W o *CTRL-W_o* *E445* +CTRL-W CTRL-O *CTRL-W_CTRL-O* *:on* *:only* +:on[ly][!] Make the current window the only one on the screen. All other + windows are closed. + When the 'hidden' option is set, all buffers in closed windows + become hidden. + When 'hidden' is not set, and the 'autowrite' option is set, + modified buffers are written. Otherwise, windows that have + buffers that are modified are not removed, unless the [!] is + given, then they become hidden. But modified buffers are + never abandoned, so changes cannot get lost. + +============================================================================== +4. Moving cursor to other windows *window-move-cursor* + +CTRL-W *CTRL-W_* +CTRL-W CTRL-J *CTRL-W_CTRL-J* *CTRL-W_j* +CTRL-W j Move cursor to Nth window below current one. Uses the cursor + position to select between alternatives. + +CTRL-W *CTRL-W_* +CTRL-W CTRL-K *CTRL-W_CTRL-K* *CTRL-W_k* +CTRL-W k Move cursor to Nth window above current one. Uses the cursor + position to select between alternatives. + +CTRL-W *CTRL-W_* +CTRL-W CTRL-H *CTRL-W_CTRL-H* +CTRL-W *CTRL-W_* *CTRL-W_h* +CTRL-W h Move cursor to Nth window left of current one. Uses the + cursor position to select between alternatives. + +CTRL-W *CTRL-W_* +CTRL-W CTRL-L *CTRL-W_CTRL-L* *CTRL-W_l* +CTRL-W l Move cursor to Nth window right of current one. Uses the + cursor position to select between alternatives. + +CTRL-W w *CTRL-W_w* *CTRL-W_CTRL-W* +CTRL-W CTRL-W Without count: move cursor to window below/right of the + current one. If there is no window below or right, go to + top-left window. + With count: go to Nth window (windows are numbered from + top-left to bottom-right). To obtain the window number see + |bufwinnr()| and |winnr()|. When N is larger than the number + of windows go to the last window. + + *CTRL-W_W* +CTRL-W W Without count: move cursor to window above/left of current + one. If there is no window above or left, go to bottom-right + window. With count: go to Nth window, like with CTRL-W w. + +CTRL-W t *CTRL-W_t* *CTRL-W_CTRL-T* +CTRL-W CTRL-T Move cursor to top-left window. + +CTRL-W b *CTRL-W_b* *CTRL-W_CTRL-B* +CTRL-W CTRL-B Move cursor to bottom-right window. + +CTRL-W p *CTRL-W_p* *CTRL-W_CTRL-P* +CTRL-W CTRL-P Go to previous (last accessed) window. + + *CTRL-W_P* *E441* +CTRL-W P Go to preview window. When there is no preview window this is + an error. + {not available when compiled without the |+quickfix| feature} + +If Visual mode is active and the new window is not for the same buffer, the +Visual mode is ended. If the window is on the same buffer, the cursor +position is set to keep the same Visual area selected. + + *:winc* *:wincmd* +These commands can also be executed with ":wincmd": + +:[count]winc[md] {arg} + Like executing CTRL-W [count] {arg}. Example: > + :wincmd j +< Moves to the window below the current one. + This command is useful when a Normal mode cannot be used (for + the |CursorHold| autocommand event). Or when a Normal mode + command is inconvenient. + The count can also be a window number. Example: > + :exe nr . "wincmd w" +< This goes to window "nr". + +============================================================================== +5. Moving windows around *window-moving* + +CTRL-W r *CTRL-W_r* *CTRL-W_CTRL-R* *E443* +CTRL-W CTRL-R Rotate windows downwards/rightwards. The first window becomes + the second one, the second one becomes the third one, etc. + The last window becomes the first window. The cursor remains + in the same window. + This only works within the row or column of windows that the + current window is in. + + *CTRL-W_R* +CTRL-W R Rotate windows upwards/leftwards. The second window becomes + the first one, the third one becomes the second one, etc. The + first window becomes the last window. The cursor remains in + the same window. + This only works within the row or column of windows that the + current window is in. + +CTRL-W x *CTRL-W_x* *CTRL-W_CTRL-X* +CTRL-W CTRL-X Without count: Exchange current window with next one. If there + is no next window, exchange with previous window. + With count: Exchange current window with Nth window (first + window is 1). The cursor is put in the other window. + When vertical and horizontal window splits are mixed, the + exchange is only done in the row or column of windows that the + current window is in. + +The following commands can be used to change the window layout. For example, +when there are two vertically split windows, CTRL-W K will change that in +horizontally split windows. CTRL-W H does it the other way around. + + *CTRL-W_K* +CTRL-W K Move the current window to be at the very top, using the full + width of the screen. This works like closing the current + window and then creating another one with ":topleft split", + except that the current window contents is used for the new + window. + + *CTRL-W_J* +CTRL-W J Move the current window to be at the very bottom, using the + full width of the screen. This works like closing the current + window and then creating another one with ":botright split", + except that the current window contents is used for the new + window. + + *CTRL-W_H* +CTRL-W H Move the current window to be at the far left, using the + full height of the screen. This works like closing the + current window and then creating another one with + ":vert topleft split", except that the current window contents + is used for the new window. + {not available when compiled without the |+vertsplit| feature} + + *CTRL-W_L* +CTRL-W L Move the current window to be at the far right, using the full + height of the screen. This works like closing the + current window and then creating another one with + ":vert botright split", except that the current window + contents is used for the new window. + {not available when compiled without the |+vertsplit| feature} + + *CTRL-W_T* +CTRL-W T Move the current window to a new tab page. This fails if + there is only one window in the current tab page. + When a count is specified the new tab page will be opened + before the tab page with this index. Otherwise it comes after + the current tab page. + +============================================================================== +6. Window resizing *window-resize* + + *CTRL-W_=* +CTRL-W = Make all windows (almost) equally high and wide, but use + 'winheight' and 'winwidth' for the current window. + Windows with 'winfixheight' set keep their height and windows + with 'winfixwidth' set keep their width. + +:res[ize] -N *:res* *:resize* *CTRL-W_-* +CTRL-W - Decrease current window height by N (default 1). + If used after |:vertical|: decrease width by N. + +:res[ize] +N *CTRL-W_+* +CTRL-W + Increase current window height by N (default 1). + If used after |:vertical|: increase width by N. + +:res[ize] [N] +CTRL-W CTRL-_ *CTRL-W_CTRL-_* *CTRL-W__* +CTRL-W _ Set current window height to N (default: highest possible). + +z{nr} Set current window height to {nr}. + + *CTRL-W_<* +CTRL-W < Decrease current window width by N (default 1). + + *CTRL-W_>* +CTRL-W > Increase current window width by N (default 1). + +:vertical res[ize] [N] *:vertical-resize* *CTRL-W_bar* +CTRL-W | Set current window width to N (default: widest possible). + +You can also resize a window by dragging a status line up or down with the +mouse. Or by dragging a vertical separator line left or right. This only +works if the version of Vim that is being used supports the mouse and the +'mouse' option has been set to enable it. + +The option 'winheight' ('wh') is used to set the minimal window height of the +current window. This option is used each time another window becomes the +current window. If the option is '0', it is disabled. Set 'winheight' to a +very large value, e.g., '9999', to make the current window always fill all +available space. Set it to a reasonable value, e.g., '10', to make editing in +the current window comfortable. + +The equivalent 'winwidth' ('wiw') option is used to set the minimal width of +the current window. + +When the option 'equalalways' ('ea') is set, all the windows are automatically +made the same size after splitting or closing a window. If you don't set this +option, splitting a window will reduce the size of the current window and +leave the other windows the same. When closing a window, the extra lines are +given to the window above it. + +The 'eadirection' option limits the direction in which the 'equalalways' +option is applied. The default "both" resizes in both directions. When the +value is "ver" only the heights of windows are equalized. Use this when you +have manually resized a vertically split window and want to keep this width. +Likewise, "hor" causes only the widths of windows to be equalized. + +The option 'cmdheight' ('ch') is used to set the height of the command-line. +If you are annoyed by the |hit-enter| prompt for long messages, set this +option to 2 or 3. + +If there is only one window, resizing that window will also change the command +line height. If there are several windows, resizing the current window will +also change the height of the window below it (and sometimes the window above +it). + +The minimal height and width of a window is set with 'winminheight' and +'winminwidth'. These are hard values, a window will never become smaller. + +============================================================================== +7. Argument and buffer list commands *buffer-list* + + args list buffer list meaning ~ +1. :[N]argument [N] 11. :[N]buffer [N] to arg/buf N +2. :[N]next [file ..] 12. :[N]bnext [N] to Nth next arg/buf +3. :[N]Next [N] 13. :[N]bNext [N] to Nth previous arg/buf +4. :[N]previous [N] 14. :[N]bprevious [N] to Nth previous arg/buf +5. :rewind / :first 15. :brewind / :bfirst to first arg/buf +6. :last 16. :blast to last arg/buf +7. :all 17. :ball edit all args/buffers + 18. :unhide edit all loaded buffers + 19. :[N]bmod [N] to Nth modified buf + + split & args list split & buffer list meaning ~ +21. :[N]sargument [N] 31. :[N]sbuffer [N] split + to arg/buf N +22. :[N]snext [file ..] 32. :[N]sbnext [N] split + to Nth next arg/buf +23. :[N]sNext [N] 33. :[N]sbNext [N] split + to Nth previous arg/buf +24. :[N]sprevious [N] 34. :[N]sbprevious [N] split + to Nth previous arg/buf +25. :srewind / :sfirst 35. :sbrewind / :sbfirst split + to first arg/buf +26. :slast 36. :sblast split + to last arg/buf +27. :sall 37. :sball edit all args/buffers + 38. :sunhide edit all loaded buffers + 39. :[N]sbmod [N] split + to Nth modified buf + +40. :args list of arguments +41. :buffers list of buffers + +The meaning of [N] depends on the command: + [N] is number of buffers to go forward/backward on ?2, ?3, and ?4 + [N] is an argument number, defaulting to current argument, for 1 and 21 + [N] is a buffer number, defaulting to current buffer, for 11 and 31 + [N] is a count for 19 and 39 + +Note: ":next" is an exception, because it must accept a list of file names +for compatibility with Vi. + + +The argument list and multiple windows +-------------------------------------- + +The current position in the argument list can be different for each window. +Remember that when doing ":e file", the position in the argument list stays +the same, but you are not editing the file at that position. To indicate +this, the file message (and the title, if you have one) shows +"(file (N) of M)", where "(N)" is the current position in the file list, and +"M" the number of files in the file list. + +All the entries in the argument list are added to the buffer list. Thus, you +can also get to them with the buffer list commands, like ":bnext". + +:[N]al[l][!] [N] *:al* *:all* *:sal* *:sall* +:[N]sal[l][!] [N] + Rearrange the screen to open one window for each argument. + All other windows are closed. When a count is given, this is + the maximum number of windows to open. + With the |:tab| modifier open a tab page for each argument. + When there are more arguments than 'tabpagemax' further ones + become split windows in the last tab page. + When the 'hidden' option is set, all buffers in closed windows + become hidden. + When 'hidden' is not set, and the 'autowrite' option is set, + modified buffers are written. Otherwise, windows that have + buffers that are modified are not removed, unless the [!] is + given, then they become hidden. But modified buffers are + never abandoned, so changes cannot get lost. + [N] is the maximum number of windows to open. 'winheight' + also limits the number of windows opened ('winwidth' if + |:vertical| was prepended). + Buf/Win Enter/Leave autocommands are not executed for the new + windows here, that's only done when they are really entered. + +:[N]sa[rgument][!] [++opt] [+cmd] [N] *:sa* *:sargument* + Short for ":split | argument [N]": split window and go to Nth + argument. But when there is no such argument, the window is + not split. Also see |++opt| and |+cmd|. + +:[N]sn[ext][!] [++opt] [+cmd] [file ..] *:sn* *:snext* + Short for ":split | [N]next": split window and go to Nth next + argument. But when there is no next file, the window is not + split. Also see |++opt| and |+cmd|. + +:[N]spr[evious][!] [++opt] [+cmd] [N] *:spr* *:sprevious* +:[N]sN[ext][!] [++opt] [+cmd] [N] *:sN* *:sNext* + Short for ":split | [N]Next": split window and go to Nth + previous argument. But when there is no previous file, the + window is not split. Also see |++opt| and |+cmd|. + + *:sre* *:srewind* +:sre[wind][!] [++opt] [+cmd] + Short for ":split | rewind": split window and go to first + argument. But when there is no argument list, the window is + not split. Also see |++opt| and |+cmd|. + + *:sfir* *:sfirst* +:sfir[st] [++opt] [+cmd] + Same as ":srewind". + + *:sla* *:slast* +:sla[st][!] [++opt] [+cmd] + Short for ":split | last": split window and go to last + argument. But when there is no argument list, the window is + not split. Also see |++opt| and |+cmd|. + + *:dr* *:drop* +:dr[op] [++opt] [+cmd] {file} .. + Edit the first {file} in a window. + - If the file is already open in a window change to that + window. + - If the file is not open in a window edit the file in the + current window. If the current buffer can't be |abandon|ed, + the window is split first. + The |argument-list| is set, like with the |:next| command. + The purpose of this command is that it can be used from a + program that wants Vim to edit another file, e.g., a debugger. + When using the |:tab| modifier each argument is opened in a + tab page. The last window is used if it's empty. + Also see |++opt| and |+cmd|. + {only available when compiled with a GUI} + +============================================================================== +8. Do a command in all buffers or windows *list-repeat* + + *:windo* +:windo {cmd} Execute {cmd} in each window. + It works like doing this: > + CTRL-W t + :{cmd} + CTRL-W w + :{cmd} + etc. +< This only operates in the current tab page. + When an error is detected on one window, further + windows will not be visited. + The last window (or where an error occurred) becomes + the current window. + {cmd} can contain '|' to concatenate several commands. + {cmd} must not open or close windows or reorder them. + {not in Vi} {not available when compiled without the + |+listcmds| feature} + Also see |:tabdo|, |:argdo| and |:bufdo|. + + *:bufdo* +:bufdo[!] {cmd} Execute {cmd} in each buffer in the buffer list. + It works like doing this: > + :bfirst + :{cmd} + :bnext + :{cmd} + etc. +< When the current file can't be |abandon|ed and the [!] + is not present, the command fails. + When an error is detected on one buffer, further + buffers will not be visited. + Unlisted buffers are skipped. + The last buffer (or where an error occurred) becomes + the current buffer. + {cmd} can contain '|' to concatenate several commands. + {cmd} must not delete buffers or add buffers to the + buffer list. + Note: While this command is executing, the Syntax + autocommand event is disabled by adding it to + 'eventignore'. This considerably speeds up editing + each buffer. + {not in Vi} {not available when compiled without the + |+listcmds| feature} + Also see |:tabdo|, |:argdo| and |:windo|. + +Examples: > + + :windo set nolist nofoldcolumn | normal zn + +This resets the 'list' option and disables folding in all windows. > + + :bufdo set fileencoding= | update + +This resets the 'fileencoding' in each buffer and writes it if this changed +the buffer. The result is that all buffers will use the 'encoding' encoding +(if conversion works properly). + +============================================================================== +9. Tag or file name under the cursor *window-tag* + + *:sta* *:stag* +:sta[g][!] [tagname] + Does ":tag[!] [tagname]" and splits the window for the found + tag. See also |:tag|. + +CTRL-W ] *CTRL-W_]* *CTRL-W_CTRL-]* +CTRL-W CTRL-] Split current window in two. Use identifier under cursor as a + tag and jump to it in the new upper window. Make new window N + high. + + *CTRL-W_g]* +CTRL-W g ] Split current window in two. Use identifier under cursor as a + tag and perform ":tselect" on it in the new upper window. + Make new window N high. + + *CTRL-W_g_CTRL-]* +CTRL-W g CTRL-] Split current window in two. Use identifier under cursor as a + tag and perform ":tjump" on it in the new upper window. Make + new window N high. + +CTRL-W f *CTRL-W_f* *CTRL-W_CTRL-F* +CTRL-W CTRL-F Split current window in two. Edit file name under cursor. + Like ":split gf", but window isn't split if the file does not + exist. + Uses the 'path' variable as a list of directory names where to + look for the file. Also the path for current file is + used to search for the file name. + If the name is a hypertext link that looks like + "type://machine/path", only "/path" is used. + If a count is given, the count'th matching file is edited. + {not available when the |+file_in_path| feature was disabled + at compile time} + +CTRL-W F *CTRL-W_F* + Split current window in two. Edit file name under cursor and + jump to the line number following the file name. See |gF| for + details on how the line number is obtained. + {not available when the |+file_in_path| feature was disabled + at compile time} + +CTRL-W gf *CTRL-W_gf* + Open a new tab page and edit the file name under the cursor. + Like "tab split" and "gf", but the new tab page isn't created + if the file does not exist. + {not available when the |+file_in_path| feature was disabled + at compile time} + +CTRL-W gF *CTRL-W_gF* + Open a new tab page and edit the file name under the cursor + and jump to the line number following the file name. Like + "tab split" and "gF", but the new tab page isn't created if + the file does not exist. + {not available when the |+file_in_path| feature was disabled + at compile time} + +Also see |CTRL-W_CTRL-I|: open window for an included file that includes +the keyword under the cursor. + +============================================================================== +10. The preview window *preview-window* + +The preview window is a special window to show (preview) another file. It is +normally a small window used to show an include file or definition of a +function. +{not available when compiled without the |+quickfix| feature} + +There can be only one preview window (per tab page). It is created with one +of the commands below. The 'previewheight' option can be set to specify the +height of the preview window when it's opened. The 'previewwindow' option is +set in the preview window to be able to recognize it. The 'winfixheight' +option is set to have it keep the same height when opening/closing other +windows. + + *:pta* *:ptag* +:pta[g][!] [tagname] + Does ":tag[!] [tagname]" and shows the found tag in a + "Preview" window without changing the current buffer or cursor + position. If a "Preview" window already exists, it is re-used + (like a help window is). If a new one is opened, + 'previewheight' is used for the height of the window. See + also |:tag|. + See below for an example. |CursorHold-example| + Small difference from |:tag|: When [tagname] is equal to the + already displayed tag, the position in the matching tag list + is not reset. This makes the CursorHold example work after a + |:ptnext|. + +CTRL-W z *CTRL-W_z* +CTRL-W CTRL-Z *CTRL-W_CTRL-Z* *:pc* *:pclose* +:pc[lose][!] Close any "Preview" window currently open. When the 'hidden' + option is set, or when the buffer was changed and the [!] is + used, the buffer becomes hidden (unless there is another + window editing it). The command fails if any "Preview" buffer + cannot be closed. See also |:close|. + + *:pp* *:ppop* +:[count]pp[op][!] + Does ":[count]pop[!]" in the preview window. See |:pop| and + |:ptag|. {not in Vi} + +CTRL-W } *CTRL-W_}* + Use identifier under cursor as a tag and perform a :ptag on + it. Make the new Preview window (if required) N high. If N is + not given, 'previewheight' is used. + +CTRL-W g } *CTRL-W_g}* + Use identifier under cursor as a tag and perform a :ptjump on + it. Make the new Preview window (if required) N high. If N is + not given, 'previewheight' is used. + + *:ped* *:pedit* +:ped[it][!] [++opt] [+cmd] {file} + Edit {file} in the preview window. The preview window is + opened like with |:ptag|. The current window and cursor + position isn't changed. Useful example: > + :pedit +/fputc /usr/include/stdio.h +< + *:ps* *:psearch* +:[range]ps[earch][!] [count] [/]pattern[/] + Works like |:ijump| but shows the found match in the preview + window. The preview window is opened like with |:ptag|. The + current window and cursor position isn't changed. Useful + example: > + :psearch popen +< Like with the |:ptag| command, you can use this to + automatically show information about the word under the + cursor. This is less clever than using |:ptag|, but you don't + need a tags file and it will also find matches in system + include files. Example: > + :au! CursorHold *.[ch] nested exe "silent! psearch " . expand("") +< Warning: This can be slow. + +Example *CursorHold-example* > + + :au! CursorHold *.[ch] nested exe "silent! ptag " . expand("") + +This will cause a ":ptag" to be executed for the keyword under the cursor, +when the cursor hasn't moved for the time set with 'updatetime'. The "nested" +makes other autocommands be executed, so that syntax highlighting works in the +preview window. The "silent!" avoids an error message when the tag could not +be found. Also see |CursorHold|. To disable this again: > + + :au! CursorHold + +A nice addition is to highlight the found tag, avoid the ":ptag" when there +is no word under the cursor, and a few other things: > + + :au! CursorHold *.[ch] nested call PreviewWord() + :func PreviewWord() + : if &previewwindow " don't do this in the preview window + : return + : endif + : let w = expand("") " get the word under cursor + : if w =~ '\a' " if the word contains a letter + : + : " Delete any existing highlight before showing another tag + : silent! wincmd P " jump to preview window + : if &previewwindow " if we really get there... + : match none " delete existing highlight + : wincmd p " back to old window + : endif + : + : " Try displaying a matching tag for the word under the cursor + : try + : exe "ptag " . w + : catch + : return + : endtry + : + : silent! wincmd P " jump to preview window + : if &previewwindow " if we really get there... + : if has("folding") + : silent! .foldopen " don't want a closed fold + : endif + : call search("$", "b") " to end of previous line + : let w = substitute(w, '\\', '\\\\', "") + : call search('\<\V' . w . '\>') " position cursor on match + : " Add a match highlight to the word at this position + : hi previewWord term=bold ctermbg=green guibg=green + : exe 'match previewWord "\%' . line(".") . 'l\%' . col(".") . 'c\k*"' + : wincmd p " back to old window + : endif + : endif + :endfun + +============================================================================== +11. Using hidden buffers *buffer-hidden* + +A hidden buffer is not displayed in a window, but is still loaded into memory. +This makes it possible to jump from file to file, without the need to read or +write the file every time you get another buffer in a window. +{not available when compiled without the |+listcmds| feature} + + *:buffer-!* +If the option 'hidden' ('hid') is set, abandoned buffers are kept for all +commands that start editing another file: ":edit", ":next", ":tag", etc. The +commands that move through the buffer list sometimes make the current buffer +hidden although the 'hidden' option is not set. This happens when a buffer is +modified, but is forced (with '!') to be removed from a window, and +'autowrite' is off or the buffer can't be written. + +You can make a hidden buffer not hidden by starting to edit it with any +command. Or by deleting it with the ":bdelete" command. + +The 'hidden' is global, it is used for all buffers. The 'bufhidden' option +can be used to make an exception for a specific buffer. It can take these +values: + Use the value of 'hidden'. + hide Hide this buffer, also when 'hidden' is not set. + unload Don't hide but unload this buffer, also when 'hidden' + is set. + delete Delete the buffer. + + *hidden-quit* +When you try to quit Vim while there is a hidden, modified buffer, you will +get an error message and Vim will make that buffer the current buffer. You +can then decide to write this buffer (":wq") or quit without writing (":q!"). +Be careful: there may be more hidden, modified buffers! + +A buffer can also be unlisted. This means it exists, but it is not in the +list of buffers. |unlisted-buffer| + + +:files[!] *:files* +:buffers[!] *:buffers* *:ls* +:ls[!] Show all buffers. Example: + + 1 #h "/test/text" line 1 ~ + 2u "asdf" line 0 ~ + 3 %a + "version.c" line 1 ~ + + When the [!] is included the list will show unlisted buffers + (the term "unlisted" is a bit confusing then...). + + Each buffer has a unique number. That number will not change, + so you can always go to a specific buffer with ":buffer N" or + "N CTRL-^", where N is the buffer number. + + Indicators (chars in the same column are mutually exclusive): + u an unlisted buffer (only displayed when [!] is used) + |unlisted-buffer| + % the buffer in the current window + # the alternate buffer for ":e #" and CTRL-^ + a an active buffer: it is loaded and visible + h a hidden buffer: It is loaded, but currently not + displayed in a window |hidden-buffer| + - a buffer with 'modifiable' off + = a readonly buffer + + a modified buffer + x a buffer with read errors + + *:bad* *:badd* +:bad[d] [+lnum] {fname} + Add file name {fname} to the buffer list, without loading it. + If "lnum" is specified, the cursor will be positioned at that + line when the buffer is first entered. Note that other + commands after the + will be ignored. + +:[N]bd[elete][!] *:bd* *:bdel* *:bdelete* *E516* +:bd[elete][!] [N] + Unload buffer [N] (default: current buffer) and delete it from + the buffer list. If the buffer was changed, this fails, + unless when [!] is specified, in which case changes are lost. + The file remains unaffected. Any windows for this buffer are + closed. If buffer [N] is the current buffer, another buffer + will be displayed instead. This is the most recent entry in + the jump list that points into a loaded buffer. + Actually, the buffer isn't completely deleted, it is removed + from the buffer list |unlisted-buffer| and option values, + variables and mappings/abbreviations for the buffer are + cleared. + +:bdelete[!] {bufname} *E93* *E94* + Like ":bdelete[!] [N]", but buffer given by name. Note that a + buffer whose name is a number cannot be referenced by that + name; use the buffer number instead. Insert a backslash + before a space in a buffer name. + +:bdelete[!] N1 N2 ... + Do ":bdelete[!]" for buffer N1, N2, etc. The arguments can be + buffer numbers or buffer names (but not buffer names that are + a number). Insert a backslash before a space in a buffer + name. + +:N,Mbdelete[!] Do ":bdelete[!]" for all buffers in the range N to M + |inclusive|. + +:[N]bw[ipeout][!] *:bw* *:bwipe* *:bwipeout* *E517* +:bw[ipeout][!] {bufname} +:N,Mbw[ipeout][!] +:bw[ipeout][!] N1 N2 ... + Like |:bdelete|, but really delete the buffer. Everything + related to the buffer is lost. All marks in this buffer + become invalid, option settings are lost, etc. Don't use this + unless you know what you are doing. + +:[N]bun[load][!] *:bun* *:bunload* *E515* +:bun[load][!] [N] + Unload buffer [N] (default: current buffer). The memory + allocated for this buffer will be freed. The buffer remains + in the buffer list. + If the buffer was changed, this fails, unless when [!] is + specified, in which case the changes are lost. + Any windows for this buffer are closed. If buffer [N] is the + current buffer, another buffer will be displayed instead. + This is the most recent entry in the jump list that points + into a loaded buffer. + +:bunload[!] {bufname} + Like ":bunload[!] [N]", but buffer given by name. Note that a + buffer whose name is a number cannot be referenced by that + name; use the buffer number instead. Insert a backslash + before a space in a buffer name. + +:N,Mbunload[!] Do ":bunload[!]" for all buffers in the range N to M + |inclusive|. + +:bunload[!] N1 N2 ... + Do ":bunload[!]" for buffer N1, N2, etc. The arguments can be + buffer numbers or buffer names (but not buffer names that are + a number). Insert a backslash before a space in a buffer + name. + +:[N]b[uffer][!] [N] *:b* *:bu* *:buf* *:buffer* *E86* + Edit buffer [N] from the buffer list. If [N] is not given, + the current buffer remains being edited. See |:buffer-!| for + [!]. This will also edit a buffer that is not in the buffer + list, without setting the 'buflisted' flag. + +:[N]b[uffer][!] {bufname} + Edit buffer for {bufname} from the buffer list. See + |:buffer-!| for [!]. This will also edit a buffer that is not + in the buffer list, without setting the 'buflisted' flag. + +:[N]sb[uffer] [N] *:sb* *:sbuffer* + Split window and edit buffer [N] from the buffer list. If [N] + is not given, the current buffer is edited. Respects the + "useopen" setting of 'switchbuf' when splitting. This will + also edit a buffer that is not in the buffer list, without + setting the 'buflisted' flag. + +:[N]sb[uffer] {bufname} + Split window and edit buffer for {bufname} from the buffer + list. This will also edit a buffer that is not in the buffer + list, without setting the 'buflisted' flag. + Note: If what you want to do is split the buffer, make a copy + under another name, you can do it this way: > + :w foobar | sp # + +:[N]bn[ext][!] [N] *:bn* *:bnext* *E87* + Go to [N]th next buffer in buffer list. [N] defaults to one. + Wraps around the end of the buffer list. + See |:buffer-!| for [!]. + If you are in a help buffer, this takes you to the next help + buffer (if there is one). Similarly, if you are in a normal + (non-help) buffer, this takes you to the next normal buffer. + This is so that if you have invoked help, it doesn't get in + the way when you're browsing code/text buffers. The next three + commands also work like this. + + *:sbn* *:sbnext* +:[N]sbn[ext] [N] + Split window and go to [N]th next buffer in buffer list. + Wraps around the end of the buffer list. Uses 'switchbuf' + +:[N]bN[ext][!] [N] *:bN* *:bNext* *:bp* *:bprevious* *E88* +:[N]bp[revious][!] [N] + Go to [N]th previous buffer in buffer list. [N] defaults to + one. Wraps around the start of the buffer list. + See |:buffer-!| for [!] and 'switchbuf'. + +:[N]sbN[ext] [N] *:sbN* *:sbNext* *:sbp* *:sbprevious* +:[N]sbp[revious] [N] + Split window and go to [N]th previous buffer in buffer list. + Wraps around the start of the buffer list. + Uses 'switchbuf'. + + *:br* *:brewind* +:br[ewind][!] Go to first buffer in buffer list. If the buffer list is + empty, go to the first unlisted buffer. + See |:buffer-!| for [!]. + + *:bf* *:bfirst* +:bf[irst] Same as ":brewind". + + *:sbr* *:sbrewind* +:sbr[ewind] Split window and go to first buffer in buffer list. If the + buffer list is empty, go to the first unlisted buffer. + Respects the 'switchbuf' option. + + *:sbf* *:sbfirst* +:sbf[irst] Same as ":sbrewind". + + *:bl* *:blast* +:bl[ast][!] Go to last buffer in buffer list. If the buffer list is + empty, go to the last unlisted buffer. + See |:buffer-!| for [!]. + + *:sbl* *:sblast* +:sbl[ast] Split window and go to last buffer in buffer list. If the + buffer list is empty, go to the last unlisted buffer. + Respects 'switchbuf' option. + +:[N]bm[odified][!] [N] *:bm* *:bmodified* *E84* + Go to [N]th next modified buffer. Note: this command also + finds unlisted buffers. If there is no modified buffer the + command fails. + +:[N]sbm[odified] [N] *:sbm* *:sbmodified* + Split window and go to [N]th next modified buffer. + Respects 'switchbuf' option. + Note: this command also finds buffers not in the buffer list. + +:[N]unh[ide] [N] *:unh* *:unhide* *:sun* *:sunhide* +:[N]sun[hide] [N] + Rearrange the screen to open one window for each loaded buffer + in the buffer list. When a count is given, this is the + maximum number of windows to open. + +:[N]ba[ll] [N] *:ba* *:ball* *:sba* *:sball* +:[N]sba[ll] [N] Rearrange the screen to open one window for each buffer in + the buffer list. When a count is given, this is the maximum + number of windows to open. 'winheight' also limits the number + of windows opened ('winwidth' if |:vertical| was prepended). + Buf/Win Enter/Leave autocommands are not executed for the new + windows here, that's only done when they are really entered. + When the |:tab| modifier is used new windows are opened in a + new tab, up to 'tabpagemax'. + +Note: All the commands above that start editing another buffer, keep the +'readonly' flag as it was. This differs from the ":edit" command, which sets +the 'readonly' flag each time the file is read. + +============================================================================== +12. Special kinds of buffers *special-buffers* + +Instead of containing the text of a file, buffers can also be used for other +purposes. A few options can be set to change the behavior of a buffer: + 'bufhidden' what happens when the buffer is no longer displayed + in a window. + 'buftype' what kind of a buffer this is + 'swapfile' whether the buffer will have a swap file + 'buflisted' buffer shows up in the buffer list + +A few useful kinds of a buffer: + +quickfix Used to contain the error list or the location list. See + |:cwindow| and |:lwindow|. This command sets the 'buftype' + option to "quickfix". You are not supposed to change this! + 'swapfile' is off. + +help Contains a help file. Will only be created with the |:help| + command. The flag that indicates a help buffer is internal + and can't be changed. The 'buflisted' option will be reset + for a help buffer. + +directory Displays directory contents. Can be used by a file explorer + plugin. The buffer is created with these settings: > + :setlocal buftype=nowrite + :setlocal bufhidden=delete + :setlocal noswapfile +< The buffer name is the name of the directory and is adjusted + when using the |:cd| command. + +scratch Contains text that can be discarded at any time. It is kept + when closing the window, it must be deleted explicitly. + Settings: > + :setlocal buftype=nofile + :setlocal bufhidden=hide + :setlocal noswapfile +< The buffer name can be used to identify the buffer, if you + give it a meaningful name. + + *unlisted-buffer* +unlisted The buffer is not in the buffer list. It is not used for + normal editing, but to show a help file, remember a file name + or marks. The ":bdelete" command will also set this option, + thus it doesn't completely delete the buffer. Settings: > + :setlocal nobuflisted +< + + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/workshop.txt b/runtime/doc/workshop.txt new file mode 100644 index 0000000000..5514f9ebb7 --- /dev/null +++ b/runtime/doc/workshop.txt @@ -0,0 +1,98 @@ +*workshop.txt* For Vim version 7.4. Last change: 2013 Jul 06 + + + VIM REFERENCE MANUAL by Gordon Prieur + + +Sun Visual WorkShop Features *workshop* *workshop-support* + +1. Introduction |workshop-intro| +2. Commands |workshop-commands| +3. Compiling vim/gvim for WorkShop |workshop-compiling| +4. Configuring gvim for a WorkShop release tree |workshop-configure| +5. Obtaining the latest version of the XPM library |workshop-xpm| + +{Vi does not have any of these features} +{only available when compiled with the |+sun_workshop| feature} + +============================================================================== +1. Introduction *workshop-intro* + +Sun Visual WorkShop has an "Editor of Choice" feature designed to let users +debug using their favorite editors. For the 6.0 release we have added support +for gvim. A workshop debug session will have a debugging window and an editor +window (possibly others as well). The user can do many debugging operations +from the editor window, minimizing the need to switch from window to window. + +The version of vim shipped with Sun Visual WorkShop 6 (also called Forte +Developer 6) is vim 5.3. The features in this release are much more reliable +than the vim/gvim shipped with Visual WorkShop. VWS users wishing to use vim +as their editor should compile these sources and install them in their +workshop release tree. + +============================================================================== +2. Commands *workshop-commands* + + *:ws* *:wsverb* +:ws[verb] verb Pass the verb to the verb executor + +Pass the verb to a workshop function which gathers some arguments and +sends the verb and data to workshop over an IPC connection. + +============================================================================== +3. Compiling vim/gvim for WorkShop *workshop-compiling* + +Compiling vim with FEAT_SUN_WORKSHOP turns on all compile time flags necessary +for building a vim to work with Visual WorkShop. The features required for VWS +have been built and tested using the Sun compilers from the VWS release. They +have not been built or tested using Gnu compilers. This does not mean the +features won't build and run if compiled with gcc, just that nothing is +guaranteed with gcc! + +============================================================================== +4. Configuring gvim for a WorkShop release tree *workshop-configure* + +There are several assumptions which must be met in order to compile a gvim for +use with Sun Visual WorkShop 6. + + o You should use the compiler in VWS rather than gcc. We have neither + built nor tested with gcc and cannot guarantee it will build properly. + + o You must supply your own XPM library. See |workshop-xpm| below for + details on obtaining the latest version of XPM. + + o Edit the Makefile in the src directory and uncomment the lines for Sun + Visual WorkShop. You can easily find these by searching for the string + FEAT_SUN_WORKSHOP + + o We also suggest you use Motif for your gui. This will provide gvim with + the same look-and-feel as the rest of Sun Visual WorkShop. + +The following configuration line can be used to configure vim to build for use +with Sun Visual WorkShop: + + $ CC=cc configure --enable-workshop --enable-gui=motif \ + -prefix=/contrib/contrib6/ + +The VWS-install-dir should be the base directory where your Sun Visual WorkShop +was installed. By default this is /opt/SUNWspro. It will normally require +root permissions to install the vim release. You will also need to change the +symlink /bin/gvim to point to the vim in your newly installed +directory. The should be a unique version string. I use "vim" +concatenated with the equivalent of version.h's VIM_VERSION_SHORT. + +============================================================================== +5. Obtaining the latest version of the XPM library *workshop-xpm* + +The XPM library is required to show images within Vim with Motif or Athena. +Without it the toolbar and signs will be disabled. + +The XPM library is provided by Arnaud Le Hors of the French National Institute +for Research in Computer Science and Control. It can be downloaded from +http://cgit.freedesktop.org/xorg/lib/libXpm. The current release, as of this +writing, is xpm-3.4k-solaris.tgz, which is a gzip'ed tar file. If you create +the directory /usr/local/xpm and untar the file there you can use the +uncommented lines in the Makefile without changing them. If you use another +xpm directory you will need to change the XPM_DIR in src/Makefile. + + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/xxd-fr.1 b/runtime/doc/xxd-fr.1 new file mode 100644 index 0000000000..be780858bf --- /dev/null +++ b/runtime/doc/xxd-fr.1 @@ -0,0 +1,396 @@ +.TH XXD 1 "août 1996" "Page de manuel pour xxd" +.\" +.\" 21st May 1996 +.\" Man page author: +.\" Tony Nugent +.\" Changes by Bram Moolenaar +.\" French translation by David Blanchet 2005-03 +.SH NOM +.I xxd +\- convertit en représentation hexadécimale et inversement. +.SH SYNOPSIS +.B xxd +\-h[elp] +.br +.B xxd +[options] [fichier_entree [fichier_sortie]] +.br +.B xxd +\-r[evert] [options] [fichier_entree [fichier_sortie]] +.SH DESCRIPTION +.I xxd +crée un fichier contenant la représentation hexadécimale d'un fichier +binaire ou de l'entrée standard. +Il peut également convertir un fichier de codes hexadécimaux en un fichier +binaire. +Comme +.BR uuencode (1) +et +.BR uudecode (1) +il permet la transmission de données binaires dans une représentation ASCII +compatible avec le courrier électronique, mais a l'avantage de décoder la +sortie standard. +De plus, il peut être utilisé pour appliquer des rustines à des fichiers +binaires. +.SH OPTIONS +Si aucun +.I fichier_entree +n'est spécifié, l'entrée standard est utilisée. +Si +.I fichier_entree +correspond au caractère +.RB '\-' +\, l'entrée standard est employée comme source des données en entrée. +Si aucun +.I fichier_sortie +n'est spécifié (ou qu'un caractère +.RB '\-' +est donné à sa place), le résultat est envoyé sur la sortie standard. +.PP +NOTE : un analyseur paresseux est utilisé. Il ne vérifie pas au-delà de la +première lettre de l'option, à moins que cette dernière ne requiert un +paramètre. +L'espace entre l'option et son paramètre est optionnel. +Les paramètres des options peuvent être spécifiés en notation décimale, +hexadécimale ou octale. +Ainsi +.BR \-c8 , +.BR "\-c 8" , +.B \-c 010 +et +.B \-cols 8 +sont tous équivalents. +.TP +.IR \-a " | " \-autoskip +active la fonctionnalité "autoskip" : le caractère '*' remplace les lignes +d'octets nuls. Désactivée par défaut. +.TP +.IR \-b " | " \-bits +Convertit en binaires plutôt qu'en hexadécimal. +Cette option écrit les octets comme une séquence de "1" et de "0" au lieu +d'une conversion en hexadécimal traditionnel. Chaque ligne est précédée par un +numéro de ligne en hexadécimal et suivie de la représentation ASCII (ou +EBCDIC) correspondante. Les options \-r, \-p, \-i ne fonctionnent pas dans ce +mode. +.TP +.IR "\-c cols " | " \-cols cols" +place +.RI < cols > +octets par ligne. 16 par défaut (\-i : 12, \-ps : 30, \-b : 6). Maximum 256. +.TP +.IR \-E " | " \-EBCDIC +Passe le codage des caractères de la colonne de droite de ASCII à EBCDIC. +Cela ne change pas la représentation hexadécimale. Cette option est sans effet +quand elle est utilisée avec \-r, \-p or \-i. +.TP +.IR "\-g octets " | " \-groupsize octets" +Regroupe les octets (deux chiffres hexadécimaux ou huit chiffres binaires) +par groupe de +.RI < octets > +\, séparés par des espaces blancs. Spécifiez +.I \-g 0 +pour supprimer le regroupement. +.RI < octets > +vaut 2 par défaut dans le mode normal et \fI1\fP en +représentation binaire. Le regroupement ne s'applique pas aux styles +Postscript et Include. +.TP +.IR \-h " | " \-help +Affiche un résumé des commandes disponibles et quitte. Aucune conversion n'est +effectuée. +.TP +.IR \-i " | " \-include +produit une sortie dans le style #include (fichier C à inclure). La définition +complète d'un tableau statique est écrite et est nommée d'après le fichier +d'origine, à moins que xxd lise depuis l'entrée standard. +.TP +.IR "\-l long " | " \-len long" +Arrête après l'écriture de +.RI < long > +octets. +.TP +.IR \-p " | " \-ps " | " \-postscript " | " \-plain +Produit une conversion continue dans le style Postscript (postscript continuous +hexdumd style). +Également connu sous le nom de « conversion brute » (plain hexdump style). +.TP +.IR \-r " | " \-revert +Opération inverse : convertit un fichier hexadécimal en un fichier binaire (ou +applique une rustine à un fichier binaire). +Si l'écriture n'a pas lieu sur la sortie standard, xxd écrit dans le fichier +qu'il produit sans le tronquer. Utilisez la combinaison +.I \-r \-p +pour lire de l'hexadécimal brut sans information sur le numéro des lignes et +sans format de colonnes particulier. Des espaces blancs et coupures de lignes +supplémentaires sont autorisés à n'importe quel endroit. +.TP +.I \-seek décalage +Utilisé après l'option +.IR \-r : +inverse la conversion en ajoutant +.RI < décalage > +aux positions dans le fichier données dans le code hexadécimal. +.TP +.I \-s [+][\-]décalage +Débute au +.RI < décalage > +absolu ou relatif dans fichier_entree. +\fI+ \fRindique que le décalage est relatif à la position courante dans +l'entrée standard (sans effet si la lecture n'a pas lieu sur l'entrée +standard). \fI\- \fRindique un décalage en caractères depuis la fin de +l'entrée (utilisé avec \fI+\fR, désigne la position avant la position +actuelle de l'entrée standard). +Sans l'option \-s, xxd démarre à la position courante du fichier. +.TP +.I \-u +Utilise des chiffres hexadécimaux majuscules. La casse par défaut est +minuscule. +.TP +.IR \-v " | " \-version +Affiche la version de xxd. +.SH MISE EN GARDE +.I xxd \-r +effectue des opérations internes un peu obscures lors de l'évaluation +des informations sur les numéros de lignes. Si le fichier de sortie est +adressable, alors les numéros de lignes au début de chaque ligne d'hexadécimal +peuvent être désordonnées, des lignes peuvent manquer ou se chevaucher. Dans +ces cas, xxd utilisera lseek(2) pour déterminer la prochaine position. Si le +fichier n'est pas adressable, seuls les vides sont autorisés, et ils seront +comblés par des octets nuls. +.PP +.I xxd \-r +ne génère aucune erreur lors de l'analyse. Les problèmes sont passés +silencieusement. +.PP +Lors de l'édition de la représentation hexadécimale, veuillez noter que +.I xxd \-r +ignore tout ce qui se trouve sur la ligne après avoir lu suffisamment de +données hexadécimales (voir l'option \-c). Cela signifie également que les +modifications dans la colonne ASCII (ou EBCDIC) sont toujours ignorées. La +conversion inverse de données hexadécimales brutes (postscript) avec xxd \-r +\-p ne dépend pas d'un nombre correct de colonnes. Dans ce cas, tout ce qui +ressemble à une paire de chiffres hexadécimaux est interprété. +.PP +Remarquez la différence entre +.br +\fI% xxd \-i fichier\fR +.br +et +.br +\fI% xxd \-i < fichier\fR +.PP +.I xxd \-s \+seek +peut différer de +.IR "xxd \-s seek" , +car lseek(2) est utilisé pour « revenir en arrière ». Le '+' fait une +différence quand la source des données est l'entrée standard et si la position +dans le fichier de l'entrée standard n'est pas au début du fichier lorsque xxd +est démarré et qu'il reçoit ses données. +L'exemple suivant peut vous aider à comprendre (ou bien vous perdre davantage +encore !)... +.PP +Remettre l'entrée standard au départ avant de lire ; nécessaire car 'cat' a +déjà lu jusqu'à la fin de l'entrée standard. +.br +\fI% sh \-c 'cat > donnees_binaires; xxd \-s 0 > donnees_hexa' < fichier\fR +.PP +Convertir à partir de la position 0x480 (= 1024 + 128) du fichier. +Le symbole '+' signifie "relativement à la position actuelle', ainsi 128 est +ajouté aux 1024 octets comptabilisés pour dd. +.br +\fI% sh \-c 'dd of=donnees_binaires bs=1k count=1; xxd \-s +128 > +donnees_hexa' < fichier\fR +.PP +Convertir de fichier depuis la position 0x100 (= 1024 \- 768) du fichier. +.br +\fI% sh \-c 'dd of=donnees_binaires bs=1k count=1; xxd \-s +\-768 > +donnees_hexa' < fichier\fR +.PP +Toutefois, cette situation est peu fréquente et l'utilisation de '+' est +rarement requise. L'auteur préfère surveiller les effets de xxd avec strace(1) +ou truss(1) quand \-s est employé. +.SH EXEMPLES +Afficher la totalité du +.B fichier +sauf les trois premières lignes (0x30 octets en hexadécimal). +.br +\fI% xxd \-s 0x30 fichier\fR +.PP +afficher les trois dernières lignes (0x30 octets en hexadécimal) du +.B fichier +\. +.br +\fI% xxd \-s \-0x30 fichier\fR +.PP +.br +Afficher 120 octets convertis en continu, avec 20 octets par ligne. +.br +\fI% xxd \-l 120 \-ps \-c 20 xxd\-fr.1\fR +.br +2e54482058584420312022616ffb742031393936 +.br +22202250616765206465206d616e75656c20706f +.br +757220787864220a2e5c220a2e5c222032317374 +.br +204d617920313939360a2e5c22204d616e207061 +.br +676520617574686f723a0a2e5c2220202020546f +.br +6e79204e7567656e74203c746f6e79407363746e +.br +204e7567656e74203c746f6e79407363746e7567 +.br +2e54482058584420312022417567757374203139 +.PP +Convertir les 120 premiers octets de cette page de manuel avec 12 octets par +ligne. +.br +\fI% xxd \-l 120 \-c 12 xxd\-fr.1\fR +.br +0000000: 2e54 4820 5858 4420 3120 2261 .TH XXD 1 "a +.br +000000c: 6ffb 7420 3139 3936 2220 2250 o.t 1996" "P +.br +0000018: 6167 6520 6465 206d 616e 7565 age de manue +.br +0000024: 6c20 706f 7572 2078 7864 220a l pour xxd". +.br +0000030: 2e5c 220a 2e5c 2220 3231 7374 .\"..\" 21st +.br +000003c: 204d 6179 2031 3939 360a 2e5c May 1996..\ +.br +0000048: 2220 4d61 6e20 7061 6765 2061 " Man page a +.br +0000054: 7574 686f 723a 0a2e 5c22 2020 uthor:..\" +.br +0000060: 2020 546f 6e79 204e 7567 656e Tony Nugen +.br +000006c: 7420 3c74 6f6e 7940 7363 746e t fichier_sortie\fR +.PP +Patcher la date dans le fichier xxd.1 +.br +\fI% echo '0000037: 3574 68' | xxd \-r \- xxd\-fr.1\fR +.br +\fI% xxd \-s 0x38 \-l 13 \-c 13 xxd\-fr.1\fR +.br +0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996 +.PP +Créer un fichier de 65537 octets tous nuls (0x00), +sauf le dernier qui vaut 'A' (0x41 en hexadécimal). +.br +\fI% echo '010000: 41' | xxd \-r \> fichier\fR +.PP +.br +Convertir le fichier de l'exemple précédent avec la fonctionnalité "autoskip". +.br +\fI% xxd \-a \-c 12 fichier\fR +.br +0000000: 0000 0000 0000 0000 0000 0000 ............ +.br +* +.br +000fffc: 0000 0000 40 ....A +.PP +Créer un fichier d'un octet, contenant seulement le caractère 'A'. +Le nombre après '\-r \-s' s'ajoute aux numéros de lignes trouvées dans le +fichier ; les octets initiaux sont supprimés. +.br +\fI% echo '010000: 41' | xxd \-r \-s \-0x10000 \> fichier\fR +.PP +Utiliser xxd comme filtre dans un éditeur tel que +.B vim(1) +pour convertir une zone comprise entre les marques 'a' et 'z'. +.br +\fI:'a,'z!xxd\fR +.PP +Utiliser xxd comme filtre dans un éditeur tel que +.B vim(1) +pour récupérer une conversion binaire comprise entre les marques 'a' et 'z'. +.br +\fI:'a,'z!xxd \-r\fR +.PP +Utiliser xxd comme filtre dans un éditeur tel que +.B vim(1) +pour récupérer une ligne convertie. Placez le curseur sur la ligne et tapez : +.br +\fI!!xxd \-r\fR +.PP +Lire des caractères depuis une connexion série : +.br +\fI% xxd \-c1 < /dev/term/b &\fR +.br +\fI% stty < /dev/term/b \-echo \-opost \-isig \-icanon min 1\fR +.br +\fI% echo \-n foo > /dev/term/b\fR +.SH VALEURS DE RETOUR +Les erreurs suivantes sont rapportées : +.TP +0 +aucune erreur ne s'est produit. +.TP +\-1 +opération non supportée ( +.I xxd \-r \-i +reste impossible). +.TP +1 +erreur lors de l'analyse des options. +.TP +2 +problème avec le fichier d'entrée. +.TP +3 +problème avec le fichier de sortie. +.TP +4, 5 +la position spécifiée n'est pas atteignable. +.SH VOIR AUSSI +uuencode(1), uudecode(1), patch(1) +.SH AVERTISSEMENTS +L'étrangeté de cet outil reflète celle du cerveau de ses créateurs. +Utilisez cet outil à vos risques et périls. Dupliquez vos fichiers. +Surveillez l'outil. Devenez un gourou. +.SH VERSION +Cette page de manuel documente la version 1.7 de xxd. +.SH AUTEUR +(c) 1990-1997 par Juergen Weigert +.br + +.LP +"Distribute freely and credit me, +.br +make money and share with me, +.br +lose money and don't ask me." +.PP +Distribution libre en citant l'auteur, +.br +gagnez de l'argent, pensez à moi, +.br +perdez de l'argent, oubliez-moi. +.PP +Page de manuel débutée par Tony Nugent +.br + +.br +Modifications mineures par Bram Moolenaar. +Édité par Juergen Weigert. +.SH TRADUCTION +Cette page de manuel a été traduite par David Blanchet + 2004-12-24. +Mise à jour 2013-05-10, Dominique Pellé diff --git a/runtime/doc/xxd-fr.UTF-8.1 b/runtime/doc/xxd-fr.UTF-8.1 new file mode 100644 index 0000000000..7956b3ba2a --- /dev/null +++ b/runtime/doc/xxd-fr.UTF-8.1 @@ -0,0 +1,396 @@ +.TH XXD 1 "août 1996" "Page de manuel pour xxd" +.\" +.\" 21st May 1996 +.\" Man page author: +.\" Tony Nugent +.\" Changes by Bram Moolenaar +.\" French translation by David Blanchet 2005-03 +.SH NOM +.I xxd +\- convertit en représentation hexadécimale et inversement. +.SH SYNOPSIS +.B xxd +\-h[elp] +.br +.B xxd +[options] [fichier_entree [fichier_sortie]] +.br +.B xxd +\-r[evert] [options] [fichier_entree [fichier_sortie]] +.SH DESCRIPTION +.I xxd +crée un fichier contenant la représentation hexadécimale d'un fichier +binaire ou de l'entrée standard. +Il peut également convertir un fichier de codes hexadécimaux en un fichier +binaire. +Comme +.BR uuencode (1) +et +.BR uudecode (1) +il permet la transmission de données binaires dans une représentation ASCII +compatible avec le courrier électronique, mais a l'avantage de décoder la +sortie standard. +De plus, il peut être utilisé pour appliquer des rustines à des fichiers +binaires. +.SH OPTIONS +Si aucun +.I fichier_entree +n'est spécifié, l'entrée standard est utilisée. +Si +.I fichier_entree +correspond au caractère +.RB '\-' +\, l'entrée standard est employée comme source des données en entrée. +Si aucun +.I fichier_sortie +n'est spécifié (ou qu'un caractère +.RB '\-' +est donné à sa place), le résultat est envoyé sur la sortie standard. +.PP +NOTE : un analyseur paresseux est utilisé. Il ne vérifie pas au-delà de la +première lettre de l'option, à moins que cette dernière ne requiert un +paramètre. +L'espace entre l'option et son paramètre est optionnel. +Les paramètres des options peuvent être spécifiés en notation décimale, +hexadécimale ou octale. +Ainsi +.BR \-c8 , +.BR "\-c 8" , +.B \-c 010 +et +.B \-cols 8 +sont tous équivalents. +.TP +.IR \-a " | " \-autoskip +active la fonctionnalité "autoskip" : le caractère '*' remplace les lignes +d'octets nuls. Désactivée par défaut. +.TP +.IR \-b " | " \-bits +Convertit en binaires plutôt qu'en hexadécimal. +Cette option écrit les octets comme une séquence de "1" et de "0" au lieu +d'une conversion en hexadécimal traditionnel. Chaque ligne est précédée par un +numéro de ligne en hexadécimal et suivie de la représentation ASCII (ou +EBCDIC) correspondante. Les options \-r, \-p, \-i ne fonctionnent pas dans ce +mode. +.TP +.IR "\-c cols " | " \-cols cols" +place +.RI < cols > +octets par ligne. 16 par défaut (\-i : 12, \-ps : 30, \-b : 6). Maximum 256. +.TP +.IR \-E " | " \-EBCDIC +Passe le codage des caractères de la colonne de droite de ASCII à EBCDIC. +Cela ne change pas la représentation hexadécimale. Cette option est sans effet +quand elle est utilisée avec \-r, \-p or \-i. +.TP +.IR "\-g octets " | " \-groupsize octets" +Regroupe les octets (deux chiffres hexadécimaux ou huit chiffres binaires) +par groupe de +.RI < octets > +\, séparés par des espaces blancs. Spécifiez +.I \-g 0 +pour supprimer le regroupement. +.RI < octets > +vaut 2 par défaut dans le mode normal et \fI1\fP en +représentation binaire. Le regroupement ne s'applique pas aux styles +Postscript et Include. +.TP +.IR \-h " | " \-help +Affiche un résumé des commandes disponibles et quitte. Aucune conversion n'est +effectuée. +.TP +.IR \-i " | " \-include +produit une sortie dans le style #include (fichier C à inclure). La définition +complète d'un tableau statique est écrite et est nommée d'après le fichier +d'origine, à moins que xxd lise depuis l'entrée standard. +.TP +.IR "\-l long " | " \-len long" +Arrête après l'écriture de +.RI < long > +octets. +.TP +.IR \-p " | " \-ps " | " \-postscript " | " \-plain +Produit une conversion continue dans le style Postscript (postscript continuous +hexdumd style). +Également connu sous le nom de « conversion brute » (plain hexdump style). +.TP +.IR \-r " | " \-revert +Opération inverse : convertit un fichier hexadécimal en un fichier binaire (ou +applique une rustine à un fichier binaire). +Si l'écriture n'a pas lieu sur la sortie standard, xxd écrit dans le fichier +qu'il produit sans le tronquer. Utilisez la combinaison +.I \-r \-p +pour lire de l'hexadécimal brut sans information sur le numéro des lignes et +sans format de colonnes particulier. Des espaces blancs et coupures de lignes +supplémentaires sont autorisés à n'importe quel endroit. +.TP +.I \-seek décalage +Utilisé après l'option +.IR \-r : +inverse la conversion en ajoutant +.RI < décalage > +aux positions dans le fichier données dans le code hexadécimal. +.TP +.I \-s [+][\-]décalage +Débute au +.RI < décalage > +absolu ou relatif dans fichier_entree. +\fI+ \fRindique que le décalage est relatif à la position courante dans +l'entrée standard (sans effet si la lecture n'a pas lieu sur l'entrée +standard). \fI\- \fRindique un décalage en caractères depuis la fin de +l'entrée (utilisé avec \fI+\fR, désigne la position avant la position +actuelle de l'entrée standard). +Sans l'option \-s, xxd démarre à la position courante du fichier. +.TP +.I \-u +Utilise des chiffres hexadécimaux majuscules. La casse par défaut est +minuscule. +.TP +.IR \-v " | " \-version +Affiche la version de xxd. +.SH MISE EN GARDE +.I xxd \-r +effectue des opérations internes un peu obscures lors de l'évaluation +des informations sur les numéros de lignes. Si le fichier de sortie est +adressable, alors les numéros de lignes au début de chaque ligne d'hexadécimal +peuvent être désordonnées, des lignes peuvent manquer ou se chevaucher. Dans +ces cas, xxd utilisera lseek(2) pour déterminer la prochaine position. Si le +fichier n'est pas adressable, seuls les vides sont autorisés, et ils seront +comblés par des octets nuls. +.PP +.I xxd \-r +ne génère aucune erreur lors de l'analyse. Les problèmes sont passés +silencieusement. +.PP +Lors de l'édition de la représentation hexadécimale, veuillez noter que +.I xxd \-r +ignore tout ce qui se trouve sur la ligne après avoir lu suffisamment de +données hexadécimales (voir l'option \-c). Cela signifie également que les +modifications dans la colonne ASCII (ou EBCDIC) sont toujours ignorées. La +conversion inverse de données hexadécimales brutes (postscript) avec xxd \-r +\-p ne dépend pas d'un nombre correct de colonnes. Dans ce cas, tout ce qui +ressemble à une paire de chiffres hexadécimaux est interprété. +.PP +Remarquez la différence entre +.br +\fI% xxd \-i fichier\fR +.br +et +.br +\fI% xxd \-i < fichier\fR +.PP +.I xxd \-s \+seek +peut différer de +.IR "xxd \-s seek" , +car lseek(2) est utilisé pour « revenir en arrière ». Le '+' fait une +différence quand la source des données est l'entrée standard et si la position +dans le fichier de l'entrée standard n'est pas au début du fichier lorsque xxd +est démarré et qu'il reçoit ses données. +L'exemple suivant peut vous aider à comprendre (ou bien vous perdre davantage +encore !)... +.PP +Remettre l'entrée standard au départ avant de lire ; nécessaire car 'cat' a +déjà lu jusqu'à la fin de l'entrée standard. +.br +\fI% sh \-c 'cat > donnees_binaires; xxd \-s 0 > donnees_hexa' < fichier\fR +.PP +Convertir à partir de la position 0x480 (= 1024 + 128) du fichier. +Le symbole '+' signifie "relativement à la position actuelle', ainsi 128 est +ajouté aux 1024 octets comptabilisés pour dd. +.br +\fI% sh \-c 'dd of=donnees_binaires bs=1k count=1; xxd \-s +128 > +donnees_hexa' < fichier\fR +.PP +Convertir de fichier depuis la position 0x100 (= 1024 \- 768) du fichier. +.br +\fI% sh \-c 'dd of=donnees_binaires bs=1k count=1; xxd \-s +\-768 > +donnees_hexa' < fichier\fR +.PP +Toutefois, cette situation est peu fréquente et l'utilisation de '+' est +rarement requise. L'auteur préfère surveiller les effets de xxd avec strace(1) +ou truss(1) quand \-s est employé. +.SH EXEMPLES +Afficher la totalité du +.B fichier +sauf les trois premières lignes (0x30 octets en hexadécimal). +.br +\fI% xxd \-s 0x30 fichier\fR +.PP +afficher les trois dernières lignes (0x30 octets en hexadécimal) du +.B fichier +\. +.br +\fI% xxd \-s \-0x30 fichier\fR +.PP +.br +Afficher 120 octets convertis en continu, avec 20 octets par ligne. +.br +\fI% xxd \-l 120 \-ps \-c 20 xxd\-fr.1\fR +.br +2e54482058584420312022616ffb742031393936 +.br +22202250616765206465206d616e75656c20706f +.br +757220787864220a2e5c220a2e5c222032317374 +.br +204d617920313939360a2e5c22204d616e207061 +.br +676520617574686f723a0a2e5c2220202020546f +.br +6e79204e7567656e74203c746f6e79407363746e +.br +204e7567656e74203c746f6e79407363746e7567 +.br +2e54482058584420312022417567757374203139 +.PP +Convertir les 120 premiers octets de cette page de manuel avec 12 octets par +ligne. +.br +\fI% xxd \-l 120 \-c 12 xxd\-fr.1\fR +.br +0000000: 2e54 4820 5858 4420 3120 2261 .TH XXD 1 "a +.br +000000c: 6ffb 7420 3139 3936 2220 2250 o.t 1996" "P +.br +0000018: 6167 6520 6465 206d 616e 7565 age de manue +.br +0000024: 6c20 706f 7572 2078 7864 220a l pour xxd". +.br +0000030: 2e5c 220a 2e5c 2220 3231 7374 .\"..\" 21st +.br +000003c: 204d 6179 2031 3939 360a 2e5c May 1996..\ +.br +0000048: 2220 4d61 6e20 7061 6765 2061 " Man page a +.br +0000054: 7574 686f 723a 0a2e 5c22 2020 uthor:..\" +.br +0000060: 2020 546f 6e79 204e 7567 656e Tony Nugen +.br +000006c: 7420 3c74 6f6e 7940 7363 746e t fichier_sortie\fR +.PP +Patcher la date dans le fichier xxd.1 +.br +\fI% echo '0000037: 3574 68' | xxd \-r \- xxd\-fr.1\fR +.br +\fI% xxd \-s 0x38 \-l 13 \-c 13 xxd\-fr.1\fR +.br +0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996 +.PP +Créer un fichier de 65537 octets tous nuls (0x00), +sauf le dernier qui vaut 'A' (0x41 en hexadécimal). +.br +\fI% echo '010000: 41' | xxd \-r \> fichier\fR +.PP +.br +Convertir le fichier de l'exemple précédent avec la fonctionnalité "autoskip". +.br +\fI% xxd \-a \-c 12 fichier\fR +.br +0000000: 0000 0000 0000 0000 0000 0000 ............ +.br +* +.br +000fffc: 0000 0000 40 ....A +.PP +Créer un fichier d'un octet, contenant seulement le caractère 'A'. +Le nombre après '\-r \-s' s'ajoute aux numéros de lignes trouvées dans le +fichier ; les octets initiaux sont supprimés. +.br +\fI% echo '010000: 41' | xxd \-r \-s \-0x10000 \> fichier\fR +.PP +Utiliser xxd comme filtre dans un éditeur tel que +.B vim(1) +pour convertir une zone comprise entre les marques 'a' et 'z'. +.br +\fI:'a,'z!xxd\fR +.PP +Utiliser xxd comme filtre dans un éditeur tel que +.B vim(1) +pour récupérer une conversion binaire comprise entre les marques 'a' et 'z'. +.br +\fI:'a,'z!xxd \-r\fR +.PP +Utiliser xxd comme filtre dans un éditeur tel que +.B vim(1) +pour récupérer une ligne convertie. Placez le curseur sur la ligne et tapez : +.br +\fI!!xxd \-r\fR +.PP +Lire des caractères depuis une connexion série : +.br +\fI% xxd \-c1 < /dev/term/b &\fR +.br +\fI% stty < /dev/term/b \-echo \-opost \-isig \-icanon min 1\fR +.br +\fI% echo \-n foo > /dev/term/b\fR +.SH VALEURS DE RETOUR +Les erreurs suivantes sont rapportées : +.TP +0 +aucune erreur ne s'est produit. +.TP +\-1 +opération non supportée ( +.I xxd \-r \-i +reste impossible). +.TP +1 +erreur lors de l'analyse des options. +.TP +2 +problème avec le fichier d'entrée. +.TP +3 +problème avec le fichier de sortie. +.TP +4, 5 +la position spécifiée n'est pas atteignable. +.SH VOIR AUSSI +uuencode(1), uudecode(1), patch(1) +.SH AVERTISSEMENTS +L'étrangeté de cet outil reflète celle du cerveau de ses créateurs. +Utilisez cet outil à vos risques et périls. Dupliquez vos fichiers. +Surveillez l'outil. Devenez un gourou. +.SH VERSION +Cette page de manuel documente la version 1.7 de xxd. +.SH AUTEUR +(c) 1990-1997 par Juergen Weigert +.br + +.LP +"Distribute freely and credit me, +.br +make money and share with me, +.br +lose money and don't ask me." +.PP +Distribution libre en citant l'auteur, +.br +gagnez de l'argent, pensez à moi, +.br +perdez de l'argent, oubliez-moi. +.PP +Page de manuel débutée par Tony Nugent +.br + +.br +Modifications mineures par Bram Moolenaar. +Édité par Juergen Weigert. +.SH TRADUCTION +Cette page de manuel a été traduite par David Blanchet + 2004-12-24. +Mise à jour 2013-05-10, Dominique Pellé diff --git a/runtime/doc/xxd-it.1 b/runtime/doc/xxd-it.1 new file mode 100755 index 0000000000..3d8dabb950 --- /dev/null +++ b/runtime/doc/xxd-it.1 @@ -0,0 +1,402 @@ +.TH XXD 1 "Agosto 1996" "Pagina di manuale per xxd" +.\" +.\" 21 Maggio 1996 +.\" Autore della pagina di manuale: +.\" Tony Nugent +.\" Modificato da Bram Moolenaar +.SH NOME +.I xxd +\- Produce esadecimale da un file binario o viceversa. +.SH SINTASSI +.B xxd +\-h[elp] +.br +.B xxd +[opzioni] [input_file [output_file]] +.br +.B xxd +\-r[evert] [opzioni] [input_file [output_file]] +.SH DESCRIZIONE +.I xxd +crea un'immagine esadecimale di un dato file o dello "standard input". +Può anche ottenere da un'immagine esadecimale il file binario originale. +Come +.BR uuencode (1) +e +.BR uudecode (1) +permette di trasmettere dati binari in una rappresentazione ASCII "a prova +di email", ma ha anche il vantaggio di poter decodificare sullo "standard +output". Inoltre, può essere usato per effettuare delle modifiche (patch) +a file binari. +.SH OPZIONI +Se non si specifica un +.I input_file +il programma legge dallo "standard input". +Se +.I input_file +è specificato come il carattere +.RB \` \- ' +, l'input è letto dallo "standard input". +Se non si specifica un +.I output_file +(o si mette al suo posto il carattere +.RB \` \- ' +), i risultati sono inviati allo "standard output". +.PP +Si noti che la scansione dei caratteri è "pigra", e non controlla oltre +la prima lettera dell'opzione, a meno che l'opzione sia seguita da un +parametro. +Gli spazi fra una singola lettera di opzione e il corrispondente parametro +dopo di essa sono facoltativi. +I parametri delle opzioni possono essere specificati usando la notazione +decimale, esadecimale oppure ottale. +Pertanto +.BR \-c8 , +.BR "\-c 8" , +.B \-c 010 +e +.B \-cols 8 +sono notazioni equivalenti fra loro. +.PP +.TP +.IR \-a " | " \-autoskip +Richiesta di autoskip: Un singolo '*' rimpiazza linee di zeri binari. +Valore di default: off. +.TP +.IR \-b " | " \-bits +Richiesta di una immagine binaria (cifre binarie), invece che esadecimale. +Questa opzione scrive un byte come otto cifre "1" e "0" invece di usare i +numeri esadecimali. Ogni linea è preceduta da un indirizzo in esadecimale e +seguita da una decodifica ascii (o ebcdic). Le opzioni specificabili dalla +linea comando \-r, \-p, \-i non funzionano in questo modo. +.TP +.IR "\-c colonne " | " \-cols colonne" +.IR "\-c colonne " | " \-cols colonne" +In ogni linea sono formattate +.RI < colonne > +colonne. Valore di default 16 (\-i: 12, \-ps: 30, \-b: 6). +Valore massimo 256. +.TP +.IR \-E " | " \-EBCDIC +Cambia la codifica della colonna di destra da ASCII a EBCDIC. +Questo non modifica la rappresentazione esadecimale. Non ha senso +specificare questa opzione in combinazione con \-r, \-p o \-i. +.TP +.IR "\-g numero_byte " | " \-groupsize numero_byte" +Inserisci ogni +.RI < numero_byte > +byte di output (di due caratteri esadecimali o otto numeri binari ognuno) +uno spazio bianco. +Specificando +.I \-g 0 +i byte di output non sono separati da alcuno spazio. +.RI < numero_byte > ha come valore di default " 2 +in modalità normale [esadecimale] e \fI1\fP in modalità binaria. +Il raggruppamento non si applica agli stili "PostScript" e "include". +.TP +.IR \-h " | " \-help +stampa un sommario dei comandi disponibili ed esce. Non viene fatto +null'altro. +.TP +.IR \-i " | " \-include +L'output è nello stile dei file "include" in C. Viene preparata la +definizione completa di un "array" [vettore], dandogli il nome del +file di input), tranne che nel caso in cui xxd legga dallo "standard input". +.TP +.IR "\-l numero " | " \-len numero" +Il programma esce dopo aver scritto +.RI < numero > +byte. +.TP +.IR \-p " | " \-ps " | " \-postscript " | " \-plain +L'output è nello stile di un dump continuo sotto postscript. +Noto anche come stile esadecimale semplice [plain]. +.TP +.IR \-r " | " \-revert +ricostruzione: converte (o mette una patch) a partire dall'immagine +esadecimale, creando [o modificando] il file binario. +Se non diretto allo "standard output", xxd scrive nel suo file di output +in maniera continua, senza interruzioni. Usare la combinazione +.I \-r \-p +per leggere dump in stile esadecimale semplice [plain], senza l'informazione +di numero di linea e senza un particolare tracciato di colonna. Degli spazi +o delle linee vuote possono essere inserite a piacere [e vengono ignorate]. +.TP +.I \-seek distanza +Usato con l'opzione +.IR \-r : +(ricostruzione), +.RI < distanza > +viene aggiunta alla posizione nel file trovata nella immagine +esadecimale. +.TP +.I \-s [+][\-]seek +Inizia a +.RI < seek > +byte assoluti (o relativi) di distanza all'interno di input_file. +\fI+ \fRindica che il "seek" è relativo alla posizione corrente nel file +"standard input" (non significativa quando non si legge da "standard input"). +\fI\- \fRindica che il "seek" dovrebbe posizionarsi ad quel numero di +caratteri dalla fine dell'input (o se in combinazione con +\fI+ \fR: prime della posizione corrente nel file "standard input"). +Se non si specifica una opzione \-s, xxd inizia alla posizione +corrente all'interno del file. +.TP +.I \-u +usa lettere esadecimali maiuscole. Il valore di default è di usare +lettere minuscole. +.TP +.IR \-v " | " \-version +visualizza la stringa contenente la versione del programma. +.SH ATTENZIONE +.PP +.I xxd \-r +è capace di operare "magie" nell'utilizzare l'informazione "numero di linea". +Se sul file di output ci si può posizionare usando la "seek", il numero di +linea all'inizio di ogni riga esadecimale può essere non ordinato, delle +linee possono mancare delle linee, oppure esserci delle sovrapposizioni. +In simili casi xxd userà lseek(2) per raggiungere la posizione d'inizio. +Se il file di output non consente di usare "seek", sono permessi solo dei +"buchi", che saranno riempiti con zeri binari. +.PP +.I xxd \-r +non genera mai errori di specifica parametri. I parametri non riconosciuti +sono silenziosamente ignorati. +.PP +Nel modificare immagini esadecimali, tenete conto che +.I xxd \-r +salta il resto della linea, dopo aver letto abbastanza caratteri contenenti +dati esadecimali (vedere opzione \-c). Ciò implica pure che le modifiche alle +colonne di caratteri stampabili ascii (o ebcdic) sono sempre ignorate. +La ricostruzione da un file immagine esadecimale in stile semplice +(postscript) con xxd \-r \-p non dipende dal numero corretto di colonne. +IN questo caso, qualsiasi cosa assomigli a una coppia di cifre esadecimali +è interpretata [e utilizzata]. +.PP +Notare la differenza fra +.br +\fI% xxd \-i file\fR +.br +e +.br +\fI% xxd \-i \< file\fR +.PP +.I xxd \-s \+seek +può comportarsi in modo diverso da +.IR "xxd \-s seek" +, perché lseek(2) è usata per tornare indietro nel file di input. Il '+' +fa differenza se il file di input è lo "standard input", e se la posizione nel +file di "standard input" non è all'inizio del file quando xxd è eseguito, +con questo input. +I seguenti esempi possono contribuire a chiarire il concetto +(o ad oscurarlo!)... +.PP +Riavvolge lo "standard input" prima di leggere; necessario perché `cat' +ha già letto lo stesso file ["file"] fino alla fine dello "standard input". +.br +\fI% sh \-c 'cat > copia_normale; xxd \-s 0 > copia_esadecimale' < file +.PP +Stampa immagine esadecimale dalla posizione file 0x480 (=1024+128) in poi. +Il segno `+' vuol dire "rispetto alla posizione corrente", quindi il `128' +si aggiunge a 1k (1024) dove `dd' si era fermato. +.br +\fI% sh \-c 'dd of=normale bs=1k count=1; xxd \-s +128 > esadecimale' < file +.PP +Immagine esadecimale dalla posizione 0x100 ( = 1024\-768 ) del file in avanti. +.br +\fI% sh \-c 'dd of=normale bs=1k count=1; xxd \-s +\-768 > esadecimale' < file +.PP +Comunque, questo capita raramente, e l'uso del `+' non serve quasi mai. +L'autore preferisce monitorare il comportamento di xxd con strace(1) o +truss(1), quando si usa l'opzione \-s. +.SH ESEMPI +.PP +.br +Stampa tutto tranne le prime tre linee (0x30 byte esadecimali) di +.B file +\. +.br +\fI% xxd \-s 0x30 file +.PP +.br +Stampa 3 linee (0x30 byte esadecimali) alla fine di +.B file +\. +.br +\fI% xxd \-s \-0x30 file +.PP +.br +Stampa 120 byte come immagine esadecimale continua con 20 byte per linea. +.br +\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR + +.br +2e54482058584420312022417567757374203139 +.br +39362220224d616e75616c207061676520666f72 +.br +20787864220a2e5c220a2e5c222032317374204d +.br +617920313939360a2e5c22204d616e2070616765 +.br +20617574686f723a0a2e5c2220202020546f6e79 +.br +204e7567656e74203c746f6e79407363746e7567 +.br + +.br +Stampa i primi 120 byte della pagina di manuale vim.1 a 12 byte per linea. +.br +\fI% xxd \-l 120 \-c 12 xxd.1\fR + + +.br +0000000: 2e54 4820 5858 4420 3120 2241 .TH XXD 1 "A +.br +000000c: 7567 7573 7420 3139 3936 2220 ugust 1996" +.br +0000018: 224d 616e 7561 6c20 7061 6765 "Manual page +.br +0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\ +.br +0000030: 220a 2e5c 2220 3231 7374 204d "..\" 21st M +.br +000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\" +.br +0000048: 4d61 6e20 7061 6765 2061 7574 Man page aut +.br +0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\" +.br +0000060: 546f 6e79 204e 7567 656e 7420 Tony Nugent +.br +000006c: 3c74 6f6e 7940 7363 746e 7567 output_file\fR +.br + +.br +Modificare (patch) la data nel file xxd.1 +.br +\fI% echo '0000037: 3574 68' | xxd \-r \- xxd.1\fR +.br +\fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR +.br +0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996 +.PP +.br +Creare un file di 65537 byte tutto a 0x00, +tranne che l'ultimo carattere che è una 'A' (esadecimale 0x41). +.br +\fI% echo '010000: 41' | xxd \-r \> file\fR +.PP +.br +Stampa una immagine esadecimale del file di cui sopra con opzione autoskip. +.br +\fI% xxd \-a \-c 12 file\fR +.br +0000000: 0000 0000 0000 0000 0000 0000 ............ +.br +* +.br +000fffc: 0000 0000 40 ....A +.PP +Crea un file di 1 byte che contiene il solo carattere 'A'. +Il numero dopo '\-r \-s' viene aggiunto a quello trovato nel file; +in pratica, i byte precedenti non sono stampati. +.br +\fI% echo '010000: 41' | xxd \-r \-s \-0x10000 \> file\fR +.PP +Usa xxd come filtro all'interno di un editor come +.B vim(1) +per ottenere una immagine esadecimale di una parte di file +delimitata dai marcatori `a' e `z'. +.br +\fI:'a,'z!xxd\fR +.PP +Usare xxd come filtro all'interno di un editor come +.B vim(1) +per ricostruire un pezzo di file binario da una immagine esadecimale +delimitata dai marcatori `a' e `z'. +.br +\fI:'a,'z!xxd \-r\fR +.PP +Usare xxd come filtro all'interno di un editor come +.B vim(1) +per ricostruire una sola linea di file binario da una immagine esadecimale, +Portare il cursore sopra la linea e battere: +.br +\fI!!xxd \-r\fR +.PP +Per leggere singoli caratteri da una linea seriale +.br +\fI% xxd \-c1 < /dev/term/b &\fR +.br +\fI% stty < /dev/term/b \-echo \-opost \-isig \-icanon min 1\fR +.br +\fI% echo \-n foo > /dev/term/b\fR +.PP +.SH CODICI DI RITORNO +Il programma può restituire questi codici di errore: +.TP +0 +nessun errore rilevato. +.TP +\-1 +operazione non supportata ( +.I xxd \-r \-i +non ancora possible). +.TP +1 +errore durante la scansione parametri. +.TP +2 +problemi con il file di input. +.TP +3 +problemi con il file di output. +.TP +4,5 +posizione "seek" specificata non raggiungibile all'interno del file. +.SH VEDERE ANCHE +uuencode(1), uudecode(1), patch(1) +.br +.SH AVVERTIMENTI +La stranezza dello strumento rispecchia la mente del suo creatore. +Usate a vostro rischio e pericolo. Copiate i file. Tracciate l'esecuzione. +Diventate un mago. +.br +.SH VERSIONE +Questa pagina di manuale documenta la versione 1.7 di xxd. +.SH AUTORE +.br +(c) 1990-1997 Juergen Weigert +.br + +.LP +Distribuite liberamente ed attribuitemi il credito, +.br +fate soldi e condivideteli con me +.br +perdete soldi e non venite a chiederli a me. +.PP +Pagina di manuale messa in piedi da Tony Nugent +.br + +.br +Piccole modifiche di Bram Moolenaar. +Modificato da Juergen Weigert. +.PP diff --git a/runtime/doc/xxd-it.UTF-8.1 b/runtime/doc/xxd-it.UTF-8.1 new file mode 100644 index 0000000000..b6ccabd2e3 --- /dev/null +++ b/runtime/doc/xxd-it.UTF-8.1 @@ -0,0 +1,402 @@ +.TH XXD 1 "Agosto 1996" "Pagina di manuale per xxd" +.\" +.\" 21 Maggio 1996 +.\" Autore della pagina di manuale: +.\" Tony Nugent +.\" Modificato da Bram Moolenaar +.SH NOME +.I xxd +\- Produce esadecimale da un file binario o viceversa. +.SH SINTASSI +.B xxd +\-h[elp] +.br +.B xxd +[opzioni] [input_file [output_file]] +.br +.B xxd +\-r[evert] [opzioni] [input_file [output_file]] +.SH DESCRIZIONE +.I xxd +crea un'immagine esadecimale di un dato file o dello "standard input". +Può anche ottenere da un'immagine esadecimale il file binario originale. +Come +.BR uuencode (1) +e +.BR uudecode (1) +permette di trasmettere dati binari in una rappresentazione ASCII "a prova +di email", ma ha anche il vantaggio di poter decodificare sullo "standard +output". Inoltre, può essere usato per effettuare delle modifiche (patch) +a file binari. +.SH OPZIONI +Se non si specifica un +.I input_file +il programma legge dallo "standard input". +Se +.I input_file +è specificato come il carattere +.RB \` \- ' +, l'input è letto dallo "standard input". +Se non si specifica un +.I output_file +(o si mette al suo posto il carattere +.RB \` \- ' +), i risultati sono inviati allo "standard output". +.PP +Si noti che la scansione dei caratteri è "pigra", e non controlla oltre +la prima lettera dell'opzione, a meno che l'opzione sia seguita da un +parametro. +Gli spazi fra una singola lettera di opzione e il corrispondente parametro +dopo di essa sono facoltativi. +I parametri delle opzioni possono essere specificati usando la notazione +decimale, esadecimale oppure ottale. +Pertanto +.BR \-c8 , +.BR "\-c 8" , +.B \-c 010 +e +.B \-cols 8 +sono notazioni equivalenti fra loro. +.PP +.TP +.IR \-a " | " \-autoskip +Richiesta di autoskip: Un singolo '*' rimpiazza linee di zeri binari. +Valore di default: off. +.TP +.IR \-b " | " \-bits +Richiesta di una immagine binaria (cifre binarie), invece che esadecimale. +Questa opzione scrive un byte come otto cifre "1" e "0" invece di usare i +numeri esadecimali. Ogni linea è preceduta da un indirizzo in esadecimale e +seguita da una decodifica ascii (o ebcdic). Le opzioni specificabili dalla +linea comando \-r, \-p, \-i non funzionano in questo modo. +.TP +.IR "\-c colonne " | " \-cols colonne" +.IR "\-c colonne " | " \-cols colonne" +In ogni linea sono formattate +.RI < colonne > +colonne. Valore di default 16 (\-i: 12, \-ps: 30, \-b: 6). +Valore massimo 256. +.TP +.IR \-E " | " \-EBCDIC +Cambia la codifica della colonna di destra da ASCII a EBCDIC. +Questo non modifica la rappresentazione esadecimale. Non ha senso +specificare questa opzione in combinazione con \-r, \-p o \-i. +.TP +.IR "\-g numero_byte " | " \-groupsize numero_byte" +Inserisci ogni +.RI < numero_byte > +byte di output (di due caratteri esadecimali o otto numeri binari ognuno) +uno spazio bianco. +Specificando +.I \-g 0 +i byte di output non sono separati da alcuno spazio. +.RI < numero_byte > ha come valore di default " 2 +in modalità normale [esadecimale] e \fI1\fP in modalità binaria. +Il raggruppamento non si applica agli stili "PostScript" e "include". +.TP +.IR \-h " | " \-help +stampa un sommario dei comandi disponibili ed esce. Non viene fatto +null'altro. +.TP +.IR \-i " | " \-include +L'output è nello stile dei file "include" in C. Viene preparata la +definizione completa di un "array" [vettore], dandogli il nome del +file di input), tranne che nel caso in cui xxd legga dallo "standard input". +.TP +.IR "\-l numero " | " \-len numero" +Il programma esce dopo aver scritto +.RI < numero > +byte. +.TP +.IR \-p " | " \-ps " | " \-postscript " | " \-plain +L'output è nello stile di un dump continuo sotto postscript. +Noto anche come stile esadecimale semplice [plain]. +.TP +.IR \-r " | " \-revert +ricostruzione: converte (o mette una patch) a partire dall'immagine +esadecimale, creando [o modificando] il file binario. +Se non diretto allo "standard output", xxd scrive nel suo file di output +in maniera continua, senza interruzioni. Usare la combinazione +.I \-r \-p +per leggere dump in stile esadecimale semplice [plain], senza l'informazione +di numero di linea e senza un particolare tracciato di colonna. Degli spazi +o delle linee vuote possono essere inserite a piacere [e vengono ignorate]. +.TP +.I \-seek distanza +Usato con l'opzione +.IR \-r : +(ricostruzione), +.RI < distanza > +viene aggiunta alla posizione nel file trovata nella immagine +esadecimale. +.TP +.I \-s [+][\-]seek +Inizia a +.RI < seek > +byte assoluti (o relativi) di distanza all'interno di input_file. +\fI+ \fRindica che il "seek" è relativo alla posizione corrente nel file +"standard input" (non significativa quando non si legge da "standard input"). +\fI\- \fRindica che il "seek" dovrebbe posizionarsi ad quel numero di +caratteri dalla fine dell'input (o se in combinazione con +\fI+ \fR: prime della posizione corrente nel file "standard input"). +Se non si specifica una opzione \-s, xxd inizia alla posizione +corrente all'interno del file. +.TP +.I \-u +usa lettere esadecimali maiuscole. Il valore di default è di usare +lettere minuscole. +.TP +.IR \-v " | " \-version +visualizza la stringa contenente la versione del programma. +.SH ATTENZIONE +.PP +.I xxd \-r +è capace di operare "magie" nell'utilizzare l'informazione "numero di linea". +Se sul file di output ci si può posizionare usando la "seek", il numero di +linea all'inizio di ogni riga esadecimale può essere non ordinato, delle +linee possono mancare delle linee, oppure esserci delle sovrapposizioni. +In simili casi xxd userà lseek(2) per raggiungere la posizione d'inizio. +Se il file di output non consente di usare "seek", sono permessi solo dei +"buchi", che saranno riempiti con zeri binari. +.PP +.I xxd \-r +non genera mai errori di specifica parametri. I parametri non riconosciuti +sono silenziosamente ignorati. +.PP +Nel modificare immagini esadecimali, tenete conto che +.I xxd \-r +salta il resto della linea, dopo aver letto abbastanza caratteri contenenti +dati esadecimali (vedere opzione \-c). Ciò implica pure che le modifiche alle +colonne di caratteri stampabili ascii (o ebcdic) sono sempre ignorate. +La ricostruzione da un file immagine esadecimale in stile semplice +(postscript) con xxd \-r \-p non dipende dal numero corretto di colonne. +IN questo caso, qualsiasi cosa assomigli a una coppia di cifre esadecimali +è interpretata [e utilizzata]. +.PP +Notare la differenza fra +.br +\fI% xxd \-i file\fR +.br +e +.br +\fI% xxd \-i \< file\fR +.PP +.I xxd \-s \+seek +può comportarsi in modo diverso da +.IR "xxd \-s seek" +, perché lseek(2) è usata per tornare indietro nel file di input. Il '+' +fa differenza se il file di input è lo "standard input", e se la posizione nel +file di "standard input" non è all'inizio del file quando xxd è eseguito, +con questo input. +I seguenti esempi possono contribuire a chiarire il concetto +(o ad oscurarlo!)... +.PP +Riavvolge lo "standard input" prima di leggere; necessario perché `cat' +ha già letto lo stesso file ["file"] fino alla fine dello "standard input". +.br +\fI% sh \-c 'cat > copia_normale; xxd \-s 0 > copia_esadecimale' < file +.PP +Stampa immagine esadecimale dalla posizione file 0x480 (=1024+128) in poi. +Il segno `+' vuol dire "rispetto alla posizione corrente", quindi il `128' +si aggiunge a 1k (1024) dove `dd' si era fermato. +.br +\fI% sh \-c 'dd of=normale bs=1k count=1; xxd \-s +128 > esadecimale' < file +.PP +Immagine esadecimale dalla posizione 0x100 ( = 1024\-768 ) del file in avanti. +.br +\fI% sh \-c 'dd of=normale bs=1k count=1; xxd \-s +\-768 > esadecimale' < file +.PP +Comunque, questo capita raramente, e l'uso del `+' non serve quasi mai. +L'autore preferisce monitorare il comportamento di xxd con strace(1) o +truss(1), quando si usa l'opzione \-s. +.SH ESEMPI +.PP +.br +Stampa tutto tranne le prime tre linee (0x30 byte esadecimali) di +.B file +\. +.br +\fI% xxd \-s 0x30 file +.PP +.br +Stampa 3 linee (0x30 byte esadecimali) alla fine di +.B file +\. +.br +\fI% xxd \-s \-0x30 file +.PP +.br +Stampa 120 byte come immagine esadecimale continua con 20 byte per linea. +.br +\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR + +.br +2e54482058584420312022417567757374203139 +.br +39362220224d616e75616c207061676520666f72 +.br +20787864220a2e5c220a2e5c222032317374204d +.br +617920313939360a2e5c22204d616e2070616765 +.br +20617574686f723a0a2e5c2220202020546f6e79 +.br +204e7567656e74203c746f6e79407363746e7567 +.br + +.br +Stampa i primi 120 byte della pagina di manuale vim.1 a 12 byte per linea. +.br +\fI% xxd \-l 120 \-c 12 xxd.1\fR + + +.br +0000000: 2e54 4820 5858 4420 3120 2241 .TH XXD 1 "A +.br +000000c: 7567 7573 7420 3139 3936 2220 ugust 1996" +.br +0000018: 224d 616e 7561 6c20 7061 6765 "Manual page +.br +0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\ +.br +0000030: 220a 2e5c 2220 3231 7374 204d "..\" 21st M +.br +000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\" +.br +0000048: 4d61 6e20 7061 6765 2061 7574 Man page aut +.br +0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\" +.br +0000060: 546f 6e79 204e 7567 656e 7420 Tony Nugent +.br +000006c: 3c74 6f6e 7940 7363 746e 7567 output_file\fR +.br + +.br +Modificare (patch) la data nel file xxd.1 +.br +\fI% echo '0000037: 3574 68' | xxd \-r \- xxd.1\fR +.br +\fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR +.br +0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996 +.PP +.br +Creare un file di 65537 byte tutto a 0x00, +tranne che l'ultimo carattere che è una 'A' (esadecimale 0x41). +.br +\fI% echo '010000: 41' | xxd \-r \> file\fR +.PP +.br +Stampa una immagine esadecimale del file di cui sopra con opzione autoskip. +.br +\fI% xxd \-a \-c 12 file\fR +.br +0000000: 0000 0000 0000 0000 0000 0000 ............ +.br +* +.br +000fffc: 0000 0000 40 ....A +.PP +Crea un file di 1 byte che contiene il solo carattere 'A'. +Il numero dopo '\-r \-s' viene aggiunto a quello trovato nel file; +in pratica, i byte precedenti non sono stampati. +.br +\fI% echo '010000: 41' | xxd \-r \-s \-0x10000 \> file\fR +.PP +Usa xxd come filtro all'interno di un editor come +.B vim(1) +per ottenere una immagine esadecimale di una parte di file +delimitata dai marcatori `a' e `z'. +.br +\fI:'a,'z!xxd\fR +.PP +Usare xxd come filtro all'interno di un editor come +.B vim(1) +per ricostruire un pezzo di file binario da una immagine esadecimale +delimitata dai marcatori `a' e `z'. +.br +\fI:'a,'z!xxd \-r\fR +.PP +Usare xxd come filtro all'interno di un editor come +.B vim(1) +per ricostruire una sola linea di file binario da una immagine esadecimale, +Portare il cursore sopra la linea e battere: +.br +\fI!!xxd \-r\fR +.PP +Per leggere singoli caratteri da una linea seriale +.br +\fI% xxd \-c1 < /dev/term/b &\fR +.br +\fI% stty < /dev/term/b \-echo \-opost \-isig \-icanon min 1\fR +.br +\fI% echo \-n foo > /dev/term/b\fR +.PP +.SH CODICI DI RITORNO +Il programma può restituire questi codici di errore: +.TP +0 +nessun errore rilevato. +.TP +\-1 +operazione non supportata ( +.I xxd \-r \-i +non ancora possible). +.TP +1 +errore durante la scansione parametri. +.TP +2 +problemi con il file di input. +.TP +3 +problemi con il file di output. +.TP +4,5 +posizione "seek" specificata non raggiungibile all'interno del file. +.SH VEDERE ANCHE +uuencode(1), uudecode(1), patch(1) +.br +.SH AVVERTIMENTI +La stranezza dello strumento rispecchia la mente del suo creatore. +Usate a vostro rischio e pericolo. Copiate i file. Tracciate l'esecuzione. +Diventate un mago. +.br +.SH VERSIONE +Questa pagina di manuale documenta la versione 1.7 di xxd. +.SH AUTORE +.br +(c) 1990-1997 Juergen Weigert +.br + +.LP +Distribuite liberamente ed attribuitemi il credito, +.br +fate soldi e condivideteli con me +.br +perdete soldi e non venite a chiederli a me. +.PP +Pagina di manuale messa in piedi da Tony Nugent +.br + +.br +Piccole modifiche di Bram Moolenaar. +Modificato da Juergen Weigert. +.PP diff --git a/runtime/doc/xxd-ja.UTF-8.1 b/runtime/doc/xxd-ja.UTF-8.1 new file mode 100644 index 0000000000..8a8d54b021 --- /dev/null +++ b/runtime/doc/xxd-ja.UTF-8.1 @@ -0,0 +1,366 @@ +.TH XXD 1 "August 1996" "Manual page for xxd" +.\" +.\" 21st May 1996 +.\" Man page author: +.\" Tony Nugent +.\" Changes by Bram Moolenaar +.SH åå‰ +.I xxd +\- 16 進ダンプを作æˆã—ãŸã‚Šã€å…ƒã«æˆ»ã—ãŸã‚Šã€‚ +.SH æ›¸å¼ +.B xxd +\-h[elp] +.br +.B xxd +[options] [infile [outfile]] +.br +.B xxd +\-r[evert] [options] [infile [outfile]] +.SH 説明 +ファイルや標準入力ã‹ã‚‰ 16 進ダンプを作æˆã—ã¾ã™ã€‚ +16 進ダンプã‹ã‚‰å…ƒã®ãƒã‚¤ãƒŠãƒªã«æˆ»ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +.BR uuencode (1) +ã‚„ +.BR uudecode (1) +ã®ã‚ˆã†ã«ã€ãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ã‚’ã€ãƒ¡ãƒ¼ãƒ«ã«è²¼ã‚Šä»˜ã‘å¯èƒ½ãª ASCII å½¢å¼ã«å¤‰æ›ã§ã㟠+ã‚Šã€æ¨™æº–出力ã«å‡ºåŠ›ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +ã•らã«ã€ãƒã‚¤ãƒŠãƒªãƒ•ァイルã«ãƒ‘ッãƒã‚’当ã¦ã‚‹ã¨ã„ã†ä½¿ã„方もã§ãã¾ã™ã€‚ +.SH オプション +.I infile +を指定ã—ãªã‹ã£ãŸå ´åˆã¯ã€æ¨™æº–入力ãŒèª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ +.I infile +ã« +.RB \` \- ' +を指定ã—ãŸå ´åˆã‚‚ã€æ¨™æº–入力ã‹ã‚‰èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ +.I outfile +を指定ã—ãªã‹ã£ãŸ (ã¾ãŸã¯ +.RB \` \- ' +を指定ã—ãŸ) å ´åˆã¯ã€æ¨™æº–出力ã«å‡ºåŠ›ã•れã¾ã™ã€‚ +.PP +引数ã®è§£é‡ˆå‡¦ç†ã¯é©å½“ãªã®ã§æ³¨æ„ã—ã¦ãã ã•ã„。パラメータをå–らãªã„引数㯠+最åˆã®ä¸€æ–‡å­—ã ã‘ãƒã‚§ãƒƒã‚¯ã•れã¾ã™ã€‚ +å¼•æ•°ã®æ–‡å­—ã¨ãƒ‘ラメータã®é–“ã®ã‚¹ãƒšãƒ¼ã‚¹ã¯çœç•¥å¯èƒ½ã§ã™ã€‚ +パラメータ㯠10 進数ã€16 進数ã€8 é€²æ•°ã§æŒ‡å®šã§ãã¾ã™ã€‚ +.BR \-c8 +〠+.BR "\-c 8" +〠+.B \-c 010 +〠+.B \-cols 8 +ã¯ã™ã¹ã¦åŒã˜æ„味ã§ã™ã€‚ +.PP +.TP +.IR \-a " | " \-autoskip +オートスキップ: 連続ã—㟠nul 行を一ã¤ã® '*' ã§ç½®ãæ›ãˆã‚‹ã€‚ +.TP +.IR \-b " | " \-bits +ビット (2進数) ダンプ。 +1 オクテット㌠"1" 㨠"0" ã® 8 文字ã§å‡ºåŠ›ã•れã¾ã™ã€‚ +å„行ã®è¡Œé ­ã«ã¯ 16 進数ã®è¡Œç•ªå·ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +行末ã«ã¯ ascii (ã¾ãŸã¯ ebcdic) ã§è¡¨ã—ãŸå ´åˆã®æ–‡å­—ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ \-rã€\-pã€\-i ã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“。 +.TP +.IR "\-c cols " | " \-cols cols" +一行 +.RI < cols > +オクテットã§å‡ºåŠ›ã™ã‚‹ã€‚標準設定㯠16 (\-i: 12, \-ps: 30, \-b: 6)。最大 256。 +.TP +.IR \-E " | " \-EBCDIC +å³ç«¯ã«å‡ºåŠ›ã•れる文字ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚’ ASCII ã‹ã‚‰ EBCDIC ã«å¤‰æ›´ã™ã‚‹ã€‚ +16 進ダンプã®å‡ºåЛ形å¼ã¯å¤‰æ›´ã•れã¾ã›ã‚“。 +\-rã€\-pã€\-i ãŒåŒæ™‚ã«æŒ‡å®šã•れãŸå ´åˆã¯ä½•ã®åŠ¹æžœã‚‚ã‚りã¾ã›ã‚“。 +.TP +.IR "\-g bytes " | " \-groupsize bytes" +出力を +.RI < bytes > +ãƒã‚¤ãƒˆ (2 文字㮠16 進数ã€ã¾ãŸã¯ 8 文字㮠2 進数) ã”ã¨ã«ã‚¹ãƒšãƒ¼ã‚¹ã§åŒºåˆ‡ã‚Šã¾ +ã™ã€‚ +区切らãšã«å‡ºåŠ›ã™ã‚‹ã«ã¯ +.I \-g 0 +を指定ã—ã¦ãã ã•ã„。 +.RI < Bytes > +ã®æ¨™æº–設定㯠\fI2\fP ã§ã™ã€‚2 進ダンプã®å ´åˆã¯ \fI1\fP ã§ã™ã€‚ +ãƒã‚¹ãƒˆã‚¹ã‚¯ãƒªãƒ—ト形å¼ã‚„インクルード形å¼ã§å‡ºåŠ›ã™ã‚‹ã¨ãã¯ã€ã“ã®ã‚ªãƒ—ションã¯ä½¿ã‚ +れã¾ã›ã‚“。 +.TP +.IR \-h " | " \-help +コマンドã®èª¬æ˜Žã‚’出力ã—ã¦çµ‚了ã™ã‚‹ã€‚変æ›ã¯å®Ÿè¡Œã•れã¾ã›ã‚“。 +.TP +.IR \-i " | " \-include +C インクルードファイル形å¼ã§å‡ºåŠ›ã—ã¾ã™ã€‚入力ファイルã®åå‰ãŒä»˜ã‘られãŸé™çš„é… +列ã®å®šç¾©ãŒå‡ºåŠ›ã•れã¾ã™ã€‚標準入力ã®å ´åˆã¯å®šç¾©ã®ä¸­èº«ã ã‘出力ã•れã¾ã™ã€‚ +.TP +.IR "\-l len " | " \-len len" +.RI < len > +オクテットã ã‘出力ã™ã‚‹ã€‚ +.TP +.IR \-p " | " \-ps " | " \-postscript " | " \-plain +ãƒã‚¹ãƒˆã‚¹ã‚¯ãƒªãƒ—ト形å¼ã® 16 進ダンプを出力ã™ã‚‹ã€‚別å プレーン 16 進ダンプ。 +.TP +.IR \-r " | " \-revert +å…ƒã«æˆ»ã™: 16 進ダンプã‹ã‚‰ãƒã‚¤ãƒŠãƒªå½¢å¼ã«å¤‰æ› (ã¾ãŸã¯ãƒ‘ッãƒ) ã—ã¾ã™ã€‚ +ファイルã¸å‡ºåŠ›ã™ã‚‹å ´åˆã€å‡ºåŠ›å…ˆã®ãƒ•ァイルã¯åˆ‡ã‚Šè©°ã‚ã•れã¾ã›ã‚“。 +行番å·ã‚„ç‰¹å®šã®æ›¸å¼ãŒãªã„プレーン 16 進ダンプを読ã¿è¾¼ã‚€å ´åˆã¯ã€ +.I \-r \-p +を指定ã—ã¦ãã ã•ã„ã€‚ç©ºç™½ã¨æ”¹è¡Œã¯ç„¡è¦–ã•れã¾ã™ã€‚ +.TP +.I \-seek offset +.IR \-r +ã®å¾Œã§ä½¿ã‚れãŸå ´åˆ: 16 進ダンプを出力ã™ã‚‹ãƒ•ァイルã®ä½ç½®ã« +.RI < offset > +を加ãˆã‚‹ã€‚ +.TP +.I \-s [+][\-]seek +infile ã® +.RI < seek > +ãƒã‚¤ãƒˆç›® (絶対ä½ç½®ã€ã¾ãŸã¯ç›¸å¯¾ä½ç½®) ã‹ã‚‰é–‹å§‹ã™ã‚‹ã€‚ +\fI+ \fRã¯ã€ç¾åœ¨ã®æ¨™æº–入力ã®ä½ç½®ã‹ã‚‰ç›¸å¯¾çš„ãªä½ç½®ã‚’示ã—ã¾ã™ +(標準入力ã‹ã‚‰èª­ã¿è¾¼ã‚€ã¨ãã®ã¿æ„味ãŒã‚りã¾ã™)。\fI\- \fRã¯ã€å…¥åŠ›ã®çµ‚ã‚りã‹ã‚‰ +ã®æ–‡å­—数を示ã—ã¾ã™ (\fI+\fR ã¨åŒæ™‚ã«æŒ‡å®šã—ãŸå ´åˆã¯ã€ç¾åœ¨ã®æ¨™æº–入力ã®ä½ç½®ã‹ã‚‰ +手å‰ã®ä½ç½®ã‚’示ã—ã¾ã™)。 +\-s 引数を指定ã—ãªã‹ã£ãŸå ´åˆã¯ã€ç¾åœ¨ã®ãƒ•ァイルä½ç½®ã‹ã‚‰é–‹å§‹ã•れã¾ã™ã€‚ +.TP +.I \-u +16 進数ã®è¡¨è¨˜ã«å¤§æ–‡å­—を使ã„ã¾ã™ã€‚指定ãŒãªã„å ´åˆã¯å°æ–‡å­—ã§å‡ºåŠ›ã•れã¾ã™ã€‚ +.TP +.IR \-v " | " \-version +ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’表示ã—ã¾ã™ã€‚ +.SH 警告 +.PP +.I xxd \-r +ã§ã¯è¡Œç•ªå·ã®è©•価ã«é–¢ã—ã¦ã®æš—é»™ã®ãƒ«ãƒ¼ãƒ«ãŒã„ãã¤ã‹ã‚りã¾ã™ã€‚ +出力ファイルãŒã‚·ãƒ¼ã‚¯å¯èƒ½ãªã‚‰ã€å„行ã®è¡Œç•ªå·ãŒé †ç•ªé€šã‚Šã«ä¸¦ã‚“ã§ãªãã¦ã‚‚æ§‹ã„ã¾ã› +ん。ä½ç½®ãŒé£›ã‚“ã§ã„ã¦ã‚‚é‡ãªã£ã¦ã„ã¦ã‚‚大丈夫ã§ã™ã€‚ãã®å ´åˆã€æ¬¡ã®ä½ç½®ã«ç§»å‹•ã™ã‚‹ +ãŸã‚ã« lseek(2) ãŒä½¿ã‚れã¾ã™ã€‚ +出力ファイルãŒã‚·ãƒ¼ã‚¯ä¸å¯ãªã‚‰ã€ã€Œéš™é–“ã€ã ã‘ãŒå‡¦ç†å¯èƒ½ã§ã™ã€‚隙間㯠null ãƒã‚¤ãƒˆ +ã§åŸ‹ã‚られã¾ã™ã€‚ +.PP +.I xxd \-r +ã¯ä¸æ­£ãªå…¥åŠ›ã‚’ã‚¨ãƒ©ãƒ¼ã«ã—ã¾ã›ã‚“。ゴミã¯é™ã‹ã«èª­ã¿é£›ã°ã•れã¾ã™ã€‚ +.PP +16 進ダンプを編集ã™ã‚‹ã¨ãã¯æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚ +.I xxd \-r +ã¯å¿…è¦ãªæ¡ (\-c 引数å‚ç…§) ã ã‘ 16 進データを読ã¿è¾¼ã‚“ã§ã€è¡Œã®æ®‹ã‚Šã‚’無視ã—ã¾ +ã™ã€‚ã¤ã¾ã‚Šã€ascii (ã¾ãŸã¯ ebcdic) を示ã—ã¦ã„る列ã¸ã®å¤‰æ›´ã¯ç„¡è¦–ã•れã¾ã™ã€‚ +xxd \-r \-p ã§ãƒ—ãƒ¬ãƒ¼ãƒ³å½¢å¼ (ãƒã‚¹ãƒˆã‚¹ã‚¯ãƒªãƒ—ト形å¼) ã® 16 é€²ãƒ€ãƒ³ãƒ—ã‚’å…ƒã«æˆ»ã™å ´ +åˆã¯ã€åˆ—ã®æ•°ã¯å½±éŸ¿ã—ã¾ã›ã‚“。 +2 æ¡ã® 16 進数ã¨èªè­˜ã§ãã‚‹ã‚‚ã®ã¯ã™ã¹ã¦å¤‰æ›ã•れã¾ã™ã€‚ +.PP +\fI% xxd \-i file\fR +.br +㨠+.br +\fI% xxd \-i < file\fR +.br +ã®çµæžœã¯é•ã„ã¾ã™ã€‚注æ„ã—ã¦ãã ã•ã„。 +.PP +.I xxd \-s +seek +㨠+.IR "xxd \-s seek" , +ã®é•ã„ã¯ã€lseek(2) を使ã£ã¦å…¥åŠ›ã‚’ "å·»ãæˆ»ã™" ã‹ã©ã†ã‹ã§ã™ã€‚'+' ãŒæ„味をæŒã¤ +ã®ã¯ã€å…¥åŠ›ãŒæ¨™æº–入力ã§ã€xxd ãŒèµ·å‹•ã•れãŸã¨ãã«æ¨™æº–入力ã®ãƒ•ァイルä½ç½®ãŒãƒ•ァイ +ルã®å…ˆé ­ã§ã¯ãªã‹ã£ãŸå ´åˆã§ã™ã€‚ +以下ã®ä¾‹ãŒåˆ†ã‹ã‚Šã‚„ã™ã„ã‹ã‚‚ã—れã¾ã›ã‚“ (ã‚‚ã£ã¨æ··ä¹±ã™ã‚‹ã‹ã‚‚!)... +.PP +`cat' ãŒæ—¢ã«æ¨™æº–入力を終ã‚りã¾ã§èª­ã‚“ã§ã„ã‚‹ã®ã§ã€èª­ã‚€å‰ã«æ¨™æº–å…¥åŠ›ã‚’å·»ãæˆ»ã™å¿… +è¦ãŒã‚る。 +.br +\fI% sh \-c "cat > plain_copy; xxd \-s 0 > hex_copy" < file\fR +.PP +ファイルä½ç½® 0x480 (=1024+128) 剿–¹ã‹ã‚‰ 16 進ダンプã™ã‚‹ã€‚ +`+' 㯠「ç¾åœ¨åœ°ã‹ã‚‰ã®ç›¸å¯¾ä½ç½®ã€ã‚’æ„味ã™ã‚‹ã®ã§ã€dd ㌠1k 処ç†ã—ãŸå¾Œã‹ã‚‰ã€ã•ら +ã« `128' 進ã‚ã¾ã™ã€‚ +.br +\fI% sh \-c "dd of=plain_snippet bs=1k count=1; xxd \-s +128 > hex_snippet" < file\fR +.PP +ファイルä½ç½® 0x100 ( = 1024\-768) ã‹ã‚‰ 16 進ダンプã™ã‚‹ã€‚ +.br +\fI% sh \-c "dd of=plain_snippet bs=1k count=1; xxd \-s +\-768 > hex_snippet" < file\fR +.PP +ã“ã®ã‚ˆã†ãªä½¿ã„æ–¹ã¯ã‚ã¾ã‚Šã—ã¾ã›ã‚“ã—ã€`+' を使ã†ã“ã¨ã‚‚ã»ã¨ã‚“ã©ãªã„ã§ã—ょã†ã€‚ +\-s を使ã†ã¨ãã¯ã„ã¤ã§ã‚‚ã€strace(1) ã‚„ truss(1) を使ã£ã¦ã€xxd ã®åƒãã‚’ãƒã‚§ãƒƒ +クã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ +.SH 例 +.PP +.br +.BR ファイル +ã®æœ€åˆã®ä¸‰è¡Œ (16 進数㧠0x30 ãƒã‚¤ãƒˆ) 以é™ã‚’出力ã™ã‚‹ã€‚ +.br +\fI% xxd \-s 0x30 file\fR +.PP +.br +.BR ファイル +ã®æœ€å¾Œã‹ã‚‰ä¸‰è¡Œ (16 進数㧠0x30 ãƒã‚¤ãƒˆ) を出力ã™ã‚‹ã€‚ +.br +\fI% xxd \-s \-0x30 file\fR +.PP +.br +120 ãƒã‚¤ãƒˆã‚’ã€å¹³æ–‡ 16 進ダンプ形å¼ã§ä¸€è¡Œã« 20 オクテットãšã¤å‡ºåŠ›ã™ã‚‹ã€‚ +.br +\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR +.br +2e54482058584420312022417567757374203139 +.br +39362220224d616e75616c207061676520666f72 +.br +20787864220a2e5c220a2e5c222032317374204d +.br +617920313939360a2e5c22204d616e2070616765 +.br +20617574686f723a0a2e5c2220202020546f6e79 +.br +204e7567656e74203c746f6e79407363746e7567 +.br + +.br +ã“ã® man ページã®å…ˆé ­ã‹ã‚‰ 120 ãƒã‚¤ãƒˆã‚’一行㫠12 オクテットãšã¤ 16 進ダンプ㙠+る。 +.br +\fI% xxd \-l 120 \-c 12 xxd.1\fR +.br +0000000: 2e54 4820 5858 4420 3120 2241 .TH XXD 1 "A +.br +000000c: 7567 7573 7420 3139 3936 2220 ugust 1996" +.br +0000018: 224d 616e 7561 6c20 7061 6765 "Manual page +.br +0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\\ +.br +0000030: 220a 2e5c 2220 3231 7374 204d "..\\" 21st M +.br +000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\\" +.br +0000048: 4d61 6e20 7061 6765 2061 7574 Man page aut +.br +0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\\" +.br +0000060: 546f 6e79 204e 7567 656e 7420 Tony Nugent +.br +000006c: 3c74 6f6e 7940 7363 746e 7567 output_file\fR +.br + +.br +xxd.1 ã®æ—¥ä»˜ã‚’修正ã™ã‚‹ã€‚ +.br +\fI% echo "0000037: 3574 68" | xxd \-r \- xxd.1\fR +.br +\fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR +.br +0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996 +.PP +.br +中身ãŒã™ã¹ã¦ 0x00 ã® 65537 ãƒã‚¤ãƒˆã®ãƒ•ァイルを作æˆã™ã‚‹ã€‚ +ãŸã ã—ã€æœ€å¾Œã®ãƒã‚¤ãƒˆã ã‘㯠'A' (hex 0x41)。 +.br +\fI% echo "010000: 41" | xxd \-r > file\fR +.PP +.br +作æˆã—ãŸãƒ•ァイルをオートスキップを使ã£ã¦ 16 進ダンプã™ã‚‹ã€‚ +.br +\fI% xxd \-a \-c 12 file\fR +.br +0000000: 0000 0000 0000 0000 0000 0000 ............ +.br +* +.br +000fffc: 0000 0000 40 ....A +.PP +一文字㮠'A' ã‹ã‚‰ãªã‚‹ 1 ãƒã‚¤ãƒˆã®ãƒ•ァイルを作æˆã™ã‚‹ã€‚ + '\-r \-s' ã®å¾Œã«æŒ‡å®šã—ãŸæ•°å€¤ãŒãƒ•ァイル中ã®è¡Œç•ªå·ã«åŠ ç®—ã•れã€çµæžœã€ä½™è¨ˆãªãƒ +イトãŒé£›ã°ã•れる。 +.br +\fI% echo "010000: 41" | xxd \-r \-s \-0x10000 > file\fR +.PP +.B vim(1) +ã®ä¸­ã‹ã‚‰ xxd をフィルタã¨ã—ã¦å®Ÿè¡Œã—〠+マークã•れ㟠`a' ã‹ã‚‰ `z' ã¾ã§ã®é ˜åŸŸã‚’ 16 進ダンプã™ã‚‹ã€‚ +.br +\fI:'a,'z!xxd\fR +.PP +.B vim(1) +ã®ä¸­ã‹ã‚‰ xxd をフィルタã¨ã—ã¦å®Ÿè¡Œã—〠+マークã•れ㟠`a' ã‹ã‚‰ `z' ã¾ã§ã®é ˜åŸŸã‚’ãƒã‚¤ãƒŠãƒªã«æˆ»ã™ã€‚ +.br +\fI:'a,'z!xxd \-r\fR +.PP +.B vim(1) +ã®ä¸­ã‹ã‚‰ xxd をフィルタã¨ã—ã¦å®Ÿè¡Œã—〠+16 進ダンプã•れãŸè¡Œã‚’å…ƒã«æˆ»ã™ã€‚戻ã—ãŸã„行ã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’移動ã—ã¦: +.br +\fI!!xxd \-r\fR +.PP +シリアル行ã‹ã‚‰ä¸€æ–‡å­—読ã¿è¾¼ã‚€ +.br +\fI% xxd \-c1 < /dev/term/b &\fR +.br +\fI% stty < /dev/term/b \-echo \-opost \-isig \-icanon min 1\fR +.br +\fI% echo \-n foo > /dev/term/b\fR +.PP +.SH 返り値 +以下ã®ã‚¨ãƒ©ãƒ¼å€¤ãŒè¿”りã¾ã™: +.TP +0 +エラーãªã—。 +.TP +\-1 +æ“作ãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ãªã„ ( +.I xxd \-r \-i +ã¯ã¾ã ä¸å¯ã§ã™)。 +.TP +1 +引数ã®è§£é‡ˆã«é–¢ã™ã‚‹ã‚¨ãƒ©ãƒ¼ã€‚ +.TP +2 +入力ファイルã«é–¢ã™ã‚‹å•題。 +.TP +3 +出力ファイルã«é–¢ã™ã‚‹å•題。 +.TP +4,5 +指定ã•れãŸä½ç½®ã¸ã‚·ãƒ¼ã‚¯ã§ããªã‹ã£ãŸã€‚ +.SH 関連項目 +uuencode(1), uudecode(1), patch(1) +.br +.SH 警告 +ã“ã®å¥‡å¦™ãªãƒ„ールã¯ä½œè€…ãŒä½¿ã„ã‚„ã™ã„よã†ã«ä½œã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ +自己責任ã§ä½¿ã£ã¦ãã ã•ã„。ファイルをコピーã—ã€ãれを調ã¹ã€ã‚¦ã‚£ã‚¶ãƒ¼ãƒ‰ãŸã‚Œã€‚ +.br +.SH ãƒãƒ¼ã‚¸ãƒ§ãƒ³ +ã“ã®ãƒžãƒ‹ãƒ¥ã‚¢ãƒ«ã¯ xxd ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 1.7 ã«ã¤ã„ã¦èª¬æ˜Žã—ã¦ã„ã¾ã™ã€‚ +.SH 著者 +.br +(c) 1990-1997 by Juergen Weigert +.br + +.LP +ç§ã®åŠŸç¸¾ã¨ã—ã¦è‡ªç”±ã«é…布ã—ã¦ãã ã•ã„。 +.br +儲ã‹ã£ãŸã‚‰æ•™ãˆã¦ãã ã•ã„。 +.br +æã—ã¦ã‚‚知りã¾ã›ã‚“。 +.PP +マニュアル㯠Tony Nugent +.br + +.br +ã«ã‚ˆã£ã¦æ›¸ã‹ã‚Œã€ +Bram Moolenaar ãŒå°‘ã—変更を加ãˆã€ +Juergen Weigert ãŒç·¨é›†ã—ã¾ã—ãŸã€‚ +.PP diff --git a/runtime/doc/xxd-pl.1 b/runtime/doc/xxd-pl.1 new file mode 100644 index 0000000000..d9fa9be203 --- /dev/null +++ b/runtime/doc/xxd-pl.1 @@ -0,0 +1,389 @@ +.TH XXD 1 "Sierpieñ 1996" "Strona podrêcznika dla xxd" +.\" +.\" 21st May 1996 +.\" Man page author: +.\" Tony Nugent +.\" Changes by Bram Moolenaar +.SH NAZWA +.I xxd +\- zrzut pliku do hex lub odwrotnie +.SH SYNOPSIS +.B xxd +\-h[elp] +.br +.B xxd +[opcje] [plik_we [plik_wy]] +.br +.B xxd +\-r[evert] [opcje] [plik_we [plik_wy]] +.SH OPIS +.I xxd +tworzy zrzut heksowy podanego pliku lub standardowego wej¶cia. +Mo¿e tak¿e przetworzyæ zrzut heksowy z powrotem do oryginalnej, +binarnej formy. +Podobnie jak +.BR uuencode (1) +i +.BR uudecode (1) +pozwala na przekazanie danych binarnych w bezpiecznej w poczcie formie +ASCII, ale ma zalety dekodowania na standardowe wyj¶cie. +Ponadto mo¿na go u¿yæ do binarnego ³atania plików. +.SH OPCJE +Je¶li nie podano +.I plik_we +xxd czyta ze standardowego wej¶cia. +Je¶li okre¶lono +.I plik_we +jako znak +.RB \` \- ' +wtedy dane wej¶ciowe czytane s± ze standardowego wej¶cia. +Je¶li nie podano +.I plik_wy +(lub podano jako +.RB \` \- ' +), wyniki s± wysy³ane na standardowe wyj¶cie. +.PP +Pamiêtaj, ¿e u¿yty zosta³ "leniwy" parser, który nie sprawdza wiêcej +ni¿ pierwszej litery opcji (o ile ta nie zosta³a obdarzona +parametrem). Spacje miêdzy jedno literowymi opcjami i ich parametrami +s± opcjonalne. Parametry opcji mog± byæ okre¶lone w notacji dziesiêtnej, +heksadecymalej lub oktalnej. +St±d +.BR \-c8 , +.BR "\-c 8" , +.B \-c 010 +i +.B \-cols 8 +s± sobie równowa¿ne. +.PP +.TP +.IR \-a " | " \-autoskip +prze³±cza autoskip: pojedyncza '*' zastêpuje linie nul. Domy¶lnie +wy³±czone. +.TP +.IR \-b " | " \-bits +Prze³±cza do zrzutu bitowego (cyfr binarnych) zamiast heksowego. +Opcja ta zapisuje oktety jako osiem cyfr 1 lub 0 zamiast normalnego +zrzutu heksowego. Ka¿da linia jest poprzedzona przez +heksadecymalny numer linii a po nim jego reprezentacj± w ascii (lub +ebcdic). Opcje linii poleceñ \-r, \-p, \-i nie dzia³aj± w tym +trybie. +.TP +.IR "\-c cols " | " \-cols cols" +formatuje liczbê +.RI < cols > +oktetów na wiersz. Domy¶lnie 16 (\-i: 12, \-ps: 30, \-b: 6). Maks. +256. +.TP +.IR \-E " | "\-EBCDIC +zmienia kodowanie znaków w prawej kolumnie z ASCII na EBCDIC. +Nie zmienia prezentacji heksadecymalej. Opcja nie dzia³a w po³±czeniu +z \-r, \-p lub \-i. +.TP +.IR "\-g bajtów " | " \-groupsize bajtów" +oddziela wyj¶cie ka¿dych +.RI < bajtów > +bajtów (dwa heksowe znaki lub osiem cyfr binarnych ka¿de) przez bia³y +znak. +Okre¶l +.I \-g 0 +by wy³±czyæ grupowanie. +.RI < Bajtów "> domy¶lnie jest " 2 +w trybie normalnym i \fI1\fP w trybie bitów. +Grupowanie nie dzia³a w trybie postscriptu lub w³±czania. +.TP +.IR \-h " | " \-help +wypisuje podsumowanie dostêpnych poleceñ i koñczy dzia³anie. Nie +zostaje przeprowadzony ¿aden zrzut. +.TP +.IR \-i " | " \-include +wyj¶cie w stylu w³±czania pliku w C. Zostaje zapisana kompletna +statyczna tablica definicji (nazwana wed³ug pliku wej¶cia), o ile xxd +nie czyta ze standardowego wej¶cia. +.TP +.IR "\-l len " | "\-len len" +zakoñcz po wypisaniu +.RI < len > +oktetów. +.TP +.IR \-p " | " \-ps " | " \-postscript " | " \-plain +wyj¶cie w postcriptowym ci±g³ym stylu zrzutu heksowego. Znany tak¿e +jako zwyk³y zrzut heksowy. +.TP +.IR \-r " | " \-revert +odwróæ operacjê: przekonwertuj (lub za³ataj) zrzut heksowy w binarkê. +Je¶li nie zapisuje na standardowe wyj¶cie, xxd zapisze plik wyj¶ciowy +bez obcinania go. U¿yj kombinacji +.I \-r \-p +by odczytaæ zwyk³y zrzut heksadecymalny bez numerów linii +i okre¶lonego uk³adu kolumn. Dodatkowe bia³e znaki i ³amanie wierszy +s± wszêdzie dozwolone. +.TP +.I \-seek offset +Kiedy u¿yty po +.IR \-r : +odwraca z +.RI < offset > +dodanym do pozycji w pliku odnalezionym w zrzucie heksowym. +.TP +.I \-s [+][\-]seek +zaczyna na +.RI < seek > +bajtów bezwglêdnego (lub wzglêdnego) offsetu pliku wej¶ciowego. +\fI+ \fRwskazuje, ¿e seek jest wzglêdne do bie¿±cej pozycji pliku (bez +znaczenia je¶li nie wczytuje ze standardowego wej¶cia). \fI\- \fRwskazuje +¿e seek powinno byæ o tyle znaków od koñca wej¶cia (lub je¶li +po³±czone z \fI+\fR: przed bie¿±c± pozycj± pliku na standardowym +wej¶ciu). +Bez opcji \-s xxd zaczyna od bie¿±cej pozycji w pliku. +.TP +.I \-u +u¿yj wielkich liter w znakach heksowych. Domy¶lnie s± ma³e znaki. +.TP +.IR \-v " | " \-version +pokazuje wersjê programu. +.SH OSTRZE¯ENIA +.PP +.I xxd \-r +potrafi okre¶liæ numery linii. Je¶li plik wyj¶cia jest mo¿liwy do +przeszukania wtedy numery linii na pocz±tku wiersza zrzutu heksowego +mog± byæ nie po kolei, mo¿e brakowaæ wierszy lub nak³adaæ siê na +siebie. W takich wypadkach xxd u¿yje lseek(2) by znale¼æ nastêpn± +pozycjê. Je¶li plik wyj¶ciowy nie jest mo¿liwy do przeszukania mo¿liwe +s± tylko przerwy, które zostan± wype³nione bajtami null. +.PP +.I xxd \-r +nigdy nie podaje b³êdów analizy. ¦mieci s± po cichu ignorowane. +.PP +W czasie edycji zrzutów heksowych, proszê zauwa¿yæ ¿e +.I xxd \-r +pomija wszystko w linii wej¶cia po odczytaniu wystarczaj±cej ilo¶ci +kolumn danych heksadecymalnych (zobacz opcjê \-c). Oznacza to tak¿e, +¿e zmiany w drukowanych kolumnach ascii (lub ebcdic) s± zawsze +ignorowane. Odwrócenie zwyk³ego (lub postscriptowego) stylu zrzutu +poprzez xxd \-r \-p nie zale¿y od kolejno¶ci kolumn. Tutaj cokolwiek +co wygl±da jak para znaków heks jest interpretowane. +.PP +Zauwa¿ ró¿nicê miêdzy +.br +\fI% xxd \-i plik\fR +.br +i +.br +\fI% xxd \-i < plik\fR +.PP +.I xxd \-s \+seek +mo¿e byæ ró¿ne od +.IR "xxd \-s seek" , +poniewa¿ lseek(2) jest u¿yty do "przewiniêcie" wej¶cia. '+' stanowi +ró¿nicê je¶li ¼ród³em wej¶cia jest standardowe wej¶cie i je¶li pozycja +w pliku ze standardowego wej¶cia nie jest pocz±tkiem pliku w chwili +uruchomienia xxd. Nastêpuj±ce przyk³ady mog± wyja¶niæ (lub bardziej +zmyliæ!)... +.PP +Przewiñ standardowe wej¶cie przed przeczytaniem; potrzebne poniewa¿ +`cat' ju¿ odczyta³ do koñca standardowego wej¶cia. +.br +\fI% sh \-c 'cat > zwyk³a_kopia; xxd \-s 0 > hex_kopia' < plik\fR +.PP +Zrzut heksowy od pozycji pliku 0x480 (=1024+128) w przód. +Znak `+' oznacza "wzglêdny wobec bie¿±cej pozycji", st±d `128' dodaje +do 1k gdzie zakoñczy³ dd. +.br +\fI% sh \-c 'dd of=plain_snippet bs=1k count=1; xxd \-s +128 > hex_snippet' < file\fR +.PP +Zrzut heksowy od pozycji pliku 0x100 ( = 1024\-768) dalej. +.br +\fI% sh \-c 'dd of=plain_snippet bs=1k count=1; xxd \-s +-768 > hex_snippet' < file\fR +.PP +Jakkolwiek, jest to rzadka sytuacja i u¿ycie `+' jest rzadko +potrzebne. +Autor woli monitorowaæ dzia³anie xxd przy pomocy strace(1) lub truss(1) kiedy \-s jest u¿yte. +.SH PRZYK£ADY +.PP +.br +Wypisz wszystko z wyj±tkiem pierwszych trzech linii (heksowe 0x30 bajtów) +.B pliku +\. +.br +\fI% xxd \-s 0x30 plik\fR +.PP +.br +Wypisz trzy linie (heksowe 0x30 bajtów) z koñca +.B pliku +\. +.br +\fI% xxd \-s \-0x30 plik\fR +.PP +.br +Wypisz 120 bajtów jako ci±g³y zrzut heksowy z 20 oktetami na liniê. +.br +\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR +.br +2e54482058584420312022417567757374203139 +.br +39362220224d616e75616c207061676520666f72 +.br +20787864220a2e5c220a2e5c222032317374204d +.br +617920313939360a2e5c22204d616e2070616765 +.br +20617574686f723a0a2e5c2220202020546f6e79 +.br +204e7567656e74203c746f6e79407363746e7567 +.br + +.br +Zrzut heksowy z pierwszymi 120 bajtami tej strony podrêcznika z 12 +oktetami na liniê. +.br +\fI% xxd \-l 120 \-c 12 xxd.1\fR +.br +0000000: 2e54 4820 5858 4420 3120 2241 .TH XXD 1 "A +.br +000000c: 7567 7573 7420 3139 3936 2220 ugust 1996" +.br +0000018: 224d 616e 7561 6c20 7061 6765 "Manual page +.br +0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\\ +.br +0000030: 220a 2e5c 2220 3231 7374 204d "..\\" 21st M +.br +000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\\" +.br +0000048: 4d61 6e20 7061 6765 2061 7574 Man page aut +.br +0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\\" +.br +0000060: 546f 6e79 204e 7567 656e 7420 Tony Nugent +.br +000006c: 3c74 6f6e 7940 7363 746e 7567 plik_wy\fR +.br + +.br +Podmieñ datê w pliku xxd.1 +.br +\fI% echo '0000037: 3574 68' | xxd \-r \- xxd.1\fR +.br +\fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR +.br +0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996 +.PP +.br +Utwórz plik o 65537 bajtach, wszystkich równych 0x00, +z wyj±tkiem ostatniego, który ma byæ 'A' (hex 0x41). +.br +\fI% echo '010000: 41' | xxd \-r \> plik\fR +.PP +.br +Zrzut heksowy tego pliku z autoskipem. +.br +\fI% xxd \-a \-c 12 plik\fR +.br +0000000: 0000 0000 0000 0000 0000 0000 ............ +.br +* +.br +000fffc: 0000 0000 40 ....A +.PP +Utwórz jedno bajtowy plik zawieraj±cy pojedncz± literê 'A'. +Liczba po '\-r \-s' dodaje numery linii znalezione w pliku; +w efekcie poprzedzaj±ce bajty s± ukryte. +.br +\fI% echo '010000: 41' | xxd \-r \-s \-0x10000 \> plik\fR +.PP +U¿yj xxd jako filtra wewn±trz edytora takiego jak +.B vim(1) +aby uzyskaæ zrzut heksowy zakresu miêdzy markerami `a' i `z'. +.br +\fI:'a,'z!xxd\fR +.PP +U¿yj xxd jako filtra wewn±trz edytora takiego jak +.B vim(1) +by odzyskaæ binarny zrzut heksowy zakresu pomiêdzy markerami `a' +i `z'. +.br +\fI:'a,'z!xxd \-r\fR +.PP +U¿yj xxd jako filtra wewn±trz edytora takiego jak +.B vim(1) +by odzyskaæ jedn± liniê zrzutu heksowego. Przejd¼ z kursorem na liniê +i wpisz: +.br +\fI!!xxd \-r\fR +.PP +Odczytaj pojednycze znaki z portu szeregowego +.br +\fI% xxd \-c1 < /dev/term/b &\fR +.br +\fI% stty < /dev/term/b \-echo \-opost \-isig \-icanon min 1\fR +.br +\fI% echo \-n foo > /dev/term/b\fR +.PP +.SH "ZWRACANE WARTO¦CI" +Zwracane s± nastêpuj±ce warto¶ci b³êdów: +.TP +0 +nie znaleziono b³êdów. +.TP +\-1 +operacja nie jest wspierana ( +.I xxd \-r \-i +ca³y czas niemo¿liwa). +.TP +1 +b³±d w czasie analizowania opcji. +.TP +2 +problemy z plikiem wej¶ciowym. +.TP +3 +problemy z plikiem wyj¶ciowym. +.TP +4,5 +¿±dana pozycja jest nieosi±galna. +.SH "ZOBACZ TAK¯E" +uuencode(1), uudecode(1), patch(1) +.br +.SH OSTRZE¯ENIA +Dziwaczno¶æ narzêdzi dorównuje dziwaczno¶ci mózgu twórcy. +U¿ywaj wy³±cznie na w³asn± odpowiedzialno¶æ. Kopiuj pliki. Analizuj +je. Stañ siê czarodziejem. +.br +.SH WERSJA +Strona podrêcznika opisuje xxd w wersji 1.7 +.SH AUTOR +.br +(c) 1990-1997 by Juergen Weigert +.br + +.LP +Kopiuj do woli i podaj moje dane, +.br +zarabiaj pieni±dze i dziel siê ze mn±, +.br +traæ pieni±dze i nie miej do mnie pretensji. +.PP +Strona podrêcznika zapocz±tkowana przez Tony'ego Nugenta +.br + +.br +Ma³e zmiany: Bram Moolenaar. +Redakcja: Juergen Weigert. +.PP diff --git a/runtime/doc/xxd-pl.UTF-8.1 b/runtime/doc/xxd-pl.UTF-8.1 new file mode 100644 index 0000000000..e63ce64b74 --- /dev/null +++ b/runtime/doc/xxd-pl.UTF-8.1 @@ -0,0 +1,389 @@ +.TH XXD 1 "SierpieÅ„ 1996" "Strona podrÄ™cznika dla xxd" +.\" +.\" 21st May 1996 +.\" Man page author: +.\" Tony Nugent +.\" Changes by Bram Moolenaar +.SH NAZWA +.I xxd +\- zrzut pliku do hex lub odwrotnie +.SH SYNOPSIS +.B xxd +\-h[elp] +.br +.B xxd +[opcje] [plik_we [plik_wy]] +.br +.B xxd +\-r[evert] [opcje] [plik_we [plik_wy]] +.SH OPIS +.I xxd +tworzy zrzut heksowy podanego pliku lub standardowego wejÅ›cia. +Może także przetworzyć zrzut heksowy z powrotem do oryginalnej, +binarnej formy. +Podobnie jak +.BR uuencode (1) +i +.BR uudecode (1) +pozwala na przekazanie danych binarnych w bezpiecznej w poczcie formie +ASCII, ale ma zalety dekodowania na standardowe wyjÅ›cie. +Ponadto można go użyć do binarnego Å‚atania plików. +.SH OPCJE +JeÅ›li nie podano +.I plik_we +xxd czyta ze standardowego wejÅ›cia. +JeÅ›li okreÅ›lono +.I plik_we +jako znak +.RB \` \- ' +wtedy dane wejÅ›ciowe czytane sÄ… ze standardowego wejÅ›cia. +JeÅ›li nie podano +.I plik_wy +(lub podano jako +.RB \` \- ' +), wyniki sÄ… wysyÅ‚ane na standardowe wyjÅ›cie. +.PP +PamiÄ™taj, że użyty zostaÅ‚ "leniwy" parser, który nie sprawdza wiÄ™cej +niż pierwszej litery opcji (o ile ta nie zostaÅ‚a obdarzona +parametrem). Spacje miÄ™dzy jedno literowymi opcjami i ich parametrami +sÄ… opcjonalne. Parametry opcji mogÄ… być okreÅ›lone w notacji dziesiÄ™tnej, +heksadecymalej lub oktalnej. +StÄ…d +.BR \-c8 , +.BR "\-c 8" , +.B \-c 010 +i +.B \-cols 8 +sÄ… sobie równoważne. +.PP +.TP +.IR \-a " | " \-autoskip +przełącza autoskip: pojedyncza '*' zastÄ™puje linie nul. DomyÅ›lnie +wyłączone. +.TP +.IR \-b " | " \-bits +Przełącza do zrzutu bitowego (cyfr binarnych) zamiast heksowego. +Opcja ta zapisuje oktety jako osiem cyfr 1 lub 0 zamiast normalnego +zrzutu heksowego. Każda linia jest poprzedzona przez +heksadecymalny numer linii a po nim jego reprezentacjÄ… w ascii (lub +ebcdic). Opcje linii poleceÅ„ \-r, \-p, \-i nie dziaÅ‚ajÄ… w tym +trybie. +.TP +.IR "\-c cols " | " \-cols cols" +formatuje liczbÄ™ +.RI < cols > +oktetów na wiersz. DomyÅ›lnie 16 (\-i: 12, \-ps: 30, \-b: 6). Maks. +256. +.TP +.IR \-E " | "\-EBCDIC +zmienia kodowanie znaków w prawej kolumnie z ASCII na EBCDIC. +Nie zmienia prezentacji heksadecymalej. Opcja nie dziaÅ‚a w połączeniu +z \-r, \-p lub \-i. +.TP +.IR "\-g bajtów " | " \-groupsize bajtów" +oddziela wyjÅ›cie każdych +.RI < bajtów > +bajtów (dwa heksowe znaki lub osiem cyfr binarnych każde) przez biaÅ‚y +znak. +OkreÅ›l +.I \-g 0 +by wyłączyć grupowanie. +.RI < Bajtów "> domyÅ›lnie jest " 2 +w trybie normalnym i \fI1\fP w trybie bitów. +Grupowanie nie dziaÅ‚a w trybie postscriptu lub włączania. +.TP +.IR \-h " | " \-help +wypisuje podsumowanie dostÄ™pnych poleceÅ„ i koÅ„czy dziaÅ‚anie. Nie +zostaje przeprowadzony żaden zrzut. +.TP +.IR \-i " | " \-include +wyjÅ›cie w stylu włączania pliku w C. Zostaje zapisana kompletna +statyczna tablica definicji (nazwana wedÅ‚ug pliku wejÅ›cia), o ile xxd +nie czyta ze standardowego wejÅ›cia. +.TP +.IR "\-l len " | "\-len len" +zakoÅ„cz po wypisaniu +.RI < len > +oktetów. +.TP +.IR \-p " | " \-ps " | " \-postscript " | " \-plain +wyjÅ›cie w postcriptowym ciÄ…gÅ‚ym stylu zrzutu heksowego. Znany także +jako zwykÅ‚y zrzut heksowy. +.TP +.IR \-r " | " \-revert +odwróć operacjÄ™: przekonwertuj (lub zaÅ‚ataj) zrzut heksowy w binarkÄ™. +JeÅ›li nie zapisuje na standardowe wyjÅ›cie, xxd zapisze plik wyjÅ›ciowy +bez obcinania go. Użyj kombinacji +.I \-r \-p +by odczytać zwykÅ‚y zrzut heksadecymalny bez numerów linii +i okreÅ›lonego ukÅ‚adu kolumn. Dodatkowe biaÅ‚e znaki i Å‚amanie wierszy +sÄ… wszÄ™dzie dozwolone. +.TP +.I \-seek offset +Kiedy użyty po +.IR \-r : +odwraca z +.RI < offset > +dodanym do pozycji w pliku odnalezionym w zrzucie heksowym. +.TP +.I \-s [+][\-]seek +zaczyna na +.RI < seek > +bajtów bezwglÄ™dnego (lub wzglÄ™dnego) offsetu pliku wejÅ›ciowego. +\fI+ \fRwskazuje, że seek jest wzglÄ™dne do bieżącej pozycji pliku (bez +znaczenia jeÅ›li nie wczytuje ze standardowego wejÅ›cia). \fI\- \fRwskazuje +że seek powinno być o tyle znaków od koÅ„ca wejÅ›cia (lub jeÅ›li +połączone z \fI+\fR: przed bieżącÄ… pozycjÄ… pliku na standardowym +wejÅ›ciu). +Bez opcji \-s xxd zaczyna od bieżącej pozycji w pliku. +.TP +.I \-u +użyj wielkich liter w znakach heksowych. DomyÅ›lnie sÄ… maÅ‚e znaki. +.TP +.IR \-v " | " \-version +pokazuje wersjÄ™ programu. +.SH OSTRZEÅ»ENIA +.PP +.I xxd \-r +potrafi okreÅ›lić numery linii. JeÅ›li plik wyjÅ›cia jest możliwy do +przeszukania wtedy numery linii na poczÄ…tku wiersza zrzutu heksowego +mogÄ… być nie po kolei, może brakować wierszy lub nakÅ‚adać siÄ™ na +siebie. W takich wypadkach xxd użyje lseek(2) by znaleźć nastÄ™pnÄ… +pozycjÄ™. JeÅ›li plik wyjÅ›ciowy nie jest możliwy do przeszukania możliwe +sÄ… tylko przerwy, które zostanÄ… wypeÅ‚nione bajtami null. +.PP +.I xxd \-r +nigdy nie podaje błędów analizy. Åšmieci sÄ… po cichu ignorowane. +.PP +W czasie edycji zrzutów heksowych, proszÄ™ zauważyć że +.I xxd \-r +pomija wszystko w linii wejÅ›cia po odczytaniu wystarczajÄ…cej iloÅ›ci +kolumn danych heksadecymalnych (zobacz opcjÄ™ \-c). Oznacza to także, +że zmiany w drukowanych kolumnach ascii (lub ebcdic) sÄ… zawsze +ignorowane. Odwrócenie zwykÅ‚ego (lub postscriptowego) stylu zrzutu +poprzez xxd \-r \-p nie zależy od kolejnoÅ›ci kolumn. Tutaj cokolwiek +co wyglÄ…da jak para znaków heks jest interpretowane. +.PP +Zauważ różnicÄ™ miÄ™dzy +.br +\fI% xxd \-i plik\fR +.br +i +.br +\fI% xxd \-i < plik\fR +.PP +.I xxd \-s \+seek +może być różne od +.IR "xxd \-s seek" , +ponieważ lseek(2) jest użyty do "przewiniÄ™cie" wejÅ›cia. '+' stanowi +różnicÄ™ jeÅ›li źródÅ‚em wejÅ›cia jest standardowe wejÅ›cie i jeÅ›li pozycja +w pliku ze standardowego wejÅ›cia nie jest poczÄ…tkiem pliku w chwili +uruchomienia xxd. NastÄ™pujÄ…ce przykÅ‚ady mogÄ… wyjaÅ›nić (lub bardziej +zmylić!)... +.PP +PrzewiÅ„ standardowe wejÅ›cie przed przeczytaniem; potrzebne ponieważ +`cat' już odczytaÅ‚ do koÅ„ca standardowego wejÅ›cia. +.br +\fI% sh \-c 'cat > zwykÅ‚a_kopia; xxd \-s 0 > hex_kopia' < plik\fR +.PP +Zrzut heksowy od pozycji pliku 0x480 (=1024+128) w przód. +Znak `+' oznacza "wzglÄ™dny wobec bieżącej pozycji", stÄ…d `128' dodaje +do 1k gdzie zakoÅ„czyÅ‚ dd. +.br +\fI% sh \-c 'dd of=plain_snippet bs=1k count=1; xxd \-s +128 > hex_snippet' < file\fR +.PP +Zrzut heksowy od pozycji pliku 0x100 ( = 1024\-768) dalej. +.br +\fI% sh \-c 'dd of=plain_snippet bs=1k count=1; xxd \-s +-768 > hex_snippet' < file\fR +.PP +Jakkolwiek, jest to rzadka sytuacja i użycie `+' jest rzadko +potrzebne. +Autor woli monitorować dziaÅ‚anie xxd przy pomocy strace(1) lub truss(1) kiedy \-s jest użyte. +.SH PRZYKÅADY +.PP +.br +Wypisz wszystko z wyjÄ…tkiem pierwszych trzech linii (heksowe 0x30 bajtów) +.B pliku +\. +.br +\fI% xxd \-s 0x30 plik\fR +.PP +.br +Wypisz trzy linie (heksowe 0x30 bajtów) z koÅ„ca +.B pliku +\. +.br +\fI% xxd \-s \-0x30 plik\fR +.PP +.br +Wypisz 120 bajtów jako ciÄ…gÅ‚y zrzut heksowy z 20 oktetami na liniÄ™. +.br +\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR +.br +2e54482058584420312022417567757374203139 +.br +39362220224d616e75616c207061676520666f72 +.br +20787864220a2e5c220a2e5c222032317374204d +.br +617920313939360a2e5c22204d616e2070616765 +.br +20617574686f723a0a2e5c2220202020546f6e79 +.br +204e7567656e74203c746f6e79407363746e7567 +.br + +.br +Zrzut heksowy z pierwszymi 120 bajtami tej strony podrÄ™cznika z 12 +oktetami na liniÄ™. +.br +\fI% xxd \-l 120 \-c 12 xxd.1\fR +.br +0000000: 2e54 4820 5858 4420 3120 2241 .TH XXD 1 "A +.br +000000c: 7567 7573 7420 3139 3936 2220 ugust 1996" +.br +0000018: 224d 616e 7561 6c20 7061 6765 "Manual page +.br +0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\\ +.br +0000030: 220a 2e5c 2220 3231 7374 204d "..\\" 21st M +.br +000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\\" +.br +0000048: 4d61 6e20 7061 6765 2061 7574 Man page aut +.br +0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\\" +.br +0000060: 546f 6e79 204e 7567 656e 7420 Tony Nugent +.br +000006c: 3c74 6f6e 7940 7363 746e 7567 plik_wy\fR +.br + +.br +PodmieÅ„ datÄ™ w pliku xxd.1 +.br +\fI% echo '0000037: 3574 68' | xxd \-r \- xxd.1\fR +.br +\fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR +.br +0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996 +.PP +.br +Utwórz plik o 65537 bajtach, wszystkich równych 0x00, +z wyjÄ…tkiem ostatniego, który ma być 'A' (hex 0x41). +.br +\fI% echo '010000: 41' | xxd \-r \> plik\fR +.PP +.br +Zrzut heksowy tego pliku z autoskipem. +.br +\fI% xxd \-a \-c 12 plik\fR +.br +0000000: 0000 0000 0000 0000 0000 0000 ............ +.br +* +.br +000fffc: 0000 0000 40 ....A +.PP +Utwórz jedno bajtowy plik zawierajÄ…cy pojednczÄ… literÄ™ 'A'. +Liczba po '\-r \-s' dodaje numery linii znalezione w pliku; +w efekcie poprzedzajÄ…ce bajty sÄ… ukryte. +.br +\fI% echo '010000: 41' | xxd \-r \-s \-0x10000 \> plik\fR +.PP +Użyj xxd jako filtra wewnÄ…trz edytora takiego jak +.B vim(1) +aby uzyskać zrzut heksowy zakresu miÄ™dzy markerami `a' i `z'. +.br +\fI:'a,'z!xxd\fR +.PP +Użyj xxd jako filtra wewnÄ…trz edytora takiego jak +.B vim(1) +by odzyskać binarny zrzut heksowy zakresu pomiÄ™dzy markerami `a' +i `z'. +.br +\fI:'a,'z!xxd \-r\fR +.PP +Użyj xxd jako filtra wewnÄ…trz edytora takiego jak +.B vim(1) +by odzyskać jednÄ… liniÄ™ zrzutu heksowego. Przejdź z kursorem na liniÄ™ +i wpisz: +.br +\fI!!xxd \-r\fR +.PP +Odczytaj pojednycze znaki z portu szeregowego +.br +\fI% xxd \-c1 < /dev/term/b &\fR +.br +\fI% stty < /dev/term/b \-echo \-opost \-isig \-icanon min 1\fR +.br +\fI% echo \-n foo > /dev/term/b\fR +.PP +.SH "ZWRACANE WARTOÅšCI" +Zwracane sÄ… nastÄ™pujÄ…ce wartoÅ›ci błędów: +.TP +0 +nie znaleziono błędów. +.TP +\-1 +operacja nie jest wspierana ( +.I xxd \-r \-i +caÅ‚y czas niemożliwa). +.TP +1 +błąd w czasie analizowania opcji. +.TP +2 +problemy z plikiem wejÅ›ciowym. +.TP +3 +problemy z plikiem wyjÅ›ciowym. +.TP +4,5 +żądana pozycja jest nieosiÄ…galna. +.SH "ZOBACZ TAKÅ»E" +uuencode(1), uudecode(1), patch(1) +.br +.SH OSTRZEÅ»ENIA +Dziwaczność narzÄ™dzi dorównuje dziwacznoÅ›ci mózgu twórcy. +Używaj wyłącznie na wÅ‚asnÄ… odpowiedzialność. Kopiuj pliki. Analizuj +je. StaÅ„ siÄ™ czarodziejem. +.br +.SH WERSJA +Strona podrÄ™cznika opisuje xxd w wersji 1.7 +.SH AUTOR +.br +(c) 1990-1997 by Juergen Weigert +.br + +.LP +Kopiuj do woli i podaj moje dane, +.br +zarabiaj pieniÄ…dze i dziel siÄ™ ze mnÄ…, +.br +trać pieniÄ…dze i nie miej do mnie pretensji. +.PP +Strona podrÄ™cznika zapoczÄ…tkowana przez Tony'ego Nugenta +.br + +.br +MaÅ‚e zmiany: Bram Moolenaar. +Redakcja: Juergen Weigert. +.PP diff --git a/runtime/doc/xxd-ru.1 b/runtime/doc/xxd-ru.1 new file mode 100644 index 0000000000..111946ab52 --- /dev/null +++ b/runtime/doc/xxd-ru.1 @@ -0,0 +1,408 @@ +.TH XXD 1 "August 1996" "óÔÒÁÎÉÃÁ man ÄÌÑ xxd" +.\" +.\" 21st May 1996 +.\" Man page author: +.\" Tony Nugent +.\" Changes by Bram Moolenaar +.SH éíñ +.I xxd +\- ÓÏÚÄÁ£Ô ÐÒÅÄÓÔÁ×ÌÅÎÉÅ ÆÁÊÌÁ × ×ÉÄÅ ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÙÈ ËÏÄÏ× ÉÌÉ ×ÙÐÏÌÎÑÅÔ +ÏÂÒÁÔÎÏÅ ÐÒÅÏÂÒÁÚÏ×ÁÎÉÅ. +.SH ëïíáîäîáñ óôòïëá +.B xxd +\-h[elp] +.br +.B xxd +[ËÌÀÞÉ] [×ÈÏÄÎÏÊ_ÆÁÊÌ [×ÙÈÏÄÎÏÊ_ÆÁÊÌ]] +.br +.B xxd +\-r[evert] [ËÌÀÞÉ] [×ÈÏÄÎÏÊ_ÆÁÊÌ [×ÙÈÏÄÎÏÊ_ÆÁÊÌ]] +.SH ïðéóáîéå +.I xxd +ÓÏÚÄÁ£Ô ÐÒÅÄÓÔÁ×ÌÅÎÉÅ ÕËÁÚÁÎÎÏÇÏ ÆÁÊÌÁ ÉÌÉ ÄÁÎÎÙÈ, ÐÒÏÞÉÔÁÎÎÙÈ ÉÚ ÐÏÔÏËÁ +ÓÔÁÎÄÁÒÔÎÏÇÏ ××ÏÄÁ, × ×ÉÄÅ ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÙÈ ËÏÄÏ×. üÔÁ ËÏÍÁÎÄÁ ÔÁËÖÅ ÍÏÖÅÔ +×ÙÐÏÌÎÉÔØ ÏÂÒÁÔÎÏÅ ÐÒÅÏÂÒÁÚÏ×ÁÎÉÅ ÚÁÄÁÎÎÙÈ ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÙÍÉ ËÏÄÁÍÉ ÄÁÎÎÙÈ +× ÉÓÈÏÄÎÙÊ ÂÉÎÁÒÎÙÊ ÆÏÒÍÁÔ. +ðÏÄÏÂÎÏ ËÏÍÁÎÄÁÍ +.BR uuencode(1) +É +.BR uudecode(1), +ÏÎÁ ÐÏÚ×ÏÌÑÅÔ ×ÙÐÏÌÎÑÔØ ÐÒÅÏÂÒÁÚÏ×ÁÎÉÅ ÂÉÎÁÒÎÙÈ ÄÁÎÎÙÈ × ASCII-ËÏÄ, +ËÏÔÏÒÙÊ ÍÏÖÎÏ ÐÅÒÅÄÁ×ÁÔØ ÐÏ ÜÌÅËÔÒÏÎÎÏÊ ÐÏÞÔÅ, ÏÄÎÁËÏ, ÐÏÍÉÍÏ ÜÔÏÇÏ, ÐÒÏÇÒÁÍÍÁ +xxd ÐÏÚ×ÏÌÑÅÔ ×ÙÐÏÌÎÑÔØ ÄÅËÏÄÉÒÏ×ÁÎÉÅ × ÐÏÔÏË ÓÔÁÎÄÁÒÔÎÏÇÏ ×Ù×ÏÄÁ, +Á ÔÁËÖÅ ÍÏÖÅÔ ÐÒÉÍÅÎÑÔØÓÑ ÄÌÑ ÓÏÚÄÁÎÉÑ ÚÁÐÌÁÔÏË ÄÌÑ ÂÉÎÁÒÎÙÈ ÆÁÊÌÏ×. +.SH ëìàþé úáðõóëá +åÓÌÉ +.I ×ÈÏÄÎÏÊ_ÆÁÊÌ +ÎÅ ÚÁÄÁÎ, ÔÏ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÅ ÄÁÎÎÙÅ ÞÉÔÁÀÔÓÑ ÉÚ ÐÏÔÏËÁ ÓÔÁÎÄÁÒÔÎÏÇÏ ××ÏÄÁ. +÷ ÓÌÕÞÁÅ, ÅÓÌÉ × ËÁÞÅÓÔ×Å +.I ×ÈÏÄÎÏÇÏ_ÆÁÊÌÁ +ÉÓÐÏÌØÚÕÅÔÓÑ ÓÉÍ×ÏÌ +.RB \` \- ', +ÉÓÔÏÞÎÉËÏÍ ÄÁÎÎÙÈ ÔÁËÖÅ ×ÙÓÔÕÐÁÅÔ ÐÏÔÏË ÓÔÁÎÄÁÒÔÎÏÇÏ ××ÏÄÁ. +÷ ÔÏÍ ÓÌÕÞÁÅ, ÅÓÌÉ ÎÅ ÕËÁÚÁÎ +.I ×ÙÈÏÄÎÏÊ_ÆÁÊÌ +(ÉÌÉ ×ÍÅÓÔÏ ÎÅÇÏ ÉÓÐÏÌØÚÕÅÔÓÑ ÓÉÍ×ÏÌ +.RB \` \- ' +), ÒÅÚÕÌØÔÁÔ ÐÒÅÏÂÒÁÚÏ×ÁÎÉÑ ÎÁÐÒÁ×ÌÑÅÔÓÑ × ÐÏÔÏË ÓÔÁÎÄÁÒÔÎÏÇÏ ×Ù×ÏÄÁ. +.PP +ïÂÒÁÔÉÔÅ ×ÎÉÍÁÎÉÅ, ÞÔÏ ÉÓÐÏÌØÚÕÅÔÓÑ "ÌÅÎÉ×ÙÊ" ÁÌÇÏÒÉÔÍ ÒÁÚÂÏÒÁ ËÌÀÞÅÊ, ËÏÔÏÒÙÊ ÎÅ +ÐÒÏ×ÅÒÑÅÔ ÂÏÌÅÅ ÏÄÎÏÊ ÂÕË×Ù ËÌÀÞÁ, ÅÓÌÉ × ÜÔÏÍ ËÌÀÞÅ ÎÅ ÉÓÐÏÌØÚÕÅÔÓÑ ÐÁÒÁÍÅÔÒ. +ðÒÏÂÅÌÙ ÍÅÖÄÕ ÅÄÉÎÓÔ×ÅÎÎÙÍ ÓÉÍ×ÏÌÏÍ ËÌÀÞÁ É ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÍ ÐÁÒÁÍÅÔÒÏÍ ÎÅ Ñ×ÌÑÀÔÓÑ +ÏÂÑÚÁÔÅÌØÎÙÍÉ. ðÁÒÁÍÅÔÒÙ ËÌÀÞÅÊ ÍÏÇÕÔ ÂÙÔØ ÚÁÄÁÎÙ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÄÅÓÑÔÉÞÎÏÇÏ, +ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÏÇÏ ÉÌÉ ×ÏÓØÍÅÒÉÞÎÏÇÏ ÆÏÒÍÁÔÁ. +ôÁËÉÍ ÏÂÒÁÚÏÍ, ËÌÀÞÉ +.BR \-c8 , +.BR "\-c 8" , +.B \-c 010 +É +.B \-cols 8 +Ñ×ÌÑÀÔÓÑ ÒÁ×ÎÏÚÎÁÞÎÙÍÉ. +.PP +.TP +.IR \-a " | " \-autoskip +÷ËÌÀÞÁÅÔ Á×ÔÏÍÁÔÉÞÅÓËÉÊ ÐÒÏÐÕÓË: ×ÍÅÓÔÏ ÐÏÓÌÅÄÏ×ÁÔÅÌØÎÏÓÔÉ +ÎÕÌÅ×ÙÈ ÓÔÒÏË ÉÓÐÏÌØÚÕÅÔÓÑ ÏÄÉÎÏÞÎÙÊ ÓÉÍ×ÏÌ '*'. ðÏ ÕÍÏÌÞÁÎÉÀ +ÎÅ ÐÒÉÍÅÎÑÅÔÓÑ. +.TP +.IR \-b " | " \-bits +÷ÍÅÓÔÏ ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÏÇÏ ËÏÄÁ ÉÓÐÏÌØÚÕÀÔÓÑ ÂÉÔÙ (Ä×ÏÉÞÎÙÅ ÃÉÆÒÙ). +ðÒÉ ÉÓÐÏÌØÚÏ×ÁÎÉÉ ÜÔÏÇÏ ËÌÀÞÁ ×ÍÅÓÔÏ ÏÂÙÞÎÏÇÏ ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÏÇÏ ÐÒÅÄÓÔÁ×ÌÅÎÉÑ +ÏËÔÅÔÏ× ÉÓÐÏÌØÚÕÀÔÓÑ ÎÁÂÏÒÙ ÉÚ ×ÏÓØÍÉ ÓÉÍ×ÏÌÏ× "1" É "0". ëÁÖÄÁÑ ÓÔÒÏËÁ +ÐÒÅÄ×ÁÒÑÅÔÓÑ ÎÏÍÅÒÏÍ ÓÔÒÏËÉ × ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÏÍ ×ÉÄÅ, Á ÚÁ×ÅÒÛÁÅÔÓÑ ÓÉÍ×ÏÌØÎÙÍ +ÐÒÅÄÓÔÁ×ÌÅÎÉÅÍ (× ×ÉÄÅ ascii ÉÌÉ ebcdic). ëÌÀÞÉ \-r, \-p, \-i × ÜÔÏÍ ÒÅÖÉÍÅ +ÎÅ ÒÁÂÏÔÁÀÔ. +.TP +.IR "\-c ËÏÌ " | " \-cols ËÏÌ" +úÁÄÁ£Ô ËÏÌÉÞÅÓÔ×Ï ÏËÔÅÔÏ× +.RI < ËÏÌ >, +ËÏÔÏÒÏÅ ×Ù×ÏÄÉÔÓÑ ÎÁ ËÁÖÄÏÊ ÓÔÒÏËÅ. ðÏ ÕÍÏÌÞÁÎÉÀ ÉÓÐÏÌØÚÕÅÔÓÑ ÚÎÁÞÅÎÉÅ 16 +(\-i: 12, \-ps: 30, \-b: 6). +íÁËÓÉÍÁÌØÎÏ ÄÏÐÕÓÔÉÍÏÅ ÚÎÁÞÅÎÉÅ: 256. +.TP +.IR \-E " | " \-EBCDIC +éÚÍÅÎÑÅÔ ÓÐÏÓÏ ËÏÄÉÒÏ×ÁÎÉÑ ÓÉÍ×ÏÌÏ× × ÐÒÁ×ÏÊ ËÏÌÏÎËÅ Ó ASCII ÎÁ EBCDIC. üÔÏÔ ËÌÀÞ +ÎÅ ÉÚÍÅÎÑÅÔ ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÏÅ ÐÒÅÄÓÔÁ×ÌÅÎÉÅ. äÁÎÎÙÊ ËÌÀÞ ÎÅ ÉÍÅÅÔ ÓÍÙÓÌÁ, +ÅÓÌÉ ÉÓÐÏÌØÚÕÀÔÓÑ ËÌÀÞÉ \-r, \-p ÉÌÉ \-i. +.TP +.IR "\-g ÂÁÊÔ " | " \-groupsize ÂÁÊÔ" +ðÏÚ×ÏÌÑÅÔ ×ÙÐÏÌÎÑÔØ ÇÒÕÐÐÉÒÏ×ËÕ ÕËÁÚÁÎÎÏÇÏ ËÏÌÉÞÅÓÔ×Á +.RI < ÂÁÊÔÏ× > +(Ä×Å ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÙÅ ÃÉÆÒÙ ÉÌÉ ×ÏÓÅÍØ ÂÉÔÏ×), ÏÔÄÅÌÑÑ ÇÒÕÐÐÙ ÄÒÕÇ ÏÔ ÄÒÕÇÁ ÐÒÏÂÅÌÁÍÉ. +úÎÁÞÅÎÉÅ +.I \-g 0 +ÐÒÉÍÅÎÑÅÔÓÑ ÄÌÑ ÏÔËÁÚÁ ÏÔ ÉÓÐÏÌØÚÏ×ÁÎÉÑ ÇÒÕÐÐÉÒÏ×ËÉ. +ðÏ ÕÍÏÌÞÁÎÉÀ ÉÓÐÏÌØÚÕÅÔÓÑ ÚÎÁÞÅÎÉÅ +.RI < ÂÁÊÔ "> ÒÁ×ÎÏÅ " 2 +× ÏÂÙÞÎÏÍ ÒÅÖÉÍÅ É \fI1\fP × ÂÉÔÏ×ÏÍ ÒÅÖÉÍÅ. çÒÕÐÐÉÒÏ×ËÁ ÎÅ ÐÒÉÍÅÎÑÅÔÓÑ +× ÒÅÖÉÍÁÈ postscript É include. +.TP +.IR \-h " | " \-help +÷Ù×ÏÄÉÔ ÓÐÒÁ×ËÕ ÐÏ ÄÏÓÔÕÐÎÙÍ ËÌÀÞÁÍ ËÏÍÁÎÄÎÏÊ ÓÔÒÏËÉ É ÚÁ×ÅÒÛÁÅÔ ÒÁÂÏÔÕ ÐÒÏÇÒÁÍÍÙ. +óÏÚÄÁÎÉÅ ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÏÇÏ ÐÒÅÄÓÔÁ×ÌÅÎÉÑ ÎÅ ×ÙÐÏÌÎÑÅÔÓÑ. +.TP +.IR \-i " | " \-include +ðÏÚ×ÏÌÑÅÔ ÓÏÚÄÁ×ÁÔØ ×Ù×ÏÄ × ÓÔÉÌÅ ÐÏÄËÌÀÞÁÅÍÙÈ ÚÁÇÏÌÏ×ÏÞÎÙÈ ÆÁÊÌÏ× ÑÚÙËÁ C. +÷Ù×ÏÄ ÓÏÄÅÒÖÉÔ ÐÏÌÎÏÃÅÎÎÏÅ ÏÐÒÅÄÅÌÅÎÉÅ ÓÔÁÔÉÞÅÓËÏÇÏ ÍÁÓÓÉ×Á ÄÁÎÎÙÈ, ÉÍÑ ËÏÔÏÒÏÇÏ +ÓÏÏÔ×ÅÔÓÔ×ÕÅÔ ÉÍÅÎÉ ×ÈÏÄÎÏÇÏ ÆÁÊÌÁ, ÅÓÌÉ xxd ÎÅ ÓÞÉÔÙ×ÁÅÔ ÄÁÎÎÙÅ ÉÚ ÐÏÔÏËÁ ÓÔÁÎÄÁÒÔÎÏÇÏ +××ÏÄÁ. +.TP +.IR "\-l ÄÌÉÎÁ " | " \-len ÄÌÉÎÁ" +úÁ×ÅÒÛÁÅÔ ÒÁÂÏÔÕ ÐÏÓÌÅ ÚÁÐÉÓÉ ÚÁÄÁÎÎÏÇÏ × ÐÁÒÁÍÅÔÒÅ +.RI < ÄÌÉÎÁ > +ËÏÌÉÞÅÓÔ×Á ÏËÔÅÔÏ×. +.TP +.IR \-p " | " \-ps " | " \-postscript " | " \-plain +éÓÐÏÌØÚÕÅÔ ÎÅÐÒÅÒÙ×ÎÙÊ ÆÏÒÍÁÔ ×Ù×ÏÄÁ ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÏÇÏ ËÏÄÁ, +ÉÚ×ÅÓÔÎÙÊ ËÁË "ÐÒÏÓÔÏÊ" ÓÔÉÌØ ÉÌÉ ÓÔÉÌØ "postscript". +.TP +.IR \-r " | " \-revert +éÚÍÅÎÑÅÔ ÓÍÙÓÌ ÏÐÅÒÁÃÉÉ ÎÁ ÐÒÏÔÉ×ÏÐÏÌÏÖÎÙÊ: ÐÏÚ×ÏÌÑÅÔ ×ÙÐÏÌÎÑÔØ ÐÒÅÏÂÒÁÚÏ×ÁÎÉÅ +ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÏÇÏ ÐÒÅÄÓÔÁ×ÌÅÎÉÑ × ÂÉÎÁÒÎÙÊ ËÏÄ (ÉÌÉ ÐÒÉÍÅÎÑÔØ ÒÅÚÕÌØÔÁÔ × ËÁÞÅÓÔ×Å ÚÁÐÌÁÔÙ). +åÓÌÉ ×Ù×ÏÄ ÐÒÏÉÓÈÏÄÉÔ ÎÅ × ÐÏÔÏË ÓÔÁÎÄÁÒÔÎÏÇÏ ×Ù×ÏÄÁ, ÔÏ xxd ×ÙÐÏÌÎÑÅÔ ÄÏÂÁ×ÌÅÎÉÅ ËÏÄÁ +Ë ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÍÕ ÆÁÊÌÕ. ðÒÉ ÉÓÐÏÌØÚÏ×ÁÎÉÉ ËÏÍÂÉÎÁÃÉÉ ËÌÀÞÅÊ +.I \-r \-p +ÐÒÏÉÓÈÏÄÉÔ ÞÔÅÎÉÅ "ÐÒÏÓÔÏÇÏ" ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÏÇÏ ÐÒÅÄÓÔÁ×ÌÅÎÉÑ ÂÅÚ ÉÓÐÏÌØÚÏ×ÁÎÉÑ +ÉÎÆÏÒÍÁÃÉÉ Ï ÎÏÍÅÒÁÈ ÓÔÒÏË É ËÁËÏÇÏ-ÌÉÂÏ ÓÐÅÃÉÁÌØÎÏÇÏ ÒÁÓËÒÏÑ ËÏÌÏÎÏË. ðÒÏÂÅÌÙ +É ÓÉÍ×ÏÌÙ ÎÏ×ÏÊ ÓÔÒÏËÉ ÍÏÇÕÔ ×ÓÔÒÅÞÁÔØÓÑ × ÌÀÂÏÍ ÍÅÓÔÅ ÉÓÈÏÄÎÙÈ ÄÁÎÎÙÈ. +.TP +.I \-seek ÓÍÅÝÅÎÉÅ +ðÒÉ ÉÓÐÏÌØÚÏ×ÁÎÉÉ ÐÏÓÌÅ ËÌÀÞÁ +.I \-r +: ÄÏÂÁ×ÌÑÔØ ÕËÁÚÁÎÎÏÅ +.RI < ÓÍÅÝÅÎÉÅ > +Ë ÆÁÊÌÏ×ÙÍ ÐÏÚÉÃÉÑÍ, ÏÂÎÁÒÕÖÅÎÎÙÍ × ÉÓÈÏÄÎÙÈ ÄÁÎÎÙÈ. +.TP +.I \-s [\+][\-]seek +îÁÞÉÎÁÅÔ ÒÁÂÏÔÕ Ó ÕËÁÚÁÎÎÏÇÏ ÁÂÓÏÌÀÔÎÏÇÏ (ÉÌÉ ÏÔÎÏÓÉÔÅÌØÎÏÇÏ) +.RI < ÓÍÅÝÅÎÉÑ > +× ÂÁÊÔÁÈ ×Ï ×ÈÏÄÎÏÍ_ÆÁÊÌÅ. +\fI\+ \fRÕËÁÚÙ×ÁÅÔ, ÞÔÏ ÓÍÅÝÅÎÉÅ Ñ×ÌÑÅÔÓÑ ÏÔÎÏÓÉÔÅÌØÎÙÍ ÐÏ ÏÔÎÏÛÅÎÉÀ +Ë ÔÅËÕÝÅÊ ÆÁÊÌÏ×ÏÊ ÐÏÚÉÃÉÉ × ÐÏÔÏËÅ ÓÔÁÎÄÁÒÔÎÏÇÏ ××ÏÄÁ (ÂÅÓÓÍÙÓÌÅÎÎÏ, ÅÓÌÉ ÞÔÅÎÉÅ +ÐÒÏÉÓÈÏÄÉÔ ÎÅ ÉÚ ÐÏÔÏËÁ ÓÔÁÎÄÁÒÔÎÏÇÏ ××ÏÄÁ). \fI\- \fRÕËÁÚÙ×ÁÅÔ, ÞÔÏ ÄÏÌÖÎÏ ÂÙÔØ ÐÒÏÞÉÔÁÎÏ +ÕËÁÚÁÎÎÏÅ ËÏÌÉÞÅÓÔ×Ï ÓÉÍ×ÏÌÏ× ÏÔ ËÏÎÃÁ ××ÏÄÁ (ÌÉÂÏ, ÅÓÌÉ ÓÏÞÅÔÁÅÔÓÑ Ó \fI \+ \fR: +ÐÅÒÅÄ ÔÅËÕÝÅÊ ÐÏÚÉÃÉÉ ÆÁÊÌÁ × ÐÏÔÏËÅ ÓÔÁÎÄÁÒÔÎÏÇÏ ××ÏÄÁ). +åÓÌÉ ËÌÀÞ \-s ÎÅ ÉÓÐÏÌØÚÕÅÔÓÑ, ÔÏ xxd ÎÁÞÉÎÁÅÔ ÒÁÂÏÔÕ ÏÔ ÔÅËÕÝÅÊ ÐÏÚÉÃÉÉ × ÆÁÊÌÅ. +.TP +.I \-u +éÓÐÏÌØÚÕÅÔ ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÙÅ ÃÉÆÒÙ × ×ÅÒÈÎÅÍ ÒÅÇÉÓÔÒÅ. ðÏ ÕÍÏÌÞÁÎÉÀ ÉÓÐÏÌØÚÕÀÔÓÑ ÃÉÆÒÙ × +ÎÉÖÎÅÍ ÒÅÇÉÓÔÒÅ ÓÉÍ×ÏÌÏ×. +.TP +.IR \-v " | " \-version +ïÔÏÂÒÁÖÁÅÔ ÉÎÆÏÒÍÁÃÉÀ Ï ×ÅÒÓÉÉ ÐÒÏÇÒÁÍÍÙ. +.SH ðïä÷ïäîùå ëáíîé +.PP +.I xxd \-r +ÏÂÌÁÄÁÅÔ ×ÓÔÒÏÅÎÎÙÍ ÉÎÔÅÌÌÅËÔÏÍ ÄÌÑ ÒÁÓÐÏÚÎÁ×ÁÎÉÑ ÉÎÆÏÒÍÁÃÉÉ Ï ÎÏÍÅÒÁÈ ÓÔÒÏË. +åÓÌÉ ×ÏÚÍÏÖÅÎ ÐÏÉÓË ÐÏ ×ÈÏÄÎÏÍÕ ÆÁÊÌÕ, ÔÏ ÎÏÍÅÒÁ ÓÔÒÏË × ÎÁÞÁÌÅ ËÁÖÄÏÊ ÓÔÒÏËÉ +ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÏÇÏ ÐÒÅÄÓÔÁ×ÌÅÎÉÑ ÍÏÇÕÔ ÂÙÔØ ÎÅÕÐÏÒÑÄÏÞÅÎÎÙÍÉ, ÎÅËÏÔÏÒÙÅ ÓÔÒÏËÉ ÍÏÇÕÔ +ÂÙÔØ ÐÒÏÐÕÝÅÎÙ ÉÌÉ ÐÅÒÅÓÅËÁÔØÓÑ ÄÒÕÇ Ó ÄÒÕÇÏÍ. ÷ ÜÔÉÈ ÓÌÕÞÁÑÈ xxd ÉÓÐÏÌØÚÕÅÔ +lseek(2) ÄÌÑ ÐÅÒÅÈÏÄÁ Ë ÓÌÅÄÕÀÝÅÊ ÐÏÚÉÃÉÉ. åÓÌÉ ÐÏÉÓË ÐÏ ×ÈÏÄÎÏÍÕ ÆÁÊÌÕ +ÎÅ×ÏÚÍÏÖÅÎ, ÔÏ ÄÏÐÕÓÔÉÍÙ ÔÏÌØËÏ ÐÒÏÐÕÓËÉ ÓÔÒÏË, ËÏÔÏÒÙÅ ÚÁÐÏÌÎÑÀÔÓÑ ÎÕÌÅ×ÙÍÉ +ÂÁÊÔÁÍÉ. +.PP +.I xxd \-r +ÎÉËÏÇÄÁ ÎÅ ×Ù×ÏÄÉÔ ÓÏÏÂÝÅÎÉÊ Ï ÏÛÉÂËÁÈ. íÕÓÏÒ ÐÒÏÐÕÓËÁÅÔÓÑ ÍÏÌÞÁ. +.PP +ðÒÉ ÒÅÄÁËÔÉÒÏ×ÁÎÉÉ ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÙÈ ÐÒÅÄÓÔÁ×ÌÅÎÉÊ ÂÉÎÁÒÎÙÈ ÆÁÊÌÏ× ÏÂÒÁÝÁÊÔÅ +×ÎÉÍÁÎÉÅ, ÞÔÏ +.I xxd \-r +ÐÒÏÐÕÓËÁÅÔ × ÓÔÒÏËÅ ××ÏÄÁ ÌÀÂÙÅ ÄÁÎÎÙÅ ÐÏÓÌÅ ÐÒÏÞÔÅÎÉÑ ÄÏÓÔÁÔÏÞÎÏÇÏ ËÏÌÉÞÅÓÔ×Á +ËÏÌÏÎÏË ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÙÈ ÄÁÎÎÙÈ (ÓÍ. ËÌÀÞ \-c). üÔÏ ÏÚÎÁÞÁÅÔ, ÞÔÏ ÉÚÍÅÎÅÎÉÑ, +×ÎÅÓÅÎÎÙÅ × ËÏÌÏÎËÉ Ó ÐÅÞÁÔÎÙÍÉ ÓÉÍ×ÏÌÁÍÉ ascii (ÉÌÉ ebcdic), ×ÓÅÇÄÁ ÉÇÎÏÒÉÒÕÀÔÓÑ. +ðÒÉ ÏÂÒÁÔÎÏÍ ÐÒÅÏÂÒÁÚÏ×ÁÎÉÉ ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÏÇÏ ÐÒÅÄÓÔÁ×ÌÅÎÉÑ × ÓÔÉÌÅ +postscript Ó ÐÏÍÏÝØÀ ËÏÍÁÎÄÙ xxd \-r \-p ËÏÌÉÞÅÓÔ×Ï ËÏÌÏÎÏË ÎÅ ÕÞÉÔÙ×ÁÅÔÓÑ. +÷ ÜÔÏÍ ÓÌÕÞÁÅ ÒÁÓÐÏÚÎÁÀÔÓÑ ×ÓÅ ÓÉÍ×ÏÌÙ, ËÏÔÏÒÙÅ ÐÏÈÏÖÉ ÎÁ ÐÁÒÙ ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÙÈ ÃÉÆÒ. +.PP +ïÂÒÁÔÉÔÅ ×ÎÉÍÁÎÉÅ ÎÁ ÒÁÚÌÉÞÉÅ ÍÅÖÄÕ ËÏÍÁÎÄÁÍÉ +.PP +\fI% xxd \-i ÆÁÊÌ\fR +.PP +É +.PP +\fI% xxd \-i \< ÆÁÊÌ\fR +.PP +ëÏÍÁÎÄÁ +.I xxd \-s \+seek +ÍÏÖÅÔ ÏÔÌÉÞÁÔØÓÑ ÏÔ +.I xxd \-s seek, +ÐÏÓËÏÌØËÕ ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ "ÏÔÍÏÔÁÔØ" ÄÁÎÎÙÅ ÎÁ ×ÈÏÄÅ ÎÁÚÁÄ, ÉÓÐÏÌØÚÕÅÔÓÑ ×ÙÚÏ× lseek(2). +ðÒÉ ÉÓÐÏÌØÚÏ×ÁÎÉÉ `+' ÐÏ×ÅÄÅÎÉÅ ÂÕÄÅÔ ÏÔÌÉÞÁÔØÓÑ, ÅÓÌÉ ×ÈÏÄÎÙÅ ÄÁÎÎÙÅ +ÐÏÓÔÕÐÁÀÔ Ó ÐÏÔÏËÁ ÓÔÁÎÄÁÒÔÎÏÇÏ ××ÏÄÁ, Á ÐÏÚÉÃÉÑ × ÆÁÊÌÅ ÓÔÁÎÄÁÒÔÎÏÇÏ ××ÏÄÁ ÎÅ ÎÁÈÏÄÉÔÓÑ +× ÎÁÞÁÌÅ ÆÁÊÌÁ Ë ÔÏÍÕ ÍÏÍÅÎÔÕ, ËÏÇÄÁ ÐÒÏÇÒÁÍÍÁ xxd ÚÁÐÕÝÅÎÁ É ÐÒÉÓÔÕÐÁÅÔ Ë ÞÔÅÎÉÀ ××ÏÄÁ. +îÉÖÅÓÌÅÄÕÀÝÉÅ ÐÒÉÍÅÒÙ ÐÏÍÏÇÕÔ ÐÒÏÑÓÎÉÔØ (ÉÌÉ ÅÝ£ ÂÏÌØÛÅ ÚÁÐÕÔÁÔØ!) ÓÉÔÕÁÃÉÀ... +.PP +ïÔÍÏÔËÁ ÎÁÚÁÄ ÐÏÔÏËÁ ÓÔÁÎÄÁÒÔÎÏÇÏ ××ÏÄÁ; ÎÅÏÂÈÏÄÉÍÏ, ÐÏÓËÏÌØËÕ 'cat' ÕÖÅ ×ÙÐÏÌÎÉÌÁ +ÞÔÅÎÉÅ ÄÏ ËÏÎÃÁ ÐÏÔÏËÁ ÓÔÁÎÄÁÒÔÎÏÇÏ ××ÏÄÁ: +.PP +\fI% sh \-c 'cat > plain_copy; xxd \-s 0 > hex_copy' < file +.PP +÷Ù×ÏÄ ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÏÇÏ ÐÒÅÄÓÔÁ×ÌÅÎÉÑ ÏÔ ÐÏÚÉÃÉÉ × ÆÁÊÌÅ 0x480 +(= 1024+128). +óÉÍ×ÏÌ `+' ÏÚÎÁÞÁÅÔ "ÏÔÎÏÓÉÔÅÌØÎÏ ÔÅËÕÝÅÊ ÐÏÚÉÃÉÉ", ÔÁËÉÍ ÏÂÒÁÚÏÍ `128' ÄÏÂÁ×ÌÑÅÔÓÑ +Ë ÐÅÒ×ÏÍÕ ËÉÌÏÂÁÊÔÕ, ÇÄÅ ÚÁ×ÅÒÛÁÅÔ ÒÁÂÏÔÕ dd: +.PP +\fI% sh \-c 'dd of=plain_snippet bs=1k count=1; xxd \-s +128 > hex_snippet' < file +.PP +÷Ù×ÏÄ ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÏÇÏ ÐÒÅÄÓÔÁ×ÌÅÎÉÑ ÏÔ ÐÏÚÉÃÉÉ × ÆÁÊÌÅ 0x100 +(= 1024-768): +.PP +\fI% sh \-c 'dd of=plain_snippet bs=1k count=1; xxd \-s +-768 > hex_snippet' < file +.PP +÷ ÔÏ ÖÅ ×ÒÅÍÑ, ÓÌÅÄÕÅÔ ÚÁÍÅÔÉÔØ, ÞÔÏ ÐÏÄÏÂÎÙÅ ÓÉÔÕÁÃÉÉ ×ÓÔÒÅÞÁÀÔÓÑ ÄÏ×ÏÌØÎÏ ÒÅÄËÏ, +ÔÁË ÞÔÏ ÓÉÍ×ÏÌ `+' ÏÂÙÞÎÏ ÎÅ ÉÓÐÏÌØÚÕÅÔÓÑ. á×ÔÏÒ ÐÒÅÄÐÏÞÉÔÁÅÔ ÎÁÂÌÀÄÁÔØ ÚÁ ÒÁÂÏÔÏÊ +xxd Ó ÐÏÍÏÝØÀ strace(1) ÉÌÉ truss(1) × ÔÅÈ ÓÌÕÞÁÑÈ, ËÏÇÄÁ ÐÒÉÍÅÎÑÅÔÓÑ ËÌÀÞ +\-s. +.SH ðòéíåòù +.PP +.br +÷Ù×ÅÓÔÉ ×Ó£, ËÒÏÍÅ ÐÅÒ×ÙÈ ÔÒ£È ÓÔÒÏË (0x30 ÂÁÊÔÏ×) ÆÁÊÌÁ +.B file +: +.PP +\fI% xxd \-s 0x30 file +.PP +.br +÷Ù×ÅÓÔÉ ÔÒÉ ÓÔÒÏËÉ (0x30 ÂÁÊÔÏ×) ÏÔ ËÏÎÃÁ ÆÁÊÌÁ +.B file +: +.PP +\fI% xxd \-s \-0x30 file +.PP +.br +÷Ù×ÅÓÔÉ 120 ÂÁÊÔÏ× × ×ÉÄÅ ÎÅÐÒÅÒÙ×ÎÏÇÏ ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÏÇÏ ÐÒÅÄÓÔÁ×ÌÅÎÉÑ +ÐÏ 20 ÏËÔÅÔÏ× × ÓÔÒÏËÅ: +.PP +\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR +.br +2e544820585844203120224d616e75616c207061 +.br +676520666f7220787864220a2e5c220a2e5c2220 +.br +32317374204d617920313939360a2e5c22204d61 +.br +6e207061676520617574686f723a0a2e5c222020 +.br +2020546f6e79204e7567656e74203c746f6e7940 +.br +7363746e7567656e2e7070702e67752e6564752e +.br +.PP +.br +÷Ù×ÅÓÔÉ ÐÅÒ×ÙÅ 120 ÂÁÊÔÏ× ÜÔÏÊ ÓÔÒÁÎÉÃÙ ÓÐÒÁ×ÏÞÎÉËÁ ÐÏ 12 ÏËÔÅÔÏ× × ÓÔÒÏËÅ: +.PP +\fI% xxd \-l 120 \-c 12 xxd.1\fR +.br +0000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M +.br +000000c: 616e 7561 6c20 7061 6765 2066 anual page f +.br +0000018: 6f72 2078 7864 220a 2e5c 220a or xxd"..\\". +.br +0000024: 2e5c 2220 3231 7374 204d 6179 .\\" 21st May +.br +0000030: 2031 3939 360a 2e5c 2220 4d61 1996..\\" Ma +.br +000003c: 6e20 7061 6765 2061 7574 686f n page autho +.br +0000048: 723a 0a2e 5c22 2020 2020 546f r:..\\" To +.br +0000054: 6e79 204e 7567 656e 7420 3c74 ny Nugent ×ÙÈÏÄÎÏÊ_ÆÁÊÌ\fR +.br +.PP +.br +úÁÍÅÎÉÔØ ÄÁÔÕ × ÆÁÊÌÅ xxd.1: +.PP +\fI% echo '0000029: 3574 68' | xxd \-r \- xxd.1\fR +.br +\fI% xxd \-s 0x28 \-l 12 \-c 12 xxd.1\fR +.br +0000028: 3235 7468 204d 6179 2031 3939 25th May 199 +.PP +.br +óÏÚÄÁÔØ 65537-ÂÁÊÔÎÙÊ ÆÁÊÌ, ×ÓÅ ÂÁÊÔÙ ËÏÔÏÒÏÇÏ ÉÍÅÀÔ ÚÎÁÞÅÎÉÅ +0x00, ËÒÏÍÅ ÐÏÓÌÅÄÎÅÇÏ ÂÁÊÔÁ, ËÏÔÏÒÙÊ ÄÏÌÖÅÎ ÉÍÅÔØ ÚÎÁÞÅÎÉÅ 'A' +(0x41): +.PP +\fI% echo '010000: 41' | xxd \-r \> file\fR +.PP +.br +óÏÚÄÁÔØ ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÏÅ ÐÒÅÄÓÔÁ×ÌÅÎÉÅ ÜÔÏÇÏ ÆÁÊÌÁ Ó +ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ Á×ÔÏÍÁÔÉÞÅÓËÏÇÏ ÐÒÏÐÕÓËÁ: +.PP +\fI% xxd \-a \-c 12 file\fR +.br +0000000: 0000 0000 0000 0000 0000 0000 ............ +.br +* +.br +000fffc: 0000 0000 40 ....A +.PP +óÏÚÄÁÔØ 1-ÂÁÊÔÎÙÊ ÆÁÊÌ, ÓÏÄÅÒÖÁÝÉÊ ÓÉÍ×ÏÌ 'A'. +þÉÓÌÏ ÐÏÓÌÅ '\-r \-s' ÄÏÂÁ×ÌÑÅÔÓÑ Ë ÎÏÍÅÒÁÍ ÓÔÒÏË, ÎÁÊÄÅÎÎÙÍ × ÆÁÊÌÅ; +ÉÎÁÞÅ ÇÏ×ÏÒÑ, ÐÒÅÄÛÅÓÔ×ÕÀÝÉÅ ÂÁÊÔÙ ÐÒÏÐÕÓËÁÀÔÓÑ: +.PP +\fI% echo '010000: 41' | xxd \-r \-s \-0x10000 \> file\fR +.PP +xxd ÍÏÖÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ × ËÁÞÅÓÔ×Å ÆÉÌØÔÒÁ × ÒÅÄÁËÔÏÒÅ, ÎÁÐÒÉÍÅÒ × +.B vim(1), +ÞÔÏÂÙ ÓÏÚÄÁÔØ ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÏÅ ÐÒÅÄÓÔÁ×ÌÅÎÉÅ ÏÂÌÁÓÔÉ ÍÅÖÄÕ +ÏÔÍÅÔËÁÍÉ `a' É `z': +.PP +\fI:'a,'z!xxd\fR +.PP +÷Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ xxd × ËÁÞÅÓÔ×Å ÆÉÌØÔÒÁ × ÒÅÄÁËÔÏÒÅ, ÎÁÐÒÉÍÅÒ × +.B vim(1), +ÄÌÑ ×ÏÓÓÔÁÎÏ×ÌÅÎÉÑ ÄÁÎÎÙÈ ÉÚ ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÏÇÏ ÐÒÅÄÓÔÁ×ÌÅÎÉÑ +ÍÅÖÄÕ ÏÔÍÅÔËÁÍÉ `a' É `z': +.PP +\fI:'a,'z!xxd \-r\fR +.PP +÷Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ xxd × ËÁÞÅÓÔ×Å ÆÉÌØÔÒÁ × ÒÅÄÁËÔÏÒÅ, ÎÁÐÒÉÍÅÒ × +.B vim(1), +ÄÌÑ ×ÏÓÓÔÁÎÏ×ÌÅÎÉÑ ÄÁÎÎÙÈ ÉÚ ÅÄÉÎÓÔ×ÅÎÎÏÊ ÓÔÒÏËÉ +ÛÅÓÔÎÁÄÃÁÔÅÒÉÞÎÏÇÏ ÐÒÅÄÓÔÁ×ÌÅÎÉÑ. ðÏÍÅÓÔÉÔÅ ËÕÒÓÏÒ × ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÕÀ ÓÔÒÏËÕ +É ÎÁÂÅÒÉÔÅ +.PP +\fI!!xxd \-r\fR +.PP +þÔÏÂÙ ÐÒÏÞÉÔÁÔØ ÅÄÉÎÓÔ×ÅÎÎÙÊ ÓÉÍ×ÏÌ ÉÚ ËÁÎÁÌÁ Ó×ÑÚÉ: +.PP +\fI% xxd \-c1 < /dev/term/b &\fR +.br +\fI% stty < /dev/term/b \-echo \-opost \-isig \-icanon min 1\fR +.br +\fI% echo \-n foo > /dev/term/b\fR +.PP +.SH ÷ïú÷òáýáåíùå úîáþåîéñ +ðÒÏÇÒÁÍÍÁ xxd ÚÁ×ÅÒÛÁÅÔ ÒÁÂÏÔÕ ÓÏ ÓÌÅÄÕÀÝÉÍÉ ÚÎÁÞÅÎÉÑÍÉ: +.TP +0 +ïÛÉÂËÉ ÎÅ ÏÂÎÁÒÕÖÅÎÙ. +.TP +\-1 +ïÐÅÒÁÃÉÑ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ (×ÙÐÏÌÎÅÎÉÅ +.I xxd \-r \-i +ÐÏËÁ ÎÅ×ÏÚÍÏÖÎÏ). +.TP +1 +ïÛÉÂËÁ ÐÒÉ ÒÁÚÂÏÒÅ ËÌÀÞÅÊ ËÏÍÁÎÄÎÏÊ ÓÔÒÏËÉ. +.TP +2 +ðÒÏÂÌÅÍÙ ×Ï ×ÈÏÄÎÏÍ ÆÁÊÌÅ. +.TP +3 +ðÒÏÂÌÅÍÙ × ×ÙÈÏÄÎÏÍ ÆÁÊÌÅ. +.TP +4,5 +öÅÌÁÔÅÌØÎÁÑ ÐÏÚÉÃÉÑ ÐÏÉÓËÁ ÎÅÄÏÓÔÉÖÉÍÁ. +.SH óíïôòé ôáëöå +uuencode(1), uudecode(1), patch(1) +.br +.SH ðòåäõðòåöäåîéå +óÔÒÁÎÎÏÓÔØ ÜÔÏÊ ÐÒÏÇÒÁÍÍÙ ÓÏÏÔ×ÅÔÓÔ×ÕÅÔ ÏÓÏÂÅÎÎÏÓÔÑÍ ÍÏÚÇÁ Å£ ÓÏÚÄÁÔÅÌÑ. +éÓÐÏÌØÚÕÊÔŠţ ÎÁ Ó×ÏÊ ÓÔÒÁÈ É ÒÉÓË. ëÏÐÉÒÕÊÔÅ ÆÁÊÌÙ, ÏÔÓÌÅÖÉ×ÁÊÔÅ +×ÙÚÏ×Ù, ÓÔÁÎÏ×ÉÔÅÓØ ×ÏÌÛÅÂÎÉËÏÍ. +.br +.SH ÷åòóéñ +üÔÁ ÓÔÒÁÎÉÃÁ ÓÐÒÁ×ÏÞÎÉËÁ ÄÏËÕÍÅÎÔÉÒÕÅÔ xxd ×ÅÒÓÉÉ 1.7. +.SH á÷ôïò +.br +(c) 1990-1997 àÒÇÅÎ ÷ÁÊÇÅÒÔ (Juergen Weigert) +.br + +.LP +÷Ù ÍÏÖÅÔÅ Ó×ÏÂÏÄÎÏ ÒÁÓÐÒÏÓÔÒÁÎÑÔØ ÐÒÏÇÒÁÍÍÕ ÓÏ ÓÓÙÌËÏÊ ÎÁ ÍÅÎÑ. +.br +åÓÌÉ ÉÓÐÏÌØÚÏ×ÁÎÉÅ ÜÔÏÊ ÐÒÏÇÒÁÍÍÙ ÐÒÉÎÅÓÌÏ ×ÁÍ ËÁËÏÊ-ÔÏ ÄÏÈÏÄ, +ÐÏÄÅÌÉÔÅÓØ ÓÏ ÍÎÏÊ. +.br +åÓÌÉ ×Ù ÐÏÔÅÒÑÌÉ ÄÅÎØÇÉ, ÔÏ Ñ ÔÕÔ ÎÅ ÐÒÉÞ£Í. +.PP +ðÅÒ×ÙÊ ×ÁÒÉÁÎÔ ÓÔÒÁÎÉÃÙ ÓÐÒÁ×ÏÞÎÉËÁ ÎÁÐÉÓÁÎ ôÏÎÉ îÁÄÖÅÎÔÏÍ (Tony Nugent) +.br + +.br +îÅÂÏÌØÛÉÅ ÉÚÍÅÎÅÎÉÑ ×ÎÅÓÅÎÙ âÒÁÍÏÍ íÏÏÌÅÎÁÁÒÏÍ (Bram Moolenaar). +óÔÒÁÎÉÃÁ ÏÔÒÅÄÁËÔÉÒÏ×ÁÎÁ àÒÇÅÎÏÍ ÷ÁÊÇÅÒÔÏÍ (Juergen Weigert). +.PP diff --git a/runtime/doc/xxd-ru.UTF-8.1 b/runtime/doc/xxd-ru.UTF-8.1 new file mode 100644 index 0000000000..647845bab4 --- /dev/null +++ b/runtime/doc/xxd-ru.UTF-8.1 @@ -0,0 +1,408 @@ +.TH XXD 1 "August 1996" "Страница man Ð´Ð»Ñ xxd" +.\" +.\" 21st May 1996 +.\" Man page author: +.\" Tony Nugent +.\" Changes by Bram Moolenaar +.SH ИМЯ +.I xxd +\- Ñоздаёт предÑтавление файла в виде шеÑтнадцатеричных кодов или выполнÑет +обратное преобразование. +.SH КОМÐÐДÐÐЯ СТРОКР+.B xxd +\-h[elp] +.br +.B xxd +[ключи] [входной_файл [выходной_файл]] +.br +.B xxd +\-r[evert] [ключи] [входной_файл [выходной_файл]] +.SH ОПИСÐÐИЕ +.I xxd +Ñоздаёт предÑтавление указанного файла или данных, прочитанных из потока +Ñтандартного ввода, в виде шеÑтнадцатеричных кодов. Эта команда также может +выполнить обратное преобразование заданных шеÑтнадцатеричными кодами данных +в иÑходный бинарный формат. +Подобно командам +.BR uuencode(1) +и +.BR uudecode(1), +она позволÑет выполнÑть преобразование бинарных данных в ASCII-код, +который можно передавать по Ñлектронной почте, однако, помимо Ñтого, программа +xxd позволÑет выполнÑть декодирование в поток Ñтандартного вывода, +а также может применÑтьÑÑ Ð´Ð»Ñ ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ð·Ð°Ð¿Ð»Ð°Ñ‚Ð¾Ðº Ð´Ð»Ñ Ð±Ð¸Ð½Ð°Ñ€Ð½Ñ‹Ñ… файлов. +.SH КЛЮЧИ ЗÐПУСКР+ЕÑли +.I входной_файл +не задан, то ÑоответÑтвующие данные читаютÑÑ Ð¸Ð· потока Ñтандартного ввода. +Ð’ Ñлучае, еÑли в качеÑтве +.I входного_файла +иÑпользуетÑÑ Ñимвол +.RB \` \- ', +иÑточником данных также выÑтупает поток Ñтандартного ввода. +Ð’ том Ñлучае, еÑли не указан +.I выходной_файл +(или вмеÑто него иÑпользуетÑÑ Ñимвол +.RB \` \- ' +), результат Ð¿Ñ€ÐµÐ¾Ð±Ñ€Ð°Ð·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð½Ð°Ð¿Ñ€Ð°Ð²Ð»ÑетÑÑ Ð² поток Ñтандартного вывода. +.PP +Обратите внимание, что иÑпользуетÑÑ "ленивый" алгоритм разбора ключей, который не +проверÑет более одной буквы ключа, еÑли в Ñтом ключе не иÑпользуетÑÑ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€. +Пробелы между единÑтвенным Ñимволом ключа и ÑоответÑтвующим параметром не ÑвлÑÑŽÑ‚ÑÑ +обÑзательными. Параметры ключей могут быть заданы Ñ Ð¸Ñпользованием деÑÑтичного, +шеÑтнадцатеричного или воÑьмеричного формата. +Таким образом, ключи +.BR \-c8 , +.BR "\-c 8" , +.B \-c 010 +и +.B \-cols 8 +ÑвлÑÑŽÑ‚ÑÑ Ñ€Ð°Ð²Ð½Ð¾Ð·Ð½Ð°Ñ‡Ð½Ñ‹Ð¼Ð¸. +.PP +.TP +.IR \-a " | " \-autoskip +Включает автоматичеÑкий пропуÑк: вмеÑто поÑледовательноÑти +нулевых Ñтрок иÑпользуетÑÑ Ð¾Ð´Ð¸Ð½Ð¾Ñ‡Ð½Ñ‹Ð¹ Ñимвол '*'. По умолчанию +не применÑетÑÑ. +.TP +.IR \-b " | " \-bits +ВмеÑто шеÑтнадцатеричного кода иÑпользуютÑÑ Ð±Ð¸Ñ‚Ñ‹ (двоичные цифры). +При иÑпользовании Ñтого ключа вмеÑто обычного шеÑтнадцатеричного предÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð¸Ñ +октетов иÑпользуютÑÑ Ð½Ð°Ð±Ð¾Ñ€Ñ‹ из воÑьми Ñимволов "1" и "0". ÐšÐ°Ð¶Ð´Ð°Ñ Ñтрока +предварÑетÑÑ Ð½Ð¾Ð¼ÐµÑ€Ð¾Ð¼ Ñтроки в шеÑтнадцатеричном виде, а завершаетÑÑ Ñимвольным +предÑтавлением (в виде ascii или ebcdic). Ключи \-r, \-p, \-i в Ñтом режиме +не работают. +.TP +.IR "\-c кол " | " \-cols кол" +Задаёт количеÑтво октетов +.RI < кол >, +которое выводитÑÑ Ð½Ð° каждой Ñтроке. По умолчанию иÑпользуетÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ðµ 16 +(\-i: 12, \-ps: 30, \-b: 6). +МакÑимально допуÑтимое значение: 256. +.TP +.IR \-E " | " \-EBCDIC +ИзменÑет ÑпоÑоб ÐºÐ¾Ð´Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ñимволов в правой колонке Ñ ASCII на EBCDIC. Этот ключ +не изменÑет шеÑтнадцатеричное предÑтавление. Данный ключ не имеет ÑмыÑла, +еÑли иÑпользуютÑÑ ÐºÐ»ÑŽÑ‡Ð¸ \-r, \-p или \-i. +.TP +.IR "\-g байт " | " \-groupsize байт" +ПозволÑет выполнÑть группировку указанного количеÑтва +.RI < байтов > +(две шеÑтнадцатеричные цифры или воÑемь битов), отделÑÑ Ð³Ñ€ÑƒÐ¿Ð¿Ñ‹ друг от друга пробелами. +Значение +.I \-g 0 +применÑетÑÑ Ð´Ð»Ñ Ð¾Ñ‚ÐºÐ°Ð·Ð° от иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð³Ñ€ÑƒÐ¿Ð¿Ð¸Ñ€Ð¾Ð²ÐºÐ¸. +По умолчанию иÑпользуетÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ðµ +.RI < байт "> равное " 2 +в обычном режиме и \fI1\fP в битовом режиме. Группировка не применÑетÑÑ +в режимах postscript и include. +.TP +.IR \-h " | " \-help +Выводит Ñправку по доÑтупным ключам командной Ñтроки и завершает работу программы. +Создание шеÑтнадцатеричного предÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð½Ðµ выполнÑетÑÑ. +.TP +.IR \-i " | " \-include +ПозволÑет Ñоздавать вывод в Ñтиле подключаемых заголовочных файлов Ñзыка C. +Вывод Ñодержит полноценное определение ÑтатичеÑкого маÑÑива данных, Ð¸Ð¼Ñ ÐºÐ¾Ñ‚Ð¾Ñ€Ð¾Ð³Ð¾ +ÑоответÑтвует имени входного файла, еÑли xxd не Ñчитывает данные из потока Ñтандартного +ввода. +.TP +.IR "\-l длина " | " \-len длина" +Завершает работу поÑле запиÑи заданного в параметре +.RI < длина > +количеÑтва октетов. +.TP +.IR \-p " | " \-ps " | " \-postscript " | " \-plain +ИÑпользует непрерывный формат вывода шеÑтнадцатеричного кода, +извеÑтный как "проÑтой" Ñтиль или Ñтиль "postscript". +.TP +.IR \-r " | " \-revert +ИзменÑет ÑмыÑл операции на противоположный: позволÑет выполнÑть преобразование +шеÑтнадцатеричного предÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð² бинарный код (или применÑть результат в качеÑтве заплаты). +ЕÑли вывод проиÑходит не в поток Ñтандартного вывода, то xxd выполнÑет добавление кода +к ÑоответÑтвующему файлу. При иÑпользовании комбинации ключей +.I \-r \-p +проиÑходит чтение "проÑтого" шеÑтнадцатеричного предÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð±ÐµÐ· иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ +информации о номерах Ñтрок и какого-либо Ñпециального раÑÐºÑ€Ð¾Ñ ÐºÐ¾Ð»Ð¾Ð½Ð¾Ðº. Пробелы +и Ñимволы новой Ñтроки могут вÑтречатьÑÑ Ð² любом меÑте иÑходных данных. +.TP +.I \-seek Ñмещение +При иÑпользовании поÑле ключа +.I \-r +: добавлÑть указанное +.RI < Ñмещение > +к файловым позициÑм, обнаруженным в иÑходных данных. +.TP +.I \-s [\+][\-]seek +Ðачинает работу Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð½Ð¾Ð³Ð¾ абÑолютного (или отноÑительного) +.RI < ÑÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ > +в байтах во входном_файле. +\fI\+ \fRуказывает, что Ñмещение ÑвлÑетÑÑ Ð¾Ñ‚Ð½Ð¾Ñительным по отношению +к текущей файловой позиции в потоке Ñтандартного ввода (беÑÑмыÑленно, еÑли чтение +проиÑходит не из потока Ñтандартного ввода). \fI\- \fRуказывает, что должно быть прочитано +указанное количеÑтво Ñимволов от конца ввода (либо, еÑли ÑочетаетÑÑ Ñ \fI \+ \fR: +перед текущей позиции файла в потоке Ñтандартного ввода). +ЕÑли ключ \-s не иÑпользуетÑÑ, то xxd начинает работу от текущей позиции в файле. +.TP +.I \-u +ИÑпользует шеÑтнадцатеричные цифры в верхнем региÑтре. По умолчанию иÑпользуютÑÑ Ñ†Ð¸Ñ„Ñ€Ñ‹ в +нижнем региÑтре Ñимволов. +.TP +.IR \-v " | " \-version +Отображает информацию о верÑии программы. +.SH ПОДВОДÐЫЕ КÐМÐИ +.PP +.I xxd \-r +обладает вÑтроенным интеллектом Ð´Ð»Ñ Ñ€Ð°ÑÐ¿Ð¾Ð·Ð½Ð°Ð²Ð°Ð½Ð¸Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ð¸ о номерах Ñтрок. +ЕÑли возможен поиÑк по входному файлу, то номера Ñтрок в начале каждой Ñтроки +шеÑтнадцатеричного предÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð¼Ð¾Ð³ÑƒÑ‚ быть неупорÑдоченными, некоторые Ñтроки могут +быть пропущены или переÑекатьÑÑ Ð´Ñ€ÑƒÐ³ Ñ Ð´Ñ€ÑƒÐ³Ð¾Ð¼. Ð’ Ñтих ÑлучаÑÑ… xxd иÑпользует +lseek(2) Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÑ…Ð¾Ð´Ð° к Ñледующей позиции. ЕÑли поиÑк по входному файлу +невозможен, то допуÑтимы только пропуÑки Ñтрок, которые заполнÑÑŽÑ‚ÑÑ Ð½ÑƒÐ»ÐµÐ²Ñ‹Ð¼Ð¸ +байтами. +.PP +.I xxd \-r +никогда не выводит Ñообщений об ошибках. МуÑор пропуÑкаетÑÑ Ð¼Ð¾Ð»Ñ‡Ð°. +.PP +При редактировании шеÑтнадцатеричных предÑтавлений бинарных файлов обращайте +внимание, что +.I xxd \-r +пропуÑкает в Ñтроке ввода любые данные поÑле Ð¿Ñ€Ð¾Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð´Ð¾Ñтаточного количеÑтва +колонок шеÑтнадцатеричных данных (Ñм. ключ \-c). Это означает, что изменениÑ, +внеÑенные в колонки Ñ Ð¿ÐµÑ‡Ð°Ñ‚Ð½Ñ‹Ð¼Ð¸ Ñимволами ascii (или ebcdic), вÑегда игнорируютÑÑ. +При обратном преобразовании шеÑтнадцатеричного предÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð² Ñтиле +postscript Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ команды xxd \-r \-p количеÑтво колонок не учитываетÑÑ. +Ð’ Ñтом Ñлучае раÑпознаютÑÑ Ð²Ñе Ñимволы, которые похожи на пары шеÑтнадцатеричных цифр. +.PP +Обратите внимание на различие между командами +.PP +\fI% xxd \-i файл\fR +.PP +и +.PP +\fI% xxd \-i \< файл\fR +.PP +Команда +.I xxd \-s \+seek +может отличатьÑÑ Ð¾Ñ‚ +.I xxd \-s seek, +поÑкольку Ð´Ð»Ñ Ñ‚Ð¾Ð³Ð¾, чтобы "отмотать" данные на входе назад, иÑпользуетÑÑ Ð²Ñ‹Ð·Ð¾Ð² lseek(2). +При иÑпользовании `+' поведение будет отличатьÑÑ, еÑли входные данные +поÑтупают Ñ Ð¿Ð¾Ñ‚Ð¾ÐºÐ° Ñтандартного ввода, а Ð¿Ð¾Ð·Ð¸Ñ†Ð¸Ñ Ð² файле Ñтандартного ввода не находитÑÑ +в начале файла к тому моменту, когда программа xxd запущена и приÑтупает к чтению ввода. +ÐижеÑледующие примеры помогут проÑÑнить (или ещё больше запутать!) Ñитуацию... +.PP +Отмотка назад потока Ñтандартного ввода; необходимо, поÑкольку 'cat' уже выполнила +чтение до конца потока Ñтандартного ввода: +.PP +\fI% sh \-c 'cat > plain_copy; xxd \-s 0 > hex_copy' < file +.PP +Вывод шеÑтнадцатеричного предÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð¾Ñ‚ позиции в файле 0x480 +(= 1024+128). +Символ `+' означает "отноÑительно текущей позиции", таким образом `128' добавлÑетÑÑ +к первому килобайту, где завершает работу dd: +.PP +\fI% sh \-c 'dd of=plain_snippet bs=1k count=1; xxd \-s +128 > hex_snippet' < file +.PP +Вывод шеÑтнадцатеричного предÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð¾Ñ‚ позиции в файле 0x100 +(= 1024-768): +.PP +\fI% sh \-c 'dd of=plain_snippet bs=1k count=1; xxd \-s +-768 > hex_snippet' < file +.PP +Ð’ то же времÑ, Ñледует заметить, что подобные Ñитуации вÑтречаютÑÑ Ð´Ð¾Ð²Ð¾Ð»ÑŒÐ½Ð¾ редко, +так что Ñимвол `+' обычно не иÑпользуетÑÑ. Ðвтор предпочитает наблюдать за работой +xxd Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ strace(1) или truss(1) в тех ÑлучаÑÑ…, когда применÑетÑÑ ÐºÐ»ÑŽÑ‡ +\-s. +.SH ПРИМЕРЫ +.PP +.br +ВывеÑти вÑÑ‘, кроме первых трёх Ñтрок (0x30 байтов) файла +.B file +: +.PP +\fI% xxd \-s 0x30 file +.PP +.br +ВывеÑти три Ñтроки (0x30 байтов) от конца файла +.B file +: +.PP +\fI% xxd \-s \-0x30 file +.PP +.br +ВывеÑти 120 байтов в виде непрерывного шеÑтнадцатеричного предÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð¸Ñ +по 20 октетов в Ñтроке: +.PP +\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR +.br +2e544820585844203120224d616e75616c207061 +.br +676520666f7220787864220a2e5c220a2e5c2220 +.br +32317374204d617920313939360a2e5c22204d61 +.br +6e207061676520617574686f723a0a2e5c222020 +.br +2020546f6e79204e7567656e74203c746f6e7940 +.br +7363746e7567656e2e7070702e67752e6564752e +.br +.PP +.br +ВывеÑти первые 120 байтов Ñтой Ñтраницы Ñправочника по 12 октетов в Ñтроке: +.PP +\fI% xxd \-l 120 \-c 12 xxd.1\fR +.br +0000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M +.br +000000c: 616e 7561 6c20 7061 6765 2066 anual page f +.br +0000018: 6f72 2078 7864 220a 2e5c 220a or xxd"..\\". +.br +0000024: 2e5c 2220 3231 7374 204d 6179 .\\" 21st May +.br +0000030: 2031 3939 360a 2e5c 2220 4d61 1996..\\" Ma +.br +000003c: 6e20 7061 6765 2061 7574 686f n page autho +.br +0000048: 723a 0a2e 5c22 2020 2020 546f r:..\\" To +.br +0000054: 6e79 204e 7567 656e 7420 3c74 ny Nugent выходной_файл\fR +.br +.PP +.br +Заменить дату в файле xxd.1: +.PP +\fI% echo '0000029: 3574 68' | xxd \-r \- xxd.1\fR +.br +\fI% xxd \-s 0x28 \-l 12 \-c 12 xxd.1\fR +.br +0000028: 3235 7468 204d 6179 2031 3939 25th May 199 +.PP +.br +Создать 65537-байтный файл, вÑе байты которого имеют значение +0x00, кроме поÑледнего байта, который должен иметь значение 'A' +(0x41): +.PP +\fI% echo '010000: 41' | xxd \-r \> file\fR +.PP +.br +Создать шеÑтнадцатеричное предÑтавление Ñтого файла Ñ +иÑпользованием автоматичеÑкого пропуÑка: +.PP +\fI% xxd \-a \-c 12 file\fR +.br +0000000: 0000 0000 0000 0000 0000 0000 ............ +.br +* +.br +000fffc: 0000 0000 40 ....A +.PP +Создать 1-байтный файл, Ñодержащий Ñимвол 'A'. +ЧиÑло поÑле '\-r \-s' добавлÑетÑÑ Ðº номерам Ñтрок, найденным в файле; +иначе говорÑ, предшеÑтвующие байты пропуÑкаютÑÑ: +.PP +\fI% echo '010000: 41' | xxd \-r \-s \-0x10000 \> file\fR +.PP +xxd можно иÑпользовать в качеÑтве фильтра в редакторе, например в +.B vim(1), +чтобы Ñоздать шеÑтнадцатеричное предÑтавление облаÑти между +отметками `a' и `z': +.PP +\fI:'a,'z!xxd\fR +.PP +Ð’Ñ‹ можете иÑпользовать xxd в качеÑтве фильтра в редакторе, например в +.B vim(1), +Ð´Ð»Ñ Ð²Ð¾ÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ… из шеÑтнадцатеричного предÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð¸Ñ +между отметками `a' и `z': +.PP +\fI:'a,'z!xxd \-r\fR +.PP +Ð’Ñ‹ можете иÑпользовать xxd в качеÑтве фильтра в редакторе, например в +.B vim(1), +Ð´Ð»Ñ Ð²Ð¾ÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ… из единÑтвенной Ñтроки +шеÑтнадцатеричного предÑтавлениÑ. ПомеÑтите курÑор в ÑоответÑтвующую Ñтроку +и наберите +.PP +\fI!!xxd \-r\fR +.PP +Чтобы прочитать единÑтвенный Ñимвол из канала ÑвÑзи: +.PP +\fI% xxd \-c1 < /dev/term/b &\fR +.br +\fI% stty < /dev/term/b \-echo \-opost \-isig \-icanon min 1\fR +.br +\fI% echo \-n foo > /dev/term/b\fR +.PP +.SH ВОЗВРÐЩÐЕМЫЕ ЗÐÐЧЕÐИЯ +Программа xxd завершает работу Ñо Ñледующими значениÑми: +.TP +0 +Ошибки не обнаружены. +.TP +\-1 +ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ поддерживаетÑÑ (выполнение +.I xxd \-r \-i +пока невозможно). +.TP +1 +Ошибка при разборе ключей командной Ñтроки. +.TP +2 +Проблемы во входном файле. +.TP +3 +Проблемы в выходном файле. +.TP +4,5 +Ð–ÐµÐ»Ð°Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ð¿Ð¾Ð·Ð¸Ñ†Ð¸Ñ Ð¿Ð¾Ð¸Ñка недоÑтижима. +.SH СМОТРИ ТÐКЖЕ +uuencode(1), uudecode(1), patch(1) +.br +.SH ПРЕДУПРЕЖДЕÐИЕ +СтранноÑть Ñтой программы ÑоответÑтвует оÑобенноÑÑ‚Ñм мозга её ÑоздателÑ. +ИÑпользуйте её на Ñвой Ñтрах и риÑк. Копируйте файлы, отÑлеживайте +вызовы, ÑтановитеÑÑŒ волшебником. +.br +.SH ВЕРСИЯ +Эта Ñтраница Ñправочника документирует xxd верÑии 1.7. +.SH ÐВТОР +.br +(c) 1990-1997 Юрген Вайгерт (Juergen Weigert) +.br + +.LP +Ð’Ñ‹ можете Ñвободно раÑпроÑтранÑть программу Ñо ÑÑылкой на менÑ. +.br +ЕÑли иÑпользование Ñтой программы принеÑло вам какой-то доход, +поделитеÑÑŒ Ñо мной. +.br +ЕÑли вы потерÑли деньги, то Ñ Ñ‚ÑƒÑ‚ не причём. +.PP +Первый вариант Ñтраницы Ñправочника напиÑан Тони Ðаджентом (Tony Nugent) +.br + +.br +Ðебольшие Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð²Ð½ÐµÑены Брамом Мооленааром (Bram Moolenaar). +Страница отредактирована Юргеном Вайгертом (Juergen Weigert). +.PP diff --git a/runtime/doc/xxd.1 b/runtime/doc/xxd.1 new file mode 100644 index 0000000000..e8f7358591 --- /dev/null +++ b/runtime/doc/xxd.1 @@ -0,0 +1,370 @@ +.TH XXD 1 "August 1996" "Manual page for xxd" +.\" +.\" 21st May 1996 +.\" Man page author: +.\" Tony Nugent +.\" Changes by Bram Moolenaar +.SH NAME +.I xxd +\- make a hexdump or do the reverse. +.SH SYNOPSIS +.B xxd +\-h[elp] +.br +.B xxd +[options] [infile [outfile]] +.br +.B xxd +\-r[evert] [options] [infile [outfile]] +.SH DESCRIPTION +.I xxd +creates a hex dump of a given file or standard input. +It can also convert a hex dump back to its original binary form. +Like +.BR uuencode (1) +and +.BR uudecode (1) +it allows the transmission of binary data in a `mail-safe' ASCII representation, +but has the advantage of decoding to standard output. +Moreover, it can be used to perform binary file patching. +.SH OPTIONS +If no +.I infile +is given, standard input is read. +If +.I infile +is specified as a +.RB \` \- ' +character, then input is taken from standard input. +If no +.I outfile +is given (or a +.RB \` \- ' +character is in its place), results are sent to standard output. +.PP +Note that a "lazy" parser is used which does not check for more than the first +option letter, unless the option is followed by a parameter. +Spaces between a single option letter and its parameter are optional. +Parameters to options can be specified in decimal, hexadecimal or octal +notation. +Thus +.BR \-c8 , +.BR "\-c 8" , +.B \-c 010 +and +.B \-cols 8 +are all equivalent. +.PP +.TP +.IR \-a " | " \-autoskip +toggle autoskip: A single '*' replaces nul-lines. Default off. +.TP +.IR \-b " | " \-bits +Switch to bits (binary digits) dump, rather than hexdump. +This option writes octets as eight digits "1"s and "0"s instead of a normal +hexadecimal dump. Each line is preceded by a line number in hexadecimal and +followed by an ascii (or ebcdic) representation. The command line switches +\-r, \-p, \-i do not work with this mode. +.TP +.IR "\-c cols " | " \-cols cols" +format +.RI < cols > +octets per line. Default 16 (\-i: 12, \-ps: 30, \-b: 6). Max 256. +.TP +.IR \-E " | " \-EBCDIC +Change the character encoding in the righthand column from ASCII to EBCDIC. +This does not change the hexadecimal representation. The option is +meaningless in combinations with \-r, \-p or \-i. +.TP +.IR "\-g bytes " | " \-groupsize bytes" +separate the output of every +.RI < bytes > +bytes (two hex characters or eight bit-digits each) by a whitespace. +Specify +.I \-g 0 +to suppress grouping. +.RI < Bytes "> defaults to " 2 +in normal mode and \fI1\fP in bits mode. +Grouping does not apply to postscript or include style. +.TP +.IR \-h " | " \-help +print a summary of available commands and exit. No hex dumping is performed. +.TP +.IR \-i " | " \-include +output in C include file style. A complete static array definition is written +(named after the input file), unless xxd reads from stdin. +.TP +.IR "\-l len " | " \-len len" +stop after writing +.RI < len > +octets. +.TP +.IR \-p " | " \-ps " | " \-postscript " | " \-plain +output in postscript continuous hexdump style. Also known as plain hexdump +style. +.TP +.IR \-r " | " \-revert +reverse operation: convert (or patch) hexdump into binary. +If not writing to stdout, xxd writes into its output file without truncating +it. Use the combination +.I \-r \-p +to read plain hexadecimal dumps without line number information and without a +particular column layout. Additional Whitespace and line-breaks are allowed +anywhere. +.TP +.I \-seek offset +When used after +.IR \-r : +revert with +.RI < offset > +added to file positions found in hexdump. +.TP +.I \-s [+][\-]seek +start at +.RI < seek > +bytes abs. (or rel.) infile offset. +\fI+ \fRindicates that the seek is relative to the current stdin file position +(meaningless when not reading from stdin). \fI\- \fRindicates that the seek +should be that many characters from the end of the input (or if combined with +\fI+\fR: before the current stdin file position). +Without \-s option, xxd starts at the current file position. +.TP +.I \-u +use upper case hex letters. Default is lower case. +.TP +.IR \-v " | " \-version +show version string. +.SH CAVEATS +.PP +.I xxd \-r +has some builtin magic while evaluating line number information. +If the output file is seekable, then the linenumbers at the start of each +hexdump line may be out of order, lines may be missing, or overlapping. In +these cases xxd will lseek(2) to the next position. If the output file is not +seekable, only gaps are allowed, which will be filled by null-bytes. +.PP +.I xxd \-r +never generates parse errors. Garbage is silently skipped. +.PP +When editing hexdumps, please note that +.I xxd \-r +skips everything on the input line after reading enough columns of hexadecimal +data (see option \-c). This also means, that changes to the printable ascii (or +ebcdic) columns are always ignored. Reverting a plain (or postscript) style +hexdump with xxd \-r \-p does not depend on the correct number of columns. Here anything that looks like a pair of hex-digits is interpreted. +.PP +Note the difference between +.br +\fI% xxd \-i file\fR +.br +and +.br +\fI% xxd \-i < file\fR +.PP +.I xxd \-s +seek +may be different from +.IR "xxd \-s seek" , +as lseek(2) is used to "rewind" input. A '+' +makes a difference if the input source is stdin, and if stdin's file position +is not at the start of the file by the time xxd is started and given its input. +The following examples may help to clarify (or further confuse!)... +.PP +Rewind stdin before reading; needed because the `cat' has already read to the +end of stdin. +.br +\fI% sh \-c "cat > plain_copy; xxd \-s 0 > hex_copy" < file\fR +.PP +Hexdump from file position 0x480 (=1024+128) onwards. +The `+' sign means "relative to the current position", thus the `128' adds to +the 1k where dd left off. +.br +\fI% sh \-c "dd of=plain_snippet bs=1k count=1; xxd \-s +128 > hex_snippet" < file\fR +.PP +Hexdump from file position 0x100 ( = 1024\-768) on. +.br +\fI% sh \-c "dd of=plain_snippet bs=1k count=1; xxd \-s +\-768 > hex_snippet" < file\fR +.PP +However, this is a rare situation and the use of `+' is rarely needed. +The author prefers to monitor the effect of xxd with strace(1) or truss(1), whenever \-s is used. +.SH EXAMPLES +.PP +.br +Print everything but the first three lines (hex 0x30 bytes) of +.BR file . +.br +\fI% xxd \-s 0x30 file\fR +.PP +.br +Print 3 lines (hex 0x30 bytes) from the end of +.BR file . +.br +\fI% xxd \-s \-0x30 file\fR +.PP +.br +Print 120 bytes as continuous hexdump with 20 octets per line. +.br +\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR +.br +2e54482058584420312022417567757374203139 +.br +39362220224d616e75616c207061676520666f72 +.br +20787864220a2e5c220a2e5c222032317374204d +.br +617920313939360a2e5c22204d616e2070616765 +.br +20617574686f723a0a2e5c2220202020546f6e79 +.br +204e7567656e74203c746f6e79407363746e7567 +.br + +.br +Hexdump the first 120 bytes of this man page with 12 octets per line. +.br +\fI% xxd \-l 120 \-c 12 xxd.1\fR +.br +0000000: 2e54 4820 5858 4420 3120 2241 .TH XXD 1 "A +.br +000000c: 7567 7573 7420 3139 3936 2220 ugust 1996" +.br +0000018: 224d 616e 7561 6c20 7061 6765 "Manual page +.br +0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\\ +.br +0000030: 220a 2e5c 2220 3231 7374 204d "..\\" 21st M +.br +000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\\" +.br +0000048: 4d61 6e20 7061 6765 2061 7574 Man page aut +.br +0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\\" +.br +0000060: 546f 6e79 204e 7567 656e 7420 Tony Nugent +.br +000006c: 3c74 6f6e 7940 7363 746e 7567 output_file\fR +.br + +.br +Patch the date in the file xxd.1 +.br +\fI% echo "0000037: 3574 68" | xxd \-r \- xxd.1\fR +.br +\fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR +.br +0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996 +.PP +.br +Create a 65537 byte file with all bytes 0x00, +except for the last one which is 'A' (hex 0x41). +.br +\fI% echo "010000: 41" | xxd \-r > file\fR +.PP +.br +Hexdump this file with autoskip. +.br +\fI% xxd \-a \-c 12 file\fR +.br +0000000: 0000 0000 0000 0000 0000 0000 ............ +.br +* +.br +000fffc: 0000 0000 40 ....A +.PP +Create a 1 byte file containing a single 'A' character. +The number after '\-r \-s' adds to the linenumbers found in the file; +in effect, the leading bytes are suppressed. +.br +\fI% echo "010000: 41" | xxd \-r \-s \-0x10000 > file\fR +.PP +Use xxd as a filter within an editor such as +.B vim(1) +to hexdump a region marked between `a' and `z'. +.br +\fI:'a,'z!xxd\fR +.PP +Use xxd as a filter within an editor such as +.B vim(1) +to recover a binary hexdump marked between `a' and `z'. +.br +\fI:'a,'z!xxd \-r\fR +.PP +Use xxd as a filter within an editor such as +.B vim(1) +to recover one line of a hexdump. Move the cursor over the line and type: +.br +\fI!!xxd \-r\fR +.PP +Read single characters from a serial line +.br +\fI% xxd \-c1 < /dev/term/b &\fR +.br +\fI% stty < /dev/term/b \-echo \-opost \-isig \-icanon min 1\fR +.br +\fI% echo \-n foo > /dev/term/b\fR +.PP +.SH "RETURN VALUES" +The following error values are returned: +.TP +0 +no errors encountered. +.TP +\-1 +operation not supported ( +.I xxd \-r \-i +still impossible). +.TP +1 +error while parsing options. +.TP +2 +problems with input file. +.TP +3 +problems with output file. +.TP +4,5 +desired seek position is unreachable. +.SH "SEE ALSO" +uuencode(1), uudecode(1), patch(1) +.br +.SH WARNINGS +The tools weirdness matches its creators brain. +Use entirely at your own risk. Copy files. Trace it. Become a wizard. +.br +.SH VERSION +This manual page documents xxd version 1.7 +.SH AUTHOR +.br +(c) 1990-1997 by Juergen Weigert +.br + +.LP +Distribute freely and credit me, +.br +make money and share with me, +.br +lose money and don't ask me. +.PP +Manual page started by Tony Nugent +.br + +.br +Small changes by Bram Moolenaar. +Edited by Juergen Weigert. +.PP diff --git a/runtime/doc/xxd.man b/runtime/doc/xxd.man new file mode 100644 index 0000000000..057c8e911b --- /dev/null +++ b/runtime/doc/xxd.man @@ -0,0 +1,262 @@ +XXD(1) XXD(1) + + + +NAME + xxd - make a hexdump or do the reverse. + +SYNOPSIS + xxd -h[elp] + xxd [options] [infile [outfile]] + xxd -r[evert] [options] [infile [outfile]] + +DESCRIPTION + xxd creates a hex dump of a given file or standard input. It can also + convert a hex dump back to its original binary form. Like uuencode(1) + and uudecode(1) it allows the transmission of binary data in a `mail- + safe' ASCII representation, but has the advantage of decoding to stan- + dard output. Moreover, it can be used to perform binary file patching. + +OPTIONS + If no infile is given, standard input is read. If infile is specified + as a `-' character, then input is taken from standard input. If no + outfile is given (or a `-' character is in its place), results are sent + to standard output. + + Note that a "lazy" parser is used which does not check for more than + the first option letter, unless the option is followed by a parameter. + Spaces between a single option letter and its parameter are optional. + Parameters to options can be specified in decimal, hexadecimal or octal + notation. Thus -c8, -c 8, -c 010 and -cols 8 are all equivalent. + + + -a | -autoskip + toggle autoskip: A single '*' replaces nul-lines. Default off. + + -b | -bits + Switch to bits (binary digits) dump, rather than hexdump. This + option writes octets as eight digits "1"s and "0"s instead of a + normal hexadecimal dump. Each line is preceded by a line number + in hexadecimal and followed by an ascii (or ebcdic) representa- + tion. The command line switches -r, -p, -i do not work with this + mode. + + -c cols | -cols cols + format octets per line. Default 16 (-i: 12, -ps: 30, -b: + 6). Max 256. + + -E | -EBCDIC + Change the character encoding in the righthand column from ASCII + to EBCDIC. This does not change the hexadecimal representation. + The option is meaningless in combinations with -r, -p or -i. + + -g bytes | -groupsize bytes + separate the output of every bytes (two hex characters + or eight bit-digits each) by a whitespace. Specify -g 0 to sup- + press grouping. defaults to 2 in normal mode and 1 in + bits mode. Grouping does not apply to postscript or include + style. + + -h | -help + print a summary of available commands and exit. No hex dumping + is performed. + + -i | -include + output in C include file style. A complete static array defini- + tion is written (named after the input file), unless xxd reads + from stdin. + + -l len | -len len + stop after writing octets. + + -p | -ps | -postscript | -plain + output in postscript continuous hexdump style. Also known as + plain hexdump style. + + -r | -revert + reverse operation: convert (or patch) hexdump into binary. If + not writing to stdout, xxd writes into its output file without + truncating it. Use the combination -r -p to read plain hexadeci- + mal dumps without line number information and without a particu- + lar column layout. Additional Whitespace and line-breaks are + allowed anywhere. + + -seek offset + When used after -r: revert with added to file positions + found in hexdump. + + -s [+][-]seek + start at bytes abs. (or rel.) infile offset. + indicates + that the seek is relative to the current stdin file position + (meaningless when not reading from stdin). - indicates that the + seek should be that many characters from the end of the input + (or if combined with +: before the current stdin file position). + Without -s option, xxd starts at the current file position. + + -u use upper case hex letters. Default is lower case. + + -v | -version + show version string. + +CAVEATS + xxd -r has some builtin magic while evaluating line number information. + If the output file is seekable, then the linenumbers at the start of + each hexdump line may be out of order, lines may be missing, or over- + lapping. In these cases xxd will lseek(2) to the next position. If the + output file is not seekable, only gaps are allowed, which will be + filled by null-bytes. + + xxd -r never generates parse errors. Garbage is silently skipped. + + When editing hexdumps, please note that xxd -r skips everything on the + input line after reading enough columns of hexadecimal data (see option + -c). This also means, that changes to the printable ascii (or ebcdic) + columns are always ignored. Reverting a plain (or postscript) style + hexdump with xxd -r -p does not depend on the correct number of col- + umns. Here anything that looks like a pair of hex-digits is inter- + preted. + + Note the difference between + % xxd -i file + and + % xxd -i < file + + xxd -s +seek may be different from xxd -s seek, as lseek(2) is used to + "rewind" input. A '+' makes a difference if the input source is stdin, + and if stdin's file position is not at the start of the file by the + time xxd is started and given its input. The following examples may + help to clarify (or further confuse!)... + + Rewind stdin before reading; needed because the `cat' has already read + to the end of stdin. + % sh -c "cat > plain_copy; xxd -s 0 > hex_copy" < file + + Hexdump from file position 0x480 (=1024+128) onwards. The `+' sign + means "relative to the current position", thus the `128' adds to the 1k + where dd left off. + % sh -c "dd of=plain_snippet bs=1k count=1; xxd -s +128 > hex_snippet" + < file + + Hexdump from file position 0x100 ( = 1024-768) on. + % sh -c "dd of=plain_snippet bs=1k count=1; xxd -s +-768 > hex_snippet" + < file + + However, this is a rare situation and the use of `+' is rarely needed. + The author prefers to monitor the effect of xxd with strace(1) or + truss(1), whenever -s is used. + +EXAMPLES + Print everything but the first three lines (hex 0x30 bytes) of file. + % xxd -s 0x30 file + + Print 3 lines (hex 0x30 bytes) from the end of file. + % xxd -s -0x30 file + + Print 120 bytes as continuous hexdump with 20 octets per line. + % xxd -l 120 -ps -c 20 xxd.1 + 2e54482058584420312022417567757374203139 + 39362220224d616e75616c207061676520666f72 + 20787864220a2e5c220a2e5c222032317374204d + 617920313939360a2e5c22204d616e2070616765 + 20617574686f723a0a2e5c2220202020546f6e79 + 204e7567656e74203c746f6e79407363746e7567 + + Hexdump the first 120 bytes of this man page with 12 octets per line. + % xxd -l 120 -c 12 xxd.1 + 0000000: 2e54 4820 5858 4420 3120 2241 .TH XXD 1 "A + 000000c: 7567 7573 7420 3139 3936 2220 ugust 1996" + 0000018: 224d 616e 7561 6c20 7061 6765 "Manual page + 0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\ + 0000030: 220a 2e5c 2220 3231 7374 204d "..\" 21st M + 000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\" + 0000048: 4d61 6e20 7061 6765 2061 7574 Man page aut + 0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\" + 0000060: 546f 6e79 204e 7567 656e 7420 Tony Nugent + 000006c: 3c74 6f6e 7940 7363 746e 7567 output_file + + Patch the date in the file xxd.1 + % echo "0000037: 3574 68" | xxd -r - xxd.1 + % xxd -s 0x36 -l 13 -c 13 xxd.1 + 0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996 + + Create a 65537 byte file with all bytes 0x00, except for the last one + which is 'A' (hex 0x41). + % echo "010000: 41" | xxd -r > file + + Hexdump this file with autoskip. + % xxd -a -c 12 file + 0000000: 0000 0000 0000 0000 0000 0000 ............ + * + 000fffc: 0000 0000 40 ....A + + Create a 1 byte file containing a single 'A' character. The number + after '-r -s' adds to the linenumbers found in the file; in effect, the + leading bytes are suppressed. + % echo "010000: 41" | xxd -r -s -0x10000 > file + + Use xxd as a filter within an editor such as vim(1) to hexdump a region + marked between `a' and `z'. + :'a,'z!xxd + + Use xxd as a filter within an editor such as vim(1) to recover a binary + hexdump marked between `a' and `z'. + :'a,'z!xxd -r + + Use xxd as a filter within an editor such as vim(1) to recover one line + of a hexdump. Move the cursor over the line and type: + !!xxd -r + + Read single characters from a serial line + % xxd -c1 < /dev/term/b & + % stty < /dev/term/b -echo -opost -isig -icanon min 1 + % echo -n foo > /dev/term/b + + +RETURN VALUES + The following error values are returned: + + 0 no errors encountered. + + -1 operation not supported ( xxd -r -i still impossible). + + 1 error while parsing options. + + 2 problems with input file. + + 3 problems with output file. + + 4,5 desired seek position is unreachable. + +SEE ALSO + uuencode(1), uudecode(1), patch(1) + +WARNINGS + The tools weirdness matches its creators brain. Use entirely at your + own risk. Copy files. Trace it. Become a wizard. + +VERSION + This manual page documents xxd version 1.7 + +AUTHOR + (c) 1990-1997 by Juergen Weigert + + + Distribute freely and credit me, + make money and share with me, + lose money and don't ask me. + + Manual page started by Tony Nugent + + Small changes by Bram Moolenaar. Edited by Juergen Weigert. + + + + +Manual page for xxd August 1996 XXD(1) diff --git a/runtime/evim.vim b/runtime/evim.vim new file mode 100644 index 0000000000..650ce428d6 --- /dev/null +++ b/runtime/evim.vim @@ -0,0 +1,66 @@ +" Vim script for Evim key bindings +" Maintainer: Bram Moolenaar +" Last Change: 2006 Mar 29 + +" Don't use Vi-compatible mode. +set nocompatible + +" Use the mswin.vim script for most mappings +source :p:h/mswin.vim + +" Vim is in Insert mode by default +set insertmode + +" Make a buffer hidden when editing another one +set hidden + +" Make cursor keys ignore wrapping +inoremap =pumvisible() ? "\Down>" : "\C-O>gj" +inoremap =pumvisible() ? "\Up>" : "\C-O>gk" + +" CTRL-F does Find dialog instead of page forward +noremap :promptfind +vnoremap y:promptfind " +onoremap :promptfind +inoremap :promptfind +cnoremap :promptfind + + +set backspace=2 " allow backspacing over everything in insert mode +set autoindent " always set autoindenting on +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 incsearch " do incremental searching +set mouse=a " always use the mouse + +" Don't use Ex mode, use Q for formatting +map Q gq + +" Switch syntax highlighting on, when the terminal has colors +" Highlight the last used search pattern on the next search command. +if &t_Co > 2 || has("gui_running") + syntax on + set hlsearch + nohlsearch +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 + + " For all text files set 'textwidth' to 78 characters. + au FileType text setlocal tw=78 + +endif " has("autocmd") + +" vim: set sw=2 : diff --git a/runtime/filetype.vim b/runtime/filetype.vim new file mode 100644 index 0000000000..dac44d72af --- /dev/null +++ b/runtime/filetype.vim @@ -0,0 +1,2732 @@ +" Vim support file to detect file types +" +" Maintainer: Bram Moolenaar +" Last Change: 2014 Jul 23 + +" Listen very carefully, I will say this only once +if exists("did_load_filetypes") + finish +endif +let did_load_filetypes = 1 + +" Line continuation is used here, remove 'C' from 'cpoptions' +let s:cpo_save = &cpo +set cpo&vim + +augroup filetypedetect + +" Ignored extensions +if exists("*fnameescape") +au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.dpkg-dist,?\+.dpkg-old,?\+.dpkg-new,?\+.dpkg-bak,?\+.rpmsave,?\+.rpmnew + \ exe "doau filetypedetect BufRead " . fnameescape(expand(":r")) +au BufNewFile,BufRead *~ + \ let s:name = expand("") | + \ let s:short = substitute(s:name, '\~$', '', '') | + \ if s:name != s:short && s:short != "" | + \ exe "doau filetypedetect BufRead " . fnameescape(s:short) | + \ endif | + \ unlet! s:name s:short +au BufNewFile,BufRead ?\+.in + \ if expand(":t") != "configure.in" | + \ exe "doau filetypedetect BufRead " . fnameescape(expand(":r")) | + \ endif +elseif &verbose > 0 + echomsg "Warning: some filetypes will not be recognized because this version of Vim does not have fnameescape()" +endif + +" Pattern used to match file names which should not be inspected. +" Currently finds compressed files. +if !exists("g:ft_ignore_pat") + let g:ft_ignore_pat = '\.\(Z\|gz\|bz2\|zip\|tgz\)$' +endif + +" Function used for patterns that end in a star: don't set the filetype if the +" file name matches ft_ignore_pat. +func! s:StarSetf(ft) + if expand("") !~ g:ft_ignore_pat + exe 'setf ' . a:ft + endif +endfunc + +" Abaqus or Trasys +au BufNewFile,BufRead *.inp call s:Check_inp() + +func! s:Check_inp() + if getline(1) =~ '^\*' + setf abaqus + else + let n = 1 + if line("$") > 500 + let nmax = 500 + else + let nmax = line("$") + endif + while n <= nmax + if getline(n) =~? "^header surface data" + setf trasys + break + endif + let n = n + 1 + endwhile + endif +endfunc + +" A-A-P recipe +au BufNewFile,BufRead *.aap setf aap + +" A2ps printing utility +au BufNewFile,BufRead */etc/a2ps.cfg,*/etc/a2ps/*.cfg,a2psrc,.a2psrc setf a2ps + +" ABAB/4 +au BufNewFile,BufRead *.abap setf abap + +" ABC music notation +au BufNewFile,BufRead *.abc setf abc + +" ABEL +au BufNewFile,BufRead *.abl setf abel + +" AceDB +au BufNewFile,BufRead *.wrm setf acedb + +" Ada (83, 9X, 95) +au BufNewFile,BufRead *.adb,*.ads,*.ada setf ada +if has("vms") + au BufNewFile,BufRead *.gpr,*.ada_m,*.adc setf ada +else + au BufNewFile,BufRead *.gpr setf ada +endif + +" AHDL +au BufNewFile,BufRead *.tdf setf ahdl + +" AMPL +au BufNewFile,BufRead *.run setf ampl + +" Ant +au BufNewFile,BufRead build.xml setf ant + +" Arduino +au BufNewFile,BufRead *.ino,*.pde setf arduino + +" Apache style config file +au BufNewFile,BufRead proftpd.conf* call s:StarSetf('apachestyle') + +" Apache config file +au BufNewFile,BufRead .htaccess,*/etc/httpd/*.conf setf apache + +" XA65 MOS6510 cross assembler +au BufNewFile,BufRead *.a65 setf a65 + +" Applescript +au BufNewFile,BufRead *.scpt setf applescript + +" Applix ELF +au BufNewFile,BufRead *.am + \ if expand("") !~? 'Makefile.am\>' | setf elf | endif + +" ALSA configuration +au BufNewFile,BufRead .asoundrc,*/usr/share/alsa/alsa.conf,*/etc/asound.conf setf alsaconf + +" Arc Macro Language +au BufNewFile,BufRead *.aml setf aml + +" APT config file +au BufNewFile,BufRead apt.conf setf aptconf +au BufNewFile,BufRead */.aptitude/config setf aptconf +au BufNewFile,BufRead */etc/apt/apt.conf.d/{[-_[:alnum:]]\+,[-_.[:alnum:]]\+.conf} setf aptconf + +" Arch Inventory file +au BufNewFile,BufRead .arch-inventory,=tagging-method setf arch + +" ART*Enterprise (formerly ART-IM) +au BufNewFile,BufRead *.art setf art + +" AsciiDoc +au BufNewFile,BufRead *.asciidoc setf asciidoc + +" ASN.1 +au BufNewFile,BufRead *.asn,*.asn1 setf asn + +" Active Server Pages (with Visual Basic Script) +au BufNewFile,BufRead *.asa + \ if exists("g:filetype_asa") | + \ exe "setf " . g:filetype_asa | + \ else | + \ setf aspvbs | + \ endif + +" Active Server Pages (with Perl or Visual Basic Script) +au BufNewFile,BufRead *.asp + \ if exists("g:filetype_asp") | + \ exe "setf " . g:filetype_asp | + \ elseif getline(1) . getline(2) . getline(3) =~? "perlscript" | + \ setf aspperl | + \ else | + \ setf aspvbs | + \ endif + +" Grub (must be before catch *.lst) +au BufNewFile,BufRead */boot/grub/menu.lst,*/boot/grub/grub.conf,*/etc/grub.conf setf grub + +" Assembly (all kinds) +" *.lst is not pure assembly, it has two extra columns (address, byte codes) +au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call s:FTasm() + +" This function checks for the kind of assembly that is wanted by the user, or +" can be detected from the first five lines of the file. +func! s:FTasm() + " make sure b:asmsyntax exists + if !exists("b:asmsyntax") + let b:asmsyntax = "" + endif + + if b:asmsyntax == "" + call s:FTasmsyntax() + endif + + " if b:asmsyntax still isn't set, default to asmsyntax or GNU + if b:asmsyntax == "" + if exists("g:asmsyntax") + let b:asmsyntax = g:asmsyntax + else + let b:asmsyntax = "asm" + endif + endif + + exe "setf " . fnameescape(b:asmsyntax) +endfunc + +func! s:FTasmsyntax() + " see if file contains any asmsyntax=foo overrides. If so, change + " b:asmsyntax appropriately + let head = " ".getline(1)." ".getline(2)." ".getline(3)." ".getline(4). + \" ".getline(5)." " + let match = matchstr(head, '\sasmsyntax=\zs[a-zA-Z0-9]\+\ze\s') + if match != '' + let b:asmsyntax = match + elseif ((head =~? '\.title') || (head =~? '\.ident') || (head =~? '\.macro') || (head =~? '\.subtitle') || (head =~? '\.library')) + let b:asmsyntax = "vmasm" + endif +endfunc + +" Macro (VAX) +au BufNewFile,BufRead *.mar setf vmasm + +" Atlas +au BufNewFile,BufRead *.atl,*.as setf atlas + +" Autoit v3 +au BufNewFile,BufRead *.au3 setf autoit + +" Autohotkey +au BufNewFile,BufRead *.ahk setf autohotkey + +" Automake +au BufNewFile,BufRead [mM]akefile.am,GNUmakefile.am setf automake + +" Autotest .at files are actually m4 +au BufNewFile,BufRead *.at setf m4 + +" Avenue +au BufNewFile,BufRead *.ave setf ave + +" Awk +au BufNewFile,BufRead *.awk setf awk + +" B +au BufNewFile,BufRead *.mch,*.ref,*.imp setf b + +" BASIC or Visual Basic +au BufNewFile,BufRead *.bas call s:FTVB("basic") + +" Check if one of the first five lines contains "VB_Name". In that case it is +" probably a Visual Basic file. Otherwise it's assumed to be "alt" filetype. +func! s:FTVB(alt) + if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'VB_Name\|Begin VB\.\(Form\|MDIForm\|UserControl\)' + setf vb + else + exe "setf " . a:alt + endif +endfunc + +" Visual Basic Script (close to Visual Basic) or Visual Basic .NET +au BufNewFile,BufRead *.vb,*.vbs,*.dsm,*.ctl setf vb + +" IBasic file (similar to QBasic) +au BufNewFile,BufRead *.iba,*.ibi setf ibasic + +" FreeBasic file (similar to QBasic) +au BufNewFile,BufRead *.fb,*.bi setf freebasic + +" Batch file for MSDOS. +au BufNewFile,BufRead *.bat,*.sys setf dosbatch +" *.cmd is close to a Batch file, but on OS/2 Rexx files also use *.cmd. +au BufNewFile,BufRead *.cmd + \ if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif + +" Batch file for 4DOS +au BufNewFile,BufRead *.btm call s:FTbtm() +func! s:FTbtm() + if exists("g:dosbatch_syntax_for_btm") && g:dosbatch_syntax_for_btm + setf dosbatch + else + setf btm + endif +endfunc + +" BC calculator +au BufNewFile,BufRead *.bc setf bc + +" BDF font +au BufNewFile,BufRead *.bdf setf bdf + +" BibTeX bibliography database file +au BufNewFile,BufRead *.bib setf bib + +" BibTeX Bibliography Style +au BufNewFile,BufRead *.bst setf bst + +" BIND configuration +au BufNewFile,BufRead named.conf,rndc.conf setf named + +" BIND zone +au BufNewFile,BufRead named.root setf bindzone +au BufNewFile,BufRead *.db call s:BindzoneCheck('') + +func! s:BindzoneCheck(default) + if getline(1).getline(2).getline(3).getline(4) =~ '^; <<>> DiG [0-9.]\+ <<>>\|BIND.*named\|$ORIGIN\|$TTL\|IN\s\+SOA' + setf bindzone + elseif a:default != '' + exe 'setf ' . a:default + endif +endfunc + +" Blank +au BufNewFile,BufRead *.bl setf blank + +" Blkid cache file +au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml + +" C or lpc +au BufNewFile,BufRead *.c call s:FTlpc() + +func! s:FTlpc() + if exists("g:lpc_syntax_for_c") + let lnum = 1 + while lnum <= 12 + if getline(lnum) =~# '^\(//\|inherit\|private\|protected\|nosave\|string\|object\|mapping\|mixed\)' + setf lpc + return + endif + let lnum = lnum + 1 + endwhile + endif + setf c +endfunc + +" Calendar +au BufNewFile,BufRead calendar setf calendar + +" C# +au BufNewFile,BufRead *.cs setf cs + +" CSDL +au BufNewFile,BufRead *.csdl setf csdl + +" Cabal +au BufNewFile,BufRead *.cabal setf cabal + +" Cdrdao TOC +au BufNewFile,BufRead *.toc setf cdrtoc + +" Cdrdao config +au BufNewFile,BufRead */etc/cdrdao.conf,*/etc/defaults/cdrdao,*/etc/default/cdrdao,.cdrdao setf cdrdaoconf + +" Cfengine +au BufNewFile,BufRead cfengine.conf setf cfengine + +" ChaiScript +au BufRead,BufNewFile *.chai setf chaiscript + +" Comshare Dimension Definition Language +au BufNewFile,BufRead *.cdl setf cdl + +" Conary Recipe +au BufNewFile,BufRead *.recipe setf conaryrecipe + +" Controllable Regex Mutilator +au BufNewFile,BufRead *.crm setf crm + +" Cyn++ +au BufNewFile,BufRead *.cyn setf cynpp + +" Cynlib +" .cc and .cpp files can be C++ or Cynlib. +au BufNewFile,BufRead *.cc + \ if exists("cynlib_syntax_for_cc")|setf cynlib|else|setf cpp|endif +au BufNewFile,BufRead *.cpp + \ if exists("cynlib_syntax_for_cpp")|setf cynlib|else|setf cpp|endif + +" C++ +au BufNewFile,BufRead *.cxx,*.c++,*.hh,*.hxx,*.hpp,*.ipp,*.moc,*.tcc,*.inl setf cpp +if has("fname_case") + au BufNewFile,BufRead *.C,*.H setf cpp +endif + +" .h files can be C, Ch C++, ObjC or ObjC++. +" Set c_syntax_for_h if you want C, ch_syntax_for_h if you want Ch. ObjC is +" detected automatically. +au BufNewFile,BufRead *.h call s:FTheader() + +func! s:FTheader() + if match(getline(1, min([line("$"), 200])), '^@\(interface\|end\|class\)') > -1 + if exists("g:c_syntax_for_h") + setf objc + else + setf objcpp + endif + elseif exists("g:c_syntax_for_h") + setf c + elseif exists("g:ch_syntax_for_h") + setf ch + else + setf cpp + endif +endfunc + +" Ch (CHscript) +au BufNewFile,BufRead *.chf setf ch + +" TLH files are C++ headers generated by Visual C++'s #import from typelibs +au BufNewFile,BufRead *.tlh setf cpp + +" Cascading Style Sheets +au BufNewFile,BufRead *.css setf css + +" Century Term Command Scripts (*.cmd too) +au BufNewFile,BufRead *.con setf cterm + +" Changelog +au BufNewFile,BufRead changelog.Debian,changelog.dch,NEWS.Debian,NEWS.dch + \ setf debchangelog + +au BufNewFile,BufRead [cC]hange[lL]og + \ if getline(1) =~ '; urgency=' + \| setf debchangelog + \| else + \| setf changelog + \| endif + +au BufNewFile,BufRead NEWS + \ if getline(1) =~ '; urgency=' + \| setf debchangelog + \| endif + +" CHILL +au BufNewFile,BufRead *..ch setf chill + +" Changes for WEB and CWEB or CHILL +au BufNewFile,BufRead *.ch call s:FTchange() + +" This function checks if one of the first ten lines start with a '@'. In +" that case it is probably a change file. +" If the first line starts with # or ! it's probably a ch file. +" If a line has "main", "include", "//" ir "/*" it's probably ch. +" Otherwise CHILL is assumed. +func! s:FTchange() + let lnum = 1 + while lnum <= 10 + if getline(lnum)[0] == '@' + setf change + return + endif + if lnum == 1 && (getline(1)[0] == '#' || getline(1)[0] == '!') + setf ch + return + endif + if getline(lnum) =~ "MODULE" + setf chill + return + endif + if getline(lnum) =~ 'main\s*(\|#\s*include\|//' + setf ch + return + endif + let lnum = lnum + 1 + endwhile + setf chill +endfunc + +" ChordPro +au BufNewFile,BufRead *.chopro,*.crd,*.cho,*.crdpro,*.chordpro setf chordpro + +" Clean +au BufNewFile,BufRead *.dcl,*.icl setf clean + +" Clever +au BufNewFile,BufRead *.eni setf cl + +" Clever or dtd +au BufNewFile,BufRead *.ent call s:FTent() + +func! s:FTent() + " This function checks for valid cl syntax in the first five lines. + " Look for either an opening comment, '#', or a block start, '{". + " If not found, assume SGML. + let lnum = 1 + while lnum < 6 + let line = getline(lnum) + if line =~ '^\s*[#{]' + setf cl + return + elseif line !~ '^\s*$' + " Not a blank line, not a comment, and not a block start, + " so doesn't look like valid cl code. + break + endif + let lnum = lnum + 1 + endw + setf dtd +endfunc + +" Clipper (or FoxPro; could also be eviews) +au BufNewFile,BufRead *.prg + \ if exists("g:filetype_prg") | + \ exe "setf " . g:filetype_prg | + \ else | + \ setf clipper | + \ endif + +" Clojure +au BufNewFile,BufRead *.clj,*.cljs setf clojure + +" Cmake +au BufNewFile,BufRead CMakeLists.txt,*.cmake,*.cmake.in setf cmake + +" Cmusrc +au BufNewFile,BufRead */.cmus/{autosave,rc,command-history,*.theme} setf cmusrc +au BufNewFile,BufRead */cmus/{rc,*.theme} setf cmusrc + +" Cobol +au BufNewFile,BufRead *.cbl,*.cob,*.lib setf cobol +" cobol or zope form controller python script? (heuristic) +au BufNewFile,BufRead *.cpy + \ if getline(1) =~ '^##' | + \ setf python | + \ else | + \ setf cobol | + \ endif + +" Coco/R +au BufNewFile,BufRead *.atg setf coco + +" Cold Fusion +au BufNewFile,BufRead *.cfm,*.cfi,*.cfc setf cf + +" Configure scripts +au BufNewFile,BufRead configure.in,configure.ac setf config + +" CUDA Cumpute Unified Device Architecture +au BufNewFile,BufRead *.cu setf cuda + +" WildPackets EtherPeek Decoder +au BufNewFile,BufRead *.dcd setf dcd + +" Enlightenment configuration files +au BufNewFile,BufRead *enlightenment/*.cfg setf c + +" Eterm +au BufNewFile,BufRead *Eterm/*.cfg setf eterm + +" Euphoria 3 or 4 +au BufNewFile,BufRead *.eu,*.ew,*.ex,*.exu,*.exw call s:EuphoriaCheck() +if has("fname_case") + au BufNewFile,BufRead *.EU,*.EW,*.EX,*.EXU,*.EXW call s:EuphoriaCheck() +endif + +func! s:EuphoriaCheck() + if exists('g:filetype_euphoria') + exe 'setf ' . g:filetype_euphoria + else + setf euphoria3 + endif +endfunc + +" Lynx config files +au BufNewFile,BufRead lynx.cfg setf lynx + +" Quake +au BufNewFile,BufRead *baseq[2-3]/*.cfg,*id1/*.cfg setf quake +au BufNewFile,BufRead *quake[1-3]/*.cfg setf quake + +" Quake C +au BufNewFile,BufRead *.qc setf c + +" Configure files +au BufNewFile,BufRead *.cfg setf cfg + +" Cucumber +au BufNewFile,BufRead *.feature setf cucumber + +" Communicating Sequential Processes +au BufNewFile,BufRead *.csp,*.fdr setf csp + +" CUPL logic description and simulation +au BufNewFile,BufRead *.pld setf cupl +au BufNewFile,BufRead *.si setf cuplsim + +" Debian Control +au BufNewFile,BufRead */debian/control setf debcontrol +au BufNewFile,BufRead control + \ if getline(1) =~ '^Source:' + \| setf debcontrol + \| endif + +" Debian Sources.list +au BufNewFile,BufRead */etc/apt/sources.list setf debsources +au BufNewFile,BufRead */etc/apt/sources.list.d/*.list setf debsources + +" Deny hosts +au BufNewFile,BufRead denyhosts.conf setf denyhosts + +" dnsmasq(8) configuration files +au BufNewFile,BufRead */etc/dnsmasq.conf setf dnsmasq + +" ROCKLinux package description +au BufNewFile,BufRead *.desc setf desc + +" the D language or dtrace +au BufNewFile,BufRead *.d call s:DtraceCheck() + +func! s:DtraceCheck() + let lines = getline(1, min([line("$"), 100])) + if match(lines, '^module\>\|^import\>') > -1 + " D files often start with a module and/or import statement. + setf d + elseif match(lines, '^#!\S\+dtrace\|#pragma\s\+D\s\+option\|:\S\{-}:\S\{-}:') > -1 + setf dtrace + else + setf d + endif +endfunc + +" Desktop files +au BufNewFile,BufRead *.desktop,.directory setf desktop + +" Dict config +au BufNewFile,BufRead dict.conf,.dictrc setf dictconf + +" Dictd config +au BufNewFile,BufRead dictd.conf setf dictdconf + +" Diff files +au BufNewFile,BufRead *.diff,*.rej,*.patch setf diff + +" Dircolors +au BufNewFile,BufRead .dir_colors,.dircolors,*/etc/DIR_COLORS setf dircolors + +" Diva (with Skill) or InstallShield +au BufNewFile,BufRead *.rul + \ if getline(1).getline(2).getline(3).getline(4).getline(5).getline(6) =~? 'InstallShield' | + \ setf ishd | + \ else | + \ setf diva | + \ endif + +" DCL (Digital Command Language - vms) or DNS zone file +au BufNewFile,BufRead *.com call s:BindzoneCheck('dcl') + +" DOT +au BufNewFile,BufRead *.dot setf dot + +" Dylan - lid files +au BufNewFile,BufRead *.lid setf dylanlid + +" Dylan - intr files (melange) +au BufNewFile,BufRead *.intr setf dylanintr + +" Dylan +au BufNewFile,BufRead *.dylan setf dylan + +" Microsoft Module Definition +au BufNewFile,BufRead *.def setf def + +" Dracula +au BufNewFile,BufRead *.drac,*.drc,*lvs,*lpe setf dracula + +" Datascript +au BufNewFile,BufRead *.ds setf datascript + +" dsl +au BufNewFile,BufRead *.dsl setf dsl + +" DTD (Document Type Definition for XML) +au BufNewFile,BufRead *.dtd setf dtd + +" DTS/DSTI (device tree files) +au BufNewFile,BufRead *.dts,*.dtsi setf dts + +" EDIF (*.edf,*.edif,*.edn,*.edo) +au BufNewFile,BufRead *.ed\(f\|if\|n\|o\) setf edif + +" Embedix Component Description +au BufNewFile,BufRead *.ecd setf ecd + +" Eiffel or Specman or Euphoria +au BufNewFile,BufRead *.e,*.E call s:FTe() + +" Elinks configuration +au BufNewFile,BufRead */etc/elinks.conf,*/.elinks/elinks.conf setf elinks + +func! s:FTe() + if exists('g:filetype_euphoria') + exe 'setf ' . g:filetype_euphoria + else + let n = 1 + while n < 100 && n < line("$") + if getline(n) =~ "^\\s*\\(<'\\|'>\\)\\s*$" + setf specman + return + endif + let n = n + 1 + endwhile + setf eiffel + endif +endfunc + +" ERicsson LANGuage; Yaws is erlang too +au BufNewFile,BufRead *.erl,*.hrl,*.yaws setf erlang + +" Elm Filter Rules file +au BufNewFile,BufRead filter-rules setf elmfilt + +" ESMTP rc file +au BufNewFile,BufRead *esmtprc setf esmtprc + +" ESQL-C +au BufNewFile,BufRead *.ec,*.EC setf esqlc + +" Esterel +au BufNewFile,BufRead *.strl setf esterel + +" Essbase script +au BufNewFile,BufRead *.csc setf csc + +" Exim +au BufNewFile,BufRead exim.conf setf exim + +" Expect +au BufNewFile,BufRead *.exp setf expect + +" Exports +au BufNewFile,BufRead exports setf exports + +" Falcon +au BufNewFile,BufRead *.fal setf falcon + +" Fantom +au BufNewFile,BufRead *.fan,*.fwt setf fan + +" Factor +au BufNewFile,BufRead *.factor setf factor + +" Fetchmail RC file +au BufNewFile,BufRead .fetchmailrc setf fetchmail + +" FlexWiki - disabled, because it has side effects when a .wiki file +" is not actually FlexWiki +"au BufNewFile,BufRead *.wiki setf flexwiki + +" Focus Executable +au BufNewFile,BufRead *.fex,*.focexec setf focexec + +" Focus Master file (but not for auto.master) +au BufNewFile,BufRead auto.master setf conf +au BufNewFile,BufRead *.mas,*.master setf master + +" Forth +au BufNewFile,BufRead *.fs,*.ft setf forth + +" Reva Forth +au BufNewFile,BufRead *.frt setf reva + +" Fortran +if has("fname_case") + au BufNewFile,BufRead *.F,*.FOR,*.FPP,*.FTN,*.F77,*.F90,*.F95,*.F03,*.F08 setf fortran +endif +au BufNewFile,BufRead *.f,*.for,*.fortran,*.fpp,*.ftn,*.f77,*.f90,*.f95,*.f03,*.f08 setf fortran + +" Framescript +au BufNewFile,BufRead *.fsl setf framescript + +" FStab +au BufNewFile,BufRead fstab,mtab setf fstab + +" GDB command files +au BufNewFile,BufRead .gdbinit setf gdb + +" GDMO +au BufNewFile,BufRead *.mo,*.gdmo setf gdmo + +" Gedcom +au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom + +" Git +au BufNewFile,BufRead *.git/COMMIT_EDITMSG setf gitcommit +au BufNewFile,BufRead *.git/MERGE_MSG setf gitcommit +au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig +au BufNewFile,BufRead *.git/modules/*/COMMIT_EDITMSG setf gitcommit +au BufNewFile,BufRead *.git/modules/*/config setf gitconfig +au BufNewFile,BufRead */.config/git/config setf gitconfig +au BufNewFile,BufRead git-rebase-todo setf gitrebase +au BufNewFile,BufRead .msg.[0-9]* + \ if getline(1) =~ '^From.*# This line is ignored.$' | + \ setf gitsendemail | + \ endif +au BufNewFile,BufRead *.git/* + \ if getline(1) =~ '^\x\{40\}\>\|^ref: ' | + \ setf git | + \ endif + +" Gkrellmrc +au BufNewFile,BufRead gkrellmrc,gkrellmrc_? setf gkrellmrc + +" GP scripts (2.0 and onward) +au BufNewFile,BufRead *.gp,.gprc setf gp + +" GPG +au BufNewFile,BufRead */.gnupg/options setf gpg +au BufNewFile,BufRead */.gnupg/gpg.conf setf gpg +au BufNewFile,BufRead */usr/*/gnupg/options.skel setf gpg + +" gnash(1) configuration files +au BufNewFile,BufRead gnashrc,.gnashrc,gnashpluginrc,.gnashpluginrc setf gnash + +" Gitolite +au BufNewFile,BufRead gitolite.conf setf gitolite +au BufNewFile,BufRead */gitolite-admin/conf/* call s:StarSetf('gitolite') +au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc setf perl + +" Gnuplot scripts +au BufNewFile,BufRead *.gpi setf gnuplot + +" GrADS scripts +au BufNewFile,BufRead *.gs setf grads + +" Gretl +au BufNewFile,BufRead *.gretl setf gretl + +" Groovy +au BufNewFile,BufRead *.groovy setf groovy + +" GNU Server Pages +au BufNewFile,BufRead *.gsp setf gsp + +" Group file +au BufNewFile,BufRead */etc/group,*/etc/group-,*/etc/group.edit,*/etc/gshadow,*/etc/gshadow-,*/etc/gshadow.edit,*/var/backups/group.bak,*/var/backups/gshadow.bak setf group + +" GTK RC +au BufNewFile,BufRead .gtkrc,gtkrc setf gtkrc + +" Haml +au BufNewFile,BufRead *.haml setf haml + +" Hamster Classic | Playground files +au BufNewFile,BufRead *.hsc,*.hsm setf hamster + +" Haskell +au BufNewFile,BufRead *.hs,*.hs-boot setf haskell +au BufNewFile,BufRead *.lhs setf lhaskell +au BufNewFile,BufRead *.chs setf chaskell + +" Haste +au BufNewFile,BufRead *.ht setf haste +au BufNewFile,BufRead *.htpp setf hastepreproc + +" Hercules +au BufNewFile,BufRead *.vc,*.ev,*.rs,*.sum,*.errsum setf hercules + +" HEX (Intel) +au BufNewFile,BufRead *.hex,*.h32 setf hex + +" Tilde (must be before HTML) +au BufNewFile,BufRead *.t.html setf tilde + +" HTML (.shtml and .stm for server side) +au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call s:FThtml() + +" Distinguish between HTML, XHTML and Django +func! s:FThtml() + let n = 1 + while n < 10 && n < line("$") + if getline(n) =~ '\' + setf htmldjango + return + endif + let n = n + 1 + endwhile + setf html +endfunc + +" HTML with Ruby - eRuby +au BufNewFile,BufRead *.erb,*.rhtml setf eruby + +" HTML with M4 +au BufNewFile,BufRead *.html.m4 setf htmlm4 + +" HTML Cheetah template +au BufNewFile,BufRead *.tmpl setf htmlcheetah + +" Host config +au BufNewFile,BufRead */etc/host.conf setf hostconf + +" Hosts access +au BufNewFile,BufRead */etc/hosts.allow,*/etc/hosts.deny setf hostsaccess + +" Hyper Builder +au BufNewFile,BufRead *.hb setf hb + +" Httest +au BufNewFile,BufRead *.htt,*.htb setf httest + +" Icon +au BufNewFile,BufRead *.icn setf icon + +" IDL (Interface Description Language) +au BufNewFile,BufRead *.idl call s:FTidl() + +" Distinguish between standard IDL and MS-IDL +func! s:FTidl() + let n = 1 + while n < 50 && n < line("$") + if getline(n) =~ '^\s*import\s\+"\(unknwn\|objidl\)\.idl"' + setf msidl + return + endif + let n = n + 1 + endwhile + setf idl +endfunc + +" Microsoft IDL (Interface Description Language) Also *.idl +" MOF = WMI (Windows Management Instrumentation) Managed Object Format +au BufNewFile,BufRead *.odl,*.mof setf msidl + +" Icewm menu +au BufNewFile,BufRead */.icewm/menu setf icemenu + +" Indent profile (must come before IDL *.pro!) +au BufNewFile,BufRead .indent.pro setf indent +au BufNewFile,BufRead indent.pro call s:ProtoCheck('indent') + +" IDL (Interactive Data Language) +au BufNewFile,BufRead *.pro call s:ProtoCheck('idlang') + +" Distinguish between "default" and Cproto prototype file. */ +func! s:ProtoCheck(default) + " Cproto files have a comment in the first line and a function prototype in + " the second line, it always ends in ";". Indent files may also have + " comments, thus we can't match comments to see the difference. + " IDL files can have a single ';' in the second line, require at least one + " chacter before the ';'. + if getline(2) =~ '.;$' + setf cpp + else + exe 'setf ' . a:default + endif +endfunc + + +" Indent RC +au BufNewFile,BufRead indentrc setf indent + +" Inform +au BufNewFile,BufRead *.inf,*.INF setf inform + +" Initng +au BufNewFile,BufRead */etc/initng/*/*.i,*.ii setf initng + +" Innovation Data Processing +au BufRead,BufNewFile upstream.dat\c,upstream.*.dat\c,*.upstream.dat\c setf upstreamdat +au BufRead,BufNewFile upstream.log\c,upstream.*.log\c,*.upstream.log\c setf upstreamlog +au BufRead,BufNewFile upstreaminstall.log\c,upstreaminstall.*.log\c,*.upstreaminstall.log\c setf upstreaminstalllog +au BufRead,BufNewFile usserver.log\c,usserver.*.log\c,*.usserver.log\c setf usserverlog +au BufRead,BufNewFile usw2kagt.log\c,usw2kagt.*.log\c,*.usw2kagt.log\c setf usw2kagtlog + +" Ipfilter +au BufNewFile,BufRead ipf.conf,ipf6.conf,ipf.rules setf ipfilter + +" Informix 4GL (source - canonical, include file, I4GL+M4 preproc.) +au BufNewFile,BufRead *.4gl,*.4gh,*.m4gl setf fgl + +" .INI file for MSDOS +au BufNewFile,BufRead *.ini setf dosini + +" SysV Inittab +au BufNewFile,BufRead inittab setf inittab + +" Inno Setup +au BufNewFile,BufRead *.iss setf iss + +" J +au BufNewFile,BufRead *.ijs setf j + +" JAL +au BufNewFile,BufRead *.jal,*.JAL setf jal + +" Jam +au BufNewFile,BufRead *.jpl,*.jpr setf jam + +" Java +au BufNewFile,BufRead *.java,*.jav setf java + +" JavaCC +au BufNewFile,BufRead *.jj,*.jjt setf javacc + +" JavaScript, ECMAScript +au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx setf javascript + +" Java Server Pages +au BufNewFile,BufRead *.jsp setf jsp + +" Java Properties resource file (note: doesn't catch font.properties.pl) +au BufNewFile,BufRead *.properties,*.properties_??,*.properties_??_?? setf jproperties +au BufNewFile,BufRead *.properties_??_??_* call s:StarSetf('jproperties') + +" Jess +au BufNewFile,BufRead *.clp setf jess + +" Jgraph +au BufNewFile,BufRead *.jgr setf jgraph + +" Jovial +au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial + +" JSON +au BufNewFile,BufRead *.json setf json + +" Kixtart +au BufNewFile,BufRead *.kix setf kix + +" Kimwitu[++] +au BufNewFile,BufRead *.k setf kwt + +" Kivy +au BufNewFile,BufRead *.kv setf kivy + +" KDE script +au BufNewFile,BufRead *.ks setf kscript + +" Kconfig +au BufNewFile,BufRead Kconfig,Kconfig.debug setf kconfig + +" Lace (ISE) +au BufNewFile,BufRead *.ace,*.ACE setf lace + +" Latte +au BufNewFile,BufRead *.latte,*.lte setf latte + +" Limits +au BufNewFile,BufRead */etc/limits,*/etc/*limits.conf,*/etc/*limits.d/*.conf setf limits + +" LambdaProlog (*.mod too, see Modsim) +au BufNewFile,BufRead *.sig setf lprolog + +" LDAP LDIF +au BufNewFile,BufRead *.ldif setf ldif + +" Ld loader +au BufNewFile,BufRead *.ld setf ld + +" Lex +au BufNewFile,BufRead *.lex,*.l,*.lxx,*.l++ setf lex + +" Libao +au BufNewFile,BufRead */etc/libao.conf,*/.libao setf libao + +" Libsensors +au BufNewFile,BufRead */etc/sensors.conf,*/etc/sensors3.conf setf sensors + +" LFTP +au BufNewFile,BufRead lftp.conf,.lftprc,*lftp/rc setf lftp + +" Lifelines (or Lex for C++!) +au BufNewFile,BufRead *.ll setf lifelines + +" Lilo: Linux loader +au BufNewFile,BufRead lilo.conf setf lilo + +" Lisp (*.el = ELisp, *.cl = Common Lisp, *.jl = librep Lisp) +if has("fname_case") + au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,*.jl,*.L,.emacs,.sawfishrc setf lisp +else + au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,*.jl,.emacs,.sawfishrc setf lisp +endif + +" SBCL implementation of Common Lisp +au BufNewFile,BufRead sbclrc,.sbclrc setf lisp + +" Liquid +au BufNewFile,BufRead *.liquid setf liquid + +" Lite +au BufNewFile,BufRead *.lite,*.lt setf lite + +" LiteStep RC files +au BufNewFile,BufRead */LiteStep/*/*.rc setf litestep + +" Login access +au BufNewFile,BufRead */etc/login.access setf loginaccess + +" Login defs +au BufNewFile,BufRead */etc/login.defs setf logindefs + +" Logtalk +au BufNewFile,BufRead *.lgt setf logtalk + +" LOTOS +au BufNewFile,BufRead *.lot,*.lotos setf lotos + +" Lout (also: *.lt) +au BufNewFile,BufRead *.lou,*.lout setf lout + +" Lua +au BufNewFile,BufRead *.lua setf lua + +" Linden Scripting Language (Second Life) +au BufNewFile,BufRead *.lsl setf lsl + +" Lynx style file (or LotusScript!) +au BufNewFile,BufRead *.lss setf lss + +" M4 +au BufNewFile,BufRead *.m4 + \ if expand("") !~? 'html.m4$\|fvwm2rc' | setf m4 | endif + +" MaGic Point +au BufNewFile,BufRead *.mgp setf mgp + +" Mail (for Elm, trn, mutt, muttng, rn, slrn) +au BufNewFile,BufRead snd.\d\+,.letter,.letter.\d\+,.followup,.article,.article.\d\+,pico.\d\+,mutt{ng,}-*-\w\+,mutt[[:alnum:]_-]\\\{6\},ae\d\+.txt,/tmp/SLRN[0-9A-Z.]\+,*.eml setf mail + +" Mail aliases +au BufNewFile,BufRead */etc/mail/aliases,*/etc/aliases setf mailaliases + +" Mailcap configuration file +au BufNewFile,BufRead .mailcap,mailcap setf mailcap + +" Makefile +au BufNewFile,BufRead *[mM]akefile,*.mk,*.mak,*.dsp setf make + +" MakeIndex +au BufNewFile,BufRead *.ist,*.mst setf ist + +" Mallard +au BufNewFile,BufRead *.page setf mallard + +" Manpage +au BufNewFile,BufRead *.man setf man + +" Man config +au BufNewFile,BufRead */etc/man.conf,man.config setf manconf + +" Maple V +au BufNewFile,BufRead *.mv,*.mpl,*.mws setf maple + +" Map (UMN mapserver config file) +au BufNewFile,BufRead *.map setf map + +" Markdown +au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,README.md setf markdown + +" Mason +au BufNewFile,BufRead *.mason,*.mhtml setf mason + +" Matlab or Objective C +au BufNewFile,BufRead *.m call s:FTm() + +func! s:FTm() + let n = 1 + while n < 10 + let line = getline(n) + if line =~ '^\s*\(#\s*\(include\|import\)\>\|/\*\|//\)' + setf objc + return + endif + if line =~ '^\s*%' + setf matlab + return + endif + if line =~ '^\s*(\*' + setf mma + return + endif + let n = n + 1 + endwhile + if exists("g:filetype_m") + exe "setf " . g:filetype_m + else + setf matlab + endif +endfunc + +" Mathematica notebook +au BufNewFile,BufRead *.nb setf mma + +" Maya Extension Language +au BufNewFile,BufRead *.mel setf mel + +" Mercurial (hg) commit file +au BufNewFile,BufRead hg-editor-*.txt setf hgcommit + +" Mercurial config (looks like generic config file) +au BufNewFile,BufRead *.hgrc,*hgrc setf cfg + +" Messages (logs mostly) +au BufNewFile,BufRead */log/{auth,cron,daemon,debug,kern,lpr,mail,messages,news/news,syslog,user}{,.log,.err,.info,.warn,.crit,.notice}{,.[0-9]*,-[0-9]*} setf messages + +" Metafont +au BufNewFile,BufRead *.mf setf mf + +" MetaPost +au BufNewFile,BufRead *.mp setf mp + +" MGL +au BufNewFile,BufRead *.mgl setf mgl + +" MIX - Knuth assembly +au BufNewFile,BufRead *.mix,*.mixal setf mix + +" MMIX or VMS makefile +au BufNewFile,BufRead *.mms call s:FTmms() + +" Symbian meta-makefile definition (MMP) +au BufNewFile,BufRead *.mmp setf mmp + +func! s:FTmms() + let n = 1 + while n < 10 + let line = getline(n) + if line =~ '^\s*\(%\|//\)' || line =~ '^\*' + setf mmix + return + endif + if line =~ '^\s*#' + setf make + return + endif + let n = n + 1 + endwhile + setf mmix +endfunc + + +" Modsim III (or LambdaProlog) +au BufNewFile,BufRead *.mod + \ if getline(1) =~ '\' | + \ setf lprolog | + \ else | + \ setf modsim3 | + \ endif + +" Modula 2 +au BufNewFile,BufRead *.m2,*.DEF,*.MOD,*.md,*.mi setf modula2 + +" Modula 3 (.m3, .i3, .mg, .ig) +au BufNewFile,BufRead *.[mi][3g] setf modula3 + +" Monk +au BufNewFile,BufRead *.isc,*.monk,*.ssc,*.tsc setf monk + +" MOO +au BufNewFile,BufRead *.moo setf moo + +" Modconf +au BufNewFile,BufRead */etc/modules.conf,*/etc/modules,*/etc/conf.modules setf modconf + +" Mplayer config +au BufNewFile,BufRead mplayer.conf,*/.mplayer/config setf mplayerconf + +" Moterola S record +au BufNewFile,BufRead *.s19,*.s28,*.s37 setf srec + +" Mrxvtrc +au BufNewFile,BufRead mrxvtrc,.mrxvtrc setf mrxvtrc + +" Msql +au BufNewFile,BufRead *.msql setf msql + +" Mysql +au BufNewFile,BufRead *.mysql setf mysql + +" Mutt setup files (must be before catch *.rc) +au BufNewFile,BufRead */etc/Muttrc.d/* call s:StarSetf('muttrc') + +" M$ Resource files +au BufNewFile,BufRead *.rc,*.rch setf rc + +" MuPAD source +au BufRead,BufNewFile *.mu setf mupad + +" Mush +au BufNewFile,BufRead *.mush setf mush + +" Mutt setup file (also for Muttng) +au BufNewFile,BufRead Mutt{ng,}rc setf muttrc + +" Nano +au BufNewFile,BufRead */etc/nanorc,.nanorc setf nanorc + +" Nastran input/DMAP +"au BufNewFile,BufRead *.dat setf nastran + +" Natural +au BufNewFile,BufRead *.NS[ACGLMNPS] setf natural + +" Netrc +au BufNewFile,BufRead .netrc setf netrc + +" Ninja file +au BufNewFile,BufRead *.ninja setf ninja + +" Novell netware batch files +au BufNewFile,BufRead *.ncf setf ncf + +" Nroff/Troff (*.ms and *.t are checked below) +au BufNewFile,BufRead *.me + \ if expand("") != "read.me" && expand("") != "click.me" | + \ setf nroff | + \ endif +au BufNewFile,BufRead *.tr,*.nr,*.roff,*.tmac,*.mom setf nroff +au BufNewFile,BufRead *.[1-9] call s:FTnroff() + +" This function checks if one of the first five lines start with a dot. In +" that case it is probably an nroff file: 'filetype' is set and 1 is returned. +func! s:FTnroff() + if getline(1)[0] . getline(2)[0] . getline(3)[0] . getline(4)[0] . getline(5)[0] =~ '\.' + setf nroff + return 1 + endif + return 0 +endfunc + +" Nroff or Objective C++ +au BufNewFile,BufRead *.mm call s:FTmm() + +func! s:FTmm() + let n = 1 + while n < 10 + let line = getline(n) + if line =~ '^\s*\(#\s*\(include\|import\)\>\|/\*\)' + setf objcpp + return + endif + let n = n + 1 + endwhile + setf nroff +endfunc + +" Not Quite C +au BufNewFile,BufRead *.nqc setf nqc + +" NSIS +au BufNewFile,BufRead *.nsi,*.nsh setf nsis + +" OCAML +au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit setf ocaml + +" Occam +au BufNewFile,BufRead *.occ setf occam + +" Omnimark +au BufNewFile,BufRead *.xom,*.xin setf omnimark + +" OpenROAD +au BufNewFile,BufRead *.or setf openroad + +" OPL +au BufNewFile,BufRead *.[Oo][Pp][Ll] setf opl + +" Oracle config file +au BufNewFile,BufRead *.ora setf ora + +" Packet filter conf +au BufNewFile,BufRead pf.conf setf pf + +" Pam conf +au BufNewFile,BufRead */etc/pam.conf setf pamconf + +" PApp +au BufNewFile,BufRead *.papp,*.pxml,*.pxsl setf papp + +" Password file +au BufNewFile,BufRead */etc/passwd,*/etc/passwd-,*/etc/passwd.edit,*/etc/shadow,*/etc/shadow-,*/etc/shadow.edit,*/var/backups/passwd.bak,*/var/backups/shadow.bak setf passwd + +" Pascal (also *.p) +au BufNewFile,BufRead *.pas setf pascal + +" Delphi project file +au BufNewFile,BufRead *.dpr setf pascal + +" PDF +au BufNewFile,BufRead *.pdf setf pdf + +" Perl +if has("fname_case") + au BufNewFile,BufRead *.pl,*.PL call s:FTpl() +else + au BufNewFile,BufRead *.pl call s:FTpl() +endif +au BufNewFile,BufRead *.plx,*.al setf perl +au BufNewFile,BufRead *.p6,*.pm6 setf perl6 + +func! s:FTpl() + if exists("g:filetype_pl") + exe "setf " . g:filetype_pl + else + " recognize Prolog by specific text in the first non-empty line + " require a blank after the '%' because Perl uses "%list" and "%translate" + let l = getline(nextnonblank(1)) + if l =~ '\' || l =~ '^\s*\(%\+\(\s\|$\)\|/\*\)' || l =~ ':-' + setf prolog + else + setf perl + endif + endif +endfunc + +" Perl, XPM or XPM2 +au BufNewFile,BufRead *.pm + \ if getline(1) =~ "XPM2" | + \ setf xpm2 | + \ elseif getline(1) =~ "XPM" | + \ setf xpm | + \ else | + \ setf perl | + \ endif + +" Perl POD +au BufNewFile,BufRead *.pod setf pod + +" Php, php3, php4, etc. +" Also Phtml (was used for PHP 2 in the past) +" Also .ctp for Cake template file +au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp setf php + +" Pike +au BufNewFile,BufRead *.pike,*.lpc,*.ulpc,*.pmod setf pike + +" Pinfo config +au BufNewFile,BufRead */etc/pinforc,*/.pinforc setf pinfo + +" Palm Resource compiler +au BufNewFile,BufRead *.rcp setf pilrc + +" Pine config +au BufNewFile,BufRead .pinerc,pinerc,.pinercex,pinercex setf pine + +" PL/1, PL/I +au BufNewFile,BufRead *.pli,*.pl1 setf pli + +" PL/M (also: *.inp) +au BufNewFile,BufRead *.plm,*.p36,*.pac setf plm + +" PL/SQL +au BufNewFile,BufRead *.pls,*.plsql setf plsql + +" PLP +au BufNewFile,BufRead *.plp setf plp + +" PO and PO template (GNU gettext) +au BufNewFile,BufRead *.po,*.pot setf po + +" Postfix main config +au BufNewFile,BufRead main.cf setf pfmain + +" PostScript (+ font files, encapsulated PostScript, Adobe Illustrator) +au BufNewFile,BufRead *.ps,*.pfa,*.afm,*.eps,*.epsf,*.epsi,*.ai setf postscr + +" PostScript Printer Description +au BufNewFile,BufRead *.ppd setf ppd + +" Povray +au BufNewFile,BufRead *.pov setf pov + +" Povray configuration +au BufNewFile,BufRead .povrayrc setf povini + +" Povray, PHP or assembly +au BufNewFile,BufRead *.inc call s:FTinc() + +func! s:FTinc() + if exists("g:filetype_inc") + exe "setf " . g:filetype_inc + else + let lines = getline(1).getline(2).getline(3) + if lines =~? "perlscript" + setf aspperl + elseif lines =~ "<%" + setf aspvbs + elseif lines =~ "' + \ || line =~ '^\s*{' || line =~ '^\s*(\*' + setf pascal + return + elseif line !~ '^\s*$' || line =~ '^/\*' + " Not an empty line: Doesn't look like valid Pascal code. + " Or it looks like a Progress /* comment + break + endif + let lnum = lnum + 1 + endw + setf progress +endfunc + + +" Software Distributor Product Specification File (POSIX 1387.2-1995) +au BufNewFile,BufRead *.psf setf psf +au BufNewFile,BufRead INDEX,INFO + \ if getline(1) =~ '^\s*\(distribution\|installed_software\|root\|bundle\|product\)\s*$' | + \ setf psf | + \ endif + +" Prolog +au BufNewFile,BufRead *.pdb setf prolog + +" Promela +au BufNewFile,BufRead *.pml setf promela + +" Google protocol buffers +au BufNewFile,BufRead *.proto setf proto + +" Protocols +au BufNewFile,BufRead */etc/protocols setf protocols + +" Pyrex +au BufNewFile,BufRead *.pyx,*.pxd setf pyrex + +" Python +au BufNewFile,BufRead *.py,*.pyw setf python + +" Quixote (Python-based web framework) +au BufNewFile,BufRead *.ptl setf python + +" Radiance +au BufNewFile,BufRead *.rad,*.mat setf radiance + +" Ratpoison config/command files +au BufNewFile,BufRead .ratpoisonrc,ratpoisonrc setf ratpoison + +" RCS file +au BufNewFile,BufRead *\,v setf rcs + +" Readline +au BufNewFile,BufRead .inputrc,inputrc setf readline + +" Registry for MS-Windows +au BufNewFile,BufRead *.reg + \ if getline(1) =~? '^REGEDIT[0-9]*\s*$\|^Windows Registry Editor Version \d*\.\d*\s*$' | setf registry | endif + +" Renderman Interface Bytestream +au BufNewFile,BufRead *.rib setf rib + +" Rexx +au BufNewFile,BufRead *.rex,*.orx,*.rxo,*.rxj,*.jrexx,*.rexxj,*.rexx,*.testGroup,*.testUnit setf rexx + +" R (Splus) +if has("fname_case") + au BufNewFile,BufRead *.s,*.S setf r +else + au BufNewFile,BufRead *.s setf r +endif + +" R Help file +if has("fname_case") + au BufNewFile,BufRead *.rd,*.Rd setf rhelp +else + au BufNewFile,BufRead *.rd setf rhelp +endif + +" R noweb file +if has("fname_case") + au BufNewFile,BufRead *.Rnw,*.rnw,*.Snw,*.snw setf rnoweb +else + au BufNewFile,BufRead *.rnw,*.snw setf rnoweb +endif + +" R Markdown file +if has("fname_case") + au BufNewFile,BufRead *.Rmd,*.rmd,*.Smd,*.smd setf rmd +else + au BufNewFile,BufRead *.rmd,*.smd setf rmd +endif + +" R reStructuredText file +if has("fname_case") + au BufNewFile,BufRead *.Rrst,*.rrst,*.Srst,*.srst setf rrst +else + au BufNewFile,BufRead *.rrst,*.srst setf rrst +endif + +" Rexx, Rebol or R +au BufNewFile,BufRead *.r,*.R call s:FTr() + +func! s:FTr() + let max = line("$") > 50 ? 50 : line("$") + + for n in range(1, max) + " Rebol is easy to recognize, check for that first + if getline(n) =~? '\' + setf rebol + return + endif + endfor + + for n in range(1, max) + " R has # comments + if getline(n) =~ '^\s*#' + setf r + return + endif + " Rexx has /* comments */ + if getline(n) =~ '^\s*/\*' + setf rexx + return + endif + endfor + + " Nothing recognized, use user default or assume Rexx + if exists("g:filetype_r") + exe "setf " . g:filetype_r + else + " Rexx used to be the default, but R appears to be much more popular. + setf r + endif +endfunc + +" Remind +au BufNewFile,BufRead .reminders,*.remind,*.rem setf remind + +" Resolv.conf +au BufNewFile,BufRead resolv.conf setf resolv + +" Relax NG Compact +au BufNewFile,BufRead *.rnc setf rnc + +" Relax NG XML +au BufNewFile,BufRead *.rng setf rng + +" RPL/2 +au BufNewFile,BufRead *.rpl setf rpl + +" Robots.txt +au BufNewFile,BufRead robots.txt setf robots + +" Rpcgen +au BufNewFile,BufRead *.x setf rpcgen + +" reStructuredText Documentation Format +au BufNewFile,BufRead *.rst setf rst + +" RTF +au BufNewFile,BufRead *.rtf setf rtf + +" Interactive Ruby shell +au BufNewFile,BufRead .irbrc,irbrc setf ruby + +" Ruby +au BufNewFile,BufRead *.rb,*.rbw setf ruby + +" RubyGems +au BufNewFile,BufRead *.gemspec setf ruby + +" Rackup +au BufNewFile,BufRead *.ru setf ruby + +" Bundler +au BufNewFile,BufRead Gemfile setf ruby + +" Ruby on Rails +au BufNewFile,BufRead *.builder,*.rxml,*.rjs setf ruby + +" Rantfile and Rakefile is like Ruby +au BufNewFile,BufRead [rR]antfile,*.rant,[rR]akefile,*.rake setf ruby + +" S-lang (or shader language, or SmallLisp) +au BufNewFile,BufRead *.sl setf slang + +" Samba config +au BufNewFile,BufRead smb.conf setf samba + +" SAS script +au BufNewFile,BufRead *.sas setf sas + +" Sass +au BufNewFile,BufRead *.sass setf sass + +" Sather +au BufNewFile,BufRead *.sa setf sather + +" Scilab +au BufNewFile,BufRead *.sci,*.sce setf scilab + +" SCSS +au BufNewFile,BufRead *.scss setf scss + +" SD: Streaming Descriptors +au BufNewFile,BufRead *.sd setf sd + +" SDL +au BufNewFile,BufRead *.sdl,*.pr setf sdl + +" sed +au BufNewFile,BufRead *.sed setf sed + +" Sieve (RFC 3028) +au BufNewFile,BufRead *.siv setf sieve + +" Sendmail +au BufNewFile,BufRead sendmail.cf setf sm + +" Sendmail .mc files are actually m4. Could also be MS Message text file. +au BufNewFile,BufRead *.mc call s:McSetf() + +func! s:McSetf() + " Rely on the file to start with a comment. + " MS message text files use ';', Sendmail files use '#' or 'dnl' + for lnum in range(1, min([line("$"), 20])) + let line = getline(lnum) + if line =~ '^\s*\(#\|dnl\)' + setf m4 " Sendmail .mc file + return + elseif line =~ '^\s*;' + setf msmessages " MS Message text file + return + endif + endfor + setf m4 " Default: Sendmail .mc file +endfunc + +" Services +au BufNewFile,BufRead */etc/services setf services + +" Service Location config +au BufNewFile,BufRead */etc/slp.conf setf slpconf + +" Service Location registration +au BufNewFile,BufRead */etc/slp.reg setf slpreg + +" Service Location SPI +au BufNewFile,BufRead */etc/slp.spi setf slpspi + +" Setserial config +au BufNewFile,BufRead */etc/serial.conf setf setserial + +" SGML +au BufNewFile,BufRead *.sgm,*.sgml + \ if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'linuxdoc' | + \ setf sgmllnx | + \ elseif getline(1) =~ '") =~ g:ft_ignore_pat + return + endif + if a:name =~ '\' + " Some .sh scripts contain #!/bin/csh. + call SetFileTypeShell("csh") + return + elseif a:name =~ '\' + " Some .sh scripts contain #!/bin/tcsh. + call SetFileTypeShell("tcsh") + return + elseif a:name =~ '\' + " Some .sh scripts contain #!/bin/zsh. + call SetFileTypeShell("zsh") + return + elseif a:name =~ '\' + let b:is_kornshell = 1 + if exists("b:is_bash") + unlet b:is_bash + endif + if exists("b:is_sh") + unlet b:is_sh + endif + elseif exists("g:bash_is_sh") || a:name =~ '\' || a:name =~ '\' + let b:is_bash = 1 + if exists("b:is_kornshell") + unlet b:is_kornshell + endif + if exists("b:is_sh") + unlet b:is_sh + endif + elseif a:name =~ '\' + let b:is_sh = 1 + if exists("b:is_kornshell") + unlet b:is_kornshell + endif + if exists("b:is_bash") + unlet b:is_bash + endif + endif + call SetFileTypeShell("sh") +endfunc + +" For shell-like file types, check for an "exec" command hidden in a comment, +" as used for Tcl. +" Also called from scripts.vim, thus can't be local to this script. +func! SetFileTypeShell(name) + if expand("") =~ g:ft_ignore_pat + return + endif + let l = 2 + while l < 20 && l < line("$") && getline(l) =~ '^\s*\(#\|$\)' + " Skip empty and comment lines. + let l = l + 1 + endwhile + if l < line("$") && getline(l) =~ '\s*exec\s' && getline(l - 1) =~ '^\s*#.*\\$' + " Found an "exec" line after a comment with continuation + let n = substitute(getline(l),'\s*exec\s\+\([^ ]*/\)\=', '', '') + if n =~ '\' | + \ setf xml | + \ else | + \ setf smil | + \ endif + +" SMIL or SNMP MIB file +au BufNewFile,BufRead *.smi + \ if getline(1) =~ '\' | + \ setf smil | + \ else | + \ setf mib | + \ endif + +" SMITH +au BufNewFile,BufRead *.smt,*.smith setf smith + +" Snobol4 and spitbol +au BufNewFile,BufRead *.sno,*.spt setf snobol4 + +" SNMP MIB files +au BufNewFile,BufRead *.mib,*.my setf mib + +" Snort Configuration +au BufNewFile,BufRead *.hog,snort.conf,vision.conf setf hog +au BufNewFile,BufRead *.rules call s:FTRules() + +let s:ft_rules_udev_rules_pattern = '^\s*\cudev_rules\s*=\s*"\([^"]\{-1,}\)/*".*' +func! s:FTRules() + let path = expand(':p') + if path =~ '^/\(etc/udev/\%(rules\.d/\)\=.*\.rules\|lib/udev/\%(rules\.d/\)\=.*\.rules\)$' + setf udevrules + return + endif + if path =~ '^/etc/ufw/' + setf conf " Better than hog + return + endif + try + let config_lines = readfile('/etc/udev/udev.conf') + catch /^Vim\%((\a\+)\)\=:E484/ + setf hog + return + endtry + let dir = expand(':p:h') + for line in config_lines + if line =~ s:ft_rules_udev_rules_pattern + let udev_rules = substitute(line, s:ft_rules_udev_rules_pattern, '\1', "") + if dir == udev_rules + setf udevrules + endif + break + endif + endfor + setf hog +endfunc + + +" Spec (Linux RPM) +au BufNewFile,BufRead *.spec setf spec + +" Speedup (AspenTech plant simulator) +au BufNewFile,BufRead *.speedup,*.spdata,*.spd setf spup + +" Slice +au BufNewFile,BufRead *.ice setf slice + +" Spice +au BufNewFile,BufRead *.sp,*.spice setf spice + +" Spyce +au BufNewFile,BufRead *.spy,*.spi setf spyce + +" Squid +au BufNewFile,BufRead squid.conf setf squid + +" SQL for Oracle Designer +au BufNewFile,BufRead *.tyb,*.typ,*.tyc,*.pkb,*.pks setf sql + +" SQL +au BufNewFile,BufRead *.sql call s:SQL() + +func! s:SQL() + if exists("g:filetype_sql") + exe "setf " . g:filetype_sql + else + setf sql + endif +endfunc + +" SQLJ +au BufNewFile,BufRead *.sqlj setf sqlj + +" SQR +au BufNewFile,BufRead *.sqr,*.sqi setf sqr + +" OpenSSH configuration +au BufNewFile,BufRead ssh_config,*/.ssh/config setf sshconfig + +" OpenSSH server configuration +au BufNewFile,BufRead sshd_config setf sshdconfig + +" Stata +au BufNewFile,BufRead *.ado,*.class,*.do,*.imata,*.mata setf stata + +" SMCL +au BufNewFile,BufRead *.hlp,*.ihlp,*.smcl setf smcl + +" Stored Procedures +au BufNewFile,BufRead *.stp setf stp + +" Standard ML +au BufNewFile,BufRead *.sml setf sml + +" Sratus VOS command macro +au BufNewFile,BufRead *.cm setf voscm + +" Sysctl +au BufNewFile,BufRead */etc/sysctl.conf,*/etc/sysctl.d/*.conf setf sysctl + +" Synopsys Design Constraints +au BufNewFile,BufRead *.sdc setf sdc + +" Sudoers +au BufNewFile,BufRead */etc/sudoers,sudoers.tmp setf sudoers + +" SVG (Scalable Vector Graphics) +au BufNewFile,BufRead *.svg setf svg + +" If the file has an extension of 't' and is in a directory 't' or 'xt' then +" it is almost certainly a Perl test file. +" If the first line starts with '#' and contains 'perl' it's probably a Perl +" file. +" (Slow test) If a file contains a 'use' statement then it is almost certainly +" a Perl file. +func! s:FTperl() + let dirname = expand("%:p:h:t") + if expand("%:e") == 't' && (dirname == 't' || dirname == 'xt') + setf perl + return 1 + endif + if getline(1)[0] == '#' && getline(1) =~ 'perl' + setf perl + return 1 + endif + if search('^use\s\s*\k', 'nc', 30) + setf perl + return 1 + endif + return 0 +endfunc + +" Tads (or Nroff or Perl test file) +au BufNewFile,BufRead *.t + \ if !s:FTnroff() && !s:FTperl() | setf tads | endif + +" Tags +au BufNewFile,BufRead tags setf tags + +" TAK +au BufNewFile,BufRead *.tak setf tak + +" Task +au BufRead,BufNewFile {pending,completed,undo}.data setf taskdata +au BufRead,BufNewFile *.task setf taskedit + +" Tcl (JACL too) +au BufNewFile,BufRead *.tcl,*.tk,*.itcl,*.itk,*.jacl setf tcl + +" TealInfo +au BufNewFile,BufRead *.tli setf tli + +" Telix Salt +au BufNewFile,BufRead *.slt setf tsalt + +" Terminfo +au BufNewFile,BufRead *.ti setf terminfo + +" TeX +au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex +au BufNewFile,BufRead *.tex call s:FTtex() + +" Choose context, plaintex, or tex (LaTeX) based on these rules: +" 1. Check the first line of the file for "%&". +" 2. Check the first 1000 non-comment lines for LaTeX or ConTeXt keywords. +" 3. Default to "latex" or to g:tex_flavor, can be set in user's vimrc. +func! s:FTtex() + let firstline = getline(1) + if firstline =~ '^%&\s*\a\+' + let format = tolower(matchstr(firstline, '\a\+')) + let format = substitute(format, 'pdf', '', '') + if format == 'tex' + let format = 'plain' + endif + else + " Default value, may be changed later: + let format = exists("g:tex_flavor") ? g:tex_flavor : 'plain' + " Save position, go to the top of the file, find first non-comment line. + let save_cursor = getpos('.') + call cursor(1,1) + let firstNC = search('^\s*[^[:space:]%]', 'c', 1000) + if firstNC " Check the next thousand lines for a LaTeX or ConTeXt keyword. + let lpat = 'documentclass\>\|usepackage\>\|begin{\|newcommand\>\|renewcommand\>' + let cpat = 'start\a\+\|setup\a\+\|usemodule\|enablemode\|enableregime\|setvariables\|useencoding\|usesymbols\|stelle\a\+\|verwende\a\+\|stel\a\+\|gebruik\a\+\|usa\a\+\|imposta\a\+\|regle\a\+\|utilisemodule\>' + let kwline = search('^\s*\\\%(' . lpat . '\)\|^\s*\\\(' . cpat . '\)', + \ 'cnp', firstNC + 1000) + if kwline == 1 " lpat matched + let format = 'latex' + elseif kwline == 2 " cpat matched + let format = 'context' + endif " If neither matched, keep default set above. + " let lline = search('^\s*\\\%(' . lpat . '\)', 'cn', firstNC + 1000) + " let cline = search('^\s*\\\%(' . cpat . '\)', 'cn', firstNC + 1000) + " if cline > 0 + " let format = 'context' + " endif + " if lline > 0 && (cline == 0 || cline > lline) + " let format = 'tex' + " endif + endif " firstNC + call setpos('.', save_cursor) + endif " firstline =~ '^%&\s*\a\+' + + " Translation from formats to file types. TODO: add AMSTeX, RevTex, others? + if format == 'plain' + setf plaintex + elseif format == 'context' + setf context + else " probably LaTeX + setf tex + endif + return +endfunc + +" ConTeXt +au BufNewFile,BufRead tex/context/*/*.tex,*.mkii,*.mkiv setf context + +" Texinfo +au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo + +" TeX configuration +au BufNewFile,BufRead texmf.cnf setf texmf + +" Tidy config +au BufNewFile,BufRead .tidyrc,tidyrc setf tidy + +" TF mud client +au BufNewFile,BufRead *.tf,.tfrc,tfrc setf tf + +" TPP - Text Presentation Program +au BufNewFile,BufReadPost *.tpp setf tpp + +" Treetop +au BufRead,BufNewFile *.treetop setf treetop + +" Trustees +au BufNewFile,BufRead trustees.conf setf trustees + +" TSS - Geometry +au BufNewFile,BufReadPost *.tssgm setf tssgm + +" TSS - Optics +au BufNewFile,BufReadPost *.tssop setf tssop + +" TSS - Command Line (temporary) +au BufNewFile,BufReadPost *.tsscl setf tsscl + +" TWIG files +au BufNewFile,BufReadPost *.twig setf twig + +" Motif UIT/UIL files +au BufNewFile,BufRead *.uit,*.uil setf uil + +" Udev conf +au BufNewFile,BufRead */etc/udev/udev.conf setf udevconf + +" Udev permissions +au BufNewFile,BufRead */etc/udev/permissions.d/*.permissions setf udevperm +" +" Udev symlinks config +au BufNewFile,BufRead */etc/udev/cdsymlinks.conf setf sh + +" UnrealScript +au BufNewFile,BufRead *.uc setf uc + +" Updatedb +au BufNewFile,BufRead */etc/updatedb.conf setf updatedb + +" Upstart (init(8)) config files +au BufNewFile,BufRead */usr/share/upstart/*.conf setf upstart +au BufNewFile,BufRead */usr/share/upstart/*.override setf upstart +au BufNewFile,BufRead */etc/init/*.conf,*/etc/init/*.override setf upstart +au BufNewFile,BufRead */.init/*.conf,*/.init/*.override setf upstart +au BufNewFile,BufRead */.config/upstart/*.conf setf upstart +au BufNewFile,BufRead */.config/upstart/*.override setf upstart + +" Vera +au BufNewFile,BufRead *.vr,*.vri,*.vrh setf vera + +" Verilog HDL +au BufNewFile,BufRead *.v setf verilog + +" Verilog-AMS HDL +au BufNewFile,BufRead *.va,*.vams setf verilogams + +" SystemVerilog +au BufNewFile,BufRead *.sv,*.svh setf systemverilog + +" VHDL +au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst setf vhdl +au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl') + +" Vim script +au BufNewFile,BufRead *.vim,*.vba,.exrc,_exrc setf vim + +" Viminfo file +au BufNewFile,BufRead .viminfo,_viminfo setf viminfo + +" Virata Config Script File or Drupal module +au BufRead,BufNewFile *.hw,*.module,*.pkg + \ if getline(1) =~ '' | + \ let b:xf86conf_xfree86_version = 3 | + \ endif | + \ setf xf86conf +au BufNewFile,BufRead */xorg.conf.d/*.conf + \ let b:xf86conf_xfree86_version = 4 | + \ setf xf86conf + +" Xorg config +au BufNewFile,BufRead xorg.conf,xorg.conf-4 let b:xf86conf_xfree86_version = 4 | setf xf86conf + +" Xinetd conf +au BufNewFile,BufRead */etc/xinetd.conf setf xinetd + +" XS Perl extension interface language +au BufNewFile,BufRead *.xs setf xs + +" X resources file +au BufNewFile,BufRead .Xdefaults,.Xpdefaults,.Xresources,xdm-config,*.ad setf xdefaults + +" Xmath +au BufNewFile,BufRead *.msc,*.msf setf xmath +au BufNewFile,BufRead *.ms + \ if !s:FTnroff() | setf xmath | endif + +" XML specific variants: docbk and xbl +au BufNewFile,BufRead *.xml call s:FTxml() + +func! s:FTxml() + let n = 1 + while n < 100 && n < line("$") + let line = getline(n) + " DocBook 4 or DocBook 5. + let is_docbook4 = line =~ '\)' && getline(n) !~ '^\s*#\s*include' + setf racc + return + endif + let n = n + 1 + endwhile + setf yacc +endfunc + + +" Yaml +au BufNewFile,BufRead *.yaml,*.yml setf yaml + +" yum conf (close enough to dosini) +au BufNewFile,BufRead */etc/yum.conf setf dosini + +" Zimbu +au BufNewFile,BufRead *.zu setf zimbu + +" Zope +" dtml (zope dynamic template markup language), pt (zope page template), +" cpt (zope form controller page template) +au BufNewFile,BufRead *.dtml,*.pt,*.cpt call s:FThtml() +" zsql (zope sql method) +au BufNewFile,BufRead *.zsql call s:SQL() + +" Z80 assembler asz80 +au BufNewFile,BufRead *.z8a setf z8a + +augroup END + + +" Source the user-specified filetype file, for backwards compatibility with +" Vim 5.x. +if exists("myfiletypefile") && filereadable(expand(myfiletypefile)) + execute "source " . myfiletypefile +endif + + +" Check for "*" after loading myfiletypefile, so that scripts.vim is only used +" when there are no matching file name extensions. +" Don't do this for compressed files. +augroup filetypedetect +au BufNewFile,BufRead * + \ if !did_filetype() && expand("") !~ g:ft_ignore_pat + \ | runtime! scripts.vim | endif +au StdinReadPost * if !did_filetype() | runtime! scripts.vim | endif + + +" Extra checks for when no filetype has been detected now. Mostly used for +" patterns that end in "*". E.g., "zsh*" matches "zsh.vim", but that's a Vim +" script file. +" Most of these should call s:StarSetf() to avoid names ending in .gz and the +" like are used. + +" More Apache config files +au BufNewFile,BufRead access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf* call s:StarSetf('apache') +au BufNewFile,BufRead */etc/apache2/*.conf*,*/etc/apache2/conf.*/*,*/etc/apache2/mods-*/*,*/etc/apache2/sites-*/*,*/etc/httpd/conf.d/*.conf* call s:StarSetf('apache') + +" Asterisk config file +au BufNewFile,BufRead *asterisk/*.conf* call s:StarSetf('asterisk') +au BufNewFile,BufRead *asterisk*/*voicemail.conf* call s:StarSetf('asteriskvm') + +" Bazaar version control +au BufNewFile,BufRead bzr_log.* setf bzr + +" BIND zone +au BufNewFile,BufRead */named/db.*,*/bind/db.* call s:StarSetf('bindzone') + +" Calendar +au BufNewFile,BufRead */.calendar/*, + \*/share/calendar/*/calendar.*,*/share/calendar/calendar.* + \ call s:StarSetf('calendar') + +" Changelog +au BufNewFile,BufRead [cC]hange[lL]og* + \ if getline(1) =~ '; urgency=' + \| call s:StarSetf('debchangelog') + \|else + \| call s:StarSetf('changelog') + \|endif + +" Crontab +au BufNewFile,BufRead crontab,crontab.*,*/etc/cron.d/* call s:StarSetf('crontab') + +" dnsmasq(8) configuration +au BufNewFile,BufRead */etc/dnsmasq.d/* call s:StarSetf('dnsmasq') + +" Dracula +au BufNewFile,BufRead drac.* call s:StarSetf('dracula') + +" Fvwm +au BufNewFile,BufRead */.fvwm/* call s:StarSetf('fvwm') +au BufNewFile,BufRead *fvwmrc*,*fvwm95*.hook + \ let b:fvwm_version = 1 | call s:StarSetf('fvwm') +au BufNewFile,BufRead *fvwm2rc* + \ if expand(":e") == "m4" + \| call s:StarSetf('fvwm2m4') + \|else + \| let b:fvwm_version = 2 | call s:StarSetf('fvwm') + \|endif + +" Gedcom +au BufNewFile,BufRead */tmp/lltmp* call s:StarSetf('gedcom') + +" GTK RC +au BufNewFile,BufRead .gtkrc*,gtkrc* call s:StarSetf('gtkrc') + +" Jam +au BufNewFile,BufRead Prl*.*,JAM*.* call s:StarSetf('jam') + +" Jargon +au! BufNewFile,BufRead *jarg* + \ if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'THIS IS THE JARGON FILE' + \| call s:StarSetf('jargon') + \|endif + +" Kconfig +au BufNewFile,BufRead Kconfig.* call s:StarSetf('kconfig') + +" Lilo: Linux loader +au BufNewFile,BufRead lilo.conf* call s:StarSetf('lilo') + +" Logcheck +au BufNewFile,BufRead */etc/logcheck/*.d*/* call s:StarSetf('logcheck') + +" Makefile +au BufNewFile,BufRead [mM]akefile* call s:StarSetf('make') + +" Ruby Makefile +au BufNewFile,BufRead [rR]akefile* call s:StarSetf('ruby') + +" Mail (also matches muttrc.vim, so this is below the other checks) +au BufNewFile,BufRead mutt[[:alnum:]._-]\\\{6\} setf mail + +" Modconf +au BufNewFile,BufRead */etc/modutils/* + \ if executable(expand("")) != 1 + \| call s:StarSetf('modconf') + \|endif +au BufNewFile,BufRead */etc/modprobe.* call s:StarSetf('modconf') + +" Mutt setup file +au BufNewFile,BufRead .mutt{ng,}rc*,*/.mutt{ng,}/mutt{ng,}rc* call s:StarSetf('muttrc') +au BufNewFile,BufRead mutt{ng,}rc*,Mutt{ng,}rc* call s:StarSetf('muttrc') + +" Nroff macros +au BufNewFile,BufRead tmac.* call s:StarSetf('nroff') + +" Pam conf +au BufNewFile,BufRead */etc/pam.d/* call s:StarSetf('pamconf') + +" Printcap and Termcap +au BufNewFile,BufRead *printcap* + \ if !did_filetype() + \| let b:ptcap_type = "print" | call s:StarSetf('ptcap') + \|endif +au BufNewFile,BufRead *termcap* + \ if !did_filetype() + \| let b:ptcap_type = "term" | call s:StarSetf('ptcap') + \|endif + +" ReDIF +" Only used when the .rdf file was not detected to be XML. +au BufRead,BufNewFile *.rdf call s:Redif() +func! s:Redif() + let lnum = 1 + while lnum <= 5 && lnum < line('$') + if getline(lnum) =~ "^\ctemplate-type:" + setf redif + return + endif + let lnum = lnum + 1 + endwhile +endfunc + +" Remind +au BufNewFile,BufRead .reminders* call s:StarSetf('remind') + +" Vim script +au BufNewFile,BufRead *vimrc* call s:StarSetf('vim') + +" Subversion commit file +au BufNewFile,BufRead svn-commit*.tmp setf svn + +" X resources file +au BufNewFile,BufRead Xresources*,*/app-defaults/*,*/Xresources/* call s:StarSetf('xdefaults') + +" XFree86 config +au BufNewFile,BufRead XF86Config-4* + \ let b:xf86conf_xfree86_version = 4 | call s:StarSetf('xf86conf') +au BufNewFile,BufRead XF86Config* + \ if getline(1) =~ '\' + \| let b:xf86conf_xfree86_version = 3 + \|endif + \|call s:StarSetf('xf86conf') + +" X11 xmodmap +au BufNewFile,BufRead *xmodmap* call s:StarSetf('xmodmap') + +" Xinetd conf +au BufNewFile,BufRead */etc/xinetd.d/* call s:StarSetf('xinetd') + +" yum conf (close enough to dosini) +au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini') + +" Z-Shell script +au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh') + + +" Plain text files, needs to be far down to not override others. This avoids +" the "conf" type being used if there is a line starting with '#'. +au BufNewFile,BufRead *.txt,*.text,README setf text + + +" Use the filetype detect plugins. They may overrule any of the previously +" detected filetypes. +runtime! ftdetect/*.vim + +" NOTE: The above command could have ended the filetypedetect autocmd group +" and started another one. Let's make sure it has ended to get to a consistent +" state. +augroup END + +" Generic configuration file (check this last, it's just guessing!) +au filetypedetect BufNewFile,BufRead,StdinReadPost * + \ if !did_filetype() && expand("") !~ g:ft_ignore_pat + \ && (getline(1) =~ '^#' || getline(2) =~ '^#' || getline(3) =~ '^#' + \ || getline(4) =~ '^#' || getline(5) =~ '^#') | + \ setf conf | + \ endif + + +" If the GUI is already running, may still need to install the Syntax 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 :p:h/menu.vim +endif + +" Function called for testing all functions defined here. These are +" script-local, thus need to be executed here. +" Returns a string with error messages (hopefully empty). +func! TestFiletypeFuncs(testlist) + let output = '' + for f in a:testlist + try + exe f + catch + let output = output . "\n" . f . ": " . v:exception + endtry + endfor + return output +endfunc + +" Restore 'cpoptions' +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftoff.vim b/runtime/ftoff.vim new file mode 100644 index 0000000000..377c6ef829 --- /dev/null +++ b/runtime/ftoff.vim @@ -0,0 +1,11 @@ +" Vim support file to switch off detection of file types +" +" Maintainer: Bram Moolenaar +" Last change: 2001 Jun 11 + +if exists("did_load_filetypes") + unlet did_load_filetypes +endif + +" Remove all autocommands in the filetypedetect group +silent! au! filetypedetect * diff --git a/runtime/ftplugin.vim b/runtime/ftplugin.vim new file mode 100644 index 0000000000..a434b9372b --- /dev/null +++ b/runtime/ftplugin.vim @@ -0,0 +1,35 @@ +" Vim support file to switch on loading plugins for file types +" +" Maintainer: Bram Moolenaar +" Last change: 2006 Apr 30 + +if exists("did_load_ftplugin") + finish +endif +let did_load_ftplugin = 1 + +augroup filetypeplugin + au FileType * call s:LoadFTPlugin() + + func! s:LoadFTPlugin() + if exists("b:undo_ftplugin") + exe b:undo_ftplugin + unlet! b:undo_ftplugin b:did_ftplugin + endif + + let s = expand("") + if s != "" + if &cpo =~# "S" && exists("b:did_ftplugin") + " In compatible mode options are reset to the global values, need to + " set the local values also when a plugin was already used. + unlet b:did_ftplugin + endif + + " When there is a dot it is used to separate filetype names. Thus for + " "aaa.bbb" load "aaa" and then "bbb". + for name in split(s, '\.') + exe 'runtime! ftplugin/' . name . '.vim ftplugin/' . name . '_*.vim ftplugin/' . name . '/*.vim' + endfor + endif + endfunc +augroup END diff --git a/runtime/ftplugin/README.txt b/runtime/ftplugin/README.txt new file mode 100644 index 0000000000..19ad58bdd3 --- /dev/null +++ b/runtime/ftplugin/README.txt @@ -0,0 +1,24 @@ +The ftplugin directory is for Vim plugin scripts that are only used for a +specific filetype. + +All files ending in .vim in this directory and subdirectories will be sourced +by Vim when it detects the filetype that matches the name of the file or +subdirectory. +For example, these are all loaded for the "c" filetype: + + c.vim + c_extra.vim + c/settings.vim + +Note that the "_" in "c_extra.vim" is required to separate the filetype name +from the following arbitrary name. + +The filetype plugins are only loaded when the ":filetype plugin" command has +been used. + +The default filetype plugin files contain settings that 95% of the users will +want to use. They do not contain personal preferences, like the value of +'shiftwidth'. + +If you want to do additional settings, or overrule the default filetype +plugin, you can create your own plugin file. See ":help ftplugin" in Vim. diff --git a/runtime/ftplugin/a2ps.vim b/runtime/ftplugin/a2ps.vim new file mode 100644 index 0000000000..6653351949 --- /dev/null +++ b/runtime/ftplugin/a2ps.vim @@ -0,0 +1,20 @@ +" Vim filetype plugin file +" Language: a2ps(1) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< inc< fo<" + +setlocal comments=:# commentstring=#\ %s include=^\\s*Include: +setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/aap.vim b/runtime/ftplugin/aap.vim new file mode 100644 index 0000000000..9b20ec4766 --- /dev/null +++ b/runtime/ftplugin/aap.vim @@ -0,0 +1,25 @@ +" Vim filetype plugin file +" Language: Aap recipe +" Maintainer: Bram Moolenaar +" Last Change: 2013 Apr 05 + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +" Reset 'formatoptions', 'comments' and 'expandtab' to undo this plugin. +let b:undo_ftplugin = "setl fo< com< et<" + +" Set 'formatoptions' to break comment lines but not other lines, +" and insert the comment leader when hitting or using "o". +setlocal fo-=t fo+=croql + +" Set 'comments' to format dashed lists in comments. +setlocal comments=s:#\ -,m:#\ \ ,e:#,n:#,fb:- + +" Expand tabs to spaces to avoid trouble. +setlocal expandtab diff --git a/runtime/ftplugin/abap.vim b/runtime/ftplugin/abap.vim new file mode 100644 index 0000000000..956b002ecd --- /dev/null +++ b/runtime/ftplugin/abap.vim @@ -0,0 +1,29 @@ +" Vim filetype plugin file +" Language: ABAP +" Author: Steven Oliver +" Copyright: Copyright (c) 2013 Steven Oliver +" License: You may redistribute this under the same terms as Vim itself +" -------------------------------------------------------------------------- + +" Only do this when not done yet for this buffer +if (exists("b:did_ftplugin")) + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +setlocal softtabstop=2 shiftwidth=2 +setlocal suffixesadd=.abap + +" Windows allows you to filter the open file dialog +if has("gui_win32") && !exists("b:browsefilter") + let b:browsefilter = "ABAP Source Files (*.abap)\t*.abap\n" . + \ "All Files (*.*)\t*.*\n" +endif + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: set sw=4 sts=4 et tw=80 : diff --git a/runtime/ftplugin/abaqus.vim b/runtime/ftplugin/abaqus.vim new file mode 100644 index 0000000000..b263d0c318 --- /dev/null +++ b/runtime/ftplugin/abaqus.vim @@ -0,0 +1,97 @@ +" Vim filetype plugin file +" Language: Abaqus finite element input file (www.abaqus.com) +" Maintainer: Carl Osterwisch +" Last Change: 2012 Apr 30 + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") | finish | endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +" Save the compatibility options and temporarily switch to vim defaults +let s:cpo_save = &cpoptions +set cpoptions&vim + +" Set the format of the include file specification for Abaqus +" Used in :check gf ^wf [i and other commands +setlocal include=\\<\\cINPUT\\s*= + +" Remove characters up to the first = when evaluating filenames +setlocal includeexpr=substitute(v:fname,'.\\{-}=','','') + +" Remove comma from valid filename characters since it is used to +" separate keyword parameters +setlocal isfname-=, + +" Define format of comment lines (see 'formatoptions' for uses) +setlocal comments=:** +setlocal commentstring=**%s + +" Definitions start with a * and assign a NAME, NSET, or ELSET +" Used in [d ^wd and other commands +setlocal define=^\\*\\a.*\\c\\(NAME\\\|NSET\\\|ELSET\\)\\s*= + +" Abaqus keywords and identifiers may include a - character +setlocal iskeyword+=- + +let b:undo_ftplugin = "setlocal include< includeexpr< isfname<" + \ . " comments< commentstring< define< iskeyword<" + +if has("folding") + " Fold all lines that do not begin with * + setlocal foldexpr=getline(v:lnum)[0]!=\"\*\" + setlocal foldmethod=expr + let b:undo_ftplugin .= " foldexpr< foldmethod<" +endif + +" Set the file browse filter (currently only supported under Win32 gui) +if has("gui_win32") && !exists("b:browsefilter") + let b:browsefilter = "Abaqus Input Files (*.inp *.inc)\t*.inp;*.inc\n" . + \ "Abaqus Results (*.dat)\t*.dat\n" . + \ "Abaqus Messages (*.pre *.msg *.sta)\t*.pre;*.msg;*.sta\n" . + \ "All Files (*.*)\t*.*\n" + let b:undo_ftplugin .= "|unlet! b:browsefilter" +endif + +" Define patterns for the matchit plugin +if exists("loaded_matchit") && !exists("b:match_words") + let b:match_ignorecase = 1 + let b:match_words = + \ '\*part:\*end\s*part,' . + \ '\*assembly:\*end\s*assembly,' . + \ '\*instance:\*end\s*instance,' . + \ '\*step:\*end\s*step' + let b:undo_ftplugin .= "|unlet! b:match_ignorecase b:match_words" +endif + +" Define keys used to move [count] keywords backward or forward. +noremap [[ ?^\*\a:nohlsearch +noremap ]] /^\*\a:nohlsearch + +" Define key to toggle commenting of the current line or range +noremap + \ :call Abaqus_ToggleComment()j +function! Abaqus_ToggleComment() range + if strpart(getline(a:firstline), 0, 2) == "**" + " Un-comment all lines in range + silent execute a:firstline . ',' . a:lastline . 's/^\*\*//' + else + " Comment all lines in range + silent execute a:firstline . ',' . a:lastline . 's/^/**/' + endif +endfunction + +let b:undo_ftplugin .= "|unmap [[|unmap ]]" + \ . "|unmap " + +" Undo must be done in nocompatible mode for . +let b:undo_ftplugin = "let s:cpo_save = &cpoptions|" + \ . "set cpoptions&vim|" + \ . b:undo_ftplugin + \ . "|let &cpoptions = s:cpo_save" + \ . "|unlet s:cpo_save" + +" Restore saved compatibility options +let &cpoptions = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/ada.vim b/runtime/ftplugin/ada.vim new file mode 100644 index 0000000000..0809e7b206 --- /dev/null +++ b/runtime/ftplugin/ada.vim @@ -0,0 +1,210 @@ +"------------------------------------------------------------------------------ +" 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 +" $Author: krischik $ +" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ +" Version: 4.6 with patch from David Bürgin +" $Revision: 887 $ +" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/ftplugin/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 default compiler problems. +" Help Page: ft-ada-plugin +"------------------------------------------------------------------------------ +" Provides mapping overrides for tag jumping that figure out the current +" Ada object and tag jump to that, not the 'simple' vim word. +" Similarly allows matching of full-length ada entities from tags. +"------------------------------------------------------------------------------ + +" Only do this when not done yet for this buffer +if exists ("b:did_ftplugin") || version < 700 + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 45 + +" +" Temporarily set cpoptions to ensure the script loads OK +" +let s:cpoptions = &cpoptions +set cpoptions-=C + +" Section: Comments {{{1 +" +setlocal comments=O:--,:--\ \ +setlocal commentstring=--\ \ %s +setlocal complete=.,w,b,u,t,i + +" Section: case {{{1 +" +setlocal nosmartcase +setlocal ignorecase + +" Section: formatoptions {{{1 +" +setlocal formatoptions+=ron + +" Section: Tagging {{{1 +" +if exists ("g:ada_extended_tagging") + " Make local tag mappings for this buffer (if not already set) + if g:ada_extended_tagging == 'jump' + if mapcheck('','n') == '' + nnoremap :call ada#Jump_Tag ('', 'tjump') + endif + if mapcheck('g','n') == '' + nnoremap g :call ada#Jump_Tag ('','stjump') + endif + elseif g:ada_extended_tagging == 'list' + if mapcheck('','n') == '' + nnoremap :call ada#List_Tag () + endif + if mapcheck('g','n') == '' + nnoremap g :call ada#List_Tag () + endif + endif +endif + +" Section: Completion {{{1 +" +setlocal completefunc=ada#User_Complete +setlocal omnifunc=adacomplete#Complete + +if exists ("g:ada_extended_completion") + if mapcheck ('','i') == '' + inoremap =ada#Completion("\C-N>") + endif + if mapcheck ('','i') == '' + inoremap =ada#Completion("\C-P>") + endif + if mapcheck ('','i') == '' + inoremap =ada#Completion("\C-X>\C-]>") + endif + if mapcheck ('','i') == '' + inoremap =ada#Insert_Backspace () + endif +endif + +" Section: Matchit {{{1 +" +" Only do this when not done yet for this buffer & matchit is used +" +if !exists ("b:match_words") && + \ exists ("loaded_matchit") + " + " The following lines enable the macros/matchit.vim plugin for + " Ada-specific extended matching with the % key. + " + let s:notend = '\%(\:\:\:\\s\+\,' . + \ s:notend . '\:\:\\s\+\,' . + \ '\%(\.*\|\.*\|'.s:notend.'\)\:\\s\+\,' . + \ '\%(\\|\\):\:\\s*\%($\|[;A-Z]\),' . + \ s:notend . '\:\\s\+\' +endif + + +" Section: Compiler {{{1 +" +if ! exists("g:ada_default_compiler") + if has("vms") + let g:ada_default_compiler = 'decada' + else + let g:ada_default_compiler = 'gnat' + endif +endif + +if ! exists("current_compiler") || + \ current_compiler != g:ada_default_compiler + execute "compiler " . g:ada_default_compiler +endif + +" Section: Folding {{{1 +" +if exists("g:ada_folding") + if g:ada_folding[0] == 'i' + setlocal foldmethod=indent + setlocal foldignore=-- + setlocal foldnestmax=5 + elseif g:ada_folding[0] == 'g' + setlocal foldmethod=expr + setlocal foldexpr=ada#Pretty_Print_Folding(v:lnum) + elseif g:ada_folding[0] == 's' + setlocal foldmethod=syntax + endif + setlocal tabstop=8 + setlocal softtabstop=3 + setlocal shiftwidth=3 +endif + +" Section: Abbrev {{{1 +" +if exists("g:ada_abbrev") + iabbrev ret return + iabbrev proc procedure + iabbrev pack package + iabbrev func function +endif + +" Section: Commands, Mapping, Menus {{{1 +" +call ada#Map_Popup ( + \ 'Tag.List', + \ 'l', + \ 'call ada#List_Tag ()') +call ada#Map_Popup ( + \'Tag.Jump', + \'j', + \'call ada#Jump_Tag ()') +call ada#Map_Menu ( + \'Tag.Create File', + \':AdaTagFile', + \'call ada#Create_Tags (''file'')') +call ada#Map_Menu ( + \'Tag.Create Dir', + \':AdaTagDir', + \'call ada#Create_Tags (''dir'')') + +call ada#Map_Menu ( + \'Highlight.Toggle Space Errors', + \ ':AdaSpaces', + \'call ada#Switch_Syntax_Option (''space_errors'')') +call ada#Map_Menu ( + \'Highlight.Toggle Lines Errors', + \ ':AdaLines', + \'call ada#Switch_Syntax_Option (''line_errors'')') +call ada#Map_Menu ( + \'Highlight.Toggle Rainbow Color', + \ ':AdaRainbow', + \'call ada#Switch_Syntax_Option (''rainbow_color'')') +call ada#Map_Menu ( + \'Highlight.Toggle Standard Types', + \ ':AdaTypes', + \'call ada#Switch_Syntax_Option (''standard_types'')') + +" 1}}} +" Reset cpoptions +let &cpoptions = s:cpoptions +unlet s:cpoptions + +finish " 1}}} + +"------------------------------------------------------------------------------ +" Copyright (C) 2006 Martin Krischik +" +" Vim is Charityware - see ":help license" or uganda.txt for licence details. +"------------------------------------------------------------------------------ +" vim: textwidth=78 nowrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab +" vim: foldmethod=marker diff --git a/runtime/ftplugin/alsaconf.vim b/runtime/ftplugin/alsaconf.vim new file mode 100644 index 0000000000..5d763c8011 --- /dev/null +++ b/runtime/ftplugin/alsaconf.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin file +" Language: alsaconf(8) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/ant.vim b/runtime/ftplugin/ant.vim new file mode 100644 index 0000000000..5905858896 --- /dev/null +++ b/runtime/ftplugin/ant.vim @@ -0,0 +1,44 @@ +" Vim filetype plugin file +" Language: ant +" Maintainer: Dan Sharp +" Last Changed: 20 Jan 2009 +" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin + +if exists("b:did_ftplugin") | finish | endif + +" Make sure the continuation lines below do not cause problems in +" compatibility mode. +let s:save_cpo = &cpo +set cpo-=C + +" Define some defaults in case the included ftplugins don't set them. +let s:undo_ftplugin = "" +let s:browsefilter = "XML Files (*.xml)\t*.xml\n" . + \ "All Files (*.*)\t*.*\n" + +runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim +let b:did_ftplugin = 1 + +" Override our defaults if these were set by an included ftplugin. +if exists("b:undo_ftplugin") + let s:undo_ftplugin = b:undo_ftplugin +endif +if exists("b:browsefilter") + let s:browsefilter = b:browsefilter +endif + +" Change the :browse e filter to primarily show Ant-related files. +if has("gui_win32") + let b:browsefilter = "Build Files (build.xml)\tbuild.xml\n" . + \ "Java Files (*.java)\t*.java\n" . + \ "Properties Files (*.prop*)\t*.prop*\n" . + \ "Manifest Files (*.mf)\t*.mf\n" . + \ s:browsefilter +endif + +" Undo the stuff we changed. +let b:undo_ftplugin = "unlet! b:browsefilter | " . s:undo_ftplugin + +" Restore the saved compatibility options. +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/runtime/ftplugin/arch.vim b/runtime/ftplugin/arch.vim new file mode 100644 index 0000000000..71d831e112 --- /dev/null +++ b/runtime/ftplugin/arch.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin file +" Language: GNU Arch inventory file +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/art.vim b/runtime/ftplugin/art.vim new file mode 100644 index 0000000000..c501a992d8 --- /dev/null +++ b/runtime/ftplugin/art.vim @@ -0,0 +1,15 @@ +" Vim filetype plugin +" Language: ART-IM and ART*Enterprise +" Maintainer: Dorai Sitaram +" URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html +" Last Change: Apr 2, 2003 + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +run ftplugin/lisp.vim + +setl lw-=if +setl lw+=def-art-fun,deffacts,defglobal,defrule,defschema,for,schema,while diff --git a/runtime/ftplugin/aspvbs.vim b/runtime/ftplugin/aspvbs.vim new file mode 100644 index 0000000000..660dab4685 --- /dev/null +++ b/runtime/ftplugin/aspvbs.vim @@ -0,0 +1,60 @@ +" Vim filetype plugin file +" Language: aspvbs +" Maintainer: Dan Sharp +" Last Changed: 20 Jan 2009 +" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin + +if exists("b:did_ftplugin") | finish | endif + +" Make sure the continuation lines below do not cause problems in +" compatibility mode. +let s:save_cpo = &cpo +set cpo-=C + +" Define some defaults in case the included ftplugins don't set them. +let s:undo_ftplugin = "" +let s:browsefilter = "HTML Files (*.html, *.htm)\t*.htm*\n" . + \ "All Files (*.*)\t*.*\n" +let s:match_words = "" + +runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim +let b:did_ftplugin = 1 + +" Override our defaults if these were set by an included ftplugin. +if exists("b:undo_ftplugin") + let s:undo_ftplugin = b:undo_ftplugin +endif +if exists("b:browsefilter") + let s:browsefilter = b:browsefilter +endif +if exists("b:match_words") + let s:match_words = b:match_words +endif + +" ASP: Active Server Pages (with Visual Basic Script) +" thanks to Gontran BAERTS +if exists("loaded_matchit") + let s:notend = '\%(\\%(.\{-}then\s\+\w\)\@!:\:^\s*\:\,' . + \ s:notend . '\:\:\:\,' . + \ '^\s*\:\,' . + \ '^\s*\:\,' . + \ '\:\,' . + \ '^\s*\:\,' . + \ '^\s*\:\,' . + \ '\:\,' . + \ s:match_words +endif + +" Change the :browse e filter to primarily show ASP-related files. +if has("gui_win32") + let b:browsefilter="ASP Files (*.asp)\t*.asp\n" . s:browsefilter +endif + +let b:undo_ftplugin = "unlet! b:match_words b:match_ignorecase b:browsefilter | " . s:undo_ftplugin + +" Restore the saved compatibility options. +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/runtime/ftplugin/automake.vim b/runtime/ftplugin/automake.vim new file mode 100644 index 0000000000..20b06af362 --- /dev/null +++ b/runtime/ftplugin/automake.vim @@ -0,0 +1,16 @@ +" Vim filetype plugin file +" Language: Automake +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +runtime! ftplugin/make.vim ftplugin/make_*.vim ftplugin/make/*.vim + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/bdf.vim b/runtime/ftplugin/bdf.vim new file mode 100644 index 0000000000..120c5df968 --- /dev/null +++ b/runtime/ftplugin/bdf.vim @@ -0,0 +1,20 @@ +" Vim filetype plugin file +" Language: BDF font definition +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=b:COMMENT commentstring=COMMENT\ %s +setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/bst.vim b/runtime/ftplugin/bst.vim new file mode 100644 index 0000000000..5e65aac31c --- /dev/null +++ b/runtime/ftplugin/bst.vim @@ -0,0 +1,15 @@ +" Vim filetype plugin file +" Language: bst +" Author: Tim Pope +" $Id: bst.vim,v 1.1 2007/05/05 17:37:57 vimboss Exp $ + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +setlocal commentstring=%\ %s +setlocal comments=:% +setlocal fo-=t fo+=croql + +let b:undo_ftplugin = "setlocal com< cms< fo<" diff --git a/runtime/ftplugin/btm.vim b/runtime/ftplugin/btm.vim new file mode 100644 index 0000000000..d3dc5b75f5 --- /dev/null +++ b/runtime/ftplugin/btm.vim @@ -0,0 +1,12 @@ +" Vim filetype plugin file +" Language: BTM +" Maintainer: Bram Moolenaar +" Last Change: 2004 Jul 06 + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +" Behaves just like dosbatch +runtime! ftplugin/dosbatch.vim ftplugin/dosbatch_*.vim ftplugin/dosbatch/*.vim diff --git a/runtime/ftplugin/c.vim b/runtime/ftplugin/c.vim new file mode 100644 index 0000000000..19e8c51edb --- /dev/null +++ b/runtime/ftplugin/c.vim @@ -0,0 +1,64 @@ +" Vim filetype plugin file +" Language: C +" Maintainer: Bram Moolenaar +" Last Change: 2012 Jul 10 + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +" Using line continuation here. +let s:cpo_save = &cpo +set cpo-=C + +let b:undo_ftplugin = "setl fo< com< ofu< | if has('vms') | setl isk< | endif" + +" Set 'formatoptions' to break comment lines but not other lines, +" and insert the comment leader when hitting or using "o". +setlocal fo-=t fo+=croql + +" Set completion with CTRL-X CTRL-O to autoloaded function. +if exists('&ofu') + setlocal ofu=ccomplete#Complete +endif + +" Set 'comments' to format dashed lists in comments. +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// + +" In VMS C keywords contain '$' characters. +if has("vms") + setlocal iskeyword+=$ +endif + +" When the matchit plugin is loaded, this makes the % command skip parens and +" braces in comments. +let b:match_words = &matchpairs . ',^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>' +let b:match_skip = 's:comment\|string\|character' + +" Win32 can filter files in the browse dialog +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + if &ft == "cpp" + let b:browsefilter = "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" . + \ "C Header Files (*.h)\t*.h\n" . + \ "C Source Files (*.c)\t*.c\n" . + \ "All Files (*.*)\t*.*\n" + elseif &ft == "ch" + let b:browsefilter = "Ch Source Files (*.ch *.chf)\t*.ch;*.chf\n" . + \ "C Header Files (*.h)\t*.h\n" . + \ "C Source Files (*.c)\t*.c\n" . + \ "All Files (*.*)\t*.*\n" + else + let b:browsefilter = "C Source Files (*.c)\t*.c\n" . + \ "C Header Files (*.h)\t*.h\n" . + \ "Ch Source Files (*.ch *.chf)\t*.ch;*.chf\n" . + \ "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" . + \ "All Files (*.*)\t*.*\n" + endif +endif + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/calendar.vim b/runtime/ftplugin/calendar.vim new file mode 100644 index 0000000000..6f117e36e5 --- /dev/null +++ b/runtime/ftplugin/calendar.vim @@ -0,0 +1,20 @@ +" Vim filetype plugin file +" Language: calendar(1) input file +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< inc< fo<" + +setlocal comments=s1:/*,mb:*,ex:*/ commentstring& include& +setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/cdrdaoconf.vim b/runtime/ftplugin/cdrdaoconf.vim new file mode 100644 index 0000000000..557fd82c53 --- /dev/null +++ b/runtime/ftplugin/cdrdaoconf.vim @@ -0,0 +1,18 @@ +" Vim filetype plugin file +" Maintainer: Nikolai Weibull +" Latest Revision: 2007-12-04 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/ch.vim b/runtime/ftplugin/ch.vim new file mode 100644 index 0000000000..ed09003b1c --- /dev/null +++ b/runtime/ftplugin/ch.vim @@ -0,0 +1,17 @@ +" Vim filetype plugin file +" Language: Ch +" Maintainer: SoftIntegration, Inc. +" URL: http://www.softintegration.com/download/vim/ftplugin/ch.vim +" Last change: 2004 May 16 +" Created based on cpp.vim +" +" Ch is a C/C++ interpreter with many high level extensions +" + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +" Behaves just like C +runtime! ftplugin/c.vim ftplugin/c_*.vim ftplugin/c/*.vim diff --git a/runtime/ftplugin/changelog.vim b/runtime/ftplugin/changelog.vim new file mode 100644 index 0000000000..244245e271 --- /dev/null +++ b/runtime/ftplugin/changelog.vim @@ -0,0 +1,299 @@ +" Vim filetype plugin file +" Language: generic Changelog file +" Maintainer: Nikolai Weibull +" Latest Revision: 2014-01-10 +" Variables: +" g:changelog_timeformat (deprecated: use g:changelog_dateformat instead) - +" description: the timeformat used in ChangeLog entries. +" default: "%Y-%m-%d". +" g:changelog_dateformat - +" description: the format sent to strftime() to generate a date string. +" default: "%Y-%m-%d". +" g:changelog_username - +" description: the username to use in ChangeLog entries +" default: try to deduce it from environment variables and system files. +" Local Mappings: +" o - +" adds a new changelog entry for the current user for the current date. +" Global Mappings: +" o - +" switches to the ChangeLog buffer opened for the current directory, or +" opens it in a new buffer if it exists in the current directory. Then +" it does the same as the local o described above. +" Notes: +" run 'runtime ftplugin/changelog.vim' to enable the global mapping for +" changelog files. +" TODO: +" should we perhaps open the ChangeLog file even if it doesn't exist already? +" Problem is that you might end up with ChangeLog files all over the place. + +" If 'filetype' isn't "changelog", we must have been to add ChangeLog opener +if &filetype == 'changelog' + if exists('b:did_ftplugin') + finish + endif + let b:did_ftplugin = 1 + + let s:cpo_save = &cpo + set cpo&vim + + " Set up the format used for dates. + if !exists('g:changelog_dateformat') + if exists('g:changelog_timeformat') + let g:changelog_dateformat = g:changelog_timeformat + else + let g:changelog_dateformat = "%Y-%m-%d" + endif + endif + + function! s:username() + if exists('g:changelog_username') + return g:changelog_username + elseif $EMAIL != "" + return $EMAIL + elseif $EMAIL_ADDRESS != "" + return $EMAIL_ADDRESS + endif + + let login = s:login() + return printf('%s <%s@%s>', s:name(login), login, s:hostname()) + endfunction + + function! s:login() + return s:trimmed_system_with_default('whoami', 'unknown') + endfunction + + function! s:trimmed_system_with_default(command, default) + return s:first_line(s:system_with_default(a:command, a:default)) + endfunction + + function! s:system_with_default(command, default) + let output = system(a:command) + if v:shell_error + return default + endif + return output + endfunction + + function! s:first_line(string) + return substitute(a:string, '\n.*$', "", "") + endfunction + + function! s:name(login) + for name in [s:gecos_name(a:login), $NAME, s:capitalize(a:login)] + if name != "" + return name + endif + endfor + endfunction + + function! s:gecos_name(login) + for line in s:try_reading_file('/etc/passwd') + if line =~ '^' . a:login . ':' + return substitute(s:passwd_field(line, 5), '&', s:capitalize(a:login), "") + endif + endfor + return "" + endfunction + + function! s:try_reading_file(path) + try + return readfile(a:path) + catch + return [] + endtry + endfunction + + function! s:passwd_field(line, field) + let fields = split(a:line, ':', 1) + if len(fields) < a:field + return "" + endif + return fields[a:field - 1] + endfunction + + function! s:capitalize(word) + return toupper(a:word[0]) . strpart(a:word, 1) + endfunction + + function! s:hostname() + return s:trimmed_system_with_default('hostname', 'localhost') + endfunction + + " Format used for new date entries. + if !exists('g:changelog_new_date_format') + let g:changelog_new_date_format = "%d %u\n\n\t* %p%c\n\n" + endif + + " Format used for new entries to current date entry. + if !exists('g:changelog_new_entry_format') + let g:changelog_new_entry_format = "\t* %p%c" + endif + + " Regular expression used to find a given date entry. + if !exists('g:changelog_date_entry_search') + let g:changelog_date_entry_search = '^\s*%d\_s*%u' + endif + + " Regular expression used to find the end of a date entry + if !exists('g:changelog_date_end_entry_search') + let g:changelog_date_end_entry_search = '^\s*$' + endif + + + " Substitutes specific items in new date-entry formats and search strings. + " Can be done with substitute of course, but unclean, and need \@! then. + function! s:substitute_items(str, date, user, prefix) + let str = a:str + let middles = {'%': '%', 'd': a:date, 'u': a:user, 'p': a:prefix, 'c': '{cursor}'} + let i = stridx(str, '%') + while i != -1 + let inc = 0 + if has_key(middles, str[i + 1]) + let mid = middles[str[i + 1]] + let str = strpart(str, 0, i) . mid . strpart(str, i + 2) + let inc = strlen(mid) - 1 + endif + let i = stridx(str, '%', i + 1 + inc) + endwhile + return str + endfunction + + " Position the cursor once we've done all the funky substitution. + function! s:position_cursor() + if search('{cursor}') > 0 + let lnum = line('.') + let line = getline(lnum) + let cursor = stridx(line, '{cursor}') + call setline(lnum, substitute(line, '{cursor}', '', '')) + endif + startinsert! + endfunction + + " Internal function to create a new entry in the ChangeLog. + function! s:new_changelog_entry(prefix) + " Deal with 'paste' option. + let save_paste = &paste + let &paste = 1 + call cursor(1, 1) + " Look for an entry for today by our user. + let date = strftime(g:changelog_dateformat) + let search = s:substitute_items(g:changelog_date_entry_search, date, + \ s:username(), a:prefix) + if search(search) > 0 + " Ok, now we look for the end of the date entry, and add an entry. + call cursor(nextnonblank(line('.') + 1), 1) + if search(g:changelog_date_end_entry_search, 'W') > 0 + let p = (line('.') == line('$')) ? line('.') : line('.') - 1 + else + let p = line('.') + endif + let ls = split(s:substitute_items(g:changelog_new_entry_format, '', '', a:prefix), + \ '\n') + call append(p, ls) + call cursor(p + 1, 1) + else + " Flag for removing empty lines at end of new ChangeLogs. + let remove_empty = line('$') == 1 + + " No entry today, so create a date-user header and insert an entry. + let todays_entry = s:substitute_items(g:changelog_new_date_format, + \ date, s:username(), a:prefix) + " Make sure we have a cursor positioning. + if stridx(todays_entry, '{cursor}') == -1 + let todays_entry = todays_entry . '{cursor}' + endif + + " Now do the work. + call append(0, split(todays_entry, '\n')) + + " Remove empty lines at end of file. + if remove_empty + $-/^\s*$/-1,$delete + endif + + " Reposition cursor once we're done. + call cursor(1, 1) + endif + + call s:position_cursor() + + " And reset 'paste' option + let &paste = save_paste + endfunction + + if exists(":NewChangelogEntry") != 2 + noremap o :call new_changelog_entry('') + command! -nargs=0 NewChangelogEntry call s:new_changelog_entry('') + endif + + let b:undo_ftplugin = "setl com< fo< et< ai<" + + setlocal comments= + setlocal formatoptions+=t + setlocal noexpandtab + setlocal autoindent + + if &textwidth == 0 + setlocal textwidth=78 + let b:undo_ftplugin .= " tw<" + endif + + let &cpo = s:cpo_save + unlet s:cpo_save +else + let s:cpo_save = &cpo + set cpo&vim + + " Add the Changelog opening mapping + nnoremap o :call open_changelog() + + function! s:open_changelog() + let path = expand('%:p:h') + if exists('b:changelog_path') + let changelog = b:changelog_path + else + if exists('b:changelog_name') + let name = b:changelog_name + else + let name = 'ChangeLog' + endif + while isdirectory(path) + let changelog = path . '/' . name + if filereadable(changelog) + break + endif + let parent = substitute(path, '/\+[^/]*$', "", "") + if path == parent + break + endif + let path = parent + endwhile + endif + if !filereadable(changelog) + return + endif + + if exists('b:changelog_entry_prefix') + let prefix = call(b:changelog_entry_prefix, []) + else + let prefix = substitute(strpart(expand('%:p'), strlen(path)), '^/\+', "", "") + endif + + let buf = bufnr(changelog) + if buf != -1 + if bufwinnr(buf) != -1 + execute bufwinnr(buf) . 'wincmd w' + else + execute 'sbuffer' buf + endif + else + execute 'split' fnameescape(changelog) + endif + + call s:new_changelog_entry(prefix) + endfunction + + let &cpo = s:cpo_save + unlet s:cpo_save +endif diff --git a/runtime/ftplugin/clojure.vim b/runtime/ftplugin/clojure.vim new file mode 100644 index 0000000000..10fcb9f205 --- /dev/null +++ b/runtime/ftplugin/clojure.vim @@ -0,0 +1,95 @@ +" Vim filetype plugin file +" Language: Clojure +" Author: Meikel Brandmeyer +" +" Maintainer: Sung Pae +" URL: https://github.com/guns/vim-clojure-static +" License: Same as Vim +" Last Change: 27 March 2014 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = 'setlocal iskeyword< define< formatoptions< comments< commentstring< lispwords<' + +setlocal iskeyword+=?,-,*,!,+,/,=,<,>,.,:,$ + +" There will be false positives, but this is better than missing the whole set +" of user-defined def* definitions. +setlocal define=\\v[(/]def(ault)@!\\S* + +" Remove 't' from 'formatoptions' to avoid auto-wrapping code. +setlocal formatoptions-=t + +" Lisp comments are routinely nested (e.g. ;;; SECTION HEADING) +setlocal comments=n:; +setlocal commentstring=;\ %s + +" Specially indented symbols from clojure.core and clojure.test. +" +" Clojure symbols are indented in the defn style when they: +" +" * Define vars and anonymous functions +" * Create new lexical scopes or scopes with altered environments +" * Create conditional branches from a predicate function or value +" +" The arglists for these functions are generally in the form of [x & body]; +" Functions that accept a flat list of forms do not treat the first argument +" specially and hence are not indented specially. +" +" -*- LISPWORDS -*- +" Generated from https://github.com/guns/vim-clojure-static/blob/vim-release-010/clj/src/vim_clojure_static/generate.clj +setlocal lispwords=as->,binding,bound-fn,case,catch,cond->,cond->>,condp,def,definline,definterface,defmacro,defmethod,defmulti,defn,defn-,defonce,defprotocol,defrecord,defstruct,deftest,deftest-,deftype,doseq,dotimes,doto,extend,extend-protocol,extend-type,fn,for,if,if-let,if-not,if-some,let,letfn,locking,loop,ns,proxy,reify,set-test,testing,when,when-first,when-let,when-not,when-some,while,with-bindings,with-in-str,with-local-vars,with-open,with-precision,with-redefs,with-redefs-fn,with-test + +" Provide insert mode completions for special forms and clojure.core. As +" 'omnifunc' is set by popular Clojure REPL client plugins, we also set +" 'completefunc' so that the user has some form of completion available when +" 'omnifunc' is set and no REPL connection exists. +for s:setting in ['omnifunc', 'completefunc'] + if exists('&' . s:setting) && empty(eval('&' . s:setting)) + execute 'setlocal ' . s:setting . '=clojurecomplete#Complete' + let b:undo_ftplugin .= ' | setlocal ' . s:setting . '<' + endif +endfor + +" Take all directories of the CLOJURE_SOURCE_DIRS environment variable +" and add them to the path option. +" +" This is a legacy option for VimClojure users. +if exists('$CLOJURE_SOURCE_DIRS') + for s:dir in split($CLOJURE_SOURCE_DIRS, (has("win32") || has("win64")) ? ';' : ':') + let s:dir = fnameescape(s:dir) + " Whitespace escaping for Windows + let s:dir = substitute(s:dir, '\', '\\\\', 'g') + let s:dir = substitute(s:dir, '\ ', '\\ ', 'g') + execute "setlocal path+=" . s:dir . "/**" + endfor + let b:undo_ftplugin .= ' | setlocal path<' +endif + +" Skip brackets in ignored syntax regions when using the % command +if exists('loaded_matchit') + let b:match_words = &matchpairs + let b:match_skip = 's:comment\|string\|regex\|character' + let b:undo_ftplugin .= ' | unlet! b:match_words b:match_skip' +endif + +" Win32 can filter files in the browse dialog +if has("gui_win32") && !exists("b:browsefilter") + let b:browsefilter = "Clojure Source Files (*.clj)\t*.clj\n" . + \ "ClojureScript Source Files (*.cljs)\t*.cljs\n" . + \ "Java Source Files (*.java)\t*.java\n" . + \ "All Files (*.*)\t*.*\n" + let b:undo_ftplugin .= ' | unlet! b:browsefilter' +endif + +let &cpo = s:cpo_save + +unlet! s:cpo_save s:setting s:dir + +" vim:sts=8:sw=8:ts=8:noet diff --git a/runtime/ftplugin/cobol.vim b/runtime/ftplugin/cobol.vim new file mode 100644 index 0000000000..11ad3ad727 --- /dev/null +++ b/runtime/ftplugin/cobol.vim @@ -0,0 +1,267 @@ +" Vim filetype plugin file +" Language: cobol +" Author: Tim Pope +" Last Update: By ZyX: use shiftwidth() + +" Insert mode mappings: +" Normal mode mappings: < > << >> [[ ]] [] ][ +" Visual mode mappings: < > + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +setlocal commentstring=\ \ \ \ \ \ *%s +setlocal comments=:* +setlocal fo+=croqlt +setlocal expandtab +setlocal textwidth=72 + +" matchit support +if exists("loaded_matchit") + let s:ordot = '\|\ze\.\%( \@=\|$\)' + let b:match_ignorecase=1 + "let b:match_skip = 'getline(".") =~ "^.\\{6\\}[*/C]"' + let b:match_words= + \ '\$if\>:$else\>:\$endif\>,' . + \ '[$-]\@:\<\%(then\|else\)\>:\'.s:ordot.',' . + \ '-\@:\'.s:ordot . ',' . + \ '-\@:\<\%(when\)\>:\' .s:ordot . ',' . + \ '-\@\%(.*\(\%$\|\%(\n\%(\%(\s*\|.\{6\}\)[*/].*\n\)*\)\=\s*\%(not\s\+\)\=on\s\+size\s\+error\>\)\)\@=:\%(\:\' .s:ordot . ',' . + \ '-\@\%(.*\(\%$\|\%(\n\%(\%(\s*\|.\{6\}\)[*/].*\n\)*\)\=\s*\%(not\s\+\)\=on\s\+\%(overflow\|exception\)\>\)\)\@=:\%(\:\' .s:ordot . ',' . + \ '-\@\%(.*\(\%$\|\%(\n\%(\%(\s*\|.\{6\}\)[*/].*\n\)*\)\=\s*\%(invalid\s\+key\|at\s\+end\|no\s\+data\|at\s\+end-of-page\)\>\)\)\@=:\%(\:\' .s:ordot +endif + +if has("gui_win32") && !exists("b:browsefilter") + let b:browsefilter = "COBOL Source Files (*.cbl, *.cob)\t*.cbl;*.cob;*.lib\n". + \ "All Files (*.*)\t*.*\n" +endif + +let b:undo_ftplugin = "setlocal com< cms< fo< et< tw<" . + \ " | unlet! b:browsefilter b:match_words b:match_ignorecase b:match_skip" +if !exists("g:no_plugin_maps") && !exists("g:no_cobol_maps") + let b:undo_ftplugin = b:undo_ftplugin . + \ " | sil! exe 'nunmap <'" . + \ " | sil! exe 'nunmap >'" . + \ " | sil! exe 'nunmap <<'" . + \ " | sil! exe 'nunmap >>'" . + \ " | sil! exe 'vunmap <'" . + \ " | sil! exe 'vunmap >'" . + \ " | sil! exe 'iunmap '" . + \ " | sil! exe 'iunmap '" . + \ " | sil! exe 'iunmap '" . + \ " | sil! exe 'nunmap Traditional'" . + \ " | sil! exe 'nunmap Comment'" . + \ " | sil! exe 'nunmap DeComment'" . + \ " | sil! exe 'vunmap VisualTraditional'" . + \ " | sil! exe 'vunmap VisualComment'" . + \ " | sil! exe 'iunmap VisualDeComment'" . + \ " | sil! exe 'unmap [['" . + \ " | sil! exe 'unmap ]]'" . + \ " | sil! exe 'unmap []'" . + \ " | sil! exe 'unmap ]['" +endif + +if !exists("g:no_plugin_maps") && !exists("g:no_cobol_maps") + if version >= 700 + nnoremap > :set opfunc=IncreaseFuncg@ + nnoremap < :set opfunc=DecreaseFuncg@ + endif + nnoremap >> :call CobolIndentBlock(1) + nnoremap << :call CobolIndentBlock(-1) + vnoremap > :call CobolIndentBlock(v:count1) + vnoremap < :call CobolIndentBlock(-v:count1) + inoremap =IncreaseIndent()=RestoreShiftwidth() + inoremap =DecreaseIndent()=RestoreShiftwidth() + if !maparg("","i") + inoremap =Tab()=RestoreShiftwidth() + endif + noremap [[ m':call search('\c^\%(\s*\.\{6\}\s\+\)\zs[A-Za-z0-9-]\+\s\+\%(division\section\)\s*\.','bW') + noremap ]] m':call search('\c^\%(\s*\.\{6\}\s\+\)\zs[A-Za-z0-9-]\+\s\+\%(division\section\)\.','W') + noremap [] m':call toend('b') + noremap ][ m':call toend('') + " For EnhancedCommentify + noremap Traditional :call Comment('t') + noremap Comment :call Comment('c') + noremap DeComment :call Comment('u') + noremap VisualTraditional :'<,'>call Comment('t') + noremap VisualComment :'<,'>call Comment('c') + noremap VisualDeComment :'<,'>call Comment('u') +endif + +let &cpo = s:cpo_save +unlet s:cpo_save + +if exists("g:did_cobol_ftplugin_functions") + finish +endif +let g:did_cobol_ftplugin_functions = 1 + +function! s:repeat(str,count) + let i = 0 + let ret = "" + while i < a:count + let ret = ret . a:str + let i = i + 1 + endwhile + return ret +endfunction + +function! s:increase(...) + let lnum = '.' + let sw = shiftwidth() + let i = a:0 ? a:1 : indent(lnum) + if i >= 11 + return sw - (i - 11) % sw + elseif i >= 7 + return 11-i + elseif i == 6 + return 1 + else + return 6-i + endif +endfunction + +function! s:decrease(...) + let lnum = '.' + let sw = shiftwidth() + let i = indent(a:0 ? a:1 : lnum) + if i >= 11 + sw + return 1 + (i + 12) % sw + elseif i > 11 + return i-11 + elseif i > 7 + return i-7 + elseif i == 7 + return 1 + else + return i + endif +endfunction + +function! CobolIndentBlock(shift) + let head = strpart(getline('.'),0,7) + let tail = strpart(getline('.'),7) + let indent = match(tail,'[^ ]') + let sw = shiftwidth() + let shift = a:shift + if shift > 0 + if indent < 4 + let tail = s:repeat(" ",4-indent).tail + let shift = shift - 1 + endif + let tail = s:repeat(" ",shift*sw).tail + let shift = 0 + elseif shift < 0 + if (indent-4) > -shift * sw + let tail = strpart(tail,-shift * sw) + elseif (indent-4) > (-shift-1) * sw + let tail = strpart(tail,indent - 4) + else + let tail = strpart(tail,indent) + endif + endif + call setline('.',head.tail) +endfunction + +function! s:IncreaseFunc(type) + '[,']call CobolIndentBlock(1) +endfunction + +function! s:DecreaseFunc(type) + '[,']call CobolIndentBlock(-1) +endfunction + +function! s:IncreaseIndent() + let c = "\" + if exists("*InsertCtrlTWrapper") + let key = InsertCtrlTWrapper() + if key != c + return key + endif + endif + let interval = s:increase() + let b:cobol_shiftwidth = &shiftwidth + let &shiftwidth = 1 + let lastchar = strpart(getline('.'),col('.')-2,1) + if lastchar == '0' || lastchar == '^' + return "\".lastchar.c + else + return s:repeat(c,interval) + endif +endfunction + +function! s:DecreaseIndent() + let c = "\" + if exists("*InsertCtrlDWrapper") + " I hack Ctrl-D to delete when not at the end of the line. + let key = InsertCtrlDWrapper() + if key != c + return key + endif + endif + let interval = s:decrease() + let b:cobol_shiftwidth = &shiftwidth + let &shiftwidth = 1 + return s:repeat(c,interval) +endfunction + +function! s:RestoreShiftwidth() + if exists("b:cobol_shiftwidth") + let &shiftwidth=b:cobol_shiftwidth + unlet b:cobol_shiftwidth + endif + return "" +endfunction + +function! s:Tab() + if (strpart(getline('.'),0,col('.')-1) =~ '^\s*$' && &sta) + return s:IncreaseIndent() + " &softtabstop < 0: &softtabstop follows &shiftwidth + elseif (&sts < 0 || &sts == shiftwidth()) && &sts != 8 && &et + return s:repeat(" ",s:increase(col('.')-1)) + else + return "\" + endif +endfunction + +function! s:Comment(arg) + " For EnhancedCommentify + let line = getline('.') + if (line =~ '^.\{6\}[*/C]' || a:arg == 'c') && a:arg != 'u' + let line = substitute(line,'^.\{6\}\zs.',' ','') + else + let line = substitute(line,'^.\{6\}\zs.','*','') + endif + call setline('.',line) +endfunction + +function! s:toend(direction) + let ignore = '^\(\s*\|.\{6\}\)\%([*/]\|\s*$\)' + let keep = line('.') + keepjumps + + while line('.') < line('$') && getline('.') =~ ignore + keepjumps + + endwhile + let res = search('\c^\%(\s*\|.\{6\}\s\+\)\zs[A-Za-z0-9-]\+\s\+\%(division\|section\)\s*\.',a:direction.'W') + if a:direction != 'b' && !res + let res = line('$') + keepjumps $ + elseif res + keepjumps - + endif + if res + while line('.') > 1 && getline('.') =~ ignore + keepjumps - + endwhile + if line('.') == 1 && getline('.') =~ ignore + exe "keepjumps ".keep + endif + else + exe "keepjumps ".keep + endif +endfunction diff --git a/runtime/ftplugin/conf.vim b/runtime/ftplugin/conf.vim new file mode 100644 index 0000000000..1b110e475b --- /dev/null +++ b/runtime/ftplugin/conf.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin file +" Language: generic configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/config.vim b/runtime/ftplugin/config.vim new file mode 100644 index 0000000000..7fde42ebf5 --- /dev/null +++ b/runtime/ftplugin/config.vim @@ -0,0 +1,42 @@ +" Vim filetype plugin file +" Language: config +" Maintainer: Dan Sharp +" Last Changed: 20 Jan 2009 +" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin + +if exists("b:did_ftplugin") | finish | endif + +" Make sure the continuation lines below do not cause problems in +" compatibility mode. +let s:save_cpo = &cpo +set cpo-=C + +" Define some defaults in case the included ftplugins don't set them. +let s:undo_ftplugin = "" +let s:browsefilter = "Bourne Shell Files (*.sh)\t*.sh\n" . + \ "All Files (*.*)\t*.*\n" +let s:match_words = "" + +runtime! ftplugin/sh.vim ftplugin/sh_*.vim ftplugin/sh/*.vim +let b:did_ftplugin = 1 + +" Override our defaults if these were set by an included ftplugin. +if exists("b:undo_ftplugin") + let s:undo_ftplugin = b:undo_ftplugin +endif +if exists("b:browsefilter") + let s:browsefilter = b:browsefilter +endif + +" Change the :browse e filter to primarily show configure-related files. +if has("gui_win32") + let b:browsefilter="Configure Scripts (configure.*, config.*)\tconfigure*;config.*\n" . + \ s:browsefilter +endif + +" Undo the stuff we changed. +let b:undo_ftplugin = "unlet! b:browsefilter | " . b:undo_ftplugin + +" Restore the saved compatibility options. +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/runtime/ftplugin/context.vim b/runtime/ftplugin/context.vim new file mode 100644 index 0000000000..1c7d678375 --- /dev/null +++ b/runtime/ftplugin/context.vim @@ -0,0 +1,35 @@ +" Vim filetype plugin file +" Language: ConTeXt typesetting engine +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< def< inc< sua< fo<" + +setlocal comments=b:%D,b:%C,b:%M,:% commentstring=%\ %s formatoptions+=tcroql + +let &l:define='\\\%([egx]\|char\|mathchar\|count\|dimen\|muskip\|skip\|toks\)\=' + \ . 'def\|\\font\|\\\%(future\)\=let' + \ . '\|\\new\%(count\|dimen\|skip\|muskip\|box\|toks\|read\|write' + \ . '\|fam\|insert\|if\)' + +let &l:include = '^\s*\%(input\|component\)' + +setlocal suffixesadd=.tex + +if exists("loaded_matchit") + let b:match_ignorecase = 0 + let b:match_skip = 'r:\\\@ +" Last Change: 2001 Jan 15 + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +" Behaves just like C +runtime! ftplugin/c.vim ftplugin/c_*.vim ftplugin/c/*.vim diff --git a/runtime/ftplugin/crm.vim b/runtime/ftplugin/crm.vim new file mode 100644 index 0000000000..e86e683068 --- /dev/null +++ b/runtime/ftplugin/crm.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin file +" Language: CRM114 +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/cs.vim b/runtime/ftplugin/cs.vim new file mode 100644 index 0000000000..7c2cbda32f --- /dev/null +++ b/runtime/ftplugin/cs.vim @@ -0,0 +1,29 @@ +" Vim filetype plugin file +" Language: C# +" Maintainer: Johannes Zellner +" Last Change: Tue, 09 Mar 2004 14:09:33 CET + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 +let s:keepcpo= &cpo +set cpo&vim + +" Set 'formatoptions' to break comment lines but not other lines, +" and insert the comment leader when hitting or using "o". +setlocal fo-=t fo+=croql + +" Set 'comments' to format dashed lists in comments. +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// + +if has("gui_win32") && !exists("b:browsefilter") + let b:browsefilter = "C# Source Files (*.cs)\t*.cs\n" . + \ "All Files (*.*)\t*.*\n" +endif + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/ftplugin/csc.vim b/runtime/ftplugin/csc.vim new file mode 100644 index 0000000000..3a09c3bf8b --- /dev/null +++ b/runtime/ftplugin/csc.vim @@ -0,0 +1,27 @@ +" Vim filetype plugin file +" Language: csc +" Maintainer: Dan Sharp +" Last Changed: 20 Jan 2009 +" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin + +if exists("b:did_ftplugin") | finish | endif +let b:did_ftplugin = 1 + +" Make sure the continuation lines below do not cause problems in +" compatibility mode. +let s:save_cpo = &cpo +set cpo-=C + +if exists("loaded_matchit") + let b:match_words= + \ '\:\,' . + \ '\:\:\,' . + \ '\\|\:\' +endif + +" Undo the stuff we changed. +let b:undo_ftplugin = "unlet! b:match_words" + +" Restore the saved compatibility options. +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/runtime/ftplugin/csh.vim b/runtime/ftplugin/csh.vim new file mode 100644 index 0000000000..4ae09f91be --- /dev/null +++ b/runtime/ftplugin/csh.vim @@ -0,0 +1,48 @@ +" Vim filetype plugin file +" Language: csh +" Maintainer: Dan Sharp +" Last Changed: 20 Jan 2009 +" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin + +if exists("b:did_ftplugin") | finish | endif +let b:did_ftplugin = 1 + +" Make sure the continuation lines below do not cause problems in +" compatibility mode. +let s:save_cpo = &cpo +set cpo-=C + +setlocal commentstring=#%s +setlocal formatoptions-=t +setlocal formatoptions+=crql + +" Csh: thanks to Johannes Zellner +" - Both foreach and end must appear alone on separate lines. +" - The words else and endif must appear at the beginning of input lines; +" the if must appear alone on its input line or after an else. +" - Each case label and the default label must appear at the start of a +" line. +" - while and end must appear alone on their input lines. +if exists("loaded_matchit") + let b:match_words = + \ '^\s*\.*(.*).*\:'. + \ '^\s*\\s\+\.*(.*).*\:^\s*\:'. + \ '^\s*\,'. + \ '\%(^\s*\\s\+\S\+\|^s*\\).*(.*):'. + \ '\:\:^\s*\,'. + \ '^\s*\.*(.*):^\s*\\s\+:^\s*\:^\s*\' +endif + +" Change the :browse e filter to primarily show csh-related files. +if has("gui_win32") + let b:browsefilter="csh Scripts (*.csh)\t*.csh\n" . + \ "All Files (*.*)\t*.*\n" +endif + +" Undo the stuff we changed. +let b:undo_ftplugin = "setlocal commentstring< formatoptions<" . + \ " | unlet! b:match_words b:browsefilter" + +" Restore the saved compatibility options. +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/runtime/ftplugin/css.vim b/runtime/ftplugin/css.vim new file mode 100644 index 0000000000..43d1edfa5b --- /dev/null +++ b/runtime/ftplugin/css.vim @@ -0,0 +1,23 @@ +" Vim filetype plugin file +" Language: CSS +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< inc< fo< ofu<" + +setlocal comments=s1:/*,mb:*,ex:*/ commentstring& +setlocal formatoptions-=t formatoptions+=croql +setlocal omnifunc=csscomplete#CompleteCSS + +let &l:include = '^\s*@import\s\+\%(url(\)\=' + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/cucumber.vim b/runtime/ftplugin/cucumber.vim new file mode 100644 index 0000000000..2ec1a5976f --- /dev/null +++ b/runtime/ftplugin/cucumber.vim @@ -0,0 +1,154 @@ +" Vim filetype plugin +" Language: Cucumber +" Maintainer: Tim Pope +" Last Change: 2013 Jun 01 + +" Only do this when not done yet for this buffer +if (exists("b:did_ftplugin")) + finish +endif +let b:did_ftplugin = 1 + +let s:keepcpo= &cpo +set cpo&vim + +setlocal formatoptions-=t formatoptions+=croql +setlocal comments=:# commentstring=#\ %s +setlocal omnifunc=CucumberComplete + +let b:undo_ftplugin = "setl fo< com< cms< ofu<" + +let b:cucumber_root = expand('%:p:h:s?.*[\/]\%(features\|stories\)\zs[\/].*??') + +if !exists("g:no_plugin_maps") && !exists("g:no_cucumber_maps") + nnoremap :exe jump('edit',v:count) + nnoremap [ :exe jump('edit',v:count) + nnoremap ] :exe jump('edit',v:count) + nnoremap ] :exe jump('split',v:count) + nnoremap :exe jump('split',v:count) + nnoremap d :exe jump('split',v:count) + nnoremap :exe jump('split',v:count) + nnoremap } :exe jump('pedit',v:count) + nnoremap [d :exe jump('pedit',v:count) + nnoremap ]d :exe jump('pedit',v:count) + let b:undo_ftplugin .= + \ "|sil! nunmap " . + \ "|sil! nunmap [" . + \ "|sil! nunmap ]" . + \ "|sil! nunmap ]" . + \ "|sil! nunmap " . + \ "|sil! nunmap d" . + \ "|sil! nunmap " . + \ "|sil! nunmap }" . + \ "|sil! nunmap [d" . + \ "|sil! nunmap ]d" +endif + +function! s:jump(command,count) + let steps = s:steps('.') + if len(steps) == 0 || len(steps) < a:count + return 'echoerr "No matching step found"' + elseif len(steps) > 1 && !a:count + return 'echoerr "Multiple matching steps found"' + else + let c = a:count ? a:count-1 : 0 + return a:command.' +'.steps[c][1].' '.escape(steps[c][0],' %#') + endif +endfunction + +function! s:allsteps() + let step_pattern = '\C^\s*\K\k*\>\s*(\=\s*\zs\S.\{-\}\ze\s*)\=\s*\%(do\|{\)\s*\%(|[^|]*|\s*\)\=\%($\|#\)' + let steps = [] + for file in split(glob(b:cucumber_root.'/**/*.rb'),"\n") + let lines = readfile(file) + let num = 0 + for line in lines + let num += 1 + if line =~ step_pattern + let type = matchstr(line,'\w\+') + let steps += [[file,num,type,matchstr(line,step_pattern)]] + endif + endfor + endfor + return steps +endfunction + +function! s:steps(lnum) + let c = match(getline(a:lnum), '\S') + 1 + while synIDattr(synID(a:lnum,c,1),'name') !~# '^$\|Region$' + let c = c + 1 + endwhile + let step = matchstr(getline(a:lnum)[c-1 : -1],'^\s*\zs.\{-\}\ze\s*$') + return filter(s:allsteps(),'s:stepmatch(v:val[3],step)') +endfunction + +function! s:stepmatch(receiver,target) + if a:receiver =~ '^[''"].*[''"]$' + let pattern = '^'.escape(substitute(a:receiver[1:-2],'$\w\+','(.*)','g'),'/').'$' + elseif a:receiver =~ '^/.*/$' + let pattern = a:receiver[1:-2] + elseif a:receiver =~ '^%r..*.$' + let pattern = escape(a:receiver[3:-2],'/') + else + return 0 + endif + try + let vimpattern = substitute(substitute(pattern,'\\\@ +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments= commentstring= formatoptions-=tcroql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/debchangelog.vim b/runtime/ftplugin/debchangelog.vim new file mode 100644 index 0000000000..d2718db88e --- /dev/null +++ b/runtime/ftplugin/debchangelog.vim @@ -0,0 +1,383 @@ +" Vim filetype plugin file (GUI menu, folding and completion) +" Language: Debian Changelog +" Maintainer: Debian Vim Maintainers +" Former Maintainers: Michael Piefel +" Stefano Zacchiroli +" Last Change: 2014-01-31 +" License: Vim License +" URL: http://hg.debian.org/hg/pkg-vim/vim/file/unstable/runtime/ftplugin/debchangelog.vim + +" Bug completion requires apt-listbugs installed for Debian packages or +" python-launchpadlib installed for Ubuntu packages + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin=1 + +" {{{1 Local settings (do on every load) +if exists("g:debchangelog_fold_enable") + setlocal foldmethod=expr + setlocal foldexpr=DebGetChangelogFold(v:lnum) + setlocal foldtext=DebChangelogFoldText() +endif + +" Debian changelogs are not supposed to have any other text width, +" so the user cannot override this setting +setlocal tw=78 +setlocal comments=f:* + +" Clean unloading +let b:undo_ftplugin = "setlocal tw< comments< foldmethod< foldexpr< foldtext<" +" }}}1 + +if exists("g:did_changelog_ftplugin") + finish +endif + +" Don't load another plugin (this is global) +let g:did_changelog_ftplugin = 1 + +" {{{1 GUI menu + +" Helper functions returning various data. +" Returns full name, either from $DEBFULLNAME or debianfullname. +" TODO Is there a way to determine name from anywhere else? +function FullName() + if exists("$DEBFULLNAME") + return $DEBFULLNAME + elseif exists("g:debianfullname") + return g:debianfullname + else + return "Your Name" + endif +endfunction + +" Returns email address, from $DEBEMAIL, $EMAIL or debianemail. +function Email() + if exists("$DEBEMAIL") + return $DEBEMAIL + elseif exists("$EMAIL") + return $EMAIL + elseif exists("g:debianemail") + return g:debianemail + else + return "your@email.address" + endif +endfunction + +" Returns date in RFC822 format. +function Date() + let savelang = v:lc_time + execute "language time C" + let dateandtime = strftime("%a, %d %b %Y %X %z") + execute "language time " . savelang + return dateandtime +endfunction + +function WarnIfNotUnfinalised() + if match(getline("."), " -- [[:alpha:]][[:alnum:].]")!=-1 + echohl WarningMsg + echo "The entry has not been unfinalised before editing." + echohl None + return 1 + endif + return 0 +endfunction + +function Finalised() + let savelinenum = line(".") + normal 1G + call search("^ -- ") + if match(getline("."), " -- [[:alpha:]][[:alnum:].]")!=-1 + let returnvalue = 1 + else + let returnvalue = 0 + endif + execute savelinenum + return returnvalue +endfunction + +" These functions implement the menus +function NewVersion() + " The new entry is unfinalised and shall be changed + amenu disable Changelog.New\ Version + amenu enable Changelog.Add\ Entry + amenu enable Changelog.Close\ Bug + amenu enable Changelog.Set\ Distribution + amenu enable Changelog.Set\ Urgency + amenu disable Changelog.Unfinalise + amenu enable Changelog.Finalise + call append(0, substitute(getline(1), '-\([[:digit:]]\+\))', '-$$\1)', '')) + call append(1, "") + call append(2, "") + call append(3, " -- ") + call append(4, "") + call Urgency("low") + normal 1G0 + call search(")") + normal h + normal  + call setline(1, substitute(getline(1), '-\$\$', '-', '')) + if exists("g:debchangelog_fold_enable") + foldopen + endif + call AddEntry() +endfunction + +function AddEntry() + normal 1G + call search("^ -- ") + normal kk + call append(".", " * ") + normal jjj + let warn=WarnIfNotUnfinalised() + normal kk + if warn + echohl MoreMsg + call input("Hit ENTER") + echohl None + endif + startinsert! +endfunction + +function CloseBug() + normal 1G + call search("^ -- ") + let warn=WarnIfNotUnfinalised() + normal kk + call append(".", " * (closes: #" . input("Bug number to close: ") . ")") + normal j^ll + startinsert +endfunction + +function Distribution(dist) + call setline(1, substitute(getline(1), ') *\%(UNRELEASED\|\l\+\);', ") " . a:dist . ";", "")) +endfunction + +function Urgency(urg) + call setline(1, substitute(getline(1), "urgency=.*$", "urgency=" . a:urg, "")) +endfunction + +function UnfinaliseMenu() + " This means the entry shall be changed + amenu disable Changelog.New\ Version + amenu enable Changelog.Add\ Entry + amenu enable Changelog.Close\ Bug + amenu enable Changelog.Set\ Distribution + amenu enable Changelog.Set\ Urgency + amenu disable Changelog.Unfinalise + amenu enable Changelog.Finalise +endfunction + +function Unfinalise() + call UnfinaliseMenu() + normal 1G + call search("^ -- ") + call setline(".", " -- ") +endfunction + +function FinaliseMenu() + " This means the entry should not be changed anymore + amenu enable Changelog.New\ Version + amenu disable Changelog.Add\ Entry + amenu disable Changelog.Close\ Bug + amenu disable Changelog.Set\ Distribution + amenu disable Changelog.Set\ Urgency + amenu enable Changelog.Unfinalise + amenu disable Changelog.Finalise +endfunction + +function Finalise() + call FinaliseMenu() + normal 1G + call search("^ -- ") + call setline(".", " -- " . FullName() . " <" . Email() . "> " . Date()) +endfunction + + +function MakeMenu() + amenu &Changelog.&New\ Version :call NewVersion() + amenu Changelog.&Add\ Entry :call AddEntry() + amenu Changelog.&Close\ Bug :call CloseBug() + menu Changelog.-sep- + + amenu Changelog.Set\ &Distribution.&unstable :call Distribution("unstable") + amenu Changelog.Set\ Distribution.&frozen :call Distribution("frozen") + amenu Changelog.Set\ Distribution.&stable :call Distribution("stable") + menu Changelog.Set\ Distribution.-sep- + amenu Changelog.Set\ Distribution.frozen\ unstable :call Distribution("frozen unstable") + amenu Changelog.Set\ Distribution.stable\ unstable :call Distribution("stable unstable") + amenu Changelog.Set\ Distribution.stable\ frozen :call Distribution("stable frozen") + amenu Changelog.Set\ Distribution.stable\ frozen\ unstable :call Distribution("stable frozen unstable") + + amenu Changelog.Set\ &Urgency.&low :call Urgency("low") + amenu Changelog.Set\ Urgency.&medium :call Urgency("medium") + amenu Changelog.Set\ Urgency.&high :call Urgency("high") + + menu Changelog.-sep- + amenu Changelog.U&nfinalise :call Unfinalise() + amenu Changelog.&Finalise :call Finalise() + + if Finalised() + call FinaliseMenu() + else + call UnfinaliseMenu() + endif +endfunction + +augroup changelogMenu +au BufEnter * if &filetype == "debchangelog" | call MakeMenu() | endif +au BufLeave * if &filetype == "debchangelog" | silent! aunmenu Changelog | endif +augroup END + +" }}} +" {{{1 folding + +" look for an author name in the [zonestart zoneend] lines searching backward +function! s:getAuthor(zonestart, zoneend) + let linepos = a:zoneend + while linepos >= a:zonestart + let line = getline(linepos) + if line =~ '^ --' + return substitute(line, '^ --\s*\([^<]\+\)\s*.*', '\1', '') + endif + let linepos -= 1 + endwhile + return '[unknown]' +endfunction + +" Look for a package source name searching backward from the givenline and +" returns it. Return the empty string if the package name can't be found +function! DebGetPkgSrcName(lineno) + let lineidx = a:lineno + let pkgname = '' + while lineidx > 0 + let curline = getline(lineidx) + if curline =~ '^\S' + let pkgname = matchlist(curline, '^\(\S\+\).*$')[1] + break + endif + let lineidx = lineidx - 1 + endwhile + return pkgname +endfunction + +function! DebChangelogFoldText() + if v:folddashes == '-' " changelog entry fold + return foldtext() . ' -- ' . s:getAuthor(v:foldstart, v:foldend) . ' ' + endif + return foldtext() +endfunction + +function! DebGetChangelogFold(lnum) + let line = getline(a:lnum) + if line =~ '^\w\+' + return '>1' " beginning of a changelog entry + endif + if line =~ '^\s\+\[.*\]' + return '>2' " beginning of an author-specific chunk + endif + if line =~ '^ --' + return '1' + endif + return '=' +endfunction + +if exists("g:debchangelog_fold_enable") + silent! foldopen! " unfold the entry the cursor is on (usually the first one) +endif + +" }}} + +" {{{1 omnicompletion for Closes: # + +if !exists('g:debchangelog_listbugs_severities') + let g:debchangelog_listbugs_severities = 'critical,grave,serious,important,normal,minor,wishlist' +endif + +fun! DebCompleteBugs(findstart, base) + if a:findstart + let line = getline('.') + + " try to detect whether this is closes: or lp: + let g:debchangelog_complete_mode = 'debbugs' + let try_colidx = col('.') - 1 + let colidx = -1 " default to no-completion-possible + + while try_colidx > 0 && line[try_colidx - 1] =~ '\s\|\d\|#\|,\|:' + let try_colidx = try_colidx - 1 + if line[try_colidx] == '#' && colidx == -1 + " found hash, where we complete from: + let colidx = try_colidx + elseif line[try_colidx] == ':' + if try_colidx > 1 && strpart(line, try_colidx - 2, 3) =~ '\clp:' + let g:debchangelog_complete_mode = 'lp' + endif + break + endif + endwhile + return colidx + else " return matches: + let bug_lines = [] + if g:debchangelog_complete_mode == 'lp' + if ! has('python') + echoerr 'vim must be built with Python support to use LP bug completion' + return + endif + let pkgsrc = DebGetPkgSrcName(line('.')) + python << EOF +import vim +try: + from launchpadlib.launchpad import Launchpad + from lazr.restfulclient.errors import HTTPError + # login anonymously + lp = Launchpad.login_anonymously('debchangelog.vim', 'production') + ubuntu = lp.distributions['ubuntu'] + try: + sp = ubuntu.getSourcePackage(name=vim.eval('pkgsrc')) + status = ('New', 'Incomplete', 'Confirmed', 'Triaged', + 'In Progress', 'Fix Committed') + tasklist = sp.searchTasks(status=status, order_by='id') + liststr = '[' + for task in tasklist: + bug = task.bug + liststr += "'#%d - %s'," % (bug.id, bug.title.replace('\'', '\'\'')) + liststr += ']' + vim.command('silent let bug_lines = %s' % liststr.encode('utf-8')) + except HTTPError: + pass +except ImportError: + vim.command('echoerr \'python-launchpadlib >= 1.5.4 needs to be installed to use Launchpad bug completion\'') +EOF + else + if ! filereadable('/usr/sbin/apt-listbugs') + echoerr 'apt-listbugs not found, you should install it to use Closes bug completion' + return + endif + let pkgsrc = DebGetPkgSrcName(line('.')) + let listbugs_output = system('/usr/sbin/apt-listbugs -s ' . g:debchangelog_listbugs_severities . ' list ' . pkgsrc . ' | grep "^ #" 2> /dev/null') + let bug_lines = split(listbugs_output, '\n') + endif + let completions = [] + for line in bug_lines + let parts = matchlist(line, '^\s*\(#\S\+\)\s*-\s*\(.*\)$') + " filter only those which match a:base: + if parts[1] !~ "^" . a:base + continue + endif + let completion = {} + let completion['word'] = parts[1] + let completion['menu'] = parts[2] + let completion['info'] = parts[0] + let completions += [completion] + endfor + return completions + endif +endfun + +setlocal omnifunc=DebCompleteBugs + +" }}} + +" vim: set foldmethod=marker: diff --git a/runtime/ftplugin/debcontrol.vim b/runtime/ftplugin/debcontrol.vim new file mode 100644 index 0000000000..7871d9897f --- /dev/null +++ b/runtime/ftplugin/debcontrol.vim @@ -0,0 +1,70 @@ +" Vim filetype plugin file (GUI menu and folding) +" Language: Debian control files +" Maintainer: Debian Vim Maintainers +" Former Maintainer: Pierre Habouzit +" Last Change: 2008-03-08 +" URL: http://hg.debian.org/hg/pkg-vim/vim/raw-file/tip/runtime/ftplugin/debcontrol.vim + +" Do these settings once per buffer +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin=1 + +" {{{1 Local settings (do on every load) +if exists("g:debcontrol_fold_enable") + setlocal foldmethod=expr + setlocal foldexpr=DebControlFold(v:lnum) + setlocal foldtext=DebControlFoldText() +endif +setlocal textwidth=0 + +" Clean unloading +let b:undo_ftplugin = "setlocal tw< foldmethod< foldexpr< foldtext<" + +" }}}1 + +" {{{1 folding + +function! s:getField(f, lnum) + let line = getline(a:lnum) + let fwdsteps = 0 + while line !~ '^'.a:f.':' + let fwdsteps += 1 + let line = getline(a:lnum + fwdsteps) + if line == '' + return 'unknown' + endif + endwhile + return substitute(line, '^'.a:f.': *', '', '') +endfunction + +function! DebControlFoldText() + if v:folddashes == '-' " debcontrol entry fold + let type = substitute(getline(v:foldstart), ':.*', '', '') + if type == 'Source' + let ftext = substitute(foldtext(), ' *Source: *', ' ', '') + return ftext . ' -- ' . s:getField('Maintainer', v:foldstart) . ' ' + endif + let arch = s:getField('Architecture', v:foldstart) + let ftext = substitute(foldtext(), ' *Package: *', ' [' . arch . '] ', '') + return ftext . ': ' . s:getField('Description', v:foldstart) . ' ' + endif + return foldtext() +endfunction + +function! DebControlFold(l) + + " This is for not merging blank lines around folds to them + if getline(a:l) =~ '^Source:' + return '>1' + endif + + if getline(a:l) =~ '^Package:' + return '>1' + endif + + return '=' +endfunction + +" }}}1 diff --git a/runtime/ftplugin/denyhosts.vim b/runtime/ftplugin/denyhosts.vim new file mode 100644 index 0000000000..557fd82c53 --- /dev/null +++ b/runtime/ftplugin/denyhosts.vim @@ -0,0 +1,18 @@ +" Vim filetype plugin file +" Maintainer: Nikolai Weibull +" Latest Revision: 2007-12-04 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/dictconf.vim b/runtime/ftplugin/dictconf.vim new file mode 100644 index 0000000000..659046c176 --- /dev/null +++ b/runtime/ftplugin/dictconf.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin file +" Language: dict(1) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/dictdconf.vim b/runtime/ftplugin/dictdconf.vim new file mode 100644 index 0000000000..ee738c50ce --- /dev/null +++ b/runtime/ftplugin/dictdconf.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin file +" Language: dictd(8) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/diff.vim b/runtime/ftplugin/diff.vim new file mode 100644 index 0000000000..3fe1b84a04 --- /dev/null +++ b/runtime/ftplugin/diff.vim @@ -0,0 +1,15 @@ +" Vim filetype plugin file +" Language: Diff +" Maintainer: Bram Moolenaar +" Last Change: 2005 Jul 27 + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let b:undo_ftplugin = "setl modeline<" + +" Don't use modelines in a diff, they apply to the diffed file +setlocal nomodeline diff --git a/runtime/ftplugin/dircolors.vim b/runtime/ftplugin/dircolors.vim new file mode 100644 index 0000000000..3b3d046e36 --- /dev/null +++ b/runtime/ftplugin/dircolors.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin file +" Language: dircolors(1) input file +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/docbk.vim b/runtime/ftplugin/docbk.vim new file mode 100644 index 0000000000..cbceb6b305 --- /dev/null +++ b/runtime/ftplugin/docbk.vim @@ -0,0 +1,24 @@ +" Vim filetype plugin file +" Language: DocBook +" Maintainer: Nikolai Weibull +" Latest Revision: 2012-04-25 + +if exists('b:did_ftplugin') + finish +endif + +if !exists('b:docbk_type') + if expand('%:e') == 'sgml' + let b:docbk_type = 'sgml' + else + let b:docbk_type = 'xml' + endif +endif + +if b:docbk_type == 'sgml' + runtime! ftplugin/sgml.vim ftplugin/sgml_*.vim ftplugin/sgml/*.vim +else + runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim +endif + +let b:undo_ftplugin = "unlet! b:docbk_type" diff --git a/runtime/ftplugin/dosbatch.vim b/runtime/ftplugin/dosbatch.vim new file mode 100644 index 0000000000..dbc02d80f8 --- /dev/null +++ b/runtime/ftplugin/dosbatch.vim @@ -0,0 +1,30 @@ +" Vim filetype plugin file +" Language: MS-DOS .bat files +" Maintainer: Mike Williams +" Last Change: 8th May 2012 + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +" BAT comment formatting +setlocal comments=b:rem,b:@rem,b:REM,b:@REM,::: +setlocal formatoptions-=t formatoptions+=rol + +" Define patterns for the browse file filter +if has("gui_win32") && !exists("b:browsefilter") + let b:browsefilter = "DOS Batch Files (*.bat, *.cmd)\t*.bat;*.cmd\nAll Files (*.*)\t*.*\n" +endif + +let b:undo_ftplugin = "setlocal comments< formatoptions<" + \ . "| unlet! b:browsefiler" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/dosini.vim b/runtime/ftplugin/dosini.vim new file mode 100644 index 0000000000..461403ca95 --- /dev/null +++ b/runtime/ftplugin/dosini.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin file +" Language: Configuration File (ini file) for MSDOS/MS Windows +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:; commentstring=;\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/dtd.vim b/runtime/ftplugin/dtd.vim new file mode 100644 index 0000000000..6c08f6691d --- /dev/null +++ b/runtime/ftplugin/dtd.vim @@ -0,0 +1,40 @@ +" Vim filetype plugin file +" Language: dtd +" Maintainer: Dan Sharp +" Last Changed: 20 Jan 2009 +" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin + +if exists("b:did_ftplugin") | finish | endif +let b:did_ftplugin = 1 + +" Make sure the continuation lines below do not cause problems in +" compatibility mode. +let s:save_cpo = &cpo +set cpo-=C + +setlocal commentstring= +setlocal comments=s: + +setlocal formatoptions-=t +if !exists("g:ft_dtd_autocomment") || (g:ft_dtd_autocomment == 1) + setlocal formatoptions+=croql +endif + +if exists("loaded_matchit") + let b:match_words = ',' +endif + +" Change the :browse e filter to primarily show Java-related files. +if has("gui_win32") + let b:browsefilter="DTD Files (*.dtd)\t*.dtd\n" . + \ "XML Files (*.xml)\t*.xml\n" . + \ "All Files (*.*)\t*.*\n" +endif + +" Undo the stuff we changed. +let b:undo_ftplugin = "setlocal commentstring< comments< formatoptions<" . + \ " | unlet! b:matchwords b:browsefilter" + +" Restore the saved compatibility options. +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/runtime/ftplugin/dtrace.vim b/runtime/ftplugin/dtrace.vim new file mode 100644 index 0000000000..9288097f7f --- /dev/null +++ b/runtime/ftplugin/dtrace.vim @@ -0,0 +1,40 @@ +" Language: D script as described in "Solaris Dynamic Tracing Guide", +" http://docs.sun.com/app/docs/doc/817-6223 +" Last Change: 2008/03/20 +" Version: 1.2 +" Maintainer: Nicolas Weber + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +" Using line continuation here. +let s:cpo_save = &cpo +set cpo-=C + +let b:undo_ftplugin = "setl fo< com< cms< isk<" + +" Set 'formatoptions' to break comment lines but not other lines, +" and insert the comment leader when hitting or using "o". +setlocal fo-=t fo+=croql + +" Set 'comments' to format dashed lists in comments. +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/ + +" dtrace uses /* */ comments. Set this explicitly, just in case the user +" changed this (/*%s*/ is the default) +setlocal commentstring=/*%s*/ + +setlocal iskeyword+=@,$ + +" When the matchit plugin is loaded, this makes the % command skip parens and +" braces in comments. +let b:match_words = &matchpairs +let b:match_skip = 's:comment\|string\|character' + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/elinks.vim b/runtime/ftplugin/elinks.vim new file mode 100644 index 0000000000..7d9257566b --- /dev/null +++ b/runtime/ftplugin/elinks.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin file +" Language: elinks(1) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/erlang.vim b/runtime/ftplugin/erlang.vim new file mode 100644 index 0000000000..2bbc345b43 --- /dev/null +++ b/runtime/ftplugin/erlang.vim @@ -0,0 +1,87 @@ +" Vim ftplugin file +" Language: Erlang +" Author: Oscar Hellström +" Contributors: Ricardo Catalinas Jiménez +" Eduardo Lopez (http://github.com/tapichu) +" License: Vim license +" Version: 2012/01/25 + +if exists('b:did_ftplugin') + finish +else + let b:did_ftplugin = 1 +endif + +if exists('s:did_function_definitions') + call s:SetErlangOptions() + finish +else + let s:did_function_definitions = 1 +endif + +let s:cpo_save = &cpo +set cpo&vim + +if !exists('g:erlang_keywordprg') + let g:erlang_keywordprg = 'erl -man' +endif + +if !exists('g:erlang_folding') + let g:erlang_folding = 0 +endif + +let s:erlang_fun_begin = '^\a\w*(.*$' +let s:erlang_fun_end = '^[^%]*\.\s*\(%.*\)\?$' + +function s:SetErlangOptions() + if g:erlang_folding + setlocal foldmethod=expr + setlocal foldexpr=GetErlangFold(v:lnum) + setlocal foldtext=ErlangFoldText() + endif + + setlocal comments=:%%%,:%%,:% + setlocal commentstring=%%s + + setlocal formatoptions+=ro + let &l:keywordprg = g:erlang_keywordprg +endfunction + +function GetErlangFold(lnum) + let lnum = a:lnum + let line = getline(lnum) + + if line =~ s:erlang_fun_end + return '<1' + endif + + if line =~ s:erlang_fun_begin && foldlevel(lnum - 1) == 1 + return '1' + endif + + if line =~ s:erlang_fun_begin + return '>1' + endif + + return '=' +endfunction + +function ErlangFoldText() + let line = getline(v:foldstart) + let foldlen = v:foldend - v:foldstart + 1 + let lines = ' ' . foldlen . ' lines: ' . substitute(line, "[\ \t]*", '', '') + if foldlen < 10 + let lines = ' ' . lines + endif + let retval = '+' . v:folddashes . lines + + return retval +endfunction + +call s:SetErlangOptions() + +let b:undo_ftplugin = "setlocal foldmethod< foldexpr< foldtext<" + \ . " comments< commentstring< formatoptions<" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/eruby.vim b/runtime/ftplugin/eruby.vim new file mode 100644 index 0000000000..9bb8e86ff3 --- /dev/null +++ b/runtime/ftplugin/eruby.vim @@ -0,0 +1,102 @@ +" Vim filetype plugin +" Language: eRuby +" Maintainer: Tim Pope +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +let s:save_cpo = &cpo +set cpo-=C + +" Define some defaults in case the included ftplugins don't set them. +let s:undo_ftplugin = "" +let s:browsefilter = "All Files (*.*)\t*.*\n" +let s:match_words = "" + +if !exists("g:eruby_default_subtype") + let g:eruby_default_subtype = "html" +endif + +if &filetype =~ '^eruby\.' + let b:eruby_subtype = matchstr(&filetype,'^eruby\.\zs\w\+') +elseif !exists("b:eruby_subtype") + let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") + let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+') + if b:eruby_subtype == '' + let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+$') + endif + if b:eruby_subtype == 'rhtml' + let b:eruby_subtype = 'html' + elseif b:eruby_subtype == 'rb' + let b:eruby_subtype = 'ruby' + elseif b:eruby_subtype == 'yml' + let b:eruby_subtype = 'yaml' + elseif b:eruby_subtype == 'js' + let b:eruby_subtype = 'javascript' + elseif b:eruby_subtype == 'txt' + " Conventional; not a real file type + let b:eruby_subtype = 'text' + elseif b:eruby_subtype == '' + let b:eruby_subtype = g:eruby_default_subtype + endif +endif + +if exists("b:eruby_subtype") && b:eruby_subtype != '' + exe "runtime! ftplugin/".b:eruby_subtype.".vim ftplugin/".b:eruby_subtype."_*.vim ftplugin/".b:eruby_subtype."/*.vim" +else + runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim +endif +unlet! b:did_ftplugin + +" Override our defaults if these were set by an included ftplugin. +if exists("b:undo_ftplugin") + let s:undo_ftplugin = b:undo_ftplugin + unlet b:undo_ftplugin +endif +if exists("b:browsefilter") + let s:browsefilter = b:browsefilter + unlet b:browsefilter +endif +if exists("b:match_words") + let s:match_words = b:match_words + unlet b:match_words +endif + +runtime! ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim +let b:did_ftplugin = 1 + +" Combine the new set of values with those previously included. +if exists("b:undo_ftplugin") + let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin +endif +if exists ("b:browsefilter") + let s:browsefilter = substitute(b:browsefilter,'\cAll Files (\*\.\*)\t\*\.\*\n','','') . s:browsefilter +endif +if exists("b:match_words") + let s:match_words = b:match_words . ',' . s:match_words +endif + +" Change the browse dialog on Win32 to show mainly eRuby-related files +if has("gui_win32") + let b:browsefilter="eRuby Files (*.erb, *.rhtml)\t*.erb;*.rhtml\n" . s:browsefilter +endif + +" Load the combined list of match_words for matchit.vim +if exists("loaded_matchit") + let b:match_words = s:match_words +endif + +" TODO: comments= +setlocal commentstring=<%#%s%> + +let b:undo_ftplugin = "setl cms< " + \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: nowrap sw=2 sts=2 ts=8: diff --git a/runtime/ftplugin/eterm.vim b/runtime/ftplugin/eterm.vim new file mode 100644 index 0000000000..e072c638b1 --- /dev/null +++ b/runtime/ftplugin/eterm.vim @@ -0,0 +1,20 @@ +" Vim filetype plugin file +" Language: eterm(1) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< inc< fo<" + +setlocal comments=:# commentstring=#\ %s include=^\\s*include +setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/falcon.vim b/runtime/ftplugin/falcon.vim new file mode 100644 index 0000000000..4fc135b4a1 --- /dev/null +++ b/runtime/ftplugin/falcon.vim @@ -0,0 +1,48 @@ +" Vim filetype plugin file +" Language: Falcon +" Author: Steven Oliver +" Copyright: Copyright (c) 2009-2013 Steven Oliver +" License: You may redistribute this under the same terms as Vim itself +" -------------------------------------------------------------------------- + +" Only do this when not done yet for this buffer +if (exists("b:did_ftplugin")) + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +setlocal softtabstop=4 shiftwidth=4 fileencoding=utf-8 +setlocal suffixesadd=.fal,.ftd + +" Matchit support +if exists("loaded_matchit") && !exists("b:match_words") + let b:match_ignorecase = 0 + + let b:match_words = + \ '\<\%(if\|case\|while\|until\|for\|do\|class\)\>=\@!' . + \ ':' . + \ '\<\%(else\|elsif\|when\)\>' . + \ ':' . + \ '\' . + \ ',{:},\[:\],(:)' +endif + +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// + +" Windows allows you to filter the open file dialog +if has("gui_win32") && !exists("b:browsefilter") + let b:browsefilter = "Falcon Source Files (*.fal *.ftd)\t*.fal;*.ftd\n" . + \ "All Files (*.*)\t*.*\n" +endif + +let b:undo_ftplugin = "setlocal tabstop< shiftwidth< expandtab< fileencoding<" + \ . " suffixesadd< comments<" + \ . "| unlet! b:browsefiler" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: set sw=4 sts=4 et tw=80 : diff --git a/runtime/ftplugin/fetchmail.vim b/runtime/ftplugin/fetchmail.vim new file mode 100644 index 0000000000..a0d4650c03 --- /dev/null +++ b/runtime/ftplugin/fetchmail.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin file +" Language: fetchmail(1) RC File +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/flexwiki.vim b/runtime/ftplugin/flexwiki.vim new file mode 100644 index 0000000000..7513e66142 --- /dev/null +++ b/runtime/ftplugin/flexwiki.vim @@ -0,0 +1,59 @@ +" Vim filetype plugin file +" Language: FlexWiki, http://www.flexwiki.com/ +" Maintainer: George V. Reilly +" Home: http://www.georgevreilly.com/vim/flexwiki/ +" Other Home: http://www.vim.org/scripts/script.php?script_id=1529 +" Author: George V. Reilly +" Filenames: *.wiki +" Last Change: Wed Apr 26 11:00 PM 2006 P +" Version: 0.3 + +if exists("b:did_ftplugin") + finish +endif + +let b:did_ftplugin = 1 " Don't load another plugin for this buffer + +" Reset the following options to undo this plugin. +let b:undo_ftplugin = "setl tw< wrap< lbr< et< ts< fenc< bomb< ff<" + +" Allow lines of unlimited length. Do NOT want automatic linebreaks, +" as a newline starts a new paragraph in FlexWiki. +setlocal textwidth=0 +" Wrap long lines, rather than using horizontal scrolling. +setlocal wrap +" Wrap at a character in 'breakat' rather than at last char on screen +setlocal linebreak +" Don't transform characters into spaces, as they are significant +" at the beginning of the line for numbered and bulleted lists. +setlocal noexpandtab +" 4-char tabstops, per flexwiki.el +setlocal tabstop=4 +" Save *.wiki files in UTF-8 +setlocal fileencoding=utf-8 +" Add the UTF-8 Byte Order Mark to the beginning of the file +setlocal bomb +" Save s as \n, not \r\n +setlocal fileformat=unix + +if exists("g:flexwiki_maps") + " Move up and down by display lines, to account for screen wrapping + " of very long lines + nmap gk + nmap k gk + vmap gk + vmap k gk + + nmap gj + nmap j gj + vmap gj + vmap j gj + + " for earlier versions - for when 'wrap' is set + imap gj + imap gk + if v:version >= 700 + imap gj + imap gk + endif +endif diff --git a/runtime/ftplugin/fortran.vim b/runtime/ftplugin/fortran.vim new file mode 100644 index 0000000000..7591edd821 --- /dev/null +++ b/runtime/ftplugin/fortran.vim @@ -0,0 +1,123 @@ +" Vim settings file +" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66) +" Version: 0.49 +" Last Change: 2013 Oct. 01 +" Maintainer: Ajit J. Thakkar ; +" Usage: Do :help fortran-plugin from Vim +" Credits: +" Useful suggestions were made by Stefano Zacchiroli, Hendrik Merx, Ben +" Fritz, and David Barnett. + +" Only do these settings when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +let s:cposet=&cpoptions +set cpoptions&vim + +" Don't do other file type settings for this buffer +let b:did_ftplugin = 1 + +" Determine whether this is a fixed or free format source file +" if this hasn't been done yet +if !exists("b:fortran_fixed_source") + if exists("fortran_free_source") + " User guarantees free source form + let b:fortran_fixed_source = 0 + elseif exists("fortran_fixed_source") + " User guarantees fixed source form + let b:fortran_fixed_source = 1 + else + " Modern Fortran allows both fixed and free source form + " assume fixed source form unless signs of free source form + " are detected in the first five columns of the first s:lmax lines + " Detection becomes more accurate and time-consuming if more lines + " are checked. Increase the limit below if you keep lots of comments at + " the very top of each file and you have a fast computer + let s:lmax = 500 + if ( s:lmax > line("$") ) + let s:lmax = line("$") + endif + let b:fortran_fixed_source = 1 + let s:ln=1 + while s:ln <= s:lmax + let s:test = strpart(getline(s:ln),0,5) + if s:test !~ '^[Cc*]' && s:test !~ '^ *[!#]' && s:test =~ '[^ 0-9\t]' && s:test !~ '^[ 0-9]*\t' + let b:fortran_fixed_source = 0 + break + endif + let s:ln = s:ln + 1 + endwhile + unlet! s:lmax s:ln s:test + endif +endif + +" Set comments and textwidth according to source type +if (b:fortran_fixed_source == 1) + setlocal comments=:!,:*,:C + " Fixed format requires a textwidth of 72 for code + setlocal tw=72 + " If you need to add "&" on continued lines so that the code is + " compatible with both free and fixed format, then you should do so + " in column 73 and uncomment the next line + " setlocal tw=73 +else + setlocal comments=:! + " Free format allows a textwidth of 132 + setlocal tw=132 +endif + +" Set commentstring for foldmethod=marker +setlocal cms=!%s + +" Tabs are not a good idea in Fortran so the default is to expand tabs +if !exists("fortran_have_tabs") + setlocal expandtab +endif + +" Set 'formatoptions' to break text lines +setlocal fo+=t + +setlocal include=^\\c#\\=\\s*include\\s\\+ +setlocal suffixesadd+=.f08,.f03,.f95,.f90,.for,.f,.F,.f77,.ftn,.fpp + +" Define patterns for the matchit plugin +if !exists("b:match_words") + let s:notend = '\%(\:' . s:notselect. '\:\,' . + \ s:notelse . '\:' . + \ '\:\,'. + \ 'do\s\+\(\d\+\):\%(^\s*\)\@<=\1\s,'. + \ s:notend . '\:\,'. + \ s:notelse . '\:\:\,'. + \ s:notend . '\,'. + \ s:notend . '\:\,'. + \ s:notend . '\:\,'. + \ s:notend . '\:\,'. + \ s:notend . '\:\,'. + \ s:notend . '\:\,'. + \ s:notend . '\:\,'. + \ s:notend . '\' . s:notprocedure . ':\,'. + \ s:notend . '\:\' +endif + +" File filters for :browse e +if has("gui_win32") && !exists("b:browsefilter") + let b:browsefilter = "Fortran Files (*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn)\t*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn\n" . + \ "All Files (*.*)\t*.*\n" +endif + +let b:undo_ftplugin = "setl fo< com< tw< cms< et< inc< sua<" + \ . "| unlet! b:match_ignorecase b:match_words b:browsefilter" + +let &cpoptions=s:cposet +unlet s:cposet + +" vim:sw=2 diff --git a/runtime/ftplugin/framescript.vim b/runtime/ftplugin/framescript.vim new file mode 100644 index 0000000000..805401a89b --- /dev/null +++ b/runtime/ftplugin/framescript.vim @@ -0,0 +1,30 @@ +" Vim ftplugin file +" Language: FrameScript +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-19 + +let s:cpo_save = &cpo +set cpo&vim + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let b:undo_ftplugin = "setl com< cms< fo< inc< | unlet! b:matchwords" + +setlocal comments=s1:/*,mb:*,ex:*/,:// commentstring=/*\ %s\ */ +setlocal formatoptions-=t formatoptions+=croql +setlocal include=^\\s*<#Include + +if exists("loaded_matchit") + let s:not_end = '\c\%(\:\c\:\c\:\c\,' . + \ s:not_end . '\:\c\' . + \ s:not_end . '\:\c\' + unlet s:not_end +endif + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/fvwm.vim b/runtime/ftplugin/fvwm.vim new file mode 100644 index 0000000000..89e1a8317a --- /dev/null +++ b/runtime/ftplugin/fvwm.vim @@ -0,0 +1,14 @@ +" Created : Tue 09 May 2006 02:07:31 PM CDT +" Modified : Tue 09 May 2006 02:07:31 PM CDT +" Author : Gautam Iyer +" Description : ftplugin for fvwm config files + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s +setlocal formatoptions-=t formatoptions+=croql diff --git a/runtime/ftplugin/git.vim b/runtime/ftplugin/git.vim new file mode 100644 index 0000000000..5fe5b2b0c3 --- /dev/null +++ b/runtime/ftplugin/git.vim @@ -0,0 +1,39 @@ +" Vim filetype plugin +" Language: generic git output +" Maintainer: Tim Pope +" Last Change: 2013 May 30 + +" Only do this when not done yet for this buffer +if (exists("b:did_ftplugin")) + finish +endif +let b:did_ftplugin = 1 + +if !exists('b:git_dir') + if expand('%:p') =~# '[\/]\.git[\/]modules[\/]' + " Stay out of the way + elseif expand('%:p') =~# '\.git\>' + let b:git_dir = matchstr(expand('%:p'),'.*\.git\>') + elseif $GIT_DIR != '' + let b:git_dir = $GIT_DIR + endif + if (has('win32') || has('win64')) && exists('b:git_dir') + let b:git_dir = substitute(b:git_dir,'\\','/','g') + endif +endif + +if exists('*shellescape') && exists('b:git_dir') && b:git_dir != '' + if b:git_dir =~# '/\.git$' " Not a bare repository + let &l:path = escape(fnamemodify(b:git_dir,':h'),'\, ').','.&l:path + endif + let &l:path = escape(b:git_dir,'\, ').','.&l:path + let &l:keywordprg = 'git --git-dir='.shellescape(b:git_dir).' show' +else + setlocal keywordprg=git\ show +endif +if has('gui_running') + let &l:keywordprg = substitute(&l:keywordprg,'^git\>','git --no-pager','') +endif + +setlocal includeexpr=substitute(v:fname,'^[^/]\\+/','','') +let b:undo_ftplugin = "setl keywordprg< path< includeexpr<" diff --git a/runtime/ftplugin/gitcommit.vim b/runtime/ftplugin/gitcommit.vim new file mode 100644 index 0000000000..e8619004bf --- /dev/null +++ b/runtime/ftplugin/gitcommit.vim @@ -0,0 +1,67 @@ +" Vim filetype plugin +" Language: git commit file +" Maintainer: Tim Pope +" Last Change: 2013 May 30 + +" Only do this when not done yet for this buffer +if (exists("b:did_ftplugin")) + finish +endif + +runtime! ftplugin/git.vim +let b:did_ftplugin = 1 + +setlocal nomodeline tabstop=8 formatoptions-=croq formatoptions+=tl + +let b:undo_ftplugin = 'setl modeline< tabstop< formatoptions<' + +if &textwidth == 0 + " make sure that log messages play nice with git-log on standard terminals + setlocal textwidth=72 + let b:undo_ftplugin .= "|setl tw<" +endif + +if exists("g:no_gitcommit_commands") || v:version < 700 + finish +endif + +if !exists("b:git_dir") + let b:git_dir = expand("%:p:h") +endif + +command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(0,b:git_dir,) + +function! s:diffcomplete(A,L,P) + let args = "" + if a:P <= match(a:L." -- "," -- ")+3 + let args = args . "-p\n--stat\n--shortstat\n--summary\n--patch-with-stat\n--no-renames\n-B\n-M\n-C\n" + end + if exists("b:git_dir") && a:A !~ '^-' + let tree = fnamemodify(b:git_dir,':h') + if strpart(getcwd(),0,strlen(tree)) == tree + let args = args."\n".system("git diff --cached --name-only") + endif + endif + return args +endfunction + +function! s:gitdiffcached(bang,gitdir,...) + let tree = fnamemodify(a:gitdir,':h') + let name = tempname() + let git = "git" + if strpart(getcwd(),0,strlen(tree)) != tree + let git .= " --git-dir=".(exists("*shellescape") ? shellescape(a:gitdir) : '"'.a:gitdir.'"') + endif + if a:0 + let extra = join(map(copy(a:000),exists("*shellescape") ? 'shellescape(v:val)' : "'\"'.v:val.'\"'")) + else + let extra = "-p --stat=".&columns + endif + call system(git." diff --cached --no-color --no-ext-diff ".extra." > ".(exists("*shellescape") ? shellescape(name) : name)) + exe "pedit ".(exists("*fnameescape") ? fnameescape(name) : name) + wincmd P + let b:git_dir = a:gitdir + command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(0,b:git_dir,) + nnoremap q :q + setlocal buftype=nowrite nobuflisted noswapfile nomodifiable filetype=git +endfunction diff --git a/runtime/ftplugin/gitconfig.vim b/runtime/ftplugin/gitconfig.vim new file mode 100644 index 0000000000..833b8b14b2 --- /dev/null +++ b/runtime/ftplugin/gitconfig.vim @@ -0,0 +1,15 @@ +" Vim filetype plugin +" Language: git config file +" Maintainer: Tim Pope +" Last Change: 2009 Dec 24 + +" Only do this when not done yet for this buffer +if (exists("b:did_ftplugin")) + finish +endif +let b:did_ftplugin = 1 + +setlocal formatoptions-=t formatoptions+=croql +setlocal comments=:#,:; commentstring=;\ %s + +let b:undo_ftplugin = "setl fo< com< cms<" diff --git a/runtime/ftplugin/gitrebase.vim b/runtime/ftplugin/gitrebase.vim new file mode 100644 index 0000000000..0200ba1acc --- /dev/null +++ b/runtime/ftplugin/gitrebase.vim @@ -0,0 +1,43 @@ +" Vim filetype plugin +" Language: git rebase --interactive +" Maintainer: Tim Pope +" Last Change: 2010 May 21 + +" Only do this when not done yet for this buffer +if (exists("b:did_ftplugin")) + finish +endif + +runtime! ftplugin/git.vim +let b:did_ftplugin = 1 + +setlocal comments=:# commentstring=#\ %s formatoptions-=t +if !exists("b:undo_ftplugin") + let b:undo_ftplugin = "" +endif +let b:undo_ftplugin = b:undo_ftplugin."|setl com< cms< fo<" + +function! s:choose(word) + s/^\(\w\+\>\)\=\(\s*\)\ze\x\{4,40\}\>/\=(strlen(submatch(1)) == 1 ? a:word[0] : a:word) . substitute(submatch(2),'^$',' ','')/e +endfunction + +function! s:cycle() + call s:choose(get({'s':'edit','p':'squash','e':'reword','r':'fixup'},getline('.')[0],'pick')) +endfunction + +command! -buffer -bar Pick :call s:choose('pick') +command! -buffer -bar Squash :call s:choose('squash') +command! -buffer -bar Edit :call s:choose('edit') +command! -buffer -bar Reword :call s:choose('reword') +command! -buffer -bar Fixup :call s:choose('fixup') +command! -buffer -bar Cycle :call s:cycle() +" The above are more useful when they are mapped; for example: +"nnoremap S :Cycle + +if exists("g:no_plugin_maps") || exists("g:no_gitrebase_maps") + finish +endif + +nnoremap K col('.') < 7 && expand('cword>') =~ '\X' && getline('.') =~ '^\w\+\s\+\x\+\>' ? 'wK' : 'K' + +let b:undo_ftplugin = b:undo_ftplugin . "|nunmap K" diff --git a/runtime/ftplugin/gitsendemail.vim b/runtime/ftplugin/gitsendemail.vim new file mode 100644 index 0000000000..8fb436e181 --- /dev/null +++ b/runtime/ftplugin/gitsendemail.vim @@ -0,0 +1,6 @@ +" Vim filetype plugin +" Language: git send-email message +" Maintainer: Tim Pope +" Last Change: 2009 Dec 24 + +runtime! ftplugin/mail.vim diff --git a/runtime/ftplugin/gpg.vim b/runtime/ftplugin/gpg.vim new file mode 100644 index 0000000000..5caa1f69c1 --- /dev/null +++ b/runtime/ftplugin/gpg.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin file +" Language: gpg(1) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/gprof.vim b/runtime/ftplugin/gprof.vim new file mode 100644 index 0000000000..750751c372 --- /dev/null +++ b/runtime/ftplugin/gprof.vim @@ -0,0 +1,32 @@ +" Language: gprof +" Maintainer: Dominique Pelle +" Last Change: 2013 Jun 09 + +" When cursor is on one line of the gprof call graph, +" calling this function jumps to this function in the call graph. +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin=1 + +fun! GprofJumpToFunctionIndex() + let l:line = getline('.') + if l:line =~ '[\d\+\]$' + " We're in a line in the call graph. + norm! $y% + call search('^' . escape(@", '[]'), 'sw') + norm! zz + elseif l:line =~ '^\(\s\+[0-9\.]\+\)\{3}\s\+' + " We're in line in the flat profile. + norm! 55|eby$ + call search('^\[\d\+\].*\d\s\+' . escape(@", '[]*.') . '\>', 'sW') + norm! zz + endif +endfun + +" Pressing on a line in the gprof flat profile or in +" the call graph, jumps to the corresponding function inside +" the flat profile. +map :call GprofJumpToFunctionIndex() + +" vim:sw=2 fdm=indent diff --git a/runtime/ftplugin/group.vim b/runtime/ftplugin/group.vim new file mode 100644 index 0000000000..eef3cd68d9 --- /dev/null +++ b/runtime/ftplugin/group.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin file +" Language: group(5) user group file +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments= commentstring= formatoptions-=tcroq formatoptions+=l + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/grub.vim b/runtime/ftplugin/grub.vim new file mode 100644 index 0000000000..21c4e3609d --- /dev/null +++ b/runtime/ftplugin/grub.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin file +" Language: grub(8) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/haml.vim b/runtime/ftplugin/haml.vim new file mode 100644 index 0000000000..654f1fca90 --- /dev/null +++ b/runtime/ftplugin/haml.vim @@ -0,0 +1,69 @@ +" Vim filetype plugin +" Language: Haml +" Maintainer: Tim Pope +" Last Change: 2013 Jun 01 + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +let s:save_cpo = &cpo +set cpo-=C + +" Define some defaults in case the included ftplugins don't set them. +let s:undo_ftplugin = "" +let s:browsefilter = "All Files (*.*)\t*.*\n" +let s:match_words = "" + +runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim +unlet! b:did_ftplugin +set matchpairs-=<:> + +" Override our defaults if these were set by an included ftplugin. +if exists("b:undo_ftplugin") + let s:undo_ftplugin = b:undo_ftplugin + unlet b:undo_ftplugin +endif +if exists("b:browsefilter") + let s:browsefilter = b:browsefilter + unlet b:browsefilter +endif +if exists("b:match_words") + let s:match_words = b:match_words + unlet b:match_words +endif + +runtime! ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim +let b:did_ftplugin = 1 + +" Combine the new set of values with those previously included. +if exists("b:undo_ftplugin") + let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin +endif +if exists ("b:browsefilter") + let s:browsefilter = substitute(b:browsefilter,'\cAll Files (\*\.\*)\t\*\.\*\n','','') . s:browsefilter +endif +if exists("b:match_words") + let s:match_words = b:match_words . ',' . s:match_words +endif + +" Change the browse dialog on Win32 to show mainly Haml-related files +if has("gui_win32") + let b:browsefilter="Haml Files (*.haml)\t*.haml\nSass Files (*.sass)\t*.sass\n" . s:browsefilter +endif + +" Load the combined list of match_words for matchit.vim +if exists("loaded_matchit") + let b:match_words = s:match_words +endif + +setlocal comments= commentstring=-#\ %s + +let b:undo_ftplugin = "setl cms< com< " + \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim:set sw=2: diff --git a/runtime/ftplugin/hamster.vim b/runtime/ftplugin/hamster.vim new file mode 100644 index 0000000000..c23adc4232 --- /dev/null +++ b/runtime/ftplugin/hamster.vim @@ -0,0 +1,62 @@ +" Vim filetype plugin +" Language: Hamster Script +" Version: 2.0.6.0 +" Maintainer: David Fishburn +" Last Change: Wed Nov 08 2006 12:03:09 PM + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo-=C + +let b:undo_ftplugin = "setl fo< com< tw< commentstring<" + \ . "| unlet! b:match_ignorecase b:match_words b:match_skip" + +" Set 'formatoptions' to break comment lines but not other lines, +" and insert the comment leader when hitting or using "o". +setlocal fo-=t fo+=croql + +" Use the # sign for comments +setlocal comments=:# + +" Format comments to be up to 78 characters long +if &tw == 0 + setlocal tw=78 +endif + +" Comments start with a double quote +setlocal commentstring=#%s + +" Move around functions. +noremap [[ :call search('^\s*sub\>', "bW") +noremap ]] :call search('^\s*sub\>', "W") +noremap [] :call search('^\s*endsub\>', "bW") +noremap ][ :call search('^\s*endsub\>', "W") + +" Move around comments +noremap ]# :call search('^\s*#\@!', "W") +noremap [# :call search('^\s*#\@!', "bW") + +" Let the matchit plugin know what items can be matched. +if exists("loaded_matchit") + let b:match_ignorecase = 0 + let b:match_words = + \ '\:\:\,' . + \ '\:\:\:\,' . + \ '\:\:\' + + " Ignore ":syntax region" commands, the 'end' argument clobbers if-endif + " let b:match_skip = 'getline(".") =~ "^\\s*sy\\%[ntax]\\s\\+region" || + " \ synIDattr(synID(line("."),col("."),1),"name") =~? "comment\\|string"' +endif + +setlocal ignorecase +let &cpo = s:cpo_save +unlet s:cpo_save +setlocal cpo+=M " makes \%( match \) diff --git a/runtime/ftplugin/haskell.vim b/runtime/ftplugin/haskell.vim new file mode 100644 index 0000000000..144f9f6860 --- /dev/null +++ b/runtime/ftplugin/haskell.vim @@ -0,0 +1,20 @@ +" Vim filetype plugin file +" Language: Haskell +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=s1fl:{-,mb:-,ex:-},:-- commentstring=--\ %s +setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/help.vim b/runtime/ftplugin/help.vim new file mode 100644 index 0000000000..a0a0f292eb --- /dev/null +++ b/runtime/ftplugin/help.vim @@ -0,0 +1,22 @@ +" Vim filetype plugin file +" Language: Vim help file +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl fo< tw< cole< cocu<" + +setlocal formatoptions+=tcroql textwidth=78 +if has("conceal") + setlocal cole=2 cocu=nc +endif + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/hostconf.vim b/runtime/ftplugin/hostconf.vim new file mode 100644 index 0000000000..557fd82c53 --- /dev/null +++ b/runtime/ftplugin/hostconf.vim @@ -0,0 +1,18 @@ +" Vim filetype plugin file +" Maintainer: Nikolai Weibull +" Latest Revision: 2007-12-04 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/hostsaccess.vim b/runtime/ftplugin/hostsaccess.vim new file mode 100644 index 0000000000..a2f55acb8a --- /dev/null +++ b/runtime/ftplugin/hostsaccess.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin file +" Language: hosts_access(5) control file +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/html.vim b/runtime/ftplugin/html.vim new file mode 100644 index 0000000000..7579080ea5 --- /dev/null +++ b/runtime/ftplugin/html.vim @@ -0,0 +1,51 @@ +" Vim filetype plugin file +" Language: html +" Maintainer: Dan Sharp +" Last Changed: 20 Jan 2009 +" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin + +if exists("b:did_ftplugin") | finish | endif +let b:did_ftplugin = 1 + +" Make sure the continuation lines below do not cause problems in +" compatibility mode. +let s:save_cpo = &cpo +set cpo-=C + +setlocal matchpairs+=<:> +setlocal commentstring= +setlocal comments=s: + +if exists("g:ft_html_autocomment") && (g:ft_html_autocomment == 1) + setlocal formatoptions-=t formatoptions+=croql +endif + +if exists('&omnifunc') + setlocal omnifunc=htmlcomplete#CompleteTags + call htmlcomplete#DetectOmniFlavor() +endif + +" HTML: thanks to Johannes Zellner and Benji Fisher. +if exists("loaded_matchit") + let b:match_ignorecase = 1 + let b:match_words = '<:>,' . + \ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' . + \ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' . + \ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>' +endif + +" Change the :browse e filter to primarily show HTML-related files. +if has("gui_win32") + let b:browsefilter="HTML Files (*.html,*.htm)\t*.htm;*.html\n" . + \ "JavaScript Files (*.js)\t*.js\n" . + \ "Cascading StyleSheets (*.css)\t*.css\n" . + \ "All Files (*.*)\t*.*\n" +endif + +" Undo the stuff we changed. +let b:undo_ftplugin = "setlocal commentstring< matchpairs< omnifunc< comments< formatoptions<" . + \ " | unlet! b:match_ignorecase b:match_skip b:match_words b:browsefilter" + +" Restore the saved compatibility options. +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/runtime/ftplugin/htmldjango.vim b/runtime/ftplugin/htmldjango.vim new file mode 100644 index 0000000000..40e9429f36 --- /dev/null +++ b/runtime/ftplugin/htmldjango.vim @@ -0,0 +1,13 @@ +" Vim filetype plugin file +" Language: Django HTML template +" Maintainer: Dave Hodder +" Last Change: 2007 Jan 25 + +" Only use this filetype plugin when no other was loaded. +if exists("b:did_ftplugin") + finish +endif + +" Use HTML and Django template ftplugins. +runtime! ftplugin/html.vim +runtime! ftplugin/django.vim diff --git a/runtime/ftplugin/indent.vim b/runtime/ftplugin/indent.vim new file mode 100644 index 0000000000..0e195b0615 --- /dev/null +++ b/runtime/ftplugin/indent.vim @@ -0,0 +1,20 @@ +" Vim filetype plugin file +" Language: indent(1) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=s1:/*,mb:*,ex:*/ commentstring& +setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/initex.vim b/runtime/ftplugin/initex.vim new file mode 100644 index 0000000000..0ee3e8d899 --- /dev/null +++ b/runtime/ftplugin/initex.vim @@ -0,0 +1,39 @@ +" filetype plugin for TeX and variants +" Language: TeX (ft=initex) +" Maintainer: Benji Fisher, Ph.D. +" Version: 1.0 +" Last Change: Wed 19 Apr 2006 + +" Only do this when not done yet for this buffer. +if exists("b:did_ftplugin") + finish +endif + +" Don't load another plugin for this buffer. +let b:did_ftplugin = 1 + +" Avoid problems if running in 'compatible' mode. +let s:save_cpo = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< define< include< sua<" + +" Set 'comments' to format dashed lists in comments +setlocal com=sO:%\ -,mO:%\ \ ,eO:%%,:% + +" Set 'commentstring' to recognize the % comment character: +" (Thanks to Ajit Thakkar.) +setlocal cms=%%s + +" Allow "[d" to be used to find a macro definition: +let &l:define='\\\([egx]\|char\|mathchar\|count\|dimen\|muskip\|skip\|toks\)\=' + \ . 'def\|\\font\|\\\(future\)\=let' + +" Tell Vim to recognize \input bar : +let &l:include = '\\input' +setlocal suffixesadd=.tex + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim:sts=2:sw=2: diff --git a/runtime/ftplugin/ishd.vim b/runtime/ftplugin/ishd.vim new file mode 100644 index 0000000000..33ef1510b5 --- /dev/null +++ b/runtime/ftplugin/ishd.vim @@ -0,0 +1,33 @@ +" Vim filetype plugin file +" Language: InstallShield (ft=ishd) +" Maintainer: Johannes Zellner +" Last Change: Sat, 24 May 2003 11:55:36 CEST + +if exists("b:did_ftplugin") | finish | endif +let b:did_ftplugin = 1 + +setlocal foldmethod=syntax + +" Using line continuation here. +let s:cpo_save = &cpo +set cpo-=C + +" matchit support +if exists("loaded_matchit") + let b:match_ignorecase=0 + let b:match_words= + \ '\%(^\s*\)\@<=\\s\+[^()]\+\s*(:\%(^\s*\)\@<=\\s*$:\%(^\s*\)\@<=\:\%(^\s*\)\@<=\\s*;\s*$,' . + \ '\%(^\s*\)\@<=\\s*$:\%(^\s*\)\@<=\\s\+.\{-}\s*;\s*$,' . + \ '\%(^\s*\)\@<=\\s*(.\{-}):\%(^\s*\)\@<=\<\%(case\|default\)\>:\%(^\s*\)\@<=\\s*;\s*$,' . + \ '\%(^\s*\)\@<=\\s*(.\{-}):\%(^\s*\)\@<=\\s*;\s*$,' . + \ '\%(^\s*\)\@<=\.\{-}\<\%(to\|downto\)\>:\%(^\s*\)\@<=\\s*;\s*$,' . + \ '\%(^\s*\)\@<=\\s*(.\{-})\s*then:\%(^\s*\)\@<=\\s*([^)]*)\s*then:\%(^\s*\)\@<=\:\%(^\s*\)\@<=\\s*;\s*$' +endif + +if has("gui_win32") && !exists("b:browsefilter") + let b:browsefilter = "InstallShield Files (*.rul)\t*.rul\n" . + \ "All Files (*.*)\t*.*\n" +endif + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/j.vim b/runtime/ftplugin/j.vim new file mode 100644 index 0000000000..bcd606ffa0 --- /dev/null +++ b/runtime/ftplugin/j.vim @@ -0,0 +1,75 @@ +" Vim filetype plugin +" Language: J +" Maintainer: David Bürgin <676c7473@gmail.com> +" URL: https://github.com/glts/vim-j +" Last Change: 2014-04-05 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +let s:save_cpo = &cpo +set cpo&vim + +setlocal iskeyword=48-57,A-Z,_,a-z +setlocal comments=:NB. +setlocal commentstring=NB.\ %s +setlocal formatoptions-=t +setlocal shiftwidth=2 softtabstop=2 expandtab +setlocal matchpairs=(:) + +let b:undo_ftplugin = 'setlocal matchpairs< expandtab< softtabstop< shiftwidth< formatoptions< commentstring< comments< iskeyword<' + +" Section movement with ]] ][ [[ []. The start/end patterns below are amended +" inside the function in order to avoid matching on the current cursor line. +let s:sectionstart = '.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>.*' +let s:sectionend = '\s*)\s*' + +function! s:SearchSection(end, backwards, visualmode) abort + if a:visualmode !=# '' + normal! gv + endif + let flags = a:backwards ? 'bsW' : 'sW' + if a:end + call search('^' . s:sectionend . (a:backwards ? '\n\_.\{-}\%#' : '$'), flags) + else + call search('^' . s:sectionstart . (a:backwards ? '\n\_.\{-}\%#' : '$'), flags) + endif +endfunction + +noremap ' + let b:InPHPcode = 0 + let b:InPHPcode_tofind = s:PHP_startindenttag + endif + endif " }}} + + + if !b:InPHPcode && !b:InPHPcode_and_script + return -1 + endif + + " Indent successive // or # comment the same way the first is {{{ + let addSpecial = 0 + if cline =~ '^\s*\%(//\|#\|/\*.*\*/\s*$\)' + let addSpecial = b:PHP_outdentSLComments + if b:PHP_LastIndentedWasComment == 1 + return indent(real_PHP_lastindented) + endif + let b:PHP_LastIndentedWasComment = 1 + else + let b:PHP_LastIndentedWasComment = 0 + endif " }}} + + " Indent multiline /* comments correctly {{{ + + if b:PHP_InsideMultilineComment || b:UserIsTypingComment + if cline =~ '^\s*\*\%(\/\)\@!' + if last_line =~ '^\s*/\*' + return indent(lnum) + 1 + else + return indent(lnum) + endif + else + let b:PHP_InsideMultilineComment = 0 + endif + endif + + if !b:PHP_InsideMultilineComment && cline =~ '^\s*/\*' && cline !~ '\*/\s*$' + if getline(v:lnum + 1) !~ '^\s*\*' + return -1 + endif + let b:PHP_InsideMultilineComment = 1 + endif " }}} + + + " Things always indented at col 1 (PHP delimiter: , Heredoc end) {{{ + if cline =~# '^\s*' && b:PHP_outdentphpescape + return 0 + endif + + if cline =~ '^\s*?>' && cline !~# '\)'.endline + + if ind != b:PHP_default_indenting && cline =~# '^\s*else\%(if\)\=\>' + let b:PHP_CurrentIndentLevel = b:PHP_default_indenting + return indent(FindTheIfOfAnElse(v:lnum, 1)) + elseif cline =~# s:defaultORcase + return FindTheSwitchIndent(v:lnum) + &sw * b:PHP_vintage_case_default_indent + elseif cline =~ '^\s*)\=\s*{' + let previous_line = last_line + let last_line_num = lnum + + while last_line_num > 1 + + if previous_line =~ terminated || previous_line =~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . endline + + let ind = indent(last_line_num) + + if b:PHP_BracesAtCodeLevel + let ind = ind + &sw + endif + + return ind + endif + + let last_line_num = GetLastRealCodeLNum(last_line_num - 1) + let previous_line = getline(last_line_num) + endwhile + + elseif last_line =~# unstated && cline !~ '^\s*);\='.endline + let ind = ind + &sw " we indent one level further when the preceding line is not stated + return ind + addSpecial + + elseif (ind != b:PHP_default_indenting || last_line =~ '^[)\]]' ) && last_line =~ terminated " Added || last_line =~ '^)' on 2007-12-30 (array indenting problem broke other things) + let previous_line = last_line + let last_line_num = lnum + let LastLineClosed = 1 + + let isSingleLineBlock = 0 + while 1 + if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline " XXX + + call cursor(last_line_num, 1) + if previous_line !~ '^}' + call search('}\|;\s*}'.endline, 'W') + end + let oldLastLine = last_line_num + let last_line_num = searchpair('{', '', '}', 'bW', 'Skippmatch()') + + if getline(last_line_num) =~ '^\s*{' + let last_line_num = GetLastRealCodeLNum(last_line_num - 1) + elseif oldLastLine == last_line_num + let isSingleLineBlock = 1 + continue + endif + + let previous_line = getline(last_line_num) + + continue + else + let isSingleLineBlock = 0 + + if getline(last_line_num) =~# '^\s*else\%(if\)\=\>' + let last_line_num = FindTheIfOfAnElse(last_line_num, 0) + continue + endif + + + let last_match = last_line_num + + let one_ahead_indent = indent(last_line_num) + let last_line_num = GetLastRealCodeLNum(last_line_num - 1) + let two_ahead_indent = indent(last_line_num) + let after_previous_line = previous_line + let previous_line = getline(last_line_num) + + + if previous_line =~# s:defaultORcase.'\|{'.endline + break + endif + + if after_previous_line=~# '^\s*'.s:blockstart.'.*)'.endline && previous_line =~# '[;}]'.endline + break + endif + + if one_ahead_indent == two_ahead_indent || last_line_num < 1 + if previous_line =~# '\%(;\|^\s*}\)'.endline || last_line_num < 1 + break + endif + endif + endif + endwhile + + if indent(last_match) != ind + let ind = indent(last_match) + let b:PHP_CurrentIndentLevel = b:PHP_default_indenting + + return ind + addSpecial + endif + endif + + let plinnum = GetLastRealCodeLNum(lnum - 1) + let AntepenultimateLine = getline(plinnum) + + let last_line = substitute(last_line,"\\(//\\|#\\)\\(\\(\\([^\"']*\\([\"']\\)[^\"']*\\5\\)\\+[^\"']*$\\)\\|\\([^\"']*$\\)\\)",'','') + + + if ind == b:PHP_default_indenting + if last_line =~ terminated + let LastLineClosed = 1 + endif + endif + + if !LastLineClosed + + + if last_line =~# '[{(\[]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(]'.endline + + let dontIndent = 0 + if last_line =~ '\S\+\s*{'.endline && last_line !~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline + let dontIndent = 1 + endif + + if !dontIndent && (!b:PHP_BracesAtCodeLevel || last_line !~# '^\s*{') + let ind = ind + &sw + endif + + if b:PHP_BracesAtCodeLevel || b:PHP_vintage_case_default_indent == 1 + let b:PHP_CurrentIndentLevel = ind + + return ind + addSpecial + endif + + elseif last_line =~ '\S\+\s*),'.endline + call cursor(lnum, 1) + call search('),'.endline, 'W') " line never begins with ) so no need for 'c' flag + let openedparent = searchpair('(', '', ')', 'bW', 'Skippmatch()') + if openedparent != lnum + let ind = indent(openedparent) + endif + + elseif last_line =~ '^\s*'.s:blockstart + let ind = ind + &sw + + + elseif AntepenultimateLine =~ '\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\|{\)'.endline . '\|' . s:defaultORcase + let ind = ind + &sw + endif + + endif + + if cline =~ '^\s*[)\]];\=' + let ind = ind - &sw + endif + + let b:PHP_CurrentIndentLevel = ind + return ind + addSpecial +endfunction diff --git a/runtime/indent/postscr.vim b/runtime/indent/postscr.vim new file mode 100644 index 0000000000..b0ff48e682 --- /dev/null +++ b/runtime/indent/postscr.vim @@ -0,0 +1,68 @@ +" PostScript indent file +" Language: PostScript +" Maintainer: Mike Williams +" Last Change: 2nd July 2001 +" + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal indentexpr=PostscrIndentGet(v:lnum) +setlocal indentkeys+=0],0=>>,0=%%,0=end,0=restore,0=grestore indentkeys-=:,0#,e + +" Catch multiple instantiations +if exists("*PostscrIndentGet") + finish +endif + +function! PostscrIndentGet(lnum) + " Find a non-empty non-comment line above the current line. + " Note: ignores DSC comments as well! + let lnum = a:lnum - 1 + while lnum != 0 + let lnum = prevnonblank(lnum) + if getline(lnum) !~ '^\s*%.*$' + break + endif + let lnum = lnum - 1 + endwhile + + " Hit the start of the file, use user indent. + if lnum == 0 + return -1 + endif + + " Start with the indent of the previous line + let ind = indent(lnum) + let pline = getline(lnum) + + " Indent for dicts, arrays, and saves with possible trailing comment + if pline =~ '\(begin\|<<\|g\=save\|{\|[\)\s*\(%.*\)\=$' + let ind = ind + &sw + endif + + " Remove indent for popped dicts, and restores. + if pline =~ '\(end\|g\=restore\)\s*$' + let ind = ind - &sw + + " Else handle immediate dedents of dicts, restores, and arrays. + elseif getline(a:lnum) =~ '\(end\|>>\|g\=restore\|}\|]\)' + let ind = ind - &sw + + " Else handle DSC comments - always start of line. + elseif getline(a:lnum) =~ '^\s*%%' + let ind = 0 + endif + + " For now catch excessive left indents if they occur. + if ind < 0 + let ind = -1 + endif + + return ind +endfunction + +" vim:sw=2 diff --git a/runtime/indent/pov.vim b/runtime/indent/pov.vim new file mode 100644 index 0000000000..2b197635a1 --- /dev/null +++ b/runtime/indent/pov.vim @@ -0,0 +1,84 @@ +" Vim indent file +" Language: PoV-Ray Scene Description Language +" Maintainer: David Necas (Yeti) +" Last Change: 2002-10-20 +" URI: http://trific.ath.cx/Ftp/vim/indent/pov.vim + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +" Some preliminary settings. +setlocal nolisp " Make sure lisp indenting doesn't supersede us. + +setlocal indentexpr=GetPoVRayIndent() +setlocal indentkeys+==else,=end,0] + +" Only define the function once. +if exists("*GetPoVRayIndent") + finish +endif + +" Counts matches of a regexp in line number . +" Doesn't count matches inside strings and comments (as defined by current +" syntax). +function! s:MatchCount(line, rexp) + let str = getline(a:line) + let i = 0 + let n = 0 + while i >= 0 + let i = matchend(str, a:rexp, i) + if i >= 0 && synIDattr(synID(a:line, i, 0), "name") !~? "string\|comment" + let n = n + 1 + endif + endwhile + return n +endfunction + +" The main function. Returns indent amount. +function GetPoVRayIndent() + " If we are inside a comment (may be nested in obscure ways), give up + if synIDattr(synID(v:lnum, indent(v:lnum)+1, 0), "name") =~? "string\|comment" + return -1 + endif + + " Search backwards for the frist non-empty, non-comment line. + let plnum = prevnonblank(v:lnum - 1) + let plind = indent(plnum) + while plnum > 0 && synIDattr(synID(plnum, plind+1, 0), "name") =~? "comment" + let plnum = prevnonblank(plnum - 1) + let plind = indent(plnum) + endwhile + + " Start indenting from zero + if plnum == 0 + return 0 + endif + + " Analyse previous nonempty line. + let chg = 0 + let chg = chg + s:MatchCount(plnum, '[[{(]') + let chg = chg + s:MatchCount(plnum, '#\s*\%(if\|ifdef\|ifndef\|switch\|while\|macro\|else\)\>') + let chg = chg - s:MatchCount(plnum, '#\s*end\>') + let chg = chg - s:MatchCount(plnum, '[]})]') + " Dirty hack for people writing #if and #else on the same line. + let chg = chg - s:MatchCount(plnum, '#\s*\%(if\|ifdef\|ifndef\|switch\)\>.*#\s*else\>') + " When chg > 0, then we opened groups and we should indent more, but when + " chg < 0, we closed groups and this already affected the previous line, + " so we should not dedent. And when everything else fails, scream. + let chg = chg > 0 ? chg : 0 + + " Analyse current line + " FIXME: If we have to dedent, we should try to find the indentation of the + " opening line. + let cur = s:MatchCount(v:lnum, '^\s*\%(#\s*\%(end\|else\)\>\|[]})]\)') + if cur > 0 + let final = plind + (chg - cur) * &sw + else + let final = plind + chg * &sw + endif + + return final < 0 ? 0 : final +endfunction diff --git a/runtime/indent/prolog.vim b/runtime/indent/prolog.vim new file mode 100644 index 0000000000..afe448e8f3 --- /dev/null +++ b/runtime/indent/prolog.vim @@ -0,0 +1,58 @@ +" vim: set sw=4 sts=4: +" Maintainer : Gergely Kontra +" Revised on : 2002.02.18. 23:34:05 +" Language : Prolog + +" TODO: +" checking with respect to syntax highlighting +" ignoring multiline comments +" detecting multiline strings + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif + +let b:did_indent = 1 + +setlocal indentexpr=GetPrologIndent() +setlocal indentkeys-=:,0# +setlocal indentkeys+=0%,-,0;,>,0) + +" Only define the function once. +"if exists("*GetPrologIndent") +" finish +"endif + +function! GetPrologIndent() + " Find a non-blank line above the current line. + let pnum = prevnonblank(v:lnum - 1) + " Hit the start of the file, use zero indent. + if pnum == 0 + return 0 + endif + let line = getline(v:lnum) + let pline = getline(pnum) + + let ind = indent(pnum) + " Previous line was comment -> use previous line's indent + if pline =~ '^\s*%' + retu ind + endif + " Check for clause head on previous line + if pline =~ ':-\s*\(%.*\)\?$' + let ind = ind + &sw + " Check for end of clause on previous line + elseif pline =~ '\.\s*\(%.*\)\?$' + let ind = ind - &sw + endif + " Check for opening conditional on previous line + if pline =~ '^\s*\([(;]\|->\)' + let ind = ind + &sw + endif + " Check for closing an unclosed paren, or middle ; or -> + if line =~ '^\s*\([);]\|->\)' + let ind = ind - &sw + endif + return ind +endfunction diff --git a/runtime/indent/pyrex.vim b/runtime/indent/pyrex.vim new file mode 100644 index 0000000000..a1a1746672 --- /dev/null +++ b/runtime/indent/pyrex.vim @@ -0,0 +1,13 @@ +" Vim indent file +" Language: Pyrex +" Maintainer: Marco Barisione +" URL: http://marcobari.altervista.org/pyrex_vim.html +" Last Change: 2005 Jun 24 + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif + +" Use Python formatting rules +runtime! indent/python.vim diff --git a/runtime/indent/python.vim b/runtime/indent/python.vim new file mode 100644 index 0000000000..4ce3c234a5 --- /dev/null +++ b/runtime/indent/python.vim @@ -0,0 +1,198 @@ +" Vim indent file +" Language: Python +" Maintainer: Bram Moolenaar +" Original Author: David Bustos +" Last Change: 2013 Jul 9 + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +" Some preliminary settings +setlocal nolisp " Make sure lisp indenting doesn't supersede us +setlocal autoindent " indentexpr isn't much help otherwise + +setlocal indentexpr=GetPythonIndent(v:lnum) +setlocal indentkeys+=<:>,=elif,=except + +" Only define the function once. +if exists("*GetPythonIndent") + finish +endif +let s:keepcpo= &cpo +set cpo&vim + +" Come here when loading the script the first time. + +let s:maxoff = 50 " maximum number of lines to look backwards for () + +function GetPythonIndent(lnum) + + " If this line is explicitly joined: If the previous line was also joined, + " line it up with that one, otherwise add two 'shiftwidth' + if getline(a:lnum - 1) =~ '\\$' + if a:lnum > 1 && getline(a:lnum - 2) =~ '\\$' + return indent(a:lnum - 1) + endif + return indent(a:lnum - 1) + (exists("g:pyindent_continue") ? eval(g:pyindent_continue) : (shiftwidth() * 2)) + endif + + " If the start of the line is in a string don't change the indent. + if has('syntax_items') + \ && synIDattr(synID(a:lnum, 1, 1), "name") =~ "String$" + return -1 + endif + + " Search backwards for the previous non-empty line. + let plnum = prevnonblank(v:lnum - 1) + + if plnum == 0 + " This is the first non-empty line, use zero indent. + return 0 + endif + + " If the previous line is inside parenthesis, use the indent of the starting + " line. + " Trick: use the non-existing "dummy" variable to break out of the loop when + " going too far back. + call cursor(plnum, 1) + let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW', + \ "line('.') < " . (plnum - s:maxoff) . " ? dummy :" + \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" + \ . " =~ '\\(Comment\\|Todo\\|String\\)$'") + if parlnum > 0 + let plindent = indent(parlnum) + let plnumstart = parlnum + else + let plindent = indent(plnum) + let plnumstart = plnum + endif + + + " When inside parenthesis: If at the first line below the parenthesis add + " two 'shiftwidth', otherwise same as previous line. + " i = (a + " + b + " + c) + call cursor(a:lnum, 1) + let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', + \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" + \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" + \ . " =~ '\\(Comment\\|Todo\\|String\\)$'") + if p > 0 + if p == plnum + " When the start is inside parenthesis, only indent one 'shiftwidth'. + let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', + \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" + \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" + \ . " =~ '\\(Comment\\|Todo\\|String\\)$'") + if pp > 0 + return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth()) + endif + return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (shiftwidth() * 2)) + endif + if plnumstart == p + return indent(plnum) + endif + return plindent + endif + + + " Get the line and remove a trailing comment. + " Use syntax highlighting attributes when possible. + let pline = getline(plnum) + let pline_len = strlen(pline) + if has('syntax_items') + " If the last character in the line is a comment, do a binary search for + " the start of the comment. synID() is slow, a linear search would take + " too long on a long line. + if synIDattr(synID(plnum, pline_len, 1), "name") =~ "\\(Comment\\|Todo\\)$" + let min = 1 + let max = pline_len + while min < max + let col = (min + max) / 2 + if synIDattr(synID(plnum, col, 1), "name") =~ "\\(Comment\\|Todo\\)$" + let max = col + else + let min = col + 1 + endif + endwhile + let pline = strpart(pline, 0, min - 1) + endif + else + let col = 0 + while col < pline_len + if pline[col] == '#' + let pline = strpart(pline, 0, col) + break + endif + let col = col + 1 + endwhile + endif + + " If the previous line ended with a colon, indent this line + if pline =~ ':\s*$' + return plindent + shiftwidth() + endif + + " If the previous line was a stop-execution statement... + if getline(plnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\)\>' + " See if the user has already dedented + if indent(a:lnum) > indent(plnum) - shiftwidth() + " If not, recommend one dedent + return indent(plnum) - shiftwidth() + endif + " Otherwise, trust the user + return -1 + endif + + " If the current line begins with a keyword that lines up with "try" + if getline(a:lnum) =~ '^\s*\(except\|finally\)\>' + let lnum = a:lnum - 1 + while lnum >= 1 + if getline(lnum) =~ '^\s*\(try\|except\)\>' + let ind = indent(lnum) + if ind >= indent(a:lnum) + return -1 " indent is already less than this + endif + return ind " line up with previous try or except + endif + let lnum = lnum - 1 + endwhile + return -1 " no matching "try"! + endif + + " If the current line begins with a header keyword, dedent + if getline(a:lnum) =~ '^\s*\(elif\|else\)\>' + + " Unless the previous line was a one-liner + if getline(plnumstart) =~ '^\s*\(for\|if\|try\)\>' + return plindent + endif + + " Or the user has already dedented + if indent(a:lnum) <= plindent - shiftwidth() + return -1 + endif + + return plindent - shiftwidth() + endif + + " When after a () construct we probably want to go back to the start line. + " a = (b + " + c) + " here + if parlnum > 0 + return plindent + endif + + return -1 + +endfunction + +let &cpo = s:keepcpo +unlet s:keepcpo + +" vim:sw=2 diff --git a/runtime/indent/r.vim b/runtime/indent/r.vim new file mode 100644 index 0000000000..82bdc8bba4 --- /dev/null +++ b/runtime/indent/r.vim @@ -0,0 +1,492 @@ +" Vim indent file +" Language: R +" Author: Jakson Alves de Aquino +" Last Change: Fri Feb 15, 2013 08:11PM + + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal indentkeys=0{,0},:,!^F,o,O,e +setlocal indentexpr=GetRIndent() + +" Only define the function once. +if exists("*GetRIndent") + finish +endif + +" Options to make the indentation more similar to Emacs/ESS: +if !exists("g:r_indent_align_args") + let g:r_indent_align_args = 1 +endif +if !exists("g:r_indent_ess_comments") + let g:r_indent_ess_comments = 0 +endif +if !exists("g:r_indent_comment_column") + let g:r_indent_comment_column = 40 +endif +if ! exists("g:r_indent_ess_compatible") + let g:r_indent_ess_compatible = 0 +endif + +function s:RDelete_quotes(line) + let i = 0 + let j = 0 + let line1 = "" + let llen = strlen(a:line) + while i < llen + if a:line[i] == '"' + let i += 1 + let line1 = line1 . 's' + while !(a:line[i] == '"' && ((i > 1 && a:line[i-1] == '\' && a:line[i-2] == '\') || a:line[i-1] != '\')) && i < llen + let i += 1 + endwhile + if a:line[i] == '"' + let i += 1 + endif + else + if a:line[i] == "'" + let i += 1 + let line1 = line1 . 's' + while !(a:line[i] == "'" && ((i > 1 && a:line[i-1] == '\' && a:line[i-2] == '\') || a:line[i-1] != '\')) && i < llen + let i += 1 + endwhile + if a:line[i] == "'" + let i += 1 + endif + else + if a:line[i] == "`" + let i += 1 + let line1 = line1 . 's' + while a:line[i] != "`" && i < llen + let i += 1 + endwhile + if a:line[i] == "`" + let i += 1 + endif + endif + endif + endif + if i == llen + break + endif + let line1 = line1 . a:line[i] + let j += 1 + let i += 1 + endwhile + return line1 +endfunction + +" Convert foo(bar()) int foo() +function s:RDelete_parens(line) + if s:Get_paren_balance(a:line, "(", ")") != 0 + return a:line + endif + let i = 0 + let j = 0 + let line1 = "" + let llen = strlen(a:line) + while i < llen + let line1 = line1 . a:line[i] + if a:line[i] == '(' + let nop = 1 + while nop > 0 && i < llen + let i += 1 + if a:line[i] == ')' + let nop -= 1 + else + if a:line[i] == '(' + let nop += 1 + endif + endif + endwhile + let line1 = line1 . a:line[i] + endif + let i += 1 + endwhile + return line1 +endfunction + +function! s:Get_paren_balance(line, o, c) + let line2 = substitute(a:line, a:o, "", "g") + let openp = strlen(a:line) - strlen(line2) + let line3 = substitute(line2, a:c, "", "g") + let closep = strlen(line2) - strlen(line3) + return openp - closep +endfunction + +function! s:Get_matching_brace(linenr, o, c, delbrace) + let line = SanitizeRLine(getline(a:linenr)) + if a:delbrace == 1 + let line = substitute(line, '{$', "", "") + endif + let pb = s:Get_paren_balance(line, a:o, a:c) + let i = a:linenr + while pb != 0 && i > 1 + let i -= 1 + let pb += s:Get_paren_balance(SanitizeRLine(getline(i)), a:o, a:c) + endwhile + return i +endfunction + +" This function is buggy because there 'if's without 'else' +" It must be rewritten relying more on indentation +function! s:Get_matching_if(linenr, delif) +" let filenm = expand("%") +" call writefile([filenm], "/tmp/matching_if_" . a:linenr) + let line = SanitizeRLine(getline(a:linenr)) + if a:delif + let line = substitute(line, "if", "", "g") + endif + let elsenr = 0 + let i = a:linenr + let ifhere = 0 + while i > 0 + let line2 = substitute(line, '\', "xxx", "g") + let elsenr += strlen(line) - strlen(line2) + if line =~ '.*\s*if\s*()' || line =~ '.*\s*if\s*()' + let elsenr -= 1 + if elsenr == 0 + let ifhere = i + break + endif + endif + let i -= 1 + let line = SanitizeRLine(getline(i)) + endwhile + if ifhere + return ifhere + else + return a:linenr + endif +endfunction + +function! s:Get_last_paren_idx(line, o, c, pb) + let blc = a:pb + let line = substitute(a:line, '\t', s:curtabstop, "g") + let theidx = -1 + let llen = strlen(line) + let idx = 0 + while idx < llen + if line[idx] == a:o + let blc -= 1 + if blc == 0 + let theidx = idx + endif + else + if line[idx] == a:c + let blc += 1 + endif + endif + let idx += 1 + endwhile + return theidx + 1 +endfunction + +" Get previous relevant line. Search back until getting a line that isn't +" comment or blank +function s:Get_prev_line(lineno) + let lnum = a:lineno - 1 + let data = getline( lnum ) + while lnum > 0 && (data =~ '^\s*#' || data =~ '^\s*$') + let lnum = lnum - 1 + let data = getline( lnum ) + endwhile + return lnum +endfunction + +" This function is also used by r-plugin/common_global.vim +" Delete from '#' to the end of the line, unless the '#' is inside a string. +function SanitizeRLine(line) + let newline = s:RDelete_quotes(a:line) + let newline = s:RDelete_parens(newline) + let newline = substitute(newline, '#.*', "", "") + let newline = substitute(newline, '\s*$', "", "") + return newline +endfunction + +function GetRIndent() + + let clnum = line(".") " current line + + let cline = getline(clnum) + if cline =~ '^\s*#' + if g:r_indent_ess_comments == 1 + if cline =~ '^\s*###' + return 0 + endif + if cline !~ '^\s*##' + return g:r_indent_comment_column + endif + endif + endif + + let cline = SanitizeRLine(cline) + + if cline =~ '^\s*}' || cline =~ '^\s*}\s*)$' + let indline = s:Get_matching_brace(clnum, '{', '}', 1) + if indline > 0 && indline != clnum + let iline = SanitizeRLine(getline(indline)) + if s:Get_paren_balance(iline, "(", ")") == 0 || iline =~ '(\s*{$' + return indent(indline) + else + let indline = s:Get_matching_brace(indline, '(', ')', 1) + return indent(indline) + endif + endif + endif + + " Find the first non blank line above the current line + let lnum = s:Get_prev_line(clnum) + " Hit the start of the file, use zero indent. + if lnum == 0 + return 0 + endif + + let line = SanitizeRLine(getline(lnum)) + + if &filetype == "rhelp" + if cline =~ '^\\dontshow{' || cline =~ '^\\dontrun{' || cline =~ '^\\donttest{' || cline =~ '^\\testonly{' + return 0 + endif + if line =~ '^\\examples{' || line =~ '^\\usage{' || line =~ '^\\dontshow{' || line =~ '^\\dontrun{' || line =~ '^\\donttest{' || line =~ '^\\testonly{' + return 0 + endif + if line =~ '^\\method{.*}{.*}(.*' + let line = substitute(line, '^\\method{\(.*\)}{.*}', '\1', "") + endif + endif + + if cline =~ '^\s*{' + if g:r_indent_ess_compatible && line =~ ')$' + let nlnum = lnum + let nline = line + while s:Get_paren_balance(nline, '(', ')') < 0 + let nlnum = s:Get_prev_line(nlnum) + let nline = SanitizeRLine(getline(nlnum)) . nline + endwhile + if nline =~ '^\s*function\s*(' && indent(nlnum) == &sw + return 0 + endif + endif + if s:Get_paren_balance(line, "(", ")") == 0 + return indent(lnum) + endif + endif + + " line is an incomplete command: + if line =~ '\<\(if\|while\|for\|function\)\s*()$' || line =~ '\]$' || cline =~ '^\s*[,&|\-\*+<>]') + return indent(lnum) + endif + + if pb > 0 + if &filetype == "rhelp" + let ind = s:Get_last_paren_idx(line, '(', ')', pb) + else + let ind = s:Get_last_paren_idx(getline(lnum), '(', ')', pb) + endif + return ind + endif + + if pb < 0 && line =~ '.*[,&|\-\*+<>]$' + let lnum = s:Get_prev_line(lnum) + while pb < 1 && lnum > 0 + let line = SanitizeRLine(getline(lnum)) + let line = substitute(line, '\t', s:curtabstop, "g") + let ind = strlen(line) + while ind > 0 + if line[ind] == ')' + let pb -= 1 + else + if line[ind] == '(' + let pb += 1 + endif + endif + if pb == 1 + return ind + 1 + endif + let ind -= 1 + endwhile + let lnum -= 1 + endwhile + return 0 + endif + + if bb > 0 + let ind = s:Get_last_paren_idx(getline(lnum), '[', ']', bb) + return ind + endif + endif + + let post_block = 0 + if line =~ '}$' + let lnum = s:Get_matching_brace(lnum, '{', '}', 0) + let line = SanitizeRLine(getline(lnum)) + if lnum > 0 && line =~ '^\s*{' + let lnum = s:Get_prev_line(lnum) + let line = SanitizeRLine(getline(lnum)) + endif + let pb = s:Get_paren_balance(line, '(', ')') + let post_block = 1 + endif + + let post_fun = 0 + if pb < 0 && line !~ ')\s*[,&|\-\*+<>]$' + let post_fun = 1 + while pb < 0 && lnum > 0 + let lnum -= 1 + let linepiece = SanitizeRLine(getline(lnum)) + let pb += s:Get_paren_balance(linepiece, "(", ")") + let line = linepiece . line + endwhile + if line =~ '{$' && post_block == 0 + return indent(lnum) + &sw + endif + + " Now we can do some tests again + if cline =~ '^\s*{' + return indent(lnum) + endif + if post_block == 0 + let newl = SanitizeRLine(line) + if newl =~ '\<\(if\|while\|for\|function\)\s*()$' || newl =~ '\ 0 + let lnum -= 1 + let linepiece = SanitizeRLine(getline(lnum)) + let bb += s:Get_paren_balance(linepiece, "[", "]") + let line = linepiece . line + endwhile + let line = s:RDelete_parens(line) + endif + + let plnum = s:Get_prev_line(lnum) + let ppost_else = 0 + if plnum > 0 + let pline = SanitizeRLine(getline(plnum)) + let ppost_block = 0 + if pline =~ '}$' + let ppost_block = 1 + let plnum = s:Get_matching_brace(plnum, '{', '}', 0) + let pline = SanitizeRLine(getline(plnum)) + if pline =~ '^\s*{$' && plnum > 0 + let plnum = s:Get_prev_line(plnum) + let pline = SanitizeRLine(getline(plnum)) + endif + endif + + if pline =~ 'else$' + let ppost_else = 1 + let plnum = s:Get_matching_if(plnum, 0) + let pline = SanitizeRLine(getline(plnum)) + endif + + if pline =~ '^\s*else\s*if\s*(' + let pplnum = s:Get_prev_line(plnum) + let ppline = SanitizeRLine(getline(pplnum)) + while ppline =~ '^\s*else\s*if\s*(' || ppline =~ '^\s*if\s*()\s*\S$' + let plnum = pplnum + let pline = ppline + let pplnum = s:Get_prev_line(plnum) + let ppline = SanitizeRLine(getline(pplnum)) + endwhile + while ppline =~ '\<\(if\|while\|for\|function\)\s*()$' || ppline =~ '\ 0 + let plnum -= 1 + let linepiece = SanitizeRLine(getline(plnum)) + let ppb += s:Get_paren_balance(linepiece, "(", ")") + let pline = linepiece . pline + endwhile + let pline = s:RDelete_parens(pline) + endif + endif + + let ind = indent(lnum) + let pind = indent(plnum) + + if g:r_indent_align_args == 0 && pb != 0 + let ind += pb * &sw + return ind + endif + + if g:r_indent_align_args == 0 && bb != 0 + let ind += bb * &sw + return ind + endif + + if ind == pind || (ind == (pind + &sw) && pline =~ '{$' && ppost_else == 0) + return ind + endif + + let pline = getline(plnum) + let pbb = s:Get_paren_balance(pline, '[', ']') + + while pind < ind && plnum > 0 && ppb == 0 && pbb == 0 + let ind = pind + let plnum = s:Get_prev_line(plnum) + let pline = getline(plnum) + let ppb = s:Get_paren_balance(pline, '(', ')') + let pbb = s:Get_paren_balance(pline, '[', ']') + while pline =~ '^\s*else' + let plnum = s:Get_matching_if(plnum, 1) + let pline = getline(plnum) + let ppb = s:Get_paren_balance(pline, '(', ')') + let pbb = s:Get_paren_balance(pline, '[', ']') + endwhile + let pind = indent(plnum) + if ind == (pind + &sw) && pline =~ '{$' + return ind + endif + endwhile + + return ind + +endfunction + +" vim: sw=4 diff --git a/runtime/indent/readline.vim b/runtime/indent/readline.vim new file mode 100644 index 0000000000..6ac2185bdc --- /dev/null +++ b/runtime/indent/readline.vim @@ -0,0 +1,36 @@ +" Vim indent file +" Language: readline configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-12-20 + +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal indentexpr=GetReadlineIndent() +setlocal indentkeys=!^F,o,O,=$else,=$endif +setlocal nosmartindent + +if exists("*GetReadlineIndent") + finish +endif + +function GetReadlineIndent() + let lnum = prevnonblank(v:lnum - 1) + if lnum == 0 + return 0 + endif + + let ind = indent(lnum) + + if getline(lnum) =~ '^\s*$\(if\|else\)\>' + let ind = ind + &sw + endif + + if getline(v:lnum) =~ '^\s*$\(else\|endif\)\>' + let ind = ind - &sw + endif + + return ind +endfunction diff --git a/runtime/indent/rhelp.vim b/runtime/indent/rhelp.vim new file mode 100644 index 0000000000..8cc5fdae3b --- /dev/null +++ b/runtime/indent/rhelp.vim @@ -0,0 +1,111 @@ +" Vim indent file +" Language: R Documentation (Help), *.Rd +" Author: Jakson Alves de Aquino +" Last Change: Wed Jul 09, 2014 07:34PM + + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +runtime indent/r.vim +let s:RIndent = function(substitute(&indentexpr, "()", "", "")) +let b:did_indent = 1 + +setlocal indentkeys=0{,0},:,!^F,o,O,e +setlocal indentexpr=GetRHelpIndent() + +" Only define the function once. +if exists("*GetRHelpIndent") + finish +endif + +setlocal noautoindent +setlocal nocindent +setlocal nosmartindent +setlocal nolisp + +setlocal indentkeys=0{,0},:,!^F,o,O,e +setlocal indentexpr=GetCorrectRHelpIndent() + +function s:SanitizeRHelpLine(line) + let newline = substitute(a:line, '\\\\', "x", "g") + let newline = substitute(newline, '\\{', "x", "g") + let newline = substitute(newline, '\\}', "x", "g") + let newline = substitute(newline, '\\%', "x", "g") + let newline = substitute(newline, '%.*', "", "") + let newline = substitute(newline, '\s*$', "", "") + return newline +endfunction + +function GetRHelpIndent() + + let clnum = line(".") " current line + if clnum == 1 + return 0 + endif + let cline = getline(clnum) + + if cline =~ '^\s*}\s*$' + let i = clnum + let bb = -1 + while bb != 0 && i > 1 + let i -= 1 + let line = s:SanitizeRHelpLine(getline(i)) + let line2 = substitute(line, "{", "", "g") + let openb = strlen(line) - strlen(line2) + let line3 = substitute(line2, "}", "", "g") + let closeb = strlen(line2) - strlen(line3) + let bb += openb - closeb + endwhile + return indent(i) + endif + + if cline =~ '^\s*#ifdef\>' || cline =~ '^\s*#endif\>' + return 0 + endif + + let lnum = clnum - 1 + let line = getline(lnum) + if line =~ '^\s*#ifdef\>' || line =~ '^\s*#endif\>' + let lnum -= 1 + let line = getline(lnum) + endif + while lnum > 1 && (line =~ '^\s*$' || line =~ '^#ifdef' || line =~ '^#endif') + let lnum -= 1 + let line = getline(lnum) + endwhile + if lnum == 1 + return 0 + endif + let line = s:SanitizeRHelpLine(line) + let line2 = substitute(line, "{", "", "g") + let openb = strlen(line) - strlen(line2) + let line3 = substitute(line2, "}", "", "g") + let closeb = strlen(line2) - strlen(line3) + let bb = openb - closeb + + let ind = indent(lnum) + (bb * &sw) + + if line =~ '^\s*}\s*$' + let ind = indent(lnum) + endif + + if ind < 0 + return 0 + endif + + return ind +endfunction + +function GetCorrectRHelpIndent() + let lastsection = search('^\\[a-z]*{', "bncW") + let secname = getline(lastsection) + if secname =~ '^\\usage{' || secname =~ '^\\examples{' || secname =~ '^\\dontshow{' || secname =~ '^\\dontrun{' || secname =~ '^\\donttest{' || secname =~ '^\\testonly{' || secname =~ '^\\method{.*}{.*}(' + return s:RIndent() + else + return GetRHelpIndent() + endif +endfunction + +" vim: sw=2 diff --git a/runtime/indent/rmd.vim b/runtime/indent/rmd.vim new file mode 100644 index 0000000000..872790e7b1 --- /dev/null +++ b/runtime/indent/rmd.vim @@ -0,0 +1,46 @@ +" Vim indent file +" Language: Rmd +" Author: Jakson Alves de Aquino +" Last Change: Wed Jul 09, 2014 07:33PM + + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +runtime indent/r.vim +let s:RIndent = function(substitute(&indentexpr, "()", "", "")) +let b:did_indent = 1 + +setlocal indentkeys=0{,0},:,!^F,o,O,e +setlocal indentexpr=GetRmdIndent() + +if exists("*GetRmdIndent") + finish +endif + +function GetMdIndent() + let pline = getline(v:lnum - 1) + let cline = getline(v:lnum) + if prevnonblank(v:lnum - 1) < v:lnum - 1 || cline =~ '^\s*[-\+\*]\s' || cline =~ '^\s*\d\+\.\s\+' + return indent(v:lnum) + elseif pline =~ '^\s*[-\+\*]\s' + return indent(v:lnum - 1) + 2 + elseif pline =~ '^\s*\d\+\.\s\+' + return indent(v:lnum - 1) + 3 + endif + return indent(prevnonblank(v:lnum - 1)) +endfunction + +function GetRmdIndent() + if getline(".") =~ '^```{r .*}$' || getline(".") =~ '^```$' + return 0 + endif + if search('^```{r', "bncW") > search('^```$', "bncW") + return s:RIndent() + else + return GetMdIndent() + endif +endfunction + +" vim: sw=2 diff --git a/runtime/indent/rnoweb.vim b/runtime/indent/rnoweb.vim new file mode 100644 index 0000000000..e69542bd1a --- /dev/null +++ b/runtime/indent/rnoweb.vim @@ -0,0 +1,35 @@ +" Vim indent file +" Language: Rnoweb +" Author: Jakson Alves de Aquino +" Last Change: Wed Jul 09, 2014 07:28PM + + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +runtime indent/tex.vim +let s:TeXIndent = function(substitute(&indentexpr, "()", "", "")) +unlet b:did_indent +runtime indent/r.vim +let s:RIndent = function(substitute(&indentexpr, "()", "", "")) +let b:did_indent = 1 + +setlocal indentkeys=0{,0},!^F,o,O,e,},=\bibitem,=\item +setlocal indentexpr=GetRnowebIndent() + +if exists("*GetRnowebIndent") + finish +endif + +function GetRnowebIndent() + if getline(".") =~ "^<<.*>>=$" + return 0 + endif + if search("^<<", "bncW") > search("^@", "bncW") + return s:RIndent() + endif + return s:TeXIndent() +endfunction + +" vim: sw=2 diff --git a/runtime/indent/rpl.vim b/runtime/indent/rpl.vim new file mode 100644 index 0000000000..07bfd06590 --- /dev/null +++ b/runtime/indent/rpl.vim @@ -0,0 +1,63 @@ +" Vim indent file +" Language: RPL/2 +" Version: 0.2 +" Last Change: 2005 Mar 28 +" Maintainer: BERTRAND Joël + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal autoindent +setlocal indentkeys+==~end,=~case,=~if,=~then,=~else,=~do,=~until,=~while,=~repeat,=~select,=~default,=~for,=~start,=~next,=~step,<<>,<>> + +" Define the appropriate indent function but only once +setlocal indentexpr=RplGetFreeIndent() +if exists("*RplGetFreeIndent") + finish +endif + +let b:undo_indent = "set ai< indentkeys< indentexpr<" + +function RplGetIndent(lnum) + let ind = indent(a:lnum) + let prevline=getline(a:lnum) + " Strip tail comment + let prevstat=substitute(prevline, '!.*$', '', '') + + " Add a shiftwidth to statements following if, iferr, then, else, elseif, + " case, select, default, do, until, while, repeat, for, start + if prevstat =~? '\<\(if\|iferr\|do\|while\)\>' && prevstat =~? '\' + elseif prevstat =~? '\(^\|\s\+\)<<\($\|\s\+\)' && prevstat =~? '\s\+>>\($\|\s\+\)' + elseif prevstat =~? '\<\(if\|iferr\|then\|else\|elseif\|select\|case\|do\|until\|while\|repeat\|for\|start\|default\)\>' || prevstat =~? '\(^\|\s\+\)<<\($\|\s\+\)' + let ind = ind + &sw + endif + + " Subtract a shiftwidth from then, else, elseif, end, until, repeat, next, + " step + let line = getline(v:lnum) + if line =~? '^\s*\(then\|else\|elseif\|until\|repeat\|next\|step\|default\|end\)\>' + let ind = ind - &sw + elseif line =~? '^\s*>>\($\|\s\+\)' + let ind = ind - &sw + endif + + return ind +endfunction + +function RplGetFreeIndent() + " Find the previous non-blank line + let lnum = prevnonblank(v:lnum - 1) + + " Use zero indent at the top of the file + if lnum == 0 + return 0 + endif + + let ind=RplGetIndent(lnum) + return ind +endfunction + +" vim:sw=2 tw=130 diff --git a/runtime/indent/rrst.vim b/runtime/indent/rrst.vim new file mode 100644 index 0000000000..8bfa8344ce --- /dev/null +++ b/runtime/indent/rrst.vim @@ -0,0 +1,46 @@ +" Vim indent file +" Language: Rrst +" Author: Jakson Alves de Aquino +" Last Change: Wed Jul 09, 2014 07:33PM + + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +runtime indent/r.vim +let s:RIndent = function(substitute(&indentexpr, "()", "", "")) +let b:did_indent = 1 + +setlocal indentkeys=0{,0},:,!^F,o,O,e +setlocal indentexpr=GetRrstIndent() + +if exists("*GetRrstIndent") + finish +endif + +function GetRstIndent() + let pline = getline(v:lnum - 1) + let cline = getline(v:lnum) + if prevnonblank(v:lnum - 1) < v:lnum - 1 || cline =~ '^\s*[-\+\*]\s' || cline =~ '^\s*\d\+\.\s\+' + return indent(v:lnum) + elseif pline =~ '^\s*[-\+\*]\s' + return indent(v:lnum - 1) + 2 + elseif pline =~ '^\s*\d\+\.\s\+' + return indent(v:lnum - 1) + 3 + endif + return indent(prevnonblank(v:lnum - 1)) +endfunction + +function GetRrstIndent() + if getline(".") =~ '^\.\. {r .*}$' || getline(".") =~ '^\.\. \.\.$' + return 0 + endif + if search('^\.\. {r', "bncW") > search('^\.\. \.\.$', "bncW") + return s:RIndent() + else + return GetRstIndent() + endif +endfunction + +" vim: sw=2 diff --git a/runtime/indent/rst.vim b/runtime/indent/rst.vim new file mode 100644 index 0000000000..80d3308fd8 --- /dev/null +++ b/runtime/indent/rst.vim @@ -0,0 +1,59 @@ +" Vim indent file +" Language: reStructuredText Documentation Format +" Maintainer: Nikolai Weibull +" Latest Revision: 2011-08-03 + +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal indentexpr=GetRSTIndent() +setlocal indentkeys=!^F,o,O +setlocal nosmartindent + +if exists("*GetRSTIndent") + finish +endif + +let s:itemization_pattern = '^\s*[-*+]\s' +let s:enumeration_pattern = '^\s*\%(\d\+\|#\)\.\s\+' + +function GetRSTIndent() + let lnum = prevnonblank(v:lnum - 1) + if lnum == 0 + return 0 + endif + + let ind = indent(lnum) + let line = getline(lnum) + + if line =~ s:itemization_pattern + let ind += 2 + elseif line =~ s:enumeration_pattern + let ind += matchend(line, s:enumeration_pattern) + endif + + let line = getline(v:lnum - 1) + + " Indent :FIELD: lines. Don’t match if there is no text after the field or + " if the text ends with a sent-ender. + if line =~ '^:.\+:\s\{-1,\}\S.\+[^.!?:]$' + return matchend(line, '^:.\{-1,}:\s\+') + endif + + if line =~ '^\s*$' + execute lnum + call search('^\s*\%([-*+]\s\|\%(\d\+\|#\)\.\s\|\.\.\|$\)', 'bW') + let line = getline('.') + if line =~ s:itemization_pattern + let ind -= 2 + elseif line =~ s:enumeration_pattern + let ind -= matchend(line, s:enumeration_pattern) + elseif line =~ '^\s*\.\.' + let ind -= 3 + endif + endif + + return ind +endfunction diff --git a/runtime/indent/ruby.vim b/runtime/indent/ruby.vim new file mode 100644 index 0000000000..095b3a43c6 --- /dev/null +++ b/runtime/indent/ruby.vim @@ -0,0 +1,537 @@ +" Vim indent file +" Language: Ruby +" Maintainer: Nikolai Weibull +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns + +" 0. Initialization {{{1 +" ================= + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal nosmartindent + +" Now, set up our indentation expression and keys that trigger it. +setlocal indentexpr=GetRubyIndent(v:lnum) +setlocal indentkeys=0{,0},0),0],!^F,o,O,e +setlocal indentkeys+==end,=else,=elsif,=when,=ensure,=rescue,==begin,==end + +" Only define the function once. +if exists("*GetRubyIndent") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" 1. Variables {{{1 +" ============ + +" Regex of syntax group names that are or delimit strings/symbols or are comments. +let s:syng_strcom = '\' + +" Regex of syntax group names that are strings. +let s:syng_string = + \ '\' + +" Regex of syntax group names that are strings or documentation. +let s:syng_stringdoc = + \'\' + +" Expression used to check whether we should skip a match with searchpair(). +let s:skip_expr = + \ "synIDattr(synID(line('.'),col('.'),1),'name') =~ '".s:syng_strcom."'" + +" Regex used for words that, at the start of a line, add a level of indent. +let s:ruby_indent_keywords = '^\s*\zs\<\%(module\|class\|def\|if\|for' . + \ '\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure' . + \ '\|rescue\):\@!\>' . + \ '\|\%([=,*/%+-]\|<<\|>>\|:\s\)\s*\zs' . + \ '\<\%(if\|for\|while\|until\|case\|unless\|begin\):\@!\>' + +" Regex used for words that, at the start of a line, remove a level of indent. +let s:ruby_deindent_keywords = + \ '^\s*\zs\<\%(ensure\|else\|rescue\|elsif\|when\|end\):\@!\>' + +" Regex that defines the start-match for the 'end' keyword. +"let s:end_start_regex = '\%(^\|[^.]\)\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\|do\)\>' +" TODO: the do here should be restricted somewhat (only at end of line)? +let s:end_start_regex = + \ '\C\%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' . + \ '\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\):\@!\>' . + \ '\|\%(^\|[^.:@$]\)\@<=\' + +" Regex that defines the middle-match for the 'end' keyword. +let s:end_middle_regex = '\<\%(ensure\|else\|\%(\%(^\|;\)\s*\)\@<=\\|when\|elsif\):\@!\>' + +" Regex that defines the end-match for the 'end' keyword. +let s:end_end_regex = '\%(^\|[^.:@$]\)\@<=\' + +" Expression used for searchpair() call for finding match for 'end' keyword. +let s:end_skip_expr = s:skip_expr . + \ ' || (expand("") == "do"' . + \ ' && getline(".") =~ "^\\s*\\<\\(while\\|until\\|for\\):\\@!\\>")' + +" Regex that defines continuation lines, not including (, {, or [. +let s:non_bracket_continuation_regex = '\%([\\.,:*/%+]\|\\|%\@ 0 + " Go in and out of blocks comments as necessary. + " If the line isn't empty (with opt. comment) or in a string, end search. + let line = getline(lnum) + if line =~ '^=begin' + if in_block + let in_block = 0 + else + break + endif + elseif !in_block && line =~ '^=end' + let in_block = 1 + elseif !in_block && line !~ '^\s*#.*$' && !(s:IsInStringOrComment(lnum, 1) + \ && s:IsInStringOrComment(lnum, strlen(line))) + break + endif + let lnum = prevnonblank(lnum - 1) + endwhile + return lnum +endfunction + +" Find line above 'lnum' that started the continuation 'lnum' may be part of. +function s:GetMSL(lnum) + " Start on the line we're at and use its indent. + let msl = a:lnum + let msl_body = getline(msl) + let lnum = s:PrevNonBlankNonString(a:lnum - 1) + while lnum > 0 + " If we have a continuation line, or we're in a string, use line as MSL. + " Otherwise, terminate search as we have found our MSL already. + let line = getline(lnum) + + if s:Match(lnum, s:splat_regex) + " If the above line looks like the "*" of a splat, use the current one's + " indentation. + " + " Example: + " Hash[* + " method_call do + " something + " + return msl + elseif s:Match(line, s:non_bracket_continuation_regex) && + \ s:Match(msl, s:non_bracket_continuation_regex) + " If the current line is a non-bracket continuation and so is the + " previous one, keep its indent and continue looking for an MSL. + " + " Example: + " method_call one, + " two, + " three + " + let msl = lnum + elseif s:Match(lnum, s:non_bracket_continuation_regex) && + \ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_continuation_regex)) + " If the current line is a bracket continuation or a block-starter, but + " the previous is a non-bracket one, respect the previous' indentation, + " and stop here. + " + " Example: + " method_call one, + " two { + " three + " + return lnum + elseif s:Match(lnum, s:bracket_continuation_regex) && + \ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_continuation_regex)) + " If both lines are bracket continuations (the current may also be a + " block-starter), use the current one's and stop here + " + " Example: + " method_call( + " other_method_call( + " foo + return msl + elseif s:Match(lnum, s:block_regex) && + \ !s:Match(msl, s:continuation_regex) && + \ !s:Match(msl, s:block_continuation_regex) + " If the previous line is a block-starter and the current one is + " mostly ordinary, use the current one as the MSL. + " + " Example: + " method_call do + " something + " something_else + return msl + else + let col = match(line, s:continuation_regex) + 1 + if (col > 0 && !s:IsInStringOrComment(lnum, col)) + \ || s:IsInString(lnum, strlen(line)) + let msl = lnum + else + break + endif + endif + + let msl_body = getline(msl) + let lnum = s:PrevNonBlankNonString(lnum - 1) + endwhile + return msl +endfunction + +" Check if line 'lnum' has more opening brackets than closing ones. +function s:ExtraBrackets(lnum) + let opening = {'parentheses': [], 'braces': [], 'brackets': []} + let closing = {'parentheses': [], 'braces': [], 'brackets': []} + + let line = getline(a:lnum) + let pos = match(line, '[][(){}]', 0) + + " Save any encountered opening brackets, and remove them once a matching + " closing one has been found. If a closing bracket shows up that doesn't + " close anything, save it for later. + while pos != -1 + if !s:IsInStringOrComment(a:lnum, pos + 1) + if line[pos] == '(' + call add(opening.parentheses, {'type': '(', 'pos': pos}) + elseif line[pos] == ')' + if empty(opening.parentheses) + call add(closing.parentheses, {'type': ')', 'pos': pos}) + else + let opening.parentheses = opening.parentheses[0:-2] + endif + elseif line[pos] == '{' + call add(opening.braces, {'type': '{', 'pos': pos}) + elseif line[pos] == '}' + if empty(opening.braces) + call add(closing.braces, {'type': '}', 'pos': pos}) + else + let opening.braces = opening.braces[0:-2] + endif + elseif line[pos] == '[' + call add(opening.brackets, {'type': '[', 'pos': pos}) + elseif line[pos] == ']' + if empty(opening.brackets) + call add(closing.brackets, {'type': ']', 'pos': pos}) + else + let opening.brackets = opening.brackets[0:-2] + endif + endif + endif + + let pos = match(line, '[][(){}]', pos + 1) + endwhile + + " Find the rightmost brackets, since they're the ones that are important in + " both opening and closing cases + let rightmost_opening = {'type': '(', 'pos': -1} + let rightmost_closing = {'type': ')', 'pos': -1} + + for opening in opening.parentheses + opening.braces + opening.brackets + if opening.pos > rightmost_opening.pos + let rightmost_opening = opening + endif + endfor + + for closing in closing.parentheses + closing.braces + closing.brackets + if closing.pos > rightmost_closing.pos + let rightmost_closing = closing + endif + endfor + + return [rightmost_opening, rightmost_closing] +endfunction + +function s:Match(lnum, regex) + let col = match(getline(a:lnum), '\C'.a:regex) + 1 + return col > 0 && !s:IsInStringOrComment(a:lnum, col) ? col : 0 +endfunction + +function s:MatchLast(lnum, regex) + let line = getline(a:lnum) + let col = match(line, '.*\zs' . a:regex) + while col != -1 && s:IsInStringOrComment(a:lnum, col) + let line = strpart(line, 0, col) + let col = match(line, '.*' . a:regex) + endwhile + return col + 1 +endfunction + +" 3. GetRubyIndent Function {{{1 +" ========================= + +function GetRubyIndent(...) + " 3.1. Setup {{{2 + " ---------- + + " For the current line, use the first argument if given, else v:lnum + let clnum = a:0 ? a:1 : v:lnum + + " Set up variables for restoring position in file. Could use clnum here. + let vcol = col('.') + + " 3.2. Work on the current line {{{2 + " ----------------------------- + + " Get the current line. + let line = getline(clnum) + let ind = -1 + + " If we got a closing bracket on an empty line, find its match and indent + " according to it. For parentheses we indent to its column - 1, for the + " others we indent to the containing line's MSL's level. Return -1 if fail. + let col = matchend(line, '^\s*[]})]') + if col > 0 && !s:IsInStringOrComment(clnum, col) + call cursor(clnum, col) + let bs = strpart('(){}[]', stridx(')}]', line[col - 1]) * 2, 2) + if searchpair(escape(bs[0], '\['), '', bs[1], 'bW', s:skip_expr) > 0 + if line[col-1]==')' && col('.') != col('$') - 1 + let ind = virtcol('.') - 1 + else + let ind = indent(s:GetMSL(line('.'))) + endif + endif + return ind + endif + + " If we have a =begin or =end set indent to first column. + if match(line, '^\s*\%(=begin\|=end\)$') != -1 + return 0 + endif + + " If we have a deindenting keyword, find its match and indent to its level. + " TODO: this is messy + if s:Match(clnum, s:ruby_deindent_keywords) + call cursor(clnum, 1) + if searchpair(s:end_start_regex, s:end_middle_regex, s:end_end_regex, 'bW', + \ s:end_skip_expr) > 0 + let msl = s:GetMSL(line('.')) + let line = getline(line('.')) + + if strpart(line, 0, col('.') - 1) =~ '=\s*$' && + \ strpart(line, col('.') - 1, 2) !~ 'do' + let ind = virtcol('.') - 1 + elseif getline(msl) =~ '=\s*\(#.*\)\=$' + let ind = indent(line('.')) + else + let ind = indent(msl) + endif + endif + return ind + endif + + " If we are in a multi-line string or line-comment, don't do anything to it. + if s:IsInStringOrDocumentation(clnum, matchend(line, '^\s*') + 1) + return indent('.') + endif + + " If we are at the closing delimiter of a "<<" heredoc-style string, set the + " indent to 0. + if line =~ '^\k\+\s*$' + \ && s:IsInStringDelimiter(clnum, 1) + \ && search('\V<<'.line, 'nbW') > 0 + return 0 + endif + + " 3.3. Work on the previous line. {{{2 + " ------------------------------- + + " Find a non-blank, non-multi-line string line above the current line. + let lnum = s:PrevNonBlankNonString(clnum - 1) + + " If the line is empty and inside a string, use the previous line. + if line =~ '^\s*$' && lnum != prevnonblank(clnum - 1) + return indent(prevnonblank(clnum)) + endif + + " At the start of the file use zero indent. + if lnum == 0 + return 0 + endif + + " Set up variables for the previous line. + let line = getline(lnum) + let ind = indent(lnum) + + " If the previous line ended with a block opening, add a level of indent. + if s:Match(lnum, s:block_regex) + return indent(s:GetMSL(lnum)) + &sw + endif + + " If the previous line ended with the "*" of a splat, add a level of indent + if line =~ s:splat_regex + return indent(lnum) + &sw + endif + + " If the previous line contained unclosed opening brackets and we are still + " in them, find the rightmost one and add indent depending on the bracket + " type. + " + " If it contained hanging closing brackets, find the rightmost one, find its + " match and indent according to that. + if line =~ '[[({]' || line =~ '[])}]\s*\%(#.*\)\=$' + let [opening, closing] = s:ExtraBrackets(lnum) + + if opening.pos != -1 + if opening.type == '(' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0 + if col('.') + 1 == col('$') + return ind + &sw + else + return virtcol('.') + endif + else + let nonspace = matchend(line, '\S', opening.pos + 1) - 1 + return nonspace > 0 ? nonspace : ind + &sw + endif + elseif closing.pos != -1 + call cursor(lnum, closing.pos + 1) + normal! % + + if s:Match(line('.'), s:ruby_indent_keywords) + return indent('.') + &sw + else + return indent('.') + endif + else + call cursor(clnum, vcol) + end + endif + + " If the previous line ended with an "end", match that "end"s beginning's + " indent. + let col = s:Match(lnum, '\%(^\|[^.:@$]\)\\s*\%(#.*\)\=$') + if col > 0 + call cursor(lnum, col) + if searchpair(s:end_start_regex, '', s:end_end_regex, 'bW', + \ s:end_skip_expr) > 0 + let n = line('.') + let ind = indent('.') + let msl = s:GetMSL(n) + if msl != n + let ind = indent(msl) + end + return ind + endif + end + + let col = s:Match(lnum, s:ruby_indent_keywords) + if col > 0 + call cursor(lnum, col) + let ind = virtcol('.') - 1 + &sw + " TODO: make this better (we need to count them) (or, if a searchpair + " fails, we know that something is lacking an end and thus we indent a + " level + if s:Match(lnum, s:end_end_regex) + let ind = indent('.') + endif + return ind + endif + + " 3.4. Work on the MSL line. {{{2 + " -------------------------- + + " Set up variables to use and search for MSL to the previous line. + let p_lnum = lnum + let lnum = s:GetMSL(lnum) + + " If the previous line wasn't a MSL and is continuation return its indent. + " TODO: the || s:IsInString() thing worries me a bit. + if p_lnum != lnum + if s:Match(p_lnum, s:non_bracket_continuation_regex) || s:IsInString(p_lnum,strlen(line)) + return ind + endif + endif + + " Set up more variables, now that we know we wasn't continuation bound. + let line = getline(lnum) + let msl_ind = indent(lnum) + + " If the MSL line had an indenting keyword in it, add a level of indent. + " TODO: this does not take into account contrived things such as + " module Foo; class Bar; end + if s:Match(lnum, s:ruby_indent_keywords) + let ind = msl_ind + &sw + if s:Match(lnum, s:end_end_regex) + let ind = ind - &sw + endif + return ind + endif + + " If the previous line ended with [*+/.,-=], but wasn't a block ending or a + " closing bracket, indent one extra level. + if s:Match(lnum, s:non_bracket_continuation_regex) && !s:Match(lnum, '^\s*\([\])}]\|end\)') + if lnum == p_lnum + let ind = msl_ind + &sw + else + let ind = msl_ind + endif + return ind + endif + + " }}}2 + + return ind +endfunction + +" }}}1 + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim:set sw=2 sts=2 ts=8 et: diff --git a/runtime/indent/sass.vim b/runtime/indent/sass.vim new file mode 100644 index 0000000000..b6e2e66e8a --- /dev/null +++ b/runtime/indent/sass.vim @@ -0,0 +1,40 @@ +" Vim indent file +" Language: Sass +" Maintainer: Tim Pope +" Last Change: 2013 May 30 + +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal autoindent sw=2 et +setlocal indentexpr=GetSassIndent() +setlocal indentkeys=o,O,*,<:>,!^F + +" Only define the function once. +if exists("*GetSassIndent") + finish +endif + +let s:property = '^\s*:\|^\s*[[:alnum:]#{}-]\+\%(:\|\s*=\)' +let s:extend = '^\s*\%(@extend\|@include\|+\)' + +function! GetSassIndent() + let lnum = prevnonblank(v:lnum-1) + let line = substitute(getline(lnum),'\s\+$','','') + let cline = substitute(substitute(getline(v:lnum),'\s\+$','',''),'^\s\+','','') + let lastcol = strlen(line) + let line = substitute(line,'^\s\+','','') + let indent = indent(lnum) + let cindent = indent(v:lnum) + if line !~ s:property && line !~ s:extend && cline =~ s:property + return indent + &sw + "elseif line =~ s:property && cline !~ s:property + "return indent - &sw + else + return -1 + endif +endfunction + +" vim:set sw=2: diff --git a/runtime/indent/scheme.vim b/runtime/indent/scheme.vim new file mode 100644 index 0000000000..a16f4f9ea1 --- /dev/null +++ b/runtime/indent/scheme.vim @@ -0,0 +1,11 @@ +" Vim indent file +" Language: Scheme +" Maintainer: Sergey Khorev +" Last Change: 2005 Jun 24 + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif + +runtime! indent/lisp.vim diff --git a/runtime/indent/scss.vim b/runtime/indent/scss.vim new file mode 100644 index 0000000000..82bba4920b --- /dev/null +++ b/runtime/indent/scss.vim @@ -0,0 +1,12 @@ +" Vim indent file +" Language: SCSS +" Maintainer: Tim Pope +" Last Change: 2010 Jul 26 + +if exists("b:did_indent") + finish +endif + +runtime! indent/css.vim + +" vim:set sw=2: diff --git a/runtime/indent/sdl.vim b/runtime/indent/sdl.vim new file mode 100644 index 0000000000..ba03f2d3f4 --- /dev/null +++ b/runtime/indent/sdl.vim @@ -0,0 +1,93 @@ +" Vim indent file +" Language: SDL +" Maintainer: Michael Piefel +" Last Change: 10 December 2011 + +" Shamelessly stolen from the Vim-Script indent file + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal indentexpr=GetSDLIndent() +setlocal indentkeys+==~end,=~state,* + +" Only define the function once. +if exists("*GetSDLIndent") +" finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +function! GetSDLIndent() + " Find a non-blank line above the current line. + let lnum = prevnonblank(v:lnum - 1) + + " At the start of the file use zero indent. + if lnum == 0 + return 0 + endif + + let ind = indent(lnum) + let virtuality = '^\s*\(\(virtual\|redefined\|finalized\)\s\+\)\=\s*' + + " Add a single space to comments which use asterisks + if getline(lnum) =~ '^\s*\*' + let ind = ind - 1 + endif + if getline(v:lnum) =~ '^\s*\*' + let ind = ind + 1 + endif + + " Add a 'shiftwidth' after states, different blocks, decision (and alternatives), inputs + if (getline(lnum) =~? '^\s*\(start\|state\|system\|package\|connection\|channel\|alternative\|macro\|operator\|newtype\|select\|substructure\|decision\|generator\|refinement\|service\|method\|exceptionhandler\|asntype\|syntype\|value\|(.*):\|\(priority\s\+\)\=input\|provided\)' + \ || getline(lnum) =~? virtuality . '\(process\|procedure\|block\|object\)') + \ && getline(lnum) !~? 'end[[:alpha:]]\+;$' + let ind = ind + &sw + endif + + " Subtract a 'shiftwidth' after states + if getline(lnum) =~? '^\s*\(stop\|return\>\|nextstate\)' + let ind = ind - &sw + endif + + " Subtract a 'shiftwidth' on on end (uncompleted line) + if getline(v:lnum) =~? '^\s*end\>' + let ind = ind - &sw + endif + + " Put each alternatives where the corresponding decision was + if getline(v:lnum) =~? '^\s*\((.*)\|else\):' + normal k + let ind = indent(searchpair('^\s*decision', '', '^\s*enddecision', 'bW', + \ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "sdlString"')) + endif + + " Put each state where the preceding state was + if getline(v:lnum) =~? '^\s*state\>' + let ind = indent(search('^\s*start', 'bW')) + endif + + " Systems and packages are always in column 0 + if getline(v:lnum) =~? '^\s*\(\(end\)\=system\|\(end\)\=package\)' + return 0 + endif + + " Put each end* where the corresponding begin was + if getline(v:lnum) =~? '^\s*end[[:alpha:]]' + normal k + let partner=matchstr(getline(v:lnum), '\(' . virtuality . 'end\)\@<=[[:alpha:]]\+') + let ind = indent(searchpair(virtuality . partner, '', '^\s*end' . partner, 'bW', + \ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "sdlString"')) + endif + + return ind +endfunction + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim:sw=2 diff --git a/runtime/indent/sh.vim b/runtime/indent/sh.vim new file mode 100644 index 0000000000..68f764ee69 --- /dev/null +++ b/runtime/indent/sh.vim @@ -0,0 +1,169 @@ +" Vim indent file +" Language: Shell Script +" Maintainer: Peter Aronoff +" Original Author: Nikolai Weibull +" Latest Revision: 2013-11-28 + +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal indentexpr=GetShIndent() +setlocal indentkeys+=0=then,0=do,0=else,0=elif,0=fi,0=esac,0=done,),0=;;,0=;& +setlocal indentkeys+=0=fin,0=fil,0=fip,0=fir,0=fix +setlocal indentkeys-=:,0# +setlocal nosmartindent + +if exists("*GetShIndent") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +function s:buffer_shiftwidth() + return &shiftwidth +endfunction + +let s:sh_indent_defaults = { + \ 'default': function('s:buffer_shiftwidth'), + \ 'continuation-line': function('s:buffer_shiftwidth'), + \ 'case-labels': function('s:buffer_shiftwidth'), + \ 'case-statements': function('s:buffer_shiftwidth'), + \ 'case-breaks': 0 } + +function! s:indent_value(option) + let Value = exists('b:sh_indent_options') + \ && has_key(b:sh_indent_options, a:option) ? + \ b:sh_indent_options[a:option] : + \ s:sh_indent_defaults[a:option] + if type(Value) == type(function('type')) + return Value() + endif + return Value +endfunction + +function! GetShIndent() + let lnum = prevnonblank(v:lnum - 1) + if lnum == 0 + return 0 + endif + + let pnum = prevnonblank(lnum - 1) + + let ind = indent(lnum) + let line = getline(lnum) + if line =~ '^\s*\%(if\|then\|do\|else\|elif\|case\|while\|until\|for\|select\)\>' + if line !~ '\<\%(fi\|esac\|done\)\>\s*\%(#.*\)\=$' + let ind += s:indent_value('default') + endif + elseif s:is_case_label(line, pnum) + if !s:is_case_ended(line) + let ind += s:indent_value('case-statements') + endif + elseif line =~ '^\s*\<\k\+\>\s*()\s*{' || line =~ '^\s*{' + if line !~ '}\s*\%(#.*\)\=$' + let ind += s:indent_value('default') + endif + elseif s:is_continuation_line(line) + if pnum == 0 || !s:is_continuation_line(getline(pnum)) + let ind += s:indent_value('continuation-line') + endif + elseif pnum != 0 && s:is_continuation_line(getline(pnum)) + let ind = indent(s:find_continued_lnum(pnum)) + endif + + let pine = line + let line = getline(v:lnum) + if line =~ '^\s*\%(then\|do\|else\|elif\|fi\|done\)\>' || line =~ '^\s*}' + let ind -= s:indent_value('default') + elseif line =~ '^\s*esac\>' && s:is_case_empty(getline(v:lnum - 1)) + let ind -= s:indent_value('default') + elseif line =~ '^\s*esac\>' + let ind -= (s:is_case_label(pine, lnum) && s:is_case_ended(pine) ? + \ 0 : s:indent_value('case-statements')) + + \ s:indent_value('case-labels') + if s:is_case_break(pine) + let ind += s:indent_value('case-breaks') + endif + elseif s:is_case_label(line, lnum) + if s:is_case(pine) + let ind = indent(lnum) + s:indent_value('case-labels') + else + let ind -= s:indent_value('case-statements') - s:indent_value('case-breaks') + endif + elseif s:is_case_break(line) + let ind -= s:indent_value('case-breaks') + endif + + return ind +endfunction + +function! s:is_continuation_line(line) + return a:line =~ '\%(\%(^\|[^\\]\)\\\|&&\|||\)$' +endfunction + +function! s:find_continued_lnum(lnum) + let i = a:lnum + while i > 1 && s:is_continuation_line(getline(i - 1)) + let i -= 1 + endwhile + return i +endfunction + +function! s:is_case_label(line, pnum) + if a:line !~ '^\s*(\=.*)' + return 0 + endif + + if a:pnum > 0 + let pine = getline(a:pnum) + if !(s:is_case(pine) || s:is_case_ended(pine)) + return 0 + endif + endif + + let suffix = substitute(a:line, '^\s*(\=', "", "") + let nesting = 0 + let i = 0 + let n = strlen(suffix) + while i < n + let c = suffix[i] + let i += 1 + if c == '\\' + let i += 1 + elseif c == '(' + let nesting += 1 + elseif c == ')' + if nesting == 0 + return 1 + endif + let nesting -= 1 + endif + endwhile + return 0 +endfunction + +function! s:is_case(line) + return a:line =~ '^\s*case\>' +endfunction + +function! s:is_case_break(line) + return a:line =~ '^\s*;[;&]' +endfunction + +function! s:is_case_ended(line) + return s:is_case_break(a:line) || a:line =~ ';[;&]\s*\%(#.*\)\=$' +endfunction + +function! s:is_case_empty(line) + if a:line =~ '^\s*$' || a:line =~ '^\s*#' + return s:is_case_empty(getline(v:lnum - 1)) + else + return a:line =~ '^\s*case\>' + endif +endfunction + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/indent/sml.vim b/runtime/indent/sml.vim new file mode 100644 index 0000000000..fbbb15ed85 --- /dev/null +++ b/runtime/indent/sml.vim @@ -0,0 +1,217 @@ +" Vim indent file +" Language: SML +" Maintainer: Saikat Guha +" Hubert Chao +" Original OCaml Version: +" Jean-Francois Yuen +" Mike Leary +" Markus Mottl +" OCaml URL: http://www.oefai.at/~markus/vim/indent/ocaml.vim +" Last Change: 2003 Jan 04 - Adapted to SML +" 2002 Nov 06 - Some fixes (JY) +" 2002 Oct 28 - Fixed bug with indentation of ']' (MM) +" 2002 Oct 22 - Major rewrite (JY) + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal expandtab +setlocal indentexpr=GetSMLIndent() +setlocal indentkeys+=0=and,0=else,0=end,0=handle,0=if,0=in,0=let,0=then,0=val,0=fun,0=\|,0=*),0) +setlocal nolisp +setlocal nosmartindent +setlocal textwidth=80 +setlocal shiftwidth=2 + +" Comment formatting +if (has("comments")) + set comments=sr:(*,mb:*,ex:*) + set fo=cqort +endif + +" Only define the function once. +"if exists("*GetSMLIndent") +"finish +"endif + +" Define some patterns: +let s:beflet = '^\s*\(initializer\|method\|try\)\|\(\<\(begin\|do\|else\|in\|then\|try\)\|->\|;\)\s*$' +let s:letpat = '^\s*\(let\|type\|module\|class\|open\|exception\|val\|include\|external\)\>' +let s:letlim = '\(\<\(sig\|struct\)\|;;\)\s*$' +let s:lim = '^\s*\(exception\|external\|include\|let\|module\|open\|type\|val\)\>' +let s:module = '\<\%(let\|sig\|struct\)\>' +let s:obj = '^\s*\(constraint\|inherit\|initializer\|method\|val\)\>\|\<\(object\|object\s*(.*)\)\s*$' +let s:type = '^\s*\%(let\|type\)\>.*=' +let s:val = '^\s*\(val\|external\)\>.*:' + +" Skipping pattern, for comments +function! s:SkipPattern(lnum, pat) + let def = prevnonblank(a:lnum - 1) + while def > 0 && getline(def) =~ a:pat + let def = prevnonblank(def - 1) + endwhile + return def +endfunction + +" Indent for ';;' to match multiple 'let' +function! s:GetInd(lnum, pat, lim) + let llet = search(a:pat, 'bW') + let old = indent(a:lnum) + while llet > 0 + let old = indent(llet) + let nb = s:SkipPattern(llet, '^\s*(\*.*\*)\s*$') + if getline(nb) =~ a:lim + return old + endif + let llet = search(a:pat, 'bW') + endwhile + return old +endfunction + +" Indent pairs +function! s:FindPair(pstart, pmid, pend) + call search(a:pend, 'bW') +" return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')) + let lno = searchpair(a:pstart, a:pmid, a:pend, 'bW', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"') + if lno == -1 + return indent(lno) + else + return col(".") - 1 + endif +endfunction + +function! s:FindLet(pstart, pmid, pend) + call search(a:pend, 'bW') +" return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')) + let lno = searchpair(a:pstart, a:pmid, a:pend, 'bW', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"') + let moduleLine = getline(lno) + if lno == -1 || moduleLine =~ '^\s*\(fun\|structure\|signature\)\>' + return indent(lno) + else + return col(".") - 1 + endif +endfunction + +" Indent 'let' +"function! s:FindLet(pstart, pmid, pend) +" call search(a:pend, 'bW') +" return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment" || getline(".") =~ "^\\s*let\\>.*=.*\\.*=\\s*$\\|" . s:beflet')) +"endfunction + +function! GetSMLIndent() + " Find a non-blank line above the current line. + let lnum = prevnonblank(v:lnum - 1) + + " At the start of the file use zero indent. + if lnum == 0 + return 0 + endif + + let ind = indent(lnum) + let lline = getline(lnum) + + " Return double 'shiftwidth' after lines matching: + if lline =~ '^\s*|.*=>\s*$' + return ind + &sw + &sw + elseif lline =~ '^\s*val\>.*=\s*$' + return ind + &sw + endif + + let line = getline(v:lnum) + + " Indent lines starting with 'end' to matching module + if line =~ '^\s*end\>' + return s:FindLet(s:module, '', '\') + + " Match 'else' with 'if' + elseif line =~ '^\s*else\>' + if lline !~ '^\s*\(if\|else\|then\)\>' + return s:FindPair('\', '', '\') + else + return ind + endif + + " Match 'then' with 'if' + elseif line =~ '^\s*then\>' + if lline !~ '^\s*\(if\|else\|then\)\>' + return s:FindPair('\', '', '\') + else + return ind + endif + + " Indent if current line begins with ']' + elseif line =~ '^\s*\]' + return s:FindPair('\[','','\]') + + " Indent current line starting with 'in' to last matching 'let' + elseif line =~ '^\s*in\>' + let ind = s:FindLet('\','','\') + + " Indent from last matching module if line matches: + elseif line =~ '^\s*\(fun\|val\|open\|structure\|and\|datatype\|type\|exception\)\>' + cursor(lnum,1) + let lastModule = indent(searchpair(s:module, '', '\', 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')) + if lastModule == -1 + return 0 + else + return lastModule + &sw + endif + + " Indent lines starting with '|' from matching 'case', 'handle' + elseif line =~ '^\s*|' + " cursor(lnum,1) + let lastSwitch = search('\<\(case\|handle\|fun\|datatype\)\>','bW') + let switchLine = getline(lastSwitch) + let switchLineIndent = indent(lastSwitch) + if lline =~ '^\s*|' + return ind + endif + if switchLine =~ '\' + return col(".") + 2 + elseif switchLine =~ '\' + return switchLineIndent + &sw + elseif switchLine =~ '\' + call search('=') + return col(".") - 1 + else + return switchLineIndent + 2 + endif + + + " Indent if last line ends with 'sig', 'struct', 'let', 'then', 'else', + " 'in' + elseif lline =~ '\<\(sig\|struct\|let\|in\|then\|else\)\s*$' + let ind = ind + &sw + + " Indent if last line ends with 'of', align from 'case' + elseif lline =~ '\<\(of\)\s*$' + call search('\',"bW") + let ind = col(".")+4 + + " Indent if current line starts with 'of' + elseif line =~ '^\s*of\>' + call search('\',"bW") + let ind = col(".")+1 + + + " Indent if last line starts with 'fun', 'case', 'fn' + elseif lline =~ '^\s*\(fun\|fn\|case\)\>' + let ind = ind + &sw + + endif + + " Don't indent 'let' if last line started with 'fun', 'fn' + if line =~ '^\s*let\>' + if lline =~ '^\s*\(fun\|fn\)' + let ind = ind - &sw + endif + endif + + return ind + +endfunction + +" vim:sw=2 diff --git a/runtime/indent/sql.vim b/runtime/indent/sql.vim new file mode 100644 index 0000000000..4f82b96a55 --- /dev/null +++ b/runtime/indent/sql.vim @@ -0,0 +1,39 @@ +" Vim indent file loader +" Language: SQL +" Maintainer: David Fishburn +" Last Change: Thu Sep 15 2005 10:27:51 AM +" Version: 1.0 +" Download: http://vim.sourceforge.net/script.php?script_id=495 + +" 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 sqlanywhere.vim file. + + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif + +" Default to the standard Vim distribution file +let filename = 'sqlanywhere' + +" 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, 'indent/'.b:sql_type_override.'.vim') != '' + let filename = b:sql_type_override + endif +elseif exists("g:sql_type_default") + if globpath(&runtimepath, 'indent/'.g:sql_type_default.'.vim') != '' + let filename = g:sql_type_default + endif +endif + +" Source the appropriate file +exec 'runtime indent/'.filename.'.vim' + + +" vim:sw=4: diff --git a/runtime/indent/sqlanywhere.vim b/runtime/indent/sqlanywhere.vim new file mode 100644 index 0000000000..d11c54b5af --- /dev/null +++ b/runtime/indent/sqlanywhere.vim @@ -0,0 +1,393 @@ +" Vim indent file +" Language: SQL +" Maintainer: David Fishburn +" Last Change: 2012 Dec 06 +" Version: 3.0 +" Download: http://vim.sourceforge.net/script.php?script_id=495 + +" Notes: +" Indenting keywords are based on Oracle and Sybase Adaptive Server +" Anywhere (ASA). Test indenting was done with ASA stored procedures and +" fuctions and Oracle packages which contain stored procedures and +" functions. +" This has not been tested against Microsoft SQL Server or +" Sybase Adaptive Server Enterprise (ASE) which use the Transact-SQL +" syntax. That syntax does not have end tags for IF's, which makes +" indenting more difficult. +" +" Known Issues: +" The Oracle MERGE statement does not have an end tag associated with +" it, this can leave the indent hanging to the right one too many. +" +" History: +" 3.0 (Dec 2012) +" Added cpo check +" +" 2.0 +" Added the FOR keyword to SQLBlockStart to handle (Alec Tica): +" for i in 1..100 loop +" |<-- I expect to have indentation here +" end loop; +" + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 +let b:current_indent = "sqlanywhere" + +setlocal indentkeys-=0{ +setlocal indentkeys-=0} +setlocal indentkeys-=: +setlocal indentkeys-=0# +setlocal indentkeys-=e + +" This indicates formatting should take place when one of these +" expressions is used. These expressions would normally be something +" you would type at the BEGINNING of a line +" SQL is generally case insensitive, so this files assumes that +" These keywords are something that would trigger an indent LEFT, not +" an indent right, since the SQLBlockStart is used for those keywords +setlocal indentkeys+==~end,=~else,=~elseif,=~elsif,0=~when,0=) + +" GetSQLIndent is executed whenever one of the expressions +" in the indentkeys is typed +setlocal indentexpr=GetSQLIndent() + +" Only define the functions once. +if exists("*GetSQLIndent") + finish +endif +let s:keepcpo= &cpo +set cpo&vim + +" List of all the statements that start a new block. +" These are typically words that start a line. +" IS is excluded, since it is difficult to determine when the +" ending block is (especially for procedures/functions). +let s:SQLBlockStart = '^\s*\%('. + \ 'if\|else\|elseif\|elsif\|'. + \ 'while\|loop\|do\|for\|'. + \ 'begin\|'. + \ 'case\|when\|merge\|exception'. + \ '\)\>' +let s:SQLBlockEnd = '^\s*\(end\)\>' + +" The indent level is also based on unmatched paranethesis +" If a line has an extra "(" increase the indent +" If a line has an extra ")" decrease the indent +function! s:CountUnbalancedParan( line, paran_to_check ) + let l = a:line + let lp = substitute(l, '[^(]', '', 'g') + let l = a:line + let rp = substitute(l, '[^)]', '', 'g') + + if a:paran_to_check =~ ')' + " echom 'CountUnbalancedParan ) returning: ' . + " \ (strlen(rp) - strlen(lp)) + return (strlen(rp) - strlen(lp)) + elseif a:paran_to_check =~ '(' + " echom 'CountUnbalancedParan ( returning: ' . + " \ (strlen(lp) - strlen(rp)) + return (strlen(lp) - strlen(rp)) + else + " echom 'CountUnbalancedParan unknown paran to check: ' . + " \ a:paran_to_check + return 0 + endif +endfunction + +" Unindent commands based on previous indent level +function! s:CheckToIgnoreRightParan( prev_lnum, num_levels ) + let lnum = a:prev_lnum + let line = getline(lnum) + let ends = 0 + let num_right_paran = a:num_levels + let ignore_paran = 0 + let vircol = 1 + + while num_right_paran > 0 + silent! exec 'norm! '.lnum."G\".vircol."\" + let right_paran = search( ')', 'W' ) + if right_paran != lnum + " This should not happen since there should be at least + " num_right_paran matches for this line + break + endif + let vircol = virtcol(".") + + " if getline(".") =~ '^)' + let matching_paran = searchpair('(', '', ')', 'bW', + \ 's:IsColComment(line("."), col("."))') + + if matching_paran < 1 + " No match found + " echom 'CTIRP - no match found, ignoring' + break + endif + + if matching_paran == lnum + " This was not an unmatched parantenses, start the search again + " again after this column + " echom 'CTIRP - same line match, ignoring' + continue + endif + + " echom 'CTIRP - match: ' . line(".") . ' ' . getline(".") + + if getline(matching_paran) =~? '\(if\|while\)\>' + " echom 'CTIRP - if/while ignored: ' . line(".") . ' ' . getline(".") + let ignore_paran = ignore_paran + 1 + endif + + " One match found, decrease and check for further matches + let num_right_paran = num_right_paran - 1 + + endwhile + + " Fallback - just move back one + " return a:prev_indent - &sw + return ignore_paran +endfunction + +" Based on the keyword provided, loop through previous non empty +" non comment lines to find the statement that initated the keyword. +" Return its indent level +" CASE .. +" WHEN ... +" Should return indent level of CASE +" EXCEPTION .. +" WHEN ... +" something; +" WHEN ... +" Should return indent level of exception. +function! s:GetStmtStarterIndent( keyword, curr_lnum ) + let lnum = a:curr_lnum + + " Default - reduce indent by 1 + let ind = indent(a:curr_lnum) - &sw + + if a:keyword =~? 'end' + exec 'normal! ^' + let stmts = '^\s*\%('. + \ '\\|' . + \ '\%(\%(\\)\|' . + \ '\%(\%(\\)\|' . + \ '\%(\%(\\)\|' . + \ '\%(\%(\\)'. + \ '\)' + let matching_lnum = searchpair(stmts, '', '\\zs', 'bW', + \ 's:IsColComment(line("."), col(".")) == 1') + exec 'normal! $' + if matching_lnum > 0 && matching_lnum < a:curr_lnum + let ind = indent(matching_lnum) + endif + elseif a:keyword =~? 'when' + exec 'normal! ^' + let matching_lnum = searchpair( + \ '\%(\\|\\|\', + \ '', + \ '\%(\%(\\)\|\%(\\)\)', + \ 'bW', + \ 's:IsColComment(line("."), col(".")) == 1') + exec 'normal! $' + if matching_lnum > 0 && matching_lnum < a:curr_lnum + let ind = indent(matching_lnum) + else + let ind = indent(a:curr_lnum) + endif + endif + + return ind +endfunction + + +" Check if the line is a comment +function! s:IsLineComment(lnum) + let rc = synIDattr( + \ synID(a:lnum, + \ match(getline(a:lnum), '\S')+1, 0) + \ , "name") + \ =~? "comment" + + return rc +endfunction + + +" Check if the column is a comment +function! s:IsColComment(lnum, cnum) + let rc = synIDattr(synID(a:lnum, a:cnum, 0), "name") + \ =~? "comment" + + return rc +endfunction + + +" Instead of returning a column position, return +" an appropriate value as a factor of shiftwidth. +function! s:ModuloIndent(ind) + let ind = a:ind + + if ind > 0 + let modulo = ind % &shiftwidth + + if modulo > 0 + let ind = ind - modulo + endif + endif + + return ind +endfunction + + +" Find correct indent of a new line based upon the previous line +function! GetSQLIndent() + let lnum = v:lnum + let ind = indent(lnum) + + " If the current line is a comment, leave the indent as is + " Comment out this additional check since it affects the + " indenting of =, and will not reindent comments as it should + " if s:IsLineComment(lnum) == 1 + " return ind + " endif + + " Get previous non-blank line + let prevlnum = prevnonblank(lnum - 1) + if prevlnum <= 0 + return ind + endif + + if s:IsLineComment(prevlnum) == 1 + if getline(v:lnum) =~ '^\s*\*' + let ind = s:ModuloIndent(indent(prevlnum)) + return ind + 1 + endif + " If the previous line is a comment, then return -1 + " to tell Vim to use the formatoptions setting to determine + " the indent to use + " But only if the next line is blank. This would be true if + " the user is typing, but it would not be true if the user + " is reindenting the file + if getline(v:lnum) =~ '^\s*$' + return -1 + endif + endif + + " echom 'PREVIOUS INDENT: ' . indent(prevlnum) . ' LINE: ' . getline(prevlnum) + + " This is the line you just hit return on, it is not the current line + " which is new and empty + " Based on this line, we can determine how much to indent the new + " line + + " Get default indent (from prev. line) + let ind = indent(prevlnum) + let prevline = getline(prevlnum) + + " Now check what's on the previous line to determine if the indent + " should be changed, for example IF, BEGIN, should increase the indent + " where END IF, END, should decrease the indent. + if prevline =~? s:SQLBlockStart + " Move indent in + let ind = ind + &sw + " echom 'prevl - SQLBlockStart - indent ' . ind . ' line: ' . prevline + elseif prevline =~ '[()]' + if prevline =~ '(' + let num_unmatched_left = s:CountUnbalancedParan( prevline, '(' ) + else + let num_unmatched_left = 0 + endif + if prevline =~ ')' + let num_unmatched_right = s:CountUnbalancedParan( prevline, ')' ) + else + let num_unmatched_right = 0 + " let num_unmatched_right = s:CountUnbalancedParan( prevline, ')' ) + endif + if num_unmatched_left > 0 + " There is a open left paranethesis + " increase indent + let ind = ind + ( &sw * num_unmatched_left ) + elseif num_unmatched_right > 0 + " if it is an unbalanced paranethesis only unindent if + " it was part of a command (ie create table(..) ) + " instead of part of an if (ie if (....) then) which should + " maintain the indent level + let ignore = s:CheckToIgnoreRightParan( prevlnum, num_unmatched_right ) + " echom 'prevl - ) unbalanced - CTIRP - ignore: ' . ignore + + if prevline =~ '^\s*)' + let ignore = ignore + 1 + " echom 'prevl - begins ) unbalanced ignore: ' . ignore + endif + + if (num_unmatched_right - ignore) > 0 + let ind = ind - ( &sw * (num_unmatched_right - ignore) ) + endif + + endif + endif + + + " echom 'CURRENT INDENT: ' . ind . ' LINE: ' . getline(v:lnum) + + " This is a new blank line since we just typed a carriage return + " Check current line; search for simplistic matching start-of-block + let line = getline(v:lnum) + + if line =~? '^\s*els' + " Any line when you type else will automatically back up one + " ident level (ie else, elseif, elsif) + let ind = ind - &sw + " echom 'curr - else - indent ' . ind + elseif line =~? '^\s*end\>' + let ind = s:GetStmtStarterIndent('end', v:lnum) + " General case for end + " let ind = ind - &sw + " echom 'curr - end - indent ' . ind + elseif line =~? '^\s*when\>' + let ind = s:GetStmtStarterIndent('when', v:lnum) + " If the WHEN clause is used with a MERGE or EXCEPTION + " clause, do not change the indent level, since these + " statements do not have a corresponding END statement. + " if stmt_starter =~? 'case' + " let ind = ind - &sw + " endif + " elseif line =~ '^\s*)\s*;\?\s*$' + " elseif line =~ '^\s*)' + elseif line =~ '^\s*)' + let num_unmatched_right = s:CountUnbalancedParan( line, ')' ) + let ignore = s:CheckToIgnoreRightParan( v:lnum, num_unmatched_right ) + " If the line ends in a ), then reduce the indent + " This catches items like: + " CREATE TABLE T1( + " c1 int, + " c2 int + " ); + " But we do not want to unindent a line like: + " IF ( c1 = 1 + " AND c2 = 3 ) THEN + " let num_unmatched_right = s:CountUnbalancedParan( line, ')' ) + " if num_unmatched_right > 0 + " elseif strpart( line, strlen(line)-1, 1 ) =~ ')' + " let ind = ind - &sw + if line =~ '^\s*)' + " let ignore = ignore + 1 + " echom 'curr - begins ) unbalanced ignore: ' . ignore + endif + + if (num_unmatched_right - ignore) > 0 + let ind = ind - ( &sw * (num_unmatched_right - ignore) ) + endif + " endif + endif + + " echom 'final - indent ' . ind + return s:ModuloIndent(ind) +endfunction + +" Restore: +let &cpo= s:keepcpo +unlet s:keepcpo +" vim: ts=4 fdm=marker sw=4 diff --git a/runtime/indent/systemverilog.vim b/runtime/indent/systemverilog.vim new file mode 100644 index 0000000000..b017535535 --- /dev/null +++ b/runtime/indent/systemverilog.vim @@ -0,0 +1,230 @@ +" Vim indent file +" Language: SystemVerilog +" Maintainer: kocha +" Last Change: 12-Aug-2013. + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal indentexpr=SystemVerilogIndent() +setlocal indentkeys=!^F,o,O,0),0},=begin,=end,=join,=endcase,=join_any,=join_none +setlocal indentkeys+==endmodule,=endfunction,=endtask,=endspecify +setlocal indentkeys+==endclass,=endpackage,=endsequence,=endclocking +setlocal indentkeys+==endinterface,=endgroup,=endprogram,=endproperty,=endchecker +setlocal indentkeys+==`else,=`endif + +" Only define the function once. +if exists("*SystemVerilogIndent") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +function SystemVerilogIndent() + + if exists('b:systemverilog_indent_width') + let offset = b:systemverilog_indent_width + else + let offset = &sw + endif + if exists('b:systemverilog_indent_modules') + let indent_modules = offset + else + let indent_modules = 0 + endif + + " Find a non-blank line above the current line. + let lnum = prevnonblank(v:lnum - 1) + + " At the start of the file use zero indent. + if lnum == 0 + return 0 + endif + + let lnum2 = prevnonblank(lnum - 1) + let curr_line = getline(v:lnum) + let last_line = getline(lnum) + let last_line2 = getline(lnum2) + let ind = indent(lnum) + let ind2 = indent(lnum - 1) + let offset_comment1 = 1 + " Define the condition of an open statement + " Exclude the match of //, /* or */ + let sv_openstat = '\(\\|\([*/]\)\@<+-/%^&|!=?:]\([*/]\)\@!\)' + " Define the condition when the statement ends with a one-line comment + let sv_comment = '\(//.*\|/\*.*\*/\s*\)' + if exists('b:verilog_indent_verbose') + let vverb_str = 'INDENT VERBOSE:' + let vverb = 1 + else + let vverb = 0 + endif + + " Indent accoding to last line + " End of multiple-line comment + if last_line =~ '\*/\s*$' && last_line !~ '/\*.\{-}\*/' + let ind = ind - offset_comment1 + if vverb + echo vverb_str "De-indent after a multiple-line comment." + endif + + " Indent after if/else/for/case/always/initial/specify/fork blocks + elseif last_line =~ '`\@' || + \ last_line =~ '^\s*\<\(for\|case\%[[zx]]\|do\|foreach\|randcase\)\>' || + \ last_line =~ '^\s*\<\(always\|always_comb\|always_ff\|always_latch\)\>' || + \ last_line =~ '^\s*\<\(initial\|specify\|fork\|final\)\>' + if last_line !~ '\(;\|\\)\s*' . sv_comment . '*$' || + \ last_line =~ '\(//\|/\*\).*\(;\|\\)\s*' . sv_comment . '*$' + let ind = ind + offset + if vverb | echo vverb_str "Indent after a block statement." | endif + endif + " Indent after function/task/class/package/sequence/clocking/ + " interface/covergroup/property/checkerprogram blocks + elseif last_line =~ '^\s*\<\(function\|task\|class\|package\)\>' || + \ last_line =~ '^\s*\<\(sequence\|clocking\|interface\)\>' || + \ last_line =~ '^\s*\(\w\+\s*:\)\=\s*\' || + \ last_line =~ '^\s*\<\(property\|checker\|program\)\>' + if last_line !~ '\\s*' . sv_comment . '*$' || + \ last_line =~ '\(//\|/\*\).*\(;\|\\)\s*' . sv_comment . '*$' + let ind = ind + offset + if vverb + echo vverb_str "Indent after function/task/class block statement." + endif + endif + + " Indent after module/function/task/specify/fork blocks + elseif last_line =~ '^\s*\(\\s*\)\=\' + let ind = ind + indent_modules + if vverb && indent_modules + echo vverb_str "Indent after module statement." + endif + if last_line =~ '[(,]\s*' . sv_comment . '*$' && + \ last_line !~ '\(//\|/\*\).*[(,]\s*' . sv_comment . '*$' + let ind = ind + offset + if vverb + echo vverb_str "Indent after a multiple-line module statement." + endif + endif + + " Indent after a 'begin' statement + elseif last_line =~ '\(\\)\(\s*:\s*\w\+\)*' . sv_comment . '*$' && + \ last_line !~ '\(//\|/\*\).*\(\\)' && + \ ( last_line2 !~ sv_openstat . '\s*' . sv_comment . '*$' || + \ last_line2 =~ '^\s*[^=!]\+\s*:\s*' . sv_comment . '*$' ) + let ind = ind + offset + if vverb | echo vverb_str "Indent after begin statement." | endif + + " Indent after a '{' or a '(' + elseif last_line =~ '[{(]' . sv_comment . '*$' && + \ last_line !~ '\(//\|/\*\).*[{(]' && + \ ( last_line2 !~ sv_openstat . '\s*' . sv_comment . '*$' || + \ last_line2 =~ '^\s*[^=!]\+\s*:\s*' . sv_comment . '*$' ) + let ind = ind + offset + if vverb | echo vverb_str "Indent after begin statement." | endif + + " De-indent for the end of one-line block + elseif ( last_line !~ '\' || + \ last_line =~ '\(//\|/\*\).*\' ) && + \ last_line2 =~ '\<\(`\@.*' . + \ sv_comment . '*$' && + \ last_line2 !~ '\(//\|/\*\).*\<\(`\@' && + \ last_line2 !~ sv_openstat . '\s*' . sv_comment . '*$' && + \ ( last_line2 !~ '\' || + \ last_line2 =~ '\(//\|/\*\).*\' ) + let ind = ind - offset + if vverb + echo vverb_str "De-indent after the end of one-line statement." + endif + + " Multiple-line statement (including case statement) + " Open statement + " Ident the first open line + elseif last_line =~ sv_openstat . '\s*' . sv_comment . '*$' && + \ last_line !~ '\(//\|/\*\).*' . sv_openstat . '\s*$' && + \ last_line2 !~ sv_openstat . '\s*' . sv_comment . '*$' + let ind = ind + offset + if vverb | echo vverb_str "Indent after an open statement." | endif + + " Close statement + " De-indent for an optional close parenthesis and a semicolon, and only + " if there exists precedent non-whitespace char + elseif last_line =~ ')*\s*;\s*' . sv_comment . '*$' && + \ last_line !~ '^\s*)*\s*;\s*' . sv_comment . '*$' && + \ last_line !~ '\(//\|/\*\).*\S)*\s*;\s*' . sv_comment . '*$' && + \ ( last_line2 =~ sv_openstat . '\s*' . sv_comment . '*$' && + \ last_line2 !~ ';\s*//.*$') && + \ last_line2 !~ '^\s*' . sv_comment . '$' + let ind = ind - offset + if vverb | echo vverb_str "De-indent after a close statement." | endif + + " `ifdef and `else + elseif last_line =~ '^\s*`\<\(ifdef\|else\)\>' + let ind = ind + offset + if vverb + echo vverb_str "Indent after a `ifdef or `else statement." + endif + + endif + + " Re-indent current line + + " De-indent on the end of the block + " join/end/endcase/endfunction/endtask/endspecify + if curr_line =~ '^\s*\<\(join\|join_any\|join_none\|\|end\|endcase\|while\)\>' || + \ curr_line =~ '^\s*\<\(endfunction\|endtask\|endspecify\|endclass\)\>' || + \ curr_line =~ '^\s*\<\(endpackage\|endsequence\|endclocking\|endinterface\)\>' || + \ curr_line =~ '^\s*\<\(endgroup\|endproperty\|endchecker\|endprogram\)\>' || + \ curr_line =~ '^\s*}' + let ind = ind - offset + if vverb | echo vverb_str "De-indent the end of a block." | endif + elseif curr_line =~ '^\s*\' + let ind = ind - indent_modules + if vverb && indent_modules + echo vverb_str "De-indent the end of a module." + endif + + " De-indent on a stand-alone 'begin' + elseif curr_line =~ '^\s*\' + if last_line !~ '^\s*\<\(function\|task\|specify\|module\|class\|package\)\>' || + \ last_line !~ '^\s*\<\(sequence\|clocking\|interface\|covergroup\)\>' || + \ last_line !~ '^\s*\<\(property\|checker\|program\)\>' && + \ last_line !~ '^\s*\()*\s*;\|)\+\)\s*' . sv_comment . '*$' && + \ ( last_line =~ + \ '\<\(`\@' || + \ last_line =~ ')\s*' . sv_comment . '*$' || + \ last_line =~ sv_openstat . '\s*' . sv_comment . '*$' ) + let ind = ind - offset + if vverb + echo vverb_str "De-indent a stand alone begin statement." + endif + endif + + " De-indent after the end of multiple-line statement + elseif curr_line =~ '^\s*)' && + \ ( last_line =~ sv_openstat . '\s*' . sv_comment . '*$' || + \ last_line !~ sv_openstat . '\s*' . sv_comment . '*$' && + \ last_line2 =~ sv_openstat . '\s*' . sv_comment . '*$' ) + let ind = ind - offset + if vverb + echo vverb_str "De-indent the end of a multiple statement." + endif + + " De-indent `else and `endif + elseif curr_line =~ '^\s*`\<\(else\|endif\)\>' + let ind = ind - offset + if vverb | echo vverb_str "De-indent `else and `endif statement." | endif + + endif + + " Return the indention + return ind +endfunction + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim:sw=2 diff --git a/runtime/indent/tcl.vim b/runtime/indent/tcl.vim new file mode 100644 index 0000000000..a92f57d67d --- /dev/null +++ b/runtime/indent/tcl.vim @@ -0,0 +1,75 @@ +" Vim indent file +" Language: Tcl +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-12-20 + +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal indentexpr=GetTclIndent() +setlocal indentkeys=0{,0},!^F,o,O,0] +setlocal nosmartindent + +if exists("*GetTclIndent") + finish +endif + +function s:prevnonblanknoncomment(lnum) + let lnum = prevnonblank(a:lnum) + while lnum > 0 + let line = getline(lnum) + if line !~ '^\s*\(#\|$\)' + break + endif + let lnum = prevnonblank(lnum - 1) + endwhile + return lnum +endfunction + +function s:count_braces(lnum, count_open) + let n_open = 0 + let n_close = 0 + let line = getline(a:lnum) + let pattern = '[{}]' + let i = match(line, pattern) + while i != -1 + if synIDattr(synID(a:lnum, i + 1, 0), 'name') !~ 'tcl\%(Comment\|String\)' + if line[i] == '{' + let n_open += 1 + elseif line[i] == '}' + if n_open > 0 + let n_open -= 1 + else + let n_close += 1 + endif + endif + endif + let i = match(line, pattern, i + 1) + endwhile + return a:count_open ? n_open : n_close +endfunction + +function GetTclIndent() + let line = getline(v:lnum) + if line =~ '^\s*\*' + return cindent(v:lnum) + elseif line =~ '^\s*}' + return indent(v:lnum) - &sw + endif + + let pnum = s:prevnonblanknoncomment(v:lnum - 1) + if pnum == 0 + return 0 + endif + + let ind = indent(pnum) + s:count_braces(pnum, 1) * &sw + + let pline = getline(pnum) + if pline =~ '}\s*$' + let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * &sw + endif + + return ind +endfunction diff --git a/runtime/indent/tcsh.vim b/runtime/indent/tcsh.vim new file mode 100644 index 0000000000..59a9d56f44 --- /dev/null +++ b/runtime/indent/tcsh.vim @@ -0,0 +1,49 @@ +" Vim indent file +" Language: C-shell (tcsh) +" Maintainer: GI , where a='gi1242+vim', b='gmail', c='com' +" Last Modified: Sat 10 Dec 2011 09:23:00 AM EST + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif + +let b:did_indent = 1 + +setlocal indentexpr=TcshGetIndent() +setlocal indentkeys+=e,0=end,0=endsw indentkeys-=0{,0},0),:,0# + +" Only define the function once. +if exists("*TcshGetIndent") + finish +endif + +function TcshGetIndent() + " Find a non-blank line above the current line. + let lnum = prevnonblank(v:lnum - 1) + + " Hit the start of the file, use zero indent. + if lnum == 0 + return 0 + endif + + " Add indent if previous line begins with while or foreach + " OR line ends with case :, default:, else, then or \ + let ind = indent(lnum) + let line = getline(lnum) + if line =~ '\v^\s*%(while|foreach)>|^\s*%(case\s.*:|default:|else)\s*$|%(' + let ind = ind - &sw + endif + + " Subtract indent if current line has on end, endif, case commands + let line = getline(v:lnum) + if line =~ '\v^\s*%(else|end|endif)\s*$' + let ind = ind - &sw + endif + + return ind +endfunction diff --git a/runtime/indent/tex.vim b/runtime/indent/tex.vim new file mode 100644 index 0000000000..7e3a351083 --- /dev/null +++ b/runtime/indent/tex.vim @@ -0,0 +1,295 @@ +" Vim indent file +" Language: LaTeX +" Maintainer: YiChao Zhou +" Created: Sat, 16 Feb 2002 16:50:19 +0100 +" Last Change: 2012 Mar 18 19:19:50 +" Version: 0.7 +" Please email me if you found something we can do. Bug report and +" feature request is welcome. + +" Last Update: {{{ +" 25th Sep 2002, by LH : +" (*) better support for the option +" (*) use some regex instead of several '||'. +" Oct 9th, 2003, by JT: +" (*) don't change indentation of lines starting with '%' +" 2005/06/15, Moshe Kaminsky +" (*) New variables: +" g:tex_items, g:tex_itemize_env, g:tex_noindent_env +" 2011/3/6, by Zhou YiChao +" (*) Don't change indentation of lines starting with '%' +" I don't see any code with '%' and it doesn't work properly +" so I add some code. +" (*) New features: Add smartindent-like indent for "{}" and "[]". +" (*) New variables: g:tex_indent_brace +" 2011/9/25, by Zhou Yichao +" (*) Bug fix: smartindent-like indent for "[]" +" (*) New features: Align with "&". +" (*) New variable: g:tex_indent_and. +" 2011/10/23 by Zhou Yichao +" (*) Bug fix: improve the smartindent-like indent for "{}" and +" "[]". +" 2012/02/27 by Zhou Yichao +" (*) Bug fix: support default folding marker. +" (*) Indent with "&" is not very handy. Make it not enable by +" default. +" 2012/03/06 by Zhou Yichao +" (*) Modify "&" behavior and make it default again. Now "&" +" won't align when there are more then one "&" in the previous +" line. +" (*) Add indent "\left(" and "\right)" +" (*) Trust user when in "verbatim" and "lstlisting" +" 2012/03/11 by Zhou Yichao +" (*) Modify "&" so that only indent when current line start with +" "&". +" 2012/03/12 by Zhou Yichao +" (*) Modify indentkeys. +" 2012/03/18 by Zhou Yichao +" (*) Add &cpo +" 2013/05/02 by Zhou Yichao +" (*) Fix problem about GetTeXIndent checker. Thank Albert Netymk +" for reporting this. +" }}} + +" Document: {{{ +" +" To set the following options (ok, currently it's just one), add a line like +" let g:tex_indent_items = 1 +" to your ~/.vimrc. +" +" * g:tex_indent_brace +" +" If this variable is unset or non-zero, it will use smartindent-like style +" for "{}" and "[]" +" +" * g:tex_indent_items +" +" If this variable is set, item-environments are indented like Emacs does +" it, i.e., continuation lines are indented with a shiftwidth. +" +" NOTE: I've already set the variable below; delete the corresponding line +" if you don't like this behaviour. +" +" Per default, it is unset. +" +" set unset +" ---------------------------------------------------------------- +" \begin{itemize} \begin{itemize} +" \item blablabla \item blablabla +" bla bla bla bla bla bla +" \item blablabla \item blablabla +" bla bla bla bla bla bla +" \end{itemize} \end{itemize} +" +" +" * g:tex_items +" +" A list of tokens to be considered as commands for the beginning of an item +" command. The tokens should be separated with '\|'. The initial '\' should +" be escaped. The default is '\\bibitem\|\\item'. +" +" * g:tex_itemize_env +" +" A list of environment names, separated with '\|', where the items (item +" commands matching g:tex_items) may appear. The default is +" 'itemize\|description\|enumerate\|thebibliography'. +" +" * g:tex_noindent_env +" +" A list of environment names. separated with '\|', where no indentation is +" required. The default is 'document\|verbatim'. +" +" * g:tex_indent_and +" +" If this variable is unset or zero, vim will try to align the line with first +" "&". This is pretty useful when you use environment like table or align. +" Note that this feature need to search back some line, so vim may become +" a little slow. +" +" }}} + +" Only define the function once +if exists("b:did_indent") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" Define global variable {{{ + +let b:did_indent = 1 + +if !exists("g:tex_indent_items") + let g:tex_indent_items = 1 +endif +if !exists("g:tex_indent_brace") + let g:tex_indent_brace = 1 +endif +if !exists("g:tex_indent_and") + let g:tex_indent_and = 1 +endif +if g:tex_indent_items + if !exists("g:tex_itemize_env") + let g:tex_itemize_env = 'itemize\|description\|enumerate\|thebibliography' + endif + if !exists('g:tex_items') + let g:tex_items = '\\bibitem\|\\item' + endif +else + let g:tex_items = '' +endif + +if !exists("g:tex_indent_paretheses") + let g:tex_indent_paretheses = 1 +endif + +if !exists("g:tex_noindent_env") + let g:tex_noindent_env = 'document\|verbatim\|lstlisting' +endif "}}} + +" VIM Setting " {{{ +setlocal autoindent +setlocal nosmartindent +setlocal indentexpr=GetTeXIndent() +setlocal indentkeys& +exec 'setlocal indentkeys+=[,(,{,),},],\&' . substitute(g:tex_items, '^\|\(\\|\)', ',=', 'g') +let g:tex_items = '^\s*' . substitute(g:tex_items, '^\(\^\\s\*\)*', '', '') +" }}} + +function! GetTeXIndent() " {{{ + " Find a non-blank line above the current line. + let lnum = prevnonblank(v:lnum - 1) + + " Comment line is not what we need. + while lnum != 0 && getline(lnum) =~ '^\s*%' + let lnum = prevnonblank(lnum - 1) + endwhile + + " At the start of the file use zero indent. + if lnum == 0 + return 0 + endif + + let line = substitute(getline(lnum), '%.*', ' ','g') " last line + let cline = substitute(getline(v:lnum), '%.*', ' ', 'g') " current line + + " We are in verbatim, so do what our user what. + if synIDattr(synID(v:lnum, indent(v:lnum), 1), "name") == "texZone" + if empty(cline) + return indent(lnum) + else + return indent(v:lnum) + end + endif + + " You want to align with "&" + if g:tex_indent_and + " Align only when current line start with "&" + if line =~ '&.*\\\\' && cline =~ '^\s*&' + return indent(v:lnum) + stridx(line, "&") - stridx(cline, "&") + endif + + " set line & lnum to the line which doesn't contain "&" + while lnum != 0 && (stridx(line, "&") != -1 || line =~ '^\s*%') + let lnum = prevnonblank(lnum - 1) + let line = getline(lnum) + endwhile + endif + + + if lnum == 0 + return 0 + endif + + let ind = indent(lnum) + + " New code for comment: retain the indent of current line + if cline =~ '^\s*%' + return indent(v:lnum) + endif + + " Add a 'shiftwidth' after beginning of environments. + " Don't add it for \begin{document} and \begin{verbatim} + ""if line =~ '^\s*\\begin{\(.*\)}' && line !~ 'verbatim' + " LH modification : \begin does not always start a line + " ZYC modification : \end after \begin won't cause wrong indent anymore + if line =~ '\\begin{.*}' && line !~ g:tex_noindent_env + let ind = ind + &sw + + if g:tex_indent_items + " Add another sw for item-environments + if line =~ g:tex_itemize_env + let ind = ind + &sw + endif + endif + endif + + " Subtract a 'shiftwidth' when an environment ends + if cline =~ '\\end{.*}' && cline !~ g:tex_noindent_env + + if g:tex_indent_items + " Remove another sw for item-environments + if cline =~ g:tex_itemize_env + let ind = ind - &sw + endif + endif + + let ind = ind - &sw + endif + + if g:tex_indent_brace + let sum1 = 0 + for i in range(0, strlen(line)-1) + if line[i] == "}" || line[i] == "]" || + \ strpart(line, i, 7) == '\right)' + let sum1 = max([0, sum1-1]) + endif + if line[i] == "{" || line[i] == "[" || + \ strpart(line, i, 6) == '\left(' + let sum1 += 1 + endif + endfor + + let sum2 = 0 + for i in reverse(range(0, strlen(cline)-1)) + if cline[i] == "{" || cline[i] == "[" || + \ strpart(cline, i, 6) == '\left(' + let sum2 = max([0, sum2-1]) + endif + if cline[i] == "}" || cline[i] == "]" || + \ strpart(cline, i, 7) == '\right)' + let sum2 += 1 + endif + endfor + + let ind += (sum1 - sum2) * &sw + endif + + if g:tex_indent_paretheses + endif + + " Special treatment for 'item' + " ---------------------------- + + if g:tex_indent_items + + " '\item' or '\bibitem' itself: + if cline =~ g:tex_items + let ind = ind - &sw + endif + + " lines following to '\item' are intented once again: + if line =~ g:tex_items + let ind = ind + &sw + endif + + endif + + return ind +endfunction "}}} + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: set sw=4 textwidth=80: diff --git a/runtime/indent/tf.vim b/runtime/indent/tf.vim new file mode 100644 index 0000000000..17597734b8 --- /dev/null +++ b/runtime/indent/tf.vim @@ -0,0 +1,72 @@ +" Vim indent file +" Language: tf (TinyFugue) +" Maintainer: Christian J. Robinson +" URL: http://christianrobinson.name/vim/indent/tf.vim +" Last Change: 2002 May 29 + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal indentexpr=GetTFIndent() +setlocal indentkeys-=0{,0} indentkeys-=0# indentkeys-=: +setlocal indentkeys+==/endif,=/then,=/else,=/done,0; + +" Only define the function once: +if exists("*GetTFIndent") + finish +endif + +function GetTFIndent() + " Find a non-blank line above the current line: + let lnum = prevnonblank(v:lnum - 1) + + " No indent for the start of the file: + if lnum == 0 + return 0 + endif + + let ind = indent(lnum) + let line = getline(lnum) + + " No indentation if the previous line didn't end with "\": + " (Could be annoying, but it lets you know if you made a mistake.) + if line !~ '\\$' + return 0 + endif + + if line =~ '\(/def.*\\\|/for.*\(%;\s*\)\@\ +"URL: http://tilde.tildesoftware.net +"Last Change: May 8 09:15:09 CEST 2002 + +if exists ("b:did_indent") + finish +endif + +let b:did_indent = 1 + +setlocal autoindent +setlocal indentexpr=GetTildeIndent(v:lnum) +setlocal indentkeys=o,O,) + +if exists("*GetTildeIndent") + finish +endif + +function GetTildeIndent(lnum) + let plnum = prevnonblank(v:lnum-1) + + if plnum == 0 + return 0 + endif + + if getline(v:lnum) =~ '^\s*\~\(endif\|else\|elseif\|end\)\>' + return indent(v:lnum) - &sw + endif + + if getline(plnum) =~ '^\s*\~\(if\|foreach\|foreach_row\|xml_loop\|file_loop\|file_write\|file_append\|imap_loopsections\|imap_index\|imap_list\|ldap_search\|post_loopall\|post_loop\|file_loop\|sql_loop_num\|sql_dbmsselect\|search\|sql_loop\|post\|for\|function_define\|silent\|while\|setvalbig\|mail_create\|systempipe\|mail_send\|dual\|elseif\|else\)\>' + return indent(plnum) + &sw + else + return -1 + endif +endfunction diff --git a/runtime/indent/treetop.vim b/runtime/indent/treetop.vim new file mode 100644 index 0000000000..a2af78b8c2 --- /dev/null +++ b/runtime/indent/treetop.vim @@ -0,0 +1,38 @@ +" Vim indent file +" Language: Treetop +" Maintainer: Nikolai Weibull +" Latest Revision: 2011-03-14 + +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal indentexpr=GetTreetopIndent() +setlocal indentkeys=0{,0},!^F,o,O,=end +setlocal nosmartindent + +if exists("*GetTreetopIndent") + finish +endif + +function GetTreetopIndent() + let pnum = prevnonblank(v:lnum - 1) + if pnum == 0 + return 0 + endif + + let ind = indent(pnum) + let line = getline(pnum) + + if line =~ '^\s*\%(grammar\|module\|rule\)\>' + let ind += &sw + endif + + let line = getline(v:lnum) + if line =~ '^\s*end\>' + let ind -= &sw + end + + retur ind +endfunction diff --git a/runtime/indent/vb.vim b/runtime/indent/vb.vim new file mode 100644 index 0000000000..55a8ea302a --- /dev/null +++ b/runtime/indent/vb.vim @@ -0,0 +1,78 @@ +" Vim indent file +" Language: VisualBasic (ft=vb) / Basic (ft=basic) / SaxBasic (ft=vb) +" Author: Johannes Zellner +" Last Change: Fri, 18 Jun 2004 07:22:42 CEST +" Small update 2010 Jul 28 by Maxim Kim + +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal autoindent +setlocal indentexpr=VbGetIndent(v:lnum) +setlocal indentkeys& +setlocal indentkeys+==~else,=~elseif,=~end,=~wend,=~case,=~next,=~select,=~loop,<:> + +let b:undo_indent = "set ai< indentexpr< indentkeys<" + +" Only define the function once. +if exists("*VbGetIndent") + finish +endif + +fun! VbGetIndent(lnum) + " labels and preprocessor get zero indent immediately + let this_line = getline(a:lnum) + let LABELS_OR_PREPROC = '^\s*\(\<\k\+\>:\s*$\|#.*\)' + if this_line =~? LABELS_OR_PREPROC + return 0 + endif + + " Find a non-blank line above the current line. + " Skip over labels and preprocessor directives. + let lnum = a:lnum + while lnum > 0 + let lnum = prevnonblank(lnum - 1) + let previous_line = getline(lnum) + if previous_line !~? LABELS_OR_PREPROC + break + endif + endwhile + + " Hit the start of the file, use zero indent. + if lnum == 0 + return 0 + endif + + let ind = indent(lnum) + + " Add + if previous_line =~? '^\s*\<\(begin\|\%(\%(private\|public\|friend\)\s\+\)\=\%(function\|sub\|property\)\|select\|case\|default\|if\|else\|elseif\|do\|for\|while\|enum\|with\)\>' + let ind = ind + &sw + endif + + " Subtract + if this_line =~? '^\s*\\s\+\' + if previous_line !~? '^\s*\' + let ind = ind - 2 * &sw + else + " this case is for an empty 'select' -- 'end select' + " (w/o any case statements) like: + " + " select case readwrite + " end select + let ind = ind - &sw + endif + elseif this_line =~? '^\s*\<\(end\|else\|elseif\|until\|loop\|next\|wend\)\>' + let ind = ind - &sw + elseif this_line =~? '^\s*\<\(case\|default\)\>' + if previous_line !~? '^\s*\' + let ind = ind - &sw + endif + endif + + return ind +endfun + +" vim:sw=4 diff --git a/runtime/indent/verilog.vim b/runtime/indent/verilog.vim new file mode 100644 index 0000000000..ecca462636 --- /dev/null +++ b/runtime/indent/verilog.vim @@ -0,0 +1,223 @@ +" Language: Verilog HDL +" Maintainer: Chih-Tsun Huang +" Last Change: 2011 Dec 10 by Thilo Six +" URL: http://larc.ee.nthu.edu.tw/~cthuang/vim/indent/verilog.vim +" +" Credits: +" Suggestions for improvement, bug reports by +" Leo Butlero +" +" Buffer Variables: +" b:verilog_indent_modules : indenting after the declaration +" of module blocks +" b:verilog_indent_width : indenting width +" b:verilog_indent_verbose : verbose to each indenting +" + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal indentexpr=GetVerilogIndent() +setlocal indentkeys=!^F,o,O,0),=begin,=end,=join,=endcase +setlocal indentkeys+==endmodule,=endfunction,=endtask,=endspecify +setlocal indentkeys+==`else,=`endif + +" Only define the function once. +if exists("*GetVerilogIndent") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +function GetVerilogIndent() + + if exists('b:verilog_indent_width') + let offset = b:verilog_indent_width + else + let offset = &sw + endif + if exists('b:verilog_indent_modules') + let indent_modules = offset + else + let indent_modules = 0 + endif + + " Find a non-blank line above the current line. + let lnum = prevnonblank(v:lnum - 1) + + " At the start of the file use zero indent. + if lnum == 0 + return 0 + endif + + let lnum2 = prevnonblank(lnum - 1) + let curr_line = getline(v:lnum) + let last_line = getline(lnum) + let last_line2 = getline(lnum2) + let ind = indent(lnum) + let ind2 = indent(lnum - 1) + let offset_comment1 = 1 + " Define the condition of an open statement + " Exclude the match of //, /* or */ + let vlog_openstat = '\(\\|\([*/]\)\@<+-/%^&|!=?:]\([*/]\)\@!\)' + " Define the condition when the statement ends with a one-line comment + let vlog_comment = '\(//.*\|/\*.*\*/\s*\)' + if exists('b:verilog_indent_verbose') + let vverb_str = 'INDENT VERBOSE:' + let vverb = 1 + else + let vverb = 0 + endif + + " Indent accoding to last line + " End of multiple-line comment + if last_line =~ '\*/\s*$' && last_line !~ '/\*.\{-}\*/' + let ind = ind - offset_comment1 + if vverb + echo vverb_str "De-indent after a multiple-line comment." + endif + + " Indent after if/else/for/case/always/initial/specify/fork blocks + elseif last_line =~ '`\@' || + \ last_line =~ '^\s*\<\(for\|case\%[[zx]]\)\>' || + \ last_line =~ '^\s*\<\(always\|initial\)\>' || + \ last_line =~ '^\s*\<\(specify\|fork\)\>' + if last_line !~ '\(;\|\\)\s*' . vlog_comment . '*$' || + \ last_line =~ '\(//\|/\*\).*\(;\|\\)\s*' . vlog_comment . '*$' + let ind = ind + offset + if vverb | echo vverb_str "Indent after a block statement." | endif + endif + " Indent after function/task blocks + elseif last_line =~ '^\s*\<\(function\|task\)\>' + if last_line !~ '\\s*' . vlog_comment . '*$' || + \ last_line =~ '\(//\|/\*\).*\(;\|\\)\s*' . vlog_comment . '*$' + let ind = ind + offset + if vverb + echo vverb_str "Indent after function/task block statement." + endif + endif + + " Indent after module/function/task/specify/fork blocks + elseif last_line =~ '^\s*\' + let ind = ind + indent_modules + if vverb && indent_modules + echo vverb_str "Indent after module statement." + endif + if last_line =~ '[(,]\s*' . vlog_comment . '*$' && + \ last_line !~ '\(//\|/\*\).*[(,]\s*' . vlog_comment . '*$' + let ind = ind + offset + if vverb + echo vverb_str "Indent after a multiple-line module statement." + endif + endif + + " Indent after a 'begin' statement + elseif last_line =~ '\(\\)\(\s*:\s*\w\+\)*' . vlog_comment . '*$' && + \ last_line !~ '\(//\|/\*\).*\(\\)' && + \ ( last_line2 !~ vlog_openstat . '\s*' . vlog_comment . '*$' || + \ last_line2 =~ '^\s*[^=!]\+\s*:\s*' . vlog_comment . '*$' ) + let ind = ind + offset + if vverb | echo vverb_str "Indent after begin statement." | endif + + " De-indent for the end of one-line block + elseif ( last_line !~ '\' || + \ last_line =~ '\(//\|/\*\).*\' ) && + \ last_line2 =~ '\<\(`\@.*' . + \ vlog_comment . '*$' && + \ last_line2 !~ + \ '\(//\|/\*\).*\<\(`\@' && + \ last_line2 !~ vlog_openstat . '\s*' . vlog_comment . '*$' && + \ ( last_line2 !~ '\' || + \ last_line2 =~ '\(//\|/\*\).*\' ) + let ind = ind - offset + if vverb + echo vverb_str "De-indent after the end of one-line statement." + endif + + " Multiple-line statement (including case statement) + " Open statement + " Ident the first open line + elseif last_line =~ vlog_openstat . '\s*' . vlog_comment . '*$' && + \ last_line !~ '\(//\|/\*\).*' . vlog_openstat . '\s*$' && + \ last_line2 !~ vlog_openstat . '\s*' . vlog_comment . '*$' + let ind = ind + offset + if vverb | echo vverb_str "Indent after an open statement." | endif + + " Close statement + " De-indent for an optional close parenthesis and a semicolon, and only + " if there exists precedent non-whitespace char + elseif last_line =~ ')*\s*;\s*' . vlog_comment . '*$' && + \ last_line !~ '^\s*)*\s*;\s*' . vlog_comment . '*$' && + \ last_line !~ '\(//\|/\*\).*\S)*\s*;\s*' . vlog_comment . '*$' && + \ ( last_line2 =~ vlog_openstat . '\s*' . vlog_comment . '*$' && + \ last_line2 !~ ';\s*//.*$') && + \ last_line2 !~ '^\s*' . vlog_comment . '$' + let ind = ind - offset + if vverb | echo vverb_str "De-indent after a close statement." | endif + + " `ifdef and `else + elseif last_line =~ '^\s*`\<\(ifdef\|else\)\>' + let ind = ind + offset + if vverb + echo vverb_str "Indent after a `ifdef or `else statement." + endif + + endif + + " Re-indent current line + + " De-indent on the end of the block + " join/end/endcase/endfunction/endtask/endspecify + if curr_line =~ '^\s*\<\(join\|end\|endcase\)\>' || + \ curr_line =~ '^\s*\<\(endfunction\|endtask\|endspecify\)\>' + let ind = ind - offset + if vverb | echo vverb_str "De-indent the end of a block." | endif + elseif curr_line =~ '^\s*\' + let ind = ind - indent_modules + if vverb && indent_modules + echo vverb_str "De-indent the end of a module." + endif + + " De-indent on a stand-alone 'begin' + elseif curr_line =~ '^\s*\' + if last_line !~ '^\s*\<\(function\|task\|specify\|module\)\>' && + \ last_line !~ '^\s*\()*\s*;\|)\+\)\s*' . vlog_comment . '*$' && + \ ( last_line =~ + \ '\<\(`\@' || + \ last_line =~ ')\s*' . vlog_comment . '*$' || + \ last_line =~ vlog_openstat . '\s*' . vlog_comment . '*$' ) + let ind = ind - offset + if vverb + echo vverb_str "De-indent a stand alone begin statement." + endif + endif + + " De-indent after the end of multiple-line statement + elseif curr_line =~ '^\s*)' && + \ ( last_line =~ vlog_openstat . '\s*' . vlog_comment . '*$' || + \ last_line !~ vlog_openstat . '\s*' . vlog_comment . '*$' && + \ last_line2 =~ vlog_openstat . '\s*' . vlog_comment . '*$' ) + let ind = ind - offset + if vverb + echo vverb_str "De-indent the end of a multiple statement." + endif + + " De-indent `else and `endif + elseif curr_line =~ '^\s*`\<\(else\|endif\)\>' + let ind = ind - offset + if vverb | echo vverb_str "De-indent `else and `endif statement." | endif + + endif + + " Return the indention + return ind +endfunction + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim:sw=2 diff --git a/runtime/indent/vhdl.vim b/runtime/indent/vhdl.vim new file mode 100644 index 0000000000..3e847b9575 --- /dev/null +++ b/runtime/indent/vhdl.vim @@ -0,0 +1,423 @@ +" VHDL indent ('93 syntax) +" Language: VHDL +" Maintainer: Gerald Lai +" Version: 1.58 +" Last Change: 2011 Sep 27 +" URL: http://www.vim.org/scripts/script.php?script_id=1450 + +" only load this indent file when no other was loaded +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +" setup indent options for local VHDL buffer +setlocal indentexpr=GetVHDLindent() +setlocal indentkeys=!^F,o,O,0(,0) +setlocal indentkeys+==~begin,=~end\ ,=~end\ ,=~is,=~select,=~when +setlocal indentkeys+==~if,=~then,=~elsif,=~else +setlocal indentkeys+==~case,=~loop,=~for,=~generate,=~record,=~units,=~process,=~block,=~function,=~component,=~procedure +setlocal indentkeys+==~architecture,=~configuration,=~entity,=~package + +" constants +" not a comment +let s:NC = '\%(--.*\)\@ 0 && prevs =~ '^\s*--' + let prevn = prevnonblank(prevn - 1) + let prevs = getline(prevn) + endwhile + let prevs_noi = substitute(prevs, '^\s*', '', '') + + " default indent starts as previous non-comment line's indent + let ind = prevn > 0 ? indent(prevn) : 0 + " backup default + let ind2 = ind + + " indent: special; kill string so it would not affect other filters + " keywords: "report" + string + " where: anywhere in current or previous line + let s0 = s:NC.'\\s*".*"' + if curs =~? s0 + let curs = "" + endif + if prevs =~? s0 + let prevs = "" + endif + + " indent: previous line's comment position, otherwise follow next non-comment line if possible + " keyword: "--" + " where: start of current line + if curs =~ '^\s*--' + let pn = curn - 1 + let ps = getline(pn) + if curs =~ '^\s*--\s' && ps =~ '--' + return indent(pn) + stridx(substitute(ps, '^\s*', '', ''), '--') + else + " find nextnonblank line that is not a comment + let nn = nextnonblank(curn + 1) + let ns = getline(nn) + while nn > 0 && ns =~ '^\s*--' + let nn = nextnonblank(nn + 1) + let ns = getline(nn) + endwhile + let n = indent(nn) + return n != -1 ? n : ind + endif + endif + + " **************************************************************************************** + " indent: align generic variables & port names + " keywords: "procedure" + name, "generic", "map", "port" + "(", provided current line is part of mapping + " where: anywhere in previous 2 lines + " find following previous non-comment line + let pn = prevnonblank(prevn - 1) + let ps = getline(pn) + while pn > 0 && ps =~ '^\s*--' + let pn = prevnonblank(pn - 1) + let ps = getline(pn) + endwhile + if (curs =~ '^\s*)' || curs =~? '^\s*\%(\<\%(procedure\|generic\|map\|port\)\>.*\)\@\s*\S\+\|:[^=]\@=\s*\%(\%(in\|out\|inout\|buffer\|linkage\)\>\|\w\+\s\+:=\)\)') && (prevs =~? s:NC.'\<\%(procedure\s\+\S\+\|generic\|map\|port\)\s*(\%(\s*\w\)\=' || (ps =~? s:NC.'\<\%(procedure\|generic\|map\|port\)'.s:ES && prevs =~ '^\s*(')) + " align closing ")" with opening "(" + if curs =~ '^\s*)' + return ind2 + stridx(prevs_noi, '(') + endif + let m = matchend(prevs_noi, '(\s*\ze\w') + if m != -1 + return ind2 + m + else + if g:vhdl_indent_genportmap + return ind2 + stridx(prevs_noi, '(') + &sw + else + return ind2 + &sw + endif + endif + endif + + " indent: align conditional/select statement + " keywords: variable + "<=" without ";" ending + " where: start of previous line + if prevs =~? '^\s*\S\+\s*<=[^;]*'.s:ES + if g:vhdl_indent_rhsassign + return ind2 + matchend(prevs_noi, '<=\s*\ze.') + else + return ind2 + &sw + endif + endif + + " indent: backtrace previous non-comment lines for next smaller or equal size indent + " keywords: "end" + "record", "units" + " where: start of previous line + " keyword: ")" + " where: start of previous line + " keyword: without "<=" + ";" ending + " where: anywhere in previous line + " keyword: "=>" + ")" ending, provided current line does not begin with ")" + " where: anywhere in previous line + " _note_: indent allowed to leave this filter + let m = 0 + if prevs =~? '^\s*end\s\+\%(record\|units\)\>' + let m = 3 + elseif prevs =~ '^\s*)' + let m = 1 + elseif prevs =~ s:NC.'\%(<=.*\)\@.*'.s:NC.')'.s:ES) + let m = 2 + endif + + if m > 0 + let pn = prevnonblank(prevn - 1) + let ps = getline(pn) + while pn > 0 + let t = indent(pn) + if ps !~ '^\s*--' && (t < ind || (t == ind && m == 3)) + " make sure one of these is true + " keywords: variable + "<=" without ";" ending + " where: start of previous non-comment line + " keywords: "procedure", "generic", "map", "port" + " where: anywhere in previous non-comment line + " keyword: "(" + " where: start of previous non-comment line + if m < 3 && ps !~? '^\s*\S\+\s*<=[^;]*'.s:ES + if ps =~? s:NC.'\<\%(procedure\|generic\|map\|port\)\>' || ps =~ '^\s*(' + let ind = t + endif + break + endif + let ind = t + if m > 1 + " find following previous non-comment line + let ppn = prevnonblank(pn - 1) + let pps = getline(ppn) + while ppn > 0 && pps =~ '^\s*--' + let ppn = prevnonblank(ppn - 1) + let pps = getline(ppn) + endwhile + " indent: follow + " keyword: "select" + " where: end of following previous non-comment line + " keyword: "type" + " where: start of following previous non-comment line + if m == 2 + let s1 = s:NC.'\' + " find previous opening statement of + " keywords: "architecture", "block", "entity", "function", "generate", "procedure", "process" + let s2 = s:NC.s:NE.'\<\%(architecture\|block\|entity\|function\|generate\|procedure\|process\)\>' + + let pn = prevnonblank(curn - 1) + let ps = getline(pn) + while pn > 0 && (ps =~ '^\s*--' || ps !~? s2) + let pn = prevnonblank(pn - 1) + let ps = getline(pn) + + if (ps =~? s:NC.'\') + return indent(pn) - &sw + endif + endwhile + + if (pn == 0) + return ind - &sw + else + return indent(pn) + endif + endif + + " indent: +sw if previous line is previous opening statement + " keywords: "record", "units" + " where: anywhere in current line + if curs =~? s:NC.s:NE.'\<\%(record\|units\)\>' + " find previous opening statement of + " keyword: "type" + let s3 = s:NC.s:NE.'\' + if curs !~? s3.'.*'.s:NC.'\<\%(record\|units\)\>.*'.s:ES && prevs =~? s3 + let ind = ind + &sw + endif + return ind + endif + + " **************************************************************************************** + " indent: 0 + " keywords: "architecture", "configuration", "entity", "library", "package" + " where: start of current line + if curs =~? '^\s*\%(architecture\|configuration\|entity\|library\|package\)\>' + return 0 + endif + + " indent: maintain indent of previous opening statement + " keyword: "is" + " where: start of current line + " find previous opening statement of + " keywords: "architecture", "block", "configuration", "entity", "function", "package", "procedure", "process", "type" + if curs =~? '^\s*\' && prevs =~? s:NC.s:NE.'\<\%(architecture\|block\|configuration\|entity\|function\|package\|procedure\|process\|type\)\>' + return ind2 + endif + + " indent: maintain indent of previous opening statement + " keyword: "then" + " where: start of current line + " find previous opening statement of + " keywords: "elsif", "if" + if curs =~? '^\s*\' && prevs =~? s:NC.'\%(\\|'.s:NE.'\\)' + return ind2 + endif + + " indent: maintain indent of previous opening statement + " keyword: "generate" + " where: start of current line + " find previous opening statement of + " keywords: "for", "if" + if curs =~? '^\s*\' && prevs =~? s:NC.s:NE.'\%(\%(\' + return ind2 + endif + + " indent: +sw + " keywords: "block", "process" + " removed: "begin", "case", "elsif", "if", "loop", "record", "units", "while" + " where: anywhere in previous line + if prevs =~? s:NC.s:NE.'\<\%(block\|process\)\>' + return ind + &sw + endif + + " indent: +sw + " keywords: "architecture", "configuration", "entity", "package" + " removed: "component", "for", "when", "with" + " where: start of previous line + if prevs =~? '^\s*\%(architecture\|configuration\|entity\|package\)\>' + return ind + &sw + endif + + " indent: +sw + " keyword: "select" + " removed: "generate", "is", "=>" + " where: end of previous line + if prevs =~? s:NC.'\" + " where: end of previous line + " _note_: indent allowed to leave this filter + if prevs =~? s:NC.'\%(\\|'.s:NE.'\<\%(loop\|record\|units\)\>\)' || prevs =~? '^\s*\%(component\|else\|for\)\>' || prevs =~? s:NC.'\%('.s:NE.'\\)'.s:ES + let ind = ind + &sw + endif + + " **************************************************************************************** + " indent: -sw + " keywords: "when", provided previous line does not begin with "when", does not end with "is" + " where: start of current line + let s4 = '^\s*when\>' + if curs =~? s4 + if prevs =~? s:NC.'\' + if prevs =~? '^\s*\%(elsif\|'.s5.'\)' + return ind + else + return ind - &sw + endif + endif + + " indent: backtrace previous non-comment lines + " keyword: "end" + "case", "component" + " where: start of current line + let m = 0 + if curs =~? '^\s*end\s\+case\>' + let m = 1 + elseif curs =~? '^\s*end\s\+component\>' + let m = 2 + endif + + if m > 0 + " find following previous non-comment line + let pn = prevn + let ps = getline(pn) + while pn > 0 + if ps !~ '^\s*--' + "indent: -2sw + "keywords: "end" + "case" + "where: start of previous non-comment line + "indent: -sw + "keywords: "when" + "where: start of previous non-comment line + "indent: follow + "keywords: "case" + "where: start of previous non-comment line + if m == 1 + if ps =~? '^\s*end\s\+case\>' + return indent(pn) - 2 * &sw + elseif ps =~? '^\s*when\>' + return indent(pn) - &sw + elseif ps =~? '^\s*case\>' + return indent(pn) + endif + "indent: follow + "keyword: "component" + "where: start of previous non-comment line + elseif m == 2 + if ps =~? '^\s*component\>' + return indent(pn) + endif + endif + endif + let pn = prevnonblank(pn - 1) + let ps = getline(pn) + endwhile + return ind - &sw + endif + + " indent: -sw + " keyword: ")" + " where: start of current line + if curs =~ '^\s*)' + return ind - &sw + endif + + " indent: 0 + " keywords: "end" + "architecture", "configuration", "entity", "package" + " where: start of current line + if curs =~? '^\s*end\s\+\%(architecture\|configuration\|entity\|package\)\>' + return 0 + endif + + " indent: -sw + " keywords: "end" + identifier, ";" + " where: start of current line + "if curs =~? '^\s*end\s\+\w\+\>' + if curs =~? '^\s*end\%(\s\|;'.s:ES.'\)' + return ind - &sw + endif + + " **************************************************************************************** + " indent: maintain indent of previous opening statement + " keywords: without "procedure", "generic", "map", "port" + ":" but not ":=" + "in", "out", "inout", "buffer", "linkage", variable & ":=" + " where: start of current line + if curs =~? '^\s*\%(\<\%(procedure\|generic\|map\|port\)\>.*\)\@\|\w\+\s\+:=\)' + return ind2 + endif + + " return leftover filtered indent + return ind +endfunction diff --git a/runtime/indent/vim.vim b/runtime/indent/vim.vim new file mode 100644 index 0000000000..8c215733b3 --- /dev/null +++ b/runtime/indent/vim.vim @@ -0,0 +1,99 @@ +" Vim indent file +" Language: Vim script +" Maintainer: Bram Moolenaar +" Last Change: 2012 Aug 02 + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal indentexpr=GetVimIndent() +setlocal indentkeys+==end,=else,=cat,=fina,=END,0\\ + +let b:undo_indent = "setl indentkeys< indentexpr<" + +" Only define the function once. +if exists("*GetVimIndent") + finish +endif +let s:keepcpo= &cpo +set cpo&vim + +function GetVimIndent() + let ignorecase_save = &ignorecase + try + let &ignorecase = 0 + return GetVimIndentIntern() + finally + let &ignorecase = ignorecase_save + endtry +endfunc + +function GetVimIndentIntern() + " Find a non-blank line above the current line. + let lnum = prevnonblank(v:lnum - 1) + + " If the current line doesn't start with '\' and below a line that starts + " with '\', use the indent of the line above it. + if getline(v:lnum) !~ '^\s*\\' + while lnum > 0 && getline(lnum) =~ '^\s*\\' + let lnum = lnum - 1 + endwhile + endif + + " At the start of the file use zero indent. + if lnum == 0 + return 0 + endif + + " Add a 'shiftwidth' after :if, :while, :try, :catch, :finally, :function + " and :else. Add it three times for a line that starts with '\' after + " a line that doesn't (or g:vim_indent_cont if it exists). + let ind = indent(lnum) + if getline(v:lnum) =~ '^\s*\\' && v:lnum > 1 && getline(lnum) !~ '^\s*\\' + if exists("g:vim_indent_cont") + let ind = ind + g:vim_indent_cont + else + let ind = ind + &sw * 3 + endif + elseif getline(lnum) =~ '^\s*aug\%[roup]' && getline(lnum) !~ '^\s*aug\%[roup]\s*!\=\s\+END' + let ind = ind + &sw + else + let line = getline(lnum) + let i = match(line, '\(^\||\)\s*\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\%[lly]\|fu\%[nction]\|el\%[seif]\)\>') + if i >= 0 + let ind += &sw + if strpart(line, i, 1) == '|' && has('syntax_items') + \ && synIDattr(synID(lnum, i, 1), "name") =~ '\(Comment\|String\)$' + let ind -= &sw + endif + endif + endif + + " If the previous line contains an "end" after a pipe, but not in an ":au" + " command. And not when there is a backslash before the pipe. + " And when syntax HL is enabled avoid a match inside a string. + let line = getline(lnum) + let i = match(line, '[^\\]|\s*\(ene\@!\)') + if i > 0 && line !~ '^\s*au\%[tocmd]' + if !has('syntax_items') || synIDattr(synID(lnum, i + 2, 1), "name") !~ '\(Comment\|String\)$' + let ind = ind - &sw + endif + endif + + + " Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry, + " :endfun, :else and :augroup END. + if getline(v:lnum) =~ '^\s*\(ene\@!\|cat\|fina\|el\|aug\%[roup]\s*!\=\s\+END\)' + let ind = ind - &sw + endif + + return ind +endfunction + +let &cpo = s:keepcpo +unlet s:keepcpo + +" vim:sw=2 diff --git a/runtime/indent/vroom.vim b/runtime/indent/vroom.vim new file mode 100644 index 0000000000..10efb0eb90 --- /dev/null +++ b/runtime/indent/vroom.vim @@ -0,0 +1,21 @@ +" Vim indent file +" Language: Vroom (vim testing and executable documentation) +" Maintainer: David Barnett (https://github.com/google/vim-ft.vroom) +" Last Change: 2014 Jul 23 + +if exists('b:did_indent') + finish +endif +let b:did_indent = 1 + +let s:cpo_save = &cpo +set cpo-=C + + +let b:undo_indent = 'setlocal autoindent<' + +setlocal autoindent + + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/indent/xf86conf.vim b/runtime/indent/xf86conf.vim new file mode 100644 index 0000000000..4174a24224 --- /dev/null +++ b/runtime/indent/xf86conf.vim @@ -0,0 +1,37 @@ +" Vim indent file +" Language: XFree86 Configuration File +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-12-20 + +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal indentexpr=GetXF86ConfIndent() +setlocal indentkeys=!^F,o,O,=End +setlocal nosmartindent + +if exists("*GetXF86ConfIndent") + finish +endif + +function GetXF86ConfIndent() + let lnum = prevnonblank(v:lnum - 1) + + if lnum == 0 + return 0 + endif + + let ind = indent(lnum) + + if getline(lnum) =~? '^\s*\(Sub\)\=Section\>' + let ind = ind + &sw + endif + + if getline(v:lnum) =~? '^\s*End\(Sub\)\=Section\>' + let ind = ind - &sw + endif + + return ind +endfunction diff --git a/runtime/indent/xhtml.vim b/runtime/indent/xhtml.vim new file mode 100644 index 0000000000..2197b7901c --- /dev/null +++ b/runtime/indent/xhtml.vim @@ -0,0 +1,12 @@ +" Vim indent file +" Language: XHTML +" Maintainer: Bram Moolenaar (for now) +" Last Change: 2005 Jun 24 + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif + +" Handled like HTML for now. +runtime! indent/html.vim diff --git a/runtime/indent/xinetd.vim b/runtime/indent/xinetd.vim new file mode 100644 index 0000000000..c8127237e8 --- /dev/null +++ b/runtime/indent/xinetd.vim @@ -0,0 +1,55 @@ +" Vim indent file +" Language: xinetd.conf(5) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-12-20 + +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal indentexpr=GetXinetdIndent() +setlocal indentkeys=0{,0},!^F,o,O +setlocal nosmartindent + +if exists("*GetXinetdIndent") + finish +endif +let s:keepcpo= &cpo +set cpo&vim + +function s:count_braces(lnum, count_open) + let n_open = 0 + let n_close = 0 + let line = getline(a:lnum) + let pattern = '[{}]' + let i = match(line, pattern) + while i != -1 + if synIDattr(synID(a:lnum, i + 1, 0), 'name') !~ 'ld\%(Comment\|String\)' + if line[i] == '{' + let n_open += 1 + elseif line[i] == '}' + if n_open > 0 + let n_open -= 1 + else + let n_close += 1 + endif + endif + endif + let i = match(line, pattern, i + 1) + endwhile + return a:count_open ? n_open : n_close +endfunction + +function GetXinetdIndent() + let pnum = prevnonblank(v:lnum - 1) + if pnum == 0 + return 0 + endif + + return indent(pnum) + s:count_braces(pnum, 1) * &sw + \ - s:count_braces(v:lnum, 0) * &sw +endfunction + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/indent/xml.vim b/runtime/indent/xml.vim new file mode 100644 index 0000000000..dbe5be5f25 --- /dev/null +++ b/runtime/indent/xml.vim @@ -0,0 +1,107 @@ +" Language: xml +" Maintainer: Johannes Zellner +" Last Change: 2012 Jul 25 +" Notes: 1) does not indent pure non-xml code (e.g. embedded scripts) +" 2) will be confused by unbalanced tags in comments +" or CDATA sections. +" 2009-05-26 patch by Nikolai Weibull +" TODO: implement pre-like tags, see xml_indent_open / xml_indent_close + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 +let s:keepcpo= &cpo +set cpo&vim + +" [-- local settings (must come before aborting the script) --] +setlocal indentexpr=XmlIndentGet(v:lnum,1) +setlocal indentkeys=o,O,*,<>>,<<>,/,{,} + +if !exists('b:xml_indent_open') + let b:xml_indent_open = '.\{-}<\a' + " pre tag, e.g.
+ " let b:xml_indent_open = '.\{-}<[/]\@!\(address\)\@!' +endif + +if !exists('b:xml_indent_close') + let b:xml_indent_close = '.\{-} + " let b:xml_indent_close = '.\{-}XmlIndentWithPattern(line, pat) + let s = substitute('x'.a:line, a:pat, "\1", 'g') + return strlen(substitute(s, "[^\1].*$", '', '')) +endfun + +" [-- check if it's xml --] +fun! XmlIndentSynCheck(lnum) + if '' != &syntax + let syn1 = synIDattr(synID(a:lnum, 1, 1), 'name') + let syn2 = synIDattr(synID(a:lnum, strlen(getline(a:lnum)) - 1, 1), 'name') + if '' != syn1 && syn1 !~ 'xml' && '' != syn2 && syn2 !~ 'xml' + " don't indent pure non-xml code + return 0 + elseif syn1 =~ '^xmlComment' && syn2 =~ '^xmlComment' + " indent comments specially + return -1 + endif + endif + return 1 +endfun + +" [-- return the sum of indents of a:lnum --] +fun! XmlIndentSum(lnum, style, add) + let line = getline(a:lnum) + if a:style == match(line, '^\s*XmlIndentWithPattern(line, b:xml_indent_open) + \ - XmlIndentWithPattern(line, b:xml_indent_close) + \ - XmlIndentWithPattern(line, '.\{-}/>'))) + a:add + else + return a:add + endif +endfun + +fun! XmlIndentGet(lnum, use_syntax_check) + " Find a non-empty line above the current line. + let lnum = prevnonblank(a:lnum - 1) + + " Hit the start of the file, use zero indent. + if lnum == 0 + return 0 + endif + + if a:use_syntax_check + let check_lnum = XmlIndentSynCheck(lnum) + let check_alnum = XmlIndentSynCheck(a:lnum) + if 0 == check_lnum || 0 == check_alnum + return indent(a:lnum) + elseif -1 == check_lnum || -1 == check_alnum + return -1 + endif + endif + + let ind = XmlIndentSum(lnum, -1, indent(lnum)) + let ind = XmlIndentSum(a:lnum, 0, ind) + + return ind +endfun + +let &cpo = s:keepcpo +unlet s:keepcpo + +" vim:ts=8 diff --git a/runtime/indent/xsd.vim b/runtime/indent/xsd.vim new file mode 100644 index 0000000000..59e0b60870 --- /dev/null +++ b/runtime/indent/xsd.vim @@ -0,0 +1,13 @@ +" Vim indent file +" Language: .xsd files (XML Schema) +" Maintainer: Nobody +" Last Change: 2005 Jun 09 + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif + +" Use XML formatting rules +runtime! indent/xml.vim + diff --git a/runtime/indent/xslt.vim b/runtime/indent/xslt.vim new file mode 100644 index 0000000000..ff93d69d7b --- /dev/null +++ b/runtime/indent/xslt.vim @@ -0,0 +1,13 @@ +" Vim indent file +" Language: XSLT .xslt files +" Maintainer: David Fishburn +" Last Change: Wed May 14 2003 8:48:41 PM + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif + +" Use XML formatting rules +runtime! indent/xml.vim + diff --git a/runtime/indent/yacc.vim b/runtime/indent/yacc.vim new file mode 100644 index 0000000000..2ab7d7b38c --- /dev/null +++ b/runtime/indent/yacc.vim @@ -0,0 +1,41 @@ +" Vim indent file +" Language: YACC input file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-12-20 + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif + +let b:did_indent = 1 + +setlocal indentexpr=GetYaccIndent() +setlocal indentkeys=!^F,o,O +setlocal nosmartindent + +" Only define the function once. +if exists("*GetYaccIndent") + finish +endif + +function GetYaccIndent() + if v:lnum == 1 + return 0 + endif + + let ind = indent(v:lnum - 1) + let line = getline(v:lnum - 1) + + if line == '' + let ind = 0 + elseif line =~ '^\w\+\s*:' + let ind = ind + matchend(line, '^\w\+\s*') + elseif line =~ '^\s*;' + let ind = 0 + else + let ind = indent(v:lnum) + endif + + return ind +endfunction diff --git a/runtime/indent/yaml.vim b/runtime/indent/yaml.vim new file mode 100644 index 0000000000..1d03715773 --- /dev/null +++ b/runtime/indent/yaml.vim @@ -0,0 +1,132 @@ +" Vim indent file +" Language: YAML +" Maintainer: Nikolai Pavlov + +" Only load this indent file when no other was loaded. +if exists('b:did_indent') + finish +endif + +let s:save_cpo = &cpo +set cpo&vim + +let b:did_indent = 1 + +setlocal indentexpr=GetYAMLIndent(v:lnum) +setlocal indentkeys=!^F,o,O,0#,0},0],<:>,- +setlocal nosmartindent + +let b:undo_indent = 'setlocal indentexpr< indentkeys< smartindent<' + +" Only define the function once. +if exists('*GetYAMLIndent') + finish +endif + +if exists('*shiftwidth') + let s:shiftwidth = function('shiftwidth') +else + function s:shiftwidth() + return &shiftwidth + endfunction +endif + +function s:FindPrevLessIndentedLine(lnum, ...) + let prevlnum = prevnonblank(a:lnum-1) + let curindent = a:0 ? a:1 : indent(a:lnum) + while prevlnum + \&& indent(prevlnum) >= curindent + \&& getline(prevlnum) !~# '^\s*#' + let prevlnum = prevnonblank(prevlnum-1) + endwhile + return prevlnum +endfunction + +function s:FindPrevLEIndentedLineMatchingRegex(lnum, regex) + let plilnum = s:FindPrevLessIndentedLine(a:lnum, indent(a:lnum)+1) + while plilnum && getline(plilnum) !~# a:regex + let plilnum = s:FindPrevLessIndentedLine(plilnum) + endwhile + return plilnum +endfunction + +let s:mapkeyregex='\v^\s*%(\''%([^'']|'''')*\'''. + \ '|\"%([^"\\]|\\.)*\"'. + \ '|%(%(\:\ )@!.)*)\:%(\ |$)' +let s:liststartregex='\v^\s*%(\-%(\ |$))' + +function GetYAMLIndent(lnum) + if a:lnum == 1 || !prevnonblank(a:lnum-1) + return 0 + endif + + let prevlnum = prevnonblank(a:lnum-1) + let previndent = indent(prevlnum) + + let line = getline(a:lnum) + if line =~# '^\s*#' && getline(a:lnum-1) =~# '^\s*#' + " Comment blocks should have identical indent + return previndent + elseif line =~# '^\s*[\]}]' + " Lines containing only closing braces should have previous indent + return indent(s:FindPrevLessIndentedLine(a:lnum)) + endif + + " Ignore comment lines when calculating indent + while getline(prevlnum) =~# '^\s*#' + let prevlnum = prevnonblank(prevlnum-1) + if !prevlnum + return previndent + endif + endwhile + + let prevline = getline(prevlnum) + let previndent = indent(prevlnum) + + " Any examples below assume that shiftwidth=2 + if prevline =~# '\v[{[:]$|[:-]\ [|>][+\-]?%(\s+\#.*|\s*)$' + " Mapping key: + " nested mapping: ... + " + " - { + " key: [ + " list value + " ] + " } + " + " - |- + " Block scalar without indentation indicator + return previndent+s:shiftwidth() + elseif prevline =~# '\v[:-]\ [|>]%(\d+[+\-]?|[+\-]?\d+)%(\#.*|\s*)$' + " - |+2 + " block scalar with indentation indicator + "#^^ indent+2, not indent+shiftwidth + return previndent + str2nr(matchstr(prevline, + \'\v([:-]\ [|>])@<=[+\-]?\d+%([+\-]?%(\s+\#.*|\s*)$)@=')) + elseif prevline =~# '\v\"%([^"\\]|\\.)*\\$' + " "Multiline string \ + " with escaped end" + let qidx = match(prevline, '\v\"%([^"\\]|\\.)*\\') + return virtcol([prevlnum, qidx+1]) + elseif line =~# s:liststartregex + " List line should have indent equal to previous list line unless it was + " caught by one of the previous rules + return indent(s:FindPrevLEIndentedLineMatchingRegex(a:lnum, + \ s:liststartregex)) + elseif line =~# s:mapkeyregex + " Same for line containing mapping key + return indent(s:FindPrevLEIndentedLineMatchingRegex(a:lnum, + \ s:mapkeyregex)) + elseif prevline =~# '^\s*- ' + " - List with + " multiline scalar + return previndent+2 + elseif prevline =~# s:mapkeyregex + " Mapping with: value + " that is multiline scalar + return previndent+s:shiftwidth() + endif + return previndent +endfunction + +let &cpo = s:save_cpo diff --git a/runtime/indent/zimbu.vim b/runtime/indent/zimbu.vim new file mode 100644 index 0000000000..9565b10843 --- /dev/null +++ b/runtime/indent/zimbu.vim @@ -0,0 +1,128 @@ +" Vim indent file +" Language: Zimbu +" Maintainer: Bram Moolenaar +" Last Change: 2012 Sep 08 + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal ai nolisp nocin +setlocal indentexpr=GetZimbuIndent(v:lnum) +setlocal indentkeys=0{,0},!^F,o,O,0=ELSE,0=ELSEIF,0=CASE,0=DEFAULT,0=FINALLY + +" We impose recommended defaults: no Tabs, 'shiftwidth' = 2 +setlocal sw=2 et + +let b:undo_indent = "setl et< sw< ai< indentkeys< indentexpr=" + +" Only define the function once. +if exists("*GetZimbuIndent") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" Come here when loading the script the first time. + +let s:maxoff = 50 " maximum number of lines to look backwards for () + +func GetZimbuIndent(lnum) + let prevLnum = prevnonblank(a:lnum - 1) + if prevLnum == 0 + " This is the first non-empty line, use zero indent. + return 0 + endif + + " Taken from Python indenting: + " If the previous line is inside parenthesis, use the indent of the starting + " line. + " Trick: use the non-existing "dummy" variable to break out of the loop when + " going too far back. + call cursor(prevLnum, 1) + let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW', + \ "line('.') < " . (prevLnum - s:maxoff) . " ? dummy :" + \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" + \ . " =~ '\\(Comment\\|String\\|Char\\)$'") + if parlnum > 0 + let plindent = indent(parlnum) + let plnumstart = parlnum + else + let plindent = indent(prevLnum) + let plnumstart = prevLnum + endif + + + " When inside parenthesis: If at the first line below the parenthesis add + " two 'shiftwidth', otherwise same as previous line. + " i = (a + " + b + " + c) + call cursor(a:lnum, 1) + let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', + \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" + \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" + \ . " =~ '\\(Comment\\|String\\|Char\\)$'") + if p > 0 + if p == prevLnum + " When the start is inside parenthesis, only indent one 'shiftwidth'. + let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', + \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" + \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" + \ . " =~ '\\(Comment\\|String\\|Char\\)$'") + if pp > 0 + return indent(prevLnum) + &sw + endif + return indent(prevLnum) + &sw * 2 + endif + if plnumstart == p + return indent(prevLnum) + endif + return plindent + endif + + let prevline = getline(prevLnum) + let thisline = getline(a:lnum) + + " If this line is not a comment and the previous one is then move the + " previous line further back. + if thisline !~ '^\s*#' + while prevline =~ '^\s*#' + let prevLnum = prevnonblank(prevLnum - 1) + if prevLnum == 0 + " Only comment lines before this, no indent + return 0 + endif + let prevline = getline(prevLnum) + let plindent = indent(prevLnum) + endwhile + endif + + if prevline =~ '^\s*\(IF\|\|ELSEIF\|ELSE\|GENERATE_IF\|\|GENERATE_ELSEIF\|GENERATE_ELSE\|WHILE\|REPEAT\|TRY\|CATCH\|FINALLY\|FOR\|DO\|SWITCH\|CASE\|DEFAULT\|FUNC\|VIRTUAL\|ABSTRACT\|DEFINE\|REPLACE\|FINAL\|PROC\|MAIN\|NEW\|ENUM\|CLASS\|INTERFACE\|BITS\|MODULE\|SHARED\)\>' + let plindent += &sw + endif + if thisline =~ '^\s*\(}\|ELSEIF\>\|ELSE\>\|CATCH\|FINALLY\|GENERATE_ELSEIF\>\|GENERATE_ELSE\>\|UNTIL\>\)' + let plindent -= &sw + endif + if thisline =~ '^\s*\(CASE\>\|DEFAULT\>\)' && prevline !~ '^\s*SWITCH\>' + let plindent -= &sw + endif + + " line up continued comment that started after some code + " String something # comment comment + " # comment + if a:lnum == prevLnum + 1 && thisline =~ '^\s*#' && prevline !~ '^\s*#' + let n = match(prevline, '#') + if n > 1 + let plindent = n + endif + endif + + return plindent +endfunc + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/indent/zsh.vim b/runtime/indent/zsh.vim new file mode 100644 index 0000000000..c5580a10b1 --- /dev/null +++ b/runtime/indent/zsh.vim @@ -0,0 +1,11 @@ +" Vim indent file +" Language: Zsh Shell Script +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:did_indent") + finish +endif + +" Same as sh indenting for now. +runtime! indent/sh.vim diff --git a/runtime/indoff.vim b/runtime/indoff.vim new file mode 100644 index 0000000000..0d930352bb --- /dev/null +++ b/runtime/indoff.vim @@ -0,0 +1,11 @@ +" Vim support file to switch off loading indent files for file types +" +" Maintainer: Bram Moolenaar +" Last Change: 2001 Jun 11 + +if exists("did_indent_on") + unlet did_indent_on +endif + +" Remove all autocommands in the filetypeindent group +silent! au! filetypeindent * diff --git a/runtime/keymap/README.txt b/runtime/keymap/README.txt new file mode 100644 index 0000000000..d42e026933 --- /dev/null +++ b/runtime/keymap/README.txt @@ -0,0 +1,26 @@ +keymap files for Vim + +One of these files is loaded when the 'keymap' option is set. + +The name of the file consists of these parts: + + {language}[-{layout}][_{encoding}].vim + +{language} Name of the language (e.g., "hebrew", "greek") + +{layout} Optional: name of the keyboard layout (e.g., "spanish", + "russian3"). When omitted the layout of the standard + US-english keyboard is assumed. + +{encoding} Optional: character encoding for which this keymap works. + When omitted the "normal" encoding for the language is + assumed. + Use the value the 'encoding' option: lower case only, use '-' + instead of '_'. + +Each file starts with a header, naming the maintainer and the date when it was +last changed. If you find a problem in a keymap file, check if you have the +most recent version. If necessary, report a problem to the maintainer. + +The format of the keymap lines below "loadkeymap" is explained in the Vim help +files, see ":help keymap-file-format". diff --git a/runtime/keymap/accents.vim b/runtime/keymap/accents.vim new file mode 100644 index 0000000000..fed94c5656 --- /dev/null +++ b/runtime/keymap/accents.vim @@ -0,0 +1,78 @@ +" Vim Keymap file for latin1 accents through dead characters +" Maintainer: Bram Moolenaar +" Last Change: 2006 Mar 29 + +" All characters are given literally, conversion to another encoding (e.g., +" UTF-8) should work. +scriptencoding latin1 + +" Use this short name in the status line. +let b:keymap_name = "acc" + +loadkeymap +`A À +'A Á +´A Á +^A  +~A à +:A Ä +'C Ç +´C Ç +`E È +'E É +´E É +^E Ê +`I Ì +'I Í +´I Í +^I Î +~N Ñ +`O Ò +'O Ó +´O Ó +^O Ô +~O Õ +:O Ö +`U Ù +'U Ú +´U Ú +^U Û +:U Ü +'Y Ý +´Y Ý +`a à +'a á +´a á +^a â +~a ã +:a ä +'c ç +´c ç +`e è +'e é +´e é +^e ê +`i ì +'i í +´i í +^i î +~n ñ +`o ò +'o ó +´o ó +^o ô +~o õ +:o ö +`u ù +'u ú +´u ú +^u û +:u ü +'y ý +´y ý +'' ' +´´ ´ +`` ` +^^ ^ +~~ ~ +:: : diff --git a/runtime/keymap/arabic.vim b/runtime/keymap/arabic.vim new file mode 100644 index 0000000000..7eb9a17dd1 --- /dev/null +++ b/runtime/keymap/arabic.vim @@ -0,0 +1,2 @@ +" Assume 'encoding' is set to "latin1" while actually iso-8859-6 is used +source :p:h/arabic_utf-8.vim diff --git a/runtime/keymap/arabic_utf-8.vim b/runtime/keymap/arabic_utf-8.vim new file mode 100644 index 0000000000..aeb4a4f398 --- /dev/null +++ b/runtime/keymap/arabic_utf-8.vim @@ -0,0 +1,86 @@ +" Vim Keymap file for Arabic +" Maintainer : Arabic Support group +" Created by : Nadim Shaikli +" Last Updated : 2003 Apr 26 +" This is for a standard Microsoft Arabic keyboard layout. + +" Use this short name in the status line. +let b:keymap_name = "arab" + +loadkeymap +q " (1590) - DAD +w " (1589) - SAD +e " (1579) - THEH +r " (1602) - QAF +t " (1601) - FEH +y " (1594) - GHAIN +u " (1593) - AIN +i " (1607) - HEH +o " (1582) - KHAH +p " (1581) - HAH +[ " (1580) - JEEM +] " (1583) - DAL +a " (1588) - SHEEN +s " (1587) - SEEN +d " (1610) - YEH +f " (1576) - BEH +g " (1604) - LAM +h " (1575) - ALEF +j " (1578) - TEH +k " (1606) - NOON +l " (1605) - MEEM +; " (1603) - KAF +' " (1591) - TAH +z " (1574) - YEH with HAMZA ABOVE +x " (1569) - HAMZA +c " (1572) - WAW with HAMZA ABOVE +v " (1585) - REH +b " (1604/1575) - LAA (lam alef) +n " (1609) - ALEF MAKSURA +m " (1577) - TEH MARBUTA +, " (1608) - WAW +. " (1586) - ZAIN +/ " (1592) - ZAH +0 " (1632) - Arabic 0 +1 " (1633) - Arabic 1 +2 " (1634) - Arabic 2 +3 " (1635) - Arabic 3 +4 " (1636) - Arabic 4 +5 " (1637) - Arabic 5 +6 " (1638) - Arabic 6 +7 " (1639) - Arabic 7 +8 " (1640) - Arabic 8 +9 " (1641) - Arabic 9 +` " (1584) - THAL +~ " (1617) - Tanween -- SHADDA +Q " (1614) - Tanween -- FATHA +W " (1611) - Tanween -- FATHATAN +E " (1615) - Tanween -- DAMMA +R " (1612) - Tanween -- DAMMATAN +T " (1604/1573) - LAA with HAMZA BELOW +Y " (1573) - ALEF with HAMZA BELOW +U " (96) - ASCII -- ` +I " (247) - ASCII suppl -- div +O " (215) - ASCII suppl -- mul +P " (1563) - Arabic Semicolon +{ " (60) - ASCII -- < +} " (62) - ASCII -- > +A " (1616) - Tanween -- KASRA +S " (1613) - Tanween -- KASRATAN +D " (91) - ASCII -- [ +F " (93) - ASCII -- ] +G " (1604/1571) - LAA with HAMZA ABOVE +H " (1571) - ALEF with HAMZA ABOVE +J " (1600) - TATWEEL +K " (1548) - Arabic Comma +L " (47) - ASCII -- / +Z " (126) - ASCII -- ~ +X " (1618) - Tanween -- SUKUN +C " (123) - ASCII -- { +V " (125) - ASCII -- } +B " (1604/1570) - LAA with MADDA ABOVE +N " (1570) - ALEF with MADDA ABOVE +M " (39) - ASCII -- ' +< " (44) - ASCII -- , +> " (46) - ASCII -- . +? " (1567) - Arabic Question Mark diff --git a/runtime/keymap/belarusian-jcuken.vim b/runtime/keymap/belarusian-jcuken.vim new file mode 100644 index 0000000000..73c84aaae1 --- /dev/null +++ b/runtime/keymap/belarusian-jcuken.vim @@ -0,0 +1,87 @@ +" Vim Keymap file for Belarusian characters, layout 'jcuken', classical variant +" Useful mainly with UTF-8, but may work with other encodings. + +" Derived From: russian-jcuken.vim +" Maintainer: Aliaksei Nestserau +" Last Changed: 2012 Jul 23 + +" All characters are given literally, conversion to another encoding (e.g., +" UTF-8) should work. +scriptencoding utf-8 + +let b:keymap_name = "by" + +loadkeymap +~ Ð CYRILLIC CAPITAL LETTER IO +` Ñ‘ CYRILLIC SMALL LETTER IO +F Ð CYRILLIC CAPITAL LETTER A +< Б CYRILLIC CAPITAL LETTER BE +D Ð’ CYRILLIC CAPITAL LETTER VE +U Г CYRILLIC CAPITAL LETTER GHE +L Д CYRILLIC CAPITAL LETTER DE +T Е CYRILLIC CAPITAL LETTER IE +: Ж CYRILLIC CAPITAL LETTER ZHE +P З CYRILLIC CAPITAL LETTER ZE +B І CYRILLIC CAPITAL LETTER I +Q Й CYRILLIC CAPITAL LETTER SHORT I +R К CYRILLIC CAPITAL LETTER KA +K Л CYRILLIC CAPITAL LETTER EL +V М CYRILLIC CAPITAL LETTER EM +Y Ð CYRILLIC CAPITAL LETTER EN +J О CYRILLIC CAPITAL LETTER O +G П CYRILLIC CAPITAL LETTER PE +H Р CYRILLIC CAPITAL LETTER ER +C С CYRILLIC CAPITAL LETTER ES +N Т CYRILLIC CAPITAL LETTER TE +E У CYRILLIC CAPITAL LETTER U +A Ф CYRILLIC CAPITAL LETTER EF +{ Ð¥ CYRILLIC CAPITAL LETTER HA +W Ц CYRILLIC CAPITAL LETTER TSE +X Ч CYRILLIC CAPITAL LETTER CHE +I Ш CYRILLIC CAPITAL LETTER SHA +O ÐŽ CYRILLIC CAPITAL LETTER ASYLLABIC U +} ' APOSTROPHE +S Ы CYRILLIC CAPITAL LETTER YERU +M Ь CYRILLIC CAPITAL LETTER SOFT SIGN +\" Э CYRILLIC CAPITAL LETTER E +> Ю CYRILLIC CAPITAL LETTER YU +Z Я CYRILLIC CAPITAL LETTER YA +f а CYRILLIC SMALL LETTER A +, б CYRILLIC SMALL LETTER BE +d в CYRILLIC SMALL LETTER VE +u г CYRILLIC SMALL LETTER GHE +l д CYRILLIC SMALL LETTER DE +t е CYRILLIC SMALL LETTER IE +; ж CYRILLIC SMALL LETTER ZHE +p з CYRILLIC SMALL LETTER ZE +b Ñ– CYRILLIC SMALL LETTER I +q й CYRILLIC SMALL LETTER SHORT I +r к CYRILLIC SMALL LETTER KA +k л CYRILLIC SMALL LETTER EL +v м CYRILLIC SMALL LETTER EM +y н CYRILLIC SMALL LETTER EN +j о CYRILLIC SMALL LETTER O +g п CYRILLIC SMALL LETTER PE +h Ñ€ CYRILLIC SMALL LETTER ER +c Ñ CYRILLIC SMALL LETTER ES +n Ñ‚ CYRILLIC SMALL LETTER TE +e у CYRILLIC SMALL LETTER U +a Ñ„ CYRILLIC SMALL LETTER EF +[ Ñ… CYRILLIC SMALL LETTER HA +w ц CYRILLIC SMALL LETTER TSE +x ч CYRILLIC SMALL LETTER CHE +i ш CYRILLIC SMALL LETTER SHA +o Ñž CYRILLIC SMALL LETTER ASYLLABIC U +] ' APOSTROPHE +s Ñ‹ CYRILLIC SMALL LETTER YERU +m ÑŒ CYRILLIC SMALL LETTER SOFT SIGN +' Ñ CYRILLIC SMALL LETTER E +. ÑŽ CYRILLIC SMALL LETTER YU +z Ñ CYRILLIC SMALL LETTER YA +@ " +# ' +$ * +% : +^ , +& . +* ; diff --git a/runtime/keymap/bulgarian-bds.vim b/runtime/keymap/bulgarian-bds.vim new file mode 100644 index 0000000000..3377edbbd8 --- /dev/null +++ b/runtime/keymap/bulgarian-bds.vim @@ -0,0 +1,155 @@ +" Vim keymap file for Bulgarian and Russian characters, "bds" layout. +" Most of it can be used with both utf-8 and cp1251 file encodings, except +" the accented characters which can only be stored in utf-8. +" This file itself is in utf-8. + +" Maintainer: Boyko Bantchev +" URI: http://www.math.bas.bg/bantchev/vim/bulgarian-bds.vim +" Last Changed: 2010 May 4 + +" This keymap corresponds to what is called Bulgarian standard typewriter +" keyboard layout, or "БДС". +" +" Note that, in addition to the Bulgarian alphabet, the BDS layout prescribes +" the presence of the following characters: +" — The Russian letters Ñ‹ (small), and Э and Ñ (capital and small). +" — The latin capital letters I and V – used to type Roman numerals +" without having to leave Cyrillic mode. +" +" Some punctuation characters present in ascii are mapped in BDS to keys +" different from the ones they occupy in the QWERTY layout, because the latter +" keys are used to type other characters. +" +" In this keymap, also defined (besides BDS) are: +" — The Russian letters Ð and Ñ‘ (capital and small), as well as the +" Russian capital letter Ы (see above for the small counterpart). +" This way, using the bulgarian-bds keymap, one can access both +" the Bulgarian and the Russian alphabets. +" — The quotation marks „ “ †‘ ’ (used in the Bulgarian and English +" quotation styles), as well as « » (Russian quotation style). +" — The characters §, â„–, – (en-dash), — (em-dash), …, •, ·, ±, °, ¬, +" ¤, €, ‰, †, ‡, and ¶. +" +" The keymap also defines key combinations for grave and acute accents. +" (Grave accent is used in Bulgarian, acute in Russian, but both accents +" apply to other languages as well.) +" +" For details of what key or key combination maps to what character, please +" see below the map itself. +" +" See also http://www.math.bas.bg/bantchev/vim/kbdbul.html (in Bulgarian). + +scriptencoding utf-8 + +let b:keymap_name = "bds" + +loadkeymap +D Ð CYRILLIC CAPITAL LETTER A +? Б CYRILLIC CAPITAL LETTER BE +L Ð’ CYRILLIC CAPITAL LETTER VE +H Г CYRILLIC CAPITAL LETTER GHE +O Д CYRILLIC CAPITAL LETTER DE +E Е CYRILLIC CAPITAL LETTER IE +E:: Ð CYRILLIC CAPITAL LETTER IO +G Ж CYRILLIC CAPITAL LETTER ZHE +P З CYRILLIC CAPITAL LETTER ZE +R И CYRILLIC CAPITAL LETTER I +X Й CYRILLIC CAPITAL LETTER SHORT I +U К CYRILLIC CAPITAL LETTER KA +> Л CYRILLIC CAPITAL LETTER EL +: М CYRILLIC CAPITAL LETTER EM +K Ð CYRILLIC CAPITAL LETTER EN +F О CYRILLIC CAPITAL LETTER O +M П CYRILLIC CAPITAL LETTER PE +< Р CYRILLIC CAPITAL LETTER ER +I С CYRILLIC CAPITAL LETTER ES +J Т CYRILLIC CAPITAL LETTER TE +W У CYRILLIC CAPITAL LETTER U +B Ф CYRILLIC CAPITAL LETTER EF +N Ð¥ CYRILLIC CAPITAL LETTER HA +{ Ц CYRILLIC CAPITAL LETTER TSE +\" Ч CYRILLIC CAPITAL LETTER CHE +T Ш CYRILLIC CAPITAL LETTER SHA +Y Щ CYRILLIC CAPITAL LETTER SHCHA +C Ъ CYRILLIC CAPITAL LETTER HARD SIGN +CX Ы CYRILLIC CAPITAL LETTER YERU +A Ь CYRILLIC CAPITAL LETTER SOFT SIGN +V Э CYRILLIC CAPITAL LETTER REVERSED E +Z Ю CYRILLIC CAPITAL LETTER YU +S Я CYRILLIC CAPITAL LETTER YA +d а CYRILLIC SMALL LETTER A +\/ б CYRILLIC SMALL LETTER BE +l в CYRILLIC SMALL LETTER VE +h г CYRILLIC SMALL LETTER GHE +o д CYRILLIC SMALL LETTER DE +e е CYRILLIC SMALL LETTER IE +e:: Ñ‘ CYRILLIC SMALL LETTER IO +g ж CYRILLIC SMALL LETTER ZHE +p з CYRILLIC SMALL LETTER ZE +r и CYRILLIC SMALL LETTER I +x й CYRILLIC SMALL LETTER SHORT I +u к CYRILLIC SMALL LETTER KA +\. л CYRILLIC SMALL LETTER EL +; м CYRILLIC SMALL LETTER EM +k н CYRILLIC SMALL LETTER EN +f о CYRILLIC SMALL LETTER O +m п CYRILLIC SMALL LETTER PE +, Ñ€ CYRILLIC SMALL LETTER ER +i Ñ CYRILLIC SMALL LETTER ES +j Ñ‚ CYRILLIC SMALL LETTER TE +w у CYRILLIC SMALL LETTER U +b Ñ„ CYRILLIC SMALL LETTER EF +n Ñ… CYRILLIC SMALL LETTER HA +[ ц CYRILLIC SMALL LETTER TSE +' ч CYRILLIC SMALL LETTER CHE +t ш CYRILLIC SMALL LETTER SHA +y щ CYRILLIC SMALL LETTER SHCHA +c ÑŠ CYRILLIC SMALL LETTER HARD SIGN +Q Ñ‹ CYRILLIC SMALL LETTER YERU +a ÑŒ CYRILLIC SMALL LETTER SOFT SIGN +v Ñ CYRILLIC SMALL LETTER REVERSED E +z ÑŽ CYRILLIC SMALL LETTER YU +s Ñ CYRILLIC SMALL LETTER YA +_ I LATIN CAPITAL LETTER I ++ V LATIN CAPITAL LETTER V +$ " QUOTATION MARK +\\ ( LEFT PARENTHESIS +| ) RIGHT PARENTHESIS +# + PLUS SIGN +q , COMMA +( - HYPHEN-MINUS += . FULL STOP (PERIOD) +* / SOLIDUS (SLASH) +& : COLON +] ; SEMICOLON +^ = EQUALS SIGN +@ ? QUESTION MARK +} § SECTION SIGN (PARAGRAPH SIGN) +) â„– NUMERO SIGN +-- – EN DASH +--- — EM DASH +.. … HORIZONTAL ELLIPSIS +`` “ LEFT DOUBLE QUOTATION MARK +'' †RIGHT DOUBLE QUOTATION MARK +,, „ DOUBLE LOW-9 QUOTATION MARK +`. ‘ LEFT SINGLE QUOTATION MARK +'. ’ RIGHT SINGLE QUOTATION MARK +<< « LEFT-POINTING DOUBLE ANGLE QUOTATION MARK +>> » RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK +** • BULLET +,. · MIDDLE DOT ++- ± PLUS-MINUS SIGN +^o ° DEGREE SIGN +~~ ¬ NOT SIGN +@@ ¤ CURRENCY SIGN +$$ € EURO SIGN +%% ‰ PER MILLE SIGN ++| † DAGGER +++ ‡ DOUBLE DAGGER +|| ¶ PILCROW SIGN + +" Accented characters cannot map onto cp1251 – use utf-8 file encoding. +" To apply an accent to a letter, type the corresponding key combination +" to the immediate right of that letter. +^` COMBINING GRAVE ACCENT +^' COMBINING ACUTE ACCENT diff --git a/runtime/keymap/bulgarian-phonetic.vim b/runtime/keymap/bulgarian-phonetic.vim new file mode 100644 index 0000000000..eab2f15e5c --- /dev/null +++ b/runtime/keymap/bulgarian-phonetic.vim @@ -0,0 +1,135 @@ +" Vim keymap file for Bulgarian and Russian characters, "phonetic" layout. +" Most of it can be used with both utf-8 and cp1251 file encodings, except +" the accented vowels which can only be stored in utf-8. +" This file itself is in utf-8. + +" Maintainer: Boyko Bantchev +" URI: http://www.math.bas.bg/bantchev/vim/bulgarian-phonetic.vim +" Last Changed: 2010 May 4 + +" This keymap corresponds to what is called "phonetic layout" in Bulgaria: +" Cyrillic letters tend to be mapped to their Latin homophones wherever +" there are ones. Most keys corresponding to punctuation characters are +" left unmapped, so they retain their usual (QWERTY) meanings when typing +" Cyrillic. +" +" In addition to the Bulgarian alphabet, the keymap makes accessible the +" following characters: +" — The letters Ð and Ñ‘, Э and Ñ, and Ы and Ñ‹ (in pairs of capital and +" small). These are the letters in the Russian alphabet that are not +" present in Bulgarian, so using the bulgarian-phonetic keymap one can +" type in Russian, too. +" — The quotation marks „ “ †‘ ’ (used in the Bulgarian and English +" quotation styles), as well as « » (Russian quotation style). +" — The characters §, â„–, – (en-dash), — (em-dash), …, •, ·, ±, °, ¬, +" ¤, €, ‰, †, ‡, and ¶. +" +" The keymap also defines key combinations for grave and acute accents. +" (Grave accent is used in Bulgarian, acute in Russian, but both accents +" apply to other languages as well.) +" +" For details of what key or key combination maps to what character, please +" see below the map itself. +" +" See also http://www.math.bas.bg/bantchev/vim/kbdbul.html (in Bulgarian). + +scriptencoding utf-8 + +let b:keymap_name = "pho" + +loadkeymap +A Ð CYRILLIC CAPITAL LETTER A +B Б CYRILLIC CAPITAL LETTER BE +W Ð’ CYRILLIC CAPITAL LETTER VE +G Г CYRILLIC CAPITAL LETTER GHE +D Д CYRILLIC CAPITAL LETTER DE +E Е CYRILLIC CAPITAL LETTER IE +E:: Ð CYRILLIC CAPITAL LETTER IO +V Ж CYRILLIC CAPITAL LETTER ZHE +Z З CYRILLIC CAPITAL LETTER ZE +I И CYRILLIC CAPITAL LETTER I +J Й CYRILLIC CAPITAL LETTER SHORT I +K К CYRILLIC CAPITAL LETTER KA +L Л CYRILLIC CAPITAL LETTER EL +M М CYRILLIC CAPITAL LETTER EM +N Ð CYRILLIC CAPITAL LETTER EN +O О CYRILLIC CAPITAL LETTER O +P П CYRILLIC CAPITAL LETTER PE +R Р CYRILLIC CAPITAL LETTER ER +S С CYRILLIC CAPITAL LETTER ES +T Т CYRILLIC CAPITAL LETTER TE +U У CYRILLIC CAPITAL LETTER U +F Ф CYRILLIC CAPITAL LETTER EF +H Ð¥ CYRILLIC CAPITAL LETTER HA +C Ц CYRILLIC CAPITAL LETTER TSE +~ Ч CYRILLIC CAPITAL LETTER CHE +{ Ш CYRILLIC CAPITAL LETTER SHA +} Щ CYRILLIC CAPITAL LETTER SHCHA +Y Ъ CYRILLIC CAPITAL LETTER HARD SIGN +YI Ы CYRILLIC CAPITAL LETTER YERU +X Ь CYRILLIC CAPITAL LETTER SOFT SIGN +YE Э CYRILLIC CAPITAL LETTER REVERSED E +| Ю CYRILLIC CAPITAL LETTER YU +Q Я CYRILLIC CAPITAL LETTER YA +a а CYRILLIC SMALL LETTER A +b б CYRILLIC SMALL LETTER BE +w в CYRILLIC SMALL LETTER VE +g г CYRILLIC SMALL LETTER GHE +d д CYRILLIC SMALL LETTER DE +e е CYRILLIC SMALL LETTER IE +e:: Ñ‘ CYRILLIC SMALL LETTER IO +v ж CYRILLIC SMALL LETTER ZHE +z з CYRILLIC SMALL LETTER ZE +i и CYRILLIC SMALL LETTER I +j й CYRILLIC SMALL LETTER SHORT I +k к CYRILLIC SMALL LETTER KA +l л CYRILLIC SMALL LETTER EL +m м CYRILLIC SMALL LETTER EM +n н CYRILLIC SMALL LETTER EN +o о CYRILLIC SMALL LETTER O +p п CYRILLIC SMALL LETTER PE +r Ñ€ CYRILLIC SMALL LETTER ER +s Ñ CYRILLIC SMALL LETTER ES +t Ñ‚ CYRILLIC SMALL LETTER TE +u у CYRILLIC SMALL LETTER U +f Ñ„ CYRILLIC SMALL LETTER EF +h Ñ… CYRILLIC SMALL LETTER HA +c ц CYRILLIC SMALL LETTER TSE +` ч CYRILLIC SMALL LETTER CHE +[ ш CYRILLIC SMALL LETTER SHA +] щ CYRILLIC SMALL LETTER SHCHA +y ÑŠ CYRILLIC SMALL LETTER HARD SIGN +yi Ñ‹ CYRILLIC SMALL LETTER YERU +x ÑŒ CYRILLIC SMALL LETTER SOFT SIGN +ye Ñ CYRILLIC SMALL LETTER REVERSED E +\\ ÑŽ CYRILLIC SMALL LETTER YU +q Ñ CYRILLIC SMALL LETTER YA +!! § SECTION SIGN (PARAGRAPH SIGN) +## â„– NUMERO SIGN +-- – EN DASH +--- — EM DASH +.. … HORIZONTAL ELLIPSIS +`` “ LEFT DOUBLE QUOTATION MARK +'' †RIGHT DOUBLE QUOTATION MARK +,, „ DOUBLE LOW-9 QUOTATION MARK +`. ‘ LEFT SINGLE QUOTATION MARK +'. ’ RIGHT SINGLE QUOTATION MARK +<< « LEFT-POINTING DOUBLE ANGLE QUOTATION MARK +>> » RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK +** • BULLET +,. · MIDDLE DOT ++- ± PLUS-MINUS SIGN +^o ° DEGREE SIGN +~~ ¬ NOT SIGN +@@ ¤ CURRENCY SIGN +$$ € EURO SIGN +%% ‰ PER MILLE SIGN ++| † DAGGER +++ ‡ DOUBLE DAGGER +|| ¶ PILCROW SIGN + +" Accented characters cannot map onto cp1251 – use utf-8 file encoding. +" To apply an accent to a letter, type the corresponding key combination +" to the immediate right of that letter. +^` COMBINING GRAVE ACCENT +^' COMBINING ACUTE ACCENT diff --git a/runtime/keymap/canfr-win.vim b/runtime/keymap/canfr-win.vim new file mode 100644 index 0000000000..1907fc5b46 --- /dev/null +++ b/runtime/keymap/canfr-win.vim @@ -0,0 +1,91 @@ +" Vim Keymap file for the normalized Canadian multilingual keyboard +" CAN/CSA Z243.200-92 using the latin1 encoding. +" This mapping is limited in scope, as it assumes that the AltGr +" key works as it typically does in a Windows system with a multilingual +" English keyboard. It probably won't work with the US keyboard on US +" English versions of Windows, because those don't provide the AltGr keys. +" The mapping was tested with Win2k and WinXP. + +" Maintainer: Eric Joanis +" Last Change: 2004 Jan 13 + +" 2003 Dec 04 +" Initial Revision + +" 2004 Jan 13 +" Added the upper case accented characters, forgotten in the initial version. + +" All characters are given literally, conversion to another encoding (e.g., +" UTF-8) should work. +scriptencoding latin1 + +" Use this short name in the status line. +let b:keymap_name = "canfr" + +loadkeymap +< ' +> " +/ é +? É +' è +\" È +\\ à +| À +[a â +[e ê +[i î +[o ô +[u û +[A  +[E Ê +[I Î +[O Ô +[U Û +[[ ^ +{a ä +{e ë +{i ï +{o ö +{u ü +{y ÿ +{A Ä +{E Ë +{I Ï +{O Ö +{U Ü +] ç +} Ç +` / +~ \\ +^ ? +ú « +ø » +¬ < +® > +» ° +Ûa à +Ûe è +Ûi ì +Ûo ò +Ûu ù +ÛA À +ÛE È +ÛI Ì +ÛO Ò +ÛU Ù +ÛÛ ` +Ýa ã +Ýo õ +Ýn ñ +Ýs ß +ÝA à +ÝO Õ +ÝN Ñ +ÝS ß +ÝÝ ~ +à | +· { +¸ } +¹ [ +° ] +½ ¬ diff --git a/runtime/keymap/croatian.vim b/runtime/keymap/croatian.vim new file mode 100644 index 0000000000..b52eba03fa --- /dev/null +++ b/runtime/keymap/croatian.vim @@ -0,0 +1,16 @@ +let s:encoding = &enc +if s:encoding == 'latin1' + if has("unix") + let s:encoding = 'iso-8859-2' + else + let s:encoding = 'cp1250' + endif +endif + +if s:encoding == 'utf-8' + source :p:h/croatian_utf-8.vim +elseif s:encoding == 'cp1250' + source :p:h/croatian_cp1250.vim +else + source :p:h/croatian_iso-8859-2.vim +endif diff --git a/runtime/keymap/croatian_cp1250.vim b/runtime/keymap/croatian_cp1250.vim new file mode 100644 index 0000000000..a5a92e385d --- /dev/null +++ b/runtime/keymap/croatian_cp1250.vim @@ -0,0 +1,65 @@ +" Vim Keymap file for Croatian characters, classical variant, cp1250 encoding +" +" Maintainer: Paul B. Mahol +" Last Changed: 2007 Oct 15 + +scriptencoding cp1250 + +let b:keymap_name = "croatian-cp1250" +" Uncomment line below if you prefer short name +"let b:keymap_name = "hr-cp1250" + +loadkeymap +z y +Z Y +y z +Y Z +[ š +{ Š +] ð +} Ð +; è +: È +' æ +" Æ +\ ž +| Ž +/ - +? _ +> : +< ; +¬ < +® > +â { +î } +æ [ +ç ] +ñ \ +÷ | += + ++ * +- ' +_ ? +@ " +^ & +& / +* ( +( ) +) = +± ~ +ö @ +³ ^ +å € +í § +Û ÷ +Ý × +Ü ¤ +§ ß +µ ° +½ ¸ +· ` +¹ ´ +² ¡ +ë ³ +ì £ +´ ¢ diff --git a/runtime/keymap/croatian_iso-8859-2.vim b/runtime/keymap/croatian_iso-8859-2.vim new file mode 100644 index 0000000000..4afb0a1e82 --- /dev/null +++ b/runtime/keymap/croatian_iso-8859-2.vim @@ -0,0 +1,84 @@ +" Vim Keymap file for Croatian characters, classical variant, iso-8859-2 encoding +" +" Maintainer: Paul B. Mahol +" Last Changed: 2007 Oct 14 + +scriptencoding iso-8859-2 + +let b:keymap_name = "croatian-iso-8859-2" +" Uncomment line below if you prefer short name +"let b:keymap_name = "hr-iso-8859-2" + +loadkeymap +" swap y and z, not important +z y +Z Y +y z +Y Z + +" s< +[ ¹ +" S< +{ © +" D/ +} Ð +" d/ +] ð +" c< +; è +" c' +' æ +" C< +: È +" C' +" Æ +" z< +\ ¾ +" Z< +| ® +÷ | +ö @ +ñ \ +Û ÷ +Ý × +ý × +§ ß +í § +Ü ¤ +ü ¤ +â { +î } +æ [ +ç ] +@ " +^ & +& / +* ( +( ) +) = +_ ? +- ' += + ++ * +/ - +< ; +> : +? _ +± ~ +² · +´ ¢ +µ ° +³ ^ +ì ³ +Ì £ +· ` +¹ ´ +° ½ +­ ¨ + +" you still want to be able to type <, > +¬ < +® > + +` ¸ +½ ¸ diff --git a/runtime/keymap/croatian_utf-8.vim b/runtime/keymap/croatian_utf-8.vim new file mode 100644 index 0000000000..11c005f0c3 --- /dev/null +++ b/runtime/keymap/croatian_utf-8.vim @@ -0,0 +1,68 @@ +" Vim Keymap file for Croatian characters, classical variant, UTF-8 encoding +" +" Maintainer: Paul B. Mahol +" Last Changed: 2007 Oct 14 + +scriptencoding UTF-8 + +let b:keymap_name = "croatian-UTF-8" +" Uncomment line below if you prefer short name +"let b:keymap_name = "hr-UTF-8" + +loadkeymap +z y +Z Y +y z +Y Z +[ Å¡ +{ Å  +] Ä‘ +} Ä +; Ä +: ÄŒ +' ć +" Ć +\ ž +| Ž +@ " +^ & +& / +* ( +( ) +) = +_ ? ++ * += + +- ' +æ [ +ç ] +â { +î } +< ; +> : +/ - +? _ +ö @ +ñ \ +÷ | +Ã¥ € +¬ < +® > +± ~ +² ˇ +³ ^ +´ ˘ +µ ° +· ` +¹ ´ +í § +Û ÷ +Ü ¤ +à × +§ ß +ì Å‚ +ÃŒ Å +° Ë +` ¸ +½ ¸ +­ ¨ diff --git a/runtime/keymap/czech.vim b/runtime/keymap/czech.vim new file mode 100644 index 0000000000..ffca531c0f --- /dev/null +++ b/runtime/keymap/czech.vim @@ -0,0 +1 @@ +source :p:h/czech_utf-8.vim diff --git a/runtime/keymap/czech_utf-8.vim b/runtime/keymap/czech_utf-8.vim new file mode 100644 index 0000000000..0a084742db --- /dev/null +++ b/runtime/keymap/czech_utf-8.vim @@ -0,0 +1,86 @@ +" Maintainer: Å tÄ›pán NÄ›mec +" Last Changed: Fri 25 Jun 2010 22:08:43 CEST + +let b:keymap_name = "czech" + +loadkey +0 é +9 í +8 á +7 ý +6 ž +5 Å™ +4 Ä +3 Å¡ +2 Ä› +1 + +` ; +) 0 +( 9 +* 8 +& 7 +^ 6 +% 5 +$ 4 +# 3 +@ 2 +! 1 +] ) +} ( +[ ú +{ / +' § +\" ! +; ů +: " +/ - +? _ +> : +< ? +| ' +~u ů +~U Å® +\\a ä +\\e ë +\\i ï +\\o ö +\\u ü +\\z ÿ +\\A Ä +\\E Ë +\\I à +\\O Ö +\\U Ü +\\Z Ÿ +=a á +=e é +=i í +=o ó +=u ú +=z ý +=A à +=E É +=I à +=O Ó +=U Ú +=Z à ++c Ä ++d Ä ++e Ä› ++n ň ++r Å™ ++s Å¡ ++t Å¥ ++y ž ++C ÄŒ ++D ÄŽ ++E Äš ++N Ň ++R Ř ++S Å  ++T Ť ++Y Ž +y z +Y Z +z y +Z Y diff --git a/runtime/keymap/dvorak.vim b/runtime/keymap/dvorak.vim new file mode 100644 index 0000000000..77dc530b1b --- /dev/null +++ b/runtime/keymap/dvorak.vim @@ -0,0 +1,82 @@ +" Maintainer: Ashish SHUKLA +" Last Changed: 2009 Jul 04 +" +" All characters are ASCII, conversion to another encoding (e.g., UTF-8) +" should work. + +let b:keymap_name = "en-dv" + +loadkeymap +q ' +w , +e . +r p +t y +y f +u g +i c +o r +p l +[ / +] = +\\ \\ +a a +s o +d e +f u +g i +h d +j h +k t +l n +; s +' - +z ; +x q +c j +v k +b x +n b +m m +, w +. v +/ z +Z : +X Q +C J +V K +B X +N B +M M +< W +> V +? Z +A A +S O +D E +F U +G I +H D +J H +K T +L N +: S +\" _ +Q " +W < +E > +R P +T Y +Y F +U G +I C +O R +P L +{ ? +} + +| | +- [ +_ { += ] ++ } + diff --git a/runtime/keymap/esperanto.vim b/runtime/keymap/esperanto.vim new file mode 100644 index 0000000000..42b3987bb2 --- /dev/null +++ b/runtime/keymap/esperanto.vim @@ -0,0 +1 @@ +source :p:h/esperanto_utf-8.vim diff --git a/runtime/keymap/esperanto_utf-8.vim b/runtime/keymap/esperanto_utf-8.vim new file mode 100644 index 0000000000..3d335cb249 --- /dev/null +++ b/runtime/keymap/esperanto_utf-8.vim @@ -0,0 +1,58 @@ +" Esperanto keymap for utf-8 +" Maintainer: A.J.Mechelynck +" Last Changed: Sat 2003 Mar 15 05:23 + +" This keymap adds the special consonants of Esperanto to an existing Latin +" keyboard. +" +" All keys same as usual, except: +" ^ followed by any of CcGgHhJjSs adds a circumflex on top of the letter +" ù and Ù replaces the grave accent by a breve +" any of CcGgHhJjSsUu followed by X or x maps to consonant with ^ or Uu with +" breve. + +" short keymap name for statusline +let b:keymap_name = "Eo" + +" make cursor bright green when keymap is active +"highlight lCursor guifg=NONE guibg=#00E000 + +" The following digraphs are already defined +" digraph C> 0x0108 c> 0x0109 G> 0x011C g> 0x011D H> 0x0124 h> 0x0125 +" digraph J> 0x0134 j> 0x0135 S> 0x015C s> 0x015D U( 0x016C u( 0x016D + +scriptencoding latin1 + +loadkeymap + +^C " (264) UPPERCASE C WITH CIRCUMFLEX +^c " (265) LOWERCASE c WITH CIRCUMFLEX +^G " (284) UPPERCASE G WITH CIRCUMFLEX +^g " (285) LOWERCASE g WITH CIRCUMFLEX +^H " (292) UPPERCASE H WITH CIRCUMFLEX +^h " (293) LOWERCASE h WITH CIRCUMFLEX +^J " (308) UPPERCASE J WITH CIRCUMFLEX +^j " (309) LOWERCASE j WITH CIRCUMFLEX +^S " (348) UPPERCASE S WITH CIRCUMFLEX +^s " (349) LOWERCASE s WITH CIRCUMFLEX +Ù " (364) UPPERCASE U WITH BREVE +ù " (365) LOWERCASE u WITH BREVE + +CX " (264) UPPERCASE C WITH CIRCUMFLEX +Cx " (264) UPPERCASE C WITH CIRCUMFLEX +cx " (265) LOWERCASE c WITH CIRCUMFLEX +GX " (284) UPPERCASE G WITH CIRCUMFLEX +Gx " (284) UPPERCASE G WITH CIRCUMFLEX +gx " (285) LOWERCASE g WITH CIRCUMFLEX +HX " (292) UPPERCASE H WITH CIRCUMFLEX +Hx " (292) UPPERCASE H WITH CIRCUMFLEX +hx " (293) LOWERCASE h WITH CIRCUMFLEX +JX " (308) UPPERCASE J WITH CIRCUMFLEX +Jx " (308) UPPERCASE J WITH CIRCUMFLEX +jx " (309) LOWERCASE j WITH CIRCUMFLEX +SX " (348) UPPERCASE S WITH CIRCUMFLEX +Sx " (348) UPPERCASE S WITH CIRCUMFLEX +sx " (349) LOWERCASE s WITH CIRCUMFLEX +UX " (364) UPPERCASE U WITH BREVE +Ux " (364) UPPERCASE U WITH BREVE +ux " (365) LOWERCASE u WITH BREVE diff --git a/runtime/keymap/greek.vim b/runtime/keymap/greek.vim new file mode 100644 index 0000000000..eb2c1dedc8 --- /dev/null +++ b/runtime/keymap/greek.vim @@ -0,0 +1,7 @@ +" Assume 'encoding' is set to "latin1" while actually cp1253 or iso-8859-7 is +" being used +if has("win16") || has("win32") || has("win32unix") + source :p:h/greek_cp1253.vim +else + source :p:h/greek_iso-8859-7.vim +endif diff --git a/runtime/keymap/greek_cp1253.vim b/runtime/keymap/greek_cp1253.vim new file mode 100644 index 0000000000..a146477da8 --- /dev/null +++ b/runtime/keymap/greek_cp1253.vim @@ -0,0 +1,119 @@ +" Vim Keymap file for greek +" Maintainer: Grigorios Magklis +" Patched for MS-Windows CP1253: Panagiotis Louridas +" Last Updated: Fri 13 Feb 2004 13:01:33 +" +" This keyboard layout allows all Greek symbols to be typed, +" including accented capitals, diaeresis & accent on the same +" vowel, and the Greek semicolon sign. +" +" accent ";" + letter +" diaeresis ":" + letter +" diaeresis + accent ";" + ":" (or ":" + ";") + letter +" semicolon "q" +" colon "Q" +" greek semicolon "W" +" sigma at end of word "w" +" greek left double-quote "<" twice +" greek right double-quote ">" twice + +" Use this short name in the status line. +let b:keymap_name = "greek" + +loadkeymap +" capital +A " Á +B "  +G " à +D " Ä +E " Å +Z " Æ +H " Ç +U " È +I " É +K " Ê +L " Ë +M " Ì +N " Í +J " Î +O " Ï +P " Ð +R " Ñ +S " Ó +T " Ô +Y " Õ +F " Ö +X " × +C " Ø +V " Ù + +" small +a " á +b " â +g " ã +d " ä +e " å +z " æ +h " ç +u " è +i " é +k " ê +l " ë +m " ì +n " í +j " î +o " ï +p " ð +r " ñ +w " ò +s " ó +t " ô +y " õ +f " ö +x " ÷ +c " ø +v " ù + +" accented capital +;A " ¢ +;E " ¸ +;H " ¹ +;I " º +;Y " ¾ +;O " ¼ +;V " ¿ +" +:I " Ú +:Y " Û + +" accented small +;a " Ü +;e " Ý +;h " Þ +;i " ß +;y " ý +;o " ü +;v " þ +" +:i " ú +:y " û +" +;:i " À +:;i " À +;:y " à +:;y " à + +" symbols +q ; " ; +Q : " : +W " · +; " ´ +: " ¨ +;: " µ +:; " µ + +" quotes +<< " « +>> " » +" " ¡ +" " ¢ diff --git a/runtime/keymap/greek_cp737.vim b/runtime/keymap/greek_cp737.vim new file mode 100644 index 0000000000..dd0b372820 --- /dev/null +++ b/runtime/keymap/greek_cp737.vim @@ -0,0 +1,104 @@ +" Vim Keymap file for greek DOS cp737 +" Maintainer: Panagiotis Louridas +" Last Updated: Thu Mar 23 14:05:45 EET 2006 + +" This keyboard layout allows all Greek symbols to be typed, +" including accented capitals and diaeresis. It does not +" include diaeresis and accent on the same vowel, nor +" the greek quotes, as these were not included in the codepage. +" It includes the Greek semicolon sign. + +" +" accent ";" + letter +" diaeresis ":" + letter +" diaeresis + accent ";" + ":" (or ":" + ";") + letter +" semicolon "q" +" colon "Q" +" greek semicolon "W" +" sigma at end of word "w" + +" Use this short name in the status line. +let b:keymap_name = "greek" + +loadkeymap +" capital +A " € +B " +G " ‚ +D " ƒ +E " „ +Z " … +H " † +U " ‡ +I " ˆ +K " ‰ +L " Š +M " ‹ +N " Œ +J " +O " Ž +P " +R " +S " ‘ +T " ’ +Y " “ +F " ” +X " • +C " – +V " — + +" small +a " ˜ +b " ™ +g " š +d " › +e " œ +z " +h " ž +u " Ÿ +i "   +k " ¡ +l " ¢ +m " £ +n " ¤ +j " ¥ +o " ¦ +p " § +r " ¨ +s " © +w " ª +t " « +y " ¬ +f " ­ +x " ® +c " ¯ +v " à + +" accented capital +;A " ê +;E " ë +;H " ì +;I " í +;O " î +;Y " ï +;V " ð +" +:I " ô +:Y " õ + +" accented small +;a " á +;e " â +;h " ã +;i " å +;o " æ +;y " ç +;v " é +" +:i " ä +:y " è +" +" symbols +q ; " ; +Q : " : +W " ú diff --git a/runtime/keymap/greek_iso-8859-7.vim b/runtime/keymap/greek_iso-8859-7.vim new file mode 100644 index 0000000000..5cfd936b3d --- /dev/null +++ b/runtime/keymap/greek_iso-8859-7.vim @@ -0,0 +1,118 @@ +" Vim Keymap file for greek +" Maintainer: Grigorios Magklis +" Last Updated: Tue 10 Jul 2001 16:50:50 +" +" This keyboard layout allows all Greek symbols to be typed, +" including accented capitals, diaeresis & accent on the same +" vowel, and the Greek semicolon sign. +" +" accent ";" + letter +" diaeresis ":" + letter +" diaeresis + accent ";" + ":" (or ":" + ";") + letter +" semicolon "q" +" colon "Q" +" greek semicolon "W" +" sigma at end of word "w" +" greek left double-quote "<" twice +" greek right double-quote ">" twice + +" Use this short name in the status line. +let b:keymap_name = "greek" + +loadkeymap +" capital +A " Á +B "  +G " à +D " Ä +E " Å +Z " Æ +H " Ç +U " È +I " É +K " Ê +L " Ë +M " Ì +N " Í +J " Î +O " Ï +P " Ð +R " Ñ +S " Ó +T " Ô +Y " Õ +F " Ö +X " × +C " Ø +V " Ù + +" small +a " á +b " â +g " ã +d " ä +e " å +z " æ +h " ç +u " è +i " é +k " ê +l " ë +m " ì +n " í +j " î +o " ï +p " ð +r " ñ +w " ò +s " ó +t " ô +y " õ +f " ö +x " ÷ +c " ø +v " ù + +" accented capital +;A " ¶ +;E " ¸ +;H " ¹ +;I " º +;Y " ¾ +;O " ¼ +;V " ¿ +" +:I " Ú +:Y " Û + +" accented small +;a " Ü +;e " Ý +;h " Þ +;i " ß +;y " ý +;o " ü +;v " þ +" +:i " ú +:y " û +" +;:i " À +:;i " À +;:y " à +:;y " à + +" symbols +q ; " ; +Q : " : +W " · +; " ´ +: " ¨ +;: " µ +:; " µ + +" quotes +<< " « +>> " » +" " ¡ +" " ¢ diff --git a/runtime/keymap/greek_utf-8.vim b/runtime/keymap/greek_utf-8.vim new file mode 100644 index 0000000000..17564542d9 --- /dev/null +++ b/runtime/keymap/greek_utf-8.vim @@ -0,0 +1,622 @@ +" Vim Keymap file for greek +" Maintainer: Panagiotis Louridas +" Last Updated: Thu Mar 23 23:45:02 EET 2006 + +" This file was corrected for Vim after the version adapted for Vim 6 from +" the yudit distribution by Robert Goulding +" +" The monotonic part of this kmap was made by Constantine Stathopoulos +" . +" The polytonic part was made by 04/11-1999, +" Aarhus, Denmark. +" It was modified and completed by A. Tsolomitis +" The licence allows modifications but redistribution of modifications +" should be with another name. + +" The keymap now conforms with the +" LaTeX's-Babel Standard by A. Syropoulos + +" The conventions are as follows: +" EURO SIGN is E$ (0x20AC), +" Drachma sign is D$ (0x20AF) + +" RIGHT an LEFT QUOTATION MARKS (0x00BB), (0x00AB), +" follow the kikbd conventions (;< abd ;>) AND << and >> + +" Apostrofos is corrected in order to agree with the Greek grammar rules +" of Triantafilidis who requires the PSILI (or Koronis) symbol for an +" apostrophe. + +" The Greek ANO TELEIA (0x0387), follows again the kikbd conventions as +" well as the Emacs conventions. So it is produced by both ;. and W + +" All greek accents are added so they can be produced by scholars +" without having to combine them with letters (usufull for grammarians +" in particular) (especially for dasia and psiln we use ' for psili +" (that is apostrophe) and ;' for dasia. This is done in order to +" preserve the posibility to write a plain < or >. + +" Ypogegrammeni is | following the character (the originally proposed +" i after the character is problematic: can't write easily ai or vi) : + +" > dasia " an oxia or baria *always* should follow dasia +" < psili " an oxia or baria *always* should follow psili +" ; tonos +" / oxia +" ` varia +" ~ perispomeni +" : dialytika +" :; or ;: dialytika oxia +" :` or `: dialytika baria +" || a single ypogegrammeni +" vowel followed by | gives ypogegrammeni to the vowel +" -vowel gives vowel with macron +" ^vowel gives vowel with braxy +" -- endash +" --- emdash +" ;b ;p ;f ;u ;r ;k give alternative forms +" && give the Greek kai symbol +" #Q and #q give archaic Qoppa and qoppa +" ;U is capital Theta symbol +" !e and !E are lunate epsilon and Epsilon +" #ST stigma +" #SP sampi +" #G digamma +" #Q qoppa +" ;# avw tovos (for numerals) +" ;## katw tovos (for numerals) + + +" All accents are supported. Even rho with < and > and Rho with < +" Also :~i and :~u and macron and braxy a,i,u and their capitals. +let b:keymap_name = "grk" +loadkeymap +" PUNCTUATION MARKS - SYMBOLS (GREEK SPECIFIC) +" +E$ " EURO SIGN +>> " RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK [GREEK + " EISAGOGIKA/OMOIOMATIKA - DEFINITION + " MISSING FROM UNICODE] +;> " +<< " LEFT-POINTING DOUBLE ANGLE QUOTATION MARK [GREEK + " EISAGOGIKA - DEFINITION MISSING FROM UNICODE] +;< " +Q " COLON [GREEK EPEXIGIMATIKA OR ANO & KATO TELEIA - + " DEFINITION MISSING FROM UNICODE] +q " GREEK QUESTION MARK (EROTIMATIKO) +;. " GREEK ANO TELEIA (KDE/kikbd/Xinput standard) +W " GREEK ANO TELEIA (Emacs standard) +' " GREEK APOSTROFOS +-- " endash +--- " emdash +" +" GREEK DIACRITICS +" +: " DIAERESIS [GREEK DIALYTIKA - DEFINITION MISSING FROM + " UNICODE] +; " GREEK TONOS +:; " GREEK DIALYTIKA Oxia +;: " GREEK DIALYTIKA Oxia +:` " GREEK DIALYTIKA VARIA +`: " GREEK DIALYTIKA VARIA +/ " GREEK OXIA +` " GREEK VARIA +~ " PERISPOMENI +>` " PSILI VARIA +<` " DASIA VARIA +>; " PSILI OXIA +<; " DASIA OXIA +<~ " DASIA PERISPOMENI +>~ " PSILI PERISPOMENI +"For plain psili use apostrophe +;' " (Plain) dasia +" +" +" +" GREEK LETTERS +" +A " GREEK CAPITAL LETTER ALPHA +B " GREEK CAPITAL LETTER BETA +G " GREEK CAPITAL LETTER GAMMA +D " GREEK CAPITAL LETTER DELTA +E " GREEK CAPITAL LETTER EPSILON +Z " GREEK CAPITAL LETTER ZETA +H " GREEK CAPITAL LETTER ETA +U " GREEK CAPITAL LETTER THETA +I " GREEK CAPITAL LETTER IOTA +K " GREEK CAPITAL LETTER KAPPA +L " GREEK CAPITAL LETTER LAMDA +M " GREEK CAPITAL LETTER MU +N " GREEK CAPITAL LETTER NU +J " GREEK CAPITAL LETTER XI +O " GREEK CAPITAL LETTER OMIKRON +P " GREEK CAPITAL LETTER PI +R " GREEK CAPITAL LETTER RHO +S " GREEK CAPITAL LETTER SIGMA +T " GREEK CAPITAL LETTER TAU +Y " GREEK CAPITAL LETTER UPSILON +F " GREEK CAPITAL LETTER PHI +X " GREEK CAPITAL LETTER CHI +C " GREEK CAPITAL LETTER PSI +V " GREEK CAPITAL LETTER OMEGA +a " GREEK SMALL LETTER ALPHA +b " GREEK SMALL LETTER BETA +g " GREEK SMALL LETTER GAMMA +d " GREEK SMALL LETTER DELTA +e " GREEK SMALL LETTER EPSILON +z " GREEK SMALL LETTER ZETA +h " GREEK SMALL LETTER ETA +u " GREEK SMALL LETTER THETA +i " GREEK SMALL LETTER IOTA +k " GREEK SMALL LETTER KAPPA +l " GREEK SMALL LETTER LAMDA +m " GREEK SMALL LETTER MU +n " GREEK SMALL LETTER NU +j " GREEK SMALL LETTER XI +o " GREEK SMALL LETTER OMICRON +p " GREEK SMALL LETTER PI +r " GREEK SMALL LETTER RHO +w " GREEK SMALL LETTER FINAL SIGMA +s " GREEK SMALL LETTER SIGMA +t " GREEK SMALL LETTER TAU +y " GREEK SMALL LETTER UPSILON +f " GREEK SMALL LETTER PHI +x " GREEK SMALL LETTER CHI +c " GREEK SMALL LETTER PSI +v " GREEK SMALL LETTER OMEGA +" +"COMBINED GREEK LETTERS WITH DIACRITICS +" +;A " GREEK CAPITAL LETTER ALPHA WITH TONOS +;E " GREEK CAPITAL LETTER EPSILON WITH TONOS +;H " GREEK CAPITAL LETTER ETA WITH TONOS +;I " GREEK CAPITAL LETTER IOTA WITH TONOS +;O " GREEK CAPITAL LETTER OMICRON WITH TONOS +;Y " GREEK CAPITAL LETTER UPSILON WITH TONOS +;V " GREEK CAPITAL LETTER OMEGA WITH TONOS +:;i " GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS +;:i " GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS +:`i " GREEK SMALL LETTER IOTA WITH DIALYTIKA AND baria +`:i " GREEK SMALL LETTER IOTA WITH DIALYTIKA AND baria +:I " GREEK CAPITAL LETTER IOTA WITH DIALYTIKA +:Y " GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA +;a " GREEK SMALL LETTER ALPHA WITH TONOS +;e " GREEK SMALL LETTER EPSILON WITH TONOS +;h " GREEK SMALL LETTER ETA WITH TONOS +;i " GREEK SMALL LETTER IOTA WITH TONOS +:;y " GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS +;:y " GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS +:`y " GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND baria +`:y " GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND baria +:i " GREEK SMALL LETTER IOTA WITH DIALYTIKA +:y " GREEK SMALL LETTER UPSILON WITH DIALYTIKA +;o " GREEK SMALL LETTER OMICRON WITH TONOS +;y " GREEK SMALL LETTER UPSILON WITH TONOS +;v " GREEK SMALL LETTER OMEGA WITH TONOS + +" +" This area covers 0x1F00-0x1FFF +" +" +" letters with Varia: +" +`A " GREEK CAPITAL LETTER ALPHA WITH VARIA +`E " GREEK CAPITAL LETTER ALPHA WITH VARIA +`H " GREEK CAPITAL LETTER ETA WITH VARIA +`I " GREEK CAPITAL LETTER IOTA WITH VARIA +`O " GREEK CAPITAL LETTER ALPHA WITH VARIA +`Y " GREEK CAPITAL LETTER ALPHA WITH VARIA +`V " GREEK CAPITAL LETTER OMEGA WITH VARIA +`a " GREEK SMALL LETTER ALPHA WITH VARIA +`e " GREEK SMALL LETTER ALPHA WITH VARIA +`h " GREEK SMALL LETTER ETA WITH VARIA +`i " GREEK SMALL LETTER IOTA WITH VARIA +`o " GREEK SMALL LETTER ALPHA WITH VARIA +`y " GREEK SMALL LETTER ALPHA WITH VARIA +`v " GREEK SMALL LETTER OMEGA WITH VARIA +" +" letters with Oxia: +" +/A " GREEK CAPITAL LETTER ALPHA WITH OXIA +/E " GREEK CAPITAL LETTER EPSILON WITH OXIA +/H " GREEK CAPITAL LETTER ETA WITH OXIA +/I " GREEK CAPITAL LETTER IOTA WITH OXIA +/O " GREEK CAPITAL LETTER OMICRON WITH OXIA +/Y " GREEK CAPITAL LETTER UPSILON WITH OXIA +/V " GREEK CAPITAL LETTER OMEGA WITH OXIA +/a " GREEK SMALL LETTER ALPHA WITH OXIA +/e " GREEK SMALL LETTER EPSILON WITH OXIA +/h " GREEK SMALL LETTER ETA WITH OXIA +/i " GREEK SMALL LETTER IOTA WITH OXIA +/o " GREEK SMALL LETTER OMICRON WITH OXIA +/y " GREEK SMALL LETTER UPSILON WITH OXIA +/v " GREEK SMALL LETTER OMEGA WITH OXIA +" +" letters with Psili: +" +>A " GREEK CAPITAL LETTER ALPHA WITH PSILI +>E " GREEK CAPITAL LETTER EPSILON WITH PSILI +>H " GREEK CAPITAL LETTER ETA WITH PSILI +>I " GREEK CAPITAL LETTER IOTA WITH PSILI +>O " GREEK CAPITAL LETTER OMICRON WITH PSILI +>Y " GREEK CAPITAL LETTER UPSILON WITH PSILI +>V " GREEK CAPITAL LETTER OMEGA WITH PSILI +>a " GREEK SMALL LETTER ALPHA WITH PSILI +>e " GREEK SMALL LETTER EPSILON WITH PSILI +>h " GREEK SMALL LETTER ETA WITH PSILI +>i " GREEK SMALL LETTER IOTA WITH PSILI +>o " GREEK SMALL LETTER OMICRON WITH PSILI +>y " GREEK SMALL LETTER UPSILON WITH PSILI +>v " GREEK SMALL LETTER OMEGA WITH PSILI + +" +" Letters with Dasia: +" + " GREEK CAPITAL LETTER ALPHA WITH DASIA + " GREEK CAPITAL LETTER EPSILON WITH DASIA + " GREEK CAPITAL LETTER ETA WITH DASIA + " GREEK CAPITAL LETTER IOTA WITH DASIA + " GREEK CAPITAL LETTER OMICRON WITH DASIA + " GREEK CAPITAL LETTER UPSILON WITH DASIA + " GREEK CAPITAL LETTER OMEGA WITH DASIA + " GREEK SMALL LETTER ALPHA WITH DASIA + " GREEK SMALL LETTER EPSILON WITH DASIA + " GREEK SMALL LETTER ETA WITH DASIA + " GREEK SMALL LETTER IOTA WITH DASIA + " GREEK SMALL LETTER OMICRON WITH DASIA + " GREEK SMALL LETTER UPSILON WITH DASIA + " GREEK SMALL LETTER OMEGA WITH DASIA +" +" letters with Psili and Varia: +" +>`A " GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA +>`E " GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA +>`H " GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA +>`I " GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA +>`O " GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA +>`Y " GREEK CAPITAL LETTER UPSILON WITH PSILI AND VARIA +>`V " GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA +>`a " GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA +>`e " GREEK SMALL LETTER EPSILON WITH PSILI AND VARIA +>`h " GREEK SMALL LETTER ETA WITH PSILI AND VARIA +>`i " GREEK SMALL LETTER IOTA WITH PSILI AND VARIA +>`o " GREEK SMALL LETTER OMICRON WITH PSILI AND VARIA +>`y " GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA +>`v " GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA +" +" Letters with Dasia and Varia: +" +<`A " GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA +<`E " GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA +<`H " GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA +<`I " GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA +<`O " GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA +<`Y " GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA +<`V " GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA +<`a " GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA +<`e " GREEK SMALL LETTER EPSILON WITH DASIA AND VARIA +<`h " GREEK SMALL LETTER ETA WITH DASIA AND VARIA +<`i " GREEK SMALL LETTER IOTA WITH DASIA AND VARIA +<`o " GREEK SMALL LETTER OMICRON WITH DASIA AND VARIA +<`y " GREEK SMALL LETTER UPSILON WITH DASIA AND VARIA +<`v " GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA +" +" letters with Psili and Oxia: +" +>;A " GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA +>;E " GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA +>;H " GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA +>;I " GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA +>;O " GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA +>;Y " GREEK CAPITAL LETTER UPSILON WITH PSILI AND OXIA +>;V " GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA +>;a " GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA +>;e " GREEK SMALL LETTER EPSILON WITH PSILI AND OXIA +>;h " GREEK SMALL LETTER ETA WITH PSILI AND OXIA +>;i " GREEK SMALL LETTER IOTA WITH PSILI AND OXIA +>;o " GREEK SMALL LETTER OMICRON WITH PSILI AND OXIA +>;y " GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA +>;v " GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA +" +" Letters with Dasia and Oxia: +" +<;A " GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA +<;E " GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA +<;H " GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA +<;I " GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA +<;O " GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA +<;Y " GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA +<;V " GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA +<;a " GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA +<;e " GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA +<;h " GREEK SMALL LETTER ETA WITH DASIA AND OXIA +<;i " GREEK SMALL LETTER IOTA WITH DASIA AND OXIA +<;o " GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA +<;y " GREEK SMALL LETTER UPSILON WITH DASIA AND OXIA +<;v " GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA +" +" letters with Psili and Perispomeni: +" +>~A " GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI +>~E " GREEK CAPITAL LETTER EPSILON WITH PSILI AND PERISPOMENI +>~H " GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI +>~I " GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI +>~O " GREEK CAPITAL LETTER OMICRON WITH PSILI AND PERISPOMENI +>~Y " GREEK CAPITAL LETTER UPSILON WITH PSILI AND PERISPOMENI +>~V " GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI +>~a " GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI +>~e " GREEK SMALL LETTER EPSILON WITH PSILI AND PERISPOMENI +>~h " GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI +>~i " GREEK SMALL LETTER IOTA WITH PSILI AND PERISPOMENI +>~o " GREEK SMALL LETTER OMICRON WITH PSILI AND PERISPOMENI +>~y " GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI +>~v " GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI +" +" Letters with Dasia and Perispomeni: +" +<~A " GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI +<~E " GREEK CAPITAL LETTER EPSILON WITH DASIA AND PERISPOMENI +<~H " GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI +<~I " GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI +<~O " GREEK CAPITAL LETTER OMICRON WITH DASIA AND PERISPOMENI +<~Y " GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI +<~V " GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI +<~a " GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI +<~e " GREEK SMALL LETTER EPSILON WITH DASIA AND PERISPOMENI +<~h " GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI +<~i " GREEK SMALL LETTER IOTA WITH DASIA AND PERISPOMENI +<~o " GREEK SMALL LETTER OMICRON WITH DASIA AND PERISPOMENI +<~y " GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI +<~v " GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI +" +" +" +" letters with Ypogegrammeni/Prosgegrammeni: +" +A| " GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI +H| " GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI +V| " GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI +a| " GREEK SMALL LETTER ALPHA WITH YPOGEGRAMMENI +h| " GREEK SMALL LETTER ETA WITH YPOGEGRAMMENI +v| " GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI +" +" +" +" letters with Psili and Ypogegrammeni/Prosgegrammeni: +" +>A| " GREEK CAPITAL LETTER ALPHA WITH PSILI AND + " PROSGEGRAMMENI +>H| " GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI +>V| " GREEK CAPITAL LETTER OMEGA WITH PSILI AND + " PROSGEGRAMMENI +>a| " GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI +>h| " GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI +>v| " GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI +" +" +" +" letters with Dasia and Ypogegrammeni/Prosgegrammeni: +" + " GREEK CAPITAL LETTER ALPHA WITH DASIA AND + " PROSGEGRAMMENI + " GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI + " GREEK CAPITAL LETTER OMEGA WITH DASIA AND + " PROSGEGRAMMENI + " GREEK SMALL LETTER ALPHA WITH DASIA AND YPOGEGRAMMENI + " GREEK SMALL LETTER ETA WITH DASIA AND YPOGEGRAMMENI + " GREEK SMALL LETTER OMEGA WITH DASIA AND YPOGEGRAMMENI +" +" +" +" letters with Psili and Varia and Ypogegrammeni/Prosgegrammeni: +" +>`A| " GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND + " PROSGEGRAMMENI +>`H| " GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND + " PROSGEGRAMMENI +>`V| " GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND + " PROSGEGRAMMENI +>`a| " GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND + " YPOGEGRAMMENI +>`h| " GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND + " YPOGEGRAMMENI +>`v| " GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND + " YPOGEGRAMMENI +" +" +" +" letters with Dasia and Varia and Ypogegrammeni/Prosgegrammeni: +" +<`A| " GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND + " PROSGEGRAMMENI +<`H| " GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND + " PROSGEGRAMMENI +<`V| " GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND + " PROSGEGRAMMENI +<`a| " GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND + " YPOGEGRAMMENI +<`h| " GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND + " YPOGEGRAMMENI +<`v| " GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND + " YPOGEGRAMMENI +" +" letters with Psili and Oxia and Ypogegrammeni/Prosgegrammeni: +" +" +" +>;A| " GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND + " PROSGEGRAMMENI +>;H| " GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND + " PROSGEGRAMMENI +>;V| " GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND + " PROSGEGRAMMENI +>;a| " GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND + " YPOGEGRAMMENI +>;h| " GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND + " YPOGEGRAMMENI +>;v| " GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND + " YPOGEGRAMMENI +" +" letters with Dasia and Oxia and Ypogegrammeni/Prosgegrammeni: +" +" +" +<;A| " GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND + " PROSGEGRAMMENI +<;H| " GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND + " PROSGEGRAMMENI +<;V| " GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND + " PROSGEGRAMMENI +<;a| " GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND + " YPOGEGRAMMENI +<;h| " GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND + " YPOGEGRAMMENI +<;v| " GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND + " YPOGEGRAMMENI +" +" letters with Psili and Perispomeni and Ypogegrammeni/Prosgegrammeni: +" +" +" +>~A| " GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI + " AND PROSGEGRAMMENI +>~H| " GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA + " PERISPOMENI PROSGEGRAMMENI +>~V| " GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI + " AND PROSGEGRAMMENI +>~a| " GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI + " AND YPOGEGRAMMENI +>~h| " GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND + " YPOGEGRAMMENI +>~v| " GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI + " AND YPOGEGRAMMENI +" +" letters with Dasia and Perispomeni and Ypogegrammeni/Prosgegrammeni: +" +" +" +<~A| " GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI + " AND PROSGEGRAMMENI +<~H| " GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI + " AND PROSGEGRAMMENI +<~V| " GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI + " AND PROSGEGRAMMENI +<~a| " GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI + " AND YPOGEGRAMMENI +<~h| " GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND + " YPOGEGRAMMENI +<~v| " GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI + " AND YPOGEGRAMMENI +" +" letters with Perispomeni: +" +" +" +~a " GREEK SMALL LETTER ALPHA WITH PERISPOMENI +~h " GREEK SMALL LETTER ETA WITH PERISPOMENI +~i " GREEK SMALL LETTER IOTA WITH PERISPOMENI +~y " GREEK SMALL LETTER UPSILON WITH PERISPOMENI +~v " GREEK SMALL LETTER OMEGA WITH PERISPOMENI +" +" letters with Perispomeni and Ypogegrammeni: +" +" +" +~a| " GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND + " YPOGEGRAMMENI +~h| " GREEK SMALL LETTER ETA WITH PERISPOMENI AND + " YPOGEGRAMMENI +~v| " GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND + " YPOGEGRAMMENI +" +" +" letters with Varia and Ypogegrammeni: +" +" +" +`a| " GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI +`h| " GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI +`v| " GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI +" +" letters with Oxia and Ypogegrammeni: +" +" +" +;a| " GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI +;h| " GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI +;v| " GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI +" +" +" Combining/Nonspacing comma above (0x0313) instead of Psili: +" +>, " COMBINING COMMA ABOVE +" +" Combining/Nonspacing reversed comma above (0x0314) instead of Dasia: +" +<, " COMBINING REVERSED COMMA ABOVE +" +" +" Greek Quotes if your keyboard supports them +´ " QUOTEDBLLEFT +ª " QUOTEDBLRIGHT +" +" +" + + +" APPENDIX A - Additional characters +" +" +;# " GREEK NUMERAL SIGN +;## " GREEK LOWER NUMERAL SIGN +|| " GREEK YPOGEGRAMMENI +;b " GREEK BETA SYMBOL +;u " GREEK THETA SYMBOL +" " GREEK UPSILON WITH HOOK SYMBOL +" " GREEK UPSILON WITH ACUTE AND HOOK SYMBOL +" " GREEK UPSILON WITH DIAERESIS AND HOOK SYMBOL +;f " GREEK PHI SYMBOL +;p " GREEK PI SYMBOL +#ST " GREEK LETTER STIGMA +#G " GREEK LETTER DIGAMMA +#Q " GREEK LETTER KOPPA +#SP " GREEK LETTER SAMPI +;k " GREEK KAPPA SYMBOL +;r " GREEK RHO SYMBOL +" " GREEK LUNATE SIGMA SYMBOL +" " GREEK LETTER YOT + +:~ "dialytika peripswmevn +~: "dialytika peripswmevn + +:~i "iota dialytika perispomeni +~:i "iota dialytika perispomeni + +:~y "upsilon dialytika perispomeni +~:y "upsilon dialytika perispomeni + +-a "alpha macron +-i "iota macron +-y "upsilon macron +-A "Alpha macron +-I "Iota macron +-Y "Upsilon macron +^a "alpha braxy +^i "iota braxy +^y "upsilon braxy +^A "alpha braxy +^I "iota braxy +^Y "upsilon braxy +>r "rho psili + "rho dasia + + "Rho dasia + +" More Symbols +&& "Greek kai +D$ "Drachma symbol +#Q "Archaic Qoppa +#q "Archaic qoppa +;U "Capital Theta symbol +"!e "Lunate epsilon +"!E "Lunate Epsilon diff --git a/runtime/keymap/hebrew.vim b/runtime/keymap/hebrew.vim new file mode 100644 index 0000000000..0928fca486 --- /dev/null +++ b/runtime/keymap/hebrew.vim @@ -0,0 +1,16 @@ +let encoding = &enc +if encoding == 'latin1' + if has("unix") + let encoding = 'iso-8859-8' + else + let encoding = 'cp1255' + endif +endif + +if encoding == 'utf-8' + source :p:h/hebrew_utf-8.vim +elseif encoding == 'cp1255' + source :p:h/hebrew_cp1255.vim +else + source :p:h/hebrew_iso-8859-8.vim +endif diff --git a/runtime/keymap/hebrew_cp1255.vim b/runtime/keymap/hebrew_cp1255.vim new file mode 100644 index 0000000000..67a8ca7736 --- /dev/null +++ b/runtime/keymap/hebrew_cp1255.vim @@ -0,0 +1,62 @@ +" add in the vowel points, known as 'niqud', which are present in +" CP1255: Note: there are several 'standards' for placement of the vowel +" points, and I ignored all of them. Since we can input English by simply +" pressing Ctrl-^ and eliminating this map, I saw no reason to try to use +" exotic key locations. If you don't like it, that's just too bad :-) +let b:keymap_name = "heb" +loadkeymap +a " ש - shin +b " ×  - nun +c " ב - bet +d " ×’ - gimel +e " ×§ - qof +f " ×› - kaf +g " ×¢ - ayin +h " ×™ - yod +i " ן - final nun +j " ×— - het +k " ל - lamed +l " ך - final kaf +m " צ - tsadi +n " מ - mem +o " × - final mem +p " פ - pe +q / " / - slash +r " ר - resh +s " ד - dalet +t " × - alef +u " ו - vav +v " ×” - he +w ' " ' - single-quote +x " ס - samekh +y " ט - tet +z " ×– - zayin +, " ת - tav +. " ×¥ - final tsadi +; " ×£ - final pe +' , " , - comma +/ . " . - period +` ; " ; - semicolon +" vowels: +A: " sheva +HE " hataf segol +HA " hataf patah +HO " hataf qamats +I " hiriq +AY " tsere +E " segol +AA " patah +AO " qamats +O " holam +U " qubuts +D " dagesh +]T " meteg +]Q " maqaf +]R <Ö¼Char-207> " rafe +]p " paseq +SR " shin-dot +SL " sin-dot +]P " sof-pasuq +VV " double-vav +VY " vav-yod +YY " yod-yod diff --git a/runtime/keymap/hebrew_iso-8859-8.vim b/runtime/keymap/hebrew_iso-8859-8.vim new file mode 100644 index 0000000000..eab3084d50 --- /dev/null +++ b/runtime/keymap/hebrew_iso-8859-8.vim @@ -0,0 +1,41 @@ +" Vim Keymap file for hebrew +" Maintainer : Ron Aaron +" Last Updated: Wed 28 Feb 2001 21:28:51 +" This is the standard Israeli keyboard layout + +" Use this short name in the status line. +let b:keymap_name = "heb" + +loadkeymap +a " ù - shin +b " ð - nun +c " á - bet +d " â - gimel +e " ÷ - qof +f " ë - kaf +g " ò - ayin +h " é - yod +i " ï - final nun +j " ç - het +k " ì - lamed +l " ê - final kaf +m " ö - tsadi +n " î - mem +o " í - final mem +p " ô - pe +q / " / - slash +r " ø - resh +s " ã - dalet +t " à - alef +u " å - vav +v " ä - he +w ' " ' - single-quote +x " ñ - samekh +y " è - tet +z " æ - zayin +, " ú - tav +. " õ - final tsadi +; " ó - final pe +' , " , - comma +/ . " . - period +` ; " ; - semicolon diff --git a/runtime/keymap/hebrew_utf-8.vim b/runtime/keymap/hebrew_utf-8.vim new file mode 100644 index 0000000000..63438845a6 --- /dev/null +++ b/runtime/keymap/hebrew_utf-8.vim @@ -0,0 +1,128 @@ +" Vim Keymap file for hebrew +" Maintainer : Ron Aaron +" Last Updated: Wed 28 Feb 2001 21:28:51 +" This is the standard Israeli keyboard layout with (my nonstandard locations +" for) niqud, for utf: + +" Use this short name in the status line. +let b:keymap_name = "heb" +loadkeymap +a " ש - shin +b " ×  - nun +c " ב - bet +d " ×’ - gimel +e " ×§ - qof +f " ×› - kaf +g " ×¢ - ayin +h " ×™ - yod +i " ן - final nun +j " ×— - het +k " ל - lamed +l " ך - final kaf +m " צ - tsadi +n " מ - mem +o " × - final mem +p " פ - pe +q / " / - slash +r " ר - resh +s " ד - dalet +t " × - alef +u " ו - vav +v " ×” - he +w ' " ' - single-quote +x " ס - samekh +y " ט - tet +z " ×– - zayin +, " ת - tav +. " ×¥ - final tsadi +; " ×£ - final pe +' , " , - comma +/ . " . - period +` ; " ; - semicolon +A: " sheva +HE " hataf segol +HA " hataf patah +HO " hataf qamats +I " hiriq +AY " tsere +E " segol +AA " patah +AO " qamats +O " holam +U " qubuts +D " dagesh +]T " meteg +]Q " maqaf +]R " rafe +]p " paseq +SR " shin-dot +SL " sin-dot +]P " sof-pasuq +VV " double-vav +VY " vav-yod +YY " yod-yod +" cantillation: +C: " etnahta +Cs " segol +CS " shalshelet +Cz " zaqef qatan +CZ " zaqef gadol +Ct " tipeha +Cr " revia +Cq " zarqa +Cp " pashta +C! " yetiv +Cv " tevir +Cg " geresh +C* " geresh qadim +CG " gershayim +CP " qarnei-parah +Cy " yerach-ben-yomo +Co " ole +Ci " iluy +Cd " dehi +Cn " zinor +CC " masora circle +X` " Alternative `ayin +X' " Alternative 'alef +X-d " Alternative dalet +X-h " Alternative he +X-k " Alternative kaf +X-l " Alternative lamed +X-m " Alternative mem-sofit +X-r " Alternative resh +X-t " Alternative tav +X-+ " Alternative plus +XW " shin+shin-dot +Xw " shin+sin-dot +X..W " shin+shin-dot+dagesh +X..w " shin+sin-dot+dagesh +XA " alef+patah +XO " alef+qamats +XI " alef+hiriq (mapiq) +X.b " bet+dagesh +X.g " gimel+dagesh +X.d " dalet+dagesh +X.h " he+dagesh +Xu " vav+dagesh +X.z " zayin+dagesh +X.T " tet+dagesh +X.y " yud+dagesh +X.K " kaf sofit+dagesh +X.k " kaf+dagesh +X.l " lamed+dagesh +X.m " mem+dagesh +X.n " nun+dagesh +X.s " samech+dagesh +X.P " pe sofit+dagesh +X.p " pe+dagesh +X.x " tsadi+dagesh +X.q " qof+dagesh +X.r " resh+dagesh +X.w " shin+dagesh +X.t " tav+dagesh +Xo " vav+holam +XRb " bet+rafe +XRk " kaf+rafe +XRp " pe+rafe +Xal " alef-lamed diff --git a/runtime/keymap/hebrewp.vim b/runtime/keymap/hebrewp.vim new file mode 100644 index 0000000000..a87cdc735d --- /dev/null +++ b/runtime/keymap/hebrewp.vim @@ -0,0 +1,16 @@ +let encoding = &enc +if encoding == 'latin1' + if has("unix") + let encoding = 'iso-8859-8' + else + let encoding = 'cp1255' + endif +endif + +if encoding == 'utf-8' + source :p:h/hebrewp_utf-8.vim +elseif encoding == 'cp1255' + source :p:h/hebrewp_cp1255.vim +else + source :p:h/hebrewp_iso-8859-8.vim +endif diff --git a/runtime/keymap/hebrewp_cp1255.vim b/runtime/keymap/hebrewp_cp1255.vim new file mode 100644 index 0000000000..990f908599 --- /dev/null +++ b/runtime/keymap/hebrewp_cp1255.vim @@ -0,0 +1,58 @@ +" codepage 1255 on Windows is equal to ISO 8859-8 but it +" adds in the vowel points, known as 'niqud', which are present in +" CP1255: Note: there are several 'standards' for placement of the vowel +" points, and I ignored all of them. Since we can input English by simply +" pressing Ctrl-^ and eliminating this map, I saw no reason to try to use +" exotic key locations. If you don't like it, that's just too bad :-) +let b:keymap_name = "hebp" +loadkeymap +K " final kaf +M " final mem +N " final nun +P " final pe +T " tet +X " final tsadi +a " alef +b " bet +d " dalet +g " gimel +h " he +j " het +k " kaf +l " lamed +m " mem +n " nun +s " samekh +p " pe +q " qof +r " resh +t " tav +u " ayin +v " vav +w " shin +x " tsadi +y " yod +z " zayin +" vowels: +A: " sheva +HE " hataf segol +HA " hataf patah +HO " hataf qamats +I " hiriq +AY " tsere +E " segol +AA " patah +AO " qamats +O " holam +U " qubuts +D " dagesh +]T " meteg +]Q " maqaf +]R <ÌChar-207> " rafe +]p " paseq +SR " shin-dot +SL " sin-dot +]P " sof-pasuq +VV " double-vav +VY " vav-yod +YY " yod-yod diff --git a/runtime/keymap/hebrewp_iso-8859-8.vim b/runtime/keymap/hebrewp_iso-8859-8.vim new file mode 100644 index 0000000000..d4b9714d25 --- /dev/null +++ b/runtime/keymap/hebrewp_iso-8859-8.vim @@ -0,0 +1,36 @@ +" Vim Keymap file for hebrew +" Maintainer : Ron Aaron +" Last Updated: Sun 10 Feb 2002 11:50:56 +" This is my version of a phonetic Hebrew + +" Use this short name in the status line. +let b:keymap_name = "hebp" + +loadkeymap +K " final kaf +M " final mem +N " final nun +P " final pe +T " tet +X " final tsadi +a " alef +b " bet +d " dalet +g " gimel +h " he +j " het +k " kaf +l " lamed +m " mem +n " nun +s " samekh +p " pe +q " qof +r " resh +t " tav +u " ayin +v " vav +w " shin +x " tsadi +y " yod +z " zayin diff --git a/runtime/keymap/hebrewp_utf-8.vim b/runtime/keymap/hebrewp_utf-8.vim new file mode 100644 index 0000000000..dded60e365 --- /dev/null +++ b/runtime/keymap/hebrewp_utf-8.vim @@ -0,0 +1,122 @@ +" Vim Keymap file for hebrew +" Maintainer : Ron Aaron +" Last Updated: Thu 08 Mar 2001 13:49:01 +" This is my version of a phonetic Hebrew + +" Use this short name in the status line. +let b:keymap_name = "hebp" +loadkeymap +w " ù - shin +n " ð - nun +b " á - bet +g " â - gimel +q " ÷ - qof +k " ë - kaf +g " ò - ayin +y " é - yod +N " ï - final nun +j " ç - het +l " ì - lamed +K " ê - final kaf +x " ö - tsadi +m " î - mem +M " í - final mem +p " ô - pe +r " ø - resh +d " ã - dalet +a " à - alef +v " å - vav +h " ä - he +s " ñ - samekh +T " è - tet +z " æ - zayin +t " ú - tav +X " õ - final tsadi +P " ó - final pe +A: " sheva +HE " hataf segol +HA " hataf patah +HO " hataf qamats +I " hiriq +AY " tsere +E " segol +AA " patah +AO " qamats +O " holam +U " qubuts +D " dagesh +]T " meteg +]Q " maqaf +]R <ÌChar-0x5bf> " rafe +]p " paseq +SR " shin-dot +SL " sin-dot +]P " sof-pasuq +VV " double-vav +VY " vav-yod +YY " yod-yod +" cantillation: +C: " etnahta +Cs " segol +CS " shalshelet +Cz " zaqef qatan +CZ " zaqef gadol +Ct " tipeha +Cr " revia +Cq " zarqa +Cp " pashta +C! " yetiv +Cv " tevir +Cg " geresh +C* " geresh qadim +CG " gershayim +CP " qarnei-parah +Cy " yerach-ben-yomo +Co " ole +Ci " iluy +Cd " dehi +Cn " zinor +CC " masora circle +X` " Alternative `ayin +X' " Alternative 'alef +X-d " Alternative dalet +X-h " Alternative he +X-k " Alternative kaf +X-l " Alternative lamed +X-m " Alternative mem-sofit +X-r " Alternative resh +X-t " Alternative tav +X-+ " Alternative plus +XW " shin+shin-dot +Xw " shin+sin-dot +X..W " shin+shin-dot+dagesh +X..w " shin+sin-dot+dagesh +XA " alef+patah +XO " alef+qamats +XI " alef+hiriq (mapiq) +X.b " bet+dagesh +X.g " gimel+dagesh +X.d " dalet+dagesh +X.h " he+dagesh +Xu " vav+dagesh +X.z " zayin+dagesh +X.T " tet+dagesh +X.y " yud+dagesh +X.K " kaf sofit+dagesh +X.k " kaf+dagesh +X.l " lamed+dagesh +X.m " mem+dagesh +X.n " nun+dagesh +X.s " samech+dagesh +X.P " pe sofit+dagesh +X.p " pe+dagesh +X.x " tsadi+dagesh +X.q " qof+dagesh +X.r " resh+dagesh +X.w " shin+dagesh +X.t " tav+dagesh +Xo " vav+holam +XRb " bet+rafe +XRk " kaf+rafe +XRp " pe+rafe +Xal " alef-lamed diff --git a/runtime/keymap/kana.vim b/runtime/keymap/kana.vim new file mode 100644 index 0000000000..23b5f876ac --- /dev/null +++ b/runtime/keymap/kana.vim @@ -0,0 +1,727 @@ +" This script was originally created by Rory McCann . +" Dan Kenigsberg noticed some deficiencies and suggested this one instead. +" +" Maintainer: Rory McCann +" Modified by: Edward L. Fox +" Last Change: 2006 Apr 30 +" +" +" +" Kana.kmap (Japanese Phonograms) +" +" Converted from Gaspar Sinai's yudit 2.7.6 +" GNU (C) Gaspar Sinai +" +" WARNING +" ------- +" This version of Kana.kmap is different from the one that has been used +" with yudit-2.7.2 or earlier. The main difference is that this kmap is +" arranged in such a way that it complies with an authorized Japanese +" transliteration. As a result, backward compatibility is not guaranteed. +" +" NOTE +" ---- +" 1. In general, the transliteration is based on Japanese Government's +" Cabinet Notification 1 (Dec. 9, 1954). +" +" Summary: +" +" (1) To transliterate Japanese language, Table 1 should be used +" primarily. +" (2) Table 2 may be used only when existing conventions such as +" international relationship should be respected. +" (3) Other transliteration is acceptable only when neither Table 1 +" nor Table 2 gives any specification of the sound in question +" +" For details, refer to +" +" http://xembho.tripod.com/siryo/naikaku_kokuzi.html +" +" 2. The specification instructed by the Cabinet Notification is rather +" inadequate even for daily use. At the present time there are thus +" many unauthorized but widely accepted conventions used together with +" the authorized transliteration. This kmap contains some of them for +" user's convenience (cf. Hiragana 3 and Katakana 3). +" +" 3. For the unicode mapping relevant to this kmap, refer to 3075--30F5 of +" +" http://www.macchiato.com/unicode/charts.html +" +" HISTORY +" ------- +" 2005-01-11 +" * Converted to Vim format. +" 2003-01-22 +" +" * Submitted to gsinai@yudit.org +" +" ============================================================================ + +scriptencoding utf-8 + +" ---------------------------------------------------------------------------- +" Kigou (Punctuation etc.) +" ---------------------------------------------------------------------------- + +let b:keymap_name = "kana" + +loadkeymap +"0x20 0x3000 +, 〠+. 。 +,, 〃 + + +xx 〆 +@ 〇 +< 〈 +> 〉 +<< 《 +>> 》 +{ 「 +} 〠+{{ 『 +}} 〠+[.( 〠+).] 】 + + +[ 〔 +] 〕 +[( 〖 +)] 〗 + + +[[ 〚 +]] 〛 + + +.. ・ +- ー + + +" ---------------------------------------------------------------------------- +" Hiragana 1 --- Table 1, Cabinet Notification No. 1 (Dec. 9, 1954) +" ---------------------------------------------------------------------------- +a ã‚ +i ã„ +u ㆠ+e ㈠+o ㊠+ +ka ã‹ +ki ã +ku ã +ke ã‘ +ko ã“ + +sa ã• +si ã— +su ã™ +se ã› +so ã + +ta 㟠+ti ã¡ +tu 㤠+te 㦠+to 㨠+ +na 㪠+ni ã« +nu 㬠+ne ã­ +no ã® + +ha 㯠+hi ã² +hu ãµ +he 㸠+ho ã» + +ma ã¾ +mi ã¿ +mu ã‚€ +me ã‚ +mo ã‚‚ + +ya ã‚„ +yu ゆ +yo よ + +ra ら +ri り +ru ã‚‹ +re れ +ro ã‚ + +wa ã‚ + +ga ㌠+gi ㎠+gu ã +ge ã’ +go ã” + +za ã– +zi 㘠+zu ãš +ze 㜠+zo ãž + +da ã  +de ã§ +do ã© + +ba ã° +bi ã³ +bu ã¶ +be ã¹ +bo ã¼ + +pa ã± +pi ã´ +pu ã· +pe 㺠+po ã½ + +kya ãゃ +kyu ãã‚… +kyo ãょ + +sya ã—ゃ +syu ã—ã‚… +syo ã—ょ + +tya ã¡ã‚ƒ +tyu ã¡ã‚… +tyo ã¡ã‚‡ + +nya ã«ã‚ƒ +nyu ã«ã‚… +nyo ã«ã‚‡ + +hya ã²ã‚ƒ +hyu ã²ã‚… +hyo ã²ã‚‡ + +mya ã¿ã‚ƒ +myu ã¿ã‚… +myo ã¿ã‚‡ + +rya りゃ +ryu りゅ +ryo りょ + +gya ãŽã‚ƒ +gyu ãŽã‚… +gyo ãŽã‚‡ + +zya ã˜ã‚ƒ +zyu ã˜ã‚… +zyo ã˜ã‚‡ + +bya ã³ã‚ƒ +byu ã³ã‚… +byo ã³ã‚‡ + +pya ã´ã‚ƒ +pyu ã´ã‚… +pyo ã´ã‚‡ + +n ã‚“ +n' ã‚“ + + +" ---------------------------------------------------------------------------- +" Hiragana 2 --- Table 2, Cabinet Notification No. 1 (Dec. 9, 1954) +" ---------------------------------------------------------------------------- +sha ã—ゃ +shi ã— +shu ã—ã‚… +sho ã—ょ + +tsu 㤠+ +cha ã¡ã‚ƒ +chi ã¡ +chu ã¡ã‚… +cho ã¡ã‚‡ + +fu ãµ + +ja ã˜ã‚ƒ +ji 㘠+ju ã˜ã‚… +jo ã˜ã‚‡ + +di 㢠+du 㥠+dya ã¢ã‚ƒ +dyu ã¢ã‚… +dyo ã¢ã‚‡ + +kwa ãゎ +gwa ãゎ + +wo ã‚’ + + +" ---------------------------------------------------------------------------- +" Hiragana 3 --- Conventional transliterations +" ---------------------------------------------------------------------------- + +" Small Hiragana: The prefix X is never pronounced. It is used as something +" like an escape character. +xa ã +xi ム+xu ã… +xe ㇠+xo ㉠+ +xtu 㣠+ +xya ゃ +xyu ã‚… +xyo ょ + +xwa ゎ + +" Historic `wi' and `we' +wi ã‚ +we ã‚‘ + +" Preceded by a small `tu' +kka ã£ã‹ +kki ã£ã +kku ã£ã +kke ã£ã‘ +kko ã£ã“ + +ssa ã£ã• +ssi ã£ã— +ssu ã£ã™ +sse ã£ã› +sso ã£ã + +tta ã£ãŸ +tti ã£ã¡ +ttu ã£ã¤ +tte ã£ã¦ +tto ã£ã¨ + +hha ã£ã¯ +hhi ã£ã² +hhu ã£ãµ +hhe ã£ã¸ +hho ã£ã» + +mma ã£ã¾ +mmi ã£ã¿ +mmu ã£ã‚€ +mme ã£ã‚ +mmo ã£ã‚‚ + +yya ã£ã‚„ +yyu ã£ã‚† +yyo ã£ã‚ˆ + +rra ã£ã‚‰ +rri ã£ã‚Š +rru ã£ã‚‹ +rre ã£ã‚Œ +rro ã£ã‚ + +wwa ã£ã‚ + +gga ã£ãŒ +ggi ã£ãŽ +ggu ã£ã +gge ã£ã’ +ggo ã£ã” + +zza ã£ã– +zzi ã£ã˜ +zzu ã£ãš +zze ã£ãœ +zzo ã£ãž + +dda ã£ã  +ddi ã£ã¢ +ddu ã£ã¥ +dde ã£ã§ +ddo ã£ã© + +bba ã£ã° +bbi ã£ã³ +bbu ã£ã¶ +bbe ã£ã¹ +bbo ã£ã¼ + +ppa ã£ã± +ppi ã£ã´ +ppu ã£ã· +ppe ã£ãº +ppo ã£ã½ + +" Proceded by a small `tu' and followed by a small 'ya', 'yu' or 'yo' +kkya ã£ãゃ +kkyu ã£ãã‚… +kkyo ã£ãょ + +ssya ã£ã—ゃ +ssyu ã£ã—ã‚… +ssyo ã£ã—ょ + +ttya ã£ã¡ã‚ƒ +ttyu ã£ã¡ã‚… +ttyo ã£ã¡ã‚‡ + +hhya ã£ã²ã‚ƒ +hhyu ã£ã²ã‚… +hhyo ã£ã²ã‚‡ + +mmya ã£ã¿ã‚ƒ +mmyu ã£ã¿ã‚… +mmyo ã£ã¿ã‚‡ + +rrya ã£ã‚Šã‚ƒ +rryu ã£ã‚Šã‚… +rryo ã£ã‚Šã‚‡ + +ggya ã£ãŽã‚ƒ +ggyu ã£ãŽã‚… +ggyo ã£ãŽã‚‡ + +zzya ã£ã˜ã‚ƒ +zzyu ã£ã˜ã‚… +zzyo ã£ã˜ã‚‡ + +bbya ã£ã³ã‚ƒ +bbyu ã£ã³ã‚… +bbyo ã£ã³ã‚‡ + +ppya ã£ã´ã‚ƒ +ppyu ã£ã´ã‚… +ppyo ã£ã´ã‚‡ + + +" ---------------------------------------------------------------------------- +" Katakana 1 --- Table 1, Cabinet Notification No. 1 (Dec. 9, 1954) +" ---------------------------------------------------------------------------- +A ã‚¢ +I イ +U ウ +E エ +O オ + +KA ã‚« +KI ã‚­ +KU ク +KE ケ +KO コ + +SA サ +SI ã‚· +SU ス +SE ã‚» +SO ソ + +TA ã‚¿ +TI ム+TU ツ +TE テ +TO ト + +NA ナ +NI ニ +NU ヌ +NE ム+NO ノ + +HA ム+HI ヒ +HU フ +HE ヘ +HO ホ + +MA マ +MI ミ +MU ム +ME メ +MO モ + +YA ヤ +YU ユ +YO ヨ + +RA ラ +RI リ +RU ル +RE レ +RO ロ + +WA ワ + +GA ガ +GI ã‚® +GU ã‚° +GE ゲ +GO ã‚´ + +ZA ã‚¶ +ZI ジ +ZU ズ +ZE ゼ +ZO ゾ + +DA ダ +DE デ +DO ド + +BA ム+BI ビ +BU ブ +BE ベ +BO ボ + +PA パ +PI ピ +PU プ +PE ペ +PO ム+ +KYA キャ +KYU キュ +KYO キョ + +SYA シャ +SYU シュ +SYO ショ + +TYA ãƒãƒ£ +TYU ãƒãƒ¥ +TYO ãƒãƒ§ + +NYA ニャ +NYU ニュ +NYO ニョ + +HYA ヒャ +HYU ヒュ +HYO ヒョ + +MYA ミャ +MYU ミュ +MYO ミョ + +RYA リャ +RYU リュ +RYO リョ + +GYA ギャ +GYU ギュ +GYO ギョ + +ZYA ジャ +ZYU ジュ +ZYO ジョ + +BYA ビャ +BYU ビュ +BYO ビョ + +PYA ピャ +PYU ピュ +PYO ピョ + +N ン +N' ン + + +" ---------------------------------------------------------------------------- +" Katakana 2 --- Table 2, Cabinet Notification No. 1 (Dec. 9, 1954) +" ---------------------------------------------------------------------------- +SHA シャ +SHI ã‚· +SHU シュ +SHO ショ + +TSU ツ + +CHA ãƒãƒ£ +CHI ム+CHU ãƒãƒ¥ +CHO ãƒãƒ§ + +FU フ + +JA ジャ +JI ジ +JU ジュ +JO ジョ + +DI ヂ +DU ヅ +DYA ヂャ +DYU ヂュ +DYO ヂョ + +KWA クヮ +GWA グヮ + +WO ヲ + + +" ---------------------------------------------------------------------------- +" Katakana 3 --- Conventional transliterations +" ---------------------------------------------------------------------------- + +" Small Katakana: The prefix X is never pronounced. It is used as something +" like an escape character. +XA ã‚¡ +XI ã‚£ +XU ã‚¥ +XE ã‚§ +XO ã‚© + +XTU ッ + +XYA ャ +XYU ュ +XYO ョ + +XWA ヮ + +" Used only for counting someone or something +XKA ヵ +XKE ヶ + +" Historic `wi' and `we' +WI ヰ +WE ヱ + +" Used for the sound `v' of European languages +VA ヴァ +VI ヴィ +VU ヴ +VE ヴェ +VO ヴォ + +VYU ヴュ + +" Preceded by a small `tu' +KKA ッカ +KKI ッキ +KKU ック +KKE ッケ +KKO ッコ + +SSA ッサ +SSI ッシ +SSU ッス +SSE ッセ +SSO ッソ + +TTA ッタ +TTI ッム+TTU ッツ +TTE ッテ +TTO ット + +HHA ッム+HHI ッヒ +HHU ッフ +HHE ッヘ +HHO ッホ + +MMA ッマ +MMI ッミ +MMU ッム +MME ッメ +MMO ッモ + +YYA ッヤ +YYU ッユ +YYO ッヨ + +RRA ッラ +RRI ッリ +RRU ッル +RRE ッレ +RRO ッロ + +WWA ッワ + +GGA ッガ +GGI ッギ +GGU ッグ +GGE ッゲ +GGO ッゴ + +ZZA ッザ +ZZI ッジ +ZZU ッズ +ZZE ッゼ +ZZO ッゾ + +DDA ッダ +DDI ッヂ +DDU ッヅ +DDE ッデ +DDO ッド + +BBA ッム+BBI ッビ +BBU ッブ +BBE ッベ +BBO ッボ + +PPA ッパ +PPI ッピ +PPU ップ +PPE ッペ +PPO ッム+ +" Proceded by a small `tu' and followed by a small 'ya', 'yu' or 'yo' +KKYA ッキャ +KKYU ッキュ +KKYO ッキョ + +SSYA ッシャ +SSYU ッシュ +SSYO ッショ + +TTYA ッãƒãƒ£ +TTYU ッãƒãƒ¥ +TTYO ッãƒãƒ§ + +HHYA ッヒャ +HHYU ッヒュ +HHYO ッヒョ + +MMYA ッミャ +MMYU ッミュ +MMYO ッミョ + +RRYA ッリャ +RRYU ッリュ +RRYO ッリョ + +GGYA ッギャ +GGYU ッギュ +GGYO ッギョ + +ZZYA ッジャ +ZZYU ッジュ +ZZYO ッジョ + +BBYA ッビャ +BBYU ッビュ +BBYO ッビョ + +PPYA ッピャ +PPYU ッピュ +PPYO ッピョ + + diff --git a/runtime/keymap/lithuanian-baltic.vim b/runtime/keymap/lithuanian-baltic.vim new file mode 100644 index 0000000000..b888db6e76 --- /dev/null +++ b/runtime/keymap/lithuanian-baltic.vim @@ -0,0 +1,31 @@ +" Vim Keymap file for lithuanian characters, phonetic layout 'Baltic' +" Useful mainly with utf-8 but may work with other encodings + +" Maintainer: Alex Jakushev +" Last Changed: 2002 Apr 12 + +" All characters are given literally, conversion to another encoding (e.g., +" UTF-8) should work. +scriptencoding utf-8 + +let b:keymap_name = "lt" + +loadkeymap +! Ä„ LITHUANIAN CAPITAL A NOSINE +@ ÄŒ LITHUANIAN CAPITAL CH +# Ę LITHUANIAN CAPITAL E NOSINE +$ Ä– LITHUANIAN CAPITAL E SU TASKU +% Ä® LITHUANIAN CAPITAL I NOSINE +^ Å  LITHUANIAN CAPITAL SH +& Ų LITHUANIAN CAPITAL U NOSINE +* Ū LITHUANIAN CAPITAL U SU BRUKSNIU ++ Ž LITHUANIAN CAPITAL ZH +1 Ä… LITHUANIAN LOWERCASE A NOSINE +2 Ä LITHUANIAN LOWERCASE CH +3 Ä™ LITHUANIAN LOWERCASE E NOSINE +4 Ä— LITHUANIAN LOWERCASE E SU TASKU +5 į LITHUANIAN LOWERCASE I NOSINE +6 Å¡ LITHUANIAN LOWERCASE SH +7 ų LITHUANIAN LOWERCASE U NOSINE +8 Å« LITHUANIAN LOWERCASE U SU BRUKSNIU += ž LITHUANIAN LOWERCASE ZH diff --git a/runtime/keymap/magyar_utf-8.vim b/runtime/keymap/magyar_utf-8.vim new file mode 100644 index 0000000000..729771768f --- /dev/null +++ b/runtime/keymap/magyar_utf-8.vim @@ -0,0 +1,37 @@ +" Maintainer: Laszlo Zavaleta +" Last Changed: 2003 Aug 08 +" it has all the accents and a few of the character alterations + +let b:keymap = "magyar" + +loadkey +` í +~ à +! ' +@ " +# + +$ ! +^ / +& = +* ( +( ) +0 ö +) Ö +- ü +_ Ü += ó ++ Ó +\\ ű +| Ű +[ Å‘ +{ Å +] ú +} Ú +; é +: É +' á +\" à +/ - +< ? +> : +? _ diff --git a/runtime/keymap/mongolian_utf-8.vim b/runtime/keymap/mongolian_utf-8.vim new file mode 100644 index 0000000000..a52e3e9a90 --- /dev/null +++ b/runtime/keymap/mongolian_utf-8.vim @@ -0,0 +1,101 @@ +" Maintainer: Natsagdorj Shagdar +" Last Changed: 2007 Jun 26 + +" All characters are given literally, conversion to another encoding (e.g., +" UTF-8) should work. +scriptencoding utf-8 + +let b:keymap_name = "mn" + +loadkeymap +C Ð CYRILLIC CAPITAL LETTER IO +c Ñ‘ CYRILLIC SMALL LETTER IO +G Ð CYRILLIC CAPITAL LETTER A +D Б CYRILLIC CAPITAL LETTER BE +> Ð’ CYRILLIC CAPITAL LETTER VE +U Г CYRILLIC CAPITAL LETTER GHE +: Д CYRILLIC CAPITAL LETTER DE +_ Е CYRILLIC CAPITAL LETTER IE +R Ж CYRILLIC CAPITAL LETTER ZHE +P З CYRILLIC CAPITAL LETTER ZE +N И CYRILLIC CAPITAL LETTER I +A Й CYRILLIC CAPITAL LETTER SHORT I +{ К CYRILLIC CAPITAL LETTER KA +L Л CYRILLIC CAPITAL LETTER EL +B М CYRILLIC CAPITAL LETTER EM +Y Ð CYRILLIC CAPITAL LETTER EN +K О CYRILLIC CAPITAL LETTER O +\" П CYRILLIC CAPITAL LETTER PE +J Р CYRILLIC CAPITAL LETTER ER +V С CYRILLIC CAPITAL LETTER ES +M Т CYRILLIC CAPITAL LETTER TE +E У CYRILLIC CAPITAL LETTER U +Q Ф CYRILLIC CAPITAL LETTER EF +H Ð¥ CYRILLIC CAPITAL LETTER HA +W Ц CYRILLIC CAPITAL LETTER TSE +X Ч CYRILLIC CAPITAL LETTER CHE +I Ш CYRILLIC CAPITAL LETTER SHA ++ Щ CYRILLIC CAPITAL LETTER SHCHA +} Ъ CYRILLIC CAPITAL LETTER HARD SIGN +S Ы CYRILLIC CAPITAL LETTER YERU +< Ь CYRILLIC CAPITAL LETTER SOFT SIGN +T Э CYRILLIC CAPITAL LETTER E +? Ю CYRILLIC CAPITAL LETTER YU +Z Я CYRILLIC CAPITAL LETTER YA +g а CYRILLIC SMALL LETTER A +d б CYRILLIC SMALL LETTER BE +. в CYRILLIC SMALL LETTER VE +u г CYRILLIC SMALL LETTER GHE +; д CYRILLIC SMALL LETTER DE +- е CYRILLIC SMALL LETTER IE +r ж CYRILLIC SMALL LETTER ZHE +p з CYRILLIC SMALL LETTER ZE +n и CYRILLIC SMALL LETTER I +a й CYRILLIC SMALL LETTER SHORT I +[ к CYRILLIC SMALL LETTER KA +l л CYRILLIC SMALL LETTER EL +b м CYRILLIC SMALL LETTER EM +y н CYRILLIC SMALL LETTER EN +k о CYRILLIC SMALL LETTER O +' п CYRILLIC SMALL LETTER PE +j Ñ€ CYRILLIC SMALL LETTER ER +v Ñ CYRILLIC SMALL LETTER ES +m Ñ‚ CYRILLIC SMALL LETTER TE +e у CYRILLIC SMALL LETTER U +q Ñ„ CYRILLIC SMALL LETTER EF +h Ñ… CYRILLIC SMALL LETTER HA +w ц CYRILLIC SMALL LETTER TSE +x ч CYRILLIC SMALL LETTER CHE +i ш CYRILLIC SMALL LETTER SHA += щ CYRILLIC SMALL LETTER SHCHA +] ÑŠ CYRILLIC SMALL LETTER HARD SIGN +s Ñ‹ CYRILLIC SMALL LETTER YERU +, ÑŒ CYRILLIC SMALL LETTER SOFT SIGN +t Ñ CYRILLIC SMALL LETTER E +/ ÑŽ CYRILLIC SMALL LETTER YU +z Ñ CYRILLIC SMALL LETTER YA +f Ó© CYRILLIC SMALL LETTER Oе +F Ó¨ CYRILLIC SMALL LETTER Oе +o Ò¯ CYRILLIC SMALL LETTER Ге +O Ò® CYRILLIC SMALL LETTER Oе +` = +1 â„– NUMERO SIGN +2 - +3 " +4 T +5 : +7 ? +6 . +8 , +9 ( +0 ) +! 1 +@ 2 +# 3 +$ 4 +% 5 +^ 6 +& 7 +* 8 +( 9 +) 0 diff --git a/runtime/keymap/persian-iranian_utf-8.vim b/runtime/keymap/persian-iranian_utf-8.vim new file mode 100644 index 0000000000..e8dcd76e7d --- /dev/null +++ b/runtime/keymap/persian-iranian_utf-8.vim @@ -0,0 +1,113 @@ +" Vim Keymap file for Persian Standard Keyboard Layout +" Maintainers: Behnam 'ZWNJ' Esfahbod , +" Amir Hedayaty +" Last Change: 2006 Apr 21 + +scriptencoding utf-8 + +" Use this short name in the status line. +let b:keymap_name = "per" + +loadkeymap +` †+1 Û± +2 Û² +3 Û³ +4 Û´ +5 Ûµ +6 Û¶ +7 Û· +8 Û¸ +9 Û¹ +0 Û° +- - += = + +q ض +w ص +e Ø« +r Ù‚ +t Ù +y غ +u ع +i Ù‡ +o Ø® +p Ø­ +[ ج +] Ú† + +a Ø´ +s س +d ÛŒ +f ب +g Ù„ +h ا +j ت +k Ù† +l Ù… +; Ú© +' Ú¯ + +z ظ +x Ø· +c ز +v ر +b ذ +n د +m Ù¾ +, Ùˆ +. . +/ / +\\ \\ + +~ ÷ +! ! +@ Ù¬ +# Ù« +$ ï·¼ +% Ùª +^ × +& ØŒ +* * +( ) +) ( +_ Ù€ ++ + + +Q Ù’ +W ÙŒ +E Ù +R Ù‹ +T Ù +Y Ù +U ÙŽ +I Ù‘ +O ] +P [ +{ } +} { + +A ؤ +S ئ +D ÙŠ +F Ø¥ +G Ø£ +H Ø¢ +J Ø© +K » +L « +: : +\" Ø› + +Z Ùƒ +X Ù“ +C Ú˜ +V Ù° +B ‌ +N Ù” +M Ø¡ +< > +> < +? ØŸ +| | + diff --git a/runtime/keymap/persian.vim b/runtime/keymap/persian.vim new file mode 100644 index 0000000000..7bf5cd61a6 --- /dev/null +++ b/runtime/keymap/persian.vim @@ -0,0 +1,8 @@ +let encoding = &enc +if encoding == '' + let encoding = 'utf-8' +endif + +if encoding == 'utf-8' + source :p:h/persian-iranian_utf-8.vim +endif diff --git a/runtime/keymap/pinyin.vim b/runtime/keymap/pinyin.vim new file mode 100644 index 0000000000..757850b83f --- /dev/null +++ b/runtime/keymap/pinyin.vim @@ -0,0 +1,54 @@ +" Vim Keymap file for Hanyu Pinyin tone marks through numbers. +" Maintainer: Fredrik Roubert +" Last Changed: February 15, 2004 + +" All characters are given literally. +scriptencoding utf-8 + +" Use this short name in the status line. +let b:keymap_name = "py" + +loadkeymap +a0 a +a1 Ä +a2 á +a3 ÇŽ +a4 à +a5 a +e0 e +e1 Ä“ +e2 é +e3 Ä› +e4 è +e5 e +i0 i +i1 Ä« +i2 í +i3 Ç +i4 ì +i5 i +o0 o +o1 Å +o2 ó +o3 Ç’ +o4 ò +o5 o +u0 u +u1 Å« +u2 ú +u3 Ç” +u4 ù +u5 u +ü0 ü +ü1 Ç– +ü2 ǘ +ü3 Çš +ü4 Çœ +ü5 ü +v0 ü +v1 Ç– +v2 ǘ +v3 Çš +v4 Çœ +v5 ü + diff --git a/runtime/keymap/polish-slash.vim b/runtime/keymap/polish-slash.vim new file mode 100644 index 0000000000..a4300781fc --- /dev/null +++ b/runtime/keymap/polish-slash.vim @@ -0,0 +1,27 @@ +" Polish letters under VIM >= 6 +" Maintainer: HS6_06 +" Last changed: 2005 Jan 12 +" Current version: 1.0.2 +" History: +" 2005.01.12 1.0.2 keymap_name shortened, added Current version, History +" 2005.01.10 1.0.1 un*x line ends for all files +" 2005.01.09 1.0.0 Initial release + +let encoding = &enc +if encoding == 'latin1' + if has("unix") + let encoding = 'iso-8859-2' + else + let encoding = 'cp1250' + endif +endif + +if encoding == 'utf-8' + source :p:h/polish-slash_utf-8.vim +elseif encoding == 'cp1250' + source :p:h/polish-slash_cp1250.vim +elseif encoding == 'iso-8859-2' + source :p:h/polish-slash_iso-8859-2.vim +else + source :p:h/polish-slash_cp852.vim +endif diff --git a/runtime/keymap/polish-slash_cp1250.vim b/runtime/keymap/polish-slash_cp1250.vim new file mode 100644 index 0000000000..4ef2b22a0c --- /dev/null +++ b/runtime/keymap/polish-slash_cp1250.vim @@ -0,0 +1,40 @@ +" Polish letters keymap for cp1250 +" Maintainer: HS6_06 +" Last Changed: 2005 Jan 12 +" Current version: 1.0.2 +" History: see polish-slash.vim + +" This keymap adds the special Polish letters +" to an existing Latin keyboard. +" All chars as usual except: +" Polish: +" instead of AltGr+{acelnosxz} you ve to use "/" followed by {acelnosxz} + +" short keymap name for statusline +let b:keymap_name = "PL-slash-WIN" + +scriptencoding latin1 + +loadkeymap + +" Polish letters +/a " LATIN SMALL LETTER A WITH OGONEK +/c " LATIN SMALL LETTER C WITH ACUTE +/e " LATIN SMALL LETTER E WITH OGONEK +/l " LATIN SMALL LETTER L WITH STROKE +/n " LATIN SMALL LETTER N WITH ACUTE +/o " LATIN SMALL LETTER O WITH ACUTE +/s " LATIN SMALL LETTER S WITH ACUTE +/x " LATIN SMALL LETTER Z WITH ACUTE +/z " LATIN SMALL LETTER Z WITH DOT ABOVE + +/A " LATIN CAPITAL LETTER A WITH OGONEK +/C " LATIN CAPITAL LETTER C WITH ACUTE +/E " LATIN CAPITAL LETTER E WITH OGONEK +/L " LATIN CAPITAL LETTER L WITH STROKE +/N " LATIN CAPITAL LETTER N WITH ACUTE +/O " LATIN CAPITAL LETTER O WITH ACUTE +/S " LATIN CAPITAL LETTER S WITH ACUTE +/X " LATIN CAPITAL LETTER Z WITH ACUTE +/Z " LATIN CAPITAL LETTER Z WITH DOT ABOVE + diff --git a/runtime/keymap/polish-slash_cp852.vim b/runtime/keymap/polish-slash_cp852.vim new file mode 100644 index 0000000000..22c1809e19 --- /dev/null +++ b/runtime/keymap/polish-slash_cp852.vim @@ -0,0 +1,40 @@ +" Polish letters keymap for cp852 +" Maintainer: HS6_06 +" Last Changed: 2005 Jan 12 +" Current version: 1.0.2 +" History: see polish-slash.vim + +" This keymap adds the special Polish letters +" to an existing Latin keyboard. +" All chars as usual except: +" Polish: +" instead of AltGr+{acelnosxz} you ve to use "/" followed by {acelnosxz} + +" short keymap name for statusline +let b:keymap_name = "PL-slash-DOS" + +scriptencoding latin1 + +loadkeymap + +" Polish letters +/a " LATIN SMALL LETTER A WITH OGONEK +/c " LATIN SMALL LETTER C WITH ACUTE +/e " LATIN SMALL LETTER E WITH OGONEK +/l " LATIN SMALL LETTER L WITH STROKE +/n " LATIN SMALL LETTER N WITH ACUTE +/o " LATIN SMALL LETTER O WITH ACUTE +/s " LATIN SMALL LETTER S WITH ACUTE +/x " LATIN SMALL LETTER Z WITH ACUTE +/z " LATIN SMALL LETTER Z WITH DOT ABOVE + +/A " LATIN CAPITAL LETTER A WITH OGONEK +/C " LATIN CAPITAL LETTER C WITH ACUTE +/E " LATIN CAPITAL LETTER E WITH OGONEK +/L " LATIN CAPITAL LETTER L WITH STROKE +/N " LATIN CAPITAL LETTER N WITH ACUTE +/O " LATIN CAPITAL LETTER O WITH ACUTE +/S " LATIN CAPITAL LETTER S WITH ACUTE +/X " LATIN CAPITAL LETTER Z WITH ACUTE +/Z " LATIN CAPITAL LETTER Z WITH DOT ABOVE + diff --git a/runtime/keymap/polish-slash_iso-8859-2.vim b/runtime/keymap/polish-slash_iso-8859-2.vim new file mode 100644 index 0000000000..3a1203af81 --- /dev/null +++ b/runtime/keymap/polish-slash_iso-8859-2.vim @@ -0,0 +1,40 @@ +" Polish letters keymap for iso-8859-2 +" Maintainer: HS6_06 +" Last Changed: 2005 Jan 12 +" Current version: 1.0.2 +" History: polish-slash.vim + +" This keymap adds the special Polish letters +" to an existing Latin keyboard. +" All chars as usual except: +" Polish: +" instead of AltGr+{acelnosxz} you ve to use "/" followed by {acelnosxz} + +" short keymap name for statusline +let b:keymap_name = "PL-slash-ISO" + +scriptencoding latin1 + +loadkeymap + +" Polish letters +/a " LATIN SMALL LETTER A WITH OGONEK +/c " LATIN SMALL LETTER C WITH ACUTE +/e " LATIN SMALL LETTER E WITH OGONEK +/l " LATIN SMALL LETTER L WITH STROKE +/n " LATIN SMALL LETTER N WITH ACUTE +/o " LATIN SMALL LETTER O WITH ACUTE +/s " LATIN SMALL LETTER S WITH ACUTE +/x " LATIN SMALL LETTER Z WITH ACUTE +/z " LATIN SMALL LETTER Z WITH DOT ABOVE + +/A " LATIN CAPITAL LETTER A WITH OGONEK +/C " LATIN CAPITAL LETTER C WITH ACUTE +/E " LATIN CAPITAL LETTER E WITH OGONEK +/L " LATIN CAPITAL LETTER L WITH STROKE +/N " LATIN CAPITAL LETTER N WITH ACUTE +/O " LATIN CAPITAL LETTER O WITH ACUTE +/S " LATIN CAPITAL LETTER S WITH ACUTE +/X " LATIN CAPITAL LETTER Z WITH ACUTE +/Z " LATIN CAPITAL LETTER Z WITH DOT ABOVE + diff --git a/runtime/keymap/polish-slash_utf-8.vim b/runtime/keymap/polish-slash_utf-8.vim new file mode 100644 index 0000000000..3a4eb70e29 --- /dev/null +++ b/runtime/keymap/polish-slash_utf-8.vim @@ -0,0 +1,40 @@ +" Polish letters keymap for utf-8 +" Maintainer: HS6_06 +" Last Changed: 2005 Jan 12 +" Current version: 1.0.2 +" History: see polish-slash.vim + +" This keymap adds the special Polish letters +" to an existing Latin keyboard. +" All chars as usual except: +" Polish: +" instead of AltGr+{acelnosxz} you ve to use "/" followed by {acelnosxz} + +" short keymap name for statusline +let b:keymap_name = "PL-slash-UTF" + +scriptencoding latin1 + +loadkeymap + +" Polish letters +/a " LATIN SMALL LETTER A WITH OGONEK +/c " LATIN SMALL LETTER C WITH ACUTE +/e " LATIN SMALL LETTER E WITH OGONEK +/l " LATIN SMALL LETTER L WITH STROKE +/n " LATIN SMALL LETTER N WITH ACUTE +/o " LATIN SMALL LETTER O WITH ACUTE +/s " LATIN SMALL LETTER S WITH ACUTE +/x " LATIN SMALL LETTER Z WITH ACUTE +/z " LATIN SMALL LETTER Z WITH DOT ABOVE + +/A " LATIN CAPITAL LETTER A WITH OGONEK +/C " LATIN CAPITAL LETTER C WITH ACUTE +/E " LATIN CAPITAL LETTER E WITH OGONEK +/L " LATIN CAPITAL LETTER L WITH STROKE +/N " LATIN CAPITAL LETTER N WITH ACUTE +/O " LATIN CAPITAL LETTER O WITH ACUTE +/S " LATIN CAPITAL LETTER S WITH ACUTE +/X " LATIN CAPITAL LETTER Z WITH ACUTE +/Z " LATIN CAPITAL LETTER Z WITH DOT ABOVE + diff --git a/runtime/keymap/russian-dvorak.vim b/runtime/keymap/russian-dvorak.vim new file mode 100644 index 0000000000..498ffa1b0f --- /dev/null +++ b/runtime/keymap/russian-dvorak.vim @@ -0,0 +1,89 @@ +" Vim Keymap file for russian characters, layout 'dvorak', MS Windows variant +" Derived from russian-jcuken.vim by Artem Chuprina +" Useful mainly with utf-8 but may work with other encodings + +" Maintainer: Serhiy Boiko +" Last Changed: 2007 Jun 29 + +" All characters are given literally, conversion to another encoding (e.g., +" UTF-8) should work. +scriptencoding utf-8 + +let b:keymap_name = "ru" + +loadkeymap +~ Ð CYRILLIC CAPITAL LETTER IO +` Ñ‘ CYRILLIC SMALL LETTER IO +U Ð CYRILLIC CAPITAL LETTER A +W Б CYRILLIC CAPITAL LETTER BE +E Ð’ CYRILLIC CAPITAL LETTER VE +G Г CYRILLIC CAPITAL LETTER GHE +N Д CYRILLIC CAPITAL LETTER DE +Y Е CYRILLIC CAPITAL LETTER IE +S Ж CYRILLIC CAPITAL LETTER ZHE +L З CYRILLIC CAPITAL LETTER ZE +X И CYRILLIC CAPITAL LETTER I +\" Й CYRILLIC CAPITAL LETTER SHORT I +P К CYRILLIC CAPITAL LETTER KA +T Л CYRILLIC CAPITAL LETTER EL +K М CYRILLIC CAPITAL LETTER EM +F Ð CYRILLIC CAPITAL LETTER EN +H О CYRILLIC CAPITAL LETTER O +I П CYRILLIC CAPITAL LETTER PE +D Р CYRILLIC CAPITAL LETTER ER +J С CYRILLIC CAPITAL LETTER ES +B Т CYRILLIC CAPITAL LETTER TE +> У CYRILLIC CAPITAL LETTER U +A Ф CYRILLIC CAPITAL LETTER EF +? Ð¥ CYRILLIC CAPITAL LETTER HA +< Ц CYRILLIC CAPITAL LETTER TSE +Q Ч CYRILLIC CAPITAL LETTER CHE +C Ш CYRILLIC CAPITAL LETTER SHA +R Щ CYRILLIC CAPITAL LETTER SHCHA ++ Ъ CYRILLIC CAPITAL LETTER HARD SIGN +O Ы CYRILLIC CAPITAL LETTER YERU +M Ь CYRILLIC CAPITAL LETTER SOFT SIGN +_ Э CYRILLIC CAPITAL LETTER E +V Ю CYRILLIC CAPITAL LETTER YU +: Я CYRILLIC CAPITAL LETTER YA +u а CYRILLIC SMALL LETTER A +w б CYRILLIC SMALL LETTER BE +e в CYRILLIC SMALL LETTER VE +g г CYRILLIC SMALL LETTER GHE +n д CYRILLIC SMALL LETTER DE +y е CYRILLIC SMALL LETTER IE +s ж CYRILLIC SMALL LETTER ZHE +l з CYRILLIC SMALL LETTER ZE +x и CYRILLIC SMALL LETTER I +' й CYRILLIC SMALL LETTER SHORT I +p к CYRILLIC SMALL LETTER KA +t л CYRILLIC SMALL LETTER EL +k м CYRILLIC SMALL LETTER EM +f н CYRILLIC SMALL LETTER EN +h о CYRILLIC SMALL LETTER O +i п CYRILLIC SMALL LETTER PE +d Ñ€ CYRILLIC SMALL LETTER ER +j Ñ CYRILLIC SMALL LETTER ES +b Ñ‚ CYRILLIC SMALL LETTER TE +. у CYRILLIC SMALL LETTER U +a Ñ„ CYRILLIC SMALL LETTER EF +/ Ñ… CYRILLIC SMALL LETTER HA +, ц CYRILLIC SMALL LETTER TSE +q ч CYRILLIC SMALL LETTER CHE +c ш CYRILLIC SMALL LETTER SHA +r щ CYRILLIC SMALL LETTER SHCHA += ÑŠ CYRILLIC SMALL LETTER HARD SIGN +o Ñ‹ CYRILLIC SMALL LETTER YERU +m ÑŒ CYRILLIC SMALL LETTER SOFT SIGN +- Ñ CYRILLIC SMALL LETTER E +v ÑŽ CYRILLIC SMALL LETTER YU +; Ñ CYRILLIC SMALL LETTER YA +@ " +# â„– NUMERO SIGN +$ ; +^ : +& ? +z . +Z , +[ - +] = diff --git a/runtime/keymap/russian-jcuken.vim b/runtime/keymap/russian-jcuken.vim new file mode 100644 index 0000000000..840ec8c4e0 --- /dev/null +++ b/runtime/keymap/russian-jcuken.vim @@ -0,0 +1,87 @@ +" Vim Keymap file for russian characters, layout 'jcuken', classical variant +" (compatible with XFree86 'ru' keymap) +" Useful mainly with utf-8 but may work with other encodings + +" Maintainer: Artem Chuprina +" Last Changed: 2001 Jun 23 + +" All characters are given literally, conversion to another encoding (e.g., +" UTF-8) should work. +scriptencoding utf-8 + +let b:keymap_name = "ru" + +loadkeymap +~ Ð CYRILLIC CAPITAL LETTER IO +` Ñ‘ CYRILLIC SMALL LETTER IO +F Ð CYRILLIC CAPITAL LETTER A +< Б CYRILLIC CAPITAL LETTER BE +D Ð’ CYRILLIC CAPITAL LETTER VE +U Г CYRILLIC CAPITAL LETTER GHE +L Д CYRILLIC CAPITAL LETTER DE +T Е CYRILLIC CAPITAL LETTER IE +: Ж CYRILLIC CAPITAL LETTER ZHE +P З CYRILLIC CAPITAL LETTER ZE +B И CYRILLIC CAPITAL LETTER I +Q Й CYRILLIC CAPITAL LETTER SHORT I +R К CYRILLIC CAPITAL LETTER KA +K Л CYRILLIC CAPITAL LETTER EL +V М CYRILLIC CAPITAL LETTER EM +Y Ð CYRILLIC CAPITAL LETTER EN +J О CYRILLIC CAPITAL LETTER O +G П CYRILLIC CAPITAL LETTER PE +H Р CYRILLIC CAPITAL LETTER ER +C С CYRILLIC CAPITAL LETTER ES +N Т CYRILLIC CAPITAL LETTER TE +E У CYRILLIC CAPITAL LETTER U +A Ф CYRILLIC CAPITAL LETTER EF +{ Ð¥ CYRILLIC CAPITAL LETTER HA +W Ц CYRILLIC CAPITAL LETTER TSE +X Ч CYRILLIC CAPITAL LETTER CHE +I Ш CYRILLIC CAPITAL LETTER SHA +O Щ CYRILLIC CAPITAL LETTER SHCHA +} Ъ CYRILLIC CAPITAL LETTER HARD SIGN +S Ы CYRILLIC CAPITAL LETTER YERU +M Ь CYRILLIC CAPITAL LETTER SOFT SIGN +\" Э CYRILLIC CAPITAL LETTER E +> Ю CYRILLIC CAPITAL LETTER YU +Z Я CYRILLIC CAPITAL LETTER YA +f а CYRILLIC SMALL LETTER A +, б CYRILLIC SMALL LETTER BE +d в CYRILLIC SMALL LETTER VE +u г CYRILLIC SMALL LETTER GHE +l д CYRILLIC SMALL LETTER DE +t е CYRILLIC SMALL LETTER IE +; ж CYRILLIC SMALL LETTER ZHE +p з CYRILLIC SMALL LETTER ZE +b и CYRILLIC SMALL LETTER I +q й CYRILLIC SMALL LETTER SHORT I +r к CYRILLIC SMALL LETTER KA +k л CYRILLIC SMALL LETTER EL +v м CYRILLIC SMALL LETTER EM +y н CYRILLIC SMALL LETTER EN +j о CYRILLIC SMALL LETTER O +g п CYRILLIC SMALL LETTER PE +h Ñ€ CYRILLIC SMALL LETTER ER +c Ñ CYRILLIC SMALL LETTER ES +n Ñ‚ CYRILLIC SMALL LETTER TE +e у CYRILLIC SMALL LETTER U +a Ñ„ CYRILLIC SMALL LETTER EF +[ Ñ… CYRILLIC SMALL LETTER HA +w ц CYRILLIC SMALL LETTER TSE +x ч CYRILLIC SMALL LETTER CHE +i ш CYRILLIC SMALL LETTER SHA +o щ CYRILLIC SMALL LETTER SHCHA +] ÑŠ CYRILLIC SMALL LETTER HARD SIGN +s Ñ‹ CYRILLIC SMALL LETTER YERU +m ÑŒ CYRILLIC SMALL LETTER SOFT SIGN +' Ñ CYRILLIC SMALL LETTER E +. ÑŽ CYRILLIC SMALL LETTER YU +z Ñ CYRILLIC SMALL LETTER YA +@ " +# ' +$ * +% : +^ , +& . +* ; diff --git a/runtime/keymap/russian-jcukenwin.vim b/runtime/keymap/russian-jcukenwin.vim new file mode 100644 index 0000000000..d56470f110 --- /dev/null +++ b/runtime/keymap/russian-jcukenwin.vim @@ -0,0 +1,87 @@ +" Vim Keymap file for russian characters, layout 'jcuken', MS Windows variant +" (slightly incompatible with XFree86 'ru' keymap - makes use of NUMERO SIGN) +" Useful mainly with utf-8 but may work with other encodings + +" Maintainer: Artem Chuprina +" Last Changed: 2001 Jun 23 + +" All characters are given literally, conversion to another encoding (e.g., +" UTF-8) should work. +scriptencoding utf-8 + +let b:keymap_name = "ru" + +loadkeymap +~ Ð CYRILLIC CAPITAL LETTER IO +` Ñ‘ CYRILLIC SMALL LETTER IO +F Ð CYRILLIC CAPITAL LETTER A +< Б CYRILLIC CAPITAL LETTER BE +D Ð’ CYRILLIC CAPITAL LETTER VE +U Г CYRILLIC CAPITAL LETTER GHE +L Д CYRILLIC CAPITAL LETTER DE +T Е CYRILLIC CAPITAL LETTER IE +: Ж CYRILLIC CAPITAL LETTER ZHE +P З CYRILLIC CAPITAL LETTER ZE +B И CYRILLIC CAPITAL LETTER I +Q Й CYRILLIC CAPITAL LETTER SHORT I +R К CYRILLIC CAPITAL LETTER KA +K Л CYRILLIC CAPITAL LETTER EL +V М CYRILLIC CAPITAL LETTER EM +Y Ð CYRILLIC CAPITAL LETTER EN +J О CYRILLIC CAPITAL LETTER O +G П CYRILLIC CAPITAL LETTER PE +H Р CYRILLIC CAPITAL LETTER ER +C С CYRILLIC CAPITAL LETTER ES +N Т CYRILLIC CAPITAL LETTER TE +E У CYRILLIC CAPITAL LETTER U +A Ф CYRILLIC CAPITAL LETTER EF +{ Ð¥ CYRILLIC CAPITAL LETTER HA +W Ц CYRILLIC CAPITAL LETTER TSE +X Ч CYRILLIC CAPITAL LETTER CHE +I Ш CYRILLIC CAPITAL LETTER SHA +O Щ CYRILLIC CAPITAL LETTER SHCHA +} Ъ CYRILLIC CAPITAL LETTER HARD SIGN +S Ы CYRILLIC CAPITAL LETTER YERU +M Ь CYRILLIC CAPITAL LETTER SOFT SIGN +\" Э CYRILLIC CAPITAL LETTER E +> Ю CYRILLIC CAPITAL LETTER YU +Z Я CYRILLIC CAPITAL LETTER YA +f а CYRILLIC SMALL LETTER A +, б CYRILLIC SMALL LETTER BE +d в CYRILLIC SMALL LETTER VE +u г CYRILLIC SMALL LETTER GHE +l д CYRILLIC SMALL LETTER DE +t е CYRILLIC SMALL LETTER IE +; ж CYRILLIC SMALL LETTER ZHE +p з CYRILLIC SMALL LETTER ZE +b и CYRILLIC SMALL LETTER I +q й CYRILLIC SMALL LETTER SHORT I +r к CYRILLIC SMALL LETTER KA +k л CYRILLIC SMALL LETTER EL +v м CYRILLIC SMALL LETTER EM +y н CYRILLIC SMALL LETTER EN +j о CYRILLIC SMALL LETTER O +g п CYRILLIC SMALL LETTER PE +h Ñ€ CYRILLIC SMALL LETTER ER +c Ñ CYRILLIC SMALL LETTER ES +n Ñ‚ CYRILLIC SMALL LETTER TE +e у CYRILLIC SMALL LETTER U +a Ñ„ CYRILLIC SMALL LETTER EF +[ Ñ… CYRILLIC SMALL LETTER HA +w ц CYRILLIC SMALL LETTER TSE +x ч CYRILLIC SMALL LETTER CHE +i ш CYRILLIC SMALL LETTER SHA +o щ CYRILLIC SMALL LETTER SHCHA +] ÑŠ CYRILLIC SMALL LETTER HARD SIGN +s Ñ‹ CYRILLIC SMALL LETTER YERU +m ÑŒ CYRILLIC SMALL LETTER SOFT SIGN +' Ñ CYRILLIC SMALL LETTER E +. ÑŽ CYRILLIC SMALL LETTER YU +z Ñ CYRILLIC SMALL LETTER YA +@ " +# â„– NUMERO SIGN +$ ; +^ : +& ? +/ . +? , diff --git a/runtime/keymap/russian-yawerty.vim b/runtime/keymap/russian-yawerty.vim new file mode 100644 index 0000000000..64949ffaf2 --- /dev/null +++ b/runtime/keymap/russian-yawerty.vim @@ -0,0 +1,79 @@ +" Vim Keymap file for russian characters, phonetic layout 'yawerty' +" Useful mainly with utf-8 but may work with other encodings + +" Maintainer: Igor Goldenberg +" Last Changed: 2007 Aug 15 + +" All characters are given literally, conversion to another encoding (e.g., +" UTF-8) should work. +scriptencoding utf-8 + +let b:keymap_name = "ru" + +loadkeymap +A Ð CYRILLIC CAPITAL LETTER A +B Б CYRILLIC CAPITAL LETTER BE +W Ð’ CYRILLIC CAPITAL LETTER VE +G Г CYRILLIC CAPITAL LETTER GHE +D Д CYRILLIC CAPITAL LETTER DE +E Е CYRILLIC CAPITAL LETTER IE +$ Ð CYRILLIC CAPITAL LETTER IO +V Ж CYRILLIC CAPITAL LETTER ZHE +Z З CYRILLIC CAPITAL LETTER ZE +I И CYRILLIC CAPITAL LETTER I +J Й CYRILLIC CAPITAL LETTER SHORT I +K К CYRILLIC CAPITAL LETTER KA +L Л CYRILLIC CAPITAL LETTER EL +M М CYRILLIC CAPITAL LETTER EM +N Ð CYRILLIC CAPITAL LETTER EN +O О CYRILLIC CAPITAL LETTER O +P П CYRILLIC CAPITAL LETTER PE +R Р CYRILLIC CAPITAL LETTER ER +S С CYRILLIC CAPITAL LETTER ES +T Т CYRILLIC CAPITAL LETTER TE +U У CYRILLIC CAPITAL LETTER U +F Ф CYRILLIC CAPITAL LETTER EF +H Ð¥ CYRILLIC CAPITAL LETTER HA +C Ц CYRILLIC CAPITAL LETTER TSE ++ Ч CYRILLIC CAPITAL LETTER CHE +{ Ш CYRILLIC CAPITAL LETTER SHA +} Щ CYRILLIC CAPITAL LETTER SHCHA +^ Ъ CYRILLIC CAPITAL LETTER HARD SIGN +Y Ы CYRILLIC CAPITAL LETTER YERU +X Ь CYRILLIC CAPITAL LETTER SOFT SIGN +| Э CYRILLIC CAPITAL LETTER E +~ Ю CYRILLIC CAPITAL LETTER YU +Q Я CYRILLIC CAPITAL LETTER YA +a а CYRILLIC SMALL LETTER A +b б CYRILLIC SMALL LETTER BE +w в CYRILLIC SMALL LETTER VE +g г CYRILLIC SMALL LETTER GHE +d д CYRILLIC SMALL LETTER DE +e е CYRILLIC SMALL LETTER IE +# Ñ‘ CYRILLIC SMALL LETTER IO +v ж CYRILLIC SMALL LETTER ZHE +z з CYRILLIC SMALL LETTER ZE +i и CYRILLIC SMALL LETTER I +j й CYRILLIC SMALL LETTER SHORT I +k к CYRILLIC SMALL LETTER KA +l л CYRILLIC SMALL LETTER EL +m м CYRILLIC SMALL LETTER EM +n н CYRILLIC SMALL LETTER EN +o о CYRILLIC SMALL LETTER O +p п CYRILLIC SMALL LETTER PE +r Ñ€ CYRILLIC SMALL LETTER ER +s Ñ CYRILLIC SMALL LETTER ES +t Ñ‚ CYRILLIC SMALL LETTER TE +u у CYRILLIC SMALL LETTER U +f Ñ„ CYRILLIC SMALL LETTER EF +h Ñ… CYRILLIC SMALL LETTER HA +c ц CYRILLIC SMALL LETTER TSE += ч CYRILLIC SMALL LETTER CHE +[ ш CYRILLIC SMALL LETTER SHA +] щ CYRILLIC SMALL LETTER SHCHA +% ÑŠ CYRILLIC SMALL LETTER HARD SIGN +y Ñ‹ CYRILLIC SMALL LETTER YERU +x ÑŒ CYRILLIC SMALL LETTER SOFT SIGN +\\ Ñ CYRILLIC SMALL LETTER E +` ÑŽ CYRILLIC SMALL LETTER YU +q Ñ CYRILLIC SMALL LETTER YA diff --git a/runtime/keymap/serbian-latin.vim b/runtime/keymap/serbian-latin.vim new file mode 100644 index 0000000000..0d2de15d04 --- /dev/null +++ b/runtime/keymap/serbian-latin.vim @@ -0,0 +1 @@ +source :p:h/serbian-latin_utf-8.vim diff --git a/runtime/keymap/serbian-latin_utf-8.vim b/runtime/keymap/serbian-latin_utf-8.vim new file mode 100644 index 0000000000..a1b577a113 --- /dev/null +++ b/runtime/keymap/serbian-latin_utf-8.vim @@ -0,0 +1,44 @@ +" Vim Keymap file for Serbian characters, classical variant, UTF-8 encoding +" +" Maintainer: Aleksandar Veselinovic +" URL: http://www.cs.cmu.edu/~aleksa/personal/vim/keymap/serbian-latin-UTF-8.vim +" Last Changed: 2002 Mar 29 + +scriptencoding UTF-8 + +let b:keymap_name = "serbian-UTF-8" + +loadkeymap +Y Z +{ Å  +} Ä +y z +[ Å¡ +] Ä‘ +: ÄŒ +\" Ć +\| Ž +; Ä +' ć +\\ ž +"Z Y +"z y +< ; +> : +/ - +_ ? +,, „ +'' †+ +E$ " EURO SIGN +-- " endash +--- " emdash + +" @ " +" # ' +" $ * +" % : +" ^ , +" & . +" * ; + diff --git a/runtime/keymap/serbian.vim b/runtime/keymap/serbian.vim new file mode 100644 index 0000000000..56d247cf49 --- /dev/null +++ b/runtime/keymap/serbian.vim @@ -0,0 +1,20 @@ +let encoding = &enc +if encoding == 'latin1' + if has("unix") + let encoding = 'iso-8859-2' + else + let encoding = 'cp1250' + endif +endif + +if encoding == 'utf-8' + source :p:h/serbian_utf-8.vim +elseif encoding == 'cp1250' + source :p:h/serbian_cp1250.vim +elseif encoding == 'cp1251' + source :p:h/serbian_cp1251.vim +elseif encoding == 'iso-8859-2' + source :p:h/serbian_iso-8859-2.vim +else + source :p:h/serbian_iso-8859-5.vim +endif diff --git a/runtime/keymap/serbian_cp1250.vim b/runtime/keymap/serbian_cp1250.vim new file mode 100644 index 0000000000..30f80adf96 --- /dev/null +++ b/runtime/keymap/serbian_cp1250.vim @@ -0,0 +1,40 @@ +" Vim Keymap file for Serbian characters, classical variant, cp1250 encoding +" +" Maintainer: Aleksandar Veselinovic +" URL: http://galeb.etf.bg.ac.yu/~alexa/vim/keymap/serbian-cp1250.vim +" Last Changed: 2002 Mar 29 + +scriptencoding cp1250 + +let b:keymap_name = "serbian-cp1250" + +loadkeymap +Y Z +{ Š +} Ð +y z +[ š +] ð +: È +\" Æ +\| Ž +; è +' æ +\\ ž +"Z Y +"z y +< ; +> : +/ - +_ ? +,, „ +'' ” + +" @ " +" # ' +" $ * +" % : +" ^ , +" & . +" * ; + diff --git a/runtime/keymap/serbian_cp1251.vim b/runtime/keymap/serbian_cp1251.vim new file mode 100644 index 0000000000..0b1ce96ff9 --- /dev/null +++ b/runtime/keymap/serbian_cp1251.vim @@ -0,0 +1,90 @@ +" Vim Keymap file for Serbian characters, classical variant, win cp1251 +" encoding +" +" Maintainer: Aleksandar Veselinovic +" URL: http://www.cs.cmu.edu/~aleksa/personal/vim/keymap/serbian-cp1251.vim +" Last Changed: 2002 Mar 29 + +scriptencoding cp1251 + +let b:keymap_name = "serbian-cp1251" + +loadkeymap +Q Š +W Œ +E Å +R Ð +T Ò +Y Ç +U Ó +I È +O Î +P Ï +{ Ø +} € +q š +w œ +e å +r ð +t ò +y ç +u ó +i è +o î +p ï +[ ø +] +A À +S Ñ +D Ä +F Ô +G à +H Õ +J £ +K Ê +L Ë +: × +\" Ž +\| Æ +a à +s ñ +d ä +f ô +g ã +h õ +j ¼ +k ê +l ë +; ÷ +' ž +\\ æ +"Z Ç +X +C Ö +V  +B Á +N Í +M Ì +"z ç +x Ÿ +c ö +v â +b á +n í +m ì + +< ; +> : +/ - +_ ? +,, „ +'' ” + +" @ " +" # ' +" $ * +" % : +" ^ , +" & . +" * ; + diff --git a/runtime/keymap/serbian_iso-8859-2.vim b/runtime/keymap/serbian_iso-8859-2.vim new file mode 100644 index 0000000000..d3be35eec6 --- /dev/null +++ b/runtime/keymap/serbian_iso-8859-2.vim @@ -0,0 +1,40 @@ +" Vim Keymap file for Serbian characters, classical variant, iso-8859-2 encoding +" +" Maintainer: Aleksandar Veselinovic +" URL: http://www.cs.cmu.edu/~aleksa/personal/vim/keymap/serbian-iso-8859-2.vim +" Last Changed: 2002 Mar 29 + +scriptencoding iso-8859-2 + +let b:keymap_name = "serbian-iso-8859-2" + +loadkeymap +Y Z +{ © +} Ð +y z +[ ¹ +] ð +: È +\" Æ +\| ® +; è +' æ +\\ ¾ +"Z Y +"z y +< ; +> : +/ - +_ ? +,, ? +'' ? + +" @ " +" # ' +" $ * +" % : +" ^ , +" & . +" * ; + diff --git a/runtime/keymap/serbian_iso-8859-5.vim b/runtime/keymap/serbian_iso-8859-5.vim new file mode 100644 index 0000000000..113383cdf5 --- /dev/null +++ b/runtime/keymap/serbian_iso-8859-5.vim @@ -0,0 +1,89 @@ +" Vim Keymap file for Serbian characters, classical variant, iso-8859-5 encoding +" +" Maintainer: Aleksandar Veselinovic +" URL: http://www.cs.cmu.edu/~aleksa/personal/vim/keymap/serbian-iso-8859-5.vim +" Last Changed: 2002 Mar 29 + +scriptencoding iso-8859-5 + +let b:keymap_name = "serbian-iso-8859-5" + +loadkeymap +Q © +W ª +E µ +R À +T  +Y · +U à +I ¸ +O ¾ +P ¿ +{ È +} ¢ +q ù +w ú +e Õ +r à +t â +y × +u ã +i Ø +o Þ +p ß +[ è +] ò +A ° +S Á +D ´ +F Ä +G ³ +H Å +J ¨ +K º +L » +: Ç +\" « +\| ¶ +a Ð +s á +d Ô +f ä +g Ó +h å +j ø +k Ú +l Û +; ç +' û +\\ Ö +"Z · +X ¯ +C Æ +V ² +B ± +N ½ +M ¼ +"z × +x ÿ +c æ +v Ò +b Ñ +n Ý +m Ü + +< ; +> : +/ - +_ ? +,, ? +'' ? + +" @ " +" # ' +" $ * +" % : +" ^ , +" & . +" * ; + diff --git a/runtime/keymap/serbian_utf-8.vim b/runtime/keymap/serbian_utf-8.vim new file mode 100644 index 0000000000..3388bfd288 --- /dev/null +++ b/runtime/keymap/serbian_utf-8.vim @@ -0,0 +1,93 @@ +" Vim Keymap file for Serbian characters, classical variant, UTF-8 encoding +" +" Maintainer: Aleksandar Veselinovic +" URL: http://www.cs.cmu.edu/~aleksa/personal/vim/keymap/serbian-UTF-8.vim +" Last Changed: 2002 Mar 29 + +scriptencoding UTF-8 + +let b:keymap_name = "serbian-UTF-8" + +loadkeymap +Q Љ +W Њ +E Е +R Р +T Т +Y З +U У +I И +O О +P П +{ Ш +} Ђ +q Ñ™ +w Ñš +e е +r Ñ€ +t Ñ‚ +y з +u у +i и +o о +p п +[ ш +] Ñ’ +A Ð +S С +D Д +F Ф +G Г +H Ð¥ +J Ј +K К +L Л +: Ч +\" Ћ +\| Ж +a а +s Ñ +d д +f Ñ„ +g г +h Ñ… +j ј +k к +l л +; ч +' Ñ› +\\ ж +"Z З +X Ð +C Ц +V Ð’ +B Б +N Ð +M М +"z з +x ÑŸ +c ц +v в +b б +n н +m м + +< ; +> : +/ - +_ ? +,, „ +'' †+ +E$ " EURO SIGN +-- " endash +--- " emdash + +" @ " +" # ' +" $ * +" % : +" ^ , +" & . +" * ; + diff --git a/runtime/keymap/sinhala-phonetic_utf-8.vim b/runtime/keymap/sinhala-phonetic_utf-8.vim new file mode 100644 index 0000000000..adedc3f7cb --- /dev/null +++ b/runtime/keymap/sinhala-phonetic_utf-8.vim @@ -0,0 +1,107 @@ +" Vim Keymap file for Sinhala (Sri Lanka) (2003-11-02) +" Maintainer : Harshula Jayasuriya +" Last Updated: 2007-06-30 +" This is a phonetic static mapping for a standard US-English keyboard +" (qwerty) +" http://www.nongnu.org/sinhala/doc/keymaps/sinhala-keyboard_3.html + +" Copy the keymap to ~/.vim/keymap/ +" Start gvim +" Need to disable the menu so that you can use the 'alt' key. +" set guioptions-=m +" Select the new keymap +" set keymap=sinhala-phonetic_utf-8 + +let b:keymap_name = "sinhala" + +loadkeymap + " à¶‚ - anusvaraya (anusvara) +H " ඃ - visargaya (visarga) +a " à¶… - ayanna (a) +A " ආ - aayanna (aa) +w " ඇ - aeyanna (ae) +W " ඈ - aeeyanna (aee) +i " ඉ - iyanna (i) +I " à¶Š - iiyanna (ii) +u " à¶‹ - uyanna (u) +U " à¶Œ - uuyanna (uu) +q " à¶ - iruyanna (iru) +Q " à¶Ž - iruuyanna (iruu) + " à¶ - iluyanna (ilu) + " à¶ - iluuyanna (iluu) +e " à¶‘ - eyanna (e) +E " à¶’ - eeyanna (ee) + " à¶“ - aiyanna (ai) +o " à¶” - oyanna (o) +O " à¶• - ooyanna (oo) + " à¶– - auyanna (au) +k " à¶š - alpapraana kayanna (ka) +K " à¶› - mahaapraana kayanna (kha) +g " à¶œ - alpapraana gayanna (ga) +G " à¶ - mahaapraana gayanna (gha) + " à¶ž - kantaja naasikyaya (nga) + " à¶Ÿ - sanyaka gayanna (nnga) +c " à¶  - alpapraana cayanna (ca) +C " à¶¡ - mahaapraana cayanna (cha) +j " à¶¢ - alpapraana jayanna (ja) +J " à¶£ - mahaapraana jayanna (jha) +z " ඤ - taaluja naasikyaya (nya) +Z " à¶¥ - taaluja sanyooga naasikyaya (jnya) + " ඦ - sanyaka jayanna (nyja) + " à¶§ - alpapraana ttayanna (tta) + " ඨ - mahaapraana ttayanna (ttha) + " à¶© - alpapraana ddayanna (dda) + " ඪ - mahaapraana ddayanna (ddha) +N " à¶« - muurdhaja nayanna (nna) +X " ඬ - sanyaka ddayanna (nndda) +t " à¶­ - alpapraana tayanna (ta) +T " à¶® - mahaapraana tayanna (tha) +d " ද - alpapraana dayanna (da) +D " à¶° - mahaapraana dayanna (dha) +n " à¶± - dantaja nayanna (na) +x " à¶³ - sanyaka dayanna (nda) +p " à¶´ - alpapraana payanna (pa) +P " à¶µ - mahaapraana payanna (pha) +b " à¶¶ - alpapraana bayanna (ba) +B " à¶· - mahaapraana bayanna (bha) +m " ම - mayanna (ma) +M " à¶¹ - amba bayanna (mba) +y " ය - yayanna (ya) +r " à¶» - rayanna (ra) +l " à¶½ - dantaja layanna (la) +v " à·€ - vayanna (va) +S " à· - taaluja sayanna (sha) + " à·‚ - muurdhaja sayanna (ssa) +s " à·ƒ - dantaja sayanna (sa) +h " à·„ - hayanna (ha) +L " à·… - muurdhaja layanna (lla) +f " à·† - fayanna (fa) + " à·Š - al-lakuna + " à· - aela-pilla (aa) + " à· - ketti aeda-pilla (ae) + " à·‘ - diga aeda-pilla (aae) + " à·’ - ketti is-pilla (i) + " à·“ - diga is-pilla (ii) + " à·” - ketti paa-pilla (u) + " à·– - diga paa-pilla (uu) + " à·˜ - gaetta-pilla (r) + " à·™ - kombuva (e) + " à·š - diga kombuva (ee) + " à·› - kombu deka (ai) + " à·œ - kombuva haa aela-pilla (o) + " à· - kombuva haa diga aela-pilla (oo) + " à·ž - kombuva haa gayanukitta (au) + " à·Ÿ - gayanukitta (l) + " à·² - diga gaetta-pilla (rr) + " à·³ - diga gayanukitta (ll) + " à·´ - kunddaliya (punctuation) + +R " à·Šâ€à¶» - rakaaranshaya +Y " à·Šâ€à¶º - yansaya + " ර්†- repaya + + " join - conjunct letters cons 0DCA ZWJ cons + " touch - cons ZWJ 0DCA cons + + " - no-break space. didn't work. + " - ZWNJ. doesn't work! diff --git a/runtime/keymap/sinhala.vim b/runtime/keymap/sinhala.vim new file mode 100644 index 0000000000..86091b4d77 --- /dev/null +++ b/runtime/keymap/sinhala.vim @@ -0,0 +1,3 @@ +" Vim Keymap file for Sinhala (Sri Lanka) +" +source :p:h/sinhala-phonetic_utf-8.vim diff --git a/runtime/keymap/slovak.vim b/runtime/keymap/slovak.vim new file mode 100644 index 0000000000..f9fd6d62a7 --- /dev/null +++ b/runtime/keymap/slovak.vim @@ -0,0 +1,16 @@ +let encoding = &enc +if encoding == 'latin1' + if has("unix") + let encoding = 'iso-8859-2' + else + let encoding = 'cp1250' + endif +endif + +if encoding == 'utf-8' + source :p:h/slovak_utf-8.vim +elseif encoding == 'cp1250' + source :p:h/slovak_cp1250.vim +else + source :p:h/slovak_iso-8859-2.vim +endif diff --git a/runtime/keymap/slovak_cp1250.vim b/runtime/keymap/slovak_cp1250.vim new file mode 100644 index 0000000000..73234cb373 --- /dev/null +++ b/runtime/keymap/slovak_cp1250.vim @@ -0,0 +1,100 @@ +" Maintainer: Peter Valach +" Last Changed: 2002 Feb 3 +" URL: http://www.pv2c.sk/free/sk_vimkeymap/ + +let b:keymap_name = "sk" + +loadkeymap +" Z a Y - ak chcete slovensku qwerty, zakomentujte tieto styri riadky +y z +z y +Y Z +Z Y + +" Horny riadok +` ; +1 + +! 1 +2 ¾ +@ 2 +3 š +# 3 +4 è +$ 4 +5 +% 5 +6 ž +^ 6 +7 ý +& 7 +8 á +* 8 +9 í +( 9 +0 é +) 0 +- = +_ % + +" Klavesy okolo Enteru :) +[ ú +{ / +] ä +} ( +\\ ò + ) +; ô +: " +' § +\" ! +", , ;-) +< ? +". . ;-) +> : +/ - +? _ + +" Dlzne +=a á +=A Á +=e é +=E É +=i í +=I Í +=l å +=L Å +=o ó +=O Ó +=r à +=R À +=u ú +=U Ú +=z ý +=Z Ý +" pre pripad omylu :) alebo slovenskej QWERTY +=y ý +=Y Ý + +" Makcene ++a ä ++A Ä ++c è ++C È ++d ï ++D Ï ++l ¾ ++L ¼ ++n ò ++N Ò ++o ô ++O Ô ++s š ++S Š ++t ++T ++y ž ++Y Ž +" pre pripad omylu :) alebo slovenskej QWERTY ++z ž ++Z Ž + diff --git a/runtime/keymap/slovak_iso-8859-2.vim b/runtime/keymap/slovak_iso-8859-2.vim new file mode 100644 index 0000000000..8c43fb1127 --- /dev/null +++ b/runtime/keymap/slovak_iso-8859-2.vim @@ -0,0 +1,100 @@ +" Maintainer: Peter Valach +" Last Changed: 2002 Feb 3 +" URL: http://www.pv2c.sk/free/sk_vimkeymap/ + +let b:keymap_name = "sk" + +loadkeymap +" Z a Y - ak chcete slovensku qwerty, zakomentujte tieto styri riadky +y z +z y +Y Z +Z Y + +" Horny riadok +` ; +1 + +! 1 +2 µ +@ 2 +3 ¹ +# 3 +4 è +$ 4 +5 » +% 5 +6 ¾ +^ 6 +7 ý +& 7 +8 á +* 8 +9 í +( 9 +0 é +) 0 +- = +_ % + +" Klavesy okolo Enteru :) +[ ú +{ / +] ä +} ( +\\ ò + ) +; ô +: " +' § +\" ! +", , ;-) +< ? +". . ;-) +> : +/ - +? _ + +" Dlzne +=a á +=A Á +=e é +=E É +=i í +=I Í +=l å +=L Å +=o ó +=O Ó +=r à +=R À +=u ú +=U Ú +=z ý +=Z Ý +" pre pripad omylu :) alebo slovenskej QWERTY +=y ý +=Y Ý + +" Makcene ++a ä ++A Ä ++c è ++C È ++d ï ++D Ï ++l µ ++L ¥ ++n ò ++N Ò ++o ô ++O Ô ++s ¹ ++S © ++t » ++T « ++y ¾ ++Y ® +" pre pripad omylu :) alebo slovenskej QWERTY ++z ¾ ++Z ® + diff --git a/runtime/keymap/slovak_utf-8.vim b/runtime/keymap/slovak_utf-8.vim new file mode 100644 index 0000000000..8e3e0838ed --- /dev/null +++ b/runtime/keymap/slovak_utf-8.vim @@ -0,0 +1,100 @@ +" Maintainer: Peter Valach +" Last Changed: 2002 Nov 5 +" URL: http://www.pv2c.sk/free/sk_vimkeymap/ + +let b:keymap_name = "sk" + +loadkeymap +" Z a Y - ak chcete slovensku qwerty, zakomentujte tieto styri riadky +y z +z y +Y Z +Z Y + +" Horny riadok +` ; +1 + +! 1 +2 ľ +@ 2 +3 Å¡ +# 3 +4 Ä +$ 4 +5 Å¥ +% 5 +6 ž +^ 6 +7 ý +& 7 +8 á +* 8 +9 í +( 9 +0 é +) 0 +- = +_ % + +" Klavesy okolo Enteru :) +[ ú +{ / +] ä +} ( +\\ ň + ) +; ô +: " +' § +\" ! +", , ;-) +< ? +". . ;-) +> : +/ - +? _ + +" Dlzne +=a á +=A à +=e é +=E É +=i í +=I à +=l ĺ +=L Ĺ +=o ó +=O Ó +=r Å• +=R Å” +=u ú +=U Ú +=z ý +=Z à +" pre pripad omylu :) alebo slovenskej QWERTY +=y ý +=Y à + +" Makcene ++a ä ++A Ä ++c Ä ++C ÄŒ ++d Ä ++D ÄŽ ++l ľ ++L Ľ ++n ň ++N Ň ++o ô ++O Ô ++s Å¡ ++S Å  ++t Å¥ ++T Ť ++y ž ++Y Ž +" pre pripad omylu :) alebo slovenskej QWERTY ++z ž ++Z Ž + diff --git a/runtime/keymap/tamil_tscii.vim b/runtime/keymap/tamil_tscii.vim new file mode 100644 index 0000000000..df85a4eab5 --- /dev/null +++ b/runtime/keymap/tamil_tscii.vim @@ -0,0 +1,572 @@ +" Keymap file for the editing Tamil language files in TSCII encoding. +" +" Maintainer: Yegappan Lakshmanan (yegappan AT yahoo DOT com) +" Last updated: 2006 June 17 +" +" You will need a fixed width TSCII font to use this encoding. The +" Avarangal TSCII fixed width font (TSC_AvarangalFxd) is used to test +" this keymap. +" +" Visit http://www.tscii.org for more information about the TSCII +" encoding. +" +let b:keymap_name = "tamil_tscii" + +loadkeymap + +" Uyir (Vowels) letters +a +aa +A +i +ii +I +u +uu +U +e +ee +E +ai +o +oo +O +au +q + +" mey (Consonants) letters +k +ka +kaa +kA +ki +kii +kI +ku +kuu +kU +ke +kee +kE +kai +ko +koo +kO +kau + +g +ga +gaa +gA +gi +gii +gI +gu +guu +gU +ge +gee +gE +gai +go +goo +gO +gau + +ng +nga +ngaa +ngA +ngi +ngii +ngI +ngu +nguu +ngU +nge +ngee +ngE +ngai +ngo +ngoo +ngO +ngau + +ch +cha +chaa +chA +chi +chii +chI +chu +chuu +chU +che +chee +chE +chai +cho +choo +chO +chau + +s +sa +saa +sA +si +sii +sI +su +suu +sU +se +see +sE +sai +so +soo +sO +sau + +nj +nja +njaa +njA +nji +njii +njI +nju +njuu +njU +nje +njee +njE +njai +njo +njoo +njO +njau + +t +ta +taa +tA +ti +tii +tI +tu +tuu +tU +te +tee +tE +tai +to +too +tO +tau + +d +da +daa +dA +di +dii +dI +du +duu +dU +de +dee +dE +dai +do +doo +dO +dau + +N +Na +Naa +NA +Ni +Nii +NI +Nu +Nuu +NU +Ne +Nee +NE +Nai +No +Noo +NO +Nau + +th +tha +thaa +thA +thi +thii +thI +thu +thuu +thU +the +thee +thE +thai +tho +thoo +thO +thau + +w +wa +waa +wA +wi +wii +wI +wu +wuu +wU +we +wee +wE +wai +wo +woo +wO +wau + +n- +n-a +n-aa +n-A +n-i +n-ii +n-I +n-u +n-uu +n-U +n-e +n-ee +n-E +n-ai +n-o +n-oo +n-O +n-au + +p +pa +paa +pA +pi +pii +pI +pu +puu +pU +pe +pee +pE +pai +po +poo +pO +pau + +b +ba +baa +bA +bi +bii +bI +bu +buu +bU +be +bee +bE +bai +bo +boo +bO +bau + +m +ma +maa +mA +mi +mii +mI +mu +muu +mU +me +mee +mE +mai +mo +moo +mO +mau + +y +ya +yaa +yA +yi +yii +yI +yu +yuu +yU +ye +yee +yE +yai +yo +yoo +yO +yau + +r +ra +raa +rA +ri +rii +rI +ru +ruu +rU +re +ree +rE +rai +ro +roo +rO +rau + +l +la +laa +lA +li +lii +lI +lu +luu +lU +le +lee +lE +lai +lo +loo +lO +lau + +v +va +vaa +vA +vi +vii +vI +vu +vuu +vU +ve +vee +vE +vai +vo +voo +vO +vau + +z +za +zaa +zA +zi +zii +zI +zu +zuu +zU +ze +zee +zE +zai +zo +zoo +zO +zau + +L +La +Laa +LA +Li +Lii +LI +Lu +Luu +LU +Le +Lee +LE +Lai +Lo +Loo +LO +Lau + +R +Ra +Raa +RA +Ri +Rii +RI +Ru +Ruu +RU +Re +Ree +RE +Rai +Ro +Roo +RO +Rau + +n +na +naa +nA +ni +nii +nI +nu +nuu +nU +ne +nee +nE +nai +no +noo +nO +nau + +" Grantha letters +j +ja +jaa +jA +ji +jii +jI +ju +juu +jU +je +jee +jE +jai +jo +joo +jO +jau + +sh +sha +shaa +shA +shi +shii +shI +shu +shuu +shU +she +shee +shE +shai +sho +shoo +shO +shau + +S +Sa +Saa +SA +Si +Sii +SI +Su +Suu +SU +Se +See +SE +Sai +So +Soo +SO +Sau + +h +ha +haa +hA +hi +hii +hI +hu +huu +hU +he +hee +hE +hai +ho +hoo +hO +hau + +x +xa +xaa +xA +xi +xii +xI +xu +xuu +xU +xe +xee +xE +xai +xo +xoo +xO +xau + +sri + diff --git a/runtime/keymap/thaana-phonetic_utf-8.vim b/runtime/keymap/thaana-phonetic_utf-8.vim new file mode 100644 index 0000000000..ec235ac891 --- /dev/null +++ b/runtime/keymap/thaana-phonetic_utf-8.vim @@ -0,0 +1,86 @@ +" thaana keymap +" Maintainer: Ibrahim fayaz

+" please set enc to utf-8 +" thaana phonetic keyboard is used as a reference +" http://www.mcst.gov.mv/News_and_Events/xpfonts.htm +" changelog: 18th Feb 2006 - came up the initial idea of writing the keymap.. +" 13th May 2006 - made some few corrections regarding < and >.. + +let b:keymap_name= "thaana" + +" THAANA NORMAL LETTERS +loadkeymap +h "letter haa +S "shaviani +n "noonu +r "raa +b "baa +L "lhaviani +k "kaafu +w "alifu +v "vaavu +m "meemu +f "faafu +d "dhaalu +t "thaa +l "laamu +g "gaafu +N "gnaviani +s "seenu +D "daviani +z "zaviani +T "taviani +y "yaa +p "paviani +j "javiani +c "chaviani + +"THAANA DOTTED LETTERS +X "TTAA (thaa mathee thin thiki) +H "HHAA (haa thiree ehthiki) +K "KHAA (haa mathee ehthiki) +J "THAALU (dhaa mathee ehthiki) +R "ZAA (raa mathee ehthiki) +C "SHEENU (seenu mathee thinthiki) +M "SAADHU (seenu thiree ehthiki) +B "DHAADHU(seenu mathee ehthiki) +Y "TO (thaa thiree ehthiki) +Z "ZO (thaa mathee ehthiki) +W "AINU (alifu thiree ehthiki) +G "GHAINU (alifu mathee ehthiki) +Q "QAAFU (gaafu mathee dhethkiki) +V "VAAVU (vaavu mathee ehthiki) + +"THAANA FILI (combining characters) +a "abafili +A "aabaafili +i "ibifili +I "eebeefili +u "ubufili +U "ooboofili +e "ebefili +E "ebeyfili +o "obofili +O "oaboafili +q "sukun + +"OTHER THAANA RELATED +F "arabic ligature allah isolated form +? "arabic question mark +"~ "arabic -bismillah ahrahman araheem- not in phonetic keyboard, thats why commented +[ "english open bracket is thaana closing bracket +] "english close bracket = thaana open bracket +{ "braces reversed +} +x " x for multiplication sign.. +P " division symbol mapped to 'p' +> +< + "zwj - ZERO WIDTH JOINER i dont know how to use these yet.. + "zwnj - ZERO WIDTH NON JOINER + "lrm - LEFT TO RIGHT MARK + "rlm - RIGHT TO LEFT MARK +; "arabic semicolon +, "arabic coma + ; + , diff --git a/runtime/keymap/thaana.vim b/runtime/keymap/thaana.vim new file mode 100644 index 0000000000..bf22d80ec5 --- /dev/null +++ b/runtime/keymap/thaana.vim @@ -0,0 +1,3 @@ +if &enc == 'utf-8' + source :p:h/thaana-phonetic_utf-8.vim +endif diff --git a/runtime/keymap/ukrainian-dvorak.vim b/runtime/keymap/ukrainian-dvorak.vim new file mode 100644 index 0000000000..589dae1e72 --- /dev/null +++ b/runtime/keymap/ukrainian-dvorak.vim @@ -0,0 +1,92 @@ +" Vim Keymap file for ukrainian characters, layout 'dvorak', +" MS Windows variant +" Derived from ukrainian-jcuken.vim by Anatoli Sakhnik +" Useful mainly with utf-8 but may work with other encodings + +" Maintainer: Serhiy Boiko +" Last Changed: 2007 Jun 29 + +" All characters are given literally, conversion to another encoding (e.g., +" UTF-8) should work. +scriptencoding utf-8 + +let b:keymap_name = "uk" + +loadkeymap +~ ~ CYRILLIC CAPITAL LETTER IO +` ' CYRILLIC SMALL LETTER IO +U Ð CYRILLIC CAPITAL LETTER A +W Б CYRILLIC CAPITAL LETTER BE +E Ð’ CYRILLIC CAPITAL LETTER VE +G Г CYRILLIC CAPITAL LETTER GHE +N Д CYRILLIC CAPITAL LETTER DE +Y Е CYRILLIC CAPITAL LETTER IE +S Ж CYRILLIC CAPITAL LETTER ZHE +L З CYRILLIC CAPITAL LETTER ZE +X И CYRILLIC CAPITAL LETTER I +\" Й CYRILLIC CAPITAL LETTER SHORT I +P К CYRILLIC CAPITAL LETTER KA +T Л CYRILLIC CAPITAL LETTER EL +K М CYRILLIC CAPITAL LETTER EM +F Ð CYRILLIC CAPITAL LETTER EN +H О CYRILLIC CAPITAL LETTER O +I П CYRILLIC CAPITAL LETTER PE +D Р CYRILLIC CAPITAL LETTER ER +J С CYRILLIC CAPITAL LETTER ES +B Т CYRILLIC CAPITAL LETTER TE +> У CYRILLIC CAPITAL LETTER U +A Ф CYRILLIC CAPITAL LETTER EF +? Ð¥ CYRILLIC CAPITAL LETTER HA +< Ц CYRILLIC CAPITAL LETTER TSE +Q Ч CYRILLIC CAPITAL LETTER CHE +C Ш CYRILLIC CAPITAL LETTER SHA +R Щ CYRILLIC CAPITAL LETTER SHCHA ++ Ї CYRILLIC CAPITAL LETTER YI +O І CYRILLIC CAPITAL LETTER BYELORUSSION-UKRAINIAN I +M Ь CYRILLIC CAPITAL LETTER SOFT SIGN +_ Є CYRILLIC CAPITAL LETTER UKRAINIAN IE +V Ю CYRILLIC CAPITAL LETTER YU +: Я CYRILLIC CAPITAL LETTER YA +| Ò CYRILLIC CAPITAL LETTER GHE WITH UPTURN +u а CYRILLIC SMALL LETTER A +w б CYRILLIC SMALL LETTER BE +e в CYRILLIC SMALL LETTER VE +g г CYRILLIC SMALL LETTER GHE +n д CYRILLIC SMALL LETTER DE +y е CYRILLIC SMALL LETTER IE +s ж CYRILLIC SMALL LETTER ZHE +l з CYRILLIC SMALL LETTER ZE +x и CYRILLIC SMALL LETTER I +' й CYRILLIC SMALL LETTER SHORT I +p к CYRILLIC SMALL LETTER KA +t л CYRILLIC SMALL LETTER EL +k м CYRILLIC SMALL LETTER EM +f н CYRILLIC SMALL LETTER EN +h о CYRILLIC SMALL LETTER O +i п CYRILLIC SMALL LETTER PE +d Ñ€ CYRILLIC SMALL LETTER ER +j Ñ CYRILLIC SMALL LETTER ES +b Ñ‚ CYRILLIC SMALL LETTER TE +. у CYRILLIC SMALL LETTER U +a Ñ„ CYRILLIC SMALL LETTER EF +/ Ñ… CYRILLIC SMALL LETTER HA +, ц CYRILLIC SMALL LETTER TSE +q ч CYRILLIC SMALL LETTER CHE +c ш CYRILLIC SMALL LETTER SHA +r щ CYRILLIC SMALL LETTER SHCHA += Ñ— CYRILLIC SMALL LETTER YI +o Ñ– CYRILLIC SMALL LETTER BYELORUSSION-UKRAINIAN I +m ÑŒ CYRILLIC SMALL LETTER SOFT SIGN +- Ñ” CYRILLIC SMALL LETTER UKRAINIAN IE +v ÑŽ CYRILLIC SMALL LETTER YU +; Ñ CYRILLIC SMALL LETTER YA +\\ Ò‘ CYRILLIC SMALL LETTER GHE WITH UPTURN +@ " +# â„– NUMERO SIGN +$ ; +^ : +& ? +z . +Z , +[ - +] = diff --git a/runtime/keymap/ukrainian-jcuken.vim b/runtime/keymap/ukrainian-jcuken.vim new file mode 100644 index 0000000000..fcc1c34f8b --- /dev/null +++ b/runtime/keymap/ukrainian-jcuken.vim @@ -0,0 +1,92 @@ +" Vim Keymap file for ukrainian characters, layout 'jcuken', classical variant +" (compatible with XFree86 'uk' keymap) +" Derived from russian-jcuken.vim by Artem Chuprina +" Useful mainly with utf-8 but may work with other encodings + +" Maintainer: Anatoli Sakhnik +" Last Changed: 2007 Nov 11 + +" All characters are given literally, conversion to another encoding (e.g., +" UTF-8) should work. +scriptencoding utf-8 + +let b:keymap_name = "uk" + +loadkeymap +~ ~ +` ' +F Ð CYRILLIC CAPITAL LETTER A +< Б CYRILLIC CAPITAL LETTER BE +D Ð’ CYRILLIC CAPITAL LETTER VE +U Г CYRILLIC CAPITAL LETTER GHE +L Д CYRILLIC CAPITAL LETTER DE +T Е CYRILLIC CAPITAL LETTER IE +: Ж CYRILLIC CAPITAL LETTER ZHE +P З CYRILLIC CAPITAL LETTER ZE +B И CYRILLIC CAPITAL LETTER I +Q Й CYRILLIC CAPITAL LETTER SHORT I +R К CYRILLIC CAPITAL LETTER KA +K Л CYRILLIC CAPITAL LETTER EL +V М CYRILLIC CAPITAL LETTER EM +Y Ð CYRILLIC CAPITAL LETTER EN +J О CYRILLIC CAPITAL LETTER O +G П CYRILLIC CAPITAL LETTER PE +H Р CYRILLIC CAPITAL LETTER ER +C С CYRILLIC CAPITAL LETTER ES +N Т CYRILLIC CAPITAL LETTER TE +E У CYRILLIC CAPITAL LETTER U +A Ф CYRILLIC CAPITAL LETTER EF +{ Ð¥ CYRILLIC CAPITAL LETTER HA +W Ц CYRILLIC CAPITAL LETTER TSE +X Ч CYRILLIC CAPITAL LETTER CHE +I Ш CYRILLIC CAPITAL LETTER SHA +O Щ CYRILLIC CAPITAL LETTER SHCHA +} Ї CYRILLIC CAPITAL LETTER YI +S І CYRILLIC CAPITAL LETTER BYELORUSSION-UKRAINIAN I +M Ь CYRILLIC CAPITAL LETTER SOFT SIGN +\" Є CYRILLIC CAPITAL LETTER UKRAINIAN IE +> Ю CYRILLIC CAPITAL LETTER YU +Z Я CYRILLIC CAPITAL LETTER YA +| Ò CYRILLIC CAPITAL LETTER GHE WITH UPTURN +f а CYRILLIC SMALL LETTER A +, б CYRILLIC SMALL LETTER BE +d в CYRILLIC SMALL LETTER VE +u г CYRILLIC SMALL LETTER GHE +l д CYRILLIC SMALL LETTER DE +t е CYRILLIC SMALL LETTER IE +; ж CYRILLIC SMALL LETTER ZHE +p з CYRILLIC SMALL LETTER ZE +b и CYRILLIC SMALL LETTER I +q й CYRILLIC SMALL LETTER SHORT I +r к CYRILLIC SMALL LETTER KA +k л CYRILLIC SMALL LETTER EL +v м CYRILLIC SMALL LETTER EM +y н CYRILLIC SMALL LETTER EN +j о CYRILLIC SMALL LETTER O +g п CYRILLIC SMALL LETTER PE +h Ñ€ CYRILLIC SMALL LETTER ER +c Ñ CYRILLIC SMALL LETTER ES +n Ñ‚ CYRILLIC SMALL LETTER TE +e у CYRILLIC SMALL LETTER U +a Ñ„ CYRILLIC SMALL LETTER EF +[ Ñ… CYRILLIC SMALL LETTER HA +w ц CYRILLIC SMALL LETTER TSE +x ч CYRILLIC SMALL LETTER CHE +i ш CYRILLIC SMALL LETTER SHA +o щ CYRILLIC SMALL LETTER SHCHA +] Ñ— CYRILLIC SMALL LETTER YI +s Ñ– CYRILLIC SMALL LETTER BYELORUSSION-UKRAINIAN I +m ÑŒ CYRILLIC SMALL LETTER SOFT SIGN +' Ñ” CYRILLIC SMALL LETTER UKRAINIAN IE +. ÑŽ CYRILLIC SMALL LETTER YU +z Ñ CYRILLIC SMALL LETTER YA +\\ Ò‘ CYRILLIC SMALL LETTER GHE WITH UPTURN +@ " +# ' +$ * +% : +^ , +& . +* ; +~ ~ +~~ Stress diff --git a/runtime/keymap/vietnamese-viqr_utf-8.vim b/runtime/keymap/vietnamese-viqr_utf-8.vim new file mode 100644 index 0000000000..b17be6daec --- /dev/null +++ b/runtime/keymap/vietnamese-viqr_utf-8.vim @@ -0,0 +1,160 @@ +" Vim Keymap file for vietnamese through the usual viqr method +" Maintainer: Samuel Thibault +" Last Change: 2006 Jun 17 + +scriptencoding utf-8 + +let b:keymap_name = "vietnamese" + +loadkeymap +a a +A A +a` à +A` À +a? ả +A? Ả +a~ ã +A~ à +a' á +A' à +a. ạ +A. Ạ +a( ă +A( Ä‚ +a(` ằ +A(` Ằ +a(? ẳ +A(? Ẳ +a(~ ẵ +A(~ Ẵ +a(' ắ +A(' Ắ +a(. ặ +A(. Ặ +a^ â +A^  +a^` ầ +A^` Ầ +a^? ẩ +A^? Ẩ +a^~ ẫ +A^~ Ẫ +a^' ấ +A^' Ấ +a^. ậ +A^. Ậ +d d +D D +dd Ä‘ +Dd Ä +DD Ä +e e +E E +e` è +E` È +e? ẻ +E? Ẻ +e~ ẽ +E~ Ẽ +e' é +E' É +e. ẹ +E. Ẹ +e^ ê +E^ Ê +e^` á» +E^` Ề +e^? ể +E^? Ể +e^~ á»… +E^~ Ễ +e^' ế +E^' Ế +e^. ệ +E^. Ệ +i i +I I +i` ì +I` ÃŒ +i? ỉ +I? Ỉ +i~ Ä© +I~ Ĩ +i' í +I' à +i. ị +I. Ị +o o +O O +o` ò +O` Ã’ +o? á» +O? Ỏ +o~ õ +O~ Õ +o' ó +O' Ó +o. á» +O. Ọ +o^ ô +O^ Ô +o^` ồ +O^` á»’ +o^? ổ +O^? á»” +o^~ á»— +O^~ á»– +o^' ố +O^' á» +o^. á»™ +O^. Ộ +o+ Æ¡ +O+ Æ  +o+` á» +O+` Ờ +o+? ở +O+? Ở +o+~ ỡ +O+~ á»  +o+' á»› +O+' Ớ +o+. ợ +O+. Ợ +u u +U U +u` ù +U` Ù +u? á»§ +U? Ủ +u~ Å© +U~ Ũ +u' ú +U' Ú +u. ụ +U. Ụ +u+ ư +U+ Ư +u+` ừ +U+` Ừ +u+? á»­ +U+? Ử +u+~ ữ +U+~ á»® +u+' ứ +U+' Ứ +u+. á»± +U+. á»° +y y +Y Y +y` ỳ +Y` Ỳ +y? á»· +Y? á»¶ +y~ ỹ +Y~ Ỹ +y' ý +Y' à +y. ỵ +Y. á»´ +\\d d +\\D D diff --git a/runtime/macmap.vim b/runtime/macmap.vim new file mode 100644 index 0000000000..dc76f15f96 --- /dev/null +++ b/runtime/macmap.vim @@ -0,0 +1,75 @@ +" System gvimrc file for Mac OS X +" Author: Benji Fisher +" Last Change: Thu Mar 09 09:00 AM 2006 EST +" +" Define Mac-standard keyboard shortcuts. + +" We don't change 'cpoptions' here, because it would not be set properly when +" a .vimrc file is found later. Thus don't use line continuation and use +" in mappings. + +nnoremap :confirm enew +vmap gv +imap +cmap +omap + +nnoremap :browse confirm e +vmap gv +imap +cmap +omap + +nnoremap :if winheight(2) < 0 confirm enew else confirm close endif +vmap gv +imap +cmap +omap + +nnoremap :if expand("%") == ""browse confirm w elseconfirm wendif +vmap gv +imap +cmap +omap + +nnoremap :browse confirm saveas +vmap gv +imap +cmap +omap + +" From the Edit menu of SimpleText: +nnoremap u +vmap gv +imap +cmap +omap + +vnoremap "+x + +vnoremap "+y + +cnoremap + +nnoremap "+gP +cnoremap + +execute 'vnoremap " + \ ]) + +call extend(s:lines, [""]) +if !empty(s:settings.prevent_copy) + call extend(s:lines, + \ ["", + \ "", + \ "

0
", + \ "
", + \ "
" + \ ]) +else + call extend(s:lines, [""]) +endif +if s:settings.no_pre + " if we're not using CSS we use a font tag which can't have a div inside + if s:settings.use_css + call extend(s:lines, ["
"]) + endif +else + call extend(s:lines, ["
"])
+endif
+
+exe s:orgwin . "wincmd w"
+
+" caches of style data
+" initialize to include line numbers if using them
+if s:settings.number_lines
+  let s:stylelist = { s:LINENR_ID : ".LineNr { " . s:CSS1( s:LINENR_ID ) . "}" }
+else
+  let s:stylelist = {}
+endif
+let s:diffstylelist = {
+      \   s:DIFF_A_ID : ".DiffAdd { " . s:CSS1( s:DIFF_A_ID ) . "}",
+      \   s:DIFF_C_ID : ".DiffChange { " . s:CSS1( s:DIFF_C_ID ) . "}",
+      \   s:DIFF_D_ID : ".DiffDelete { " . s:CSS1( s:DIFF_D_ID ) . "}",
+      \   s:DIFF_T_ID : ".DiffText { " . s:CSS1( s:DIFF_T_ID ) . "}"
+      \ }
+
+" set up progress bar in the status line
+if !s:settings.no_progress
+  " ProgressBar Indicator
+  let s:progressbar={}
+
+  " Progessbar specific functions
+  func! s:ProgressBar(title, max_value, winnr)
+    let pgb=copy(s:progressbar)
+    let pgb.title = a:title.' '
+    let pgb.max_value = a:max_value
+    let pgb.winnr = a:winnr
+    let pgb.cur_value = 0
+    let pgb.items = { 'title'   : { 'color' : 'Statusline' },
+	  \'bar'     : { 'color' : 'Statusline' , 'fillcolor' : 'DiffDelete' , 'bg' : 'Statusline' } ,
+	  \'counter' : { 'color' : 'Statusline' } }
+    let pgb.last_value = 0
+    let pgb.needs_redraw = 0
+    " Note that you must use len(split) instead of len() if you want to use 
+    " unicode in title.
+    "
+    " Subtract 3 for spacing around the title.
+    " Subtract 4 for the percentage display.
+    " Subtract 2 for spacing before this.
+    " Subtract 2 more for the '|' on either side of the progress bar
+    let pgb.subtractedlen=len(split(pgb.title, '\zs'))+3+4+2+2
+    let pgb.max_len = 0
+    set laststatus=2
+    return pgb
+  endfun
+
+  " Function: progressbar.calculate_ticks() {{{1
+  func! s:progressbar.calculate_ticks(pb_len)
+    if a:pb_len<=0
+      let pb_len = 100
+    else
+      let pb_len = a:pb_len
+    endif
+    let self.progress_ticks = map(range(pb_len+1), "v:val * self.max_value / pb_len")
+  endfun
+
+  "Function: progressbar.paint()
+  func! s:progressbar.paint()
+    " Recalculate widths.
+    let max_len = winwidth(self.winnr)
+    let pb_len = 0
+    " always true on first call because of initial value of self.max_len
+    if max_len != self.max_len
+      let self.max_len = max_len
+
+      " Progressbar length
+      let pb_len = max_len - self.subtractedlen
+
+      call self.calculate_ticks(pb_len)
+
+      let self.needs_redraw = 1
+      let cur_value = 0
+      let self.pb_len = pb_len
+    else
+      " start searching at the last found index to make the search for the
+      " appropriate tick value normally take 0 or 1 comparisons
+      let cur_value = self.last_value
+      let pb_len = self.pb_len
+    endif
+
+    let cur_val_max = pb_len > 0 ? pb_len : 100
+
+    " find the current progress bar position based on precalculated thresholds
+    while cur_value < cur_val_max && self.cur_value > self.progress_ticks[cur_value]
+      let cur_value += 1
+    endwhile
+
+    " update progress bar
+    if self.last_value != cur_value || self.needs_redraw || self.cur_value == self.max_value
+      let self.needs_redraw = 1
+      let self.last_value = cur_value
+
+      let t_color  = self.items.title.color
+      let b_fcolor = self.items.bar.fillcolor
+      let b_color  = self.items.bar.color
+      let c_color  = self.items.counter.color
+
+      let stl =  "%#".t_color."#%-( ".self.title." %)".
+	    \"%#".b_color."#".
+	    \(pb_len>0 ?
+	    \	('|%#'.b_fcolor."#%-(".repeat(" ",cur_value)."%)".
+	    \	 '%#'.b_color."#".repeat(" ",pb_len-cur_value)."|"):
+	    \	('')).
+	    \"%=%#".c_color."#%( ".printf("%3.d ",100*self.cur_value/self.max_value)."%% %)"
+      call setwinvar(self.winnr, '&stl', stl)
+    endif
+  endfun
+
+  func! s:progressbar.incr( ... )
+    let self.cur_value += (a:0 ? a:1 : 1)
+    " if we were making a general-purpose progress bar, we'd need to limit to a
+    " lower limit as well, but since we always increment with a positive value
+    " in this script, we only need limit the upper value
+    let self.cur_value = (self.cur_value > self.max_value ? self.max_value : self.cur_value)
+    call self.paint()
+  endfun
+  " }}}
+  if s:settings.dynamic_folds
+    " to process folds we make two passes through each line
+    let s:pgb = s:ProgressBar("Processing folds:", line('$')*2, s:orgwin)
+  endif
+endif
+
+" 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 s:settings.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
+  setlocal 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
+      " 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
+      if !s:settings.no_progress
+	call s:pgb.incr()
+	if s:pgb.needs_redraw
+	  redrawstatus
+	  let s:pgb.needs_redraw = 0
+	endif
+      endif
+      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
+      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
+      if !s:settings.no_progress
+	call s:pgb.incr()
+	if s:pgb.needs_redraw
+	  redrawstatus
+	  let s:pgb.needs_redraw = 0
+	endif
+      endif
+      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 &l:foldtext = s:foldtext_save
+  unlet s:foldtext_save
+
+  " close all folds again so we can get the fold text as we go
+  silent! %foldclose!
+
+  " Go through and remove folds we don't need to (or cannot) process in the
+  " current conversion range
+  "
+  " If a fold is removed which contains other folds, which are included, we need
+  " to adjust the level of the included folds as used by the conversion logic
+  " (avoiding special cases is good)
+  "
+  " Note any time we remove a fold, either all of the included folds are in it,
+  " or none of them, because we only remove a fold if neither its start nor its
+  " end are within the conversion range.
+  let leveladjust = 0
+  for afold in s:allfolds
+    let removed = 0
+    if exists("g:html_start_line") && exists("g:html_end_line")
+      if afold.firstline < g:html_start_line
+	if afold.lastline <= g:html_end_line && afold.lastline >= g:html_start_line
+	  " if a fold starts before the range to convert but stops within the
+	  " range, we need to include it. Make it start on the first converted
+	  " line.
+	  let afold.firstline = g:html_start_line
+	else
+	  " if the fold lies outside the range or the start and stop enclose
+	  " the entire range, don't bother parsing it
+	  call remove(s:allfolds, index(s:allfolds, afold))
+	  let removed = 1
+	  if afold.lastline > g:html_end_line
+	    let leveladjust += 1
+	  endif
+	endif
+      elseif afold.firstline > g:html_end_line
+	" If the entire fold lies outside the range we need to remove it.
+	call remove(s:allfolds, index(s:allfolds, afold))
+	let removed = 1
+      endif
+    elseif exists("g:html_start_line")
+      if afold.firstline < g:html_start_line
+	" if there is no last line, but there is a first line, the end of the
+	" fold will always lie within the region of interest, so keep it
+	let afold.firstline = g:html_start_line
+      endif
+    elseif exists("g:html_end_line")
+      " if there is no first line we default to the first line in the buffer so
+      " the fold start will always be included if the fold itself is included.
+      " If however the entire fold lies outside the range we need to remove it.
+      if afold.firstline > g:html_end_line
+	call remove(s:allfolds, index(s:allfolds, afold))
+	let removed = 1
+      endif
+    endif
+    if !removed
+      let afold.level -= leveladjust
+      if afold.level+1 > s:foldcolumn
+	let s:foldcolumn = afold.level+1
+      endif
+    endif
+  endfor
+
+  " if we've removed folds containing the conversion range from processing,
+  " getting foldtext as we go won't know to open the removed folds, so the
+  " foldtext would be wrong; open them now.
+  "
+  " Note that only when a start and an end line is specified will a fold
+  " containing the current range ever be removed.
+  while leveladjust > 0
+    exe g:html_start_line."foldopen"
+    let leveladjust -= 1
+  endwhile
+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("g: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("g: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:settings.no_progress
+  let s:pgb = s:ProgressBar("Processing lines:", s:end - s:lnum + 1, s:orgwin)
+endif
+
+if s:settings.number_lines
+  let s:margin = strlen(s:end) + 1
+else
+  let s:margin = 0
+endif
+
+if has('folding') && !s:settings.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
+
+if !s:settings.expand_tabs
+  " If keeping tabs, add them to printable characters so we keep them when
+  " formatting text (strtrans() doesn't replace printable chars)
+  let s:old_isprint = &isprint
+  setlocal isprint+=9
+endif
+
+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 && !s:settings.whole_filler
+	let s:new = s:new . " " . s:filler . " inserted lines "
+	let s:n = 2
+      endif
+
+      if !s:settings.no_pre
+	" HTML line wrapping is off--go ahead and fill to the margin
+	" TODO: what about when CSS wrapping is turned on?
+	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_d(s:new, s:DIFF_D_ID, 0)
+      if s:settings.number_lines
+	" Indent if line numbering is on. Indent gets style of line number
+	" column.
+	let s:new = s:HtmlFormat_n(repeat(' ', s:margin), s:LINENR_ID, 0, 0) . s:new
+      endif
+      if s:settings.dynamic_folds && !s:settings.no_foldcolumn && s:foldcolumn > 0
+	" Indent for foldcolumn if there is one. Assume it's empty, there should
+	" not be a fold for deleted lines in diff mode.
+	let s:new = s:FoldColumn_fill() . s:new
+      endif
+      call add(s:lines, s:new.s:HtmlEndline)
+
+      let s:n = s:n - 1
+    endwhile
+    unlet s:n
+  endif
+  unlet s:filler
+
+  " Start the line with the line number.
+  if s:settings.number_lines
+    let s:numcol = repeat(' ', s:margin - 1 - strlen(s:lnum)) . s:lnum . ' '
+  endif
+
+  let s:new = ""
+
+  if has('folding') && !s:settings.ignore_folding && foldclosed(s:lnum) > -1 && !s:settings.dynamic_folds
+    "
+    " This is the beginning of a folded block (with no dynamic folding)
+    let s:new = foldtextresult(s:lnum)
+    if !s:settings.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
+
+    " put numcol in a separate group for sake of unselectable text
+    let s:new = (s:settings.number_lines ? s:HtmlFormat_n(s:numcol, s:FOLDED_ID, 0, s:lnum): "") . s:HtmlFormat_t(s:new, s:FOLDED_ID, 0)
+
+    " Skip to the end of the fold
+    let s:new_lnum = foldclosedend(s:lnum)
+
+    if !s:settings.no_progress
+      call s:pgb.incr(s:new_lnum - s:lnum)
+    endif
+
+    let s:lnum = s:new_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 s:settings.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 for 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 .= ""
+
+
+	" 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 !s:settings.no_foldcolumn
+	  " add fold column that can open the new fold
+	  if s:allfolds[0].level > 1 && s:firstfold
+	    let s:new = s:new . s:FoldColumn_build('|', s:allfolds[0].level - 1, 0, "",
+		  \ 'toggle-open FoldColumn','javascript:toggleFold("fold'.s:foldstack[0].id.s:settings.id_suffix.'");')
+	  endif
+	  " add the filler spaces separately from the '+' char so that it can be
+	  " shown/hidden separately during a hover unfold
+	  let s:new = s:new . s:FoldColumn_build("+", 1, 0, "",
+		\ 'toggle-open FoldColumn', 'javascript:toggleFold("fold'.s:foldId.s:settings.id_suffix.'");')
+	  " If this is not the last fold we're opening on this line, we need
+	  " to keep the filler spaces hidden if the fold is opened by mouse
+	  " hover. If it is the last fold to open in the line, we shouldn't hide
+	  " them, so don't apply the toggle-filler class.
+	  let s:new = s:new . s:FoldColumn_build(" ", 1, s:foldcolumn - s:allfolds[0].level - 1, "",
+		\ 'toggle-open FoldColumn'. (get(s:allfolds, 1, {'firstline': 0}).firstline == s:lnum ?" toggle-filler" :""),
+		\ 'javascript:toggleFold("fold'.s:foldId.s:settings.id_suffix.'");')
+
+	  " add fold column that can close the new fold
+	  " only add extra blank space if we aren't opening another fold on the
+	  " same line
+	  if get(s:allfolds, 1, {'firstline': 0}).firstline != s:lnum
+	    let s:extra_space = s:foldcolumn - s:allfolds[0].level
+	  else
+	    let s:extra_space = 0
+	  endif
+	  if s:firstfold
+	    " the first fold in a line has '|' characters from folds opened in
+	    " previous lines, before the '-' for this fold
+	    let s:new .= s:FoldColumn_build('|', s:allfolds[0].level - 1, s:extra_space, '-',
+		  \ 'toggle-closed FoldColumn', 'javascript:toggleFold("fold'.s:foldId.s:settings.id_suffix.'");')
+	  else
+	    " any subsequent folds in the line only add a single '-'
+	    let s:new = s:new . s:FoldColumn_build("-", 1, s:extra_space, "",
+		  \ 'toggle-closed FoldColumn', 'javascript:toggleFold("fold'.s:foldId.s:settings.id_suffix.'");')
+	  endif
+	  let s:firstfold = 0
+	endif
+
+	" Add fold text, moving the span ending to the next line so collapsing
+	" of folds works correctly.
+	" Put numcol in a separate group for sake of unselectable text.
+	let s:new = s:new . (s:settings.number_lines ? s:HtmlFormat_n(s:numcol, s:FOLDED_ID, 0, 0) : "") . substitute(s:HtmlFormat_t(foldtextresult(s:lnum), s:FOLDED_ID, 0), '', s:HtmlEndline.'\n\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 !s:settings.no_foldcolumn
+	if empty(s:foldstack)
+	  " add the empty foldcolumn for unfolded lines if there is a fold
+	  " column at all
+	  if s:foldcolumn > 0
+	    let s:new = s:new . s:FoldColumn_fill()
+	  endif
+	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 . s:FoldColumn_build('|', s:foldstack[0].level, s:foldcolumn - s:foldstack[0].level, "",
+		  \ 'FoldColumn', 'javascript:toggleFold("fold'.s:foldstack[0].id.s:settings.id_suffix.'");')
+	  endif
+	endif
+      endif
+    endif
+
+    " Now continue with the unfolded line text
+    if s:settings.number_lines
+      let s:new = s:new . s:HtmlFormat_n(s:numcol, s:LINENR_ID, 0, s:lnum)
+    elseif s:settings.line_ids
+      let s:new = s:new . s:HtmlFormat_n("", s:LINENR_ID, 0, s:lnum)
+    endif
+
+    " Get the diff attribute, if any.
+    let s:diffattr = diff_hlID(s:lnum, 1)
+
+    " initialize conceal info to act like not concealed, just in case
+    let s:concealinfo = [0, '']
+
+    " Loop over each character in the line
+    let s:col = 1
+
+    " most of the time we won't use the diff_id, initialize to zero
+    let s:diff_id = 0
+
+    while s:col <= s:len || (s:col == 1 && s:diffattr)
+      let s:startcol = s:col " The start column for processing text
+      if !s:settings.ignore_conceal && has('conceal')
+	let s:concealinfo = synconcealed(s:lnum, s:col)
+      endif
+      if !s:settings.ignore_conceal && s:concealinfo[0]
+	let s:col = s:col + 1
+	" Speed loop (it's small - that's the trick)
+	" Go along till we find a change in the match sequence number (ending
+	" the specific concealed region) or until there are no more concealed
+	" characters.
+	while s:col <= s:len && s:concealinfo == synconcealed(s:lnum, s:col) | let s:col = s:col + 1 | endwhile
+      elseif s:diffattr
+	let s:diff_id = diff_hlID(s:lnum, s:col)
+	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 hlID
+	while s:col <= s:len && s:id == synID(s:lnum, s:col, 1)
+	      \   && s:diff_id == diff_hlID(s:lnum, s:col) |
+	      \     let s:col = s:col + 1 |
+	      \ endwhile
+	if s:len < &columns && !s:settings.no_pre
+	  " Add spaces at the end of the raw text line to extend the changed
+	  " line to the full width.
+	  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
+
+      if s:settings.ignore_conceal || !s:concealinfo[0]
+	" Expand tabs if needed
+	let s:expandedtab = strpart(s:line, s:startcol - 1, s:col - s:startcol)
+	if s:settings.expand_tabs
+	  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
+	end
+
+	" get the highlight group name to use
+	let s:id = synIDtrans(s:id)
+      else
+	" use Conceal highlighting for concealed text
+	let s:id = s:CONCEAL_ID
+	let s:expandedtab = s:concealinfo[1]
+      endif
+
+      " Output the text with the same synID, with class set to the highlight ID
+      " name, unless it has been concealed completely.
+      if strlen(s:expandedtab) > 0
+	let s:new = s:new . s:HtmlFormat(s:expandedtab,  s:id, s:diff_id, "", 0)
+      endif
+    endwhile
+  endif
+
+  call extend(s:lines, split(s:new.s:HtmlEndline, '\n', 1))
+  if !s:settings.no_progress && s:pgb.needs_redraw
+    redrawstatus
+    let s:pgb.needs_redraw = 0
+  endif
+  let s:lnum = s:lnum + 1
+
+  if !s:settings.no_progress
+    call s:pgb.incr()
+  endif
+endwhile
+
+if s:settings.dynamic_folds
+  " finish off any open folds
+  while !empty(s:foldstack)
+    let s:lines[-1].=""
+    call remove(s:foldstack, 0)
+  endwhile
+
+  " add fold column to the style list if not already there
+  let s:id = s:FOLD_C_ID
+  if !has_key(s:stylelist, s:id)
+    let s:stylelist[s:id] = '.FoldColumn { ' . s:CSS1(s:id) . '}'
+  endif
+endif
+
+if s:settings.no_pre
+  if !s:settings.use_css
+    " Close off the font tag that encapsulates the whole 
+    call extend(s:lines, ["", "", ""])
+  else
+    call extend(s:lines, ["
", "", ""]) + endif +else + call extend(s:lines, ["
", "", ""]) +endif + +exe s:newwin . "wincmd w" +call setline(1, s:lines) +unlet s:lines + +" Mangle modelines so Vim doesn't try to use HTML text as a modeline if editing +" this file in the future; need to do this after generating all the text in case +" the modeline text has different highlight groups which all turn out to be +" stripped from the final output. +%s!\v(%(^|\s+)%([Vv]i%(m%([<=>]?\d+)?)?|ex)):!\1\:!ge + +" The generated HTML is admittedly ugly and takes a LONG time to fold. +" Make sure the user doesn't do syntax folding when loading a generated file, +" using a modeline. +call append(line('$'), "") + +" Now, when we finally know which, we define the colors and styles +if s:settings.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 + HtmlHiLink htmlLeadingSpace None + 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 + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 diff --git a/runtime/syntax/htmlcheetah.vim b/runtime/syntax/htmlcheetah.vim new file mode 100644 index 0000000000..f57df90dea --- /dev/null +++ b/runtime/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/runtime/syntax/htmldjango.vim b/runtime/syntax/htmldjango.vim new file mode 100644 index 0000000000..58afd1b62d --- /dev/null +++ b/runtime/syntax/htmldjango.vim @@ -0,0 +1,34 @@ +" Vim syntax file +" Language: Django HTML template +" Maintainer: Dave Hodder +" Last Change: 2014 Jul 13 + +" 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/runtime/syntax/htmlm4.vim b/runtime/syntax/htmlm4.vim new file mode 100644 index 0000000000..3119d2d1ad --- /dev/null +++ b/runtime/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/runtime/syntax/htmlos.vim b/runtime/syntax/htmlos.vim new file mode 100644 index 0000000000..f31b9f6543 --- /dev/null +++ b/runtime/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/runtime/syntax/ia64.vim b/runtime/syntax/ia64.vim new file mode 100644 index 0000000000..f0d510b945 --- /dev/null +++ b/runtime/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/runtime/syntax/ibasic.vim b/runtime/syntax/ibasic.vim new file mode 100644 index 0000000000..75e59419b6 --- /dev/null +++ b/runtime/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/runtime/syntax/icemenu.vim b/runtime/syntax/icemenu.vim new file mode 100644 index 0000000000..d3a733d579 --- /dev/null +++ b/runtime/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/runtime/syntax/icon.vim b/runtime/syntax/icon.vim new file mode 100644 index 0000000000..1a73c43d8f --- /dev/null +++ b/runtime/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/runtime/syntax/idl.vim b/runtime/syntax/idl.vim new file mode 100644 index 0000000000..c51850b13a --- /dev/null +++ b/runtime/syntax/idl.vim @@ -0,0 +1,326 @@ +" Vim syntax file +" Language: IDL (Interface Description Language) +" Created By: Jody Goldberg +" Maintainer: Michael Geddes +" Last Change: 2012 Jan 11 + + +" 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 + +let s:cpo_save = &cpo +try + set cpo&vim + + 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" +finally + let &cpo = s:cpo_save + unlet s:cpo_save +endtry +" vim: sw=2 et diff --git a/runtime/syntax/idlang.vim b/runtime/syntax/idlang.vim new file mode 100644 index 0000000000..670d080a7d --- /dev/null +++ b/runtime/syntax/idlang.vim @@ -0,0 +1,253 @@ +" Interactive Data Language syntax file (IDL, too [:-)] +" Maintainer: Aleksandar Jelenak +" Last change: 2011 Apr 11 +" 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/runtime/syntax/indent.vim b/runtime/syntax/indent.vim new file mode 100644 index 0000000000..389101a522 --- /dev/null +++ b/runtime/syntax/indent.vim @@ -0,0 +1,152 @@ +" Vim syntax file +" Language: indent(1) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2010-01-23 +" 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\|-il\|--indent-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 + \ -linux --linux-style + +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/runtime/syntax/inform.vim b/runtime/syntax/inform.vim new file mode 100644 index 0000000000..d8ba43dcee --- /dev/null +++ b/runtime/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/runtime/syntax/initex.vim b/runtime/syntax/initex.vim new file mode 100644 index 0000000000..8f3462f5cf --- /dev/null +++ b/runtime/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/runtime/syntax/initng.vim b/runtime/syntax/initng.vim new file mode 100644 index 0000000000..1a912c1d05 --- /dev/null +++ b/runtime/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/runtime/syntax/inittab.vim b/runtime/syntax/inittab.vim new file mode 100644 index 0000000000..b7472f9e0f --- /dev/null +++ b/runtime/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/runtime/syntax/ipfilter.vim b/runtime/syntax/ipfilter.vim new file mode 100644 index 0000000000..db99812852 --- /dev/null +++ b/runtime/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/runtime/syntax/ishd.vim b/runtime/syntax/ishd.vim new file mode 100644 index 0000000000..1c011f1b92 --- /dev/null +++ b/runtime/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/runtime/syntax/iss.vim b/runtime/syntax/iss.vim new file mode 100644 index 0000000000..26d9150b5a --- /dev/null +++ b/runtime/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/runtime/syntax/ist.vim b/runtime/syntax/ist.vim new file mode 100644 index 0000000000..131d833cbc --- /dev/null +++ b/runtime/syntax/ist.vim @@ -0,0 +1,75 @@ +" Vim syntax file +" Language: Makeindex style file, *.ist +" Maintainer: Peter Meszaros +" Last Change: 2012 Jan 08 by Thilo Six + +" 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&vim + +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" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 sw=2 diff --git a/runtime/syntax/j.vim b/runtime/syntax/j.vim new file mode 100644 index 0000000000..bde954506e --- /dev/null +++ b/runtime/syntax/j.vim @@ -0,0 +1,140 @@ +" Vim syntax file +" Language: J +" Maintainer: David Bürgin <676c7473@gmail.com> +" URL: https://github.com/glts/vim-j +" Last Change: 2014-05-25 + +if exists('b:current_syntax') + finish +endif + +let s:save_cpo = &cpo +set cpo&vim + +syntax case match +syntax sync minlines=50 + +syntax cluster jStdlibItems contains=jStdlibNoun,jStdlibAdverb,jStdlibConjunction,jStdlibVerb +syntax cluster jPrimitiveItems contains=jNoun,jAdverb,jConjunction,jVerb,jCopula + +syntax match jControl /\<\%(assert\|break\|case\|catch[dt]\=\|continue\|do\|else\%(if\)\=\|end\|fcase\|for\|if\|return\|select\|throw\|try\|whil\%(e\|st\)\)\./ +syntax match jControl /\<\%(for\|goto\|label\)_\a\k*\./ + +" Standard library names. A few names need to be defined with ":syntax match" +" because they would otherwise take precedence over the corresponding jControl +" and jDefineExpression items. +syntax keyword jStdlibNoun ARGV BINPATH CR CRLF DEL Debug EAV EMPTY FF FHS IF64 IFIOS IFJCDROID IFJHS IFQT IFRASPI IFUNIX IFWIN IFWINCE IFWINE IFWOW64 JB01 JBOXED JCHAR JCMPX JFL JINT JPTR JSIZES JSTR JTYPES JVERSION LF LF2 TAB UNAME UNXLIB andurl dbhelp libjqt +syntax keyword jStdlibAdverb define each every fapplylines inv inverse items leaf rows table +syntax keyword jStdlibConjunction bind cuts def on +syntax keyword jStdlibVerb AND Endian IFDEF Note OR XOR alpha17 alpha27 anddf android_exec_host andunzip apply boxopen boxxopen bx calendar cd cdcb cder cderx cdf charsub chopstring clear coclass cocreate cocurrent codestroy coerase cofind cofindv cofullname coinfo coinsert coname conames conew conl conouns conounsx copath copathnl copathnlx coreset costate cut cutLF cutopen cutpara datatype dbctx dberm dberr dbg dbjmp dblocals dblxq dblxs dbnxt dbq dbr dbret dbrr dbrrx dbrun dbs dbsig dbsq dbss dbst dbstack dbstk dbstop dbstopme dbstopnext dbstops dbtrace dbview deb debc delstring detab dfh dir dircompare dircompares dirfind dirpath dirss dirssrplc dirtree dirused dlb dltb dltbs dquote drop dropafter dropto dtb dtbs echo empty endian erase evtloop exit expand f2utf8 fappend fappends fboxname fc fcopynew fdir ferase fetch fexist fexists fgets file2url fixdotdot fliprgb fmakex foldpara foldtext fpathcreate fpathname fputs fread freadblock freadr freads frename freplace fsize fss fssrplc fstamp fstringreplace ftype fview fwrite fwritenew fwrites getargs getdate getenv getqtbin hfd hostpathsep ic install iospath isatty isotimestamp isutf8 jcwdpath joinstring jpathsep jsystemdefs list ljust load loadd mema memf memr memw nameclass namelist names nc nl pick quote require rjust rplc script scriptd setbreak show sign sminfo smoutput sort split splitnostring splitstring ss startupandroid startupconsole startupide stderr stdin stdout stringreplace symdat symget symset take takeafter taketo timespacex timestamp timex tmoutput toCRLF toHOST toJ todate todayno tolower topara toupper tsdiff tsrep tstamp type ucp ucpcount unxlib usleep utf8 uucp valdate wcsize weekday weeknumber weeksinyear winpathsep +syntax match jStdlibNoun /\<\%(adverb\|conjunction\|dyad\|monad\|noun\|verb\)\>/ +syntax match jStdlibVerb /\<\%(assert\|break\|do\)\>\.\@!/ + +" Numbers. Matching J numbers is difficult. The regular expression used for +" the general case roughly embodies this grammar sketch: +" +" BASE := /_?\d+(\.\d*)?([eE]_?\d+)?/ +" RATIONAL := BASE | BASE r BASE +" COMPLEX := BASE | BASE (j|a[dr]) BASE +" JNUMBER := RATIONAL | RATIONAL [px] RATIONAL | COMPLEX | COMPLEX [px] COMPLEX +" +" The grammar is implemented as shown in this pseudo-regexp: +" +" base rational complex remainder +" /\< B ( [r]B ([px]B([r]B)?)? | (j|a[dr])B ([px]B((j|a[dr])B)?)? | [px]B ((j|a[dr]|r)B)? )?/ +" +" All in all, a compromise between correctness and practicality had to be +" made. See http://www.jsoftware.com/help/dictionary/dcons.htm for reference. +syntax match jNumber /\<_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(\%(r_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%([px]_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(r_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\)\=\)\=\)\|\%(\%(j\|a[dr]\)_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%([px]_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(\%(j\|a[dr]\)_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\)\=\)\=\)\|\%([px]_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(\%(j\|a[dr]\|r\)_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\)\=\)\)\=/ +syntax match jNumber /\<_\=\d\+\%([eE]\d\+\)\=b_\=[0-9a-z]\+\%(\.[0-9a-z]\+\)\=/ +syntax match jNumber /\<__\=\>/ +syntax match jNumber /\<_\./ +syntax match jNumber /\<_\=\d\+x\>/ + +syntax region jString oneline start=/'/ skip=/''/ end=/'/ + +syntax keyword jArgument contained x y u v m n + +" Primitives. Order is significant both within the patterns and among +" ":syntax match" statements. Refer to "Parts of speech" in the J dictionary. +syntax match jNoun /\+*\-%$|,#][.:]\=\|[~}"][.:]\|{\%[::]\|\<\%([ACeEiIjLor]\.\|p\.\.\=\|[ipqsux]:\|0:\|_\=[1-9]:\)/ +syntax match jCopula /=[.:]/ +syntax match jConjunction /;\.\|\^:\|![.:]/ + +" Explicit noun definition. The difficulty is that the define expression can +" occur in the middle of a line but the jNounDefine region must only start on +" the next line. The trick is to split the problem into two regions and link +" them with "nextgroup=". The fold wrapper provides syntax folding. +syntax region jNounDefineFold + \ matchgroup=NONE start=/\<\%(\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\>\)\@=/ + \ keepend matchgroup=NONE end=/^\s*)\s*$/ + \ contains=jNounDefineStart + \ fold +syntax region jNounDefineStart + \ matchgroup=jDefineExpression start=/\<\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\>/ + \ keepend matchgroup=NONE end=/$/ + \ contains=@jStdlibItems,@jPrimitiveItems,jNumber,jString,jParenGroup,jParen,jComment + \ contained oneline skipempty nextgroup=jDefineEnd,jNounDefine +" These two items must have "contained", which allows them to match only after +" jNounDefineStart thanks to the "nextgroup=" above. +syntax region jNounDefine + \ matchgroup=NONE start=/^/ + \ matchgroup=jDefineEnd end=/^\s*)\s*$/ + \ contained +" This match is necessary in case of an empty noun definition +syntax match jDefineEnd contained /^\s*)\s*$/ + +" Explicit verb, adverb, and conjunction definition +syntax region jDefine + \ matchgroup=jDefineExpression start=/\<\%([1-4]\|13\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>/ + \ matchgroup=jDefineEnd end=/^\s*)\s*$/ + \ contains=jControl,@jStdlibItems,@jPrimitiveItems,jNumber,jString,jArgument,jParenGroup,jParen,jComment,jDefineMonadDyad + \ fold +syntax match jDefineMonadDyad contained /^\s*:\s*$/ + +" Paired parentheses. When a jDefineExpression such as "3 : 0" is +" parenthesised it will erroneously extend jParenGroup to span over the whole +" definition body. This situation receives a special treatment here. +syntax match jParen /(\%(\s*\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\s*)\)\@=/ +syntax match jParen contained /\%((\s*\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\s*\)\@<=)/ +syntax region jParenGroup + \ matchgroup=jParen start=/(\%(\s*\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>\)\@!/ + \ matchgroup=jParen end=/)/ + \ oneline transparent + +syntax keyword jTodo contained TODO FIXME XXX +syntax match jComment /NB\..*$/ contains=jTodo,@Spell + +syntax match jSharpBang /\%^#!.*$/ + +highlight default link jControl Statement +highlight default link jStdlibNoun Identifier +highlight default link jStdlibAdverb Function +highlight default link jStdlibConjunction Function +highlight default link jStdlibVerb Function +highlight default link jString String +highlight default link jNumber Number +highlight default link jNoun Constant +highlight default link jAdverb Normal +highlight default link jConjunction Normal +highlight default link jVerb Normal +highlight default link jCopula Normal +highlight default link jArgument Identifier +highlight default link jParen Delimiter + +highlight default link jDefineExpression Define +highlight default link jDefineMonadDyad Delimiter +highlight default link jDefineEnd Delimiter +highlight default link jNounDefine Normal + +highlight default link jTodo Todo +highlight default link jComment Comment +highlight default link jSharpBang PreProc + +let b:current_syntax = 'j' + +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/runtime/syntax/jal.vim b/runtime/syntax/jal.vim new file mode 100644 index 0000000000..d0ba672851 --- /dev/null +++ b/runtime/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/runtime/syntax/jam.vim b/runtime/syntax/jam.vim new file mode 100644 index 0000000000..cbd99bb9ce --- /dev/null +++ b/runtime/syntax/jam.vim @@ -0,0 +1,257 @@ +" Vim syntax file +" Language: JAM +" Maintainer: Ralf Lemke (ralflemk@t-online.de) +" Last change: 2012 Jan 08 by Thilo Six + +" 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&vim + +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" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 diff --git a/runtime/syntax/jargon.vim b/runtime/syntax/jargon.vim new file mode 100644 index 0000000000..25a88bc981 --- /dev/null +++ b/runtime/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/runtime/syntax/java.vim b/runtime/syntax/java.vim new file mode 100644 index 0000000000..e5491b2612 --- /dev/null +++ b/runtime/syntax/java.vim @@ -0,0 +1,352 @@ +" Vim syntax file +" Language: Java +" Maintainer: Claudio Fleiner +" URL: http://www.fleiner.com/vim/syntax/java.vim +" Last Change: 2012 Oct 05 + +" 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 + +let s:cpo_save = &cpo +set cpo&vim + +" 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 + +" highlighting C++ keywords as errors removed, too many people find it +" annoying. Was: if !exists("java_allow_cpp_keywords") + +" 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="{@\(code\|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" +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 diff --git a/runtime/syntax/javacc.vim b/runtime/syntax/javacc.vim new file mode 100644 index 0000000000..5458de754e --- /dev/null +++ b/runtime/syntax/javacc.vim @@ -0,0 +1,82 @@ +" 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: 2012 Oct 05 + +" 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 + +let s:cpo_save = &cpo +set cpo&vim + +" 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 JDK_VERSION +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" +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 diff --git a/runtime/syntax/javascript.vim b/runtime/syntax/javascript.vim new file mode 100644 index 0000000000..1b20f987d9 --- /dev/null +++ b/runtime/syntax/javascript.vim @@ -0,0 +1,143 @@ +" 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: 2012 Oct 05 +" 2013 Jun 12: adjusted javaScriptRegexpString (Kevin Locke) + +" 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' +elseif exists("b:current_syntax") && b:current_syntax == "javascript" + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" Drop fold if it set but vim doesn't support it. +if version < 600 && exists("javaScript_fold") + unlet javaScript_fold +endif + + +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=+/[gim]\{0,2\}\s*$+ end=+/[gim]\{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 let +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 +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 diff --git a/runtime/syntax/jess.vim b/runtime/syntax/jess.vim new file mode 100644 index 0000000000..243bab351e --- /dev/null +++ b/runtime/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/runtime/syntax/jgraph.vim b/runtime/syntax/jgraph.vim new file mode 100644 index 0000000000..7ecd5afaec --- /dev/null +++ b/runtime/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/runtime/syntax/jovial.vim b/runtime/syntax/jovial.vim new file mode 100644 index 0000000000..7c63841729 --- /dev/null +++ b/runtime/syntax/jovial.vim @@ -0,0 +1,110 @@ +" Vim syntax file +" Language: JOVIAL J73 +" Version: 1.2 +" Maintainer: Paul McGinnis +" Last Change: 2011/06/17 +" Remark: Based on MIL-STD-1589C for JOVIAL J73 language + +" Quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case ignore + +syn keyword jovialTodo TODO FIXME XXX contained + +" JOVIAL beads - first digit is number of bits, [0-9A-V] is the bit value +" representing 0-31 (for 5 bits on the bead) +syn match jovialBitConstant "[1-5]B'[0-9A-V]'" + +syn match jovialNumber "\<\d\+\>" + +syn match jovialFloat "\d\+E[-+]\=\d\+" +syn match jovialFloat "\d\+\.\d*\(E[-+]\=\d\+\)\=" +syn match jovialFloat "\.\d\+\(E[-+]\=\d\+\)\=" + +syn region jovialComment start=/"/ end=/"/ contains=jovialTodo +syn region jovialComment start=/%/ end=/%/ contains=jovialTodo + +" JOVIAL variable names. This rule is to prevent conflicts with strings. +" Handle special case where ' character can be part of a JOVIAL variable name. +syn match jovialIdentifier "[A-Z\$][A-Z0-9'\$]\+" + +syn region jovialString start="\s*'" skip=/''/ end=/'/ oneline + +" JOVIAL compiler directives -- see Section 9 in MIL-STD-1589C +syn region jovialPreProc start="\s*![A-Z]\+" end=/;/ + +syn keyword jovialOperator AND OR NOT XOR EQV MOD + +" See Section 2.1 in MIL-STD-1589C for data types +syn keyword jovialType ITEM B C P V +syn match jovialType "\" +syn match jovialType "\" +syn match jovialType "\" +syn match jovialType "\" + +syn keyword jovialStorageClass STATIC CONSTANT PARALLEL BLOCK N M D W + +syn keyword jovialStructure TABLE STATUS + +syn keyword jovialConstant NULL + +syn keyword jovialBoolean FALSE TRUE + +syn keyword jovialTypedef TYPE + +syn keyword jovialStatement ABORT BEGIN BY BYREF BYRES BYVAL CASE COMPOOL +syn keyword jovialStatement DEF DEFAULT DEFINE ELSE END EXIT FALLTHRU FOR +syn keyword jovialStatement GOTO IF INLINE INSTANCE LABEL LIKE OVERLAY POS +syn keyword jovialStatement PROC PROGRAM REC REF RENT REP RETURN START STOP +syn keyword jovialStatement TERM THEN WHILE + +" JOVIAL extensions, see section 8.2.2 in MIL-STD-1589C +syn keyword jovialStatement CONDITION ENCAPSULATION EXPORTS FREE HANDLER IN INTERRUPT NEW +syn keyword jovialStatement PROTECTED READONLY REGISTER SIGNAL TO UPDATE WITH WRITEONLY ZONE + +" implementation specific constants and functions, see section 1.4 in MIL-STD-1589C +syn keyword jovialConstant BITSINBYTE BITSINWORD LOCSINWORD +syn keyword jovialConstant BYTESINWORD BITSINPOINTER INTPRECISION +syn keyword jovialConstant FLOATPRECISION FIXEDPRECISION FLOATRADIX +syn keyword jovialConstant MAXFLOATPRECISION MAXFIXEDPRECISION +syn keyword jovialConstant MAXINTSIZE MAXBYTES MAXBITS +syn keyword jovialConstant MAXTABLESIZE MAXSTOP MINSTOP MAXSIGDIGITS +syn keyword jovialFunction BYTEPOS MAXINT MININT +syn keyword jovialFunction IMPLFLOATPRECISION IMPLFIXEDPRECISION IMPLINTSIZE +syn keyword jovialFunction MINSIZE MINFRACTION MINSCALE MINRELPRECISION +syn keyword jovialFunction MAXFLOAT MINFLOAT FLOATRELPRECISION +syn keyword jovialFunction FLOATUNDERFLOW MAXFIXED MINFIXED + +" JOVIAL built-in functions +syn keyword jovialFunction LOC NEXT BIT BYTE SHIFTL SHIFTR ABS SGN BITSIZE +syn keyword jovialFunction BYTESIZE WORDSIZE LBOUND UBOUND NWDSEN FIRST +syn keyword jovialFunction LAST NENT + +" Define the default highlighting. +hi def link jovialBitConstant Number +hi def link jovialBoolean Boolean +hi def link jovialComment Comment +hi def link jovialConstant Constant +hi def link jovialFloat Float +hi def link jovialFunction Function +" No color highlighting for JOVIAL identifiers. See above, +" this is to prevent confusion with JOVIAL strings +"hi def link jovialIdentifier Identifier +hi def link jovialNumber Number +hi def link jovialOperator Operator +hi def link jovialPreProc PreProc +hi def link jovialStatement Statement +hi def link jovialStorageClass StorageClass +hi def link jovialString String +hi def link jovialStructure Structure +hi def link jovialTodo Todo +hi def link jovialType Type +hi def link jovialTypedef Typedef + + +let b:current_syntax = "jovial" + +" vim: ts=8 diff --git a/runtime/syntax/jproperties.vim b/runtime/syntax/jproperties.vim new file mode 100644 index 0000000000..9343bd292b --- /dev/null +++ b/runtime/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/runtime/syntax/json.vim b/runtime/syntax/json.vim new file mode 100644 index 0000000000..f2d880b1d0 --- /dev/null +++ b/runtime/syntax/json.vim @@ -0,0 +1,16 @@ +" Vim syntax file +" Language: JSON +" Maintainer: David Barnett +" Last Change: 2014 Jul 16 + +" For version 5.x: Clear all syntax items. +" For version 6.x and later: Quit when a syntax file was already loaded. +if exists('b:current_syntax') + finish +endif + +" Use JavaScript syntax. JSON is a subset of JavaScript. +runtime! syntax/javascript.vim +unlet b:current_syntax + +let b:current_syntax = 'json' diff --git a/runtime/syntax/jsp.vim b/runtime/syntax/jsp.vim new file mode 100644 index 0000000000..9766657596 --- /dev/null +++ b/runtime/syntax/jsp.vim @@ -0,0 +1,85 @@ +" 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 syntax/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 clear htmlTag +syn region htmlTag start=+<[^/%]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster,jspExpr,javaScript + +" 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/runtime/syntax/kconfig.vim b/runtime/syntax/kconfig.vim new file mode 100644 index 0000000000..a6ceb1712a --- /dev/null +++ b/runtime/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/runtime/syntax/kivy.vim b/runtime/syntax/kivy.vim new file mode 100644 index 0000000000..b145503478 --- /dev/null +++ b/runtime/syntax/kivy.vim @@ -0,0 +1,36 @@ +" Vim syntax file +" Language: Kivy +" Maintainer: Corey Prophitt +" Last Change: May 29th, 2014 +" Version: 1 +" URL: http://kivy.org/ + +if exists("b:current_syntax") + finish +endif + +" Load Python syntax first (Python can be used within Kivy) +syn include @pyth $VIMRUNTIME/syntax/python.vim + +" Kivy language rules can be found here +" http://kivy.org/docs/guide/lang.html + +" Define Kivy syntax +syn match kivyPreProc /#:.*/ +syn match kivyComment /#.*/ +syn match kivyRule /<\I\i*\(,\s*\I\i*\)*>:/ +syn match kivyAttribute /\<\I\i*\>/ nextgroup=kivyValue + +syn region kivyValue start=":" end=/$/ contains=@pyth skipwhite + +syn region kivyAttribute matchgroup=kivyIdent start=/[\a_][\a\d_]*:/ end=/$/ contains=@pyth skipwhite + +hi def link kivyPreproc PreProc +hi def link kivyComment Comment +hi def link kivyRule Function +hi def link kivyIdent Statement +hi def link kivyAttribute Label + +let b:current_syntax = "kivy" + +" vim: ts=8 diff --git a/runtime/syntax/kix.vim b/runtime/syntax/kix.vim new file mode 100644 index 0000000000..62dc3253e8 --- /dev/null +++ b/runtime/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/runtime/syntax/kscript.vim b/runtime/syntax/kscript.vim new file mode 100644 index 0000000000..cefbe39a29 --- /dev/null +++ b/runtime/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/runtime/syntax/kwt.vim b/runtime/syntax/kwt.vim new file mode 100644 index 0000000000..4c2c9d9dc0 --- /dev/null +++ b/runtime/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/runtime/syntax/lace.vim b/runtime/syntax/lace.vim new file mode 100644 index 0000000000..9e64eea7d1 --- /dev/null +++ b/runtime/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/runtime/syntax/latte.vim b/runtime/syntax/latte.vim new file mode 100644 index 0000000000..e2a8729f3f --- /dev/null +++ b/runtime/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/runtime/syntax/ld.vim b/runtime/syntax/ld.vim new file mode 100644 index 0000000000..fc12919c50 --- /dev/null +++ b/runtime/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/runtime/syntax/ldapconf.vim b/runtime/syntax/ldapconf.vim new file mode 100644 index 0000000000..70ddaab57a --- /dev/null +++ b/runtime/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/runtime/syntax/ldif.vim b/runtime/syntax/ldif.vim new file mode 100644 index 0000000000..9f67b57f51 --- /dev/null +++ b/runtime/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/runtime/syntax/lex.vim b/runtime/syntax/lex.vim new file mode 100644 index 0000000000..b7aff34d6b --- /dev/null +++ b/runtime/syntax/lex.vim @@ -0,0 +1,144 @@ +" Vim syntax file +" Language: Lex +" Maintainer: Charles E. Campbell +" Last Change: Nov 14, 2012 +" Version: 14 +" 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 +let s:Cpath= fnameescape(expand(":p:h").(exists("g:lex_uses_cpp")? "/cpp.vim" : "/c.vim")) +if !filereadable(s:Cpath) + for s:Cpath in split(globpath(&rtp,(exists("g:lex_uses_cpp")? "syntax/cpp.vim" : "syntax/c.vim")),"\n") + if filereadable(fnameescape(s:Cpath)) + let s:Cpath= fnameescape(s:Cpath) + break + endif + endfor +endif +exe "syn include @lexCcode ".s:Cpath + +" --- ========= --- +" --- Lex stuff --- +" --- ========= --- + +" Options Section +syn match lexOptions '^%\s*option\>.*$' contains=lexPatString + +" 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=@lexCcode + syn region lexAbbrvComment fold start="^\s\+/\*" end="\*/" contains=@Spell + syn region lexAbbrvComment fold start="\%^/\*" end="\*/" contains=@Spell + syn region lexStartState fold matchgroup=lexAbbrv start="^%\a\+" end="$" contained +else + syn region lexInclude matchgroup=lexSep start="^%{" end="%}" contained contains=@lexCcode + syn region lexAbbrvComment start="^\s\+/\*" end="\*/" contains=@Spell + syn region lexAbbrvComment start="\%^/\*" 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="^%\ze%$" skipnl skipwhite nextgroup=lexFinalCodeBlock contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat,lexPatInclude + syn region lexPat fold start=+\S+ skip="\\\\\|\\." end="\s"me=e-1 skipwhite contained nextgroup=lexMorePat,lexPatSep,lexPattern contains=lexPatTag,lexPatString,lexSlashQuote,lexBrace + syn region lexPatInclude fold matchgroup=lexSep start="^%{" end="%}" contained contains=lexPatCode + 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 nextgroup=lexFinalCodeBlock contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat,lexPatInclude + syn region lexPat start=+\S+ skip="\\\\\|\\." end="\s"me=e-1 skipwhite contained nextgroup=lexMorePat,lexPatSep,lexPattern contains=lexPatTag,lexPatString,lexSlashQuote,lexBrace + syn region lexPatInclude matchgroup=lexSep start="^%{" end="%}" contained contains=lexPatCode + 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 + +" Lex Patterns +syn region lexPattern start='[^ \t{}]' end="$" contained contains=lexPatRange +syn region lexPatRange matchgroup=Delimiter start='\[' skip='\\\\\|\\.' end='\]' contains=lexEscape +syn match lexEscape '\%(\\\\\)*\\.' contained + +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=@lexCcode +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=@lexCcode,lexCFunctions +else + syn region lexPatCode matchgroup=Delimiter start="{" end="}" skipnl contained contains=@lexCcode,lexCFunctions +endif + +" Lex "functions" which may appear in C/C++ code blocks +syn keyword lexCFunctions BEGIN input unput woutput yyleng yylook yytext +syn keyword lexCFunctions ECHO output winput wunput yyless yymore yywrap + +" %% +" lexAbbrevBlock +" %% +" lexPatBlock +" %% +" lexFinalCodeBlock +syn region lexFinalCodeBlock matchgroup=Todo start="%$"me=e-1 end="\%$" contained contains=@lexCcode + +" 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=500 +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 lexAbbrvRegExp Macro +hi def link lexAbbrv SpecialChar +hi def link lexBrace lexPat +hi def link lexCFunctions Function +hi def link lexCstruct cStructure +hi def link lexMorePat SpecialChar +hi def link lexOptions PreProc +hi def link lexPatComment Comment +hi def link lexPat Function +hi def link lexPatString Function +hi def link lexPatTag Special +hi def link lexPatTagZone lexPatTag +hi def link lexSep Delimiter +hi def link lexSlashQuote lexPat +hi def link lexStartState Statement + +let b:current_syntax = "lex" + +" vim:ts=10 diff --git a/runtime/syntax/lftp.vim b/runtime/syntax/lftp.vim new file mode 100644 index 0000000000..6a8e4f9e19 --- /dev/null +++ b/runtime/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/runtime/syntax/lhaskell.vim b/runtime/syntax/lhaskell.vim new file mode 100644 index 0000000000..077549a0c8 --- /dev/null +++ b/runtime/syntax/lhaskell.vim @@ -0,0 +1,145 @@ +" 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: 2010 Apr 11 +" 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,beginCodeBegin containedin=@lhsTeXContainer + +syntax match lhsBirdTrack "^>" contained + +syntax match beginCodeBegin "^\\begin" nextgroup=beginCodeCode contained +syntax region beginCodeCode matchgroup=texDelimiter 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_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/runtime/syntax/libao.vim b/runtime/syntax/libao.vim new file mode 100644 index 0000000000..25b6e8284e --- /dev/null +++ b/runtime/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/runtime/syntax/lifelines.vim b/runtime/syntax/lifelines.vim new file mode 100644 index 0000000000..f8bea015bd --- /dev/null +++ b/runtime/syntax/lifelines.vim @@ -0,0 +1,167 @@ +" Vim syntax file +" Language: LifeLines (v 3.0.62) +" Maintainer: Patrick Texier +" Location: +" Last Change: 2010 May 7 + +" option to highlight error obsolete statements +" add the following line to your .vimrc file : +" let lifelines_deprecated = 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.62 + +syn keyword lifelinesDecl char_encoding require option include +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 baptism +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 lifelinesGedcom gengedcomstrong +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 +" New dates functions (since 3.0.51) +syn keyword lifelinesFunct jd2date date2jd dayofweek setdate + +" options to highlight as error obsolete statements +" please read ll-reportmanual. + +if exists("lifelines_deprecated") + syn keyword lifelinesError getintmsg getindimsg getstrmsg + syn keyword lifelinesError gengedcom gengedcomweak deletenode + syn keyword lifelinesError save strsave + syn keyword lifelinesError lengthset + if version >= 700 + let g:omni_syntax_group_exclude_lifelines = 'lifelinesError' + endif +else + syn keyword lifelinesUser getintmsg getindimsg getstrmsg + syn keyword lifelinesGedcom gengedcom gengedcomweak deletenode + syn keyword lifelinesFunct save strsave + syn keyword lifelinesIndi lengthset +endif + +syn region lifelinesString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=lifelinesSpecial + +syn match lifelinesSpecial "\\\(\\\|\(n\|t\)\)" contained + +syn keyword lifelinesTodo contained TODO FIXME XXX +syn region lifelinesComment start="/\*" end="\*/" contains=lifelinesTodo + +" integers +syn match lifelinesNumber "-\=\<\d\+\>" +"floats, with dot +syn match lifelinesNumber "-\=\<\d\+\.\d*\>" +"floats, starting with a dot +syn match lifelinesNumber "-\=\.\d\+\>" + +" folding using {} +if version >= 600 + syn region lifelinesFoldBlock start="{" end="}" transparent fold +endif + +"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 + HiLink lifelinesTodo Todo + HiLink lifelinesDecl PreProc + + delcommand HiLink +endif + +let b:current_syntax = "lifelines" + +" vim: ts=8 sw=4 diff --git a/runtime/syntax/lilo.vim b/runtime/syntax/lilo.vim new file mode 100644 index 0000000000..3e9459267b --- /dev/null +++ b/runtime/syntax/lilo.vim @@ -0,0 +1,192 @@ +" Vim syntax file +" Language: lilo configuration (lilo.conf) +" Maintainer: Niels Horn +" Previous Maintainer: David Necas (Yeti) +" Last Change: 2010-02-03 + +" 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/runtime/syntax/limits.vim b/runtime/syntax/limits.vim new file mode 100644 index 0000000000..a6d245ae11 --- /dev/null +++ b/runtime/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/runtime/syntax/liquid.vim b/runtime/syntax/liquid.vim new file mode 100644 index 0000000000..295a91775e --- /dev/null +++ b/runtime/syntax/liquid.vim @@ -0,0 +1,138 @@ +" Vim syntax file +" Language: Liquid +" Maintainer: Tim Pope +" Filenames: *.liquid +" Last Change: 2013 May 30 + +if exists('b:current_syntax') + finish +endif + +if !exists('main_syntax') + let main_syntax = 'liquid' +endif + +if !exists('g:liquid_default_subtype') + let g:liquid_default_subtype = 'html' +endif + +if !exists('b:liquid_subtype') && main_syntax == 'liquid' + let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") + let b:liquid_subtype = matchstr(s:lines,'liquid_subtype=\zs\w\+') + if b:liquid_subtype == '' + let b:liquid_subtype = matchstr(&filetype,'^liquid\.\zs\w\+') + endif + if b:liquid_subtype == '' + let b:liquid_subtype = matchstr(substitute(expand('%:t'),'\c\%(\.liquid\)\+$','',''),'\.\zs\w\+$') + endif + if b:liquid_subtype == '' + let b:liquid_subtype = g:liquid_default_subtype + endif +endif + +if exists('b:liquid_subtype') && b:liquid_subtype != '' + exe 'runtime! syntax/'.b:liquid_subtype.'.vim' + unlet! b:current_syntax +endif + +syn case match + +if exists('b:liquid_subtype') && b:liquid_subtype != 'yaml' + " YAML Front Matter + syn include @liquidYamlTop syntax/yaml.vim + unlet! b:current_syntax + syn region liquidYamlHead start="\%^---$" end="^---\s*$" keepend contains=@liquidYamlTop,@Spell +endif + +if !exists('g:liquid_highlight_types') + let g:liquid_highlight_types = [] +endif + +if !exists('s:subtype') + let s:subtype = exists('b:liquid_subtype') ? b:liquid_subtype : '' + + for s:type in map(copy(g:liquid_highlight_types),'matchstr(v:val,"[^=]*$")') + if s:type =~ '\.' + let b:{matchstr(s:type,'[^.]*')}_subtype = matchstr(s:type,'\.\zs.*') + endif + exe 'syn include @liquidHighlight'.substitute(s:type,'\.','','g').' syntax/'.matchstr(s:type,'[^.]*').'.vim' + unlet! b:current_syntax + endfor + unlet! s:type + + if s:subtype == '' + unlet! b:liquid_subtype + else + let b:liquid_subtype = s:subtype + endif + unlet s:subtype +endif + +syn region liquidStatement matchgroup=liquidDelimiter start="{%" end="%}" contains=@liquidStatement containedin=ALLBUT,@liquidExempt keepend +syn region liquidExpression matchgroup=liquidDelimiter start="{{" end="}}" contains=@liquidExpression containedin=ALLBUT,@liquidExempt keepend +syn region liquidComment matchgroup=liquidDelimiter start="{%\s*comment\s*%}" end="{%\s*endcomment\s*%}" contains=liquidTodo,@Spell containedin=ALLBUT,@liquidExempt keepend +syn region liquidRaw matchgroup=liquidDelimiter start="{%\s*raw\s*%}" end="{%\s*endraw\s*%}" contains=TOP,@liquidExempt containedin=ALLBUT,@liquidExempt keepend + +syn cluster liquidExempt contains=liquidStatement,liquidExpression,liquidComment,liquidRaw,@liquidStatement,liquidYamlHead +syn cluster liquidStatement contains=liquidConditional,liquidRepeat,liquidKeyword,@liquidExpression +syn cluster liquidExpression contains=liquidOperator,liquidString,liquidNumber,liquidFloat,liquidBoolean,liquidNull,liquidEmpty,liquidPipe,liquidForloop + +syn keyword liquidKeyword highlight nextgroup=liquidTypeHighlight skipwhite contained +syn keyword liquidKeyword endhighlight contained +syn region liquidHighlight start="{%\s*highlight\s\+\w\+\s*%}" end="{% endhighlight %}" keepend + +for s:type in g:liquid_highlight_types + exe 'syn match liquidTypeHighlight "\<'.matchstr(s:type,'[^=]*').'\>" contained' + exe 'syn region liquidHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' start="{%\s*highlight\s\+'.matchstr(s:type,'[^=]*').'\s*%}" end="{% endhighlight %}" keepend contains=@liquidHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g') +endfor +unlet! s:type + +syn region liquidString matchgroup=liquidQuote start=+"+ end=+"+ contained +syn region liquidString matchgroup=liquidQuote start=+'+ end=+'+ contained +syn match liquidNumber "-\=\<\d\+\>" contained +syn match liquidFloat "-\=\<\d\+\>\.\.\@!\%(\d\+\>\)\=" contained +syn keyword liquidBoolean true false contained +syn keyword liquidNull null nil contained +syn match liquidEmpty "\" contained + +syn keyword liquidOperator and or not contained +syn match liquidPipe '|' contained skipwhite nextgroup=liquidFilter + +syn keyword liquidFilter date capitalize downcase upcase first last join sort size strip_html strip_newlines newline_to_br replace replace_first remove remove_first truncate truncatewords prepend append minus plus times divided_by contained + +syn keyword liquidConditional if elsif else endif unless endunless case when endcase ifchanged endifchanged contained +syn keyword liquidRepeat for endfor tablerow endtablerow in contained +syn match liquidRepeat "\%({%\s*\)\@<=empty\>" contained +syn keyword liquidKeyword assign cycle include with contained + +syn keyword liquidForloop forloop nextgroup=liquidForloopDot contained +syn match liquidForloopDot "\." nextgroup=liquidForloopAttribute contained +syn keyword liquidForloopAttribute length index index0 rindex rindex0 first last contained + +syn keyword liquidTablerowloop tablerowloop nextgroup=liquidTablerowloopDot contained +syn match liquidTablerowloopDot "\." nextgroup=liquidTableForloopAttribute contained +syn keyword liquidTablerowloopAttribute length index index0 col col0 index0 rindex rindex0 first last col_first col_last contained + +hi def link liquidDelimiter PreProc +hi def link liquidComment Comment +hi def link liquidTypeHighlight Type +hi def link liquidConditional Conditional +hi def link liquidRepeat Repeat +hi def link liquidKeyword Keyword +hi def link liquidOperator Operator +hi def link liquidString String +hi def link liquidQuote Delimiter +hi def link liquidNumber Number +hi def link liquidFloat Float +hi def link liquidEmpty liquidNull +hi def link liquidNull liquidBoolean +hi def link liquidBoolean Boolean +hi def link liquidFilter Function +hi def link liquidForloop Identifier +hi def link liquidForloopAttribute Identifier + +let b:current_syntax = 'liquid' + +if exists('main_syntax') && main_syntax == 'liquid' + unlet main_syntax +endif diff --git a/runtime/syntax/lisp.vim b/runtime/syntax/lisp.vim new file mode 100644 index 0000000000..74ec20bb4e --- /dev/null +++ b/runtime/syntax/lisp.vim @@ -0,0 +1,625 @@ +" Vim syntax file +" Language: Lisp +" Maintainer: Dr. Charles E. Campbell, Jr. +" Last Change: Nov 16, 2010 +" Version: 22 +" 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,lispEscapeSpecial,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,lispEscapeSpecial +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 lispEscapeSpecial "\*\w[a-z_0-9-]*\*" +syn match lispEscapeSpecial !#|[^()'`,"; \t]\+|#! +syn match lispEscapeSpecial !#x\x\+! +syn match lispEscapeSpecial !#o\o\+! +syn match lispEscapeSpecial !#b[01]\+! +syn match lispEscapeSpecial !#\\[ -}\~]! +syn match lispEscapeSpecial !#[':][^()'`,"; \t]\+! +syn match lispEscapeSpecial !#([^()'`,"; \t]\+)! +syn match lispEscapeSpecial !#\\\%(Space\|Newline\|Tab\|Page\|Rubout\|Linefeed\|Return\|Backspace\)! +syn match lispEscapeSpecial "\<+[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 lispEscapeSpecial 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/runtime/syntax/lite.vim b/runtime/syntax/lite.vim new file mode 100644 index 0000000000..8abc51dea1 --- /dev/null +++ b/runtime/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/runtime/syntax/litestep.vim b/runtime/syntax/litestep.vim new file mode 100644 index 0000000000..b4c15faf65 --- /dev/null +++ b/runtime/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/runtime/syntax/loginaccess.vim b/runtime/syntax/loginaccess.vim new file mode 100644 index 0000000000..07d60eeca0 --- /dev/null +++ b/runtime/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/runtime/syntax/logindefs.vim b/runtime/syntax/logindefs.vim new file mode 100644 index 0000000000..59d18e7ef4 --- /dev/null +++ b/runtime/syntax/logindefs.vim @@ -0,0 +1,174 @@ +" Vim syntax file +" Language: login.defs(5) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2010-11-29 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn match logindefsBegin display '^' + \ nextgroup= + \ logindefsComment, + \ @logindefsKeyword + \ skipwhite + +syn region logindefsComment display oneline start='^\s*#' end='$' + \ contains=logindefsTodo,@Spell + +syn keyword logindefsTodo contained TODO FIXME XXX NOTE + +syn cluster logindefsKeyword contains= + \ logindefsBooleanKeyword, + \ logindefsEncryptKeyword, + \ logindefsNumberKeyword, + \ logindefsPathKeyword, + \ logindefsPathsKeyword, + \ logindefsStringKeyword + +syn keyword logindefsBooleanKeyword contained + \ CHFN_AUTH + \ CHSH_AUTH + \ 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 logindefsBoolean contained yes no + +syn keyword logindefsEncryptKeyword contained + \ ENCRYPT_METHOD + \ nextgroup=logindefsEncryptMethod skipwhite + +syn keyword logindefsEncryptMethod contained + \ DES + \ MD5 + \ SHA256 + \ SHA512 + +syn keyword logindefsNumberKeyword contained + \ ERASECHAR + \ FAIL_DELAY + \ GID_MAX + \ GID_MIN + \ KILLCHAR + \ LOGIN_RETRIES + \ LOGIN_TIMEOUT + \ MAX_MEMBERS_PER_GROUP + \ PASS_CHANGE_TRIES + \ PASS_MAX_DAYS + \ PASS_MIN_DAYS + \ PASS_WARN_AGE + \ PASS_MAX_LEN + \ PASS_MIN_LEN + \ SHA_CRYPT_MAX_ROUNDS + \ SHA_CRYPT_MIN_ROUNDS + \ SYS_GID_MAX + \ SYS_GID_MIN + \ SYS_UID_MAX + \ SYS_UID_MIN + \ UID_MAX + \ UID_MIN + \ ULIMIT + \ UMASK + \ nextgroup=@logindefsNumber skipwhite + +syn cluster logindefsNumber contains= + \ logindefsDecimal, + \ logindefsHex, + \ logindefsOctal, + \ logindefsOctalError + +syn match logindefsDecimal contained '\<\d\+\>' + +syn match logindefsHex contained display '\<0x\x\+\>' + +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 keyword logindefsPathKeyword contained + \ ENVIRON_FILE + \ FAKE_SHELL + \ FTMP_FILE + \ HUSHLOGIN_FILE + \ ISSUE_FILE + \ MAIL_DIR + \ MAIL_FILE + \ NOLOGINS_FILE + \ SULOG_FILE + \ TTYTYPE_FILE + \ nextgroup=logindefsPath skipwhite + +syn match logindefsPath contained '[[:graph:]]\+' + +syn keyword logindefsPathsKeyword contained + \ CONSOLE + \ ENV_PATH + \ ENV_SUPATH + \ MOTD_FILE + \ nextgroup=logindefsPaths skipwhite + +syn match logindefsPaths contained '[^:]\+' + \ nextgroup=logindefsPathDelim + +syn match logindefsPathDelim contained ':' nextgroup=logindefsPaths + +syn keyword logindefsStringKeyword contained + \ CHFN_RESTRICT + \ CONSOLE_GROUPS + \ ENV_HZ + \ ENV_TZ + \ LOGIN_STRING + \ SU_NAME + \ TTYGROUP + \ TTYPERM + \ USERDEL_CMD + \ nextgroup=logindefsString skipwhite + +syn match logindefsString contained '[[:graph:]]\+' + +hi def link logindefsComment Comment +hi def link logindefsTodo Todo +hi def link logindefsKeyword Keyword +hi def link logindefsBooleanKeyword logindefsKeyword +hi def link logindefsEncryptKeyword logindefsKeyword +hi def link logindefsNumberKeyword logindefsKeyword +hi def link logindefsPathKeyword logindefsKeyword +hi def link logindefsPathsKeyword logindefsKeyword +hi def link logindefsStringKeyword logindefsKeyword +hi def link logindefsBoolean Boolean +hi def link logindefsEncryptMethod Type +hi def link logindefsNumber Number +hi def link logindefsDecimal logindefsNumber +hi def link logindefsHex logindefsNumber +hi def link logindefsOctal logindefsNumber +hi def link logindefsOctalZero PreProc +hi def link logindefsOctalError Error +hi def link logindefsPath String +hi def link logindefsPaths logindefsPath +hi def link logindefsPathDelim Delimiter +hi def link logindefsString String + +let b:current_syntax = "logindefs" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/logtalk.vim b/runtime/syntax/logtalk.vim new file mode 100644 index 0000000000..be34c7ed74 --- /dev/null +++ b/runtime/syntax/logtalk.vim @@ -0,0 +1,450 @@ +" Vim syntax file +" +" Language: Logtalk +" Maintainer: Paulo Moura +" Last Change: February 4, 2012 + + +" 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&vim + +" 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=":- if(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- elif(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn match logtalkDirTag ":- else\." +syn match logtalkDirTag ":- endif\." +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=":- coinductive(" 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=":- meta_non_terminal(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- op(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- set_logtalk_flag(" 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\." + + +" Prolog directives + +syn region logtalkDir matchgroup=logtalkDirTag start=":- ensure_loaded(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- include(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- set_prolog_flag(" matchgroup=logtalkDirTag end=")\." contains=ALL + + +" 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=":- reexport(" 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 "\" + + +" Sorting + +syn match logtalkKeyword "\<\(key\)\?sort\ze(" + + +" 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 logtalkKeyword "\" +syn match logtalkKeyword "\>" +syn match logtalkOperator "<<" +syn match logtalkOperator "/\\" +syn match logtalkOperator "\\/" +syn match logtalkOperator "\\" + + +" Logtalk list operator + +syn match logtalkOperator "|" + + +" Logtalk existential quantifier 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 "%.*" + +syn cluster logtalkComment contains=logtalkBlockComment,logtalkLineComment + + +" Logtalk conditional compilation folding + +syn region logtalkIfContainer transparent keepend extend start=":- if(" end=":- endif\." containedin=ALLBUT,@logtalkComment contains=NONE +syn region logtalkIf transparent fold keepend start=":- if(" end=":- \(else\.\|elif(\)"ms=s-1,me=s-1 contained containedin=logtalkIfContainer nextgroup=logtalkElseIf,logtalkElse contains=TOP +syn region logtalkElseIf transparent fold keepend start=":- elif(" end=":- \(else\.\|elif(\)"ms=s-1,me=s-1 contained containedin=logtalkIfContainer nextgroup=logtalkElseIf,logtalkElse contains=TOP +syn region logtalkElse transparent fold keepend start=":- else\." end=":- endif\." contained containedin=logtalkIfContainer contains=TOP + + + +" 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 logtalkIfContainer PreProc + HiLink logtalkIf PreProc + HiLink logtalkElseIf PreProc + HiLink logtalkElse 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" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/lotos.vim b/runtime/syntax/lotos.vim new file mode 100644 index 0000000000..3cd83c4d86 --- /dev/null +++ b/runtime/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/runtime/syntax/lout.vim b/runtime/syntax/lout.vim new file mode 100644 index 0000000000..9a34328ac3 --- /dev/null +++ b/runtime/syntax/lout.vim @@ -0,0 +1,153 @@ +" Vim syntax file +" Language: Lout +" Maintainer: Christian V. J. Brüssow +" Last Change: So 12 Feb 2012 15:15:03 CET +" Filenames: *.lout,*.lt +" URL: http://www.cvjb.de/comp/vim/lout.vim + +" $Id: lout.vim,v 1.4 2012/02/12 15:16:17 bruessow Exp $ +" +" Lout: Basser Lout document formatting system. + +" Many Thanks to... +" +" 2012-02-12: +" Thilo Six send a patch for cpoptions. +" See the discussion at http://thread.gmane.org/gmane.editors.vim.devel/32151 + + +" 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&vim + +" 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" + +let &cpo=s:cpo_save +unlet s:cpo_save + +" vim:ts=8:sw=4:nocindent:smartindent: diff --git a/runtime/syntax/lpc.vim b/runtime/syntax/lpc.vim new file mode 100644 index 0000000000..e948f3d70c --- /dev/null +++ b/runtime/syntax/lpc.vim @@ -0,0 +1,460 @@ +" Vim syntax file +" Language: LPC +" Maintainer: Shizhu Pan +" URL: http://poet.tomud.com/pub/lpc.vim.bz2 +" Last Change: 2011 Dec 10 by Thilo Six +" 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 + +let s:cpo_save = &cpo +set cpo&vim + +" 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:*/,:// + +" 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" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim:ts=8:nosta:sw=2:ai:si: +" vim600:set fdm=marker: }}}1 diff --git a/runtime/syntax/lprolog.vim b/runtime/syntax/lprolog.vim new file mode 100644 index 0000000000..086c00fd5d --- /dev/null +++ b/runtime/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/runtime/syntax/lscript.vim b/runtime/syntax/lscript.vim new file mode 100644 index 0000000000..648a0ebeab --- /dev/null +++ b/runtime/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/runtime/syntax/lsl.vim b/runtime/syntax/lsl.vim new file mode 100644 index 0000000000..3b2baa06ce --- /dev/null +++ b/runtime/syntax/lsl.vim @@ -0,0 +1,277 @@ +" Vim syntax file +" Language: Linden Scripting Language +" Maintainer: Timo Frenay +" Last Change: 2012 Apr 30 + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif +let s:keepcpo= &cpo +set cpo&vim + +" 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" + +let &cpo = s:keepcpo +unlet s:keepcpo + +" vim: ts=8 diff --git a/runtime/syntax/lss.vim b/runtime/syntax/lss.vim new file mode 100644 index 0000000000..6620707f92 --- /dev/null +++ b/runtime/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/runtime/syntax/lua.vim b/runtime/syntax/lua.vim new file mode 100644 index 0000000000..3ff80b1ebe --- /dev/null +++ b/runtime/syntax/lua.vim @@ -0,0 +1,367 @@ +" Vim syntax file +" Language: Lua 4.0, Lua 5.0, Lua 5.1 and Lua 5.2 +" Maintainer: Marcus Aurelius Farias +" First Author: Carlos Augusto Teixeira Mendes +" Last Change: 2012 Aug 12 +" Options: lua_version = 4 or 5 +" lua_subversion = 0 (4.0, 5.0) or 1 (5.1) or 2 (5.2) +" default 5.2 + +" 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&vim + +if !exists("lua_version") + " Default is lua 5.2 + let lua_version = 5 + let lua_subversion = 2 +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,luaParenError,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd,luaBlock,luaLoopBlock,luaIn,luaStatement +syn region luaTableBlock transparent matchgroup=luaTable start="{" end="}" contains=ALLBUT,luaBraceError,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd,luaBlock,luaLoopBlock,luaIn,luaStatement + +syn match luaParenError ")" +syn match luaBraceError "}" +syn match luaError "\<\%(end\|else\|elseif\|then\|until\|in\)\>" + +" function ... end +syn region luaFunctionBlock transparent matchgroup=luaFunction start="\" end="\" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn + +" if ... then +syn region luaIfThen transparent matchgroup=luaCond start="\" end="\"me=e-4 contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaIn nextgroup=luaThenEnd skipwhite skipempty + +" then ... end +syn region luaThenEnd contained transparent matchgroup=luaCond start="\" end="\" contains=ALLBUT,luaTodo,luaSpecial,luaThenEnd,luaIn + +" elseif ... then +syn region luaElseifThen contained transparent matchgroup=luaCond start="\" end="\" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn + +" else +syn keyword luaElse contained else + +" do ... end +syn region luaBlock transparent matchgroup=luaStatement start="\" end="\" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn + +" repeat ... until +syn region luaLoopBlock transparent matchgroup=luaRepeat start="\" end="\" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn + +" while ... do +syn region luaLoopBlock transparent matchgroup=luaRepeat start="\" end="\"me=e-2 contains=ALLBUT,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd,luaIn nextgroup=luaBlock skipwhite skipempty + +" for ... do and for ... in ... do +syn region luaLoopBlock transparent matchgroup=luaRepeat start="\" end="\"me=e-2 contains=ALLBUT,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd nextgroup=luaBlock skipwhite skipempty + +syn keyword luaIn contained in + +" other keywords +syn keyword luaStatement return local break +if lua_version > 5 || (lua_version == 5 && lua_subversion >= 2) + syn keyword luaStatement goto + syn match luaLabel "::\I\i*::" +endif +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\'\"]\|\\[[:digit:]]\{,3}" +elseif lua_version == 5 + if lua_subversion == 0 + syn match luaSpecial contained #\\[\\abfnrtv'"[\]]\|\\[[:digit:]]\{,3}# + syn region luaString2 matchgroup=luaString start=+\[\[+ end=+\]\]+ contains=luaString2,@Spell + else + if lua_subversion == 1 + syn match luaSpecial contained #\\[\\abfnrtv'"]\|\\[[:digit:]]\{,3}# + else " Lua 5.2 + syn match luaSpecial contained #\\[\\abfnrtvz'"]\|\\x[[:xdigit:]]\{2}\|\\[[:digit:]]\{,3}# + endif + syn region luaString2 matchgroup=luaString start="\[\z(=*\)\[" end="\]\z1\]" contains=@Spell + endif +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 luaNumber "\<\d\+\.\d*\%([eE][-+]\=\d\+\)\=\>" +" floating point number, starting with a dot, optional exponent +syn match luaNumber "\.\d\+\%([eE][-+]\=\d\+\)\=\>" +" floating point number, without dot, with exponent +syn match luaNumber "\<\d\+[eE][-+]\=\d\+\>" + +" hex numbers +if lua_version >= 5 + if lua_subversion == 1 + syn match luaNumber "\<0[xX]\x\+\>" + elseif lua_subversion >= 2 + syn match luaNumber "\<0[xX][[:xdigit:].]\+\%([pP][-+]\=\d\+\)\=\>" + endif +endif + +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 + syn keyword luaFunc getmetatable setmetatable + syn keyword luaFunc ipairs pairs + syn keyword luaFunc pcall xpcall + syn keyword luaFunc _G loadfile rawequal require + if lua_subversion == 0 + syn keyword luaFunc getfenv setfenv + syn keyword luaFunc loadstring unpack + syn keyword luaFunc gcinfo loadlib LUA_PATH _LOADED _REQUIREDNAME + else + syn keyword luaFunc load select + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + if lua_subversion == 1 + syn keyword luaFunc getfenv setfenv + syn keyword luaFunc loadstring module unpack + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + elseif lua_subversion == 2 + syn keyword luaFunc _ENV rawlen + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + endif + syn match luaFunc /\/ + endif + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + if lua_subversion == 0 + syn match luaFunc /\/ + else + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + endif + if lua_subversion == 0 + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + elseif lua_subversion == 1 + syn match luaFunc /\/ + elseif lua_subversion == 2 + syn match luaFunc /\/ + syn match luaFunc /\/ + endif + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + if lua_subversion == 0 + syn match luaFunc /\/ + syn match luaFunc /\/ + else + if lua_subversion == 1 + syn match luaFunc /\/ + endif + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + endif + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + if lua_subversion == 1 + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + elseif lua_subversion == 2 + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + syn match luaFunc /\/ + 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 luaFor Repeat + HiLink luaString String + HiLink luaString2 String + HiLink luaNumber Number + HiLink luaOperator Operator + HiLink luaIn Operator + HiLink luaConstant Constant + HiLink luaCond Conditional + HiLink luaElse Conditional + HiLink luaFunction Function + HiLink luaComment Comment + HiLink luaTodo Todo + HiLink luaTable Structure + HiLink luaError Error + HiLink luaParenError Error + HiLink luaBraceError Error + HiLink luaSpecial SpecialChar + HiLink luaFunc Identifier + HiLink luaLabel Label + + delcommand HiLink +endif + +let b:current_syntax = "lua" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: et ts=8 sw=2 diff --git a/runtime/syntax/lynx.vim b/runtime/syntax/lynx.vim new file mode 100644 index 0000000000..fa7c26f629 --- /dev/null +++ b/runtime/syntax/lynx.vim @@ -0,0 +1,140 @@ +" Vim syntax file +" Language: Lynx configuration file (lynx.cfg) +" Maintainer: Doug Kearns +" Last Change: 2013 Jun 20 + +" Lynx 2.8.7 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn match lynxStart "^" transparent skipwhite nextgroup=lynxOption + +syn match lynxComment "\(^\|\s\+\)#.*$" contains=lynxTodo + +syn keyword lynxTodo TODO NOTE FIXME XXX contained + +syn match lynxDelimiter ":" skipwhite nextgroup=lynxBoolean,lynxNumber,lynxNone,lynxRCOption + +syn case ignore +syn keyword lynxBoolean TRUE FALSE ON OFF contained +syn keyword lynxNone NONE contained +syn case match + +syn match lynxNumber "-\=\<\d\+\>" contained + +"{{{ Options +syn case ignore +syn keyword lynxOption ACCEPT_ALL_COOKIES ALERTSECS ALWAYS_RESUBMIT_POSTS + \ ALWAYS_TRUSTED_EXEC ANONFTP_PASSWORD ASSUMED_COLOR + \ ASSUMED_DOC_CHARSET_CHOICE ASSUME_CHARSET ASSUME_LOCAL_CHARSET + \ ASSUME_UNREC_CHARSET AUTO_SESSION AUTO_UNCACHE_DIRLISTS BAD_HTML + \ BIBP_BIBHOST BIBP_GLOBAL_SERVER BLOCK_MULTI_BOOKMARKS BOLD_H1 + \ BOLD_HEADERS BOLD_NAME_ANCHORS BOOKMARK_FILE BROKEN_FTP_EPSV + \ BROKEN_FTP_RETR BZIP2_PATH CASE_SENSITIVE_ALWAYS_ON + \ CASE_SENSITIVE_SEARCHING CHARACTER_SET CHARSETS_DIRECTORY + \ CHARSET_SWITCH_RULES CHECKMAIL CHMOD_PATH COLLAPSE_BR_TAGS COLOR + \ COLOR_STYLE COMPRESS_PATH 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 COPY_PATH CSO_PROXY CSWING_PATH + \ DEBUGSECS DEFAULT_BOOKMARK_FILE DEFAULT_CACHE_SIZE DEFAULT_COLORS + \ DEFAULT_EDITOR DEFAULT_INDEX_FILE DEFAULT_KEYPAD_MODE + \ DEFAULT_KEYPAD_MODE_IS_NUMBERS_AS_ARROWS DEFAULT_USER_MODE + \ DEFAULT_VIRTUAL_MEMORY_SIZE DELAYSECS DIRED_MENU DIR_LIST_ORDER + \ DIR_LIST_STYLE DISPLAY DISPLAY_CHARSET_CHOICE DOWNLOADER EMACS_KEYS + \ EMACS_KEYS_ALWAYS_ON ENABLE_LYNXRC ENABLE_SCROLLBACK EXTERNAL + \ FILE_EDITOR FILE_SORTING_METHOD FINGER_PROXY FOCUS_WINDOW + \ FORCE_8BIT_TOUPPER FORCE_COOKIE_PROMPT FORCE_EMPTY_HREFLESS_A + \ FORCE_SSL_COOKIES_SECURE FORCE_SSL_PROMPT FORMS_OPTIONS FTP_FORMAT + \ FTP_PASSIVE FTP_PROXY GLOBAL_EXTENSION_MAP GLOBAL_MAILCAP + \ GOPHER_PROXY GOTOBUFFER GZIP_PATH HELPFILE HIDDEN_LINK_MARKER + \ HISTORICAL_COMMENTS HTMLSRC_ATTRNAME_XFORM HTMLSRC_TAGNAME_XFORM + \ HTTPS_PROXY HTTP_PROXY INCLUDE INFLATE_PATH INFOSECS INSTALL_PATH + \ JUMPBUFFER JUMPFILE JUMP_PROMPT JUSTIFY JUSTIFY_MAX_VOID_PERCENT + \ KBLAYOUT KEYBOARD_LAYOUT KEYMAP KEYPAD_MODE + \ LEFTARROW_IN_TEXTFIELD_PROMPT LINEEDIT_MODE LIST_FORMAT + \ LIST_NEWS_DATES LIST_NEWS_NUMBERS LOCALE_CHARSET LOCALHOST_ALIAS + \ LOCAL_DOMAIN LOCAL_EXECUTION_LINKS_ALWAYS_ON + \ LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE 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 MAX_COOKIES_BUFFER MAX_COOKIES_DOMAIN + \ MAX_COOKIES_GLOBAL MESSAGESECS MINIMAL_COMMENTS MKDIR_PATH + \ MULTI_BOOKMARK MULTI_BOOKMARK_SUPPORT MV_PATH NCR_IN_BOOKMARKS + \ NESTED_TABLES NEWSPOST_PROXY NEWSREPLY_PROXY NEWS_CHUNK_SIZE + \ NEWS_MAX_CHUNK NEWS_POSTING NEWS_PROXY NNTPSERVER NNTP_PROXY + \ NONRESTARTING_SIGWINCH NO_DOT_FILES NO_FILE_REFERER + \ NO_FORCED_CORE_DUMP NO_FROM_HEADER NO_ISMAP_IF_USEMAP NO_MARGINS + \ NO_PAUSE NO_PROXY NO_REFERER_HEADER NO_TABLE_CENTER NO_TITLE + \ NUMBER_FIELDS_ON_LEFT NUMBER_LINKS_ON_LEFT OUTGOING_MAIL_CHARSET + \ PARTIAL PARTIAL_THRES PERSISTENT_COOKIES PERSONAL_EXTENSION_MAP + \ PERSONAL_MAILCAP PERSONAL_MAIL_ADDRESS POSITIONABLE_EDITOR + \ PREFERRED_CHARSET PREFERRED_ENCODING PREFERRED_LANGUAGE + \ PREFERRED_MEDIA_TYPES PREPEND_BASE_TO_SOURCE + \ PREPEND_CHARSET_TO_SOURCE PRETTYSRC PRETTYSRC_SPEC + \ PRETTYSRC_VIEW_NO_ANCHOR_NUMBERING PRINTER QUIT_DEFAULT_YES RAW_MODE + \ READ_TIMEOUT REFERER_WITH_QUERY REPLAYSECS REUSE_TEMPFILES + \ RLOGIN_PATH RM_PATH RMDIR_PATH RULE RULESFILE + \ RUN_ALL_EXECUTION_LINKS RUN_EXECUTION_LINKS_LOCAL SAVE_SPACE + \ SCAN_FOR_BURIED_NEWS_REFS SCREEN_SIZE SCROLLBAR SCROLLBAR_ARROW + \ SEEK_FRAG_AREA_IN_CUR SEEK_FRAG_MAP_IN_CUR SELECT_POPUPS + \ SEND_USERAGENT SESSION_FILE SESSION_LIMIT SET_COOKIES SETFONT_PATH + \ SHOW_COLOR SHOW_CURSOR SHOW_DOTFILES SHOW_KB_NAME SHOW_KB_RATE + \ SNEWSPOST_PROXY SNEWSREPLY_PROXY SNEWS_PROXY SOFT_DQUOTES + \ SOURCE_CACHE SOURCE_CACHE_FOR_ABORTED SSL_CERT_FILE STARTFILE + \ STATUS_BUFFER_SIZE STRIP_DOTDOT_URLS SUBSTITUTE_UNDERSCORES + \ SUB_BOOKMARKS SUFFIX SUFFIX_ORDER SYSLOG_REQUESTED_URLS SYSLOG_TEXT + \ SYSTEM_EDITOR SYSTEM_MAIL SYSTEM_MAIL_FLAGS TAGSOUP TAR_PATH + \ TELNET_PATH TEXTFIELDS_NEED_ACTIVATION TIMEOUT TN3270_PATH + \ TOUCH_PATH TRIM_INPUT_FIELDS TRUSTED_EXEC TRUSTED_LYNXCGI + \ UNCOMPRESS_PATH UNDERLINE_LINKS UNZIP_PATH UPLOADER + \ URL_DOMAIN_PREFIXES URL_DOMAIN_SUFFIXES USERAGENT USER_MODE + \ USE_FIXED_RECORDS USE_MOUSE USE_SELECT_POPUPS UUDECODE_PATH + \ VERBOSE_IMAGES VIEWER VISITED_LINKS VI_KEYS VI_KEYS_ALWAYS_ON + \ WAIS_PROXY XHTML_PARSING XLOADIMAGE_COMMAND ZCAT_PATH ZIP_PATH + \ contained nextgroup=lynxDelimiter +syn keyword lynxRCOption accept_all_cookies assume_charset auto_session + \ bookmark_file case_sensitive_searching character_set + \ cookie_accept_domains cookie_file cookie_loose_invalid_domains + \ cookie_query_invalid_domains cookie_reject_domains + \ cookie_strict_invalid_domains dir_list_style display emacs_keys + \ file_editor file_sorting_method force_cookie_prompt force_ssl_prompt + \ ftp_passive kblayout keypad_mode lineedit_mode locale_charset + \ make_links_for_all_images make_pseudo_alts_for_inlines + \ multi_bookmark no_pause personal_mail_address preferred_charset + \ preferred_encoding preferred_language preferred_media_types raw_mode + \ run_all_execution_links run_execution_links_on_local_files scrollbar + \ select_popups send_useragent session_file set_cookies show_color + \ show_cursor show_dotfiles show_kb_rate sub_bookmarks tagsoup + \ underline_links user_mode useragent verbose_images vi_keys + \ visited_links + \ contained nextgroup=lynxDelimiter +syn case match +" }}} + +" cfg2html.pl formatting directives +syn match lynxFormatDir "^\.h\d\s.*$" +syn match lynxFormatDir "^\.\(ex\|nf\)\(\s\+\d\+\)\=$" +syn match lynxFormatDir "^\.fi$" + +hi def link lynxBoolean Boolean +hi def link lynxComment Comment +hi def link lynxDelimiter Special +hi def link lynxFormatDir Special +hi def link lynxNone Constant +hi def link lynxNumber Number +hi def link lynxOption Identifier +hi def link lynxRCOption lynxOption +hi def link lynxTodo Todo + +let b:current_syntax = "lynx" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 fdm=marker: diff --git a/runtime/syntax/m4.vim b/runtime/syntax/m4.vim new file mode 100644 index 0000000000..ba7a294d14 --- /dev/null +++ b/runtime/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/runtime/syntax/mail.vim b/runtime/syntax/mail.vim new file mode 100644 index 0000000000..0cd48fc77a --- /dev/null +++ b/runtime/syntax/mail.vim @@ -0,0 +1,112 @@ +" Vim syntax file +" Language: Mail file +" Previous Maintainer: Felix von Leitner +" Maintainer: GI , where a='gi1242+vim', b='gmail', c='com' +" Last Change: Wed 14 Aug 2013 08:24:52 AM PDT + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" 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 keepend 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 Title +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" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/mailaliases.vim b/runtime/syntax/mailaliases.vim new file mode 100644 index 0000000000..743068f66f --- /dev/null +++ b/runtime/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/runtime/syntax/mailcap.vim b/runtime/syntax/mailcap.vim new file mode 100644 index 0000000000..bd2304064a --- /dev/null +++ b/runtime/syntax/mailcap.vim @@ -0,0 +1,35 @@ +" Vim syntax file +" Language: Mailcap configuration file +" Maintainer: Doug Kearns +" Last Change: 2013 Jun 01 + +if 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 + +hi def link mailcapComment Comment +hi def link mailcapDelimiter Delimiter +hi def link mailcapFlag Statement +hi def link mailcapFieldname Statement +hi def link mailcapSpecial Identifier +hi def link mailcapTypeField Type +hi def link mailcapString String + +let b:current_syntax = "mailcap" + +" vim: ts=8 diff --git a/runtime/syntax/make.vim b/runtime/syntax/make.vim new file mode 100644 index 0000000000..6fd46aaa54 --- /dev/null +++ b/runtime/syntax/make.vim @@ -0,0 +1,143 @@ +" Vim syntax file +" Language: Makefile +" Maintainer: Claudio Fleiner +" URL: http://www.fleiner.com/vim/syntax/make.vim +" Last Change: 2012 Oct 05 + +" 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&vim + + +" 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 + +" catch unmatched define/endef keywords. endef only matches it is by itself on a line, possibly followed by a commend +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-1 nextgroup=makeSource +syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:[^=]"me=e-2 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" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 diff --git a/runtime/syntax/mallard.vim b/runtime/syntax/mallard.vim new file mode 100644 index 0000000000..b2a77b0066 --- /dev/null +++ b/runtime/syntax/mallard.vim @@ -0,0 +1,37 @@ +" Vim syntax file +" Language: Mallard +" Maintainer: Jaromir Hradilek +" URL: https://github.com/jhradilek/vim-syntax +" Last Change: 11 February 2013 +" Description: A syntax file for the Mallard markup language according to +" Mallard 1.0 DRAFT as of 2013-02-11. + +if exists("b:current_syntax") + finish +endif + +do Syntax xml +syn cluster xmlTagHook add=mallardTagName +syn spell toplevel +syn case match + +syn keyword mallardTagName app cite cmd code col colgroup comment contained +syn keyword mallardTagName credit desc em email example figure contained +syn keyword mallardTagName file gui guiseq info input item key contained +syn keyword mallardTagName keyseq license link links list listing contained +syn keyword mallardTagName media name note output p page quote contained +syn keyword mallardTagName revision screen section span steps contained +syn keyword mallardTagName subtitle synopsis sys table tbody td contained +syn keyword mallardTagName terms tfoot thead title tr tree var contained +syn keyword mallardTagName years contained + +syn region mallardComment start="" end=""me=e-10 contains=xmlTag,xmlNamespace,xmlTagName,xmlEndTag,xmlRegion,xmlEntity,@Spell keepend +syn region mallardEmphasis start="" end="
"me=e-5 contains=xmlTag,xmlNamespace,xmlTagName,xmlEndTag,xmlRegion,xmlEntity,@Spell keepend +syn region mallardTitle start="" end=""me=e-8 contains=xmlTag,xmlNamespace,xmlTagName,xmlEndTag,xmlRegion,xmlEntity,@Spell keepend + +hi def link mallardComment Comment +hi def link mallardTagName Statement +hi def link mallardTitle Title +hi def mallardEmphasis term=italic cterm=italic gui=italic + +let b:current_syntax = "mallard" diff --git a/runtime/syntax/man.vim b/runtime/syntax/man.vim new file mode 100644 index 0000000000..4172a02fe1 --- /dev/null +++ b/runtime/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/runtime/syntax/manconf.vim b/runtime/syntax/manconf.vim new file mode 100644 index 0000000000..90ecc8ec17 --- /dev/null +++ b/runtime/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/runtime/syntax/manual.vim b/runtime/syntax/manual.vim new file mode 100644 index 0000000000..5ea373180a --- /dev/null +++ b/runtime/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/runtime/syntax/maple.vim b/runtime/syntax/maple.vim new file mode 100644 index 0000000000..b6e4ae9243 --- /dev/null +++ b/runtime/syntax/maple.vim @@ -0,0 +1,633 @@ +" Vim syntax file +" Language: Maple V (based on release 4) +" Maintainer: Dr. Charles E. Campbell, Jr. +" Last Change: Jan 05, 2010 +" Version: 10 +" 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 match mvCond "end\s\+if" + +syn keyword mvRepeat by for in to +syn keyword mvRepeat do from od while +syn match mvRepeat "end\s\+do" + +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/runtime/syntax/markdown.vim b/runtime/syntax/markdown.vim new file mode 100644 index 0000000000..068115e92d --- /dev/null +++ b/runtime/syntax/markdown.vim @@ -0,0 +1,134 @@ +" Vim syntax file +" Language: Markdown +" Maintainer: Tim Pope +" Filenames: *.markdown +" Last Change: 2013 May 30 + +if exists("b:current_syntax") + finish +endif + +if !exists('main_syntax') + let main_syntax = 'markdown' +endif + +runtime! syntax/html.vim +unlet! b:current_syntax + +if !exists('g:markdown_fenced_languages') + let g:markdown_fenced_languages = [] +endif +for s:type in map(copy(g:markdown_fenced_languages),'matchstr(v:val,"[^=]*$")') + if s:type =~ '\.' + let b:{matchstr(s:type,'[^.]*')}_subtype = matchstr(s:type,'\.\zs.*') + endif + exe 'syn include @markdownHighlight'.substitute(s:type,'\.','','g').' syntax/'.matchstr(s:type,'[^.]*').'.vim' + unlet! b:current_syntax +endfor +unlet! s:type + +syn sync minlines=10 +syn case ignore + +syn match markdownValid '[<>]\c[a-z/$!]\@!' +syn match markdownValid '&\%(#\=\w*;\)\@!' + +syn match markdownLineStart "^[<@]\@!" nextgroup=@markdownBlock,htmlSpecialChar + +syn cluster markdownBlock contains=markdownH1,markdownH2,markdownH3,markdownH4,markdownH5,markdownH6,markdownBlockquote,markdownListMarker,markdownOrderedListMarker,markdownCodeBlock,markdownRule +syn cluster markdownInline contains=markdownLineBreak,markdownLinkText,markdownItalic,markdownBold,markdownCode,markdownEscape,@htmlTop,markdownError + +syn match markdownH1 "^.\+\n=\+$" contained contains=@markdownInline,markdownHeadingRule,markdownAutomaticLink +syn match markdownH2 "^.\+\n-\+$" contained contains=@markdownInline,markdownHeadingRule,markdownAutomaticLink + +syn match markdownHeadingRule "^[=-]\+$" contained + +syn region markdownH1 matchgroup=markdownHeadingDelimiter start="##\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained +syn region markdownH2 matchgroup=markdownHeadingDelimiter start="###\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained +syn region markdownH3 matchgroup=markdownHeadingDelimiter start="####\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained +syn region markdownH4 matchgroup=markdownHeadingDelimiter start="#####\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained +syn region markdownH5 matchgroup=markdownHeadingDelimiter start="######\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained +syn region markdownH6 matchgroup=markdownHeadingDelimiter start="#######\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained + +syn match markdownBlockquote ">\%(\s\|$\)" contained nextgroup=@markdownBlock + +syn region markdownCodeBlock start=" \|\t" end="$" contained + +" TODO: real nesting +syn match markdownListMarker "\%(\t\| \{0,4\}\)[-*+]\%(\s\+\S\)\@=" contained +syn match markdownOrderedListMarker "\%(\t\| \{0,4}\)\<\d\+\.\%(\s\+\S\)\@=" contained + +syn match markdownRule "\* *\* *\*[ *]*$" contained +syn match markdownRule "- *- *-[ -]*$" contained + +syn match markdownLineBreak " \{2,\}$" + +syn region markdownIdDeclaration matchgroup=markdownLinkDelimiter start="^ \{0,3\}!\=\[" end="\]:" oneline keepend nextgroup=markdownUrl skipwhite +syn match markdownUrl "\S\+" nextgroup=markdownUrlTitle skipwhite contained +syn region markdownUrl matchgroup=markdownUrlDelimiter start="<" end=">" oneline keepend nextgroup=markdownUrlTitle skipwhite contained +syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+"+ end=+"+ keepend contained +syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+'+ end=+'+ keepend contained +syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+(+ end=+)+ keepend contained + +syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\_[^]]*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" keepend nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart +syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" contains=markdownUrl keepend contained +syn region markdownId matchgroup=markdownIdDelimiter start="\[" end="\]" keepend contained +syn region markdownAutomaticLink matchgroup=markdownUrlDelimiter start="<\%(\w\+:\|[[:alnum:]_+-]\+@\)\@=" end=">" keepend oneline + +syn region markdownItalic start="\S\@<=\*\|\*\S\@=" end="\S\@<=\*\|\*\S\@=" keepend contains=markdownLineStart +syn region markdownItalic start="\S\@<=_\|_\S\@=" end="\S\@<=_\|_\S\@=" keepend contains=markdownLineStart +syn region markdownBold start="\S\@<=\*\*\|\*\*\S\@=" end="\S\@<=\*\*\|\*\*\S\@=" keepend contains=markdownLineStart,markdownItalic +syn region markdownBold start="\S\@<=__\|__\S\@=" end="\S\@<=__\|__\S\@=" keepend contains=markdownLineStart,markdownItalic +syn region markdownBoldItalic start="\S\@<=\*\*\*\|\*\*\*\S\@=" end="\S\@<=\*\*\*\|\*\*\*\S\@=" keepend contains=markdownLineStart +syn region markdownBoldItalic start="\S\@<=___\|___\S\@=" end="\S\@<=___\|___\S\@=" keepend contains=markdownLineStart +syn region markdownCode matchgroup=markdownCodeDelimiter start="`" end="`" keepend contains=markdownLineStart +syn region markdownCode matchgroup=markdownCodeDelimiter start="`` \=" end=" \=``" keepend contains=markdownLineStart +syn region markdownCode matchgroup=markdownCodeDelimiter start="^\s*```.*$" end="^\s*```\ze\s*$" keepend + +if main_syntax ==# 'markdown' + for s:type in g:markdown_fenced_languages + exe 'syn region markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*```'.matchstr(s:type,'[^=]*').'\>.*$" end="^\s*```\ze\s*$" keepend contains=@markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g') + endfor + unlet! s:type +endif + +syn match markdownEscape "\\[][\\`*_{}()#+.!-]" +syn match markdownError "\w\@<=_\w\@=" + +hi def link markdownH1 htmlH1 +hi def link markdownH2 htmlH2 +hi def link markdownH3 htmlH3 +hi def link markdownH4 htmlH4 +hi def link markdownH5 htmlH5 +hi def link markdownH6 htmlH6 +hi def link markdownHeadingRule markdownRule +hi def link markdownHeadingDelimiter Delimiter +hi def link markdownOrderedListMarker markdownListMarker +hi def link markdownListMarker htmlTagName +hi def link markdownBlockquote Comment +hi def link markdownRule PreProc + +hi def link markdownLinkText htmlLink +hi def link markdownIdDeclaration Typedef +hi def link markdownId Type +hi def link markdownAutomaticLink markdownUrl +hi def link markdownUrl Float +hi def link markdownUrlTitle String +hi def link markdownIdDelimiter markdownLinkDelimiter +hi def link markdownUrlDelimiter htmlTag +hi def link markdownUrlTitleDelimiter Delimiter + +hi def link markdownItalic htmlItalic +hi def link markdownBold htmlBold +hi def link markdownBoldItalic htmlBoldItalic +hi def link markdownCodeDelimiter Delimiter + +hi def link markdownEscape Special +hi def link markdownError Error + +let b:current_syntax = "markdown" +if main_syntax ==# 'markdown' + unlet main_syntax +endif + +" vim:set sw=2: diff --git a/runtime/syntax/masm.vim b/runtime/syntax/masm.vim new file mode 100644 index 0000000000..bb3c9681bc --- /dev/null +++ b/runtime/syntax/masm.vim @@ -0,0 +1,375 @@ +" Vim syntax file +" Language: Microsoft Macro Assembler (80x86) +" Orig Author: Rob Brady +" Maintainer: Wu Yongwei +" Last Change: $Date: 2013/11/13 11:49:24 $ +" $Revision: 1.48 $ + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +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])" + +" x86-64 registers +syn keyword masmRegister RAX RBX RCX RDX RSI RDI RBP RSP +syn keyword masmRegister R8 R9 R10 R11 R12 R13 R14 R15 +syn keyword masmRegister R8D R9D R10D R11D R12D R13D R14D R15D +syn keyword masmRegister R8W R9W R10W R11W R12W R13W R14W R15W +syn keyword masmRegister R8B R9B R10B R11B R12B R13B R14B R15B + +" SSE/AVX registers +syn match masmRegister "\(X\|Y\)MM[0-9]\>" +syn match masmRegister "\(X\|Y\)MM1[0-5]\>" + +" 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 + +" SSSE3 opcodes (Core and later) +syn keyword masmOpcode PSIGNB PSIGNW PSIGND PABSB PABSW PABSD +syn keyword masmOpcode PALIGNR PSHUFB PMULHRSW PMADDUBSW +syn keyword masmOpcode PHSUBW PHSUBD PHSUBSW PHADDW PHADDD PHADDSW + +" SSE 4.1 opcodes (Penryn and later) +syn keyword masmOpcode MPSADBW PHMINPOSUW PMULDQ PMULLD DPPS DPPD +syn keyword masmOpcode BLENDPS BLENDPD BLENDVPS BLENDVPD +syn keyword masmOpcode PBLENDVB PBLENDW +syn keyword masmOpcode PMINSB PMAXSB PMINSD PMAXSD +syn keyword masmOpcode PMINUW PMAXUW PMINUD PMAXUD +syn keyword masmOpcode ROUNDPS ROUNDSS ROUNDPD ROUNDSD +syn keyword masmOpcode INSERTPS PINSRB PINSRD PINSRQ +syn keyword masmOpcode EXTRACTPS PEXTRB PEXTRD PEXTRQ +syn keyword masmOpcode PMOVSXBW PMOVZXBW PMOVSXBD PMOVZXBD +syn keyword masmOpcode PMOVSXBQ PMOVZXBQ PMOVSXWD PMOVZXWD +syn keyword masmOpcode PMOVSXWQ PMOVZXWQ PMOVSXDQ PMOVZXDQ +syn keyword masmOpcode PTEST PCMPEQQ PACKUSDW MOVNTDQA + +" SSE 4.2 opcodes (Nehalem and later) +syn keyword masmOpcode PCMPESTRI PCMPESTRM PCMPISTRI PCMPISTRM PCMPGTQ +syn keyword masmOpcode CRC32 POPCNT LZCNT + +" AES-NI (Westmere (2010) and later) +syn keyword masmOpcode AESENC AESENCLAST AESDEC AESDECLAST +syn keyword masmOpcode AESKEYGENASSIST AESIMC PCLMULQDQ + +" AVX (Sandy Bridge (2011) and later) +syn keyword masmOpcode VBROADCASTSS VBROADCASTSD VBROADCASTF128 +syn keyword masmOpcode VINSERTF128 VEXTRACTF128 VMASKMOVPS VMASKMOVPD +syn keyword masmOpcode VPERMILPS VPERMILPD VPERM2F128 +syn keyword masmOpcode VZEROALL VZEROUPPER + +" 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]\)\)\)\>" + + +" The default highlighting +hi def link masmLabel PreProc +hi def link masmComment Comment +hi def link masmDirective Statement +hi def link masmType Type +hi def link masmOperator Type +hi def link masmOption Special +hi def link masmRegister Special +hi def link masmString String +hi def link masmText String +hi def link masmTitle Title +hi def link masmOpcode Statement +hi def link masmOpFloat Statement + +hi def link masmHexadecimal Number +hi def link masmDecimal Number +hi def link masmOctal Number +hi def link masmBinary Number +hi def link masmFloatRaw Number +hi def link masmFloat Number + +hi def link masmIdentifier Identifier + +syntax sync minlines=50 + +let b:current_syntax = "masm" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 diff --git a/runtime/syntax/mason.vim b/runtime/syntax/mason.vim new file mode 100644 index 0000000000..40bdb0eaa4 --- /dev/null +++ b/runtime/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/runtime/syntax/master.vim b/runtime/syntax/master.vim new file mode 100644 index 0000000000..40d644eef9 --- /dev/null +++ b/runtime/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/runtime/syntax/matlab.vim b/runtime/syntax/matlab.vim new file mode 100644 index 0000000000..3828f3e8a8 --- /dev/null +++ b/runtime/syntax/matlab.vim @@ -0,0 +1,125 @@ +" Vim syntax file +" Language: Matlab +" Maintainer: Maurizio Tranchero - maurizio(.)tranchero(@)gmail(.)com +" Credits: Preben 'Peppe' Guldberg +" Original author: Mario Eusebio +" Last Change: Wed Jan 13 11:12:34 CET 2010 +" sinh added to matlab implicit commands +" Change History: +" - 'global' and 'persistent' keyword are now recognized + +" 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 +syn keyword matlabScope global persistent + +" 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=+''+ + +" 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 +" MT_ADDON - correctly highlights words after '...' as comments +syn match matlabComment "\.\.\..*$" contains=matlabTodo,matlabTab +syn region matlabMultilineComment start=+%{+ end=+%}+ contains=matlabTodo,matlabTab + +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 sinh 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 matlabScope Type + + 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/runtime/syntax/maxima.vim b/runtime/syntax/maxima.vim new file mode 100644 index 0000000000..27dcc18842 --- /dev/null +++ b/runtime/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/runtime/syntax/mel.vim b/runtime/syntax/mel.vim new file mode 100644 index 0000000000..dab894865c --- /dev/null +++ b/runtime/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/runtime/syntax/messages.vim b/runtime/syntax/messages.vim new file mode 100644 index 0000000000..4648e94c13 --- /dev/null +++ b/runtime/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/runtime/syntax/mf.vim b/runtime/syntax/mf.vim new file mode 100644 index 0000000000..8bc48fee46 --- /dev/null +++ b/runtime/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/runtime/syntax/mgl.vim b/runtime/syntax/mgl.vim new file mode 100644 index 0000000000..55ae137f2f --- /dev/null +++ b/runtime/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/runtime/syntax/mgp.vim b/runtime/syntax/mgp.vim new file mode 100644 index 0000000000..76b96612e2 --- /dev/null +++ b/runtime/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/runtime/syntax/mib.vim b/runtime/syntax/mib.vim new file mode 100644 index 0000000000..6062d50bcf --- /dev/null +++ b/runtime/syntax/mib.vim @@ -0,0 +1,57 @@ +" Vim syntax file +" Language: Vim syntax file for SNMPv1 and SNMPv2 MIB and SMI files +" Maintainer: Martin Smat +" Original Author: David Pascoe +" Written: Wed Jan 28 14:37:23 GMT--8:00 1998 +" Last Changed: Mon Mar 23 2010 + +if exists("b:current_syntax") + finish +endif + +setlocal iskeyword=@,48-57,_,128-167,224-235,- + +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 mibOperator "::=" +syn match mibComment "\ *--.\{-}\(--\|$\)" +syn match mibNumber "\<['0-9a-fA-FhH]*\>" +syn region mibDescription start="\"" end="\"" contains=DEFAULT + +hi def link mibImplicit Statement +hi def link mibOperator Statement +hi def link mibComment Comment +hi def link mibConstants String +hi def link mibNumber Number +hi def link mibDescription Identifier +hi def link mibEpilogue SpecialChar +hi def link mibValue Structure + +let b:current_syntax = "mib" diff --git a/runtime/syntax/mix.vim b/runtime/syntax/mix.vim new file mode 100644 index 0000000000..9ab98eacf8 --- /dev/null +++ b/runtime/syntax/mix.vim @@ -0,0 +1,83 @@ +" Vim syntax file +" Language: MIX (Donald Knuth's assembly language used in TAOCP) +" Maintainer: Wu Yongwei +" Filenames: *.mixal *.mix +" Last Change: 2013 Nov 13 + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn case ignore + +" Special processing of ALF directive: implementations vary whether quotation +" marks are needed +syn match mixAlfParam #\s\{1,2\}"\?[^"]\{,5\}"\?# contains=mixAlfDirective,mixString nextgroup=mixEndComment contained + +" Region for parameters +syn match mixParam #[-+*/:=0-9a-z,()"]\+# contains=mixIdentifier,mixSpecial,mixNumber,mixString,mixLabel nextgroup=mixEndComment contained + +" Comment at the line end +syn match mixEndComment ".*" contains=mixRegister contained + +" Identifier; must go before literals +syn match mixIdentifier "[a-z0-9_]\+" contained + +" Literals +syn match mixSpecial "[-+*/:=]" contained +syn match mixNumber "[0-9]\+\>" contained +syn region mixString start=+"+ skip=+\\"+ end=+"+ contained + +" Labels +syn match mixLabel "^[a-z0-9_]\{,10\}\s\+" nextgroup=mixAlfSpecial,mixOpcode,mixDirective +syn match mixLabel "[0-9][BF]" contained + +" Comments +syn match mixComment "^\*.*" contains=mixRegister + +" Directives +syn keyword mixDirective ORIG EQU CON END nextgroup=mixParam contained skipwhite +syn keyword mixDirective ALF nextgroup=mixAlfParam contained + +" Opcodes +syn keyword mixOpcode NOP HLT NUM CHAR FLOT FIX nextgroup=mixEndComment contained +syn keyword mixOpcode FADD FSUB FMUL FDIV FCMP MOVE ADD SUB MUL DIV IOC IN OUT JRED JBUS JMP JSJ JOV JNOV JL JE JG JLE JNE JGE SLA SRA SLAX SRAX SLC SRC nextgroup=mixParam contained skipwhite + +syn match mixOpcode "LD[AX1-6]N\?\>" nextgroup=mixParam contained skipwhite +syn match mixOpcode "ST[AX1-6JZ]\>" nextgroup=mixParam contained skipwhite +syn match mixOpcode "EN[TN][AX1-6]\>" nextgroup=mixParam contained skipwhite +syn match mixOpcode "INC[AX1-6]\>" nextgroup=mixParam contained skipwhite +syn match mixOpcode "DEC[AX1-6]\>" nextgroup=mixParam contained skipwhite +syn match mixOpcode "CMP[AX1-6]\>" nextgroup=mixParam contained skipwhite +syn match mixOpcode "J[AX1-6]N\?[NZP]\>" nextgroup=mixParam contained skipwhite + +" Switch back to being case sensitive +syn case match + +" Registers (only to used in comments now) +syn keyword mixRegister rA rX rI1 rI2 rI3 rI4 rI5 rI6 rJ contained + +" The default highlighting +hi def link mixRegister Special +hi def link mixLabel Define +hi def link mixComment Comment +hi def link mixEndComment Comment +hi def link mixDirective Keyword +hi def link mixOpcode Keyword + +hi def link mixSpecial Special +hi def link mixNumber Number +hi def link mixString String +hi def link mixAlfParam String +hi def link mixIdentifier Identifier + +let b:current_syntax = "mix" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 diff --git a/runtime/syntax/mma.vim b/runtime/syntax/mma.vim new file mode 100644 index 0000000000..c63beb1195 --- /dev/null +++ b/runtime/syntax/mma.vim @@ -0,0 +1,331 @@ +" Vim syntax file +" Language: Mathematica +" Maintainer: steve layland +" Last Change: 2012 Feb 03 by Thilo Six +" 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 + +let s:cpo_save = &cpo +set cpo&vim + +" 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" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/mmix.vim b/runtime/syntax/mmix.vim new file mode 100644 index 0000000000..79ca781402 --- /dev/null +++ b/runtime/syntax/mmix.vim @@ -0,0 +1,163 @@ +" Vim syntax file +" Language: MMIX +" Maintainer: Dirk Hüsken, +" Last Change: 2012 Jun 01 +" (Dominique Pelle added @Spell) +" Filenames: *.mms +" URL: http://homepages.uni-tuebingen.de/student/dirk.huesken/vim/syntax/mmix.vim + +" Limitations: Comments must start with either % or // +" (preferably %, 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=+"+ contains=@Spell +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 "%.*" contains=@Spell +syn match mmixComment "//.*" contains=@Spell +syn match mmixComment "^\*.*" contains=@Spell + + +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/runtime/syntax/mmp.vim b/runtime/syntax/mmp.vim new file mode 100644 index 0000000000..0117e77925 --- /dev/null +++ b/runtime/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/runtime/syntax/modconf.vim b/runtime/syntax/modconf.vim new file mode 100644 index 0000000000..54b6593b66 --- /dev/null +++ b/runtime/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/runtime/syntax/model.vim b/runtime/syntax/model.vim new file mode 100644 index 0000000000..5f3b7f8721 --- /dev/null +++ b/runtime/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/runtime/syntax/modsim3.vim b/runtime/syntax/modsim3.vim new file mode 100644 index 0000000000..04e9ab9ab6 --- /dev/null +++ b/runtime/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/runtime/syntax/modula2.vim b/runtime/syntax/modula2.vim new file mode 100644 index 0000000000..3018900e80 --- /dev/null +++ b/runtime/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/runtime/syntax/modula3.vim b/runtime/syntax/modula3.vim new file mode 100644 index 0000000000..d6f72afbca --- /dev/null +++ b/runtime/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/runtime/syntax/monk.vim b/runtime/syntax/monk.vim new file mode 100644 index 0000000000..afe2b56190 --- /dev/null +++ b/runtime/syntax/monk.vim @@ -0,0 +1,234 @@ +" Vim syntax file +" Language: Monk (See-Beyond Technologies) +" Maintainer: Mike Litherland +" Last Change: 2012 Feb 03 by Thilo Six + +" 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 + +let s:cpo_save = &cpo +set cpo&vim + +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" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/moo.vim b/runtime/syntax/moo.vim new file mode 100644 index 0000000000..10c5d3b4bc --- /dev/null +++ b/runtime/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/runtime/syntax/mp.vim b/runtime/syntax/mp.vim new file mode 100644 index 0000000000..c0fd60b3da --- /dev/null +++ b/runtime/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/runtime/syntax/mplayerconf.vim b/runtime/syntax/mplayerconf.vim new file mode 100644 index 0000000000..b348327f90 --- /dev/null +++ b/runtime/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/runtime/syntax/mrxvtrc.vim b/runtime/syntax/mrxvtrc.vim new file mode 100644 index 0000000000..2ef434d2b2 --- /dev/null +++ b/runtime/syntax/mrxvtrc.vim @@ -0,0 +1,282 @@ +" Description : Vim syntax file for mrxvtrc (for mrxvt-0.5.0 and up) +" Created : Wed 26 Apr 2006 01:20:53 AM CDT +" Modified : Thu 02 Feb 2012 08:37:45 PM EST +" Maintainer : GI , where a='gi1242+vim', b='gmail', c='com' + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +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" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/msidl.vim b/runtime/syntax/msidl.vim new file mode 100644 index 0000000000..79585bebc6 --- /dev/null +++ b/runtime/syntax/msidl.vim @@ -0,0 +1,97 @@ +" Vim syntax file +" Language: MS IDL (Microsoft dialect of Interface Description Language) +" Maintainer: Vadim Zeitlin +" Last Change: 2012 Feb 12 by Thilo Six + +" 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&vim + +" 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" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vi: set ts=8 sw=4: diff --git a/runtime/syntax/msmessages.vim b/runtime/syntax/msmessages.vim new file mode 100644 index 0000000000..60588571c9 --- /dev/null +++ b/runtime/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/runtime/syntax/mupad.vim b/runtime/syntax/mupad.vim new file mode 100644 index 0000000000..109f880ee1 --- /dev/null +++ b/runtime/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/runtime/syntax/mush.vim b/runtime/syntax/mush.vim new file mode 100644 index 0000000000..0645f33565 --- /dev/null +++ b/runtime/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/runtime/syntax/muttrc.vim b/runtime/syntax/muttrc.vim new file mode 100644 index 0000000000..abe9bfd76b --- /dev/null +++ b/runtime/syntax/muttrc.vim @@ -0,0 +1,796 @@ +" Vim syntax file +" Language: Mutt setup files +" Original: Preben 'Peppe' Guldberg +" Maintainer: Kyle Wheeler +" Last Change: 2 Feb 2012 + +" This file covers mutt version 1.5.21 (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 + +let s:cpo_save = &cpo +set cpo&vim + +" Set the keyword characters +if version < 600 + set isk=@,48-57,_,- +else + setlocal isk=@,48-57,_,- +endif + +" handling optional variables +if !exists("use_mutt_sidebar") + let use_mutt_sidebar=0 +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 contained "=\s*[^ #"'`]\+"lc=1 contains=muttrcEscape +syn region muttrcString contained keepend start=+"+ms=e skip=+\\"+ end=+"+ contains=muttrcEscape,muttrcCommand,muttrcAction,muttrcShellString +syn region muttrcString contained keepend start=+'+ms=e skip=+\\'+ end=+'+ contains=muttrcEscape,muttrcCommand,muttrcAction +syn match muttrcStringNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcString,muttrcStringNL + +syn region muttrcShellString matchgroup=muttrcEscape keepend start=+`+ skip=+\\`+ end=+`+ contains=muttrcVarStr,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcCommand + +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 skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXChars +syn region muttrcRXString contained skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcRXChars +syn region muttrcRXString contained skipwhite start=+[^ "'^]+ skip=+\\\s+ end=+\s+re=e-1 contains=muttrcRXChars +" For some reason, skip refuses to match backslashes here... +syn region muttrcRXString contained matchgroup=muttrcRXChars skipwhite start=+\^+ end=+[^\\]\s+re=e-1 contains=muttrcRXChars +syn region muttrcRXString contained matchgroup=muttrcRXChars skipwhite start=+\^+ end=+$\s+ contains=muttrcRXChars +syn region muttrcRXString2 contained skipwhite start=+'+ skip=+\'+ end=+'+ contains=muttrcRXChars +syn region muttrcRXString2 contained skipwhite start=+"+ skip=+\"+ end=+"+ contains=muttrcRXChars + +" these must be kept synchronized with muttrcRXString, but are intended for +" muttrcRXHooks +syn region muttrcRXHookString contained keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL +syn region muttrcRXHookString contained keepend skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL +syn region muttrcRXHookString contained keepend skipwhite start=+[^ "'^]+ skip=+\\\s+ end=+\s+re=e-1 contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL +syn region muttrcRXHookString contained keepend skipwhite start=+\^+ end=+[^\\]\s+re=e-1 contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL +syn region muttrcRXHookString contained keepend matchgroup=muttrcRXChars skipwhite start=+\^+ end=+$\s+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL +syn match muttrcRXHookStringNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcRXHookString,muttrcRXHookStringNL + +" these are exclusively for args lists (e.g. -rx pat pat pat ...) +syn region muttrcRXPat contained keepend skipwhite start=+'+ skip=+\\'+ end=+'\s*+ contains=muttrcRXString nextgroup=muttrcRXPat +syn region muttrcRXPat contained keepend skipwhite start=+"+ skip=+\\"+ end=+"\s*+ contains=muttrcRXString nextgroup=muttrcRXPat +syn match muttrcRXPat contained /[^-'"#!]\S\+/ skipwhite contains=muttrcRXChars nextgroup=muttrcRXPat +syn match muttrcRXDef contained "-rx\s\+" skipwhite nextgroup=muttrcRXPat + +syn match muttrcSpecial +\(['"]\)!\1+ + +syn match muttrcSetStrAssignment contained skipwhite /=\s*\%(\\\?\$\)\?[0-9A-Za-z_-]\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcVariable,muttrcEscapedVariable +syn region muttrcSetStrAssignment contained skipwhite keepend start=+=\s*"+hs=s+1 end=+"+ skip=+\\"+ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcString +syn region muttrcSetStrAssignment contained skipwhite keepend start=+=\s*'+hs=s+1 end=+'+ skip=+\\'+ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcString +syn match muttrcSetBoolAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcVariable,muttrcEscapedVariable +syn match muttrcSetBoolAssignment contained skipwhite /=\s*\%(yes\|no\)/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn match muttrcSetBoolAssignment contained skipwhite /=\s*"\%(yes\|no\)"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn match muttrcSetBoolAssignment contained skipwhite /=\s*'\%(yes\|no\)'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn match muttrcSetQuadAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcVariable,muttrcEscapedVariable +syn match muttrcSetQuadAssignment contained skipwhite /=\s*\%(ask-\)\?\%(yes\|no\)/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn match muttrcSetQuadAssignment contained skipwhite /=\s*"\%(ask-\)\?\%(yes\|no\)"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn match muttrcSetQuadAssignment contained skipwhite /=\s*'\%(ask-\)\?\%(yes\|no\)'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn match muttrcSetNumAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcVariable,muttrcEscapedVariable +syn match muttrcSetNumAssignment contained skipwhite /=\s*\d\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn match muttrcSetNumAssignment contained skipwhite /=\s*"\d\+"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn match muttrcSetNumAssignment contained skipwhite /=\s*'\d\+'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr + +" 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\|BackTab\|Delete\|Down\|End\|Enter\|Esc\|Home\|Insert\|Left\|PageDown\|PageUp\|Return\|Right\|Space\|Tab\|Up\)>" +syn match muttrcKeyName contained "" + +syn keyword muttrcVarBool skipwhite contained allow_8bit allow_ansi arrow_cursor ascii_chars askbcc askcc attach_split auto_tag autoedit beep beep_new nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained bounce_delivered braille_friendly check_new check_mbox_size nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained collapse_unread confirmappend confirmcreate crypt_autoencrypt nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained crypt_autopgp crypt_autosign crypt_autosmime crypt_replyencrypt nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained crypt_replysign crypt_replysignencrypted crypt_timestamp nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained crypt_use_gpgme crypt_use_pka delete_untag digest_collapse duplicate_threads nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained edit_hdrs edit_headers encode_from envelope_from fast_reply nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained fcc_clear followup_to force_name forw_decode nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained forw_decrypt forw_quote forward_decode forward_decrypt nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained forward_quote hdrs header help hidden_host hide_limited nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained hide_missing hide_thread_subject hide_top_limited nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained hide_top_missing honor_disposition ignore_linear_white_space ignore_list_reply_to imap_check_subscribed nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained imap_list_subscribed imap_passive imap_peek imap_servernoise nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained implicit_autoview include_onlyfirst keep_flagged nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained mailcap_sanitize maildir_header_cache_verify maildir_trash nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained mark_old markers menu_move_off menu_scroll message_cache_clean meta_key nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained metoo mh_purge mime_forward_decode narrow_tree pager_stop nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained pgp_auto_decode pgp_auto_traditional pgp_autoencrypt nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained pgp_autoinline pgp_autosign pgp_check_exit nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained pgp_create_traditional pgp_ignore_subkeys pgp_long_ids nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained pgp_replyencrypt pgp_replyinline pgp_replysign nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained pgp_replysignencrypted pgp_retainable_sigs pgp_show_unusable nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained pgp_strict_enc pgp_use_gpg_agent pipe_decode pipe_split nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained pop_auth_try_all pop_last print_decode print_split nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained prompt_after read_only reply_self resolve reverse_alias nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained reverse_name reverse_realname rfc2047_parameters save_address nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained save_empty save_name score sig_dashes sig_on_top nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained smart_wrap smime_ask_cert_label smime_decrypt_use_default_key nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained smime_is_default sort_re ssl_force_tls ssl_use_sslv2 nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained ssl_use_sslv3 ssl_use_tlsv1 ssl_usesystemcerts ssl_verify_dates ssl_verify_host status_on_top nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained strict_mime strict_threads suspend text_flowed thorough_search nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained thread_received tilde uncollapse_jump use_8bitmime nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained use_domain use_envelope_from use_from use_idn use_ipv6 nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained user_agent wait_key weed wrap_search write_bcc nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr + +syn keyword muttrcVarBool skipwhite contained noallow_8bit noallow_ansi noarrow_cursor noascii_chars noaskbcc nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained noaskcc noattach_split noauto_tag noautoedit nobeep nobeep_new nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nobounce_delivered nobraille_friendly nocheck_new nocollapse_unread nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained noconfirmappend noconfirmcreate nocrypt_autoencrypt nocrypt_autopgp nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nocrypt_autosign nocrypt_autosmime nocrypt_replyencrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nocrypt_replysign nocrypt_replysignencrypted nocrypt_timestamp nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nocrypt_use_gpgme nodelete_untag nodigest_collapse noduplicate_threads nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained noedit_hdrs noedit_headers noencode_from noenvelope_from nofast_reply nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nofcc_clear nofollowup_to noforce_name noforw_decode nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained noforw_decrypt noforw_quote noforward_decode noforward_decrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained noforward_quote nohdrs noheader nohelp nohidden_host nohide_limited nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nohide_missing nohide_thread_subject nohide_top_limited nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nohide_top_missing nohonor_disposition noignore_list_reply_to noimap_check_subscribed nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained noimap_list_subscribed noimap_passive noimap_peek noimap_servernoise nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained noimplicit_autoview noinclude_onlyfirst nokeep_flagged nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nomailcap_sanitize nomaildir_header_cache_verify nomaildir_trash nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nomark_old nomarkers nomenu_move_off nomenu_scroll nometa_key nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nometoo nomh_purge nomime_forward_decode nonarrow_tree nopager_stop nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nopgp_auto_decode nopgp_auto_traditional nopgp_autoencrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nopgp_autoinline nopgp_autosign nopgp_check_exit nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nopgp_create_traditional nopgp_ignore_subkeys nopgp_long_ids nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nopgp_replyencrypt nopgp_replyinline nopgp_replysign nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nopgp_replysignencrypted nopgp_retainable_sigs nopgp_show_unusable nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nopgp_strict_enc nopgp_use_gpg_agent nopipe_decode nopipe_split nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nopop_auth_try_all nopop_last noprint_decode noprint_split nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained noprompt_after noread_only noreply_self noresolve noreverse_alias nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained noreverse_name noreverse_realname norfc2047_parameters nosave_address nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nosave_empty nosave_name noscore nosig_dashes nosig_on_top nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nosmart_wrap nosmime_ask_cert_label nosmime_decrypt_use_default_key nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nosmime_is_default nosort_re nossl_force_tls nossl_use_sslv2 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nossl_use_sslv3 nossl_use_tlsv1 nossl_usesystemcerts nostatus_on_top nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nostrict_threads nosuspend notext_flowed nothorough_search nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nothread_received notilde nouncollapse_jump nouse_8bitmime nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nouse_domain nouse_envelope_from nouse_from nouse_idn nouse_ipv6 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained nouser_agent nowait_key noweed nowrap_search nowrite_bcc nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr + +syn keyword muttrcVarBool skipwhite contained invallow_8bit invallow_ansi invarrow_cursor invascii_chars invaskbcc nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invaskcc invattach_split invauto_tag invautoedit invbeep invbeep_new nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invbounce_delivered invbraille_friendly invcheck_new invcollapse_unread nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invconfirmappend invconfirmcreate invcrypt_autoencrypt invcrypt_autopgp nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invcrypt_autosign invcrypt_autosmime invcrypt_replyencrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invcrypt_replysign invcrypt_replysignencrypted invcrypt_timestamp nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invcrypt_use_gpgme invdelete_untag invdigest_collapse invduplicate_threads nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invedit_hdrs invedit_headers invencode_from invenvelope_from invfast_reply nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invfcc_clear invfollowup_to invforce_name invforw_decode nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invforw_decrypt invforw_quote invforward_decode invforward_decrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invforward_quote invhdrs invheader invhelp invhidden_host invhide_limited nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invhide_missing invhide_thread_subject invhide_top_limited nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invhide_top_missing invhonor_disposition invignore_list_reply_to invimap_check_subscribed nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invimap_list_subscribed invimap_passive invimap_peek invimap_servernoise nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invimplicit_autoview invinclude_onlyfirst invkeep_flagged nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invmailcap_sanitize invmaildir_header_cache_verify invmaildir_trash nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invmark_old invmarkers invmenu_move_off invmenu_scroll invmeta_key nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invmetoo invmh_purge invmime_forward_decode invnarrow_tree invpager_stop nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invpgp_auto_decode invpgp_auto_traditional invpgp_autoencrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invpgp_autoinline invpgp_autosign invpgp_check_exit nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invpgp_create_traditional invpgp_ignore_subkeys invpgp_long_ids nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invpgp_replyencrypt invpgp_replyinline invpgp_replysign nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invpgp_replysignencrypted invpgp_retainable_sigs invpgp_show_unusable nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invpgp_strict_enc invpgp_use_gpg_agent invpipe_decode invpipe_split nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invpop_auth_try_all invpop_last invprint_decode invprint_split nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invprompt_after invread_only invreply_self invresolve invreverse_alias nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invreverse_name invreverse_realname invrfc2047_parameters invsave_address nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invsave_empty invsave_name invscore invsig_dashes invsig_on_top nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invsmart_wrap invsmime_ask_cert_label invsmime_decrypt_use_default_key nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invsmime_is_default invsort_re invssl_force_tls invssl_use_sslv2 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invssl_use_sslv3 invssl_use_tlsv1 invssl_usesystemcerts invstatus_on_top nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invstrict_threads invsuspend invtext_flowed invthorough_search nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invthread_received invtilde invuncollapse_jump invuse_8bitmime nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invuse_domain invuse_envelope_from invuse_from invuse_idn invuse_ipv6 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarBool skipwhite contained invuser_agent invwait_key invweed invwrap_search invwrite_bcc nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +if use_mutt_sidebar == 1 + syn keyword muttrcVarBool skipwhite contained sidebar_visible sidebar_sort nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +endif + +syn keyword muttrcVarQuad skipwhite contained abort_nosubject abort_unmodified bounce copy nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarQuad skipwhite contained crypt_verify_sig delete fcc_attach forward_edit honor_followup_to nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarQuad skipwhite contained include mime_forward mime_forward_rest mime_fwd move nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarQuad skipwhite contained pgp_mime_auto pgp_verify_sig pop_delete pop_reconnect nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarQuad skipwhite contained postpone print quit recall reply_to ssl_starttls nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr + +syn keyword muttrcVarQuad skipwhite contained noabort_nosubject noabort_unmodified nobounce nocopy nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarQuad skipwhite contained nocrypt_verify_sig nodelete nofcc_attach noforward_edit nohonor_followup_to nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarQuad skipwhite contained noinclude nomime_forward nomime_forward_rest nomime_fwd nomove nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarQuad skipwhite contained nopgp_mime_auto nopgp_verify_sig nopop_delete nopop_reconnect nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarQuad skipwhite contained nopostpone noprint noquit norecall noreply_to nossl_starttls nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr + +syn keyword muttrcVarQuad skipwhite contained invabort_nosubject invabort_unmodified invbounce invcopy nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarQuad skipwhite contained invcrypt_verify_sig invdelete invfcc_attach invforward_edit invhonor_followup_to nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarQuad skipwhite contained invinclude invmime_forward invmime_forward_rest invmime_fwd invmove nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarQuad skipwhite contained invpgp_mime_auto invpgp_verify_sig invpop_delete invpop_reconnect nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarQuad skipwhite contained invpostpone invprint invquit invrecall invreply_to invssl_starttls nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr + +syn keyword muttrcVarNum skipwhite contained connect_timeout history imap_keepalive imap_pipeline_depth mail_check nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarNum skipwhite contained menu_context net_inc pager_context pager_index_lines pgp_timeout nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarNum skipwhite contained pop_checkinterval read_inc save_history score_threshold_delete nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarNum skipwhite contained score_threshold_flag score_threshold_read search_context sendmail_wait sleep_time nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarNum skipwhite contained smime_timeout ssl_min_dh_prime_bits timeout time_inc wrap wrapmargin nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarNum skipwhite contained write_inc nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +if use_mutt_sidebar == 1 + syn keyword muttrcVarNum skipwhite contained sidebar_width nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +endif + +syn match muttrcFormatErrors contained /%./ + +syn match muttrcStrftimeEscapes contained /%[AaBbCcDdeFGgHhIjklMmnpRrSsTtUuVvWwXxYyZz+%]/ +syn match muttrcStrftimeEscapes contained /%E[cCxXyY]/ +syn match muttrcStrftimeEscapes contained /%O[BdeHImMSuUVwWy]/ + +syn region muttrcIndexFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcIndexFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcQueryFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcQueryFormatEscapes,muttrcQueryFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcAliasFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAliasFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcAliasFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAliasFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcAttachFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcAttachFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcComposeFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcComposeFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcComposeFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcComposeFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcFolderFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcFolderFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcMixFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcMixFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcPGPFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPFormatEscapes,muttrcPGPFormatConditionals,muttrcFormatErrors,muttrcPGPTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcPGPFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPFormatEscapes,muttrcPGPFormatConditionals,muttrcFormatErrors,muttrcPGPTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcPGPCmdFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcPGPCmdFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcStatusFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcStatusFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcPGPGetKeysFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPGetKeysFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcPGPGetKeysFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPGetKeysFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcSmimeFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcSmimeFormatEscapes,muttrcSmimeFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcSmimeFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcSmimeFormatEscapes,muttrcSmimeFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcStrftimeFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcStrftimeEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn region muttrcStrftimeFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcStrftimeEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr + +" The following info was pulled from hdr_format_str in hdrline.c +syn match muttrcIndexFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[aAbBcCdDeEfFHilLmMnNOPsStTuvXyYZ%]/ +syn match muttrcIndexFormatEscapes contained /%[>|*]./ +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]\+\)\?\)\?[:_]\?[CDdfFglNstu%]/ +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 skipwhite attribution index_format message_format pager_format nextgroup=muttrcVarEqualsIdxFmt +syn match muttrcVarEqualsIdxFmt contained skipwhite "=" nextgroup=muttrcIndexFormatStr +syn keyword muttrcVarStr contained skipwhite alias_format nextgroup=muttrcVarEqualsAliasFmt +syn match muttrcVarEqualsAliasFmt contained skipwhite "=" nextgroup=muttrcAliasFormatStr +syn keyword muttrcVarStr contained skipwhite attach_format nextgroup=muttrcVarEqualsAttachFmt +syn match muttrcVarEqualsAttachFmt contained skipwhite "=" nextgroup=muttrcAttachFormatStr +syn keyword muttrcVarStr contained skipwhite compose_format nextgroup=muttrcVarEqualsComposeFmt +syn match muttrcVarEqualsComposeFmt contained skipwhite "=" nextgroup=muttrcComposeFormatStr +syn keyword muttrcVarStr contained skipwhite folder_format nextgroup=muttrcVarEqualsFolderFmt +syn match muttrcVarEqualsFolderFmt contained skipwhite "=" nextgroup=muttrcFolderFormatStr +syn keyword muttrcVarStr contained skipwhite mix_entry_format nextgroup=muttrcVarEqualsMixFmt +syn match muttrcVarEqualsMixFmt contained skipwhite "=" nextgroup=muttrcMixFormatStr +syn keyword muttrcVarStr contained skipwhite pgp_entry_format nextgroup=muttrcVarEqualsPGPFmt +syn match muttrcVarEqualsPGPFmt contained skipwhite "=" nextgroup=muttrcPGPFormatStr +syn keyword muttrcVarStr contained skipwhite query_format nextgroup=muttrcVarEqualsQueryFmt +syn match muttrcVarEqualsQueryFmt contained skipwhite "=" nextgroup=muttrcQueryFormatStr +syn keyword muttrcVarStr contained skipwhite 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 skipwhite "=" nextgroup=muttrcPGPCmdFormatStr +syn keyword muttrcVarStr contained skipwhite status_format nextgroup=muttrcVarEqualsStatusFmt +syn match muttrcVarEqualsStatusFmt contained skipwhite "=" nextgroup=muttrcStatusFormatStr +syn keyword muttrcVarStr contained skipwhite pgp_getkeys_command nextgroup=muttrcVarEqualsPGPGetKeysFmt +syn match muttrcVarEqualsPGPGetKeysFmt contained skipwhite "=" nextgroup=muttrcPGPGetKeysFormatStr +syn keyword muttrcVarStr contained skipwhite 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 skipwhite "=" nextgroup=muttrcSmimeFormatStr +syn keyword muttrcVarStr contained skipwhite date_format nextgroup=muttrcVarEqualsStrftimeFmt +syn match muttrcVarEqualsStrftimeFmt contained skipwhite "=" nextgroup=muttrcStrftimeFormatStr + +syn match muttrcVPrefix contained /[?&]/ nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr + +syn match muttrcVarStr contained skipwhite 'my_[a-zA-Z0-9_]\+' nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite alias_file assumed_charset attach_charset attach_sep nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite certificate_file charset config_charset content_type nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite default_hook display_filter dotlock_program dsn_notify nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite dsn_return editor entropy_file envelope_from_address escape folder nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite forw_format forward_format from gecos_mask hdr_format nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite header_cache header_cache_compress header_cache_pagesize nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite history_file hostname imap_authenticators nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite imap_delim_chars imap_headers imap_idle imap_login imap_pass nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite imap_user indent_str indent_string ispell locale mailcap_path nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite mask mbox mbox_type message_cachedir mh_seq_flagged mh_seq_replied nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite mh_seq_unseen mixmaster msg_format pager nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite pgp_good_sign nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite pgp_mime_signature_filename nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite pgp_mime_signature_description pgp_sign_as nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite pgp_sort_keys nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite pipe_sep pop_authenticators pop_host pop_pass pop_user post_indent_str nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite post_indent_string postponed preconnect print_cmd print_command nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite query_command quote_regexp realname record reply_regexp send_charset nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite sendmail shell signature simple_search smileys smime_ca_location nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite smime_certificates smime_default_key nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite smime_encrypt_with nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite smime_keys smime_sign_as nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite smtp_url smtp_authenticators smtp_pass sort sort_alias sort_aux nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite sort_browser spam_separator spoolfile ssl_ca_certificates_file ssl_client_cert nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcVarStr contained skipwhite status_chars tmpdir to_chars tunnel visual nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +if use_mutt_sidebar == 1 + syn keyword muttrcVarStr skipwhite contained sidebar_delim nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +endif + +" Present in 1.4.2.1 (pgp_create_traditional was a bool then) +syn keyword muttrcVarBool contained skipwhite imap_force_ssl noimap_force_ssl invimap_force_ssl nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +"syn keyword muttrcVarQuad contained pgp_create_traditional nopgp_create_traditional invpgp_create_traditional +syn keyword muttrcVarStr contained skipwhite alternates nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr + +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 muttrcHooks contained skipwhite 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 muttrcCommand auto_view alternative_order 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 ungroup +syn keyword muttrcCommand unalternative_order +syn keyword muttrcCommand skipwhite charset-hook nextgroup=muttrcRXString +syn keyword muttrcCommand skipwhite unhook nextgroup=muttrcHooks + +syn keyword muttrcCommand skipwhite spam nextgroup=muttrcSpamPattern +syn region muttrcSpamPattern contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPattern nextgroup=muttrcString,muttrcStringNL +syn region muttrcSpamPattern contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPattern nextgroup=muttrcString,muttrcStringNL + +syn keyword muttrcCommand skipwhite nospam nextgroup=muttrcNoSpamPattern +syn region muttrcNoSpamPattern contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPattern +syn region muttrcNoSpamPattern contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPattern + +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 muttrcAsterisk contained * +syn keyword muttrcListsKeyword lists skipwhite nextgroup=muttrcGroupDef,muttrcComment +syn keyword muttrcListsKeyword unlists skipwhite nextgroup=muttrcAsterisk,muttrcComment + +syn keyword muttrcSubscribeKeyword subscribe nextgroup=muttrcGroupDef,muttrcComment +syn keyword muttrcSubscribeKeyword unsubscribe nextgroup=muttrcAsterisk,muttrcComment + +syn keyword muttrcAlternateKeyword contained alternates unalternates +syn region muttrcAlternatesLine keepend start=+^\s*\%(un\)\?alternates\s+ skip=+\\$+ end=+$+ contains=muttrcAlternateKeyword,muttrcGroupDef,muttrcRXPat,muttrcUnHighlightSpace,muttrcComment + +" muttrcVariable includes a prefix because partial strings are considered +" valid. +syn match muttrcVariable 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\|break\|undelete\)-thread\>" +syn match muttrcFunction contained "\" +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 "\" +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\)\>" +if use_mutt_sidebar == 1 + syn match muttrcFunction contained "\]\{-}>" contains=muttrcBadAction,muttrcFunction,muttrcKeyName + +syn keyword muttrcCommand set skipwhite nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcCommand unset skipwhite nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcCommand reset skipwhite nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr +syn keyword muttrcCommand toggle skipwhite nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr + +" First, functions that take regular expressions: +syn match muttrcRXHookNot contained /!\s*/ skipwhite nextgroup=muttrcRXHookString,muttrcRXHookStringNL +syn match muttrcRXHooks /\<\%(account\|folder\)-hook\>/ skipwhite nextgroup=muttrcRXHookNot,muttrcRXHookString,muttrcRXHookStringNL + +" Now, functions that take patterns +syn match muttrcPatHookNot contained /!\s*/ skipwhite nextgroup=muttrcPattern +syn match muttrcPatHooks /\<\%(mbox\|crypt\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcPattern +syn match muttrcPatHooks /\<\%(message\|reply\|send\|send2\|save\|\|fcc\%(-save\)\?\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcOptPattern + +syn match muttrcBindFunction contained /\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 keyword muttrcCommand skipwhite bind 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=+'\|\%(\%(\\\\\)\@]\+>/ 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 keyword muttrcCommand skipwhite alias 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 keyword muttrcCommand skipwhite unalias nextgroup=muttrcUnAliasKey,muttrcUnAliasNL + +syn match muttrcSimplePat contained "!\?\^\?[~][ADEFgGklNOpPQRSTuUvV=$]" +syn match muttrcSimplePat contained "!\?\^\?[~][mnXz]\s*\%([<>-][0-9]\+[kM]\?\|[0-9]\+[kM]\?[-]\%([0-9]\+[kM]\?\)\?\)" +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 "!\?\^\?[=][bcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatString +syn region muttrcSimplePat contained keepend start=+!\?\^\?[~](+ end=+)+ contains=muttrcSimplePat +"syn match muttrcSimplePat contained /'[^~=%][^']*/ contains=muttrcRXString +syn region muttrcSimplePatString contained keepend start=+"+ end=+"+ skip=+\\"+ +syn region muttrcSimplePatString contained keepend start=+'+ end=+'+ skip=+\\'+ +syn region muttrcSimplePatString contained keepend start=+[^ "']+ skip=+\\ + end=+\s+re=e-1 +syn region muttrcSimplePatRXContainer contained keepend start=+"+ end=+"+ skip=+\\"+ contains=muttrcRXString +syn region muttrcSimplePatRXContainer contained keepend start=+'+ end=+'+ skip=+\\'+ contains=muttrcRXString +syn region muttrcSimplePatRXContainer contained keepend start=+[^ "']+ skip=+\\ + end=+\s+re=e-1 contains=muttrcRXString +syn match muttrcSimplePatMetas contained /[(|)]/ + +syn match muttrcOptSimplePat contained skipwhite /[~=%!(^].*/ contains=muttrcSimplePat,muttrcSimplePatMetas +syn match muttrcOptSimplePat contained skipwhite /[^~=%!(^].*/ contains=muttrcRXString +syn region muttrcOptPattern contained matchgroup=Type keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcOptSimplePat,muttrcUnHighlightSpace nextgroup=muttrcString,muttrcStringNL +syn region muttrcOptPattern contained matchgroup=Type keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcOptSimplePat,muttrcUnHighlightSpace nextgroup=muttrcString,muttrcStringNL +syn region muttrcOptPattern contained keepend skipwhite start=+[~](+ end=+)+ skip=+\\)+ contains=muttrcSimplePat nextgroup=muttrcString,muttrcStringNL +syn match muttrcOptPattern contained skipwhite /[~][A-Za-z]/ contains=muttrcSimplePat nextgroup=muttrcString,muttrcStringNL +syn match muttrcOptPattern contained skipwhite /[.]/ nextgroup=muttrcString,muttrcStringNL +" Keep muttrcPattern and muttrcOptPattern synchronized +syn region muttrcPattern contained matchgroup=Type keepend skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas +syn region muttrcPattern contained matchgroup=Type keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas +syn region muttrcPattern contained keepend skipwhite start=+[~](+ end=+)+ skip=+\\)+ contains=muttrcSimplePat +syn match muttrcPattern contained skipwhite /[~][A-Za-z]/ contains=muttrcSimplePat +syn match muttrcPattern contained skipwhite /[.]/ +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 "\" +if use_mutt_sidebar == 1 + syn keyword muttrcColorField contained sidebar_new +endif +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,3}\>" +" 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\|header\)\@!/ 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*\/ contains=muttrcUnHighlightSpace nextgroup=muttrcColorFGI,muttrcColorFGNLI +syn match muttrcColorNLI contained skipnl "\s*\\$" nextgroup=muttrcColorContextI,muttrcColorNLI +syn match muttrcColorKeywordI contained skipwhite /\/ nextgroup=muttrcColorContextI,muttrcColorNLI +syn region muttrcColorLine keepend skipwhite start=/\/ skip=+\\$+ end=+$+ contains=muttrcColorKeywordI,muttrcComment,muttrcUnHighlightSpace +" Now for the structure of the color header line +syn match muttrcRXPatternNL contained skipnl "\s*\\$" nextgroup=muttrcRXString,muttrcRXPatternNL +syn match muttrcColorBGH contained /\s*[$]\?\w\+\s*/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcRXString,muttrcRXPatternNL +syn match muttrcColorBGNLH contained skipnl "\s*\\$" nextgroup=muttrcColorBGH,muttrcColorBGNLH +syn match muttrcColorFGH contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBGH,muttrcColorBGNLH +syn match muttrcColorFGNLH contained skipnl "\s*\\$" nextgroup=muttrcColorFGH,muttrcColorFGNLH +syn match muttrcColorContextH contained /\s*\/ contains=muttrcUnHighlightSpace nextgroup=muttrcColorFGH,muttrcColorFGNLH +syn match muttrcColorNLH contained skipnl "\s*\\$" nextgroup=muttrcColorContextH,muttrcColorNLH +syn match muttrcColorKeywordH contained skipwhite /\/ nextgroup=muttrcColorContextH,muttrcColorNLH +syn region muttrcColorLine keepend skipwhite start=/\/ skip=+\\$+ end=+$+ contains=muttrcColorKeywordH,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 muttrcSetNumAssignment Number + HiLink muttrcSetBoolAssignment Boolean + HiLink muttrcSetQuadAssignment Boolean + HiLink muttrcSetStrAssignment String + HiLink muttrcEmail Special + HiLink muttrcVariableInner Special + HiLink muttrcEscapedVariable String + 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 muttrcMacroDescr String + 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 muttrcColorContextH Identifier + HiLink muttrcColorKeyword muttrcCommand + HiLink muttrcColorKeywordI muttrcColorKeyword + HiLink muttrcColorKeywordH muttrcColorKeyword + HiLink muttrcColorField Identifier + HiLink muttrcColor Type + HiLink muttrcColorFG Error + HiLink muttrcColorFGI Error + HiLink muttrcColorFGH Error + HiLink muttrcColorBG Error + HiLink muttrcColorBGI Error + HiLink muttrcColorBGH Error + HiLink muttrcMonoAttrib muttrcColor + HiLink muttrcMono muttrcCommand + HiLink muttrcSimplePat Identifier + HiLink muttrcSimplePatString Macro + HiLink muttrcSimplePatMetas Special + HiLink muttrcPattern 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 muttrcStrftimeFormatStr muttrcString + 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 + HiLink muttrcStringNL SpecialChar + + delcommand HiLink +endif + +let b:current_syntax = "muttrc" + +let &cpo = s:cpo_save +unlet s:cpo_save +"EOF vim: ts=8 noet tw=100 sw=8 sts=0 ft=vim diff --git a/runtime/syntax/mysql.vim b/runtime/syntax/mysql.vim new file mode 100644 index 0000000000..c01ecc192b --- /dev/null +++ b/runtime/syntax/mysql.vim @@ -0,0 +1,297 @@ +" Vim syntax file +" Language: mysql +" Maintainer: Kenneth J. Pronovici +" Last Change: $LastChangedDate: 2010-04-22 09:48:02 -0500 (Thu, 22 Apr 2010) $ +" 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 keywords 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/runtime/syntax/named.vim b/runtime/syntax/named.vim new file mode 100644 index 0000000000..faec5f68e5 --- /dev/null +++ b/runtime/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/runtime/syntax/nanorc.vim b/runtime/syntax/nanorc.vim new file mode 100644 index 0000000000..2ae4961fdb --- /dev/null +++ b/runtime/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/runtime/syntax/nasm.vim b/runtime/syntax/nasm.vim new file mode 100644 index 0000000000..a6ed056650 --- /dev/null +++ b/runtime/syntax/nasm.vim @@ -0,0 +1,527 @@ +" Vim syntax file +" Language: NASM - The Netwide Assembler (v0.98) +" Maintainer: Andriy Sokolov +" Original Author: Manuel M.H. Stol +" Former Maintainer: Manuel M.H. Stol +" Last Change: 2012 Feb 7 +" NASM Home: http://www.nasm.us/ + + + +" 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 +" Todo: allow STRUC/ISTRUC to be used inside preprocessor conditional block +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\|use\)\>"hs=e-3 +syn match nasmPreProc "^\s*%line\>"hs=e-4 +syn match nasmPreProc "^\s*%\(clear\|error\|fatal\)\>"hs=e-5 +syn match nasmPreProc "^\s*%\(endrep\|strlen\|substr\)\>"hs=e-6 +syn match nasmPreProc "^\s*%\(exitrep\|warning\)\>"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 nasmDefine "^\s*%unmacro\>"hs=e-7 +syn match nasmInclude "^\s*%include\>"hs=e-7 +" Todo: Treat the line tail after %fatal, %error, %warning as text + +" 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 nasmGen64Register "\" +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 CMPSQ +syn keyword nasmStdInstruction CMPXCHG CMPXCHG8B CPUID CWD[E] CQO +syn keyword nasmStdInstruction DAA DAS DEC DIV ENTER +syn keyword nasmStdInstruction IDIV IMUL INC INT[O] IRET[D] IRETW IRETQ +syn keyword nasmStdInstruction JCXZ JECXZ JMP +syn keyword nasmStdInstruction LAHF LDS LEA LEAVE LES LFS LGS LODSB LODSD LODSQ +syn keyword nasmStdInstruction LODSW LOOP[E] LOOPNE LOOPNZ LOOPZ LSS +syn keyword nasmStdInstruction MOVSB MOVSD MOVSW MOVSX MOVSQ MOVZX MUL NEG NOP NOT +syn keyword nasmStdInstruction OR POPA[D] POPAW POPF[D] POPFW POPFQ +syn keyword nasmStdInstruction PUSH[AD] PUSHAW PUSHF[D] PUSHFW PUSHFQ +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 STOSQ SUB +syn keyword nasmStdInstruction TEST XADD XCHG XLATB XOR +syn keyword nasmStdInstruction LFENCE MFENCE SFENCE + + +" 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/runtime/syntax/nastran.vim b/runtime/syntax/nastran.vim new file mode 100644 index 0000000000..f7927693fa --- /dev/null +++ b/runtime/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/runtime/syntax/natural.vim b/runtime/syntax/natural.vim new file mode 100644 index 0000000000..4fbc916be2 --- /dev/null +++ b/runtime/syntax/natural.vim @@ -0,0 +1,215 @@ +" Vim syntax file +" +" Language: NATURAL +" Version: 2.1.0.5 +" Maintainer: Marko von Oppen +" Last Changed: 2012-02-05 18:50:43 +" 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 + +let s:cpo_save = &cpo +set cpo&vim + +" 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" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim:set ts=8 sw=8 noet ft=vim list: diff --git a/runtime/syntax/ncf.vim b/runtime/syntax/ncf.vim new file mode 100644 index 0000000000..2019c03723 --- /dev/null +++ b/runtime/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/runtime/syntax/netrc.vim b/runtime/syntax/netrc.vim new file mode 100644 index 0000000000..9f15d16637 --- /dev/null +++ b/runtime/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 netrwLex "\(\S\+ \)*\S\+\.\%(l\|lex\)\>" contains=netrwTreeBar,@NoSpell + syn match netrwYacc "\(\S\+ \)*\S\+\.y\>" contains=netrwTreeBar,@NoSpell + syn match netrwData "\(\S\+ \)*\S\+\.dat\>" contains=netrwTreeBar,@NoSpell + syn match netrwDoc "\(\S\+ \)*\S\+\.\%(doc\|txt\|pdf\|ps\)" contains=netrwTreeBar,@NoSpell + syn match netrwHdr "\(\S\+ \)*\S\+\.\%(h\|hpp\)\>" 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 "\<\(ANmenu\|ANtags\)\>" contains=netrwTreeBar,@NoSpell + syn match netrwTags "\" 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 netrwQHTopic Number + 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 TabLineSel + + " 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 netrwHdr netrwPlain + hi default link netrwLex netrwPlain + 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 + hi default link netrwYacc netrwPlain +endif + +" Current Syntax: {{{1 +let b:current_syntax = "netrwlist" +" --------------------------------------------------------------------- +" vim: ts=8 fdm=marker diff --git a/runtime/syntax/ninja.vim b/runtime/syntax/ninja.vim new file mode 100644 index 0000000000..f34588f60c --- /dev/null +++ b/runtime/syntax/ninja.vim @@ -0,0 +1,83 @@ +" ninja build file syntax. +" Language: ninja build file as described at +" http://martine.github.com/ninja/manual.html +" Version: 1.4 +" Last Change: 2014/05/13 +" Maintainer: Nicolas Weber +" Version 1.4 of this script is in the upstream vim repository and will be +" included in the next vim release. If you change this, please send your change +" upstream. + +" ninja lexer and parser are at +" https://github.com/martine/ninja/blob/master/src/lexer.in.cc +" https://github.com/martine/ninja/blob/master/src/manifest_parser.cc + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn case match + +syn match ninjaComment /#.*/ contains=@Spell + +" Toplevel statements are the ones listed here and +" toplevel variable assignments (ident '=' value). +" lexer.in.cc, ReadToken() and manifest_parser.cc, Parse() +syn match ninjaKeyword "^build\>" +syn match ninjaKeyword "^rule\>" +syn match ninjaKeyword "^pool\>" +syn match ninjaKeyword "^default\>" +syn match ninjaKeyword "^include\>" +syn match ninjaKeyword "^subninja\>" + +" Both 'build' and 'rule' begin a variable scope that ends +" on the first line without indent. 'rule' allows only a +" limited set of magic variables, 'build' allows general +" let assignments. +" manifest_parser.cc, ParseRule() +syn region ninjaRule start="^rule" end="^\ze\S" contains=ALL transparent +syn keyword ninjaRuleCommand contained command deps depfile description generator + \ pool restat rspfile rspfile_content + +syn region ninjaPool start="^pool" end="^\ze\S" contains=ALL transparent +syn keyword ninjaPoolCommand contained depth + +" Strings are parsed as follows: +" lexer.in.cc, ReadEvalString() +" simple_varname = [a-zA-Z0-9_-]+; +" varname = [a-zA-Z0-9_.-]+; +" $$ -> $ +" $\n -> line continuation +" '$ ' -> escaped space +" $simple_varname -> variable +" ${varname} -> variable + +syn match ninjaDollar "\$\$" +syn match ninjaWrapLineOperator "\$$" +syn match ninjaSimpleVar "\$[a-zA-Z0-9_-]\+" +syn match ninjaVar "\${[a-zA-Z0-9_.-]\+}" + +" operators are: +" variable assignment = +" rule definition : +" implicit dependency | +" order-only dependency || +syn match ninjaOperator "\(=\|:\||\|||\)\ze\s" + +hi def link ninjaComment Comment +hi def link ninjaKeyword Keyword +hi def link ninjaRuleCommand Statement +hi def link ninjaPoolCommand Statement +hi def link ninjaDollar ninjaOperator +hi def link ninjaWrapLineOperator ninjaOperator +hi def link ninjaOperator Operator +hi def link ninjaSimpleVar ninjaVar +hi def link ninjaVar Identifier + +let b:current_syntax = "ninja" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/nosyntax.vim b/runtime/syntax/nosyntax.vim new file mode 100644 index 0000000000..0ab3412373 --- /dev/null +++ b/runtime/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/runtime/syntax/nqc.vim b/runtime/syntax/nqc.vim new file mode 100644 index 0000000000..0a3cd6bc73 --- /dev/null +++ b/runtime/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/runtime/syntax/nroff.vim b/runtime/syntax/nroff.vim new file mode 100644 index 0000000000..280ba9e7d9 --- /dev/null +++ b/runtime/syntax/nroff.vim @@ -0,0 +1,264 @@ +" VIM syntax file +" Language: nroff/groff +" Maintainer: Pedro Alejandro López-Valencia +" URL: http://vorbote.wordpress.com/ +" Last Change: 2012 Feb 2 +" +" {{{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 + +let s:cpo_save = &cpo +set cpo&vim + +" +" {{{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" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim600: set fdm=marker fdl=2: diff --git a/runtime/syntax/nsis.vim b/runtime/syntax/nsis.vim new file mode 100644 index 0000000000..d6d803714e --- /dev/null +++ b/runtime/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/runtime/syntax/obj.vim b/runtime/syntax/obj.vim new file mode 100644 index 0000000000..66cd6c2bde --- /dev/null +++ b/runtime/syntax/obj.vim @@ -0,0 +1,96 @@ +" Vim syntax file +" Language: 3D wavefront's obj file +" Maintainer: Vincent Berthoux +" File Types: .obj (used in 3D) +" Last Change: 2010 May 18 +" +" 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 objError "^\a\+" + +syn match objKeywords "^cstype\s" +syn match objKeywords "^ctech\s" +syn match objKeywords "^stech\s" +syn match objKeywords "^deg\s" +syn match objKeywords "^curv\(2\?\)\s" +syn match objKeywords "^parm\s" +syn match objKeywords "^surf\s" +syn match objKeywords "^end\s" +syn match objKeywords "^bzp\s" +syn match objKeywords "^bsp\s" +syn match objKeywords "^res\s" +syn match objKeywords "^cdc\s" +syn match objKeywords "^con\s" + +syn match objKeywords "^shadow_obj\s" +syn match objKeywords "^trace_obj\s" +syn match objKeywords "^usemap\s" +syn match objKeywords "^lod\s" +syn match objKeywords "^maplib\s" +syn match objKeywords "^d_interp\s" +syn match objKeywords "^c_interp\s" +syn match objKeywords "^bevel\s" +syn match objKeywords "^mg\s" +syn match objKeywords "^s\s" +syn match objKeywords "^con\s" +syn match objKeywords "^trim\s" +syn match objKeywords "^hole\s" +syn match objKeywords "^scrv\s" +syn match objKeywords "^sp\s" +syn match objKeywords "^step\s" +syn match objKeywords "^bmat\s" +syn match objKeywords "^csh\s" +syn match objKeywords "^call\s" + +syn match objComment "^#.*" +syn match objVertex "^v\s" +syn match objFace "^f\s" +syn match objVertice "^vt\s" +syn match objNormale "^vn\s" +syn match objGroup "^g\s.*" +syn match objMaterial "^usemtl\s.*" +syn match objInclude "^mtllib\s.*" + +syn match objFloat "-\?\d\+\.\d\+\(e\(+\|-\)\d\+\)\?" +syn match objInt "\d\+" +syn match objIndex "\d\+\/\d*\/\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_cabal_syn_inits") + if version < 508 + let did_cabal_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink objError Error + HiLink objComment Comment + HiLink objInclude PreProc + HiLink objFloat Float + HiLink objInt Number + HiLink objGroup Structure + HiLink objIndex Constant + HiLink objMaterial Label + + HiLink objVertex Keyword + HiLink objNormale Keyword + HiLink objVertice Keyword + HiLink objFace Keyword + HiLink objKeywords Keyword + + + delcommand HiLink +endif + +let b:current_syntax = "obj" + +" vim: ts=8 diff --git a/runtime/syntax/objc.vim b/runtime/syntax/objc.vim new file mode 100644 index 0000000000..1f61e50b8d --- /dev/null +++ b/runtime/syntax/objc.vim @@ -0,0 +1,437 @@ +" Vim syntax file +" Language: Objective-C +" Maintainer: Kazunobu Kuriyama +" Last Change: 2013 Jun 13 +" Remark: Modern Objective-C Edition + +""" Preparation for loading ObjC stuff +if exists("b:current_syntax") + finish +endif +if &filetype != 'objcpp' + syn clear + runtime! syntax/c.vim +endif +let s:cpo_save = &cpo +set cpo&vim + +""" ObjC proper stuff follows... + +syn keyword objcPreProcMacro __OBJC__ __OBJC2__ __clang__ + +" Defined Types +syn keyword objcPrincipalType id Class SEL IMP BOOL instancetype +syn keyword objcUsefulTerm nil Nil NO YES + +" Preprocessor Directives +syn region objcImported display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match objcImported display contained "<[^>]*>" +syn match objcImport display "^\s*\(%:\|#\)\s*import\>\s*["<]" contains=objcImported + +" ObjC Compiler Directives +syn match objcObjDef display /@interface\>\|@implementation\>\|@end\>\|@class\>/ +syn match objcProtocol display /@protocol\>\|@optional\>\|@required\>/ +syn match objcProperty display /@property\>\|@synthesize\>\|@dynamic\>/ +syn match objcIvarScope display /@private\>\|@protected\>\|@public\>/ +syn match objcInternalRep display /@selector\>\|@encode\>/ +syn match objcException display /@try\>\|@throw\>\|@catch\|@finally\>/ +syn match objcThread display /@synchronized\>/ +syn match objcPool display /@autoreleasepool\>/ +syn match objcModuleImport display /@import\>/ + +" ObjC Constant Strings +syn match objcSpecial display contained "%@" +syn region objcString start=+\(@"\|"\)+ skip=+\\\\\|\\"+ end=+"+ contains=cFormat,cSpecial,objcSpecial + +" ObjC Hidden Arguments +syn keyword objcHiddenArgument self _cmd super + +" ObjC Type Qualifiers for Blocks +syn keyword objcBlocksQualifier __block +" ObjC Type Qualifiers for Object Lifetime +syn keyword objcObjectLifetimeQualifier __strong __weak __unsafe_unretained __autoreleasing +" ObjC Type Qualifiers for Toll-Free Bridge +syn keyword objcTollFreeBridgeQualifier __bridge __bridge_retained __bridge_transfer + +" ObjC Type Qualifiers for Remote Messaging +syn match objcRemoteMessagingQualifier display contained /\((\s*oneway\s\+\|(\s*in\s\+\|(\s*out\s\+\|(\s*inout\s\+\|(\s*bycopy\s\+\(in\(out\)\?\|out\)\?\|(\s*byref\s\+\(in\(out\)\?\|out\)\?\)/hs=s+1 + +" shorthand +syn cluster objcTypeQualifier contains=objcBlocksQualifier,objcObjectLifetimeQualifier,objcTollFreeBridgeQualifier,objcRemoteMessagingQualifier + +" ObjC Fast Enumeration +syn match objcFastEnumKeyword display /\sin\(\s\|$\)/ + +" ObjC Literal Syntax +syn match objcLiteralSyntaxNumber display /@\(YES\>\|NO\>\|\d\|-\|+\)/ contains=cNumber,cFloat,cOctal +syn match objcLiteralSyntaxSpecialChar display /@'/ contains=cSpecialCharacter +syn match objcLiteralSyntaxChar display /@'[^\\]'/ +syn match objcLiteralSyntaxOp display /@\((\|\[\|{\)/me=e-1,he=e-1 + +" ObjC Declared Property Attributes +syn match objDeclPropAccessorNameAssign display /\s*=\s*/ contained +syn region objcDeclPropAccessorName display start=/\(getter\|setter\)/ end=/\h\w*/ contains=objDeclPropAccessorNameAssign +syn keyword objcDeclPropAccessorType readonly readwrite contained +syn keyword objcDeclPropAssignSemantics assign retain copy contained +syn keyword objcDeclPropAtomicity nonatomic contained +syn keyword objcDeclPropARC strong weak contained +syn region objcDeclProp display transparent keepend start=/@property\s*(/ end=/)/ contains=objcProperty,objcDeclPropAccessorName,objcDeclPropAccessorType,objcDeclPropAssignSemantics,objcDeclPropAtomicity,objcDeclPropARC + +" To distinguish colons in methods and dictionaries from those in C's labels. +syn match objcColon display /^\s*\h\w*\s*\:\(\s\|.\)/me=e-1,he=e-1 + +" To distinguish a protocol list from system header files +syn match objcProtocolList display /<\h\w*\(\s*,\s*\h\w*\)*>/ contains=objcPrincipalType,cType,Type + +" shorthand +syn cluster objcCEntities contains=cType,cStructure,cStorageClass,cString,cCharacter,cSpecialCharacter,cNumbers,cConstant,cOperator,cComment,cCommentL,cStatement,cLabel,cConditional,cRepeat +syn cluster objcObjCEntities contains=objcHiddenArgument,objcPrincipalType,objcString,objcUsefulTerm,objcProtocol,objcInternalRep,objcException,objcThread,objcPool,objcModuleImport,@objcTypeQualifier,objcLiteralSyntaxNumber,objcLiteralSyntaxOp,objcLiteralSyntaxChar,objcLiteralSyntaxSpecialChar,objcProtocolList,objcColon,objcFastEnumKeyword,objcType,objcClass,objcMacro,objcEnum,objcEnumValue,objcExceptionValue,objcNotificationValue,objcConstVar,objcPreProcMacro + +" Objective-C Message Expressions +syn region objcMethodCall start=/\[/ end=/\]/ contains=objcMethodCall,objcBlocks,@objcObjCEntities,@objcCEntities + +" To distinguish class method and instance method +syn match objcInstanceMethod display /^s*-\s*/ +syn match objcClassMethod display /^s*+\s*/ + +" ObjC Blocks +syn region objcBlocks start=/\(\^\s*([^)]\+)\s*{\|\^\s*{\)/ end=/}/ contains=objcBlocks,objcMethodCall,@objcObjCEntities,@objcCEntities + +syn cluster cParenGroup add=objcMethodCall +syn cluster cPreProcGroup add=objcMethodCall + +""" Foundation Framework +syn match objcClass /Protocol\s*\*/me=s+8,he=s+8 + +""""""""""""""""" +" NSObjCRuntime.h +syn keyword objcType NSInteger NSUInteger NSComparator +syn keyword objcEnum NSComparisonResult +syn keyword objcEnumValue NSOrderedAscending NSOrderedSame NSOrderedDescending +syn keyword objcEnum NSEnumerationOptions +syn keyword objcEnumValue NSEnumerationConcurrent NSEnumerationReverse +syn keyword objcEnum NSSortOptions +syn keyword objcEnumValue NSSortConcurrent NSSortStable +syn keyword objcEnumValue NSNotFound +syn keyword objcMacro NSIntegerMax NSIntegerMin NSUIntegerMax +" NSRange.h +syn keyword objcType NSRange NSRangePointer +" NSGeometry.h +syn keyword objcType NSPoint NSPointPointer NSPointArray NSSize NSSizePointer NSSizeArray NSRect NSRectPointer NSRectArray +syn keyword objcEnum NSRectEdge +syn keyword objcEnumValue NSMinXEdge NSMinYEdge NSMaxXEdge NSMaxYEdge +syn keyword objcConstVar NSZeroPoint NSZeroSize NSZeroRect +syn keyword cType CGFloat CGPoint CGSize CGRect +syn keyword objcEnum NSAlignmentOptions +syn keyword objcEnumValue NSAlignMinXInward NSAlignMinYInward NSAlignMaxXInward NSAlignMaxYInward NSAlignWidthInward NSAlignHeightInward NSAlignMinXOutward NSAlignMinYOutward NSAlignMaxXOutward NSAlignMaxYOutward NSAlignWidthOutward NSAlignHeightOutward NSAlignMinXNearest NSAlignMinYNearest NSAlignMaxXNearest NSAlignMaxYNearest NSAlignWidthNearest NSAlignHeightNearest NSAlignRectFlipped NSAlignAllEdgesInward NSAlignAllEdgesOutward NSAlignAllEdgesNearest +" NSDecimal.h +syn keyword objcType NSDecimal +syn keyword objcEnum NSRoundingMode +syn keyword objcEnumValue NSRoundPlain NSRoundDown NSRoundUp NSRoundBankers +syn keyword objcEnum NSCalculationError +syn keyword objcEnumValue NSCalculationNoError NSCalculationLossOfPrecision NSCalculationUnderflow NSCalculationOverflow NSCalculationDivideByZero +" NSDate.h +syn match objcClass /NSDate\s*\*/me=s+6,he=s+6 +syn keyword objcType NSTimeInterval +syn keyword objcNotificationValue NSSystemClockDidChangeNotification +syn keyword objcMacro NSTimeIntervalSince1970 +" NSZone.h +syn match objcType /NSZone\s*\*/me=s+6,he=s+6 +" NSError.h +syn match objcClass /NSError\s*\*/me=s+7,he=s+7 +syn keyword objcConstVar NSCocoaErrorDomain NSPOSIXErrorDomain NSOSStatusErrorDomain NSMachErrorDomain NSUnderlyingErrorKey NSLocalizedDescriptionKey NSLocalizedFailureReasonErrorKey NSLocalizedRecoverySuggestionErrorKey NSLocalizedRecoveryOptionsErrorKey NSRecoveryAttempterErrorKey NSHelpAnchorErrorKey NSStringEncodingErrorKey NSURLErrorKey NSFilePathErrorKey +" NSException.h +syn match objcClass /NSException\s*\*/me=s+11,he=s+11 +syn keyword objcType NSUncaughtExceptionHandler +syn keyword objcConstVar NSGenericException NSRangeException NSInvalidArgumentException NSInternalInconsistencyException NSMallocException NSObjectInaccessibleException NSObjectNotAvailableException NSDestinationInvalidException NSPortTimeoutException NSInvalidSendPortException NSInvalidReceivePortException NSPortSendException NSPortReceiveException NSOldStyleException +" NSNotification.h +syn match objcClass /NSNotification\s*\*/me=s+14,he=s+14 +syn match objcClass /NSNotificationCenter\s*\*/me=s+20,he=s+20 +" NSDistributedNotificationCenter.h +syn match objcClass /NSDistributedNotificationCenter\s*\*/me=s+31,he=s+31 +syn keyword objcConstVar NSLocalNotificationCenterType +syn keyword objcEnum NSNotificationSuspensionBehavior +syn keyword objcEnumValue NSNotificationSuspensionBehaviorDrop NSNotificationSuspensionBehaviorCoalesce NSNotificationSuspensionBehaviorHold NSNotificationSuspensionBehaviorHold NSNotificationSuspensionBehaviorDeliverImmediately +syn keyword objcEnumValue NSNotificationDeliverImmediately NSNotificationPostToAllSessions +" NSNotificationQueue.h +syn match objcClass /NSNotificationQueue\s*\*/me=s+19,he=s+19 +syn keyword objcEnum NSPostingStyle +syn keyword objcEnumValue NSPostWhenIdle NSPostASAP NSPostNow +syn keyword objcEnum NSNotificationCoalescing +syn keyword objcEnumValue NSNotificationNoCoalescing NSNotificationCoalescingOnName NSNotificationCoalescingOnSender +" NSEnumerator.h +syn match objcClass /NSEnumerator\s*\*/me=s+12,he=s+12 +" NSIndexSet.h +syn match objcClass /NSIndexSet\s*\*/me=s+10,he=s+10 +syn match objcClass /NSMutableIndexSet\s*\*/me=s+17,he=s+17 +" NSCharecterSet.h +syn match objcClass /NSCharacterSet\s*\*/me=s+14,he=s+14 +" NSURL.h +syn match objcClass /NSURL\s*\*/me=s+5,he=s+5 +syn keyword objcEnum NSURLBookmarkCreationOptions +syn keyword objcEnumValue NSURLBookmarkCreationPreferFileIDResolution NSURLBookmarkCreationMinimalBookmark NSURLBookmarkCreationSuitableForBookmarkFile NSURLBookmarkCreationWithSecurityScope NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess +syn keyword objcEnum NSURLBookmarkResolutionOptions +syn keyword objcEnumValue NSURLBookmarkResolutionWithoutUI NSURLBookmarkResolutionWithoutMounting NSURLBookmarkResolutionWithSecurityScope +syn keyword objcType NSURLBookmarkFileCreationOptions +syn keyword objcConstVar NSURLFileScheme NSURLKeysOfUnsetValuesKey +syn keyword objcConstVar NSURLNameKey NSURLLocalizedNameKey NSURLIsRegularFileKey NSURLIsDirectoryKey NSURLIsSymbolicLinkKey NSURLIsVolumeKey NSURLIsPackageKey NSURLIsSystemImmutableKey NSURLIsUserImmutableKey NSURLIsHiddenKey NSURLHasHiddenExtensionKey NSURLCreationDateKey NSURLContentAccessDateKey NSURLContentModificationDateKey NSURLAttributeModificationDateKey NSURLLinkCountKey NSURLParentDirectoryURLKey NSURLVolumeURLKey NSURLTypeIdentifierKey NSURLLocalizedTypeDescriptionKey NSURLLabelNumberKey NSURLLabelColorKey NSURLLocalizedLabelKey NSURLEffectiveIconKey NSURLCustomIconKey NSURLFileResourceIdentifierKey NSURLVolumeIdentifierKey NSURLPreferredIOBlockSizeKey NSURLIsReadableKey NSURLIsWritableKey NSURLIsExecutableKey NSURLFileSecurityKey NSURLIsExcludedFromBackupKey NSURLPathKey NSURLIsMountTriggerKey NSURLFileResourceTypeKey +syn keyword objcConstVar NSURLFileResourceTypeNamedPipe NSURLFileResourceTypeCharacterSpecial NSURLFileResourceTypeDirectory NSURLFileResourceTypeBlockSpecial NSURLFileResourceTypeRegular NSURLFileResourceTypeSymbolicLink NSURLFileResourceTypeSocket NSURLFileResourceTypeUnknown +syn keyword objcConstVar NSURLFileSizeKey NSURLFileAllocatedSizeKey NSURLTotalFileSizeKey NSURLTotalFileAllocatedSizeKey NSURLIsAliasFileKey +syn keyword objcConstVar NSURLVolumeLocalizedFormatDescriptionKey NSURLVolumeTotalCapacityKey NSURLVolumeAvailableCapacityKey NSURLVolumeResourceCountKey NSURLVolumeSupportsPersistentIDsKey NSURLVolumeSupportsSymbolicLinksKey NSURLVolumeSupportsHardLinksKey NSURLVolumeSupportsJournalingKey NSURLVolumeIsJournalingKey NSURLVolumeSupportsSparseFilesKey NSURLVolumeSupportsZeroRunsKey NSURLVolumeSupportsCaseSensitiveNamesKey NSURLVolumeSupportsCasePreservedNamesKey NSURLVolumeSupportsRootDirectoryDatesKey NSURLVolumeSupportsVolumeSizesKey NSURLVolumeSupportsRenamingKey NSURLVolumeSupportsAdvisoryFileLockingKey NSURLVolumeSupportsExtendedSecurityKey NSURLVolumeIsBrowsableKey NSURLVolumeMaximumFileSizeKey NSURLVolumeIsEjectableKey NSURLVolumeIsRemovableKey NSURLVolumeIsInternalKey NSURLVolumeIsAutomountedKey NSURLVolumeIsLocalKey NSURLVolumeIsReadOnlyKey NSURLVolumeCreationDateKey NSURLVolumeURLForRemountingKey NSURLVolumeUUIDStringKey NSURLVolumeNameKey NSURLVolumeLocalizedNameKey +syn keyword objcConstVar NSURLIsUbiquitousItemKey NSURLUbiquitousItemHasUnresolvedConflictsKey NSURLUbiquitousItemIsDownloadedKey NSURLUbiquitousItemIsDownloadingKey NSURLUbiquitousItemIsUploadedKey NSURLUbiquitousItemIsUploadingKey NSURLUbiquitousItemPercentDownloadedKey NSURLUbiquitousItemPercentUploadedKey +"""""""""""" +" NSString.h +syn match objcClass /NSString\s*\*/me=s+8,he=s+8 +syn match objcClass /NSMutableString\s*\*/me=s+15,he=s+15 +syn keyword objcType unichar +syn keyword objcExceptionValue NSParseErrorException NSCharacterConversionException +syn keyword objcMacro NSMaximumStringLength +syn keyword objcEnum NSStringCompareOptions +syn keyword objcEnumValue NSCaseInsensitiveSearch NSLiteralSearch NSBackwardsSearch NSAnchoredSearch NSNumericSearch NSDiacriticInsensitiveSearch NSWidthInsensitiveSearch NSForcedOrderingSearch NSRegularExpressionSearch +syn keyword objcEnum NSStringEncoding +syn keyword objcEnumValue NSASCIIStringEncoding NSNEXTSTEPStringEncoding NSJapaneseEUCStringEncoding NSUTF8StringEncoding NSISOLatin1StringEncoding NSSymbolStringEncoding NSNonLossyASCIIStringEncoding NSShiftJISStringEncoding NSISOLatin2StringEncoding NSUnicodeStringEncoding NSWindowsCP1251StringEncoding NSWindowsCP1252StringEncoding NSWindowsCP1253StringEncoding NSWindowsCP1254StringEncoding NSWindowsCP1250StringEncoding NSISO2022JPStringEncoding NSMacOSRomanStringEncoding NSUTF16StringEncoding NSUTF16BigEndianStringEncoding NSUTF16LittleEndianStringEncoding NSUTF32StringEncoding NSUTF32BigEndianStringEncoding NSUTF32LittleEndianStringEncoding +syn keyword objcEnum NSStringEncodingConversionOptions +syn keyword objcEnumValue NSStringEncodingConversionAllowLossy NSStringEncodingConversionExternalRepresentation +syn keyword objcEnum NSStringEnumerationOptions +syn keyword objcEnumValue NSStringEnumerationByLines NSStringEnumerationByParagraphs NSStringEnumerationByComposedCharacterSequences NSStringEnumerationByWords NSStringEnumerationBySentences NSStringEnumerationReverse NSStringEnumerationSubstringNotRequired NSStringEnumerationLocalized +" NSAttributedString.h +syn match objcClass /NSAttributedString\s*\*/me=s+18,he=s+18 +syn match objcClass /NSMutableAttributedString\s*\*/me=s+25,he=s+25 +syn keyword objcEnum NSAttributedStringEnumerationOptions +syn keyword objcEnumValue NSAttributedStringEnumerationReverse NSAttributedStringEnumerationLongestEffectiveRangeNotRequired +" NSValue.h +syn match objcClass /NSValue\s*\*/me=s+7,he=s+7 +syn match objcClass /NSNumber\s*\*/me=s+8,he=s+8 +" NSDecimalNumber.h +syn match objcClass /NSDecimalNumber\s*\*/me=s+15,he=s+15 +syn match objcClass /NSDecimalNumberHandler\s*\*/me=s+22,he=s+22 +syn keyword objcExceptionValue NSDecimalNumberExactnessException NSDecimalNumberOverflowException NSDecimalNumberUnderflowException NSDecimalNumberDivideByZeroException +" NSData.h +syn match objcClass /NSData\s*\*/me=s+6,he=s+6 +syn match objcClass /NSMutableData\s*\*/me=s+13,he=s+13 +syn keyword objcEnum NSDataReadingOptions +syn keyword objcEnumValue NSDataReadingMappedIfSafe NSDataReadingUncached NSDataReadingMappedAlways NSDataReadingMapped NSMappedRead NSUncachedRead +syn keyword objcEnum NSDataWritingOptions +syn keyword objcEnumValue NSDataWritingAtomic NSDataWritingWithoutOverwriting NSDataWritingFileProtectionNone NSDataWritingFileProtectionComplete NSDataWritingFileProtectionCompleteUnlessOpen NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication NSDataWritingFileProtectionMask NSAtomicWrite +syn keyword objcEnum NSDataSearchOptions +syn keyword objcEnumValue NSDataSearchBackwards NSDataSearchAnchored +" NSArray.h +syn match objcClass /NSArray\s*\*/me=s+7,he=s+7 +syn match objcClass /NSMutableArray\s*\*/me=s+14,he=s+14 +syn keyword objcEnum NSBinarySearchingOptions +syn keyword objcEnumValue NSBinarySearchingFirstEqual NSBinarySearchingLastEqual NSBinarySearchingInsertionIndex +" NSDictionary.h +syn match objcClass /NSDictionary\s*\*/me=s+12,he=s+12 +syn match objcClass /NSMutableDictionary\s*\*/me=s+19,he=s+19 +" NSSet.h +syn match objcClass /NSSet\s*\*/me=s+5,me=s+5 +syn match objcClass /NSMutableSet\s*\*/me=s+12,me=s+12 +syn match objcClass /NSCountedSet\s*\*/me=s+12,me=s+12 +" NSOrderedSet.h +syn match objcClass /NSOrderedSet\s*\*/me=s+12,me=s+12 +syn match objcClass /NSMutableOrderedSet\s*\*/me=s+19,me=s+19 +""""""""""""""""""" +" NSPathUtilities.h +syn keyword objcEnum NSSearchPathDirectory +syn keyword objcEnumValue NSApplicationDirectory NSDemoApplicationDirectory NSDeveloperApplicationDirectory NSAdminApplicationDirectory NSLibraryDirectory NSDeveloperDirectory NSUserDirectory NSDocumentationDirectory NSDocumentDirectory NSCoreServiceDirectory NSAutosavedInformationDirectory NSDesktopDirectory NSCachesDirectory NSApplicationSupportDirectory NSDownloadsDirectory NSInputMethodsDirectory NSMoviesDirectory NSMusicDirectory NSPicturesDirectory NSPrinterDescriptionDirectory NSSharedPublicDirectory NSPreferencePanesDirectory NSApplicationScriptsDirectory NSItemReplacementDirectory NSAllApplicationsDirectory NSAllLibrariesDirectory NSTrashDirectory +syn keyword objcEnum NSSearchPathDomainMask +syn keyword objcEnumValue NSUserDomainMask NSLocalDomainMask NSNetworkDomainMask NSSystemDomainMask NSAllDomainsMask +" NSFileManger.h +syn match objcClass /NSFileManager\s*\*/me=s+13,he=s+13 +syn match objcClass /NSDirectoryEnumerator\s*\*/me=s+21,he=s+21 +syn keyword objcEnum NSVolumeEnumerationOptions +syn keyword objcEnumValue NSVolumeEnumerationSkipHiddenVolumes NSVolumeEnumerationProduceFileReferenceURLs +syn keyword objcEnum NSDirectoryEnumerationOptions +syn keyword objcEnumValue NSDirectoryEnumerationSkipsSubdirectoryDescendants NSDirectoryEnumerationSkipsPackageDescendants NSDirectoryEnumerationSkipsHiddenFiles +syn keyword objcEnum NSFileManagerItemReplacementOptions +syn keyword objcEnumValue NSFileManagerItemReplacementUsingNewMetadataOnly NSFileManagerItemReplacementWithoutDeletingBackupItem +syn keyword objcNotificationValue NSUbiquityIdentityDidChangeNotification +syn keyword objcConstVar NSFileType NSFileTypeDirectory NSFileTypeRegular NSFileTypeSymbolicLink NSFileTypeSocket NSFileTypeCharacterSpecial NSFileTypeBlockSpecial NSFileTypeUnknown NSFileSize NSFileModificationDate NSFileReferenceCount NSFileDeviceIdentifier NSFileOwnerAccountName NSFileGroupOwnerAccountName NSFilePosixPermissions NSFileSystemNumber NSFileSystemFileNumber NSFileExtensionHidden NSFileHFSCreatorCode NSFileHFSTypeCode NSFileImmutable NSFileAppendOnly NSFileCreationDate NSFileOwnerAccountID NSFileGroupOwnerAccountID NSFileBusy NSFileProtectionKey NSFileProtectionNone NSFileProtectionComplete NSFileProtectionCompleteUnlessOpen NSFileProtectionCompleteUntilFirstUserAuthentication NSFileSystemSize NSFileSystemFreeSize NSFileSystemNodes NSFileSystemFreeNodes +" NSFileHandle.h +syn match objcClass /NSFileHandle\s*\*/me=s+12,he=s+12 +syn keyword objcExceptionValue NSFileHandleOperationException +syn keyword objcNotificationValue NSFileHandleReadCompletionNotification NSFileHandleReadToEndOfFileCompletionNotification NSFileHandleConnectionAcceptedNotification NSFileHandleDataAvailableNotification NSFileHandleNotificationDataItem NSFileHandleNotificationFileHandleItem NSFileHandleNotificationMonitorModes +syn match objcClass /NSPipe\s*\*/me=s+6,he=s+6 +"""""""""""" +" NSLocale.h +syn match objcClass /NSLocale\s*\*/me=s+8,he=s+8 +syn keyword objcEnum NSLocaleLanguageDirection +syn keyword objcEnumValue NSLocaleLanguageDirectionUnknown NSLocaleLanguageDirectionLeftToRight NSLocaleLanguageDirectionRightToLeft NSLocaleLanguageDirectionTopToBottom NSLocaleLanguageDirectionBottomToTop +syn keyword objcNotificationValue NSCurrentLocaleDidChangeNotification +syn keyword objcConstVar NSLocaleIdentifier NSLocaleLanguageCode NSLocaleCountryCode NSLocaleScriptCode NSLocaleVariantCode NSLocaleExemplarCharacterSet NSLocaleCalendar NSLocaleCollationIdentifier NSLocaleUsesMetricSystem NSLocaleMeasurementSystem NSLocaleDecimalSeparator NSLocaleGroupingSeparator NSLocaleCurrencySymbol NSLocaleCurrencyCode NSLocaleCollatorIdentifier NSLocaleQuotationBeginDelimiterKey NSLocaleQuotationEndDelimiterKey NSLocaleAlternateQuotationBeginDelimiterKey NSLocaleAlternateQuotationEndDelimiterKey NSGregorianCalendar NSBuddhistCalendar NSChineseCalendar NSHebrewCalendar NSIslamicCalendar NSIslamicCivilCalendar NSJapaneseCalendar NSRepublicOfChinaCalendar NSPersianCalendar NSIndianCalendar NSISO8601Calendar +" NSFormatter.h +syn match objcClass /NSFormatter\s*\*/me=s+11,he=s+11 +" NSNumberFormatter.h +syn match objcClass /NSNumberFormatter\s*\*/me=s+17,he=s+17 +syn keyword objcEnum NSNumberFormatterStyle +syn keyword objcEnumValue NSNumberFormatterNoStyle NSNumberFormatterDecimalStyle NSNumberFormatterCurrencyStyle NSNumberFormatterPercentStyle NSNumberFormatterScientificStyle NSNumberFormatterSpellOutStyle +syn keyword objcEnum NSNumberFormatterBehavior +syn keyword objcEnumValue NSNumberFormatterBehaviorDefault NSNumberFormatterBehavior10_0 NSNumberFormatterBehavior10_4 +syn keyword objcEnum NSNumberFormatterPadPosition +syn keyword objcEnumValue NSNumberFormatterPadBeforePrefix NSNumberFormatterPadAfterPrefix NSNumberFormatterPadBeforeSuffix NSNumberFormatterPadAfterSuffix +syn keyword objcEnum NSNumberFormatterRoundingMode +syn keyword objcEnumValue NSNumberFormatterRoundCeiling NSNumberFormatterRoundFloor NSNumberFormatterRoundDown NSNumberFormatterRoundUp NSNumberFormatterRoundHalfEven NSNumberFormatterRoundHalfDown NSNumberFormatterRoundHalfUp +" NSDateFormatter.h +syn match objcClass /NSDateFormatter\s*\*/me=s+15,he=s+15 +syn keyword objcEnum NSDateFormatterStyle +syn keyword objcEnumValue NSDateFormatterNoStyle NSDateFormatterShortStyle NSDateFormatterMediumStyle NSDateFormatterLongStyle NSDateFormatterFullStyle +syn keyword objcEnum NSDateFormatterBehavior +syn keyword objcEnumValue NSDateFormatterBehaviorDefault NSDateFormatterBehavior10_0 NSDateFormatterBehavior10_4 +" NSCalendar.h +syn match objcClass /NSCalendar\s*\*/me=s+10,he=s+10 +syn keyword objcEnum NSCalendarUnit +syn keyword objcEnumValue NSEraCalendarUnit NSYearCalendarUnit NSMonthCalendarUnit NSDayCalendarUnit NSHourCalendarUnit NSMinuteCalendarUnit NSSecondCalendarUnit NSWeekCalendarUnit NSWeekdayCalendarUnit NSWeekdayOrdinalCalendarUnit NSQuarterCalendarUnit NSWeekOfMonthCalendarUnit NSWeekOfYearCalendarUnit NSYearForWeekOfYearCalendarUnit NSCalendarCalendarUnit NSTimeZoneCalendarUnit +syn keyword objcEnumValue NSWrapCalendarComponents NSUndefinedDateComponent +syn match objcClass /NSDateComponents\s*\*/me=s+16,he=s+16 +" NSTimeZone.h +syn match objcClass /NSTimeZone\s*\*/me=s+10,he=s+10 +syn keyword objcEnum NSTimeZoneNameStyle +syn keyword objcEnumValue NSTimeZoneNameStyleStandard NSTimeZoneNameStyleShortStandard NSTimeZoneNameStyleDaylightSaving NSTimeZoneNameStyleShortDaylightSaving NSTimeZoneNameStyleGeneric NSTimeZoneNameStyleShortGeneric +syn keyword objcNotificationValue NSSystemTimeZoneDidChangeNotification +""""""""""" +" NSCoder.h +syn match objcClass /NSCoder\s*\*/me=s+7,he=s+7 +" NSArchiver.h +syn match objcClass /NSArchiver\s*\*/me=s+10,he=s+10 +syn match objcClass /NSUnarchiver\s*\*/me=s+12,he=s+12 +syn keyword objcExceptionValue NSInconsistentArchiveException +" NSKeyedArchiver.h +syn match objcClass /NSKeyedArchiver\s*\*/me=s+15,he=s+15 +syn match objcClass /NSKeyedUnarchiver\s*\*/me=s+17,he=s+17 +syn keyword objcExceptionValue NSInvalidArchiveOperationException NSInvalidUnarchiveOperationException +"""""""""""""""""" +" NSPropertyList.h +syn keyword objcEnum NSPropertyListMutabilityOptions +syn keyword objcEnumValue NSPropertyListImmutable NSPropertyListMutableContainers NSPropertyListMutableContainersAndLeaves +syn keyword objcEnum NSPropertyListFormat +syn keyword objcEnumValue NSPropertyListOpenStepFormat NSPropertyListXMLFormat_v1_0 NSPropertyListBinaryFormat_v1_0 +syn keyword objcType NSPropertyListReadOptions NSPropertyListWriteOptions +" NSUserDefaults.h +syn match objcClass /NSUserDefaults\s*\*/me=s+14,he=s+14 +syn keyword objcConstVar NSGlobalDomain NSArgumentDomain NSRegistrationDomain +syn keyword objcNotificationValue NSUserDefaultsDidChangeNotification +" NSBundle.h +syn match objcClass /NSBundle\s*\*/me=s+8,he=s+8 +syn keyword objcEnumValue NSBundleExecutableArchitectureI386 NSBundleExecutableArchitecturePPC NSBundleExecutableArchitectureX86_64 NSBundleExecutableArchitecturePPC64 +syn keyword objcNotificationValue NSBundleDidLoadNotification NSLoadedClasses +""""""""""""""""" +" NSProcessInfo.h +syn match objcClass /NSProcessInfo\s*\*/me=s+13,he=s+13 +syn keyword objcEnumValue NSWindowsNTOperatingSystem NSWindows95OperatingSystem NSSolarisOperatingSystem NSHPUXOperatingSystem NSMACHOperatingSystem NSSunOSOperatingSystem NSOSF1OperatingSystem +" NSTask.h +syn match objcClass /NSTask\s*\*/me=s+6,he=s+6 +syn keyword objcEnum NSTaskTerminationReason +syn keyword objcEnumValue NSTaskTerminationReasonExit NSTaskTerminationReasonUncaughtSignal +syn keyword objcNotificationValue NSTaskDidTerminateNotification +" NSThread.h +syn match objcClass /NSThread\s*\*/me=s+8,he=s+8 +syn keyword objcNotificationValue NSWillBecomeMultiThreadedNotification NSDidBecomeSingleThreadedNotification NSThreadWillExitNotification +" NSLock.h +syn match objcClass /NSLock\s*\*/me=s+6,he=s+6 +syn match objcClass /NSConditionLock\s*\*/me=s+15,he=s+15 +syn match objcClass /NSRecursiveLock\s*\*/me=s+15,he=s+15 +" NSDictributedLock +syn match objcClass /NSDistributedLock\s*\*/me=s+17,he=s+17 +" NSOperation.h +"""""""""""""""" +syn match objcClass /NSOperation\s*\*/me=s+11,he=s+11 +syn keyword objcEnum NSOperationQueuePriority +syn keyword objcEnumValue NSOperationQueuePriorityVeryLow NSOperationQueuePriorityLow NSOperationQueuePriorityNormal NSOperationQueuePriorityHigh NSOperationQueuePriorityVeryHigh +syn match objcClass /NSBlockOperation\s*\*/me=s+16,he=s+16 +syn match objcClass /NSInvocationOperation\s*\*/me=s+21,he=s+21 +syn keyword objcExceptionValue NSInvocationOperationVoidResultException NSInvocationOperationCancelledException +syn match objcClass /NSOperationQueue\s*\*/me=s+16,he=s+16 +syn keyword objcEnumValue NSOperationQueueDefaultMaxConcurrentOperationCount +" NSConnection.h +syn match objcClass /NSConnection\s*\*/me=s+12,he=s+12 +syn keyword objcConstVar NSConnectionReplyMode +syn keyword objcNotificationValue NSConnectionDidDieNotification NSConnectionDidInitializeNotification +syn keyword objcExceptionValue NSFailedAuthenticationException +" NSPort.h +syn match objcClass /NSPort\s*\*/me=s+6,he=s+6 +syn keyword objcType NSSocketNativeHandle +syn keyword objcNotificationValue NSPortDidBecomeInvalidNotification +syn match objcClass /NSMachPort\s*\*/me=s+10,he=s+10 +syn keyword objcEnumValue NSMachPortDeallocateNone NSMachPortDeallocateSendRight NSMachPortDeallocateReceiveRight +syn match objcClass /NSMessagePort\s*\*/me=s+13,he=s+13 +syn match objcClass /NSSocketPort\s*\*/me=s+12,he=s+12 +" NSPortMessage.h +syn match objcClass /NSPortMessage\s*\*/me=s+13,he=s+13 +" NSDistantObject.h +syn match objcClass /NSDistantObject\s*\*/me=s+15,he=s+15 +" NSPortNameServer.h +syn match objcClass /NSPortNameServer\s*\*/me=s+16,he=s+16 +syn match objcClass /NSMessagePortNameServer\s*\*/me=s+23,he=s+23 +syn match objcClass /NSSocketPortNameServer\s*\*/me=s+22,he=s+22 +" NSHost.h +syn match objcClass /NSHost\s*\*/me=s+6,he=s+6 +" NSInvocation.h +syn match objcClass /NSInvocation\s*\*/me=s+12,he=s+12 +" NSMethodSignature.h +syn match objcClass /NSMethodSignature\s*\*/me=s+17,he=s+17 +""""" +" NSScanner.h +syn match objcClass /NSScanner\s*\*/me=s+9,he=s+9 +" NSTimer.h +syn match objcClass /NSTimer\s*\*/me=s+7,he=s+7 +" NSAutoreleasePool.h +syn match objcClass /NSAutoreleasePool\s*\*/me=s+17,he=s+17 +" NSRunLoop.h +syn match objcClass /NSRunLoop\s*\*/me=s+9,he=s+9 +syn keyword objcConstVar NSDefaultRunLoopMode NSRunLoopCommonModes +" NSNull.h +syn match objcClass /NSNull\s*\*/me=s+6,he=s+6 +" NSProxy.h +syn match objcClass /NSProxy\s*\*/me=s+7,he=s+7 +" NSObject.h +syn match objcClass /NSObject\s*\*/me=s+8,he=s+8 + +""" Default Highlighting +hi def link objcPreProcMacro cConstant +hi def link objcPrincipalType cType +hi def link objcUsefulTerm cConstant +hi def link objcImport cInclude +hi def link objcImported cString +hi def link objcObjDef cOperator +hi def link objcProtocol cOperator +hi def link objcProperty cOperator +hi def link objcIvarScope cOperator +hi def link objcInternalRep cOperator +hi def link objcException cOperator +hi def link objcThread cOperator +hi def link objcPool cOperator +hi def link objcModuleImport cOperator +hi def link objcSpecial cSpecial +hi def link objcString cString +hi def link objcHiddenArgument cStatement +hi def link objcBlocksQualifier cStorageClass +hi def link objcObjectLifetimeQualifier cStorageClass +hi def link objcTollFreeBridgeQualifier cStorageClass +hi def link objcRemoteMessagingQualifier cStorageClass +hi def link objcFastEnumKeyword cStatement +hi def link objcLiteralSyntaxNumber cNumber +hi def link objcLiteralSyntaxChar cCharacter +hi def link objcLiteralSyntaxSpecialChar cCharacter +hi def link objcLiteralSyntaxOp cOperator +hi def link objcDeclPropAccessorName cConstant +hi def link objcDeclPropAccessorType cConstant +hi def link objcDeclPropAssignSemantics cConstant +hi def link objcDeclPropAtomicity cConstant +hi def link objcDeclPropARC cConstant +hi def link objcInstanceMethod Function +hi def link objcClassMethod Function +hi def link objcType cType +hi def link objcClass cType +hi def link objcMacro cConstant +hi def link objcEnum cType +hi def link objcEnumValue cConstant +hi def link objcExceptionValue cConstant +hi def link objcNotificationValue cConstant +hi def link objcConstVar cConstant + +""" Final step +let b:current_syntax = "objc" +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 sw=2 sts=2 diff --git a/runtime/syntax/objcpp.vim b/runtime/syntax/objcpp.vim new file mode 100644 index 0000000000..e80eed900d --- /dev/null +++ b/runtime/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/runtime/syntax/ocaml.vim b/runtime/syntax/ocaml.vim new file mode 100644 index 0000000000..24116f0e02 --- /dev/null +++ b/runtime/syntax/ocaml.vim @@ -0,0 +1,331 @@ +" 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: 2012 May 12 - Added Dominique Pellé's spell checking patch (MM) +" 2012 Feb 01 - Improved module path highlighting (MM) +" 2010 Oct 11 - Added highlighting of lnot (MM, thanks to Erick Matsen) + +" 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 + +" Access to the method of an object +syn match ocamlMethod "#" + +" Script headers highlighted like comments +syn match ocamlComment "^#!.*" contains=@Spell + +" 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\|camlp4o\)\>" + +" 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,ocamlVal + + +" 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=@Spell,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 + +" "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,ocamlVal +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 keyword ocamlKeyword val +syn region ocamlVal matchgroup=ocamlKeyword start="\" matchgroup=ocamlLCIdentifier end="\<\l\(\w\|'\)*\>" contains=@ocamlAllErrs,ocamlComment,ocamlFullMod skipwhite skipempty nextgroup=ocamlMPRestr +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 + +" "struct" +syn region ocamlStruct matchgroup=ocamlModule start="\<\(module\s\+\)\=struct\>" matchgroup=ocamlModule end="\" contains=ALLBUT,@ocamlContained,ocamlEndErr + +" "module type" +syn region ocamlKeyword start="\\s*\\(\s*\\)\=" matchgroup=ocamlModule end="\<\w\(\w\|'\)*\>" contains=ocamlComment skipwhite skipempty nextgroup=ocamlMTDef +syn match ocamlMTDef "=\s*\w\(\w\|'\)*\>"hs=s+1,me=s+1 skipwhite skipempty nextgroup=ocamlFullMod + +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 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 lnot 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 ocamlCharacter "'\\x\x\x'" +syn match ocamlCharErr "'\\\d\d'\|'\\\d'" +syn match ocamlCharErr "'\\[^\'ntbr]'" +syn region ocamlString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell + +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 ocamlVal Keyword + 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/runtime/syntax/occam.vim b/runtime/syntax/occam.vim new file mode 100644 index 0000000000..1c84bf00f6 --- /dev/null +++ b/runtime/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/runtime/syntax/omnimark.vim b/runtime/syntax/omnimark.vim new file mode 100644 index 0000000000..698b3c09fb --- /dev/null +++ b/runtime/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/runtime/syntax/openroad.vim b/runtime/syntax/openroad.vim new file mode 100644 index 0000000000..3f9a78d552 --- /dev/null +++ b/runtime/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/runtime/syntax/opl.vim b/runtime/syntax/opl.vim new file mode 100644 index 0000000000..1b07e3596c --- /dev/null +++ b/runtime/syntax/opl.vim @@ -0,0 +1,102 @@ +" Vim syntax file +" Language: OPL +" Maintainer: Czo +" Last Change: 2012 Feb 03 by Thilo Six +" $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 + +let s:cpo_save = &cpo +set cpo&vim + +" 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" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 diff --git a/runtime/syntax/ora.vim b/runtime/syntax/ora.vim new file mode 100644 index 0000000000..bf5d3220a0 --- /dev/null +++ b/runtime/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/runtime/syntax/pamconf.vim b/runtime/syntax/pamconf.vim new file mode 100644 index 0000000000..e3c8ba87fd --- /dev/null +++ b/runtime/syntax/pamconf.vim @@ -0,0 +1,120 @@ +" Vim syntax file +" Language: pam(8) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2011-08-03 + + +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 include substack + \ 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=pamconfControlActionN, + \ 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/runtime/syntax/papp.vim b/runtime/syntax/papp.vim new file mode 100644 index 0000000000..d86dce603f --- /dev/null +++ b/runtime/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/runtime/syntax/pascal.vim b/runtime/syntax/pascal.vim new file mode 100644 index 0000000000..d2b6060acc --- /dev/null +++ b/runtime/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/runtime/syntax/passwd.vim b/runtime/syntax/passwd.vim new file mode 100644 index 0000000000..cdaed58cc0 --- /dev/null +++ b/runtime/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/runtime/syntax/pcap.vim b/runtime/syntax/pcap.vim new file mode 100644 index 0000000000..17d0d42c0b --- /dev/null +++ b/runtime/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/runtime/syntax/pccts.vim b/runtime/syntax/pccts.vim new file mode 100644 index 0000000000..8341f5bd43 --- /dev/null +++ b/runtime/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/runtime/syntax/pdf.vim b/runtime/syntax/pdf.vim new file mode 100644 index 0000000000..86d80daa6a --- /dev/null +++ b/runtime/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="\ +" Homepage: http://github.com/vim-perl/vim-perl/tree/master +" Bugs/requests: http://github.com/vim-perl/vim-perl/issues +" Last Change: 2013-07-23 +" Contributors: Andy Lester +" Hinrik Örn Sigurðsson +" Lukas Mai +" Nick Hibma +" Sonia Heimann +" Rob Hoelz +" and many others. +" +" Please download the most recent version first, before mailing +" any comments. +" +" The following parameters are available for tuning the +" perl syntax highlighting, with defaults given: +" +" let perl_include_pod = 1 +" unlet perl_no_scope_in_variables +" unlet perl_no_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 +" unlet perl_nofold_packages +" let perl_nofold_subs = 1 +" unlet perl_fold_anonymous_subs + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +if exists('®expengine') + let s:regexpengine=®expengine + set regexpengine=1 +endif + +" POD starts with ^= and ends with ^=cut + +if !exists("perl_include_pod") || perl_include_pod == 1 + " 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 extend + syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend fold extend + 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 + + +syn cluster perlTop contains=TOP + +syn region perlBraces start="{" end="}" transparent extend + +" All keywords +" +syn match perlConditional "\<\%(if\|elsif\|unless\|given\|when\|default\)\>" +syn match perlConditional "\\)\|\>\)" contains=perlElseIfError skipwhite skipnl skipempty +syn match perlRepeat "\<\%(while\|for\%(each\)\=\|do\|until\|continue\)\>" +syn match perlOperator "\<\%(defined\|undef\|eq\|ne\|[gl][et]\|cmp\|not\|and\|or\|xor\|not\|bless\|ref\|do\)\>" +" for some reason, adding this as the nextgroup for perlControl fixes BEGIN +" folding issues... +syn match perlFakeGroup "" contained +syn match perlControl "\<\%(BEGIN\|CHECK\|INIT\|END\|UNITCHECK\)\>\_s*" nextgroup=perlFakeGroup + +syn match perlStatementStorage "\<\%(my\|our\|local\|state\)\>" +syn match perlStatementControl "\<\%(return\|last\|next\|redo\|goto\|break\)\>" +syn match perlStatementScalar "\<\%(chom\=p\|chr\|crypt\|r\=index\|lc\%(first\)\=\|length\|ord\|pack\|sprintf\|substr\|uc\%(first\)\=\)\>" +syn match perlStatementRegexp "\<\%(pos\|quotemeta\|split\|study\)\>" +syn match perlStatementNumeric "\<\%(abs\|atan2\|cos\|exp\|hex\|int\|log\|oct\|rand\|sin\|sqrt\|srand\)\>" +syn match perlStatementList "\<\%(splice\|unshift\|shift\|push\|pop\|join\|reverse\|grep\|map\|sort\|unpack\)\>" +syn match perlStatementHash "\<\%(delete\|each\|exists\|keys\|values\)\>" +syn match perlStatementIOfunc "\<\%(syscall\|dbmopen\|dbmclose\)\>" +syn match perlStatementFiledesc "\<\%(binmode\|close\%(dir\)\=\|eof\|fileno\|getc\|lstat\|printf\=\|read\%(dir\|line\|pipe\)\|rewinddir\|say\|select\|stat\|tell\%(dir\)\=\|write\)\>" nextgroup=perlFiledescStatementNocomma skipwhite +syn match perlStatementFiledesc "\<\%(fcntl\|flock\|ioctl\|open\%(dir\)\=\|read\|seek\%(dir\)\=\|sys\%(open\|read\|seek\|write\)\|truncate\)\>" nextgroup=perlFiledescStatementComma skipwhite +syn match perlStatementVector "\" +syn match perlStatementFiles "\<\%(ch\%(dir\|mod\|own\|root\)\|glob\|link\|mkdir\|readlink\|rename\|rmdir\|symlink\|umask\|unlink\|utime\)\>" +syn match perlStatementFiles "-[rwxoRWXOezsfdlpSbctugkTBMAC]\>" +syn match perlStatementFlow "\<\%(caller\|die\|dump\|eval\|exit\|wantarray\)\>" +syn match perlStatementInclude "\<\%(require\|import\)\>" +syn match perlStatementInclude "\<\%(use\|no\)\s\+\%(\%(attributes\|attrs\|autouse\|parent\|base\|big\%(int\|num\|rat\)\|blib\|bytes\|charnames\|constant\|diagnostics\|encoding\%(::warnings\)\=\|feature\|fields\|filetest\|if\|integer\|less\|lib\|locale\|mro\|open\|ops\|overload\|re\|sigtrap\|sort\|strict\|subs\|threads\%(::shared\)\=\|utf8\|vars\|version\|vmsish\|warnings\%(::register\)\=\)\>\)\=" +syn match perlStatementProc "\<\%(alarm\|exec\|fork\|get\%(pgrp\|ppid\|priority\)\|kill\|pipe\|set\%(pgrp\|priority\)\|sleep\|system\|times\|wait\%(pid\)\=\)\>" +syn match perlStatementSocket "\<\%(accept\|bind\|connect\|get\%(peername\|sock\%(name\|opt\)\)\|listen\|recv\|send\|setsockopt\|shutdown\|socket\%(pair\)\=\)\>" +syn match perlStatementIPC "\<\%(msg\%(ctl\|get\|rcv\|snd\)\|sem\%(ctl\|get\|op\)\|shm\%(ctl\|get\|read\|write\)\)\>" +syn match perlStatementNetwork "\<\%(\%(end\|[gs]et\)\%(host\|net\|proto\|serv\)ent\|get\%(\%(host\|net\)by\%(addr\|name\)\|protoby\%(name\|number\)\|servby\%(name\|port\)\)\)\>" +syn match perlStatementPword "\<\%(get\%(pw\%(uid\|nam\)\|gr\%(gid\|nam\)\|login\)\)\|\%(end\|[gs]et\)\%(pw\|gr\)ent\>" +syn match perlStatementTime "\<\%(gmtime\|localtime\|time\)\>" + +syn match perlStatementMisc "\<\%(warn\|format\|formline\|reset\|scalar\|prototype\|lock\|tied\=\|untie\)\>" + +syn keyword perlTodo TODO TODO: TBD TBD: FIXME FIXME: XXX XXX: NOTE NOTE: contained + +syn region perlStatementIndirObjWrap matchgroup=perlStatementIndirObj start="\<\%(map\|grep\|sort\|printf\=\|say\|system\|exec\)\>\s*{" end="}" contains=@perlTop,perlBraces extend + +syn match perlLabel "^\s*\h\w*\s*::\@!\%(\ is *not* considered as part of the +" variable - there again, too complicated and too slow. + +" Special variables first ($^A, ...) and ($|, $', ...) +syn match perlVarPlain "$^[ACDEFHILMNOPRSTVWX]\=" +syn match perlVarPlain "$[\\\"\[\]'&`+*.,;=%~!?@#$<>(-]" +syn match perlVarPlain "%+" +syn match perlVarPlain "$\%(0\|[1-9]\d*\)" +" 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 "[$@#%*&]\%(\%(::\|'\)\=\I\i*\%(\%(::\|'\)\I\i*\)*\)\=\%(::\|'\)\I"ms=s+1,me=e-1 contained + +" To not highlight packages in variables as a scope reference - i.e. in +" $pack::var, pack:: is a scope, just set "perl_no_scope_in_variables" +" If you don't want complex things like @{${"foo"}} to be processed, +" just set the variable "perl_no_extended_vars"... + +if !exists("perl_no_scope_in_variables") + syn match perlVarPlain "\%([@$]\|\$#\)\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember,perlMethod + syn match perlVarPlain2 "%\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" contains=perlPackageRef + syn match perlFunctionName "&\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember,perlMethod +else + syn match perlVarPlain "\%([@$]\|\$#\)\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod + syn match perlVarPlain2 "%\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" + syn match perlFunctionName "&\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod +endif + +if !exists("perl_no_extended_vars") + syn cluster perlExpr contains=perlStatementIndirObjWrap,perlStatementScalar,perlStatementRegexp,perlStatementNumeric,perlStatementList,perlStatementHash,perlStatementFiles,perlStatementTime,perlStatementMisc,perlVarPlain,perlVarPlain2,perlVarNotInMatches,perlVarSlash,perlVarBlock,perlVarBlock2,perlShellCommand,perlFloat,perlNumber,perlStringUnexpanded,perlString,perlQQ,perlArrow,perlBraces + syn region perlArrow matchgroup=perlArrow start="->\s*(" end=")" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained + syn region perlArrow matchgroup=perlArrow start="->\s*\[" end="\]" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained + syn region perlArrow matchgroup=perlArrow start="->\s*{" end="}" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained + syn match perlArrow "->\s*{\s*\I\i*\s*}" contains=perlVarSimpleMemberName nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained + syn region perlArrow matchgroup=perlArrow start="->\s*\$*\I\i*\s*(" end=")" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained + syn region perlVarBlock matchgroup=perlVarPlain start="\%($#\|[$@]\)\$*{" skip="\\}" end=+}\|\%(\%(<<\%('\|"\)\?\)\@=\)+ contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend + syn region perlVarBlock2 matchgroup=perlVarPlain start="[%&*]\$*{" skip="\\}" end=+}\|\%(\%(<<\%('\|"\)\?\)\@=\)+ contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend + syn match perlVarPlain2 "[%&*]\$*{\I\i*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend + syn match perlVarPlain "\%(\$#\|[@$]\)\$*{\I\i*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend + syn region perlVarMember matchgroup=perlVarPlain start="\%(->\)\={" skip="\\}" end="}" contained contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend + syn match perlVarSimpleMember "\%(->\)\={\s*\I\i*\s*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contains=perlVarSimpleMemberName contained extend + syn match perlVarSimpleMemberName "\I\i*" contained + syn region perlVarMember matchgroup=perlVarPlain start="\%(->\)\=\[" skip="\\]" end="]" contained contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend + syn match perlPackageConst "__PACKAGE__" nextgroup=perlMethod + syn match perlMethod "->\$*\I\i*" contained nextgroup=perlVarSimpleMember,perlVarMember,perlMethod +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 "\\\%(\o\{1,3}\|x\%({\x\+}\|\x\{1,2}\)\|c.\|[^cx]\)" contained extend +syn match perlSpecialStringU2 "\\." extend contained contains=NONE +syn match perlSpecialStringU "\\\\" contained +syn match perlSpecialMatch "\\[1-9]" contained extend +syn match perlSpecialMatch "\\g\%(\d\+\|{\%(-\=\d\+\|\h\w*\)}\)" contained +syn match perlSpecialMatch "\\k\%(<\h\w*>\|'\h\w*'\)" contained +syn match perlSpecialMatch "{\d\+\%(,\%(\d\+\)\=\)\=}" contained +syn match perlSpecialMatch "\[[]-]\=[^\[\]]*[]-]\=\]" contained extend +syn match perlSpecialMatch "[+*()?.]" contained +syn match perlSpecialMatch "(?[#:=!]" contained +syn match perlSpecialMatch "(?[impsx]*\%(-[imsx]\+\)\=)" contained +syn match perlSpecialMatch "(?\%([-+]\=\d\+\|R\))" contained +syn match perlSpecialMatch "(?\%(&\|P[>=]\)\h\w*)" contained +syn match perlSpecialMatch "(\*\%(\%(PRUNE\|SKIP\|THEN\)\%(:[^)]*\)\=\|\%(MARK\|\):[^)]*\|COMMIT\|F\%(AIL\)\=\|ACCEPT\))" 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 match perlElseIfError "else\_s*if" containedin=perlConditional +syn keyword perlElseIfError elseif containedin=perlConditional + +" 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,perlSpecialStringU2 +" These items are interpolated inside m// matches and s/// substitutions. +syn cluster perlInterpSlash contains=perlSpecialString,perlSpecialMatch,perlVarPlain,perlVarBlock +" 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 keepend + +" Constants +" +" Numbers +syn match perlNumber "\<\%(0\%(x\x[[:xdigit:]_]*\|b[01][01_]*\|\o[0-7_]*\|\)\|[1-9][[:digit:]_]*\)\>" +syn match perlFloat "\<\d[[:digit:]_]*[eE][\-+]\=\d\+" +syn match perlFloat "\<\d[[:digit:]_]*\.[[:digit:]_]*\%([eE][\-+]\=\d\+\)\=" +syn match perlFloat "\.[[:digit:]][[:digit:]_]*\%([eE][\-+]\=\d\+\)\=" + +syn match perlString "\<\%(v\d\+\%(\.\d\+\)*\|\d\+\%(\.\d\+\)\{2,}\)\>" contains=perlVStringV +syn match perlVStringV "\+ extend contained contains=perlAnglesSQ,@perlInterpSQ keepend + +syn region perlParensDQ start=+(+ end=+)+ extend contained contains=perlParensDQ,@perlInterpDQ keepend +syn region perlBracketsDQ start=+\[+ end=+\]+ extend contained contains=perlBracketsDQ,@perlInterpDQ keepend +syn region perlBracesDQ start=+{+ end=+}+ extend contained contains=perlBracesDQ,@perlInterpDQ keepend +syn region perlAnglesDQ start=+<+ end=+>+ extend contained contains=perlAnglesDQ,@perlInterpDQ keepend + + +" Simple version of searches and matches +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@\s*\z([^[:space:]'([{<#]\)+ end=+\z1[msixpodualgc]*+ contains=@perlInterpMatch keepend extend +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@\)\@\)\@\)\@ and m[] which allows for comments and extra whitespace in the pattern +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@\)\@[msixpodualgc]*+ contains=@perlInterpMatch,perlAnglesDQ keepend extend +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@\)\@\s*\z([^[:space:]'([{<#]\)+ end=+\z1+me=e-1 contains=@perlInterpMatch nextgroup=perlSubstitutionGQQ keepend extend +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@\)\@\)\@\)\@\)\@+ contains=@perlInterpMatch,perlAnglesDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend extend +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@\)\@[msixpodualgcer]*+ contained contains=@perlInterpDQ,perlAnglesDQ keepend extend +syn region perlSubstitutionSQ matchgroup=perlMatchStartEnd start=+'+ end=+'[msixpodualgcer]*+ contained contains=@perlInterpSQ keepend extend + +" Translations +" perlMatch is the first part, perlTranslation* is the second, translator part. +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@\s*\z([^[:space:]([{<#]\)+ end=+\z1+me=e-1 contains=@perlInterpSQ nextgroup=perlTranslationGQ +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@\)\@\)\@\)\@+ contains=@perlInterpSQ,perlAnglesSQ nextgroup=perlTranslationGQ skipwhite skipempty skipnl +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@[cdsr]*+ contains=perlAnglesSQ contained + + +" Strings and q, qq, qw and qr expressions + +syn region perlStringUnexpanded matchgroup=perlStringStartEnd start="'" end="'" contains=@perlInterpSQ keepend extend +syn region perlString matchgroup=perlStringStartEnd start=+"+ end=+"+ contains=@perlInterpDQ keepend extend +syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@\s*\z([^[:space:]#([{<]\)+ end=+\z1+ contains=@perlInterpSQ keepend extend +syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@\)\@\)\@\)\@\)\@+ contains=@perlInterpSQ,perlAnglesSQ keepend extend + +syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@\s*\z([^[:space:]#([{<]\)+ end=+\z1+ contains=@perlInterpDQ keepend extend +syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@\)\@\)\@\)\@\)\@+ contains=@perlInterpDQ,perlAnglesDQ keepend extend + +syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@\)\@\)\@\)\@\)\@\)\@+ contains=@perlInterpSQ,perlAnglesSQ keepend extend + +syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@\s*\z([^[:space:]#([{<'/]\)+ end=+\z1[imosx]*+ contains=@perlInterpMatch keepend extend +syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@\)\@\)\@\)\@ and qr[] which allows for comments and extra whitespace in the pattern +syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@\)\@[imosx]*+ contains=@perlInterpMatch,perlAnglesDQ,perlComment keepend extend +syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@\zs\_[^)]\+" contained +syn match perlSubPrototype +(\_[^)]*)\_s*\|+ nextgroup=perlSubAttributes,perlComment contained contains=perlSubPrototypeError +syn match perlSubName +\%(\h\|::\|'\w\)\%(\w\|::\|'\w\)*\_s*\|+ contained nextgroup=perlSubPrototype,perlComment + +syn match perlFunction +\\_s*+ nextgroup=perlSubName + +if !exists("perl_no_scope_in_variables") + syn match perlFunctionPRef "\h\w*::" contained + syn match perlFunctionName "\h\w*[^:]" contained +else + syn match perlFunctionName "\h[[:alnum:]_:]*" contained +endif + +" The => operator forces a bareword to the left of it to be interpreted as +" a string +syn match perlString "\I\@\)\@=" + +" All other # are comments, except ^#! +syn match perlComment "#.*" contains=perlTodo,@Spell extend +syn match perlSharpBang "^#!.*" + +" Formats +syn region perlFormat matchgroup=perlStatementIOFunc start="^\s*\~]\+\%(\.\.\.\)\=" 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__$" skip="." end="." fold + syntax region perlDATA start="^__END__$" skip="." end="." contains=perlPOD,@perlDATA fold +else + syntax region perlDATA start="^__DATA__$" skip="." end="." + syntax region perlDATA start="^__END__$" skip="." end="." contains=perlPOD,@perlDATA +endif + +" +" Folding + +if exists("perl_fold") + " Note: this bit must come before the actual highlighting of the "package" + " keyword, otherwise this will screw up Pod lines that match /^package/ + 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") + if exists("perl_fold_anonymous_subs") && perl_fold_anonymous_subs + syn region perlSubFold start="\[^\n;]*{" end="}" transparent fold keepend extend + syn region perlSubFold start="\<\%(BEGIN\|END\|CHECK\|INIT\)\>\s*{" end="}" transparent fold keepend + else + syn region perlSubFold start="^\z(\s*\)\.*[^};]$" end="^\z1}\s*\%(#.*\)\=$" transparent fold keepend + syn region perlSubFold start="^\z(\s*\)\<\%(BEGIN\|END\|CHECK\|INIT\|UNITCHECK\)\>.*[^};]$" end="^\z1}\s*$" transparent fold keepend + endif + endif + + if exists("perl_fold_blocks") + syn region perlBlockFold start="^\z(\s*\)\%(if\|elsif\|unless\|for\|while\|until\|given\)\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 + +command -nargs=+ HiLink hi def link + +" NOTE: If you're linking new highlight groups to perlString, please also put +" them into b:match_skip in ftplugin/perl.vim. + +" 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 Keyword +HiLink perlSubName Function +HiLink perlSubPrototype Type +HiLink perlSubAttributes PreProc +HiLink perlSubAttributesCont perlSubAttributes +HiLink perlComment Comment +HiLink perlTodo Todo +if exists("perl_string_as_statement") + HiLink perlStringStartEnd perlStatement +else + HiLink perlStringStartEnd perlString +endif +HiLink perlVStringV perlStringStartEnd +HiLink perlList perlStatement +HiLink perlMisc perlStatement +HiLink perlVarPlain perlIdentifier +HiLink perlVarPlain2 perlIdentifier +HiLink perlArrow perlIdentifier +HiLink perlFiledescRead perlIdentifier +HiLink perlFiledescStatement perlIdentifier +HiLink perlVarSimpleMember perlIdentifier +HiLink perlVarSimpleMemberName perlString +HiLink perlVarNotInMatches perlIdentifier +HiLink perlVarSlash perlIdentifier +HiLink perlQQ perlString +HiLink perlHereDoc perlString +HiLink perlStringUnexpanded perlString +HiLink perlSubstitutionSQ perlString +HiLink perlSubstitutionGQQ perlString +HiLink perlTranslationGQ 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 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 perlStatementInclude perlStatement +HiLink perlStatementProc perlStatement +HiLink perlStatementSocket perlStatement +HiLink perlStatementIPC perlStatement +HiLink perlStatementNetwork perlStatement +HiLink perlStatementPword perlStatement +HiLink perlStatementTime perlStatement +HiLink perlStatementMisc perlStatement +HiLink perlStatementIndirObj 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 perlDATA perlComment + +" NOTE: Due to a bug in Vim (or more likely, a misunderstanding on my part), +" I had to remove the transparent property from the following regions +" in order to get them to highlight correctly. Feel free to remove +" these and reinstate the transparent property if you know how. +HiLink perlParensSQ perlString +HiLink perlBracketsSQ perlString +HiLink perlBracesSQ perlString +HiLink perlAnglesSQ perlString + +HiLink perlParensDQ perlString +HiLink perlBracketsDQ perlString +HiLink perlBracesDQ perlString +HiLink perlAnglesDQ perlString + +HiLink perlSpecialStringU2 perlString + +" Possible errors +HiLink perlNotEmptyLine Error +HiLink perlElseIfError Error +HiLink perlSubPrototypeError Error +HiLink perlSubError Error + +delcommand HiLink + +" Syncing to speed up processing +" +if !exists("perl_no_sync_on_sub") + syn sync match perlSync grouphere NONE "^\s*\" + syn sync match perlSync grouphere NONE "^}" +endif + +if !exists("perl_no_sync_on_global_var") + syn sync match perlSync grouphere NONE "^$\I[[:alnum:]_:]+\s*=\s*{" + syn sync match perlSync grouphere NONE "^[@%]\I[[:alnum:]_:]+\s*=\s*(" +endif + +if exists("perl_sync_dist") + execute "syn sync maxlines=" . perl_sync_dist +else + syn sync maxlines=100 +endif + +syn sync match perlSyncPOD grouphere perlPOD "^=pod" +syn sync match perlSyncPOD grouphere perlPOD "^=head" +syn sync match perlSyncPOD grouphere perlPOD "^=item" +syn sync match perlSyncPOD grouphere NONE "^=cut" + +let b:current_syntax = "perl" + +if exists('®expengine') + let ®expengine=s:regexpengine + unlet s:regexpengine +endif + +let &cpo = s:cpo_save +unlet s:cpo_save + +" XXX Change to sts=4:sw=4 +" vim:ts=8:sts=2:sw=2:expandtab:ft=vim diff --git a/runtime/syntax/perl6.vim b/runtime/syntax/perl6.vim new file mode 100644 index 0000000000..3d82ced89f --- /dev/null +++ b/runtime/syntax/perl6.vim @@ -0,0 +1,2255 @@ +" Vim syntax file +" Language: Perl 6 +" Maintainer: vim-perl +" Homepage: http://github.com/vim-perl/vim-perl/tree/master +" Bugs/requests: http://github.com/vim-perl/vim-perl/issues +" Last Change: 2013-07-21 + +" Contributors: Luke Palmer +" Moritz Lenz +" Hinrik Örn Sigurðsson +" +" This is a big undertaking. Perl 6 is the sort of language that only Perl +" can parse. But I'll do my best to get vim to. +" +" You can associate the extension ".pl" with the filetype "perl6" by setting +" autocmd BufNewFile,BufRead *.pl setf perl6 +" in your ~/.vimrc. But that will infringe on Perl 5, so you might want to +" put a modeline near the beginning or end of your Perl 6 files instead: +" # vim: filetype=perl6 + +" TODO: +" * Deal with s:Perl5// +" * m:s// is a match, not a substitution +" * Make these highlight as strings, not operators: +" <==> <=:=> <===> <=~> <« »> «>» «<» +" * Allow more keywords to match as function calls(leave() is export(), etc) +" * Optimization: use nextgroup instead of lookaround (:help syn-nextgroup) +" * Fix s''' substitutions being matched as package names +" * Match s/// and m/// better, so things like "$s/" won't match +" * Add more support for folding (:help syn-fold) +" * Add more syntax syncing hooks (:help syn-sync) +" * Q//: +" :to, :heredoc +" interpolate \q:s{$scalar} (though the spec isn't very clear on it) +" +" Impossible TODO?: +" * Unspace +" * Unicode bracketing characters for quoting (there are so many) +" * Various tricks depending on context. I.e. we can't know when Perl +" expects «*» to be a string or a hyperoperator. The latter is presumably +" more common, so that's what we assume. +" * Selective highlighting of Pod formatting codes with the :allow option +" * Arbitrary number, order, and negation of adverbs to Q//, q//, qq//. +" Currently only the first adverb is considered significant. Anything +" more would require an exponential amount of regexes, making this +" already slow syntax file even slower. +" +" If you want to have Pir code inside Q:PIR// strings highlighted, do: +" let perl6_embedded_pir=1 +" +" The above requires pir.vim, which you can find in Parrot's repository: +" https://svn.parrot.org/parrot/trunk/editor/ +" +" Some less than crucial things have been made optional to speed things up. +" Look at the comments near the if/else branches in this file to see exactly +" which features are affected. "perl6_extended_all" enables everything. +" +" The defaults are: +" +" unlet perl6_extended_comments +" unlet perl6_extended_q +" unlet perl6_extended_all + +" 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:keepcpo= &cpo +set cpo&vim + +" identifiers +syn match p6Normal display "\K\%(\k\|[-']\K\@=\)*" + +" This is used in the for loops below +" Don't use the "syn keyword" construct because that always has higher +" priority than matches/regions, so the words can't be autoquoted with +" the "=>" and "p5=>" operators. All the lookaround stuff is to make sure +" we don't match them as part of some other identifier. +let s:before_keyword = " display \"\\%(\\k\\|\\K\\@<=[-']\\)\\@.;\\]" +syn match p6Operator display "\%(:\@\)" +" "i" requires a digit to the left, and no keyword char to the right +syn match p6Operator display "\d\@<=i\k\@!" +" index overloading +syn match p6Operator display "\%(&\.(\@=\|@\.\[\@=\|%\.{\@=\)" + +" all infix operators except nonassocative ones +let s:infix_a = [ + \ "div % mod +& +< +> \\~& ?& \\~< \\~> +| +\\^ \\~| \\~\\^ ?| ?\\^ xx x", + \ "\\~ && & also <== ==> <<== ==>> == != < <= > >= \\~\\~ eq ne lt le gt", + \ "ge =:= === eqv before after \\^\\^ min max \\^ff ff\\^ \\^ff\\^", + \ "\\^fff fff\\^ \\^fff\\^ fff ff ::= := \\.= => , : p5=> Z minmax", + \ "\\.\\.\\. and andthen or orelse xor \\^ += -= /= \\*= \\~= //= ||=", + \ "+ - \\*\\* \\* // / \\~ || |", +\ ] +" nonassociative infix operators +let s:infix_n = "but does <=> leg cmp \\.\\. \\.\\.\\^\\^ \\^\\.\\. \\^\\.\\.\\^" + +let s:infix_a_long = join(s:infix_a, " ") +let s:infix_a_words = split(s:infix_a_long) +let s:infix_a_pattern = join(s:infix_a_words, "\\|") + +let s:infix_n_words = split(s:infix_n) +let s:infix_n_pattern = join(s:infix_n_words, "\\|") + +let s:both = [s:infix_a_pattern, s:infix_n_pattern] +let s:infix = join(s:both, "\\|") + +let s:infix_assoc = "!\\?\\%(" . s:infix_a_pattern . "\\)" +let s:infix = "!\\?\\%(" . s:infix . "\\)" + +unlet s:infix_a s:infix_a_long s:infix_a_words s:infix_a_pattern +unlet s:infix_n s:infix_n_pattern s:both + +" [+] reduce +exec "syn match p6ReduceOp display \"\\k\\@" + +" does is a type constraint sometimes +syn match p6TypeConstraint display "does\%(\s*\%(\k\|[-']\K\@=\)\)\@=" + +" int is a type sometimes +syn match p6Type display "\\%(\s*(\|\s\+\d\)\@!" + +" these Routine names are also Properties, if preceded by "is" +syn match p6Property display "\%(is\s\+\)\@<=\%(signature\|context\|also\|shape\)" + +" The sigil in ::*Package +syn match p6PackageTwigil display "\%(::\)\@<=\*" + +" $ +syn region p6MatchVarSigil + \ matchgroup=p6Variable + \ start="\$\%(<<\@!\)\@=" + \ end=">\@<=" + \ contains=p6MatchVar + +syn region p6MatchVar + \ matchgroup=p6Twigil + \ start="<" + \ end=">" + \ contained + +" Contextualizers +syn match p6Context display "\<\%(item\|list\|slice\|hash\)\>" +syn match p6Context display "\%(\$\|@\|%\|&\|@@\)(\@=" + +" the "$" placeholder in "$var1, $, var2 = @list" +syn match p6Placeholder display "\%(,\s*\)\@<=\$\%(\K\|\%([.^*?=!~]\|:\@]*>\|«[^»]*»\|{[^}]*}\)\)*\)\.\?\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)\)" + \ start="\ze\z(\$\%(\%(\%(\%([.^*?=!~]\|:\@]*>\|«[^»]*»\|{[^}]*}\)\)*\)\.\?\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)\)" + \ end="\z1\zs" + \ contained + \ contains=TOP + \ keepend + +syn region p6InterpArray + \ matchgroup=p6Context + \ start="@\ze()\@!" + \ start="@@\ze()\@!" + \ skip="([^)]*)" + \ end=")\zs" + \ contained + \ contains=TOP + +syn region p6InterpHash + \ start="\ze\z(%\$*\%(\%(\%(!\|/\|¢\)\|\%(\%(\%([.^*?=!~]\|:\@]*>\|«[^»]*»\|{[^}]*}\)\)*\)\.\?\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)\)" + \ end="\z1\zs" + \ contained + \ contains=TOP + \ keepend + +syn region p6InterpHash + \ matchgroup=p6Context + \ start="%\ze()\@!" + \ skip="([^)]*)" + \ end=")\zs" + \ contained + \ contains=TOP + +syn region p6InterpFunction + \ start="\ze\z(&\%(\%(!\|/\|¢\)\|\%(\%(\%([.^*?=!~]\|:\@]*>\|«[^»]*»\|{[^}]*}\)\)*\)\.\?\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)\)" + \ end="\z1\zs" + \ contained + \ contains=TOP + \ keepend + +syn region p6InterpFunction + \ matchgroup=p6Context + \ start="&\ze()\@!" + \ skip="([^)]*)" + \ end=")\zs" + \ contained + \ contains=TOP + +syn region p6InterpClosure + \ start="\\\@" contained +syn match p6EscCloseFrench display "\\»" contained +syn match p6EscBackTick display "\\`" contained +syn match p6EscForwardSlash display "\\/" contained +syn match p6EscVerticalBar display "\\|" contained +syn match p6EscExclamation display "\\!" contained +syn match p6EscComma display "\\," contained +syn match p6EscDollar display "\\\$" contained +syn match p6EscCloseCurly display "\\}" contained +syn match p6EscCloseBracket display "\\\]" contained + +" misc escapes +syn match p6EscOctOld display "\\\d\{1,3}" contained +syn match p6EscNull display "\\0\d\@!" contained +syn match p6EscCodePoint display "\%(\\c\)\@<=\%(\d\|\S\|\[\)\@=" contained nextgroup=p6CodePoint +syn match p6EscHex display "\%(\\x\)\@<=\%(\x\|\[\)\@=" contained nextgroup=p6HexSequence +syn match p6EscOct display "\%(\\o\)\@<=\%(\o\|\[\)\@=" contained nextgroup=p6OctSequence +syn match p6EscQQ display "\\qq" contained nextgroup=p6QQSequence +syn match p6EscOpenCurly display "\\{" contained +syn match p6EscHash display "\\#" contained +syn match p6EscBackSlash display "\\\\" contained + +syn region p6QQSequence + \ matchgroup=p6Escape + \ start="\[" + \ skip="\[[^\]]*]" + \ end="]" + \ contained + \ transparent + \ contains=@p6Interp_qq + +syn match p6CodePoint display "\%(\d\+\|\S\)" contained +syn region p6CodePoint + \ matchgroup=p6Escape + \ start="\[" + \ end="]" + \ contained + +syn match p6HexSequence display "\x\+" contained +syn region p6HexSequence + \ matchgroup=p6Escape + \ start="\[" + \ end="]" + \ contained + +syn match p6OctSequence display "\o\+" contained +syn region p6OctSequence + \ matchgroup=p6Escape + \ start="\[" + \ end="]" + \ contained + +" matches :key, :!key, :$var, :key, etc +" Since we don't know in advance how the adverb ends, we use a trick. +" Consume nothing with the start pattern (\ze at the beginning), +" while capturing the whole adverb into \z1 and then putting it before +" the match start (\zs) of the end pattern. +syn region p6Adverb + \ start="\ze\z(:!\?\K\%(\k\|[-']\K\@=\)*\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\?\)" + \ start="\ze\z(:!\?[@$%]\$*\%(::\|\%(\$\@<=\d\+\|!\|/\|¢\)\|\%(\%([.^*?=!~]\|:\@ +" FIXME: not sure how to distinguish this from the "less than" operator +" in all cases. For now, it matches if any of the following is true: +" +" * There is whitespace missing on either side of the "<", since +" people tend to put spaces around "less than" +" * It comes after "enum", "for", "any", "all", or "none" +" * It's the first or last thing on a line (ignoring whitespace) +" * It's preceded by "= " +" +" It never matches when: +" +" * Preceded by [<+~=] (e.g. <>, =<$foo>) +" * Followed by [-=] (e.g. <--, <=, <==) +syn region p6StringAngle + \ matchgroup=p6Quote + \ start="\%(\<\%(enum\|for\|any\|all\|none\)\>\s*(\?\s*\)\@<=<\%(<\|=>\|[-=]\{1,2}>\@!\)\@!" + \ start="\%(\s\|[<+~=]\)\@\|[-=]\{1,2}>\@!\)\@!" + \ start="[<+~=]\@\|[-=]\{1,2}>\@!\)\@!" + \ start="\%(^\s*\)\@<=<\%(<\|=>\|[-=]\{1,2}>\@!\)\@!" + \ start="[<+~=]\@\|[-=]\{1,2}>\@!\)\@!" + \ skip="\\\@" + \ end=">" + \ contains=p6InnerAnglesOne,p6EscBackSlash,p6EscCloseAngle + +syn region p6InnerAnglesOne + \ matchgroup=p6StringAngle + \ start="<" + \ skip="\\\@" + \ end=">" + \ transparent + \ contained + \ contains=p6InnerAnglesOne + +" <> +syn region p6StringAngles + \ matchgroup=p6Quote + \ start="<<=\@!" + \ skip="\\\@" + \ end=">>" + \ contains=p6InnerAnglesTwo,@p6Interp_qq,p6Comment,p6EscHash,p6EscCloseAngle,p6Adverb,p6StringSQ,p6StringDQ + +syn region p6InnerAnglesTwo + \ matchgroup=p6StringAngles + \ start="<<" + \ skip="\\\@" + \ end=">>" + \ transparent + \ contained + \ contains=p6InnerAnglesTwo + +" «words» +syn region p6StringFrench + \ matchgroup=p6Quote + \ start="«" + \ skip="\\\@" nextgroup=p6QPairs skipwhite skipempty +syn match p6QPairs contained transparent skipwhite skipempty nextgroup=p6StringQ,p6StringQ_PIR "\%(\_s*:!\?\K\%(\k\|[-']\K\@=\)*\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\?\)*" + +if exists("perl6_embedded_pir") + syn include @p6PIR syntax/pir.vim +endif + +" hardcoded set of delimiters +let s:delims = [ + \ ["\\\"", "\\\"", "p6EscDoubleQuote", "\\\\\\@", "p6EscCloseAngle", "\\%(\\\\\\@\\|<[^>]*>\\)"], + \ ["«", "»", "p6EscCloseFrench", "\\%(\\\\\\@>", "p6EscCloseAngle", "\\%(\\\\\\@>\\|<<\\%([^>]\\|>>\\@!\\)*>>\\)"]) + call add(s:delims, ["\\s\\@<=<<<", ">>>", "p6EscCloseAngle", "\\%(\\\\\\@>>\\|<<<\\%([^>]\\|>\\%(>>\\)\\@!\\)*>>>\\)"]) +endif + +if !exists("perl6_extended_q") && !exists("perl6_extended_all") + " simple version, no special highlighting within the string + for [start_delim, end_delim, end_group, skip] in s:delims + exec "syn region p6StringQ matchgroup=p6Quote start=\"".start_delim."\" skip=\"".skip."\" end=\"".end_delim."\" contains=".end_group." contained" + endfor + + if exists("perl6_embedded_pir") + " highlight embedded PIR code + for [start_delim, end_delim, end_group, skip] in s:delims + exec "syn region p6StringQ_PIR matchgroup=p6Quote start=\"\\%(Q\\s*:PIR\\s*\\)\\@<=".start_delim."\" skip=\"".skip."\" end=\"".end_delim."\" contains=@p6PIR,".end_group." contained" + endfor + endif +else + let s:before = "syn region p6StringQ matchgroup=p6Quote start=\"\\%(" + let s:after = "\\%(\\_s*:!\\?\\K\\%(\\k\\|[-']\\K\\@=\\)*\\%(([^)]*)\\|\\[[^\\]]*]\\|<[^>]*>\\|«[^»]*»\\|{[^}]*}\\)\\?\\)*\\_s*\\)\\@<=" + + let s:adverbs = [ + \ ["s", "scalar"], + \ ["a", "array"], + \ ["h", "hash"], + \ ["f", "function"], + \ ["c", "closure"], + \ ["b", "backslash"], + \ ["w", "words"], + \ ["ww", "quotewords"], + \ ["x", "exec"], + \ ] + + " these can't be conjoined with q and qq (e.g. as qqq and qqqq) + let s:q_adverbs = [ + \ ["q", "single"], + \ ["qq", "double"], + \ ] + + for [start_delim, end_delim, end_group, skip] in s:delims + " Q, q, and qq with any number of (ignored) adverbs + exec s:before ."Q". s:after .start_delim."\" end=\"". end_delim ."\""." contained" + exec s:before ."q". s:after .start_delim ."\" skip=\"". skip ."\" end=\"". end_delim ."\" contains=". end_group .",@p6Interp_q"." contained" + exec s:before ."qq". s:after .start_delim ."\" skip=\"". skip ."\" end=\"". end_delim ."\" contains=". end_group .",@p6Interp_qq"." contained" + + for [short, long] in s:adverbs + " Qs, qs, qqs, Qa, qa, qqa, etc, with ignored adverbs + exec s:before ."Q".short. s:after .start_delim ."\" end=\"". end_delim ."\" contains=@p6Interp_".long." contained" + exec s:before ."q".short. s:after .start_delim ."\" skip=\"". skip ."\" end=\"". end_delim ."\" contains=". end_group .",@p6Interp_q,@p6Interp_".long." contained" + exec s:before ."qq".short. s:after .start_delim ."\" skip=\"". skip ."\" end=\"". end_delim ."\" contains=". end_group .",@p6Interp_qq,@p6Interp_".long." contained" + + " Q, q, and qq, with one significant adverb + exec s:before ."Q\\s*:\\%(".short."\\|".long."\\)". s:after .start_delim ."\" end=\"". end_delim ."\" contains=@p6Interp_".long." contained" + for [q_short, q_long] in s:q_adverbs + exec s:before ."Q\\s*:\\%(".q_short."\\|".q_long."\\)". s:after .start_delim ."\" end=\"". end_delim ."\" contains=@p6Interp_".q_long." contained" + endfor + exec s:before ."q\\s*:\\%(".short."\\|".long."\\)". s:after .start_delim ."\" skip=\"". skip ."\" end=\"". end_delim ."\" contains=". end_group .",@p6Interp_q,@p6Interp_".long." contained" + exec s:before ."qq\\s*:\\%(".short."\\|".long."\\)". s:after .start_delim ."\" skip=\"". skip ."\" end=\"". end_delim ."\" contains=". end_group .",@p6Interp_qq,@p6Interp_".long." contained" + + for [short2, long2] in s:adverbs + " Qs, qs, qqs, Qa, qa, qqa, etc, with one significant adverb + exec s:before ."Q".short."\\s*:\\%(".short2."\\|".long2."\\)". s:after .start_delim ."\" end=\"". end_delim ."\" contains=@p6Interp_".long.",@p6Interp_".long2." contained" + for [q_short2, q_long2] in s:q_adverbs + exec s:before ."Q".short."\\s*:\\%(".q_short2."\\|".q_long2."\\)". s:after .start_delim ."\" end=\"". end_delim ."\" contains=@p6Interp_".long.",@p6Interp_".q_long2." contained" + endfor + exec s:before ."q".short."\\s*:\\%(".short2."\\|".long2."\\)". s:after .start_delim ."\" skip=\"". skip ."\" end=\"". end_delim ."\" contains=". end_group .",@p6Interp_q,@p6Interp_".long.",@p6Interp_".long2." contained" + exec s:before ."qq".short."\\s*:\\%(".short2."\\|".long2."\\)". s:after .start_delim ."\" skip=\"". skip ."\" end=\"". end_delim ."\" contains=". end_group .",@p6Interp_qq,@p6Interp_".long.",@p6Interp_".long2." contained" + endfor + endfor + endfor + unlet s:before s:after s:adverbs s:q_adverbs +endif +unlet s:delims + +" Match these so something else above can't. E.g. the "q" in "role q { }" +" should not be considered a string +syn match p6Normal display "\%(\<\%(role\|grammar\|slang\)\s\+\)\@<=\K\%(\k\|[-']\K\@=\)*" + +" :key +syn match p6Operator display ":\@ and p5=> autoquoting +syn match p6StringP5Auto display "\K\%(\k\|[-']\K\@=\)*\ze\s\+p5=>" +syn match p6StringAuto display "\K\%(\k\|[-']\K\@=\)*\ze\%(p5\)\@" +syn match p6StringAuto display "\K\%(\k\|[-']\K\@=\)*\ze\s\+=>" +syn match p6StringAuto display "\K\%(\k\|[-']\K\@=\)*p5\ze=>" + +" Hyperoperators. Needs to come after the quoting operators (<>, «», etc) +exec "syn match p6HyperOp display \"»" .s:infix."»\\?\"" +exec "syn match p6HyperOp display \"«\\?".s:infix."«\"" +exec "syn match p6HyperOp display \"»" .s:infix."«\"" +exec "syn match p6HyperOp display \"«" .s:infix. "»\"" + +exec "syn match p6HyperOp display \">>" .s:infix."\\%(>>\\)\\?\"" +exec "syn match p6HyperOp display \"\\%(<<\\)\\?".s:infix."<<\"" +exec "syn match p6HyperOp display \">>" .s:infix."<<\"" +exec "syn match p6HyperOp display \"<<" .s:infix.">>\"" +unlet s:infix + +" Regexes and grammars + +syn match p6RegexName display "\%(\<\%(regex\|rule\|token\)\s\+\)\@<=\K\%(\k\|[-']\K\@=\)*" nextgroup=p6RegexBlockCrap skipwhite skipempty +syn match p6RegexBlockCrap "[^{]*" nextgroup=p6RegexBlock skipwhite skipempty transparent contained + +syn region p6RegexBlock + \ matchgroup=p6Normal + \ start="{" + \ end="}" + \ contained + \ contains=@p6Regexen,@p6Variables + +" Perl 6 regex bits + +syn cluster p6Regexen + \ add=p6RxMeta + \ add=p6RxEscape + \ add=p6EscHex + \ add=p6EscOct + \ add=p6EscNull + \ add=p6RxAnchor + \ add=p6RxCapture + \ add=p6RxGroup + \ add=p6RxAlternation + \ add=p6RxAdverb + \ add=p6RxAdverbArg + \ add=p6RxStorage + \ add=p6RxAssertion + \ add=p6RxQuoteWords + \ add=p6RxClosure + \ add=p6RxStringSQ + \ add=p6RxStringDQ + \ add=p6Comment + +syn match p6RxMeta display contained ".\%(\k\|\s\)\@" + \ contained + \ contains=@p6Regexen,@p6Variables,p6RxCharClass,p6RxAssertCall +syn region p6RxAssertCall + \ matchgroup=p6Normal + \ start="\%(::\|\%(\K\%(\k\|[-']\K\@=\)*\)\)\@<=(\@=" + \ end=")\@<=" + \ contained + \ contains=TOP +syn region p6RxCharClass + \ matchgroup=p6StringSpecial2 + \ start="\%(<[-!+?]\?\)\@<=\[" + \ skip="\\]" + \ end="]" + \ contained + \ contains=p6RxRange,p6RxEscape,p6EscHex,p6EscOct,p6EscNull +syn region p6RxQuoteWords + \ matchgroup=p6StringSpecial2 + \ start="< " + \ end=">" + \ contained +syn region p6RxAdverb + \ start="\ze\z(:!\?\K\%(\k\|[-']\K\@=\)*\)" + \ end="\z1\zs" + \ contained + \ contains=TOP + \ keepend +syn region p6RxAdverbArg + \ start="\%(:!\?\K\%(\k\|[-']\K\@=\)*\)\@<=(" + \ skip="([^)]*)" + \ end=")" + \ contained + \ contains=TOP +syn region p6RxStorage + \ matchgroup=p6Operator + \ start="\%(^\s*\)\@<=:\%(my\>\|temp\>\)\@=" + \ end="$" + \ contains=TOP + \ contained + +" Perl 5 regex bits + +syn cluster p6RegexP5Base + \ add=p6RxP5Escape + \ add=p6RxP5Oct + \ add=p6RxP5Hex + \ add=p6RxP5EscMeta + \ add=p6RxP5CodePoint + \ add=p6RxP5Prop + +" normal regex stuff +syn cluster p6RegexP5 + \ add=@p6RegexP5Base + \ add=p6RxP5Quantifier + \ add=p6RxP5Meta + \ add=p6RxP5QuoteMeta + \ add=p6RxP5ParenMod + \ add=p6RxP5Verb + \ add=p6RxP5Count + \ add=p6RxP5Named + \ add=p6RxP5ReadRef + \ add=p6RxP5WriteRef + \ add=p6RxP5CharClass + \ add=p6RxP5Anchor + +" inside character classes +syn cluster p6RegexP5Class + \ add=@p6RegexP5Base + \ add=p6RxP5Posix + \ add=p6RxP5Range + +syn match p6RxP5Escape display contained "\\\S" +syn match p6RxP5CodePoint display contained "\\c\S\@=" nextgroup=p6RxP5CPId +syn match p6RxP5CPId display contained "\S" +syn match p6RxP5Oct display contained "\\\%(\o\{1,3}\)\@=" nextgroup=p6RxP5OctSeq +syn match p6RxP5OctSeq display contained "\o\{1,3}" +syn match p6RxP5Anchor display contained "[\^$]" +syn match p6RxP5Hex display contained "\\x\%({\x\+}\|\x\{1,2}\)\@=" nextgroup=p6RxP5HexSeq +syn match p6RxP5HexSeq display contained "\x\{1,2}" +syn region p6RxP5HexSeq + \ matchgroup=p6RxP5Escape + \ start="{" + \ end="}" + \ contained +syn region p6RxP5Named + \ matchgroup=p6RxP5Escape + \ start="\%(\\N\)\@<={" + \ end="}" + \ contained +syn match p6RxP5Quantifier display contained "\%([+*]\|(\@" + \ contained +syn match p6RxP5WriteRef display contained "\\g\%(\d\|{\)\@=" nextgroup=p6RxP5WriteRefId +syn match p6RxP5WriteRefId display contained "\d\+" +syn region p6RxP5WriteRefId + \ matchgroup=p6RxP5Escape + \ start="{" + \ end="}" + \ contained +syn match p6RxP5Prop display contained "\\[pP]\%(\a\|{\)\@=" nextgroup=p6RxP5PropId +syn match p6RxP5PropId display contained "\a" +syn region p6RxP5PropId + \ matchgroup=p6RxP5Escape + \ start="{" + \ end="}" + \ contained +syn match p6RxP5Meta display contained "[(|).]" +syn match p6RxP5ParenMod display contained "(\@<=?\@=" nextgroup=p6RxP5Mod,p6RxP5ModName,p6RxP5Code +syn match p6RxP5Mod display contained "?\%(<\?=\|<\?!\|[#:|]\)" +syn match p6RxP5Mod display contained "?-\?[impsx]\+" +syn match p6RxP5Mod display contained "?\%([-+]\?\d\+\|R\)" +syn match p6RxP5Mod display contained "?(DEFINE)" +syn match p6RxP5Mod display contained "?\%(&\|P[>=]\)" nextgroup=p6RxP5ModDef +syn match p6RxP5ModDef display contained "\h\w*" +syn region p6RxP5ModName + \ matchgroup=p6StringSpecial + \ start="?'" + \ end="'" + \ contained +syn region p6RxP5ModName + \ matchgroup=p6StringSpecial + \ start="?P\?<" + \ end=">" + \ contained +syn region p6RxP5Code + \ matchgroup=p6StringSpecial + \ start="??\?{" + \ end="})\@=" + \ contained + \ contains=TOP +syn match p6RxP5EscMeta display contained "\\[?*.{}()[\]|\^$]" +syn match p6RxP5Count display contained "\%({\d\+\%(,\%(\d\+\)\?\)\?}\)\@=" nextgroup=p6RxP5CountId +syn region p6RxP5CountId + \ matchgroup=p6RxP5Escape + \ start="{" + \ end="}" + \ contained +syn match p6RxP5Verb display contained "(\@<=\*\%(\%(PRUNE\|SKIP\|THEN\)\%(:[^)]*\)\?\|\%(MARK\|\):[^)]*\|COMMIT\|F\%(AIL\)\?\|ACCEPT\)" +syn region p6RxP5QuoteMeta + \ matchgroup=p6RxP5Escape + \ start="\\Q" + \ end="\\E" + \ contained + \ contains=@p6Variables,p6EscBackSlash +syn region p6RxP5CharClass + \ matchgroup=p6StringSpecial + \ start="\[\^\?" + \ skip="\\]" + \ end="]" + \ contained + \ contains=@p6RegexP5Class +syn region p6RxP5Posix + \ matchgroup=p6RxP5Escape + \ start="\[:" + \ end=":]" + \ contained +syn match p6RxP5Range display contained "-" + +" 'string' inside a regex +syn region p6RxStringSQ + \ matchgroup=p6Quote + \ start="'" + \ skip="\\\@, mm, rx +syn region p6Match + \ matchgroup=p6Quote + \ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@\@!>\@!" + \ skip="\\>" + \ end=">" + \ contains=@p6Regexen,@p6Variables + +" m«foo», mm«foo», rx«foo» +syn region p6Match + \ matchgroup=p6Quote + \ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@ +syn region p6Match + \ matchgroup=p6Quote + \ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@\@!" + \ skip="\\>" + \ end=">" + \ contains=@p6Regexen,@p6Variables + +" s«foo» +syn region p6Match + \ matchgroup=p6Quote + \ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@ +syn region p6Match + \ matchgroup=p6Quote + \ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@\@!" + \ skip="\\>" + \ end=">" + \ contains=@p6RegexP5,p6Variables + +" m:P5«» +syn region p6Match + \ matchgroup=p6Quote + \ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@]*>" + \ end=">" + \ matchgroup=p6Error + \ start="^#<" + \ contains=p6Attention,p6Comment +syn region p6Comment + \ matchgroup=p6Comment + \ start="^\@]\|>>\@!\)*>>" + \ end=">>" + \ matchgroup=p6Error + \ start="^#<<" + \ contains=p6Attention,p6Comment + syn region p6Comment + \ matchgroup=p6Comment + \ start="^\@]\|>\%(>>\)\@!\)*>>>" + \ end=">>>" + \ matchgroup=p6Error + \ start="^#<<<" + \ contains=p6Attention,p6Comment + + syn region p6Comment + \ matchgroup=p6Comment + \ start="^\@" + \ end="^\ze\%(\s*$\|=\K\)" + \ contains=p6PodAbbrCodeType + \ keepend + +syn region p6PodAbbrCodeType + \ matchgroup=p6PodType + \ start="\K\k*" + \ end="^\ze\%(\s*$\|=\K\)" + \ contained + \ contains=p6PodName,p6PodAbbrCode + +syn region p6PodAbbrCode + \ start="^" + \ end="^\ze\%(\s*$\|=\K\)" + \ contained + +" Abbreviated blocks (everything is a comment) +syn region p6PodAbbrRegion + \ matchgroup=p6PodPrefix + \ start="^=\zecomment\>" + \ end="^\ze\%(\s*$\|=\K\)" + \ contains=p6PodAbbrCommentType + \ keepend + +syn region p6PodAbbrCommentType + \ matchgroup=p6PodType + \ start="\K\k*" + \ end="^\ze\%(\s*$\|=\K\)" + \ contained + \ contains=p6PodComment,p6PodAbbrNoCode + +" Abbreviated blocks (implicit code allowed) +syn region p6PodAbbrRegion + \ matchgroup=p6PodPrefix + \ start="^=\ze\%(pod\|item\|nested\|\u\+\)\>" + \ end="^\ze\%(\s*$\|=\K\)" + \ contains=p6PodAbbrType + \ keepend + +syn region p6PodAbbrType + \ matchgroup=p6PodType + \ start="\K\k*" + \ end="^\ze\%(\s*$\|=\K\)" + \ contained + \ contains=p6PodName,p6PodAbbr + +syn region p6PodAbbr + \ start="^" + \ end="^\ze\%(\s*$\|=\K\)" + \ contained + \ contains=@p6PodFormat,p6PodImplicitCode + +" Abbreviated block to end-of-file +syn region p6PodAbbrRegion + \ matchgroup=p6PodPrefix + \ start="^=\zeEND\>" + \ end="\%$" + \ contains=p6PodAbbrEOFType + \ keepend + +syn region p6PodAbbrEOFType + \ matchgroup=p6PodType + \ start="\K\k*" + \ end="\%$" + \ contained + \ contains=p6PodName,p6PodAbbrEOF + +syn region p6PodAbbrEOF + \ start="^" + \ end="\%$" + \ contained + \ contains=@p6PodNestedBlocks,@p6PodFormat,p6PodImplicitCode + +" Directives +syn region p6PodDirectRegion + \ matchgroup=p6PodPrefix + \ start="^=\%(config\|use\)\>" + \ end="^\ze\%([^=]\|=\K\|\s*$\)" + \ contains=p6PodDirectArgRegion + \ keepend + +syn region p6PodDirectArgRegion + \ matchgroup=p6PodType + \ start="\S\+" + \ end="^\ze\%([^=]\|=\K\|\s*$\)" + \ contained + \ contains=p6PodDirectConfigRegion + +syn region p6PodDirectConfigRegion + \ start="" + \ end="^\ze\%([^=]\|=\K\|\s*$\)" + \ contained + \ contains=@p6PodConfig + +" =encoding is a special directive +syn region p6PodDirectRegion + \ matchgroup=p6PodPrefix + \ start="^=encoding\>" + \ end="^\ze\%([^=]\|=\K\|\s*$\)" + \ contains=p6PodEncodingArgRegion + \ keepend + +syn region p6PodEncodingArgRegion + \ matchgroup=p6PodName + \ start="\S\+" + \ end="^\ze\%([^=]\|=\K\|\s*$\)" + \ contained + +" Paragraph blocks (implicit code forbidden) +syn region p6PodParaRegion + \ matchgroup=p6PodPrefix + \ start="^=for\>" + \ end="^\ze\%(\s*$\|=\K\)" + \ contains=p6PodParaNoCodeTypeRegion + \ keepend + \ extend + +syn region p6PodParaNoCodeTypeRegion + \ matchgroup=p6PodType + \ start="\K\k*" + \ end="^\ze\%(\s*$\|=\K\)" + \ contained + \ contains=p6PodParaNoCode,p6PodParaConfigRegion + +syn region p6PodParaConfigRegion + \ start="" + \ end="^\ze\%([^=]\|=\k\@\ze\s*code\>" + \ end="^\ze\%(\s*$\|=\K\)" + \ contains=p6PodParaCodeTypeRegion + \ keepend + \ extend + +syn region p6PodParaCodeTypeRegion + \ matchgroup=p6PodType + \ start="\K\k*" + \ end="^\ze\%(\s*$\|=\K\)" + \ contained + \ contains=p6PodParaCode,p6PodParaConfigRegion + +syn region p6PodParaCode + \ start="^[^=]" + \ end="^\ze\%(\s*$\|=\K\)" + \ contained + +" Paragraph blocks (implicit code allowed) +syn region p6PodParaRegion + \ matchgroup=p6PodPrefix + \ start="^=for\>\ze\s*\%(pod\|item\|nested\|\u\+\)\>" + \ end="^\ze\%(\s*$\|=\K\)" + \ contains=p6PodParaTypeRegion + \ keepend + \ extend + +syn region p6PodParaTypeRegion + \ matchgroup=p6PodType + \ start="\K\k*" + \ end="^\ze\%(\s*$\|=\K\)" + \ contained + \ contains=p6PodPara,p6PodParaConfigRegion + +syn region p6PodPara + \ start="^[^=]" + \ end="^\ze\%(\s*$\|=\K\)" + \ contained + \ contains=@p6PodFormat,p6PodImplicitCode + +" Paragraph block to end-of-file +syn region p6PodParaRegion + \ matchgroup=p6PodPrefix + \ start="^=for\>\ze\s\+END\>" + \ end="\%$" + \ contains=p6PodParaEOFTypeRegion + \ keepend + \ extend + +syn region p6PodParaEOFTypeRegion + \ matchgroup=p6PodType + \ start="\K\k*" + \ end="\%$" + \ contained + \ contains=p6PodParaEOF,p6PodParaConfigRegion + +syn region p6PodParaEOF + \ start="^[^=]" + \ end="\%$" + \ contained + \ contains=@p6PodNestedBlocks,@p6PodFormat,p6PodImplicitCode + +" Delimited blocks (implicit code forbidden) +syn region p6PodDelimRegion + \ matchgroup=p6PodPrefix + \ start="^=begin\>" + \ end="^=end\>" + \ contains=p6PodDelimNoCodeTypeRegion + \ keepend + \ extend + +syn region p6PodDelimNoCodeTypeRegion + \ matchgroup=p6PodType + \ start="\K\k*" + \ end="^\ze=end\>" + \ contained + \ contains=p6PodDelimNoCode,p6PodDelimConfigRegion + +syn region p6PodDelimConfigRegion + \ start="" + \ end="^\ze\%([^=]\|=\K\|\s*$\)" + \ contained + \ contains=@p6PodConfig + +syn region p6PodDelimNoCode + \ start="^" + \ end="^\ze=end\>" + \ contained + \ contains=@p6PodNestedBlocks,@p6PodFormat + +" Delimited blocks (everything is code) +syn region p6PodDelimRegion + \ matchgroup=p6PodPrefix + \ start="^=begin\>\ze\s*code\>" + \ end="^=end\>" + \ contains=p6PodDelimCodeTypeRegion + \ keepend + \ extend + +syn region p6PodDelimCodeTypeRegion + \ matchgroup=p6PodType + \ start="\K\k*" + \ end="^\ze=end\>" + \ contained + \ contains=p6PodDelimCode,p6PodDelimConfigRegion + +syn region p6PodDelimCode + \ start="^" + \ end="^\ze=end\>" + \ contained + \ contains=@p6PodNestedBlocks + +" Delimited blocks (implicit code allowed) +syn region p6PodDelimRegion + \ matchgroup=p6PodPrefix + \ start="^=begin\>\ze\s*\%(pod\|item\|nested\|\u\+\)\>" + \ end="^=end\>" + \ contains=p6PodDelimTypeRegion + \ keepend + \ extend + +syn region p6PodDelimTypeRegion + \ matchgroup=p6PodType + \ start="\K\k*" + \ end="^\ze=end\>" + \ contained + \ contains=p6PodDelim,p6PodDelimConfigRegion + +syn region p6PodDelim + \ start="^" + \ end="^\ze=end\>" + \ contained + \ contains=@p6PodNestedBlocks,@p6PodFormat,p6PodImplicitCode + +" Delimited block to end-of-file +syn region p6PodDelimRegion + \ matchgroup=p6PodPrefix + \ start="^=begin\>\ze\s\+END\>" + \ end="\%$" + \ contains=p6PodDelimEOFTypeRegion + \ extend + +syn region p6PodDelimEOFTypeRegion + \ matchgroup=p6PodType + \ start="\K\k*" + \ end="\%$" + \ contained + \ contains=p6PodDelimEOF,p6PodDelimConfigRegion + +syn region p6PodDelimEOF + \ start="^" + \ end="\%$" + \ contained + \ contains=@p6PodNestedBlocks,@p6PodFormat,p6PodImplicitCode + +syn cluster p6PodConfig + \ add=p6PodConfigOperator + \ add=p6PodExtraConfig + \ add=p6StringAuto + \ add=p6PodAutoQuote + \ add=p6StringSQ + +syn region p6PodParens + \ start="(" + \ end=")" + \ contained + \ contains=p6Number,p6StringSQ + +syn match p6PodAutoQuote display contained "=>" +syn match p6PodConfigOperator display contained ":!\?" nextgroup=p6PodConfigOption +syn match p6PodConfigOption display contained "[^[:space:](<]\+" nextgroup=p6PodParens,p6StringAngle +syn match p6PodExtraConfig display contained "^=" +syn match p6PodVerticalBar display contained "|" +syn match p6PodColon display contained ":" +syn match p6PodSemicolon display contained ";" +syn match p6PodComma display contained "," +syn match p6PodImplicitCode display contained "^\s.*" + +syn region p6PodDelimEndRegion + \ matchgroup=p6PodType + \ start="\%(^=end\>\)\@<=" + \ end="\K\k*" + +" These may appear inside delimited blocks +syn cluster p6PodNestedBlocks + \ add=p6PodAbbrRegion + \ add=p6PodDirectRegion + \ add=p6PodParaRegion + \ add=p6PodDelimRegion + \ add=p6PodDelimEndRegion + +" Pod formatting codes + +syn cluster p6PodFormat + \ add=p6PodFormatOne + \ add=p6PodFormatTwo + \ add=p6PodFormatThree + \ add=p6PodFormatFrench + +" Balanced angles found inside formatting codes. Ensures proper nesting. + +syn region p6PodFormatAnglesOne + \ matchgroup=p6PodFormat + \ start="<" + \ skip="<[^>]*>" + \ end=">" + \ transparent + \ contained + \ contains=p6PodFormatAnglesFrench,p6PodFormatAnglesOne + +syn region p6PodFormatAnglesTwo + \ matchgroup=p6PodFormat + \ start="<<" + \ skip="<<[^>]*>>" + \ end=">>" + \ transparent + \ contained + \ contains=p6PodFormatAnglesFrench,p6PodFormatAnglesOne,p6PodFormatAnglesTwo + +syn region p6PodFormatAnglesThree + \ matchgroup=p6PodFormat + \ start="<<<" + \ skip="<<<[^>]*>>>" + \ end=">>>" + \ transparent + \ contained + \ contains=p6PodFormatAnglesFrench,p6PodFormatAnglesOne,p6PodFormatAnglesTwo,p6PodFormatAnglesThree + +syn region p6PodFormatAnglesFrench + \ matchgroup=p6PodFormat + \ start="«" + \ skip="«[^»]*»" + \ end="»" + \ transparent + \ contained + \ contains=p6PodFormatAnglesFrench,p6PodFormatAnglesOne,p6PodFormatAnglesTwo,p6PodFormatAnglesThree + +" All formatting codes + +syn region p6PodFormatOne + \ matchgroup=p6PodFormatCode + \ start="\u<" + \ skip="<[^>]*>" + \ end=">" + \ contained + \ contains=p6PodFormatAnglesOne,p6PodFormatFrench,p6PodFormatOne + +syn region p6PodFormatTwo + \ matchgroup=p6PodFormatCode + \ start="\u<<" + \ skip="<<[^>]*>>" + \ end=">>" + \ contained + \ contains=p6PodFormatAnglesTwo,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo + +syn region p6PodFormatThree + \ matchgroup=p6PodFormatCode + \ start="\u<<<" + \ skip="<<<[^>]*>>>" + \ end=">>>" + \ contained + \ contains=p6PodFormatAnglesThree,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree + +syn region p6PodFormatFrench + \ matchgroup=p6PodFormatCode + \ start="\u«" + \ skip="«[^»]*»" + \ end="»" + \ contained + \ contains=p6PodFormatAnglesFrench,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree + +" C<> and V<> don't allow nested formatting formatting codes + +syn region p6PodFormatOne + \ matchgroup=p6PodFormatCode + \ start="[CV]<" + \ skip="<[^>]*>" + \ end=">" + \ contained + \ contains=p6PodFormatAnglesOne + +syn region p6PodFormatTwo + \ matchgroup=p6PodFormatCode + \ start="[CV]<<" + \ skip="<<[^>]*>>" + \ end=">>" + \ contained + \ contains=p6PodFormatAnglesTwo + +syn region p6PodFormatThree + \ matchgroup=p6PodFormatCode + \ start="[CV]<<<" + \ skip="<<<[^>]*>>>" + \ end=">>>" + \ contained + \ contains=p6PodFormatAnglesThree + +syn region p6PodFormatFrench + \ matchgroup=p6PodFormatCode + \ start="[CV]«" + \ skip="«[^»]*»" + \ end="»" + \ contained + \ contains=p6PodFormatAnglesFrench + +" L<> can have a "|" separator + +syn region p6PodFormatOne + \ matchgroup=p6PodFormatCode + \ start="L<" + \ skip="<[^>]*>" + \ end=">" + \ contained + \ contains=p6PodFormatAnglesOne,p6PodFormatFrench,p6PodFormatOne,p6PodVerticalBar + +syn region p6PodFormatTwo + \ matchgroup=p6PodFormatCode + \ start="L<<" + \ skip="<<[^>]*>>" + \ end=">>" + \ contained + \ contains=p6PodFormatAnglesTwo,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodVerticalBar + +syn region p6PodFormatThree + \ matchgroup=p6PodFormatCode + \ start="L<<<" + \ skip="<<<[^>]*>>>" + \ end=">>>" + \ contained + \ contains=p6PodFormatAnglesThree,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodVerticalBar + +syn region p6PodFormatFrench + \ matchgroup=p6PodFormatCode + \ start="L«" + \ skip="«[^»]*»" + \ end="»" + \ contained + \ contains=p6PodFormatAnglesFrench,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodVerticalBar + +" E<> can have a ";" separator + +syn region p6PodFormatOne + \ matchgroup=p6PodFormatCode + \ start="E<" + \ skip="<[^>]*>" + \ end=">" + \ contained + \ contains=p6PodFormatAnglesOne,p6PodFormatFrench,p6PodFormatOne,p6PodSemiColon + +syn region p6PodFormatTwo + \ matchgroup=p6PodFormatCode + \ start="E<<" + \ skip="<<[^>]*>>" + \ end=">>" + \ contained + \ contains=p6PodFormatAnglesTwo,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodSemiColon + +syn region p6PodFormatThree + \ matchgroup=p6PodFormatCode + \ start="E<<<" + \ skip="<<<[^>]*>>>" + \ end=">>>" + \ contained + \ contains=p6PodFormatAnglesThree,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodSemiColon + +syn region p6PodFormatFrench + \ matchgroup=p6PodFormatCode + \ start="E«" + \ skip="«[^»]*»" + \ end="»" + \ contained + \ contains=p6PodFormatAnglesFrench,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodSemiColon + +" M<> can have a ":" separator + +syn region p6PodFormatOne + \ matchgroup=p6PodFormatCode + \ start="M<" + \ skip="<[^>]*>" + \ end=">" + \ contained + \ contains=p6PodFormatAnglesOne,p6PodFormatFrench,p6PodFormatOne,p6PodColon + +syn region p6PodFormatTwo + \ matchgroup=p6PodFormatCode + \ start="M<<" + \ skip="<<[^>]*>>" + \ end=">>" + \ contained + \ contains=p6PodFormatAnglesTwo,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodColon + +syn region p6PodFormatThree + \ matchgroup=p6PodFormatCode + \ start="M<<<" + \ skip="<<<[^>]*>>>" + \ end=">>>" + \ contained + \ contains=p6PodFormatAnglesThree,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodColon + +syn region p6PodFormatFrench + \ matchgroup=p6PodFormatCode + \ start="M«" + \ skip="«[^»]*»" + \ end="»" + \ contained + \ contains=p6PodFormatAnglesFrench,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodColon + +" D<> can have "|" and ";" separators + +syn region p6PodFormatOne + \ matchgroup=p6PodFormatCode + \ start="D<" + \ skip="<[^>]*>" + \ end=">" + \ contained + \ contains=p6PodFormatAnglesOne,p6PodFormatFrench,p6PodFormatOne,p6PodVerticalBar,p6PodSemiColon + +syn region p6PodFormatTwo + \ matchgroup=p6PodFormatCode + \ start="D<<" + \ skip="<<[^>]*>>" + \ end=">>" + \ contained + \ contains=p6PodFormatAngleTwo,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodVerticalBar,p6PodSemiColon + +syn region p6PodFormatThree + \ matchgroup=p6PodFormatCode + \ start="D<<<" + \ skip="<<<[^>]*>>>" + \ end=">>>" + \ contained + \ contains=p6PodFormatAnglesThree,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodVerticalBar,p6PodSemiColon + +syn region p6PodFormatFrench + \ matchgroup=p6PodFormatCode + \ start="D«" + \ skip="«[^»]*»" + \ end="»" + \ contained + \ contains=p6PodFormatAnglesFrench,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodVerticalBar,p6PodSemiColon + +" X<> can have "|", "," and ";" separators + +syn region p6PodFormatOne + \ matchgroup=p6PodFormatCode + \ start="X<" + \ skip="<[^>]*>" + \ end=">" + \ contained + \ contains=p6PodFormatAnglesOne,p6PodFormatFrench,p6PodFormatOne,p6PodVerticalBar,p6PodSemiColon,p6PodComma + +syn region p6PodFormatTwo + \ matchgroup=p6PodFormatCode + \ start="X<<" + \ skip="<<[^>]*>>" + \ end=">>" + \ contained + \ contains=p6PodFormatAnglesTwo,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodVerticalBar,p6PodSemiColon,p6PodComma + +syn region p6PodFormatThree + \ matchgroup=p6PodFormatCode + \ start="X<<<" + \ skip="<<<[^>]*>>>" + \ end=">>>" + \ contained + \ contains=p6PodFormatAnglesThree,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodVerticalBar,p6PodSemiColon,p6PodComma + +syn region p6PodFormatFrench + \ matchgroup=p6PodFormatCode + \ start="X«" + \ skip="«[^»]*»" + \ end="»" + \ contained + \ contains=p6PodFormatAnglesFrench,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodVerticalBar,p6PodSemiColon,p6PodComma + +" 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_perl6_syntax_inits") + if version < 508 + let did_perl6_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink p6EscOctOld p6Error + HiLink p6PackageTwigil p6Twigil + HiLink p6StringAngle p6String + HiLink p6StringFrench p6String + HiLink p6StringAngles p6String + HiLink p6StringSQ p6String + HiLink p6StringDQ p6String + HiLink p6StringQ p6String + HiLink p6RxStringSQ p6String + HiLink p6RxStringDQ p6String + HiLink p6Substitution p6String + HiLink p6Transliteration p6String + HiLink p6StringAuto p6String + HiLink p6StringP5Auto p6String + HiLink p6Key p6String + HiLink p6Match p6String + HiLink p6RegexBlock p6String + HiLink p6RxP5CharClass p6String + HiLink p6RxP5QuoteMeta p6String + HiLink p6RxCharClass p6String + HiLink p6RxQuoteWords p6String + HiLink p6ReduceOp p6Operator + HiLink p6ReverseCrossOp p6Operator + HiLink p6HyperOp p6Operator + HiLink p6QuoteQ p6Operator + HiLink p6RxRange p6StringSpecial + HiLink p6RxAnchor p6StringSpecial + HiLink p6RxP5Anchor p6StringSpecial + HiLink p6CodePoint p6StringSpecial + HiLink p6RxMeta p6StringSpecial + HiLink p6RxP5Range p6StringSpecial + HiLink p6RxP5CPId p6StringSpecial + HiLink p6RxP5Posix p6StringSpecial + HiLink p6RxP5Mod p6StringSpecial + HiLink p6RxP5HexSeq p6StringSpecial + HiLink p6RxP5OctSeq p6StringSpecial + HiLink p6RxP5WriteRefId p6StringSpecial + HiLink p6HexSequence p6StringSpecial + HiLink p6OctSequence p6StringSpecial + HiLink p6RxP5Named p6StringSpecial + HiLink p6RxP5PropId p6StringSpecial + HiLink p6RxP5Quantifier p6StringSpecial + HiLink p6RxP5CountId p6StringSpecial + HiLink p6RxP5Verb p6StringSpecial + HiLink p6Escape p6StringSpecial2 + HiLink p6EscNull p6StringSpecial2 + HiLink p6EscHash p6StringSpecial2 + HiLink p6EscQQ p6StringSpecial2 + HiLink p6EscQuote p6StringSpecial2 + HiLink p6EscDoubleQuote p6StringSpecial2 + HiLink p6EscBackTick p6StringSpecial2 + HiLink p6EscForwardSlash p6StringSpecial2 + HiLink p6EscVerticalBar p6StringSpecial2 + HiLink p6EscExclamation p6StringSpecial2 + HiLink p6EscDollar p6StringSpecial2 + HiLink p6EscOpenCurly p6StringSpecial2 + HiLink p6EscCloseCurly p6StringSpecial2 + HiLink p6EscCloseBracket p6StringSpecial2 + HiLink p6EscCloseAngle p6StringSpecial2 + HiLink p6EscCloseFrench p6StringSpecial2 + HiLink p6EscBackSlash p6StringSpecial2 + HiLink p6RxEscape p6StringSpecial2 + HiLink p6RxCapture p6StringSpecial2 + HiLink p6RxAlternation p6StringSpecial2 + HiLink p6RxP5 p6StringSpecial2 + HiLink p6RxP5ReadRef p6StringSpecial2 + HiLink p6RxP5Oct p6StringSpecial2 + HiLink p6RxP5Hex p6StringSpecial2 + HiLink p6RxP5EscMeta p6StringSpecial2 + HiLink p6RxP5Meta p6StringSpecial2 + HiLink p6RxP5Escape p6StringSpecial2 + HiLink p6RxP5CodePoint p6StringSpecial2 + HiLink p6RxP5WriteRef p6StringSpecial2 + HiLink p6RxP5Prop p6StringSpecial2 + + HiLink p6Property Tag + HiLink p6Attention Todo + HiLink p6Type Type + HiLink p6Error Error + HiLink p6BlockLabel Label + HiLink p6Float Float + HiLink p6Normal Normal + HiLink p6Package Normal + HiLink p6PackageScope Normal + HiLink p6Number Number + HiLink p6VersionNum Number + HiLink p6String String + HiLink p6Repeat Repeat + HiLink p6Keyword Keyword + HiLink p6Pragma Keyword + HiLink p6Module Keyword + HiLink p6DeclareRoutine Keyword + HiLink p6VarStorage Special + HiLink p6FlowControl Special + HiLink p6NumberBase Special + HiLink p6Twigil Special + HiLink p6StringSpecial2 Special + HiLink p6VersionDot Special + HiLink p6Comment Comment + HiLink p6Include Include + HiLink p6Shebang PreProc + HiLink p6ClosureTrait PreProc + HiLink p6Routine Function + HiLink p6Operator Operator + HiLink p6Version Operator + HiLink p6Context Operator + HiLink p6Quote Delimiter + HiLink p6TypeConstraint PreCondit + HiLink p6Exception Exception + HiLink p6Placeholder Identifier + HiLink p6Variable Identifier + HiLink p6VarSlash Identifier + HiLink p6VarNum Identifier + HiLink p6VarExclam Identifier + HiLink p6VarMatch Identifier + HiLink p6VarName Identifier + HiLink p6MatchVar Identifier + HiLink p6RxP5ReadRefId Identifier + HiLink p6RxP5ModDef Identifier + HiLink p6RxP5ModName Identifier + HiLink p6Conditional Conditional + HiLink p6StringSpecial SpecialChar + + HiLink p6PodAbbr p6Pod + HiLink p6PodAbbrEOF p6Pod + HiLink p6PodAbbrNoCode p6Pod + HiLink p6PodAbbrCode p6PodCode + HiLink p6PodPara p6Pod + HiLink p6PodParaEOF p6Pod + HiLink p6PodParaNoCode p6Pod + HiLink p6PodParaCode p6PodCode + HiLink p6PodDelim p6Pod + HiLink p6PodDelimEOF p6Pod + HiLink p6PodDelimNoCode p6Pod + HiLink p6PodDelimCode p6PodCode + HiLink p6PodImplicitCode p6PodCode + HiLink p6PodExtraConfig p6PodPrefix + HiLink p6PodVerticalBar p6PodFormatCode + HiLink p6PodColon p6PodFormatCode + HiLink p6PodSemicolon p6PodFormatCode + HiLink p6PodComma p6PodFormatCode + HiLink p6PodFormatOne p6PodFormat + HiLink p6PodFormatTwo p6PodFormat + HiLink p6PodFormatThree p6PodFormat + HiLink p6PodFormatFrench p6PodFormat + + HiLink p6PodType Type + HiLink p6PodConfigOption String + HiLink p6PodCode PreProc + HiLink p6Pod Comment + HiLink p6PodComment Comment + HiLink p6PodAutoQuote Operator + HiLink p6PodConfigOperator Operator + HiLink p6PodPrefix Statement + HiLink p6PodName Identifier + HiLink p6PodFormatCode SpecialChar + HiLink p6PodFormat SpecialComment + + delcommand HiLink +endif + +" Syncing to speed up processing +"syn sync match p6SyncPod groupthere p6PodAbbrRegion "^=\K\k*\>" +"syn sync match p6SyncPod groupthere p6PodDirectRegion "^=\%(config\|use\|encoding\)\>" +"syn sync match p6SyncPod groupthere p6PodParaRegion "^=for\>" +"syn sync match p6SyncPod groupthere p6PodDelimRegion "^=begin\>" +"syn sync match p6SyncPod groupthere p6PodDelimEndRegion "^=end\>" + +" Let's just sync whole file, the other methods aren't reliable (or I don't +" know how to use them reliably) +syn sync fromstart + +setlocal foldmethod=syntax + +let b:current_syntax = "perl6" + +let &cpo = s:keepcpo +unlet s:keepcpo + +" vim:ts=8:sts=4:sw=4:expandtab:ft=vim diff --git a/runtime/syntax/pf.vim b/runtime/syntax/pf.vim new file mode 100644 index 0000000000..1a8f34bbba --- /dev/null +++ b/runtime/syntax/pf.vim @@ -0,0 +1,76 @@ +" pf syntax file +" Language: OpenBSD packet filter configuration (pf.conf) +" Original Author: Camiel Dobbelaar +" Maintainer: Lauri Tirkkonen +" Last Change: 2013 Apr 02 + +" 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=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/runtime/syntax/pfmain.vim b/runtime/syntax/pfmain.vim new file mode 100644 index 0000000000..a0904457a2 --- /dev/null +++ b/runtime/syntax/pfmain.vim @@ -0,0 +1,1644 @@ +" Vim syntax file +" Language: Postfix main.cf configuration +" Maintainer: KELEMEN Peter +" Last Update: Hong Xu +" Last Change: 2011 May 14 +" Version: 0.40 +" URL: http://cern.ch/fuji/vim/syntax/pfmain.vim +" Comment: Based on Postfix 2.9 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_defer_code +syntax keyword pfmainConf access_map_reject_code +syntax keyword pfmainConf address_verify_cache_cleanup_interval +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_default_transport_maps +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 cyrus_sasl_config_path +syntax keyword pfmainConf daemon_directory +syntax keyword pfmainConf daemon_timeout +syntax keyword pfmainConf data_directory +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_failed_cohort_limit +syntax keyword pfmainConf default_destination_concurrency_limit +syntax keyword pfmainConf default_destination_concurrency_negative_feedback +syntax keyword pfmainConf default_destination_concurrency_positive_feedback +syntax keyword pfmainConf default_destination_rate_delay +syntax keyword pfmainConf default_destination_recipient_limit +syntax keyword pfmainConf default_extra_recipient_limit +syntax keyword pfmainConf default_filter_nexthop +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_recipient_refill_delay +syntax keyword pfmainConf default_recipient_refill_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 destination_concurrency_feedback_debug +syntax keyword pfmainConf detect_8bit_encoding_header +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 dnsblog_reply_delay +syntax keyword pfmainConf dnsblog_service_name +syntax keyword pfmainConf dont_remove +syntax keyword pfmainConf double_bounce_sender +syntax keyword pfmainConf duplicate_filter_limit +syntax keyword pfmainConf empty_address_default_transport_maps_lookup_key +syntax keyword pfmainConf empty_address_recipient +syntax keyword pfmainConf empty_address_relayhost_maps_lookup_key +syntax keyword pfmainConf enable_long_queue_ids +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 internal_mail_filter_classes +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_address_preference +syntax keyword pfmainConf lmtp_bind_address +syntax keyword pfmainConf lmtp_bind_address6 +syntax keyword pfmainConf lmtp_body_checks +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_dns_resolver_options +syntax keyword pfmainConf lmtp_enforce_tls +syntax keyword pfmainConf lmtp_generic_maps +syntax keyword pfmainConf lmtp_header_checks +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_mime_header_checks +syntax keyword pfmainConf lmtp_mx_address_limit +syntax keyword pfmainConf lmtp_mx_session_limit +syntax keyword pfmainConf lmtp_nested_header_checks +syntax keyword pfmainConf lmtp_per_record_deadline +syntax keyword pfmainConf lmtp_pix_workaround_delay_time +syntax keyword pfmainConf lmtp_pix_workaround_maps +syntax keyword pfmainConf lmtp_pix_workaround_threshold_time +syntax keyword pfmainConf lmtp_pix_workarounds +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_reply_filter +syntax keyword pfmainConf lmtp_rset_timeout +syntax keyword pfmainConf lmtp_sasl_auth_cache_name +syntax keyword pfmainConf lmtp_sasl_auth_cache_time +syntax keyword pfmainConf lmtp_sasl_auth_enable +syntax keyword pfmainConf lmtp_sasl_auth_soft_bounce +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_CAfile +syntax keyword pfmainConf lmtp_tls_CApath +syntax keyword pfmainConf lmtp_tls_block_early_mail_reply +syntax keyword pfmainConf lmtp_tls_cert_file +syntax keyword pfmainConf lmtp_tls_ciphers +syntax keyword pfmainConf lmtp_tls_dcert_file +syntax keyword pfmainConf lmtp_tls_dkey_file +syntax keyword pfmainConf lmtp_tls_eccert_file +syntax keyword pfmainConf lmtp_tls_eckey_file +syntax keyword pfmainConf lmtp_tls_enforce_peername +syntax keyword pfmainConf lmtp_tls_exclude_ciphers +syntax keyword pfmainConf lmtp_tls_fingerprint_cert_match +syntax keyword pfmainConf lmtp_tls_fingerprint_digest +syntax keyword pfmainConf lmtp_tls_key_file +syntax keyword pfmainConf lmtp_tls_loglevel +syntax keyword pfmainConf lmtp_tls_mandatory_ciphers +syntax keyword pfmainConf lmtp_tls_mandatory_exclude_ciphers +syntax keyword pfmainConf lmtp_tls_mandatory_protocols +syntax keyword pfmainConf lmtp_tls_note_starttls_offer +syntax keyword pfmainConf lmtp_tls_per_site +syntax keyword pfmainConf lmtp_tls_policy_maps +syntax keyword pfmainConf lmtp_tls_protocols +syntax keyword pfmainConf lmtp_tls_scert_verifydepth +syntax keyword pfmainConf lmtp_tls_secure_cert_match +syntax keyword pfmainConf lmtp_tls_security_level +syntax keyword pfmainConf lmtp_tls_session_cache_database +syntax keyword pfmainConf lmtp_tls_session_cache_timeout +syntax keyword pfmainConf lmtp_tls_verify_cert_match +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 master_service_disable +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 milter_command_timeout +syntax keyword pfmainConf milter_connect_macros +syntax keyword pfmainConf milter_connect_timeout +syntax keyword pfmainConf milter_content_timeout +syntax keyword pfmainConf milter_data_macros +syntax keyword pfmainConf milter_default_action +syntax keyword pfmainConf milter_end_of_data_macros +syntax keyword pfmainConf milter_end_of_header_macros +syntax keyword pfmainConf milter_header_checks +syntax keyword pfmainConf milter_helo_macros +syntax keyword pfmainConf milter_macro_daemon_name +syntax keyword pfmainConf milter_macro_v +syntax keyword pfmainConf milter_mail_macros +syntax keyword pfmainConf milter_protocol +syntax keyword pfmainConf milter_rcpt_macros +syntax keyword pfmainConf milter_unknown_command_macros +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_instance_directories +syntax keyword pfmainConf multi_instance_enable +syntax keyword pfmainConf multi_instance_group +syntax keyword pfmainConf multi_instance_name +syntax keyword pfmainConf multi_instance_wrapper +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 non_smtpd_milters +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 postmulti_control_commands +syntax keyword pfmainConf postmulti_start_commands +syntax keyword pfmainConf postmulti_stop_commands +syntax keyword pfmainConf postscreen_access_list +syntax keyword pfmainConf postscreen_bare_newline_action +syntax keyword pfmainConf postscreen_bare_newline_enable +syntax keyword pfmainConf postscreen_bare_newline_ttl +syntax keyword pfmainConf postscreen_blacklist_action +syntax keyword pfmainConf postscreen_cache_cleanup_interval +syntax keyword pfmainConf postscreen_cache_map +syntax keyword pfmainConf postscreen_cache_retention_time +syntax keyword pfmainConf postscreen_client_connection_count_limit +syntax keyword pfmainConf postscreen_command_count_limit +syntax keyword pfmainConf postscreen_command_filter +syntax keyword pfmainConf postscreen_command_time_limit +syntax keyword pfmainConf postscreen_disable_vrfy_command +syntax keyword pfmainConf postscreen_discard_ehlo_keyword_address_maps +syntax keyword pfmainConf postscreen_discard_ehlo_keywords +syntax keyword pfmainConf postscreen_dnsbl_action +syntax keyword pfmainConf postscreen_dnsbl_reply_map +syntax keyword pfmainConf postscreen_dnsbl_sites +syntax keyword pfmainConf postscreen_dnsbl_threshold +syntax keyword pfmainConf postscreen_dnsbl_ttl +syntax keyword pfmainConf postscreen_enforce_tls +syntax keyword pfmainConf postscreen_expansion_filter +syntax keyword pfmainConf postscreen_forbidden_commands +syntax keyword pfmainConf postscreen_greet_action +syntax keyword pfmainConf postscreen_greet_banner +syntax keyword pfmainConf postscreen_greet_ttl +syntax keyword pfmainConf postscreen_greet_wait +syntax keyword pfmainConf postscreen_helo_required +syntax keyword pfmainConf postscreen_non_smtp_command_action +syntax keyword pfmainConf postscreen_non_smtp_command_enable +syntax keyword pfmainConf postscreen_non_smtp_command_ttl +syntax keyword pfmainConf postscreen_pipelining_action +syntax keyword pfmainConf postscreen_pipelining_enable +syntax keyword pfmainConf postscreen_pipelining_ttl +syntax keyword pfmainConf postscreen_post_queue_limit +syntax keyword pfmainConf postscreen_pre_queue_limit +syntax keyword pfmainConf postscreen_reject_footer +syntax keyword pfmainConf postscreen_tls_security_level +syntax keyword pfmainConf postscreen_use_tls +syntax keyword pfmainConf postscreen_watchdog_timeout +syntax keyword pfmainConf postscreen_whitelist_interfaces +syntax keyword pfmainConf prepend_delivered_header +syntax keyword pfmainConf process_id +syntax keyword pfmainConf process_id_directory +syntax keyword pfmainConf process_name +syntax keyword pfmainConf propagate_unmatched_extensions +syntax keyword pfmainConf proxy_interfaces +syntax keyword pfmainConf proxy_read_maps +syntax keyword pfmainConf proxy_write_maps +syntax keyword pfmainConf proxymap_service_name +syntax keyword pfmainConf proxywrite_service_name +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_client_port_logging +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 reject_tempfail_action +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 reset_owner_alias +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 send_cyrus_sasl_authzid +syntax keyword pfmainConf sender_bcc_maps +syntax keyword pfmainConf sender_canonical_classes +syntax keyword pfmainConf sender_canonical_maps +syntax keyword pfmainConf sender_dependent_default_transport_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_address_preference +syntax keyword pfmainConf smtp_always_send_ehlo +syntax keyword pfmainConf smtp_bind_address +syntax keyword pfmainConf smtp_bind_address6 +syntax keyword pfmainConf smtp_body_checks +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_dns_resolver_options +syntax keyword pfmainConf smtp_enforce_tls +syntax keyword pfmainConf smtp_fallback_relay +syntax keyword pfmainConf smtp_generic_maps +syntax keyword pfmainConf smtp_header_checks +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_mime_header_checks +syntax keyword pfmainConf smtp_mx_address_limit +syntax keyword pfmainConf smtp_mx_session_limit +syntax keyword pfmainConf smtp_nested_header_checks +syntax keyword pfmainConf smtp_never_send_ehlo +syntax keyword pfmainConf smtp_pix_workaround_delay_time +syntax keyword pfmainConf smtp_pix_workaround_maps +syntax keyword pfmainConf smtp_pix_workaround_threshold_time +syntax keyword pfmainConf smtp_pix_workarounds +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_reply_filter +syntax keyword pfmainConf smtp_rset_timeout +syntax keyword pfmainConf smtp_sasl_auth_cache_name +syntax keyword pfmainConf smtp_sasl_auth_cache_time +syntax keyword pfmainConf smtp_sasl_auth_enable +syntax keyword pfmainConf smtp_sasl_auth_soft_bounce +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_block_early_mail_reply +syntax keyword pfmainConf smtp_tls_cert_file +syntax keyword pfmainConf smtp_tls_cipherlist +syntax keyword pfmainConf smtp_tls_ciphers +syntax keyword pfmainConf smtp_tls_dcert_file +syntax keyword pfmainConf smtp_tls_dkey_file +syntax keyword pfmainConf smtp_tls_eccert_file +syntax keyword pfmainConf smtp_tls_eckey_file +syntax keyword pfmainConf smtp_tls_enforce_peername +syntax keyword pfmainConf smtp_tls_exclude_ciphers +syntax keyword pfmainConf smtp_tls_fingerprint_cert_match +syntax keyword pfmainConf smtp_tls_fingerprint_digest +syntax keyword pfmainConf smtp_tls_key_file +syntax keyword pfmainConf smtp_tls_loglevel +syntax keyword pfmainConf smtp_tls_mandatory_ciphers +syntax keyword pfmainConf smtp_tls_mandatory_exclude_ciphers +syntax keyword pfmainConf smtp_tls_mandatory_protocols +syntax keyword pfmainConf smtp_tls_note_starttls_offer +syntax keyword pfmainConf smtp_tls_per_site +syntax keyword pfmainConf smtp_tls_policy_maps +syntax keyword pfmainConf smtp_tls_protocols +syntax keyword pfmainConf smtp_tls_scert_verifydepth +syntax keyword pfmainConf smtp_tls_secure_cert_match +syntax keyword pfmainConf smtp_tls_security_level +syntax keyword pfmainConf smtp_tls_session_cache_database +syntax keyword pfmainConf smtp_tls_session_cache_timeout +syntax keyword pfmainConf smtp_tls_verify_cert_match +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_port_logging +syntax keyword pfmainConf smtpd_client_recipient_rate_limit +syntax keyword pfmainConf smtpd_client_restrictions +syntax keyword pfmainConf smtpd_command_filter +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_milters +syntax keyword pfmainConf smtpd_noop_commands +syntax keyword pfmainConf smtpd_null_access_lookup_key +syntax keyword pfmainConf smtpd_peername_lookup +syntax keyword pfmainConf smtpd_per_record_deadline +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_options +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_footer +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_service_name +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_always_issue_session_ids +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_ciphers +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_eccert_file +syntax keyword pfmainConf smtpd_tls_eckey_file +syntax keyword pfmainConf smtpd_tls_eecdh_grade +syntax keyword pfmainConf smtpd_tls_exclude_ciphers +syntax keyword pfmainConf smtpd_tls_fingerprint_digest +syntax keyword pfmainConf smtpd_tls_key_file +syntax keyword pfmainConf smtpd_tls_loglevel +syntax keyword pfmainConf smtpd_tls_mandatory_ciphers +syntax keyword pfmainConf smtpd_tls_mandatory_exclude_ciphers +syntax keyword pfmainConf smtpd_tls_mandatory_protocols +syntax keyword pfmainConf smtpd_tls_protocols +syntax keyword pfmainConf smtpd_tls_received_header +syntax keyword pfmainConf smtpd_tls_req_ccert +syntax keyword pfmainConf smtpd_tls_security_level +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 stress +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 strict_7bit_headers +syntax keyword pfmainConf strict_8bitmime +syntax keyword pfmainConf strict_8bitmime_body +syntax keyword pfmainConf strict_mailbox_ownership +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 tcp_windowsize +syntax keyword pfmainConf tls_append_default_CA +syntax keyword pfmainConf tls_daemon_random_bytes +syntax keyword pfmainConf tls_disable_workarounds +syntax keyword pfmainConf tls_eecdh_strong_curve +syntax keyword pfmainConf tls_eecdh_ultra_curve +syntax keyword pfmainConf tls_export_cipherlist +syntax keyword pfmainConf tls_high_cipherlist +syntax keyword pfmainConf tls_low_cipherlist +syntax keyword pfmainConf tls_medium_cipherlist +syntax keyword pfmainConf tls_null_cipherlist +syntax keyword pfmainConf tls_preempt_cipherlist +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 tlsproxy_enforce_tls +syntax keyword pfmainConf tlsproxy_service_name +syntax keyword pfmainConf tlsproxy_tls_CAfile +syntax keyword pfmainConf tlsproxy_tls_CApath +syntax keyword pfmainConf tlsproxy_tls_always_issue_session_ids +syntax keyword pfmainConf tlsproxy_tls_ask_ccert +syntax keyword pfmainConf tlsproxy_tls_ccert_verifydepth +syntax keyword pfmainConf tlsproxy_tls_cert_file +syntax keyword pfmainConf tlsproxy_tls_ciphers +syntax keyword pfmainConf tlsproxy_tls_dcert_file +syntax keyword pfmainConf tlsproxy_tls_dh1024_param_file +syntax keyword pfmainConf tlsproxy_tls_dh512_param_file +syntax keyword pfmainConf tlsproxy_tls_dkey_file +syntax keyword pfmainConf tlsproxy_tls_eccert_file +syntax keyword pfmainConf tlsproxy_tls_eckey_file +syntax keyword pfmainConf tlsproxy_tls_eecdh_grade +syntax keyword pfmainConf tlsproxy_tls_exclude_ciphers +syntax keyword pfmainConf tlsproxy_tls_fingerprint_digest +syntax keyword pfmainConf tlsproxy_tls_key_file +syntax keyword pfmainConf tlsproxy_tls_loglevel +syntax keyword pfmainConf tlsproxy_tls_mandatory_ciphers +syntax keyword pfmainConf tlsproxy_tls_mandatory_exclude_ciphers +syntax keyword pfmainConf tlsproxy_tls_mandatory_protocols +syntax keyword pfmainConf tlsproxy_tls_protocols +syntax keyword pfmainConf tlsproxy_tls_req_ccert +syntax keyword pfmainConf tlsproxy_tls_security_level +syntax keyword pfmainConf tlsproxy_tls_session_cache_timeout +syntax keyword pfmainConf tlsproxy_use_tls +syntax keyword pfmainConf tlsproxy_watchdog_timeout +syntax keyword pfmainConf trace_service_name +syntax keyword pfmainConf transport_delivery_slot_cost +syntax keyword pfmainConf transport_delivery_slot_discount +syntax keyword pfmainConf transport_delivery_slot_loan +syntax keyword pfmainConf transport_destination_concurrency_failed_cohort_limit +syntax keyword pfmainConf transport_destination_concurrency_limit +syntax keyword pfmainConf transport_destination_concurrency_negative_feedback +syntax keyword pfmainConf transport_destination_concurrency_positive_feedback +syntax keyword pfmainConf transport_destination_rate_delay +syntax keyword pfmainConf transport_destination_recipient_limit +syntax keyword pfmainConf transport_extra_recipient_limit +syntax keyword pfmainConf transport_initial_destination_concurrency +syntax keyword pfmainConf transport_maps +syntax keyword pfmainConf transport_minimum_delivery_slots +syntax keyword pfmainConf transport_recipient_limit +syntax keyword pfmainConf transport_recipient_refill_delay +syntax keyword pfmainConf transport_recipient_refill_limit +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_address_tempfail_action +syntax keyword pfmainConf unknown_client_reject_code +syntax keyword pfmainConf unknown_helo_hostname_tempfail_action +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_defer_code +syntax keyword pfmainConf unverified_recipient_reject_code +syntax keyword pfmainConf unverified_recipient_reject_reason +syntax keyword pfmainConf unverified_recipient_tempfail_action +syntax keyword pfmainConf unverified_sender_defer_code +syntax keyword pfmainConf unverified_sender_reject_code +syntax keyword pfmainConf unverified_sender_reject_reason +syntax keyword pfmainConf unverified_sender_tempfail_action +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 match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax match pfmainRef "$\" +syntax 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 client_address +syntax keyword pfmainWord client_port +syntax keyword pfmainWord defer_if_permit +syntax keyword pfmainWord defer_if_reject +syntax keyword pfmainWord dns +syntax keyword pfmainWord drop +syntax keyword pfmainWord dunno +syntax keyword pfmainWord enforce +syntax keyword pfmainWord envelope_recipient +syntax keyword pfmainWord envelope_sender +syntax keyword pfmainWord export +syntax keyword pfmainWord header_recipient +syntax keyword pfmainWord header_sender +syntax keyword pfmainWord high +syntax keyword pfmainWord host +syntax keyword pfmainWord ignore +syntax keyword pfmainWord ipv4 +syntax keyword pfmainWord ipv6 +syntax keyword pfmainWord localtime +syntax keyword pfmainWord low +syntax keyword pfmainWord medium +syntax keyword pfmainWord native +syntax keyword pfmainWord null +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_authenticated_sender_login_mismatch +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 server_name +syntax keyword pfmainWord speed_adjust +syntax keyword pfmainWord subnet +syntax keyword pfmainWord warn_if_reject +syntax keyword pfmainWord CRYPTOPRO_TLSEXT_BUG +syntax keyword pfmainWord DONT_INSERT_EMPTY_FRAGMENTS +syntax keyword pfmainWord LEGACY_SERVER_CONNECT +syntax keyword pfmainWord MICROSOFT_BIG_SSLV3_BUFFER +syntax keyword pfmainWord MICROSOFT_SESS_ID_BUG +syntax keyword pfmainWord MSIE_SSLV2_RSA_PADDING +syntax keyword pfmainWord NETSCAPE_CHALLENGE_BUG +syntax keyword pfmainWord NETSCAPE_REUSE_CIPHER_CHANGE_BUG +syntax keyword pfmainWord SSLEAY_080_CLIENT_DH_BUG +syntax keyword pfmainWord SSLREF2_REUSE_CERT_TYPE_BUG +syntax keyword pfmainWord TLS_BLOCK_PADDING_BUG +syntax keyword pfmainWord TLS_D5_BUG +syntax keyword pfmainWord TLS_ROLLBACK_BUG + +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/runtime/syntax/php.vim b/runtime/syntax/php.vim new file mode 100644 index 0000000000..f27d923400 --- /dev/null +++ b/runtime/syntax/php.vim @@ -0,0 +1,711 @@ +" Vim syntax file +" Language: php PHP 3/4/5 +" Maintainer: Jason Woofenden +" Last Change: Aug 28, 2013 +" URL: https://gitorious.org/jasonwoof/vim-syntax/blobs/master/php.vim +" Former Maintainers: Peter Hodge +" Debian VIM Maintainers +" +" 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. + +" 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 + +" make sure we can use \ at the begining of the line to do a continuation +let s:cpo_save = &cpo +set cpo&vim + +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__ __DIR__ __NAMESPACE__ 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 json_decode json_encode json_last_error 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 goto 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 namespace 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 + +" Interpolated indentifiers (inside strings) + syn match phpBrackets "[][}{]" contained display + " errors + syn match phpInterpSimpleError "\[[^]]*\]" contained display " fallback (if nothing else matches) + syn match phpInterpSimpleError "->[^a-zA-Z_]" contained display + " make sure these stay above the correct DollarCurlies so they don't take priority + syn match phpInterpBogusDollarCurley "${[^}]*}" contained display " fallback (if nothing else matches) + syn match phpinterpSimpleBracketsInner "\w\+" contained + syn match phpInterpSimpleBrackets "\[\h\w*]" contained contains=phpBrackets,phpInterpSimpleBracketsInner + syn match phpInterpSimpleBrackets "\[\d\+]" contained contains=phpBrackets,phpInterpSimpleBracketsInner + syn match phpInterpSimpleBrackets "\[0[xX]\x\+]" contained contains=phpBrackets,phpInterpSimpleBracketsInner + syn match phpInterpSimple "\$\h\w*\(\[[^]]*\]\|->\h\w*\)\?" contained contains=phpInterpSimpleBrackets,phpIdentifier,phpInterpSimpleError,phpMethods,phpMemberSelector display + syn match phpInterpVarname "\h\w*" contained + syn match phpInterpMethodName "\h\w*" contained " default color + syn match phpInterpSimpleCurly "\${\h\w*}" contains=phpInterpVarname contained extend + syn region phpInterpDollarCurley1Helper matchgroup=phpParent start="{" end="\[" contains=phpInterpVarname contained + syn region phpInterpDollarCurly1 matchgroup=phpParent start="\${\h\w*\["rs=s+1 end="]}" contains=phpInterpDollarCurley1Helper,@phpClConst contained extend + + syn match phpInterpDollarCurley2Helper "{\h\w*->" contains=phpBrackets,phpInterpVarname,phpMemberSelector contained + + syn region phpInterpDollarCurly2 matchgroup=phpParent start="\${\h\w*->"rs=s+1 end="}" contains=phpInterpDollarCurley2Helper,phpInterpMethodName contained + + syn match phpInterpBogusDollarCurley "${\h\w*->}" contained display + syn match phpInterpBogusDollarCurley "${\h\w*\[]}" contained display + + syn region phpInterpComplex matchgroup=phpParent start="{\$"rs=e-1 end="}" contains=phpIdentifier,phpMemberSelector,phpVarSelector,phpIdentifierComplexP contained extend + syn region phpIdentifierComplexP matchgroup=phpParent start="\[" end="]" contains=@phpClInside contained + " define a cluster to get all interpolation syntaxes for double-quoted strings + syn cluster phpInterpDouble contains=phpInterpSimple,phpInterpSimpleCurly,phpInterpDollarCurly1,phpInterpDollarCurly2,phpInterpBogusDollarCurley,phpInterpComplex + +" Methoden +syn match phpMethodsVar "->\h\w*" contained contains=phpMethods,phpMemberSelector display + +" Include +syn keyword phpInclude include require include_once require_once use 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 + +" Backslash escapes + syn case match + " for double quotes and heredoc + syn match phpBackslashSequences "\\[fnrtv\\\"$]" contained display + syn match phpBackslashSequences "\\\d\{1,3}" contained contains=phpOctalError display + syn match phpBackslashSequences "\\x\x\{1,2}" contained display + " additional sequence for double quotes only + syn match phpBackslashDoubleQuote "\\[\"]" contained display + " for single quotes only + syn match phpBackslashSingleQuote "\\[\\']" contained display + syn case ignore + + +" 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,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble contained keepend + syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpBackslashSequences,phpIdentifierSimply,phpIdentifierComplex contained keepend + syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote contained keepend +else + syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble contained extend keepend + syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpBackslashSequences,phpIdentifierSimply,phpIdentifierComplex contained extend keepend + syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote contained keepend extend +endif + +" HereDoc and NowDoc +if version >= 600 + syn case match + + " HereDoc + syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\I\i*\)\2$" end="^\z1\(;\=$\)\@=" contained contains=phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,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*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar keepend extend + syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar keepend extend + syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar keepend extend + + " NowDoc + syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\I\i*\)'$" end="^\z1\(;\=$\)\@=" contained keepend extend +" including HTML,JavaScript,SQL even if not enabled via options + syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop keepend extend + syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop keepend extend + syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript 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,phpNowDoc +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="-]@]\=?[<>]@!" 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 + +syntax match phpDocCustomTags "@[a-zA-Z]*\(\s\+\|\n\|\r\)" containedin=phpComment +syntax region phpDocTags start="{@\(example\|id\|internal\|inheritdoc\|link\|source\|toc\|tutorial\)" end="}" containedin=phpComment +syntax match phpDocTags "@\(abstract\|access\|author\|category\|copyright\|deprecated\|example\|final\|global\|ignore\|internal\|license\|link\|method\|name\|package\|param\|property\|return\|see\|since\|static\|staticvar\|subpackage\|tutorial\|uses\|var\|version\|contributor\|modified\|filename\|description\|filesource\|throws\)\(\s\+\)\?" containedin=phpComment +syntax match phpDocTodo "@\(todo\|fixme\|xxx\)\(\s\+\)\?" containedin=phpComment + +" 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 phpDocTags PreProc + HiLink phpDocCustomTags Type + 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 phpBackslashSequences SpecialChar + HiLink phpBackslashDoubleQuote SpecialChar + HiLink phpBackslashSingleQuote SpecialChar + HiLink phpParent Delimiter + HiLink phpBrackets Delimiter + HiLink phpIdentifierConst Delimiter + HiLink phpParentError Error + HiLink phpOctalError Error + HiLink phpInterpSimpleError Error + HiLink phpInterpBogusDollarCurley Error + HiLink phpInterpDollarCurly1 Error + HiLink phpInterpDollarCurly2 Error + HiLink phpInterpSimpleBracketsInner String + HiLink phpInterpSimpleCurly Delimiter + HiLink phpInterpVarname Identifier + HiLink phpTodo Todo + HiLink phpDocTodo 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 + +" put cpoptions back the way we found it +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 sts=2 sw=2 expandtab diff --git a/runtime/syntax/phtml.vim b/runtime/syntax/phtml.vim new file mode 100644 index 0000000000..646129a20b --- /dev/null +++ b/runtime/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/runtime/syntax/pic.vim b/runtime/syntax/pic.vim new file mode 100644 index 0000000000..adc964ea96 --- /dev/null +++ b/runtime/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/runtime/syntax/pike.vim b/runtime/syntax/pike.vim new file mode 100644 index 0000000000..efbafd5d82 --- /dev/null +++ b/runtime/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/runtime/syntax/pilrc.vim b/runtime/syntax/pilrc.vim new file mode 100644 index 0000000000..86d5611589 --- /dev/null +++ b/runtime/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/runtime/syntax/pine.vim b/runtime/syntax/pine.vim new file mode 100644 index 0000000000..4c64b9bbc7 --- /dev/null +++ b/runtime/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/runtime/syntax/pinfo.vim b/runtime/syntax/pinfo.vim new file mode 100644 index 0000000000..bf4126e59a --- /dev/null +++ b/runtime/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/runtime/syntax/plaintex.vim b/runtime/syntax/plaintex.vim new file mode 100644 index 0000000000..7020c68e9b --- /dev/null +++ b/runtime/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/runtime/syntax/pli.vim b/runtime/syntax/pli.vim new file mode 100644 index 0000000000..f8d7e51cf3 --- /dev/null +++ b/runtime/syntax/pli.vim @@ -0,0 +1,278 @@ +" Vim syntax file +" Modified from http://plnet.org/files/vim/ +" using keywords from http://www.kednos.com/pli/docs/reference_manual/6291pro_contents.html +" 2012-11-13 Alan Thompson + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" Todo. +syn keyword pl1Todo TODO FIXME XXX DEBUG NOTE + +" pl1CommentGroup allows adding matches for special things in comments +" 20010723az: Added this so that these could be matched in comments... +syn cluster pl1CommentGroup contains=pl1Todo + +syn match pl1Garbage "[^ \t()]" +syn match pl1Identifier "[a-z][a-z0-9$_#]*" +syn match pl1HostIdentifier ":[a-z][a-z0-9$_#]*" + +" 20010723az: When wanted, highlight the trailing whitespace -- this is +" based on c_space_errors +if exists("c_space_errors") + if !exists("c_no_trail_space_error") + syn match pl1SpaceError "\s\+$" + endif + if !exists("c_no_tab_space_error") + syn match pl1SpaceError " \+\t"me=e-1 + endif +endif + +" Symbols. +syn match pl1Symbol "\(;\|,\|\.\)" +syn match pl1PreProcSym "%" + +" Operators. +syn match pl1Operator "\(&\|:\|!\|+\|-\|\*\|/\|=\|<\|>\|@\|\*\*\|!=\|\~=\)" +syn match pl1Operator "\(\^\|\^=\|<=\|>=\|:=\|=>\|\.\.\|||\|<<\|>>\|\"\)" + +" Attributes +syn keyword pl1Attribute BACKWARDS BUFFERED BUF CONNECTED CONN CONSTANT EVENT +syn keyword pl1Attribute EXCLUSIVE EXCL FORMAT GENERIC IRREDUCIBLE IRRED LOCAL +syn keyword pl1Attribute REDUCIBLE RED TASK TRANSIENT UNBUFFERED UNBUF ALIGNED ANY +syn keyword pl1Attribute AREA AUTOMATIC AUTO BASED BUILTIN CONDITION COND CONTROLLED +syn keyword pl1Attribute CTL DEFINED DEF DIRECT ENVIRONMENT ENV EXTERNAL EXT FILE +syn keyword pl1Attribute GLOBALDEF GLOBALREF INITIAL INIT INPUT INTERNAL INT KEYED +syn keyword pl1Attribute LABEL LIKE LIST MEMBER NONVARYING NONVAR OPTIONAL OPTIONS +syn keyword pl1Attribute OUTPUT PARAMETER PARM PICTURE PIC POSITION POS PRECISION +syn keyword pl1Attribute PREC PRINT READONLY RECORD REFER RETURNS SEQUENTIAL SEQL +syn keyword pl1Attribute STATIC STREAM STRUCTURE TRUNCATE UNALIGNED UNAL UNION UPDATE +syn keyword pl1Attribute VARIABLE VARYING VAR COMPLEX CPLX REAL BINARY BIN BIT +syn keyword pl1Attribute CHARACTER CHAR DECIMAL DEC DESCRIPTOR DESC DIMENSION DIM +syn keyword pl1Attribute FIXED FLOAT OFFSET POINTER PTR REFERENCE VALUE VAL + +" Functions +syn keyword pl1Function AFTER ALL ANY BEFORE COMPLETION CPLN CONJG COUNT +syn keyword pl1Function CURRENTSTORAGE CSTG DATAFIELD DECAT DOT ERF ERFC IMAG +syn keyword pl1Function ONCOUNT ONFIELD ONLOC POLY PRIORITY REPEAT SAMEKEY STATUS +syn keyword pl1Function STORAGE STG ABS ACOS ACTUALCOUNT ADD ADDR ADDREL ALLOCATION +syn keyword pl1Function ALLOCN ASIN ATAN ATAND ATANH BOOL BYTE BYTESIZE CEIL COLLATE +syn keyword pl1Function COPY COS COSD COSH DATE DATETIME DECODE DISPLAY DIVIDE EMPTY +syn keyword pl1Function ENCODE ERROR EVERY EXP EXTEND FLOOR FLUSH FREE HBOUND HIGH +syn keyword pl1Function INDEX INFORM INT LBOUND LENGTH LINE LINENO LOG LOG10 LOG2 +syn keyword pl1Function LOW LTRIM MAX MAXLENGTH MIN MOD MULTIPLY NEXT_VOLUME NULL +syn keyword pl1Function ONARGSLIST ONCHAR ONCODE ONFILE ONKEY ONSOURCE PAGENO POSINT +syn keyword pl1Function PRESENT PROD RANK RELEASE RESIGNAL REVERSE REWIND ROUND +syn keyword pl1Function RTRIM SEARCH SIGN SIN SIND SINH SIZE SOME SPACEBLOCK SQRT +syn keyword pl1Function STRING SUBSTR SUBTRACT SUM TAN TAND TANH TIME TRANSLATE TRIM +syn keyword pl1Function TRUNC UNSPEC VALID VARIANT VERIFY WARN + +" Other keywords +syn keyword pl1Other ATTENTION ATTN C CONVERSION CONV DATA NAME NOCONVERSION +syn keyword pl1Other NOCONV NOFIXEDOVERFLOW NOFOFL NOOVERFLOW NOSIZE +syn keyword pl1Other NOSTRINGRANGE NOSTRG NOSTRINGSIZE NOSTRZ NOSUBSCRIPTRANGE +syn keyword pl1Other NOSUBRG NOZERODIVIDE NOZDIV OVERFLOW OFL PENDING RECORD +syn keyword pl1Other REENTRANT SIZE STRINGRANGE STRG STRINGSIZE STRZ +syn keyword pl1Other SUBSCRIPTRANGE SUBRG TRANSMIT A ANYCONDITION APPEND B B1 B2 +syn keyword pl1Other B3 B4 BACKUP_DATE BATCH BLOCK_BOUNDARY_FORMAT BLOCK_IO +syn keyword pl1Other BLOCK_SIZE BUCKET_SIZE BY CANCEL_CONTROL_O +syn keyword pl1Other CARRIAGE_RETURN_FORMAT COLUMN COL CONTIGUOUS +syn keyword pl1Other CONTIGUOUS_BEST_TRY CONVERSION CONV CREATION_DATE +syn keyword pl1Other CURRENT_POSITION DEFAULT_FILE_NAME DEFERRED_WRITE E EDIT +syn keyword pl1Other ENDFILE ENDPAGE EXPIRATION_DATE EXTENSION_SIZE F FAST_DELETE +syn keyword pl1Other FILE_ID FILE_ID_TO FILE_SIZE FINISH FIXEDOVERFLOW FOFL +syn keyword pl1Other FIXED_CONTROL_FROM FIXED_CONTROL_SIZE FIXED_CONTROL_SIZE_TO +syn keyword pl1Other FIXED_CONTROL_TO FIXED_LENGTH_RECORDS FROM GROUP_PROTECTION +syn keyword pl1Other IDENT IGNORE_LINE_MARKS IN INDEXED INDEX_NUMBER INITIAL_FILL +syn keyword pl1Other INTO KEY KEYFROM KEYTO LINESIZE LOCK_ON_READ LOCK_ON_WRITE +syn keyword pl1Other MAIN MANUAL_UNLOCKING MATCH_GREATER MATCH_GREATER_EQUAL +syn keyword pl1Other MATCH_NEXT MATCH_NEXT_EQUAL MAXIMUM_RECORD_NUMBER +syn keyword pl1Other MAXIMUM_RECORD_SIZE MULTIBLOCK_COUNT MULTIBUFFER_COUNT +syn keyword pl1Other NOLOCK NONEXISTENT_RECORD NONRECURSIVE NO_ECHO NO_FILTER +syn keyword pl1Other NO_SHARE OVERFLOW OFL OWNER_GROUP OWNER_ID OWNER_MEMBER +syn keyword pl1Other OWNER_PROTECTION P PAGE PAGESIZE PRINTER_FORMAT PROMPT +syn keyword pl1Other PURGE_TYPE_AHEAD R READ_AHEAD READ_CHECK READ_REGARDLESS +syn keyword pl1Other RECORD_ID RECORD_ID_ACCESS RECORD_ID_TO RECURSIVE REPEAT +syn keyword pl1Other RETRIEVAL_POINTERS REVISION_DATE REWIND_ON_CLOSE +syn keyword pl1Other REWIND_ON_OPEN SCALARVARYING SET SHARED_READ SHARED_WRITE +syn keyword pl1Other SKIP SPOOL STORAGE STRINGRANGE STRG SUBSCRIPTRANGE SUBRG +syn keyword pl1Other SUPERSEDE SYSIN SYSPRINT SYSTEM_PROTECTION TAB TEMPORARY +syn keyword pl1Other TIMEOUT_PERIOD TITLE TO UNDEFINEDFILE UNDF UNDERFLOW UFL +syn keyword pl1Other UNTIL USER_OPEN VAXCONDITION WAIT_FOR_RECORD WHILE +syn keyword pl1Other WORLD_PROTECTION WRITE_BEHIND WRITE_CHECK X ZERODIVIDE ZDIV + +" PreProcessor keywords +syn keyword pl1PreProc ACTIVATE DEACTIVATE DECLARE DCL DICTIONARY DO END ERROR +syn keyword pl1PreProc FATAL GOTO IF INCLUDE INFORM LIST NOLIST PAGE PROCEDURE PROC +syn keyword pl1PreProc REPLACE RETURN SBTTL TITLE WARN THEN ELSE + +" Statements +syn keyword pl1Statement CALL SUB ENTRY BY NAME CASE CHECK COPY DEFAULT DFT DELAY +syn keyword pl1Statement DESCRIPTORS DISPLAY EXIT FETCH HALT IGNORE LIST LOCATE +syn keyword pl1Statement NOCHECK NOLOCK NONE ORDER RANGE RELEASE REORDER REPLY SNAP +syn keyword pl1Statement SYSTEM TAB UNLOCK WAIT ALLOCATE ALLOC BEGIN CALL CLOSE +syn keyword pl1Statement DECLARE DCL DELETE DO ELSE END FORMAT GET GOTO GO TO IF +syn keyword pl1Statement LEAVE NORESCAN ON OPEN OTHERWISE OTHER PROCEDURE PROC PUT +syn keyword pl1Statement READ RESCAN RETURN REVERT REWRITE SELECT SIGNAL SNAP +syn keyword pl1Statement STATEMENT STOP SYSTEM THEN WHEN WRITE + +" PL1's own keywords +" syn match pl1Keyword "\" +" syn match pl1Keyword "\.COUNT\>"hs=s+1 +" syn match pl1Keyword "\.EXISTS\>"hs=s+1 +" syn match pl1Keyword "\.FIRST\>"hs=s+1 +" syn match pl1Keyword "\.LAST\>"hs=s+1 +" syn match pl1Keyword "\.DELETE\>"hs=s+1 +" syn match pl1Keyword "\.PREV\>"hs=s+1 +" syn match pl1Keyword "\.NEXT\>"hs=s+1 + +if exists("pl1_highlight_triggers") + syn keyword pl1Trigger INSERTING UPDATING DELETING +endif + +" Conditionals. +syn keyword pl1Conditional ELSIF ELSE IF +syn match pl1Conditional "\" + +" Loops. +syn keyword pl1Repeat FOR LOOP WHILE FORALL +syn match pl1Repeat "\" + +" Various types of comments. +" 20010723az: Added the ability to treat strings within comments just like +" C does. +if exists("c_comment_strings") + syntax match pl1CommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region pl1CommentString contained start=+L\="+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=pl1CommentSkip + syntax region pl1Comment2String contained start=+L\="+ skip=+\\\\\|\\"+ end=+"+ end="$" + syntax region pl1CommentL start="--" skip="\\$" end="$" keepend contains=@pl1CommentGroup,pl1Comment2String,pl1CharLiteral,pl1BooleanLiteral,pl1NumbersCom,pl1SpaceError + syntax region pl1Comment start="/\*" end="\*/" contains=@pl1CommentGroup,pl1Comment2String,pl1CharLiteral,pl1BooleanLiteral,pl1NumbersCom,pl1SpaceError +else + syntax region pl1CommentL start="--" skip="\\$" end="$" keepend contains=@pl1CommentGroup,pl1SpaceError + syntax region pl1Comment start="/\*" end="\*/" contains=@pl1CommentGroup,pl1SpaceError +endif + +" 20010723az: These are the old comment commands ... commented out. +" syn match pl1Comment "--.*$" contains=pl1Todo +" syn region pl1Comment start="/\*" end="\*/" contains=pl1Todo +syn sync ccomment pl1Comment +syn sync ccomment pl1CommentL + +" To catch unterminated string literals. +syn match pl1StringError "'.*$" + +" Various types of literals. +" 20010723az: Added stuff for comment matching. +syn match pl1Numbers transparent "\<[+-]\=\d\|[+-]\=\.\d" contains=pl1IntLiteral,pl1FloatLiteral +syn match pl1NumbersCom contained transparent "\<[+-]\=\d\|[+-]\=\.\d" contains=pl1IntLiteral,pl1FloatLiteral +syn match pl1IntLiteral contained "[+-]\=\d\+" +syn match pl1FloatLiteral contained "[+-]\=\d\+\.\d*" +syn match pl1FloatLiteral contained "[+-]\=\d*\.\d*" +"syn match pl1FloatLiteral "[+-]\=\([0-9]*\.[0-9]\+\|[0-9]\+\.[0-9]\+\)\(e[+-]\=[0-9]\+\)\=" +syn match pl1CharLiteral "'[^']'" +syn match pl1StringLiteral "'\([^']\|''\)*'" +syn keyword pl1BooleanLiteral TRUE FALSE NULL + +" The built-in types. +syn keyword pl1Storage ANYDATA ANYTYPE BFILE BINARY_INTEGER BLOB BOOLEAN +syn keyword pl1Storage BYTE CHAR CHARACTER CLOB CURSOR DATE DAY DEC DECIMAL +syn keyword pl1Storage DOUBLE DSINTERVAL_UNCONSTRAINED FLOAT HOUR +syn keyword pl1Storage INT INTEGER INTERVAL LOB LONG MINUTE +syn keyword pl1Storage MLSLABEL MONTH NATURAL NATURALN NCHAR NCHAR_CS NCLOB +syn keyword pl1Storage NUMBER NUMERIC NVARCHAR PLS_INT PLS_INTEGER +syn keyword pl1Storage POSITIVE POSITIVEN PRECISION RAW REAL RECORD +syn keyword pl1Storage SECOND SIGNTYPE SMALLINT STRING SYS_REFCURSOR TABLE TIME +syn keyword pl1Storage TIMESTAMP TIMESTAMP_UNCONSTRAINED +syn keyword pl1Storage TIMESTAMP_TZ_UNCONSTRAINED +syn keyword pl1Storage TIMESTAMP_LTZ_UNCONSTRAINED UROWID VARCHAR +syn keyword pl1Storage VARCHAR2 YEAR YMINTERVAL_UNCONSTRAINED ZONE + +" A type-attribute is really a type. +" 20020916bp: Removed leading part of pattern to avoid highlighting the +" object +syn match pl1TypeAttribute "%\(TYPE\|ROWTYPE\)\>" + +" All other attributes. +syn match pl1Attribute "%\(BULK_EXCEPTIONS\|BULK_ROWCOUNT\|ISOPEN\|FOUND\|NOTFOUND\|ROWCOUNT\)\>" + +" Catch errors caused by wrong parentheses and brackets +" 20010723az: significantly more powerful than the values -- commented out +" below the replaced values. This adds the C functionality to PL/SQL. +syn cluster pl1ParenGroup contains=pl1ParenError,@pl1CommentGroup,pl1CommentSkip,pl1IntLiteral,pl1FloatLiteral,pl1NumbersCom +if exists("c_no_bracket_error") + syn region pl1Paren transparent start='(' end=')' contains=ALLBUT,@pl1ParenGroup + syn match pl1ParenError ")" + syn match pl1ErrInParen contained "[{}]" +else + syn region pl1Paren transparent start='(' end=')' contains=ALLBUT,@pl1ParenGroup,pl1ErrInBracket + syn match pl1ParenError "[\])]" + syn match pl1ErrInParen contained "[{}]" + syn region pl1Bracket transparent start='\[' end=']' contains=ALLBUT,@pl1ParenGroup,pl1ErrInParen + syn match pl1ErrInBracket contained "[);{}]" +endif +" syn region pl1Paren transparent start='(' end=')' contains=ALLBUT,pl1ParenError +" syn match pl1ParenError ")" + +" 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_pl1_syn_inits") + if version < 508 + let did_pl1_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink pl1Attribute Macro + HiLink pl1BlockError Error + HiLink pl1BooleanLiteral Boolean + HiLink pl1CharLiteral Character + HiLink pl1Comment Comment + HiLink pl1CommentL Comment + HiLink pl1Conditional Conditional + HiLink pl1Error Error + HiLink pl1ErrInBracket Error + HiLink pl1ErrInBlock Error + HiLink pl1ErrInParen Error + HiLink pl1Exception Function + HiLink pl1FloatLiteral Float + HiLink pl1Function Function + HiLink pl1Garbage Error + HiLink pl1HostIdentifier Label + HiLink pl1Identifier Normal + HiLink pl1IntLiteral Number + HiLink pl1Operator Operator + HiLink pl1Paren Normal + HiLink pl1ParenError Error + HiLink pl1SpaceError Error + HiLink pl1Pseudo PreProc + HiLink pl1PreProc PreProc + HiLink pl1PreProcSym PreProc + HiLink pl1Keyword Keyword + HiLink pl1Other Keyword + HiLink pl1Repeat Repeat + HiLink pl1Statement Keyword + HiLink pl1Storage StorageClass + HiLink pl1StringError Error + HiLink pl1StringLiteral String + HiLink pl1CommentString String + HiLink pl1Comment2String String + HiLink pl1Symbol Normal + HiLink pl1Trigger Function + HiLink pl1TypeAttribute StorageClass + HiLink pl1Todo Todo + + delcommand HiLink +endif + +let b:current_syntax = "pl1" diff --git a/runtime/syntax/plm.vim b/runtime/syntax/plm.vim new file mode 100644 index 0000000000..bf7c32fd1c --- /dev/null +++ b/runtime/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/runtime/syntax/plp.vim b/runtime/syntax/plp.vim new file mode 100644 index 0000000000..f59702d3b5 --- /dev/null +++ b/runtime/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/runtime/syntax/plsql.vim b/runtime/syntax/plsql.vim new file mode 100644 index 0000000000..6e513660f8 --- /dev/null +++ b/runtime/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/runtime/syntax/po.vim b/runtime/syntax/po.vim new file mode 100644 index 0000000000..c09b960357 --- /dev/null +++ b/runtime/syntax/po.vim @@ -0,0 +1,140 @@ +" Vim syntax file +" Language: po (gettext) +" Maintainer: Dwayne Bailey +" Last Change: 2012 Apr 30 +" Contributors: Dwayne Bailey (Most advanced syntax highlighting) +" Leonardo Fontenelle (Spell checking) +" Nam SungHyun (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:keepcpo= &cpo +set cpo&vim + +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\|Language\|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 b:current_syntax = "po" + +let &cpo = s:keepcpo +unlet s:keepcpo + +" vim:set ts=8 sts=2 sw=2 noet: diff --git a/runtime/syntax/pod.vim b/runtime/syntax/pod.vim new file mode 100644 index 0000000000..b9f2e0854f --- /dev/null +++ b/runtime/syntax/pod.vim @@ -0,0 +1,189 @@ +" Vim syntax file +" Language: Perl POD format +" Maintainer: vim-perl +" Previously: Scott Bigham +" Homepage: http://github.com/vim-perl/vim-perl +" Bugs/requests: http://github.com/vim-perl/vim-perl/issues +" Last Change: 2013-07-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 + +let s:cpo_save = &cpo +set cpo&vim + +" POD commands +syn match podCommand "^=encoding" nextgroup=podCmdText contains=@NoSpell +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 + +if exists("perl_pod_spellcheck_headings") + " Spell-check headings + syn clear podCmdText + syn match podCmdText ".*$" contained contains=podFormat +endif + +if exists("perl_pod_formatting") + " By default, escapes like C<> are not checked for spelling. Remove B<> + " and I<> from the list of escapes. + syn clear podFormat + syn region podFormat start="[CLF]<[^<]"me=e-1 end=">" oneline contains=podFormat,@NoSpell + syn region podFormat start="[CLF]<<\s" end="\s>>" oneline contains=podFormat,@NoSpell + + " Don't spell-check inside E<>, but ensure that the E< itself isn't + " marked as a spelling mistake. + syn match podFormat "E<\(\d\+\|\I\i*\)>" contains=podEscape,podEscape2,@NoSpell + + " Z<> is a mock formatting code. Ensure Z<> on its own isn't marked as a + " spelling mistake. + syn match podFormat "Z<>" contains=podEscape,podEscape2,@NoSpell + + " These are required so that whatever is *within* B<...>, I<...>, etc. is + " spell-checked, but not the B, I, ... itself. + syn match podBoldOpen "B<" contains=@NoSpell + syn match podItalicOpen "I<" contains=@NoSpell + syn match podNoSpaceOpen "S<" contains=@NoSpell + syn match podIndexOpen "X<" contains=@NoSpell + + " Same as above but for the << >> syntax. + syn match podBoldAlternativeDelimOpen "B<< " contains=@NoSpell + syn match podItalicAlternativeDelimOpen "I<< " contains=@NoSpell + syn match podNoSpaceAlternativeDelimOpen "S<< " contains=@NoSpell + syn match podIndexAlternativeDelimOpen "X<< " contains=@NoSpell + + " Add support for spell checking text inside B<>, I<>, S<> and X<>. + syn region podBold start="B<[^<]"me=e end=">" oneline contains=podBoldItalic,podBoldOpen + syn region podBoldAlternativeDelim start="B<<\s" end="\s>>" oneline contains=podBoldAlternativeDelimOpen + + syn region podItalic start="I<[^<]"me=e end=">" oneline contains=podItalicBold,podItalicOpen + syn region podItalicAlternativeDelim start="I<<\s" end="\s>>" oneline contains=podItalicAlternativeDelimOpen + + " Nested bold/italic and vice-versa + syn region podBoldItalic contained start="I<[^<]"me=e end=">" oneline + syn region podItalicBold contained start="B<[^<]"me=e end=">" oneline + + syn region podNoSpace start="S<[^<]"ms=s-2 end=">"me=e oneline contains=podNoSpaceOpen + syn region podNoSpaceAlternativeDelim start="S<<\s"ms=s-2 end="\s>>"me=e oneline contains=podNoSpaceAlternativeDelimOpen + + syn region podIndex start="X<[^<]"ms=s-2 end=">"me=e oneline contains=podIndexOpen + syn region podIndexAlternativeDelim start="X<<\s"ms=s-2 end="\s>>"me=e oneline contains=podIndexAlternativeDelimOpen + + " Restore this (otherwise B<> is shown as bold inside verbatim) + syn match podVerbatimLine "^\s.*$" contains=@NoSpell + + " Ensure formatted text can be displayed in headings and items + syn clear podCmdText + + if exists("perl_pod_spellcheck_headings") + syn match podCmdText ".*$" contained contains=podFormat,podBold, + \podBoldAlternativeDelim,podItalic,podItalicAlternativeDelim, + \podBoldOpen,podItalicOpen,podBoldAlternativeDelimOpen, + \podItalicAlternativeDelimOpen,podNoSpaceOpen + else + syn match podCmdText ".*$" contained contains=podFormat,podBold, + \podBoldAlternativeDelim,podItalic,podItalicAlternativeDelim, + \@NoSpell + endif + + " Specify how to display these + hi def podBold term=bold cterm=bold gui=bold + + hi link podBoldAlternativeDelim podBold + hi link podBoldAlternativeDelimOpen podBold + hi link podBoldOpen podBold + + hi link podNoSpace Identifier + hi link podNoSpaceAlternativeDelim Identifier + + hi link podIndex Identifier + hi link podIndexAlternativeDelim Identifier + + hi def podItalic term=italic cterm=italic gui=italic + + hi link podItalicAlternativeDelim podItalic + hi link podItalicAlternativeDelimOpen podItalic + hi link podItalicOpen podItalic + + hi def podBoldItalic term=italic,bold cterm=italic,bold gui=italic,bold + hi def podItalicBold term=italic,bold cterm=italic,bold gui=italic,bold +endif + +let b:current_syntax = "pod" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 diff --git a/runtime/syntax/postscr.vim b/runtime/syntax/postscr.vim new file mode 100644 index 0000000000..fddfe4c947 --- /dev/null +++ b/runtime/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/runtime/syntax/pov.vim b/runtime/syntax/pov.vim new file mode 100644 index 0000000000..4c1fd9624a --- /dev/null +++ b/runtime/syntax/pov.vim @@ -0,0 +1,150 @@ +" Vim syntax file +" Language: PoV-Ray(tm) 3.7 Scene Description Language +" Maintainer: David Necas (Yeti) +" Last Change: 2011-04-23 +" 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 ovus parametric pattern photons plane poly polygon polynomial 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 inside_vector 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 maximum_reuse max_sample media minimum_reuse mm_per_unit nearest_count normal pretrace_end pretrace_start recursion_limit save_file +syn keyword povDescriptors color colour rgb rgbt rgbf rgbft srgb srgbf srgbt srgbft +syn match povDescriptors "\<\(red\|green\|blue\|gray\)\>" +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 subsurface +syn keyword povDescriptors cylinder fisheye mesh_camera omnimax orthographic panoramic perspective spherical ultra_wide_angle +syn keyword povDescriptors agate aoi average brick boxed bozo bumps cells checker crackle cylindrical dents facets function gradient granite hexagon julia leopard magnet mandel marble onion pavement planar quilted radial ripples slope spherical spiral1 spiral2 spotted square tiles tile2 tiling toroidal triangular 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 importance no_radiosity +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 area_illumination falloff jitter looks_like media_attenuation media_interaction method point_at radius tightness +syn keyword povModifiers angle aperture bokeh blur_samples confidence direction focal_point h_angle location look_at right sky up v_angle variance +syn keyword povModifiers all bump_size gamma interpolate map_type once premultiplied slope_map use_alpha use_color use_colour use_index +syn match povModifiers "\<\(filter\|transmit\)\>" +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 exr gif hdr iff jpeg pgm png pot ppm sys tga tiff +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 bitwise_and bitwise_or bitwise_xor ceil cos cosh defined degrees dimensions dimension_size div exp file_exists floor inside int internal ln log max min mod pow prod radians rand seed select sin sinh sqrt strcmp strlen sum 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 datetime now 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 input_file_name image_width image_height false no off on pi true version yes +syn match povConsts "\<[tuvxyz]\>" +syn match povDotItem "\.\@<=\(blue\|green\|gray\|filter\|red\|transmit\|hf\|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\|for\|if\|ifdef\|ifndef\|switch\|while\)\>" +syn match povLabelDir "#\s*\(break\|case\|default\|range\)\>" +syn match povDeclareDir "#\s*\(declare\|default\|local\|macro\|undef\|version\)\>" nextgroup=povDeclareOption skipwhite +syn keyword povDeclareOption deprecated once contained nextgroup=povDeclareOption skipwhite +syn match povIncludeDir "#\s*include\>" +syn match povFileDir "#\s*\(fclose\|fopen\|read\|write\)\>" +syn keyword povFileDataType uint8 sint8 unit16be uint16le sint16be sint16le sint32le sint32be +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 "\\u\x\{4}\|\\\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 povSpecial +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 povDeclareOption Define +hi def link povIncludeDir Include +hi def link povFileDir PreProc +hi def link povFileDataType Special +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/runtime/syntax/povini.vim b/runtime/syntax/povini.vim new file mode 100644 index 0000000000..726fe1fc74 --- /dev/null +++ b/runtime/syntax/povini.vim @@ -0,0 +1,62 @@ +" Vim syntax file +" Language: PoV-Ray(tm) 3.7 configuration/initialization files +" Maintainer: David Necas (Yeti) +" Last Change: 2011-04-24 +" 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 Frame_Final Frame_Step Initial_Clock Final_Clock Subset_Start_Frame Subset_End_Frame Cyclic_Animation Clockless_Animation Real_Time_Raytracing Field_Render Odd_Field Work_Threads +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 Render_Block_Size Render_Block_Step Render_Pattern Max_Image_Buffer_Memory +syn keyword poviniKeyword Output_to_File Output_File_Type Output_Alpha Bits_Per_Color Output_File_Name Buffer_Output Buffer_Size Dither Dither_Method File_Gamma +syn keyword poviniKeyword BSP_Base BSP_Child BSP_Isect BSP_Max BSP_Miss +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 Bounding Bounding_Method Bounding_Threshold Light_Buffer Vista_Buffer Remove_Bounds Split_Unions Antialias Sampling_Method Antialias_Threshold Jitter Jitter_Amount Antialias_Depth Antialias_Gamma +syn keyword poviniKeyword Pre_Scene_Return Pre_Frame_Return Post_Scene_Return Post_Frame_Return User_Abort_Return Fatal_Error_Return +syn keyword poviniKeyword Radiosity Radiosity_File_Name Radiosity_From_File Radiosity_To_File Radiosity_Vain_Pretrace High_Reproducibility +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/runtime/syntax/ppd.vim b/runtime/syntax/ppd.vim new file mode 100644 index 0000000000..192f70c05d --- /dev/null +++ b/runtime/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/runtime/syntax/ppwiz.vim b/runtime/syntax/ppwiz.vim new file mode 100644 index 0000000000..d3d7b3a17a --- /dev/null +++ b/runtime/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/runtime/syntax/prescribe.vim b/runtime/syntax/prescribe.vim new file mode 100644 index 0000000000..d89ee35253 --- /dev/null +++ b/runtime/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/runtime/syntax/privoxy.vim b/runtime/syntax/privoxy.vim new file mode 100644 index 0000000000..9e6ff1df9f --- /dev/null +++ b/runtime/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/runtime/syntax/procmail.vim b/runtime/syntax/procmail.vim new file mode 100644 index 0000000000..c2ffa39883 --- /dev/null +++ b/runtime/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/runtime/syntax/progress.vim b/runtime/syntax/progress.vim new file mode 100644 index 0000000000..85a54a6505 --- /dev/null +++ b/runtime/syntax/progress.vim @@ -0,0 +1,329 @@ +" Vim syntax file +" Language: Progress 4GL +" Filename extensions: *.p (collides with Pascal), +" *.i (collides with assembler) +" *.w (collides with cweb) +" Maintainer: Philip Uren Remove SPAXY spam block +" Contributors: Matthew Stickney +" Chris Ruprecht +" Mikhail Kuperblum +" John Florian +" Version: 13 +" Last Change: Nov 11 2012 + +" For version 5.x: Clear all syntax item +" 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&vim + +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 + +" 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-form active-window add alias all alter ambig[uous] analyz[e] and any apply as asc[ending] +syn keyword ProgressReserved assign asynchronous at attr[-space] audit-control audit-policy authorization auto-ret[urn] avail[able] back[ground] +syn keyword ProgressReserved before-h[ide] begins bell between big-endian blank break buffer-comp[are] buffer-copy by by-pointer by-variant-point[er] call +syn keyword ProgressReserved can-do can-find case case-sen[sitive] cast center[ed] check chr clear clipboard codebase-locator colon color column-lab[el] +syn keyword ProgressReserved col[umns] com-self compiler connected control copy-lob count-of cpstream create current current-changed current-lang[uage] +syn keyword ProgressReserved current-window current_date curs[or] database dataservers dataset dataset-handle db-remote-host dbcodepage dbcollation dbname +syn keyword ProgressReserved dbparam dbrest[rictions] dbtaskid dbtype dbvers[ion] dde deblank debug-list debugger decimals declare default +syn keyword ProgressReserved default-noxl[ate] default-window def[ine] delete delimiter desc[ending] dict[ionary] disable discon[nect] disp[lay] distinct do dos +syn keyword ProgressReserved down drop dynamic-cast dynamic-func[tion] dynamic-new each editing else enable encode end entry error-stat[us] escape +syn keyword ProgressReserved etime event-procedure except exclusive[-lock] exclusive-web[-user] exists export false fetch field[s] file-info[rmation] +syn keyword ProgressReserved fill find find-case-sensitive find-global find-next-occurrence find-prev-occurrence find-select find-wrap-around first +syn keyword ProgressReserved first-of focus font for form[at] fram[e] frame-col frame-db frame-down frame-field frame-file frame-inde[x] frame-line +syn keyword ProgressReserved frame-name frame-row frame-val[ue] from from-c[hars] from-p[ixels] function-call-type gateway[s] get-attr-call-type get-byte +syn keyword ProgressReserved get-codepage[s] get-coll[ations] get-column get-error-column get-error-row get-file-name get-file-offse[t] get-key-val[ue] +syn keyword ProgressReserved get-message-type get-row getbyte global go-on go-pend[ing] grant graphic-e[dge] group having header help hide host-byte-order if +syn keyword ProgressReserved import in index indicator input input-o[utput] insert into is is-attr[-space] join kblabel key-code key-func[tion] key-label +syn keyword ProgressReserved keycode keyfunc[tion] keylabel keys keyword label last last-even[t] last-key last-of lastkey ldbname leave library like +syn keyword ProgressReserved like-sequential line-count[er] listi[ng] little-endian locked log-manager lookup machine-class map member message message-lines mouse +syn keyword ProgressReserved mpe new next next-prompt no no-attr[-space] no-error no-f[ill] no-help no-hide no-label[s] no-lobs no-lock no-map +syn keyword ProgressReserved no-mes[sage] no-pause no-prefe[tch] no-return-val[ue] no-undo no-val[idate] no-wait not now 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 +syn keyword ProgressReserved os-rename otherwise output overlay page page-bot[tom] page-num[ber] page-top param[eter] password-field pause pdbname +syn keyword ProgressReserved persist[ent] pixels preproc[ess] privileges proc-ha[ndle] proc-st[atus] procedure-call-type process profiler program-name progress +syn keyword ProgressReserved prompt[-for] promsgs propath provers[ion] publish put put-byte put-key-val[ue] putbyte query query-tuning quit r-index +syn keyword ProgressReserved rcode-info[rmation] read-available read-exact-num readkey recid record-len[gth] rect[angle] release repeat reposition retain retry return +syn keyword ProgressReserved return-val[ue] revert revoke row-created row-deleted row-modified row-unmodified run save sax-comple[te] sax-parser-error +syn keyword ProgressReserved sax-running sax-uninitialized sax-write-begin sax-write-complete sax-write-content sax-write-element sax-write-error +syn keyword ProgressReserved sax-write-idle sax-write-tag schema screen screen-io screen-lines scroll sdbname search search-self search-target security-policy +syn keyword ProgressReserved seek select self session set set-attr-call-type setuser[id] share[-lock] shared show-stat[s] skip some source-procedure +syn keyword ProgressReserved space status stream stream-handle stream-io string-xref subscribe super system-dialog table table-handle target-procedure +syn keyword ProgressReserved term[inal] text text-cursor text-seg[-grow] then this-object this-procedure time title to today top-only trans[action] trigger +syn keyword ProgressReserved triggers trim true underl[ine] undo unform[atted] union unique unix unless-hidden unsubscribe up update use-index use-revvideo +syn keyword ProgressReserved use-underline user[id] using value values view view-as wait-for web-con[text] when where while window window-delayed-min[imize] +syn keyword ProgressReserved window-maxim[ized] window-minim[ized] window-normal with work-tab[le] workfile write xcode xcode-session-key xref xref-xml yes + +" 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=+\~'\|\~\~\|\~"+ contains=@Spell +syn region ProgressString matchgroup=ProgressQuote start=+'+ end=+'+ skip=+\~'\|\~\~\|\~"+ contains=@Spell + +syn match ProgressIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>()" + +" 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, uncomment this: +" syn match ProgressSpaceError "\s\+$" + +syn region ProgressComment start="/\*" end="\*/" contains=ProgressComment,ProgressTodo,ProgressDebug,@Spell +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 <= <> >= +syn keyword ProgressOperator abs[olute] accelerator accept-changes accept-row-changes across active actor add-buffer add-calc-col[umn] +syn keyword ProgressOperator add-columns-from add-events-proc[edure] add-fields-from add-first add-header-entry add-index-field add-interval add-last +syn keyword ProgressOperator add-like-col[umn] add-like-field add-like-index add-new-field add-new-index add-rel[ation] add-schema-location add-source-buffer +syn keyword ProgressOperator add-super-proc[edure] adm-data advise after-buffer after-rowid after-table alert-box allow-column-searching allow-replication alternate-key +syn keyword ProgressOperator always-on-top ansi-only anywhere append append-child appl-alert[-boxes] appl-context-id application apply-callback appserver-info +syn keyword ProgressOperator appserver-password appserver-userid array-m[essage] ask-overwrite assembly async-request-count async-request-handle attach-data-source +syn keyword ProgressOperator attached-pairlist attach attribute-names audit-enabled audit-event-context authentication-failed auto-comp[letion] auto-delete +syn keyword ProgressOperator auto-delete-xml auto-end-key auto-endkey auto-go auto-ind[ent] auto-resize auto-synchronize auto-val[idate] auto-z[ap] automatic +syn keyword ProgressOperator available-formats ave[rage] avg backward[s] base-ade base-key basic-logging batch[-mode] batch-size before-buffer before-rowid +syn keyword ProgressOperator before-table begin-event-group bgc[olor] binary bind bind-where blob block-iteration-display border-b[ottom-chars] +syn keyword ProgressOperator border-bottom-p[ixels] border-l[eft-chars] border-left-p[ixels] border-r[ight-chars] border-right-p[ixels] border-t[op-chars] +syn keyword ProgressOperator border-top-p[ixels] both bottom box box-select[able] browse buffer buffer-chars buffer-create buffer-delete buffer-field buffer-handle +syn keyword ProgressOperator buffer-lines buffer-n[ame] buffer-releas[e] buffer-validate buffer-value button[s] by-reference by-value byte bytes-read +syn keyword ProgressOperator bytes-written cache cache-size call-name call-type can-crea[te] can-dele[te] can-query can-read can-set can-writ[e] cancel-break +syn keyword ProgressOperator cancel-button cancel-requests cancelled caps careful-paint catch cdecl chained char[acter] character_length charset checked +syn keyword ProgressOperator child-buffer child-num choose class class-type clear-appl-context clear-log clear-select[ion] clear-sort-arrow[s] +syn keyword ProgressOperator client-connection-id client-principal client-tty client-type client-workstation clob clone-node close close-log code codepage +syn keyword ProgressOperator codepage-convert col-of collate colon-align[ed] color-table column-bgc[olor] column-codepage column-dcolor column-fgc[olor] +syn keyword ProgressOperator column-font column-movable column-of column-pfc[olor] column-read-only column-resizable column-sc[rolling] com-handle combo-box +syn keyword ProgressOperator command compare[s] compile complete config-name connect constructor contents context context-help context-help-file +syn keyword ProgressOperator context-help-id context-pop[up] control-box control-fram[e] convert convert-to-offs[et] copy-dataset copy-sax-attributes +syn keyword ProgressOperator copy-temp-table count cpcase cpcoll cpint[ernal] cplog cpprint cprcodein cprcodeout cpterm crc-val[ue] create-like +syn keyword ProgressOperator create-like-sequential create-node create-node-namespace create-result-list-entry create-test-file current-column current-env[ironment] +syn keyword ProgressOperator current-iteration current-query current-result-row current-row-modified current-value cursor-char cursor-line cursor-offset data-b[ind] +syn keyword ProgressOperator data-entry-ret[urn] data-rel[ation] data-source data-source-complete-map data-source-modified data-source-rowid data-t[ype] date +syn keyword ProgressOperator date-f[ormat] day db-references dcolor dde-error dde-i[d] dde-item dde-name dde-topic debu[g] debug-alert +syn keyword ProgressOperator declare-namespace decrypt default-buffer-handle default-but[ton] default-commit default-ex[tension] default-string +syn keyword ProgressOperator default-value define-user-event-manager defined delete-char delete-current-row delete-header-entry delete-line delete-node +syn keyword ProgressOperator delete-result-list-entry delete-selected-row delete-selected-rows descript[ion] deselect-focused-row deselect-rows deselect-selected-row +syn keyword ProgressOperator destructor detach-data-source dialog-box dir directory disable-auto-zap disable-connections disable-dump-triggers +syn keyword ProgressOperator disable-load-triggers disabled display-message display-timezone display-t[ype] domain-description domain-name domain-type double +syn keyword ProgressOperator drag-enabled drop-down drop-down-list drop-target dump dump-logging-now dynamic dynamic-current-value dynamic-next-value echo +syn keyword ProgressOperator edge[-chars] edge-p[ixels] edit-can-paste edit-can-undo edit-clear edit-copy edit-cut edit-paste edit-undo editor empty +syn keyword ProgressOperator empty-dataset empty-temp-table enable-connections enabled encoding encrypt encrypt-audit-mac-key encryption-salt end-document +syn keyword ProgressOperator end-element end-event-group end-file-drop end-key end-user-prompt endkey entered entry-types-list eq error error-col[umn] +syn keyword ProgressOperator error-object-detail error-row error-stack-trace error-string event-group-id event-procedure-context event-t[ype] events exclusive-id +syn keyword ProgressOperator execute execution-log exp expand expandable expire explicit export-principal extended extent external extract +syn keyword ProgressOperator fetch-selected-row fgc[olor] file file-create-d[ate] file-create-t[ime] file-mod-d[ate] file-mod-t[ime] file-name file-off[set] +syn keyword ProgressOperator file-size file-type filename fill-in fill-mode fill-where-string filled filters final finally find-by-rowid find-current +syn keyword ProgressOperator find-first find-last find-unique finder first-async[-request] first-buffer first-child first-column first-data-source +syn keyword ProgressOperator first-dataset first-form first-object first-proc[edure] first-query first-serv[er] first-server-socket first-socket +syn keyword ProgressOperator first-tab-i[tem] fit-last-column fix-codepage fixed-only flat-button float focused-row focused-row-selected font-table force-file +syn keyword ProgressOperator fore[ground] foreign-key-hidden form-input form-long-input formatte[d] forward-only forward[s] fragmen[t] frame-spa[cing] frame-x +syn keyword ProgressOperator frame-y frequency from-cur[rent] full-height[-chars] full-height-p[ixels] full-pathn[ame] full-width[-chars] +syn keyword ProgressOperator full-width-p[ixels] function ge generate-pbe-key generate-pbe-salt generate-random-key generate-uuid get get-attribute get-attribute-node +syn keyword ProgressOperator get-binary-data get-bits get-blue[-value] get-browse-col[umn] get-buffer-handle get-byte-order get-bytes get-bytes-available +syn keyword ProgressOperator get-callback-proc-context get-callback-proc-name get-cgi-list get-cgi-long-value get-cgi-value get-changes get-child get-child-rel[ation] +syn keyword ProgressOperator get-config-value get-curr[ent] get-dataset-buffer get-dir get-document-element get-double get-dropped-file get-dynamic get-file +syn keyword ProgressOperator get-firs[t] get-float get-green[-value] get-header-entr[y] get-index-by-namespace-name get-index-by-qname get-iteration get-last +syn keyword ProgressOperator get-localname-by-index get-long get-message get-next get-node get-number get-parent get-pointer-value get-prev get-printers get-property +syn keyword ProgressOperator get-qname-by-index get-red[-value] get-rel[ation] get-repositioned-row get-rgb[-value] get-selected[-widget] get-serialized get-short +syn keyword ProgressOperator get-signature get-size get-socket-option get-source-buffer get-string get-tab-item get-text-height[-chars] get-text-height-p[ixels] +syn keyword ProgressOperator get-text-width[-chars] get-text-width-p[ixels] get-top-buffer get-type-by-index get-type-by-namespace-name get-type-by-qname +syn keyword ProgressOperator get-unsigned-long get-unsigned-short get-uri-by-index get-value-by-index get-value-by-namespace-name get-value-by-qname +syn keyword ProgressOperator get-wait[-state] grayed grid-factor-h[orizontal] grid-factor-v[ertical] grid-snap grid-unit-height[-chars] grid-unit-height-p[ixels] +syn keyword ProgressOperator grid-unit-width[-chars] grid-unit-width-p[ixels] grid-visible group-box gt guid handle handler has-lobs has-records height[-chars] +syn keyword ProgressOperator height-p[ixels] help-topic hex-decode hex-encode hidden hint hori[zontal] html-charset html-end-of-line html-end-of-page +syn keyword ProgressOperator html-frame-begin html-frame-end html-header-begin html-header-end html-title-begin html-title-end hwnd icfparam[eter] icon +syn keyword ProgressOperator ignore-current-mod[ified] image image-down image-insensitive image-size image-size-c[hars] image-size-p[ixels] image-up immediate-display +syn keyword ProgressOperator implements import-node import-principal in-handle increment-exclusive-id index-hint index-info[rmation] indexed-reposition +syn keyword ProgressOperator info[rmation] inherit-bgc[olor] inherit-fgc[olor] inherits init[ial] initial-dir initial-filter initialize-document-type initiate +syn keyword ProgressOperator inner inner-chars inner-lines input-value insert-attribute insert-b[acktab] insert-before insert-file insert-row +syn keyword ProgressOperator insert-string insert-t[ab] instantiating-procedure int[eger] interface internal-entries interval invoke is-clas[s] +syn keyword ProgressOperator is-codepage-fixed is-column-codepage is-lead-byte is-open is-parameter-set is-row-selected is-selected is-xml iso-date item +syn keyword ProgressOperator items-per-row join-by-sqldb keep-connection-open keep-frame-z[-order] keep-messages keep-security-cache keep-tab-order key +syn keyword ProgressOperator keyword-all label-bgc[olor] label-dc[olor] label-fgc[olor] label-font label-pfc[olor] labels landscape language[s] large +syn keyword ProgressOperator large-to-small last-async[-request] last-batch last-child last-form last-object last-proce[dure] last-serv[er] last-server-socket +syn keyword ProgressOperator last-socket last-tab-i[tem] lc le leading left left-align[ed] left-trim length line list-events list-item-pairs list-items +syn keyword ProgressOperator list-property-names list-query-attrs list-set-attrs list-widgets literal-question load load-domains load-icon load-image load-image-down +syn keyword ProgressOperator load-image-insensitive load-image-up load-mouse-p[ointer] load-picture load-small-icon lob-dir local-host local-name local-port +syn keyword ProgressOperator locator-column-number locator-line-number locator-public-id locator-system-id locator-type lock-registration log log-audit-event +syn keyword ProgressOperator log-entry-types log-threshold logfile-name logging-level logical login-expiration-timestamp login-host login-state logout long[char] +syn keyword ProgressOperator longchar-to-node-value lookahead lower lt mandatory manual-highlight margin-extra margin-height[-chars] margin-height-p[ixels] +syn keyword ProgressOperator margin-width[-chars] margin-width-p[ixels] mark-new mark-row-state matches max-button max-chars max-data-guess max-height[-chars] +syn keyword ProgressOperator max-height-p[ixels] max-rows max-size max-val[ue] max-width[-chars] max-width-p[ixels] maximize max[imum] maximum-level memory memptr +syn keyword ProgressOperator memptr-to-node-value menu menu-bar menu-item menu-k[ey] menu-m[ouse] menubar merge-by-field merge-changes merge-row-changes message-area +syn keyword ProgressOperator message-area-font method min-button min-column-width-c[hars] min-column-width-p[ixels] min-height[-chars] min-height-p[ixels] +syn keyword ProgressOperator min-schema-marshal min-size min-val[ue] min-width[-chars] min-width-p[ixels] min[imum] modified mod[ulo] month mouse-p[ointer] movable +syn keyword ProgressOperator move-after[-tab-item] move-befor[e-tab-item] move-col[umn] move-to-b[ottom] move-to-eof move-to-t[op] mtime multi-compile multiple +syn keyword ProgressOperator multiple-key multitasking-interval must-exist must-understand name namespace-prefix namespace-uri native ne needs-appserver-prompt +syn keyword ProgressOperator needs-prompt nested new-instance new-row next-col[umn] next-rowid next-sibling next-tab-ite[m] next-value no-apply +syn keyword ProgressOperator no-array-m[essage] no-assign no-attr-l[ist] no-auto-validate no-bind-where no-box no-console no-convert no-current-value no-debug +syn keyword ProgressOperator no-drag no-echo no-empty-space no-focus no-index-hint no-inherit-bgc[olor] no-inherit-fgc[olor] no-join-by-sqldb no-lookahead +syn keyword ProgressOperator no-row-markers no-schema-marshal no-scrollbar-v[ertical] no-separate-connection no-separators no-tab[-stop] no-und[erline] +syn keyword ProgressOperator no-word-wrap node-value node-value-to-longchar node-value-to-memptr nonamespace-schema-location none normalize not-active +syn keyword ProgressOperator num-buffers num-but[tons] num-child-relations num-children num-col[umns] num-copies num-dropped-files num-fields num-formats +syn keyword ProgressOperator num-header-entries num-items num-iterations num-lines num-locked-col[umns] num-log-files num-messages num-parameters num-references +syn keyword ProgressOperator num-relations num-repl[aced] num-results num-selected-rows num-selected[-widgets] num-source-buffers num-tabs num-to-retain +syn keyword ProgressOperator num-top-buffers num-visible-col[umns] numeric numeric-dec[imal-point] numeric-f[ormat] numeric-sep[arator] object ok ok-cancel +syn keyword ProgressOperator on-frame[-border] ordered-join ordinal orientation origin-handle origin-rowid os-getenv outer outer-join override owner owner-document +syn keyword ProgressOperator page-size page-wid[th] paged parent parent-buffer parent-rel[ation] parse-status partial-key pascal pathname +syn keyword ProgressOperator pbe-hash-alg[orithm] pbe-key-rounds perf[ormance] persistent-cache-disabled persistent-procedure pfc[olor] pixels-per-col[umn] +syn keyword ProgressOperator pixels-per-row popup-m[enu] popup-o[nly] portrait position precision prefer-dataset prepare-string prepared presel[ect] prev +syn keyword ProgressOperator prev-col[umn] prev-sibling prev-tab-i[tem] primary printer printer-control-handle printer-hdc printer-name printer-port +syn keyword ProgressOperator printer-setup private private-d[ata] proce[dure] procedure-name progress-s[ource] property protected proxy proxy-password +syn keyword ProgressOperator proxy-userid public public-id published-events put-bits put-bytes put-double put-float put-long put-short put-string +syn keyword ProgressOperator put-unsigned-long put-unsigned-short query-close query-off-end query-open query-prepare question quoter radio-buttons radio-set random +syn keyword ProgressOperator raw raw-transfer read read-file read-only read-xml read-xmlschema real recursive reference-only refresh +syn keyword ProgressOperator refresh-audit-policy refreshable register-domain reject-changes reject-row-changes rejected relation-fi[elds] relations-active remote +syn keyword ProgressOperator remote-host remote-port remove-attribute remove-child remove-events-proc[edure] remove-super-proc[edure] replace replace-child +syn keyword ProgressOperator replace-selection-text replication-create replication-delete replication-write reposition-back[ward] reposition-forw[ard] reposition-to-row +syn keyword ProgressOperator reposition-to-rowid request reset resiza[ble] resize restart-row restart-rowid result retain-s[hape] retry-cancel return-ins[erted] +syn keyword ProgressOperator return-to-start-di[r] return-value-data-type returns reverse-from rgb-v[alue] right right-align[ed] right-trim roles round rounded +syn keyword ProgressOperator routine-level row row-height[-chars] row-height-p[ixels] row-ma[rkers] row-of row-resizable row-state rowid rule run-proc[edure] +syn keyword ProgressOperator save-as save-file save-row-changes save-where-string sax-attributes sax-parse sax-parse-first sax-parse-next sax-reader +syn keyword ProgressOperator sax-writer schema-change schema-location schema-marshal schema-path screen-val[ue] scroll-bars scroll-delta scroll-offset +syn keyword ProgressOperator scroll-to-current-row scroll-to-i[tem] scroll-to-selected-row scrollable scrollbar-h[orizontal] scrollbar-v[ertical] +syn keyword ProgressOperator scrolled-row-pos[ition] scrolling seal seal-timestamp section select-all select-focused-row select-next-row select-prev-row select-row +syn keyword ProgressOperator selectable selected selection-end selection-list selection-start selection-text send sensitive separate-connection +syn keyword ProgressOperator separator-fgc[olor] separators server server-connection-bo[und] server-connection-bound-re[quest] server-connection-co[ntext] +syn keyword ProgressOperator server-connection-id server-operating-mode server-socket session-end session-id set-actor set-appl-context set-attribute +syn keyword ProgressOperator set-attribute-node set-blue[-value] set-break set-buffers set-byte-order set-callback set-callback-procedure set-client set-commit +syn keyword ProgressOperator set-connect-procedure set-contents set-db-client set-dynamic set-green[-value] set-input-source set-must-understand set-node +syn keyword ProgressOperator set-numeric-form[at] set-option set-output-destination set-parameter set-pointer-val[ue] set-property set-read-response-procedure +syn keyword ProgressOperator set-red[-value] set-repositioned-row set-rgb[-value] set-rollback set-selection set-serialized set-size set-socket-option +syn keyword ProgressOperator set-sort-arrow set-wait[-state] short show-in-task[bar] side-label-h[andle] side-lab[els] silent simple single single-character size +syn keyword ProgressOperator size-c[hars] size-p[ixels] skip-deleted-rec[ord] slider small-icon small-title smallint soap-fault soap-fault-actor +syn keyword ProgressOperator soap-fault-code soap-fault-detail soap-fault-string soap-header soap-header-entryref socket sort sort-ascending sort-number source +syn keyword ProgressOperator sql sqrt ssl-server-name standalone start-document start-element start[ing] startup-parameters state-detail static +syn keyword ProgressOperator status-area status-area-font stdcall stop stop-parsing stoppe[d] stored-proc[edure] stretch-to-fit strict string string-value +syn keyword ProgressOperator sub-ave[rage] sub-count sub-max[imum] sub-menu sub-menu-help sub-min[imum] sub-total subst[itute] substr[ing] subtype sum +syn keyword ProgressOperator super-proc[edures] suppress-namespace-processing suppress-w[arnings] suspend symmetric-encryption-algorithm symmetric-encryption-iv +syn keyword ProgressOperator symmetric-encryption-key symmetric-support synchronize system-alert[-boxes] system-help system-id tab-position tab-stop table-crc-list +syn keyword ProgressOperator table-list table-num[ber] target temp-dir[ectory] temp-table temp-table-prepar[e] terminate text-selected three-d through throw +syn keyword ProgressOperator thru tic-marks time-source timezone title-bgc[olor] title-dc[olor] title-fgc[olor] title-fo[nt] to-rowid toggle-box +syn keyword ProgressOperator tooltip tooltips top top-nav-query topic total tracking-changes trailing trans-init-proc[edure] transaction-mode +syn keyword ProgressOperator transpar[ent] trunc[ate] ttcodepage type type-of unbox unbuff[ered] unique-id unique-match unload unsigned-byte unsigned-integer +syn keyword ProgressOperator unsigned-long unsigned-short update-attribute upper url url-decode url-encode url-password url-userid use use-dic[t-exps] +syn keyword ProgressOperator use-filename use-text use-widget-pool user-id valid-event valid-handle valid-object validate validate-expressio[n] +syn keyword ProgressOperator validate-message validate-seal validate-xml validation-enabled var[iable] verb[ose] version vert[ical] view-first-column-on-reopen +syn keyword ProgressOperator virtual-height[-chars] virtual-height-p[ixels] virtual-width[-chars] virtual-width-p[ixels] visible void wait warning weekday where-string +syn keyword ProgressOperator widget widget-e[nter] widget-h[andle] widget-id widget-l[eave] widget-pool width[-chars] width-p[ixels] window-name +syn keyword ProgressOperator window-sta[te] window-sys[tem] word-index word-wrap work-area-height-p[ixels] work-area-width-p[ixels] work-area-x work-area-y +syn keyword ProgressOperator write-cdata write-characters write-comment write-data-element write-empty-element write-entity-ref write-external-dtd +syn keyword ProgressOperator write-fragment write-message write-processing-instruction write-status write-xml write-xmlschema x x-document x-noderef x-of +syn keyword ProgressOperator xml-data-type xml-node-name xml-node-type xml-schema-pat[h] xml-suppress-namespace-processing y y-of year year-offset yes-no +syn keyword ProgressOperator yes-no-cancel + +syn keyword ProgressType char[acter] int[eger] int64 dec[imal] log[ical] da[te] datetime datetime-tz + +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" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 sw=8 diff --git a/runtime/syntax/prolog.vim b/runtime/syntax/prolog.vim new file mode 100644 index 0000000000..f5f0e673ec --- /dev/null +++ b/runtime/syntax/prolog.vim @@ -0,0 +1,123 @@ +" Vim syntax file +" Language: PROLOG +" Maintainers: Thomas Koehler +" Last Change: 2013 May 23 +" 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 prologClause matchgroup=prologClauseHead start=+^\s*[a-z]\w*+ matchgroup=Normal end=+\.\s\|\.$+ contains=ALLBUT,prologClause + +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 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 + HiLink prologClause Normal + + else + + HiLink prologKeyword Keyword + HiLink prologClauseHead Constant + HiLink prologClause Normal + 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/runtime/syntax/promela.vim b/runtime/syntax/promela.vim new file mode 100644 index 0000000000..e812bc2749 --- /dev/null +++ b/runtime/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/runtime/syntax/proto.vim b/runtime/syntax/proto.vim new file mode 100644 index 0000000000..4d6a77e84a --- /dev/null +++ b/runtime/syntax/proto.vim @@ -0,0 +1,74 @@ +" syntax file for Protocol Buffers - Google's data interchange format +" +" Copyright 2008 Google Inc. 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. +" +" http://code.google.com/p/protobuf/ + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case match + +syn keyword protoTodo contained TODO FIXME XXX +syn cluster protoCommentGrp contains=protoTodo + +syn keyword protoSyntax syntax import option +syn keyword protoStructure package message group +syn keyword protoRepeat optional required repeated +syn keyword protoDefault default +syn keyword protoExtend extend extensions to max +syn keyword protoRPC service rpc returns + +syn keyword protoType int32 int64 uint32 uint64 sint32 sint64 +syn keyword protoType fixed32 fixed64 sfixed32 sfixed64 +syn keyword protoType float double bool string bytes +syn keyword protoTypedef enum +syn keyword protoBool true false + +syn match protoInt /-\?\<\d\+\>/ +syn match protoInt /\<0[xX]\x+\>/ +syn match protoFloat /\<-\?\d*\(\.\d*\)\?/ +syn region protoComment start="\/\*" end="\*\/" contains=@protoCommentGrp +syn region protoComment start="//" skip="\\$" end="$" keepend contains=@protoCommentGrp +syn region protoString start=/"/ skip=/\\./ end=/"/ +syn region protoString start=/'/ skip=/\\./ end=/'/ + +hi def link protoTodo Todo + +hi def link protoSyntax Include +hi def link protoStructure Structure +hi def link protoRepeat Repeat +hi def link protoDefault Keyword +hi def link protoExtend Keyword +hi def link protoRPC Keyword +hi def link protoType Type +hi def link protoTypedef Typedef +hi def link protoBool Boolean + +hi def link protoInt Number +hi def link protoFloat Float +hi def link protoComment Comment +hi def link protoString String + +let b:current_syntax = "proto" diff --git a/runtime/syntax/protocols.vim b/runtime/syntax/protocols.vim new file mode 100644 index 0000000000..1dc109caf6 --- /dev/null +++ b/runtime/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/runtime/syntax/psf.vim b/runtime/syntax/psf.vim new file mode 100644 index 0000000000..2b376f94cc --- /dev/null +++ b/runtime/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/runtime/syntax/ptcap.vim b/runtime/syntax/ptcap.vim new file mode 100644 index 0000000000..45590cf61b --- /dev/null +++ b/runtime/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/runtime/syntax/purifylog.vim b/runtime/syntax/purifylog.vim new file mode 100644 index 0000000000..8bcfb4b006 --- /dev/null +++ b/runtime/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/runtime/syntax/pyrex.vim b/runtime/syntax/pyrex.vim new file mode 100644 index 0000000000..7dc9b955b0 --- /dev/null +++ b/runtime/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/runtime/syntax/python.vim b/runtime/syntax/python.vim new file mode 100644 index 0000000000..a4ffcd4240 --- /dev/null +++ b/runtime/syntax/python.vim @@ -0,0 +1,303 @@ +" Vim syntax file +" Language: Python +" Maintainer: Neil Schemenauer +" Last Change: 2014 Jul 16 +" 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 + +" We need nocompatible mode in order to continue lines with backslashes. +" Original setting will be restored. +let s:cpo_save = &cpo +set cpo&vim + +" 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{.\{-}}" 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_highlight") + 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" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim:set sw=2 sts=2 ts=8 noet: diff --git a/runtime/syntax/qf.vim b/runtime/syntax/qf.vim new file mode 100644 index 0000000000..5c987a97b6 --- /dev/null +++ b/runtime/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/runtime/syntax/quake.vim b/runtime/syntax/quake.vim new file mode 100644 index 0000000000..3a9b68d6f3 --- /dev/null +++ b/runtime/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/runtime/syntax/r.vim b/runtime/syntax/r.vim new file mode 100644 index 0000000000..85a6eaa2ae --- /dev/null +++ b/runtime/syntax/r.vim @@ -0,0 +1,224 @@ +" Vim syntax file +" Language: R (GNU S) +" Maintainer: Jakson Aquino +" Former Maintainers: Vaidotas Zemlys +" Tom Payne +" Last Change: Wed Jul 09, 2014 10:29PM +" Filenames: *.R *.r *.Rhistory *.Rt +" +" NOTE: The highlighting of R functions is defined in the +" r-plugin/functions.vim, which is part of vim-r-plugin2: +" http://www.vim.org/scripts/script.php?script_id=2628 +" +" CONFIGURATION: +" syntax folding can be turned on by +" +" let r_syntax_folding = 1 +" +" Some lines of code were borrowed from Zhuojun Chen. + +if exists("b:current_syntax") + finish +endif + +setlocal iskeyword=@,48-57,_,. + +if exists("g:r_syntax_folding") + setlocal foldmethod=syntax +endif + +syn case match + +" Comment +syn match rCommentTodo contained "\(BUG\|FIXME\|NOTE\|TODO\):" +syn match rComment contains=@Spell,rCommentTodo "#.*" + +" Roxygen +syn match rOKeyword contained "@\(param\|return\|name\|rdname\|examples\|include\|docType\)" +syn match rOKeyword contained "@\(S3method\|TODO\|aliases\|alias\|assignee\|author\|callGraphDepth\|callGraph\)" +syn match rOKeyword contained "@\(callGraphPrimitives\|concept\|exportClass\|exportMethod\|exportPattern\|export\|formals\)" +syn match rOKeyword contained "@\(format\|importClassesFrom\|importFrom\|importMethodsFrom\|import\|keywords\)" +syn match rOKeyword contained "@\(method\|noRd\|note\|references\|seealso\|setClass\|slot\|source\|title\|usage\)" +syn match rOKeyword contained "@\(family\|template\|templateVar\|description\|details\|inheritsParams\)" +syn match rOComment contains=@Spell,rOKeyword "#'.*" + + +if &filetype == "rhelp" + " string enclosed in double quotes + syn region rString contains=rSpecial,@Spell start=/"/ skip=/\\\\\|\\"/ end=/"/ + " string enclosed in single quotes + syn region rString contains=rSpecial,@Spell start=/'/ skip=/\\\\\|\\'/ end=/'/ +else + " string enclosed in double quotes + syn region rString contains=rSpecial,rStrError,@Spell start=/"/ skip=/\\\\\|\\"/ end=/"/ + " string enclosed in single quotes + syn region rString contains=rSpecial,rStrError,@Spell start=/'/ skip=/\\\\\|\\'/ end=/'/ +endif + +syn match rStrError display contained "\\." + + +" New line, carriage return, tab, backspace, bell, feed, vertical tab, backslash +syn match rSpecial display contained "\\\(n\|r\|t\|b\|a\|f\|v\|'\|\"\)\|\\\\" + +" Hexadecimal and Octal digits +syn match rSpecial display contained "\\\(x\x\{1,2}\|[0-8]\{1,3}\)" + +" Unicode characters +syn match rSpecial display contained "\\u\x\{1,4}" +syn match rSpecial display contained "\\U\x\{1,8}" +syn match rSpecial display contained "\\u{\x\{1,4}}" +syn match rSpecial display contained "\\U{\x\{1,8}}" + +" Statement +syn keyword rStatement break next return +syn keyword rConditional if else +syn keyword rRepeat for in repeat while + +" Constant (not really) +syn keyword rConstant T F LETTERS letters month.abb month.name pi +syn keyword rConstant R.version.string + +syn keyword rNumber NA_integer_ NA_real_ NA_complex_ NA_character_ + +" Constants +syn keyword rConstant NULL +syn keyword rBoolean FALSE TRUE +syn keyword rNumber NA Inf NaN + +" integer +syn match rInteger "\<\d\+L" +syn match rInteger "\<0x\([0-9]\|[a-f]\|[A-F]\)\+L" +syn match rInteger "\<\d\+[Ee]+\=\d\+L" + +" number with no fractional part or exponent +syn match rNumber "\<\d\+\>" +" hexadecimal number +syn match rNumber "\<0x\([0-9]\|[a-f]\|[A-F]\)\+" + +" 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\+" + +" complex number +syn match rComplex "\<\d\+i" +syn match rComplex "\<\d\++\d\+i" +syn match rComplex "\<0x\([0-9]\|[a-f]\|[A-F]\)\+i" +syn match rComplex "\<\d\+\.\d*\([Ee][-+]\=\d\+\)\=i" +syn match rComplex "\<\.\d\+\([Ee][-+]\=\d\+\)\=i" +syn match rComplex "\<\d\+[Ee][-+]\=\d\+i" + +syn match rOperator "&" +syn match rOperator '-' +syn match rOperator '\*' +syn match rOperator '+' +syn match rOperator '=' +if &filetype != "rmd" && &filetype != "rrst" + syn match rOperator "[|!<>^~/:]" +else + syn match rOperator "[|!<>^~`/:]" +endif +syn match rOperator "%\{2}\|%\S\{-}%" +syn match rOpError '\*\{3}' +syn match rOpError '//' +syn match rOpError '&&&' +syn match rOpError '|||' +syn match rOpError '<<' +syn match rOpError '>>' + +syn match rArrow "<\{1,2}-" +syn match rArrow "->\{1,2}" + +" Special +syn match rDelimiter "[,;:]" + +" Error +if exists("g:r_syntax_folding") + syn region rRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError fold + syn region rRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError fold + syn region rRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError fold +else + 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 +endif + +syn match rError "[)\]}]" +syn match rBraceError "[)}]" contained +syn match rCurlyError "[)\]]" contained +syn match rParenError "[\]}]" contained + +" Source list of R functions. The list is produced by the Vim-R-plugin +" http://www.vim.org/scripts/script.php?script_id=2628 +runtime r-plugin/functions.vim + +syn match rDollar display contained "\$" +syn match rDollar display contained "@" + +" List elements will not be highlighted as functions: +syn match rLstElmt "\$[a-zA-Z0-9\\._]*" contains=rDollar +syn match rLstElmt "@[a-zA-Z0-9\\._]*" contains=rDollar + +" Functions that may add new objects +syn keyword rPreProc library require attach detach source + +if &filetype == "rhelp" + syn match rHelpIdent '\\method' + syn match rHelpIdent '\\S4method' +endif + +" Type +syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame + +" Name of object with spaces +if &filetype != "rmd" && &filetype != "rrst" + syn region rNameWSpace start="`" end="`" +endif + +if &filetype == "rhelp" + syn match rhPreProc "^#ifdef.*" + syn match rhPreProc "^#endif.*" + syn match rhSection "\\dontrun\>" +endif + +" Define the default highlighting. +hi def link rArrow Statement +hi def link rBoolean Boolean +hi def link rBraceError Error +hi def link rComment Comment +hi def link rCommentTodo Todo +hi def link rOComment Comment +hi def link rComplex Number +hi def link rConditional Conditional +hi def link rConstant Constant +hi def link rCurlyError Error +hi def link rDelimiter Delimiter +hi def link rDollar SpecialChar +hi def link rError Error +hi def link rFloat Float +hi def link rFunction Function +hi def link rHelpIdent Identifier +hi def link rhPreProc PreProc +hi def link rhSection PreCondit +hi def link rInteger Number +hi def link rLstElmt Normal +hi def link rNameWSpace Normal +hi def link rNumber Number +hi def link rOperator Operator +hi def link rOpError Error +hi def link rParenError Error +hi def link rPreProc PreProc +hi def link rRepeat Repeat +hi def link rSpecial SpecialChar +hi def link rStatement Statement +hi def link rString String +hi def link rStrError Error +hi def link rType Type +hi def link rOKeyword Title + +let b:current_syntax="r" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/racc.vim b/runtime/syntax/racc.vim new file mode 100644 index 0000000000..d412227cbd --- /dev/null +++ b/runtime/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/runtime/syntax/radiance.vim b/runtime/syntax/radiance.vim new file mode 100644 index 0000000000..461b708f0e --- /dev/null +++ b/runtime/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/runtime/syntax/ratpoison.vim b/runtime/syntax/ratpoison.vim new file mode 100644 index 0000000000..9fc59bec0d --- /dev/null +++ b/runtime/syntax/ratpoison.vim @@ -0,0 +1,280 @@ +" Vim syntax file +" Language: Ratpoison configuration/commands file ( /etc/ratpoisonrc ~/.ratpoisonrc ) +" Maintainer: Magnus Woldrich +" URL: http://github.com/trapd00r/vim-syntax-ratpoison +" Last Change: 2011 Apr 11 +" Previous Maintainer: Doug Kearns + +" 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 fwcolor +syn keyword ratpoisonSetArg bwcolor +syn keyword ratpoisonSetArg historysize +syn keyword ratpoisonSetArg historycompaction +syn keyword ratpoisonSetArg historyexpansion +syn keyword ratpoisonSetArg topkmap +syn keyword ratpoisonSetArg barinpadding +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/runtime/syntax/rc.vim b/runtime/syntax/rc.vim new file mode 100644 index 0000000000..c3feb97816 --- /dev/null +++ b/runtime/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/runtime/syntax/rcs.vim b/runtime/syntax/rcs.vim new file mode 100644 index 0000000000..e45d5fdbb6 --- /dev/null +++ b/runtime/syntax/rcs.vim @@ -0,0 +1,76 @@ +" Vim syntax file +" Language: RCS file +" Maintainer: Dmitry Vasiliev +" URL: https://github.com/hdima/vim-scripts/blob/master/syntax/rcs.vim +" Last Change: 2012-02-11 +" Filenames: *,v +" Version: 1.12 + +" 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/runtime/syntax/rcslog.vim b/runtime/syntax/rcslog.vim new file mode 100644 index 0000000000..acacfa124b --- /dev/null +++ b/runtime/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/runtime/syntax/readline.vim b/runtime/syntax/readline.vim new file mode 100644 index 0000000000..091722e5e5 --- /dev/null +++ b/runtime/syntax/readline.vim @@ -0,0 +1,395 @@ +" Vim syntax file +" Language: readline(3) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2012-04-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 match readlineKey contained + \ '\S' + \ nextgroup=readlineKeyTerminator + +syn match readlineBegin display '^' + \ nextgroup=readlineComment, + \ readlineConditional, + \ readlineInclude, + \ readlineKeyName, + \ readlineKey, + \ readlineKeySeq, + \ readlineKeyword + \ skipwhite + +syn region readlineComment contained display oneline + \ start='#' + \ end='$' + \ contains=readlineTodo, + \ @Spell + +syn keyword readlineTodo contained + \ TODO + \ FIXME + \ XXX + \ NOTE + +syn match readlineConditional contained + \ '$if\>' + \ nextgroup=readlineTest, + \ readlineTestApp + \ skipwhite + +syn keyword readlineTest contained + \ mode + \ nextgroup=readlineTestModeEq + +syn match readlineTestModeEq contained + \ '=' + \ nextgroup=readlineEditingMode + +syn keyword readlineTest contained + \ term + \ nextgroup=readlineTestTermEq + +syn match readlineTestTermEq contained + \ '=' + \ nextgroup=readlineTestTerm + +syn match readlineTestTerm contained + \ '\S\+' + +syn match readlineTestApp contained + \ '\S\+' + +syn match readlineConditional contained display + \ '$\%(else\|endif\)\>' + +syn match readlineInclude contained display + \ '$include\>' + \ nextgroup=readlinePath + +syn match readlinePath contained display + \ '.\+' + +syn case ignore +syn match readlineKeyName contained display + \ nextgroup=readlineKeySeparator, + \ readlineKeyTerminator + \ '\%(Control\|Del\|Esc\|Escape\|LFD\|Meta\|Newline\|Ret\|Return\|Rubout\|Space\|Spc\|Tab\)' +syn case match + +syn match readlineKeySeparator contained + \ '-' + \ nextgroup=readlineKeyName, + \ readlineKey + +syn match readlineKeyTerminator contained + \ ':' + \ nextgroup=readlineFunction + \ skipwhite + +syn region readlineKeySeq contained display oneline + \ start=+"+ + \ skip=+\\\\\|\\"+ + \ end=+"+ + \ contains=readlineKeyEscape + \ nextgroup=readlineKeyTerminator + +syn match readlineKeyEscape contained display + \ +\\\([CM]-\|[e\\"'abdfnrtv]\|\o\{3}\|x\x\{2}\)+ + +syn keyword readlineKeyword contained + \ set + \ nextgroup=readlineVariable + \ skipwhite + +syn keyword readlineVariable contained + \ nextgroup=readlineBellStyle + \ skipwhite + \ bell-style + +syn keyword readlineVariable contained + \ nextgroup=readlineBoolean + \ skipwhite + \ bind-tty-special-chars + \ completion-ignore-case + \ completion-map-case + \ convert-meta + \ disable-completion + \ echo-control-characters + \ enable-keypad + \ enable-meta-key + \ expand-tilde + \ history-preserve-point + \ horizontal-scroll-mode + \ input-meta + \ meta-flag + \ mark-directories + \ mark-modified-lines + \ mark-symlinked-directories + \ match-hidden-files + \ menu-complete-display-prefix + \ output-meta + \ page-completions + \ print-completions-horizontally + \ revert-all-at-newline + \ show-all-if-ambiguous + \ show-all-if-unmodified + \ skip-completed-text + \ visible-stats + +syn keyword readlineVariable contained + \ nextgroup=readlineString + \ skipwhite + \ comment-begin + \ isearch-terminators + +syn keyword readlineVariable contained + \ nextgroup=readlineNumber + \ skipwhite + \ completion-display-width + \ completion-prefix-display-length + \ completion-query-items + \ history-size + +syn keyword readlineVariable contained + \ nextgroup=readlineEditingMode + \ skipwhite + \ editing-mode + +syn keyword readlineVariable contained + \ nextgroup=readlineKeymap + \ skipwhite + \ keymap + +syn keyword readlineBellStyle contained + \ audible + \ visible + \ none + +syn case ignore +syn keyword readlineBoolean contained + \ on + \ off +syn case match + +syn region readlineString contained display oneline + \ matchgroup=readlineStringDelimiter + \ start=+"+ + \ skip=+\\\\\|\\"+ + \ end=+"+ + +syn match readlineNumber contained display + \ '[+-]\d\+\>' + +syn keyword readlineEditingMode contained + \ emacs + \ vi + +syn match readlineKeymap contained display + \ 'emacs\%(-\%(standard\|meta\|ctlx\)\)\=\|vi\%(-\%(move\|command\|insert\)\)\=' + +syn keyword readlineFunction contained + \ 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 + \ menu-complete-backward + \ 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 + \ skip-csi-sequence + \ insert-comment + \ dump-functions + \ dump-variables + \ dump-macros + \ emacs-editing-mode + \ vi-editing-mode + \ + \ vi-eof-maybe + \ vi-movement-mode + \ vi-undo + \ vi-match + \ vi-tilde-expand + \ 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-char-search + \ vi-fetch-history + \ vi-insert-beg + \ vi-search-again + \ vi-put + \ vi-replace + \ vi-subst + \ vi-char-search + \ vi-next-word + \ vi-yank-to + \ vi-first-print + \ vi-yank-arg + \ vi-goto-mark + \ vi-append-mode + \ vi-prev-word + \ vi-change-to + \ vi-delete-to + \ vi-end-word + \ vi-char-search + \ vi-insert-mode + \ vi-set-mark + \ vi-search-again + \ vi-put + \ vi-change-char + \ vi-subst + \ vi-char-search + \ vi-undo + \ vi-next-word + \ vi-delete + \ vi-yank-to + \ vi-column + \ vi-change-case + +if exists("readline_has_bash") + syn keyword readlineFunction 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 readlineKey readlineKeySeq +hi def link readlineComment Comment +hi def link readlineTodo Todo +hi def link readlineConditional Conditional +hi def link readlineTest Type +hi def link readlineDelimiter Delimiter +hi def link readlineTestModeEq readlineEq +hi def link readlineTestTermEq readlineEq +hi def link readlineTestTerm readlineString +hi def link readlineTestAppEq readlineEq +hi def link readlineTestApp readlineString +hi def link readlineInclude Include +hi def link readlinePath String +hi def link readlineKeyName SpecialChar +hi def link readlineKeySeparator readlineKeySeq +hi def link readlineKeyTerminator readlineDelimiter +hi def link readlineKeySeq String +hi def link readlineKeyEscape SpecialChar +hi def link readlineKeyword Keyword +hi def link readlineVariable Identifier +hi def link readlineBellStyle Constant +hi def link readlineBoolean Boolean +hi def link readlineString String +hi def link readlineStringDelimiter readlineString +hi def link readlineNumber Number +hi def link readlineEditingMode Constant +hi def link readlineKeymap Constant +hi def link readlineFunction Function + +let b:current_syntax = 'readline' + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/rebol.vim b/runtime/syntax/rebol.vim new file mode 100644 index 0000000000..e6395758f3 --- /dev/null +++ b/runtime/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/runtime/syntax/redif.vim b/runtime/syntax/redif.vim new file mode 100644 index 0000000000..1b83c07790 --- /dev/null +++ b/runtime/syntax/redif.vim @@ -0,0 +1,972 @@ +" Vim syntax file +" Language: ReDIF +" Maintainer: Axel Castellane +" Last Change: 2013 April 17 +" Original Author: Axel Castellane +" Source: http://openlib.org/acmes/root/docu/redif_1.html +" File Extension: rdf +" Note: The ReDIF format is used by RePEc. + +" To be compatible with Vim 5.8 use: +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" ReDIF is case-insensitive +syntax case ignore + +" Structure: Some fields determine what fields can come next. For example: +" Template-Type +" *-Name +" File-URL +" *-Institution +" Those fields span a syntax region over several lines so that these regions +" can only contain their respective items. + +" Any line which is not a correct template or part of an argument is an error. +" This comes at the very beginning, so it has the lowest priority and will +" only match if nothing else did. +syntax match redifWrongLine /^.\+/ display + +highlight def link redifWrongLine redifError + +" Comments must start with # and it must be the first character of the line, +" otherwise I believe that they are considered as part of an argument. +syntax match redifComment /^#.*/ containedin=ALL display + +" Defines the 9 possible multi-lines regions of Template-Type and the fields +" they can contain. +syntax region redifRegionTemplatePaper start=/^Template-Type:\_s*ReDIF-Paper \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsPaper,redifWrongLine,redifRegionClusterAuthor,redifRegionClusterFile fold +syntax region redifRegionTemplateArticle start=/^Template-Type:\_s*ReDIF-Article \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsArticle,redifWrongLine,redifRegionClusterAuthor,redifRegionClusterFile fold +syntax region redifRegionTemplateChapter start=/^Template-Type:\_s*ReDIF-Chapter \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsChapter,redifWrongLine,redifRegionClusterAuthor,redifRegionClusterFile,redifRegionClusterProvider,redifRegionClusterPublisher,redifRegionClusterEditor fold +syntax region redifRegionTemplateBook start=/^Template-Type:\_s*ReDIF-Book \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsBook,redifWrongLine,redifRegionClusterAuthor,redifRegionClusterFile,redifRegionClusterProvider,redifRegionClusterPublisher,redifRegionClusterEditor fold +syntax region redifRegionTemplateSoftware start=/^Template-Type:\_s*ReDIF-Software \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsSoftware,redifWrongLine,redifRegionClusterAuthor,redifRegionClusterFile fold +syntax region redifRegionTemplateArchive start=/^Template-Type:\_s*ReDIF-Archive \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsArchive,redifWrongLine fold +syntax region redifRegionTemplateSeries start=/^Template-Type:\_s*ReDIF-Series \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsSeries,redifWrongLine,redifRegionClusterProvider,redifRegionClusterPublisher,redifRegionClusterEditor fold +syntax region redifRegionTemplateInstitution start=/^Template-Type:\_s*ReDIF-Institution \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsInstitution,redifWrongLine,redifRegionClusterPrimary,redifRegionClusterSecondary,redifRegionClusterTertiary,redifRegionClusterQuaternary fold +syntax region redifRegionTemplatePerson start=/^Template-Type:\_s*ReDIF-Person \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsPerson,redifWrongLine,redifRegionClusterWorkplace fold + +" All fields are foldable (These come before clusters, so they have lower +" priority). So they are contained in a foldable syntax region. +syntax region redifContainerFieldsPaper start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldTitle,redifFieldHandleOfWork,redifFieldLanguage,redifFieldContactEmail,redifFieldAbstract,redifFieldClassificationJEL,redifFieldKeywords,redifFieldNumber,redifFieldCreationDate,redifFieldRevisionDate,redifFieldPublicationStatus,redifFieldNote,redifFieldLength,redifFieldSeries,redifFieldAvailability,redifFieldOrderURL,redifFieldArticleHandle,redifFieldBookHandle,redifFieldChapterHandle,redifFieldPaperHandle,redifFieldSoftwareHandle,redifFieldRestriction,redifFieldPrice,redifFieldNotification,redifFieldPublicationType,redifFieldTemplateType,redifWrongLine contained transparent fold +syntax region redifContainerFieldsArticle start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldTitle,redifFieldHandleOfWork,redifFieldLanguage,redifFieldContactEmail,redifFieldAbstract,redifFieldClassificationJEL,redifFieldKeywords,redifFieldNumber,redifFieldCreationDate,redifFieldPublicationStatus,redifFieldOrderURL,redifFieldArticleHandle,redifFieldBookHandle,redifFieldChapterHandle,redifFieldPaperHandle,redifFieldSoftwareHandle,redifFieldRestriction,redifFieldPrice,redifFieldNotification,redifFieldPublicationType,redifFieldJournal,redifFieldVolume,redifFieldYear,redifFieldIssue,redifFieldMonth,redifFieldPages,redifFieldNumber,redifFieldArticleHandle,redifFieldBookHandle,redifFieldChapterHandle,redifFieldPaperHandle,redifFieldSoftwareHandle,redifFieldTemplateType,redifWrongLine contained transparent fold +syntax region redifContainerFieldsChapter start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldHandleOfWork,redifFieldTitle,redifFieldContactEmail,redifFieldAbstract,redifFieldClassificationJEL,redifFieldKeywords,redifFieldBookTitle,redifFieldYear,redifFieldMonth,redifFieldPages,redifFieldChapter,redifFieldVolume,redifFieldEdition,redifFieldSeries,redifFieldISBN,redifFieldPublicationStatus,redifFieldNote,redifFieldInBook,redifFieldOrderURL,redifFieldArticleHandle,redifFieldBookHandle,redifFieldChapterHandle,redifFieldPaperHandle,redifFieldSoftwareHandle,redifFieldTemplateType,redifWrongLine contained transparent fold +syntax region redifContainerFieldsBook start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldTitle,redifFieldHandleOfWork,redifFieldContactEmail,redifFieldYear,redifFieldMonth,redifFieldVolume,redifFieldEdition,redifFieldSeries,redifFieldISBN,redifFieldPublicationStatus,redifFieldNote,redifFieldAbstract,redifFieldClassificationJEL,redifFieldKeywords,redifFieldHasChapter,redifFieldPrice,redifFieldOrderURL,redifFieldNumber,redifFieldCreationDate,redifFieldPublicationDate,redifFieldArticleHandle,redifFieldBookHandle,redifFieldChapterHandle,redifFieldPaperHandle,redifFieldSoftwareHandle,redifFieldTemplateType,redifWrongLine contained transparent fold +syntax region redifContainerFieldsSoftware start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldHandleOfWork,redifFieldTitle,redifFieldProgrammingLanguage,redifFieldAbstract,redifFieldNumber,redifFieldVersion,redifFieldClassificationJEL,redifFieldKeywords,redifFieldSize,redifFieldSeries,redifFieldCreationDate,redifFieldRevisionDate,redifFieldNote,redifFieldRequires,redifFieldArticleHandle,redifFieldBookHandle,redifFieldChapterHandle,redifFieldPaperHandle,redifFieldSoftwareHandle,redifFieldTemplateType,redifWrongLine contained transparent fold +syntax region redifContainerFieldsArchive start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldHandleOfArchive,redifFieldURL,redifFieldMaintainerEmail,redifFieldName,redifFieldMaintainerName,redifFieldMaintainerPhone,redifFieldMaintainerFax,redifFieldClassificationJEL,redifFieldHomepage,redifFieldDescription,redifFieldNotification,redifFieldRestriction,redifFieldTemplateType,redifWrongLine contained transparent fold +syntax region redifContainerFieldsSeries start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldName,redifFieldHandleOfSeries,redifFieldMaintainerEmail,redifFieldType,redifFieldOrderEmail,redifFieldOrderHomepage,redifFieldOrderPostal,redifFieldPrice,redifFieldRestriction,redifFieldMaintainerPhone,redifFieldMaintainerFax,redifFieldMaintainerName,redifFieldDescription,redifFieldClassificationJEL,redifFieldKeywords,redifFieldNotification,redifFieldISSN,redifFieldFollowup,redifFieldPredecessor,redifFieldTemplateType,redifWrongLine contained transparent fold +syntax region redifContainerFieldsInstitution start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldHandleOfInstitution,redifFieldPrimaryDefunct,redifFieldSecondaryDefunct,redifFieldTertiaryDefunct,redifFieldTemplateType,redifWrongLine contained transparent fold +syntax region redifContainerFieldsPerson start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldHandleOfPerson,redifFieldNameFull,redifFieldNameFirst,redifFieldNameLast,redifFieldNamePrefix,redifFieldNameMiddle,redifFieldNameSuffix,redifFieldNameASCII,redifFieldEmail,redifFieldHomepage,redifFieldFax,redifFieldPostal,redifFieldPhone,redifFieldWorkplaceOrganization,redifFieldAuthorPaper,redifFieldAuthorArticle,redifFieldAuthorSoftware,redifFieldAuthorBook,redifFieldAuthorChapter,redifFieldEditorBook,redifFieldEditorSeries,redifFieldClassificationJEL,redifFieldShortId,redifFieldLastLoginDate,redifFieldRegisteredDate,redifWrongLine contained transparent fold + +" Defines the 10 possible clusters and what they can contain +" A field not in the cluster ends the cluster. +syntax region redifRegionClusterWorkplace start=/^Workplace-Name:/ skip=/^Workplace-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsWorkplace fold +syntax region redifRegionClusterPrimary start=/^Primary-Name:/ skip=/^Primary-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsPrimary fold +syntax region redifRegionClusterSecondary start=/^Secondary-Name:/ skip=/^Secondary-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsSecondary fold +syntax region redifRegionClusterTertiary start=/^Tertiary-Name:/ skip=/^Tertiary-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsTertiary fold +syntax region redifRegionClusterQuaternary start=/^Quaternary-Name:/ skip=/^Quaternary-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsQuaternary fold +syntax region redifRegionClusterProvider start=/^Provider-Name:/ skip=/^Provider-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsProvider fold +syntax region redifRegionClusterPublisher start=/^Publisher-Name:/ skip=/^Publisher-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsPublisher fold +syntax region redifRegionClusterAuthor start=/^Author-Name:/ skip=/^Author-\%(Name\%(-First\|-Last\)\|Homepage\|Email\|Fax\|Postal\|Phone\|Person\|Workplace-Name\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifRegionClusterAuthorWorkplace,redifContainerFieldsAuthor fold +syntax region redifRegionClusterEditor start=/^Editor-Name:/ skip=/^Editor-\%(Name\%(-First\|-Last\)\|Homepage\|Email\|Fax\|Postal\|Phone\|Person\|Workplace-Name\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifRegionClusterEditorWorkplace,redifContainerFieldsEditor fold +syntax region redifRegionClusterFile start=/^File-URL:/ skip=/^File-\%(Format\|Function\|Size\|Restriction\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsFile fold + +" The foldable containers of the clusters. +syntax region redifContainerFieldsWorkplace start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldWorkplaceName,redifFieldWorkplaceHomepage,redifFieldWorkplaceNameEnglish,redifFieldWorkplacePostal,redifFieldWorkplaceLocation,redifFieldWorkplaceEmail,redifFieldWorkplacePhone,redifFieldWorkplaceFax,redifFieldWorkplaceInstitution,redifWrongLine contained transparent fold +syntax region redifContainerFieldsPrimary start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldPrimaryName,redifFieldPrimaryHomepage,redifFieldPrimaryNameEnglish,redifFieldPrimaryPostal,redifFieldPrimaryLocation,redifFieldPrimaryEmail,redifFieldPrimaryPhone,redifFieldPrimaryFax,redifFieldPrimaryInstitution,redifWrongLine contained transparent fold +syntax region redifContainerFieldsSecondary start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldSecondaryName,redifFieldSecondaryHomepage,redifFieldSecondaryNameEnglish,redifFieldSecondaryPostal,redifFieldSecondaryLocation,redifFieldSecondaryEmail,redifFieldSecondaryPhone,redifFieldSecondaryFax,redifFieldSecondaryInstitution,redifWrongLine contained transparent fold +syntax region redifContainerFieldsTertiary start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldTertiaryName,redifFieldTertiaryHomepage,redifFieldTertiaryNameEnglish,redifFieldTertiaryPostal,redifFieldTertiaryLocation,redifFieldTertiaryEmail,redifFieldTertiaryPhone,redifFieldTertiaryFax,redifFieldTertiaryInstitution,redifWrongLine contained transparent fold +syntax region redifContainerFieldsQuaternary start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldQuaternaryName,redifFieldQuaternaryHomepage,redifFieldQuaternaryNameEnglish,redifFieldQuaternaryPostal,redifFieldQuaternaryLocation,redifFieldQuaternaryEmail,redifFieldQuaternaryPhone,redifFieldQuaternaryFax,redifFieldQuaternaryInstitution,redifWrongLine contained transparent fold +syntax region redifContainerFieldsProvider start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldProviderName,redifFieldProviderHomepage,redifFieldProviderNameEnglish,redifFieldProviderPostal,redifFieldProviderLocation,redifFieldProviderEmail,redifFieldProviderPhone,redifFieldProviderFax,redifFieldProviderInstitution,redifWrongLine contained transparent fold +syntax region redifContainerFieldsPublisher start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldPublisherName,redifFieldPublisherHomepage,redifFieldPublisherNameEnglish,redifFieldPublisherPostal,redifFieldPublisherLocation,redifFieldPublisherEmail,redifFieldPublisherPhone,redifFieldPublisherFax,redifFieldPublisherInstitution,redifWrongLine contained transparent fold +syntax region redifContainerFieldsAuthor start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldAuthorName,redifFieldAuthorNameFirst,redifFieldAuthorNameLast,redifFieldAuthorHomepage,redifFieldAuthorEmail,redifFieldAuthorFax,redifFieldAuthorPostal,redifFieldAuthorPhone,redifFieldAuthorPerson,redifWrongLine contained transparent fold +syntax region redifContainerFieldsEditor start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldEditorName,redifFieldEditorNameFirst,redifFieldEditorNameLast,redifFieldEditorHomepage,redifFieldEditorEmail,redifFieldEditorFax,redifFieldEditorPostal,redifFieldEditorPhone,redifFieldEditorPerson,redifWrongLine contained transparent fold +syntax region redifContainerFieldsFile start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldFileURL,redifFieldFileFormat,redifFieldFileFunction,redifFieldFileSize,redifFieldFileRestriction,redifWrongLine contained transparent fold + +" The two clusters in cluster (must be presented after to have priority over +" fields containers) +syntax region redifRegionClusterAuthorWorkplace start=/^Author-Workplace-Name:/ skip=/^Author-Workplace-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsAuthorWorkplace fold +syntax region redifRegionClusterEditorWorkplace start=/^Editor-Workplace-Name:/ skip=/^Editor-Workplace-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsEditorWorkplace fold + +" Their foldable fields containers +syntax region redifContainerFieldsAuthorWorkplace start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldAuthorWorkplaceName,redifFieldAuthorWorkplaceHomepage,redifFieldAuthorWorkplaceNameEnglish,redifFieldAuthorWorkplacePostal,redifFieldAuthorWorkplaceLocation,redifFieldAuthorWorkplaceEmail,redifFieldAuthorWorkplacePhone,redifFieldAuthorWorkplaceFax,redifFieldAuthorWorkplaceInstitution,redifWrongLine contained transparent fold +syntax region redifContainerFieldsEditorWorkplace start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldEditorWorkplaceName,redifFieldEditorWorkplaceHomepage,redifFieldEditorWorkplaceNameEnglish,redifFieldEditorWorkplacePostal,redifFieldEditorWorkplaceLocation,redifFieldEditorWorkplaceEmail,redifFieldEditorWorkplacePhone,redifFieldEditorWorkplaceFax,redifFieldEditorWorkplaceInstitution,redifWrongLine contained transparent fold + +" All the possible fields +" Note: The "Handle" field is handled a little bit differently, because it +" does not have the same meaning depending on the Template-Type. See: +" /redifFieldHandleOf.... +syntax match redifFieldAbstract /^Abstract:/ skipwhite skipempty nextgroup=redifArgumentAbstract contained +syntax match redifFieldArticleHandle /^Article-Handle:/ skipwhite skipempty nextgroup=redifArgumentArticleHandle contained +syntax match redifFieldAuthorArticle /^Author-Article:/ skipwhite skipempty nextgroup=redifArgumentAuthorArticle contained +syntax match redifFieldAuthorBook /^Author-Book:/ skipwhite skipempty nextgroup=redifArgumentAuthorBook contained +syntax match redifFieldAuthorChapter /^Author-Chapter:/ skipwhite skipempty nextgroup=redifArgumentAuthorChapter contained +syntax match redifFieldAuthorEmail /^Author-Email:/ skipwhite skipempty nextgroup=redifArgumentAuthorEmail contained +syntax match redifFieldAuthorFax /^Author-Fax:/ skipwhite skipempty nextgroup=redifArgumentAuthorFax contained +syntax match redifFieldAuthorHomepage /^Author-Homepage:/ skipwhite skipempty nextgroup=redifArgumentAuthorHomepage contained +syntax match redifFieldAuthorName /^Author-Name:/ skipwhite skipempty nextgroup=redifArgumentAuthorName contained +syntax match redifFieldAuthorNameFirst /^Author-Name-First:/ skipwhite skipempty nextgroup=redifArgumentAuthorNameFirst contained +syntax match redifFieldAuthorNameLast /^Author-Name-Last:/ skipwhite skipempty nextgroup=redifArgumentAuthorNameLast contained +syntax match redifFieldAuthorPaper /^Author-Paper:/ skipwhite skipempty nextgroup=redifArgumentAuthorPaper contained +syntax match redifFieldAuthorPerson /^Author-Person:/ skipwhite skipempty nextgroup=redifArgumentAuthorPerson contained +syntax match redifFieldAuthorPhone /^Author-Phone:/ skipwhite skipempty nextgroup=redifArgumentAuthorPhone contained +syntax match redifFieldAuthorPostal /^Author-Postal:/ skipwhite skipempty nextgroup=redifArgumentAuthorPostal contained +syntax match redifFieldAuthorSoftware /^Author-Software:/ skipwhite skipempty nextgroup=redifArgumentAuthorSoftware contained +syntax match redifFieldAuthorWorkplaceEmail /^Author-Workplace-Email:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplaceEmail contained +syntax match redifFieldAuthorWorkplaceFax /^Author-Workplace-Fax:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplaceFax contained +syntax match redifFieldAuthorWorkplaceHomepage /^Author-Workplace-Homepage:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplaceHomepage contained +syntax match redifFieldAuthorWorkplaceInstitution /^Author-Workplace-Institution:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplaceInstitution contained +syntax match redifFieldAuthorWorkplaceLocation /^Author-Workplace-Location:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplaceLocation contained +syntax match redifFieldAuthorWorkplaceName /^Author-Workplace-Name:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplaceName contained +syntax match redifFieldAuthorWorkplaceNameEnglish /^Author-Workplace-Name-English:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplaceNameEnglish contained +syntax match redifFieldAuthorWorkplacePhone /^Author-Workplace-Phone:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplacePhone contained +syntax match redifFieldAuthorWorkplacePostal /^Author-Workplace-Postal:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplacePostal contained +syntax match redifFieldAvailability /^Availability:/ skipwhite skipempty nextgroup=redifArgumentAvailability contained +syntax match redifFieldBookHandle /^Book-Handle:/ skipwhite skipempty nextgroup=redifArgumentBookHandle contained +syntax match redifFieldBookTitle /^Book-Title:/ skipwhite skipempty nextgroup=redifArgumentBookTitle contained +syntax match redifFieldChapterHandle /^Chapter-Handle:/ skipwhite skipempty nextgroup=redifArgumentChapterHandle contained +syntax match redifFieldChapter /^Chapter:/ skipwhite skipempty nextgroup=redifArgumentChapter contained +syntax match redifFieldClassificationJEL /^Classification-JEL:/ skipwhite skipempty nextgroup=redifArgumentClassificationJEL contained +syntax match redifFieldContactEmail /^Contact-Email:/ skipwhite skipempty nextgroup=redifArgumentContactEmail contained +syntax match redifFieldCreationDate /^Creation-Date:/ skipwhite skipempty nextgroup=redifArgumentCreationDate contained +syntax match redifFieldDescription /^Description:/ skipwhite skipempty nextgroup=redifArgumentDescription contained +syntax match redifFieldEdition /^Edition:/ skipwhite skipempty nextgroup=redifArgumentEdition contained +syntax match redifFieldEditorBook /^Editor-Book:/ skipwhite skipempty nextgroup=redifArgumentEditorBook contained +syntax match redifFieldEditorEmail /^Editor-Email:/ skipwhite skipempty nextgroup=redifArgumentEditorEmail contained +syntax match redifFieldEditorFax /^Editor-Fax:/ skipwhite skipempty nextgroup=redifArgumentEditorFax contained +syntax match redifFieldEditorHomepage /^Editor-Homepage:/ skipwhite skipempty nextgroup=redifArgumentEditorHomepage contained +syntax match redifFieldEditorName /^Editor-Name:/ skipwhite skipempty nextgroup=redifArgumentEditorName contained +syntax match redifFieldEditorNameFirst /^Editor-Name-First:/ skipwhite skipempty nextgroup=redifArgumentEditorNameFirst contained +syntax match redifFieldEditorNameLast /^Editor-Name-Last:/ skipwhite skipempty nextgroup=redifArgumentEditorNameLast contained +syntax match redifFieldEditorPerson /^Editor-Person:/ skipwhite skipempty nextgroup=redifArgumentEditorPerson contained +syntax match redifFieldEditorPhone /^Editor-Phone:/ skipwhite skipempty nextgroup=redifArgumentEditorPhone contained +syntax match redifFieldEditorPostal /^Editor-Postal:/ skipwhite skipempty nextgroup=redifArgumentEditorPostal contained +syntax match redifFieldEditorSeries /^Editor-Series:/ skipwhite skipempty nextgroup=redifArgumentEditorSeries contained +syntax match redifFieldEditorWorkplaceEmail /^Editor-Workplace-Email:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplaceEmail contained +syntax match redifFieldEditorWorkplaceFax /^Editor-Workplace-Fax:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplaceFax contained +syntax match redifFieldEditorWorkplaceHomepage /^Editor-Workplace-Homepage:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplaceHomepage contained +syntax match redifFieldEditorWorkplaceInstitution /^Editor-Workplace-Institution:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplaceInstitution contained +syntax match redifFieldEditorWorkplaceLocation /^Editor-Workplace-Location:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplaceLocation contained +syntax match redifFieldEditorWorkplaceName /^Editor-Workplace-Name:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplaceName contained +syntax match redifFieldEditorWorkplaceNameEnglish /^Editor-Workplace-Name-English:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplaceNameEnglish contained +syntax match redifFieldEditorWorkplacePhone /^Editor-Workplace-Phone:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplacePhone contained +syntax match redifFieldEditorWorkplacePostal /^Editor-Workplace-Postal:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplacePostal contained +syntax match redifFieldEmail /^Email:/ skipwhite skipempty nextgroup=redifArgumentEmail contained +syntax match redifFieldFax /^Fax:/ skipwhite skipempty nextgroup=redifArgumentFax contained +syntax match redifFieldFileFormat /^File-Format:/ skipwhite skipempty nextgroup=redifArgumentFileFormat contained +syntax match redifFieldFileFunction /^File-Function:/ skipwhite skipempty nextgroup=redifArgumentFileFunction contained +syntax match redifFieldFileRestriction /^File-Restriction:/ skipwhite skipempty nextgroup=redifArgumentFileRestriction contained +syntax match redifFieldFileSize /^File-Size:/ skipwhite skipempty nextgroup=redifArgumentFileSize contained +syntax match redifFieldFileURL /^File-URL:/ skipwhite skipempty nextgroup=redifArgumentFileURL contained +syntax match redifFieldFollowup /^Followup:/ skipwhite skipempty nextgroup=redifArgumentFollowup contained +syntax match redifFieldHandleOfArchive /^Handle:/ skipwhite skipempty nextgroup=redifArgumentHandleOfArchive contained +syntax match redifFieldHandleOfInstitution /^Handle:/ skipwhite skipempty nextgroup=redifArgumentHandleOfInstitution contained +syntax match redifFieldHandleOfPerson /^Handle:/ skipwhite skipempty nextgroup=redifArgumentHandleOfPerson contained +syntax match redifFieldHandleOfSeries /^Handle:/ skipwhite skipempty nextgroup=redifArgumentHandleOfSeries contained +syntax match redifFieldHandleOfWork /^Handle:/ skipwhite skipempty nextgroup=redifArgumentHandleOfWork contained +syntax match redifFieldHasChapter /^HasChapter:/ skipwhite skipempty nextgroup=redifArgumentHasChapter contained +syntax match redifFieldHomepage /^Homepage:/ skipwhite skipempty nextgroup=redifArgumentHomepage contained +syntax match redifFieldInBook /^In-Book:/ skipwhite skipempty nextgroup=redifArgumentInBook contained +syntax match redifFieldISBN /^ISBN:/ skipwhite skipempty nextgroup=redifArgumentISBN contained +syntax match redifFieldISSN /^ISSN:/ skipwhite skipempty nextgroup=redifArgumentISSN contained +syntax match redifFieldIssue /^Issue:/ skipwhite skipempty nextgroup=redifArgumentIssue contained +syntax match redifFieldJournal /^Journal:/ skipwhite skipempty nextgroup=redifArgumentJournal contained +syntax match redifFieldKeywords /^Keywords:/ skipwhite skipempty nextgroup=redifArgumentKeywords contained +syntax match redifFieldKeywords /^Keywords:/ skipwhite skipempty nextgroup=redifArgumentKeywords contained +syntax match redifFieldLanguage /^Language:/ skipwhite skipempty nextgroup=redifArgumentLanguage contained +syntax match redifFieldLastLoginDate /^Last-Login-Date:/ skipwhite skipempty nextgroup=redifArgumentLastLoginDate contained +syntax match redifFieldLength /^Length:/ skipwhite skipempty nextgroup=redifArgumentLength contained +syntax match redifFieldMaintainerEmail /^Maintainer-Email:/ skipwhite skipempty nextgroup=redifArgumentMaintainerEmail contained +syntax match redifFieldMaintainerFax /^Maintainer-Fax:/ skipwhite skipempty nextgroup=redifArgumentMaintainerFax contained +syntax match redifFieldMaintainerName /^Maintainer-Name:/ skipwhite skipempty nextgroup=redifArgumentMaintainerName contained +syntax match redifFieldMaintainerPhone /^Maintainer-Phone:/ skipwhite skipempty nextgroup=redifArgumentMaintainerPhone contained +syntax match redifFieldMonth /^Month:/ skipwhite skipempty nextgroup=redifArgumentMonth contained +syntax match redifFieldNameASCII /^Name-ASCII:/ skipwhite skipempty nextgroup=redifArgumentNameASCII contained +syntax match redifFieldNameFirst /^Name-First:/ skipwhite skipempty nextgroup=redifArgumentNameFirst contained +syntax match redifFieldNameFull /^Name-Full:/ skipwhite skipempty nextgroup=redifArgumentNameFull contained +syntax match redifFieldNameLast /^Name-Last:/ skipwhite skipempty nextgroup=redifArgumentNameLast contained +syntax match redifFieldNameMiddle /^Name-Middle:/ skipwhite skipempty nextgroup=redifArgumentNameMiddle contained +syntax match redifFieldNamePrefix /^Name-Prefix:/ skipwhite skipempty nextgroup=redifArgumentNamePrefix contained +syntax match redifFieldNameSuffix /^Name-Suffix:/ skipwhite skipempty nextgroup=redifArgumentNameSuffix contained +syntax match redifFieldName /^Name:/ skipwhite skipempty nextgroup=redifArgumentName contained +syntax match redifFieldNote /^Note:/ skipwhite skipempty nextgroup=redifArgumentNote contained +syntax match redifFieldNotification /^Notification:/ skipwhite skipempty nextgroup=redifArgumentNotification contained +syntax match redifFieldNumber /^Number:/ skipwhite skipempty nextgroup=redifArgumentNumber contained +syntax match redifFieldOrderEmail /^Order-Email:/ skipwhite skipempty nextgroup=redifArgumentOrderEmail contained +syntax match redifFieldOrderHomepage /^Order-Homepage:/ skipwhite skipempty nextgroup=redifArgumentOrderHomepage contained +syntax match redifFieldOrderPostal /^Order-Postal:/ skipwhite skipempty nextgroup=redifArgumentOrderPostal contained +syntax match redifFieldOrderURL /^Order-URL:/ skipwhite skipempty nextgroup=redifArgumentOrderURL contained +syntax match redifFieldPages /^Pages:/ skipwhite skipempty nextgroup=redifArgumentPages contained +syntax match redifFieldPaperHandle /^Paper-Handle:/ skipwhite skipempty nextgroup=redifArgumentPaperHandle contained +syntax match redifFieldPhone /^Phone:/ skipwhite skipempty nextgroup=redifArgumentPhone contained +syntax match redifFieldPostal /^Postal:/ skipwhite skipempty nextgroup=redifArgumentPostal contained +syntax match redifFieldPredecessor /^Predecessor:/ skipwhite skipempty nextgroup=redifArgumentPredecessor contained +syntax match redifFieldPrice /^Price:/ skipwhite skipempty nextgroup=redifArgumentPrice contained +syntax match redifFieldPrimaryDefunct /^Primary-Defunct:/ skipwhite skipempty nextgroup=redifArgumentPrimaryDefunct contained +syntax match redifFieldPrimaryEmail /^Primary-Email:/ skipwhite skipempty nextgroup=redifArgumentPrimaryEmail contained +syntax match redifFieldPrimaryFax /^Primary-Fax:/ skipwhite skipempty nextgroup=redifArgumentPrimaryFax contained +syntax match redifFieldPrimaryHomepage /^Primary-Homepage:/ skipwhite skipempty nextgroup=redifArgumentPrimaryHomepage contained +syntax match redifFieldPrimaryInstitution /^Primary-Institution:/ skipwhite skipempty nextgroup=redifArgumentPrimaryInstitution contained +syntax match redifFieldPrimaryLocation /^Primary-Location:/ skipwhite skipempty nextgroup=redifArgumentPrimaryLocation contained +syntax match redifFieldPrimaryName /^Primary-Name:/ skipwhite skipempty nextgroup=redifArgumentPrimaryName contained +syntax match redifFieldPrimaryNameEnglish /^Primary-Name-English:/ skipwhite skipempty nextgroup=redifArgumentPrimaryNameEnglish contained +syntax match redifFieldPrimaryPhone /^Primary-Phone:/ skipwhite skipempty nextgroup=redifArgumentPrimaryPhone contained +syntax match redifFieldPrimaryPostal /^Primary-Postal:/ skipwhite skipempty nextgroup=redifArgumentPrimaryPostal contained +syntax match redifFieldProgrammingLanguage /^Programming-Language:/ skipwhite skipempty nextgroup=redifArgumentProgrammingLanguage contained +syntax match redifFieldProviderEmail /^Provider-Email:/ skipwhite skipempty nextgroup=redifArgumentProviderEmail contained +syntax match redifFieldProviderFax /^Provider-Fax:/ skipwhite skipempty nextgroup=redifArgumentProviderFax contained +syntax match redifFieldProviderHomepage /^Provider-Homepage:/ skipwhite skipempty nextgroup=redifArgumentProviderHomepage contained +syntax match redifFieldProviderInstitution /^Provider-Institution:/ skipwhite skipempty nextgroup=redifArgumentProviderInstitution contained +syntax match redifFieldProviderLocation /^Provider-Location:/ skipwhite skipempty nextgroup=redifArgumentProviderLocation contained +syntax match redifFieldProviderName /^Provider-Name:/ skipwhite skipempty nextgroup=redifArgumentProviderName contained +syntax match redifFieldProviderNameEnglish /^Provider-Name-English:/ skipwhite skipempty nextgroup=redifArgumentProviderNameEnglish contained +syntax match redifFieldProviderPhone /^Provider-Phone:/ skipwhite skipempty nextgroup=redifArgumentProviderPhone contained +syntax match redifFieldProviderPostal /^Provider-Postal:/ skipwhite skipempty nextgroup=redifArgumentProviderPostal contained +syntax match redifFieldPublicationDate /^Publication-Date:/ skipwhite skipempty nextgroup=redifArgumentPublicationDate contained +syntax match redifFieldPublicationStatus /^Publication-Status:/ skipwhite skipempty nextgroup=redifArgumentPublicationStatus contained +syntax match redifFieldPublicationType /^Publication-Type:/ skipwhite skipempty nextgroup=redifArgumentPublicationType contained +syntax match redifFieldQuaternaryEmail /^Quaternary-Email:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryEmail contained +syntax match redifFieldQuaternaryFax /^Quaternary-Fax:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryFax contained +syntax match redifFieldQuaternaryHomepage /^Quaternary-Homepage:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryHomepage contained +syntax match redifFieldQuaternaryInstitution /^Quaternary-Institution:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryInstitution contained +syntax match redifFieldQuaternaryLocation /^Quaternary-Location:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryLocation contained +syntax match redifFieldQuaternaryName /^Quaternary-Name:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryName contained +syntax match redifFieldQuaternaryNameEnglish /^Quaternary-Name-English:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryNameEnglish contained +syntax match redifFieldQuaternaryPhone /^Quaternary-Phone:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryPhone contained +syntax match redifFieldQuaternaryPostal /^Quaternary-Postal:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryPostal contained +syntax match redifFieldRegisteredDate /^Registered-Date:/ skipwhite skipempty nextgroup=redifArgumentRegisteredDate contained +syntax match redifFieldRequires /^Requires:/ skipwhite skipempty nextgroup=redifArgumentRequires contained +syntax match redifFieldRestriction /^Restriction:/ skipwhite skipempty nextgroup=redifArgumentRestriction contained +syntax match redifFieldRevisionDate /^Revision-Date:/ skipwhite skipempty nextgroup=redifArgumentRevisionDate contained +syntax match redifFieldSecondaryDefunct /^Secondary-Defunct:/ skipwhite skipempty nextgroup=redifArgumentSecondaryDefunct contained +syntax match redifFieldSecondaryEmail /^Secondary-Email:/ skipwhite skipempty nextgroup=redifArgumentSecondaryEmail contained +syntax match redifFieldSecondaryFax /^Secondary-Fax:/ skipwhite skipempty nextgroup=redifArgumentSecondaryFax contained +syntax match redifFieldSecondaryHomepage /^Secondary-Homepage:/ skipwhite skipempty nextgroup=redifArgumentSecondaryHomepage contained +syntax match redifFieldSecondaryInstitution /^Secondary-Institution:/ skipwhite skipempty nextgroup=redifArgumentSecondaryInstitution contained +syntax match redifFieldSecondaryLocation /^Secondary-Location:/ skipwhite skipempty nextgroup=redifArgumentSecondaryLocation contained +syntax match redifFieldSecondaryName /^Secondary-Name:/ skipwhite skipempty nextgroup=redifArgumentSecondaryName contained +syntax match redifFieldSecondaryNameEnglish /^Secondary-Name-English:/ skipwhite skipempty nextgroup=redifArgumentSecondaryNameEnglish contained +syntax match redifFieldSecondaryPhone /^Secondary-Phone:/ skipwhite skipempty nextgroup=redifArgumentSecondaryPhone contained +syntax match redifFieldSecondaryPostal /^Secondary-Postal:/ skipwhite skipempty nextgroup=redifArgumentSecondaryPostal contained +syntax match redifFieldSeries /^Series:/ skipwhite skipempty nextgroup=redifArgumentSeries contained +syntax match redifFieldShortId /^Short-Id:/ skipwhite skipempty nextgroup=redifArgumentShortId contained +syntax match redifFieldSize /^Size:/ skipwhite skipempty nextgroup=redifArgumentSize contained +syntax match redifFieldSoftwareHandle /^Software-Handle:/ skipwhite skipempty nextgroup=redifArgumentSoftwareHandle contained +syntax match redifFieldTemplateType /^Template-Type:/ skipwhite skipempty nextgroup=redifArgumentTemplateType contained +syntax match redifFieldTertiaryDefunct /^Tertiary-Defunct:/ skipwhite skipempty nextgroup=redifArgumentTertiaryDefunct contained +syntax match redifFieldTertiaryEmail /^Tertiary-Email:/ skipwhite skipempty nextgroup=redifArgumentTertiaryEmail contained +syntax match redifFieldTertiaryFax /^Tertiary-Fax:/ skipwhite skipempty nextgroup=redifArgumentTertiaryFax contained +syntax match redifFieldTertiaryHomepage /^Tertiary-Homepage:/ skipwhite skipempty nextgroup=redifArgumentTertiaryHomepage contained +syntax match redifFieldTertiaryInstitution /^Tertiary-Institution:/ skipwhite skipempty nextgroup=redifArgumentTertiaryInstitution contained +syntax match redifFieldTertiaryLocation /^Tertiary-Location:/ skipwhite skipempty nextgroup=redifArgumentTertiaryLocation contained +syntax match redifFieldTertiaryName /^Tertiary-Name:/ skipwhite skipempty nextgroup=redifArgumentTertiaryName contained +syntax match redifFieldTertiaryNameEnglish /^Tertiary-Name-English:/ skipwhite skipempty nextgroup=redifArgumentTertiaryNameEnglish contained +syntax match redifFieldTertiaryPhone /^Tertiary-Phone:/ skipwhite skipempty nextgroup=redifArgumentTertiaryPhone contained +syntax match redifFieldTertiaryPostal /^Tertiary-Postal:/ skipwhite skipempty nextgroup=redifArgumentTertiaryPostal contained +syntax match redifFieldTitle /^Title:/ skipwhite skipempty nextgroup=redifArgumentTitle contained +syntax match redifFieldType /^Type:/ skipwhite skipempty nextgroup=redifArgumentType contained +syntax match redifFieldURL /^URL:/ skipwhite skipempty nextgroup=redifArgumentURL contained +syntax match redifFieldVersion /^Version:/ skipwhite skipempty nextgroup=redifArgumentVersion contained +syntax match redifFieldVolume /^Volume:/ skipwhite skipempty nextgroup=redifArgumentVolume contained +syntax match redifFieldWorkplaceEmail /^Workplace-Email:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceEmail contained +syntax match redifFieldWorkplaceFax /^Workplace-Fax:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceFax contained +syntax match redifFieldWorkplaceHomepage /^Workplace-Homepage:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceHomepage contained +syntax match redifFieldWorkplaceInstitution /^Workplace-Institution:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceInstitution contained +syntax match redifFieldWorkplaceLocation /^Workplace-Location:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceLocation contained +syntax match redifFieldWorkplaceName /^Workplace-Name:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceName contained +syntax match redifFieldWorkplaceNameEnglish /^Workplace-Name-English:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceNameEnglish contained +syntax match redifFieldWorkplaceOrganization /^Workplace-Organization:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceOrganization contained +syntax match redifFieldWorkplacePhone /^Workplace-Phone:/ skipwhite skipempty nextgroup=redifArgumentWorkplacePhone contained +syntax match redifFieldWorkplacePostal /^Workplace-Postal:/ skipwhite skipempty nextgroup=redifArgumentWorkplacePostal contained +syntax match redifFieldYear /^Year:/ skipwhite skipempty nextgroup=redifArgumentYear contained + +highlight def link redifFieldAbstract redifField +highlight def link redifFieldArticleHandle redifField +highlight def link redifFieldAuthorArticle redifField +highlight def link redifFieldAuthorBook redifField +highlight def link redifFieldAuthorChapter redifField +highlight def link redifFieldAuthorEmail redifField +highlight def link redifFieldAuthorFax redifField +highlight def link redifFieldAuthorHomepage redifField +highlight def link redifFieldAuthorName redifField +highlight def link redifFieldAuthorNameFirst redifField +highlight def link redifFieldAuthorNameLast redifField +highlight def link redifFieldAuthorPaper redifField +highlight def link redifFieldAuthorPerson redifField +highlight def link redifFieldAuthorPhone redifField +highlight def link redifFieldAuthorPostal redifField +highlight def link redifFieldAuthorSoftware redifField +highlight def link redifFieldAuthorWorkplaceEmail redifField +highlight def link redifFieldAuthorWorkplaceFax redifField +highlight def link redifFieldAuthorWorkplaceHomepage redifField +highlight def link redifFieldAuthorWorkplaceInstitution redifField +highlight def link redifFieldAuthorWorkplaceLocation redifField +highlight def link redifFieldAuthorWorkplaceName redifField +highlight def link redifFieldAuthorWorkplaceNameEnglish redifField +highlight def link redifFieldAuthorWorkplacePhone redifField +highlight def link redifFieldAuthorWorkplacePostal redifField +highlight def link redifFieldAvailability redifField +highlight def link redifFieldBookHandle redifField +highlight def link redifFieldBookTitle redifField +highlight def link redifFieldChapterHandle redifField +highlight def link redifFieldChapter redifField +highlight def link redifFieldClassificationJEL redifField +highlight def link redifFieldContactEmail redifField +highlight def link redifFieldCreationDate redifField +highlight def link redifFieldDescription redifField +highlight def link redifFieldEdition redifField +highlight def link redifFieldEditorBook redifField +highlight def link redifFieldEditorEmail redifField +highlight def link redifFieldEditorFax redifField +highlight def link redifFieldEditorHomepage redifField +highlight def link redifFieldEditorName redifField +highlight def link redifFieldEditorNameFirst redifField +highlight def link redifFieldEditorNameLast redifField +highlight def link redifFieldEditorPerson redifField +highlight def link redifFieldEditorPhone redifField +highlight def link redifFieldEditorPostal redifField +highlight def link redifFieldEditorSeries redifField +highlight def link redifFieldEditorWorkplaceEmail redifField +highlight def link redifFieldEditorWorkplaceFax redifField +highlight def link redifFieldEditorWorkplaceHomepage redifField +highlight def link redifFieldEditorWorkplaceInstitution redifField +highlight def link redifFieldEditorWorkplaceLocation redifField +highlight def link redifFieldEditorWorkplaceName redifField +highlight def link redifFieldEditorWorkplaceNameEnglish redifField +highlight def link redifFieldEditorWorkplacePhone redifField +highlight def link redifFieldEditorWorkplacePostal redifField +highlight def link redifFieldEmail redifField +highlight def link redifFieldFax redifField +highlight def link redifFieldFileFormat redifField +highlight def link redifFieldFileFunction redifField +highlight def link redifFieldFileRestriction redifField +highlight def link redifFieldFileSize redifField +highlight def link redifFieldFileURL redifField +highlight def link redifFieldFollowup redifField +highlight def link redifFieldHandleOfArchive redifField +highlight def link redifFieldHandleOfInstitution redifField +highlight def link redifFieldHandleOfPerson redifField +highlight def link redifFieldHandleOfSeries redifField +highlight def link redifFieldHandleOfWork redifField +highlight def link redifFieldHasChapter redifField +highlight def link redifFieldHomepage redifField +highlight def link redifFieldInBook redifField +highlight def link redifFieldISBN redifField +highlight def link redifFieldISSN redifField +highlight def link redifFieldIssue redifField +highlight def link redifFieldJournal redifField +highlight def link redifFieldKeywords redifField +highlight def link redifFieldKeywords redifField +highlight def link redifFieldLanguage redifField +highlight def link redifFieldLastLoginDate redifField +highlight def link redifFieldLength redifField +highlight def link redifFieldMaintainerEmail redifField +highlight def link redifFieldMaintainerFax redifField +highlight def link redifFieldMaintainerName redifField +highlight def link redifFieldMaintainerPhone redifField +highlight def link redifFieldMonth redifField +highlight def link redifFieldNameASCII redifField +highlight def link redifFieldNameFirst redifField +highlight def link redifFieldNameFull redifField +highlight def link redifFieldNameLast redifField +highlight def link redifFieldNameMiddle redifField +highlight def link redifFieldNamePrefix redifField +highlight def link redifFieldNameSuffix redifField +highlight def link redifFieldName redifField +highlight def link redifFieldNote redifField +highlight def link redifFieldNotification redifField +highlight def link redifFieldNumber redifField +highlight def link redifFieldOrderEmail redifField +highlight def link redifFieldOrderHomepage redifField +highlight def link redifFieldOrderPostal redifField +highlight def link redifFieldOrderURL redifField +highlight def link redifFieldPages redifField +highlight def link redifFieldPaperHandle redifField +highlight def link redifFieldPhone redifField +highlight def link redifFieldPostal redifField +highlight def link redifFieldPredecessor redifField +highlight def link redifFieldPrice redifField +highlight def link redifFieldPrimaryDefunct redifField +highlight def link redifFieldPrimaryEmail redifField +highlight def link redifFieldPrimaryFax redifField +highlight def link redifFieldPrimaryHomepage redifField +highlight def link redifFieldPrimaryInstitution redifField +highlight def link redifFieldPrimaryLocation redifField +highlight def link redifFieldPrimaryName redifField +highlight def link redifFieldPrimaryNameEnglish redifField +highlight def link redifFieldPrimaryPhone redifField +highlight def link redifFieldPrimaryPostal redifField +highlight def link redifFieldProgrammingLanguage redifField +highlight def link redifFieldProviderEmail redifField +highlight def link redifFieldProviderFax redifField +highlight def link redifFieldProviderHomepage redifField +highlight def link redifFieldProviderInstitution redifField +highlight def link redifFieldProviderLocation redifField +highlight def link redifFieldProviderName redifField +highlight def link redifFieldProviderNameEnglish redifField +highlight def link redifFieldProviderPhone redifField +highlight def link redifFieldProviderPostal redifField +highlight def link redifFieldPublicationDate redifField +highlight def link redifFieldPublicationStatus redifField +highlight def link redifFieldPublicationType redifField +highlight def link redifFieldQuaternaryEmail redifField +highlight def link redifFieldQuaternaryFax redifField +highlight def link redifFieldQuaternaryHomepage redifField +highlight def link redifFieldQuaternaryInstitution redifField +highlight def link redifFieldQuaternaryLocation redifField +highlight def link redifFieldQuaternaryName redifField +highlight def link redifFieldQuaternaryNameEnglish redifField +highlight def link redifFieldQuaternaryPhone redifField +highlight def link redifFieldQuaternaryPostal redifField +highlight def link redifFieldRegisteredDate redifField +highlight def link redifFieldRequires redifField +highlight def link redifFieldRestriction redifField +highlight def link redifFieldRevisionDate redifField +highlight def link redifFieldSecondaryDefunct redifField +highlight def link redifFieldSecondaryEmail redifField +highlight def link redifFieldSecondaryFax redifField +highlight def link redifFieldSecondaryHomepage redifField +highlight def link redifFieldSecondaryInstitution redifField +highlight def link redifFieldSecondaryLocation redifField +highlight def link redifFieldSecondaryName redifField +highlight def link redifFieldSecondaryNameEnglish redifField +highlight def link redifFieldSecondaryPhone redifField +highlight def link redifFieldSecondaryPostal redifField +highlight def link redifFieldSeries redifField +highlight def link redifFieldShortId redifField +highlight def link redifFieldSize redifField +highlight def link redifFieldSoftwareHandle redifField +highlight def link redifFieldTemplateType redifField +highlight def link redifFieldTertiaryDefunct redifField +highlight def link redifFieldTertiaryEmail redifField +highlight def link redifFieldTertiaryFax redifField +highlight def link redifFieldTertiaryHomepage redifField +highlight def link redifFieldTertiaryInstitution redifField +highlight def link redifFieldTertiaryLocation redifField +highlight def link redifFieldTertiaryName redifField +highlight def link redifFieldTertiaryNameEnglish redifField +highlight def link redifFieldTertiaryPhone redifField +highlight def link redifFieldTertiaryPostal redifField +highlight def link redifFieldTitle redifField +highlight def link redifFieldTitle redifField +highlight def link redifFieldType redifField +highlight def link redifFieldURL redifField +highlight def link redifFieldVersion redifField +highlight def link redifFieldVolume redifField +highlight def link redifFieldWorkplaceEmail redifField +highlight def link redifFieldWorkplaceFax redifField +highlight def link redifFieldWorkplaceHomepage redifField +highlight def link redifFieldWorkplaceInstitution redifField +highlight def link redifFieldWorkplaceLocation redifField +highlight def link redifFieldWorkplaceName redifField +highlight def link redifFieldWorkplaceNameEnglish redifField +highlight def link redifFieldWorkplaceOrganization redifField +highlight def link redifFieldWorkplacePhone redifField +highlight def link redifFieldWorkplacePostal redifField +highlight def link redifFieldYear redifField + +" Deprecated +" same as Provider-* +" nextgroup=redifArgumentProvider* +syntax match redifFieldPublisherEmail /^Publisher-Email:/ skipwhite skipempty nextgroup=redifArgumentProviderEmail contained +syntax match redifFieldPublisherFax /^Publisher-Fax:/ skipwhite skipempty nextgroup=redifArgumentProviderFax contained +syntax match redifFieldPublisherHomepage /^Publisher-Homepage:/ skipwhite skipempty nextgroup=redifArgumentProviderHomepage contained +syntax match redifFieldPublisherInstitution /^Publisher-Institution:/ skipwhite skipempty nextgroup=redifArgumentProviderInstitution contained +syntax match redifFieldPublisherLocation /^Publisher-Location:/ skipwhite skipempty nextgroup=redifArgumentProviderLocation contained +syntax match redifFieldPublisherName /^Publisher-Name:/ skipwhite skipempty nextgroup=redifArgumentProviderName contained +syntax match redifFieldPublisherNameEnglish /^Publisher-Name-English:/ skipwhite skipempty nextgroup=redifArgumentProviderNameEnglish contained +syntax match redifFieldPublisherPhone /^Publisher-Phone:/ skipwhite skipempty nextgroup=redifArgumentProviderPhone contained +syntax match redifFieldPublisherPostal /^Publisher-Postal:/ skipwhite skipempty nextgroup=redifArgumentProviderPostal contained + +highlight def link redifFieldPublisherEmail redifFieldDeprecated +highlight def link redifFieldPublisherFax redifFieldDeprecated +highlight def link redifFieldPublisherHomepage redifFieldDeprecated +highlight def link redifFieldPublisherInstitution redifFieldDeprecated +highlight def link redifFieldPublisherLocation redifFieldDeprecated +highlight def link redifFieldPublisherName redifFieldDeprecated +highlight def link redifFieldPublisherNameEnglish redifFieldDeprecated +highlight def link redifFieldPublisherPhone redifFieldDeprecated +highlight def link redifFieldPublisherPostal redifFieldDeprecated + +" Standard arguments +" By default, they contain all the argument until another field is started: +" start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 +" For arguments that must not span more than one line, use a match: +" /\%(^\S\{-}:\)\@!\S.*/ +" AND ADD "display" +" This is faster. +" +" Those arguments are not highlighted so far. They are here for future +" extensions. +" TODO Find more RegEx for these arguments +" TODO Fax, Phone +" TODO URL, Homepage +" TODO Keywords +" TODO Classification-JEL +" TODO Short-Id, Author-Person, Editor-Person +" +" Arguments that may span several lines: +syntax region redifArgumentAuthorWorkplaceLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentAuthorWorkplacePostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentEditorPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentEditorWorkplacePostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentFileFunction start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentIssue start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentJournal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentOrderPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentPrice start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentPrimaryLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentPrimaryPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentProviderLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentProviderPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentQuaternaryLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentQuaternaryPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentRequires start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentSecondaryLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentSecondaryPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentSize start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentTertiaryLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentTertiaryPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentVersion start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentWorkplaceLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentWorkplacePhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentWorkplacePostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained + +" Arguments that may not span several lines: +" If you are sure that these arguments cannot span several lines, change +" them to a match: +" /\%(^\S\{-}:\)\@!\S.*/ +" AND ADD "display" after "contained" +" You can use this command on each line that you want to change: +" :s+\Vregion \(\w\+\) start=/\\%(^\\S\\{-}:\\)\\@!\\S/ end=/^\\S\\{-}:/me=s-1 contained+match \1 /\\%(^\\S\\{-}:\\)\\@!\\S.*/ contained display +syntax region redifArgumentAuthorFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentAuthorHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentAuthorName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentAuthorNameFirst start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentAuthorNameLast start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentAuthorPerson start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentAuthorPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentAuthorPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentAuthorWorkplaceFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentAuthorWorkplaceHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentAuthorWorkplaceName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentAuthorWorkplaceNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentAuthorWorkplacePhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentEditorFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentEditorHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentEditorName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentEditorNameFirst start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentEditorNameLast start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentEditorPerson start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentEditorPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentEditorWorkplaceFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentEditorWorkplaceHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentEditorWorkplaceLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentEditorWorkplaceName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentEditorWorkplaceNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentEditorWorkplacePhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentFileURL start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentMaintainerFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentMaintainerName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentMaintainerPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentNameFirst start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentNameFull start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentNameLast start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentNameMiddle start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentNamePrefix start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentNameSuffix start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentNumber start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentOrderHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentOrderURL start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentPrimaryFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentPrimaryHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentPrimaryName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentPrimaryNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentPrimaryPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentProviderFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentProviderHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentProviderName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentProviderNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentProviderPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentQuaternaryFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentQuaternaryHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentQuaternaryName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentQuaternaryNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentQuaternaryPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentSecondaryFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentSecondaryHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentSecondaryName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentSecondaryNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentSecondaryPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentSeries start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentShortId start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentTertiaryFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentTertiaryHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentTertiaryName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentTertiaryNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentTertiaryPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentURL start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentWorkplaceFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentWorkplaceHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentWorkplaceName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentWorkplaceNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained +syntax region redifArgumentWorkplaceOrganization start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained + +" Special arguments +" Those arguments require special values +" TODO Improve some RegEx +" TODO Improve Emails +" TODO Improve ISBN +" TODO Improve ISSN +" TODO Improve spell check (add words from economics. +" expl=macroeconometrics, Schumpeterian, IS-LM, etc.) +" +" Template-Type +syntax match redifArgumentTemplateType /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectTemplateType contained display +syntax match redifCorrectTemplateType /ReDIF-\%(Paper\|Article\|Chapter\|Book\|Software\|Archive\|Series\|Institution\|Person\)/ nextgroup=redifTemplateVersionNumberContainer contained display +syntax match redifTemplateVersionNumberContainer /.\+/ contains=redifTemplateVersionNumber contained display +syntax match redifTemplateVersionNumber / \d\+\.\d\+/ nextgroup=redifWrongLineEnding contained display + +highlight def link redifArgumentTemplateType redifError +highlight def link redifCorrectTemplateType Constant +highlight def link redifTemplateVersionNumber Number +highlight def link redifTemplateVersionNumberContainer redifError + +" Handles: +" +" Handles of Works: +syntax match redifArgumentHandleOfWork /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display +syntax match redifArgumentAuthorArticle /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display +syntax match redifArgumentAuthorBook /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display +syntax match redifArgumentAuthorChapter /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display +syntax match redifArgumentAuthorPaper /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display +syntax match redifArgumentAuthorSoftware /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display +syntax match redifArgumentEditorBook /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display +syntax match redifArgumentEditorSeries /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display +syntax match redifArgumentInBook /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display +syntax match redifArgumentHasChapter /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display +syntax match redifArgumentArticleHandle /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display +syntax match redifArgumentBookHandle /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display +syntax match redifArgumentChapterHandle /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display +syntax match redifArgumentPaperHandle /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display +syntax match redifArgumentSoftwareHandle /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display +syntax match redifCorrectHandleOfWork /RePEc:\a\a\a:\%(_\@!\w\)\{6}:\S\+/ contains=redifForbiddenCharactersInHandle,redifBestPracticeInHandle nextgroup=redifWrongLineEnding contained display +" TODO Are those characters really forbidden??? +syntax match redifForbiddenCharactersInHandle /[\/*?"<>|]/ contained display +syntax match redifBestPracticeInHandle /\<\%([vi]:[1-9]\d*\|y:[1-9]\d\{3}\|p:[1-9]\d*-[1-9]\d*\|i:\%(jan\|feb\|mar\|apr\|may\|jun\|jul\|aug\|sep\|oct\|nov\|dec\|spr\|sum\|aut\|win\|spe\|Q[1-4]\|\d\d-\d\d\)\|Q:[1-4]\)\>/ contained display + +highlight def link redifArgumentHandleOfWork redifError +highlight def link redifArgumentAuthorArticle redifError +highlight def link redifArgumentAuthorBook redifError +highlight def link redifArgumentAuthorChapter redifError +highlight def link redifArgumentAuthorPaper redifError +highlight def link redifArgumentAuthorSoftware redifError +highlight def link redifArgumentEditorBook redifError +highlight def link redifArgumentEditorSeries redifError +highlight def link redifArgumentInBook redifError +highlight def link redifArgumentHasChapter redifError +highlight def link redifArgumentArticleHandle redifError +highlight def link redifArgumentBookHandle redifError +highlight def link redifArgumentChapterHandle redifError +highlight def link redifArgumentPaperHandle redifError +highlight def link redifArgumentSoftwareHandle redifError +highlight def link redifForbiddenCharactersInHandle redifError +highlight def link redifBestPracticeInHandle redifSpecial + +" Handles of Series: +syntax match redifArgumentHandleOfSeries /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfSeries contained display +syntax match redifArgumentFollowup /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfSeries contained display +syntax match redifArgumentPredecessor /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfSeries contained display +syntax match redifCorrectHandleOfSeries /RePEc:\a\a\a:\%(_\@!\w\)\{6}/ nextgroup=redifWrongLineEnding contained display + +highlight def link redifArgumentHandleOfSeries redifError +highlight def link redifArgumentFollowup redifError +highlight def link redifArgumentPredecessor redifError + +" Handles of Archives: +syntax match redifArgumentHandleOfArchive /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfArchive contained display +syntax match redifCorrectHandleOfArchive /RePEc:\a\a\a/ nextgroup=redifWrongLineEnding contained display + +highlight def link redifArgumentHandleOfArchive redifError + +" Handles of Person: +syntax match redifArgumentHandleOfPerson /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfPerson contained display +syntax match redifCorrectHandleOfPerson /\%(\%(:\@!\S\)\{-}:\)\{2}[1-9]\d\{3}\%(-02\%(-[12]\d\|-0[1-9]\)\|-\%(0[469]\|11\)\%(-30\|-[12]\d\|-0[1-9]\)\|-\%(0[13578]\|1[02]\)\%(-3[01]\|-[12]\d\|-0[1-9]\)\):\S\+/ nextgroup=redifWrongLineEnding contained display + +highlight def link redifArgumentHandleOfPerson redifError + +" Handles of Institution: +syntax match redifArgumentAuthorWorkplaceInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display +syntax match redifArgumentEditorWorkplaceInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display +syntax match redifArgumentPrimaryInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display +syntax match redifArgumentProviderInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display +syntax match redifArgumentPublisherInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display +syntax match redifArgumentQuaternaryInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display +syntax match redifArgumentSecondaryInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display +syntax match redifArgumentTertiaryInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display +syntax match redifArgumentWorkplaceInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display +syntax match redifArgumentHandleOfInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display +syntax match redifArgumentPrimaryDefunct /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display +syntax match redifArgumentSecondaryDefunct /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display +syntax match redifArgumentTertiaryDefunct /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display +" TODO Are digits authorized? Apparently not. +" Country codes: +" http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm +syntax match redifCorrectHandleOfInstitution /RePEc:\a\a\a:\a\{5}\(ea\|af\|ax\|al\|dz\|as\|ad\|ao\|ai\|aq\|ag\|ar\|am\|aw\|au\|at\|az\|bs\|bh\|bd\|bb\|by\|be\|bz\|bj\|bm\|bt\|bo\|bq\|ba\|bw\|bv\|br\|io\|bn\|bg\|bf\|bi\|kh\|cm\|ca\|cv\|ky\|cf\|td\|cl\|cn\|cx\|cc\|co\|km\|cg\|cd\|ck\|cr\|ci\|hr\|cu\|cw\|cy\|cz\|dk\|dj\|dm\|do\|ec\|eg\|sv\|gq\|er\|ee\|et\|fk\|fo\|fj\|fi\|fr\|gf\|pf\|tf\|ga\|gm\|ge\|de\|gh\|gi\|gr\|gl\|gd\|gp\|gu\|gt\|gg\|gn\|gw\|gy\|ht\|hm\|va\|hn\|hk\|hu\|is\|in\|id\|ir\|iq\|ie\|im\|il\|it\|jm\|jp\|je\|jo\|kz\|ke\|ki\|kp\|kr\|kw\|kg\|la\|lv\|lb\|ls\|lr\|ly\|li\|lt\|lu\|mo\|mk\|mg\|mw\|my\|mv\|ml\|mt\|mh\|mq\|mr\|mu\|yt\|mx\|fm\|md\|mc\|mn\|me\|ms\|ma\|mz\|mm\|na\|nr\|np\|nl\|nc\|nz\|ni\|ne\|ng\|nu\|nf\|mp\|no\|om\|pk\|pw\|ps\|pa\|pg\|py\|pe\|ph\|pn\|pl\|pt\|pr\|qa\|re\|ro\|ru\|rw\|bl\|sh\|kn\|lc\|mf\|pm\|vc\|ws\|sm\|st\|sa\|sn\|rs\|sc\|sl\|sg\|sx\|sk\|si\|sb\|so\|za\|gs\|ss\|es\|lk\|sd\|sr\|sj\|sz\|se\|ch\|sy\|tw\|tj\|tz\|th\|tl\|tg\|tk\|to\|tt\|tn\|tr\|tm\|tc\|tv\|ug\|ua\|ae\|gb\|us\|um\|uy\|uz\|vu\|ve\|vn\|vg\|vi\|wf\|eh\|ye\|zm\|zw\)/ nextgroup=redifWrongLineEnding contained display + +highlight def link redifArgumentHandleOfInstitution redifError +highlight def link redifArgumentPrimaryDefunct redifError +highlight def link redifArgumentSecondaryDefunct redifError +highlight def link redifArgumentTertiaryDefunct redifError + +" Emails: +syntax match redifArgumentAuthorEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display +syntax match redifArgumentAuthorWorkplaceEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display +syntax match redifArgumentContactEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display +syntax match redifArgumentEditorEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display +syntax match redifArgumentEditorWorkplaceEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display +syntax match redifArgumentEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display +syntax match redifArgumentMaintainerEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display +syntax match redifArgumentOrderEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display +syntax match redifArgumentPrimaryEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display +syntax match redifArgumentProviderEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display +syntax match redifArgumentPublisherEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display +syntax match redifArgumentQuaternaryEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display +syntax match redifArgumentSecondaryEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display +syntax match redifArgumentTertiaryEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display +syntax match redifArgumentWorkplaceEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display +syntax match redifCorrectEmail /\%(@\@!\S\)\+@\%(@\@!\S\)\+/ nextgroup=redifWrongLineEnding contained display + +highlight def link redifArgumentAuthorEmail redifError +highlight def link redifArgumentAuthorWorkplaceEmail redifError +highlight def link redifArgumentContactEmail redifError +highlight def link redifArgumentEditorEmail redifError +highlight def link redifArgumentEditorWorkplaceEmail redifError +highlight def link redifArgumentEmail redifError +highlight def link redifArgumentMaintainerEmail redifError +highlight def link redifArgumentOrderEmail redifError +highlight def link redifArgumentPrimaryEmail redifError +highlight def link redifArgumentProviderEmail redifError +highlight def link redifArgumentPublisherEmail redifError +highlight def link redifArgumentQuaternaryEmail redifError +highlight def link redifArgumentSecondaryEmail redifError +highlight def link redifArgumentTertiaryEmail redifError +highlight def link redifArgumentWorkplaceEmail redifError + +" Language +" Source: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes +syntax match redifArgumentLanguage /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectLanguage contained display +syntax match redifCorrectLanguage /\<\(aa\|ab\|af\|ak\|als\|am\|an\|ang\|ar\|arc\|as\|ast\|av\|ay\|az\|ba\|bar\|bat-smg\|bcl\|be\|be-x-old\|bg\|bh\|bi\|bm\|bn\|bo\|bpy\|br\|bs\|bug\|bxr\|ca\|ce\|ceb\|ch\|cho\|chr\|chy\|co\|cr\|cs\|csb\|cu\|cv\|cy\|da\|de\|diq\|dsb\|dv\|dz\|ee\|el\|en\|eo\|es\|et\|eu\|ext\|fa\|ff\|fi\|fiu-vro\|fj\|fo\|fr\|frp\|fur\|fy\|ga\|gd\|gil\|gl\|gn\|got\|gu\|gv\|ha\|haw\|he\|hi\|ho\|hr\|ht\|hu\|hy\|hz\|ia\|id\|ie\|ig\|ii\|ik\|ilo\|io\|is\|it\|iu\|ja\|jbo\|jv\|ka\|kg\|ki\|kj\|kk\|kl\|km\|kn\|khw\|ko\|kr\|ks\|ksh\|ku\|kv\|kw\|ky\|la\|lad\|lan\|lb\|lg\|li\|lij\|lmo\|ln\|lo\|lt\|lv\|map-bms\|mg\|mh\|mi\|mk\|ml\|mn\|mo\|mr\|ms\|mt\|mus\|my\|na\|nah\|nap\|nd\|nds\|nds-nl\|ne\|new\|ng\|nl\|nn\|no\|nr\|nso\|nrm\|nv\|ny\|oc\|oj\|om\|or\|os\|pa\|pag\|pam\|pap\|pdc\|pi\|pih\|pl\|pms\|ps\|pt\|qu\|rm\|rmy\|rn\|ro\|roa-rup\|ru\|rw\|sa\|sc\|scn\|sco\|sd\|se\|sg\|sh\|si\|simple\|sk\|sl\|sm\|sn\|so\|sq\|sr\|ss\|st\|su\|sv\|sw\|ta\|te\|tet\|tg\|th\|ti\|tk\|tl\|tlh\|tn\|to\|tpi\|tr\|ts\|tt\|tum\|tw\|ty\|udm\|ug\|uk\|ur\|uz\|ve\|vi\|vec\|vls\|vo\|wa\|war\|wo\|xal\|xh\|yi\|yo\|za\|zh\|zh-min-nan\|zh-yue\|zu\)\>/ nextgroup=redifWrongLineEnding contained display + +highlight def link redifArgumentLanguage redifError +highlight def link redifCorrectLanguage redifSpecial + +" Length +" Based on the example in the documentation. But apparently any field is +" possible +syntax region redifArgumentLength start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=redifGoodLength contained +syntax match redifGoodLength /1 page\|[1-9]\d*\%( pages\)\=/ contained display + +highlight def link redifGoodLength redifSpecial + +" Publication-Type +syntax match redifArgumentPublicationType /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectPublicationType contained display +syntax match redifCorrectPublicationType /\<\(journal article\|book\|book chapter\|working paper\|conference paper\|report\|other\)\>/ nextgroup=redifWrongLineEnding contained display + +highlight def link redifArgumentPublicationType redifError +highlight def link redifCorrectPublicationType redifSpecial + +" Publication-Status +syntax region redifArgumentPublicationStatus start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=redifSpecialPublicationStatus contained +syntax match redifSpecialPublicationStatus /published\|forthcoming/ nextgroup=redifCorrectPublicationStatus contained display +syntax region redifCorrectPublicationStatus start=/./ end=/^\S\{-}:/me=s-1 contained + +highlight def link redifArgumentPublicationStatus redifError +highlight def link redifSpecialPublicationStatus redifSpecial + +" Month +" TODO Are numbers also allowed? +syntax match redifArgumentMonth /\%(^\S\{-}:\)\@!\S.*/ contains=redifGoodMonth contained display +syntax match redifGoodMonth /\<\(Jan\%(uary\)\=\|Feb\%(ruary\)\=\|Mar\%(ch\)\=\|Apr\%(il\)\=\|May\|June\=\|July\=\|Aug\%(ust\)\=\|Sep\%(tember\)\=\|Oct\%(ober\)\=\|Nov\%(ember\)\=\|Dec\%(ember\)\=\)\>/ contained display + +highlight def link redifGoodMonth redifSpecial + +" Integers: Volume, Chapter +syntax match redifArgumentVolume /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectInteger contained display +syntax match redifArgumentChapter /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectInteger contained display +syntax match redifCorrectInteger /[1-9]\d*/ nextgroup=redifWrongLineEnding contained display + +highlight def link redifArgumentVolume redifError +highlight def link redifArgumentChapter redifError + +" Year +syntax match redifArgumentYear /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectYear contained display +syntax match redifCorrectYear /[1-9]\d\{3}/ nextgroup=redifWrongLineEnding contained display + +highlight def link redifArgumentYear redifError + +" Edition +" Based on the example in the documentation. +syntax match redifArgumentEdition /\%(^\S\{-}:\)\@!\S.*/ contains=redifGoodEdition contained display +syntax match redifGoodEdition /1st\|2nd\|3rd\|[4-9]th\|[1-9]\d*\%(1st\|2nd\|3rd\|[4-9]th\)\|[1-9]\d*/ contained display + +highlight def link redifGoodEdition redifSpecial + +" ISBN +syntax match redifArgumentISBN /\%(^\S\{-}:\)\@!\S.*/ contains=redifGoodISBN contained display +syntax match redifGoodISBN /\d[0-9-]\{8,15}\d/ contained display + +highlight def link redifGoodISBN redifSpecial + +" ISSN +syntax match redifArgumentISSN /\%(^\S\{-}:\)\@!\S.*/ contains=redifGoodISSN contained display +syntax match redifGoodISSN /\d\{4}-\d\{3}[0-9X]/ contained display + +highlight def link redifGoodISSN redifSpecial + +" File-Size +" Based on the example in the documentation. +syntax region redifArgumentFileSize start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=redifGoodSize contained +syntax match redifGoodSize /kb\|bytes/ contained display + +highlight def link redifGoodSize redifSpecial + +" Type +syntax match redifArgumentType /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectType contained display +syntax match redifCorrectType /ReDIF-Paper\|ReDIF-Software\|ReDIF-Article\|ReDIF-Chapter\|ReDIF-Book/ nextgroup=redifWrongLineEnding contained display + +highlight def link redifArgumentType redifError +highlight def link redifCorrectType redifSpecial + +" Dates: Publication-Date, Creation-Date, Revision-Date, +" Last-Login-Date, Registration-Date +syntax match redifArgumentCreationDate /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectDate contained display +syntax match redifArgumentLastLoginDate /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectDate contained display +syntax match redifArgumentPublicationDate /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectDate contained display +syntax match redifArgumentRegisteredDate /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectDate contained display +syntax match redifArgumentRevisionDate /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectDate contained display +syntax match redifCorrectDate /[1-9]\d\{3}\%(-02\%(-[12]\d\|-0[1-9]\)\=\|-\%(0[469]\|11\)\%(-30\|-[12]\d\|-0[1-9]\)\=\|-\%(0[13578]\|1[02]\)\%(-3[01]\|-[12]\d\|-0[1-9]\)\=\)\=/ nextgroup=redifWrongLineEnding contained display + +highlight def link redifArgumentCreationDate redifError +highlight def link redifArgumentLastLoginDate redifError +highlight def link redifArgumentPublicationDate redifError +highlight def link redifArgumentRegisteredDate redifError +highlight def link redifArgumentRevisionDate redifError + +" Classification-JEL +syntax match redifArgumentClassificationJEL /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectJEL contained display +syntax match redifCorrectJEL /\<\%(\u\d\{,2}[,; \t]\s*\)*\u\d\{,2}/ contains=redifSpecialJEL nextgroup=redifWrongLineEnding contained display +syntax match redifSpecialJEL /\<\u\d\{,2}/ contained display + +highlight def link redifArgumentClassificationJEL redifError +highlight def link redifSpecialJEL redifSpecial + +" Pages +syntax match redifArgumentPages /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectPages contained display +syntax match redifCorrectPages /[1-9]\d*-[1-9]\d*/ nextgroup=redifWrongLineEnding contained display + +highlight def link redifArgumentPages redifError + +" Name-ASCII +syntax match redifArgumentNameASCII /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectNameASCII contained display +syntax match redifCorrectNameASCII /[ -~]/ contained display + +highlight def link redifArgumentNameASCII redifError + +" Programming-Language +syntax match redifArgumentProgrammingLanguage /\%(^\S\{-}:\)\@!\S.*/ contains=redifGoodProgrammingLanguage contained display +syntax match redifGoodProgrammingLanguage /\/ nextgroup=redifWrongLineEnding contained display + +highlight def link redifGoodProgrammingLanguage redifSpecial + +" File-Format +" TODO The link in the documentation that gives the list of possible formats is broken. +" ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/media-types +" These are based on the examples in the documentation. +syntax match redifArgumentFileFormat /\%(^\S\{-}:\)\@!\S.*/ contains=redifGoodFormat contained display +syntax match redifGoodFormat "\a\+/[[:alpha:]+-]\+" nextgroup=redifWrongLineEnding contains=redifSpecialFormat contained display +syntax match redifSpecialFormat "application/atom+xml\|application/ecmascript\|application/EDI-X12\|application/EDIFACT\|application/json\|application/javascript\|application/octet-stream\|application/ogg\|application/pdf\|application/postscript\|application/rdf+xml\|application/rss+xml\|application/soap+xml\|application/font-woff\|application/xhtml+xml\|application/xml\|application/xml-dtd\|application/xop+xml\|application/zip\|application/gzip\|audio/basic\|audio/L24\|audio/mp4\|audio/mpeg\|audio/ogg\|audio/vorbis\|audio/vnd.rn-realaudio\|audio/vnd.wave\|audio/webm\|image/gif\|image/jpeg\|image/pjpeg\|image/png\|image/svg+xml\|image/tiff\|image/vnd.microsoft.icon\|message/http\|message/imdn+xml\|message/partial\|message/rfc822\|model/example\|model/iges\|model/mesh\|model/vrml\|model/x3d+binary\|model/x3d+vrml\|model/x3d+xml\|multipart/mixed\|multipart/alternative\|multipart/related\|multipart/form-data\|multipart/signed\|multipart/encrypted\|text/cmd\|text/css\|text/csv\|text/html\|text/javascript\|text/plain\|text/vcard\|text/xml\|video/mpeg\|video/mp4\|video/ogg\|video/quicktime\|video/webm\|video/x-matroska\|video/x-ms-wmv\|video/x-flv" contained display + +highlight def link redifSpecialFormat redifSpecial +highlight def link redifArgumentFileFormat redifError + +" Keywords +" Spell checked +syntax match redifArgumentKeywords /\%(^\S\{-}:\)\@!\S.*/ contains=@Spell,redifKeywordsSemicolon contained +syntax match redifKeywordsSemicolon /;/ contained + +highlight def link redifKeywordsSemicolon redifSpecial + +" Other spell-checked arguments +" Very useful when copy-pasting abstracts that may contain hyphens or +" ligatures. +syntax region redifArgumentAbstract start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained +syntax region redifArgumentAvailability start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained +syntax region redifArgumentBookTitle start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained +syntax region redifArgumentDescription start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained +syntax region redifArgumentFileRestriction start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained +syntax region redifArgumentNote start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained +syntax region redifArgumentNotification start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained +syntax region redifArgumentRestriction start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained +syntax region redifArgumentTitle start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained + +" Wrong line ending +syntax match redifWrongLineEnding /.\+/ contained display + +highlight def link redifWrongLineEnding redifError + +" Final highlight +highlight def link redifComment Comment +highlight def link redifError Error +highlight def link redifField Identifier +highlight def link redifFieldDeprecated Identifier +highlight def link redifSpecial Special +" For deprecated fields: +highlight redifFieldDeprecated term=undercurl cterm=undercurl gui=undercurl guisp=DarkGrey + +" Sync: The template-type (ReDIF-Paper, ReDIF-Archive, etc.) influences which +" fields can follow. Thus sync must search backwards for it. +" +" I would like to simply ask VIM to search backward for the first occurence of +" /^Template-Type:/, but it does not seem to be possible, so I have to start +" from the beginning of the file... This might slow down a lot for files that +" contain a lot of Template-Type statements. +syntax sync fromstart + +" The problem with syntax sync match (tried below), it is that, for example, +" it cannot realize when it is inside a Author-Name cluster, which is inside a +" Template-Type template... +" +" TODO Is this linecont pattern really useful? It seems to work anyway... +"syntax sync linecont /^\(Template-Type:\)\=\s*$/ +" TODO This sync is surprising... It seems to work on several lines even +" though I replaced \_s* by \s*, even without the linecont pattern... +"syntax sync match redifSyncForTemplatePaper groupthere redifRegionTemplatePaper /^Template-Type:\s*ReDIF-Paper \d\+\.\d\+/ +"syntax sync match redifSyncForTemplateArticle groupthere redifRegionTemplateArticle /^Template-Type:\s*ReDIF-Article \d\+\.\d\+/ +"syntax sync match redifSyncForTemplateChapter groupthere redifRegionTemplateChapter /^Template-Type:\s*ReDIF-Chapter \d\+\.\d\+/ +"syntax sync match redifSyncForTemplateBook groupthere redifRegionTemplateBook /^Template-Type:\s*ReDIF-Book \d\+\.\d\+/ +"syntax sync match redifSyncForTemplateSoftware groupthere redifRegionTemplateSoftware /^Template-Type:\s*ReDIF-Software \d\+\.\d\+/ +"syntax sync match redifSyncForTemplateArchive groupthere redifRegionTemplateArchive /^Template-Type:\s*ReDIF-Archive \d\+\.\d\+/ +"syntax sync match redifSyncForTemplateSeries groupthere redifRegionTemplateSeries /^Template-Type:\s*ReDIF-Series \d\+\.\d\+/ +"syntax sync match redifSyncForTemplateInstitution groupthere redifRegionTemplateInstitution /^Template-Type:\s*ReDIF-Institution \d\+\.\d\+/ +"syntax sync match redifSyncForTemplatePerson groupthere redifRegionTemplatePerson /^Template-Type:\s*ReDIF-Person \d\+\.\d\+/ + +" I do not really know how sync linebreaks works, but it helps when making +" changes on the argument when this argument is not on the same line than its +" field. I just assume that people won't leave more than one line of +" whitespace between fields and arguments (which is already very unlikely) +" hence the value of 2. +syntax sync linebreaks=2 + +" Since folding is defined by the syntax, set foldmethod to syntax. +set foldmethod=syntax + +" Set "b:current_syntax" to the name of the syntax at the end: +let b:current_syntax="redif" diff --git a/runtime/syntax/registry.vim b/runtime/syntax/registry.vim new file mode 100644 index 0000000000..e9ff8fcaba --- /dev/null +++ b/runtime/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/runtime/syntax/remind.vim b/runtime/syntax/remind.vim new file mode 100644 index 0000000000..93a7178479 --- /dev/null +++ b/runtime/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/runtime/syntax/resolv.vim b/runtime/syntax/resolv.vim new file mode 100644 index 0000000000..06d6885c1c --- /dev/null +++ b/runtime/syntax/resolv.vim @@ -0,0 +1,88 @@ +" Vim syntax file +" Language: resolver configuration file +" Maintainer: Radu Dineiu +" URL: https://raw.github.com/rid9/vim-resolv/master/resolv.vim +" Last Change: 2013 May 21 +" Version: 1.0 +" +" Credits: +" David Necas (Yeti) +" Stefano Zacchiroli + +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 +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/runtime/syntax/reva.vim b/runtime/syntax/reva.vim new file mode 100644 index 0000000000..03dfc9d4c3 --- /dev/null +++ b/runtime/syntax/reva.vim @@ -0,0 +1,196 @@ +" Vim syntax file +" Language: Reva Forth +" Version: 2011.2 +" Last Change: 2012/02/13 +" 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 + +let s:cpo_save = &cpo +set cpo&vim + +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" +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8:sw=4:nocindent:smartindent: diff --git a/runtime/syntax/rexx.vim b/runtime/syntax/rexx.vim new file mode 100644 index 0000000000..ef698a5351 --- /dev/null +++ b/runtime/syntax/rexx.vim @@ -0,0 +1,331 @@ +" Vim syntax file +" Language: Rexx +" Maintainer: Thomas Geulig +" Last Change: 2012 Sep 14, added support for new ooRexx 4.0 features +" 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\)\>.*\(;\|$\)" contains=rexxComment + +" 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\|;\|$\)" contains=doLoopSelectLabelRegion,rexxStartValueAssignment,rexxLoopKeywords + +" color label's name +syn match rexxLabel2 "\<\(do\|loop\|select\)\>\s\+label\s\+\zs\k*\ze" containedin=doLoopSelectLabelRegion + +" make sure control variable is normal +" TODO: re-activate ? +"rgf 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 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 .context + +" Rexx numbers +" int like number +syn match rexxNumber '\d\+' contained +syn match rexxNumber '[-+]\s*\d\+' contained + +" Floating point number with decimal +syn match rexxNumber '\d\+\.\d*' contained +syn match rexxNumber '[-+]\s*\d\+\.\d*' contained + +" Floating point like number with E +syn match rexxNumber '[-+]\s*\d*[eE][\-+]\d\+' contained +syn match rexxNumber '\d*[eE][\-+]\d\+' contained + +" Floating point like number with E and decimal point (+,-) +syn match rexxNumber '[-+]\s*\d*\.\d*[eE][\-+]\d\+' contained +syn match rexxNumber '\d*\.\d*[eE][\-+]\d\+' contained + + +" 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 .File .InputOutputStream +syn keyword rexxBuiltinClass .InputStream .InvertingComparator .List .MapCollection +syn keyword rexxBuiltinClass .Message .Method .Monitor .MutableBuffer .Object +syn keyword rexxBuiltinClass .OrderedCollection .OutputStream .Package .Properties .Queue +syn keyword rexxBuiltinClass .RegularExpression .Relation .RexxContext .RexxQueue .Routine +syn keyword rexxBuiltinClass .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 .OLEObject .OLEVariant +syn keyword rexxBuiltinClass .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 + +" BSF4ooRexx classes +syn keyword rexxBuiltinClass .BSF .bsf.dialog .bsf_proxy +syn keyword rexxBuiltinClass .UNO .UNO_ENUM .UNO_CONSTANTS .UNO_PROPERTIES + +" 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\|;\|$\)" +" rgf, 2012-09-09 +syn region rexxOptionsDirective start="::\s*options\s*"ms=e+1 end="\ze\(\s\|;\|$\)" +syn region rexxConstantDirective start="::\s*constant\s*"ms=e+1 end="\ze\(\s\|;\|$\)" + +syn region rexxDirective start="\(^\|;\)\s*::\s*\w\+" end="\($\|;\)" contains=rexxString,rexxNumber,rexxComment,rexxLineComment,rexxClassDirective,rexxMethodDirective,rexxRoutineDirective,rexxRequiresDirective,rexxAttributeDirective,rexxOptionsDirective,rexxConstantDirective keepend + +syn match rexxOptionsDirective2 "\<\(digits\|form\|fuzz\|trace\)\>" containedin = rexxOptionsDirective3 +syn region rexxOptionsDirective3 start="\(^\|;\)\s*::\s*options\s"ms=e+1 end="\($\|;\)" contains=rexxString,rexxNumber,rexxVariable,rexxComment,rexxLineComment containedin = rexxDirective + + +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! +" TODO: test on 7.3 +" 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 "guibg=grey +hi par2 ctermfg=blue guifg=blue "guibg=grey +hi par3 ctermfg=darkgreen guifg=darkgreen "guibg=grey +hi par4 ctermfg=darkyellow guifg=darkyellow "guibg=grey +hi par5 ctermfg=darkgrey guifg=darkgrey "guibg=grey + +" 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 have long become to be powerful enough for that +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 "DiffChange +" 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 + +" rgf, 2012-09-09 + HiLink rexxOptionsDirective rexxFunction + HiLink rexxOptionsDirective2 rexxOptionsDirective + HiLink rexxOptionsDirective3 Normal " rexxOptionsDirective + + HiLink rexxConstantDirective 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/runtime/syntax/rhelp.vim b/runtime/syntax/rhelp.vim new file mode 100644 index 0000000000..32c91add48 --- /dev/null +++ b/runtime/syntax/rhelp.vim @@ -0,0 +1,249 @@ +" Vim syntax file +" Language: R Help File +" Maintainer: Jakson Aquino +" Former Maintainer: Johannes Ranke +" Last Change: Wed Jul 09, 2014 10:28PM +" Remarks: - 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 +" - No support for \if, \ifelse and \out as I don't understand +" them and have no examples at hand (help welcome). +" - No support for \var tag within quoted string (dito) + +" 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 + +setlocal iskeyword=@,48-57,_,. + +syn case match + +" R help identifiers {{{1 +syn region rhelpIdentifier matchgroup=rhelpSection start="\\name{" end="}" +syn region rhelpIdentifier matchgroup=rhelpSection start="\\alias{" end="}" +syn region rhelpIdentifier matchgroup=rhelpSection start="\\pkg{" end="}" contains=rhelpLink +syn region rhelpIdentifier matchgroup=rhelpSection start="\\method{" end="}" contained +syn region rhelpIdentifier matchgroup=rhelpSection start="\\Rdversion{" end="}" + +" Highlighting of R code using an existing r.vim syntax file if available {{{1 +syn include @R syntax/r.vim + +" Strings {{{1 +syn region rhelpString start=/"/ skip=/\\"/ end=/"/ contains=rhelpSpecialChar,rhelpCodeSpecial,rhelpLink contained + +" Special characters in R strings +syn match rhelpCodeSpecial display contained "\\\\\(n\|r\|t\|b\|a\|f\|v\|'\|\"\)\|\\\\" + +" Special characters ( \$ \& \% \# \{ \} \_) +syn match rhelpSpecialChar "\\[$&%#{}_]" + + +" R code {{{1 +syn match rhelpDots "\\dots" containedin=@R +syn region rhelpRcode matchgroup=Delimiter start="\\examples{" matchgroup=Delimiter transparent end="}" contains=@R,rhelpLink,rhelpIdentifier,rhelpString,rhelpSpecialChar,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 + +if v:version > 703 + syn region rhelpRcode matchgroup=Delimiter start="\\code{" skip='\\\@1" +syn match rhelpKeyword "\\ge" +syn match rhelpKeyword "\\le" +syn match rhelpKeyword "\\alpha" +syn match rhelpKeyword "\\beta" +syn match rhelpKeyword "\\gamma" +syn match rhelpKeyword "\\delta" +syn match rhelpKeyword "\\epsilon" +syn match rhelpKeyword "\\zeta" +syn match rhelpKeyword "\\eta" +syn match rhelpKeyword "\\theta" +syn match rhelpKeyword "\\iota" +syn match rhelpKeyword "\\kappa" +syn match rhelpKeyword "\\lambda" +syn match rhelpKeyword "\\mu" +syn match rhelpKeyword "\\nu" +syn match rhelpKeyword "\\xi" +syn match rhelpKeyword "\\omicron" +syn match rhelpKeyword "\\pi" +syn match rhelpKeyword "\\rho" +syn match rhelpKeyword "\\sigma" +syn match rhelpKeyword "\\tau" +syn match rhelpKeyword "\\upsilon" +syn match rhelpKeyword "\\phi" +syn match rhelpKeyword "\\chi" +syn match rhelpKeyword "\\psi" +syn match rhelpKeyword "\\omega" +syn match rhelpKeyword "\\Alpha" +syn match rhelpKeyword "\\Beta" +syn match rhelpKeyword "\\Gamma" +syn match rhelpKeyword "\\Delta" +syn match rhelpKeyword "\\Epsilon" +syn match rhelpKeyword "\\Zeta" +syn match rhelpKeyword "\\Eta" +syn match rhelpKeyword "\\Theta" +syn match rhelpKeyword "\\Iota" +syn match rhelpKeyword "\\Kappa" +syn match rhelpKeyword "\\Lambda" +syn match rhelpKeyword "\\Mu" +syn match rhelpKeyword "\\Nu" +syn match rhelpKeyword "\\Xi" +syn match rhelpKeyword "\\Omicron" +syn match rhelpKeyword "\\Pi" +syn match rhelpKeyword "\\Rho" +syn match rhelpKeyword "\\Sigma" +syn match rhelpKeyword "\\Tau" +syn match rhelpKeyword "\\Upsilon" +syn match rhelpKeyword "\\Phi" +syn match rhelpKeyword "\\Chi" +syn match rhelpKeyword "\\Psi" +syn match rhelpKeyword "\\Omega" + +" Links {{{1 +syn region rhelpLink matchgroup=rhelpSection start="\\link{" end="}" contained keepend extend +syn region rhelpLink matchgroup=rhelpSection start="\\link\[.\{-}\]{" end="}" contained keepend extend +syn region rhelpLink matchgroup=rhelpSection start="\\linkS4class{" end="}" contained keepend extend + +" Verbatim like {{{1 +if v:version > 703 + syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@1" +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 "\\eqn\>" +syn match rhelpType "\\deqn\>" +syn match rhelpType "\\file\>" +syn match rhelpType "\\email\>" +syn match rhelpType "\\url\>" +syn match rhelpType "\\href\>" +syn match rhelpType "\\var\>" +syn match rhelpType "\\env\>" +syn match rhelpType "\\option\>" +syn match rhelpType "\\command\>" +syn match rhelpType "\\newcommand\>" +syn match rhelpType "\\renewcommand\>" +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 "\\item\>" +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="}" +syn region rhelpFreesubsec matchgroup=Delimiter start="\\subsection{" matchgroup=Delimiter transparent end="}" + +syn match rhelpDelimiter "{\|\[\|(\|)\|\]\|}" + +" R help file comments {{{1 +syn match rhelpComment /%.*$/ + +" Error {{{1 +syn region rhelpRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim +syn region rhelpRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim +syn region rhelpRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim +syn match rhelpError /[)\]}]/ +syn match rhelpBraceError /[)}]/ contained +syn match rhelpCurlyError /[)\]]/ contained +syn match rhelpParenError /[\]}]/ contained + +syntax sync match rhelpSyncRcode grouphere rhelpRcode "\\examples{" + +" 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 rhelpVerbatim String + HiLink rhelpDelimiter Delimiter + HiLink rhelpIdentifier Identifier + HiLink rhelpString String + HiLink rhelpCodeSpecial Special + 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 rhelpPreProc PreProc + HiLink rhelpDelimiter Delimiter + HiLink rhelpComment Comment + HiLink rhelpRComment Comment + HiLink rhelpSpecialChar SpecialChar + delcommand HiLink +endif + +let b:current_syntax = "rhelp" + +" vim: foldmethod=marker sw=2 diff --git a/runtime/syntax/rib.vim b/runtime/syntax/rib.vim new file mode 100644 index 0000000000..6b9f2b0bd4 --- /dev/null +++ b/runtime/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/runtime/syntax/rmd.vim b/runtime/syntax/rmd.vim new file mode 100644 index 0000000000..6f1b847453 --- /dev/null +++ b/runtime/syntax/rmd.vim @@ -0,0 +1,87 @@ +" markdown Text with R statements +" Language: markdown with R code chunks +" Last Change: Wed Jul 09, 2014 10:29PM +" +" CONFIGURATION: +" To highlight chunk headers as R code, put in your vimrc: +" let rmd_syn_hl_chunk = 1 + +" for portability +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" load all of pandoc info +runtime syntax/pandoc.vim +if exists("b:current_syntax") + let rmdIsPandoc = 1 + unlet b:current_syntax +else + let rmdIsPandoc = 0 + runtime syntax/markdown.vim + if exists("b:current_syntax") + unlet b:current_syntax + endif +endif + +" load all of the r syntax highlighting rules into @R +syntax include @R syntax/r.vim +if exists("b:current_syntax") + unlet b:current_syntax +endif + +if exists("g:rmd_syn_hl_chunk") + " highlight R code inside chunk header + syntax match rmdChunkDelim "^[ \t]*```{r" contained + syntax match rmdChunkDelim "}$" contained +else + syntax match rmdChunkDelim "^[ \t]*```{r.*}$" contained +endif +syntax match rmdChunkDelim "^[ \t]*```$" contained +syntax region rmdChunk start="^[ \t]*``` *{r.*}$" end="^[ \t]*```$" contains=@R,rmdChunkDelim keepend fold + +" also match and syntax highlight in-line R code +syntax match rmdEndInline "`" contained +syntax match rmdBeginInline "`r " contained +syntax region rmdrInline start="`r " end="`" contains=@R,rmdBeginInline,rmdEndInline keepend + +" match slidify special marker +syntax match rmdSlidifySpecial "\*\*\*" + + +if rmdIsPandoc == 0 + syn match rmdBlockQuote /^\s*>.*\n\(.*\n\@" contains=@texMathZoneGroup + " Region + syntax match rmdLaTeXRegDelim "\$\$" contained + syntax match rmdLaTeXRegDelim "\$\$latex$" contained + syntax region rmdLaTeXRegion start="^\$\$" skip="\\\$" end="\$\$$" contains=@LaTeX,rmdLaTeXSt,rmdLaTeXRegDelim keepend + syntax region rmdLaTeXRegion2 start="^\\\[" end="\\\]" contains=@LaTeX,rmdLaTeXSt,rmdLaTeXRegDelim keepend + hi def link rmdLaTeXSt Statement + hi def link rmdLaTeXInlDelim Special + hi def link rmdLaTeXRegDelim Special +endif + +setlocal iskeyword=@,48-57,_,. + +syn sync match rmdSyncChunk grouphere rmdChunk "^[ \t]*``` *{r" + +hi def link rmdChunkDelim Special +hi def link rmdBeginInline Special +hi def link rmdEndInline Special +hi def link rmdBlockQuote Comment +hi def link rmdSlidifySpecial Special + +let b:current_syntax = "rmd" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/rnc.vim b/runtime/syntax/rnc.vim new file mode 100644 index 0000000000..8436c88755 --- /dev/null +++ b/runtime/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/runtime/syntax/rng.vim b/runtime/syntax/rng.vim new file mode 100644 index 0000000000..1ef864c78f --- /dev/null +++ b/runtime/syntax/rng.vim @@ -0,0 +1,25 @@ +" Vim syntax file +" Language: RELAX NG +" Maintainer: Jaromir Hradilek +" URL: https://github.com/jhradilek/vim-rng +" Last Change: 25 March 2013 +" Description: A syntax file for RELAX NG, a schema language for XML + +if exists('b:current_syntax') + finish +endif + +do Syntax xml +syn spell toplevel +syn cluster xmlTagHook add=rngTagName +syn case match + +syn keyword rngTagName anyName attribute choice data define div contained +syn keyword rngTagName element empty except externalRef grammar contained +syn keyword rngTagName group include interleave list mixed name contained +syn keyword rngTagName notAllowed nsName oneOrMore optional param contained +syn keyword rngTagName parentRef ref start text value zeroOrMore contained + +hi def link rngTagName Statement + +let b:current_syntax = 'rng' diff --git a/runtime/syntax/rnoweb.vim b/runtime/syntax/rnoweb.vim new file mode 100644 index 0000000000..7d42395b5c --- /dev/null +++ b/runtime/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/runtime/syntax/robots.vim b/runtime/syntax/robots.vim new file mode 100644 index 0000000000..066628bb3c --- /dev/null +++ b/runtime/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/runtime/syntax/rpcgen.vim b/runtime/syntax/rpcgen.vim new file mode 100644 index 0000000000..548f8c807f --- /dev/null +++ b/runtime/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/runtime/syntax/rpl.vim b/runtime/syntax/rpl.vim new file mode 100644 index 0000000000..6457803a06 --- /dev/null +++ b/runtime/syntax/rpl.vim @@ -0,0 +1,496 @@ +" Vim syntax file +" Language: RPL/2 +" Version: 0.15.15 against RPL/2 version 4.00pre7i +" Last Change: 2012 Feb 03 by Thilo Six +" 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 + +let s:cpo_save = &cpo +set cpo&vim + +" 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" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 tw=132 diff --git a/runtime/syntax/rrst.vim b/runtime/syntax/rrst.vim new file mode 100644 index 0000000000..4667b3a2c1 --- /dev/null +++ b/runtime/syntax/rrst.vim @@ -0,0 +1,47 @@ +" reStructured Text with R statements +" Language: reST with R code chunks +" Maintainer: Alex Zvoleff, azvoleff@mail.sdsu.edu +" Last Change: Wed Jul 09, 2014 10:29PM +" +" CONFIGURATION: +" To highlight chunk headers as R code, put in your vimrc: +" let rrst_syn_hl_chunk = 1 + +" for portability +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" load all of the rst info +runtime syntax/rst.vim +unlet b:current_syntax + +" load all of the r syntax highlighting rules into @R +syntax include @R syntax/r.vim + +setlocal iskeyword=@,48-57,_,. + +" highlight R chunks +if exists("g:rrst_syn_hl_chunk") + " highlight R code inside chunk header + syntax match rrstChunkDelim "^\.\. {r" contained + syntax match rrstChunkDelim "}$" contained +else + syntax match rrstChunkDelim "^\.\. {r .*}$" contained +endif +syntax match rrstChunkDelim "^\.\. \.\.$" contained +syntax region rrstChunk start="^\.\. {r.*}$" end="^\.\. \.\.$" contains=@R,rrstChunkDelim keepend transparent fold + +" also highlight in-line R code +syntax match rrstInlineDelim "`" contained +syntax match rrstInlineDelim ":r:" contained +syntax region rrstInline start=":r: *`" skip=/\\\\\|\\`/ end="`" contains=@R,rrstInlineDelim keepend + +hi def link rrstChunkDelim Special +hi def link rrstInlineDelim Special + +let b:current_syntax = "rrst" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/rst.vim b/runtime/syntax/rst.vim new file mode 100644 index 0000000000..425d225113 --- /dev/null +++ b/runtime/syntax/rst.vim @@ -0,0 +1,196 @@ +" Vim syntax file +" Language: reStructuredText documentation format +" Maintainer: Nikolai Weibull +" Latest Revision: 2013-11-26 + +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:]/]" + +syn region rstCodeBlock contained matchgroup=rstDirective + \ start=+\%(sourcecode\|code\%(-block\)\=\)::\s+ + \ skip=+^$+ + \ end=+^\s\@!+ + \ contains=@NoSpell +syn cluster rstDirectives add=rstCodeBlock + +if !exists('g:rst_syntax_code_list') + let g:rst_syntax_code_list = ['vim', 'java', 'cpp', 'lisp', 'php', 'python', 'perl'] +endif + +for code in g:rst_syntax_code_list + unlet! b:current_syntax + exe 'syn include @rst'.code.' syntax/'.code.'.vim' + exe 'syn region rstDirective'.code.' matchgroup=rstDirective fold ' + \.'start=#\%(sourcecode\|code\%(-block\)\=\)::\s\+'.code.'\s*$# ' + \.'skip=#^$# ' + \.'end=#^\s\@!# contains=@NoSpell,@rst'.code.' keepend' + exe 'syn cluster rstDirectives add=rstDirective'.code +endfor + +" TODO: Use better syncing. +syn sync minlines=50 linebreaks=2 + +hi def link rstTodo Todo +hi def link rstComment Comment +hi def link rstSections Title +hi def link rstTransition rstSections +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 +hi def link rstCodeBlock String + +let b:current_syntax = "rst" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/rtf.vim b/runtime/syntax/rtf.vim new file mode 100644 index 0000000000..8f5ea71a36 --- /dev/null +++ b/runtime/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/runtime/syntax/ruby.vim b/runtime/syntax/ruby.vim new file mode 100644 index 0000000000..28f553decb --- /dev/null +++ b/runtime/syntax/ruby.vim @@ -0,0 +1,371 @@ +" Vim syntax file +" Language: Ruby +" Maintainer: Doug Kearns +" URL: https://github.com/vim-ruby/vim-ruby +" 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,rubyExceptional,rubyMethodExceptional,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 rubyOperator "->\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|!\~\|!=" + 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 match rubyQuoteEscape "\\[\\']" 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 +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 "\%(\%(\w\|[]})\"']\s*\)\@" display +syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@" display +syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@" display +syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@" display +syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@" 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\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display +syn match rubyInstanceVariable "@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display +syn match rubyGlobalVariable "$\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\|-.\)" +syn match rubySymbol "[]})\"':]\@\|<=\|<\|===\|[=!]=\|[=!]\~\|!\|>>\|>=\|>\||\|-@\|-\|/\|\[]=\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)" +syn match rubySymbol "[]})\"':]\@_,;:!?/.'"@$*\&+0]\)" +syn match rubySymbol "[]})\"':]\@\@!\)\=" +syn match rubySymbol "\%([{(,]\_s*\)\@<=\l\w*[!?]\=::\@!"he=e-1 +syn match rubySymbol "[]})\"':]\@\|{\)\s*\)\@<=|" end="|" oneline display contains=rubyBlockParameter + +syn match rubyInvalidVariable "$[^ A-Za-z_-]" +syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~]# +syn match rubyPredefinedVariable "$\d\+" display +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*(\)\@!" +syn match rubyPredefinedConstant "\%(\%(\.\@\%(\s*(\)\@!" + +" 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 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,@Spell fold +syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape,@Spell 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="%[qwi]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape +syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape +syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape +syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape +syn region rubyString matchgroup=rubyStringDelimiter start="%q " end=" " skip="\\\\\|\\)" fold +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="%[QWIx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\={" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[Qx] " end=" " skip="\\\\\|\\)" contains=@rubyStringSpecial 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 + +" 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\|in\|next\|not\|or\|redo\|rescue\|retry\|return\)\>[?!]\@!" +syn match rubyOperator "\[?!]\@!" +syn match rubyBoolean "\<\%(true\|false\)\>[?!]\@!" +syn match rubyPseudoVariable "\<\%(nil\|self\|__ENCODING__\|__FILE__\|__LINE__\|__callee__\|__method__\)\>[?!]\@!" " TODO: reorganise +syn match rubyBeginEnd "\<\%(BEGIN\|END\)\>[?!]\@!" + +" 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 rubyMethodBlock 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 matchgroup=rubyCurlyBlockDelimiter 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 + + syn match rubyExceptional "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>[?!]\@!" contained containedin=rubyBlockExpression + syn match rubyMethodExceptional "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>[?!]\@!" contained containedin=rubyMethodBlock + + " 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 = 500 + 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\|ensure\|then\|when\|end\)\>[?!]\@!" + syn match rubyKeyword "\<\%(alias\|undef\)\>[?!]\@!" +endif + +" Special Methods +if !exists("ruby_no_special_methods") + syn keyword rubyAccess public protected private public_class_method private_class_method public_constant private_constant 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 prepend require require_relative + syn keyword rubyKeyword callcc caller lambda proc +endif + +" Comments and Documentation +syn match rubySharpBang "\%^#!.*" display +syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE XXX todo 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 rubyMethodExceptional rubyDefine +hi def link rubyDefine Define +hi def link rubyFunction Function +hi def link rubyConditional Conditional +hi def link rubyConditionalModifier rubyConditional +hi def link rubyExceptional 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 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 rubyQuoteEscape rubyStringEscape +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 rubyHeredoc rubyString +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/runtime/syntax/samba.vim b/runtime/syntax/samba.vim new file mode 100644 index 0000000000..dae4040ec5 --- /dev/null +++ b/runtime/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/runtime/syntax/sas.vim b/runtime/syntax/sas.vim new file mode 100644 index 0000000000..dc70e1fd90 --- /dev/null +++ b/runtime/syntax/sas.vim @@ -0,0 +1,284 @@ +" Vim syntax file +" Language: SAS +" Maintainer: James Kidd +" Last Change: 2012 Apr 20 +" Corrected bug causing some keywords to appear as strings instead +" 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 keyword sasUnderscore _ALL_ _AUTOMATIC_ _CHARACTER_ _INFILE_ _N_ _NAME_ _NULL_ _NUMERIC_ _USER_ _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/runtime/syntax/sass.vim b/runtime/syntax/sass.vim new file mode 100644 index 0000000000..2ea0722696 --- /dev/null +++ b/runtime/syntax/sass.vim @@ -0,0 +1,98 @@ +" Vim syntax file +" Language: Sass +" Maintainer: Tim Pope +" Filenames: *.sass +" Last Change: 2013 May 30 + +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,scssComment,cssValue.*,cssColor,cssURL,sassDefault,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssRenderProp + +syn region sassDefinition matchgroup=cssBraces start="{" end="}" contains=TOP + +syn match sassProperty "\%([{};]\s*\|^\)\@<=\%([[:alnum:]-]\|#{[^{}]*}\)\+\s*:" contains=css.*Prop skipwhite nextgroup=sassCssAttribute contained containedin=sassDefinition +syn match sassProperty "^\s*\zs\s\%(\%([[:alnum:]-]\|#{[^{}]*}\)\+\s*:\|:[[:alnum:]-]\+\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=sassCssAttribute +syn match sassProperty "^\s*\zs\s\%(:\=[[:alnum:]-]\+\s*=\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=sassCssAttribute +syn match sassCssAttribute +\%("\%([^"]\|\\"\)*"\|'\%([^']\|\\'\)*'\|#{[^{}]*}\|[^{};]\)*+ contained contains=@sassCssAttributes,sassVariable,sassFunction,sassInterpolation +syn match sassDefault "!default\>" contained +syn match sassVariable "!\%(important\>\|default\>\)\@![[:alnum:]_-]\+" +syn match sassVariable "$[[:alnum:]_-]\+" +syn match sassVariableAssignment "\%([!$][[:alnum:]_-]\+\s*\)\@<=\%(||\)\==" nextgroup=sassCssAttribute skipwhite +syn match sassVariableAssignment "\%([!$][[:alnum:]_-]\+\s*\)\@<=:" nextgroup=sassCssAttribute skipwhite + +syn match sassFunction "\<\%(rgb\|rgba\|red\|green\|blue\|mix\)\>(\@=" contained +syn match sassFunction "\<\%(hsl\|hsla\|hue\|saturation\|lightness\|adjust-hue\|lighten\|darken\|saturate\|desaturate\|grayscale\|complement\)\>(\@=" contained +syn match sassFunction "\<\%(alpha\|opacity\|rgba\|opacify\|fade-in\|transparentize\|fade-out\)\>(\@=" contained +syn match sassFunction "\<\%(unquote\|quote\)\>(\@=" contained +syn match sassFunction "\<\%(percentage\|round\|ceil\|floor\|abs\)\>(\@=" contained +syn match sassFunction "\<\%(type-of\|unit\|unitless\|comparable\)\>(\@=" contained + +syn region sassInterpolation matchgroup=sassInterpolationDelimiter start="#{" end="}" contains=@sassCssAttributes,sassVariable,sassFunction containedin=cssStringQ,cssStringQQ,cssPseudoClass,sassProperty + +syn match sassMixinName "[[:alnum:]_-]\+" contained nextgroup=sassCssAttribute +syn match sassMixin "^=" nextgroup=sassMixinName skipwhite +syn match sassMixin "\%([{};]\s*\|^\s*\)\@<=@mixin" nextgroup=sassMixinName skipwhite +syn match sassMixing "^\s\+\zs+" nextgroup=sassMixinName +syn match sassMixing "\%([{};]\s*\|^\s*\)\@<=@include" nextgroup=sassMixinName skipwhite +syn match sassExtend "\%([{};]\s*\|^\s*\)\@<=@extend" +syn match sassPlaceholder "\%([{};]\s*\|^\s*\)\@<=%" nextgroup=sassMixinName skipwhite + +syn match sassFunctionName "[[:alnum:]_-]\+" contained nextgroup=sassCssAttribute +syn match sassFunctionDecl "\%([{};]\s*\|^\s*\)\@<=@function" nextgroup=sassFunctionName skipwhite +syn match sassReturn "\%([{};]\s*\|^\s*\)\@<=@return" + +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=scssComment,cssStringQ,cssStringQQ,cssURL,cssUnicodeEscape,cssMediaType +syn region sassDebugLine end=";\|$" matchgroup=sassDebug start="@debug\>" contains=@sassCssAttributes,sassVariable,sassFunction +syn region sassWarnLine end=";\|$" matchgroup=sassWarn start="@warn\>" contains=@sassCssAttributes,sassVariable,sassFunction +syn region sassControlLine matchgroup=sassControl start="@\%(if\|else\%(\s\+if\)\=\|while\|for\|each\)\>" end="[{};]\@=\|$" contains=sassFor,@sassCssAttributes,sassVariable,sassFunction +syn keyword sassFor from to through in contained + +syn keyword sassTodo FIXME NOTE TODO OPTIMIZE XXX contained +syn region sassComment start="^\z(\s*\)//" end="^\%(\z1 \)\@!" contains=sassTodo,@Spell +syn region sassCssComment start="^\z(\s*\)/\*" end="^\%(\z1 \)\@!" contains=sassTodo,@Spell + +hi def link sassCssComment sassComment +hi def link sassComment Comment +hi def link sassDefault cssImportant +hi def link sassVariable Identifier +hi def link sassFunction Function +hi def link sassMixing PreProc +hi def link sassMixin PreProc +hi def link sassPlaceholder PreProc +hi def link sassExtend PreProc +hi def link sassFunctionDecl PreProc +hi def link sassReturn PreProc +hi def link sassTodo Todo +hi def link sassInclude Include +hi def link sassDebug sassControl +hi def link sassWarn sassControl +hi def link sassControl PreProc +hi def link sassFor PreProc +hi def link sassEscape Special +hi def link sassIdChar Special +hi def link sassClassChar Special +hi def link sassInterpolationDelimiter Delimiter +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/runtime/syntax/sather.vim b/runtime/syntax/sather.vim new file mode 100644 index 0000000000..759591bf84 --- /dev/null +++ b/runtime/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/runtime/syntax/scheme.vim b/runtime/syntax/scheme.vim new file mode 100644 index 0000000000..a210b0c720 --- /dev/null +++ b/runtime/syntax/scheme.vim @@ -0,0 +1,330 @@ +" Vim syntax file +" Language: Scheme (R5RS + some R6RS extras) +" Last Change: 2012 May 13 +" 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 + +let s:cpo_save = &cpo +set cpo&vim + +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=@Spell,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$+ contains=@Spell + + 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$+ contains=@Spell +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" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/scilab.vim b/runtime/syntax/scilab.vim new file mode 100644 index 0000000000..1bfc003678 --- /dev/null +++ b/runtime/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/runtime/syntax/screen.vim b/runtime/syntax/screen.vim new file mode 100644 index 0000000000..71b3d3efba --- /dev/null +++ b/runtime/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/runtime/syntax/scss.vim b/runtime/syntax/scss.vim new file mode 100644 index 0000000000..6fb9691527 --- /dev/null +++ b/runtime/syntax/scss.vim @@ -0,0 +1,20 @@ +" Vim syntax file +" Language: SCSS +" Maintainer: Tim Pope +" Filenames: *.scss +" Last Change: 2010 Jul 26 + +if exists("b:current_syntax") + finish +endif + +runtime! syntax/sass.vim + +syn match scssComment "//.*" contains=sassTodo,@Spell +syn region scssComment start="/\*" end="\*/" contains=sassTodo,@Spell + +hi def link scssComment sassComment + +let b:current_syntax = "scss" + +" vim:set sw=2: diff --git a/runtime/syntax/sd.vim b/runtime/syntax/sd.vim new file mode 100644 index 0000000000..7fa0e04492 --- /dev/null +++ b/runtime/syntax/sd.vim @@ -0,0 +1,81 @@ +" 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: 2012 Feb 03 by Thilo Six + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" 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" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/sdc.vim b/runtime/syntax/sdc.vim new file mode 100644 index 0000000000..0ca9becf73 --- /dev/null +++ b/runtime/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/runtime/syntax/sdl.vim b/runtime/syntax/sdl.vim new file mode 100644 index 0000000000..b524b72266 --- /dev/null +++ b/runtime/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/runtime/syntax/sed.vim b/runtime/syntax/sed.vim new file mode 100644 index 0000000000..42ad6d8e62 --- /dev/null +++ b/runtime/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: 2010 May 29 + +" 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(" ") " ASCII: 32, EBCDIC: 64 +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 = char2nr(" ") " ASCII: 32, EBCDIC: 64 + while __sed_i <= __sed_last + 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_last __sed_delimiter __sed_metacharacters + +let b:current_syntax = "sed" + +" vim: sts=4 sw=4 ts=8 diff --git a/runtime/syntax/sendpr.vim b/runtime/syntax/sendpr.vim new file mode 100644 index 0000000000..6cf9395fe9 --- /dev/null +++ b/runtime/syntax/sendpr.vim @@ -0,0 +1,38 @@ +" Vim syntax file +" Language: FreeBSD send-pr file +" Maintainer: Hendrik Scholz +" Last Change: 2012 Feb 03 +" +" 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 + +let s:cpo_save = &cpo +set cpo&vim + +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 + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/sensors.vim b/runtime/syntax/sensors.vim new file mode 100644 index 0000000000..63cececc68 --- /dev/null +++ b/runtime/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/runtime/syntax/services.vim b/runtime/syntax/services.vim new file mode 100644 index 0000000000..661f57a7e8 --- /dev/null +++ b/runtime/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/runtime/syntax/setserial.vim b/runtime/syntax/setserial.vim new file mode 100644 index 0000000000..cdd309d7f2 --- /dev/null +++ b/runtime/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/runtime/syntax/sgml.vim b/runtime/syntax/sgml.vim new file mode 100644 index 0000000000..c0c3643dd2 --- /dev/null +++ b/runtime/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/runtime/syntax/sgmldecl.vim b/runtime/syntax/sgmldecl.vim new file mode 100644 index 0000000000..13551b21c1 --- /dev/null +++ b/runtime/syntax/sgmldecl.vim @@ -0,0 +1,85 @@ +" 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 +let s:keepcpo= &cpo +set cpo&vim + +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" + +let &cpo = s:keepcpo +unlet s:keepcpo + +" vim:set tw=78 ts=4: diff --git a/runtime/syntax/sgmllnx.vim b/runtime/syntax/sgmllnx.vim new file mode 100644 index 0000000000..28224f601e --- /dev/null +++ b/runtime/syntax/sgmllnx.vim @@ -0,0 +1,67 @@ +" Vim syntax file +" Language: SGML-linuxdoc (supported by old sgmltools-1.x) +" Maintainer: SungHyun Nam +" Last Change: 2013 May 13 + +" 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/runtime/syntax/sh.vim b/runtime/syntax/sh.vim new file mode 100644 index 0000000000..5ca5bc641a --- /dev/null +++ b/runtime/syntax/sh.vim @@ -0,0 +1,706 @@ +" Vim syntax file +" Language: shell (sh) Korn shell (ksh) bash (sh) +" Maintainer: Charles E. Campbell +" Previous Maintainer: Lennart Schultz +" Last Change: Mar 20, 2014 +" Version: 132 +" 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 + +" AFAICT "." should be considered part of the iskeyword. Using iskeywords in +" syntax is dicey, so the following code permits the user to +" g:sh_isk set to a string : specify iskeyword. +" g:sh_noisk exists : don't change iskeyword +" g:sh_noisk does not exist : (default) append "." to iskeyword +if exists("g:sh_isk") && type(g:sh_isk) == 1 " user specifying iskeyword + exe "setl isk=".g:sh_isk +elseif !exists("g:sh_noisk") " optionally prevent appending '.' to iskeyword + setl isk+=. +endif + +" trying to answer the question: which shell is /bin/sh, really? +" If the user has not specified any of g:is_kornshell, g:is_bash, g:is_posix, g:is_sh, then guess. +if !exists("g:is_kornshell") && !exists("g:is_bash") && !exists("g:is_posix") && !exists("g:is_sh") + let s:shell = "" + if executable("/bin/sh") + let s:shell = resolve("/bin/sh") + elseif executable("/usr/bin/sh") + let s:shell = resolve("/usr/bin/sh") + endif + if s:shell =~ 'bash$' + let g:is_bash= 1 + elseif s:shell =~ 'ksh$' + let g:is_kornshell = 1 + elseif s:shell =~ 'dash$' + let g:is_posix = 1 + endif + unlet s:shell +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 "g:is_bash", "g:is_kornshell", +" or "g:is_posix", 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= and(g:sh_fold_enabled,1) +endif +if !exists("s:sh_fold_heredoc") + let s:sh_fold_heredoc = and(g:sh_fold_enabled,2) +endif +if !exists("s:sh_fold_ifdofor") + let s:sh_fold_ifdofor = and(g:sh_fold_enabled,4) +endif +if g:sh_fold_enabled && &fdm == "manual" + " Given that the user provided g:sh_fold_enabled + " AND g:sh_fold_enabled is manual (usual default) + " implies a desire for syntax-based folding + setl 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,shExDoubleQuote,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,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,shEcho,shEscape,shNumber,shOption,shPosnParm,shExSingleQuote,shSingleQuote,shExDoubleQuote,shDoubleQuote,shStatement,shVariable,shSubSh,shAlias,shTest,shCtrlSeq,shSpecial,shCmdParenRegion +syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial +syn cluster shDblQuoteList contains=shCommandSub,shDeref,shDerefSimple,shEscape,shPosnParm,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,shEscape,shExpr,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote +syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq +syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest +syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,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,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr +syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo +syn cluster shLoopList contains=@shCaseList,shTestOpr,shExpr,shDblBrace,shConditional,shCaseEsac,shTest,@shErrorList,shSet,shOption +syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator +syn cluster shTestList contains=shCharClass,shComment,shCommandSub,shDeref,shDerefSimple,shExDoubleQuote,shDoubleQuote,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=shEchoDelim 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=shEchoDelim 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=shEchoDelim 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,shExDoubleQuote,shDoubleQuote,shCharClass,shCtrlSeq + +" Alias: {{{1 +" ===== +if exists("b:is_kornshell") || exists("b:is_bash") + syn match shStatement "\" + syn region shAlias matchgroup=shStatement start="\\s\+\(\h[-._[:alnum:]]\+\)\@=" skip="\\$" end="\>\|`" + syn region shAlias matchgroup=shStatement start="\\s\+\(\h[-._[:alnum:]]\+=\)\@=" skip="\\$" end="=" +endif + +" Error Codes: {{{1 +" ============ +if !exists("g:sh_no_error") + 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 "]" +endif + +" 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,shExDoubleQuote,shDoubleQuote,shDeref + +" Subshells: {{{1 +" ========== +syn region shExpr transparent matchgroup=shExprRegion start="{" end="}" contains=@shExprList2 nextgroup=shMoreSpecial +syn region shSubSh transparent matchgroup=shSubShRegion start="[^(]\zs(" 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 '\%(\%(\\\\\)*\\\)\@" matchgroup=shConditional end="\" contains=@shLoopList + syn region shIf fold transparent matchgroup=shConditional start="\+ end="\<;\_s*then\>" end="\" contains=@shIfList + syn region shFor fold matchgroup=shLoop start="\+ end="\<;\_s*then\>" end="\" contains=@shIfList + syn region shFor matchgroup=shLoop start="\\ze\_s*((' +endif +if exists("b:is_kornshell") || exists("b:is_bash") + syn cluster shCaseList add=shRepeat + syn cluster shFunctionList add=shRepeat + syn region shRepeat matchgroup=shLoop 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=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial + syn region shExDoubleQuote matchgroup=shQuote start=+\$"+ skip=+\\\\\|\\.\|\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,shSpecial +elseif !exists("g:sh_no_error") + syn region shExSingleQuote matchGroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial + syn region shExDoubleQuote matchGroup=Error start=+\$"+ skip=+\\\\\|\\.+ end=+"+ contains=shStringSpecial +endif +syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell +syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@" contained +syn match shVariable "\<\([bwglsav]:\)\=[a-zA-Z0-9.!@_%+,]*\ze=" nextgroup=shSetIdentifier +syn match shSetIdentifier "=" contained nextgroup=shCmdParenRegion,shPattern,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shSingleQuote,shExSingleQuote +syn region shAtExpr contained start="@(" end=")" contains=@shIdList +if exists("b:is_bash") + syn region shSetList oneline matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+#\|=" contains=@shIdList + syn region shSetList oneline matchgroup=shSet start="\\ze[^/]" end="\ze[;|)]\|$" matchgroup=shSetListDelim 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=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList + syn region shSetList oneline matchgroup=shSet start="\\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList +else + syn region shSetList oneline matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim 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 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 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 "\$\%(\k\+\|\d\)" +syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray +if !exists("g:sh_no_error") + syn match shDerefWordError "[^}$[]" contained +endif +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 "{\@<=!\k\+" nextgroup=@shDerefVarList +endif + +syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefOpError +syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@shDerefVarList,shDerefOp +syn match shDerefVar contained "{\@<=\k\+" 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 +" bash : ${parameter^pattern} Case modification +" bash : ${parameter^^pattern} Case modification +" bash : ${parameter,pattern} Case modification +" bash : ${parameter,,pattern} Case modification +syn cluster shDerefPatternList contains=shDerefPattern,shDerefString +if !exists("g:sh_no_error") + syn match shDerefOpError contained ":[[:punct:]]" +endif +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 +if exists("b:is_bash") + syn match shDerefOp contained "[,^]\{1,2}" nextgroup=@shDerefPatternList +endif +syn region shDerefString contained matchgroup=shDerefDelim 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 shAtExpr shSetList +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 shQuote shOperator +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 shDerefDelim shOperator +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 shEchoDelim shOperator +hi def link shEchoQuote shString +hi def link shForPP shLoop +hi def link shEmbeddedEcho shString +hi def link shEscape shCommandSub +hi def link shExDoubleQuote shDoubleQuote +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 shSetListDelim shOperator +hi def link shSetOption shOption +hi def link shSingleQuote shString +hi def link shSource shOperator +hi def link shStringSpecial shSpecial +hi def link shStringSpecial Unique +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 + hi def link shCharClass shSpecial +endif +if exists("b:is_kornshell") + hi def link kshSpecialVariables shShellVariables + hi def link kshStatement shStatement + hi def link shFunctionParen Delimiter +endif + +if !exists("g:sh_no_error") + 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 +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 +hi def link shRedir01 shRedir +hi def link shRedir02 shRedir +hi def link shRedir03 shRedir +hi def link shRedir04 shRedir +hi def link shRedir05 shRedir +hi def link shRedir06 shRedir +hi def link shRedir07 shRedir +hi def link shRedir08 shRedir +hi def link shRedir09 shRedir +hi def link shRedir10 shRedir +hi def link shRedir11 shRedir +hi def link shRedir12 shRedir +hi def link shRedir13 shRedir +hi def link shRedir14 shRedir +hi def link shRedir15 shRedir +hi def link shRedir16 shRedir +hi def link shRedir17 shRedir +hi def link shRedir18 shRedir +hi def link shRedir19 shRedir +hi def link shRedir20 shRedir +hi def link shRedir21 shRedir +hi def link shRedir22 shRedir +hi def link shRedir23 shRedir +hi def link shRedir24 shRedir +hi def link shRedir25 shRedir +hi def link shRedir26 shRedir +hi def link shRedir27 shRedir +hi def link shRedir28 shRedir +hi def link shRedir29 shRedir +hi def link shRedir30 shRedir +hi def link shRedir31 shRedir +hi def link shRedir32 shRedir + +" 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/runtime/syntax/sicad.vim b/runtime/syntax/sicad.vim new file mode 100644 index 0000000000..7e32451bed --- /dev/null +++ b/runtime/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/runtime/syntax/sieve.vim b/runtime/syntax/sieve.vim new file mode 100644 index 0000000000..4bb4417f39 --- /dev/null +++ b/runtime/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/runtime/syntax/simula.vim b/runtime/syntax/simula.vim new file mode 100644 index 0000000000..e952ee26c3 --- /dev/null +++ b/runtime/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/runtime/syntax/sinda.vim b/runtime/syntax/sinda.vim new file mode 100644 index 0000000000..2bde267c2f --- /dev/null +++ b/runtime/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/runtime/syntax/sindacmp.vim b/runtime/syntax/sindacmp.vim new file mode 100644 index 0000000000..87b483409a --- /dev/null +++ b/runtime/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/runtime/syntax/sindaout.vim b/runtime/syntax/sindaout.vim new file mode 100644 index 0000000000..b557e017eb --- /dev/null +++ b/runtime/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/runtime/syntax/sisu.vim b/runtime/syntax/sisu.vim new file mode 100644 index 0000000000..23d73254eb --- /dev/null +++ b/runtime/syntax/sisu.vim @@ -0,0 +1,265 @@ +" SiSU Vim syntax file +" SiSU Maintainer: Ralph Amissah +" SiSU Markup: SiSU (sisu-4.0.9) +" Last Change: 2013-02-22 +" URL (sisu-4.1.0): +"(originally looked at Ruby Vim by Mirko Nasato) + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +else +endif +let s:cpo_save = &cpo +set cpo&vim + +"% "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_break contains=@NoSpell " \\\\\( \|$\)\|
\|
" + syn match sisu_control contains=@NoSpell "^\(-\\\\-\|=\\\\=\|-\.\.-\|<:p[bn]>\)\s*$" + syn match sisu_control contains=@NoSpell "^<:\(bo\|---\)>\s*$" + syn match sisu_marktail "[~-]#" + 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\+" + 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_structure "^:A\~$" + +"% "Document Sub Headers: + syn match sisu_sub_header_title "^\s\+:\(subtitle\|short\|edition\|language\|lang_char\|note\):\s" "group=sisu_header_content + syn match sisu_sub_header_creator "^\s\+:\(author\|editor\|contributor\|illustrator\|photographer\|translator\|digitized_by\|prepared_by\|audio\|video\):\s" " &hon &institution + syn match sisu_sub_header_rights "^\s\+:\(copyright\|text\|translation\|illustrations\|photographs\|preparation\|digitization\|audio\|video\|license\|all\):\s" " access_rights license + syn match sisu_sub_header_classify "^\s\+:\(topic_register\|keywords\|subject\|dewey\|loc\):\s" + syn match sisu_sub_header_identifier "^\s\+:\(oclc\|isbn\):\s" + syn match sisu_sub_header_date "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" + syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|lang_char\|institution\|nationality\|source\):\s" + syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|substitute\|omit\|plaintext_wrap\|texpdf_font_mono\|texpdf_font\|stamp\|promo\|ad\|manpage\|home_button_text\|home_button_image\|cover_image\|footer\):\s" + syn match sisu_sub_header_notes "^\s\+:\(description\|abstract\|comment\|coverage\|relation\|source\|history\|type\|format\|prefix\|prefix_[ab]\|suffix\):\s" + +"% "semantic markers: (ignore) + 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="$" + +"% "Document Header: +" title +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_title matchgroup=sisu_header start="^[@]title:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" creator +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_creator matchgroup=sisu_header start="^[@]creator:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" dates +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_date matchgroup=sisu_header start="^[@]date:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" publisher +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_publisher matchgroup=sisu_header start="^[@]publisher:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" rights +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_rights matchgroup=sisu_header start="^[@]rights:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" classify document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_classify matchgroup=sisu_header start="^[@]classify:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" identifier document +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_identifier matchgroup=sisu_header start="^[@]identifier:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" original language (depreciated) +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_original matchgroup=sisu_header start="^[@]original:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" notes +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_notes matchgroup=sisu_header start="^[@]notes:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" links of interest +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_linked,sisu_sub_header_links matchgroup=sisu_header start="^[@]links:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +" make, processing instructions +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_make matchgroup=sisu_header start="^[@]make:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" + +"% "Headings: +syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-8]\|:\?[A-C]\)\~\(\S\+\|[^-]\)" end="$" + +"% "Block Group Text: +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table" +" table +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n$" +" block, group, poem, alt +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="^\(block\|group\|poem\|alt\){" end="^}\(block\|group\|poem\|alt\)" +" code +syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="^code{" end="^}code" + +"% "Endnotes: +" regular endnote or asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,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" +" numbered asterisk or plus sign endnote +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,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" +" endnote content marker (for binary content marking) +syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n$" + +"% "Links And Images: +" image with url link (and possibly footnote of url) +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,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 +" sisu outputs, short notation +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,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 +" image +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline + +"% "Some Line Operations: +" bold line +syn region sisu_bold contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^!_ " end=" \\\\\|$" +" indent and bullet paragraph +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,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="$" +" indent and bullet (bold start) paragraph +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,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=" \\\\\|$" +" hanging indent paragraph [proposed] +syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,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="^_[0-9]\?_[0-9] " end="$" +" hanging indent (bold start/ definition) paragraph [proposed] +syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,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="^_[0-9]\?_[0-9]!_\? " end=" \\\\\|$" +" list numbering +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="$" + +"% "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 +" book index: +syn region sisu_index matchgroup=sisu_index_block start="^={" end="}" +" emphasis: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*" +" bold: +syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!" +" underscore: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="_{" end="}_" +" italics: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="/{" end="}/" +" added: +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" +" superscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" +" subscript: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," +" monospace: +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="#{" end="}#" +" strikethrough: +syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" + +"% "Single Words Bold Italicise Etc: (depreciated) +syn region sisu_bold contains=sisu_error matchgroup=sisu_bold 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 + +"% "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$" +syn match sisu_error contains=sisu_error "^[\~]{[^{]\{-}\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\~.*" +syn match sisu_error contains=sisu_error "^[1-9]\~\s*$" +syn match sisu_error contains=sisu_error "^[1-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$" + +"% "Error Exceptions: +syn match sisu_control "\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\+[><]" +syn match sisu_comment "^%\{1,2\}.\+" + +"% "Definitions Default Highlighting: +hi def link sisu_normal Normal +hi def link sisu_bold Statement +hi def link sisu_header PreProc +hi def link sisu_header_content Normal +hi def link sisu_sub_header_title Statement +hi def link sisu_sub_header_creator Statement +hi def link sisu_sub_header_date Statement +hi def link sisu_sub_header_publisher Statement +hi def link sisu_sub_header_rights Statement +hi def link sisu_sub_header_classify Statement +hi def link sisu_sub_header_identifier Statement +hi def link sisu_sub_header_original Statement +hi def link sisu_sub_header_links Statement +hi def link sisu_sub_header_notes Statement +hi def link sisu_sub_header_make 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 Delimiter +hi def link sisu_require NonText +hi def link sisu_link NonText +hi def link sisu_linked String +hi def link sisu_fontface Delimiter +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 Delimiter +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" +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/skill.vim b/runtime/syntax/skill.vim new file mode 100644 index 0000000000..8b960441f6 --- /dev/null +++ b/runtime/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/runtime/syntax/sl.vim b/runtime/syntax/sl.vim new file mode 100644 index 0000000000..fa3bca06dd --- /dev/null +++ b/runtime/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/runtime/syntax/slang.vim b/runtime/syntax/slang.vim new file mode 100644 index 0000000000..9fa89b4d61 --- /dev/null +++ b/runtime/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/runtime/syntax/slice.vim b/runtime/syntax/slice.vim new file mode 100644 index 0000000000..4e2f9a8604 --- /dev/null +++ b/runtime/syntax/slice.vim @@ -0,0 +1,91 @@ +" 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 region sliceIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +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/runtime/syntax/slpconf.vim b/runtime/syntax/slpconf.vim new file mode 100644 index 0000000000..9fe4503780 --- /dev/null +++ b/runtime/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/runtime/syntax/slpreg.vim b/runtime/syntax/slpreg.vim new file mode 100644 index 0000000000..f3c8a7fc8e --- /dev/null +++ b/runtime/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/runtime/syntax/slpspi.vim b/runtime/syntax/slpspi.vim new file mode 100644 index 0000000000..8507e3de69 --- /dev/null +++ b/runtime/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/runtime/syntax/slrnrc.vim b/runtime/syntax/slrnrc.vim new file mode 100644 index 0000000000..038b62e166 --- /dev/null +++ b/runtime/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/runtime/syntax/slrnsc.vim b/runtime/syntax/slrnsc.vim new file mode 100644 index 0000000000..838af6ad1c --- /dev/null +++ b/runtime/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/runtime/syntax/sm.vim b/runtime/syntax/sm.vim new file mode 100644 index 0000000000..2f9e6d7d01 --- /dev/null +++ b/runtime/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/runtime/syntax/smarty.vim b/runtime/syntax/smarty.vim new file mode 100644 index 0000000000..6dda366ba2 --- /dev/null +++ b/runtime/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/runtime/syntax/smcl.vim b/runtime/syntax/smcl.vim new file mode 100644 index 0000000000..d9afba6de5 --- /dev/null +++ b/runtime/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/runtime/syntax/smil.vim b/runtime/syntax/smil.vim new file mode 100644 index 0000000000..6b5a002868 --- /dev/null +++ b/runtime/syntax/smil.vim @@ -0,0 +1,159 @@ +" Vim syntax file +" Language: SMIL (Synchronized Multimedia Integration Language) +" Maintainer: Herve Foucher +" URL: http://www.helio.org/vim/syntax/smil.vim +" Last Change: 2012 Feb 03 by Thilo Six + +" 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 + +let s:cpo_save = &cpo +set cpo&vim + +" 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 + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 diff --git a/runtime/syntax/smith.vim b/runtime/syntax/smith.vim new file mode 100644 index 0000000000..e05ce69683 --- /dev/null +++ b/runtime/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/runtime/syntax/sml.vim b/runtime/syntax/sml.vim new file mode 100644 index 0000000000..aa7d64a33a --- /dev/null +++ b/runtime/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/runtime/syntax/snnsnet.vim b/runtime/syntax/snnsnet.vim new file mode 100644 index 0000000000..6b24de5634 --- /dev/null +++ b/runtime/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/runtime/syntax/snnspat.vim b/runtime/syntax/snnspat.vim new file mode 100644 index 0000000000..5bfa48e624 --- /dev/null +++ b/runtime/syntax/snnspat.vim @@ -0,0 +1,72 @@ +" Vim syntax file +" Language: SNNS pattern file +" Maintainer: Davide Alberani +" Last Change: 2012 Feb 03 by Thilo Six +" 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 + +let s:cpo_save = &cpo +set cpo&vim + +" 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" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 sw=2 diff --git a/runtime/syntax/snnsres.vim b/runtime/syntax/snnsres.vim new file mode 100644 index 0000000000..4c1d596009 --- /dev/null +++ b/runtime/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/runtime/syntax/snobol4.vim b/runtime/syntax/snobol4.vim new file mode 100644 index 0000000000..07eb63dec7 --- /dev/null +++ b/runtime/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/runtime/syntax/spec.vim b/runtime/syntax/spec.vim new file mode 100644 index 0000000000..5d96b57a8a --- /dev/null +++ b/runtime/syntax/spec.vim @@ -0,0 +1,236 @@ +" Filename: spec.vim +" Purpose: Vim syntax file +" Language: SPEC: Build/install scripts for Linux RPM packages +" Maintainer: Igor Gnatenko i.gnatenko.brain@gmail.com +" Former Maintainer: Donovan Rebbechi elflord@panix.com (until March 2014) +" Last Change: Sun Mar 2 10:33 MSK 2014 Igor Gnatenko + +" 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\|global\|patch\d*\|setup\|configure\|GNUconfigure\|find_lang\|makeinstall\|make_install\|include\)\>' end='$' contains=specCommandOpts,specMacroIdentifier +syn region specSectionMacroBracketArea oneline matchgroup=specSectionMacro start='^%{\(configure\|GNUconfigure\|find_lang\|makeinstall\|make_install\)}' 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\|posttrans\)\>' skip='^%{\|^%\(define\|patch\d*\|configure\|GNUconfigure\|setup\|find_lang\|makeinstall\|make_install\)\>' 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/runtime/syntax/specman.vim b/runtime/syntax/specman.vim new file mode 100644 index 0000000000..3fb77a2afa --- /dev/null +++ b/runtime/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/runtime/syntax/spice.vim b/runtime/syntax/spice.vim new file mode 100644 index 0000000000..200e1aaea4 --- /dev/null +++ b/runtime/syntax/spice.vim @@ -0,0 +1,88 @@ +" Vim syntax file +" Language: Spice circuit simulator input netlist +" Maintainer: Noam Halevy +" Last Change: 2012 Jun 01 +" (Dominique Pelle added @Spell) +" +" 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 "^ \=\*.*$" contains=@Spell +syn match spiceComment "\$.*$" contains=@Spell + +" 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/runtime/syntax/splint.vim b/runtime/syntax/splint.vim new file mode 100644 index 0000000000..dc09d8b9d6 --- /dev/null +++ b/runtime/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/runtime/syntax/spup.vim b/runtime/syntax/spup.vim new file mode 100644 index 0000000000..07e9708eaa --- /dev/null +++ b/runtime/syntax/spup.vim @@ -0,0 +1,282 @@ +" Vim syntax file +" Language: Speedup, plant simulator from AspenTech +" Maintainer: Stefan.Schwarzer +" URL: http://www.ndh.net/home/sschwarzer/download/spup.vim +" Last Change: 2012 Feb 03 by Thilo Six +" 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 + +let s:cpo_save = &cpo +set cpo&vim + +" 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" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim:ts=8 diff --git a/runtime/syntax/spyce.vim b/runtime/syntax/spyce.vim new file mode 100644 index 0000000000..e76cb1a1a2 --- /dev/null +++ b/runtime/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/runtime/syntax/sql.vim b/runtime/syntax/sql.vim new file mode 100644 index 0000000000..7ba20f3446 --- /dev/null +++ b/runtime/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/runtime/syntax/sqlanywhere.vim b/runtime/syntax/sqlanywhere.vim new file mode 100644 index 0000000000..05b05c9f4f --- /dev/null +++ b/runtime/syntax/sqlanywhere.vim @@ -0,0 +1,908 @@ +" Vim syntax file +" Language: SQL, Adaptive Server Anywhere +" Maintainer: David Fishburn +" Last Change: 2013 May 13 +" Version: 16.0.0 + +" Description: Updated to Adaptive Server Anywhere 16.0.0 +" Updated to Adaptive Server Anywhere 12.0.1 (including spatial data) +" 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 abs argn avg bintohex bintostr +syn keyword sqlFunction byte_length byte_substr char_length +syn keyword sqlFunction compare count count_big datalength date +syn keyword sqlFunction date_format dateadd datediff datename +syn keyword sqlFunction datepart day dayname days debug_eng +syn keyword sqlFunction dense_rank density dialect difference +syn keyword sqlFunction dow estimate estimate_source evaluate +syn keyword sqlFunction experience_estimate explanation +syn keyword sqlFunction get_identity graphical_plan +syn keyword sqlFunction graphical_ulplan greater grouping +syn keyword sqlFunction hextobin hextoint hour hours identity +syn keyword sqlFunction ifnull index_estimate inttohex isdate +syn keyword sqlFunction isencrypted isnull isnumeric +syn keyword sqlFunction lang_message length lesser like_end +syn keyword sqlFunction like_start list long_ulplan lookup max +syn keyword sqlFunction min minute minutes month monthname +syn keyword sqlFunction months newid now nullif number +syn keyword sqlFunction percent_rank plan quarter rand rank +syn keyword sqlFunction regexp_compile regexp_compile_patindex +syn keyword sqlFunction remainder rewrite rowid second seconds +syn keyword sqlFunction short_ulplan similar sortkey soundex +syn keyword sqlFunction stddev stack_trace str string strtobin strtouuid stuff +syn keyword sqlFunction subpartition substr substring sum switchoffset sysdatetimeoffset +syn keyword sqlFunction textptr todate todatetimeoffset today totimestamp traceback transactsql +syn keyword sqlFunction ts_index_statistics ts_table_statistics +syn keyword sqlFunction tsequal ulplan user_id user_name utc_now +syn keyword sqlFunction uuidtostr varexists variance watcomsql +syn keyword sqlFunction weeks wsql_state year years ymd + +" 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 + +" 12.0.1 functions +syn keyword sqlFunction http_response_header + +" 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_response_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 + +" XML function support +syn keyword sqlFunction openxml xmlelement xmlforest xmlgen xmlconcat xmlagg +syn keyword sqlFunction xmlattributes + +" Spatial Compatibility Functions +syn keyword sqlFunction ST_BdMPolyFromText +syn keyword sqlFunction ST_BdMPolyFromWKB +syn keyword sqlFunction ST_BdPolyFromText +syn keyword sqlFunction ST_BdPolyFromWKB +syn keyword sqlFunction ST_CPolyFromText +syn keyword sqlFunction ST_CPolyFromWKB +syn keyword sqlFunction ST_CircularFromTxt +syn keyword sqlFunction ST_CircularFromWKB +syn keyword sqlFunction ST_CompoundFromTxt +syn keyword sqlFunction ST_CompoundFromWKB +syn keyword sqlFunction ST_GeomCollFromTxt +syn keyword sqlFunction ST_GeomCollFromWKB +syn keyword sqlFunction ST_GeomFromText +syn keyword sqlFunction ST_GeomFromWKB +syn keyword sqlFunction ST_LineFromText +syn keyword sqlFunction ST_LineFromWKB +syn keyword sqlFunction ST_MCurveFromText +syn keyword sqlFunction ST_MCurveFromWKB +syn keyword sqlFunction ST_MLineFromText +syn keyword sqlFunction ST_MLineFromWKB +syn keyword sqlFunction ST_MPointFromText +syn keyword sqlFunction ST_MPointFromWKB +syn keyword sqlFunction ST_MPolyFromText +syn keyword sqlFunction ST_MPolyFromWKB +syn keyword sqlFunction ST_MSurfaceFromTxt +syn keyword sqlFunction ST_MSurfaceFromWKB +syn keyword sqlFunction ST_OrderingEquals +syn keyword sqlFunction ST_PointFromText +syn keyword sqlFunction ST_PointFromWKB +syn keyword sqlFunction ST_PolyFromText +syn keyword sqlFunction ST_PolyFromWKB +" Spatial Structural Methods +syn keyword sqlFunction ST_CoordDim +syn keyword sqlFunction ST_CurveN +syn keyword sqlFunction ST_Dimension +syn keyword sqlFunction ST_EndPoint +syn keyword sqlFunction ST_ExteriorRing +syn keyword sqlFunction ST_GeometryN +syn keyword sqlFunction ST_GeometryType +syn keyword sqlFunction ST_InteriorRingN +syn keyword sqlFunction ST_Is3D +syn keyword sqlFunction ST_IsClosed +syn keyword sqlFunction ST_IsEmpty +syn keyword sqlFunction ST_IsMeasured +syn keyword sqlFunction ST_IsRing +syn keyword sqlFunction ST_IsSimple +syn keyword sqlFunction ST_IsValid +syn keyword sqlFunction ST_NumCurves +syn keyword sqlFunction ST_NumGeometries +syn keyword sqlFunction ST_NumInteriorRing +syn keyword sqlFunction ST_NumPoints +syn keyword sqlFunction ST_PointN +syn keyword sqlFunction ST_StartPoint +"Spatial Computation +syn keyword sqlFunction ST_Length +syn keyword sqlFunction ST_Area +syn keyword sqlFunction ST_Centroid +syn keyword sqlFunction ST_Area +syn keyword sqlFunction ST_Centroid +syn keyword sqlFunction ST_IsWorld +syn keyword sqlFunction ST_Perimeter +syn keyword sqlFunction ST_PointOnSurface +syn keyword sqlFunction ST_Distance +" Spatial Input/Output +syn keyword sqlFunction ST_AsBinary +syn keyword sqlFunction ST_AsGML +syn keyword sqlFunction ST_AsGeoJSON +syn keyword sqlFunction ST_AsSVG +syn keyword sqlFunction ST_AsSVGAggr +syn keyword sqlFunction ST_AsText +syn keyword sqlFunction ST_AsWKB +syn keyword sqlFunction ST_AsWKT +syn keyword sqlFunction ST_AsXML +syn keyword sqlFunction ST_GeomFromBinary +syn keyword sqlFunction ST_GeomFromShape +syn keyword sqlFunction ST_GeomFromText +syn keyword sqlFunction ST_GeomFromWKB +syn keyword sqlFunction ST_GeomFromWKT +syn keyword sqlFunction ST_GeomFromXML +" Spatial Cast Methods +syn keyword sqlFunction ST_CurvePolyToPoly +syn keyword sqlFunction ST_CurveToLine +syn keyword sqlFunction ST_ToCircular +syn keyword sqlFunction ST_ToCompound +syn keyword sqlFunction ST_ToCurve +syn keyword sqlFunction ST_ToCurvePoly +syn keyword sqlFunction ST_ToGeomColl +syn keyword sqlFunction ST_ToLineString +syn keyword sqlFunction ST_ToMultiCurve +syn keyword sqlFunction ST_ToMultiLine +syn keyword sqlFunction ST_ToMultiPoint +syn keyword sqlFunction ST_ToMultiPolygon +syn keyword sqlFunction ST_ToMultiSurface +syn keyword sqlFunction ST_ToPoint +syn keyword sqlFunction ST_ToPolygon +syn keyword sqlFunction ST_ToSurface + +" Array functions 16.x +syn keyword sqlFunction array array_agg array_max_cardinality trim_array +syn keyword sqlFunction error_line error_message error_procedure +syn keyword sqlFunction error_sqlcode error_sqlstate error_stack_trace + + +" keywords +syn keyword sqlKeyword absolute accent access account action active activate add address admin +syn keyword sqlKeyword aes_decrypt after aggregate algorithm allow_dup_row allow allowed alter +syn keyword sqlKeyword always and angular ansi_substring any as append apply +syn keyword sqlKeyword arbiter array asc ascii ase +syn keyword sqlKeyword assign at atan2 atomic attended +syn keyword sqlKeyword audit auditing authentication authorization axis +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 breaker bufferpool +syn keyword sqlKeyword build bulk by byte bytes cache calibrate calibration +syn keyword sqlKeyword cancel capability cardinality cascade cast +syn keyword sqlKeyword catalog catch ceil change changes char char_convert +syn keyword sqlKeyword check checkpointlog checksum class classes client cmp +syn keyword sqlKeyword cluster clustered collation +syn keyword sqlKeyword column columns +syn keyword sqlKeyword command comments committed commitid 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 +syn keyword sqlKeyword convert coordinate coordinator copy count count_set_bits +syn keyword sqlKeyword crc createtime critical cross cube cume_dist +syn keyword sqlKeyword current cursor data data database +syn keyword sqlKeyword current_timestamp current_user cycle +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 deterministic directory +syn keyword sqlKeyword disable disabled disallow distinct disksandbox disk_sandbox +syn keyword sqlKeyword dn do domain download duplicate +syn keyword sqlKeyword dsetpass dttm dynamic each earth editproc effective ejb +syn keyword sqlKeyword elimination ellipsoid else elseif +syn keyword sqlKeyword email empty enable encapsulated encrypted encryption end +syn keyword sqlKeyword encoding endif engine environment erase error errors escape escapes event +syn keyword sqlKeyword event_parameter every 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 feature fieldproc file files filler +syn keyword sqlKeyword fillfactor final finish first first_keyword first_value +syn keyword sqlKeyword flattening +syn keyword sqlKeyword following force foreign format forjson forxml forxml_sep fp frame +syn keyword sqlKeyword free freepage french fresh full function +syn keyword sqlKeyword gb generic get_bit go global grid +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 increment incremental +syn keyword sqlKeyword index index_enabled index_lparen indexonly info information +syn keyword sqlKeyword inheritance inline inner inout insensitive inserting +syn keyword sqlKeyword instead +syn keyword sqlKeyword internal intersection into introduced inverse invoker +syn keyword sqlKeyword iq is isolation +syn keyword sqlKeyword jar java java_location java_main_userid java_vm_options +syn keyword sqlKeyword jconnect jdk join json kb key keys keep language last +syn keyword sqlKeyword last_keyword last_value lateral latitude +syn keyword sqlKeyword ld ldap left len linear lf ln level like +syn keyword sqlKeyword limit local location log +syn keyword sqlKeyword logging logical login logscan long longitude low lru ls +syn keyword sqlKeyword main major manage manual mark master +syn keyword sqlKeyword match matched materialized max maxvalue maximum mb measure median membership +syn keyword sqlKeyword merge metadata methods migrate minimum minor minutes minvalue mirror +syn keyword sqlKeyword mode modify monitor move mru multiplex +syn keyword sqlKeyword name named namespaces national native natural new next nextval +syn keyword sqlKeyword ngram no noholdlock nolock nonclustered none normal not +syn keyword sqlKeyword notify null nullable_constant nulls +syn keyword sqlKeyword object objects oem_string of off offline offset olap +syn keyword sqlKeyword old on online only openstring operator +syn keyword sqlKeyword optimization optimizer option +syn keyword sqlKeyword or order ordinality organization others out outer over owner +syn keyword sqlKeyword package packetsize padding page pages +syn keyword sqlKeyword paglock parallel parameter parent part partial +syn keyword sqlKeyword partition partitions partner password path pctfree +syn keyword sqlKeyword permissions perms plan planar policy polygon populate port postfilter preceding +syn keyword sqlKeyword precisionprefetch prefilter prefix preserve preview previous +syn keyword sqlKeyword primary prior priority priqty private privilege privileges procedure profile profiling +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 regex regexp regexp_substr relative relocate +syn keyword sqlKeyword rename repeatable repeatableread replicate replication +syn keyword sqlKeyword requests request_timeout required rereceive resend reserve reset +syn keyword sqlKeyword resizing resolve resource respect restart +syn keyword sqlKeyword restrict result retain retries +syn keyword sqlKeyword returns reverse right role roles +syn keyword sqlKeyword rollup root row row_number rowlock rows rowtype +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 sa_file_free_pages sa_internal_type_from_catalog sa_internal_valid_hash +syn keyword sqlKeyword sa_internal_validate_value sa_json_element +syn keyword sqlKeyword scale schedule schema scope script scripted scroll search seconds secqty security +syn keyword sqlKeyword semi send sensitive sent sequence serializable +syn keyword sqlKeyword server severity session set_bit set_bits sets +syn keyword sqlKeyword shapefile share side simple since site size skip +syn keyword sqlKeyword snap snapshot soapheader soap_header +syn keyword sqlKeyword spatial split some sorted_data +syn keyword sqlKeyword sql sqlcode sqlid sqlflagger sqlstate sqrt square +syn keyword sqlKeyword stacker stale state statement statistics status stddev_pop stddev_samp +syn keyword sqlKeyword stemmer stogroup stoplist storage store +syn keyword sqlKeyword strip stripesizekb striping subpages subscribe subscription +syn keyword sqlKeyword subtransaction suser_id suser_name suspend synchronization +syn keyword sqlKeyword syntax_error table tables tablock +syn keyword sqlKeyword tablockx target tb temp template temporary term then ties +syn keyword sqlKeyword timezone timeout tls to to_char to_nchar tolerance top +syn keyword sqlKeyword trace traced_plan tracing +syn keyword sqlKeyword transfer transform transaction transactional treat tries +syn keyword sqlKeyword true try tsequal type tune uncommitted unconditionally +syn keyword sqlKeyword unenforced unicode unique unistr unit unknown unlimited unload +syn keyword sqlKeyword unpartition unquiesce updatetime updating updlock upgrade upload +syn keyword sqlKeyword upper usage 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 verbosity +syn keyword sqlKeyword verify versions view virtual wait +syn keyword sqlKeyword warning wd web when where 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 +syn keyword sqlKeyword war xml zeros zone +" XML +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 certificates clientport proxy trusted_certificates_file +" 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 + +" Login Mode Options +syn keyword sqlKeywordLogin standard integrated kerberos LDAPUA +syn keyword sqlKeywordLogin cloudadmin mixed + +" Spatial Predicates +syn keyword sqlKeyword ST_Contains +syn keyword sqlKeyword ST_ContainsFilter +syn keyword sqlKeyword ST_CoveredBy +syn keyword sqlKeyword ST_CoveredByFilter +syn keyword sqlKeyword ST_Covers +syn keyword sqlKeyword ST_CoversFilter +syn keyword sqlKeyword ST_Crosses +syn keyword sqlKeyword ST_Disjoint +syn keyword sqlKeyword ST_Equals +syn keyword sqlKeyword ST_EqualsFilter +syn keyword sqlKeyword ST_Intersects +syn keyword sqlKeyword ST_IntersectsFilter +syn keyword sqlKeyword ST_IntersectsRect +syn keyword sqlKeyword ST_OrderingEquals +syn keyword sqlKeyword ST_Overlaps +syn keyword sqlKeyword ST_Relate +syn keyword sqlKeyword ST_Touches +syn keyword sqlKeyword ST_Within +syn keyword sqlKeyword ST_WithinFilter +" Spatial Set operations +syn keyword sqlKeyword ST_Affine +syn keyword sqlKeyword ST_Boundary +syn keyword sqlKeyword ST_Buffer +syn keyword sqlKeyword ST_ConvexHull +syn keyword sqlKeyword ST_ConvexHullAggr +syn keyword sqlKeyword ST_Difference +syn keyword sqlKeyword ST_Intersection +syn keyword sqlKeyword ST_IntersectionAggr +syn keyword sqlKeyword ST_SymDifference +syn keyword sqlKeyword ST_Union +syn keyword sqlKeyword ST_UnionAggr +" Spatial Bounds +syn keyword sqlKeyword ST_Envelope +syn keyword sqlKeyword ST_EnvelopeAggr +syn keyword sqlKeyword ST_Lat +syn keyword sqlKeyword ST_LatMax +syn keyword sqlKeyword ST_LatMin +syn keyword sqlKeyword ST_Long +syn keyword sqlKeyword ST_LongMax +syn keyword sqlKeyword ST_LongMin +syn keyword sqlKeyword ST_M +syn keyword sqlKeyword ST_MMax +syn keyword sqlKeyword ST_MMin +syn keyword sqlKeyword ST_Point +syn keyword sqlKeyword ST_X +syn keyword sqlKeyword ST_XMax +syn keyword sqlKeyword ST_XMin +syn keyword sqlKeyword ST_Y +syn keyword sqlKeyword ST_YMax +syn keyword sqlKeyword ST_YMin +syn keyword sqlKeyword ST_Z +syn keyword sqlKeyword ST_ZMax +syn keyword sqlKeyword ST_ZMin +" Spatial Collection Aggregates +syn keyword sqlKeyword ST_GeomCollectionAggr +syn keyword sqlKeyword ST_LineStringAggr +syn keyword sqlKeyword ST_MultiCurveAggr +syn keyword sqlKeyword ST_MultiLineStringAggr +syn keyword sqlKeyword ST_MultiPointAggr +syn keyword sqlKeyword ST_MultiPolygonAggr +syn keyword sqlKeyword ST_MultiSurfaceAggr +syn keyword sqlKeyword ST_Perimeter +syn keyword sqlKeyword ST_PointOnSurface +" Spatial SRS +syn keyword sqlKeyword ST_CompareWKT +syn keyword sqlKeyword ST_FormatWKT +syn keyword sqlKeyword ST_ParseWKT +syn keyword sqlKeyword ST_TransformGeom +syn keyword sqlKeyword ST_GeometryTypeFromBaseType +syn keyword sqlKeyword ST_SnapToGrid +syn keyword sqlKeyword ST_Transform +syn keyword sqlKeyword ST_SRID +syn keyword sqlKeyword ST_SRIDFromBaseType +syn keyword sqlKeyword ST_LoadConfigurationData +" Spatial Indexes +syn keyword sqlKeyword ST_LinearHash +syn keyword sqlKeyword ST_LinearUnHash + +syn keyword sqlOperator in any some all between exists +syn keyword sqlOperator like escape not is and or +syn keyword sqlOperator minus +syn keyword sqlOperator prior distinct unnest + +syn keyword sqlStatement allocate alter attach backup begin break call case catch +syn keyword sqlStatement checkpoint clear close comment commit configure connect +syn keyword sqlStatement continue create deallocate declare delete describe +syn keyword sqlStatement detach disconnect drop except execute exit explain fetch +syn keyword sqlStatement for forward from get goto grant help if include +syn keyword sqlStatement input insert install intersect leave load lock loop +syn keyword sqlStatement message open output parameters passthrough +syn keyword sqlStatement prepare print put raiserror read readtext refresh release +syn keyword sqlStatement remote remove reorganize resignal restore resume +syn keyword sqlStatement return revoke rollback save savepoint select +syn keyword sqlStatement set setuser signal start stop synchronize +syn keyword sqlStatement system trigger truncate try union unload update +syn keyword sqlStatement validate waitfor whenever while window writetext + + +syn keyword sqlType char nchar long varchar nvarchar text ntext uniqueidentifierstr xml +syn keyword sqlType bigint bit decimal double varbit +syn keyword sqlType float int integer numeric +syn keyword sqlType smallint tinyint real +syn keyword sqlType money smallmoney +syn keyword sqlType date datetime datetimeoffset smalldatetime time timestamp +syn keyword sqlType binary image varray varbinary uniqueidentifier +syn keyword sqlType unsigned +" Spatial types +syn keyword sqlType st_geometry st_point st_curve st_surface st_geomcollection +syn keyword sqlType st_linestring st_circularstring st_compoundcurve +syn keyword sqlType st_curvepolygon st_polygon +syn keyword sqlType st_multipoint st_multicurve st_multisurface +syn keyword sqlType st_multilinestring st_multipolygon + +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 Auto_commit_on_create_local_temp_index +syn keyword sqlOption Background_priority +syn keyword sqlOption Blocking +syn keyword sqlOption Blocking_others_timeout +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 db_publisher +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 Divide_by_zero_error +syn keyword sqlOption Escape_character +syn keyword sqlOption Exclude_operators +syn keyword sqlOption Extended_join_syntax +syn keyword sqlOption Extern_login_credentials +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 Http_connection_pool_basesize +syn keyword sqlOption Http_connection_pool_timeout +syn keyword sqlOption Integrated_server_name +syn keyword sqlOption Isolation_level +syn keyword sqlOption Java_class_path +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 Min_role_admins +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 Progress_messages +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 Reserved_keywords +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 st_geometry_asbinary_format +syn keyword sqlOption st_geometry_astext_format +syn keyword sqlOption st_geometry_asxml_format +syn keyword sqlOption st_geometry_describe_type +syn keyword sqlOption st_geometry_interpolation +syn keyword sqlOption st_geometry_on_invalid +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 Timestamp_with_time_zone_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 Uuid_has_hyphens +syn keyword sqlOption Verify_password_function +syn keyword sqlOption Wait_for_commit +syn keyword sqlOption Webservice_namespace_host +syn keyword sqlOption Webservice_sessionid_name + +" 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 + +hi def link sqlDashComment Comment +hi def link sqlSlashComment Comment +hi def link sqlMultiComment Comment +hi def link sqlNumber Number +hi def link sqlOperator Operator +hi def link sqlSpecial Special +hi def link sqlKeyword Keyword +hi def link sqlStatement Statement +hi def link sqlString String +hi def link sqlType Type +hi def link sqlFunction Function +hi def link sqlOption PreProc + +let b:current_syntax = "sqlanywhere" + +" vim:sw=4: diff --git a/runtime/syntax/sqlforms.vim b/runtime/syntax/sqlforms.vim new file mode 100644 index 0000000000..055b2ae870 --- /dev/null +++ b/runtime/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/runtime/syntax/sqlhana.vim b/runtime/syntax/sqlhana.vim new file mode 100644 index 0000000000..1410e99eb4 --- /dev/null +++ b/runtime/syntax/sqlhana.vim @@ -0,0 +1,293 @@ +" Vim syntax file +" Language: SQL, SAP HANA In Memory Database +" Maintainer: David Fishburn +" Last Change: 2012 Oct 23 +" Version: SP4 b (Q2 2012) +" Homepage: http://www.vim.org/scripts/script.php?script_id=4275 + +" Description: Updated to SAP HANA SP4 +" +" 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. +" These were pulled from the following SQL reference: +" http://help.sap.com/hana/hana_sql_en.pdf +" An easy approach is to copy all text from the PDF +" into a Vim buffer. The keywords are in UPPER case, +" so you can run the following commands to be left with +" mainly the UPPER case words: +" 1. Delete all words that do not begin with a Capital +" %s/\(\<[^A-Z]\w*\>\)//g +" 2. Remove all words where the 2nd letter is not a Capital +" %s/\(\<[A-Z][^A-Z]\w*\>\)//g +" 3. Remove all non-word (or space) characters +" %s/[^0-9A-Za-z_ ]*//g +" 4. Remove some known words +" %s/\<\(SAP\|HANA\|OK\|AG\|IBM\|DB2\|AIX\|POWER\d\+\|UNIX\)\>//g +" 5. Remove blank lines and trailing spaces +" %s/\s\+$//g +" %s/^\s\+//g +" %s/^$\n//g +" 6. Convert spaces to newlines remove single character +" %s/[ ]\+/\r/g +" %g/^\w$/d +" 7. Sort and remove duplicates +" :sort +" :Uniq +" 8. Use the WhatsMissing plugin against the sqlhana.vim file. +" 9. Generated a file of all UPPER cased words which should not +" be in the syntax file. These items should be removed +" from the list in step 7. You can use WhatsNotMissing +" between step 7 and this new file to weed out the words +" we know are not syntax related. +" 10. Use the WhatsMissingRemoveMatches to remove the words +" from step 9. + +syn keyword sqlSpecial false null true + +" Supported Functions for Date/Time types +syn keyword sqlFunction ADD_DAYS ADD_MONTHS ADD_SECONDS ADD_YEARS COALESCE +syn keyword sqlFunction CURRENT_DATE CURRENT_TIME CURRENT_TIMESTAMP CURRENT_UTCDATE +syn keyword sqlFunction CURRENT_UTCTIME CURRENT_UTCTIMESTAMP +syn keyword sqlFunction DAYNAME DAYOFMONTH DAYOFYEAR DAYS_BETWEEN EXTRACT +syn keyword sqlFunction GREATEST HOUR IFNULL ISOWEEK LAST_DAY LEAST LOCALTOUTC +syn keyword sqlFunction MINUTE MONTH MONTHNAME NEXT_DAY NOW QUARTER SECOND +syn keyword sqlFunction SECONDS_BETWEEN UTCTOLOCAL WEEK WEEKDAY YEAR + +syn keyword sqlFunction TO_CHAR TO_DATE TO_DATS TO_NCHAR TO_TIME TO_TIMESTAMP UTCTOLOCAL + +" Aggregate +syn keyword sqlFunction COUNT MIN MAX SUM AVG STDDEV VAR + +" Datatype conversion +syn keyword sqlFunction CAST TO_ALPHANUM TO_BIGINT TO_BINARY TO_BLOB TO_CHAR TO_CLOB +syn keyword sqlFunction TO_DATE TO_DATS TO_DECIMAL TO_DOUBLE TO_INT TO_INTEGER TO_NCHAR +syn keyword sqlFunction TO_NCLOB TO_NVARCHAR TO_REAL TO_SECONDDATE TO_SMALLDECIMAL +syn keyword sqlFunction TO_SMALLINT TO_TIME TO_TIMESTAMP TO_TINYINT TO_VARCHAR TO_VARBINARY + +" Number functions +syn keyword sqlFunction ABS ACOS ASIN ATAN ATAN2 BINTOHEX BITAND CEIL COS COSH COT +syn keyword sqlFunction EXP FLOOR GREATEST HEXTOBIN LEAST LN LOG MOD POWER ROUND +syn keyword sqlFunction SIGN SIN SINH SQRT TAN TANH UMINUS + +" String functions +syn keyword sqlFunction ASCII CHAR CONCAT LCASE LENGTH LOCATE LOWER LPAD LTRIM +syn keyword sqlFunction NCHAR REPLACE RPAD RTRIM SUBSTR_AFTER SUBSTR_BEFORE +syn keyword sqlFunction SUBSTRING TRIM UCASE UNICODE UPPER + +" Miscellaneous functions +syn keyword sqlFunction COALESCE CURRENT_CONNECTION CURRENT_SCHEMA CURRENT_USER +syn keyword sqlFunction GROUPING_ID IFNULL MAP NULLIF SESSION_CONTEXT SESSION_USER SYSUUIDSQL +syn keyword sqlFunction GET_NUM_SERVERS + + +" sp_ procedures +" syn keyword sqlFunction sp_addalias + + +" Reserved keywords +syn keyword sqlkeyword ALL AS AT BEFORE +syn keyword sqlkeyword BEGIN BOTH BY +syn keyword sqlkeyword CONDITION +syn keyword sqlkeyword CURRVAL CURSOR DECLARE +syn keyword sqlkeyword DISTINCT DO ELSE ELSEIF ELSIF +syn keyword sqlkeyword END EXCEPTION EXEC +syn keyword sqlkeyword FOR FROM GROUP +syn keyword sqlkeyword HAVING IN +syn keyword sqlkeyword INOUT INTO IS +syn keyword sqlkeyword LEADING +syn keyword sqlkeyword LOOP MINUS NATURAL NEXTVAL +syn keyword sqlkeyword OF ON ORDER OUT +syn keyword sqlkeyword PRIOR RETURN RETURNS REVERSE +syn keyword sqlkeyword ROWID SELECT +syn keyword sqlkeyword SQL START STOP SYSDATE +syn keyword sqlkeyword SYSTIME SYSTIMESTAMP SYSUUID +syn keyword sqlkeyword TRAILING USING UTCDATE +syn keyword sqlkeyword UTCTIME UTCTIMESTAMP VALUES +syn keyword sqlkeyword WHILE +syn keyword sqlkeyword ANY SOME EXISTS ESCAPE + +" IF keywords +syn keyword sqlkeyword IF + +" CASE keywords +syn keyword sqlKeyword WHEN THEN + +" Syntax rules common to TEXT and SHORTTEXT keywords +syn keyword sqlKeyword LANGUAGE DETECTION LINGUISTIC +syn keyword sqlkeyword MIME TYPE +syn keyword sqlkeyword EXACT WEIGHT FUZZY FUZZINESSTHRESHOLD SEARCH +syn keyword sqlkeyword PHRASE INDEX RATIO REBUILD +syn keyword sqlkeyword CONFIGURATION +syn keyword sqlkeyword SEARCH ONLY +syn keyword sqlkeyword FAST PREPROCESS +syn keyword sqlkeyword SYNC SYNCHRONOUS ASYNC ASYNCHRONOUS FLUSH QUEUE +syn keyword sqlkeyword EVERY AFTER MINUTES DOCUMENTS SUSPEND + +" Statement keywords (i.e. after ALTER or CREATE) +syn keyword sqlkeyword AUDIT POLICY +syn keyword sqlkeyword FULLTEXT +syn keyword sqlkeyword SEQUENCE RESTART +syn keyword sqlkeyword TABLE +syn keyword sqlkeyword PROCEDURE STATISTICS +syn keyword sqlkeyword SCHEMA +syn keyword sqlkeyword SYNONYM +syn keyword sqlkeyword VIEW +syn keyword sqlkeyword COLUMN +syn keyword sqlkeyword SYSTEM LICENSE +syn keyword sqlkeyword SESSION +syn keyword sqlkeyword CANCEL WORK +syn keyword sqlkeyword PLAN CACHE +syn keyword sqlkeyword LOGGING NOLOGGING RETENTION +syn keyword sqlkeyword RECONFIGURE SERVICE +syn keyword sqlkeyword RESET MONITORING +syn keyword sqlkeyword SAVE DURATION PERFTRACE FUNCTION_PROFILER +syn keyword sqlkeyword SAVEPOINT +syn keyword sqlkeyword USER +syn keyword sqlkeyword ROLE +syn keyword sqlkeyword ASC DESC +syn keyword sqlkeyword OWNED +syn keyword sqlkeyword DEPENDENCIES SCRAMBLE + +" Create sequence +syn keyword sqlkeyword INCREMENT MAXVALUE MINVALUE CYCLE + +" Create table +syn keyword sqlkeyword HISTORY GLOBAL LOCAL TEMPORARY + +" Create trigger +syn keyword sqlkeyword TRIGGER REFERENCING EACH DEFAULT +syn keyword sqlkeyword SIGNAL RESIGNAL MESSAGE_TEXT OLD NEW +syn keyword sqlkeyword EXIT HANDLER SQL_ERROR_CODE +syn keyword sqlkeyword TARGET CONDITION SIGNAL + +" Alter table +syn keyword sqlkeyword ADD DROP MODIFY GENERATED ALWAYS +syn keyword sqlkeyword UNIQUE BTREE CPBTREE PRIMARY KEY +syn keyword sqlkeyword CONSTRAINT PRELOAD NONE +syn keyword sqlkeyword ROW THREADS BATCH +syn keyword sqlkeyword MOVE PARTITION TO LOCATION PHYSICAL OTHERS +syn keyword sqlkeyword ROUNDROBIN PARTITIONS HASH RANGE VALUE +syn keyword sqlkeyword PERSISTENT DELTA AUTO AUTOMERGE + +" Create audit policy +syn keyword sqlkeyword AUDITING SUCCESSFUL UNSUCCESSFUL +syn keyword sqlkeyword PRIVILEGE STRUCTURED CHANGE LEVEL +syn keyword sqlkeyword EMERGENCY ALERT CRITICAL WARNING INFO + +" Privileges +syn keyword sqlkeyword DEBUG EXECUTE + +" Schema +syn keyword sqlkeyword CASCADE RESTRICT PARAMETERS SCAN + +" Traces +syn keyword sqlkeyword CLIENT CRASHDUMP EMERGENCYDUMP +syn keyword sqlkeyword INDEXSERVER NAMESERVER DAEMON +syn keyword sqlkeyword CLEAR REMOVE TRACES + +" Reclaim +syn keyword sqlkeyword RECLAIM DATA VOLUME VERSION SPACE DEFRAGMENT SPARSIFY + +" Join +syn keyword sqlkeyword INNER OUTER LEFT RIGHT FULL CROSS JOIN +syn keyword sqlkeyword GROUPING SETS ROLLUP CUBE +syn keyword sqlkeyword BEST LIMIT OFFSET +syn keyword sqlkeyword WITH SUBTOTAL BALANCE TOTAL +syn keyword sqlkeyword TEXT_FILTER FILL UP SORT MATCHES TOP +syn keyword sqlkeyword RESULT OVERVIEW PREFIX MULTIPLE RESULTSETS + +" Lock +syn keyword sqlkeyword EXCLUSIVE MODE NOWAIT + +" Transaction +syn keyword sqlkeyword TRANSACTION ISOLATION READ COMMITTED +syn keyword sqlkeyword REPEATABLE SERIALIZABLE WRITE + +" Saml +syn keyword sqlkeyword SAML ASSERTION PROVIDER SUBJECT ISSUER + +" User +syn keyword sqlkeyword PASSWORD IDENTIFIED EXTERNALLY ATTEMPTS ATTEMPTS +syn keyword sqlkeyword ENABLE DISABLE OFF LIFETIME FORCE DEACTIVATE +syn keyword sqlkeyword ACTIVATE IDENTITY KERBEROS + +" Grant +syn keyword sqlkeyword ADMIN BACKUP CATALOG SCENARIO INIFILE MONITOR +syn keyword sqlkeyword OPTIMIZER OPTION +syn keyword sqlkeyword RESOURCE STRUCTUREDPRIVILEGE TRACE + +" Import +syn keyword sqlkeyword CSV FILE CONTROL NO CHECK SKIP FIRST LIST +syn keyword sqlkeyword RECORD DELIMITED FIELD OPTIONALLY ENCLOSED FORMAT + +" Roles +syn keyword sqlkeyword PUBLIC CONTENT_ADMIN MODELING MONITORING + +" Miscellaneous +syn keyword sqlkeyword APPLICATION BINARY IMMEDIATE COREFILE SECURITY DEFINER +syn keyword sqlkeyword DUMMY INVOKER MATERIALIZED MESSEGE_TEXT PARAMETER PARAMETERS +syn keyword sqlkeyword PART +syn keyword sqlkeyword CONSTANT SQLEXCEPTION SQLWARNING + +syn keyword sqlOperator WHERE BETWEEN LIKE NULL CONTAINS +syn keyword sqlOperator AND OR NOT CASE +syn keyword sqlOperator UNION INTERSECT EXCEPT + +syn keyword sqlStatement ALTER CALL CALLS CREATE DROP RENAME TRUNCATE +syn keyword sqlStatement DELETE INSERT UPDATE EXPLAIN +syn keyword sqlStatement MERGE REPLACE UPSERT SELECT +syn keyword sqlStatement SET UNSET LOAD UNLOAD +syn keyword sqlStatement CONNECT DISCONNECT COMMIT LOCK ROLLBACK +syn keyword sqlStatement GRANT REVOKE +syn keyword sqlStatement EXPORT IMPORT + + +syn keyword sqlType DATE TIME SECONDDATE TIMESTAMP TINYINT SMALLINT +syn keyword sqlType INT INTEGER BIGINT SMALLDECIMAL DECIMAL +syn keyword sqlType REAL DOUBLE FLOAT +syn keyword sqlType VARCHAR NVARCHAR ALPHANUM SHORTTEXT VARBINARY +syn keyword sqlType BLOB CLOB NCLOB TEXT DAYDATE + +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 + +hi def link sqlDashComment Comment +hi def link sqlSlashComment Comment +hi def link sqlMultiComment Comment +hi def link sqlNumber Number +hi def link sqlOperator Operator +hi def link sqlSpecial Special +hi def link sqlKeyword Keyword +hi def link sqlStatement Statement +hi def link sqlString String +hi def link sqlType Type +hi def link sqlFunction Function +hi def link sqlOption PreProc + +let b:current_syntax = "sqlhana" + +" vim:sw=4: diff --git a/runtime/syntax/sqlinformix.vim b/runtime/syntax/sqlinformix.vim new file mode 100644 index 0000000000..b4d023600c --- /dev/null +++ b/runtime/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/runtime/syntax/sqlj.vim b/runtime/syntax/sqlj.vim new file mode 100644 index 0000000000..51398ef9c2 --- /dev/null +++ b/runtime/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/runtime/syntax/sqloracle.vim b/runtime/syntax/sqloracle.vim new file mode 100644 index 0000000000..f9a7c19e3b --- /dev/null +++ b/runtime/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/runtime/syntax/sqr.vim b/runtime/syntax/sqr.vim new file mode 100644 index 0000000000..8c9e7b49e4 --- /dev/null +++ b/runtime/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-connection +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-connection +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/runtime/syntax/squid.vim b/runtime/syntax/squid.vim new file mode 100644 index 0000000000..a8462bbdce --- /dev/null +++ b/runtime/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/runtime/syntax/sshconfig.vim b/runtime/syntax/sshconfig.vim new file mode 100644 index 0000000000..6d4de6c64e --- /dev/null +++ b/runtime/syntax/sshconfig.vim @@ -0,0 +1,219 @@ +" Vim syntax file +" Language: OpenSSH client configuration file (ssh_config) +" Author: David Necas (Yeti) +" Maintainer: Leonard Ehrenfried +" Last Change: 2012 Feb 24 +" SSH Version: 5.9p1 +" + +" 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 + + +" case on +syn case match + + +" Comments +syn match sshconfigComment "^#.*$" contains=sshconfigTodo +syn match sshconfigComment "\s#.*$" contains=sshconfigTodo + +syn keyword sshconfigTodo TODO FIXME NOTE contained + + +" Constants +syn keyword sshconfigYesNo yes no ask +syn keyword sshconfigYesNo any auto +syn keyword sshconfigYesNo force autoask none + +syn keyword sshconfigCipher 3des blowfish +syn keyword sshconfigCiphers aes128-cbc 3des-cbc blowfish blowfish-cbc cast128-cbc +syn keyword sshconfigCiphers aes192-cbc aes256-cbc aes128-ctr aes192-ctr aes256-ctr +syn keyword sshconfigCiphers arcfour arcfour128 arcfour256 cast128-cbc + +syn keyword sshconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96 +syn keyword sshconfigMAC hmac-md5-96 +syn keyword sshconfigMAC hmac-sha2-256 hmac-sha2-256-96 hmac-sha2-512 +syn keyword sshconfigMAC hmac-sha2-512-96 +syn match sshconfigMAC "\" + +syn keyword sshconfigHostKeyAlg ssh-rsa ssh-dss +syn match sshconfigHostKeyAlg "\" +syn match sshconfigHostKeyAlg "\" +syn match sshconfigHostKeyAlg "\" +syn match sshconfigHostKeyAlg "\" +syn match sshconfigHostKeyAlg "\" +syn match sshconfigHostKeyAlg "\" +syn match sshconfigHostKeyAlg "\" +syn keyword sshconfigHostKeyAlg ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521 + +syn keyword sshconfigPreferredAuth hostbased publickey password gssapi-with-mic +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 keyword sshconfigAddressFamily inet inet6 + +syn match sshconfigIPQoS "af1[1234]" +syn match sshconfigIPQoS "af2[23]" +syn match sshconfigIPQoS "af3[123]" +syn match sshconfigIPQoS "af4[123]" +syn match sshconfigIPQoS "cs[0-7]" +syn keyword sshconfigIPQoS ef lowdelay throughput reliability +syn keyword sshconfigKbdInteractive bsdauth pam skey + +syn keyword sshconfigKexAlgo ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 +syn keyword sshconfigKexAlgo diffie-hellman-group-exchange-sha256 +syn keyword sshconfigKexAlgo diffie-hellman-group-exchange-sha1 +syn keyword sshconfigKexAlgo diffie-hellman-group14-sha1 +syn keyword sshconfigKexAlgo diffie-hellman-group1-sha1 + +syn keyword sshconfigTunnel point-to-point ethernet + +syn match sshconfigVar "%[rhplLdun]\>" +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\+\>" +syn match sshconfigHostPort "\(Host \)\@<=.\+" +syn match sshconfigHostPort "\(HostName \)\@<=.\+" + +" case off +syn case ignore + + +" Keywords +syn keyword sshconfigHostSect Host + +syn keyword sshconfigKeyword AddressFamily +syn keyword sshconfigKeyword BatchMode +syn keyword sshconfigKeyword BindAddress +syn keyword sshconfigKeyword ChallengeResponseAuthentication +syn keyword sshconfigKeyword CheckHostIP +syn keyword sshconfigKeyword Cipher +syn keyword sshconfigKeyword Ciphers +syn keyword sshconfigKeyword ClearAllForwardings +syn keyword sshconfigKeyword Compression +syn keyword sshconfigKeyword CompressionLevel +syn keyword sshconfigKeyword ConnectTimeout +syn keyword sshconfigKeyword ConnectionAttempts +syn keyword sshconfigKeyword ControlMaster +syn keyword sshconfigKeyword ControlPath +syn keyword sshconfigKeyword ControlPersist +syn keyword sshconfigKeyword DynamicForward +syn keyword sshconfigKeyword EnableSSHKeysign +syn keyword sshconfigKeyword EscapeChar +syn keyword sshconfigKeyword ExitOnForwardFailure +syn keyword sshconfigKeyword ForwardAgent +syn keyword sshconfigKeyword ForwardX11 +syn keyword sshconfigKeyword ForwardX11Timeout +syn keyword sshconfigKeyword ForwardX11Trusted +syn keyword sshconfigKeyword GSSAPIAuthentication +syn keyword sshconfigKeyword GSSAPIClientIdentity +syn keyword sshconfigKeyword GSSAPIDelegateCredentials +syn keyword sshconfigKeyword GSSAPIKeyExchange +syn keyword sshconfigKeyword GSSAPIRenewalForcesRekey +syn keyword sshconfigKeyword GSSAPIServerIdentity +syn keyword sshconfigKeyword GSSAPITrustDNS +syn keyword sshconfigKeyword GSSAPITrustDns +syn keyword sshconfigKeyword GatewayPorts +syn keyword sshconfigKeyword GlobalKnownHostsFile +syn keyword sshconfigKeyword HashKnownHosts +syn keyword sshconfigKeyword HostKeyAlgorithms +syn keyword sshconfigKeyword HostKeyAlias +syn keyword sshconfigKeyword HostName +syn keyword sshconfigKeyword HostbasedAuthentication +syn keyword sshconfigKeyword IPQoS +syn keyword sshconfigKeyword IdentitiesOnly +syn keyword sshconfigKeyword IdentityFile +syn keyword sshconfigKeyword KbdInteractiveAuthentication +syn keyword sshconfigKeyword KbdInteractiveDevices +syn keyword sshconfigKeyword KexAlgorithms +syn keyword sshconfigKeyword LocalCommand +syn keyword sshconfigKeyword LocalForward +syn keyword sshconfigKeyword LogLevel +syn keyword sshconfigKeyword MACs +syn keyword sshconfigKeyword NoHostAuthenticationForLocalhost +syn keyword sshconfigKeyword NumberOfPasswordPrompts +syn keyword sshconfigKeyword PKCS11Provider +syn keyword sshconfigKeyword PasswordAuthentication +syn keyword sshconfigKeyword PermitLocalCommand +syn keyword sshconfigKeyword Port +syn keyword sshconfigKeyword PreferredAuthentications +syn keyword sshconfigKeyword Protocol +syn keyword sshconfigKeyword ProxyCommand +syn keyword sshconfigKeyword PubkeyAuthentication +syn keyword sshconfigKeyword RSAAuthentication +syn keyword sshconfigKeyword RekeyLimit +syn keyword sshconfigKeyword RemoteForward +syn keyword sshconfigKeyword RequestTTY +syn keyword sshconfigKeyword RhostsRSAAuthentication +syn keyword sshconfigKeyword SendEnv +syn keyword sshconfigKeyword ServerAliveCountMax +syn keyword sshconfigKeyword ServerAliveInterval +syn keyword sshconfigKeyword SmartcardDevice +syn keyword sshconfigKeyword StrictHostKeyChecking +syn keyword sshconfigKeyword TCPKeepAlive +syn keyword sshconfigKeyword Tunnel +syn keyword sshconfigKeyword TunnelDevice +syn keyword sshconfigKeyword UseBlacklistedKeys +syn keyword sshconfigKeyword UsePrivilegedPort +syn keyword sshconfigKeyword User +syn keyword sshconfigKeyword UserKnownHostsFile +syn keyword sshconfigKeyword VerifyHostKeyDNS +syn keyword sshconfigKeyword 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 sshconfigCiphers sshconfigEnum + HiLink sshconfigMAC sshconfigEnum + HiLink sshconfigHostKeyAlg sshconfigEnum + HiLink sshconfigLogLevel sshconfigEnum + HiLink sshconfigSysLogFacility sshconfigEnum + HiLink sshconfigAddressFamily sshconfigEnum + HiLink sshconfigIPQoS sshconfigEnum + HiLink sshconfigKbdInteractive sshconfigEnum + HiLink sshconfigKexAlgo sshconfigEnum + HiLink sshconfigTunnel 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" + +" vim:set ts=8 sw=2 sts=2: diff --git a/runtime/syntax/sshdconfig.vim b/runtime/syntax/sshdconfig.vim new file mode 100644 index 0000000000..53bc09de0d --- /dev/null +++ b/runtime/syntax/sshdconfig.vim @@ -0,0 +1,215 @@ +" Vim syntax file +" Language: OpenSSH server configuration file (sshd_config) +" Maintainer: David Necas (Yeti) +" Maintainer: Leonard Ehrenfried +" Modified By: Thilo Six +" Originally: 2009-07-09 +" Last Change: 2011 Oct 31 +" SSH Version: 5.9p1 +" + +" 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 + + +" case on +syn case match + + +" Comments +syn match sshdconfigComment "^#.*$" contains=sshdconfigTodo +syn match sshdconfigComment "\s#.*$" contains=sshdconfigTodo + +syn keyword sshdconfigTodo TODO FIXME NOTE 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 aes192-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 keyword sshdconfigMAC hmac-sha2-256 hmac-sha256-96 hmac-sha2-512 +syn keyword sshdconfigMAC hmac-sha2-512-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 keyword sshdconfigCompression delayed + +syn match sshdconfigIPQoS "af1[1234]" +syn match sshdconfigIPQoS "af2[23]" +syn match sshdconfigIPQoS "af3[123]" +syn match sshdconfigIPQoS "af4[123]" +syn match sshdconfigIPQoS "cs[0-7]" +syn keyword sshdconfigIPQoS ef lowdelay throughput reliability + +syn keyword sshdconfigKexAlgo ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 +syn keyword sshdconfigKexAlgo diffie-hellman-group-exchange-sha256 +syn keyword sshdconfigKexAlgo diffie-hellman-group-exchange-sha1 +syn keyword sshdconfigKexAlgo diffie-hellman-group14-sha1 +syn keyword sshdconfigKexAlgo diffie-hellman-group1-sha1 + +syn keyword sshdconfigTunnel point-to-point ethernet + +syn keyword sshdconfigSubsystem internal-sftp + +syn match sshdconfigVar "%[hu]\>" +syn match sshdconfigVar "%%" + +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]\)\+\>" + + +" case off +syn case ignore + + +" Keywords +syn keyword sshdconfigMatch Host User Group Address + +syn keyword sshdconfigKeyword AcceptEnv +syn keyword sshdconfigKeyword AddressFamily +syn keyword sshdconfigKeyword AllowAgentForwarding +syn keyword sshdconfigKeyword AllowGroups +syn keyword sshdconfigKeyword AllowTcpForwarding +syn keyword sshdconfigKeyword AllowUsers +syn keyword sshdconfigKeyword AuthorizedKeysFile +syn keyword sshdconfigKeyword AuthorizedPrincipalsFile +syn keyword sshdconfigKeyword Banner +syn keyword sshdconfigKeyword ChallengeResponseAuthentication +syn keyword sshdconfigKeyword ChrootDirectory +syn keyword sshdconfigKeyword Ciphers +syn keyword sshdconfigKeyword ClientAliveCountMax +syn keyword sshdconfigKeyword ClientAliveInterval +syn keyword sshdconfigKeyword Compression +syn keyword sshdconfigKeyword DebianBanner +syn keyword sshdconfigKeyword DenyGroups +syn keyword sshdconfigKeyword DenyUsers +syn keyword sshdconfigKeyword ForceCommand +syn keyword sshdconfigKeyword GSSAPIAuthentication +syn keyword sshdconfigKeyword GSSAPICleanupCredentials +syn keyword sshdconfigKeyword GSSAPIKeyExchange +syn keyword sshdconfigKeyword GSSAPIStoreCredentialsOnRekey +syn keyword sshdconfigKeyword GSSAPIStrictAcceptorCheck +syn keyword sshdconfigKeyword GatewayPorts +syn keyword sshdconfigKeyword HostCertificate +syn keyword sshdconfigKeyword HostKey +syn keyword sshdconfigKeyword HostbasedAuthentication +syn keyword sshdconfigKeyword HostbasedUsesNameFromPacketOnly +syn keyword sshdconfigKeyword IPQoS +syn keyword sshdconfigKeyword IgnoreRhosts +syn keyword sshdconfigKeyword IgnoreUserKnownHosts +syn keyword sshdconfigKeyword KbdInteractiveAuthentication +syn keyword sshdconfigKeyword KerberosAuthentication +syn keyword sshdconfigKeyword KerberosGetAFSToken +syn keyword sshdconfigKeyword KerberosOrLocalPasswd +syn keyword sshdconfigKeyword KerberosTicketCleanup +syn keyword sshdconfigKeyword KexAlgorithms +syn keyword sshdconfigKeyword KeyRegenerationInterval +syn keyword sshdconfigKeyword ListenAddress +syn keyword sshdconfigKeyword LogLevel +syn keyword sshdconfigKeyword LoginGraceTime +syn keyword sshdconfigKeyword MACs +syn keyword sshdconfigKeyword Match +syn keyword sshdconfigKeyword MaxAuthTries +syn keyword sshdconfigKeyword MaxSessions +syn keyword sshdconfigKeyword MaxStartups +syn keyword sshdconfigKeyword PasswordAuthentication +syn keyword sshdconfigKeyword PermitBlacklistedKeys +syn keyword sshdconfigKeyword PermitEmptyPasswords +syn keyword sshdconfigKeyword PermitOpen +syn keyword sshdconfigKeyword PermitRootLogin +syn keyword sshdconfigKeyword PermitTunnel +syn keyword sshdconfigKeyword PermitUserEnvironment +syn keyword sshdconfigKeyword PidFile +syn keyword sshdconfigKeyword Port +syn keyword sshdconfigKeyword PrintLastLog +syn keyword sshdconfigKeyword PrintMotd +syn keyword sshdconfigKeyword Protocol +syn keyword sshdconfigKeyword PubkeyAuthentication +syn keyword sshdconfigKeyword RSAAuthentication +syn keyword sshdconfigKeyword RevokedKeys +syn keyword sshdconfigKeyword RhostsRSAAuthentication +syn keyword sshdconfigKeyword ServerKeyBits +syn keyword sshdconfigKeyword ShowPatchLevel +syn keyword sshdconfigKeyword StrictModes +syn keyword sshdconfigKeyword Subsystem +syn keyword sshdconfigKeyword SyslogFacility +syn keyword sshdconfigKeyword TCPKeepAlive +syn keyword sshdconfigKeyword TrustedUserCAKeys +syn keyword sshdconfigKeyword UseDNS +syn keyword sshdconfigKeyword UseLogin +syn keyword sshdconfigKeyword UsePAM +syn keyword sshdconfigKeyword UsePrivilegeSeparation +syn keyword sshdconfigKeyword X11DisplayOffset +syn keyword sshdconfigKeyword X11Forwarding +syn keyword sshdconfigKeyword X11UseLocalhost +syn keyword sshdconfigKeyword 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 sshdconfigVar sshdconfigEnum + HiLink sshdconfigCompression sshdconfigEnum + HiLink sshdconfigIPQoS sshdconfigEnum + HiLink sshdconfigKexAlgo sshdconfigEnum + HiLink sshdconfigTunnel sshdconfigEnum + HiLink sshdconfigSubsystem sshdconfigEnum + HiLink sshdconfigEnum Function + HiLink sshdconfigSpecial Special + HiLink sshdconfigKeyword Keyword + HiLink sshdconfigMatch Type + delcommand HiLink +endif + +let b:current_syntax = "sshdconfig" + +" vim:set ts=8 sw=2 sts=2: diff --git a/runtime/syntax/st.vim b/runtime/syntax/st.vim new file mode 100644 index 0000000000..47aa07de5d --- /dev/null +++ b/runtime/syntax/st.vim @@ -0,0 +1,108 @@ +" Vim syntax file +" Language: Smalltalk +" Maintainer: Arndt Hesse +" Last Change: 2012 Feb 12 by Thilo Six + +" 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&vim + +" 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" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/stata.vim b/runtime/syntax/stata.vim new file mode 100644 index 0000000000..e1f19c84fc --- /dev/null +++ b/runtime/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/runtime/syntax/strace.vim b/runtime/syntax/strace.vim new file mode 100644 index 0000000000..80cd262efc --- /dev/null +++ b/runtime/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/runtime/syntax/sudoers.vim b/runtime/syntax/sudoers.vim new file mode 100644 index 0000000000..fffc1cf8bb --- /dev/null +++ b/runtime/syntax/sudoers.vim @@ -0,0 +1,342 @@ +" Vim syntax file +" Language: sudoers(5) configuration files +" Maintainer: Nikolai Weibull +" Latest Revision: 2011-02-24 + +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 skipwhite skipnl + \ always_set_home + \ authenticate + \ closefrom_override + \ env_editor + \ env_reset + \ fqdn + \ ignore_dot + \ ignore_local_sudoers + \ insults + \ log_host + \ log_year + \ long_otp_prompt + \ mail_always + \ mail_badpass + \ mail_no_host + \ mail_no_perms + \ mail_no_user + \ noexec + \ path_info + \ passprompt_override + \ preserve_groups + \ requiretty + \ root_sudo + \ rootpw + \ runaspw + \ set_home + \ set_logname + \ setenv + \ shell_noargs + \ stay_setuid + \ targetpw + \ tty_tickets + \ visiblepw + +syn keyword sudoersIntegerParameter contained + \ nextgroup=sudoersIntegerParameterEquals + \ skipwhite skipnl + \ closefrom + \ passwd_tries + \ loglinelen + \ passwd_timeout + \ timestamp_timeout + \ umask + +syn keyword sudoersStringParameter contained + \ nextgroup=sudoersStringParameterEquals + \ skipwhite skipnl + \ badpass_message + \ editor + \ mailsub + \ noexec_file + \ passprompt + \ runas_default + \ syslog_badpri + \ syslog_goodpri + \ sudoers_locale + \ timestampdir + \ timestampowner + \ askpass + \ env_file + \ exempt_group + \ lecture + \ lecture_file + \ listpw + \ logfile + \ mailerflags + \ mailerpath + \ mailfrom + \ mailto + \ secure_path + \ syslog + \ verifypw + +syn keyword sudoersListParameter contained + \ nextgroup=sudoersListParameterEquals + \ skipwhite skipnl + \ env_check + \ env_delete + \ env_keep + +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/runtime/syntax/svg.vim b/runtime/syntax/svg.vim new file mode 100644 index 0000000000..819b5ec987 --- /dev/null +++ b/runtime/syntax/svg.vim @@ -0,0 +1,15 @@ +" Vim syntax file +" Language: SVG (Scalable Vector Graphics) +" Maintainer: Vincent Berthoux +" File Types: .svg (used in Web and vector programs) +" +" Directly call the xml syntax, because SVG is an XML +" dialect. But as some plugins base their effect on filetype, +" providing a distinct filetype from xml is better. + +if exists("b:current_syntax") + finish +endif + +runtime! syntax/xml.vim +let b:current_syntax = "svg" diff --git a/runtime/syntax/svn.vim b/runtime/syntax/svn.vim new file mode 100644 index 0000000000..6536d6d11c --- /dev/null +++ b/runtime/syntax/svn.vim @@ -0,0 +1,69 @@ +" Vim syntax file +" Language: Subversion (svn) commit file +" Maintainer: Dmitry Vasiliev +" URL: https://github.com/hdima/vim-scripts/blob/master/syntax/svn.vim +" Last Change: 2013-11-08 +" Filenames: svn-commit*.tmp +" Version: 1.10 + +" Contributors: +" +" List of the contributors in alphabetical order: +" +" A. S. Budden +" Ingo Karkat +" Myk Taylor +" Stefano Zacchiroli + +" 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 spell toplevel + +syn match svnFirstLine "\%^.*" nextgroup=svnRegion,svnBlank skipnl +syn match svnSummary "^.\{0,50\}" contained containedin=svnFirstLine nextgroup=svnOverflow contains=@Spell +syn match svnOverflow ".*" contained contains=@Spell +syn match svnBlank "^.*" contained contains=@Spell + +syn region svnRegion end="\%$" matchgroup=svnDelimiter start="^--.*--$" contains=svnRemoved,svnRenamed,svnAdded,svnModified,svnProperty,@NoSpell +syn match svnRemoved "^D .*$" contained contains=@NoSpell +syn match svnRenamed "^R[ M][ U][ +] .*$" contained contains=@NoSpell +syn match svnAdded "^A[ M][ U][ +] .*$" contained contains=@NoSpell +syn match svnModified "^M[ M][ U] .*$" contained contains=@NoSpell +syn match svnProperty "^_M[ U] .*$" contained contains=@NoSpell + +" 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 svnSummary Keyword + HiLink svnBlank Error + + HiLink svnRegion Comment + HiLink svnDelimiter NonText + HiLink svnRemoved Constant + HiLink svnAdded Identifier + HiLink svnModified Special + HiLink svnProperty Special + HiLink svnRenamed Special + + delcommand HiLink +endif + +let b:current_syntax = "svn" diff --git a/runtime/syntax/syncolor.vim b/runtime/syntax/syncolor.vim new file mode 100644 index 0000000000..8d0064db15 --- /dev/null +++ b/runtime/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/runtime/syntax/synload.vim b/runtime/syntax/synload.vim new file mode 100644 index 0000000000..48b5956b3c --- /dev/null +++ b/runtime/syntax/synload.vim @@ -0,0 +1,78 @@ +" Vim syntax support file +" Maintainer: Bram Moolenaar +" Last Change: 2012 Sep 25 + +" 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 + elseif s == "OFF" + let s = "" + 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++, C#, IDL) +au Syntax c,cpp,cs,idl,php + \ 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/runtime/syntax/syntax.vim b/runtime/syntax/syntax.vim new file mode 100644 index 0000000000..f274d93f4f --- /dev/null +++ b/runtime/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/runtime/syntax/sysctl.vim b/runtime/syntax/sysctl.vim new file mode 100644 index 0000000000..748054fd73 --- /dev/null +++ b/runtime/syntax/sysctl.vim @@ -0,0 +1,39 @@ +" Vim syntax file +" Language: sysctl.conf(5) configuration file +" Maintainer: Nikolai Weibull +" Latest Revision: 2011-05-02 + +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 '[^=]\+' + \ 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/runtime/syntax/systemverilog.vim b/runtime/syntax/systemverilog.vim new file mode 100644 index 0000000000..5bf2935078 --- /dev/null +++ b/runtime/syntax/systemverilog.vim @@ -0,0 +1,101 @@ +" Vim syntax file +" Language: SystemVerilog +" Maintainer: kocha +" Last Change: 12-Aug-2013. + +" 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 Verilog syntax files +if version < 600 + so :p:h/verilog.vim +else + runtime! syntax/verilog.vim + unlet b:current_syntax +endif + +" IEEE1800-2005 +syn keyword systemverilogStatement always_comb always_ff always_latch +syn keyword systemverilogStatement class endclass new +syn keyword systemverilogStatement virtual local const protected +syn keyword systemverilogStatement package endpackage +syn keyword systemverilogStatement rand randc constraint randomize +syn keyword systemverilogStatement with inside dist +syn keyword systemverilogStatement sequence endsequence randsequence +syn keyword systemverilogStatement srandom +syn keyword systemverilogStatement logic bit byte +syn keyword systemverilogStatement int longint shortint +syn keyword systemverilogStatement struct packed +syn keyword systemverilogStatement final +syn keyword systemverilogStatement import export +syn keyword systemverilogStatement context pure +syn keyword systemverilogStatement void shortreal chandle string +syn keyword systemverilogStatement clocking endclocking iff +syn keyword systemverilogStatement interface endinterface modport +syn keyword systemverilogStatement cover covergroup coverpoint endgroup +syn keyword systemverilogStatement property endproperty +syn keyword systemverilogStatement program endprogram +syn keyword systemverilogStatement bins binsof illegal_bins ignore_bins +syn keyword systemverilogStatement alias matches solve static assert +syn keyword systemverilogStatement assume super before expect bind +syn keyword systemverilogStatement extends null tagged extern this +syn keyword systemverilogStatement first_match throughout timeprecision +syn keyword systemverilogStatement timeunit type union +syn keyword systemverilogStatement uwire var cross ref wait_order intersect +syn keyword systemverilogStatement wildcard within + +syn keyword systemverilogTypeDef typedef enum + +syn keyword systemverilogConditional randcase +syn keyword systemverilogConditional unique priority + +syn keyword systemverilogRepeat return break continue +syn keyword systemverilogRepeat do foreach + +syn keyword systemverilogLabel join_any join_none forkjoin + +" IEEE1800-2009 add +syn keyword systemverilogStatement checker endchecker +syn keyword systemverilogStatement accept_on reject_on +syn keyword systemverilogStatement sync_accept_on sync_reject_on +syn keyword systemverilogStatement eventually nexttime until until_with +syn keyword systemverilogStatement s_always s_eventually s_nexttime s_until s_until_with +syn keyword systemverilogStatement let untyped +syn keyword systemverilogStatement strong weak +syn keyword systemverilogStatement restrict global implies + +syn keyword systemverilogConditional unique0 + +" IEEE1800-2012 add +syn keyword systemverilogStatement implements +syn keyword systemverilogStatement interconnect soft nettype + +" Define the default highlighting. +if version >= 508 || !exists("did_systemverilog_syn_inits") + if version < 508 + let did_systemverilog_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + " The default highlighting. + HiLink systemverilogStatement Statement + HiLink systemverilogTypeDef TypeDef + HiLink systemverilogConditional Conditional + HiLink systemverilogRepeat Repeat + HiLink systemverilogLabel Label + HiLink systemverilogGlobal Define + HiLink systemverilogNumber Number + + delcommand HiLink +endif + +let b:current_syntax = "systemverilog" + +" vim: ts=8 diff --git a/runtime/syntax/tads.vim b/runtime/syntax/tads.vim new file mode 100644 index 0000000000..260ff360f7 --- /dev/null +++ b/runtime/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/runtime/syntax/tags.vim b/runtime/syntax/tags.vim new file mode 100644 index 0000000000..051d65aa6e --- /dev/null +++ b/runtime/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/runtime/syntax/tak.vim b/runtime/syntax/tak.vim new file mode 100644 index 0000000000..20186db143 --- /dev/null +++ b/runtime/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/runtime/syntax/takcmp.vim b/runtime/syntax/takcmp.vim new file mode 100644 index 0000000000..a94609b325 --- /dev/null +++ b/runtime/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/runtime/syntax/takout.vim b/runtime/syntax/takout.vim new file mode 100644 index 0000000000..774353942a --- /dev/null +++ b/runtime/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/runtime/syntax/tar.vim b/runtime/syntax/tar.vim new file mode 100644 index 0000000000..497683a186 --- /dev/null +++ b/runtime/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/runtime/syntax/taskdata.vim b/runtime/syntax/taskdata.vim new file mode 100644 index 0000000000..b37c70cc1f --- /dev/null +++ b/runtime/syntax/taskdata.vim @@ -0,0 +1,48 @@ +" 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 +let s:keepcpo= &cpo +set cpo&vim + +" 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" + +let &cpo = s:keepcpo +unlet s:keepcpo + +" vim:noexpandtab diff --git a/runtime/syntax/taskedit.vim b/runtime/syntax/taskedit.vim new file mode 100644 index 0000000000..170153c0ee --- /dev/null +++ b/runtime/syntax/taskedit.vim @@ -0,0 +1,40 @@ +" 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 +let s:keepcpo= &cpo +set cpo&vim + +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" + +let &cpo = s:keepcpo +unlet s:keepcpo + +" vim:noexpandtab diff --git a/runtime/syntax/tasm.vim b/runtime/syntax/tasm.vim new file mode 100644 index 0000000000..2f8559610e --- /dev/null +++ b/runtime/syntax/tasm.vim @@ -0,0 +1,128 @@ +" Vim syntax file +" Language: TASM: turbo assembler by Borland +" Maintaner: FooLman of United Force +" Last Change: 2012 Feb 03 by Thilo Six + +" 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&vim + +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" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/tcl.vim b/runtime/syntax/tcl.vim new file mode 100644 index 0000000000..3c598267dc --- /dev/null +++ b/runtime/syntax/tcl.vim @@ -0,0 +1,287 @@ +" 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: 2014-02-12 +" Version: 1.14 +" URL: http://bitbucket.org/taylor_venable/metasyntax/src/tip/Config/vim/syntax/tcl.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 + +" Basic Tcl commands: http://www.tcl.tk/man/tcl8.6/TclCmd/contents.htm +syn keyword tclCommand after append array bgerror binary cd chan clock close concat +syn keyword tclCommand dde dict encoding eof error eval exec exit expr fblocked +syn keyword tclCommand fconfigure fcopy file fileevent flush format gets glob +syn keyword tclCommand global history http incr info interp join lappend lassign +syn keyword tclCommand lindex linsert list llength lmap load lrange lrepeat +syn keyword tclCommand lreplace lreverse lsearch lset lsort memory my namespace +syn keyword tclCommand next nextto open package pid puts pwd read refchan regexp +syn keyword tclCommand registry regsub rename scan seek self set socket source +syn keyword tclCommand split string subst tell time trace unknown unload unset +syn keyword tclCommand update uplevel upvar variable vwait + +" The 'Tcl Standard Library' commands: http://www.tcl.tk/man/tcl8.6/TclCmd/library.htm +syn keyword tclCommand auto_execok auto_import auto_load auto_mkindex auto_reset +syn keyword tclCommand auto_qualify tcl_findLibrary parray tcl_endOfWord +syn keyword tclCommand tcl_startOfNextWord tcl_startOfPreviousWord +syn keyword tclCommand tcl_wordBreakAfter tcl_wordBreakBefore + +" Global variables used by Tcl: http://www.tcl.tk/man/tcl8.6/TclCmd/tclvars.htm +syn keyword tclVars auto_path env errorCode errorInfo tcl_library tcl_patchLevel +syn keyword tclVars tcl_pkgPath tcl_platform tcl_precision tcl_rcFileName +syn keyword tclVars tcl_traceCompile tcl_traceExec tcl_wordchars +syn keyword tclVars tcl_nonwordchars tcl_version argc argv argv0 tcl_interactive + +" Strings which expr accepts as boolean values, aside from zero / non-zero. +syn keyword tclBoolean true false on off yes no + +syn keyword tclProcCommand apply coroutine proc return tailcall yield yieldto +syn keyword tclConditional if then else elseif switch +syn keyword tclConditional catch try throw finally +syn keyword tclLabel default +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 "${[^}]*}" + +" Used to facilitate hack to utilize string background for certain color +" schemes, e.g. inkpot and lettuce. +syn cluster tclVarRefC add=tclVarRef +syn cluster tclSpecialC add=tclSpecial + +" 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=@tclSpecialC skip=+\\\\\|\\"+ +"Match all other legal strings. +syn region tclString start=+[^\\]"+ms=s+1 end=+"+ contains=@tclSpecialC,@tclVarRefC,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 match tclComment /^\s*\#.*$/ +"syn match tclComment /;\s*\#.*$/hs=s+1 + +"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 tclProcCommand Type + 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 nolist diff --git a/runtime/syntax/tcsh.vim b/runtime/syntax/tcsh.vim new file mode 100644 index 0000000000..b535d11df8 --- /dev/null +++ b/runtime/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/runtime/syntax/tex.vim b/runtime/syntax/tex.vim new file mode 100644 index 0000000000..31114bc093 --- /dev/null +++ b/runtime/syntax/tex.vim @@ -0,0 +1,1339 @@ +" Vim syntax file +" Language: TeX +" Maintainer: Charles E. Campbell +" Last Change: Mar 20, 2014 +" Version: 81 +" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX +" +" 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 +" +" 6. Please see :help latex-syntax for information on +" syntax folding :help tex-folding +" spell checking :help tex-nospell +" commands and mathzones :help tex-runon +" new command highlighting :help tex-morecommands +" error highlighting :help tex-error +" new math groups :help tex-math +" new styles :help tex-style +" using conceal mode :help tex-conceal + +" 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 +let s:keepcpo= &cpo +set cpo&vim +scriptencoding utf-8 + +" 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_no_error") && g:tex_no_error + let s:tex_no_error= 1 +endif + +" by default, enable all region-based highlighting +let s:tex_fast= "bcmMprsSvV" +if exists("g:tex_fast") + if type(g:tex_fast) != 1 + " g:tex_fast exists and is not a string, so + " turn off all optional region-based highighting + let s:tex_fast= "" + else + let s:tex_fast= g:tex_fast + endif + let s:tex_no_error= 1 +else + let s:tex_fast= "bcmMprsSvV" +endif + +" let user determine which classes of concealment will be supported +" a=accents/ligatures d=delimiters m=math symbols g=Greek s=superscripts/subscripts +if !exists("g:tex_conceal") + let s:tex_conceal= 'abdmgsS' +else + let s:tex_conceal= g:tex_conceal +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 s:extfname=expand("%:e") +if exists("g:tex_stylish") + let b:tex_stylish= g:tex_stylish +elseif !exists("b:tex_stylish") + if s:extfname == "sty" || s:extfname == "cls" || s:extfname == "clo" || s:extfname == "dtx" || s: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" + setl fdm=syntax +endif + +" (La)TeX keywords: uses the characters 0-9,a-z,A-Z,192-255 only... {{{1 +" but _ is the only one that causes problems. +" One may override this iskeyword setting by providing +" g:tex_isk +if exists("g:tex_isk") + exe "setlocal isk=".g:tex_isk +else + setlocal isk=48-57,a-z,A-Z,192-255 +endif +if b:tex_stylish + setlocal isk+=@-@ +endif +if exists("g:tex_nospell") && g:tex_nospell && !exists("g:tex_comment_nospell") + let g:tex_comment_nospell= 1 +endif + +" Clusters: {{{1 +" -------- +syn cluster texCmdGroup contains=texCmdBody,texComment,texDefParm,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texBeginEnd,texBeginEndName,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle +if !exists("s: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,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texBoldStyle,texItalStyle,texNoSpell +syn cluster texBoldGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texBoldStyle,texBoldItalStyle,texNoSpell +syn cluster texItalGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texItalStyle,texItalBoldStyle,texNoSpell +if !exists("g:tex_nospell") || !g:tex_nospell + 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 +else + 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 + 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,texStyleMatcher +endif +syn cluster texPreambleMatchGroup 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,texMathZoneZ +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,texMathSymbol,texMathText,texRefZone,texSpecialChar,texStatement,texTypeSize,texTypeStyle + if !exists("s: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 + if has("conceal") && &enc == 'utf-8' + syn cluster texMathZoneGroup add=texGreek,texSuperscript,texSubscript,texMathSymbol + syn cluster texMathMatchGroup add=texGreek,texSuperscript,texSubscript,texMathSymbol + endif +endif + +" Try to flag {} and () mismatches: {{{1 +if s:tex_fast =~ 'm' + if !exists("s:tex_no_error") + syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texMatchGroup,texError + syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup,texError,@NoSpell + else + syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texMatchGroup + syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup + endif + if !exists("g:tex_nospell") || !g:tex_nospell + syn region texParen start="(" end=")" contains=@texMatchGroup,@Spell + else + syn region texParen start="(" end=")" contains=@texMatchGroup + endif +endif +if !exists("s:tex_no_error") + syn match texError "[}\])]" +endif +if s:tex_fast =~ 'M' + if !exists("tex_no_math") + if !exists("s:tex_no_error") + syn match texMathError "}" contained + endif + syn region texMathMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\}" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup + endif +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("s:tex_no_error") + syn match texError "\\\a*@[a-zA-Z@]*" + endif +endif + +" TeX/LaTeX delimiters: {{{1 +syn match texDelimiter "&" +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 texBeginEnd "\\begin\>\|\\end\>" nextgroup=texBeginEndName +if s:tex_fast =~ 'm' + syn region texBeginEndName matchgroup=Delimiter start="{" end="}" contained nextgroup=texBeginEndModifier contains=texComment + syn region texBeginEndModifier matchgroup=Delimiter start="\[" end="]" contained contains=texComment,@NoSpell +endif + +" \documentclass, \documentstyle, \usepackage: {{{1 +syn match texDocType "\\documentclass\>\|\\documentstyle\>\|\\usepackage\>" nextgroup=texBeginEndName,texDocTypeArgs +if s:tex_fast =~ 'm' + syn region texDocTypeArgs matchgroup=Delimiter start="\[" end="]" contained nextgroup=texBeginEndName contains=texComment,@NoSpell +endif + +" 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,@texPreambleMatchGroup +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 +if s:tex_fast =~ 'm' + syn region texInputFileOpt matchgroup=Delimiter start="\[" end="\]" contained contains=texComment +endif + +" 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 +if s:tex_conceal !~ 'b' + syn match texTypeStyle "\\textbf\>" + syn match texTypeStyle "\\textit\>" +endif +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 s:tex_fast =~ 'p' + if !exists("g:tex_nospell") || !g:tex_nospell + 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 + else + 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 + syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texPartGroup + syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texChapterGroup + syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSectionGroup + syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSectionGroup + syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSubSectionGroup + syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texParaGroup + syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup + syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' fold contains=@texFoldGroup + syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' fold contains=@texFoldGroup + else + syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup + syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup + syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup + syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup + syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup + syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup + syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup + syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup + syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup + syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup + endif + endif +endif + +" particular support for bold and italic {{{1 +if s:tex_fast =~ 'b' + if s:tex_conceal =~ 'b' + syn region texBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" end="}" concealends contains=@texBoldGroup + syn region texBoldItalStyle matchgroup=texTypeStyle start="\\textit\s*{" end="}" concealends contains=@texItalGroup + syn region texItalStyle matchgroup=texTypeStyle start="\\textit\s*{" end="}" concealends contains=@texItalGroup + syn region texItalBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" end="}" concealends contains=@texBoldGroup + endif +endif + +" Bad Math (mismatched): {{{1 +if !exists("g:tex_no_math") && !exists("s:tex_no_error") + 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 + if s:tex_fast =~ 'M' + 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*}"' + endif + 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 + if s:tex_fast =~ 'M' + 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*}"' + endif + 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 + if s:tex_fast =~ 'M' + if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~ 'd' + syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend concealends contains=@texMathZoneGroup + syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend concealends contains=@texMathZoneGroup + syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" concealends contains=@texMathZoneGroup + syn region texMathZoneY matchgroup=Delimiter start="\$\$" matchgroup=Delimiter end="\$\$" end="%stopzone\>" concealends keepend contains=@texMathZoneGroup + else + 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 + endif + syn region texMathZoneZ matchgroup=texStatement start="\\ensuremath\s*{" matchgroup=texStatement end="}" end="%stopzone\>" contains=@texMathZoneGroup + endif + + syn match texMathOper "[_^=]" contained + + " Text Inside Math Zones: {{{2 + if s:tex_fast =~ 'M' + if !exists("g:tex_nospell") || !g:tex_nospell + syn region texMathText matchgroup=texStatement start='\\\(\(inter\)\=text\|mbox\)\s*{' end='}' contains=@texFoldGroup,@Spell + else + syn region texMathText matchgroup=texStatement start='\\\(\(inter\)\=text\|mbox\)\s*{' end='}' contains=@texFoldGroup + endif + endif + + " \left..something.. and \right..something.. support: {{{2 + syn match texMathDelimBad contained "\S" + if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~ 'm' + syn match texMathDelim contained "\\left\\{\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar={ + syn match texMathDelim contained "\\right\\}\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar=} + let s:texMathDelimList=[ + \ ['<' , '<'] , + \ ['>' , '>'] , + \ ['(' , '('] , + \ [')' , ')'] , + \ ['\[' , '['] , + \ [']' , ']'] , + \ ['\\{' , '{'] , + \ ['\\}' , '}'] , + \ ['|' , '|'] , + \ ['\\|' , '‖'] , + \ ['\\backslash' , '\'] , + \ ['\\downarrow' , '↓'] , + \ ['\\Downarrow' , '⇓'] , + \ ['\\langle' , '<'] , + \ ['\\lbrace' , '['] , + \ ['\\lceil' , '⌈'] , + \ ['\\lfloor' , '⌊'] , + \ ['\\lgroup' , '⌊'] , + \ ['\\lmoustache' , '⎛'] , + \ ['\\rangle' , '>'] , + \ ['\\rbrace' , ']'] , + \ ['\\rceil' , '⌉'] , + \ ['\\rfloor' , '⌋'] , + \ ['\\rgroup' , '⌋'] , + \ ['\\rmoustache' , '⎞'] , + \ ['\\uparrow' , '↑'] , + \ ['\\Uparrow' , '↑'] , + \ ['\\updownarrow', '↕'] , + \ ['\\Updownarrow', '⇕']] + syn match texMathDelim '\\[bB]igg\=[lr]' contained nextgroup=texMathDelimBad + for texmath in s:texMathDelimList + exe "syn match texMathDelim '\\\\[bB]igg\\=[lr]\\=".texmath[0]."' contained conceal cchar=".texmath[1] + endfor + + else + syn match texMathDelim contained "\\\(left\|right\)\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad + syn match texMathDelim contained "\\[bB]igg\=[lr]\=\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad + 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 + syn match texMathDelim contained "\\\(left\|right\)arrow\>\|\<\([aA]rrow\|brace\)\=vert\>" + syn match texMathDelim contained "\\lefteqn\>" +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" +if s:tex_conceal !~ 'S' + syn match texSpecialChar '\\glq\>' contained conceal cchar=‚ + syn match texSpecialChar '\\grq\>' contained conceal cchar=‘ + syn match texSpecialChar '\\glqq\>' contained conceal cchar=„ + syn match texSpecialChar '\\grqq\>' contained conceal cchar=“ + syn match texSpecialChar '\\hyp\>' contained conceal cchar=- +endif + +" 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 s: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 + if s:tex_fast =~ 'c' + syn region texComment start="^\zs\s*%.*\_s*%" skip="^\s*%" end='^\ze\s*[^%]' fold + syn region texNoSpell contained fold matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell + endif + else + syn match texComment "%.*$" contains=@texCommentGroup + if s:tex_fast =~ 'c' + syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell + endif + endif +endif + +" Separate lines used for verb` and verb# so that the end conditions {{{1 +" will appropriately terminate. +" If g:tex_verbspell exists, then verbatim texZones will permit spellchecking there. +if s:tex_fast =~ 'v' + if exists("g:tex_verbspell") && g:tex_verbspell + syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" contains=@Spell + " listings package: + syn region texZone start="\\begin{lstlisting}" end="\\end{lstlisting}\|%stopzone\>" contains=@Spell + if version < 600 + syn region texZone start="\\verb\*\=`" end="`\|%stopzone\>" contains=@Spell + syn region texZone start="\\verb\*\=#" end="#\|%stopzone\>" contains=@Spell + else + if b:tex_stylish + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" contains=@Spell + else + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>" contains=@Spell + endif + endif + else + syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%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 + endif +endif + +" Tex Reference Zones: {{{1 +if s:tex_fast =~ 'r' + 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 region texRefOption contained matchgroup=Delimiter start='\[' end=']' contains=@texRefGroup,texRefZone nextgroup=texRefOption,texCite + syn region texCite contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup,texRefZone,texCite +endif +syn match texRefZone '\\cite\%([tp]\*\=\)\=' nextgroup=texRefOption,texCite + +" Handle newcommand, newenvironment : {{{1 +syn match texNewCmd "\\newcommand\>" nextgroup=texCmdName skipwhite skipnl +if s:tex_fast =~ 'V' + 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 +endif +syn match texNewEnv "\\newenvironment\>" nextgroup=texEnvName skipwhite skipnl +if s:tex_fast =~ 'V' + 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 +endif + +" 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("s:tex_no_error") + if s:tex_fast =~ 'S' + syn region texStyle matchgroup=texStatement start='\\makeatletter' end='\\makeatother' contains=@texStyleGroup contained + endif + syn match texStyleStatement "\\[a-zA-Z@]\+" contained + if s:tex_fast =~ 'S' + syn region texStyleMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texStyleGroup,texError contained + syn region texStyleMatcher matchgroup=Delimiter start="\[" end="]" contains=@texStyleGroup,texError contained + endif +endif + +" Conceal mode support (supports set cole=2) {{{1 +if has("conceal") && &enc == 'utf-8' + + " Math Symbols {{{2 + " (many of these symbols were contributed by Björn Winckler) + if s:tex_conceal =~ 'm' + let s:texMathList=[ + \ ['|' , '‖'], + \ ['aleph' , 'ℵ'], + \ ['amalg' , 'âˆ'], + \ ['angle' , '∠'], + \ ['approx' , '≈'], + \ ['ast' , '∗'], + \ ['asymp' , 'â‰'], + \ ['backepsilon' , 'âˆ'], + \ ['backsimeq' , '≃'], + \ ['backslash' , '∖'], + \ ['barwedge' , '⊼'], + \ ['because' , '∵'], + \ ['between' , '≬'], + \ ['bigcap' , '∩'], + \ ['bigcirc' , 'â—‹'], + \ ['bigcup' , '∪'], + \ ['bigodot' , '⊙'], + \ ['bigoplus' , '⊕'], + \ ['bigotimes' , '⊗'], + \ ['bigsqcup' , '⊔'], + \ ['bigtriangledown', '∇'], + \ ['bigtriangleup' , '∆'], + \ ['bigvee' , 'â‹'], + \ ['bigwedge' , 'â‹€'], + \ ['blacksquare' , '∎'], + \ ['bot' , '⊥'], + \ ['bowtie' , '⋈'], + \ ['boxdot' , '⊡'], + \ ['boxminus' , '⊟'], + \ ['boxplus' , '⊞'], + \ ['boxtimes' , '⊠'], + \ ['bullet' , '•'], + \ ['bumpeq' , 'â‰'], + \ ['Bumpeq' , '≎'], + \ ['cap' , '∩'], + \ ['Cap' , 'â‹’'], + \ ['cdot' , '·'], + \ ['cdots' , '⋯'], + \ ['circ' , '∘'], + \ ['circeq' , '≗'], + \ ['circlearrowleft', '↺'], + \ ['circlearrowright', '↻'], + \ ['circledast' , '⊛'], + \ ['circledcirc' , '⊚'], + \ ['clubsuit' , '♣'], + \ ['complement' , 'âˆ'], + \ ['cong' , '≅'], + \ ['coprod' , 'âˆ'], + \ ['copyright' , '©'], + \ ['cup' , '∪'], + \ ['Cup' , 'â‹“'], + \ ['curlyeqprec' , '⋞'], + \ ['curlyeqsucc' , '⋟'], + \ ['curlyvee' , '⋎'], + \ ['curlywedge' , 'â‹'], + \ ['dagger' , '†'], + \ ['dashv' , '⊣'], + \ ['ddagger' , '‡'], + \ ['ddots' , '⋱'], + \ ['diamond' , 'â‹„'], + \ ['diamondsuit' , '♢'], + \ ['div' , '÷'], + \ ['doteq' , 'â‰'], + \ ['doteqdot' , '≑'], + \ ['dotplus' , '∔'], + \ ['dots' , '…'], + \ ['dotsb' , '⋯'], + \ ['dotsc' , '…'], + \ ['dotsi' , '⋯'], + \ ['dotso' , '…'], + \ ['doublebarwedge' , '⩞'], + \ ['downarrow' , '↓'], + \ ['Downarrow' , '⇓'], + \ ['ell' , 'â„“'], + \ ['emptyset' , '∅'], + \ ['eqcirc' , '≖'], + \ ['eqsim' , '≂'], + \ ['eqslantgtr' , '⪖'], + \ ['eqslantless' , '⪕'], + \ ['equiv' , '≡'], + \ ['exists' , '∃'], + \ ['fallingdotseq' , '≒'], + \ ['flat' , 'â™­'], + \ ['forall' , '∀'], + \ ['frown' , 'â”'], + \ ['ge' , '≥'], + \ ['geq' , '≥'], + \ ['geqq' , '≧'], + \ ['gets' , 'â†'], + \ ['gg' , '⟫'], + \ ['gneqq' , '≩'], + \ ['gtrdot' , 'â‹—'], + \ ['gtreqless' , 'â‹›'], + \ ['gtrless' , '≷'], + \ ['gtrsim' , '≳'], + \ ['hbar' , 'â„'], + \ ['heartsuit' , '♡'], + \ ['hookleftarrow' , '↩'], + \ ['hookrightarrow' , '↪'], + \ ['iiint' , '∭'], + \ ['iint' , '∬'], + \ ['Im' , 'â„‘'], + \ ['imath' , 'É©'], + \ ['in' , '∈'], + \ ['infty' , '∞'], + \ ['int' , '∫'], + \ ['lceil' , '⌈'], + \ ['ldots' , '…'], + \ ['le' , '≤'], + \ ['leadsto' , 'â†'], + \ ['left(' , '('], + \ ['left\[' , '['], + \ ['left\\{' , '{'], + \ ['leftarrow' , '⟵'], + \ ['Leftarrow' , '⟸'], + \ ['leftarrowtail' , '↢'], + \ ['leftharpoondown', '↽'], + \ ['leftharpoonup' , '↼'], + \ ['leftrightarrow' , '↔'], + \ ['Leftrightarrow' , '⇔'], + \ ['leftrightsquigarrow', '↭'], + \ ['leftthreetimes' , 'â‹‹'], + \ ['leq' , '≤'], + \ ['leq' , '≤'], + \ ['leqq' , '≦'], + \ ['lessdot' , 'â‹–'], + \ ['lesseqgtr' , '⋚'], + \ ['lesssim' , '≲'], + \ ['lfloor' , '⌊'], + \ ['ll' , '≪'], + \ ['lmoustache' , 'â•­'], + \ ['lneqq' , '≨'], + \ ['ltimes' , '⋉'], + \ ['mapsto' , '↦'], + \ ['measuredangle' , '∡'], + \ ['mid' , '∣'], + \ ['models' , '╞'], + \ ['mp' , '∓'], + \ ['nabla' , '∇'], + \ ['natural' , 'â™®'], + \ ['ncong' , '≇'], + \ ['ne' , '≠'], + \ ['nearrow' , '↗'], + \ ['neg' , '¬'], + \ ['neq' , '≠'], + \ ['nexists' , '∄'], + \ ['ngeq' , '≱'], + \ ['ngeqq' , '≱'], + \ ['ngtr' , '≯'], + \ ['ni' , '∋'], + \ ['nleftarrow' , '↚'], + \ ['nLeftarrow' , 'â‡'], + \ ['nLeftrightarrow', '⇎'], + \ ['nleq' , '≰'], + \ ['nleqq' , '≰'], + \ ['nless' , '≮'], + \ ['nmid' , '∤'], + \ ['notin' , '∉'], + \ ['nprec' , '⊀'], + \ ['nrightarrow' , '↛'], + \ ['nRightarrow' , 'â‡'], + \ ['nsim' , 'â‰'], + \ ['nsucc' , 'âŠ'], + \ ['ntriangleleft' , '⋪'], + \ ['ntrianglelefteq', '⋬'], + \ ['ntriangleright' , 'â‹«'], + \ ['ntrianglerighteq', 'â‹­'], + \ ['nvdash' , '⊬'], + \ ['nvDash' , '⊭'], + \ ['nVdash' , '⊮'], + \ ['nwarrow' , '↖'], + \ ['odot' , '⊙'], + \ ['oint' , '∮'], + \ ['ominus' , '⊖'], + \ ['oplus' , '⊕'], + \ ['oslash' , '⊘'], + \ ['otimes' , '⊗'], + \ ['owns' , '∋'], + \ ['P' , '¶'], + \ ['parallel' , 'â•‘'], + \ ['partial' , '∂'], + \ ['perp' , '⊥'], + \ ['pitchfork' , 'â‹”'], + \ ['pm' , '±'], + \ ['prec' , '≺'], + \ ['precapprox' , '⪷'], + \ ['preccurlyeq' , '≼'], + \ ['preceq' , '⪯'], + \ ['precnapprox' , '⪹'], + \ ['precneqq' , '⪵'], + \ ['precsim' , '≾'], + \ ['prime' , '′'], + \ ['prod' , 'âˆ'], + \ ['propto' , 'âˆ'], + \ ['rceil' , '⌉'], + \ ['Re' , 'ℜ'], + \ ['rfloor' , '⌋'], + \ ['right)' , ')'], + \ ['right]' , ']'], + \ ['right\\}' , '}'], + \ ['rightarrow' , '⟶'], + \ ['Rightarrow' , '⟹'], + \ ['rightarrowtail' , '↣'], + \ ['rightleftharpoons', '⇌'], + \ ['rightsquigarrow', 'â†'], + \ ['rightthreetimes', '⋌'], + \ ['risingdotseq' , '≓'], + \ ['rmoustache' , 'â•®'], + \ ['rtimes' , '⋊'], + \ ['S' , '§'], + \ ['searrow' , '↘'], + \ ['setminus' , '∖'], + \ ['sharp' , '♯'], + \ ['sim' , '∼'], + \ ['simeq' , 'â‹'], + \ ['smile' , '‿'], + \ ['spadesuit' , 'â™ '], + \ ['sphericalangle' , '∢'], + \ ['sqcap' , '⊓'], + \ ['sqcup' , '⊔'], + \ ['sqsubset' , 'âŠ'], + \ ['sqsubseteq' , '⊑'], + \ ['sqsupset' , 'âŠ'], + \ ['sqsupseteq' , '⊒'], + \ ['star' , '✫'], + \ ['subset' , '⊂'], + \ ['Subset' , 'â‹'], + \ ['subseteq' , '⊆'], + \ ['subseteqq' , 'â«…'], + \ ['subsetneq' , '⊊'], + \ ['subsetneqq' , 'â«‹'], + \ ['succ' , '≻'], + \ ['succapprox' , '⪸'], + \ ['succcurlyeq' , '≽'], + \ ['succeq' , '⪰'], + \ ['succnapprox' , '⪺'], + \ ['succneqq' , '⪶'], + \ ['succsim' , '≿'], + \ ['sum' , '∑'], + \ ['supset' , '⊃'], + \ ['Supset' , 'â‹‘'], + \ ['supseteq' , '⊇'], + \ ['supseteqq' , '⫆'], + \ ['supsetneq' , '⊋'], + \ ['supsetneqq' , '⫌'], + \ ['surd' , '√'], + \ ['swarrow' , '↙'], + \ ['therefore' , '∴'], + \ ['times' , '×'], + \ ['to' , '→'], + \ ['top' , '⊤'], + \ ['triangle' , '∆'], + \ ['triangleleft' , '⊲'], + \ ['trianglelefteq' , '⊴'], + \ ['triangleq' , '≜'], + \ ['triangleright' , '⊳'], + \ ['trianglerighteq', '⊵'], + \ ['twoheadleftarrow', '↞'], + \ ['twoheadrightarrow', '↠'], + \ ['uparrow' , '↑'], + \ ['Uparrow' , '⇑'], + \ ['updownarrow' , '↕'], + \ ['Updownarrow' , '⇕'], + \ ['varnothing' , '∅'], + \ ['vartriangle' , '∆'], + \ ['vdash' , '⊢'], + \ ['vDash' , '⊨'], + \ ['Vdash' , '⊩'], + \ ['vdots' , 'â‹®'], + \ ['vee' , '∨'], + \ ['veebar' , '⊻'], + \ ['Vvdash' , '⊪'], + \ ['wedge' , '∧'], + \ ['wp' , '℘'], + \ ['wr' , '≀']] +" \ ['jmath' , 'X'] +" \ ['uminus' , 'X'] +" \ ['uplus' , 'X'] + for texmath in s:texMathList + if texmath[0] =~ '\w$' + exe "syn match texMathSymbol '\\\\".texmath[0]."\\>' contained conceal cchar=".texmath[1] + else + exe "syn match texMathSymbol '\\\\".texmath[0]."' contained conceal cchar=".texmath[1] + endif + endfor + + if &ambw == "double" + syn match texMathSymbol '\\gg\>' contained conceal cchar=≫ + syn match texMathSymbol '\\ll\>' contained conceal cchar=≪ + else + syn match texMathSymbol '\\gg\>' contained conceal cchar=⟫ + syn match texMathSymbol '\\ll\>' contained conceal cchar=⟪ + endif + + syn match texMathSymbol '\\hat{a}' contained conceal cchar=â + syn match texMathSymbol '\\hat{A}' contained conceal cchar= + syn match texMathSymbol '\\hat{c}' contained conceal cchar=ĉ + syn match texMathSymbol '\\hat{C}' contained conceal cchar=Ĉ + syn match texMathSymbol '\\hat{e}' contained conceal cchar=ê + syn match texMathSymbol '\\hat{E}' contained conceal cchar=Ê + syn match texMathSymbol '\\hat{g}' contained conceal cchar=Ä + syn match texMathSymbol '\\hat{G}' contained conceal cchar=Äœ + syn match texMathSymbol '\\hat{i}' contained conceal cchar=î + syn match texMathSymbol '\\hat{I}' contained conceal cchar=ÃŽ + syn match texMathSymbol '\\hat{o}' contained conceal cchar=ô + syn match texMathSymbol '\\hat{O}' contained conceal cchar=Ô + syn match texMathSymbol '\\hat{s}' contained conceal cchar=Å + syn match texMathSymbol '\\hat{S}' contained conceal cchar=Åœ + syn match texMathSymbol '\\hat{u}' contained conceal cchar=û + syn match texMathSymbol '\\hat{U}' contained conceal cchar=Û + syn match texMathSymbol '\\hat{w}' contained conceal cchar=ŵ + syn match texMathSymbol '\\hat{W}' contained conceal cchar=Å´ + syn match texMathSymbol '\\hat{y}' contained conceal cchar=Å· + syn match texMathSymbol '\\hat{Y}' contained conceal cchar=Ŷ + endif + + " Greek {{{2 + if s:tex_conceal =~ 'g' + fun! s:Greek(group,pat,cchar) + exe 'syn match '.a:group." '".a:pat."' contained conceal cchar=".a:cchar + endfun + call s:Greek('texGreek','\\alpha\>' ,'α') + call s:Greek('texGreek','\\beta\>' ,'β') + call s:Greek('texGreek','\\gamma\>' ,'γ') + call s:Greek('texGreek','\\delta\>' ,'δ') + call s:Greek('texGreek','\\epsilon\>' ,'ϵ') + call s:Greek('texGreek','\\varepsilon\>' ,'ε') + call s:Greek('texGreek','\\zeta\>' ,'ζ') + call s:Greek('texGreek','\\eta\>' ,'η') + call s:Greek('texGreek','\\theta\>' ,'θ') + call s:Greek('texGreek','\\vartheta\>' ,'Ï‘') + call s:Greek('texGreek','\\kappa\>' ,'κ') + call s:Greek('texGreek','\\lambda\>' ,'λ') + call s:Greek('texGreek','\\mu\>' ,'μ') + call s:Greek('texGreek','\\nu\>' ,'ν') + call s:Greek('texGreek','\\xi\>' ,'ξ') + call s:Greek('texGreek','\\pi\>' ,'Ï€') + call s:Greek('texGreek','\\varpi\>' ,'Ï–') + call s:Greek('texGreek','\\rho\>' ,'Ï') + call s:Greek('texGreek','\\varrho\>' ,'ϱ') + call s:Greek('texGreek','\\sigma\>' ,'σ') + call s:Greek('texGreek','\\varsigma\>' ,'Ï‚') + call s:Greek('texGreek','\\tau\>' ,'Ï„') + call s:Greek('texGreek','\\upsilon\>' ,'Ï…') + call s:Greek('texGreek','\\phi\>' ,'φ') + call s:Greek('texGreek','\\varphi\>' ,'Ï•') + call s:Greek('texGreek','\\chi\>' ,'χ') + call s:Greek('texGreek','\\psi\>' ,'ψ') + call s:Greek('texGreek','\\omega\>' ,'ω') + call s:Greek('texGreek','\\Gamma\>' ,'Γ') + call s:Greek('texGreek','\\Delta\>' ,'Δ') + call s:Greek('texGreek','\\Theta\>' ,'Θ') + call s:Greek('texGreek','\\Lambda\>' ,'Λ') + call s:Greek('texGreek','\\Xi\>' ,'Χ') + call s:Greek('texGreek','\\Pi\>' ,'Π') + call s:Greek('texGreek','\\Sigma\>' ,'Σ') + call s:Greek('texGreek','\\Upsilon\>' ,'Î¥') + call s:Greek('texGreek','\\Phi\>' ,'Φ') + call s:Greek('texGreek','\\Psi\>' ,'Ψ') + call s:Greek('texGreek','\\Omega\>' ,'Ω') + delfun s:Greek + endif + + " Superscripts/Subscripts {{{2 + if s:tex_conceal =~ 's' + if s:tex_fast =~ 's' + syn region texSuperscript matchgroup=Delimiter start='\^{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSuperscripts,texStatement,texSubscript,texSuperscript,texMathMatcher + syn region texSubscript matchgroup=Delimiter start='_{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSubscripts,texStatement,texSubscript,texSuperscript,texMathMatcher + endif + fun! s:SuperSub(group,leader,pat,cchar) + exe 'syn match '.a:group." '".a:leader.a:pat."' contained conceal cchar=".a:cchar + exe 'syn match '.a:group."s '".a:pat."' contained conceal cchar=".a:cchar.' nextgroup='.a:group.'s' + endfun + call s:SuperSub('texSuperscript','\^','0','â°') + call s:SuperSub('texSuperscript','\^','1','¹') + call s:SuperSub('texSuperscript','\^','2','²') + call s:SuperSub('texSuperscript','\^','3','³') + call s:SuperSub('texSuperscript','\^','4','â´') + call s:SuperSub('texSuperscript','\^','5','âµ') + call s:SuperSub('texSuperscript','\^','6','â¶') + call s:SuperSub('texSuperscript','\^','7','â·') + call s:SuperSub('texSuperscript','\^','8','â¸') + call s:SuperSub('texSuperscript','\^','9','â¹') + call s:SuperSub('texSuperscript','\^','a','ᵃ') + call s:SuperSub('texSuperscript','\^','b','ᵇ') + call s:SuperSub('texSuperscript','\^','c','á¶œ') + call s:SuperSub('texSuperscript','\^','d','ᵈ') + call s:SuperSub('texSuperscript','\^','e','ᵉ') + call s:SuperSub('texSuperscript','\^','f','á¶ ') + call s:SuperSub('texSuperscript','\^','g','áµ') + call s:SuperSub('texSuperscript','\^','h','ʰ') + call s:SuperSub('texSuperscript','\^','i','â±') + call s:SuperSub('texSuperscript','\^','j','ʲ') + call s:SuperSub('texSuperscript','\^','k','áµ') + call s:SuperSub('texSuperscript','\^','l','Ë¡') + call s:SuperSub('texSuperscript','\^','m','áµ') + call s:SuperSub('texSuperscript','\^','n','â¿') + call s:SuperSub('texSuperscript','\^','o','áµ’') + call s:SuperSub('texSuperscript','\^','p','áµ–') + call s:SuperSub('texSuperscript','\^','r','ʳ') + call s:SuperSub('texSuperscript','\^','s','Ë¢') + call s:SuperSub('texSuperscript','\^','t','áµ—') + call s:SuperSub('texSuperscript','\^','u','ᵘ') + call s:SuperSub('texSuperscript','\^','v','áµ›') + call s:SuperSub('texSuperscript','\^','w','Ê·') + call s:SuperSub('texSuperscript','\^','x','Ë£') + call s:SuperSub('texSuperscript','\^','y','ʸ') + call s:SuperSub('texSuperscript','\^','z','á¶»') + call s:SuperSub('texSuperscript','\^','A','á´¬') + call s:SuperSub('texSuperscript','\^','B','á´®') + call s:SuperSub('texSuperscript','\^','D','á´°') + call s:SuperSub('texSuperscript','\^','E','á´±') + call s:SuperSub('texSuperscript','\^','G','á´³') + call s:SuperSub('texSuperscript','\^','H','á´´') + call s:SuperSub('texSuperscript','\^','I','á´µ') + call s:SuperSub('texSuperscript','\^','J','á´¶') + call s:SuperSub('texSuperscript','\^','K','á´·') + call s:SuperSub('texSuperscript','\^','L','á´¸') + call s:SuperSub('texSuperscript','\^','M','á´¹') + call s:SuperSub('texSuperscript','\^','N','á´º') + call s:SuperSub('texSuperscript','\^','O','á´¼') + call s:SuperSub('texSuperscript','\^','P','á´¾') + call s:SuperSub('texSuperscript','\^','R','á´¿') + call s:SuperSub('texSuperscript','\^','T','áµ€') + call s:SuperSub('texSuperscript','\^','U','áµ') + call s:SuperSub('texSuperscript','\^','W','ᵂ') + call s:SuperSub('texSuperscript','\^',',','ï¸') + call s:SuperSub('texSuperscript','\^',':','︓') + call s:SuperSub('texSuperscript','\^',';','︔') + call s:SuperSub('texSuperscript','\^','+','âº') + call s:SuperSub('texSuperscript','\^','-','â»') + call s:SuperSub('texSuperscript','\^','<','Ë‚') + call s:SuperSub('texSuperscript','\^','>','˃') + call s:SuperSub('texSuperscript','\^','/','ËŠ') + call s:SuperSub('texSuperscript','\^','(','â½') + call s:SuperSub('texSuperscript','\^',')','â¾') + call s:SuperSub('texSuperscript','\^','\.','Ë™') + call s:SuperSub('texSuperscript','\^','=','Ë­') + call s:SuperSub('texSubscript','_','0','â‚€') + call s:SuperSub('texSubscript','_','1','â‚') + call s:SuperSub('texSubscript','_','2','â‚‚') + call s:SuperSub('texSubscript','_','3','₃') + call s:SuperSub('texSubscript','_','4','â‚„') + call s:SuperSub('texSubscript','_','5','â‚…') + call s:SuperSub('texSubscript','_','6','₆') + call s:SuperSub('texSubscript','_','7','₇') + call s:SuperSub('texSubscript','_','8','₈') + call s:SuperSub('texSubscript','_','9','₉') + call s:SuperSub('texSubscript','_','a','â‚') + call s:SuperSub('texSubscript','_','e','â‚‘') + call s:SuperSub('texSubscript','_','i','áµ¢') + call s:SuperSub('texSubscript','_','o','â‚’') + call s:SuperSub('texSubscript','_','u','ᵤ') + call s:SuperSub('texSubscript','_',',','ï¸') + call s:SuperSub('texSubscript','_','+','₊') + call s:SuperSub('texSubscript','_','-','â‚‹') + call s:SuperSub('texSubscript','_','/','Ë') + call s:SuperSub('texSubscript','_','(','â‚') + call s:SuperSub('texSubscript','_',')','₎') + call s:SuperSub('texSubscript','_','\.','‸') + call s:SuperSub('texSubscript','_','r','áµ£') + call s:SuperSub('texSubscript','_','v','áµ¥') + call s:SuperSub('texSubscript','_','x','â‚“') + call s:SuperSub('texSubscript','_','\\beta\>' ,'ᵦ') + call s:SuperSub('texSubscript','_','\\delta\>','ᵨ') + call s:SuperSub('texSubscript','_','\\phi\>' ,'ᵩ') + call s:SuperSub('texSubscript','_','\\gamma\>','áµ§') + call s:SuperSub('texSubscript','_','\\chi\>' ,'ᵪ') + delfun s:SuperSub + endif + + " Accented characters: {{{2 + if s:tex_conceal =~ 'a' + 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 + fun! s:Accents(chr,...) + let i= 1 + for accent in ["`","\\'","^",'"','\~','\.','=',"c","H","k","r","u","v"] + if i > a:0 + break + endif + if strlen(a:{i}) == 0 || a:{i} == ' ' || a:{i} == '?' + let i= i + 1 + continue + endif + if accent =~ '\a' + exe "syn match texAccent '".'\\'.accent.'\(\s*{'.a:chr.'}\|\s\+'.a:chr.'\)'."' conceal cchar=".a:{i} + else + exe "syn match texAccent '".'\\'.accent.'\s*\({'.a:chr.'}\|'.a:chr.'\)'."' conceal cchar=".a:{i} + endif + let i= i + 1 + endfor + endfun + " \` \' \^ \" \~ \. \= \c \H \k \r \u \v + call s:Accents('a','à','á','â','ä','ã','ȧ','Ä',' ',' ','Ä…','Ã¥','ă','ÇŽ') + call s:Accents('A','À','Ã','Â','Ä','Ã','Ȧ','Ä€',' ',' ','Ä„','Ã…','Ä‚','Ç') + call s:Accents('c',' ','ć','ĉ',' ',' ','Ä‹',' ','ç',' ',' ',' ',' ','Ä') + call s:Accents('C',' ','Ć','Ĉ',' ',' ','ÄŠ',' ','Ç',' ',' ',' ',' ','ÄŒ') + call s:Accents('d',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','Ä') + call s:Accents('D',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ÄŽ') + call s:Accents('e','è','é','ê','ë','ẽ','Ä—','Ä“','È©',' ','Ä™',' ','Ä•','Ä›') + call s:Accents('E','È','É','Ê','Ë','Ẽ','Ä–','Ä’','Ȩ',' ','Ę',' ','Ä”','Äš') + call s:Accents('g',' ','ǵ','Ä',' ',' ','Ä¡',' ','Ä£',' ',' ',' ','ÄŸ','ǧ') + call s:Accents('G',' ','Ç´','Äœ',' ',' ','Ä ',' ','Ä¢',' ',' ',' ','Äž','Ǧ') + call s:Accents('h',' ',' ','Ä¥',' ',' ',' ',' ',' ',' ',' ',' ',' ','ÈŸ') + call s:Accents('H',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','Èž') + call s:Accents('i','ì','í','î','ï','Ä©','į','Ä«',' ',' ','į',' ','Ä­','Ç') + call s:Accents('I','ÃŒ','Ã','ÃŽ','Ã','Ĩ','İ','Ī',' ',' ','Ä®',' ','Ĭ','Ç') + call s:Accents('J',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ǰ') + call s:Accents('k',' ',' ',' ',' ',' ',' ',' ','Ä·',' ',' ',' ',' ','Ç©') + call s:Accents('K',' ',' ',' ',' ',' ',' ',' ','Ķ',' ',' ',' ',' ','Ǩ') + call s:Accents('l',' ','ĺ','ľ',' ',' ',' ',' ','ļ',' ',' ',' ',' ','ľ') + call s:Accents('L',' ','Ĺ','Ľ',' ',' ',' ',' ','Ä»',' ',' ',' ',' ','Ľ') + call s:Accents('n',' ','Å„',' ',' ','ñ',' ',' ','ņ',' ',' ',' ',' ','ň') + call s:Accents('N',' ','Ń',' ',' ','Ñ',' ',' ','Å…',' ',' ',' ',' ','Ň') + call s:Accents('o','ò','ó','ô','ö','õ','ȯ','Å',' ','Å‘','Ç«',' ','Å','Ç’') + call s:Accents('O','Ã’','Ó','Ô','Ö','Õ','È®','ÅŒ',' ','Å','Ǫ',' ','ÅŽ','Ç‘') + call s:Accents('r',' ','Å•',' ',' ',' ',' ',' ','Å—',' ',' ',' ',' ','Å™') + call s:Accents('R',' ','Å”',' ',' ',' ',' ',' ','Å–',' ',' ',' ',' ','Ř') + call s:Accents('s',' ','Å›','Å',' ',' ',' ',' ','ÅŸ',' ','È¿',' ',' ','Å¡') + call s:Accents('S',' ','Åš','Åœ',' ',' ',' ',' ','Åž',' ',' ',' ',' ','Å ') + call s:Accents('t',' ',' ',' ',' ',' ',' ',' ','Å£',' ',' ',' ',' ','Å¥') + call s:Accents('T',' ',' ',' ',' ',' ',' ',' ','Å¢',' ',' ',' ',' ','Ť') + call s:Accents('u','ù','ú','û','ü','Å©',' ','Å«',' ','ű','ų','ů','Å­','Ç”') + call s:Accents('U','Ù','Ú','Û','Ü','Ũ',' ','Ū',' ','Ű','Ų','Å®','Ŭ','Ç“') + call s:Accents('w',' ',' ','ŵ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ') + call s:Accents('W',' ',' ','Å´',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ') + call s:Accents('y','ỳ','ý','Å·','ÿ','ỹ',' ',' ',' ',' ',' ',' ',' ',' ') + call s:Accents('Y','Ỳ','Ã','Ŷ','Ÿ','Ỹ',' ',' ',' ',' ',' ',' ',' ',' ') + call s:Accents('z',' ','ź',' ',' ',' ','ż',' ',' ',' ',' ',' ',' ','ž') + call s:Accents('Z',' ','Ź',' ',' ',' ','Å»',' ',' ',' ',' ',' ',' ','Ž') + call s:Accents('\\i','ì','í','î','ï','Ä©','į',' ',' ',' ',' ',' ','Ä­',' ') + " \` \' \^ \" \~ \. \= \c \H \k \r \u \v + delfun s:Accents + syn match texAccent '\\aa\>' conceal cchar=Ã¥ + syn match texAccent '\\AA\>' conceal cchar=Ã… + syn match texAccent '\\o\>' conceal cchar=ø + syn match texAccent '\\O\>' conceal cchar=Ø + syn match texLigature '\\AE\>' conceal cchar=Æ + syn match texLigature '\\ae\>' conceal cchar=æ + syn match texLigature '\\oe\>' conceal cchar=Å“ + syn match texLigature '\\OE\>' conceal cchar=Å’ + syn match texLigature '\\ss\>' conceal cchar=ß + endif + endif +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("s:tex_no_error") + if !exists("g: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 + + hi texBoldStyle gui=bold cterm=bold + hi texItalStyle gui=italic cterm=italic + hi texBoldItalStyle gui=bold,italic cterm=bold,italic + hi texItalBoldStyle gui=bold,italic cterm=bold,italic + 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 texAccent texStatement + HiLink texGreek texStatement + HiLink texSuperscript texStatement + HiLink texSubscript texStatement + HiLink texSuperscripts texSuperscript + HiLink texSubscripts texSubscript + HiLink texMathSymbol texStatement + HiLink texMathZoneV texMath + HiLink texMathZoneW texMath + HiLink texMathZoneX texMath + HiLink texMathZoneY texMath + HiLink texMathZoneV texMath + HiLink texMathZoneZ texMath + endif + HiLink texBeginEnd texCmdName + HiLink texBeginEndName 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 + +" Cleanup: {{{1 +unlet s:extfname +let b:current_syntax = "tex" +let &cpo = s:keepcpo +unlet s:keepcpo +" vim: ts=8 fdm=marker diff --git a/runtime/syntax/texinfo.vim b/runtime/syntax/texinfo.vim new file mode 100644 index 0000000000..134fc6763c --- /dev/null +++ b/runtime/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/runtime/syntax/texmf.vim b/runtime/syntax/texmf.vim new file mode 100644 index 0000000000..7b91168f08 --- /dev/null +++ b/runtime/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/runtime/syntax/tf.vim b/runtime/syntax/tf.vim new file mode 100644 index 0000000000..2a9a999883 --- /dev/null +++ b/runtime/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/runtime/syntax/tidy.vim b/runtime/syntax/tidy.vim new file mode 100644 index 0000000000..c24796edd1 --- /dev/null +++ b/runtime/syntax/tidy.vim @@ -0,0 +1,145 @@ +" Vim syntax file +" Language: HMTL Tidy configuration file (/etc/tidyrc ~/.tidyrc) +" Maintainer: Doug Kearns +" Last Change: 2013 June 01 + +if exists("b:current_syntax") + finish +endif + +setlocal iskeyword=@,48-57,- + +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 "\<\%(omit\|auto\|strict\|loose\|transitional\|user\)\>" 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 "\<\%(keep-first\|keep-last\)\>" 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 "^anchor-as-name" 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 "^decorate-inferred-ul" 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 "^merge-spans" 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 "^preserve-entities" 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 "^sort-attributes" 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 + +hi def link tidyBoolean Boolean +hi def link tidyComment Comment +hi def link tidyDelimiter Special +hi def link tidyDoctype Constant +hi def link tidyEncoding Constant +hi def link tidyNewline Constant +hi def link tidyNewTagDelimiter Special +hi def link tidyNewTagOption Identifier +hi def link tidyNewTagValue Constant +hi def link tidyNumber Number +hi def link tidyOption Identifier +hi def link tidyRepeat Constant +hi def link tidyString String +hi def link tidyTodo Todo + +let b:current_syntax = "tidy" + +" vim: ts=8 diff --git a/runtime/syntax/tilde.vim b/runtime/syntax/tilde.vim new file mode 100644 index 0000000000..3fdebf1e2e --- /dev/null +++ b/runtime/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/runtime/syntax/tli.vim b/runtime/syntax/tli.vim new file mode 100644 index 0000000000..5685a6cbf2 --- /dev/null +++ b/runtime/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/runtime/syntax/tpp.vim b/runtime/syntax/tpp.vim new file mode 100644 index 0000000000..050a2ba78d --- /dev/null +++ b/runtime/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/runtime/syntax/trasys.vim b/runtime/syntax/trasys.vim new file mode 100644 index 0000000000..cfecc1c1fd --- /dev/null +++ b/runtime/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/runtime/syntax/treetop.vim b/runtime/syntax/treetop.vim new file mode 100644 index 0000000000..921c5bea1d --- /dev/null +++ b/runtime/syntax/treetop.vim @@ -0,0 +1,110 @@ +" Vim syntax file +" Language: Treetop +" Maintainer: Nikolai Weibull +" Latest Revision: 2011-03-14 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword treetopTodo + \ contained + \ TODO + \ FIXME + \ XXX + \ NOTE + +syn match treetopComment + \ '#.*' + \ display + \ contains=treetopTodo + +syn include @treetopRuby syntax/ruby.vim +unlet b:current_syntax + +syn keyword treetopKeyword + \ require + \ end +syn region treetopKeyword + \ matchgroup=treetopKeyword + \ start='\<\%(grammar\|include\|module\)\>\ze\s' + \ end='$' + \ transparent + \ oneline + \ keepend + \ contains=@treetopRuby +syn keyword treetopKeyword + \ rule + \ nextgroup=treetopRuleName + \ skipwhite skipnl + +syn match treetopGrammarName + \ '\u\w*' + \ contained + +syn match treetopRubyModuleName + \ '\u\w*' + \ contained + +syn match treetopRuleName + \ '\h\w*' + \ contained + +syn region treetopString + \ matchgroup=treetopStringDelimiter + \ start=+"+ + \ end=+"+ +syn region treetopString + \ matchgroup=treetopStringDelimiter + \ start=+'+ + \ end=+'+ + +syn region treetopCharacterClass + \ matchgroup=treetopCharacterClassDelimiter + \ start=+\[+ + \ skip=+\\\]+ + \ end=+\]+ + +syn region treetopRubyBlock + \ matchgroup=treetopRubyBlockDelimiter + \ start=+{+ + \ end=+}+ + \ contains=@treetopRuby + +syn region treetopSemanticPredicate + \ matchgroup=treetopSemanticPredicateDelimiter + \ start=+[!&]{+ + \ end=+}+ + \ contains=@treetopRuby + +syn region treetopSubclassDeclaration + \ matchgroup=treetopSubclassDeclarationDelimiter + \ start=+<+ + \ end=+>+ + \ contains=@treetopRuby + +syn match treetopEllipsis + \ +''+ + +hi def link treetopTodo Todo +hi def link treetopComment Comment +hi def link treetopKeyword Keyword +hi def link treetopGrammarName Constant +hi def link treetopRubyModuleName Constant +hi def link treetopRuleName Identifier +hi def link treetopString String +hi def link treetopStringDelimiter treetopString +hi def link treetopCharacterClass treetopString +hi def link treetopCharacterClassDelimiter treetopCharacterClass +hi def link treetopRubyBlockDelimiter PreProc +hi def link treetopSemanticPredicateDelimiter PreProc +hi def link treetopSubclassDeclarationDelimiter PreProc +hi def link treetopEllipsis Special + +let b:current_syntax = 'treetop' + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/trustees.vim b/runtime/syntax/trustees.vim new file mode 100644 index 0000000000..4bc8874772 --- /dev/null +++ b/runtime/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/runtime/syntax/tsalt.vim b/runtime/syntax/tsalt.vim new file mode 100644 index 0000000000..887d6b75e7 --- /dev/null +++ b/runtime/syntax/tsalt.vim @@ -0,0 +1,219 @@ +" Vim syntax file +" Language: Telix (Modem Comm Program) SALT Script +" Maintainer: Sean M. McKee +" Last Change: 2012 Feb 03 by Thilo Six +" 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 + +let s:cpo_save = &cpo +set cpo&vim + +" 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" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 diff --git a/runtime/syntax/tsscl.vim b/runtime/syntax/tsscl.vim new file mode 100644 index 0000000000..3fc18c6847 --- /dev/null +++ b/runtime/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/runtime/syntax/tssgm.vim b/runtime/syntax/tssgm.vim new file mode 100644 index 0000000000..b8182d48ea --- /dev/null +++ b/runtime/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/runtime/syntax/tssop.vim b/runtime/syntax/tssop.vim new file mode 100644 index 0000000000..d416df054c --- /dev/null +++ b/runtime/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/runtime/syntax/tt2.vim b/runtime/syntax/tt2.vim new file mode 100644 index 0000000000..5321e277da --- /dev/null +++ b/runtime/syntax/tt2.vim @@ -0,0 +1,210 @@ +" Language: TT2 (Perl Template Toolkit) +" Maintainer: vim-perl +" Author: Moriki, Atsushi <4woods+vim@gmail.com> +" Homepage: http://github.com/vim-perl/vim-perl +" Bugs/requests: http://github.com/vim-perl/vim-perl/issues +" Last Change: 2013-07-21 +" +" Instration: +" put tt2.vim and tt2html.vim in to your syntax diretory. +" +" add below in your filetype.vim. +" au BufNewFile,BufRead *.tt2 setf tt2 +" or +" au BufNewFile,BufRead *.tt2 +" \ if ( getline(1) . getline(2) . getline(3) =~ '<\chtml' | +" \ && getline(1) . getline(2) . getline(3) !~ '<[%?]' ) | +" \ || getline(1) =~ '' +" "PHP" +" :let b:tt2_syn_tags = '' +" "TT2 and HTML" +" :let b:tt2_syn_tags = '\[% %] ' +" +" Changes: +" 0.1.3 +" Changed fileformat from 'dos' to 'unix' +" Deleted 'echo' that print obstructive message +" 0.1.2 +" Added block comment syntax +" e.g. [%# COMMENT +" COMMENT TOO %] +" [%# IT'S SAFE %] HERE IS OUTSIDE OF TT2 DIRECTIVE +" [% # WRONG!! %] HERE STILL BE COMMENT +" 0.1.1 +" Release +" 0.1.0 +" Internal +" +" License: follow Vim :help uganda +" + +if !exists("b:tt2_syn_tags") + let b:tt2_syn_tags = '\[% %]' + "let b:tt2_syn_tags = '\[% %] \[\* \*]' +endif + +if !exists("b:tt2_syn_inc_perl") + let b:tt2_syn_inc_perl = 1 +endif + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn case match + +syn cluster tt2_top_cluster contains=tt2_perlcode,tt2_tag_region + +" TT2 TAG Region +if exists("b:tt2_syn_tags") + + let s:str = b:tt2_syn_tags . ' ' + let s:str = substitute(s:str,'^ \+','','g') + let s:str = substitute(s:str,' \+',' ','g') + + while stridx(s:str,' ') > 0 + + let s:st = strpart(s:str,0,stridx(s:str,' ')) + let s:str = substitute(s:str,'[^ ]* ','',"") + + let s:ed = strpart(s:str,0,stridx(s:str,' ')) + let s:str = substitute(s:str,'[^ ]* ','',"") + + exec 'syn region tt2_tag_region '. + \ 'matchgroup=tt2_tag '. + \ 'start=+\(' . s:st .'\)[-]\=+ '. + \ 'end=+[-]\=\(' . s:ed . '\)+ '. + \ 'contains=@tt2_statement_cluster keepend extend' + + exec 'syn region tt2_commentblock_region '. + \ 'matchgroup=tt2_tag '. + \ 'start=+\(' . s:st .'\)[-]\=\(#\)\@=+ '. + \ 'end=+[-]\=\(' . s:ed . '\)+ '. + \ 'keepend extend' + + "Include Perl syntax when 'PERL' 'RAWPERL' block + if b:tt2_syn_inc_perl + syn include @Perl $VIMRUNTIME/syntax/perl.vim + exec 'syn region tt2_perlcode '. + \ 'start=+\(\(RAW\)\=PERL\s*[-]\=' . s:ed . '\(\n\)\=\)\@<=+ ' . + \ 'end=+' . s:st . '[-]\=\s*END+me=s-1 contains=@Perl keepend' + endif + + "echo 'TAGS ' . s:st . ' ' . s:ed + unlet s:st + unlet s:ed + endwhile + +else + + syn region tt2_tag_region + \ matchgroup=tt2_tag + \ start=+\(\[%\)[-]\=+ + \ end=+[-]\=%\]+ + \ contains=@tt2_statement_cluster keepend extend + + syn region tt2_commentblock_region + \ matchgroup=tt2_tag + \ start=+\(\[%\)[-]\=#+ + \ end=+[-]\=%\]+ + \ keepend extend + + "Include Perl syntax when 'PERL' 'RAWPERL' block + if b:tt2_syn_inc_perl + syn include @Perl $VIMRUNTIME/syntax/perl.vim + syn region tt2_perlcode + \ start=+\(\(RAW\)\=PERL\s*[-]\=%]\(\n\)\=\)\@<=+ + \ end=+\[%[-]\=\s*END+me=s-1 + \ contains=@Perl keepend + endif +endif + +" Directive +syn keyword tt2_directive contained + \ GET CALL SET DEFAULT DEBUG + \ LAST NEXT BREAK STOP BLOCK + \ IF IN UNLESS ELSIF FOR FOREACH WHILE SWITCH CASE + \ USE PLUGIN MACRO META + \ TRY FINAL RETURN LAST + \ CLEAR TO STEP AND OR NOT MOD DIV + \ ELSE PERL RAWPERL END +syn match tt2_directive +|+ contained +syn keyword tt2_directive contained nextgroup=tt2_string_q,tt2_string_qq,tt2_blockname skipwhite skipempty + \ INSERT INCLUDE PROCESS WRAPPER FILTER + \ THROW CATCH +syn keyword tt2_directive contained nextgroup=tt2_def_tag skipwhite skipempty + \ TAGS + +syn match tt2_def_tag "\S\+\s\+\S\+\|\<\w\+\>" contained + +syn match tt2_variable +\I\w*+ contained +syn match tt2_operator "[+*/%:?-]" contained +syn match tt2_operator "\<\(mod\|div\|or\|and\|not\)\>" contained +syn match tt2_operator "[!=<>]=\=\|&&\|||" contained +syn match tt2_operator "\(\s\)\@<=_\(\s\)\@=" contained +syn match tt2_operator "=>\|," contained +syn match tt2_deref "\([[:alnum:]_)\]}]\s*\)\@<=\." contained +syn match tt2_comment +#.*$+ contained extend +syn match tt2_func +\<\I\w*\(\s*(\)\@=+ contained nextgroup=tt2_bracket_r skipempty skipwhite +" +syn region tt2_bracket_r start=+(+ end=+)+ contained contains=@tt2_statement_cluster keepend extend +syn region tt2_bracket_b start=+\[+ end=+]+ contained contains=@tt2_statement_cluster keepend extend +syn region tt2_bracket_b start=+{+ end=+}+ contained contains=@tt2_statement_cluster keepend extend + +syn region tt2_string_qq start=+"+ end=+"+ skip=+\\"+ contained contains=tt2_ivariable keepend extend +syn region tt2_string_q start=+'+ end=+'+ skip=+\\'+ contained keepend extend + +syn match tt2_ivariable +\$\I\w*\>\(\.\I\w*\>\)*+ contained +syn match tt2_ivariable +\${\I\w*\>\(\.\I\w*\>\)*}+ contained + +syn match tt2_number "\d\+" contained +syn match tt2_number "\d\+\.\d\+" contained +syn match tt2_number "0x\x\+" contained +syn match tt2_number "0\o\+" contained + +syn match tt2_blockname "\f\+" contained nextgroup=tt2_blockname_joint skipwhite skipempty +syn match tt2_blockname "$\w\+" contained contains=tt2_ivariable nextgroup=tt2_blockname_joint skipwhite skipempty +syn region tt2_blockname start=+"+ end=+"+ skip=+\\"+ contained contains=tt2_ivariable nextgroup=tt2_blockname_joint keepend skipwhite skipempty +syn region tt2_blockname start=+'+ end=+'+ skip=+\\'+ contained nextgroup=tt2_blockname_joint keepend skipwhite skipempty +syn match tt2_blockname_joint "+" contained nextgroup=tt2_blockname skipwhite skipempty + +syn cluster tt2_statement_cluster contains=tt2_directive,tt2_variable,tt2_operator,tt2_string_q,tt2_string_qq,tt2_deref,tt2_comment,tt2_func,tt2_bracket_b,tt2_bracket_r,tt2_number + +" Synchronizing +syn sync minlines=50 + +hi def link tt2_tag Type +hi def link tt2_tag_region Type +hi def link tt2_commentblock_region Comment +hi def link tt2_directive Statement +hi def link tt2_variable Identifier +hi def link tt2_ivariable Identifier +hi def link tt2_operator Statement +hi def link tt2_string_qq String +hi def link tt2_string_q String +hi def link tt2_blockname String +hi def link tt2_comment Comment +hi def link tt2_func Function +hi def link tt2_number Number + +if exists("b:tt2_syn_tags") + unlet b:tt2_syn_tags +endif + +let b:current_syntax = "tt2" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim:ts=4:sw=4 diff --git a/runtime/syntax/tt2html.vim b/runtime/syntax/tt2html.vim new file mode 100644 index 0000000000..ac5744f39d --- /dev/null +++ b/runtime/syntax/tt2html.vim @@ -0,0 +1,20 @@ +" Language: TT2 embedded with HTML +" Maintainer: vim-perl +" Author: Moriki, Atsushi <4woods+vim@gmail.com> +" Homepage: http://github.com/vim-perl/vim-perl +" Bugs/requests: http://github.com/vim-perl/vim-perl/issues +" Last Change: 2013-07-21 + +if exists("b:current_syntax") + finish +endif + +runtime! syntax/html.vim +unlet b:current_syntax + +runtime! syntax/tt2.vim +unlet b:current_syntax + +syn cluster htmlPreProc add=@tt2_top_cluster + +let b:current_syntax = "tt2html" diff --git a/runtime/syntax/tt2js.vim b/runtime/syntax/tt2js.vim new file mode 100644 index 0000000000..350df57d4c --- /dev/null +++ b/runtime/syntax/tt2js.vim @@ -0,0 +1,20 @@ +" Language: TT2 embedded with Javascript +" Maintainer: Andy Lester +" Author: Yates, Peter +" Homepage: http://github.com/vim-perl/vim-perl +" Bugs/requests: http://github.com/vim-perl/vim-perl/issues +" Last Change: 2013-07-21 + +if exists("b:current_syntax") + finish +endif + +runtime! syntax/javascript.vim +unlet b:current_syntax + +runtime! syntax/tt2.vim +unlet b:current_syntax + +syn cluster javascriptPreProc add=@tt2_top_cluster + +let b:current_syntax = "tt2js" diff --git a/runtime/syntax/uc.vim b/runtime/syntax/uc.vim new file mode 100644 index 0000000000..7eab1d48ae --- /dev/null +++ b/runtime/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/runtime/syntax/udevconf.vim b/runtime/syntax/udevconf.vim new file mode 100644 index 0000000000..a294604906 --- /dev/null +++ b/runtime/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/runtime/syntax/udevperm.vim b/runtime/syntax/udevperm.vim new file mode 100644 index 0000000000..9d3af09d07 --- /dev/null +++ b/runtime/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/runtime/syntax/udevrules.vim b/runtime/syntax/udevrules.vim new file mode 100644 index 0000000000..b04d728865 --- /dev/null +++ b/runtime/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/runtime/syntax/uil.vim b/runtime/syntax/uil.vim new file mode 100644 index 0000000000..b5421bcfdb --- /dev/null +++ b/runtime/syntax/uil.vim @@ -0,0 +1,85 @@ +" Vim syntax file +" Language: Motif UIL (User Interface Language) +" Maintainer: Thomas Koehler +" Last Change: 2013 May 23 +" 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 constants +" Highlight special characters (those which have a backslash) differently +syn match uilSpecial contained "\\\d\d\d\|\\." +syn region uilString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell,uilSpecial +syn match uilCharacter "'[^\\]'" +syn region uilString start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@Spell,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]\x\+\>" + +syn region uilComment start="/\*" end="\*/" contains=@Spell,uilTodo +syn match uilComment "!.*" contains=@Spell,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/runtime/syntax/updatedb.vim b/runtime/syntax/updatedb.vim new file mode 100644 index 0000000000..7c082d62df --- /dev/null +++ b/runtime/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/runtime/syntax/upstart.vim b/runtime/syntax/upstart.vim new file mode 100644 index 0000000000..b3f2b9e637 --- /dev/null +++ b/runtime/syntax/upstart.vim @@ -0,0 +1,112 @@ +" Vim syntax file +" Language: Upstart job files +" Maintainer: Michael Biebl +" James Hunt +" Last Change: 2012 Jan 16 +" License: The Vim license +" Version: 0.4 +" Remark: Syntax highlighting for Upstart (init(8)) job files. +" +" It is inspired by the initng syntax file and includes sh.vim to do the +" highlighting of script blocks. + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +let is_bash = 1 +syn include @Shell syntax/sh.vim + +syn case match + +" avoid need to use 'match' for most events +setlocal iskeyword+=- + +syn match upstartComment /#.*$/ contains=upstartTodo +syn keyword upstartTodo TODO FIXME contained + +syn region upstartString start=/"/ end=/"/ skip=/\\"/ + +syn region upstartScript matchgroup=upstartStatement start="script" end="end script" contains=@upstartShellCluster + +syn cluster upstartShellCluster contains=@Shell + +" one argument +syn keyword upstartStatement description author version instance expect +syn keyword upstartStatement pid kill normal console env exit export +syn keyword upstartStatement umask nice oom chroot chdir exec + +" two arguments +syn keyword upstartStatement limit + +" one or more arguments (events) +syn keyword upstartStatement emits + +syn keyword upstartStatement on start stop + +" flag, no parameter +syn keyword upstartStatement respawn service instance manual debug task + +" prefix for exec or script +syn keyword upstartOption pre-start post-start pre-stop post-stop + +" option for kill +syn keyword upstartOption timeout +" option for oom +syn keyword upstartOption never +" options for console +syn keyword upstartOption output owner +" options for expect +syn keyword upstartOption fork daemon +" options for limit +syn keyword upstartOption unlimited + +" 'options' for start/stop on +syn keyword upstartOption and or + +" Upstart itself and associated utilities +syn keyword upstartEvent runlevel +syn keyword upstartEvent started +syn keyword upstartEvent starting +syn keyword upstartEvent startup +syn keyword upstartEvent stopped +syn keyword upstartEvent stopping +syn keyword upstartEvent control-alt-delete +syn keyword upstartEvent keyboard-request +syn keyword upstartEvent power-status-changed + +" D-Bus +syn keyword upstartEvent dbus-activation + +" Display Manager (ie gdm) +syn keyword upstartEvent desktop-session-start +syn keyword upstartEvent login-session-start + +" mountall +syn keyword upstartEvent all-swaps +syn keyword upstartEvent filesystem +syn keyword upstartEvent mounted +syn keyword upstartEvent mounting +syn keyword upstartEvent local-filesystems +syn keyword upstartEvent remote-filesystems +syn keyword upstartEvent virtual-filesystems + +" SysV umountnfs.sh +syn keyword upstartEvent mounted-remote-filesystems + +" upstart-udev-bridge and ifup/down +syn match upstartEvent /\<\i\{-1,}-device-\(added\|removed\|up\|down\)/ + +" upstart-socket-bridge +syn keyword upstartEvent socket + +hi def link upstartComment Comment +hi def link upstartTodo Todo +hi def link upstartString String +hi def link upstartStatement Statement +hi def link upstartOption Type +hi def link upstartEvent Define + +let b:current_syntax = "upstart" diff --git a/runtime/syntax/upstreamdat.vim b/runtime/syntax/upstreamdat.vim new file mode 100644 index 0000000000..7be806730d --- /dev/null +++ b/runtime/syntax/upstreamdat.vim @@ -0,0 +1,296 @@ +" Vim syntax file +" Language: Innovation Data Processing upstream.dat file +" Maintainer: Rob Owens +" Latest Revision: 2013-06-17 + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn keyword upstreamdat_Parameter ACCEPTPCREMOTE +syn keyword upstreamdat_Parameter ACCEPTREMOTE +syn keyword upstreamdat_Parameter ACTION +syn keyword upstreamdat_Parameter ACTIVATEONENTRY +syn keyword upstreamdat_Parameter ARCHIVEBIT +syn keyword upstreamdat_Parameter ARCHIVEBIT +syn keyword upstreamdat_Parameter ASCTOEBC +syn keyword upstreamdat_Parameter ASRBACKUP +syn keyword upstreamdat_Parameter ATTENDED +syn keyword upstreamdat_Parameter AUTHORITATIVE +syn keyword upstreamdat_Parameter AUTHORITATIVERESTORE +syn keyword upstreamdat_Parameter AUTHORITATIVERESTORE +syn keyword upstreamdat_Parameter BACKUPPROFILE +syn keyword upstreamdat_Parameter BACKUPPROFILE2 +syn keyword upstreamdat_Parameter BACKUPREPARSEFILES +syn keyword upstreamdat_Parameter BACKUPREPARSEFILES +syn keyword upstreamdat_Parameter BACKUPVERIFY +syn keyword upstreamdat_Parameter BLANKTRUNC +syn keyword upstreamdat_Parameter CALCDASDSIZE +syn keyword upstreamdat_Parameter CHANGEDIRATTRIBS +syn keyword upstreamdat_Parameter CHANGEDIRATTRIBS +syn keyword upstreamdat_Parameter COMPRESSLEVEL +syn keyword upstreamdat_Parameter CONTROLFILE +syn keyword upstreamdat_Parameter DASDOVERRIDE +syn keyword upstreamdat_Parameter DATELIMIT +syn keyword upstreamdat_Parameter DATELIMIT +syn keyword upstreamdat_Parameter DAYSOLD +syn keyword upstreamdat_Parameter DAYSOLD +syn keyword upstreamdat_Parameter DELETED +syn keyword upstreamdat_Parameter DELETED +syn keyword upstreamdat_Parameter DELETEPROMPTS +syn keyword upstreamdat_Parameter DELETEPROMPTS +syn keyword upstreamdat_Parameter DESTINATION +syn keyword upstreamdat_Parameter DESTINATION +syn keyword upstreamdat_Parameter DIRDELETE +syn keyword upstreamdat_Parameter DIRECTORVMC +syn keyword upstreamdat_Parameter DIRONLYRESTOREOK +syn keyword upstreamdat_Parameter DIRSONLY +syn keyword upstreamdat_Parameter DIRSONLY +syn keyword upstreamdat_Parameter DISASTERRECOVERY +syn keyword upstreamdat_Parameter DISPLAY +syn keyword upstreamdat_Parameter DRIVEALIAS +syn keyword upstreamdat_Parameter DRIVEALIAS +syn keyword upstreamdat_Parameter DUALCOPY +syn keyword upstreamdat_Parameter DUPDAYS +syn keyword upstreamdat_Parameter DUPLICATE +syn keyword upstreamdat_Parameter EBCTOASC +syn keyword upstreamdat_Parameter ENCRYPT +syn keyword upstreamdat_Parameter ENCRYPTLEVEL +syn keyword upstreamdat_Parameter EXCLUDELISTNAME +syn keyword upstreamdat_Parameter FAILBACKUPONERROR +syn keyword upstreamdat_Parameter FAILBACKUPONERROR +syn keyword upstreamdat_Parameter FAILIFNOFILES +syn keyword upstreamdat_Parameter FAILIFNOFILES +syn keyword upstreamdat_Parameter FAILIFSKIP +syn keyword upstreamdat_Parameter FAILJOB +syn keyword upstreamdat_Parameter FAILRESTOREONERROR +syn keyword upstreamdat_Parameter FAILRESTOREONERROR +syn keyword upstreamdat_Parameter FILEDATE +syn keyword upstreamdat_Parameter FILEDATE +syn keyword upstreamdat_Parameter FILEDELETE +syn keyword upstreamdat_Parameter FILEDELETE +syn keyword upstreamdat_Parameter FILES +syn keyword upstreamdat_Parameter FILES +syn keyword upstreamdat_Parameter FILESOPENFORUPDAT +syn keyword upstreamdat_Parameter FILESOPENFORUPDAT +syn keyword upstreamdat_Parameter FILETRANSFER +syn keyword upstreamdat_Parameter GETREMOTEFILES +syn keyword upstreamdat_Parameter HARDLINKDB +syn keyword upstreamdat_Parameter HARDLINKS +syn keyword upstreamdat_Parameter HARDLINKS +syn keyword upstreamdat_Parameter HIDDENFILES +syn keyword upstreamdat_Parameter HIDDENFILES +syn keyword upstreamdat_Parameter HOLDTAPE +syn keyword upstreamdat_Parameter HOLDUSERDIRS +syn keyword upstreamdat_Parameter HOSTFILENAME +syn keyword upstreamdat_Parameter HOSTRECORD +syn keyword upstreamdat_Parameter HOSTSORT +syn keyword upstreamdat_Parameter IGNOREPLUGINSFORRESTORE +syn keyword upstreamdat_Parameter INCRDB +syn keyword upstreamdat_Parameter INCRDBARCHIVEBIT +syn keyword upstreamdat_Parameter INCRDBDELETEDFILES +syn keyword upstreamdat_Parameter INCREMENTAL +syn keyword upstreamdat_Parameter INCREMENTAL +syn keyword upstreamdat_Parameter INQOPTIONS +syn keyword upstreamdat_Parameter INSTALLWIN2KAGENT +syn keyword upstreamdat_Parameter INSTALLWIN2KAGENT +syn keyword upstreamdat_Parameter JOBOPTIONS +syn keyword upstreamdat_Parameter JOBRETURNCODEMAP +syn keyword upstreamdat_Parameter JOBWAITTIMELIMIT +syn keyword upstreamdat_Parameter KEEPALIVE +syn keyword upstreamdat_Parameter LANINTERFACE +syn keyword upstreamdat_Parameter LANWSNAME +syn keyword upstreamdat_Parameter LANWSPASSWORD +syn keyword upstreamdat_Parameter LASTACCESS +syn keyword upstreamdat_Parameter LASTACCESS +syn keyword upstreamdat_Parameter LATESTDATE +syn keyword upstreamdat_Parameter LATESTDATE +syn keyword upstreamdat_Parameter LATESTTIME +syn keyword upstreamdat_Parameter LATESTTIME +syn keyword upstreamdat_Parameter LATESTVERSION +syn keyword upstreamdat_Parameter LINEBLOCK +syn keyword upstreamdat_Parameter LINETRUNC +syn keyword upstreamdat_Parameter LISTENFORREMOTE +syn keyword upstreamdat_Parameter LOCALBACKUP +syn keyword upstreamdat_Parameter LOCALBACKUPDIR +syn keyword upstreamdat_Parameter LOCALBACKUPMAX +syn keyword upstreamdat_Parameter LOCALBACKUPMAXFILESIZE +syn keyword upstreamdat_Parameter LOCALBACKUPMAXSIZE +syn keyword upstreamdat_Parameter LOCALEXCLUDEFILE +syn keyword upstreamdat_Parameter LOCALPARAMETERS +syn keyword upstreamdat_Parameter LOCALPASSWORD +syn keyword upstreamdat_Parameter LOCALRESTORE +syn keyword upstreamdat_Parameter LOCALUSER +syn keyword upstreamdat_Parameter LOFS +syn keyword upstreamdat_Parameter LOGNONFATAL +syn keyword upstreamdat_Parameter MAXBACKUPFILESFAIL +syn keyword upstreamdat_Parameter MAXBACKUPTIME +syn keyword upstreamdat_Parameter MAXDUPS +syn keyword upstreamdat_Parameter MAXFILENAMESIZE +syn keyword upstreamdat_Parameter MAXKFILESIZE +syn keyword upstreamdat_Parameter MAXLOGDAYS +syn keyword upstreamdat_Parameter MAXRESTOREFILESFAIL +syn keyword upstreamdat_Parameter MAXRESTORETIME +syn keyword upstreamdat_Parameter MAXRETRY +syn keyword upstreamdat_Parameter MAXRPTDAYS +syn keyword upstreamdat_Parameter MERGE +syn keyword upstreamdat_Parameter MIGRBITS +syn keyword upstreamdat_Parameter MIGRBITS +syn keyword upstreamdat_Parameter MINCOMPRESSSIZE +syn keyword upstreamdat_Parameter MINIMIZE +syn keyword upstreamdat_Parameter MODIFYFILE +syn keyword upstreamdat_Parameter MOUNTPOINTS +syn keyword upstreamdat_Parameter MOUNTPOINTS +syn keyword upstreamdat_Parameter NDS +syn keyword upstreamdat_Parameter NDS +syn keyword upstreamdat_Parameter NEWFILECOMPARE +syn keyword upstreamdat_Parameter NFSBELOW +syn keyword upstreamdat_Parameter NODATAOK +syn keyword upstreamdat_Parameter NODIRFORINCREMENTAL +syn keyword upstreamdat_Parameter NODIRFORINCREMENTAL +syn keyword upstreamdat_Parameter NONFILEDATABITMAP +syn keyword upstreamdat_Parameter NONFILEDATABITMAP +syn keyword upstreamdat_Parameter NOPOINTRESTORE +syn keyword upstreamdat_Parameter NOSPECINHERITANCE +syn keyword upstreamdat_Parameter NOTIFYEVENTS +syn keyword upstreamdat_Parameter NOTIFYFAILUREATTACHMENT +syn keyword upstreamdat_Parameter NOTIFYSUCCESSATTACHMENT +syn keyword upstreamdat_Parameter NOTIFYTARGETS +syn keyword upstreamdat_Parameter NOUIDGIDNAMES +syn keyword upstreamdat_Parameter NOUIDGIDNAMES +syn keyword upstreamdat_Parameter NOVELLMIGRATE +syn keyword upstreamdat_Parameter NOVELLMIGRATE +syn keyword upstreamdat_Parameter NOVELLMIGRATEADDEXT +syn keyword upstreamdat_Parameter NOVELLMIGRATEADDEXT +syn keyword upstreamdat_Parameter NOVELLPROFILE +syn keyword upstreamdat_Parameter NOVELLRECALL +syn keyword upstreamdat_Parameter NTFSADDPERMISSION +syn keyword upstreamdat_Parameter NTFSADDPERMISSION +syn keyword upstreamdat_Parameter NTREGRESTORE +syn keyword upstreamdat_Parameter OSTYPE +syn keyword upstreamdat_Parameter OUTPORT +syn keyword upstreamdat_Parameter PACKFLUSHAFTERFILE +syn keyword upstreamdat_Parameter PACKRECSIZE +syn keyword upstreamdat_Parameter PARAMETER +syn keyword upstreamdat_Parameter PASSWORD +syn keyword upstreamdat_Parameter PATHNAME +syn keyword upstreamdat_Parameter PATHNAME +syn keyword upstreamdat_Parameter PERFORMBITMAP +syn keyword upstreamdat_Parameter PERFORMNUMRECORDS +syn keyword upstreamdat_Parameter PERFORMRECORDSIZE +syn keyword upstreamdat_Parameter PLUGIN +syn keyword upstreamdat_Parameter PLUGIN +syn keyword upstreamdat_Parameter PLUGINPARAMETERS +syn keyword upstreamdat_Parameter PLUGINPARAMETERS +syn keyword upstreamdat_Parameter POSTJOB +syn keyword upstreamdat_Parameter PREJOB +syn keyword upstreamdat_Parameter PRTYCLASS +syn keyword upstreamdat_Parameter PRTYLEVEL +syn keyword upstreamdat_Parameter RECALLCLEANUP +syn keyword upstreamdat_Parameter RECALLOFFLINEFILES +syn keyword upstreamdat_Parameter RECALLOFFLINEFILES +syn keyword upstreamdat_Parameter RECORDSIZE +syn keyword upstreamdat_Parameter REMOTEADDR +syn keyword upstreamdat_Parameter REMOTEAPPLPREF +syn keyword upstreamdat_Parameter REMOTEAPPLRETRY +syn keyword upstreamdat_Parameter REMOTECONNECTTYPE +syn keyword upstreamdat_Parameter REMOTEFLAGS +syn keyword upstreamdat_Parameter REMOTEIPADAPTER +syn keyword upstreamdat_Parameter REMOTELOCALPARAMETERS +syn keyword upstreamdat_Parameter REMOTELOGMODE +syn keyword upstreamdat_Parameter REMOTELUNAME +syn keyword upstreamdat_Parameter REMOTEMAXRETRIES +syn keyword upstreamdat_Parameter REMOTEMODENAME +syn keyword upstreamdat_Parameter REMOTEPARAMETERFILE +syn keyword upstreamdat_Parameter REMOTEPORT +syn keyword upstreamdat_Parameter REMOTEREQUEST +syn keyword upstreamdat_Parameter REMOTERESTART +syn keyword upstreamdat_Parameter REMOTEROUTE +syn keyword upstreamdat_Parameter REMOTETARGETNAME +syn keyword upstreamdat_Parameter REMOTETCP +syn keyword upstreamdat_Parameter REMOTETIMEOUT +syn keyword upstreamdat_Parameter REMOTETMAXRETRY +syn keyword upstreamdat_Parameter REMOTETPN +syn keyword upstreamdat_Parameter REMOTEUSAPPL +syn keyword upstreamdat_Parameter REMOTEVERIFY +syn keyword upstreamdat_Parameter REMOTEWTOCOMP +syn keyword upstreamdat_Parameter REPORTNAME +syn keyword upstreamdat_Parameter REPORTOPTIONS +syn keyword upstreamdat_Parameter RESTARTLASTFILE +syn keyword upstreamdat_Parameter RESTART +syn keyword upstreamdat_Parameter RESTARTTYPE +syn keyword upstreamdat_Parameter RESTARTVERSIONDATE +syn keyword upstreamdat_Parameter RESTOREARCHIVEBIT +syn keyword upstreamdat_Parameter RESTORECHECKPOINT +syn keyword upstreamdat_Parameter RESTOREDATELIMIT +syn keyword upstreamdat_Parameter RESTOREDATELIMIT +syn keyword upstreamdat_Parameter RESTOREFILEFAIL +syn keyword upstreamdat_Parameter RESTOREMOUNTPOINTS +syn keyword upstreamdat_Parameter RESTOREMOUNTPOINTS +syn keyword upstreamdat_Parameter RESTORESEGMENTS +syn keyword upstreamdat_Parameter RESTORESEGMENTS +syn keyword upstreamdat_Parameter RESTORETODIFFFS +syn keyword upstreamdat_Parameter RETAIN +syn keyword upstreamdat_Parameter RETAIN +syn keyword upstreamdat_Parameter ROOTENTRY +syn keyword upstreamdat_Parameter ROOTENTRY +syn keyword upstreamdat_Parameter SAN +syn keyword upstreamdat_Parameter SCHEDULENAME +syn keyword upstreamdat_Parameter SEGMENTEDFILESIZE +syn keyword upstreamdat_Parameter SEGMENTEDFILESIZE +syn keyword upstreamdat_Parameter SEGMENTSIZE +syn keyword upstreamdat_Parameter SEGMENTSIZE +syn keyword upstreamdat_Parameter SENDHOSTDETAILS +syn keyword upstreamdat_Parameter SINGLEFS +syn keyword upstreamdat_Parameter SIZETRC +syn keyword upstreamdat_Parameter SKIP +syn keyword upstreamdat_Parameter SKIPBACKUPSCAN +syn keyword upstreamdat_Parameter SKIPOLD +syn keyword upstreamdat_Parameter SKIPOLD +syn keyword upstreamdat_Parameter SMSTARGETSERVICENAME +syn keyword upstreamdat_Parameter SMSTSA +syn keyword upstreamdat_Parameter SOLO +syn keyword upstreamdat_Parameter SORTBACKUP +syn keyword upstreamdat_Parameter SOSDISK +syn keyword upstreamdat_Parameter SOSDISK +syn keyword upstreamdat_Parameter SOSTIMESTAMP +syn keyword upstreamdat_Parameter SOSTIMESTAMP +syn keyword upstreamdat_Parameter SOSTIMESTAMPPATH +syn keyword upstreamdat_Parameter SOSTIMESTAMPPATH +syn keyword upstreamdat_Parameter SPECNUMBER +syn keyword upstreamdat_Parameter SPECNUMBER +syn keyword upstreamdat_Parameter SPECTYPE +syn keyword upstreamdat_Parameter SPECTYPE +syn keyword upstreamdat_Parameter STARTTIME +syn keyword upstreamdat_Parameter STORAGETYPE +syn keyword upstreamdat_Parameter SUBDIRECTORIES +syn keyword upstreamdat_Parameter SUBDIRECTORIES +syn keyword upstreamdat_Parameter SWITCHTOTAPEMB +syn keyword upstreamdat_Parameter TCPADDRESS +syn keyword upstreamdat_Parameter TCPTIMEOUT +syn keyword upstreamdat_Parameter TIMEOVERRIDE +syn keyword upstreamdat_Parameter TRACE +syn keyword upstreamdat_Parameter TRANSLATE +syn keyword upstreamdat_Parameter ULTRACOMP +syn keyword upstreamdat_Parameter ULTREG +syn keyword upstreamdat_Parameter ULTUPD +syn keyword upstreamdat_Parameter UNCMACHINEALIAS +syn keyword upstreamdat_Parameter UNCMACHINEALIAS +syn keyword upstreamdat_Parameter USEALEBRA +syn keyword upstreamdat_Parameter USECONTROLFILE +syn keyword upstreamdat_Parameter USEGID +syn keyword upstreamdat_Parameter USERID +syn keyword upstreamdat_Parameter USEUID +syn keyword upstreamdat_Parameter USNOUIDGIDERRORS +syn keyword upstreamdat_Parameter UTF8 +syn keyword upstreamdat_Parameter VAULTNUMBER +syn keyword upstreamdat_Parameter VERSIONDATE +syn keyword upstreamdat_Parameter WRITESPARSE +syn keyword upstreamdat_Parameter XFERECORDSIZE +syn keyword upstreamdat_Parameter XFERRECSEP +syn keyword upstreamdat_Parameter XFERRECUSECR + +hi def link upstreamdat_Parameter Type + +let b:current_syntax = "upstreamdat" diff --git a/runtime/syntax/upstreaminstalllog.vim b/runtime/syntax/upstreaminstalllog.vim new file mode 100644 index 0000000000..fb23fdcca0 --- /dev/null +++ b/runtime/syntax/upstreaminstalllog.vim @@ -0,0 +1,27 @@ +" Vim syntax file +" Language: Innovation Data Processing UPSTREAMInstall.log file +" Maintainer: Rob Owens +" Latest Revision: 2013-06-17 + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Date: +syn match upstreaminstalllog_Date /\u\l\l \u\l\l\s\{1,2}\d\{1,2} \d\d:\d\d:\d\d \d\d\d\d/ +" Msg Types: +syn match upstreaminstalllog_MsgD /Msg #MSI\d\{4,5}D/ +syn match upstreaminstalllog_MsgE /Msg #MSI\d\{4,5}E/ +syn match upstreaminstalllog_MsgI /Msg #MSI\d\{4,5}I/ +syn match upstreaminstalllog_MsgW /Msg #MSI\d\{4,5}W/ +" IP Address: +syn match upstreaminstalllog_IPaddr / \d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ + +hi def link upstreaminstalllog_Date Underlined +hi def link upstreaminstalllog_MsgD Type +hi def link upstreaminstalllog_MsgE Error +hi def link upstreaminstalllog_MsgW Constant +hi def link upstreaminstalllog_IPaddr Identifier + +let b:current_syntax = "upstreaminstalllog" diff --git a/runtime/syntax/upstreamlog.vim b/runtime/syntax/upstreamlog.vim new file mode 100644 index 0000000000..1439bdffe6 --- /dev/null +++ b/runtime/syntax/upstreamlog.vim @@ -0,0 +1,54 @@ +" Vim syntax file +" Language: Innovation Data Processing upstream.log file +" Maintainer: Rob Owens +" Latest Revision: 2013-09-19 + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Date: +syn match upstreamlog_Date /\u\l\l \u\l\l\s\{1,2}\d\{1,2} \d\d:\d\d:\d\d \d\d\d\d/ +" Msg Types: +syn match upstreamlog_MsgD /Msg #\(Agt\|PC\|Srv\)\d\{4,5}D/ nextgroup=upstreamlog_Process skipwhite +syn match upstreamlog_MsgE /Msg #\(Agt\|PC\|Srv\)\d\{4,5}E/ nextgroup=upstreamlog_Process skipwhite +syn match upstreamlog_MsgI /Msg #\(Agt\|PC\|Srv\)\d\{4,5}I/ nextgroup=upstreamlog_Process skipwhite +syn match upstreamlog_MsgW /Msg #\(Agt\|PC\|Srv\)\d\{4,5}W/ nextgroup=upstreamlog_Process skipwhite +" Processes: +syn region upstreamlog_Process start="(" end=")" contained +" IP Address: +syn match upstreamlog_IPaddr /\( \|(\)\zs\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ +" Profile: +syn match upstreamlog_Profile /Using default configuration for profile \zs\S\{1,8}\ze/ +syn match upstreamlog_Profile /Now running profile \zs\S\{1,8}\ze/ +syn match upstreamlog_Profile /in profile set \zs\S\{1,8}\ze/ +syn match upstreamlog_Profile /Migrate disk backup from profile \zs\S\{1,8}\ze/ +syn match upstreamlog_Profile /Profileset=\zs\S\{1,8}\ze,/ +syn match upstreamlog_Profile /Vault \(disk\|tape\) backup to vault \d\{1,4} from profile \zs\S\{1,8}\ze/ +syn match upstreamlog_Profile /Profile name \zs\"\S\{1,8}\"/ +syn match upstreamlog_Profile / Profile: \zs\S\{1,8}/ +syn match upstreamlog_Profile / Profile: \zs\S\{1,8}\ze, / +syn match upstreamlog_Profile /, profile: \zs\S\{1,8}\ze,/ +syn match upstreamlog_Profile /found Profile: \zs\S\{1,8}\ze,/ +syn match upstreamlog_Profile /Backup Profile: \zs\S\{1,8}\ze Version date/ +syn match upstreamlog_Profile /Backup profile: \zs\S\{1,8}\ze Version date/ +syn match upstreamlog_Profile /Full of \zs\S\{1,8}\ze$/ +syn match upstreamlog_Profile /Incr. of \zs\S\{1,8}\ze$/ +syn match upstreamlog_Profile /Profile=\zs\S\{1,8}\ze,/ +" Target: +syn region upstreamlog_Target start="Computer: \zs" end="\ze[\]\)]" +syn region upstreamlog_Target start="Computer name \zs\"" end="\"\ze" +syn region upstreamlog_Target start="request to registered name \zs" end=" " + + +hi def link upstreamlog_Date Underlined +hi def link upstreamlog_MsgD Type +hi def link upstreamlog_MsgE Error +hi def link upstreamlog_MsgW Constant +hi def link upstreamlog_Process Statement +hi def link upstreamlog_IPaddr Identifier +hi def link upstreamlog_Profile Identifier +hi def link upstreamlog_Target Identifier + +let b:current_syntax = "upstreamlog" diff --git a/runtime/syntax/usserverlog.vim b/runtime/syntax/usserverlog.vim new file mode 100644 index 0000000000..34a7e3dca0 --- /dev/null +++ b/runtime/syntax/usserverlog.vim @@ -0,0 +1,60 @@ +" Vim syntax file +" Language: Innovation Data Processing usserver.log file +" Maintainer: Rob Owens +" Latest Revision: 2013-09-19 + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Date: +syn match usserverlog_Date /\u\l\l \u\l\l\s\{1,2}\d\{1,2} \d\d:\d\d:\d\d \d\d\d\d/ +" Msg Types: +syn match usserverlog_MsgD /Msg #\(Agt\|PC\|Srv\)\d\{4,5}D/ nextgroup=usserverlog_Process skipwhite +syn match usserverlog_MsgE /Msg #\(Agt\|PC\|Srv\)\d\{4,5}E/ nextgroup=usserverlog_Process skipwhite +syn match usserverlog_MsgI /Msg #\(Agt\|PC\|Srv\)\d\{4,5}I/ nextgroup=usserverlog_Process skipwhite +syn match usserverlog_MsgW /Msg #\(Agt\|PC\|Srv\)\d\{4,5}W/ nextgroup=usserverlog_Process skipwhite +" Processes: +syn region usserverlog_Process start="(" end=")" contained +" IP Address: +syn match usserverlog_IPaddr /\( \|(\)\zs\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ +" Profile: +syn match usserverlog_Profile /Using default configuration for profile \zs\S\{1,8}\ze/ +syn match usserverlog_Profile /Now running profile \zs\S\{1,8}\ze/ +syn match usserverlog_Profile /in profile set \zs\S\{1,8}\ze/ +syn match usserverlog_Profile /Migrate disk backup from profile \zs\S\{1,8}\ze/ +syn match usserverlog_Profile /Using profile prefix for profile \zs\S\{1,8}\ze/ +syn match usserverlog_Profile /Add\/update profile \zs\S\{1,8}\ze/ +syn match usserverlog_Profile /Profileset=\zs\S\{1,8}\ze,/ +syn match usserverlog_Profile /profileset=\zs\S\{1,8}\ze/ +syn match usserverlog_Profile /Vault \(disk\|tape\) backup to vault \d\{1,4} from profile \zs\S\{1,8}\ze/ +syn match usserverlog_Profile /Profile name \zs\"\S\{1,8}\"/ +syn match usserverlog_Profile / Profile: \zs\S\{1,8}/ +syn match usserverlog_Profile / Profile: \zs\S\{1,8}\ze, / +syn match usserverlog_Profile /, profile: \zs\S\{1,8}\ze,/ +syn match usserverlog_Profile /Expecting Profile: \zs\S\{1,8}\ze,/ +syn match usserverlog_Profile /found Profile: \zs\S\{1,8}\ze,/ +syn match usserverlog_Profile /Profile \zs\S\{1,8} \zeis a member of group: / +syn match upstreamlog_Profile /Backup Profile: \zs\S\{1,8}\ze Version date/ +syn match upstreamlog_Profile /Backup profile: \zs\S\{1,8}\ze Version date/ +syn match usserverlog_Profile /Full of \zs\S\{1,8}\ze$/ +syn match usserverlog_Profile /Incr. of \zs\S\{1,8}\ze$/ +syn match usserverlog_Profile /Profile=\zs\S\{1,8}\ze,/ +" Target: +syn region usserverlog_Target start="Computer: \zs" end="\ze[\]\)]" +syn region usserverlog_Target start="Computer name \zs\"" end="\"\ze" +syn region usserverlog_Target start="Registration add request successful \zs" end="$" +syn region usserverlog_Target start="request to registered name \zs" end=" " +syn region usserverlog_Target start=", sending to \zs" end="$" + +hi def link usserverlog_Date Underlined +hi def link usserverlog_MsgD Type +hi def link usserverlog_MsgE Error +hi def link usserverlog_MsgW Constant +hi def link usserverlog_Process Statement +hi def link usserverlog_IPaddr Identifier +hi def link usserverlog_Profile Identifier +hi def link usserverlog_Target Identifier + +let b:current_syntax = "usserverlog" diff --git a/runtime/syntax/usw2kagtlog.vim b/runtime/syntax/usw2kagtlog.vim new file mode 100644 index 0000000000..0a34128f9b --- /dev/null +++ b/runtime/syntax/usw2kagtlog.vim @@ -0,0 +1,50 @@ +" Vim syntax file +" Language: Innovation Data Processing USW2KAgt.log file +" Maintainer: Rob Owens +" Latest Revision: 2013-09-19 + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Date: +syn match usw2kagtlog_Date /\u\l\l \u\l\l\s\{1,2}\d\{1,2} \d\d:\d\d:\d\d \d\d\d\d/ +" Msg Types: +syn match usw2kagtlog_MsgD /Msg #\(Agt\|PC\|Srv\)\d\{4,5}D/ nextgroup=usw2kagtlog_Process skipwhite +syn match usw2kagtlog_MsgE /Msg #\(Agt\|PC\|Srv\)\d\{4,5}E/ nextgroup=usw2kagtlog_Process skipwhite +syn match usw2kagtlog_MsgI /Msg #\(Agt\|PC\|Srv\)\d\{4,5}I/ nextgroup=usw2kagtlog_Process skipwhite +syn match usw2kagtlog_MsgW /Msg #\(Agt\|PC\|Srv\)\d\{4,5}W/ nextgroup=usw2kagtlog_Process skipwhite +" Processes: +syn region usw2kagtlog_Process start="(" end=")" contained +syn region usw2kagtlog_Process start="Starting the processing for a \zs\"" end="\ze client request" +syn region usw2kagtlog_Process start="Ending the processing for a \zs\"" end="\ze client request" +" IP Address: +syn match usw2kagtlog_IPaddr / \d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ +" Profile: + +syn match usw2kagtlog_Profile /Profile name \zs\"\S\{1,8}\"/ +syn match usw2kagtlog_Profile / Profile: \zs\S\{1,8}/ +syn match usw2kagtlog_Profile / Profile: \zs\S\{1,8}\ze, / +syn match upstreamlog_Profile /Backup Profile: \zs\S\{1,8}\ze Version date/ +syn match upstreamlog_Profile /Backup profile: \zs\S\{1,8}\ze Version date/ +syn match usw2kagtlog_Profile /Full of \zs\S\{1,8}\ze$/ +syn match usw2kagtlog_Profile /Incr. of \zs\S\{1,8}\ze$/ +syn match usw2kagtlog_Profile /profile name "\zs\S\{1,8}\ze"/ +" Target: +syn region usw2kagtlog_Target start="Computer: \zs" end="\ze[\]\)]" +syn region usw2kagtlog_Target start="Computer name \zs\"" end="\"\ze" +" Agent Keywords: +syn keyword usw2kagtlog_Agentword opened closed + +hi def link usw2kagtlog_Date Underlined +hi def link usw2kagtlog_MsgD Type +hi def link usw2kagtlog_MsgE Error +hi def link usw2kagtlog_MsgW Constant +hi def link usw2kagtlog_Process Statement +hi def link usw2kagtlog_IPaddr Identifier +hi def link usw2kagtlog_Profile Identifier +hi def link usw2kagtlog_Target Identifier +hi def link usw2kagtlog_Agentword Special + +let b:current_syntax = "usw2kagentlog" diff --git a/runtime/syntax/valgrind.vim b/runtime/syntax/valgrind.vim new file mode 100644 index 0000000000..48e9564acb --- /dev/null +++ b/runtime/syntax/valgrind.vim @@ -0,0 +1,104 @@ +" Vim syntax file +" Language: Valgrind Memory Debugger Output +" Maintainer: Roger Luethi +" Program URL: http://devel-home.kde.org/~sewardj/ +" Last Change: 2012 Apr 30 +" +" Notes: mostly based on strace.vim and xml.vim + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif +let s:keepcpo= &cpo +set cpo&vim + +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" + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/syntax/vb.vim b/runtime/syntax/vb.vim new file mode 100644 index 0000000000..14f9e64850 --- /dev/null +++ b/runtime/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/runtime/syntax/vera.vim b/runtime/syntax/vera.vim new file mode 100644 index 0000000000..b8e25cf346 --- /dev/null +++ b/runtime/syntax/vera.vim @@ -0,0 +1,361 @@ +" Vim syntax file +" Language: Vera +" Maintainer: Dave Eggum (opine at bluebottle dOt com) +" Last Change: 2005 Dec 19 + +" NOTE: extra white space at the end of the line will be highlighted if you +" add this line to your colorscheme: + +" highlight SpaceError guibg=#204050 + +" (change the value for guibg to any color you like) + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" A bunch of useful Vera keywords +syn keyword veraStatement break return continue fork join terminate +syn keyword veraStatement breakpoint proceed + +syn keyword veraLabel bad_state bad_trans bind constraint coverage_group +syn keyword veraLabel class CLOCK default function interface m_bad_state +syn keyword veraLabel m_bad_trans m_state m_trans program randseq state +syn keyword veraLabel task trans + +syn keyword veraConditional if else case casex casez randcase +syn keyword veraRepeat repeat while for do foreach +syn keyword veraModifier after all any around assoc_size async +syn keyword veraModifier before big_endian bit_normal bit_reverse export +syn keyword veraModifier extends extern little_endian local hdl_node hdl_task +syn keyword veraModifier negedge none packed protected posedge public rules +syn keyword veraModifier shadow soft static super this typedef unpacked var +syn keyword veraModifier vca virtual virtuals wildcard with + +syn keyword veraType reg string enum event bit +syn keyword veraType rand randc integer port prod + +syn keyword veraDeprecated call_func call_task close_conn get_bind get_bind_id +syn keyword veraDeprecated get_conn_err mailbox_receive mailbox_send make_client +syn keyword veraDeprecated make_server simwave_plot up_connections + +" predefined tasks and functions +syn keyword veraTask alloc assoc_index cast_assign cm_coverage +syn keyword veraTask cm_get_coverage cm_get_limit delay error error_mode +syn keyword veraTask exit fclose feof ferror fflush flag fopen fprintf +syn keyword veraTask freadb freadh freadstr get_cycle get_env get_memsize +syn keyword veraTask get_plus_arg getstate get_systime get_time get_time_unit +syn keyword veraTask initstate lock_file mailbox_get mailbox_put os_command +syn keyword veraTask printf prodget prodset psprintf query query_str query_x +syn keyword veraTask rand48 random region_enter region_exit rewind +syn keyword veraTask semaphore_get semaphore_put setstate signal_connect +syn keyword veraTask sprintf srandom sscanf stop suspend_thread sync +syn keyword veraTask timeout trace trigger unit_delay unlock_file urand48 +syn keyword veraTask urandom urandom_range vera_bit_reverse vera_crc +syn keyword veraTask vera_pack vera_pack_big_endian vera_plot +syn keyword veraTask vera_report_profile vera_unpack vera_unpack_big_endian +syn keyword veraTask vsv_call_func vsv_call_task vsv_get_conn_err +syn keyword veraTask vsv_make_client vsv_make_server vsv_up_connections +syn keyword veraTask vsv_wait_for_done vsv_wait_for_input wait_child wait_var + +syn cluster veraOperGroup contains=veraOperator,veraOperParen,veraNumber,veraString,veraOperOk,veraType +" syn match veraOperator "++\|--\|&\|\~&\||\|\~|\|^\|\~^\|\~\|><" +" syn match veraOperator "*\|/\|%\|+\|-\|<<\|>>\|<\|<=\|>\|>=\|!in" +" syn match veraOperator "=?=\|!?=\|==\|!=\|===\|!==\|&\~\|^\~\||\~" +" syn match veraOperator "&&\|||\|=\|+=\|-=\|*=\|/=\|%=\|<<=\|>>=\|&=" +" syn match veraOperator "|=\|^=\|\~&=\|\~|=\|\~^=" + +syn match veraOperator "[&|\~>" +" "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/runtime/syntax/verilog.vim b/runtime/syntax/verilog.vim new file mode 100644 index 0000000000..f4d21d0739 --- /dev/null +++ b/runtime/syntax/verilog.vim @@ -0,0 +1,136 @@ +" Vim syntax file +" Language: Verilog +" Maintainer: Mun Johl +" Last Update: Wed Jul 20 16:04:19 PDT 2011 + +" 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. +" NOTE: '?' was added so that verilogNumber would be processed correctly when +" '?' is the last character of the number. +if version >= 600 + setlocal iskeyword=@,48-57,63,_,192-255 +else + set iskeyword=@,48-57,63,_,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 FIXME + +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/runtime/syntax/verilogams.vim b/runtime/syntax/verilogams.vim new file mode 100644 index 0000000000..d16e4bffb4 --- /dev/null +++ b/runtime/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/runtime/syntax/vgrindefs.vim b/runtime/syntax/vgrindefs.vim new file mode 100644 index 0000000000..3de31b1437 --- /dev/null +++ b/runtime/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/runtime/syntax/vhdl.vim b/runtime/syntax/vhdl.vim new file mode 100644 index 0000000000..db51fa5034 --- /dev/null +++ b/runtime/syntax/vhdl.vim @@ -0,0 +1,206 @@ +" Vim syntax file +" Language: VHDL +" Maintainer: Daniel Kho +" Previous Maintainer: Czo +" Credits: Stephan Hegel +" Last Changed: 2012 Feb 03 by Thilo Six +" $Id: vhdl.vim,v 1.1 2004/06/13 15:34:56 vimboss Exp $ + +" VHSIC (Very High Speed Integrated Circuit) Hardware Description 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 + +let s:cpo_save = &cpo +set cpo&vim + +" 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 assume assume_guarantee +syn keyword vhdlStatement begin block body buffer bus +syn keyword vhdlStatement case component configuration constant +syn keyword vhdlStatement context cover +syn keyword vhdlStatement default disconnect downto +syn keyword vhdlStatement elsif end entity exit +syn keyword vhdlStatement file for function +syn keyword vhdlStatement fairness force +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 parameter property protected +syn keyword vhdlStatement range record register reject report return +syn keyword vhdlStatement release restrict restrict_guarantee +syn keyword vhdlStatement select severity signal shared +syn keyword vhdlStatement subtype +syn keyword vhdlStatement sequence strong +syn keyword vhdlStatement then to transport type +syn keyword vhdlStatement unaffected units until use +syn keyword vhdlStatement variable +syn keyword vhdlStatement vmode vprop vunit +syn keyword vhdlStatement 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" + +" Predefined VHDL types +syn keyword vhdlType bit bit_vector +syn keyword vhdlType character boolean integer real time +syn keyword vhdlType boolean_vector integer_vector real_vector time_vector +syn keyword vhdlType string severity_level +" Predefined 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 keyword vhdlTodo contained TODO FIXME + +syn region vhdlComment start="/\*" end="\*/" contains=vhdlTodo,@Spell +syn match vhdlComment "--.*" contains=vhdlTodo,@Spell +" syn match vhdlGlobal "[\'$#~!%@?\^\[\]{}\\]" + +"Modify the following as needed. The trade-off is performance versus functionality. +syn sync minlines=200 + +" 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 Character + HiLink vhdlString String + HiLink vhdlVector Number + HiLink vhdlBoolean Number + HiLink vhdlTodo Todo + HiLink vhdlComment Comment + HiLink vhdlNumber Number + HiLink vhdlTime Number + HiLink vhdlType Type + HiLink vhdlOperator Special +" HiLink vhdlGlobal Error + HiLink vhdlAttribute Type + + delcommand HiLink +endif + +let b:current_syntax = "vhdl" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim new file mode 100644 index 0000000000..8d98f7d7d8 --- /dev/null +++ b/runtime/syntax/vim.vim @@ -0,0 +1,922 @@ +" Vim syntax file +" Language: Vim 7.4 script +" Maintainer: Charles E. Campbell +" Last Change: Mar 20, 2014 +" Version: 7.4-27 +" Automatically generated keyword lists: {{{1 + +" Quit when a syntax file was already loaded {{{2 +if exists("b:current_syntax") + finish +endif +let s:keepcpo= &cpo +set cpo&vim + +" vimTodo: contains common special-notices for comments {{{2 +" Use the vimCommentGroup cluster to add your own. +syn cluster vimCommentGroup contains=vimTodo,@Spell + +" regular vim commands {{{2 +syn keyword vimCommand contained a arga[dd] ar[gs] bd[elete] bN[ext] breakd[el] bufdo cabc[lear] cat[ch] cex[pr] c[hange] cla[st] cnew[er] cNf[ile] con cp[revious] cuna[bbrev] del deletep delm[arks] diffp[atch] dig[raphs] do e echon endf endw[hile] f[ile] fin[d] folddoc[losed] fu[nction] gvim helpt[ags] iabc[lear] intro k l lan lc[d] lefta[bove] lg[etfile] lla[st] lnew[er] lNf[ile] lockv[ar] ls lvimgrepa[dd] mat[ch] mk[exrc] mo n n[ext] o ownsyntax perld[o] pre[serve] promptf[ind] ptl[ast] ptr[ewind] py3do qa[ll] r[ead] redr[aw] retu[rn] rub[y] rv[iminfo] sba[ll] sbN[ext] scripte[ncoding] setf[iletype] sh[ell] sim[alt] sm[ap] sni[ff] sor[t] spelli[nfo] spr[evious] start st[op] sunmenu syn ta tabf[ind] tabnew tabr[ewind] tcld[o] tj[ump] tN tr tu[nmenu] undoj[oin] uns[ilent] ve[rsion] vimgrepa[dd] vs[plit] winc[md] wN[ext] ws[verb] x[it] xnoremenu +syn keyword vimCommand contained ab argd[elete] argu[ment] bel[owright] bo[tright] breakl[ist] b[uffer] cad cb[uffer] cf[ile] changes cl[ist] cn[ext] col[der] conf[irm] cq[uit] cw[indow] delc[ommand] deletl delp diffpu[t] dir doau ea e[dit] endfo[r] ene[w] files fini[sh] foldd[oopen] g h hi if is[earch] keepa la lan[guage] lch[dir] lex[pr] lgr[ep] lli[st] lne[xt] lo lol[der] lt[ag] lw[indow] menut mks[ession] mod[e] nbc[lose] nmapc[lear] ol[dfiles] p po[p] prev[ious] promptr[epl] ptn pts[elect] pydo q[uit] rec[over] redraws[tatus] rew[ind] rubyd[o] sal[l] sbf[irst] sbp[revious] scrip[tnames] setg[lobal] si sl sme sno[magic] so[urce] spellr[epall] sre[wind] startg[replace] stopi[nsert] sus[pend] sync tab tabfir[st] tabn[ext] tabs tclf[ile] tl[ast] tn[ext] tr[ewind] u undol[ist] up[date] vert[ical] vi[sual] w windo wp[revious] wundo xmapc[lear] xunme +syn keyword vimCommand contained abc[lear] argdo as[cii] bf[irst] bp[revious] br[ewind] buffers caddb[uffer] cc cfir[st] chd[ir] clo[se] cN[ext] colo[rscheme] con[tinue] cr[ewind] d delel deletp dep diffs[plit] di[splay] dp earlier el[se] endfun ex filet fir[st] foldo[pen] go[to] ha[rdcopy] hid[e] ij[ump] isp[lit] keepalt lad la[st] lcl[ose] lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lop[en] lua ma menut[ranslate] mksp[ell] m[ove] nb[key] noa omapc[lear] pc[lose] popu p[rint] ps[earch] ptN pu[t] pyf[ile] quita[ll] red reg[isters] ri[ght] rubyf[ile] san[dbox] sbl[ast] sbr[ewind] scs setl[ocal] sig sla[st] smenu snoreme spe spellu[ndo] st star[tinsert] sts[elect] sv[iew] syncbind tabc[lose] tabl[ast] tabN[ext] ta[g] te[aroff] tm tN[ext] try un unh[ide] v vi viu[sage] wa[ll] winp[os] wq wv[iminfo] xme xunmenu +syn keyword vimCommand contained abo[veleft] arge[dit] au bl[ast] br bro[wse] bun[load] cad[dexpr] ccl[ose] cgetb[uffer] che[ckpath] cmapc[lear] cnf com cope[n] cs de delep delf di difft[his] dj[ump] dr[op] ec elsei[f] endf[unction] exi[t] filetype fix[del] for gr[ep] h[elp] his[tory] il[ist] iuna[bbrev] keepj[umps] laddb[uffer] lat lcs lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lpf[ile] luado mak[e] mes mkv mz nbs[tart] noautocmd on[ly] pe popu[p] pro pta[g] ptn[ext] pw[d] py[thon] r redi[r] res[ize] rightb[elow] rundo sa[rgument] sbm[odified] sb[uffer] scscope sf[ind] sign sl[eep] sn[ext] snoremenu spelld[ump] spellw[rong] sta[g] startr[eplace] sun[hide] sw[apname] syntime tabd[o] tabm[ove] tabo[nly] tags tf[irst] tm[enu] to[pleft] ts[elect] una[bbreviate] unl ve vie[w] vmapc[lear] wh[ile] win[size] wqa[ll] x xmenu xwininfo +syn keyword vimCommand contained al[l] argg[lobal] bad[d] bm[odified] brea[k] bu bw[ipeout] caddf[ile] cd cgete[xpr] checkt[ime] cn cNf comc[lear] co[py] cscope debug d[elete] delf[unction] diffg[et] diffu[pdate] dl ds[earch] echoe[rr] em[enu] en[dif] exu[sage] fin fo[ld] fu grepa[dd] helpf[ind] i imapc[lear] j[oin] kee[pmarks] lad[dexpr] later lcscope lgetb[uffer] l[ist] lN lNf lo[adview] lp[revious] luafile ma[rk] messages mkvie[w] mzf[ile] ne noh[lsearch] o[pen] ped[it] pp[op] profd[el] ptf[irst] ptN[ext] py python3 re red[o] ret[ab] ru ru[ntime] sav[eas] sbn[ext] scrip se[t] sfir[st] sil[ent] sm[agic] sN[ext] so spe[llgood] sp[lit] star stj[ump] sunme sy t tabe[dit] tabN tabp[revious] tc[l] th[row] tn tp[revious] tu u[ndo] unlo[ckvar] verb[ose] vim[grep] vne[w] win wn[ext] w[rite] xa[ll] xnoreme y[ank] +syn keyword vimCommand contained ar argl[ocal] ba[ll] bn[ext] breaka[dd] buf c cal[l] ce[nter] cg[etfile] cl cN cnf[ile] comp[iler] cpf[ile] cstag debugg[reedy] deletel dell diffo[ff] dig dli[st] dsp[lit] echom[sg] en endt[ry] f fina[lly] foldc[lose] fun gui helpg[rep] ia in ju[mps] keepp[atterns] laddf[ile] lb[uffer] le[ft] lgete[xpr] ll lne lnf[ile] loc[kmarks] lr[ewind] lv[imgrep] marks mk mkv[imrc] mz[scheme] new nu[mber] opt[ions] pe[rl] pr prof[ile] ptj[ump] ptp[revious] py3 q +syn match vimCommand contained "\